diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/acinclude.m4 ./bfd/acinclude.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/acinclude.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/acinclude.m4	2017-03-06 01:49:05.000000000 +0000
@@ -1,16 +1,16 @@
 dnl
-dnl   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aclocal.m4 ./bfd/aclocal.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aclocal.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aclocal.m4	2017-03-06 01:49:05.000000000 +0000
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -19,12 +20,15 @@ You have another version of autoconf.  I
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $dep
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $dep
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -545,12 +555,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -569,8 +582,8 @@ AC_SUBST(install_sh)])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -590,7 +603,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
        [disable], [m4_define([am_maintainer_other], [enable])],
        [m4_define([am_maintainer_other], [enable])
         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
@@ -701,12 +714,15 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
@@ -729,13 +745,14 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -743,13 +760,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -825,12 +842,14 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
@@ -853,13 +872,13 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -868,13 +887,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -896,10 +915,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aix386-core.c ./bfd/aix386-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aix386-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aix386-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,7 +1,7 @@
 /* BFD back-end for AIX on PS/2 core files.
    This was based on trad-core.c, which was written by John Gilmore of
         Cygnus Support.
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
    Written by Minh Tran-Le <TRANLE@INTELLICORP.COM>.
    Converted to back end form by Ian Lance Taylor <ian@cygnus.com>.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aix5ppc-core.c ./bfd/aix5ppc-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aix5ppc-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aix5ppc-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM RS/6000 "XCOFF" back-end for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Tom Rix
    Contributed by Red Hat Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout0.c ./bfd/aout0.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout0.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout0.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for SunOS style a.out with flags set to 0
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout32.c ./bfd/aout32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for 32-bit a.out files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout64.c ./bfd/aout64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for 64-bit a.out files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-adobe.c ./bfd/aout-adobe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-adobe.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-adobe.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for a.out.adobe binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.  Based on bout.c.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -86,8 +86,8 @@ aout_adobe_callback (bfd *abfd)
   bfd_set_arch_mach (abfd, bfd_arch_unknown, 0L);
 
   /* The positions of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Suck up the section information from the file, one section at a time.  */
   for (;;)
@@ -121,7 +121,8 @@ aout_adobe_callback (bfd *abfd)
 	  goto no_more_sections;
 
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: Unknown section type in a.out.adobe file: %x\n"),
 	     abfd, ext->e_type[0]);
 	  goto no_more_sections;
@@ -166,12 +167,12 @@ aout_adobe_callback (bfd *abfd)
 	switch (ext->e_type[0])
 	  {
 	  case N_TEXT:
-	    sect->rel_filepos = N_TRELOFF (*execp);
+	    sect->rel_filepos = N_TRELOFF (execp);
 	    sect->reloc_count = execp->a_trsize;
 	    break;
 
 	  case N_DATA:
-	    sect->rel_filepos = N_DRELOFF (*execp);
+	    sect->rel_filepos = N_DRELOFF (execp);
 	    sect->reloc_count = execp->a_drsize;
 	    break;
 
@@ -213,7 +214,7 @@ aout_adobe_object_p (bfd *abfd)
      If the environment variable GNUTARGET is set to "a.out.adobe", we will
      take just about any a.out file as an Adobe a.out file.  FIXME!  */
 
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       targ = getenv ("GNUTARGET");
       if (targ && !strcmp (targ, aout_adobe_vec.name))
@@ -333,14 +334,14 @@ aout_adobe_write_object_contents (bfd *a
   /* Now write out reloc info, followed by syms and strings.  */
   if (bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
       if (! aout_32_write_syms (abfd))
 	return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
@@ -349,7 +350,7 @@ aout_adobe_write_object_contents (bfd *a
 	  if (!aout_32_squirt_out_relocs (abfd, sect))
 	    return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
@@ -377,7 +378,7 @@ aout_adobe_set_section_contents (bfd *ab
     {
       /* Assign file offsets to sections.  Text sections are first, and
 	 are contiguous.  Then data sections.  Everything else at the end.  */
-      section_start = N_TXTOFF (ignore<-->me);
+      section_start = N_TXTOFF (0);
 
       for (sect = abfd->sections; sect; sect = sect->next)
 	{
@@ -472,6 +473,7 @@ aout_adobe_sizeof_headers (bfd *ignore_a
   _bfd_generic_copy_link_hash_symbol_type
 #define aout_32_bfd_final_link		            _bfd_generic_final_link
 #define aout_32_bfd_link_split_section	            _bfd_generic_link_split_section
+#define aout_32_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 const bfd_target aout_adobe_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-arm.c ./bfd/aout-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for raw ARM a.out binaries.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -34,7 +34,7 @@
    : ((N_MAGIC (x) != ZMAGIC)					\
       ? (bfd_vma) 0						\
       : ((N_SHARED_LIB (x))					\
-	 ? ((x).a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))	\
+	 ? ((x)->a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))	\
 	 : (bfd_vma) TEXT_START_ADDR)))
 
 #define TEXT_START_ADDR 0x8000
@@ -43,10 +43,10 @@
 #define DEFAULT_ARCH bfd_arch_arm
 
 #define MY(OP) CONCAT2 (arm_aout_,OP)
-#define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) && \
-                     (((x).a_info & ~006000) != OMAGIC) && \
-                     ((x).a_info != NMAGIC))
-#define N_MAGIC(x) ((x).a_info & ~07200)
+#define N_BADMAG(x) ((((x)->a_info & ~007200) != ZMAGIC) && \
+                     (((x)->a_info & ~006000) != OMAGIC) && \
+                     ((x)->a_info != NMAGIC))
+#define N_MAGIC(x) ((x)->a_info & ~07200)
 
 #define MY_bfd_reloc_type_lookup arm_aout_bfd_reloc_type_lookup
 #define MY_bfd_reloc_name_lookup arm_aout_bfd_reloc_name_lookup
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-cris.c ./bfd/aout-cris.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-cris.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-cris.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for CRIS a.out binaries.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson.
 
@@ -37,7 +37,7 @@
    after text, but with those, we don't have any choice besides reading
    symbol info, and luckily there's no pressing need for correctness for
    those vma:s at this time.  */
-#define N_TXTADDR(x) ((x).a_entry & ~(bfd_vma) 0xffff)
+#define N_TXTADDR(x) ((x)->a_entry & ~(bfd_vma) 0xffff)
 
 /* If you change this to 4, you can not link to an address N*4+2.  */
 #define SEGMENT_SIZE 2
@@ -93,8 +93,8 @@ static bfd_boolean MY (set_sizes) (bfd *
    not call set_sizes.  */
 
 #define MY_set_arch_mach NAME (aout, set_arch_mach)
-#define SET_ARCH_MACH(BFD, EXEC) \
- MY_set_arch_mach (BFD, DEFAULT_ARCH, N_MACHTYPE (EXEC))
+#define SET_ARCH_MACH(BFD, EXECP) \
+ MY_set_arch_mach (BFD, DEFAULT_ARCH, N_MACHTYPE (EXECP))
 
 /* These macros describe the binary layout of the reloc information we
    use in a file.  */
@@ -129,9 +129,9 @@ MY (write_object_contents) (bfd *abfd)
   /* Setting N_SET_MACHTYPE and using N_SET_FLAGS is not performed by
      the default definition.  */
   if (bfd_get_arch (abfd) == bfd_arch_cris)
-    N_SET_MACHTYPE (*execp, M_CRIS);
+    N_SET_MACHTYPE (execp, M_CRIS);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   WRITE_HEADERS (abfd, execp);
 
@@ -196,8 +196,9 @@ MY (swap_ext_reloc_out) (bfd *abfd,
      We may change this later, but assert this for the moment.  */
   if (r_type > 2)
     {
-      (*_bfd_error_handler) (_("%s: Invalid relocation type exported: %d"),
-			     bfd_get_filename (abfd), r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%s: Invalid relocation type exported: %d"),
+			  bfd_get_filename (abfd), r_type);
 
       bfd_set_error (bfd_error_wrong_format);
     }
@@ -239,8 +240,9 @@ MY (swap_ext_reloc_in) (bfd *abfd,
 
   if (r_type > 2)
     {
-      (*_bfd_error_handler) (_("%B: Invalid relocation type imported: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: Invalid relocation type imported: %d"),
+			  abfd, r_type);
 
       bfd_set_error (bfd_error_wrong_format);
     }
@@ -249,7 +251,8 @@ MY (swap_ext_reloc_in) (bfd *abfd,
 
   if (r_extern && r_index > symcount)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
         (_("%B: Bad relocation record imported: %d"), abfd, r_index);
 
       bfd_set_error (bfd_error_wrong_format);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aoutf1.h ./bfd/aoutf1.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aoutf1.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aoutf1.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* A.out "format 1" file handling code for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -75,8 +75,9 @@
 #define MY_bfd_merge_private_bfd_data sunos_merge_private_bfd_data
 
 static bfd_boolean
-sunos_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+sunos_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   if (bfd_get_flavour (ibfd) != bfd_target_aout_flavour
       || bfd_get_flavour (obfd) != bfd_target_aout_flavour)
     return TRUE;
@@ -155,8 +156,8 @@ sunos_set_arch_mach (bfd *abfd, enum mac
   bfd_set_arch_mach (abfd, arch, machine);
 }
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   choose_reloc_size(ABFD);
 
 /* Determine the size of a relocation entry, based on the architecture.  */
@@ -194,14 +195,14 @@ sunos_write_object_contents (bfd *abfd)
       switch (bfd_get_mach (abfd))
 	{
 	case bfd_mach_m68000:
-	  N_SET_MACHTYPE (*execp, M_UNKNOWN);
+	  N_SET_MACHTYPE (execp, M_UNKNOWN);
 	  break;
 	case bfd_mach_m68010:
-	  N_SET_MACHTYPE (*execp, M_68010);
+	  N_SET_MACHTYPE (execp, M_68010);
 	  break;
 	default:
 	case bfd_mach_m68020:
-	  N_SET_MACHTYPE (*execp, M_68020);
+	  N_SET_MACHTYPE (execp, M_68020);
 	  break;
 	}
       break;
@@ -209,28 +210,28 @@ sunos_write_object_contents (bfd *abfd)
       switch (bfd_get_mach (abfd))
 	{
 	case bfd_mach_sparc_sparclet:
-	  N_SET_MACHTYPE (*execp, M_SPARCLET);
+	  N_SET_MACHTYPE (execp, M_SPARCLET);
 	  break;
 	case bfd_mach_sparc_sparclite_le:
-	  N_SET_MACHTYPE (*execp, M_SPARCLITE_LE);
+	  N_SET_MACHTYPE (execp, M_SPARCLITE_LE);
 	  break;
 	default:
-	  N_SET_MACHTYPE (*execp, M_SPARC);
+	  N_SET_MACHTYPE (execp, M_SPARC);
 	  break;
 	}
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   choose_reloc_size (abfd);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
-  N_SET_DYNAMIC (*execp, (long)(bfd_get_file_flags (abfd) & DYNAMIC));
+  N_SET_DYNAMIC (execp, (long)(bfd_get_file_flags (abfd) & DYNAMIC));
 
   WRITE_HEADERS (abfd, execp);
 
@@ -397,7 +398,7 @@ swapcore_sun3 (bfd *abfd, char *ext, str
   intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
   intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
   intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
-  intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
+  intcore->c_data_addr = N_DATADDR (&intcore->c_aouthdr);
   intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
   intcore->fp_stuff_pos = offsetof (struct external_sun3_core, fp_stuff);
@@ -432,7 +433,7 @@ swapcore_sparc (bfd *abfd, char *ext, st
   intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
   intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
   intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
-  intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
+  intcore->c_data_addr = N_DATADDR (&intcore->c_aouthdr);
   intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
   intcore->fp_stuff_pos = offsetof (struct external_sparc_core, fp_stuff);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-ns32k.c ./bfd/aout-ns32k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-ns32k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-ns32k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ns32k a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-sparcle.c ./bfd/aout-sparcle.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-sparcle.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-sparcle.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for sparc little-endian aout binaries.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-target.h ./bfd/aout-target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-target.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-target.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Define a target vector and some small routines for a variant of a.out.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -42,12 +42,12 @@ MY (callback) (bfd *abfd)
   unsigned long arch_align;
 
   /* Calculate the file positions of the parts of a newly read aout header.  */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* For some targets, if the entry point is not in the same page
      as the start of the text, then adjust the VMA so that it is.
@@ -71,20 +71,20 @@ MY (callback) (bfd *abfd)
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
 #endif
@@ -149,11 +149,11 @@ MY (object_p) (bfd *abfd)
   exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
 #endif
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return 0;
 
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return 0;
 #endif
 
@@ -332,9 +332,9 @@ MY_final_link_callback (bfd *abfd,
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
-  *ptreloff = N_TRELOFF (*execp);
-  *pdreloff = N_DRELOFF (*execp);
-  *psymoff = N_SYMOFF (*execp);
+  *ptreloff = N_TRELOFF (execp);
+  *pdreloff = N_DRELOFF (execp);
+  *psymoff = N_SYMOFF (execp);
 }
 
 #endif
@@ -373,7 +373,7 @@ MY_bfd_final_link (bfd *abfd, struct bfd
   _bfd_archive_bsd_construct_extended_name_table
 #endif
 #ifndef	MY_write_armap
-#define	MY_write_armap		bsd_write_armap
+#define	MY_write_armap		_bfd_bsd_write_armap
 #endif
 #ifndef MY_read_ar_hdr
 #define MY_read_ar_hdr		_bfd_generic_read_ar_hdr
@@ -542,6 +542,10 @@ MY_bfd_final_link (bfd *abfd, struct bfd
 #define MY_bfd_link_split_section  _bfd_generic_link_split_section
 #endif
 
+#ifndef MY_bfd_link_check_relocs
+#define MY_bfd_link_check_relocs   _bfd_generic_link_check_relocs
+#endif
+
 #ifndef MY_bfd_copy_private_bfd_data
 #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-tic30.c ./bfd/aout-tic30.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aout-tic30.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aout-tic30.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C30 a.out binaries.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -339,32 +339,32 @@ tic30_aout_callback (bfd *abfd)
   unsigned long arch_align;
 
   /* Calculate the file positions of the parts of a newly read aout header.  */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec (abfd)->vma = N_BSSADDR (execp);
 
   obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0L);
 #endif
@@ -568,10 +568,10 @@ tic30_aout_object_p (bfd *abfd)
   exec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 #endif /* SWAP_MAGIC */
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return 0;
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return 0;
 #endif
 
@@ -636,11 +636,8 @@ tic30_aout_write_object_contents (bfd *a
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
   {
-    bfd_size_type text_size;	/* Dummy vars.  */
-    file_ptr text_end;
-
     if (adata (abfd).magic == undecided_magic)
-      NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+      NAME (aout, adjust_sizes_and_vmas) (abfd);
 
     execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
     execp->a_entry = bfd_get_start_address (abfd);
@@ -664,19 +661,19 @@ tic30_aout_write_object_contents (bfd *a
     if (bfd_get_outsymbols (abfd) != (asymbol **) NULL
 	&& bfd_get_symcount (abfd) != 0)
       {
-	if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*execp)), SEEK_SET) != 0)
+	if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)
 	  return FALSE;
 
 	if (!NAME (aout, write_syms) (abfd))
 	  return FALSE;
       }
 
-    if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
+    if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0)
       return FALSE;
     if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
       return FALSE;
 
-    if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
+    if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0)
       return FALSE;
     if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
       return FALSE;
@@ -831,7 +828,7 @@ tic30_aout_set_arch_mach (bfd *abfd,
   _bfd_archive_bsd_construct_extended_name_table
 #endif
 #ifndef	MY_write_armap
-#define	MY_write_armap			bsd_write_armap
+#define	MY_write_armap			_bfd_bsd_write_armap
 #endif
 #ifndef MY_read_ar_hdr
 #define MY_read_ar_hdr			_bfd_generic_read_ar_hdr
@@ -1000,6 +997,10 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #define MY_bfd_link_split_section  _bfd_generic_link_split_section
 #endif
 
+#ifndef MY_bfd_link_check_relocs
+#define MY_bfd_link_check_relocs   _bfd_generic_link_check_relocs
+#endif
+
 #ifndef MY_bfd_copy_private_bfd_data
 #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aoutx.h ./bfd/aoutx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/aoutx.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/aoutx.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD semi-generic back-end for a.out binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -488,27 +488,27 @@ NAME (aout, some_aout_object_p) (bfd *ab
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC (*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
-  if (N_MAGIC (*execp) == ZMAGIC)
+  if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == QMAGIC)
+  else if (N_MAGIC (execp) == QMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
       adata (abfd).subformat = q_magic_format;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC
-	   || N_MAGIC (*execp) == BMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC
+	   || N_MAGIC (execp) == BMAGIC)
     adata (abfd).magic = o_magic;
   else
     /* Should have been checked with N_BADMAG before this routine
@@ -563,28 +563,28 @@ NAME (aout, some_aout_object_p) (bfd *ab
 
   struct exec *execp = exec_hdr (abfd);
 
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
   /* Data and bss are already filled in since they're so standard.  */
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
-  switch (N_MACHTYPE (*exec_hdr (abfd)))
+  switch (N_MACHTYPE (exec_hdr (abfd)))
     {
     default:
       abfd->obj_arch = bfd_arch_obscure;
@@ -733,9 +733,19 @@ NAME (aout, machine_type) (enum bfd_arch
 	  || machine == bfd_mach_sparc_v8plus
 	  || machine == bfd_mach_sparc_v8plusa
 	  || machine == bfd_mach_sparc_v8plusb
+          || machine == bfd_mach_sparc_v8plusc
+          || machine == bfd_mach_sparc_v8plusd
+          || machine == bfd_mach_sparc_v8pluse
+          || machine == bfd_mach_sparc_v8plusv
+          || machine == bfd_mach_sparc_v8plusm
 	  || machine == bfd_mach_sparc_v9
 	  || machine == bfd_mach_sparc_v9a
-	  || machine == bfd_mach_sparc_v9b)
+	  || machine == bfd_mach_sparc_v9b
+          || machine == bfd_mach_sparc_v9c
+          || machine == bfd_mach_sparc_v9d
+          || machine == bfd_mach_sparc_v9e
+          || machine == bfd_mach_sparc_v9v
+	  || machine == bfd_mach_sparc_v9m)
 	arch_flags = M_SPARC;
       else if (machine == bfd_mach_sparc_sparclet)
 	arch_flags = M_SPARCLET;
@@ -949,7 +959,7 @@ adjust_o_magic (bfd *abfd, struct intern
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, OMAGIC);
+  N_SET_MAGIC (execp, OMAGIC);
 }
 
 static void
@@ -1038,9 +1048,9 @@ adjust_z_magic (bfd *abfd, struct intern
   if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
     execp->a_text += adata (abfd).exec_bytes_size;
   if (obj_aout_subformat (abfd) == q_magic_format)
-    N_SET_MAGIC (*execp, QMAGIC);
+    N_SET_MAGIC (execp, QMAGIC);
   else
-    N_SET_MAGIC (*execp, ZMAGIC);
+    N_SET_MAGIC (execp, ZMAGIC);
 
   /* Spec says data section should be rounded up to page boundary.  */
   obj_datasec (abfd)->size
@@ -1107,13 +1117,11 @@ adjust_n_magic (bfd *abfd, struct intern
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, NMAGIC);
+  N_SET_MAGIC (execp, NMAGIC);
 }
 
 bfd_boolean
-NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
-				    bfd_size_type *text_size,
-				    file_ptr *text_end ATTRIBUTE_UNUSED)
+NAME (aout, adjust_sizes_and_vmas) (bfd *abfd)
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
@@ -1127,7 +1135,6 @@ NAME (aout, adjust_sizes_and_vmas) (bfd 
     align_power (obj_textsec (abfd)->size,
 		 obj_textsec (abfd)->alignment_power);
 
-  *text_size = obj_textsec (abfd)->size;
   /* Rule (heuristic) for when to pad to a new page.  Note that there
      are (at least) two ways demand-paged (ZMAGIC) files have been
      handled.  Most Berkeley-based systems start the text segment at
@@ -1250,12 +1257,9 @@ NAME (aout, set_section_contents) (bfd *
 				   file_ptr offset,
 				   bfd_size_type count)
 {
-  file_ptr text_end;
-  bfd_size_type text_size;
-
   if (! abfd->output_has_begun)
     {
-      if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+      if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
 	return FALSE;
     }
 
@@ -1273,7 +1277,8 @@ NAME (aout, set_section_contents) (bfd *
 			   (section->vma - obj_textsec (abfd)->vma);
       else
 	{
-          (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	   (_("%s: can not represent section `%s' in a.out object file format"),
 	     bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
           bfd_set_error (bfd_error_nonrepresentable_section);
@@ -1573,8 +1578,10 @@ translate_to_native_sym_flags (bfd *abfd
     {
       /* This case occurs, e.g., for the *DEBUG* section of a COFF
 	 file.  */
-      (*_bfd_error_handler)
-	(_("%s: can not represent section for symbol `%s' in a.out object file format"),
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%s: can not represent section for symbol `%s' in a.out "
+	   "object file format"),
 	 bfd_get_filename (abfd),
 	 cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*"));
       bfd_set_error (bfd_error_nonrepresentable_section);
@@ -1607,7 +1614,8 @@ translate_to_native_sym_flags (bfd *abfd
 	sym_pointer->e_type[0] |= N_TEXT;
       else
 	{
-          (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	   (_("%s: can not represent section `%s' in a.out object file format"),
 	     bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
           bfd_set_error (bfd_error_nonrepresentable_section);
@@ -1947,6 +1955,7 @@ NAME (aout, swap_std_reloc_out) (bfd *ab
 
   PUT_WORD (abfd, g->address, natptr->r_address);
 
+  BFD_ASSERT (g->howto != NULL);
   r_length = g->howto->size ;	/* Size as a power of two.  */
   r_pcrel  = (int) g->howto->pc_relative; /* Relative to PC?  */
   /* XXX This relies on relocs coming from a.out files.  */
@@ -2385,16 +2394,39 @@ NAME (aout, squirt_out_relocs) (bfd *abf
       for (natptr = native;
 	   count != 0;
 	   --count, natptr += each_size, ++generic)
-	MY_swap_ext_reloc_out (abfd, *generic,
-			       (struct reloc_ext_external *) natptr);
+	{
+	  /* PR 20921: If the howto field has not been initialised then skip
+	     this reloc.
+	     PR 20929: Similarly for the symbol field.  */
+	  if ((*generic)->howto == NULL
+	      || (*generic)->sym_ptr_ptr == NULL)
+	    {
+	      bfd_set_error (bfd_error_invalid_operation);
+	      _bfd_error_handler (_("\
+%B: attempt to write out unknown reloc type"), abfd);
+	      return FALSE;
+	    }
+	  MY_swap_ext_reloc_out (abfd, *generic,
+				 (struct reloc_ext_external *) natptr);
+	}
     }
   else
     {
       for (natptr = native;
 	   count != 0;
 	   --count, natptr += each_size, ++generic)
-	MY_swap_std_reloc_out (abfd, *generic,
-			       (struct reloc_std_external *) natptr);
+	{
+	  if ((*generic)->howto == NULL
+	      || (*generic)->sym_ptr_ptr == NULL)
+	    {
+	      bfd_set_error (bfd_error_invalid_operation);
+	      _bfd_error_handler (_("\
+%B: attempt to write out unknown reloc type"), abfd);
+	      return FALSE;
+	    }
+	  MY_swap_std_reloc_out (abfd, *generic,
+				 (struct reloc_std_external *) natptr);
+	}
     }
 
   if (bfd_bwrite ((void *) native, natsize, abfd) != natsize)
@@ -2658,7 +2690,7 @@ NAME (aout, find_nearest_line) (bfd *abf
   char *buf;
 
   *filename_ptr = abfd->filename;
-  *functionname_ptr = 0;
+  *functionname_ptr = NULL;
   *line_ptr = 0;
   if (disriminator_ptr)
     *disriminator_ptr = 0;
@@ -2803,9 +2835,17 @@ NAME (aout, find_nearest_line) (bfd *abf
 	*filename_ptr = main_file_name;
       else
 	{
-	  sprintf (buf, "%s%s", directory_name, main_file_name);
-	  *filename_ptr = buf;
-	  buf += filelen + 1;
+	  if (buf == NULL)
+	    /* PR binutils/20891: In a corrupt input file both
+	       main_file_name and directory_name can be empty...  */
+	    * filename_ptr = NULL;
+	  else
+	    {
+	      snprintf (buf, filelen + 1, "%s%s", directory_name,
+			main_file_name);
+	      *filename_ptr = buf;
+	      buf += filelen + 1;
+	    }
 	}
     }
 
@@ -2814,6 +2854,12 @@ NAME (aout, find_nearest_line) (bfd *abf
       const char *function = func->name;
       char *colon;
 
+      if (buf == NULL)
+	{
+	  /* PR binutils/20892: In a corrupt input file func can be empty.  */
+	  * functionname_ptr = NULL;
+	  return TRUE;
+	}
       /* The caller expects a symbol name.  We actually have a
 	 function name, without the leading underscore.  Put the
 	 underscore back in, so that the caller gets a symbol name.  */
@@ -3008,6 +3054,9 @@ aout_link_add_symbols (bfd *abfd, struct
       if ((type & N_STAB) != 0)
 	continue;
 
+      /* PR 19629: Corrupt binaries can contain illegal string offsets.  */
+      if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd))
+	return FALSE;
       name = strings + GET_WORD (abfd, p->e_strx);
       value = GET_WORD (abfd, p->e_value);
       flags = BSF_GLOBAL;
@@ -3064,8 +3113,13 @@ aout_link_add_symbols (bfd *abfd, struct
 	case N_INDR | N_EXT:
 	  /* An indirect symbol.  The next symbol is the symbol
 	     which this one really is.  */
-	  BFD_ASSERT (p + 1 < pend);
+	  /* See PR 20925 for a reproducer.  */
+	  if (p + 1 >= pend)
+	    return FALSE;
 	  ++p;
+	  /* PR 19629: Corrupt binaries can contain illegal string offsets.  */
+	  if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd))
+	    return FALSE;
 	  string = strings + GET_WORD (abfd, p->e_strx);
 	  section = bfd_ind_section_ptr;
 	  flags |= BSF_INDIRECT;
@@ -3099,6 +3153,9 @@ aout_link_add_symbols (bfd *abfd, struct
 	    return TRUE;
 	  ++p;
 	  string = name;
+	  /* PR 19629: Corrupt binaries can contain illegal string offsets.  */
+	  if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd))
+	    return FALSE;
 	  name = strings + GET_WORD (abfd, p->e_strx);
 	  section = bfd_und_section_ptr;
 	  flags |= BSF_WARNING;
@@ -3731,9 +3788,8 @@ aout_link_reloc_link_order (struct aout_
 	}
       else
 	{
-	  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-		 (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
-	    return FALSE;
+	  (*flaginfo->info->callbacks->unattached_reloc)
+	    (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0);
 	  r_index = 0;
 	}
     }
@@ -3828,17 +3884,13 @@ aout_link_reloc_link_order (struct aout_
 	    case bfd_reloc_outofrange:
 	      abort ();
 	    case bfd_reloc_overflow:
-	      if (! ((*flaginfo->info->callbacks->reloc_overflow)
-		     (flaginfo->info, NULL,
-		      (p->type == bfd_section_reloc_link_order
-		       ? bfd_section_name (flaginfo->output_bfd,
-					   pr->u.section)
-		       : pr->u.name),
-		      howto->name, pr->addend, NULL, NULL, (bfd_vma) 0)))
-		{
-		  free (buf);
-		  return FALSE;
-		}
+	      (*flaginfo->info->callbacks->reloc_overflow)
+		(flaginfo->info, NULL,
+		 (p->type == bfd_section_reloc_link_order
+		  ? bfd_section_name (flaginfo->output_bfd,
+				      pr->u.section)
+		  : pr->u.name),
+		 howto->name, pr->addend, NULL, NULL, (bfd_vma) 0);
 	      break;
 	    }
 	  ok = bfd_set_section_contents (flaginfo->output_bfd, o, (void *) buf,
@@ -3946,7 +3998,7 @@ aout_link_input_section_std (struct aout
   BFD_ASSERT (input_bfd->xvec->header_byteorder
 	      == output_bfd->xvec->header_byteorder);
 
-  relocatable = flaginfo->info->relocatable;
+  relocatable = bfd_link_relocatable (flaginfo->info);
   syms = obj_aout_external_syms (input_bfd);
   strings = obj_aout_external_strings (input_bfd);
   sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -4095,10 +4147,9 @@ aout_link_input_section_std (struct aout
 
 			  name = strings + GET_WORD (input_bfd,
 						     syms[r_index].e_strx);
-			  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-				 (flaginfo->info, name, input_bfd, input_section,
-				  r_addr)))
-			    return FALSE;
+			  (*flaginfo->info->callbacks->unattached_reloc)
+			    (flaginfo->info, name,
+			     input_bfd, input_section, r_addr);
 			  r_index = 0;
 			}
 		    }
@@ -4212,7 +4263,7 @@ aout_link_input_section_std (struct aout
 	  /* Now warn if a global symbol is undefined.  We could not
              do this earlier, because check_dynamic_reloc might want
              to skip this reloc.  */
-	  if (hundef && ! flaginfo->info->shared && ! r_baserel)
+	  if (hundef && ! bfd_link_pic (flaginfo->info) && ! r_baserel)
 	    {
 	      const char *name;
 
@@ -4220,10 +4271,8 @@ aout_link_input_section_std (struct aout
 		name = h->root.root.string;
 	      else
 		name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
-	      if (! ((*flaginfo->info->callbacks->undefined_symbol)
-		     (flaginfo->info, name, input_bfd, input_section,
-		     r_addr, TRUE)))
-		return FALSE;
+	      (*flaginfo->info->callbacks->undefined_symbol)
+		(flaginfo->info, name, input_bfd, input_section, r_addr, TRUE);
 	    }
 
 	  r = MY_final_link_relocate (howto,
@@ -4255,11 +4304,9 @@ aout_link_input_section_std (struct aout
 		    s = aout_reloc_index_to_section (input_bfd, r_index);
 		    name = bfd_section_name (input_bfd, s);
 		  }
-		if (! ((*flaginfo->info->callbacks->reloc_overflow)
-		       (flaginfo->info, (h ? &h->root : NULL), name,
-			howto->name, (bfd_vma) 0, input_bfd,
-			input_section, r_addr)))
-		  return FALSE;
+		(*flaginfo->info->callbacks->reloc_overflow)
+		  (flaginfo->info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, r_addr);
 	      }
 	      break;
 	    }
@@ -4300,7 +4347,7 @@ aout_link_input_section_ext (struct aout
   BFD_ASSERT (input_bfd->xvec->header_byteorder
 	      == output_bfd->xvec->header_byteorder);
 
-  relocatable = flaginfo->info->relocatable;
+  relocatable = bfd_link_relocatable (flaginfo->info);
   syms = obj_aout_external_syms (input_bfd);
   strings = obj_aout_external_strings (input_bfd);
   sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -4437,10 +4484,9 @@ aout_link_input_section_ext (struct aout
 
 			  name = strings + GET_WORD (input_bfd,
 						     syms[r_index].e_strx);
-			  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-				 (flaginfo->info, name, input_bfd, input_section,
-				  r_addr)))
-			    return FALSE;
+			  (*flaginfo->info->callbacks->unattached_reloc)
+			    (flaginfo->info, name,
+			     input_bfd, input_section, r_addr);
 			  r_index = 0;
 			}
 		    }
@@ -4616,7 +4662,7 @@ aout_link_input_section_ext (struct aout
              do this earlier, because check_dynamic_reloc might want
              to skip this reloc.  */
 	  if (hundef
-	      && ! flaginfo->info->shared
+	      && ! bfd_link_pic (flaginfo->info)
 	      && r_type != (unsigned int) RELOC_BASE10
 	      && r_type != (unsigned int) RELOC_BASE13
 	      && r_type != (unsigned int) RELOC_BASE22)
@@ -4627,10 +4673,8 @@ aout_link_input_section_ext (struct aout
 		name = h->root.root.string;
 	      else
 		name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
-	      if (! ((*flaginfo->info->callbacks->undefined_symbol)
-		     (flaginfo->info, name, input_bfd, input_section,
-		     r_addr, TRUE)))
-		return FALSE;
+	      (*flaginfo->info->callbacks->undefined_symbol)
+		(flaginfo->info, name, input_bfd, input_section, r_addr, TRUE);
 	    }
 
 	  if (r_type != (unsigned int) RELOC_SPARC_REV32)
@@ -4674,11 +4718,10 @@ aout_link_input_section_ext (struct aout
 			s = aout_reloc_index_to_section (input_bfd, r_index);
 			name = bfd_section_name (input_bfd, s);
 		      }
-		    if (! ((*flaginfo->info->callbacks->reloc_overflow)
-			   (flaginfo->info, (h ? &h->root : NULL), name,
-			    howto_table_ext[r_type].name,
-			    r_addend, input_bfd, input_section, r_addr)))
-		      return FALSE;
+		    (*flaginfo->info->callbacks->reloc_overflow)
+		      (flaginfo->info, (h ? &h->root : NULL), name,
+		       howto_table_ext[r_type].name,
+		       r_addend, input_bfd, input_section, r_addr);
 		  }
 		  break;
 		}
@@ -4749,7 +4792,7 @@ aout_link_input_section (struct aout_fin
 
   /* If we are producing relocatable output, the relocs were
      modified, and we now write them out.  */
-  if (flaginfo->info->relocatable && rel_size > 0)
+  if (bfd_link_relocatable (flaginfo->info) && rel_size > 0)
     {
       if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
 	return FALSE;
@@ -5329,13 +5372,11 @@ NAME (aout, final_link) (bfd *abfd,
   bfd_size_type max_contents_size;
   bfd_size_type max_relocs_size;
   bfd_size_type max_sym_count;
-  bfd_size_type text_size;
-  file_ptr text_end;
   struct bfd_link_order *p;
   asection *o;
   bfd_boolean have_link_order_relocs;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     abfd->flags |= DYNAMIC;
 
   aout_info.info = info;
@@ -5363,7 +5404,7 @@ NAME (aout, final_link) (bfd *abfd,
     {
       bfd_size_type sz;
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
 	    {
@@ -5376,7 +5417,8 @@ NAME (aout, final_link) (bfd *abfd,
 		 and call get_reloc_upper_bound and canonicalize_reloc to
 		 work out the number of relocs needed, and then multiply
 		 by the reloc size.  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: relocatable link from %s to %s not supported"),
 		 bfd_get_filename (abfd),
 		 sub->xvec->name, abfd->xvec->name);
@@ -5407,7 +5449,7 @@ NAME (aout, final_link) (bfd *abfd,
 	}
     }
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       if (obj_textsec (abfd) != NULL)
 	trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
@@ -5427,7 +5469,7 @@ NAME (aout, final_link) (bfd *abfd,
   /* Adjust the section sizes and vmas according to the magic number.
      This sets a_text, a_data and a_bss in the exec_hdr and sets the
      filepos for each section.  */
-  if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+  if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
     goto error_return;
 
   /* The relocation and symbol file positions differ among a.out
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-got.h ./bfd/arc-got.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-got.h	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/arc-got.h	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,523 @@
+/* ARC-specific support for 32-bit ELF
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
+   Contributed by Cupertino Miranda (cmiranda@synopsys.com).
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef ARC_GOT_H
+#define ARC_GOT_H
+
+enum tls_type_e
+{
+  GOT_UNKNOWN = 0,
+  GOT_NORMAL,
+  GOT_TLS_GD,
+  GOT_TLS_IE,
+  GOT_TLS_LE
+};
+
+enum tls_got_entries
+{
+  TLS_GOT_NONE = 0,
+  TLS_GOT_MOD,
+  TLS_GOT_OFF,
+  TLS_GOT_MOD_AND_OFF
+};
+
+struct got_entry
+{
+  struct got_entry *next;
+  enum tls_type_e type;
+  bfd_vma offset;
+  bfd_boolean processed;
+  bfd_boolean created_dyn_relocation;
+  enum tls_got_entries existing_entries;
+};
+
+static struct got_entry **
+arc_get_local_got_ents (bfd * abfd)
+{
+  static struct got_entry **local_got_ents = NULL;
+
+  if (local_got_ents == NULL)
+    {
+      size_t	   size;
+      Elf_Internal_Shdr *symtab_hdr = &((elf_tdata (abfd))->symtab_hdr);
+
+      size = symtab_hdr->sh_info * sizeof (bfd_vma);
+      local_got_ents = (struct got_entry **)
+	bfd_alloc (abfd, sizeof (struct got_entry *) * size);
+      if (local_got_ents == NULL)
+	return FALSE;
+
+      memset (local_got_ents, 0, sizeof (struct got_entry *) * size);
+      elf_local_got_ents (abfd) = local_got_ents;
+    }
+
+  return local_got_ents;
+}
+
+static struct got_entry *
+got_entry_for_type (struct got_entry **list,
+		    enum tls_type_e type)
+{
+  struct got_entry **p = list;
+
+  while (*p != NULL)
+    {
+      if ((*p)->type == type)
+	return *p;
+      p = &((*p)->next);
+    }
+  return NULL;
+}
+
+static void
+new_got_entry_to_list (struct got_entry **list,
+		       enum tls_type_e type,
+		       bfd_vma offset,
+		       enum tls_got_entries existing_entries)
+{
+  /* Find list end.  Avoid having multiple entries of the same
+     type.  */
+  struct got_entry **p = list;
+  struct got_entry *entry;
+
+  while (*p != NULL)
+    {
+      if ((*p)->type == type)
+	return;
+      p = &((*p)->next);
+    }
+
+  entry = (struct got_entry *) xmalloc (sizeof (struct got_entry));
+
+  entry->type = type;
+  entry->offset = offset;
+  entry->next = NULL;
+  entry->processed = FALSE;
+  entry->created_dyn_relocation = FALSE;
+  entry->existing_entries = existing_entries;
+
+  ARC_DEBUG ("New GOT got entry added to list: "
+	     "type: %d, offset: %ld, existing_entries: %d\n",
+	     type, (long) offset, existing_entries);
+
+  /* Add the entry to the end of the list.  */
+  *p = entry;
+}
+
+static enum tls_type_e
+tls_type_for_reloc (reloc_howto_type *howto)
+{
+  enum tls_type_e ret = GOT_UNKNOWN;
+
+  if (is_reloc_for_GOT (howto))
+    return GOT_NORMAL;
+
+  switch (howto->type)
+    {
+    case R_ARC_TLS_GD_GOT:
+      ret = GOT_TLS_GD;
+      break;
+    case R_ARC_TLS_IE_GOT:
+      ret = GOT_TLS_IE;
+      break;
+    case R_ARC_TLS_LE_32:
+      ret = GOT_TLS_LE;
+      break;
+    default:
+      ret = GOT_UNKNOWN;
+      break;
+    }
+
+  return ret;
+};
+
+static struct got_entry **
+get_got_entry_list_for_symbol (bfd *abfd,
+			       unsigned long r_symndx,
+			       struct elf_link_hash_entry *h)
+{
+  if (h != NULL)
+    {
+      return &h->got.glist;
+    }
+  else
+    {
+      struct got_entry **local_got_ents
+	= arc_get_local_got_ents (abfd);
+      return &local_got_ents[r_symndx];
+    }
+}
+
+
+static enum tls_type_e
+arc_got_entry_type_for_reloc (reloc_howto_type *howto)
+{
+  enum tls_type_e type = GOT_UNKNOWN;
+
+  if (is_reloc_for_GOT (howto))
+    return  GOT_NORMAL;
+
+  if (is_reloc_for_TLS (howto))
+    {
+      switch (howto->type)
+	{
+	  case R_ARC_TLS_GD_GOT:
+	    type = GOT_TLS_GD;
+	    break;
+	  case R_ARC_TLS_IE_GOT:
+	    type = GOT_TLS_IE;
+	    break;
+	  default:
+	    break;
+	}
+    }
+  return type;
+}
+
+#define ADD_SYMBOL_REF_SEC_AND_RELOC(SECNAME, COND_FOR_RELOC, H)	\
+  htab->s##SECNAME->size;						\
+  {									\
+    if (COND_FOR_RELOC)							\
+      {									\
+	htab->srel##SECNAME->size += sizeof (Elf32_External_Rela);	\
+	  ARC_DEBUG ("arc_info: Added reloc space in "			\
+		     #SECNAME " section at " __FILE__			\
+		     ":%d for symbol %s\n",				\
+		     __LINE__, name_for_global_symbol (H));		\
+      }									\
+    if (H)								\
+      if (h->dynindx == -1 && !h->forced_local)				\
+	if (! bfd_elf_link_record_dynamic_symbol (info, H))		\
+	  return FALSE;							\
+     htab->s##SECNAME->size += 4;					\
+   }									\
+
+static bfd_boolean
+arc_fill_got_info_for_reloc (enum tls_type_e type,
+			     struct got_entry **list,
+			     struct bfd_link_info *  info,
+			     struct elf_link_hash_entry *h)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  if (got_entry_for_type (list, type) != NULL)
+    return TRUE;
+
+  switch (type)
+    {
+      case GOT_NORMAL:
+	{
+  	  bfd_vma offset
+	    = ADD_SYMBOL_REF_SEC_AND_RELOC (got, bfd_link_pic (info)
+						 || h != NULL, h);
+  	  new_got_entry_to_list (list, type, offset, TLS_GOT_NONE);
+	}
+	break;
+
+
+      case GOT_TLS_GD:
+	{
+	  bfd_vma offset
+	    = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h);
+	  bfd_vma ATTRIBUTE_UNUSED notneeded
+	    = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h);
+	  new_got_entry_to_list (list, type, offset, TLS_GOT_MOD_AND_OFF);
+	}
+	break;
+      case GOT_TLS_IE:
+      case GOT_TLS_LE:
+	{
+	  bfd_vma offset
+	    = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h);
+	  new_got_entry_to_list (list, type, offset, TLS_GOT_OFF);
+	}
+	break;
+
+      default:
+	return FALSE;
+	break;
+    }
+  return TRUE;
+}
+
+
+static bfd_vma
+relocate_fix_got_relocs_for_got_info (struct got_entry **          list_p,
+				      enum tls_type_e              type,
+				      struct bfd_link_info *       info,
+				      bfd *                        output_bfd,
+				      unsigned long                r_symndx,
+				      Elf_Internal_Sym *           local_syms,
+			  	      asection **                  local_sections,
+			     	      struct elf_link_hash_entry * h,
+				      struct arc_relocation_data * reloc_data)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+  struct got_entry *entry = NULL;
+
+  if (list_p == NULL || type == GOT_UNKNOWN || type == GOT_TLS_LE)
+    return 0;
+
+  entry = got_entry_for_type (list_p, type);
+  BFD_ASSERT (entry);
+
+  if (h == NULL
+      || (! elf_hash_table (info)->dynamic_sections_created
+	  || (bfd_link_pic (info)
+	      && SYMBOL_REFERENCES_LOCAL (info, h))))
+    {
+      const char ATTRIBUTE_UNUSED *symbol_name;
+      static const char local_name[] = "(local)";
+      asection *tls_sec = NULL;
+      bfd_vma sym_value = 0;
+
+      if (h != NULL)
+	{
+	  // TODO: This should not be here.
+	  reloc_data->sym_value = h->root.u.def.value;
+	  reloc_data->sym_section = h->root.u.def.section;
+
+	  sym_value = h->root.u.def.value
+	    + h->root.u.def.section->output_section->vma
+	    + h->root.u.def.section->output_offset;
+
+	  tls_sec = elf_hash_table (info)->tls_sec;
+
+	  symbol_name = h->root.root.string;
+	}
+      else
+	{
+	  Elf_Internal_Sym *sym = local_syms + r_symndx;
+	  asection *sec = local_sections[r_symndx];
+
+	  sym_value = sym->st_value
+	    + sec->output_section->vma
+	    + sec->output_offset;
+
+	  tls_sec = elf_hash_table (info)->tls_sec;
+
+	  symbol_name = local_name;
+	}
+
+
+      if (entry && entry->processed == FALSE)
+	{
+	  switch (entry->type)
+	    {
+	    case GOT_TLS_GD:
+	      {
+		BFD_ASSERT (tls_sec && tls_sec->output_section);
+		bfd_vma sec_vma = tls_sec->output_section->vma;
+
+		bfd_put_32 (output_bfd,
+			    sym_value - sec_vma,
+			    htab->sgot->contents + entry->offset
+			    + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
+			       ? 4 : 0));
+
+		ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
+			   "@ %lx, for symbol %s\n",
+			   (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
+			    "GOT_TLS_IE"),
+			   (long) (sym_value - sec_vma),
+			   (long) (htab->sgot->output_section->vma
+			      + htab->sgot->output_offset->vma
+			      + entry->offset
+			      + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
+				 ? 4 : 0)),
+			   symbol_name);
+	      }
+	      break;
+
+	    case GOT_TLS_IE:
+	      {
+		BFD_ASSERT (tls_sec && tls_sec->output_section);
+		bfd_vma ATTRIBUTE_UNUSED sec_vma
+		  = tls_sec->output_section->vma;
+
+		bfd_put_32 (output_bfd,
+			    sym_value - sec_vma,
+			    htab->sgot->contents + entry->offset
+			    + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
+			       ? 4 : 0));
+
+		ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
+			   "@ %p, for symbol %s\n",
+			   (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
+			    "GOT_TLS_IE"),
+			   (long) (sym_value - sec_vma),
+			   (long) (htab->sgot->output_section->vma
+			      + htab->sgot->output_offset->vma
+			      + entry->offset
+			      + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
+				 ? 4 : 0)),
+			   symbol_name);
+	      }
+	      break;
+
+	    case GOT_NORMAL:
+	      {
+		bfd_vma sec_vma
+		  = reloc_data->sym_section->output_section->vma
+		  + reloc_data->sym_section->output_offset;
+
+		if (h != NULL
+		    && h->root.type == bfd_link_hash_undefweak)
+		  ARC_DEBUG ("arc_info: PATCHED: NOT_PATCHED "
+			     "@ %#08lx for sym %s in got offset %#lx "
+			     "(is undefweak)\n",
+			     (long) (htab->sgot->output_section->vma
+				     + htab->sgot->output_offset
+				     + entry->offset),
+			     symbol_name,
+			     (long) entry->offset);
+		else
+		  {
+		    bfd_put_32 (output_bfd,
+				reloc_data->sym_value + sec_vma,
+				htab->sgot->contents + entry->offset);
+		    ARC_DEBUG ("arc_info: PATCHED: %#08lx "
+			       "@ %#08lx for sym %s in got offset %#lx\n",
+			       (long) (reloc_data->sym_value + sec_vma),
+			       (long) (htab->sgot->output_section->vma
+				       + htab->sgot->output_offset + entry->offset),
+			       symbol_name,
+			       (long) entry->offset);
+		  }
+	      }
+	      break;
+	    default:
+	      BFD_ASSERT (0);
+	      break;
+	    }
+	  entry->processed = TRUE;
+	}
+    }
+
+  return entry->offset;
+}
+
+static void
+create_got_dynrelocs_for_single_entry (struct got_entry *list,
+				       bfd *output_bfd,
+				       struct bfd_link_info *  info,
+				       struct elf_link_hash_entry *h)
+{
+  if (list == NULL)
+    return;
+
+  bfd_vma got_offset = list->offset;
+
+  if (list->type == GOT_NORMAL
+      && list->created_dyn_relocation == FALSE)
+    {
+      if (bfd_link_pic (info)
+	  && h != NULL
+	      && (info->symbolic || h->dynindx == -1)
+	      && h->def_regular)
+	{
+	  ADD_RELA (output_bfd, got, got_offset, 0, R_ARC_RELATIVE, 0);
+	}
+      /* Do not fully understand the side effects of this condition.
+	 The relocation space might still being reserved.  Perhaps
+	 I should clear its value.  */
+      else if (h != NULL && h->dynindx != -1)
+	{
+	  ADD_RELA (output_bfd, got, got_offset, h->dynindx, R_ARC_GLOB_DAT, 0);
+	}
+      list->created_dyn_relocation = TRUE;
+    }
+  else if (list->existing_entries != TLS_GOT_NONE
+	   && list->created_dyn_relocation == FALSE)
+    {
+       /* TODO TLS: This is not called for local symbols.
+	  In order to correctly implement TLS, this should also
+	  be called for all local symbols with tls got entries.
+	  Should be moved to relocate_section in order to make it
+	  work for local symbols.  */
+      struct elf_link_hash_table *htab = elf_hash_table (info);
+      enum tls_got_entries e = list->existing_entries;
+
+      BFD_ASSERT (list->type != GOT_TLS_GD
+    	      || list->existing_entries == TLS_GOT_MOD_AND_OFF);
+
+      bfd_vma dynindx = (h == NULL || h->dynindx == -1) ? 0 : h->dynindx;
+
+      if (e == TLS_GOT_MOD_AND_OFF || e == TLS_GOT_MOD)
+	{
+	      ADD_RELA (output_bfd, got, got_offset, dynindx,
+	    	    R_ARC_TLS_DTPMOD, 0);
+	      ARC_DEBUG ("arc_info: TLS_DYNRELOC: type = %d, \
+GOT_OFFSET = %#lx, GOT_VMA = %#lx, INDEX = %ld, ADDEND = 0x0\n",
+			 list->type,
+			 (long) got_offset,
+			 (long) (htab->sgot->output_section->vma
+				 + htab->sgot->output_offset + got_offset),
+			 (long) dynindx);
+	}
+
+      if (e == TLS_GOT_MOD_AND_OFF || e == TLS_GOT_OFF)
+	{
+	  bfd_vma addend = 0;
+	  if (list->type == GOT_TLS_IE)
+	    addend = bfd_get_32 (output_bfd,
+				 htab->sgot->contents + got_offset);
+
+	  ADD_RELA (output_bfd, got,
+		    got_offset + (e == TLS_GOT_MOD_AND_OFF ? 4 : 0),
+		    dynindx,
+		    (list->type == GOT_TLS_IE ? R_ARC_TLS_TPOFF
+					      : R_ARC_TLS_DTPOFF),
+		    addend);
+
+	  ARC_DEBUG ("arc_info: TLS_DYNRELOC: type = %d, \
+GOT_OFFSET = %#lx, GOT_VMA = %#lx, INDEX = %ld, ADDEND = %#lx\n",
+		     list->type,
+		     (long) got_offset,
+		     (long) (htab->sgot->output_section->vma
+			     + htab->sgot->output_offset + got_offset),
+		     (long) dynindx, (long) addend);
+	}
+      list->created_dyn_relocation = TRUE;
+    }
+}
+
+static void
+create_got_dynrelocs_for_got_info (struct got_entry **list_p,
+				   bfd *output_bfd,
+				   struct bfd_link_info *  info,
+			     	   struct elf_link_hash_entry *h)
+{
+  if (list_p == NULL)
+    return;
+
+  struct got_entry *list = *list_p;
+  /* Traverse the list of got entries for this symbol.  */
+  while (list)
+    {
+      create_got_dynrelocs_for_single_entry (list, output_bfd, info, h);
+      list = list->next;
+    }
+}
+
+#undef ADD_SYMBOL_REF_SEC_AND_RELOC
+
+#endif /* ARC_GOT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archive64.c ./bfd/archive64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archive64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/archive64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
-/* Support for 64-bit ELF archives.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Support for 64-bit archives.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Ian Lance Taylor, Cygnus Support
    Linker support added by Mark Mitchell, CodeSourcery, LLC.
    <mark@codesourcery.com>
@@ -21,7 +21,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-/* This file supports the 64-bit (MIPS) ELF archives.  */
+/* This file supports the 64-bit archives.  We use the same format as
+   the 64-bit (MIPS) ELF archives.  */
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -31,14 +32,10 @@
 /* Irix 6 defines a 64bit archive map format, so that they can
    have archives more than 4 GB in size.  */
 
-bfd_boolean bfd_elf64_archive_slurp_armap (bfd *);
-bfd_boolean bfd_elf64_archive_write_armap
-  (bfd *, unsigned int, struct orl *, unsigned int, int);
-
 /* Read an Irix 6 armap.  */
 
 bfd_boolean
-bfd_elf64_archive_slurp_armap (bfd *abfd)
+_bfd_archive_64_bit_slurp_armap (bfd *abfd)
 {
   struct artdata *ardata = bfd_ardata (abfd);
   char nextname[17];
@@ -150,11 +147,11 @@ release_symdefs:
    linker crashes.  */
 
 bfd_boolean
-bfd_elf64_archive_write_armap (bfd *arch,
-			       unsigned int elength,
-			       struct orl *map,
-			       unsigned int symbol_count,
-			       int stridx)
+_bfd_archive_64_bit_write_armap (bfd *arch,
+				 unsigned int elength,
+				 struct orl *map,
+				 unsigned int symbol_count,
+				 int stridx)
 {
   unsigned int ranlibsize = (symbol_count * 8) + 8;
   unsigned int stringsize = stridx;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archive.c ./bfd/archive.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archive.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/archive.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for archive files (libraries).
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.  Mostly Gumby Henkel-Wallace's fault.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -392,6 +392,7 @@ open_nested_file (const char *filename, 
     {
       n_bfd->lto_output = archive->lto_output;
       n_bfd->no_export = archive->no_export;
+      n_bfd->my_archive = archive;
     }
   return n_bfd;
 }
@@ -786,21 +787,29 @@ bfd_openr_next_archived_file (bfd *archi
 bfd *
 bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
-  file_ptr filestart;
+  ufile_ptr filestart;
 
   if (!last_file)
     filestart = bfd_ardata (archive)->first_file_filepos;
   else
     {
-      bfd_size_type size = arelt_size (last_file);
-
       filestart = last_file->proxy_origin;
       if (! bfd_is_thin_archive (archive))
-	filestart += size;
-      /* Pad to an even boundary...
-	 Note that last_file->origin can be odd in the case of
-	 BSD-4.4-style element with a long odd size.  */
-      filestart += filestart % 2;
+	{
+	  bfd_size_type size = arelt_size (last_file);
+
+	  filestart += size;
+	  /* Pad to an even boundary...
+	     Note that last_file->origin can be odd in the case of
+	     BSD-4.4-style element with a long odd size.  */
+	  filestart += filestart % 2;
+	  if (filestart < last_file->proxy_origin)
+	    {
+	      /* Prevent looping.  See PR19256.  */
+	      bfd_set_error (bfd_error_malformed_archive);
+	      return NULL;
+	    }
+	}
     }
 
   return _bfd_get_elt_at_filepos (archive, filestart);
@@ -1136,10 +1145,9 @@ bfd_slurp_armap (bfd *abfd)
     return do_slurp_coff_armap (abfd);
   else if (CONST_STRNEQ (nextname, "/SYM64/         "))
     {
-      /* 64bit ELF (Irix 6) archive.  */
+      /* 64bit (Irix 6) archive.  */
 #ifdef BFD64
-      extern bfd_boolean bfd_elf64_archive_slurp_armap (bfd *);
-      return bfd_elf64_archive_slurp_armap (abfd);
+      return _bfd_archive_64_bit_slurp_armap (abfd);
 #else
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
@@ -2281,7 +2289,7 @@ _bfd_write_archive_contents (bfd *arch)
 	{
 	  if (bfd_update_armap_timestamp (arch))
 	    break;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Warning: writing archive was slow: rewriting timestamp\n"));
 	}
       while (++tries < 6);
@@ -2393,7 +2401,7 @@ _bfd_compute_and_write_armap (bfd *arch,
 			}
 
 		      if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0)
-			(*_bfd_error_handler)
+			_bfd_error_handler
 			  (_("%s: plugin needed to handle lto object"),
 			   bfd_get_filename (current));
 		      namelen = strlen (syms[src_count]->name);
@@ -2447,26 +2455,60 @@ _bfd_compute_and_write_armap (bfd *arch,
 }
 
 bfd_boolean
-bsd_write_armap (bfd *arch,
-		 unsigned int elength,
-		 struct orl *map,
-		 unsigned int orl_count,
-		 int stridx)
+_bfd_bsd_write_armap (bfd *arch,
+		      unsigned int elength,
+		      struct orl *map,
+		      unsigned int orl_count,
+		      int stridx)
 {
   int padit = stridx & 1;
   unsigned int ranlibsize = orl_count * BSD_SYMDEF_SIZE;
   unsigned int stringsize = stridx + padit;
   /* Include 8 bytes to store ranlibsize and stringsize in output.  */
   unsigned int mapsize = ranlibsize + stringsize + 8;
-  file_ptr firstreal;
-  bfd *current = arch->archive_head;
-  bfd *last_elt = current;	/* Last element arch seen.  */
+  file_ptr firstreal, first;
+  bfd *current;
+  bfd *last_elt;
   bfd_byte temp[4];
   unsigned int count;
   struct ar_hdr hdr;
   long uid, gid;
 
-  firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
+  first = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
+
+#ifdef BFD64
+  firstreal = first;
+  current = arch->archive_head;
+  last_elt = current;	/* Last element arch seen.  */
+  for (count = 0; count < orl_count; count++)
+    {
+      unsigned int offset;
+
+      if (map[count].u.abfd != last_elt)
+	{
+	  do
+	    {
+	      struct areltdata *ared = arch_eltdata (current);
+
+	      firstreal += (ared->parsed_size + ared->extra_size
+			    + sizeof (struct ar_hdr));
+	      firstreal += firstreal % 2;
+	      current = current->archive_next;
+	    }
+	  while (current != map[count].u.abfd);
+	}
+
+      /* The archive file format only has 4 bytes to store the offset
+	 of the member.  Generate 64-bit archive if an archive is past
+	 its 4Gb limit.  */
+      offset = (unsigned int) firstreal;
+      if (firstreal != (file_ptr) offset)
+	return _bfd_archive_64_bit_write_armap (arch, elength, map,
+						orl_count, stridx);
+
+      last_elt = current;
+    }
+#endif
 
   /* If deterministic, we use 0 as the timestamp in the map.
      Some linkers may require that the archive filesystem modification
@@ -2505,6 +2547,9 @@ bsd_write_armap (bfd *arch,
   if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
     return FALSE;
 
+  firstreal = first;
+  current = arch->archive_head;
+  last_elt = current;	/* Last element arch seen.  */
   for (count = 0; count < orl_count; count++)
     {
       unsigned int offset;
@@ -2634,11 +2679,11 @@ _bfd_archive_bsd_update_armap_timestamp 
    symbol name n-1  */
 
 bfd_boolean
-coff_write_armap (bfd *arch,
-		  unsigned int elength,
-		  struct orl *map,
-		  unsigned int symbol_count,
-		  int stridx)
+_bfd_coff_write_armap (bfd *arch,
+		       unsigned int elength,
+		       struct orl *map,
+		       unsigned int symbol_count,
+		       int stridx)
 {
   /* The size of the ranlib is the number of exported symbols in the
      archive * the number of bytes in an int, + an int for the count.  */
@@ -2646,6 +2691,7 @@ coff_write_armap (bfd *arch,
   unsigned int stringsize = stridx;
   unsigned int mapsize = stringsize + ranlibsize;
   file_ptr archive_member_file_ptr;
+  file_ptr first_archive_member_file_ptr;
   bfd *current = arch->archive_head;
   unsigned int count;
   struct ar_hdr hdr;
@@ -2655,10 +2701,42 @@ coff_write_armap (bfd *arch,
     mapsize++;
 
   /* Work out where the first object file will go in the archive.  */
-  archive_member_file_ptr = (mapsize
-			     + elength
-			     + sizeof (struct ar_hdr)
-			     + SARMAG);
+  first_archive_member_file_ptr = (mapsize
+				   + elength
+				   + sizeof (struct ar_hdr)
+				   + SARMAG);
+
+#ifdef BFD64
+  current = arch->archive_head;
+  count = 0;
+  archive_member_file_ptr = first_archive_member_file_ptr;
+  while (current != NULL && count < symbol_count)
+    {
+      /* For each symbol which is used defined in this object, write
+	 out the object file's address in the archive.  */
+
+      while (count < symbol_count && map[count].u.abfd == current)
+	{
+	  unsigned int offset = (unsigned int) archive_member_file_ptr;
+
+	  /* Generate 64-bit archive if an archive is past its 4Gb
+	     limit.  */
+	  if (archive_member_file_ptr != (file_ptr) offset)
+	    return _bfd_archive_64_bit_write_armap (arch, elength, map,
+						    symbol_count, stridx);
+	  count++;
+	}
+      archive_member_file_ptr += sizeof (struct ar_hdr);
+      if (! bfd_is_thin_archive (arch))
+	{
+	  /* Add size of this archive entry.  */
+	  archive_member_file_ptr += arelt_size (current);
+	  /* Remember about the even alignment.  */
+	  archive_member_file_ptr += archive_member_file_ptr % 2;
+	}
+      current = current->archive_next;
+    }
+#endif
 
   memset (&hdr, ' ', sizeof (struct ar_hdr));
   hdr.ar_name[0] = '/';
@@ -2689,6 +2767,7 @@ coff_write_armap (bfd *arch,
 
   current = arch->archive_head;
   count = 0;
+  archive_member_file_ptr = first_archive_member_file_ptr;
   while (current != NULL && count < symbol_count)
     {
       /* For each symbol which is used defined in this object, write
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archures.c ./bfd/archures.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/archures.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/archures.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for architectures.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -137,13 +137,29 @@ DESCRIPTION
 .#define bfd_mach_sparc_v9a		8 {* with ultrasparc add'ns.  *}
 .#define bfd_mach_sparc_v8plusb		9 {* with cheetah add'ns.  *}
 .#define bfd_mach_sparc_v9b		10 {* with cheetah add'ns.  *}
+.#define bfd_mach_sparc_v8plusc		11 {* with UA2005 and T1 add'ns.  *}
+.#define bfd_mach_sparc_v9c		12 {* with UA2005 and T1 add'ns.  *}
+.#define bfd_mach_sparc_v8plusd		13 {* with UA2007 and T3 add'ns.  *}
+.#define bfd_mach_sparc_v9d		14 {* with UA2007 and T3 add'ns.  *}
+.#define bfd_mach_sparc_v8pluse		15 {* with OSA2001 and T4 add'ns (no IMA).  *}
+.#define bfd_mach_sparc_v9e		16 {* with OSA2001 and T4 add'ns (no IMA).  *}
+.#define bfd_mach_sparc_v8plusv		17 {* with OSA2011 and T4 and IMA and FJMAU add'ns.  *}
+.#define bfd_mach_sparc_v9v		18 {* with OSA2011 and T4 and IMA and FJMAU add'ns.  *}
+.#define bfd_mach_sparc_v8plusm		19 {* with OSA2015 and M7 add'ns.  *}
+.#define bfd_mach_sparc_v9m		20 {* with OSA2015 and M7 add'ns.  *}
 .{* Nonzero if MACH has the v9 instruction set.  *}
 .#define bfd_mach_sparc_v9_p(mach) \
-.  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+.  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m \
 .   && (mach) != bfd_mach_sparc_sparclite_le)
 .{* Nonzero if MACH is a 64 bit sparc architecture.  *}
 .#define bfd_mach_sparc_64bit_p(mach) \
-.  ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+.  ((mach) >= bfd_mach_sparc_v9 \
+.   && (mach) != bfd_mach_sparc_v8plusb \
+.   && (mach) != bfd_mach_sparc_v8plusc \
+.   && (mach) != bfd_mach_sparc_v8plusd \
+.   && (mach) != bfd_mach_sparc_v8pluse \
+.   && (mach) != bfd_mach_sparc_v8plusv \
+.   && (mach) != bfd_mach_sparc_v8plusm)
 .  bfd_arch_spu,       {* PowerPC SPU *}
 .#define bfd_mach_spu		256
 .  bfd_arch_mips,      {* MIPS Rxxxx *}
@@ -353,10 +369,12 @@ DESCRIPTION
 .#define bfd_mach_v850e2v3      0x45325633
 .#define bfd_mach_v850e3v5      0x45335635 {* ('E'|'3'|'V'|'5') *}
 .  bfd_arch_arc,       {* ARC Cores *}
-.#define bfd_mach_arc_5         5
-.#define bfd_mach_arc_6         6
-.#define bfd_mach_arc_7         7
-.#define bfd_mach_arc_8         8
+.#define bfd_mach_arc_a4        0
+.#define bfd_mach_arc_a5        1
+.#define bfd_mach_arc_arc600    2
+.#define bfd_mach_arc_arc601    4
+.#define bfd_mach_arc_arc700    3
+.#define bfd_mach_arc_arcv2     5
 . bfd_arch_m32c,     {* Renesas M16C/M32C.  *}
 .#define bfd_mach_m16c        0x75
 .#define bfd_mach_m32c        0x78
@@ -439,6 +457,9 @@ DESCRIPTION
 .#define bfd_mach_cris_v0_v10	255
 .#define bfd_mach_cris_v32	32
 .#define bfd_mach_cris_v10_v32	1032
+.  bfd_arch_riscv,
+.#define bfd_mach_riscv32	132
+.#define bfd_mach_riscv64	164
 .  bfd_arch_rl78,
 .#define bfd_mach_rl78	0x75
 .  bfd_arch_rx,        {* Renesas RX.  *}
@@ -507,6 +528,8 @@ DESCRIPTION
 .#define bfd_mach_nios2r2	2
 .  bfd_arch_visium,	{* Visium *}
 .#define bfd_mach_visium	1
+.  bfd_arch_pru,	{* PRU *}
+.#define bfd_mach_pru	0
 .  bfd_arch_last
 .  };
 */
@@ -610,6 +633,8 @@ extern const bfd_arch_info_type bfd_pj_a
 extern const bfd_arch_info_type bfd_plugin_arch;
 extern const bfd_arch_info_type bfd_powerpc_archs[];
 #define bfd_powerpc_arch bfd_powerpc_archs[0]
+extern const bfd_arch_info_type bfd_pru_arch;
+extern const bfd_arch_info_type bfd_riscv_arch;
 extern const bfd_arch_info_type bfd_rs6000_arch;
 extern const bfd_arch_info_type bfd_rl78_arch;
 extern const bfd_arch_info_type bfd_rx_arch;
@@ -699,8 +724,10 @@ static const bfd_arch_info_type * const 
     &bfd_or1k_arch,
     &bfd_pdp11_arch,
     &bfd_powerpc_arch,
-    &bfd_rs6000_arch,
+    &bfd_pru_arch,
+    &bfd_riscv_arch,
     &bfd_rl78_arch,
+    &bfd_rs6000_arch,
     &bfd_rx_arch,
     &bfd_s390_arch,
     &bfd_score_arch,
@@ -916,7 +943,7 @@ bfd_set_arch_info (bfd *abfd, const bfd_
 }
 
 /*
-INTERNAL_FUNCTION
+FUNCTION
 	bfd_default_set_arch_mach
 
 SYNOPSIS
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-plt.def ./bfd/arc-plt.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-plt.def	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/arc-plt.def	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,94 @@
+/* Arc V2 Related PLT entries.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Contributed by Cupertino Miranda (cmiranda@synopsys.com).
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+PLT_TYPE_START (ELF_ARCV2_PIC)
+  PLT_ENTRY (0x2730, 0x7f8b, 0x0000, 0x0000) /* ld %r11, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+4 */
+  PLT_ENTRY (0x2730, 0x7f8a, 0x0000, 0x0000) /* ld %r10, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+8 */
+  PLT_ENTRY (0x2020, 0x0280)		    /* j [%r10] */
+  PLT_ENTRY (0x0,0x0,0x0,0x0,0x0,0x0)	    /* padding */
+
+  PLT_ELEM (0x2730, 0x7f8c, 0x0000, 0x0000) /* ld %r12, [%pc,func@got] */
+  PLT_ELEM (0x2021, 0x0300)		   /* j.d [%r12] */
+  PLT_ELEM (0x240a, 0x1fc0)		   /* mov %r12, %pcl */
+
+  ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 4)
+  ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 8)
+  ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
+
+  ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
+
+PLT_TYPE_END (ELF_ARCV2_PIC)
+
+PLT_TYPE_START (ELF_ARCV2_ABS)
+  PLT_ENTRY (0x1600,0x700b,0x0000,0x0000)  /* ld %r11, [0] */
+  PLT_ENTRY (0x1600,0x700a,0x0000,0x0000)  /* ld %r10, [0] */
+  PLT_ENTRY (0x2020,0x0280)		  /* j [%r10] */
+  PLT_ENTRY (0x0,0x0,0x0,0x0,0x0,0x0)	  /* padding */
+
+  PLT_ELEM (0x2730, 0x7f8c, 0x0000, 0x0000) /* ld %r12, [%pcl,func@gotpc] */
+  PLT_ELEM (0x2021,0x0300)		   /* j.d [%r12] */
+  PLT_ELEM (0x240a,0x1fc0)		   /* mov %r12, %pcl */
+
+  ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 4)
+  ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 8)
+  ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
+
+  ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
+
+PLT_TYPE_END (ELF_ARCV2_ABS)
+
+
+/* Non Arc V2 Related PLT entries.  */
+
+PLT_TYPE_START (ELF_ARC_PIC) 
+  PLT_ENTRY (0x2730,0x7f8b,0x0000,0x0000) /* ld %r11, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+4 */
+  PLT_ENTRY (0x2730,0x7f8a,0x0000,0x0000) /* ld %r10, [pcl,0] : 0 to be replaced by -DYNAMIC@GOTPC+8  */
+  PLT_ENTRY (0x2020,0x0280)		 /* j [%r10] */
+  PLT_ENTRY (0x0,0x0)			 /* padding */
+
+  PLT_ELEM (0x2730,0x7f8c,0x0000,0x0000)  /* ld %r12, [%pc,func@got]   */
+  PLT_ELEM (0x7c20)			 /* j_s.d [%r12]	      */
+  PLT_ELEM (0x74ef)			 /* mov_s %r12, %pcl          */
+
+  ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 4)
+  ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 8)
+  ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
+
+  ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
+
+PLT_TYPE_END (ELF_ARC_PIC) 
+
+PLT_TYPE_START (ELF_ARC_ABS) 
+  PLT_ENTRY (0x1600,0x700b,0x0000,0x0000) /* ld %r11, [0] */
+  PLT_ENTRY (0x1600,0x700a,0x0000,0x0000) /* ld %r10, [0] */
+  PLT_ENTRY (0x2020,0x0280)		 /* j [%r10] */
+  PLT_ENTRY (0x0,0x0)			 /* padding */
+
+  PLT_ELEM (0x2730,0x7f8c,0x0000,0x0000) /* ld %r12, [%pc,func@gotpc] */
+  PLT_ELEM (0x7c20,0x74ef)		/* mov_s %r12, %pcl          */
+
+  ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 4)
+  ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 8)
+  ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
+
+  ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
+
+PLT_TYPE_END (ELF_ARC_ABS) 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-plt.h ./bfd/arc-plt.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/arc-plt.h	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/arc-plt.h	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,196 @@
+/* ARC-specific header file for PLT support.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Contributed by Cupertino Miranda (cmiranda@synopsys.com).
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef ARC_PLT_H
+#define ARC_PLT_H
+
+#include <stdint.h>
+
+/* Instructions appear in memory as a sequence of half-words (16 bit);
+   individual half-words are represented on the target in target byte order.
+   We use 'unsigned short' on the host to represent the PLT templates,
+   and translate to target byte order as we copy to the target.  */
+typedef uint16_t insn_hword;
+
+enum plt_reloc_symbol
+{
+  LAST_RELOC = 0,
+
+  SGOT = 1,
+
+  RELATIVE = (1 << 8),
+  RELATIVE_INSN_32 = (1 << 9),
+  RELATIVE_INSN_24 = (1 << 10),
+
+  MIDDLE_ENDIAN = (1 << 11)
+};
+
+#define IS_RELATIVE(S)      ((S & (RELATIVE | RELATIVE_INSN_24 | RELATIVE_INSN_32)) != 0)
+#define IS_INSN_32(S)       ((S & RELATIVE_INSN_32) != 0)
+#define IS_INSN_24(S)       ((S & RELATIVE_INSN_24) != 0)
+#define IS_MIDDLE_ENDIAN(S) ((S & MIDDLE_ENDIAN) != 0)
+#define SYM_ONLY(S)         (S & 0xFF)
+
+struct plt_reloc
+{
+  bfd_vma	  offset;
+  bfd_vma	  size;
+  bfd_vma	  mask;
+  enum plt_reloc_symbol symbol;
+  bfd_vma	  addend;
+};
+
+
+#define PLT_TYPE_START(NAME) NAME,
+#define PLT_TYPE_END(NAME)
+#define PLT_ENTRY(...)
+#define PLT_ELEM(...)
+#define ENTRY_RELOC(...)
+#define ELEM_RELOC(...)
+
+enum plt_types_enum
+{
+  PLT_START = -1,
+#include "arc-plt.def"
+  PLT_MAX
+};
+
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+typedef insn_hword insn_hword_array[];
+
+struct plt_version_t
+{
+  const insn_hword_array *entry;
+  const bfd_vma		  entry_size;
+  const insn_hword_array *elem;
+  const bfd_vma		  elem_size;
+
+  const struct plt_reloc *entry_relocs;
+  const struct plt_reloc *elem_relocs;
+};
+
+#define PLT_TYPE_START(NAME) \
+  const insn_hword NAME##_plt_entry[] = {
+#define PLT_TYPE_END(NAME) };
+#define PLT_ENTRY(...) __VA_ARGS__,
+#define PLT_ELEM(...)
+#define ENTRY_RELOC(...)
+#define ELEM_RELOC(...)
+
+#include "arc-plt.def"
+
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+#define PLT_TYPE_START(NAME) \
+  const struct plt_reloc NAME##_plt_entry_relocs[] = {
+#define PLT_TYPE_END(NAME) \
+    {0, 0, 0, LAST_RELOC, 0} \
+  };
+#define PLT_ENTRY(...) 
+#define PLT_ELEM(...)
+#define ENTRY_RELOC(...) { __VA_ARGS__ },
+#define ELEM_RELOC(...)
+
+#include "arc-plt.def"
+
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+
+#define PLT_TYPE_START(NAME) \
+  const insn_hword NAME##_plt_elem[] = {
+#define PLT_TYPE_END(NAME) };
+#define PLT_ENTRY(...)
+#define PLT_ELEM(...) __VA_ARGS__,
+#define ENTRY_RELOC(...)
+#define ELEM_RELOC(...)
+
+#include "arc-plt.def"
+
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+#define PLT_TYPE_START(NAME) \
+  const struct plt_reloc NAME##_plt_elem_relocs[] = {
+#define PLT_TYPE_END(NAME) \
+    {0, 0, 0, LAST_RELOC, 0} \
+  };
+#define PLT_ENTRY(...) 
+#define PLT_ELEM(...)
+#define ENTRY_RELOC(...)
+#define ELEM_RELOC(...) { __VA_ARGS__ },
+
+#include "arc-plt.def"
+
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+
+#define PLT_TYPE_START(NAME) \
+  { \
+    .entry = &NAME##_plt_entry, \
+    .entry_size = sizeof (NAME##_plt_entry), \
+    .elem = &NAME##_plt_elem, \
+    .elem_size = sizeof (NAME##_plt_elem),  \
+    .entry_relocs = NAME##_plt_entry_relocs, \
+    .elem_relocs = NAME##_plt_elem_relocs
+#define PLT_TYPE_END(NAME) },
+#define PLT_ENTRY(...)
+#define PLT_ELEM(...)
+#define ENTRY_RELOC(...)
+#define ELEM_RELOC(...)
+struct plt_version_t plt_versions[PLT_MAX] = {
+
+#include "arc-plt.def"
+
+};
+#undef PLT_TYPE_START
+#undef PLT_TYPE_END
+#undef PLT_ENTRY
+#undef PLT_ELEM
+#undef ENTRY_RELOC
+#undef ELEM_RELOC
+
+
+#endif /* ARC_PLT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/armnetbsd.c ./bfd/armnetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/armnetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/armnetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/ARM a.out-ish binaries.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd.c ./bfd/bfd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic BFD library interface and support routines.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -46,7 +46,7 @@ CODE_FRAGMENT
 .
 .enum bfd_plugin_format
 .  {
-.    bfd_plugin_uknown = 0,
+.    bfd_plugin_unknown = 0,
 .    bfd_plugin_yes = 1,
 .    bfd_plugin_no = 2
 .  };
@@ -91,7 +91,7 @@ CODE_FRAGMENT
 .  ENUM_BITFIELD (bfd_direction) direction : 2;
 .
 .  {* Format_specific flags.  *}
-.  flagword flags : 18;
+.  flagword flags : 20;
 .
 .  {* Values that may appear in the flags field of a BFD.  These also
 .     appear in the object_flags field of the bfd_target structure, where
@@ -171,16 +171,24 @@ CODE_FRAGMENT
 .  {* Compress sections in this BFD with SHF_COMPRESSED from gABI.  *}
 .#define BFD_COMPRESS_GABI 0x20000
 .
+.  {* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
+.     BFD.  *}
+.#define BFD_CONVERT_ELF_COMMON 0x40000
+.
+.  {* Use the ELF STT_COMMON type in this BFD.  *}
+.#define BFD_USE_ELF_STT_COMMON 0x80000
+.
 .  {* Flags bits to be saved in bfd_preserve_save.  *}
 .#define BFD_FLAGS_SAVED \
-.  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
-.   | BFD_COMPRESS_GABI)
+.  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+.   | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+.   | BFD_USE_ELF_STT_COMMON)
 .
 .  {* Flags bits which are for BFD use only.  *}
 .#define BFD_FLAGS_FOR_BFD_USE_MASK \
 .  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
 .   | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
-.   | BFD_COMPRESS_GABI)
+.   | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
 .
 .  {* Is the file descriptor being cached?  That is, can it be closed as
 .     needed, and re-opened when accessed later?  *}
@@ -591,11 +599,11 @@ SUBSECTION
 	problem.  They call a BFD error handler function.  This
 	function may be overridden by the program.
 
-	The BFD error handler acts like printf.
+	The BFD error handler acts like vprintf.
 
 CODE_FRAGMENT
 .
-.typedef void (*bfd_error_handler_type) (const char *, ...);
+.typedef void (*bfd_error_handler_type) (const char *, va_list);
 .
 */
 
@@ -627,10 +635,9 @@ static const char *_bfd_error_program_na
 	integer_for_the_%d);
  */
 
-void
-_bfd_default_error_handler (const char *fmt, ...)
+static void
+error_handler_internal (const char *fmt, va_list ap)
 {
-  va_list ap;
   char *bufp;
   const char *new_fmt, *p;
   size_t avail = 1000;
@@ -644,7 +651,6 @@ _bfd_default_error_handler (const char *
   else
     fprintf (stderr, "BFD: ");
 
-  va_start (ap, fmt);
   new_fmt = fmt;
   bufp = buf;
 
@@ -696,7 +702,8 @@ _bfd_default_error_handler (const char *
 		  if (abfd == NULL)
 		    /* Invoking %B with a null bfd pointer is an internal error.  */
 		    abort ();
-		  else if (abfd->my_archive)
+		  else if (abfd->my_archive
+			   && !bfd_is_thin_archive (abfd->my_archive))
 		    snprintf (bufp, avail, "%s(%s)",
 			      abfd->my_archive->filename, abfd->filename);
 		  else
@@ -774,7 +781,6 @@ _bfd_default_error_handler (const char *
     }
 
   vfprintf (stderr, new_fmt, ap);
-  va_end (ap);
 
   /* On AIX, putc is implemented as a macro that triggers a -Wunused-value
      warning, so use the fputc function to avoid it.  */
@@ -788,7 +794,17 @@ _bfd_default_error_handler (const char *
    function pointer permits a program linked against BFD to intercept
    the messages and deal with them itself.  */
 
-bfd_error_handler_type _bfd_error_handler = _bfd_default_error_handler;
+static bfd_error_handler_type _bfd_error_internal = error_handler_internal;
+
+void
+_bfd_error_handler (const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start (ap, fmt);
+  _bfd_error_internal (fmt, ap);
+  va_end (ap);
+}
 
 /*
 FUNCTION
@@ -807,8 +823,8 @@ bfd_set_error_handler (bfd_error_handler
 {
   bfd_error_handler_type pold;
 
-  pold = _bfd_error_handler;
-  _bfd_error_handler = pnew;
+  pold = _bfd_error_internal;
+  _bfd_error_internal = pnew;
   return pold;
 }
 
@@ -833,23 +849,6 @@ bfd_set_error_program_name (const char *
 }
 
 /*
-FUNCTION
-	bfd_get_error_handler
-
-SYNOPSIS
-	bfd_error_handler_type bfd_get_error_handler (void);
-
-DESCRIPTION
-	Return the BFD error handler function.
-*/
-
-bfd_error_handler_type
-bfd_get_error_handler (void)
-{
-  return _bfd_error_handler;
-}
-
-/*
 SUBSECTION
 	BFD assert handler
 
@@ -883,14 +882,14 @@ _bfd_default_assert_handler (const char 
 			     int bfd_line)
 
 {
-  (*_bfd_error_handler) (bfd_formatmsg, bfd_version, bfd_file, bfd_line);
+  _bfd_error_handler (bfd_formatmsg, bfd_version, bfd_file, bfd_line);
 }
 
 /* Similar to _bfd_error_handler, a program can decide to exit on an
    internal BFD error.  We use a non-variadic type to simplify passing
    on parameters to other functions, e.g. _bfd_error_handler.  */
 
-bfd_assert_handler_type _bfd_assert_handler = _bfd_default_assert_handler;
+static bfd_assert_handler_type _bfd_assert_handler = _bfd_default_assert_handler;
 
 /*
 FUNCTION
@@ -913,23 +912,6 @@ bfd_set_assert_handler (bfd_assert_handl
   _bfd_assert_handler = pnew;
   return pold;
 }
-
-/*
-FUNCTION
-	bfd_get_assert_handler
-
-SYNOPSIS
-	bfd_assert_handler_type bfd_get_assert_handler (void);
-
-DESCRIPTION
-	Return the BFD assert handler function.
-*/
-
-bfd_assert_handler_type
-bfd_get_assert_handler (void)
-{
-  return _bfd_assert_handler;
-}
 
 /*
 INODE
@@ -1078,6 +1060,7 @@ bfd_set_file_flags (bfd *abfd, flagword 
 void
 bfd_assert (const char *file, int line)
 {
+  /* xgettext:c-format */
   (*_bfd_assert_handler) (_("BFD %s assertion fail %s:%d"),
 			  BFD_VERSION_STRING, file, line);
 }
@@ -1089,14 +1072,16 @@ void
 _bfd_abort (const char *file, int line, const char *fn)
 {
   if (fn != NULL)
-    (*_bfd_error_handler)
-      (_("BFD %s internal error, aborting at %s line %d in %s\n"),
+    _bfd_error_handler
+      /* xgettext:c-format */
+      (_("BFD %s internal error, aborting at %s:%d in %s\n"),
        BFD_VERSION_STRING, file, line, fn);
   else
-    (*_bfd_error_handler)
-      (_("BFD %s internal error, aborting at %s line %d\n"),
+    _bfd_error_handler
+      /* xgettext:c-format */
+      (_("BFD %s internal error, aborting at %s:%d\n"),
        BFD_VERSION_STRING, file, line);
-  (*_bfd_error_handler) (_("Please report this bug.\n"));
+  _bfd_error_handler (_("Please report this bug.\n"));
   _exit (EXIT_FAILURE);
 }
 
@@ -1427,27 +1412,6 @@ DESCRIPTION
 
 /*
 FUNCTION
-	bfd_merge_private_bfd_data
-
-SYNOPSIS
-	bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-DESCRIPTION
-	Merge private BFD information from the BFD @var{ibfd} to the
-	the output file BFD @var{obfd} when linking.  Return <<TRUE>>
-	on success, <<FALSE>> on error.  Possible error returns are:
-
-	o <<bfd_error_no_memory>> -
-	Not enough memory exists to create private data for @var{obfd}.
-
-.#define bfd_merge_private_bfd_data(ibfd, obfd) \
-.     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-.		(ibfd, obfd))
-
-*/
-
-/*
-FUNCTION
 	bfd_set_private_flags
 
 SYNOPSIS
@@ -2000,7 +1964,8 @@ bfd_update_compression_header (bfd *abfd
 		{
 		  Elf64_External_Chdr *echdr
 		    = (Elf64_External_Chdr *) contents;
-		  bfd_put_64 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+		  bfd_put_32 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+		  bfd_put_32 (abfd, 0, &echdr->ch_reserved);
 		  bfd_put_64 (abfd, sec->size, &echdr->ch_size);
 		  bfd_put_64 (abfd, 1 << sec->alignment_power,
 			      &echdr->ch_addralign);
@@ -2061,7 +2026,7 @@ bfd_check_compression_header (bfd *abfd,
       else
 	{
 	  Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
-	  chdr.ch_type = bfd_get_64 (abfd, &echdr->ch_type);
+	  chdr.ch_type = bfd_get_32 (abfd, &echdr->ch_type);
 	  chdr.ch_size = bfd_get_64 (abfd, &echdr->ch_size);
 	  chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
 	}
@@ -2111,3 +2076,161 @@ bfd_get_compression_header_size (bfd *ab
 
   return 0;
 }
+
+/*
+FUNCTION
+	bfd_convert_section_size
+
+SYNOPSIS
+	bfd_size_type bfd_convert_section_size
+	  (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
+
+DESCRIPTION
+	Convert the size @var{size} of the section @var{isec} in input
+	BFD @var{ibfd} to the section size in output BFD @var{obfd}.
+*/
+
+bfd_size_type
+bfd_convert_section_size (bfd *ibfd, sec_ptr isec, bfd *obfd,
+			  bfd_size_type size)
+{
+  bfd_size_type hdr_size;
+
+  /* Do nothing if input file will be decompressed.  */
+  if ((ibfd->flags & BFD_DECOMPRESS))
+    return size;
+
+  /* Do nothing if either input or output aren't ELF.  */
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return size;
+
+  /* Do nothing if ELF classes of input and output are the same. */
+  if (get_elf_backend_data (ibfd)->s->elfclass
+      == get_elf_backend_data (obfd)->s->elfclass)
+    return size;
+
+  /* Do nothing if the input section isn't a SHF_COMPRESSED section. */
+  hdr_size = bfd_get_compression_header_size (ibfd, isec);
+  if (hdr_size == 0)
+    return size;
+
+  /* Adjust the size of the output SHF_COMPRESSED section.  */
+  if (hdr_size == sizeof (Elf32_External_Chdr))
+    return (size - sizeof (Elf32_External_Chdr)
+	    + sizeof (Elf64_External_Chdr));
+  else
+    return (size - sizeof (Elf64_External_Chdr)
+	    + sizeof (Elf32_External_Chdr));
+}
+
+/*
+FUNCTION
+	bfd_convert_section_contents
+
+SYNOPSIS
+	bfd_boolean bfd_convert_section_contents
+	  (bfd *ibfd, asection *isec, bfd *obfd,
+	   bfd_byte **ptr, bfd_size_type *ptr_size);
+
+DESCRIPTION
+	Convert the contents, stored in @var{*ptr}, of the section
+	@var{isec} in input BFD @var{ibfd} to output BFD @var{obfd}
+	if needed.  The original buffer pointed to by @var{*ptr} may
+	be freed and @var{*ptr} is returned with memory malloc'd by this
+	function, and the new size written to @var{ptr_size}.
+*/
+
+bfd_boolean
+bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
+			      bfd_byte **ptr, bfd_size_type *ptr_size)
+{
+  bfd_byte *contents;
+  bfd_size_type ihdr_size, ohdr_size, size;
+  Elf_Internal_Chdr chdr;
+  bfd_boolean use_memmove;
+
+  /* Do nothing if input file will be decompressed.  */
+  if ((ibfd->flags & BFD_DECOMPRESS))
+    return TRUE;
+
+  /* Do nothing if either input or output aren't ELF.  */
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return TRUE;
+
+  /* Do nothing if ELF classes of input and output are the same. */
+  if (get_elf_backend_data (ibfd)->s->elfclass
+      == get_elf_backend_data (obfd)->s->elfclass)
+    return TRUE;
+
+  /* Do nothing if the input section isn't a SHF_COMPRESSED section. */
+  ihdr_size = bfd_get_compression_header_size (ibfd, isec);
+  if (ihdr_size == 0)
+    return TRUE;
+
+  contents = *ptr;
+
+  /* Convert the contents of the input SHF_COMPRESSED section to
+     output.  Get the input compression header and the size of the
+     output compression header.  */
+  if (ihdr_size == sizeof (Elf32_External_Chdr))
+    {
+      Elf32_External_Chdr *echdr = (Elf32_External_Chdr *) contents;
+      chdr.ch_type = bfd_get_32 (ibfd, &echdr->ch_type);
+      chdr.ch_size = bfd_get_32 (ibfd, &echdr->ch_size);
+      chdr.ch_addralign = bfd_get_32 (ibfd, &echdr->ch_addralign);
+
+      ohdr_size = sizeof (Elf64_External_Chdr);
+
+      use_memmove = FALSE;
+    }
+  else
+    {
+      Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
+      chdr.ch_type = bfd_get_32 (ibfd, &echdr->ch_type);
+      chdr.ch_size = bfd_get_64 (ibfd, &echdr->ch_size);
+      chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign);
+
+      ohdr_size = sizeof (Elf32_External_Chdr);
+      use_memmove = TRUE;
+    }
+
+  size = bfd_get_section_size (isec) - ihdr_size + ohdr_size;
+  if (!use_memmove)
+    {
+      contents = (bfd_byte *) bfd_malloc (size);
+      if (contents == NULL)
+	return FALSE;
+    }
+
+  /* Write out the output compression header.  */
+  if (ohdr_size == sizeof (Elf32_External_Chdr))
+    {
+      Elf32_External_Chdr *echdr = (Elf32_External_Chdr *) contents;
+      bfd_put_32 (obfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+      bfd_put_32 (obfd, chdr.ch_size, &echdr->ch_size);
+      bfd_put_32 (obfd, chdr.ch_addralign, &echdr->ch_addralign);
+    }
+  else
+    {
+      Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
+      bfd_put_32 (obfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+      bfd_put_32 (obfd, 0, &echdr->ch_reserved);
+      bfd_put_64 (obfd, chdr.ch_size, &echdr->ch_size);
+      bfd_put_64 (obfd, chdr.ch_addralign, &echdr->ch_addralign);
+    }
+
+  /* Copy the compressed contents.  */
+  if (use_memmove)
+    memmove (contents + ohdr_size, *ptr + ihdr_size, size - ohdr_size);
+  else
+    {
+      memcpy (contents + ohdr_size, *ptr + ihdr_size, size - ohdr_size);
+      free (*ptr);
+      *ptr = contents;
+    }
+
+  *ptr_size = size;
+  return TRUE;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd-in2.h ./bfd/bfd-in2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd-in2.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfd-in2.h	2017-03-06 01:49:05.000000000 +0000
@@ -7,7 +7,7 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -41,6 +41,7 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
+#include <stdarg.h>
 #include <sys/stat.h>
 
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -263,7 +264,7 @@ struct orl 			/* Output ranlib.  */
   } u;			/* bfd* or file position.  */
   int namidx;		/* Index into string table.  */
 };
-
+
 /* Linenumber stuff.  */
 typedef struct lineno_cache_entry
 {
@@ -277,11 +278,19 @@ typedef struct lineno_cache_entry
 alent;
 
 /* Object and core file sections.  */
+typedef struct bfd_section *sec_ptr;
 
 #define	align_power(addr, align)	\
-  (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
+  (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
 
-typedef struct bfd_section *sec_ptr;
+/* Align an address upward to a boundary, expressed as a number of bytes.
+   E.g. align to an 8-byte boundary with argument of 8.  Take care never
+   to wrap around if the address is within boundary-1 of the end of the
+   address space.  */
+#define BFD_ALIGN(this, boundary)					  \
+  ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this))		  \
+   ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
+   : ~ (bfd_vma) 0)
 
 #define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
 #define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
@@ -484,20 +493,20 @@ extern int bfd_stat (bfd *, struct stat 
 /* Deprecated old routines.  */
 #if __GNUC__
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+  (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+  (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated (const char *, const char *, int, const char *);
+extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -518,7 +527,6 @@ extern void warn_deprecated (const char 
 #define bfd_get_file_flags(abfd) ((abfd)->flags)
 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
 #define bfd_has_map(abfd) ((abfd)->has_armap)
 #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
 
@@ -856,6 +864,23 @@ extern bfd_boolean bfd_elf32_arm_vfp11_e
 extern void bfd_elf32_arm_vfp11_fix_veneer_locations
   (bfd *, struct bfd_link_info *);
 
+/* ARM STM STM32L4XX erratum workaround support.  */
+typedef enum
+{
+  BFD_ARM_STM32L4XX_FIX_NONE,
+  BFD_ARM_STM32L4XX_FIX_DEFAULT,
+  BFD_ARM_STM32L4XX_FIX_ALL
+} bfd_arm_stm32l4xx_fix;
+
+extern void bfd_elf32_arm_set_stm32l4xx_fix
+  (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
+  (bfd *, struct bfd_link_info *);
+
 /* ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_allocate_interworking_sections
   (struct bfd_link_info *);
@@ -883,9 +908,27 @@ extern bfd_boolean bfd_elf32_arm_allocat
 extern bfd_boolean bfd_elf32_arm_process_before_allocation
   (bfd *, struct bfd_link_info *);
 
-void bfd_elf32_arm_set_target_relocs
-  (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
-   int, int, int, int, int);
+struct elf32_arm_params {
+  char *thumb_entry_symbol;
+  int byteswap_code;
+  int target1_is_rel;
+  char * target2_type;
+  int fix_v4bx;
+  int use_blx;
+  bfd_arm_vfp11_fix vfp11_denorm_fix;
+  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
+  int no_enum_size_warning;
+  int no_wchar_size_warning;
+  int pic_veneer;
+  int fix_cortex_a8;
+  int fix_arm1176;
+  int merge_exidx_entries;
+  int cmse_implib;
+  bfd *in_implib_bfd;
+};
+
+void bfd_elf32_arm_set_target_params
+  (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
   (bfd *, struct bfd_link_info *);
@@ -893,6 +936,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
   (bfd *, struct bfd_link_info *);
 
+extern void bfd_elf32_arm_keep_private_stub_output_sections
+  (struct bfd_link_info *);
+
 /* ELF ARM mapping symbol support.  */
 #define BFD_ARM_SPECIAL_SYM_TYPE_MAP	(1 << 0)
 #define BFD_ARM_SPECIAL_SYM_TYPE_TAG	(1 << 1)
@@ -924,7 +970,8 @@ extern void elf32_arm_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bfd_boolean elf32_arm_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+   struct bfd_section * (*) (const char *, struct bfd_section *,
+			     struct bfd_section *, unsigned int),
    void (*) (void));
 extern bfd_boolean elf32_arm_build_stubs
   (struct bfd_link_info *);
@@ -937,13 +984,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c
 extern bfd_boolean elf32_tic6x_fix_exidx_coverage
 (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
-/* PowerPC @tls opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tls_transform
-  (unsigned int, unsigned int);
-/* PowerPC @tprel opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tprel_transform
-  (unsigned int, unsigned int);
-
 extern void bfd_elf64_aarch64_init_maps
   (bfd *);
 
@@ -951,10 +991,10 @@ extern void bfd_elf32_aarch64_init_maps
   (bfd *);
 
 extern void bfd_elf64_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 extern void bfd_elf32_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 /* ELF AArch64 mapping symbol support.  */
 #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP	(1 << 0)
@@ -1012,6 +1052,10 @@ extern bfd_boolean v850_elf_create_secti
 
 extern bfd_boolean v850_elf_set_note
   (bfd *, unsigned int, unsigned int);
+
+/* MIPS ABI flags data access.  For the disassembler.  */
+struct elf_internal_abiflags_v0;
+extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
 /* Extracted from init.c.  */
 void bfd_init (void);
 
@@ -1077,6 +1121,8 @@ struct bfd_section *bfd_create_gnu_debug
 bfd_boolean bfd_fill_in_gnu_debuglink_section
    (bfd *abfd, struct bfd_section *sect, const char *filename);
 
+char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
+
 /* Extracted from libbfd.c.  */
 
 /* Byte swapping macros for user section data.  */
@@ -1209,10 +1255,10 @@ typedef struct bfd_section
   const char *name;
 
   /* A unique sequence number.  */
-  int id;
+  unsigned int id;
 
   /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
-  int index;
+  unsigned int index;
 
   /* The next section in the list belonging to the BFD, or NULL.  */
   struct bfd_section *next;
@@ -1415,6 +1461,9 @@ typedef struct bfd_section
      when memory read flag isn't set. */
 #define SEC_COFF_NOREAD 0x40000000
 
+  /* Indicate that section has the purecode flag set.  */
+#define SEC_ELF_PURECODE 0x80000000
+
   /*  End of section flags.  */
 
   /* Some internal packed boolean fields.  */
@@ -1481,7 +1530,7 @@ typedef struct bfd_section
       information.  */
   bfd_vma lma;
 
-  /* The size of the section in octets, as it will be output.
+  /* The size of the section in *octets*, as it will be output.
      Contains a value even if the section has no contents (e.g., the
      size of <<.bss>>).  */
   bfd_size_type size;
@@ -1751,9 +1800,9 @@ extern asection _bfd_std_section[4];
 #define bfd_section_removed_from_list(ABFD, S) \
   ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
 
-#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)                   \
+#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)                   \
   /* name, id,  index, next, prev, flags, user_set_vma,            */  \
-  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
+  {  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,                           \
                                                                        \
   /* linker_mark, linker_has_input, gc_mark, decompress_status,    */  \
      0,           0,                1,       0,                        \
@@ -1793,7 +1842,7 @@ void bfd_section_list_clear (bfd *);
 
 asection *bfd_get_section_by_name (bfd *abfd, const char *name);
 
-asection *bfd_get_next_section_by_name (asection *sec);
+asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
 
 asection *bfd_get_linker_section (bfd *abfd, const char *name);
 
@@ -1818,6 +1867,8 @@ asection *bfd_make_section_with_flags
 
 asection *bfd_make_section (bfd *, const char *name);
 
+int bfd_get_next_section_id (void);
+
 bfd_boolean bfd_set_section_flags
    (bfd *abfd, asection *sec, flagword flags);
 
@@ -1930,13 +1981,29 @@ enum bfd_architecture
 #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
 #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
 #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
+#define bfd_mach_sparc_v8plusc         11 /* with UA2005 and T1 add'ns.  */
+#define bfd_mach_sparc_v9c             12 /* with UA2005 and T1 add'ns.  */
+#define bfd_mach_sparc_v8plusd         13 /* with UA2007 and T3 add'ns.  */
+#define bfd_mach_sparc_v9d             14 /* with UA2007 and T3 add'ns.  */
+#define bfd_mach_sparc_v8pluse         15 /* with OSA2001 and T4 add'ns (no IMA).  */
+#define bfd_mach_sparc_v9e             16 /* with OSA2001 and T4 add'ns (no IMA).  */
+#define bfd_mach_sparc_v8plusv         17 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+#define bfd_mach_sparc_v9v             18 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+#define bfd_mach_sparc_v8plusm         19 /* with OSA2015 and M7 add'ns.  */
+#define bfd_mach_sparc_v9m             20 /* with OSA2015 and M7 add'ns.  */
 /* Nonzero if MACH has the v9 instruction set.  */
 #define bfd_mach_sparc_v9_p(mach) \
-  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m \
    && (mach) != bfd_mach_sparc_sparclite_le)
 /* Nonzero if MACH is a 64 bit sparc architecture.  */
 #define bfd_mach_sparc_64bit_p(mach) \
-  ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+  ((mach) >= bfd_mach_sparc_v9 \
+   && (mach) != bfd_mach_sparc_v8plusb \
+   && (mach) != bfd_mach_sparc_v8plusc \
+   && (mach) != bfd_mach_sparc_v8plusd \
+   && (mach) != bfd_mach_sparc_v8pluse \
+   && (mach) != bfd_mach_sparc_v8plusv \
+   && (mach) != bfd_mach_sparc_v8plusm)
   bfd_arch_spu,       /* PowerPC SPU */
 #define bfd_mach_spu           256
   bfd_arch_mips,      /* MIPS Rxxxx */
@@ -2146,10 +2213,12 @@ enum bfd_architecture
 #define bfd_mach_v850e2v3      0x45325633
 #define bfd_mach_v850e3v5      0x45335635 /* ('E'|'3'|'V'|'5') */
   bfd_arch_arc,       /* ARC Cores */
-#define bfd_mach_arc_5         5
-#define bfd_mach_arc_6         6
-#define bfd_mach_arc_7         7
-#define bfd_mach_arc_8         8
+#define bfd_mach_arc_a4        0
+#define bfd_mach_arc_a5        1
+#define bfd_mach_arc_arc600    2
+#define bfd_mach_arc_arc601    4
+#define bfd_mach_arc_arc700    3
+#define bfd_mach_arc_arcv2     5
  bfd_arch_m32c,     /* Renesas M16C/M32C.  */
 #define bfd_mach_m16c        0x75
 #define bfd_mach_m32c        0x78
@@ -2232,6 +2301,9 @@ enum bfd_architecture
 #define bfd_mach_cris_v0_v10   255
 #define bfd_mach_cris_v32      32
 #define bfd_mach_cris_v10_v32  1032
+  bfd_arch_riscv,
+#define bfd_mach_riscv32       132
+#define bfd_mach_riscv64       164
   bfd_arch_rl78,
 #define bfd_mach_rl78  0x75
   bfd_arch_rx,        /* Renesas RX.  */
@@ -2300,6 +2372,8 @@ enum bfd_architecture
 #define bfd_mach_nios2r2       2
   bfd_arch_visium,     /* Visium */
 #define bfd_mach_visium        1
+  bfd_arch_pru,        /* PRU */
+#define bfd_mach_pru   0
   bfd_arch_last
   };
 
@@ -2343,6 +2417,9 @@ const bfd_arch_info_type *bfd_arch_get_c
 
 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
 
+bfd_boolean bfd_default_set_arch_mach
+   (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
+
 enum bfd_architecture bfd_get_arch (bfd *abfd);
 
 unsigned long bfd_get_mach (bfd *abfd);
@@ -2962,6 +3039,9 @@ to compensate for the borrow when the lo
   BFD_RELOC_MICROMIPS_10_PCREL_S1,
   BFD_RELOC_MICROMIPS_16_PCREL_S1,
 
+/* MIPS16 PC-relative relocation.  */
+  BFD_RELOC_MIPS16_16_PCREL_S1,
+
 /* MIPS PC-relative relocations.  */
   BFD_RELOC_MIPS_21_PCREL_S2,
   BFD_RELOC_MIPS_26_PCREL_S2,
@@ -3173,6 +3253,7 @@ instruction.  */
   BFD_RELOC_386_TLS_DESC_CALL,
   BFD_RELOC_386_TLS_DESC,
   BFD_RELOC_386_IRELATIVE,
+  BFD_RELOC_386_GOT32X,
 
 /* x86-64/elf relocations  */
   BFD_RELOC_X86_64_GOT32,
@@ -3204,6 +3285,8 @@ instruction.  */
   BFD_RELOC_X86_64_IRELATIVE,
   BFD_RELOC_X86_64_PC32_BND,
   BFD_RELOC_X86_64_PLT32_BND,
+  BFD_RELOC_X86_64_GOTPCRELX,
+  BFD_RELOC_X86_64_REX_GOTPCRELX,
 
 /* ns32k relocations  */
   BFD_RELOC_NS32K_IMM_8,
@@ -3279,6 +3362,8 @@ instruction.  */
   BFD_RELOC_PPC_VLE_SDAREL_HI16D,
   BFD_RELOC_PPC_VLE_SDAREL_HA16A,
   BFD_RELOC_PPC_VLE_SDAREL_HA16D,
+  BFD_RELOC_PPC_16DX_HA,
+  BFD_RELOC_PPC_REL16DX_HA,
   BFD_RELOC_PPC64_HIGHER,
   BFD_RELOC_PPC64_HIGHER_S,
   BFD_RELOC_PPC64_HIGHEST,
@@ -3305,6 +3390,7 @@ instruction.  */
   BFD_RELOC_PPC64_ADDR16_HIGH,
   BFD_RELOC_PPC64_ADDR16_HIGHA,
   BFD_RELOC_PPC64_ADDR64_LOCAL,
+  BFD_RELOC_PPC64_ENTRY,
 
 /* PowerPC and PowerPC64 thread-local storage relocations.  */
   BFD_RELOC_PPC_TLS,
@@ -3490,6 +3576,12 @@ pc-relative or some form of GOT-indirect
 /* ARM support for STT_GNU_IFUNC.  */
   BFD_RELOC_ARM_IRELATIVE,
 
+/* Thumb1 relocations to support execute-only code.  */
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
+
 /* These relocs are only used within the ARM assembler.  They are not
 (at present) written to any object files.  */
   BFD_RELOC_ARM_IMMEDIATE,
@@ -3618,16 +3710,75 @@ pc-relative or some form of GOT-indirect
   BFD_RELOC_SH_GOTOFFFUNCDESC20,
   BFD_RELOC_SH_FUNCDESC,
 
-/* ARC Cores relocs.
-ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
-not stored in the instruction.  The high 20 bits are installed in bits 26
-through 7 of the instruction.  */
-  BFD_RELOC_ARC_B22_PCREL,
-
-/* ARC 26 bit absolute branch.  The lowest two bits must be zero and are not
-stored in the instruction.  The high 24 bits are installed in bits 23
-through 0.  */
-  BFD_RELOC_ARC_B26,
+/* ARC relocs.  */
+  BFD_RELOC_ARC_NONE,
+  BFD_RELOC_ARC_8,
+  BFD_RELOC_ARC_16,
+  BFD_RELOC_ARC_24,
+  BFD_RELOC_ARC_32,
+  BFD_RELOC_ARC_N8,
+  BFD_RELOC_ARC_N16,
+  BFD_RELOC_ARC_N24,
+  BFD_RELOC_ARC_N32,
+  BFD_RELOC_ARC_SDA,
+  BFD_RELOC_ARC_SECTOFF,
+  BFD_RELOC_ARC_S21H_PCREL,
+  BFD_RELOC_ARC_S21W_PCREL,
+  BFD_RELOC_ARC_S25H_PCREL,
+  BFD_RELOC_ARC_S25W_PCREL,
+  BFD_RELOC_ARC_SDA32,
+  BFD_RELOC_ARC_SDA_LDST,
+  BFD_RELOC_ARC_SDA_LDST1,
+  BFD_RELOC_ARC_SDA_LDST2,
+  BFD_RELOC_ARC_SDA16_LD,
+  BFD_RELOC_ARC_SDA16_LD1,
+  BFD_RELOC_ARC_SDA16_LD2,
+  BFD_RELOC_ARC_S13_PCREL,
+  BFD_RELOC_ARC_W,
+  BFD_RELOC_ARC_32_ME,
+  BFD_RELOC_ARC_32_ME_S,
+  BFD_RELOC_ARC_N32_ME,
+  BFD_RELOC_ARC_SECTOFF_ME,
+  BFD_RELOC_ARC_SDA32_ME,
+  BFD_RELOC_ARC_W_ME,
+  BFD_RELOC_AC_SECTOFF_U8,
+  BFD_RELOC_AC_SECTOFF_U8_1,
+  BFD_RELOC_AC_SECTOFF_U8_2,
+  BFD_RELOC_AC_SECTOFF_S9,
+  BFD_RELOC_AC_SECTOFF_S9_1,
+  BFD_RELOC_AC_SECTOFF_S9_2,
+  BFD_RELOC_ARC_SECTOFF_ME_1,
+  BFD_RELOC_ARC_SECTOFF_ME_2,
+  BFD_RELOC_ARC_SECTOFF_1,
+  BFD_RELOC_ARC_SECTOFF_2,
+  BFD_RELOC_ARC_SDA_12,
+  BFD_RELOC_ARC_SDA16_ST2,
+  BFD_RELOC_ARC_32_PCREL,
+  BFD_RELOC_ARC_PC32,
+  BFD_RELOC_ARC_GOT32,
+  BFD_RELOC_ARC_GOTPC32,
+  BFD_RELOC_ARC_PLT32,
+  BFD_RELOC_ARC_COPY,
+  BFD_RELOC_ARC_GLOB_DAT,
+  BFD_RELOC_ARC_JMP_SLOT,
+  BFD_RELOC_ARC_RELATIVE,
+  BFD_RELOC_ARC_GOTOFF,
+  BFD_RELOC_ARC_GOTPC,
+  BFD_RELOC_ARC_S21W_PCREL_PLT,
+  BFD_RELOC_ARC_S25H_PCREL_PLT,
+  BFD_RELOC_ARC_TLS_DTPMOD,
+  BFD_RELOC_ARC_TLS_TPOFF,
+  BFD_RELOC_ARC_TLS_GD_GOT,
+  BFD_RELOC_ARC_TLS_GD_LD,
+  BFD_RELOC_ARC_TLS_GD_CALL,
+  BFD_RELOC_ARC_TLS_IE_GOT,
+  BFD_RELOC_ARC_TLS_DTPOFF,
+  BFD_RELOC_ARC_TLS_DTPOFF_S9,
+  BFD_RELOC_ARC_TLS_LE_S9,
+  BFD_RELOC_ARC_TLS_LE_32,
+  BFD_RELOC_ARC_S25W_PCREL_PLT,
+  BFD_RELOC_ARC_S21H_PCREL_PLT,
+  BFD_RELOC_ARC_NPS_CMEM16,
 
 /* ADI Blackfin 16 bit immediate absolute reloc.  */
   BFD_RELOC_BFIN_16_IMM,
@@ -4552,6 +4703,55 @@ number for the IN and OUT instructions  
 number for the SBIC, SBIS, SBI and CBI instructions  */
   BFD_RELOC_AVR_PORT5,
 
+/* RISC-V relocations.  */
+  BFD_RELOC_RISCV_HI20,
+  BFD_RELOC_RISCV_PCREL_HI20,
+  BFD_RELOC_RISCV_PCREL_LO12_I,
+  BFD_RELOC_RISCV_PCREL_LO12_S,
+  BFD_RELOC_RISCV_LO12_I,
+  BFD_RELOC_RISCV_LO12_S,
+  BFD_RELOC_RISCV_GPREL12_I,
+  BFD_RELOC_RISCV_GPREL12_S,
+  BFD_RELOC_RISCV_TPREL_HI20,
+  BFD_RELOC_RISCV_TPREL_LO12_I,
+  BFD_RELOC_RISCV_TPREL_LO12_S,
+  BFD_RELOC_RISCV_TPREL_ADD,
+  BFD_RELOC_RISCV_CALL,
+  BFD_RELOC_RISCV_CALL_PLT,
+  BFD_RELOC_RISCV_ADD8,
+  BFD_RELOC_RISCV_ADD16,
+  BFD_RELOC_RISCV_ADD32,
+  BFD_RELOC_RISCV_ADD64,
+  BFD_RELOC_RISCV_SUB8,
+  BFD_RELOC_RISCV_SUB16,
+  BFD_RELOC_RISCV_SUB32,
+  BFD_RELOC_RISCV_SUB64,
+  BFD_RELOC_RISCV_GOT_HI20,
+  BFD_RELOC_RISCV_TLS_GOT_HI20,
+  BFD_RELOC_RISCV_TLS_GD_HI20,
+  BFD_RELOC_RISCV_JMP,
+  BFD_RELOC_RISCV_TLS_DTPMOD32,
+  BFD_RELOC_RISCV_TLS_DTPREL32,
+  BFD_RELOC_RISCV_TLS_DTPMOD64,
+  BFD_RELOC_RISCV_TLS_DTPREL64,
+  BFD_RELOC_RISCV_TLS_TPREL32,
+  BFD_RELOC_RISCV_TLS_TPREL64,
+  BFD_RELOC_RISCV_ALIGN,
+  BFD_RELOC_RISCV_RVC_BRANCH,
+  BFD_RELOC_RISCV_RVC_JUMP,
+  BFD_RELOC_RISCV_RVC_LUI,
+  BFD_RELOC_RISCV_GPREL_I,
+  BFD_RELOC_RISCV_GPREL_S,
+  BFD_RELOC_RISCV_TPREL_I,
+  BFD_RELOC_RISCV_TPREL_S,
+  BFD_RELOC_RISCV_RELAX,
+  BFD_RELOC_RISCV_CFA,
+  BFD_RELOC_RISCV_SUB6,
+  BFD_RELOC_RISCV_SET6,
+  BFD_RELOC_RISCV_SET8,
+  BFD_RELOC_RISCV_SET16,
+  BFD_RELOC_RISCV_SET32,
+
 /* Renesas RL78 Relocations.  */
   BFD_RELOC_RL78_NEG8,
   BFD_RELOC_RL78_NEG16,
@@ -5367,6 +5567,41 @@ a matching LO8XG part.  */
   BFD_RELOC_NIOS2_R2_T1X1I6,
   BFD_RELOC_NIOS2_R2_T1X1I6_2,
 
+/* PRU LDI 16-bit unsigned data-memory relocation.  */
+  BFD_RELOC_PRU_U16,
+
+/* PRU LDI 16-bit unsigned instruction-memory relocation.  */
+  BFD_RELOC_PRU_U16_PMEMIMM,
+
+/* PRU relocation for two consecutive LDI load instructions that load a
+32 bit value into a register. If the higher bits are all zero, then
+the second instruction may be relaxed.  */
+  BFD_RELOC_PRU_LDI32,
+
+/* PRU QBBx 10-bit signed PC-relative relocation.  */
+  BFD_RELOC_PRU_S10_PCREL,
+
+/* PRU 8-bit unsigned relocation used for the LOOP instruction.  */
+  BFD_RELOC_PRU_U8_PCREL,
+
+/* PRU Program Memory relocations.  Used to convert from byte addressing to
+32-bit word addressing.  */
+  BFD_RELOC_PRU_32_PMEM,
+  BFD_RELOC_PRU_16_PMEM,
+
+/* PRU relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing.  The field is set to the value of the difference
+assuming no relaxation.  The relocation encodes the position of the
+second symbol so the linker can determine whether to adjust the field
+value. The PMEM variants encode the word difference, instead of byte
+difference between symbols.  */
+  BFD_RELOC_PRU_GNU_DIFF8,
+  BFD_RELOC_PRU_GNU_DIFF16,
+  BFD_RELOC_PRU_GNU_DIFF32,
+  BFD_RELOC_PRU_GNU_DIFF16_PMEM,
+  BFD_RELOC_PRU_GNU_DIFF32_PMEM,
+
 /* IQ2000 Relocations.  */
   BFD_RELOC_IQ2000_OFFSET_16,
   BFD_RELOC_IQ2000_OFFSET_21,
@@ -5493,6 +5728,12 @@ BFD_RELOC_MACH_O_PAIR.  */
 /* Pair of relocation.  Contains the first symbol.  */
   BFD_RELOC_MACH_O_PAIR,
 
+/* Symbol will be substracted.  Must be followed by a BFD_RELOC_32.  */
+  BFD_RELOC_MACH_O_SUBTRACTOR32,
+
+/* Symbol will be substracted.  Must be followed by a BFD_RELOC_64.  */
+  BFD_RELOC_MACH_O_SUBTRACTOR64,
+
 /* PCREL relocations.  They are marked as branch to create PLT entry if
 required.  */
   BFD_RELOC_MACH_O_X86_64_BRANCH32,
@@ -5505,12 +5746,6 @@ required.  */
 the linker could optimize the movq to a leaq if possible.  */
   BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
 
-/* Symbol will be substracted.  Must be followed by a BFD_RELOC_64.  */
-  BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
-
-/* Symbol will be substracted.  Must be followed by a BFD_RELOC_64.  */
-  BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64,
-
 /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.  */
   BFD_RELOC_MACH_O_X86_64_PCREL32_1,
 
@@ -5520,6 +5755,18 @@ the linker could optimize the movq to a 
 /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.  */
   BFD_RELOC_MACH_O_X86_64_PCREL32_4,
 
+/* Addend for PAGE or PAGEOFF.  */
+  BFD_RELOC_MACH_O_ARM64_ADDEND,
+
+/* Relative offset to page of GOT slot.  */
+  BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
+
+/* Relative offset within page of GOT slot.  */
+  BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
+
+/* Address of a GOT entry.  */
+  BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
+
 /* This is a 32 bit reloc for the microblaze that stores the
 low 16 bits of a value  */
   BFD_RELOC_MICROBLAZE_32_LO,
@@ -5610,6 +5857,9 @@ important as several tables in the AArch
 by these enumerators; make sure they are all synced.  */
   BFD_RELOC_AARCH64_RELOC_START,
 
+/* Deprecated AArch64 null relocation code.  */
+  BFD_RELOC_AARCH64_NULL,
+
 /* AArch64 null relocation code.  */
   BFD_RELOC_AARCH64_NONE,
 
@@ -5752,8 +6002,16 @@ the GOT entry for this symbol.  Used in 
 BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in ILP32 ABI only.  */
   BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
 
+/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
+for this symbol.  Valid in LP64 ABI only.  */
+  BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
+
+/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
+for this symbol.  Valid in LP64 ABI only.  */
+  BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
+
 /* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in ILP64 ABI only.  */
+the GOT entry for this symbol.  Valid in LP64 ABI only.  */
   BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
 
 /* Scaled 14 bit byte offset to the page base of the global offset table.  */
@@ -5776,11 +6034,11 @@ tls_index structure.  Used in conjunctio
 BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.  */
   BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
 
-/* AArch64 TLS INITIAL EXEC relocation.  */
-  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
+/* AArch64 TLS General Dynamic relocation.  */
+  BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
 
-/* AArch64 TLS INITIAL EXEC relocation.  */
-  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
+/* AArch64 TLS General Dynamic relocation.  */
+  BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
 
 /* AArch64 TLS INITIAL EXEC relocation.  */
   BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
@@ -5794,6 +6052,76 @@ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.  */
 /* AArch64 TLS INITIAL EXEC relocation.  */
   BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
 
+/* AArch64 TLS INITIAL EXEC relocation.  */
+  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
+
+/* AArch64 TLS INITIAL EXEC relocation.  */
+  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
+
+/* bit[23:12] of byte offset to module TLS base address.  */
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
+
+/* Unsigned 12 bit byte offset to module TLS base address.  */
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
+
+/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.  */
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
+
+/* Unsigned 12 bit byte offset to global offset table entry for a symbols
+tls_index structure.  Used in conjunction with
+BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.  */
+  BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
+
+/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
+instruction.  */
+  BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
+
+/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction.  */
+  BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
+
+/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
+instructions.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
+
+/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
+
+/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
+instructions.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
+
+/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
+
+/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
+instructions.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
+
+/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
+
+/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
+instructions.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
+
+/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
+
+/* bit[15:0] of byte offset to module TLS base address.  */
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
+
+/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0  */
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
+
+/* bit[31:16] of byte offset to module TLS base address.  */
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
+
+/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1  */
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
+
+/* bit[47:32] of byte offset to module TLS base address.  */
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
+
 /* AArch64 TLS LOCAL EXEC relocation.  */
   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
 
@@ -5893,6 +6221,14 @@ assembler and not (currently) written to
 address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.  */
   BFD_RELOC_AARCH64_LDST_LO12,
 
+/* AArch64 pseudo relocation code for TLS local dynamic mode.  It's to be
+used internally by the AArch64 assembler and not (currently) written to
+any object files.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
+
+/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check.  */
+  BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
+
 /* AArch64 pseudo relocation code to be used internally by the AArch64
 assembler and not (currently) written to any object files.  */
   BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
@@ -6176,8 +6512,7 @@ typedef struct bfd_symbol
 #define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
 
   /* A normal C symbol would be one of:
-     <<BSF_LOCAL>>, <<BSF_COMMON>>,  <<BSF_UNDEFINED>> or
-     <<BSF_GLOBAL>>.  */
+     <<BSF_LOCAL>>, <<BSF_UNDEFINED>> or <<BSF_GLOBAL>>.  */
 
   /* The symbol is a debugging record. The value has an arbitrary
      meaning, unless BSF_DEBUGGING_RELOC is also set.  */
@@ -6189,7 +6524,9 @@ typedef struct bfd_symbol
 
   /* Used by the linker.  */
 #define BSF_KEEP               (1 << 5)
-#define BSF_KEEP_G             (1 << 6)
+
+  /* An ELF common symbol.  */
+#define BSF_ELF_COMMON         (1 << 6)
 
   /* A weak global symbol, overridable without warnings by
      a regular global symbol of the same name.  */
@@ -6336,7 +6673,7 @@ enum bfd_direction
 
 enum bfd_plugin_format
   {
-    bfd_plugin_uknown = 0,
+    bfd_plugin_unknown = 0,
     bfd_plugin_yes = 1,
     bfd_plugin_no = 2
   };
@@ -6381,7 +6718,7 @@ struct bfd
   ENUM_BITFIELD (bfd_direction) direction : 2;
 
   /* Format_specific flags.  */
-  flagword flags : 18;
+  flagword flags : 20;
 
   /* Values that may appear in the flags field of a BFD.  These also
      appear in the object_flags field of the bfd_target structure, where
@@ -6461,16 +6798,24 @@ struct bfd
   /* Compress sections in this BFD with SHF_COMPRESSED from gABI.  */
 #define BFD_COMPRESS_GABI 0x20000
 
+  /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
+     BFD.  */
+#define BFD_CONVERT_ELF_COMMON 0x40000
+
+  /* Use the ELF STT_COMMON type in this BFD.  */
+#define BFD_USE_ELF_STT_COMMON 0x80000
+
   /* Flags bits to be saved in bfd_preserve_save.  */
 #define BFD_FLAGS_SAVED \
-  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
-   | BFD_COMPRESS_GABI)
+  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+   | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+   | BFD_USE_ELF_STT_COMMON)
 
   /* Flags bits which are for BFD use only.  */
 #define BFD_FLAGS_FOR_BFD_USE_MASK \
   (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
    | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
-   | BFD_COMPRESS_GABI)
+   | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
 
   /* Is the file descriptor being cached?  That is, can it be closed as
      needed, and re-opened when accessed later?  */
@@ -6681,14 +7026,12 @@ const char *bfd_errmsg (bfd_error_type e
 void bfd_perror (const char *message);
 
 
-typedef void (*bfd_error_handler_type) (const char *, ...);
+typedef void (*bfd_error_handler_type) (const char *, va_list);
 
 bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
 
 void bfd_set_error_program_name (const char *);
 
-bfd_error_handler_type bfd_get_error_handler (void);
-
 
 typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
                                          const char *bfd_version,
@@ -6697,8 +7040,6 @@ typedef void (*bfd_assert_handler_type) 
 
 bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
 
-bfd_assert_handler_type bfd_get_assert_handler (void);
-
 long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
 
 long bfd_canonicalize_reloc
@@ -6731,11 +7072,6 @@ bfd_boolean bfd_copy_private_bfd_data (b
 #define bfd_copy_private_bfd_data(ibfd, obfd) \
      BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                (ibfd, obfd))
-bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_merge_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-               (ibfd, obfd))
 bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
 
 #define bfd_set_private_flags(abfd, flags) \
@@ -6855,6 +7191,13 @@ bfd_boolean bfd_check_compression_header
 
 int bfd_get_compression_header_size (bfd *abfd, asection *sec);
 
+bfd_size_type bfd_convert_section_size
+   (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
+
+bfd_boolean bfd_convert_section_contents
+   (bfd *ibfd, asection *isec, bfd *obfd,
+    bfd_byte **ptr, bfd_size_type *ptr_size);
+
 /* Extracted from archive.c.  */
 symindex bfd_get_next_mapent
    (bfd *abfd, symindex previous, carsym **sym);
@@ -6900,6 +7243,7 @@ bfd_boolean generic_core_file_matches_ex
 
 enum bfd_flavour
 {
+  /* N.B. Update bfd_flavour_name if you change this.  */
   bfd_target_unknown_flavour,
   bfd_target_aout_flavour,
   bfd_target_coff_flavour,
@@ -7044,7 +7388,7 @@ typedef struct bfd_target
   bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
   /* Called to merge BFD general private data from one object file
      to a common output file when linking.  */
-  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
   /* Called to initialize BFD private section data from one object file
      to another.  */
 #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
@@ -7205,6 +7549,7 @@ typedef struct bfd_target
   NAME##_bfd_copy_link_hash_symbol_type, \
   NAME##_bfd_final_link, \
   NAME##_bfd_link_split_section, \
+  NAME##_bfd_link_check_relocs, \
   NAME##_bfd_gc_sections, \
   NAME##_bfd_lookup_section_flags, \
   NAME##_bfd_merge_sections, \
@@ -7246,6 +7591,9 @@ typedef struct bfd_target
   /* Should this section be split up into smaller pieces during linking.  */
   bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
 
+  /* Check the relocations in the bfd for validity.  */
+  bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
+
   /* Remove sections that are not referenced from the output.  */
   bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
@@ -7315,9 +7663,11 @@ const bfd_target *bfd_get_target_info (c
     const char **def_target_arch);
 const char ** bfd_target_list (void);
 
-const bfd_target *bfd_search_for_target
-   (int (*search_func) (const bfd_target *, void *),
-    void *);
+const bfd_target *bfd_iterate_over_targets
+   (int (*func) (const bfd_target *, void *),
+    void *data);
+
+const char *bfd_flavour_name (enum bfd_flavour flavour);
 
 /* Extracted from format.c.  */
 bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
@@ -7356,6 +7706,18 @@ struct bfd_elf_version_tree * bfd_find_v
 bfd_boolean bfd_hide_sym_by_version
    (struct bfd_elf_version_tree *verdefs, const char *sym_name);
 
+bfd_boolean bfd_link_check_relocs
+   (bfd *abfd, struct bfd_link_info *info);
+
+bfd_boolean _bfd_generic_link_check_relocs
+   (bfd *abfd, struct bfd_link_info *info);
+
+bfd_boolean bfd_merge_private_bfd_data
+   (bfd *ibfd, struct bfd_link_info *info);
+
+#define bfd_merge_private_bfd_data(ibfd, info) \
+     BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+               (ibfd, info))
 /* Extracted from simple.c.  */
 bfd_byte *bfd_simple_get_relocated_section_contents
    (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd-in.h ./bfd/bfd-in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd-in.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfd-in.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -34,6 +34,7 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
+#include <stdarg.h>
 #include <sys/stat.h>
 
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -256,7 +257,7 @@ struct orl 			/* Output ranlib.  */
   } u;			/* bfd* or file position.  */
   int namidx;		/* Index into string table.  */
 };
-
+
 /* Linenumber stuff.  */
 typedef struct lineno_cache_entry
 {
@@ -270,11 +271,19 @@ typedef struct lineno_cache_entry
 alent;
 
 /* Object and core file sections.  */
+typedef struct bfd_section *sec_ptr;
 
 #define	align_power(addr, align)	\
-  (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
+  (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
 
-typedef struct bfd_section *sec_ptr;
+/* Align an address upward to a boundary, expressed as a number of bytes.
+   E.g. align to an 8-byte boundary with argument of 8.  Take care never
+   to wrap around if the address is within boundary-1 of the end of the
+   address space.  */
+#define BFD_ALIGN(this, boundary)					  \
+  ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this))		  \
+   ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
+   : ~ (bfd_vma) 0)
 
 #define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
 #define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
@@ -477,20 +486,20 @@ extern int bfd_stat (bfd *, struct stat 
 /* Deprecated old routines.  */
 #if __GNUC__
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+  (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+  (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated (const char *, const char *, int, const char *);
+extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -511,7 +520,6 @@ extern void warn_deprecated (const char 
 #define bfd_get_file_flags(abfd) ((abfd)->flags)
 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
 #define bfd_has_map(abfd) ((abfd)->has_armap)
 #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
 
@@ -849,6 +857,23 @@ extern bfd_boolean bfd_elf32_arm_vfp11_e
 extern void bfd_elf32_arm_vfp11_fix_veneer_locations
   (bfd *, struct bfd_link_info *);
 
+/* ARM STM STM32L4XX erratum workaround support.  */
+typedef enum
+{
+  BFD_ARM_STM32L4XX_FIX_NONE,
+  BFD_ARM_STM32L4XX_FIX_DEFAULT,
+  BFD_ARM_STM32L4XX_FIX_ALL
+} bfd_arm_stm32l4xx_fix;
+
+extern void bfd_elf32_arm_set_stm32l4xx_fix
+  (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
+  (bfd *, struct bfd_link_info *);
+
 /* ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_allocate_interworking_sections
   (struct bfd_link_info *);
@@ -876,9 +901,27 @@ extern bfd_boolean bfd_elf32_arm_allocat
 extern bfd_boolean bfd_elf32_arm_process_before_allocation
   (bfd *, struct bfd_link_info *);
 
-void bfd_elf32_arm_set_target_relocs
-  (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
-   int, int, int, int, int);
+struct elf32_arm_params {
+  char *thumb_entry_symbol;
+  int byteswap_code;
+  int target1_is_rel;
+  char * target2_type;
+  int fix_v4bx;
+  int use_blx;
+  bfd_arm_vfp11_fix vfp11_denorm_fix;
+  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
+  int no_enum_size_warning;
+  int no_wchar_size_warning;
+  int pic_veneer;
+  int fix_cortex_a8;
+  int fix_arm1176;
+  int merge_exidx_entries;
+  int cmse_implib;
+  bfd *in_implib_bfd;
+};
+
+void bfd_elf32_arm_set_target_params
+  (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
   (bfd *, struct bfd_link_info *);
@@ -886,6 +929,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
   (bfd *, struct bfd_link_info *);
 
+extern void bfd_elf32_arm_keep_private_stub_output_sections
+  (struct bfd_link_info *);
+
 /* ELF ARM mapping symbol support.  */
 #define BFD_ARM_SPECIAL_SYM_TYPE_MAP	(1 << 0)
 #define BFD_ARM_SPECIAL_SYM_TYPE_TAG	(1 << 1)
@@ -917,7 +963,8 @@ extern void elf32_arm_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bfd_boolean elf32_arm_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+   struct bfd_section * (*) (const char *, struct bfd_section *,
+			     struct bfd_section *, unsigned int),
    void (*) (void));
 extern bfd_boolean elf32_arm_build_stubs
   (struct bfd_link_info *);
@@ -930,13 +977,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c
 extern bfd_boolean elf32_tic6x_fix_exidx_coverage
 (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
-/* PowerPC @tls opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tls_transform
-  (unsigned int, unsigned int);
-/* PowerPC @tprel opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tprel_transform
-  (unsigned int, unsigned int);
-
 extern void bfd_elf64_aarch64_init_maps
   (bfd *);
 
@@ -944,10 +984,10 @@ extern void bfd_elf32_aarch64_init_maps
   (bfd *);
 
 extern void bfd_elf64_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 extern void bfd_elf32_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 /* ELF AArch64 mapping symbol support.  */
 #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP	(1 << 0)
@@ -1005,3 +1045,7 @@ extern bfd_boolean v850_elf_create_secti
 
 extern bfd_boolean v850_elf_set_note
   (bfd *, unsigned int, unsigned int);
+
+/* MIPS ABI flags data access.  For the disassembler.  */
+struct elf_internal_abiflags_v0;
+extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfdio.c ./bfd/bfdio.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfdio.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfdio.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level I/O routines for BFDs.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by Cygnus Support.
 
@@ -41,7 +41,7 @@
 #endif
 
 file_ptr
-real_ftell (FILE *file)
+_bfd_real_ftell (FILE *file)
 {
 #if defined (HAVE_FTELLO64)
   return ftello64 (file);
@@ -53,7 +53,7 @@ real_ftell (FILE *file)
 }
 
 int
-real_fseek (FILE *file, file_ptr offset, int whence)
+_bfd_real_fseek (FILE *file, file_ptr offset, int whence)
 {
 #if defined (HAVE_FSEEKO64)
   return fseeko64 (file, offset, whence);
@@ -82,7 +82,7 @@ close_on_exec (FILE *file)
 }
 
 FILE *
-real_fopen (const char *filename, const char *modes)
+_bfd_real_fopen (const char *filename, const char *modes)
 {
 #ifdef VMS
   char *vms_attr;
@@ -234,7 +234,8 @@ bfd_tell (bfd *abfd)
       bfd *parent_bfd = abfd;
       ptr = abfd->iovec->btell (abfd);
 
-      while (parent_bfd->my_archive != NULL)
+      while (parent_bfd->my_archive != NULL
+	     && !bfd_is_thin_archive (parent_bfd->my_archive))
 	{
 	  ptr -= parent_bfd->origin;
 	  parent_bfd = parent_bfd->my_archive;
@@ -289,7 +290,7 @@ bfd_seek (bfd *abfd, file_ptr position, 
   if (direction == SEEK_CUR && position == 0)
     return 0;
 
-  if (abfd->format != bfd_archive && abfd->my_archive == 0)
+  if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive))
     {
       if (direction == SEEK_SET && (bfd_vma) position == abfd->where)
 	return 0;
@@ -314,7 +315,8 @@ bfd_seek (bfd *abfd, file_ptr position, 
     {
       bfd *parent_bfd = abfd;
 
-      while (parent_bfd->my_archive != NULL)
+      while (parent_bfd->my_archive != NULL
+	     && !bfd_is_thin_archive (parent_bfd->my_archive))
         {
           file_position += parent_bfd->origin;
           parent_bfd = parent_bfd->my_archive;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd.m4 ./bfd/bfd.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfd.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfd.m4	2017-03-06 01:49:05.000000000 +0000
@@ -1,17 +1,17 @@
 dnl This file was derived from acinclude.m4.
 dnl
-dnl   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfdwin.c ./bfd/bfdwin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bfdwin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bfdwin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for memory-mapped windows into a BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -144,7 +144,8 @@ bfd_get_file_window (bfd *abfd,
       int fd;
 
       /* Find the real file and the real offset into it.  */
-      while (abfd->my_archive != NULL)
+      while (abfd->my_archive != NULL
+	     && !bfd_is_thin_archive (abfd->my_archive))
 	{
 	  offset += abfd->origin;
 	  abfd = abfd->my_archive;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/binary.c ./bfd/binary.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/binary.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/binary.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for binary objects.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -269,8 +269,10 @@ binary_set_section_contents (bfd *abfd,
 	     have.  */
 
 	  if (s->filepos < 0)
-	    (*_bfd_error_handler)
-	      (_("Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."),
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("Warning: Writing section `%s' at huge (ie negative) "
+		 "file offset 0x%lx."),
 	       bfd_get_section_name (abfd, s),
 	       (unsigned long) s->filepos);
 	}
@@ -309,12 +311,12 @@ binary_sizeof_headers (bfd *abfd ATTRIBU
 #define binary_bfd_define_common_symbol            bfd_generic_define_common_symbol
 #define binary_bfd_link_hash_table_create         _bfd_generic_link_hash_table_create
 #define binary_bfd_link_just_syms                 _bfd_generic_link_just_syms
-#define binary_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
+#define binary_bfd_copy_link_hash_symbol_type     _bfd_generic_copy_link_hash_symbol_type
 #define binary_bfd_link_add_symbols               _bfd_generic_link_add_symbols
 #define binary_bfd_final_link                     _bfd_generic_final_link
 #define binary_bfd_link_split_section             _bfd_generic_link_split_section
 #define binary_get_section_contents_in_window     _bfd_generic_get_section_contents_in_window
+#define binary_bfd_link_check_relocs              _bfd_generic_link_check_relocs
 
 const bfd_target binary_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bout.c ./bfd/bout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/bout.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/bout.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 960 b.out binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -137,8 +137,8 @@ b_out_callback (bfd *abfd)
 		     );
 
   /* The positions of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* The alignments of the sections.  */
   obj_textsec (abfd)->alignment_power = execp->a_talign;
@@ -161,12 +161,12 @@ b_out_callback (bfd *abfd)
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file positions of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file positions of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TROFF (*execp);
-  obj_datasec (abfd)->rel_filepos =  N_DROFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TROFF (execp);
+  obj_datasec (abfd)->rel_filepos =  N_DROFF (execp);
 
   adata (abfd).page_size = 1;	/* Not applicable.  */
   adata (abfd).segment_size = 1; /* Not applicable.  */
@@ -193,7 +193,7 @@ b_out_object_p (bfd *abfd)
 
   anexec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       bfd_set_error (bfd_error_wrong_format);
       return 0;
@@ -450,20 +450,20 @@ b_out_write_object_contents (bfd *abfd)
 	       b_out_symbol_cmp);
 
       /* Back to your regularly scheduled program.  */
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
       if (! aout_32_write_syms (abfd))
 	return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_TROFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_TROFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
       if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd)))
 	return FALSE;
-      if (bfd_seek (abfd, (file_ptr) (N_DROFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_DROFF (exec_hdr (abfd))), SEEK_SET)
 	  != 0)
 	return FALSE;
 
@@ -517,11 +517,9 @@ get_value (arelent *reloc,
 	value = h->u.c.size;
       else
 	{
-	  if (! ((*link_info->callbacks->undefined_symbol)
-		 (link_info, bfd_asymbol_name (symbol),
-		  input_section->owner, input_section, reloc->address,
-		  TRUE)))
-	    abort ();
+	  (*link_info->callbacks->undefined_symbol)
+	    (link_info, bfd_asymbol_name (symbol),
+	     input_section->owner, input_section, reloc->address, TRUE);
 	  value = 0;
 	}
     }
@@ -783,7 +781,7 @@ b_out_slurp_reloc_table (bfd *abfd, sec_
 	/* Sign-extend symnum from 24 bits to whatever host uses.  */
 	s = symnum;
 	if (s & (1 << 23))
-	  s |= (~0) << 24;
+	  s |= (~0U) << 24;
 
 	cache_ptr->sym_ptr_ptr = (asymbol **)NULL;
 	switch (s)
@@ -1069,7 +1067,7 @@ abs32code (bfd *abfd,
      jump we were going to.  */
   gap = value - (dot - shrink);
 
-  if (-1 << 23 < (long)gap && (long)gap < 1 << 23)
+  if ((long)(-1UL << 23) < (long)gap && (long)gap < 1L << 23)
     {
       /* Change the reloc type from 32bitcode possible 24, to 24bit
 	 possible 32.  */
@@ -1139,7 +1137,7 @@ b_out_bfd_relax_section (bfd *abfd,
   arelent **reloc_vector = NULL;
   long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -1393,6 +1391,7 @@ b_out_bfd_get_relocated_section_contents
 #define b_out_section_already_linked           _bfd_generic_section_already_linked
 #define b_out_bfd_define_common_symbol         bfd_generic_define_common_symbol
 #define aout_32_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#define b_out_bfd_link_check_relocs            _bfd_generic_link_check_relocs
 
 extern const bfd_target bout_le_vec;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cache.c ./bfd/cache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cache.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cache.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* BFD library -- caching of file descriptors.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
 
@@ -78,18 +78,36 @@ bfd_cache_max_open (void)
   if (max_open_files == 0)
     {
       int max;
+#if defined(__sun) && !defined(__sparcv9) && !defined(__x86_64__)
+      /* PR ld/19260: 32-bit Solaris has very inelegant handling of the 255
+	 file descriptor limit.  The problem is that setrlimit(2) can raise
+	 RLIMIT_NOFILE to a value that is not supported by libc, resulting
+         in "Too many open files" errors.  This can happen here even though
+	 max_open_files is set to rlim.rlim_cur / 8.  For example, if
+	 a parent process has set rlim.rlim_cur to 65536, then max_open_files
+	 will be computed as 8192.
+
+	 This check essentially reverts to the behavior from binutils 2.23.1
+         for 32-bit Solaris only.  (It is hoped that the 32-bit libc
+	 limitation will be removed soon).  64-bit Solaris libc does not have
+	 this limitation.  */
+      max = 16;
+#else
 #ifdef HAVE_GETRLIMIT
       struct rlimit rlim;
+
       if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
 	  && rlim.rlim_cur != (rlim_t) RLIM_INFINITY)
 	max = rlim.rlim_cur / 8;
       else
-#endif /* HAVE_GETRLIMIT */
+#endif
 #ifdef _SC_OPEN_MAX
 	max = sysconf (_SC_OPEN_MAX) / 8;
 #else
-	max = 10;
-#endif /* _SC_OPEN_MAX */
+        max = 10;
+#endif
+#endif /* not 32-bit Solaris */
+
       max_open_files = max < 10 ? 10 : max;
     }
 
@@ -194,7 +212,7 @@ close_one (void)
       return TRUE;
     }
 
-  to_kill->where = real_ftell ((FILE *) to_kill->iostream);
+  to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream);
 
   return bfd_cache_delete (to_kill);
 }
@@ -223,7 +241,8 @@ bfd_cache_lookup_worker (bfd *abfd, enum
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     abort ();
 
-  while (abfd->my_archive)
+  while (abfd->my_archive != NULL
+	 && !bfd_is_thin_archive (abfd->my_archive))
     abfd = abfd->my_archive;
 
   if (abfd->iostream != NULL)
@@ -243,14 +262,16 @@ bfd_cache_lookup_worker (bfd *abfd, enum
   if (bfd_open_file (abfd) == NULL)
     ;
   else if (!(flag & CACHE_NO_SEEK)
-	   && real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0
+	   && _bfd_real_fseek ((FILE *) abfd->iostream,
+			       abfd->where, SEEK_SET) != 0
 	   && !(flag & CACHE_NO_SEEK_ERROR))
     bfd_set_error (bfd_error_system_call);
   else
     return (FILE *) abfd->iostream;
 
-  (*_bfd_error_handler) (_("reopening %B: %s\n"),
-			 orig_bfd, bfd_errmsg (bfd_get_error ()));
+  /* xgettext:c-format */
+  _bfd_error_handler (_("reopening %B: %s\n"),
+		      orig_bfd, bfd_errmsg (bfd_get_error ()));
   return NULL;
 }
 
@@ -260,7 +281,7 @@ cache_btell (struct bfd *abfd)
   FILE *f = bfd_cache_lookup (abfd, CACHE_NO_OPEN);
   if (f == NULL)
     return abfd->where;
-  return real_ftell (f);
+  return _bfd_real_ftell (f);
 }
 
 static int
@@ -269,7 +290,7 @@ cache_bseek (struct bfd *abfd, file_ptr 
   FILE *f = bfd_cache_lookup (abfd, whence != SEEK_CUR ? CACHE_NO_SEEK : CACHE_NORMAL);
   if (f == NULL)
     return -1;
-  return real_fseek (f, offset, whence);
+  return _bfd_real_fseek (f, offset, whence);
 }
 
 /* Note that archive entries don't have streams; they share their parent's.
@@ -448,7 +469,8 @@ cache_bmmap (struct bfd *abfd ATTRIBUTE_
         pagesize_m1 = getpagesize () - 1;
 
       /* Handle archive members.  */
-      if (abfd->my_archive != NULL)
+      if (abfd->my_archive != NULL
+	  && !bfd_is_thin_archive (abfd->my_archive))
         offset += abfd->origin;
 
       /* Align.  */
@@ -548,7 +570,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_cache_close_all ()
+bfd_cache_close_all (void)
 {
   bfd_boolean ret = TRUE;
 
@@ -588,15 +610,15 @@ bfd_open_file (bfd *abfd)
     {
     case read_direction:
     case no_direction:
-      abfd->iostream = real_fopen (abfd->filename, FOPEN_RB);
+      abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_RB);
       break;
     case both_direction:
     case write_direction:
       if (abfd->opened_once)
 	{
-	  abfd->iostream = real_fopen (abfd->filename, FOPEN_RUB);
+	  abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_RUB);
 	  if (abfd->iostream == NULL)
-	    abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
+	    abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_WUB);
 	}
       else
 	{
@@ -626,7 +648,7 @@ bfd_open_file (bfd *abfd)
 	  if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
 	    unlink_if_ordinary (abfd->filename);
 #endif
-	  abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
+	  abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_WUB);
 	  abfd->opened_once = TRUE;
 	}
       break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cf-i386lynx.c ./bfd/cf-i386lynx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cf-i386lynx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cf-i386lynx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 COFF LynxOS files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cf-sparclynx.c ./bfd/cf-sparclynx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cf-sparclynx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cf-sparclynx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Sparc COFF LynxOS files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog ./bfd/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ChangeLog	2017-03-06 01:49:05.000000000 +0000
@@ -1,2319 +1,626 @@
-2015-07-05  Richard Sandiford  <richard.sandiford@arm.com>
+2017-03-05  Alan Modra  <amodra@gmail.com>
 
-	* elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
-	plus addend rather than the original st_value when looking up
-	entries in opd->adjust.
-
-2015-07-03   Kai Tietz  <ktietz@redhat.com>
-	     Nick Clifton  <nickc@redhat.com>
-
-	PR ld/11539
-	* coffcode.h (coff_bfd_gc_sections): Define default
-	to bfd_coff_gc_sections function.
-	(coff_gc_mark_hook_fn): New type.
-	* coffgen.c (init_reloc_cookie): Copy and adjust coff
-	related code about gc-sections from elflink.c to here.
-	(fini_reloc_cookie): Likewise.
-	(init_reloc_cookie_rels): Likewise.
-	(fini_reloc_cookie_rels): Likewise.
-	(init_reloc_cookie_for_section): Likewise.
-	(fini_reloc_cookie_for_section): Likewise.
-	(_bfd_coff_gc_mark_hook): Likewise.
-	(_bfd_coff_gc_mark_rsec): Likewise.
-	(_bfd_coff_gc_mark_reloc): Likewise.
-	(_bfd_coff_gc_mark): Likewise.
-	(_bfd_coff_gc_mark_extra_sections): Likewise.
-	(coff_gc_sweep_symbol_info): Likewise.
-	(coff_gc_sweep_symbol): Likewise.
-	(gc_sweep_hook_fn): Likewise.
-	(coff_gc_sweep): Likewise.
-	(bfd_coff_gc_sections): Likewise.
-	(_bfd_coff_gc_keep): Likewise.
-	* libcoff-in.h (coff_reloc_cookie): New struct.
-	(bfd_coff_gc_sections): New prototype.
-	* libcoff.h: Regenerate.
-
-2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
-	    Cesar Philippidis  <cesar@codesourcery.com>
-
-	* bfd-in2.h: Regenerated.
-	* elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
-	(elf_nios2_r1_howto_table_rel): This.
-	(elf_nios2_r2_howto_table_rel): New.
-	(BFD_IS_R2): New.
-	(lookup_howto): Add ABFD parameter.  Adjust to look up in either
-	the R1 or R2 relocation table, as determined by ABFD.
-	(nios2_reloc_map): Add R2 relocations.
-	(nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
-	Pass it the ABFD parameter.
-	(nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
-	return an R1 or R2 relocation.
-	(nios2_elf32_info_to_howto): Do lookup using lookup_howto.
-	Pass it the ABFD parameter.
-	(nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
-	boundary.
-	(nios2_elf32_relocate_section): Adjust call to lookup_howto.
-	* libbfd.h: Regenerated.
-	* reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
-	(BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
-	(BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
-	(BFD_RELOC_NIOS2_R2_T1I7_2): New.
-	(BFD_RELOC_NIOS2_R2_T2I4): New.
-	(BFD_RELOC_NIOS2_R2_T2I4_1): New.
-	(BFD_RELOC_NIOS2_R2_T2I4_2): New.
-	(BFD_RELOC_NIOS2_R2_X1I7_2): New.
-	(BFD_RELOC_NIOS2_R2_X2L5): New.
-	(BFD_RELOC_NIOS2_R2_F1I5_2): New.
-	(BFD_RELOC_NIOS2_R2_L5I4X1): New.
-	(BFD_RELOC_NIOS2_R2_T1X1I6): New.
-	(BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
-
-2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
-	    Cesar Philippidis  <cesar@codesourcery.com>
-
-	* archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
-	* bfd-in2.h: Regenerated.
-	* cpu-nios2.c (nios2_compatible): New.
-	(N): Use nios2_compatible instead of bfd_default_compatible.
-	(NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
-	(arch_info_struct): New.
-	(bfd_nios2_arch): Chain to NIOS2R1_NEXT.
-	* elf32-nios2.c (is_nios2_elf): New.
-	(nios2_elf32_merge_private_bfd_data): New.
-	(nios2_elf32_object_p): New.
-	(bfd_elf32_bfd_merge_private_bfd_data): Define.
-	(elf_backend_object_p): Define.
-
-2015-07-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
-
-2015-06-30  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/18570
-	* elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
-	(write_obj_attribute): Likewise.
-	(elf_new_obj_attr): Likewise.
-	(bfd_elf_get_obj_attr_int): Likewise.
-	(bfd_elf_add_obj_attr_int): Likewise.
-	(bfd_elf_add_obj_attr_string): Likewise.
-	(bfd_elf_add_obj_attr_int_string): Likewise.
-	(gnu_obj_attrs_arg_type): Likewise.
-	(_bfd_elf_obj_attrs_arg_type): Likewise.
-	(_bfd_elf_parse_attributes): Likewise.
-	(_bfd_elf_merge_unknown_attribute_list): Likewise.
-	* elf-bfd.h (struct obj_attribute_list): Likewise.
-	Update prototypes.
-
-2015-06-28  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfd-in.h (compressed_debug_section_type): Remove
-	COMPRESS_DEBUG_ZLIB.
-	* bfd-in2.h : Regenerated.
-
-2015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
-
-	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
-	instead of !shared to indicate an application vs shared library.
-	(_bfd_mips_elf_size_dynamic_sections): Likewise.
-	(_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
-	(_bfd_mips_elf_get_target_dtag): Likewise.
-
-2015-06-25  DJ Delorie  <dj@redhat.com>
-
-	* elf32-msp430.c (msp430_final_link_relocate): Fix comments.  Fix
-	REL loads to match RELA stores.
-
-2015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf.c (_bfd_elf_compute_section_file_positions): Don't
-	initialize sh_size for .shstrtab here.
-
-2015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR gas/18451
-	* elf-bfd.h (elf_sym_strtab): New.
-	(elf_link_hash_table): Add strtabcount, strtabsize and
-	strtab.
-	(_bfd_elf_stringtab_init): Removed.
-	* elf.c (_bfd_elf_stringtab_init): Removed.
-	(_bfd_elf_compute_section_file_positions): Replace
-	bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
-	_bfd_stringtab_size with
-	elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
-	_bfd_elf_strtab_size.  Use _bfd_elf_strtab_add,
-	_bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
-	st_name.
-	(swap_out_syms): Likewise.
-	* elflink.c (elf_final_link_info): Replace bfd_strtab_hash
-	with elf_strtab_hash.  Remove symbuf, symbuf_count,
-	symbuf_size and shndxbuf_size.
-	(elf_link_flush_output_syms): Removed.
-	(elf_link_output_sym): Renamed to ...
-	(elf_link_output_symstrtab): This.  Replace _bfd_stringtab_add
-	with _bfd_elf_strtab_add.  Don't flush symbols to the file nor
-	swap out symbols.
-	(elf_link_swap_symbols_out): New.
-	(elf_link_output_extsym): Replace elf_link_output_sym with
-	elf_link_output_symstrtab.
-	(elf_link_input_bfd): Likewise.
-	(elf_final_link_free): Replace _bfd_stringtab_free with
-	_bfd_elf_strtab_free.  Remove symbuf.
-	(bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
-	_bfd_elf_strtab_init.  Don't set symbuf, symbuf_count,
-	symbuf_size nor shndxbuf_size.  Initialize strtabsize and
-	strtab.  Initialize symshndxbuf to -1 when number of sections
-	>= 64K.  Replace elf_link_output_sym/elf_link_output_sym with
-	elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
-	call elf_link_flush_output_syms.  Call _bfd_elf_strtab_finalize
-	and elf_link_swap_symbols_out.  Replace _bfd_stringtab_size
-	and _bfd_stringtab_emit with _bfd_elf_strtab_size and
-	_bfd_elf_strtab_emit.
-
-2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
-	GCC warning.
-
-2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
-	space for the first .plt entry.
-	(elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
-	section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
-	there are PLT relocations.
-	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
-	allocate space for the first .plt entry.
-	(elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
-	.plt section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
-	there are PLT relocations.
-
-2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18591
-	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
-	R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
-	overflow.
-
-2015-06-23  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
-	(elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
-	relocations against read-only sections.
-
-2015-06-18  Nick Clifton  <nickc@redhat.com>
-
-	PR 18481
-	* elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
-
-2015-06-15  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* bfd.c: Change struct bfd_build_id to use bfd_size_type.
-	* bfd-in2.h : Regenerate.
-
-2015-06-16  Alan Modra  <amodra@gmail.com>
-
-	* elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
-	dynamic relocs.
-
-2015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* elf-bfd.h : Remove struct elf_build_id.
-	* bfd.c : Add struct bfd_build_id.
-	* bfd-in2.h: Regenerate.
-	* elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
-	* libpei.h: Add protoype and macros for
-	bfd_XXi_slurp_codeview_record.
-	* peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
-	* peicode.h (pe_bfd_read_buildid): Add.
-	(pe_bfd_object_p): Use pe_bfd_read_buildid().
-
-2015-06-15  Renlin Li  <renlin.li@arm.com>
-
-	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
-	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
-	BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
-
-2015-06-15  Alan Modra  <amodra@gmail.com>
-
-	* cofflink.c (_bfd_coff_generic_relocate_section): Revert
-	2014-03-26 change.  Call _bfd_clear_contents for relocs against
-	local and global symbols defined in discarded input sections.
-
-2015-06-05  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-msp430.c (rl78_sym_diff_handler): New function.
-	(msp430_howto_table): Use the new function for the SYM_DIFF reloc.
-	(msp430x_howto_table): Likewise.
-
-2015-06-05  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
-	relocs with insns moved by --ppc476-workaround.  Correct
-	output of REL16 relocs.
-
-2015-06-01  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
-	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
-	(elfNN_aarch64_final_link_relocate): Ditto.
-	(elfNN_aarch64_gc_swap_hook): Ditto.
-	(elfNN_aarch64_check_relocs): Ditto.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
-
-2015-06-01  Jiong Wang  <jiong.wang@arm.com>
-
-	* reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
-	* bfd-in2.h: Regenerate.
+	* elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
+	* elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
+	(next_cie_fde_offset): New function.
+	(_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
+	(_bfd_elf_discard_section_eh_frame): Align zero terminator to
+	four bytes.  Align CIEs to four or eight bytes depending on
+	per_encoding_aligned8.  Align FDEs according to their encoding.
+	Pad last FDE to output section alignment.
+	(_bfd_elf_write_section_eh_frame): Adjust to suit.  Remove
+	assertion.
+	* elf64-ppc.c (glink_eh_frame_cie): Delete padding.
+	(ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
+	(ppc64_elf_finish_dynamic_sections): Adjust to suit.
+
+2017-03-02  Martin Bickel  <binutils@ineranves.de>
+
+	PR ld/21212
+	* elf.c (rewrite_elf_program_header): Do not issue a warning for
+	empty segments which have a zero filesz, but a non-zero memsz.
+
+2017-03-02  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
+
+2017-02-28  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
+	(ppc64_elf_relocate_section): Likewise.
+
+2017-02-28  Alan Modra  <amodra@gmail.com>
+
+	PR 20995
+	* elf32-nios2.c (nios2_elf32_relocate_section): Use htab
+	rather than elf32_nios2_hash_table or elf_hash_table.
+	(create_got_section): Likewise.
+	(nios2_elf32_finish_dynamic_symbol): Likewise.
+	(nios2_elf32_adjust_dynamic_symbol): Likewise.
+	(nios2_elf32_size_dynamic_sections): Likewise.
+	(nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
+	vars.  Use htab equivalents directly instead.  Don't create
+	all dynamic sections on needing just the GOT.  Use a goto
+	rather than a fall-through with reloc test.  Ensure
+	htab->dynobj is set when making dynamic sreloc section.
+	(nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
+	equivalent directly instead.  Don't segfault on looking for
+	.dynamic when dynamic sections have not been created.  Don't
+	segfault on .got.plt being discarded.
+	(nios2_elf32_size_dynamic_sections): Delete plt and got vars.
+	Don't set "relocs" on .rela.plt.  Do handle .sbss.  Delete
+	fixme and another not so relevant comment.
+	(nios2_elf_add_symbol_hook): Delete dynobj var.  If not
+	already set, set hash table dynobj on creating .sbss.
+
+2017-02-28  Alan Modra  <amodra@gmail.com>
+
+	* reloc.c (BFD_RELOC_PPC_16DX_HA): New.
+	* elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
+	(ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
+	(ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
+	(ppc64_elf_relocate_section): Likewise.
+	* elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
+	(ppc_elf_reloc_type_lookup): Translate new bfd reloc.
+	(ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
 	* libbfd.h: Regenerate.
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
-	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
-
-2015-06-01  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
-	complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
-	PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
-
-2015-06-01  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
-	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
-	(elfNN_aarch64_final_link_relocate): Ditto.
-	(elfNN_aarch64_gc_swap_hook): Ditto.
-	(elfNN_aarch64_check_relocs): Ditto.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
-
-2015-06-01  Jiong Wang  <jiong.wang@arm.com>
-
-	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
 	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
-	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
-
-2015-05-28  Catherine Moore  <clm@codesourcery.com>
-	    Bernd Schmidt <bernds@codesourcery.com>
-	    Paul Brook <paul@codesourcery.com>
-
-	bfd/
-	* bfd-in2.h: Regenerated.
-	* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
-	(COMPACT_EH_CANT_UNWIND_OPCODE): Define.
-	(dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
-	eh_frame_hdr_info.
-	(compact_eh_frame_hdr_info): Declare.
-	(eh_frame_hdr_info):  Redeclare with union for dwarf-specific
-	fields and compact-eh fields.
-	(elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
-	(bfd_elf_section_data): Add eh_frame_entry_field.
-	(elf_section_eh_frame_entry): Define.
-	(bfd_elf_parse_eh_frame_entries): Declare.
-	(_bfd_elf_parse_eh_frame_entry): Declare.
-	(_bfd_elf_end_eh_frame_parsing): Declare.
-	(_bfd_elf_write_section_eh_frame_entry): Declare.
-	(_bfd_elf_eh_frame_entry_present): Declare.
-	(_bfd_elf_section_for_symbol): Declare.
-	* elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
-	(bfd_elf_record_eh_frame_entry): New function.
-	(_bfd_elf_parse_eh_frame_entry): New function.
-	(_bfd_elf_parse_eh_frame): Update hdr_info field references.
-	(cmp_eh_frame_hdr): New function.
-	(add_eh_frame_hdr_terminator): New function.
-	(_bfd_elf_end_eh_frame_parsing): New function.
-	(find_merged_cie): Update hdr_info field references.
-	(_bfd_elf_discard_section_eh_frame): Likewise.
-	(_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
-	(_bfd_elf_eh_frame_entry_present): New function.
-	(_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
-	(_bfd_elf_write_section_eh_frame_entry): New function.
-	(_bfd_elf_write_section_eh_frame): Update hdr_info field references.
-	(_bfd_elf_fixup_eh_frame_hdr): New function.
-	(write_compact_eh_frame_hdr): New function.
-	(write_dwarf_eh_frame_hdr): New function.
-	(_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
-	* elflink.c (_bfd_elf_section_for_symbol): New function.
-	(elf_section_ignore_discarded_relocs): Add Compact EH support.
-	(elf_link_input_bfd): Likewise.
-	(bfd_elf_final_link): Likewise.
-	(_bfd_elf_gc_mark): Likewise.
-	(bfd_elf_parse_eh_frame_entries): New function.
-	(bfd_elf_gc_sections): Add Compact EH support.
-	(bfd_elf_discard_info): Likewise.
-	* elfxx-mips.c: Include dwarf2.h.
-	(_bfd_mips_elf_compact_eh_encoding): New function.
-	(_bfd_mips_elf_cant_unwind_opcode): New function.
-	* elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
-	(_bfd_mips_elf_cant_unwind_opcode): Declare.
-	(elf_backend_compact_eh_encoding): Define.
-	(elf_backend_cant_unwind_opcode): Define.
-	* elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
-	(elf_backend_cant_unwind_opcode): Provide default.
-	(elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
-	elf_backend_cant_unwind_opcode.
-	* section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
-
-2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18458
-	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
-	for now binding only if pointer equality isn't needed.
-	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
-	binding only if pointer equality isn't needed.
-	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
-	section for now binding only if pointer equality isn't needed.
-	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
-	binding only if pointer equality isn't needed.
-
-2015-05-26  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18437
-	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
-	in .rel.plt/.rela.plt.
-	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
-
-2015-05-19  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
-	relocation case labels alphabetically.
-	(elfNN_aarch64_final_link_relocate): Ditto.
-	(elfNN_aarch64_tls_relax): Ditto.
-	(elfNN_aarch64_relocate_section): Ditto.
-	(elfNN_aarch64_gc_sweep_hook): Ditto.
-	(elfNN_aarch64_check_relocs): Ditto.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
-	(_bfd_aarch64_elf_resolve_relocation): Ditto.
-
-2015-05-18  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
-	comments.
-
-2015-05-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
-	for now binding.
-	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
-	binding.
-	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
-	section for now binding.
-	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
-	binding.
-
-2015-05-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfd.c (bfd_update_compression_header): Also write the zlib
-	header if the SHF_COMPRESSED bit cleared..
-	(bfd_check_compression_header): Return the uncompressed size.
-	* compress.c (decompress_contents): Don't skip the zlib header.
-	(bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
-	which doesn't have the zlib header.
-	(bfd_init_section_decompress_status): Likewise.
-	(bfd_get_full_section_contents): Updated.
-	(bfd_is_section_compressed): Likewise.
-	(bfd_is_section_compressed_with_header): Return the uncompressed
-	size.
-	* elf.c (_bfd_elf_make_section_from_shdr): Updated.
-	* bfd-in2.h: Regenerated.
-
-2015-05-14  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
-	check restrictions.
-
-2015-05-14  Max Filippov  <jcmvbkbc@gmail.com>
-
-	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
-	as GOT reference when plt.refcount is not positive.
-
-2015-05-12  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
-	for the first .plt entry only if needed.
-	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
-
-2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
-	(ALL_MACHINES_CFILES): Likewise.
-	* archures.c (bfd_mach_iamcu): New.
-	(bfd_mach_i386_iamcu): Likewise.
-	(bfd_mach_i386_iamcu_intel_syntax): Likewise.
-	(bfd_iamcu_arch): Likewise.
-	(bfd_archures_list): Add &bfd_iamcu_arch.
-	* config.bfd (targ_selvecs): Add iamcu_elf32_vec to
-	i386_elf32_vec.
-	(targ_archs): Add bfd_iamcu_arch if needed.
-	* configure.ac: Support iamcu_elf32_vec.
-	* cpu-iamcu.c: New file.
-	* elf32-i386.c (elf32_iamcu_elf_object_p): New function.
-	Add support for iamcu_elf32_vec and elf32_iamcu_bed.
-	* targets.c (iamcu_elf32_vec): New.
-	(_bfd_target_vector): Add iamcu_elf32_vec.
-	* Makefile.in: Regenerated.
-	* bfd-in2.h: Likewise.
-	* configure: Likewise.
-
-2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
 
-2015-05-10  H.J. Lu  <hongjiu.lu@intel.com>
+2017-02-28  Alan Modra  <amodra@gmail.com>
 
-	* elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
-	and output_bfd with abfd.
-	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
-
-2015-05-06  Toni Spets  <toni.spets@iki.fi>
-
-	PR ld/18372
-	* peXXigen.c (rsrc_process_section): Skip discarded resource
-	sections.
-
-2015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config.bfd: Support i[3-7]86-*-elf*.
-
-2015-04-30  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_backend_post_process_headers): Undef for
-	Solaris 2.
-
-2015-04-30  Nick Clifton  <nickc@redhat.com>
-
-	PR 18317
-	* elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
-	mep_reloc.
-	(mep_reloc): Delete unused function.
-
-2015-04-29  Nick Clifton  <nickc@redhat.com>
-
-	PR 17099
-	* coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
+	* elflink.c (_bfd_elf_create_dynamic_sections): Don't make
+	dynamic .data.rel.ro read-only.
+	* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
+	rather than section flags when deciding where copy reloc goes.
+	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
+	* elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
+	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
+	* elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
+	* elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
+	* elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
+	* elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
+	* elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
+	* elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
+	* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+	* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
+	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
+	* elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
+	* elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
+	* elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
+
+2017-02-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_perform_relocation): Also handle the
+	`jalr $0, $25' instruction encoding.
+
+2017-02-27  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/21180
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
+	generating a seg-fault when encountering a symbol that has been
+	deleted by garbage collection.
+
+2017-02-25  Alan Modra  <amodra@gmail.com>
+
+	* elf32-arc.c (struct dynamic_sections): Delete.
+	(enum dyn_section_types): Delete.
+	(dyn_section_names): Delete.
+	(arc_create_dynamic_sections): Delete.
+	(elf_arc_finish_dynamic_sections): Don't call the above.  Don't
+	segfault on discarded .rela.plt section.
+	(elf_arc_size_dynamic_sections): Formatting.  Don't call
+	arc_create_dynamic_sections.  Don't allocate memory for sections
+	handled by the generic linker.  Correct code finding relocs in
+	read-only sections.  Set SEC_EXCLUDE on zero size .got,
+	.got.plt, and .dynbss sections.  Do set .interp for pies.
+
+2017-02-24  Andrew Waterman  <andrew@sifive.com>
+
+	* elfnn-riscv.c (GP_NAME): New macro.
+	(riscv_global_pointer_value): Use it.
+	(_bfd_riscv_relax_lui): If symbol and global pointer are in same
+	output section, consider only that section's alignment.
+
+2017-02-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
+	* elfxx-mips.c (_bfd_mips_relax_section): Remove function.
+	* elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
+	* elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
+
+2017-02-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
+	<R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
+	or misaligned.
+
+2017-02-23  Alan Modra  <amodra@gmail.com>
+
+	PR 20744
+	* elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
+	16D relocations.
+	(ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
+	(ppc_elf_relocate_section): Correct calculation for VLE SDAREL
 	relocs.
 
-2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
-
-	* elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
-	* elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
-	elf_s390_merge_obj_attributes.
-	* elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
-
-2015-04-24  Jiong Wang  <jiong.wang@arm.com>
-
-	PR ld/18270
-	* elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
-	GOT_NORMAL for both sgot/srelgot section.
-	(elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
-	and generate necessary runtime relocation for GOT entry.
-
-2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18209
-	* archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
-
-2015-04-24  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
-	PC-relative relocation for external symbol.
-
-2015-04-24  Nick Clifton  <nickc@redhat.com>
-
-	PR 18313
-	* compress.c (decompress_contents): Zero initialse the z_stream
-	structure.
-
-2015-04-24  Nick Clifton  <nickc@redhat.com>
-
-	* elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
-	local labels to include local labels with a numeric suffix and
-	fake symbols.
-
-2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18316
-	* section.c (SEC_MEP_VLIW): New.
-	* bfd-in2.h: Regenerated.
-
-2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18277
-	* compress.c (bfd_compress_section_contents): Remove the
-	write_compress argument.
-	(bfd_init_section_compress_status): Updated.
-	(bfd_compress_section): Likewise.
-	* elf.c (_bfd_elf_set_reloc_sh_name): New.
-	(_bfd_elf_init_reloc_shdr): Add delay_st_name_p.  Set sh_name
-	to (unsigned int) -1 if delay_st_name_p is TRUE.  Use
-	_bfd_elf_set_reloc_sh_name.
-	(elf_fake_sections): Don't rename DWARF debug section for
-	linker output if it will be compressed.  Instead, set
-	delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
-	(assign_section_numbers): Call _bfd_elf_strtab_addref only if
-	sh_name != (unsigned int) -1.  Don't finalize nor assign
-	shstrtab section here.  Delay setting output section names to
-	_bfd_elf_write_object_contents.
-	(_bfd_elf_compute_section_file_positions): Update comments on
-	sh_offset for shstrtab section.
-	(assign_file_positions_for_non_load_sections): Set sh_offset to
-	-1 for shstrtab section.
-	(assign_file_positions_except_relocs): Likewise.
-	(_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
-	when compressing DWARF debug sections.  Place shstrtab section
-	after DWARF debug sections have been compressed.
-	(_bfd_elf_write_object_contents): Setting sh_name for output
-	sections.
-
-2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18209
-	* bfd.c (bfd): Add is_linker_input.
-	* elf.c (convert_debug_to_zdebug): New.
-	(convert_zdebug_to_debug): Likewise.
-	(_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
-	.zdebug_* here.  Use convert_zdebug_to_debug.  Set SEC_ELF_RENAME.
-	(_bfd_elf_init_reloc_shdr): Pass a pointer to section name
-	instead of a pointer to section.
-	(elf_fake_sections): Rename the section name if SEC_ELF_RENAME
-	is set.
-	* section.c (SEC_ELF_RENAME): New.
-	* bfd-in2.h: Regenerated.
-
-2015-04-23  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (TOC_BASE_ALIGN): Define.
-	(ppc64_elf_next_toc_section): Align multi-got toc base.
-	(ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
-=======
-2015-05-04  Catherine Moore  <clm@codesourcery.com>
-
-	* elfxx-target.h: Add missing #endif.
-
-2015-04-22  Catherine Moore  <clm@codesourcery.com>
-
-	* elf-eh-frame.c (_bfd_elf_write_section_eh_frame_entry):  Don't write
-	the .eh_frame_entry section if the corresponding text section is marked
-	with SEC_EXCLUDE.
-
-2015-04-22  Catherine Moore  <clm@codesourcery.com>
-	    Bernd Schmidt <bernds@codesourcery.com>
-	    Paul Brook <paul@codesourcery.com>
-
-	* bfd-in2.h (SEC_INFO_TYPE_EH_FRAME_ENTRY): Define.
-	* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
-	(COMPACT_EH_CANT_UNWIND_OPCODE): Define.
-	(dwarf_eh_frame_hdr_info): New struct.
-	(compact_eh_frame_hdr_info): New struct.
-	(eh_frame_hdr_info): Separate dwarf and compact fields.
-	(elf_backend_data): Add compact_eh_encoding and cant_unwind_opcode
-	fields.
-	(bfd_elf_section_data): Add eh_frame_entry field.
-	(elf_section_eh_frame_entry): Define.
-	(bfd_elf_parse_eh_frame_entries): Declare.
-	(_bfd_elf_parse_eh_frame_entry): Declare.
-	(_bfd_elf_end_eh_frame_parsing): Declare.
-	(_bfd_elf_write_section_eh_frame_entry): Declare.
-	(_bfd_elf_fixup_eh_frame_hdr): Declare.
-	(_bfd_elf_eh_frame_entry_present): Declare.
-	(_bfd_elf_section_for_symbol): Declare.
-	* elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
-	(bfd_elf_record_eh_frame_entry): New function.
-	(_bfd_elf_parse_eh_frame_entry): New function.
-	(_bfd_elf_parse_eh_frame): Update hdr_info field references.
-	(cmp_eh_frame_hdr): New function.
-	(add_eh_frame_hdr_terminator): New function.
-	(_bfd_elf_end_eh_frame_parsing): New function.
-	(find_merged_cie): Update hdr_info field references.
-	(_bfd_elf_discard_section_eh_frame): Likewise.
-	(_bfd_elf_discard_section_eh_frame_hdr): Likewise.
-	Add Compact EH support.
-	(_bfd_elf_eh_frame_entry_present): New function.
-	(_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
-	(_bfd_elf_write_section_eh_frame_entry): New function.
-	(_bfd_elf_write_section_eh_frame): Update hdr_info field references.
-	(_bfd_elf_write_section_eh_frame): Likewise.
-	(_bfd_elf_fixup_eh_frame_hdr): New function.
-	(write_compact_eh_frame_hdr): New function.
-	(_bfd_elf_write_section_eh_frame_hdr): Compact EH support.  Update
-	hdr_info field references.
-	* elflink.c (_bfd_elf_section_for_symbol): New function.
-	(elf_section_ignore_discarded_relocs, elf_link_input_bfd):
-	Handle SEC_INFO_TYPE_EH_FRAME_ENTRY.
-	(bfd_elf_final_link): Call _bfd_elf_fixup_eh_frame_hdr.
-	(_bfd_elf_gc_mark):  Support Compact EH.
-	(bfd_elf_parse_eh_frame_entries): New function.
-	(bfd_elf_gc_sections): Support Compact EH.
-	(bfd_elf_discard_info): Likewise.
-	* elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding): New function.
-	(_bfd_mips_elf_cant_unwind_opcode): New function.
-	* elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
-	(_bfd_mips_elf_cant_unwind_opcode): Declare.
-	(elf_backend_compact_eh_encoding): Define.
-	(elf_backend_cant_unwind_opcode): Define.
-	* elfxx-target.h (elf_backend_compact_eh_encoding):
-	Provide default definition.
-	(elf_backend_cant_unwind_opcode): Provide default definition.
-	* section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Define.
->>>>>>> 2015-05-04  Catherine Moore  <clm@codesourcery.com>
-
-2015-04-22  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18289
-	* elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
-	(elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
-	(elf_i386_create_dynamic_sections): Always allow copy relocs for
-	building executables.
-	(elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
-	(elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
-	(elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
-	PIE and R_386_GOTOFF.
-	(elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
-
-2015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf.c (assign_section_numbers): Always set up sh_name.
-
-2015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf.c (assign_file_positions_for_non_load_sections): Iterate
-	sections by pointer.
-	(_bfd_elf_assign_file_positions_for_non_load): Likewise.
-
-2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfd-in.h (compressed_debug_section_type): New.
-	* compress.c (bfd_compress_section_contents): Add an argument
-	for linker write compression and always generate .zdebug_*
-	section when linking.
-	(bfd_init_section_compress_status): Pass FALSE to
-	bfd_compress_section_contents.
-	(bfd_compress_section): New function.
-	* elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
-	on DWARF debug sections if COMPRESS_DEBUG is set and rename
-	section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
-	(assign_file_positions_for_non_load_sections): Set sh_offset
-	to -1 if SEC_ELF_COMPRESS is set.
-	(assign_file_positions_except_relocs): Likwise.
-	(_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
-	(_bfd_elf_assign_file_positions_for_non_load): This.  Change
-	return time to bfd_boolean.  Compress the section if
-	SEC_ELF_COMPRESS is set.
-	(_bfd_elf_write_object_contents): Updated.
-	(_bfd_elf_set_section_contents): Write section contents to
-	the buffer if SEC_ELF_COMPRESS is set.
-	* merge.c: Include "elf-bfd.h".
-	(sec_merge_emit): Add arguments for contents and offset.  Write
-	to contents with offset if contents isn't NULL.
-	(_bfd_write_merged_section): Write section contents to the
-	buffer if SEC_ELF_COMPRESS is set.  Pass contents and
-	output_offset to sec_merge_emit.
-	* elflink.c (bfd_elf_final_link): Allocate the buffer for
-	output section contents if SEC_ELF_COMPRESS is set.
-	* section.c (SEC_ELF_COMPRESS): New.
-	* bfd-in2.h: Regenerated.
-
-2015-04-15  Alan Modra  <amodra@gmail.com>
-
-	* elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
+2017-02-22  Maciej W. Rozycki  <macro@imgtec.com>
 
-2015-04-14  Nick Clifton  <nickc@redhat.com>
+	PR ld/20828
+	* elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
+	processing ahead of the call to `elf_gc_sweep_symbol'.
 
-	* elf32-rl78.c (RL78_OP_REL): New macro.
-	(rl78_elf_howto_table): Use it for complex relocs.
-	(get_symbol_value): Handle the cases when the info or status
-	arguments are NULL.
-	(get_romstart): Cache the status returned by get_symbol_value.
-	(get_ramstart): Likewise.
-	(RL78_STACK_PUSH): Generate an error message if the stack
-	overflows.
-	(RL78_STACK_POP): Likewise for underflows.
-	(rl78_compute_complex_reloc): New function.  Contains the basic
-	processing code for all RL78 complex relocs.
-	(rl78_special_reloc): New function.  Provides special reloc
-	handling for complex relocs.
-	(rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
-	(rl78_offset_for_reloc): Likewise.
-
-2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/pr17709
-	* elflink.c (_bfd_elf_adjust_dynamic_copy): Check
-	info->extern_protected_data when warning copy relocs against
-	protected symbols.
-	(_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
-	when checking protected non-function symbols.
-
-2015-04-13  John Baldwin  <jhb@FreeBSD.org>
-
-	* elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
-	FreeBSD.
-	(elfcore_write_xstatereg): Use correct note name on FreeBSD.
-
-2015-04-13  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18250
-	* elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
-	if the object has been claimed by plugin.
-
-2015-04-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
-	with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
-	protected data symbol when building shared library.
-	* elf64-x86-64.c (elf_x86_64_relocate_section): Check
-	R_X86_64_GOTOFF64 against undefined symbol and replace
-	SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
-	R_X86_64_GOTOFF64 against protected data symbol when building
-	shared library.
-
-2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/pr17709
-	* elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
-	against protected data symbol when building shared library.
-	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
-	R_X86_64_GOTOFF64 against protected data symbol when building
-	shared library.
-
-2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/pr15228
-	PR ld/pr17709
-	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
-	* elf32-i386.c (elf_backend_extern_protected_data): New.
-	Defined to 1.
-	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
-	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
-	copy relocs against protected symbols if extern_protected_data
-	is true.
-	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
-	non-function symbols if extern_protected_data is true.
-	* elfxx-target.h (elf_backend_extern_protected_data): New.
-	Default to 0.
-	(elfNN_bed): Initialize extern_protected_data with
-	elf_backend_extern_protected_data.
-
-2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* compress.c (bfd_compress_section_contents): Replace bfd_malloc
-	and free with bfd_alloc and bfd_release on compressed buffer.
-	Release buffer if compressed section isn't smaller.
-
-2015-04-10  Alan Modra  <amodra@gmail.com>
-
-	PR ld/18222
-	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
-	on adding a protected visibility variable to .dynbss.
-
-2015-04-10  Alan Modra  <amodra@gmail.com>
-
-	Revert 2015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
-	PR ld/pr15228
-	PR ld/pr17709
-	* elf-bfd.h (elf_backend_data): Delete extern_protected_data.
-	* elf32-i386.c (elf_backend_extern_protected_data): Delete.
-	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
-	* elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
-	extern_protected_data test.
-	(_bfd_elf_symbol_refs_local_p): Likewise.
-	* elfxx-target.h (elf_backend_extern_protected_data): Delete.
-	(elfNN_bed): Delete elf_backend_extern_protected_data init.
-
-2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* compress.c (bfd_compress_section_contents): Update comments.
-	(bfd_init_section_decompress_status): Likewise.
-	(bfd_init_section_compress_status): Likewise.
-
-2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
-	object_flags.
-	(TARGET_LITTLE_SYM): Likewise.
-
-2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
-
-	* elf32-xtensa.c (splay-tree.h): include header.
-	(text_action_struct): drop next pointer.
-	(text_action_list_struct): drop head pointer, add count and
-	tree fields.
-	(find_fill_action): instead of linear search in text_action_list
-	search in the tree.
-	(text_action_compare, action_first, action_next): new functions.
-	(text_action_add, text_action_add_literal): instead of linear
-	search and insertion insert new node into the tree.
-	(removed_by_actions): pass additional parameter: action_list,
-	use it to traverse the tree.
-	(offset_with_removed_text): pass additional action_list parameter
-	to removed_by_actions.
-	(map_action_fn_context): new typedef.
-	(map_action_fn_context_struct): new structure.
-	(map_action_fn): new function.
-	(map_removal_by_action): use splay_tree_foreach to build map.
-	(find_insn_action): replace linear search in text_action_list
-	with series of splay_tree_lookups.
-	(print_action, print_action_list_fn): new functions.
-	(print_action_list): use splay_tree_foreach.
-	(init_xtensa_relax_info): drop action_list.head initialization.
-	Initialize the tree.
-	(compute_text_actions): use non-zero action_list_count instead of
-	non-NULL action list.
-	(xlate_map_context): new typedef.
-	(xlate_map_context_struct): new structure.
-	(xlate_map_fn): new function.
-	(build_xlate_map): use splay_tree_foreach to build map.
-	(action_remove_bytes_fn): new function.
-	(relax_section): use zero action_list_count instead of NULL
-	action list. Use splay_tree_foreach to count final section size.
-	Drop unused variable 'removed'.
-
-2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
-
-	* elf32-xtensa.c (removed_literal_map_entry): new typedef.
-	(removed_literal_map_entry_struct): new structure.
-	(removed_literal_list_struct): add new fields: n_map and map.
-	(map_removed_literal, removed_literal_compare): new functions.
-	(find_removed_literal): build index array for literals ordered
-	by VMA, use binary search to find removed literal.
-
-2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
-
-	* elf32-xtensa.c (removal_by_action_entry_struct,
-	removal_by_action_map_struct): new structures.
-	(removal_by_action_entry, removal_by_action_map): new typedefs.
-	(text_action_list_struct): add new field: map.
-	(map_removal_by_action, removed_by_actions_map,
-	offset_with_removed_text_map): new functions.
-	(relax_section): replace offset_with_removed_text with
-	offset_with_removed_text_map.
-	(translate_reloc, relax_property_section, relax_section_symbols):
-	replace removed_by_actions with removed_by_actions_map.
-
-2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
-
-	* elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
-	reloc_range): new typedef.
-	(reloc_range_list_struct, reloc_range_list_entry_struct,
-	reloc_range_struct): new structures.
-	(reloc_range_compare, build_reloc_ranges,
-	reloc_range_list_append, reloc_range_list_remove,
-	reloc_range_list_update_range, free_reloc_range_list): new
-	functions.
-	(compute_text_actions): precompute relocation opcodes before the
-	loop. Add relevant_relocs variable, initialize it before the
-	loop, pass it to the check_section_ebb_pcrels_fit.
-	(check_section_ebb_pcrels_fit): add new parameter:
-	relevant_relocs. Update address range in the relevant_relocs if
-	it's non-NULL and iterate only over relevant relocations.
-
-2015-04-09  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-rx.c (describe_flags): Report the settings of the string
-	insn using bits.
-	(rx_elf_merge_private_bfd_data): Handle merging of the string insn
-	using bits.
-
-2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* compress.c (bfd_compress_section_contents): Work around a GCC
-	uninitialized warning bug fixed in GCC 4.7.
-
-2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
-	bit.
-	* bfd.c (bfd::flags): Increase size to 18 bits.
-	(BFD_COMPRESS_GABI): New.
-	(BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
-	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
-	(bfd_update_compression_header): New fuction.
-	(bfd_check_compression_header): Likewise.
-	(bfd_get_compression_header_size): Likewise.
-	(bfd_is_section_compressed_with_header): Likewise.
-	* compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
-	(bfd_compress_section_contents): Return the uncompressed size if
-	the full section contents is compressed successfully.  Support
-	converting from/to .zdebug* sections.
-	(bfd_get_full_section_contents): Call
-	bfd_get_compression_header_size to get compression header size.
-	(bfd_is_section_compressed): Renamed to ...
-	(bfd_is_section_compressed_with_header): This.  Add a pointer
-	argument to return compression header size.
-	(bfd_is_section_compressed): Use it.
-	(bfd_init_section_decompress_status): Call
-	bfd_get_compression_header_size to get compression header size.
-	Return FALSE if uncompressed section size is 0.
-	* elf.c (_bfd_elf_make_section_from_shdr): Support converting
-	from/to .zdebug* sections.
-	* bfd-in2.h: Regenerated.
-
-2015-04-07  Alan Modra  <amodra@gmail.com>
+2017-02-22  Nick Clifton  <nickc@redhat.com>
 
-	* elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
-	mapped to output .got section.
+	PR binutils/21193
+	* opncls.c (bfd_create_gnu_debuglink_section): Give the newly
+	created section 4-byte alignment.
 
-2015-04-07  Alan Modra  <amodra@gmail.com>
+2017-02-22  Alan Modra  <amodra@gmail.com>
 
-	* elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
-	and has_addr16_lo.  Make has_sda_refs a bitfield.
-	(ppc_elf_check_relocs): Set new flags.
-	(ppc_elf_link_hash_table_create): Update default_params.
-	(ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
-	where we won't be making .dynbss entries or editing code.  Set
-	params->pic_fixup when we'll edit code for protected var access.
-	(allocate_dynrelocs): Allocate got entry for edited code and
-	discard dyn_relocs.
-	(struct ppc_elf_relax_info): Add picfixup_size.
-	(ppc_elf_relax_section): Rename struct one_fixup to struct
-	one_branch_fixup.  Rename fixups to branch_fixups.  Size space for
-	pic fixups.
-	(ppc_elf_relocate_section): Edit non-PIC accessing protected
-	visibility variables to PIC.  Don't emit dyn_relocs for code
-	we've edited.
-	* elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
+	* elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
+	on .got or .plt output section being discarded by script.
+	* elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise.  Move
+	vxworks splt temp.
 
-2015-04-07  Nick Clifton  <nickc@redhat.com>
+2017-02-21  Alan Modra  <amodra@gmail.com>
 
-	* elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
-	local labels as local.
+	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
+	DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
 
-2015-04-06  H.J. Lu  <hongjiu.lu@intel.com>
+2017-02-20  Alan Modra  <amodra@gmail.com>
 
-	* compress.c (get_uncompressed_size): Removed.
-	(bfd_compress_section_contents): Use bfd_putb64 to write
-	uncompressed section size.
-	(bfd_init_section_decompress_status): Replace
-	get_uncompressed_size with bfd_getb64.
+	PR 21181
+	* elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
+	if DT_RELSZ/DT_RELASZ is zero.
 
-2015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
+2017-02-17  Nick Clifton  <nickc@redhat.com>
 
-	* elf.c (_bfd_elf_init_private_section_data): Also preserve the
-	SHF_COMPRESSED bit if not decompress.
+	* compress.c (bfd_get_full_section_contents): Remember to reduce
+	compressed size by the sizeof the compression header when
+	decompressing the contents.
 
-2015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
+2017-02-17  Pedro Alves  <palves@redhat.com>
 
-	* compress.c (get_uncompressed_size): New.  Extracted from ...
-	(bfd_init_section_decompress_status): This.  Use it.
+	* srec.c (Chunk): Rename to ...
+	(_bfd_srec_len): ... this.
+	(S3Forced): Rename to ...
+	(_bfd_srec_forceS3): ... this.
+	* objcopy.c: Adjust all references.
 
-2015-04-02  Andrew Turner  <andrew@freebsd.org>
+2017-02-17  Pedro Alves  <palves@redhat.com>
 
-	* config.bfd: Add aarch64-*-freebsd* target triple.
+	* archive.c (bsd_write_armap): Rename to ...
+	(_bfd_bsd_write_armap): ... this.
+	(coff_write_armap): Rename to ...
+	(_bfd_coff_write_armap): ... this.
+	* libbfd-in.h (bsd_write_armap): Rename to ...
+	(_bfd_bsd_write_armap): ... this.
+	(coff_write_armap): Rename to ...
+	(_bfd_coff_write_armap): ... this.
+	* aout-target.h, aout-tic30.c: Adjust all users.
+	* libbfd.h: Regenerate.
 
-2015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
+2017-02-17  Pedro Alves  <palves@redhat.com>
 
-	* configure: Regenerated.
+	* bfd-in.h (bfd_read, bfd_write): Adjust to rename.
+	(warn_deprecated): Rename to ...
+	(_bfd_warn_deprecated): ... this.
+	* libbfd.c (warn_deprecated): Rename to ...
+	(_bfd_warn_deprecated): ... this.
+	* bfd-in2.h: Regenerate.
 
-2015-04-01  Tejas Belagod  <tejas.belagod@arm.com>
-	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
-	    Jiong Wang  <jiong.wang@arm.com>
+2017-02-17  Pedro Alves  <palves@redhat.com>
 
-	* bfd-in.h (bfd_elf64_aarch64_set_options)
-	(bfd_elf32_aarch64_set_options): Add parameter.
-	* bfd-in2.h: Regenerated.
-	* elfnn-aarch64.c (aarch64_erratum_843419_stub)
-	(_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
-	(_bfd_aarch64_erratum_843419_stub_name)
-	(_bfd_aarch64_erratum_843419_fixup)
-	(_bfd_aarch64_erratum_843419_scan)
-	(_bfd_aarch64_erratum_843419_branch_to_stub)
-	(_bfd_aarch64_erratum_843419_p): Define.
-	(enum elf_aarch64_stub_type): Define
-	aarch64_stub_erratum_843419_veneer.
-	(struct elf_aarch64_stub_hash_entry): Define adrp_offset.
-	(struct elf_aarch64_link_hash_table): Define fix_erratum_843419
-	and fix_erratum_843419_adr.
-	(stub_hash_newfunc): Initialize adrp_offset;
-	(_bfd_aarch64_add_stub_entry_after): Define.
-	(aarch64_map_one_stub, aarch64_build_one_stub)
-	(aarch64_size_one_stub): Handle
-	aarch64_stub_erratum_843419_veneer.
-	(_bfd_aarch64_resize_stubs): Round stub section size.
-	(elfNN_aarch64_size_stubs): Add scan for 843419.
-	(bfd_elfNN_aarch64_set_options): Add parameter. Initialize
-	fix_erratum_843419 and fix_erratum_843419_adr.
-	(struct erratum_835769_branch_to_stub_data): Add info.
-	(elfNN_aarch64_write_section): Initialise info.  Handle 843419.
-	(elfNN_aarch64_size_dynamic_sections): Handle 843419.
-	* elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
-	(_bfd_aarch64_sign_extend): Define.
-	(reencode_adr_imm): Remove static. Rename to:
-	(_bfd_aarch64_reencode_adr_imm): Define.
-	(_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
-	* elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
-	(AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
-	(_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
-	Define.
-
-2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* configure: Regenerated.
-
-2015-03-31  Ed Schouten  <ed@nuxi.nl>
-
-	* config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
-	for x86_64-*-cloudabi*.
-	* configure.ac: Handle x86_64_elf64_cloudabi_vec.
-	* configure: Regenerated.
-	* elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
-	(TARGET_LITTLE_NAME): Likewise.
-	(ELF_OSABI): Likewise.
-	(elf64_bed): Likewise.
-	* targets.c (x86_64_elf64_cloudabi_vec): New.
-	(_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
-
-2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* configure.ac: Revert the AM_ZLIB change.
-	* Makefile.in: Regenerated.
-	* aclocal.m4: Likewise.
-	* configure: Likewise.
-	* doc/Makefile.in: Likewise.
-
-2015-03-30  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18169
-	* elf-bfd.h (elf_backend_data): Add get_reloc_section.
-	(_bfd_elf_get_reloc_section): New.
-	* elf.c (_bfd_elf_get_reloc_section): Likewise.
-	(assign_section_numbers): Call get_reloc_section to look up the
-	section the relocs apply.
-	* elfxx-target.h (elf_backend_get_reloc_section): Likewise.
-	(elfNN_bed): Initialize get_reloc_section with
-	elf_backend_get_reloc_section.
-
-2015-03-29  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.am (ZLIB): New.
-	(ZLIBINC): Likewise.
-	(AM_CFLAGS): Add $(ZLIBINC).
-	(libbfd_la_LIBADD): Add $(ZLIB).
-	* compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
-	(decompress_contents): Don't check HAVE_ZLIB_H.
-	(bfd_compress_section_contents): Likewise.
-	(bfd_get_full_section_contents): Likewise.
-	(bfd_init_section_decompress_status): Likewise.
-	(bfd_init_section_compress_status): Likewise.
-	* configure.ac (AM_ZLIB): Removed.
-	(zlibdir): New.  AC_SUBST.
-	(zlibinc): Likewise.
-	Add --with-system-zlib.
-	* Makefile.in: Regenerated.
-	* acinclude.m4: Likewise.
-	* config.in: Likewise.
-	* configure: Likewise.
-	* doc/Makefile.in: Likewise.
-
-2015-03-27  Alan Modra  <amodra@gmail.com>
-
-	PR ld/15228
-	PR ld/18167
-	* elflink.c (elf_merge_st_other): Add "sec" parameter.  Don't set
-	protected_def when symbol section is read-only.  Adjust all calls.
-	* elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
-
-2015-03-26  Tejas Belagod  <tejas.belagod@arm.com>
-
-	* elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
-	_bfd_final_link_relocate with aarch64_relocate.
-
-2015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/18160
-	* elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
-	(bfd_elf_gc_sections): Likewise.
-
-2015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
-	size for initial branch.
-	(elfNN_aarch64_build_stubs): Write initial branch.
-	_bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
-	mapping symbol on initial branch.
-
-2015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
-	Update erratum count.
-
-2015-03-25  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
-
-	* elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
-	first matching debug section.
-
-2015-03-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR gas/18087
-	* compress.c (bfd_compress_section_contents): Don't write the
-	zlib header and set contents as well as compress_status if
-	compression didn't make the section smaller.
-	(bfd_init_section_compress_status): Don't check compression
-	size here.
-
-2015-03-24  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffgen.c (coff_get_normalized_symtab): Fix test for out of
-	range auxillary sections.
-
-2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
-	code into:
-	(_bfd_aarch64_get_stub_for_link_section): Define.
-
-2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
-	update of section_group[].stub_sec.
-
-2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
-	(erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
-	Delete fixes, fix_table_size and associated code.  Call
-	_bfd_aarch64_add_stub_entry_in_group. Rename to...
-	(bfd_aarch64_erratum_835769_scan): Define.
-	(elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
-	erratum_835769_fix_table_size, i and associated code.  Relocate
-	call to _bfd_aarch64_erratum_835769_scan.  Delete adhoc stub size
-	correction.  Delete construction of stub entry from
-	erratum_835769_fixes array.
-
-2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
-	_bfd_aarch64_add_stub_entry_in_group.
-
-2015-03-24  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
-	stubs, even those for undefined weak symbols.  Otherwise, don't
-	report relocation overflow on branches to undefined strong
-	symbols.  Fix memory leak.
-	* elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
-	overflow on branches to undefined strong symbols.
-
-2015-03-23  Keith Seitz  <keiths@redhat.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
-	missing ';'.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (erratum_835769_scan): Factor stub name
-	construction into...
-	(_bfd_aarch64_erratum_835769_stub_name): Define.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
-	stub resize code into...
-	(bfd_aarch64_resize_stubs): Define.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
-	creation code into...
-	(bfd_aarch64_create_stub_section): Define.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
-	from elf_aarch64_create_or_find_stub_sec.
-	(_bfd_aarch64_add_stub_entry_in_group): Rename from
-	elfNN_aarch64_add_stub.  Call
-	_bfd_aarch64_create_or_find_stub_sec.
-	(elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
-	_bfd_aarch64_add_stub_entry_in_group.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (erratum_835769_scan) Add comment.  Reverse
-	sense of boolean return.
-	(elfNN_aarch64_size_stubs): Adjust for above.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
-	Remove unused parameter.
-	(elfNN_aarch64_size_stubs): Adjust for above.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (aarch64_erratum_835769_fixes)
-	(num_aarch64_erratum_835769_fixes): Remove.
-	(elfNN_aarch64_size_stubs): Remove assignments to above.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
-	to rt2.
-	(aarch64_erratum_seqeunce): Rename rtn to rt2.
-
-2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
-
-2015-03-19  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-rl78.c (rl78_cpu_name): New function.  Prints the name of
-	the RL78 core based upon the flags.
-	(rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
-	flags.
-	(rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
-	(elf32_rl78_machine): Always return bfd_mach_rl78.
-
-2015-03-19  Nick Clifton  <nickc@redhat.com>
-
-	PR 18078
-	* compress.c (bfd_compress_section_contents): Do not define this
-	function if it is not used.
-
-2015-03-18  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* compress.c (bfd_compress_section_contents): Make it static.
-	* bfd/bfd-in2.h: Regenerated.
-
-2015-03-18  Eric Youngdale  <eyoungdale@ptc.com>
-
-	PR ld/16598
-	* peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
-	suitable for the AMD64.
-
-2015-03-18  Jon Turney  <jon.turney@dronecode.org.uk>
-	    Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/18087
-	* coffgen.c (make_a_section_from_file): Only prepend a z to a
-	debug section's name if the section was actually compressed.
-	* elf.c (_bfd_elf_make_section_from_shdr): Likewise.
-	* compress.c (bfd_init_section_compress_status): Do not compress
-	the section if doing so would make it bigger.  In such cases leave
-	the section alone and return COMPRESS_SECTION_NONE.
-
-2015-03-17  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
-	on nothing to do, before malloc of returned symbol array.
-
-2015-03-16  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
-	stored in the elf_section_data structure then load them as
-	necessary.
-
-2015-03-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
-
-	* elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
-	relocs against code sections.
-	* elf32-s390.c: Define elf_backend_sort_relocs_p.
-	* elf64-s390.c: Likewise.
-
-2015-03-11  Alan Modra  <amodra@gmail.com>
-
-	* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
-	reverse order.  Account for larger size of __tls_get_addr_opt stub.
-
-2015-03-10  Yuri Gribov  <y.gribov@samsung.arm>
-
-	PR ld/16572
-	* elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
-	ELF_ARM_HASENTRY.
-	(elf32_arm_print_private_bfd_data): Likewise.
-
-2015-03-06  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17765
-	* elflink.c (put_value): Like previous delta, but for the 32-bit
-	case.
-
-2015-03-05  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17765
-	* elflink.c (put_value): Avoid using an undefined shift
-	operation.
-
-2015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/pr15228
-	PR ld/pr17709
-	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
-	* elf32-i386.c (elf_backend_extern_protected_data): New.
-	Defined to 1.
-	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
-	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
-	copy relocs against protected symbols if extern_protected_data
-	is true.
-	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
-	non-function symbols if extern_protected_data is true.
-	* elfxx-target.h (elf_backend_extern_protected_data): New.
-	Default to 0.
-	(elfNN_bed): Initialize extern_protected_data with
-	elf_backend_extern_protected_data.
-
-2015-03-05  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/18025
-	* coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
-	lookup fails, check for an address bias in the dwarf info, and if
-	one exists, retry the lookup with the biased value.
-	* dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
-	Determines if a bias exists bewteen the addresses of functions
-	based on DWARF information vs symbol table information.
-	* libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
+	* bfdio.c (real_ftell): Rename to ...
+	(_bfd_real_ftell): ... this.
+	(real_fseek): Rename to ...
+	(_bfd_real_fseek): ... this.
+	(real_fopen): Rename to ...
+	(_bfd_real_fopen): ... this.
+	* libbfd-in.h (real_ftell): Rename to ...
+	(_bfd_real_ftell): ... this.
+	(real_fseek): Rename to ...
+	(_bfd_real_fseek): ... this.
+	(real_fopen): Rename to ...
+	(_bfd_real_fopen): ... this.
+	* cache.c, dwarf2.c, opncls.c: Adjust all callers.
 	* libbfd.h: Regenerate.
 
-2015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
-	(decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
-	(decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
-
-2015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
-	(aarch64_size_one_stub): Likewise.
-	(aarch64_map_one_stub): Likewise.
-
-2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* cpu-s390.c (N): New macro.
-	(bfd_s390_31_arch): New.  Define only if default target word size
-	is 64 bits.  Otherwise define...
-	(bfd_390_64_arch): ...this.  Make static.
-	(bfd_s390_arch): Define according to the default target word size.
-	Let the 'next' field point to the alternate arch.
-
-2015-03-04  Richard Sandiford  <richard.sandiford@arm.com>
-
-	PR gas/17843
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
-	R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
-	to be used with MOVK rather than MOVZ.
-
-2015-03-03  DJ Delorie  <dj@redhat.com>
-
-	* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
-	there's a symbol.
-
-2015-02-28  Alan Modra  <amodra@gmail.com>
-
-	* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
-	not PLT_NEW.
-
-2015-02-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (need_convert_mov_to_lea): New.
-	(elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
-	(elf_i386_convert_mov_to_lea): Return TRUE if
-	need_convert_mov_to_lea is unset.
-	* elf64-x86-64.c (need_convert_mov_to_lea): New.
-	(elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
-	(elf_x86_64_convert_mov_to_lea): Return TRUE if
-	need_convert_mov_to_lea is unset.
-
-2015-02-27  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17910
-	* coffgen.c (_bfd_coff_internal_syment_name): Only check for
-	string length overflow when the string table length is actually
-	set.
-
-2015-02-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* bfd/bfd-in2.h: Regenerate.
-	* bfd/libbfd.h: Regenerate.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
-	TLSDESC_LD_PREL19 field width and masks.
-	(aarch64_tls_transition_without_check)
-	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
-	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
-	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
-	BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
-	(_bfd_aarch64_elf_resolve_relocation): Likewise.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
-	tests.
-	(aarch64_tls_transition_without_check)
-	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
-	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
-	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
-	BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
-	(_bfd_aarch64_elf_resolve_relocation): Likewise.
-	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
-	(elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
-	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
-	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
-	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
-	BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
-	(_bfd_aarch64_elf_resolve_relocation): Likewise.
-	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
-	(aarch64_tls_transition_without_check, aarch64_reloc_got_type)
-	(elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
-	(elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
-	(elfNN_aarch64_check_relocs): Handle
-	BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
-
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
-	(_bfd_aarch64_elf_resolve_relocation): Likewise.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
-	(TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
-	(TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
-	width.
-
-2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
-	field width.
-
-2015-02-26  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffcode.h (coff_compute_section_file_positions): Report
-	negative page sizes.
-	* elf.c (elf_fake_sections): Handle excessive alignmment powers.
-	(assign_file_positions_for_non_load_sections): Replace assertion
-	with an error message.
-	(rewrite_elf_program_header): Handle excessive segment
-	alignments.
-	* mach-o.c (bfd_mach_o_read_section_32): Likewise.
-	(bfd_mach_o_read_section_64): Likewise.
-	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
-	print a bfd name, not %A.
-
-2015-02-26  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
-	thread-safe stubs for iplt.
-	(build_tls_get_addr_stub): Restore r2 immediately after call.
-
-2015-02-26  Terry Guo  <terry.guo@arm.com>
-
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
-	merge Tag_ABI_HardFP_use.
-
-2015-02-26  Alan Modra  <amodra@gmail.com>
-
-	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
-	Use text relocs rather than giving an error on trying to use
-	.dynbss for protected shared lib vars.
-	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
-
-2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* elf32-avr.c (struct elf_avr_section_data): New structure.
-	(struct avr_relax_info): New structure.
-	(elf_avr_new_section_hook): New function.
-	(struct elf_avr_section_data): Add relax_info.
-	(get_avr_relax_info): New function.
-	(init_avr_relax_info): New function.
-	(elf32_avr_relax_delete_bytes): Find next property record before
-	deleting bytes.  When deleting don't move bytes beyond the next
-	property record.
-	(avr_elf32_assign_records_to_section): New function.
-	(avr_property_record_compare): New function.
-	(avr_load_all_property_sections): New function.
-	(elf32_avr_relax_section): Load property data.  After relaxing the
-	section, move any .align directives that have enough deleted bytes
-	before them.
-	(bfd_elf32_new_section_hook): Define.
-
-2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* elf32-avr.h (struct avr_property_header): New strucure.
-	(avr_elf32_load_property_records): Declare.
-	(avr_elf32_property_record_name): Declare.
-	* elf32-avr.c: Add bfd_stdint.h include.
-	(retrieve_local_syms): New function.
-	(get_elf_r_symndx_section): New function.
-	(get_elf_r_symndx_offset): New function.
-	(internal_reloc_compare): New function.
-	(struct avr_find_section_data): New structure.
-	(avr_is_section_for_address): New function.
-	(avr_find_section_for_address): New function.
-	(avr_elf32_load_records_from_section): New function.
-	(avr_elf32_load_property_records): New function.
-	(avr_elf32_property_record_name): New function.
-
-2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
-	(AVR_PROPERTY_RECORDS_VERSION): Define.
-	(AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
-	(struct avr_property_record): New structure.
-
-2015-02-24  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-v850.c (v850_set_note): New function.  Creates a Renesas
-	style note entry.
-	(v850_elf_make_note_section): New function.  Creates a note
-	section.
-	(v850_elf_create_sections): New function.  Create a note section
-	if one is not already present.
-	(v850_elf_set_note): New function.  Adds a note to a bfd.
-	(v850_elf_copy_private_bfd_data): New function.  Copies V850
-	notes.
-	(v850_elf_merge_notes): New function.  Merges V850 notes.
-	(print_v850_note): New function.  Displays a V850 note.
-	(v850_elf_print_notes): New function. Displays all notes attached
-	to a bfd.
-	(v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
-	(v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
-	(v850_elf_fake_sections): Set the type of the V850 note section.
-	* bfd-in.h (v850_elf_create_sections): Add prototype.
-	(v850_elf_set_note): Add prototype.
-	* bfd-in2.h: Regenerate.
-
-2015-02-24  Nick Clifton  <nickc@redhat.com>
+2017-02-17  Pedro Alves  <palves@redhat.com>
 
-	* configure.ac (AC_CHECK_HEADERS): Add wctype.h.
-	* configure: Regenerate.
-	* config.in: Regenerate.
-	* peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
-	(u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
-	(rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
-	is defined.
-
-2015-02-24  Nick Clifton  <nickc@redhat.com>
-
-	* pdp11.c (set_section_contents): Pad the .text and .data sections
-	to their aligned sizes.
-
-2015-02-23  Yoshinori Sato <ysato@users.sourceforge.jp>
-
-	* config.bfd: Add h8300-*-linux.
-	* configure.ac: Add h8300_elf32_linux_vec.
-	* configure: Regenerate.
-	* elf32-h8300.c: Likewise.
-	* targets.c(_bfd_target_vector): Likewise.
-
-2015-02-23  Nick Clifton  <nickc@redhat.com>
-
-	PR 17914
-	* cpu-w65.c: Correct typos in license notice.
-
-	PR 17940
-	* elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
-	symbols at end of sections.  Adjust function sizes.
-
-2015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
-	(elfcore_write_s390_vxrs_high): Likewise.
-	* elf.c (elfcore_grok_s390_vxrs_low): New function.
-	(elfcore_grok_s390_vxrs_high): New function.
-	(elfcore_grok_note): Call them.
-	(elfcore_write_s390_vxrs_low): New function.
-	(elfcore_write_s390_vxrs_high): New function.
-	(elfcore_write_register_note): Call them.
-
-2015-02-19  Branko Drevensek  <branko.drevensek@gmail.com>
-
-	PR 17995
-	* verilog.c (verilog_write_record): Correct buffer size.
-
-2015-02-19  Alan Modra  <amodra@gmail.com>
-
-	* elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
-
-2015-02-19  Alan Modra  <amodra@gmail.com>
-
-	PR ld/4317
-	* elflink.c (elf_link_input_bfd): Drop undefined local syms.
-	(elf_link_output_extsym): Drop local and global undefined syms.
-	Tidy.  Expand comment.
-
-2015-02-17  Alan Modra  <amodra@gmail.com>
-
-	PR ld/17975
-	* elflink.c (struct elf_outext_info): Remove need_second_pass
-	and second_pass.
-	(elf_link_output_extsym): Delete code handling second forced
-	local pass.  Move code emitting NULL STT_FILE symbol later, so
-	that it can be omitted if forced local is stripped.  Don't
-	emit the NULL STT_FILE if no file symbols have been output.
-	(bfd_elf_final_link): Remove second forced local pass.
-	* elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
-	(ppc_elf_size_dynamic_sections): Likewise.
-	* elf64-ppc.c (ppc_build_one_stub): Likewise.
-	(build_global_entry_stubs): Likewise.
-	(ppc64_elf_build_stubs): Likewise.
-
-2015-02-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/17975
-	* elflink.c (elf_link_output_extsym): Only check filesym_count
-	when outputting a NULL FILE symbol.  Set second_pass_sym to
-	h->forced_local && !h->root.linker_def.
-
-2015-02-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
-	on _TLS_MODULE_BASE_.
-	* elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
-
-2015-02-15  Alan Modra  <amodra@gmail.com>
-
-	* dwarf2.c (read_rangelist): Correct buffer overflow check
-	Whitespace throughout file.
-
-2015-02-14  Alan Modra  <amodra@gmail.com>
-
-	PR ld/17973
-	* bfd.c (struct bfd): Add lto_output.
-	* linker.c (_bfd_handle_already_linked): Explicitly test for
-	objects added by the lto plugin.
-	* opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
-	no_export flags from archive.
-	* archive.c (open_nested_file): New function, setting lto_output
-	and no_export, extracted from..
-	(find_nested_archive): ..here.  Flip params.  Rename from
-	_bfd_find_nested_archive.
-	(_bfd_get_elt_at_filepos): Correct var typo.  Use open_nested_file.
-	(_bfd_look_for_bfd_in_cache): Copy no_export.
-	* elflink.c (elf_link_add_object_symbols): Remove now unnecessary
-	my_archive->no_export test.
-	(elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
-	Don't use the file name when adding lto_output STT_FILE sym.
-	* bfd-in2.h: Regenerate.
+	* dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
+	* libbfd.c (read_unsigned_leb128): Rename to ...
+	(_bfd_read_unsigned_leb128): ... this.
+	(read_signed_leb128): Rename to ...
+	(_bfd_read_signed_leb128): ... this.
+	(safe_read_leb128): Rename to ...
+	(_bfd_safe_read_leb128): ... this.
+	* libbfd-in.h (read_unsigned_leb128): Rename to ...
+	(_bfd_read_unsigned_leb128): ... this.
+	(read_signed_leb128): Rename to ...
+	(_bfd_read_signed_leb128): ... this.
+	(safe_read_leb128): Rename to ...
+	(_bfd_safe_read_leb128): ... this.
+	* libbfd.h: Renegerate.
+
+2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
+	before trying to fine matching file and line information.
+
+2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
+	(_bfd_dwarf2_slurp_debug_info): If stashed debug information does
+	not match current bfd, then reload debug information.  Record bfd
+	we're loading debug info for in the stash.  If we have debug
+	informatin in the cache then perform section placement before
+	returning.
+
+2017-02-16  Alan Modra  <amodra@gmail.com>
+
+	PR 21000
+	* elf-bfd.h (struct elf_backend_data): Add no_page_alias.
+	* elfxx-target.h (elf_backend_no_page_alias): Define.
+	(elfNN_bed): Init new field.
+	* elf.c (assign_file_positions_for_load_sections): If no_page_alias
+	ensure PT_LOAD segment starts on a new page.
+	* elf32-hppa.c (elf_backend_no_page_alias): Define.
+
+2017-02-16  Alan Modra  <amodra@gmail.com>
+
+	PR 21132
+	* elf32-hppa.c (allocate_plt_static): Allocate space for relocs
+	if pic.
 
-2015-02-13  Alan Modra  <amodra@gmail.com>
+2017-02-16  Jiong Wang <jiong.wang@arm.com>
 
-	PR binutils/17512
-	* elf64-ppc.c (opd_entry_value): Tighten offset check.  Remove
-	now redundant assert.
-
-2015-02-12  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
-	(read_4_bytes, read_8_bytes, read_n_bytes, read_string)
-	(read_indirect_string, read_alt_indirect_string)
-	(read_alt_indirect_ref, read_address, read_abbrevs)
-	(read_attribute_value, read_attribute, decode_line_info)
-	(find_abstract_instance_name, read_rangelist)
-	(scan_unit_for_symbols, parse_comp_unit)
-	(_bfd_dwarf2_find_nearest_line): Harden DWARF reading code.  Pass
-	end pointers to reading functions and check for offsets taking
-	pointers out of range.  Replace calls to read_*_leb128 with calls
-	to safe_read_leb128.
-
-	(* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
-	offset.
-	* syms.c (_bfd_stab_section_find_nearest_line): Add checks for
-	computed file_name address being before the start of the string
-	table.
-
-2015-02-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/17878
-	* bfd.c (bfd_plugin_format): New.
-	(bfd): Add plugin_format and plugin_dummy_bfd.
-	* plugin.c (try_load_plugin): Take a pointer to bfd_boolean
-	argument to return TRUE if any plugin is found.  Set plugin_format.
-	(has_plugin): New.
-	(bfd_plugin_target_p): New.
-	(bfd_plugin_specified_p): Likewise.
-	(bfd_plugin_target_p): Likewise.
-	(register_ld_plugin_object_p): Likewise.
-	(bfd_plugin_set_plugin): Set has_plugin.
-	(load_plugin): Cache try_load_plugin result.
-	(bfd_plugin_object_p): Try ld_plugin_object_p first.  Check
-	plugin_format.
-	* plugin.h (bfd_plugin_target_p): New.
-	(bfd_plugin_specified_p): Likewise.
-	(register_ld_plugin_object_p): Likewise.
+	* bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
 	* bfd-in2.h: Regenerated.
 
-2015-02-11  Pedro Alves  <palves@redhat.com>
+2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
 
-	* libbfd-in.h [__cplusplus]: Open extern "C" scope.
-	* libcoff-in.h [__cplusplus]: Open extern "C" scope.
-	* libbfd.h: Regenerate.
-	* libcoff.h: Regenerate.
-
-	* elf-bfd.h [__cplusplus]: Wrap in extern "C".
-	* mach-o.h [__cplusplus]: Wrap in extern "C".
-	* som.h [__cplusplus]: Wrap in extern "C".
-
-2015-02-10  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffcode.h (styp_to_sec_flags): Use an unsigned long type to
-	hold the flag bits.
-	* peXXigen.c (pe_print_reloc): Use unsigned types to hold the
-	size and number of relocs.
-	(pe_print_debugdata): Use a 32-bit aligned buffer to store the
-	codeview record.
-	* versados.c (process_otr): Check the esdid value before using it
-	to access the EDATA.
-
-2015-02-09  Ed Maste  <emaste@freebsd.org>
-
-	* elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
-	uninitialized and unused variable.
-	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
-
-2015-02-09  Alan Modra  <amodra@gmail.com>
-
-	* elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
-	tls_sec.
-	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
-	* elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
-
-2015-02-09  Alan Modra  <amodra@gmail.com>
-
-	* elflink.c: Whitespace, formatting fixes.
-	(elf_link_input_bfd): Clarify comment.
-	(elf_link_output_extsym): Exclude symbols in linker created
-	sections when testing for plugin symbols.
-
-2015-02-07  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/17935
-	* elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
-	warning for relocation in readonly section for -z text.
-	(elf_i386_size_dynamic_sections): Likewise.
-	* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
-	(elf_x86_64_size_dynamic_sections): Likewise.
-
-2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/12365
-	PR ld/14272
-	* elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
-	(elf_link_input_bfd): Mark the plugin symbol undefined if it is
-	referenced from a non-IR file.
-
-2015-02-06  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* peXXigen.c (rsrc_print_resource_entries): Add range check for
-	addresses that wrap around the address space.
-	(rsrc_parse_entry): Likewise.
-
-2015-02-03  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/12365
-	PR ld/14272
-	* elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
-	undefined if it is referenced from a non-IR file.
-
-2015-02-03  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
-	(_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
-	index or an out of range fdr index.
-	* elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
-	* elf32-arc.c (arc_info_to_howto_rel): Likewise.
-	* elf32-avr.c (avr_info_to_howto_rela): Likewise.
-	* elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
-	* elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
-	* elf32-cris.c (cris_info_to_howto_rela): Likewise.
-	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
-	* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
-	* elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
-	* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
-	* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
-	* elf32-frv.c (frv_info_to_howto_rela): Likewise.
-	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
-	* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
-	* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
-	* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
-	* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
-	* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
-	* elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
-	* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
-	* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
-	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
-	* elf32-mep.c (mep_info_to_howto_rela): Likewise.
-	* elf32-metag.c (metag_info_to_howto_rela): Likewise.
-	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
-	* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
-	* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
-	* elf32-mt.c (mt_info_to_howto_rela): Likewise.
-	* elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
-	* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
-	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
-	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
-	* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
-	* elf32-rx.c (rx_info_to_howto_rela): Likewise.
-	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
-	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
-	* elf32-v850.c (v850_elf_perform_relocation): Likewise.
-	* elf32-vax.c (rtype_to_howto): Likewise.
-	* elf32-visium.c (visium_info_to_howto_rela): Likewise.
-	* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
-	* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
-	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
-	* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
-	* mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
-	(bfd_mach_o_canonicalize_one_reloc): Fix check on out
-	of range symbol indicies.
-	(bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
-	(bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
-	(bfd_mach_o_build_dysymtab): Likewise.
-	(bfd_mach_o_write_symtab_content): Set the string table size to
-	zero upon error.
-	(bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
-	read fails.
-	* peXXigen.c (pe_print_edata):  Check for numeric overflow in edt
-	fields.
-	* tekhex.c (first_phase): Check for src pointer reaching end of
-	buffer.
-
-2015-02-03  Will Newton  <will.newton@linaro.org>
-
-	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
-	Set st_value to zero for undefined symbols if the reference
-	is weak or pointer_equality_needed is FALSE.
-
-	* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
-	  comment discussing why we clear st_value for some symbols.
-
-2015-02-02  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
-
-	* elf32-nds32.c (nds32_get_section_contents): Add one more argument.
-	(nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
-
-2015-01-29  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
-	optimization.  Tidy mask for GOT_TLSGD optimization.
-	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.  Correct
-	location of nop zapping high insn too.
-
-2015-01-28  Alan Modra  <amodra@gmail.com>
-
-	* elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
-	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
-	in .toc indicate xlc compiled code that might require a rw .toc.
-
-2015-01-28  James Bowman  <james.bowman@ftdichip.com>
-
-	* Makefile.am: Add FT32 files.
-	* archures.c (enum bfd_architecture): Add bfd_arch_ft32.
-	(bfd_mach_ft32): Define.
-	(bfd_ft32_arch): Declare.
-	(bfd_archures_list): Add bfd_ft32_arch.
-	* config.bfd: Handle FT32.
-	* configure.ac: Likewise.
-	* cpu-ft32.c: New file.
-	* elf32-ft32.c: New file.
-	* reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
-	BFD_RELOC_FT32_18): Define.
-	* targets.c (_bfd_target_vector): Add ft32_elf32_vec.
-	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
-	* Makefile.in: Regenerate.
-	* configure: Regenerate.
-	* po/SRC-POTFILES.in: Regenerate.
-
-2015-01-27  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* pdp11.c (aout_get_external_symbols): Return false if there are
-	no symbols.
-
-	* dwarf2.c (concat_filename): Check for an empty directory table.
-	(scan_unit_for_symbols): Check for reading off the end of the
-	unit.
-	(parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
-	non-string form.
-	* elf64-ppc.c (opd_entry_value): Fail if there are no relocs
-	available.
-
-2015-01-26  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
-
-	* elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
-
-2015-01-22  DJ Delorie  <dj@redhat.com>
-
-	* elf32-m32c.c (m32c_apply_reloc_24): New.
-	(m32c_elf_howto_table): Use it for R_M32C_24.
-	(m32c_elf_relocate_section): Handle R_M32C_24 specially.
-
-2015-01-22  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffcode.h (handle_COMDAT): When searching for the section
-	symbol, make sure that there is space left in the symbol table.
-	* vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
-
-2015-01-21  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffcode.h (coff_set_arch_mach_hook): Check return value from
-	bfd_malloc.
-	(coff_slurp_line_table): Return FALSE if the line number
-	information was corrupt.
-	(coff_slurp_symbol_table): Return FALSE if the symbol information
-	was corrupt.
-	* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
-	initialise the fields of the dyld_info structure.
-	(bfd_mach_o_build_exec_seg_command): Replace assertion with an
-	error message and a return value.
-	(bfd_mach_o_layout_commands): Change the function to boolean.
-	Return FALSE if the function fails.
-	(bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
-	fails.
-	(bfd_mach_o_read_command): Fail if an unrecognised command is
-	encountered.
-	* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
-	read fails.
-	(slurp_symtab): Check the return from bfd_malloc.
-	(_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
-	encountered an error.
-	(_bfd_XXi_final_link_postscript): Fail if a section could not be
-	copied.
-	* peicode.h (pe_bfd_object_p): Fail if the header could not be
-	swapped in.
-	* tekhex.c (first_phase): Fail if the section is too big.
-	* versados.c (struct esdid): Add content_size field.
-	(process_otr): Use and check the new field.
-	(versados_get_section_contents): Check that the section exists and
-	that the requested data is available.
-
-2015-01-20  Chung-Lin Tang  <cltang@codesourcery.com>
-
-	* elf32-nios2.c (elf_backend_default_execstack): Define as 0.
-
-2015-01-20  Alan Modra  <amodra@gmail.com>
-
-	PR ld/17615
-	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
-	ELF_COMMON_DEF syms.
-
-2015-01-19  Alan Modra  <amodra@gmail.com>
-
-	PR ld/17615
-	* elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
-	linker script assignments too.
-	* elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
-	(bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
-
-2015-01-19  Alan Modra  <amodra@gmail.com>
-
-	* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
-	to allow return of first howto.
-	* elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
-	* elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
-	* elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
-	* elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
-	* elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
-	* elf32-rx.c (rx_reloc_type_lookup): Likewise.
-	* elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
-	* elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
-	* elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
-	* elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
-	* elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
-	(spu_elf_reloc_type_lookup): Adjust to suit.
-
-2015-01-19  Alan Modra  <amodra@gmail.com>
-
-	* bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
-	(bfd_get_section_limit): ..here.
-	* reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
-	(bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
-	* elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
-	* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
-	bfd_reloc_outofrange check.
+	PR ld/21168
+	* elf32-i386.c (elf_i386_relocate_section): Allow
+	"lea foo@GOT, %reg" in PIC.
+
+2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20244
+	* elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
+	symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
+	error against local IFUNC symbol without a base register for
+	PIC.
+
+2017-02-15  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
+	`%P: %H:' with `info->callbacks->einfo'.
+	(ppc_elf_relocate_section): Likewise.
+	* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+	(ppc64_elf_edit_toc): Likewise.
+	(ppc64_elf_relocate_section): Likewise.
+
+2017-02-14  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
+	--gc-keep-exported, and test versioned field of sym rather than
+	looking for @ in name.
+
+2017-02-13  Palmer Dabbelt  <palmer@dabbelt.com>
+
+	* elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
+	__global_pointer$.
+
+2017-02-13  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/21151
+	* dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
+	unit length field.
+
+2017-02-07  Andrew Waterman  <andrew@sifive.com>
+
+	* elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
+	entry size if PLT header is written.
+
+2017-02-06  Sheldon Lobo  <sheldon.lobo@oracle.com>
+
+	Fix sparc64 dynamic relocation processing to use the dynamic
+        symbol count.
+	* elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
+	to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
+	should be used.
+
+2017-02-03  Nick Clifton  <nickc@redhat.com>
+
+	PR 21096
+	* coffcode.h (coff_write_object_contents): Enlarge size of
+	s_name_buf in order to avoid compile time warning about possible
+	integer truncation.
+	* elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
+	32-bits of insn value before printing into buffer.
+
+2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_hash_sort_data): Add
+	`max_local_dynindx'.
+	(mips_elf_sort_hash_table): Handle it.
+	(mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
+	symbols bump up `max_local_dynindx' rather than
+	`max_non_got_dynindx'.
+
+2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_hash_sort_data): Convert the
+	`min_got_dynindx', `max_unref_got_dynindx' and
+	`max_non_got_dynindx' members to the `bfd_size_type' data type.
+	(mips_elf_sort_hash_table): Adjust accordingly.
+
+2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
+	to access the hash table.
+
+2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
+	non-NULL `htab' to the beginning.
+
+2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elflink.c (elf_gc_sweep): Wrap overlong line.
+
+2017-01-30  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
+	(_bfd_mips_elf_linker_flags): ... this.  Add another parameter.
+	* elfxx-mips.c (mips_elf_link_hash_table): Add
+	`ignore_branch_isa' member.
+	(mips_elf_perform_relocation): Do not treat an ISA mode mismatch
+	in branch relocation calculation as an error if
+	`ignore_branch_isa' has been set.
+	(_bfd_mips_elf_insn32): Rename to...
+	(_bfd_mips_elf_linker_flags): ... this.  Rename the `on'
+	parameter to `insn32' and add an `ignore_branch_isa' parameter.
+	Handle the new parameter.
+
+2017-01-27  Hans-Peter Nilsson  <hp@axis.com>
+
+	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
+	local variable dynobj.
+
+	PR ld/20995
+	* elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
+	(elf_cris_adjust_dynamic_symbol): Place variables copied into the
+	executable from read-only sections into sdynrelro.
+	(elf_cris_finish_dynamic_symbol): Select sreldynrelro for
+	dynamic relocs in sdynrelro.
+	(elf_backend_want_dynrelro): Define.
+
+2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config.bfd (*-*-rtemsaout*): Mark as removed.
+
+2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config.bfd (powerpcle-*-rtems*): Do not mark as removed.
+	(arm-*-rtems*): Move to (arm*-*-eabi*).
+	(i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
+	(m68-*-rtems*): Move to (m68*-*-elf*).
+
+2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+	* config.bfd (*-*-rtemscoff*): Mark as removed.
+
+2017-01-24  Maciej W. Rozycki  <macro@imgtec.com>
+
+	PR ld/20828
+	* elflink.c (bfd_elf_record_link_assignment): Revert last
+	change and don't ever clear `forced_local'.  Set `mark'
+	unconditionally.
+	(elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
+	file.
+	(elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
+	(bfd_elf_size_dynamic_sections): ... here.
+	* elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
+	and set `mark' instead in `__tls_get_addr_opt' processing.
+	* elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
+
+2017-01-24  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
+	where dynamic relocs are preferable.  Allow ifunc too.
+	(ensure_undefweak_dynamic): New function.
+	(allocate_dynrelocs): Use it here.  Move plt handling last and
+	don't make symbols dynamic, simplifying loop.  Only make undef
+	weak symbols with GOT entries dynamic.  Correct condition
+	for GOT relocs.  Handle dynamic relocs on ifuncs.  Correct
+	comments.  Remove goto.
+	(ppc_elf_relocate_section): Correct test for using dynamic
+	symbol on GOT relocs.  Rearrange test for emitting GOT relocs
+	to suit.  Set up explicit tls_index entries and implicit GOT
+	tls_index entries resolvable at link time for
+	__tls_get_addr_opt.  Simplify test to clear mem for prelink.
+	* elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
+	(ensure_undefweak_dynamic): New function.
+	(allocate_dynrelocs): Use it here.  Only make undef weak symbols
+	with GOT entries dynamic.  Remove unnecessary test of
+	WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
+	(ppc64_elf_relocate_section): Correct test for using dynamic
+	symbol on GOT relocs.  Rearrange test for emitting GOT relocs
+	to suit.  Set up explicit tls_index entries and implicit GOT
+	tls_index entries resolvable at link time for __tls_get_addr_opt.
+	Simplify expression to clear mem for prelink.
+
+2017-01-23  Yury Norov  <ynorov@caviumnetworks.com>
+
+	* elfnn-aarch64.c: Fix relaxations for ILP32 mode.
+
+2017-01-20  Jiong Wang <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
+	(elf_backend_hash_symbol): Define.
+
+2017-01-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	PR ld/20828
+	* elflink.c (bfd_elf_record_link_assignment): Clear any
+	`forced_local' marking for DSO symbols that are not being
+	provided.
+
+2017-01-17  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* elfnn-riscv.c (riscv_elf_object_p): New function.
+
+2017-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/21038
+	* elf64-x86-64.c (elf_x86_64_link_hash_table): Add
+	plt_bnd_eh_frame.
+	(elf_x86_64_check_relocs): Create .eh_frame section for the
+	.plt.bnd section.
+	(elf_x86_64_size_dynamic_sections): Allocate and initialize
+	.eh_frame section for the .plt.bnd section.
+	(elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
+	for the .plt.bnd section.
+
+2017-01-12  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20876
+	* opncls.c (find_separate_debug_file): Add include_dirs
+	parameter.  Only include the directory part of the bfd's filename
+	in search paths if include_dirs is true.  Add a couple of extra
+	locations for looking for debug files.
+	( bfd_follow_gnu_debuglink): Update invocation of
+	find_separate_debug_file.
+	(bfd_follow_gnu_debugaltlink): Likewise.
+	(get_build_id): New function: Finds the build-id of the given bfd.
+	(get_build_id_name): New function: Computes the name of the
+	separate debug info file for a bfd, based upon its build-id.
+	(check_build_id_file): New function: Checks to see if a separate
+	debug info file exists at the given location, and that its
+	build-id matches that of the original bfd.
+	(bfd_follow_build_id_debuglink): New function: Finds a separate
+	debug info file for a given bfd by using the build-id method.
+	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
+	method of locating a separate debug info file before using the
+	debuglink method.
 	* bfd-in2.h: Regenerate.
 
-	* cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
-	on zero size relocs.
-	* ecoff.c (ecoff_reloc_link_order): Likewise.
-	* elf32-nds32.c (nds32_relocate_contents): Likewise.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
-
-	* reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
-	(_bfd_clear_contents): Likewise.
-	* elfxx-mips.c (mips_elf_obtain_contents): Likewise.
-	(mips_elf_perform_relocation): Likewise.
-
-	* aoutx.h (aout_link_reloc_link_order): Allow for NULL return
-	from malloc on zero size alloc.
-	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
-	* elflink.c (elf_reloc_link_order): Likewise.
-	* linker.c (_bfd_generic_reloc_link_order): Likewise.
-	* pdp11.c (aout_link_reloc_link_order): Likewise.
-	* xcofflink.c (xcoff_reloc_link_order): Likewise.
-
-	* aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
-	bitsize 0, and complain_overflow_dont.
-	* coff-sparc.c (coff_sparc_howto_table): Likewise.
-	* elf-hppa.h (elf_hppa_howto_table): Likewise.
-	* elf-m10200.c (elf_mn10200_howto_table): Likewise.
-	* elf-m10300.c (elf_mn10300_howto_table): Likewise.
-	* elf32-arc.c (elf_arc_howto_table): Likewise.
-	* elf32-arm.c (elf32_arm_howto_table_1): Likewise.
-	* elf32-avr.c (elf_avr_howto_table): Likewise.
-	* elf32-bfin.c (bfin_howto_table): Likewise.
-	* elf32-cr16.c (cr16_elf_howto_table): Likewise.
-	* elf32-cris.c (cris_elf_howto_table): Likewise.
-	* elf32-crx.c (crx_elf_howto_table): Likewise.
-	* elf32-d10v.c (elf_d10v_howto_table): Likewise.
-	* elf32-d30v.c (elf_d30v_howto_table): Likewise.
-	* elf32-dlx.c (dlx_elf_howto_table): Likewise.
-	* elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
-	* elf32-fr30.c (fr30_elf_howto_table): Likewise.
-	* elf32-frv.c (elf32_frv_howto_table): Likewise.
-	* elf32-h8300.c (h8_elf_howto_table): Likewise.
-	* elf32-i370.c (i370_elf_howto_raw): Likewise.
-	* elf32-i386.c (elf_howto_table): Likewise.
-	* elf32-i860.c (elf32_i860_howto_table): Likewise.
-	* elf32-i960.c (elf32_i960_relocate): Likewise.
-	* elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
-	* elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
-	* elf32-lm32.c (lm32_elf_howto_table): Likewise.
-	* elf32-m32c.c (m32c_elf_howto_table): Likewise.
-	* elf32-m32r.c (m32r_elf_howto_table): Likewise.
-	* elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
-	* elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
-	* elf32-m68k.c (howto_table): Likewise.
-	* elf32-mcore.c (mcore_elf_howto_raw): Likewise.
-	* elf32-mep.c (mep_elf_howto_table): Likewise.
-	* elf32-metag.c (elf_metag_howto_table): Likewise.
-	* elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
-	* elf32-mips.c (elf_mips_howto_table_rel): Likewise.
-	* elf32-moxie.c (moxie_elf_howto_table): Likewise.
-	* elf32-msp430.c (elf_msp430_howto_table): Likewise.
-	* elf32-mt.c (mt_elf_howto_table): Likewise.
-	* elf32-nds32.c (nds32_elf_howto_table): Likewise.
-	* elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
-	* elf32-or1k.c (or1k_elf_howto_table): Likewise.
-	* elf32-pj.c (pj_elf_howto_table): Likewise.
-	* elf32-ppc.c (ppc_elf_howto_raw): Likewise.
-	* elf32-rl78.c (rl78_elf_howto_table): Likewise.
-	* elf32-rx.c (rx_elf_howto_table): Likewise.
-	* elf32-s390.c (elf_howto_table): Likewise.
-	* elf32-score.c (elf32_score_howto_table): Likewise.
-	* elf32-score7.c (elf32_score_howto_table): Likewise.
-	* elf32-sh-relocs.h (R_SH_NONE): Likewise.
-	* elf32-spu.c (elf_howto_table): Likewise.
-	* elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
-	* elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
-	* elf32-v850.c (v850_elf_howto_table): Likewise.
-	* elf32-vax.c (howto_table): Likewise.
-	* elf32-visium.c (visium_elf_howto_table): Likewise.
-	* elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
-	* elf32-xgate.c (elf_xgate_howto_table): Likewise.
-	* elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
-	* elf32-xtensa.c (elf_howto_table): Likewise.
-	* elf64-alpha.c (elf64_alpha_howto_table): Likewise.
-	* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
-	* elf64-mmix.c (elf_mmix_howto_table): Likewise.
-	* elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
-	* elf64-s390.c (elf_howto_table): Likewise.
-	* elf64-sh64.c (sh_elf64_howto_table): Likewise.
-	* elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
-	* elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
-	(elfNN_aarch64_howto_none): Likewise.
-	* elfxx-ia64.c (ia64_howto_table): Likewise.
-	* elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
-	* elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
-	* nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
-
-2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/17847
-	* elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
-	about -fPIC if the symbol is undefined when building executable.
-
-2015-01-15  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
-	error message.  Never return an invalid howto pointer.
-	* elf32-cr16.c (cr16_info_to_howto): Likewise.
-	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
-	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
-	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
-	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
-	* elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
-	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
-	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
-	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
-	* elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
-	* elf32-vax.c (rtype_to_howto): Likewise.
-	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
-	* elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
-	* elfn32-mips.c (sh_elf_info_to_howto): Likewise.
-	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
-	(sh_elf_reloc): Check that the reloc is in range.
-	* reloc.c (bfd_perform_relocation): Check that the section is big
-	enough for the entire reloc.
-	(bfd_generic_get_relocated_section_contents): Report unexpected
-	return values from perform_reloc.
-
-2015-01-15  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
-	relocs.  Include PC-relative adjustment for R_MSP430X_ABS16
-	relaxation.
-
-2015-01-15  Alan Modra  <amodra@gmail.com>
-
-	* elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
-	any output section matching a linker created dynobj section.
-
-2015-01-15  Alan Modra  <amodra@gmail.com>
-
-	PR 17842
-	* elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
-	(bfd_elf_final_link): Always create a symbol table when emit_relocs.
-	Don't assign symtab file position unless symbols will be output.
-	Merge blocks with condition in common.  Don't call
-	elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
-	unless other symbols are output.  Move assignment of symtab_shndx
-	file position.  Localize variable.
-
-2015-01-14  Jiong Wang  <jiong.wang@arm.com>
-
-	* elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
-	trying to defer them to runtime.
-
-2015-01-13  Thomas Preud'homme <thomas.preudhomme@arm.com>
-
-	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
-	to check if a symbol should be bound symbolically.
-
-2015-01-13  Jiong Wang  <jiong.wang@arm.com>
-
-	* elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
-	for TLSLE_MOVW_TPREL_G2.
-
-2015-01-13  Jiong Wang  <jiong.wang@arm.com>
-
-	PR ld/17415
-	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
-	R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
-	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
-	bit mask.
-
-2015-01-12  Terry Guo  <terry.guo@arm.com>
-
-	* elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
-	function.
-	(_bfd_elf_gc_mark_extra_sections): Use it.
-
-2015-01-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/17827
-	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
-	only discard space for pc-relative relocs symbols which turn
-	out to need copy relocs.
-
-2015-01-09  Nick Clifton  <nickc@redhat.com>
-
-	* tekhex.c (getvalue): Fix thinko in test for correct extraction
-	of value.
-	(getsym): Return false if there was not enough data to extract the
-	symbol.
-
-2015-01-09  Anthony Green  <green@moxielogic.com>
-
-	* elf32-moxie.c (ELF_MACHINE_ALT1): Define.
-
-2015-01-08  Nick Clifton  <nickc@redhat.com>
-
-	* elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
-	16-bit absolute BR instructions to 10-bit pc-relative JMP
-	instructions.
-
-2015-01-08  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* coffcode.h (coff_slurp_symbol_table): Return false if we failed
-	to load the line table.
-	* elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
-	maxpagesize of 1.
-	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
-	the Data Directory Size is too large.
-
-2015-01-06  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/17512
-	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
-	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
-
-2015-01-06  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
-	string table.
-
-	* reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
-	(bfd_perform_relocation): Include the size of the reloc in the
-	test for an out of range relocation.
-	(bfd_generic_get_relocated_section_contents): Remove reloc range
-	test.
-
-	* coff-i860.c (CALC_ADDEND): Always set an addend value.
-	* tekhex.c (getvalue): Add an end pointer parameter.  Use it to
-	avoid reading off the end of the buffer.
-	(getsym): Likewise.
-	(first_phase): Likewise.
-	(pass_over): Pass an end pointer to the invoked function.
-
-2015-01-05  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/17512
-	* elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
-	input.
-	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
-
-2015-01-05  Nick Clifton  <nickc@redhat.com>
-
-	PR binutils/17512
-	* archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
-	is at least big enough for the header to be read.
-	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
-	* mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
-	(bfd_mach_o_read_command): Prevetn duplicate error messages about
-	unrecognized commands.
-	* syms.c (_bfd_stab_section_find_nearest_line): Add range checks
-	when indexing into the string table.
+2017-01-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/21038
+	* elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
+	(elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
+	elf_x86_64_eh_frame_plt_got.
+	(elf_x86_64_size_dynamic_sections): Get unwind info from
+	elf_x86_64_bnd_arch_bed for the BND PLT.
+
+2017-01-11  Jeremy Soller  <jackpot51@gmail.com>
+
+	* config.bfd: Add entries for i686-redox and x86_64-redox.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
+	to 4 bytes.
+	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
+	.eh_frame section to 4 bytes for x32.
+	(elf_x86_64_check_relocs): Likewise.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20830
+	* elf32-i386.c (elf_i386_eh_frame_plt_got): New.
+	(PLT_GOT_FDE_LENGTH): Likewise.
+	(elf_i386_plt_layout): Add eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_i386_plt): Updated.
+	(elf_i386_link_hash_table): Add plt_got_eh_frame.
+	(elf_i386_check_relocs): Create .eh_frame section for .plt.got.
+	(elf_i386_size_dynamic_sections): Allocate and initialize
+	.eh_frame section for .plt.got.
+	(elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
+	.plt.got.
+	(elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	* elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
+	(PLT_GOT_FDE_LENGTH): Likewise.
+	(elf_x86_64_backend_data): Add eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_x86_64_arch_bed): Updated.
+	(elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_x86_64_nacl_arch_bed): Likewise.
+	(elf_x86_64_link_hash_table): Add plt_got_eh_frame.
+	(elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
+	(elf_x86_64_size_dynamic_sections): Allocate and initialize
+	.eh_frame section for .plt.got.
+	(elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
+	for .plt.got.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Set
+	plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
+
+2017-01-09  Nick Clifton  <nickc@redhat.com>
+
+	* dwarf2.c (lookup_address_in_function_table): Return early if
+	there are no functions in the given comp unit, or if the high
+	address of the last function in the comp unit is less than the
+	desired address.
+
+2017-01-09  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/21013
+	* coffgen.c (_bfd_coff_get_external_symbols): Generate an error
+	message if there are too many symbols to load.
+
+2017-01-04  James Clarke  <jrtc27@jrtc27.com>
+
+	* elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
+	if relocs are cached.
+
+2017-01-03  Rich Felker  <bugdal@aerifal.cx>
+
+	PR ld/21017
+	* elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
+	for R_MICROBLAZE_GOTOFF_64.
+
+2017-01-03  Nick Clifton  <nickc@redhat.com>
+
+	* mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
+	warning about using a possibly uninitialised variable.
+
+2017-01-02  Alan Modra  <amodra@gmail.com>
+
+	* elf32-hppa.c (ensure_undef_weak_dynamic): New function.
+	(allocate_plt_static, allocate_dynrelocs): Use it.
+
+2017-01-02  Alan Modra  <amodra@gmail.com>
+
+	* elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
+	.PARISC.unwind section.
+
+2017-01-02  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20989
+	* elfxx-sparc.c (gdop_relative_offset_ok): New function.
+	(_bfd_sparc_elf_relocate_section): Use it to validate GOT
+	indirect to GOT pointer relative code edit.
 
-2015-01-01  Alan Modra  <amodra@gmail.com>
+2017-01-02  Alan Modra  <amodra@gmail.com>
 
 	Update year range in copyright notice of all files.
 
-For older changes see ChangeLog-2014
+For older changes see ChangeLog-2016
 
-Copyright (C) 2015 Free Software Foundation, Inc.
+Copyright (C) 2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2006 ./bfd/ChangeLog-2006
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2006	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ChangeLog-2006	2017-03-06 01:49:05.000000000 +0000
@@ -64,7 +64,7 @@
 
 2006-12-15  Mark Kettenis  <kettenis@gnu.org>
 
-	* config.bfd: (sh*-*-openbsd*): Add target. 
+	* config.bfd: (sh*-*-openbsd*): Add target.
 	* configure.in (sh*-*-openbsd*): Set COREFILE to netbsd-core.lo.
 	* configure: Regenerate.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2015 ./bfd/ChangeLog-2015
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2015	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/ChangeLog-2015	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,4247 @@
+2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
+	address.
+	(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
+	messages.
+
+2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (using_thumb_only): Check that profile is 'M' and update
+	logic around Tag_CPU_arch values to return TRUE for ARMv8-M
+	architectures.
+	(tag_cpu_arch_combine): Define v8m_baseline and v8m_mainline and update
+	v4t_plus_v6_m and comb to deal with ARMv8-M Tag_CPU_arch merging logic.
+	(elf32_arm_merge_eabi_attributes): Add Tag_CPU_name values for
+	ARMv8-M.
+
+2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	(tag_cpu_arch_combine): Adjust comment in v4t_plus_v6_m with regards
+	to merging with ARMv8-M Baseline.
+
+2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	(tag_cpu_arch_combine): Adjust v4t_plus_v6_m and comb array to account
+	for new TAG_CPU_ARCH_V4T_PLUS_V6_M value.  Deal with NULL values in
+	comb array.
+
+2015-12-22 Yury Usishchev <y.usishchev@samsung.com>
+
+	* elf-bfd.h: Add callback to count additional relocations.
+	* elf32-arm.c (_arm_elf_section_data): Add new counter.
+	(insert_cantunwind_after): Increment relocations counter.
+	(elf32_arm_fix_exidx_coverage): Remove exidx entries and add
+	terminating CANTUNWIND entry only in final builds.
+	(elf32_arm_add_relocation): New function.
+	(elf32_arm_write_section): Add relocations in relocatable builds.
+	(elf32_arm_count_additional_relocs): New function.
+	(elf_backend_count_additional_relocs): New define.
+	* elflink.c (bfd_elf_final_link): Use callback and adjust size of
+	.rel section.
+	* elfxx-target.h (elf_backend_count_additional_relocs): New define.
+
+2015-12-22  Yoshinori Sato <ysato@users.sourceforge.jp>
+
+	* archures.c: Add bfd_mach_rx_v2.
+	* bfd-in2.h: Regenerate.
+	* cpu-rx.c (arch_info_struct): Add v2 information.
+	* elf32-rx.c (elf32_rx_machine): Add v2 support.
+
+2015-12-22 Mickael Guene <mickael.guene@st.com>
+
+	* bfd-in2.h: Regenerate.
+	* section.c: Add SEC_ELF_NOREAD.
+	* elf32-arm.c (elf32_arm_post_process_headers): Only set
+	PF_X attribute if a segment only contains section with
+	SHF_ARM_NOREAD flag.
+	(elf32_arm_fake_sections): Add SEC_ELF_NOREAD conversion.
+	(elf32_arm_section_flags): New function to convert SHF_ARM_NOREAD
+	to bfd flag.
+	(elf32_arm_lookup_section_flags): New function to allow
+	INPUT_SECTION_FLAGS directive with SHF_ARM_NOREAD flag.
+	(elf32_arm_special_sections): Add special sections array
+	to catch section prefix by '.text.noread' pattern.
+
+2015-12-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* coff-x86_64.c (coff_amd64_reloc): Fix formatting.
+
+2015-12-18  Nick Clifton  <nickc@redhat.com>
+
+	* coff-i386.c (coff_i386_reloc): Fix formatting.
+
+2015-12-16  Mickael Guene <mickael.guene@st.com>
+
+	* bfd-in2.h: Regenerate.
+	* reloc.c: Add new relocations.
+	* libbfd.h (bfd_reloc_code_real_names): Add new relocations
+	display names.
+	* elf32-arm.c (elf32_arm_howto_table_1): Add HOWTO for new
+	relocations.
+	(elf32_arm_reloc_map): Add bfd/arm mapping for new relocations.
+	(elf32_arm_final_link_relocate): Implement new relocations
+	resolution.
+
+2015-12-15  Jan Beulich  <jbeulich@suse.com>
+
+	* coffgen.c (coff_write_alien_symbol): New parameter "iaux".
+	(coff_write_symbols): Pass NULL for new argument.
+	* cofflink.c (_bfd_coff_final_link): New local variables
+	"iaux".
+	Extend scope of local variables "indx" and "hash". Pass address
+	of "iaux" to coff_write_alien_symbol(). Handle ".file" and the
+	file name ending up in the string table separately. Avoid
+	setting "rewrite" on more than one path.
+	* libcoff-in.h (coff_write_alien_symbol): New parameter of type
+	"union internal_auxent *".
+	* libcoff.h: Re-generate.
+
+2015-12-15  Nick Clifton  <nickc@redhat.com>
+
+	PR 19339
+	* elf-vxworks.h: Update copyright notice.
+	* elf-vxworks.c: Update copyright notice.
+	* elf-nacl.h: Update copyright notice.
+	* elf-nacl.c: Update copyright notice.
+
+2015-12-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19317
+	* linker.c (_bfd_generic_link_add_one_symbol): Don't complain
+	plugin needed to handle slim lto object for relocatable link.
+
+2015-12-09  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
+	%hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
+	PLT entries.  Assert alignment requirements.
+
+2015-12-08  DJ Delorie  <dj@redhat.com>
+
+	* elf32-rl78.c (rl78_offset_for_reloc): Add more relocs.
+	(rl78_elf_relax_section): Add bc/bz/bnc/bnz/bh/bnh.  Fix reloc
+	choices.
+
+	* elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
+
+2015-12-07  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-rx.c (elf32_rx_relax_delete_bytes): Add extra parameter -
+	the start of the relocs for the section.  Delete code to load in
+	the relocs.
+	(elf32_rx_relax_section): Do not free the loaded relocs.
+
+2015-12-07  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc
+	plt call.  Wrap long lines.
+	(ppc_elf_relocate_section): Wrap long lines.
+	* elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc
+	plt calls.  Move __tls_get_addr checks later.  Don't create plt
+	for addr14/addr24 relocs.
+	(ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
+	(ppc64_elf_relocate_section): Correct local ifunc handling for
+	PLT64, PLT32 and PLT16 relocs.
+
+2015-12-07  Alan Modra  <amodra@gmail.com>
+
+	PR19323
+	* elfcode.h (elf_object_p): Check for ridiculous e_shnum and
+	e_phnum values.
+
+2015-12-07  Alan Modra  <amodra@gmail.com>
+
+	* reloc.c (BFD_RELOC_PPC64_ENTRY): New.
+	* elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add
+	entry for R_PPC64_ENTRY.
+	(LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define.
+	(ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY.
+	(ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY.  Use
+	new insn defines.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2015-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+	* config.bfd: Mark sh5*-*-* and sh64*-*-* as obsolete.
+
+2015-12-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0.
+	(elf_i386_relocate_section): Skip R_386_GOT32X optimization if
+	addend isn't 0.
+
+2015-12-04  Tristan Gingold  <gingold@adacore.com>
+
+	* elf.c (rewrite_elf_program_header): Remove useless loop.
+
+2015-12-02  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/19315
+	* dwarf2.c (_bfd_elf_find_function): Return symbol matched.
+	(_bfd_dwarf2_find_nearest_line): Check symbol returned above
+	against dwarf range.
+	* elf-bfd.h (_bfd_elf_find_function): Update prototype.
+
+2015-12-02  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL
+	symbol section or output section.
+	(ppc64_elf_edit_toc): Similarly for ld -R objects.
+	(ppc64_elf_size_stubs): Likewise.
+
+2015-12-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19319
+	* elf32-i386.c (elf_i386_convert_load): Check h->def_regular
+	instead of bfd_link_hash_new.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Likewise.  Skip
+	relocation overflow for bfd_link_hash_undefined and
+	bfd_link_hash_new if h->def_regular is set.
+
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
+	text_end parameters.  Update callers.
+	* aout-tic30.c: Update adjust_sizes_and_vmas callers.
+	* hp300hpux.c: Likewise.
+	* i386lynx.c: Likewise.
+	* libaout.h: Likewise.
+	* netbsd.h: Likewise.
+	* pdp11.c: Likewise.
+	* riscix.c: Likewise.
+
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* aout-adobe.c: Invoke aout N_* macros with pointer to
+	struct internal_exec.
+	* aout-arm.c: Likewise.
+	* aout-cris.c: Likewise.
+	* aout-target.h: Likewise.
+	* aout-tic30.c: Likewise.
+	* aoutf1.h: Likewise.
+	* aoutx.h: Likewise.
+	* bout.c: Likewise.
+	* freebsd.h: Likewise.
+	* gen-aout.c: Likewise.
+	* hp300hpux.c: Likewise.
+	* i386aout.c: Likewise.
+	* i386linux.c: Likewise.
+	* i386lynx.c: Likewise.
+	* i386mach3.c: Likewise.
+	* i386os9k.c: Likewise.
+	* libaout.h: Likewise.
+	* m68klinux.c: Likewise.
+	* m88kmach3.c: Likewise.
+	* mipsbsd.c: Likewise.
+	* netbsd.h: Likewise.
+	* pc532-mach.c: Likewise.
+	* pdp11.c: Likewise.
+	* riscix.c: Likewise.
+	* sparclinux.c: Likewise.
+	* sparclynx.c: Likewise.
+
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param
+	with info param.  Test info->traditional_format rather than
+	BFD_TRADITIONAL_FORMAT flag.
+	* coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Likewise.
+	* libxcoff.h (struct xcoff_backend_data_rec): Update
+	_xcoff_put_symbol_name prototype.
+	(bfd_xcoff_put_symbol_name): Add info param.
+	* xcofflink.c (xcoff_find_tc0): Update bfd_xcoff_put_symbol_name call.
+	(xcoff_write_global_symbol): Likewise.
+	(xcoff_link_input_bfd): Test info->traditional_format rather than
+	BFD_TRADITIONAL_FORMAT flag.
+	* cofflink.c (_bfd_coff_final_link): Likewise.
+	(_bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): Likewise.
+
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* po/SRC-POTFILES.in: Regenerate.
+
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* elf32-arc.c (ARC_ELF_HOWTO): Delete.
+	(arc_elf_howto): New function.
+	(bfd_elf32_bfd_reloc_type_lookup): Use it in place of existing
+	init code.
+	(bfd_elf32_bfd_reloc_name_lookup): Use arc_elf_howto.
+	(arc_info_to_howto_rel, elf_arc_relocate_section): Likwise.
+	(elf_arc_check_relocs): Likewise.
+
+2015-12-01  Cupertino Miranda  <cupertino.miranda@synopsys.com>
+
+	* elf32-arc.c (arc_elf_howto_init): Init dst_mask.
+
+2015-11-20  Stefan Teleman  <stefan.teleman@oracle.com>
+
+	PR ld/19260
+	* cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
+	Solaris as the result is unreliable.
+
+2015-11-20  Tristan Gingold  <gingold@adacore.com>
+
+	* mach-o-x86-64.c (x86_64_howto_table): Change name here too.
+
+2015-11-20  Tristan Gingold  <gingold@adacore.com>
+
+	* targets.c (aarch64_mach_o_vec, arm_mach_o_vec): Declare.
+	(_bfd_target_vector): Add new vectors.
+	* reloc.c (BFD_RELOC_MACH_O_SUBTRACTOR32)
+	(BFD_RELOC_MACH_O_SUBTRACTOR64, BFD_RELOC_MACH_O_ARM64_ADDEND)
+	(BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21)
+	(BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12)
+	(BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT): New relocations.
+	(BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32)
+	(BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64): Remove.
+	* mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Change
+	name of subtractor relocations.
+	* config.bfd: Handle aarch64-*-darwin*, arm-*-darwin*.
+	* Makefile.am (BFD32_BACKENDS): Add mach-o-arm.lo.
+	(BFD32_BACKENDS_CFILES): Add mach-o-arm.c.
+	(BFD64_BACKENDS): Add mach-o-aarch64.lo.
+	(BFD64_BACKENDS_CFILES): Add mach-o-aarch64.c.
+	* configure.ac: Handle aarch64_mach_o_vec and arm_mach_o_vec.
+	* mach-o-aarch64.c: New file.
+	* mach-o-arm.c: New file.
+	* Makefile.in: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* configure: Regenerate.
+	* libbfd.h: Regenerate.
+
+2015-11-20  David Bridgham  <dab@froghouse.org>
+
+	* pdp11.c (TARGET_PAGE_SIZE): Set to 256 to match definition in
+	ld/emulparams/pdp11.sh.
+
+2015-11-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	PR ld/19263
+	* elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check.
+	* elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling
+	over from the 32 bit code.
+	(elf_s390_relocate_section): Likewise.
+
+2015-11-18  Alan Modra  <amodra@gmail.com>
+
+	PR 19256
+	* archive.c (bfd_generic_openr_next_archived_file): Don't allow
+	backward file movement via "negative" sizes.
+	* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
+
+2015-11-18  Tristan Gingold  <gingold@adacore.com>
+
+	* mach-o.h (bfd_mach_o_swap_in_non_scattered_reloc)
+	(bfd_mach_o_canonicalize_non_scattered_reloc)
+	(bfd_mach_o_pre_canonicalize_one_reloc): Declare.
+	(bfd_mach_o_backend_data): Rename field
+	_bfd_mach_o_swap_reloc_in to _bfd_mach_o_canonicalize_one_reloc.
+	* mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): Now public.
+	(bfd_mach_o_canonicalize_non_scattered_reloc): Renames from
+	bfd_mach_o_canonicalize_one_reloc.
+	(bfd_mach_o_pre_canonicalize_one_reloc): New function.
+	(bfd_mach_o_canonicalize_relocs): Adjust.
+	(bfd_mach_o_canonicalize_relocs): Rename define from
+	bfd_mach_o_swap_reloc_in.
+	* mach-o-target.c (TARGET_NAME_BACKEND): Use
+	bfd_mach_o_canonicalize_one_reloc instead of
+	bfd_mach_o_swap_reloc_in.
+	* mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Renames
+	from bfd_mach_o_i386_swap_reloc_in and adjust.
+	(bfd_mach_o_canonicalize_one_reloc): Renames from
+	bfd_mach_o_i386_canonicalize_one_reloc.
+	* mach-o-x86_64.c (bfd_mach_o_x86_64_canonicalize_one_reloc): Renames
+	from bfd_mach_o_x86_64_swap_reloc_in and adjust.
+	(bfd_mach_o_canonicalize_one_reloc): Renames from
+	bfd_mach_o_x86_64_canonicalize_one_reloc.
+
+2015-11-18  Tristan Gingold  <gingold@adacore.com>
+
+	* mach-o.h (struct mach_o_data_struct): Add hdr_offset field.
+	(bfd_mach_o_fat_archive_p): Renames prototype.
+	(bfd_mach_o_fat_openr_next_archived_file): Renames.
+	(bfd_mach_o_header_p): Add argument.
+	* mach-o.c (bfd_mach_o_read_header): Add hdr_off argument and
+	use it.
+	(bfd_mach_o_read_section_32, bfd_mach_o_read_section_64)
+	(bfd_mach_o_read_section): Remove offset argument.
+	(bfd_mach_o_read_dylinker): Remove bfd_seek call.
+	(bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib)
+	(bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints)
+	(bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab)
+	(bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
+	(bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
+	(bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min)
+	(bfd_mach_o_read_encryption_info): Likewise.
+	(bfd_mach_o_read_encryption_info_64): New function.
+	(bfd_mach_o_read_main, bfd_mach_o_read_source_version)
+	(bfd_mach_o_read_segment): Remove call to bfd_seek.
+	(bfd_mach_o_read_command): Use hdr_offset in bfd_seek.
+	Handle BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT,
+	BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_VERSION_MIN_WATCHOS.
+	(bfd_mach_o_header_p): Add hdr_off argument.
+	(bfd_mach_o_gen_object_p, bfd_mach_o_gen_core_p): Adjust calls.
+	(bfd_mach_o_fat_archive_p): Renames.
+	(bfd_mach_o_fat_openr_next_archived_file): Renames.
+	(bfd_mach_o_close_and_cleanup): Remove useless code.
+	(bfd_mach_o_close_and_cleanup): Define.
+	* mach-o-x86-64.c (bfd_mach_o_x86_64_object_p)
+	(bfd_mach_o_x86_64_core_p): Adjust calls.
+	* mach-o-target.c: Move defines for archive from mach-o.c.
+	Remove check on TARGET_ARCHIVE.
+	* mach-o-i386.c (bfd_mach_o_i386_object_p)
+	(bfd_mach_o_i386_core_p): Adjust calls.
+
+2015-11-17  Christophe Lyon  <christophe.lyon@linaro.org>
+
+	* elf32-arm.c (elf32_arm_write_section): Force offset output as
+	long (%ld).
+
+2015-11-13  Tristan Gingold  <gingold@adacore.com>
+
+	* version.m4: Bump version to 2.26.51
+	* configure: Regenerate.
+
+2015-11-11  Alan Modra  <amodra@gmail.com>
+	    Peter Bergner <bergner@vnet.ibm.com>
+
+	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
+	(ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
+	(ppc_elf_addr16_ha_reloc): Likewise.
+	(ppc_elf_check_relocs): Likewise.
+	(ppc_elf_relocate_section): Likewise.
+	(is_insn_dq_form): Handle lxv and stxv instructions.
+	* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
+	(ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
+	(ppc64_elf_ha_reloc): Likewise.
+	(ppc64_elf_check_relocs): Likewise.
+	(ppc64_elf_relocate_section): Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Likewise.
+	* reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
+
+2015-11-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
+	and VTENTRY relocations when deleting relocations.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2015-11-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Properly move
+	kept relocations when deleting relocations.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2015-11-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Use read and write
+	pointers to reloc array, rather than memmove when deleting a
+	reloc.  Don't use RELOC_AGAINST_DISCARDED_SECTION.  Adjust
+	reloc counts at end of loop.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2015-11-10  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
+	pointers to reloc array, rather than memmove when deleting a
+	reloc.  Don't use RELOC_AGAINST_DISCARDED_SECTION.  Adjust
+	reloc counts at end of loop.
+	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+
+2015-11-09  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+	* elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
+	shift of negative value.
+	* libbfd.c (safe_read_leb128): Likewise.
+	* dwarf2.c (place_sections): Likewise.
+	* bfd-in.h (align_power): Likewise.
+	* bfd-in2.h (align_power): Likewise.
+
+2015-10-30  Nick Clifton  <nickc@redhat.com>
+
+	* po/zh_CN.po: Updated (simplified) Chinese translation.
+
+2015-10-29  Catherine Moore  <clm@codesourcery.com>
+
+	* elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
+	section to bfd_abs_section_ptr if the stub is discarded.
+
+2015-10-29  Ed Schouten  <ed@nuxi.nl>
+
+	* config.bfd (targ_defvec): Add support for CloudABI on aarch64.
+	For this target we have to make sure we use ELFOSABI_CLOUDABI
+	instead of ELFOSABI_NONE.
+	* configure.ac (tb): Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* targets.c (_bfd_target_vector): Likewise.
+	* configure: Regenerate.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* libhppa.h (bfd_hppa_insn2fmt): Add cast.
+
+2015-10-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Fix a typo in
+	comment.
+
+2015-10-28  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-arm.c (create_instruction_branch_absolute): Replace
+	pointer parameters with a simple integer parameter.
+	(stm32l4xx_create_replacing_stub_ldmia): Update calls to
+	create_instruction_branch_absolute.
+	(stm32l4xx_create_replacing_stub_ldmdb): Likewise.
+	(stm32l4xx_create_replacing_stub_vldm): Likewise.
+	(elf32_arm_write_section): Use pointer type for veneer addresses.
+
+2015-10-28  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
+	* elf32-arc.c (arc_elf_howto_ini): Update formula.
+	(get_middle_endian_relocation): New function.
+	(PDATA): Define.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Likewise.
+
+2015-10-28  Alan Modra  <amodra@gmail.com>
+
+	PR ld/19162
+	* elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
+	linker input bfds..
+	* section.c (bfd_get_next_section_by_name): ..to here.  Add ibfd param.
+	(bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
+	* tekhex.c (first_phase): Likewise.
+	* elflink.c (bfd_elf_gc_sections): Likewise.
+	* bfd-in2.h: Regenerate.
+
+2015-10-27  Laurent Alfonsi <laurent.alfonsi@st.com>
+	    Christophe Monat <christophe.monat@st.com>
+
+	* bfd-in2.h: Regenerate.
+	* bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
+	STM32L4XX instruction scanning should be done.
+	(bfd_elf32_arm_set_stm32l4xx_fix)
+	(bfd_elf32_arm_stm32l4xx_erratum_scan)
+	(bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
+	(bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
+	to prototype.
+	* elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
+	(STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
+	(elf32_stm32l4xx_erratum_type): New enum.
+	(elf32_stm32l4xx_erratum_list): New struct. List of veneers or
+	jumps to veneers.
+	(_arm_elf_section_data): Add stm32l4xx_erratumcount,
+	stm32l4xx_erratumlist.
+	(elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
+	stm32l4xx_fix and num_stm32l4xx_fixes fields.
+	(ctz): New function.
+	(popcount): New function.
+	(elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
+	(put_thumb2_insn): New function.
+	(STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
+	LDM instructions.
+	(STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
+	VLDM instructions.
+	(bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
+	glue section.
+	(record_stm32l4xx_erratum_veneer) : New function. Create a single
+	veneer, and its associated symbols.
+	(bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
+	(bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
+	erratum workaround required.
+	(bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
+	out where veneers and branches to veneers have been placed in
+	virtual memory after layout.
+	(is_thumb2_ldmia): New function.
+	(is_thumb2_ldmdb): Likewise.
+	(is_thumb2_vldm ): Likewise.
+	(stm32l4xx_need_create_replacing_stub): New function. Decide if a
+	veneer must be emitted.
+	(bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
+	input BFD for potential erratum-triggering insns. Record results.
+	(bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
+	global hash table.
+	(elf32_arm_size_dynamic_sections): Collect glue information.
+	(create_instruction_branch_absolute): New function.
+	(create_instruction_ldmia): Likewise.
+	(create_instruction_ldmdb): Likewise.
+	(create_instruction_mov): Likewise.
+	(create_instruction_sub): Likewise.
+	(create_instruction_vldmia): Likewise.
+	(create_instruction_vldmdb): Likewise.
+	(create_instruction_udf_w): Likewise.
+	(create_instruction_udf): Likewise.
+	(push_thumb2_insn32): Likewise.
+	(push_thumb2_insn16): Likewise.
+	(stm32l4xx_fill_stub_udf): Likewise.
+	(stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
+	replacing stub for ldmia instructions.
+	(stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
+	(stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
+	(stm32l4xx_create_replacing_stub): New function. Dispatches the
+	stub emission to the appropriate functions.
+	(elf32_arm_write_section): Output veneers, and branches to veneers.
+
+2015-10-27  Sangamesh Mallayya  <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
+
+	* configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
+	aix for core file support.
+	* configure: Regenerate.
+	* rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
+	Added BFD64 check if we are using old core file format for 32-bit gdb.
+	Set sizeof CORE_COMMONSZ appropriately in case of either new or
+	old core file format.
+	(read_hdr): Added BFD64 check for 64-bit support.
+	(rs6000coff_core_p): Likewise.
+	(rs6000coff_core_file_matches_executable_p): Likewise.
+	(rs6000coff_core_file_failing_command): Likewise.
+	(rs6000coff_core_file_failing_signal): Likewise.
+	Add support for debugging core files generated by binaries in
+	Large Memory model.
+	(rs6000coff_core_p): If Large Memory Model is used, then the .data
+	segment should start from BDATAORG which has been defined in the
+	system header files.
+
+2015-10-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19175
+	* elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
+	instead of calling bfd_link_get_defined_symbol.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Likewise.  Skip
+	relocation overflow for bfd_link_hash_new.
+	* linker.c (bfd_link_get_defined_symbol): Removed.
+	* bfd-in2.h: Regenerated.
+
+2015-10-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19171
+	* elf32-i386.c (elf_i386_convert_load): Call
+	bfd_link_get_defined_symbol to check if a symbol is defined.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Call
+	bfd_link_get_defined_symbol to get defined symbol section and
+	value.
+	* linker.c (bfd_link_get_defined_symbol): New function.
+	* bfd-in2.h: Regenerated.
+
+2015-10-23  Alan Modra  <amodra@gmail.com>
+
+	PR ld/11133
+	PR ld/19161
+	PR ld/19167
+	* elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
+	and __stop_* symbol refs.
+	(_bfd_elf_gc_mark_rsec): Add start_stop parameter.  Handle __start_*
+	and __stop_* symbol refs here..
+	(_bfd_elf_gc_mark_reloc): ..and here.
+	* elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
+	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
+	_bfd_elf_gc_mark_rsec call.
+
+2015-10-23  Alan Modra  <amodra@gmail.com>
+
+	PR ld/11133
+	PR ld/19161
+	* elflink.c (elf_gc_sweep): Revert last patch.
+	(_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19161
+	* elflink.c (elf_gc_sweep): Always keep sections marked with
+	SEC_KEEP.
+
+2015-10-22  Hans-Peter Nilsson  <hp@bitrange.com>
+
+	* mmo.c (struct mmo_data_struct): New members
+	symbol_consistency_override_calculated and ignore_symbol_consistency.
+	(mmo_section_has_contents, mmo_ignore_symbol_consistency): New
+	functions.
+	(mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
+	report an error for unexpected value of Main.
+	(mmo_write_symbols_and_terminator): Similar.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
+	check call_nop_as_suffix for 1-byte NOP padding to pad call.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c: Include opcode/i386.h.
+	(x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
+	R_X86_64_REX_GOTPCRELX.
+	(R_X86_64_standard): Replace R_X86_64_PLT32_BND with
+	R_X86_64_REX_GOTPCRELX.
+	(x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
+	BFD_RELOC_X86_64_REX_GOTPCRELX.
+	(need_convert_mov_to_lea): Renamed to ...
+	(need_convert_load): This.
+	(elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
+	R_X86_64_REX_GOTPCRELX.  Replace need_convert_mov_to_lea with
+	need_convert_load.
+	(elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
+	R_X86_64_REX_GOTPCRELX.
+	(elf_x86_64_size_dynamic_sections): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf_x86_64_convert_mov_to_lea): Renamed to ...
+	(elf_x86_64_convert_load): This.  Replace need_convert_mov_to_lea
+	with need_convert_load.  Support R_X86_64_GOTPCRELX and
+	R_X86_64_REX_GOTPCRELX transformations.
+	* reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
+	(BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
+	* bfd-in2.h: Regenerated.
+	* libbfd.h: Likewise.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c: Include opcode/i386.h.
+	(elf_howto_table): Add R_386_GOT32X.
+	(R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
+	(elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
+	(need_convert_mov_to_lea): Renamed to ...
+	(need_convert_load): This.
+	(elf_i386_check_relocs): Handle R_386_GOT32X.  Replace
+	need_convert_mov_to_lea with need_convert_load.
+	(elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
+	(elf_i386_size_dynamic_sections): Likewise.
+	(elf_i386_relocate_section): Likewise.
+	(elf_i386_convert_mov_to_lea): Renamed to ...
+	(elf_i386_convert_load): This.  Replace need_convert_mov_to_lea
+	with need_convert_load.  Support R_386_GOT32X transformations.
+	* reloc.c (BFD_RELOC_386_GOT32X): New.
+	* bfd-in2.h: Regenerated.
+	* libbfd.h: Likewise.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
+	only when linking an executable.
+	(elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
+	slot.
+	* elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
+	only when linking an executable.
+	(elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
+	slot.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
+	reference counters for local IFUNC calls.
+	* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
+	slot allocating code for GOTOFF relocs on ifunc symbols.
+	(elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
+	on ifunc symbols.
+	(elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
+	slot.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	PR ld/18841
+	* elf32-s390.c (elf_s390_reloc_type_class): Return
+	reloc_class_ifunc for ifunc symbols.
+	* elf64-s390.c (elf_s390_reloc_type_class): Likewise.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
+	elf_s390_finish_ifunc_symbol only for actually defined symbols.
+	* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+
+2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
+	`head' parameter.
+	* elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
+	* elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
+
+2015-10-20  Hans-Peter Nilsson  <hp@bitrange.com>
+
+	* mmo.c (mmo_write_symbols_and_terminator): Correct printed value
+	of Main in error message.
+
+2015-10-18  Doug Evans  <xdje42@gmail.com>
+
+	* targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
+
+2015-10-17  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
+	eh_frame FDE for ELFv1.
+
+2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
+	is defined.
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
+2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
+	def_regular.
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
+2015-10-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
+
+2015-10-15  Alan Modra  <amodra@gmail.com>
+
+	* elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
+	that input and output .note.renesas sections are same size.
+	Instead, only copy input to output if they are.
+
+2015-10-15  Riku Voipio  <riku.voipio@iki.fi>
+
+	PR ld/19123
+	* elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
+	offset for bfd_seek.
+	* elfcode.h (elf_object_p): Likewise.
+
+2015-10-14  Rich Felker  <dalias@libc.org>
+
+	PR ld/19091
+	* elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
+	DT_PLTGOT for FDPIC output.
+
+2015-10-13  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (_bfd_elf_map_sections_to_segments): Don't set
+	PT_GNU_RELRO p_flags.
+	(assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
+	flags to PF_R here.
+
+2015-10-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19073
+	* elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
+	definition after the default version.
+
+2015-10-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	PR ld/19083
+	* elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
+	refcount for relocs not really requiring a got slot.
+	* elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
+
+2015-10-11  John David Anglin  <danglin@gcc.gnu.org>
+
+	* elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
+	.data.rel.ro.local.
+
+2015-10-07  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* archures.c: Remove support for older ARC. Added support for new
+	ARC cpus (ARC600, ARC601, ARC700, ARCV2).
+	* bfd-in2.h: Likewise.
+	* config.bfd: Likewise.
+	* cpu-arc.c: Likewise.
+	* elf32-arc.c: Totally changed file with a refactored
+	inplementation of the ARC port.
+	* libbfd.h: Added ARC specific relocation types.
+	* reloc.c: Likewise.
+
+2015-10-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd.c (bfd_update_compression_header): Clear the ch_reserved
+	field in 64-bit output.
+	(bfd_convert_section_contents): Likewise.
+
+2015-10-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18914
+	* elflink.c (elf_link_add_object_symbols): Don't re-export a
+	symbol if it isn't undefined.
+
+2015-10-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
+	i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_tls_transition_without_check):  Add
+	relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
+	TLSDESC_OFF_G1.
+	(aarch64_tls_transition_without_check): Add relaxation support.
+	(aarch64_reloc_got_type): Add support.
+	(elfNN_aarch64_final_link_relocate): Likewise.
+	(elfNN_aarch64_tls_relax): 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.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
+	BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
+	Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
+	(aarch64_tls_transition_without_check): Likewise
+	(elfNN_aarch64_tls_relax): Likwise.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
+	for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
+	AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Likewise.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
+	TLSIE_MOVW_GOTTPREL_G1 check overflow.
+	(aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
+	and TLSIE_MOVW_GOTTPREL_G0_NC.
+	(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.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Add
+	BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
+	(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.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Likewise
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Add
+	BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
+	(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.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Likewise.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Add
+	BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
+	(elfNN_aarch64_final_link_relocate): 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.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
+	MOVW_GOTOFF_G0_NC.
+	* libbfd.h: Regnerate.
+	* bfd-in2.h: Regenerate.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Add support
+	for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
+	(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
+	(elfNN_aarch64_final_link_relocate): Likewise
+
+2015-010-02  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	MOVW_GOTOFF_G1.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Add
+	BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
+	(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
+	(elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
+
+2015-10-02  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
+	switch statement.
+
+2015-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19031
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Set
+	pointer_equality_needed for R_X86_64_PC32 reloc in non-code
+	sections.
+
+2015-10-01  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
+	(elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
+
+2015-10-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+	* config.bfd (targ_selvecs): Remove sh_elf32_vec and
+	sh_elf32_le_vec	from sh*-*-linux cases.
+
+2015-10-01  Alan Modra  <amodra@gmail.com>
+
+	PR ld/19013
+	* elflink.c (_bfd_elf_merge_sections): Revert last change.
+
+2015-09-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19031
+	* elf32-i386.c (elf_i386_check_relocs): Set
+	pointer_equality_needed for R_386_PC32 reloc in non-code
+	sections.
+
+2015-09-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19013
+	* elflink.c (_bfd_elf_merge_sections): Only merge input bfds
+	that have the compatible ELF machine code with the output bfd.
+
+2015-09-30  Alan Modra  <amodra@gmail.com>
+
+	PR ld/19013
+	* elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
+	will be handled by elf_link_input_bfd.  Rename abfd param to obfd.
+
+2015-09-30  Rich Felker  <dalias@libc.org>
+
+	* config.bfd (targ_selvecs): Add fdpic and misc targets
+	for sh*-*-linux*.
+
+2015-09-29  Andrew Stubbs  <ams@codesourcery.com>
+	    H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/19020
+	* bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
+	* bfd-in2.h: Regenerated.
+
+2015-08-11  Peter Zotov  <whitequark@whitequark.org>
+
+	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.
+
+2015-09-23  Nick Clifton  <nickc@redhat.com>
+
+	* bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
+	order to avoid problems with left shifting negative values.
+	(abs32code): Likewise.
+	* mach-o.c (FILE_ALIGN): Likewise.
+	* coff-rs6000.c (xcoff_debug_sections): Delete unused static
+	array.
+	* elf32-visium.c (visium_reloc_map): Likewise.
+	* elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
+	calls to abs function.
+	* elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
+	* elf32-score.c (score_elf_final_link_relocate): Likewise.
+	* elf32-score7.c (score_elf_final_link_relocate): Likewise.
+	* elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
+	of shifting to create a negative mask.
+	* elf32-msp430.c (elf_backend_special_sections): Define.
+	* elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
+	(got_hi16_reloc_p): Delete unused function.
+	* ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
+	partition name.
+
+2015-09-23  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/15835
+	* elf-bfd.h (struct elf_section_list): New structure.
+	(struct elf_obj_tdata): Replace symtab_shndx_hdr with
+	symtab_shndx_list.  Delete symtab_shndx_section.
+	(elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
+	* elf.c (bfd_elf_get_syms): If symtab index sections are present,
+	scan them for the section that matches the provided symbol table.
+	(bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
+	(assign_section_numbers): Use the first symtab index table in the
+	list.
+	(_bfd_elf_compute_section_file_positions): Replace use of
+	symtab_shndx_hdr with use of symtab_shndx_list.
+	(find_section_in_list): New function.
+	(assign_file_postions_except_relocs): Use new function.
+	(_bfd_elf_copy_private_symbol_data): Likewise.
+	(swap_out_syms): Handle multiple symbol table index sections.
+	* elf32-m32c.c (m32c_elf_relax_section): Replace use of
+	symtab_shndx_hdr with use of symtab_shndx_list.
+	* elf32-rl78.c (rl78_elf_relax_section): Likewise.
+	* elf32-rx.c (rx_relax_section): Likewise.
+	* elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
+	* elflink.c (bfd_elf_final_link): Likewise.
+
+2015-09-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd.c (bfd_update_compression_header): Use bfd_put_32 on
+	ch_type.
+	(bfd_check_compression_header): Use bfd_get_32 on ch_type.
+	(bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
+	on ch_type.
+
+2015-09-20  Rich Felker  <dalias@libc.org>
+
+	* elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
+	.interp when info->nointerp.
+	(bfd_elf_size_dynamic_sections): Adjust assert.
+	* elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
+	when info->nointerp.
+	* elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
+	* elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
+	* elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
+	* elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
+	* elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
+	* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
+	* elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
+	* elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
+	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+	* elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
+	* elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
+	* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
+	* elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
+	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+	* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
+	* elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
+	* elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
+	* elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
+	* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
+	* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
+	* elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
+	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+	* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+	* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
+	* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
+	* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+	* elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
+	* elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
+	* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
+
+2015-09-18  Doug Evans  <xdje42@gmail.com>
+
+	* targets.c (enum bfd_flavour): Add comment.
+	(bfd_flavour_name): New function.
+	* bfd-in2.h: Regenerate.
+
+2015-09-18  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
+	from no_tls_get_addr_opt.
+	* elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
+	(ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
+	default of -1.
+
+2015-09-17  Alan Modra  <amodra@gmail.com>
+
+	PR 18867
+	* elflink.c (elf_link_adjust_relocs): Correct start of insertion
+	sort main loop.
+
+2015-09-16  Alan Modra  <amodra@gmail.com>
+
+	PR 18867
+	* elflink.c (elf_link_adjust_relocs): Modify insertion sort to
+	insert a run.  Return status in case of malloc failure.
+	Adjust callers.
+
+2015-09-15  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (elf_xtensa_be_plt_entry)
+	(elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
+	windowed ABI.
+	(elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
+	up instructions according to ABI.
+
+2015-09-14  Rich Felker  <dalias@libc.org>
+
+	* elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
+	instead of clearing it on cross-section relocations.
+	(sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
+
+2015-09-12  Helge Deller  <deller@gmx.de>
+
+	PR ld/18514
+	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
+	size to 0.
+
+2015-09-09  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
+
+2015-09-09  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
+	TLS local dynamic traditional relocations types.
+	(elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
+	local executable relaxation.
+
+2015-09-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
+	convert_mov_to_lea.
+
+2015-09-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (R_386_irelative): Renamed to ...
+	(R_386_ext2): This.
+	(R_386_vt_offset): Updated.
+	(elf_i386_rtype_to_howto): Likewise.
+	(elf_i386_relocate_section): Likewise.
+
+2015-09-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18900
+	* elf32-i386.c (elf_i386_link_hash_entry): Add
+	func_pointer_refcount.
+	(elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
+	(elf_i386_get_local_sym_hash): Likewise.
+	(elf_i386_copy_indirect_symbol): Also copy
+	func_pointer_refcount.
+	(elf_i386_check_relocs): Increment func_pointer_refcount.
+	(elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
+	(elf_i386_allocate_dynrelocs): Don't create the PLT entry if
+	there are only function pointer relocations which can be
+	resolved at run-time.  Keep dynanamic relocations for run-time
+	function pointer initialization.
+	(elf_i386_relocate_section): Copy dynamic function pointer
+	relocations.
+	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
+	func_pointer_refcount.
+	(elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
+	(elf_x86_64_get_local_sym_hash): Likewise.
+	(elf_x86_64_copy_indirect_symbol): Also copy
+	func_pointer_refcount.
+	(elf_x86_64_check_relocs): Increment func_pointer_refcount.
+	(elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
+	(elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
+	there are only function pointer relocations which can be
+	resolved at run-time.  Keep dynanamic relocations for run-time
+	function pointer initialization.
+	(elf_x86_64_relocate_section): Copy dynamic function pointer
+	relocations.
+
+2015-09-01  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
+	if .opd section has been edited.
+
+2015-09-01  Alan Modra  <amodra@gmail.com>
+
+	PR 18878
+	* elf64-ppc.c (ARRAY_SIZE): Define.  Use throughout.
+	(enum ppc_stub_type): Add ppc_stub_save_res.
+	(struct map_stub): Add "next" and "needs_save_res".
+	(struct ppc_link_hash_entry): Add "save_res" flag.
+	(struct ppc_link_hash_table): Add "group".
+	(sfpr_define): Add stub_sec param.  Define symbol in stub_sec if
+	stub_sec is non-null.  Set "save_res".
+	(save_res_funcs): Make file scope, rename from funcs.  Adjust uses.
+	(ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
+	(ppc_build_one_stub): Handle ppc_stub_save_res.
+	(ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
+	stub for linker defined save_res sym.
+	(group_sections): Init new fields of struct map_stub.
+	(ppc64_elf_size_stubs): Reserve space for save/restore func copy.
+	(ppc64_elf_build_stubs): Copy save/restore funcs to groups.  Emit
+	alias syms too.
+	(ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
+
+2015-08-31  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (get_r2off): Return -1 on error.
+	(ppc_build_one_stub): Adjust for get_r2off change.  Don't emit
+	addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
+	(ppc_size_one_stub): Corresponding size changes for r2off stubs.
+	Add condition in test for -R objects.
+
+2015-08-31  Alan Modra  <amodra@gmail.com>
+
+	* section.c (section_id): Make file scope.
+	(bfd_get_next_section_id): New function.
+	* elf64-ppc.c (struct map_stub): Remove toc_off field.  Move decl.
+	(struct ppc_stub_hash_entry): Delete stub_sec and id_sec.  Add
+	group.  Update all uses.
+	(struct ppc_link_hash_table): Delete top_id, top_index, and
+	input_list.  Add sec_info_arr_size.  Rename stub_group to
+	sec_info, and make group info indirect.  Update stub_group refs
+	throughout file.
+	(ppc_add_stub): Don't look for stub_sec on link_sec stub_group
+	entry.
+	(ppc_build_one_stub): Delete FIXME.
+	(ppc64_elf_setup_section_lists): Size htab->sec_info for all
+	sections, not just input sections.  Don't create htab->input_list.
+	(ppc64_elf_next_input_section): Update to use sec_info union as
+	list pointer.
+	(PREV_SEC): Delete.
+	(group_sections): Pass "info" param rather than "htab".  Iterate
+	over output sections rather than input_list.  Use sec_info union
+	as list pointers.  Alloc atruct map_stub, and return fail status.
+	* bfd-in2.h: Regenerate.
+
+2015-08-31  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (elf_sort_symbol): Use correctly sized type for
+	calculating signed section->id difference.
+	(elf_link_add_object_symbols): Likewise.
+	* pef.c (bfd_pef_scan_start_address): Warning fix.
+	* vms-alpha.c (vms_new_section_hook): Likewise.
+
+2015-08-31  Alan Modra  <amodra@gmail.com>
+
+	* elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
+	(find_relocs_at_address_addr): Make "reloc_type" an enum.
+	(nds32_elf_relax_delete_blanks): Warning fix.
+	(nds32_elf_relax_loadstore): Correct loop bound.
+
+2015-08-31  Alan Modra  <amodra@gmail.com>
+
+	* section.c (struct bfd_section): Make "id" and "index" unsigned.
+	* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
+	* elf.c (elf_map_symbols): Likewise.
+	* elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
+	(struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
+	(ppc64_elf_setup_section_lists): Ditto for local vars.
+	* elf32-arm.c: Similarly to elf64-ppc.c.
+	* elf32-avr.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-m68hc1x.c: Likewise.
+	* elf32-metag.c: Likewise.
+	* elf32-nios2.c: Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* simple.c (struct saved_offsets): Make "section_count" unsigned.
+	* bfd-in2.h: Regenerate.
+
+2015-08-27  Alan Modra  <amodra@gmail.com>
+
+	PR 18867
+	* elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
+	(elf_backend_sort_relocs_p): Define.
+
+2015-08-26  Alan Modra  <amodra@gmail.com>
+
+	PR 18867
+	* elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
+	(cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
+	(ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
+	New functions.
+	(elf_link_adjust_relocs): Use an insertion sort to sort relocs.
+
+2015-08-26  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	PR ld/18401
+	* elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
+	ISA value to a bfd machine number.
+	(bfd_mips_isa_ext): Update the ISA level and revision if
+	necessary.  Use mips_mach_extends_p to decide if the ISA extension
+	needs to be set.
+	(_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
+	be inferred from the ABI setting.  Set the ISA level from the
+	maximum of the incoming and outgoing ISA levels.
+
+2015-08-25  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/18854
+	* elf.c (bfd_section_from_shdr): Replace assertions with warnings
+	about multiple symbol tables.
+
+2015-08-25  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
+	ILP64.
+	* bfd-in2.h: Regenerate.
+
+2015-08-22  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
+	Don't copy fields not set by _bfd_elf_swap_verdef_in.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
+	types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
+	BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
+	BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
+	BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
+	(elfNN_aarch64_final_link_relocate): Likewise.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
+	BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
+	BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
+	BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
+	BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/18276
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
+	types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
+	(elfNN_aarch64_final_link_relocate): Likewise.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
+	BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
+	BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
+	(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.
+
+2015-08-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_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_DTPREL_LO12_NC.
+
+2015-08-19  Alan Modra  <amodra@gmail.com>
+
+	* elf-s390-common.c: Simplify expressions using
+	bfd_linke_executable, bfd_link_pie and bfd_link_pic.
+	* elf32-arm.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-m68k.c: Likewise.
+	* elf32-nios2.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elflink.c: Likewise.
+
+2015-08-18  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
+	(elfNN_aarch64_relocate_section): Likewise.
+	(elfNN_aarch64_gc_sweep_hook): Likewise.
+	(elfNN_aarch64_check_relocs): Likewise.
+
+2015-08-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18841
+	* elf-bfd.h (elf_link_hash_table): Add dynsym.
+	* elf32-i386.c (elf_i386_reloc_type_class): Return
+	reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
+	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
+	* elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
+	(bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
+	(elf_final_link_info): Remove dynsym_sec.
+	(elf_link_output_extsym): Replace dynsym_sec with dynsym.
+	(bfd_elf_final_link): Remove reference to dynsym_sec.  Replace
+	dynsym_sec with dynsym.
+
+2015-08-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* aoutx.h: Replace shared, executable, relocatable and pie
+	fields with bfd_link_executable, bfd_link_dll,
+	bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
+	* bout.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-arm.c: Likewise.
+	* coff-i386.c: Likewise.
+	* coff-i960.c: Likewise.
+	* coff-m68k.c: Likewise.
+	* coff-mcore.c: Likewise.
+	* coff-mips.c: Likewise.
+	* coff-ppc.c: Likewise.
+	* coff-rs6000.c: Likewise.
+	* coff-sh.c: Likewise.
+	* coff-tic80.c: Likewise.
+	* coff-x86_64.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* coffgen.c: Likewise.
+	* cofflink.c: Likewise.
+	* ecoff.c: Likewise.
+	* ecofflink.c: Likewise.
+	* elf-bfd.h: Likewise.
+	* elf-eh-frame.c: Likewise.
+	* elf-ifunc.c: Likewise.
+	* elf-m10200.c: Likewise.
+	* elf-m10300.c: Likewise.
+	* elf-s390-common.c: Likewise.
+	* elf-vxworks.c: Likewise.
+	* elf.c: Likewise.
+	* elf32-arm.c: Likewise.
+	* elf32-avr.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-cr16.c: Likewise.
+	* elf32-cr16c.c: Likewise.
+	* elf32-cris.c: Likewise.
+	* elf32-crx.c: Likewise.
+	* elf32-d10v.c: Likewise.
+	* elf32-dlx.c: Likewise.
+	* elf32-epiphany.c: Likewise.
+	* elf32-fr30.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-ft32.c: Likewise.
+	* elf32-h8300.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-i370.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-i860.c: Likewise.
+	* elf32-ip2k.c: Likewise.
+	* elf32-iq2000.c: Likewise.
+	* elf32-lm32.c: Likewise.
+	* elf32-m32c.c: Likewise.
+	* elf32-m32r.c: Likewise.
+	* elf32-m68hc11.c: Likewise.
+	* elf32-m68hc1x.c: Likewise.
+	* elf32-m68k.c: Likewise.
+	* elf32-mcore.c: Likewise.
+	* elf32-mep.c: Likewise.
+	* elf32-metag.c: Likewise.
+	* elf32-microblaze.c: Likewise.
+	* elf32-moxie.c: Likewise.
+	* elf32-msp430.c: Likewise.
+	* elf32-mt.c: Likewise.
+	* elf32-nds32.c: Likewise.
+	* elf32-nios2.c: Likewise.
+	* elf32-or1k.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-rl78.c: Likewise.
+	* elf32-rx.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-score.c: Likewise.
+	* elf32-score7.c: Likewise.
+	* elf32-sh-symbian.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf32-sh64.c: Likewise.
+	* elf32-spu.c: Likewise.
+	* elf32-tic6x.c: Likewise.
+	* elf32-tilepro.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf32-visium.c: Likewise.
+	* elf32-xc16x.c: Likewise.
+	* elf32-xstormy16.c: Likewise.
+	* elf32-xtensa.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-hppa.c: Likewise.
+	* elf64-ia64-vms.c: Likewise.
+	* elf64-mmix.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-sh64.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+	* elflink.c: Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* elfnn-ia64.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* elfxx-sparc.c: Likewise.
+	* elfxx-tilegx.c: Likewise.
+	* i386linux.c: Likewise.
+	* linker.c: Likewise.
+	* m68klinux.c: Likewise.
+	* pdp11.c: Likewise.
+	* pe-mips.c: Likewise.
+	* peXXigen.c: Likewise.
+	* reloc.c: Likewise.
+	* reloc16.c: Likewise.
+	* sparclinux.c: Likewise.
+	* sunos.c: Likewise.
+	* vms-alpha.c: Likewise.
+	* xcofflink.c: Likewise.
+
+2015-08-18  Alan Modra  <amodra@gmail.com>
+
+	PR 18667
+	* Makefile.am: Use $(SED) in place of sed throughout.
+	* Makefile.in: Regenerate.
+
+2015-08-18  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
+	if already defined, and set linker_def.
+	(ppc64_elf_set_toc): Use .TOC. value if defined other than by
+	the backend.
+
+2015-08-14  Alan Modra  <amodra@gmail.com>
+
+	PR ld/18759
+	* elf32-or1k.c: Revert 2015-08-11 change.
+
+2015-08-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18801
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
+	for read-only segment with dynamic IFUNC relocations.
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+
+2015-08-12  Simon Dardis  <simon.dardis@imgtec.com>
+
+	* elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
+	(mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
+	mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
+	Update to use 'or' instead of 'addu/daddu'.
+	(_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
+	(move_insns_32): Reorder table.
+
+2015-08-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
+	relocations in debug sections.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
+	message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
+	(aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
+	Loose the check for symbol from ABS section.
+	(elfNN_aarch64_size_stubs): Pass sym_sec.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/18668
+	* elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
+	calls go through plt stub.
+	(elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
+	JUMP26 relocation to support inserting veneer for call to plt stub.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* 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.
+
+2015-08-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	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.
+
+2015-08-11  Peter Zotov  <whitequark@whitequark.org>
+
+	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.
+
+2015-08-11  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/18747
+	* coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
+	opcode count.
+
+	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.
+
+2015-08-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
+
+2015-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* 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.
+
+2015-08-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+	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.
+
+2015-08-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+	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 versioned symbol is defined
+	locally.
+
+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
+	* elflink.c (_bfd_elf_add_default_symbol): Add the default
+	symbol if not performing a relocatable link.
+	(elf_link_add_object_symbols): Adjust the default symbol if
+	not performing a relocatable link.
+
+2015-07-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (elf_link_add_object_symbols): Remove
+	!info->relocatable check for info->executable.  Add
+	!info->relocatable check for !info->executable.
+	(elf_link_output_extsym): Remove
+	!info->relocatable check for info->executable.
+
+2015-07-29  Hans-Peter Nilsson  <hp@bitrange.com>
+
+	* mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
+	assignment loop for bfd plugin objects.
+
+2015-07-28  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
+	segment for loaded sections after nonloaded sections if the
+	sections are on the same page.
+
+2015-07-28  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
+	* config.in, configure: Regenerate.
+
+2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* configure: Regenerated.
+
+2015-07-27  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-msp430.c (uses_large_model): New function.
+	(msp430_elf_eh_frame_address_size): New function.
+	(elf_backend_eh_frame_address_size): Define.
+
+2015-07-27  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	PR ld/18705
+	* elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
+
+2015-07-27  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	PR ld/18705
+	* elf32-arm.c (elf_backend_extern_protected_data): Define.
+
+2015-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18718
+	* elflink.c (elf_link_output_extsym): Check symbol version
+	section check only if not linking executable, the symbol is
+	referenced by shared library or not locally defined.
+
+2015-07-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
+	check if a symbol should be bound symbolically.
+	* elf32-hppa.c (elf32_hppa_check_relocs,
+	elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
+	elf32_hppa_finish_dynamic_symbol): Likewise.
+	* elf32-m68k.c (elf_m68k_check_relocs,
+	elf_m68k_relocate_section): Likewise.
+	* elf32-nios2.c (nios2_elf32_relocate_section,
+	nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
+	elf32_tic6x_relocate_section): Likewise.
+
+2015-07-24  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
+	prefix for reloc section corresponding to rela section associated
+	with renamed debug section.
+
+2015-07-24  Alan Modra  <amodra@gmail.com>
+
+	* section.c (bfd_get_section_by_name_if): Iterate over entire hash
+	chain.
+
+2015-07-23  Joseph Myers  <joseph@codesourcery.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
+	<DT_MIPS_RLD_MAP_REL>: Add target address to host address
+	difference, not to host pointer.
+
+2015-07-22  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (opd_entry_value): Remove assertion.  Instead,
+	return -1 if symbol referenced is not defined.  Tidy.
+
+2015-07-20  Alan Modra  <amodra@gmail.com>
+
+	* po/SRC-POTFILES.in: Regenerate.
+
+2015-07-17  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
+	(IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
+
+2015-07-16  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
+	BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
+	(aarch64_reloc_got_type): Ditto.
+	(elfNN_aarch64_final_link_relocate): Ditto.
+	(elfNN_aarch64_relocate_section): Ditto.
+	(elfNN_aarch64_gc_sweep_hook): Ditto.
+	(elfNN_aarch64_check_relocs): Ditto.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
+	(_bfd_aarch64_elf_resolve_relocation): Ditto.
+
+2015-07-16  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
+
+2015-07-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18656
+	* bfd.c (bfd_convert_section_size): New function.
+	(bfd_convert_section_contents): Likewise.
+	* bfd-in2.h: Regenerated.
+
+2015-07-09  Catherine Moore  <clm@codesourcery.com>
+
+	* elflink.c (bfd_elf_size_dynamic_sections): Call to
+	_bfd_elf_maybe_strip_eh_frame_hdr should be before
+	bed->elf_backend_size_dynamic_sections.
+
+2015-07-08  Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+
+	* elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
+
+2015-07-05  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
+	plus addend rather than the original st_value when looking up
+	entries in opd->adjust.
+
+2015-07-03   Kai Tietz  <ktietz@redhat.com>
+	     Nick Clifton  <nickc@redhat.com>
+
+	PR ld/11539
+	* coffcode.h (coff_bfd_gc_sections): Define default
+	to bfd_coff_gc_sections function.
+	(coff_gc_mark_hook_fn): New type.
+	* coffgen.c (init_reloc_cookie): Copy and adjust coff
+	related code about gc-sections from elflink.c to here.
+	(fini_reloc_cookie): Likewise.
+	(init_reloc_cookie_rels): Likewise.
+	(fini_reloc_cookie_rels): Likewise.
+	(init_reloc_cookie_for_section): Likewise.
+	(fini_reloc_cookie_for_section): Likewise.
+	(_bfd_coff_gc_mark_hook): Likewise.
+	(_bfd_coff_gc_mark_rsec): Likewise.
+	(_bfd_coff_gc_mark_reloc): Likewise.
+	(_bfd_coff_gc_mark): Likewise.
+	(_bfd_coff_gc_mark_extra_sections): Likewise.
+	(coff_gc_sweep_symbol_info): Likewise.
+	(coff_gc_sweep_symbol): Likewise.
+	(gc_sweep_hook_fn): Likewise.
+	(coff_gc_sweep): Likewise.
+	(bfd_coff_gc_sections): Likewise.
+	(_bfd_coff_gc_keep): Likewise.
+	* libcoff-in.h (coff_reloc_cookie): New struct.
+	(bfd_coff_gc_sections): New prototype.
+	* libcoff.h: Regenerate.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* bfd-in2.h: Regenerated.
+	* elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
+	(elf_nios2_r1_howto_table_rel): This.
+	(elf_nios2_r2_howto_table_rel): New.
+	(BFD_IS_R2): New.
+	(lookup_howto): Add ABFD parameter.  Adjust to look up in either
+	the R1 or R2 relocation table, as determined by ABFD.
+	(nios2_reloc_map): Add R2 relocations.
+	(nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
+	Pass it the ABFD parameter.
+	(nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
+	return an R1 or R2 relocation.
+	(nios2_elf32_info_to_howto): Do lookup using lookup_howto.
+	Pass it the ABFD parameter.
+	(nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
+	boundary.
+	(nios2_elf32_relocate_section): Adjust call to lookup_howto.
+	* libbfd.h: Regenerated.
+	* reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
+	(BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
+	(BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
+	(BFD_RELOC_NIOS2_R2_T1I7_2): New.
+	(BFD_RELOC_NIOS2_R2_T2I4): New.
+	(BFD_RELOC_NIOS2_R2_T2I4_1): New.
+	(BFD_RELOC_NIOS2_R2_T2I4_2): New.
+	(BFD_RELOC_NIOS2_R2_X1I7_2): New.
+	(BFD_RELOC_NIOS2_R2_X2L5): New.
+	(BFD_RELOC_NIOS2_R2_F1I5_2): New.
+	(BFD_RELOC_NIOS2_R2_L5I4X1): New.
+	(BFD_RELOC_NIOS2_R2_T1X1I6): New.
+	(BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
+	* bfd-in2.h: Regenerated.
+	* cpu-nios2.c (nios2_compatible): New.
+	(N): Use nios2_compatible instead of bfd_default_compatible.
+	(NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
+	(arch_info_struct): New.
+	(bfd_nios2_arch): Chain to NIOS2R1_NEXT.
+	* elf32-nios2.c (is_nios2_elf): New.
+	(nios2_elf32_merge_private_bfd_data): New.
+	(nios2_elf32_object_p): New.
+	(bfd_elf32_bfd_merge_private_bfd_data): Define.
+	(elf_backend_object_p): Define.
+
+2015-07-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
+
+2015-06-30  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/18570
+	* elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
+	(write_obj_attribute): Likewise.
+	(elf_new_obj_attr): Likewise.
+	(bfd_elf_get_obj_attr_int): Likewise.
+	(bfd_elf_add_obj_attr_int): Likewise.
+	(bfd_elf_add_obj_attr_string): Likewise.
+	(bfd_elf_add_obj_attr_int_string): Likewise.
+	(gnu_obj_attrs_arg_type): Likewise.
+	(_bfd_elf_obj_attrs_arg_type): Likewise.
+	(_bfd_elf_parse_attributes): Likewise.
+	(_bfd_elf_merge_unknown_attribute_list): Likewise.
+	* elf-bfd.h (struct obj_attribute_list): Likewise.
+	Update prototypes.
+
+2015-06-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd-in.h (compressed_debug_section_type): Remove
+	COMPRESS_DEBUG_ZLIB.
+	* bfd-in2.h : Regenerated.
+
+2015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
+	instead of !shared to indicate an application vs shared library.
+	(_bfd_mips_elf_size_dynamic_sections): Likewise.
+	(_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
+	(_bfd_mips_elf_get_target_dtag): Likewise.
+
+2015-06-25  DJ Delorie  <dj@redhat.com>
+
+	* elf32-msp430.c (msp430_final_link_relocate): Fix comments.  Fix
+	REL loads to match RELA stores.
+
+2015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (_bfd_elf_compute_section_file_positions): Don't
+	initialize sh_size for .shstrtab here.
+
+2015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/18451
+	* elf-bfd.h (elf_sym_strtab): New.
+	(elf_link_hash_table): Add strtabcount, strtabsize and
+	strtab.
+	(_bfd_elf_stringtab_init): Removed.
+	* elf.c (_bfd_elf_stringtab_init): Removed.
+	(_bfd_elf_compute_section_file_positions): Replace
+	bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
+	_bfd_stringtab_size with
+	elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
+	_bfd_elf_strtab_size.  Use _bfd_elf_strtab_add,
+	_bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
+	st_name.
+	(swap_out_syms): Likewise.
+	* elflink.c (elf_final_link_info): Replace bfd_strtab_hash
+	with elf_strtab_hash.  Remove symbuf, symbuf_count,
+	symbuf_size and shndxbuf_size.
+	(elf_link_flush_output_syms): Removed.
+	(elf_link_output_sym): Renamed to ...
+	(elf_link_output_symstrtab): This.  Replace _bfd_stringtab_add
+	with _bfd_elf_strtab_add.  Don't flush symbols to the file nor
+	swap out symbols.
+	(elf_link_swap_symbols_out): New.
+	(elf_link_output_extsym): Replace elf_link_output_sym with
+	elf_link_output_symstrtab.
+	(elf_link_input_bfd): Likewise.
+	(elf_final_link_free): Replace _bfd_stringtab_free with
+	_bfd_elf_strtab_free.  Remove symbuf.
+	(bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
+	_bfd_elf_strtab_init.  Don't set symbuf, symbuf_count,
+	symbuf_size nor shndxbuf_size.  Initialize strtabsize and
+	strtab.  Initialize symshndxbuf to -1 when number of sections
+	>= 64K.  Replace elf_link_output_sym/elf_link_output_sym with
+	elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
+	call elf_link_flush_output_syms.  Call _bfd_elf_strtab_finalize
+	and elf_link_swap_symbols_out.  Replace _bfd_stringtab_size
+	and _bfd_stringtab_emit with _bfd_elf_strtab_size and
+	_bfd_elf_strtab_emit.
+
+2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
+	GCC warning.
+
+2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
+	space for the first .plt entry.
+	(elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
+	section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
+	there are PLT relocations.
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
+	allocate space for the first .plt entry.
+	(elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
+	.plt section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
+	there are PLT relocations.
+
+2015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18591
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
+	R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
+	overflow.
+
+2015-06-23  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
+	(elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
+	relocations against read-only sections.
+
+2015-06-18  Nick Clifton  <nickc@redhat.com>
+
+	PR 18481
+	* elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
+
+2015-06-15  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* bfd.c: Change struct bfd_build_id to use bfd_size_type.
+	* bfd-in2.h : Regenerate.
+
+2015-06-16  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
+	dynamic relocs.
+
+2015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* elf-bfd.h : Remove struct elf_build_id.
+	* bfd.c : Add struct bfd_build_id.
+	* bfd-in2.h: Regenerate.
+	* elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
+	* libpei.h: Add protoype and macros for
+	bfd_XXi_slurp_codeview_record.
+	* peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
+	* peicode.h (pe_bfd_read_buildid): Add.
+	(pe_bfd_object_p): Use pe_bfd_read_buildid().
+
+2015-06-15  Renlin Li  <renlin.li@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
+
+2015-06-15  Alan Modra  <amodra@gmail.com>
+
+	* cofflink.c (_bfd_coff_generic_relocate_section): Revert
+	2014-03-26 change.  Call _bfd_clear_contents for relocs against
+	local and global symbols defined in discarded input sections.
+
+2015-06-05  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-msp430.c (rl78_sym_diff_handler): New function.
+	(msp430_howto_table): Use the new function for the SYM_DIFF reloc.
+	(msp430x_howto_table): Likewise.
+
+2015-06-05  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
+	relocs with insns moved by --ppc476-workaround.  Correct
+	output of REL16 relocs.
+
+2015-06-01  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
+	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
+	(elfNN_aarch64_final_link_relocate): Ditto.
+	(elfNN_aarch64_gc_swap_hook): Ditto.
+	(elfNN_aarch64_check_relocs): Ditto.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
+
+2015-06-01  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
+
+2015-06-01  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
+	complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
+	PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
+
+2015-06-01  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
+	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
+	(elfNN_aarch64_final_link_relocate): Ditto.
+	(elfNN_aarch64_gc_swap_hook): Ditto.
+	(elfNN_aarch64_check_relocs): Ditto.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
+
+2015-06-01  Jiong Wang  <jiong.wang@arm.com>
+
+	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
+	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
+
+2015-05-28  Catherine Moore  <clm@codesourcery.com>
+	    Bernd Schmidt <bernds@codesourcery.com>
+	    Paul Brook <paul@codesourcery.com>
+
+	* bfd-in2.h: Regenerated.
+	* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
+	(COMPACT_EH_CANT_UNWIND_OPCODE): Define.
+	(dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
+	eh_frame_hdr_info.
+	(compact_eh_frame_hdr_info): Declare.
+	(eh_frame_hdr_info):  Redeclare with union for dwarf-specific
+	fields and compact-eh fields.
+	(elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
+	(bfd_elf_section_data): Add eh_frame_entry_field.
+	(elf_section_eh_frame_entry): Define.
+	(bfd_elf_parse_eh_frame_entries): Declare.
+	(_bfd_elf_parse_eh_frame_entry): Declare.
+	(_bfd_elf_end_eh_frame_parsing): Declare.
+	(_bfd_elf_write_section_eh_frame_entry): Declare.
+	(_bfd_elf_eh_frame_entry_present): Declare.
+	(_bfd_elf_section_for_symbol): Declare.
+	* elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
+	(bfd_elf_record_eh_frame_entry): New function.
+	(_bfd_elf_parse_eh_frame_entry): New function.
+	(_bfd_elf_parse_eh_frame): Update hdr_info field references.
+	(cmp_eh_frame_hdr): New function.
+	(add_eh_frame_hdr_terminator): New function.
+	(_bfd_elf_end_eh_frame_parsing): New function.
+	(find_merged_cie): Update hdr_info field references.
+	(_bfd_elf_discard_section_eh_frame): Likewise.
+	(_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
+	(_bfd_elf_eh_frame_entry_present): New function.
+	(_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
+	(_bfd_elf_write_section_eh_frame_entry): New function.
+	(_bfd_elf_write_section_eh_frame): Update hdr_info field references.
+	(_bfd_elf_fixup_eh_frame_hdr): New function.
+	(write_compact_eh_frame_hdr): New function.
+	(write_dwarf_eh_frame_hdr): New function.
+	(_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
+	* elflink.c (_bfd_elf_section_for_symbol): New function.
+	(elf_section_ignore_discarded_relocs): Add Compact EH support.
+	(elf_link_input_bfd): Likewise.
+	(bfd_elf_final_link): Likewise.
+	(_bfd_elf_gc_mark): Likewise.
+	(bfd_elf_parse_eh_frame_entries): New function.
+	(bfd_elf_gc_sections): Add Compact EH support.
+	(bfd_elf_discard_info): Likewise.
+	* elfxx-mips.c: Include dwarf2.h.
+	(_bfd_mips_elf_compact_eh_encoding): New function.
+	(_bfd_mips_elf_cant_unwind_opcode): New function.
+	* elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
+	(_bfd_mips_elf_cant_unwind_opcode): Declare.
+	(elf_backend_compact_eh_encoding): Define.
+	(elf_backend_cant_unwind_opcode): Define.
+	* elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
+	(elf_backend_cant_unwind_opcode): Provide default.
+	(elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
+	elf_backend_cant_unwind_opcode.
+	* section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
+
+2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18458
+	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
+	for now binding only if pointer equality isn't needed.
+	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
+	binding only if pointer equality isn't needed.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
+	section for now binding only if pointer equality isn't needed.
+	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
+	binding only if pointer equality isn't needed.
+
+2015-05-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18437
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
+	in .rel.plt/.rela.plt.
+	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
+
+2015-05-19  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
+	relocation case labels alphabetically.
+	(elfNN_aarch64_final_link_relocate): Ditto.
+	(elfNN_aarch64_tls_relax): Ditto.
+	(elfNN_aarch64_relocate_section): Ditto.
+	(elfNN_aarch64_gc_sweep_hook): Ditto.
+	(elfNN_aarch64_check_relocs): Ditto.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
+	(_bfd_aarch64_elf_resolve_relocation): Ditto.
+
+2015-05-18  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
+	comments.
+
+2015-05-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
+	for now binding.
+	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
+	binding.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
+	section for now binding.
+	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
+	binding.
+
+2015-05-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd.c (bfd_update_compression_header): Also write the zlib
+	header if the SHF_COMPRESSED bit cleared..
+	(bfd_check_compression_header): Return the uncompressed size.
+	* compress.c (decompress_contents): Don't skip the zlib header.
+	(bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
+	which doesn't have the zlib header.
+	(bfd_init_section_decompress_status): Likewise.
+	(bfd_get_full_section_contents): Updated.
+	(bfd_is_section_compressed): Likewise.
+	(bfd_is_section_compressed_with_header): Return the uncompressed
+	size.
+	* elf.c (_bfd_elf_make_section_from_shdr): Updated.
+	* bfd-in2.h: Regenerated.
+
+2015-05-14  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
+	check restrictions.
+
+2015-05-14  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
+	as GOT reference when plt.refcount is not positive.
+
+2015-05-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
+	for the first .plt entry only if needed.
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
+2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
+	(ALL_MACHINES_CFILES): Likewise.
+	* archures.c (bfd_mach_iamcu): New.
+	(bfd_mach_i386_iamcu): Likewise.
+	(bfd_mach_i386_iamcu_intel_syntax): Likewise.
+	(bfd_iamcu_arch): Likewise.
+	(bfd_archures_list): Add &bfd_iamcu_arch.
+	* config.bfd (targ_selvecs): Add iamcu_elf32_vec to
+	i386_elf32_vec.
+	(targ_archs): Add bfd_iamcu_arch if needed.
+	* configure.ac: Support iamcu_elf32_vec.
+	* cpu-iamcu.c: New file.
+	* elf32-i386.c (elf32_iamcu_elf_object_p): New function.
+	Add support for iamcu_elf32_vec and elf32_iamcu_bed.
+	* targets.c (iamcu_elf32_vec): New.
+	(_bfd_target_vector): Add iamcu_elf32_vec.
+	* Makefile.in: Regenerated.
+	* bfd-in2.h: Likewise.
+	* configure: Likewise.
+
+2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
+
+2015-05-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
+	and output_bfd with abfd.
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
+2015-05-06  Toni Spets  <toni.spets@iki.fi>
+
+	PR ld/18372
+	* peXXigen.c (rsrc_process_section): Skip discarded resource
+	sections.
+
+2015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config.bfd: Support i[3-7]86-*-elf*.
+
+2015-04-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_backend_post_process_headers): Undef for
+	Solaris 2.
+
+2015-04-30  Nick Clifton  <nickc@redhat.com>
+
+	PR 18317
+	* elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
+	mep_reloc.
+	(mep_reloc): Delete unused function.
+
+2015-04-29  Nick Clifton  <nickc@redhat.com>
+
+	PR 17099
+	* coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
+	relocs.
+
+2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
+	* elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
+	elf_s390_merge_obj_attributes.
+	* elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
+
+2015-04-24  Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/18270
+	* elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
+	GOT_NORMAL for both sgot/srelgot section.
+	(elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
+	and generate necessary runtime relocation for GOT entry.
+
+2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18209
+	* archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
+
+2015-04-24  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
+	PC-relative relocation for external symbol.
+
+2015-04-24  Nick Clifton  <nickc@redhat.com>
+
+	PR 18313
+	* compress.c (decompress_contents): Zero initialse the z_stream
+	structure.
+
+2015-04-24  Nick Clifton  <nickc@redhat.com>
+
+	* elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
+	local labels to include local labels with a numeric suffix and
+	fake symbols.
+
+2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18316
+	* section.c (SEC_MEP_VLIW): New.
+	* bfd-in2.h: Regenerated.
+
+2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18277
+	* compress.c (bfd_compress_section_contents): Remove the
+	write_compress argument.
+	(bfd_init_section_compress_status): Updated.
+	(bfd_compress_section): Likewise.
+	* elf.c (_bfd_elf_set_reloc_sh_name): New.
+	(_bfd_elf_init_reloc_shdr): Add delay_st_name_p.  Set sh_name
+	to (unsigned int) -1 if delay_st_name_p is TRUE.  Use
+	_bfd_elf_set_reloc_sh_name.
+	(elf_fake_sections): Don't rename DWARF debug section for
+	linker output if it will be compressed.  Instead, set
+	delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
+	(assign_section_numbers): Call _bfd_elf_strtab_addref only if
+	sh_name != (unsigned int) -1.  Don't finalize nor assign
+	shstrtab section here.  Delay setting output section names to
+	_bfd_elf_write_object_contents.
+	(_bfd_elf_compute_section_file_positions): Update comments on
+	sh_offset for shstrtab section.
+	(assign_file_positions_for_non_load_sections): Set sh_offset to
+	-1 for shstrtab section.
+	(assign_file_positions_except_relocs): Likewise.
+	(_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
+	when compressing DWARF debug sections.  Place shstrtab section
+	after DWARF debug sections have been compressed.
+	(_bfd_elf_write_object_contents): Setting sh_name for output
+	sections.
+
+2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18209
+	* bfd.c (bfd): Add is_linker_input.
+	* elf.c (convert_debug_to_zdebug): New.
+	(convert_zdebug_to_debug): Likewise.
+	(_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
+	.zdebug_* here.  Use convert_zdebug_to_debug.  Set SEC_ELF_RENAME.
+	(_bfd_elf_init_reloc_shdr): Pass a pointer to section name
+	instead of a pointer to section.
+	(elf_fake_sections): Rename the section name if SEC_ELF_RENAME
+	is set.
+	* section.c (SEC_ELF_RENAME): New.
+	* bfd-in2.h: Regenerated.
+
+2015-04-23  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (TOC_BASE_ALIGN): Define.
+	(ppc64_elf_next_toc_section): Align multi-got toc base.
+	(ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
+
+2015-04-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18289
+	* elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
+	(elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
+	(elf_i386_create_dynamic_sections): Always allow copy relocs for
+	building executables.
+	(elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
+	(elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
+	(elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
+	PIE and R_386_GOTOFF.
+	(elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
+
+2015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (assign_section_numbers): Always set up sh_name.
+
+2015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (assign_file_positions_for_non_load_sections): Iterate
+	sections by pointer.
+	(_bfd_elf_assign_file_positions_for_non_load): Likewise.
+
+2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd-in.h (compressed_debug_section_type): New.
+	* compress.c (bfd_compress_section_contents): Add an argument
+	for linker write compression and always generate .zdebug_*
+	section when linking.
+	(bfd_init_section_compress_status): Pass FALSE to
+	bfd_compress_section_contents.
+	(bfd_compress_section): New function.
+	* elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
+	on DWARF debug sections if COMPRESS_DEBUG is set and rename
+	section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
+	(assign_file_positions_for_non_load_sections): Set sh_offset
+	to -1 if SEC_ELF_COMPRESS is set.
+	(assign_file_positions_except_relocs): Likwise.
+	(_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
+	(_bfd_elf_assign_file_positions_for_non_load): This.  Change
+	return time to bfd_boolean.  Compress the section if
+	SEC_ELF_COMPRESS is set.
+	(_bfd_elf_write_object_contents): Updated.
+	(_bfd_elf_set_section_contents): Write section contents to
+	the buffer if SEC_ELF_COMPRESS is set.
+	* merge.c: Include "elf-bfd.h".
+	(sec_merge_emit): Add arguments for contents and offset.  Write
+	to contents with offset if contents isn't NULL.
+	(_bfd_write_merged_section): Write section contents to the
+	buffer if SEC_ELF_COMPRESS is set.  Pass contents and
+	output_offset to sec_merge_emit.
+	* elflink.c (bfd_elf_final_link): Allocate the buffer for
+	output section contents if SEC_ELF_COMPRESS is set.
+	* section.c (SEC_ELF_COMPRESS): New.
+	* bfd-in2.h: Regenerated.
+
+2015-04-15  Alan Modra  <amodra@gmail.com>
+
+	* elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
+
+2015-04-14  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-rl78.c (RL78_OP_REL): New macro.
+	(rl78_elf_howto_table): Use it for complex relocs.
+	(get_symbol_value): Handle the cases when the info or status
+	arguments are NULL.
+	(get_romstart): Cache the status returned by get_symbol_value.
+	(get_ramstart): Likewise.
+	(RL78_STACK_PUSH): Generate an error message if the stack
+	overflows.
+	(RL78_STACK_POP): Likewise for underflows.
+	(rl78_compute_complex_reloc): New function.  Contains the basic
+	processing code for all RL78 complex relocs.
+	(rl78_special_reloc): New function.  Provides special reloc
+	handling for complex relocs.
+	(rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
+	(rl78_offset_for_reloc): Likewise.
+
+2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/pr17709
+	* elflink.c (_bfd_elf_adjust_dynamic_copy): Check
+	info->extern_protected_data when warning copy relocs against
+	protected symbols.
+	(_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
+	when checking protected non-function symbols.
+
+2015-04-13  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
+	FreeBSD.
+	(elfcore_write_xstatereg): Use correct note name on FreeBSD.
+
+2015-04-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18250
+	* elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
+	if the object has been claimed by plugin.
+
+2015-04-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
+	with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
+	protected data symbol when building shared library.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Check
+	R_X86_64_GOTOFF64 against undefined symbol and replace
+	SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
+	R_X86_64_GOTOFF64 against protected data symbol when building
+	shared library.
+
+2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/pr17709
+	* elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
+	against protected data symbol when building shared library.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
+	R_X86_64_GOTOFF64 against protected data symbol when building
+	shared library.
+
+2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/pr15228
+	PR ld/pr17709
+	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
+	* elf32-i386.c (elf_backend_extern_protected_data): New.
+	Defined to 1.
+	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
+	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
+	copy relocs against protected symbols if extern_protected_data
+	is true.
+	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
+	non-function symbols if extern_protected_data is true.
+	* elfxx-target.h (elf_backend_extern_protected_data): New.
+	Default to 0.
+	(elfNN_bed): Initialize extern_protected_data with
+	elf_backend_extern_protected_data.
+
+2015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (bfd_compress_section_contents): Replace bfd_malloc
+	and free with bfd_alloc and bfd_release on compressed buffer.
+	Release buffer if compressed section isn't smaller.
+
+2015-04-10  Alan Modra  <amodra@gmail.com>
+
+	PR ld/18222
+	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
+	on adding a protected visibility variable to .dynbss.
+
+2015-04-10  Alan Modra  <amodra@gmail.com>
+
+	Revert 2015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
+	PR ld/pr15228
+	PR ld/pr17709
+	* elf-bfd.h (elf_backend_data): Delete extern_protected_data.
+	* elf32-i386.c (elf_backend_extern_protected_data): Delete.
+	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
+	* elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
+	extern_protected_data test.
+	(_bfd_elf_symbol_refs_local_p): Likewise.
+	* elfxx-target.h (elf_backend_extern_protected_data): Delete.
+	(elfNN_bed): Delete elf_backend_extern_protected_data init.
+
+2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (bfd_compress_section_contents): Update comments.
+	(bfd_init_section_decompress_status): Likewise.
+	(bfd_init_section_compress_status): Likewise.
+
+2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
+	object_flags.
+	(TARGET_LITTLE_SYM): Likewise.
+
+2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (splay-tree.h): include header.
+	(text_action_struct): drop next pointer.
+	(text_action_list_struct): drop head pointer, add count and
+	tree fields.
+	(find_fill_action): instead of linear search in text_action_list
+	search in the tree.
+	(text_action_compare, action_first, action_next): new functions.
+	(text_action_add, text_action_add_literal): instead of linear
+	search and insertion insert new node into the tree.
+	(removed_by_actions): pass additional parameter: action_list,
+	use it to traverse the tree.
+	(offset_with_removed_text): pass additional action_list parameter
+	to removed_by_actions.
+	(map_action_fn_context): new typedef.
+	(map_action_fn_context_struct): new structure.
+	(map_action_fn): new function.
+	(map_removal_by_action): use splay_tree_foreach to build map.
+	(find_insn_action): replace linear search in text_action_list
+	with series of splay_tree_lookups.
+	(print_action, print_action_list_fn): new functions.
+	(print_action_list): use splay_tree_foreach.
+	(init_xtensa_relax_info): drop action_list.head initialization.
+	Initialize the tree.
+	(compute_text_actions): use non-zero action_list_count instead of
+	non-NULL action list.
+	(xlate_map_context): new typedef.
+	(xlate_map_context_struct): new structure.
+	(xlate_map_fn): new function.
+	(build_xlate_map): use splay_tree_foreach to build map.
+	(action_remove_bytes_fn): new function.
+	(relax_section): use zero action_list_count instead of NULL
+	action list. Use splay_tree_foreach to count final section size.
+	Drop unused variable 'removed'.
+
+2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (removed_literal_map_entry): new typedef.
+	(removed_literal_map_entry_struct): new structure.
+	(removed_literal_list_struct): add new fields: n_map and map.
+	(map_removed_literal, removed_literal_compare): new functions.
+	(find_removed_literal): build index array for literals ordered
+	by VMA, use binary search to find removed literal.
+
+2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (removal_by_action_entry_struct,
+	removal_by_action_map_struct): new structures.
+	(removal_by_action_entry, removal_by_action_map): new typedefs.
+	(text_action_list_struct): add new field: map.
+	(map_removal_by_action, removed_by_actions_map,
+	offset_with_removed_text_map): new functions.
+	(relax_section): replace offset_with_removed_text with
+	offset_with_removed_text_map.
+	(translate_reloc, relax_property_section, relax_section_symbols):
+	replace removed_by_actions with removed_by_actions_map.
+
+2015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
+	reloc_range): new typedef.
+	(reloc_range_list_struct, reloc_range_list_entry_struct,
+	reloc_range_struct): new structures.
+	(reloc_range_compare, build_reloc_ranges,
+	reloc_range_list_append, reloc_range_list_remove,
+	reloc_range_list_update_range, free_reloc_range_list): new
+	functions.
+	(compute_text_actions): precompute relocation opcodes before the
+	loop. Add relevant_relocs variable, initialize it before the
+	loop, pass it to the check_section_ebb_pcrels_fit.
+	(check_section_ebb_pcrels_fit): add new parameter:
+	relevant_relocs. Update address range in the relevant_relocs if
+	it's non-NULL and iterate only over relevant relocations.
+
+2015-04-09  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-rx.c (describe_flags): Report the settings of the string
+	insn using bits.
+	(rx_elf_merge_private_bfd_data): Handle merging of the string insn
+	using bits.
+
+2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (bfd_compress_section_contents): Work around a GCC
+	uninitialized warning bug fixed in GCC 4.7.
+
+2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
+	bit.
+	* bfd.c (bfd::flags): Increase size to 18 bits.
+	(BFD_COMPRESS_GABI): New.
+	(BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
+	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
+	(bfd_update_compression_header): New fuction.
+	(bfd_check_compression_header): Likewise.
+	(bfd_get_compression_header_size): Likewise.
+	(bfd_is_section_compressed_with_header): Likewise.
+	* compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
+	(bfd_compress_section_contents): Return the uncompressed size if
+	the full section contents is compressed successfully.  Support
+	converting from/to .zdebug* sections.
+	(bfd_get_full_section_contents): Call
+	bfd_get_compression_header_size to get compression header size.
+	(bfd_is_section_compressed): Renamed to ...
+	(bfd_is_section_compressed_with_header): This.  Add a pointer
+	argument to return compression header size.
+	(bfd_is_section_compressed): Use it.
+	(bfd_init_section_decompress_status): Call
+	bfd_get_compression_header_size to get compression header size.
+	Return FALSE if uncompressed section size is 0.
+	* elf.c (_bfd_elf_make_section_from_shdr): Support converting
+	from/to .zdebug* sections.
+	* bfd-in2.h: Regenerated.
+
+2015-04-07  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
+	mapped to output .got section.
+
+2015-04-07  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
+	and has_addr16_lo.  Make has_sda_refs a bitfield.
+	(ppc_elf_check_relocs): Set new flags.
+	(ppc_elf_link_hash_table_create): Update default_params.
+	(ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
+	where we won't be making .dynbss entries or editing code.  Set
+	params->pic_fixup when we'll edit code for protected var access.
+	(allocate_dynrelocs): Allocate got entry for edited code and
+	discard dyn_relocs.
+	(struct ppc_elf_relax_info): Add picfixup_size.
+	(ppc_elf_relax_section): Rename struct one_fixup to struct
+	one_branch_fixup.  Rename fixups to branch_fixups.  Size space for
+	pic fixups.
+	(ppc_elf_relocate_section): Edit non-PIC accessing protected
+	visibility variables to PIC.  Don't emit dyn_relocs for code
+	we've edited.
+	* elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
+
+2015-04-07  Nick Clifton  <nickc@redhat.com>
+
+	* elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
+	local labels as local.
+
+2015-04-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (get_uncompressed_size): Removed.
+	(bfd_compress_section_contents): Use bfd_putb64 to write
+	uncompressed section size.
+	(bfd_init_section_decompress_status): Replace
+	get_uncompressed_size with bfd_getb64.
+
+2015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (_bfd_elf_init_private_section_data): Also preserve the
+	SHF_COMPRESSED bit if not decompress.
+
+2015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (get_uncompressed_size): New.  Extracted from ...
+	(bfd_init_section_decompress_status): This.  Use it.
+
+2015-04-02  Andrew Turner  <andrew@freebsd.org>
+
+	* config.bfd: Add aarch64-*-freebsd* target triple.
+
+2015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* configure: Regenerated.
+
+2015-04-01  Tejas Belagod  <tejas.belagod@arm.com>
+	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
+	    Jiong Wang  <jiong.wang@arm.com>
+
+	* bfd-in.h (bfd_elf64_aarch64_set_options)
+	(bfd_elf32_aarch64_set_options): Add parameter.
+	* bfd-in2.h: Regenerated.
+	* elfnn-aarch64.c (aarch64_erratum_843419_stub)
+	(_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
+	(_bfd_aarch64_erratum_843419_stub_name)
+	(_bfd_aarch64_erratum_843419_fixup)
+	(_bfd_aarch64_erratum_843419_scan)
+	(_bfd_aarch64_erratum_843419_branch_to_stub)
+	(_bfd_aarch64_erratum_843419_p): Define.
+	(enum elf_aarch64_stub_type): Define
+	aarch64_stub_erratum_843419_veneer.
+	(struct elf_aarch64_stub_hash_entry): Define adrp_offset.
+	(struct elf_aarch64_link_hash_table): Define fix_erratum_843419
+	and fix_erratum_843419_adr.
+	(stub_hash_newfunc): Initialize adrp_offset;
+	(_bfd_aarch64_add_stub_entry_after): Define.
+	(aarch64_map_one_stub, aarch64_build_one_stub)
+	(aarch64_size_one_stub): Handle
+	aarch64_stub_erratum_843419_veneer.
+	(_bfd_aarch64_resize_stubs): Round stub section size.
+	(elfNN_aarch64_size_stubs): Add scan for 843419.
+	(bfd_elfNN_aarch64_set_options): Add parameter. Initialize
+	fix_erratum_843419 and fix_erratum_843419_adr.
+	(struct erratum_835769_branch_to_stub_data): Add info.
+	(elfNN_aarch64_write_section): Initialise info.  Handle 843419.
+	(elfNN_aarch64_size_dynamic_sections): Handle 843419.
+	* elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
+	(_bfd_aarch64_sign_extend): Define.
+	(reencode_adr_imm): Remove static. Rename to:
+	(_bfd_aarch64_reencode_adr_imm): Define.
+	(_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
+	* elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
+	(AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
+	(_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
+	Define.
+
+2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* configure: Regenerated.
+
+2015-03-31  Ed Schouten  <ed@nuxi.nl>
+
+	* config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
+	for x86_64-*-cloudabi*.
+	* configure.ac: Handle x86_64_elf64_cloudabi_vec.
+	* configure: Regenerated.
+	* elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
+	(TARGET_LITTLE_NAME): Likewise.
+	(ELF_OSABI): Likewise.
+	(elf64_bed): Likewise.
+	* targets.c (x86_64_elf64_cloudabi_vec): New.
+	(_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
+
+2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* configure.ac: Revert the AM_ZLIB change.
+	* Makefile.in: Regenerated.
+	* aclocal.m4: Likewise.
+	* configure: Likewise.
+	* doc/Makefile.in: Likewise.
+
+2015-03-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18169
+	* elf-bfd.h (elf_backend_data): Add get_reloc_section.
+	(_bfd_elf_get_reloc_section): New.
+	* elf.c (_bfd_elf_get_reloc_section): Likewise.
+	(assign_section_numbers): Call get_reloc_section to look up the
+	section the relocs apply.
+	* elfxx-target.h (elf_backend_get_reloc_section): Likewise.
+	(elfNN_bed): Initialize get_reloc_section with
+	elf_backend_get_reloc_section.
+
+2015-03-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (ZLIB): New.
+	(ZLIBINC): Likewise.
+	(AM_CFLAGS): Add $(ZLIBINC).
+	(libbfd_la_LIBADD): Add $(ZLIB).
+	* compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
+	(decompress_contents): Don't check HAVE_ZLIB_H.
+	(bfd_compress_section_contents): Likewise.
+	(bfd_get_full_section_contents): Likewise.
+	(bfd_init_section_decompress_status): Likewise.
+	(bfd_init_section_compress_status): Likewise.
+	* configure.ac (AM_ZLIB): Removed.
+	(zlibdir): New.  AC_SUBST.
+	(zlibinc): Likewise.
+	Add --with-system-zlib.
+	* Makefile.in: Regenerated.
+	* acinclude.m4: Likewise.
+	* config.in: Likewise.
+	* configure: Likewise.
+	* doc/Makefile.in: Likewise.
+
+2015-03-27  Alan Modra  <amodra@gmail.com>
+
+	PR ld/15228
+	PR ld/18167
+	* elflink.c (elf_merge_st_other): Add "sec" parameter.  Don't set
+	protected_def when symbol section is read-only.  Adjust all calls.
+	* elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
+
+2015-03-26  Tejas Belagod  <tejas.belagod@arm.com>
+
+	* elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
+	_bfd_final_link_relocate with aarch64_relocate.
+
+2015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18160
+	* elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
+	(bfd_elf_gc_sections): Likewise.
+
+2015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
+	size for initial branch.
+	(elfNN_aarch64_build_stubs): Write initial branch.
+	_bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
+	mapping symbol on initial branch.
+
+2015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
+	Update erratum count.
+
+2015-03-25  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	* elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
+	first matching debug section.
+
+2015-03-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/18087
+	* compress.c (bfd_compress_section_contents): Don't write the
+	zlib header and set contents as well as compress_status if
+	compression didn't make the section smaller.
+	(bfd_init_section_compress_status): Don't check compression
+	size here.
+
+2015-03-24  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffgen.c (coff_get_normalized_symtab): Fix test for out of
+	range auxillary sections.
+
+2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
+	code into:
+	(_bfd_aarch64_get_stub_for_link_section): Define.
+
+2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
+	update of section_group[].stub_sec.
+
+2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
+	(erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
+	Delete fixes, fix_table_size and associated code.  Call
+	_bfd_aarch64_add_stub_entry_in_group. Rename to...
+	(bfd_aarch64_erratum_835769_scan): Define.
+	(elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
+	erratum_835769_fix_table_size, i and associated code.  Relocate
+	call to _bfd_aarch64_erratum_835769_scan.  Delete adhoc stub size
+	correction.  Delete construction of stub entry from
+	erratum_835769_fixes array.
+
+2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
+	_bfd_aarch64_add_stub_entry_in_group.
+
+2015-03-24  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
+	stubs, even those for undefined weak symbols.  Otherwise, don't
+	report relocation overflow on branches to undefined strong
+	symbols.  Fix memory leak.
+	* elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
+	overflow on branches to undefined strong symbols.
+
+2015-03-23  Keith Seitz  <keiths@redhat.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
+	missing ';'.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (erratum_835769_scan): Factor stub name
+	construction into...
+	(_bfd_aarch64_erratum_835769_stub_name): Define.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
+	stub resize code into...
+	(bfd_aarch64_resize_stubs): Define.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
+	creation code into...
+	(bfd_aarch64_create_stub_section): Define.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
+	from elf_aarch64_create_or_find_stub_sec.
+	(_bfd_aarch64_add_stub_entry_in_group): Rename from
+	elfNN_aarch64_add_stub.  Call
+	_bfd_aarch64_create_or_find_stub_sec.
+	(elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
+	_bfd_aarch64_add_stub_entry_in_group.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (erratum_835769_scan) Add comment.  Reverse
+	sense of boolean return.
+	(elfNN_aarch64_size_stubs): Adjust for above.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
+	Remove unused parameter.
+	(elfNN_aarch64_size_stubs): Adjust for above.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (aarch64_erratum_835769_fixes)
+	(num_aarch64_erratum_835769_fixes): Remove.
+	(elfNN_aarch64_size_stubs): Remove assignments to above.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
+	to rt2.
+	(aarch64_erratum_seqeunce): Rename rtn to rt2.
+
+2015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
+
+2015-03-19  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-rl78.c (rl78_cpu_name): New function.  Prints the name of
+	the RL78 core based upon the flags.
+	(rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
+	flags.
+	(rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
+	(elf32_rl78_machine): Always return bfd_mach_rl78.
+
+2015-03-19  Nick Clifton  <nickc@redhat.com>
+
+	PR 18078
+	* compress.c (bfd_compress_section_contents): Do not define this
+	function if it is not used.
+
+2015-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* compress.c (bfd_compress_section_contents): Make it static.
+	* bfd-in2.h: Regenerated.
+
+2015-03-18  Eric Youngdale  <eyoungdale@ptc.com>
+
+	PR ld/16598
+	* peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
+	suitable for the AMD64.
+
+2015-03-18  Jon Turney  <jon.turney@dronecode.org.uk>
+	    Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/18087
+	* coffgen.c (make_a_section_from_file): Only prepend a z to a
+	debug section's name if the section was actually compressed.
+	* elf.c (_bfd_elf_make_section_from_shdr): Likewise.
+	* compress.c (bfd_init_section_compress_status): Do not compress
+	the section if doing so would make it bigger.  In such cases leave
+	the section alone and return COMPRESS_SECTION_NONE.
+
+2015-03-17  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
+	on nothing to do, before malloc of returned symbol array.
+
+2015-03-16  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
+	stored in the elf_section_data structure then load them as
+	necessary.
+
+2015-03-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
+	relocs against code sections.
+	* elf32-s390.c: Define elf_backend_sort_relocs_p.
+	* elf64-s390.c: Likewise.
+
+2015-03-11  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
+	reverse order.  Account for larger size of __tls_get_addr_opt stub.
+
+2015-03-10  Yuri Gribov  <y.gribov@samsung.arm>
+
+	PR ld/16572
+	* elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
+	ELF_ARM_HASENTRY.
+	(elf32_arm_print_private_bfd_data): Likewise.
+
+2015-03-06  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17765
+	* elflink.c (put_value): Like previous delta, but for the 32-bit
+	case.
+
+2015-03-05  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17765
+	* elflink.c (put_value): Avoid using an undefined shift
+	operation.
+
+2015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/pr15228
+	PR ld/pr17709
+	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
+	* elf32-i386.c (elf_backend_extern_protected_data): New.
+	Defined to 1.
+	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
+	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
+	copy relocs against protected symbols if extern_protected_data
+	is true.
+	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
+	non-function symbols if extern_protected_data is true.
+	* elfxx-target.h (elf_backend_extern_protected_data): New.
+	Default to 0.
+	(elfNN_bed): Initialize extern_protected_data with
+	elf_backend_extern_protected_data.
+
+2015-03-05  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/18025
+	* coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
+	lookup fails, check for an address bias in the dwarf info, and if
+	one exists, retry the lookup with the biased value.
+	* dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
+	Determines if a bias exists bewteen the addresses of functions
+	based on DWARF information vs symbol table information.
+	* libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
+	* libbfd.h: Regenerate.
+
+2015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
+	(decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
+	(decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
+
+2015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
+	(aarch64_size_one_stub): Likewise.
+	(aarch64_map_one_stub): Likewise.
+
+2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* cpu-s390.c (N): New macro.
+	(bfd_s390_31_arch): New.  Define only if default target word size
+	is 64 bits.  Otherwise define...
+	(bfd_390_64_arch): ...this.  Make static.
+	(bfd_s390_arch): Define according to the default target word size.
+	Let the 'next' field point to the alternate arch.
+
+2015-03-04  Richard Sandiford  <richard.sandiford@arm.com>
+
+	PR gas/17843
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
+	R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+	to be used with MOVK rather than MOVZ.
+
+2015-03-03  DJ Delorie  <dj@redhat.com>
+
+	* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
+	there's a symbol.
+
+2015-02-28  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
+	not PLT_NEW.
+
+2015-02-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (need_convert_mov_to_lea): New.
+	(elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
+	(elf_i386_convert_mov_to_lea): Return TRUE if
+	need_convert_mov_to_lea is unset.
+	* elf64-x86-64.c (need_convert_mov_to_lea): New.
+	(elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
+	(elf_x86_64_convert_mov_to_lea): Return TRUE if
+	need_convert_mov_to_lea is unset.
+
+2015-02-27  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17910
+	* coffgen.c (_bfd_coff_internal_syment_name): Only check for
+	string length overflow when the string table length is actually
+	set.
+
+2015-02-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
+	TLSDESC_LD_PREL19 field width and masks.
+	(aarch64_tls_transition_without_check)
+	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
+	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
+	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
+	BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
+	tests.
+	(aarch64_tls_transition_without_check)
+	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
+	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
+	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
+	BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
+	(elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
+	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
+	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
+	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
+	BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
+	(aarch64_tls_transition_without_check, aarch64_reloc_got_type)
+	(elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
+	(elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
+	(elfNN_aarch64_check_relocs): Handle
+	BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
+
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
+	(_bfd_aarch64_elf_resolve_relocation): Likewise.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
+	(TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
+	(TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
+	width.
+
+2015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
+	field width.
+
+2015-02-26  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffcode.h (coff_compute_section_file_positions): Report
+	negative page sizes.
+	* elf.c (elf_fake_sections): Handle excessive alignmment powers.
+	(assign_file_positions_for_non_load_sections): Replace assertion
+	with an error message.
+	(rewrite_elf_program_header): Handle excessive segment
+	alignments.
+	* mach-o.c (bfd_mach_o_read_section_32): Likewise.
+	(bfd_mach_o_read_section_64): Likewise.
+	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
+	print a bfd name, not %A.
+
+2015-02-26  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
+	thread-safe stubs for iplt.
+	(build_tls_get_addr_stub): Restore r2 immediately after call.
+
+2015-02-26  Terry Guo  <terry.guo@arm.com>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
+	merge Tag_ABI_HardFP_use.
+
+2015-02-26  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
+	Use text relocs rather than giving an error on trying to use
+	.dynbss for protected shared lib vars.
+	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+
+2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-avr.c (struct elf_avr_section_data): New structure.
+	(struct avr_relax_info): New structure.
+	(elf_avr_new_section_hook): New function.
+	(struct elf_avr_section_data): Add relax_info.
+	(get_avr_relax_info): New function.
+	(init_avr_relax_info): New function.
+	(elf32_avr_relax_delete_bytes): Find next property record before
+	deleting bytes.  When deleting don't move bytes beyond the next
+	property record.
+	(avr_elf32_assign_records_to_section): New function.
+	(avr_property_record_compare): New function.
+	(avr_load_all_property_sections): New function.
+	(elf32_avr_relax_section): Load property data.  After relaxing the
+	section, move any .align directives that have enough deleted bytes
+	before them.
+	(bfd_elf32_new_section_hook): Define.
+
+2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-avr.h (struct avr_property_header): New strucure.
+	(avr_elf32_load_property_records): Declare.
+	(avr_elf32_property_record_name): Declare.
+	* elf32-avr.c: Add bfd_stdint.h include.
+	(retrieve_local_syms): New function.
+	(get_elf_r_symndx_section): New function.
+	(get_elf_r_symndx_offset): New function.
+	(internal_reloc_compare): New function.
+	(struct avr_find_section_data): New structure.
+	(avr_is_section_for_address): New function.
+	(avr_find_section_for_address): New function.
+	(avr_elf32_load_records_from_section): New function.
+	(avr_elf32_load_property_records): New function.
+	(avr_elf32_property_record_name): New function.
+
+2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
+	(AVR_PROPERTY_RECORDS_VERSION): Define.
+	(AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
+	(struct avr_property_record): New structure.
+
+2015-02-24  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-v850.c (v850_set_note): New function.  Creates a Renesas
+	style note entry.
+	(v850_elf_make_note_section): New function.  Creates a note
+	section.
+	(v850_elf_create_sections): New function.  Create a note section
+	if one is not already present.
+	(v850_elf_set_note): New function.  Adds a note to a bfd.
+	(v850_elf_copy_private_bfd_data): New function.  Copies V850
+	notes.
+	(v850_elf_merge_notes): New function.  Merges V850 notes.
+	(print_v850_note): New function.  Displays a V850 note.
+	(v850_elf_print_notes): New function. Displays all notes attached
+	to a bfd.
+	(v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
+	(v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
+	(v850_elf_fake_sections): Set the type of the V850 note section.
+	* bfd-in.h (v850_elf_create_sections): Add prototype.
+	(v850_elf_set_note): Add prototype.
+	* bfd-in2.h: Regenerate.
+
+2015-02-24  Nick Clifton  <nickc@redhat.com>
+
+	* configure.ac (AC_CHECK_HEADERS): Add wctype.h.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
+	(u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
+	(rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
+	is defined.
+
+2015-02-24  Nick Clifton  <nickc@redhat.com>
+
+	* pdp11.c (set_section_contents): Pad the .text and .data sections
+	to their aligned sizes.
+
+2015-02-23  Yoshinori Sato <ysato@users.sourceforge.jp>
+
+	* config.bfd: Add h8300-*-linux.
+	* configure.ac: Add h8300_elf32_linux_vec.
+	* configure: Regenerate.
+	* elf32-h8300.c: Likewise.
+	* targets.c(_bfd_target_vector): Likewise.
+
+2015-02-23  Nick Clifton  <nickc@redhat.com>
+
+	PR 17914
+	* cpu-w65.c: Correct typos in license notice.
+
+	PR 17940
+	* elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
+	symbols at end of sections.  Adjust function sizes.
+
+2015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
+	(elfcore_write_s390_vxrs_high): Likewise.
+	* elf.c (elfcore_grok_s390_vxrs_low): New function.
+	(elfcore_grok_s390_vxrs_high): New function.
+	(elfcore_grok_note): Call them.
+	(elfcore_write_s390_vxrs_low): New function.
+	(elfcore_write_s390_vxrs_high): New function.
+	(elfcore_write_register_note): Call them.
+
+2015-02-19  Branko Drevensek  <branko.drevensek@gmail.com>
+
+	PR 17995
+	* verilog.c (verilog_write_record): Correct buffer size.
+
+2015-02-19  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
+
+2015-02-19  Alan Modra  <amodra@gmail.com>
+
+	PR ld/4317
+	* elflink.c (elf_link_input_bfd): Drop undefined local syms.
+	(elf_link_output_extsym): Drop local and global undefined syms.
+	Tidy.  Expand comment.
+
+2015-02-17  Alan Modra  <amodra@gmail.com>
+
+	PR ld/17975
+	* elflink.c (struct elf_outext_info): Remove need_second_pass
+	and second_pass.
+	(elf_link_output_extsym): Delete code handling second forced
+	local pass.  Move code emitting NULL STT_FILE symbol later, so
+	that it can be omitted if forced local is stripped.  Don't
+	emit the NULL STT_FILE if no file symbols have been output.
+	(bfd_elf_final_link): Remove second forced local pass.
+	* elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
+	(ppc_elf_size_dynamic_sections): Likewise.
+	* elf64-ppc.c (ppc_build_one_stub): Likewise.
+	(build_global_entry_stubs): Likewise.
+	(ppc64_elf_build_stubs): Likewise.
+
+2015-02-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17975
+	* elflink.c (elf_link_output_extsym): Only check filesym_count
+	when outputting a NULL FILE symbol.  Set second_pass_sym to
+	h->forced_local && !h->root.linker_def.
+
+2015-02-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
+	on _TLS_MODULE_BASE_.
+	* elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
+
+2015-02-15  Alan Modra  <amodra@gmail.com>
+
+	* dwarf2.c (read_rangelist): Correct buffer overflow check
+	Whitespace throughout file.
+
+2015-02-14  Alan Modra  <amodra@gmail.com>
+
+	PR ld/17973
+	* bfd.c (struct bfd): Add lto_output.
+	* linker.c (_bfd_handle_already_linked): Explicitly test for
+	objects added by the lto plugin.
+	* opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
+	no_export flags from archive.
+	* archive.c (open_nested_file): New function, setting lto_output
+	and no_export, extracted from..
+	(find_nested_archive): ..here.  Flip params.  Rename from
+	_bfd_find_nested_archive.
+	(_bfd_get_elt_at_filepos): Correct var typo.  Use open_nested_file.
+	(_bfd_look_for_bfd_in_cache): Copy no_export.
+	* elflink.c (elf_link_add_object_symbols): Remove now unnecessary
+	my_archive->no_export test.
+	(elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
+	Don't use the file name when adding lto_output STT_FILE sym.
+	* bfd-in2.h: Regenerate.
+
+2015-02-13  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/17512
+	* elf64-ppc.c (opd_entry_value): Tighten offset check.  Remove
+	now redundant assert.
+
+2015-02-12  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
+	(read_4_bytes, read_8_bytes, read_n_bytes, read_string)
+	(read_indirect_string, read_alt_indirect_string)
+	(read_alt_indirect_ref, read_address, read_abbrevs)
+	(read_attribute_value, read_attribute, decode_line_info)
+	(find_abstract_instance_name, read_rangelist)
+	(scan_unit_for_symbols, parse_comp_unit)
+	(_bfd_dwarf2_find_nearest_line): Harden DWARF reading code.  Pass
+	end pointers to reading functions and check for offsets taking
+	pointers out of range.  Replace calls to read_*_leb128 with calls
+	to safe_read_leb128.
+
+	(* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
+	offset.
+	* syms.c (_bfd_stab_section_find_nearest_line): Add checks for
+	computed file_name address being before the start of the string
+	table.
+
+2015-02-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17878
+	* bfd.c (bfd_plugin_format): New.
+	(bfd): Add plugin_format and plugin_dummy_bfd.
+	* plugin.c (try_load_plugin): Take a pointer to bfd_boolean
+	argument to return TRUE if any plugin is found.  Set plugin_format.
+	(has_plugin): New.
+	(bfd_plugin_target_p): New.
+	(bfd_plugin_specified_p): Likewise.
+	(bfd_plugin_target_p): Likewise.
+	(register_ld_plugin_object_p): Likewise.
+	(bfd_plugin_set_plugin): Set has_plugin.
+	(load_plugin): Cache try_load_plugin result.
+	(bfd_plugin_object_p): Try ld_plugin_object_p first.  Check
+	plugin_format.
+	* plugin.h (bfd_plugin_target_p): New.
+	(bfd_plugin_specified_p): Likewise.
+	(register_ld_plugin_object_p): Likewise.
+	* bfd-in2.h: Regenerated.
+
+2015-02-11  Pedro Alves  <palves@redhat.com>
+
+	* libbfd-in.h [__cplusplus]: Open extern "C" scope.
+	* libcoff-in.h [__cplusplus]: Open extern "C" scope.
+	* libbfd.h: Regenerate.
+	* libcoff.h: Regenerate.
+
+	* elf-bfd.h [__cplusplus]: Wrap in extern "C".
+	* mach-o.h [__cplusplus]: Wrap in extern "C".
+	* som.h [__cplusplus]: Wrap in extern "C".
+
+2015-02-10  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffcode.h (styp_to_sec_flags): Use an unsigned long type to
+	hold the flag bits.
+	* peXXigen.c (pe_print_reloc): Use unsigned types to hold the
+	size and number of relocs.
+	(pe_print_debugdata): Use a 32-bit aligned buffer to store the
+	codeview record.
+	* versados.c (process_otr): Check the esdid value before using it
+	to access the EDATA.
+
+2015-02-09  Ed Maste  <emaste@freebsd.org>
+
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
+	uninitialized and unused variable.
+	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
+
+2015-02-09  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
+	tls_sec.
+	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+	* elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
+
+2015-02-09  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c: Whitespace, formatting fixes.
+	(elf_link_input_bfd): Clarify comment.
+	(elf_link_output_extsym): Exclude symbols in linker created
+	sections when testing for plugin symbols.
+
+2015-02-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17935
+	* elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
+	warning for relocation in readonly section for -z text.
+	(elf_i386_size_dynamic_sections): Likewise.
+	* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
+	(elf_x86_64_size_dynamic_sections): Likewise.
+
+2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/12365
+	PR ld/14272
+	* elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
+	(elf_link_input_bfd): Mark the plugin symbol undefined if it is
+	referenced from a non-IR file.
+
+2015-02-06  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* peXXigen.c (rsrc_print_resource_entries): Add range check for
+	addresses that wrap around the address space.
+	(rsrc_parse_entry): Likewise.
+
+2015-02-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/12365
+	PR ld/14272
+	* elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
+	undefined if it is referenced from a non-IR file.
+
+2015-02-03  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
+	(_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
+	index or an out of range fdr index.
+	* elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
+	* elf32-arc.c (arc_info_to_howto_rel): Likewise.
+	* elf32-avr.c (avr_info_to_howto_rela): Likewise.
+	* elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
+	* elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
+	* elf32-cris.c (cris_info_to_howto_rela): Likewise.
+	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
+	* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
+	* elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
+	* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
+	* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
+	* elf32-frv.c (frv_info_to_howto_rela): Likewise.
+	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
+	* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
+	* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
+	* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
+	* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
+	* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
+	* elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
+	* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
+	* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
+	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
+	* elf32-mep.c (mep_info_to_howto_rela): Likewise.
+	* elf32-metag.c (metag_info_to_howto_rela): Likewise.
+	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
+	* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
+	* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
+	* elf32-mt.c (mt_info_to_howto_rela): Likewise.
+	* elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
+	* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
+	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
+	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
+	* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
+	* elf32-rx.c (rx_info_to_howto_rela): Likewise.
+	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
+	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
+	* elf32-v850.c (v850_elf_perform_relocation): Likewise.
+	* elf32-vax.c (rtype_to_howto): Likewise.
+	* elf32-visium.c (visium_info_to_howto_rela): Likewise.
+	* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
+	* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
+	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
+	* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
+	* mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
+	(bfd_mach_o_canonicalize_one_reloc): Fix check on out
+	of range symbol indicies.
+	(bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
+	(bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
+	(bfd_mach_o_build_dysymtab): Likewise.
+	(bfd_mach_o_write_symtab_content): Set the string table size to
+	zero upon error.
+	(bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
+	read fails.
+	* peXXigen.c (pe_print_edata):  Check for numeric overflow in edt
+	fields.
+	* tekhex.c (first_phase): Check for src pointer reaching end of
+	buffer.
+
+2015-02-03  Will Newton  <will.newton@linaro.org>
+
+	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
+	Set st_value to zero for undefined symbols if the reference
+	is weak or pointer_equality_needed is FALSE.
+
+	* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
+	comment discussing why we clear st_value for some symbols.
+
+2015-02-02  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* elf32-nds32.c (nds32_get_section_contents): Add one more argument.
+	(nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
+
+2015-01-29  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
+	optimization.  Tidy mask for GOT_TLSGD optimization.
+	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.  Correct
+	location of nop zapping high insn too.
+
+2015-01-28  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
+	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
+	in .toc indicate xlc compiled code that might require a rw .toc.
+
+2015-01-28  James Bowman  <james.bowman@ftdichip.com>
+
+	* Makefile.am: Add FT32 files.
+	* archures.c (enum bfd_architecture): Add bfd_arch_ft32.
+	(bfd_mach_ft32): Define.
+	(bfd_ft32_arch): Declare.
+	(bfd_archures_list): Add bfd_ft32_arch.
+	* config.bfd: Handle FT32.
+	* configure.ac: Likewise.
+	* cpu-ft32.c: New file.
+	* elf32-ft32.c: New file.
+	* reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
+	BFD_RELOC_FT32_18): Define.
+	* targets.c (_bfd_target_vector): Add ft32_elf32_vec.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2015-01-27  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* pdp11.c (aout_get_external_symbols): Return false if there are
+	no symbols.
+
+	* dwarf2.c (concat_filename): Check for an empty directory table.
+	(scan_unit_for_symbols): Check for reading off the end of the
+	unit.
+	(parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
+	non-string form.
+	* elf64-ppc.c (opd_entry_value): Fail if there are no relocs
+	available.
+
+2015-01-26  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
+
+2015-01-22  DJ Delorie  <dj@redhat.com>
+
+	* elf32-m32c.c (m32c_apply_reloc_24): New.
+	(m32c_elf_howto_table): Use it for R_M32C_24.
+	(m32c_elf_relocate_section): Handle R_M32C_24 specially.
+
+2015-01-22  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffcode.h (handle_COMDAT): When searching for the section
+	symbol, make sure that there is space left in the symbol table.
+	* vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
+
+2015-01-21  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffcode.h (coff_set_arch_mach_hook): Check return value from
+	bfd_malloc.
+	(coff_slurp_line_table): Return FALSE if the line number
+	information was corrupt.
+	(coff_slurp_symbol_table): Return FALSE if the symbol information
+	was corrupt.
+	* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
+	initialise the fields of the dyld_info structure.
+	(bfd_mach_o_build_exec_seg_command): Replace assertion with an
+	error message and a return value.
+	(bfd_mach_o_layout_commands): Change the function to boolean.
+	Return FALSE if the function fails.
+	(bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
+	fails.
+	(bfd_mach_o_read_command): Fail if an unrecognised command is
+	encountered.
+	* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
+	read fails.
+	(slurp_symtab): Check the return from bfd_malloc.
+	(_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
+	encountered an error.
+	(_bfd_XXi_final_link_postscript): Fail if a section could not be
+	copied.
+	* peicode.h (pe_bfd_object_p): Fail if the header could not be
+	swapped in.
+	* tekhex.c (first_phase): Fail if the section is too big.
+	* versados.c (struct esdid): Add content_size field.
+	(process_otr): Use and check the new field.
+	(versados_get_section_contents): Check that the section exists and
+	that the requested data is available.
+
+2015-01-20  Chung-Lin Tang  <cltang@codesourcery.com>
+
+	* elf32-nios2.c (elf_backend_default_execstack): Define as 0.
+
+2015-01-20  Alan Modra  <amodra@gmail.com>
+
+	PR ld/17615
+	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
+	ELF_COMMON_DEF syms.
+
+2015-01-19  Alan Modra  <amodra@gmail.com>
+
+	PR ld/17615
+	* elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
+	linker script assignments too.
+	* elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
+	(bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
+
+2015-01-19  Alan Modra  <amodra@gmail.com>
+
+	* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
+	to allow return of first howto.
+	* elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
+	* elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
+	* elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
+	* elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
+	* elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
+	* elf32-rx.c (rx_reloc_type_lookup): Likewise.
+	* elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
+	* elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
+	* elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
+	* elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
+	* elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
+	(spu_elf_reloc_type_lookup): Adjust to suit.
+
+2015-01-19  Alan Modra  <amodra@gmail.com>
+
+	* bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
+	(bfd_get_section_limit): ..here.
+	* reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
+	(bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
+	* elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
+	* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
+	bfd_reloc_outofrange check.
+	* bfd-in2.h: Regenerate.
+
+	* cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
+	on zero size relocs.
+	* ecoff.c (ecoff_reloc_link_order): Likewise.
+	* elf32-nds32.c (nds32_relocate_contents): Likewise.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
+
+	* reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
+	(_bfd_clear_contents): Likewise.
+	* elfxx-mips.c (mips_elf_obtain_contents): Likewise.
+	(mips_elf_perform_relocation): Likewise.
+
+	* aoutx.h (aout_link_reloc_link_order): Allow for NULL return
+	from malloc on zero size alloc.
+	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
+	* elflink.c (elf_reloc_link_order): Likewise.
+	* linker.c (_bfd_generic_reloc_link_order): Likewise.
+	* pdp11.c (aout_link_reloc_link_order): Likewise.
+	* xcofflink.c (xcoff_reloc_link_order): Likewise.
+
+	* aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
+	bitsize 0, and complain_overflow_dont.
+	* coff-sparc.c (coff_sparc_howto_table): Likewise.
+	* elf-hppa.h (elf_hppa_howto_table): Likewise.
+	* elf-m10200.c (elf_mn10200_howto_table): Likewise.
+	* elf-m10300.c (elf_mn10300_howto_table): Likewise.
+	* elf32-arc.c (elf_arc_howto_table): Likewise.
+	* elf32-arm.c (elf32_arm_howto_table_1): Likewise.
+	* elf32-avr.c (elf_avr_howto_table): Likewise.
+	* elf32-bfin.c (bfin_howto_table): Likewise.
+	* elf32-cr16.c (cr16_elf_howto_table): Likewise.
+	* elf32-cris.c (cris_elf_howto_table): Likewise.
+	* elf32-crx.c (crx_elf_howto_table): Likewise.
+	* elf32-d10v.c (elf_d10v_howto_table): Likewise.
+	* elf32-d30v.c (elf_d30v_howto_table): Likewise.
+	* elf32-dlx.c (dlx_elf_howto_table): Likewise.
+	* elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
+	* elf32-fr30.c (fr30_elf_howto_table): Likewise.
+	* elf32-frv.c (elf32_frv_howto_table): Likewise.
+	* elf32-h8300.c (h8_elf_howto_table): Likewise.
+	* elf32-i370.c (i370_elf_howto_raw): Likewise.
+	* elf32-i386.c (elf_howto_table): Likewise.
+	* elf32-i860.c (elf32_i860_howto_table): Likewise.
+	* elf32-i960.c (elf32_i960_relocate): Likewise.
+	* elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
+	* elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
+	* elf32-lm32.c (lm32_elf_howto_table): Likewise.
+	* elf32-m32c.c (m32c_elf_howto_table): Likewise.
+	* elf32-m32r.c (m32r_elf_howto_table): Likewise.
+	* elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
+	* elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
+	* elf32-m68k.c (howto_table): Likewise.
+	* elf32-mcore.c (mcore_elf_howto_raw): Likewise.
+	* elf32-mep.c (mep_elf_howto_table): Likewise.
+	* elf32-metag.c (elf_metag_howto_table): Likewise.
+	* elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
+	* elf32-mips.c (elf_mips_howto_table_rel): Likewise.
+	* elf32-moxie.c (moxie_elf_howto_table): Likewise.
+	* elf32-msp430.c (elf_msp430_howto_table): Likewise.
+	* elf32-mt.c (mt_elf_howto_table): Likewise.
+	* elf32-nds32.c (nds32_elf_howto_table): Likewise.
+	* elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
+	* elf32-or1k.c (or1k_elf_howto_table): Likewise.
+	* elf32-pj.c (pj_elf_howto_table): Likewise.
+	* elf32-ppc.c (ppc_elf_howto_raw): Likewise.
+	* elf32-rl78.c (rl78_elf_howto_table): Likewise.
+	* elf32-rx.c (rx_elf_howto_table): Likewise.
+	* elf32-s390.c (elf_howto_table): Likewise.
+	* elf32-score.c (elf32_score_howto_table): Likewise.
+	* elf32-score7.c (elf32_score_howto_table): Likewise.
+	* elf32-sh-relocs.h (R_SH_NONE): Likewise.
+	* elf32-spu.c (elf_howto_table): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
+	* elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
+	* elf32-v850.c (v850_elf_howto_table): Likewise.
+	* elf32-vax.c (howto_table): Likewise.
+	* elf32-visium.c (visium_elf_howto_table): Likewise.
+	* elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
+	* elf32-xgate.c (elf_xgate_howto_table): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
+	* elf32-xtensa.c (elf_howto_table): Likewise.
+	* elf64-alpha.c (elf64_alpha_howto_table): Likewise.
+	* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
+	* elf64-mmix.c (elf_mmix_howto_table): Likewise.
+	* elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
+	* elf64-s390.c (elf_howto_table): Likewise.
+	* elf64-sh64.c (sh_elf64_howto_table): Likewise.
+	* elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
+	* elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
+	(elfNN_aarch64_howto_none): Likewise.
+	* elfxx-ia64.c (ia64_howto_table): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
+	* elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
+	* nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
+
+2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17847
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
+	about -fPIC if the symbol is undefined when building executable.
+
+2015-01-15  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
+	error message.  Never return an invalid howto pointer.
+	* elf32-cr16.c (cr16_info_to_howto): Likewise.
+	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
+	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
+	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
+	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
+	* elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
+	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
+	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
+	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
+	* elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
+	* elf32-vax.c (rtype_to_howto): Likewise.
+	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
+	* elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
+	* elfn32-mips.c (sh_elf_info_to_howto): Likewise.
+	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
+	(sh_elf_reloc): Check that the reloc is in range.
+	* reloc.c (bfd_perform_relocation): Check that the section is big
+	enough for the entire reloc.
+	(bfd_generic_get_relocated_section_contents): Report unexpected
+	return values from perform_reloc.
+
+2015-01-15  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
+	relocs.  Include PC-relative adjustment for R_MSP430X_ABS16
+	relaxation.
+
+2015-01-15  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
+	any output section matching a linker created dynobj section.
+
+2015-01-15  Alan Modra  <amodra@gmail.com>
+
+	PR 17842
+	* elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
+	(bfd_elf_final_link): Always create a symbol table when emit_relocs.
+	Don't assign symtab file position unless symbols will be output.
+	Merge blocks with condition in common.  Don't call
+	elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
+	unless other symbols are output.  Move assignment of symtab_shndx
+	file position.  Localize variable.
+
+2015-01-14  Jiong Wang  <jiong.wang@arm.com>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
+	trying to defer them to runtime.
+
+2015-01-13  Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
+	to check if a symbol should be bound symbolically.
+
+2015-01-13  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
+	for TLSLE_MOVW_TPREL_G2.
+
+2015-01-13  Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/17415
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
+	R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
+	bit mask.
+
+2015-01-12  Terry Guo  <terry.guo@arm.com>
+
+	* elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
+	function.
+	(_bfd_elf_gc_mark_extra_sections): Use it.
+
+2015-01-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17827
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
+	only discard space for pc-relative relocs symbols which turn
+	out to need copy relocs.
+
+2015-01-09  Nick Clifton  <nickc@redhat.com>
+
+	* tekhex.c (getvalue): Fix thinko in test for correct extraction
+	of value.
+	(getsym): Return false if there was not enough data to extract the
+	symbol.
+
+2015-01-09  Anthony Green  <green@moxielogic.com>
+
+	* elf32-moxie.c (ELF_MACHINE_ALT1): Define.
+
+2015-01-08  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
+	16-bit absolute BR instructions to 10-bit pc-relative JMP
+	instructions.
+
+2015-01-08  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* coffcode.h (coff_slurp_symbol_table): Return false if we failed
+	to load the line table.
+	* elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
+	maxpagesize of 1.
+	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
+	the Data Directory Size is too large.
+
+2015-01-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/17512
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
+	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
+
+2015-01-06  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
+	string table.
+
+	* reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
+	(bfd_perform_relocation): Include the size of the reloc in the
+	test for an out of range relocation.
+	(bfd_generic_get_relocated_section_contents): Remove reloc range
+	test.
+
+	* coff-i860.c (CALC_ADDEND): Always set an addend value.
+	* tekhex.c (getvalue): Add an end pointer parameter.  Use it to
+	avoid reading off the end of the buffer.
+	(getsym): Likewise.
+	(first_phase): Likewise.
+	(pass_over): Pass an end pointer to the invoked function.
+
+2015-01-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/17512
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
+	input.
+	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
+
+2015-01-05  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/17512
+	* archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
+	is at least big enough for the header to be read.
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
+	* mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
+	(bfd_mach_o_read_command): Prevetn duplicate error messages about
+	unrecognized commands.
+	* syms.c (_bfd_stab_section_find_nearest_line): Add range checks
+	when indexing into the string table.
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+For older changes see ChangeLog-2014
+
+Copyright (C) 2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2016 ./bfd/ChangeLog-2016
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-2016	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/ChangeLog-2016	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,4293 @@
+2016-12-31  Alan Modra  <amodra@gmail.com>
+
+	* elfn32-mips.c (elf_backend_want_dynrelro): Define.
+
+2016-12-31  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+	* archures.c: Add bfd_arch_pru.
+	* Makefile.am: Add PRU target.
+	* config.bfd: Ditto.
+	* configure.ac: Ditto.
+	* elf-bfd.h (enum elf_target_id): Add PRU_ELF_DATA.
+	* targets.c: Add pru_elf32_vec.
+	* reloc.c: Add PRU relocations.
+	* cpu-pru.c: New file.
+	* elf32-pru.c: New file.
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+	* bfd-in2.h: Regenerate
+	* libbfd.h: Regenerate.
+
+2016-12-29  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_link_hash_copy_indirect): Only omit
+	copying one flag, ref_dynamic, when versioned_hidden.
+	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Use same
+	logic for copying weakdef flags.  Copy plabel flag and merge
+	tls_type.
+	* elf32-i386.c (elf_i386_copy_indirect_symbol): Use same logic
+	for copying weakdef flags.
+	* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
+	* elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+	* elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
+	* elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+	* elfnn-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+	* elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Likewise.
+	Simplify.
+
+2016-12-28  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20995
+	* elflink.c (elf_link_add_object_symbols): Mark relro sections
+	in dynamic objects SEC_READONLY.
+
+2016-12-26  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20995
+	* elf-bfd.h (struct elf_link_hash_table): Add sdynrelro and
+	sreldynrelro.
+	(struct elf_backend_data): Add want_dynrelro.
+	* elfxx-target.h (elf_backend_want_dynrelro): Define.
+	(elfNN_bed): Update initializer.
+	* elflink.c (_bfd_elf_create_dynamic_sections): Create
+	sdynrelro and sreldynrelro sections.
+	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Place variables
+	copied into the executable from read-only sections into sdynrelro.
+	(elf32_arm_size_dynamic_sections): Handle sdynrelro.
+	(elf32_arm_finish_dynamic_symbol): Select sreldynrelro for
+	dynamic relocs in sdynrelro.
+	(elf_backend_want_dynrelro): Define.
+	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol)
+	(elf32_hppa_size_dynamic_sections, elf32_hppa_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-i386.c (elf_i386_adjust_dynamic_symbol)
+	(elf_i386_size_dynamic_sections, elf_i386_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-metag.c (elf_metag_adjust_dynamic_symbol)
+	(elf_metag_size_dynamic_sections, elf_metag_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol)
+	(microblaze_elf_size_dynamic_sections)
+	(microblaze_elf_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_symbol)
+	(nios2_elf32_adjust_dynamic_symbol)
+	(nios2_elf32_size_dynamic_sections)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-or1k.c (or1k_elf_finish_dynamic_symbol)
+	(or1k_elf_adjust_dynamic_symbol, or1k_elf_size_dynamic_sections)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol)
+	(ppc_elf_size_dynamic_sections, ppc_elf_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-s390.c (elf_s390_adjust_dynamic_symbol)
+	(elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol)
+	(elf32_tic6x_size_dynamic_sections)
+	(elf32_tic6x_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol)
+	(tilepro_elf_size_dynamic_sections)
+	(tilepro_elf_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol)
+	(ppc64_elf_size_dynamic_sections, ppc64_elf_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf64-s390.c (elf_s390_adjust_dynamic_symbol)
+	(elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol)
+	(elf_x86_64_size_dynamic_sections)
+	(elf_x86_64_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol)
+	(elfNN_aarch64_size_dynamic_sections)
+	(elfNN_aarch64_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol)
+	(riscv_elf_size_dynamic_sections, riscv_elf_finish_dynamic_symbol)
+	(elf_backend_want_dynrelro): As above.
+	* elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol)
+	(_bfd_mips_elf_size_dynamic_sections)
+	(_bfd_mips_vxworks_finish_dynamic_symbol): As above.
+	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol)
+	(_bfd_sparc_elf_size_dynamic_sections)
+	(_bfd_sparc_elf_finish_dynamic_symbol): As above.
+	* elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol)
+	(tilegx_elf_size_dynamic_sections)
+	(tilegx_elf_finish_dynamic_symbol): As above.
+	* elf32-mips.c (elf_backend_want_dynrelro): Define.
+	* elf64-mips.c (elf_backend_want_dynrelro): Define.
+	* elf32-sparc.c (elf_backend_want_dynrelro): Define.
+	* elf64-sparc.c (elf_backend_want_dynrelro): Define.
+	* elf32-tilegx.c (elf_backend_want_dynrelro): Define.
+	* elf64-tilegx.c (elf_backend_want_dynrelro): Define.
+	* elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Tidy.
+	(microblaze_elf_size_dynamic_sections): Handle sdynbss.
+	* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Make use
+	of linker shortcuts to dynamic sections rather than comparing
+	names.  Correctly set "got" flag.
+
+2016-12-26  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (struct elf_link_hash_table): Add sdynbss and srelbss.
+	* elflink.c (_bfd_elf_create_dynamic_sections): Set them.  Create
+	.rel.bss/.rela.bss for executables, both PIE and non-PIE.
+	* elf32-arc.c (struct elf_arc_link_hash_table): Delete srelbss.
+	Use ELF hash table var throughout.
+	* elf32-arm.c (struct elf32_arm_link_hash_table): Delete sdynbss
+	and srelbss.  Use ELF hash table vars throughout.
+	* elf32-hppa.c (struct elf32_hppa_link_hash_table): Likewise.
+	* elf32-i386.c (struct elf_i386_link_hash_table): Likewise.
+	* elf32-metag.c (struct elf_metag_link_hash_table): Likewise.
+	* elf32-microblaze.c (struct elf32_mb_link_hash_table): Likewise.
+	* elf32-nios2.c (struct elf32_nios2_link_hash_table): Likewise.
+	* elf32-or1k.c (struct elf_or1k_link_hash_table): Likewise.
+	* elf32-ppc.c (struct ppc_elf_link_hash_table): Likewise.
+	* elf32-s390.c (struct elf_s390_link_hash_table): Likewise.
+	* elf32-tic6x.c (struct elf32_tic6x_link_hash_table): Likewise.
+	* elf32-tilepro.c (struct tilepro_elf_link_hash_table): Likewise.
+	* elf64-ppc.c (struct ppc_link_hash_table): Likewise.
+	* elf64-s390.c (struct elf_s390_link_hash_table): Likewise.
+	* elf64-x86-64.c (struct elf_x86_64_link_hash_table): Likewise.
+	* elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Likewise.
+	* elfnn-riscv.c (struct riscv_elf_link_hash_table): Likewise.
+	* elfxx-mips.c (struct mips_elf_link_hash_table): Likewise.
+	* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Likewise.
+	* elfxx-sparc.c: Likewise.
+	* elfxx-tilegx.c (struct tilegx_elf_link_hash_table): Likewise.
+
+	* elf32-arc.c (arc_elf_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+	* elf32-microblaze.c (microblaze_elf_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+	* elf32-or1k.c (or1k_elf_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+	* elf32-s390.c (elf_s390_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+	* elf64-ppc.c (ppc64_elf_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+	* elf64-s390.c (elf_s390_create_dynamic_sections): Delete.
+	(elf_backend_create_dynamic_sections): Use base ELF version.
+
+	* elf32-tilepro.c (tilepro_elf_create_dynamic_sections): Remove
+	extraneous tests.
+	* elfnn-aarch64.c (elfNN_aarch64_create_dynamic_sections): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Likewise.
+	* elfxx-tilegx.c (tilegx_elf_create_dynamic_sections): Likewise.
+
+	* elf32-i386.c (elf_i386_create_dynamic_sections): Don't create
+	".rel.bss" for executables.
+	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't create
+	".rela.bss" for executables.
+	* elf32-nios2.c (nios2_elf32_create_dynamic_sections): Don't
+	ignore return status from _bfd_elf_create_dynamic_sections.
+
+2016-12-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert
+	2016-02-23 change and remove EI_ABIVERSION 5 support.
+
+2016-12-23  Alan Modra  <amodra@gmail.com>
+
+	* linker.c (generic_link_check_archive_element): Call target
+	bfd_link_add_symbols to add element symbols.
+
+2016-12-23  Alan Modra  <amodra@gmail.com>
+
+	* linker.c (generic_link_add_symbols): Delete.  Merge into..
+	(_bfd_generic_link_add_symbols): ..here.
+	(generic_link_check_archive_element_no_collect): Delete.
+	(generic_link_check_archive_element_collect): Likewise.
+	(generic_link_add_object_symbols): Remove "collect" param.  Update
+	callers.
+	(generic_link_add_symbol_list): Likewise.
+	(generic_link_check_archive_element): Likewise.  Call
+	bfd_link_add_symbols rather than generic_link_add_object_symbols.
+	* libbfd-in.h (_bfd_generic_link_add_symbols_collect): Delete.
+	* libbfd.h: Regenerate.
+
+2016-12-23  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/20464
+	PR binutils/14625
+	* configure.ac: Revert 2016-05-25 configure change setting
+	want_64_bit_archive for mips64 and s390x.  Revise USE_64_BIT_ARCHIVE
+	description.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+
+2016-12-23  Tristan Gingold  <gingold@adacore.com>
+
+	* version.m4: Bump version to 2.28.51
+	* configure: Regenerate.
+
+2016-12-23  Tristan Gingold  <gingold@adacore.com>
+
+	* po/bfd.pot: Regenerate.
+
+2016-12-22  Alan Modra  <amodra@gmail.com>
+
+	* libbfd-in.h (_bfd_vms_lib_slurp_armap): Use _bfd_noarchive function.
+	(_bfd_vms_lib_slurp_extended_name_table: Likewise.
+	(_bfd_vms_lib_construct_extended_name_table: Likewise.
+	(_bfd_vms_lib_truncate_arname: Likewise.
+	(_bfd_vms_lib_write_armap: Likewise.
+	(_bfd_vms_lib_read_ar_hdr: Likewise.
+	(_bfd_vms_lib_write_ar_hdr: Likewise.
+	* libbfd.h: Regenerate.
+
+2016-12-21: Yury Norov <ynorov@caviumnetworks.com>
+            Andreas Schwab <schwab@suse.de>
+
+	* cpu-aarch64.c: Fix word and address size declaration in
+	ilp32 mode in bfd_arch_info_type bfd_aarch64_arch_ilp32
+	structure.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+
+	* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Use
+	EF_RISCV_FLOAT_ABI_SOFT instead of EF_RISCV_SOFT_FLOAT.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+
+	* elfnn-riscv.c (bfd_riscv_get_max_alignment): Return bfd_vma
+	instead of unsigned int.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+	    Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* reloc.c (BFD_RELOC_RISCV_TPREL_I): New relocation.
+	(BFD_RELOC_RISCV_TPREL_S): Likewise.
+	(BFD_RELOC_RISCV_RELAX): Likewise.
+	(BFD_RELOC_RISCV_CFA): Likewise.
+	(BFD_RELOC_RISCV_SUB6): Likewise.
+	(BFD_RELOC_RISCV_SET8): Likewise.
+	(BFD_RELOC_RISCV_SET8): Likewise.
+	(BFD_RELOC_RISCV_SET16): Likewise.
+	(BFD_RELOC_RISCV_SET32): Likewise.
+	* elfnn-riscv.c (perform_relocation): Handle the new
+	relocations.
+	(_bfd_riscv_relax_tls_le): Likewise.
+	(_bfd_riscv_relax_align): Likewise.
+	(_bfd_riscv_relax_section): Likewise.
+	(howto_table): Likewise.
+	(riscv_reloc_map): Likewise.
+	(relax_func_t): New type.
+	(_bfd_riscv_relax_call): Add reserve_size argument, which
+	controls the maximal offset pessimism.  Correct type of max_alignment.
+	(_bfd_riscv_relax_lui): Likewise.
+	(_bfd_riscv_relax_tls_le): Likewise.
+	(_bfd_riscv_relax_align): Likewise.
+	(_bfd_riscv_relax_section): Compute the required reserve size
+	when relocating and use it to when calling relax_func.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Likewise.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+
+	* elfnn-riscv.c: Formatting and comment fixes throughout.
+	* elfxx-riscv.c: Likewise.
+	(howto_table): Change the src_mask field from MINUS_ONE to 0 for
+	R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPREL32,
+	R_RISCV_TLS_DTPREL64, R_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL64.
+
+2016-12-20  Palmer Dabbelt  <palmer@dabbelt.com>
+
+	* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
+	error message when linking elf32 and elf64.
+
+2016-12-19  Christian Groessler  <chris@groessler.org>
+
+	* elf32-arm.c (elf32_arm_popcount): Rename from 'popcount'.  Make
+	'sum' local variable signed.
+
+2016-12-16  fincs  <fincs.alt1@gmail.com>
+
+	* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Add handling
+	for info->gc_keep_exported.
+	(bfd_elf_gc_sections): Likewise.
+
+2016-12-15  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20968
+	PR ld/20908
+	* elflink.c (bfd_elf_final_link): Revert 2016-12-02 change.  Move
+	reloc counting code later after ELF flavour test.
+
+2016-12-14  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* bfd-in.h (elf_internal_abiflags_v0): New struct declaration.
+	(bfd_mips_elf_get_abiflags): New prototype.
+	* elfxx-mips.c (bfd_mips_elf_get_abiflags): New function.
+	* bfd-in2.h: Regenerate.
+
+2016-12-14  Yury Norov <ynorov@caviumnetworks.com>
+
+         * bfd/elfnn-aarch64.c: fix TLS relaxations for ilp32 where
+         TCB_SIZE is used.
+
+2016-12-13  Alan Modra  <amodra@gmail.com>
+
+	* elf64-hppa.c (elf64_hppa_modify_segment_map): Don't add PHDR
+	for objcopy/strip or when a ld script specifies PHDRS.
+
+2016-12-13  Alan Modra  <amodra@gmail.com>
+
+	* elf32-rx.c (elf32_rx_modify_program_headers): Don't adjust
+	segments that include the ELF file header or program headers.
+
+2016-12-08  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20932
+	* elflink.c (bfd_elf_record_link_assignment): Handle warning symbols.
+
+2016-12-07  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20932
+	* elflink.c (bfd_elf_record_link_assignment): Replace call to
+	abort with an error message and error return value.
+
+2016-12-06  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20931
+	* elf.c (copy_special_section_fields): Check for an invalid
+	sh_link field before attempting to follow it.
+
+	PR binutils/20929
+	* aoutx.h (squirt_out_relocs): Check for relocs without an
+	associated symbol.
+
+2016-12-06  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ok_lo_toc_insn): Add r_type param.  Recognize
+	lq,lfq,lxv,lxsd,lxssp,lfdp,stq,stfq,stxv,stxsd,stxssp,stfdp.
+	Don't match lmd and stmd.
+
+2016-12-05  Alyssa Milburn <amilburn@zall.org>
+
+	* elfxx-sparc.c: Do not stop processing relocations after
+	partially relaxing a call with WDISP30.
+
+2016-12-05  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20905
+	* peicode.h (pe_ILF_object_p): Use strnlen to avoid running over
+	the end of the string buffer.
+
+	PR binutils/20907
+	* peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
+
+	PR binutils/20921
+	* aoutx.h (squirt_out_relocs): Check for and report any relocs
+	that could not be recognised.
+
+	PR binutils/20922
+	* elf.c (find_link): Check for null headers before attempting to
+	match them.
+
+	PR ld/20925
+	* aoutx.h (aout_link_add_symbols): Replace BFD_ASSERT with return
+	FALSE.
+
+	PR ld/20924
+	(aout_link_add_symbols): Fix off by one error checking for
+	overflow of string offset.
+
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (struct ppc_link_hash_entry): Delete "was_undefined".
+	(struct ppc_link_hash_table): Delete "twiddled_syms".  Add
+	"need_func_desc_adj".
+	(lookup_fdh): Link direct fdh sym via oh field and set flags.
+	(make_fdh): Make strong and weak undefined function descriptor
+	symbols.
+	(ppc64_elf_merge_symbol): New function.
+	(elf_backend_merge_symbol): Define.
+	(ppc64_elf_archive_symbol_lookup): Don't test undefweak for fake
+	function descriptors.
+	(add_symbol_adjust): Don't twiddle symbols to undefweak.
+	Propagate more ref flags to function descriptor symbol.  Make
+	some function descriptor symbols dynamic.
+	(ppc64_elf_before_check_relocs): Only run add_symbol_adjust for
+	ELFv1.  Set need_func_desc_adj.  Don't fix undefs list.
+	(ppc64_elf_check_relocs): Set non_ir_ref for descriptors.
+	Don't call lookup_fdh here.
+	(ppc64_elf_gc_sections): New function.
+	(bfd_elf64_bfd_gc_sections): Define.
+	(ppc64_elf_gc_mark_hook): Mark descriptor.
+	(func_desc_adjust): Don't make fake function descriptor syms strong
+	here.  Exit earlier on non-dotsyms.  Take note of elf.dynamic
+	flag when deciding whether a dynamic function descriptor might
+	be needed.  Transfer elf.dynamic and set elf.needs_plt.  Move
+	plt regardless of visibility.  Make descriptor dynamic if
+	entry sym is dynamic, not for other cases.
+	(ppc64_elf_func_desc_adjust): Don't run func_desc_adjust if
+	already done.
+	(ppc64_elf_edit_opd): Use oh field rather than lookup_fdh.
+	(ppc64_elf_size_stubs): Likewise.
+	(ppc_build_one_stub): Don't clear was_undefined.  Only set sym
+	undefweak if stub symbol is defined.
+	(undo_symbol_twiddle, ppc64_elf_restore_symbols): Delete.
+	* elf64-ppc.h (ppc64_elf_restore_symbols): Don't declare.
+
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_hide_symbol): Access hash table as
+	elf_link_hash_table rather than ppc_link_hash_table.
+
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (add_symbol_adjust): Delete dead code.
+
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (add_symbol_adjust): Correct order of tests for
+	warning and indirect symbols.
+
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy dynamic
+	flags when direct symbol is versioned_hidden.
+
+2016-12-02  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20908
+	* elflink.c (bfd_elf_final_link): Check for ELF flavour binaries
+	when following indirect links.
+
+	PR ld/20909
+	* aoutx.h (aout_link_add_symbols): Fix off-by-one error in check
+	for an illegal string offset.
+
+2016-12-02  Gary Benson  <gbenson@redhat.com>
+
+	* elf.c (_bfd_elf_make_section_from_shdr): Pass offset to
+	elf_parse_notes.
+
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+	* config.bfd: Add support for fuchsia (OS).
+
+2016-12-01  Yury Norov  <ynorov@caviumnetworks.com>
+
+	PR ld/20868
+	* elfnn-aarch64.c (elfNN_aarch64_tls_relax): Use 32-bit accesses
+	to the GOT when operating in 32-bit mode.
+
+2016-12-01  Ma Jiang  <ma.jiang@zte.com.cn>
+
+	PR ld/16720
+	* elfxx-mips.c (mips_elf_calculate_relocation): Remove overflow
+	test for HI16 relocs.
+
+2016-12-01  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20891
+	* aoutx.h (find_nearest_line): Handle the case where the main file
+	name and the directory name are both empty.
+
+	PR binutils/20892
+	* aoutx.h (find_nearest_line): Handle the case where the function
+	name is empty.
+
+2016-11-30  Alan Modra  <amodra@gmail.com>
+
+	* elf.c (get_program_header_size): Revert accidental change.
+
+2016-11-30  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20886
+	* elf64-ppc.c (ppc64_elf_size_stubs): Make rawsize max size seen
+	on any pass past STUB_SHRINK_ITER.
+
+2016-11-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_fix_symbol_flags): Hide hidden versioned
+	symbol in executable.
+	(elf_link_output_extsym): Don't change bind from global to
+	local when linking executable.
+
+2016-11-28  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20815
+	* elf.c (phdr_sorter): Delete.
+	(assign_file_positions_except_relocs): Do not sort program
+	headers.
+
+2016-11-25  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	PR ld/20193
+	* peXXigen.c (rsrc_process_section): Do not shrink the merged
+	.rsrc section.
+
+2016-11-24  Jiong Wang  <jiong.wang@arm.com>
+
+	PR target/20737
+	* elf32-arm.c (elf32_arm_final_link_relocate): Bind defined symbol
+	locally in PIE.
+
+2016-11-24  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* bfd/elfxx-riscv.c (howto_table): Fix bitsize of R_RISCV_ADD8.
+
+2016-11-23  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20815
+	* elf.c (elf_modify_segment_map): Allow empty LOAD segments if
+	they contain the program headers.
+	(_bfd_elf_map_sections_to_segments): If the linker created the
+	PHDR segment then always attempt to include it in a LOAD segment.
+	(assign_file_positions_for_non_load_sections): Allow LOAD segments
+	to overlap PHDR segments.
+	(phdr_sorter): New function.  Sorts program headers.
+	(assign_file_positions_except_relocs): Sort the program headers
+	before writing them out.  Issue an error if the PHDR segment is
+	not covered by a LOAD segment, unless the backend allows it.
+	* elf-bfd.h (struct elf_backend_data): Add
+	elf_backend_allow_non_load_phdr.
+	* elfxx-target.h (elf_backend_allow_non_load_phdr): Provide
+	default definition that returns FALSE.
+	(elfNN_bed): Initialise the elf_backend_allow_non_load_phdr
+	field.
+	* elf64-hppa.c (elf64_hppa_allow_non_load_phdr): New function.
+	Returns TRUE.
+	(elf_backend_allow_non_load_phdr): Define.
+	* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Do not
+	place the interpreter string into the .interp section if the
+	nointerp flag is set in the link info structure.
+	* elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
+	* elf32-score7.c (score_elf_final_link_relocate): Allow for the
+	_gp symbol not being part of the output.
+
+2016-11-23  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (struct elf_backend_data): Add dtrel_excludes_plt.
+	* elfxx-target.h (elf_backend_dtrel_excludes_plt): Define.
+	(elfNN_bed): Init new field.
+	* elflink.c (bfd_elf_final_link): Add and use htab variable.  Handle
+	dtrel_excludes_plt.
+	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Delete
+	DT_RELASZ code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-arc.c (elf_arc_finish_dynamic_sections): Delete DT_RELASZ code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Delete code
+	subtracting off plt relocs from DT_RELSZ, DT_RELASZ.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Delete
+	DT_RELASZ code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-cris.c (elf_cris_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Delete DT_RELASZ
+	and DT_RELA code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-i386.c (elf_i386_finish_dynamic_sections): Delete DT_RELSZ
+	and DT_REL code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-metag.c (elf_metag_finish_dynamic_sections): Delete DT_RELASZ
+	and DT_RELA code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Delete
+	DT_RELASZ and DT_RELA code.  Use ELF htab shortcuts for other
+	dynamic sections.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-mips.c (elf_backend_dtrel_excludes_plt): Define.
+	* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-ppc.c (ppc_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-sh.c (sh_elf_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-sparc.c (elf_backend_dtrel_excludes_plt): Define.
+	* elf32-vax.c (elf_vax_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Delete DT_RELASZ
+	and DT_RELA code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Delete
+	DT_RELASZ code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elfnn-ia64.c (elfNN_ia64_finish_dynamic_sections): Delete DT_RELASZ
+	code.
+	(elf_backend_dtrel_excludes_plt): Define.
+	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Delete
+	DT_RELASZ code.
+	* elfxx-sparc.c (sparc_finish_dyn): Delete DT_RELASZ code.
+
+2016-11-23  Alan Modra  <amodra@gmail.com>
+
+	* elf-m10300.c (mn10300_elf_check_relocs): Use elf htab shortcuts
+	to dynamic sections.
+	(mn10300_elf_final_link_relocate): Likewise.
+	(_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
+	(_bfd_mn10300_elf_size_dynamic_sections): Likewise.
+	(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
+	(_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
+	* elf32-bfin.c (bfin_check_relocs): Likewise.
+	(bfin_relocate_section): Likewise.
+	(bfin_gc_sweep_hook): Likewise.
+	(struct bfinfdpic_elf_link_hash_table): Delete sgot, sgotrel, splt
+	and spltrel.
+	(bfinfdpic_got_section, bfinfdpic_gotrel_section,
+	bfinfdpic_plt_section, bfinfdpic_pltrel_section): Define using elf
+	shortcut sections.
+	(_bfin_create_got_section): Use elf htab shortcuts to dyn sections.
+	Delete dead code.
+	(bfin_finish_dynamic_symbol): Use elf htab shortcuts to dyn sections.
+	(bfin_size_dynamic_sections): Likewise.
+	* elf32-cr16.c (_bfd_cr16_elf_create_got_section): Likewise.
+	(cr16_elf_check_relocs): Likewise.
+	(cr16_elf_final_link_relocate): Likewise.
+	(_bfd_cr16_elf_create_dynamic_sections): Likewise.
+	(_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
+	(_bfd_cr16_elf_size_dynamic_sections): Likewise.
+	(_bfd_cr16_elf_finish_dynamic_symbol): Likewise.
+	(_bfd_cr16_elf_finish_dynamic_sections): Likewise.
+	* elf32-cris.c (cris_elf_relocate_section): Likewise.
+	(elf_cris_finish_dynamic_symbol): Likewise.
+	(elf_cris_finish_dynamic_sections): Likewise.
+	(cris_elf_gc_sweep_hook): Likewise.
+	(elf_cris_adjust_gotplt_to_got): Likewise.
+	(elf_cris_adjust_dynamic_symbol): Likewise.
+	(cris_elf_check_relocs): Likewise.  Delete dead code.
+	(elf_cris_size_dynamic_sections): Use elf htab shortcuts to dynamic
+	sections.
+	(elf_cris_discard_excess_program_dynamics): Likewise.
+	* elf32-frv.c (struct frvfdpic_elf_link_hash_table): Delete sgot,
+	sgotrel, splt and spltrel.
+	(frvfdpic_got_section, frvfdpic_gotrel_section,
+	frvfdpic_plt_section, frvfdpic_pltrel_section): Define using elf
+	shortcut sections.
+	(_frv_create_got_section): Likewise.
+	* elf32-hppa.c (struct elf32_hppa_link_hash_table): Delete sgot,
+	srelgot, splt and srelplt.
+	(hppa_build_one_stub): Use elf htab shortcuts to dynamic sections.
+	(elf32_hppa_create_dynamic_sections): Likewise.
+	(elf32_hppa_check_relocs): Likewise.
+	(allocate_plt_static): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(elf32_hppa_size_dynamic_sections): Likewise.
+	(elf32_hppa_relocate_section): Likewise.
+	(elf32_hppa_finish_dynamic_symbol): Likewise.
+	(elf32_hppa_finish_dynamic_sections): Likewise.
+	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
+	* elf32-lm32.c (struct elf_lm32_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	(lm32fdpic_got_section, lm32fdpic_gotrel_section): Define using elf
+	shortcut sections.
+	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
+	(lm32_elf_relocate_section): Use elf htab shortcuts to dyn sections.
+	(lm32_elf_check_relocs): Likewise.
+	(lm32_elf_finish_dynamic_sections): Likewise.
+	(lm32_elf_finish_dynamic_symbol): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(lm32_elf_size_dynamic_sections): Likewise.
+	(lm32_elf_create_dynamic_sections): Likewise.
+	* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
+	(m32c_elf_check_relocs): Likewise.
+	(m32c_elf_finish_dynamic_sections): Likewise.
+	(m32c_elf_always_size_sections): Likewise.
+	* elf32-m32r.c (struct elf_m32r_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
+	(m32r_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
+	sections.
+	(allocate_dynrelocs): Likewise.
+	(m32r_elf_size_dynamic_sections): Likewise.
+	(m32r_elf_relocate_section): Likewise.
+	(m32r_elf_finish_dynamic_symbol): Likewise.
+	(m32r_elf_finish_dynamic_sections): Likewise.
+	(m32r_elf_check_relocs): Likewise.
+	* elf32-m68k.c (elf_m68k_partition_multi_got): Likewise.
+	(elf_m68k_check_relocs): Likewise.
+	(elf_m68k_adjust_dynamic_symbol): Likewise.
+	(elf_m68k_size_dynamic_sections): Likewise.
+	(elf_m68k_relocate_section): Likewise.
+	(elf_m68k_finish_dynamic_symbol): Likewise.
+	(elf_m68k_finish_dynamic_sections): Likewise.
+	* elf32-metag.c (struct elf_metag_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	(elf_metag_relocate_section): Use elf htab shortcuts to dynamic
+	sections.
+	(elf_metag_create_dynamic_sections): Likewise.  Allocate got header
+	here in .got.
+	(elf_metag_check_relocs): Use elf htab shortcuts to dynamic sections.
+	(allocate_dynrelocs): Likewise.
+	(elf_metag_size_dynamic_sections): Likewise.
+	(elf_metag_finish_dynamic_symbol): Likewise.
+	(elf_metag_finish_dynamic_sections): Likewise.
+	(elf_metag_size_stubs): Likewise.
+	(elf_backend_got_header_size): Don't define.
+	(elf_backend_want_got_plt): Define.
+	* elf32-microblaze.c (struct elf32_mb_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelpl.
+	(microblaze_elf_relocate_section): Use elf htab shortcuts to dynamic
+	sections.
+	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
+	(microblaze_elf_check_relocs): Use elf htab shortcuts to dyn sections.
+	(microblaze_elf_create_dynamic_sections): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(microblaze_elf_size_dynamic_sections): Likewise.
+	(microblaze_elf_finish_dynamic_symbol): Likewise.
+	(microblaze_elf_finish_dynamic_sections): Likewise.
+	* elf32-nds32.c (nds32_elf_link_hash_table_create): Don't NULL
+	already zero fields.
+	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
+	(nds32_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
+	sections.
+	(allocate_dynrelocs): Likewise.
+	(nds32_elf_size_dynamic_sections): Likewise.
+	(nds32_elf_relocate_section): Likewise.
+	(nds32_elf_finish_dynamic_symbol): Likewise.
+	(nds32_elf_finish_dynamic_sections): Likewise.
+	(nds32_elf_check_relocs): Likewise.
+	(calculate_plt_memory_address): Likewise.
+	(calculate_got_memory_address): Likewise.
+	* elf32-nds32.h (struct elf_nds32_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	* elf32-or1k.c (struct elf_or1k_link_hash_table): Likewise.
+	(or1k_elf_relocate_section): Use elf htab shortcuts to dyn sections.
+	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
+	(or1k_elf_check_relocs): Use elf htab shortcuts to dynamic sections.
+	(or1k_elf_finish_dynamic_sections): Likewise.
+	(or1k_elf_finish_dynamic_symbol): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(or1k_elf_size_dynamic_sections): Likewise.
+	(or1k_elf_create_dynamic_sections): Likewise.
+	* elf32-ppc.c (struct ppc_elf_link_hash_table): Delete got, relgot,
+	plt, relplt, iplt, reliplt and sgotplt.
+	(ppc_elf_create_got): Use elf htab shortcuts to dynamic sections.
+	(ppc_elf_create_glink): Likewise.
+	(ppc_elf_create_dynamic_sections): Likewise.
+	(ppc_elf_check_relocs): Likewise.
+	(ppc_elf_select_plt_layout): Likewise.
+	(ppc_elf_tls_setup): Likewise.
+	(allocate_got): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(ppc_elf_size_dynamic_sections): Likewise.
+	(ppc_elf_relax_section): Likewise.
+	(ppc_elf_relocate_section): Likewise.
+	(ppc_elf_finish_dynamic_symbol): Likewise.
+	(ppc_elf_reloc_type_class): Likewise.
+	(ppc_elf_finish_dynamic_sections): Likewise.
+	* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
+	(rl78_elf_check_relocs): Likewise.
+	(rl78_elf_finish_dynamic_sections): Likewise.
+	(rl78_elf_always_size_sections): Likewise.
+	* elf32-s390.c 	(create_got_section): Delete.
+	(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
+	(elf_s390_check_relocs): Likewise.
+	* elf32-score.c (score_elf_create_got_section): Set elf shortcuts.
+	(s3_bfd_score_elf_finish_dynamic_sections): Use elf shortcuts.
+	* elf32-score7.c (score_elf_create_got_section): As above.
+	(s7_bfd_score_elf_finish_dynamic_sections): As above.
+	* elf32-sh.c (struct elf_sh_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	(create_got_section): Don't set them.
+	(sh_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
+	sections.
+	(allocate_dynrelocs): Likewise.
+	(sh_elf_size_dynamic_sections): Likewise.
+	(sh_elf_add_rofixup): Likewise.
+	(sh_elf_relocate_section): Likewise.
+	(sh_elf_check_relocs): Likewise.
+	(sh_elf_finish_dynamic_symbol): Likewise.
+	(sh_elf_finish_dynamic_sections): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
+	* elf32-tilepro.c (tilepro_elf_create_got_section): Likewise.
+	* elf32-vax.c (elf_vax_check_relocs): Likewise.
+	(elf_vax_adjust_dynamic_symbol): Likewise.
+	(elf_vax_always_size_sections): Likewise.
+	(elf_vax_instantiate_got_entries): Likewise.
+	(elf_vax_relocate_section): Likewise.
+	(elf_vax_finish_dynamic_symbol): Likewise.
+	(elf_vax_finish_dynamic_sections): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
+	(xstormy16_elf_always_size_sections): Likewise.
+	(xstormy16_elf_relocate_section): Likewise.
+	(xstormy16_elf_finish_dynamic_sections): Likewise.
+	* elf32-xtensa.c (struct elf_xtensa_link_hash_table): Delete sgot,
+	sgotplt, srelgot, splt and srelplt.
+	(elf_xtensa_create_dynamic_sections): Use elf htab shortcuts to
+	dynamic sections.
+	(elf_xtensa_allocate_dynrelocs): Likewise.
+	(elf_xtensa_allocate_local_got_size): Likewise.
+	(elf_xtensa_size_dynamic_sections): Likewise.
+	(elf_xtensa_relocate_section): Likewise.
+	(elf_xtensa_finish_dynamic_sections): Likewise.
+	(shrink_dynamic_reloc_sections): Likewise.
+	(elf_xtensa_get_plt_section): Likewise.
+	(elf_xtensa_get_gotplt_section): Likewise.
+	(xtensa_callback_required_dependence): Likewise.
+	* elf64-alpha.c (elf64_alpha_create_dynamic_sections): Set elf htab
+	shortcuts to dynamic sections.
+	(elf64_alpha_adjust_dynamic_symbol): Use elf htab shortcuts to
+	dynamic sections.
+	(elf64_alpha_size_plt_section): Likewise.
+	(elf64_alpha_size_rela_got_1): Likewise.
+	(elf64_alpha_size_rela_got_section): Likewise.
+	(elf64_alpha_relocate_section): Likewise.
+	(elf64_alpha_finish_dynamic_symbol): Likewise.
+	(elf64_alpha_finish_dynamic_sections): Likewise.
+	* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+	* elf64-s390.c (create_got_section): Delete.
+	(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
+	(elf_s390_check_relocs): Likewise.
+	* elf64-sh64.c (sh_elf64_relocate_section): Use elf htab shortcuts to
+	dynamic sections.
+	(sh_elf64_check_relocs): Likewise.
+	(sh64_elf64_adjust_dynamic_symbol): Likewise.
+	(sh64_elf64_size_dynamic_sections): Likewise.
+	(sh64_elf64_finish_dynamic_symbol): Likewise.
+	(sh64_elf64_finish_dynamic_sections): Likewise.
+	* elflink.c (_bfd_elf_create_got_section): Likewise.
+	* elfnn-aarch64.c (aarch64_elf_create_got_section): Likewise.
+	* elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
+	(elfNN_ia64_finish_dynamic_sections): Likewise.
+	* elfnn-riscv.c (riscv_elf_create_got_section): Likewise.
+	* elfxx-mips.c (struct mips_elf_link_hash_table): Delete srellt,
+	sgotplt, splt and sgot.
+	(mips_elf_initialize_tls_slots): Use elf htab shortcuts to dynamic
+	sections.
+	(mips_elf_gotplt_index): Likewise.
+	(mips_elf_primary_global_got_index): Likewise.
+	(mips_elf_global_got_index): Likewise.
+	(mips_elf_got_offset_from_index): Likewise.
+	(mips_elf_create_local_got_entry): Likewise.
+	(mips_elf_create_got_section): Likewise.
+	(mips_elf_calculate_relocation): Likewise.
+	(_bfd_mips_elf_create_dynamic_sections): Likewise.
+	(_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
+	(mips_elf_lay_out_got): Likewise.
+	(mips_elf_set_plt_sym_value): Likewise.
+	(_bfd_mips_elf_size_dynamic_sections): Likewise.
+	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
+	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+	(mips_finish_exec_plt): Likewise.
+	(mips_vxworks_finish_exec_plt): Likewise.
+	(mips_vxworks_finish_shared_plt): Likewise.
+	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
+	* elfxx-sparc.c (sparc_finish_dyn): Likewise.
+	* elfxx-tilegx.c (tilegx_elf_create_got_section): Likewise.
+
+2016-11-23  Alan Modra  <amodra@gmail.com>
+
+	* po/BLD-POTFILES.in: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+        * warning.m4: Fix spelling in comments.
+        * configure.ac: Fix spelling in comments.
+        * configure: Regenerate.
+
+2016-11-22  Alan Modra  <amodra@gmail.com>
+
+	PR 20744
+	* elf32-ppc.h (struct ppc_elf_params): Add vle_reloc_fixup field.
+	* elf32-ppc.c: Include opcode/ppc.h.
+	(ppc_elf_howto_raw): Correct dst_mask for R_PPC_VLE_LO16A,
+	R_PPC_VLE_LO16D, R_PPC_VLE_HI16A, R_PPC_VLE_HI16D, R_PPC_VLE_HA16A,
+	R_PPC_VLE_HA16D, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_LO16D,
+	R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HI16D,
+	R_PPC_VLE_SDAREL_HA16A, and R_PPC_VLE_SDAREL_HA16D relocs.
+	(ppc_elf_link_hash_table_create): Update default_params init.
+	(ppc_elf_vle_split16): Correct shift and mask.  Add params.
+	Report or fix insn/reloc mismatches.
+	(ppc_elf_relocate_section): Pass input_section, offset and fixup
+	to ppc_elf_vle_split16.
+
+2016-11-22  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc64_elf_relocate_section): Calculate d_offset for
+	input_bfd.  Replace occurrences of output_bfd as bfd_get_32 and
+	bfd_put_32 param with input_bfd.
+	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.  Also
+	ppc_elf_vle_split16 param.
+	(ppc_elf_vle_split16): Rename output_bfd param to input_bfd.
+
+2016-11-21  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* dwarf2.c (build_line_info_table): Rename `index' local
+	variable to `line_index'.
+	(build_lookup_funcinfo_table): Rename `index' local variable to
+	`func_index'.
+
+2016-11-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Do not
+	apply the negative GOT offset optimization in 64-bit code.
+
+2016-11-18  James Clarke  <jrtc27@jrtc27.com>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
+	R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10 to
+	R_SPARC_GOT* for non-local references. Instead, treat them like
+	R_SPARC_GOTDATA_HIX22/R_SPARC_GOTDATA_LOX10 when filling in the
+	immediate with the calculated relocation.
+
+2016-11-18  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20675
+	* elf32-metag.c (elf_metag_relocate_section): Replace abort with
+	an informative error message.
+
+2016-11-15  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	PR ld/20789
+	* bfd/elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Do signed
+	manipulation of diff value, and don't assume sym2 is less than sym1.
+	(elf32_avr_adjust_reloc_if_spans_insn): New function.
+	(elf32_avr_relax_delete_bytes): Use elf32_avr_adjust_diff_reloc_value,
+	and remove redundant did_pad.
+
+
+2016-11-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20800
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
+	plt_got.offset for R_X86_64_PLTOFF64.
+
+2016-11-14  Nick Clifton  <nickc@redhat.com>
+
+	* coffcode.h (coff_slurp_symbol_table): Fix typo: Faal -> Fall.
+
+2016-11-11  Luke Allardyce  <lukeallardyce@gmail.com>
+
+	PR ld/20722
+	* coffcode.h (coff_slurp_symbol_table): Accept C_HIDDEN symbols,
+	but treat them as debugging symbols.
+
+2016-11-10  Jiong Wang  <jiong.wang@arm.com>
+
+	PR target/20737
+	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Bind defined
+	symbol locally in PIE.
+
+2016-11-10  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20801
+	* compress.c (bfd_get_full_section_contents): Provide a more
+	helpful error message when a section is too large to load.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2.c (struct funcinfo) <is_linkage>: Type is bfd_boolean,
+	not "bfd boolean".
+
+2016-11-08  Igor Tsimbalist  <tigor.tools@gmail.com>
+
+	* dwarf2.c (comp_unit): Add new fields 'lookup_funcinfo_table' and
+	'number_of_functions' to keep lookup table and number of entries in
+	the table.
+	(line_sequence): Add new fields 'line_info_lookup' and 'num_lines'
+	to keep lookup table and number of entries in the table.
+	(lookup_funcinfo): New structure for lookup table for function
+	references.
+	(build_line_info_table): New function to create and build the lookup
+	table for line information.
+	(lookup_address_in_line_info_table): Use the lookup table instead of
+	traverse a linked list.
+	(compare_lookup_funcinfos): New compare fuction used in sorting of
+	lookup table for function references.
+	(build_lookup_funcinfo_table): New function to create, build and
+	sort the lookup table for functions references.
+	(lookup_address_in_function_table): Use the table instead of
+	traverse a linked list.
+	(_bfd_dwarf2_cleanup_debug_info): Free memory from function references
+	lookup table.
+
+2016-11-04  Nick Clifton  <nickc@redhat.com>
+
+	* targets.c (bfd_target_vector): Only add riscv_elf32_vec target
+	when supporting 64-bit BFD targets.
+
+2016-11-03  Tristan Gingold  <gingold@adacore.com>
+
+	* config.bfd: Deprecate many old triplets.
+
+2016-11-03  Nick Clifton  <nickc@redhat.com>
+
+	* po/da.po: Updated Danish translation.
+
+2016-11-01  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* reloc.c (bfd_default_reloc_type_lookup) <BFD_RELOC_CTOR>: Do
+	not fall through to the default case.
+
+2016-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
+	    Andrew Waterman <andrew@sifive.com>
+
+	Add support for RISC-V architecture.
+	* Makefile.am: Add entries for riscv32-elf and riscv64-elf.
+	* config.bdf: Likewise.
+	* configure.ac: Likewise.
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+	* archures.c: Add bfd_riscv_arch.
+	* reloc.c: Add riscv relocs.
+	* targets.c: Add riscv_elf32_vec and riscv_elf64_vec.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elf-bfd.h: Add RISCV_ELF_DATA to enum elf_target_id.
+	* elfnn-riscv.c: New file.
+	* elfxx-riscv.c: New file.
+	* elfxx-riscv.h: New file.
+
+2016-10-31  Alan Modra  <amodra@gmail.com>
+
+	PR 20748
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Revert
+	2016-05-13 change.
+
+2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cpu-arc.c (arc_get_mach): Delete.
+
+2016-10-25  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (STUB_JALR): Correct description.
+
+2016-10-20  Nick Clifton  <nickc@redhat.com>
+
+	* po/gas.pot: Regenerate.
+
+2016-10-19  Nick Clifton  <nickc@redhat.com>
+
+	* aout-adobe.c: Add missing c-format tags for translatable strings.
+	* aout-cris.c: Likewise.
+	* aoutx.h: Likewise.
+	* bfd.c: Likewise.
+	* binary.c: Likewise.
+	* cache.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-arm.c: Likewise.
+	* coff-i860.c: Likewise.
+	* coff-mcore.c: Likewise.
+	* coff-ppc.c: Likewise.
+	* coff-rs6000.c: Likewise.
+	* coff-sh.c: Likewise.
+	* coff-tic4x.c: Likewise.
+	* coff-tic54x.c: Likewise.
+	* coff-tic80.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* coffcode.h: Likewise.
+	* coffgen.c: Likewise.
+	* cofflink.c: Likewise.
+	* coffswap.h: Likewise.
+	* cpu-arm.c: Likewise.
+	* dwarf2.c: Likewise.
+	* ecoff.c: Likewise.
+	* elf-attrs.c: Likewise.
+	* elf-eh-frame.c: Likewise.
+	* elf-ifunc.c: Likewise.
+	* elf-m10300.c: Likewise.
+	* elf-s390-common.c: Likewise.
+	* elf.c: Likewise.
+	* elf32-arc.c: Likewise.
+	* elf32-arm.c: Likewise.
+	* elf32-avr.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-cr16.c: Likewise.
+	* elf32-cr16c.c: Likewise.
+	* elf32-cris.c: Likewise.
+	* elf32-crx.c: Likewise.
+	* elf32-d10v.c: Likewise.
+	* elf32-d30v.c: Likewise.
+	* elf32-epiphany.c: Likewise.
+	* elf32-fr30.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-gen.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-i370.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-i960.c: Likewise.
+	* elf32-ip2k.c: Likewise.
+	* elf32-iq2000.c: Likewise.
+	* elf32-lm32.c: Likewise.
+	* elf32-m32c.c: Likewise.
+	* elf32-m32r.c: Likewise.
+	* elf32-m68hc11.c: Likewise.
+	* elf32-m68hc12.c: Likewise.
+	* elf32-m68hc1x.c: Likewise.
+	* elf32-m68k.c: Likewise.
+	* elf32-mcore.c: Likewise.
+	* elf32-mep.c: Likewise.
+	* elf32-metag.c: Likewise.
+	* elf32-microblaze.c: Likewise.
+	* elf32-moxie.c: Likewise.
+	* elf32-msp430.c: Likewise.
+	* elf32-mt.c: Likewise.
+	* elf32-nds32.c: Likewise.
+	* elf32-nios2.c: Likewise.
+	* elf32-or1k.c: Likewise.
+	* elf32-pj.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-rl78.c: Likewise.
+	* elf32-rx.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-score.c: Likewise.
+	* elf32-score7.c: Likewise.
+	* elf32-sh-symbian.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf32-sh64.c: Likewise.
+	* elf32-spu.c: Likewise.
+	* elf32-tic6x.c: Likewise.
+	* elf32-tilepro.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf32-visium.c: Likewise.
+	* elf32-xgate.c: Likewise.
+	* elf32-xtensa.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-gen.c: Likewise.
+	* elf64-hppa.c: Likewise.
+	* elf64-ia64-vms.c: Likewise.
+	* elf64-mmix.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-sh64.c: Likewise.
+	* elf64-sparc.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+	* elfcode.h: Likewise.
+	* elfcore.h: Likewise.
+	* elflink.c: Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* elfnn-ia64.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* elfxx-sparc.c: Likewise.
+	* elfxx-tilegx.c: Likewise.
+	* ieee.c: Likewise.
+	* ihex.c: Likewise.
+	* libbfd.c: Likewise.
+	* linker.c: Likewise.
+	* m68klinux.c: Likewise.
+	* mach-o.c: Likewise.
+	* merge.c: Likewise.
+	* mmo.c: Likewise.
+	* oasys.c: Likewise.
+	* pdp11.c: Likewise.
+	* pe-mips.c: Likewise.
+	* peXXigen.c: Likewise.
+	* pei-x86_64.c: Likewise.
+	* peicode.h: Likewise.
+	* ppcboot.c: Likewise.
+	* reloc.c: Likewise.
+	* sparclinux.c: Likewise.
+	* srec.c: Likewise.
+	* stabs.c: Likewise.
+	* vms-alpha.c: Likewise.
+	* vms-lib.c: Likewise.
+	* xcofflink.c: Likewise.
+
+2016-10-18  Nick Clifton  <nickc@redhat.com>
+
+	* po/da.po: Updated Danish translation.
+
+2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-nds32.c (nds32_elf_check_relocs): Avoid aliasing warning
+	from GCC.
+
+2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-arm.c (elf32_arm_update_relocs): Rename `index' local
+	variable to `reloc_index'.
+
+2016-10-12  Alan Modra  <amodra@gmail.com>
+
+	* section.c (BFD_FAKE_SECTION): Reorder parameters.  Formatting.
+	(STD_SECTION): Adjust to suit.
+	* elf.c (_bfd_elf_large_com_section): Likewise.
+	* bfd-in2.h: Regenerate.
+
+2016-10-11  Alan Modra  <amodra@gmail.com>
+
+	* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Handle symbols
+	defined temporarily with bfd_und_section.
+	* elflink.c (_bfd_elf_gc_keep): Don't set SEC_KEEP for bfd_und_section.
+	* elfxx-mips.c (mips_elf_local_pic_function_p): Exclude defined
+	symbols with bfd_und_section.
+
+2016-10-07  Alan Modra  <amodra@gmail.com>
+
+	* targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
+	obfd param with struct bfd_link_info param.  Update all callers.
+	* linker.c (bfd_merge_private_bfd_data): Likewise.
+	(_bfd_generic_verify_endian_match): Likewise.
+	* aoutf1.h (sunos_merge_private_bfd_data): Likewise.
+	* coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
+	* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
+	* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
+	(_bfd_elf_merge_object_attributes): Likewise.
+	* elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
+	* elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
+	* elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
+	(elf32_arm_merge_private_bfd_data): Likewise.
+	* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
+	* elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
+	* elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
+	* elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
+	* elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
+	* elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
+	* elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
+	* elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
+	* elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
+	* elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
+	* elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
+	* elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
+	* elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
+	* elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
+	* elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
+	(elf32_msp430_merge_private_bfd_data): Likewise.
+	* elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
+	* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
+	* elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
+	* elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
+	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
+	(ppc_elf_merge_obj_attributes): Likewise.
+	(ppc_elf_merge_private_bfd_data): Likewise.
+	* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
+	* elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
+	* elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
+	* elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
+	(elf32_score_merge_private_bfd_data): Likewise.
+	* elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
+	* elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
+	* elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
+	* elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
+	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
+	(elf32_tic6x_merge_private_bfd_data): Likewise.
+	* elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
+	* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
+	* elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
+	* elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
+	* elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
+	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
+	* elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
+	* elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
+	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
+	* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
+	* elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
+	* elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
+	(mips_elf_merge_obj_attributes): Likewise.
+	(_bfd_mips_elf_merge_private_bfd_data): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
+	* elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
+	* elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
+	* elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
+	* elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
+	* libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2016-10-07  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am (LIBBFD_H_FILES): Update.
+	* doc/Makefile.am (LIBBFD_H_DEP): Likewise.
+	* cpu-sh.c (sh_merge_bfd_arch): Move to..
+	* elf32-sh.c: ..here, and make static.
+	* elf32-arc.c (arc_elf_merge_private_bfd_data): Delete extraneous
+	error.
+	* elf32-cris.c (cris_elf_merge_private_bfd_data): Don't call
+	_bfd_generic_verify_endian_match.
+	* elf32-microblaze.c (microblaze_elf_merge_private_bfd_data): Delete.
+	(bfd_elf32_bfd_merge_private_bfd_data): Define as
+	_bfd_generic_verify_endian_match.
+	* elf32-mt.c (mt_elf_merge_private_bfd_data): Don't test
+	boolean == FALSE.
+	* elf32-xgate.c (_bfd_xgate_elf_merge_private_bfd_data): Delete.
+	(bfd_elf32_bfd_merge_private_bfd_data): Don't define.
+	* elf32-xgate.h (_bfd_xgate_elf_merge_private_bfd_data): Delete.
+	* libbfd-in.h (_bfd_generic_verify_endian_match): Delete.
+	* libbfd.c (_bfd_generic_verify_endian_match): Move to..
+	* linker.c: ..here, and make internal.
+	* bfd.c (bfd_merge_private_bfd_data): Move to..
+	* linker.c: ..here.
+	* Makefile.in: Regenerate.
+	* doc/Makefile.in: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+	* coff-h8300.c: Spell fall through comments consistently.
+	* coffgen.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-score.c: Likewise.
+	* elf32-score7.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elfxx-aarch64.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* cpu-ns32k.c: Add missing fall through comments.
+	* elf-m10300.c: Likewise.
+	* elf32-arm.c: Likewise.
+	* elf32-avr.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-microblaze.c: Likewise.
+	* elf32-nds32.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-rl78.c: Likewise.
+	* elf32-rx.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf32-tic6x.c: Likewise.
+	* elf64-ia64-vms.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+	* elflink.c: Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* elfnn-ia64.c: Likewise.
+	* ieee.c: Likewise.
+	* oasys.c: Likewise.
+	* pdp11.c: Likewise.
+	* srec.c: Likewise.
+	* versados.c: Likewise.
+
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+	* coffcode.h (coff_slurp_symbol_table): Revert accidental commit
+	made 2015-01-08.
+	* elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break.
+	* reloc.c (bfd_default_reloc_type_lookup): Add missing breaks.
+
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+	* elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise
+	OR in arithmetic expression, not boolean OR.
+
+2016-09-30  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am (BFD_H_FILES): Add linker.c and simple.c.  Sort
+	as per comment at head of bfd-in2.h.
+	* Makefile.in: Regenerate.
+
+2016-09-30  Alan Modra  <amodra@gmail.com>
+
+	* aout-adobe.c: Replace (*_bfd_error_handler) (...) with
+	_bfd_error_handler (...) throughout.
+	* aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c,
+	* cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c,
+	* coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
+	* coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
+	* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
+	* coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c,
+	* ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
+	* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
+	* elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c,
+	* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c,
+	* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
+	* elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
+	* elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c,
+	* elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
+	* elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c,
+	* elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
+	* elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c,
+	* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
+	* elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
+	* elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c,
+	* elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c,
+	* elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c,
+	* ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c,
+	* mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c,
+	* pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c,
+	* rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c,
+	* stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c,
+	* xcofflink.c: Likewise.
+
+2016-09-30  Alan Modra  <amodra@gmail.com>
+
+	* bfd-in.h: Include stdarg.h.
+	* bfd.c (bfd_error_handler_type): Make like vprintf.
+	(_bfd_error_internal): Rename from _bfd_error_handler.  Make static.
+	(error_handler_internal): New function, split out from..
+	(_bfd_default_error_handler): ..here.  Rename to _bfd_error_handler.
+	(bfd_set_error_handler): Update.
+	(bfd_get_error_handler, bfd_get_assert_handler): Delete.
+	(_bfd_assert_handler): Make static.
+	* coffgen.c (null_error_handler): Update params.
+	* elf-bfd.h (struct elf_backend_data <link_order_error_handler>):
+	Don't use bfd_error_handler_type.
+	* elf64-mmix.c (mmix_dump_bpo_gregs): Likewise.
+	* elfxx-target.h (elf_backend_link_order_error_handler): Default
+	to _bfd_error_handler.
+	* libbfd-in.h (_bfd_default_error_handler): Don't declare.
+	(bfd_assert_handler_type): Likewise.
+	(_bfd_error_handler): Update.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2016-09-28  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
+
+	PR ld/20636
+	* elf-bfd.h (struct elf_backend_data): Delete
+	elf_backend_count_output_relocs callback and add
+	elf_backend_update_relocs.
+	* elf32-arm.c (elf32_arm_count_output_relocs): Deleted.
+	(emit_relocs): Deleted.
+	(elf32_arm_emit_relocs): Deleted.
+	(elf_backend_emit_relocs): Updated not to use the old functions.
+	(elf32_arm_update_relocs): New function.
+	(elf_backend_update_relocs): New define.
+	* elflink.c (bfd_elf_final_link): Add additional_reloc_count to the
+	relocation count. Call elf_backend_emit_relocs.
+	(_bfd_elf_size_reloc_section): Do not call
+	elf_backend_count_output_relocs.
+	* elfxx-target.h (elf_backend_count_output_relocs): Deleted.
+	(elf_backend_update_relocs): New define.
+
+2016-09-28  Christophe Lyon  <christophe.lyon@linaro.org>
+
+	PR ld/20608
+	* elf32-arm.c (arm_type_of_stub): Handle the case when the pre-PLT
+	Thumb-ARM stub is too far.
+
+2016-09-27  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20634
+	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Put 0 in the
+	timestamp field if real time values are not being stored.
+
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+	* warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
+	to verify CC_FOR_BUILD compiler.
+	(AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
+	and add CC_FOR_BUILD compiler checks.
+	* Makefile.in: Regenerate.
+	* configure: Likewise.
+	* doc/Makefile.in: Likewise.
+
+2016-09-26  Awson  <kyrab@mail.ru>
+
+	PR ld/17955
+	* coff-x86_64.c (coff_amd64_rtype_to_howto): Use an 8 byte offset
+	for R_AMD64_PCRQUAD relocations.
+
+2016-09-26  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Declare.
+	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): New function.
+	(ppc_elf_merge_obj_attributes): Use it.  Don't copy first file
+	attributes, merge them.  Don't warn about undefined tag bits,
+	or copy unknown values to output.
+	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Call
+	_bfd_elf_ppc_merge_fp_attributes.
+
+2016-09-23  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
+
+	PR ld/20595
+	* elf-bfd.h (struct elf_backend_data): Add
+	elf_backend_count_output_relocs callback to count relocations in
+	the final output.
+	* elf-arm.c (elf32_arm_add_relocation): Deleted.
+	(elf32_arm_write_section): Move additional relocation to emit_relocs.
+	(elf32_arm_count_output_relocs): New function.
+	(emit_relocs): New function.
+	(elf32_arm_emit_relocs): New function.
+	(elf32_arm_vxworks_emit_relocs): New function.
+	(elf_backend_emit_relocs): Updated to use the new functions.
+	(elf_backend_count_output_relocs): New define.
+	* bfd/elflink.c (bfd_elf_final_link): Do not add additional_reloc_count
+	to the relocation count.
+	(_bfd_elf_link_size_reloc_section): Use callback to count the
+	relocations which will be in output.
+	(_bfd_elf_default_count_output_relocs): New function.
+	* bfd/elfxx-target.h (elf_backend_count_output_relocs): New define.
+
+2016-09-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Allow
+	negative offsets to _GLOBAL_OFFSET_TABLE_ if the .got section is
+	bigger than 0x1000 bytes.
+
+2016-09-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Only mark section
+	not already marked.
+
+2016-09-14  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20605
+	* peicode.h (pe_bfd_read_buildid): Check that the Data Directory
+	contains a valid size for the Debug directory.
+
+2016-09-14  Bhushan Attarde  <bhushan.attarde@imgtec.com>
+
+	* format.c (struct bfd_preserve): New "build_id" field.
+	(bfd_preserve_save): Save "build_id".
+	(bfd_preserve_restore): Restore "build_id".
+
+2016-09-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20550
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Resolve size
+	relocation with copy relocation when building executable.
+
+2016-09-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	PR ld/20545
+	* elf32-avr.c (elf32_avr_relax_delete_bytes): Add parameter
+	delete_shrinks_insn. Modify computation of shrinked_insn_address.
+	Compute shrink_boundary and adjust addend only if
+	addend_within_shrink_boundary.
+	(elf32_avr_relax_section): Modify calls to
+	elf32_avr_relax_delete_bytes to pass extra parameter.
+
+2016-09-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (cmse_entry_fct_p): Store instruction encoding in an
+	array of bytes and use bfd_get_16 to interpret its encoding according
+	to endianness of target.
+
+2016-09-01  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (synthetic_opd): New static var.
+	(compare_symbols): Don't treat symbols in .opd specially for ELFv2.
+	(ppc64_elf_get_synthetic_symtab): Likewise.  Comment.
+
+2016-08-31  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (group_sections): Delete stub14_group_size.  Instead,
+	track max group size with a new "group_size" var that is reduced
+	by a factor of 1024 from the 24-bit branch size whenever a 14-bit
+	branch is seen.
+
+2016-08-31  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_section_processing): Delete.
+	(elf_backend_section_processing): Don't define.
+	(ppc_elf_modify_segment_map): Set p_flags and mark valid.  Don't
+	split on non-exec sections differing in SHF_PPC_VLE.  When
+	splitting segments, mark size invalid.
+
+2016-08-30  Alan Modra  <amodra@gmail.com>
+
+	PR 20531
+	* elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
+
+2016-08-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/14961
+	PR ld/20515
+	* elf32-i386.c (elf_i386_check_relocs): Issue an error when
+	R_386_PC32 relocation is used to call IFUNC function in PIC
+	object.
+
+2016-08-27  Alan Modra  <amodra@gmail.com>
+
+	PR 20520
+	* elf.c (_bfd_elf_setup_sections): Check that SHT_GROUP sections
+	have corresponding SHF_GROUP sections.
+	(bfd_elf_set_group_contents): Comment.
+
+2016-08-27  Alan Modra  <amodra@gmail.com>
+
+	PR 20519
+	* elf64-ppc.c (pc_dynrelocs): New function.
+	(ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
+	handle pic dynamic relocs.
+
+2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd-in.h (struct elf32_arm_params): Define.
+	(bfd_elf32_arm_set_target_relocs): Rename into ...
+	(bfd_elf32_arm_set_target_params): This.  Use a struct
+	elf32_arm_params to pass all parameters but the bfd and bfd_link_info.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (bfd_elf32_arm_set_target_relocs): Rename into ...
+	(bfd_elf32_arm_set_target_params): This.  Pass all values via a struct
+	elf32_arm_params rather than as individual parameters.
+
+2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_get_stub_entry): Assert that we don't access
+	passed the end of htab->stub_group array.
+	(elf32_arm_create_or_find_stub_sec): Likewise.
+	(elf32_arm_create_stub): Likewise.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (elf_arc_relocate_section): Changed. Set should_relocate
+	to TRUE for GOT and TLS relocs.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synospsys.com>
+
+	* elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf-bfd.h: Added ARC_ELF_DATA to enum elf_target_id.
+	* elf32-arc.c (struct elf_arc_link_hash_entry): Added.
+	(struct elf_arc_link_hash_table): Likewise.
+	(elf_arc_link_hash_newfunc): Likewise.
+	(elf_arc_link_hash_table_free): Likewise.
+	(arc_elf_link_hash_table_create): Likewise.
+	(elf_arc_relocate_section): Fixed conditions related to dynamic
+	(elf_arc_check_relocs): Likewise.
+	(arc_elf_create_dynamic_sections): Added
+	(elf_arc_adjust_dynamic_symbol): Changed access to .rela.bss to be done
+	through the hash table.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* arc-got.h (relocate_fix_got_relocs_for_got_info): Fixed addresses in
+	debug comments. Fixed address in .got related to TLS_IE_GOT dynamic
+	relocation.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12
+	relocation.
+	* bfd-in2.h: Regenerated from the previous changes.
+	* libbfd.h: Regenerated from the previous changes.
+
+2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for
+	the input import library bfd.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd
+	and new_cmse_stub_offset fields.
+	(stub_hash_newfunc): Initialize stub_offset and stub_template_size to
+	-1.
+	(elf32_arm_add_stub): Likewise for stub_offset.
+	(arm_new_stubs_start_offset_ptr): New function.
+	(arm_build_one_stub): Only allocate a stub_offset if it is -1.  Allow
+	empty SG veneers to have zero relocations.
+	(arm_size_one_stub): Only initialize stub size and template
+	information for non empty veneers.  Do not update veneer section size
+	if veneer already has an offset.
+	(elf32_arm_create_stub): Return the stub entry pointer or NULL instead
+	of a boolean indicating success or failure.
+	(cmse_scan): Change stub_changed parameter into an integer pointer
+	parameter cmse_stub_created to count the number of stub created and
+	adapt to change of return value in elf32_arm_create_stub.
+	(cmse_entry_fct_p): New function.
+	(arm_list_new_cmse_stub): Likewise.
+	(set_cmse_veneer_addr_from_implib): Likewise.
+	(elf32_arm_size_stubs): Define cmse_stub_created, pass its address to
+	cmse_scan instead of that of cmse_stub_changed to compute the number
+	of stub created and use it to initialize stub_changed.  Call
+	set_cmse_veneer_addr_from_implib after all cmse_scan.  Adapt to change
+	of return value in elf32_arm_create_stub.  Use
+	arm_stub_section_start_offset () if not NULL to initialize size of
+	secure gateway veneers section.  Initialize stub_offset of Cortex-A8
+	erratum fix to -1.  Use ret to hold return value.
+	(elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not
+	NULL to initialize size of secure gateway veneers section.  Adapt
+	comment to stress the importance of zeroing veneer section content.
+	(bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to
+	initialize eponymous field in struct elf32_arm_link_hash_table.
+
+2016-08-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* elf32-s390.c (stdarg.h): New include.
+	(elf_s390_grok_psinfo): New function.
+	(elf_s390_write_core_note): New function.
+	(elf_backend_grok_psinfo): Declare backend hook.
+	(elf_backend_write_core_note): Likewise.
+	* elf64-s390.c (stdarg.h): New include.
+	(elf_s390_grok_prstatus): New function.
+	(elf_s390_grok_psinfo): New function.
+	(elf_s390_write_core_note): New function.
+	(elf_backend_grok_prstatus): Declare backend hook.
+	(elf_backend_grok_psinfo): Likewise.
+	(elf_backend_write_core_note): Likewise.
+
+2016-08-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* elf32-s390.c (allocate_dynrelocs): Fix indentation.
+	(elf_s390_finish_ifunc_symbol): Likewise.
+	(elf_s390_finish_dynamic_symbol): Likewise.
+	(elf_s390_finish_dynamic_sections): Likewise.
+	(elf_s390_grok_prstatus): Likewise.
+	* elf64-s390.c (elf_s390_hash_table): Fix indentation.
+	(elf_s390_finish_dynamic_symbol): Likewise.
+
+2016-08-24  Anton Kolesov  <Anton.Kolesov@synopsys.com>
+
+	* elf32-arc.c (elf32_arc_grok_prstatus): New function.
+
+2016-08-23  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
+	there is no arm data associated with the section.
+
+2016-08-23  Alan Modra  <amodra@gmail.com>
+
+	PR 20475
+	* elf32-or1k.c (or1k_elf_relocate_section): Offset from
+	_GLOBAL_OFFSET_TABLE_, not start of .got section.
+
+2016-08-22  Nick Clifton  <nickc@redhat.com>
+
+	* doc/chew.c (main): Free the string buffer used to files as they
+	are parsed.
+
+2016-08-22  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (ppc_elf_check_relocs): Move error for @local ifunc..
+	(ppc_elf_relocate_section): ..to here.  Comment.  Error on
+	detecting -mbss-plt -fPIC local ifuncs too.
+	(ppc_elf_size_dynamic_sections): Comment on unnecessary glink
+	branch table entries.
+
+2016-08-19  Nick Clifton  <nickc@redhat.com>
+
+	* elf.c (assign_section_numbers): Assign number for the .shstrtab
+	section after the symbol table and string table sections.
+
+2016-08-19  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (struct ppc_link_hash_entry): Add weakref.
+	(ppc64_elf_copy_indirect_symbol): Set weakref.  Don't merge
+	dyn_relocs for weakdefs.
+	(alias_readonly_dynrelocs): New function.
+	(ppc64_elf_adjust_dynamic_symbol): Use alias_readonly_dynrelocs.
+	(ppc64_elf_relocate_section): Simplify condition under which
+	dyn_relocs are emitted.
+
+2016-08-19  Alan Modra  <amodra@gmail.com>
+
+	PR 20472
+	* elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test.
+	(readonly_dynrelocs): Comment fix.
+	(global_entry_stub): New function.
+	(ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test.  Match
+	ELFv2 code deciding on dynamic relocs vs. global entry stubs to
+	that in size_global_entry_stubs, handling ifunc too.  Delete dead
+	weak sym code.
+	(allocate_dynrelocs): Ensure dyn_relocs field is cleared when no
+	dyn_relocs are needed.  Correct handling of ifunc dyn_relocs.
+	Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for
+	undefweak syms.  Expand and correct comments.
+	(size_global_entry_stubs): Ensure symbol is defined.
+	(ppc64_elf_relocate_section): Match condition under which
+	dyn_relocs are emitted to that in allocate_dynrelocs.
+
+2016-08-12  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount.
+	* elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount.
+	(bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount.
+
+2016-08-11  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with
+	non_got_ref true in any case where we could have generated dynbss
+	copies but decide not to do so.
+
+2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_add_la25_stub): Clear the ISA bit of
+	the stub address retrieved if associated with a microMIPS
+	function.
+
+2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS
+	stub also add STO_MICROMIPS annotation.
+
+2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): Set the ISA bit
+	in microMIPS LA25 stub references.
+
+2016-08-09  Jiaming Wei  <jmwei@hxgpt.com>
+
+	* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Fix thinko
+	adjusting the use_count of merged .got entries.
+
+2016-08-08  Nick Clifton  <nickc@redhat.com>
+
+	* doc/chew.c (delete_string): Only free the string buffer if it is
+	there.  Mark the buffer as NULL after freeing.
+	(drop): Free the dropped string.
+	(free_words): New function: Frees the memory allocated to the
+	dictionary.
+	(add_instrinsic): Duplicate the name string, so that it can be
+	freed later on.
+	(compile): Free unused words.
+	(main): Free the dictionary and top level string buffers at the
+	end.
+
+2016-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (struct elf32_arm_link_hash_table): Declare new
+	cmse_implib field.
+	(bfd_elf32_arm_set_target_relocs): Add new parameter to initialize
+	cmse_implib field in struct elf32_arm_link_hash_table.
+	(elf32_arm_filter_cmse_symbols): New function.
+	(elf32_arm_filter_implib_symbols): Likewise.
+	(elf_backend_filter_implib_symbols): Define to
+	elf32_arm_filter_implib_symbols.
+
+2016-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (CMSE_PREFIX): Define macro.
+	(elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence.
+	(cmse_branch_thumb_only): Declare stub.
+	(struct elf32_arm_link_hash_table): Define cmse_stub_sec field.
+	(elf32_arm_get_plt_info): Add globals parameter.  Use it to return
+	FALSE if there is no PLT.
+	(arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature.
+	(elf32_arm_final_link_relocate): Likewise.
+	(elf32_arm_gc_sweep_hook): Likewise.
+	(elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M
+	secure entry functions.
+	(arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only.
+	(arm_dedicated_stub_output_section_required): Change to a switch case
+	and add a case for arm_stub_cmse_branch_thumb_only.
+	(arm_dedicated_stub_output_section_required_alignment): Likewise.
+	(arm_stub_dedicated_output_section_name): Likewise.
+	(arm_stub_dedicated_input_section_ptr): Likewise and remove
+	ATTRIBUTE_UNUSED for htab parameter.
+	(arm_stub_required_alignment): Likewise.
+	(arm_stub_sym_claimed): Likewise.
+	(arm_dedicated_stub_section_padding): Likewise.
+	(cmse_scan): New function.
+	(elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets.
+	Set stub_changed to TRUE if such veneers were created.
+	(elf32_arm_swap_symbol_in): Add detection code for CMSE special
+	symbols.
+
+2016-08-02  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20428
+	* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
+
+2016-08-02  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/17739
+	* elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
+	(elf_backend_sweep_hook): Delete.
+
+2016-08-01  Andrew Jenner  <andrew@codesourcery.com>
+	Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+	* elf32-ppc.c (is_branch_reloc): Recognise VLE branch relocations.
+	(ppc_elf_howto_raw): Fix dst_mask of R_PPC_VLE_REL15.
+	(ppc_elf_vle_split16): Clear field before inserting.
+
+2016-08-01  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2016-07-27  Ozkan Sezer  <sezeroz@gmail.com>
+	    Nick Clifton  <nickc@redhat.com>
+
+	PR ld/20401
+	* coffgen.c (fini_reloc_cookie_rels): Check for the extistence
+	of the coff_section_data before using it.
+
+2016-07-26  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): Handle branches
+	in PLT compression selection.
+	(_bfd_mips_elf_check_relocs): Likewise.
+
+2016-07-22  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the
+	case where there's no elf_link_hash_entry while processing
+	GOT_NORMAL got entries.
+
+2016-07-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* version.m4 (BFD_VERSION): Set to 2.27.51.
+	* configure: Regenerated.
+
+2016-07-21  Nick Clifton  <nickc@redhat.com>
+
+	* elf.c (_bfd_elf_filter_global_symbols): Skip local symbols.
+	(swap_out_syms): Return an error when not finding ELF output
+	section rather than asserting.
+
+2016-07-21  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elflink.c (elf_output_implib): Call bfd_set_error on no symbols.
+
+2016-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_freebsd_psinfo): Check for minimum note size
+	and handle pr_pid if present.
+
+2016-07-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20376
+	* elf.c (assign_file_positions_for_load_sections): Also check
+	p_paddr for program header space.
+
+2016-07-20  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_PLTREL32>): Put
+	ppc64_elf_unhandled_reloc for special_function.
+	* elf32-ppc.c (ppc_elf_howto_raw): Similarly for lots of relocs.
+
+2016-07-19  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_perform_relocation): Convert cross-mode
+	BAL to JALX.
+	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add a
+	corresponding error message.
+
+2016-07-19  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (b_reloc_p): Add R_MICROMIPS_PC16_S1,
+	R_MICROMIPS_PC10_S1 and R_MICROMIPS_PC7_S1.
+	(branch_reloc_p): New function.
+	(mips_elf_calculate_relocation): Handle ISA mode determination
+	for relocations against section symbols, against absolute
+	symbols and absolute relocations.  Also set `*cross_mode_jump_p'
+	for branches.
+	<R_MIPS16_26, R_MIPS_26, R_MICROMIPS_26_S1>: Suppress alignment
+	checks for weak undefined symbols.  Also check target alignment
+	within the same ISA mode.
+	<R_MIPS_PC16, R_MIPS_GNU_REL16_S2>: Handle cross-mode branches
+	in the alignment check.
+	<R_MICROMIPS_PC7_S1>: Add an alignment check.
+	<R_MICROMIPS_PC10_S1>: Likewise.
+	<R_MICROMIPS_PC16_S1>: Likewise.
+	(mips_elf_perform_relocation): Report a failure for unsupported
+	same-mode JALX instructions and cross-mode branches.
+	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add
+	error messages for jumps to misaligned addresses.
+
+2016-07-16  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c: Include plugin-api.h.
+	* plugin.c (bfd_plugin_open_input): New function, extracted from..
+	(try_claim): ..here.
+	* plugin.h: Don't include bfd.h.
+	(bfd_plugin_open_input): Declare.
+
+2016-07-16  Alan Modra  <amodra@gmail.com>
+
+	* targets.c (bfd_seach_for_target): Rename to..
+	(bfd_iterate_over_targets): ..this.  Rewrite doc.
+	* bfd-in2.h: Regenerate.
+
+2016-07-16  Alan Modra  <amodra@gmail.com>
+
+	* archures.c (bfd_default_set_arch_mach): Make available in bfd.h.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2016-07-16  Alan Modra  <amodra@gmail.com>
+
+	* libbfd-in.h (BFD_ALIGN): Move to..
+	* bfd-in.h: ..here.
+	* elf32-ppc.h (struct ppc_elf_params): Add pagesize.
+	* elf32-ppc.c (default_params): Adjust init.
+	(ppc_elf_link_params): Set pagesize_p2.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2016-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook.
+	(_bfd_elf_filter_global_symbols): Declare.
+	* elf.c (_bfd_elf_filter_global_symbols): New function.
+	* elflink.c (elf_filter_global_symbols): Likewise.
+	(elf_output_implib): Likewise.
+	(bfd_elf_final_link): Call above function, failing if it does.
+	* elfxx-target.h (elf_backend_filter_implib_symbols): Define macro and
+	default it to NULL.
+	(elf_backend_copy_indirect_symbol): Fix spacing.
+	(elf_backend_hide_symbol): Likewise.
+	(elfNN_bed): Initialize elf_backend_filter_implib_symbols backend hook.
+
+2016-07-15  Andrew Burgess  <andrew.burgess@embecosm.com>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* elf32-arc.c (PR_DEBUG): Delete.
+	Fix printing of debug information.  Fix formatting of debug
+	statements.
+	(debug_arc_reloc): Handle symbols that are not from an input file.
+	(arc_do_relocation): Remove excessive exclamation points.
+
+	* arc-got.h: Fix formatting.  Fix printing of debug information.
+	(new_got_entry_to_list): Use xmalloc.
+	* config.bfd: use the big-endian arc vector as the default vector
+	for big-endian arc targets.
+
+2016-07-15  Alan Modra  <amodra@gmail.com>
+
+	* cofflink.c (mark_relocs): Exclude relocs with -1 r_symndx
+	from marking sym_indices.
+
+2016-07-14  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* reloc.c (bfd_perform_relocation): Try the `howto' handler
+	first with relocations against absolute symbols.
+	(bfd_install_relocation): Likewise.
+
+2016-07-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
+	.got/.got.plt sections to 8 bytes.
+
+2016-07-12  Nick Clifton  <nickc@redhat.com>
+
+	* binary.c (binary_set_section_contents): Second grammar fix.
+
+2016-07-12  Douglas B Rupp  <rupp@adacore.com>
+
+	* binary.c (binary_set_section_contents): Fix grammar in warning
+	message.
+
+2016-07-11  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c: made PR_DEBUG always defined.
+
+2016-07-11  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* arc-got.h: Moved got related structures from elf32-arc.c to
+	this file. More precisely, tls_type_e, tls_got_entries, got_entry.
+	* (arc_get_local_got_ents, got_entry_for_type, new_got_entry_to_list,
+	tls_type_for_reloc, symbol_has_entry_of_type,
+	get_got_entry_list_for_symbol, arc_got_entry_type_for_reloc,
+	ADD_SYMBOL_REF_SEC_AND_RELOC, rc_fill_got_info_for_reloc,
+	relocate_fix_got_relocs_for_got_info,
+	create_got_dynrelocs_for_single_entry,
+	create_got_dynrelocs_for_got_info): Added to file.
+	* elf32-arc.c: Removed GOT & TLS related structs and functions to
+	arc-got.h.
+
+2016-07-08  James Bowman  <james.bowman@ftdichip.com>
+
+	* elf32-ft32.c (ft32_reloc_map): Use R_FT32_32 for BFD_RELOC_32.
+
+2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
+
+	* elf32-arm.c (THUMB32_MOVT): New veneer macro.
+	(THUMB32_MOVW): Likewise.
+	(elf32_arm_stub_long_branch_thumb2_only_pure): New.
+	(DEF_STUBS): Define long_branch_thumb2_only_pure.
+	(arm_stub_is_thumb): Add new veneer stub.
+	(arm_type_of_stub): Use new veneer.
+	(arm_stub_required_alignment): Add new veneer.
+
+2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
+
+	* bfd-in2.h (SEC_ELF_NOREAD): Rename to ...
+	(SEC_ELF_PURECODE): ... this.
+	* elf32-arm.c (elf32_arm_post_process_headers): Rename SEC_ELF_NOREAD
+	to SEC_ELF_NOREAD.
+	(elf32_arm_fake_sections): Likewise.
+	(elf_32_arm_section_flags): Likewise.
+	(elf_32_arm_lookup_section_flags): Likewise.
+	* section.c (SEC_ELF_NOREAD): Rename to ...
+	(SEC_ELF_PURECODE): ... this.
+
+2016-07-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (using_thumb2_bl): New function.
+	(arm_type_of_stub): Declare thumb2 variable together and change type
+	to bfd_boolean.  Use using_thumb2_bl () to determine whether
+	THM_MAX_FWD_BRANCH_OFFSET or THM2_MAX_FWD_BRANCH_OFFSET should be
+	checked for BL range.
+	(elf32_arm_final_link_relocate): Use using_thumb2_bl () to determine
+	the bit size of BL offset.
+
+2016-06-29  Nick Clifton  <nickc@redhat.com>
+
+	* elfnn-aarch64.c (is_aarch64_mapping_symbol): New function.
+	Returns TRUE for AArch64 mapping symbols.
+	(elfNN_aarch64_backend_symbol_processing): New function.  Marks
+	mapping symbols as precious in object files so that they will not
+	be stripped.
+	(elf_backend_symbol_processing): Define.
+
+	* elf32-arm.c (is_arm_mapping_symbol): New function.  Returns TRUE
+	for ARM mapping symbols.
+	(elf32_arm_backend_symbol_processing): Make use of the new function.
+
+2016-06-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20306
+	* elflink.c (elf_link_check_versioned_symbol): Return false
+	for unreferenced undefined symbol.
+
+2016-06-28  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
+	is needed.
+
+	* elf32-arm.c (elf32_arm_backend_symbol_processing): New
+	function.  Marks mapping symbols in object files as precious, so
+	that strip will not remove them.
+	(elf_backend_symbol_processing): Define.
+
+2016-06-28  James Clarke  <jrtc27@jrtc27.com>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
+	R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64.
+
+2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-mips.c (elf_mips16_howto_table_rel): Add
+	R_MIPS16_PC16_S1.
+	(mips16_reloc_map): Likewise.
+	* elf64-mips.c (mips16_elf64_howto_table_rel): Likewise.
+	(mips16_elf64_howto_table_rela): Likewise.
+	(mips16_reloc_map): Likewise.
+	* elfn32-mips.c (elf_mips16_howto_table_rel): Likewise.
+	(elf_mips16_howto_table_rela): Likewise.
+	(mips16_reloc_map): Likewise.
+	* elfxx-mips.c (mips16_branch_reloc_p): New function.
+	(mips16_reloc_p): Handle R_MIPS16_PC16_S1.
+	(b_reloc_p): Likewise.
+	(mips_elf_calculate_relocation): Likewise.
+	(_bfd_mips_elf_check_relocs): Likewise.
+	* reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2016-06-27  Alan Modra  <amodra@gmail.com>
+
+	PR ld/19264
+	* elf64-ppc.c (STUB_SHRINK_ITER): Define.
+	(ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER
+	if shrinking stubs.
+	(ppc64_elf_size_stubs): Adjust to suit.
+
+2016-06-27  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf32-dlx.h: New file.
+	* elf32-dlx.c: Adjust.
+
+2016-06-25  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf32-xtensa.c (xtensa_make_property_section): Remove prototype.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV
+	notes.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for
+	FreeBSD.  Remove case for NT_FREEBSD_THRMISC.
+	(elfcore_grok_freebsd_psinfo): New function.
+	(elfcore_grok_freebsd_prstatus): New function.
+	(elfcore_grok_freebsd_note): New function.
+	(elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD"
+	notes.
+
+2016-06-24  Joel Brobecker  <brobecker@adacore.com>
+
+	* elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather
+	than its existance.
+
+2016-06-24  Alan Modra  <amodra@gmail.com>
+
+	* config.bfd: Delete mips vxworks patterns matched earlier.
+	Combine mips*-*-none with mips*-*-elf*.
+
+2016-06-21  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_perform_relocation): Call
+	`info->callbacks->einfo' rather than `*_bfd_error_handler' and
+	use the `%X%H' format for the cross-mode jump conversion error
+	message.  Remove the full stop from the end of the message.
+	Continue processing rather than returning failure.
+
+2016-06-21  Graham Markall  <graham.markall@embecosm.com>
+
+	* archures.c: Remove bfd_mach_arc_nps400.
+	* bfd-in2.h: Likewise.
+	* cpu-arc.c (arch_info_struct): Likewise.
+	* elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing):
+	Likewise.
+
+2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18250
+	PR ld/20267
+	* elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is
+	defined.
+	(elf_link_is_defined_archive_symbol): Call
+	bfd_link_plugin_object_p on unknown plugin object and use the
+	IR symbol table if the input is an IR object.
+	* plugin.c (bfd_link_plugin_object_p): New function.
+	* plugin.h (bfd_link_plugin_object_p): New prototype.
+
+2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20276
+	* elflink.c (elf_link_add_object_symbols): Don't check alignment
+	on symbol from plugin dummy input.
+
+2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to
+	bfd_plugin_unknown.
+	* bfd-in2.h: Regenerated.
+	* plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown
+	with bfd_plugin_unknown.
+
+2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20253
+	* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an
+	bfd_boolean argument.
+	* elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace
+	"shared object" with "PIC object" in comments.
+	(_bfd_elf_allocate_ifunc_dyn_relocs): Updated.  Replace
+	"shared object" with "PIC object" in comments.  Avoid PLT if
+	requested.  Generate dynamic relocations for non-GOT references.
+	Make room for the special first entry in PLT and allocate PLT
+	entry only for PLT and PC-relative references.  Store dynamic
+	GOT relocations in .rel[a].iplt section for static executables.
+	If PLT isn't used, always use GOT for symbol value.  Don't
+	allocate GOT entry if it isn't used.
+	* elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
+	count only in the code section.  Allocate dynamic pointer
+	relocation against STT_GNU_IFUNC symbol in the non-code section.
+	(elf_i386_adjust_dynamic_symbol): Increment PLT reference count
+	only for PC-relative references.
+	(elf_i386_allocate_dynrelocs): Pass TRUE to
+	_bfd_elf_allocate_ifunc_dyn_relocs.
+	(elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X
+	relocations against STT_GNU_IFUNC symbols without PLT.  Generate
+	dynamic pointer relocation against STT_GNU_IFUNC symbol in
+	the non-code section and store it in the proper REL section.
+	Don't allow non-pointer relocation against STT_GNU_IFUNC symbol
+	without PLT.
+	(elf_i386_finish_dynamic_symbol): Generate dynamic
+	R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against
+	STT_GNU_IFUNC symbols without PLT.
+	(elf_i386_finish_dynamic_sections): Don't handle local
+	STT_GNU_IFUNC symbols here.
+	(elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC
+	symbols here.
+	(elf_backend_output_arch_local_syms): New.
+	* elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference
+	count only in the code section.  Allocate dynamic pointer
+	relocation against STT_GNU_IFUNC symbol in the non-code section.
+	(elf_x86_64_adjust_dynamic_symbol): Increment PLT reference
+	count only for PC-relative references.
+	(elf_x86_64_allocate_dynrelocs): Pass TRUE to
+	_bfd_elf_allocate_ifunc_dyn_relocs.
+	(elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL,
+	R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and
+	R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols
+	without PLT.  Generate dynamic pointer relocation against
+	STT_GNU_IFUNC symbol in the non-code section and store it in
+	the proper RELA section.  Don't allow non-pointer relocation
+	against STT_GNU_IFUNC symbol without PLT.
+	(elf_x86_64_finish_dynamic_symbol): Generate dynamic
+	R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against
+	STT_GNU_IFUNC symbols without PLT.
+	(elf_x86_64_finish_dynamic_sections): Don't handle local
+	STT_GNU_IFUNC symbols here.
+	(elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC
+	symbols here.
+	(elf_backend_output_arch_local_syms): New.
+	* elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
+	Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs.
+
+2016-06-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+	    Tony Wang  <tony.wang@arm.com>
+
+	* elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub
+	sequence.
+	(stub_long_branch_thumb2_only): Define stub.
+	(arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only.
+	(arm_stub_long_branch_thumb2_only): Likewise.
+	(arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2
+	capable targets.
+
+2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* archures.c (bfd_mach_sparc_v8plusc): Define.
+	(bfd_mach_sparc_v9c): Likewise.
+	(bfd_mach_sparc_v8plusd): Likewise.
+	(bfd_mach_sparc_v9d): Likewise.
+	(bfd_mach_sparc_v8pluse): Likewise.
+	(bfd_mach_sparc_v9e): Likewise.
+	(bfd_mach_sparc_v8plusv): Likewise
+	(bfd_mach_sparc_v9v): Likewise.
+	(bfd_mach_sparc_v8plusm): Likewise.
+	(bfd_mach_sparc_v9m): Likewise.
+	(bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m.
+	(bfd_mach_sparc_64bit_p): Likewise.
+	* bfd-in2.h: Regenerate.
+	* cpu-sparc.c (arch_info_struct): Add entries for
+	bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}.
+	* aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m}
+	and bfd_mach_sparc_v9{c,d,e,v,m}.
+	* elf32-sparc.c (elf32_sparc_final_write_processing): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise.
+
+2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Don't check undefined
+	symbols for relocations against IFUNC symbols.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2016-06-16  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* elf32-s390.c (elf_s390_finish_dynamic_sections): Include
+	.rela.iplt in DT_PLTRELSZ.
+	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise,
+	for DT_PLTRELSZ and DT_RELASZ as well.
+
+2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Skip relocations in
+	non-loaded, non-alloced sections.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2016-06-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before
+	allocating dynamic relocation.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2016-06-14  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	PR ld/20254
+	* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc
+	offsets until reloc_toaddr.
+
+2016-06-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE.
+	Don't check symbol type for STN_UNDEF symbol index.
+	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Check
+	R_X86_64_IRELATIVE.  Don't check symbol type for STN_UNDEF symbol
+	index.
+
+2016-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (using_thumb_only): Force review of arch check logic for
+	new architecture.
+	(using_thumb2): Try Tag_THUMB_ISA_use first and check
+	for exact arch value then.  Force review of arch check logic for new
+	architecture.
+	(arch_has_arm_nop): Update and fix arch check logic.  Force review of
+	that logic for new architecture.
+	(arch_has_thumb2_nop): Remove.
+	(elf32_arm_tls_relax): Use using_thumb2 instead of above function.
+	(elf32_arm_final_link_relocate): Likewise but using thumb2.
+
+2016-06-14  Alan Modra  <amodra@gmail.com>
+
+	* bfd-in.h (bfd_my_archive): Delete.
+	* bfd-in2.h: Regenerate.
+
+2016-06-14  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20241
+	* archive.c (open_nested_file): Set my_archive.
+	* bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name
+	for thin archives.
+	* bfdio.c (bfd_tell): Don't adjust origin for thin archives.
+	(bfd_seek): Likewise.
+	* bfdwin.c (bfd_get_file_window): Likewise.
+	* cache.c (cache_bmmap): Likewise.
+	(bfd_cache_lookup_worker): Don't look in my_archive for thin archives.
+	* mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for
+	thin archives.
+	* plugin.c (try_claim): Likewise.
+	* xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of
+	file within thin archive, not the archive.
+
+2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20244
+	* elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
+	section address for R_386_GOT32/R_386_GOT32X relocations against
+	IFUNC symbols if there is no base register and return error for
+	PIC.
+
+2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
+	GOT32 adjustment for static executables.
+
+2016-06-13  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
+
+2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
+
+	* elf32-arc.c (elf_arc_relocate_section): Fixed condition.
+
+2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
+
+	* elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
+
+2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
+
+	* elf32-arc.c (arc_local_data, arc_local_data): Removed.
+	(SECTSTART): Changed.
+	(elf_arc_relocate_section): Fixed mistake in PIE related
+	condition.
+	(elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
+
+2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
+
+	* elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
+	enable support for "-z combreloc" and DT_RELACOUNT.
+	(elf_backend_reloc_type_class): Likewise
+
+2016-06-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20244
+	* elf32-i386.c (elf_i386_relocate_section): When relocating
+	R_386_GOT32, return error without a base register for PIC and
+	subtract the .got.plt section address only with a base register.
+
+2016-06-10  Alan Modra  <amodra@gmail.com>
+
+	* elf-strtab.c (struct strtab_save): Use size_t for "size".
+	(struct elf_strtab_hash): Likewise for "size" and "alloced".
+	(_bfd_elf_strtab_init): Formatting.
+	(_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
+	(_bfd_elf_strtab_addref): Take size_t idx param.
+	(_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
+	(_bfd_elf_strtab_offset): Likewise.
+	(_bfd_elf_strtab_clear_all_refs): Use size_t idx.
+	(_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
+	(_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
+	(_bfd_elf_strtab_finalize): Similarly.
+	* elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
+	(_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
+	(_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
+	* elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
+	using bfd_size_type.
+	(bfd_section_from_shdr): Delete amt.
+	(_bfd_elf_init_reloc_shdr): Likewise.
+	(_bfd_elf_link_assign_sym_version): Likewise.
+	(assign_section_numbers): Use size_t reloc_count.
+	* elflink.c (struct elf_symbuf_head): Use size_t "count".
+	(bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
+	(elf_link_is_defined_archive_symbol): Likewise.
+	(elf_add_dt_needed_tag): Likewise.
+	(elf_finalize_dynstr): Likewise.
+	(elf_link_add_object_symbols): Likewise.
+	(bfd_elf_size_dynamic_sections): Likewise.
+	(elf_create_symbuf): Similarly.
+	(bfd_elf_match_symbols_in_sections): Likewise.
+	(elf_link_swap_symbols_out): Likewise.
+	(elf_link_check_versioned_symbol): Likewise.
+	(bfd_elf_gc_record_vtinherit): Likewise.
+	(bfd_elf_gc_common_finalize_got_offsets): Likewise.
+
+2016-06-08  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	PR ld/20221
+	* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
+	and relocs only if shrinking occurred.
+
+2016-06-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
+	(elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
+	(elf_i386_check_tls_transition): Check indirect call and direct
+	call with the addr32 prefix for general and local dynamic models.
+	Set the tls_get_addr feild.
+	(elf_i386_convert_load_reloc): Always use addr32 prefix for
+	indirect ___tls_get_addr call via GOT.
+	(elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
+	transitions with indirect call and direct call with the addr32
+	prefix.
+
+2016-06-07  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
+	* elf64-s390.c (elf_s390x_plt_entry): Fix comment.
+	(elf_s390_relocate_section): Fix comment.
+	(elf_s390_finish_dynamic_sections): Fix initialization of fixed
+	.got.plt entries.
+
+2016-06-07  Ulrich Weigand  <ulrich.weigand@de.ibm.com>
+
+	* elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
+	section offset when calculation the larl operand in the first PLT
+	entry.
+
+2016-06-07  Alan Modra  <amodra@gmail.com>
+
+	* cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
+	to match other 32-bit archs.
+	* elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
+	(ppc_elf_object_p): Call it.
+	(ppc_elf_special_sections): Use APUINFO_SECTION_NAME.  Fix
+	overlong line.
+	(APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
+	* elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
+	* bfd-in.h (_bfd_elf_ppc_at_tls_transform,
+	_bfd_elf_ppc_at_tprel_transform): Move to..
+	* elf-bfd.h: ..here.
+	(_bfd_elf_ppc_set_arch): Declare.
+	* bfd-in2.h: Regenerate.
+
+2016-06-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
+	(elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
+	(elf_x86_64_check_tls_transition): Check indirect call and
+	direct call with the addr32 prefix for general and local dynamic
+	models.  Set the tls_get_addr feild.
+	(elf_x86_64_convert_load_reloc): Always use addr32 prefix for
+	indirect __tls_get_addr call via GOT.
+	(elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
+	transitions with indirect call and direct call with the addr32
+	prefix.
+
+2016-06-04  Christian Groessler  <chris@groessler.org>
+
+	* coff-z8k.c (extra_case): Fix range check for R_JR relocation.
+
+2016-06-02  Nick Clifton  <nickc@redhat.com>
+
+	PR target/20088
+	* cpu-arm.c (processors): Add "arm_any" type to match any ARM
+	architecture.
+	(arch_info_struct): Likewise.
+	(architectures): Likewise.
+
+2016-06-02  Vineet Gupta  <Vineet.Gupta1@synopsys.com>
+
+	* config.bfd: Replace -uclibc with *.
+
+2016-06-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c: Replace data32 with data16 in comments.
+
+2016-05-31  Alan Modra  <amodra@gmail.com>
+
+	PR ld/20159
+	PR ld/16467
+	* elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
+	(_bfd_elf_add_default_symbol): Don't indirect to/from defined
+	symbol given a version by a script different to the version
+	of the symbol being added.
+	(elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
+	_bfd_elf_strtab_restore.  Don't fudge dynstr references.
+	* elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
+	(struct strtab_save): New.
+	(_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
+	* elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
+	(_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
+
+2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf32-hppa.h: Add extern "C".
+	* elf32-nds32.h: Likewise.
+	* elf32-tic6x.h: Likewise.
+
+2016-06-01  Nick Clifton  <nickc@redhat.com>
+
+	* po/sr.po: New Serbian translation.
+	* configure.ac (ALL_LINGUAS): Add sr.
+	* configure: Regenerate.
+
+2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (b_reloc_p): New function.
+	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
+	branch relocations.
+
+2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
+	<R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
+	reloc location from calculation, treat the addend as signed with
+	local non-section symbols and enable overflow detection.
+
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+	* aoutx.h: Adjust linker callback calls throughout file,
+	removing dead code.
+	* bout.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-arm.c: Likewise.
+	* coff-h8300.c: Likewise.
+	* coff-h8500.c: Likewise.
+	* coff-i960.c: Likewise.
+	* coff-mcore.c: Likewise.
+	* coff-mips.c: Likewise.
+	* coff-ppc.c: Likewise.
+	* coff-rs6000.c: Likewise.
+	* coff-sh.c: Likewise.
+	* coff-tic80.c: Likewise.
+	* coff-w65.c: Likewise.
+	* coff-z80.c: Likewise.
+	* coff-z8k.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* cofflink.c: Likewise.
+	* ecoff.c: Likewise.
+	* elf-bfd.h: Likewise.
+	* elf-m10200.c: Likewise.
+	* elf-m10300.c: Likewise.
+	* elf32-arc.c: Likewise.
+	* elf32-arm.c: Likewise.
+	* elf32-avr.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-cr16.c: Likewise.
+	* elf32-cr16c.c: Likewise.
+	* elf32-cris.c: Likewise.
+	* elf32-crx.c: Likewise.
+	* elf32-d10v.c: Likewise.
+	* elf32-epiphany.c: Likewise.
+	* elf32-fr30.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-ft32.c: Likewise.
+	* elf32-h8300.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-i370.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-i860.c: Likewise.
+	* elf32-ip2k.c: Likewise.
+	* elf32-iq2000.c: Likewise.
+	* elf32-lm32.c: Likewise.
+	* elf32-m32c.c: Likewise.
+	* elf32-m32r.c: Likewise.
+	* elf32-m68hc1x.c: Likewise.
+	* elf32-m68k.c: Likewise.
+	* elf32-mep.c: Likewise.
+	* elf32-metag.c: Likewise.
+	* elf32-microblaze.c: Likewise.
+	* elf32-moxie.c: Likewise.
+	* elf32-msp430.c: Likewise.
+	* elf32-mt.c: Likewise.
+	* elf32-nds32.c: Likewise.
+	* elf32-nios2.c: Likewise.
+	* elf32-or1k.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-score.c: Likewise.
+	* elf32-score7.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf32-sh64.c: Likewise.
+	* elf32-spu.c: Likewise.
+	* elf32-tic6x.c: Likewise.
+	* elf32-tilepro.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf32-visium.c: Likewise.
+	* elf32-xstormy16.c: Likewise.
+	* elf32-xtensa.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-hppa.c: Likewise.
+	* elf64-ia64-vms.c: Likewise.
+	* elf64-mmix.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-sh64.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+	* elflink.c: Likewise.
+	* elfnn-aarch64.c: Likewise.
+	* elfnn-ia64.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* elfxx-sparc.c: Likewise.
+	* elfxx-tilegx.c: Likewise.
+	* linker.c: Likewise.
+	* pdp11.c: Likewise.
+	* pe-mips.c: Likewise.
+	* reloc.c: Likewise.
+	* reloc16.c: Likewise.
+	* simple.c: Likewise.
+	* vms-alpha.c: Likewise.
+	* xcofflink.c: Likewise.
+	* elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
+	status param.  Adjust calls to these and linker callbacks throughout.
+	* elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
+	get_ramstart): Delete status param.  Adjust calls to these and
+	linker callbacks throughout.
+
+2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
+	<R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
+	target alignment verification.
+
+2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): Also use the
+	section name if `bfd_elf_string_from_elf_section' returns an
+	empty string.
+
+2016-05-26  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
+	<bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
+	for message.  Continue processing rather than returning failure.
+
+2016-05-25  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
+	<bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
+	Call `bfd_set_error'.
+
+2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/14625
+	* archive.c (bfd_slurp_armap): Replace
+	bfd_elf64_archive_slurp_armap with
+	_bfd_archive_64_bit_slurp_armap.
+	(bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
+	BFD64 is defined and the archive is too big.
+	(coff_write_armap): Likewise.
+	* archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
+	(_bfd_archive_64_bit_slurp_armap): This.
+	(bfd_elf64_archive_write_armap): Renamed to ...
+	(_bfd_archive_64_bit_write_armap): This.
+	* configure.ac: Add --enable-64-bit-archive.
+	(want_64_bit_archive): New.  Set to true by default for 64-bit
+	MIPS and s390 ELF targets.
+	(USE_64_BIT_ARCHIVE): New AC_DEFINE.
+	* config.in: Regenerated.
+	* configure: Likewise.
+	* elf64-mips.c (bfd_elf64_archive_functions): Removed.
+	(bfd_elf64_archive_slurp_armap): Likewise.
+	(bfd_elf64_archive_write_armap): Likewise.
+	(bfd_elf64_archive_slurp_extended_name_table): Likewise.
+	(bfd_elf64_archive_construct_extended_name_table): Likewise.
+	(bfd_elf64_archive_truncate_arname): Likewise.
+	(bfd_elf64_archive_read_ar_hdr): Likewise.
+	(bfd_elf64_archive_write_ar_hdr): Likewise.
+	(bfd_elf64_archive_openr_next_archived_file): Likewise.
+	(bfd_elf64_archive_get_elt_at_index): Likewise.
+	(bfd_elf64_archive_generic_stat_arch_elt): Likewise.
+	(bfd_elf64_archive_update_armap_timestamp): Likewise.
+	* elf64-s390.c (bfd_elf64_archive_functions): Removed.
+	(bfd_elf64_archive_slurp_armap): Likewise.
+	(bfd_elf64_archive_write_armap): Likewise.
+	(bfd_elf64_archive_slurp_extended_name_table): Likewise.
+	(bfd_elf64_archive_construct_extended_name_table): Likewise.
+	(bfd_elf64_archive_truncate_arname): Likewise.
+	(bfd_elf64_archive_read_ar_hdr): Likewise.
+	(bfd_elf64_archive_write_ar_hdr): Likewise.
+	(bfd_elf64_archive_openr_next_archived_file): Likewise.
+	(bfd_elf64_archive_get_elt_at_index): Likewise.
+	(bfd_elf64_archive_generic_stat_arch_elt): Likewise.
+	(bfd_elf64_archive_update_armap_timestamp): Likewise.
+	* elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
+	BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
+	bfd_elfNN_archive_functions isn't defined.
+	(TARGET_LITTLE_SYM): Likewise.
+	* libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
+	(_bfd_archive_64_bit_write_armap): Likewise.
+	(_bfd_archive_64_bit_slurp_extended_name_table): New macro.
+	(_bfd_archive_64_bit_construct_extended_name_table): Likewise.
+	(_bfd_archive_64_bit_truncate_arname): Likewise.
+	(_bfd_archive_64_bit_read_ar_hdr): Likewise.
+	(_bfd_archive_64_bit_write_ar_hdr): Likewise.
+	(_bfd_archive_64_bit_openr_next_archived_file): Likewise.
+	(_bfd_archive_64_bit_get_elt_at_index): Likewise.
+	(_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
+	(_bfd_archive_64_bit_update_armap_timestamp): Likewise.
+	* libbfd.h: Regenerated.
+	* plugin.c (plugin_vec): Use _bfd_archive_64_bit on
+	BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
+
+2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20103
+	* cofflink.c (coff_link_check_archive_element): Return TRUE if
+	linker add_archive_element callback returns FALSE.
+	* ecoff.c (ecoff_link_check_archive_element): Likewise.
+	* elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
+	archive element if linker add_archive_element callback returns
+	FALSE.
+	* elflink.c (elf_link_add_archive_symbols): Likewise.
+	* pdp11.c (aout_link_check_ar_symbols): Likewise.
+	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
+	* xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
+	(xcoff_link_check_ar_symbols): Likewise.
+
+2016-05-24  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
+	<bfd_reloc_outofrange>: Unify error reporting code.
+
+2016-05-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
+	R_AARCH64_NONE.  Use HOWTO64 for R_AARCH64_NULL.
+	* relocs.c: Add BFD_RELOC_AARCH64_NULL.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Likewise.
+
+2016-05-23  Kuba Sejdak  <jakub.sejdak@phoesys.com>
+
+	* config.bfd: Add entry for arm-phoenix.
+
+2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (arm_dedicated_stub_section_padding): New function.
+	(elf32_arm_size_stubs): Declare stub_type in a more outer scope and
+	account for padding for stub section requiring one.
+	(elf32_arm_build_stubs): Add comment to stress the importance of
+	zeroing veneer section content.
+
+2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
+	bfd hook.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (arm_dedicated_stub_output_section_required): New
+	function.
+	(arm_dedicated_stub_output_section_required_alignment): Likewise.
+	(arm_dedicated_stub_output_section_name): Likewise.
+	(arm_dedicated_stub_input_section_ptr): Likewise.
+	(elf32_arm_create_or_find_stub_sec): Add stub type parameter and
+	function description comment. Add support for dedicated output stub
+	section to given stub types.
+	(elf32_arm_add_stub): Add a stub type parameter and pass it down to
+	elf32_arm_create_or_find_stub_sec.
+	(elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
+	(elf32_arm_size_stubs): Pass stub type when calling
+	elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
+	(bfd_elf32_arm_keep_private_stub_output_sections): New function.
+
+2016-05-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
+	when setting need_convert_load.
+
+2016-05-20  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
+	microMIPS JALX.
+
+2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20117
+	* elf32-i386.c (elf_i386_convert_load_reloc): Don't check
+	R_386_GOT32X.
+	(elf_i386_convert_load): Don't convert R_386_GOT32.
+
+2016-05-20  Alan Modra  <amodra@gmail.com>
+
+	PR gas/20118
+	* elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
+	SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
+
+2016-05-19  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (arc_elf_final_write_processing): Changed.
+	(debug_arc_reloc): Likewise.
+	(elf_arc_relocate_section): Likewise.
+	(elf_arc_check_relocs): Likewise.
+	(elf_arc_adjust_dynamic_symbol): Likewise.
+	(elf_arc_add_symbol_hook): Likewise.
+
+2016-05-19  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* config.bfd: Remove `am34-*-linux*' support.
+
+2016-05-19  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
+	relocs before plt relocs.
+
+2016-05-19  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
+	before dereferencing.
+
+2016-05-18  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2016-05-18  Alan Modra  <amodra@gmail.com>
+
+	* elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
+	for each BFD.  Don't goto error_ret_free_local from outside loop.
+
+2016-05-17  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf-s390-common.c (elf_s390_add_symbol_hook): Remove
+	STB_GNU_UNIQUE handling.
+	* elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
+	* elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
+	* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
+	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
+	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
+	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
+	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
+	* elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
+	* elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
+	* elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
+	(elf_backend_add_symbol_hook): Remove macro.
+	* elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
+	for STB_GNU_UNIQUE symbols.
+
+2016-05-16  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-v850.c (v850_elf_copy_notes): New function, factored out
+	from...
+	(v850_elf_copy_private_bfd_data): ... here.  Call the new
+	function and `_bfd_elf_copy_private_bfd_data'.
+
+2016-05-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20093
+	* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
+	GOTPCREL relocation against large section.
+
+2016-05-13  Alan Modra  <amodra@gmail.com>
+
+	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
+	linker dynamic sections in calculating size and address of
+	dynamic tags rather than using output sections.  Remove asserts.
+	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
+	* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
+	* elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
+	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
+	* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
+	* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
+	* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
+	* elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
+	* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
+	* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
+	* elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+	* elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
+	* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
+	* elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
+	* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
+	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
+	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
+	* elflink.c (bfd_elf_final_link): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
+	* elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
+	* elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
+	don't set doit.  Look up dynobj section.
+	(elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
+	invocation and dynamic tag vma calculation.  Don't test
+	boolean var == TRUE.
+	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
+	DT_JMPREL calc.
+
+2016-05-13  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
+	octets_per_byte.  Put dynamic .rela.plt last in link orders.
+	Assign output_offset for reloc sections rather than writing
+	sorted relocs from block corresponding to output_offset.
+
+2016-05-12  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
+
+2016-05-11  Andrew Bennett  <andrew.bennett@imgtec.com>
+
+	* elfxx-mips.c (print_mips_ases): Add DSPR3.
+
+2016-05-11  Alan Modra  <amodra@gmail.com>
+
+	* elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
+	(elf32_hppa_check_relocs): Don't set dynobj.
+	(elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
+	(elf32_hppa_build_stubs): Likewise.
+	* elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
+
+2016-05-11  Alan Modra  <amodra@gmail.com>
+
+	PR 20060
+	* elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
+	* elf32-ppc.c (ppc_elf_tls_setup): Likewise.
+
+2016-05-10  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
+	aarch64_tls_transition check.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
+	enumerator.
+	(arm_stub_sym_claimed): New function.
+	(elf32_arm_create_stub): Use veneered symbol name and section if
+	veneer needs to claim its symbol, and keep logic unchanged otherwise.
+	(arm_stub_claim_sym): New function.
+	(arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
+	veneered symbol, otherwise create local symbol as before.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_size_stubs): Use new macros
+	ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
+	and set branch type of a symbol.
+	(bfd_elf32_arm_process_before_allocation): Likewise.
+	(elf32_arm_relocate_section): Likewise and fix identation along the
+	way.
+	(allocate_dynrelocs_for_symbol): Likewise.
+	(elf32_arm_finish_dynamic_symbol): Likewise.
+	(elf32_arm_swap_symbol_in): Likewise.
+	(elf32_arm_swap_symbol_out): Likewise.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
+	* bfd-in2.h: Regenerated.
+	* elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
+	parameter to add_stub_section callback.
+	(elf32_arm_create_or_find_stub_sec): Get output section from link_sec
+	and pass it down to add_stub_section.
+	(elf32_arm_add_stub): Set section to stub_sec if NULL before using it
+	for error message.
+	(elf32_arm_size_stubs): Add output section parameter to
+	add_stub_section function pointer parameter.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_create_stub): New function.
+	(elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (enum elf32_arm_stub_type): Delete
+	arm_stub_a8_veneer_lwm enumerator.
+	(arm_stub_a8_veneer_lwm): New unsigned constant to replace
+	aforementioned enumerator.
+	(struct elf32_arm_stub_hash_entry): Delete target_addend
+	field and add source_value.
+	(struct a8_erratum_fix): Delete addend field and add target_offset.
+	(stub_hash_newfunc): Initialize source_value field amd remove
+	initialization for target_addend.
+	(arm_build_one_stub): Stop special casing Thumb relocations: promote
+	the else to being always executed, moving the
+	arm_stub_a8_veneer_b_cond specific code in it.  Remove
+	stub_entry->target_addend from points_to computation.
+	(cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
+	to target symbol from start of section rather than the offset from the
+	stub address.
+	(elf32_arm_size_stubs): Set stub_entry's source_value and target_value
+	fields from struct a8_erratum_fix's offset and target_offset
+	respectively.
+	(make_branch_to_a8_stub): Rename target variable to loc.  Compute
+	veneered_insn_loc and loc using stub_entry's source_value.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	(elf32_arm_merge_eabi_attributes): Add merging logic for
+	Tag_DSP_extension.
+
+2016-05-10  Pip Cet  <pipcet@gmail.com>
+
+	PR ld/20059
+	* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
+	Define as _bfd_generic_copy_link_hash_symbol_type when using
+	generic hash table.
+
+2016-05-09  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20063
+	* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
+	field before accessing sections array.
+
+2016-05-09  Christophe Monat  <christophe.monat@st.com>
+
+	PR ld/20030
+	* elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
+	(stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
+	to nb_words.
+	(create_instruction_vldmia): Add is_dp to disambiguate SP/DP
+	encoding.
+	(create_instruction_vldmdb): Likewise.
+	(stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
+	uses it to re-encode.
+
+2016-05-09  Nick Clifton  <nickc@redhat.com>
+
+	PR 19938
+	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
+	commit.
+
+2016-05-09  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
+
+2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/17550
+	* elf-bfd.h (elf_link_hash_entry): Update comments for indx,
+	documenting that indx == -3 if symbol is defined in a discarded
+	section.
+	* elflink.c (elf_link_add_object_symbols): Set indx to -3 if
+	symbol is defined in a discarded section.
+	(elf_link_output_extsym): Strip a global symbol defined in a
+	discarded section.
+
+2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
+	MCU.
+
+2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_convert_load): Extract the GOT load
+	conversion to ...
+	(elf_i386_convert_load_reloc): This.  New function.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
+	conversion to ...
+	(elf_x86_64_convert_load_reloc): This.  New function.
+
+2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
+	Don't check if contents == NULL.
+	(elf_i386_tls_transition): Add from_relocate_section.  Check
+	from_relocate_section instead of contents != NULL.  Update
+	elf_i386_check_tls_transition call.
+	(elf_i386_check_relocs): Cache the section contents if
+	keep_memory is FALSE.  Pass FALSE as from_relocate_section to
+	elf_i386_tls_transition.
+	(elf_i386_relocate_section): Pass TRUE as from_relocate_section
+	to elf_i386_tls_transition.
+	(elf_backend_caches_rawsize): New.
+	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
+	if contents == NULL.
+	(elf_x86_64_tls_transition): Add from_relocate_section.  Check
+	from_relocate_section instead of contents != NULL.
+	(elf_x86_64_check_relocs): Cache the section contents if
+	keep_memory is FALSE.  Pass FALSE as from_relocate_section to
+	elf_x86_64_tls_transition.
+	(elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
+	to elf_x86_64_tls_transition.
+	(elf_backend_caches_rawsize): New.
+
+2016-05-03  Maciej W. Rozycki  <macro@imgtec.com>
+
+	PR 10549
+	* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
+	STB_GNU_UNIQUE.
+
+2016-05-03  Jiong Wang  <jiong.wang@arm.com>
+
+	* bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
+	* bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
+	* elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
+	no_apply_dynamic_relocs.
+	(elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
+	dynamic relocations generated.
+
+2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
+	setting to ...
+	(elf_i386_create_dynamic_sections): Here.
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
+	interp setting to ...
+	(elf_x86_64_create_dynamic_sections): Here.
+
+2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
+	and replace (EH)->has_got_reloc with GOT_RELOC.
+	(elf_i386_fixup_symbol): Pass has_got_reloc to
+	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
+	(elf_i386_allocate_dynrelocs): Likewise.
+	(elf_i386_relocate_section): Likewise.
+	(elf_i386_finish_dynamic_symbol): Likewise.
+	(elf_i386_convert_load): Pass TRUE to
+	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
+	* elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
+	GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
+	(elf_x86_64_fixup_symbol): Pass has_got_reloc to
+	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
+	(elf_x86_64_allocate_dynrelocs): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf_x86_64_finish_dynamic_symbol): Likewise.
+	(elf_x86_64_convert_load): Pass TRUE to
+	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
+
+2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (check_relocs_failed): New.
+	(elf_i386_check_relocs): Set check_relocs_failed on error.
+	(elf_i386_relocate_section): Skip if check_relocs failed.
+
+2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Set
+	check_relocs_failed on error.
+
+2016-04-29  Nick Clifton  <nickc@redhat.com>
+
+	PR 19938
+	* elf-bfd.h (struct elf_backend_data): Rename
+	elf_backend_set_special_section_info_and_link to
+	elf_backend_copy_special_section_fields.
+	* elfxx-target.h: Likewise.
+	* elf.c (section_match): Ignore the SHF_INFO_LINK flag when
+	comparing section flags.
+	(copy_special_section_fields): New function.
+	(_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
+	Perform two scans over special sections.  The first one looks for
+	a direct mapping between the output section and an input section.
+	The second scan looks for a possible match based upon section
+	characteristics.
+	* elf32-arm.c (elf32_arm_copy_special_section_fields): New
+	function.  Handle setting the sh_link field of SHT_ARM_EXIDX
+	sections.
+	* elf32-i386.c (elf32_i386_set_special_info_link): Rename to
+	elf32_i386_copy_solaris_special_section_fields.
+	* elf32-sparc.c (elf32_sparc_set_special_section_info_link):
+	Rename to elf32_sparc_copy_solaris_special_section_fields.
+	* elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
+	elf64_x86_64_copy_solaris_special_section_fields.
+
+2016-04-28  Nick Clifton  <nickc@redhat.com>
+
+	* po/zh_CN.po: Updated Chinese (simplified) translation.
+
+2016-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20006
+	* elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
+	when estimating distances between output sections.
+
+2016-04-27  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_is_start_stop): New function.
+	(_bfd_elf_gc_mark_rsec): Use it.
+	* elf-bfd.h (_bfd_elf_is_start_stop): Declare.
+
+2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
+	* mmo.c (mmo_get_section_contents): Likewise.
+	(mmo_set_section_contents): Likewise.
+
+2016-04-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf-bfd.h (elf_link_hash_table): Update comments for
+	dynsymcount.
+	* elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
+	the unused NULL entry at the head of dynamic symbol table.
+	(bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
+	checks.
+
+2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
+	created file from dynobj.
+
+2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
+	normal input file if possible.
+
+2016-04-21  Nick Clifton  <nickc@redhat.com>
+
+	* aout-adobe.c: Use _bfd_generic_link_check_relocs.
+	* aout-target.h: Likewise.
+	* aout-tic30.c: Likewise.
+	* binary.c: Likewise.
+	* bout.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-rs6000.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* coffcode.h: Likewise.
+	* i386msdos.c: Likewise.
+	* i386os9k.c: Likewise.
+	* ieee.c: Likewise.
+	* ihex.c: Likewise.
+	* libbfd-in.h: Likewise.
+	* libecoff.h: Likewise.
+	* mach-o-target.c: Likewise.
+	* mmo.c: Likewise.
+	* nlm-target.h: Likewise.
+	* oasys.c: Likewise.
+	* pef.c: Likewise.
+	* plugin.c: Likewise.
+	* ppcboot.c: Likewise.
+	* som.c: Likewise.
+	* srec.c: Likewise.
+	* tekhex.c: Likewise.
+	* versados.c: Likewise.
+	* vms-alpha.c: Likewise.
+	* xsym.c: Likewise.
+	* elfxx-target.h: Use _bfd_elf_link_check_relocs.
+	* linker.c (bfd_link_check_relocs): New function.
+	(_bfd_generic_link_check_relocs): New function.
+	* targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
+	_bfd_link_check_relocs field.
+	(struct bfd_target)L Add _bfd_link_check_relocs field.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
+	(elf_backend_gc_sweep_hook): Likewise.
+	* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
+	(elf_backend_gc_sweep_hook): Likewise.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
+	in excluded sections
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19969
+	* elf64-x86-64.c (check_relocs_failed): New.
+	(elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
+	Support relocation agaist local symbol.  Set check_relocs_failed.
+	(elf_x86_64_check_relocs): Use elf_x86_64_need_pic.  Check
+	R_X86_64_32 relocation overflow.
+	(elf_x86_64_relocate_section): Skip if check_relocs failed.
+	Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Call
+	_bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf-bfd.h (_bfd_elf_link_check_relocs): New.
+	* elflink.c (_bfd_elf_link_check_relocs): New function.
+	(elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
+	if check_relocs_after_open_input is FALSE.
+
+2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* cache.c: Update old style function definitions.
+	* elf32-m68k.c: Likewise.
+	* elf64-mmix.c: Likewise.
+	* stab-syms.c: Likewise.
+
+2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
+
+2016-04-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in: Regenerated with automake 1.11.6.
+	* aclocal.m4: Likewise.
+	* doc/Makefile.in: Likewise.
+
+2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elf32-arc.c: Add 'opcode/arc.h' include.
+	(struct arc_relocation_data): Add symbol_name.
+	(arc_special_overflow_checks): New function.
+	(arc_do_relocation): Use arc_special_overflow_checks, reindent as
+	required, add an extra comment.
+	(elf_arc_relocate_section): Setup symbol_name in reloc_data.
+
+2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
+	entries.
+	(elf_arc_relocate_section): Update enum uses.
+	(elf_arc_check_relocs): Likewise.
+	(elf_arc_finish_dynamic_symbol): Likewise.
+
+2016-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
+	"sh_link".
+
+2016-04-14  Nick Clifton  <nickc@redhat.com>
+
+	PR target/19938
+	* elf-bbfd.h (struct elf_backend_data): New field:
+	elf_strtab_flags.
+	New field: elf_backend_set_special_section_info_and_link
+	* elfxx-target.h (elf_backend_strtab_flags): Define if not already
+	defined.
+	(elf_backend_set_special_section_info_and_link): Define if not
+	already defined.
+	(elfNN_bed): Use elf_backend_set_special_section_info_and_link and
+	elf_backend_strtab_flags macros to initialise fields in structure.
+	* elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
+	being set even if SHF_MERGE is not set.
+	(elf_fake_sections): Likewise.
+	(section_match): New function.  Matches two ELF sections based
+	upon fixed characteristics.
+	(find_link): New function.  Locates a section in a BFD that
+	matches a section in a different BFD.
+	(_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
+	fields of reserved sections.
+	(bfd_elf_compute_section_file_positions): Set the flags for the
+	.shstrtab section based upon the elf_strtab_flags field in the
+	elf_backend_data structure.
+	(swap_out_syms): Likewise for the .strtab section.
+	* elflink.c (bfd_elf_final_link): Set the flags for the
+	.strtab section based upon the elf_strtab_flags field in the
+	elf_backend_data structure.
+	* elf32-i386.c (elf32_i386_set_special_info_link): New function.
+	(elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
+	targets.
+	(elf_backend_set_special_section_info_and_link): Define for
+	Solaris targets.
+	* elf32-sparc.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+
+2016-04-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19939
+	* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
+	to bfd_boolean.
+	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
+	Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
+	applies to read-only section.
+	* elf32-i386.c (elf_i386_link_hash_table): Add
+	readonly_dynrelocs_against_ifunc.
+	(elf_i386_allocate_dynrelocs): Updated.
+	(elf_i386_size_dynamic_sections): Issue an error for read-only
+	segment with dynamic IFUNC relocations only if
+	readonly_dynrelocs_against_ifunc is TRUE.
+	* elf64-x86-64.c (elf_x86_64_link_hash_table): Add
+	readonly_dynrelocs_against_ifunc.
+	(elf_x86_64_allocate_dynrelocs): Updated.
+	(elf_x86_64_size_dynamic_sections): Issue an error for read-only
+	segment with dynamic IFUNC relocations only if
+	readonly_dynrelocs_against_ifunc is TRUE.
+	* elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
+	Updated.
+
+2016-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
+	a fall through from error_ret_free_internal.  Free local_syms in
+	error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
+
+2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (plt_do_relocs_for_symbol): Changed.
+	(relocate_plt_for_entry): Likewise.
+
+2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (elf_arc_check_relocs): Changed
+
+2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (name_for_global_symbol): Changed assert.
+	(get_replace_function): Created.:
+	(struct arc_relocation_data): Changed to signed types.
+	(defines S, L, P, PDATA): Casted to signed type.
+	(defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
+	(PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
+	(arc_do_relocation): Changed.
+
+2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (name_for_global_symbol): Added assert to check for
+	symbol index.
+	(elf_arc_relocate_section): Added and changed asserts, validating
+	the synamic symbol index.
+	(elf_arc_finish_dynamic_symbol): Do not fill the dynamic
+	relocation if symbol has dynindx set to -1.
+
+2016-04-05  Maciej W. Rozycki  <macro@imgtec.com>
+
+	PR ld/19908
+	* elflink.c (elf_link_add_object_symbols): Always turn hidden
+	and internal symbols which have a dynamic index into local
+	ones.
+
+2016-04-04  Nick Clifton  <nickc@redhat.com>
+
+	PR 19872
+	* dwarf2.c (parse_comp_unit): Skip warning about unrecognised
+	version number if the version is zero.
+
+2016-04-01  Alan Modra  <amodra@gmail.com>
+
+	PR 19886
+	* elflink.c (on_needed_list): Recursively check needed status.
+	(elf_link_add_object_symbols): Adjust.
+
+2016-03-30  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	* elf32-avr.c (avr_elf32_load_records_from_section): Free
+	internal_relocs only if they aren't cached.
+
+2016-03-29  Nick Clifton  <nickc@redhat.com>
+
+	PR 17334
+	* elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
+	assertion on the size of the got section to allow it to be bigger
+	than the number of relocs.
+
+2016-03-29  Toni Spets  <toni.spets@iki.fi>
+
+	PR 19878
+	* coffcode.h (coff_write_object_contents): Revert accidental
+	2014-11-10 change.
+
+2016-03-22  Alan Modra  <amodra@gmail.com>
+
+	PR 19850
+	* dwarf2.c (read_attribute_value): Skip info_ptr check for
+	DW_FORM_flag_present.
+
+2016-03-22  Nick Clifton  <nickc@redhat.com>
+
+	* cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
+	architecture name for backwards compatibility.
+
+	* peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
+	unbounded stack use.
+
+	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
+	sufficiently recent version of GCC.
+	* configure: Regenerate.
+
+2016-03-22  Alan Modra  <amodra@gmail.com>
+
+	PR 19851
+	* plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* archures.c (bfd_mach_arc_nps400): Define.
+	* bfd-in2.h: Regenerate.
+	* cpu-arc.c (arch_info_struct): New entry for nps400, renumber
+	some existing entries to make space.
+	* elf32-arc.c (arc_elf_object_p): Add nps400 case.
+	(arc_elf_final_write_processing): Likewise.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
+	EF_ARC_CPU_GENERIC.
+	(arc_elf_final_write_processing): Don't bother setting cpu field
+	in e_flags, this will have been set elsewhere.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-arc.c (arc_elf_final_write_processing): Switch to using
+	EF_ARC_MACH_MSK.
+
+2016-03-21  Nick Clifton  <nickc@redhat.com>
+
+	* warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
+	* configure: Regenerate.
+	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
+	alloca with call to xmalloc.
+	* elf32-nds32.c: Likewise.
+	* elf64-hppa.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* pef.c: Likewise.
+	* pei-x86_64.c: Likewise.
+	* som.c: Likewise.
+	* xsym.c: Likewise.
+
+2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19827
+	* elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
+	locally in PIE.
+	(elf_i386_relocate_section): Likewise.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+
+2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19807
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Check
+	no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
+	relocation overflow check.
+
+2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfd-in2.h: Regenerated.
+
+2016-03-11  Dan Gissel  <dgisselq@ieee.org>
+
+	PR 19713
+	* elf.c (_bfd_elf_section_offset): Ensure that the returned offset
+	uses bytes not octets.
+	* elflink.c (resolve_section): Likewise.
+	Add a bfd parameter.
+	(eval_section): Pass the input_bfd to resolve_section.
+	(bfd_elf_perform_complex_relocation): Convert byte offset to
+	octets before read and writing values.
+	(elf_link_input_bfd): Add byte to octet conversions.
+	(elf_reloc_link_order): Likewise.
+	(elf_fixup_link_order): Likewise.
+	(bfd_elf_final_link): Likewise.
+	* reloc.c (_bfd_final_link_relocate): Likewise.
+	* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
+
+2016-03-10  Nick Clifton  <nickc@redhat.com>
+
+	* config.bfd: Mark the i370 target as obsolete.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
+	gcc ABI)" to printable name.
+	* cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
+	of "v850-rh850" as printable name.
+
+2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
+
+	PR ld/19623
+	* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
+	relocations against absolute symbols.
+
+2016-03-09  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/19775
+	* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
+	length elements in the archive.
+
+2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19789
+	* elflink.c (elf_link_add_object_symbols): Create dynamic sections
+	for -E/--dynamic-list only when not relocatable.
+
+2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19784
+	* elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
+	count for locally defined local IFUNC symbols in shared object.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19579
+	* elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
+	together.
+
+2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
+	    Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
+	(arc_bfd_put_32): Becomes an alias for bfd_put_32.
+	(arc_elf_howto_init): Added assert to validate relocations.
+	(get_middle_endian_relocation): Delete.
+	(middle_endian_convert): New function.
+	(ME): Redefine, now does nothing.
+	(IS_ME): New define.
+	(arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
+	definition to call middle_endian_convert.  Add a new local
+	variable and make use of this throughout. Added call to
+	arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
+
+2016-03-07  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/19775
+	* archive.c (bfd_generic_openr_next_archived_file): Allow zero
+	length elements in the archive.
+
+2016-03-07  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
+	section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
+
+2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19579
+	* elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
+	executable as definition if the new definition comes from a
+	shared library.
+
+2016-03-02  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.in: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2016-02-29  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
+	relocation addend when sections get merged.
+
+2016-02-29  Cupertino Miranda <Cupertino.Miranda@synopsys.com>
+
+	* elf32-arc.c (arc_elf_final_write_processing): Add condition to
+	the flag change.
+        (elf_arc_relocate_section): Fixes and conditions to support PIE.
+	Assert for code sections dynamic relocs.
+
+2016-02-26  Renlin Li  <renlin.li@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
+	check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
+
+2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19609
+	* elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
+	load with locally bound symbols if PIC is false or there is no
+	base register.  Optimize branch to 0 if PIC is false.
+	(elf_i386_relocate_section): Don't generate dynamic relocations
+	against undefined weak symbols if PIC is false.
+	* elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
+	if we can't estimate relocation overflow with --no-relax.
+	Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
+	symbols if PIC is false.  Optimize branch to 0 if PIC is false.
+	(elf_x86_64_relocate_section): Don't generate dynamic relocations
+	against undefined weak symbols if PIC is false.
+
+2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19645
+	* bfd.c (bfd): Change flags to 20 bits.
+	(BFD_CONVERT_ELF_COMMON): New.
+	(BFD_USE_ELF_STT_COMMON): Likewise.
+	(BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
+	BFD_USE_ELF_STT_COMMON.
+	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
+	* configure.ac: Remove --enable-elf-stt-common.
+	* elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
+	common symbol depending on BFD_CONVERT_ELF_COMMON and
+	BFD_USE_ELF_STT_COMMON.
+	* elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
+	STT_COMMON.
+	* elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
+	STT_COMMON.
+	(elf_link_convert_common_type): New function.
+	(elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
+	common symbol depending on BFD_CONVERT_ELF_COMMON and
+	BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
+	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
+	and BFD_USE_ELF_STT_COMMON to object_flags.
+	(TARGET_LITTLE_SYM): Likewise.
+	* syms.c (BSF_KEEP_G): Renamed to ...
+	(BSF_ELF_COMMON): This.
+	* bfd-in2.h: Regenerated.
+	* config.in: Likewise.
+	* configure: Likewise.
+
+2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19636
+	PR ld/19704
+	PR ld/19719
+	* elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
+	(elf_i386_link_hash_entry): Add has_got_reloc and
+	has_non_got_reloc.
+	(elf_i386_link_hash_table): Add interp.
+	(elf_i386_link_hash_newfunc): Initialize has_got_reloc and
+	has_non_got_reloc.
+	(elf_i386_copy_indirect_symbol): Copy has_got_reloc and
+	has_non_got_reloc.
+	(elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
+	(elf_i386_fixup_symbol): New function.
+	(elf_i386_pie_finish_undefweak_symbol): Likewise.
+	(elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
+	relocations and discard relocations against resolved undefined
+	weak symbols in executable.  Don't make resolved undefined weak
+	symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
+	relocation against undefined weak symbols in PIE.
+	(elf_i386_size_dynamic_sections): Set interp to .interp section.
+	(elf_i386_relocate_section): Don't generate dynamic relocations
+	against resolved undefined weak symbols in PIE, except for
+	R_386_PC32.
+	(elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
+	dynamic PLT/GOT relocations for resolved undefined weak symbols.
+	Don't generate dynamic relocation against resolved undefined weak
+	symbol in executable.
+	(elf_i386_finish_dynamic_sections): Call
+	elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
+	(elf_backend_fixup_symbol): New.
+	* elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
+	(elf_x86_64_link_hash_entry): Add has_got_reloc and
+	has_non_got_reloc.
+	(elf_x86_64_link_hash_table): Add interp.
+	(elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
+	has_non_got_reloc.
+	(elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
+	has_non_got_reloc.
+	(elf_x86_64_check_relocs): Set has_got_reloc and
+	has_non_got_reloc.
+	(elf_x86_64_fixup_symbol): New function.
+	(elf_x86_64_pie_finish_undefweak_symbol): Likewise.
+	(elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
+	relocations and discard relocations against resolved undefined
+	weak symbols in executable.  Don't make resolved undefined weak
+	symbols in executable dynamic.
+	(elf_x86_64_size_dynamic_sections): Set interp to .interp section.
+	(elf_x86_64_relocate_section): Check relocation overflow for
+	dynamic relocations against unresolved weak undefined symbols.
+	Don't generate dynamic relocations against resolved weak
+	undefined symbols in PIE.
+	(elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
+	dynamic PLT/GOT relocations for resolved undefined weak symbols.
+	Don't generate dynamic relocation against resolved undefined weak
+	symbol in executable.
+	(elf_x86_64_finish_dynamic_sections): Call
+	elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
+	(elf_backend_fixup_symbol): New.
+
+2016-02-26  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (create_linkage_sections): Create sfpr when
+	save_restore_funcs, rest of sections when not relocatable.
+	(ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
+	(sfpr_define): Define all symbols on emitted code.
+	(ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
+	when relocatable.  Move sfpr_define loop earlier.
+
+2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_need_pic): New function.
+	(elf_x86_64_relocate_section): Use it.  Replace
+	x86_64_elf_howto_table[r_type] with howto.
+
+2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19698
+	* elflink.c (bfd_elf_record_link_assignment): Set versioned if
+	symbol version is unknown.
+
+2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
+	to (bfd_vma) -1 when setting needs_plt to 0.
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
+2016-02-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (bfd_elf_record_link_assignment): Check for shared
+	library, instead of PIC, and don't check PDE when making linker
+	assigned symbol dynamic.
+
+2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
+
+	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
+	ABIVERSION for non-executable stack.
+
+2016-02-23  Rich Felker  <bugdal@aerifal.cx>
+
+	PR target/19516
+	* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
+	Always produce a RELATIVE reloc for a local symbol.
+
+2016-02-23  Hans-Peter Nilsson  <hp@axis.com>
+
+	Fix test-case ld-elf/pr19617b
+	* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
+	discard unused non-function symbols when --dynamic-list-data.
+
+2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
+	dynsym section, even if it is empty, with dynamic sections.
+
+2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* syms.c: Remove BSF_COMMON from comments.
+	* bfd-in2.h: Regenerated.
+
+2016-02-22  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
+	for destination.  Remove useless function parameters.
+	(elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
+
+2016-02-19  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/19629
+	* aoutx.h (aout_link_add_symbols): Check for out of range string
+	table offsets.
+
+	PR ld/19628
+	* reloc.c (bfd_generic_get_relocated_section_contents): Stop
+	processing if we encounter a reloc without an associated symbol.
+
+2016-02-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19617
+	* elflink.c (elf_link_add_object_symbols): Always create dynamic
+	sections for -E/--dynamic-list.
+
+2016-02-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_backend_omit_section_dynsym): New.  Defined
+	to bfd_true.
+
+2016-02-16  Joseph Myers  <joseph@codesourcery.com>
+
+	* plugin.c (plugin_vec): Set match priority to 255.
+	* format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
+	matching against the plugin vector, take priority from there not
+	from TEMP.
+
+2016-02-15  Nick Clifton  <nickc@redhat.com>
+
+	* elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
+	for length and type fields.  Use a signed value for the
+	suffix_length field.
+
+2016-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19601
+	* elf32-i386.c (elf_i386_relocate_section): Mask off the least
+	significant bit in GOT offset for R_386_GOT32X.
+
+2016-02-10  Nick Clifton  <nickc@redhat.com>
+
+	PR 19405
+	* elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
+	immediate values.
+	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
+	number of messages about FDE encoding preventing .eh_frame_hdr
+	generation.
+
+2016-02-09  Nick Clifton  <nickc@redhat.com>
+
+	* oasys.c (oasys_archive_p): Fix indentation.
+	* elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
+	constant for left shifting.
+
+	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
+	helpful warning message to explain why certain AArch64 relocs
+	might overflow.
+
+2016-02-05  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* pe-mips.c (coff_mips_reloc): Fix formatting.
+
+2016-02-05  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
+
+	* cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
+	to bfd_mach_arc_arc600.
+
+2016-02-04  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
+	for big-endian.
+
+2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19542
+	* elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
+	distances in the compressed_size field of the output section.
+
+2016-02-02  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
+	ELFv2 entry optimization.
+
+2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/19547
+	* elf.c (assign_section_numbers): Clear HAS_RELOC if there are
+	no relocations in relocatable files.
+
+2016-02-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19553
+	* elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
+	if a symbol from a library loaded via DT_NEEDED doesn't match
+	the symbol referenced by regular object.
+
+2016-02-01  Nathaniel Smith  <njs@pobox.com>
+
+	* peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
+	CODE and DATA.
+
+2016-02-01  Alan Modra  <amodra@gmail.com>
+
+	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
+	an out of range reloc_index.
+	* elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
+
+2016-02-01  Kamil Rytarowski  <n54@gmx.com>
+
+	* Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
+	(OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
+	* Makefile.in: Regenerated.
+
+2016-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
+
+2016-01-31  John David Anglin  <danglin@gcc.gnu.org>
+
+	PR ld/19526
+	* elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
+	files.
+	* elf64-hppa.c (elf32_hppa_final_link): Likewise.  Remove retval.
+
+2016-01-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19539
+	* elf32-i386.c (elf_i386_reloc_type_class): Check relocation
+	against STT_GNU_IFUNC symbol only with dynamic symbols.
+	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
+
+2016-01-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/19523
+	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
+	decompress debug sections.
+
+2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
+	`dynindx'.
+
+2016-01-25  Nick Clifton  <nickc@redhat.com>
+
+	PR target/19435
+	* mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
+	dsym filename buffer.
+
+2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
+
+2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (BZ16_REG): Correct calculation.
+
+2016-01-21  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-arc.c (ADD_RELA): Fix compile time warning errors by
+	changing the type of _loc to be bfd_byte *.
+	(elf_arc_finish_dynamic_symbol): Likewise.
+
+2016-01-21  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/19455
+	* elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
+	class of the linker stub bfd.
+	(elf32_arm_check_relocs): Skip check for pic format after
+	processing a vxWorks R_ARM_ABS12 reloc.
+	* elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
+	reporting a class mismatch.
+
+2016-01-21  Jiong Wang  <jiong.wang@arm.com>
+
+	* elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
+	veneer for sym_sec != input_sec.
+	(elfNN_aarch64_size_stub): Support STT_SECTION symbol.
+	(elfNN_aarch64_final_link_relocate): Take rela addend into account when
+	calculation destination.
+
+2016-01-21  Alan Modra  <amodra@gmail.com>
+
+	* elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
+	(swap_linux_prpsinfo64_out): New function.
+	(LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
+	(LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
+	* elf.c (elfcore_write_linux_prpsinfo32): Adjust.  Don't memset.
+	(elfcore_write_linux_prpsinfo64): Likewise.
+	* elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
+	(PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
+	(elfcore_write_ppc_linux_prpsinfo32): Adjust.  Don't memset.
+
+2016-01-21  Alan Modra  <amodra@gmail.com>
+
+	* elf-linux-core.h: Rename from elf-linux-psinfo.h.
+	* elf.c: Adjust #include.
+	* elf32-ppc.c: Don't #include elf-linux-psinfo.h
+	* Makefile.am (SOURCE_HFILES): Update.
+	* Makefile.in: Regenerate.
+	* po/SRC-PORFILES.in: Regenerate.
+
+2016-01-21  Alan Modra  <amodra@gmail.com>
+
+	* configure.ac: Move corefile selection later in file.  Move
+	tdefaults code immediately after other target vector code.
+	* configure: Regenerate.
+
+2016-01-20  Mickael Guene  <mickael.guene@st.com>
+
+	* elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
+	section using '.text.noread' pattern.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
+
+2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
+	    Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
+
+	* arc-plt.def: New file.
+	* arc-plt.h: Likewise.
+	* elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
+		       elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
+		       elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
+		       elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
+	(name_for_global_symbol): Added.
+	(ADD_RELA): Helper to create dynamic relocs.
+	(new_got_entry_to_list): Create a new got entry in linked list.
+	(symbol_has_entry_of_type): Search for specific type of entry in
+	list.
+	(is_reloc_for_GOT): return FALSE for any TLS related relocs.
+	(is_reloc_for_TLS, arc_elf_set_private_flags)
+	(arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
+	(arc_elf_merge_private_bfd_data): New functions.
+	(debug_arc_reloc): Cleaned debug info printing.
+	(PDATA reloc): Changed not to perform address alignment.
+	(reverse_me): Added. Fix for ARC_32 relocs.
+	(arc_do_relocation): Return bfd_reloc_of when no relocation should
+	occur.
+	(arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
+	Changed function to access an array of list of GOT entries instead
+	of just an array of offsets.
+	(elf_arc_relocate_section): Added support for PIC and TLS related relocations.
+	(elf_arc_check_relocs): Likewise.
+	(elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
+	(elf_arc_finish_dynamic_sections): Likewise
+	(arc_create_dynamic_sections): Modified conditions to create
+	dynamic sections.
+	(ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
+	(plt_do_relocs_for_symbol, relocate_plt_for_symbol)
+	(relocate_plt_for_entry): Changed to support new way to define PLT
+	related code.
+	(add_symbol_to_plt): Likewise.
+	(arc_elf_link_hash_table_create): New function.
+
+2016-01-18  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/19440
+	* coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
+	section number into internal section number.
+	* coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
+	* coffswap.h (coff_swap_sym_in): Likewise.
+	* peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
+	* coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
+	section number field is big enough to hold the external value.
+
+2016-01-17  Alan Modra  <amodra@gmail.com>
+
+	* configure: Regenerate.
+
+2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
+
+	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
+	when address in first unwind entry does not match start of
+	section.
+
+2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
+	    Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/19368
+	* elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
+	reloc_class_ifunc.
+
+2016-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
+	place 'R_' before the reloc name returned.
+	(elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
+	the relocation string.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
+	factored out from...
+	(_bfd_mips_elf_merge_private_bfd_data): ... here.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
+	attribute check after ELF file header flag check.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
+	return status from `_bfd_elf_merge_object_attributes'.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
+	factored out from...
+	(_bfd_mips_elf_merge_private_bfd_data): ... here.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
+	handling of input MIPS ABI flags together.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
+	attribute checks for null input.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
+	pointers to target data.
+
+2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
+	an FP ABI warning.
+
+2016-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+For older changes see ChangeLog-2015 and doc/ChangeLog-0415
+
+Copyright (C) 2016 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-9193 ./bfd/ChangeLog-9193
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-9193	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ChangeLog-9193	2017-03-06 01:49:05.000000000 +0000
@@ -231,7 +231,7 @@ Sun Dec  5 19:32:08 1993  Jeffrey A. Law
 	(som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
 	now that they're safe.  Delete bogus R_STATEMENT relocations.
 
-	* som.c (som_hppa_howto_table): Add missing R_END_TRY.  Delete 
+	* som.c (som_hppa_howto_table): Add missing R_END_TRY.  Delete
 	extra R_DATA_OVERRIDE.
 	(hppa_som_gen_reloc_type): Generate a relocation for the rounding
 	mode selector if needed.
@@ -261,7 +261,7 @@ Sat Dec  4 19:40:32 1993  Jeffrey A. Law
 	relocations are not pc-relative.
 
 	* hppa_stubs.h: (BLE_N_XXX_0_31):  New instruction used in
-	linker stub code. 
+	linker stub code.
 	(COPY_2_31):  Likewise.
 
 Fri Dec  3 18:40:58 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
@@ -637,7 +637,7 @@ Sun Nov 14 23:33:01 1993  Jeffrey A. Law
 Sat Nov 13 15:27:15 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
 
 	* som.c (som_bfd_reloc_type_lookup): Add missing prototype.  Returns
-	a pointer to constant data.  Delete bogus #define which made the 
+	a pointer to constant data.  Delete bogus #define which made the
 	function useless.
 
 	* som.c (som_prep_for_fixups): New function.
@@ -730,7 +730,7 @@ Thu Nov 11 15:16:28 1993  Jeffrey A. Law
 
 	* hppa_stubs.h: Add new instructions to deal with %r31 lossage
 	problems.  Delete unused instructions.
-	
+
 Tue Nov  9 11:40:27 1993  Stan Shebs  (shebs@rtl.cygnus.com)
 
 	* m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
@@ -1033,14 +1033,14 @@ Tue Oct 26 10:16:54 1993  Ken Raeburn  (
 	* elf32-hppa.c (hppa_elf_get_section_contents): Add new comments
 	and clarify existing comments.  Do not use DEFUN to declare this
 	function.  Fix numerous indention problems.  Correctly handle cases
-	where symbol extension section may need to be read from disk, 
+	where symbol extension section may need to be read from disk,
 	read from memory, or built then read from memory.
 
 	* elf32-hppa.h: Reformat with gnu-indent and hand fix numerous
 	formatting and indention problems gnu-indent can not handle.
 	Clarify some comments about relocation types.  Comment basic
 	relocation "classes".  Group PARAM declarations together.
-	(HPPA_SXT_{NULL, SYMNDX, RG_RELOC}): Make members of a new 
+	(HPPA_SXT_{NULL, SYMNDX, RG_RELOC}): Make members of a new
 	enumerated type rather than #defines.
 
 Tue Oct 26 02:40:46 1993  Stu Grossman  (grossman at cygnus.com)
@@ -1054,7 +1054,7 @@ Mon Oct 25 16:05:23 1993  Ian Lance Tayl
 	* coffgen.c (coff_print_symbol): Use %lx and cast n_value to
 	unsigned long.  Use %ld for tagndx.  Use %lx for offset + vma and
 	cast it to unsigned long.
-	* ecoff.c (ecoff_emit_aggregate): Use %ld.	
+	* ecoff.c (ecoff_emit_aggregate): Use %ld.
 	(ecoff_print_symbol): Use %ld, and cast indx and sym_base to long.
 	* coffcode.h (dummy_reloc16_estimate): Specify return type.
 
@@ -1130,7 +1130,7 @@ Thu Oct 21 12:16:26 1993  Ken Raeburn  (
 	* som.h (som_section_data): Add new "subspace_index" field.
 
 	* som.c (setup_sections): Save the original SOM subspace index
-	in the BFD section associated with that subspace.  
+	in the BFD section associated with that subspace.
 	(som_get_symtab_upper_bound): Implement.
 	(som_get_symtab): Implement.
 	(som_print_symbol): Implement.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-9495 ./bfd/ChangeLog-9495
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ChangeLog-9495	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ChangeLog-9495	2017-03-06 01:49:05.000000000 +0000
@@ -2138,7 +2138,7 @@ Thu Aug 31 11:49:21 1995  Ian Lance Tayl
 	against an absolute symbol into a reloc against a section.
 
 Thu Aug 31 08:00:14 1995  steve chamberlain  <sac@slash.cygnus.com>
-	
+
 	* coff-arm.c (coff_arm_reloc): Fix common size problem.
 	(i3coff_object_p): Delete.
 
@@ -3096,7 +3096,7 @@ Fri Jun  2 18:54:59 1995  Steve Chamberl
 
 Thu Jun  1 13:51:49 1995  Steve Chamberlain  <sac@slash.cygnus.com>
 
-	* coffcode.h (sec_to_styp_flags, styp_to_sec_flags, 
+	* coffcode.h (sec_to_styp_flags, styp_to_sec_flags,
 	coff_new_section_hook):  Any section that starts ".stab"
 	is now marked as debugging.
 
@@ -3189,7 +3189,7 @@ Thu May 18 04:24:01 1995  Ken Raeburn  <
 	(MY(swap_std_reloc_{in,out})): New functions.
 	Use RELOC_ARM_BITS_NEG_{BIG,LITTLE} to extract negative reloc bit.
 	(aoutarm_squirt_out_relocs): Delete.
- 
+
 	From: David Taylor (dtaylor@armltd.co.uk)
 	* config/arm[lb]-aout.mt: New files.
 	* aout-arm.c: New file.
@@ -3216,12 +3216,12 @@ Thu May 11 16:43:14 1995  Steve Chamberl
 Thu May 11 16:43:14 1995  Steve Chamberlain  <sac@slash.cygnus.com>
 
 	* coff-i960.c (optcall_callback): don't try and optimize
-	undefined refs. 
+	undefined refs.
 	(coff_write_relocs): Search for broken relocs on the way
 	out and fix them up.
 	(coff_renumber_symbols): Calculate and return index of
 	first undefined symbol.
-	(coff_write_object_contents): Call coff_renumber_symbols 
+	(coff_write_object_contents): Call coff_renumber_symbols
 	and coff_write_relocs with the new args.
 	* libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
 	Modified prototypes.
@@ -3229,8 +3229,8 @@ Thu May 11 16:43:14 1995  Steve Chamberl
 Thu May 11 16:43:14 1995  Steve Chamberlain  <sac@slash.cygnus.com>
 			  Tom Griest <griest@cs.yale.edu>
 
-	Initial support for PE format. 
-	
+	Initial support for PE format.
+
 	* Makefile.in, targets.c, configure.in, config.bfd:
 	Add support for i386-*-winnt and i386-*-pe.
 	* archive.c (do_slurp_coff_armap):  Understand NTPE format
@@ -3248,7 +3248,7 @@ Thu May 11 16:43:14 1995  Steve Chamberl
 	(coff_slurp_symbol_table): PE uses C_SECTION class.
 	* cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
 	(_bfd_coff_generic_relocate_section): Cope with PE relocs.
-	* coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}): 
+	* coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}):
 	New code for PE headers.
 
 Tue May  9 17:01:38 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
@@ -3936,7 +3936,7 @@ Wed Feb  1 01:32:14 1995  Jeff Law  (law
 	(som_write_fixups): Ignore the addend in a R_DATA_ONE_SYMBOL fixup.
 
 	* som.c (som_object_setup): More heruistics to detect the
-	braindamaged HP OSF1 linker. 
+	braindamaged HP OSF1 linker.
 	(setup_sections): Don't forget to free subspace_sections if we get
 	an error.
 	(som_slurp_string_table): Allocate strings on this bfd's obstack
@@ -4475,14 +4475,14 @@ Sat Oct 29 12:18:10 1994  Ian Lance Tayl
 
 Fri Oct 28 10:08:41 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
 
-        NetBSD/m68k support, based on work by mikeb@snow.datametrics.com: 
+        NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
 	* config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
 	* configure.in (m68knetbsd_vec): Added.
 	* targets.c (bfd_m68knetbsd_vec): Added.
 	* hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
 	* Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
 
-	miscellaneous cleanup required by all netbsd targets, based on work 
+	miscellaneous cleanup required by all netbsd targets, based on work
 	by Andrew Cagney <cagney@highland.com.au>:
 	* netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
 	  N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
@@ -5150,7 +5150,7 @@ Tue Sep 13 11:09:39 1994  J.T. Conklin  
 	  file/variable naming conventions.
 	* i386netbsd.c: New file, renamed from netbsd386.c.
 	* ns32knetbsd.c: New file, renamed from netbsd532.c.
-	
+
 Mon Sep 12 21:56:20 1994  Jeff Law  (law@snake.cs.utah.edu)
 
 	* som.c (som_reloc_skip): Correct off-by-one error for 4-byte
@@ -6011,7 +6011,7 @@ Thu Jul 14 15:12:24 1994  Ken Raeburn  (
 	* config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
 
 	* aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
-	ns32k series. 
+	ns32k series.
 
 	* targets.c: Add netbsd532_vec and pc532machaout_vec into
 	bfd_target_vector array. Move netbsd386_vec to alphabetic order
@@ -6044,11 +6044,11 @@ Thu Jul 14 15:12:24 1994  Ken Raeburn  (
 	* bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
 
 	* archures.c: Add bfd_ns32k_arch prototype, and entry in
-	archures_init_table. 
+	archures_init_table.
 
 	* aoutx.h (aout_link_reloc_link_order): Allow for target dependent
 	MY_put_reloc macro. Allow for target dependent special_function1
-	to apply the relocation. 
+	to apply the relocation.
 
 	* aoutx.h (aout_link_input_section_std): Allow for target
 	dependent determination of reloc howto. Allow for target dependent
@@ -6124,7 +6124,7 @@ Thu Jul  7 10:10:34 1994  Peter Schauer 
 
 Thu Jul  7 10:19:20 1994  Jeff Law  (law@snake.cs.utah.edu)
 
-	* som.h (R_HPPA_COMPLEX): Fix dumb typo. 
+	* som.h (R_HPPA_COMPLEX): Fix dumb typo.
 
 Wed Jul  6 19:21:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
 
@@ -6204,7 +6204,7 @@ Fri Jul  1 12:07:41 1994  Jeff Law  (law
 	a default definition.
 	(elf32_bed): Add elf_backend_link_output_symbol_hook.
 	* elf64-target.h: Likewise.
-	
+
 	* Major rework of the PA ELF code.  Uses the new style BFD
 	linker, major cleanups.
 	* hppa_stubs.h: Rewrite from scratch.  Much smaller and simpler.
@@ -6261,7 +6261,7 @@ Fri Jul  1 12:07:41 1994  Jeff Law  (law
 	Handle being called from the BFD backend linker.
 	(elf32_hppa_final_write_processing): Likewise.
 	(elf_hppa_tc_make_sections): No longer call stub_finish.
-	
+
 Mon Jun 27 18:07:06 1994  Steve Chamberlain  (sac@cirdan.cygnus.com)
 
 	* section.c (bfd_get_section_contents): Put in parens to get
@@ -7000,7 +7000,7 @@ Thu May 19 11:37:11 1994  Ian Lance Tayl
 	(_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
 	dynstr and bucketcount fields.
 	* elf32-target.h: Initialize new dynamic linking fields.
-	* elf64-target.h: Likewise.  
+	* elf64-target.h: Likewise.
 	* elf32-i386.c: New functions for dynamic linking support.
 	* elf32-sparc.c: Likewise.
 	* bfd-in.h (bfd_elf32_record_link_assignment): Declare.
@@ -7048,7 +7048,7 @@ Mon May 16 10:09:22 1994  Jeff Law  (law
 	(hppa_elf_reloc): Likewise.
 	(hppa_look_for_stubs_in_section): Likewise
 	(ELF_MACHINE_CODE): Change to EM_PARISC.
-	* elf32-hppa.h: Include "elf/hppa.h".  Change relocation tags 
+	* elf32-hppa.h: Include "elf/hppa.h".  Change relocation tags
 	appropriately throughout elf32-hppa.h.
 	(elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
 	spec.
@@ -7576,7 +7576,7 @@ Thu Apr  7 11:10:51 1994  Jeffrey A. Law
 	* elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
 	a default definition.
 	(elf{32,64}_bed): Add elf_backend_begin_write_processing.
-	
+
 	* elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
 	(elf_hppa_tc_make_sections): Likewise.
 
@@ -8052,7 +8052,7 @@ Wed Mar 30 00:31:49 1994  Peter Schauer 
 	* i386dynix.c, config/i386-dynix.mt:  New files, handling Dynix
 	variant of a.out.
 	* configure.in, config.bfd:  Use them for Dynix.
-	* Makefile.in:  Add dependencies for i386dynix.o. 
+	* Makefile.in:  Add dependencies for i386dynix.o.
 	* targets.c:  Add definition for i386dynix_vec.
 	* hosts/symmetry.h:  Do not define TRAD_CORE_USER_OFFSET for Dynix.
 	Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
@@ -8359,7 +8359,7 @@ Fri Mar 18 18:13:49 1994  Jeffrey A. Law
 	to be copied from input section to output section during
 	objcopy or strip.
 	(som_section_data_struct): Remove several fields now in
-	som_copyable_section_data_struct.  Make the space and 
+	som_copyable_section_data_struct.  Make the space and
 	subspace dictionaries be pointers (to save space when
 	only reading objects).
 
@@ -8488,7 +8488,7 @@ Tue Mar 15 22:58:28 1994  Jeffrey A. Law
 	and bfd_is_local_label.
 
 	* targets.c: Add new entries to the bfd_target structure.
-	
+
 	* bfd.c (bfd_copy_private_bfd_data): New definition.
 
 	* section.c (bfd_copy_private_section_data): New definition.
@@ -8753,7 +8753,7 @@ Fri Feb 25 16:35:57 1994  Jeffrey A. Law
 	in many places.  Use default case when possible instead of listing
 	each case separately.  Abort for bad errors until we get error
 	code propogation working.  Work on spacing and indention problems.
-	Add FIXMEs for some unresolved problems.  Delete hopelessly broken 
+	Add FIXMEs for some unresolved problems.  Delete hopelessly broken
 	COMPLEX relocation support (it's never used anyway).
 	(hppa_elf_rebuild_insn): Delete.  Moved into libhppa.h.
 	(elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
@@ -8897,17 +8897,17 @@ Thu Feb 17 08:30:53 1994  David J. Macke
 	(bfd_error_type): Renamed from bfd_ec.  Prepend "bfd_error_" to
 	all values.
 	* bfd-in2.h: Regenerated.
-	* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h, 
-	aoutf1.h, aoutx.h, archive.c, archures.c, 
-	bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c, 
-	coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c, 
-	ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c, 
-	elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c, 
-	i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c, 
-	lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c, 
-	nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c, 
-	ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c, 
-	srec.c, sunos.c, syms.c, targets.c, tekhex.c, 
+	* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
+	aoutf1.h, aoutx.h, archive.c, archures.c,
+	bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
+	coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
+	ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
+	elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
+	i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
+	lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
+	nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
+	ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
+	srec.c, sunos.c, syms.c, targets.c, tekhex.c,
 	trad-core.c: Change callers.
 
 Tue Feb 15 22:27:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
@@ -9038,7 +9038,7 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 	* srec.c: Indent.
 	(fillup_symbols): Check bfd_alloc.  FIXME void
 	(srec_mkobject srec_get_section_contents
-	srec_set_section_contents): Check bfd_alloc. 
+	srec_set_section_contents): Check bfd_alloc.
 	(srec_make_empty_symbol): Check bfd_zalloc.
 
 	* som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
@@ -9102,7 +9102,7 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 	(bfd_section_from_phdr): Ditto.
 	(write_relocs): Ditto.  FIXME void
 	(elf_map_symbols assign_section_numbers map_program_segments):
-	Ditto.  Return a boolean. 
+	Ditto.  Return a boolean.
 	(swap_out_syms): Ditto.  Check elf_map_symbols.
 	(elf_slurp_symbol_table): Check bfd_zalloc.
 	(elf_slurp_reloca_table): Check bfd_alloc.
@@ -9115,7 +9115,7 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 	* elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
 
 	* elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
-	realloc. 
+	realloc.
 	(hppa_elf_stub_reloc): Ditto.
 	(hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
 	(hppa_elf_build_long_branch_stub): Ditto.
@@ -9126,7 +9126,7 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 	(ecoff_slurp_armap): Check bfd_alloc.
 	(ecoff_write_armap): Check bfd_zalloc.
 	(ecoff_link_hash_newfunc): Check bfd_hash_allocate and
-	_bfd_link_hash_newfunc. 
+	_bfd_link_hash_newfunc.
 	(ecoff_link_add_externals): Check bfd_alloc.
 
 	* ctor.c (bfd_constructor_entry): Check bfd_alloc.
@@ -9146,7 +9146,7 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 
 	* coffcode.h: Indent.
 	(coff_add_missing_symbols): Check bfd_alloc_by_size_t.  Return a
-	boolean. 
+	boolean.
 	(coff_write_object_contents): Check it.
 
 	* coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
@@ -9171,35 +9171,35 @@ Tue Feb  8 08:57:31 1994  David J. Macke
 	* opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
 
 	* opncls.c (obstack_chunk_alloc): Define as malloc, not
-	bfd_xmalloc_by_size_t. 
+	bfd_xmalloc_by_size_t.
 	(_bfd_new_bfd): Check obstack_begin for 0 return.
 
 	* ieee.c (obstack_chunk_alloc): Define as malloc, not
-	bfd_xmalloc_by_size_t. 
+	bfd_xmalloc_by_size_t.
 	(ieee_archive_p): Check obstack_begin for 0 return and
 	obstack_finish for NULL return.
 
 	* hash.c (obstack_chunk_alloc): Define as malloc, not
-	bfd_xmalloc_by_size_t. 
+	bfd_xmalloc_by_size_t.
 	(bfd_hash_table_init_n): Check obstack_begin for 0 return and
 	obstack_finish for NULL return.
 	(bfd_hash_lookup): Check obstack_alloc for NULL return.
 
 	* ecofflink.c (obstack_chunk_alloc): Define as malloc, not
-	bfd_xmalloc_by_size_t. 
+	bfd_xmalloc_by_size_t.
 	bfd_ecoff_debug_accumulate
 	bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
 	(add_file_shuffle add_memory_shuffle): Check obstack_alloc for
 	NULL return.  Return boolean, not void.
 	(bfd_ecoff_debug_init): Check obstack_begin for 0 return.
 	(bfd_ecoff_debug_accumulate): Check add_file_shuffle
-	and add_memory_shuffle return. 
+	and add_memory_shuffle return.
 	(string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
 	(bfd_ecoff_debug_accumulate): Check bfd_alloc.
 	(ecoff_add_string): Check add_memory_shuffle return.
 
 	* libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
-	Remove decls. 
+	Remove decls.
 	* libbfd.h: Rebuilt.
 
 Fri Feb 11 15:35:32 1994  Stu Grossman  (grossman at cygnus.com)
@@ -9309,33 +9309,33 @@ Mon Feb  7 15:02:06 1994  Ian Lance Tayl
 Sun Feb  6 20:04:10 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
 
 	* elfcode.h (prep_headers, swap_out_syms): Check for NULL return
-	from bfd_new_strtab. 
+	from bfd_new_strtab.
 	(elf_compute_section_file_positions): Check for false return from
-	swap_out_syms. 
+	swap_out_syms.
 
 	* linker.c (default_indirect_link_order): Check for NULL return
 	from bfd_get_relocated_section_contents.
 
 	* syms.c: Make example application in doc call xmalloc, not
-	bfd_xmalloc. 
+	bfd_xmalloc.
 
 	* aoutx.h (NAME(aout,slurp_symbol_table),
 	aout_link_get_symbols, NAME(aout,link_hash_table_create)):
 	* bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
-	* ecoff.c (ecoff_bfd_link_hash_table_create): 
-	* ecofflink.c (bfd_ecoff_debug_init): 
-	* format.c (bfd_check_format_matches): 
-	* linker.c (_bfd_generic_link_hash_table_create): 
-	(_bfd_generic_final_link): 
-	* reloc16.c (bfd_coff_reloc16_relax_section): 
-	(bfd_coff_reloc16_get_relocated_section_contents): 
-	* elf32-hppa.c (hppa_elf_build_arg_reloc_stub): 
-	* elf32-mips.c (mips_elf_final_link): 
-	* elfcode.h (bfd_new_strtab): 
-	(bfd_add_2_to_strtab): 
-	(elf_slurp_symbol_table): 
-	(elf_corefile_note): 
-	* libbfd.c (bfd_zmalloc): 
+	* ecoff.c (ecoff_bfd_link_hash_table_create):
+	* ecofflink.c (bfd_ecoff_debug_init):
+	* format.c (bfd_check_format_matches):
+	* linker.c (_bfd_generic_link_hash_table_create):
+	(_bfd_generic_final_link):
+	* reloc16.c (bfd_coff_reloc16_relax_section):
+	(bfd_coff_reloc16_get_relocated_section_contents):
+	* elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
+	* elf32-mips.c (mips_elf_final_link):
+	* elfcode.h (bfd_new_strtab):
+	(bfd_add_2_to_strtab):
+	(elf_slurp_symbol_table):
+	(elf_corefile_note):
+	* libbfd.c (bfd_zmalloc):
 	Use malloc and check the result, instead of bfd_xmalloc.
 
 Sat Feb  5 12:39:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
@@ -9364,7 +9364,7 @@ Fri Feb  4 23:55:44 1994  Ian Lance Tayl
 	(RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
 	(rs6000coff_rtype2howto): New function.
 	(coff_bfd_reloc_type_lookup): Defined to use
-	rs6000coff_reloc_type_lookup. 
+	rs6000coff_reloc_type_lookup.
 	(rs6000coff_reloc_type_lookup): New function.
 	(SELECT_RELOC): Defined to set r_type and r_size fields.
 	(COFF_LONG_FILENAMES): Defined.
@@ -9408,7 +9408,7 @@ Fri Feb  4 17:28:32 1994  David J. Macke
 	* libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
 	(bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
 	* libbfd-in.h: Define them as macros calling xmalloc and declare
-	xmalloc. 
+	xmalloc.
 	* libbfd.h: Rebuilt.
 
 Thu Feb  3 16:49:35 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
@@ -9538,7 +9538,7 @@ Mon Jan 24 14:41:23 1994  David J. Macke
 	* libbfd.h: Regenerated.
 
 	* archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
-	(_bfd_get_elt_at_filepos), 
+	(_bfd_get_elt_at_filepos),
 	coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
 	Change callers.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cisco-core.c ./bfd/cisco-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cisco-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cisco-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for CISCO crash dumps.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff64-rs6000.c ./bfd/coff64-rs6000.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff64-rs6000.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff64-rs6000.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for IBM RS/6000 "XCOFF64" files.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Written Clinton Popetz.
    Contributed by Cygnus Support.
 
@@ -87,7 +87,8 @@ static void _bfd_xcoff64_swap_lineno_in
 static unsigned int _bfd_xcoff64_swap_lineno_out
   (bfd *, void *, void *);
 static bfd_boolean _bfd_xcoff64_put_symbol_name
-  (bfd *, struct bfd_strtab_hash *, struct internal_syment *, const char *);
+  (struct bfd_link_info *, struct bfd_strtab_hash *,
+   struct internal_syment *, const char *);
 static bfd_boolean _bfd_xcoff64_put_ldsymbol_name
   (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *);
 static void _bfd_xcoff64_swap_sym_in
@@ -321,7 +322,7 @@ _bfd_xcoff64_swap_sym_in (bfd *abfd, voi
   in->_n._n_n._n_zeroes = 0;
   in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e_offset);
   in->n_value = H_GET_64 (abfd, ext->e_value);
-  in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
   in->n_type = H_GET_16 (abfd, ext->e_type);
   in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
   in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
@@ -518,18 +519,15 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, vo
 }
 
 static bfd_boolean
-_bfd_xcoff64_put_symbol_name (bfd *abfd, struct bfd_strtab_hash *strtab,
+_bfd_xcoff64_put_symbol_name (struct bfd_link_info *info,
+			      struct bfd_strtab_hash *strtab,
                               struct internal_syment *sym,
                               const char *name)
 {
   bfd_boolean hash;
   bfd_size_type indx;
 
-  hash = TRUE;
-
-  if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
-    hash = FALSE;
-
+  hash = !info->traditional_format;
   indx = _bfd_stringtab_add (strtab, name, hash, FALSE);
 
   if (indx == (bfd_size_type) -1)
@@ -1252,15 +1250,11 @@ xcoff64_ppc_relocate_section (bfd *outpu
 	    {
 	      if (info->unresolved_syms_in_objects != RM_IGNORE
 		  && (h->flags & XCOFF_WAS_UNDEFINED) != 0)
-		{
-		  if (! ((*info->callbacks->undefined_symbol)
-			 (info, h->root.root.string,
-			  input_bfd, input_section,
-			  rel->r_vaddr - input_section->vma,
-			  (info->unresolved_syms_in_objects
-			   == RM_GENERATE_ERROR))))
-		    return FALSE;
-		}
+		(*info->callbacks->undefined_symbol)
+		  (info, h->root.root.string, input_bfd, input_section,
+		   rel->r_vaddr - input_section->vma,
+		   info->unresolved_syms_in_objects == RM_GENERATE_ERROR);
+
 	      if (h->root.type == bfd_link_hash_defined
 		  || h->root.type == bfd_link_hash_defweak)
 		{
@@ -1277,7 +1271,7 @@ xcoff64_ppc_relocate_section (bfd *outpu
 		}
 	      else
 		{
-		  BFD_ASSERT (info->relocatable
+		  BFD_ASSERT (bfd_link_relocatable (info)
 			      || (h->flags & XCOFF_DEF_DYNAMIC) != 0
 			      || (h->flags & XCOFF_IMPORT) != 0);
 		}
@@ -1339,11 +1333,10 @@ xcoff64_ppc_relocate_section (bfd *outpu
 	    }
 	  sprintf (reloc_type_name, "0x%02x", rel->r_type);
 
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, (h ? &h->root : NULL), name, reloc_type_name,
-		  (bfd_vma) 0, input_bfd, input_section,
-		  rel->r_vaddr - input_section->vma)))
-	    return FALSE;
+	  (*info->callbacks->reloc_overflow)
+	    (info, (h ? &h->root : NULL), name, reloc_type_name,
+	     (bfd_vma) 0, input_bfd, input_section,
+	     rel->r_vaddr - input_section->vma);
 	}
 
       /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE.  */
@@ -2112,7 +2105,8 @@ xcoff64_create_csect_from_smclas (bfd *a
     }
   else
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("%B: symbol `%s' has unrecognized smclas %d"),
 	 abfd, symbol_name, aux->x_csect.x_smclas);
       bfd_set_error (bfd_error_bad_value);
@@ -2743,6 +2737,7 @@ const bfd_target rs6000_xcoff64_vec =
     _bfd_generic_copy_link_hash_symbol_type,
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
+    _bfd_generic_link_check_relocs,
     bfd_generic_gc_sections,
     bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
@@ -3001,6 +2996,7 @@ const bfd_target rs6000_xcoff64_aix_vec 
     _bfd_generic_copy_link_hash_symbol_type,
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
+    _bfd_generic_link_check_relocs,
     bfd_generic_gc_sections,
     bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-alpha.c ./bfd/coff-alpha.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-alpha.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-alpha.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ALPHA Extended-Coff files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
    Ian Lance Taylor <ian@cygnus.com>.
 
@@ -446,7 +446,7 @@ alpha_ecoff_bad_format_hook (bfd *abfd A
     return TRUE;
 
   if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f))
-    (*_bfd_error_handler)
+    _bfd_error_handler
       (_("%B: Cannot handle compressed Alpha binaries.\n"
 	 "   Use compiler flags, or objZ, to generate uncompressed binaries."),
        abfd);
@@ -597,7 +597,8 @@ alpha_adjust_reloc_in (bfd *abfd,
 {
   if (intern->r_type > ALPHA_R_GPVALUE)
     {
-      (*_bfd_error_handler)
+      /* xgettext:c-format */
+      _bfd_error_handler
 	(_("%B: unknown/unsupported relocation type %d"),
 	 abfd, intern->r_type);
       bfd_set_error (bfd_error_bad_value);
@@ -1101,24 +1102,19 @@ alpha_ecoff_get_relocated_section_conten
 	  switch (r)
 	    {
 	    case bfd_reloc_undefined:
-	      if (! ((*link_info->callbacks->undefined_symbol)
-		     (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
-		      input_bfd, input_section, rel->address, TRUE)))
-		goto error_return;
+	      (*link_info->callbacks->undefined_symbol)
+		(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
+		 input_bfd, input_section, rel->address, TRUE);
 	      break;
 	    case bfd_reloc_dangerous:
-	      if (! ((*link_info->callbacks->reloc_dangerous)
-		     (link_info, err, input_bfd, input_section,
-		      rel->address)))
-		goto error_return;
+	      (*link_info->callbacks->reloc_dangerous)
+		(link_info, err, input_bfd, input_section, rel->address);
 	      break;
 	    case bfd_reloc_overflow:
-	      if (! ((*link_info->callbacks->reloc_overflow)
-		     (link_info, NULL,
-		      bfd_asymbol_name (*rel->sym_ptr_ptr),
-		      rel->howto->name, rel->addend, input_bfd,
-		      input_section, rel->address)))
-		goto error_return;
+	      (*link_info->callbacks->reloc_overflow)
+		(link_info, NULL, bfd_asymbol_name (*rel->sym_ptr_ptr),
+		 rel->howto->name, rel->addend, input_bfd,
+		 input_section, rel->address);
 	      break;
 	    case bfd_reloc_outofrange:
 	    default:
@@ -1226,7 +1222,7 @@ alpha_convert_external_reloc (bfd *outpu
   unsigned long r_symndx;
   bfd_vma relocation;
 
-  BFD_ASSERT (info->relocatable);
+  BFD_ASSERT (bfd_link_relocatable (info));
 
   if (h->root.type == bfd_link_hash_defined
       || h->root.type == bfd_link_hash_defweak)
@@ -1405,7 +1401,7 @@ alpha_relocate_section (bfd *output_bfd,
 
   lita_sec = symndx_to_section[RELOC_SECTION_LITA];
   gp = _bfd_get_gp_value (output_bfd);
-  if (! info->relocatable && lita_sec != NULL)
+  if (! bfd_link_relocatable (info) && lita_sec != NULL)
     {
       struct ecoff_section_tdata *lita_sec_data;
 
@@ -1503,21 +1499,22 @@ alpha_relocate_section (bfd *output_bfd,
       switch (r_type)
 	{
 	case ALPHA_R_GPRELHIGH:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: unsupported relocation: ALPHA_R_GPRELHIGH"),
 	     input_bfd);
 	  bfd_set_error (bfd_error_bad_value);
 	  continue;
 
 	case ALPHA_R_GPRELLOW:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: unsupported relocation: ALPHA_R_GPRELLOW"),
 	     input_bfd);
 	  bfd_set_error (bfd_error_bad_value);
 	  continue;
 
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unknown relocation type %d"),
 	     input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -1530,7 +1527,7 @@ alpha_relocate_section (bfd *output_bfd,
 	     not otherwise used for anything.  For some reason, the
 	     address of the relocation does not appear to include the
 	     section VMA, unlike the other relocation types.  */
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
 		      ext_rel->r_vaddr);
 	  adjust_addrp = FALSE;
@@ -1683,7 +1680,7 @@ alpha_relocate_section (bfd *output_bfd,
 	      if (h == (struct ecoff_link_hash_entry *) NULL)
 		abort ();
 
-	      if (! info->relocatable)
+	      if (! bfd_link_relocatable (info))
 		{
 		  if (h->root.type == bfd_link_hash_defined
 		      || h->root.type == bfd_link_hash_defweak)
@@ -1696,10 +1693,9 @@ alpha_relocate_section (bfd *output_bfd,
 			 do not have a meaningful number for the
 			 location within the section that is being
 			 relocated.  */
-		      if (! ((*info->callbacks->undefined_symbol)
-			     (info, h->root.root.string, input_bfd,
-			      input_section, (bfd_vma) 0, TRUE)))
-			return FALSE;
+		      (*info->callbacks->undefined_symbol)
+			(info, h->root.root.string, input_bfd,
+			 input_section, (bfd_vma) 0, TRUE);
 		      addend = 0;
 		    }
 		}
@@ -1712,10 +1708,9 @@ alpha_relocate_section (bfd *output_bfd,
 		      /* This symbol is not being written out.  Pass
 			 the address as 0, as with undefined_symbol,
 			 above.  */
-		      if (! ((*info->callbacks->unattached_reloc)
-			     (info, h->root.root.string, input_bfd,
-			      input_section, (bfd_vma) 0)))
-			return FALSE;
+		      (*info->callbacks->unattached_reloc)
+			(info, h->root.root.string,
+			 input_bfd, input_section, (bfd_vma) 0);
 		    }
 
 		  addend = alpha_convert_external_reloc (output_bfd, info,
@@ -1726,7 +1721,7 @@ alpha_relocate_section (bfd *output_bfd,
 
 	  addend += r_vaddr;
 
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    {
 	      /* Adjust r_vaddr by the addend.  */
 	      H_PUT_64 (input_bfd, addend, ext_rel->r_vaddr);
@@ -1762,7 +1757,7 @@ alpha_relocate_section (bfd *output_bfd,
 	  /* Store a value from the reloc stack into a bitfield.  If
 	     we are generating relocatable output, all we do is
 	     adjust the address of the reloc.  */
-	  if (! info->relocatable)
+	  if (! bfd_link_relocatable (info))
 	    {
 	      bfd_vma mask;
 	      bfd_vma val;
@@ -1828,7 +1823,7 @@ alpha_relocate_section (bfd *output_bfd,
 		abort ();
 	    }
 
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    {
 	      /* We are generating relocatable output, and must
 		 convert the existing reloc.  */
@@ -1839,10 +1834,9 @@ alpha_relocate_section (bfd *output_bfd,
 		      && h->indx == -1)
 		    {
 		      /* This symbol is not being written out.  */
-		      if (! ((*info->callbacks->unattached_reloc)
-			     (info, h->root.root.string, input_bfd,
-			      input_section, r_vaddr - input_section->vma)))
-			return FALSE;
+		      (*info->callbacks->unattached_reloc)
+			(info, h->root.root.string, input_bfd,
+			 input_section, r_vaddr - input_section->vma);
 		    }
 
 		  relocation = alpha_convert_external_reloc (output_bfd,
@@ -1896,11 +1890,9 @@ alpha_relocate_section (bfd *output_bfd,
 		    }
 		  else
 		    {
-		      if (! ((*info->callbacks->undefined_symbol)
-			     (info, h->root.root.string, input_bfd,
-			      input_section,
-			      r_vaddr - input_section->vma, TRUE)))
-			return FALSE;
+		      (*info->callbacks->undefined_symbol)
+			(info, h->root.root.string, input_bfd, input_section,
+			 r_vaddr - input_section->vma, TRUE);
 		      relocation = 0;
 		    }
 		}
@@ -1942,19 +1934,17 @@ alpha_relocate_section (bfd *output_bfd,
 		    else
 		      name = bfd_section_name (input_bfd,
 					       symndx_to_section[r_symndx]);
-		    if (! ((*info->callbacks->reloc_overflow)
-			   (info, NULL, name,
-			    alpha_howto_table[r_type].name,
-			    (bfd_vma) 0, input_bfd, input_section,
-			    r_vaddr - input_section->vma)))
-		      return FALSE;
+		    (*info->callbacks->reloc_overflow)
+		      (info, NULL, name, alpha_howto_table[r_type].name,
+		       (bfd_vma) 0, input_bfd, input_section,
+		       r_vaddr - input_section->vma);
 		  }
 		  break;
 		}
 	    }
 	}
 
-      if (info->relocatable && adjust_addrp)
+      if (bfd_link_relocatable (info) && adjust_addrp)
 	{
 	  /* Change the address of the relocation.  */
 	  H_PUT_64 (input_bfd,
@@ -1967,10 +1957,9 @@ alpha_relocate_section (bfd *output_bfd,
 
       if (gp_usedp && gp_undefined)
 	{
-	  if (! ((*info->callbacks->reloc_dangerous)
-		 (info, _("GP relative relocation used when GP not defined"),
-		  input_bfd, input_section, r_vaddr - input_section->vma)))
-	    return FALSE;
+	  (*info->callbacks->reloc_dangerous)
+	    (info, _("GP relative relocation used when GP not defined"),
+	     input_bfd, input_section, r_vaddr - input_section->vma);
 	  /* Only give the error once per link.  */
 	  gp = 4;
 	  _bfd_set_gp_value (output_bfd, gp);
@@ -2187,7 +2176,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *arc
 static bfd *
 alpha_ecoff_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
-  file_ptr filestart;
+  ufile_ptr filestart;
 
   if (last_file == NULL)
     filestart = bfd_ardata (archive)->first_file_filepos;
@@ -2208,6 +2197,12 @@ alpha_ecoff_openr_next_archived_file (bf
 	 BSD-4.4-style element with a long odd size.  */
       filestart = last_file->proxy_origin + size;
       filestart += filestart % 2;
+      if (filestart < last_file->proxy_origin)
+	{
+	  /* Prevent looping.  See PR19256.  */
+	  bfd_set_error (bfd_error_malformed_archive);
+	  return NULL;
+	}
     }
 
   return alpha_ecoff_get_elt_at_filepos (archive, filestart);
@@ -2345,6 +2340,7 @@ static const struct ecoff_backend_data a
 #define _bfd_ecoff_section_already_linked \
   _bfd_coff_section_already_linked
 #define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
+#define _bfd_ecoff_bfd_link_check_relocs    _bfd_generic_link_check_relocs
 
 const bfd_target alpha_ecoff_le_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-apollo.c ./bfd/coff-apollo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-apollo.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-apollo.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Apollo 68000 COFF binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    By Troy Rollo (troy@cbme.unsw.edu.au)
    Based on m68k standard COFF version Written by Cygnus Support.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-arm.c ./bfd/coff-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1222,7 +1222,7 @@ coff_arm_relocate_section (bfd *output_b
          relocations to be reflected in section's data.  */
       if (rel->r_type == ARM_26
           && h != NULL
-          && info->relocatable
+          && bfd_link_relocatable (info)
           && (h->root.type == bfd_link_hash_defined
 	      || h->root.type == bfd_link_hash_defweak)
           && (h->root.u.def.section->output_section
@@ -1255,7 +1255,7 @@ coff_arm_relocate_section (bfd *output_b
 #ifdef ARM_WINCE
       /* MS ARM-CE makes the reloc relative to the opcode's pc, not
 	 the next opcode's pc, so is off by one.  */
-      if (howto->pc_relative && !info->relocatable)
+      if (howto->pc_relative && !bfd_link_relocatable (info))
 	addend -= 8;
 #endif
 
@@ -1265,7 +1265,7 @@ coff_arm_relocate_section (bfd *output_b
          then we should ignore the symbol value.  */
       if (howto->pc_relative && howto->pcrel_offset)
         {
-          if (info->relocatable)
+          if (bfd_link_relocatable (info))
             continue;
 	  /* FIXME - it is not clear which targets need this next test
 	     and which do not.  It is known that it is needed for the
@@ -1311,7 +1311,7 @@ coff_arm_relocate_section (bfd *output_b
              stub generation to the final linker pass. If we fail to
 	     verify that the name is defined, we'll try to build stubs
 	     for an undefined name...  */
-          if (! info->relocatable
+          if (! bfd_link_relocatable (info)
 	      && (   h->root.type == bfd_link_hash_defined
 		  || h->root.type == bfd_link_hash_defweak))
             {
@@ -1561,13 +1561,10 @@ coff_arm_relocate_section (bfd *output_b
 		     + sec->output_offset);
 	      }
 
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       /* Emit a reloc if the backend thinks it needs it.  */
@@ -1582,7 +1579,7 @@ coff_arm_relocate_section (bfd *output_b
 	rstat = bfd_reloc_ok;
 #ifndef ARM_WINCE
       /* Only perform this fix during the final link, not a relocatable link.  */
-      else if (! info->relocatable
+      else if (! bfd_link_relocatable (info)
 	       && howto->type == ARM_THUMB23)
         {
           /* This is pretty much a copy of what the default
@@ -1698,7 +1695,7 @@ coff_arm_relocate_section (bfd *output_b
         }
 #endif
       else
-        if (info->relocatable && ! howto->partial_inplace)
+        if (bfd_link_relocatable (info) && ! howto->partial_inplace)
             rstat = bfd_reloc_ok;
         else
 	  rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -1706,7 +1703,7 @@ coff_arm_relocate_section (bfd *output_b
 					    rel->r_vaddr - input_section->vma,
 					    val, addend);
       /* Only perform this fix during the final link, not a relocatable link.  */
-      if (! info->relocatable
+      if (! bfd_link_relocatable (info)
 	  && (rel->r_type == ARM_32 || rel->r_type == ARM_RVA32))
 	{
 	  /* Determine if we need to set the bottom bit of a relocated address
@@ -1744,7 +1741,8 @@ coff_arm_relocate_section (bfd *output_b
 	case bfd_reloc_ok:
 	  break;
 	case bfd_reloc_outofrange:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: bad reloc address 0x%lx in section `%A'"),
 	     input_bfd, input_section, (unsigned long) rel->r_vaddr);
 	  return FALSE;
@@ -1764,11 +1762,10 @@ coff_arm_relocate_section (bfd *output_b
 		  return FALSE;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
@@ -1968,7 +1965,7 @@ bfd_arm_get_bfd_for_interworking (bfd * 
 
   /* If we are only performing a partial link do not bother
      getting a bfd to hold the glue.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   globals = coff_arm_hash_table (info);
@@ -2021,7 +2018,7 @@ bfd_arm_process_before_allocation (bfd *
 
   /* If we are only performing a partial link do not bother
      to construct any glue.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Here we have a bfd that is to be included on the link.  We have a hook
@@ -2070,6 +2067,7 @@ bfd_arm_process_before_allocation (bfd *
 	  /* If the index is outside of the range of our table, something has gone wrong.  */
 	  if (symndx >= obj_conv_table_size (abfd))
 	    {
+	      /* xgettext:c-format */
 	      _bfd_error_handler (_("%B: illegal symbol index in reloc: %d"),
 				  abfd, symndx);
 	      continue;
@@ -2172,8 +2170,9 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIB
    targets, eg different CPUs or different APCS's.     */
 
 static bfd_boolean
-coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   BFD_ASSERT (ibfd != NULL && obfd != NULL);
 
   if (ibfd == obfd)
@@ -2213,16 +2212,16 @@ coff_arm_merge_private_bfd_data (bfd * i
 
 	  if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
 	    {
-	      const char *msg;
-
 	      if (APCS_FLOAT_FLAG (ibfd))
 		/* xgettext: c-format */
-		msg = _("error: %B passes floats in float registers, whereas %B passes them in integer registers");
+		_bfd_error_handler (_("\
+error: %B passes floats in float registers, whereas %B passes them in integer registers"),
+				    ibfd, obfd);
 	      else
 		/* xgettext: c-format */
-		msg = _("error: %B passes floats in integer registers, whereas %B passes them in float registers");
-
-	      _bfd_error_handler (msg, ibfd, obfd);
+		_bfd_error_handler (_("\
+error: %B passes floats in integer registers, whereas %B passes them in float registers"),
+				    ibfd, obfd);
 
 	      bfd_set_error (bfd_error_wrong_format);
 	      return FALSE;
@@ -2230,15 +2229,16 @@ coff_arm_merge_private_bfd_data (bfd * i
 
 	  if (PIC_FLAG (obfd) != PIC_FLAG (ibfd))
 	    {
-	      const char * msg;
-
 	      if (PIC_FLAG (ibfd))
 		/* xgettext: c-format */
-		msg = _("error: %B is compiled as position independent code, whereas target %B is absolute position");
+		_bfd_error_handler (_("\
+error: %B is compiled as position independent code, whereas target %B is absolute position"),
+                                    ibfd, obfd);
 	      else
 		/* xgettext: c-format */
-		msg = _("error: %B is compiled as absolute position code, whereas target %B is position independent");
-	      _bfd_error_handler (msg, ibfd, obfd);
+		_bfd_error_handler (_("\
+error: %B is compiled as absolute position code, whereas target %B is position independent"),
+                                    ibfd, obfd);
 
 	      bfd_set_error (bfd_error_wrong_format);
 	      return FALSE;
@@ -2261,16 +2261,16 @@ coff_arm_merge_private_bfd_data (bfd * i
 	  /* If the src and dest differ in their interworking issue a warning.  */
 	  if (INTERWORK_FLAG (obfd) != INTERWORK_FLAG (ibfd))
 	    {
-	      const char * msg;
-
 	      if (INTERWORK_FLAG (ibfd))
 		/* xgettext: c-format */
-		msg = _("Warning: %B supports interworking, whereas %B does not");
+		_bfd_error_handler (_("\
+Warning: %B supports interworking, whereas %B does not"),
+				    ibfd, obfd);
 	      else
 		/* xgettext: c-format */
-		msg = _("Warning: %B does not support interworking, whereas %B does");
-
-	      _bfd_error_handler (msg, ibfd, obfd);
+		_bfd_error_handler (_("\
+Warning: %B does not support interworking, whereas %B does"),
+				    ibfd, obfd);
 	    }
 	}
       else
@@ -2291,7 +2291,6 @@ coff_arm_print_private_bfd_data (bfd * a
 
   BFD_ASSERT (abfd != NULL && ptr != NULL);
 
-  /* xgettext:c-format */
   fprintf (file, _("private flags = %x:"), coff_data (abfd)->flags);
 
   if (APCS_SET (abfd))
@@ -2360,11 +2359,9 @@ _bfd_coff_arm_set_private_flags (bfd * a
   if (INTERWORK_SET (abfd) && (INTERWORK_FLAG (abfd) != flag))
     {
       if (flag)
-	/* xgettext: c-format */
 	_bfd_error_handler (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
 			    abfd);
       else
-	/* xgettext: c-format */
 	_bfd_error_handler (_("Warning: Clearing the interworking flag of %B due to outside request"),
 			    abfd);
       flag = 0;
@@ -2422,7 +2419,7 @@ coff_arm_copy_private_bfd_data (bfd * sr
 	      if (INTERWORK_FLAG (dest))
 		{
 		  /* xgettext:c-format */
-		  _bfd_error_handler (("\
+		  _bfd_error_handler (_("\
 Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"),
 				      dest, src);
 		}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-aux.c ./bfd/coff-aux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-aux.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-aux.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Apple M68K COFF A/UX 3.x files.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Richard Henderson <rth@tamu.edu>.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-bfd.c ./bfd/coff-bfd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-bfd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-bfd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD COFF interfaces used outside of BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-bfd.h ./bfd/coff-bfd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-bfd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-bfd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD COFF interfaces used outside of BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffcode.h ./bfd/coffcode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffcode.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coffcode.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for the generic parts of most COFF variants, for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -962,7 +962,7 @@ handle_COMDAT (bfd * abfd,
 	  /* All 3 branches use this.  */
 	  symname = _bfd_coff_internal_syment_name (abfd, &isym, buf);
 
-	  /* PR 17512 file: 078-11867-0.004  */ 
+	  /* PR 17512 file: 078-11867-0.004  */
 	  if (symname == NULL)
 	    {
 	      _bfd_error_handler (_("%B: unable to load COMDAT section name"), abfd);
@@ -1004,6 +1004,7 @@ handle_COMDAT (bfd * abfd,
 		   function).  See comment above for more.  */
 
 		if (isym.n_sclass == C_STAT && strcmp (name, symname) != 0)
+		  /* xgettext:c-format */
 		  _bfd_error_handler (_("%B: warning: COMDAT symbol '%s' does not match section name '%s'"),
 				      abfd, symname, name);
 
@@ -1012,6 +1013,7 @@ handle_COMDAT (bfd * abfd,
 		/* PR 17512: file: e2cfe54f.  */
 		if (esym + bfd_coff_symesz (abfd) >= esymend)
 		  {
+		    /* xgettext:c-format */
 		    _bfd_error_handler (_("%B: warning: No symbol for section '%s' found"),
 					abfd, symname);
 		    break;
@@ -1236,6 +1238,7 @@ styp_to_sec_flags (bfd *abfd,
 	  /* Generate a warning message rather using the 'unhandled'
 	     variable as this will allow some .sys files generate by
 	     other toolchains to be processed.  See bugzilla issue 196.  */
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"),
 			      abfd, name);
 	  break;
@@ -1302,7 +1305,8 @@ styp_to_sec_flags (bfd *abfd,
       /* If the section flag was not handled, report it here.  */
       if (unhandled != NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B (%s): Section flag %s (0x%x) ignored"),
 	     abfd, name, unhandled, flag);
 	  result = FALSE;
@@ -1937,8 +1941,8 @@ coff_set_alignment_hook (bfd * abfd ATTR
       section->rel_filepos += relsz;
     }
   else if (hdr->s_nreloc == 0xffff)
-    (*_bfd_error_handler)
-      ("%s: warning: claims to have 0xffff relocs, without overflow",
+    _bfd_error_handler
+      (_("%s: warning: claims to have 0xffff relocs, without overflow"),
        bfd_get_filename (abfd));
 }
 #undef ALIGN_SET
@@ -2091,7 +2095,7 @@ coff_mkobject_hook (bfd * abfd,
     }
   if (coff->go32stub != NULL)
     memcpy (coff->go32stub, internal_f->go32stub, GO32_STUBSIZE);
-  
+
   return coff;
 }
 #endif
@@ -2453,7 +2457,7 @@ coff_set_arch_mach_hook (bfd *abfd, void
 #endif
 	default:
 	  arch = bfd_arch_obscure;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Unrecognized TI COFF target id '0x%x'"),
 	     internal_f->f_target_id);
 	  break;
@@ -2779,6 +2783,7 @@ coff_write_relocs (bfd * abfd, int first
 		    if (n.r_symndx > obj_conv_table_size (abfd))
 		      {
 			bfd_set_error (bfd_error_bad_value);
+			/* xgettext:c-format */
 			_bfd_error_handler (_("%B: reloc against a non-existant symbol index: %ld"),
 					    abfd, n.r_symndx);
 			return FALSE;
@@ -3179,7 +3184,8 @@ coff_compute_section_file_positions (bfd
       if (page_size < 0)
 	{
 	  bfd_set_error (bfd_error_file_too_big);
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: page size is too large (0x%x)"), abfd, page_size);
 	  return FALSE;
 	}
@@ -3338,7 +3344,8 @@ coff_compute_section_file_positions (bfd
   if (target_index >= bfd_coff_max_nscns (abfd))
     {
       bfd_set_error (bfd_error_file_too_big);
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: too many sections (%d)"), abfd, target_index);
       return FALSE;
     }
@@ -3748,7 +3755,9 @@ coff_write_object_contents (bfd * abfd)
 		 NUL-terminated.  We use a temporary buffer so that we can still
 		 sprintf all eight chars without splatting a terminating NUL
 		 over the first byte of the following member (s_paddr).  */
-	      char s_name_buf[SCNNMLEN + 1];
+	      /* PR 21096: The +20 is to stop a bogus warning from gcc7 about
+		 a possible buffer overflow.  */
+	      char s_name_buf[SCNNMLEN + 1 + 20];
 
 	      /* An inherent limitation of the /nnnnnnn notation used to indicate
 		 the offset of the long name in the string table is that we
@@ -3756,15 +3765,17 @@ coff_write_object_contents (bfd * abfd)
 	      if (string_size >= 10000000)
 		{
 		  bfd_set_error (bfd_error_file_too_big);
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: section %s: string table overflow at offset %ld"),
 		    abfd, current->name, string_size);
 		  return FALSE;
 		}
 
-	      /* snprintf not strictly necessary now we've verified the value
-		 has less than eight ASCII digits, but never mind.  */
-	      snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long) string_size);
+	      /* We do not need to use snprintf here as we have already verfied
+		 that string_size is not too big, plus we have an overlarge
+		 buffer, just in case.  */
+	      sprintf (s_name_buf, "/%lu", (unsigned long) string_size);
 	      /* Then strncpy takes care of any padding for us.  */
 	      strncpy (section.s_name, s_name_buf, SCNNMLEN);
 	      string_size += len + 1;
@@ -4076,6 +4087,8 @@ coff_write_object_contents (bfd * abfd)
     internal_f.f_flags |= F_DYNLOAD;
 #endif
 
+  memset (&internal_a, 0, sizeof internal_a);
+
   /* Set up architecture-dependent stuff.  */
   {
     unsigned int magic = 0;
@@ -4571,7 +4584,7 @@ coff_slurp_line_table (bfd *abfd, asecti
   native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
   if (native_lineno == NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: warning: line number table read failed"), abfd);
       bfd_release (abfd, lineno_cache);
       return FALSE;
@@ -4604,7 +4617,8 @@ coff_slurp_line_table (bfd *abfd, asecti
 	  symndx = dst.l_addr.l_symndx;
 	  if (symndx >= obj_raw_syment_count (abfd))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: warning: illegal symbol index 0x%lx in line number entry %d"),
 		 abfd, (long) symndx, counter);
 	      cache_ptr->line_number = -1;
@@ -4617,7 +4631,8 @@ coff_slurp_line_table (bfd *abfd, asecti
 	     pointers like this.  */
 	  if (! ent->is_sym)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: warning: illegal symbol index 0x%lx in line number entry %d"),
 		 abfd, (long) symndx, counter);
 	      cache_ptr->line_number = -1;
@@ -4630,7 +4645,8 @@ coff_slurp_line_table (bfd *abfd, asecti
 	  if (sym < obj_symbols (abfd)
 	      || sym >= obj_symbols (abfd) + bfd_get_symcount (abfd))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: warning: illegal symbol in line number entry %d"),
 		 abfd, counter);
 	      cache_ptr->line_number = -1;
@@ -4642,7 +4658,8 @@ coff_slurp_line_table (bfd *abfd, asecti
 	  nbr_func++;
 	  cache_ptr->u.sym = (asymbol *) sym;
 	  if (sym->lineno != NULL)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: warning: duplicate line number information for `%s'"),
 	       abfd, bfd_asymbol_name (&sym->symbol));
 
@@ -4684,7 +4701,7 @@ coff_slurp_line_table (bfd *abfd, asecti
 	      *p++ = &lineno_cache[i];
 
 	  BFD_ASSERT ((unsigned int) (p - func_table) == nbr_func);
-	  
+
 	  /* Sort by functions.  */
 	  qsort (func_table, nbr_func, sizeof (alent *), coff_sort_func_alent);
 
@@ -5053,14 +5070,18 @@ coff_slurp_symbol_table (bfd * abfd)
 #if defined(TIC80COFF) || defined(TICOFF)
 	    case C_UEXT:	/* Tentative external definition.  */
 #endif
+	    case C_EXTLAB:	/* External load time label.  */
 	    default:
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: Unrecognized storage class %d for %s symbol `%s'"),
 		 abfd, src->u.syment.n_sclass,
 		 dst->symbol.section->name, dst->symbol.name);
 	      ret = FALSE;
-	    case C_EXTLAB:	/* External load time label.  */
+	      /* Fall through.  */
 	    case C_HIDDEN:	/* Ext symbol in dmert public lib.  */
+	      /* PR 20722: These symbols can also be generated by
+		 building DLLs with --gc-sections enabled.  */
 	      dst->symbol.flags = BSF_DEBUGGING;
 	      dst->symbol.value = (src->u.syment.n_value);
 	      break;
@@ -5155,7 +5176,7 @@ coff_classify_symbol (bfd *abfd,
 	  asection *sec;
 	  char * name;
  	  char buf[SYMNMLEN + 1];
- 
+
 	  name = _bfd_coff_internal_syment_name (abfd, syment, buf)
  	  sec = coff_section_from_bfd_index (abfd, syment->n_scnum);
 	  if (sec != NULL && name != NULL
@@ -5184,7 +5205,8 @@ coff_classify_symbol (bfd *abfd,
     {
       char buf[SYMNMLEN + 1];
 
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("warning: %B: local symbol `%s' has no section"),
 	 abfd, _bfd_coff_internal_syment_name (abfd, syment, buf));
     }
@@ -5290,7 +5312,8 @@ coff_slurp_reloc_table (bfd * abfd, sec_
 	{
 	  if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: warning: illegal symbol index %ld in relocs"),
 		 abfd, (long) dst.r_symndx);
 	      cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
@@ -5329,7 +5352,8 @@ coff_slurp_reloc_table (bfd * abfd, sec_
 
       if (cache_ptr->howto == NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: illegal relocation type %d at address 0x%lx"),
 	     abfd, dst.r_type, (long) dst.r_vaddr);
 	  bfd_set_error (bfd_error_bad_value);
@@ -5478,6 +5502,8 @@ dummy_reloc16_extra_cases (bfd *abfd ATT
   _bfd_generic_copy_link_hash_symbol_type
 #define coff_bfd_link_split_section  _bfd_generic_link_split_section
 
+#define coff_bfd_link_check_relocs   _bfd_generic_link_check_relocs
+
 #ifndef coff_start_final_link
 #define coff_start_final_link NULL
 #endif
@@ -5759,6 +5785,7 @@ coff_bigobj_swap_sym_in (bfd * abfd, voi
     }
 
   in->n_value = H_GET_32 (abfd, ext->e_value);
+  BFD_ASSERT (sizeof (in->n_scnum) >= 4);
   in->n_scnum = H_GET_32 (abfd, ext->e_scnum);
   in->n_type = H_GET_16 (abfd, ext->e_type);
   in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffgen.c ./bfd/coffgen.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffgen.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coffgen.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for the generic parts of COFF, for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -173,7 +173,8 @@ make_a_section_from_file (bfd *abfd,
 	case compress:
 	  if (!bfd_init_section_compress_status (abfd, return_section))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext: c-format */
 		(_("%B: unable to initialize compress status for section %s"),
 		 abfd, name);
 	      return FALSE;
@@ -196,7 +197,8 @@ make_a_section_from_file (bfd *abfd,
 	case decompress:
 	  if (!bfd_init_section_decompress_status (abfd, return_section))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext: c-format */
 		(_("%B: unable to initialize decompress status for section %s"),
 		 abfd, name);
 	      return FALSE;
@@ -1066,6 +1068,7 @@ bfd_boolean
 coff_write_alien_symbol (bfd *abfd,
 			 asymbol *symbol,
 			 struct internal_syment *isym,
+			 union internal_auxent *iaux,
 			 bfd_vma *written,
 			 bfd_size_type *string_size_p,
 			 asection **debug_string_section_p,
@@ -1151,6 +1154,8 @@ coff_write_alien_symbol (bfd *abfd,
 			   debug_string_section_p, debug_string_size_p);
   if (isym != NULL)
     *isym = native->u.syment;
+  if (iaux != NULL && native->u.syment.n_numaux)
+    *iaux = native[1].u.auxent;
   return ret;
 }
 
@@ -1215,7 +1220,8 @@ coff_write_native_symbol (bfd *abfd,
 }
 
 static void
-null_error_handler (const char * fmt ATTRIBUTE_UNUSED, ...)
+null_error_handler (const char *fmt ATTRIBUTE_UNUSED,
+		    va_list ap ATTRIBUTE_UNUSED)
 {
 }
 
@@ -1268,7 +1274,7 @@ coff_write_symbols (bfd *abfd)
       if (c_symbol == (coff_symbol_type *) NULL
 	  || c_symbol->native == (combined_entry_type *) NULL)
 	{
-	  if (!coff_write_alien_symbol (abfd, symbol, NULL, &written,
+	  if (!coff_write_alien_symbol (abfd, symbol, NULL, NULL, &written,
 					&string_size, &debug_string_section,
 					&debug_string_size))
 	    return FALSE;
@@ -1381,7 +1387,7 @@ coff_write_symbols (bfd *abfd)
 
 	  else if (! c_symbol->native->is_sym)
 	    maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN;
-	    
+
 	  else if (bfd_coff_symname_in_debug (abfd,
 					      &c_symbol->native->u.syment))
 	    /* This symbol name is in the XCOFF .debug section.
@@ -1637,7 +1643,12 @@ _bfd_coff_get_external_symbols (bfd *abf
 
   syms = bfd_malloc (size);
   if (syms == NULL)
-    return FALSE;
+    {
+      /* PR 21013: Provide an error message when the alloc fails.  */
+      _bfd_error_handler (_("%B: Not enough memory to allocate space for %lu symbols"),
+			  abfd, size);
+      return FALSE;
+    }
 
   if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
       || bfd_bread (syms, size, abfd) != size)
@@ -1700,7 +1711,8 @@ _bfd_coff_read_string_table (bfd *abfd)
 
   if (strsize < STRING_SIZE_SIZE)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("%B: bad string table size %lu"), abfd, (unsigned long) strsize);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1782,7 +1794,7 @@ coff_get_normalized_symtab (bfd *abfd)
   if (internal == NULL && size != 0)
     return NULL;
   internal_end = internal + obj_raw_syment_count (abfd);
-  
+
   raw_src = (char *) obj_coff_external_syms (abfd);
 
   /* Mark the end of the symbols.  */
@@ -2130,7 +2142,7 @@ coff_print_symbol (bfd *abfd,
 				 auxp->u.auxent.x_scn.x_comdat);
 		      break;
 		    }
-		    /* Otherwise fall through.  */
+		  /* Fall through.  */
 		case C_EXT:
 		case C_AIX_WEAKEXT:
 		  if (ISFCN (combined->u.syment.n_type))
@@ -2150,7 +2162,7 @@ coff_print_symbol (bfd *abfd,
 			       llnos, next);
 		      break;
 		    }
-		  /* Otherwise fall through.  */
+		  /* Fall through.  */
 		default:
 		  fprintf (file, "AUX lnno %d size 0x%x tagndx %ld",
 			   auxp->u.auxent.x_sym.x_misc.x_lnsz.x_lnno,
@@ -2257,7 +2269,7 @@ coff_find_nearest_line_with_names (bfd *
 
       bias = _bfd_dwarf2_find_symbol_bias (symbols,
 					   & coff_data (abfd)->dwarf2_find_line_info);
-      
+
       if (bias
 	  && _bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section,
 					    offset + bias,
@@ -2486,7 +2498,7 @@ coff_sizeof_headers (bfd *abfd, struct b
 {
   size_t size;
 
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
   else
     size = bfd_coff_filhsz (abfd);
@@ -2688,7 +2700,13 @@ static void
 fini_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
 			asection *sec)
 {
-  if (cookie->rels && coff_section_data (NULL, sec)->relocs != cookie->rels)
+  if (cookie->rels
+      /* PR 20401.  The relocs may not have been cached, so check first.
+	 If the relocs were loaded by init_reloc_cookie_rels() then this
+	 will be the case.  FIXME: Would performance be improved if the
+	 relocs *were* cached ?  */
+      && coff_section_data (NULL, sec)
+      && coff_section_data (NULL, sec)->relocs != cookie->rels)
     free (cookie->rels);
 }
 
@@ -2943,6 +2961,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSE
 	  o->flags |= SEC_EXCLUDE;
 
 	  if (info->print_gc_sections && o->size != 0)
+	    /* xgettext: c-format */
             _bfd_error_handler (_("Removing unused section '%s' in file '%B'"), sub, o->name);
 
 #if 0
@@ -3019,7 +3038,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUT
   if (!bed->can_gc_sections
       || !is_coff_hash_table (info->hash))
     {
-      (*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
+      _bfd_error_handler(_("Warning: gc-sections option ignored"));
       return TRUE;
     }
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-go32.c ./bfd/coff-go32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-go32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-go32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 COFF files (DJGPP variant).
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by DJ Delorie.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-h8300.c ./bfd/coff-h8300.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-h8300.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-h8300.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Renesas H8/300 COFF binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -579,9 +579,7 @@ h8300_reloc16_estimate (bfd *abfd, asect
 	  /* Done with this reloc.  */
 	  break;
 	}
-
-      /* FALLTHROUGH and try to turn the 24-/32-bit reloc into a 16-bit
-	 reloc.  */
+      /* Fall through.  */
 
     /* This is a 24-/32-bit absolute address in a mov insn, which can
        become an 16-bit absolute address if it's in the right range.  */
@@ -647,14 +645,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
       /* Sanity check.  */
       if (gap < -128 || gap > 126)
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
 
       /* Everything looks OK.  Apply the relocation and update the
 	 src/dst address appropriately.  */
@@ -679,14 +673,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
       /* Sanity check.  */
       if (gap > 32766 || gap < -32768)
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
 
       /* Everything looks OK.  Apply the relocation and update the
 	 src/dst address appropriately.  */
@@ -769,14 +759,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 	  src_address += 4;
 	}
       else
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
       break;
 
     /* A 16-bit absolute branch that is now an 8-bit pc-relative branch.  */
@@ -793,14 +779,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
       /* Sanity check.  */
       if (gap < -128 || gap > 126)
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
 
       /* Now fix the instruction itself.  */
       switch (data[dst_address - 1])
@@ -840,14 +822,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
       /* Sanity check.  */
       if (gap < -128 || gap > 126)
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
 
       /* Now fix the instruction.  */
       switch (data[dst_address - 2])
@@ -1040,14 +1018,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
       /* Sanity check.  */
       if (gap < -128 || gap > 126)
-	{
-	  if (! ((*link_info->callbacks->reloc_overflow)
-		 (link_info, NULL,
-		  bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		  reloc->howto->name, reloc->addend, input_section->owner,
-		  input_section, reloc->address)))
-	    abort ();
-	}
+	(*link_info->callbacks->reloc_overflow)
+	  (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	   reloc->howto->name, reloc->addend, input_section->owner,
+	   input_section, reloc->address);
 
       /* Everything looks OK.  Fix the condition in the instruction, apply
 	 the relocation, and update the src/dst address appropriately.  */
@@ -1090,7 +1064,7 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 
 	if (link_info->output_bfd->xvec != abfd->xvec)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
 	      (_("cannot handle R_MEM_INDIRECT reloc when using %s output"),
 	       link_info->output_bfd->xvec->name);
 
@@ -1123,14 +1097,10 @@ h8300_reloc16_extra_cases (bfd *abfd, st
 		src_address += 1;
 	      }
 	    else
-	      {
-		if (! ((*link_info->callbacks->reloc_overflow)
-		       (link_info, NULL,
-			bfd_asymbol_name (*reloc->sym_ptr_ptr),
-			reloc->howto->name, reloc->addend, input_section->owner,
-			input_section, reloc->address)))
-		  abort ();
-	      }
+	      (*link_info->callbacks->reloc_overflow)
+		(link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+		 reloc->howto->name, reloc->addend, input_section->owner,
+		 input_section, reloc->address);
 	    break;
 	  }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-h8500.c ./bfd/coff-h8500.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-h8500.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-h8500.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Renesas H8/500 COFF binaries.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
@@ -244,14 +244,11 @@ extra_case (bfd *in_abfd,
 				    word and the pc's been incremented.  */
 
 	if (gap > 128 || gap < -128)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (in_abfd, gap, data + *dst_ptr);
 	(*dst_ptr)++;
 	(*src_ptr)++;
@@ -268,14 +265,11 @@ extra_case (bfd *in_abfd,
 				    word and the pc's been incremented.  */
 
 	if (gap > 32767 || gap < -32768)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_16 (in_abfd, (bfd_vma) gap, data + *dst_ptr);
 	(*dst_ptr) += 2;
 	(*src_ptr) += 2;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i386.c ./bfd/coff-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -139,41 +139,41 @@ coff_i386_reloc (bfd *abfd,
 #define DOIT(x) \
   x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
 
-    if (diff != 0)
-      {
-	reloc_howto_type *howto = reloc_entry->howto;
-	unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+  if (diff != 0)
+    {
+      reloc_howto_type *howto = reloc_entry->howto;
+      unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+
+      switch (howto->size)
+	{
+	case 0:
+	  {
+	    char x = bfd_get_8 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_8 (abfd, x, addr);
+	  }
+	  break;
 
-	switch (howto->size)
+	case 1:
 	  {
-	  case 0:
-	    {
-	      char x = bfd_get_8 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_8 (abfd, x, addr);
-	    }
-	    break;
-
-	  case 1:
-	    {
-	      short x = bfd_get_16 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_16 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
-
-	  case 2:
-	    {
-	      long x = bfd_get_32 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_32 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
+	    short x = bfd_get_16 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_16 (abfd, (bfd_vma) x, addr);
+	  }
+	  break;
 
-	  default:
-	    abort ();
+	case 2:
+	  {
+	    long x = bfd_get_32 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_32 (abfd, (bfd_vma) x, addr);
 	  }
-      }
+	  break;
+
+	default:
+	  abort ();
+	}
+    }
 
   /* Now let bfd_perform_relocation finish everything up.  */
   return bfd_reloc_continue;
@@ -417,7 +417,7 @@ coff_pe_i386_relocate_section (bfd *outp
 			       struct internal_syment *syms,
 			       asection **sections)
 {
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i860.c ./bfd/coff-i860.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i860.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-i860.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel i860 COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Created mostly by substituting "860" for "386" in coff-i386.c
    Harry Dolan <dolan@ssd.intel.com>, October 1995
 
@@ -143,7 +143,7 @@ coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE
 		     char **error_message ATTRIBUTE_UNUSED)
 {
   reloc_howto_type *howto = reloc_entry->howto;
-  (*_bfd_error_handler) (_("relocation `%s' not yet implemented"), howto->name);
+  _bfd_error_handler (_("relocation `%s' not yet implemented"), howto->name);
   return bfd_reloc_notsupported;
 }
 
@@ -603,7 +603,8 @@ i860_reloc_processing (arelent *cache_pt
 	{
 	  if (dst->r_symndx < 0 || dst->r_symndx >= obj_conv_table_size (abfd))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext: c-format */
 		(_("%B: warning: illegal symbol index %ld in relocs"),
 		 abfd, dst->r_symndx);
 	      cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i960.c ./bfd/coff-i960.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-i960.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-i960.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 960 COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -322,7 +322,7 @@ coff_i960_start_final_link (bfd *abfd, s
   asection *o;
   bfd_byte *esym;
 
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     return TRUE;
 
   esym = (bfd_byte *) bfd_malloc (symesz);
@@ -447,18 +447,15 @@ coff_i960_relocate_section (bfd *output_
 		     + sec->output_section->vma
 		     + sec->output_offset);
 	    }
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       done = FALSE;
 
-      if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1)
+      if (howto->type == R_OPTCALL && ! bfd_link_relocatable (info) && symndx != -1)
 	{
 	  int class_val;
 
@@ -473,12 +470,11 @@ coff_i960_relocate_section (bfd *output_
 	      /* This symbol is apparently not from a COFF input file.
                  We warn, and then assume that it is not a leaf
                  function.  */
-	      if (! ((*info->callbacks->reloc_dangerous)
-		     (info,
-		      _("uncertain calling convention for non-COFF symbol"),
-		      input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info,
+		 _("uncertain calling convention for non-COFF symbol"),
+		 input_bfd, input_section,
+		 rel->r_vaddr - input_section->vma);
 	      break;
 	    case C_LEAFSTAT:
 	    case C_LEAFEXT:
@@ -555,11 +551,10 @@ coff_i960_relocate_section (bfd *output_
 		  return FALSE;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-ia64.c ./bfd/coff-ia64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-ia64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-ia64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HP/Intel IA-64 COFF files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cofflink.c ./bfd/cofflink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cofflink.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cofflink.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* COFF specific linker code.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -212,8 +212,9 @@ coff_link_check_archive_element (bfd *ab
   if (h->type != bfd_link_hash_undefined)
     return TRUE;
 
+  /* Include this element?  */
   if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd))
-    return FALSE;
+    return TRUE;
   *pneeded = TRUE;
 
   return coff_link_add_object_symbols (abfd, info);
@@ -343,8 +344,8 @@ coff_link_add_symbols (bfd *abfd,
 		       & COFF_LINK_HASH_PE_SECTION_SYMBOL) == 0
 		      && (*sym_hash)->root.type != bfd_link_hash_undefined
 		      && (*sym_hash)->root.type != bfd_link_hash_undefweak)
-		    (*_bfd_error_handler)
-		      ("Warning: symbol `%s' is both section and non-section",
+		    _bfd_error_handler
+		      (_("Warning: symbol `%s' is both section and non-section"),
 		       name);
 
 		  addit = FALSE;
@@ -444,7 +445,8 @@ coff_link_add_symbols (bfd *abfd,
   		          && !(DTYPE ((*sym_hash)->type) == DTYPE (sym.n_type)
   		               && (BTYPE ((*sym_hash)->type) == T_NULL
   		                   || BTYPE (sym.n_type) == T_NULL)))
-  			(*_bfd_error_handler)
+			_bfd_error_handler
+			  /* xgettext: c-format */
   			  (_("Warning: type of symbol `%s' changed from %d to %d in %B"),
   			   abfd, name, (*sym_hash)->type, sym.n_type);
 
@@ -507,7 +509,7 @@ coff_link_add_symbols (bfd *abfd,
 
   /* If this is a non-traditional, non-relocatable link, try to
      optimize the handling of any .stab/.stabstr sections.  */
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && ! info->traditional_format
       && bfd_get_flavour (info->output_bfd) == bfd_get_flavour (abfd)
       && (info->strip != strip_all && info->strip != strip_debugger))
@@ -652,7 +654,7 @@ _bfd_coff_final_link (bfd *abfd,
 		  || info->strip == strip_some)
 		o->lineno_count += sec->lineno_count;
 
-	      if (info->relocatable)
+	      if (bfd_link_relocatable (info))
 		o->reloc_count += sec->reloc_count;
 
 	      if (sec->rawsize > max_contents_size)
@@ -664,7 +666,7 @@ _bfd_coff_final_link (bfd *abfd,
 	      if (sec->reloc_count > max_reloc_count)
 		max_reloc_count = sec->reloc_count;
 	    }
-	  else if (info->relocatable
+	  else if (bfd_link_relocatable (info)
 		   && (p->type == bfd_section_reloc_link_order
 		       || p->type == bfd_symbol_reloc_link_order))
 	    ++o->reloc_count;
@@ -699,7 +701,7 @@ _bfd_coff_final_link (bfd *abfd,
 
   /* If doing a relocatable link, allocate space for the pointers we
      need to keep.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       unsigned int i;
 
@@ -747,7 +749,7 @@ _bfd_coff_final_link (bfd *abfd,
 	     memory until the end of the link.  This wastes memory,
 	     but only when doing a relocatable link, which is not the
 	     common case.  */
-	  BFD_ASSERT (info->relocatable);
+	  BFD_ASSERT (bfd_link_relocatable (info));
 	  amt = o->reloc_count;
 	  amt *= sizeof (struct internal_reloc);
 	  flaginfo.section_info[o->target_index].relocs =
@@ -799,7 +801,7 @@ _bfd_coff_final_link (bfd *abfd,
   flaginfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
   amt = max_reloc_count * relsz;
   flaginfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     {
       amt = max_reloc_count * sizeof (struct internal_reloc);
       flaginfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
@@ -811,7 +813,7 @@ _bfd_coff_final_link (bfd *abfd,
       || (flaginfo.linenos == NULL && max_lineno_count > 0)
       || (flaginfo.contents == NULL && max_contents_size > 0)
       || (flaginfo.external_relocs == NULL && max_reloc_count > 0)
-      || (! info->relocatable
+      || (! bfd_link_relocatable (info)
 	  && flaginfo.internal_relocs == NULL
 	  && max_reloc_count > 0))
     goto error_return;
@@ -872,9 +874,10 @@ _bfd_coff_final_link (bfd *abfd,
 	      asymbol *sym = bfd_get_outsymbols (sub) [i];
 	      file_ptr pos;
 	      struct internal_syment isym;
-	      bfd_size_type string_size = 0;
+	      union internal_auxent iaux;
+	      bfd_size_type string_size = 0, indx;
 	      bfd_vma written = 0;
-	      bfd_boolean rewrite = FALSE;
+	      bfd_boolean rewrite = FALSE, hash;
 
 	      if (! (sym->flags & BSF_LOCAL)
 		  || (sym->flags & (BSF_SECTION_SYM | BSF_DEBUGGING_RELOC
@@ -891,7 +894,7 @@ _bfd_coff_final_link (bfd *abfd,
 		       == NULL))
 		  || (((flaginfo.info->discard == discard_sec_merge
 			&& (bfd_get_section (sym)->flags & SEC_MERGE)
-			&& ! flaginfo.info->relocatable)
+			&& ! bfd_link_relocatable (flaginfo.info))
 		       || flaginfo.info->discard == discard_l)
 		      && bfd_is_local_label_name (sub, bfd_asymbol_name(sym))))
 		continue;
@@ -900,23 +903,52 @@ _bfd_coff_final_link (bfd *abfd,
 					     * symesz;
 	      if (bfd_seek (abfd, pos, SEEK_SET) != 0)
 		goto error_return;
-	      if (! coff_write_alien_symbol(abfd, sym, &isym, &written,
+	      if (! coff_write_alien_symbol(abfd, sym, &isym, &iaux, &written,
 					    &string_size, NULL, NULL))
 		goto error_return;
 
-	      if (string_size)
+	      hash = !flaginfo.info->traditional_format;
+
+	      if (string_size >= 6 && isym.n_sclass == C_FILE
+		  && ! isym._n._n_n._n_zeroes && isym.n_numaux)
 		{
-		  bfd_boolean hash = ! (abfd->flags & BFD_TRADITIONAL_FORMAT);
-		  bfd_size_type indx;
+		  indx = _bfd_stringtab_add (flaginfo.strtab, ".file", hash,
+					     FALSE);
+		  if (indx == (bfd_size_type) -1)
+		    goto error_return;
+		  isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
+		  bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms);
+		  if (bfd_seek (abfd, pos, SEEK_SET) != 0
+		      || bfd_bwrite (flaginfo.outsyms, symesz,
+				     abfd) != symesz)
+		    goto error_return;
+		  string_size -= 6;
+		}
 
+	      if (string_size)
+		{
 		  indx = _bfd_stringtab_add (flaginfo.strtab,
 					     bfd_asymbol_name (sym), hash,
 					     FALSE);
 		  if (indx == (bfd_size_type) -1)
 		    goto error_return;
-		  isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
-		  bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms);
-		  rewrite = TRUE;
+		  if (isym.n_sclass != C_FILE)
+		    {
+		      isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
+		      bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms);
+		      rewrite = TRUE;
+		    }
+		  else
+		    {
+		      BFD_ASSERT (isym.n_numaux == 1);
+		      iaux.x_file.x_n.x_offset = STRING_SIZE_SIZE + indx;
+		      bfd_coff_swap_aux_out (abfd, &iaux, isym.n_type, C_FILE,
+					     0, 1, flaginfo.outsyms + symesz);
+		      if (bfd_seek (abfd, pos + symesz, SEEK_SET) != 0
+			  || bfd_bwrite (flaginfo.outsyms + symesz, symesz,
+					 abfd) != symesz)
+			goto error_return;
+		    }
 		}
 
 	      if (isym.n_sclass == C_FILE)
@@ -1031,7 +1063,7 @@ _bfd_coff_final_link (bfd *abfd,
       flaginfo.outsyms = NULL;
     }
 
-  if (info->relocatable && max_output_reloc_count > 0)
+  if (bfd_link_relocatable (info) && max_output_reloc_count > 0)
     {
       /* Now that we have written out all the global symbols, we know
 	 the symbol indices to use for relocs against them, and we can
@@ -1350,8 +1382,8 @@ mark_relocs (struct coff_final_link_info
       internal_relocs = _bfd_coff_read_internal_relocs
 	(input_bfd, a, FALSE,
 	 flaginfo->external_relocs,
-	 flaginfo->info->relocatable,
-	 (flaginfo->info->relocatable
+	 bfd_link_relocatable (flaginfo->info),
+	 (bfd_link_relocatable (flaginfo->info)
 	  ? (flaginfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
 	  : flaginfo->internal_relocs)
 	);
@@ -1367,7 +1399,8 @@ mark_relocs (struct coff_final_link_info
 	 in the relocation table.  This will then be picked up in the
 	 skip/don't-skip pass.  */
       for (; irel < irelend; irel++)
-	flaginfo->sym_indices[ irel->r_symndx ] = -1;
+	if ((unsigned long) irel->r_symndx < obj_raw_syment_count (input_bfd))
+	  flaginfo->sym_indices[irel->r_symndx] = -1;
     }
 }
 
@@ -1413,7 +1446,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
   if (! flaginfo->info->keep_memory)
     copy = TRUE;
   hash = TRUE;
-  if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+  if (flaginfo->info->traditional_format)
     hash = FALSE;
 
   if (! _bfd_coff_get_external_symbols (input_bfd))
@@ -1436,7 +1469,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
      symbols that are going to be involved in the relocations.  */
   if ((   flaginfo->info->strip   != strip_none
        || flaginfo->info->discard != discard_none)
-      && flaginfo->info->relocatable)
+      && bfd_link_relocatable (flaginfo->info))
     {
       /* Mark the symbol array as 'not-used'.  */
       memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
@@ -1483,7 +1516,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
          relocation.  */
       if ((flaginfo->info->strip != strip_none
 	   || flaginfo->info->discard != discard_none)
-	  && flaginfo->info->relocatable)
+	  && bfd_link_relocatable (flaginfo->info))
 	dont_skip_symbol = *indexp;
       else
 	dont_skip_symbol = FALSE;
@@ -1591,7 +1624,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
       /* If this is an enum, struct, or union tag, see if we have
          already output an identical type.  */
       if (! skip
-	  && (flaginfo->output_bfd->flags & BFD_TRADITIONAL_FORMAT) == 0
+	  && !flaginfo->info->traditional_format
 	  && (isym.n_sclass == C_ENTAG
 	      || isym.n_sclass == C_STRTAG
 	      || isym.n_sclass == C_UNTAG)
@@ -2330,7 +2363,8 @@ _bfd_coff_link_input_bfd (struct coff_fi
 	  if ((o->flags & SEC_RELOC) != 0
 	      && o->reloc_count != 0)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext: c-format */
 		(_("%B: relocs in section `%A', but it has no contents"),
 		 input_bfd, o);
 	      bfd_set_error (bfd_error_no_contents);
@@ -2360,8 +2394,8 @@ _bfd_coff_link_input_bfd (struct coff_fi
 	  target_index = o->output_section->target_index;
 	  internal_relocs = (_bfd_coff_read_internal_relocs
 			     (input_bfd, o, FALSE, flaginfo->external_relocs,
-			      flaginfo->info->relocatable,
-			      (flaginfo->info->relocatable
+			      bfd_link_relocatable (flaginfo->info),
+			      (bfd_link_relocatable (flaginfo->info)
 			       ? (flaginfo->section_info[target_index].relocs
 				  + o->output_section->reloc_count)
 			       : flaginfo->internal_relocs)));
@@ -2393,6 +2427,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
 	      /* Complain if definition comes from an excluded section.  */
 	      if (ps->flags & SEC_EXCLUDE)
 		(*flaginfo->info->callbacks->einfo)
+		  /* xgettext: c-format */
 		  (_("%X`%s' referenced in section `%A' of %B: "
 		     "defined in discarded section `%A' of %B\n"),
 		   h->root.root.string, o, input_bfd, ps, ps->owner);
@@ -2408,7 +2443,7 @@ _bfd_coff_link_input_bfd (struct coff_fi
 					   flaginfo->sec_ptrs))
 	    return FALSE;
 
-	  if (flaginfo->info->relocatable)
+	  if (bfd_link_relocatable (flaginfo->info))
 	    {
 	      bfd_vma offset;
 	      struct internal_reloc *irelend;
@@ -2484,10 +2519,8 @@ _bfd_coff_link_input_bfd (struct coff_fi
 			  if (name == NULL)
 			    return FALSE;
 
-			  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-				 (flaginfo->info, name, input_bfd, o,
-				  irel->r_vaddr)))
-			    return FALSE;
+			  (*flaginfo->info->callbacks->unattached_reloc)
+			    (flaginfo->info, name, input_bfd, o, irel->r_vaddr);
 			}
 		    }
 		}
@@ -2602,7 +2635,7 @@ _bfd_coff_write_global_sym (struct bfd_h
       bfd_size_type indx;
 
       hash = TRUE;
-      if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+      if (flaginfo->info->traditional_format)
 	hash = FALSE;
       indx = _bfd_stringtab_add (flaginfo->strtab, h->root.root.string, hash,
 				 FALSE);
@@ -2636,8 +2669,8 @@ _bfd_coff_write_global_sym (struct bfd_h
   /* When a weak symbol is not overridden by a strong one,
      turn it into an external symbol when not building a
      shared or relocatable object.  */
-  if (! flaginfo->info->shared
-      && ! flaginfo->info->relocatable
+  if (! bfd_link_pic (flaginfo->info)
+      && ! bfd_link_relocatable (flaginfo->info)
       && IS_WEAK_EXTERNAL (flaginfo->output_bfd, isym))
     isym.n_sclass = C_EXT;
 
@@ -2690,8 +2723,9 @@ _bfd_coff_write_global_sym (struct bfd_h
                  not matter.  FIXME: Why not?  */
 	      if (sec->reloc_count > 0xffff
 		  && (! obj_pe (output_bfd)
-		      || flaginfo->info->relocatable))
-		(*_bfd_error_handler)
+		      || bfd_link_relocatable (flaginfo->info)))
+		_bfd_error_handler
+		  /* xgettext: c-format */
 		  (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
 		   bfd_get_filename (output_bfd),
 		   bfd_get_section_name (output_bfd, sec),
@@ -2699,8 +2733,9 @@ _bfd_coff_write_global_sym (struct bfd_h
 
 	      if (sec->lineno_count > 0xffff
 		  && (! obj_pe (output_bfd)
-		      || flaginfo->info->relocatable))
-		(*_bfd_error_handler)
+		      || bfd_link_relocatable (flaginfo->info)))
+		_bfd_error_handler
+		  /* xgettext: c-format */
 		  (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
 		   bfd_get_filename (output_bfd),
 		   bfd_get_section_name (output_bfd, sec),
@@ -2803,18 +2838,14 @@ _bfd_coff_reloc_link_order (bfd *output_
 	case bfd_reloc_outofrange:
 	  abort ();
 	case bfd_reloc_overflow:
-	  if (! ((*flaginfo->info->callbacks->reloc_overflow)
-		 (flaginfo->info, NULL,
-		  (link_order->type == bfd_section_reloc_link_order
-		   ? bfd_section_name (output_bfd,
-				       link_order->u.reloc.p->u.section)
-		   : link_order->u.reloc.p->u.name),
-		  howto->name, link_order->u.reloc.p->addend,
-		  (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*flaginfo->info->callbacks->reloc_overflow)
+	    (flaginfo->info, NULL,
+	     (link_order->type == bfd_section_reloc_link_order
+	      ? bfd_section_name (output_bfd,
+				  link_order->u.reloc.p->u.section)
+	      : link_order->u.reloc.p->u.name),
+	     howto->name, link_order->u.reloc.p->addend,
+	     (bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
 	  break;
 	}
       loc = link_order->offset * bfd_octets_per_byte (output_bfd);
@@ -2870,10 +2901,9 @@ _bfd_coff_reloc_link_order (bfd *output_
 	}
       else
 	{
-	  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-		 (flaginfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
-		  (asection *) NULL, (bfd_vma) 0)))
-	    return FALSE;
+	  (*flaginfo->info->callbacks->unattached_reloc)
+	    (flaginfo->info, link_order->u.reloc.p->u.name,
+	     (bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
 	  irel->r_symndx = 0;
 	}
     }
@@ -2929,8 +2959,9 @@ _bfd_coff_generic_relocate_section (bfd 
       else if (symndx < 0
 	       || (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
 	{
-	  (*_bfd_error_handler)
-	    ("%B: illegal symbol index %ld in relocs", input_bfd, symndx);
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: illegal symbol index %ld in relocs"), input_bfd, symndx);
 	  return FALSE;
 	}
       else
@@ -2959,7 +2990,7 @@ _bfd_coff_generic_relocate_section (bfd 
          then we should ignore the symbol value.  */
       if (howto->pc_relative && howto->pcrel_offset)
 	{
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    continue;
 	  if (sym != NULL && sym->n_scnum != 0)
 	    addend += sym->n_value;
@@ -2977,6 +3008,12 @@ _bfd_coff_generic_relocate_section (bfd 
 	  else
 	    {
 	      sec = sections[symndx];
+
+	      /* PR 19623: Relocations against symbols in
+		 the absolute sections should ignored.  */
+              if (bfd_is_abs_section (sec))
+		continue;
+
               val = (sec->output_section->vma
 		     + sec->output_offset
 		     + sym->n_value);
@@ -3031,13 +3068,10 @@ _bfd_coff_generic_relocate_section (bfd 
 		val = 0;
 	    }
 
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       /* If the input section defining the symbol has been discarded
@@ -3087,7 +3121,8 @@ _bfd_coff_generic_relocate_section (bfd 
 	case bfd_reloc_ok:
 	  break;
 	case bfd_reloc_outofrange:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("%B: bad reloc address 0x%lx in section `%A'"),
 	     input_bfd, input_section, (unsigned long) rel->r_vaddr);
 	  return FALSE;
@@ -3107,11 +3142,10 @@ _bfd_coff_generic_relocate_section (bfd 
 		  return FALSE;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-m68k.c ./bfd/coff-m68k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-m68k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-m68k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola 68000 COFF binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -446,7 +446,7 @@ bfd_m68k_coff_create_embedded_relocs (bf
   bfd_byte *p;
   bfd_size_type amt;
 
-  BFD_ASSERT (! info->relocatable);
+  BFD_ASSERT (! bfd_link_relocatable (info));
 
   *errmsg = NULL;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-m88k.c ./bfd/coff-m88k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-m88k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-m88k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola 88000 COFF "Binary Compatibility Standard" files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-mcore.c ./bfd/coff-mcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-mcore.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-mcore.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola MCore COFF/PE
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -241,6 +241,7 @@ mcore_coff_unsupported_reloc (bfd * abfd
 {
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
 
+  /* xgettext: c-format */
   _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
 		      abfd,
 		      reloc_entry->howto->name,
@@ -358,14 +359,15 @@ coff_mcore_relocate_section (bfd * outpu
   /* If we are performing a relocatable link, we don't need to do a
      thing.  The caller will take care of adjusting the reloc
      addresses and symbol indices.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Check if we have the same endianness */
   if (   input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
       && output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("%B: compiled for a %s system and target is %s.\n"),
 	 input_bfd,
          bfd_big_endian (input_bfd) ? _("big endian") : _("little endian"),
@@ -454,12 +456,9 @@ coff_mcore_relocate_section (bfd * outpu
 		     + sec->output_offset);
 	    }
 	  else
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 
 	  my_name = h->root.root.string;
 	}
@@ -470,6 +469,7 @@ coff_mcore_relocate_section (bfd * outpu
       switch (r_type)
 	{
 	default:
+	  /* xgettext: c-format */
 	  _bfd_error_handler (_("%B: unsupported relocation type 0x%02x"),
 			      input_bfd, r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -477,6 +477,7 @@ coff_mcore_relocate_section (bfd * outpu
 
 	case IMAGE_REL_MCORE_ABSOLUTE:
 	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("Warning: unsupported reloc %s <file %B, section %A>\n"
 	       "sym %ld (%s), r_vaddr %ld (%lx)"),
 	     input_bfd, input_section, howto->name,
@@ -519,11 +520,10 @@ coff_mcore_relocate_section (bfd * outpu
 	  break;
 
 	case bfd_reloc_overflow:
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, (h ? &h->root : NULL), my_name, howto->name,
-		  (bfd_vma) 0, input_bfd,
-		  input_section, rel->r_vaddr - input_section->vma)))
-	    return FALSE;
+	  (*info->callbacks->reloc_overflow)
+	    (info, (h ? &h->root : NULL), my_name, howto->name,
+	     (bfd_vma) 0, input_bfd,
+	     input_section, rel->r_vaddr - input_section->vma);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-mips.c ./bfd/coff-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MIPS Extended-Coff files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
 
@@ -940,11 +940,10 @@ mips_relocate_section (bfd *output_bfd,
 	{
 	  if (gp_undefined)
 	    {
-	      if (! ((*info->callbacks->reloc_dangerous)
-		     (info, _("GP relative relocation used when GP not defined"),
-		      input_bfd, input_section,
-		      int_rel.r_vaddr - input_section->vma)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info, _("GP relative relocation used when GP not defined"),
+		 input_bfd, input_section,
+		 int_rel.r_vaddr - input_section->vma);
 	      /* Only give the error once per link.  */
 	      gp = 4;
 	      _bfd_set_gp_value (output_bfd, gp);
@@ -960,7 +959,7 @@ mips_relocate_section (bfd *output_bfd,
 		 and the GP value of OUTPUT_BFD (which is in GP).  */
 	      addend = ecoff_data (input_bfd)->gp - gp;
 	    }
-	  else if (! info->relocatable
+	  else if (! bfd_link_relocatable (info)
 		   || h->root.type == bfd_link_hash_defined
 		   || h->root.type == bfd_link_hash_defweak)
 	    {
@@ -986,7 +985,7 @@ mips_relocate_section (bfd *output_bfd,
 	    }
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* We are generating relocatable output, and must convert
 	     the existing reloc.  */
@@ -1075,11 +1074,9 @@ mips_relocate_section (bfd *output_bfd,
 		  if (int_rel.r_symndx == -1)
 		    {
 		      /* This symbol is not being written out.  */
-		      if (! ((*info->callbacks->unattached_reloc)
-			     (info, h->root.root.string, input_bfd,
-			      input_section,
-			      int_rel.r_vaddr - input_section->vma)))
-			return FALSE;
+		      (*info->callbacks->unattached_reloc)
+			(info, h->root.root.string, input_bfd, input_section,
+			 int_rel.r_vaddr - input_section->vma);
 		      int_rel.r_symndx = 0;
 		    }
 		  relocation = 0;
@@ -1151,11 +1148,9 @@ mips_relocate_section (bfd *output_bfd,
 		}
 	      else
 		{
-		  if (! ((*info->callbacks->undefined_symbol)
-			 (info, h->root.root.string, input_bfd,
-			  input_section,
-			  int_rel.r_vaddr - input_section->vma, TRUE)))
-		    return FALSE;
+		  (*info->callbacks->undefined_symbol)
+		    (info, h->root.root.string, input_bfd, input_section,
+		     int_rel.r_vaddr - input_section->vma, TRUE);
 		  relocation = 0;
 		}
 	    }
@@ -1223,11 +1218,10 @@ mips_relocate_section (bfd *output_bfd,
 		  name = NULL;
 		else
 		  name = bfd_section_name (input_bfd, s);
-		if (! ((*info->callbacks->reloc_overflow)
-		       (info, (h ? &h->root : NULL), name, howto->name,
-			(bfd_vma) 0, input_bfd, input_section,
-			int_rel.r_vaddr - input_section->vma)))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section,
+		   int_rel.r_vaddr - input_section->vma);
 	      }
 	      break;
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-ppc.c ./bfd/coff-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PowerPC Microsoft Portable Executable files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Original version pieced together by Kim Knuttila (krk@cygnus.com)
 
@@ -79,9 +79,10 @@ extern void dump_toc (void *);
 #define HASH_CHECK_DCL char eye_catcher[8];
 #define HASH_CHECK_INIT(ret)      strcpy(ret->eye_catcher, EYE)
 #define HASH_CHECK(addr) \
- if (strcmp(addr->eye_catcher, EYE) != 0) \
+ if (strcmp (addr->eye_catcher, EYE) != 0) \
   { \
     fprintf (stderr,\
+    /* xgettext: c-format */ \
     _("File %s, line %d, Hash check failure, bad eye %8s\n"), \
     __FILE__, __LINE__, addr->eye_catcher); \
     abort (); \
@@ -844,7 +845,7 @@ ppc_record_toc_entry (bfd *abfd,
 	  /* The size must fit in a 16-bit displacement.  */
 	  if (global_toc_size > 65535)
 	    {
-	      (*_bfd_error_handler) (_("TOC overflow"));
+	      _bfd_error_handler (_("TOC overflow"));
 	      bfd_set_error (bfd_error_file_too_big);
 	      return FALSE;
 	    }
@@ -862,7 +863,7 @@ ppc_record_toc_entry (bfd *abfd,
 	  /* The size must fit in a 16-bit displacement.  */
 	  if (global_toc_size >= 65535)
 	    {
-	      (*_bfd_error_handler) (_("TOC overflow"));
+	      _bfd_error_handler (_("TOC overflow"));
 	      bfd_set_error (bfd_error_file_too_big);
 	      return FALSE;
 	    }
@@ -947,7 +948,7 @@ coff_ppc_relocate_section (bfd *output_b
   /* If we are performing a relocatable link, we don't need to do a
      thing.  The caller will take care of adjusting the reloc
      addresses and symbol indices.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   rel = relocs;
@@ -1026,12 +1027,9 @@ coff_ppc_relocate_section (bfd *output_b
 		     + sec->output_offset);
 	    }
 	  else
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       rstat = bfd_reloc_ok;
@@ -1040,7 +1038,8 @@ coff_ppc_relocate_section (bfd *output_b
       switch (r_type)
 	{
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("%B: unsupported relocation type 0x%02x"), input_bfd, r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
@@ -1130,8 +1129,10 @@ coff_ppc_relocate_section (bfd *output_b
 		    /* The size must still fit in a 16-bit displacement.  */
 		    if ((bfd_vma) our_toc_offset >= 65535)
 		      {
-			(*_bfd_error_handler)
-			  (_("%B: Relocation for %s of %lx exceeds Toc size limit"),
+			_bfd_error_handler
+			  /* xgettext: c-format */
+			  (_("%B: Relocation for %s of %lx exceeds "
+			     "Toc size limit"),
 			   input_bfd, name,
 			   (unsigned long) our_toc_offset);
 			bfd_set_error (bfd_error_bad_value);
@@ -1183,7 +1184,8 @@ coff_ppc_relocate_section (bfd *output_b
 	    if ((r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN
 		&& (bfd_vma) our_toc_offset > toc_section->size)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext: c-format */
 		  (_("%B: Relocation exceeds allocated TOC (%lx)"),
 		   input_bfd, (unsigned long) toc_section->size);
 		bfd_set_error (bfd_error_bad_value);
@@ -1237,7 +1239,8 @@ coff_ppc_relocate_section (bfd *output_b
 	    else
 	      my_name = h->root.root.root.string;
 
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext: c-format */
 	      (_("Warning: unsupported reloc %s <file %B, section %A>\n"
 		 "sym %ld (%s), r_vaddr %ld (%lx)"),
 	       input_bfd, input_section, howto->name,
@@ -1255,7 +1258,8 @@ coff_ppc_relocate_section (bfd *output_b
 	      break;
 	    my_name = h->root.root.root.string;
 
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext: c-format */
 	      (_("%B: Out of order IMGLUE reloc for %s"), input_bfd, my_name);
 	    bfd_set_error (bfd_error_bad_value);
 	    return FALSE;
@@ -1423,11 +1427,10 @@ coff_ppc_relocate_section (bfd *output_b
 		name = buf;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root.root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd,
-		    input_section, rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root.root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
@@ -1487,6 +1490,7 @@ dump_toc (void * vfile)
 	  else
 	    {
 	      fprintf (file,
+		       /* xgettext: c-format */
 		      _("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"),
 		       global_toc_size, (unsigned long) global_toc_size,
 		       thunk_size, (unsigned long) thunk_size);
@@ -1763,9 +1767,10 @@ ppc_coff_rtype2howto (arelent *relent, s
 	howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
       break;
     default:
-      (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"),
-			     ppc_coff_howto_table[r_type].name,
-			     r_type);
+      _bfd_error_handler
+	/* xgettext: c-format */
+	(_("warning: unsupported reloc %s [%d] used -- it may not work"),
+	 ppc_coff_howto_table[r_type].name, r_type);
       howto = ppc_coff_howto_table + r_type;
       break;
     }
@@ -1834,9 +1839,10 @@ coff_ppc_rtype_to_howto (bfd *abfd ATTRI
       howto = ppc_coff_howto_table + r_type;
       break;
     default:
-      (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"),
-			     ppc_coff_howto_table[r_type].name,
-			     r_type);
+      _bfd_error_handler
+	/* xgettext: c-format */
+	(_("warning: unsupported reloc %s [%d] used -- it may not work"),
+	 ppc_coff_howto_table[r_type].name, r_type);
       howto = ppc_coff_howto_table + r_type;
       break;
     }
@@ -2043,7 +2049,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
 		  || info->strip == strip_some)
 		o->lineno_count += sec->lineno_count;
 
-	      if (info->relocatable)
+	      if (bfd_link_relocatable (info))
 		o->reloc_count += sec->reloc_count;
 
 	      if (sec->rawsize > max_contents_size)
@@ -2055,7 +2061,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
 	      if (sec->reloc_count > max_reloc_count)
 		max_reloc_count = sec->reloc_count;
 	    }
-	  else if (info->relocatable
+	  else if (bfd_link_relocatable (info)
 		   && (p->type == bfd_section_reloc_link_order
 		       || p->type == bfd_symbol_reloc_link_order))
 	    ++o->reloc_count;
@@ -2072,7 +2078,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
 
   /* If doing a relocatable link, allocate space for the pointers we
      need to keep.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       unsigned int i;
 
@@ -2123,7 +2129,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
 	     memory until the end of the link.  This wastes memory,
 	     but only when doing a relocatable link, which is not the
 	     common case.  */
-	  BFD_ASSERT (info->relocatable);
+	  BFD_ASSERT (bfd_link_relocatable (info));
 	  amt = o->reloc_count;
 	  amt *= sizeof (struct internal_reloc);
 	  flaginfo.section_info[o->target_index].relocs =
@@ -2175,7 +2181,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
   flaginfo.linenos = (bfd_byte *) bfd_malloc (amt);
   flaginfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
   flaginfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     {
       amt = max_reloc_count * sizeof (struct internal_reloc);
       flaginfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
@@ -2187,7 +2193,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
       || (flaginfo.linenos == NULL && max_lineno_count > 0)
       || (flaginfo.contents == NULL && max_contents_size > 0)
       || (flaginfo.external_relocs == NULL && max_reloc_count > 0)
-      || (! info->relocatable
+      || (! bfd_link_relocatable (info)
 	  && flaginfo.internal_relocs == NULL
 	  && max_reloc_count > 0))
     goto error_return;
@@ -2321,7 +2327,7 @@ ppc_bfd_coff_final_link (bfd *abfd, stru
       flaginfo.outsyms = NULL;
     }
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* Now that we have written out all the global symbols, we know
 	 the symbol indices to use for relocs against them, and we can
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-rs6000.c ./bfd/coff-rs6000.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-rs6000.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-rs6000.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for IBM RS/6000 "XCOFF" files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
    Contributed by IBM Corporation and Cygnus Support.
@@ -402,34 +402,6 @@ _bfd_xcoff_is_local_label_name (bfd *abf
 {
   return FALSE;
 }
-
-static const struct dwarf_debug_section xcoff_debug_sections[] =
-{
-  { ".dwabrev",		NULL },
-  { ".dwarnge",		NULL },
-  { NULL,	NULL }, /* .debug_frame */
-  { ".dwinfo",		NULL },
-  { ".dwline",		NULL },
-  { NULL,	NULL }, /* .debug_loc */
-  { NULL,	NULL }, /* .debug_macinfo */
-  { NULL,	NULL }, /* .debug_macro */
-  { ".dwpbnms",		NULL },
-  { ".dwpbtyp",		NULL },
-  { ".dwrnges",		NULL },
-  { NULL,	NULL }, /* .debug_static_func */
-  { NULL,	NULL }, /* .debug_static_vars */
-  { ".dwstr",	NULL },
-  { NULL,	NULL }, /* .debug_types */
-  /* GNU DWARF 1 extensions */
-  { NULL,	NULL }, /* .debug_sfnames */
-  { NULL,	NULL }, /* .debug_srcinfo */
-  /* SGI/MIPS DWARF 2 extensions */
-  { NULL,	NULL }, /* .debug_funcnames */
-  { NULL,	NULL }, /* .debug_typenames */
-  { NULL,	NULL }, /* .debug_varnames */
-  { NULL,	NULL }, /* .debug_weaknames */
-  { NULL,	NULL },
-};
 
 void
 _bfd_xcoff_swap_sym_in (bfd *abfd, void * ext1, void * in1)
@@ -448,7 +420,7 @@ _bfd_xcoff_swap_sym_in (bfd *abfd, void 
     }
 
   in->n_value = H_GET_32 (abfd, ext->e_value);
-  in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
   in->n_type = H_GET_16 (abfd, ext->e_type);
   in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
   in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
@@ -2556,7 +2528,7 @@ _bfd_xcoff_sizeof_headers (bfd *abfd,
       };
       struct nbr_reloc_lineno *n_rl;
       bfd *sub;
-      int max_index;
+      unsigned int max_index;
       asection *s;
 
       /* Although the number of sections is known, the maximum value of
@@ -2764,7 +2736,8 @@ xcoff_reloc_type_fail (bfd *input_bfd,
                        bfd_vma *relocation ATTRIBUTE_UNUSED,
                        bfd_byte *contents ATTRIBUTE_UNUSED)
 {
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext: c-format */
     (_("%s: unsupported relocation type 0x%02x"),
      bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
   bfd_set_error (bfd_error_bad_value);
@@ -2849,7 +2822,8 @@ xcoff_reloc_type_toc (bfd *input_bfd,
     {
       if (h->toc_section == NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
 	     bfd_get_filename (input_bfd), rel->r_vaddr,
 	     h->root.root.string);
@@ -3395,15 +3369,12 @@ xcoff_ppc_relocate_section (bfd *output_
 	    {
 	      if (info->unresolved_syms_in_objects != RM_IGNORE
 		  && (h->flags & XCOFF_WAS_UNDEFINED) != 0)
-		{
-		  if (! ((*info->callbacks->undefined_symbol)
-			 (info, h->root.root.string,
-			  input_bfd, input_section,
-			  rel->r_vaddr - input_section->vma,
-			  (info->unresolved_syms_in_objects
-			   == RM_GENERATE_ERROR))))
-		    return FALSE;
-		}
+		(*info->callbacks->undefined_symbol)
+		  (info, h->root.root.string,
+		   input_bfd, input_section,
+		   rel->r_vaddr - input_section->vma,
+		   info->unresolved_syms_in_objects == RM_GENERATE_ERROR);
+
 	      if (h->root.type == bfd_link_hash_defined
 		  || h->root.type == bfd_link_hash_defweak)
 		{
@@ -3421,7 +3392,7 @@ xcoff_ppc_relocate_section (bfd *output_
 		}
 	      else
 		{
-		  BFD_ASSERT (info->relocatable
+		  BFD_ASSERT (bfd_link_relocatable (info)
 			      || (info->static_link
 				  && (h->flags & XCOFF_WAS_UNDEFINED) != 0)
 			      || (h->flags & XCOFF_DEF_DYNAMIC) != 0
@@ -3483,11 +3454,10 @@ xcoff_ppc_relocate_section (bfd *output_
 	    }
 	  sprintf (reloc_type_name, "0x%02x", rel->r_type);
 
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, (h ? &h->root : NULL), name, reloc_type_name,
-		  (bfd_vma) 0, input_bfd, input_section,
-		  rel->r_vaddr - input_section->vma)))
-	    return FALSE;
+	  (*info->callbacks->reloc_overflow)
+	    (info, (h ? &h->root : NULL), name, reloc_type_name,
+	     (bfd_vma) 0, input_bfd, input_section,
+	     rel->r_vaddr - input_section->vma);
 	}
 
       /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE.  */
@@ -3551,7 +3521,8 @@ _bfd_xcoff_put_ldsymbol_name (bfd *abfd 
 }
 
 static bfd_boolean
-_bfd_xcoff_put_symbol_name (bfd *abfd, struct bfd_strtab_hash *strtab,
+_bfd_xcoff_put_symbol_name (struct bfd_link_info *info,
+			    struct bfd_strtab_hash *strtab,
 			    struct internal_syment *sym,
 			    const char *name)
 {
@@ -3564,9 +3535,7 @@ _bfd_xcoff_put_symbol_name (bfd *abfd, s
       bfd_boolean hash;
       bfd_size_type indx;
 
-      hash = TRUE;
-      if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
-	hash = FALSE;
+      hash = !info->traditional_format;
       indx = _bfd_stringtab_add (strtab, name, hash, FALSE);
       if (indx == (bfd_size_type) -1)
 	return FALSE;
@@ -3591,7 +3560,7 @@ xcoff_create_csect_from_smclas (bfd *abf
       ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0", /* 8 - 15 */
       ".td", NULL, ".sv3264", NULL, ".tl", ".ul", ".te"
     };
-  
+
   if ((aux->x_csect.x_smclas < ARRAY_SIZE (names))
       && (NULL != names[aux->x_csect.x_smclas]))
     {
@@ -3600,7 +3569,8 @@ xcoff_create_csect_from_smclas (bfd *abf
     }
   else
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("%B: symbol `%s' has unrecognized smclas %d"),
 	 abfd, symbol_name, aux->x_csect.x_smclas);
       bfd_set_error (bfd_error_bad_value);
@@ -4043,6 +4013,7 @@ const struct xcoff_dwsect_name xcoff_dws
 #define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
 #define _bfd_xcoff_section_already_linked _bfd_generic_section_already_linked
 #define _bfd_xcoff_bfd_define_common_symbol _bfd_xcoff_define_common_symbol
+#define _bfd_xcoff_bfd_link_check_relocs    _bfd_generic_link_check_relocs
 
 /* For dynamic symbols and relocs entry points.  */
 #define _bfd_xcoff_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-sh.c ./bfd/coff-sh.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-sh.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-sh.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Renesas Super-H COFF binaries.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
    Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
@@ -501,7 +501,7 @@ sh_coff_reloc_type_lookup (bfd * abfd AT
     if (sh_reloc_map[i].bfd_reloc_val == code)
       return &sh_coff_howtos[(int) sh_reloc_map[i].shcoff_reloc_val];
 
-  (*_bfd_error_handler) (_("SH Error: unknown reloc type %d"), code);
+  _bfd_error_handler (_("SH Error: unknown reloc type %d"), code);
   return NULL;
 }
 
@@ -713,7 +713,7 @@ sh_relax_section (bfd *abfd,
 
   *again = FALSE;
 
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0)
     return TRUE;
@@ -771,8 +771,9 @@ sh_relax_section (bfd *abfd,
       laddr += ((irel->r_offset & 0xffffffff) ^ 0x80000000) - 0x80000000;
       if (laddr >= sec->size)
 	{
-	  (*_bfd_error_handler) ("%B: 0x%lx: warning: bad R_SH_USES offset",
-				 abfd, (unsigned long) irel->r_vaddr);
+	  /* xgettext: c-format */
+	  _bfd_error_handler (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
+			      abfd, (unsigned long) irel->r_vaddr);
 	  continue;
 	}
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -780,9 +781,10 @@ sh_relax_section (bfd *abfd,
       /* If the instruction is not mov.l NN,rN, we don't know what to do.  */
       if ((insn & 0xf000) != 0xd000)
 	{
-	  ((*_bfd_error_handler)
-	   ("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
-	    abfd, (unsigned long) irel->r_vaddr, insn));
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
+	     abfd, (unsigned long) irel->r_vaddr, insn);
 	  continue;
 	}
 
@@ -797,9 +799,10 @@ sh_relax_section (bfd *abfd,
       paddr += (laddr + 4) &~ (bfd_vma) 3;
       if (paddr >= sec->size)
 	{
-	  ((*_bfd_error_handler)
-	   ("%B: 0x%lx: warning: bad R_SH_USES load offset",
-	    abfd, (unsigned long) irel->r_vaddr));
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
+	     abfd, (unsigned long) irel->r_vaddr);
 	  continue;
 	}
 
@@ -821,9 +824,10 @@ sh_relax_section (bfd *abfd,
 	  break;
       if (irelfn >= irelend)
 	{
-	  ((*_bfd_error_handler)
-	   ("%B: 0x%lx: warning: could not find expected reloc",
-	    abfd, (unsigned long) paddr));
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: 0x%lx: warning: could not find expected reloc"),
+	     abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -837,9 +841,10 @@ sh_relax_section (bfd *abfd,
 			    &sym);
       if (sym.n_scnum != 0 && sym.n_scnum != sec->target_index)
 	{
-	  ((*_bfd_error_handler)
-	   ("%B: 0x%lx: warning: symbol in unexpected section",
-	    abfd, (unsigned long) paddr));
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: 0x%lx: warning: symbol in unexpected section"),
+	     abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -962,9 +967,10 @@ sh_relax_section (bfd *abfd,
       /* Now check whether we got a COUNT reloc.  */
       if (irelcount >= irelend)
 	{
-	  ((*_bfd_error_handler)
-	   ("%B: 0x%lx: warning: could not find expected COUNT reloc",
-	    abfd, (unsigned long) paddr));
+	  _bfd_error_handler
+	    /* xgettext: c-format */
+	    (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
+	     abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -972,8 +978,9 @@ sh_relax_section (bfd *abfd,
          just deleted one.  */
       if (irelcount->r_offset == 0)
 	{
-	  ((*_bfd_error_handler) ("%B: 0x%lx: warning: bad count",
-				  abfd, (unsigned long) paddr));
+	  /* xgettext: c-format */
+	  _bfd_error_handler (_("%B: 0x%lx: warning: bad count"),
+			      abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -1342,9 +1349,10 @@ sh_relax_delete_bytes (bfd *abfd,
 
 	  if (overflow)
 	    {
-	      ((*_bfd_error_handler)
-	       ("%B: 0x%lx: fatal: reloc overflow while relaxing",
-		abfd, (unsigned long) irel->r_vaddr));
+	      _bfd_error_handler
+		/* xgettext: c-format */
+		(_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+		 abfd, (unsigned long) irel->r_vaddr);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -1437,8 +1445,8 @@ sh_relax_delete_bytes (bfd *abfd,
   if (obj_symbols (abfd) != NULL
       || obj_raw_syments (abfd) != NULL)
     {
-      ((*_bfd_error_handler)
-       ("%B: fatal: generic symbols retrieved before relaxing", abfd));
+      _bfd_error_handler
+	(_("%B: fatal: generic symbols retrieved before relaxing"), abfd);
       bfd_set_error (bfd_error_invalid_operation);
       return FALSE;
     }
@@ -2327,7 +2335,7 @@ _bfd_sh_align_load_span (bfd *abfd,
   if (dsp)
     {
       sh_opcodes[0xf].minor_opcodes = sh_dsp_opcodef;
-      sh_opcodes[0xf].count = sizeof sh_dsp_opcodef / sizeof sh_dsp_opcodef;
+      sh_opcodes[0xf].count = sizeof sh_dsp_opcodef / sizeof sh_dsp_opcodef [0];
     }
 
   /* Instructions should be aligned on 2 byte boundaries.  */
@@ -2629,9 +2637,10 @@ sh_swap_insns (bfd *      abfd,
 
 	  if (overflow)
 	    {
-	      ((*_bfd_error_handler)
-	       ("%B: 0x%lx: fatal: reloc overflow while relaxing",
-		abfd, (unsigned long) irel->r_vaddr));
+	      _bfd_error_handler
+		/* xgettext: c-format */
+		(_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+		 abfd, (unsigned long) irel->r_vaddr);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -2766,8 +2775,9 @@ sh_relocate_section (bfd *output_bfd ATT
 	  if (symndx < 0
 	      || (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
 	    {
-	      (*_bfd_error_handler)
-		("%B: illegal symbol index %ld in relocs",
+	      _bfd_error_handler
+		/* xgettext: c-format */
+		(_("%B: illegal symbol index %ld in relocs"),
 		 input_bfd, symndx);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
@@ -2836,13 +2846,10 @@ sh_relocate_section (bfd *output_bfd ATT
 		     + sec->output_section->vma
 		     + sec->output_offset);
 	    }
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -2875,11 +2882,10 @@ sh_relocate_section (bfd *output_bfd ATT
 		name = buf;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-sparc.c ./bfd/coff-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Sparc COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-stgo32.c ./bfd/coff-stgo32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-stgo32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-stgo32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub).
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Written by Robert Hoehne.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-svm68k.c ./bfd/coff-svm68k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-svm68k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-svm68k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola sysv68
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Written by Philippe De Muyter <phdm@info.ucl.ac.be>.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffswap.h ./bfd/coffswap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coffswap.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coffswap.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic COFF swapping routines, for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -322,7 +322,7 @@ coff_swap_sym_in (bfd * abfd, void * ext
     }
 
   in->n_value = H_GET_32 (abfd, ext->e_value);
-  in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
   if (sizeof (ext->e_type) == 2)
     in->n_type = H_GET_16 (abfd, ext->e_type);
   else
@@ -806,7 +806,8 @@ coff_swap_scnhdr_out (bfd * abfd, void *
 
       memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
       buf[sizeof (scnhdr_int->s_name)] = '\0';
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
 	 bfd_get_filename (abfd),
 	 buf, scnhdr_int->s_nlnno);
@@ -821,9 +822,10 @@ coff_swap_scnhdr_out (bfd * abfd, void *
 
       memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
       buf[sizeof (scnhdr_int->s_name)] = '\0';
-      (*_bfd_error_handler) (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
-			     bfd_get_filename (abfd),
-			     buf, scnhdr_int->s_nreloc);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
+			  bfd_get_filename (abfd),
+			  buf, scnhdr_int->s_nreloc);
       bfd_set_error (bfd_error_file_truncated);
       PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
       ret = 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic30.c ./bfd/coff-tic30.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic30.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-tic30.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C30 coff binaries.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic4x.c ./bfd/coff-tic4x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic4x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-tic4x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C4X coff binaries.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -180,8 +180,8 @@ tic4x_lookup_howto (arelent *internal,
 	}
     }
 
-  (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
-			 (unsigned int) dst->r_type);
+  _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
+		      (unsigned int) dst->r_type);
   abort();
 }
 
@@ -222,7 +222,8 @@ tic4x_reloc_processing (arelent *relent,
     {
       if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
         {
-          (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
             (_("%s: warning: illegal symbol index %ld in relocs"),
              bfd_get_filename (abfd), reloc->r_symndx);
           relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic54x.c ./bfd/coff-tic54x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic54x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-tic54x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C54X coff binaries.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Timothy Wall (twall@cygnus.com)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -275,8 +275,8 @@ tic54x_lookup_howto (arelent *internal,
 	}
     }
 
-  (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
-			 (unsigned int) dst->r_type);
+  _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
+		      (unsigned int) dst->r_type);
   abort ();
 }
 
@@ -360,7 +360,8 @@ tic54x_reloc_processing (arelent *relent
     {
       if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
         {
-          (*_bfd_error_handler)
+          _bfd_error_handler
+	    /* xgettext: c-format */
             (_("%B: warning: illegal symbol index %ld in relocs"),
              abfd, reloc->r_symndx);
           relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic80.c ./bfd/coff-tic80.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-tic80.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-tic80.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish (fnf@cygnus.com)
 
@@ -436,8 +436,8 @@ rtype2howto (arelent *cache_ptr, struct 
 	}
     }
 
-  (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
-			 (unsigned int) dst->r_type);
+  _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
+		      (unsigned int) dst->r_type);
   cache_ptr->howto = tic80_howto_table + 0;
 }
 
@@ -562,13 +562,10 @@ coff_tic80_relocate_section (bfd *output
 		     + sec->output_offset);
 	      }
 
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       addr = rel->r_vaddr - input_section->vma;
@@ -668,7 +665,8 @@ coff_tic80_relocate_section (bfd *output
 	case bfd_reloc_ok:
 	  break;
 	case bfd_reloc_outofrange:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("%B: bad reloc address 0x%lx in section `%A'"),
 	     input_bfd, input_section, (unsigned long) rel->r_vaddr);
 	  return FALSE;
@@ -688,11 +686,10 @@ coff_tic80_relocate_section (bfd *output
 		  return FALSE;
 	      }
 
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_vaddr - input_section->vma)))
-	      return FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma);
 	  }
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-u68k.c ./bfd/coff-u68k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-u68k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-u68k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola 68000 COFF binaries having underscore with name.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-w65.c ./bfd/coff-w65.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-w65.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-w65.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for WDC 65816 COFF binaries.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -315,14 +315,11 @@ w65_reloc16_extra_cases (bfd *abfd,
 
 	gap -= dot + 1;
 	if (gap < -128 || gap > 127)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (abfd, gap, data + dst_address);
 	dst_address += 1;
 	src_address += 1;
@@ -340,14 +337,10 @@ w65_reloc16_extra_cases (bfd *abfd,
 	/* This wraps within the page, so ignore the relativeness, look at the
 	   high part.  */
 	if ((gap & 0xf0000) != (dot & 0xf0000))
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
 
 	gap -= dot + 2;
 	bfd_put_16 (abfd, gap, data + dst_address);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-we32k.c ./bfd/coff-we32k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-we32k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-we32k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for we32k COFF files.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Contributed by Brendan Kehoe (brendan@cs.widener.edu).
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-x86_64.c ./bfd/coff-x86_64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-x86_64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-x86_64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for AMD 64 COFF files.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -138,59 +138,61 @@ coff_amd64_reloc (bfd *abfd,
 #define DOIT(x) \
   x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
 
-    if (diff != 0)
-      {
-	reloc_howto_type *howto = reloc_entry->howto;
-	unsigned char *addr = (unsigned char *) data + reloc_entry->address;
-
-	/* FIXME: We do not have an end address for data, so we cannot
-	   accurately range check any addresses computed against it.
-	   cf: PR binutils/17512: file: 1085-1761-0.004.
-	   For now we do the best that we can.  */
-	if (addr < (unsigned char *) data || addr > ((unsigned char *) data) + input_section->size)
+  if (diff != 0)
+    {
+      reloc_howto_type *howto = reloc_entry->howto;
+      unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+
+      /* FIXME: We do not have an end address for data, so we cannot
+	 accurately range check any addresses computed against it.
+	 cf: PR binutils/17512: file: 1085-1761-0.004.
+	 For now we do the best that we can.  */
+      if (addr < (unsigned char *) data
+	  || addr > ((unsigned char *) data) + input_section->size)
+	{
+	  bfd_set_error (bfd_error_bad_value);
+	  return bfd_reloc_notsupported;
+	}
+
+      switch (howto->size)
+	{
+	case 0:
+	  {
+	    char x = bfd_get_8 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_8 (abfd, x, addr);
+	  }
+	  break;
+
+	case 1:
 	  {
-	    bfd_set_error (bfd_error_bad_value);
-	    return bfd_reloc_notsupported;
+	    short x = bfd_get_16 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_16 (abfd, (bfd_vma) x, addr);
 	  }
+	  break;
 
-	switch (howto->size)
+	case 2:
 	  {
-	  case 0:
-	    {
-	      char x = bfd_get_8 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_8 (abfd, x, addr);
-	    }
-	    break;
-
-	  case 1:
-	    {
-	      short x = bfd_get_16 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_16 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
-
-	  case 2:
-	    {
-	      long x = bfd_get_32 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_32 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
-	  case 4:
-	    {
-	      long long x = bfd_get_64 (abfd, addr);
-	      DOIT (x);
-	      bfd_put_64 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
-
-	  default:
-	    bfd_set_error (bfd_error_bad_value);
-	    return bfd_reloc_notsupported;
+	    long x = bfd_get_32 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_32 (abfd, (bfd_vma) x, addr);
 	  }
-      }
+	  break;
+
+	case 4:
+	  {
+	    long long x = bfd_get_64 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_64 (abfd, (bfd_vma) x, addr);
+	  }
+	  break;
+
+	default:
+	  bfd_set_error (bfd_error_bad_value);
+	  return bfd_reloc_notsupported;
+	}
+    }
 
   /* Now let bfd_perform_relocation finish everything up.  */
   return bfd_reloc_continue;
@@ -538,7 +540,7 @@ coff_pe_amd64_relocate_section (bfd *out
 				struct internal_syment *syms,
 				asection **sections)
 {
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,input_section, contents,relocs, syms, sections);
@@ -612,7 +614,12 @@ coff_amd64_rtype_to_howto (bfd *abfd ATT
 #if defined(COFF_WITH_PE)
   if (howto->pc_relative)
     {
-      *addendp -= 4;
+#ifndef DONT_EXTEND_AMD64
+      if (rel->r_type == R_AMD64_PCRQUAD)
+	*addendp -= 8;
+      else
+#endif
+	*addendp -= 4;
 
       /* If the symbol is defined, then the generic code is going to
          add back the symbol value in order to cancel out an
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-z80.c ./bfd/coff-z80.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-z80.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-z80.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Zilog Z80 COFF binaries.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -188,14 +188,11 @@ extra_case (bfd *in_abfd,
 	val = bfd_coff_reloc16_get_value (reloc, link_info,
 					   input_section);
 	if (val>127 || val<-128) /* Test for overflow.  */
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (in_abfd, val, data + *dst_ptr);
 	(*dst_ptr) += 1;
 	(*src_ptr) += 1;
@@ -247,14 +244,11 @@ extra_case (bfd *in_abfd,
 				     the offset.  */
 
 	if (gap >= 128 || gap < -128)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (in_abfd, gap, data + *dst_ptr);
 	(*dst_ptr)++;
 	(*src_ptr)++;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-z8k.c ./bfd/coff-z8k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/coff-z8k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/coff-z8k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Zilog Z800n COFF binaries.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
@@ -263,15 +263,12 @@ extra_case (bfd *in_abfd,
 	if (gap & 1)
 	  abort ();
 	gap /= 2;
-	if (gap > 128 || gap < -128)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	if (gap > 127 || gap < -128)
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (in_abfd, gap, data + *dst_ptr);
 	(*dst_ptr)++;
 	(*src_ptr)++;
@@ -293,14 +290,11 @@ extra_case (bfd *in_abfd,
 	gap /= 2;
 
 	if (gap > 0 || gap < -127)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_8 (in_abfd,
                    (bfd_get_8 ( in_abfd, data + *dst_ptr) & 0x80) + (-gap & 0x7f),
                    data + *dst_ptr);
@@ -321,14 +315,11 @@ extra_case (bfd *in_abfd,
 	if (gap & 1)
 	  abort ();
 	if (gap > 4096 || gap < -4095)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	gap /= 2;
 	bfd_put_16 (in_abfd,
                     (bfd_get_16 ( in_abfd, data + *dst_ptr) & 0xf000) | (-gap & 0x0fff),
@@ -348,14 +339,11 @@ extra_case (bfd *in_abfd,
 	int gap = dst - dot - 2;
 
 	if (gap > 32767 || gap < -32768)
-	  {
-	    if (! ((*link_info->callbacks->reloc_overflow)
-		   (link_info, NULL,
-		    bfd_asymbol_name (*reloc->sym_ptr_ptr),
-		    reloc->howto->name, reloc->addend, input_section->owner,
-		    input_section, reloc->address)))
-	      abort ();
-	  }
+	  (*link_info->callbacks->reloc_overflow)
+	    (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+	     reloc->howto->name, reloc->addend, input_section->owner,
+	     input_section, reloc->address);
+
 	bfd_put_16 (in_abfd, (bfd_vma) gap, data + *dst_ptr);
 	(*dst_ptr) += 2;
 	(*src_ptr) += 2;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/compress.c ./bfd/compress.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/compress.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/compress.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Compressed section support (intended for debug sections).
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -247,7 +247,15 @@ bfd_get_full_section_contents (bfd *abfd
 	{
 	  p = (bfd_byte *) bfd_malloc (sz);
 	  if (p == NULL)
+	    {
+	      /* PR 20801: Provide a more helpful error message.  */
+	      if (bfd_get_error () == bfd_error_no_memory)
+		_bfd_error_handler
+		  /* xgettext:c-format */
+		  (_("error: %B(%A) is too large (%#lx bytes)"),
+		  abfd, sec, (long) sz);
 	    return FALSE;
+	    }
 	}
 
       if (!bfd_get_section_contents (abfd, sec, p, 0, sz))
@@ -292,7 +300,7 @@ bfd_get_full_section_contents (bfd *abfd
 	   SHF_COMPRESSED section.  */
 	compression_header_size = 12;
       if (!decompress_contents (compressed_buffer + compression_header_size,
-				sec->compressed_size, p, sz))
+				sec->compressed_size - compression_header_size, p, sz))
 	{
 	  bfd_set_error (bfd_error_bad_value);
 	  if (p != *ptr)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/config.bfd ./bfd/config.bfd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/config.bfd	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/config.bfd	2017-03-06 01:49:05.000000000 +0000
@@ -1,17 +1,17 @@
 # config.bfd
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
@@ -53,6 +53,74 @@ case $targ in
     echo "*** Use or1k-*-elf or or1k-*-linux as the target instead" >&2
     exit 1
     ;;
+ i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu | \
+ mips*-*-irix5* | mips*-*-irix6*)
+    # Not obsolete
+    ;;
+ *-*-netware* | \
+ arm-epoc-pe* | \
+ arm*-*-aout | \
+ arm*-*-coff | \
+ h8300*-*-coff | \
+ h8500*-*-coff | \
+ i[3-7]86-*-sco3.2v5*coff | \
+ i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
+ i[3-7]86-*-sco3.2v5* | \
+ i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | \
+ i[3-7]86-*-chorus* | \
+ i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
+ i[3-7]86-*-aix* | \
+ i[3-7]86-sequent-bsd* | \
+ i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
+ i[3-7]86-*-freebsd[12] | \
+ i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
+ i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3] | \
+ i[3-7]86-*-netware* | \
+ i[3-7]86-*-linux*aout* | \
+ i[3-7]86-*-mach* | i[3-7]86-*-osf1mk* | \
+ i[3-7]86-*-os9k | \
+ i[3-7]86-none-* | \
+ i[3-7]86-*-aout* | i[3-7]86*-*-vsta* | \
+ i860-*-* | \
+ i960-*-* | \
+ m68*-motorola-sysv* | m68*-hp-bsd* | m68*-*-aout* | \
+ m68*-*-coff* | m68*-*-sysv* | \
+ m68*-*-hpux* | \
+ m68*-*-linux*aout* | \
+ m68*-hp*-netbsd* | \
+ m68*-*-netbsdaout* | \
+ m68*-*-sunos* | m68*-*-os68k* | m68*-*-vxworks* | m68*-netx-* | \
+ m68*-*-bsd* | m68*-*-vsta* | \
+ m68*-ericsson-* | \
+ m68*-*-psos* | \
+ m88*-*-* | \
+ mips*-big-* | \
+ mips*-dec-* | mips*el-*-ecoff* | \
+ mips*-*-ecoff* | \
+ mips*-sgi-* | mips*-*-bsd* | \
+ mips*-*-lnews* | \
+ mips*-*-sysv* | mips*-*-riscos* | \
+ ns32k-*-* | \
+ sh*-*-symbianelf* | \
+ sparclet-*-aout* | \
+ sparc86x-*-aout* | \
+ sparc*-*-chorus* | \
+ sparc-*-linux*aout* | \
+ sparc-*-netbsdaout* | \
+ sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
+ sparc-*-netware* | \
+ sparc64-*-aout* | \
+ sparc*-*-coff* | \
+ tahoe-*-* | \
+ vax-*-bsd* | vax-*-ultrix* | \
+ we32k-*-* | \
+ w65-*-* | \
+ *-*-ieee* | \
+ *-adobe-* | \
+ *-sony-* | \
+ *-tandem-* | \
+ i370-* | \
+ sh5*-*-* | sh64*-*-* | \
  null)
     if test "x$enable_obsolete" != xyes; then
       echo "*** Configuration $targ is obsolete." >&2
@@ -65,20 +133,18 @@ esac
 
 case $targ in
  *-go32-rtems* | \
+ *-*-rtemsaout* | \
+ *-*-rtemscoff* | \
  a29k-* | \
  arm-*-oabi | \
  hppa*-*-rtems* | \
  i960-*-rtems* | \
- i[3-7]86*-*-rtemscoff* | \
  m68*-*-lynxos* | \
- m68*-*-rtemscoff* | \
  m68*-apollo-* | \
  m68*-apple-aux* | \
  m68*-bull-sysv* | \
  maxq-*-coff | \
  mips*el-*-rtems* | \
- powerpcle-*-rtems* | \
- sparc*-*-rtemsaout* | \
  sparc-*-lynxos* | \
  vax-*-vms* | \
  null)
@@ -92,7 +158,8 @@ targ_cpu=`echo $targ | sed 's/^\([^-]*\)
 case "${targ_cpu}" in
 aarch64*)	 targ_archs="bfd_aarch64_arch bfd_arm_arch";;
 alpha*)		 targ_archs=bfd_alpha_arch ;;
-am34*|am33_2.0*) targ_archs=bfd_mn10300_arch ;;
+am33_2.0*)	 targ_archs=bfd_mn10300_arch ;;
+arc*)		 targ_archs=bfd_arc_arch ;;
 arm*)		 targ_archs=bfd_arm_arch ;;
 bfin*)		 targ_archs=bfd_bfin_arch ;;
 c30*)		 targ_archs=bfd_tic30_arch ;;
@@ -119,6 +186,8 @@ or1k*|or1knd*)	 targ_archs=bfd_or1k_arch
 pdp11*)		 targ_archs=bfd_pdp11_arch ;;
 pj*)		 targ_archs="bfd_pj_arch bfd_i386_arch";;
 powerpc*)	 targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+pru*)		 targ_archs=bfd_pru_arch ;;
+riscv*)		 targ_archs=bfd_riscv_arch ;;
 rs6000)		 targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
 s390*)		 targ_archs=bfd_s390_arch ;;
 sh*)		 targ_archs=bfd_sh_arch ;;
@@ -168,7 +237,13 @@ case "${targ}" in
 
 # START OF targmatch.h
 #ifdef BFD64
-  aarch64-*-elf)
+  aarch64-*-darwin*)
+    targ_defvec=aarch64_mach_o_vec
+    targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
+    targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+    want64=true
+    ;;
+  aarch64-*-elf | aarch64-*-rtems*)
     targ_defvec=aarch64_elf64_le_vec
     targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
     want64=true
@@ -183,6 +258,16 @@ case "${targ}" in
     targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
     want64=true
     ;;
+  aarch64-*-fuchsia*)
+    targ_defvec=aarch64_elf64_le_vec
+    targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
+    want64=true
+    ;;
+  aarch64-*-cloudabi*)
+    targ_defvec=aarch64_elf64_le_cloudabi_vec
+    targ_selvecs=aarch64_elf64_be_cloudabi_vec
+    want64=true
+    ;;
   aarch64-*-linux*)
     targ_defvec=aarch64_elf64_le_vec
     targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
@@ -258,15 +343,29 @@ case "${targ}" in
     ;;
 #endif /* BFD64 */
 
-  am34-*-linux* | am33_2.0-*-linux*)
+  am33_2.0-*-linux*)
     targ_defvec=am33_elf32_linux_vec
     ;;
 
-  arc-*-elf*)
+  arc*eb-*-elf* | arc*eb-*-linux*)
+    targ_defvec=arc_elf32_be_vec
+    targ_selvecs=arc_elf32_le_vec
+    ;;
+
+  arc*-*-elf* | arc*-*-linux*)
     targ_defvec=arc_elf32_le_vec
     targ_selvecs=arc_elf32_be_vec
     ;;
 
+  arm-*-darwin*)
+    targ_defvec=arm_mach_o_vec
+    targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
+    targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+    ;;
+  arm-*-fuchsia*)
+    targ_defvec=arm_elf32_le_vec
+    targ_selvecs="arm_elf32_be_vec"
+    ;;
   arm-*-nacl*)
     targ_defvec=arm_elf32_nacl_le_vec
     targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
@@ -330,7 +429,7 @@ case "${targ}" in
     targ_selvecs=arm_coff_be_vec
     targ_underscore=yes
     ;;
-  arm-*-rtems*)
+  arm-*-phoenix*)
     targ_defvec=arm_elf32_le_vec
     targ_selvecs=arm_elf32_be_vec
     ;;
@@ -344,7 +443,7 @@ case "${targ}" in
     ;;
   arm-*-elf | arm*-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
   arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
-  arm*-*-eabi* )
+  arm*-*-eabi* | arm-*-rtems*)
     targ_defvec=arm_elf32_le_vec
     targ_selvecs=arm_elf32_be_vec
     ;;
@@ -378,7 +477,7 @@ case "${targ}" in
     targ_defvec=tic30_coff_vec
     ;;
 
-  c4x-*-*coff* | tic4x-*-*coff* | tic4x-*-rtems*)
+  c4x-*-*coff* | tic4x-*-*coff*)
     targ_defvec=tic4x_coff1_vec
     targ_selvecs="tic4x_coff1_beh_vec tic4x_coff2_vec tic4x_coff2_beh_vec tic4x_coff0_vec tic4x_coff0_beh_vec"
     targ_underscore=yes
@@ -456,11 +555,6 @@ case "${targ}" in
     targ_defvec=moxie_elf32_le_vec
     ;;
 
-  h8300*-*-rtemscoff*)
-    targ_defvec=h8300_coff_vec
-    targ_underscore=yes
-    ;;
-
   h8300*-*-elf | h8300*-*-rtems*)
     targ_defvec=h8300_elf32_vec
     targ_underscore=yes
@@ -523,26 +617,27 @@ case "${targ}" in
     targ_defvec=i370_elf32_vec
     targ_selvecs="i370_elf32_vec"
     ;;
+
   i[3-7]86-*-sco3.2v5*coff)
     targ_defvec=i386_coff_vec
     targ_selvecs=i386_elf32_vec
     ;;
   i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
   i[3-7]86-*-elf* | i[3-7]86-*-sco3.2v5* | \
-  i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*)
+  i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | i[3-7]86-*-rtems*)
     targ_defvec=i386_elf32_vec
     targ_selvecs="iamcu_elf32_vec i386_coff_vec"
     ;;
   i[3-7]86-*-solaris2*)
     targ_defvec=i386_elf32_sol2_vec
-    targ_selvecs="i386_coff_vec"
-    targ64_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec"
+    targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_pei_vec"
+    targ64_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec x86_64_pei_vec"
     want64=true
     ;;
 #ifdef BFD64
   x86_64-*-solaris2*)
     targ_defvec=i386_elf32_sol2_vec
-    targ_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec i386_coff_vec"
+    targ_selvecs="x86_64_elf64_sol2_vec l1om_elf64_vec k1om_elf64_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pei_vec"
     want64=true
     ;;
 #endif
@@ -575,10 +670,6 @@ case "${targ}" in
   i[3-7]86-*-aix*)
     targ_defvec=i386_coff_vec
     ;;
-  i[3-7]86-*-rtems*)
-    targ_defvec=i386_elf32_vec
-    targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_aout_vec"
-    ;;
   i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*)
     targ_defvec=i386_mach_o_vec
     targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
@@ -653,6 +744,11 @@ case "${targ}" in
     targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec"
     targ_archs="$targ_archs bfd_arm_arch"
     ;;
+  i[3-7]86-*-redox*)
+    targ_defvec=i386_elf32_vec
+    targ_selvecs=
+    targ64_selvecs=x86_64_elf64_vec
+    ;;
 #ifdef BFD64
   x86_64-*-cloudabi*)
     targ_defvec=x86_64_elf64_cloudabi_vec
@@ -669,7 +765,7 @@ case "${targ}" in
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
     want64=true
     ;;
-  x86_64-*-elf*)
+  x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia)
     targ_defvec=x86_64_elf64_vec
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec"
     want64=true
@@ -710,6 +806,11 @@ case "${targ}" in
     targ_defvec=x86_64_elf64_vec
     want64=true
     ;;
+  x86_64-*-redox*)
+    targ_defvec=x86_64_elf64_vec
+    targ_selvecs=i386_elf32_vec
+    want64=true
+    ;;
 #endif
   i[3-7]86-*-lynxos*)
     targ_defvec=i386_elf32_vec
@@ -866,14 +967,10 @@ case "${targ}" in
     targ_selvecs="core_cisco_be_vec ieee_vec"
     targ_underscore=yes
     ;;
-  m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux*)
+  m68*-*-elf* | m68*-*-sysv4* | m68*-*-rtems* | m68*-*-uclinux*)
     targ_defvec=m68k_elf32_vec
     targ_selvecs="m68k_coff_vec ieee_vec"
     ;;
-  m68*-*-rtems*)
-    targ_defvec=m68k_elf32_vec
-    targ_selvecs="m68k_coff_vec m68k_versados_vec ieee_vec aout0_be_vec"
-    ;;
   m68*-*-coff* | m68*-*-sysv*)
     targ_defvec=m68k_coff_vec
     targ_selvecs="m68k_coff_vec m68k_versados_vec ieee_vec"
@@ -1056,15 +1153,11 @@ case "${targ}" in
     targ_defvec=mips_elf32_trad_be_vec
     targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
     ;;
-  mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
+  mips*el-*-elf* | mips*-*-chorus*)
     targ_defvec=mips_elf32_le_vec
     targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
     ;;
-  mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
-    targ_defvec=mips_elf32_be_vec
-    targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
-    ;;
-  mips*-*-none)
+  mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
     targ_defvec=mips_elf32_be_vec
     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
     ;;
@@ -1334,6 +1427,25 @@ case "${targ}" in
     targ_selvecs="powerpc_pei_le_vec powerpc_pei_vec powerpc_pe_le_vec powerpc_pe_vec"
     ;;
 
+  pru-*-*)
+    targ_defvec=pru_elf32_vec
+    targ_underscore=yes
+    ;;
+
+#ifdef BFD64
+  riscv32-*-*)
+    targ_defvec=riscv_elf32_vec
+    targ_selvecs="riscv_elf32_vec"
+    want64=true
+    ;;
+
+  riscv64-*-*)
+    targ_defvec=riscv_elf64_vec
+    targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
+    want64=true
+    ;;
+#endif
+
   rl78-*-elf)
     targ_defvec=rl78_elf32_vec
     ;;
@@ -1389,6 +1501,7 @@ case "${targ}" in
   sh-*-linux*)
     targ_defvec=sh_elf32_linux_be_vec
     targ_selvecs="sh_elf32_linux_vec sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
+    targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
     want64=true
     ;;
 #endif /* BFD64 */
@@ -1396,10 +1509,12 @@ case "${targ}" in
   sh*eb-*-linux*)
     targ_defvec=sh_elf32_linux_be_vec
     targ_selvecs=sh_elf32_linux_vec
+    targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
     ;;
   sh*-*-linux*)
     targ_defvec=sh_elf32_linux_vec
     targ_selvecs=sh_elf32_linux_be_vec
+    targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
     ;;
 
   sh-*-uclinux* | sh[12]-*-uclinux*)
@@ -1464,12 +1579,6 @@ case "${targ}" in
     ;;
 #endif
 
-  sh-*-rtemscoff*)
-    targ_defvec=sh_coff_vec
-    targ_selvecs="sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
-    targ_underscore=yes
-    ;;
-
 #ifdef BFD64
   sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*)
     targ_defvec=sh_elf32_vec
@@ -1683,7 +1792,7 @@ case "${targ}" in
   visium-*-elf)
     targ_defvec=visium_elf32_vec
     ;;
- 
+
   we32k-*-*)
     targ_defvec=we32k_coff_vec
     ;;
@@ -1691,12 +1800,12 @@ case "${targ}" in
   w65-*-*)
     targ_defvec=w65_coff_vec
     ;;
-    
+
   xgate-*-*)
     targ_defvec=xgate_elf32_vec
     targ_selvecs="xgate_elf32_vec"
     ;;
- 	
+
   xstormy16-*-elf)
     targ_defvec=xstormy16_elf32_vec
     ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/config.in ./bfd/config.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/config.in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/config.in	2017-03-06 01:49:05.000000000 +0000
@@ -17,6 +17,10 @@
 /* Define to 1 if you have the <alloca.h> header file. */
 #undef HAVE_ALLOCA_H
 
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ASPRINTF
+
 /* Define to 1 if you have the declaration of `basename', and to 0 if you
    don't. */
 #undef HAVE_DECL_BASENAME
@@ -72,6 +76,10 @@
    */
 #undef HAVE_DECL_STRSTR
 
+/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_VASPRINTF
+
 /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
    don't. */
 #undef HAVE_DECL_VSNPRINTF
@@ -329,6 +337,9 @@
 /* Name of host specific header file to include in trad-core.c. */
 #undef TRAD_HEADER
 
+/* Define if 64-bit archives should always be used. */
+#undef USE_64_BIT_ARCHIVE
+
 /* Use b modifier when opening binary files? */
 #undef USE_BINARY_FOPEN
 
@@ -341,9 +352,6 @@
 /* Define if we should default to creating read-only plt entries */
 #undef USE_SECUREPLT
 
-/* Define if we may generate symbols with ELF's STT_COMMON type */
-#undef USE_STT_COMMON
-
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure ./bfd/configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/configure	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for bfd 2.25.51.
+# Generated by GNU Autoconf 2.64 for bfd 2.28.51.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='bfd'
 PACKAGE_TARNAME='bfd'
-PACKAGE_VERSION='2.25.51'
-PACKAGE_STRING='bfd 2.25.51'
+PACKAGE_VERSION='2.28.51'
+PACKAGE_STRING='bfd 2.28.51'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -602,12 +602,14 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-havevecs
-tdefaults
 bfd_ufile_ptr
 bfd_file_ptr
 lt_cv_dlopen_libs
 supports_plugins
+COREFLAG
+COREFILE
+havevecs
+tdefaults
 bfd_default_target_size
 bfd_machines
 bfd_backends
@@ -618,8 +620,6 @@ TDEFINES
 SHARED_LIBADD
 SHARED_LDFLAGS
 LIBM
-COREFLAG
-COREFILE
 zlibinc
 zlibdir
 EXEEXT_FOR_BUILD
@@ -657,7 +657,9 @@ GENINSRC_NEVER_TRUE
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 REPORT_BUGS_TEXI
 REPORT_BUGS_TO
@@ -687,6 +689,7 @@ AR
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -787,11 +790,11 @@ enable_plugins
 enable_largefile
 enable_64_bit_bfd
 enable_targets
+enable_64_bit_archive
 with_mmap
 enable_secureplt
 enable_leading_mingw64_underscores
 with_separate_debug_dir
-enable_elf_stt_common
 with_pkgversion
 with_bugurl
 enable_werror
@@ -1351,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures bfd 2.25.51 to adapt to many kinds of systems.
+\`configure' configures bfd 2.28.51 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1422,7 +1425,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bfd 2.25.51:";;
+     short | recursive ) echo "Configuration of bfd 2.28.51:";;
    esac
   cat <<\_ACEOF
 
@@ -1441,10 +1444,10 @@ Optional Features:
   --disable-largefile     omit support for large files
   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
   --enable-targets        alternative target configurations
+  --enable-64-bit-archive force 64-bit archives
   --enable-secureplt      Default to creating read-only plt entries
   --enable-leading-mingw64-underscores
                           Enable leading underscores on 64 bit mingw targets
-  --enable-elf-stt-common Allow the generation of ELF symbols with the STT_COMMON type
   --enable-werror         treat compile warnings as errors
   --enable-build-warnings enable build-time compiler warnings
   --enable-maintainer-mode  enable make rules and dependencies not useful
@@ -1543,7 +1546,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bfd configure 2.25.51
+bfd configure 2.28.51
 generated by GNU Autoconf 2.64
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2185,7 +2188,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by bfd $as_me 2.25.51, which was
+It was created by bfd $as_me 2.28.51, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
   $ $0 $@
@@ -3961,6 +3964,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3993,7 +3997,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='bfd'
- VERSION='2.25.51'
+ VERSION='2.28.51'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4023,11 +4027,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -4045,6 +4049,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4104,7 +4109,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -9395,7 +9400,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -11423,7 +11428,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11426 "configure"
+#line 11431 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11529,7 +11534,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11532 "configure"
+#line 11537 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12127,6 +12132,17 @@ if test "${enable_targets+set}" = set; t
 esac
 fi
 
+# Check whether --enable-64_bit_archive was given.
+if test "${enable_64_bit_archive+set}" = set; then :
+  enableval=$enable_64_bit_archive; case "${enableval}" in
+  yes)  want_64_bit_archive=true  ;;
+  no)   want_64_bit_archive=false ;;
+  *)    as_fn_error "bad value ${enableval} for 64-bit-archive option" "$LINENO" 5 ;;
+esac
+else
+  want_64_bit_archive=unset
+fi
+
 
 # Check whether --with-mmap was given.
 if test "${with_mmap+set}" = set; then :
@@ -12175,29 +12191,6 @@ fi
 
 
 
-# Check to see if we should allow the generation of
-# symbols with the ELF standard's STT_COMMON type.
-# Check whether --enable-elf-stt-common was given.
-if test "${enable_elf_stt_common+set}" = set; then :
-  enableval=$enable_elf_stt_common; case "${enableval}" in
-  yes) want_elf_stt_common=true ;;
-  no)  want_elf_stt_common=false ;;
-  *)   as_fn_error "bad value ${enableval} for ELF STT_COMMON option" "$LINENO" 5 ;;
- esac
-else
-  # We have to choose a default behaviour.  For native builds we could
-# test whether the loader supports the STT_COMMON type, but that would
-# mean that built binaries could not be exported to older systems where
-# the loader does not support it. So by default we always choose to
-# disable this feature.
-  want_elf_stt_common=false
-fi
-if test $want_elf_stt_common = true; then
-
-$as_echo "#define USE_STT_COMMON 1" >>confdefs.h
-
-fi
-
 
 
 # Check whether --with-pkgversion was given.
@@ -12248,7 +12241,14 @@ fi
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
+# Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 __GNUC__
@@ -12262,6 +12262,65 @@ fi
 rm -f conftest*
 
 
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
+# Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
+WARN_WRITE_STRINGS=""
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  WARN_WRITE_STRINGS="-Wwrite-strings"
+fi
+rm -f conftest*
+
+
+# Verify CC_FOR_BUILD to be compatible with warning flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -12277,6 +12336,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
@@ -12290,25 +12350,32 @@ fi
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes)	WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes)	WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)	if test "${GCC}" = yes ; then
 	  WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
 	fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -12321,6 +12388,8 @@ fi
 
 
 
+
+
 ac_config_headers="$ac_config_headers config.h:config.in"
 
 
@@ -12426,7 +12495,7 @@ bfd_default_target_size=32
 
 # host stuff:
 
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk sr"
 # If we haven't got the data from the intl directory,
 # assume NLS is disabled.
 USE_NLS=no
@@ -13819,6 +13888,28 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRSTR $ac_have_decl
 _ACEOF
 
+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF $ac_have_decl
+_ACEOF
+
 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
   ac_have_decl=1
@@ -13873,1349 +13964,282 @@ fi
 
 
 
-# If we are configured native, pick a core file support file.
-COREFILE=
-COREFLAG=
-CORE_HEADER=
-TRAD_HEADER=
-if test "${target}" = "${host}"; then
-  case "${host}" in
-  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
-	COREFILE=''
-	;;
-  alpha*-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/alphalinux.h"'
-	;;
-  alpha*-*-netbsd* | alpha*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  alpha*-*-*)
-        COREFILE=osf-core.lo
-	;;
-  arm-*-freebsd* | arm-*-kfreebsd*-gnu)
-	COREFILE='' ;;
-  arm-*-netbsd* | arm-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  arm-*-riscix)		COREFILE=trad-core.lo ;;
-  hppa*-*-hpux*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-hiux*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-mpeix*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-bsd*)		COREFILE="hpux-core.lo hppabsd-core.lo"
-			COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
-  hppa*-*-netbsd* | hppa*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
+# Check if linker supports --as-needed and --no-as-needed options
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
+$as_echo_n "checking linker --as-needed support... " >&6; }
+if test "${bfd_cv_ld_as_needed+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  bfd_cv_ld_as_needed=no
+	if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
+		bfd_cv_ld_as_needed=yes
+	fi
 
-  i370-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i370linux.h"'
-	;;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_ld_as_needed" >&5
+$as_echo "$bfd_cv_ld_as_needed" >&6; }
 
-  i[3-7]86-sequent-bsd*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/symmetry.h"'
-	;;
-  i[3-7]86-sequent-sysv4*) ;;
-  i[3-7]86-sequent-sysv*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/symmetry.h"'
-	;;
-  i[3-7]86-*-bsdi)
-	COREFILE=
-	;;
-  i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386bsd.h"'
-	;;
-  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
-	COREFILE=''
-	TRAD_HEADER='"hosts/i386bsd.h"'
-	;;
-  i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  i[3-7]86-esix-sysv3*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/esix.h"'
-	;;
-  i[3-7]86-*-sco3.2v5*)
-	COREFILE=sco5-core.lo
-	;;
-  i[3-7]86-*-sco* | i[3-7]86-*-isc*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386sco.h"'
-	;;
-  i[3-7]86-*-mach3*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386mach3.h"'
-	;;
-  i[3-7]86-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386linux.h"'
-	case "$enable_targets"-"$want64" in
-	*x86_64-*linux*|*-true)
-	  CORE_HEADER='"hosts/x86-64linux.h"'
-	esac
-	;;
-  i[3-7]86-*-isc*)	COREFILE=trad-core.lo ;;
-  i[3-7]86-*-aix*)	COREFILE=aix386-core.lo ;;
-  i860-*-mach3* | i860-*-osf1*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i860mach3.h"'
-	;;
-  mips-*-netbsd* | mips*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  mips-dec-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/decstation.h"'
-	;;
-  mips-sgi-irix4*)	COREFILE=irix-core.lo ;;
-  mips-sgi-irix5*)	COREFILE=irix-core.lo ;;
-  mips-sgi-irix6*)	COREFILE=irix-core.lo ;;
-  mips-*-sysv4*)	;;
-  mips-*-sysv* | mips-*-riscos*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/riscos.h"'
-	;;
-  mips-sony-bsd*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/news-mips.h"'
-	;;
-  m68*-bull*-sysv*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/dpx2.h"'
-	;;
-  m68*-hp-hpux*)	COREFILE=hpux-core.lo ;;
-  m68*-hp-bsd*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/hp300bsd.h"'
-	;;
-  m68*-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m68klinux.h"'
-	;;
-  m68*-motorola-sysv*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/delta68.h"'
-	;;
-  m68*-sony-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/news.h"'
-	;;
-  m68*-*-netbsd* | m68*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  m68*-apple-aux*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m68kaux.h"'
-	;;
-  m88*-*-sysv4*)
-	;;
-  m88*-motorola-sysv*)
-	COREFILE=ptrace-core.lo
-	;;
-  m88*-*-mach3*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m88kmach3.h"'
-	;;
-  m88*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  ns32k-pc532-mach)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/pc532mach.h"'
-	;;
-  ns32k-*-netbsd* | ns32k-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  rs6000-*-lynx*)
-	COREFILE=lynx-core.lo
-	;;
-  rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*)
-        COREFILE=rs6000-core.lo
-	COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
-	;;
-  rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
-        COREFILE=rs6000-core.lo
-	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
-	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
-	# have c_impl as a member of struct core_dumpx
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for c_impl in struct core_dumpx" >&5
-$as_echo_n "checking for c_impl in struct core_dumpx... " >&6; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <core.h>
-int
-main ()
-{
-struct core_dumpx c; c.c_impl = 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_ST_C_IMPL 1" >>confdefs.h
-
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	;;
-  rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
-  rs6000-*-*)		COREFILE=rs6000-core.lo ;;
-  powerpc-*-aix4*)	COREFILE=rs6000-core.lo ;;
-  powerpc-*-aix*)	COREFILE=rs6000-core.lo ;;
-  powerpc-*-beos*)	;;
-  powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
-		        COREFILE='' ;;
-  powerpc-*-netbsd*)	COREFILE=netbsd-core.lo ;;
-  powerpc-*-*bsd*)	COREFILE=netbsd-core.lo ;;
-  s390*-*-*)            COREFILE=trad-core.lo ;;
-  sh*-*-netbsd* | sh*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  sparc-*-netbsd* | sparc*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  tahoe-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/tahoe.h"'
-	;;
-  vax-*-netbsd* | vax-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  vax-*-ultrix2*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxult2.h"'
-	;;
-  vax-*-ultrix*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxult2.h"'
-	;;
-  vax-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxlinux.h"'
-	;;
-  vax-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxbsd.h"'
-	;;
-  x86_64-*-linux*)
-	CORE_HEADER='"hosts/x86-64linux.h"'
-	;;
-  x86_64-*-netbsd* | x86_64-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  esac
-
-  case "$COREFILE" in
-  aix386-core.lo)	COREFLAG=-DAIX386_CORE ;;
-  hppabsd-core.lo)	COREFLAG=-DHPPABSD_CORE ;;
-  hpux-core.lo)		COREFLAG=-DHPUX_CORE ;;
-  irix-core.lo)		COREFLAG=-DIRIX_CORE ;;
-  lynx-core.lo)		COREFLAG=-DLYNX_CORE ;;
-  netbsd-core.lo)	COREFLAG=-DNETBSD_CORE ;;
-  osf-core.lo)		COREFLAG=-DOSF_CORE ;;
-  ptrace-core.lo)	COREFLAG=-DPTRACE_CORE ;;
-  rs6000-core.lo)	COREFLAG="$COREFLAG -DAIX_CORE" ;;
-  sco5-core.lo)		COREFLAG="$COREFLAG -DSCO5_CORE" ;;
-  trad-core.lo)		COREFLAG="$COREFLAG -DTRAD_CORE" ;;
-  esac
-
-  # ELF corefile support has several flavors, but all of
-  # them use something called <sys/procfs.h>
-  for ac_header in sys/procfs.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_procfs_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_PROCFS_H 1
-_ACEOF
-
-fi
-
-done
-
-  if test "$ac_cv_header_sys_procfs_h" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for prstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then :
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
+$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
+if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmw  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _mwvalidcheckl ();
 int
 main ()
 {
-prstatus_t avar
+return _mwvalidcheckl ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_prstatus_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mw__mwvalidcheckl=yes
 else
-  bfd_cv_have_sys_procfs_type_prstatus_t=no
-
+  ac_cv_lib_mw__mwvalidcheckl=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
+$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
+if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then :
+  LIBM="-lmw"
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
-
-$as_echo "#define HAVE_PRSTATUS_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prstatus_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prstatus32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
+$as_echo_n "checking for cos in -lm... " >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cos ();
 int
 main ()
 {
-prstatus32_t avar
+return cos ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_prstatus32_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_cos=yes
 else
-  bfd_cv_have_sys_procfs_type_prstatus32_t=no
-
+  ac_cv_lib_m_cos=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
+$as_echo "$ac_cv_lib_m_cos" >&6; }
+if test "x$ac_cv_lib_m_cos" = x""yes; then :
+  LIBM="$LIBM -lm"
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
-
-$as_echo "#define HAVE_PRSTATUS32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t.pr_who in sys/procfs.h" >&5
-$as_echo_n "checking for prstatus_t.pr_who in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then :
+  ;;
+*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
+$as_echo_n "checking for cos in -lm... " >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cos ();
 int
 main ()
 {
-prstatus_t avar; void* aref = (void*) &avar.pr_who
+return cos ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_cos=yes
 else
-  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
-
+  ac_cv_lib_m_cos=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
+$as_echo "$ac_cv_lib_m_cos" >&6; }
+if test "x$ac_cv_lib_m_cos" = x""yes; then :
+  LIBM="-lm"
 fi
 
- if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
+  ;;
+esac
 
-$as_echo "#define HAVE_PRSTATUS_T_PR_WHO 1" >>confdefs.h
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
-$as_echo_n "checking for prstatus32_t.pr_who in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-prstatus32_t avar; void* aref = (void*) &avar.pr_who
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
-else
-  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
 
-$as_echo "#define HAVE_PRSTATUS32_T_PR_WHO 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6; }
+# When building a shared libbfd, link against the pic version of libiberty
+# so that apps that use libbfd won't need libiberty just to satisfy any
+# libbfd references.
+# We can't do that if a pic libiberty is unavailable since including non-pic
+# code would insert text relocations into libbfd.
+SHARED_LIBADD=
+SHARED_LDFLAGS=
+if test "$enable_shared" = "yes"; then
+  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
+  if test -n "$x"; then
+    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
+  fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# More hacks to build DLLs on Windows.
+  case "${host}" in
+  *-*-cygwin*)
+    SHARED_LDFLAGS="-no-undefined"
+    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
+  ;;
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-pstatus_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_pstatus_t=yes
-else
-  bfd_cv_have_sys_procfs_type_pstatus_t=no
+  # Hack to build or1k-src on OSX
+  or1k*-*-darwin*)
+    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
+  ;;
+  esac
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test -n "$SHARED_LIBADD"; then
+    if test -n "$LIBM"; then
+      if test x"$bfd_cv_ld_as_needed" = xyes; then
+	# Link against libm only when needed.  Put -lc, -lm inside -Wl
+	# to stop libtool reordering these options.
+	SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
+      else
+	SHARED_LIBADD="$SHARED_LIBADD $LIBM"
+      fi
+    fi
+  fi
 fi
 
- if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
-
-$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pxstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for pxstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-pxstatus_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_pxstatus_t=yes
-else
-  bfd_cv_have_sys_procfs_type_pxstatus_t=no
+# target stuff:
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Canonicalize the secondary target names.
+if test -n "$enable_targets" ; then
+    for targ in `echo $enable_targets | sed 's/,/ /g'`
+    do
+	result=`$ac_config_sub $targ 2>/dev/null`
+	if test -n "$result" ; then
+	    canon_targets="$canon_targets $result"
+	else
+	    # Allow targets that config.sub doesn't recognize, like "all".
+	    canon_targets="$canon_targets $targ"
+	fi
+    done
 fi
 
- if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
+all_targets=false
+defvec=
+selvecs=
+assocvecs=
+selarchs=
+TDEFINES=
+for targ in $target $canon_targets
+do
+    if test "x$targ" = "xall"; then
+        all_targets=true
+	assocvecs="$assocvecs $targ_defvec $targ_selvecs"
+    else
+	. $srcdir/config.bfd
+	if test "x$targ" = "x$target"; then
+	    defvec=$targ_defvec
+	fi
+	selvecs="$selvecs $targ_defvec $targ_selvecs"
+	selarchs="$selarchs $targ_archs"
+	TDEFINES="$TDEFINES $targ_cflags"
+    fi
+done
 
-$as_echo "#define HAVE_PXSTATUS_T 1" >>confdefs.h
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6; }
+# This processing still needs to be done if we're to decide properly whether
+# 64-bit support needs to be compiled in.  Currently, it will be included if
+# the default or any other explicitly requested target requires it; it
+# will not be included on a 32-bit host if no 64-bit target is requested, and
+# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
+# used.
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus32_t in sys/procfs.h" >&5
-$as_echo_n "checking for pstatus32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# uniq the default and selected vectors in all the configured targets.
+f=""
+for i in $selvecs ; do
+    case " $f " in
+    *" $i "*) ;;
+    *) f="$f $i" ;;
+    esac
+done
+selvecs="$f"
 
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-pstatus32_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_pstatus32_t=yes
-else
-  bfd_cv_have_sys_procfs_type_pstatus32_t=no
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+# uniq the associated vectors in all the configured targets.
+f=""
+for i in $assocvecs ; do
+    case " $f " in
+    *" $i "*) ;;
+    *) f="$f $i" ;;
+    esac
+done
+assocvecs="$f"
 
- if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
 
-$as_echo "#define HAVE_PSTATUS32_T 1" >>confdefs.h
+# uniq the architectures in all the configured targets.
+f=""
+for i in $selarchs ; do
+    case " $f " in
+    *" $i "*) ;;
+    *) f="$f $i" ;;
+    esac
+done
+selarchs="$f"
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6; }
+# Target backend .o files.
+tb=
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t in sys/procfs.h" >&5
-$as_echo_n "checking for prpsinfo_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-prpsinfo_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
-else
-  bfd_cv_have_sys_procfs_type_prpsinfo_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
-
-$as_echo "#define HAVE_PRPSINFO_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t.pr_pid in sys/procfs.h" >&5
-$as_echo_n "checking for prpsinfo_t.pr_pid in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-prpsinfo_t avar; void* aref = (void*) &avar.pr_pid
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=yes
-else
-  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid = yes; then
-
-$as_echo "#define HAVE_PRPSINFO_T_PR_PID 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prpsinfo32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-prpsinfo32_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
-else
-  bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
-
-$as_echo "#define HAVE_PRPSINFO32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t.pr_pid in sys/procfs.h" >&5
-$as_echo_n "checking for prpsinfo32_t.pr_pid in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-prpsinfo32_t avar; void* aref = (void*) &avar.pr_pid
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=yes
-else
-  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid = yes; then
-
-$as_echo "#define HAVE_PRPSINFO32_T_PR_PID 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t in sys/procfs.h" >&5
-$as_echo_n "checking for psinfo_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-psinfo_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_psinfo_t=yes
-else
-  bfd_cv_have_sys_procfs_type_psinfo_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
-
-$as_echo "#define HAVE_PSINFO_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psinfo_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t.pr_pid in sys/procfs.h" >&5
-$as_echo_n "checking for psinfo_t.pr_pid in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-psinfo_t avar; void* aref = (void*) &avar.pr_pid
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=yes
-else
-  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid = yes; then
-
-$as_echo "#define HAVE_PSINFO_T_PR_PID 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t in sys/procfs.h" >&5
-$as_echo_n "checking for psinfo32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-psinfo32_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_psinfo32_t=yes
-else
-  bfd_cv_have_sys_procfs_type_psinfo32_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
-
-$as_echo "#define HAVE_PSINFO32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t.pr_pid in sys/procfs.h" >&5
-$as_echo_n "checking for psinfo32_t.pr_pid in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-psinfo32_t avar; void* aref = (void*) &avar.pr_pid
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=yes
-else
-  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid = yes; then
-
-$as_echo "#define HAVE_PSINFO32_T_PR_PID 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpstatus_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
-else
-  bfd_cv_have_sys_procfs_type_lwpstatus_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
-
-$as_echo "#define HAVE_LWPSTATUS_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpxstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpxstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpxstatus_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
-else
-  bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
-
-$as_echo "#define HAVE_LWPXSTATUS_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
-$as_echo_n "checking for lwpstatus_t.pr_context in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpstatus_t avar; void* aref = (void*) &avar.pr_context
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
-else
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
-
-$as_echo "#define HAVE_LWPSTATUS_T_PR_CONTEXT 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
-$as_echo_n "checking for lwpstatus_t.pr_reg in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
-else
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
-
-$as_echo "#define HAVE_LWPSTATUS_T_PR_REG 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_fpreg in sys/procfs.h" >&5
-$as_echo_n "checking for lwpstatus_t.pr_fpreg in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpstatus_t avar; void* aref = (void*) &avar.pr_fpreg
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=yes
-else
-  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg = yes; then
-
-$as_echo "#define HAVE_LWPSTATUS_T_PR_FPREG 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32_pstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for win32_pstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris.  */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-int
-main ()
-{
-win32_pstatus_t avar
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
-else
-  bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
-
-$as_echo "#define HAVE_WIN32_PSTATUS_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6; }
-
-  fi
-fi
-
-
-if test -n "$CORE_HEADER"; then
-
-cat >>confdefs.h <<_ACEOF
-#define CORE_HEADER $CORE_HEADER
-_ACEOF
-
-fi
-if test -n "$TRAD_HEADER"; then
-
-cat >>confdefs.h <<_ACEOF
-#define TRAD_HEADER $TRAD_HEADER
-_ACEOF
-
-fi
-
-# Check if linker supports --as-needed and --no-as-needed options
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
-$as_echo_n "checking linker --as-needed support... " >&6; }
-if test "${bfd_cv_ld_as_needed+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  bfd_cv_ld_as_needed=no
-	if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
-		bfd_cv_ld_as_needed=yes
-	fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_ld_as_needed" >&5
-$as_echo "$bfd_cv_ld_as_needed" >&6; }
-
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
-$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
-if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmw  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char _mwvalidcheckl ();
-int
-main ()
-{
-return _mwvalidcheckl ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mw__mwvalidcheckl=yes
-else
-  ac_cv_lib_mw__mwvalidcheckl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
-$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
-if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then :
-  LIBM="-lmw"
-fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_cos=yes
-else
-  ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
-  LIBM="$LIBM -lm"
-fi
-
-  ;;
-*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_cos=yes
-else
-  ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
-  LIBM="-lm"
-fi
-
-  ;;
-esac
-
-
-
-# When building a shared libbfd, link against the pic version of libiberty
-# so that apps that use libbfd won't need libiberty just to satisfy any
-# libbfd references.
-# We can't do that if a pic libiberty is unavailable since including non-pic
-# code would insert text relocations into libbfd.
-SHARED_LIBADD=
-SHARED_LDFLAGS=
-if test "$enable_shared" = "yes"; then
-  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
-  if test -n "$x"; then
-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
-  fi
-
-# More hacks to build DLLs on Windows.
-  case "${host}" in
-  *-*-cygwin*)
-    SHARED_LDFLAGS="-no-undefined"
-    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
-  ;;
-
-  # Hack to build or1k-src on OSX
-  or1k*-*-darwin*)
-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
-  ;;
-  esac
-
-  if test -n "$SHARED_LIBADD"; then
-    if test -n "$LIBM"; then
-      if test x"$bfd_cv_ld_as_needed" = xyes; then
-	# Link against libm only when needed.  Put -lc, -lm inside -Wl
-	# to stop libtool reordering these options.
-	SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
-      else
-	SHARED_LIBADD="$SHARED_LIBADD $LIBM"
-      fi
-    fi
-  fi
-fi
-
-
-
-# target stuff:
-
-# Canonicalize the secondary target names.
-if test -n "$enable_targets" ; then
-    for targ in `echo $enable_targets | sed 's/,/ /g'`
-    do
-	result=`$ac_config_sub $targ 2>/dev/null`
-	if test -n "$result" ; then
-	    canon_targets="$canon_targets $result"
-	else
-	    # Allow targets that config.sub doesn't recognize, like "all".
-	    canon_targets="$canon_targets $targ"
-	fi
-    done
-fi
-
-all_targets=false
-defvec=
-selvecs=
-assocvecs=
-selarchs=
-TDEFINES=
-for targ in $target $canon_targets
-do
-    if test "x$targ" = "xall"; then
-        all_targets=true
-	assocvecs="$assocvecs $targ_defvec $targ_selvecs"
-    else
-	. $srcdir/config.bfd
-	if test "x$targ" = "x$target"; then
-	    defvec=$targ_defvec
-	fi
-	selvecs="$selvecs $targ_defvec $targ_selvecs"
-	selarchs="$selarchs $targ_archs"
-	TDEFINES="$TDEFINES $targ_cflags"
-    fi
-done
-
-
-# This processing still needs to be done if we're to decide properly whether
-# 64-bit support needs to be compiled in.  Currently, it will be included if
-# the default or any other explicitly requested target requires it; it
-# will not be included on a 32-bit host if no 64-bit target is requested, and
-# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
-# used.
-
-# uniq the default and selected vectors in all the configured targets.
-f=""
-for i in $selvecs ; do
-    case " $f " in
-    *" $i "*) ;;
-    *) f="$f $i" ;;
-    esac
-done
-selvecs="$f"
-
-
-# uniq the associated vectors in all the configured targets.
-f=""
-for i in $assocvecs ; do
-    case " $f " in
-    *" $i "*) ;;
-    *) f="$f $i" ;;
-    esac
-done
-assocvecs="$f"
-
-
-# uniq the architectures in all the configured targets.
-f=""
-for i in $selarchs ; do
-    case " $f " in
-    *" $i "*) ;;
-    *) f="$f $i" ;;
-    esac
-done
-selarchs="$f"
-
-# Target backend .o files.
-tb=
-
-elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo
-     elf-eh-frame.lo dwarf1.lo dwarf2.lo"
-coffgen="coffgen.lo dwarf2.lo"
-coff="cofflink.lo $coffgen"
-ecoff="ecofflink.lo $coffgen"
-xcoff="xcofflink.lo $coffgen"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo
+     elf-eh-frame.lo dwarf1.lo dwarf2.lo"
+coffgen="coffgen.lo dwarf2.lo"
+coff="cofflink.lo $coffgen"
+ecoff="ecofflink.lo $coffgen"
+xcoff="xcofflink.lo $coffgen"
 
 for vec in $selvecs
 do
@@ -15226,8 +14250,11 @@ do
     # use one entry per line, even though this leads to long lines.
     aarch64_elf32_be_vec)	 tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
     aarch64_elf32_le_vec)	 tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
-    aarch64_elf64_be_vec)	 tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    aarch64_elf64_le_vec)	 tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_be_vec)	   tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_le_vec)	   tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_mach_o_vec)		 tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
     alpha_ecoff_le_vec)		 tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
     alpha_elf64_vec)		 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
     alpha_elf64_fbsd_vec)	 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
@@ -15267,6 +14294,7 @@ do
     arm_pei_epoc_le_vec)	 tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
     arm_pei_wince_be_vec)	 tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
     arm_pei_wince_le_vec)	 tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
+    arm_mach_o_vec)		 tb="$tb mach-o-arm.lo" ;;
     avr_elf32_vec)		 tb="$tb elf32-avr.lo elf32.lo $elf" ;;
     bfin_elf32_vec)		 tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
     bfin_elf32_fdpic_vec)	 tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
@@ -15447,6 +14475,9 @@ do
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
     powerpc_pei_le_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
     powerpc_xcoff_vec)		 tb="$tb coff-rs6000.lo $xcoff" ;;
+    pru_elf32_vec)		 tb="$tb elf32-pru.lo elf32.lo $elf" ;;
+    riscv_elf32_vec)		 tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
+    riscv_elf64_vec)		 tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;;
     rl78_elf32_vec)		 tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
     rs6000_xcoff64_vec)		 tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
     rs6000_xcoff64_aix_vec)	 tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
@@ -15559,120 +14590,1204 @@ do
     z80_coff_vec)		 tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
     z8k_coff_vec)		 tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
 
-    # These appear out of order in targets.c
-    srec_vec)			 tb="$tb srec.lo" ;;
-    symbolsrec_vec)		 tb="$tb srec.lo" ;;
-    tekhex_vec)			 tb="$tb tekhex.lo" ;;
-    core_cisco_be_vec)		 tb="$tb cisco-core.lo" ;;
-    core_cisco_le_vec)		 tb="$tb cisco-core.lo" ;;
+    # These appear out of order in targets.c
+    srec_vec)			 tb="$tb srec.lo" ;;
+    symbolsrec_vec)		 tb="$tb srec.lo" ;;
+    tekhex_vec)			 tb="$tb tekhex.lo" ;;
+    core_cisco_be_vec)		 tb="$tb cisco-core.lo" ;;
+    core_cisco_le_vec)		 tb="$tb cisco-core.lo" ;;
+
+    "")				 ;;
+    *) as_fn_error "*** unknown target vector $vec" "$LINENO" 5 ;;
+    esac
+
+    if test ${target_size} = 64; then
+	target64=true
+    fi
+    if test x"${vec}" = x"${defvec}"; then
+	bfd_default_target_size=${target_size}
+    fi
+done
+
+# Target architecture .o files.
+# A couple of CPUs use shorter file names to avoid problems on DOS
+# filesystems.
+ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
+
+# Weed out duplicate .o files.
+f=""
+for i in $tb ; do
+    case " $f " in
+    *" $i "*) ;;
+    *) f="$f $i" ;;
+    esac
+done
+tb="$f"
+
+f=""
+for i in $ta ; do
+    case " $f " in
+    *" $i "*) ;;
+    *) f="$f $i" ;;
+    esac
+done
+ta="$f"
+
+bfd_backends="$tb"
+bfd_machines="$ta"
+
+if test x${all_targets} = xtrue ; then
+  bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
+  bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
+  selvecs=
+  havevecs=-DHAVE_all_vecs
+  selarchs=
+  test -n "$assocvecs" &&
+    assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+else	# all_targets is true
+  # Only set these if they will be nonempty, for the clever echo.
+  havevecs=
+  assocvecs=
+  test -n "$selvecs" &&
+    havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
+  test -n "$selvecs" &&
+    selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+  test -n "$selarchs" &&
+    selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+fi	# all_targets is true
+
+# 64-bit archives need a 64-bit bfd_vma.
+if test "x$want_64_bit_archive" = xtrue; then
+  want64=true
+
+$as_echo "#define USE_64_BIT_ARCHIVE 1" >>confdefs.h
+
+fi
+
+case ${host64}-${target64}-${want64} in
+  *true*)
+    wordsize=64
+    bfd64_libs='$(BFD64_LIBS)'
+    all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
+    if test $BFD_HOST_64_BIT_DEFINED = 0; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have requested a 64 bit BFD configuration, but" >&5
+$as_echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your compiler may not have a 64 bit integral type" >&5
+$as_echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;}
+    fi
+    if test -n "$GCC" ; then
+       bad_64bit_gcc=no;
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version with buggy 64-bit support" >&5
+$as_echo_n "checking for gcc version with buggy 64-bit support... " >&6; }
+       # Add more tests for gcc versions with non-working 64-bit support here.
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+:__GNUC__:__GNUC_MINOR__:__i386__:
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then :
+  bad_64bit_gcc=yes;
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: egcs-1.1.2 on ix86 spotted" >&5
+$as_echo "yes: egcs-1.1.2 on ix86 spotted" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f conftest*
+
+       if test $bad_64bit_gcc = yes ; then
+	 as_fn_error "A newer version of gcc is needed for the requested 64-bit BFD configuration" "$LINENO" 5
+       fi
+    fi
+    ;;
+  false-false-false)
+    wordsize=32
+    all_backends='$(BFD32_BACKENDS)'
+    ;;
+esac
+
+tdefaults=""
+test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
+test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
+test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
+test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
+
+
+
+
+
+
+
+
+
+
+# If we are configured native, pick a core file support file.
+COREFILE=
+COREFLAG=
+CORE_HEADER=
+TRAD_HEADER=
+if test "${target}" = "${host}"; then
+  case "${host}" in
+  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
+	COREFILE=''
+	;;
+  alpha*-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/alphalinux.h"'
+	;;
+  alpha*-*-netbsd* | alpha*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  alpha*-*-*)
+        COREFILE=osf-core.lo
+	;;
+  arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+	COREFILE='' ;;
+  arm-*-netbsd* | arm-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  arm-*-riscix)		COREFILE=trad-core.lo ;;
+  hppa*-*-hpux*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-hiux*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-mpeix*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-bsd*)		COREFILE="hpux-core.lo hppabsd-core.lo"
+			COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+  hppa*-*-netbsd* | hppa*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+
+  i370-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i370linux.h"'
+	;;
+
+  i[3-7]86-sequent-bsd*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/symmetry.h"'
+	;;
+  i[3-7]86-sequent-sysv4*) ;;
+  i[3-7]86-sequent-sysv*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/symmetry.h"'
+	;;
+  i[3-7]86-*-bsdi)
+	COREFILE=
+	;;
+  i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386bsd.h"'
+	;;
+  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
+	COREFILE=''
+	TRAD_HEADER='"hosts/i386bsd.h"'
+	;;
+  i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  i[3-7]86-esix-sysv3*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/esix.h"'
+	;;
+  i[3-7]86-*-sco3.2v5*)
+	COREFILE=sco5-core.lo
+	;;
+  i[3-7]86-*-sco* | i[3-7]86-*-isc*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386sco.h"'
+	;;
+  i[3-7]86-*-mach3*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386mach3.h"'
+	;;
+  i[3-7]86-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386linux.h"'
+	case "$enable_targets"-"$want64" in
+	*x86_64-*linux*|*-true)
+	  CORE_HEADER='"hosts/x86-64linux.h"'
+	esac
+	;;
+  i[3-7]86-*-isc*)	COREFILE=trad-core.lo ;;
+  i[3-7]86-*-aix*)	COREFILE=aix386-core.lo ;;
+  i860-*-mach3* | i860-*-osf1*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i860mach3.h"'
+	;;
+  mips-*-netbsd* | mips*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  mips-dec-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/decstation.h"'
+	;;
+  mips-sgi-irix4*)	COREFILE=irix-core.lo ;;
+  mips-sgi-irix5*)	COREFILE=irix-core.lo ;;
+  mips-sgi-irix6*)	COREFILE=irix-core.lo ;;
+  mips-*-sysv4*)	;;
+  mips-*-sysv* | mips-*-riscos*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/riscos.h"'
+	;;
+  mips-sony-bsd*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/news-mips.h"'
+	;;
+  m68*-bull*-sysv*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/dpx2.h"'
+	;;
+  m68*-hp-hpux*)	COREFILE=hpux-core.lo ;;
+  m68*-hp-bsd*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/hp300bsd.h"'
+	;;
+  m68*-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m68klinux.h"'
+	;;
+  m68*-motorola-sysv*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/delta68.h"'
+	;;
+  m68*-sony-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/news.h"'
+	;;
+  m68*-*-netbsd* | m68*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  m68*-apple-aux*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m68kaux.h"'
+	;;
+  m88*-*-sysv4*)
+	;;
+  m88*-motorola-sysv*)
+	COREFILE=ptrace-core.lo
+	;;
+  m88*-*-mach3*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m88kmach3.h"'
+	;;
+  m88*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  ns32k-pc532-mach)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/pc532mach.h"'
+	;;
+  ns32k-*-netbsd* | ns32k-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  rs6000-*-lynx*)
+	COREFILE=lynx-core.lo
+	;;
+  rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
+        COREFILE=rs6000-core.lo
+	COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
+	;;
+  rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
+        COREFILE=rs6000-core.lo
+	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
+	# have c_impl as a member of struct core_dumpx
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for c_impl in struct core_dumpx" >&5
+$as_echo_n "checking for c_impl in struct core_dumpx... " >&6; }
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <core.h>
+int
+main ()
+{
+struct core_dumpx c; c.c_impl = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_ST_C_IMPL 1" >>confdefs.h
+
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	;;
+  rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
+  rs6000-*-*)		COREFILE=rs6000-core.lo ;;
+  powerpc64-*-aix*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-aix4*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-aix*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-beos*)	;;
+  powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
+		        COREFILE='' ;;
+  powerpc-*-netbsd*)	COREFILE=netbsd-core.lo ;;
+  powerpc-*-*bsd*)	COREFILE=netbsd-core.lo ;;
+  s390*-*-*)            COREFILE=trad-core.lo ;;
+  sh*-*-netbsd* | sh*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  sparc-*-netbsd* | sparc*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  tahoe-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/tahoe.h"'
+	;;
+  vax-*-netbsd* | vax-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  vax-*-ultrix2*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxult2.h"'
+	;;
+  vax-*-ultrix*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxult2.h"'
+	;;
+  vax-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxlinux.h"'
+	;;
+  vax-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxbsd.h"'
+	;;
+  x86_64-*-linux*)
+	CORE_HEADER='"hosts/x86-64linux.h"'
+	;;
+  x86_64-*-netbsd* | x86_64-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  esac
+
+  case "$COREFILE" in
+  aix386-core.lo)	COREFLAG=-DAIX386_CORE ;;
+  hppabsd-core.lo)	COREFLAG=-DHPPABSD_CORE ;;
+  hpux-core.lo)		COREFLAG=-DHPUX_CORE ;;
+  irix-core.lo)		COREFLAG=-DIRIX_CORE ;;
+  lynx-core.lo)		COREFLAG=-DLYNX_CORE ;;
+  netbsd-core.lo)	COREFLAG=-DNETBSD_CORE ;;
+  osf-core.lo)		COREFLAG=-DOSF_CORE ;;
+  ptrace-core.lo)	COREFLAG=-DPTRACE_CORE ;;
+  rs6000-core.lo)	COREFLAG="$COREFLAG -DAIX_CORE" ;;
+  sco5-core.lo)		COREFLAG="$COREFLAG -DSCO5_CORE" ;;
+  trad-core.lo)		COREFLAG="$COREFLAG -DTRAD_CORE" ;;
+  esac
+
+  # ELF corefile support has several flavors, but all of
+  # them use something called <sys/procfs.h>
+  for ac_header in sys/procfs.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_procfs_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PROCFS_H 1
+_ACEOF
+
+fi
+
+done
+
+  if test "$ac_cv_header_sys_procfs_h" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for prstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_prstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_prstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
+
+$as_echo "#define HAVE_PRSTATUS_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prstatus_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t in sys/procfs.h" >&5
+$as_echo_n "checking for prstatus32_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prstatus32_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_prstatus32_t=yes
+else
+  bfd_cv_have_sys_procfs_type_prstatus32_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
+
+$as_echo "#define HAVE_PRSTATUS32_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+$as_echo_n "checking for prstatus_t.pr_who in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prstatus_t avar; void* aref = (void*) &avar.pr_who
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
+
+$as_echo "#define HAVE_PRSTATUS_T_PR_WHO 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+$as_echo_n "checking for prstatus32_t.pr_who in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prstatus32_t avar; void* aref = (void*) &avar.pr_who
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
+
+$as_echo "#define HAVE_PRSTATUS32_T_PR_WHO 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+pstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_pstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_pstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
+
+$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pxstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for pxstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+pxstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_pxstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_pxstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
+
+$as_echo "#define HAVE_PXSTATUS_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus32_t in sys/procfs.h" >&5
+$as_echo_n "checking for pstatus32_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+pstatus32_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_pstatus32_t=yes
+else
+  bfd_cv_have_sys_procfs_type_pstatus32_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
+
+$as_echo "#define HAVE_PSTATUS32_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
+else
+  bfd_cv_have_sys_procfs_type_prpsinfo_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
+
+$as_echo "#define HAVE_PRPSINFO_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PRPSINFO_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo32_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo32_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
+else
+  bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
+
+$as_echo "#define HAVE_PRPSINFO32_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo32_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo32_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PRPSINFO32_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_psinfo_t=yes
+else
+  bfd_cv_have_sys_procfs_type_psinfo_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
+
+$as_echo "#define HAVE_PSINFO_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_psinfo_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PSINFO_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo32_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo32_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_psinfo32_t=yes
+else
+  bfd_cv_have_sys_procfs_type_psinfo32_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
+
+$as_echo "#define HAVE_PSINFO32_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo32_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo32_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PSINFO32_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for lwpstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+lwpstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_lwpstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
+
+$as_echo "#define HAVE_LWPSTATUS_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpxstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for lwpxstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+lwpxstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
+
+$as_echo "#define HAVE_LWPXSTATUS_T 1" >>confdefs.h
 
-    "")				 ;;
-    *) as_fn_error "*** unknown target vector $vec" "$LINENO" 5 ;;
-    esac
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6; }
 
-    if test ${target_size} = 64; then
-	target64=true
-    fi
-    if test x"${vec}" = x"${defvec}"; then
-	bfd_default_target_size=${target_size}
-    fi
-done
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+$as_echo_n "checking for lwpstatus_t.pr_context in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Target architecture .o files.
-# A couple of CPUs use shorter file names to avoid problems on DOS
-# filesystems.
-ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+lwpstatus_t avar; void* aref = (void*) &avar.pr_context
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
+else
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
 
-# Weed out duplicate .o files.
-f=""
-for i in $tb ; do
-    case " $f " in
-    *" $i "*) ;;
-    *) f="$f $i" ;;
-    esac
-done
-tb="$f"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-f=""
-for i in $ta ; do
-    case " $f " in
-    *" $i "*) ;;
-    *) f="$f $i" ;;
-    esac
-done
-ta="$f"
+ if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
 
-bfd_backends="$tb"
-bfd_machines="$ta"
+$as_echo "#define HAVE_LWPSTATUS_T_PR_CONTEXT 1" >>confdefs.h
 
-if test x${all_targets} = xtrue ; then
-  bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
-  bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
-  selvecs=
-  havevecs=-DHAVE_all_vecs
-  selarchs=
-  test -n "$assocvecs" &&
-    assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
-else	# all_targets is true
-  # Only set these if they will be nonempty, for the clever echo.
-  havevecs=
-  assocvecs=
-  test -n "$selvecs" &&
-    havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
-  test -n "$selvecs" &&
-    selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
-  test -n "$selarchs" &&
-    selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
-fi	# all_targets is true
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6; }
 
-case ${host64}-${target64}-${want64} in
-  *true*)
-    wordsize=64
-    bfd64_libs='$(BFD64_LIBS)'
-    all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
-    if test $BFD_HOST_64_BIT_DEFINED = 0; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have requested a 64 bit BFD configuration, but" >&5
-$as_echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your compiler may not have a 64 bit integral type" >&5
-$as_echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;}
-    fi
-    if test -n "$GCC" ; then
-       bad_64bit_gcc=no;
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version with buggy 64-bit support" >&5
-$as_echo_n "checking for gcc version with buggy 64-bit support... " >&6; }
-       # Add more tests for gcc versions with non-working 64-bit support here.
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+$as_echo_n "checking for lwpstatus_t.pr_reg in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-:__GNUC__:__GNUC_MINOR__:__i386__:
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then :
-  bad_64bit_gcc=yes;
-		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: egcs-1.1.2 on ix86 spotted" >&5
-$as_echo "yes: egcs-1.1.2 on ix86 spotted" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest*
 
-       if test $bad_64bit_gcc = yes ; then
-	 as_fn_error "A newer version of gcc is needed for the requested 64-bit BFD configuration" "$LINENO" 5
-       fi
-    fi
-    ;;
-  false-false-false)
-    wordsize=32
-    all_backends='$(BFD32_BACKENDS)'
-    ;;
-esac
+ if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
+
+$as_echo "#define HAVE_LWPSTATUS_T_PR_REG 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_fpreg in sys/procfs.h" >&5
+$as_echo_n "checking for lwpstatus_t.pr_fpreg in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+lwpstatus_t avar; void* aref = (void*) &avar.pr_fpreg
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=yes
+else
+  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg = yes; then
 
+$as_echo "#define HAVE_LWPSTATUS_T_PR_FPREG 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32_pstatus_t in sys/procfs.h" >&5
+$as_echo_n "checking for win32_pstatus_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+win32_pstatus_t avar
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
+else
+  bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
+
+$as_echo "#define HAVE_WIN32_PSTATUS_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6; }
+
+  fi
+fi
 
 
+if test -n "$CORE_HEADER"; then
 
+cat >>confdefs.h <<_ACEOF
+#define CORE_HEADER $CORE_HEADER
+_ACEOF
 
+fi
+if test -n "$TRAD_HEADER"; then
 
+cat >>confdefs.h <<_ACEOF
+#define TRAD_HEADER $TRAD_HEADER
+_ACEOF
 
+fi
 
 if test "$plugins" = "yes"; then
   supports_plugins=1
@@ -15682,7 +15797,7 @@ fi
 
 
 
-# Determine the host dependant file_ptr a.k.a. off_t type.  In order
+# Determine the host dependent file_ptr a.k.a. off_t type.  In order
 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
 # fseeko, long.  This assumes that sizeof off_t is .ge. sizeof long.
 # Hopefully a reasonable assumption since fseeko et.al. should be
@@ -15750,15 +15865,6 @@ fi
 
 
 
-
-tdefaults=""
-test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
-test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
-test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
-test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
-
-
-
 for ac_header in stdlib.h unistd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -16508,7 +16614,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bfd $as_me 2.25.51, which was
+This file was extended by bfd $as_me 2.28.51, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16572,7 +16678,7 @@ Report bugs to the package provider."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-bfd config.status 2.25.51
+bfd config.status 2.28.51
 configured by $0, generated by GNU Autoconf 2.64,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -18338,14 +18444,14 @@ _LT_EOF
           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
             # The LINGUAS file contains the set of available languages.
             if test -n "$OBSOLETE_ALL_LINGUAS"; then
-              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
             # Hide the ALL_LINGUAS assigment from automake.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
-            # The set of available languages was given in configure.in.
+            # The set of available languages was given in configure.ac.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           case "$ac_given_srcdir" in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.ac ./bfd/configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.ac	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/configure.ac	2017-03-06 01:49:05.000000000 +0000
@@ -1,17 +1,17 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
@@ -68,6 +68,15 @@ AC_ARG_ENABLE(targets,
   *)        enable_targets=$enableval ;;
 esac])dnl
 
+AC_ARG_ENABLE(64_bit_archive,
+	      AS_HELP_STRING([--enable-64-bit-archive],
+	      [force 64-bit archives]),
+[case "${enableval}" in
+  yes)  want_64_bit_archive=true  ;;
+  no)   want_64_bit_archive=false ;;
+  *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-archive option) ;;
+esac],[want_64_bit_archive=unset])dnl
+
 AC_ARG_WITH(mmap,
 [  --with-mmap             try using mmap for BFD input files if available],
 [case "${withval}" in
@@ -103,26 +112,6 @@ AC_ARG_WITH(separate-debug-dir,
 [DEBUGDIR="${withval}"])
 AC_SUBST(DEBUGDIR)
 
-# Check to see if we should allow the generation of
-# symbols with the ELF standard's STT_COMMON type.
-AC_ARG_ENABLE(elf-stt-common,
-[  --enable-elf-stt-common Allow the generation of ELF symbols with the STT_COMMON type],
-[case "${enableval}" in
-  yes) want_elf_stt_common=true ;;
-  no)  want_elf_stt_common=false ;;
-  *)   AC_MSG_ERROR(bad value ${enableval} for ELF STT_COMMON option) ;;
- esac],
-# We have to choose a default behaviour.  For native builds we could
-# test whether the loader supports the STT_COMMON type, but that would
-# mean that built binaries could not be exported to older systems where
-# the loader does not support it. So by default we always choose to
-# disable this feature.
-  want_elf_stt_common=false)dnl
-if test $want_elf_stt_common = true; then
-  AC_DEFINE(USE_STT_COMMON, 1,
-    [Define if we may generate symbols with ELF's STT_COMMON type])
-fi
-
 ACX_PKGVERSION([GNU Binutils])
 ACX_BUGURL([http://www.sourceware.org/bugzilla/])
 
@@ -154,7 +143,7 @@ bfd_default_target_size=32
 
 # host stuff:
 
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk sr"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -232,6 +221,8 @@ AC_CHECK_DECLS(malloc)
 AC_CHECK_DECLS(realloc)
 AC_CHECK_DECLS(stpcpy)
 AC_CHECK_DECLS(strstr)
+AC_CHECK_DECLS(asprintf)
+AC_CHECK_DECLS(vasprintf)
 AC_CHECK_DECLS(snprintf)
 AC_CHECK_DECLS(vsnprintf)
 AC_CHECK_DECLS(strnlen)
@@ -240,328 +231,26 @@ AC_CHECK_DECLS(strnlen)
 # This is used only by compress.c.
 AM_ZLIB
 
-# If we are configured native, pick a core file support file.
-COREFILE=
-COREFLAG=
-CORE_HEADER=
-TRAD_HEADER=
-if test "${target}" = "${host}"; then
-  case "${host}" in
-  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
-	COREFILE=''
-	;;
-  alpha*-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/alphalinux.h"'
-	;;
-  alpha*-*-netbsd* | alpha*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  alpha*-*-*)
-        COREFILE=osf-core.lo
-	;;
-  arm-*-freebsd* | arm-*-kfreebsd*-gnu)
-	COREFILE='' ;;
-  arm-*-netbsd* | arm-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  arm-*-riscix)		COREFILE=trad-core.lo ;;
-  hppa*-*-hpux*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-hiux*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-mpeix*)	COREFILE=hpux-core.lo ;;
-  hppa*-*-bsd*)		COREFILE="hpux-core.lo hppabsd-core.lo"
-			COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
-  hppa*-*-netbsd* | hppa*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
+# Check if linker supports --as-needed and --no-as-needed options
+AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+	[bfd_cv_ld_as_needed=no
+	if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
+		bfd_cv_ld_as_needed=yes
+	fi
+	])
 
-  i370-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i370linux.h"'
-	;;
+LT_LIB_M
 
+# When building a shared libbfd, link against the pic version of libiberty
+# so that apps that use libbfd won't need libiberty just to satisfy any
+# libbfd references.
+# We can't do that if a pic libiberty is unavailable since including non-pic
+# code would insert text relocations into libbfd.
+SHARED_LIBADD=
+SHARED_LDFLAGS=
+if test "$enable_shared" = "yes"; then
 changequote(,)dnl
-  i[3-7]86-sequent-bsd*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/symmetry.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-sequent-sysv4*) ;;
-  i[3-7]86-sequent-sysv*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/symmetry.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-bsdi)
-changequote([,])dnl
-	COREFILE=
-	;;
-changequote(,)dnl
-  i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386bsd.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
-changequote([,])dnl
-	COREFILE=''
-	TRAD_HEADER='"hosts/i386bsd.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
-changequote([,])dnl
-	COREFILE=netbsd-core.lo
-	;;
-changequote(,)dnl
-  i[3-7]86-esix-sysv3*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/esix.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-sco3.2v5*)
-changequote([,])dnl
-	COREFILE=sco5-core.lo
-	;;
-changequote(,)dnl
-  i[3-7]86-*-sco* | i[3-7]86-*-isc*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386sco.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-mach3*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386mach3.h"'
-	;;
-changequote(,)dnl
-  i[3-7]86-*-linux-*)
-changequote([,])dnl
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i386linux.h"'
-	case "$enable_targets"-"$want64" in
-	*x86_64-*linux*|*-true)
-	  CORE_HEADER='"hosts/x86-64linux.h"'
-	esac
-	;;
-changequote(,)dnl
-  i[3-7]86-*-isc*)	COREFILE=trad-core.lo ;;
-  i[3-7]86-*-aix*)	COREFILE=aix386-core.lo ;;
-changequote([,])dnl
-  i860-*-mach3* | i860-*-osf1*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/i860mach3.h"'
-	;;
-  mips-*-netbsd* | mips*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  mips-dec-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/decstation.h"'
-	;;
-  mips-sgi-irix4*)	COREFILE=irix-core.lo ;;
-  mips-sgi-irix5*)	COREFILE=irix-core.lo ;;
-  mips-sgi-irix6*)	COREFILE=irix-core.lo ;;
-  mips-*-sysv4*)	;;
-  mips-*-sysv* | mips-*-riscos*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/riscos.h"'
-	;;
-  mips-sony-bsd*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/news-mips.h"'
-	;;
-  m68*-bull*-sysv*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/dpx2.h"'
-	;;
-  m68*-hp-hpux*)	COREFILE=hpux-core.lo ;;
-  m68*-hp-bsd*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/hp300bsd.h"'
-	;;
-  m68*-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m68klinux.h"'
-	;;
-  m68*-motorola-sysv*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/delta68.h"'
-	;;
-  m68*-sony-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/news.h"'
-	;;
-  m68*-*-netbsd* | m68*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  m68*-apple-aux*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m68kaux.h"'
-	;;
-  m88*-*-sysv4*)
-	;;
-  m88*-motorola-sysv*)
-	COREFILE=ptrace-core.lo
-	;;
-  m88*-*-mach3*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/m88kmach3.h"'
-	;;
-  m88*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  ns32k-pc532-mach)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/pc532mach.h"'
-	;;
-  ns32k-*-netbsd* | ns32k-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  rs6000-*-lynx*)
-	COREFILE=lynx-core.lo
-	;;
-changequote(,)dnl
-  rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*)
-changequote([,])dnl
-        COREFILE=rs6000-core.lo
-	COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
-	;;
-changequote(,)dnl
-  rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
-changequote([,])dnl
-        COREFILE=rs6000-core.lo
-	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
-	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
-	# have c_impl as a member of struct core_dumpx
-	AC_MSG_CHECKING([for c_impl in struct core_dumpx])
-	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
-	    [Define if struct core_dumpx has member c_impl])
-	  AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
-	;;
-  rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
-  rs6000-*-*)		COREFILE=rs6000-core.lo ;;
-  powerpc-*-aix4*)	COREFILE=rs6000-core.lo ;;
-  powerpc-*-aix*)	COREFILE=rs6000-core.lo ;;
-  powerpc-*-beos*)	;;
-  powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
-		        COREFILE='' ;;
-  powerpc-*-netbsd*)	COREFILE=netbsd-core.lo ;;
-  powerpc-*-*bsd*)	COREFILE=netbsd-core.lo ;;
-  s390*-*-*)            COREFILE=trad-core.lo ;;
-  sh*-*-netbsd* | sh*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  sparc-*-netbsd* | sparc*-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  tahoe-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/tahoe.h"'
-	;;
-  vax-*-netbsd* | vax-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  vax-*-ultrix2*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxult2.h"'
-	;;
-  vax-*-ultrix*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxult2.h"'
-	;;
-  vax-*-linux-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxlinux.h"'
-	;;
-  vax-*-*)
-	COREFILE=trad-core.lo
-	TRAD_HEADER='"hosts/vaxbsd.h"'
-	;;
-  x86_64-*-linux*)
-	CORE_HEADER='"hosts/x86-64linux.h"'
-	;;
-  x86_64-*-netbsd* | x86_64-*-openbsd*)
-	COREFILE=netbsd-core.lo
-	;;
-  esac
-
-  case "$COREFILE" in
-  aix386-core.lo)	COREFLAG=-DAIX386_CORE ;;
-  hppabsd-core.lo)	COREFLAG=-DHPPABSD_CORE ;;
-  hpux-core.lo)		COREFLAG=-DHPUX_CORE ;;
-  irix-core.lo)		COREFLAG=-DIRIX_CORE ;;
-  lynx-core.lo)		COREFLAG=-DLYNX_CORE ;;
-  netbsd-core.lo)	COREFLAG=-DNETBSD_CORE ;;
-  osf-core.lo)		COREFLAG=-DOSF_CORE ;;
-  ptrace-core.lo)	COREFLAG=-DPTRACE_CORE ;;
-  rs6000-core.lo)	COREFLAG="$COREFLAG -DAIX_CORE" ;;
-  sco5-core.lo)		COREFLAG="$COREFLAG -DSCO5_CORE" ;;
-  trad-core.lo)		COREFLAG="$COREFLAG -DTRAD_CORE" ;;
-  esac
-
-  # ELF corefile support has several flavors, but all of
-  # them use something called <sys/procfs.h>
-  AC_CHECK_HEADERS(sys/procfs.h)
-  if test "$ac_cv_header_sys_procfs_h" = yes; then
-    BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
-    BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
-    BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
-    BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
-    BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
-    BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
-    BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
-    BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
-    BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
-    BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
-    BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
-    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
-    BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
-  fi
-fi
-AC_SUBST(COREFILE)
-AC_SUBST(COREFLAG)
-if test -n "$CORE_HEADER"; then
-  AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
-    [Name of host specific core header file to include in elf.c.])
-fi
-if test -n "$TRAD_HEADER"; then
-  AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
-    [Name of host specific header file to include in trad-core.c.])
-fi
-
-# Check if linker supports --as-needed and --no-as-needed options
-AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
-	[bfd_cv_ld_as_needed=no
-	if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
-		bfd_cv_ld_as_needed=yes
-	fi
-	])
-
-LT_LIB_M
-
-# When building a shared libbfd, link against the pic version of libiberty
-# so that apps that use libbfd won't need libiberty just to satisfy any
-# libbfd references.
-# We can't do that if a pic libiberty is unavailable since including non-pic
-# code would insert text relocations into libbfd.
-SHARED_LIBADD=
-SHARED_LDFLAGS=
-if test "$enable_shared" = "yes"; then
-changequote(,)dnl
-  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
+  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
 changequote([,])dnl
   if test -n "$x"; then
     SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
@@ -692,8 +381,11 @@ do
     # use one entry per line, even though this leads to long lines.
     aarch64_elf32_be_vec)	 tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
     aarch64_elf32_le_vec)	 tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
-    aarch64_elf64_be_vec)	 tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    aarch64_elf64_le_vec)	 tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_be_vec)	   tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_le_vec)	   tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    aarch64_mach_o_vec)		 tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
     alpha_ecoff_le_vec)		 tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
     alpha_elf64_vec)		 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
     alpha_elf64_fbsd_vec)	 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
@@ -733,6 +425,7 @@ do
     arm_pei_epoc_le_vec)	 tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
     arm_pei_wince_be_vec)	 tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
     arm_pei_wince_le_vec)	 tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
+    arm_mach_o_vec)		 tb="$tb mach-o-arm.lo" ;;
     avr_elf32_vec)		 tb="$tb elf32-avr.lo elf32.lo $elf" ;;
     bfin_elf32_vec)		 tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
     bfin_elf32_fdpic_vec)	 tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
@@ -913,6 +606,9 @@ do
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
     powerpc_pei_le_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
     powerpc_xcoff_vec)		 tb="$tb coff-rs6000.lo $xcoff" ;;
+    pru_elf32_vec)		 tb="$tb elf32-pru.lo elf32.lo $elf" ;;
+    riscv_elf32_vec)		 tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
+    riscv_elf64_vec)		 tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;;
     rl78_elf32_vec)		 tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
     rs6000_xcoff64_vec)		 tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
     rs6000_xcoff64_aix_vec)	 tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
@@ -1091,6 +787,13 @@ else	# all_targets is true
     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
 fi	# all_targets is true
 
+# 64-bit archives need a 64-bit bfd_vma.
+if test "x$want_64_bit_archive" = xtrue; then
+  want64=true
+  AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
+    [Define if 64-bit archives should always be used.])
+fi
+
 case ${host64}-${target64}-${want64} in
   *true*)
     wordsize=64
@@ -1119,12 +822,323 @@ case ${host64}-${target64}-${want64} in
     ;;
 esac
 
+tdefaults=""
+test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
+test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
+test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
+test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
+
 AC_SUBST(wordsize)
 AC_SUBST(bfd64_libs)
 AC_SUBST(all_backends)
 AC_SUBST(bfd_backends)
 AC_SUBST(bfd_machines)
 AC_SUBST(bfd_default_target_size)
+AC_SUBST(tdefaults)
+AC_SUBST(havevecs)
+
+# If we are configured native, pick a core file support file.
+COREFILE=
+COREFLAG=
+CORE_HEADER=
+TRAD_HEADER=
+if test "${target}" = "${host}"; then
+  case "${host}" in
+  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
+	COREFILE=''
+	;;
+  alpha*-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/alphalinux.h"'
+	;;
+  alpha*-*-netbsd* | alpha*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  alpha*-*-*)
+        COREFILE=osf-core.lo
+	;;
+  arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+	COREFILE='' ;;
+  arm-*-netbsd* | arm-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  arm-*-riscix)		COREFILE=trad-core.lo ;;
+  hppa*-*-hpux*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-hiux*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-mpeix*)	COREFILE=hpux-core.lo ;;
+  hppa*-*-bsd*)		COREFILE="hpux-core.lo hppabsd-core.lo"
+			COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+  hppa*-*-netbsd* | hppa*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+
+  i370-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i370linux.h"'
+	;;
+
+changequote(,)dnl
+  i[3-7]86-sequent-bsd*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/symmetry.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-sequent-sysv4*) ;;
+  i[3-7]86-sequent-sysv*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/symmetry.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-bsdi)
+changequote([,])dnl
+	COREFILE=
+	;;
+changequote(,)dnl
+  i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386bsd.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
+changequote([,])dnl
+	COREFILE=''
+	TRAD_HEADER='"hosts/i386bsd.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
+changequote([,])dnl
+	COREFILE=netbsd-core.lo
+	;;
+changequote(,)dnl
+  i[3-7]86-esix-sysv3*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/esix.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-sco3.2v5*)
+changequote([,])dnl
+	COREFILE=sco5-core.lo
+	;;
+changequote(,)dnl
+  i[3-7]86-*-sco* | i[3-7]86-*-isc*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386sco.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-mach3*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386mach3.h"'
+	;;
+changequote(,)dnl
+  i[3-7]86-*-linux-*)
+changequote([,])dnl
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i386linux.h"'
+	case "$enable_targets"-"$want64" in
+	*x86_64-*linux*|*-true)
+	  CORE_HEADER='"hosts/x86-64linux.h"'
+	esac
+	;;
+changequote(,)dnl
+  i[3-7]86-*-isc*)	COREFILE=trad-core.lo ;;
+  i[3-7]86-*-aix*)	COREFILE=aix386-core.lo ;;
+changequote([,])dnl
+  i860-*-mach3* | i860-*-osf1*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/i860mach3.h"'
+	;;
+  mips-*-netbsd* | mips*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  mips-dec-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/decstation.h"'
+	;;
+  mips-sgi-irix4*)	COREFILE=irix-core.lo ;;
+  mips-sgi-irix5*)	COREFILE=irix-core.lo ;;
+  mips-sgi-irix6*)	COREFILE=irix-core.lo ;;
+  mips-*-sysv4*)	;;
+  mips-*-sysv* | mips-*-riscos*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/riscos.h"'
+	;;
+  mips-sony-bsd*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/news-mips.h"'
+	;;
+  m68*-bull*-sysv*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/dpx2.h"'
+	;;
+  m68*-hp-hpux*)	COREFILE=hpux-core.lo ;;
+  m68*-hp-bsd*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/hp300bsd.h"'
+	;;
+  m68*-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m68klinux.h"'
+	;;
+  m68*-motorola-sysv*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/delta68.h"'
+	;;
+  m68*-sony-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/news.h"'
+	;;
+  m68*-*-netbsd* | m68*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  m68*-apple-aux*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m68kaux.h"'
+	;;
+  m88*-*-sysv4*)
+	;;
+  m88*-motorola-sysv*)
+	COREFILE=ptrace-core.lo
+	;;
+  m88*-*-mach3*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/m88kmach3.h"'
+	;;
+  m88*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  ns32k-pc532-mach)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/pc532mach.h"'
+	;;
+  ns32k-*-netbsd* | ns32k-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  rs6000-*-lynx*)
+	COREFILE=lynx-core.lo
+	;;
+changequote(,)dnl
+  rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
+changequote([,])dnl
+        COREFILE=rs6000-core.lo
+	COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
+	;;
+changequote(,)dnl
+  rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
+changequote([,])dnl
+        COREFILE=rs6000-core.lo
+	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
+	# have c_impl as a member of struct core_dumpx
+	AC_MSG_CHECKING([for c_impl in struct core_dumpx])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
+	    [Define if struct core_dumpx has member c_impl])
+	  AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
+	;;
+  rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
+  rs6000-*-*)		COREFILE=rs6000-core.lo ;;
+  powerpc64-*-aix*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-aix4*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-aix*)	COREFILE=rs6000-core.lo ;;
+  powerpc-*-beos*)	;;
+  powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
+		        COREFILE='' ;;
+  powerpc-*-netbsd*)	COREFILE=netbsd-core.lo ;;
+  powerpc-*-*bsd*)	COREFILE=netbsd-core.lo ;;
+  s390*-*-*)            COREFILE=trad-core.lo ;;
+  sh*-*-netbsd* | sh*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  sparc-*-netbsd* | sparc*-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  tahoe-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/tahoe.h"'
+	;;
+  vax-*-netbsd* | vax-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  vax-*-ultrix2*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxult2.h"'
+	;;
+  vax-*-ultrix*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxult2.h"'
+	;;
+  vax-*-linux-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxlinux.h"'
+	;;
+  vax-*-*)
+	COREFILE=trad-core.lo
+	TRAD_HEADER='"hosts/vaxbsd.h"'
+	;;
+  x86_64-*-linux*)
+	CORE_HEADER='"hosts/x86-64linux.h"'
+	;;
+  x86_64-*-netbsd* | x86_64-*-openbsd*)
+	COREFILE=netbsd-core.lo
+	;;
+  esac
+
+  case "$COREFILE" in
+  aix386-core.lo)	COREFLAG=-DAIX386_CORE ;;
+  hppabsd-core.lo)	COREFLAG=-DHPPABSD_CORE ;;
+  hpux-core.lo)		COREFLAG=-DHPUX_CORE ;;
+  irix-core.lo)		COREFLAG=-DIRIX_CORE ;;
+  lynx-core.lo)		COREFLAG=-DLYNX_CORE ;;
+  netbsd-core.lo)	COREFLAG=-DNETBSD_CORE ;;
+  osf-core.lo)		COREFLAG=-DOSF_CORE ;;
+  ptrace-core.lo)	COREFLAG=-DPTRACE_CORE ;;
+  rs6000-core.lo)	COREFLAG="$COREFLAG -DAIX_CORE" ;;
+  sco5-core.lo)		COREFLAG="$COREFLAG -DSCO5_CORE" ;;
+  trad-core.lo)		COREFLAG="$COREFLAG -DTRAD_CORE" ;;
+  esac
+
+  # ELF corefile support has several flavors, but all of
+  # them use something called <sys/procfs.h>
+  AC_CHECK_HEADERS(sys/procfs.h)
+  if test "$ac_cv_header_sys_procfs_h" = yes; then
+    BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
+    BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
+    BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
+    BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
+    BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
+    BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
+    BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
+    BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
+    BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
+    BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
+    BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
+  fi
+fi
+AC_SUBST(COREFILE)
+AC_SUBST(COREFLAG)
+if test -n "$CORE_HEADER"; then
+  AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
+    [Name of host specific core header file to include in elf.c.])
+fi
+if test -n "$TRAD_HEADER"; then
+  AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
+    [Name of host specific header file to include in trad-core.c.])
+fi
 
 if test "$plugins" = "yes"; then
   supports_plugins=1
@@ -1134,7 +1148,7 @@ fi
 AC_SUBST(supports_plugins)
 AC_SUBST(lt_cv_dlopen_libs)
 
-# Determine the host dependant file_ptr a.k.a. off_t type.  In order
+# Determine the host dependent file_ptr a.k.a. off_t type.  In order
 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
 # fseeko, long.  This assumes that sizeof off_t is .ge. sizeof long.
 # Hopefully a reasonable assumption since fseeko et.al. should be
@@ -1155,15 +1169,6 @@ AC_MSG_RESULT($bfd_file_ptr)
 AC_SUBST(bfd_file_ptr)
 AC_SUBST(bfd_ufile_ptr)
 
-
-tdefaults=""
-test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
-test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
-test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
-test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
-AC_SUBST(tdefaults)
-AC_SUBST(havevecs)
-
 dnl AC_CHECK_HEADERS(sys/mman.h)
 AC_FUNC_MMAP
 AC_CHECK_FUNCS(madvise mprotect)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.com ./bfd/configure.com
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.com	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/configure.com	2017-03-06 01:49:05.000000000 +0000
@@ -7,18 +7,18 @@
 $! Written by Klaus K"ampf (kkaempf@rmi.de)
 $! Rewritten by Tristan Gingold (gingold@adacore.com)
 $!
-$!   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+$!   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 $!
 $! This file is free software; you can redistribute it and/or modify
 $! it under the terms of the GNU General Public License as published by
 $! the Free Software Foundation; either version 3 of the License, or
 $! (at your option) any later version.
-$! 
+$!
 $! This program is distributed in the hope that it will be useful,
 $! but WITHOUT ANY WARRANTY; without even the implied warranty of
 $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 $! GNU General Public License for more details.
-$! 
+$!
 $! You should have received a copy of the GNU General Public License
 $! along with this program; see the file COPYING3.  If not see
 $! <http://www.gnu.org/licenses/>.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.host ./bfd/configure.host
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/configure.host	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/configure.host	2017-03-06 01:49:05.000000000 +0000
@@ -1,16 +1,16 @@
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/corefile.c ./bfd/corefile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/corefile.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/corefile.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Core file generic interface routines for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-aarch64.c ./bfd/cpu-aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-aarch64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-aarch64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for AArch64.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -100,16 +100,16 @@ scan (const struct bfd_arch_info *info, 
   return FALSE;
 }
 
-#define N(NUMBER, PRINT, DEFAULT, NEXT)				\
-  { 64, 64, 8, bfd_arch_aarch64, NUMBER,			\
+#define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT)		\
+  { WORDSIZE, WORDSIZE, 8, bfd_arch_aarch64, NUMBER,		\
     "aarch64", PRINT, 4, DEFAULT, compatible, scan,		\
     bfd_arch_default_fill, NEXT }
 
 static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
-  N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", FALSE, NULL);
+  N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
 
 const bfd_arch_info_type bfd_aarch64_arch =
-  N (0, "aarch64", TRUE, &bfd_aarch64_arch_ilp32);
+  N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32);
 
 bfd_boolean
 bfd_is_aarch64_special_symbol_name (const char *name, int type)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-alpha.c ./bfd/cpu-alpha.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-alpha.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-alpha.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Alpha architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-arc.c ./bfd/cpu-arc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-arc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-arc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the ARC processor
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -42,30 +42,15 @@
 
 static const bfd_arch_info_type arch_info_struct[] =
 {
-  ARC ( bfd_mach_arc_5, "arc5", FALSE, &arch_info_struct[1] ),
-  ARC ( bfd_mach_arc_5, "base", FALSE, &arch_info_struct[2] ),
-  ARC ( bfd_mach_arc_6, "arc6", FALSE, &arch_info_struct[3] ),
-  ARC ( bfd_mach_arc_7, "arc7", FALSE, &arch_info_struct[4] ),
-  ARC ( bfd_mach_arc_8, "arc8", FALSE, NULL ),
+  ARC (bfd_mach_arc_arc600, "ARC600", FALSE, &arch_info_struct[1]),
+  ARC (bfd_mach_arc_arc600, "A6"    , FALSE, &arch_info_struct[2]),
+  ARC (bfd_mach_arc_arc601, "ARC601", FALSE, &arch_info_struct[3]),
+  ARC (bfd_mach_arc_arc700, "ARC700", FALSE, &arch_info_struct[4]),
+  ARC (bfd_mach_arc_arc700, "A7",     FALSE, &arch_info_struct[5]),
+  ARC (bfd_mach_arc_arcv2,  "ARCv2",  FALSE, &arch_info_struct[6]),
+  ARC (bfd_mach_arc_arcv2,  "EM",     FALSE, &arch_info_struct[7]),
+  ARC (bfd_mach_arc_arcv2,  "HS",     FALSE, NULL),
 };
 
 const bfd_arch_info_type bfd_arc_arch =
-  ARC ( bfd_mach_arc_6, "arc", TRUE, &arch_info_struct[0] );
-
-/* Utility routines.  */
-
-/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
-   Returns -1 if not found.  */
-
-int arc_get_mach (char *);
-
-int
-arc_get_mach (char *name)
-{
-  const bfd_arch_info_type *p;
-
-  for (p = &bfd_arc_arch; p != NULL; p = p->next)
-    if (strcmp (name, p->printable_name) == 0)
-      return p->mach;
-  return -1;
-}
+  ARC (bfd_mach_arc_arc600, "ARC600", TRUE, &arch_info_struct[0]);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-arm.c ./bfd/cpu-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the ARM processor
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -93,7 +93,8 @@ processors[] =
   { bfd_mach_arm_XScale, "xscale" },
   { bfd_mach_arm_ep9312, "ep9312" },
   { bfd_mach_arm_iWMMXt, "iwmmxt" },
-  { bfd_mach_arm_iWMMXt2, "iwmmxt2" }
+  { bfd_mach_arm_iWMMXt2, "iwmmxt2" },
+  { bfd_mach_arm_unknown, "arm_any" }
 };
 
 static bfd_boolean
@@ -128,19 +129,20 @@ scan (const struct bfd_arch_info *info, 
 
 static const bfd_arch_info_type arch_info_struct[] =
 {
-  N (bfd_mach_arm_2,      "armv2",   FALSE, & arch_info_struct[1]),
-  N (bfd_mach_arm_2a,     "armv2a",  FALSE, & arch_info_struct[2]),
-  N (bfd_mach_arm_3,      "armv3",   FALSE, & arch_info_struct[3]),
-  N (bfd_mach_arm_3M,     "armv3m",  FALSE, & arch_info_struct[4]),
-  N (bfd_mach_arm_4,      "armv4",   FALSE, & arch_info_struct[5]),
-  N (bfd_mach_arm_4T,     "armv4t",  FALSE, & arch_info_struct[6]),
-  N (bfd_mach_arm_5,      "armv5",   FALSE, & arch_info_struct[7]),
-  N (bfd_mach_arm_5T,     "armv5t",  FALSE, & arch_info_struct[8]),
-  N (bfd_mach_arm_5TE,    "armv5te", FALSE, & arch_info_struct[9]),
-  N (bfd_mach_arm_XScale, "xscale",  FALSE, & arch_info_struct[10]),
-  N (bfd_mach_arm_ep9312, "ep9312",  FALSE, & arch_info_struct[11]),
-  N (bfd_mach_arm_iWMMXt, "iwmmxt",  FALSE, & arch_info_struct[12]),
-  N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, NULL)
+  N (bfd_mach_arm_2,       "armv2",   FALSE, & arch_info_struct[1]),
+  N (bfd_mach_arm_2a,      "armv2a",  FALSE, & arch_info_struct[2]),
+  N (bfd_mach_arm_3,       "armv3",   FALSE, & arch_info_struct[3]),
+  N (bfd_mach_arm_3M,      "armv3m",  FALSE, & arch_info_struct[4]),
+  N (bfd_mach_arm_4,       "armv4",   FALSE, & arch_info_struct[5]),
+  N (bfd_mach_arm_4T,      "armv4t",  FALSE, & arch_info_struct[6]),
+  N (bfd_mach_arm_5,       "armv5",   FALSE, & arch_info_struct[7]),
+  N (bfd_mach_arm_5T,      "armv5t",  FALSE, & arch_info_struct[8]),
+  N (bfd_mach_arm_5TE,     "armv5te", FALSE, & arch_info_struct[9]),
+  N (bfd_mach_arm_XScale,  "xscale",  FALSE, & arch_info_struct[10]),
+  N (bfd_mach_arm_ep9312,  "ep9312",  FALSE, & arch_info_struct[11]),
+  N (bfd_mach_arm_iWMMXt,  "iwmmxt",  FALSE, & arch_info_struct[12]),
+  N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]),
+  N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL)
 };
 
 const bfd_arch_info_type bfd_arm_arch =
@@ -186,6 +188,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *
 	       || out == bfd_mach_arm_iWMMXt
 	       || out == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
 error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
 			  ibfd, obfd);
@@ -197,6 +200,7 @@ error: %B is compiled for the EP9312, wh
 	       || in == bfd_mach_arm_iWMMXt
 	       || in == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
 error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
 			  obfd, ibfd);
@@ -329,7 +333,8 @@ bfd_arm_update_notes (bfd *abfd, const c
       if (! bfd_set_section_contents (abfd, arm_arch_section, buffer,
 				      (file_ptr) 0, buffer_size))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext: c-format */
 	    (_("warning: unable to update contents of %s section in %s"),
 	     note_section, bfd_get_filename (abfd));
 	  goto FAIL;
@@ -365,7 +370,8 @@ architectures[] =
   { "XScale",  bfd_mach_arm_XScale },
   { "ep9312",  bfd_mach_arm_ep9312 },
   { "iWMMXt",  bfd_mach_arm_iWMMXt },
-  { "iWMMXt2", bfd_mach_arm_iWMMXt2 }
+  { "iWMMXt2", bfd_mach_arm_iWMMXt2 },
+  { "arm_any", bfd_mach_arm_unknown }
 };
 
 /* Extract the machine number stored in a note section.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-avr.c ./bfd/cpu-avr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-avr.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-avr.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the AVR architecture.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -141,19 +141,19 @@ static const bfd_arch_info_type arch_inf
 
   /* Xmega 2.  */
   N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]),
-  
+
   /* Xmega 3.  */
   N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]),
-  
+
   /* Xmega 4.  */
   N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]),
-  
+
   /* Xmega 5.  */
   N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]),
-  
+
   /* Xmega 6.  */
   N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
-  
+
   /* Xmega 7.  */
   N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-bfin.c ./bfd/cpu-bfin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-bfin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-bfin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* BFD Support for the ADI Blackfin processor.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cr16.c ./bfd/cpu-cr16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cr16.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-cr16.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the CR16 processor.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
    Written by M R Swami Reddy
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cr16c.c ./bfd/cpu-cr16c.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cr16c.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-cr16c.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the CR16C processor.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cris.c ./bfd/cpu-cris.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-cris.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-cris.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Axis CRIS architecture.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-crx.c ./bfd/cpu-crx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-crx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-crx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the CRX processor.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-d10v.c ./bfd/cpu-d10v.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-d10v.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-d10v.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the D10V processor
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-d30v.c ./bfd/cpu-d30v.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-d30v.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-d30v.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Mitsubishi D30V processor
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-dlx.c ./bfd/cpu-dlx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-dlx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-dlx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the DLX Microprocessor architecture.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Hacked by Kuang Hwa Lin <kuang@sbcglobal.net>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-epiphany.c ./bfd/cpu-epiphany.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-epiphany.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-epiphany.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Adapteva EPIPHANY processor.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by Embecosm on behalf of Adapteva, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-fr30.c ./bfd/cpu-fr30.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-fr30.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-fr30.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the FR30 processor.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-frv.c ./bfd/cpu-frv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-frv.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-frv.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the FRV processor.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ft32.c ./bfd/cpu-ft32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ft32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-ft32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the ft32 processor.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Written by FTDI (support@ftdichip.com)
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-h8300.c ./bfd/cpu-h8300.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-h8300.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-h8300.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the Renesas H8/300 architecture.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-h8500.c ./bfd/cpu-h8500.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-h8500.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-h8500.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the H8/500 architecture.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-hppa.c ./bfd/cpu-hppa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-hppa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-hppa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the HP Precision Architecture architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i370.c ./bfd/cpu-i370.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i370.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-i370.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD i370 CPU definition
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas <linas@linas.org> in 1998, 1999
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i386.c ./bfd/cpu-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Intel 386 architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i860.c ./bfd/cpu-i860.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i860.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-i860.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Intel 860 architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Created mostly by substituting "860" for "386" in cpu-i386.c
    Harry Dolan <dolan@ssd.intel.com>, October 1995
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i960.c ./bfd/cpu-i960.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-i960.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-i960.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the i960 architecture.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ia64.c ./bfd/cpu-ia64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ia64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-ia64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the ia64 architecture.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ia64-opc.c ./bfd/cpu-ia64-opc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ia64-opc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-ia64-opc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-iamcu.c ./bfd/cpu-iamcu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-iamcu.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-iamcu.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Intel MCU architecture.
-   Copyright (C) 2015 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ip2k.c ./bfd/cpu-ip2k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ip2k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-ip2k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Scenix IP2xxx processor.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-iq2000.c ./bfd/cpu-iq2000.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-iq2000.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-iq2000.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Vitesse IQ2000 processor.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-k1om.c ./bfd/cpu-k1om.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-k1om.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-k1om.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Intel K1OM architecture.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-l1om.c ./bfd/cpu-l1om.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-l1om.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-l1om.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Intel L1OM architecture.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-lm32.c ./bfd/cpu-lm32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-lm32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-lm32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Lattice Mico32 architecture.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m10200.c ./bfd/cpu-m10200.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m10200.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m10200.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Matsushita 10200 processor
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m10300.c ./bfd/cpu-m10300.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m10300.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m10300.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Matsushita 10300 processor
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m32c.c ./bfd/cpu-m32c.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m32c.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m32c.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the M16C/M32C processors.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m32r.c ./bfd/cpu-m32r.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m32r.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m32r.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the M32R processor.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68hc11.c ./bfd/cpu-m68hc11.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68hc11.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m68hc11.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Motorola 68HC11 processor
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68hc12.c ./bfd/cpu-m68hc12.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68hc12.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m68hc12.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Motorola 68HC12 processor
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68k.c ./bfd/cpu-m68k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m68k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m68k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for architectures.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -259,7 +259,7 @@ bfd_m68k_compatible (const bfd_arch_info
 	  if (!cpu32_fido_mix_warning)
 	    {
 	      cpu32_fido_mix_warning = 1;
-	      (*_bfd_error_handler) ("warning: linking CPU32 objects with fido objects");
+	      _bfd_error_handler ("warning: linking CPU32 objects with fido objects");
 	    }
 	  return bfd_lookup_arch (a->arch,
 				  bfd_m68k_features_to_mach (fido_a | m68881));
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m88k.c ./bfd/cpu-m88k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m88k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m88k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for m88k support
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m9s12x.c ./bfd/cpu-m9s12x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m9s12x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m9s12x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Freescale 9S12X processor
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m9s12xg.c ./bfd/cpu-m9s12xg.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-m9s12xg.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-m9s12xg.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Freescale 9S12-XGATE co-processor
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mcore.c ./bfd/cpu-mcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mcore.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-mcore.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for Motorola's MCore architecture
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mep.c ./bfd/cpu-mep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mep.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-mep.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Toshiba Media Engine Processor.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-metag.c ./bfd/cpu-metag.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-metag.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-metag.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Imagination Technologies Meta processor.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Imagination Technologies Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-microblaze.c ./bfd/cpu-microblaze.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-microblaze.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-microblaze.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* BFD Xilinx MicroBlaze architecture definition
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mips.c ./bfd/cpu-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for mips support
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mmix.c ./bfd/cpu-mmix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mmix.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-mmix.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for MMIX.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Hans-Peter Nilsson (hp@bitrange.com)
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-moxie.c ./bfd/cpu-moxie.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-moxie.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-moxie.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the moxie processor.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Written by Anthony Green
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-msp430.c ./bfd/cpu-msp430.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-msp430.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-msp430.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the MSP architecture.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Dmitry Diky <diwil@mail.ru>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mt.c ./bfd/cpu-mt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-mt.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-mt.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Morpho Technologies MT processor.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-nds32.c ./bfd/cpu-nds32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-nds32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-nds32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the NDS32 processor
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Andes Technology Corporation.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-nios2.c ./bfd/cpu-nios2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-nios2.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-nios2.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Altera Nios II processor.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Nigel Gray (ngray@altera.com).
    Contributed by Mentor Graphics, Inc.
 
@@ -70,5 +70,5 @@ static const bfd_arch_info_type arch_inf
   N (32, 32, bfd_mach_nios2r2, "nios2:r2", FALSE, NULL),
 };
 
-const bfd_arch_info_type bfd_nios2_arch = 
+const bfd_arch_info_type bfd_nios2_arch =
   N (32, 32, 0, "nios2", TRUE, NIOS2R1_NEXT);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ns32k.c ./bfd/cpu-ns32k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-ns32k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-ns32k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the ns32k architecture.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Almost totally rewritten by Ian Dall from initial work
    by Andrew Cagney.
 
@@ -106,8 +106,10 @@ _bfd_ns32k_get_immediate (bfd_byte *buff
     case 4:
       value = (value << 8) | (*buffer++ & 0xff);
       value = (value << 8) | (*buffer++ & 0xff);
+      /* Fall through.  */
     case 2:
       value = (value << 8) | (*buffer++ & 0xff);
+      /* Fall through.  */
     case 1:
       value = (value << 8) | (*buffer++ & 0xff);
       break;
@@ -126,8 +128,10 @@ _bfd_ns32k_put_immediate (bfd_vma value,
     case 4:
       *buffer-- = (value & 0xff); value >>= 8;
       *buffer-- = (value & 0xff); value >>= 8;
+      /* Fall through.  */
     case 2:
       *buffer-- = (value & 0xff); value >>= 8;
+      /* Fall through.  */
     case 1:
       *buffer-- = (value & 0xff); value >>= 8;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-or1k.c ./bfd/cpu-or1k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-or1k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-or1k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the OpenRISC 1000 architecture.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed for OR32 by Ivan Guzvinec  <ivang@opencores.org>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pdp11.c ./bfd/cpu-pdp11.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pdp11.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-pdp11.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PDP-11 support.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pj.c ./bfd/cpu-pj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pj.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-pj.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the Pico Java architecture.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Transmeta. sac@pobox.com
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-plugin.c ./bfd/cpu-plugin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-plugin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-plugin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for plugins.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-powerpc.c ./bfd/cpu-powerpc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-powerpc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-powerpc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD PowerPC CPU definition
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -35,6 +35,10 @@ powerpc_compatible (const bfd_arch_info_
     default:
       return NULL;
     case bfd_arch_powerpc:
+      if (a->mach == bfd_mach_ppc_vle && b->bits_per_word == 32)
+	return a;
+      if (b->mach == bfd_mach_ppc_vle && a->bits_per_word == 32)
+	return b;
       return bfd_default_compatible (a, b);
     case bfd_arch_rs6000:
       if (b->mach == bfd_mach_rs6k)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pru.c ./bfd/cpu-pru.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-pru.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/cpu-pru.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,43 @@
+/* BFD support for the TI PRU microprocessor.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
+   Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT)		\
+  {							\
+    BITS_WORD, /*  bits in a word */			\
+    BITS_ADDR, /* bits in an address */			\
+    8,	/* 8 bits in a byte */				\
+    bfd_arch_pru,					\
+    NUMBER,						\
+    "pru",						\
+    PRINT,						\
+    3,							\
+    DEFAULT,						\
+    bfd_default_compatible,				\
+    bfd_default_scan,					\
+    bfd_arch_default_fill,			       	\
+    NEXT						\
+  }
+
+const bfd_arch_info_type bfd_pru_arch = N (32, 32, 0, "pru", TRUE, NULL);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-riscv.c ./bfd/cpu-riscv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-riscv.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/cpu-riscv.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,79 @@
+/* BFD backend for RISC-V
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   Contributed by Andrew Waterman (andrew@sifive.com).
+   Based on MIPS target.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING3. If not,
+   see <http://www.gnu.org/licenses/>.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+/* This routine is provided two arch_infos and returns an arch_info
+   that is compatible with both, or NULL if none exists.  */
+
+static const bfd_arch_info_type *
+riscv_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
+{
+  if (a->arch != b->arch)
+    return NULL;
+
+  /* Machine compatibility is checked in
+     _bfd_riscv_elf_merge_private_bfd_data.  */
+
+  return a;
+}
+
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT)	\
+  {								\
+    BITS_WORD, /*  bits in a word */				\
+    BITS_ADDR, /* bits in an address */				\
+    8,	/* 8 bits in a byte */					\
+    bfd_arch_riscv,						\
+    NUMBER,							\
+    "riscv",							\
+    PRINT,							\
+    3,								\
+    DEFAULT,							\
+    riscv_compatible,						\
+    bfd_default_scan,						\
+    bfd_arch_default_fill,					\
+    NEXT,							\
+  }
+
+/* This enum must be kept in the same order as arch_info_struct.  */
+enum
+{
+  I_riscv64,
+  I_riscv32
+};
+
+#define NN(index) (&arch_info_struct[(index) + 1])
+
+/* This array must be kept in the same order as the anonymous enum above,
+   and each entry except the last should end with NN (my enum value).  */
+static const bfd_arch_info_type arch_info_struct[] =
+{
+  N (64, 64, bfd_mach_riscv64, "riscv:rv64", FALSE, NN (I_riscv64)),
+  N (32, 32, bfd_mach_riscv32, "riscv:rv32", FALSE, 0)
+};
+
+/* The default architecture is riscv:rv64.  */
+
+const bfd_arch_info_type bfd_riscv_arch =
+  N (64, 64, 0, "riscv", TRUE, &arch_info_struct[0]);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rl78.c ./bfd/cpu-rl78.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rl78.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-rl78.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the RL78 processor.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rs6000.c ./bfd/cpu-rs6000.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rs6000.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-rs6000.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for rs6000 support
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Mimi Phuong-Thao Vo of IBM
    and John Gilmore of Cygnus Support.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rx.c ./bfd/cpu-rx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-rx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-rx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the RX processor.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-s390.c ./bfd/cpu-s390.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-s390.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-s390.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the s390 processor.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-score.c ./bfd/cpu-score.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-score.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-score.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the score processor
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-sh.c ./bfd/cpu-sh.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-sh.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-sh.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the Renesas / SuperH SH architecture.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -496,50 +496,3 @@ sh_get_bfd_mach_from_arch_set (unsigned 
 
   return result;
 }
-
-
-/* Merge the architecture type of two BFD files, such that the
-   resultant architecture supports all the features required
-   by the two input BFDs.
-   If the input BFDs are multually incompatible - i.e. one uses
-   DSP while the other uses FPU - or there is no known architecture
-   that fits the requirements then an error is emitted.  */
-
-bfd_boolean
-sh_merge_bfd_arch (bfd *ibfd, bfd *obfd)
-{
-  unsigned int old_arch, new_arch, merged_arch;
-
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
-    return FALSE;
-
-  old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd));
-  new_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (ibfd));
-
-  merged_arch = SH_MERGE_ARCH_SET (old_arch, new_arch);
-
-  if (!SH_VALID_CO_ARCH_SET (merged_arch))
-    {
-      (*_bfd_error_handler)
-	("%B: uses %s instructions while previous modules use %s instructions",
-	 ibfd,
-	 SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point",
-	 SH_ARCH_SET_HAS_DSP (new_arch) ? "floating point" : "dsp");
-      bfd_set_error (bfd_error_bad_value);
-      return FALSE;
-    }
-  else if (!SH_VALID_ARCH_SET (merged_arch))
-    {
-      (*_bfd_error_handler)
-	("internal error: merge of architecture '%s' with architecture '%s' produced unknown architecture\n",
-	 bfd_printable_name (obfd),
-	 bfd_printable_name (ibfd));
-      bfd_set_error (bfd_error_bad_value);
-      return FALSE;
-    }
-
-  bfd_default_set_arch_mach (obfd, bfd_arch_sh,
-			     sh_get_bfd_mach_from_arch_set (merged_arch));
-
-  return TRUE;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-sparc.c ./bfd/cpu-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the SPARC architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -157,6 +157,156 @@ static const bfd_arch_info_type arch_inf
     bfd_default_compatible,
     bfd_default_scan,
     bfd_arch_default_fill,
+    &arch_info_struct[9],
+  },
+  {
+    32,	/* bits in a word */
+    32,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8plusc,
+    "sparc",
+    "sparc:v8plusc",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[10],
+  },
+  {
+    64,	/* bits in a word */
+    64,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9c,
+    "sparc",
+    "sparc:v9c",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[11],
+  },
+  {
+    32,	/* bits in a word */
+    32,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8plusd,
+    "sparc",
+    "sparc:v8plusd",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[12],
+  },
+  {
+    64,	/* bits in a word */
+    64,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9d,
+    "sparc",
+    "sparc:v9d",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[13],
+  },
+  {
+    32,	/* bits in a word */
+    32,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8pluse,
+    "sparc",
+    "sparc:v8pluse",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[14],
+  },
+  {
+    64,	/* bits in a word */
+    64,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9e,
+    "sparc",
+    "sparc:v9e",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[15],
+  },
+  {
+    32,	/* bits in a word */
+    32,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8plusv,
+    "sparc",
+    "sparc:v8plusv",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[16],
+  },
+  {
+    64,	/* bits in a word */
+    64,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9v,
+    "sparc",
+    "sparc:v9v",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[17],
+  },
+  {
+    32,	/* bits in a word */
+    32,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8plusm,
+    "sparc",
+    "sparc:v8plusm",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
+    &arch_info_struct[18],
+  },
+  {
+    64,	/* bits in a word */
+    64,	/* bits in an address */
+    8,	/* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9m,
+    "sparc",
+    "sparc:v9m",
+    3,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    bfd_arch_default_fill,
     0,
   }
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-spu.c ./bfd/cpu-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-spu.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-spu.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic30.c ./bfd/cpu-tic30.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic30.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tic30.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Texas Instruments TMS320C30 architecture.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic4x.c ./bfd/cpu-tic4x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic4x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tic4x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for TMS320C[34]x support
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic54x.c ./bfd/cpu-tic54x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic54x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tic54x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Texas Instruments TMS320C54X architecture.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic6x.c ./bfd/cpu-tic6x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic6x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tic6x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the TI C6X processor.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic80.c ./bfd/cpu-tic80.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tic80.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tic80.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for TI TMS320C80 (MVP) support
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus support (fnf@cygnus.com)
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tilegx.c ./bfd/cpu-tilegx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tilegx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tilegx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the TILE-Gx processor.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tilepro.c ./bfd/cpu-tilepro.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-tilepro.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-tilepro.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the TILEPro processor.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-v850.c ./bfd/cpu-v850.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-v850.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-v850.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the NEC V850 processor
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -24,7 +24,7 @@
 #include "safe-ctype.h"
 
 #define N(number, print, default, next)  \
-{  32, 32, 8, bfd_arch_v850, number, "v850", print " (using old gcc ABI)", 2, default, \
+{  32, 32, 8, bfd_arch_v850, number, "v850", print ":old-gcc-abi", 2, default, \
    bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
 
 #define NEXT NULL
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-v850_rh850.c ./bfd/cpu-v850_rh850.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-v850_rh850.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-v850_rh850.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the NEC V850 processor with the RH850 ABI.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -34,8 +34,9 @@ static const bfd_arch_info_type arch_inf
   R (bfd_mach_v850e2v3, "v850e2v3", 	FALSE, & arch_info_struct[3]),
   R (bfd_mach_v850e2,   "v850e2", 	FALSE, & arch_info_struct[4]),
   R (bfd_mach_v850e1,   "v850e1",  	FALSE, & arch_info_struct[5]),
-  R (bfd_mach_v850e,    "v850e",   	FALSE, NULL)
+  R (bfd_mach_v850e,    "v850e",   	FALSE, & arch_info_struct[6]),
+  R (bfd_mach_v850,     "v850-rh850",   FALSE, NULL) /* For backwards compatibility.  */
 };
 
 const bfd_arch_info_type bfd_v850_rh850_arch =
-  R (bfd_mach_v850,     "v850-rh850",   TRUE,  & arch_info_struct[0]);
+  R (bfd_mach_v850,     "v850:rh850",   TRUE,  & arch_info_struct[0]);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-vax.c ./bfd/cpu-vax.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-vax.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-vax.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for vax support
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-visium.c ./bfd/cpu-visium.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-visium.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-visium.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* BFD support for the Visium processor.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-w65.c ./bfd/cpu-w65.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-w65.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-w65.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the WDC 65816 architecture.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-we32k.c ./bfd/cpu-we32k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-we32k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-we32k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for we32k support
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Contributed by Brendan Kehoe (brendan@cs.widener.edu).
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xc16x.c ./bfd/cpu-xc16x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xc16x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-xc16x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Infineon XC16X Microcontroller.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by KPIT Cummins Infosystems
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xgate.c ./bfd/cpu-xgate.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xgate.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-xgate.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Freescale XGATE processor
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xstormy16.c ./bfd/cpu-xstormy16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xstormy16.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-xstormy16.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the XSTORMY16 processor.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xtensa.c ./bfd/cpu-xtensa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-xtensa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-xtensa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for the Xtensa processor.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-z80.c ./bfd/cpu-z80.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-z80.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-z80.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the Z80 architecture.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-z8k.c ./bfd/cpu-z8k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/cpu-z8k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/cpu-z8k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD library support routines for the Z800n architecture.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/demo64.c ./bfd/demo64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/demo64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/demo64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for demonstration 64-bit a.out binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/development.sh ./bfd/development.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/development.sh	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/development.sh	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/archures.texi ./bfd/doc/archures.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/archures.texi	2015-07-06 01:49:56.000000000 +0000
+++ ./bfd/doc/archures.texi	2017-03-06 01:51:10.000000000 +0000
@@ -104,13 +104,29 @@ enum bfd_architecture
 #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
 #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
 #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
+#define bfd_mach_sparc_v8plusc         11 /* with UA2005 and T1 add'ns.  */
+#define bfd_mach_sparc_v9c             12 /* with UA2005 and T1 add'ns.  */
+#define bfd_mach_sparc_v8plusd         13 /* with UA2007 and T3 add'ns.  */
+#define bfd_mach_sparc_v9d             14 /* with UA2007 and T3 add'ns.  */
+#define bfd_mach_sparc_v8pluse         15 /* with OSA2001 and T4 add'ns (no IMA).  */
+#define bfd_mach_sparc_v9e             16 /* with OSA2001 and T4 add'ns (no IMA).  */
+#define bfd_mach_sparc_v8plusv         17 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+#define bfd_mach_sparc_v9v             18 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+#define bfd_mach_sparc_v8plusm         19 /* with OSA2015 and M7 add'ns.  */
+#define bfd_mach_sparc_v9m             20 /* with OSA2015 and M7 add'ns.  */
 /* Nonzero if MACH has the v9 instruction set.  */
 #define bfd_mach_sparc_v9_p(mach) \
-  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m \
    && (mach) != bfd_mach_sparc_sparclite_le)
 /* Nonzero if MACH is a 64 bit sparc architecture.  */
 #define bfd_mach_sparc_64bit_p(mach) \
-  ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+  ((mach) >= bfd_mach_sparc_v9 \
+   && (mach) != bfd_mach_sparc_v8plusb \
+   && (mach) != bfd_mach_sparc_v8plusc \
+   && (mach) != bfd_mach_sparc_v8plusd \
+   && (mach) != bfd_mach_sparc_v8pluse \
+   && (mach) != bfd_mach_sparc_v8plusv \
+   && (mach) != bfd_mach_sparc_v8plusm)
   bfd_arch_spu,       /* PowerPC SPU */
 #define bfd_mach_spu           256
   bfd_arch_mips,      /* MIPS Rxxxx */
@@ -320,10 +336,12 @@ enum bfd_architecture
 #define bfd_mach_v850e2v3      0x45325633
 #define bfd_mach_v850e3v5      0x45335635 /* ('E'|'3'|'V'|'5') */
   bfd_arch_arc,       /* ARC Cores */
-#define bfd_mach_arc_5         5
-#define bfd_mach_arc_6         6
-#define bfd_mach_arc_7         7
-#define bfd_mach_arc_8         8
+#define bfd_mach_arc_a4        0
+#define bfd_mach_arc_a5        1
+#define bfd_mach_arc_arc600    2
+#define bfd_mach_arc_arc601    4
+#define bfd_mach_arc_arc700    3
+#define bfd_mach_arc_arcv2     5
  bfd_arch_m32c,     /* Renesas M16C/M32C.  */
 #define bfd_mach_m16c        0x75
 #define bfd_mach_m32c        0x78
@@ -406,6 +424,9 @@ enum bfd_architecture
 #define bfd_mach_cris_v0_v10   255
 #define bfd_mach_cris_v32      32
 #define bfd_mach_cris_v10_v32  1032
+  bfd_arch_riscv,
+#define bfd_mach_riscv32       132
+#define bfd_mach_riscv64       164
   bfd_arch_rl78,
 #define bfd_mach_rl78  0x75
   bfd_arch_rx,        /* Renesas RX.  */
@@ -474,6 +495,8 @@ enum bfd_architecture
 #define bfd_mach_nios2r2       2
   bfd_arch_visium,     /* Visium */
 #define bfd_mach_visium        1
+  bfd_arch_pru,        /* PRU */
+#define bfd_mach_pru   0
   bfd_arch_last
   @};
 @end example
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfd.info ./bfd/doc/bfd.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfd.info	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/bfd.info	2017-03-06 01:51:18.000000000 +0000
@@ -1,13 +1,8 @@
-This is bfd.info, produced by makeinfo version 4.13 from bfd.texinfo.
+This is bfd.info, produced by makeinfo version 6.3 from bfd.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Bfd: (bfd).                   The Binary File Descriptor library.
-END-INFO-DIR-ENTRY
+This file documents the BFD library.
 
-   This file documents the BFD library.
-
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -24,13 +19,17 @@ included in the section entitled "GNU Fr
    (b) The FSF's Back-Cover Text is:
 
    You have freedom to copy and modify this GNU Manual, like GNU
-software.  Copies published by the Free Software Foundation raise
-funds for GNU development.
+software.  Copies published by the Free Software Foundation raise funds
+for GNU development.
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Bfd: (bfd).                   The Binary File Descriptor library.
+END-INFO-DIR-ENTRY
 
 
 File: bfd.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
-   This file documents the binary file descriptor library libbfd.
+This file documents the binary file descriptor library libbfd.
 
 * Menu:
 
@@ -53,15 +52,14 @@ adding it to the library.
 
    BFD is split into two parts: the front end, and the back ends (one
 for each object file format).
-   * The front end of BFD provides the interface to the user. It manages
-     memory and various canonical data structures. The front end also
-     decides which back end to use and when to call back end routines.
-
-   * The back ends provide BFD its view of the real world. Each back
+   * The front end of BFD provides the interface to the user.  It
+     manages memory and various canonical data structures.  The front
+     end also decides which back end to use and when to call back end
+     routines.
+   * The back ends provide BFD its view of the real world.  Each back
      end provides a set of calls which the BFD front end can use to
-     maintain its canonical form. The back ends also may keep around
+     maintain its canonical form.  The back ends also may keep around
      information for their own use, for greater efficiency.
-
 * Menu:
 
 * History::			History
@@ -81,16 +79,16 @@ was contracted to provide the required f
 
    The name came from a conversation David Wallace was having with
 Richard Stallman about the library: RMS said that it would be quite
-hard--David said "BFD".  Stallman was right, but the name stuck.
+hard--David said "BFD". Stallman was right, but the name stuck.
 
    At the same time, Ready Systems wanted much the same thing, but for
 different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k
 coff.
 
    BFD was first implemented by members of Cygnus Support; Steve
-Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K.
-Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace
-(`gumby@cygnus.com').
+Chamberlain ('sac@cygnus.com'), John Gilmore ('gnu@cygnus.com'), K.
+Richard Pixley ('rich@cygnus.com') and David Henkel-Wallace
+('gumby@cygnus.com').
 
 
 File: bfd.info,  Node: How It Works,  Next: What BFD Version 2 Can Do,  Prev: History,  Up: Overview
@@ -98,23 +96,22 @@ File: bfd.info,  Node: How It Works,  Ne
 1.2 How To Use BFD
 ==================
 
-To use the library, include `bfd.h' and link with `libbfd.a'.
+To use the library, include 'bfd.h' and link with 'libbfd.a'.
 
    BFD provides a common interface to the parts of an object file for a
 calling application.
 
    When an application successfully opens a target file (object,
 archive, or whatever), a pointer to an internal structure is returned.
-This pointer points to a structure called `bfd', described in `bfd.h'.
-Our convention is to call this pointer a BFD, and instances of it
-within code `abfd'.  All operations on the target object file are
-applied as methods to the BFD.  The mapping is defined within `bfd.h'
-in a set of macros, all beginning with `bfd_' to reduce namespace
-pollution.
+This pointer points to a structure called 'bfd', described in 'bfd.h'.
+Our convention is to call this pointer a BFD, and instances of it within
+code 'abfd'.  All operations on the target object file are applied as
+methods to the BFD. The mapping is defined within 'bfd.h' in a set of
+macros, all beginning with 'bfd_' to reduce namespace pollution.
 
    For example, this sequence does what you would probably expect:
 return the number of sections in an object file attached to a BFD
-`abfd'.
+'abfd'.
 
      #include "bfd.h"
 
@@ -127,15 +124,12 @@ return the number of sections in an obje
    The abstraction used within BFD is that an object file has:
 
    * a header,
-
    * a number of sections containing raw data (*note Sections::),
-
    * a set of relocations (*note Relocations::), and
-
    * some symbol information (*note Symbols::).
-   Also, BFDs opened for archives have the additional attribute of an
-index and contain subordinate BFDs. This approach is fine for a.out and
-coff, but loses efficiency when applied to formats such as S-records and
+Also, BFDs opened for archives have the additional attribute of an index
+and contain subordinate BFDs.  This approach is fine for a.out and coff,
+but loses efficiency when applied to formats such as S-records and
 IEEE-695.
 
 
@@ -149,18 +143,18 @@ the format of the input object file.  Th
 memory with pointers to routines that will be used to access elements of
 the object file's data structures.
 
-   As different information from the object files is required, BFD
-reads from different sections of the file and processes them.  For
-example, a very common operation for the linker is processing symbol
-tables.  Each BFD back end provides a routine for converting between
-the object file's representation of symbols and an internal canonical
-format. When the linker asks for the symbol table of an object file, it
-calls through a memory pointer to the routine from the relevant BFD
-back end which reads and converts the table into a canonical form.  The
-linker then operates upon the canonical form. When the link is finished
-and the linker writes the output file's symbol table, another BFD back
-end routine is called to take the newly created symbol table and
-convert it into the chosen output format.
+   As different information from the object files is required, BFD reads
+from different sections of the file and processes them.  For example, a
+very common operation for the linker is processing symbol tables.  Each
+BFD back end provides a routine for converting between the object file's
+representation of symbols and an internal canonical format.  When the
+linker asks for the symbol table of an object file, it calls through a
+memory pointer to the routine from the relevant BFD back end which reads
+and converts the table into a canonical form.  The linker then operates
+upon the canonical form.  When the link is finished and the linker
+writes the output file's symbol table, another BFD back end routine is
+called to take the newly created symbol table and convert it into the
+chosen output format.
 
 * Menu:
 
@@ -173,25 +167,25 @@ File: bfd.info,  Node: BFD information l
 1.3.1 Information Loss
 ----------------------
 
-_Information can be lost during output._ The output formats supported
-by BFD do not provide identical facilities, and information which can
-be described in one form has nowhere to go in another format. One
-example of this is alignment information in `b.out'. There is nowhere
-in an `a.out' format file to store alignment information on the
-contained data, so when a file is linked from `b.out' and an `a.out'
-image is produced, alignment information will not propagate to the
-output file. (The linker will still use the alignment information
-internally, so the link is performed correctly).
+_Information can be lost during output._  The output formats supported
+by BFD do not provide identical facilities, and information which can be
+described in one form has nowhere to go in another format.  One example
+of this is alignment information in 'b.out'.  There is nowhere in an
+'a.out' format file to store alignment information on the contained
+data, so when a file is linked from 'b.out' and an 'a.out' image is
+produced, alignment information will not propagate to the output file.
+(The linker will still use the alignment information internally, so the
+link is performed correctly).
 
-   Another example is COFF section names. COFF files may contain an
-unlimited number of sections, each one with a textual section name. If
+   Another example is COFF section names.  COFF files may contain an
+unlimited number of sections, each one with a textual section name.  If
 the target of the link is a format which does not have many sections
-(e.g., `a.out') or has sections without names (e.g., the Oasys format),
-the link cannot be done simply. You can circumvent this problem by
+(e.g., 'a.out') or has sections without names (e.g., the Oasys format),
+the link cannot be done simply.  You can circumvent this problem by
 describing the desired input-to-output section mapping with the linker
 command language.
 
-   _Information can be lost during canonicalization._ The BFD internal
+   _Information can be lost during canonicalization._  The BFD internal
 canonical form of the external formats is not exhaustive; there are
 structures in input formats for which there is no direct representation
 internally.  This means that the BFD back ends cannot maintain all
@@ -202,16 +196,16 @@ internal and back to external formats.
 format and writes another.  Each BFD back end is responsible for
 maintaining as much data as possible, and the internal BFD canonical
 form has structures which are opaque to the BFD core, and exported only
-to the back ends. When a file is read in one format, the canonical form
-is generated for BFD and the application. At the same time, the back
-end saves away any information which may otherwise be lost. If the data
+to the back ends.  When a file is read in one format, the canonical form
+is generated for BFD and the application.  At the same time, the back
+end saves away any information which may otherwise be lost.  If the data
 is then written back in the same format, the back end routine will be
 able to use the canonical form provided by the BFD core as well as the
 information it prepared earlier.  Since there is a great deal of
-commonality between back ends, there is no information lost when
-linking or copying big endian COFF to little endian COFF, or `a.out' to
-`b.out'.  When a mixture of formats is linked, the information is only
-lost from the files whose format differs from the destination.
+commonality between back ends, there is no information lost when linking
+or copying big endian COFF to little endian COFF, or 'a.out' to 'b.out'.
+When a mixture of formats is linked, the information is only lost from
+the files whose format differs from the destination.
 
 
 File: bfd.info,  Node: Canonical format,  Prev: BFD information loss,  Up: What BFD Version 2 Can Do
@@ -222,16 +216,16 @@ File: bfd.info,  Node: Canonical format,
 The greatest potential for loss of information occurs when there is the
 least overlap between the information provided by the source format,
 that stored by the canonical format, and that needed by the destination
-format. A brief description of the canonical form may help you
+format.  A brief description of the canonical form may help you
 understand which kinds of data you can count on preserving across
-conversions.  
+conversions.
 
 _files_
      Information stored on a per-file basis includes target machine
      architecture, particular implementation format type, a demand
      pageable bit, and a write protected bit.  Information like Unix
      magic numbers is not stored here--only the magic numbers' meaning,
-     so a `ZMAGIC' file would have both the demand pageable bit and the
+     so a 'ZMAGIC' file would have both the demand pageable bit and the
      write protected text bit set.  The byte order of the target is
      stored on a per-file basis, so that big- and little-endian object
      files may be used with one another.
@@ -250,14 +244,14 @@ _symbols_
      section where they were defined.  Doing this ensures that each
      symbol points to its containing section.  Each symbol also has a
      varying amount of hidden private data for the BFD back end.  Since
-     the symbol points to the original file, the private data format
-     for that symbol is accessible.  `ld' can operate on a collection
-     of symbols of wildly different formats without problems.
-
-     Normal global and simple local symbols are maintained on output,
-     so an output file (no matter its format) will retain symbols
-     pointing to functions and to global, static, and common variables.
-     Some symbol information is not worth retaining; in `a.out', type
+     the symbol points to the original file, the private data format for
+     that symbol is accessible.  'ld' can operate on a collection of
+     symbols of wildly different formats without problems.
+
+     Normal global and simple local symbols are maintained on output, so
+     an output file (no matter its format) will retain symbols pointing
+     to functions and to global, static, and common variables.  Some
+     symbol information is not worth retaining; in 'a.out', type
      information is stored in the symbol table as long symbol names.
      This information would be useless to most COFF debuggers; the
      linker has command line switches to allow users to throw it away.
@@ -265,17 +259,17 @@ _symbols_
      There is one word of type information within the symbol, so if the
      format supports symbol type information within symbols (for
      example, COFF, IEEE, Oasys) and the type is simple enough to fit
-     within one word (nearly everything but aggregates), the
-     information will be preserved.
+     within one word (nearly everything but aggregates), the information
+     will be preserved.
 
 _relocation level_
      Each canonical BFD relocation record contains a pointer to the
      symbol to relocate to, the offset of the data to relocate, the
      section the data is in, and a pointer to a relocation type
-     descriptor. Relocation is performed by passing messages through
-     the relocation type descriptor and the symbol pointer. Therefore,
+     descriptor.  Relocation is performed by passing messages through
+     the relocation type descriptor and the symbol pointer.  Therefore,
      relocations can be performed on output data using a relocation
-     method that is only available in one of the input formats. For
+     method that is only available in one of the input formats.  For
      instance, Oasys provides a byte relocation format.  A relocation
      record requesting this relocation type would point indirectly to a
      routine to perform this, so the relocation may be performed on a
@@ -287,13 +281,13 @@ _line numbers_
      mapping between symbols, source line numbers, and addresses in the
      output file.  These addresses have to be relocated along with the
      symbol information.  Each symbol with an associated list of line
-     number records points to the first record of the list.  The head
-     of a line number list consists of a pointer to the symbol, which
-     allows finding out the address of the function whose line number
-     is being described. The rest of the list is made up of pairs:
-     offsets into the section and line numbers. Any format which can
-     simply derive this information can pass it successfully between
-     formats (COFF, IEEE and Oasys).
+     number records points to the first record of the list.  The head of
+     a line number list consists of a pointer to the symbol, which
+     allows finding out the address of the function whose line number is
+     being described.  The rest of the list is made up of pairs: offsets
+     into the section and line numbers.  Any format which can simply
+     derive this information can pass it successfully between formats
+     (COFF, IEEE and Oasys).
 
 
 File: bfd.info,  Node: BFD front end,  Next: BFD back ends,  Prev: Overview,  Up: Top
@@ -325,14 +319,14 @@ File: bfd.info,  Node: BFD front end,  N
 
 File: bfd.info,  Node: typedef bfd,  Next: Error reporting,  Prev: BFD front end,  Up: BFD front end
 
-2.1 `typedef bfd'
+2.1 'typedef bfd'
 =================
 
-A BFD has type `bfd'; objects of this type are the cornerstone of any
+A BFD has type 'bfd'; objects of this type are the cornerstone of any
 application using BFD. Using BFD consists of making references though
 the BFD and to data in the BFD.
 
-   Here is the structure that defines the type `bfd'.  It contains the
+   Here is the structure that defines the type 'bfd'.  It contains the
 major data about the file and pointers to the rest of the data.
 
 
@@ -346,7 +340,7 @@ major data about the file and pointers t
 
      enum bfd_plugin_format
        {
-         bfd_plugin_uknown = 0,
+         bfd_plugin_unknown = 0,
          bfd_plugin_yes = 1,
          bfd_plugin_no = 2
        };
@@ -391,7 +385,7 @@ major data about the file and pointers t
        ENUM_BITFIELD (bfd_direction) direction : 2;
 
        /* Format_specific flags.  */
-       flagword flags : 18;
+       flagword flags : 20;
 
        /* Values that may appear in the flags field of a BFD.  These also
           appear in the object_flags field of the bfd_target structure, where
@@ -471,16 +465,24 @@ major data about the file and pointers t
        /* Compress sections in this BFD with SHF_COMPRESSED from gABI.  */
      #define BFD_COMPRESS_GABI 0x20000
 
+       /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
+          BFD.  */
+     #define BFD_CONVERT_ELF_COMMON 0x40000
+
+       /* Use the ELF STT_COMMON type in this BFD.  */
+     #define BFD_USE_ELF_STT_COMMON 0x80000
+
        /* Flags bits to be saved in bfd_preserve_save.  */
      #define BFD_FLAGS_SAVED \
-       (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
-        | BFD_COMPRESS_GABI)
+       (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+        | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+        | BFD_USE_ELF_STT_COMMON)
 
        /* Flags bits which are for BFD use only.  */
      #define BFD_FLAGS_FOR_BFD_USE_MASK \
        (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
         | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
-        | BFD_COMPRESS_GABI)
+        | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
 
        /* Is the file descriptor being cached?  That is, can it be closed as
           needed, and re-opened when accessed later?  */
@@ -654,6 +656,7 @@ major data about the file and pointers t
        return TRUE;
      }
 
+
 
 File: bfd.info,  Node: Error reporting,  Next: Miscellaneous,  Prev: typedef bfd,  Up: BFD front end
 
@@ -662,18 +665,18 @@ File: bfd.info,  Node: Error reporting, 
 
 Most BFD functions return nonzero on success (check their individual
 documentation for precise semantics).  On an error, they call
-`bfd_set_error' to set an error condition that callers can check by
-calling `bfd_get_error'.  If that returns `bfd_error_system_call', then
-check `errno'.
+'bfd_set_error' to set an error condition that callers can check by
+calling 'bfd_get_error'.  If that returns 'bfd_error_system_call', then
+check 'errno'.
 
    The easiest way to report a BFD error to the user is to use
-`bfd_perror'.
+'bfd_perror'.
 
-2.2.1 Type `bfd_error_type'
+2.2.1 Type 'bfd_error_type'
 ---------------------------
 
-The values returned by `bfd_get_error' are defined by the enumerated
-type `bfd_error_type'.
+The values returned by 'bfd_get_error' are defined by the enumerated
+type 'bfd_error_type'.
 
 
      typedef enum bfd_error
@@ -702,8 +705,9 @@ type `bfd_error_type'.
        bfd_error_invalid_error_code
      }
      bfd_error_type;
-   
-2.2.1.1 `bfd_get_error'
+
+
+2.2.1.1 'bfd_get_error'
 .......................
 
 *Synopsis*
@@ -711,7 +715,7 @@ type `bfd_error_type'.
    *Description*
 Return the current BFD error condition.
 
-2.2.1.2 `bfd_set_error'
+2.2.1.2 'bfd_set_error'
 .......................
 
 *Synopsis*
@@ -721,16 +725,16 @@ Set the BFD error condition to be ERROR_
 bfd_error_on_input, then this function takes two more parameters, the
 input bfd where the error occurred, and the bfd_error_type error.
 
-2.2.1.3 `bfd_errmsg'
+2.2.1.3 'bfd_errmsg'
 ....................
 
 *Synopsis*
      const char *bfd_errmsg (bfd_error_type error_tag);
    *Description*
 Return a string describing the error ERROR_TAG, or the system error if
-ERROR_TAG is `bfd_error_system_call'.
+ERROR_TAG is 'bfd_error_system_call'.
 
-2.2.1.4 `bfd_perror'
+2.2.1.4 'bfd_perror'
 ....................
 
 *Synopsis*
@@ -749,12 +753,13 @@ Some BFD functions want to print message
 call a BFD error handler function.  This function may be overridden by
 the program.
 
-   The BFD error handler acts like printf.
+   The BFD error handler acts like vprintf.
 
 
-     typedef void (*bfd_error_handler_type) (const char *, ...);
-   
-2.2.2.1 `bfd_set_error_handler'
+     typedef void (*bfd_error_handler_type) (const char *, va_list);
+
+
+2.2.2.1 'bfd_set_error_handler'
 ...............................
 
 *Synopsis*
@@ -762,32 +767,24 @@ the program.
    *Description*
 Set the BFD error handler function.  Returns the previous function.
 
-2.2.2.2 `bfd_set_error_program_name'
+2.2.2.2 'bfd_set_error_program_name'
 ....................................
 
 *Synopsis*
      void bfd_set_error_program_name (const char *);
    *Description*
 Set the program name to use when printing a BFD error.  This is printed
-before the error message followed by a colon and space.  The string
-must not be changed after it is passed to this function.
-
-2.2.2.3 `bfd_get_error_handler'
-...............................
-
-*Synopsis*
-     bfd_error_handler_type bfd_get_error_handler (void);
-   *Description*
-Return the BFD error handler function.
+before the error message followed by a colon and space.  The string must
+not be changed after it is passed to this function.
 
 2.2.3 BFD assert handler
 ------------------------
 
-If BFD finds an internal inconsistency, the bfd assert handler is
-called with information on the BFD version, BFD source file and line.
-If this happens, most programs linked against BFD are expected to want
-to exit with an error, or mark the current BFD operation as failed, so
-it is recommended to override the default handler, which just calls
+If BFD finds an internal inconsistency, the bfd assert handler is called
+with information on the BFD version, BFD source file and line.  If this
+happens, most programs linked against BFD are expected to want to exit
+with an error, or mark the current BFD operation as failed, so it is
+recommended to override the default handler, which just calls
 _bfd_error_handler and continues.
 
 
@@ -795,22 +792,15 @@ _bfd_error_handler and continues.
                                               const char *bfd_version,
                                               const char *bfd_file,
                                               int bfd_line);
-   
-2.2.3.1 `bfd_set_assert_handler'
-................................
 
-*Synopsis*
-     bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-   *Description*
-Set the BFD assert handler function.  Returns the previous function.
 
-2.2.3.2 `bfd_get_assert_handler'
+2.2.3.1 'bfd_set_assert_handler'
 ................................
 
 *Synopsis*
-     bfd_assert_handler_type bfd_get_assert_handler (void);
+     bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
    *Description*
-Return the BFD assert handler function.
+Set the BFD assert handler function.  Returns the previous function.
 
 
 File: bfd.info,  Node: Miscellaneous,  Next: Memory Usage,  Prev: Error reporting,  Up: BFD front end
@@ -821,7 +811,7 @@ File: bfd.info,  Node: Miscellaneous,  N
 2.3.1 Miscellaneous functions
 -----------------------------
 
-2.3.1.1 `bfd_get_reloc_upper_bound'
+2.3.1.1 'bfd_get_reloc_upper_bound'
 ...................................
 
 *Synopsis*
@@ -831,7 +821,7 @@ Return the number of bytes required to s
 associated with section SECT attached to bfd ABFD.  If an error occurs,
 return -1.
 
-2.3.1.2 `bfd_canonicalize_reloc'
+2.3.1.2 'bfd_canonicalize_reloc'
 ................................
 
 *Synopsis*
@@ -841,12 +831,12 @@ return -1.
 Call the back end associated with the open BFD ABFD and translate the
 external form of the relocation information attached to SEC into the
 internal canonical form.  Place the table into memory at LOC, which has
-been preallocated, usually by a call to `bfd_get_reloc_upper_bound'.
+been preallocated, usually by a call to 'bfd_get_reloc_upper_bound'.
 Returns the number of relocs, or -1 on error.
 
    The SYMS table is also needed for horrible internal magic reasons.
 
-2.3.1.3 `bfd_set_reloc'
+2.3.1.3 'bfd_set_reloc'
 .......................
 
 *Synopsis*
@@ -856,7 +846,7 @@ Returns the number of relocs, or -1 on e
 Set the relocation pointer and count within section SEC to the values
 REL and COUNT.  The argument ABFD is ignored.
 
-2.3.1.4 `bfd_set_file_flags'
+2.3.1.4 'bfd_set_file_flags'
 ............................
 
 *Synopsis*
@@ -865,32 +855,31 @@ REL and COUNT.  The argument ABFD is ign
 Set the flag word in the BFD ABFD to the value FLAGS.
 
    Possible errors are:
-   * `bfd_error_wrong_format' - The target bfd was not of object format.
 
-   * `bfd_error_invalid_operation' - The target bfd was open for
+   * 'bfd_error_wrong_format' - The target bfd was not of object format.
+   * 'bfd_error_invalid_operation' - The target bfd was open for
      reading.
+   * 'bfd_error_invalid_operation' - The flag word contained a bit which
+     was not applicable to the type of file.  E.g., an attempt was made
+     to set the 'D_PAGED' bit on a BFD format which does not support
+     demand paging.
 
-   * `bfd_error_invalid_operation' - The flag word contained a bit
-     which was not applicable to the type of file.  E.g., an attempt
-     was made to set the `D_PAGED' bit on a BFD format which does not
-     support demand paging.
-
-2.3.1.5 `bfd_get_arch_size'
+2.3.1.5 'bfd_get_arch_size'
 ...........................
 
 *Synopsis*
      int bfd_get_arch_size (bfd *abfd);
    *Description*
-Returns the normalized architecture address size, in bits, as
-determined by the object file's format.  By normalized, we mean either
-32 or 64.  For ELF, this information is included in the header.  Use
+Returns the normalized architecture address size, in bits, as determined
+by the object file's format.  By normalized, we mean either 32 or 64.
+For ELF, this information is included in the header.  Use
 bfd_arch_bits_per_address for number of bits in the architecture
 address.
 
    *Returns*
-Returns the arch size in bits if known, `-1' otherwise.
+Returns the arch size in bits if known, '-1' otherwise.
 
-2.3.1.6 `bfd_get_sign_extend_vma'
+2.3.1.6 'bfd_get_sign_extend_vma'
 .................................
 
 *Synopsis*
@@ -903,11 +892,11 @@ instance, bfd_get_start_address() will r
 to fill a bfd_vma when this is the case.
 
    *Returns*
-Returns `1' if the target architecture is known to sign extend
-addresses, `0' if the target architecture is known to not sign extend
-addresses, and `-1' otherwise.
+Returns '1' if the target architecture is known to sign extend
+addresses, '0' if the target architecture is known to not sign extend
+addresses, and '-1' otherwise.
 
-2.3.1.7 `bfd_set_start_address'
+2.3.1.7 'bfd_set_start_address'
 ...............................
 
 *Synopsis*
@@ -916,45 +905,45 @@ addresses, and `-1' otherwise.
 Make VMA the entry point of output BFD ABFD.
 
    *Returns*
-Returns `TRUE' on success, `FALSE' otherwise.
+Returns 'TRUE' on success, 'FALSE' otherwise.
 
-2.3.1.8 `bfd_get_gp_size'
+2.3.1.8 'bfd_get_gp_size'
 .........................
 
 *Synopsis*
      unsigned int bfd_get_gp_size (bfd *abfd);
    *Description*
-Return the maximum size of objects to be optimized using the GP
-register under MIPS ECOFF.  This is typically set by the `-G' argument
-to the compiler, assembler or linker.
+Return the maximum size of objects to be optimized using the GP register
+under MIPS ECOFF. This is typically set by the '-G' argument to the
+compiler, assembler or linker.
 
-2.3.1.9 `bfd_set_gp_size'
+2.3.1.9 'bfd_set_gp_size'
 .........................
 
 *Synopsis*
      void bfd_set_gp_size (bfd *abfd, unsigned int i);
    *Description*
 Set the maximum size of objects to be optimized using the GP register
-under ECOFF or MIPS ELF.  This is typically set by the `-G' argument to
+under ECOFF or MIPS ELF. This is typically set by the '-G' argument to
 the compiler, assembler or linker.
 
-2.3.1.10 `bfd_scan_vma'
+2.3.1.10 'bfd_scan_vma'
 .......................
 
 *Synopsis*
      bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
    *Description*
-Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
+Convert, like 'strtoul', a numerical expression STRING into a 'bfd_vma'
 integer, and return that integer.  (Though without as many bells and
-whistles as `strtoul'.)  The expression is assumed to be unsigned
-(i.e., positive).  If given a BASE, it is used as the base for
-conversion.  A base of 0 causes the function to interpret the string in
-hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
-zero is found, otherwise in decimal.
+whistles as 'strtoul'.)  The expression is assumed to be unsigned (i.e.,
+positive).  If given a BASE, it is used as the base for conversion.  A
+base of 0 causes the function to interpret the string in hex if a
+leading "0x" or "0X" is found, otherwise in octal if a leading zero is
+found, otherwise in decimal.
 
-   If the value would overflow, the maximum `bfd_vma' value is returned.
+   If the value would overflow, the maximum 'bfd_vma' value is returned.
 
-2.3.1.11 `bfd_copy_private_header_data'
+2.3.1.11 'bfd_copy_private_header_data'
 .......................................
 
 *Synopsis*
@@ -962,65 +951,45 @@ zero is found, otherwise in decimal.
    *Description*
 Copy private BFD header information from the BFD IBFD to the the BFD
 OBFD.  This copies information that may require sections to exist, but
-does not require symbol tables.  Return `true' on success, `false' on
+does not require symbol tables.  Return 'true' on success, 'false' on
 error.  Possible error returns are:
 
-   * `bfd_error_no_memory' - Not enough memory exists to create private
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
      data for OBFD.
-
      #define bfd_copy_private_header_data(ibfd, obfd) \
           BFD_SEND (obfd, _bfd_copy_private_header_data, \
                     (ibfd, obfd))
 
-2.3.1.12 `bfd_copy_private_bfd_data'
+2.3.1.12 'bfd_copy_private_bfd_data'
 ....................................
 
 *Synopsis*
      bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
    *Description*
 Copy private BFD information from the BFD IBFD to the the BFD OBFD.
-Return `TRUE' on success, `FALSE' on error.  Possible error returns are:
+Return 'TRUE' on success, 'FALSE' on error.  Possible error returns are:
 
-   * `bfd_error_no_memory' - Not enough memory exists to create private
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
      data for OBFD.
-
      #define bfd_copy_private_bfd_data(ibfd, obfd) \
           BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                     (ibfd, obfd))
 
-2.3.1.13 `bfd_merge_private_bfd_data'
-.....................................
-
-*Synopsis*
-     bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-   *Description*
-Merge private BFD information from the BFD IBFD to the the output file
-BFD OBFD when linking.  Return `TRUE' on success, `FALSE' on error.
-Possible error returns are:
-
-   * `bfd_error_no_memory' - Not enough memory exists to create private
-     data for OBFD.
-
-     #define bfd_merge_private_bfd_data(ibfd, obfd) \
-          BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-                    (ibfd, obfd))
-
-2.3.1.14 `bfd_set_private_flags'
+2.3.1.13 'bfd_set_private_flags'
 ................................
 
 *Synopsis*
      bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
    *Description*
-Set private BFD flag information in the BFD ABFD.  Return `TRUE' on
-success, `FALSE' on error.  Possible error returns are:
+Set private BFD flag information in the BFD ABFD.  Return 'TRUE' on
+success, 'FALSE' on error.  Possible error returns are:
 
-   * `bfd_error_no_memory' - Not enough memory exists to create private
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
      data for OBFD.
-
      #define bfd_set_private_flags(abfd, flags) \
           BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
 
-2.3.1.15 `Other functions'
+2.3.1.14 'Other functions'
 ..........................
 
 *Description*
@@ -1119,18 +1088,19 @@ The following functions exist but have n
        (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
         bfd_boolean, asymbol **);
 
-2.3.1.16 `bfd_alt_mach_code'
+
+2.3.1.15 'bfd_alt_mach_code'
 ............................
 
 *Synopsis*
      bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
    *Description*
-When more than one machine code number is available for the same
-machine type, this function can be used to switch between the preferred
-one (alternative == 0) and any others.  Currently, only ELF supports
-this feature, with up to two alternate machine codes.
+When more than one machine code number is available for the same machine
+type, this function can be used to switch between the preferred one
+(alternative == 0) and any others.  Currently, only ELF supports this
+feature, with up to two alternate machine codes.
 
-2.3.1.17 `bfd_emul_get_maxpagesize'
+2.3.1.16 'bfd_emul_get_maxpagesize'
 ...................................
 
 *Synopsis*
@@ -1141,16 +1111,16 @@ Returns the maximum page size, in bytes,
    *Returns*
 Returns the maximum page size in bytes for ELF, 0 otherwise.
 
-2.3.1.18 `bfd_emul_set_maxpagesize'
+2.3.1.17 'bfd_emul_set_maxpagesize'
 ...................................
 
 *Synopsis*
      void bfd_emul_set_maxpagesize (const char *, bfd_vma);
    *Description*
-For ELF, set the maximum page size for the emulation.  It is a no-op
-for other formats.
+For ELF, set the maximum page size for the emulation.  It is a no-op for
+other formats.
 
-2.3.1.19 `bfd_emul_get_commonpagesize'
+2.3.1.18 'bfd_emul_get_commonpagesize'
 ......................................
 
 *Synopsis*
@@ -1161,7 +1131,7 @@ Returns the common page size, in bytes, 
    *Returns*
 Returns the common page size in bytes for ELF, 0 otherwise.
 
-2.3.1.20 `bfd_emul_set_commonpagesize'
+2.3.1.19 'bfd_emul_set_commonpagesize'
 ......................................
 
 *Synopsis*
@@ -1170,7 +1140,7 @@ Returns the common page size in bytes fo
 For ELF, set the common page size for the emulation.  It is a no-op for
 other formats.
 
-2.3.1.21 `bfd_demangle'
+2.3.1.20 'bfd_demangle'
 .......................
 
 *Synopsis*
@@ -1181,7 +1151,7 @@ such chars that would otherwise confuse 
 v3 ABI mangled name, returns a buffer allocated with malloc holding the
 demangled name.  Returns NULL otherwise and on memory alloc failure.
 
-2.3.1.22 `bfd_update_compression_header'
+2.3.1.21 'bfd_update_compression_header'
 ........................................
 
 *Synopsis*
@@ -1191,7 +1161,7 @@ demangled name.  Returns NULL otherwise 
 Set the compression header at CONTENTS of SEC in ABFD and update
 elf_section_flags for compression.
 
-2.3.1.23 `bfd_check_compression_header'
+2.3.1.22 'bfd_check_compression_header'
 .......................................
 
 *Synopsis*
@@ -1206,7 +1176,7 @@ valid.
    *Returns*
 Return TRUE if the compression header is valid.
 
-2.3.1.24 `bfd_get_compression_header_size'
+2.3.1.23 'bfd_get_compression_header_size'
 ..........................................
 
 *Synopsis*
@@ -1217,14 +1187,36 @@ Return the size of the compression heade
    *Returns*
 Return the size of the compression header in bytes.
 
-2.3.1.25 `struct bfd_iovec'
+2.3.1.24 'bfd_convert_section_size'
+...................................
+
+*Synopsis*
+     bfd_size_type bfd_convert_section_size
+        (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
+   *Description*
+Convert the size SIZE of the section ISEC in input BFD IBFD to the
+section size in output BFD OBFD.
+
+2.3.1.25 'bfd_convert_section_contents'
+.......................................
+
+*Synopsis*
+     bfd_boolean bfd_convert_section_contents
+        (bfd *ibfd, asection *isec, bfd *obfd,
+         bfd_byte **ptr, bfd_size_type *ptr_size);
+   *Description*
+Convert the contents, stored in *PTR, of the section ISEC in input BFD
+IBFD to output BFD OBFD if needed.  The original buffer pointed to by
+*PTR may be freed and *PTR is returned with memory malloc'd by this
+function, and the new size written to PTR_SIZE.
+
+2.3.1.26 'struct bfd_iovec'
 ...........................
 
 *Description*
-The `struct bfd_iovec' contains the internal file I/O class.  Each
-`BFD' has an instance of this class and all file I/O is routed through
-it (it is assumed that the instance implements all methods listed
-below).
+The 'struct bfd_iovec' contains the internal file I/O class.  Each 'BFD'
+has an instance of this class and all file I/O is routed through it (it
+is assumed that the instance implements all methods listed below).
      struct bfd_iovec
      {
        /* To avoid problems with macros, a "b" rather than "f"
@@ -1232,15 +1224,15 @@ below).
        /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
           bytes starting at PTR.  Return the number of bytes actually
           transfered (a read past end-of-file returns less than NBYTES),
-          or -1 (setting `bfd_error') if an error occurs.  */
+          or -1 (setting bfd_error) if an error occurs.  */
        file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
        file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
                            file_ptr nbytes);
-       /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error'
+       /* Return the current IOSTREAM file offset, or -1 (setting bfd_error
           if an error occurs.  */
        file_ptr (*btell) (struct bfd *abfd);
        /* For the following, on successful completion a value of 0 is returned.
-          Otherwise, a value of -1 is returned (and  `bfd_error' is set).  */
+          Otherwise, a value of -1 is returned (and  bfd_error is set).  */
        int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
        int (*bclose) (struct bfd *abfd);
        int (*bflush) (struct bfd *abfd);
@@ -1257,16 +1249,16 @@ below).
      };
      extern const struct bfd_iovec _bfd_memory_iovec;
 
-2.3.1.26 `bfd_get_mtime'
+2.3.1.27 'bfd_get_mtime'
 ........................
 
 *Synopsis*
      long bfd_get_mtime (bfd *abfd);
    *Description*
-Return the file modification time (as read from the file system, or
-from the archive header for archive members).
+Return the file modification time (as read from the file system, or from
+the archive header for archive members).
 
-2.3.1.27 `bfd_get_size'
+2.3.1.28 'bfd_get_size'
 .......................
 
 *Synopsis*
@@ -1275,27 +1267,26 @@ from the archive header for archive memb
 Return the file size (as read from file system) for the file associated
 with BFD ABFD.
 
-   The initial motivation for, and use of, this routine is not so we
-can get the exact size of the object the BFD applies to, since that
-might not be generally possible (archive members for example).  It
-would be ideal if someone could eventually modify it so that such
-results were guaranteed.
-
-   Instead, we want to ask questions like "is this NNN byte sized
-object I'm about to try read from file offset YYY reasonable?"  As as
-example of where we might do this, some object formats use string
-tables for which the first `sizeof (long)' bytes of the table contain
-the size of the table itself, including the size bytes.  If an
-application tries to read what it thinks is one of these string tables,
-without some way to validate the size, and for some reason the size is
-wrong (byte swapping error, wrong location for the string table, etc.),
-the only clue is likely to be a read error when it tries to read the
-table, or a "virtual memory exhausted" error when it tries to allocate
-15 bazillon bytes of space for the 15 bazillon byte table it is about
-to read.  This function at least allows us to answer the question, "is
-the size reasonable?".
+   The initial motivation for, and use of, this routine is not so we can
+get the exact size of the object the BFD applies to, since that might
+not be generally possible (archive members for example).  It would be
+ideal if someone could eventually modify it so that such results were
+guaranteed.
+
+   Instead, we want to ask questions like "is this NNN byte sized object
+I'm about to try read from file offset YYY reasonable?"  As as example
+of where we might do this, some object formats use string tables for
+which the first 'sizeof (long)' bytes of the table contain the size of
+the table itself, including the size bytes.  If an application tries to
+read what it thinks is one of these string tables, without some way to
+validate the size, and for some reason the size is wrong (byte swapping
+error, wrong location for the string table, etc.), the only clue is
+likely to be a read error when it tries to read the table, or a "virtual
+memory exhausted" error when it tries to allocate 15 bazillon bytes of
+space for the 15 bazillon byte table it is about to read.  This function
+at least allows us to answer the question, "is the size reasonable?".
 
-2.3.1.28 `bfd_mmap'
+2.3.1.29 'bfd_mmap'
 ...................
 
 *Synopsis*
@@ -1304,8 +1295,8 @@ the size reasonable?".
          void **map_addr, bfd_size_type *map_len);
    *Description*
 Return mmap()ed region of the file, if possible and implemented.  LEN
-and OFFSET do not need to be page aligned.  The page aligned address
-and length are written to MAP_ADDR and MAP_LEN.
+and OFFSET do not need to be page aligned.  The page aligned address and
+length are written to MAP_ADDR and MAP_LEN.
 
 
 File: bfd.info,  Node: Memory Usage,  Next: Initialization,  Prev: Miscellaneous,  Up: BFD front end
@@ -1313,21 +1304,21 @@ File: bfd.info,  Node: Memory Usage,  Ne
 2.4 Memory Usage
 ================
 
-BFD keeps all of its internal structures in obstacks. There is one
-obstack per open BFD file, into which the current state is stored. When
+BFD keeps all of its internal structures in obstacks.  There is one
+obstack per open BFD file, into which the current state is stored.  When
 a BFD is closed, the obstack is deleted, and so everything which has
 been allocated by BFD for the closing file is thrown away.
 
    BFD does not free anything created by an application, but pointers
-into `bfd' structures become invalid on a `bfd_close'; for example,
-after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
+into 'bfd' structures become invalid on a 'bfd_close'; for example,
+after a 'bfd_close' the vector passed to 'bfd_canonicalize_symtab' is
 still around, since it has been allocated by the application, but the
 data that it pointed to are lost.
 
    The general rule is to not close a BFD until all operations dependent
 upon data from the BFD have been completed, or all the data from within
-the file has been copied. To help with the management of memory, there
-is a function (`bfd_alloc_size') which returns the number of bytes in
+the file has been copied.  To help with the management of memory, there
+is a function ('bfd_alloc_size') which returns the number of bytes in
 obstacks associated with the supplied BFD. This could be used to select
 the greediest open BFD, close it to reclaim the memory, perform some
 operation and reopen the BFD again, to get a fresh copy of the data
@@ -1344,7 +1335,7 @@ File: bfd.info,  Node: Initialization,  
 
 These are the functions that handle initializing a BFD.
 
-2.5.1.1 `bfd_init'
+2.5.1.1 'bfd_init'
 ..................
 
 *Synopsis*
@@ -1364,7 +1355,7 @@ abstraction.  A single BFD may have any 
 hold of them by pointing to the first; each one points to the next in
 the list.
 
-   Sections are supported in BFD in `section.c'.
+   Sections are supported in BFD in 'section.c'.
 
 * Menu:
 
@@ -1379,31 +1370,30 @@ File: bfd.info,  Node: Section Input,  N
 2.6.1 Section input
 -------------------
 
-When a BFD is opened for reading, the section structures are created
-and attached to the BFD.
+When a BFD is opened for reading, the section structures are created and
+attached to the BFD.
 
    Each section has a name which describes the section in the outside
-world--for example, `a.out' would contain at least three sections,
-called `.text', `.data' and `.bss'.
+world--for example, 'a.out' would contain at least three sections,
+called '.text', '.data' and '.bss'.
 
    Names need not be unique; for example a COFF file may have several
-sections named `.data'.
+sections named '.data'.
 
    Sometimes a BFD will contain more than the "natural" number of
-sections. A back end may attach other sections containing constructor
-data, or an application may add a section (using `bfd_make_section') to
+sections.  A back end may attach other sections containing constructor
+data, or an application may add a section (using 'bfd_make_section') to
 the sections attached to an already open BFD. For example, the linker
-creates an extra section `COMMON' for each input file's BFD to hold
+creates an extra section 'COMMON' for each input file's BFD to hold
 information about common storage.
 
    The raw data is not necessarily read in when the section descriptor
-is created. Some targets may leave the data in place until a
-`bfd_get_section_contents' call is made. Other back ends may read in
-all the data at once.  For example, an S-record file has to be read
-once to determine the size of the data. An IEEE-695 file doesn't
-contain raw data in sections, but data and relocation expressions
-intermixed, so the data area has to be parsed to get out the data and
-relocations.
+is created.  Some targets may leave the data in place until a
+'bfd_get_section_contents' call is made.  Other back ends may read in
+all the data at once.  For example, an S-record file has to be read once
+to determine the size of the data.  An IEEE-695 file doesn't contain raw
+data in sections, but data and relocation expressions intermixed, so the
+data area has to be parsed to get out the data and relocations.
 
 
 File: bfd.info,  Node: Section Output,  Next: typedef asection,  Prev: Section Input,  Up: Sections
@@ -1411,20 +1401,20 @@ File: bfd.info,  Node: Section Output,  
 2.6.2 Section output
 --------------------
 
-To write a new object style BFD, the various sections to be written
-have to be created. They are attached to the BFD in the same way as
-input sections; data is written to the sections using
-`bfd_set_section_contents'.
+To write a new object style BFD, the various sections to be written have
+to be created.  They are attached to the BFD in the same way as input
+sections; data is written to the sections using
+'bfd_set_section_contents'.
 
    Any program that creates or combines sections (e.g., the assembler
-and linker) must use the `asection' fields `output_section' and
-`output_offset' to indicate the file sections to which each section
-must be written.  (If the section is being created from scratch,
-`output_section' should probably point to the section itself and
-`output_offset' should probably be zero.)
+and linker) must use the 'asection' fields 'output_section' and
+'output_offset' to indicate the file sections to which each section must
+be written.  (If the section is being created from scratch,
+'output_section' should probably point to the section itself and
+'output_offset' should probably be zero.)
 
    The data to be written comes from input sections attached (via
-`output_section' pointers) to the output sections.  The output section
+'output_section' pointers) to the output sections.  The output section
 structure can be considered a filter for the input section: the output
 section determines the vma of the output data and the name, but the
 input section determines the offset into the output section of the data
@@ -1432,7 +1422,7 @@ to be written.
 
    E.g., to create a section "O", starting at 0x100, 0x123 long,
 containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and
-"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would
+"B" at offset 0x20 (i.e., at vma 0x120) the 'asection' structures would
 look like:
 
         section name          "A"
@@ -1449,7 +1439,7 @@ look like:
 -----------------
 
 The data within a section is stored in a "link_order".  These are much
-like the fixups in `gas'.  The link_order abstraction allows a section
+like the fixups in 'gas'.  The link_order abstraction allows a section
 to grow and shrink within itself.
 
    A link_order knows how big it is, and which is the next link_order
@@ -1457,8 +1447,8 @@ and where the raw data for it is; it als
 relocations which apply to it.
 
    The link_order is used by the linker to perform relaxing on final
-code.  The compiler creates code which is as big as necessary to make
-it work without relaxing, and the user can select whether to relax.
+code.  The compiler creates code which is as big as necessary to make it
+work without relaxing, and the user can select whether to relax.
 Sometimes relaxing takes a lot of time.  The linker runs around the
 relocations to see if any are attached to data which can be shrunk, if
 so it does it on a link_order by link_order basis.
@@ -1479,10 +1469,10 @@ Here is the section structure:
        const char *name;
 
        /* A unique sequence number.  */
-       int id;
+       unsigned int id;
 
        /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
-       int index;
+       unsigned int index;
 
        /* The next section in the list belonging to the BFD, or NULL.  */
        struct bfd_section *next;
@@ -1523,19 +1513,19 @@ Here is the section structure:
 
        /* The section contains constructor information. This section
           type is used by the linker to create lists of constructors and
-          destructors used by `g++'. When a back end sees a symbol
+          destructors used by g++. When a back end sees a symbol
           which should be used in a constructor list, it creates a new
-          section for the type of name (e.g., `__CTOR_LIST__'), attaches
+          section for the type of name (e.g., __CTOR_LIST__), attaches
           the symbol to it, and builds a relocation. To build the lists
           of constructors, all the linker has to do is catenate all the
-          sections called `__CTOR_LIST__' and relocate the data
+          sections called __CTOR_LIST__ and relocate the data
           contained within - exactly the operations it would peform on
           standard data.  */
      #define SEC_CONSTRUCTOR 0x080
 
        /* The section has contents - a data section could be
-          `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
-          `SEC_HAS_CONTENTS'  */
+          SEC_ALLOC | SEC_HAS_CONTENTS; a debug section could be
+          SEC_HAS_CONTENTS  */
      #define SEC_HAS_CONTENTS 0x100
 
        /* An instruction to the linker to not output the section
@@ -1685,6 +1675,9 @@ Here is the section structure:
           when memory read flag isn't set. */
      #define SEC_COFF_NOREAD 0x40000000
 
+       /* Indicate that section has the purecode flag set.  */
+     #define SEC_ELF_PURECODE 0x80000000
+
        /*  End of section flags.  */
 
        /* Some internal packed boolean fields.  */
@@ -1741,8 +1734,8 @@ Here is the section structure:
        /*  The virtual memory address of the section - where it will be
            at run time.  The symbols are relocated against this.  The
            user_set_vma flag is maintained by bfd; if it's not set, the
-           backend can assign addresses (for example, in `a.out', where
-           the default address for `.data' is dependent on the specific
+           backend can assign addresses (for example, in a.out, where
+           the default address for .data is dependent on the specific
            target and various flags).  */
        bfd_vma vma;
 
@@ -1751,9 +1744,9 @@ Here is the section structure:
            information.  */
        bfd_vma lma;
 
-       /* The size of the section in octets, as it will be output.
+       /* The size of the section in *octets*, as it will be output.
           Contains a value even if the section has no contents (e.g., the
-          size of `.bss').  */
+          size of .bss).  */
        bfd_size_type size;
 
        /* For input sections, the original size on disk of the section, in
@@ -2021,9 +2014,9 @@ Here is the section structure:
      #define bfd_section_removed_from_list(ABFD, S) \
        ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
 
-     #define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)                   \
+     #define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)                   \
        /* name, id,  index, next, prev, flags, user_set_vma,            */  \
-       { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
+       {  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,                           \
                                                                             \
        /* linker_mark, linker_has_input, gc_mark, decompress_status,    */  \
           0,           0,                1,       0,                        \
@@ -2059,6 +2052,7 @@ Here is the section structure:
           { NULL }, { NULL }                                                \
          }
 
+
 
 File: bfd.info,  Node: section prototypes,  Prev: typedef asection,  Up: Sections
 
@@ -2067,7 +2061,7 @@ File: bfd.info,  Node: section prototype
 
 These are the functions exported by the section handling part of BFD.
 
-2.6.5.1 `bfd_section_list_clear'
+2.6.5.1 'bfd_section_list_clear'
 ................................
 
 *Synopsis*
@@ -2076,7 +2070,7 @@ These are the functions exported by the 
 Clears the section list, and also resets the section count and hash
 table entries.
 
-2.6.5.2 `bfd_get_section_by_name'
+2.6.5.2 'bfd_get_section_by_name'
 .................................
 
 *Synopsis*
@@ -2085,17 +2079,19 @@ table entries.
 Return the most recently created section attached to ABFD named NAME.
 Return NULL if no such section exists.
 
-2.6.5.3 `bfd_get_next_section_by_name'
+2.6.5.3 'bfd_get_next_section_by_name'
 ......................................
 
 *Synopsis*
-     asection *bfd_get_next_section_by_name (asection *sec);
+     asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
    *Description*
-Given SEC is a section returned by `bfd_get_section_by_name', return
-the next most recently created section attached to the same BFD with
-the same name.  Return NULL if no such section exists.
+Given SEC is a section returned by 'bfd_get_section_by_name', return the
+next most recently created section attached to the same BFD with the
+same name, or if no such section exists in the same BFD and IBFD is
+non-NULL, the next section with the same name in any input BFD following
+IBFD. Return NULL on finding no section.
 
-2.6.5.4 `bfd_get_linker_section'
+2.6.5.4 'bfd_get_linker_section'
 ................................
 
 *Synopsis*
@@ -2104,7 +2100,7 @@ the same name.  Return NULL if no such s
 Return the linker created section attached to ABFD named NAME.  Return
 NULL if no such section exists.
 
-2.6.5.5 `bfd_get_section_by_name_if'
+2.6.5.5 'bfd_get_section_by_name_if'
 ....................................
 
 *Synopsis*
@@ -2115,15 +2111,15 @@ NULL if no such section exists.
          void *obj);
    *Description*
 Call the provided function FUNC for each section attached to the BFD
-ABFD whose name matches NAME, passing OBJ as an argument. The function
+ABFD whose name matches NAME, passing OBJ as an argument.  The function
 will be called as if by
 
             func (abfd, the_section, obj);
 
    It returns the first section for which FUNC returns true, otherwise
-`NULL'.
+'NULL'.
 
-2.6.5.6 `bfd_get_unique_section_name'
+2.6.5.6 'bfd_get_unique_section_name'
 .....................................
 
 *Synopsis*
@@ -2135,14 +2131,14 @@ digit suffix onto the original TEMPLAT. 
 specifies the first number tried as a suffix to generate a unique name.
 The value pointed to by COUNT will be incremented in this case.
 
-2.6.5.7 `bfd_make_section_old_way'
+2.6.5.7 'bfd_make_section_old_way'
 ..................................
 
 *Synopsis*
      asection *bfd_make_section_old_way (bfd *abfd, const char *name);
    *Description*
 Create a new empty section called NAME and attach it to the end of the
-chain of sections for the BFD ABFD. An attempt to create a section with
+chain of sections for the BFD ABFD.  An attempt to create a section with
 a name which is already in use returns its pointer without changing the
 section chain.
 
@@ -2150,12 +2146,12 @@ section chain.
 was rewritten....
 
    Possible errors are:
-   * `bfd_error_invalid_operation' - If output has already started for
-     this BFD.
 
-   * `bfd_error_no_memory' - If memory allocation fails.
+   * 'bfd_error_invalid_operation' - If output has already started for
+     this BFD.
+   * 'bfd_error_no_memory' - If memory allocation fails.
 
-2.6.5.8 `bfd_make_section_anyway_with_flags'
+2.6.5.8 'bfd_make_section_anyway_with_flags'
 ............................................
 
 *Synopsis*
@@ -2167,13 +2163,13 @@ chain of sections for ABFD.  Create a ne
 already a section with that name.  Also set the attributes of the new
 section to the value FLAGS.
 
-   Return `NULL' and set `bfd_error' on error; possible errors are:
-   * `bfd_error_invalid_operation' - If output has already started for
-     ABFD.
+   Return 'NULL' and set 'bfd_error' on error; possible errors are:
 
-   * `bfd_error_no_memory' - If memory allocation fails.
+   * 'bfd_error_invalid_operation' - If output has already started for
+     ABFD.
+   * 'bfd_error_no_memory' - If memory allocation fails.
 
-2.6.5.9 `bfd_make_section_anyway'
+2.6.5.9 'bfd_make_section_anyway'
 .................................
 
 *Synopsis*
@@ -2183,37 +2179,44 @@ Create a new empty section called NAME a
 chain of sections for ABFD.  Create a new section even if there is
 already a section with that name.
 
-   Return `NULL' and set `bfd_error' on error; possible errors are:
-   * `bfd_error_invalid_operation' - If output has already started for
-     ABFD.
+   Return 'NULL' and set 'bfd_error' on error; possible errors are:
 
-   * `bfd_error_no_memory' - If memory allocation fails.
+   * 'bfd_error_invalid_operation' - If output has already started for
+     ABFD.
+   * 'bfd_error_no_memory' - If memory allocation fails.
 
-2.6.5.10 `bfd_make_section_with_flags'
+2.6.5.10 'bfd_make_section_with_flags'
 ......................................
 
 *Synopsis*
      asection *bfd_make_section_with_flags
         (bfd *, const char *name, flagword flags);
    *Description*
-Like `bfd_make_section_anyway', but return `NULL' (without calling
-bfd_set_error ()) without changing the section chain if there is
-already a section named NAME.  Also set the attributes of the new
-section to the value FLAGS.  If there is an error, return `NULL' and set
-`bfd_error'.
+Like 'bfd_make_section_anyway', but return 'NULL' (without calling
+bfd_set_error ()) without changing the section chain if there is already
+a section named NAME.  Also set the attributes of the new section to the
+value FLAGS.  If there is an error, return 'NULL' and set 'bfd_error'.
 
-2.6.5.11 `bfd_make_section'
+2.6.5.11 'bfd_make_section'
 ...........................
 
 *Synopsis*
      asection *bfd_make_section (bfd *, const char *name);
    *Description*
-Like `bfd_make_section_anyway', but return `NULL' (without calling
-bfd_set_error ()) without changing the section chain if there is
-already a section named NAME.  If there is an error, return `NULL' and
-set `bfd_error'.
+Like 'bfd_make_section_anyway', but return 'NULL' (without calling
+bfd_set_error ()) without changing the section chain if there is already
+a section named NAME.  If there is an error, return 'NULL' and set
+'bfd_error'.
+
+2.6.5.12 'bfd_get_next_section_id'
+..................................
+
+*Synopsis*
+     int bfd_get_next_section_id (void);
+   *Description*
+Returns the id that the next section created will have.
 
-2.6.5.12 `bfd_set_section_flags'
+2.6.5.13 'bfd_set_section_flags'
 ................................
 
 *Synopsis*
@@ -2221,14 +2224,14 @@ set `bfd_error'.
         (bfd *abfd, asection *sec, flagword flags);
    *Description*
 Set the attributes of the section SEC in the BFD ABFD to the value
-FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
+FLAGS.  Return 'TRUE' on success, 'FALSE' on error.  Possible error
 returns are:
 
-   * `bfd_error_invalid_operation' - The section cannot have one or
-     more of the attributes requested. For example, a .bss section in
-     `a.out' may not have the `SEC_HAS_CONTENTS' field set.
+   * 'bfd_error_invalid_operation' - The section cannot have one or more
+     of the attributes requested.  For example, a .bss section in
+     'a.out' may not have the 'SEC_HAS_CONTENTS' field set.
 
-2.6.5.13 `bfd_rename_section'
+2.6.5.14 'bfd_rename_section'
 .............................
 
 *Synopsis*
@@ -2237,7 +2240,7 @@ returns are:
    *Description*
 Rename section SEC in ABFD to NEWNAME.
 
-2.6.5.14 `bfd_map_over_sections'
+2.6.5.15 'bfd_map_over_sections'
 ................................
 
 *Synopsis*
@@ -2247,7 +2250,7 @@ Rename section SEC in ABFD to NEWNAME.
          void *obj);
    *Description*
 Call the provided function FUNC for each section attached to the BFD
-ABFD, passing OBJ as an argument. The function will be called as if by
+ABFD, passing OBJ as an argument.  The function will be called as if by
 
             func (abfd, the_section, obj);
 
@@ -2258,7 +2261,7 @@ alternative would be to use a loop:
                for (p = abfd->sections; p != NULL; p = p->next)
                   func (abfd, p, ...)
 
-2.6.5.15 `bfd_sections_find_if'
+2.6.5.16 'bfd_sections_find_if'
 ...............................
 
 *Synopsis*
@@ -2268,28 +2271,29 @@ alternative would be to use a loop:
          void *obj);
    *Description*
 Call the provided function OPERATION for each section attached to the
-BFD ABFD, passing OBJ as an argument. The function will be called as if
+BFD ABFD, passing OBJ as an argument.  The function will be called as if
 by
 
             operation (abfd, the_section, obj);
 
    It returns the first section for which OPERATION returns true.
 
-2.6.5.16 `bfd_set_section_size'
+2.6.5.17 'bfd_set_section_size'
 ...............................
 
 *Synopsis*
      bfd_boolean bfd_set_section_size
         (bfd *abfd, asection *sec, bfd_size_type val);
    *Description*
-Set SEC to the size VAL. If the operation is ok, then `TRUE' is
-returned, else `FALSE'.
+Set SEC to the size VAL.  If the operation is ok, then 'TRUE' is
+returned, else 'FALSE'.
 
    Possible error returns:
-   * `bfd_error_invalid_operation' - Writing has started to the BFD, so
+
+   * 'bfd_error_invalid_operation' - Writing has started to the BFD, so
      setting the size is invalid.
 
-2.6.5.17 `bfd_set_section_contents'
+2.6.5.18 'bfd_set_section_contents'
 ...................................
 
 *Synopsis*
@@ -2298,19 +2302,19 @@ returned, else `FALSE'.
          file_ptr offset, bfd_size_type count);
    *Description*
 Sets the contents of the section SECTION in BFD ABFD to the data
-starting in memory at DATA. The data is written to the output section
+starting in memory at DATA.  The data is written to the output section
 starting at offset OFFSET for COUNT octets.
 
-   Normally `TRUE' is returned, else `FALSE'. Possible error returns
+   Normally 'TRUE' is returned, else 'FALSE'.  Possible error returns
 are:
-   * `bfd_error_no_contents' - The output section does not have the
-     `SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
 
+   * 'bfd_error_no_contents' - The output section does not have the
+     'SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
    * and some more too
    This routine is front end to the back end function
-`_bfd_set_section_contents'.
+'_bfd_set_section_contents'.
 
-2.6.5.18 `bfd_get_section_contents'
+2.6.5.19 'bfd_get_section_contents'
 ...................................
 
 *Synopsis*
@@ -2322,12 +2326,12 @@ Read data from SECTION in BFD ABFD into 
 The data is read at an offset of OFFSET from the start of the input
 section, and is read for COUNT bytes.
 
-   If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set
-are requested or if the section does not have the `SEC_HAS_CONTENTS'
-flag set, then the LOCATION is filled with zeroes. If no errors occur,
-`TRUE' is returned, else `FALSE'.
+   If the contents of a constructor with the 'SEC_CONSTRUCTOR' flag set
+are requested or if the section does not have the 'SEC_HAS_CONTENTS'
+flag set, then the LOCATION is filled with zeroes.  If no errors occur,
+'TRUE' is returned, else 'FALSE'.
 
-2.6.5.19 `bfd_malloc_and_get_section'
+2.6.5.20 'bfd_malloc_and_get_section'
 .....................................
 
 *Synopsis*
@@ -2337,7 +2341,7 @@ flag set, then the LOCATION is filled wi
 Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by
 this function.
 
-2.6.5.20 `bfd_copy_private_section_data'
+2.6.5.21 'bfd_copy_private_section_data'
 ........................................
 
 *Synopsis*
@@ -2345,17 +2349,16 @@ this function.
         (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
    *Description*
 Copy private section information from ISEC in the BFD IBFD to the
-section OSEC in the BFD OBFD.  Return `TRUE' on success, `FALSE' on
+section OSEC in the BFD OBFD.  Return 'TRUE' on success, 'FALSE' on
 error.  Possible error returns are:
 
-   * `bfd_error_no_memory' - Not enough memory exists to create private
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
      data for OSEC.
-
      #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
           BFD_SEND (obfd, _bfd_copy_private_section_data, \
                     (ibfd, isection, obfd, osection))
 
-2.6.5.21 `bfd_generic_is_group_section'
+2.6.5.22 'bfd_generic_is_group_section'
 .......................................
 
 *Synopsis*
@@ -2363,7 +2366,7 @@ error.  Possible error returns are:
    *Description*
 Returns TRUE if SEC is a member of a group.
 
-2.6.5.22 `bfd_generic_discard_group'
+2.6.5.23 'bfd_generic_discard_group'
 ....................................
 
 *Synopsis*
@@ -2377,27 +2380,26 @@ File: bfd.info,  Node: Symbols,  Next: A
 2.7 Symbols
 ===========
 
-BFD tries to maintain as much symbol information as it can when it
-moves information from file to file. BFD passes information to
-applications though the `asymbol' structure. When the application
-requests the symbol table, BFD reads the table in the native form and
-translates parts of it into the internal format. To maintain more than
-the information passed to applications, some targets keep some
-information "behind the scenes" in a structure only the particular back
-end knows about. For example, the coff back end keeps the original
-symbol table structure as well as the canonical structure when a BFD is
-read in. On output, the coff back end can reconstruct the output symbol
-table so that no information is lost, even information unique to coff
-which BFD doesn't know or understand. If a coff symbol table were read,
-but were written through an a.out back end, all the coff specific
-information would be lost. The symbol table of a BFD is not necessarily
-read in until a canonicalize request is made. Then the BFD back end
-fills in a table provided by the application with pointers to the
-canonical information.  To output symbols, the application provides BFD
-with a table of pointers to pointers to `asymbol's. This allows
-applications like the linker to output a symbol as it was read, since
-the "behind the scenes" information will be still available.
-
+BFD tries to maintain as much symbol information as it can when it moves
+information from file to file.  BFD passes information to applications
+though the 'asymbol' structure.  When the application requests the
+symbol table, BFD reads the table in the native form and translates
+parts of it into the internal format.  To maintain more than the
+information passed to applications, some targets keep some information
+"behind the scenes" in a structure only the particular back end knows
+about.  For example, the coff back end keeps the original symbol table
+structure as well as the canonical structure when a BFD is read in.  On
+output, the coff back end can reconstruct the output symbol table so
+that no information is lost, even information unique to coff which BFD
+doesn't know or understand.  If a coff symbol table were read, but were
+written through an a.out back end, all the coff specific information
+would be lost.  The symbol table of a BFD is not necessarily read in
+until a canonicalize request is made.  Then the BFD back end fills in a
+table provided by the application with pointers to the canonical
+information.  To output symbols, the application provides BFD with a
+table of pointers to pointers to 'asymbol's.  This allows applications
+like the linker to output a symbol as it was read, since the "behind the
+scenes" information will be still available.
 * Menu:
 
 * Reading Symbols::
@@ -2413,7 +2415,7 @@ File: bfd.info,  Node: Reading Symbols, 
 ---------------------
 
 There are two stages to reading a symbol table from a BFD: allocating
-storage, and the actual reading process. This is an excerpt from an
+storage, and the actual reading process.  This is an excerpt from an
 application which reads the symbol table:
 
               long storage_needed;
@@ -2440,8 +2442,8 @@ application which reads the symbol table
               for (i = 0; i < number_of_symbols; i++)
                 process_symbol (symbol_table[i]);
 
-   All storage for the symbols themselves is in an objalloc connected
-to the BFD; it is freed when the BFD is closed.
+   All storage for the symbols themselves is in an objalloc connected to
+the BFD; it is freed when the BFD is closed.
 
 
 File: bfd.info,  Node: Writing Symbols,  Next: Mini Symbols,  Prev: Reading Symbols,  Up: Symbols
@@ -2450,12 +2452,12 @@ File: bfd.info,  Node: Writing Symbols, 
 ---------------------
 
 Writing of a symbol table is automatic when a BFD open for writing is
-closed. The application attaches a vector of pointers to pointers to
-symbols to the BFD being written, and fills in the symbol count. The
-close and cleanup code reads through the table provided and performs
-all the necessary operations. The BFD output code must always be
-provided with an "owned" symbol: one which has come from another BFD,
-or one which has been created using `bfd_make_empty_symbol'.  Here is an
+closed.  The application attaches a vector of pointers to pointers to
+symbols to the BFD being written, and fills in the symbol count.  The
+close and cleanup code reads through the table provided and performs all
+the necessary operations.  The BFD output code must always be provided
+with an "owned" symbol: one which has come from another BFD, or one
+which has been created using 'bfd_make_empty_symbol'.  Here is an
 example showing the creation of a symbol table with only one element:
 
             #include "sysdep.h"
@@ -2487,9 +2489,9 @@ example showing the creation of a symbol
             00012345 A dummy_symbol
 
    Many formats cannot represent arbitrary symbol information; for
-instance, the `a.out' object format does not allow an arbitrary number
-of sections. A symbol pointing to a section which is not one  of
-`.text', `.data' or `.bss' cannot be described.
+instance, the 'a.out' object format does not allow an arbitrary number
+of sections.  A symbol pointing to a section which is not one of
+'.text', '.data' or '.bss' cannot be described.
 
 
 File: bfd.info,  Node: Mini Symbols,  Next: typedef asymbol,  Prev: Writing Symbols,  Up: Symbols
@@ -2502,17 +2504,17 @@ less memory space, but require more time
 for tools like nm or objdump, which may have to handle symbol tables of
 extremely large executables.
 
-   The `bfd_read_minisymbols' function will read the symbols into
-memory in an internal form.  It will return a `void *' pointer to a
-block of memory, a symbol count, and the size of each symbol.  The
-pointer is allocated using `malloc', and should be freed by the caller
-when it is no longer needed.
+   The 'bfd_read_minisymbols' function will read the symbols into memory
+in an internal form.  It will return a 'void *' pointer to a block of
+memory, a symbol count, and the size of each symbol.  The pointer is
+allocated using 'malloc', and should be freed by the caller when it is
+no longer needed.
 
-   The function `bfd_minisymbol_to_symbol' will take a pointer to a
+   The function 'bfd_minisymbol_to_symbol' will take a pointer to a
 minisymbol, and a pointer to a structure returned by
-`bfd_make_empty_symbol', and return a `asymbol' structure.  The return
+'bfd_make_empty_symbol', and return a 'asymbol' structure.  The return
 value may or may not be the same as the value from
-`bfd_make_empty_symbol' which was passed in.
+'bfd_make_empty_symbol' which was passed in.
 
 
 File: bfd.info,  Node: typedef asymbol,  Next: symbol handling functions,  Prev: Mini Symbols,  Up: Symbols
@@ -2520,7 +2522,7 @@ File: bfd.info,  Node: typedef asymbol, 
 2.7.4 typedef asymbol
 ---------------------
 
-An `asymbol' has the form:
+An 'asymbol' has the form:
 
 
      typedef struct bfd_symbol
@@ -2548,11 +2550,11 @@ An `asymbol' has the form:
        /* Attributes of a symbol.  */
      #define BSF_NO_FLAGS           0x00
 
-       /* The symbol has local scope; `static' in `C'. The value
+       /* The symbol has local scope; static in C. The value
           is the offset into the section of the data.  */
      #define BSF_LOCAL              (1 << 0)
 
-       /* The symbol has global scope; initialized data in `C'. The
+       /* The symbol has global scope; initialized data in C. The
           value is the offset into the section of the data.  */
      #define BSF_GLOBAL             (1 << 1)
 
@@ -2561,8 +2563,7 @@ An `asymbol' has the form:
      #define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
 
        /* A normal C symbol would be one of:
-          `BSF_LOCAL', `BSF_COMMON',  `BSF_UNDEFINED' or
-          `BSF_GLOBAL'.  */
+          BSF_LOCAL, BSF_UNDEFINED or BSF_GLOBAL.  */
 
        /* The symbol is a debugging record. The value has an arbitrary
           meaning, unless BSF_DEBUGGING_RELOC is also set.  */
@@ -2574,7 +2575,9 @@ An `asymbol' has the form:
 
        /* Used by the linker.  */
      #define BSF_KEEP               (1 << 5)
-     #define BSF_KEEP_G             (1 << 6)
+
+       /* An ELF common symbol.  */
+     #define BSF_ELF_COMMON         (1 << 6)
 
        /* A weak global symbol, overridable without warnings by
           a regular global symbol of the same name.  */
@@ -2589,8 +2592,8 @@ An `asymbol' has the form:
      #define BSF_OLD_COMMON         (1 << 9)
 
        /* In some files the type of a symbol sometimes alters its
-          location in an output file - ie in coff a `ISFCN' symbol
-          which is also `C_EXT' symbol appears where it was
+          location in an output file - ie in coff a ISFCN symbol
+          which is also C_EXT symbol appears where it was
           declared and not at the end of a section.  This bit is set
           by the target BFD part to convey this information.  */
      #define BSF_NOT_AT_END         (1 << 10)
@@ -2665,24 +2668,26 @@ An `asymbol' has the form:
      }
      asymbol;
 
+
 
 File: bfd.info,  Node: symbol handling functions,  Prev: typedef asymbol,  Up: Symbols
 
 2.7.5 Symbol handling functions
 -------------------------------
 
-2.7.5.1 `bfd_get_symtab_upper_bound'
+2.7.5.1 'bfd_get_symtab_upper_bound'
 ....................................
 
 *Description*
 Return the number of bytes required to store a vector of pointers to
-`asymbols' for all the symbols in the BFD ABFD, including a terminal
-NULL pointer. If there are no symbols in the BFD, then return 0.  If an
+'asymbols' for all the symbols in the BFD ABFD, including a terminal
+NULL pointer.  If there are no symbols in the BFD, then return 0.  If an
 error occurs, return -1.
      #define bfd_get_symtab_upper_bound(abfd) \
           BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
 
-2.7.5.2 `bfd_is_local_label'
+
+2.7.5.2 'bfd_is_local_label'
 ............................
 
 *Synopsis*
@@ -2691,41 +2696,44 @@ error occurs, return -1.
 Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
 generated local label, else return FALSE.
 
-2.7.5.3 `bfd_is_local_label_name'
+2.7.5.3 'bfd_is_local_label_name'
 .................................
 
 *Synopsis*
      bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
    *Description*
-Return TRUE if a symbol with the name NAME in the BFD ABFD is a
-compiler generated local label, else return FALSE.  This just checks
-whether the name has the form of a local label.
+Return TRUE if a symbol with the name NAME in the BFD ABFD is a compiler
+generated local label, else return FALSE. This just checks whether the
+name has the form of a local label.
      #define bfd_is_local_label_name(abfd, name) \
        BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
 
-2.7.5.4 `bfd_is_target_special_symbol'
+
+2.7.5.4 'bfd_is_target_special_symbol'
 ......................................
 
 *Synopsis*
      bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
    *Description*
-Return TRUE iff a symbol SYM in the BFD ABFD is something special to
-the particular target represented by the BFD.  Such symbols should
-normally not be mentioned to the user.
+Return TRUE iff a symbol SYM in the BFD ABFD is something special to the
+particular target represented by the BFD. Such symbols should normally
+not be mentioned to the user.
      #define bfd_is_target_special_symbol(abfd, sym) \
        BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
 
-2.7.5.5 `bfd_canonicalize_symtab'
+
+2.7.5.5 'bfd_canonicalize_symtab'
 .................................
 
 *Description*
 Read the symbols from the BFD ABFD, and fills in the vector LOCATION
-with pointers to the symbols and a trailing NULL.  Return the actual
+with pointers to the symbols and a trailing NULL. Return the actual
 number of symbol pointers, not including the NULL.
      #define bfd_canonicalize_symtab(abfd, location) \
        BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
 
-2.7.5.6 `bfd_set_symtab'
+
+2.7.5.6 'bfd_set_symtab'
 ........................
 
 *Synopsis*
@@ -2735,7 +2743,7 @@ number of symbol pointers, not including
 Arrange that when the output BFD ABFD is closed, the table LOCATION of
 COUNT pointers to symbols will be written.
 
-2.7.5.7 `bfd_print_symbol_vandf'
+2.7.5.7 'bfd_print_symbol_vandf'
 ................................
 
 *Synopsis*
@@ -2743,40 +2751,42 @@ COUNT pointers to symbols will be writte
    *Description*
 Print the value and flags of the SYMBOL supplied to the stream FILE.
 
-2.7.5.8 `bfd_make_empty_symbol'
+2.7.5.8 'bfd_make_empty_symbol'
 ...............................
 
 *Description*
-Create a new `asymbol' structure for the BFD ABFD and return a pointer
+Create a new 'asymbol' structure for the BFD ABFD and return a pointer
 to it.
 
    This routine is necessary because each back end has private
-information surrounding the `asymbol'. Building your own `asymbol' and
+information surrounding the 'asymbol'.  Building your own 'asymbol' and
 pointing to it will not create the private information, and will cause
 problems later on.
      #define bfd_make_empty_symbol(abfd) \
        BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
 
-2.7.5.9 `_bfd_generic_make_empty_symbol'
+
+2.7.5.9 '_bfd_generic_make_empty_symbol'
 ........................................
 
 *Synopsis*
      asymbol *_bfd_generic_make_empty_symbol (bfd *);
    *Description*
-Create a new `asymbol' structure for the BFD ABFD and return a pointer
+Create a new 'asymbol' structure for the BFD ABFD and return a pointer
 to it.  Used by core file routines, binary back-end and anywhere else
 where no private info is needed.
 
-2.7.5.10 `bfd_make_debug_symbol'
+2.7.5.10 'bfd_make_debug_symbol'
 ................................
 
 *Description*
-Create a new `asymbol' structure for the BFD ABFD, to be used as a
+Create a new 'asymbol' structure for the BFD ABFD, to be used as a
 debugging symbol.  Further details of its use have yet to be worked out.
      #define bfd_make_debug_symbol(abfd,ptr,size) \
        BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
 
-2.7.5.11 `bfd_decode_symclass'
+
+2.7.5.11 'bfd_decode_symclass'
 ..............................
 
 *Description*
@@ -2785,8 +2795,8 @@ for an unknown class.
 
    *Synopsis*
      int bfd_decode_symclass (asymbol *symbol);
-   
-2.7.5.12 `bfd_is_undefined_symclass'
+
+2.7.5.12 'bfd_is_undefined_symclass'
 ....................................
 
 *Description*
@@ -2795,8 +2805,8 @@ represents an undefined symbol.  Returns
 
    *Synopsis*
      bfd_boolean bfd_is_undefined_symclass (int symclass);
-   
-2.7.5.13 `bfd_symbol_info'
+
+2.7.5.13 'bfd_symbol_info'
 ..........................
 
 *Description*
@@ -2805,8 +2815,8 @@ be added by the back-ends after calling 
 
    *Synopsis*
      void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-   
-2.7.5.14 `bfd_copy_private_symbol_data'
+
+2.7.5.14 'bfd_copy_private_symbol_data'
 .......................................
 
 *Synopsis*
@@ -2814,16 +2824,16 @@ be added by the back-ends after calling 
         (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
    *Description*
 Copy private symbol information from ISYM in the BFD IBFD to the symbol
-OSYM in the BFD OBFD.  Return `TRUE' on success, `FALSE' on error.
+OSYM in the BFD OBFD.  Return 'TRUE' on success, 'FALSE' on error.
 Possible error returns are:
 
-   * `bfd_error_no_memory' - Not enough memory exists to create private
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
      data for OSEC.
-
      #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
        BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                  (ibfd, isymbol, obfd, osymbol))
 
+
 
 File: bfd.info,  Node: Archives,  Next: Formats,  Prev: Symbols,  Up: BFD front end
 
@@ -2831,30 +2841,30 @@ File: bfd.info,  Node: Archives,  Next: 
 ============
 
 *Description*
-An archive (or library) is just another BFD.  It has a symbol table,
+An archive (or library) is just another BFD. It has a symbol table,
 although there's not much a user program will do with it.
 
-   The big difference between an archive BFD and an ordinary BFD is
-that the archive doesn't have sections.  Instead it has a chain of BFDs
-that are considered its contents.  These BFDs can be manipulated like
-any other.  The BFDs contained in an archive opened for reading will
-all be opened for reading.  You may put either input or output BFDs
-into an archive opened for output; they will be handled correctly when
-the archive is closed.
-
-   Use `bfd_openr_next_archived_file' to step through the contents of
-an archive opened for input.  You don't have to read the entire archive
-if you don't want to!  Read it until you find what you want.
-
-   A BFD returned by `bfd_openr_next_archived_file' can be closed
-manually with `bfd_close'.  If you do not close it, then a second
-iteration through the members of an archive may return the same BFD.
-If you close the archive BFD, then all the member BFDs will
-automatically be closed as well.
+   The big difference between an archive BFD and an ordinary BFD is that
+the archive doesn't have sections.  Instead it has a chain of BFDs that
+are considered its contents.  These BFDs can be manipulated like any
+other.  The BFDs contained in an archive opened for reading will all be
+opened for reading.  You may put either input or output BFDs into an
+archive opened for output; they will be handled correctly when the
+archive is closed.
+
+   Use 'bfd_openr_next_archived_file' to step through the contents of an
+archive opened for input.  You don't have to read the entire archive if
+you don't want to!  Read it until you find what you want.
+
+   A BFD returned by 'bfd_openr_next_archived_file' can be closed
+manually with 'bfd_close'.  If you do not close it, then a second
+iteration through the members of an archive may return the same BFD. If
+you close the archive BFD, then all the member BFDs will automatically
+be closed as well.
 
    Archive contents of output BFDs are chained through the
-`archive_next' pointer in a BFD.  The first one is findable through the
-`archive_head' slot of the archive.  Set it with `bfd_set_archive_head'
+'archive_next' pointer in a BFD. The first one is findable through the
+'archive_head' slot of the archive.  Set it with 'bfd_set_archive_head'
 (q.v.).  A given BFD may be in only one open output archive at a time.
 
    As expected, the BFD archive code is more general than the archive
@@ -2877,12 +2887,12 @@ this case due to restrictions in the for
 utilities are braindead in regards to spaces and such in filenames
 anyway, so this shouldn't be much of a restriction.
 
-   Archives are supported in BFD in `archive.c'.
+   Archives are supported in BFD in 'archive.c'.
 
 2.8.1 Archive functions
 -----------------------
 
-2.8.1.1 `bfd_get_next_mapent'
+2.8.1.1 'bfd_get_next_mapent'
 .............................
 
 *Synopsis*
@@ -2893,13 +2903,13 @@ Step through archive ABFD's symbol table
 update SYM with the next symbol's information, returning that symbol's
 (internal) index into the symbol table.
 
-   Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
-one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
+   Supply 'BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
+one; returns 'BFD_NO_MORE_SYMBOLS' when you've already got the last one.
 
-   A `carsym' is a canonical archive symbol.  The only user-visible
+   A 'carsym' is a canonical archive symbol.  The only user-visible
 element is its name, a null-terminated string.
 
-2.8.1.2 `bfd_set_archive_head'
+2.8.1.2 'bfd_set_archive_head'
 ..............................
 
 *Synopsis*
@@ -2908,7 +2918,7 @@ element is its name, a null-terminated s
 Set the head of the chain of BFDs contained in the archive OUTPUT to
 NEW_HEAD.
 
-2.8.1.3 `bfd_openr_next_archived_file'
+2.8.1.3 'bfd_openr_next_archived_file'
 ......................................
 
 *Synopsis*
@@ -2917,7 +2927,7 @@ NEW_HEAD.
 Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
 BFD on the first contained element and returns that.  Subsequent calls
 should pass the archive and the previous return value to return a
-created BFD to the next contained element. NULL is returned when there
+created BFD to the next contained element.  NULL is returned when there
 are no more.
 
 
@@ -2926,87 +2936,87 @@ File: bfd.info,  Node: Formats,  Next: R
 2.9 File formats
 ================
 
-A format is a BFD concept of high level file contents type. The formats
+A format is a BFD concept of high level file contents type.  The formats
 supported by BFD are:
 
-   * `bfd_object'
+   * 'bfd_object'
    The BFD may contain data, symbols, relocations and debug info.
 
-   * `bfd_archive'
+   * 'bfd_archive'
    The BFD contains other BFDs and an optional index.
 
-   * `bfd_core'
+   * 'bfd_core'
    The BFD contains the result of an executable core dump.
 
 2.9.1 File format functions
 ---------------------------
 
-2.9.1.1 `bfd_check_format'
+2.9.1.1 'bfd_check_format'
 ..........................
 
 *Synopsis*
      bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
    *Description*
 Verify if the file attached to the BFD ABFD is compatible with the
-format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
+format FORMAT (i.e., one of 'bfd_object', 'bfd_archive' or 'bfd_core').
 
    If the BFD has been set to a specific target before the call, only
-the named target and format combination is checked. If the target has
-not been set, or has been set to `default', then all the known target
+the named target and format combination is checked.  If the target has
+not been set, or has been set to 'default', then all the known target
 backends is interrogated to determine a match.  If the default target
 matches, it is used.  If not, exactly one target must recognize the
 file, or an error results.
 
-   The function returns `TRUE' on success, otherwise `FALSE' with one
-of the following error codes:
+   The function returns 'TRUE' on success, otherwise 'FALSE' with one of
+the following error codes:
 
-   * `bfd_error_invalid_operation' - if `format' is not one of
-     `bfd_object', `bfd_archive' or `bfd_core'.
+   * 'bfd_error_invalid_operation' - if 'format' is not one of
+     'bfd_object', 'bfd_archive' or 'bfd_core'.
 
-   * `bfd_error_system_call' - if an error occured during a read - even
+   * 'bfd_error_system_call' - if an error occured during a read - even
      some file mismatches can cause bfd_error_system_calls.
 
-   * `file_not_recognised' - none of the backends recognised the file
+   * 'file_not_recognised' - none of the backends recognised the file
      format.
 
-   * `bfd_error_file_ambiguously_recognized' - more than one backend
+   * 'bfd_error_file_ambiguously_recognized' - more than one backend
      recognised the file format.
 
-2.9.1.2 `bfd_check_format_matches'
+2.9.1.2 'bfd_check_format_matches'
 ..................................
 
 *Synopsis*
      bfd_boolean bfd_check_format_matches
         (bfd *abfd, bfd_format format, char ***matching);
    *Description*
-Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
-set to `bfd_error_file_ambiguously_recognized'.  In that case, if
+Like 'bfd_check_format', except when it returns FALSE with 'bfd_errno'
+set to 'bfd_error_file_ambiguously_recognized'.  In that case, if
 MATCHING is not NULL, it will be filled in with a NULL-terminated list
-of the names of the formats that matched, allocated with `malloc'.
-Then the user may choose a format and try again.
+of the names of the formats that matched, allocated with 'malloc'.  Then
+the user may choose a format and try again.
 
    When done with the list that MATCHING points to, the caller should
 free it.
 
-2.9.1.3 `bfd_set_format'
+2.9.1.3 'bfd_set_format'
 ........................
 
 *Synopsis*
      bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
    *Description*
-This function sets the file format of the BFD ABFD to the format
-FORMAT. If the target set in the BFD does not support the format
-requested, the format is invalid, or the BFD is not open for writing,
-then an error occurs.
+This function sets the file format of the BFD ABFD to the format FORMAT.
+If the target set in the BFD does not support the format requested, the
+format is invalid, or the BFD is not open for writing, then an error
+occurs.
 
-2.9.1.4 `bfd_format_string'
+2.9.1.4 'bfd_format_string'
 ...........................
 
 *Synopsis*
      const char *bfd_format_string (bfd_format format);
    *Description*
-Return a pointer to a const string `invalid', `object', `archive',
-`core', or `unknown', depending upon the value of FORMAT.
+Return a pointer to a const string 'invalid', 'object', 'archive',
+'core', or 'unknown', depending upon the value of FORMAT.
 
 
 File: bfd.info,  Node: Relocations,  Next: Core Files,  Prev: Formats,  Up: BFD front end
@@ -3015,16 +3025,16 @@ File: bfd.info,  Node: Relocations,  Nex
 ================
 
 BFD maintains relocations in much the same way it maintains symbols:
-they are left alone until required, then read in en-masse and
-translated into an internal form.  A common routine
-`bfd_perform_relocation' acts upon the canonical form to do the fixup.
+they are left alone until required, then read in en-masse and translated
+into an internal form.  A common routine 'bfd_perform_relocation' acts
+upon the canonical form to do the fixup.
 
    Relocations are maintained on a per section basis, while symbols are
 maintained on a per BFD basis.
 
-   All that a back end has to do to fit the BFD interface is to create
-a `struct reloc_cache_entry' for each relocation in a particular
-section, and fill in the right bits of the structures.
+   All that a back end has to do to fit the BFD interface is to create a
+'struct reloc_cache_entry' for each relocation in a particular section,
+and fill in the right bits of the structures.
 
 * Menu:
 
@@ -3088,31 +3098,32 @@ This is the structure of a relocation en
 
      }
      arelent;
+
    *Description*
-Here is a description of each of the fields within an `arelent':
+Here is a description of each of the fields within an 'arelent':
 
-   * `sym_ptr_ptr'
-   The symbol table pointer points to a pointer to the symbol
-associated with the relocation request.  It is the pointer into the
-table returned by the back end's `canonicalize_symtab' action. *Note
-Symbols::. The symbol is referenced through a pointer to a pointer so
-that tools like the linker can fix up all the symbols of the same name
-by modifying only one pointer. The relocation routine looks in the
-symbol and uses the base of the section the symbol is attached to and
-the value of the symbol as the initial relocation offset. If the symbol
-pointer is zero, then the section provided is looked up.
+   * 'sym_ptr_ptr'
+   The symbol table pointer points to a pointer to the symbol associated
+with the relocation request.  It is the pointer into the table returned
+by the back end's 'canonicalize_symtab' action.  *Note Symbols::.  The
+symbol is referenced through a pointer to a pointer so that tools like
+the linker can fix up all the symbols of the same name by modifying only
+one pointer.  The relocation routine looks in the symbol and uses the
+base of the section the symbol is attached to and the value of the
+symbol as the initial relocation offset.  If the symbol pointer is zero,
+then the section provided is looked up.
 
-   * `address'
-   The `address' field gives the offset in bytes from the base of the
+   * 'address'
+   The 'address' field gives the offset in bytes from the base of the
 section data which owns the relocation record to the first byte of
-relocatable information. The actual data relocated will be relative to
-this point; for example, a relocation type which modifies the bottom
-two bytes of a four byte word would not touch the first byte pointed to
-in a big endian world.
-
-   * `addend'
-   The `addend' is a value provided by the back end to be added (!)  to
-the relocation offset. Its interpretation is dependent upon the howto.
+relocatable information.  The actual data relocated will be relative to
+this point; for example, a relocation type which modifies the bottom two
+bytes of a four byte word would not touch the first byte pointed to in a
+big endian world.
+
+   * 'addend'
+   The 'addend' is a value provided by the back end to be added (!)  to
+the relocation offset.  Its interpretation is dependent upon the howto.
 For example, on the 68k the code:
 
              char foo[];
@@ -3129,7 +3140,7 @@ For example, on the 68k the code:
              unlk fp
              rts
 
-   This could create a reloc pointing to `foo', but leave the offset in
+   This could create a reloc pointing to 'foo', but leave the offset in
 the data, something like:
 
      RELOCATION RECORDS FOR [.text]:
@@ -3143,15 +3154,15 @@ the data, something like:
      0000000e 4e75               ; rts
 
    Using coff and an 88k, some instructions don't have enough space in
-them to represent the full address range, and pointers have to be
-loaded in two parts. So you'd get something like:
+them to represent the full address range, and pointers have to be loaded
+in two parts.  So you'd get something like:
 
              or.u     r13,r0,hi16(_foo+0x12345678)
              ld.b     r2,r13,lo16(_foo+0x12345678)
              jmp      r1
 
-   This should create two relocs, both pointing to `_foo', and with
-0x12340000 in their addend field. The data would consist of:
+   This should create two relocs, both pointing to '_foo', and with
+0x12340000 in their addend field.  The data would consist of:
 
      RELOCATION RECORDS FOR [.text]:
      offset   type      value
@@ -3164,15 +3175,15 @@ loaded in two parts. So you'd get someth
 
    The relocation routine digs out the value from the data, adds it to
 the addend to get the original offset, and then adds the value of
-`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
+'_foo'.  Note that all 32 bits have to be kept around somewhere, to cope
 with carry from bit 15 to bit 16.
 
-   One further example is the sparc and the a.out format. The sparc has
+   One further example is the sparc and the a.out format.  The sparc has
 a similar problem to the 88k, in that some instructions don't have room
 for an entire offset, but on the sparc the parts are created in odd
-sized lumps. The designers of the a.out format chose to not use the
+sized lumps.  The designers of the a.out format chose to not use the
 data within the section for storing part of the offset; all the offset
-is kept within the reloc. Anything in the data should be ignored.
+is kept within the reloc.  Anything in the data should be ignored.
 
              save %sp,-112,%sp
              sethi %hi(_foo+0x12345678),%g2
@@ -3180,7 +3191,7 @@ is kept within the reloc. Anything in th
              ret
              restore
 
-   Both relocs contain a pointer to `foo', and the offsets contain junk.
+   Both relocs contain a pointer to 'foo', and the offsets contain junk.
 
      RELOCATION RECORDS FOR [.text]:
      offset   type      value
@@ -3193,15 +3204,15 @@ is kept within the reloc. Anything in th
      0000000c 81c7e008     ; ret
      00000010 81e80000     ; restore
 
-   * `howto'
-   The `howto' field can be imagined as a relocation instruction. It is
+   * 'howto'
+   The 'howto' field can be imagined as a relocation instruction.  It is
 a pointer to a structure which contains information on what to do with
-all of the other information in the reloc record and data section. A
+all of the other information in the reloc record and data section.  A
 back end would normally have a relocation instruction set and turn
 relocations into pointers to the correct structure on input - but it
 would be possible to create each howto field on demand.
 
-2.10.1.1 `enum complain_overflow'
+2.10.1.1 'enum complain_overflow'
 .................................
 
 Indicates what sort of overflow checking should be done when performing
@@ -3227,11 +3238,11 @@ a relocation.
        complain_overflow_unsigned
      };
 
-2.10.1.2 `reloc_howto_type'
+2.10.1.2 'reloc_howto_type'
 ...........................
 
-The `reloc_howto_type' is a structure which contains all the
-information that libbfd needs to know to tie up a back end's data.
+The 'reloc_howto_type' is a structure which contains all the information
+that libbfd needs to know to tie up a back end's data.
 
      struct bfd_symbol;             /* Forward declaration.  */
 
@@ -3319,8 +3330,9 @@ information that libbfd needs to know to
           empty (e.g., m88k bcs); this flag signals the fact.  */
        bfd_boolean pcrel_offset;
      };
-   
-2.10.1.3 `The HOWTO Macro'
+
+
+2.10.1.3 'The HOWTO Macro'
 ..........................
 
 *Description*
@@ -3329,18 +3341,20 @@ The HOWTO define is horrible and will go
        { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
 
    *Description*
-And will be replaced with the totally magic way. But for the moment, we
+And will be replaced with the totally magic way.  But for the moment, we
 are compatible, so do it this way.
      #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
        HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
               NAME, FALSE, 0, 0, IN)
 
+
    *Description*
 This is used to fill in an empty howto entry in an array.
      #define EMPTY_HOWTO(C) \
        HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
               NULL, FALSE, 0, 0, FALSE)
 
+
    *Description*
 Helper routine to turn a symbol into a relocation value.
      #define HOWTO_PREPARE(relocation, symbol)               \
@@ -3358,7 +3372,8 @@ Helper routine to turn a symbol into a r
            }                                                 \
        }
 
-2.10.1.4 `bfd_get_reloc_size'
+
+2.10.1.4 'bfd_get_reloc_size'
 .............................
 
 *Synopsis*
@@ -3367,11 +3382,11 @@ Helper routine to turn a symbol into a r
 For a reloc_howto_type that operates on a fixed number of bytes, this
 returns the number of bytes operated on.
 
-2.10.1.5 `arelent_chain'
+2.10.1.5 'arelent_chain'
 ........................
 
 *Description*
-How relocs are tied together in an `asection':
+How relocs are tied together in an 'asection':
      typedef struct relent_chain
      {
        arelent relent;
@@ -3379,7 +3394,8 @@ How relocs are tied together in an `asec
      }
      arelent_chain;
 
-2.10.1.6 `bfd_check_overflow'
+
+2.10.1.6 'bfd_check_overflow'
 .............................
 
 *Synopsis*
@@ -3393,9 +3409,9 @@ How relocs are tied together in an `asec
 Perform overflow checking on RELOCATION which has BITSIZE significant
 bits and will be shifted right by RIGHTSHIFT bits, on a machine with
 addresses containing ADDRSIZE significant bits.  The result is either of
-`bfd_reloc_ok' or `bfd_reloc_overflow'.
+'bfd_reloc_ok' or 'bfd_reloc_overflow'.
 
-2.10.1.7 `bfd_perform_relocation'
+2.10.1.7 'bfd_perform_relocation'
 .................................
 
 *Synopsis*
@@ -3409,18 +3425,18 @@ addresses containing ADDRSIZE significan
    *Description*
 If OUTPUT_BFD is supplied to this function, the generated image will be
 relocatable; the relocations are copied to the output file after they
-have been changed to reflect the new state of the world. There are two
+have been changed to reflect the new state of the world.  There are two
 ways of reflecting the results of partial linkage in an output file: by
 modifying the output data in place, and by modifying the relocation
 record.  Some native formats (e.g., basic a.out and basic coff) have no
-way of specifying an addend in the relocation type, so the addend has
-to go in the output data.  This is no big deal since in these formats
-the output data slot will always be big enough for the addend. Complex
+way of specifying an addend in the relocation type, so the addend has to
+go in the output data.  This is no big deal since in these formats the
+output data slot will always be big enough for the addend.  Complex
 reloc types with addends were invented to solve just this problem.  The
 ERROR_MESSAGE argument is set to an error message if this return
-`bfd_reloc_dangerous'.
+'bfd_reloc_dangerous'.
 
-2.10.1.8 `bfd_install_relocation'
+2.10.1.8 'bfd_install_relocation'
 .................................
 
 *Synopsis*
@@ -3431,7 +3447,7 @@ ERROR_MESSAGE argument is set to an erro
          asection *input_section,
          char **error_message);
    *Description*
-This looks remarkably like `bfd_perform_relocation', except it does not
+This looks remarkably like 'bfd_perform_relocation', except it does not
 expect that the section contents have been filled in.  I.e., it's
 suitable for use when creating, rather than applying a relocation.
 
@@ -3448,20 +3464,20 @@ When an application wants to create a re
 the target machine might call it, it can find out by using this bit of
 code.
 
-2.10.2.1 `bfd_reloc_code_type'
+2.10.2.1 'bfd_reloc_code_type'
 ..............................
 
 *Description*
 The insides of a reloc code.  The idea is that, eventually, there will
 be one enumerator for every type of relocation we ever do.  Pass one of
-these values to `bfd_reloc_type_lookup', and it'll return a howto
+these values to 'bfd_reloc_type_lookup', and it'll return a howto
 pointer.
 
    This does mean that the application must determine the correct
 enumerator value; you can't get a howto pointer from a random set of
 attributes.
 
-   Here are the possible values for `enum bfd_reloc_code_real':
+   Here are the possible values for 'enum bfd_reloc_code_real':
 
  -- : BFD_RELOC_64
  -- : BFD_RELOC_32
@@ -3471,7 +3487,6 @@ attributes.
  -- : BFD_RELOC_14
  -- : BFD_RELOC_8
      Basic absolute relocations of N bits.
-
  -- : BFD_RELOC_64_PCREL
  -- : BFD_RELOC_32_PCREL
  -- : BFD_RELOC_24_PCREL
@@ -3484,10 +3499,8 @@ attributes.
      the specific target.
 
      The 24-bit relocation is used in some Intel 960 configurations.
-
  -- : BFD_RELOC_32_SECREL
      Section relative relocations.  Some targets need this for DWARF2.
-
  -- : BFD_RELOC_32_GOT_PCREL
  -- : BFD_RELOC_16_GOT_PCREL
  -- : BFD_RELOC_8_GOT_PCREL
@@ -3510,11 +3523,9 @@ attributes.
  -- : BFD_RELOC_HI16_S_PLTOFF
  -- : BFD_RELOC_8_PLTOFF
      For ELF.
-
  -- : BFD_RELOC_SIZE32
  -- : BFD_RELOC_SIZE64
      Size relocations.
-
  -- : BFD_RELOC_68K_GLOB_DAT
  -- : BFD_RELOC_68K_JMP_SLOT
  -- : BFD_RELOC_68K_RELATIVE
@@ -3534,7 +3545,6 @@ attributes.
  -- : BFD_RELOC_68K_TLS_LE16
  -- : BFD_RELOC_68K_TLS_LE8
      Relocations used by 68K ELF.
-
  -- : BFD_RELOC_32_BASEREL
  -- : BFD_RELOC_16_BASEREL
  -- : BFD_RELOC_LO16_BASEREL
@@ -3543,35 +3553,29 @@ attributes.
  -- : BFD_RELOC_8_BASEREL
  -- : BFD_RELOC_RVA
      Linkage-table relative.
-
  -- : BFD_RELOC_8_FFnn
      Absolute 8-bit relocation, but used to form an address like 0xFFnn.
-
  -- : BFD_RELOC_32_PCREL_S2
  -- : BFD_RELOC_16_PCREL_S2
  -- : BFD_RELOC_23_PCREL_S2
      These PC-relative relocations are stored as word displacements -
      i.e., byte displacements shifted right two bits.  The 30-bit word
      displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
-     SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
+     SPARC. (SPARC tools generally refer to this as <<WDISP30>>.)  The
      signed 16-bit displacement is used on the MIPS, and the 23-bit
      displacement is used on the Alpha.
-
  -- : BFD_RELOC_HI22
  -- : BFD_RELOC_LO10
      High 22 bits and low 10 bits of 32-bit value, placed into lower
      bits of the target word.  These are used on the SPARC.
-
  -- : BFD_RELOC_GPREL16
  -- : BFD_RELOC_GPREL32
      For systems that allocate a Global Pointer register, these are
      displacements off that register.  These relocation types are
      handled specially, because the value the register will have is
      decided relatively late.
-
  -- : BFD_RELOC_I960_CALLJ
      Reloc types used for i960/b.out.
-
  -- : BFD_RELOC_NONE
  -- : BFD_RELOC_SPARC_WDISP22
  -- : BFD_RELOC_SPARC22
@@ -3598,11 +3602,9 @@ attributes.
  -- : BFD_RELOC_SPARC_IRELATIVE
      SPARC ELF relocations.  There is probably some overlap with other
      relocation types already defined.
-
  -- : BFD_RELOC_SPARC_BASE13
  -- : BFD_RELOC_SPARC_BASE22
      I think these are specific to SPARC a.out (e.g., Sun 4).
-
  -- : BFD_RELOC_SPARC_64
  -- : BFD_RELOC_SPARC_10
  -- : BFD_RELOC_SPARC_11
@@ -3632,10 +3634,8 @@ attributes.
  -- : BFD_RELOC_SPARC_SIZE64
  -- : BFD_RELOC_SPARC_WDISP10
      SPARC64 relocations
-
  -- : BFD_RELOC_SPARC_REV32
      SPARC little endian relocation
-
  -- : BFD_RELOC_SPARC_TLS_GD_HI22
  -- : BFD_RELOC_SPARC_TLS_GD_LO10
  -- : BFD_RELOC_SPARC_TLS_GD_ADD
@@ -3661,7 +3661,6 @@ attributes.
  -- : BFD_RELOC_SPARC_TLS_TPOFF32
  -- : BFD_RELOC_SPARC_TLS_TPOFF64
      SPARC TLS relocations
-
  -- : BFD_RELOC_SPU_IMM7
  -- : BFD_RELOC_SPU_IMM8
  -- : BFD_RELOC_SPU_IMM10
@@ -3678,7 +3677,6 @@ attributes.
  -- : BFD_RELOC_SPU_PPU64
  -- : BFD_RELOC_SPU_ADD_PIC
      SPU Relocations.
-
  -- : BFD_RELOC_ALPHA_GPDISP_HI16
      Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
      "addend" in some special way.  For GPDISP_HI16 ("gpdisp")
@@ -3686,18 +3684,15 @@ attributes.
      will be the absolute section symbol.  The addend is the
      displacement in bytes of the "lda" instruction from the "ldah"
      instruction (which is at the address of this reloc).
-
  -- : BFD_RELOC_ALPHA_GPDISP_LO16
      For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
      with GPDISP_HI16 relocs.  The addend is ignored when writing the
      relocations out, and is filled in with the file's GP value on
      reading, for convenience.
-
  -- : BFD_RELOC_ALPHA_GPDISP
      The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
      relocation except that there is no accompanying GPDISP_LO16
      relocation.
-
  -- : BFD_RELOC_ALPHA_LITERAL
  -- : BFD_RELOC_ALPHA_ELF_LITERAL
  -- : BFD_RELOC_ALPHA_LITUSE
@@ -3722,48 +3717,38 @@ attributes.
      optimize away some literal section references.  The symbol is
      ignored (read as the absolute section symbol), and the "addend"
      indicates the type of instruction using the register: 1 - "memory"
-     fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
-     of branch)
-
+     fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target of
+     branch)
  -- : BFD_RELOC_ALPHA_HINT
      The HINT relocation indicates a value that should be filled into
      the "hint" field of a jmp/jsr/ret instruction, for possible branch-
      prediction logic which may be provided on some processors.
-
  -- : BFD_RELOC_ALPHA_LINKAGE
      The LINKAGE relocation outputs a linkage pair in the object file,
      which is filled by the linker.
-
  -- : BFD_RELOC_ALPHA_CODEADDR
      The CODEADDR relocation outputs a STO_CA in the object file, which
      is filled by the linker.
-
  -- : BFD_RELOC_ALPHA_GPREL_HI16
  -- : BFD_RELOC_ALPHA_GPREL_LO16
      The GPREL_HI/LO relocations together form a 32-bit offset from the
      GP register.
-
  -- : BFD_RELOC_ALPHA_BRSGP
      Like BFD_RELOC_23_PCREL_S2, except that the source and target must
      share a common GP, and the target address is adjusted for
      STO_ALPHA_STD_GPLOAD.
-
  -- : BFD_RELOC_ALPHA_NOP
      The NOP relocation outputs a NOP if the longword displacement
      between two procedure entry points is < 2^21.
-
  -- : BFD_RELOC_ALPHA_BSR
      The BSR relocation outputs a BSR if the longword displacement
      between two procedure entry points is < 2^21.
-
  -- : BFD_RELOC_ALPHA_LDA
      The LDA relocation outputs a LDA if the longword displacement
      between two procedure entry points is < 2^16.
-
  -- : BFD_RELOC_ALPHA_BOH
      The BOH relocation outputs a BSR if the longword displacement
      between two procedure entry points is < 2^21, or else a hint.
-
  -- : BFD_RELOC_ALPHA_TLSGD
  -- : BFD_RELOC_ALPHA_TLSLDM
  -- : BFD_RELOC_ALPHA_DTPMOD64
@@ -3778,55 +3763,41 @@ attributes.
  -- : BFD_RELOC_ALPHA_TPREL_LO16
  -- : BFD_RELOC_ALPHA_TPREL16
      Alpha thread-local storage relocations.
-
  -- : BFD_RELOC_MIPS_JMP
  -- : BFD_RELOC_MICROMIPS_JMP
      The MIPS jump instruction.
-
  -- : BFD_RELOC_MIPS16_JMP
      The MIPS16 jump instruction.
-
  -- : BFD_RELOC_MIPS16_GPREL
      MIPS16 GP relative reloc.
-
  -- : BFD_RELOC_HI16
      High 16 bits of 32-bit value; simple reloc.
-
  -- : BFD_RELOC_HI16_S
      High 16 bits of 32-bit value but the low 16 bits will be sign
      extended and added to form the final result.  If the low 16 bits
      form a negative number, we need to add one to the high value to
      compensate for the borrow when the low bits are added.
-
  -- : BFD_RELOC_LO16
      Low 16 bits.
-
  -- : BFD_RELOC_HI16_PCREL
      High 16 bits of 32-bit pc-relative value
-
  -- : BFD_RELOC_HI16_S_PCREL
      High 16 bits of 32-bit pc-relative value, adjusted
-
  -- : BFD_RELOC_LO16_PCREL
      Low 16 bits of pc-relative value
-
  -- : BFD_RELOC_MIPS16_GOT16
  -- : BFD_RELOC_MIPS16_CALL16
      Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
      16-bit immediate fields
-
  -- : BFD_RELOC_MIPS16_HI16
      MIPS16 high 16 bits of 32-bit value.
-
  -- : BFD_RELOC_MIPS16_HI16_S
      MIPS16 high 16 bits of 32-bit value but the low 16 bits will be
      sign extended and added to form the final result.  If the low 16
      bits form a negative number, we need to add one to the high value
      to compensate for the borrow when the low bits are added.
-
  -- : BFD_RELOC_MIPS16_LO16
      MIPS16 low 16 bits.
-
  -- : BFD_RELOC_MIPS16_TLS_GD
  -- : BFD_RELOC_MIPS16_TLS_LDM
  -- : BFD_RELOC_MIPS16_TLS_DTPREL_HI16
@@ -3835,28 +3806,25 @@ attributes.
  -- : BFD_RELOC_MIPS16_TLS_TPREL_HI16
  -- : BFD_RELOC_MIPS16_TLS_TPREL_LO16
      MIPS16 TLS relocations
-
  -- : BFD_RELOC_MIPS_LITERAL
  -- : BFD_RELOC_MICROMIPS_LITERAL
      Relocation against a MIPS literal section.
-
  -- : BFD_RELOC_MICROMIPS_7_PCREL_S1
  -- : BFD_RELOC_MICROMIPS_10_PCREL_S1
  -- : BFD_RELOC_MICROMIPS_16_PCREL_S1
      microMIPS PC-relative relocations.
-
+ -- : BFD_RELOC_MIPS16_16_PCREL_S1
+     MIPS16 PC-relative relocation.
  -- : BFD_RELOC_MIPS_21_PCREL_S2
  -- : BFD_RELOC_MIPS_26_PCREL_S2
  -- : BFD_RELOC_MIPS_18_PCREL_S3
  -- : BFD_RELOC_MIPS_19_PCREL_S2
      MIPS PC-relative relocations.
-
  -- : BFD_RELOC_MICROMIPS_GPREL16
  -- : BFD_RELOC_MICROMIPS_HI16
  -- : BFD_RELOC_MICROMIPS_HI16_S
  -- : BFD_RELOC_MICROMIPS_LO16
      microMIPS versions of generic BFD relocs.
-
  -- : BFD_RELOC_MIPS_GOT16
  -- : BFD_RELOC_MICROMIPS_GOT16
  -- : BFD_RELOC_MIPS_CALL16
@@ -3914,20 +3882,16 @@ attributes.
  -- : BFD_RELOC_MICROMIPS_TLS_TPREL_LO16
  -- : BFD_RELOC_MIPS_EH
      MIPS ELF relocations.
-
  -- : BFD_RELOC_MIPS_COPY
  -- : BFD_RELOC_MIPS_JUMP_SLOT
      MIPS ELF relocations (VxWorks and PLT extensions).
-
  -- : BFD_RELOC_MOXIE_10_PCREL
      Moxie ELF relocations.
-
  -- : BFD_RELOC_FT32_10
  -- : BFD_RELOC_FT32_20
  -- : BFD_RELOC_FT32_17
  -- : BFD_RELOC_FT32_18
      FT32 ELF relocations.
-
  -- : BFD_RELOC_FRV_LABEL16
  -- : BFD_RELOC_FRV_LABEL24
  -- : BFD_RELOC_FRV_LO16
@@ -3968,43 +3932,32 @@ attributes.
  -- : BFD_RELOC_FRV_TLSOFF_RELAX
  -- : BFD_RELOC_FRV_TLSMOFF
      Fujitsu Frv Relocations.
-
  -- : BFD_RELOC_MN10300_GOTOFF24
      This is a 24bit GOT-relative reloc for the mn10300.
-
  -- : BFD_RELOC_MN10300_GOT32
      This is a 32bit GOT-relative reloc for the mn10300, offset by two
      bytes in the instruction.
-
  -- : BFD_RELOC_MN10300_GOT24
      This is a 24bit GOT-relative reloc for the mn10300, offset by two
      bytes in the instruction.
-
  -- : BFD_RELOC_MN10300_GOT16
      This is a 16bit GOT-relative reloc for the mn10300, offset by two
      bytes in the instruction.
-
  -- : BFD_RELOC_MN10300_COPY
      Copy symbol at runtime.
-
  -- : BFD_RELOC_MN10300_GLOB_DAT
      Create GOT entry.
-
  -- : BFD_RELOC_MN10300_JMP_SLOT
      Create PLT entry.
-
  -- : BFD_RELOC_MN10300_RELATIVE
      Adjust by program base.
-
  -- : BFD_RELOC_MN10300_SYM_DIFF
      Together with another reloc targeted at the same location, allows
      for a value that is the difference of two symbols in the same
      section.
-
  -- : BFD_RELOC_MN10300_ALIGN
      The addend of this reloc is an alignment power that must be
      honoured at the offset's location, regardless of linker relaxation.
-
  -- : BFD_RELOC_MN10300_TLS_GD
  -- : BFD_RELOC_MN10300_TLS_LD
  -- : BFD_RELOC_MN10300_TLS_LDO
@@ -4015,15 +3968,12 @@ attributes.
  -- : BFD_RELOC_MN10300_TLS_DTPOFF
  -- : BFD_RELOC_MN10300_TLS_TPOFF
      Various TLS-related relocations.
-
  -- : BFD_RELOC_MN10300_32_PCREL
-     This is a 32bit pcrel reloc for the mn10300, offset by two bytes
-     in the instruction.
-
+     This is a 32bit pcrel reloc for the mn10300, offset by two bytes in
+     the instruction.
  -- : BFD_RELOC_MN10300_16_PCREL
-     This is a 16bit pcrel reloc for the mn10300, offset by two bytes
-     in the instruction.
-
+     This is a 16bit pcrel reloc for the mn10300, offset by two bytes in
+     the instruction.
  -- : BFD_RELOC_386_GOT32
  -- : BFD_RELOC_386_PLT32
  -- : BFD_RELOC_386_COPY
@@ -4048,8 +3998,8 @@ attributes.
  -- : BFD_RELOC_386_TLS_DESC_CALL
  -- : BFD_RELOC_386_TLS_DESC
  -- : BFD_RELOC_386_IRELATIVE
+ -- : BFD_RELOC_386_GOT32X
      i386/elf relocations
-
  -- : BFD_RELOC_X86_64_GOT32
  -- : BFD_RELOC_X86_64_PLT32
  -- : BFD_RELOC_X86_64_COPY
@@ -4079,8 +4029,9 @@ attributes.
  -- : BFD_RELOC_X86_64_IRELATIVE
  -- : BFD_RELOC_X86_64_PC32_BND
  -- : BFD_RELOC_X86_64_PLT32_BND
+ -- : BFD_RELOC_X86_64_GOTPCRELX
+ -- : BFD_RELOC_X86_64_REX_GOTPCRELX
      x86-64/elf relocations
-
  -- : BFD_RELOC_NS32K_IMM_8
  -- : BFD_RELOC_NS32K_IMM_16
  -- : BFD_RELOC_NS32K_IMM_32
@@ -4094,11 +4045,9 @@ attributes.
  -- : BFD_RELOC_NS32K_DISP_16_PCREL
  -- : BFD_RELOC_NS32K_DISP_32_PCREL
      ns32k relocations
-
  -- : BFD_RELOC_PDP11_DISP_8_PCREL
  -- : BFD_RELOC_PDP11_DISP_6_PCREL
      PDP11 relocations
-
  -- : BFD_RELOC_PJ_CODE_HI16
  -- : BFD_RELOC_PJ_CODE_LO16
  -- : BFD_RELOC_PJ_CODE_DIR16
@@ -4106,7 +4055,6 @@ attributes.
  -- : BFD_RELOC_PJ_CODE_REL16
  -- : BFD_RELOC_PJ_CODE_REL32
      Picojava relocs.  Not all of these appear in object files.
-
  -- : BFD_RELOC_PPC_B26
  -- : BFD_RELOC_PPC_BA26
  -- : BFD_RELOC_PPC_TOC16
@@ -4154,6 +4102,8 @@ attributes.
  -- : BFD_RELOC_PPC_VLE_SDAREL_HI16D
  -- : BFD_RELOC_PPC_VLE_SDAREL_HA16A
  -- : BFD_RELOC_PPC_VLE_SDAREL_HA16D
+ -- : BFD_RELOC_PPC_16DX_HA
+ -- : BFD_RELOC_PPC_REL16DX_HA
  -- : BFD_RELOC_PPC64_HIGHER
  -- : BFD_RELOC_PPC64_HIGHER_S
  -- : BFD_RELOC_PPC64_HIGHEST
@@ -4180,8 +4130,8 @@ attributes.
  -- : BFD_RELOC_PPC64_ADDR16_HIGH
  -- : BFD_RELOC_PPC64_ADDR16_HIGHA
  -- : BFD_RELOC_PPC64_ADDR64_LOCAL
+ -- : BFD_RELOC_PPC64_ENTRY
      Power(rs6000) and PowerPC relocations.
-
  -- : BFD_RELOC_PPC_TLS
  -- : BFD_RELOC_PPC_TLSGD
  -- : BFD_RELOC_PPC_TLSLD
@@ -4229,37 +4179,29 @@ attributes.
  -- : BFD_RELOC_PPC64_DTPREL16_HIGH
  -- : BFD_RELOC_PPC64_DTPREL16_HIGHA
      PowerPC and PowerPC64 thread-local storage relocations.
-
  -- : BFD_RELOC_I370_D12
      IBM 370/390 relocations
-
  -- : BFD_RELOC_CTOR
      The type of reloc used to build a constructor table - at the moment
      probably a 32 bit wide absolute relocation, but the target can
      choose.  It generally does map to one of the other relocation
      types.
-
  -- : BFD_RELOC_ARM_PCREL_BRANCH
      ARM 26 bit pc-relative branch.  The lowest two bits must be zero
      and are not stored in the instruction.
-
  -- : BFD_RELOC_ARM_PCREL_BLX
      ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
      not stored in the instruction.  The 2nd lowest bit comes from a 1
      bit field in the instruction.
-
  -- : BFD_RELOC_THUMB_PCREL_BLX
      Thumb 22 bit pc-relative branch.  The lowest bit must be zero and
      is not stored in the instruction.  The 2nd lowest bit comes from a
      1 bit field in the instruction.
-
  -- : BFD_RELOC_ARM_PCREL_CALL
      ARM 26-bit pc-relative branch for an unconditional BL or BLX
      instruction.
-
  -- : BFD_RELOC_ARM_PCREL_JUMP
      ARM 26-bit pc-relative branch for B or conditional BL instruction.
-
  -- : BFD_RELOC_THUMB_PCREL_BRANCH7
  -- : BFD_RELOC_THUMB_PCREL_BRANCH9
  -- : BFD_RELOC_THUMB_PCREL_BRANCH12
@@ -4267,37 +4209,29 @@ attributes.
  -- : BFD_RELOC_THUMB_PCREL_BRANCH23
  -- : BFD_RELOC_THUMB_PCREL_BRANCH25
      Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.  The
-     lowest bit must be zero and is not stored in the instruction.
-     Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-     "nn" one smaller in all cases.  Note further that BRANCH23
-     corresponds to R_ARM_THM_CALL.
-
+     lowest bit must be zero and is not stored in the instruction.  Note
+     that the corresponding ELF R_ARM_THM_JUMPnn constant has an "nn"
+     one smaller in all cases.  Note further that BRANCH23 corresponds
+     to R_ARM_THM_CALL.
  -- : BFD_RELOC_ARM_OFFSET_IMM
      12-bit immediate offset, used in ARM-format ldr and str
      instructions.
-
  -- : BFD_RELOC_ARM_THUMB_OFFSET
      5-bit immediate offset, used in Thumb-format ldr and str
      instructions.
-
  -- : BFD_RELOC_ARM_TARGET1
      Pc-relative or absolute relocation depending on target.  Used for
      entries in .init_array sections.
-
  -- : BFD_RELOC_ARM_ROSEGREL32
      Read-only segment base relative address.
-
  -- : BFD_RELOC_ARM_SBREL32
      Data segment base relative address.
-
  -- : BFD_RELOC_ARM_TARGET2
      This reloc is used for references to RTTI data from exception
      handling tables.  The actual definition depends on the target.  It
      may be a pc-relative or some form of GOT-indirect relocation.
-
  -- : BFD_RELOC_ARM_PREL31
      31-bit PC relative address.
-
  -- : BFD_RELOC_ARM_MOVW
  -- : BFD_RELOC_ARM_MOVT
  -- : BFD_RELOC_ARM_MOVW_PCREL
@@ -4307,7 +4241,6 @@ attributes.
  -- : BFD_RELOC_ARM_THUMB_MOVW_PCREL
  -- : BFD_RELOC_ARM_THUMB_MOVT_PCREL
      Low and High halfword relocations for MOVW and MOVT instructions.
-
  -- : BFD_RELOC_ARM_JUMP_SLOT
  -- : BFD_RELOC_ARM_GLOB_DAT
  -- : BFD_RELOC_ARM_GOT32
@@ -4317,7 +4250,6 @@ attributes.
  -- : BFD_RELOC_ARM_GOTPC
  -- : BFD_RELOC_ARM_GOT_PREL
      Relocations for setting up GOTs and PLTs for shared libraries.
-
  -- : BFD_RELOC_ARM_TLS_GD32
  -- : BFD_RELOC_ARM_TLS_LDO32
  -- : BFD_RELOC_ARM_TLS_LDM32
@@ -4333,7 +4265,6 @@ attributes.
  -- : BFD_RELOC_ARM_THM_TLS_DESCSEQ
  -- : BFD_RELOC_ARM_TLS_DESC
      ARM thread-local storage relocations.
-
  -- : BFD_RELOC_ARM_ALU_PC_G0_NC
  -- : BFD_RELOC_ARM_ALU_PC_G0
  -- : BFD_RELOC_ARM_ALU_PC_G1_NC
@@ -4363,13 +4294,15 @@ attributes.
  -- : BFD_RELOC_ARM_LDC_SB_G1
  -- : BFD_RELOC_ARM_LDC_SB_G2
      ARM group relocations.
-
  -- : BFD_RELOC_ARM_V4BX
      Annotation of BX instructions.
-
  -- : BFD_RELOC_ARM_IRELATIVE
      ARM support for STT_GNU_IFUNC.
-
+ -- : BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC
+ -- : BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC
+ -- : BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC
+ -- : BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC
+     Thumb1 relocations to support execute-only code.
  -- : BFD_RELOC_ARM_IMMEDIATE
  -- : BFD_RELOC_ARM_ADRL_IMMEDIATE
  -- : BFD_RELOC_ARM_T32_IMMEDIATE
@@ -4398,7 +4331,6 @@ attributes.
  -- : BFD_RELOC_ARM_THUMB_SHIFT
      These relocs are only used within the ARM assembler.  They are not
      (at present) written to any object files.
-
  -- : BFD_RELOC_SH_PCDISP8BY2
  -- : BFD_RELOC_SH_PCDISP12BY2
  -- : BFD_RELOC_SH_IMM3
@@ -4498,50 +4430,97 @@ attributes.
  -- : BFD_RELOC_SH_FUNCDESC
      Renesas / SuperH SH relocs.  Not all of these appear in object
      files.
-
- -- : BFD_RELOC_ARC_B22_PCREL
-     ARC Cores relocs.  ARC 22 bit pc-relative branch.  The lowest two
-     bits must be zero and are not stored in the instruction.  The high
-     20 bits are installed in bits 26 through 7 of the instruction.
-
- -- : BFD_RELOC_ARC_B26
-     ARC 26 bit absolute branch.  The lowest two bits must be zero and
-     are not stored in the instruction.  The high 24 bits are installed
-     in bits 23 through 0.
-
+ -- : BFD_RELOC_ARC_NONE
+ -- : BFD_RELOC_ARC_8
+ -- : BFD_RELOC_ARC_16
+ -- : BFD_RELOC_ARC_24
+ -- : BFD_RELOC_ARC_32
+ -- : BFD_RELOC_ARC_N8
+ -- : BFD_RELOC_ARC_N16
+ -- : BFD_RELOC_ARC_N24
+ -- : BFD_RELOC_ARC_N32
+ -- : BFD_RELOC_ARC_SDA
+ -- : BFD_RELOC_ARC_SECTOFF
+ -- : BFD_RELOC_ARC_S21H_PCREL
+ -- : BFD_RELOC_ARC_S21W_PCREL
+ -- : BFD_RELOC_ARC_S25H_PCREL
+ -- : BFD_RELOC_ARC_S25W_PCREL
+ -- : BFD_RELOC_ARC_SDA32
+ -- : BFD_RELOC_ARC_SDA_LDST
+ -- : BFD_RELOC_ARC_SDA_LDST1
+ -- : BFD_RELOC_ARC_SDA_LDST2
+ -- : BFD_RELOC_ARC_SDA16_LD
+ -- : BFD_RELOC_ARC_SDA16_LD1
+ -- : BFD_RELOC_ARC_SDA16_LD2
+ -- : BFD_RELOC_ARC_S13_PCREL
+ -- : BFD_RELOC_ARC_W
+ -- : BFD_RELOC_ARC_32_ME
+ -- : BFD_RELOC_ARC_32_ME_S
+ -- : BFD_RELOC_ARC_N32_ME
+ -- : BFD_RELOC_ARC_SECTOFF_ME
+ -- : BFD_RELOC_ARC_SDA32_ME
+ -- : BFD_RELOC_ARC_W_ME
+ -- : BFD_RELOC_AC_SECTOFF_U8
+ -- : BFD_RELOC_AC_SECTOFF_U8_1
+ -- : BFD_RELOC_AC_SECTOFF_U8_2
+ -- : BFD_RELOC_AC_SECTOFF_S9
+ -- : BFD_RELOC_AC_SECTOFF_S9_1
+ -- : BFD_RELOC_AC_SECTOFF_S9_2
+ -- : BFD_RELOC_ARC_SECTOFF_ME_1
+ -- : BFD_RELOC_ARC_SECTOFF_ME_2
+ -- : BFD_RELOC_ARC_SECTOFF_1
+ -- : BFD_RELOC_ARC_SECTOFF_2
+ -- : BFD_RELOC_ARC_SDA_12
+ -- : BFD_RELOC_ARC_SDA16_ST2
+ -- : BFD_RELOC_ARC_32_PCREL
+ -- : BFD_RELOC_ARC_PC32
+ -- : BFD_RELOC_ARC_GOT32
+ -- : BFD_RELOC_ARC_GOTPC32
+ -- : BFD_RELOC_ARC_PLT32
+ -- : BFD_RELOC_ARC_COPY
+ -- : BFD_RELOC_ARC_GLOB_DAT
+ -- : BFD_RELOC_ARC_JMP_SLOT
+ -- : BFD_RELOC_ARC_RELATIVE
+ -- : BFD_RELOC_ARC_GOTOFF
+ -- : BFD_RELOC_ARC_GOTPC
+ -- : BFD_RELOC_ARC_S21W_PCREL_PLT
+ -- : BFD_RELOC_ARC_S25H_PCREL_PLT
+ -- : BFD_RELOC_ARC_TLS_DTPMOD
+ -- : BFD_RELOC_ARC_TLS_TPOFF
+ -- : BFD_RELOC_ARC_TLS_GD_GOT
+ -- : BFD_RELOC_ARC_TLS_GD_LD
+ -- : BFD_RELOC_ARC_TLS_GD_CALL
+ -- : BFD_RELOC_ARC_TLS_IE_GOT
+ -- : BFD_RELOC_ARC_TLS_DTPOFF
+ -- : BFD_RELOC_ARC_TLS_DTPOFF_S9
+ -- : BFD_RELOC_ARC_TLS_LE_S9
+ -- : BFD_RELOC_ARC_TLS_LE_32
+ -- : BFD_RELOC_ARC_S25W_PCREL_PLT
+ -- : BFD_RELOC_ARC_S21H_PCREL_PLT
+ -- : BFD_RELOC_ARC_NPS_CMEM16
+     ARC relocs.
  -- : BFD_RELOC_BFIN_16_IMM
      ADI Blackfin 16 bit immediate absolute reloc.
-
  -- : BFD_RELOC_BFIN_16_HIGH
      ADI Blackfin 16 bit immediate absolute reloc higher 16 bits.
-
  -- : BFD_RELOC_BFIN_4_PCREL
      ADI Blackfin 'a' part of LSETUP.
-
  -- : BFD_RELOC_BFIN_5_PCREL
      ADI Blackfin.
-
  -- : BFD_RELOC_BFIN_16_LOW
      ADI Blackfin 16 bit immediate absolute reloc lower 16 bits.
-
  -- : BFD_RELOC_BFIN_10_PCREL
      ADI Blackfin.
-
  -- : BFD_RELOC_BFIN_11_PCREL
      ADI Blackfin 'b' part of LSETUP.
-
  -- : BFD_RELOC_BFIN_12_PCREL_JUMP
      ADI Blackfin.
-
  -- : BFD_RELOC_BFIN_12_PCREL_JUMP_S
      ADI Blackfin Short jump, pcrel.
-
  -- : BFD_RELOC_BFIN_24_PCREL_CALL_X
      ADI Blackfin Call.x not implemented.
-
  -- : BFD_RELOC_BFIN_24_PCREL_JUMP_L
      ADI Blackfin Long Jump pcrel.
-
  -- : BFD_RELOC_BFIN_GOT17M4
  -- : BFD_RELOC_BFIN_GOTHI
  -- : BFD_RELOC_BFIN_GOTLO
@@ -4557,176 +4536,126 @@ attributes.
  -- : BFD_RELOC_BFIN_GOTOFFHI
  -- : BFD_RELOC_BFIN_GOTOFFLO
      ADI Blackfin FD-PIC relocations.
-
  -- : BFD_RELOC_BFIN_GOT
      ADI Blackfin GOT relocation.
-
  -- : BFD_RELOC_BFIN_PLTPC
      ADI Blackfin PLTPC relocation.
-
  -- : BFD_ARELOC_BFIN_PUSH
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_CONST
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_ADD
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_SUB
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_MULT
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_DIV
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_MOD
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_LSHIFT
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_RSHIFT
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_AND
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_OR
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_XOR
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_LAND
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_LOR
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_LEN
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_NEG
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_COMP
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_PAGE
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_HWPAGE
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_ARELOC_BFIN_ADDR
      ADI Blackfin arithmetic relocation.
-
  -- : BFD_RELOC_D10V_10_PCREL_R
      Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
      bits assumed to be 0.
-
  -- : BFD_RELOC_D10V_10_PCREL_L
      Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
      bits assumed to be 0.  This is the same as the previous reloc
      except it is in the left container, i.e., shifted left 15 bits.
-
  -- : BFD_RELOC_D10V_18
      This is an 18-bit reloc with the right 2 bits assumed to be 0.
-
  -- : BFD_RELOC_D10V_18_PCREL
      This is an 18-bit reloc with the right 2 bits assumed to be 0.
-
  -- : BFD_RELOC_D30V_6
      Mitsubishi D30V relocs.  This is a 6-bit absolute reloc.
-
  -- : BFD_RELOC_D30V_9_PCREL
      This is a 6-bit pc-relative reloc with the right 3 bits assumed to
      be 0.
-
  -- : BFD_RELOC_D30V_9_PCREL_R
      This is a 6-bit pc-relative reloc with the right 3 bits assumed to
-     be 0. Same as the previous reloc but on the right side of the
+     be 0.  Same as the previous reloc but on the right side of the
      container.
-
  -- : BFD_RELOC_D30V_15
      This is a 12-bit absolute reloc with the right 3 bitsassumed to be
      0.
-
  -- : BFD_RELOC_D30V_15_PCREL
-     This is a 12-bit pc-relative reloc with the right 3 bits assumed
-     to be 0.
-
+     This is a 12-bit pc-relative reloc with the right 3 bits assumed to
+     be 0.
  -- : BFD_RELOC_D30V_15_PCREL_R
-     This is a 12-bit pc-relative reloc with the right 3 bits assumed
-     to be 0. Same as the previous reloc but on the right side of the
+     This is a 12-bit pc-relative reloc with the right 3 bits assumed to
+     be 0.  Same as the previous reloc but on the right side of the
      container.
-
  -- : BFD_RELOC_D30V_21
      This is an 18-bit absolute reloc with the right 3 bits assumed to
      be 0.
-
  -- : BFD_RELOC_D30V_21_PCREL
      This is an 18-bit pc-relative reloc with the right 3 bits assumed
      to be 0.
-
  -- : BFD_RELOC_D30V_21_PCREL_R
      This is an 18-bit pc-relative reloc with the right 3 bits assumed
-     to be 0. Same as the previous reloc but on the right side of the
+     to be 0.  Same as the previous reloc but on the right side of the
      container.
-
  -- : BFD_RELOC_D30V_32
      This is a 32-bit absolute reloc.
-
  -- : BFD_RELOC_D30V_32_PCREL
      This is a 32-bit pc-relative reloc.
-
  -- : BFD_RELOC_DLX_HI16_S
      DLX relocs
-
  -- : BFD_RELOC_DLX_LO16
      DLX relocs
-
  -- : BFD_RELOC_DLX_JMP26
      DLX relocs
-
  -- : BFD_RELOC_M32C_HI8
  -- : BFD_RELOC_M32C_RL_JUMP
  -- : BFD_RELOC_M32C_RL_1ADDR
  -- : BFD_RELOC_M32C_RL_2ADDR
      Renesas M16C/M32C Relocations.
-
  -- : BFD_RELOC_M32R_24
      Renesas M32R (formerly Mitsubishi M32R) relocs.  This is a 24 bit
      absolute address.
-
  -- : BFD_RELOC_M32R_10_PCREL
-     This is a 10-bit pc-relative reloc with the right 2 bits assumed
-     to be 0.
-
+     This is a 10-bit pc-relative reloc with the right 2 bits assumed to
+     be 0.
  -- : BFD_RELOC_M32R_18_PCREL
      This is an 18-bit reloc with the right 2 bits assumed to be 0.
-
  -- : BFD_RELOC_M32R_26_PCREL
      This is a 26-bit reloc with the right 2 bits assumed to be 0.
-
  -- : BFD_RELOC_M32R_HI16_ULO
      This is a 16-bit reloc containing the high 16 bits of an address
      used when the lower 16 bits are treated as unsigned.
-
  -- : BFD_RELOC_M32R_HI16_SLO
      This is a 16-bit reloc containing the high 16 bits of an address
      used when the lower 16 bits are treated as signed.
-
  -- : BFD_RELOC_M32R_LO16
      This is a 16-bit reloc containing the lower 16 bits of an address.
-
  -- : BFD_RELOC_M32R_SDA16
      This is a 16-bit reloc containing the small data area offset for
      use in add3, load, and store instructions.
-
  -- : BFD_RELOC_M32R_GOT24
  -- : BFD_RELOC_M32R_26_PLTREL
  -- : BFD_RELOC_M32R_COPY
@@ -4745,83 +4674,62 @@ attributes.
  -- : BFD_RELOC_M32R_GOTPC_HI_SLO
  -- : BFD_RELOC_M32R_GOTPC_LO
      For PIC.
-
  -- : BFD_RELOC_NDS32_20
      NDS32 relocs.  This is a 20 bit absolute address.
-
  -- : BFD_RELOC_NDS32_9_PCREL
      This is a 9-bit pc-relative reloc with the right 1 bit assumed to
      be 0.
-
  -- : BFD_RELOC_NDS32_WORD_9_PCREL
      This is a 9-bit pc-relative reloc with the right 1 bit assumed to
      be 0.
-
  -- : BFD_RELOC_NDS32_15_PCREL
      This is an 15-bit reloc with the right 1 bit assumed to be 0.
-
  -- : BFD_RELOC_NDS32_17_PCREL
      This is an 17-bit reloc with the right 1 bit assumed to be 0.
-
  -- : BFD_RELOC_NDS32_25_PCREL
      This is a 25-bit reloc with the right 1 bit assumed to be 0.
-
  -- : BFD_RELOC_NDS32_HI20
      This is a 20-bit reloc containing the high 20 bits of an address
      used with the lower 12 bits
-
  -- : BFD_RELOC_NDS32_LO12S3
      This is a 12-bit reloc containing the lower 12 bits of an address
-     then shift right by 3. This is used with ldi,sdi...
-
+     then shift right by 3.  This is used with ldi,sdi...
  -- : BFD_RELOC_NDS32_LO12S2
      This is a 12-bit reloc containing the lower 12 bits of an address
-     then shift left by 2. This is used with lwi,swi...
-
+     then shift left by 2.  This is used with lwi,swi...
  -- : BFD_RELOC_NDS32_LO12S1
      This is a 12-bit reloc containing the lower 12 bits of an address
-     then shift left by 1. This is used with lhi,shi...
-
+     then shift left by 1.  This is used with lhi,shi...
  -- : BFD_RELOC_NDS32_LO12S0
      This is a 12-bit reloc containing the lower 12 bits of an address
-     then shift left by 0. This is used with lbisbi...
-
+     then shift left by 0.  This is used with lbisbi...
  -- : BFD_RELOC_NDS32_LO12S0_ORI
      This is a 12-bit reloc containing the lower 12 bits of an address
-     then shift left by 0. This is only used with branch relaxations
-
+     then shift left by 0.  This is only used with branch relaxations
  -- : BFD_RELOC_NDS32_SDA15S3
-     This is a 15-bit reloc containing the small data area 18-bit
-     signed offset and shift left by 3 for use in ldi, sdi...
-
+     This is a 15-bit reloc containing the small data area 18-bit signed
+     offset and shift left by 3 for use in ldi, sdi...
  -- : BFD_RELOC_NDS32_SDA15S2
-     This is a 15-bit reloc containing the small data area 17-bit
-     signed offset and shift left by 2 for use in lwi, swi...
-
+     This is a 15-bit reloc containing the small data area 17-bit signed
+     offset and shift left by 2 for use in lwi, swi...
  -- : BFD_RELOC_NDS32_SDA15S1
-     This is a 15-bit reloc containing the small data area 16-bit
-     signed offset and shift left by 1 for use in lhi, shi...
-
+     This is a 15-bit reloc containing the small data area 16-bit signed
+     offset and shift left by 1 for use in lhi, shi...
  -- : BFD_RELOC_NDS32_SDA15S0
-     This is a 15-bit reloc containing the small data area 15-bit
-     signed offset and shift left by 0 for use in lbi, sbi...
-
+     This is a 15-bit reloc containing the small data area 15-bit signed
+     offset and shift left by 0 for use in lbi, sbi...
  -- : BFD_RELOC_NDS32_SDA16S3
-     This is a 16-bit reloc containing the small data area 16-bit
-     signed offset and shift left by 3
-
+     This is a 16-bit reloc containing the small data area 16-bit signed
+     offset and shift left by 3
  -- : BFD_RELOC_NDS32_SDA17S2
-     This is a 17-bit reloc containing the small data area 17-bit
-     signed offset and shift left by 2 for use in lwi.gp, swi.gp...
-
+     This is a 17-bit reloc containing the small data area 17-bit signed
+     offset and shift left by 2 for use in lwi.gp, swi.gp...
  -- : BFD_RELOC_NDS32_SDA18S1
-     This is a 18-bit reloc containing the small data area 18-bit
-     signed offset and shift left by 1 for use in lhi.gp, shi.gp...
-
+     This is a 18-bit reloc containing the small data area 18-bit signed
+     offset and shift left by 1 for use in lhi.gp, shi.gp...
  -- : BFD_RELOC_NDS32_SDA19S0
-     This is a 19-bit reloc containing the small data area 19-bit
-     signed offset and shift left by 0 for use in lbi.gp, sbi.gp...
-
+     This is a 19-bit reloc containing the small data area 19-bit signed
+     offset and shift left by 0 for use in lbi.gp, sbi.gp...
  -- : BFD_RELOC_NDS32_GOT20
  -- : BFD_RELOC_NDS32_9_PLTREL
  -- : BFD_RELOC_NDS32_25_PLTREL
@@ -4838,7 +4746,6 @@ attributes.
  -- : BFD_RELOC_NDS32_GOTPC_HI20
  -- : BFD_RELOC_NDS32_GOTPC_LO12
      for PIC
-
  -- : BFD_RELOC_NDS32_INSN16
  -- : BFD_RELOC_NDS32_LABEL
  -- : BFD_RELOC_NDS32_LONGCALL1
@@ -4860,27 +4767,22 @@ attributes.
  -- : BFD_RELOC_NDS32_LONGJUMP6
  -- : BFD_RELOC_NDS32_LONGJUMP7
      for relax
-
  -- : BFD_RELOC_NDS32_PLTREL_HI20
  -- : BFD_RELOC_NDS32_PLTREL_LO12
  -- : BFD_RELOC_NDS32_PLT_GOTREL_HI20
  -- : BFD_RELOC_NDS32_PLT_GOTREL_LO12
      for PIC
-
  -- : BFD_RELOC_NDS32_SDA12S2_DP
  -- : BFD_RELOC_NDS32_SDA12S2_SP
  -- : BFD_RELOC_NDS32_LO12S2_DP
  -- : BFD_RELOC_NDS32_LO12S2_SP
      for floating point
-
  -- : BFD_RELOC_NDS32_DWARF2_OP1
  -- : BFD_RELOC_NDS32_DWARF2_OP2
  -- : BFD_RELOC_NDS32_DWARF2_LEB
      for dwarf2 debug_line.
-
  -- : BFD_RELOC_NDS32_UPDATE_TA
      for eliminate 16-bit instructions
-
  -- : BFD_RELOC_NDS32_PLT_GOTREL_LO20
  -- : BFD_RELOC_NDS32_PLT_GOTREL_LO15
  -- : BFD_RELOC_NDS32_PLT_GOTREL_LO19
@@ -4891,17 +4793,13 @@ attributes.
  -- : BFD_RELOC_NDS32_GOT15S2
  -- : BFD_RELOC_NDS32_GOT17S2
      for PIC object relaxation
-
  -- : BFD_RELOC_NDS32_5
      NDS32 relocs.  This is a 5 bit absolute address.
-
  -- : BFD_RELOC_NDS32_10_UPCREL
      This is a 10-bit unsigned pc-relative reloc with the right 1 bit
      assumed to be 0.
-
  -- : BFD_RELOC_NDS32_SDA_FP7U2_RELA
      If fp were omitted, fp can used as another gp.
-
  -- : BFD_RELOC_NDS32_RELAX_ENTRY
  -- : BFD_RELOC_NDS32_GOT_SUFF
  -- : BFD_RELOC_NDS32_GOTOFF_SUFF
@@ -4921,16 +4819,13 @@ attributes.
  -- : BFD_RELOC_NDS32_DIFF_ULEB128
  -- : BFD_RELOC_NDS32_EMPTY
      relaxation relative relocation types
-
  -- : BFD_RELOC_NDS32_25_ABS
      This is a 25 bit absolute address.
-
  -- : BFD_RELOC_NDS32_DATA
  -- : BFD_RELOC_NDS32_TRAN
  -- : BFD_RELOC_NDS32_17IFC_PCREL
  -- : BFD_RELOC_NDS32_10IFCU_PCREL
      For ex9 and ifc using.
-
  -- : BFD_RELOC_NDS32_TPOFF
  -- : BFD_RELOC_NDS32_TLS_LE_HI20
  -- : BFD_RELOC_NDS32_TLS_LE_LO12
@@ -4945,168 +4840,119 @@ attributes.
  -- : BFD_RELOC_NDS32_TLS_LE_15S1
  -- : BFD_RELOC_NDS32_TLS_LE_15S2
      For TLS.
-
  -- : BFD_RELOC_V850_9_PCREL
      This is a 9-bit reloc
-
  -- : BFD_RELOC_V850_22_PCREL
      This is a 22-bit reloc
-
  -- : BFD_RELOC_V850_SDA_16_16_OFFSET
      This is a 16 bit offset from the short data area pointer.
-
  -- : BFD_RELOC_V850_SDA_15_16_OFFSET
      This is a 16 bit offset (of which only 15 bits are used) from the
      short data area pointer.
-
  -- : BFD_RELOC_V850_ZDA_16_16_OFFSET
      This is a 16 bit offset from the zero data area pointer.
-
  -- : BFD_RELOC_V850_ZDA_15_16_OFFSET
      This is a 16 bit offset (of which only 15 bits are used) from the
      zero data area pointer.
-
  -- : BFD_RELOC_V850_TDA_6_8_OFFSET
      This is an 8 bit offset (of which only 6 bits are used) from the
      tiny data area pointer.
-
  -- : BFD_RELOC_V850_TDA_7_8_OFFSET
      This is an 8bit offset (of which only 7 bits are used) from the
      tiny data area pointer.
-
  -- : BFD_RELOC_V850_TDA_7_7_OFFSET
      This is a 7 bit offset from the tiny data area pointer.
-
  -- : BFD_RELOC_V850_TDA_16_16_OFFSET
      This is a 16 bit offset from the tiny data area pointer.
-
  -- : BFD_RELOC_V850_TDA_4_5_OFFSET
      This is a 5 bit offset (of which only 4 bits are used) from the
      tiny data area pointer.
-
  -- : BFD_RELOC_V850_TDA_4_4_OFFSET
      This is a 4 bit offset from the tiny data area pointer.
-
  -- : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
      This is a 16 bit offset from the short data area pointer, with the
      bits placed non-contiguously in the instruction.
-
  -- : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
      This is a 16 bit offset from the zero data area pointer, with the
      bits placed non-contiguously in the instruction.
-
  -- : BFD_RELOC_V850_CALLT_6_7_OFFSET
      This is a 6 bit offset from the call table base pointer.
-
  -- : BFD_RELOC_V850_CALLT_16_16_OFFSET
      This is a 16 bit offset from the call table base pointer.
-
  -- : BFD_RELOC_V850_LONGCALL
      Used for relaxing indirect function calls.
-
  -- : BFD_RELOC_V850_LONGJUMP
      Used for relaxing indirect jumps.
-
  -- : BFD_RELOC_V850_ALIGN
      Used to maintain alignment whilst relaxing.
-
  -- : BFD_RELOC_V850_LO16_SPLIT_OFFSET
      This is a variation of BFD_RELOC_LO16 that can be used in v850e
      ld.bu instructions.
-
  -- : BFD_RELOC_V850_16_PCREL
      This is a 16-bit reloc.
-
  -- : BFD_RELOC_V850_17_PCREL
      This is a 17-bit reloc.
-
  -- : BFD_RELOC_V850_23
      This is a 23-bit reloc.
-
  -- : BFD_RELOC_V850_32_PCREL
      This is a 32-bit reloc.
-
  -- : BFD_RELOC_V850_32_ABS
      This is a 32-bit reloc.
-
  -- : BFD_RELOC_V850_16_SPLIT_OFFSET
      This is a 16-bit reloc.
-
  -- : BFD_RELOC_V850_16_S1
      This is a 16-bit reloc.
-
  -- : BFD_RELOC_V850_LO16_S1
-     Low 16 bits. 16 bit shifted by 1.
-
+     Low 16 bits.  16 bit shifted by 1.
  -- : BFD_RELOC_V850_CALLT_15_16_OFFSET
      This is a 16 bit offset from the call table base pointer.
-
  -- : BFD_RELOC_V850_32_GOTPCREL
      DSO relocations.
-
  -- : BFD_RELOC_V850_16_GOT
      DSO relocations.
-
  -- : BFD_RELOC_V850_32_GOT
      DSO relocations.
-
  -- : BFD_RELOC_V850_22_PLT_PCREL
      DSO relocations.
-
  -- : BFD_RELOC_V850_32_PLT_PCREL
      DSO relocations.
-
  -- : BFD_RELOC_V850_COPY
      DSO relocations.
-
  -- : BFD_RELOC_V850_GLOB_DAT
      DSO relocations.
-
  -- : BFD_RELOC_V850_JMP_SLOT
      DSO relocations.
-
  -- : BFD_RELOC_V850_RELATIVE
      DSO relocations.
-
  -- : BFD_RELOC_V850_16_GOTOFF
      DSO relocations.
-
  -- : BFD_RELOC_V850_32_GOTOFF
      DSO relocations.
-
  -- : BFD_RELOC_V850_CODE
      start code.
-
  -- : BFD_RELOC_V850_DATA
      start data in text.
-
  -- : BFD_RELOC_TIC30_LDP
      This is a 8bit DP reloc for the tms320c30, where the most
      significant 8 bits of a 24 bit word are placed into the least
      significant 8 bits of the opcode.
-
  -- : BFD_RELOC_TIC54X_PARTLS7
      This is a 7bit reloc for the tms320c54x, where the least
      significant 7 bits of a 16 bit word are placed into the least
      significant 7 bits of the opcode.
-
  -- : BFD_RELOC_TIC54X_PARTMS9
      This is a 9bit DP reloc for the tms320c54x, where the most
      significant 9 bits of a 16 bit word are placed into the least
      significant 9 bits of the opcode.
-
  -- : BFD_RELOC_TIC54X_23
      This is an extended address 23-bit reloc for the tms320c54x.
-
  -- : BFD_RELOC_TIC54X_16_OF_23
      This is a 16-bit reloc for the tms320c54x, where the least
      significant 16 bits of a 23-bit extended address are placed into
      the opcode.
-
  -- : BFD_RELOC_TIC54X_MS7_OF_23
      This is a reloc for the tms320c54x, where the most significant 7
      bits of a 23-bit extended address are placed into the opcode.
-
  -- : BFD_RELOC_C6000_PCR_S21
  -- : BFD_RELOC_C6000_PCR_S12
  -- : BFD_RELOC_C6000_PCR_S10
@@ -5138,38 +4984,29 @@ attributes.
  -- : BFD_RELOC_C6000_FPHEAD
  -- : BFD_RELOC_C6000_NOCMP
      TMS320C6000 relocations.
-
  -- : BFD_RELOC_FR30_48
      This is a 48 bit reloc for the FR30 that stores 32 bits.
-
  -- : BFD_RELOC_FR30_20
      This is a 32 bit reloc for the FR30 that stores 20 bits split up
      into two sections.
-
  -- : BFD_RELOC_FR30_6_IN_4
-     This is a 16 bit reloc for the FR30 that stores a 6 bit word
-     offset in 4 bits.
-
+     This is a 16 bit reloc for the FR30 that stores a 6 bit word offset
+     in 4 bits.
  -- : BFD_RELOC_FR30_8_IN_8
      This is a 16 bit reloc for the FR30 that stores an 8 bit byte
      offset into 8 bits.
-
  -- : BFD_RELOC_FR30_9_IN_8
      This is a 16 bit reloc for the FR30 that stores a 9 bit short
      offset into 8 bits.
-
  -- : BFD_RELOC_FR30_10_IN_8
      This is a 16 bit reloc for the FR30 that stores a 10 bit word
      offset into 8 bits.
-
  -- : BFD_RELOC_FR30_9_PCREL
      This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
      short offset into 8 bits.
-
  -- : BFD_RELOC_FR30_12_PCREL
      This is a 16 bit reloc for the FR30 that stores a 12 bit pc
      relative short offset into 11 bits.
-
  -- : BFD_RELOC_MCORE_PCREL_IMM8BY4
  -- : BFD_RELOC_MCORE_PCREL_IMM11BY2
  -- : BFD_RELOC_MCORE_PCREL_IMM4BY2
@@ -5177,7 +5014,6 @@ attributes.
  -- : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
  -- : BFD_RELOC_MCORE_RVA
      Motorola Mcore relocations.
-
  -- : BFD_RELOC_MEP_8
  -- : BFD_RELOC_MEP_16
  -- : BFD_RELOC_MEP_32
@@ -5199,7 +5035,6 @@ attributes.
  -- : BFD_RELOC_MEP_GNU_VTINHERIT
  -- : BFD_RELOC_MEP_GNU_VTENTRY
      Toshiba Media Processor Relocations.
-
  -- : BFD_RELOC_METAG_HIADDR16
  -- : BFD_RELOC_METAG_LOADDR16
  -- : BFD_RELOC_METAG_RELBRANCH
@@ -5239,194 +5074,201 @@ attributes.
  -- : BFD_RELOC_METAG_TLS_LE_HI16
  -- : BFD_RELOC_METAG_TLS_LE_LO16
      Imagination Technologies Meta relocations.
-
  -- : BFD_RELOC_MMIX_GETA
  -- : BFD_RELOC_MMIX_GETA_1
  -- : BFD_RELOC_MMIX_GETA_2
  -- : BFD_RELOC_MMIX_GETA_3
      These are relocations for the GETA instruction.
-
  -- : BFD_RELOC_MMIX_CBRANCH
  -- : BFD_RELOC_MMIX_CBRANCH_J
  -- : BFD_RELOC_MMIX_CBRANCH_1
  -- : BFD_RELOC_MMIX_CBRANCH_2
  -- : BFD_RELOC_MMIX_CBRANCH_3
      These are relocations for a conditional branch instruction.
-
  -- : BFD_RELOC_MMIX_PUSHJ
  -- : BFD_RELOC_MMIX_PUSHJ_1
  -- : BFD_RELOC_MMIX_PUSHJ_2
  -- : BFD_RELOC_MMIX_PUSHJ_3
  -- : BFD_RELOC_MMIX_PUSHJ_STUBBABLE
      These are relocations for the PUSHJ instruction.
-
  -- : BFD_RELOC_MMIX_JMP
  -- : BFD_RELOC_MMIX_JMP_1
  -- : BFD_RELOC_MMIX_JMP_2
  -- : BFD_RELOC_MMIX_JMP_3
      These are relocations for the JMP instruction.
-
  -- : BFD_RELOC_MMIX_ADDR19
      This is a relocation for a relative address as in a GETA
      instruction or a branch.
-
  -- : BFD_RELOC_MMIX_ADDR27
      This is a relocation for a relative address as in a JMP
      instruction.
-
  -- : BFD_RELOC_MMIX_REG_OR_BYTE
      This is a relocation for an instruction field that may be a general
      register or a value 0..255.
-
  -- : BFD_RELOC_MMIX_REG
      This is a relocation for an instruction field that may be a general
      register.
-
  -- : BFD_RELOC_MMIX_BASE_PLUS_OFFSET
      This is a relocation for two instruction fields holding a register
      and an offset, the equivalent of the relocation.
-
  -- : BFD_RELOC_MMIX_LOCAL
      This relocation is an assertion that the expression is not
      allocated as a global register.  It does not modify contents.
-
  -- : BFD_RELOC_AVR_7_PCREL
      This is a 16 bit reloc for the AVR that stores 8 bit pc relative
      short offset into 7 bits.
-
  -- : BFD_RELOC_AVR_13_PCREL
      This is a 16 bit reloc for the AVR that stores 13 bit pc relative
      short offset into 12 bits.
-
  -- : BFD_RELOC_AVR_16_PM
      This is a 16 bit reloc for the AVR that stores 17 bit value
      (usually program memory address) into 16 bits.
-
  -- : BFD_RELOC_AVR_LO8_LDI
      This is a 16 bit reloc for the AVR that stores 8 bit value (usually
      data memory address) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_HI8_LDI
      This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
      bit of data memory address) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_HH8_LDI
      This is a 16 bit reloc for the AVR that stores 8 bit value (most
-     high 8 bit of program memory address) into 8 bit immediate value
-     of LDI insn.
-
+     high 8 bit of program memory address) into 8 bit immediate value of
+     LDI insn.
  -- : BFD_RELOC_AVR_MS8_LDI
      This is a 16 bit reloc for the AVR that stores 8 bit value (most
      high 8 bit of 32 bit value) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_LO8_LDI_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (usually data memory address) into 8 bit immediate value of SUBI
      insn.
-
  -- : BFD_RELOC_AVR_HI8_LDI_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (high 8 bit of data memory address) into 8 bit immediate value of
      SUBI insn.
-
  -- : BFD_RELOC_AVR_HH8_LDI_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (most high 8 bit of program memory address) into 8 bit immediate
      value of LDI or SUBI insn.
-
  -- : BFD_RELOC_AVR_MS8_LDI_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (msb of 32 bit value) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_LO8_LDI_PM
      This is a 16 bit reloc for the AVR that stores 8 bit value (usually
      command address) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_LO8_LDI_GS
-     This is a 16 bit reloc for the AVR that stores 8 bit value
-     (command address) into 8 bit immediate value of LDI insn. If the
-     address is beyond the 128k boundary, the linker inserts a jump
-     stub for this reloc in the lower 128k.
-
+     This is a 16 bit reloc for the AVR that stores 8 bit value (command
+     address) into 8 bit immediate value of LDI insn.  If the address is
+     beyond the 128k boundary, the linker inserts a jump stub for this
+     reloc in the lower 128k.
  -- : BFD_RELOC_AVR_HI8_LDI_PM
      This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
      bit of command address) into 8 bit immediate value of LDI insn.
-
  -- : BFD_RELOC_AVR_HI8_LDI_GS
      This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
-     bit of command address) into 8 bit immediate value of LDI insn.
-     If the address is beyond the 128k boundary, the linker inserts a
-     jump stub for this reloc below 128k.
-
+     bit of command address) into 8 bit immediate value of LDI insn.  If
+     the address is beyond the 128k boundary, the linker inserts a jump
+     stub for this reloc below 128k.
  -- : BFD_RELOC_AVR_HH8_LDI_PM
      This is a 16 bit reloc for the AVR that stores 8 bit value (most
      high 8 bit of command address) into 8 bit immediate value of LDI
      insn.
-
  -- : BFD_RELOC_AVR_LO8_LDI_PM_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (usually command address) into 8 bit immediate value of SUBI insn.
-
  -- : BFD_RELOC_AVR_HI8_LDI_PM_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (high 8 bit of 16 bit command address) into 8 bit immediate value
      of SUBI insn.
-
  -- : BFD_RELOC_AVR_HH8_LDI_PM_NEG
      This is a 16 bit reloc for the AVR that stores negated 8 bit value
      (high 6 bit of 22 bit command address) into 8 bit immediate value
      of SUBI insn.
-
  -- : BFD_RELOC_AVR_CALL
-     This is a 32 bit reloc for the AVR that stores 23 bit value into
-     22 bits.
-
+     This is a 32 bit reloc for the AVR that stores 23 bit value into 22
+     bits.
  -- : BFD_RELOC_AVR_LDI
      This is a 16 bit reloc for the AVR that stores all needed bits for
      absolute addressing with ldi with overflow check to linktime
-
  -- : BFD_RELOC_AVR_6
      This is a 6 bit reloc for the AVR that stores offset for ldd/std
      instructions
-
  -- : BFD_RELOC_AVR_6_ADIW
      This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
      instructions
-
  -- : BFD_RELOC_AVR_8_LO
      This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
      in .byte lo8(symbol)
-
  -- : BFD_RELOC_AVR_8_HI
      This is a 8 bit reloc for the AVR that stores bits 8..15 of a
      symbol in .byte hi8(symbol)
-
  -- : BFD_RELOC_AVR_8_HLO
      This is a 8 bit reloc for the AVR that stores bits 16..23 of a
      symbol in .byte hlo8(symbol)
-
  -- : BFD_RELOC_AVR_DIFF8
  -- : BFD_RELOC_AVR_DIFF16
  -- : BFD_RELOC_AVR_DIFF32
-     AVR relocations to mark the difference of two local symbols.
-     These are only needed to support linker relaxation and can be
-     ignored when not relaxing.  The field is set to the value of the
-     difference assuming no relaxation.  The relocation encodes the
-     position of the second symbol so the linker can determine whether
-     to adjust the field value.
-
+     AVR relocations to mark the difference of two local symbols.  These
+     are only needed to support linker relaxation and can be ignored
+     when not relaxing.  The field is set to the value of the difference
+     assuming no relaxation.  The relocation encodes the position of the
+     second symbol so the linker can determine whether to adjust the
+     field value.
  -- : BFD_RELOC_AVR_LDS_STS_16
      This is a 7 bit reloc for the AVR that stores SRAM address for
      16bit lds and sts instructions supported only tiny core.
-
  -- : BFD_RELOC_AVR_PORT6
      This is a 6 bit reloc for the AVR that stores an I/O register
      number for the IN and OUT instructions
-
  -- : BFD_RELOC_AVR_PORT5
      This is a 5 bit reloc for the AVR that stores an I/O register
      number for the SBIC, SBIS, SBI and CBI instructions
-
+ -- : BFD_RELOC_RISCV_HI20
+ -- : BFD_RELOC_RISCV_PCREL_HI20
+ -- : BFD_RELOC_RISCV_PCREL_LO12_I
+ -- : BFD_RELOC_RISCV_PCREL_LO12_S
+ -- : BFD_RELOC_RISCV_LO12_I
+ -- : BFD_RELOC_RISCV_LO12_S
+ -- : BFD_RELOC_RISCV_GPREL12_I
+ -- : BFD_RELOC_RISCV_GPREL12_S
+ -- : BFD_RELOC_RISCV_TPREL_HI20
+ -- : BFD_RELOC_RISCV_TPREL_LO12_I
+ -- : BFD_RELOC_RISCV_TPREL_LO12_S
+ -- : BFD_RELOC_RISCV_TPREL_ADD
+ -- : BFD_RELOC_RISCV_CALL
+ -- : BFD_RELOC_RISCV_CALL_PLT
+ -- : BFD_RELOC_RISCV_ADD8
+ -- : BFD_RELOC_RISCV_ADD16
+ -- : BFD_RELOC_RISCV_ADD32
+ -- : BFD_RELOC_RISCV_ADD64
+ -- : BFD_RELOC_RISCV_SUB8
+ -- : BFD_RELOC_RISCV_SUB16
+ -- : BFD_RELOC_RISCV_SUB32
+ -- : BFD_RELOC_RISCV_SUB64
+ -- : BFD_RELOC_RISCV_GOT_HI20
+ -- : BFD_RELOC_RISCV_TLS_GOT_HI20
+ -- : BFD_RELOC_RISCV_TLS_GD_HI20
+ -- : BFD_RELOC_RISCV_JMP
+ -- : BFD_RELOC_RISCV_TLS_DTPMOD32
+ -- : BFD_RELOC_RISCV_TLS_DTPREL32
+ -- : BFD_RELOC_RISCV_TLS_DTPMOD64
+ -- : BFD_RELOC_RISCV_TLS_DTPREL64
+ -- : BFD_RELOC_RISCV_TLS_TPREL32
+ -- : BFD_RELOC_RISCV_TLS_TPREL64
+ -- : BFD_RELOC_RISCV_ALIGN
+ -- : BFD_RELOC_RISCV_RVC_BRANCH
+ -- : BFD_RELOC_RISCV_RVC_JUMP
+ -- : BFD_RELOC_RISCV_RVC_LUI
+ -- : BFD_RELOC_RISCV_GPREL_I
+ -- : BFD_RELOC_RISCV_GPREL_S
+ -- : BFD_RELOC_RISCV_TPREL_I
+ -- : BFD_RELOC_RISCV_TPREL_S
+ -- : BFD_RELOC_RISCV_RELAX
+ -- : BFD_RELOC_RISCV_CFA
+ -- : BFD_RELOC_RISCV_SUB6
+ -- : BFD_RELOC_RISCV_SET6
+ -- : BFD_RELOC_RISCV_SET8
+ -- : BFD_RELOC_RISCV_SET16
+ -- : BFD_RELOC_RISCV_SET32
+     RISC-V relocations.
  -- : BFD_RELOC_RL78_NEG8
  -- : BFD_RELOC_RL78_NEG16
  -- : BFD_RELOC_RL78_NEG24
@@ -5462,7 +5304,6 @@ attributes.
  -- : BFD_RELOC_RL78_CODE
  -- : BFD_RELOC_RL78_SADDR
      Renesas RL78 Relocations.
-
  -- : BFD_RELOC_RX_NEG8
  -- : BFD_RELOC_RX_NEG16
  -- : BFD_RELOC_RX_NEG24
@@ -5491,97 +5332,66 @@ attributes.
  -- : BFD_RELOC_RX_ABS16UL
  -- : BFD_RELOC_RX_RELAX
      Renesas RX Relocations.
-
  -- : BFD_RELOC_390_12
      Direct 12 bit.
-
  -- : BFD_RELOC_390_GOT12
      12 bit GOT offset.
-
  -- : BFD_RELOC_390_PLT32
      32 bit PC relative PLT address.
-
  -- : BFD_RELOC_390_COPY
      Copy symbol at runtime.
-
  -- : BFD_RELOC_390_GLOB_DAT
      Create GOT entry.
-
  -- : BFD_RELOC_390_JMP_SLOT
      Create PLT entry.
-
  -- : BFD_RELOC_390_RELATIVE
      Adjust by program base.
-
  -- : BFD_RELOC_390_GOTPC
      32 bit PC relative offset to GOT.
-
  -- : BFD_RELOC_390_GOT16
      16 bit GOT offset.
-
  -- : BFD_RELOC_390_PC12DBL
      PC relative 12 bit shifted by 1.
-
  -- : BFD_RELOC_390_PLT12DBL
-     12 bit PC rel. PLT shifted by 1.
-
+     12 bit PC rel.  PLT shifted by 1.
  -- : BFD_RELOC_390_PC16DBL
      PC relative 16 bit shifted by 1.
-
  -- : BFD_RELOC_390_PLT16DBL
-     16 bit PC rel. PLT shifted by 1.
-
+     16 bit PC rel.  PLT shifted by 1.
  -- : BFD_RELOC_390_PC24DBL
      PC relative 24 bit shifted by 1.
-
  -- : BFD_RELOC_390_PLT24DBL
-     24 bit PC rel. PLT shifted by 1.
-
+     24 bit PC rel.  PLT shifted by 1.
  -- : BFD_RELOC_390_PC32DBL
      PC relative 32 bit shifted by 1.
-
  -- : BFD_RELOC_390_PLT32DBL
-     32 bit PC rel. PLT shifted by 1.
-
+     32 bit PC rel.  PLT shifted by 1.
  -- : BFD_RELOC_390_GOTPCDBL
-     32 bit PC rel. GOT shifted by 1.
-
+     32 bit PC rel.  GOT shifted by 1.
  -- : BFD_RELOC_390_GOT64
      64 bit GOT offset.
-
  -- : BFD_RELOC_390_PLT64
      64 bit PC relative PLT address.
-
  -- : BFD_RELOC_390_GOTENT
-     32 bit rel. offset to GOT entry.
-
+     32 bit rel.  offset to GOT entry.
  -- : BFD_RELOC_390_GOTOFF64
      64 bit offset to GOT.
-
  -- : BFD_RELOC_390_GOTPLT12
      12-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_390_GOTPLT16
      16-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_390_GOTPLT32
      32-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_390_GOTPLT64
      64-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_390_GOTPLTENT
-     32-bit rel. offset to symbol-entry within GOT, with PLT handling.
-
+     32-bit rel.  offset to symbol-entry within GOT, with PLT handling.
  -- : BFD_RELOC_390_PLTOFF16
-     16-bit rel. offset from the GOT to a PLT entry.
-
+     16-bit rel.  offset from the GOT to a PLT entry.
  -- : BFD_RELOC_390_PLTOFF32
-     32-bit rel. offset from the GOT to a PLT entry.
-
+     32-bit rel.  offset from the GOT to a PLT entry.
  -- : BFD_RELOC_390_PLTOFF64
-     64-bit rel. offset from the GOT to a PLT entry.
-
+     64-bit rel.  offset from the GOT to a PLT entry.
  -- : BFD_RELOC_390_TLS_LOAD
  -- : BFD_RELOC_390_TLS_GDCALL
  -- : BFD_RELOC_390_TLS_LDCALL
@@ -5603,88 +5413,66 @@ attributes.
  -- : BFD_RELOC_390_TLS_DTPOFF
  -- : BFD_RELOC_390_TLS_TPOFF
      s390 tls relocations.
-
  -- : BFD_RELOC_390_20
  -- : BFD_RELOC_390_GOT20
  -- : BFD_RELOC_390_GOTPLT20
  -- : BFD_RELOC_390_TLS_GOTIE20
      Long displacement extension.
-
  -- : BFD_RELOC_390_IRELATIVE
      STT_GNU_IFUNC relocation.
-
  -- : BFD_RELOC_SCORE_GPREL15
      Score relocations Low 16 bit for load/store
-
  -- : BFD_RELOC_SCORE_DUMMY2
  -- : BFD_RELOC_SCORE_JMP
      This is a 24-bit reloc with the right 1 bit assumed to be 0
-
  -- : BFD_RELOC_SCORE_BRANCH
      This is a 19-bit reloc with the right 1 bit assumed to be 0
-
  -- : BFD_RELOC_SCORE_IMM30
      This is a 32-bit reloc for 48-bit instructions.
-
  -- : BFD_RELOC_SCORE_IMM32
      This is a 32-bit reloc for 48-bit instructions.
-
  -- : BFD_RELOC_SCORE16_JMP
      This is a 11-bit reloc with the right 1 bit assumed to be 0
-
  -- : BFD_RELOC_SCORE16_BRANCH
      This is a 8-bit reloc with the right 1 bit assumed to be 0
-
  -- : BFD_RELOC_SCORE_BCMP
      This is a 9-bit reloc with the right 1 bit assumed to be 0
-
  -- : BFD_RELOC_SCORE_GOT15
  -- : BFD_RELOC_SCORE_GOT_LO16
  -- : BFD_RELOC_SCORE_CALL15
  -- : BFD_RELOC_SCORE_DUMMY_HI16
      Undocumented Score relocs
-
  -- : BFD_RELOC_IP2K_FR9
      Scenix IP2K - 9-bit register number / data address
-
  -- : BFD_RELOC_IP2K_BANK
      Scenix IP2K - 4-bit register/data bank number
-
  -- : BFD_RELOC_IP2K_ADDR16CJP
      Scenix IP2K - low 13 bits of instruction word address
-
  -- : BFD_RELOC_IP2K_PAGE3
      Scenix IP2K - high 3 bits of instruction word address
-
  -- : BFD_RELOC_IP2K_LO8DATA
  -- : BFD_RELOC_IP2K_HI8DATA
  -- : BFD_RELOC_IP2K_EX8DATA
      Scenix IP2K - ext/low/high 8 bits of data address
-
  -- : BFD_RELOC_IP2K_LO8INSN
  -- : BFD_RELOC_IP2K_HI8INSN
      Scenix IP2K - low/high 8 bits of instruction word address
-
  -- : BFD_RELOC_IP2K_PC_SKIP
      Scenix IP2K - even/odd PC modifier to modify snb pcl.0
-
  -- : BFD_RELOC_IP2K_TEXT
      Scenix IP2K - 16 bit word address in text section.
-
  -- : BFD_RELOC_IP2K_FR_OFFSET
      Scenix IP2K - 7-bit sp or dp offset
-
  -- : BFD_RELOC_VPE4KMATH_DATA
  -- : BFD_RELOC_VPE4KMATH_INSN
      Scenix VPE4K coprocessor - data/insn-space addressing
-
  -- : BFD_RELOC_VTABLE_INHERIT
  -- : BFD_RELOC_VTABLE_ENTRY
      These two relocations are used by the linker to determine which of
      the entries in a C++ virtual function table are actually used.
-     When the -gc-sections option is given, the linker will zero out
-     the entries that are not used, so that the code for those
-     functions need not be included in the output.
+     When the -gc-sections option is given, the linker will zero out the
+     entries that are not used, so that the code for those functions
+     need not be included in the output.
 
      VTABLE_INHERIT is a zero-space relocation used to describe to the
      linker the inheritance tree of a C++ virtual function table.  The
@@ -5693,11 +5481,10 @@ attributes.
 
      VTABLE_ENTRY is a zero-space relocation that describes the use of a
      virtual function table entry.  The reloc's symbol should refer to
-     the table of the class mentioned in the code.  Off of that base,
-     an offset describes the entry that is being used.  For Rela hosts,
-     this offset is stored in the reloc's addend.  For Rel hosts, we
-     are forced to put this offset in the reloc's section offset.
-
+     the table of the class mentioned in the code.  Off of that base, an
+     offset describes the entry that is being used.  For Rela hosts,
+     this offset is stored in the reloc's addend.  For Rel hosts, we are
+     forced to put this offset in the reloc's section offset.
  -- : BFD_RELOC_IA64_IMM14
  -- : BFD_RELOC_IA64_IMM22
  -- : BFD_RELOC_IA64_IMM64
@@ -5778,111 +5565,83 @@ attributes.
  -- : BFD_RELOC_IA64_DTPREL64LSB
  -- : BFD_RELOC_IA64_LTOFF_DTPREL22
      Intel IA64 Relocations.
-
  -- : BFD_RELOC_M68HC11_HI8
      Motorola 68HC11 reloc.  This is the 8 bit high part of an absolute
      address.
-
  -- : BFD_RELOC_M68HC11_LO8
      Motorola 68HC11 reloc.  This is the 8 bit low part of an absolute
      address.
-
  -- : BFD_RELOC_M68HC11_3B
      Motorola 68HC11 reloc.  This is the 3 bit of a value.
-
  -- : BFD_RELOC_M68HC11_RL_JUMP
      Motorola 68HC11 reloc.  This reloc marks the beginning of a
      jump/call instruction.  It is used for linker relaxation to
      correctly identify beginning of instruction and change some
      branches to use PC-relative addressing mode.
-
  -- : BFD_RELOC_M68HC11_RL_GROUP
      Motorola 68HC11 reloc.  This reloc marks a group of several
-     instructions that gcc generates and for which the linker
-     relaxation pass can modify and/or remove some of them.
-
+     instructions that gcc generates and for which the linker relaxation
+     pass can modify and/or remove some of them.
  -- : BFD_RELOC_M68HC11_LO16
      Motorola 68HC11 reloc.  This is the 16-bit lower part of an
      address.  It is used for 'call' instruction to specify the symbol
      address without any special transformation (due to memory bank
      window).
-
  -- : BFD_RELOC_M68HC11_PAGE
      Motorola 68HC11 reloc.  This is a 8-bit reloc that specifies the
      page number of an address.  It is used by 'call' instruction to
      specify the page number of the symbol.
-
  -- : BFD_RELOC_M68HC11_24
      Motorola 68HC11 reloc.  This is a 24-bit reloc that represents the
      address with a 16-bit value and a 8-bit page number.  The symbol
      address is transformed to follow the 16K memory bank of 68HC12
      (seen as mapped in the window).
-
  -- : BFD_RELOC_M68HC12_5B
      Motorola 68HC12 reloc.  This is the 5 bits of a value.
-
  -- : BFD_RELOC_XGATE_RL_JUMP
-     Freescale XGATE reloc.  This reloc marks the beginning of a
-     bra/jal instruction.
-
+     Freescale XGATE reloc.  This reloc marks the beginning of a bra/jal
+     instruction.
  -- : BFD_RELOC_XGATE_RL_GROUP
      Freescale XGATE reloc.  This reloc marks a group of several
-     instructions that gcc generates and for which the linker
-     relaxation pass can modify and/or remove some of them.
-
+     instructions that gcc generates and for which the linker relaxation
+     pass can modify and/or remove some of them.
  -- : BFD_RELOC_XGATE_LO16
      Freescale XGATE reloc.  This is the 16-bit lower part of an
      address.  It is used for the '16-bit' instructions.
-
  -- : BFD_RELOC_XGATE_GPAGE
      Freescale XGATE reloc.
-
  -- : BFD_RELOC_XGATE_24
      Freescale XGATE reloc.
-
  -- : BFD_RELOC_XGATE_PCREL_9
      Freescale XGATE reloc.  This is a 9-bit pc-relative reloc.
-
  -- : BFD_RELOC_XGATE_PCREL_10
      Freescale XGATE reloc.  This is a 10-bit pc-relative reloc.
-
  -- : BFD_RELOC_XGATE_IMM8_LO
      Freescale XGATE reloc.  This is the 16-bit lower part of an
      address.  It is used for the '16-bit' instructions.
-
  -- : BFD_RELOC_XGATE_IMM8_HI
      Freescale XGATE reloc.  This is the 16-bit higher part of an
      address.  It is used for the '16-bit' instructions.
-
  -- : BFD_RELOC_XGATE_IMM3
      Freescale XGATE reloc.  This is a 3-bit pc-relative reloc.
-
  -- : BFD_RELOC_XGATE_IMM4
      Freescale XGATE reloc.  This is a 4-bit pc-relative reloc.
-
  -- : BFD_RELOC_XGATE_IMM5
      Freescale XGATE reloc.  This is a 5-bit pc-relative reloc.
-
  -- : BFD_RELOC_M68HC12_9B
      Motorola 68HC12 reloc.  This is the 9 bits of a value.
-
  -- : BFD_RELOC_M68HC12_16B
      Motorola 68HC12 reloc.  This is the 16 bits of a value.
-
  -- : BFD_RELOC_M68HC12_9_PCREL
      Motorola 68HC12/XGATE reloc.  This is a PCREL9 branch.
-
  -- : BFD_RELOC_M68HC12_10_PCREL
      Motorola 68HC12/XGATE reloc.  This is a PCREL10 branch.
-
  -- : BFD_RELOC_M68HC12_LO8XG
      Motorola 68HC12/XGATE reloc.  This is the 8 bit low part of an
      absolute address and immediately precedes a matching HI8XG part.
-
  -- : BFD_RELOC_M68HC12_HI8XG
      Motorola 68HC12/XGATE reloc.  This is the 8 bit high part of an
      absolute address and immediately follows a matching LO8XG part.
-
  -- : BFD_RELOC_16C_NUM08
  -- : BFD_RELOC_16C_NUM08_C
  -- : BFD_RELOC_16C_NUM16
@@ -5924,7 +5683,6 @@ attributes.
  -- : BFD_RELOC_16C_IMM32
  -- : BFD_RELOC_16C_IMM32_C
      NS CR16C Relocations.
-
  -- : BFD_RELOC_CR16_NUM8
  -- : BFD_RELOC_CR16_NUM16
  -- : BFD_RELOC_CR16_NUM32
@@ -5959,7 +5717,6 @@ attributes.
  -- : BFD_RELOC_CR16_GOTC_REGREL20
  -- : BFD_RELOC_CR16_GLOB_DAT
      NS CR16 Relocations.
-
  -- : BFD_RELOC_CRX_REL4
  -- : BFD_RELOC_CRX_REL8
  -- : BFD_RELOC_CRX_REL8_CMP
@@ -5981,7 +5738,6 @@ attributes.
  -- : BFD_RELOC_CRX_SWITCH16
  -- : BFD_RELOC_CRX_SWITCH32
      NS CRX Relocations.
-
  -- : BFD_RELOC_CRIS_BDISP8
  -- : BFD_RELOC_CRIS_UNSIGNED_5
  -- : BFD_RELOC_CRIS_SIGNED_6
@@ -5994,35 +5750,26 @@ attributes.
  -- : BFD_RELOC_CRIS_UNSIGNED_4
      These relocs are only used within the CRIS assembler.  They are not
      (at present) written to any object files.
-
  -- : BFD_RELOC_CRIS_COPY
  -- : BFD_RELOC_CRIS_GLOB_DAT
  -- : BFD_RELOC_CRIS_JUMP_SLOT
  -- : BFD_RELOC_CRIS_RELATIVE
      Relocs used in ELF shared libraries for CRIS.
-
  -- : BFD_RELOC_CRIS_32_GOT
      32-bit offset to symbol-entry within GOT.
-
  -- : BFD_RELOC_CRIS_16_GOT
      16-bit offset to symbol-entry within GOT.
-
  -- : BFD_RELOC_CRIS_32_GOTPLT
      32-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_CRIS_16_GOTPLT
      16-bit offset to symbol-entry within GOT, with PLT handling.
-
  -- : BFD_RELOC_CRIS_32_GOTREL
      32-bit offset to symbol, relative to GOT.
-
  -- : BFD_RELOC_CRIS_32_PLT_GOTREL
      32-bit offset to symbol with PLT entry, relative to GOT.
-
  -- : BFD_RELOC_CRIS_32_PLT_PCREL
      32-bit offset to symbol with PLT entry, relative to this
      relocation.
-
  -- : BFD_RELOC_CRIS_32_GOT_GD
  -- : BFD_RELOC_CRIS_16_GOT_GD
  -- : BFD_RELOC_CRIS_32_GD
@@ -6036,7 +5783,6 @@ attributes.
  -- : BFD_RELOC_CRIS_DTPMOD
  -- : BFD_RELOC_CRIS_32_IE
      Relocs used in TLS code for CRIS.
-
  -- : BFD_RELOC_860_COPY
  -- : BFD_RELOC_860_GLOB_DAT
  -- : BFD_RELOC_860_JUMP_SLOT
@@ -6070,7 +5816,6 @@ attributes.
  -- : BFD_RELOC_860_HIGOT
  -- : BFD_RELOC_860_HIGOTOFF
      Intel i860 Relocations.
-
  -- : BFD_RELOC_OR1K_REL_26
  -- : BFD_RELOC_OR1K_GOTPC_HI16
  -- : BFD_RELOC_OR1K_GOTPC_LO16
@@ -6096,7 +5841,6 @@ attributes.
  -- : BFD_RELOC_OR1K_TLS_DTPOFF
  -- : BFD_RELOC_OR1K_TLS_DTPMOD
      OpenRISC 1000 Relocations.
-
  -- : BFD_RELOC_H8_DIR16A8
  -- : BFD_RELOC_H8_DIR16R8
  -- : BFD_RELOC_H8_DIR24A8
@@ -6104,45 +5848,34 @@ attributes.
  -- : BFD_RELOC_H8_DIR32A16
  -- : BFD_RELOC_H8_DISP32A16
      H8 elf Relocations.
-
  -- : BFD_RELOC_XSTORMY16_REL_12
  -- : BFD_RELOC_XSTORMY16_12
  -- : BFD_RELOC_XSTORMY16_24
  -- : BFD_RELOC_XSTORMY16_FPTR16
      Sony Xstormy16 Relocations.
-
  -- : BFD_RELOC_RELC
      Self-describing complex relocations.
-
  -- : BFD_RELOC_XC16X_PAG
  -- : BFD_RELOC_XC16X_POF
  -- : BFD_RELOC_XC16X_SEG
  -- : BFD_RELOC_XC16X_SOF
      Infineon Relocations.
-
  -- : BFD_RELOC_VAX_GLOB_DAT
  -- : BFD_RELOC_VAX_JMP_SLOT
  -- : BFD_RELOC_VAX_RELATIVE
      Relocations used by VAX ELF.
-
  -- : BFD_RELOC_MT_PC16
      Morpho MT - 16 bit immediate relocation.
-
  -- : BFD_RELOC_MT_HI16
      Morpho MT - Hi 16 bits of an address.
-
  -- : BFD_RELOC_MT_LO16
      Morpho MT - Low 16 bits of an address.
-
  -- : BFD_RELOC_MT_GNU_VTINHERIT
      Morpho MT - Used to tell the linker which vtable entries are used.
-
  -- : BFD_RELOC_MT_GNU_VTENTRY
      Morpho MT - Used to tell the linker which vtable entries are used.
-
  -- : BFD_RELOC_MT_PCINSN8
      Morpho MT - 8 bit immediate relocation.
-
  -- : BFD_RELOC_MSP430_10_PCREL
  -- : BFD_RELOC_MSP430_16_PCREL
  -- : BFD_RELOC_MSP430_16
@@ -6166,7 +5899,6 @@ attributes.
  -- : BFD_RELOC_MSP430_PREL31
  -- : BFD_RELOC_MSP430_SYM_DIFF
      msp430 specific relocation codes
-
  -- : BFD_RELOC_NIOS2_S16
  -- : BFD_RELOC_NIOS2_U16
  -- : BFD_RELOC_NIOS2_CALL26
@@ -6220,27 +5952,50 @@ attributes.
  -- : BFD_RELOC_NIOS2_R2_T1X1I6
  -- : BFD_RELOC_NIOS2_R2_T1X1I6_2
      Relocations used by the Altera Nios II core.
-
+ -- : BFD_RELOC_PRU_U16
+     PRU LDI 16-bit unsigned data-memory relocation.
+ -- : BFD_RELOC_PRU_U16_PMEMIMM
+     PRU LDI 16-bit unsigned instruction-memory relocation.
+ -- : BFD_RELOC_PRU_LDI32
+     PRU relocation for two consecutive LDI load instructions that load
+     a 32 bit value into a register.  If the higher bits are all zero,
+     then the second instruction may be relaxed.
+ -- : BFD_RELOC_PRU_S10_PCREL
+     PRU QBBx 10-bit signed PC-relative relocation.
+ -- : BFD_RELOC_PRU_U8_PCREL
+     PRU 8-bit unsigned relocation used for the LOOP instruction.
+ -- : BFD_RELOC_PRU_32_PMEM
+ -- : BFD_RELOC_PRU_16_PMEM
+     PRU Program Memory relocations.  Used to convert from byte
+     addressing to 32-bit word addressing.
+ -- : BFD_RELOC_PRU_GNU_DIFF8
+ -- : BFD_RELOC_PRU_GNU_DIFF16
+ -- : BFD_RELOC_PRU_GNU_DIFF32
+ -- : BFD_RELOC_PRU_GNU_DIFF16_PMEM
+ -- : BFD_RELOC_PRU_GNU_DIFF32_PMEM
+     PRU relocations to mark the difference of two local symbols.  These
+     are only needed to support linker relaxation and can be ignored
+     when not relaxing.  The field is set to the value of the difference
+     assuming no relaxation.  The relocation encodes the position of the
+     second symbol so the linker can determine whether to adjust the
+     field value.  The PMEM variants encode the word difference, instead
+     of byte difference between symbols.
  -- : BFD_RELOC_IQ2000_OFFSET_16
  -- : BFD_RELOC_IQ2000_OFFSET_21
  -- : BFD_RELOC_IQ2000_UHI16
      IQ2000 Relocations.
-
  -- : BFD_RELOC_XTENSA_RTLD
      Special Xtensa relocation used only by PLT entries in ELF shared
-     objects to indicate that the runtime linker should set the value
-     to one of its own internal functions or data structures.
-
+     objects to indicate that the runtime linker should set the value to
+     one of its own internal functions or data structures.
  -- : BFD_RELOC_XTENSA_GLOB_DAT
  -- : BFD_RELOC_XTENSA_JMP_SLOT
  -- : BFD_RELOC_XTENSA_RELATIVE
      Xtensa relocations for ELF shared objects.
-
  -- : BFD_RELOC_XTENSA_PLT
      Xtensa relocation used in ELF object files for symbols that may
      require PLT entries.  Otherwise, this is just a generic 32-bit
      relocation.
-
  -- : BFD_RELOC_XTENSA_DIFF8
  -- : BFD_RELOC_XTENSA_DIFF16
  -- : BFD_RELOC_XTENSA_DIFF32
@@ -6248,9 +6003,8 @@ attributes.
      These are only needed to support linker relaxation and can be
      ignored when not relaxing.  The field is set to the value of the
      difference assuming no relaxation.  The relocation encodes the
-     position of the first symbol so the linker can determine whether
-     to adjust the field value.
-
+     position of the first symbol so the linker can determine whether to
+     adjust the field value.
  -- : BFD_RELOC_XTENSA_SLOT0_OP
  -- : BFD_RELOC_XTENSA_SLOT1_OP
  -- : BFD_RELOC_XTENSA_SLOT2_OP
@@ -6270,7 +6024,6 @@ attributes.
      number is encoded in the relocation.  The relocation applies to the
      last PC-relative immediate operand, or if there are no PC-relative
      immediates, to the last immediate operand.
-
  -- : BFD_RELOC_XTENSA_SLOT0_ALT
  -- : BFD_RELOC_XTENSA_SLOT1_ALT
  -- : BFD_RELOC_XTENSA_SLOT2_ALT
@@ -6288,23 +6041,19 @@ attributes.
  -- : BFD_RELOC_XTENSA_SLOT14_ALT
      Alternate Xtensa relocations.  Only the slot is encoded in the
      relocation.  The meaning of these relocations is opcode-specific.
-
  -- : BFD_RELOC_XTENSA_OP0
  -- : BFD_RELOC_XTENSA_OP1
  -- : BFD_RELOC_XTENSA_OP2
      Xtensa relocations for backward compatibility.  These have all been
      replaced by BFD_RELOC_XTENSA_SLOT0_OP.
-
  -- : BFD_RELOC_XTENSA_ASM_EXPAND
      Xtensa relocation to mark that the assembler expanded the
      instructions from an original target.  The expansion size is
      encoded in the reloc size.
-
  -- : BFD_RELOC_XTENSA_ASM_SIMPLIFY
      Xtensa relocation to mark that the linker should simplify
      assembler-expanded instructions.  This is commonly used internally
      by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND.
-
  -- : BFD_RELOC_XTENSA_TLSDESC_FN
  -- : BFD_RELOC_XTENSA_TLSDESC_ARG
  -- : BFD_RELOC_XTENSA_TLS_DTPOFF
@@ -6313,19 +6062,14 @@ attributes.
  -- : BFD_RELOC_XTENSA_TLS_ARG
  -- : BFD_RELOC_XTENSA_TLS_CALL
      Xtensa TLS relocations.
-
  -- : BFD_RELOC_Z80_DISP8
      8 bit signed offset in (ix+d) or (iy+d).
-
  -- : BFD_RELOC_Z8K_DISP7
      DJNZ offset.
-
  -- : BFD_RELOC_Z8K_CALLR
      CALR offset.
-
  -- : BFD_RELOC_Z8K_IMM4L
      4 bit value.
-
  -- : BFD_RELOC_LM32_CALL
  -- : BFD_RELOC_LM32_BRANCH
  -- : BFD_RELOC_LM32_16_GOT
@@ -6336,438 +6080,406 @@ attributes.
  -- : BFD_RELOC_LM32_JMP_SLOT
  -- : BFD_RELOC_LM32_RELATIVE
      Lattice Mico32 relocations.
-
  -- : BFD_RELOC_MACH_O_SECTDIFF
      Difference between two section addreses.  Must be followed by a
      BFD_RELOC_MACH_O_PAIR.
-
  -- : BFD_RELOC_MACH_O_LOCAL_SECTDIFF
      Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol.
-
  -- : BFD_RELOC_MACH_O_PAIR
      Pair of relocation.  Contains the first symbol.
-
+ -- : BFD_RELOC_MACH_O_SUBTRACTOR32
+     Symbol will be substracted.  Must be followed by a BFD_RELOC_32.
+ -- : BFD_RELOC_MACH_O_SUBTRACTOR64
+     Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
  -- : BFD_RELOC_MACH_O_X86_64_BRANCH32
  -- : BFD_RELOC_MACH_O_X86_64_BRANCH8
      PCREL relocations.  They are marked as branch to create PLT entry
      if required.
-
  -- : BFD_RELOC_MACH_O_X86_64_GOT
      Used when referencing a GOT entry.
-
  -- : BFD_RELOC_MACH_O_X86_64_GOT_LOAD
-     Used when loading a GOT entry with movq.  It is specially marked
-     so that the linker could optimize the movq to a leaq if possible.
-
- -- : BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32
-     Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-
- -- : BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64
-     Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-
+     Used when loading a GOT entry with movq.  It is specially marked so
+     that the linker could optimize the movq to a leaq if possible.
  -- : BFD_RELOC_MACH_O_X86_64_PCREL32_1
      Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.
-
  -- : BFD_RELOC_MACH_O_X86_64_PCREL32_2
      Same as BFD_RELOC_32_PCREL but with an implicit -2 addend.
-
  -- : BFD_RELOC_MACH_O_X86_64_PCREL32_4
      Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
-
+ -- : BFD_RELOC_MACH_O_ARM64_ADDEND
+     Addend for PAGE or PAGEOFF.
+ -- : BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21
+     Relative offset to page of GOT slot.
+ -- : BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12
+     Relative offset within page of GOT slot.
+ -- : BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT
+     Address of a GOT entry.
  -- : BFD_RELOC_MICROBLAZE_32_LO
      This is a 32 bit reloc for the microblaze that stores the low 16
      bits of a value
-
  -- : BFD_RELOC_MICROBLAZE_32_LO_PCREL
      This is a 32 bit pc-relative reloc for the microblaze that stores
      the low 16 bits of a value
-
  -- : BFD_RELOC_MICROBLAZE_32_ROSDA
      This is a 32 bit reloc for the microblaze that stores a value
      relative to the read-only small data area anchor
-
  -- : BFD_RELOC_MICROBLAZE_32_RWSDA
      This is a 32 bit reloc for the microblaze that stores a value
      relative to the read-write small data area anchor
-
  -- : BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM
      This is a 32 bit reloc for the microblaze to handle expressions of
      the form "Symbol Op Symbol"
-
  -- : BFD_RELOC_MICROBLAZE_64_NONE
      This is a 64 bit reloc that stores the 32 bit pc relative value in
      two words (with an imm instruction).  No relocation is done here -
      only used for relaxing
-
  -- : BFD_RELOC_MICROBLAZE_64_GOTPC
      This is a 64 bit reloc that stores the 32 bit pc relative value in
-     two words (with an imm instruction).  The relocation is
-     PC-relative GOT offset
-
+     two words (with an imm instruction).  The relocation is PC-relative
+     GOT offset
  -- : BFD_RELOC_MICROBLAZE_64_GOT
      This is a 64 bit reloc that stores the 32 bit pc relative value in
      two words (with an imm instruction).  The relocation is GOT offset
-
  -- : BFD_RELOC_MICROBLAZE_64_PLT
      This is a 64 bit reloc that stores the 32 bit pc relative value in
-     two words (with an imm instruction).  The relocation is
-     PC-relative offset into PLT
-
+     two words (with an imm instruction).  The relocation is PC-relative
+     offset into PLT
  -- : BFD_RELOC_MICROBLAZE_64_GOTOFF
-     This is a 64 bit reloc that stores the 32 bit GOT relative value
-     in two words (with an imm instruction).  The relocation is
-     relative offset from _GLOBAL_OFFSET_TABLE_
-
+     This is a 64 bit reloc that stores the 32 bit GOT relative value in
+     two words (with an imm instruction).  The relocation is relative
+     offset from _GLOBAL_OFFSET_TABLE_
  -- : BFD_RELOC_MICROBLAZE_32_GOTOFF
-     This is a 32 bit reloc that stores the 32 bit GOT relative value
-     in a word.  The relocation is relative offset from
-
+     This is a 32 bit reloc that stores the 32 bit GOT relative value in
+     a word.  The relocation is relative offset from
  -- : BFD_RELOC_MICROBLAZE_COPY
      This is used to tell the dynamic linker to copy the value out of
      the dynamic object into the runtime process image.
-
  -- : BFD_RELOC_MICROBLAZE_64_TLS
      Unused Reloc
-
  -- : BFD_RELOC_MICROBLAZE_64_TLSGD
-     This is a 64 bit reloc that stores the 32 bit GOT relative value
-     of the GOT TLS GD info entry in two words (with an imm
-     instruction). The relocation is GOT offset.
-
+     This is a 64 bit reloc that stores the 32 bit GOT relative value of
+     the GOT TLS GD info entry in two words (with an imm instruction).
+     The relocation is GOT offset.
  -- : BFD_RELOC_MICROBLAZE_64_TLSLD
-     This is a 64 bit reloc that stores the 32 bit GOT relative value
-     of the GOT TLS LD info entry in two words (with an imm
-     instruction). The relocation is GOT offset.
-
+     This is a 64 bit reloc that stores the 32 bit GOT relative value of
+     the GOT TLS LD info entry in two words (with an imm instruction).
+     The relocation is GOT offset.
  -- : BFD_RELOC_MICROBLAZE_32_TLSDTPMOD
      This is a 32 bit reloc that stores the Module ID to GOT(n).
-
  -- : BFD_RELOC_MICROBLAZE_32_TLSDTPREL
      This is a 32 bit reloc that stores TLS offset to GOT(n+1).
-
  -- : BFD_RELOC_MICROBLAZE_64_TLSDTPREL
      This is a 32 bit reloc for storing TLS offset to two words (uses
      imm instruction)
-
  -- : BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL
      This is a 64 bit reloc that stores 32-bit thread pointer relative
      offset to two words (uses imm instruction).
-
  -- : BFD_RELOC_MICROBLAZE_64_TLSTPREL
      This is a 64 bit reloc that stores 32-bit thread pointer relative
      offset to two words (uses imm instruction).
-
  -- : BFD_RELOC_AARCH64_RELOC_START
      AArch64 pseudo relocation code to mark the start of the AArch64
      relocation enumerators.  N.B. the order of the enumerators is
      important as several tables in the AArch64 bfd backend are indexed
      by these enumerators; make sure they are all synced.
-
+ -- : BFD_RELOC_AARCH64_NULL
+     Deprecated AArch64 null relocation code.
  -- : BFD_RELOC_AARCH64_NONE
      AArch64 null relocation code.
-
  -- : BFD_RELOC_AARCH64_64
  -- : BFD_RELOC_AARCH64_32
  -- : BFD_RELOC_AARCH64_16
      Basic absolute relocations of N bits.  These are equivalent to
      BFD_RELOC_N and they were added to assist the indexing of the howto
      table.
-
  -- : BFD_RELOC_AARCH64_64_PCREL
  -- : BFD_RELOC_AARCH64_32_PCREL
  -- : BFD_RELOC_AARCH64_16_PCREL
      PC-relative relocations.  These are equivalent to BFD_RELOC_N_PCREL
      and they were added to assist the indexing of the howto table.
-
  -- : BFD_RELOC_AARCH64_MOVW_G0
      AArch64 MOV[NZK] instruction with most significant bits 0 to 15 of
      an unsigned address/value.
-
  -- : BFD_RELOC_AARCH64_MOVW_G0_NC
      AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
      an address/value.  No overflow checking.
-
  -- : BFD_RELOC_AARCH64_MOVW_G1
-     AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-     of an unsigned address/value.
-
+     AArch64 MOV[NZK] instruction with most significant bits 16 to 31 of
+     an unsigned address/value.
  -- : BFD_RELOC_AARCH64_MOVW_G1_NC
-     AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-     of an address/value.  No overflow checking.
-
+     AArch64 MOV[NZK] instruction with less significant bits 16 to 31 of
+     an address/value.  No overflow checking.
  -- : BFD_RELOC_AARCH64_MOVW_G2
-     AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-     of an unsigned address/value.
-
+     AArch64 MOV[NZK] instruction with most significant bits 32 to 47 of
+     an unsigned address/value.
  -- : BFD_RELOC_AARCH64_MOVW_G2_NC
-     AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-     of an address/value.  No overflow checking.
-
+     AArch64 MOV[NZK] instruction with less significant bits 32 to 47 of
+     an address/value.  No overflow checking.
  -- : BFD_RELOC_AARCH64_MOVW_G3
      AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 of
      a signed or unsigned address/value.
-
  -- : BFD_RELOC_AARCH64_MOVW_G0_S
-     AArch64 MOV[NZ] instruction with most significant bits 0 to 15 of
-     a signed value.  Changes instruction to MOVZ or MOVN depending on
-     the value's sign.
-
+     AArch64 MOV[NZ] instruction with most significant bits 0 to 15 of a
+     signed value.  Changes instruction to MOVZ or MOVN depending on the
+     value's sign.
  -- : BFD_RELOC_AARCH64_MOVW_G1_S
      AArch64 MOV[NZ] instruction with most significant bits 16 to 31 of
      a signed value.  Changes instruction to MOVZ or MOVN depending on
      the value's sign.
-
  -- : BFD_RELOC_AARCH64_MOVW_G2_S
      AArch64 MOV[NZ] instruction with most significant bits 32 to 47 of
      a signed value.  Changes instruction to MOVZ or MOVN depending on
      the value's sign.
-
  -- : BFD_RELOC_AARCH64_LD_LO19_PCREL
      AArch64 Load Literal instruction, holding a 19 bit pc-relative word
      offset.  The lowest two bits must be zero and are not stored in the
      instruction, giving a 21 bit signed byte offset.
-
  -- : BFD_RELOC_AARCH64_ADR_LO21_PCREL
      AArch64 ADR instruction, holding a simple 21 bit pc-relative byte
      offset.
-
  -- : BFD_RELOC_AARCH64_ADR_HI21_PCREL
      AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
      offset, giving a 4KB aligned page base address.
-
  -- : BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL
      AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
      offset, giving a 4KB aligned page base address, but with no
      overflow checking.
-
  -- : BFD_RELOC_AARCH64_ADD_LO12
      AArch64 ADD immediate instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_LDST8_LO12
      AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_TSTBR14
      AArch64 14 bit pc-relative test bit and branch.  The lowest two
      bits must be zero and are not stored in the instruction, giving a
      16 bit signed byte offset.
-
  -- : BFD_RELOC_AARCH64_BRANCH19
      AArch64 19 bit pc-relative conditional branch and compare & branch.
      The lowest two bits must be zero and are not stored in the
      instruction, giving a 21 bit signed byte offset.
-
  -- : BFD_RELOC_AARCH64_JUMP26
      AArch64 26 bit pc-relative unconditional branch.  The lowest two
      bits must be zero and are not stored in the instruction, giving a
      28 bit signed byte offset.
-
  -- : BFD_RELOC_AARCH64_CALL26
      AArch64 26 bit pc-relative unconditional branch and link.  The
      lowest two bits must be zero and are not stored in the instruction,
      giving a 28 bit signed byte offset.
-
  -- : BFD_RELOC_AARCH64_LDST16_LO12
      AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_LDST32_LO12
      AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_LDST64_LO12
      AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_LDST128_LO12
      AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
      address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
  -- : BFD_RELOC_AARCH64_GOT_LD_PREL19
      AArch64 Load Literal instruction, holding a 19 bit PC relative word
      offset of the global offset table entry for a symbol.  The lowest
-     two bits must be zero and are not stored in the instruction,
-     giving a 21 bit signed byte offset.  This relocation type requires
-     signed overflow checking.
-
+     two bits must be zero and are not stored in the instruction, giving
+     a 21 bit signed byte offset.  This relocation type requires signed
+     overflow checking.
  -- : BFD_RELOC_AARCH64_ADR_GOT_PAGE
      Get to the page base of the global offset table entry for a symbol
      as part of an ADRP instruction using a 21 bit PC relative
      value.Used in conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC.
-
  -- : BFD_RELOC_AARCH64_LD64_GOT_LO12_NC
      Unsigned 12 bit byte offset for 64 bit load/store from the page of
      the GOT entry for this symbol.  Used in conjunction with
-     BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in LP64 ABI only.
-
+     BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in LP64 ABI only.
  -- : BFD_RELOC_AARCH64_LD32_GOT_LO12_NC
      Unsigned 12 bit byte offset for 32 bit load/store from the page of
      the GOT entry for this symbol.  Used in conjunction with
-     BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in ILP32 ABI only.
-
+     BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in ILP32 ABI only.
+ -- : BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
+     Unsigned 16 bit byte offset for 64 bit load/store from the GOT
+     entry for this symbol.  Valid in LP64 ABI only.
+ -- : BFD_RELOC_AARCH64_MOVW_GOTOFF_G1
+     Unsigned 16 bit byte higher offset for 64 bit load/store from the
+     GOT entry for this symbol.  Valid in LP64 ABI only.
  -- : BFD_RELOC_AARCH64_LD64_GOTOFF_LO15
      Unsigned 15 bit byte offset for 64 bit load/store from the page of
-     the GOT entry for this symbol. Valid in ILP64 ABI only.
-
+     the GOT entry for this symbol.  Valid in LP64 ABI only.
  -- : BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14
      Scaled 14 bit byte offset to the page base of the global offset
      table.
-
  -- : BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
      Scaled 15 bit byte offset to the page base of the global offset
      table.
-
  -- : BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21
      Get to the page base of the global offset table entry for a symbols
      tls_index structure as part of an adrp instruction using a 21 bit
      PC relative value.  Used in conjunction with
      BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC.
-
  -- : BFD_RELOC_AARCH64_TLSGD_ADR_PREL21
      AArch64 TLS General Dynamic
-
  -- : BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC
      Unsigned 12 bit byte offset to global offset table entry for a
      symbols tls_index structure.  Used in conjunction with
      BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.
-
- -- : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
-     AArch64 TLS INITIAL EXEC relocation.
-
- -- : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
-     AArch64 TLS INITIAL EXEC relocation.
-
+ -- : BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC
+     AArch64 TLS General Dynamic relocation.
+ -- : BFD_RELOC_AARCH64_TLSGD_MOVW_G1
+     AArch64 TLS General Dynamic relocation.
  -- : BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
      AArch64 TLS INITIAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
      AArch64 TLS INITIAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC
      AArch64 TLS INITIAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19
      AArch64 TLS INITIAL EXEC relocation.
-
+ -- : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
+     AArch64 TLS INITIAL EXEC relocation.
+ -- : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
+     AArch64 TLS INITIAL EXEC relocation.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
+     bit[23:12] of byte offset to module TLS base address.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
+     Unsigned 12 bit byte offset to module TLS base address.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
+     No overflow check version of
+     BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
+     Unsigned 12 bit byte offset to global offset table entry for a
+     symbols tls_index structure.  Used in conjunction with
+     BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
+     GOT entry page address for AArch64 TLS Local Dynamic, used with
+     ADRP instruction.
+ -- : BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
+     GOT entry address for AArch64 TLS Local Dynamic, used with ADR
+     instruction.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12
+     bit[11:1] of byte offset to module TLS base address, encoded in
+     ldst instructions.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
+     Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no
+     overflow check.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12
+     bit[11:2] of byte offset to module TLS base address, encoded in
+     ldst instructions.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
+     Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no
+     overflow check.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12
+     bit[11:3] of byte offset to module TLS base address, encoded in
+     ldst instructions.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
+     Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no
+     overflow check.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12
+     bit[11:0] of byte offset to module TLS base address, encoded in
+     ldst instructions.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
+     Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no
+     overflow check.
+ -- : BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+     bit[15:0] of byte offset to module TLS base address.
+ -- : BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
+     No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+ -- : BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+     bit[31:16] of byte offset to module TLS base address.
+ -- : BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
+     No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+ -- : BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2
+     bit[47:32] of byte offset to module TLS base address.
  -- : BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC
      AArch64 TLS LOCAL EXEC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_LD_PREL19
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_OFF_G1
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_LDR
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_ADD
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_CALL
      AArch64 TLS DESC relocation.
-
  -- : BFD_RELOC_AARCH64_COPY
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_GLOB_DAT
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_JUMP_SLOT
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_RELATIVE
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_TLS_DTPMOD
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_TLS_DTPREL
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_TLS_TPREL
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_TLSDESC
      AArch64 TLS relocation.
-
  -- : BFD_RELOC_AARCH64_IRELATIVE
      AArch64 support for STT_GNU_IFUNC.
-
  -- : BFD_RELOC_AARCH64_RELOC_END
      AArch64 pseudo relocation code to mark the end of the AArch64
      relocation enumerators that have direct mapping to ELF reloc codes.
      There are a few more enumerators after this one; those are mainly
      used by the AArch64 assembler for the internal fixup or to select
      one of the above enumerators.
-
  -- : BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP
      AArch64 pseudo relocation code to be used internally by the AArch64
      assembler and not (currently) written to any object files.
-
  -- : BFD_RELOC_AARCH64_LDST_LO12
-     AArch64 unspecified load/store instruction, holding bits 0 to 11
-     of the address.  Used in conjunction with
+     AArch64 unspecified load/store instruction, holding bits 0 to 11 of
+     the address.  Used in conjunction with
      BFD_RELOC_AARCH64_ADR_HI21_PCREL.
-
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12
+     AArch64 pseudo relocation code for TLS local dynamic mode.  It's to
+     be used internally by the AArch64 assembler and not (currently)
+     written to any object files.
+ -- : BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC
+     Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no
+     overflow check.
  -- : BFD_RELOC_AARCH64_LD_GOT_LO12_NC
      AArch64 pseudo relocation code to be used internally by the AArch64
      assembler and not (currently) written to any object files.
-
  -- : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC
      AArch64 pseudo relocation code to be used internally by the AArch64
      assembler and not (currently) written to any object files.
-
  -- : BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC
      AArch64 pseudo relocation code to be used internally by the AArch64
      assembler and not (currently) written to any object files.
-
  -- : BFD_RELOC_TILEPRO_COPY
  -- : BFD_RELOC_TILEPRO_GLOB_DAT
  -- : BFD_RELOC_TILEPRO_JMP_SLOT
@@ -6848,7 +6560,6 @@ attributes.
  -- : BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA
  -- : BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA
      Tilera TILEPro Relocations.
-
  -- : BFD_RELOC_TILEGX_HW0
  -- : BFD_RELOC_TILEGX_HW1
  -- : BFD_RELOC_TILEGX_HW2
@@ -6959,29 +6670,21 @@ attributes.
  -- : BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD
  -- : BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD
      Tilera TILE-Gx Relocations.
-
  -- : BFD_RELOC_EPIPHANY_SIMM8
      Adapteva EPIPHANY - 8 bit signed pc-relative displacement
-
  -- : BFD_RELOC_EPIPHANY_SIMM24
      Adapteva EPIPHANY - 24 bit signed pc-relative displacement
-
  -- : BFD_RELOC_EPIPHANY_HIGH
      Adapteva EPIPHANY - 16 most-significant bits of absolute address
-
  -- : BFD_RELOC_EPIPHANY_LOW
      Adapteva EPIPHANY - 16 least-significant bits of absolute address
-
  -- : BFD_RELOC_EPIPHANY_SIMM11
      Adapteva EPIPHANY - 11 bit signed number - add/sub immediate
-
  -- : BFD_RELOC_EPIPHANY_IMM11
      Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st
      displacement)
-
  -- : BFD_RELOC_EPIPHANY_IMM8
      Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction.
-
  -- : BFD_RELOC_VISIUM_HI16
  -- : BFD_RELOC_VISIUM_LO16
  -- : BFD_RELOC_VISIUM_IM16
@@ -6993,8 +6696,8 @@ attributes.
 
 
      typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-   
-2.10.2.2 `bfd_reloc_type_lookup'
+
+2.10.2.2 'bfd_reloc_type_lookup'
 ................................
 
 *Synopsis*
@@ -7006,7 +6709,7 @@ attributes.
 Return a pointer to a howto structure which, when invoked, will perform
 the relocation CODE on data from the architecture noted.
 
-2.10.2.3 `bfd_default_reloc_type_lookup'
+2.10.2.3 'bfd_default_reloc_type_lookup'
 ........................................
 
 *Synopsis*
@@ -7015,7 +6718,7 @@ the relocation CODE on data from the arc
    *Description*
 Provides a default relocation lookup routine for any architecture.
 
-2.10.2.4 `bfd_get_reloc_code_name'
+2.10.2.4 'bfd_get_reloc_code_name'
 ..................................
 
 *Synopsis*
@@ -7024,7 +6727,7 @@ Provides a default relocation lookup rou
 Provides a printable name for the supplied relocation code.  Useful
 mainly for printing error messages.
 
-2.10.2.5 `bfd_generic_relax_section'
+2.10.2.5 'bfd_generic_relax_section'
 ....................................
 
 *Synopsis*
@@ -7037,7 +6740,7 @@ mainly for printing error messages.
 Provides default handling for relaxing for back ends which don't do
 relaxing.
 
-2.10.2.6 `bfd_generic_gc_sections'
+2.10.2.6 'bfd_generic_gc_sections'
 ..................................
 
 *Synopsis*
@@ -7047,7 +6750,7 @@ relaxing.
 Provides default handling for relaxing for back ends which don't do
 section gc - i.e., does nothing.
 
-2.10.2.7 `bfd_generic_lookup_section_flags'
+2.10.2.7 'bfd_generic_lookup_section_flags'
 ...........................................
 
 *Synopsis*
@@ -7057,7 +6760,7 @@ section gc - i.e., does nothing.
 Provides default handling for section flags lookup - i.e., does nothing.
 Returns FALSE if the section should be omitted, otherwise TRUE.
 
-2.10.2.8 `bfd_generic_merge_sections'
+2.10.2.8 'bfd_generic_merge_sections'
 .....................................
 
 *Synopsis*
@@ -7067,7 +6770,7 @@ Returns FALSE if the section should be o
 Provides default handling for SEC_MERGE section merging for back ends
 which don't have SEC_MERGE support - i.e., does nothing.
 
-2.10.2.9 `bfd_generic_get_relocated_section_contents'
+2.10.2.9 'bfd_generic_get_relocated_section_contents'
 .....................................................
 
 *Synopsis*
@@ -7079,8 +6782,8 @@ which don't have SEC_MERGE support - i.e
          bfd_boolean relocatable,
          asymbol **symbols);
    *Description*
-Provides default handling of relocation effort for back ends which
-can't be bothered to do it efficiently.
+Provides default handling of relocation effort for back ends which can't
+be bothered to do it efficiently.
 
 
 File: bfd.info,  Node: Core Files,  Next: Targets,  Prev: Relocations,  Up: BFD front end
@@ -7094,7 +6797,7 @@ File: bfd.info,  Node: Core Files,  Next
 *Description*
 These are functions pertaining to core files.
 
-2.11.1.1 `bfd_core_file_failing_command'
+2.11.1.1 'bfd_core_file_failing_command'
 ........................................
 
 *Synopsis*
@@ -7103,50 +6806,50 @@ These are functions pertaining to core f
 Return a read-only string explaining which program was running when it
 failed and produced the core file ABFD.
 
-2.11.1.2 `bfd_core_file_failing_signal'
+2.11.1.2 'bfd_core_file_failing_signal'
 .......................................
 
 *Synopsis*
      int bfd_core_file_failing_signal (bfd *abfd);
    *Description*
-Returns the signal number which caused the core dump which generated
-the file the BFD ABFD is attached to.
+Returns the signal number which caused the core dump which generated the
+file the BFD ABFD is attached to.
 
-2.11.1.3 `bfd_core_file_pid'
+2.11.1.3 'bfd_core_file_pid'
 ............................
 
 *Synopsis*
      int bfd_core_file_pid (bfd *abfd);
    *Description*
-Returns the PID of the process the core dump the BFD ABFD is attached
-to was generated from.
+Returns the PID of the process the core dump the BFD ABFD is attached to
+was generated from.
 
-2.11.1.4 `core_file_matches_executable_p'
+2.11.1.4 'core_file_matches_executable_p'
 .........................................
 
 *Synopsis*
      bfd_boolean core_file_matches_executable_p
         (bfd *core_bfd, bfd *exec_bfd);
    *Description*
-Return `TRUE' if the core file attached to CORE_BFD was generated by a
-run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
+Return 'TRUE' if the core file attached to CORE_BFD was generated by a
+run of the executable file attached to EXEC_BFD, 'FALSE' otherwise.
 
-2.11.1.5 `generic_core_file_matches_executable_p'
+2.11.1.5 'generic_core_file_matches_executable_p'
 .................................................
 
 *Synopsis*
      bfd_boolean generic_core_file_matches_executable_p
         (bfd *core_bfd, bfd *exec_bfd);
    *Description*
-Return TRUE if the core file attached to CORE_BFD was generated by a
-run of the executable file attached to EXEC_BFD.  The match is based on
+Return TRUE if the core file attached to CORE_BFD was generated by a run
+of the executable file attached to EXEC_BFD.  The match is based on
 executable basenames only.
 
-   Note: When not able to determine the core file failing command or
-the executable name, we still return TRUE even though we're not sure
-that core file and executable match.  This is to avoid generating a
-false warning in situations where we really don't know whether they
-match or not.
+   Note: When not able to determine the core file failing command or the
+executable name, we still return TRUE even though we're not sure that
+core file and executable match.  This is to avoid generating a false
+warning in situations where we really don't know whether they match or
+not.
 
 
 File: bfd.info,  Node: Targets,  Next: Architectures,  Prev: Core Files,  Up: BFD front end
@@ -7156,44 +6859,43 @@ File: bfd.info,  Node: Targets,  Next: A
 
 *Description*
 Each port of BFD to a different machine requires the creation of a
-target back end. All the back end provides to the root part of BFD is a
+target back end.  All the back end provides to the root part of BFD is a
 structure containing pointers to functions which perform certain low
-level operations on files. BFD translates the applications's requests
+level operations on files.  BFD translates the applications's requests
 through a pointer into calls to the back end routines.
 
-   When a file is opened with `bfd_openr', its format and target are
-unknown. BFD uses various mechanisms to determine how to interpret the
-file. The operations performed are:
-
-   * Create a BFD by calling the internal routine `_bfd_new_bfd', then
-     call `bfd_find_target' with the target string supplied to
-     `bfd_openr' and the new BFD pointer.
+   When a file is opened with 'bfd_openr', its format and target are
+unknown.  BFD uses various mechanisms to determine how to interpret the
+file.  The operations performed are:
+
+   * Create a BFD by calling the internal routine '_bfd_new_bfd', then
+     call 'bfd_find_target' with the target string supplied to
+     'bfd_openr' and the new BFD pointer.
 
-   * If a null target string was provided to `bfd_find_target', look up
-     the environment variable `GNUTARGET' and use that as the target
+   * If a null target string was provided to 'bfd_find_target', look up
+     the environment variable 'GNUTARGET' and use that as the target
      string.
 
-   * If the target string is still `NULL', or the target string is
-     `default', then use the first item in the target vector as the
-     target type, and set `target_defaulted' in the BFD to cause
-     `bfd_check_format' to loop through all the targets.  *Note
+   * If the target string is still 'NULL', or the target string is
+     'default', then use the first item in the target vector as the
+     target type, and set 'target_defaulted' in the BFD to cause
+     'bfd_check_format' to loop through all the targets.  *Note
      bfd_target::.  *Note Formats::.
 
    * Otherwise, inspect the elements in the target vector one by one,
-     until a match on target name is found. When found, use it.
+     until a match on target name is found.  When found, use it.
 
-   * Otherwise return the error `bfd_error_invalid_target' to
-     `bfd_openr'.
+   * Otherwise return the error 'bfd_error_invalid_target' to
+     'bfd_openr'.
 
-   * `bfd_openr' attempts to open the file using `bfd_open_file', and
+   * 'bfd_openr' attempts to open the file using 'bfd_open_file', and
      returns the BFD.
-   Once the BFD has been opened and the target selected, the file
-format may be determined. This is done by calling `bfd_check_format' on
-the BFD with a suggested format.  If `target_defaulted' has been set,
-each possible target type is tried to see if it recognizes the
-specified format.  `bfd_check_format' returns `TRUE' when the caller
-guesses right.
-
+   Once the BFD has been opened and the target selected, the file format
+may be determined.  This is done by calling 'bfd_check_format' on the
+BFD with a suggested format.  If 'target_defaulted' has been set, each
+possible target type is tried to see if it recognizes the specified
+format.  'bfd_check_format' returns 'TRUE' when the caller guesses
+right.
 * Menu:
 
 * bfd_target::
@@ -7205,15 +6907,15 @@ File: bfd.info,  Node: bfd_target,  Prev
 -----------------
 
 *Description*
-This structure contains everything that BFD knows about a target. It
-includes things like its byte order, name, and which routines to call
-to do various operations.
+This structure contains everything that BFD knows about a target.  It
+includes things like its byte order, name, and which routines to call to
+do various operations.
 
-   Every BFD points to a target structure with its `xvec' member.
+   Every BFD points to a target structure with its 'xvec' member.
 
    The macros below are used to dispatch to functions through the
-`bfd_target' vector. They are used in a number of macros further down
-in `bfd.h', and are also used when calling various routines by hand
+'bfd_target' vector.  They are used in a number of macros further down
+in 'bfd.h', and are also used when calling various routines by hand
 inside the BFD implementation.  The ARGLIST argument must be
 parenthesized; it contains all the arguments to the called function.
 
@@ -7240,15 +6942,17 @@ wants to fix this and not break the abov
         (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
         (bfd_assert (__FILE__,__LINE__), NULL))
      #endif
+
    This is the structure which defines the type of BFD this is.  The
-`xvec' member of the struct `bfd' itself points here.  Each module that
+'xvec' member of the struct 'bfd' itself points here.  Each module that
 implements access to a different target under BFD, defines one of these.
 
-   FIXME, these names should be rationalised with the names of the
-entry points which call them. Too bad we can't have one macro to define
-them both!
+   FIXME, these names should be rationalised with the names of the entry
+points which call them.  Too bad we can't have one macro to define them
+both!
      enum bfd_flavour
      {
+       /* N.B. Update bfd_flavour_name if you change this.  */
        bfd_target_unknown_flavour,
        bfd_target_aout_flavour,
        bfd_target_coff_flavour,
@@ -7299,11 +7003,11 @@ them both!
        enum bfd_endian header_byteorder;
 
        /* A mask of all the flags which an executable may have set -
-          from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'.  */
+          from the set BFD_NO_FLAGS, HAS_RELOC, ...D_PAGED.  */
        flagword object_flags;
 
       /* A mask of all the flags which a section may have set - from
-         the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'.  */
+         the set SEC_NO_FLAGS, SEC_ALLOC, ...SET_NEVER_LOAD.  */
        flagword section_flags;
 
       /* The character normally found at the front of a symbol.
@@ -7347,14 +7051,15 @@ them both!
        /* Format dependent routines: these are vectors of entry points
           within the target vector structure, one for each format to check.  */
 
-       /* Check the format of a file being read.  Return a `bfd_target *' or zero.  */
+       /* Check the format of a file being read.  Return a bfd_target * or zero.  */
        const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
 
        /* Set the format of a file being written.  */
        bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
 
-       /* Write cached information into a file being written, at `bfd_close'.  */
+       /* Write cached information into a file being written, at bfd_close.  */
        bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
+
    The general target vector.  These vectors are initialized using the
 BFD_JUMP_TABLE macros.
 
@@ -7394,7 +7099,7 @@ BFD_JUMP_TABLE macros.
        bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
        /* Called to merge BFD general private data from one object file
           to a common output file when linking.  */
-       bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+       bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
        /* Called to initialize BFD private section data from one object file
           to another.  */
      #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
@@ -7555,6 +7260,7 @@ BFD_JUMP_TABLE macros.
        NAME##_bfd_copy_link_hash_symbol_type, \
        NAME##_bfd_final_link, \
        NAME##_bfd_link_split_section, \
+       NAME##_bfd_link_check_relocs, \
        NAME##_bfd_gc_sections, \
        NAME##_bfd_lookup_section_flags, \
        NAME##_bfd_merge_sections, \
@@ -7596,6 +7302,9 @@ BFD_JUMP_TABLE macros.
        /* Should this section be split up into smaller pieces during linking.  */
        bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
 
+       /* Check the relocations in the bfd for validity.  */
+       bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
+
        /* Remove sections that are not referenced from the output.  */
        bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
@@ -7644,9 +7353,10 @@ BFD_JUMP_TABLE macros.
        /* Read in the dynamic relocs.  */
        long        (*_bfd_canonicalize_dynamic_reloc)
          (bfd *, arelent **, struct bfd_symbol **);
+
    A pointer to an alternative bfd_target in case the current one is not
-satisfactory.  This can happen when the target cpu supports both big
-and little endian code, and target chosen by the linker has the wrong
+satisfactory.  This can happen when the target cpu supports both big and
+little endian code, and target chosen by the linker has the wrong
 endianness.  The function open_output() in ld/ldlang.c uses this field
 to find an alternative output format that is suitable.
        /* Opposite endian version of this target.  */
@@ -7658,33 +7368,34 @@ to find an alternative output format tha
 
      } bfd_target;
 
-2.12.1.1 `bfd_set_default_target'
+
+2.12.1.1 'bfd_set_default_target'
 .................................
 
 *Synopsis*
      bfd_boolean bfd_set_default_target (const char *name);
    *Description*
-Set the default target vector to use when recognizing a BFD.  This
-takes the name of the target, which may be a BFD target name or a
+Set the default target vector to use when recognizing a BFD. This takes
+the name of the target, which may be a BFD target name or a
 configuration triplet.
 
-2.12.1.2 `bfd_find_target'
+2.12.1.2 'bfd_find_target'
 ..........................
 
 *Synopsis*
      const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
    *Description*
 Return a pointer to the transfer vector for the object target named
-TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
-environment variable `GNUTARGET'; if that is null or not defined, then
+TARGET_NAME.  If TARGET_NAME is 'NULL', choose the one in the
+environment variable 'GNUTARGET'; if that is null or not defined, then
 choose the first entry in the target list.  Passing in the string
 "default" or setting the environment variable to "default" will cause
 the first entry in the target list to be returned, and
-"target_defaulted" will be set in the BFD if ABFD isn't `NULL'.  This
-causes `bfd_check_format' to loop over all the targets to find the one
+"target_defaulted" will be set in the BFD if ABFD isn't 'NULL'.  This
+causes 'bfd_check_format' to loop over all the targets to find the one
 that matches the file being read.
 
-2.12.1.3 `bfd_get_target_info'
+2.12.1.3 'bfd_get_target_info'
 ..............................
 
 *Synopsis*
@@ -7695,42 +7406,49 @@ that matches the file being read.
          const char **def_target_arch);
    *Description*
 Return a pointer to the transfer vector for the object target named
-TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
-environment variable `GNUTARGET'; if that is null or not defined, then
+TARGET_NAME.  If TARGET_NAME is 'NULL', choose the one in the
+environment variable 'GNUTARGET'; if that is null or not defined, then
 choose the first entry in the target list.  Passing in the string
 "default" or setting the environment variable to "default" will cause
 the first entry in the target list to be returned, and
-"target_defaulted" will be set in the BFD if ABFD isn't `NULL'.  This
-causes `bfd_check_format' to loop over all the targets to find the one
-that matches the file being read.  If IS_BIGENDIAN is not `NULL', then
-set this value to target's endian mode. True for big-endian, FALSE for
-little-endian or for invalid target.  If UNDERSCORING is not `NULL',
-then set this value to target's underscoring mode. Zero for
+"target_defaulted" will be set in the BFD if ABFD isn't 'NULL'.  This
+causes 'bfd_check_format' to loop over all the targets to find the one
+that matches the file being read.  If IS_BIGENDIAN is not 'NULL', then
+set this value to target's endian mode.  True for big-endian, FALSE for
+little-endian or for invalid target.  If UNDERSCORING is not 'NULL',
+then set this value to target's underscoring mode.  Zero for
 none-underscoring, -1 for invalid target, else the value of target
-vector's symbol underscoring.  If DEF_TARGET_ARCH is not `NULL', then
+vector's symbol underscoring.  If DEF_TARGET_ARCH is not 'NULL', then
 set it to the architecture string specified by the target_name.
 
-2.12.1.4 `bfd_target_list'
+2.12.1.4 'bfd_target_list'
 ..........................
 
 *Synopsis*
      const char ** bfd_target_list (void);
    *Description*
-Return a freshly malloced NULL-terminated vector of the names of all
-the valid BFD targets. Do not modify the names.
+Return a freshly malloced NULL-terminated vector of the names of all the
+valid BFD targets.  Do not modify the names.
 
-2.12.1.5 `bfd_seach_for_target'
-...............................
+2.12.1.5 'bfd_iterate_over_targets'
+...................................
 
 *Synopsis*
-     const bfd_target *bfd_search_for_target
-        (int (*search_func) (const bfd_target *, void *),
-         void *);
-   *Description*
-Return a pointer to the first transfer vector in the list of transfer
-vectors maintained by BFD that produces a non-zero result when passed
-to the function SEARCH_FUNC.  The parameter DATA is passed, unexamined,
-to the search function.
+     const bfd_target *bfd_iterate_over_targets
+        (int (*func) (const bfd_target *, void *),
+         void *data);
+   *Description*
+Call FUNC for each target in the list of BFD target vectors, passing
+DATA to FUNC.  Stop iterating if FUNC returns a non-zero result, and
+return that target vector.  Return NULL if FUNC always returns zero.
+
+2.12.1.6 'bfd_flavour_name'
+...........................
+
+*Synopsis*
+     const char *bfd_flavour_name (enum bfd_flavour flavour);
+   *Description*
+Return the string form of FLAVOUR.
 
 
 File: bfd.info,  Node: Architectures,  Next: Opening and Closing,  Prev: Targets,  Up: BFD front end
@@ -7739,25 +7457,25 @@ File: bfd.info,  Node: Architectures,  N
 ==================
 
 BFD keeps one atom in a BFD describing the architecture of the data
-attached to the BFD: a pointer to a `bfd_arch_info_type'.
+attached to the BFD: a pointer to a 'bfd_arch_info_type'.
 
    Pointers to structures can be requested independently of a BFD so
-that an architecture's information can be interrogated without access
-to an open BFD.
+that an architecture's information can be interrogated without access to
+an open BFD.
 
    The architecture information is provided by each architecture
 package.  The set of default architectures is selected by the macro
-`SELECT_ARCHITECTURES'.  This is normally set up in the
-`config/TARGET.mt' file of your choice.  If the name is not defined,
+'SELECT_ARCHITECTURES'.  This is normally set up in the
+'config/TARGET.mt' file of your choice.  If the name is not defined,
 then all the architectures supported are included.
 
    When BFD starts up, all the architectures are called with an
 initialize method.  It is up to the architecture back end to insert as
-many items into the list of architectures as it wants to; generally
-this would be one for each machine and one for the default case (an
-item with a machine field of 0).
+many items into the list of architectures as it wants to; generally this
+would be one for each machine and one for the default case (an item with
+a machine field of 0).
 
-   BFD's idea of an architecture is implemented in `archures.c'.
+   BFD's idea of an architecture is implemented in 'archures.c'.
 
 2.13.1 bfd_architecture
 -----------------------
@@ -7840,13 +7558,29 @@ i960 KB, and 68020 and 68030 for Motorol
      #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
      #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
      #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
+     #define bfd_mach_sparc_v8plusc         11 /* with UA2005 and T1 add'ns.  */
+     #define bfd_mach_sparc_v9c             12 /* with UA2005 and T1 add'ns.  */
+     #define bfd_mach_sparc_v8plusd         13 /* with UA2007 and T3 add'ns.  */
+     #define bfd_mach_sparc_v9d             14 /* with UA2007 and T3 add'ns.  */
+     #define bfd_mach_sparc_v8pluse         15 /* with OSA2001 and T4 add'ns (no IMA).  */
+     #define bfd_mach_sparc_v9e             16 /* with OSA2001 and T4 add'ns (no IMA).  */
+     #define bfd_mach_sparc_v8plusv         17 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+     #define bfd_mach_sparc_v9v             18 /* with OSA2011 and T4 and IMA and FJMAU add'ns.  */
+     #define bfd_mach_sparc_v8plusm         19 /* with OSA2015 and M7 add'ns.  */
+     #define bfd_mach_sparc_v9m             20 /* with OSA2015 and M7 add'ns.  */
      /* Nonzero if MACH has the v9 instruction set.  */
      #define bfd_mach_sparc_v9_p(mach) \
-       ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+       ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m \
         && (mach) != bfd_mach_sparc_sparclite_le)
      /* Nonzero if MACH is a 64 bit sparc architecture.  */
      #define bfd_mach_sparc_64bit_p(mach) \
-       ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+       ((mach) >= bfd_mach_sparc_v9 \
+        && (mach) != bfd_mach_sparc_v8plusb \
+        && (mach) != bfd_mach_sparc_v8plusc \
+        && (mach) != bfd_mach_sparc_v8plusd \
+        && (mach) != bfd_mach_sparc_v8pluse \
+        && (mach) != bfd_mach_sparc_v8plusv \
+        && (mach) != bfd_mach_sparc_v8plusm)
        bfd_arch_spu,       /* PowerPC SPU */
      #define bfd_mach_spu           256
        bfd_arch_mips,      /* MIPS Rxxxx */
@@ -8056,10 +7790,12 @@ i960 KB, and 68020 and 68030 for Motorol
      #define bfd_mach_v850e2v3      0x45325633
      #define bfd_mach_v850e3v5      0x45335635 /* ('E'|'3'|'V'|'5') */
        bfd_arch_arc,       /* ARC Cores */
-     #define bfd_mach_arc_5         5
-     #define bfd_mach_arc_6         6
-     #define bfd_mach_arc_7         7
-     #define bfd_mach_arc_8         8
+     #define bfd_mach_arc_a4        0
+     #define bfd_mach_arc_a5        1
+     #define bfd_mach_arc_arc600    2
+     #define bfd_mach_arc_arc601    4
+     #define bfd_mach_arc_arc700    3
+     #define bfd_mach_arc_arcv2     5
       bfd_arch_m32c,     /* Renesas M16C/M32C.  */
      #define bfd_mach_m16c        0x75
      #define bfd_mach_m32c        0x78
@@ -8142,6 +7878,9 @@ i960 KB, and 68020 and 68030 for Motorol
      #define bfd_mach_cris_v0_v10   255
      #define bfd_mach_cris_v32      32
      #define bfd_mach_cris_v10_v32  1032
+       bfd_arch_riscv,
+     #define bfd_mach_riscv32       132
+     #define bfd_mach_riscv64       164
        bfd_arch_rl78,
      #define bfd_mach_rl78  0x75
        bfd_arch_rx,        /* Renesas RX.  */
@@ -8210,6 +7949,8 @@ i960 KB, and 68020 and 68030 for Motorol
      #define bfd_mach_nios2r2       2
        bfd_arch_visium,     /* Visium */
      #define bfd_mach_visium        1
+       bfd_arch_pru,        /* PRU */
+     #define bfd_mach_pru   0
        bfd_arch_last
        };
 
@@ -8231,7 +7972,7 @@ This structure contains information on a
        unsigned int section_align_power;
        /* TRUE if this is the default machine for the architecture.
           The default arch should be the first entry for an arch so that
-          all the entries for that arch can be accessed via `next'.  */
+          all the entries for that arch can be accessed via next.  */
        bfd_boolean the_default;
        const struct bfd_arch_info * (*compatible)
          (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
@@ -8248,35 +7989,36 @@ This structure contains information on a
      }
      bfd_arch_info_type;
 
-2.13.2.1 `bfd_printable_name'
+
+2.13.2.1 'bfd_printable_name'
 .............................
 
 *Synopsis*
      const char *bfd_printable_name (bfd *abfd);
    *Description*
-Return a printable string representing the architecture and machine
-from the pointer to the architecture info structure.
+Return a printable string representing the architecture and machine from
+the pointer to the architecture info structure.
 
-2.13.2.2 `bfd_scan_arch'
+2.13.2.2 'bfd_scan_arch'
 ........................
 
 *Synopsis*
      const bfd_arch_info_type *bfd_scan_arch (const char *string);
    *Description*
 Figure out if BFD supports any cpu which could be described with the
-name STRING.  Return a pointer to an `arch_info' structure if a machine
+name STRING.  Return a pointer to an 'arch_info' structure if a machine
 is found, otherwise NULL.
 
-2.13.2.3 `bfd_arch_list'
+2.13.2.3 'bfd_arch_list'
 ........................
 
 *Synopsis*
      const char **bfd_arch_list (void);
    *Description*
-Return a freshly malloced NULL-terminated vector of the names of all
-the valid BFD architectures.  Do not modify the names.
+Return a freshly malloced NULL-terminated vector of the names of all the
+valid BFD architectures.  Do not modify the names.
 
-2.13.2.4 `bfd_arch_get_compatible'
+2.13.2.4 'bfd_arch_get_compatible'
 ..................................
 
 *Synopsis*
@@ -8286,19 +8028,19 @@ the valid BFD architectures.  Do not mod
 Determine whether two BFDs' architectures and machine types are
 compatible.  Calculates the lowest common denominator between the two
 architectures and machine types implied by the BFDs and returns a
-pointer to an `arch_info' structure describing the compatible machine.
+pointer to an 'arch_info' structure describing the compatible machine.
 
-2.13.2.5 `bfd_default_arch_struct'
+2.13.2.5 'bfd_default_arch_struct'
 ..................................
 
 *Description*
-The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
+The 'bfd_default_arch_struct' is an item of 'bfd_arch_info_type' which
 has been initialized to a fairly generic state.  A BFD starts life by
 pointing to this structure, until the correct back end has determined
 the real architecture of the file.
      extern const bfd_arch_info_type bfd_default_arch_struct;
 
-2.13.2.6 `bfd_set_arch_info'
+2.13.2.6 'bfd_set_arch_info'
 ............................
 
 *Synopsis*
@@ -8306,7 +8048,7 @@ the real architecture of the file.
    *Description*
 Set the architecture info of ABFD to ARG.
 
-2.13.2.7 `bfd_default_set_arch_mach'
+2.13.2.7 'bfd_default_set_arch_mach'
 ....................................
 
 *Synopsis*
@@ -8315,9 +8057,9 @@ Set the architecture info of ABFD to ARG
    *Description*
 Set the architecture and machine type in BFD ABFD to ARCH and MACH.
 Find the correct pointer to a structure and insert it into the
-`arch_info' pointer.
+'arch_info' pointer.
 
-2.13.2.8 `bfd_get_arch'
+2.13.2.8 'bfd_get_arch'
 .......................
 
 *Synopsis*
@@ -8325,7 +8067,7 @@ Find the correct pointer to a structure 
    *Description*
 Return the enumerated type which describes the BFD ABFD's architecture.
 
-2.13.2.9 `bfd_get_mach'
+2.13.2.9 'bfd_get_mach'
 .......................
 
 *Synopsis*
@@ -8333,7 +8075,7 @@ Return the enumerated type which describ
    *Description*
 Return the long type which describes the BFD ABFD's machine.
 
-2.13.2.10 `bfd_arch_bits_per_byte'
+2.13.2.10 'bfd_arch_bits_per_byte'
 ..................................
 
 *Synopsis*
@@ -8341,7 +8083,7 @@ Return the long type which describes the
    *Description*
 Return the number of bits in one of the BFD ABFD's architecture's bytes.
 
-2.13.2.11 `bfd_arch_bits_per_address'
+2.13.2.11 'bfd_arch_bits_per_address'
 .....................................
 
 *Synopsis*
@@ -8350,7 +8092,7 @@ Return the number of bits in one of the 
 Return the number of bits in one of the BFD ABFD's architecture's
 addresses.
 
-2.13.2.12 `bfd_default_compatible'
+2.13.2.12 'bfd_default_compatible'
 ..................................
 
 *Synopsis*
@@ -8359,17 +8101,17 @@ addresses.
    *Description*
 The default function for testing for compatibility.
 
-2.13.2.13 `bfd_default_scan'
+2.13.2.13 'bfd_default_scan'
 ............................
 
 *Synopsis*
      bfd_boolean bfd_default_scan
         (const struct bfd_arch_info *info, const char *string);
    *Description*
-The default function for working out whether this is an architecture
-hit and a machine hit.
+The default function for working out whether this is an architecture hit
+and a machine hit.
 
-2.13.2.14 `bfd_get_arch_info'
+2.13.2.14 'bfd_get_arch_info'
 .............................
 
 *Synopsis*
@@ -8377,7 +8119,7 @@ hit and a machine hit.
    *Description*
 Return the architecture info struct in ABFD.
 
-2.13.2.15 `bfd_lookup_arch'
+2.13.2.15 'bfd_lookup_arch'
 ...........................
 
 *Synopsis*
@@ -8385,10 +8127,10 @@ Return the architecture info struct in A
         (enum bfd_architecture arch, unsigned long machine);
    *Description*
 Look for the architecture info structure which matches the arguments
-ARCH and MACHINE. A machine of 0 matches the machine/architecture
+ARCH and MACHINE.  A machine of 0 matches the machine/architecture
 structure which marks itself as the default.
 
-2.13.2.16 `bfd_printable_arch_mach'
+2.13.2.16 'bfd_printable_arch_mach'
 ...................................
 
 *Synopsis*
@@ -8400,7 +8142,7 @@ type.
 
    This routine is depreciated.
 
-2.13.2.17 `bfd_octets_per_byte'
+2.13.2.17 'bfd_octets_per_byte'
 ...............................
 
 *Synopsis*
@@ -8410,7 +8152,7 @@ Return the number of octets (8-bit quant
 addressable unit).  In most cases, this will be one, but some DSP
 targets have 16, 32, or even 48 bits per byte.
 
-2.13.2.18 `bfd_arch_mach_octets_per_byte'
+2.13.2.18 'bfd_arch_mach_octets_per_byte'
 .........................................
 
 *Synopsis*
@@ -8422,7 +8164,7 @@ See bfd_octets_per_byte.
    This routine is provided for those cases where a bfd * is not
 available
 
-2.13.2.19 `bfd_arch_default_fill'
+2.13.2.19 'bfd_arch_default_fill'
 .................................
 
 *Synopsis*
@@ -8430,7 +8172,7 @@ available
          bfd_boolean is_bigendian,
          bfd_boolean code);
    *Description*
-Allocate via bfd_malloc and return a fill buffer of size COUNT.  If
+Allocate via bfd_malloc and return a fill buffer of size COUNT. If
 IS_BIGENDIAN is TRUE, the order of bytes is big endian.  If CODE is
 TRUE, the buffer contains code.
 
@@ -8446,7 +8188,7 @@ File: bfd.info,  Node: Opening and Closi
 2.14.1 Functions for opening and closing
 ----------------------------------------
 
-2.14.1.1 `bfd_fopen'
+2.14.1.1 'bfd_fopen'
 ....................
 
 *Synopsis*
@@ -8454,17 +8196,17 @@ File: bfd.info,  Node: Opening and Closi
          const char *mode, int fd);
    *Description*
 Open the file FILENAME with the target TARGET.  Return a pointer to the
-created BFD.  If FD is not -1, then `fdopen' is used to open the file;
-otherwise, `fopen' is used.  MODE is passed directly to `fopen' or
-`fdopen'.
+created BFD. If FD is not -1, then 'fdopen' is used to open the file;
+otherwise, 'fopen' is used.  MODE is passed directly to 'fopen' or
+'fdopen'.
 
-   Calls `bfd_find_target', so TARGET is interpreted as by that
+   Calls 'bfd_find_target', so TARGET is interpreted as by that
 function.
 
    The new BFD is marked as cacheable iff FD is -1.
 
-   If `NULL' is returned then an error has occured.   Possible errors
-are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
+   If 'NULL' is returned then an error has occured.  Possible errors are
+'bfd_error_no_memory', 'bfd_error_invalid_target' or 'system_call'
 error.
 
    On error, FD is always closed.
@@ -8472,64 +8214,64 @@ error.
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.2 `bfd_openr'
+2.14.1.2 'bfd_openr'
 ....................
 
 *Synopsis*
      bfd *bfd_openr (const char *filename, const char *target);
    *Description*
-Open the file FILENAME (using `fopen') with the target TARGET.  Return
-a pointer to the created BFD.
+Open the file FILENAME (using 'fopen') with the target TARGET.  Return a
+pointer to the created BFD.
 
-   Calls `bfd_find_target', so TARGET is interpreted as by that
+   Calls 'bfd_find_target', so TARGET is interpreted as by that
 function.
 
-   If `NULL' is returned then an error has occured.   Possible errors
-are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
+   If 'NULL' is returned then an error has occured.  Possible errors are
+'bfd_error_no_memory', 'bfd_error_invalid_target' or 'system_call'
 error.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.3 `bfd_fdopenr'
+2.14.1.3 'bfd_fdopenr'
 ......................
 
 *Synopsis*
      bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
    *Description*
-`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'.  It
+'bfd_fdopenr' is to 'bfd_fopenr' much like 'fdopen' is to 'fopen'.  It
 opens a BFD on a file already described by the FD supplied.
 
-   When the file is later `bfd_close'd, the file descriptor will be
+   When the file is later 'bfd_close'd, the file descriptor will be
 closed.  If the caller desires that this file descriptor be cached by
 BFD (opened as needed, closed as needed to free descriptors for other
 opens), with the supplied FD used as an initial file descriptor (but
 subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
-returned BFD.  The default is to assume no caching; the file descriptor
-will remain open until `bfd_close', and will not be affected by BFD
+returned BFD. The default is to assume no caching; the file descriptor
+will remain open until 'bfd_close', and will not be affected by BFD
 operations on other files.
 
-   Possible errors are `bfd_error_no_memory',
-`bfd_error_invalid_target' and `bfd_error_system_call'.
+   Possible errors are 'bfd_error_no_memory', 'bfd_error_invalid_target'
+and 'bfd_error_system_call'.
 
    On error, FD is closed.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.4 `bfd_openstreamr'
+2.14.1.4 'bfd_openstreamr'
 ..........................
 
 *Synopsis*
      bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
    *Description*
-Open a BFD for read access on an existing stdio stream.  When the BFD
-is passed to `bfd_close', the stream will be closed.
+Open a BFD for read access on an existing stdio stream.  When the BFD is
+passed to 'bfd_close', the stream will be closed.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.5 `bfd_openr_iovec'
+2.14.1.5 'bfd_openr_iovec'
 ..........................
 
 *Synopsis*
@@ -8552,35 +8294,35 @@ Create and return a BFD backed by a read
 created using OPEN_FUNC, accessed using PREAD_FUNC and destroyed using
 CLOSE_FUNC.
 
-   Calls `bfd_find_target', so TARGET is interpreted as by that
+   Calls 'bfd_find_target', so TARGET is interpreted as by that
 function.
 
-   Calls OPEN_FUNC (which can call `bfd_zalloc' and `bfd_get_filename')
-to obtain the read-only stream backing the BFD.  OPEN_FUNC either
-succeeds returning the non-`NULL' STREAM, or fails returning `NULL'
-(setting `bfd_error').
+   Calls OPEN_FUNC (which can call 'bfd_zalloc' and 'bfd_get_filename')
+to obtain the read-only stream backing the BFD. OPEN_FUNC either
+succeeds returning the non-'NULL' STREAM, or fails returning 'NULL'
+(setting 'bfd_error').
 
    Calls PREAD_FUNC to request NBYTES of data from STREAM starting at
-OFFSET (e.g., via a call to `bfd_read').  PREAD_FUNC either succeeds
+OFFSET (e.g., via a call to 'bfd_read').  PREAD_FUNC either succeeds
 returning the number of bytes read (which can be less than NBYTES when
-end-of-file), or fails returning -1 (setting `bfd_error').
+end-of-file), or fails returning -1 (setting 'bfd_error').
 
-   Calls CLOSE_FUNC when the BFD is later closed using `bfd_close'.
+   Calls CLOSE_FUNC when the BFD is later closed using 'bfd_close'.
 CLOSE_FUNC either succeeds returning 0, or fails returning -1 (setting
-`bfd_error').
+'bfd_error').
 
    Calls STAT_FUNC to fill in a stat structure for bfd_stat,
 bfd_get_size, and bfd_get_mtime calls.  STAT_FUNC returns 0 on success,
-or returns -1 on failure (setting `bfd_error').
+or returns -1 on failure (setting 'bfd_error').
 
-   If `bfd_openr_iovec' returns `NULL' then an error has occurred.
-Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target'
-and `bfd_error_system_call'.
+   If 'bfd_openr_iovec' returns 'NULL' then an error has occurred.
+Possible errors are 'bfd_error_no_memory', 'bfd_error_invalid_target'
+and 'bfd_error_system_call'.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.6 `bfd_openw'
+2.14.1.6 'bfd_openw'
 ....................
 
 *Synopsis*
@@ -8589,13 +8331,13 @@ It can be accessed via the bfd_get_filen
 Create a BFD, associated with file FILENAME, using the file format
 TARGET, and return a pointer to it.
 
-   Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
-`bfd_error_invalid_target'.
+   Possible errors are 'bfd_error_system_call', 'bfd_error_no_memory',
+'bfd_error_invalid_target'.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.7 `bfd_close'
+2.14.1.7 'bfd_close'
 ....................
 
 *Synopsis*
@@ -8603,113 +8345,113 @@ It can be accessed via the bfd_get_filen
    *Description*
 Close a BFD. If the BFD was open for writing, then pending operations
 are completed and the file written out and closed.  If the created file
-is executable, then `chmod' is called to mark it as such.
+is executable, then 'chmod' is called to mark it as such.
 
    All memory attached to the BFD is released.
 
-   The file descriptor associated with the BFD is closed (even if it
-was passed in to BFD by `bfd_fdopenr').
+   The file descriptor associated with the BFD is closed (even if it was
+passed in to BFD by 'bfd_fdopenr').
 
    *Returns*
-`TRUE' is returned if all is ok, otherwise `FALSE'.
+'TRUE' is returned if all is ok, otherwise 'FALSE'.
 
-2.14.1.8 `bfd_close_all_done'
+2.14.1.8 'bfd_close_all_done'
 .............................
 
 *Synopsis*
      bfd_boolean bfd_close_all_done (bfd *);
    *Description*
-Close a BFD.  Differs from `bfd_close' since it does not complete any
+Close a BFD. Differs from 'bfd_close' since it does not complete any
 pending operations.  This routine would be used if the application had
 just used BFD for swapping and didn't want to use any of the writing
 code.
 
-   If the created file is executable, then `chmod' is called to mark it
+   If the created file is executable, then 'chmod' is called to mark it
 as such.
 
    All memory attached to the BFD is released.
 
    *Returns*
-`TRUE' is returned if all is ok, otherwise `FALSE'.
+'TRUE' is returned if all is ok, otherwise 'FALSE'.
 
-2.14.1.9 `bfd_create'
+2.14.1.9 'bfd_create'
 .....................
 
 *Synopsis*
      bfd *bfd_create (const char *filename, bfd *templ);
    *Description*
-Create a new BFD in the manner of `bfd_openw', but without opening a
-file. The new BFD takes the target from the target used by TEMPL. The
-format is always set to `bfd_object'.
+Create a new BFD in the manner of 'bfd_openw', but without opening a
+file.  The new BFD takes the target from the target used by TEMPL.  The
+format is always set to 'bfd_object'.
 
    A copy of the FILENAME argument is stored in the newly created BFD.
 It can be accessed via the bfd_get_filename() macro.
 
-2.14.1.10 `bfd_make_writable'
+2.14.1.10 'bfd_make_writable'
 .............................
 
 *Synopsis*
      bfd_boolean bfd_make_writable (bfd *abfd);
    *Description*
-Takes a BFD as created by `bfd_create' and converts it into one like as
-returned by `bfd_openw'.  It does this by converting the BFD to
-BFD_IN_MEMORY.  It's assumed that you will call `bfd_make_readable' on
+Takes a BFD as created by 'bfd_create' and converts it into one like as
+returned by 'bfd_openw'.  It does this by converting the BFD to
+BFD_IN_MEMORY. It's assumed that you will call 'bfd_make_readable' on
 this bfd later.
 
    *Returns*
-`TRUE' is returned if all is ok, otherwise `FALSE'.
+'TRUE' is returned if all is ok, otherwise 'FALSE'.
 
-2.14.1.11 `bfd_make_readable'
+2.14.1.11 'bfd_make_readable'
 .............................
 
 *Synopsis*
      bfd_boolean bfd_make_readable (bfd *abfd);
    *Description*
-Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
-converts it into one like as returned by `bfd_openr'.  It does this by
+Takes a BFD as created by 'bfd_create' and 'bfd_make_writable' and
+converts it into one like as returned by 'bfd_openr'.  It does this by
 writing the contents out to the memory buffer, then reversing the
 direction.
 
    *Returns*
-`TRUE' is returned if all is ok, otherwise `FALSE'.
+'TRUE' is returned if all is ok, otherwise 'FALSE'.
 
-2.14.1.12 `bfd_alloc'
+2.14.1.12 'bfd_alloc'
 .....................
 
 *Synopsis*
      void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
    *Description*
-Allocate a block of WANTED bytes of memory attached to `abfd' and
-return a pointer to it.
+Allocate a block of WANTED bytes of memory attached to 'abfd' and return
+a pointer to it.
 
-2.14.1.13 `bfd_alloc2'
+2.14.1.13 'bfd_alloc2'
 ......................
 
 *Synopsis*
      void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
    *Description*
-Allocate a block of NMEMB elements of SIZE bytes each of memory
-attached to `abfd' and return a pointer to it.
+Allocate a block of NMEMB elements of SIZE bytes each of memory attached
+to 'abfd' and return a pointer to it.
 
-2.14.1.14 `bfd_zalloc'
+2.14.1.14 'bfd_zalloc'
 ......................
 
 *Synopsis*
      void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
    *Description*
-Allocate a block of WANTED bytes of zeroed memory attached to `abfd'
-and return a pointer to it.
+Allocate a block of WANTED bytes of zeroed memory attached to 'abfd' and
+return a pointer to it.
 
-2.14.1.15 `bfd_zalloc2'
+2.14.1.15 'bfd_zalloc2'
 .......................
 
 *Synopsis*
      void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
    *Description*
 Allocate a block of NMEMB elements of SIZE bytes each of zeroed memory
-attached to `abfd' and return a pointer to it.
+attached to 'abfd' and return a pointer to it.
 
-2.14.1.16 `bfd_calc_gnu_debuglink_crc32'
+2.14.1.16 'bfd_calc_gnu_debuglink_crc32'
 ........................................
 
 *Synopsis*
@@ -8723,18 +8465,18 @@ for LEN bytes of BUF.
    *Returns*
 Return the updated CRC32 value.
 
-2.14.1.17 `bfd_get_debug_link_info'
+2.14.1.17 'bfd_get_debug_link_info'
 ...................................
 
 *Synopsis*
      char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
    *Description*
-Fetch the filename and CRC32 value for any separate debuginfo
-associated with ABFD.  Return NULL if no such info found, otherwise
-return filename and update CRC32_OUT.  The returned filename is
-allocated with `malloc'; freeing it is the responsibility of the caller.
+Fetch the filename and CRC32 value for any separate debuginfo associated
+with ABFD.  Return NULL if no such info found, otherwise return filename
+and update CRC32_OUT.  The returned filename is allocated with 'malloc';
+freeing it is the responsibility of the caller.
 
-2.14.1.18 `bfd_get_alt_debug_link_info'
+2.14.1.18 'bfd_get_alt_debug_link_info'
 .......................................
 
 *Synopsis*
@@ -8745,10 +8487,10 @@ allocated with `malloc'; freeing it is t
 Fetch the filename and BuildID value for any alternate debuginfo
 associated with ABFD.  Return NULL if no such info found, otherwise
 return filename and update BUILDID_LEN and BUILDID_OUT.  The returned
-filename and build_id are allocated with `malloc'; freeing them is the
+filename and build_id are allocated with 'malloc'; freeing them is the
 responsibility of the caller.
 
-2.14.1.19 `separate_debug_file_exists'
+2.14.1.19 'separate_debug_file_exists'
 ......................................
 
 *Synopsis*
@@ -8757,51 +8499,56 @@ responsibility of the caller.
    *Description*
 Checks to see if NAME is a file and if its contents match CRC32.
 
-2.14.1.20 `separate_alt_debug_file_exists'
+2.14.1.20 'separate_alt_debug_file_exists'
 ..........................................
 
 *Synopsis*
      bfd_boolean separate_alt_debug_file_exists
-        (char *name, unsigned long crc32);
+        (char *name, unsigned long buildid);
    *Description*
 Checks to see if NAME is a file and if its BuildID matches BUILDID.
 
-2.14.1.21 `find_separate_debug_file'
+2.14.1.21 'find_separate_debug_file'
 ....................................
 
 *Synopsis*
-     char *find_separate_debug_file (bfd *abfd);
-   *Description*
-Searches ABFD for a section called SECTION_NAME which is expected to
-contain a reference to a file containing separate debugging
-information.  The function scans various locations in the filesystem,
-including the file tree rooted at DEBUG_FILE_DIRECTORY, and returns the
-first matching filename that it finds.  If CHECK_CRC is TRUE then the
-contents of the file must also match the CRC value contained in
-SECTION_NAME.  Returns NULL if no valid file could be found.
+     char *find_separate_debug_file
+        (bfd *abfd, const char *dir, bfd_boolean include_dirs,
+         get_func_type get, check_func_type check);
+   *Description*
+Searches for a debug information file corresponding to ABFD.  The name
+of the separate debug info file is returned by the GET function.  This
+function scans various fixed locations in the filesystem, including the
+file tree rooted at DIR.  If the INCLUDE_DIRS parameter is true then the
+directory components of ABFD's filename will be included in the searched
+locations.
+
+   Returns the filename of the first file to be found which receives a
+TRUE result from the CHECK function.  Returns NULL if no valid file
+could be found.
 
-2.14.1.22 `bfd_follow_gnu_debuglink'
+2.14.1.22 'bfd_follow_gnu_debuglink'
 ....................................
 
 *Synopsis*
      char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
    *Description*
 Takes a BFD and searches it for a .gnu_debuglink section.  If this
-section is found, it examines the section for the name and checksum of
-a '.debug' file containing auxiliary debugging information.  It then
-searches the filesystem for this .debug file in some standard
-locations, including the directory tree rooted at DIR, and if found
-returns the full filename.
+section is found, it examines the section for the name and checksum of a
+'.debug' file containing auxiliary debugging information.  It then
+searches the filesystem for this .debug file in some standard locations,
+including the directory tree rooted at DIR, and if found returns the
+full filename.
 
-   If DIR is NULL, it will search a default path configured into libbfd
-at build time.  [XXX this feature is not currently implemented].
+   If DIR is NULL, the search will take place starting at the current
+directory.
 
    *Returns*
-`NULL' on any errors or failure to locate the .debug file, otherwise a
+'NULL' on any errors or failure to locate the .debug file, otherwise a
 pointer to a heap-allocated string containing the filename.  The caller
 is responsible for freeing this string.
 
-2.14.1.23 `bfd_follow_gnu_debugaltlink'
+2.14.1.23 'bfd_follow_gnu_debugaltlink'
 .......................................
 
 *Synopsis*
@@ -8813,15 +8560,15 @@ containing auxiliary debugging informati
 filesystem for this file in a set of standard locations, including the
 directory tree rooted at DIR, and if found returns the full filename.
 
-   If DIR is NULL, it will search a default path configured into libbfd
-at build time.  [FIXME: This feature is not currently implemented].
+   If DIR is NULL, the search will take place starting at the current
+directory.
 
    *Returns*
-`NULL' on any errors or failure to locate the debug file, otherwise a
+'NULL' on any errors or failure to locate the debug file, otherwise a
 pointer to a heap-allocated string containing the filename.  The caller
 is responsible for freeing this string.
 
-2.14.1.24 `bfd_create_gnu_debuglink_section'
+2.14.1.24 'bfd_create_gnu_debuglink_section'
 ............................................
 
 *Synopsis*
@@ -8832,10 +8579,10 @@ Takes a BFD and adds a .gnu_debuglink se
 sized to be big enough to contain a link to the specified FILENAME.
 
    *Returns*
-A pointer to the new section is returned if all is ok.  Otherwise
-`NULL' is returned and bfd_error is set.
+A pointer to the new section is returned if all is ok.  Otherwise 'NULL'
+is returned and bfd_error is set.
 
-2.14.1.25 `bfd_fill_in_gnu_debuglink_section'
+2.14.1.25 'bfd_fill_in_gnu_debuglink_section'
 .............................................
 
 *Synopsis*
@@ -8843,13 +8590,80 @@ A pointer to the new section is returned
         (bfd *abfd, struct bfd_section *sect, const char *filename);
    *Description*
 Takes a BFD and containing a .gnu_debuglink section SECT and fills in
-the contents of the section to contain a link to the specified
-FILENAME.  The filename should be relative to the current directory.
+the contents of the section to contain a link to the specified FILENAME.
+The filename should be relative to the current directory.
 
    *Returns*
-`TRUE' is returned if all is ok.  Otherwise `FALSE' is returned and
+'TRUE' is returned if all is ok.  Otherwise 'FALSE' is returned and
 bfd_error is set.
 
+2.14.1.26 'get_build_id'
+........................
+
+*Synopsis*
+     struct bfd_build_id * get_build_id
+        (bfd *abfd);
+   *Description*
+Finds the build-id associated with ABFD.  If the build-id is extracted
+from the note section then a build-id structure is built for it, using
+memory allocated to ABFD, and this is then attached to the ABFD.
+
+   Returns a pointer to the build-id structure if a build-id could be
+found.  If no build-id is found NULL is returned and error code is set.
+
+2.14.1.27 'get_build_id_name'
+.............................
+
+*Synopsis*
+     char * get_build_id_name
+        (bfd *abfd, unsigned long *build_id_out)
+   *Description*
+Searches ABFD for a build-id, and then constructs a pathname from it.
+The path is computed as .build-id/NN/NN+NN.debug where NNNN+NN is the
+build-id value as a hexadecimal string.
+
+   Returns the constructed filename or NULL upon error.  It is the
+caller's responsibility to free the memory used to hold the filename.
+If a filename is returned then the BUILD_ID_OUT parameter is set to a
+pointer to the build_id structure.
+
+2.14.1.28 'check_build_id_file'
+...............................
+
+*Synopsis*
+     bfd_boolean check_build_id_file
+        (char *name, unsigned long buildid);
+   *Description*
+Checks to see if NAME is a readable file and if its build-id matches
+BUILDID.
+
+   Returns TRUE if the file exists, is readable, and contains a build-id
+which matches BUILD-ID.
+
+2.14.1.29 'bfd_follow_build_id_debuglink'
+.........................................
+
+*Synopsis*
+     char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
+   *Description*
+Takes ABFD and searches it for a .note.gnu.build-id section.  If this
+section is found, it extracts the value of the NT_GNU_BUILD_ID note,
+which should be a hexadecimal value NNNN+NN (for 32+ hex digits).  It
+then searches the filesystem for a file named .BUILD-ID/NN/NN+NN.DEBUG
+in a set of standard locations, including the directory tree rooted at
+DIR.  The filename of the first matching file to be found is returned.
+A matching file should contain a .note.gnu.build-id section with the
+same NNNN+NN note as ABFD, although this check is currently not
+implemented.
+
+   If DIR is NULL, the search will take place starting at the current
+directory.
+
+   *Returns*
+'NULL' on any errors or failure to locate the debug file, otherwise a
+pointer to a heap-allocated string containing the filename.  The caller
+is responsible for freeing this string.
+
 
 File: bfd.info,  Node: Internal,  Next: File Caching,  Prev: Opening and Closing,  Up: BFD front end
 
@@ -8860,10 +8674,10 @@ File: bfd.info,  Node: Internal,  Next: 
 -------------------------
 
 *Description*
-These routines are used within BFD.  They are not intended for export,
+These routines are used within BFD. They are not intended for export,
 but are documented here for completeness.
 
-2.15.1.1 `bfd_write_bigendian_4byte_int'
+2.15.1.1 'bfd_write_bigendian_4byte_int'
 ........................................
 
 *Synopsis*
@@ -8872,28 +8686,28 @@ but are documented here for completeness
 Write a 4 byte integer I to the output BFD ABFD, in big endian order
 regardless of what else is going on.  This is useful in archives.
 
-2.15.1.2 `bfd_put_size'
+2.15.1.2 'bfd_put_size'
 .......................
 
-2.15.1.3 `bfd_get_size'
+2.15.1.3 'bfd_get_size'
 .......................
 
 *Description*
 These macros as used for reading and writing raw data in sections; each
 access (except for bytes) is vectored through the target format of the
-BFD and mangled accordingly. The mangling performs any necessary endian
+BFD and mangled accordingly.  The mangling performs any necessary endian
 translations and removes alignment restrictions.  Note that types
 accepted and returned by these macros are identical so they can be
-swapped around in macros--for example, `libaout.h' defines `GET_WORD'
-to either `bfd_get_32' or `bfd_get_64'.
+swapped around in macros--for example, 'libaout.h' defines 'GET_WORD' to
+either 'bfd_get_32' or 'bfd_get_64'.
 
-   In the put routines, VAL must be a `bfd_vma'.  If we are on a system
+   In the put routines, VAL must be a 'bfd_vma'.  If we are on a system
 without prototypes, the caller is responsible for making sure that is
 true, with a cast if necessary.  We don't cast them in the macro
-definitions because that would prevent `lint' or `gcc -Wall' from
+definitions because that would prevent 'lint' or 'gcc -Wall' from
 detecting sins such as passing a pointer.  To detect calling these with
-less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
-`bfd_vma''s.
+less than a 'bfd_vma', use 'gcc -Wconversion' on a host with 64 bit
+'bfd_vma''s.
 
      /* Byte swapping macros for user section data.  */
 
@@ -8947,15 +8761,16 @@ less than a `bfd_vma', use `gcc -Wconver
         : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)                \
         : (abort (), (void) 0))
 
-2.15.1.4 `bfd_h_put_size'
+
+2.15.1.4 'bfd_h_put_size'
 .........................
 
 *Description*
-These macros have the same function as their `bfd_get_x' brethren,
+These macros have the same function as their 'bfd_get_x' brethren,
 except that they are used for removing information for the header
-records of object files. Believe it or not, some object files keep
-their header records in big endian order and their data in little
-endian order.
+records of object files.  Believe it or not, some object files keep
+their header records in big endian order and their data in little endian
+order.
 
      /* Byte swapping macros for file header data.  */
 
@@ -9014,7 +8829,9 @@ endian order.
      #define H_GET_S16 bfd_h_get_signed_16
      #define H_GET_S8  bfd_h_get_signed_8
 
-2.15.1.5 `bfd_log2'
+
+
+2.15.1.5 'bfd_log2'
 ...................
 
 *Synopsis*
@@ -9032,16 +8849,16 @@ File: bfd.info,  Node: File Caching,  Ne
 The file caching mechanism is embedded within BFD and allows the
 application to open as many BFDs as it wants without regard to the
 underlying operating system's file descriptor limit (often as low as 20
-open files).  The module in `cache.c' maintains a least recently used
-list of `bfd_cache_max_open' files, and exports the name
-`bfd_cache_lookup', which runs around and makes sure that the required
-BFD is open. If not, then it chooses a file to close, closes it and
+open files).  The module in 'cache.c' maintains a least recently used
+list of 'bfd_cache_max_open' files, and exports the name
+'bfd_cache_lookup', which runs around and makes sure that the required
+BFD is open.  If not, then it chooses a file to close, closes it and
 opens the one wanted, returning its file handle.
 
 2.16.1 Caching functions
 ------------------------
 
-2.16.1.1 `bfd_cache_init'
+2.16.1.1 'bfd_cache_init'
 .........................
 
 *Synopsis*
@@ -9049,43 +8866,43 @@ opens the one wanted, returning its file
    *Description*
 Add a newly opened BFD to the cache.
 
-2.16.1.2 `bfd_cache_close'
+2.16.1.2 'bfd_cache_close'
 ..........................
 
 *Synopsis*
      bfd_boolean bfd_cache_close (bfd *abfd);
    *Description*
-Remove the BFD ABFD from the cache. If the attached file is open, then
+Remove the BFD ABFD from the cache.  If the attached file is open, then
 close it too.
 
    *Returns*
-`FALSE' is returned if closing the file fails, `TRUE' is returned if
-all is well.
+'FALSE' is returned if closing the file fails, 'TRUE' is returned if all
+is well.
 
-2.16.1.3 `bfd_cache_close_all'
+2.16.1.3 'bfd_cache_close_all'
 ..............................
 
 *Synopsis*
      bfd_boolean bfd_cache_close_all (void);
    *Description*
-Remove all BFDs from the cache. If the attached file is open, then
+Remove all BFDs from the cache.  If the attached file is open, then
 close it too.
 
    *Returns*
-`FALSE' is returned if closing one of the file fails, `TRUE' is
-returned if all is well.
+'FALSE' is returned if closing one of the file fails, 'TRUE' is returned
+if all is well.
 
-2.16.1.4 `bfd_open_file'
+2.16.1.4 'bfd_open_file'
 ........................
 
 *Synopsis*
      FILE* bfd_open_file (bfd *abfd);
    *Description*
-Call the OS to open a file for ABFD.  Return the `FILE *' (possibly
-`NULL') that results from this operation.  Set up the BFD so that
-future accesses know the file is open. If the `FILE *' returned is
-`NULL', then it won't have been put in the cache, so it won't have to
-be removed from it.
+Call the OS to open a file for ABFD.  Return the 'FILE *' (possibly
+'NULL') that results from this operation.  Set up the BFD so that future
+accesses know the file is open.  If the 'FILE *' returned is 'NULL',
+then it won't have been put in the cache, so it won't have to be removed
+from it.
 
 
 File: bfd.info,  Node: Linker Functions,  Next: Hash Tables,  Prev: File Caching,  Up: BFD front end
@@ -9093,31 +8910,31 @@ File: bfd.info,  Node: Linker Functions,
 2.17 Linker Functions
 =====================
 
-The linker uses three special entry points in the BFD target vector.
-It is not necessary to write special routines for these entry points
-when creating a new BFD back end, since generic versions are provided.
-However, writing them can speed up linking and make it use
-significantly less runtime memory.
+The linker uses three special entry points in the BFD target vector.  It
+is not necessary to write special routines for these entry points when
+creating a new BFD back end, since generic versions are provided.
+However, writing them can speed up linking and make it use significantly
+less runtime memory.
 
    The first routine creates a hash table used by the other routines.
 The second routine adds the symbols from an object file to the hash
 table.  The third routine takes all the object files and links them
-together to create the output file.  These routines are designed so
-that the linker proper does not need to know anything about the symbols
-in the object files that it is linking.  The linker merely arranges the
+together to create the output file.  These routines are designed so that
+the linker proper does not need to know anything about the symbols in
+the object files that it is linking.  The linker merely arranges the
 sections as directed by the linker script and lets BFD handle the
 details of symbols and relocs.
 
    The second routine and third routines are passed a pointer to a
-`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
-information relevant to the link, including the linker hash table
-(which was created by the first routine) and a set of callback
-functions to the linker proper.
-
-   The generic linker routines are in `linker.c', and use the header
-file `genlink.h'.  As of this writing, the only back ends which have
-implemented versions of these routines are a.out (in `aoutx.h') and
-ECOFF (in `ecoff.c').  The a.out routines are used as examples
+'struct bfd_link_info' structure (defined in 'bfdlink.h') which holds
+information relevant to the link, including the linker hash table (which
+was created by the first routine) and a set of callback functions to the
+linker proper.
+
+   The generic linker routines are in 'linker.c', and use the header
+file 'genlink.h'.  As of this writing, the only back ends which have
+implemented versions of these routines are a.out (in 'aoutx.h') and
+ECOFF (in 'ecoff.c').  The a.out routines are used as examples
 throughout this section.
 
 * Menu:
@@ -9132,26 +8949,26 @@ File: bfd.info,  Node: Creating a Linker
 2.17.1 Creating a linker hash table
 -----------------------------------
 
-The linker routines must create a hash table, which must be derived
-from `struct bfd_link_hash_table' described in `bfdlink.c'.  *Note Hash
+The linker routines must create a hash table, which must be derived from
+'struct bfd_link_hash_table' described in 'bfdlink.c'.  *Note Hash
 Tables::, for information on how to create a derived hash table.  This
 entry point is called using the target vector of the linker output file.
 
-   The `_bfd_link_hash_table_create' entry point must allocate and
+   The '_bfd_link_hash_table_create' entry point must allocate and
 initialize an instance of the desired hash table.  If the back end does
 not require any additional information to be stored with the entries in
-the hash table, the entry point may simply create a `struct
-bfd_link_hash_table'.  Most likely, however, some additional
-information will be needed.
-
-   For example, with each entry in the hash table the a.out linker
-keeps the index the symbol has in the final output file (this index
-number is used so that when doing a relocatable link the symbol index
-used in the output file can be quickly filled in when copying over a
-reloc).  The a.out linker code defines the required structures and
-functions for a hash table derived from `struct bfd_link_hash_table'.
-The a.out linker hash table is created by the function
-`NAME(aout,link_hash_table_create)'; it simply allocates space for the
+the hash table, the entry point may simply create a 'struct
+bfd_link_hash_table'.  Most likely, however, some additional information
+will be needed.
+
+   For example, with each entry in the hash table the a.out linker keeps
+the index the symbol has in the final output file (this index number is
+used so that when doing a relocatable link the symbol index used in the
+output file can be quickly filled in when copying over a reloc).  The
+a.out linker code defines the required structures and functions for a
+hash table derived from 'struct bfd_link_hash_table'.  The a.out linker
+hash table is created by the function
+'NAME(aout,link_hash_table_create)'; it simply allocates space for the
 hash table, initializes it, and returns a pointer to it.
 
    When writing the linker routines for a new back end, you will
@@ -9165,7 +8982,7 @@ File: bfd.info,  Node: Adding Symbols to
 2.17.2 Adding symbols to the hash table
 ---------------------------------------
 
-The linker proper will call the `_bfd_link_add_symbols' entry point for
+The linker proper will call the '_bfd_link_add_symbols' entry point for
 each object file or archive which is to be linked (typically these are
 the files named on the command line, but some may also come from the
 linker script).  The entry point is responsible for examining the file.
@@ -9174,7 +8991,7 @@ hash table.  For an archive, BFD must de
 archive should be used and adding them to the link.
 
    The a.out version of this entry point is
-`NAME(aout,link_add_symbols)'.
+'NAME(aout,link_add_symbols)'.
 
 * Menu:
 
@@ -9190,29 +9007,29 @@ File: bfd.info,  Node: Differing file fo
 
 Normally all the files involved in a link will be of the same format,
 but it is also possible to link together different format object files,
-and the back end must support that.  The `_bfd_link_add_symbols' entry
-point is called via the target vector of the file to be added.  This
-has an important consequence: the function may not assume that the hash
+and the back end must support that.  The '_bfd_link_add_symbols' entry
+point is called via the target vector of the file to be added.  This has
+an important consequence: the function may not assume that the hash
 table is the type created by the corresponding
-`_bfd_link_hash_table_create' vector.  All the `_bfd_link_add_symbols'
+'_bfd_link_hash_table_create' vector.  All the '_bfd_link_add_symbols'
 function can assume about the hash table is that it is derived from
-`struct bfd_link_hash_table'.
+'struct bfd_link_hash_table'.
 
-   Sometimes the `_bfd_link_add_symbols' function must store some
-information in the hash table entry to be used by the `_bfd_final_link'
+   Sometimes the '_bfd_link_add_symbols' function must store some
+information in the hash table entry to be used by the '_bfd_final_link'
 function.  In such a case the output bfd xvec must be checked to make
 sure that the hash table was created by an object file of the same
 format.
 
-   The `_bfd_final_link' routine must be prepared to handle a hash
-entry without any extra information added by the
-`_bfd_link_add_symbols' function.  A hash entry without extra
-information will also occur when the linker script directs the linker
-to create a symbol.  Note that, regardless of how a hash table entry is
-added, all the fields will be initialized to some sort of null value by
-the hash table entry initialization function.
+   The '_bfd_final_link' routine must be prepared to handle a hash entry
+without any extra information added by the '_bfd_link_add_symbols'
+function.  A hash entry without extra information will also occur when
+the linker script directs the linker to create a symbol.  Note that,
+regardless of how a hash table entry is added, all the fields will be
+initialized to some sort of null value by the hash table entry
+initialization function.
 
-   See `ecoff_link_add_externals' for an example of how to check the
+   See 'ecoff_link_add_externals' for an example of how to check the
 output bfd before saving information (in this case, the ECOFF external
 symbol debugging information) in a hash table entry.
 
@@ -9222,38 +9039,38 @@ File: bfd.info,  Node: Adding symbols fr
 2.17.2.2 Adding symbols from an object file
 ...........................................
 
-When the `_bfd_link_add_symbols' routine is passed an object file, it
+When the '_bfd_link_add_symbols' routine is passed an object file, it
 must add all externally visible symbols in that object file to the hash
 table.  The actual work of adding the symbol to the hash table is
-normally handled by the function `_bfd_generic_link_add_one_symbol'.
-The `_bfd_link_add_symbols' routine is responsible for reading all the
+normally handled by the function '_bfd_generic_link_add_one_symbol'.
+The '_bfd_link_add_symbols' routine is responsible for reading all the
 symbols from the object file and passing the correct information to
-`_bfd_generic_link_add_one_symbol'.
+'_bfd_generic_link_add_one_symbol'.
 
-   The `_bfd_link_add_symbols' routine should not use
-`bfd_canonicalize_symtab' to read the symbols.  The point of providing
+   The '_bfd_link_add_symbols' routine should not use
+'bfd_canonicalize_symtab' to read the symbols.  The point of providing
 this routine is to avoid the overhead of converting the symbols into
-generic `asymbol' structures.
+generic 'asymbol' structures.
 
-   `_bfd_generic_link_add_one_symbol' handles the details of combining
+   '_bfd_generic_link_add_one_symbol' handles the details of combining
 common symbols, warning about multiple definitions, and so forth.  It
 takes arguments which describe the symbol to add, notably symbol flags,
 a section, and an offset.  The symbol flags include such things as
-`BSF_WEAK' or `BSF_INDIRECT'.  The section is a section in the object
-file, or something like `bfd_und_section_ptr' for an undefined symbol
-or `bfd_com_section_ptr' for a common symbol.
-
-   If the `_bfd_final_link' routine is also going to need to read the
-symbol information, the `_bfd_link_add_symbols' routine should save it
-somewhere attached to the object file BFD.  However, the information
-should only be saved if the `keep_memory' field of the `info' argument
-is TRUE, so that the `-no-keep-memory' linker switch is effective.
+'BSF_WEAK' or 'BSF_INDIRECT'.  The section is a section in the object
+file, or something like 'bfd_und_section_ptr' for an undefined symbol or
+'bfd_com_section_ptr' for a common symbol.
+
+   If the '_bfd_final_link' routine is also going to need to read the
+symbol information, the '_bfd_link_add_symbols' routine should save it
+somewhere attached to the object file BFD. However, the information
+should only be saved if the 'keep_memory' field of the 'info' argument
+is TRUE, so that the '-no-keep-memory' linker switch is effective.
 
    The a.out function which adds symbols from an object file is
-`aout_link_add_object_symbols', and most of the interesting work is in
-`aout_link_add_symbols'.  The latter saves pointers to the hash tables
-entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
-number, so that the `_bfd_final_link' routine does not have to call the
+'aout_link_add_object_symbols', and most of the interesting work is in
+'aout_link_add_symbols'.  The latter saves pointers to the hash tables
+entries created by '_bfd_generic_link_add_one_symbol' indexed by symbol
+number, so that the '_bfd_final_link' routine does not have to call the
 hash table lookup routine to locate the entry.
 
 
@@ -9262,40 +9079,40 @@ File: bfd.info,  Node: Adding symbols fr
 2.17.2.3 Adding symbols from an archive
 .......................................
 
-When the `_bfd_link_add_symbols' routine is passed an archive, it must
+When the '_bfd_link_add_symbols' routine is passed an archive, it must
 look through the symbols defined by the archive and decide which
 elements of the archive should be included in the link.  For each such
-element it must call the `add_archive_element' linker callback, and it
+element it must call the 'add_archive_element' linker callback, and it
 must add the symbols from the object file to the linker hash table.
 (The callback may in fact indicate that a replacement BFD should be
 used, in which case the symbols from that BFD should be added to the
 linker hash table instead.)
 
    In most cases the work of looking through the symbols in the archive
-should be done by the `_bfd_generic_link_add_archive_symbols' function.
-`_bfd_generic_link_add_archive_symbols' is passed a function to call to
+should be done by the '_bfd_generic_link_add_archive_symbols' function.
+'_bfd_generic_link_add_archive_symbols' is passed a function to call to
 make the final decision about adding an archive element to the link and
 to do the actual work of adding the symbols to the linker hash table.
-If the element is to be included, the `add_archive_element' linker
-callback routine must be called with the element as an argument, and
-the element's symbols must be added to the linker hash table just as
-though the element had itself been passed to the
-`_bfd_link_add_symbols' function.
-
-   When the a.out `_bfd_link_add_symbols' function receives an archive,
-it calls `_bfd_generic_link_add_archive_symbols' passing
-`aout_link_check_archive_element' as the function argument.
-`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
-If the latter decides to add the element (an element is only added if
-it provides a real, non-common, definition for a previously undefined
-or common symbol) it calls the `add_archive_element' callback and then
-`aout_link_check_archive_element' calls `aout_link_add_symbols' to
+If the element is to be included, the 'add_archive_element' linker
+callback routine must be called with the element as an argument, and the
+element's symbols must be added to the linker hash table just as though
+the element had itself been passed to the '_bfd_link_add_symbols'
+function.
+
+   When the a.out '_bfd_link_add_symbols' function receives an archive,
+it calls '_bfd_generic_link_add_archive_symbols' passing
+'aout_link_check_archive_element' as the function argument.
+'aout_link_check_archive_element' calls 'aout_link_check_ar_symbols'.
+If the latter decides to add the element (an element is only added if it
+provides a real, non-common, definition for a previously undefined or
+common symbol) it calls the 'add_archive_element' callback and then
+'aout_link_check_archive_element' calls 'aout_link_add_symbols' to
 actually add the symbols to the linker hash table - possibly those of a
-substitute BFD, if the `add_archive_element' callback avails itself of
+substitute BFD, if the 'add_archive_element' callback avails itself of
 that option.
 
    The ECOFF back end is unusual in that it does not normally call
-`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
+'_bfd_generic_link_add_archive_symbols', because ECOFF archives already
 contain a hash table of symbols.  The ECOFF back end searches the
 archive itself to avoid the overhead of creating a new hash table.
 
@@ -9306,22 +9123,22 @@ File: bfd.info,  Node: Performing the Fi
 --------------------------------
 
 When all the input files have been processed, the linker calls the
-`_bfd_final_link' entry point of the output BFD.  This routine is
+'_bfd_final_link' entry point of the output BFD. This routine is
 responsible for producing the final output file, which has several
 aspects.  It must relocate the contents of the input sections and copy
-the data into the output sections.  It must build an output symbol
-table including any local symbols from the input files and the global
-symbols from the hash table.  When producing relocatable output, it must
-modify the input relocs and write them into the output file.  There may
-also be object format dependent work to be done.
+the data into the output sections.  It must build an output symbol table
+including any local symbols from the input files and the global symbols
+from the hash table.  When producing relocatable output, it must modify
+the input relocs and write them into the output file.  There may also be
+object format dependent work to be done.
 
-   The linker will also call the `write_object_contents' entry point
+   The linker will also call the 'write_object_contents' entry point
 when the BFD is closed.  The two entry points must work together in
 order to produce the correct output file.
 
    The details of how this works are inevitably dependent upon the
-specific object file format.  The a.out `_bfd_final_link' routine is
-`NAME(aout,final_link)'.
+specific object file format.  The a.out '_bfd_final_link' routine is
+'NAME(aout,final_link)'.
 
 * Menu:
 
@@ -9335,22 +9152,22 @@ File: bfd.info,  Node: Information provi
 2.17.3.1 Information provided by the linker
 ...........................................
 
-Before the linker calls the `_bfd_final_link' entry point, it sets up
+Before the linker calls the '_bfd_final_link' entry point, it sets up
 some data structures for the function to use.
 
-   The `input_bfds' field of the `bfd_link_info' structure will point
-to a list of all the input files included in the link.  These files are
-linked through the `link.next' field of the `bfd' structure.
-
-   Each section in the output file will have a list of `link_order'
-structures attached to the `map_head.link_order' field (the
-`link_order' structure is defined in `bfdlink.h').  These structures
-describe how to create the contents of the output section in terms of
-the contents of various input sections, fill constants, and,
-eventually, other types of information.  They also describe relocs that
-must be created by the BFD backend, but do not correspond to any input
-file; this is used to support -Ur, which builds constructors while
-generating a relocatable object file.
+   The 'input_bfds' field of the 'bfd_link_info' structure will point to
+a list of all the input files included in the link.  These files are
+linked through the 'link.next' field of the 'bfd' structure.
+
+   Each section in the output file will have a list of 'link_order'
+structures attached to the 'map_head.link_order' field (the 'link_order'
+structure is defined in 'bfdlink.h').  These structures describe how to
+create the contents of the output section in terms of the contents of
+various input sections, fill constants, and, eventually, other types of
+information.  They also describe relocs that must be created by the BFD
+backend, but do not correspond to any input file; this is used to
+support -Ur, which builds constructors while generating a relocatable
+object file.
 
 
 File: bfd.info,  Node: Relocating the section contents,  Next: Writing the symbol table,  Prev: Information provided by the linker,  Up: Performing the Final Link
@@ -9358,33 +9175,32 @@ File: bfd.info,  Node: Relocating the se
 2.17.3.2 Relocating the section contents
 ........................................
 
-The `_bfd_final_link' function should look through the `link_order'
+The '_bfd_final_link' function should look through the 'link_order'
 structures attached to each section of the output file.  Each
-`link_order' structure should either be handled specially, or it should
-be passed to the function `_bfd_default_link_order' which will do the
-right thing (`_bfd_default_link_order' is defined in `linker.c').
+'link_order' structure should either be handled specially, or it should
+be passed to the function '_bfd_default_link_order' which will do the
+right thing ('_bfd_default_link_order' is defined in 'linker.c').
 
-   For efficiency, a `link_order' of type `bfd_indirect_link_order'
+   For efficiency, a 'link_order' of type 'bfd_indirect_link_order'
 whose associated section belongs to a BFD of the same format as the
-output BFD must be handled specially.  This type of `link_order'
+output BFD must be handled specially.  This type of 'link_order'
 describes part of an output section in terms of a section belonging to
-one of the input files.  The `_bfd_final_link' function should read the
+one of the input files.  The '_bfd_final_link' function should read the
 contents of the section and any associated relocs, apply the relocs to
 the section contents, and write out the modified section contents.  If
 performing a relocatable link, the relocs themselves must also be
 modified and written out.
 
-   The functions `_bfd_relocate_contents' and
-`_bfd_final_link_relocate' provide some general support for performing
-the actual relocations, notably overflow checking.  Their arguments
-include information about the symbol the relocation is against and a
-`reloc_howto_type' argument which describes the relocation to perform.
-These functions are defined in `reloc.c'.
+   The functions '_bfd_relocate_contents' and '_bfd_final_link_relocate'
+provide some general support for performing the actual relocations,
+notably overflow checking.  Their arguments include information about
+the symbol the relocation is against and a 'reloc_howto_type' argument
+which describes the relocation to perform.  These functions are defined
+in 'reloc.c'.
 
    The a.out function which handles reading, relocating, and writing
-section contents is `aout_link_input_section'.  The actual relocation
-is done in `aout_link_input_section_std' and
-`aout_link_input_section_ext'.
+section contents is 'aout_link_input_section'.  The actual relocation is
+done in 'aout_link_input_section_std' and 'aout_link_input_section_ext'.
 
 
 File: bfd.info,  Node: Writing the symbol table,  Prev: Relocating the section contents,  Up: Performing the Final Link
@@ -9392,45 +9208,45 @@ File: bfd.info,  Node: Writing the symbo
 2.17.3.3 Writing the symbol table
 .................................
 
-The `_bfd_final_link' function must gather all the symbols in the input
-files and write them out.  It must also write out all the symbols in
-the global hash table.  This must be controlled by the `strip' and
-`discard' fields of the `bfd_link_info' structure.
+The '_bfd_final_link' function must gather all the symbols in the input
+files and write them out.  It must also write out all the symbols in the
+global hash table.  This must be controlled by the 'strip' and 'discard'
+fields of the 'bfd_link_info' structure.
 
    The local symbols of the input files will not have been entered into
-the linker hash table.  The `_bfd_final_link' routine must consider
-each input file and include the symbols in the output file.  It may be
-convenient to do this when looking through the `link_order' structures,
-or it may be done by stepping through the `input_bfds' list.
-
-   The `_bfd_final_link' routine must also traverse the global hash
-table to gather all the externally visible symbols.  It is possible
-that most of the externally visible symbols may be written out when
-considering the symbols of each input file, but it is still necessary
-to traverse the hash table since the linker script may have defined
-some symbols that are not in any of the input files.
-
-   The `strip' field of the `bfd_link_info' structure controls which
-symbols are written out.  The possible values are listed in
-`bfdlink.h'.  If the value is `strip_some', then the `keep_hash' field
-of the `bfd_link_info' structure is a hash table of symbols to keep;
-each symbol should be looked up in this hash table, and only symbols
-which are present should be included in the output file.
+the linker hash table.  The '_bfd_final_link' routine must consider each
+input file and include the symbols in the output file.  It may be
+convenient to do this when looking through the 'link_order' structures,
+or it may be done by stepping through the 'input_bfds' list.
+
+   The '_bfd_final_link' routine must also traverse the global hash
+table to gather all the externally visible symbols.  It is possible that
+most of the externally visible symbols may be written out when
+considering the symbols of each input file, but it is still necessary to
+traverse the hash table since the linker script may have defined some
+symbols that are not in any of the input files.
+
+   The 'strip' field of the 'bfd_link_info' structure controls which
+symbols are written out.  The possible values are listed in 'bfdlink.h'.
+If the value is 'strip_some', then the 'keep_hash' field of the
+'bfd_link_info' structure is a hash table of symbols to keep; each
+symbol should be looked up in this hash table, and only symbols which
+are present should be included in the output file.
 
-   If the `strip' field of the `bfd_link_info' structure permits local
-symbols to be written out, the `discard' field is used to further
+   If the 'strip' field of the 'bfd_link_info' structure permits local
+symbols to be written out, the 'discard' field is used to further
 controls which local symbols are included in the output file.  If the
-value is `discard_l', then all local symbols which begin with a certain
+value is 'discard_l', then all local symbols which begin with a certain
 prefix are discarded; this is controlled by the
-`bfd_is_local_label_name' entry point.
+'bfd_is_local_label_name' entry point.
 
    The a.out backend handles symbols by calling
-`aout_link_write_symbols' on each input BFD and then traversing the
-global hash table with the function `aout_link_write_other_symbol'.  It
-builds a string table while writing out the symbols, which is written
-to the output file at the end of `NAME(aout,final_link)'.
+'aout_link_write_symbols' on each input BFD and then traversing the
+global hash table with the function 'aout_link_write_other_symbol'.  It
+builds a string table while writing out the symbols, which is written to
+the output file at the end of 'NAME(aout,final_link)'.
 
-2.17.3.4 `bfd_link_split_section'
+2.17.3.4 'bfd_link_split_section'
 .................................
 
 *Synopsis*
@@ -9441,7 +9257,8 @@ link.
      #define bfd_link_split_section(abfd, sec) \
             BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
 
-2.17.3.5 `bfd_section_already_linked'
+
+2.17.3.5 'bfd_section_already_linked'
 .....................................
 
 *Synopsis*
@@ -9454,7 +9271,8 @@ link.  Return TRUE if it has.
      #define bfd_section_already_linked(abfd, sec, info) \
             BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
 
-2.17.3.6 `bfd_generic_define_common_symbol'
+
+2.17.3.6 'bfd_generic_define_common_symbol'
 ...........................................
 
 *Synopsis*
@@ -9467,7 +9285,8 @@ and FALSE on failure.
      #define bfd_define_common_symbol(output_bfd, info, h) \
             BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
 
-2.17.3.7 `bfd_find_version_for_sym'
+
+2.17.3.7 'bfd_find_version_for_sym'
 ...................................
 
 *Synopsis*
@@ -9477,17 +9296,67 @@ and FALSE on failure.
    *Description*
 Search an elf version script tree for symbol versioning info and export
 / don't-export status for a given symbol.  Return non-NULL on success
-and NULL on failure; also sets the output `hide' boolean parameter.
+and NULL on failure; also sets the output 'hide' boolean parameter.
 
-2.17.3.8 `bfd_hide_sym_by_version'
+2.17.3.8 'bfd_hide_sym_by_version'
 ..................................
 
 *Synopsis*
      bfd_boolean bfd_hide_sym_by_version
         (struct bfd_elf_version_tree *verdefs, const char *sym_name);
    *Description*
-Search an elf version script tree for symbol versioning info for a
-given symbol.  Return TRUE if the symbol is hidden.
+Search an elf version script tree for symbol versioning info for a given
+symbol.  Return TRUE if the symbol is hidden.
+
+2.17.3.9 'bfd_link_check_relocs'
+................................
+
+*Synopsis*
+     bfd_boolean bfd_link_check_relocs
+        (bfd *abfd, struct bfd_link_info *info);
+   *Description*
+Checks the relocs in ABFD for validity.  Does not execute the relocs.
+Return TRUE if everything is OK, FALSE otherwise.  This is the external
+entry point to this code.
+
+2.17.3.10 '_bfd_generic_link_check_relocs'
+..........................................
+
+*Synopsis*
+     bfd_boolean _bfd_generic_link_check_relocs
+        (bfd *abfd, struct bfd_link_info *info);
+   *Description*
+Stub function for targets that do not implement reloc checking.  Return
+TRUE. This is an internal function.  It should not be called from
+outside the BFD library.
+
+2.17.3.11 'bfd_merge_private_bfd_data'
+......................................
+
+*Synopsis*
+     bfd_boolean bfd_merge_private_bfd_data
+        (bfd *ibfd, struct bfd_link_info *info);
+   *Description*
+Merge private BFD information from the BFD IBFD to the the output file
+BFD when linking.  Return 'TRUE' on success, 'FALSE' on error.  Possible
+error returns are:
+
+   * 'bfd_error_no_memory' - Not enough memory exists to create private
+     data for OBFD.
+     #define bfd_merge_private_bfd_data(ibfd, info) \
+          BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+                    (ibfd, info))
+
+2.17.3.12 '_bfd_generic_verify_endian_match'
+............................................
+
+*Synopsis*
+     bfd_boolean _bfd_generic_verify_endian_match
+        (bfd *ibfd, struct bfd_link_info *info);
+   *Description*
+Can be used from / for bfd_merge_private_bfd_data to check that
+endianness matches between input and output file.  Returns TRUE for a
+match, otherwise returns FALSE and emits an error.
 
 
 File: bfd.info,  Node: Hash Tables,  Prev: Linker Functions,  Up: BFD front end
@@ -9511,7 +9380,7 @@ back ends.  The linker may create thousa
 the overhead of allocating private data and storing and following
 pointers becomes noticeable.
 
-   The basic hash table code is in `hash.c'.
+   The basic hash table code is in 'hash.c'.
 
 * Menu:
 
@@ -9526,27 +9395,27 @@ File: bfd.info,  Node: Creating and Free
 2.18.1 Creating and freeing a hash table
 ----------------------------------------
 
-To create a hash table, create an instance of a `struct bfd_hash_table'
-(defined in `bfd.h') and call `bfd_hash_table_init' (if you know
+To create a hash table, create an instance of a 'struct bfd_hash_table'
+(defined in 'bfd.h') and call 'bfd_hash_table_init' (if you know
 approximately how many entries you will need, the function
-`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
-`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
+'bfd_hash_table_init_n', which takes a SIZE argument, may be used).
+'bfd_hash_table_init' returns 'FALSE' if some sort of error occurs.
 
-   The function `bfd_hash_table_init' take as an argument a function to
+   The function 'bfd_hash_table_init' take as an argument a function to
 use to create new entries.  For a basic hash table, use the function
-`bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why
-you would want to use a different value for this argument.
+'bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why you
+would want to use a different value for this argument.
 
-   `bfd_hash_table_init' will create an objalloc which will be used to
+   'bfd_hash_table_init' will create an objalloc which will be used to
 allocate new entries.  You may allocate memory on this objalloc using
-`bfd_hash_allocate'.
+'bfd_hash_allocate'.
 
-   Use `bfd_hash_table_free' to free up all the memory that has been
-allocated for a hash table.  This will not free up the `struct
+   Use 'bfd_hash_table_free' to free up all the memory that has been
+allocated for a hash table.  This will not free up the 'struct
 bfd_hash_table' itself, which you must provide.
 
-   Use `bfd_hash_set_default_size' to set the default size of hash
-table to use.
+   Use 'bfd_hash_set_default_size' to set the default size of hash table
+to use.
 
 
 File: bfd.info,  Node: Looking Up or Entering a String,  Next: Traversing a Hash Table,  Prev: Creating and Freeing a Hash Table,  Up: Hash Tables
@@ -9554,24 +9423,24 @@ File: bfd.info,  Node: Looking Up or Ent
 2.18.2 Looking up or entering a string
 --------------------------------------
 
-The function `bfd_hash_lookup' is used both to look up a string in the
+The function 'bfd_hash_lookup' is used both to look up a string in the
 hash table and to create a new entry.
 
-   If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
-string.  If the string is found, it will returns a pointer to a `struct
+   If the CREATE argument is 'FALSE', 'bfd_hash_lookup' will look up a
+string.  If the string is found, it will returns a pointer to a 'struct
 bfd_hash_entry'.  If the string is not found in the table
-`bfd_hash_lookup' will return `NULL'.  You should not modify any of the
-fields in the returns `struct bfd_hash_entry'.
+'bfd_hash_lookup' will return 'NULL'.  You should not modify any of the
+fields in the returns 'struct bfd_hash_entry'.
 
-   If the CREATE argument is `TRUE', the string will be entered into
-the hash table if it is not already there.  Either way a pointer to a
-`struct bfd_hash_entry' will be returned, either to the existing
-structure or to a newly created one.  In this case, a `NULL' return
+   If the CREATE argument is 'TRUE', the string will be entered into the
+hash table if it is not already there.  Either way a pointer to a
+'struct bfd_hash_entry' will be returned, either to the existing
+structure or to a newly created one.  In this case, a 'NULL' return
 means that an error occurred.
 
-   If the CREATE argument is `TRUE', and a new entry is created, the
-COPY argument is used to decide whether to copy the string onto the
-hash table objalloc or not.  If COPY is passed as `FALSE', you must be
+   If the CREATE argument is 'TRUE', and a new entry is created, the
+COPY argument is used to decide whether to copy the string onto the hash
+table objalloc or not.  If COPY is passed as 'FALSE', you must be
 careful not to deallocate or modify the string as long as the hash table
 exists.
 
@@ -9581,16 +9450,16 @@ File: bfd.info,  Node: Traversing a Hash
 2.18.3 Traversing a hash table
 ------------------------------
 
-The function `bfd_hash_traverse' may be used to traverse a hash table,
+The function 'bfd_hash_traverse' may be used to traverse a hash table,
 calling a function on each element.  The traversal is done in a random
 order.
 
-   `bfd_hash_traverse' takes as arguments a function and a generic
-`void *' pointer.  The function is called with a hash table entry (a
-`struct bfd_hash_entry *') and the generic pointer passed to
-`bfd_hash_traverse'.  The function must return a `boolean' value, which
+   'bfd_hash_traverse' takes as arguments a function and a generic 'void
+*' pointer.  The function is called with a hash table entry (a 'struct
+bfd_hash_entry *') and the generic pointer passed to
+'bfd_hash_traverse'.  The function must return a 'boolean' value, which
 indicates whether to continue traversing the hash table.  If the
-function returns `FALSE', `bfd_hash_traverse' will stop the traversal
+function returns 'FALSE', 'bfd_hash_traverse' will stop the traversal
 and return immediately.
 
 
@@ -9599,8 +9468,8 @@ File: bfd.info,  Node: Deriving a New Ha
 2.18.4 Deriving a new hash table type
 -------------------------------------
 
-Many uses of hash tables want to store additional information which
-each entry in the hash table.  Some also find it convenient to store
+Many uses of hash tables want to store additional information which each
+entry in the hash table.  Some also find it convenient to store
 additional information with the hash table itself.  This may be done
 using a derived hash table.
 
@@ -9609,8 +9478,8 @@ table requires sticking together some bo
 differences specific to the type of hash table you want to create.
 
    An example of a derived hash table is the linker hash table.  The
-structures for this are defined in `bfdlink.h'.  The functions are in
-`linker.c'.
+structures for this are defined in 'bfdlink.h'.  The functions are in
+'linker.c'.
 
    You may also derive a hash table from an already derived hash table.
 For example, the a.out linker backend code uses a hash table derived
@@ -9633,16 +9502,16 @@ structure for the hash table itself.
 
    The first field in the structure for an entry in the hash table must
 be of the type used for an entry in the hash table you are deriving
-from.  If you are deriving from a basic hash table this is `struct
-bfd_hash_entry', which is defined in `bfd.h'.  The first field in the
+from.  If you are deriving from a basic hash table this is 'struct
+bfd_hash_entry', which is defined in 'bfd.h'.  The first field in the
 structure for the hash table itself must be of the type of the hash
 table you are deriving from itself.  If you are deriving from a basic
-hash table, this is `struct bfd_hash_table'.
+hash table, this is 'struct bfd_hash_table'.
 
-   For example, the linker hash table defines `struct
-bfd_link_hash_entry' (in `bfdlink.h').  The first field, `root', is of
-type `struct bfd_hash_entry'.  Similarly, the first field in `struct
-bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
+   For example, the linker hash table defines 'struct
+bfd_link_hash_entry' (in 'bfdlink.h').  The first field, 'root', is of
+type 'struct bfd_hash_entry'.  Similarly, the first field in 'struct
+bfd_link_hash_table', 'table', is of type 'struct bfd_hash_table'.
 
 
 File: bfd.info,  Node: Write the Derived Creation Routine,  Next: Write Other Derived Routines,  Prev: Define the Derived Structures,  Up: Deriving a New Hash Table Type
@@ -9652,23 +9521,23 @@ File: bfd.info,  Node: Write the Derived
 
 You must write a routine which will create and initialize an entry in
 the hash table.  This routine is passed as the function argument to
-`bfd_hash_table_init'.
+'bfd_hash_table_init'.
 
    In order to permit other hash tables to be derived from the hash
 table you are creating, this routine must be written in a standard way.
 
    The first argument to the creation routine is a pointer to a hash
-table entry.  This may be `NULL', in which case the routine should
+table entry.  This may be 'NULL', in which case the routine should
 allocate the right amount of space.  Otherwise the space has already
 been allocated by a hash table type derived from this one.
 
    After allocating space, the creation routine must call the creation
 routine of the hash table type it is derived from, passing in a pointer
-to the space it just allocated.  This will initialize any fields used
-by the base hash table.
+to the space it just allocated.  This will initialize any fields used by
+the base hash table.
 
-   Finally the creation routine must initialize any local fields for
-the new hash table type.
+   Finally the creation routine must initialize any local fields for the
+new hash table type.
 
    Here is a boilerplate example of a creation routine.  FUNCTION_NAME
 is the name of the routine.  ENTRY_TYPE is the type of an entry in the
@@ -9700,14 +9569,14 @@ routine of the hash table type your hash
        return (struct bfd_hash_entry *) ret;
      }
    *Description*
-The creation routine for the linker hash table, which is in `linker.c',
+The creation routine for the linker hash table, which is in 'linker.c',
 looks just like this example.  FUNCTION_NAME is
-`_bfd_link_hash_newfunc'.  ENTRY_TYPE is `struct bfd_link_hash_entry'.
-BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
+'_bfd_link_hash_newfunc'.  ENTRY_TYPE is 'struct bfd_link_hash_entry'.
+BASE_NEWFUNC is 'bfd_hash_newfunc', the creation routine for a basic
 hash table.
 
-   `_bfd_link_hash_newfunc' also initializes the local fields in a
-linker hash table entry: `type', `written' and `next'.
+   '_bfd_link_hash_newfunc' also initializes the local fields in a
+linker hash table entry: 'type', 'written' and 'next'.
 
 
 File: bfd.info,  Node: Write Other Derived Routines,  Prev: Write the Derived Creation Routine,  Up: Deriving a New Hash Table Type
@@ -9720,23 +9589,23 @@ You will want to write other routines fo
    You will want an initialization routine which calls the
 initialization routine of the hash table you are deriving from and
 initializes any other local fields.  For the linker hash table, this is
-`_bfd_link_hash_table_init' in `linker.c'.
+'_bfd_link_hash_table_init' in 'linker.c'.
 
    You will want a lookup routine which calls the lookup routine of the
 hash table you are deriving from and casts the result.  The linker hash
-table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
+table uses 'bfd_link_hash_lookup' in 'linker.c' (this actually takes an
 additional argument which it uses to decide how to return the looked up
 value).
 
    You may want a traversal routine.  This should just call the
 traversal routine of the hash table you are deriving from with
-appropriate casts.  The linker hash table uses `bfd_link_hash_traverse'
-in `linker.c'.
+appropriate casts.  The linker hash table uses 'bfd_link_hash_traverse'
+in 'linker.c'.
 
    These routines may simply be defined as macros.  For example, the
 a.out backend linker hash table, which is derived from the linker hash
 table, uses macros for the lookup and traversal routines.  These are
-`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
+'aout_link_hash_lookup' and 'aout_link_hash_traverse' in aoutx.h.
 
 
 File: bfd.info,  Node: BFD back ends,  Next: GNU Free Documentation License,  Prev: BFD front end,  Up: Top
@@ -9771,24 +9640,23 @@ BFD supports a number of different flavo
 major differences are only the sizes of the structures on disk, and the
 shape of the relocation information.
 
-   The support is split into a basic support file `aoutx.h' and other
-files which derive functions from the base. One derivation file is
-`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
-support for sun3, sun4, 386 and 29k a.out files, to create a target
-jump vector for a specific target.
+   The support is split into a basic support file 'aoutx.h' and other
+files which derive functions from the base.  One derivation file is
+'aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
+support for sun3, sun4, 386 and 29k a.out files, to create a target jump
+vector for a specific target.
 
    This information is further split out into more specific files for
-each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
-the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
-format.
+each machine, including 'sunos.c' for sun3 and sun4, 'newsos3.c' for the
+Sony NEWS, and 'demo64.c' for a demonstration of a 64 bit a.out format.
 
-   The base file `aoutx.h' defines general mechanisms for reading and
+   The base file 'aoutx.h' defines general mechanisms for reading and
 writing records to and from disk and various other methods which BFD
-requires. It is included by `aout32.c' and `aout64.c' to form the names
-`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
+requires.  It is included by 'aout32.c' and 'aout64.c' to form the names
+'aout_32_swap_exec_header_in', 'aout_64_swap_exec_header_in', etc.
 
    As an example, this is what goes on to make the back end for a sun4,
-from `aout32.c':
+from 'aout32.c':
 
             #define ARCH_SIZE 32
             #include "aoutx.h"
@@ -9802,24 +9670,24 @@ from `aout32.c':
             aout_32_get_reloc_upper_bound
             ...
 
-   from `sunos.c':
+   from 'sunos.c':
 
             #define TARGET_NAME "a.out-sunos-big"
             #define VECNAME    sparc_aout_sunos_be_vec
             #include "aoutf1.h"
 
-   requires all the names from `aout32.c', and produces the jump vector
+   requires all the names from 'aout32.c', and produces the jump vector
 
             sparc_aout_sunos_be_vec
 
-   The file `host-aout.c' is a special case.  It is for a large set of
+   The file 'host-aout.c' is a special case.  It is for a large set of
 hosts that use "more or less standard" a.out files, and for which
 cross-debugging is not interesting.  It uses the standard 32-bit a.out
 support routines, but determines the file offsets and addresses of the
-text, data, and BSS sections, the machine architecture and machine
-type, and the entry point address, in a host-dependent manner.  Once
-these values have been determined, generic code is used to handle the
-object file.
+text, data, and BSS sections, the machine architecture and machine type,
+and the entry point address, in a host-dependent manner.  Once these
+values have been determined, generic code is used to handle the object
+file.
 
    When porting it to run on a new system, you must supply:
 
@@ -9830,38 +9698,38 @@ object file.
              HOST_TEXT_START_ADDR
              HOST_STACK_END_ADDR
 
-   in the file `../include/sys/h-XXX.h' (for your host).  These values,
-plus the structures and macros defined in `a.out.h' on your host
-system, will produce a BFD target that will access ordinary a.out files
-on your host. To configure a new machine to use `host-aout.c', specify:
+   in the file '../include/sys/h-XXX.h' (for your host).  These values,
+plus the structures and macros defined in 'a.out.h' on your host system,
+will produce a BFD target that will access ordinary a.out files on your
+host.  To configure a new machine to use 'host-aout.c', specify:
 
             TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
             TDEPFILES= host-aout.o trad-core.o
 
-   in the `config/XXX.mt' file, and modify `configure.ac' to use the
-`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
-is selected.
+   in the 'config/XXX.mt' file, and modify 'configure.ac' to use the
+'XXX.mt' file (by setting "'bfd_target=XXX'") when your configuration is
+selected.
 
 3.2.1 Relocations
 -----------------
 
 *Description*
-The file `aoutx.h' provides for both the _standard_ and _extended_
-forms of a.out relocation records.
+The file 'aoutx.h' provides for both the _standard_ and _extended_ forms
+of a.out relocation records.
 
    The standard records contain only an address, a symbol index, and a
-type field. The extended records (used on 29ks and sparcs) also have a
+type field.  The extended records (used on 29ks and sparcs) also have a
 full integer for an addend.
 
 3.2.2 Internal entry points
 ---------------------------
 
 *Description*
-`aoutx.h' exports several routines for accessing the contents of an
+'aoutx.h' exports several routines for accessing the contents of an
 a.out file, which are gathered and exported in turn by various format
 specific files (eg sunos.c).
 
-3.2.2.1 `aout_SIZE_swap_exec_header_in'
+3.2.2.1 'aout_SIZE_swap_exec_header_in'
 .......................................
 
 *Synopsis*
@@ -9873,7 +9741,7 @@ specific files (eg sunos.c).
 Swap the information in an executable header RAW_BYTES taken from a raw
 byte stream memory image into the internal exec header structure EXECP.
 
-3.2.2.2 `aout_SIZE_swap_exec_header_out'
+3.2.2.2 'aout_SIZE_swap_exec_header_out'
 ........................................
 
 *Synopsis*
@@ -9882,10 +9750,10 @@ byte stream memory image into the intern
          struct internal_exec *execp,
          struct external_exec *raw_bytes);
    *Description*
-Swap the information in an internal exec header structure EXECP into
-the buffer RAW_BYTES ready for writing to disk.
+Swap the information in an internal exec header structure EXECP into the
+buffer RAW_BYTES ready for writing to disk.
 
-3.2.2.3 `aout_SIZE_some_aout_object_p'
+3.2.2.3 'aout_SIZE_some_aout_object_p'
 ......................................
 
 *Synopsis*
@@ -9899,7 +9767,7 @@ a.out file.  Do some more checking, and 
 is.  Call back to the calling environment's "finish up" function just
 before returning, to handle any last-minute setup.
 
-3.2.2.4 `aout_SIZE_mkobject'
+3.2.2.4 'aout_SIZE_mkobject'
 ............................
 
 *Synopsis*
@@ -9907,7 +9775,7 @@ before returning, to handle any last-min
    *Description*
 Initialize BFD ABFD for use with a.out files.
 
-3.2.2.5 `aout_SIZE_machine_type'
+3.2.2.5 'aout_SIZE_machine_type'
 ................................
 
 *Synopsis*
@@ -9916,15 +9784,15 @@ Initialize BFD ABFD for use with a.out f
          unsigned long machine,
          bfd_boolean *unknown);
    *Description*
-Keep track of machine architecture and machine type for a.out's. Return
-the `machine_type' for a particular architecture and machine, or
-`M_UNKNOWN' if that exact architecture and machine can't be represented
+Keep track of machine architecture and machine type for a.out's.  Return
+the 'machine_type' for a particular architecture and machine, or
+'M_UNKNOWN' if that exact architecture and machine can't be represented
 in a.out format.
 
-   If the architecture is understood, machine type 0 (default) is
-always understood.
+   If the architecture is understood, machine type 0 (default) is always
+understood.
 
-3.2.2.6 `aout_SIZE_set_arch_mach'
+3.2.2.6 'aout_SIZE_set_arch_mach'
 .................................
 
 *Synopsis*
@@ -9937,7 +9805,7 @@ Set the architecture and the machine of 
 and MACHINE.  Verify that ABFD's format can support the architecture
 required.
 
-3.2.2.7 `aout_SIZE_new_section_hook'
+3.2.2.7 'aout_SIZE_new_section_hook'
 ....................................
 
 *Synopsis*
@@ -9945,7 +9813,7 @@ required.
         (bfd *abfd,
          asection *newsect);
    *Description*
-Called by the BFD in response to a `bfd_make_section' request.
+Called by the BFD in response to a 'bfd_make_section' request.
 
 
 File: bfd.info,  Node: coff,  Next: elf,  Prev: aout,  Up: BFD back ends
@@ -9958,16 +9826,16 @@ differences between formats are the size
 structures on disk, and the occasional extra field.
 
    Coff in all its varieties is implemented with a few common files and
-a number of implementation specific files. For example, The 88k bcs
-coff format is implemented in the file `coff-m88k.c'. This file
-`#include's `coff/m88k.h' which defines the external structure of the
-coff format for the 88k, and `coff/internal.h' which defines the
-internal structure. `coff-m88k.c' also defines the relocations used by
+a number of implementation specific files.  For example, The 88k bcs
+coff format is implemented in the file 'coff-m88k.c'.  This file
+'#include's 'coff/m88k.h' which defines the external structure of the
+coff format for the 88k, and 'coff/internal.h' which defines the
+internal structure.  'coff-m88k.c' also defines the relocations used by
 the 88k format *Note Relocations::.
 
    The Intel i960 processor version of coff is implemented in
-`coff-i960.c'. This file has the same structure as `coff-m88k.c',
-except that it includes `coff/i960.h' rather than `coff-m88k.h'.
+'coff-i960.c'.  This file has the same structure as 'coff-m88k.c',
+except that it includes 'coff/i960.h' rather than 'coff-m88k.h'.
 
 3.3.1 Porting to a new version of coff
 --------------------------------------
@@ -9975,20 +9843,20 @@ except that it includes `coff/i960.h' ra
 The recommended method is to select from the existing implementations
 the version of coff which is most like the one you want to use.  For
 example, we'll say that i386 coff is the one you select, and that your
-coff flavour is called foo.  Copy `i386coff.c' to `foocoff.c', copy
-`../include/coff/i386.h' to `../include/coff/foo.h', and add the lines
-to `targets.c' and `Makefile.in' so that your new back end is used.
-Alter the shapes of the structures in `../include/coff/foo.h' so that
-they match what you need. You will probably also have to add `#ifdef's
-to the code in `coff/internal.h' and `coffcode.h' if your version of
+coff flavour is called foo.  Copy 'i386coff.c' to 'foocoff.c', copy
+'../include/coff/i386.h' to '../include/coff/foo.h', and add the lines
+to 'targets.c' and 'Makefile.in' so that your new back end is used.
+Alter the shapes of the structures in '../include/coff/foo.h' so that
+they match what you need.  You will probably also have to add '#ifdef's
+to the code in 'coff/internal.h' and 'coffcode.h' if your version of
 coff is too wild.
 
    You can verify that your new BFD backend works quite simply by
-building `objdump' from the `binutils' directory, and making sure that
+building 'objdump' from the 'binutils' directory, and making sure that
 its version of what's going on and your host system's idea (assuming it
-has the pretty standard coff dump utility, usually called `att-dump' or
-just `dump') are the same.  Then clean up your code, and send what
-you've done to Cygnus. Then your stuff will be in the next release, and
+has the pretty standard coff dump utility, usually called 'att-dump' or
+just 'dump') are the same.  Then clean up your code, and send what
+you've done to Cygnus.  Then your stuff will be in the next release, and
 you won't have to keep integrating it.
 
 3.3.2 How the coff backend works
@@ -10003,31 +9871,31 @@ The target-specific routines are further
 basically the same for all Coff targets except that they use the
 external symbol format or use different values for certain constants.
 
-   The generic routines are in `coffgen.c'.  These routines work for
-any Coff target.  They use some hooks into the target specific code;
-the hooks are in a `bfd_coff_backend_data' structure, one of which
-exists for each target.
-
-   The essentially similar target-specific routines are in
-`coffcode.h'.  This header file includes executable C code.  The
-various Coff targets first include the appropriate Coff header file,
-make any special defines that are needed, and then include `coffcode.h'.
+   The generic routines are in 'coffgen.c'.  These routines work for any
+Coff target.  They use some hooks into the target specific code; the
+hooks are in a 'bfd_coff_backend_data' structure, one of which exists
+for each target.
+
+   The essentially similar target-specific routines are in 'coffcode.h'.
+This header file includes executable C code.  The various Coff targets
+first include the appropriate Coff header file, make any special defines
+that are needed, and then include 'coffcode.h'.
 
    Some of the Coff targets then also have additional routines in the
 target source file itself.
 
-   For example, `coff-i960.c' includes `coff/internal.h' and
-`coff/i960.h'.  It then defines a few constants, such as `I960', and
-includes `coffcode.h'.  Since the i960 has complex relocation types,
-`coff-i960.c' also includes some code to manipulate the i960 relocs.
-This code is not in `coffcode.h' because it would not be used by any
+   For example, 'coff-i960.c' includes 'coff/internal.h' and
+'coff/i960.h'.  It then defines a few constants, such as 'I960', and
+includes 'coffcode.h'.  Since the i960 has complex relocation types,
+'coff-i960.c' also includes some code to manipulate the i960 relocs.
+This code is not in 'coffcode.h' because it would not be used by any
 other target.
 
 3.3.2.2 Coff long section names
 ...............................
 
 In the standard Coff object format, section names are limited to the
-eight bytes available in the `s_name' field of the `SCNHDR' section
+eight bytes available in the 's_name' field of the 'SCNHDR' section
 header structure.  The format requires the field to be NUL-padded, but
 not necessarily NUL-terminated, so the longest section names permitted
 are a full eight characters.
@@ -10035,8 +9903,8 @@ are a full eight characters.
    The Microsoft PE variants of the Coff object file format add an
 extension to support the use of long section names.  This extension is
 defined in section 4 of the Microsoft PE/COFF specification (rev 8.1).
-If a section name is too long to fit into the section header's `s_name'
-field, it is instead placed into the string table, and the `s_name'
+If a section name is too long to fit into the section header's 's_name'
+field, it is instead placed into the string table, and the 's_name'
 field is filled with a slash ("/") followed by the ASCII decimal
 representation of the offset of the full name relative to the string
 table base.
@@ -10050,14 +9918,14 @@ images are to be truncated.
 contain a string table and long section names.  This would appear to be
 technically valid, as the standard only says that Coff debugging
 information is deprecated, not forbidden, and in practice it works,
-although some tools that parse PE files expecting the MS standard
-format may become confused; `PEview' is one known example.
+although some tools that parse PE files expecting the MS standard format
+may become confused; 'PEview' is one known example.
 
    The functionality is supported in BFD by code implemented under the
-control of the macro `COFF_LONG_SECTION_NAMES'.  If not defined, the
+control of the macro 'COFF_LONG_SECTION_NAMES'.  If not defined, the
 format does not support long section names in any way.  If defined, it
-is used to initialise a flag, `_bfd_coff_long_section_names', and a
-hook function pointer, `_bfd_coff_set_long_section_names', in the Coff
+is used to initialise a flag, '_bfd_coff_long_section_names', and a hook
+function pointer, '_bfd_coff_set_long_section_names', in the Coff
 backend data structure.  The flag controls the generation of long
 section names in output BFDs at runtime; if it is false, as it will be
 by default when generating an executable image, long section names are
@@ -10074,77 +9942,77 @@ when deciding what output format to gene
 is opened for read and subsequently converted to a writeable BFD and
 modified in-place will retain whatever format it had on input.
 
-   If `COFF_LONG_SECTION_NAMES' is simply defined (blank), or is
-defined to the value "1", then long section names are enabled by
-default; if it is defined to the value zero, they are disabled by
-default (but still accepted in input BFDs).  The header `coffcode.h'
-defines a macro, `COFF_DEFAULT_LONG_SECTION_NAMES', which is used in
-the backends to initialise the backend data structure fields
-appropriately; see the comments for further detail.
+   If 'COFF_LONG_SECTION_NAMES' is simply defined (blank), or is defined
+to the value "1", then long section names are enabled by default; if it
+is defined to the value zero, they are disabled by default (but still
+accepted in input BFDs).  The header 'coffcode.h' defines a macro,
+'COFF_DEFAULT_LONG_SECTION_NAMES', which is used in the backends to
+initialise the backend data structure fields appropriately; see the
+comments for further detail.
 
 3.3.2.3 Bit twiddling
 .....................
 
-Each flavour of coff supported in BFD has its own header file
-describing the external layout of the structures. There is also an
-internal description of the coff layout, in `coff/internal.h'. A major
-function of the coff backend is swapping the bytes and twiddling the
-bits to translate the external form of the structures into the normal
-internal form. This is all performed in the `bfd_swap'_thing_direction
-routines. Some elements are different sizes between different versions
-of coff; it is the duty of the coff version specific include file to
-override the definitions of various packing routines in `coffcode.h'.
-E.g., the size of line number entry in coff is sometimes 16 bits, and
-sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
-will select the correct one. No doubt, some day someone will find a
-version of coff which has a varying field size not catered to at the
-moment. To port BFD, that person will have to add more `#defines'.
-Three of the bit twiddling routines are exported to `gdb';
-`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
-reads the symbol table on its own, but uses BFD to fix things up.  More
-of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
-`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
-`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
-`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
+Each flavour of coff supported in BFD has its own header file describing
+the external layout of the structures.  There is also an internal
+description of the coff layout, in 'coff/internal.h'.  A major function
+of the coff backend is swapping the bytes and twiddling the bits to
+translate the external form of the structures into the normal internal
+form.  This is all performed in the 'bfd_swap'_thing_direction routines.
+Some elements are different sizes between different versions of coff; it
+is the duty of the coff version specific include file to override the
+definitions of various packing routines in 'coffcode.h'.  E.g., the size
+of line number entry in coff is sometimes 16 bits, and sometimes 32
+bits.  '#define'ing 'PUT_LNSZ_LNNO' and 'GET_LNSZ_LNNO' will select the
+correct one.  No doubt, some day someone will find a version of coff
+which has a varying field size not catered to at the moment.  To port
+BFD, that person will have to add more '#defines'.  Three of the bit
+twiddling routines are exported to 'gdb'; 'coff_swap_aux_in',
+'coff_swap_sym_in' and 'coff_swap_lineno_in'.  'GDB' reads the symbol
+table on its own, but uses BFD to fix things up.  More of the bit
+twiddlers are exported for 'gas'; 'coff_swap_aux_out',
+'coff_swap_sym_out', 'coff_swap_lineno_out', 'coff_swap_reloc_out',
+'coff_swap_filehdr_out', 'coff_swap_aouthdr_out',
+'coff_swap_scnhdr_out'.  'Gas' currently keeps track of all the symbol
 table and reloc drudgery itself, thereby saving the internal BFD
-overhead, but uses BFD to swap things on the way out, making cross
-ports much safer.  Doing so also allows BFD (and thus the linker) to
-use the same header files as `gas', which makes one avenue to disaster
+overhead, but uses BFD to swap things on the way out, making cross ports
+much safer.  Doing so also allows BFD (and thus the linker) to use the
+same header files as 'gas', which makes one avenue to disaster
 disappear.
 
 3.3.2.4 Symbol reading
 ......................
 
 The simple canonical form for symbols used by BFD is not rich enough to
-keep all the information available in a coff symbol table. The back end
+keep all the information available in a coff symbol table.  The back end
 gets around this problem by keeping the original symbol table around,
 "behind the scenes".
 
    When a symbol table is requested (through a call to
-`bfd_canonicalize_symtab'), a request gets through to
-`coff_get_normalized_symtab'. This reads the symbol table from the coff
-file and swaps all the structures inside into the internal form. It
+'bfd_canonicalize_symtab'), a request gets through to
+'coff_get_normalized_symtab'.  This reads the symbol table from the coff
+file and swaps all the structures inside into the internal form.  It
 also fixes up all the pointers in the table (represented in the file by
 offsets from the first symbol in the table) into physical pointers to
-elements in the new internal table. This involves some work since the
+elements in the new internal table.  This involves some work since the
 meanings of fields change depending upon context: a field that is a
 pointer to another structure in the symbol table at one moment may be
-the size in bytes of a structure at the next.  Another pass is made
-over the table. All symbols which mark file names (`C_FILE' symbols)
-are modified so that the internal string points to the value in the
-auxent (the real filename) rather than the normal text associated with
-the symbol (`".file"').
+the size in bytes of a structure at the next.  Another pass is made over
+the table.  All symbols which mark file names ('C_FILE' symbols) are
+modified so that the internal string points to the value in the auxent
+(the real filename) rather than the normal text associated with the
+symbol ('".file"').
 
-   At this time the symbol names are moved around. Coff stores all
+   At this time the symbol names are moved around.  Coff stores all
 symbols less than nine characters long physically within the symbol
 table; longer strings are kept at the end of the file in the string
-table. This pass moves all strings into memory and replaces them with
+table.  This pass moves all strings into memory and replaces them with
 pointers to the strings.
 
    The symbol table is massaged once again, this time to create the
-canonical table used by the BFD application. Each symbol is inspected
-in turn, and a decision made (using the `sclass' field) about the
-various flags to set in the `asymbol'.  *Note Symbols::. The generated
+canonical table used by the BFD application.  Each symbol is inspected
+in turn, and a decision made (using the 'sclass' field) about the
+various flags to set in the 'asymbol'.  *Note Symbols::.  The generated
 canonical table shares strings with the hidden internal symbol table.
 
    Any linenumbers are read from the coff file too, and attached to the
@@ -10154,50 +10022,50 @@ symbols which own the functions the line
 ......................
 
 Writing a symbol to a coff file which didn't come from a coff file will
-lose any debugging information. The `asymbol' structure remembers the
+lose any debugging information.  The 'asymbol' structure remembers the
 BFD from which the symbol was taken, and on output the back end makes
 sure that the same destination target as source target is present.
 
    When the symbols have come from a coff file then all the debugging
 information is preserved.
 
-   Symbol tables are provided for writing to the back end in a vector
-of pointers to pointers. This allows applications like the linker to
+   Symbol tables are provided for writing to the back end in a vector of
+pointers to pointers.  This allows applications like the linker to
 accumulate and output large symbol tables without having to do too much
 byte copying.
 
-   This function runs through the provided symbol table and patches
-each symbol marked as a file place holder (`C_FILE') to point to the
-next file place holder in the list. It also marks each `offset' field
-in the list with the offset from the first symbol of the current symbol.
+   This function runs through the provided symbol table and patches each
+symbol marked as a file place holder ('C_FILE') to point to the next
+file place holder in the list.  It also marks each 'offset' field in the
+list with the offset from the first symbol of the current symbol.
 
    Another function of this procedure is to turn the canonical value
-form of BFD into the form used by coff. Internally, BFD expects symbol
+form of BFD into the form used by coff.  Internally, BFD expects symbol
 values to be offsets from a section base; so a symbol physically at
 0x120, but in a section starting at 0x100, would have the value 0x20.
-Coff expects symbols to contain their final value, so symbols have
-their values changed at this point to reflect their sum with their
-owning section.  This transformation uses the `output_section' field of
-the `asymbol''s `asection' *Note Sections::.
+Coff expects symbols to contain their final value, so symbols have their
+values changed at this point to reflect their sum with their owning
+section.  This transformation uses the 'output_section' field of the
+'asymbol''s 'asection' *Note Sections::.
 
-   * `coff_mangle_symbols'
+   * 'coff_mangle_symbols'
    This routine runs though the provided symbol table and uses the
 offsets generated by the previous pass and the pointers generated when
-the symbol table was read in to create the structured hierarchy
-required by coff. It changes each pointer to a symbol into the index
-into the symbol table of the asymbol.
-
-   * `coff_write_symbols'
-   This routine runs through the symbol table and patches up the
-symbols from their internal form into the coff way, calls the bit
-twiddlers, and writes out the table to the file.
+the symbol table was read in to create the structured hierarchy required
+by coff.  It changes each pointer to a symbol into the index into the
+symbol table of the asymbol.
+
+   * 'coff_write_symbols'
+   This routine runs through the symbol table and patches up the symbols
+from their internal form into the coff way, calls the bit twiddlers, and
+writes out the table to the file.
 
-3.3.2.6 `coff_symbol_type'
+3.3.2.6 'coff_symbol_type'
 ..........................
 
 *Description*
-The hidden information for an `asymbol' is described in a
-`combined_entry_type':
+The hidden information for an 'asymbol' is described in a
+'combined_entry_type':
 
 
      typedef struct coff_ptr_struct
@@ -10255,8 +10123,8 @@ The hidden information for an `asymbol' 
        /* Have the line numbers been relocated yet ? */
        bfd_boolean done_lineno;
      } coff_symbol_type;
-   
-3.3.2.7 `bfd_coff_backend_data'
+
+3.3.2.7 'bfd_coff_backend_data'
 ...............................
 
      /* COFF symbol classifications.  */
@@ -10278,7 +10146,8 @@ The hidden information for an `asymbol' 
      typedef asection * (*coff_gc_mark_hook_fn)
        (asection *, struct bfd_link_info *, struct internal_reloc *,
         struct coff_link_hash_entry *, struct internal_syment *);
-Special entry points for gdb to swap in coff symbol table parts:
+
+   Special entry points for gdb to swap in coff symbol table parts:
      typedef struct
      {
        void (*_bfd_coff_swap_aux_in)
@@ -10565,13 +10434,13 @@ Special entry points for gdb to swap in 
 3.3.2.8 Writing relocations
 ...........................
 
-To write relocations, the back end steps though the canonical
-relocation table and create an `internal_reloc'. The symbol index to
-use is removed from the `offset' field in the symbol table supplied.
-The address comes directly from the sum of the section base address and
-the relocation offset; the type is dug directly from the howto field.
-Then the `internal_reloc' is swapped into the shape of an
-`external_reloc' and written out to disk.
+To write relocations, the back end steps though the canonical relocation
+table and create an 'internal_reloc'.  The symbol index to use is
+removed from the 'offset' field in the symbol table supplied.  The
+address comes directly from the sum of the section base address and the
+relocation offset; the type is dug directly from the howto field.  Then
+the 'internal_reloc' is swapped into the shape of an 'external_reloc'
+and written out to disk.
 
 3.3.2.9 Reading linenumbers
 ...........................
@@ -10579,11 +10448,11 @@ Then the `internal_reloc' is swapped int
 Creating the linenumber table is done by reading in the entire coff
 linenumber table, and creating another table for internal use.
 
-   A coff linenumber table is structured so that each function is
-marked as having a line number of 0. Each line within the function is
-an offset from the first line in the function. The base of the line
-number information for the table is stored in the symbol associated
-with the function.
+   A coff linenumber table is structured so that each function is marked
+as having a line number of 0.  Each line within the function is an
+offset from the first line in the function.  The base of the line number
+information for the table is stored in the symbol associated with the
+function.
 
    Note: The PE format uses line number 0 for a flag indicating a new
 source file.
@@ -10597,25 +10466,25 @@ and each symbol which marks a function i
 ............................
 
 Coff relocations are easily transformed into the internal BFD form
-(`arelent').
+('arelent').
 
    Reading a coff relocation table is done in the following stages:
 
    * Read the entire coff relocation table into memory.
 
-   * Process each relocation in turn; first swap it from the external
-     to the internal form.
+   * Process each relocation in turn; first swap it from the external to
+     the internal form.
 
    * Turn the symbol referenced in the relocation's symbol index into a
-     pointer into the canonical symbol table.  This table is the same
-     as the one returned by a call to `bfd_canonicalize_symtab'. The
-     back end will call that routine and save the result if a
+     pointer into the canonical symbol table.  This table is the same as
+     the one returned by a call to 'bfd_canonicalize_symtab'.  The back
+     end will call that routine and save the result if a
      canonicalization hasn't been done.
 
-   * The reloc index is turned into a pointer to a howto structure, in
-     a back end specific way. For instance, the 386 and 960 use the
-     `r_type' to directly produce an index into a howto table vector;
-     the 88k subtracts a number from the `r_type' field and creates an
+   * The reloc index is turned into a pointer to a howto structure, in a
+     back end specific way.  For instance, the 386 and 960 use the
+     'r_type' to directly produce an index into a howto table vector;
+     the 88k subtracts a number from the 'r_type' field and creates an
      addend field.
 
 
@@ -10637,17 +10506,16 @@ File: bfd.info,  Node: mmo,  Prev: elf, 
 3.5 mmo backend
 ===============
 
-The mmo object format is used exclusively together with Professor
-Donald E. Knuth's educational 64-bit processor MMIX.  The simulator
-`mmix' which is available at `http://mmix.cs.hm.edu/src/index.html'
-understands this format.  That package also includes a combined
-assembler and linker called `mmixal'.  The mmo format has no advantages
-feature-wise compared to e.g. ELF.  It is a simple non-relocatable
-object format with no support for archives or debugging information,
-except for symbol value information and line numbers (which is not yet
-implemented in BFD).  See `http://mmix.cs.hm.edu/' for more information
-about MMIX.  The ELF format is used for intermediate object files in
-the BFD implementation.
+The mmo object format is used exclusively together with Professor Donald
+E. Knuth's educational 64-bit processor MMIX. The simulator 'mmix' which
+is available at <http://mmix.cs.hm.edu/src/index.html> understands this
+format.  That package also includes a combined assembler and linker
+called 'mmixal'.  The mmo format has no advantages feature-wise compared
+to e.g.  ELF. It is a simple non-relocatable object format with no
+support for archives or debugging information, except for symbol value
+information and line numbers (which is not yet implemented in BFD). See
+<http://mmix.cs.hm.edu/> for more information about MMIX. The ELF format
+is used for intermediate object files in the BFD implementation.
 
 * Menu:
 
@@ -10662,112 +10530,111 @@ File: bfd.info,  Node: File layout,  Nex
 -----------------
 
 The mmo file contents is not partitioned into named sections as with
-e.g. ELF.  Memory areas is formed by specifying the location of the
-data that follows.  Only the memory area `0x0000...00' to `0x01ff...ff'
-is executable, so it is used for code (and constants) and the area
-`0x2000...00' to `0x20ff...ff' is used for writable data.  *Note mmo
+e.g. ELF. Memory areas is formed by specifying the location of the data
+that follows.  Only the memory area '0x0000...00' to '0x01ff...ff' is
+executable, so it is used for code (and constants) and the area
+'0x2000...00' to '0x20ff...ff' is used for writable data.  *Note mmo
 section mapping::.
 
    There is provision for specifying "special data" of 65536 different
-types.  We use type 80 (decimal), arbitrarily chosen the same as the
-ELF `e_machine' number for MMIX, filling it with section information
-normally found in ELF objects. *Note mmo section mapping::.
+types.  We use type 80 (decimal), arbitrarily chosen the same as the ELF
+'e_machine' number for MMIX, filling it with section information
+normally found in ELF objects.  *Note mmo section mapping::.
 
    Contents is entered as 32-bit words, xor:ed over previous contents,
-always zero-initialized.  A word that starts with the byte `0x98' forms
-a command called a `lopcode', where the next byte distinguished between
-the thirteen lopcodes.  The two remaining bytes, called the `Y' and `Z'
-fields, or the `YZ' field (a 16-bit big-endian number), are used for
+always zero-initialized.  A word that starts with the byte '0x98' forms
+a command called a 'lopcode', where the next byte distinguished between
+the thirteen lopcodes.  The two remaining bytes, called the 'Y' and 'Z'
+fields, or the 'YZ' field (a 16-bit big-endian number), are used for
 various purposes different for each lopcode.  As documented in
-`http://mmix.cs.hm.edu/doc/mmixal.pdf', the lopcodes are:
+<http://mmix.cs.hm.edu/doc/mmixal.pdf>, the lopcodes are:
 
-`lop_quote'
+'lop_quote'
      0x98000001.  The next word is contents, regardless of whether it
      starts with 0x98 or not.
 
-`lop_loc'
-     0x9801YYZZ, where `Z' is 1 or 2.  This is a location directive,
-     setting the location for the next data to the next 32-bit word
-     (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56.  Normally
-     `Y' is 0 for the text segment and 2 for the data segment.  Beware
-     that the low bits of non- tetrabyte-aligned values are silently
-     discarded when being automatically incremented and when storing
-     contents (in contrast to e.g. its use as current location when
-     followed by lop_fixo et al before the next possibly-quoted
-     tetrabyte contents).
+'lop_loc'
+     0x9801YYZZ, where 'Z' is 1 or 2.  This is a location directive,
+     setting the location for the next data to the next 32-bit word (for
+     Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56.  Normally 'Y' is
+     0 for the text segment and 2 for the data segment.  Beware that the
+     low bits of non- tetrabyte-aligned values are silently discarded
+     when being automatically incremented and when storing contents (in
+     contrast to e.g.  its use as current location when followed by
+     lop_fixo et al before the next possibly-quoted tetrabyte contents).
 
-`lop_skip'
-     0x9802YYZZ.  Increase the current location by `YZ' bytes.
+'lop_skip'
+     0x9802YYZZ. Increase the current location by 'YZ' bytes.
 
-`lop_fixo'
-     0x9803YYZZ, where `Z' is 1 or 2.  Store the current location as 64
+'lop_fixo'
+     0x9803YYZZ, where 'Z' is 1 or 2.  Store the current location as 64
      bits into the location pointed to by the next 32-bit (Z = 1) or
      64-bit (Z = 2) word, plus Y * 2^56.
 
-`lop_fixr'
-     0x9804YYZZ.  `YZ' is stored into the current location plus 2 - 4 *
+'lop_fixr'
+     0x9804YYZZ. 'YZ' is stored into the current location plus 2 - 4 *
      YZ.
 
-`lop_fixrx'
-     0x980500ZZ.  `Z' is 16 or 24.  A value `L' derived from the
-     following 32-bit word are used in a manner similar to `YZ' in
-     lop_fixr: it is xor:ed into the current location minus 4 * L.  The
+'lop_fixrx'
+     0x980500ZZ. 'Z' is 16 or 24.  A value 'L' derived from the
+     following 32-bit word are used in a manner similar to 'YZ' in
+     lop_fixr: it is xor:ed into the current location minus 4 * L. The
      first byte of the word is 0 or 1.  If it is 1, then L = (LOWEST 24
      BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
 
-`lop_file'
-     0x9806YYZZ.  `Y' is the file number, `Z' is count of 32-bit words.
-     Set the file number to `Y' and the line counter to 0.  The next Z
-     * 4 bytes contain the file name, padded with zeros if the count is
-     not a multiple of four.  The same `Y' may occur multiple times,
-     but `Z' must be 0 for all but the first occurrence.
+'lop_file'
+     0x9806YYZZ. 'Y' is the file number, 'Z' is count of 32-bit words.
+     Set the file number to 'Y' and the line counter to 0.  The next Z *
+     4 bytes contain the file name, padded with zeros if the count is
+     not a multiple of four.  The same 'Y' may occur multiple times, but
+     'Z' must be 0 for all but the first occurrence.
 
-`lop_line'
-     0x9807YYZZ.  `YZ' is the line number.  Together with lop_file, it
+'lop_line'
+     0x9807YYZZ. 'YZ' is the line number.  Together with lop_file, it
      forms the source location for the next 32-bit word.  Note that for
      each non-lopcode 32-bit word, line numbers are assumed incremented
      by one.
 
-`lop_spec'
-     0x9808YYZZ.  `YZ' is the type number.  Data until the next lopcode
-     other than lop_quote forms special data of type `YZ'.  *Note mmo
+'lop_spec'
+     0x9808YYZZ. 'YZ' is the type number.  Data until the next lopcode
+     other than lop_quote forms special data of type 'YZ'.  *Note mmo
      section mapping::.
 
      Other types than 80, (or type 80 with a content that does not
-     parse) is stored in sections named `.MMIX.spec_data.N' where N is
-     the `YZ'-type.  The flags for such a sections say not to allocate
+     parse) is stored in sections named '.MMIX.spec_data.N' where N is
+     the 'YZ'-type.  The flags for such a sections say not to allocate
      or load the data.  The vma is 0.  Contents of multiple occurrences
      of special data N is concatenated to the data of the previous
      lop_spec Ns.  The location in data or code at which the lop_spec
      occurred is lost.
 
-`lop_pre'
-     0x980901ZZ.  The first lopcode in a file.  The `Z' field forms the
+'lop_pre'
+     0x980901ZZ. The first lopcode in a file.  The 'Z' field forms the
      length of header information in 32-bit words, where the first word
-     tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
+     tells the time in seconds since '00:00:00 GMT Jan 1 1970'.
 
-`lop_post'
-     0x980a00ZZ.  Z > 32.  This lopcode follows after all
-     content-generating lopcodes in a program.  The `Z' field denotes
-     the value of `rG' at the beginning of the program.  The following
+'lop_post'
+     0x980a00ZZ. Z > 32.  This lopcode follows after all
+     content-generating lopcodes in a program.  The 'Z' field denotes
+     the value of 'rG' at the beginning of the program.  The following
      256 - Z big-endian 64-bit words are loaded into global registers
-     `$G' ... `$255'.
+     '$G' ... '$255'.
 
-`lop_stab'
+'lop_stab'
      0x980b0000.  The next-to-last lopcode in a program.  Must follow
      immediately after the lop_post lopcode and its data.  After this
      lopcode follows all symbols in a compressed format (*note
      Symbol-table::).
 
-`lop_end'
-     0x980cYYZZ.  The last lopcode in a program.  It must follow the
-     lop_stab lopcode and its data.  The `YZ' field contains the number
+'lop_end'
+     0x980cYYZZ. The last lopcode in a program.  It must follow the
+     lop_stab lopcode and its data.  The 'YZ' field contains the number
      of 32-bit words of symbol table information after the preceding
      lop_stab lopcode.
 
-   Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
-`lop_fixo' are not generated by BFD, but are handled.  They are
-generated by `mmixal'.
+   Note that the lopcode "fixups"; 'lop_fixr', 'lop_fixrx' and
+'lop_fixo' are not generated by BFD, but are handled.  They are
+generated by 'mmixal'.
 
    This trivial one-label, one-instruction file:
 
@@ -10804,11 +10671,11 @@ File: bfd.info,  Node: Symbol-table,  Ne
 -------------------------
 
 From mmixal.w (or really, the generated mmixal.tex) in the MMIXware
-package which also contains the `mmix' simulator: "Symbols are stored
-and retrieved by means of a `ternary search trie', following ideas of
-Bentley and Sedgewick. (See ACM-SIAM Symp. on Discrete Algorithms `8'
-(1997), 360-369; R.Sedgewick, `Algorithms in C' (Reading, Mass.
-Addison-Wesley, 1998), `15.4'.)  Each trie node stores a character, and
+package which also contains the 'mmix' simulator: "Symbols are stored
+and retrieved by means of a 'ternary search trie', following ideas of
+Bentley and Sedgewick.  (See ACM-SIAM Symp. on Discrete Algorithms '8'
+(1997), 360-369; R.Sedgewick, 'Algorithms in C' (Reading, Mass.
+Addison-Wesley, 1998), '15.4'.)  Each trie node stores a character, and
 there are branches to subtries for the cases where a given character is
 less than, equal to, or greater than the character in the trie.  There
 also is a pointer to a symbol table entry if a symbol ends at the
@@ -10819,7 +10686,7 @@ acts on a single virtual global symbol, 
 and signalling complete symbol points.  Here, we read the stream and
 create symbols at the completion points.
 
-   First, there's a control byte `m'.  If any of the listed bits in `m'
+   First, there's a control byte 'm'.  If any of the listed bits in 'm'
 is nonzero, we execute what stands at the right, in the listed order:
 
       (MMO3_LEFT)
@@ -10829,7 +10696,7 @@ is nonzero, we execute what stands at th
       (MMO3_SYMBITS)
       0x2f - Read the next byte as a character and store it in the
              current character position; increment character position.
-             Test the bits of `m':
+             Test the bits of m:
 
              (MMO3_WCHAR)
              0x80 - The character is 16-bit (so read another byte,
@@ -10867,7 +10734,7 @@ is nonzero, we execute what stands at th
       0x10 - Traverse right trie.  (Read a new command byte and
              recurse.)
 
-   Let's look again at the `lop_stab' for the trivial file (*note File
+   Let's look again at the 'lop_stab' for the trivial file (*note File
 layout::).
 
       0x980b0000 - lop_stab for ":Main" = 0, serial 1.
@@ -10903,27 +10770,27 @@ File: bfd.info,  Node: mmo section mappi
 The implementation in BFD uses special data type 80 (decimal) to
 encapsulate and describe named sections, containing e.g. debug
 information.  If needed, any datum in the encapsulation will be quoted
-using lop_quote.  First comes a 32-bit word holding the number of
-32-bit words containing the zero-terminated zero-padded segment name.
-After the name there's a 32-bit word holding flags describing the
-section type.  Then comes a 64-bit big-endian word with the section
-length (in bytes), then another with the section start address.
-Depending on the type of section, the contents might follow,
-zero-padded to 32-bit boundary.  For a loadable section (such as data
-or code), the contents might follow at some later point, not
-necessarily immediately, as a lop_loc with the same start address as in
-the section description, followed by the contents.  This in effect
-forms a descriptor that must be emitted before the actual contents.
-Sections described this way must not overlap.
+using lop_quote.  First comes a 32-bit word holding the number of 32-bit
+words containing the zero-terminated zero-padded segment name.  After
+the name there's a 32-bit word holding flags describing the section
+type.  Then comes a 64-bit big-endian word with the section length (in
+bytes), then another with the section start address.  Depending on the
+type of section, the contents might follow, zero-padded to 32-bit
+boundary.  For a loadable section (such as data or code), the contents
+might follow at some later point, not necessarily immediately, as a
+lop_loc with the same start address as in the section description,
+followed by the contents.  This in effect forms a descriptor that must
+be emitted before the actual contents.  Sections described this way must
+not overlap.
 
    For areas that don't have such descriptors, synthetic sections are
-formed by BFD.  Consecutive contents in the two memory areas
-`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
-entered in sections named `.text' and `.data' respectively.  If an area
+formed by BFD. Consecutive contents in the two memory areas
+'0x0000...00' to '0x01ff...ff' and '0x2000...00' to '0x20ff...ff' are
+entered in sections named '.text' and '.data' respectively.  If an area
 is not otherwise described, but would together with a neighboring lower
-area be less than `0x40000000' bytes long, it is joined with the lower
+area be less than '0x40000000' bytes long, it is joined with the lower
 area and the gap is zero-filled.  For other cases, a new section is
-formed, named `.MMIX.sec.N'.  Here, N is a number, a running count
+formed, named '.MMIX.sec.N'.  Here, N is a number, a running count
 through the mmo file, starting at 0.
 
    A loadable section specified as:
@@ -10932,7 +10799,7 @@ through the mmo file, starting at 0.
       TETRA 1,2,3,4,-1,-2009
       BYTE 80
 
-   and linked to address `0x4', is represented by the sequence:
+   and linked to address '0x4', is represented by the sequence:
 
       0x98080050 - lop_spec 80
       0x00000002 - two 32-bit words for the section name
@@ -10961,7 +10828,7 @@ contents.  Compare this to a non-loaded 
       TETRA 200001,100002
       BYTE 38,40
 
-   This, when linked to address `0x200000000000001c', is represented by:
+   This, when linked to address '0x200000000000001c', is represented by:
 
       0x98080050 - lop_spec 80
       0x00000002 - two 32-bit words for the section name
@@ -10987,7 +10854,7 @@ File: bfd.info,  Node: GNU Free Document
                      Version 1.3, 3 November 2008
 
      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -11012,21 +10879,21 @@ File: bfd.info,  Node: GNU Free Document
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -11044,12 +10911,12 @@ File: bfd.info,  Node: GNU Free Document
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -11060,27 +10927,27 @@ File: bfd.info,  Node: GNU Free Document
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -11118,8 +10985,8 @@ File: bfd.info,  Node: GNU Free Document
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -11133,12 +11000,11 @@ File: bfd.info,  Node: GNU Free Document
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -11146,40 +11012,39 @@ File: bfd.info,  Node: GNU Free Document
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -11209,31 +11074,30 @@ File: bfd.info,  Node: GNU Free Document
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -11246,11 +11110,11 @@ File: bfd.info,  Node: GNU Free Document
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -11259,15 +11123,15 @@ File: bfd.info,  Node: GNU Free Document
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -11277,8 +11141,8 @@ File: bfd.info,  Node: GNU Free Document
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -11305,20 +11169,20 @@ File: bfd.info,  Node: GNU Free Document
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     a storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -11363,8 +11227,8 @@ File: bfd.info,  Node: GNU Free Document
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -11376,33 +11240,33 @@ File: bfd.info,  Node: GNU Free Document
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
+  10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
      proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
+  11. RELICENSING
 
      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
@@ -11432,7 +11296,6 @@ File: bfd.info,  Node: GNU Free Document
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -11449,7 +11312,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -11460,9 +11323,9 @@ combination of the three, merge those tw
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 
 File: bfd.info,  Node: BFD Index,  Prev: GNU Free Documentation License,  Up: Top
@@ -11479,8 +11342,12 @@ BFD Index
                                                              (line   15)
 * _bfd_generic_link_add_one_symbol:      Adding symbols from an object file.
                                                              (line   19)
+* _bfd_generic_link_check_relocs:        Writing the symbol table.
+                                                             (line  116)
 * _bfd_generic_make_empty_symbol:        symbol handling functions.
-                                                             (line   92)
+                                                             (line   96)
+* _bfd_generic_verify_endian_match:      Writing the symbol table.
+                                                             (line  144)
 * _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
                                                              (line    6)
 * _bfd_link_final_link in target vector: Performing the Final Link.
@@ -11489,143 +11356,146 @@ BFD Index
                                                              (line    6)
 * _bfd_relocate_contents:                Relocating the section contents.
                                                              (line   22)
-* aout_SIZE_machine_type:                aout.               (line  147)
-* aout_SIZE_mkobject:                    aout.               (line  139)
-* aout_SIZE_new_section_hook:            aout.               (line  177)
-* aout_SIZE_set_arch_mach:               aout.               (line  164)
-* aout_SIZE_some_aout_object_p:          aout.               (line  125)
-* aout_SIZE_swap_exec_header_in:         aout.               (line  101)
-* aout_SIZE_swap_exec_header_out:        aout.               (line  113)
-* arelent_chain:                         typedef arelent.    (line  336)
+* aout_SIZE_machine_type:                aout.               (line  145)
+* aout_SIZE_mkobject:                    aout.               (line  137)
+* aout_SIZE_new_section_hook:            aout.               (line  175)
+* aout_SIZE_set_arch_mach:               aout.               (line  162)
+* aout_SIZE_some_aout_object_p:          aout.               (line  123)
+* aout_SIZE_swap_exec_header_in:         aout.               (line   99)
+* aout_SIZE_swap_exec_header_out:        aout.               (line  111)
+* arelent_chain:                         typedef arelent.    (line  340)
 * BFD:                                   Overview.           (line    6)
 * BFD canonical format:                  Canonical format.   (line   11)
 * bfd_alloc:                             Opening and Closing.
-                                                             (line  239)
+                                                             (line  238)
 * bfd_alloc2:                            Opening and Closing.
-                                                             (line  248)
-* bfd_alt_mach_code:                     Miscellaneous.      (line  307)
-* bfd_arch_bits_per_address:             Architectures.      (line  609)
-* bfd_arch_bits_per_byte:                Architectures.      (line  601)
-* bfd_arch_default_fill:                 Architectures.      (line  690)
-* bfd_arch_get_compatible:               Architectures.      (line  544)
-* bfd_arch_list:                         Architectures.      (line  535)
-* bfd_arch_mach_octets_per_byte:         Architectures.      (line  678)
-* BFD_ARELOC_BFIN_ADD:                   howto manager.      (line 1133)
-* BFD_ARELOC_BFIN_ADDR:                  howto manager.      (line 1184)
-* BFD_ARELOC_BFIN_AND:                   howto manager.      (line 1154)
-* BFD_ARELOC_BFIN_COMP:                  howto manager.      (line 1175)
-* BFD_ARELOC_BFIN_CONST:                 howto manager.      (line 1130)
-* BFD_ARELOC_BFIN_DIV:                   howto manager.      (line 1142)
-* BFD_ARELOC_BFIN_HWPAGE:                howto manager.      (line 1181)
-* BFD_ARELOC_BFIN_LAND:                  howto manager.      (line 1163)
-* BFD_ARELOC_BFIN_LEN:                   howto manager.      (line 1169)
-* BFD_ARELOC_BFIN_LOR:                   howto manager.      (line 1166)
-* BFD_ARELOC_BFIN_LSHIFT:                howto manager.      (line 1148)
-* BFD_ARELOC_BFIN_MOD:                   howto manager.      (line 1145)
-* BFD_ARELOC_BFIN_MULT:                  howto manager.      (line 1139)
-* BFD_ARELOC_BFIN_NEG:                   howto manager.      (line 1172)
-* BFD_ARELOC_BFIN_OR:                    howto manager.      (line 1157)
-* BFD_ARELOC_BFIN_PAGE:                  howto manager.      (line 1178)
-* BFD_ARELOC_BFIN_PUSH:                  howto manager.      (line 1127)
-* BFD_ARELOC_BFIN_RSHIFT:                howto manager.      (line 1151)
-* BFD_ARELOC_BFIN_SUB:                   howto manager.      (line 1136)
-* BFD_ARELOC_BFIN_XOR:                   howto manager.      (line 1160)
-* bfd_cache_close:                       File Caching.       (line   26)
-* bfd_cache_close_all:                   File Caching.       (line   39)
-* bfd_cache_init:                        File Caching.       (line   18)
+                                                             (line  247)
+* bfd_alt_mach_code:                     Miscellaneous.      (line  286)
+* bfd_arch_bits_per_address:             Architectures.      (line  632)
+* bfd_arch_bits_per_byte:                Architectures.      (line  624)
+* bfd_arch_default_fill:                 Architectures.      (line  713)
+* bfd_arch_get_compatible:               Architectures.      (line  567)
+* bfd_arch_list:                         Architectures.      (line  558)
+* bfd_arch_mach_octets_per_byte:         Architectures.      (line  701)
+* BFD_ARELOC_BFIN_ADD:                   howto manager.      (line 1090)
+* BFD_ARELOC_BFIN_ADDR:                  howto manager.      (line 1124)
+* BFD_ARELOC_BFIN_AND:                   howto manager.      (line 1104)
+* BFD_ARELOC_BFIN_COMP:                  howto manager.      (line 1118)
+* BFD_ARELOC_BFIN_CONST:                 howto manager.      (line 1088)
+* BFD_ARELOC_BFIN_DIV:                   howto manager.      (line 1096)
+* BFD_ARELOC_BFIN_HWPAGE:                howto manager.      (line 1122)
+* BFD_ARELOC_BFIN_LAND:                  howto manager.      (line 1110)
+* BFD_ARELOC_BFIN_LEN:                   howto manager.      (line 1114)
+* BFD_ARELOC_BFIN_LOR:                   howto manager.      (line 1112)
+* BFD_ARELOC_BFIN_LSHIFT:                howto manager.      (line 1100)
+* BFD_ARELOC_BFIN_MOD:                   howto manager.      (line 1098)
+* BFD_ARELOC_BFIN_MULT:                  howto manager.      (line 1094)
+* BFD_ARELOC_BFIN_NEG:                   howto manager.      (line 1116)
+* BFD_ARELOC_BFIN_OR:                    howto manager.      (line 1106)
+* BFD_ARELOC_BFIN_PAGE:                  howto manager.      (line 1120)
+* BFD_ARELOC_BFIN_PUSH:                  howto manager.      (line 1086)
+* BFD_ARELOC_BFIN_RSHIFT:                howto manager.      (line 1102)
+* BFD_ARELOC_BFIN_SUB:                   howto manager.      (line 1092)
+* BFD_ARELOC_BFIN_XOR:                   howto manager.      (line 1108)
+* bfd_cache_close:                       File Caching.       (line   25)
+* bfd_cache_close_all:                   File Caching.       (line   38)
+* bfd_cache_init:                        File Caching.       (line   17)
 * bfd_calc_gnu_debuglink_crc32:          Opening and Closing.
-                                                             (line  275)
-* bfd_canonicalize_reloc:                Miscellaneous.      (line   19)
+                                                             (line  274)
+* bfd_canonicalize_reloc:                Miscellaneous.      (line   18)
 * bfd_canonicalize_symtab:               symbol handling functions.
-                                                             (line   50)
-* bfd_check_compression_header:          Miscellaneous.      (line  379)
-* bfd_check_format:                      Formats.            (line   21)
-* bfd_check_format_matches:              Formats.            (line   52)
-* bfd_check_overflow:                    typedef arelent.    (line  348)
+                                                             (line   52)
+* bfd_check_compression_header:          Miscellaneous.      (line  358)
+* bfd_check_format:                      Formats.            (line   20)
+* bfd_check_format_matches:              Formats.            (line   51)
+* bfd_check_overflow:                    typedef arelent.    (line  353)
 * bfd_close:                             Opening and Closing.
-                                                             (line  161)
+                                                             (line  160)
 * bfd_close_all_done:                    Opening and Closing.
-                                                             (line  179)
-* bfd_coff_backend_data:                 coff.               (line  308)
-* bfd_copy_private_bfd_data:             Miscellaneous.      (line  160)
-* bfd_copy_private_header_data:          Miscellaneous.      (line  142)
-* bfd_copy_private_section_data:         section prototypes. (line  278)
+                                                             (line  178)
+* bfd_coff_backend_data:                 coff.               (line  307)
+* bfd_convert_section_contents:          Miscellaneous.      (line  394)
+* bfd_convert_section_size:              Miscellaneous.      (line  384)
+* bfd_copy_private_bfd_data:             Miscellaneous.      (line  157)
+* bfd_copy_private_header_data:          Miscellaneous.      (line  140)
+* bfd_copy_private_section_data:         section prototypes. (line  287)
 * bfd_copy_private_symbol_data:          symbol handling functions.
-                                                             (line  140)
-* bfd_core_file_failing_command:         Core Files.         (line   12)
-* bfd_core_file_failing_signal:          Core Files.         (line   21)
-* bfd_core_file_pid:                     Core Files.         (line   30)
+                                                             (line  145)
+* bfd_core_file_failing_command:         Core Files.         (line   11)
+* bfd_core_file_failing_signal:          Core Files.         (line   20)
+* bfd_core_file_pid:                     Core Files.         (line   29)
 * bfd_create:                            Opening and Closing.
-                                                             (line  198)
+                                                             (line  197)
 * bfd_create_gnu_debuglink_section:      Opening and Closing.
-                                                             (line  387)
+                                                             (line  391)
 * bfd_decode_symclass:                   symbol handling functions.
-                                                             (line  111)
-* bfd_default_arch_struct:               Architectures.      (line  556)
-* bfd_default_compatible:                Architectures.      (line  618)
-* bfd_default_reloc_type_lookup:         howto manager.      (line 3568)
-* bfd_default_scan:                      Architectures.      (line  627)
-* bfd_default_set_arch_mach:             Architectures.      (line  574)
-* bfd_demangle:                          Miscellaneous.      (line  358)
-* bfd_emul_get_commonpagesize:           Miscellaneous.      (line  338)
-* bfd_emul_get_maxpagesize:              Miscellaneous.      (line  318)
-* bfd_emul_set_commonpagesize:           Miscellaneous.      (line  349)
-* bfd_emul_set_maxpagesize:              Miscellaneous.      (line  329)
+                                                             (line  116)
+* bfd_default_arch_struct:               Architectures.      (line  579)
+* bfd_default_compatible:                Architectures.      (line  641)
+* bfd_default_reloc_type_lookup:         howto manager.      (line 3254)
+* bfd_default_scan:                      Architectures.      (line  650)
+* bfd_default_set_arch_mach:             Architectures.      (line  597)
+* bfd_demangle:                          Miscellaneous.      (line  337)
+* bfd_emul_get_commonpagesize:           Miscellaneous.      (line  317)
+* bfd_emul_get_maxpagesize:              Miscellaneous.      (line  297)
+* bfd_emul_set_commonpagesize:           Miscellaneous.      (line  328)
+* bfd_emul_set_maxpagesize:              Miscellaneous.      (line  308)
 * bfd_errmsg:                            Error reporting.    (line   67)
 * bfd_fdopenr:                           Opening and Closing.
-                                                             (line   57)
+                                                             (line   56)
 * bfd_fill_in_gnu_debuglink_section:     Opening and Closing.
-                                                             (line  401)
-* bfd_find_target:                       bfd_target.         (line  470)
+                                                             (line  405)
+* bfd_find_target:                       bfd_target.         (line  478)
 * bfd_find_version_for_sym:              Writing the symbol table.
-                                                             (line   81)
+                                                             (line   83)
+* bfd_flavour_name:                      bfd_target.         (line  541)
+* bfd_follow_build_id_debuglink:         Opening and Closing.
+                                                             (line  463)
 * bfd_follow_gnu_debugaltlink:           Opening and Closing.
-                                                             (line  367)
+                                                             (line  371)
 * bfd_follow_gnu_debuglink:              Opening and Closing.
-                                                             (line  346)
+                                                             (line  350)
 * bfd_fopen:                             Opening and Closing.
-                                                             (line   12)
-* bfd_format_string:                     Formats.            (line   79)
+                                                             (line   11)
+* bfd_format_string:                     Formats.            (line   78)
 * bfd_generic_define_common_symbol:      Writing the symbol table.
-                                                             (line   68)
-* bfd_generic_discard_group:             section prototypes. (line  304)
-* bfd_generic_gc_sections:               howto manager.      (line 3599)
-* bfd_generic_get_relocated_section_contents: howto manager. (line 3629)
-* bfd_generic_is_group_section:          section prototypes. (line  296)
-* bfd_generic_lookup_section_flags:      howto manager.      (line 3609)
-* bfd_generic_merge_sections:            howto manager.      (line 3619)
-* bfd_generic_relax_section:             howto manager.      (line 3586)
+                                                             (line   69)
+* bfd_generic_discard_group:             section prototypes. (line  312)
+* bfd_generic_gc_sections:               howto manager.      (line 3285)
+* bfd_generic_get_relocated_section_contents: howto manager. (line 3315)
+* bfd_generic_is_group_section:          section prototypes. (line  304)
+* bfd_generic_lookup_section_flags:      howto manager.      (line 3295)
+* bfd_generic_merge_sections:            howto manager.      (line 3305)
+* bfd_generic_relax_section:             howto manager.      (line 3272)
 * bfd_get_alt_debug_link_info:           Opening and Closing.
-                                                             (line  300)
-* bfd_get_arch:                          Architectures.      (line  585)
-* bfd_get_arch_info:                     Architectures.      (line  637)
-* bfd_get_arch_size:                     Miscellaneous.      (line   63)
-* bfd_get_assert_handler:                Error reporting.    (line  150)
-* bfd_get_compression_header_size:       Miscellaneous.      (line  394)
+                                                             (line  299)
+* bfd_get_arch:                          Architectures.      (line  608)
+* bfd_get_arch_info:                     Architectures.      (line  660)
+* bfd_get_arch_size:                     Miscellaneous.      (line   61)
+* bfd_get_compression_header_size:       Miscellaneous.      (line  373)
 * bfd_get_debug_link_info:               Opening and Closing.
-                                                             (line  289)
+                                                             (line  288)
 * bfd_get_error:                         Error reporting.    (line   48)
-* bfd_get_error_handler:                 Error reporting.    (line  118)
-* bfd_get_gp_size:                       Miscellaneous.      (line  106)
-* bfd_get_linker_section:                section prototypes. (line   36)
-* bfd_get_mach:                          Architectures.      (line  593)
-* bfd_get_mtime:                         Miscellaneous.      (line  445)
-* bfd_get_next_mapent:                   Archives.           (line   58)
-* bfd_get_next_section_by_name:          section prototypes. (line   26)
-* bfd_get_reloc_code_name:               howto manager.      (line 3577)
-* bfd_get_reloc_size:                    typedef arelent.    (line  327)
-* bfd_get_reloc_upper_bound:             Miscellaneous.      (line    9)
-* bfd_get_section_by_name:               section prototypes. (line   17)
-* bfd_get_section_by_name_if:            section prototypes. (line   45)
-* bfd_get_section_contents:              section prototypes. (line  251)
-* bfd_get_sign_extend_vma:               Miscellaneous.      (line   78)
-* bfd_get_size <1>:                      Internal.           (line   25)
-* bfd_get_size:                          Miscellaneous.      (line  454)
+* bfd_get_gp_size:                       Miscellaneous.      (line  104)
+* bfd_get_linker_section:                section prototypes. (line   37)
+* bfd_get_mach:                          Architectures.      (line  616)
+* bfd_get_mtime:                         Miscellaneous.      (line  446)
+* bfd_get_next_mapent:                   Archives.           (line   57)
+* bfd_get_next_section_by_name:          section prototypes. (line   25)
+* bfd_get_next_section_id:               section prototypes. (line  154)
+* bfd_get_reloc_code_name:               howto manager.      (line 3263)
+* bfd_get_reloc_size:                    typedef arelent.    (line  331)
+* bfd_get_reloc_upper_bound:             Miscellaneous.      (line    8)
+* bfd_get_section_by_name:               section prototypes. (line   16)
+* bfd_get_section_by_name_if:            section prototypes. (line   46)
+* bfd_get_section_contents:              section prototypes. (line  260)
+* bfd_get_sign_extend_vma:               Miscellaneous.      (line   76)
+* bfd_get_size:                          Miscellaneous.      (line  455)
+* bfd_get_size <1>:                      Internal.           (line   24)
 * bfd_get_symtab_upper_bound:            symbol handling functions.
-                                                             (line    6)
-* bfd_get_target_info:                   bfd_target.         (line  486)
-* bfd_get_unique_section_name:           section prototypes. (line   64)
-* bfd_h_put_size:                        Internal.           (line   97)
+                                                             (line    5)
+* bfd_get_target_info:                   bfd_target.         (line  494)
+* bfd_get_unique_section_name:           section prototypes. (line   65)
 * bfd_hash_allocate:                     Creating and Freeing a Hash Table.
                                                              (line   17)
 * bfd_hash_lookup:                       Looking Up or Entering a String.
@@ -11643,2251 +11513,2432 @@ BFD Index
 * bfd_hash_traverse:                     Traversing a Hash Table.
                                                              (line    6)
 * bfd_hide_sym_by_version:               Writing the symbol table.
-                                                             (line   93)
-* bfd_init:                              Initialization.     (line   11)
-* bfd_install_relocation:                typedef arelent.    (line  389)
+                                                             (line   95)
+* bfd_h_put_size:                        Internal.           (line   97)
+* bfd_init:                              Initialization.     (line   10)
+* bfd_install_relocation:                typedef arelent.    (line  394)
 * bfd_is_local_label:                    symbol handling functions.
                                                              (line   17)
 * bfd_is_local_label_name:               symbol handling functions.
                                                              (line   26)
 * bfd_is_target_special_symbol:          symbol handling functions.
-                                                             (line   38)
+                                                             (line   39)
 * bfd_is_undefined_symclass:             symbol handling functions.
-                                                             (line  120)
+                                                             (line  125)
+* bfd_iterate_over_targets:              bfd_target.         (line  529)
+* bfd_link_check_relocs:                 Writing the symbol table.
+                                                             (line  105)
 * bfd_link_split_section:                Writing the symbol table.
-                                                             (line   44)
-* bfd_log2:                              Internal.           (line  164)
-* bfd_lookup_arch:                       Architectures.      (line  645)
+                                                             (line   43)
+* bfd_log2:                              Internal.           (line  166)
+* bfd_lookup_arch:                       Architectures.      (line  668)
 * bfd_make_debug_symbol:                 symbol handling functions.
-                                                             (line  102)
+                                                             (line  106)
 * bfd_make_empty_symbol:                 symbol handling functions.
-                                                             (line   78)
+                                                             (line   81)
 * bfd_make_readable:                     Opening and Closing.
-                                                             (line  225)
+                                                             (line  224)
 * bfd_make_section:                      section prototypes. (line  143)
-* bfd_make_section_anyway:               section prototypes. (line  114)
-* bfd_make_section_anyway_with_flags:    section prototypes. (line   96)
-* bfd_make_section_old_way:              section prototypes. (line   76)
-* bfd_make_section_with_flags:           section prototypes. (line  130)
+* bfd_make_section_anyway:               section prototypes. (line  115)
+* bfd_make_section_anyway_with_flags:    section prototypes. (line   97)
+* bfd_make_section_old_way:              section prototypes. (line   77)
+* bfd_make_section_with_flags:           section prototypes. (line  131)
 * bfd_make_writable:                     Opening and Closing.
-                                                             (line  211)
-* bfd_malloc_and_get_section:            section prototypes. (line  268)
-* bfd_map_over_sections:                 section prototypes. (line  178)
-* bfd_merge_private_bfd_data:            Miscellaneous.      (line  176)
+                                                             (line  210)
+* bfd_malloc_and_get_section:            section prototypes. (line  277)
+* bfd_map_over_sections:                 section prototypes. (line  186)
+* bfd_merge_private_bfd_data:            Writing the symbol table.
+                                                             (line  127)
 * bfd_mmap:                              Miscellaneous.      (line  483)
-* bfd_octets_per_byte:                   Architectures.      (line  668)
-* bfd_open_file:                         File Caching.       (line   52)
+* bfd_octets_per_byte:                   Architectures.      (line  691)
 * bfd_openr:                             Opening and Closing.
-                                                             (line   38)
+                                                             (line   37)
 * bfd_openr_iovec:                       Opening and Closing.
-                                                             (line   95)
-* bfd_openr_next_archived_file:          Archives.           (line   84)
+                                                             (line   94)
+* bfd_openr_next_archived_file:          Archives.           (line   83)
 * bfd_openstreamr:                       Opening and Closing.
-                                                             (line   83)
+                                                             (line   82)
 * bfd_openw:                             Opening and Closing.
-                                                             (line  146)
-* bfd_perform_relocation:                typedef arelent.    (line  364)
+                                                             (line  145)
+* bfd_open_file:                         File Caching.       (line   51)
+* bfd_perform_relocation:                typedef arelent.    (line  369)
 * bfd_perror:                            Error reporting.    (line   76)
+* bfd_printable_arch_mach:               Architectures.      (line  679)
+* bfd_printable_name:                    Architectures.      (line  539)
 * bfd_print_symbol_vandf:                symbol handling functions.
-                                                             (line   70)
-* bfd_printable_arch_mach:               Architectures.      (line  656)
-* bfd_printable_name:                    Architectures.      (line  516)
-* bfd_put_size:                          Internal.           (line   22)
-* BFD_RELOC_12_PCREL:                    howto manager.      (line   39)
-* BFD_RELOC_14:                          howto manager.      (line   31)
-* BFD_RELOC_16:                          howto manager.      (line   30)
-* BFD_RELOC_16_BASEREL:                  howto manager.      (line   99)
-* BFD_RELOC_16_GOT_PCREL:                howto manager.      (line   52)
-* BFD_RELOC_16_GOTOFF:                   howto manager.      (line   55)
-* BFD_RELOC_16_PCREL:                    howto manager.      (line   38)
-* BFD_RELOC_16_PCREL_S2:                 howto manager.      (line  111)
-* BFD_RELOC_16_PLT_PCREL:                howto manager.      (line   63)
-* BFD_RELOC_16_PLTOFF:                   howto manager.      (line   67)
-* BFD_RELOC_16C_ABS20:                   howto manager.      (line 2472)
-* BFD_RELOC_16C_ABS20_C:                 howto manager.      (line 2473)
-* BFD_RELOC_16C_ABS24:                   howto manager.      (line 2474)
-* BFD_RELOC_16C_ABS24_C:                 howto manager.      (line 2475)
-* BFD_RELOC_16C_DISP04:                  howto manager.      (line 2452)
-* BFD_RELOC_16C_DISP04_C:                howto manager.      (line 2453)
-* BFD_RELOC_16C_DISP08:                  howto manager.      (line 2454)
-* BFD_RELOC_16C_DISP08_C:                howto manager.      (line 2455)
-* BFD_RELOC_16C_DISP16:                  howto manager.      (line 2456)
-* BFD_RELOC_16C_DISP16_C:                howto manager.      (line 2457)
-* BFD_RELOC_16C_DISP24:                  howto manager.      (line 2458)
-* BFD_RELOC_16C_DISP24_C:                howto manager.      (line 2459)
-* BFD_RELOC_16C_DISP24a:                 howto manager.      (line 2460)
-* BFD_RELOC_16C_DISP24a_C:               howto manager.      (line 2461)
-* BFD_RELOC_16C_IMM04:                   howto manager.      (line 2476)
-* BFD_RELOC_16C_IMM04_C:                 howto manager.      (line 2477)
-* BFD_RELOC_16C_IMM16:                   howto manager.      (line 2478)
-* BFD_RELOC_16C_IMM16_C:                 howto manager.      (line 2479)
-* BFD_RELOC_16C_IMM20:                   howto manager.      (line 2480)
-* BFD_RELOC_16C_IMM20_C:                 howto manager.      (line 2481)
-* BFD_RELOC_16C_IMM24:                   howto manager.      (line 2482)
-* BFD_RELOC_16C_IMM24_C:                 howto manager.      (line 2483)
-* BFD_RELOC_16C_IMM32:                   howto manager.      (line 2484)
-* BFD_RELOC_16C_IMM32_C:                 howto manager.      (line 2485)
-* BFD_RELOC_16C_NUM08:                   howto manager.      (line 2446)
-* BFD_RELOC_16C_NUM08_C:                 howto manager.      (line 2447)
-* BFD_RELOC_16C_NUM16:                   howto manager.      (line 2448)
-* BFD_RELOC_16C_NUM16_C:                 howto manager.      (line 2449)
-* BFD_RELOC_16C_NUM32:                   howto manager.      (line 2450)
-* BFD_RELOC_16C_NUM32_C:                 howto manager.      (line 2451)
-* BFD_RELOC_16C_REG04:                   howto manager.      (line 2462)
-* BFD_RELOC_16C_REG04_C:                 howto manager.      (line 2463)
-* BFD_RELOC_16C_REG04a:                  howto manager.      (line 2464)
-* BFD_RELOC_16C_REG04a_C:                howto manager.      (line 2465)
-* BFD_RELOC_16C_REG14:                   howto manager.      (line 2466)
-* BFD_RELOC_16C_REG14_C:                 howto manager.      (line 2467)
-* BFD_RELOC_16C_REG16:                   howto manager.      (line 2468)
-* BFD_RELOC_16C_REG16_C:                 howto manager.      (line 2469)
-* BFD_RELOC_16C_REG20:                   howto manager.      (line 2470)
-* BFD_RELOC_16C_REG20_C:                 howto manager.      (line 2471)
-* BFD_RELOC_23_PCREL_S2:                 howto manager.      (line  112)
-* BFD_RELOC_24:                          howto manager.      (line   29)
-* BFD_RELOC_24_PCREL:                    howto manager.      (line   37)
-* BFD_RELOC_24_PLT_PCREL:                howto manager.      (line   62)
-* BFD_RELOC_26:                          howto manager.      (line   28)
-* BFD_RELOC_32:                          howto manager.      (line   27)
-* BFD_RELOC_32_BASEREL:                  howto manager.      (line   98)
-* BFD_RELOC_32_GOT_PCREL:                howto manager.      (line   51)
-* BFD_RELOC_32_GOTOFF:                   howto manager.      (line   54)
-* BFD_RELOC_32_PCREL:                    howto manager.      (line   36)
-* BFD_RELOC_32_PCREL_S2:                 howto manager.      (line  110)
-* BFD_RELOC_32_PLT_PCREL:                howto manager.      (line   61)
-* BFD_RELOC_32_PLTOFF:                   howto manager.      (line   66)
-* BFD_RELOC_32_SECREL:                   howto manager.      (line   48)
-* BFD_RELOC_386_COPY:                    howto manager.      (line  589)
-* BFD_RELOC_386_GLOB_DAT:                howto manager.      (line  590)
-* BFD_RELOC_386_GOT32:                   howto manager.      (line  587)
-* BFD_RELOC_386_GOTOFF:                  howto manager.      (line  593)
-* BFD_RELOC_386_GOTPC:                   howto manager.      (line  594)
-* BFD_RELOC_386_IRELATIVE:               howto manager.      (line  610)
-* BFD_RELOC_386_JUMP_SLOT:               howto manager.      (line  591)
-* BFD_RELOC_386_PLT32:                   howto manager.      (line  588)
-* BFD_RELOC_386_RELATIVE:                howto manager.      (line  592)
-* BFD_RELOC_386_TLS_DESC:                howto manager.      (line  609)
-* BFD_RELOC_386_TLS_DESC_CALL:           howto manager.      (line  608)
-* BFD_RELOC_386_TLS_DTPMOD32:            howto manager.      (line  604)
-* BFD_RELOC_386_TLS_DTPOFF32:            howto manager.      (line  605)
-* BFD_RELOC_386_TLS_GD:                  howto manager.      (line  599)
-* BFD_RELOC_386_TLS_GOTDESC:             howto manager.      (line  607)
-* BFD_RELOC_386_TLS_GOTIE:               howto manager.      (line  597)
-* BFD_RELOC_386_TLS_IE:                  howto manager.      (line  596)
-* BFD_RELOC_386_TLS_IE_32:               howto manager.      (line  602)
-* BFD_RELOC_386_TLS_LDM:                 howto manager.      (line  600)
-* BFD_RELOC_386_TLS_LDO_32:              howto manager.      (line  601)
-* BFD_RELOC_386_TLS_LE:                  howto manager.      (line  598)
-* BFD_RELOC_386_TLS_LE_32:               howto manager.      (line  603)
-* BFD_RELOC_386_TLS_TPOFF:               howto manager.      (line  595)
-* BFD_RELOC_386_TLS_TPOFF32:             howto manager.      (line  606)
-* BFD_RELOC_390_12:                      howto manager.      (line 2055)
-* BFD_RELOC_390_20:                      howto manager.      (line 2167)
-* BFD_RELOC_390_COPY:                    howto manager.      (line 2064)
-* BFD_RELOC_390_GLOB_DAT:                howto manager.      (line 2067)
-* BFD_RELOC_390_GOT12:                   howto manager.      (line 2058)
-* BFD_RELOC_390_GOT16:                   howto manager.      (line 2079)
-* BFD_RELOC_390_GOT20:                   howto manager.      (line 2168)
-* BFD_RELOC_390_GOT64:                   howto manager.      (line 2109)
-* BFD_RELOC_390_GOTENT:                  howto manager.      (line 2115)
-* BFD_RELOC_390_GOTOFF64:                howto manager.      (line 2118)
-* BFD_RELOC_390_GOTPC:                   howto manager.      (line 2076)
-* BFD_RELOC_390_GOTPCDBL:                howto manager.      (line 2106)
-* BFD_RELOC_390_GOTPLT12:                howto manager.      (line 2121)
-* BFD_RELOC_390_GOTPLT16:                howto manager.      (line 2124)
-* BFD_RELOC_390_GOTPLT20:                howto manager.      (line 2169)
-* BFD_RELOC_390_GOTPLT32:                howto manager.      (line 2127)
-* BFD_RELOC_390_GOTPLT64:                howto manager.      (line 2130)
-* BFD_RELOC_390_GOTPLTENT:               howto manager.      (line 2133)
-* BFD_RELOC_390_IRELATIVE:               howto manager.      (line 2173)
-* BFD_RELOC_390_JMP_SLOT:                howto manager.      (line 2070)
-* BFD_RELOC_390_PC12DBL:                 howto manager.      (line 2082)
-* BFD_RELOC_390_PC16DBL:                 howto manager.      (line 2088)
-* BFD_RELOC_390_PC24DBL:                 howto manager.      (line 2094)
-* BFD_RELOC_390_PC32DBL:                 howto manager.      (line 2100)
-* BFD_RELOC_390_PLT12DBL:                howto manager.      (line 2085)
-* BFD_RELOC_390_PLT16DBL:                howto manager.      (line 2091)
-* BFD_RELOC_390_PLT24DBL:                howto manager.      (line 2097)
-* BFD_RELOC_390_PLT32:                   howto manager.      (line 2061)
-* BFD_RELOC_390_PLT32DBL:                howto manager.      (line 2103)
-* BFD_RELOC_390_PLT64:                   howto manager.      (line 2112)
-* BFD_RELOC_390_PLTOFF16:                howto manager.      (line 2136)
-* BFD_RELOC_390_PLTOFF32:                howto manager.      (line 2139)
-* BFD_RELOC_390_PLTOFF64:                howto manager.      (line 2142)
-* BFD_RELOC_390_RELATIVE:                howto manager.      (line 2073)
-* BFD_RELOC_390_TLS_DTPMOD:              howto manager.      (line 2162)
-* BFD_RELOC_390_TLS_DTPOFF:              howto manager.      (line 2163)
-* BFD_RELOC_390_TLS_GD32:                howto manager.      (line 2148)
-* BFD_RELOC_390_TLS_GD64:                howto manager.      (line 2149)
-* BFD_RELOC_390_TLS_GDCALL:              howto manager.      (line 2146)
-* BFD_RELOC_390_TLS_GOTIE12:             howto manager.      (line 2150)
-* BFD_RELOC_390_TLS_GOTIE20:             howto manager.      (line 2170)
-* BFD_RELOC_390_TLS_GOTIE32:             howto manager.      (line 2151)
-* BFD_RELOC_390_TLS_GOTIE64:             howto manager.      (line 2152)
-* BFD_RELOC_390_TLS_IE32:                howto manager.      (line 2155)
-* BFD_RELOC_390_TLS_IE64:                howto manager.      (line 2156)
-* BFD_RELOC_390_TLS_IEENT:               howto manager.      (line 2157)
-* BFD_RELOC_390_TLS_LDCALL:              howto manager.      (line 2147)
-* BFD_RELOC_390_TLS_LDM32:               howto manager.      (line 2153)
-* BFD_RELOC_390_TLS_LDM64:               howto manager.      (line 2154)
-* BFD_RELOC_390_TLS_LDO32:               howto manager.      (line 2160)
-* BFD_RELOC_390_TLS_LDO64:               howto manager.      (line 2161)
-* BFD_RELOC_390_TLS_LE32:                howto manager.      (line 2158)
-* BFD_RELOC_390_TLS_LE64:                howto manager.      (line 2159)
-* BFD_RELOC_390_TLS_LOAD:                howto manager.      (line 2145)
-* BFD_RELOC_390_TLS_TPOFF:               howto manager.      (line 2164)
-* BFD_RELOC_64:                          howto manager.      (line   26)
-* BFD_RELOC_64_PCREL:                    howto manager.      (line   35)
-* BFD_RELOC_64_PLT_PCREL:                howto manager.      (line   60)
-* BFD_RELOC_64_PLTOFF:                   howto manager.      (line   65)
-* BFD_RELOC_68K_GLOB_DAT:                howto manager.      (line   78)
-* BFD_RELOC_68K_JMP_SLOT:                howto manager.      (line   79)
-* BFD_RELOC_68K_RELATIVE:                howto manager.      (line   80)
-* BFD_RELOC_68K_TLS_GD16:                howto manager.      (line   82)
-* BFD_RELOC_68K_TLS_GD32:                howto manager.      (line   81)
-* BFD_RELOC_68K_TLS_GD8:                 howto manager.      (line   83)
-* BFD_RELOC_68K_TLS_IE16:                howto manager.      (line   91)
-* BFD_RELOC_68K_TLS_IE32:                howto manager.      (line   90)
-* BFD_RELOC_68K_TLS_IE8:                 howto manager.      (line   92)
-* BFD_RELOC_68K_TLS_LDM16:               howto manager.      (line   85)
-* BFD_RELOC_68K_TLS_LDM32:               howto manager.      (line   84)
-* BFD_RELOC_68K_TLS_LDM8:                howto manager.      (line   86)
-* BFD_RELOC_68K_TLS_LDO16:               howto manager.      (line   88)
-* BFD_RELOC_68K_TLS_LDO32:               howto manager.      (line   87)
-* BFD_RELOC_68K_TLS_LDO8:                howto manager.      (line   89)
-* BFD_RELOC_68K_TLS_LE16:                howto manager.      (line   94)
-* BFD_RELOC_68K_TLS_LE32:                howto manager.      (line   93)
-* BFD_RELOC_68K_TLS_LE8:                 howto manager.      (line   95)
-* BFD_RELOC_8:                           howto manager.      (line   32)
-* BFD_RELOC_860_COPY:                    howto manager.      (line 2600)
-* BFD_RELOC_860_GLOB_DAT:                howto manager.      (line 2601)
-* BFD_RELOC_860_HAGOT:                   howto manager.      (line 2626)
-* BFD_RELOC_860_HAGOTOFF:                howto manager.      (line 2627)
-* BFD_RELOC_860_HAPC:                    howto manager.      (line 2628)
-* BFD_RELOC_860_HIGH:                    howto manager.      (line 2629)
-* BFD_RELOC_860_HIGHADJ:                 howto manager.      (line 2625)
-* BFD_RELOC_860_HIGOT:                   howto manager.      (line 2630)
-* BFD_RELOC_860_HIGOTOFF:                howto manager.      (line 2631)
-* BFD_RELOC_860_JUMP_SLOT:               howto manager.      (line 2602)
-* BFD_RELOC_860_LOGOT0:                  howto manager.      (line 2614)
-* BFD_RELOC_860_LOGOT1:                  howto manager.      (line 2616)
-* BFD_RELOC_860_LOGOTOFF0:               howto manager.      (line 2618)
-* BFD_RELOC_860_LOGOTOFF1:               howto manager.      (line 2620)
-* BFD_RELOC_860_LOGOTOFF2:               howto manager.      (line 2622)
-* BFD_RELOC_860_LOGOTOFF3:               howto manager.      (line 2623)
-* BFD_RELOC_860_LOPC:                    howto manager.      (line 2624)
-* BFD_RELOC_860_LOW0:                    howto manager.      (line 2607)
-* BFD_RELOC_860_LOW1:                    howto manager.      (line 2609)
-* BFD_RELOC_860_LOW2:                    howto manager.      (line 2611)
-* BFD_RELOC_860_LOW3:                    howto manager.      (line 2613)
-* BFD_RELOC_860_PC16:                    howto manager.      (line 2606)
-* BFD_RELOC_860_PC26:                    howto manager.      (line 2604)
-* BFD_RELOC_860_PLT26:                   howto manager.      (line 2605)
-* BFD_RELOC_860_RELATIVE:                howto manager.      (line 2603)
-* BFD_RELOC_860_SPGOT0:                  howto manager.      (line 2615)
-* BFD_RELOC_860_SPGOT1:                  howto manager.      (line 2617)
-* BFD_RELOC_860_SPGOTOFF0:               howto manager.      (line 2619)
-* BFD_RELOC_860_SPGOTOFF1:               howto manager.      (line 2621)
-* BFD_RELOC_860_SPLIT0:                  howto manager.      (line 2608)
-* BFD_RELOC_860_SPLIT1:                  howto manager.      (line 2610)
-* BFD_RELOC_860_SPLIT2:                  howto manager.      (line 2612)
-* BFD_RELOC_8_BASEREL:                   howto manager.      (line  103)
-* BFD_RELOC_8_FFnn:                      howto manager.      (line  107)
-* BFD_RELOC_8_GOT_PCREL:                 howto manager.      (line   53)
-* BFD_RELOC_8_GOTOFF:                    howto manager.      (line   59)
-* BFD_RELOC_8_PCREL:                     howto manager.      (line   40)
-* BFD_RELOC_8_PLT_PCREL:                 howto manager.      (line   64)
-* BFD_RELOC_8_PLTOFF:                    howto manager.      (line   71)
-* BFD_RELOC_AARCH64_16:                  howto manager.      (line 3031)
-* BFD_RELOC_AARCH64_16_PCREL:            howto manager.      (line 3038)
-* BFD_RELOC_AARCH64_32:                  howto manager.      (line 3030)
-* BFD_RELOC_AARCH64_32_PCREL:            howto manager.      (line 3037)
-* BFD_RELOC_AARCH64_64:                  howto manager.      (line 3029)
-* BFD_RELOC_AARCH64_64_PCREL:            howto manager.      (line 3036)
-* BFD_RELOC_AARCH64_ADD_LO12:            howto manager.      (line 3103)
-* BFD_RELOC_AARCH64_ADR_GOT_PAGE:        howto manager.      (line 3160)
-* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL:   howto manager.      (line 3098)
-* BFD_RELOC_AARCH64_ADR_HI21_PCREL:      howto manager.      (line 3094)
-* BFD_RELOC_AARCH64_ADR_LO21_PCREL:      howto manager.      (line 3090)
-* BFD_RELOC_AARCH64_BRANCH19:            howto manager.      (line 3118)
-* BFD_RELOC_AARCH64_CALL26:              howto manager.      (line 3128)
-* BFD_RELOC_AARCH64_COPY:                howto manager.      (line 3276)
-* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP:  howto manager.      (line 3310)
-* BFD_RELOC_AARCH64_GLOB_DAT:            howto manager.      (line 3279)
-* BFD_RELOC_AARCH64_GOT_LD_PREL19:       howto manager.      (line 3153)
-* BFD_RELOC_AARCH64_IRELATIVE:           howto manager.      (line 3300)
-* BFD_RELOC_AARCH64_JUMP26:              howto manager.      (line 3123)
-* BFD_RELOC_AARCH64_JUMP_SLOT:           howto manager.      (line 3282)
-* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:    howto manager.      (line 3170)
-* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:   howto manager.      (line 3179)
-* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:    howto manager.      (line 3165)
-* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:    howto manager.      (line 3175)
-* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:   howto manager.      (line 3183)
-* BFD_RELOC_AARCH64_LD_GOT_LO12_NC:      howto manager.      (line 3319)
-* BFD_RELOC_AARCH64_LD_LO19_PCREL:       howto manager.      (line 3085)
-* BFD_RELOC_AARCH64_LDST128_LO12:        howto manager.      (line 3148)
-* BFD_RELOC_AARCH64_LDST16_LO12:         howto manager.      (line 3133)
-* BFD_RELOC_AARCH64_LDST32_LO12:         howto manager.      (line 3138)
-* BFD_RELOC_AARCH64_LDST64_LO12:         howto manager.      (line 3143)
-* BFD_RELOC_AARCH64_LDST8_LO12:          howto manager.      (line 3108)
-* BFD_RELOC_AARCH64_LDST_LO12:           howto manager.      (line 3314)
-* BFD_RELOC_AARCH64_MOVW_G0:             howto manager.      (line 3042)
-* BFD_RELOC_AARCH64_MOVW_G0_NC:          howto manager.      (line 3046)
-* BFD_RELOC_AARCH64_MOVW_G0_S:           howto manager.      (line 3070)
-* BFD_RELOC_AARCH64_MOVW_G1:             howto manager.      (line 3050)
-* BFD_RELOC_AARCH64_MOVW_G1_NC:          howto manager.      (line 3054)
-* BFD_RELOC_AARCH64_MOVW_G1_S:           howto manager.      (line 3075)
-* BFD_RELOC_AARCH64_MOVW_G2:             howto manager.      (line 3058)
-* BFD_RELOC_AARCH64_MOVW_G2_NC:          howto manager.      (line 3062)
-* BFD_RELOC_AARCH64_MOVW_G2_S:           howto manager.      (line 3080)
-* BFD_RELOC_AARCH64_MOVW_G3:             howto manager.      (line 3066)
-* BFD_RELOC_AARCH64_NONE:                howto manager.      (line 3026)
-* BFD_RELOC_AARCH64_RELATIVE:            howto manager.      (line 3285)
-* BFD_RELOC_AARCH64_RELOC_END:           howto manager.      (line 3303)
-* BFD_RELOC_AARCH64_RELOC_START:         howto manager.      (line 3020)
-* BFD_RELOC_AARCH64_TLS_DTPMOD:          howto manager.      (line 3288)
-* BFD_RELOC_AARCH64_TLS_DTPREL:          howto manager.      (line 3291)
-* BFD_RELOC_AARCH64_TLS_TPREL:           howto manager.      (line 3294)
-* BFD_RELOC_AARCH64_TLSDESC:             howto manager.      (line 3297)
-* BFD_RELOC_AARCH64_TLSDESC_ADD:         howto manager.      (line 3270)
-* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: howto manager.      (line 3258)
-* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:  howto manager.      (line 3249)
-* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:  howto manager.      (line 3246)
-* BFD_RELOC_AARCH64_TLSDESC_CALL:        howto manager.      (line 3273)
-* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager.     (line 3255)
-* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: howto manager.     (line 3252)
-* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC:  howto manager.      (line 3327)
-* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:   howto manager.      (line 3243)
-* BFD_RELOC_AARCH64_TLSDESC_LDR:         howto manager.      (line 3267)
-* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:   howto manager.      (line 3264)
-* BFD_RELOC_AARCH64_TLSDESC_OFF_G1:      howto manager.      (line 3261)
-* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:   howto manager.      (line 3196)
-* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:    howto manager.      (line 3187)
-* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:    howto manager.      (line 3193)
+                                                             (line   73)
+* bfd_put_size:                          Internal.           (line   21)
+* BFD_RELOC_12_PCREL:                    howto manager.      (line   37)
+* BFD_RELOC_14:                          howto manager.      (line   30)
+* BFD_RELOC_16:                          howto manager.      (line   29)
+* BFD_RELOC_16C_ABS20:                   howto manager.      (line 2214)
+* BFD_RELOC_16C_ABS20_C:                 howto manager.      (line 2215)
+* BFD_RELOC_16C_ABS24:                   howto manager.      (line 2216)
+* BFD_RELOC_16C_ABS24_C:                 howto manager.      (line 2217)
+* BFD_RELOC_16C_DISP04:                  howto manager.      (line 2194)
+* BFD_RELOC_16C_DISP04_C:                howto manager.      (line 2195)
+* BFD_RELOC_16C_DISP08:                  howto manager.      (line 2196)
+* BFD_RELOC_16C_DISP08_C:                howto manager.      (line 2197)
+* BFD_RELOC_16C_DISP16:                  howto manager.      (line 2198)
+* BFD_RELOC_16C_DISP16_C:                howto manager.      (line 2199)
+* BFD_RELOC_16C_DISP24:                  howto manager.      (line 2200)
+* BFD_RELOC_16C_DISP24a:                 howto manager.      (line 2202)
+* BFD_RELOC_16C_DISP24a_C:               howto manager.      (line 2203)
+* BFD_RELOC_16C_DISP24_C:                howto manager.      (line 2201)
+* BFD_RELOC_16C_IMM04:                   howto manager.      (line 2218)
+* BFD_RELOC_16C_IMM04_C:                 howto manager.      (line 2219)
+* BFD_RELOC_16C_IMM16:                   howto manager.      (line 2220)
+* BFD_RELOC_16C_IMM16_C:                 howto manager.      (line 2221)
+* BFD_RELOC_16C_IMM20:                   howto manager.      (line 2222)
+* BFD_RELOC_16C_IMM20_C:                 howto manager.      (line 2223)
+* BFD_RELOC_16C_IMM24:                   howto manager.      (line 2224)
+* BFD_RELOC_16C_IMM24_C:                 howto manager.      (line 2225)
+* BFD_RELOC_16C_IMM32:                   howto manager.      (line 2226)
+* BFD_RELOC_16C_IMM32_C:                 howto manager.      (line 2227)
+* BFD_RELOC_16C_NUM08:                   howto manager.      (line 2188)
+* BFD_RELOC_16C_NUM08_C:                 howto manager.      (line 2189)
+* BFD_RELOC_16C_NUM16:                   howto manager.      (line 2190)
+* BFD_RELOC_16C_NUM16_C:                 howto manager.      (line 2191)
+* BFD_RELOC_16C_NUM32:                   howto manager.      (line 2192)
+* BFD_RELOC_16C_NUM32_C:                 howto manager.      (line 2193)
+* BFD_RELOC_16C_REG04:                   howto manager.      (line 2204)
+* BFD_RELOC_16C_REG04a:                  howto manager.      (line 2206)
+* BFD_RELOC_16C_REG04a_C:                howto manager.      (line 2207)
+* BFD_RELOC_16C_REG04_C:                 howto manager.      (line 2205)
+* BFD_RELOC_16C_REG14:                   howto manager.      (line 2208)
+* BFD_RELOC_16C_REG14_C:                 howto manager.      (line 2209)
+* BFD_RELOC_16C_REG16:                   howto manager.      (line 2210)
+* BFD_RELOC_16C_REG16_C:                 howto manager.      (line 2211)
+* BFD_RELOC_16C_REG20:                   howto manager.      (line 2212)
+* BFD_RELOC_16C_REG20_C:                 howto manager.      (line 2213)
+* BFD_RELOC_16_BASEREL:                  howto manager.      (line   92)
+* BFD_RELOC_16_GOTOFF:                   howto manager.      (line   51)
+* BFD_RELOC_16_GOT_PCREL:                howto manager.      (line   48)
+* BFD_RELOC_16_PCREL:                    howto manager.      (line   36)
+* BFD_RELOC_16_PCREL_S2:                 howto manager.      (line  102)
+* BFD_RELOC_16_PLTOFF:                   howto manager.      (line   63)
+* BFD_RELOC_16_PLT_PCREL:                howto manager.      (line   59)
+* BFD_RELOC_23_PCREL_S2:                 howto manager.      (line  103)
+* BFD_RELOC_24:                          howto manager.      (line   28)
+* BFD_RELOC_24_PCREL:                    howto manager.      (line   35)
+* BFD_RELOC_24_PLT_PCREL:                howto manager.      (line   58)
+* BFD_RELOC_26:                          howto manager.      (line   27)
+* BFD_RELOC_32:                          howto manager.      (line   26)
+* BFD_RELOC_32_BASEREL:                  howto manager.      (line   91)
+* BFD_RELOC_32_GOTOFF:                   howto manager.      (line   50)
+* BFD_RELOC_32_GOT_PCREL:                howto manager.      (line   47)
+* BFD_RELOC_32_PCREL:                    howto manager.      (line   34)
+* BFD_RELOC_32_PCREL_S2:                 howto manager.      (line  101)
+* BFD_RELOC_32_PLTOFF:                   howto manager.      (line   62)
+* BFD_RELOC_32_PLT_PCREL:                howto manager.      (line   57)
+* BFD_RELOC_32_SECREL:                   howto manager.      (line   45)
+* BFD_RELOC_386_COPY:                    howto manager.      (line  522)
+* BFD_RELOC_386_GLOB_DAT:                howto manager.      (line  523)
+* BFD_RELOC_386_GOT32:                   howto manager.      (line  520)
+* BFD_RELOC_386_GOT32X:                  howto manager.      (line  544)
+* BFD_RELOC_386_GOTOFF:                  howto manager.      (line  526)
+* BFD_RELOC_386_GOTPC:                   howto manager.      (line  527)
+* BFD_RELOC_386_IRELATIVE:               howto manager.      (line  543)
+* BFD_RELOC_386_JUMP_SLOT:               howto manager.      (line  524)
+* BFD_RELOC_386_PLT32:                   howto manager.      (line  521)
+* BFD_RELOC_386_RELATIVE:                howto manager.      (line  525)
+* BFD_RELOC_386_TLS_DESC:                howto manager.      (line  542)
+* BFD_RELOC_386_TLS_DESC_CALL:           howto manager.      (line  541)
+* BFD_RELOC_386_TLS_DTPMOD32:            howto manager.      (line  537)
+* BFD_RELOC_386_TLS_DTPOFF32:            howto manager.      (line  538)
+* BFD_RELOC_386_TLS_GD:                  howto manager.      (line  532)
+* BFD_RELOC_386_TLS_GOTDESC:             howto manager.      (line  540)
+* BFD_RELOC_386_TLS_GOTIE:               howto manager.      (line  530)
+* BFD_RELOC_386_TLS_IE:                  howto manager.      (line  529)
+* BFD_RELOC_386_TLS_IE_32:               howto manager.      (line  535)
+* BFD_RELOC_386_TLS_LDM:                 howto manager.      (line  533)
+* BFD_RELOC_386_TLS_LDO_32:              howto manager.      (line  534)
+* BFD_RELOC_386_TLS_LE:                  howto manager.      (line  531)
+* BFD_RELOC_386_TLS_LE_32:               howto manager.      (line  536)
+* BFD_RELOC_386_TLS_TPOFF:               howto manager.      (line  528)
+* BFD_RELOC_386_TLS_TPOFF32:             howto manager.      (line  539)
+* BFD_RELOC_390_12:                      howto manager.      (line 1878)
+* BFD_RELOC_390_20:                      howto manager.      (line 1959)
+* BFD_RELOC_390_COPY:                    howto manager.      (line 1884)
+* BFD_RELOC_390_GLOB_DAT:                howto manager.      (line 1886)
+* BFD_RELOC_390_GOT12:                   howto manager.      (line 1880)
+* BFD_RELOC_390_GOT16:                   howto manager.      (line 1894)
+* BFD_RELOC_390_GOT20:                   howto manager.      (line 1960)
+* BFD_RELOC_390_GOT64:                   howto manager.      (line 1914)
+* BFD_RELOC_390_GOTENT:                  howto manager.      (line 1918)
+* BFD_RELOC_390_GOTOFF64:                howto manager.      (line 1920)
+* BFD_RELOC_390_GOTPC:                   howto manager.      (line 1892)
+* BFD_RELOC_390_GOTPCDBL:                howto manager.      (line 1912)
+* BFD_RELOC_390_GOTPLT12:                howto manager.      (line 1922)
+* BFD_RELOC_390_GOTPLT16:                howto manager.      (line 1924)
+* BFD_RELOC_390_GOTPLT20:                howto manager.      (line 1961)
+* BFD_RELOC_390_GOTPLT32:                howto manager.      (line 1926)
+* BFD_RELOC_390_GOTPLT64:                howto manager.      (line 1928)
+* BFD_RELOC_390_GOTPLTENT:               howto manager.      (line 1930)
+* BFD_RELOC_390_IRELATIVE:               howto manager.      (line 1964)
+* BFD_RELOC_390_JMP_SLOT:                howto manager.      (line 1888)
+* BFD_RELOC_390_PC12DBL:                 howto manager.      (line 1896)
+* BFD_RELOC_390_PC16DBL:                 howto manager.      (line 1900)
+* BFD_RELOC_390_PC24DBL:                 howto manager.      (line 1904)
+* BFD_RELOC_390_PC32DBL:                 howto manager.      (line 1908)
+* BFD_RELOC_390_PLT12DBL:                howto manager.      (line 1898)
+* BFD_RELOC_390_PLT16DBL:                howto manager.      (line 1902)
+* BFD_RELOC_390_PLT24DBL:                howto manager.      (line 1906)
+* BFD_RELOC_390_PLT32:                   howto manager.      (line 1882)
+* BFD_RELOC_390_PLT32DBL:                howto manager.      (line 1910)
+* BFD_RELOC_390_PLT64:                   howto manager.      (line 1916)
+* BFD_RELOC_390_PLTOFF16:                howto manager.      (line 1932)
+* BFD_RELOC_390_PLTOFF32:                howto manager.      (line 1934)
+* BFD_RELOC_390_PLTOFF64:                howto manager.      (line 1936)
+* BFD_RELOC_390_RELATIVE:                howto manager.      (line 1890)
+* BFD_RELOC_390_TLS_DTPMOD:              howto manager.      (line 1955)
+* BFD_RELOC_390_TLS_DTPOFF:              howto manager.      (line 1956)
+* BFD_RELOC_390_TLS_GD32:                howto manager.      (line 1941)
+* BFD_RELOC_390_TLS_GD64:                howto manager.      (line 1942)
+* BFD_RELOC_390_TLS_GDCALL:              howto manager.      (line 1939)
+* BFD_RELOC_390_TLS_GOTIE12:             howto manager.      (line 1943)
+* BFD_RELOC_390_TLS_GOTIE20:             howto manager.      (line 1962)
+* BFD_RELOC_390_TLS_GOTIE32:             howto manager.      (line 1944)
+* BFD_RELOC_390_TLS_GOTIE64:             howto manager.      (line 1945)
+* BFD_RELOC_390_TLS_IE32:                howto manager.      (line 1948)
+* BFD_RELOC_390_TLS_IE64:                howto manager.      (line 1949)
+* BFD_RELOC_390_TLS_IEENT:               howto manager.      (line 1950)
+* BFD_RELOC_390_TLS_LDCALL:              howto manager.      (line 1940)
+* BFD_RELOC_390_TLS_LDM32:               howto manager.      (line 1946)
+* BFD_RELOC_390_TLS_LDM64:               howto manager.      (line 1947)
+* BFD_RELOC_390_TLS_LDO32:               howto manager.      (line 1953)
+* BFD_RELOC_390_TLS_LDO64:               howto manager.      (line 1954)
+* BFD_RELOC_390_TLS_LE32:                howto manager.      (line 1951)
+* BFD_RELOC_390_TLS_LE64:                howto manager.      (line 1952)
+* BFD_RELOC_390_TLS_LOAD:                howto manager.      (line 1938)
+* BFD_RELOC_390_TLS_TPOFF:               howto manager.      (line 1957)
+* BFD_RELOC_64:                          howto manager.      (line   25)
+* BFD_RELOC_64_PCREL:                    howto manager.      (line   33)
+* BFD_RELOC_64_PLTOFF:                   howto manager.      (line   61)
+* BFD_RELOC_64_PLT_PCREL:                howto manager.      (line   56)
+* BFD_RELOC_68K_GLOB_DAT:                howto manager.      (line   72)
+* BFD_RELOC_68K_JMP_SLOT:                howto manager.      (line   73)
+* BFD_RELOC_68K_RELATIVE:                howto manager.      (line   74)
+* BFD_RELOC_68K_TLS_GD16:                howto manager.      (line   76)
+* BFD_RELOC_68K_TLS_GD32:                howto manager.      (line   75)
+* BFD_RELOC_68K_TLS_GD8:                 howto manager.      (line   77)
+* BFD_RELOC_68K_TLS_IE16:                howto manager.      (line   85)
+* BFD_RELOC_68K_TLS_IE32:                howto manager.      (line   84)
+* BFD_RELOC_68K_TLS_IE8:                 howto manager.      (line   86)
+* BFD_RELOC_68K_TLS_LDM16:               howto manager.      (line   79)
+* BFD_RELOC_68K_TLS_LDM32:               howto manager.      (line   78)
+* BFD_RELOC_68K_TLS_LDM8:                howto manager.      (line   80)
+* BFD_RELOC_68K_TLS_LDO16:               howto manager.      (line   82)
+* BFD_RELOC_68K_TLS_LDO32:               howto manager.      (line   81)
+* BFD_RELOC_68K_TLS_LDO8:                howto manager.      (line   83)
+* BFD_RELOC_68K_TLS_LE16:                howto manager.      (line   88)
+* BFD_RELOC_68K_TLS_LE32:                howto manager.      (line   87)
+* BFD_RELOC_68K_TLS_LE8:                 howto manager.      (line   89)
+* BFD_RELOC_8:                           howto manager.      (line   31)
+* BFD_RELOC_860_COPY:                    howto manager.      (line 2329)
+* BFD_RELOC_860_GLOB_DAT:                howto manager.      (line 2330)
+* BFD_RELOC_860_HAGOT:                   howto manager.      (line 2355)
+* BFD_RELOC_860_HAGOTOFF:                howto manager.      (line 2356)
+* BFD_RELOC_860_HAPC:                    howto manager.      (line 2357)
+* BFD_RELOC_860_HIGH:                    howto manager.      (line 2358)
+* BFD_RELOC_860_HIGHADJ:                 howto manager.      (line 2354)
+* BFD_RELOC_860_HIGOT:                   howto manager.      (line 2359)
+* BFD_RELOC_860_HIGOTOFF:                howto manager.      (line 2360)
+* BFD_RELOC_860_JUMP_SLOT:               howto manager.      (line 2331)
+* BFD_RELOC_860_LOGOT0:                  howto manager.      (line 2343)
+* BFD_RELOC_860_LOGOT1:                  howto manager.      (line 2345)
+* BFD_RELOC_860_LOGOTOFF0:               howto manager.      (line 2347)
+* BFD_RELOC_860_LOGOTOFF1:               howto manager.      (line 2349)
+* BFD_RELOC_860_LOGOTOFF2:               howto manager.      (line 2351)
+* BFD_RELOC_860_LOGOTOFF3:               howto manager.      (line 2352)
+* BFD_RELOC_860_LOPC:                    howto manager.      (line 2353)
+* BFD_RELOC_860_LOW0:                    howto manager.      (line 2336)
+* BFD_RELOC_860_LOW1:                    howto manager.      (line 2338)
+* BFD_RELOC_860_LOW2:                    howto manager.      (line 2340)
+* BFD_RELOC_860_LOW3:                    howto manager.      (line 2342)
+* BFD_RELOC_860_PC16:                    howto manager.      (line 2335)
+* BFD_RELOC_860_PC26:                    howto manager.      (line 2333)
+* BFD_RELOC_860_PLT26:                   howto manager.      (line 2334)
+* BFD_RELOC_860_RELATIVE:                howto manager.      (line 2332)
+* BFD_RELOC_860_SPGOT0:                  howto manager.      (line 2344)
+* BFD_RELOC_860_SPGOT1:                  howto manager.      (line 2346)
+* BFD_RELOC_860_SPGOTOFF0:               howto manager.      (line 2348)
+* BFD_RELOC_860_SPGOTOFF1:               howto manager.      (line 2350)
+* BFD_RELOC_860_SPLIT0:                  howto manager.      (line 2337)
+* BFD_RELOC_860_SPLIT1:                  howto manager.      (line 2339)
+* BFD_RELOC_860_SPLIT2:                  howto manager.      (line 2341)
+* BFD_RELOC_8_BASEREL:                   howto manager.      (line   96)
+* BFD_RELOC_8_FFnn:                      howto manager.      (line   99)
+* BFD_RELOC_8_GOTOFF:                    howto manager.      (line   55)
+* BFD_RELOC_8_GOT_PCREL:                 howto manager.      (line   49)
+* BFD_RELOC_8_PCREL:                     howto manager.      (line   38)
+* BFD_RELOC_8_PLTOFF:                    howto manager.      (line   67)
+* BFD_RELOC_8_PLT_PCREL:                 howto manager.      (line   60)
+* BFD_RELOC_AARCH64_16:                  howto manager.      (line 2734)
+* BFD_RELOC_AARCH64_16_PCREL:            howto manager.      (line 2740)
+* BFD_RELOC_AARCH64_32:                  howto manager.      (line 2733)
+* BFD_RELOC_AARCH64_32_PCREL:            howto manager.      (line 2739)
+* BFD_RELOC_AARCH64_64:                  howto manager.      (line 2732)
+* BFD_RELOC_AARCH64_64_PCREL:            howto manager.      (line 2738)
+* BFD_RELOC_AARCH64_ADD_LO12:            howto manager.      (line 2790)
+* BFD_RELOC_AARCH64_ADR_GOT_PAGE:        howto manager.      (line 2836)
+* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL:   howto manager.      (line 2786)
+* BFD_RELOC_AARCH64_ADR_HI21_PCREL:      howto manager.      (line 2783)
+* BFD_RELOC_AARCH64_ADR_LO21_PCREL:      howto manager.      (line 2780)
+* BFD_RELOC_AARCH64_BRANCH19:            howto manager.      (line 2802)
+* BFD_RELOC_AARCH64_CALL26:              howto manager.      (line 2810)
+* BFD_RELOC_AARCH64_COPY:                howto manager.      (line 2979)
+* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP:  howto manager.      (line 3003)
+* BFD_RELOC_AARCH64_GLOB_DAT:            howto manager.      (line 2981)
+* BFD_RELOC_AARCH64_GOT_LD_PREL19:       howto manager.      (line 2830)
+* BFD_RELOC_AARCH64_IRELATIVE:           howto manager.      (line 2995)
+* BFD_RELOC_AARCH64_JUMP26:              howto manager.      (line 2806)
+* BFD_RELOC_AARCH64_JUMP_SLOT:           howto manager.      (line 2983)
+* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:   howto manager.      (line 2857)
+* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:    howto manager.      (line 2844)
+* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:    howto manager.      (line 2854)
+* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:   howto manager.      (line 2860)
+* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:    howto manager.      (line 2840)
+* BFD_RELOC_AARCH64_LDST128_LO12:        howto manager.      (line 2826)
+* BFD_RELOC_AARCH64_LDST16_LO12:         howto manager.      (line 2814)
+* BFD_RELOC_AARCH64_LDST32_LO12:         howto manager.      (line 2818)
+* BFD_RELOC_AARCH64_LDST64_LO12:         howto manager.      (line 2822)
+* BFD_RELOC_AARCH64_LDST8_LO12:          howto manager.      (line 2794)
+* BFD_RELOC_AARCH64_LDST_LO12:           howto manager.      (line 3006)
+* BFD_RELOC_AARCH64_LD_GOT_LO12_NC:      howto manager.      (line 3017)
+* BFD_RELOC_AARCH64_LD_LO19_PCREL:       howto manager.      (line 2776)
+* BFD_RELOC_AARCH64_MOVW_G0:             howto manager.      (line 2743)
+* BFD_RELOC_AARCH64_MOVW_G0_NC:          howto manager.      (line 2746)
+* BFD_RELOC_AARCH64_MOVW_G0_S:           howto manager.      (line 2764)
+* BFD_RELOC_AARCH64_MOVW_G1:             howto manager.      (line 2749)
+* BFD_RELOC_AARCH64_MOVW_G1_NC:          howto manager.      (line 2752)
+* BFD_RELOC_AARCH64_MOVW_G1_S:           howto manager.      (line 2768)
+* BFD_RELOC_AARCH64_MOVW_G2:             howto manager.      (line 2755)
+* BFD_RELOC_AARCH64_MOVW_G2_NC:          howto manager.      (line 2758)
+* BFD_RELOC_AARCH64_MOVW_G2_S:           howto manager.      (line 2772)
+* BFD_RELOC_AARCH64_MOVW_G3:             howto manager.      (line 2761)
+* BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:   howto manager.      (line 2848)
+* BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:      howto manager.      (line 2851)
+* BFD_RELOC_AARCH64_NONE:                howto manager.      (line 2730)
+* BFD_RELOC_AARCH64_NULL:                howto manager.      (line 2728)
+* BFD_RELOC_AARCH64_RELATIVE:            howto manager.      (line 2985)
+* BFD_RELOC_AARCH64_RELOC_END:           howto manager.      (line 2997)
+* BFD_RELOC_AARCH64_RELOC_START:         howto manager.      (line 2723)
+* BFD_RELOC_AARCH64_TLSDESC:             howto manager.      (line 2993)
+* BFD_RELOC_AARCH64_TLSDESC_ADD:         howto manager.      (line 2975)
+* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: howto manager.      (line 2967)
+* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:  howto manager.      (line 2961)
+* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:  howto manager.      (line 2959)
+* BFD_RELOC_AARCH64_TLSDESC_CALL:        howto manager.      (line 2977)
+* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager.     (line 2965)
+* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: howto manager.     (line 2963)
+* BFD_RELOC_AARCH64_TLSDESC_LDR:         howto manager.      (line 2973)
+* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC:  howto manager.      (line 3023)
+* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:   howto manager.      (line 2957)
+* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:   howto manager.      (line 2971)
+* BFD_RELOC_AARCH64_TLSDESC_OFF_G1:      howto manager.      (line 2969)
+* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:   howto manager.      (line 2870)
+* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:    howto manager.      (line 2863)
+* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:    howto manager.      (line 2868)
+* BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:    howto manager.      (line 2874)
+* BFD_RELOC_AARCH64_TLSGD_MOVW_G1:       howto manager.      (line 2876)
 * BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: howto manager.
-                                                             (line 3207)
+                                                             (line 2878)
 * BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3213)
+                                                             (line 2882)
 * BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3210)
+                                                             (line 2880)
 * BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3323)
-* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 3216)
+                                                             (line 3020)
+* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 2884)
 * BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC: howto manager.
-                                                             (line 3204)
-* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager.   (line 3201)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager.     (line 3234)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager.     (line 3237)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager.  (line 3240)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager.      (line 3228)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager.   (line 3231)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager.      (line 3222)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager.   (line 3225)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager.      (line 3219)
-* BFD_RELOC_AARCH64_TSTBR14:             howto manager.      (line 3113)
-* BFD_RELOC_ALPHA_BOH:                   howto manager.      (line  323)
-* BFD_RELOC_ALPHA_BRSGP:                 howto manager.      (line  306)
-* BFD_RELOC_ALPHA_BSR:                   howto manager.      (line  315)
-* BFD_RELOC_ALPHA_CODEADDR:              howto manager.      (line  297)
-* BFD_RELOC_ALPHA_DTPMOD64:              howto manager.      (line  329)
-* BFD_RELOC_ALPHA_DTPREL16:              howto manager.      (line  334)
-* BFD_RELOC_ALPHA_DTPREL64:              howto manager.      (line  331)
-* BFD_RELOC_ALPHA_DTPREL_HI16:           howto manager.      (line  332)
-* BFD_RELOC_ALPHA_DTPREL_LO16:           howto manager.      (line  333)
-* BFD_RELOC_ALPHA_ELF_LITERAL:           howto manager.      (line  262)
-* BFD_RELOC_ALPHA_GOTDTPREL16:           howto manager.      (line  330)
-* BFD_RELOC_ALPHA_GOTTPREL16:            howto manager.      (line  335)
-* BFD_RELOC_ALPHA_GPDISP:                howto manager.      (line  256)
-* BFD_RELOC_ALPHA_GPDISP_HI16:           howto manager.      (line  242)
-* BFD_RELOC_ALPHA_GPDISP_LO16:           howto manager.      (line  250)
-* BFD_RELOC_ALPHA_GPREL_HI16:            howto manager.      (line  301)
-* BFD_RELOC_ALPHA_GPREL_LO16:            howto manager.      (line  302)
-* BFD_RELOC_ALPHA_HINT:                  howto manager.      (line  288)
-* BFD_RELOC_ALPHA_LDA:                   howto manager.      (line  319)
-* BFD_RELOC_ALPHA_LINKAGE:               howto manager.      (line  293)
-* BFD_RELOC_ALPHA_LITERAL:               howto manager.      (line  261)
-* BFD_RELOC_ALPHA_LITUSE:                howto manager.      (line  263)
-* BFD_RELOC_ALPHA_NOP:                   howto manager.      (line  311)
-* BFD_RELOC_ALPHA_TLSGD:                 howto manager.      (line  327)
-* BFD_RELOC_ALPHA_TLSLDM:                howto manager.      (line  328)
-* BFD_RELOC_ALPHA_TPREL16:               howto manager.      (line  339)
-* BFD_RELOC_ALPHA_TPREL64:               howto manager.      (line  336)
-* BFD_RELOC_ALPHA_TPREL_HI16:            howto manager.      (line  337)
-* BFD_RELOC_ALPHA_TPREL_LO16:            howto manager.      (line  338)
-* BFD_RELOC_ARC_B22_PCREL:               howto manager.      (line 1062)
-* BFD_RELOC_ARC_B26:                     howto manager.      (line 1067)
-* BFD_RELOC_ARM_ADR_IMM:                 howto manager.      (line  948)
-* BFD_RELOC_ARM_ADRL_IMMEDIATE:          howto manager.      (line  934)
-* BFD_RELOC_ARM_ALU_PC_G0:               howto manager.      (line  898)
-* BFD_RELOC_ARM_ALU_PC_G0_NC:            howto manager.      (line  897)
-* BFD_RELOC_ARM_ALU_PC_G1:               howto manager.      (line  900)
-* BFD_RELOC_ARM_ALU_PC_G1_NC:            howto manager.      (line  899)
-* BFD_RELOC_ARM_ALU_PC_G2:               howto manager.      (line  901)
-* BFD_RELOC_ARM_ALU_SB_G0:               howto manager.      (line  912)
-* BFD_RELOC_ARM_ALU_SB_G0_NC:            howto manager.      (line  911)
-* BFD_RELOC_ARM_ALU_SB_G1:               howto manager.      (line  914)
-* BFD_RELOC_ARM_ALU_SB_G1_NC:            howto manager.      (line  913)
-* BFD_RELOC_ARM_ALU_SB_G2:               howto manager.      (line  915)
-* BFD_RELOC_ARM_CP_OFF_IMM:              howto manager.      (line  944)
-* BFD_RELOC_ARM_CP_OFF_IMM_S2:           howto manager.      (line  945)
-* BFD_RELOC_ARM_GLOB_DAT:                howto manager.      (line  872)
-* BFD_RELOC_ARM_GOT32:                   howto manager.      (line  873)
-* BFD_RELOC_ARM_GOT_PREL:                howto manager.      (line  878)
-* BFD_RELOC_ARM_GOTOFF:                  howto manager.      (line  876)
-* BFD_RELOC_ARM_GOTPC:                   howto manager.      (line  877)
-* BFD_RELOC_ARM_HVC:                     howto manager.      (line  941)
-* BFD_RELOC_ARM_HWLITERAL:               howto manager.      (line  955)
-* BFD_RELOC_ARM_IMMEDIATE:               howto manager.      (line  933)
-* BFD_RELOC_ARM_IN_POOL:                 howto manager.      (line  951)
-* BFD_RELOC_ARM_IRELATIVE:               howto manager.      (line  930)
-* BFD_RELOC_ARM_JUMP_SLOT:               howto manager.      (line  871)
-* BFD_RELOC_ARM_LDC_PC_G0:               howto manager.      (line  908)
-* BFD_RELOC_ARM_LDC_PC_G1:               howto manager.      (line  909)
-* BFD_RELOC_ARM_LDC_PC_G2:               howto manager.      (line  910)
-* BFD_RELOC_ARM_LDC_SB_G0:               howto manager.      (line  922)
-* BFD_RELOC_ARM_LDC_SB_G1:               howto manager.      (line  923)
-* BFD_RELOC_ARM_LDC_SB_G2:               howto manager.      (line  924)
-* BFD_RELOC_ARM_LDR_IMM:                 howto manager.      (line  949)
-* BFD_RELOC_ARM_LDR_PC_G0:               howto manager.      (line  902)
-* BFD_RELOC_ARM_LDR_PC_G1:               howto manager.      (line  903)
-* BFD_RELOC_ARM_LDR_PC_G2:               howto manager.      (line  904)
-* BFD_RELOC_ARM_LDR_SB_G0:               howto manager.      (line  916)
-* BFD_RELOC_ARM_LDR_SB_G1:               howto manager.      (line  917)
-* BFD_RELOC_ARM_LDR_SB_G2:               howto manager.      (line  918)
-* BFD_RELOC_ARM_LDRS_PC_G0:              howto manager.      (line  905)
-* BFD_RELOC_ARM_LDRS_PC_G1:              howto manager.      (line  906)
-* BFD_RELOC_ARM_LDRS_PC_G2:              howto manager.      (line  907)
-* BFD_RELOC_ARM_LDRS_SB_G0:              howto manager.      (line  919)
-* BFD_RELOC_ARM_LDRS_SB_G1:              howto manager.      (line  920)
-* BFD_RELOC_ARM_LDRS_SB_G2:              howto manager.      (line  921)
-* BFD_RELOC_ARM_LITERAL:                 howto manager.      (line  950)
-* BFD_RELOC_ARM_MOVT:                    howto manager.      (line  862)
-* BFD_RELOC_ARM_MOVT_PCREL:              howto manager.      (line  864)
-* BFD_RELOC_ARM_MOVW:                    howto manager.      (line  861)
-* BFD_RELOC_ARM_MOVW_PCREL:              howto manager.      (line  863)
-* BFD_RELOC_ARM_MULTI:                   howto manager.      (line  943)
-* BFD_RELOC_ARM_OFFSET_IMM:              howto manager.      (line  835)
-* BFD_RELOC_ARM_OFFSET_IMM8:             howto manager.      (line  952)
-* BFD_RELOC_ARM_PCREL_BLX:               howto manager.      (line  806)
-* BFD_RELOC_ARM_PCREL_BRANCH:            howto manager.      (line  802)
-* BFD_RELOC_ARM_PCREL_CALL:              howto manager.      (line  816)
-* BFD_RELOC_ARM_PCREL_JUMP:              howto manager.      (line  820)
-* BFD_RELOC_ARM_PLT32:                   howto manager.      (line  874)
-* BFD_RELOC_ARM_PREL31:                  howto manager.      (line  858)
-* BFD_RELOC_ARM_RELATIVE:                howto manager.      (line  875)
-* BFD_RELOC_ARM_ROSEGREL32:              howto manager.      (line  847)
-* BFD_RELOC_ARM_SBREL32:                 howto manager.      (line  850)
-* BFD_RELOC_ARM_SHIFT_IMM:               howto manager.      (line  939)
-* BFD_RELOC_ARM_SMC:                     howto manager.      (line  940)
-* BFD_RELOC_ARM_SWI:                     howto manager.      (line  942)
-* BFD_RELOC_ARM_T32_ADD_IMM:             howto manager.      (line  936)
-* BFD_RELOC_ARM_T32_ADD_PC12:            howto manager.      (line  938)
-* BFD_RELOC_ARM_T32_CP_OFF_IMM:          howto manager.      (line  946)
-* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2:       howto manager.      (line  947)
-* BFD_RELOC_ARM_T32_IMM12:               howto manager.      (line  937)
-* BFD_RELOC_ARM_T32_IMMEDIATE:           howto manager.      (line  935)
-* BFD_RELOC_ARM_T32_OFFSET_IMM:          howto manager.      (line  954)
-* BFD_RELOC_ARM_T32_OFFSET_U8:           howto manager.      (line  953)
-* BFD_RELOC_ARM_TARGET1:                 howto manager.      (line  843)
-* BFD_RELOC_ARM_TARGET2:                 howto manager.      (line  853)
-* BFD_RELOC_ARM_THM_TLS_CALL:            howto manager.      (line  891)
-* BFD_RELOC_ARM_THM_TLS_DESCSEQ:         howto manager.      (line  893)
-* BFD_RELOC_ARM_THUMB_ADD:               howto manager.      (line  956)
-* BFD_RELOC_ARM_THUMB_IMM:               howto manager.      (line  957)
-* BFD_RELOC_ARM_THUMB_MOVT:              howto manager.      (line  866)
-* BFD_RELOC_ARM_THUMB_MOVT_PCREL:        howto manager.      (line  868)
-* BFD_RELOC_ARM_THUMB_MOVW:              howto manager.      (line  865)
-* BFD_RELOC_ARM_THUMB_MOVW_PCREL:        howto manager.      (line  867)
-* BFD_RELOC_ARM_THUMB_OFFSET:            howto manager.      (line  839)
-* BFD_RELOC_ARM_THUMB_SHIFT:             howto manager.      (line  958)
-* BFD_RELOC_ARM_TLS_CALL:                howto manager.      (line  890)
-* BFD_RELOC_ARM_TLS_DESC:                howto manager.      (line  894)
-* BFD_RELOC_ARM_TLS_DESCSEQ:             howto manager.      (line  892)
-* BFD_RELOC_ARM_TLS_DTPMOD32:            howto manager.      (line  885)
-* BFD_RELOC_ARM_TLS_DTPOFF32:            howto manager.      (line  884)
-* BFD_RELOC_ARM_TLS_GD32:                howto manager.      (line  881)
-* BFD_RELOC_ARM_TLS_GOTDESC:             howto manager.      (line  889)
-* BFD_RELOC_ARM_TLS_IE32:                howto manager.      (line  887)
-* BFD_RELOC_ARM_TLS_LDM32:               howto manager.      (line  883)
-* BFD_RELOC_ARM_TLS_LDO32:               howto manager.      (line  882)
-* BFD_RELOC_ARM_TLS_LE32:                howto manager.      (line  888)
-* BFD_RELOC_ARM_TLS_TPOFF32:             howto manager.      (line  886)
-* BFD_RELOC_ARM_V4BX:                    howto manager.      (line  927)
-* BFD_RELOC_AVR_13_PCREL:                howto manager.      (line 1857)
-* BFD_RELOC_AVR_16_PM:                   howto manager.      (line 1861)
-* BFD_RELOC_AVR_6:                       howto manager.      (line 1948)
-* BFD_RELOC_AVR_6_ADIW:                  howto manager.      (line 1952)
-* BFD_RELOC_AVR_7_PCREL:                 howto manager.      (line 1853)
-* BFD_RELOC_AVR_8_HI:                    howto manager.      (line 1960)
-* BFD_RELOC_AVR_8_HLO:                   howto manager.      (line 1964)
-* BFD_RELOC_AVR_8_LO:                    howto manager.      (line 1956)
-* BFD_RELOC_AVR_CALL:                    howto manager.      (line 1940)
-* BFD_RELOC_AVR_DIFF16:                  howto manager.      (line 1969)
-* BFD_RELOC_AVR_DIFF32:                  howto manager.      (line 1970)
-* BFD_RELOC_AVR_DIFF8:                   howto manager.      (line 1968)
-* BFD_RELOC_AVR_HH8_LDI:                 howto manager.      (line 1873)
-* BFD_RELOC_AVR_HH8_LDI_NEG:             howto manager.      (line 1892)
-* BFD_RELOC_AVR_HH8_LDI_PM:              howto manager.      (line 1921)
-* BFD_RELOC_AVR_HH8_LDI_PM_NEG:          howto manager.      (line 1935)
-* BFD_RELOC_AVR_HI8_LDI:                 howto manager.      (line 1869)
-* BFD_RELOC_AVR_HI8_LDI_GS:              howto manager.      (line 1915)
-* BFD_RELOC_AVR_HI8_LDI_NEG:             howto manager.      (line 1887)
-* BFD_RELOC_AVR_HI8_LDI_PM:              howto manager.      (line 1911)
-* BFD_RELOC_AVR_HI8_LDI_PM_NEG:          howto manager.      (line 1930)
-* BFD_RELOC_AVR_LDI:                     howto manager.      (line 1944)
-* BFD_RELOC_AVR_LDS_STS_16:              howto manager.      (line 1978)
-* BFD_RELOC_AVR_LO8_LDI:                 howto manager.      (line 1865)
-* BFD_RELOC_AVR_LO8_LDI_GS:              howto manager.      (line 1905)
-* BFD_RELOC_AVR_LO8_LDI_NEG:             howto manager.      (line 1882)
-* BFD_RELOC_AVR_LO8_LDI_PM:              howto manager.      (line 1901)
-* BFD_RELOC_AVR_LO8_LDI_PM_NEG:          howto manager.      (line 1926)
-* BFD_RELOC_AVR_MS8_LDI:                 howto manager.      (line 1878)
-* BFD_RELOC_AVR_MS8_LDI_NEG:             howto manager.      (line 1897)
-* BFD_RELOC_AVR_PORT5:                   howto manager.      (line 1986)
-* BFD_RELOC_AVR_PORT6:                   howto manager.      (line 1982)
-* BFD_RELOC_BFIN_10_PCREL:               howto manager.      (line 1087)
-* BFD_RELOC_BFIN_11_PCREL:               howto manager.      (line 1090)
-* BFD_RELOC_BFIN_12_PCREL_JUMP:          howto manager.      (line 1093)
-* BFD_RELOC_BFIN_12_PCREL_JUMP_S:        howto manager.      (line 1096)
-* BFD_RELOC_BFIN_16_HIGH:                howto manager.      (line 1075)
-* BFD_RELOC_BFIN_16_IMM:                 howto manager.      (line 1072)
-* BFD_RELOC_BFIN_16_LOW:                 howto manager.      (line 1084)
-* BFD_RELOC_BFIN_24_PCREL_CALL_X:        howto manager.      (line 1099)
-* BFD_RELOC_BFIN_24_PCREL_JUMP_L:        howto manager.      (line 1102)
-* BFD_RELOC_BFIN_4_PCREL:                howto manager.      (line 1078)
-* BFD_RELOC_BFIN_5_PCREL:                howto manager.      (line 1081)
-* BFD_RELOC_BFIN_FUNCDESC:               howto manager.      (line 1108)
-* BFD_RELOC_BFIN_FUNCDESC_GOT17M4:       howto manager.      (line 1109)
-* BFD_RELOC_BFIN_FUNCDESC_GOTHI:         howto manager.      (line 1110)
-* BFD_RELOC_BFIN_FUNCDESC_GOTLO:         howto manager.      (line 1111)
-* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4:    howto manager.      (line 1113)
-* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI:      howto manager.      (line 1114)
-* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO:      howto manager.      (line 1115)
-* BFD_RELOC_BFIN_FUNCDESC_VALUE:         howto manager.      (line 1112)
-* BFD_RELOC_BFIN_GOT:                    howto manager.      (line 1121)
-* BFD_RELOC_BFIN_GOT17M4:                howto manager.      (line 1105)
-* BFD_RELOC_BFIN_GOTHI:                  howto manager.      (line 1106)
-* BFD_RELOC_BFIN_GOTLO:                  howto manager.      (line 1107)
-* BFD_RELOC_BFIN_GOTOFF17M4:             howto manager.      (line 1116)
-* BFD_RELOC_BFIN_GOTOFFHI:               howto manager.      (line 1117)
-* BFD_RELOC_BFIN_GOTOFFLO:               howto manager.      (line 1118)
-* BFD_RELOC_BFIN_PLTPC:                  howto manager.      (line 1124)
-* BFD_RELOC_C6000_ABS_H16:               howto manager.      (line 1676)
-* BFD_RELOC_C6000_ABS_L16:               howto manager.      (line 1675)
-* BFD_RELOC_C6000_ABS_S16:               howto manager.      (line 1674)
-* BFD_RELOC_C6000_ALIGN:                 howto manager.      (line 1697)
-* BFD_RELOC_C6000_COPY:                  howto manager.      (line 1692)
-* BFD_RELOC_C6000_DSBT_INDEX:            howto manager.      (line 1690)
-* BFD_RELOC_C6000_EHTYPE:                howto manager.      (line 1694)
-* BFD_RELOC_C6000_FPHEAD:                howto manager.      (line 1698)
-* BFD_RELOC_C6000_JUMP_SLOT:             howto manager.      (line 1693)
-* BFD_RELOC_C6000_NOCMP:                 howto manager.      (line 1699)
-* BFD_RELOC_C6000_PCR_H16:               howto manager.      (line 1695)
-* BFD_RELOC_C6000_PCR_L16:               howto manager.      (line 1696)
-* BFD_RELOC_C6000_PCR_S10:               howto manager.      (line 1672)
-* BFD_RELOC_C6000_PCR_S12:               howto manager.      (line 1671)
-* BFD_RELOC_C6000_PCR_S21:               howto manager.      (line 1670)
-* BFD_RELOC_C6000_PCR_S7:                howto manager.      (line 1673)
-* BFD_RELOC_C6000_PREL31:                howto manager.      (line 1691)
-* BFD_RELOC_C6000_SBR_GOT_H16_W:         howto manager.      (line 1689)
-* BFD_RELOC_C6000_SBR_GOT_L16_W:         howto manager.      (line 1688)
-* BFD_RELOC_C6000_SBR_GOT_U15_W:         howto manager.      (line 1687)
-* BFD_RELOC_C6000_SBR_H16_B:             howto manager.      (line 1684)
-* BFD_RELOC_C6000_SBR_H16_H:             howto manager.      (line 1685)
-* BFD_RELOC_C6000_SBR_H16_W:             howto manager.      (line 1686)
-* BFD_RELOC_C6000_SBR_L16_B:             howto manager.      (line 1681)
-* BFD_RELOC_C6000_SBR_L16_H:             howto manager.      (line 1682)
-* BFD_RELOC_C6000_SBR_L16_W:             howto manager.      (line 1683)
-* BFD_RELOC_C6000_SBR_S16:               howto manager.      (line 1680)
-* BFD_RELOC_C6000_SBR_U15_B:             howto manager.      (line 1677)
-* BFD_RELOC_C6000_SBR_U15_H:             howto manager.      (line 1678)
-* BFD_RELOC_C6000_SBR_U15_W:             howto manager.      (line 1679)
-* bfd_reloc_code_type:                   howto manager.      (line   10)
-* BFD_RELOC_CR16_ABS20:                  howto manager.      (line 2500)
-* BFD_RELOC_CR16_ABS24:                  howto manager.      (line 2501)
-* BFD_RELOC_CR16_DISP16:                 howto manager.      (line 2511)
-* BFD_RELOC_CR16_DISP20:                 howto manager.      (line 2512)
-* BFD_RELOC_CR16_DISP24:                 howto manager.      (line 2513)
-* BFD_RELOC_CR16_DISP24a:                howto manager.      (line 2514)
-* BFD_RELOC_CR16_DISP4:                  howto manager.      (line 2509)
-* BFD_RELOC_CR16_DISP8:                  howto manager.      (line 2510)
-* BFD_RELOC_CR16_GLOB_DAT:               howto manager.      (line 2520)
-* BFD_RELOC_CR16_GOT_REGREL20:           howto manager.      (line 2518)
-* BFD_RELOC_CR16_GOTC_REGREL20:          howto manager.      (line 2519)
-* BFD_RELOC_CR16_IMM16:                  howto manager.      (line 2504)
-* BFD_RELOC_CR16_IMM20:                  howto manager.      (line 2505)
-* BFD_RELOC_CR16_IMM24:                  howto manager.      (line 2506)
-* BFD_RELOC_CR16_IMM32:                  howto manager.      (line 2507)
-* BFD_RELOC_CR16_IMM32a:                 howto manager.      (line 2508)
-* BFD_RELOC_CR16_IMM4:                   howto manager.      (line 2502)
-* BFD_RELOC_CR16_IMM8:                   howto manager.      (line 2503)
-* BFD_RELOC_CR16_NUM16:                  howto manager.      (line 2489)
-* BFD_RELOC_CR16_NUM32:                  howto manager.      (line 2490)
-* BFD_RELOC_CR16_NUM32a:                 howto manager.      (line 2491)
-* BFD_RELOC_CR16_NUM8:                   howto manager.      (line 2488)
-* BFD_RELOC_CR16_REGREL0:                howto manager.      (line 2492)
-* BFD_RELOC_CR16_REGREL14:               howto manager.      (line 2495)
-* BFD_RELOC_CR16_REGREL14a:              howto manager.      (line 2496)
-* BFD_RELOC_CR16_REGREL16:               howto manager.      (line 2497)
-* BFD_RELOC_CR16_REGREL20:               howto manager.      (line 2498)
-* BFD_RELOC_CR16_REGREL20a:              howto manager.      (line 2499)
-* BFD_RELOC_CR16_REGREL4:                howto manager.      (line 2493)
-* BFD_RELOC_CR16_REGREL4a:               howto manager.      (line 2494)
-* BFD_RELOC_CR16_SWITCH16:               howto manager.      (line 2516)
-* BFD_RELOC_CR16_SWITCH32:               howto manager.      (line 2517)
-* BFD_RELOC_CR16_SWITCH8:                howto manager.      (line 2515)
-* BFD_RELOC_CRIS_16_DTPREL:              howto manager.      (line 2591)
-* BFD_RELOC_CRIS_16_GOT:                 howto manager.      (line 2567)
-* BFD_RELOC_CRIS_16_GOT_GD:              howto manager.      (line 2587)
-* BFD_RELOC_CRIS_16_GOT_TPREL:           howto manager.      (line 2593)
-* BFD_RELOC_CRIS_16_GOTPLT:              howto manager.      (line 2573)
-* BFD_RELOC_CRIS_16_TPREL:               howto manager.      (line 2595)
-* BFD_RELOC_CRIS_32_DTPREL:              howto manager.      (line 2590)
-* BFD_RELOC_CRIS_32_GD:                  howto manager.      (line 2588)
-* BFD_RELOC_CRIS_32_GOT:                 howto manager.      (line 2564)
-* BFD_RELOC_CRIS_32_GOT_GD:              howto manager.      (line 2586)
-* BFD_RELOC_CRIS_32_GOT_TPREL:           howto manager.      (line 2592)
-* BFD_RELOC_CRIS_32_GOTPLT:              howto manager.      (line 2570)
-* BFD_RELOC_CRIS_32_GOTREL:              howto manager.      (line 2576)
-* BFD_RELOC_CRIS_32_IE:                  howto manager.      (line 2597)
-* BFD_RELOC_CRIS_32_PLT_GOTREL:          howto manager.      (line 2579)
-* BFD_RELOC_CRIS_32_PLT_PCREL:           howto manager.      (line 2582)
-* BFD_RELOC_CRIS_32_TPREL:               howto manager.      (line 2594)
-* BFD_RELOC_CRIS_BDISP8:                 howto manager.      (line 2545)
-* BFD_RELOC_CRIS_COPY:                   howto manager.      (line 2558)
-* BFD_RELOC_CRIS_DTP:                    howto manager.      (line 2589)
-* BFD_RELOC_CRIS_DTPMOD:                 howto manager.      (line 2596)
-* BFD_RELOC_CRIS_GLOB_DAT:               howto manager.      (line 2559)
-* BFD_RELOC_CRIS_JUMP_SLOT:              howto manager.      (line 2560)
-* BFD_RELOC_CRIS_LAPCQ_OFFSET:           howto manager.      (line 2553)
-* BFD_RELOC_CRIS_RELATIVE:               howto manager.      (line 2561)
-* BFD_RELOC_CRIS_SIGNED_16:              howto manager.      (line 2551)
-* BFD_RELOC_CRIS_SIGNED_6:               howto manager.      (line 2547)
-* BFD_RELOC_CRIS_SIGNED_8:               howto manager.      (line 2549)
-* BFD_RELOC_CRIS_UNSIGNED_16:            howto manager.      (line 2552)
-* BFD_RELOC_CRIS_UNSIGNED_4:             howto manager.      (line 2554)
-* BFD_RELOC_CRIS_UNSIGNED_5:             howto manager.      (line 2546)
-* BFD_RELOC_CRIS_UNSIGNED_6:             howto manager.      (line 2548)
-* BFD_RELOC_CRIS_UNSIGNED_8:             howto manager.      (line 2550)
-* BFD_RELOC_CRX_ABS16:                   howto manager.      (line 2533)
-* BFD_RELOC_CRX_ABS32:                   howto manager.      (line 2534)
-* BFD_RELOC_CRX_IMM16:                   howto manager.      (line 2538)
-* BFD_RELOC_CRX_IMM32:                   howto manager.      (line 2539)
-* BFD_RELOC_CRX_NUM16:                   howto manager.      (line 2536)
-* BFD_RELOC_CRX_NUM32:                   howto manager.      (line 2537)
-* BFD_RELOC_CRX_NUM8:                    howto manager.      (line 2535)
-* BFD_RELOC_CRX_REGREL12:                howto manager.      (line 2529)
-* BFD_RELOC_CRX_REGREL22:                howto manager.      (line 2530)
-* BFD_RELOC_CRX_REGREL28:                howto manager.      (line 2531)
-* BFD_RELOC_CRX_REGREL32:                howto manager.      (line 2532)
-* BFD_RELOC_CRX_REL16:                   howto manager.      (line 2526)
-* BFD_RELOC_CRX_REL24:                   howto manager.      (line 2527)
-* BFD_RELOC_CRX_REL32:                   howto manager.      (line 2528)
-* BFD_RELOC_CRX_REL4:                    howto manager.      (line 2523)
-* BFD_RELOC_CRX_REL8:                    howto manager.      (line 2524)
-* BFD_RELOC_CRX_REL8_CMP:                howto manager.      (line 2525)
-* BFD_RELOC_CRX_SWITCH16:                howto manager.      (line 2541)
-* BFD_RELOC_CRX_SWITCH32:                howto manager.      (line 2542)
-* BFD_RELOC_CRX_SWITCH8:                 howto manager.      (line 2540)
-* BFD_RELOC_CTOR:                        howto manager.      (line  796)
-* BFD_RELOC_D10V_10_PCREL_L:             howto manager.      (line 1191)
-* BFD_RELOC_D10V_10_PCREL_R:             howto manager.      (line 1187)
-* BFD_RELOC_D10V_18:                     howto manager.      (line 1196)
-* BFD_RELOC_D10V_18_PCREL:               howto manager.      (line 1199)
-* BFD_RELOC_D30V_15:                     howto manager.      (line 1214)
-* BFD_RELOC_D30V_15_PCREL:               howto manager.      (line 1218)
-* BFD_RELOC_D30V_15_PCREL_R:             howto manager.      (line 1222)
-* BFD_RELOC_D30V_21:                     howto manager.      (line 1227)
-* BFD_RELOC_D30V_21_PCREL:               howto manager.      (line 1231)
-* BFD_RELOC_D30V_21_PCREL_R:             howto manager.      (line 1235)
-* BFD_RELOC_D30V_32:                     howto manager.      (line 1240)
-* BFD_RELOC_D30V_32_PCREL:               howto manager.      (line 1243)
-* BFD_RELOC_D30V_6:                      howto manager.      (line 1202)
-* BFD_RELOC_D30V_9_PCREL:                howto manager.      (line 1205)
-* BFD_RELOC_D30V_9_PCREL_R:              howto manager.      (line 1209)
-* BFD_RELOC_DLX_HI16_S:                  howto manager.      (line 1246)
-* BFD_RELOC_DLX_JMP26:                   howto manager.      (line 1252)
-* BFD_RELOC_DLX_LO16:                    howto manager.      (line 1249)
-* BFD_RELOC_EPIPHANY_HIGH:               howto manager.      (line 3529)
-* BFD_RELOC_EPIPHANY_IMM11:              howto manager.      (line 3538)
-* BFD_RELOC_EPIPHANY_IMM8:               howto manager.      (line 3542)
-* BFD_RELOC_EPIPHANY_LOW:                howto manager.      (line 3532)
-* BFD_RELOC_EPIPHANY_SIMM11:             howto manager.      (line 3535)
-* BFD_RELOC_EPIPHANY_SIMM24:             howto manager.      (line 3526)
-* BFD_RELOC_EPIPHANY_SIMM8:              howto manager.      (line 3523)
-* BFD_RELOC_FR30_10_IN_8:                howto manager.      (line 1721)
-* BFD_RELOC_FR30_12_PCREL:               howto manager.      (line 1729)
-* BFD_RELOC_FR30_20:                     howto manager.      (line 1705)
-* BFD_RELOC_FR30_48:                     howto manager.      (line 1702)
-* BFD_RELOC_FR30_6_IN_4:                 howto manager.      (line 1709)
-* BFD_RELOC_FR30_8_IN_8:                 howto manager.      (line 1713)
-* BFD_RELOC_FR30_9_IN_8:                 howto manager.      (line 1717)
-* BFD_RELOC_FR30_9_PCREL:                howto manager.      (line 1725)
-* BFD_RELOC_FRV_FUNCDESC:                howto manager.      (line  503)
-* BFD_RELOC_FRV_FUNCDESC_GOT12:          howto manager.      (line  504)
-* BFD_RELOC_FRV_FUNCDESC_GOTHI:          howto manager.      (line  505)
-* BFD_RELOC_FRV_FUNCDESC_GOTLO:          howto manager.      (line  506)
-* BFD_RELOC_FRV_FUNCDESC_GOTOFF12:       howto manager.      (line  508)
-* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:       howto manager.      (line  509)
-* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:       howto manager.      (line  510)
-* BFD_RELOC_FRV_FUNCDESC_VALUE:          howto manager.      (line  507)
-* BFD_RELOC_FRV_GETTLSOFF:               howto manager.      (line  514)
-* BFD_RELOC_FRV_GETTLSOFF_RELAX:         howto manager.      (line  527)
-* BFD_RELOC_FRV_GOT12:                   howto manager.      (line  500)
-* BFD_RELOC_FRV_GOTHI:                   howto manager.      (line  501)
-* BFD_RELOC_FRV_GOTLO:                   howto manager.      (line  502)
-* BFD_RELOC_FRV_GOTOFF12:                howto manager.      (line  511)
-* BFD_RELOC_FRV_GOTOFFHI:                howto manager.      (line  512)
-* BFD_RELOC_FRV_GOTOFFLO:                howto manager.      (line  513)
-* BFD_RELOC_FRV_GOTTLSDESC12:            howto manager.      (line  516)
-* BFD_RELOC_FRV_GOTTLSDESCHI:            howto manager.      (line  517)
-* BFD_RELOC_FRV_GOTTLSDESCLO:            howto manager.      (line  518)
-* BFD_RELOC_FRV_GOTTLSOFF12:             howto manager.      (line  522)
-* BFD_RELOC_FRV_GOTTLSOFFHI:             howto manager.      (line  523)
-* BFD_RELOC_FRV_GOTTLSOFFLO:             howto manager.      (line  524)
-* BFD_RELOC_FRV_GPREL12:                 howto manager.      (line  495)
-* BFD_RELOC_FRV_GPREL32:                 howto manager.      (line  497)
-* BFD_RELOC_FRV_GPRELHI:                 howto manager.      (line  498)
-* BFD_RELOC_FRV_GPRELLO:                 howto manager.      (line  499)
-* BFD_RELOC_FRV_GPRELU12:                howto manager.      (line  496)
-* BFD_RELOC_FRV_HI16:                    howto manager.      (line  494)
-* BFD_RELOC_FRV_LABEL16:                 howto manager.      (line  491)
-* BFD_RELOC_FRV_LABEL24:                 howto manager.      (line  492)
-* BFD_RELOC_FRV_LO16:                    howto manager.      (line  493)
-* BFD_RELOC_FRV_TLSDESC_RELAX:           howto manager.      (line  526)
-* BFD_RELOC_FRV_TLSDESC_VALUE:           howto manager.      (line  515)
-* BFD_RELOC_FRV_TLSMOFF:                 howto manager.      (line  529)
-* BFD_RELOC_FRV_TLSMOFF12:               howto manager.      (line  519)
-* BFD_RELOC_FRV_TLSMOFFHI:               howto manager.      (line  520)
-* BFD_RELOC_FRV_TLSMOFFLO:               howto manager.      (line  521)
-* BFD_RELOC_FRV_TLSOFF:                  howto manager.      (line  525)
-* BFD_RELOC_FRV_TLSOFF_RELAX:            howto manager.      (line  528)
-* BFD_RELOC_FT32_10:                     howto manager.      (line  485)
-* BFD_RELOC_FT32_17:                     howto manager.      (line  487)
-* BFD_RELOC_FT32_18:                     howto manager.      (line  488)
-* BFD_RELOC_FT32_20:                     howto manager.      (line  486)
-* BFD_RELOC_GPREL16:                     howto manager.      (line  125)
-* BFD_RELOC_GPREL32:                     howto manager.      (line  126)
-* BFD_RELOC_H8_DIR16A8:                  howto manager.      (line 2660)
-* BFD_RELOC_H8_DIR16R8:                  howto manager.      (line 2661)
-* BFD_RELOC_H8_DIR24A8:                  howto manager.      (line 2662)
-* BFD_RELOC_H8_DIR24R8:                  howto manager.      (line 2663)
-* BFD_RELOC_H8_DIR32A16:                 howto manager.      (line 2664)
-* BFD_RELOC_H8_DISP32A16:                howto manager.      (line 2665)
-* BFD_RELOC_HI16:                        howto manager.      (line  352)
-* BFD_RELOC_HI16_BASEREL:                howto manager.      (line  101)
-* BFD_RELOC_HI16_GOTOFF:                 howto manager.      (line   57)
-* BFD_RELOC_HI16_PCREL:                  howto manager.      (line  364)
-* BFD_RELOC_HI16_PLTOFF:                 howto manager.      (line   69)
-* BFD_RELOC_HI16_S:                      howto manager.      (line  355)
-* BFD_RELOC_HI16_S_BASEREL:              howto manager.      (line  102)
-* BFD_RELOC_HI16_S_GOTOFF:               howto manager.      (line   58)
-* BFD_RELOC_HI16_S_PCREL:                howto manager.      (line  367)
-* BFD_RELOC_HI16_S_PLTOFF:               howto manager.      (line   70)
-* BFD_RELOC_HI22:                        howto manager.      (line  120)
-* BFD_RELOC_I370_D12:                    howto manager.      (line  793)
-* BFD_RELOC_I960_CALLJ:                  howto manager.      (line  132)
-* BFD_RELOC_IA64_COPY:                   howto manager.      (line 2320)
-* BFD_RELOC_IA64_DIR32LSB:               howto manager.      (line 2265)
-* BFD_RELOC_IA64_DIR32MSB:               howto manager.      (line 2264)
-* BFD_RELOC_IA64_DIR64LSB:               howto manager.      (line 2267)
-* BFD_RELOC_IA64_DIR64MSB:               howto manager.      (line 2266)
-* BFD_RELOC_IA64_DTPMOD64LSB:            howto manager.      (line 2330)
-* BFD_RELOC_IA64_DTPMOD64MSB:            howto manager.      (line 2329)
-* BFD_RELOC_IA64_DTPREL14:               howto manager.      (line 2332)
-* BFD_RELOC_IA64_DTPREL22:               howto manager.      (line 2333)
-* BFD_RELOC_IA64_DTPREL32LSB:            howto manager.      (line 2336)
-* BFD_RELOC_IA64_DTPREL32MSB:            howto manager.      (line 2335)
-* BFD_RELOC_IA64_DTPREL64I:              howto manager.      (line 2334)
-* BFD_RELOC_IA64_DTPREL64LSB:            howto manager.      (line 2338)
-* BFD_RELOC_IA64_DTPREL64MSB:            howto manager.      (line 2337)
-* BFD_RELOC_IA64_FPTR32LSB:              howto manager.      (line 2282)
-* BFD_RELOC_IA64_FPTR32MSB:              howto manager.      (line 2281)
-* BFD_RELOC_IA64_FPTR64I:                howto manager.      (line 2280)
-* BFD_RELOC_IA64_FPTR64LSB:              howto manager.      (line 2284)
-* BFD_RELOC_IA64_FPTR64MSB:              howto manager.      (line 2283)
-* BFD_RELOC_IA64_GPREL22:                howto manager.      (line 2268)
-* BFD_RELOC_IA64_GPREL32LSB:             howto manager.      (line 2271)
-* BFD_RELOC_IA64_GPREL32MSB:             howto manager.      (line 2270)
-* BFD_RELOC_IA64_GPREL64I:               howto manager.      (line 2269)
-* BFD_RELOC_IA64_GPREL64LSB:             howto manager.      (line 2273)
-* BFD_RELOC_IA64_GPREL64MSB:             howto manager.      (line 2272)
-* BFD_RELOC_IA64_IMM14:                  howto manager.      (line 2261)
-* BFD_RELOC_IA64_IMM22:                  howto manager.      (line 2262)
-* BFD_RELOC_IA64_IMM64:                  howto manager.      (line 2263)
-* BFD_RELOC_IA64_IPLTLSB:                howto manager.      (line 2319)
-* BFD_RELOC_IA64_IPLTMSB:                howto manager.      (line 2318)
-* BFD_RELOC_IA64_LDXMOV:                 howto manager.      (line 2322)
-* BFD_RELOC_IA64_LTOFF22:                howto manager.      (line 2274)
-* BFD_RELOC_IA64_LTOFF22X:               howto manager.      (line 2321)
-* BFD_RELOC_IA64_LTOFF64I:               howto manager.      (line 2275)
-* BFD_RELOC_IA64_LTOFF_DTPMOD22:         howto manager.      (line 2331)
-* BFD_RELOC_IA64_LTOFF_DTPREL22:         howto manager.      (line 2339)
-* BFD_RELOC_IA64_LTOFF_FPTR22:           howto manager.      (line 2296)
-* BFD_RELOC_IA64_LTOFF_FPTR32LSB:        howto manager.      (line 2299)
-* BFD_RELOC_IA64_LTOFF_FPTR32MSB:        howto manager.      (line 2298)
-* BFD_RELOC_IA64_LTOFF_FPTR64I:          howto manager.      (line 2297)
-* BFD_RELOC_IA64_LTOFF_FPTR64LSB:        howto manager.      (line 2301)
-* BFD_RELOC_IA64_LTOFF_FPTR64MSB:        howto manager.      (line 2300)
-* BFD_RELOC_IA64_LTOFF_TPREL22:          howto manager.      (line 2328)
-* BFD_RELOC_IA64_LTV32LSB:               howto manager.      (line 2315)
-* BFD_RELOC_IA64_LTV32MSB:               howto manager.      (line 2314)
-* BFD_RELOC_IA64_LTV64LSB:               howto manager.      (line 2317)
-* BFD_RELOC_IA64_LTV64MSB:               howto manager.      (line 2316)
-* BFD_RELOC_IA64_PCREL21B:               howto manager.      (line 2285)
-* BFD_RELOC_IA64_PCREL21BI:              howto manager.      (line 2286)
-* BFD_RELOC_IA64_PCREL21F:               howto manager.      (line 2288)
-* BFD_RELOC_IA64_PCREL21M:               howto manager.      (line 2287)
-* BFD_RELOC_IA64_PCREL22:                howto manager.      (line 2289)
-* BFD_RELOC_IA64_PCREL32LSB:             howto manager.      (line 2293)
-* BFD_RELOC_IA64_PCREL32MSB:             howto manager.      (line 2292)
-* BFD_RELOC_IA64_PCREL60B:               howto manager.      (line 2290)
-* BFD_RELOC_IA64_PCREL64I:               howto manager.      (line 2291)
-* BFD_RELOC_IA64_PCREL64LSB:             howto manager.      (line 2295)
-* BFD_RELOC_IA64_PCREL64MSB:             howto manager.      (line 2294)
-* BFD_RELOC_IA64_PLTOFF22:               howto manager.      (line 2276)
-* BFD_RELOC_IA64_PLTOFF64I:              howto manager.      (line 2277)
-* BFD_RELOC_IA64_PLTOFF64LSB:            howto manager.      (line 2279)
-* BFD_RELOC_IA64_PLTOFF64MSB:            howto manager.      (line 2278)
-* BFD_RELOC_IA64_REL32LSB:               howto manager.      (line 2311)
-* BFD_RELOC_IA64_REL32MSB:               howto manager.      (line 2310)
-* BFD_RELOC_IA64_REL64LSB:               howto manager.      (line 2313)
-* BFD_RELOC_IA64_REL64MSB:               howto manager.      (line 2312)
-* BFD_RELOC_IA64_SECREL32LSB:            howto manager.      (line 2307)
-* BFD_RELOC_IA64_SECREL32MSB:            howto manager.      (line 2306)
-* BFD_RELOC_IA64_SECREL64LSB:            howto manager.      (line 2309)
-* BFD_RELOC_IA64_SECREL64MSB:            howto manager.      (line 2308)
-* BFD_RELOC_IA64_SEGREL32LSB:            howto manager.      (line 2303)
-* BFD_RELOC_IA64_SEGREL32MSB:            howto manager.      (line 2302)
-* BFD_RELOC_IA64_SEGREL64LSB:            howto manager.      (line 2305)
-* BFD_RELOC_IA64_SEGREL64MSB:            howto manager.      (line 2304)
-* BFD_RELOC_IA64_TPREL14:                howto manager.      (line 2323)
-* BFD_RELOC_IA64_TPREL22:                howto manager.      (line 2324)
-* BFD_RELOC_IA64_TPREL64I:               howto manager.      (line 2325)
-* BFD_RELOC_IA64_TPREL64LSB:             howto manager.      (line 2327)
-* BFD_RELOC_IA64_TPREL64MSB:             howto manager.      (line 2326)
-* BFD_RELOC_IP2K_ADDR16CJP:              howto manager.      (line 2213)
-* BFD_RELOC_IP2K_BANK:                   howto manager.      (line 2210)
-* BFD_RELOC_IP2K_EX8DATA:                howto manager.      (line 2221)
-* BFD_RELOC_IP2K_FR9:                    howto manager.      (line 2207)
-* BFD_RELOC_IP2K_FR_OFFSET:              howto manager.      (line 2234)
-* BFD_RELOC_IP2K_HI8DATA:                howto manager.      (line 2220)
-* BFD_RELOC_IP2K_HI8INSN:                howto manager.      (line 2225)
-* BFD_RELOC_IP2K_LO8DATA:                howto manager.      (line 2219)
-* BFD_RELOC_IP2K_LO8INSN:                howto manager.      (line 2224)
-* BFD_RELOC_IP2K_PAGE3:                  howto manager.      (line 2216)
-* BFD_RELOC_IP2K_PC_SKIP:                howto manager.      (line 2228)
-* BFD_RELOC_IP2K_TEXT:                   howto manager.      (line 2231)
-* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 2784)
-* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 2785)
-* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 2786)
-* BFD_RELOC_LM32_16_GOT:                 howto manager.      (line 2891)
-* BFD_RELOC_LM32_BRANCH:                 howto manager.      (line 2890)
-* BFD_RELOC_LM32_CALL:                   howto manager.      (line 2889)
-* BFD_RELOC_LM32_COPY:                   howto manager.      (line 2894)
-* BFD_RELOC_LM32_GLOB_DAT:               howto manager.      (line 2895)
-* BFD_RELOC_LM32_GOTOFF_HI16:            howto manager.      (line 2892)
-* BFD_RELOC_LM32_GOTOFF_LO16:            howto manager.      (line 2893)
-* BFD_RELOC_LM32_JMP_SLOT:               howto manager.      (line 2896)
-* BFD_RELOC_LM32_RELATIVE:               howto manager.      (line 2897)
-* BFD_RELOC_LO10:                        howto manager.      (line  121)
-* BFD_RELOC_LO16:                        howto manager.      (line  361)
-* BFD_RELOC_LO16_BASEREL:                howto manager.      (line  100)
-* BFD_RELOC_LO16_GOTOFF:                 howto manager.      (line   56)
-* BFD_RELOC_LO16_PCREL:                  howto manager.      (line  370)
-* BFD_RELOC_LO16_PLTOFF:                 howto manager.      (line   68)
-* BFD_RELOC_M32C_HI8:                    howto manager.      (line 1255)
-* BFD_RELOC_M32C_RL_1ADDR:               howto manager.      (line 1257)
-* BFD_RELOC_M32C_RL_2ADDR:               howto manager.      (line 1258)
-* BFD_RELOC_M32C_RL_JUMP:                howto manager.      (line 1256)
-* BFD_RELOC_M32R_10_PCREL:               howto manager.      (line 1265)
-* BFD_RELOC_M32R_18_PCREL:               howto manager.      (line 1269)
-* BFD_RELOC_M32R_24:                     howto manager.      (line 1261)
-* BFD_RELOC_M32R_26_PCREL:               howto manager.      (line 1272)
-* BFD_RELOC_M32R_26_PLTREL:              howto manager.      (line 1291)
-* BFD_RELOC_M32R_COPY:                   howto manager.      (line 1292)
-* BFD_RELOC_M32R_GLOB_DAT:               howto manager.      (line 1293)
-* BFD_RELOC_M32R_GOT16_HI_SLO:           howto manager.      (line 1302)
-* BFD_RELOC_M32R_GOT16_HI_ULO:           howto manager.      (line 1301)
-* BFD_RELOC_M32R_GOT16_LO:               howto manager.      (line 1303)
-* BFD_RELOC_M32R_GOT24:                  howto manager.      (line 1290)
-* BFD_RELOC_M32R_GOTOFF:                 howto manager.      (line 1296)
-* BFD_RELOC_M32R_GOTOFF_HI_SLO:          howto manager.      (line 1298)
-* BFD_RELOC_M32R_GOTOFF_HI_ULO:          howto manager.      (line 1297)
-* BFD_RELOC_M32R_GOTOFF_LO:              howto manager.      (line 1299)
-* BFD_RELOC_M32R_GOTPC24:                howto manager.      (line 1300)
-* BFD_RELOC_M32R_GOTPC_HI_SLO:           howto manager.      (line 1305)
-* BFD_RELOC_M32R_GOTPC_HI_ULO:           howto manager.      (line 1304)
-* BFD_RELOC_M32R_GOTPC_LO:               howto manager.      (line 1306)
-* BFD_RELOC_M32R_HI16_SLO:               howto manager.      (line 1279)
-* BFD_RELOC_M32R_HI16_ULO:               howto manager.      (line 1275)
-* BFD_RELOC_M32R_JMP_SLOT:               howto manager.      (line 1294)
-* BFD_RELOC_M32R_LO16:                   howto manager.      (line 1283)
-* BFD_RELOC_M32R_RELATIVE:               howto manager.      (line 1295)
-* BFD_RELOC_M32R_SDA16:                  howto manager.      (line 1286)
-* BFD_RELOC_M68HC11_24:                  howto manager.      (line 2375)
-* BFD_RELOC_M68HC11_3B:                  howto manager.      (line 2350)
-* BFD_RELOC_M68HC11_HI8:                 howto manager.      (line 2342)
-* BFD_RELOC_M68HC11_LO16:                howto manager.      (line 2364)
-* BFD_RELOC_M68HC11_LO8:                 howto manager.      (line 2346)
-* BFD_RELOC_M68HC11_PAGE:                howto manager.      (line 2370)
-* BFD_RELOC_M68HC11_RL_GROUP:            howto manager.      (line 2359)
-* BFD_RELOC_M68HC11_RL_JUMP:             howto manager.      (line 2353)
-* BFD_RELOC_M68HC12_10_PCREL:            howto manager.      (line 2435)
-* BFD_RELOC_M68HC12_16B:                 howto manager.      (line 2429)
-* BFD_RELOC_M68HC12_5B:                  howto manager.      (line 2381)
-* BFD_RELOC_M68HC12_9_PCREL:             howto manager.      (line 2432)
-* BFD_RELOC_M68HC12_9B:                  howto manager.      (line 2426)
-* BFD_RELOC_M68HC12_HI8XG:               howto manager.      (line 2442)
-* BFD_RELOC_M68HC12_LO8XG:               howto manager.      (line 2438)
-* BFD_RELOC_MACH_O_LOCAL_SECTDIFF:       howto manager.      (line 2904)
-* BFD_RELOC_MACH_O_PAIR:                 howto manager.      (line 2907)
-* BFD_RELOC_MACH_O_SECTDIFF:             howto manager.      (line 2900)
-* BFD_RELOC_MACH_O_X86_64_BRANCH32:      howto manager.      (line 2910)
-* BFD_RELOC_MACH_O_X86_64_BRANCH8:       howto manager.      (line 2911)
-* BFD_RELOC_MACH_O_X86_64_GOT:           howto manager.      (line 2915)
-* BFD_RELOC_MACH_O_X86_64_GOT_LOAD:      howto manager.      (line 2918)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_1:     howto manager.      (line 2928)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_2:     howto manager.      (line 2931)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_4:     howto manager.      (line 2934)
-* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:  howto manager.      (line 2922)
-* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:  howto manager.      (line 2925)
-* BFD_RELOC_MCORE_PCREL_32:              howto manager.      (line 1736)
-* BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.      (line 1734)
-* BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.      (line 1735)
-* BFD_RELOC_MCORE_PCREL_IMM8BY4:         howto manager.      (line 1733)
-* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2:    howto manager.      (line 1737)
-* BFD_RELOC_MCORE_RVA:                   howto manager.      (line 1738)
-* BFD_RELOC_MEP_16:                      howto manager.      (line 1742)
-* BFD_RELOC_MEP_32:                      howto manager.      (line 1743)
-* BFD_RELOC_MEP_8:                       howto manager.      (line 1741)
-* BFD_RELOC_MEP_ADDR24A4:                howto manager.      (line 1758)
-* BFD_RELOC_MEP_GNU_VTENTRY:             howto manager.      (line 1760)
-* BFD_RELOC_MEP_GNU_VTINHERIT:           howto manager.      (line 1759)
-* BFD_RELOC_MEP_GPREL:                   howto manager.      (line 1752)
-* BFD_RELOC_MEP_HI16S:                   howto manager.      (line 1751)
-* BFD_RELOC_MEP_HI16U:                   howto manager.      (line 1750)
-* BFD_RELOC_MEP_LOW16:                   howto manager.      (line 1749)
-* BFD_RELOC_MEP_PCABS24A2:               howto manager.      (line 1748)
-* BFD_RELOC_MEP_PCREL12A2:               howto manager.      (line 1745)
-* BFD_RELOC_MEP_PCREL17A2:               howto manager.      (line 1746)
-* BFD_RELOC_MEP_PCREL24A2:               howto manager.      (line 1747)
-* BFD_RELOC_MEP_PCREL8A2:                howto manager.      (line 1744)
-* BFD_RELOC_MEP_TPREL:                   howto manager.      (line 1753)
-* BFD_RELOC_MEP_TPREL7:                  howto manager.      (line 1754)
-* BFD_RELOC_MEP_TPREL7A2:                howto manager.      (line 1755)
-* BFD_RELOC_MEP_TPREL7A4:                howto manager.      (line 1756)
-* BFD_RELOC_MEP_UIMM24:                  howto manager.      (line 1757)
-* BFD_RELOC_METAG_COPY:                  howto manager.      (line 1782)
-* BFD_RELOC_METAG_GETSET_GOT:            howto manager.      (line 1774)
-* BFD_RELOC_METAG_GETSET_GOTOFF:         howto manager.      (line 1773)
-* BFD_RELOC_METAG_GETSETOFF:             howto manager.      (line 1766)
-* BFD_RELOC_METAG_GLOB_DAT:              howto manager.      (line 1785)
-* BFD_RELOC_METAG_GOTOFF:                howto manager.      (line 1780)
-* BFD_RELOC_METAG_HI16_GOTOFF:           howto manager.      (line 1771)
-* BFD_RELOC_METAG_HI16_GOTPC:            howto manager.      (line 1775)
-* BFD_RELOC_METAG_HI16_PLT:              howto manager.      (line 1777)
-* BFD_RELOC_METAG_HIADDR16:              howto manager.      (line 1763)
-* BFD_RELOC_METAG_HIOG:                  howto manager.      (line 1767)
-* BFD_RELOC_METAG_JMP_SLOT:              howto manager.      (line 1783)
-* BFD_RELOC_METAG_LO16_GOTOFF:           howto manager.      (line 1772)
-* BFD_RELOC_METAG_LO16_GOTPC:            howto manager.      (line 1776)
-* BFD_RELOC_METAG_LO16_PLT:              howto manager.      (line 1778)
-* BFD_RELOC_METAG_LOADDR16:              howto manager.      (line 1764)
-* BFD_RELOC_METAG_LOOG:                  howto manager.      (line 1768)
-* BFD_RELOC_METAG_PLT:                   howto manager.      (line 1781)
-* BFD_RELOC_METAG_REL16:                 howto manager.      (line 1770)
-* BFD_RELOC_METAG_REL8:                  howto manager.      (line 1769)
-* BFD_RELOC_METAG_RELATIVE:              howto manager.      (line 1784)
-* BFD_RELOC_METAG_RELBRANCH:             howto manager.      (line 1765)
-* BFD_RELOC_METAG_RELBRANCH_PLT:         howto manager.      (line 1779)
-* BFD_RELOC_METAG_TLS_DTPMOD:            howto manager.      (line 1796)
-* BFD_RELOC_METAG_TLS_DTPOFF:            howto manager.      (line 1797)
-* BFD_RELOC_METAG_TLS_GD:                howto manager.      (line 1786)
-* BFD_RELOC_METAG_TLS_IE:                howto manager.      (line 1791)
-* BFD_RELOC_METAG_TLS_IENONPIC:          howto manager.      (line 1792)
-* BFD_RELOC_METAG_TLS_IENONPIC_HI16:     howto manager.      (line 1793)
-* BFD_RELOC_METAG_TLS_IENONPIC_LO16:     howto manager.      (line 1794)
-* BFD_RELOC_METAG_TLS_LDM:               howto manager.      (line 1787)
-* BFD_RELOC_METAG_TLS_LDO:               howto manager.      (line 1790)
-* BFD_RELOC_METAG_TLS_LDO_HI16:          howto manager.      (line 1788)
-* BFD_RELOC_METAG_TLS_LDO_LO16:          howto manager.      (line 1789)
-* BFD_RELOC_METAG_TLS_LE:                howto manager.      (line 1798)
-* BFD_RELOC_METAG_TLS_LE_HI16:           howto manager.      (line 1799)
-* BFD_RELOC_METAG_TLS_LE_LO16:           howto manager.      (line 1800)
-* BFD_RELOC_METAG_TLS_TPOFF:             howto manager.      (line 1795)
-* BFD_RELOC_MICROBLAZE_32_GOTOFF:        howto manager.      (line 2981)
-* BFD_RELOC_MICROBLAZE_32_LO:            howto manager.      (line 2937)
-* BFD_RELOC_MICROBLAZE_32_LO_PCREL:      howto manager.      (line 2941)
-* BFD_RELOC_MICROBLAZE_32_ROSDA:         howto manager.      (line 2945)
-* BFD_RELOC_MICROBLAZE_32_RWSDA:         howto manager.      (line 2949)
-* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM:    howto manager.      (line 2953)
-* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD:     howto manager.      (line 3002)
-* BFD_RELOC_MICROBLAZE_32_TLSDTPREL:     howto manager.      (line 3005)
-* BFD_RELOC_MICROBLAZE_64_GOT:           howto manager.      (line 2967)
-* BFD_RELOC_MICROBLAZE_64_GOTOFF:        howto manager.      (line 2976)
-* BFD_RELOC_MICROBLAZE_64_GOTPC:         howto manager.      (line 2962)
-* BFD_RELOC_MICROBLAZE_64_NONE:          howto manager.      (line 2957)
-* BFD_RELOC_MICROBLAZE_64_PLT:           howto manager.      (line 2971)
-* BFD_RELOC_MICROBLAZE_64_TLS:           howto manager.      (line 2989)
-* BFD_RELOC_MICROBLAZE_64_TLSDTPREL:     howto manager.      (line 3008)
-* BFD_RELOC_MICROBLAZE_64_TLSGD:         howto manager.      (line 2992)
-* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL:   howto manager.      (line 3012)
-* BFD_RELOC_MICROBLAZE_64_TLSLD:         howto manager.      (line 2997)
-* BFD_RELOC_MICROBLAZE_64_TLSTPREL:      howto manager.      (line 3016)
-* BFD_RELOC_MICROBLAZE_COPY:             howto manager.      (line 2985)
-* BFD_RELOC_MICROMIPS_10_PCREL_S1:       howto manager.      (line  404)
-* BFD_RELOC_MICROMIPS_16_PCREL_S1:       howto manager.      (line  405)
-* BFD_RELOC_MICROMIPS_7_PCREL_S1:        howto manager.      (line  403)
-* BFD_RELOC_MICROMIPS_CALL16:            howto manager.      (line  423)
-* BFD_RELOC_MICROMIPS_CALL_HI16:         howto manager.      (line  429)
-* BFD_RELOC_MICROMIPS_CALL_LO16:         howto manager.      (line  431)
-* BFD_RELOC_MICROMIPS_GOT16:             howto manager.      (line  421)
-* BFD_RELOC_MICROMIPS_GOT_DISP:          howto manager.      (line  439)
-* BFD_RELOC_MICROMIPS_GOT_HI16:          howto manager.      (line  425)
-* BFD_RELOC_MICROMIPS_GOT_LO16:          howto manager.      (line  427)
-* BFD_RELOC_MICROMIPS_GOT_OFST:          howto manager.      (line  437)
-* BFD_RELOC_MICROMIPS_GOT_PAGE:          howto manager.      (line  435)
-* BFD_RELOC_MICROMIPS_GPREL16:           howto manager.      (line  414)
-* BFD_RELOC_MICROMIPS_HI16:              howto manager.      (line  415)
-* BFD_RELOC_MICROMIPS_HI16_S:            howto manager.      (line  416)
-* BFD_RELOC_MICROMIPS_HIGHER:            howto manager.      (line  448)
-* BFD_RELOC_MICROMIPS_HIGHEST:           howto manager.      (line  446)
-* BFD_RELOC_MICROMIPS_JALR:              howto manager.      (line  454)
-* BFD_RELOC_MICROMIPS_JMP:               howto manager.      (line  343)
-* BFD_RELOC_MICROMIPS_LITERAL:           howto manager.      (line  400)
-* BFD_RELOC_MICROMIPS_LO16:              howto manager.      (line  417)
-* BFD_RELOC_MICROMIPS_SCN_DISP:          howto manager.      (line  450)
-* BFD_RELOC_MICROMIPS_SUB:               howto manager.      (line  433)
-* BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16:   howto manager.      (line  464)
-* BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16:   howto manager.      (line  466)
-* BFD_RELOC_MICROMIPS_TLS_GD:            howto manager.      (line  460)
-* BFD_RELOC_MICROMIPS_TLS_GOTTPREL:      howto manager.      (line  468)
-* BFD_RELOC_MICROMIPS_TLS_LDM:           howto manager.      (line  462)
-* BFD_RELOC_MICROMIPS_TLS_TPREL_HI16:    howto manager.      (line  472)
-* BFD_RELOC_MICROMIPS_TLS_TPREL_LO16:    howto manager.      (line  474)
-* BFD_RELOC_MIPS16_CALL16:               howto manager.      (line  374)
-* BFD_RELOC_MIPS16_GOT16:                howto manager.      (line  373)
-* BFD_RELOC_MIPS16_GPREL:                howto manager.      (line  349)
-* BFD_RELOC_MIPS16_HI16:                 howto manager.      (line  378)
-* BFD_RELOC_MIPS16_HI16_S:               howto manager.      (line  381)
-* BFD_RELOC_MIPS16_JMP:                  howto manager.      (line  346)
-* BFD_RELOC_MIPS16_LO16:                 howto manager.      (line  387)
-* BFD_RELOC_MIPS16_TLS_DTPREL_HI16:      howto manager.      (line  392)
-* BFD_RELOC_MIPS16_TLS_DTPREL_LO16:      howto manager.      (line  393)
-* BFD_RELOC_MIPS16_TLS_GD:               howto manager.      (line  390)
-* BFD_RELOC_MIPS16_TLS_GOTTPREL:         howto manager.      (line  394)
-* BFD_RELOC_MIPS16_TLS_LDM:              howto manager.      (line  391)
-* BFD_RELOC_MIPS16_TLS_TPREL_HI16:       howto manager.      (line  395)
-* BFD_RELOC_MIPS16_TLS_TPREL_LO16:       howto manager.      (line  396)
-* BFD_RELOC_MIPS_18_PCREL_S3:            howto manager.      (line  410)
-* BFD_RELOC_MIPS_19_PCREL_S2:            howto manager.      (line  411)
-* BFD_RELOC_MIPS_21_PCREL_S2:            howto manager.      (line  408)
-* BFD_RELOC_MIPS_26_PCREL_S2:            howto manager.      (line  409)
-* BFD_RELOC_MIPS_CALL16:                 howto manager.      (line  422)
-* BFD_RELOC_MIPS_CALL_HI16:              howto manager.      (line  428)
-* BFD_RELOC_MIPS_CALL_LO16:              howto manager.      (line  430)
-* BFD_RELOC_MIPS_COPY:                   howto manager.      (line  478)
-* BFD_RELOC_MIPS_DELETE:                 howto manager.      (line  444)
-* BFD_RELOC_MIPS_EH:                     howto manager.      (line  475)
-* BFD_RELOC_MIPS_GOT16:                  howto manager.      (line  420)
-* BFD_RELOC_MIPS_GOT_DISP:               howto manager.      (line  438)
-* BFD_RELOC_MIPS_GOT_HI16:               howto manager.      (line  424)
-* BFD_RELOC_MIPS_GOT_LO16:               howto manager.      (line  426)
-* BFD_RELOC_MIPS_GOT_OFST:               howto manager.      (line  436)
-* BFD_RELOC_MIPS_GOT_PAGE:               howto manager.      (line  434)
-* BFD_RELOC_MIPS_HIGHER:                 howto manager.      (line  447)
-* BFD_RELOC_MIPS_HIGHEST:                howto manager.      (line  445)
-* BFD_RELOC_MIPS_INSERT_A:               howto manager.      (line  442)
-* BFD_RELOC_MIPS_INSERT_B:               howto manager.      (line  443)
-* BFD_RELOC_MIPS_JALR:                   howto manager.      (line  453)
-* BFD_RELOC_MIPS_JMP:                    howto manager.      (line  342)
-* BFD_RELOC_MIPS_JUMP_SLOT:              howto manager.      (line  479)
-* BFD_RELOC_MIPS_LITERAL:                howto manager.      (line  399)
-* BFD_RELOC_MIPS_REL16:                  howto manager.      (line  451)
-* BFD_RELOC_MIPS_RELGOT:                 howto manager.      (line  452)
-* BFD_RELOC_MIPS_SCN_DISP:               howto manager.      (line  449)
-* BFD_RELOC_MIPS_SHIFT5:                 howto manager.      (line  440)
-* BFD_RELOC_MIPS_SHIFT6:                 howto manager.      (line  441)
-* BFD_RELOC_MIPS_SUB:                    howto manager.      (line  432)
-* BFD_RELOC_MIPS_TLS_DTPMOD32:           howto manager.      (line  455)
-* BFD_RELOC_MIPS_TLS_DTPMOD64:           howto manager.      (line  457)
-* BFD_RELOC_MIPS_TLS_DTPREL32:           howto manager.      (line  456)
-* BFD_RELOC_MIPS_TLS_DTPREL64:           howto manager.      (line  458)
-* BFD_RELOC_MIPS_TLS_DTPREL_HI16:        howto manager.      (line  463)
-* BFD_RELOC_MIPS_TLS_DTPREL_LO16:        howto manager.      (line  465)
-* BFD_RELOC_MIPS_TLS_GD:                 howto manager.      (line  459)
-* BFD_RELOC_MIPS_TLS_GOTTPREL:           howto manager.      (line  467)
-* BFD_RELOC_MIPS_TLS_LDM:                howto manager.      (line  461)
-* BFD_RELOC_MIPS_TLS_TPREL32:            howto manager.      (line  469)
-* BFD_RELOC_MIPS_TLS_TPREL64:            howto manager.      (line  470)
-* BFD_RELOC_MIPS_TLS_TPREL_HI16:         howto manager.      (line  471)
-* BFD_RELOC_MIPS_TLS_TPREL_LO16:         howto manager.      (line  473)
-* BFD_RELOC_MMIX_ADDR19:                 howto manager.      (line 1829)
-* BFD_RELOC_MMIX_ADDR27:                 howto manager.      (line 1833)
-* BFD_RELOC_MMIX_BASE_PLUS_OFFSET:       howto manager.      (line 1845)
-* BFD_RELOC_MMIX_CBRANCH:                howto manager.      (line 1809)
-* BFD_RELOC_MMIX_CBRANCH_1:              howto manager.      (line 1811)
-* BFD_RELOC_MMIX_CBRANCH_2:              howto manager.      (line 1812)
-* BFD_RELOC_MMIX_CBRANCH_3:              howto manager.      (line 1813)
-* BFD_RELOC_MMIX_CBRANCH_J:              howto manager.      (line 1810)
-* BFD_RELOC_MMIX_GETA:                   howto manager.      (line 1803)
-* BFD_RELOC_MMIX_GETA_1:                 howto manager.      (line 1804)
-* BFD_RELOC_MMIX_GETA_2:                 howto manager.      (line 1805)
-* BFD_RELOC_MMIX_GETA_3:                 howto manager.      (line 1806)
-* BFD_RELOC_MMIX_JMP:                    howto manager.      (line 1823)
-* BFD_RELOC_MMIX_JMP_1:                  howto manager.      (line 1824)
-* BFD_RELOC_MMIX_JMP_2:                  howto manager.      (line 1825)
-* BFD_RELOC_MMIX_JMP_3:                  howto manager.      (line 1826)
-* BFD_RELOC_MMIX_LOCAL:                  howto manager.      (line 1849)
-* BFD_RELOC_MMIX_PUSHJ:                  howto manager.      (line 1816)
-* BFD_RELOC_MMIX_PUSHJ_1:                howto manager.      (line 1817)
-* BFD_RELOC_MMIX_PUSHJ_2:                howto manager.      (line 1818)
-* BFD_RELOC_MMIX_PUSHJ_3:                howto manager.      (line 1819)
-* BFD_RELOC_MMIX_PUSHJ_STUBBABLE:        howto manager.      (line 1820)
-* BFD_RELOC_MMIX_REG:                    howto manager.      (line 1841)
-* BFD_RELOC_MMIX_REG_OR_BYTE:            howto manager.      (line 1837)
-* BFD_RELOC_MN10300_16_PCREL:            howto manager.      (line  583)
-* BFD_RELOC_MN10300_32_PCREL:            howto manager.      (line  579)
-* BFD_RELOC_MN10300_ALIGN:               howto manager.      (line  564)
-* BFD_RELOC_MN10300_COPY:                howto manager.      (line  547)
-* BFD_RELOC_MN10300_GLOB_DAT:            howto manager.      (line  550)
-* BFD_RELOC_MN10300_GOT16:               howto manager.      (line  543)
-* BFD_RELOC_MN10300_GOT24:               howto manager.      (line  539)
-* BFD_RELOC_MN10300_GOT32:               howto manager.      (line  535)
-* BFD_RELOC_MN10300_GOTOFF24:            howto manager.      (line  532)
-* BFD_RELOC_MN10300_JMP_SLOT:            howto manager.      (line  553)
-* BFD_RELOC_MN10300_RELATIVE:            howto manager.      (line  556)
-* BFD_RELOC_MN10300_SYM_DIFF:            howto manager.      (line  559)
-* BFD_RELOC_MN10300_TLS_DTPMOD:          howto manager.      (line  574)
-* BFD_RELOC_MN10300_TLS_DTPOFF:          howto manager.      (line  575)
-* BFD_RELOC_MN10300_TLS_GD:              howto manager.      (line  568)
-* BFD_RELOC_MN10300_TLS_GOTIE:           howto manager.      (line  571)
-* BFD_RELOC_MN10300_TLS_IE:              howto manager.      (line  572)
-* BFD_RELOC_MN10300_TLS_LD:              howto manager.      (line  569)
-* BFD_RELOC_MN10300_TLS_LDO:             howto manager.      (line  570)
-* BFD_RELOC_MN10300_TLS_LE:              howto manager.      (line  573)
-* BFD_RELOC_MN10300_TLS_TPOFF:           howto manager.      (line  576)
-* BFD_RELOC_MOXIE_10_PCREL:              howto manager.      (line  482)
-* BFD_RELOC_MSP430_10_PCREL:             howto manager.      (line 2706)
-* BFD_RELOC_MSP430_16:                   howto manager.      (line 2708)
-* BFD_RELOC_MSP430_16_BYTE:              howto manager.      (line 2710)
-* BFD_RELOC_MSP430_16_PCREL:             howto manager.      (line 2707)
-* BFD_RELOC_MSP430_16_PCREL_BYTE:        howto manager.      (line 2709)
-* BFD_RELOC_MSP430_2X_PCREL:             howto manager.      (line 2711)
-* BFD_RELOC_MSP430_ABS8:                 howto manager.      (line 2713)
-* BFD_RELOC_MSP430_ABS_HI16:             howto manager.      (line 2725)
-* BFD_RELOC_MSP430_PREL31:               howto manager.      (line 2726)
-* BFD_RELOC_MSP430_RL_PCREL:             howto manager.      (line 2712)
-* BFD_RELOC_MSP430_SYM_DIFF:             howto manager.      (line 2727)
-* BFD_RELOC_MSP430X_ABS16:               howto manager.      (line 2724)
-* BFD_RELOC_MSP430X_ABS20_ADR_DST:       howto manager.      (line 2721)
-* BFD_RELOC_MSP430X_ABS20_ADR_SRC:       howto manager.      (line 2720)
-* BFD_RELOC_MSP430X_ABS20_EXT_DST:       howto manager.      (line 2718)
-* BFD_RELOC_MSP430X_ABS20_EXT_ODST:      howto manager.      (line 2719)
-* BFD_RELOC_MSP430X_ABS20_EXT_SRC:       howto manager.      (line 2717)
-* BFD_RELOC_MSP430X_PCR16:               howto manager.      (line 2722)
-* BFD_RELOC_MSP430X_PCR20_CALL:          howto manager.      (line 2723)
-* BFD_RELOC_MSP430X_PCR20_EXT_DST:       howto manager.      (line 2715)
-* BFD_RELOC_MSP430X_PCR20_EXT_ODST:      howto manager.      (line 2716)
-* BFD_RELOC_MSP430X_PCR20_EXT_SRC:       howto manager.      (line 2714)
-* BFD_RELOC_MT_GNU_VTENTRY:              howto manager.      (line 2700)
-* BFD_RELOC_MT_GNU_VTINHERIT:            howto manager.      (line 2697)
-* BFD_RELOC_MT_HI16:                     howto manager.      (line 2691)
-* BFD_RELOC_MT_LO16:                     howto manager.      (line 2694)
-* BFD_RELOC_MT_PC16:                     howto manager.      (line 2688)
-* BFD_RELOC_MT_PCINSN8:                  howto manager.      (line 2703)
-* BFD_RELOC_NDS32_10_UPCREL:             howto manager.      (line 1458)
-* BFD_RELOC_NDS32_10IFCU_PCREL:          howto manager.      (line 1491)
-* BFD_RELOC_NDS32_15_FIXED:              howto manager.      (line 1412)
-* BFD_RELOC_NDS32_15_PCREL:              howto manager.      (line 1320)
-* BFD_RELOC_NDS32_17_FIXED:              howto manager.      (line 1413)
-* BFD_RELOC_NDS32_17_PCREL:              howto manager.      (line 1323)
-* BFD_RELOC_NDS32_17IFC_PCREL:           howto manager.      (line 1490)
-* BFD_RELOC_NDS32_20:                    howto manager.      (line 1309)
-* BFD_RELOC_NDS32_25_ABS:                howto manager.      (line 1485)
-* BFD_RELOC_NDS32_25_FIXED:              howto manager.      (line 1414)
-* BFD_RELOC_NDS32_25_PCREL:              howto manager.      (line 1326)
-* BFD_RELOC_NDS32_25_PLTREL:             howto manager.      (line 1387)
-* BFD_RELOC_NDS32_5:                     howto manager.      (line 1455)
-* BFD_RELOC_NDS32_9_FIXED:               howto manager.      (line 1411)
-* BFD_RELOC_NDS32_9_PCREL:               howto manager.      (line 1312)
-* BFD_RELOC_NDS32_9_PLTREL:              howto manager.      (line 1386)
-* BFD_RELOC_NDS32_COPY:                  howto manager.      (line 1388)
-* BFD_RELOC_NDS32_DATA:                  howto manager.      (line 1488)
-* BFD_RELOC_NDS32_DIFF16:                howto manager.      (line 1479)
-* BFD_RELOC_NDS32_DIFF32:                howto manager.      (line 1480)
-* BFD_RELOC_NDS32_DIFF8:                 howto manager.      (line 1478)
-* BFD_RELOC_NDS32_DIFF_ULEB128:          howto manager.      (line 1481)
-* BFD_RELOC_NDS32_DWARF2_LEB:            howto manager.      (line 1438)
-* BFD_RELOC_NDS32_DWARF2_OP1:            howto manager.      (line 1436)
-* BFD_RELOC_NDS32_DWARF2_OP2:            howto manager.      (line 1437)
-* BFD_RELOC_NDS32_EMPTY:                 howto manager.      (line 1482)
-* BFD_RELOC_NDS32_GLOB_DAT:              howto manager.      (line 1389)
-* BFD_RELOC_NDS32_GOT15S2:               howto manager.      (line 1451)
-* BFD_RELOC_NDS32_GOT17S2:               howto manager.      (line 1452)
-* BFD_RELOC_NDS32_GOT20:                 howto manager.      (line 1385)
-* BFD_RELOC_NDS32_GOT_HI20:              howto manager.      (line 1396)
-* BFD_RELOC_NDS32_GOT_LO12:              howto manager.      (line 1397)
-* BFD_RELOC_NDS32_GOT_LO15:              howto manager.      (line 1447)
-* BFD_RELOC_NDS32_GOT_LO19:              howto manager.      (line 1448)
-* BFD_RELOC_NDS32_GOT_SUFF:              howto manager.      (line 1466)
-* BFD_RELOC_NDS32_GOTOFF:                howto manager.      (line 1392)
-* BFD_RELOC_NDS32_GOTOFF_HI20:           howto manager.      (line 1393)
-* BFD_RELOC_NDS32_GOTOFF_LO12:           howto manager.      (line 1394)
-* BFD_RELOC_NDS32_GOTOFF_LO15:           howto manager.      (line 1449)
-* BFD_RELOC_NDS32_GOTOFF_LO19:           howto manager.      (line 1450)
-* BFD_RELOC_NDS32_GOTOFF_SUFF:           howto manager.      (line 1467)
-* BFD_RELOC_NDS32_GOTPC20:               howto manager.      (line 1395)
-* BFD_RELOC_NDS32_GOTPC_HI20:            howto manager.      (line 1398)
-* BFD_RELOC_NDS32_GOTPC_LO12:            howto manager.      (line 1399)
-* BFD_RELOC_NDS32_GOTTPOFF:              howto manager.      (line 1499)
-* BFD_RELOC_NDS32_HI20:                  howto manager.      (line 1329)
-* BFD_RELOC_NDS32_INSN16:                howto manager.      (line 1402)
-* BFD_RELOC_NDS32_JMP_SLOT:              howto manager.      (line 1390)
-* BFD_RELOC_NDS32_LABEL:                 howto manager.      (line 1403)
-* BFD_RELOC_NDS32_LO12S0:                howto manager.      (line 1345)
-* BFD_RELOC_NDS32_LO12S0_ORI:            howto manager.      (line 1349)
-* BFD_RELOC_NDS32_LO12S1:                howto manager.      (line 1341)
-* BFD_RELOC_NDS32_LO12S2:                howto manager.      (line 1337)
-* BFD_RELOC_NDS32_LO12S2_DP:             howto manager.      (line 1432)
-* BFD_RELOC_NDS32_LO12S2_SP:             howto manager.      (line 1433)
-* BFD_RELOC_NDS32_LO12S3:                howto manager.      (line 1333)
-* BFD_RELOC_NDS32_LOADSTORE:             howto manager.      (line 1410)
-* BFD_RELOC_NDS32_LONGCALL1:             howto manager.      (line 1404)
-* BFD_RELOC_NDS32_LONGCALL2:             howto manager.      (line 1405)
-* BFD_RELOC_NDS32_LONGCALL3:             howto manager.      (line 1406)
-* BFD_RELOC_NDS32_LONGCALL4:             howto manager.      (line 1415)
-* BFD_RELOC_NDS32_LONGCALL5:             howto manager.      (line 1416)
-* BFD_RELOC_NDS32_LONGCALL6:             howto manager.      (line 1417)
-* BFD_RELOC_NDS32_LONGJUMP1:             howto manager.      (line 1407)
-* BFD_RELOC_NDS32_LONGJUMP2:             howto manager.      (line 1408)
-* BFD_RELOC_NDS32_LONGJUMP3:             howto manager.      (line 1409)
-* BFD_RELOC_NDS32_LONGJUMP4:             howto manager.      (line 1418)
-* BFD_RELOC_NDS32_LONGJUMP5:             howto manager.      (line 1419)
-* BFD_RELOC_NDS32_LONGJUMP6:             howto manager.      (line 1420)
-* BFD_RELOC_NDS32_LONGJUMP7:             howto manager.      (line 1421)
-* BFD_RELOC_NDS32_MINUEND:               howto manager.      (line 1476)
-* BFD_RELOC_NDS32_MULCALL_SUFF:          howto manager.      (line 1469)
-* BFD_RELOC_NDS32_PLT_GOT_SUFF:          howto manager.      (line 1468)
-* BFD_RELOC_NDS32_PLT_GOTREL_HI20:       howto manager.      (line 1426)
-* BFD_RELOC_NDS32_PLT_GOTREL_LO12:       howto manager.      (line 1427)
-* BFD_RELOC_NDS32_PLT_GOTREL_LO15:       howto manager.      (line 1445)
-* BFD_RELOC_NDS32_PLT_GOTREL_LO19:       howto manager.      (line 1446)
-* BFD_RELOC_NDS32_PLT_GOTREL_LO20:       howto manager.      (line 1444)
-* BFD_RELOC_NDS32_PLTBLOCK:              howto manager.      (line 1473)
-* BFD_RELOC_NDS32_PLTREL_HI20:           howto manager.      (line 1424)
-* BFD_RELOC_NDS32_PLTREL_LO12:           howto manager.      (line 1425)
-* BFD_RELOC_NDS32_PTR:                   howto manager.      (line 1470)
-* BFD_RELOC_NDS32_PTR_COUNT:             howto manager.      (line 1471)
-* BFD_RELOC_NDS32_PTR_RESOLVED:          howto manager.      (line 1472)
-* BFD_RELOC_NDS32_RELATIVE:              howto manager.      (line 1391)
-* BFD_RELOC_NDS32_RELAX_ENTRY:           howto manager.      (line 1465)
-* BFD_RELOC_NDS32_RELAX_REGION_BEGIN:    howto manager.      (line 1474)
-* BFD_RELOC_NDS32_RELAX_REGION_END:      howto manager.      (line 1475)
-* BFD_RELOC_NDS32_SDA12S2_DP:            howto manager.      (line 1430)
-* BFD_RELOC_NDS32_SDA12S2_SP:            howto manager.      (line 1431)
-* BFD_RELOC_NDS32_SDA15S0:               howto manager.      (line 1365)
-* BFD_RELOC_NDS32_SDA15S1:               howto manager.      (line 1361)
-* BFD_RELOC_NDS32_SDA15S2:               howto manager.      (line 1357)
-* BFD_RELOC_NDS32_SDA15S3:               howto manager.      (line 1353)
-* BFD_RELOC_NDS32_SDA16S3:               howto manager.      (line 1369)
-* BFD_RELOC_NDS32_SDA17S2:               howto manager.      (line 1373)
-* BFD_RELOC_NDS32_SDA18S1:               howto manager.      (line 1377)
-* BFD_RELOC_NDS32_SDA19S0:               howto manager.      (line 1381)
-* BFD_RELOC_NDS32_SDA_FP7U2_RELA:        howto manager.      (line 1462)
-* BFD_RELOC_NDS32_SUBTRAHEND:            howto manager.      (line 1477)
-* BFD_RELOC_NDS32_TLS_IE_HI20:           howto manager.      (line 1500)
-* BFD_RELOC_NDS32_TLS_IE_LO12S2:         howto manager.      (line 1501)
-* BFD_RELOC_NDS32_TLS_LE_15S0:           howto manager.      (line 1504)
-* BFD_RELOC_NDS32_TLS_LE_15S1:           howto manager.      (line 1505)
-* BFD_RELOC_NDS32_TLS_LE_15S2:           howto manager.      (line 1506)
-* BFD_RELOC_NDS32_TLS_LE_20:             howto manager.      (line 1503)
-* BFD_RELOC_NDS32_TLS_LE_ADD:            howto manager.      (line 1497)
-* BFD_RELOC_NDS32_TLS_LE_HI20:           howto manager.      (line 1495)
-* BFD_RELOC_NDS32_TLS_LE_LO12:           howto manager.      (line 1496)
-* BFD_RELOC_NDS32_TLS_LE_LS:             howto manager.      (line 1498)
-* BFD_RELOC_NDS32_TLS_TPOFF:             howto manager.      (line 1502)
-* BFD_RELOC_NDS32_TPOFF:                 howto manager.      (line 1494)
-* BFD_RELOC_NDS32_TRAN:                  howto manager.      (line 1489)
-* BFD_RELOC_NDS32_UPDATE_TA:             howto manager.      (line 1441)
-* BFD_RELOC_NDS32_WORD_9_PCREL:          howto manager.      (line 1316)
-* BFD_RELOC_NIOS2_ALIGN:                 howto manager.      (line 2744)
-* BFD_RELOC_NIOS2_CACHE_OPX:             howto manager.      (line 2734)
-* BFD_RELOC_NIOS2_CALL16:                howto manager.      (line 2746)
-* BFD_RELOC_NIOS2_CALL26:                howto manager.      (line 2732)
-* BFD_RELOC_NIOS2_CALL26_NOAT:           howto manager.      (line 2764)
-* BFD_RELOC_NIOS2_CALL_HA:               howto manager.      (line 2768)
-* BFD_RELOC_NIOS2_CALL_LO:               howto manager.      (line 2767)
-* BFD_RELOC_NIOS2_CALLR:                 howto manager.      (line 2743)
-* BFD_RELOC_NIOS2_CJMP:                  howto manager.      (line 2742)
-* BFD_RELOC_NIOS2_COPY:                  howto manager.      (line 2759)
-* BFD_RELOC_NIOS2_GLOB_DAT:              howto manager.      (line 2760)
-* BFD_RELOC_NIOS2_GOT16:                 howto manager.      (line 2745)
-* BFD_RELOC_NIOS2_GOT_HA:                howto manager.      (line 2766)
-* BFD_RELOC_NIOS2_GOT_LO:                howto manager.      (line 2765)
-* BFD_RELOC_NIOS2_GOTOFF:                howto manager.      (line 2763)
-* BFD_RELOC_NIOS2_GOTOFF_HA:             howto manager.      (line 2748)
-* BFD_RELOC_NIOS2_GOTOFF_LO:             howto manager.      (line 2747)
-* BFD_RELOC_NIOS2_GPREL:                 howto manager.      (line 2740)
-* BFD_RELOC_NIOS2_HI16:                  howto manager.      (line 2737)
-* BFD_RELOC_NIOS2_HIADJ16:               howto manager.      (line 2739)
-* BFD_RELOC_NIOS2_IMM5:                  howto manager.      (line 2733)
-* BFD_RELOC_NIOS2_IMM6:                  howto manager.      (line 2735)
-* BFD_RELOC_NIOS2_IMM8:                  howto manager.      (line 2736)
-* BFD_RELOC_NIOS2_JUMP_SLOT:             howto manager.      (line 2761)
-* BFD_RELOC_NIOS2_LO16:                  howto manager.      (line 2738)
-* BFD_RELOC_NIOS2_PCREL_HA:              howto manager.      (line 2750)
-* BFD_RELOC_NIOS2_PCREL_LO:              howto manager.      (line 2749)
-* BFD_RELOC_NIOS2_R2_F1I5_2:             howto manager.      (line 2778)
-* BFD_RELOC_NIOS2_R2_I10_1_PCREL:        howto manager.      (line 2770)
-* BFD_RELOC_NIOS2_R2_L5I4X1:             howto manager.      (line 2779)
-* BFD_RELOC_NIOS2_R2_S12:                howto manager.      (line 2769)
-* BFD_RELOC_NIOS2_R2_T1I7_1_PCREL:       howto manager.      (line 2771)
-* BFD_RELOC_NIOS2_R2_T1I7_2:             howto manager.      (line 2772)
-* BFD_RELOC_NIOS2_R2_T1X1I6:             howto manager.      (line 2780)
-* BFD_RELOC_NIOS2_R2_T1X1I6_2:           howto manager.      (line 2781)
-* BFD_RELOC_NIOS2_R2_T2I4:               howto manager.      (line 2773)
-* BFD_RELOC_NIOS2_R2_T2I4_1:             howto manager.      (line 2774)
-* BFD_RELOC_NIOS2_R2_T2I4_2:             howto manager.      (line 2775)
-* BFD_RELOC_NIOS2_R2_X1I7_2:             howto manager.      (line 2776)
-* BFD_RELOC_NIOS2_R2_X2L5:               howto manager.      (line 2777)
-* BFD_RELOC_NIOS2_RELATIVE:              howto manager.      (line 2762)
-* BFD_RELOC_NIOS2_S16:                   howto manager.      (line 2730)
-* BFD_RELOC_NIOS2_TLS_DTPMOD:            howto manager.      (line 2756)
-* BFD_RELOC_NIOS2_TLS_DTPREL:            howto manager.      (line 2757)
-* BFD_RELOC_NIOS2_TLS_GD16:              howto manager.      (line 2751)
-* BFD_RELOC_NIOS2_TLS_IE16:              howto manager.      (line 2754)
-* BFD_RELOC_NIOS2_TLS_LDM16:             howto manager.      (line 2752)
-* BFD_RELOC_NIOS2_TLS_LDO16:             howto manager.      (line 2753)
-* BFD_RELOC_NIOS2_TLS_LE16:              howto manager.      (line 2755)
-* BFD_RELOC_NIOS2_TLS_TPREL:             howto manager.      (line 2758)
-* BFD_RELOC_NIOS2_U16:                   howto manager.      (line 2731)
-* BFD_RELOC_NIOS2_UJMP:                  howto manager.      (line 2741)
-* BFD_RELOC_NONE:                        howto manager.      (line  135)
-* BFD_RELOC_NS32K_DISP_16:               howto manager.      (line  651)
-* BFD_RELOC_NS32K_DISP_16_PCREL:         howto manager.      (line  654)
-* BFD_RELOC_NS32K_DISP_32:               howto manager.      (line  652)
-* BFD_RELOC_NS32K_DISP_32_PCREL:         howto manager.      (line  655)
-* BFD_RELOC_NS32K_DISP_8:                howto manager.      (line  650)
-* BFD_RELOC_NS32K_DISP_8_PCREL:          howto manager.      (line  653)
-* BFD_RELOC_NS32K_IMM_16:                howto manager.      (line  645)
-* BFD_RELOC_NS32K_IMM_16_PCREL:          howto manager.      (line  648)
-* BFD_RELOC_NS32K_IMM_32:                howto manager.      (line  646)
-* BFD_RELOC_NS32K_IMM_32_PCREL:          howto manager.      (line  649)
-* BFD_RELOC_NS32K_IMM_8:                 howto manager.      (line  644)
-* BFD_RELOC_NS32K_IMM_8_PCREL:           howto manager.      (line  647)
-* BFD_RELOC_OR1K_COPY:                   howto manager.      (line 2641)
-* BFD_RELOC_OR1K_GLOB_DAT:               howto manager.      (line 2642)
-* BFD_RELOC_OR1K_GOT16:                  howto manager.      (line 2637)
-* BFD_RELOC_OR1K_GOTOFF_HI16:            howto manager.      (line 2639)
-* BFD_RELOC_OR1K_GOTOFF_LO16:            howto manager.      (line 2640)
-* BFD_RELOC_OR1K_GOTPC_HI16:             howto manager.      (line 2635)
-* BFD_RELOC_OR1K_GOTPC_LO16:             howto manager.      (line 2636)
-* BFD_RELOC_OR1K_JMP_SLOT:               howto manager.      (line 2643)
-* BFD_RELOC_OR1K_PLT26:                  howto manager.      (line 2638)
-* BFD_RELOC_OR1K_REL_26:                 howto manager.      (line 2634)
-* BFD_RELOC_OR1K_RELATIVE:               howto manager.      (line 2644)
-* BFD_RELOC_OR1K_TLS_DTPMOD:             howto manager.      (line 2657)
-* BFD_RELOC_OR1K_TLS_DTPOFF:             howto manager.      (line 2656)
-* BFD_RELOC_OR1K_TLS_GD_HI16:            howto manager.      (line 2645)
-* BFD_RELOC_OR1K_TLS_GD_LO16:            howto manager.      (line 2646)
-* BFD_RELOC_OR1K_TLS_IE_HI16:            howto manager.      (line 2651)
-* BFD_RELOC_OR1K_TLS_IE_LO16:            howto manager.      (line 2652)
-* BFD_RELOC_OR1K_TLS_LDM_HI16:           howto manager.      (line 2647)
-* BFD_RELOC_OR1K_TLS_LDM_LO16:           howto manager.      (line 2648)
-* BFD_RELOC_OR1K_TLS_LDO_HI16:           howto manager.      (line 2649)
-* BFD_RELOC_OR1K_TLS_LDO_LO16:           howto manager.      (line 2650)
-* BFD_RELOC_OR1K_TLS_LE_HI16:            howto manager.      (line 2653)
-* BFD_RELOC_OR1K_TLS_LE_LO16:            howto manager.      (line 2654)
-* BFD_RELOC_OR1K_TLS_TPOFF:              howto manager.      (line 2655)
-* BFD_RELOC_PDP11_DISP_6_PCREL:          howto manager.      (line  659)
-* BFD_RELOC_PDP11_DISP_8_PCREL:          howto manager.      (line  658)
-* BFD_RELOC_PJ_CODE_DIR16:               howto manager.      (line  664)
-* BFD_RELOC_PJ_CODE_DIR32:               howto manager.      (line  665)
-* BFD_RELOC_PJ_CODE_HI16:                howto manager.      (line  662)
-* BFD_RELOC_PJ_CODE_LO16:                howto manager.      (line  663)
-* BFD_RELOC_PJ_CODE_REL16:               howto manager.      (line  666)
-* BFD_RELOC_PJ_CODE_REL32:               howto manager.      (line  667)
-* BFD_RELOC_PPC64_ADDR16_DS:             howto manager.      (line  729)
-* BFD_RELOC_PPC64_ADDR16_HIGH:           howto manager.      (line  740)
-* BFD_RELOC_PPC64_ADDR16_HIGHA:          howto manager.      (line  741)
-* BFD_RELOC_PPC64_ADDR16_LO_DS:          howto manager.      (line  730)
-* BFD_RELOC_PPC64_ADDR64_LOCAL:          howto manager.      (line  742)
-* BFD_RELOC_PPC64_DTPREL16_DS:           howto manager.      (line  781)
-* BFD_RELOC_PPC64_DTPREL16_HIGH:         howto manager.      (line  789)
-* BFD_RELOC_PPC64_DTPREL16_HIGHA:        howto manager.      (line  790)
-* BFD_RELOC_PPC64_DTPREL16_HIGHER:       howto manager.      (line  783)
-* BFD_RELOC_PPC64_DTPREL16_HIGHERA:      howto manager.      (line  784)
-* BFD_RELOC_PPC64_DTPREL16_HIGHEST:      howto manager.      (line  785)
-* BFD_RELOC_PPC64_DTPREL16_HIGHESTA:     howto manager.      (line  786)
-* BFD_RELOC_PPC64_DTPREL16_LO_DS:        howto manager.      (line  782)
-* BFD_RELOC_PPC64_GOT16_DS:              howto manager.      (line  731)
-* BFD_RELOC_PPC64_GOT16_LO_DS:           howto manager.      (line  732)
-* BFD_RELOC_PPC64_HIGHER:                howto manager.      (line  717)
-* BFD_RELOC_PPC64_HIGHER_S:              howto manager.      (line  718)
-* BFD_RELOC_PPC64_HIGHEST:               howto manager.      (line  719)
-* BFD_RELOC_PPC64_HIGHEST_S:             howto manager.      (line  720)
-* BFD_RELOC_PPC64_PLT16_LO_DS:           howto manager.      (line  733)
-* BFD_RELOC_PPC64_PLTGOT16:              howto manager.      (line  725)
-* BFD_RELOC_PPC64_PLTGOT16_DS:           howto manager.      (line  738)
-* BFD_RELOC_PPC64_PLTGOT16_HA:           howto manager.      (line  728)
-* BFD_RELOC_PPC64_PLTGOT16_HI:           howto manager.      (line  727)
-* BFD_RELOC_PPC64_PLTGOT16_LO:           howto manager.      (line  726)
-* BFD_RELOC_PPC64_PLTGOT16_LO_DS:        howto manager.      (line  739)
-* BFD_RELOC_PPC64_SECTOFF_DS:            howto manager.      (line  734)
-* BFD_RELOC_PPC64_SECTOFF_LO_DS:         howto manager.      (line  735)
-* BFD_RELOC_PPC64_TOC:                   howto manager.      (line  724)
-* BFD_RELOC_PPC64_TOC16_DS:              howto manager.      (line  736)
-* BFD_RELOC_PPC64_TOC16_HA:              howto manager.      (line  723)
-* BFD_RELOC_PPC64_TOC16_HI:              howto manager.      (line  722)
-* BFD_RELOC_PPC64_TOC16_LO:              howto manager.      (line  721)
-* BFD_RELOC_PPC64_TOC16_LO_DS:           howto manager.      (line  737)
-* BFD_RELOC_PPC64_TPREL16_DS:            howto manager.      (line  775)
-* BFD_RELOC_PPC64_TPREL16_HIGH:          howto manager.      (line  787)
-* BFD_RELOC_PPC64_TPREL16_HIGHA:         howto manager.      (line  788)
-* BFD_RELOC_PPC64_TPREL16_HIGHER:        howto manager.      (line  777)
-* BFD_RELOC_PPC64_TPREL16_HIGHERA:       howto manager.      (line  778)
-* BFD_RELOC_PPC64_TPREL16_HIGHEST:       howto manager.      (line  779)
-* BFD_RELOC_PPC64_TPREL16_HIGHESTA:      howto manager.      (line  780)
-* BFD_RELOC_PPC64_TPREL16_LO_DS:         howto manager.      (line  776)
-* BFD_RELOC_PPC_B16:                     howto manager.      (line  673)
-* BFD_RELOC_PPC_B16_BRNTAKEN:            howto manager.      (line  675)
-* BFD_RELOC_PPC_B16_BRTAKEN:             howto manager.      (line  674)
-* BFD_RELOC_PPC_B26:                     howto manager.      (line  670)
-* BFD_RELOC_PPC_BA16:                    howto manager.      (line  676)
-* BFD_RELOC_PPC_BA16_BRNTAKEN:           howto manager.      (line  678)
-* BFD_RELOC_PPC_BA16_BRTAKEN:            howto manager.      (line  677)
-* BFD_RELOC_PPC_BA26:                    howto manager.      (line  671)
-* BFD_RELOC_PPC_COPY:                    howto manager.      (line  679)
-* BFD_RELOC_PPC_DTPMOD:                  howto manager.      (line  748)
-* BFD_RELOC_PPC_DTPREL:                  howto manager.      (line  758)
-* BFD_RELOC_PPC_DTPREL16:                howto manager.      (line  754)
-* BFD_RELOC_PPC_DTPREL16_HA:             howto manager.      (line  757)
-* BFD_RELOC_PPC_DTPREL16_HI:             howto manager.      (line  756)
-* BFD_RELOC_PPC_DTPREL16_LO:             howto manager.      (line  755)
-* BFD_RELOC_PPC_EMB_BIT_FLD:             howto manager.      (line  698)
-* BFD_RELOC_PPC_EMB_MRKREF:              howto manager.      (line  693)
-* BFD_RELOC_PPC_EMB_NADDR16:             howto manager.      (line  685)
-* BFD_RELOC_PPC_EMB_NADDR16_HA:          howto manager.      (line  688)
-* BFD_RELOC_PPC_EMB_NADDR16_HI:          howto manager.      (line  687)
-* BFD_RELOC_PPC_EMB_NADDR16_LO:          howto manager.      (line  686)
-* BFD_RELOC_PPC_EMB_NADDR32:             howto manager.      (line  684)
-* BFD_RELOC_PPC_EMB_RELSDA:              howto manager.      (line  699)
-* BFD_RELOC_PPC_EMB_RELSEC16:            howto manager.      (line  694)
-* BFD_RELOC_PPC_EMB_RELST_HA:            howto manager.      (line  697)
-* BFD_RELOC_PPC_EMB_RELST_HI:            howto manager.      (line  696)
-* BFD_RELOC_PPC_EMB_RELST_LO:            howto manager.      (line  695)
-* BFD_RELOC_PPC_EMB_SDA21:               howto manager.      (line  692)
-* BFD_RELOC_PPC_EMB_SDA2I16:             howto manager.      (line  690)
-* BFD_RELOC_PPC_EMB_SDA2REL:             howto manager.      (line  691)
-* BFD_RELOC_PPC_EMB_SDAI16:              howto manager.      (line  689)
-* BFD_RELOC_PPC_GLOB_DAT:                howto manager.      (line  680)
-* BFD_RELOC_PPC_GOT_DTPREL16:            howto manager.      (line  771)
-* BFD_RELOC_PPC_GOT_DTPREL16_HA:         howto manager.      (line  774)
-* BFD_RELOC_PPC_GOT_DTPREL16_HI:         howto manager.      (line  773)
-* BFD_RELOC_PPC_GOT_DTPREL16_LO:         howto manager.      (line  772)
-* BFD_RELOC_PPC_GOT_TLSGD16:             howto manager.      (line  759)
-* BFD_RELOC_PPC_GOT_TLSGD16_HA:          howto manager.      (line  762)
-* BFD_RELOC_PPC_GOT_TLSGD16_HI:          howto manager.      (line  761)
-* BFD_RELOC_PPC_GOT_TLSGD16_LO:          howto manager.      (line  760)
-* BFD_RELOC_PPC_GOT_TLSLD16:             howto manager.      (line  763)
-* BFD_RELOC_PPC_GOT_TLSLD16_HA:          howto manager.      (line  766)
-* BFD_RELOC_PPC_GOT_TLSLD16_HI:          howto manager.      (line  765)
-* BFD_RELOC_PPC_GOT_TLSLD16_LO:          howto manager.      (line  764)
-* BFD_RELOC_PPC_GOT_TPREL16:             howto manager.      (line  767)
-* BFD_RELOC_PPC_GOT_TPREL16_HA:          howto manager.      (line  770)
-* BFD_RELOC_PPC_GOT_TPREL16_HI:          howto manager.      (line  769)
-* BFD_RELOC_PPC_GOT_TPREL16_LO:          howto manager.      (line  768)
-* BFD_RELOC_PPC_JMP_SLOT:                howto manager.      (line  681)
-* BFD_RELOC_PPC_LOCAL24PC:               howto manager.      (line  683)
-* BFD_RELOC_PPC_RELATIVE:                howto manager.      (line  682)
-* BFD_RELOC_PPC_TLS:                     howto manager.      (line  745)
-* BFD_RELOC_PPC_TLSGD:                   howto manager.      (line  746)
-* BFD_RELOC_PPC_TLSLD:                   howto manager.      (line  747)
-* BFD_RELOC_PPC_TOC16:                   howto manager.      (line  672)
-* BFD_RELOC_PPC_TPREL:                   howto manager.      (line  753)
-* BFD_RELOC_PPC_TPREL16:                 howto manager.      (line  749)
-* BFD_RELOC_PPC_TPREL16_HA:              howto manager.      (line  752)
-* BFD_RELOC_PPC_TPREL16_HI:              howto manager.      (line  751)
-* BFD_RELOC_PPC_TPREL16_LO:              howto manager.      (line  750)
-* BFD_RELOC_PPC_VLE_HA16A:               howto manager.      (line  707)
-* BFD_RELOC_PPC_VLE_HA16D:               howto manager.      (line  708)
-* BFD_RELOC_PPC_VLE_HI16A:               howto manager.      (line  705)
-* BFD_RELOC_PPC_VLE_HI16D:               howto manager.      (line  706)
-* BFD_RELOC_PPC_VLE_LO16A:               howto manager.      (line  703)
-* BFD_RELOC_PPC_VLE_LO16D:               howto manager.      (line  704)
-* BFD_RELOC_PPC_VLE_REL15:               howto manager.      (line  701)
-* BFD_RELOC_PPC_VLE_REL24:               howto manager.      (line  702)
-* BFD_RELOC_PPC_VLE_REL8:                howto manager.      (line  700)
-* BFD_RELOC_PPC_VLE_SDA21:               howto manager.      (line  709)
-* BFD_RELOC_PPC_VLE_SDA21_LO:            howto manager.      (line  710)
-* BFD_RELOC_PPC_VLE_SDAREL_HA16A:        howto manager.      (line  715)
-* BFD_RELOC_PPC_VLE_SDAREL_HA16D:        howto manager.      (line  716)
-* BFD_RELOC_PPC_VLE_SDAREL_HI16A:        howto manager.      (line  713)
-* BFD_RELOC_PPC_VLE_SDAREL_HI16D:        howto manager.      (line  714)
-* BFD_RELOC_PPC_VLE_SDAREL_LO16A:        howto manager.      (line  711)
-* BFD_RELOC_PPC_VLE_SDAREL_LO16D:        howto manager.      (line  712)
-* BFD_RELOC_RELC:                        howto manager.      (line 2674)
-* BFD_RELOC_RL78_16_OP:                  howto manager.      (line 1994)
-* BFD_RELOC_RL78_16U:                    howto manager.      (line 1998)
-* BFD_RELOC_RL78_24_OP:                  howto manager.      (line 1995)
-* BFD_RELOC_RL78_24U:                    howto manager.      (line 1999)
-* BFD_RELOC_RL78_32_OP:                  howto manager.      (line 1996)
-* BFD_RELOC_RL78_8U:                     howto manager.      (line 1997)
-* BFD_RELOC_RL78_ABS16:                  howto manager.      (line 2011)
-* BFD_RELOC_RL78_ABS16_REV:              howto manager.      (line 2012)
-* BFD_RELOC_RL78_ABS16U:                 howto manager.      (line 2015)
-* BFD_RELOC_RL78_ABS16UL:                howto manager.      (line 2017)
-* BFD_RELOC_RL78_ABS16UW:                howto manager.      (line 2016)
-* BFD_RELOC_RL78_ABS32:                  howto manager.      (line 2013)
-* BFD_RELOC_RL78_ABS32_REV:              howto manager.      (line 2014)
-* BFD_RELOC_RL78_ABS8:                   howto manager.      (line 2010)
-* BFD_RELOC_RL78_CODE:                   howto manager.      (line 2022)
-* BFD_RELOC_RL78_DIFF:                   howto manager.      (line 2001)
-* BFD_RELOC_RL78_DIR3U_PCREL:            howto manager.      (line 2000)
-* BFD_RELOC_RL78_GPRELB:                 howto manager.      (line 2002)
-* BFD_RELOC_RL78_GPRELL:                 howto manager.      (line 2004)
-* BFD_RELOC_RL78_GPRELW:                 howto manager.      (line 2003)
-* BFD_RELOC_RL78_HI16:                   howto manager.      (line 2019)
-* BFD_RELOC_RL78_HI8:                    howto manager.      (line 2020)
-* BFD_RELOC_RL78_LO16:                   howto manager.      (line 2021)
-* BFD_RELOC_RL78_NEG16:                  howto manager.      (line 1991)
-* BFD_RELOC_RL78_NEG24:                  howto manager.      (line 1992)
-* BFD_RELOC_RL78_NEG32:                  howto manager.      (line 1993)
-* BFD_RELOC_RL78_NEG8:                   howto manager.      (line 1990)
-* BFD_RELOC_RL78_OP_AND:                 howto manager.      (line 2008)
-* BFD_RELOC_RL78_OP_NEG:                 howto manager.      (line 2007)
-* BFD_RELOC_RL78_OP_SHRA:                howto manager.      (line 2009)
-* BFD_RELOC_RL78_OP_SUBTRACT:            howto manager.      (line 2006)
-* BFD_RELOC_RL78_RELAX:                  howto manager.      (line 2018)
-* BFD_RELOC_RL78_SADDR:                  howto manager.      (line 2023)
-* BFD_RELOC_RL78_SYM:                    howto manager.      (line 2005)
-* BFD_RELOC_RVA:                         howto manager.      (line  104)
-* BFD_RELOC_RX_16_OP:                    howto manager.      (line 2030)
-* BFD_RELOC_RX_16U:                      howto manager.      (line 2034)
-* BFD_RELOC_RX_24_OP:                    howto manager.      (line 2031)
-* BFD_RELOC_RX_24U:                      howto manager.      (line 2035)
-* BFD_RELOC_RX_32_OP:                    howto manager.      (line 2032)
-* BFD_RELOC_RX_8U:                       howto manager.      (line 2033)
-* BFD_RELOC_RX_ABS16:                    howto manager.      (line 2045)
-* BFD_RELOC_RX_ABS16_REV:                howto manager.      (line 2046)
-* BFD_RELOC_RX_ABS16U:                   howto manager.      (line 2049)
-* BFD_RELOC_RX_ABS16UL:                  howto manager.      (line 2051)
-* BFD_RELOC_RX_ABS16UW:                  howto manager.      (line 2050)
-* BFD_RELOC_RX_ABS32:                    howto manager.      (line 2047)
-* BFD_RELOC_RX_ABS32_REV:                howto manager.      (line 2048)
-* BFD_RELOC_RX_ABS8:                     howto manager.      (line 2044)
-* BFD_RELOC_RX_DIFF:                     howto manager.      (line 2037)
-* BFD_RELOC_RX_DIR3U_PCREL:              howto manager.      (line 2036)
-* BFD_RELOC_RX_GPRELB:                   howto manager.      (line 2038)
-* BFD_RELOC_RX_GPRELL:                   howto manager.      (line 2040)
-* BFD_RELOC_RX_GPRELW:                   howto manager.      (line 2039)
-* BFD_RELOC_RX_NEG16:                    howto manager.      (line 2027)
-* BFD_RELOC_RX_NEG24:                    howto manager.      (line 2028)
-* BFD_RELOC_RX_NEG32:                    howto manager.      (line 2029)
-* BFD_RELOC_RX_NEG8:                     howto manager.      (line 2026)
-* BFD_RELOC_RX_OP_NEG:                   howto manager.      (line 2043)
-* BFD_RELOC_RX_OP_SUBTRACT:              howto manager.      (line 2042)
-* BFD_RELOC_RX_RELAX:                    howto manager.      (line 2052)
-* BFD_RELOC_RX_SYM:                      howto manager.      (line 2041)
-* BFD_RELOC_SCORE16_BRANCH:              howto manager.      (line 2195)
-* BFD_RELOC_SCORE16_JMP:                 howto manager.      (line 2192)
-* BFD_RELOC_SCORE_BCMP:                  howto manager.      (line 2198)
-* BFD_RELOC_SCORE_BRANCH:                howto manager.      (line 2183)
-* BFD_RELOC_SCORE_CALL15:                howto manager.      (line 2203)
-* BFD_RELOC_SCORE_DUMMY2:                howto manager.      (line 2179)
-* BFD_RELOC_SCORE_DUMMY_HI16:            howto manager.      (line 2204)
-* BFD_RELOC_SCORE_GOT15:                 howto manager.      (line 2201)
-* BFD_RELOC_SCORE_GOT_LO16:              howto manager.      (line 2202)
-* BFD_RELOC_SCORE_GPREL15:               howto manager.      (line 2176)
-* BFD_RELOC_SCORE_IMM30:                 howto manager.      (line 2186)
-* BFD_RELOC_SCORE_IMM32:                 howto manager.      (line 2189)
-* BFD_RELOC_SCORE_JMP:                   howto manager.      (line 2180)
-* BFD_RELOC_SH_ALIGN:                    howto manager.      (line  984)
-* BFD_RELOC_SH_CODE:                     howto manager.      (line  985)
-* BFD_RELOC_SH_COPY:                     howto manager.      (line  990)
-* BFD_RELOC_SH_COPY64:                   howto manager.      (line 1015)
-* BFD_RELOC_SH_COUNT:                    howto manager.      (line  983)
-* BFD_RELOC_SH_DATA:                     howto manager.      (line  986)
-* BFD_RELOC_SH_DISP12:                   howto manager.      (line  966)
-* BFD_RELOC_SH_DISP12BY2:                howto manager.      (line  967)
-* BFD_RELOC_SH_DISP12BY4:                howto manager.      (line  968)
-* BFD_RELOC_SH_DISP12BY8:                howto manager.      (line  969)
-* BFD_RELOC_SH_DISP20:                   howto manager.      (line  970)
-* BFD_RELOC_SH_DISP20BY8:                howto manager.      (line  971)
-* BFD_RELOC_SH_FUNCDESC:                 howto manager.      (line 1058)
-* BFD_RELOC_SH_GLOB_DAT:                 howto manager.      (line  991)
-* BFD_RELOC_SH_GLOB_DAT64:               howto manager.      (line 1016)
-* BFD_RELOC_SH_GOT10BY4:                 howto manager.      (line 1019)
-* BFD_RELOC_SH_GOT10BY8:                 howto manager.      (line 1020)
-* BFD_RELOC_SH_GOT20:                    howto manager.      (line 1052)
-* BFD_RELOC_SH_GOT_HI16:                 howto manager.      (line  998)
-* BFD_RELOC_SH_GOT_LOW16:                howto manager.      (line  995)
-* BFD_RELOC_SH_GOT_MEDHI16:              howto manager.      (line  997)
-* BFD_RELOC_SH_GOT_MEDLOW16:             howto manager.      (line  996)
-* BFD_RELOC_SH_GOTFUNCDESC:              howto manager.      (line 1054)
-* BFD_RELOC_SH_GOTFUNCDESC20:            howto manager.      (line 1055)
-* BFD_RELOC_SH_GOTOFF20:                 howto manager.      (line 1053)
-* BFD_RELOC_SH_GOTOFF_HI16:              howto manager.      (line 1010)
-* BFD_RELOC_SH_GOTOFF_LOW16:             howto manager.      (line 1007)
-* BFD_RELOC_SH_GOTOFF_MEDHI16:           howto manager.      (line 1009)
-* BFD_RELOC_SH_GOTOFF_MEDLOW16:          howto manager.      (line 1008)
-* BFD_RELOC_SH_GOTOFFFUNCDESC:           howto manager.      (line 1056)
-* BFD_RELOC_SH_GOTOFFFUNCDESC20:         howto manager.      (line 1057)
-* BFD_RELOC_SH_GOTPC:                    howto manager.      (line  994)
-* BFD_RELOC_SH_GOTPC_HI16:               howto manager.      (line 1014)
-* BFD_RELOC_SH_GOTPC_LOW16:              howto manager.      (line 1011)
-* BFD_RELOC_SH_GOTPC_MEDHI16:            howto manager.      (line 1013)
-* BFD_RELOC_SH_GOTPC_MEDLOW16:           howto manager.      (line 1012)
-* BFD_RELOC_SH_GOTPLT10BY4:              howto manager.      (line 1021)
-* BFD_RELOC_SH_GOTPLT10BY8:              howto manager.      (line 1022)
-* BFD_RELOC_SH_GOTPLT32:                 howto manager.      (line 1023)
-* BFD_RELOC_SH_GOTPLT_HI16:              howto manager.      (line 1002)
-* BFD_RELOC_SH_GOTPLT_LOW16:             howto manager.      (line  999)
-* BFD_RELOC_SH_GOTPLT_MEDHI16:           howto manager.      (line 1001)
-* BFD_RELOC_SH_GOTPLT_MEDLOW16:          howto manager.      (line 1000)
-* BFD_RELOC_SH_IMM3:                     howto manager.      (line  964)
-* BFD_RELOC_SH_IMM3U:                    howto manager.      (line  965)
-* BFD_RELOC_SH_IMM4:                     howto manager.      (line  972)
-* BFD_RELOC_SH_IMM4BY2:                  howto manager.      (line  973)
-* BFD_RELOC_SH_IMM4BY4:                  howto manager.      (line  974)
-* BFD_RELOC_SH_IMM8:                     howto manager.      (line  975)
-* BFD_RELOC_SH_IMM8BY2:                  howto manager.      (line  976)
-* BFD_RELOC_SH_IMM8BY4:                  howto manager.      (line  977)
-* BFD_RELOC_SH_IMM_HI16:                 howto manager.      (line 1041)
-* BFD_RELOC_SH_IMM_HI16_PCREL:           howto manager.      (line 1042)
-* BFD_RELOC_SH_IMM_LOW16:                howto manager.      (line 1035)
-* BFD_RELOC_SH_IMM_LOW16_PCREL:          howto manager.      (line 1036)
-* BFD_RELOC_SH_IMM_MEDHI16:              howto manager.      (line 1039)
-* BFD_RELOC_SH_IMM_MEDHI16_PCREL:        howto manager.      (line 1040)
-* BFD_RELOC_SH_IMM_MEDLOW16:             howto manager.      (line 1037)
-* BFD_RELOC_SH_IMM_MEDLOW16_PCREL:       howto manager.      (line 1038)
-* BFD_RELOC_SH_IMMS10:                   howto manager.      (line 1029)
-* BFD_RELOC_SH_IMMS10BY2:                howto manager.      (line 1030)
-* BFD_RELOC_SH_IMMS10BY4:                howto manager.      (line 1031)
-* BFD_RELOC_SH_IMMS10BY8:                howto manager.      (line 1032)
-* BFD_RELOC_SH_IMMS16:                   howto manager.      (line 1033)
-* BFD_RELOC_SH_IMMS6:                    howto manager.      (line 1026)
-* BFD_RELOC_SH_IMMS6BY32:                howto manager.      (line 1027)
-* BFD_RELOC_SH_IMMU16:                   howto manager.      (line 1034)
-* BFD_RELOC_SH_IMMU5:                    howto manager.      (line 1025)
-* BFD_RELOC_SH_IMMU6:                    howto manager.      (line 1028)
-* BFD_RELOC_SH_JMP_SLOT:                 howto manager.      (line  992)
-* BFD_RELOC_SH_JMP_SLOT64:               howto manager.      (line 1017)
-* BFD_RELOC_SH_LABEL:                    howto manager.      (line  987)
-* BFD_RELOC_SH_LOOP_END:                 howto manager.      (line  989)
-* BFD_RELOC_SH_LOOP_START:               howto manager.      (line  988)
-* BFD_RELOC_SH_PCDISP12BY2:              howto manager.      (line  963)
-* BFD_RELOC_SH_PCDISP8BY2:               howto manager.      (line  962)
-* BFD_RELOC_SH_PCRELIMM8BY2:             howto manager.      (line  978)
-* BFD_RELOC_SH_PCRELIMM8BY4:             howto manager.      (line  979)
-* BFD_RELOC_SH_PLT_HI16:                 howto manager.      (line 1006)
-* BFD_RELOC_SH_PLT_LOW16:                howto manager.      (line 1003)
-* BFD_RELOC_SH_PLT_MEDHI16:              howto manager.      (line 1005)
-* BFD_RELOC_SH_PLT_MEDLOW16:             howto manager.      (line 1004)
-* BFD_RELOC_SH_PT_16:                    howto manager.      (line 1043)
-* BFD_RELOC_SH_RELATIVE:                 howto manager.      (line  993)
-* BFD_RELOC_SH_RELATIVE64:               howto manager.      (line 1018)
-* BFD_RELOC_SH_SHMEDIA_CODE:             howto manager.      (line 1024)
-* BFD_RELOC_SH_SWITCH16:                 howto manager.      (line  980)
-* BFD_RELOC_SH_SWITCH32:                 howto manager.      (line  981)
-* BFD_RELOC_SH_TLS_DTPMOD32:             howto manager.      (line 1049)
-* BFD_RELOC_SH_TLS_DTPOFF32:             howto manager.      (line 1050)
-* BFD_RELOC_SH_TLS_GD_32:                howto manager.      (line 1044)
-* BFD_RELOC_SH_TLS_IE_32:                howto manager.      (line 1047)
-* BFD_RELOC_SH_TLS_LD_32:                howto manager.      (line 1045)
-* BFD_RELOC_SH_TLS_LDO_32:               howto manager.      (line 1046)
-* BFD_RELOC_SH_TLS_LE_32:                howto manager.      (line 1048)
-* BFD_RELOC_SH_TLS_TPOFF32:              howto manager.      (line 1051)
-* BFD_RELOC_SH_USES:                     howto manager.      (line  982)
-* BFD_RELOC_SIZE32:                      howto manager.      (line   74)
-* BFD_RELOC_SIZE64:                      howto manager.      (line   75)
-* BFD_RELOC_SPARC13:                     howto manager.      (line  138)
-* BFD_RELOC_SPARC22:                     howto manager.      (line  137)
-* BFD_RELOC_SPARC_10:                    howto manager.      (line  167)
-* BFD_RELOC_SPARC_11:                    howto manager.      (line  168)
-* BFD_RELOC_SPARC_5:                     howto manager.      (line  180)
-* BFD_RELOC_SPARC_6:                     howto manager.      (line  179)
-* BFD_RELOC_SPARC_64:                    howto manager.      (line  166)
-* BFD_RELOC_SPARC_7:                     howto manager.      (line  178)
-* BFD_RELOC_SPARC_BASE13:                howto manager.      (line  162)
-* BFD_RELOC_SPARC_BASE22:                howto manager.      (line  163)
-* BFD_RELOC_SPARC_COPY:                  howto manager.      (line  145)
-* BFD_RELOC_SPARC_DISP64:                howto manager.      (line  181)
-* BFD_RELOC_SPARC_GLOB_DAT:              howto manager.      (line  146)
-* BFD_RELOC_SPARC_GOT10:                 howto manager.      (line  139)
-* BFD_RELOC_SPARC_GOT13:                 howto manager.      (line  140)
-* BFD_RELOC_SPARC_GOT22:                 howto manager.      (line  141)
-* BFD_RELOC_SPARC_GOTDATA_HIX22:         howto manager.      (line  152)
-* BFD_RELOC_SPARC_GOTDATA_LOX10:         howto manager.      (line  153)
-* BFD_RELOC_SPARC_GOTDATA_OP:            howto manager.      (line  156)
-* BFD_RELOC_SPARC_GOTDATA_OP_HIX22:      howto manager.      (line  154)
-* BFD_RELOC_SPARC_GOTDATA_OP_LOX10:      howto manager.      (line  155)
-* BFD_RELOC_SPARC_H34:                   howto manager.      (line  190)
-* BFD_RELOC_SPARC_H44:                   howto manager.      (line  186)
-* BFD_RELOC_SPARC_HH22:                  howto manager.      (line  170)
-* BFD_RELOC_SPARC_HIX22:                 howto manager.      (line  184)
-* BFD_RELOC_SPARC_HM10:                  howto manager.      (line  171)
-* BFD_RELOC_SPARC_IRELATIVE:             howto manager.      (line  158)
-* BFD_RELOC_SPARC_JMP_IREL:              howto manager.      (line  157)
-* BFD_RELOC_SPARC_JMP_SLOT:              howto manager.      (line  147)
-* BFD_RELOC_SPARC_L44:                   howto manager.      (line  188)
-* BFD_RELOC_SPARC_LM22:                  howto manager.      (line  172)
-* BFD_RELOC_SPARC_LOX10:                 howto manager.      (line  185)
-* BFD_RELOC_SPARC_M44:                   howto manager.      (line  187)
-* BFD_RELOC_SPARC_OLO10:                 howto manager.      (line  169)
-* BFD_RELOC_SPARC_PC10:                  howto manager.      (line  142)
-* BFD_RELOC_SPARC_PC22:                  howto manager.      (line  143)
-* BFD_RELOC_SPARC_PC_HH22:               howto manager.      (line  173)
-* BFD_RELOC_SPARC_PC_HM10:               howto manager.      (line  174)
-* BFD_RELOC_SPARC_PC_LM22:               howto manager.      (line  175)
-* BFD_RELOC_SPARC_PLT32:                 howto manager.      (line  182)
-* BFD_RELOC_SPARC_PLT64:                 howto manager.      (line  183)
-* BFD_RELOC_SPARC_REGISTER:              howto manager.      (line  189)
-* BFD_RELOC_SPARC_RELATIVE:              howto manager.      (line  148)
-* BFD_RELOC_SPARC_REV32:                 howto manager.      (line  196)
-* BFD_RELOC_SPARC_SIZE32:                howto manager.      (line  191)
-* BFD_RELOC_SPARC_SIZE64:                howto manager.      (line  192)
-* BFD_RELOC_SPARC_TLS_DTPMOD32:          howto manager.      (line  217)
-* BFD_RELOC_SPARC_TLS_DTPMOD64:          howto manager.      (line  218)
-* BFD_RELOC_SPARC_TLS_DTPOFF32:          howto manager.      (line  219)
-* BFD_RELOC_SPARC_TLS_DTPOFF64:          howto manager.      (line  220)
-* BFD_RELOC_SPARC_TLS_GD_ADD:            howto manager.      (line  201)
-* BFD_RELOC_SPARC_TLS_GD_CALL:           howto manager.      (line  202)
-* BFD_RELOC_SPARC_TLS_GD_HI22:           howto manager.      (line  199)
-* BFD_RELOC_SPARC_TLS_GD_LO10:           howto manager.      (line  200)
-* BFD_RELOC_SPARC_TLS_IE_ADD:            howto manager.      (line  214)
-* BFD_RELOC_SPARC_TLS_IE_HI22:           howto manager.      (line  210)
-* BFD_RELOC_SPARC_TLS_IE_LD:             howto manager.      (line  212)
-* BFD_RELOC_SPARC_TLS_IE_LDX:            howto manager.      (line  213)
-* BFD_RELOC_SPARC_TLS_IE_LO10:           howto manager.      (line  211)
-* BFD_RELOC_SPARC_TLS_LDM_ADD:           howto manager.      (line  205)
-* BFD_RELOC_SPARC_TLS_LDM_CALL:          howto manager.      (line  206)
-* BFD_RELOC_SPARC_TLS_LDM_HI22:          howto manager.      (line  203)
-* BFD_RELOC_SPARC_TLS_LDM_LO10:          howto manager.      (line  204)
-* BFD_RELOC_SPARC_TLS_LDO_ADD:           howto manager.      (line  209)
-* BFD_RELOC_SPARC_TLS_LDO_HIX22:         howto manager.      (line  207)
-* BFD_RELOC_SPARC_TLS_LDO_LOX10:         howto manager.      (line  208)
-* BFD_RELOC_SPARC_TLS_LE_HIX22:          howto manager.      (line  215)
-* BFD_RELOC_SPARC_TLS_LE_LOX10:          howto manager.      (line  216)
-* BFD_RELOC_SPARC_TLS_TPOFF32:           howto manager.      (line  221)
-* BFD_RELOC_SPARC_TLS_TPOFF64:           howto manager.      (line  222)
-* BFD_RELOC_SPARC_UA16:                  howto manager.      (line  149)
-* BFD_RELOC_SPARC_UA32:                  howto manager.      (line  150)
-* BFD_RELOC_SPARC_UA64:                  howto manager.      (line  151)
-* BFD_RELOC_SPARC_WDISP10:               howto manager.      (line  193)
-* BFD_RELOC_SPARC_WDISP16:               howto manager.      (line  176)
-* BFD_RELOC_SPARC_WDISP19:               howto manager.      (line  177)
-* BFD_RELOC_SPARC_WDISP22:               howto manager.      (line  136)
-* BFD_RELOC_SPARC_WPLT30:                howto manager.      (line  144)
-* BFD_RELOC_SPU_ADD_PIC:                 howto manager.      (line  239)
-* BFD_RELOC_SPU_HI16:                    howto manager.      (line  236)
-* BFD_RELOC_SPU_IMM10:                   howto manager.      (line  227)
-* BFD_RELOC_SPU_IMM10W:                  howto manager.      (line  228)
-* BFD_RELOC_SPU_IMM16:                   howto manager.      (line  229)
-* BFD_RELOC_SPU_IMM16W:                  howto manager.      (line  230)
-* BFD_RELOC_SPU_IMM18:                   howto manager.      (line  231)
-* BFD_RELOC_SPU_IMM7:                    howto manager.      (line  225)
-* BFD_RELOC_SPU_IMM8:                    howto manager.      (line  226)
-* BFD_RELOC_SPU_LO16:                    howto manager.      (line  235)
-* BFD_RELOC_SPU_PCREL16:                 howto manager.      (line  234)
-* BFD_RELOC_SPU_PCREL9a:                 howto manager.      (line  232)
-* BFD_RELOC_SPU_PCREL9b:                 howto manager.      (line  233)
-* BFD_RELOC_SPU_PPU32:                   howto manager.      (line  237)
-* BFD_RELOC_SPU_PPU64:                   howto manager.      (line  238)
-* BFD_RELOC_THUMB_PCREL_BLX:             howto manager.      (line  811)
-* BFD_RELOC_THUMB_PCREL_BRANCH12:        howto manager.      (line  825)
-* BFD_RELOC_THUMB_PCREL_BRANCH20:        howto manager.      (line  826)
-* BFD_RELOC_THUMB_PCREL_BRANCH23:        howto manager.      (line  827)
-* BFD_RELOC_THUMB_PCREL_BRANCH25:        howto manager.      (line  828)
-* BFD_RELOC_THUMB_PCREL_BRANCH7:         howto manager.      (line  823)
-* BFD_RELOC_THUMB_PCREL_BRANCH9:         howto manager.      (line  824)
-* BFD_RELOC_TIC30_LDP:                   howto manager.      (line 1643)
-* BFD_RELOC_TIC54X_16_OF_23:             howto manager.      (line 1661)
-* BFD_RELOC_TIC54X_23:                   howto manager.      (line 1658)
-* BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.      (line 1666)
-* BFD_RELOC_TIC54X_PARTLS7:              howto manager.      (line 1648)
-* BFD_RELOC_TIC54X_PARTMS9:              howto manager.      (line 1653)
-* BFD_RELOC_TILEGX_BROFF_X1:             howto manager.      (line 3423)
-* BFD_RELOC_TILEGX_COPY:                 howto manager.      (line 3419)
-* BFD_RELOC_TILEGX_DEST_IMM8_X1:         howto manager.      (line 3430)
-* BFD_RELOC_TILEGX_GLOB_DAT:             howto manager.      (line 3420)
-* BFD_RELOC_TILEGX_HW0:                  howto manager.      (line 3412)
-* BFD_RELOC_TILEGX_HW0_LAST:             howto manager.      (line 3416)
-* BFD_RELOC_TILEGX_HW1:                  howto manager.      (line 3413)
-* BFD_RELOC_TILEGX_HW1_LAST:             howto manager.      (line 3417)
-* BFD_RELOC_TILEGX_HW2:                  howto manager.      (line 3414)
-* BFD_RELOC_TILEGX_HW2_LAST:             howto manager.      (line 3418)
-* BFD_RELOC_TILEGX_HW3:                  howto manager.      (line 3415)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0:         howto manager.      (line 3439)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT:     howto manager.      (line 3467)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST:    howto manager.      (line 3447)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager.     (line 3475)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager.   (line 3461)
+                                                             (line 2886)
+* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager.   (line 2888)
+* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12: howto manager.    (line 2890)
+* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: howto manager.    (line 2892)
+* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC: howto manager. (line 2894)
+* BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:   howto manager.      (line 2897)
+* BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:    howto manager.      (line 2901)
+* BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:    howto manager.      (line 2904)
+* BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12: howto manager. (line 2907)
+* BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC: howto manager.
+                                                             (line 2910)
+* BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12: howto manager. (line 2913)
+* BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC: howto manager.
+                                                             (line 2916)
+* BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12: howto manager. (line 2919)
+* BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC: howto manager.
+                                                             (line 2922)
+* BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12: howto manager.  (line 2925)
+* BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC: howto manager.
+                                                             (line 2928)
+* BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12: howto manager.   (line 3010)
+* BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC: howto manager.
+                                                             (line 3014)
+* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0: howto manager.     (line 2931)
+* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: howto manager.  (line 2933)
+* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1: howto manager.     (line 2935)
+* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC: howto manager.  (line 2937)
+* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2: howto manager.     (line 2939)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager.     (line 2951)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager.     (line 2953)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager.  (line 2955)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager.      (line 2947)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager.   (line 2949)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager.      (line 2943)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager.   (line 2945)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager.      (line 2941)
+* BFD_RELOC_AARCH64_TLS_DTPMOD:          howto manager.      (line 2987)
+* BFD_RELOC_AARCH64_TLS_DTPREL:          howto manager.      (line 2989)
+* BFD_RELOC_AARCH64_TLS_TPREL:           howto manager.      (line 2991)
+* BFD_RELOC_AARCH64_TSTBR14:             howto manager.      (line 2798)
+* BFD_RELOC_AC_SECTOFF_S9:               howto manager.      (line 1009)
+* BFD_RELOC_AC_SECTOFF_S9_1:             howto manager.      (line 1010)
+* BFD_RELOC_AC_SECTOFF_S9_2:             howto manager.      (line 1011)
+* BFD_RELOC_AC_SECTOFF_U8:               howto manager.      (line 1006)
+* BFD_RELOC_AC_SECTOFF_U8_1:             howto manager.      (line 1007)
+* BFD_RELOC_AC_SECTOFF_U8_2:             howto manager.      (line 1008)
+* BFD_RELOC_ALPHA_BOH:                   howto manager.      (line  292)
+* BFD_RELOC_ALPHA_BRSGP:                 howto manager.      (line  279)
+* BFD_RELOC_ALPHA_BSR:                   howto manager.      (line  286)
+* BFD_RELOC_ALPHA_CODEADDR:              howto manager.      (line  272)
+* BFD_RELOC_ALPHA_DTPMOD64:              howto manager.      (line  297)
+* BFD_RELOC_ALPHA_DTPREL16:              howto manager.      (line  302)
+* BFD_RELOC_ALPHA_DTPREL64:              howto manager.      (line  299)
+* BFD_RELOC_ALPHA_DTPREL_HI16:           howto manager.      (line  300)
+* BFD_RELOC_ALPHA_DTPREL_LO16:           howto manager.      (line  301)
+* BFD_RELOC_ALPHA_ELF_LITERAL:           howto manager.      (line  240)
+* BFD_RELOC_ALPHA_GOTDTPREL16:           howto manager.      (line  298)
+* BFD_RELOC_ALPHA_GOTTPREL16:            howto manager.      (line  303)
+* BFD_RELOC_ALPHA_GPDISP:                howto manager.      (line  235)
+* BFD_RELOC_ALPHA_GPDISP_HI16:           howto manager.      (line  223)
+* BFD_RELOC_ALPHA_GPDISP_LO16:           howto manager.      (line  230)
+* BFD_RELOC_ALPHA_GPREL_HI16:            howto manager.      (line  275)
+* BFD_RELOC_ALPHA_GPREL_LO16:            howto manager.      (line  276)
+* BFD_RELOC_ALPHA_HINT:                  howto manager.      (line  265)
+* BFD_RELOC_ALPHA_LDA:                   howto manager.      (line  289)
+* BFD_RELOC_ALPHA_LINKAGE:               howto manager.      (line  269)
+* BFD_RELOC_ALPHA_LITERAL:               howto manager.      (line  239)
+* BFD_RELOC_ALPHA_LITUSE:                howto manager.      (line  241)
+* BFD_RELOC_ALPHA_NOP:                   howto manager.      (line  283)
+* BFD_RELOC_ALPHA_TLSGD:                 howto manager.      (line  295)
+* BFD_RELOC_ALPHA_TLSLDM:                howto manager.      (line  296)
+* BFD_RELOC_ALPHA_TPREL16:               howto manager.      (line  307)
+* BFD_RELOC_ALPHA_TPREL64:               howto manager.      (line  304)
+* BFD_RELOC_ALPHA_TPREL_HI16:            howto manager.      (line  305)
+* BFD_RELOC_ALPHA_TPREL_LO16:            howto manager.      (line  306)
+* BFD_RELOC_ARC_16:                      howto manager.      (line  978)
+* BFD_RELOC_ARC_24:                      howto manager.      (line  979)
+* BFD_RELOC_ARC_32:                      howto manager.      (line  980)
+* BFD_RELOC_ARC_32_ME:                   howto manager.      (line 1000)
+* BFD_RELOC_ARC_32_ME_S:                 howto manager.      (line 1001)
+* BFD_RELOC_ARC_32_PCREL:                howto manager.      (line 1018)
+* BFD_RELOC_ARC_8:                       howto manager.      (line  977)
+* BFD_RELOC_ARC_COPY:                    howto manager.      (line 1023)
+* BFD_RELOC_ARC_GLOB_DAT:                howto manager.      (line 1024)
+* BFD_RELOC_ARC_GOT32:                   howto manager.      (line 1020)
+* BFD_RELOC_ARC_GOTOFF:                  howto manager.      (line 1027)
+* BFD_RELOC_ARC_GOTPC:                   howto manager.      (line 1028)
+* BFD_RELOC_ARC_GOTPC32:                 howto manager.      (line 1021)
+* BFD_RELOC_ARC_JMP_SLOT:                howto manager.      (line 1025)
+* BFD_RELOC_ARC_N16:                     howto manager.      (line  982)
+* BFD_RELOC_ARC_N24:                     howto manager.      (line  983)
+* BFD_RELOC_ARC_N32:                     howto manager.      (line  984)
+* BFD_RELOC_ARC_N32_ME:                  howto manager.      (line 1002)
+* BFD_RELOC_ARC_N8:                      howto manager.      (line  981)
+* BFD_RELOC_ARC_NONE:                    howto manager.      (line  976)
+* BFD_RELOC_ARC_NPS_CMEM16:              howto manager.      (line 1043)
+* BFD_RELOC_ARC_PC32:                    howto manager.      (line 1019)
+* BFD_RELOC_ARC_PLT32:                   howto manager.      (line 1022)
+* BFD_RELOC_ARC_RELATIVE:                howto manager.      (line 1026)
+* BFD_RELOC_ARC_S13_PCREL:               howto manager.      (line  998)
+* BFD_RELOC_ARC_S21H_PCREL:              howto manager.      (line  987)
+* BFD_RELOC_ARC_S21H_PCREL_PLT:          howto manager.      (line 1042)
+* BFD_RELOC_ARC_S21W_PCREL:              howto manager.      (line  988)
+* BFD_RELOC_ARC_S21W_PCREL_PLT:          howto manager.      (line 1029)
+* BFD_RELOC_ARC_S25H_PCREL:              howto manager.      (line  989)
+* BFD_RELOC_ARC_S25H_PCREL_PLT:          howto manager.      (line 1030)
+* BFD_RELOC_ARC_S25W_PCREL:              howto manager.      (line  990)
+* BFD_RELOC_ARC_S25W_PCREL_PLT:          howto manager.      (line 1041)
+* BFD_RELOC_ARC_SDA:                     howto manager.      (line  985)
+* BFD_RELOC_ARC_SDA16_LD:                howto manager.      (line  995)
+* BFD_RELOC_ARC_SDA16_LD1:               howto manager.      (line  996)
+* BFD_RELOC_ARC_SDA16_LD2:               howto manager.      (line  997)
+* BFD_RELOC_ARC_SDA16_ST2:               howto manager.      (line 1017)
+* BFD_RELOC_ARC_SDA32:                   howto manager.      (line  991)
+* BFD_RELOC_ARC_SDA32_ME:                howto manager.      (line 1004)
+* BFD_RELOC_ARC_SDA_12:                  howto manager.      (line 1016)
+* BFD_RELOC_ARC_SDA_LDST:                howto manager.      (line  992)
+* BFD_RELOC_ARC_SDA_LDST1:               howto manager.      (line  993)
+* BFD_RELOC_ARC_SDA_LDST2:               howto manager.      (line  994)
+* BFD_RELOC_ARC_SECTOFF:                 howto manager.      (line  986)
+* BFD_RELOC_ARC_SECTOFF_1:               howto manager.      (line 1014)
+* BFD_RELOC_ARC_SECTOFF_2:               howto manager.      (line 1015)
+* BFD_RELOC_ARC_SECTOFF_ME:              howto manager.      (line 1003)
+* BFD_RELOC_ARC_SECTOFF_ME_1:            howto manager.      (line 1012)
+* BFD_RELOC_ARC_SECTOFF_ME_2:            howto manager.      (line 1013)
+* BFD_RELOC_ARC_TLS_DTPMOD:              howto manager.      (line 1031)
+* BFD_RELOC_ARC_TLS_DTPOFF:              howto manager.      (line 1037)
+* BFD_RELOC_ARC_TLS_DTPOFF_S9:           howto manager.      (line 1038)
+* BFD_RELOC_ARC_TLS_GD_CALL:             howto manager.      (line 1035)
+* BFD_RELOC_ARC_TLS_GD_GOT:              howto manager.      (line 1033)
+* BFD_RELOC_ARC_TLS_GD_LD:               howto manager.      (line 1034)
+* BFD_RELOC_ARC_TLS_IE_GOT:              howto manager.      (line 1036)
+* BFD_RELOC_ARC_TLS_LE_32:               howto manager.      (line 1040)
+* BFD_RELOC_ARC_TLS_LE_S9:               howto manager.      (line 1039)
+* BFD_RELOC_ARC_TLS_TPOFF:               howto manager.      (line 1032)
+* BFD_RELOC_ARC_W:                       howto manager.      (line  999)
+* BFD_RELOC_ARC_W_ME:                    howto manager.      (line 1005)
+* BFD_RELOC_ARM_ADRL_IMMEDIATE:          howto manager.      (line  850)
+* BFD_RELOC_ARM_ADR_IMM:                 howto manager.      (line  864)
+* BFD_RELOC_ARM_ALU_PC_G0:               howto manager.      (line  812)
+* BFD_RELOC_ARM_ALU_PC_G0_NC:            howto manager.      (line  811)
+* BFD_RELOC_ARM_ALU_PC_G1:               howto manager.      (line  814)
+* BFD_RELOC_ARM_ALU_PC_G1_NC:            howto manager.      (line  813)
+* BFD_RELOC_ARM_ALU_PC_G2:               howto manager.      (line  815)
+* BFD_RELOC_ARM_ALU_SB_G0:               howto manager.      (line  826)
+* BFD_RELOC_ARM_ALU_SB_G0_NC:            howto manager.      (line  825)
+* BFD_RELOC_ARM_ALU_SB_G1:               howto manager.      (line  828)
+* BFD_RELOC_ARM_ALU_SB_G1_NC:            howto manager.      (line  827)
+* BFD_RELOC_ARM_ALU_SB_G2:               howto manager.      (line  829)
+* BFD_RELOC_ARM_CP_OFF_IMM:              howto manager.      (line  860)
+* BFD_RELOC_ARM_CP_OFF_IMM_S2:           howto manager.      (line  861)
+* BFD_RELOC_ARM_GLOB_DAT:                howto manager.      (line  788)
+* BFD_RELOC_ARM_GOT32:                   howto manager.      (line  789)
+* BFD_RELOC_ARM_GOTOFF:                  howto manager.      (line  792)
+* BFD_RELOC_ARM_GOTPC:                   howto manager.      (line  793)
+* BFD_RELOC_ARM_GOT_PREL:                howto manager.      (line  794)
+* BFD_RELOC_ARM_HVC:                     howto manager.      (line  857)
+* BFD_RELOC_ARM_HWLITERAL:               howto manager.      (line  871)
+* BFD_RELOC_ARM_IMMEDIATE:               howto manager.      (line  849)
+* BFD_RELOC_ARM_IN_POOL:                 howto manager.      (line  867)
+* BFD_RELOC_ARM_IRELATIVE:               howto manager.      (line  842)
+* BFD_RELOC_ARM_JUMP_SLOT:               howto manager.      (line  787)
+* BFD_RELOC_ARM_LDC_PC_G0:               howto manager.      (line  822)
+* BFD_RELOC_ARM_LDC_PC_G1:               howto manager.      (line  823)
+* BFD_RELOC_ARM_LDC_PC_G2:               howto manager.      (line  824)
+* BFD_RELOC_ARM_LDC_SB_G0:               howto manager.      (line  836)
+* BFD_RELOC_ARM_LDC_SB_G1:               howto manager.      (line  837)
+* BFD_RELOC_ARM_LDC_SB_G2:               howto manager.      (line  838)
+* BFD_RELOC_ARM_LDRS_PC_G0:              howto manager.      (line  819)
+* BFD_RELOC_ARM_LDRS_PC_G1:              howto manager.      (line  820)
+* BFD_RELOC_ARM_LDRS_PC_G2:              howto manager.      (line  821)
+* BFD_RELOC_ARM_LDRS_SB_G0:              howto manager.      (line  833)
+* BFD_RELOC_ARM_LDRS_SB_G1:              howto manager.      (line  834)
+* BFD_RELOC_ARM_LDRS_SB_G2:              howto manager.      (line  835)
+* BFD_RELOC_ARM_LDR_IMM:                 howto manager.      (line  865)
+* BFD_RELOC_ARM_LDR_PC_G0:               howto manager.      (line  816)
+* BFD_RELOC_ARM_LDR_PC_G1:               howto manager.      (line  817)
+* BFD_RELOC_ARM_LDR_PC_G2:               howto manager.      (line  818)
+* BFD_RELOC_ARM_LDR_SB_G0:               howto manager.      (line  830)
+* BFD_RELOC_ARM_LDR_SB_G1:               howto manager.      (line  831)
+* BFD_RELOC_ARM_LDR_SB_G2:               howto manager.      (line  832)
+* BFD_RELOC_ARM_LITERAL:                 howto manager.      (line  866)
+* BFD_RELOC_ARM_MOVT:                    howto manager.      (line  779)
+* BFD_RELOC_ARM_MOVT_PCREL:              howto manager.      (line  781)
+* BFD_RELOC_ARM_MOVW:                    howto manager.      (line  778)
+* BFD_RELOC_ARM_MOVW_PCREL:              howto manager.      (line  780)
+* BFD_RELOC_ARM_MULTI:                   howto manager.      (line  859)
+* BFD_RELOC_ARM_OFFSET_IMM:              howto manager.      (line  759)
+* BFD_RELOC_ARM_OFFSET_IMM8:             howto manager.      (line  868)
+* BFD_RELOC_ARM_PCREL_BLX:               howto manager.      (line  735)
+* BFD_RELOC_ARM_PCREL_BRANCH:            howto manager.      (line  732)
+* BFD_RELOC_ARM_PCREL_CALL:              howto manager.      (line  743)
+* BFD_RELOC_ARM_PCREL_JUMP:              howto manager.      (line  746)
+* BFD_RELOC_ARM_PLT32:                   howto manager.      (line  790)
+* BFD_RELOC_ARM_PREL31:                  howto manager.      (line  776)
+* BFD_RELOC_ARM_RELATIVE:                howto manager.      (line  791)
+* BFD_RELOC_ARM_ROSEGREL32:              howto manager.      (line  768)
+* BFD_RELOC_ARM_SBREL32:                 howto manager.      (line  770)
+* BFD_RELOC_ARM_SHIFT_IMM:               howto manager.      (line  855)
+* BFD_RELOC_ARM_SMC:                     howto manager.      (line  856)
+* BFD_RELOC_ARM_SWI:                     howto manager.      (line  858)
+* BFD_RELOC_ARM_T32_ADD_IMM:             howto manager.      (line  852)
+* BFD_RELOC_ARM_T32_ADD_PC12:            howto manager.      (line  854)
+* BFD_RELOC_ARM_T32_CP_OFF_IMM:          howto manager.      (line  862)
+* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2:       howto manager.      (line  863)
+* BFD_RELOC_ARM_T32_IMM12:               howto manager.      (line  853)
+* BFD_RELOC_ARM_T32_IMMEDIATE:           howto manager.      (line  851)
+* BFD_RELOC_ARM_T32_OFFSET_IMM:          howto manager.      (line  870)
+* BFD_RELOC_ARM_T32_OFFSET_U8:           howto manager.      (line  869)
+* BFD_RELOC_ARM_TARGET1:                 howto manager.      (line  765)
+* BFD_RELOC_ARM_TARGET2:                 howto manager.      (line  772)
+* BFD_RELOC_ARM_THM_TLS_CALL:            howto manager.      (line  806)
+* BFD_RELOC_ARM_THM_TLS_DESCSEQ:         howto manager.      (line  808)
+* BFD_RELOC_ARM_THUMB_ADD:               howto manager.      (line  872)
+* BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC:     howto manager.      (line  844)
+* BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC:     howto manager.      (line  845)
+* BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC:     howto manager.      (line  846)
+* BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC:     howto manager.      (line  847)
+* BFD_RELOC_ARM_THUMB_IMM:               howto manager.      (line  873)
+* BFD_RELOC_ARM_THUMB_MOVT:              howto manager.      (line  783)
+* BFD_RELOC_ARM_THUMB_MOVT_PCREL:        howto manager.      (line  785)
+* BFD_RELOC_ARM_THUMB_MOVW:              howto manager.      (line  782)
+* BFD_RELOC_ARM_THUMB_MOVW_PCREL:        howto manager.      (line  784)
+* BFD_RELOC_ARM_THUMB_OFFSET:            howto manager.      (line  762)
+* BFD_RELOC_ARM_THUMB_SHIFT:             howto manager.      (line  874)
+* BFD_RELOC_ARM_TLS_CALL:                howto manager.      (line  805)
+* BFD_RELOC_ARM_TLS_DESC:                howto manager.      (line  809)
+* BFD_RELOC_ARM_TLS_DESCSEQ:             howto manager.      (line  807)
+* BFD_RELOC_ARM_TLS_DTPMOD32:            howto manager.      (line  800)
+* BFD_RELOC_ARM_TLS_DTPOFF32:            howto manager.      (line  799)
+* BFD_RELOC_ARM_TLS_GD32:                howto manager.      (line  796)
+* BFD_RELOC_ARM_TLS_GOTDESC:             howto manager.      (line  804)
+* BFD_RELOC_ARM_TLS_IE32:                howto manager.      (line  802)
+* BFD_RELOC_ARM_TLS_LDM32:               howto manager.      (line  798)
+* BFD_RELOC_ARM_TLS_LDO32:               howto manager.      (line  797)
+* BFD_RELOC_ARM_TLS_LE32:                howto manager.      (line  803)
+* BFD_RELOC_ARM_TLS_TPOFF32:             howto manager.      (line  801)
+* BFD_RELOC_ARM_V4BX:                    howto manager.      (line  840)
+* BFD_RELOC_AVR_13_PCREL:                howto manager.      (line 1663)
+* BFD_RELOC_AVR_16_PM:                   howto manager.      (line 1666)
+* BFD_RELOC_AVR_6:                       howto manager.      (line 1734)
+* BFD_RELOC_AVR_6_ADIW:                  howto manager.      (line 1737)
+* BFD_RELOC_AVR_7_PCREL:                 howto manager.      (line 1660)
+* BFD_RELOC_AVR_8_HI:                    howto manager.      (line 1743)
+* BFD_RELOC_AVR_8_HLO:                   howto manager.      (line 1746)
+* BFD_RELOC_AVR_8_LO:                    howto manager.      (line 1740)
+* BFD_RELOC_AVR_CALL:                    howto manager.      (line 1728)
+* BFD_RELOC_AVR_DIFF16:                  howto manager.      (line 1750)
+* BFD_RELOC_AVR_DIFF32:                  howto manager.      (line 1751)
+* BFD_RELOC_AVR_DIFF8:                   howto manager.      (line 1749)
+* BFD_RELOC_AVR_HH8_LDI:                 howto manager.      (line 1675)
+* BFD_RELOC_AVR_HH8_LDI_NEG:             howto manager.      (line 1690)
+* BFD_RELOC_AVR_HH8_LDI_PM:              howto manager.      (line 1713)
+* BFD_RELOC_AVR_HH8_LDI_PM_NEG:          howto manager.      (line 1724)
+* BFD_RELOC_AVR_HI8_LDI:                 howto manager.      (line 1672)
+* BFD_RELOC_AVR_HI8_LDI_GS:              howto manager.      (line 1708)
+* BFD_RELOC_AVR_HI8_LDI_NEG:             howto manager.      (line 1686)
+* BFD_RELOC_AVR_HI8_LDI_PM:              howto manager.      (line 1705)
+* BFD_RELOC_AVR_HI8_LDI_PM_NEG:          howto manager.      (line 1720)
+* BFD_RELOC_AVR_LDI:                     howto manager.      (line 1731)
+* BFD_RELOC_AVR_LDS_STS_16:              howto manager.      (line 1758)
+* BFD_RELOC_AVR_LO8_LDI:                 howto manager.      (line 1669)
+* BFD_RELOC_AVR_LO8_LDI_GS:              howto manager.      (line 1700)
+* BFD_RELOC_AVR_LO8_LDI_NEG:             howto manager.      (line 1682)
+* BFD_RELOC_AVR_LO8_LDI_PM:              howto manager.      (line 1697)
+* BFD_RELOC_AVR_LO8_LDI_PM_NEG:          howto manager.      (line 1717)
+* BFD_RELOC_AVR_MS8_LDI:                 howto manager.      (line 1679)
+* BFD_RELOC_AVR_MS8_LDI_NEG:             howto manager.      (line 1694)
+* BFD_RELOC_AVR_PORT5:                   howto manager.      (line 1764)
+* BFD_RELOC_AVR_PORT6:                   howto manager.      (line 1761)
+* BFD_RELOC_BFIN_10_PCREL:               howto manager.      (line 1055)
+* BFD_RELOC_BFIN_11_PCREL:               howto manager.      (line 1057)
+* BFD_RELOC_BFIN_12_PCREL_JUMP:          howto manager.      (line 1059)
+* BFD_RELOC_BFIN_12_PCREL_JUMP_S:        howto manager.      (line 1061)
+* BFD_RELOC_BFIN_16_HIGH:                howto manager.      (line 1047)
+* BFD_RELOC_BFIN_16_IMM:                 howto manager.      (line 1045)
+* BFD_RELOC_BFIN_16_LOW:                 howto manager.      (line 1053)
+* BFD_RELOC_BFIN_24_PCREL_CALL_X:        howto manager.      (line 1063)
+* BFD_RELOC_BFIN_24_PCREL_JUMP_L:        howto manager.      (line 1065)
+* BFD_RELOC_BFIN_4_PCREL:                howto manager.      (line 1049)
+* BFD_RELOC_BFIN_5_PCREL:                howto manager.      (line 1051)
+* BFD_RELOC_BFIN_FUNCDESC:               howto manager.      (line 1070)
+* BFD_RELOC_BFIN_FUNCDESC_GOT17M4:       howto manager.      (line 1071)
+* BFD_RELOC_BFIN_FUNCDESC_GOTHI:         howto manager.      (line 1072)
+* BFD_RELOC_BFIN_FUNCDESC_GOTLO:         howto manager.      (line 1073)
+* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4:    howto manager.      (line 1075)
+* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI:      howto manager.      (line 1076)
+* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO:      howto manager.      (line 1077)
+* BFD_RELOC_BFIN_FUNCDESC_VALUE:         howto manager.      (line 1074)
+* BFD_RELOC_BFIN_GOT:                    howto manager.      (line 1082)
+* BFD_RELOC_BFIN_GOT17M4:                howto manager.      (line 1067)
+* BFD_RELOC_BFIN_GOTHI:                  howto manager.      (line 1068)
+* BFD_RELOC_BFIN_GOTLO:                  howto manager.      (line 1069)
+* BFD_RELOC_BFIN_GOTOFF17M4:             howto manager.      (line 1078)
+* BFD_RELOC_BFIN_GOTOFFHI:               howto manager.      (line 1079)
+* BFD_RELOC_BFIN_GOTOFFLO:               howto manager.      (line 1080)
+* BFD_RELOC_BFIN_PLTPC:                  howto manager.      (line 1084)
+* BFD_RELOC_C6000_ABS_H16:               howto manager.      (line 1505)
+* BFD_RELOC_C6000_ABS_L16:               howto manager.      (line 1504)
+* BFD_RELOC_C6000_ABS_S16:               howto manager.      (line 1503)
+* BFD_RELOC_C6000_ALIGN:                 howto manager.      (line 1526)
+* BFD_RELOC_C6000_COPY:                  howto manager.      (line 1521)
+* BFD_RELOC_C6000_DSBT_INDEX:            howto manager.      (line 1519)
+* BFD_RELOC_C6000_EHTYPE:                howto manager.      (line 1523)
+* BFD_RELOC_C6000_FPHEAD:                howto manager.      (line 1527)
+* BFD_RELOC_C6000_JUMP_SLOT:             howto manager.      (line 1522)
+* BFD_RELOC_C6000_NOCMP:                 howto manager.      (line 1528)
+* BFD_RELOC_C6000_PCR_H16:               howto manager.      (line 1524)
+* BFD_RELOC_C6000_PCR_L16:               howto manager.      (line 1525)
+* BFD_RELOC_C6000_PCR_S10:               howto manager.      (line 1501)
+* BFD_RELOC_C6000_PCR_S12:               howto manager.      (line 1500)
+* BFD_RELOC_C6000_PCR_S21:               howto manager.      (line 1499)
+* BFD_RELOC_C6000_PCR_S7:                howto manager.      (line 1502)
+* BFD_RELOC_C6000_PREL31:                howto manager.      (line 1520)
+* BFD_RELOC_C6000_SBR_GOT_H16_W:         howto manager.      (line 1518)
+* BFD_RELOC_C6000_SBR_GOT_L16_W:         howto manager.      (line 1517)
+* BFD_RELOC_C6000_SBR_GOT_U15_W:         howto manager.      (line 1516)
+* BFD_RELOC_C6000_SBR_H16_B:             howto manager.      (line 1513)
+* BFD_RELOC_C6000_SBR_H16_H:             howto manager.      (line 1514)
+* BFD_RELOC_C6000_SBR_H16_W:             howto manager.      (line 1515)
+* BFD_RELOC_C6000_SBR_L16_B:             howto manager.      (line 1510)
+* BFD_RELOC_C6000_SBR_L16_H:             howto manager.      (line 1511)
+* BFD_RELOC_C6000_SBR_L16_W:             howto manager.      (line 1512)
+* BFD_RELOC_C6000_SBR_S16:               howto manager.      (line 1509)
+* BFD_RELOC_C6000_SBR_U15_B:             howto manager.      (line 1506)
+* BFD_RELOC_C6000_SBR_U15_H:             howto manager.      (line 1507)
+* BFD_RELOC_C6000_SBR_U15_W:             howto manager.      (line 1508)
+* bfd_reloc_code_type:                   howto manager.      (line    9)
+* BFD_RELOC_CR16_ABS20:                  howto manager.      (line 2241)
+* BFD_RELOC_CR16_ABS24:                  howto manager.      (line 2242)
+* BFD_RELOC_CR16_DISP16:                 howto manager.      (line 2252)
+* BFD_RELOC_CR16_DISP20:                 howto manager.      (line 2253)
+* BFD_RELOC_CR16_DISP24:                 howto manager.      (line 2254)
+* BFD_RELOC_CR16_DISP24a:                howto manager.      (line 2255)
+* BFD_RELOC_CR16_DISP4:                  howto manager.      (line 2250)
+* BFD_RELOC_CR16_DISP8:                  howto manager.      (line 2251)
+* BFD_RELOC_CR16_GLOB_DAT:               howto manager.      (line 2261)
+* BFD_RELOC_CR16_GOTC_REGREL20:          howto manager.      (line 2260)
+* BFD_RELOC_CR16_GOT_REGREL20:           howto manager.      (line 2259)
+* BFD_RELOC_CR16_IMM16:                  howto manager.      (line 2245)
+* BFD_RELOC_CR16_IMM20:                  howto manager.      (line 2246)
+* BFD_RELOC_CR16_IMM24:                  howto manager.      (line 2247)
+* BFD_RELOC_CR16_IMM32:                  howto manager.      (line 2248)
+* BFD_RELOC_CR16_IMM32a:                 howto manager.      (line 2249)
+* BFD_RELOC_CR16_IMM4:                   howto manager.      (line 2243)
+* BFD_RELOC_CR16_IMM8:                   howto manager.      (line 2244)
+* BFD_RELOC_CR16_NUM16:                  howto manager.      (line 2230)
+* BFD_RELOC_CR16_NUM32:                  howto manager.      (line 2231)
+* BFD_RELOC_CR16_NUM32a:                 howto manager.      (line 2232)
+* BFD_RELOC_CR16_NUM8:                   howto manager.      (line 2229)
+* BFD_RELOC_CR16_REGREL0:                howto manager.      (line 2233)
+* BFD_RELOC_CR16_REGREL14:               howto manager.      (line 2236)
+* BFD_RELOC_CR16_REGREL14a:              howto manager.      (line 2237)
+* BFD_RELOC_CR16_REGREL16:               howto manager.      (line 2238)
+* BFD_RELOC_CR16_REGREL20:               howto manager.      (line 2239)
+* BFD_RELOC_CR16_REGREL20a:              howto manager.      (line 2240)
+* BFD_RELOC_CR16_REGREL4:                howto manager.      (line 2234)
+* BFD_RELOC_CR16_REGREL4a:               howto manager.      (line 2235)
+* BFD_RELOC_CR16_SWITCH16:               howto manager.      (line 2257)
+* BFD_RELOC_CR16_SWITCH32:               howto manager.      (line 2258)
+* BFD_RELOC_CR16_SWITCH8:                howto manager.      (line 2256)
+* BFD_RELOC_CRIS_16_DTPREL:              howto manager.      (line 2321)
+* BFD_RELOC_CRIS_16_GOT:                 howto manager.      (line 2303)
+* BFD_RELOC_CRIS_16_GOTPLT:              howto manager.      (line 2307)
+* BFD_RELOC_CRIS_16_GOT_GD:              howto manager.      (line 2317)
+* BFD_RELOC_CRIS_16_GOT_TPREL:           howto manager.      (line 2323)
+* BFD_RELOC_CRIS_16_TPREL:               howto manager.      (line 2325)
+* BFD_RELOC_CRIS_32_DTPREL:              howto manager.      (line 2320)
+* BFD_RELOC_CRIS_32_GD:                  howto manager.      (line 2318)
+* BFD_RELOC_CRIS_32_GOT:                 howto manager.      (line 2301)
+* BFD_RELOC_CRIS_32_GOTPLT:              howto manager.      (line 2305)
+* BFD_RELOC_CRIS_32_GOTREL:              howto manager.      (line 2309)
+* BFD_RELOC_CRIS_32_GOT_GD:              howto manager.      (line 2316)
+* BFD_RELOC_CRIS_32_GOT_TPREL:           howto manager.      (line 2322)
+* BFD_RELOC_CRIS_32_IE:                  howto manager.      (line 2327)
+* BFD_RELOC_CRIS_32_PLT_GOTREL:          howto manager.      (line 2311)
+* BFD_RELOC_CRIS_32_PLT_PCREL:           howto manager.      (line 2313)
+* BFD_RELOC_CRIS_32_TPREL:               howto manager.      (line 2324)
+* BFD_RELOC_CRIS_BDISP8:                 howto manager.      (line 2284)
+* BFD_RELOC_CRIS_COPY:                   howto manager.      (line 2296)
+* BFD_RELOC_CRIS_DTP:                    howto manager.      (line 2319)
+* BFD_RELOC_CRIS_DTPMOD:                 howto manager.      (line 2326)
+* BFD_RELOC_CRIS_GLOB_DAT:               howto manager.      (line 2297)
+* BFD_RELOC_CRIS_JUMP_SLOT:              howto manager.      (line 2298)
+* BFD_RELOC_CRIS_LAPCQ_OFFSET:           howto manager.      (line 2292)
+* BFD_RELOC_CRIS_RELATIVE:               howto manager.      (line 2299)
+* BFD_RELOC_CRIS_SIGNED_16:              howto manager.      (line 2290)
+* BFD_RELOC_CRIS_SIGNED_6:               howto manager.      (line 2286)
+* BFD_RELOC_CRIS_SIGNED_8:               howto manager.      (line 2288)
+* BFD_RELOC_CRIS_UNSIGNED_16:            howto manager.      (line 2291)
+* BFD_RELOC_CRIS_UNSIGNED_4:             howto manager.      (line 2293)
+* BFD_RELOC_CRIS_UNSIGNED_5:             howto manager.      (line 2285)
+* BFD_RELOC_CRIS_UNSIGNED_6:             howto manager.      (line 2287)
+* BFD_RELOC_CRIS_UNSIGNED_8:             howto manager.      (line 2289)
+* BFD_RELOC_CRX_ABS16:                   howto manager.      (line 2273)
+* BFD_RELOC_CRX_ABS32:                   howto manager.      (line 2274)
+* BFD_RELOC_CRX_IMM16:                   howto manager.      (line 2278)
+* BFD_RELOC_CRX_IMM32:                   howto manager.      (line 2279)
+* BFD_RELOC_CRX_NUM16:                   howto manager.      (line 2276)
+* BFD_RELOC_CRX_NUM32:                   howto manager.      (line 2277)
+* BFD_RELOC_CRX_NUM8:                    howto manager.      (line 2275)
+* BFD_RELOC_CRX_REGREL12:                howto manager.      (line 2269)
+* BFD_RELOC_CRX_REGREL22:                howto manager.      (line 2270)
+* BFD_RELOC_CRX_REGREL28:                howto manager.      (line 2271)
+* BFD_RELOC_CRX_REGREL32:                howto manager.      (line 2272)
+* BFD_RELOC_CRX_REL16:                   howto manager.      (line 2266)
+* BFD_RELOC_CRX_REL24:                   howto manager.      (line 2267)
+* BFD_RELOC_CRX_REL32:                   howto manager.      (line 2268)
+* BFD_RELOC_CRX_REL4:                    howto manager.      (line 2263)
+* BFD_RELOC_CRX_REL8:                    howto manager.      (line 2264)
+* BFD_RELOC_CRX_REL8_CMP:                howto manager.      (line 2265)
+* BFD_RELOC_CRX_SWITCH16:                howto manager.      (line 2281)
+* BFD_RELOC_CRX_SWITCH32:                howto manager.      (line 2282)
+* BFD_RELOC_CRX_SWITCH8:                 howto manager.      (line 2280)
+* BFD_RELOC_CTOR:                        howto manager.      (line  727)
+* BFD_RELOC_D10V_10_PCREL_L:             howto manager.      (line 1129)
+* BFD_RELOC_D10V_10_PCREL_R:             howto manager.      (line 1126)
+* BFD_RELOC_D10V_18:                     howto manager.      (line 1133)
+* BFD_RELOC_D10V_18_PCREL:               howto manager.      (line 1135)
+* BFD_RELOC_D30V_15:                     howto manager.      (line 1146)
+* BFD_RELOC_D30V_15_PCREL:               howto manager.      (line 1149)
+* BFD_RELOC_D30V_15_PCREL_R:             howto manager.      (line 1152)
+* BFD_RELOC_D30V_21:                     howto manager.      (line 1156)
+* BFD_RELOC_D30V_21_PCREL:               howto manager.      (line 1159)
+* BFD_RELOC_D30V_21_PCREL_R:             howto manager.      (line 1162)
+* BFD_RELOC_D30V_32:                     howto manager.      (line 1166)
+* BFD_RELOC_D30V_32_PCREL:               howto manager.      (line 1168)
+* BFD_RELOC_D30V_6:                      howto manager.      (line 1137)
+* BFD_RELOC_D30V_9_PCREL:                howto manager.      (line 1139)
+* BFD_RELOC_D30V_9_PCREL_R:              howto manager.      (line 1142)
+* BFD_RELOC_DLX_HI16_S:                  howto manager.      (line 1170)
+* BFD_RELOC_DLX_JMP26:                   howto manager.      (line 1174)
+* BFD_RELOC_DLX_LO16:                    howto manager.      (line 1172)
+* BFD_RELOC_EPIPHANY_HIGH:               howto manager.      (line 3220)
+* BFD_RELOC_EPIPHANY_IMM11:              howto manager.      (line 3226)
+* BFD_RELOC_EPIPHANY_IMM8:               howto manager.      (line 3229)
+* BFD_RELOC_EPIPHANY_LOW:                howto manager.      (line 3222)
+* BFD_RELOC_EPIPHANY_SIMM11:             howto manager.      (line 3224)
+* BFD_RELOC_EPIPHANY_SIMM24:             howto manager.      (line 3218)
+* BFD_RELOC_EPIPHANY_SIMM8:              howto manager.      (line 3216)
+* BFD_RELOC_FR30_10_IN_8:                howto manager.      (line 1544)
+* BFD_RELOC_FR30_12_PCREL:               howto manager.      (line 1550)
+* BFD_RELOC_FR30_20:                     howto manager.      (line 1532)
+* BFD_RELOC_FR30_48:                     howto manager.      (line 1530)
+* BFD_RELOC_FR30_6_IN_4:                 howto manager.      (line 1535)
+* BFD_RELOC_FR30_8_IN_8:                 howto manager.      (line 1538)
+* BFD_RELOC_FR30_9_IN_8:                 howto manager.      (line 1541)
+* BFD_RELOC_FR30_9_PCREL:                howto manager.      (line 1547)
+* BFD_RELOC_FRV_FUNCDESC:                howto manager.      (line  450)
+* BFD_RELOC_FRV_FUNCDESC_GOT12:          howto manager.      (line  451)
+* BFD_RELOC_FRV_FUNCDESC_GOTHI:          howto manager.      (line  452)
+* BFD_RELOC_FRV_FUNCDESC_GOTLO:          howto manager.      (line  453)
+* BFD_RELOC_FRV_FUNCDESC_GOTOFF12:       howto manager.      (line  455)
+* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:       howto manager.      (line  456)
+* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:       howto manager.      (line  457)
+* BFD_RELOC_FRV_FUNCDESC_VALUE:          howto manager.      (line  454)
+* BFD_RELOC_FRV_GETTLSOFF:               howto manager.      (line  461)
+* BFD_RELOC_FRV_GETTLSOFF_RELAX:         howto manager.      (line  474)
+* BFD_RELOC_FRV_GOT12:                   howto manager.      (line  447)
+* BFD_RELOC_FRV_GOTHI:                   howto manager.      (line  448)
+* BFD_RELOC_FRV_GOTLO:                   howto manager.      (line  449)
+* BFD_RELOC_FRV_GOTOFF12:                howto manager.      (line  458)
+* BFD_RELOC_FRV_GOTOFFHI:                howto manager.      (line  459)
+* BFD_RELOC_FRV_GOTOFFLO:                howto manager.      (line  460)
+* BFD_RELOC_FRV_GOTTLSDESC12:            howto manager.      (line  463)
+* BFD_RELOC_FRV_GOTTLSDESCHI:            howto manager.      (line  464)
+* BFD_RELOC_FRV_GOTTLSDESCLO:            howto manager.      (line  465)
+* BFD_RELOC_FRV_GOTTLSOFF12:             howto manager.      (line  469)
+* BFD_RELOC_FRV_GOTTLSOFFHI:             howto manager.      (line  470)
+* BFD_RELOC_FRV_GOTTLSOFFLO:             howto manager.      (line  471)
+* BFD_RELOC_FRV_GPREL12:                 howto manager.      (line  442)
+* BFD_RELOC_FRV_GPREL32:                 howto manager.      (line  444)
+* BFD_RELOC_FRV_GPRELHI:                 howto manager.      (line  445)
+* BFD_RELOC_FRV_GPRELLO:                 howto manager.      (line  446)
+* BFD_RELOC_FRV_GPRELU12:                howto manager.      (line  443)
+* BFD_RELOC_FRV_HI16:                    howto manager.      (line  441)
+* BFD_RELOC_FRV_LABEL16:                 howto manager.      (line  438)
+* BFD_RELOC_FRV_LABEL24:                 howto manager.      (line  439)
+* BFD_RELOC_FRV_LO16:                    howto manager.      (line  440)
+* BFD_RELOC_FRV_TLSDESC_RELAX:           howto manager.      (line  473)
+* BFD_RELOC_FRV_TLSDESC_VALUE:           howto manager.      (line  462)
+* BFD_RELOC_FRV_TLSMOFF:                 howto manager.      (line  476)
+* BFD_RELOC_FRV_TLSMOFF12:               howto manager.      (line  466)
+* BFD_RELOC_FRV_TLSMOFFHI:               howto manager.      (line  467)
+* BFD_RELOC_FRV_TLSMOFFLO:               howto manager.      (line  468)
+* BFD_RELOC_FRV_TLSOFF:                  howto manager.      (line  472)
+* BFD_RELOC_FRV_TLSOFF_RELAX:            howto manager.      (line  475)
+* BFD_RELOC_FT32_10:                     howto manager.      (line  433)
+* BFD_RELOC_FT32_17:                     howto manager.      (line  435)
+* BFD_RELOC_FT32_18:                     howto manager.      (line  436)
+* BFD_RELOC_FT32_20:                     howto manager.      (line  434)
+* BFD_RELOC_GPREL16:                     howto manager.      (line  114)
+* BFD_RELOC_GPREL32:                     howto manager.      (line  115)
+* BFD_RELOC_H8_DIR16A8:                  howto manager.      (line 2387)
+* BFD_RELOC_H8_DIR16R8:                  howto manager.      (line 2388)
+* BFD_RELOC_H8_DIR24A8:                  howto manager.      (line 2389)
+* BFD_RELOC_H8_DIR24R8:                  howto manager.      (line 2390)
+* BFD_RELOC_H8_DIR32A16:                 howto manager.      (line 2391)
+* BFD_RELOC_H8_DISP32A16:                howto manager.      (line 2392)
+* BFD_RELOC_HI16:                        howto manager.      (line  316)
+* BFD_RELOC_HI16_BASEREL:                howto manager.      (line   94)
+* BFD_RELOC_HI16_GOTOFF:                 howto manager.      (line   53)
+* BFD_RELOC_HI16_PCREL:                  howto manager.      (line  325)
+* BFD_RELOC_HI16_PLTOFF:                 howto manager.      (line   65)
+* BFD_RELOC_HI16_S:                      howto manager.      (line  318)
+* BFD_RELOC_HI16_S_BASEREL:              howto manager.      (line   95)
+* BFD_RELOC_HI16_S_GOTOFF:               howto manager.      (line   54)
+* BFD_RELOC_HI16_S_PCREL:                howto manager.      (line  327)
+* BFD_RELOC_HI16_S_PLTOFF:               howto manager.      (line   66)
+* BFD_RELOC_HI22:                        howto manager.      (line  110)
+* BFD_RELOC_I370_D12:                    howto manager.      (line  725)
+* BFD_RELOC_I960_CALLJ:                  howto manager.      (line  120)
+* BFD_RELOC_IA64_COPY:                   howto manager.      (line 2090)
+* BFD_RELOC_IA64_DIR32LSB:               howto manager.      (line 2035)
+* BFD_RELOC_IA64_DIR32MSB:               howto manager.      (line 2034)
+* BFD_RELOC_IA64_DIR64LSB:               howto manager.      (line 2037)
+* BFD_RELOC_IA64_DIR64MSB:               howto manager.      (line 2036)
+* BFD_RELOC_IA64_DTPMOD64LSB:            howto manager.      (line 2100)
+* BFD_RELOC_IA64_DTPMOD64MSB:            howto manager.      (line 2099)
+* BFD_RELOC_IA64_DTPREL14:               howto manager.      (line 2102)
+* BFD_RELOC_IA64_DTPREL22:               howto manager.      (line 2103)
+* BFD_RELOC_IA64_DTPREL32LSB:            howto manager.      (line 2106)
+* BFD_RELOC_IA64_DTPREL32MSB:            howto manager.      (line 2105)
+* BFD_RELOC_IA64_DTPREL64I:              howto manager.      (line 2104)
+* BFD_RELOC_IA64_DTPREL64LSB:            howto manager.      (line 2108)
+* BFD_RELOC_IA64_DTPREL64MSB:            howto manager.      (line 2107)
+* BFD_RELOC_IA64_FPTR32LSB:              howto manager.      (line 2052)
+* BFD_RELOC_IA64_FPTR32MSB:              howto manager.      (line 2051)
+* BFD_RELOC_IA64_FPTR64I:                howto manager.      (line 2050)
+* BFD_RELOC_IA64_FPTR64LSB:              howto manager.      (line 2054)
+* BFD_RELOC_IA64_FPTR64MSB:              howto manager.      (line 2053)
+* BFD_RELOC_IA64_GPREL22:                howto manager.      (line 2038)
+* BFD_RELOC_IA64_GPREL32LSB:             howto manager.      (line 2041)
+* BFD_RELOC_IA64_GPREL32MSB:             howto manager.      (line 2040)
+* BFD_RELOC_IA64_GPREL64I:               howto manager.      (line 2039)
+* BFD_RELOC_IA64_GPREL64LSB:             howto manager.      (line 2043)
+* BFD_RELOC_IA64_GPREL64MSB:             howto manager.      (line 2042)
+* BFD_RELOC_IA64_IMM14:                  howto manager.      (line 2031)
+* BFD_RELOC_IA64_IMM22:                  howto manager.      (line 2032)
+* BFD_RELOC_IA64_IMM64:                  howto manager.      (line 2033)
+* BFD_RELOC_IA64_IPLTLSB:                howto manager.      (line 2089)
+* BFD_RELOC_IA64_IPLTMSB:                howto manager.      (line 2088)
+* BFD_RELOC_IA64_LDXMOV:                 howto manager.      (line 2092)
+* BFD_RELOC_IA64_LTOFF22:                howto manager.      (line 2044)
+* BFD_RELOC_IA64_LTOFF22X:               howto manager.      (line 2091)
+* BFD_RELOC_IA64_LTOFF64I:               howto manager.      (line 2045)
+* BFD_RELOC_IA64_LTOFF_DTPMOD22:         howto manager.      (line 2101)
+* BFD_RELOC_IA64_LTOFF_DTPREL22:         howto manager.      (line 2109)
+* BFD_RELOC_IA64_LTOFF_FPTR22:           howto manager.      (line 2066)
+* BFD_RELOC_IA64_LTOFF_FPTR32LSB:        howto manager.      (line 2069)
+* BFD_RELOC_IA64_LTOFF_FPTR32MSB:        howto manager.      (line 2068)
+* BFD_RELOC_IA64_LTOFF_FPTR64I:          howto manager.      (line 2067)
+* BFD_RELOC_IA64_LTOFF_FPTR64LSB:        howto manager.      (line 2071)
+* BFD_RELOC_IA64_LTOFF_FPTR64MSB:        howto manager.      (line 2070)
+* BFD_RELOC_IA64_LTOFF_TPREL22:          howto manager.      (line 2098)
+* BFD_RELOC_IA64_LTV32LSB:               howto manager.      (line 2085)
+* BFD_RELOC_IA64_LTV32MSB:               howto manager.      (line 2084)
+* BFD_RELOC_IA64_LTV64LSB:               howto manager.      (line 2087)
+* BFD_RELOC_IA64_LTV64MSB:               howto manager.      (line 2086)
+* BFD_RELOC_IA64_PCREL21B:               howto manager.      (line 2055)
+* BFD_RELOC_IA64_PCREL21BI:              howto manager.      (line 2056)
+* BFD_RELOC_IA64_PCREL21F:               howto manager.      (line 2058)
+* BFD_RELOC_IA64_PCREL21M:               howto manager.      (line 2057)
+* BFD_RELOC_IA64_PCREL22:                howto manager.      (line 2059)
+* BFD_RELOC_IA64_PCREL32LSB:             howto manager.      (line 2063)
+* BFD_RELOC_IA64_PCREL32MSB:             howto manager.      (line 2062)
+* BFD_RELOC_IA64_PCREL60B:               howto manager.      (line 2060)
+* BFD_RELOC_IA64_PCREL64I:               howto manager.      (line 2061)
+* BFD_RELOC_IA64_PCREL64LSB:             howto manager.      (line 2065)
+* BFD_RELOC_IA64_PCREL64MSB:             howto manager.      (line 2064)
+* BFD_RELOC_IA64_PLTOFF22:               howto manager.      (line 2046)
+* BFD_RELOC_IA64_PLTOFF64I:              howto manager.      (line 2047)
+* BFD_RELOC_IA64_PLTOFF64LSB:            howto manager.      (line 2049)
+* BFD_RELOC_IA64_PLTOFF64MSB:            howto manager.      (line 2048)
+* BFD_RELOC_IA64_REL32LSB:               howto manager.      (line 2081)
+* BFD_RELOC_IA64_REL32MSB:               howto manager.      (line 2080)
+* BFD_RELOC_IA64_REL64LSB:               howto manager.      (line 2083)
+* BFD_RELOC_IA64_REL64MSB:               howto manager.      (line 2082)
+* BFD_RELOC_IA64_SECREL32LSB:            howto manager.      (line 2077)
+* BFD_RELOC_IA64_SECREL32MSB:            howto manager.      (line 2076)
+* BFD_RELOC_IA64_SECREL64LSB:            howto manager.      (line 2079)
+* BFD_RELOC_IA64_SECREL64MSB:            howto manager.      (line 2078)
+* BFD_RELOC_IA64_SEGREL32LSB:            howto manager.      (line 2073)
+* BFD_RELOC_IA64_SEGREL32MSB:            howto manager.      (line 2072)
+* BFD_RELOC_IA64_SEGREL64LSB:            howto manager.      (line 2075)
+* BFD_RELOC_IA64_SEGREL64MSB:            howto manager.      (line 2074)
+* BFD_RELOC_IA64_TPREL14:                howto manager.      (line 2093)
+* BFD_RELOC_IA64_TPREL22:                howto manager.      (line 2094)
+* BFD_RELOC_IA64_TPREL64I:               howto manager.      (line 2095)
+* BFD_RELOC_IA64_TPREL64LSB:             howto manager.      (line 2097)
+* BFD_RELOC_IA64_TPREL64MSB:             howto manager.      (line 2096)
+* BFD_RELOC_IP2K_ADDR16CJP:              howto manager.      (line 1992)
+* BFD_RELOC_IP2K_BANK:                   howto manager.      (line 1990)
+* BFD_RELOC_IP2K_EX8DATA:                howto manager.      (line 1998)
+* BFD_RELOC_IP2K_FR9:                    howto manager.      (line 1988)
+* BFD_RELOC_IP2K_FR_OFFSET:              howto manager.      (line 2007)
+* BFD_RELOC_IP2K_HI8DATA:                howto manager.      (line 1997)
+* BFD_RELOC_IP2K_HI8INSN:                howto manager.      (line 2001)
+* BFD_RELOC_IP2K_LO8DATA:                howto manager.      (line 1996)
+* BFD_RELOC_IP2K_LO8INSN:                howto manager.      (line 2000)
+* BFD_RELOC_IP2K_PAGE3:                  howto manager.      (line 1994)
+* BFD_RELOC_IP2K_PC_SKIP:                howto manager.      (line 2003)
+* BFD_RELOC_IP2K_TEXT:                   howto manager.      (line 2005)
+* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 2526)
+* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 2527)
+* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 2528)
+* BFD_RELOC_LM32_16_GOT:                 howto manager.      (line 2618)
+* BFD_RELOC_LM32_BRANCH:                 howto manager.      (line 2617)
+* BFD_RELOC_LM32_CALL:                   howto manager.      (line 2616)
+* BFD_RELOC_LM32_COPY:                   howto manager.      (line 2621)
+* BFD_RELOC_LM32_GLOB_DAT:               howto manager.      (line 2622)
+* BFD_RELOC_LM32_GOTOFF_HI16:            howto manager.      (line 2619)
+* BFD_RELOC_LM32_GOTOFF_LO16:            howto manager.      (line 2620)
+* BFD_RELOC_LM32_JMP_SLOT:               howto manager.      (line 2623)
+* BFD_RELOC_LM32_RELATIVE:               howto manager.      (line 2624)
+* BFD_RELOC_LO10:                        howto manager.      (line  111)
+* BFD_RELOC_LO16:                        howto manager.      (line  323)
+* BFD_RELOC_LO16_BASEREL:                howto manager.      (line   93)
+* BFD_RELOC_LO16_GOTOFF:                 howto manager.      (line   52)
+* BFD_RELOC_LO16_PCREL:                  howto manager.      (line  329)
+* BFD_RELOC_LO16_PLTOFF:                 howto manager.      (line   64)
+* BFD_RELOC_M32C_HI8:                    howto manager.      (line 1176)
+* BFD_RELOC_M32C_RL_1ADDR:               howto manager.      (line 1178)
+* BFD_RELOC_M32C_RL_2ADDR:               howto manager.      (line 1179)
+* BFD_RELOC_M32C_RL_JUMP:                howto manager.      (line 1177)
+* BFD_RELOC_M32R_10_PCREL:               howto manager.      (line 1184)
+* BFD_RELOC_M32R_18_PCREL:               howto manager.      (line 1187)
+* BFD_RELOC_M32R_24:                     howto manager.      (line 1181)
+* BFD_RELOC_M32R_26_PCREL:               howto manager.      (line 1189)
+* BFD_RELOC_M32R_26_PLTREL:              howto manager.      (line 1203)
+* BFD_RELOC_M32R_COPY:                   howto manager.      (line 1204)
+* BFD_RELOC_M32R_GLOB_DAT:               howto manager.      (line 1205)
+* BFD_RELOC_M32R_GOT16_HI_SLO:           howto manager.      (line 1214)
+* BFD_RELOC_M32R_GOT16_HI_ULO:           howto manager.      (line 1213)
+* BFD_RELOC_M32R_GOT16_LO:               howto manager.      (line 1215)
+* BFD_RELOC_M32R_GOT24:                  howto manager.      (line 1202)
+* BFD_RELOC_M32R_GOTOFF:                 howto manager.      (line 1208)
+* BFD_RELOC_M32R_GOTOFF_HI_SLO:          howto manager.      (line 1210)
+* BFD_RELOC_M32R_GOTOFF_HI_ULO:          howto manager.      (line 1209)
+* BFD_RELOC_M32R_GOTOFF_LO:              howto manager.      (line 1211)
+* BFD_RELOC_M32R_GOTPC24:                howto manager.      (line 1212)
+* BFD_RELOC_M32R_GOTPC_HI_SLO:           howto manager.      (line 1217)
+* BFD_RELOC_M32R_GOTPC_HI_ULO:           howto manager.      (line 1216)
+* BFD_RELOC_M32R_GOTPC_LO:               howto manager.      (line 1218)
+* BFD_RELOC_M32R_HI16_SLO:               howto manager.      (line 1194)
+* BFD_RELOC_M32R_HI16_ULO:               howto manager.      (line 1191)
+* BFD_RELOC_M32R_JMP_SLOT:               howto manager.      (line 1206)
+* BFD_RELOC_M32R_LO16:                   howto manager.      (line 1197)
+* BFD_RELOC_M32R_RELATIVE:               howto manager.      (line 1207)
+* BFD_RELOC_M32R_SDA16:                  howto manager.      (line 1199)
+* BFD_RELOC_M68HC11_24:                  howto manager.      (line 2137)
+* BFD_RELOC_M68HC11_3B:                  howto manager.      (line 2117)
+* BFD_RELOC_M68HC11_HI8:                 howto manager.      (line 2111)
+* BFD_RELOC_M68HC11_LO16:                howto manager.      (line 2128)
+* BFD_RELOC_M68HC11_LO8:                 howto manager.      (line 2114)
+* BFD_RELOC_M68HC11_PAGE:                howto manager.      (line 2133)
+* BFD_RELOC_M68HC11_RL_GROUP:            howto manager.      (line 2124)
+* BFD_RELOC_M68HC11_RL_JUMP:             howto manager.      (line 2119)
+* BFD_RELOC_M68HC12_10_PCREL:            howto manager.      (line 2180)
+* BFD_RELOC_M68HC12_16B:                 howto manager.      (line 2176)
+* BFD_RELOC_M68HC12_5B:                  howto manager.      (line 2142)
+* BFD_RELOC_M68HC12_9B:                  howto manager.      (line 2174)
+* BFD_RELOC_M68HC12_9_PCREL:             howto manager.      (line 2178)
+* BFD_RELOC_M68HC12_HI8XG:               howto manager.      (line 2185)
+* BFD_RELOC_M68HC12_LO8XG:               howto manager.      (line 2182)
+* BFD_RELOC_MACH_O_ARM64_ADDEND:         howto manager.      (line 2652)
+* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21: howto manager.     (line 2654)
+* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12: howto manager.  (line 2656)
+* BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT: howto manager.      (line 2658)
+* BFD_RELOC_MACH_O_LOCAL_SECTDIFF:       howto manager.      (line 2629)
+* BFD_RELOC_MACH_O_PAIR:                 howto manager.      (line 2631)
+* BFD_RELOC_MACH_O_SECTDIFF:             howto manager.      (line 2626)
+* BFD_RELOC_MACH_O_SUBTRACTOR32:         howto manager.      (line 2633)
+* BFD_RELOC_MACH_O_SUBTRACTOR64:         howto manager.      (line 2635)
+* BFD_RELOC_MACH_O_X86_64_BRANCH32:      howto manager.      (line 2637)
+* BFD_RELOC_MACH_O_X86_64_BRANCH8:       howto manager.      (line 2638)
+* BFD_RELOC_MACH_O_X86_64_GOT:           howto manager.      (line 2641)
+* BFD_RELOC_MACH_O_X86_64_GOT_LOAD:      howto manager.      (line 2643)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_1:     howto manager.      (line 2646)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_2:     howto manager.      (line 2648)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_4:     howto manager.      (line 2650)
+* BFD_RELOC_MCORE_PCREL_32:              howto manager.      (line 1556)
+* BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.      (line 1554)
+* BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.      (line 1555)
+* BFD_RELOC_MCORE_PCREL_IMM8BY4:         howto manager.      (line 1553)
+* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2:    howto manager.      (line 1557)
+* BFD_RELOC_MCORE_RVA:                   howto manager.      (line 1558)
+* BFD_RELOC_MEP_16:                      howto manager.      (line 1561)
+* BFD_RELOC_MEP_32:                      howto manager.      (line 1562)
+* BFD_RELOC_MEP_8:                       howto manager.      (line 1560)
+* BFD_RELOC_MEP_ADDR24A4:                howto manager.      (line 1577)
+* BFD_RELOC_MEP_GNU_VTENTRY:             howto manager.      (line 1579)
+* BFD_RELOC_MEP_GNU_VTINHERIT:           howto manager.      (line 1578)
+* BFD_RELOC_MEP_GPREL:                   howto manager.      (line 1571)
+* BFD_RELOC_MEP_HI16S:                   howto manager.      (line 1570)
+* BFD_RELOC_MEP_HI16U:                   howto manager.      (line 1569)
+* BFD_RELOC_MEP_LOW16:                   howto manager.      (line 1568)
+* BFD_RELOC_MEP_PCABS24A2:               howto manager.      (line 1567)
+* BFD_RELOC_MEP_PCREL12A2:               howto manager.      (line 1564)
+* BFD_RELOC_MEP_PCREL17A2:               howto manager.      (line 1565)
+* BFD_RELOC_MEP_PCREL24A2:               howto manager.      (line 1566)
+* BFD_RELOC_MEP_PCREL8A2:                howto manager.      (line 1563)
+* BFD_RELOC_MEP_TPREL:                   howto manager.      (line 1572)
+* BFD_RELOC_MEP_TPREL7:                  howto manager.      (line 1573)
+* BFD_RELOC_MEP_TPREL7A2:                howto manager.      (line 1574)
+* BFD_RELOC_MEP_TPREL7A4:                howto manager.      (line 1575)
+* BFD_RELOC_MEP_UIMM24:                  howto manager.      (line 1576)
+* BFD_RELOC_METAG_COPY:                  howto manager.      (line 1600)
+* BFD_RELOC_METAG_GETSETOFF:             howto manager.      (line 1584)
+* BFD_RELOC_METAG_GETSET_GOT:            howto manager.      (line 1592)
+* BFD_RELOC_METAG_GETSET_GOTOFF:         howto manager.      (line 1591)
+* BFD_RELOC_METAG_GLOB_DAT:              howto manager.      (line 1603)
+* BFD_RELOC_METAG_GOTOFF:                howto manager.      (line 1598)
+* BFD_RELOC_METAG_HI16_GOTOFF:           howto manager.      (line 1589)
+* BFD_RELOC_METAG_HI16_GOTPC:            howto manager.      (line 1593)
+* BFD_RELOC_METAG_HI16_PLT:              howto manager.      (line 1595)
+* BFD_RELOC_METAG_HIADDR16:              howto manager.      (line 1581)
+* BFD_RELOC_METAG_HIOG:                  howto manager.      (line 1585)
+* BFD_RELOC_METAG_JMP_SLOT:              howto manager.      (line 1601)
+* BFD_RELOC_METAG_LO16_GOTOFF:           howto manager.      (line 1590)
+* BFD_RELOC_METAG_LO16_GOTPC:            howto manager.      (line 1594)
+* BFD_RELOC_METAG_LO16_PLT:              howto manager.      (line 1596)
+* BFD_RELOC_METAG_LOADDR16:              howto manager.      (line 1582)
+* BFD_RELOC_METAG_LOOG:                  howto manager.      (line 1586)
+* BFD_RELOC_METAG_PLT:                   howto manager.      (line 1599)
+* BFD_RELOC_METAG_REL16:                 howto manager.      (line 1588)
+* BFD_RELOC_METAG_REL8:                  howto manager.      (line 1587)
+* BFD_RELOC_METAG_RELATIVE:              howto manager.      (line 1602)
+* BFD_RELOC_METAG_RELBRANCH:             howto manager.      (line 1583)
+* BFD_RELOC_METAG_RELBRANCH_PLT:         howto manager.      (line 1597)
+* BFD_RELOC_METAG_TLS_DTPMOD:            howto manager.      (line 1614)
+* BFD_RELOC_METAG_TLS_DTPOFF:            howto manager.      (line 1615)
+* BFD_RELOC_METAG_TLS_GD:                howto manager.      (line 1604)
+* BFD_RELOC_METAG_TLS_IE:                howto manager.      (line 1609)
+* BFD_RELOC_METAG_TLS_IENONPIC:          howto manager.      (line 1610)
+* BFD_RELOC_METAG_TLS_IENONPIC_HI16:     howto manager.      (line 1611)
+* BFD_RELOC_METAG_TLS_IENONPIC_LO16:     howto manager.      (line 1612)
+* BFD_RELOC_METAG_TLS_LDM:               howto manager.      (line 1605)
+* BFD_RELOC_METAG_TLS_LDO:               howto manager.      (line 1608)
+* BFD_RELOC_METAG_TLS_LDO_HI16:          howto manager.      (line 1606)
+* BFD_RELOC_METAG_TLS_LDO_LO16:          howto manager.      (line 1607)
+* BFD_RELOC_METAG_TLS_LE:                howto manager.      (line 1616)
+* BFD_RELOC_METAG_TLS_LE_HI16:           howto manager.      (line 1617)
+* BFD_RELOC_METAG_TLS_LE_LO16:           howto manager.      (line 1618)
+* BFD_RELOC_METAG_TLS_TPOFF:             howto manager.      (line 1613)
+* BFD_RELOC_MICROBLAZE_32_GOTOFF:        howto manager.      (line 2694)
+* BFD_RELOC_MICROBLAZE_32_LO:            howto manager.      (line 2660)
+* BFD_RELOC_MICROBLAZE_32_LO_PCREL:      howto manager.      (line 2663)
+* BFD_RELOC_MICROBLAZE_32_ROSDA:         howto manager.      (line 2666)
+* BFD_RELOC_MICROBLAZE_32_RWSDA:         howto manager.      (line 2669)
+* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM:    howto manager.      (line 2672)
+* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD:     howto manager.      (line 2710)
+* BFD_RELOC_MICROBLAZE_32_TLSDTPREL:     howto manager.      (line 2712)
+* BFD_RELOC_MICROBLAZE_64_GOT:           howto manager.      (line 2683)
+* BFD_RELOC_MICROBLAZE_64_GOTOFF:        howto manager.      (line 2690)
+* BFD_RELOC_MICROBLAZE_64_GOTPC:         howto manager.      (line 2679)
+* BFD_RELOC_MICROBLAZE_64_NONE:          howto manager.      (line 2675)
+* BFD_RELOC_MICROBLAZE_64_PLT:           howto manager.      (line 2686)
+* BFD_RELOC_MICROBLAZE_64_TLS:           howto manager.      (line 2700)
+* BFD_RELOC_MICROBLAZE_64_TLSDTPREL:     howto manager.      (line 2714)
+* BFD_RELOC_MICROBLAZE_64_TLSGD:         howto manager.      (line 2702)
+* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL:   howto manager.      (line 2717)
+* BFD_RELOC_MICROBLAZE_64_TLSLD:         howto manager.      (line 2706)
+* BFD_RELOC_MICROBLAZE_64_TLSTPREL:      howto manager.      (line 2720)
+* BFD_RELOC_MICROBLAZE_COPY:             howto manager.      (line 2697)
+* BFD_RELOC_MICROMIPS_10_PCREL_S1:       howto manager.      (line  356)
+* BFD_RELOC_MICROMIPS_16_PCREL_S1:       howto manager.      (line  357)
+* BFD_RELOC_MICROMIPS_7_PCREL_S1:        howto manager.      (line  355)
+* BFD_RELOC_MICROMIPS_CALL16:            howto manager.      (line  374)
+* BFD_RELOC_MICROMIPS_CALL_HI16:         howto manager.      (line  380)
+* BFD_RELOC_MICROMIPS_CALL_LO16:         howto manager.      (line  382)
+* BFD_RELOC_MICROMIPS_GOT16:             howto manager.      (line  372)
+* BFD_RELOC_MICROMIPS_GOT_DISP:          howto manager.      (line  390)
+* BFD_RELOC_MICROMIPS_GOT_HI16:          howto manager.      (line  376)
+* BFD_RELOC_MICROMIPS_GOT_LO16:          howto manager.      (line  378)
+* BFD_RELOC_MICROMIPS_GOT_OFST:          howto manager.      (line  388)
+* BFD_RELOC_MICROMIPS_GOT_PAGE:          howto manager.      (line  386)
+* BFD_RELOC_MICROMIPS_GPREL16:           howto manager.      (line  366)
+* BFD_RELOC_MICROMIPS_HI16:              howto manager.      (line  367)
+* BFD_RELOC_MICROMIPS_HI16_S:            howto manager.      (line  368)
+* BFD_RELOC_MICROMIPS_HIGHER:            howto manager.      (line  399)
+* BFD_RELOC_MICROMIPS_HIGHEST:           howto manager.      (line  397)
+* BFD_RELOC_MICROMIPS_JALR:              howto manager.      (line  405)
+* BFD_RELOC_MICROMIPS_JMP:               howto manager.      (line  310)
+* BFD_RELOC_MICROMIPS_LITERAL:           howto manager.      (line  353)
+* BFD_RELOC_MICROMIPS_LO16:              howto manager.      (line  369)
+* BFD_RELOC_MICROMIPS_SCN_DISP:          howto manager.      (line  401)
+* BFD_RELOC_MICROMIPS_SUB:               howto manager.      (line  384)
+* BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16:   howto manager.      (line  415)
+* BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16:   howto manager.      (line  417)
+* BFD_RELOC_MICROMIPS_TLS_GD:            howto manager.      (line  411)
+* BFD_RELOC_MICROMIPS_TLS_GOTTPREL:      howto manager.      (line  419)
+* BFD_RELOC_MICROMIPS_TLS_LDM:           howto manager.      (line  413)
+* BFD_RELOC_MICROMIPS_TLS_TPREL_HI16:    howto manager.      (line  423)
+* BFD_RELOC_MICROMIPS_TLS_TPREL_LO16:    howto manager.      (line  425)
+* BFD_RELOC_MIPS16_16_PCREL_S1:          howto manager.      (line  359)
+* BFD_RELOC_MIPS16_CALL16:               howto manager.      (line  332)
+* BFD_RELOC_MIPS16_GOT16:                howto manager.      (line  331)
+* BFD_RELOC_MIPS16_GPREL:                howto manager.      (line  314)
+* BFD_RELOC_MIPS16_HI16:                 howto manager.      (line  335)
+* BFD_RELOC_MIPS16_HI16_S:               howto manager.      (line  337)
+* BFD_RELOC_MIPS16_JMP:                  howto manager.      (line  312)
+* BFD_RELOC_MIPS16_LO16:                 howto manager.      (line  342)
+* BFD_RELOC_MIPS16_TLS_DTPREL_HI16:      howto manager.      (line  346)
+* BFD_RELOC_MIPS16_TLS_DTPREL_LO16:      howto manager.      (line  347)
+* BFD_RELOC_MIPS16_TLS_GD:               howto manager.      (line  344)
+* BFD_RELOC_MIPS16_TLS_GOTTPREL:         howto manager.      (line  348)
+* BFD_RELOC_MIPS16_TLS_LDM:              howto manager.      (line  345)
+* BFD_RELOC_MIPS16_TLS_TPREL_HI16:       howto manager.      (line  349)
+* BFD_RELOC_MIPS16_TLS_TPREL_LO16:       howto manager.      (line  350)
+* BFD_RELOC_MIPS_18_PCREL_S3:            howto manager.      (line  363)
+* BFD_RELOC_MIPS_19_PCREL_S2:            howto manager.      (line  364)
+* BFD_RELOC_MIPS_21_PCREL_S2:            howto manager.      (line  361)
+* BFD_RELOC_MIPS_26_PCREL_S2:            howto manager.      (line  362)
+* BFD_RELOC_MIPS_CALL16:                 howto manager.      (line  373)
+* BFD_RELOC_MIPS_CALL_HI16:              howto manager.      (line  379)
+* BFD_RELOC_MIPS_CALL_LO16:              howto manager.      (line  381)
+* BFD_RELOC_MIPS_COPY:                   howto manager.      (line  428)
+* BFD_RELOC_MIPS_DELETE:                 howto manager.      (line  395)
+* BFD_RELOC_MIPS_EH:                     howto manager.      (line  426)
+* BFD_RELOC_MIPS_GOT16:                  howto manager.      (line  371)
+* BFD_RELOC_MIPS_GOT_DISP:               howto manager.      (line  389)
+* BFD_RELOC_MIPS_GOT_HI16:               howto manager.      (line  375)
+* BFD_RELOC_MIPS_GOT_LO16:               howto manager.      (line  377)
+* BFD_RELOC_MIPS_GOT_OFST:               howto manager.      (line  387)
+* BFD_RELOC_MIPS_GOT_PAGE:               howto manager.      (line  385)
+* BFD_RELOC_MIPS_HIGHER:                 howto manager.      (line  398)
+* BFD_RELOC_MIPS_HIGHEST:                howto manager.      (line  396)
+* BFD_RELOC_MIPS_INSERT_A:               howto manager.      (line  393)
+* BFD_RELOC_MIPS_INSERT_B:               howto manager.      (line  394)
+* BFD_RELOC_MIPS_JALR:                   howto manager.      (line  404)
+* BFD_RELOC_MIPS_JMP:                    howto manager.      (line  309)
+* BFD_RELOC_MIPS_JUMP_SLOT:              howto manager.      (line  429)
+* BFD_RELOC_MIPS_LITERAL:                howto manager.      (line  352)
+* BFD_RELOC_MIPS_REL16:                  howto manager.      (line  402)
+* BFD_RELOC_MIPS_RELGOT:                 howto manager.      (line  403)
+* BFD_RELOC_MIPS_SCN_DISP:               howto manager.      (line  400)
+* BFD_RELOC_MIPS_SHIFT5:                 howto manager.      (line  391)
+* BFD_RELOC_MIPS_SHIFT6:                 howto manager.      (line  392)
+* BFD_RELOC_MIPS_SUB:                    howto manager.      (line  383)
+* BFD_RELOC_MIPS_TLS_DTPMOD32:           howto manager.      (line  406)
+* BFD_RELOC_MIPS_TLS_DTPMOD64:           howto manager.      (line  408)
+* BFD_RELOC_MIPS_TLS_DTPREL32:           howto manager.      (line  407)
+* BFD_RELOC_MIPS_TLS_DTPREL64:           howto manager.      (line  409)
+* BFD_RELOC_MIPS_TLS_DTPREL_HI16:        howto manager.      (line  414)
+* BFD_RELOC_MIPS_TLS_DTPREL_LO16:        howto manager.      (line  416)
+* BFD_RELOC_MIPS_TLS_GD:                 howto manager.      (line  410)
+* BFD_RELOC_MIPS_TLS_GOTTPREL:           howto manager.      (line  418)
+* BFD_RELOC_MIPS_TLS_LDM:                howto manager.      (line  412)
+* BFD_RELOC_MIPS_TLS_TPREL32:            howto manager.      (line  420)
+* BFD_RELOC_MIPS_TLS_TPREL64:            howto manager.      (line  421)
+* BFD_RELOC_MIPS_TLS_TPREL_HI16:         howto manager.      (line  422)
+* BFD_RELOC_MIPS_TLS_TPREL_LO16:         howto manager.      (line  424)
+* BFD_RELOC_MMIX_ADDR19:                 howto manager.      (line 1642)
+* BFD_RELOC_MMIX_ADDR27:                 howto manager.      (line 1645)
+* BFD_RELOC_MMIX_BASE_PLUS_OFFSET:       howto manager.      (line 1654)
+* BFD_RELOC_MMIX_CBRANCH:                howto manager.      (line 1625)
+* BFD_RELOC_MMIX_CBRANCH_1:              howto manager.      (line 1627)
+* BFD_RELOC_MMIX_CBRANCH_2:              howto manager.      (line 1628)
+* BFD_RELOC_MMIX_CBRANCH_3:              howto manager.      (line 1629)
+* BFD_RELOC_MMIX_CBRANCH_J:              howto manager.      (line 1626)
+* BFD_RELOC_MMIX_GETA:                   howto manager.      (line 1620)
+* BFD_RELOC_MMIX_GETA_1:                 howto manager.      (line 1621)
+* BFD_RELOC_MMIX_GETA_2:                 howto manager.      (line 1622)
+* BFD_RELOC_MMIX_GETA_3:                 howto manager.      (line 1623)
+* BFD_RELOC_MMIX_JMP:                    howto manager.      (line 1637)
+* BFD_RELOC_MMIX_JMP_1:                  howto manager.      (line 1638)
+* BFD_RELOC_MMIX_JMP_2:                  howto manager.      (line 1639)
+* BFD_RELOC_MMIX_JMP_3:                  howto manager.      (line 1640)
+* BFD_RELOC_MMIX_LOCAL:                  howto manager.      (line 1657)
+* BFD_RELOC_MMIX_PUSHJ:                  howto manager.      (line 1631)
+* BFD_RELOC_MMIX_PUSHJ_1:                howto manager.      (line 1632)
+* BFD_RELOC_MMIX_PUSHJ_2:                howto manager.      (line 1633)
+* BFD_RELOC_MMIX_PUSHJ_3:                howto manager.      (line 1634)
+* BFD_RELOC_MMIX_PUSHJ_STUBBABLE:        howto manager.      (line 1635)
+* BFD_RELOC_MMIX_REG:                    howto manager.      (line 1651)
+* BFD_RELOC_MMIX_REG_OR_BYTE:            howto manager.      (line 1648)
+* BFD_RELOC_MN10300_16_PCREL:            howto manager.      (line  517)
+* BFD_RELOC_MN10300_32_PCREL:            howto manager.      (line  514)
+* BFD_RELOC_MN10300_ALIGN:               howto manager.      (line  501)
+* BFD_RELOC_MN10300_COPY:                howto manager.      (line  489)
+* BFD_RELOC_MN10300_GLOB_DAT:            howto manager.      (line  491)
+* BFD_RELOC_MN10300_GOT16:               howto manager.      (line  486)
+* BFD_RELOC_MN10300_GOT24:               howto manager.      (line  483)
+* BFD_RELOC_MN10300_GOT32:               howto manager.      (line  480)
+* BFD_RELOC_MN10300_GOTOFF24:            howto manager.      (line  478)
+* BFD_RELOC_MN10300_JMP_SLOT:            howto manager.      (line  493)
+* BFD_RELOC_MN10300_RELATIVE:            howto manager.      (line  495)
+* BFD_RELOC_MN10300_SYM_DIFF:            howto manager.      (line  497)
+* BFD_RELOC_MN10300_TLS_DTPMOD:          howto manager.      (line  510)
+* BFD_RELOC_MN10300_TLS_DTPOFF:          howto manager.      (line  511)
+* BFD_RELOC_MN10300_TLS_GD:              howto manager.      (line  504)
+* BFD_RELOC_MN10300_TLS_GOTIE:           howto manager.      (line  507)
+* BFD_RELOC_MN10300_TLS_IE:              howto manager.      (line  508)
+* BFD_RELOC_MN10300_TLS_LD:              howto manager.      (line  505)
+* BFD_RELOC_MN10300_TLS_LDO:             howto manager.      (line  506)
+* BFD_RELOC_MN10300_TLS_LE:              howto manager.      (line  509)
+* BFD_RELOC_MN10300_TLS_TPOFF:           howto manager.      (line  512)
+* BFD_RELOC_MOXIE_10_PCREL:              howto manager.      (line  431)
+* BFD_RELOC_MSP430X_ABS16:               howto manager.      (line 2440)
+* BFD_RELOC_MSP430X_ABS20_ADR_DST:       howto manager.      (line 2437)
+* BFD_RELOC_MSP430X_ABS20_ADR_SRC:       howto manager.      (line 2436)
+* BFD_RELOC_MSP430X_ABS20_EXT_DST:       howto manager.      (line 2434)
+* BFD_RELOC_MSP430X_ABS20_EXT_ODST:      howto manager.      (line 2435)
+* BFD_RELOC_MSP430X_ABS20_EXT_SRC:       howto manager.      (line 2433)
+* BFD_RELOC_MSP430X_PCR16:               howto manager.      (line 2438)
+* BFD_RELOC_MSP430X_PCR20_CALL:          howto manager.      (line 2439)
+* BFD_RELOC_MSP430X_PCR20_EXT_DST:       howto manager.      (line 2431)
+* BFD_RELOC_MSP430X_PCR20_EXT_ODST:      howto manager.      (line 2432)
+* BFD_RELOC_MSP430X_PCR20_EXT_SRC:       howto manager.      (line 2430)
+* BFD_RELOC_MSP430_10_PCREL:             howto manager.      (line 2422)
+* BFD_RELOC_MSP430_16:                   howto manager.      (line 2424)
+* BFD_RELOC_MSP430_16_BYTE:              howto manager.      (line 2426)
+* BFD_RELOC_MSP430_16_PCREL:             howto manager.      (line 2423)
+* BFD_RELOC_MSP430_16_PCREL_BYTE:        howto manager.      (line 2425)
+* BFD_RELOC_MSP430_2X_PCREL:             howto manager.      (line 2427)
+* BFD_RELOC_MSP430_ABS8:                 howto manager.      (line 2429)
+* BFD_RELOC_MSP430_ABS_HI16:             howto manager.      (line 2441)
+* BFD_RELOC_MSP430_PREL31:               howto manager.      (line 2442)
+* BFD_RELOC_MSP430_RL_PCREL:             howto manager.      (line 2428)
+* BFD_RELOC_MSP430_SYM_DIFF:             howto manager.      (line 2443)
+* BFD_RELOC_MT_GNU_VTENTRY:              howto manager.      (line 2418)
+* BFD_RELOC_MT_GNU_VTINHERIT:            howto manager.      (line 2416)
+* BFD_RELOC_MT_HI16:                     howto manager.      (line 2412)
+* BFD_RELOC_MT_LO16:                     howto manager.      (line 2414)
+* BFD_RELOC_MT_PC16:                     howto manager.      (line 2410)
+* BFD_RELOC_MT_PCINSN8:                  howto manager.      (line 2420)
+* BFD_RELOC_NDS32_10IFCU_PCREL:          howto manager.      (line 1370)
+* BFD_RELOC_NDS32_10_UPCREL:             howto manager.      (line 1341)
+* BFD_RELOC_NDS32_15_FIXED:              howto manager.      (line 1302)
+* BFD_RELOC_NDS32_15_PCREL:              howto manager.      (line 1228)
+* BFD_RELOC_NDS32_17IFC_PCREL:           howto manager.      (line 1369)
+* BFD_RELOC_NDS32_17_FIXED:              howto manager.      (line 1303)
+* BFD_RELOC_NDS32_17_PCREL:              howto manager.      (line 1230)
+* BFD_RELOC_NDS32_20:                    howto manager.      (line 1220)
+* BFD_RELOC_NDS32_25_ABS:                howto manager.      (line 1365)
+* BFD_RELOC_NDS32_25_FIXED:              howto manager.      (line 1304)
+* BFD_RELOC_NDS32_25_PCREL:              howto manager.      (line 1232)
+* BFD_RELOC_NDS32_25_PLTREL:             howto manager.      (line 1278)
+* BFD_RELOC_NDS32_5:                     howto manager.      (line 1339)
+* BFD_RELOC_NDS32_9_FIXED:               howto manager.      (line 1301)
+* BFD_RELOC_NDS32_9_PCREL:               howto manager.      (line 1222)
+* BFD_RELOC_NDS32_9_PLTREL:              howto manager.      (line 1277)
+* BFD_RELOC_NDS32_COPY:                  howto manager.      (line 1279)
+* BFD_RELOC_NDS32_DATA:                  howto manager.      (line 1367)
+* BFD_RELOC_NDS32_DIFF16:                howto manager.      (line 1360)
+* BFD_RELOC_NDS32_DIFF32:                howto manager.      (line 1361)
+* BFD_RELOC_NDS32_DIFF8:                 howto manager.      (line 1359)
+* BFD_RELOC_NDS32_DIFF_ULEB128:          howto manager.      (line 1362)
+* BFD_RELOC_NDS32_DWARF2_LEB:            howto manager.      (line 1325)
+* BFD_RELOC_NDS32_DWARF2_OP1:            howto manager.      (line 1323)
+* BFD_RELOC_NDS32_DWARF2_OP2:            howto manager.      (line 1324)
+* BFD_RELOC_NDS32_EMPTY:                 howto manager.      (line 1363)
+* BFD_RELOC_NDS32_GLOB_DAT:              howto manager.      (line 1280)
+* BFD_RELOC_NDS32_GOT15S2:               howto manager.      (line 1336)
+* BFD_RELOC_NDS32_GOT17S2:               howto manager.      (line 1337)
+* BFD_RELOC_NDS32_GOT20:                 howto manager.      (line 1276)
+* BFD_RELOC_NDS32_GOTOFF:                howto manager.      (line 1283)
+* BFD_RELOC_NDS32_GOTOFF_HI20:           howto manager.      (line 1284)
+* BFD_RELOC_NDS32_GOTOFF_LO12:           howto manager.      (line 1285)
+* BFD_RELOC_NDS32_GOTOFF_LO15:           howto manager.      (line 1334)
+* BFD_RELOC_NDS32_GOTOFF_LO19:           howto manager.      (line 1335)
+* BFD_RELOC_NDS32_GOTOFF_SUFF:           howto manager.      (line 1348)
+* BFD_RELOC_NDS32_GOTPC20:               howto manager.      (line 1286)
+* BFD_RELOC_NDS32_GOTPC_HI20:            howto manager.      (line 1289)
+* BFD_RELOC_NDS32_GOTPC_LO12:            howto manager.      (line 1290)
+* BFD_RELOC_NDS32_GOTTPOFF:              howto manager.      (line 1377)
+* BFD_RELOC_NDS32_GOT_HI20:              howto manager.      (line 1287)
+* BFD_RELOC_NDS32_GOT_LO12:              howto manager.      (line 1288)
+* BFD_RELOC_NDS32_GOT_LO15:              howto manager.      (line 1332)
+* BFD_RELOC_NDS32_GOT_LO19:              howto manager.      (line 1333)
+* BFD_RELOC_NDS32_GOT_SUFF:              howto manager.      (line 1347)
+* BFD_RELOC_NDS32_HI20:                  howto manager.      (line 1234)
+* BFD_RELOC_NDS32_INSN16:                howto manager.      (line 1292)
+* BFD_RELOC_NDS32_JMP_SLOT:              howto manager.      (line 1281)
+* BFD_RELOC_NDS32_LABEL:                 howto manager.      (line 1293)
+* BFD_RELOC_NDS32_LO12S0:                howto manager.      (line 1246)
+* BFD_RELOC_NDS32_LO12S0_ORI:            howto manager.      (line 1249)
+* BFD_RELOC_NDS32_LO12S1:                howto manager.      (line 1243)
+* BFD_RELOC_NDS32_LO12S2:                howto manager.      (line 1240)
+* BFD_RELOC_NDS32_LO12S2_DP:             howto manager.      (line 1320)
+* BFD_RELOC_NDS32_LO12S2_SP:             howto manager.      (line 1321)
+* BFD_RELOC_NDS32_LO12S3:                howto manager.      (line 1237)
+* BFD_RELOC_NDS32_LOADSTORE:             howto manager.      (line 1300)
+* BFD_RELOC_NDS32_LONGCALL1:             howto manager.      (line 1294)
+* BFD_RELOC_NDS32_LONGCALL2:             howto manager.      (line 1295)
+* BFD_RELOC_NDS32_LONGCALL3:             howto manager.      (line 1296)
+* BFD_RELOC_NDS32_LONGCALL4:             howto manager.      (line 1305)
+* BFD_RELOC_NDS32_LONGCALL5:             howto manager.      (line 1306)
+* BFD_RELOC_NDS32_LONGCALL6:             howto manager.      (line 1307)
+* BFD_RELOC_NDS32_LONGJUMP1:             howto manager.      (line 1297)
+* BFD_RELOC_NDS32_LONGJUMP2:             howto manager.      (line 1298)
+* BFD_RELOC_NDS32_LONGJUMP3:             howto manager.      (line 1299)
+* BFD_RELOC_NDS32_LONGJUMP4:             howto manager.      (line 1308)
+* BFD_RELOC_NDS32_LONGJUMP5:             howto manager.      (line 1309)
+* BFD_RELOC_NDS32_LONGJUMP6:             howto manager.      (line 1310)
+* BFD_RELOC_NDS32_LONGJUMP7:             howto manager.      (line 1311)
+* BFD_RELOC_NDS32_MINUEND:               howto manager.      (line 1357)
+* BFD_RELOC_NDS32_MULCALL_SUFF:          howto manager.      (line 1350)
+* BFD_RELOC_NDS32_PLTBLOCK:              howto manager.      (line 1354)
+* BFD_RELOC_NDS32_PLTREL_HI20:           howto manager.      (line 1313)
+* BFD_RELOC_NDS32_PLTREL_LO12:           howto manager.      (line 1314)
+* BFD_RELOC_NDS32_PLT_GOTREL_HI20:       howto manager.      (line 1315)
+* BFD_RELOC_NDS32_PLT_GOTREL_LO12:       howto manager.      (line 1316)
+* BFD_RELOC_NDS32_PLT_GOTREL_LO15:       howto manager.      (line 1330)
+* BFD_RELOC_NDS32_PLT_GOTREL_LO19:       howto manager.      (line 1331)
+* BFD_RELOC_NDS32_PLT_GOTREL_LO20:       howto manager.      (line 1329)
+* BFD_RELOC_NDS32_PLT_GOT_SUFF:          howto manager.      (line 1349)
+* BFD_RELOC_NDS32_PTR:                   howto manager.      (line 1351)
+* BFD_RELOC_NDS32_PTR_COUNT:             howto manager.      (line 1352)
+* BFD_RELOC_NDS32_PTR_RESOLVED:          howto manager.      (line 1353)
+* BFD_RELOC_NDS32_RELATIVE:              howto manager.      (line 1282)
+* BFD_RELOC_NDS32_RELAX_ENTRY:           howto manager.      (line 1346)
+* BFD_RELOC_NDS32_RELAX_REGION_BEGIN:    howto manager.      (line 1355)
+* BFD_RELOC_NDS32_RELAX_REGION_END:      howto manager.      (line 1356)
+* BFD_RELOC_NDS32_SDA12S2_DP:            howto manager.      (line 1318)
+* BFD_RELOC_NDS32_SDA12S2_SP:            howto manager.      (line 1319)
+* BFD_RELOC_NDS32_SDA15S0:               howto manager.      (line 1261)
+* BFD_RELOC_NDS32_SDA15S1:               howto manager.      (line 1258)
+* BFD_RELOC_NDS32_SDA15S2:               howto manager.      (line 1255)
+* BFD_RELOC_NDS32_SDA15S3:               howto manager.      (line 1252)
+* BFD_RELOC_NDS32_SDA16S3:               howto manager.      (line 1264)
+* BFD_RELOC_NDS32_SDA17S2:               howto manager.      (line 1267)
+* BFD_RELOC_NDS32_SDA18S1:               howto manager.      (line 1270)
+* BFD_RELOC_NDS32_SDA19S0:               howto manager.      (line 1273)
+* BFD_RELOC_NDS32_SDA_FP7U2_RELA:        howto manager.      (line 1344)
+* BFD_RELOC_NDS32_SUBTRAHEND:            howto manager.      (line 1358)
+* BFD_RELOC_NDS32_TLS_IE_HI20:           howto manager.      (line 1378)
+* BFD_RELOC_NDS32_TLS_IE_LO12S2:         howto manager.      (line 1379)
+* BFD_RELOC_NDS32_TLS_LE_15S0:           howto manager.      (line 1382)
+* BFD_RELOC_NDS32_TLS_LE_15S1:           howto manager.      (line 1383)
+* BFD_RELOC_NDS32_TLS_LE_15S2:           howto manager.      (line 1384)
+* BFD_RELOC_NDS32_TLS_LE_20:             howto manager.      (line 1381)
+* BFD_RELOC_NDS32_TLS_LE_ADD:            howto manager.      (line 1375)
+* BFD_RELOC_NDS32_TLS_LE_HI20:           howto manager.      (line 1373)
+* BFD_RELOC_NDS32_TLS_LE_LO12:           howto manager.      (line 1374)
+* BFD_RELOC_NDS32_TLS_LE_LS:             howto manager.      (line 1376)
+* BFD_RELOC_NDS32_TLS_TPOFF:             howto manager.      (line 1380)
+* BFD_RELOC_NDS32_TPOFF:                 howto manager.      (line 1372)
+* BFD_RELOC_NDS32_TRAN:                  howto manager.      (line 1368)
+* BFD_RELOC_NDS32_UPDATE_TA:             howto manager.      (line 1327)
+* BFD_RELOC_NDS32_WORD_9_PCREL:          howto manager.      (line 1225)
+* BFD_RELOC_NIOS2_ALIGN:                 howto manager.      (line 2459)
+* BFD_RELOC_NIOS2_CACHE_OPX:             howto manager.      (line 2449)
+* BFD_RELOC_NIOS2_CALL16:                howto manager.      (line 2461)
+* BFD_RELOC_NIOS2_CALL26:                howto manager.      (line 2447)
+* BFD_RELOC_NIOS2_CALL26_NOAT:           howto manager.      (line 2479)
+* BFD_RELOC_NIOS2_CALLR:                 howto manager.      (line 2458)
+* BFD_RELOC_NIOS2_CALL_HA:               howto manager.      (line 2483)
+* BFD_RELOC_NIOS2_CALL_LO:               howto manager.      (line 2482)
+* BFD_RELOC_NIOS2_CJMP:                  howto manager.      (line 2457)
+* BFD_RELOC_NIOS2_COPY:                  howto manager.      (line 2474)
+* BFD_RELOC_NIOS2_GLOB_DAT:              howto manager.      (line 2475)
+* BFD_RELOC_NIOS2_GOT16:                 howto manager.      (line 2460)
+* BFD_RELOC_NIOS2_GOTOFF:                howto manager.      (line 2478)
+* BFD_RELOC_NIOS2_GOTOFF_HA:             howto manager.      (line 2463)
+* BFD_RELOC_NIOS2_GOTOFF_LO:             howto manager.      (line 2462)
+* BFD_RELOC_NIOS2_GOT_HA:                howto manager.      (line 2481)
+* BFD_RELOC_NIOS2_GOT_LO:                howto manager.      (line 2480)
+* BFD_RELOC_NIOS2_GPREL:                 howto manager.      (line 2455)
+* BFD_RELOC_NIOS2_HI16:                  howto manager.      (line 2452)
+* BFD_RELOC_NIOS2_HIADJ16:               howto manager.      (line 2454)
+* BFD_RELOC_NIOS2_IMM5:                  howto manager.      (line 2448)
+* BFD_RELOC_NIOS2_IMM6:                  howto manager.      (line 2450)
+* BFD_RELOC_NIOS2_IMM8:                  howto manager.      (line 2451)
+* BFD_RELOC_NIOS2_JUMP_SLOT:             howto manager.      (line 2476)
+* BFD_RELOC_NIOS2_LO16:                  howto manager.      (line 2453)
+* BFD_RELOC_NIOS2_PCREL_HA:              howto manager.      (line 2465)
+* BFD_RELOC_NIOS2_PCREL_LO:              howto manager.      (line 2464)
+* BFD_RELOC_NIOS2_R2_F1I5_2:             howto manager.      (line 2493)
+* BFD_RELOC_NIOS2_R2_I10_1_PCREL:        howto manager.      (line 2485)
+* BFD_RELOC_NIOS2_R2_L5I4X1:             howto manager.      (line 2494)
+* BFD_RELOC_NIOS2_R2_S12:                howto manager.      (line 2484)
+* BFD_RELOC_NIOS2_R2_T1I7_1_PCREL:       howto manager.      (line 2486)
+* BFD_RELOC_NIOS2_R2_T1I7_2:             howto manager.      (line 2487)
+* BFD_RELOC_NIOS2_R2_T1X1I6:             howto manager.      (line 2495)
+* BFD_RELOC_NIOS2_R2_T1X1I6_2:           howto manager.      (line 2496)
+* BFD_RELOC_NIOS2_R2_T2I4:               howto manager.      (line 2488)
+* BFD_RELOC_NIOS2_R2_T2I4_1:             howto manager.      (line 2489)
+* BFD_RELOC_NIOS2_R2_T2I4_2:             howto manager.      (line 2490)
+* BFD_RELOC_NIOS2_R2_X1I7_2:             howto manager.      (line 2491)
+* BFD_RELOC_NIOS2_R2_X2L5:               howto manager.      (line 2492)
+* BFD_RELOC_NIOS2_RELATIVE:              howto manager.      (line 2477)
+* BFD_RELOC_NIOS2_S16:                   howto manager.      (line 2445)
+* BFD_RELOC_NIOS2_TLS_DTPMOD:            howto manager.      (line 2471)
+* BFD_RELOC_NIOS2_TLS_DTPREL:            howto manager.      (line 2472)
+* BFD_RELOC_NIOS2_TLS_GD16:              howto manager.      (line 2466)
+* BFD_RELOC_NIOS2_TLS_IE16:              howto manager.      (line 2469)
+* BFD_RELOC_NIOS2_TLS_LDM16:             howto manager.      (line 2467)
+* BFD_RELOC_NIOS2_TLS_LDO16:             howto manager.      (line 2468)
+* BFD_RELOC_NIOS2_TLS_LE16:              howto manager.      (line 2470)
+* BFD_RELOC_NIOS2_TLS_TPREL:             howto manager.      (line 2473)
+* BFD_RELOC_NIOS2_U16:                   howto manager.      (line 2446)
+* BFD_RELOC_NIOS2_UJMP:                  howto manager.      (line 2456)
+* BFD_RELOC_NONE:                        howto manager.      (line  122)
+* BFD_RELOC_NS32K_DISP_16:               howto manager.      (line  585)
+* BFD_RELOC_NS32K_DISP_16_PCREL:         howto manager.      (line  588)
+* BFD_RELOC_NS32K_DISP_32:               howto manager.      (line  586)
+* BFD_RELOC_NS32K_DISP_32_PCREL:         howto manager.      (line  589)
+* BFD_RELOC_NS32K_DISP_8:                howto manager.      (line  584)
+* BFD_RELOC_NS32K_DISP_8_PCREL:          howto manager.      (line  587)
+* BFD_RELOC_NS32K_IMM_16:                howto manager.      (line  579)
+* BFD_RELOC_NS32K_IMM_16_PCREL:          howto manager.      (line  582)
+* BFD_RELOC_NS32K_IMM_32:                howto manager.      (line  580)
+* BFD_RELOC_NS32K_IMM_32_PCREL:          howto manager.      (line  583)
+* BFD_RELOC_NS32K_IMM_8:                 howto manager.      (line  578)
+* BFD_RELOC_NS32K_IMM_8_PCREL:           howto manager.      (line  581)
+* BFD_RELOC_OR1K_COPY:                   howto manager.      (line 2369)
+* BFD_RELOC_OR1K_GLOB_DAT:               howto manager.      (line 2370)
+* BFD_RELOC_OR1K_GOT16:                  howto manager.      (line 2365)
+* BFD_RELOC_OR1K_GOTOFF_HI16:            howto manager.      (line 2367)
+* BFD_RELOC_OR1K_GOTOFF_LO16:            howto manager.      (line 2368)
+* BFD_RELOC_OR1K_GOTPC_HI16:             howto manager.      (line 2363)
+* BFD_RELOC_OR1K_GOTPC_LO16:             howto manager.      (line 2364)
+* BFD_RELOC_OR1K_JMP_SLOT:               howto manager.      (line 2371)
+* BFD_RELOC_OR1K_PLT26:                  howto manager.      (line 2366)
+* BFD_RELOC_OR1K_RELATIVE:               howto manager.      (line 2372)
+* BFD_RELOC_OR1K_REL_26:                 howto manager.      (line 2362)
+* BFD_RELOC_OR1K_TLS_DTPMOD:             howto manager.      (line 2385)
+* BFD_RELOC_OR1K_TLS_DTPOFF:             howto manager.      (line 2384)
+* BFD_RELOC_OR1K_TLS_GD_HI16:            howto manager.      (line 2373)
+* BFD_RELOC_OR1K_TLS_GD_LO16:            howto manager.      (line 2374)
+* BFD_RELOC_OR1K_TLS_IE_HI16:            howto manager.      (line 2379)
+* BFD_RELOC_OR1K_TLS_IE_LO16:            howto manager.      (line 2380)
+* BFD_RELOC_OR1K_TLS_LDM_HI16:           howto manager.      (line 2375)
+* BFD_RELOC_OR1K_TLS_LDM_LO16:           howto manager.      (line 2376)
+* BFD_RELOC_OR1K_TLS_LDO_HI16:           howto manager.      (line 2377)
+* BFD_RELOC_OR1K_TLS_LDO_LO16:           howto manager.      (line 2378)
+* BFD_RELOC_OR1K_TLS_LE_HI16:            howto manager.      (line 2381)
+* BFD_RELOC_OR1K_TLS_LE_LO16:            howto manager.      (line 2382)
+* BFD_RELOC_OR1K_TLS_TPOFF:              howto manager.      (line 2383)
+* BFD_RELOC_PDP11_DISP_6_PCREL:          howto manager.      (line  592)
+* BFD_RELOC_PDP11_DISP_8_PCREL:          howto manager.      (line  591)
+* BFD_RELOC_PJ_CODE_DIR16:               howto manager.      (line  596)
+* BFD_RELOC_PJ_CODE_DIR32:               howto manager.      (line  597)
+* BFD_RELOC_PJ_CODE_HI16:                howto manager.      (line  594)
+* BFD_RELOC_PJ_CODE_LO16:                howto manager.      (line  595)
+* BFD_RELOC_PJ_CODE_REL16:               howto manager.      (line  598)
+* BFD_RELOC_PJ_CODE_REL32:               howto manager.      (line  599)
+* BFD_RELOC_PPC64_ADDR16_DS:             howto manager.      (line  662)
+* BFD_RELOC_PPC64_ADDR16_HIGH:           howto manager.      (line  673)
+* BFD_RELOC_PPC64_ADDR16_HIGHA:          howto manager.      (line  674)
+* BFD_RELOC_PPC64_ADDR16_LO_DS:          howto manager.      (line  663)
+* BFD_RELOC_PPC64_ADDR64_LOCAL:          howto manager.      (line  675)
+* BFD_RELOC_PPC64_DTPREL16_DS:           howto manager.      (line  714)
+* BFD_RELOC_PPC64_DTPREL16_HIGH:         howto manager.      (line  722)
+* BFD_RELOC_PPC64_DTPREL16_HIGHA:        howto manager.      (line  723)
+* BFD_RELOC_PPC64_DTPREL16_HIGHER:       howto manager.      (line  716)
+* BFD_RELOC_PPC64_DTPREL16_HIGHERA:      howto manager.      (line  717)
+* BFD_RELOC_PPC64_DTPREL16_HIGHEST:      howto manager.      (line  718)
+* BFD_RELOC_PPC64_DTPREL16_HIGHESTA:     howto manager.      (line  719)
+* BFD_RELOC_PPC64_DTPREL16_LO_DS:        howto manager.      (line  715)
+* BFD_RELOC_PPC64_ENTRY:                 howto manager.      (line  676)
+* BFD_RELOC_PPC64_GOT16_DS:              howto manager.      (line  664)
+* BFD_RELOC_PPC64_GOT16_LO_DS:           howto manager.      (line  665)
+* BFD_RELOC_PPC64_HIGHER:                howto manager.      (line  650)
+* BFD_RELOC_PPC64_HIGHER_S:              howto manager.      (line  651)
+* BFD_RELOC_PPC64_HIGHEST:               howto manager.      (line  652)
+* BFD_RELOC_PPC64_HIGHEST_S:             howto manager.      (line  653)
+* BFD_RELOC_PPC64_PLT16_LO_DS:           howto manager.      (line  666)
+* BFD_RELOC_PPC64_PLTGOT16:              howto manager.      (line  658)
+* BFD_RELOC_PPC64_PLTGOT16_DS:           howto manager.      (line  671)
+* BFD_RELOC_PPC64_PLTGOT16_HA:           howto manager.      (line  661)
+* BFD_RELOC_PPC64_PLTGOT16_HI:           howto manager.      (line  660)
+* BFD_RELOC_PPC64_PLTGOT16_LO:           howto manager.      (line  659)
+* BFD_RELOC_PPC64_PLTGOT16_LO_DS:        howto manager.      (line  672)
+* BFD_RELOC_PPC64_SECTOFF_DS:            howto manager.      (line  667)
+* BFD_RELOC_PPC64_SECTOFF_LO_DS:         howto manager.      (line  668)
+* BFD_RELOC_PPC64_TOC:                   howto manager.      (line  657)
+* BFD_RELOC_PPC64_TOC16_DS:              howto manager.      (line  669)
+* BFD_RELOC_PPC64_TOC16_HA:              howto manager.      (line  656)
+* BFD_RELOC_PPC64_TOC16_HI:              howto manager.      (line  655)
+* BFD_RELOC_PPC64_TOC16_LO:              howto manager.      (line  654)
+* BFD_RELOC_PPC64_TOC16_LO_DS:           howto manager.      (line  670)
+* BFD_RELOC_PPC64_TPREL16_DS:            howto manager.      (line  708)
+* BFD_RELOC_PPC64_TPREL16_HIGH:          howto manager.      (line  720)
+* BFD_RELOC_PPC64_TPREL16_HIGHA:         howto manager.      (line  721)
+* BFD_RELOC_PPC64_TPREL16_HIGHER:        howto manager.      (line  710)
+* BFD_RELOC_PPC64_TPREL16_HIGHERA:       howto manager.      (line  711)
+* BFD_RELOC_PPC64_TPREL16_HIGHEST:       howto manager.      (line  712)
+* BFD_RELOC_PPC64_TPREL16_HIGHESTA:      howto manager.      (line  713)
+* BFD_RELOC_PPC64_TPREL16_LO_DS:         howto manager.      (line  709)
+* BFD_RELOC_PPC_16DX_HA:                 howto manager.      (line  648)
+* BFD_RELOC_PPC_B16:                     howto manager.      (line  604)
+* BFD_RELOC_PPC_B16_BRNTAKEN:            howto manager.      (line  606)
+* BFD_RELOC_PPC_B16_BRTAKEN:             howto manager.      (line  605)
+* BFD_RELOC_PPC_B26:                     howto manager.      (line  601)
+* BFD_RELOC_PPC_BA16:                    howto manager.      (line  607)
+* BFD_RELOC_PPC_BA16_BRNTAKEN:           howto manager.      (line  609)
+* BFD_RELOC_PPC_BA16_BRTAKEN:            howto manager.      (line  608)
+* BFD_RELOC_PPC_BA26:                    howto manager.      (line  602)
+* BFD_RELOC_PPC_COPY:                    howto manager.      (line  610)
+* BFD_RELOC_PPC_DTPMOD:                  howto manager.      (line  681)
+* BFD_RELOC_PPC_DTPREL:                  howto manager.      (line  691)
+* BFD_RELOC_PPC_DTPREL16:                howto manager.      (line  687)
+* BFD_RELOC_PPC_DTPREL16_HA:             howto manager.      (line  690)
+* BFD_RELOC_PPC_DTPREL16_HI:             howto manager.      (line  689)
+* BFD_RELOC_PPC_DTPREL16_LO:             howto manager.      (line  688)
+* BFD_RELOC_PPC_EMB_BIT_FLD:             howto manager.      (line  629)
+* BFD_RELOC_PPC_EMB_MRKREF:              howto manager.      (line  624)
+* BFD_RELOC_PPC_EMB_NADDR16:             howto manager.      (line  616)
+* BFD_RELOC_PPC_EMB_NADDR16_HA:          howto manager.      (line  619)
+* BFD_RELOC_PPC_EMB_NADDR16_HI:          howto manager.      (line  618)
+* BFD_RELOC_PPC_EMB_NADDR16_LO:          howto manager.      (line  617)
+* BFD_RELOC_PPC_EMB_NADDR32:             howto manager.      (line  615)
+* BFD_RELOC_PPC_EMB_RELSDA:              howto manager.      (line  630)
+* BFD_RELOC_PPC_EMB_RELSEC16:            howto manager.      (line  625)
+* BFD_RELOC_PPC_EMB_RELST_HA:            howto manager.      (line  628)
+* BFD_RELOC_PPC_EMB_RELST_HI:            howto manager.      (line  627)
+* BFD_RELOC_PPC_EMB_RELST_LO:            howto manager.      (line  626)
+* BFD_RELOC_PPC_EMB_SDA21:               howto manager.      (line  623)
+* BFD_RELOC_PPC_EMB_SDA2I16:             howto manager.      (line  621)
+* BFD_RELOC_PPC_EMB_SDA2REL:             howto manager.      (line  622)
+* BFD_RELOC_PPC_EMB_SDAI16:              howto manager.      (line  620)
+* BFD_RELOC_PPC_GLOB_DAT:                howto manager.      (line  611)
+* BFD_RELOC_PPC_GOT_DTPREL16:            howto manager.      (line  704)
+* BFD_RELOC_PPC_GOT_DTPREL16_HA:         howto manager.      (line  707)
+* BFD_RELOC_PPC_GOT_DTPREL16_HI:         howto manager.      (line  706)
+* BFD_RELOC_PPC_GOT_DTPREL16_LO:         howto manager.      (line  705)
+* BFD_RELOC_PPC_GOT_TLSGD16:             howto manager.      (line  692)
+* BFD_RELOC_PPC_GOT_TLSGD16_HA:          howto manager.      (line  695)
+* BFD_RELOC_PPC_GOT_TLSGD16_HI:          howto manager.      (line  694)
+* BFD_RELOC_PPC_GOT_TLSGD16_LO:          howto manager.      (line  693)
+* BFD_RELOC_PPC_GOT_TLSLD16:             howto manager.      (line  696)
+* BFD_RELOC_PPC_GOT_TLSLD16_HA:          howto manager.      (line  699)
+* BFD_RELOC_PPC_GOT_TLSLD16_HI:          howto manager.      (line  698)
+* BFD_RELOC_PPC_GOT_TLSLD16_LO:          howto manager.      (line  697)
+* BFD_RELOC_PPC_GOT_TPREL16:             howto manager.      (line  700)
+* BFD_RELOC_PPC_GOT_TPREL16_HA:          howto manager.      (line  703)
+* BFD_RELOC_PPC_GOT_TPREL16_HI:          howto manager.      (line  702)
+* BFD_RELOC_PPC_GOT_TPREL16_LO:          howto manager.      (line  701)
+* BFD_RELOC_PPC_JMP_SLOT:                howto manager.      (line  612)
+* BFD_RELOC_PPC_LOCAL24PC:               howto manager.      (line  614)
+* BFD_RELOC_PPC_REL16DX_HA:              howto manager.      (line  649)
+* BFD_RELOC_PPC_RELATIVE:                howto manager.      (line  613)
+* BFD_RELOC_PPC_TLS:                     howto manager.      (line  678)
+* BFD_RELOC_PPC_TLSGD:                   howto manager.      (line  679)
+* BFD_RELOC_PPC_TLSLD:                   howto manager.      (line  680)
+* BFD_RELOC_PPC_TOC16:                   howto manager.      (line  603)
+* BFD_RELOC_PPC_TPREL:                   howto manager.      (line  686)
+* BFD_RELOC_PPC_TPREL16:                 howto manager.      (line  682)
+* BFD_RELOC_PPC_TPREL16_HA:              howto manager.      (line  685)
+* BFD_RELOC_PPC_TPREL16_HI:              howto manager.      (line  684)
+* BFD_RELOC_PPC_TPREL16_LO:              howto manager.      (line  683)
+* BFD_RELOC_PPC_VLE_HA16A:               howto manager.      (line  638)
+* BFD_RELOC_PPC_VLE_HA16D:               howto manager.      (line  639)
+* BFD_RELOC_PPC_VLE_HI16A:               howto manager.      (line  636)
+* BFD_RELOC_PPC_VLE_HI16D:               howto manager.      (line  637)
+* BFD_RELOC_PPC_VLE_LO16A:               howto manager.      (line  634)
+* BFD_RELOC_PPC_VLE_LO16D:               howto manager.      (line  635)
+* BFD_RELOC_PPC_VLE_REL15:               howto manager.      (line  632)
+* BFD_RELOC_PPC_VLE_REL24:               howto manager.      (line  633)
+* BFD_RELOC_PPC_VLE_REL8:                howto manager.      (line  631)
+* BFD_RELOC_PPC_VLE_SDA21:               howto manager.      (line  640)
+* BFD_RELOC_PPC_VLE_SDA21_LO:            howto manager.      (line  641)
+* BFD_RELOC_PPC_VLE_SDAREL_HA16A:        howto manager.      (line  646)
+* BFD_RELOC_PPC_VLE_SDAREL_HA16D:        howto manager.      (line  647)
+* BFD_RELOC_PPC_VLE_SDAREL_HI16A:        howto manager.      (line  644)
+* BFD_RELOC_PPC_VLE_SDAREL_HI16D:        howto manager.      (line  645)
+* BFD_RELOC_PPC_VLE_SDAREL_LO16A:        howto manager.      (line  642)
+* BFD_RELOC_PPC_VLE_SDAREL_LO16D:        howto manager.      (line  643)
+* BFD_RELOC_PRU_16_PMEM:                 howto manager.      (line 2511)
+* BFD_RELOC_PRU_32_PMEM:                 howto manager.      (line 2510)
+* BFD_RELOC_PRU_GNU_DIFF16:              howto manager.      (line 2515)
+* BFD_RELOC_PRU_GNU_DIFF16_PMEM:         howto manager.      (line 2517)
+* BFD_RELOC_PRU_GNU_DIFF32:              howto manager.      (line 2516)
+* BFD_RELOC_PRU_GNU_DIFF32_PMEM:         howto manager.      (line 2518)
+* BFD_RELOC_PRU_GNU_DIFF8:               howto manager.      (line 2514)
+* BFD_RELOC_PRU_LDI32:                   howto manager.      (line 2502)
+* BFD_RELOC_PRU_S10_PCREL:               howto manager.      (line 2506)
+* BFD_RELOC_PRU_U16:                     howto manager.      (line 2498)
+* BFD_RELOC_PRU_U16_PMEMIMM:             howto manager.      (line 2500)
+* BFD_RELOC_PRU_U8_PCREL:                howto manager.      (line 2508)
+* BFD_RELOC_RELC:                        howto manager.      (line 2399)
+* BFD_RELOC_RISCV_ADD16:                 howto manager.      (line 1782)
+* BFD_RELOC_RISCV_ADD32:                 howto manager.      (line 1783)
+* BFD_RELOC_RISCV_ADD64:                 howto manager.      (line 1784)
+* BFD_RELOC_RISCV_ADD8:                  howto manager.      (line 1781)
+* BFD_RELOC_RISCV_ALIGN:                 howto manager.      (line 1799)
+* BFD_RELOC_RISCV_CALL:                  howto manager.      (line 1779)
+* BFD_RELOC_RISCV_CALL_PLT:              howto manager.      (line 1780)
+* BFD_RELOC_RISCV_CFA:                   howto manager.      (line 1808)
+* BFD_RELOC_RISCV_GOT_HI20:              howto manager.      (line 1789)
+* BFD_RELOC_RISCV_GPREL12_I:             howto manager.      (line 1773)
+* BFD_RELOC_RISCV_GPREL12_S:             howto manager.      (line 1774)
+* BFD_RELOC_RISCV_GPREL_I:               howto manager.      (line 1803)
+* BFD_RELOC_RISCV_GPREL_S:               howto manager.      (line 1804)
+* BFD_RELOC_RISCV_HI20:                  howto manager.      (line 1767)
+* BFD_RELOC_RISCV_JMP:                   howto manager.      (line 1792)
+* BFD_RELOC_RISCV_LO12_I:                howto manager.      (line 1771)
+* BFD_RELOC_RISCV_LO12_S:                howto manager.      (line 1772)
+* BFD_RELOC_RISCV_PCREL_HI20:            howto manager.      (line 1768)
+* BFD_RELOC_RISCV_PCREL_LO12_I:          howto manager.      (line 1769)
+* BFD_RELOC_RISCV_PCREL_LO12_S:          howto manager.      (line 1770)
+* BFD_RELOC_RISCV_RELAX:                 howto manager.      (line 1807)
+* BFD_RELOC_RISCV_RVC_BRANCH:            howto manager.      (line 1800)
+* BFD_RELOC_RISCV_RVC_JUMP:              howto manager.      (line 1801)
+* BFD_RELOC_RISCV_RVC_LUI:               howto manager.      (line 1802)
+* BFD_RELOC_RISCV_SET16:                 howto manager.      (line 1812)
+* BFD_RELOC_RISCV_SET32:                 howto manager.      (line 1813)
+* BFD_RELOC_RISCV_SET6:                  howto manager.      (line 1810)
+* BFD_RELOC_RISCV_SET8:                  howto manager.      (line 1811)
+* BFD_RELOC_RISCV_SUB16:                 howto manager.      (line 1786)
+* BFD_RELOC_RISCV_SUB32:                 howto manager.      (line 1787)
+* BFD_RELOC_RISCV_SUB6:                  howto manager.      (line 1809)
+* BFD_RELOC_RISCV_SUB64:                 howto manager.      (line 1788)
+* BFD_RELOC_RISCV_SUB8:                  howto manager.      (line 1785)
+* BFD_RELOC_RISCV_TLS_DTPMOD32:          howto manager.      (line 1793)
+* BFD_RELOC_RISCV_TLS_DTPMOD64:          howto manager.      (line 1795)
+* BFD_RELOC_RISCV_TLS_DTPREL32:          howto manager.      (line 1794)
+* BFD_RELOC_RISCV_TLS_DTPREL64:          howto manager.      (line 1796)
+* BFD_RELOC_RISCV_TLS_GD_HI20:           howto manager.      (line 1791)
+* BFD_RELOC_RISCV_TLS_GOT_HI20:          howto manager.      (line 1790)
+* BFD_RELOC_RISCV_TLS_TPREL32:           howto manager.      (line 1797)
+* BFD_RELOC_RISCV_TLS_TPREL64:           howto manager.      (line 1798)
+* BFD_RELOC_RISCV_TPREL_ADD:             howto manager.      (line 1778)
+* BFD_RELOC_RISCV_TPREL_HI20:            howto manager.      (line 1775)
+* BFD_RELOC_RISCV_TPREL_I:               howto manager.      (line 1805)
+* BFD_RELOC_RISCV_TPREL_LO12_I:          howto manager.      (line 1776)
+* BFD_RELOC_RISCV_TPREL_LO12_S:          howto manager.      (line 1777)
+* BFD_RELOC_RISCV_TPREL_S:               howto manager.      (line 1806)
+* BFD_RELOC_RL78_16U:                    howto manager.      (line 1823)
+* BFD_RELOC_RL78_16_OP:                  howto manager.      (line 1819)
+* BFD_RELOC_RL78_24U:                    howto manager.      (line 1824)
+* BFD_RELOC_RL78_24_OP:                  howto manager.      (line 1820)
+* BFD_RELOC_RL78_32_OP:                  howto manager.      (line 1821)
+* BFD_RELOC_RL78_8U:                     howto manager.      (line 1822)
+* BFD_RELOC_RL78_ABS16:                  howto manager.      (line 1836)
+* BFD_RELOC_RL78_ABS16U:                 howto manager.      (line 1840)
+* BFD_RELOC_RL78_ABS16UL:                howto manager.      (line 1842)
+* BFD_RELOC_RL78_ABS16UW:                howto manager.      (line 1841)
+* BFD_RELOC_RL78_ABS16_REV:              howto manager.      (line 1837)
+* BFD_RELOC_RL78_ABS32:                  howto manager.      (line 1838)
+* BFD_RELOC_RL78_ABS32_REV:              howto manager.      (line 1839)
+* BFD_RELOC_RL78_ABS8:                   howto manager.      (line 1835)
+* BFD_RELOC_RL78_CODE:                   howto manager.      (line 1847)
+* BFD_RELOC_RL78_DIFF:                   howto manager.      (line 1826)
+* BFD_RELOC_RL78_DIR3U_PCREL:            howto manager.      (line 1825)
+* BFD_RELOC_RL78_GPRELB:                 howto manager.      (line 1827)
+* BFD_RELOC_RL78_GPRELL:                 howto manager.      (line 1829)
+* BFD_RELOC_RL78_GPRELW:                 howto manager.      (line 1828)
+* BFD_RELOC_RL78_HI16:                   howto manager.      (line 1844)
+* BFD_RELOC_RL78_HI8:                    howto manager.      (line 1845)
+* BFD_RELOC_RL78_LO16:                   howto manager.      (line 1846)
+* BFD_RELOC_RL78_NEG16:                  howto manager.      (line 1816)
+* BFD_RELOC_RL78_NEG24:                  howto manager.      (line 1817)
+* BFD_RELOC_RL78_NEG32:                  howto manager.      (line 1818)
+* BFD_RELOC_RL78_NEG8:                   howto manager.      (line 1815)
+* BFD_RELOC_RL78_OP_AND:                 howto manager.      (line 1833)
+* BFD_RELOC_RL78_OP_NEG:                 howto manager.      (line 1832)
+* BFD_RELOC_RL78_OP_SHRA:                howto manager.      (line 1834)
+* BFD_RELOC_RL78_OP_SUBTRACT:            howto manager.      (line 1831)
+* BFD_RELOC_RL78_RELAX:                  howto manager.      (line 1843)
+* BFD_RELOC_RL78_SADDR:                  howto manager.      (line 1848)
+* BFD_RELOC_RL78_SYM:                    howto manager.      (line 1830)
+* BFD_RELOC_RVA:                         howto manager.      (line   97)
+* BFD_RELOC_RX_16U:                      howto manager.      (line 1858)
+* BFD_RELOC_RX_16_OP:                    howto manager.      (line 1854)
+* BFD_RELOC_RX_24U:                      howto manager.      (line 1859)
+* BFD_RELOC_RX_24_OP:                    howto manager.      (line 1855)
+* BFD_RELOC_RX_32_OP:                    howto manager.      (line 1856)
+* BFD_RELOC_RX_8U:                       howto manager.      (line 1857)
+* BFD_RELOC_RX_ABS16:                    howto manager.      (line 1869)
+* BFD_RELOC_RX_ABS16U:                   howto manager.      (line 1873)
+* BFD_RELOC_RX_ABS16UL:                  howto manager.      (line 1875)
+* BFD_RELOC_RX_ABS16UW:                  howto manager.      (line 1874)
+* BFD_RELOC_RX_ABS16_REV:                howto manager.      (line 1870)
+* BFD_RELOC_RX_ABS32:                    howto manager.      (line 1871)
+* BFD_RELOC_RX_ABS32_REV:                howto manager.      (line 1872)
+* BFD_RELOC_RX_ABS8:                     howto manager.      (line 1868)
+* BFD_RELOC_RX_DIFF:                     howto manager.      (line 1861)
+* BFD_RELOC_RX_DIR3U_PCREL:              howto manager.      (line 1860)
+* BFD_RELOC_RX_GPRELB:                   howto manager.      (line 1862)
+* BFD_RELOC_RX_GPRELL:                   howto manager.      (line 1864)
+* BFD_RELOC_RX_GPRELW:                   howto manager.      (line 1863)
+* BFD_RELOC_RX_NEG16:                    howto manager.      (line 1851)
+* BFD_RELOC_RX_NEG24:                    howto manager.      (line 1852)
+* BFD_RELOC_RX_NEG32:                    howto manager.      (line 1853)
+* BFD_RELOC_RX_NEG8:                     howto manager.      (line 1850)
+* BFD_RELOC_RX_OP_NEG:                   howto manager.      (line 1867)
+* BFD_RELOC_RX_OP_SUBTRACT:              howto manager.      (line 1866)
+* BFD_RELOC_RX_RELAX:                    howto manager.      (line 1876)
+* BFD_RELOC_RX_SYM:                      howto manager.      (line 1865)
+* BFD_RELOC_SCORE16_BRANCH:              howto manager.      (line 1979)
+* BFD_RELOC_SCORE16_JMP:                 howto manager.      (line 1977)
+* BFD_RELOC_SCORE_BCMP:                  howto manager.      (line 1981)
+* BFD_RELOC_SCORE_BRANCH:                howto manager.      (line 1971)
+* BFD_RELOC_SCORE_CALL15:                howto manager.      (line 1985)
+* BFD_RELOC_SCORE_DUMMY2:                howto manager.      (line 1968)
+* BFD_RELOC_SCORE_DUMMY_HI16:            howto manager.      (line 1986)
+* BFD_RELOC_SCORE_GOT15:                 howto manager.      (line 1983)
+* BFD_RELOC_SCORE_GOT_LO16:              howto manager.      (line 1984)
+* BFD_RELOC_SCORE_GPREL15:               howto manager.      (line 1966)
+* BFD_RELOC_SCORE_IMM30:                 howto manager.      (line 1973)
+* BFD_RELOC_SCORE_IMM32:                 howto manager.      (line 1975)
+* BFD_RELOC_SCORE_JMP:                   howto manager.      (line 1969)
+* BFD_RELOC_SH_ALIGN:                    howto manager.      (line  899)
+* BFD_RELOC_SH_CODE:                     howto manager.      (line  900)
+* BFD_RELOC_SH_COPY:                     howto manager.      (line  905)
+* BFD_RELOC_SH_COPY64:                   howto manager.      (line  930)
+* BFD_RELOC_SH_COUNT:                    howto manager.      (line  898)
+* BFD_RELOC_SH_DATA:                     howto manager.      (line  901)
+* BFD_RELOC_SH_DISP12:                   howto manager.      (line  881)
+* BFD_RELOC_SH_DISP12BY2:                howto manager.      (line  882)
+* BFD_RELOC_SH_DISP12BY4:                howto manager.      (line  883)
+* BFD_RELOC_SH_DISP12BY8:                howto manager.      (line  884)
+* BFD_RELOC_SH_DISP20:                   howto manager.      (line  885)
+* BFD_RELOC_SH_DISP20BY8:                howto manager.      (line  886)
+* BFD_RELOC_SH_FUNCDESC:                 howto manager.      (line  973)
+* BFD_RELOC_SH_GLOB_DAT:                 howto manager.      (line  906)
+* BFD_RELOC_SH_GLOB_DAT64:               howto manager.      (line  931)
+* BFD_RELOC_SH_GOT10BY4:                 howto manager.      (line  934)
+* BFD_RELOC_SH_GOT10BY8:                 howto manager.      (line  935)
+* BFD_RELOC_SH_GOT20:                    howto manager.      (line  967)
+* BFD_RELOC_SH_GOTFUNCDESC:              howto manager.      (line  969)
+* BFD_RELOC_SH_GOTFUNCDESC20:            howto manager.      (line  970)
+* BFD_RELOC_SH_GOTOFF20:                 howto manager.      (line  968)
+* BFD_RELOC_SH_GOTOFFFUNCDESC:           howto manager.      (line  971)
+* BFD_RELOC_SH_GOTOFFFUNCDESC20:         howto manager.      (line  972)
+* BFD_RELOC_SH_GOTOFF_HI16:              howto manager.      (line  925)
+* BFD_RELOC_SH_GOTOFF_LOW16:             howto manager.      (line  922)
+* BFD_RELOC_SH_GOTOFF_MEDHI16:           howto manager.      (line  924)
+* BFD_RELOC_SH_GOTOFF_MEDLOW16:          howto manager.      (line  923)
+* BFD_RELOC_SH_GOTPC:                    howto manager.      (line  909)
+* BFD_RELOC_SH_GOTPC_HI16:               howto manager.      (line  929)
+* BFD_RELOC_SH_GOTPC_LOW16:              howto manager.      (line  926)
+* BFD_RELOC_SH_GOTPC_MEDHI16:            howto manager.      (line  928)
+* BFD_RELOC_SH_GOTPC_MEDLOW16:           howto manager.      (line  927)
+* BFD_RELOC_SH_GOTPLT10BY4:              howto manager.      (line  936)
+* BFD_RELOC_SH_GOTPLT10BY8:              howto manager.      (line  937)
+* BFD_RELOC_SH_GOTPLT32:                 howto manager.      (line  938)
+* BFD_RELOC_SH_GOTPLT_HI16:              howto manager.      (line  917)
+* BFD_RELOC_SH_GOTPLT_LOW16:             howto manager.      (line  914)
+* BFD_RELOC_SH_GOTPLT_MEDHI16:           howto manager.      (line  916)
+* BFD_RELOC_SH_GOTPLT_MEDLOW16:          howto manager.      (line  915)
+* BFD_RELOC_SH_GOT_HI16:                 howto manager.      (line  913)
+* BFD_RELOC_SH_GOT_LOW16:                howto manager.      (line  910)
+* BFD_RELOC_SH_GOT_MEDHI16:              howto manager.      (line  912)
+* BFD_RELOC_SH_GOT_MEDLOW16:             howto manager.      (line  911)
+* BFD_RELOC_SH_IMM3:                     howto manager.      (line  879)
+* BFD_RELOC_SH_IMM3U:                    howto manager.      (line  880)
+* BFD_RELOC_SH_IMM4:                     howto manager.      (line  887)
+* BFD_RELOC_SH_IMM4BY2:                  howto manager.      (line  888)
+* BFD_RELOC_SH_IMM4BY4:                  howto manager.      (line  889)
+* BFD_RELOC_SH_IMM8:                     howto manager.      (line  890)
+* BFD_RELOC_SH_IMM8BY2:                  howto manager.      (line  891)
+* BFD_RELOC_SH_IMM8BY4:                  howto manager.      (line  892)
+* BFD_RELOC_SH_IMMS10:                   howto manager.      (line  944)
+* BFD_RELOC_SH_IMMS10BY2:                howto manager.      (line  945)
+* BFD_RELOC_SH_IMMS10BY4:                howto manager.      (line  946)
+* BFD_RELOC_SH_IMMS10BY8:                howto manager.      (line  947)
+* BFD_RELOC_SH_IMMS16:                   howto manager.      (line  948)
+* BFD_RELOC_SH_IMMS6:                    howto manager.      (line  941)
+* BFD_RELOC_SH_IMMS6BY32:                howto manager.      (line  942)
+* BFD_RELOC_SH_IMMU16:                   howto manager.      (line  949)
+* BFD_RELOC_SH_IMMU5:                    howto manager.      (line  940)
+* BFD_RELOC_SH_IMMU6:                    howto manager.      (line  943)
+* BFD_RELOC_SH_IMM_HI16:                 howto manager.      (line  956)
+* BFD_RELOC_SH_IMM_HI16_PCREL:           howto manager.      (line  957)
+* BFD_RELOC_SH_IMM_LOW16:                howto manager.      (line  950)
+* BFD_RELOC_SH_IMM_LOW16_PCREL:          howto manager.      (line  951)
+* BFD_RELOC_SH_IMM_MEDHI16:              howto manager.      (line  954)
+* BFD_RELOC_SH_IMM_MEDHI16_PCREL:        howto manager.      (line  955)
+* BFD_RELOC_SH_IMM_MEDLOW16:             howto manager.      (line  952)
+* BFD_RELOC_SH_IMM_MEDLOW16_PCREL:       howto manager.      (line  953)
+* BFD_RELOC_SH_JMP_SLOT:                 howto manager.      (line  907)
+* BFD_RELOC_SH_JMP_SLOT64:               howto manager.      (line  932)
+* BFD_RELOC_SH_LABEL:                    howto manager.      (line  902)
+* BFD_RELOC_SH_LOOP_END:                 howto manager.      (line  904)
+* BFD_RELOC_SH_LOOP_START:               howto manager.      (line  903)
+* BFD_RELOC_SH_PCDISP12BY2:              howto manager.      (line  878)
+* BFD_RELOC_SH_PCDISP8BY2:               howto manager.      (line  877)
+* BFD_RELOC_SH_PCRELIMM8BY2:             howto manager.      (line  893)
+* BFD_RELOC_SH_PCRELIMM8BY4:             howto manager.      (line  894)
+* BFD_RELOC_SH_PLT_HI16:                 howto manager.      (line  921)
+* BFD_RELOC_SH_PLT_LOW16:                howto manager.      (line  918)
+* BFD_RELOC_SH_PLT_MEDHI16:              howto manager.      (line  920)
+* BFD_RELOC_SH_PLT_MEDLOW16:             howto manager.      (line  919)
+* BFD_RELOC_SH_PT_16:                    howto manager.      (line  958)
+* BFD_RELOC_SH_RELATIVE:                 howto manager.      (line  908)
+* BFD_RELOC_SH_RELATIVE64:               howto manager.      (line  933)
+* BFD_RELOC_SH_SHMEDIA_CODE:             howto manager.      (line  939)
+* BFD_RELOC_SH_SWITCH16:                 howto manager.      (line  895)
+* BFD_RELOC_SH_SWITCH32:                 howto manager.      (line  896)
+* BFD_RELOC_SH_TLS_DTPMOD32:             howto manager.      (line  964)
+* BFD_RELOC_SH_TLS_DTPOFF32:             howto manager.      (line  965)
+* BFD_RELOC_SH_TLS_GD_32:                howto manager.      (line  959)
+* BFD_RELOC_SH_TLS_IE_32:                howto manager.      (line  962)
+* BFD_RELOC_SH_TLS_LDO_32:               howto manager.      (line  961)
+* BFD_RELOC_SH_TLS_LD_32:                howto manager.      (line  960)
+* BFD_RELOC_SH_TLS_LE_32:                howto manager.      (line  963)
+* BFD_RELOC_SH_TLS_TPOFF32:              howto manager.      (line  966)
+* BFD_RELOC_SH_USES:                     howto manager.      (line  897)
+* BFD_RELOC_SIZE32:                      howto manager.      (line   69)
+* BFD_RELOC_SIZE64:                      howto manager.      (line   70)
+* BFD_RELOC_SPARC13:                     howto manager.      (line  125)
+* BFD_RELOC_SPARC22:                     howto manager.      (line  124)
+* BFD_RELOC_SPARC_10:                    howto manager.      (line  152)
+* BFD_RELOC_SPARC_11:                    howto manager.      (line  153)
+* BFD_RELOC_SPARC_5:                     howto manager.      (line  165)
+* BFD_RELOC_SPARC_6:                     howto manager.      (line  164)
+* BFD_RELOC_SPARC_64:                    howto manager.      (line  151)
+* BFD_RELOC_SPARC_7:                     howto manager.      (line  163)
+* BFD_RELOC_SPARC_BASE13:                howto manager.      (line  148)
+* BFD_RELOC_SPARC_BASE22:                howto manager.      (line  149)
+* BFD_RELOC_SPARC_COPY:                  howto manager.      (line  132)
+* BFD_RELOC_SPARC_DISP64:                howto manager.      (line  166)
+* BFD_RELOC_SPARC_GLOB_DAT:              howto manager.      (line  133)
+* BFD_RELOC_SPARC_GOT10:                 howto manager.      (line  126)
+* BFD_RELOC_SPARC_GOT13:                 howto manager.      (line  127)
+* BFD_RELOC_SPARC_GOT22:                 howto manager.      (line  128)
+* BFD_RELOC_SPARC_GOTDATA_HIX22:         howto manager.      (line  139)
+* BFD_RELOC_SPARC_GOTDATA_LOX10:         howto manager.      (line  140)
+* BFD_RELOC_SPARC_GOTDATA_OP:            howto manager.      (line  143)
+* BFD_RELOC_SPARC_GOTDATA_OP_HIX22:      howto manager.      (line  141)
+* BFD_RELOC_SPARC_GOTDATA_OP_LOX10:      howto manager.      (line  142)
+* BFD_RELOC_SPARC_H34:                   howto manager.      (line  175)
+* BFD_RELOC_SPARC_H44:                   howto manager.      (line  171)
+* BFD_RELOC_SPARC_HH22:                  howto manager.      (line  155)
+* BFD_RELOC_SPARC_HIX22:                 howto manager.      (line  169)
+* BFD_RELOC_SPARC_HM10:                  howto manager.      (line  156)
+* BFD_RELOC_SPARC_IRELATIVE:             howto manager.      (line  145)
+* BFD_RELOC_SPARC_JMP_IREL:              howto manager.      (line  144)
+* BFD_RELOC_SPARC_JMP_SLOT:              howto manager.      (line  134)
+* BFD_RELOC_SPARC_L44:                   howto manager.      (line  173)
+* BFD_RELOC_SPARC_LM22:                  howto manager.      (line  157)
+* BFD_RELOC_SPARC_LOX10:                 howto manager.      (line  170)
+* BFD_RELOC_SPARC_M44:                   howto manager.      (line  172)
+* BFD_RELOC_SPARC_OLO10:                 howto manager.      (line  154)
+* BFD_RELOC_SPARC_PC10:                  howto manager.      (line  129)
+* BFD_RELOC_SPARC_PC22:                  howto manager.      (line  130)
+* BFD_RELOC_SPARC_PC_HH22:               howto manager.      (line  158)
+* BFD_RELOC_SPARC_PC_HM10:               howto manager.      (line  159)
+* BFD_RELOC_SPARC_PC_LM22:               howto manager.      (line  160)
+* BFD_RELOC_SPARC_PLT32:                 howto manager.      (line  167)
+* BFD_RELOC_SPARC_PLT64:                 howto manager.      (line  168)
+* BFD_RELOC_SPARC_REGISTER:              howto manager.      (line  174)
+* BFD_RELOC_SPARC_RELATIVE:              howto manager.      (line  135)
+* BFD_RELOC_SPARC_REV32:                 howto manager.      (line  180)
+* BFD_RELOC_SPARC_SIZE32:                howto manager.      (line  176)
+* BFD_RELOC_SPARC_SIZE64:                howto manager.      (line  177)
+* BFD_RELOC_SPARC_TLS_DTPMOD32:          howto manager.      (line  200)
+* BFD_RELOC_SPARC_TLS_DTPMOD64:          howto manager.      (line  201)
+* BFD_RELOC_SPARC_TLS_DTPOFF32:          howto manager.      (line  202)
+* BFD_RELOC_SPARC_TLS_DTPOFF64:          howto manager.      (line  203)
+* BFD_RELOC_SPARC_TLS_GD_ADD:            howto manager.      (line  184)
+* BFD_RELOC_SPARC_TLS_GD_CALL:           howto manager.      (line  185)
+* BFD_RELOC_SPARC_TLS_GD_HI22:           howto manager.      (line  182)
+* BFD_RELOC_SPARC_TLS_GD_LO10:           howto manager.      (line  183)
+* BFD_RELOC_SPARC_TLS_IE_ADD:            howto manager.      (line  197)
+* BFD_RELOC_SPARC_TLS_IE_HI22:           howto manager.      (line  193)
+* BFD_RELOC_SPARC_TLS_IE_LD:             howto manager.      (line  195)
+* BFD_RELOC_SPARC_TLS_IE_LDX:            howto manager.      (line  196)
+* BFD_RELOC_SPARC_TLS_IE_LO10:           howto manager.      (line  194)
+* BFD_RELOC_SPARC_TLS_LDM_ADD:           howto manager.      (line  188)
+* BFD_RELOC_SPARC_TLS_LDM_CALL:          howto manager.      (line  189)
+* BFD_RELOC_SPARC_TLS_LDM_HI22:          howto manager.      (line  186)
+* BFD_RELOC_SPARC_TLS_LDM_LO10:          howto manager.      (line  187)
+* BFD_RELOC_SPARC_TLS_LDO_ADD:           howto manager.      (line  192)
+* BFD_RELOC_SPARC_TLS_LDO_HIX22:         howto manager.      (line  190)
+* BFD_RELOC_SPARC_TLS_LDO_LOX10:         howto manager.      (line  191)
+* BFD_RELOC_SPARC_TLS_LE_HIX22:          howto manager.      (line  198)
+* BFD_RELOC_SPARC_TLS_LE_LOX10:          howto manager.      (line  199)
+* BFD_RELOC_SPARC_TLS_TPOFF32:           howto manager.      (line  204)
+* BFD_RELOC_SPARC_TLS_TPOFF64:           howto manager.      (line  205)
+* BFD_RELOC_SPARC_UA16:                  howto manager.      (line  136)
+* BFD_RELOC_SPARC_UA32:                  howto manager.      (line  137)
+* BFD_RELOC_SPARC_UA64:                  howto manager.      (line  138)
+* BFD_RELOC_SPARC_WDISP10:               howto manager.      (line  178)
+* BFD_RELOC_SPARC_WDISP16:               howto manager.      (line  161)
+* BFD_RELOC_SPARC_WDISP19:               howto manager.      (line  162)
+* BFD_RELOC_SPARC_WDISP22:               howto manager.      (line  123)
+* BFD_RELOC_SPARC_WPLT30:                howto manager.      (line  131)
+* BFD_RELOC_SPU_ADD_PIC:                 howto manager.      (line  221)
+* BFD_RELOC_SPU_HI16:                    howto manager.      (line  218)
+* BFD_RELOC_SPU_IMM10:                   howto manager.      (line  209)
+* BFD_RELOC_SPU_IMM10W:                  howto manager.      (line  210)
+* BFD_RELOC_SPU_IMM16:                   howto manager.      (line  211)
+* BFD_RELOC_SPU_IMM16W:                  howto manager.      (line  212)
+* BFD_RELOC_SPU_IMM18:                   howto manager.      (line  213)
+* BFD_RELOC_SPU_IMM7:                    howto manager.      (line  207)
+* BFD_RELOC_SPU_IMM8:                    howto manager.      (line  208)
+* BFD_RELOC_SPU_LO16:                    howto manager.      (line  217)
+* BFD_RELOC_SPU_PCREL16:                 howto manager.      (line  216)
+* BFD_RELOC_SPU_PCREL9a:                 howto manager.      (line  214)
+* BFD_RELOC_SPU_PCREL9b:                 howto manager.      (line  215)
+* BFD_RELOC_SPU_PPU32:                   howto manager.      (line  219)
+* BFD_RELOC_SPU_PPU64:                   howto manager.      (line  220)
+* BFD_RELOC_THUMB_PCREL_BLX:             howto manager.      (line  739)
+* BFD_RELOC_THUMB_PCREL_BRANCH12:        howto manager.      (line  750)
+* BFD_RELOC_THUMB_PCREL_BRANCH20:        howto manager.      (line  751)
+* BFD_RELOC_THUMB_PCREL_BRANCH23:        howto manager.      (line  752)
+* BFD_RELOC_THUMB_PCREL_BRANCH25:        howto manager.      (line  753)
+* BFD_RELOC_THUMB_PCREL_BRANCH7:         howto manager.      (line  748)
+* BFD_RELOC_THUMB_PCREL_BRANCH9:         howto manager.      (line  749)
+* BFD_RELOC_TIC30_LDP:                   howto manager.      (line 1478)
+* BFD_RELOC_TIC54X_16_OF_23:             howto manager.      (line 1492)
+* BFD_RELOC_TIC54X_23:                   howto manager.      (line 1490)
+* BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.      (line 1496)
+* BFD_RELOC_TIC54X_PARTLS7:              howto manager.      (line 1482)
+* BFD_RELOC_TIC54X_PARTMS9:              howto manager.      (line 1486)
+* BFD_RELOC_TILEGX_BROFF_X1:             howto manager.      (line 3117)
+* BFD_RELOC_TILEGX_COPY:                 howto manager.      (line 3113)
+* BFD_RELOC_TILEGX_DEST_IMM8_X1:         howto manager.      (line 3124)
+* BFD_RELOC_TILEGX_GLOB_DAT:             howto manager.      (line 3114)
+* BFD_RELOC_TILEGX_HW0:                  howto manager.      (line 3106)
+* BFD_RELOC_TILEGX_HW0_LAST:             howto manager.      (line 3110)
+* BFD_RELOC_TILEGX_HW1:                  howto manager.      (line 3107)
+* BFD_RELOC_TILEGX_HW1_LAST:             howto manager.      (line 3111)
+* BFD_RELOC_TILEGX_HW2:                  howto manager.      (line 3108)
+* BFD_RELOC_TILEGX_HW2_LAST:             howto manager.      (line 3112)
+* BFD_RELOC_TILEGX_HW3:                  howto manager.      (line 3109)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0:         howto manager.      (line 3133)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT:     howto manager.      (line 3161)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST:    howto manager.      (line 3141)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager.     (line 3169)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager.   (line 3155)
 * BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL: howto manager.
-                                                             (line 3495)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager.  (line 3489)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager.  (line 3501)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager.  (line 3485)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL:   howto manager.      (line 3453)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager.    (line 3469)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD:  howto manager.      (line 3481)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE:  howto manager.      (line 3493)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE:  howto manager.      (line 3483)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1:         howto manager.      (line 3441)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST:    howto manager.      (line 3449)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager.     (line 3477)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager.   (line 3463)
+                                                             (line 3189)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager.  (line 3183)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager.  (line 3195)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager.  (line 3179)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL:   howto manager.      (line 3147)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager.    (line 3163)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD:  howto manager.      (line 3175)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE:  howto manager.      (line 3187)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE:  howto manager.      (line 3177)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1:         howto manager.      (line 3135)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST:    howto manager.      (line 3143)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager.     (line 3171)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager.   (line 3157)
 * BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL: howto manager.
-                                                             (line 3497)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager.  (line 3491)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager.  (line 3503)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager.  (line 3487)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL:   howto manager.      (line 3455)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager.    (line 3471)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2:         howto manager.      (line 3443)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST:    howto manager.      (line 3451)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager.   (line 3465)
+                                                             (line 3191)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager.  (line 3185)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager.  (line 3197)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager.  (line 3181)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL:   howto manager.      (line 3149)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager.    (line 3165)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2:         howto manager.      (line 3137)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST:    howto manager.      (line 3145)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager.   (line 3159)
 * BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL: howto manager.
-                                                             (line 3499)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL:   howto manager.      (line 3457)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager.    (line 3473)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3:         howto manager.      (line 3445)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL:   howto manager.      (line 3459)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager.    (line 3479)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0:         howto manager.      (line 3440)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT:     howto manager.      (line 3468)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST:    howto manager.      (line 3448)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager.     (line 3476)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager.   (line 3462)
+                                                             (line 3193)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL:   howto manager.      (line 3151)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager.    (line 3167)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3:         howto manager.      (line 3139)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL:   howto manager.      (line 3153)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager.    (line 3173)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0:         howto manager.      (line 3134)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT:     howto manager.      (line 3162)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST:    howto manager.      (line 3142)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager.     (line 3170)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager.   (line 3156)
 * BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL: howto manager.
-                                                             (line 3496)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager.  (line 3490)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager.  (line 3502)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager.  (line 3486)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL:   howto manager.      (line 3454)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager.    (line 3470)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD:  howto manager.      (line 3482)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE:  howto manager.      (line 3494)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE:  howto manager.      (line 3484)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1:         howto manager.      (line 3442)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST:    howto manager.      (line 3450)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager.     (line 3478)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager.   (line 3464)
+                                                             (line 3190)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager.  (line 3184)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager.  (line 3196)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager.  (line 3180)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL:   howto manager.      (line 3148)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager.    (line 3164)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD:  howto manager.      (line 3176)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE:  howto manager.      (line 3188)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE:  howto manager.      (line 3178)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1:         howto manager.      (line 3136)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST:    howto manager.      (line 3144)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager.     (line 3172)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager.   (line 3158)
 * BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL: howto manager.
-                                                             (line 3498)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager.  (line 3492)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager.  (line 3504)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager.  (line 3488)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL:   howto manager.      (line 3456)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager.    (line 3472)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2:         howto manager.      (line 3444)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST:    howto manager.      (line 3452)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager.   (line 3466)
+                                                             (line 3192)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager.  (line 3186)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager.  (line 3198)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager.  (line 3182)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL:   howto manager.      (line 3150)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager.    (line 3166)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2:         howto manager.      (line 3138)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST:    howto manager.      (line 3146)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager.   (line 3160)
 * BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL: howto manager.
-                                                             (line 3500)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL:   howto manager.      (line 3458)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager.    (line 3474)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3:         howto manager.      (line 3446)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL:   howto manager.      (line 3460)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager.    (line 3480)
-* BFD_RELOC_TILEGX_IMM8_X0:              howto manager.      (line 3426)
-* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD:      howto manager.      (line 3517)
-* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD:   howto manager.      (line 3512)
-* BFD_RELOC_TILEGX_IMM8_X1:              howto manager.      (line 3428)
-* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD:      howto manager.      (line 3518)
-* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD:   howto manager.      (line 3513)
-* BFD_RELOC_TILEGX_IMM8_Y0:              howto manager.      (line 3427)
-* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD:      howto manager.      (line 3519)
-* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD:   howto manager.      (line 3514)
-* BFD_RELOC_TILEGX_IMM8_Y1:              howto manager.      (line 3429)
-* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD:      howto manager.      (line 3520)
-* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD:   howto manager.      (line 3515)
-* BFD_RELOC_TILEGX_JMP_SLOT:             howto manager.      (line 3421)
-* BFD_RELOC_TILEGX_JUMPOFF_X1:           howto manager.      (line 3424)
-* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT:       howto manager.      (line 3425)
-* BFD_RELOC_TILEGX_MF_IMM14_X1:          howto manager.      (line 3432)
-* BFD_RELOC_TILEGX_MMEND_X0:             howto manager.      (line 3434)
-* BFD_RELOC_TILEGX_MMSTART_X0:           howto manager.      (line 3433)
-* BFD_RELOC_TILEGX_MT_IMM14_X1:          howto manager.      (line 3431)
-* BFD_RELOC_TILEGX_RELATIVE:             howto manager.      (line 3422)
-* BFD_RELOC_TILEGX_SHAMT_X0:             howto manager.      (line 3435)
-* BFD_RELOC_TILEGX_SHAMT_X1:             howto manager.      (line 3436)
-* BFD_RELOC_TILEGX_SHAMT_Y0:             howto manager.      (line 3437)
-* BFD_RELOC_TILEGX_SHAMT_Y1:             howto manager.      (line 3438)
-* BFD_RELOC_TILEGX_TLS_DTPMOD32:         howto manager.      (line 3508)
-* BFD_RELOC_TILEGX_TLS_DTPMOD64:         howto manager.      (line 3505)
-* BFD_RELOC_TILEGX_TLS_DTPOFF32:         howto manager.      (line 3509)
-* BFD_RELOC_TILEGX_TLS_DTPOFF64:         howto manager.      (line 3506)
-* BFD_RELOC_TILEGX_TLS_GD_CALL:          howto manager.      (line 3511)
-* BFD_RELOC_TILEGX_TLS_IE_LOAD:          howto manager.      (line 3516)
-* BFD_RELOC_TILEGX_TLS_TPOFF32:          howto manager.      (line 3510)
-* BFD_RELOC_TILEGX_TLS_TPOFF64:          howto manager.      (line 3507)
-* BFD_RELOC_TILEPRO_BROFF_X1:            howto manager.      (line 3335)
-* BFD_RELOC_TILEPRO_COPY:                howto manager.      (line 3331)
-* BFD_RELOC_TILEPRO_DEST_IMM8_X1:        howto manager.      (line 3342)
-* BFD_RELOC_TILEPRO_GLOB_DAT:            howto manager.      (line 3332)
-* BFD_RELOC_TILEPRO_IMM16_X0:            howto manager.      (line 3345)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT:        howto manager.      (line 3361)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA:     howto manager.      (line 3367)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI:     howto manager.      (line 3365)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO:     howto manager.      (line 3363)
-* BFD_RELOC_TILEPRO_IMM16_X0_HA:         howto manager.      (line 3351)
-* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL:   howto manager.      (line 3359)
-* BFD_RELOC_TILEPRO_IMM16_X0_HI:         howto manager.      (line 3349)
-* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL:   howto manager.      (line 3357)
-* BFD_RELOC_TILEPRO_IMM16_X0_LO:         howto manager.      (line 3347)
-* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL:   howto manager.      (line 3355)
-* BFD_RELOC_TILEPRO_IMM16_X0_PCREL:      howto manager.      (line 3353)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD:     howto manager.      (line 3383)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA:  howto manager.      (line 3389)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI:  howto manager.      (line 3387)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO:  howto manager.      (line 3385)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE:     howto manager.      (line 3391)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA:  howto manager.      (line 3397)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI:  howto manager.      (line 3395)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO:  howto manager.      (line 3393)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE:     howto manager.      (line 3402)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA:  howto manager.      (line 3408)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI:  howto manager.      (line 3406)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO:  howto manager.      (line 3404)
-* BFD_RELOC_TILEPRO_IMM16_X1:            howto manager.      (line 3346)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT:        howto manager.      (line 3362)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA:     howto manager.      (line 3368)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI:     howto manager.      (line 3366)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO:     howto manager.      (line 3364)
-* BFD_RELOC_TILEPRO_IMM16_X1_HA:         howto manager.      (line 3352)
-* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL:   howto manager.      (line 3360)
-* BFD_RELOC_TILEPRO_IMM16_X1_HI:         howto manager.      (line 3350)
-* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL:   howto manager.      (line 3358)
-* BFD_RELOC_TILEPRO_IMM16_X1_LO:         howto manager.      (line 3348)
-* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL:   howto manager.      (line 3356)
-* BFD_RELOC_TILEPRO_IMM16_X1_PCREL:      howto manager.      (line 3354)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD:     howto manager.      (line 3384)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA:  howto manager.      (line 3390)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI:  howto manager.      (line 3388)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO:  howto manager.      (line 3386)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE:     howto manager.      (line 3392)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA:  howto manager.      (line 3398)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI:  howto manager.      (line 3396)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO:  howto manager.      (line 3394)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE:     howto manager.      (line 3403)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA:  howto manager.      (line 3409)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI:  howto manager.      (line 3407)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO:  howto manager.      (line 3405)
-* BFD_RELOC_TILEPRO_IMM8_X0:             howto manager.      (line 3338)
-* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD:  howto manager.      (line 3378)
-* BFD_RELOC_TILEPRO_IMM8_X1:             howto manager.      (line 3340)
-* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD:  howto manager.      (line 3379)
-* BFD_RELOC_TILEPRO_IMM8_Y0:             howto manager.      (line 3339)
-* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD:  howto manager.      (line 3380)
-* BFD_RELOC_TILEPRO_IMM8_Y1:             howto manager.      (line 3341)
-* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD:  howto manager.      (line 3381)
-* BFD_RELOC_TILEPRO_JMP_SLOT:            howto manager.      (line 3333)
-* BFD_RELOC_TILEPRO_JOFFLONG_X1:         howto manager.      (line 3336)
-* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT:     howto manager.      (line 3337)
-* BFD_RELOC_TILEPRO_MF_IMM15_X1:         howto manager.      (line 3344)
-* BFD_RELOC_TILEPRO_MMEND_X0:            howto manager.      (line 3370)
-* BFD_RELOC_TILEPRO_MMEND_X1:            howto manager.      (line 3372)
-* BFD_RELOC_TILEPRO_MMSTART_X0:          howto manager.      (line 3369)
-* BFD_RELOC_TILEPRO_MMSTART_X1:          howto manager.      (line 3371)
-* BFD_RELOC_TILEPRO_MT_IMM15_X1:         howto manager.      (line 3343)
-* BFD_RELOC_TILEPRO_RELATIVE:            howto manager.      (line 3334)
-* BFD_RELOC_TILEPRO_SHAMT_X0:            howto manager.      (line 3373)
-* BFD_RELOC_TILEPRO_SHAMT_X1:            howto manager.      (line 3374)
-* BFD_RELOC_TILEPRO_SHAMT_Y0:            howto manager.      (line 3375)
-* BFD_RELOC_TILEPRO_SHAMT_Y1:            howto manager.      (line 3376)
-* BFD_RELOC_TILEPRO_TLS_DTPMOD32:        howto manager.      (line 3399)
-* BFD_RELOC_TILEPRO_TLS_DTPOFF32:        howto manager.      (line 3400)
-* BFD_RELOC_TILEPRO_TLS_GD_CALL:         howto manager.      (line 3377)
-* BFD_RELOC_TILEPRO_TLS_IE_LOAD:         howto manager.      (line 3382)
-* BFD_RELOC_TILEPRO_TLS_TPOFF32:         howto manager.      (line 3401)
-* bfd_reloc_type_lookup:                 howto manager.      (line 3555)
-* BFD_RELOC_V850_16_GOT:                 howto manager.      (line 1607)
-* BFD_RELOC_V850_16_GOTOFF:              howto manager.      (line 1631)
-* BFD_RELOC_V850_16_PCREL:               howto manager.      (line 1577)
-* BFD_RELOC_V850_16_S1:                  howto manager.      (line 1595)
-* BFD_RELOC_V850_16_SPLIT_OFFSET:        howto manager.      (line 1592)
-* BFD_RELOC_V850_17_PCREL:               howto manager.      (line 1580)
-* BFD_RELOC_V850_22_PCREL:               howto manager.      (line 1512)
-* BFD_RELOC_V850_22_PLT_PCREL:           howto manager.      (line 1613)
-* BFD_RELOC_V850_23:                     howto manager.      (line 1583)
-* BFD_RELOC_V850_32_ABS:                 howto manager.      (line 1589)
-* BFD_RELOC_V850_32_GOT:                 howto manager.      (line 1610)
-* BFD_RELOC_V850_32_GOTOFF:              howto manager.      (line 1634)
-* BFD_RELOC_V850_32_GOTPCREL:            howto manager.      (line 1604)
-* BFD_RELOC_V850_32_PCREL:               howto manager.      (line 1586)
-* BFD_RELOC_V850_32_PLT_PCREL:           howto manager.      (line 1616)
-* BFD_RELOC_V850_9_PCREL:                howto manager.      (line 1509)
-* BFD_RELOC_V850_ALIGN:                  howto manager.      (line 1570)
-* BFD_RELOC_V850_CALLT_15_16_OFFSET:     howto manager.      (line 1601)
-* BFD_RELOC_V850_CALLT_16_16_OFFSET:     howto manager.      (line 1561)
-* BFD_RELOC_V850_CALLT_6_7_OFFSET:       howto manager.      (line 1558)
-* BFD_RELOC_V850_CODE:                   howto manager.      (line 1637)
-* BFD_RELOC_V850_COPY:                   howto manager.      (line 1619)
-* BFD_RELOC_V850_DATA:                   howto manager.      (line 1640)
-* BFD_RELOC_V850_GLOB_DAT:               howto manager.      (line 1622)
-* BFD_RELOC_V850_JMP_SLOT:               howto manager.      (line 1625)
-* BFD_RELOC_V850_LO16_S1:                howto manager.      (line 1598)
-* BFD_RELOC_V850_LO16_SPLIT_OFFSET:      howto manager.      (line 1573)
-* BFD_RELOC_V850_LONGCALL:               howto manager.      (line 1564)
-* BFD_RELOC_V850_LONGJUMP:               howto manager.      (line 1567)
-* BFD_RELOC_V850_RELATIVE:               howto manager.      (line 1628)
-* BFD_RELOC_V850_SDA_15_16_OFFSET:       howto manager.      (line 1518)
-* BFD_RELOC_V850_SDA_16_16_OFFSET:       howto manager.      (line 1515)
-* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.      (line 1550)
-* BFD_RELOC_V850_TDA_16_16_OFFSET:       howto manager.      (line 1540)
-* BFD_RELOC_V850_TDA_4_4_OFFSET:         howto manager.      (line 1547)
-* BFD_RELOC_V850_TDA_4_5_OFFSET:         howto manager.      (line 1543)
-* BFD_RELOC_V850_TDA_6_8_OFFSET:         howto manager.      (line 1529)
-* BFD_RELOC_V850_TDA_7_7_OFFSET:         howto manager.      (line 1537)
-* BFD_RELOC_V850_TDA_7_8_OFFSET:         howto manager.      (line 1533)
-* BFD_RELOC_V850_ZDA_15_16_OFFSET:       howto manager.      (line 1525)
-* BFD_RELOC_V850_ZDA_16_16_OFFSET:       howto manager.      (line 1522)
-* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.      (line 1554)
-* BFD_RELOC_VAX_GLOB_DAT:                howto manager.      (line 2683)
-* BFD_RELOC_VAX_JMP_SLOT:                howto manager.      (line 2684)
-* BFD_RELOC_VAX_RELATIVE:                howto manager.      (line 2685)
-* BFD_RELOC_VISIUM_HI16:                 howto manager.      (line 3545)
-* BFD_RELOC_VISIUM_HI16_PCREL:           howto manager.      (line 3549)
-* BFD_RELOC_VISIUM_IM16:                 howto manager.      (line 3547)
-* BFD_RELOC_VISIUM_IM16_PCREL:           howto manager.      (line 3551)
-* BFD_RELOC_VISIUM_LO16:                 howto manager.      (line 3546)
-* BFD_RELOC_VISIUM_LO16_PCREL:           howto manager.      (line 3550)
-* BFD_RELOC_VISIUM_REL16:                howto manager.      (line 3548)
-* BFD_RELOC_VPE4KMATH_DATA:              howto manager.      (line 2237)
-* BFD_RELOC_VPE4KMATH_INSN:              howto manager.      (line 2238)
-* BFD_RELOC_VTABLE_ENTRY:                howto manager.      (line 2242)
-* BFD_RELOC_VTABLE_INHERIT:              howto manager.      (line 2241)
-* BFD_RELOC_X86_64_32S:                  howto manager.      (line  620)
-* BFD_RELOC_X86_64_COPY:                 howto manager.      (line  615)
-* BFD_RELOC_X86_64_DTPMOD64:             howto manager.      (line  621)
-* BFD_RELOC_X86_64_DTPOFF32:             howto manager.      (line  626)
-* BFD_RELOC_X86_64_DTPOFF64:             howto manager.      (line  622)
-* BFD_RELOC_X86_64_GLOB_DAT:             howto manager.      (line  616)
-* BFD_RELOC_X86_64_GOT32:                howto manager.      (line  613)
-* BFD_RELOC_X86_64_GOT64:                howto manager.      (line  631)
-* BFD_RELOC_X86_64_GOTOFF64:             howto manager.      (line  629)
-* BFD_RELOC_X86_64_GOTPC32:              howto manager.      (line  630)
-* BFD_RELOC_X86_64_GOTPC32_TLSDESC:      howto manager.      (line  636)
-* BFD_RELOC_X86_64_GOTPC64:              howto manager.      (line  633)
-* BFD_RELOC_X86_64_GOTPCREL:             howto manager.      (line  619)
-* BFD_RELOC_X86_64_GOTPCREL64:           howto manager.      (line  632)
-* BFD_RELOC_X86_64_GOTPLT64:             howto manager.      (line  634)
-* BFD_RELOC_X86_64_GOTTPOFF:             howto manager.      (line  627)
-* BFD_RELOC_X86_64_IRELATIVE:            howto manager.      (line  639)
-* BFD_RELOC_X86_64_JUMP_SLOT:            howto manager.      (line  617)
-* BFD_RELOC_X86_64_PC32_BND:             howto manager.      (line  640)
-* BFD_RELOC_X86_64_PLT32:                howto manager.      (line  614)
-* BFD_RELOC_X86_64_PLT32_BND:            howto manager.      (line  641)
-* BFD_RELOC_X86_64_PLTOFF64:             howto manager.      (line  635)
-* BFD_RELOC_X86_64_RELATIVE:             howto manager.      (line  618)
-* BFD_RELOC_X86_64_TLSDESC:              howto manager.      (line  638)
-* BFD_RELOC_X86_64_TLSDESC_CALL:         howto manager.      (line  637)
-* BFD_RELOC_X86_64_TLSGD:                howto manager.      (line  624)
-* BFD_RELOC_X86_64_TLSLD:                howto manager.      (line  625)
-* BFD_RELOC_X86_64_TPOFF32:              howto manager.      (line  628)
-* BFD_RELOC_X86_64_TPOFF64:              howto manager.      (line  623)
-* BFD_RELOC_XC16X_PAG:                   howto manager.      (line 2677)
-* BFD_RELOC_XC16X_POF:                   howto manager.      (line 2678)
-* BFD_RELOC_XC16X_SEG:                   howto manager.      (line 2679)
-* BFD_RELOC_XC16X_SOF:                   howto manager.      (line 2680)
-* BFD_RELOC_XGATE_24:                    howto manager.      (line 2400)
-* BFD_RELOC_XGATE_GPAGE:                 howto manager.      (line 2397)
-* BFD_RELOC_XGATE_IMM3:                  howto manager.      (line 2417)
-* BFD_RELOC_XGATE_IMM4:                  howto manager.      (line 2420)
-* BFD_RELOC_XGATE_IMM5:                  howto manager.      (line 2423)
-* BFD_RELOC_XGATE_IMM8_HI:               howto manager.      (line 2413)
-* BFD_RELOC_XGATE_IMM8_LO:               howto manager.      (line 2409)
-* BFD_RELOC_XGATE_LO16:                  howto manager.      (line 2393)
-* BFD_RELOC_XGATE_PCREL_10:              howto manager.      (line 2406)
-* BFD_RELOC_XGATE_PCREL_9:               howto manager.      (line 2403)
-* BFD_RELOC_XGATE_RL_GROUP:              howto manager.      (line 2388)
-* BFD_RELOC_XGATE_RL_JUMP:               howto manager.      (line 2384)
-* BFD_RELOC_XSTORMY16_12:                howto manager.      (line 2669)
-* BFD_RELOC_XSTORMY16_24:                howto manager.      (line 2670)
-* BFD_RELOC_XSTORMY16_FPTR16:            howto manager.      (line 2671)
-* BFD_RELOC_XSTORMY16_REL_12:            howto manager.      (line 2668)
-* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2858)
-* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2863)
-* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2805)
-* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2806)
-* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2804)
-* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2794)
-* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2795)
-* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2852)
-* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2853)
-* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2854)
-* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2799)
-* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2796)
-* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 2789)
-* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2834)
-* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2814)
-* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2844)
-* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2824)
-* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2845)
-* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2825)
-* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2846)
-* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2826)
-* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2847)
-* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2827)
-* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2848)
-* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2828)
-* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2835)
-* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2815)
-* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2836)
-* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2816)
-* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2837)
-* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2817)
-* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2838)
-* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2818)
-* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2839)
-* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2819)
-* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2840)
-* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2820)
-* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2841)
-* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2821)
-* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2842)
-* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2822)
-* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2843)
-* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2823)
-* BFD_RELOC_XTENSA_TLS_ARG:              howto manager.      (line 2873)
-* BFD_RELOC_XTENSA_TLS_CALL:             howto manager.      (line 2874)
-* BFD_RELOC_XTENSA_TLS_DTPOFF:           howto manager.      (line 2870)
-* BFD_RELOC_XTENSA_TLS_FUNC:             howto manager.      (line 2872)
-* BFD_RELOC_XTENSA_TLS_TPOFF:            howto manager.      (line 2871)
-* BFD_RELOC_XTENSA_TLSDESC_ARG:          howto manager.      (line 2869)
-* BFD_RELOC_XTENSA_TLSDESC_FN:           howto manager.      (line 2868)
-* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2877)
-* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2883)
-* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2880)
-* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2886)
-* bfd_rename_section:                    section prototypes. (line  169)
-* bfd_scan_arch:                         Architectures.      (line  525)
-* bfd_scan_vma:                          Miscellaneous.      (line  126)
-* bfd_seach_for_target:                  bfd_target.         (line  521)
+                                                             (line 3194)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL:   howto manager.      (line 3152)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager.    (line 3168)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3:         howto manager.      (line 3140)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL:   howto manager.      (line 3154)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager.    (line 3174)
+* BFD_RELOC_TILEGX_IMM8_X0:              howto manager.      (line 3120)
+* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD:      howto manager.      (line 3211)
+* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD:   howto manager.      (line 3206)
+* BFD_RELOC_TILEGX_IMM8_X1:              howto manager.      (line 3122)
+* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD:      howto manager.      (line 3212)
+* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD:   howto manager.      (line 3207)
+* BFD_RELOC_TILEGX_IMM8_Y0:              howto manager.      (line 3121)
+* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD:      howto manager.      (line 3213)
+* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD:   howto manager.      (line 3208)
+* BFD_RELOC_TILEGX_IMM8_Y1:              howto manager.      (line 3123)
+* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD:      howto manager.      (line 3214)
+* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD:   howto manager.      (line 3209)
+* BFD_RELOC_TILEGX_JMP_SLOT:             howto manager.      (line 3115)
+* BFD_RELOC_TILEGX_JUMPOFF_X1:           howto manager.      (line 3118)
+* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT:       howto manager.      (line 3119)
+* BFD_RELOC_TILEGX_MF_IMM14_X1:          howto manager.      (line 3126)
+* BFD_RELOC_TILEGX_MMEND_X0:             howto manager.      (line 3128)
+* BFD_RELOC_TILEGX_MMSTART_X0:           howto manager.      (line 3127)
+* BFD_RELOC_TILEGX_MT_IMM14_X1:          howto manager.      (line 3125)
+* BFD_RELOC_TILEGX_RELATIVE:             howto manager.      (line 3116)
+* BFD_RELOC_TILEGX_SHAMT_X0:             howto manager.      (line 3129)
+* BFD_RELOC_TILEGX_SHAMT_X1:             howto manager.      (line 3130)
+* BFD_RELOC_TILEGX_SHAMT_Y0:             howto manager.      (line 3131)
+* BFD_RELOC_TILEGX_SHAMT_Y1:             howto manager.      (line 3132)
+* BFD_RELOC_TILEGX_TLS_DTPMOD32:         howto manager.      (line 3202)
+* BFD_RELOC_TILEGX_TLS_DTPMOD64:         howto manager.      (line 3199)
+* BFD_RELOC_TILEGX_TLS_DTPOFF32:         howto manager.      (line 3203)
+* BFD_RELOC_TILEGX_TLS_DTPOFF64:         howto manager.      (line 3200)
+* BFD_RELOC_TILEGX_TLS_GD_CALL:          howto manager.      (line 3205)
+* BFD_RELOC_TILEGX_TLS_IE_LOAD:          howto manager.      (line 3210)
+* BFD_RELOC_TILEGX_TLS_TPOFF32:          howto manager.      (line 3204)
+* BFD_RELOC_TILEGX_TLS_TPOFF64:          howto manager.      (line 3201)
+* BFD_RELOC_TILEPRO_BROFF_X1:            howto manager.      (line 3030)
+* BFD_RELOC_TILEPRO_COPY:                howto manager.      (line 3026)
+* BFD_RELOC_TILEPRO_DEST_IMM8_X1:        howto manager.      (line 3037)
+* BFD_RELOC_TILEPRO_GLOB_DAT:            howto manager.      (line 3027)
+* BFD_RELOC_TILEPRO_IMM16_X0:            howto manager.      (line 3040)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT:        howto manager.      (line 3056)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA:     howto manager.      (line 3062)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI:     howto manager.      (line 3060)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO:     howto manager.      (line 3058)
+* BFD_RELOC_TILEPRO_IMM16_X0_HA:         howto manager.      (line 3046)
+* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL:   howto manager.      (line 3054)
+* BFD_RELOC_TILEPRO_IMM16_X0_HI:         howto manager.      (line 3044)
+* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL:   howto manager.      (line 3052)
+* BFD_RELOC_TILEPRO_IMM16_X0_LO:         howto manager.      (line 3042)
+* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL:   howto manager.      (line 3050)
+* BFD_RELOC_TILEPRO_IMM16_X0_PCREL:      howto manager.      (line 3048)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD:     howto manager.      (line 3078)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA:  howto manager.      (line 3084)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI:  howto manager.      (line 3082)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO:  howto manager.      (line 3080)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE:     howto manager.      (line 3086)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA:  howto manager.      (line 3092)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI:  howto manager.      (line 3090)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO:  howto manager.      (line 3088)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE:     howto manager.      (line 3097)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA:  howto manager.      (line 3103)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI:  howto manager.      (line 3101)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO:  howto manager.      (line 3099)
+* BFD_RELOC_TILEPRO_IMM16_X1:            howto manager.      (line 3041)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT:        howto manager.      (line 3057)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA:     howto manager.      (line 3063)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI:     howto manager.      (line 3061)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO:     howto manager.      (line 3059)
+* BFD_RELOC_TILEPRO_IMM16_X1_HA:         howto manager.      (line 3047)
+* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL:   howto manager.      (line 3055)
+* BFD_RELOC_TILEPRO_IMM16_X1_HI:         howto manager.      (line 3045)
+* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL:   howto manager.      (line 3053)
+* BFD_RELOC_TILEPRO_IMM16_X1_LO:         howto manager.      (line 3043)
+* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL:   howto manager.      (line 3051)
+* BFD_RELOC_TILEPRO_IMM16_X1_PCREL:      howto manager.      (line 3049)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD:     howto manager.      (line 3079)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA:  howto manager.      (line 3085)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI:  howto manager.      (line 3083)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO:  howto manager.      (line 3081)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE:     howto manager.      (line 3087)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA:  howto manager.      (line 3093)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI:  howto manager.      (line 3091)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO:  howto manager.      (line 3089)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE:     howto manager.      (line 3098)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA:  howto manager.      (line 3104)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI:  howto manager.      (line 3102)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO:  howto manager.      (line 3100)
+* BFD_RELOC_TILEPRO_IMM8_X0:             howto manager.      (line 3033)
+* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD:  howto manager.      (line 3073)
+* BFD_RELOC_TILEPRO_IMM8_X1:             howto manager.      (line 3035)
+* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD:  howto manager.      (line 3074)
+* BFD_RELOC_TILEPRO_IMM8_Y0:             howto manager.      (line 3034)
+* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD:  howto manager.      (line 3075)
+* BFD_RELOC_TILEPRO_IMM8_Y1:             howto manager.      (line 3036)
+* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD:  howto manager.      (line 3076)
+* BFD_RELOC_TILEPRO_JMP_SLOT:            howto manager.      (line 3028)
+* BFD_RELOC_TILEPRO_JOFFLONG_X1:         howto manager.      (line 3031)
+* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT:     howto manager.      (line 3032)
+* BFD_RELOC_TILEPRO_MF_IMM15_X1:         howto manager.      (line 3039)
+* BFD_RELOC_TILEPRO_MMEND_X0:            howto manager.      (line 3065)
+* BFD_RELOC_TILEPRO_MMEND_X1:            howto manager.      (line 3067)
+* BFD_RELOC_TILEPRO_MMSTART_X0:          howto manager.      (line 3064)
+* BFD_RELOC_TILEPRO_MMSTART_X1:          howto manager.      (line 3066)
+* BFD_RELOC_TILEPRO_MT_IMM15_X1:         howto manager.      (line 3038)
+* BFD_RELOC_TILEPRO_RELATIVE:            howto manager.      (line 3029)
+* BFD_RELOC_TILEPRO_SHAMT_X0:            howto manager.      (line 3068)
+* BFD_RELOC_TILEPRO_SHAMT_X1:            howto manager.      (line 3069)
+* BFD_RELOC_TILEPRO_SHAMT_Y0:            howto manager.      (line 3070)
+* BFD_RELOC_TILEPRO_SHAMT_Y1:            howto manager.      (line 3071)
+* BFD_RELOC_TILEPRO_TLS_DTPMOD32:        howto manager.      (line 3094)
+* BFD_RELOC_TILEPRO_TLS_DTPOFF32:        howto manager.      (line 3095)
+* BFD_RELOC_TILEPRO_TLS_GD_CALL:         howto manager.      (line 3072)
+* BFD_RELOC_TILEPRO_TLS_IE_LOAD:         howto manager.      (line 3077)
+* BFD_RELOC_TILEPRO_TLS_TPOFF32:         howto manager.      (line 3096)
+* bfd_reloc_type_lookup:                 howto manager.      (line 3241)
+* BFD_RELOC_V850_16_GOT:                 howto manager.      (line 1454)
+* BFD_RELOC_V850_16_GOTOFF:              howto manager.      (line 1470)
+* BFD_RELOC_V850_16_PCREL:               howto manager.      (line 1434)
+* BFD_RELOC_V850_16_S1:                  howto manager.      (line 1446)
+* BFD_RELOC_V850_16_SPLIT_OFFSET:        howto manager.      (line 1444)
+* BFD_RELOC_V850_17_PCREL:               howto manager.      (line 1436)
+* BFD_RELOC_V850_22_PCREL:               howto manager.      (line 1388)
+* BFD_RELOC_V850_22_PLT_PCREL:           howto manager.      (line 1458)
+* BFD_RELOC_V850_23:                     howto manager.      (line 1438)
+* BFD_RELOC_V850_32_ABS:                 howto manager.      (line 1442)
+* BFD_RELOC_V850_32_GOT:                 howto manager.      (line 1456)
+* BFD_RELOC_V850_32_GOTOFF:              howto manager.      (line 1472)
+* BFD_RELOC_V850_32_GOTPCREL:            howto manager.      (line 1452)
+* BFD_RELOC_V850_32_PCREL:               howto manager.      (line 1440)
+* BFD_RELOC_V850_32_PLT_PCREL:           howto manager.      (line 1460)
+* BFD_RELOC_V850_9_PCREL:                howto manager.      (line 1386)
+* BFD_RELOC_V850_ALIGN:                  howto manager.      (line 1429)
+* BFD_RELOC_V850_CALLT_15_16_OFFSET:     howto manager.      (line 1450)
+* BFD_RELOC_V850_CALLT_16_16_OFFSET:     howto manager.      (line 1423)
+* BFD_RELOC_V850_CALLT_6_7_OFFSET:       howto manager.      (line 1421)
+* BFD_RELOC_V850_CODE:                   howto manager.      (line 1474)
+* BFD_RELOC_V850_COPY:                   howto manager.      (line 1462)
+* BFD_RELOC_V850_DATA:                   howto manager.      (line 1476)
+* BFD_RELOC_V850_GLOB_DAT:               howto manager.      (line 1464)
+* BFD_RELOC_V850_JMP_SLOT:               howto manager.      (line 1466)
+* BFD_RELOC_V850_LO16_S1:                howto manager.      (line 1448)
+* BFD_RELOC_V850_LO16_SPLIT_OFFSET:      howto manager.      (line 1431)
+* BFD_RELOC_V850_LONGCALL:               howto manager.      (line 1425)
+* BFD_RELOC_V850_LONGJUMP:               howto manager.      (line 1427)
+* BFD_RELOC_V850_RELATIVE:               howto manager.      (line 1468)
+* BFD_RELOC_V850_SDA_15_16_OFFSET:       howto manager.      (line 1392)
+* BFD_RELOC_V850_SDA_16_16_OFFSET:       howto manager.      (line 1390)
+* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.      (line 1415)
+* BFD_RELOC_V850_TDA_16_16_OFFSET:       howto manager.      (line 1408)
+* BFD_RELOC_V850_TDA_4_4_OFFSET:         howto manager.      (line 1413)
+* BFD_RELOC_V850_TDA_4_5_OFFSET:         howto manager.      (line 1410)
+* BFD_RELOC_V850_TDA_6_8_OFFSET:         howto manager.      (line 1400)
+* BFD_RELOC_V850_TDA_7_7_OFFSET:         howto manager.      (line 1406)
+* BFD_RELOC_V850_TDA_7_8_OFFSET:         howto manager.      (line 1403)
+* BFD_RELOC_V850_ZDA_15_16_OFFSET:       howto manager.      (line 1397)
+* BFD_RELOC_V850_ZDA_16_16_OFFSET:       howto manager.      (line 1395)
+* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.      (line 1418)
+* BFD_RELOC_VAX_GLOB_DAT:                howto manager.      (line 2406)
+* BFD_RELOC_VAX_JMP_SLOT:                howto manager.      (line 2407)
+* BFD_RELOC_VAX_RELATIVE:                howto manager.      (line 2408)
+* BFD_RELOC_VISIUM_HI16:                 howto manager.      (line 3231)
+* BFD_RELOC_VISIUM_HI16_PCREL:           howto manager.      (line 3235)
+* BFD_RELOC_VISIUM_IM16:                 howto manager.      (line 3233)
+* BFD_RELOC_VISIUM_IM16_PCREL:           howto manager.      (line 3237)
+* BFD_RELOC_VISIUM_LO16:                 howto manager.      (line 3232)
+* BFD_RELOC_VISIUM_LO16_PCREL:           howto manager.      (line 3236)
+* BFD_RELOC_VISIUM_REL16:                howto manager.      (line 3234)
+* BFD_RELOC_VPE4KMATH_DATA:              howto manager.      (line 2009)
+* BFD_RELOC_VPE4KMATH_INSN:              howto manager.      (line 2010)
+* BFD_RELOC_VTABLE_ENTRY:                howto manager.      (line 2013)
+* BFD_RELOC_VTABLE_INHERIT:              howto manager.      (line 2012)
+* BFD_RELOC_X86_64_32S:                  howto manager.      (line  553)
+* BFD_RELOC_X86_64_COPY:                 howto manager.      (line  548)
+* BFD_RELOC_X86_64_DTPMOD64:             howto manager.      (line  554)
+* BFD_RELOC_X86_64_DTPOFF32:             howto manager.      (line  559)
+* BFD_RELOC_X86_64_DTPOFF64:             howto manager.      (line  555)
+* BFD_RELOC_X86_64_GLOB_DAT:             howto manager.      (line  549)
+* BFD_RELOC_X86_64_GOT32:                howto manager.      (line  546)
+* BFD_RELOC_X86_64_GOT64:                howto manager.      (line  564)
+* BFD_RELOC_X86_64_GOTOFF64:             howto manager.      (line  562)
+* BFD_RELOC_X86_64_GOTPC32:              howto manager.      (line  563)
+* BFD_RELOC_X86_64_GOTPC32_TLSDESC:      howto manager.      (line  569)
+* BFD_RELOC_X86_64_GOTPC64:              howto manager.      (line  566)
+* BFD_RELOC_X86_64_GOTPCREL:             howto manager.      (line  552)
+* BFD_RELOC_X86_64_GOTPCREL64:           howto manager.      (line  565)
+* BFD_RELOC_X86_64_GOTPCRELX:            howto manager.      (line  575)
+* BFD_RELOC_X86_64_GOTPLT64:             howto manager.      (line  567)
+* BFD_RELOC_X86_64_GOTTPOFF:             howto manager.      (line  560)
+* BFD_RELOC_X86_64_IRELATIVE:            howto manager.      (line  572)
+* BFD_RELOC_X86_64_JUMP_SLOT:            howto manager.      (line  550)
+* BFD_RELOC_X86_64_PC32_BND:             howto manager.      (line  573)
+* BFD_RELOC_X86_64_PLT32:                howto manager.      (line  547)
+* BFD_RELOC_X86_64_PLT32_BND:            howto manager.      (line  574)
+* BFD_RELOC_X86_64_PLTOFF64:             howto manager.      (line  568)
+* BFD_RELOC_X86_64_RELATIVE:             howto manager.      (line  551)
+* BFD_RELOC_X86_64_REX_GOTPCRELX:        howto manager.      (line  576)
+* BFD_RELOC_X86_64_TLSDESC:              howto manager.      (line  571)
+* BFD_RELOC_X86_64_TLSDESC_CALL:         howto manager.      (line  570)
+* BFD_RELOC_X86_64_TLSGD:                howto manager.      (line  557)
+* BFD_RELOC_X86_64_TLSLD:                howto manager.      (line  558)
+* BFD_RELOC_X86_64_TPOFF32:              howto manager.      (line  561)
+* BFD_RELOC_X86_64_TPOFF64:              howto manager.      (line  556)
+* BFD_RELOC_XC16X_PAG:                   howto manager.      (line 2401)
+* BFD_RELOC_XC16X_POF:                   howto manager.      (line 2402)
+* BFD_RELOC_XC16X_SEG:                   howto manager.      (line 2403)
+* BFD_RELOC_XC16X_SOF:                   howto manager.      (line 2404)
+* BFD_RELOC_XGATE_24:                    howto manager.      (line 2156)
+* BFD_RELOC_XGATE_GPAGE:                 howto manager.      (line 2154)
+* BFD_RELOC_XGATE_IMM3:                  howto manager.      (line 2168)
+* BFD_RELOC_XGATE_IMM4:                  howto manager.      (line 2170)
+* BFD_RELOC_XGATE_IMM5:                  howto manager.      (line 2172)
+* BFD_RELOC_XGATE_IMM8_HI:               howto manager.      (line 2165)
+* BFD_RELOC_XGATE_IMM8_LO:               howto manager.      (line 2162)
+* BFD_RELOC_XGATE_LO16:                  howto manager.      (line 2151)
+* BFD_RELOC_XGATE_PCREL_10:              howto manager.      (line 2160)
+* BFD_RELOC_XGATE_PCREL_9:               howto manager.      (line 2158)
+* BFD_RELOC_XGATE_RL_GROUP:              howto manager.      (line 2147)
+* BFD_RELOC_XGATE_RL_JUMP:               howto manager.      (line 2144)
+* BFD_RELOC_XSTORMY16_12:                howto manager.      (line 2395)
+* BFD_RELOC_XSTORMY16_24:                howto manager.      (line 2396)
+* BFD_RELOC_XSTORMY16_FPTR16:            howto manager.      (line 2397)
+* BFD_RELOC_XSTORMY16_REL_12:            howto manager.      (line 2394)
+* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2592)
+* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2596)
+* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2543)
+* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2544)
+* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2542)
+* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2534)
+* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2535)
+* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2587)
+* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2588)
+* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2589)
+* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2538)
+* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2536)
+* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 2530)
+* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2570)
+* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2551)
+* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2580)
+* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2561)
+* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2581)
+* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2562)
+* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2582)
+* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2563)
+* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2583)
+* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2564)
+* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2584)
+* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2565)
+* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2571)
+* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2552)
+* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2572)
+* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2553)
+* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2573)
+* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2554)
+* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2574)
+* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2555)
+* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2575)
+* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2556)
+* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2576)
+* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2557)
+* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2577)
+* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2558)
+* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2578)
+* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2559)
+* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2579)
+* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2560)
+* BFD_RELOC_XTENSA_TLSDESC_ARG:          howto manager.      (line 2601)
+* BFD_RELOC_XTENSA_TLSDESC_FN:           howto manager.      (line 2600)
+* BFD_RELOC_XTENSA_TLS_ARG:              howto manager.      (line 2605)
+* BFD_RELOC_XTENSA_TLS_CALL:             howto manager.      (line 2606)
+* BFD_RELOC_XTENSA_TLS_DTPOFF:           howto manager.      (line 2602)
+* BFD_RELOC_XTENSA_TLS_FUNC:             howto manager.      (line 2604)
+* BFD_RELOC_XTENSA_TLS_TPOFF:            howto manager.      (line 2603)
+* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2608)
+* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2612)
+* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2610)
+* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2614)
+* bfd_rename_section:                    section prototypes. (line  177)
+* bfd_scan_arch:                         Architectures.      (line  548)
+* bfd_scan_vma:                          Miscellaneous.      (line  124)
+* bfd_sections_find_if:                  section prototypes. (line  207)
 * bfd_section_already_linked:            Writing the symbol table.
                                                              (line   55)
-* bfd_section_list_clear:                section prototypes. (line    8)
-* bfd_sections_find_if:                  section prototypes. (line  199)
-* bfd_set_arch_info:                     Architectures.      (line  566)
-* bfd_set_archive_head:                  Archives.           (line   75)
-* bfd_set_assert_handler:                Error reporting.    (line  141)
-* bfd_set_default_target:                bfd_target.         (line  460)
+* bfd_section_list_clear:                section prototypes. (line    7)
+* bfd_set_archive_head:                  Archives.           (line   74)
+* bfd_set_arch_info:                     Architectures.      (line  589)
+* bfd_set_assert_handler:                Error reporting.    (line  135)
+* bfd_set_default_target:                bfd_target.         (line  468)
 * bfd_set_error:                         Error reporting.    (line   57)
-* bfd_set_error_handler:                 Error reporting.    (line   99)
-* bfd_set_error_program_name:            Error reporting.    (line  108)
-* bfd_set_file_flags:                    Miscellaneous.      (line   44)
-* bfd_set_format:                        Formats.            (line   68)
-* bfd_set_gp_size:                       Miscellaneous.      (line  116)
-* bfd_set_private_flags:                 Miscellaneous.      (line  193)
-* bfd_set_reloc:                         Miscellaneous.      (line   34)
-* bfd_set_section_contents:              section prototypes. (line  230)
-* bfd_set_section_flags:                 section prototypes. (line  154)
-* bfd_set_section_size:                  section prototypes. (line  216)
-* bfd_set_start_address:                 Miscellaneous.      (line   95)
+* bfd_set_error_handler:                 Error reporting.    (line  100)
+* bfd_set_error_program_name:            Error reporting.    (line  109)
+* bfd_set_file_flags:                    Miscellaneous.      (line   43)
+* bfd_set_format:                        Formats.            (line   67)
+* bfd_set_gp_size:                       Miscellaneous.      (line  114)
+* bfd_set_private_flags:                 Miscellaneous.      (line  172)
+* bfd_set_reloc:                         Miscellaneous.      (line   33)
+* bfd_set_section_contents:              section prototypes. (line  239)
+* bfd_set_section_flags:                 section prototypes. (line  162)
+* bfd_set_section_size:                  section prototypes. (line  224)
+* bfd_set_start_address:                 Miscellaneous.      (line   93)
 * bfd_set_symtab:                        symbol handling functions.
-                                                             (line   60)
+                                                             (line   63)
 * bfd_symbol_info:                       symbol handling functions.
-                                                             (line  130)
-* bfd_target_list:                       bfd_target.         (line  512)
-* bfd_update_compression_header:         Miscellaneous.      (line  369)
-* bfd_write_bigendian_4byte_int:         Internal.           (line   13)
+                                                             (line  135)
+* bfd_target_list:                       bfd_target.         (line  520)
+* bfd_update_compression_header:         Miscellaneous.      (line  348)
+* bfd_write_bigendian_4byte_int:         Internal.           (line   12)
 * bfd_zalloc:                            Opening and Closing.
-                                                             (line  257)
+                                                             (line  256)
 * bfd_zalloc2:                           Opening and Closing.
-                                                             (line  266)
-* coff_symbol_type:                      coff.               (line  245)
-* core_file_matches_executable_p:        Core Files.         (line   39)
+                                                             (line  265)
+* check_build_id_file:                   Opening and Closing.
+                                                             (line  450)
+* coff_symbol_type:                      coff.               (line  244)
+* core_file_matches_executable_p:        Core Files.         (line   38)
 * find_separate_debug_file:              Opening and Closing.
-                                                             (line  332)
-* generic_core_file_matches_executable_p: Core Files.        (line   49)
+                                                             (line  331)
+* generic_core_file_matches_executable_p: Core Files.        (line   48)
+* get_build_id:                          Opening and Closing.
+                                                             (line  420)
+* get_build_id_name:                     Opening and Closing.
+                                                             (line  434)
 * Hash tables:                           Hash Tables.        (line    6)
 * internal object-file format:           Canonical format.   (line   11)
 * Linker:                                Linker Functions.   (line    6)
-* Other functions:                       Miscellaneous.      (line  208)
+* Other functions:                       Miscellaneous.      (line  186)
 * separate_alt_debug_file_exists:        Opening and Closing.
-                                                             (line  323)
+                                                             (line  322)
 * separate_debug_file_exists:            Opening and Closing.
-                                                             (line  314)
-* struct bfd_iovec:                      Miscellaneous.      (line  405)
+                                                             (line  313)
+* struct bfd_iovec:                      Miscellaneous.      (line  407)
 * target vector (_bfd_final_link):       Performing the Final Link.
                                                              (line    6)
 * target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
                                                              (line    6)
 * target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
                                                              (line    6)
-* The HOWTO Macro:                       typedef arelent.    (line  288)
+* The HOWTO Macro:                       typedef arelent.    (line  289)
 * what is it?:                           Overview.           (line    6)
 
 
 
 Tag Table:
-Node: Top1059
-Node: Overview1398
-Node: History2449
-Node: How It Works3395
-Node: What BFD Version 2 Can Do4938
-Node: BFD information loss6253
-Node: Canonical format8785
-Node: BFD front end13157
-Node: typedef bfd13581
-Node: Error reporting25542
-Node: Miscellaneous30409
-Node: Memory Usage48638
-Node: Initialization49866
-Node: Sections50325
-Node: Section Input50808
-Node: Section Output52173
-Node: typedef asection54659
-Node: section prototypes81284
-Node: Symbols91541
-Node: Reading Symbols93136
-Node: Writing Symbols94243
-Node: Mini Symbols95984
-Node: typedef asymbol96958
-Node: symbol handling functions103017
-Node: Archives108359
-Node: Formats112388
-Node: Relocations115336
-Node: typedef arelent116063
-Node: howto manager131699
-Node: Core Files247986
-Node: Targets250024
-Node: bfd_target251994
-Node: Architectures275086
-Node: Opening and Closing303146
-Node: Internal317468
-Node: File Caching323813
-Node: Linker Functions325727
-Node: Creating a Linker Hash Table327400
-Node: Adding Symbols to the Hash Table329138
-Node: Differing file formats330038
-Node: Adding symbols from an object file331763
-Node: Adding symbols from an archive333914
-Node: Performing the Final Link336260
-Node: Information provided by the linker337502
-Node: Relocating the section contents338656
-Node: Writing the symbol table340407
-Node: Hash Tables344791
-Node: Creating and Freeing a Hash Table345989
-Node: Looking Up or Entering a String347239
-Node: Traversing a Hash Table348492
-Node: Deriving a New Hash Table Type349281
-Node: Define the Derived Structures350347
-Node: Write the Derived Creation Routine351428
-Node: Write Other Derived Routines354052
-Node: BFD back ends355367
-Node: What to Put Where355637
-Node: aout355817
-Node: coff362155
-Node: elf390988
-Node: mmo391389
-Node: File layout392262
-Node: Symbol-table398189
-Node: mmo section mapping401953
-Node: GNU Free Documentation License405605
-Node: BFD Index430688
+Node: Top1054
+Node: Overview1390
+Node: History2448
+Node: How It Works3393
+Node: What BFD Version 2 Can Do4930
+Node: BFD information loss6247
+Node: Canonical format8788
+Node: BFD front end13165
+Node: typedef bfd13589
+Node: Error reporting25924
+Node: Miscellaneous30404
+Node: Memory Usage48866
+Node: Initialization50097
+Node: Sections50556
+Node: Section Input51039
+Node: Section Output52408
+Node: typedef asection54895
+Node: section prototypes81628
+Node: Symbols92235
+Node: Reading Symbols93838
+Node: Writing Symbols94946
+Node: Mini Symbols96690
+Node: typedef asymbol97664
+Node: symbol handling functions103720
+Node: Archives109058
+Node: Formats113086
+Node: Relocations116037
+Node: typedef arelent116764
+Node: howto manager132420
+Node: Core Files256747
+Node: Targets258785
+Node: bfd_target260760
+Node: Architectures284266
+Node: Opening and Closing313682
+Node: Internal330514
+Node: File Caching336863
+Node: Linker Functions338781
+Node: Creating a Linker Hash Table340455
+Node: Adding Symbols to the Hash Table342194
+Node: Differing file formats343094
+Node: Adding symbols from an object file344819
+Node: Adding symbols from an archive346969
+Node: Performing the Final Link349315
+Node: Information provided by the linker350556
+Node: Relocating the section contents351710
+Node: Writing the symbol table353462
+Node: Hash Tables359596
+Node: Creating and Freeing a Hash Table360794
+Node: Looking Up or Entering a String362044
+Node: Traversing a Hash Table363297
+Node: Deriving a New Hash Table Type364086
+Node: Define the Derived Structures365152
+Node: Write the Derived Creation Routine366233
+Node: Write Other Derived Routines368857
+Node: BFD back ends370172
+Node: What to Put Where370442
+Node: aout370622
+Node: coff376965
+Node: elf405835
+Node: mmo406236
+Node: File layout407106
+Node: Symbol-table413019
+Node: mmo section mapping416782
+Node: GNU Free Documentation License420436
+Node: BFD Index445500
 
 End Tag Table
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdint.texi ./bfd/doc/bfdint.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdint.texi	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/bfdint.texi	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 \input texinfo
-@c Copyright (C) 1988-2015 Free Software Foundation, Inc.
+@c Copyright (C) 1988-2017 Free Software Foundation, Inc.
 @setfilename bfdint.info
 
 @settitle BFD Internals
@@ -14,7 +14,7 @@
 @copying
 This file documents the internals of the BFD library.
 
-Copyright @copyright{} 1988-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1988-2017 Free Software Foundation, Inc.
 Contributed by Cygnus Support.
 
 Permission is granted to copy, distribute and/or modify this document
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdsumm.texi ./bfd/doc/bfdsumm.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdsumm.texi	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/bfdsumm.texi	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 @c This summary of BFD is shared by the BFD and LD docs.
-@c Copyright (C) 2012-2015 Free Software Foundation, Inc.
+@c Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 When an object file is opened, BFD subroutines automatically determine
 the format of the input object file.  They then build a descriptor in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfd.texinfo ./bfd/doc/bfd.texinfo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfd.texinfo	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/bfd.texinfo	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 \input texinfo.tex
 @setfilename bfd.info
-@c Copyright (C) 1988-2015 Free Software Foundation, Inc.
+@c Copyright (C) 1988-2017 Free Software Foundation, Inc.
 @c 
 @synindex fn cp
 
@@ -14,7 +14,7 @@
 @copying
 This file documents the BFD library.
 
-Copyright @copyright{} 1991-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2017 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -62,7 +62,7 @@ included in the section entitled ``GNU F
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1991-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2017 Free Software Foundation, Inc.
 
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.3
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdt.texi ./bfd/doc/bfdt.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdt.texi	2015-07-06 01:49:56.000000000 +0000
+++ ./bfd/doc/bfdt.texi	2017-03-06 01:51:10.000000000 +0000
@@ -21,7 +21,7 @@ enum bfd_direction
 
 enum bfd_plugin_format
   @{
-    bfd_plugin_uknown = 0,
+    bfd_plugin_unknown = 0,
     bfd_plugin_yes = 1,
     bfd_plugin_no = 2
   @};
@@ -66,7 +66,7 @@ struct bfd
   ENUM_BITFIELD (bfd_direction) direction : 2;
 
   /* Format_specific flags.  */
-  flagword flags : 18;
+  flagword flags : 20;
 
   /* Values that may appear in the flags field of a BFD.  These also
      appear in the object_flags field of the bfd_target structure, where
@@ -146,16 +146,24 @@ struct bfd
   /* Compress sections in this BFD with SHF_COMPRESSED from gABI.  */
 #define BFD_COMPRESS_GABI 0x20000
 
+  /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
+     BFD.  */
+#define BFD_CONVERT_ELF_COMMON 0x40000
+
+  /* Use the ELF STT_COMMON type in this BFD.  */
+#define BFD_USE_ELF_STT_COMMON 0x80000
+
   /* Flags bits to be saved in bfd_preserve_save.  */
 #define BFD_FLAGS_SAVED \
-  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
-   | BFD_COMPRESS_GABI)
+  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+   | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+   | BFD_USE_ELF_STT_COMMON)
 
   /* Flags bits which are for BFD use only.  */
 #define BFD_FLAGS_FOR_BFD_USE_MASK \
   (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
    | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
-   | BFD_COMPRESS_GABI)
+   | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
 
   /* Is the file descriptor being cached?  That is, can it be closed as
      needed, and re-opened when accessed later?  */
@@ -426,12 +434,12 @@ Some BFD functions want to print message
 problem.  They call a BFD error handler function.  This
 function may be overridden by the program.
 
-The BFD error handler acts like printf.
+The BFD error handler acts like vprintf.
 
 
 @example
 
-typedef void (*bfd_error_handler_type) (const char *, ...);
+typedef void (*bfd_error_handler_type) (const char *, va_list);
 
 @end example
 @findex bfd_set_error_handler
@@ -456,15 +464,6 @@ is printed before the error message foll
 space.  The string must not be changed after it is passed to
 this function.
 
-@findex bfd_get_error_handler
-@subsubsection @code{bfd_get_error_handler}
-@strong{Synopsis}
-@example
-bfd_error_handler_type bfd_get_error_handler (void);
-@end example
-@strong{Description}@*
-Return the BFD error handler function.
-
 @subsection BFD assert handler
 If BFD finds an internal inconsistency, the bfd assert
 handler is called with information on the BFD version, BFD
@@ -493,15 +492,6 @@ bfd_assert_handler_type bfd_set_assert_h
 Set the BFD assert handler function.  Returns the previous
 function.
 
-@findex bfd_get_assert_handler
-@subsubsection @code{bfd_get_assert_handler}
-@strong{Synopsis}
-@example
-bfd_assert_handler_type bfd_get_assert_handler (void);
-@end example
-@strong{Description}@*
-Return the BFD assert handler function.
-
 @node Miscellaneous, Memory Usage, Error reporting, BFD front end
 @section Miscellaneous
 
@@ -710,29 +700,6 @@ Not enough memory exists to create priva
                (ibfd, obfd))
 @end example
 
-@findex bfd_merge_private_bfd_data
-@subsubsection @code{bfd_merge_private_bfd_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-@end example
-@strong{Description}@*
-Merge private BFD information from the BFD @var{ibfd} to the
-the output file BFD @var{obfd} when linking.  Return @code{TRUE}
-on success, @code{FALSE} on error.  Possible error returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{obfd}.
-@end itemize
-@example
-#define bfd_merge_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-               (ibfd, obfd))
-@end example
-
 @findex bfd_set_private_flags
 @subsubsection @code{bfd_set_private_flags}
 @strong{Synopsis}
@@ -967,3 +934,29 @@ Return the size of the compression heade
 @strong{Returns}@*
 Return the size of the compression header in bytes.
 
+@findex bfd_convert_section_size
+@subsubsection @code{bfd_convert_section_size}
+@strong{Synopsis}
+@example
+bfd_size_type bfd_convert_section_size
+   (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
+@end example
+@strong{Description}@*
+Convert the size @var{size} of the section @var{isec} in input
+BFD @var{ibfd} to the section size in output BFD @var{obfd}.
+
+@findex bfd_convert_section_contents
+@subsubsection @code{bfd_convert_section_contents}
+@strong{Synopsis}
+@example
+bfd_boolean bfd_convert_section_contents
+   (bfd *ibfd, asection *isec, bfd *obfd,
+    bfd_byte **ptr, bfd_size_type *ptr_size);
+@end example
+@strong{Description}@*
+Convert the contents, stored in @var{*ptr}, of the section
+@var{isec} in input BFD @var{ibfd} to output BFD @var{obfd}
+if needed.  The original buffer pointed to by @var{*ptr} may
+be freed and @var{*ptr} is returned with memory malloc'd by this
+function, and the new size written to @var{ptr_size}.
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdver.texi ./bfd/doc/bfdver.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/bfdver.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/bfdver.texi	2017-03-06 01:51:10.000000000 +0000
@@ -1,4 +1,4 @@
-@set VERSION 2.25.51
+@set VERSION 2.28.51
 @set VERSION_PACKAGE (GNU Binutils) 
-@set UPDATED July 2015
+@set UPDATED March 2017
 @set BUGURL @uref{http://www.sourceware.org/bugzilla/}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/ChangeLog ./bfd/doc/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,342 +0,0 @@
-2015-06-21  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.am: Expand $<.
-	* Makefile.in: Regenerate.
-
-2015-02-11  Pedro Alves  <palves@redhat.com>
-
-	* Makefile.am (libbfd.h, libcoff.h): Close extern "C" scope.
-	* Makefile.in: Regenerate.
-
-2015-01-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
-	    Alan Modra  <amodra@gmail.com>
-
-	PR 17817
-	* Makefile.am (aoutx.stamp): cp -p $srcdir/aoutx.texi to keep
-	timestamps so that makeinfo need not be installed.
-	(archive.stamp, archures.stamp, bfdt.stamp, cache.stamp,
-	coffcode.stamp, core.stamp, elf.stamp, elfcode.stamp, mmo.stamp,
-	format.stamp, libbfd.stamp, bfdio.stamp, bfdwin.stamp,
-	opncls.stamp, reloc.stamp, section.stamp, syms.stamp, targets.stamp,
-	init.stamp, hash.stamp, linker.stamp): Similarly.
-	(bfdver.texi): Use test rather than [ ] in commands.
-	* Makefile.in: Regenerate.
-
-2014-08-05  Doug Evans  <dje@google.com>
-
-	* chew.c (skip_past_newline_1): New function.
-	(outputdots): Call it.
-	(skip_past_newline): Ditto.
-
-2014-08-05  Alan Modra  <amodra@gmail.com>
-
-	* chew.c (print_stack_level, main): Cast result of pointer
-	difference to match format string.
-
-2014-04-09  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.am ($(MKDOC)): New rule, depend on chew.stamp.  Move
-	old rule to..
-	(chew.stamp): ..here.
-	(DISTCLEANFILES): Move *.stamp..
-	(MOSTLYCLEANFILES): ..to here.
-	* Makefile.in: Regenerate.
-
-2014-04-09  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.am (MKDOC): Use $@ in command.
-	(aoutx.texi): New rule, depend on aoutx.stamp.  Move old rule..
-	(aoutx.stamp): .. to here.  Don't depend on chew.c, depend on MKDOC
-	and omit recursive MAKE.  Use $< in command.
-	(archive.texi, archures.texi, bfdt.texi, cache.texi, coffcode.texi,
-	core.texi, elf.texi, elfcode.texi, mmo.texi, format.texi, libbfd.texi,
-	bfdio.texi, bfdwin.texi, opncls.texi, reloc.texi, section.texi,
-	syms.texi, targets.texi, init.texi, hash.texi, linker.texi): Similarly.
-	(DISTCLEANFILES): Remove *.stamp.
-	* Makefile.in: Regenerate.
-
-2014-03-12  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.in: Regenerate.
-
-2013-10-14  Nick Clifton  <nickc@redhat.com>
-
-	* chew.c (perform): Free next.
-
-2013-04-15  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.am ($(MKDOC)): Append $(EXEEXT_FOR_BUILD) to temp file.
-	* Makefile.in: Regenerate.
-
-2013-04-09  Mingjie Xing  <mingjie.xing@gmail.com>
-
-	* bfd.texinfo (typedef bfd, Error reporting, Miscellaneous):
-	Add menu items.
-
-2013-01-07  Patrice Dumas  <pertusus@free.fr>
-
-	* bfd.texinfo: Replace @ with @@ when it is part of the text.
-
-2012-12-17  Nick Clifton  <nickc@redhat.com>
-
-	* Makefile.am: Add copyright notice.
-	* bfdsumm.texi: Likewise.
-	* makefile.vms: Likewise.
-	* Makefile.in: Regenerate.
-
-2012-11-08  Alan Modra  <amodra@gmail.com>
-
-	* Makefile.in: Regenerate.
-
-2012-02-27  Alan Modra  <amodra@gmail.com>
-
-	* chew.c (print_stack_level, main): Use %ld to print stack delta.
-
-2010-10-28  Matthias Klose  <doko@ubuntu.com>
-
-	* bfd.texinfo: Add directory section for info document.
-
-2010-05-07  Tristan Gingold  <gingold@adacore.com>
-
-	* Makefile.in: Regenerate with automake 1.11.1.
-
-2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-	* Makefile.in: Regenerate.
-
-2009-09-25  Martin Thuresson  <martint@google.com>
-
-	Update soruces to make alpha targets compile cleanly with
-	-Wc++-compat:
-	* chew.c: Add casts.
-
-2009-08-29  Martin Thuresson  <martin@mtme.org>
-
-	* chew.c (newentry, add_intrinsic): Rename variable new to
-	new_d.
-
-2009-08-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-	* Makefile.in: Regenerate.
-
-2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-	* Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
-	(html__strip_dir, install-html, install-html-am): Remove.
-	* Makefile.in: Regenerate.
-
-	* Makefile.in: Regenerate.
-
-2009-05-22  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2009-04-22  Anthony Green  <green@moxielogic.com>
-
-	* bfdint.texi (BFD target vector miscellaneous): Mention verilog
-	flavour.
-
-2008-11-19  Nick Clifton  <nickc@redhat.com>
-
-	* fdl.texi: Update to v1.3
-	* bfd.texinfo: Change license to v1.3.
-
-2008-08-24  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.am (chew.o): Delete rule.
-	($(MKDOC)): Move options before C file.
-	* Makefile.in: Regenerate.
-
-2008-08-15  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2008-07-09  Craig Silverstein  <csilvers@google.com>
-
-	* Makefile.am (BFD_H_DEP): Add ../compress.c.
-	* Makefile.in: Regenerate.
-
-2008-05-14  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2008-03-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-	* Makefile.in: Regenerate.
-
-2008-03-13  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2007-10-15  Alan Modra  <amodra@bigpond.net.au>
-
-	* chew.c (write_buffer): Check fwrite return value.
-
-2007-09-14  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2007-07-02  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2007-06-30  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.in: Likewise.
-
-2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.in: Regenerated.
-
-2007-05-22  Nick Clifton  <nickc@redhat.com>
-
-	* bfd.texinfo: Use @copying around the copyright notice.
-	* bfdint.texi: Likewise.
-
-2007-05-21  Nick Clifton  <nickc@redhat.com>
-
-	* bfdint.texi: Add GNU Free Documentation License notice.
-
-2007-04-24  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2007-02-17  Mark Mitchell  <mark@codesourcery.com>
-	    Nathan Sidwell  <nathan@codesourcery.com>
-	    Vladimir Prus  <vladimir@codesourcery.com
-	    Joseph Myers  <joseph@codesourcery.com>
-
-	* Makefile.in: Regenerate.
-
-2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-	* bfd..texinfo: Fix spelling mistakes.
-	* bfdint.texinfo: Likewise.
-
-2006-07-18  Nigel Stephens  <nigel@mips.com>
-
-	* bfd.texinfo: Add @section for "What to Put Where".
-
-2006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
-
-	* bfd.texinfo: Remove local @tex code.
-
-2006-06-05  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2006-05-11  Carlos O'Donell  <carlos@codesourcery.com>
-
-	* bfd.texinfo: Rename "Index" to "BFD Index"
-
-2006-04-06  Carlos O'Donell  <carlos@codesourcery.com>
-
-	* Makefile.am: Add install-html and install-html-am targets.
-	Define datarootdir, docdir and htmldir.
-	* Makefile.in: Regenerate.
-
-2006-02-27  Carlos O'Donell  <carlos@codesourcery.com>
-
-	* Makefile.am: Add html target.
-	* Makefile.in: Regenerate.
-
-2005-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* chew.c: Include <string.h>.
-
-2005-07-22  DJ Delorie  <dj@redhat.com>
-
-	* chew.c: Include stdlib.h.
-
-2005-07-22  Kazu Hirata  <kazu@codesourcery.com>
-
-	* chew.c: Don't include sysdep.h.
-
-2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* Makefile.am: Use a temporary file to build chew.
-	* Makefile.in: Regenerated.
-
-2005-05-04  Nick Clifton  <nickc@redhat.com>
-
-	* chew.c: Update the address and phone number of the FSF
-	organization in the GPL notice.
-
-2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.am (INCLUDES): Remove -D_GNU_SOURCE.
-	* Makefile.in: Regenerate.
-
-2005-04-29  Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* Makefile.am: Remove stamp rules.  Depend on chew.c
-	instead of $(MKDOC).
-	* Makefile.in: Regnerated.
-
-2005-04-21  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.am (INCLUDES): New. Add -D_GNU_SOURCE.
-	(chew.o): Use it.
-	* Makefile.in: Regenerate.
-
-2005-04-14  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2005-04-12  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2005-02-21  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2005-02-13  Maciej W. Rozycki  <macro@linux-mips.org>
-
-	* Makefile.am: Use CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for
-	building chew.
-	* Makefile.in: Regenerate.
-
-2005-02-01  Ben Elliston  <bje@au.ibm.com>
-
-	* chew.c: Remove #if 0'd code throughout. Similarly, collapse #if
-	1'd code.
-
-2004-12-20  Ian Lance Taylor  <ian@c2microsystems.com>
-
-	* Makefile.am: Use $(SHELL) whenever we run move-if-change.
-	* Makefile.in: Rebuild.
-
-2004-09-19  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
-	(bfd.info): Rename the target to ...
-	($(srcdir)/bfd.info): This.
-	* Makefile.in: Regenerated.
-
-2004-09-17  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-2004-03-27  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdint.texi: Remove all mention of elflink.h.
-
-2004-03-19  Alan Modra  <amodra@bigpond.net.au>
-
-	* Makefile.in: Regenerate.
-
-For older changes see ChangeLog-9103
-
-Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/ChangeLog-0415 ./bfd/doc/ChangeLog-0415
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/ChangeLog-0415	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/doc/ChangeLog-0415	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,342 @@
+2015-06-21  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am: Expand $<.
+	* Makefile.in: Regenerate.
+
+2015-02-11  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.am (libbfd.h, libcoff.h): Close extern "C" scope.
+	* Makefile.in: Regenerate.
+
+2015-01-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+	    Alan Modra  <amodra@gmail.com>
+
+	PR 17817
+	* Makefile.am (aoutx.stamp): cp -p $srcdir/aoutx.texi to keep
+	timestamps so that makeinfo need not be installed.
+	(archive.stamp, archures.stamp, bfdt.stamp, cache.stamp,
+	coffcode.stamp, core.stamp, elf.stamp, elfcode.stamp, mmo.stamp,
+	format.stamp, libbfd.stamp, bfdio.stamp, bfdwin.stamp,
+	opncls.stamp, reloc.stamp, section.stamp, syms.stamp, targets.stamp,
+	init.stamp, hash.stamp, linker.stamp): Similarly.
+	(bfdver.texi): Use test rather than [ ] in commands.
+	* Makefile.in: Regenerate.
+
+2014-08-05  Doug Evans  <dje@google.com>
+
+	* chew.c (skip_past_newline_1): New function.
+	(outputdots): Call it.
+	(skip_past_newline): Ditto.
+
+2014-08-05  Alan Modra  <amodra@gmail.com>
+
+	* chew.c (print_stack_level, main): Cast result of pointer
+	difference to match format string.
+
+2014-04-09  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am ($(MKDOC)): New rule, depend on chew.stamp.  Move
+	old rule to..
+	(chew.stamp): ..here.
+	(DISTCLEANFILES): Move *.stamp..
+	(MOSTLYCLEANFILES): ..to here.
+	* Makefile.in: Regenerate.
+
+2014-04-09  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am (MKDOC): Use $@ in command.
+	(aoutx.texi): New rule, depend on aoutx.stamp.  Move old rule..
+	(aoutx.stamp): .. to here.  Don't depend on chew.c, depend on MKDOC
+	and omit recursive MAKE.  Use $< in command.
+	(archive.texi, archures.texi, bfdt.texi, cache.texi, coffcode.texi,
+	core.texi, elf.texi, elfcode.texi, mmo.texi, format.texi, libbfd.texi,
+	bfdio.texi, bfdwin.texi, opncls.texi, reloc.texi, section.texi,
+	syms.texi, targets.texi, init.texi, hash.texi, linker.texi): Similarly.
+	(DISTCLEANFILES): Remove *.stamp.
+	* Makefile.in: Regenerate.
+
+2014-03-12  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.in: Regenerate.
+
+2013-10-14  Nick Clifton  <nickc@redhat.com>
+
+	* chew.c (perform): Free next.
+
+2013-04-15  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.am ($(MKDOC)): Append $(EXEEXT_FOR_BUILD) to temp file.
+	* Makefile.in: Regenerate.
+
+2013-04-09  Mingjie Xing  <mingjie.xing@gmail.com>
+
+	* bfd.texinfo (typedef bfd, Error reporting, Miscellaneous):
+	Add menu items.
+
+2013-01-07  Patrice Dumas  <pertusus@free.fr>
+
+	* bfd.texinfo: Replace @ with @@ when it is part of the text.
+
+2012-12-17  Nick Clifton  <nickc@redhat.com>
+
+	* Makefile.am: Add copyright notice.
+	* bfdsumm.texi: Likewise.
+	* makefile.vms: Likewise.
+	* Makefile.in: Regenerate.
+
+2012-11-08  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.in: Regenerate.
+
+2012-02-27  Alan Modra  <amodra@gmail.com>
+
+	* chew.c (print_stack_level, main): Use %ld to print stack delta.
+
+2010-10-28  Matthias Klose  <doko@ubuntu.com>
+
+	* bfd.texinfo: Add directory section for info document.
+
+2010-05-07  Tristan Gingold  <gingold@adacore.com>
+
+	* Makefile.in: Regenerate with automake 1.11.1.
+
+2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* Makefile.in: Regenerate.
+
+2009-09-25  Martin Thuresson  <martint@google.com>
+
+	Update soruces to make alpha targets compile cleanly with
+	-Wc++-compat:
+	* chew.c: Add casts.
+
+2009-08-29  Martin Thuresson  <martin@mtme.org>
+
+	* chew.c (newentry, add_intrinsic): Rename variable new to
+	new_d.
+
+2009-08-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* Makefile.in: Regenerate.
+
+2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
+	(html__strip_dir, install-html, install-html-am): Remove.
+	* Makefile.in: Regenerate.
+
+	* Makefile.in: Regenerate.
+
+2009-05-22  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2009-04-22  Anthony Green  <green@moxielogic.com>
+
+	* bfdint.texi (BFD target vector miscellaneous): Mention verilog
+	flavour.
+
+2008-11-19  Nick Clifton  <nickc@redhat.com>
+
+	* fdl.texi: Update to v1.3
+	* bfd.texinfo: Change license to v1.3.
+
+2008-08-24  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am (chew.o): Delete rule.
+	($(MKDOC)): Move options before C file.
+	* Makefile.in: Regenerate.
+
+2008-08-15  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2008-07-09  Craig Silverstein  <csilvers@google.com>
+
+	* Makefile.am (BFD_H_DEP): Add ../compress.c.
+	* Makefile.in: Regenerate.
+
+2008-05-14  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2008-03-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* Makefile.in: Regenerate.
+
+2008-03-13  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2007-10-15  Alan Modra  <amodra@bigpond.net.au>
+
+	* chew.c (write_buffer): Check fwrite return value.
+
+2007-09-14  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2007-07-02  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2007-06-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in: Likewise.
+
+2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in: Regenerated.
+
+2007-05-22  Nick Clifton  <nickc@redhat.com>
+
+	* bfd.texinfo: Use @copying around the copyright notice.
+	* bfdint.texi: Likewise.
+
+2007-05-21  Nick Clifton  <nickc@redhat.com>
+
+	* bfdint.texi: Add GNU Free Documentation License notice.
+
+2007-04-24  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2007-02-17  Mark Mitchell  <mark@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+	    Vladimir Prus  <vladimir@codesourcery.com
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	* Makefile.in: Regenerate.
+
+2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* bfd..texinfo: Fix spelling mistakes.
+	* bfdint.texinfo: Likewise.
+
+2006-07-18  Nigel Stephens  <nigel@mips.com>
+
+	* bfd.texinfo: Add @section for "What to Put Where".
+
+2006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* bfd.texinfo: Remove local @tex code.
+
+2006-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2006-05-11  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* bfd.texinfo: Rename "Index" to "BFD Index"
+
+2006-04-06  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* Makefile.am: Add install-html and install-html-am targets.
+	Define datarootdir, docdir and htmldir.
+	* Makefile.in: Regenerate.
+
+2006-02-27  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* Makefile.am: Add html target.
+	* Makefile.in: Regenerate.
+
+2005-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* chew.c: Include <string.h>.
+
+2005-07-22  DJ Delorie  <dj@redhat.com>
+
+	* chew.c: Include stdlib.h.
+
+2005-07-22  Kazu Hirata  <kazu@codesourcery.com>
+
+	* chew.c: Don't include sysdep.h.
+
+2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* Makefile.am: Use a temporary file to build chew.
+	* Makefile.in: Regenerated.
+
+2005-05-04  Nick Clifton  <nickc@redhat.com>
+
+	* chew.c: Update the address and phone number of the FSF
+	organization in the GPL notice.
+
+2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (INCLUDES): Remove -D_GNU_SOURCE.
+	* Makefile.in: Regenerate.
+
+2005-04-29  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* Makefile.am: Remove stamp rules.  Depend on chew.c
+	instead of $(MKDOC).
+	* Makefile.in: Regnerated.
+
+2005-04-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (INCLUDES): New. Add -D_GNU_SOURCE.
+	(chew.o): Use it.
+	* Makefile.in: Regenerate.
+
+2005-04-14  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2005-04-12  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2005-02-21  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2005-02-13  Maciej W. Rozycki  <macro@linux-mips.org>
+
+	* Makefile.am: Use CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for
+	building chew.
+	* Makefile.in: Regenerate.
+
+2005-02-01  Ben Elliston  <bje@au.ibm.com>
+
+	* chew.c: Remove #if 0'd code throughout. Similarly, collapse #if
+	1'd code.
+
+2004-12-20  Ian Lance Taylor  <ian@c2microsystems.com>
+
+	* Makefile.am: Use $(SHELL) whenever we run move-if-change.
+	* Makefile.in: Rebuild.
+
+2004-09-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
+	(bfd.info): Rename the target to ...
+	($(srcdir)/bfd.info): This.
+	* Makefile.in: Regenerated.
+
+2004-09-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+2004-03-27  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdint.texi: Remove all mention of elflink.h.
+
+2004-03-19  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+
+For older changes see ChangeLog-9103
+
+Copyright (C) 2004-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/chew.c ./bfd/doc/chew.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/chew.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/chew.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* chew
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Contributed by steve chamberlain @cygnus
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -170,7 +170,9 @@ static void
 delete_string (buffer)
      string_type *buffer;
 {
-  free (buffer->ptr);
+  if (buffer->ptr)
+    free (buffer->ptr);
+  buffer->ptr = NULL;
 }
 
 static char *
@@ -1088,6 +1090,7 @@ drop ()
 {
   tos--;
   check_range ();
+  delete_string (tos + 1);
   pc++;
 }
 
@@ -1244,6 +1247,35 @@ lookup_word (word)
 }
 
 static void
+free_words (void)
+{
+  dict_type *ptr = root;
+
+  while (ptr)
+    {
+      dict_type *next;
+
+      if (ptr->word)
+	free (ptr->word);
+      if (ptr->code)
+	{
+	  int i;
+	  for (i = 0; i < ptr->code_length; i ++)
+	    if (ptr->code[i] == push_text
+		&& ptr->code[i + 1])
+	      {
+		free (ptr->code[i + 1] - 1);
+		++ i;
+	      }
+	  free (ptr->code);
+	}
+      next = ptr->next;
+      free (ptr);
+      ptr = next;
+    }
+}
+
+static void
 perform ()
 {
   tos = stack;
@@ -1313,7 +1345,7 @@ add_intrinsic (name, func)
      char *name;
      void (*func) ();
 {
-  dict_type *new_d = newentry (name);
+  dict_type *new_d = newentry (strdup (name));
   add_to_definition (new_d, func);
   add_to_definition (new_d, 0);
 }
@@ -1334,24 +1366,27 @@ compile (string)
 {
   /* Add words to the dictionary.  */
   char *word;
+
   string = nextword (string, &word);
   while (string && *string && word[0])
     {
       if (strcmp (word, "var") == 0)
 	{
+	  free (word);
 	  string = nextword (string, &word);
-
 	  add_var (word);
 	  string = nextword (string, &word);
 	}
       else if (word[0] == ':')
 	{
 	  dict_type *ptr;
+
 	  /* Compile a word and add to dictionary.  */
+	  free (word);
 	  string = nextword (string, &word);
-
 	  ptr = newentry (word);
 	  string = nextword (string, &word);
+	  
 	  while (word[0] != ';')
 	    {
 	      switch (word[0])
@@ -1376,15 +1411,19 @@ compile (string)
 		     function */
 		  add_to_definition (ptr, push_number);
 		  add_to_definition (ptr, (stinst_type) atol (word));
+		  free (word);
 		  break;
 		default:
 		  add_to_definition (ptr, call);
 		  add_to_definition (ptr, (stinst_type) lookup_word (word));
+		  free (word);
 		}
 
 	      string = nextword (string, &word);
 	    }
 	  add_to_definition (ptr, 0);
+	  free (word);
+	  word = NULL;
 	  string = nextword (string, &word);
 	}
       else
@@ -1392,6 +1431,8 @@ compile (string)
 	  fprintf (stderr, "syntax error at %s\n", string - 1);
 	}
     }
+  if (word)
+    free (word);
 }
 
 static void
@@ -1561,6 +1602,7 @@ main (ac, av)
 	      read_in (&b, f);
 	      compile (b.ptr);
 	      perform ();
+	      delete_string (&b);
 	    }
 	  else if (av[i][1] == 'i')
 	    {
@@ -1575,6 +1617,9 @@ main (ac, av)
 	}
     }
   write_buffer (stack + 0, stdout);
+  free_words ();
+  delete_string (&pptr);
+  delete_string (&buffer);
   if (tos != stack)
     {
       fprintf (stderr, "finishing with current stack level %ld\n",
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/linker.texi ./bfd/doc/linker.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/linker.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/linker.texi	2017-03-06 01:51:10.000000000 +0000
@@ -418,3 +418,65 @@ bfd_boolean bfd_hide_sym_by_version
 Search an elf version script tree for symbol versioning
 info for a given symbol.  Return TRUE if the symbol is hidden.
 
+@findex bfd_link_check_relocs
+@subsubsection @code{bfd_link_check_relocs}
+@strong{Synopsis}
+@example
+bfd_boolean bfd_link_check_relocs
+   (bfd *abfd, struct bfd_link_info *info);
+@end example
+@strong{Description}@*
+Checks the relocs in ABFD for validity.
+Does not execute the relocs.
+Return TRUE if everything is OK, FALSE otherwise.
+This is the external entry point to this code.
+
+@findex _bfd_generic_link_check_relocs
+@subsubsection @code{_bfd_generic_link_check_relocs}
+@strong{Synopsis}
+@example
+bfd_boolean _bfd_generic_link_check_relocs
+   (bfd *abfd, struct bfd_link_info *info);
+@end example
+@strong{Description}@*
+Stub function for targets that do not implement reloc checking.
+Return TRUE.
+This is an internal function.  It should not be called from
+outside the BFD library.
+
+@findex bfd_merge_private_bfd_data
+@subsubsection @code{bfd_merge_private_bfd_data}
+@strong{Synopsis}
+@example
+bfd_boolean bfd_merge_private_bfd_data
+   (bfd *ibfd, struct bfd_link_info *info);
+@end example
+@strong{Description}@*
+Merge private BFD information from the BFD @var{ibfd} to the
+the output file BFD when linking.  Return @code{TRUE} on success,
+@code{FALSE} on error.  Possible error returns are:
+
+@itemize @bullet
+
+@item
+@code{bfd_error_no_memory} -
+Not enough memory exists to create private data for @var{obfd}.
+@end itemize
+@example
+#define bfd_merge_private_bfd_data(ibfd, info) \
+     BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+               (ibfd, info))
+@end example
+
+@findex _bfd_generic_verify_endian_match
+@subsubsection @code{_bfd_generic_verify_endian_match}
+@strong{Synopsis}
+@example
+bfd_boolean _bfd_generic_verify_endian_match
+   (bfd *ibfd, struct bfd_link_info *info);
+@end example
+@strong{Description}@*
+Can be used from / for bfd_merge_private_bfd_data to check that
+endianness matches between input and output file.  Returns
+TRUE for a match, otherwise returns FALSE and emits an error.
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/Makefile.am ./bfd/doc/Makefile.am
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/Makefile.am	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/Makefile.am	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 ## Process this file with automake to generate Makefile.in
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -252,14 +252,13 @@ linker.stamp: $(srcdir)/../linker.c $(sr
 
 LIBBFD_H_DEP = \
 	$(srcdir)/../libbfd-in.h	\
-	$(srcdir)/../init.c		\
 	$(srcdir)/../libbfd.c		\
 	$(srcdir)/../bfdio.c		\
 	$(srcdir)/../bfdwin.c		\
 	$(srcdir)/../cache.c		\
 	$(srcdir)/../reloc.c		\
 	$(srcdir)/../archures.c		\
-	$(srcdir)/../elf.c		\
+	$(srcdir)/../linker.c		\
 	$(srcdir)/header.sed		\
 	$(srcdir)/proto.str		\
 	$(MKDOC)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/Makefile.in ./bfd/doc/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/Makefile.in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/Makefile.in	2017-03-06 01:49:05.000000000 +0000
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,7 @@
 @SET_MAKE@
 
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,6 +33,23 @@
 # <http://www.gnu.org/licenses/>.
 #
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -104,6 +121,11 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
 DVIPS = dvips
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -125,6 +147,12 @@ am__nobase_list = $(am__nobase_strip_set
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AR = @AR@
@@ -220,6 +248,8 @@ TDEFINES = @TDEFINES@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
+WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -349,14 +379,13 @@ AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(sr
 
 LIBBFD_H_DEP = \
 	$(srcdir)/../libbfd-in.h	\
-	$(srcdir)/../init.c		\
 	$(srcdir)/../libbfd.c		\
 	$(srcdir)/../bfdio.c		\
 	$(srcdir)/../bfdwin.c		\
 	$(srcdir)/../cache.c		\
 	$(srcdir)/../reloc.c		\
 	$(srcdir)/../archures.c		\
-	$(srcdir)/../elf.c		\
+	$(srcdir)/../linker.c		\
 	$(srcdir)/header.sed		\
 	$(srcdir)/proto.str		\
 	$(MKDOC)
@@ -504,9 +533,7 @@ uninstall-html-am:
 
 uninstall-info-am:
 	@$(PRE_UNINSTALL)
-	@if test -d '$(DESTDIR)$(infodir)' && \
-	    (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	@if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
 	  list='$(INFO_DEPS)'; \
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -597,10 +624,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
 
@@ -642,8 +674,11 @@ install-dvi: install-dvi-am
 
 install-dvi-am: $(DVIS)
 	@$(NORMAL_INSTALL)
-	test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
 	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -658,18 +693,22 @@ install-html: install-html-am
 
 install-html-am: $(HTMLS)
 	@$(NORMAL_INSTALL)
-	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
 	@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  $(am__strip_dir) \
-	  if test -d "$$d$$p"; then \
+	  d2=$$d$$p; \
+	  if test -d "$$d2"; then \
 	    echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
 	    $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
-	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+	    echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
 	  else \
-	    list2="$$list2 $$d$$p"; \
+	    list2="$$list2 $$d2"; \
 	  fi; \
 	done; \
 	test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
@@ -681,9 +720,12 @@ install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
 	@$(NORMAL_INSTALL)
-	test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+	fi; \
 	for file in $$list; do \
 	  case $$file in \
 	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -701,8 +743,7 @@ install-info-am: $(INFO_DEPS)
 	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
 	  $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
 	@$(POST_INSTALL)
-	@if (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	@if $(am__can_run_installinfo); then \
 	  list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -716,8 +757,11 @@ install-pdf: install-pdf-am
 
 install-pdf-am: $(PDFS)
 	@$(NORMAL_INSTALL)
-	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
 	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -729,8 +773,11 @@ install-ps: install-ps-am
 
 install-ps-am: $(PSS)
 	@$(NORMAL_INSTALL)
-	test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
 	@list='$(PSS)'; test -n "$(psdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/makefile.vms ./bfd/doc/makefile.vms
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/makefile.vms	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/doc/makefile.vms	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/opncls.texi ./bfd/doc/opncls.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/opncls.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/opncls.texi	2017-03-06 01:51:10.000000000 +0000
@@ -354,7 +354,7 @@ match @var{crc32}.
 @strong{Synopsis}
 @example
 bfd_boolean separate_alt_debug_file_exists
-   (char *name, unsigned long crc32);
+   (char *name, unsigned long buildid);
 @end example
 @strong{Description}@*
 Checks to see if @var{name} is a file and if its BuildID
@@ -364,17 +364,21 @@ matches @var{buildid}.
 @subsubsection @code{find_separate_debug_file}
 @strong{Synopsis}
 @example
-char *find_separate_debug_file (bfd *abfd);
+char *find_separate_debug_file
+   (bfd *abfd, const char *dir, bfd_boolean include_dirs,
+    get_func_type get, check_func_type check);
 @end example
 @strong{Description}@*
-Searches @var{abfd} for a section called @var{section_name} which
-is expected to contain a reference to a file containing separate
-debugging information.  The function scans various locations in
-the filesystem, including the file tree rooted at
-@var{debug_file_directory}, and returns the first matching
-filename that it finds.  If @var{check_crc} is TRUE then the
-contents of the file must also match the CRC value contained in
-@var{section_name}.  Returns NULL if no valid file could be found.
+Searches for a debug information file corresponding to @var{abfd}.
+The name of the separate debug info file is returned by the @var{get}
+function.  This function scans various fixed locations in the
+filesystem, including the file tree rooted at @var{dir}.  If the
+@var{include_dirs} parameter is true then the directory components of
+@var{abfd}'s filename will be included in the searched locations.
+
+Returns the filename of the first file to be found which receives a
+TRUE result from the @var{check} function.  Returns NULL if no valid
+file could be found.
 
 @findex bfd_follow_gnu_debuglink
 @subsubsection @code{bfd_follow_gnu_debuglink}
@@ -390,9 +394,8 @@ then searches the filesystem for this .d
 locations, including the directory tree rooted at @var{dir}, and if
 found returns the full filename.
 
-If @var{dir} is NULL, it will search a default path configured into
-libbfd at build time.  [XXX this feature is not currently
-implemented].
+If @var{dir} is NULL, the search will take place starting at
+the current directory.
 
 @strong{Returns}@*
 @code{NULL} on any errors or failure to locate the .debug file,
@@ -413,9 +416,8 @@ filesystem for this file in a set of sta
 the directory tree rooted at @var{dir}, and if found returns the
 full filename.
 
-If @var{dir} is NULL, it will search a default path configured into
-libbfd at build time.  [FIXME: This feature is not currently
-implemented].
+If @var{dir} is NULL, the search will take place starting at
+the current directory.
 
 @strong{Returns}@*
 @code{NULL} on any errors or failure to locate the debug file,
@@ -454,3 +456,78 @@ current directory.
 @code{TRUE} is returned if all is ok.  Otherwise @code{FALSE} is returned
 and bfd_error is set.
 
+@findex get_build_id
+@subsubsection @code{get_build_id}
+@strong{Synopsis}
+@example
+struct bfd_build_id * get_build_id
+   (bfd *abfd);
+@end example
+@strong{Description}@*
+Finds the build-id associated with @var{abfd}.  If the build-id is
+extracted from the note section then a build-id structure is built
+for it, using memory allocated to @var{abfd}, and this is then
+attached to the @var{abfd}.
+
+Returns a pointer to the build-id structure if a build-id could be
+found.  If no build-id is found NULL is returned and error code is
+set.
+
+@findex get_build_id_name
+@subsubsection @code{get_build_id_name}
+@strong{Synopsis}
+@example
+char * get_build_id_name
+   (bfd *abfd, unsigned long *build_id_out)
+@end example
+@strong{Description}@*
+Searches @var{abfd} for a build-id, and then constructs a pathname
+from it.  The path is computed as .build-id/NN/NN+NN.debug where
+NNNN+NN is the build-id value as a hexadecimal string.
+
+Returns the constructed filename or NULL upon error.
+It is the caller's responsibility to free the memory used to hold the
+filename.
+If a filename is returned then the @var{build_id_out} parameter is
+set to a pointer to the build_id structure.
+
+@findex check_build_id_file
+@subsubsection @code{check_build_id_file}
+@strong{Synopsis}
+@example
+bfd_boolean check_build_id_file
+   (char *name, unsigned long buildid);
+@end example
+@strong{Description}@*
+Checks to see if @var{name} is a readable file and if its build-id
+matches @var{buildid}.
+
+Returns TRUE if the file exists, is readable, and contains a build-id
+which matches @var{build-id}.
+
+@findex bfd_follow_build_id_debuglink
+@subsubsection @code{bfd_follow_build_id_debuglink}
+@strong{Synopsis}
+@example
+char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
+@end example
+@strong{Description}@*
+Takes @var{abfd} and searches it for a .note.gnu.build-id section.
+If this section is found, it extracts the value of the NT_GNU_BUILD_ID
+note, which should be a hexadecimal value @var{NNNN+NN} (for
+32+ hex digits).  It then searches the filesystem for a file named
+@var{.build-id/NN/NN+NN.debug} in a set of standard locations,
+including the directory tree rooted at @var{dir}.  The filename
+of the first matching file to be found is returned.  A matching
+file should contain a .note.gnu.build-id section with the same
+@var{NNNN+NN} note as @var{abfd}, although this check is currently
+not implemented.
+
+If @var{dir} is NULL, the search will take place starting at
+the current directory.
+
+@strong{Returns}@*
+@code{NULL} on any errors or failure to locate the debug file,
+otherwise a pointer to a heap-allocated string containing the
+filename.  The caller is responsible for freeing this string.
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/reloc.texi ./bfd/doc/reloc.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/reloc.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/reloc.texi	2017-03-06 01:51:10.000000000 +0000
@@ -884,6 +884,9 @@ Relocation against a MIPS literal sectio
 @deffnx {} BFD_RELOC_MICROMIPS_16_PCREL_S1
 microMIPS PC-relative relocations.
 @end deffn
+@deffn {} BFD_RELOC_MIPS16_16_PCREL_S1
+MIPS16 PC-relative relocation.
+@end deffn
 @deffn {} BFD_RELOC_MIPS_21_PCREL_S2
 @deffnx {} BFD_RELOC_MIPS_26_PCREL_S2
 @deffnx {} BFD_RELOC_MIPS_18_PCREL_S3
@@ -1088,6 +1091,7 @@ instruction.
 @deffnx {} BFD_RELOC_386_TLS_DESC_CALL
 @deffnx {} BFD_RELOC_386_TLS_DESC
 @deffnx {} BFD_RELOC_386_IRELATIVE
+@deffnx {} BFD_RELOC_386_GOT32X
 i386/elf relocations
 @end deffn
 @deffn {} BFD_RELOC_X86_64_GOT32
@@ -1119,6 +1123,8 @@ i386/elf relocations
 @deffnx {} BFD_RELOC_X86_64_IRELATIVE
 @deffnx {} BFD_RELOC_X86_64_PC32_BND
 @deffnx {} BFD_RELOC_X86_64_PLT32_BND
+@deffnx {} BFD_RELOC_X86_64_GOTPCRELX
+@deffnx {} BFD_RELOC_X86_64_REX_GOTPCRELX
 x86-64/elf relocations
 @end deffn
 @deffn {} BFD_RELOC_NS32K_IMM_8
@@ -1194,6 +1200,8 @@ Picojava relocs.  Not all of these appea
 @deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HI16D
 @deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HA16A
 @deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HA16D
+@deffnx {} BFD_RELOC_PPC_16DX_HA
+@deffnx {} BFD_RELOC_PPC_REL16DX_HA
 @deffnx {} BFD_RELOC_PPC64_HIGHER
 @deffnx {} BFD_RELOC_PPC64_HIGHER_S
 @deffnx {} BFD_RELOC_PPC64_HIGHEST
@@ -1220,6 +1228,7 @@ Picojava relocs.  Not all of these appea
 @deffnx {} BFD_RELOC_PPC64_ADDR16_HIGH
 @deffnx {} BFD_RELOC_PPC64_ADDR16_HIGHA
 @deffnx {} BFD_RELOC_PPC64_ADDR64_LOCAL
+@deffnx {} BFD_RELOC_PPC64_ENTRY
 Power(rs6000) and PowerPC relocations.
 @end deffn
 @deffn {} BFD_RELOC_PPC_TLS
@@ -1406,6 +1415,12 @@ Annotation of BX instructions.
 @deffn {} BFD_RELOC_ARM_IRELATIVE
 ARM support for STT_GNU_IFUNC.
 @end deffn
+@deffn {} BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC
+@deffnx {} BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC
+@deffnx {} BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC
+@deffnx {} BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC
+Thumb1 relocations to support execute-only code.
+@end deffn
 @deffn {} BFD_RELOC_ARM_IMMEDIATE
 @deffnx {} BFD_RELOC_ARM_ADRL_IMMEDIATE
 @deffnx {} BFD_RELOC_ARM_T32_IMMEDIATE
@@ -1534,16 +1549,75 @@ These relocs are only used within the AR
 @deffnx {} BFD_RELOC_SH_FUNCDESC
 Renesas / SuperH SH relocs.  Not all of these appear in object files.
 @end deffn
-@deffn {} BFD_RELOC_ARC_B22_PCREL
-ARC Cores relocs.
-ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
-not stored in the instruction.  The high 20 bits are installed in bits 26
-through 7 of the instruction.
-@end deffn
-@deffn {} BFD_RELOC_ARC_B26
-ARC 26 bit absolute branch.  The lowest two bits must be zero and are not
-stored in the instruction.  The high 24 bits are installed in bits 23
-through 0.
+@deffn {} BFD_RELOC_ARC_NONE
+@deffnx {} BFD_RELOC_ARC_8
+@deffnx {} BFD_RELOC_ARC_16
+@deffnx {} BFD_RELOC_ARC_24
+@deffnx {} BFD_RELOC_ARC_32
+@deffnx {} BFD_RELOC_ARC_N8
+@deffnx {} BFD_RELOC_ARC_N16
+@deffnx {} BFD_RELOC_ARC_N24
+@deffnx {} BFD_RELOC_ARC_N32
+@deffnx {} BFD_RELOC_ARC_SDA
+@deffnx {} BFD_RELOC_ARC_SECTOFF
+@deffnx {} BFD_RELOC_ARC_S21H_PCREL
+@deffnx {} BFD_RELOC_ARC_S21W_PCREL
+@deffnx {} BFD_RELOC_ARC_S25H_PCREL
+@deffnx {} BFD_RELOC_ARC_S25W_PCREL
+@deffnx {} BFD_RELOC_ARC_SDA32
+@deffnx {} BFD_RELOC_ARC_SDA_LDST
+@deffnx {} BFD_RELOC_ARC_SDA_LDST1
+@deffnx {} BFD_RELOC_ARC_SDA_LDST2
+@deffnx {} BFD_RELOC_ARC_SDA16_LD
+@deffnx {} BFD_RELOC_ARC_SDA16_LD1
+@deffnx {} BFD_RELOC_ARC_SDA16_LD2
+@deffnx {} BFD_RELOC_ARC_S13_PCREL
+@deffnx {} BFD_RELOC_ARC_W
+@deffnx {} BFD_RELOC_ARC_32_ME
+@deffnx {} BFD_RELOC_ARC_32_ME_S
+@deffnx {} BFD_RELOC_ARC_N32_ME
+@deffnx {} BFD_RELOC_ARC_SECTOFF_ME
+@deffnx {} BFD_RELOC_ARC_SDA32_ME
+@deffnx {} BFD_RELOC_ARC_W_ME
+@deffnx {} BFD_RELOC_AC_SECTOFF_U8
+@deffnx {} BFD_RELOC_AC_SECTOFF_U8_1
+@deffnx {} BFD_RELOC_AC_SECTOFF_U8_2
+@deffnx {} BFD_RELOC_AC_SECTOFF_S9
+@deffnx {} BFD_RELOC_AC_SECTOFF_S9_1
+@deffnx {} BFD_RELOC_AC_SECTOFF_S9_2
+@deffnx {} BFD_RELOC_ARC_SECTOFF_ME_1
+@deffnx {} BFD_RELOC_ARC_SECTOFF_ME_2
+@deffnx {} BFD_RELOC_ARC_SECTOFF_1
+@deffnx {} BFD_RELOC_ARC_SECTOFF_2
+@deffnx {} BFD_RELOC_ARC_SDA_12
+@deffnx {} BFD_RELOC_ARC_SDA16_ST2
+@deffnx {} BFD_RELOC_ARC_32_PCREL
+@deffnx {} BFD_RELOC_ARC_PC32
+@deffnx {} BFD_RELOC_ARC_GOT32
+@deffnx {} BFD_RELOC_ARC_GOTPC32
+@deffnx {} BFD_RELOC_ARC_PLT32
+@deffnx {} BFD_RELOC_ARC_COPY
+@deffnx {} BFD_RELOC_ARC_GLOB_DAT
+@deffnx {} BFD_RELOC_ARC_JMP_SLOT
+@deffnx {} BFD_RELOC_ARC_RELATIVE
+@deffnx {} BFD_RELOC_ARC_GOTOFF
+@deffnx {} BFD_RELOC_ARC_GOTPC
+@deffnx {} BFD_RELOC_ARC_S21W_PCREL_PLT
+@deffnx {} BFD_RELOC_ARC_S25H_PCREL_PLT
+@deffnx {} BFD_RELOC_ARC_TLS_DTPMOD
+@deffnx {} BFD_RELOC_ARC_TLS_TPOFF
+@deffnx {} BFD_RELOC_ARC_TLS_GD_GOT
+@deffnx {} BFD_RELOC_ARC_TLS_GD_LD
+@deffnx {} BFD_RELOC_ARC_TLS_GD_CALL
+@deffnx {} BFD_RELOC_ARC_TLS_IE_GOT
+@deffnx {} BFD_RELOC_ARC_TLS_DTPOFF
+@deffnx {} BFD_RELOC_ARC_TLS_DTPOFF_S9
+@deffnx {} BFD_RELOC_ARC_TLS_LE_S9
+@deffnx {} BFD_RELOC_ARC_TLS_LE_32
+@deffnx {} BFD_RELOC_ARC_S25W_PCREL_PLT
+@deffnx {} BFD_RELOC_ARC_S21H_PCREL_PLT
+@deffnx {} BFD_RELOC_ARC_NPS_CMEM16
+ARC relocs.
 @end deffn
 @deffn {} BFD_RELOC_BFIN_16_IMM
 ADI Blackfin 16 bit immediate absolute reloc.
@@ -2467,6 +2541,55 @@ number for the IN and OUT instructions
 This is a 5 bit reloc for the AVR that stores an I/O register
 number for the SBIC, SBIS, SBI and CBI instructions
 @end deffn
+@deffn {} BFD_RELOC_RISCV_HI20
+@deffnx {} BFD_RELOC_RISCV_PCREL_HI20
+@deffnx {} BFD_RELOC_RISCV_PCREL_LO12_I
+@deffnx {} BFD_RELOC_RISCV_PCREL_LO12_S
+@deffnx {} BFD_RELOC_RISCV_LO12_I
+@deffnx {} BFD_RELOC_RISCV_LO12_S
+@deffnx {} BFD_RELOC_RISCV_GPREL12_I
+@deffnx {} BFD_RELOC_RISCV_GPREL12_S
+@deffnx {} BFD_RELOC_RISCV_TPREL_HI20
+@deffnx {} BFD_RELOC_RISCV_TPREL_LO12_I
+@deffnx {} BFD_RELOC_RISCV_TPREL_LO12_S
+@deffnx {} BFD_RELOC_RISCV_TPREL_ADD
+@deffnx {} BFD_RELOC_RISCV_CALL
+@deffnx {} BFD_RELOC_RISCV_CALL_PLT
+@deffnx {} BFD_RELOC_RISCV_ADD8
+@deffnx {} BFD_RELOC_RISCV_ADD16
+@deffnx {} BFD_RELOC_RISCV_ADD32
+@deffnx {} BFD_RELOC_RISCV_ADD64
+@deffnx {} BFD_RELOC_RISCV_SUB8
+@deffnx {} BFD_RELOC_RISCV_SUB16
+@deffnx {} BFD_RELOC_RISCV_SUB32
+@deffnx {} BFD_RELOC_RISCV_SUB64
+@deffnx {} BFD_RELOC_RISCV_GOT_HI20
+@deffnx {} BFD_RELOC_RISCV_TLS_GOT_HI20
+@deffnx {} BFD_RELOC_RISCV_TLS_GD_HI20
+@deffnx {} BFD_RELOC_RISCV_JMP
+@deffnx {} BFD_RELOC_RISCV_TLS_DTPMOD32
+@deffnx {} BFD_RELOC_RISCV_TLS_DTPREL32
+@deffnx {} BFD_RELOC_RISCV_TLS_DTPMOD64
+@deffnx {} BFD_RELOC_RISCV_TLS_DTPREL64
+@deffnx {} BFD_RELOC_RISCV_TLS_TPREL32
+@deffnx {} BFD_RELOC_RISCV_TLS_TPREL64
+@deffnx {} BFD_RELOC_RISCV_ALIGN
+@deffnx {} BFD_RELOC_RISCV_RVC_BRANCH
+@deffnx {} BFD_RELOC_RISCV_RVC_JUMP
+@deffnx {} BFD_RELOC_RISCV_RVC_LUI
+@deffnx {} BFD_RELOC_RISCV_GPREL_I
+@deffnx {} BFD_RELOC_RISCV_GPREL_S
+@deffnx {} BFD_RELOC_RISCV_TPREL_I
+@deffnx {} BFD_RELOC_RISCV_TPREL_S
+@deffnx {} BFD_RELOC_RISCV_RELAX
+@deffnx {} BFD_RELOC_RISCV_CFA
+@deffnx {} BFD_RELOC_RISCV_SUB6
+@deffnx {} BFD_RELOC_RISCV_SET6
+@deffnx {} BFD_RELOC_RISCV_SET8
+@deffnx {} BFD_RELOC_RISCV_SET16
+@deffnx {} BFD_RELOC_RISCV_SET32
+RISC-V relocations.
+@end deffn
 @deffn {} BFD_RELOC_RL78_NEG8
 @deffnx {} BFD_RELOC_RL78_NEG16
 @deffnx {} BFD_RELOC_RL78_NEG24
@@ -3281,6 +3404,41 @@ msp430 specific relocation codes
 @deffnx {} BFD_RELOC_NIOS2_R2_T1X1I6_2
 Relocations used by the Altera Nios II core.
 @end deffn
+@deffn {} BFD_RELOC_PRU_U16
+PRU LDI 16-bit unsigned data-memory relocation.
+@end deffn
+@deffn {} BFD_RELOC_PRU_U16_PMEMIMM
+PRU LDI 16-bit unsigned instruction-memory relocation.
+@end deffn
+@deffn {} BFD_RELOC_PRU_LDI32
+PRU relocation for two consecutive LDI load instructions that load a
+32 bit value into a register. If the higher bits are all zero, then
+the second instruction may be relaxed.
+@end deffn
+@deffn {} BFD_RELOC_PRU_S10_PCREL
+PRU QBBx 10-bit signed PC-relative relocation.
+@end deffn
+@deffn {} BFD_RELOC_PRU_U8_PCREL
+PRU 8-bit unsigned relocation used for the LOOP instruction.
+@end deffn
+@deffn {} BFD_RELOC_PRU_32_PMEM
+@deffnx {} BFD_RELOC_PRU_16_PMEM
+PRU Program Memory relocations.  Used to convert from byte addressing to
+32-bit word addressing.
+@end deffn
+@deffn {} BFD_RELOC_PRU_GNU_DIFF8
+@deffnx {} BFD_RELOC_PRU_GNU_DIFF16
+@deffnx {} BFD_RELOC_PRU_GNU_DIFF32
+@deffnx {} BFD_RELOC_PRU_GNU_DIFF16_PMEM
+@deffnx {} BFD_RELOC_PRU_GNU_DIFF32_PMEM
+PRU relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing.  The field is set to the value of the difference
+assuming no relaxation.  The relocation encodes the position of the
+second symbol so the linker can determine whether to adjust the field
+value. The PMEM variants encode the word difference, instead of byte
+difference between symbols.
+@end deffn
 @deffn {} BFD_RELOC_IQ2000_OFFSET_16
 @deffnx {} BFD_RELOC_IQ2000_OFFSET_21
 @deffnx {} BFD_RELOC_IQ2000_UHI16
@@ -3407,6 +3565,12 @@ Like BFD_RELOC_MACH_O_SECTDIFF but with 
 @deffn {} BFD_RELOC_MACH_O_PAIR
 Pair of relocation.  Contains the first symbol.
 @end deffn
+@deffn {} BFD_RELOC_MACH_O_SUBTRACTOR32
+Symbol will be substracted.  Must be followed by a BFD_RELOC_32.
+@end deffn
+@deffn {} BFD_RELOC_MACH_O_SUBTRACTOR64
+Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
+@end deffn
 @deffn {} BFD_RELOC_MACH_O_X86_64_BRANCH32
 @deffnx {} BFD_RELOC_MACH_O_X86_64_BRANCH8
 PCREL relocations.  They are marked as branch to create PLT entry if
@@ -3419,12 +3583,6 @@ Used when referencing a GOT entry.
 Used when loading a GOT entry with movq.  It is specially marked so that
 the linker could optimize the movq to a leaq if possible.
 @end deffn
-@deffn {} BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32
-Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-@end deffn
-@deffn {} BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64
-Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-@end deffn
 @deffn {} BFD_RELOC_MACH_O_X86_64_PCREL32_1
 Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.
 @end deffn
@@ -3434,6 +3592,18 @@ Same as BFD_RELOC_32_PCREL but with an i
 @deffn {} BFD_RELOC_MACH_O_X86_64_PCREL32_4
 Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
 @end deffn
+@deffn {} BFD_RELOC_MACH_O_ARM64_ADDEND
+Addend for PAGE or PAGEOFF.
+@end deffn
+@deffn {} BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21
+Relative offset to page of GOT slot.
+@end deffn
+@deffn {} BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12
+Relative offset within page of GOT slot.
+@end deffn
+@deffn {} BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT
+Address of a GOT entry.
+@end deffn
 @deffn {} BFD_RELOC_MICROBLAZE_32_LO
 This is a 32 bit reloc for the microblaze that stores the
 low 16 bits of a value
@@ -3524,6 +3694,9 @@ relocation enumerators.  N.B. the order 
 important as several tables in the AArch64 bfd backend are indexed
 by these enumerators; make sure they are all synced.
 @end deffn
+@deffn {} BFD_RELOC_AARCH64_NULL
+Deprecated AArch64 null relocation code.
+@end deffn
 @deffn {} BFD_RELOC_AARCH64_NONE
 AArch64 null relocation code.
 @end deffn
@@ -3666,9 +3839,17 @@ Unsigned 12 bit byte offset for 32 bit l
 the GOT entry for this symbol.  Used in conjunction with
 BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in ILP32 ABI only.
 @end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
+Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
+for this symbol.  Valid in LP64 ABI only.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_GOTOFF_G1
+Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
+for this symbol.  Valid in LP64 ABI only.
+@end deffn
 @deffn {} BFD_RELOC_AARCH64_LD64_GOTOFF_LO15
 Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in ILP64 ABI only.
+the GOT entry for this symbol.  Valid in LP64 ABI only.
 @end deffn
 @deffn {} BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14
 Scaled 14 bit byte offset to the page base of the global offset table.
@@ -3690,11 +3871,11 @@ Unsigned 12 bit byte offset to global of
 tls_index structure.  Used in conjunction with
 BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.
 @end deffn
-@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
-AArch64 TLS INITIAL EXEC relocation.
+@deffn {} BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC
+AArch64 TLS General Dynamic relocation.
 @end deffn
-@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
-AArch64 TLS INITIAL EXEC relocation.
+@deffn {} BFD_RELOC_AARCH64_TLSGD_MOVW_G1
+AArch64 TLS General Dynamic relocation.
 @end deffn
 @deffn {} BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
 AArch64 TLS INITIAL EXEC relocation.
@@ -3708,6 +3889,76 @@ AArch64 TLS INITIAL EXEC relocation.
 @deffn {} BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19
 AArch64 TLS INITIAL EXEC relocation.
 @end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
+bit[23:12] of byte offset to module TLS base address.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
+Unsigned 12 bit byte offset to module TLS base address.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
+No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
+Unsigned 12 bit byte offset to global offset table entry for a symbols
+tls_index structure.  Used in conjunction with
+BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
+GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
+instruction.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
+GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12
+bit[11:1] of byte offset to module TLS base address, encoded in ldst
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
+Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12
+bit[11:2] of byte offset to module TLS base address, encoded in ldst
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
+Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12
+bit[11:3] of byte offset to module TLS base address, encoded in ldst
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
+Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12
+bit[11:0] of byte offset to module TLS base address, encoded in ldst
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
+Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+bit[15:0] of byte offset to module TLS base address.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
+No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+bit[31:16] of byte offset to module TLS base address.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
+No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2
+bit[47:32] of byte offset to module TLS base address.
+@end deffn
 @deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
 AArch64 TLS LOCAL EXEC relocation.
 @end deffn
@@ -3807,6 +4058,14 @@ assembler and not (currently) written to
 AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
 address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
 @end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12
+AArch64 pseudo relocation code for TLS local dynamic mode.  It's to be
+used internally by the AArch64 assembler and not (currently) written to
+any object files.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC
+Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check.
+@end deffn
 @deffn {} BFD_RELOC_AARCH64_LD_GOT_LO12_NC
 AArch64 pseudo relocation code to be used internally by the AArch64
 assembler and not (currently) written to any object files.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/section.texi ./bfd/doc/section.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/section.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/section.texi	2017-03-06 01:51:10.000000000 +0000
@@ -114,10 +114,10 @@ typedef struct bfd_section
   const char *name;
 
   /* A unique sequence number.  */
-  int id;
+  unsigned int id;
 
   /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
-  int index;
+  unsigned int index;
 
   /* The next section in the list belonging to the BFD, or NULL.  */
   struct bfd_section *next;
@@ -320,6 +320,9 @@ typedef struct bfd_section
      when memory read flag isn't set. */
 #define SEC_COFF_NOREAD 0x40000000
 
+  /* Indicate that section has the purecode flag set.  */
+#define SEC_ELF_PURECODE 0x80000000
+
   /*  End of section flags.  */
 
   /* Some internal packed boolean fields.  */
@@ -386,7 +389,7 @@ typedef struct bfd_section
       information.  */
   bfd_vma lma;
 
-  /* The size of the section in octets, as it will be output.
+  /* The size of the section in *octets*, as it will be output.
      Contains a value even if the section has no contents (e.g., the
      size of @code{.bss}).  */
   bfd_size_type size;
@@ -656,9 +659,9 @@ extern asection _bfd_std_section[4];
 #define bfd_section_removed_from_list(ABFD, S) \
   ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
 
-#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)                   \
+#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)                   \
   /* name, id,  index, next, prev, flags, user_set_vma,            */  \
-  @{ NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
+  @{  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,                           \
                                                                        \
   /* linker_mark, linker_has_input, gc_mark, decompress_status,    */  \
      0,           0,                1,       0,                        \
@@ -724,12 +727,14 @@ named @var{name}.  Return NULL if no suc
 @subsubsection @code{bfd_get_next_section_by_name}
 @strong{Synopsis}
 @example
-asection *bfd_get_next_section_by_name (asection *sec);
+asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
 @end example
 @strong{Description}@*
 Given @var{sec} is a section returned by @code{bfd_get_section_by_name},
 return the next most recently created section attached to the same
-BFD with the same name.  Return NULL if no such section exists.
+BFD with the same name, or if no such section exists in the same BFD and
+IBFD is non-NULL, the next section with the same name in any input
+BFD following IBFD.  Return NULL on finding no section.
 
 @findex bfd_get_linker_section
 @subsubsection @code{bfd_get_linker_section}
@@ -873,6 +878,15 @@ bfd_set_error ()) without changing the s
 section named @var{name}.  If there is an error, return @code{NULL} and set
 @code{bfd_error}.
 
+@findex bfd_get_next_section_id
+@subsubsection @code{bfd_get_next_section_id}
+@strong{Synopsis}
+@example
+int bfd_get_next_section_id (void);
+@end example
+@strong{Description}@*
+Returns the id that the next section created will have.
+
 @findex bfd_set_section_flags
 @subsubsection @code{bfd_set_section_flags}
 @strong{Synopsis}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/syms.texi ./bfd/doc/syms.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/syms.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/syms.texi	2017-03-06 01:51:10.000000000 +0000
@@ -178,8 +178,7 @@ typedef struct bfd_symbol
 #define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
 
   /* A normal C symbol would be one of:
-     @code{BSF_LOCAL}, @code{BSF_COMMON},  @code{BSF_UNDEFINED} or
-     @code{BSF_GLOBAL}.  */
+     @code{BSF_LOCAL}, @code{BSF_UNDEFINED} or @code{BSF_GLOBAL}.  */
 
   /* The symbol is a debugging record. The value has an arbitrary
      meaning, unless BSF_DEBUGGING_RELOC is also set.  */
@@ -191,7 +190,9 @@ typedef struct bfd_symbol
 
   /* Used by the linker.  */
 #define BSF_KEEP               (1 << 5)
-#define BSF_KEEP_G             (1 << 6)
+
+  /* An ELF common symbol.  */
+#define BSF_ELF_COMMON         (1 << 6)
 
   /* A weak global symbol, overridable without warnings by
      a regular global symbol of the same name.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/targets.texi ./bfd/doc/targets.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/doc/targets.texi	2015-07-06 01:49:57.000000000 +0000
+++ ./bfd/doc/targets.texi	2017-03-06 01:51:10.000000000 +0000
@@ -114,6 +114,7 @@ macro to define them both!
 @example
 enum bfd_flavour
 @{
+  /* N.B. Update bfd_flavour_name if you change this.  */
   bfd_target_unknown_flavour,
   bfd_target_aout_flavour,
   bfd_target_coff_flavour,
@@ -262,7 +263,7 @@ BFD_JUMP_TABLE macros.
   bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
   /* Called to merge BFD general private data from one object file
      to a common output file when linking.  */
-  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
   /* Called to initialize BFD private section data from one object file
      to another.  */
 #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
@@ -423,6 +424,7 @@ BFD_JUMP_TABLE macros.
   NAME##_bfd_copy_link_hash_symbol_type, \
   NAME##_bfd_final_link, \
   NAME##_bfd_link_split_section, \
+  NAME##_bfd_link_check_relocs, \
   NAME##_bfd_gc_sections, \
   NAME##_bfd_lookup_section_flags, \
   NAME##_bfd_merge_sections, \
@@ -464,6 +466,9 @@ BFD_JUMP_TABLE macros.
   /* Should this section be split up into smaller pieces during linking.  */
   bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
 
+  /* Check the relocations in the bfd for validity.  */
+  bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
+
   /* Remove sections that are not referenced from the output.  */
   bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
@@ -601,18 +606,26 @@ Return a freshly malloced NULL-terminate
 vector of the names of all the valid BFD targets. Do not
 modify the names.
 
-@findex bfd_seach_for_target
-@subsubsection @code{bfd_seach_for_target}
+@findex bfd_iterate_over_targets
+@subsubsection @code{bfd_iterate_over_targets}
+@strong{Synopsis}
+@example
+const bfd_target *bfd_iterate_over_targets
+   (int (*func) (const bfd_target *, void *),
+    void *data);
+@end example
+@strong{Description}@*
+Call @var{func} for each target in the list of BFD target
+vectors, passing @var{data} to @var{func}.  Stop iterating if
+@var{func} returns a non-zero result, and return that target
+vector.  Return NULL if @var{func} always returns zero.
+
+@findex bfd_flavour_name
+@subsubsection @code{bfd_flavour_name}
 @strong{Synopsis}
 @example
-const bfd_target *bfd_search_for_target
-   (int (*search_func) (const bfd_target *, void *),
-    void *);
+const char *bfd_flavour_name (enum bfd_flavour flavour);
 @end example
 @strong{Description}@*
-Return a pointer to the first transfer vector in the list of
-transfer vectors maintained by BFD that produces a non-zero
-result when passed to the function @var{search_func}.  The
-parameter @var{data} is passed, unexamined, to the search
-function.
+Return the string form of @var{flavour}.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/dwarf1.c ./bfd/dwarf1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/dwarf1.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/dwarf1.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/dwarf2.c ./bfd/dwarf2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/dwarf2.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/dwarf2.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* DWARF 2 support.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
    (gavin@cygnus.com).
@@ -100,6 +100,12 @@ struct dwarf2_debug
   /* Pointer to the end of the .debug_info section memory buffer.  */
   bfd_byte *info_ptr_end;
 
+  /* Pointer to the original bfd for which debug was loaded.  This is what
+     we use to compare and so check that the cached debug data is still
+     valid - it saves having to possibly dereference the gnu_debuglink each
+     time.  */
+  bfd *orig_bfd;
+
   /* Pointer to the bfd, section and address of the beginning of the
      section.  The bfd might be different than expected because of
      gnu_debuglink sections.  */
@@ -144,16 +150,16 @@ struct dwarf2_debug
   /* Length of the loaded .debug_str section.  */
   bfd_size_type dwarf_str_size;
 
-  /* Pointer to the .debug_ranges section loaded into memory. */
+  /* Pointer to the .debug_ranges section loaded into memory.  */
   bfd_byte *dwarf_ranges_buffer;
 
-  /* Length of the loaded .debug_ranges section. */
+  /* Length of the loaded .debug_ranges section.  */
   bfd_size_type dwarf_ranges_size;
 
   /* If the most recent call to bfd_find_nearest_line was given an
      address in an inlined function, preserve a pointer into the
      calling chain for subsequent calls to bfd_find_inliner_info to
-     use. */
+     use.  */
   struct funcinfo *inliner_chain;
 
   /* Section VMAs at the time the stash was built.  */
@@ -256,6 +262,12 @@ struct comp_unit
   /* A list of the functions found in this comp. unit.  */
   struct funcinfo *function_table;
 
+  /* A table of function information references searchable by address.  */
+  struct lookup_funcinfo *lookup_funcinfo_table;
+
+  /* Number of functions in the function_table and sorted_function_table.  */
+  bfd_size_type number_of_functions;
+
   /* A list of the variables found in this comp. unit.  */
   struct varinfo *variable_table;
 
@@ -390,7 +402,7 @@ struct info_hash_table
   struct bfd_hash_table base;
 };
 
-/* Function to create a new entry in info hash table. */
+/* Function to create a new entry in info hash table.  */
 
 static struct bfd_hash_entry *
 info_hash_table_newfunc (struct bfd_hash_entry *entry,
@@ -476,7 +488,7 @@ insert_info_hash_table (struct info_hash
 }
 
 /* Look up an info entry list from an info hash table.  Return NULL
-   if there is none. */
+   if there is none.  */
 
 static struct info_list_node *
 lookup_info_hash_table (struct info_hash_table *hash_table, const char *key)
@@ -517,8 +529,8 @@ read_section (bfd *           abfd,
 	}
       if (! msec)
 	{
-	  (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."),
-				 sec->uncompressed_name);
+	  _bfd_error_handler (_("Dwarf Error: Can't find %s section."),
+			      sec->uncompressed_name);
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
@@ -546,9 +558,10 @@ read_section (bfd *           abfd,
      that the client wants.  Validate it here to avoid trouble later.  */
   if (offset != 0 && offset >= *section_size)
     {
-      (*_bfd_error_handler) (_("Dwarf Error: Offset (%lu)"
-			       " greater than or equal to %s size (%lu)."),
-			     (long) offset, section_name, *section_size);
+      /* xgettext: c-format */
+      _bfd_error_handler (_("Dwarf Error: Offset (%lu)"
+			    " greater than or equal to %s size (%lu)."),
+			  (long) offset, section_name, *section_size);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -893,7 +906,8 @@ read_abbrevs (bfd *abfd, bfd_uint64_t of
 
   abbrev_ptr = stash->dwarf_abbrev_buffer + offset;
   abbrev_end = stash->dwarf_abbrev_buffer + stash->dwarf_abbrev_size;
-  abbrev_number = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+  abbrev_number = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+					 FALSE, abbrev_end);
   abbrev_ptr += bytes_read;
 
   /* Loop until we reach an abbrev number of 0.  */
@@ -907,15 +921,18 @@ read_abbrevs (bfd *abfd, bfd_uint64_t of
       /* Read in abbrev header.  */
       cur_abbrev->number = abbrev_number;
       cur_abbrev->tag = (enum dwarf_tag)
-	safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+	_bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+			       FALSE, abbrev_end);
       abbrev_ptr += bytes_read;
       cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr, abbrev_end);
       abbrev_ptr += 1;
 
       /* Now read in declarations.  */
-      abbrev_name = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+      abbrev_name = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+					   FALSE, abbrev_end);
       abbrev_ptr += bytes_read;
-      abbrev_form = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+      abbrev_form = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+					   FALSE, abbrev_end);
       abbrev_ptr += bytes_read;
 
       while (abbrev_name)
@@ -950,9 +967,11 @@ read_abbrevs (bfd *abfd, bfd_uint64_t of
 	    = (enum dwarf_attribute) abbrev_name;
 	  cur_abbrev->attrs[cur_abbrev->num_attrs++].form
 	    = (enum dwarf_form) abbrev_form;
-	  abbrev_name = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+	  abbrev_name = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+					       FALSE, abbrev_end);
 	  abbrev_ptr += bytes_read;
-	  abbrev_form = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+	  abbrev_form = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+					       FALSE, abbrev_end);
 	  abbrev_ptr += bytes_read;
 	}
 
@@ -970,7 +989,8 @@ read_abbrevs (bfd *abfd, bfd_uint64_t of
       if ((unsigned int) (abbrev_ptr - stash->dwarf_abbrev_buffer)
 	  >= stash->dwarf_abbrev_size)
 	break;
-      abbrev_number = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+      abbrev_number = _bfd_safe_read_leb128 (abfd, abbrev_ptr,
+					     &bytes_read, FALSE, abbrev_end);
       abbrev_ptr += bytes_read;
       if (lookup_abbrev (abbrev_number, abbrevs) != NULL)
 	break;
@@ -1003,9 +1023,9 @@ read_attribute_value (struct attribute *
   struct dwarf_block *blk;
   bfd_size_type amt;
 
-  if (info_ptr >= info_ptr_end)
+  if (info_ptr >= info_ptr_end && form != DW_FORM_flag_present)
     {
-      (*_bfd_error_handler) (_("Dwarf Error: Info pointer extends beyond end of attributes"));
+      _bfd_error_handler (_("Dwarf Error: Info pointer extends beyond end of attributes"));
       bfd_set_error (bfd_error_bad_value);
       return info_ptr;
     }
@@ -1091,7 +1111,8 @@ read_attribute_value (struct attribute *
       blk = (struct dwarf_block *) bfd_alloc (abfd, amt);
       if (blk == NULL)
 	return NULL;
-      blk->size = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+      blk->size = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					 FALSE, info_ptr_end);
       info_ptr += bytes_read;
       blk->data = read_n_bytes (abfd, info_ptr, info_ptr_end, blk->size);
       info_ptr += blk->size;
@@ -1120,11 +1141,13 @@ read_attribute_value (struct attribute *
       attr->u.val = 1;
       break;
     case DW_FORM_sdata:
-      attr->u.sval = safe_read_leb128 (abfd, info_ptr, &bytes_read, TRUE, info_ptr_end);
+      attr->u.sval = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					    TRUE, info_ptr_end);
       info_ptr += bytes_read;
       break;
     case DW_FORM_udata:
-      attr->u.val = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+      attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					   FALSE, info_ptr_end);
       info_ptr += bytes_read;
       break;
     case DW_FORM_ref1:
@@ -1148,17 +1171,19 @@ read_attribute_value (struct attribute *
       info_ptr += 8;
       break;
     case DW_FORM_ref_udata:
-      attr->u.val = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+      attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					   FALSE, info_ptr_end);
       info_ptr += bytes_read;
       break;
     case DW_FORM_indirect:
-      form = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+      form = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+				    FALSE, info_ptr_end);
       info_ptr += bytes_read;
       info_ptr = read_attribute_value (attr, form, unit, info_ptr, info_ptr_end);
       break;
     default:
-      (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %#x."),
-			     form);
+      _bfd_error_handler (_("Dwarf Error: Invalid or unhandled FORM value: %#x."),
+			  form);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -1213,22 +1238,22 @@ non_mangled (int lang)
 
 struct line_info
 {
-  struct line_info* prev_line;
-  bfd_vma address;
-  char *filename;
-  unsigned int line;
-  unsigned int column;
-  unsigned int discriminator;
-  unsigned char op_index;
-  unsigned char end_sequence;		/* End of (sequential) code sequence.  */
+  struct line_info *	prev_line;
+  bfd_vma		address;
+  char *		filename;
+  unsigned int		line;
+  unsigned int		column;
+  unsigned int		discriminator;
+  unsigned char		op_index;
+  unsigned char		end_sequence;		/* End of (sequential) code sequence.  */
 };
 
 struct fileinfo
 {
-  char *name;
-  unsigned int dir;
-  unsigned int time;
-  unsigned int size;
+  char *		name;
+  unsigned int		dir;
+  unsigned int		time;
+  unsigned int		size;
 };
 
 struct line_sequence
@@ -1236,11 +1261,13 @@ struct line_sequence
   bfd_vma               low_pc;
   struct line_sequence* prev_sequence;
   struct line_info*     last_line;  /* Largest VMA.  */
+  struct line_info**    line_info_lookup;
+  bfd_size_type		num_lines;
 };
 
 struct line_info_table
 {
-  bfd*                  abfd;
+  bfd *                 abfd;
   unsigned int          num_files;
   unsigned int          num_dirs;
   unsigned int          num_sequences;
@@ -1259,23 +1286,37 @@ struct line_info_table
 struct funcinfo
 {
   /* Pointer to previous function in list of all functions.  */
-  struct funcinfo *prev_func;
+  struct funcinfo *	prev_func;
   /* Pointer to function one scope higher.  */
-  struct funcinfo *caller_func;
+  struct funcinfo *	caller_func;
   /* Source location file name where caller_func inlines this func.  */
-  char *caller_file;
+  char *		caller_file;
   /* Source location file name.  */
-  char *file;
+  char *		file;
   /* Source location line number where caller_func inlines this func.  */
-  int caller_line;
+  int			caller_line;
   /* Source location line number.  */
-  int line;
-  int tag;
-  bfd_boolean is_linkage;
-  const char *name;
-  struct arange arange;
+  int			line;
+  int			tag;
+  bfd_boolean		is_linkage;
+  const char *		name;
+  struct arange		arange;
   /* Where the symbol is defined.  */
-  asection *sec;
+  asection *		sec;
+};
+
+struct lookup_funcinfo
+{
+  /* Function information corresponding to this lookup table entry.  */
+  struct funcinfo *	funcinfo;
+
+  /* The lowest address for this specific function.  */
+  bfd_vma 		low_addr;
+
+  /* The highest address of this function before the lookup table is sorted.
+     The highest address of all prior functions after the lookup table is
+     sorted, which is used for binary search.  */
+  bfd_vma 		high_addr;
 };
 
 struct varinfo
@@ -1446,7 +1487,7 @@ concat_filename (struct line_info_table 
     {
       /* FILE == 0 means unknown.  */
       if (file)
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("Dwarf Error: mangled line number section (bad file number)."));
       return strdup ("<unknown>");
     }
@@ -1538,7 +1579,7 @@ arange_add (const struct comp_unit *unit
   while (arange);
 
   /* Need to allocate a new arange and insert it into the arange list.
-     Order isn't significant, so just insert after the first arange. */
+     Order isn't significant, so just insert after the first arange.  */
   arange = (struct arange *) bfd_alloc (unit->abfd, sizeof (*arange));
   if (arange == NULL)
     return FALSE;
@@ -1578,17 +1619,62 @@ compare_sequences (const void* a, const 
   return 0;
 }
 
+/* Construct the line information table for quick lookup.  */
+
+static bfd_boolean
+build_line_info_table (struct line_info_table *  table,
+		       struct line_sequence *    seq)
+{
+  bfd_size_type      amt;
+  struct line_info** line_info_lookup;
+  struct line_info*  each_line;
+  unsigned int       num_lines;
+  unsigned int       line_index;
+
+  if (seq->line_info_lookup != NULL)
+    return TRUE;
+
+  /* Count the number of line information entries.  We could do this while
+     scanning the debug information, but some entries may be added via
+     lcl_head without having a sequence handy to increment the number of
+     lines.  */
+  num_lines = 0;
+  for (each_line = seq->last_line; each_line; each_line = each_line->prev_line)
+    num_lines++;
+
+  if (num_lines == 0)
+    return TRUE;
+
+  /* Allocate space for the line information lookup table.  */
+  amt = sizeof (struct line_info*) * num_lines;
+  line_info_lookup = (struct line_info**) bfd_alloc (table->abfd, amt);
+  if (line_info_lookup == NULL)
+    return FALSE;
+
+  /* Create the line information lookup table.  */
+  line_index = num_lines;
+  for (each_line = seq->last_line; each_line; each_line = each_line->prev_line)
+    line_info_lookup[--line_index] = each_line;
+
+  BFD_ASSERT (line_index == 0);
+
+  seq->num_lines = num_lines;
+  seq->line_info_lookup = line_info_lookup;
+
+  return TRUE;
+}
+
 /* Sort the line sequences for quick lookup.  */
 
 static bfd_boolean
 sort_line_sequences (struct line_info_table* table)
 {
-  bfd_size_type amt;
-  struct line_sequence* sequences;
-  struct line_sequence* seq;
-  unsigned int n = 0;
-  unsigned int num_sequences = table->num_sequences;
-  bfd_vma last_high_pc;
+  bfd_size_type          amt;
+  struct line_sequence*  sequences;
+  struct line_sequence*  seq;
+  unsigned int           n = 0;
+  unsigned int           num_sequences = table->num_sequences;
+  bfd_vma                last_high_pc;
 
   if (num_sequences == 0)
     return TRUE;
@@ -1609,6 +1695,8 @@ sort_line_sequences (struct line_info_ta
       sequences[n].low_pc = seq->low_pc;
       sequences[n].prev_sequence = NULL;
       sequences[n].last_line = seq->last_line;
+      sequences[n].line_info_lookup = NULL;
+      sequences[n].num_lines = 0;
       seq = seq->prev_sequence;
       free (last_seq);
     }
@@ -1687,7 +1775,7 @@ decode_line_info (struct comp_unit *unit
 
   if (stash->dwarf_line_size < 16)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("Dwarf Error: Line info section is too small (%ld)"),
 	 (long) stash->dwarf_line_size);
       bfd_set_error (bfd_error_bad_value);
@@ -1716,7 +1804,8 @@ decode_line_info (struct comp_unit *unit
 
   if (lh.total_length > stash->dwarf_line_size)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("Dwarf Error: Line info data is bigger (0x%lx) than the section (0x%lx)"),
 	 (long) lh.total_length, (long) stash->dwarf_line_size);
       bfd_set_error (bfd_error_bad_value);
@@ -1728,7 +1817,7 @@ decode_line_info (struct comp_unit *unit
   lh.version = read_2_bytes (abfd, line_ptr, line_end);
   if (lh.version < 2 || lh.version > 4)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("Dwarf Error: Unhandled .debug_line version %d."), lh.version);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1737,7 +1826,7 @@ decode_line_info (struct comp_unit *unit
 
   if (line_ptr + offset_size + (lh.version >=4 ? 6 : 5) >= line_end)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("Dwarf Error: Ran out of room reading prologue"));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1762,7 +1851,7 @@ decode_line_info (struct comp_unit *unit
 
   if (lh.maximum_ops_per_insn == 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("Dwarf Error: Invalid maximum operations per instruction."));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1782,7 +1871,7 @@ decode_line_info (struct comp_unit *unit
 
   if (line_ptr + (lh.opcode_base - 1) >= line_end)
     {
-      (*_bfd_error_handler) (_("Dwarf Error: Ran out of room reading opcodes"));
+      _bfd_error_handler (_("Dwarf Error: Ran out of room reading opcodes"));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -1841,11 +1930,13 @@ decode_line_info (struct comp_unit *unit
 
       table->files[table->num_files].name = cur_file;
       table->files[table->num_files].dir =
-	safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+	_bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
       line_ptr += bytes_read;
-      table->files[table->num_files].time = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+      table->files[table->num_files].time
+	= _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
       line_ptr += bytes_read;
-      table->files[table->num_files].size = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+      table->files[table->num_files].size
+	= _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
       line_ptr += bytes_read;
       table->num_files++;
     }
@@ -1909,7 +2000,8 @@ decode_line_info (struct comp_unit *unit
 	  else switch (op_code)
 	    {
 	    case DW_LNS_extended_op:
-	      exop_len = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+	      exop_len = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+						FALSE, line_end);
 	      line_ptr += bytes_read;
 	      extended_op = read_1_byte (abfd, line_ptr, line_end);
 	      line_ptr += 1;
@@ -1950,26 +2042,30 @@ decode_line_info (struct comp_unit *unit
 		    }
 		  table->files[table->num_files].name = cur_file;
 		  table->files[table->num_files].dir =
-		    safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		    _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					   FALSE, line_end);
 		  line_ptr += bytes_read;
 		  table->files[table->num_files].time =
-		    safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		    _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					   FALSE, line_end);
 		  line_ptr += bytes_read;
 		  table->files[table->num_files].size =
-		    safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		    _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					   FALSE, line_end);
 		  line_ptr += bytes_read;
 		  table->num_files++;
 		  break;
 		case DW_LNE_set_discriminator:
 		  discriminator =
-		    safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		    _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					   FALSE, line_end);
 		  line_ptr += bytes_read;
 		  break;
 		case DW_LNE_HP_source_file_correlation:
 		  line_ptr += exop_len - 1;
 		  break;
 		default:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("Dwarf Error: mangled line number section."));
 		  bfd_set_error (bfd_error_bad_value);
 		line_fail:
@@ -1991,12 +2087,14 @@ decode_line_info (struct comp_unit *unit
 	    case DW_LNS_advance_pc:
 	      if (lh.maximum_ops_per_insn == 1)
 		address += (lh.minimum_instruction_length
-			    * safe_read_leb128 (abfd, line_ptr, &bytes_read,
-						FALSE, line_end));
+			    * _bfd_safe_read_leb128 (abfd, line_ptr,
+						     &bytes_read,
+						     FALSE, line_end));
 	      else
 		{
-		  bfd_vma adjust = safe_read_leb128 (abfd, line_ptr, &bytes_read,
-						     FALSE, line_end);
+		  bfd_vma adjust = _bfd_safe_read_leb128 (abfd, line_ptr,
+							  &bytes_read,
+							  FALSE, line_end);
 		  address = ((op_index + adjust) / lh.maximum_ops_per_insn
 			     * lh.minimum_instruction_length);
 		  op_index = (op_index + adjust) % lh.maximum_ops_per_insn;
@@ -2004,7 +2102,8 @@ decode_line_info (struct comp_unit *unit
 	      line_ptr += bytes_read;
 	      break;
 	    case DW_LNS_advance_line:
-	      line += safe_read_leb128 (abfd, line_ptr, &bytes_read, TRUE, line_end);
+	      line += _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					     TRUE, line_end);
 	      line_ptr += bytes_read;
 	      break;
 	    case DW_LNS_set_file:
@@ -2013,7 +2112,8 @@ decode_line_info (struct comp_unit *unit
 
 		/* The file and directory tables are 0
 		   based, the references are 1 based.  */
-		file = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		file = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					      FALSE, line_end);
 		line_ptr += bytes_read;
 		if (filename)
 		  free (filename);
@@ -2021,7 +2121,8 @@ decode_line_info (struct comp_unit *unit
 		break;
 	      }
 	    case DW_LNS_set_column:
-	      column = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+	      column = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+					      FALSE, line_end);
 	      line_ptr += bytes_read;
 	      break;
 	    case DW_LNS_negate_stmt:
@@ -2051,7 +2152,8 @@ decode_line_info (struct comp_unit *unit
 	      /* Unknown standard opcode, ignore it.  */
 	      for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++)
 		{
-		  (void) safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end);
+		  (void) _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
+						FALSE, line_end);
 		  line_ptr += bytes_read;
 		}
 	      break;
@@ -2089,7 +2191,7 @@ lookup_address_in_line_info_table (struc
 				   unsigned int *discriminator_ptr)
 {
   struct line_sequence *seq = NULL;
-  struct line_info *each_line;
+  struct line_info *info;
   int low, high, mid;
 
   /* Binary search the array of sequences.  */
@@ -2107,26 +2209,43 @@ lookup_address_in_line_info_table (struc
 	break;
     }
 
-  if (seq && addr >= seq->low_pc && addr < seq->last_line->address)
+  /* Check for a valid sequence.  */
+  if (!seq || addr < seq->low_pc || addr >= seq->last_line->address)
+    goto fail;
+
+  if (!build_line_info_table (table, seq))
+    goto fail;
+
+  /* Binary search the array of line information.  */
+  low = 0;
+  high = seq->num_lines;
+  info = NULL;
+  while (low < high)
     {
-      /* Note: seq->last_line should be a descendingly sorted list.  */
-      for (each_line = seq->last_line;
-	   each_line;
-	   each_line = each_line->prev_line)
-	if (addr >= each_line->address)
-	  break;
+      mid = (low + high) / 2;
+      info = seq->line_info_lookup[mid];
+      if (addr < info->address)
+	high = mid;
+      else if (addr >= seq->line_info_lookup[mid + 1]->address)
+	low = mid + 1;
+      else
+	break;
+    }
 
-      if (each_line
-	  && !(each_line->end_sequence || each_line == seq->last_line))
-	{
-	  *filename_ptr = each_line->filename;
-	  *linenumber_ptr = each_line->line;
-	  if (discriminator_ptr)
-	    *discriminator_ptr = each_line->discriminator;
-	  return seq->last_line->address - seq->low_pc;
-	}
+  /* Check for a valid line information entry.  */
+  if (info
+      && addr >= info->address
+      && addr < seq->line_info_lookup[mid + 1]->address
+      && !(info->end_sequence || info == seq->last_line))
+    {
+      *filename_ptr = info->filename;
+      *linenumber_ptr = info->line;
+      if (discriminator_ptr)
+	*discriminator_ptr = info->discriminator;
+      return seq->last_line->address - seq->low_pc;
     }
 
+fail:
   *filename_ptr = NULL;
   return 0;
 }
@@ -2134,16 +2253,102 @@ lookup_address_in_line_info_table (struc
 /* Read in the .debug_ranges section for future reference.  */
 
 static bfd_boolean
-read_debug_ranges (struct comp_unit *unit)
+read_debug_ranges (struct comp_unit * unit)
 {
-  struct dwarf2_debug *stash = unit->stash;
+  struct dwarf2_debug * stash = unit->stash;
+
   return read_section (unit->abfd, &stash->debug_sections[debug_ranges],
 		       stash->syms, 0,
-		       &stash->dwarf_ranges_buffer, &stash->dwarf_ranges_size);
+		       &stash->dwarf_ranges_buffer,
+		       &stash->dwarf_ranges_size);
 }
 
 /* Function table functions.  */
 
+static int
+compare_lookup_funcinfos (const void * a, const void * b)
+{
+  const struct lookup_funcinfo * lookup1 = a;
+  const struct lookup_funcinfo * lookup2 = b;
+
+  if (lookup1->low_addr < lookup2->low_addr)
+    return -1;
+  if (lookup1->low_addr > lookup2->low_addr)
+    return 1;
+  if (lookup1->high_addr < lookup2->high_addr)
+    return -1;
+  if (lookup1->high_addr > lookup2->high_addr)
+    return 1;
+
+  return 0;
+}
+
+static bfd_boolean
+build_lookup_funcinfo_table (struct comp_unit * unit)
+{
+  struct lookup_funcinfo *lookup_funcinfo_table = unit->lookup_funcinfo_table;
+  unsigned int number_of_functions = unit->number_of_functions;
+  struct funcinfo *each;
+  struct lookup_funcinfo *entry;
+  size_t func_index;
+  struct arange *range;
+  bfd_vma low_addr, high_addr;
+
+  if (lookup_funcinfo_table || number_of_functions == 0)
+    return TRUE;
+
+  /* Create the function info lookup table.  */
+  lookup_funcinfo_table = (struct lookup_funcinfo *)
+    bfd_malloc (number_of_functions * sizeof (struct lookup_funcinfo));
+  if (lookup_funcinfo_table == NULL)
+    return FALSE;
+
+  /* Populate the function info lookup table.  */
+  func_index = number_of_functions;
+  for (each = unit->function_table; each; each = each->prev_func)
+    {
+      entry = &lookup_funcinfo_table[--func_index];
+      entry->funcinfo = each;
+
+      /* Calculate the lowest and highest address for this function entry.  */
+      low_addr  = entry->funcinfo->arange.low;
+      high_addr = entry->funcinfo->arange.high;
+
+      for (range = entry->funcinfo->arange.next; range; range = range->next)
+	{
+	  if (range->low < low_addr)
+	    low_addr = range->low;
+	  if (range->high > high_addr)
+	    high_addr = range->high;
+	}
+
+      entry->low_addr = low_addr;
+      entry->high_addr = high_addr;
+    }
+
+  BFD_ASSERT (func_index == 0);
+
+  /* Sort the function by address.  */
+  qsort (lookup_funcinfo_table,
+	 number_of_functions,
+	 sizeof (struct lookup_funcinfo),
+	 compare_lookup_funcinfos);
+
+  /* Calculate the high watermark for each function in the lookup table.  */
+  high_addr = lookup_funcinfo_table[0].high_addr;
+  for (func_index = 1; func_index < number_of_functions; func_index++)
+    {
+      entry = &lookup_funcinfo_table[func_index];
+      if (entry->high_addr > high_addr)
+	high_addr = entry->high_addr;
+      else
+	entry->high_addr = high_addr;
+    }
+
+  unit->lookup_funcinfo_table = lookup_funcinfo_table;
+  return TRUE;
+}
+
 /* If ADDR is within UNIT's function tables, set FUNCTION_PTR, and return
    TRUE.  Note that we need to find the function that has the smallest range
    that contains ADDR, to handle inlined functions without depending upon
@@ -2154,37 +2359,77 @@ lookup_address_in_function_table (struct
 				  bfd_vma addr,
 				  struct funcinfo **function_ptr)
 {
-  struct funcinfo* each_func;
+  unsigned int number_of_functions = unit->number_of_functions;
+  struct lookup_funcinfo* lookup_funcinfo = NULL;
+  struct funcinfo* funcinfo = NULL;
   struct funcinfo* best_fit = NULL;
   bfd_vma best_fit_len = 0;
+  bfd_size_type low, high, mid, first;
   struct arange *arange;
 
-  for (each_func = unit->function_table;
-       each_func;
-       each_func = each_func->prev_func)
+  if (number_of_functions == 0)
+    return FALSE;
+
+  if (!build_lookup_funcinfo_table (unit))
+    return FALSE;
+
+  if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr)
+    return FALSE;
+  
+  /* Find the first function in the lookup table which may contain the
+     specified address.  */
+  low = 0;
+  high = number_of_functions;
+  first = high;
+  while (low < high)
     {
-      for (arange = &each_func->arange;
-	   arange;
-	   arange = arange->next)
+      mid = (low + high) / 2;
+      lookup_funcinfo = &unit->lookup_funcinfo_table[mid];
+      if (addr < lookup_funcinfo->low_addr)
+	high = mid;
+      else if (addr >= lookup_funcinfo->high_addr)
+	low = mid + 1;
+      else
+	high = first = mid;
+    }
+
+  /* Find the 'best' match for the address.  The prior algorithm defined the
+     best match as the function with the smallest address range containing
+     the specified address.  This definition should probably be changed to the
+     innermost inline routine containing the address, but right now we want
+     to get the same results we did before.  */
+  while (first < number_of_functions)
+    {
+      if (addr < unit->lookup_funcinfo_table[first].low_addr)
+	break;
+      funcinfo = unit->lookup_funcinfo_table[first].funcinfo;
+
+      for (arange = &funcinfo->arange; arange; arange = arange->next)
 	{
-	  if (addr >= arange->low && addr < arange->high)
+	  if (addr < arange->low || addr >= arange->high)
+	    continue;
+
+	  if (!best_fit
+	      || arange->high - arange->low < best_fit_len
+	      /* The following comparison is designed to return the same
+		 match as the previous algorithm for routines which have the
+		 same best fit length.  */
+	      || (arange->high - arange->low == best_fit_len
+		  && funcinfo > best_fit))
 	    {
-	      if (!best_fit
-		  || arange->high - arange->low < best_fit_len)
-		{
-		  best_fit = each_func;
-		  best_fit_len = arange->high - arange->low;
-		}
+	      best_fit = funcinfo;
+	      best_fit_len = arange->high - arange->low;
 	    }
 	}
-    }
 
-  if (best_fit)
-    {
-      *function_ptr = best_fit;
-      return TRUE;
+      first++;
     }
-  return FALSE;
+
+  if (!best_fit)
+    return FALSE;
+
+  *function_ptr = best_fit;
+  return TRUE;
 }
 
 /* If SYM at ADDR is within function table of UNIT, set FILENAME_PTR
@@ -2269,8 +2514,8 @@ lookup_symbol_in_variable_table (struct 
       *linenumber_ptr = each->line;
       return TRUE;
     }
-  else
-    return FALSE;
+
+  return FALSE;
 }
 
 static char *
@@ -2326,7 +2571,7 @@ find_abstract_instance_name (struct comp
       info_ptr = read_alt_indirect_ref (unit, die_ref);
       if (info_ptr == NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Dwarf Error: Unable to read alt ref %u."), die_ref);
 	  bfd_set_error (bfd_error_bad_value);
 	  return NULL;
@@ -2342,7 +2587,8 @@ find_abstract_instance_name (struct comp
       info_ptr_end = unit->end_ptr;
     }
 
-  abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+  abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					 FALSE, info_ptr_end);
   info_ptr += bytes_read;
 
   if (abbrev_number)
@@ -2350,7 +2596,7 @@ find_abstract_instance_name (struct comp
       abbrev = lookup_abbrev (abbrev_number, unit->abbrevs);
       if (! abbrev)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Dwarf Error: Could not find abbrev number %u."), abbrev_number);
 	  bfd_set_error (bfd_error_bad_value);
 	}
@@ -2482,7 +2728,8 @@ scan_unit_for_symbols (struct comp_unit 
       if (info_ptr >= info_ptr_end)
 	goto fail;
 
-      abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end);
+      abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					     FALSE, info_ptr_end);
       info_ptr += bytes_read;
 
       if (! abbrev_number)
@@ -2494,7 +2741,7 @@ scan_unit_for_symbols (struct comp_unit 
       abbrev = lookup_abbrev (abbrev_number,unit->abbrevs);
       if (! abbrev)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Dwarf Error: Could not find abbrev number %u."),
 	     abbrev_number);
 	  bfd_set_error (bfd_error_bad_value);
@@ -2513,6 +2760,7 @@ scan_unit_for_symbols (struct comp_unit 
 	  func->tag = abbrev->tag;
 	  func->prev_func = unit->function_table;
 	  unit->function_table = func;
+      unit->number_of_functions++;
 	  BFD_ASSERT (!unit->cached);
 
 	  if (func->tag == DW_TAG_inlined_subroutine)
@@ -2757,55 +3005,65 @@ parse_comp_unit (struct dwarf2_debug *st
 
   if (version != 2 && version != 3 && version != 4)
     {
-      (*_bfd_error_handler)
-	(_("Dwarf Error: found dwarf version '%u', this reader"
-	   " only handles version 2, 3 and 4 information."), version);
-      bfd_set_error (bfd_error_bad_value);
-      return 0;
+      /* PR 19872: A version number of 0 probably means that there is padding
+	 at the end of the .debug_info section.  Gold puts it there when
+	 performing an incremental link, for example.  So do not generate
+	 an error, just return a NULL.  */
+      if (version)
+	{
+	  _bfd_error_handler
+	    (_("Dwarf Error: found dwarf version '%u', this reader"
+	       " only handles version 2, 3 and 4 information."), version);
+	  bfd_set_error (bfd_error_bad_value);
+	}
+      return NULL;
     }
 
   if (addr_size > sizeof (bfd_vma))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext: c-format */
 	(_("Dwarf Error: found address size '%u', this reader"
 	   " can not handle sizes greater than '%u'."),
 	 addr_size,
 	 (unsigned int) sizeof (bfd_vma));
       bfd_set_error (bfd_error_bad_value);
-      return 0;
+      return NULL;
     }
 
   if (addr_size != 2 && addr_size != 4 && addr_size != 8)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	("Dwarf Error: found address size '%u', this reader"
 	 " can only handle address sizes '2', '4' and '8'.", addr_size);
       bfd_set_error (bfd_error_bad_value);
-      return 0;
+      return NULL;
     }
 
   /* Read the abbrevs for this compilation unit into a table.  */
   abbrevs = read_abbrevs (abfd, abbrev_offset, stash);
   if (! abbrevs)
-    return 0;
+    return NULL;
 
-  abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, end_ptr);
+  abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+					 FALSE, end_ptr);
   info_ptr += bytes_read;
   if (! abbrev_number)
     {
-      (*_bfd_error_handler) (_("Dwarf Error: Bad abbrev number: %u."),
-			     abbrev_number);
-      bfd_set_error (bfd_error_bad_value);
-      return 0;
+      /* PR 19872: An abbrev number of 0 probably means that there is padding
+	 at the end of the .debug_abbrev section.  Gold puts it there when
+	 performing an incremental link, for example.  So do not generate
+	 an error, just return a NULL.  */
+      return NULL;
     }
 
   abbrev = lookup_abbrev (abbrev_number, abbrevs);
   if (! abbrev)
     {
-      (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."),
-			     abbrev_number);
+      _bfd_error_handler (_("Dwarf Error: Could not find abbrev number %u."),
+			  abbrev_number);
       bfd_set_error (bfd_error_bad_value);
-      return 0;
+      return NULL;
     }
 
   amt = sizeof (struct comp_unit);
@@ -2845,7 +3103,7 @@ parse_comp_unit (struct dwarf2_debug *st
 	  low_pc = attr.u.val;
 	  /* If the compilation unit DIE has a DW_AT_low_pc attribute,
 	     this is the base address to use when reading location
-	     lists or range lists. */
+	     lists or range lists.  */
 	  if (abbrev->tag == DW_TAG_compile_unit)
 	    unit->base_address = low_pc;
 	  break;
@@ -2867,7 +3125,7 @@ parse_comp_unit (struct dwarf2_debug *st
 	    /* PR 17512: file: 1fe726be.  */
 	    if (! is_str_attr (attr.form))
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
 		  (_("Dwarf Error: DW_AT_comp_dir attribute encountered with a non-string form."));
 		comp_dir = NULL;
 	      }
@@ -3116,7 +3374,7 @@ comp_unit_hash_info (struct dwarf2_debug
        each_func && okay;
        each_func = each_func->prev_func)
     {
-      /* Skip nameless functions. */
+      /* Skip nameless functions.  */
       if (each_func->name)
 	/* There is no need to copy name string into hash table as
 	   name string is either in the dwarf string buffer or
@@ -3354,8 +3612,8 @@ place_sections (bfd *orig_bfd, struct dw
 		  /* Align the new address to the current section
 		     alignment.  */
 		  last_vma = ((last_vma
-			       + ~((bfd_vma) -1 << sect->alignment_power))
-			      & ((bfd_vma) -1 << sect->alignment_power));
+			       + ~(-((bfd_vma) 1 << sect->alignment_power)))
+			      & (-((bfd_vma) 1 << sect->alignment_power)));
 		  sect->vma = last_vma;
 		  last_vma += sz;
 		}
@@ -3498,7 +3756,7 @@ stash_maybe_update_info_hash_tables (str
   return TRUE;
 }
 
-/* Check consistency of info hash tables.  This is for debugging only. */
+/* Check consistency of info hash tables.  This is for debugging only.  */
 
 static void ATTRIBUTE_UNUSED
 stash_verify_info_hash_table (struct dwarf2_debug *stash)
@@ -3673,8 +3931,20 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
 
   if (stash != NULL)
     {
-      if (section_vma_same (abfd, stash))
-	return TRUE;
+      if (stash->orig_bfd == abfd
+          && section_vma_same (abfd, stash))
+        {
+          /* Check that we did previously find some debug information
+             before attempting to make use of it.  */
+          if (stash->bfd_ptr != NULL)
+            {
+              if (do_place && !place_sections (abfd, stash))
+                return FALSE;
+              return TRUE;
+            }
+
+          return FALSE;
+        }
       _bfd_dwarf2_cleanup_debug_info (abfd, pinfo);
       memset (stash, 0, amt);
     }
@@ -3684,6 +3954,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
       if (! stash)
 	return FALSE;
     }
+  stash->orig_bfd = abfd;
   stash->debug_sections = debug_sections;
   stash->syms = symbols;
   if (!save_section_vma (abfd, stash))
@@ -3697,7 +3968,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
   msec = find_debug_info (debug_bfd, debug_sections, NULL);
   if (msec == NULL && abfd == debug_bfd)
     {
-      char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
+      char * debug_filename;
+
+      debug_filename = bfd_follow_build_id_debuglink (abfd, DEBUGDIR);
+      if (debug_filename == NULL)
+	debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
 
       if (debug_filename == NULL)
 	/* No dwarf2 info, and no gnu_debuglink to follow.
@@ -3706,8 +3981,10 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
 	   fail more quickly.  */
 	return FALSE;
 
+      /* Set BFD_DECOMPRESS to decompress debug sections.  */
       if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
-	  || ! bfd_check_format (debug_bfd, bfd_object)
+	  || !(debug_bfd->flags |= BFD_DECOMPRESS,
+	       bfd_check_format (debug_bfd, bfd_object))
 	  || (msec = find_debug_info (debug_bfd,
 				      debug_sections, NULL)) == NULL
 	  || !bfd_generic_link_read_symbols (debug_bfd))
@@ -3906,6 +4183,38 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd
     {
       BFD_ASSERT (section != NULL && functionname_ptr != NULL);
       addr = offset;
+
+      /* If we have no SYMBOL but the section we're looking at is not a
+         code section, then take a look through the list of symbols to see
+         if we have a symbol at the address we're looking for.  If we do
+         then use this to look up line information.  This will allow us to
+         give file and line results for data symbols.  We exclude code
+         symbols here, if we look up a function symbol and then look up the
+         line information we'll actually return the line number for the
+         opening '{' rather than the function definition line.  This is
+         because looking up by symbol uses the line table, in which the
+         first line for a function is usually the opening '{', while
+         looking up the function by section + offset uses the
+         DW_AT_decl_line from the function DW_TAG_subprogram for the line,
+         which will be the line of the function name.  */
+      if ((section->flags & SEC_CODE) == 0)
+	{
+	  asymbol **tmp;
+
+	  for (tmp = symbols; (*tmp) != NULL; ++tmp)
+	    if ((*tmp)->the_bfd == abfd
+		&& (*tmp)->section == section
+		&& (*tmp)->value == offset
+		&& ((*tmp)->flags & BSF_SECTION_SYM) == 0)
+	      {
+		symbol = *tmp;
+		do_line = TRUE;
+                /* For local symbols, keep going in the hope we find a
+                   global.  */
+                if ((symbol->flags & BSF_GLOBAL) != 0)
+                  break;
+	      }
+	}
     }
 
   if (section->output_section)
@@ -3930,7 +4239,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd
 	stash_maybe_enable_info_hash_tables (abfd, stash);
 
       /* Keep info hash table up to date if they are available.  Note that we
-	 may disable the hash tables if there is any error duing update. */
+	 may disable the hash tables if there is any error duing update.  */
       if (stash->info_hash_status == STASH_INFO_HASH_ON)
 	stash_maybe_update_info_hash_tables (stash);
 
@@ -4064,6 +4373,10 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd
 	{
 	  bfd_byte * new_ptr;
 
+	  /* PR 21151  */
+	  if (stash->info_ptr + length > stash->info_ptr_end)
+	    return FALSE;
+
 	  each = parse_comp_unit (stash, length, info_ptr_unit,
 				  offset_size);
 	  if (!each)
@@ -4129,16 +4442,25 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd
  done:
   if (function)
     {
-      if (!function->is_linkage
-	  && _bfd_elf_find_function (abfd, symbols, section, offset,
-				     *filename_ptr ? NULL : filename_ptr,
-				     functionname_ptr))
+      if (!function->is_linkage)
 	{
-	  function->name = *functionname_ptr;
+	  asymbol *fun;
+	  bfd_vma sec_vma;
+
+	  fun = _bfd_elf_find_function (abfd, symbols, section, offset,
+					*filename_ptr ? NULL : filename_ptr,
+					functionname_ptr);
+	  sec_vma = section->vma;
+	  if (section->output_section != NULL)
+	    sec_vma = section->output_section->vma + section->output_offset;
+	  if (fun != NULL
+	      && fun->value + sec_vma == function->arange.low)
+	    function->name = *functionname_ptr;
+	  /* Even if we didn't find a linkage name, say that we have
+	     to stop a repeated search of symbols.  */
 	  function->is_linkage = TRUE;
 	}
-      else
-	*functionname_ptr = function->name;
+      *functionname_ptr = function->name;
     }
   if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
     unset_sections (stash);
@@ -4222,6 +4544,12 @@ _bfd_dwarf2_cleanup_debug_info (bfd *abf
 	  function_table = function_table->prev_func;
 	}
 
+      if (each->lookup_funcinfo_table)
+	{
+	  free (each->lookup_funcinfo_table);
+	  each->lookup_funcinfo_table = NULL;
+	}
+
       while (variable_table)
 	{
 	  if (variable_table->file)
@@ -4261,7 +4589,7 @@ _bfd_dwarf2_cleanup_debug_info (bfd *abf
 /* Find the function to a particular section and offset,
    for error reporting.  */
 
-bfd_boolean
+asymbol *
 _bfd_elf_find_function (bfd *abfd,
 			asymbol **symbols,
 			asection *section,
@@ -4278,10 +4606,10 @@ _bfd_elf_find_function (bfd *abfd,
   } *cache;
 
   if (symbols == NULL)
-    return FALSE;
+    return NULL;
 
   if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
-    return FALSE;
+    return NULL;
 
   cache = elf_tdata (abfd)->elf_find_function_cache;
   if (cache == NULL)
@@ -4289,7 +4617,7 @@ _bfd_elf_find_function (bfd *abfd,
       cache = bfd_zalloc (abfd, sizeof (*cache));
       elf_tdata (abfd)->elf_find_function_cache = cache;
       if (cache == NULL)
-	return FALSE;
+	return NULL;
     }
   if (cache->last_section != section
       || cache->func == NULL
@@ -4354,12 +4682,12 @@ _bfd_elf_find_function (bfd *abfd,
     }
 
   if (cache->func == NULL)
-    return FALSE;
+    return NULL;
 
   if (filename_ptr)
     *filename_ptr = cache->filename;
   if (functionname_ptr)
     *functionname_ptr = bfd_asymbol_name (cache->func);
 
-  return TRUE;
+  return cache->func;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecoff.c ./bfd/ecoff.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecoff.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ecoff.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic ECOFF (Extended-COFF) routines.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
 
@@ -876,7 +876,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd
     return TRUE;
 
   internal = (ecoff_symbol_type *) bfd_alloc2 (abfd, bfd_get_symcount (abfd),
-					       sizeof (ecoff_symbol_type)); 
+					       sizeof (ecoff_symbol_type));
   if (internal == NULL)
     return FALSE;
 
@@ -959,7 +959,8 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd
   if (internal_ptr - internal < (ptrdiff_t) bfd_get_symcount (abfd))
     {
       bfd_get_symcount (abfd) = internal_ptr - internal;
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: warning: isymMax (%ld) is greater than ifdMax (%d)\n"),
 	 abfd, ecoff_data (abfd)->debug_info.symbolic_header.isymMax,
 	 ecoff_data (abfd)->debug_info.symbolic_header.ifdMax);
@@ -1536,6 +1537,7 @@ _bfd_ecoff_print_symbol (bfd *abfd,
 		if (ECOFF_IS_STAB (&ecoff_ext.asym))
 		  ;
 		else if (ecoffsymbol (symbol)->local)
+		  /* xgettext:c-format */
 		  fprintf (file, _("\n      End+1 symbol: %-7ld   Type:  %s"),
 			   ((long)
 			    (AUX_GET_ISYM (bigendian,
@@ -3544,9 +3546,9 @@ ecoff_link_check_archive_element (bfd *a
   if (h->type != bfd_link_hash_undefined)
     return TRUE;
 
-  /* Include this element.  */
+  /* Include this element?  */
   if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd))
-    return FALSE;
+    return TRUE;
   *pneeded = TRUE;
 
   return ecoff_link_add_object_symbols (abfd, info);
@@ -3896,7 +3898,7 @@ ecoff_indirect_link_order (bfd *output_b
      modified, and we write them out now.  We use the reloc_count
      field of output_section to keep track of the number of relocs we
      have output so far.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       file_ptr pos = (output_section->rel_filepos
 		      + output_section->reloc_count * external_reloc_size);
@@ -4015,17 +4017,12 @@ ecoff_reloc_link_order (bfd *output_bfd,
 	case bfd_reloc_outofrange:
 	  abort ();
 	case bfd_reloc_overflow:
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, NULL,
-		  (link_order->type == bfd_section_reloc_link_order
-		   ? bfd_section_name (output_bfd, section)
-		   : link_order->u.reloc.p->u.name),
-		  rel.howto->name, addend, NULL,
-		  NULL, (bfd_vma) 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*info->callbacks->reloc_overflow)
+	    (info, NULL,
+	     (link_order->type == bfd_section_reloc_link_order
+	      ? bfd_section_name (output_bfd, section)
+	      : link_order->u.reloc.p->u.name),
+	     rel.howto->name, addend, NULL, NULL, (bfd_vma) 0);
 	  break;
 	}
       ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
@@ -4055,10 +4052,8 @@ ecoff_reloc_link_order (bfd *output_bfd,
 	in.r_symndx = h->indx;
       else
 	{
-	  if (! ((*info->callbacks->unattached_reloc)
-		 (info, link_order->u.reloc.p->u.name, NULL,
-		  NULL, (bfd_vma) 0)))
-	    return FALSE;
+	  (*info->callbacks->unattached_reloc)
+	    (info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0);
 	  in.r_symndx = 0;
 	}
       in.r_extern = 1;
@@ -4370,7 +4365,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, st
   einfo.info = info;
   bfd_hash_traverse (&info->hash->table, ecoff_link_write_external, &einfo);
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* We need to make a pass over the link_orders to count up the
 	 number of relocations we will need to output, so that we know
@@ -4400,7 +4395,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, st
 
   bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info);
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* Now reset the reloc_count field of the sections in the output
 	 BFD to 0, so that we can use them to keep track of how many
@@ -4420,7 +4415,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, st
 	ecoff_data (abfd)->gp = (h->u.def.value
 				 + h->u.def.section->output_section->vma
 				 + h->u.def.section->output_offset);
-      else if (info->relocatable)
+      else if (bfd_link_relocatable (info))
 	{
 	  bfd_vma lo;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecofflink.c ./bfd/ecofflink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecofflink.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ecofflink.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Routines to link ECOFF debugging information.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -496,7 +496,7 @@ bfd_ecoff_debug_init (bfd *output_bfd AT
 
   ainfo->largest_file_shuffle = 0;
 
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     {
       if (!bfd_hash_table_init (&ainfo->str_hash.table, string_hash_newfunc,
 				sizeof (struct string_hash_entry)))
@@ -529,7 +529,7 @@ bfd_ecoff_debug_free (void * handle,
 
   bfd_hash_table_free (&ainfo->fdr_hash.table);
 
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     bfd_hash_table_free (&ainfo->str_hash.table);
 
   objalloc_free (ainfo->memory);
@@ -818,7 +818,7 @@ bfd_ecoff_debug_accumulate (void * handl
 	     of space required by debugging information.  We don't do
 	     this when performing a relocatable link because it would
 	     prevent us from easily merging different FDR's.  */
-	  if (! info->relocatable)
+	  if (! bfd_link_relocatable (info))
 	    {
 	      bfd_boolean ffilename;
 	      const char *name;
@@ -895,7 +895,7 @@ bfd_ecoff_debug_accumulate (void * handl
 	  fdr.iauxBase = output_symhdr->iauxMax;
 	  output_symhdr->iauxMax += fdr.caux;
 	}
-      if (! info->relocatable)
+      if (! bfd_link_relocatable (info))
 	{
 
 	  /* When are are hashing strings, we lie about the number of
@@ -1041,7 +1041,7 @@ ecoff_add_string (struct accumulate *ain
 
   symhdr = &debug->symbolic_header;
   len = strlen (string);
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end,
                                (bfd_byte *) string, len + 1))
@@ -1598,7 +1598,7 @@ bfd_ecoff_write_accumulated_debug (void 
 
   /* The string table is written out from the hash table if this is a
      final link.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       BFD_ASSERT (ainfo->ss_hash == (struct string_hash_entry *) NULL);
       if (! ecoff_write_shuffle (abfd, swap, ainfo->ss, space))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecoffswap.h ./bfd/ecoffswap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ecoffswap.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ecoffswap.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic ECOFF swapping routines, for BFD.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-am33lin.c ./bfd/elf32-am33lin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-am33lin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-am33lin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Matsushita AM33/2.0 support for 32-bit GNU/Linux ELF
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-arc.c ./bfd/elf32-arc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-arc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-arc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* ARC-specific support for 32-bit ELF
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
-   Contributed by Doug Evans (dje@cygnus.com).
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
+   Contributed by Cupertino Miranda (cmiranda@synopsys.com).
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -25,139 +25,463 @@
 #include "elf-bfd.h"
 #include "elf/arc.h"
 #include "libiberty.h"
+#include "opcode/arc-func.h"
+#include "opcode/arc.h"
+#include "arc-plt.h"
+
+/* #define ARC_ENABLE_DEBUG 1  */
+#ifdef ARC_ENABLE_DEBUG
+static const char *
+name_for_global_symbol (struct elf_link_hash_entry *h)
+{
+  static char *local_str = "(local)";
+  if (h == NULL)
+    return local_str;
+  return h->root.root.string;
+}
+#define ARC_DEBUG(fmt, args...) fprintf (stderr, fmt, ##args)
+#else
+#define ARC_DEBUG(...)
+#endif
+
+
+#define ADD_RELA(BFD, SECTION, OFFSET, SYM_IDX, TYPE, ADDEND)		\
+  {									\
+    struct elf_link_hash_table *_htab = elf_hash_table (info);		\
+    Elf_Internal_Rela _rel;						\
+    bfd_byte * _loc;							\
+									\
+    BFD_ASSERT (_htab->srel##SECTION &&_htab->srel##SECTION->contents); \
+    _loc = _htab->srel##SECTION->contents				\
+      + ((_htab->srel##SECTION->reloc_count)				\
+	 * sizeof (Elf32_External_Rela));				\
+    _htab->srel##SECTION->reloc_count++;				\
+    _rel.r_addend = ADDEND;						\
+    _rel.r_offset = (_htab->s##SECTION)->output_section->vma		\
+      + (_htab->s##SECTION)->output_offset + OFFSET;			\
+    BFD_ASSERT ((long) SYM_IDX != -1);					\
+    _rel.r_info = ELF32_R_INFO (SYM_IDX, TYPE);				\
+    bfd_elf32_swap_reloca_out (BFD, &_rel, _loc);			\
+  }
+
+
+/* The default symbols representing the init and fini dyn values.
+   TODO: Check what is the relation of those strings with arclinux.em
+   and DT_INIT.  */
+#define INIT_SYM_STRING "_init"
+#define FINI_SYM_STRING "_fini"
+
+char * init_str = INIT_SYM_STRING;
+char * fini_str = FINI_SYM_STRING;
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+      case VALUE: \
+	return "R_" #TYPE; \
+	break;
+
+static ATTRIBUTE_UNUSED const char *
+reloc_type_to_name (unsigned int type)
+{
+  switch (type)
+    {
+      #include "elf/arc-reloc.def"
+
+      default:
+	return "UNKNOWN";
+	break;
+    }
+}
+#undef ARC_RELOC_HOWTO
 
 /* Try to minimize the amount of space occupied by relocation tables
    on the ROM (not that the ROM won't be swamped by other ELF overhead).  */
 
-#define USE_REL	1
+#define USE_REL 1
+
+static ATTRIBUTE_UNUSED bfd_boolean
+is_reloc_PC_relative (reloc_howto_type *howto)
+{
+  return (strstr (howto->name, "PC") != NULL) ? TRUE : FALSE;
+}
+
+static bfd_boolean
+is_reloc_SDA_relative (reloc_howto_type *howto)
+{
+  return (strstr (howto->name, "SDA") != NULL) ? TRUE : FALSE;
+}
+
+static bfd_boolean
+is_reloc_for_GOT (reloc_howto_type * howto)
+{
+  if (strstr (howto->name, "TLS") != NULL)
+    return FALSE;
+  return (strstr (howto->name, "GOT") != NULL) ? TRUE : FALSE;
+}
+
+static bfd_boolean
+is_reloc_for_PLT (reloc_howto_type * howto)
+{
+  return (strstr (howto->name, "PLT") != NULL) ? TRUE : FALSE;
+}
+
+static bfd_boolean
+is_reloc_for_TLS (reloc_howto_type *howto)
+{
+  return (strstr (howto->name, "TLS") != NULL) ? TRUE : FALSE;
+}
+
+struct arc_relocation_data
+{
+  bfd_signed_vma  reloc_offset;
+  bfd_signed_vma  reloc_addend;
+  bfd_signed_vma  got_offset_value;
+
+  bfd_signed_vma  sym_value;
+  asection *	  sym_section;
+
+  reloc_howto_type *howto;
+
+  asection *	  input_section;
+
+  bfd_signed_vma  sdata_begin_symbol_vma;
+  bfd_boolean	  sdata_begin_symbol_vma_set;
+  bfd_signed_vma  got_symbol_vma;
+
+  bfd_boolean	  should_relocate;
+
+  const char *    symbol_name;
+};
+
+/* Should be included at this location due to static declarations
+ * defined before this point.  */
+#include "arc-got.h"
+
+#define arc_bfd_get_8(A,B,C) bfd_get_8(A,B)
+#define arc_bfd_get_16(A,B,C) bfd_get_16(A,B)
+#define arc_bfd_get_32(A,B,C) bfd_get_32(A,B)
+#define arc_bfd_put_8(A,B,C,D) bfd_put_8(A,B,C)
+#define arc_bfd_put_16(A,B,C,D) bfd_put_16(A,B,C)
+#define arc_bfd_put_32(A,B,C,D) bfd_put_32(A,B,C)
+
 
 static bfd_reloc_status_type
-arc_elf_b22_pcrel (bfd * abfd,
-		   arelent * reloc_entry,
-		   asymbol * symbol,
-		   void * data,
-		   asection * input_section,
-		   bfd * output_bfd,
-		   char ** error_message)
-{
-  /* If linking, back up the final symbol address by the address of the
-     reloc.  This cannot be accomplished by setting the pcrel_offset
-     field to TRUE, as bfd_install_relocation will detect this and refuse
-     to install the offset in the first place, but bfd_perform_relocation
-     will still insist on removing it.  */
-  if (output_bfd == NULL)
-    reloc_entry->addend -= reloc_entry->address;
-
-  /* Fall through to the default elf reloc handler.  */
-  return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
-				input_section, output_bfd, error_message);
-}
-
-static reloc_howto_type elf_arc_howto_table[] =
-{
-  /* This reloc does nothing.  */
-  HOWTO (R_ARC_NONE,		/* Type.  */
-	 0,			/* Rightshift.  */
-	 3,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 bfd_elf_generic_reloc,	/* Special_function.  */
-	 "R_ARC_NONE",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0,			/* Src_mask.  */
-	 0,			/* Dst_mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A standard 32 bit relocation.  */
-  HOWTO (R_ARC_32,		/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 bfd_elf_generic_reloc,	/* Special_function.  */
-	 "R_ARC_32",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Src_mask.  */
-	 0xffffffff,		/* Dst_mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A 26 bit absolute branch, right shifted by 2.  */
-  HOWTO (R_ARC_B26,		/* Type.  */
-	 2,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 26,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 bfd_elf_generic_reloc,	/* Special_function.  */
-	 "R_ARC_B26",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0x00ffffff,		/* Src_mask.  */
-	 0x00ffffff,		/* Dst_mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A relative 22 bit branch; bits 21-2 are stored in bits 26-7.  */
-  HOWTO (R_ARC_B22_PCREL,	/* Type.  */
-	 2,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 22,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 7,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 arc_elf_b22_pcrel,	/* Special_function.  */
-	 "R_ARC_B22_PCREL",	/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0x07ffff80,		/* Src_mask.  */
-	 0x07ffff80,		/* Dst_mask.  */
-	 FALSE),		/* PCrel_offset.  */
+arc_elf_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+	       arelent *reloc_entry,
+	       asymbol *symbol_in,
+	       void *data ATTRIBUTE_UNUSED,
+	       asection *input_section,
+	       bfd *output_bfd,
+	       char ** error_message ATTRIBUTE_UNUSED)
+{
+  if (output_bfd != NULL)
+    {
+      reloc_entry->address += input_section->output_offset;
+
+      /* In case of relocateable link and if the reloc is against a
+	 section symbol, the addend needs to be adjusted according to
+	 where the section symbol winds up in the output section.  */
+      if ((symbol_in->flags & BSF_SECTION_SYM) && symbol_in->section)
+	reloc_entry->addend += symbol_in->section->output_offset;
+
+      return bfd_reloc_ok;
+    }
+
+  return bfd_reloc_continue;
+}
+
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  TYPE = VALUE,
+enum howto_list
+{
+#include "elf/arc-reloc.def"
+  HOWTO_LIST_LAST
 };
+#undef ARC_RELOC_HOWTO
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, RSIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, FALSE, 0,		\
+		  complain_overflow_##OVERFLOW, arc_elf_reloc,		\
+		  "R_" #TYPE, FALSE, 0, 0, FALSE),
+
+static struct reloc_howto_struct elf_arc_howto_table[] =
+{
+#include "elf/arc-reloc.def"
+/* Example of what is generated by the preprocessor.  Currently kept as an
+   example.
+ HOWTO (R_ARC_NONE, // Type.
+    0, // Rightshift.
+    2, // Size (0 = byte, 1 = short, 2 = long).
+    32, // Bitsize.
+    FALSE, // PC_relative.
+    0, // Bitpos.
+    complain_overflow_bitfield, // Complain_on_overflow.
+    bfd_elf_generic_reloc, // Special_function.
+    "R_ARC_NONE", // Name.
+    TRUE, // Partial_inplace.
+    0, // Src_mask.
+    0, // Dst_mask.
+    FALSE), // PCrel_offset.
+*/
+};
+#undef ARC_RELOC_HOWTO
+
+static void arc_elf_howto_init (void)
+{
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  elf_arc_howto_table[TYPE].pc_relative = \
+    (strstr (#FORMULA, " P ") != NULL || strstr (#FORMULA, " PDATA ") != NULL); \
+  elf_arc_howto_table[TYPE].dst_mask = RELOC_FUNCTION(0, ~0); \
+  /* Only 32 bit data relocations should be marked as ME.  */ \
+  if (strstr (#FORMULA, " ME ") != NULL) \
+    { \
+      BFD_ASSERT (SIZE == 2); \
+    }
+
+#include "elf/arc-reloc.def"
+
+}
+#undef ARC_RELOC_HOWTO
+
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  [TYPE] = VALUE,
+const int howto_table_lookup[] =
+{
+#include "elf/arc-reloc.def"
+};
+#undef ARC_RELOC_HOWTO
+
+static reloc_howto_type *
+arc_elf_howto (unsigned int r_type)
+{
+  if (elf_arc_howto_table[R_ARC_32].dst_mask == 0)
+    arc_elf_howto_init ();
+  return &elf_arc_howto_table[r_type];
+}
 
 /* Map BFD reloc types to ARC ELF reloc types.  */
 
 struct arc_reloc_map
 {
-  bfd_reloc_code_real_type bfd_reloc_val;
-  unsigned char elf_reloc_val;
+  bfd_reloc_code_real_type  bfd_reloc_val;
+  unsigned char		    elf_reloc_val;
+};
+
+/* ARC ELF linker hash entry.  */
+struct elf_arc_link_hash_entry
+{
+  struct elf_link_hash_entry root;
+
+  /* Track dynamic relocs copied for this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+};
+
+/* ARC ELF linker hash table.  */
+struct elf_arc_link_hash_table
+{
+  struct elf_link_hash_table elf;
 };
 
+static struct bfd_hash_entry *
+elf_arc_link_hash_newfunc (struct bfd_hash_entry *entry,
+			   struct bfd_hash_table *table,
+			   const char *string)
+{
+  /* Allocate the structure if it has not already been allocated by a
+     subclass.  */
+  if (entry == NULL)
+    {
+      entry = (struct bfd_hash_entry *)
+	  bfd_hash_allocate (table,
+			     sizeof (struct elf_arc_link_hash_entry));
+      if (entry == NULL)
+	return entry;
+    }
+
+  /* Call the allocation method of the superclass.  */
+  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+  if (entry != NULL)
+    {
+      struct elf_arc_link_hash_entry *eh;
+
+      eh = (struct elf_arc_link_hash_entry *) entry;
+      eh->dyn_relocs = NULL;
+    }
+
+  return entry;
+}
+
+/* Destroy an ARC ELF linker hash table.  */
+static void
+elf_arc_link_hash_table_free (bfd *obfd)
+{
+  _bfd_elf_link_hash_table_free (obfd);
+}
+
+/* Create an ARC ELF linker hash table.  */
+
+static struct bfd_link_hash_table *
+arc_elf_link_hash_table_create (bfd *abfd)
+{
+  struct elf_arc_link_hash_table *ret;
+
+  ret = (struct elf_arc_link_hash_table *) bfd_zmalloc (sizeof (*ret));
+  if (ret == NULL)
+    return NULL;
+
+  if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
+				      elf_arc_link_hash_newfunc,
+				      sizeof (struct elf_arc_link_hash_entry),
+				      ARC_ELF_DATA))
+    {
+      free (ret);
+      return NULL;
+    }
+
+  ret->elf.init_got_refcount.refcount = 0;
+  ret->elf.init_got_refcount.glist = NULL;
+  ret->elf.init_got_offset.offset = 0;
+  ret->elf.init_got_offset.glist = NULL;
+
+  ret->elf.root.hash_table_free = elf_arc_link_hash_table_free;
+
+  return &ret->elf.root;
+}
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  { BFD_RELOC_##TYPE, R_##TYPE },
 static const struct arc_reloc_map arc_reloc_map[] =
 {
-  { BFD_RELOC_NONE, R_ARC_NONE, },
-  { BFD_RELOC_32, R_ARC_32 },
-  { BFD_RELOC_CTOR, R_ARC_32 },
-  { BFD_RELOC_ARC_B26, R_ARC_B26 },
-  { BFD_RELOC_ARC_B22_PCREL, R_ARC_B22_PCREL },
+#include "elf/arc-reloc.def"
+
+  {BFD_RELOC_NONE,  R_ARC_NONE},
+  {BFD_RELOC_8,  R_ARC_8},
+  {BFD_RELOC_16, R_ARC_16},
+  {BFD_RELOC_24, R_ARC_24},
+  {BFD_RELOC_32, R_ARC_32},
 };
+#undef ARC_RELOC_HOWTO
+
+typedef ATTRIBUTE_UNUSED bfd_vma (*replace_func) (unsigned, int ATTRIBUTE_UNUSED);
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  case TYPE: \
+    func = (void *) RELOC_FUNCTION; \
+    break;
+static replace_func
+get_replace_function (bfd *abfd, unsigned int r_type)
+{
+  void *func = NULL;
+
+  switch (r_type)
+    {
+      #include "elf/arc-reloc.def"
+    }
+
+  if (func == replace_bits24 && bfd_big_endian (abfd))
+    return (replace_func) replace_bits24_be;
+
+  return (replace_func) func;
+}
+#undef ARC_RELOC_HOWTO
 
 static reloc_howto_type *
-bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+arc_elf32_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
 				 bfd_reloc_code_real_type code)
 {
   unsigned int i;
 
   for (i = ARRAY_SIZE (arc_reloc_map); i--;)
-    if (arc_reloc_map[i].bfd_reloc_val == code)
-      return elf_arc_howto_table + arc_reloc_map[i].elf_reloc_val;
+    {
+      if (arc_reloc_map[i].bfd_reloc_val == code)
+	return arc_elf_howto (arc_reloc_map[i].elf_reloc_val);
+    }
 
   return NULL;
 }
 
+/* Function to set the ELF flag bits.  */
+static bfd_boolean
+arc_elf_set_private_flags (bfd *abfd, flagword flags)
+{
+  elf_elfheader (abfd)->e_flags = flags;
+  elf_flags_init (abfd) = TRUE;
+  return TRUE;
+}
+
+/* Print private flags.  */
+static bfd_boolean
+arc_elf_print_private_bfd_data (bfd *abfd, void * ptr)
+{
+  FILE *file = (FILE *) ptr;
+  flagword flags;
+
+  BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+  /* Print normal ELF private data.  */
+  _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+  flags = elf_elfheader (abfd)->e_flags;
+  fprintf (file, _("private flags = 0x%lx:"), (unsigned long) flags);
+
+  switch (flags & EF_ARC_MACH_MSK)
+    {
+    case EF_ARC_CPU_ARCV2HS : fprintf (file, " -mcpu=ARCv2HS");    break;
+    case EF_ARC_CPU_ARCV2EM : fprintf (file, " -mcpu=ARCv2EM");    break;
+    case E_ARC_MACH_ARC600  : fprintf (file, " -mcpu=ARC600");     break;
+    case E_ARC_MACH_ARC601  : fprintf (file, " -mcpu=ARC601");     break;
+    case E_ARC_MACH_ARC700  : fprintf (file, " -mcpu=ARC700");     break;
+    default:
+      fprintf (file, "-mcpu=unknown");
+      break;
+    }
+
+  switch (flags & EF_ARC_OSABI_MSK)
+    {
+    case E_ARC_OSABI_ORIG : fprintf (file, " (ABI:legacy)"); break;
+    case E_ARC_OSABI_V2   : fprintf (file, " (ABI:v2)");     break;
+    case E_ARC_OSABI_V3   : fprintf (file, " (ABI:v3)");     break;
+    default:
+      fprintf (file, "(ABI:unknown)");
+      break;
+    }
+
+  fputc ('\n', file);
+  return TRUE;
+}
+
+/* Copy backend specific data from one object module to another.  */
+
+static bfd_boolean
+arc_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return TRUE;
+
+  BFD_ASSERT (!elf_flags_init (obfd)
+	      || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
+
+  elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+  elf_flags_init (obfd) = TRUE;
+
+  /* Copy object attributes.  */
+  _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+  return _bfd_elf_copy_private_bfd_data (ibfd, obfd);
+}
+
 static reloc_howto_type *
-bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+bfd_elf32_bfd_reloc_name_lookup (bfd * abfd ATTRIBUTE_UNUSED,
 				 const char *r_name)
 {
   unsigned int i;
 
-  for (i = 0;
-       i < sizeof (elf_arc_howto_table) / sizeof (elf_arc_howto_table[0]);
-       i++)
+  for (i = 0; i < ARRAY_SIZE (elf_arc_howto_table); i++)
     if (elf_arc_howto_table[i].name != NULL
 	&& strcasecmp (elf_arc_howto_table[i].name, r_name) == 0)
-      return &elf_arc_howto_table[i];
+      return arc_elf_howto (i);
 
   return NULL;
 }
@@ -165,49 +489,163 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *ab
 /* Set the howto pointer for an ARC ELF reloc.  */
 
 static void
-arc_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
-		       arelent *cache_ptr,
-		       Elf_Internal_Rela *dst)
+arc_info_to_howto_rel (bfd * abfd ATTRIBUTE_UNUSED,
+		       arelent * cache_ptr,
+		       Elf_Internal_Rela * dst)
 {
   unsigned int r_type;
 
   r_type = ELF32_R_TYPE (dst->r_info);
-  if (r_type >= (unsigned int) R_ARC_max)
+  BFD_ASSERT (r_type < (unsigned int) R_ARC_max);
+  cache_ptr->howto = arc_elf_howto (r_type);
+}
+
+/* Merge backend specific data from an object file to the output
+   object file when linking.  */
+
+static bfd_boolean
+arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
+{
+  bfd *obfd = info->output_bfd;
+  unsigned short mach_ibfd;
+  static unsigned short mach_obfd = EM_NONE;
+  flagword out_flags;
+  flagword in_flags;
+  asection *sec;
+
+   /* Check if we have the same endianess.  */
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
+    return FALSE;
+
+  /* Collect ELF flags.  */
+  in_flags = elf_elfheader (ibfd)->e_flags & EF_ARC_MACH_MSK;
+  out_flags = elf_elfheader (obfd)->e_flags & EF_ARC_MACH_MSK;
+
+  if (!elf_flags_init (obfd)) /* First call, no flags set.  */
+    {
+      elf_flags_init (obfd) = TRUE;
+      out_flags = in_flags;
+    }
+
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return TRUE;
+
+  /* Check to see if the input BFD actually contains any sections.  Do
+     not short-circuit dynamic objects; their section list may be
+     emptied by elf_link_add_object_symbols.  */
+  if (!(ibfd->flags & DYNAMIC))
+    {
+      bfd_boolean null_input_bfd = TRUE;
+      bfd_boolean only_data_sections = TRUE;
+
+      for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+	{
+	  if ((bfd_get_section_flags (ibfd, sec)
+	       & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+	      == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+	    only_data_sections = FALSE;
+
+	  null_input_bfd = FALSE;
+	}
+
+      if (null_input_bfd || only_data_sections)
+	return TRUE;
+    }
+
+  /* Complain about various flag/architecture mismatches.  */
+  mach_ibfd = elf_elfheader (ibfd)->e_machine;
+  if (mach_obfd == EM_NONE)
+    {
+      mach_obfd = mach_ibfd;
+    }
+  else
+    {
+      if (mach_ibfd != mach_obfd)
+	{
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("ERROR: Attempting to link %B "
+				"with a binary %s of different architecture"),
+			      ibfd, bfd_get_filename (obfd));
+	  return FALSE;
+	}
+      else if (in_flags != out_flags)
+	{
+	  /* Warn if different flags.  */
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%s: uses different e_flags (0x%lx) fields than "
+	       "previous modules (0x%lx)"),
+	     bfd_get_filename (ibfd), (long)in_flags, (long)out_flags);
+	  if (in_flags && out_flags)
+	    return FALSE;
+	  /* MWDT doesnt set the eflags hence make sure we choose the
+	     eflags set by gcc.  */
+	  in_flags = in_flags > out_flags ? in_flags : out_flags;
+	}
+    }
+
+  /* Update the flags.  */
+  elf_elfheader (obfd)->e_flags = in_flags;
+
+  if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
     {
-      _bfd_error_handler (_("%B: invalid ARC reloc number: %d"), abfd, r_type);
-      r_type = 0;
+      return bfd_set_arch_mach (obfd, bfd_arch_arc, bfd_get_mach (ibfd));
     }
-  cache_ptr->howto = &elf_arc_howto_table[r_type];
+
+  return TRUE;
 }
 
 /* Set the right machine number for an ARC ELF file.  */
-
 static bfd_boolean
-arc_elf_object_p (bfd *abfd)
+arc_elf_object_p (bfd * abfd)
 {
-  unsigned int mach = bfd_mach_arc_6;
+  /* Make sure this is initialised, or you'll have the potential of passing
+     garbage---or misleading values---into the call to
+     bfd_default_set_arch_mach ().  */
+  int		  mach = bfd_mach_arc_arc700;
+  unsigned long   arch = elf_elfheader (abfd)->e_flags & EF_ARC_MACH_MSK;
+  unsigned	  e_machine = elf_elfheader (abfd)->e_machine;
 
-  if (elf_elfheader(abfd)->e_machine == EM_ARC)
+  if (e_machine == EM_ARC_COMPACT || e_machine == EM_ARC_COMPACT2)
     {
-      unsigned long arch = elf_elfheader (abfd)->e_flags & EF_ARC_MACH;
-
       switch (arch)
 	{
-	case E_ARC_MACH_ARC5:
-	  mach = bfd_mach_arc_5;
-	  break;
-	default:
-	case E_ARC_MACH_ARC6:
-	  mach = bfd_mach_arc_6;
-	  break;
-	case E_ARC_MACH_ARC7:
-	  mach = bfd_mach_arc_7;
-	  break;
-	case E_ARC_MACH_ARC8:
-	  mach = bfd_mach_arc_8;
-	  break;
+	  case E_ARC_MACH_ARC600:
+	    mach = bfd_mach_arc_arc600;
+	    break;
+	  case E_ARC_MACH_ARC601:
+	    mach = bfd_mach_arc_arc601;
+	    break;
+	  case E_ARC_MACH_ARC700:
+	    mach = bfd_mach_arc_arc700;
+	    break;
+	  case EF_ARC_CPU_ARCV2HS:
+	  case EF_ARC_CPU_ARCV2EM:
+	    mach = bfd_mach_arc_arcv2;
+	    break;
+	  default:
+	    mach = (e_machine == EM_ARC_COMPACT)
+	      ? bfd_mach_arc_arc700 : bfd_mach_arc_arcv2;
+	    break;
+	}
+    }
+  else
+    {
+      if (e_machine == EM_ARC)
+	{
+	  _bfd_error_handler
+	    (_("Error: The ARC4 architecture is no longer supported.\n"));
+	  return FALSE;
+	}
+      else
+	{
+	  _bfd_error_handler
+	    (_("Warning: unset or old architecture flags. \n"
+	       "	       Use default machine.\n"));
 	}
     }
+
   return bfd_default_set_arch_mach (abfd, bfd_arch_arc, mach);
 }
 
@@ -215,42 +653,1867 @@ arc_elf_object_p (bfd *abfd)
    This gets the ARC architecture right based on the machine number.  */
 
 static void
-arc_elf_final_write_processing (bfd *abfd,
+arc_elf_final_write_processing (bfd * abfd,
 				bfd_boolean linker ATTRIBUTE_UNUSED)
 {
-  unsigned long val;
+  unsigned long emf;
 
   switch (bfd_get_mach (abfd))
     {
-    case bfd_mach_arc_5:
-      val = E_ARC_MACH_ARC5;
+    case bfd_mach_arc_arc600:
+      emf = EM_ARC_COMPACT;
       break;
-    default:
-    case bfd_mach_arc_6:
-      val = E_ARC_MACH_ARC6;
+    case bfd_mach_arc_arc601:
+      emf = EM_ARC_COMPACT;
       break;
-    case bfd_mach_arc_7:
-      val = E_ARC_MACH_ARC7;
+    case bfd_mach_arc_arc700:
+      emf = EM_ARC_COMPACT;
       break;
-    case bfd_mach_arc_8:
-      val = E_ARC_MACH_ARC8;
+    case bfd_mach_arc_arcv2:
+      emf = EM_ARC_COMPACT2;
       break;
+    default:
+      goto DO_NOTHING;
     }
-  elf_elfheader (abfd)->e_flags &=~ EF_ARC_MACH;
-  elf_elfheader (abfd)->e_flags |= val;
+
+  elf_elfheader (abfd)->e_machine = emf;
+
+  /* Record whatever is the current syscall ABI version.  */
+  elf_elfheader (abfd)->e_flags |= E_ARC_OSABI_CURRENT;
+
+DO_NOTHING:
+  return;
 }
 
-#define TARGET_LITTLE_SYM   arc_elf32_le_vec
-#define TARGET_LITTLE_NAME  "elf32-littlearc"
-#define TARGET_BIG_SYM      arc_elf32_be_vec
-#define TARGET_BIG_NAME	    "elf32-bigarc"
-#define ELF_ARCH            bfd_arch_arc
-#define ELF_MACHINE_CODE    EM_ARC
-#define ELF_MAXPAGESIZE     0x1000
-
-#define elf_info_to_howto                   0
-#define elf_info_to_howto_rel               arc_info_to_howto_rel
-#define elf_backend_object_p                arc_elf_object_p
-#define elf_backend_final_write_processing  arc_elf_final_write_processing
+#ifdef ARC_ENABLE_DEBUG
+#define DEBUG_ARC_RELOC(A) debug_arc_reloc (A)
+
+static void
+debug_arc_reloc (struct arc_relocation_data reloc_data)
+{
+  ARC_DEBUG ("Reloc type=%s, should_relocate = %s\n",
+	     reloc_data.howto->name,
+	     reloc_data.should_relocate ? "true" : "false");
+  ARC_DEBUG ("  offset = 0x%x, addend = 0x%x\n",
+	     (unsigned int) reloc_data.reloc_offset,
+	     (unsigned int) reloc_data.reloc_addend);
+  ARC_DEBUG (" Symbol:\n");
+  ARC_DEBUG ("  value = 0x%08x\n",
+	     (unsigned int) reloc_data.sym_value);
+  if (reloc_data.sym_section != NULL)
+    {
+      ARC_DEBUG (" Symbol Section:\n");
+      ARC_DEBUG ("  section name = %s, output_offset 0x%08x",
+		 reloc_data.sym_section->name,
+		 (unsigned int) reloc_data.sym_section->output_offset);
+      if (reloc_data.sym_section->output_section != NULL)
+	ARC_DEBUG (", output_section->vma = 0x%08x",
+		   ((unsigned int) reloc_data.sym_section->output_section->vma));
+      ARC_DEBUG ("\n");
+      if (reloc_data.sym_section->owner && reloc_data.sym_section->owner->filename)
+	ARC_DEBUG ("  file: %s\n", reloc_data.sym_section->owner->filename);
+    }
+  else
+    {
+      ARC_DEBUG ("  symbol section is NULL\n");
+    }
+
+  ARC_DEBUG (" Input_section:\n");
+  if (reloc_data.input_section != NULL)
+    {
+      ARC_DEBUG ("  section name = %s, output_offset 0x%08x, output_section->vma = 0x%08x\n",
+		 reloc_data.input_section->name,
+		 (unsigned int) reloc_data.input_section->output_offset,
+		 (unsigned int) reloc_data.input_section->output_section->vma);
+      ARC_DEBUG ("  changed_address = 0x%08x\n",
+		 (unsigned int) (reloc_data.input_section->output_section->vma
+				 + reloc_data.input_section->output_offset
+				 + reloc_data.reloc_offset));
+      ARC_DEBUG ("  file: %s\n", reloc_data.input_section->owner->filename);
+    }
+  else
+    {
+      ARC_DEBUG ("	input section is NULL\n");
+    }
+}
+#else
+#define DEBUG_ARC_RELOC(A)
+#endif /* ARC_ENABLE_DEBUG */
+
+static bfd_vma
+middle_endian_convert (bfd_vma insn, bfd_boolean do_it)
+{
+  if (do_it)
+    {
+      insn
+	= ((insn & 0xffff0000) >> 16)
+	  | ((insn & 0xffff) << 16);
+    }
+  return insn;
+}
+
+/* This function is called for relocations that are otherwise marked as NOT
+   requiring overflow checks.  In here we perform non-standard checks of
+   the relocation value.  */
+
+static inline bfd_reloc_status_type
+arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
+			     bfd_signed_vma relocation,
+			     struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+  switch (reloc_data.howto->type)
+    {
+    case R_ARC_NPS_CMEM16:
+      if (((relocation >> 16) & 0xffff) != NPS_CMEM_HIGH_VALUE)
+	{
+	  if (reloc_data.reloc_addend == 0)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%B(%A+0x%lx): CMEM relocation to `%s' is invalid, "
+		 "16 MSB should be 0x%04x (value is 0x%lx)"),
+	       reloc_data.input_section->owner,
+	       reloc_data.input_section,
+	       reloc_data.reloc_offset,
+	       reloc_data.symbol_name,
+	       NPS_CMEM_HIGH_VALUE,
+	       (relocation));
+	  else
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%B(%A+0x%lx): CMEM relocation to `%s+0x%lx' is invalid, "
+		 "16 MSB should be 0x%04x (value is 0x%lx)"),
+	       reloc_data.input_section->owner,
+	       reloc_data.input_section,
+	       reloc_data.reloc_offset,
+	       reloc_data.symbol_name,
+	       reloc_data.reloc_addend,
+	       NPS_CMEM_HIGH_VALUE,
+	       (relocation));
+	  return bfd_reloc_overflow;
+	}
+      break;
+
+    default:
+      break;
+    }
+
+  return bfd_reloc_ok;
+}
+
+#define ME(reloc) (reloc)
+
+#define IS_ME(FORMULA,BFD) ((strstr (FORMULA, "ME") != NULL) \
+			    && (!bfd_big_endian (BFD)))
+
+#define S ((bfd_signed_vma) (reloc_data.sym_value			\
+	   + (reloc_data.sym_section->output_section != NULL ?		\
+	      (reloc_data.sym_section->output_offset			\
+	       + reloc_data.sym_section->output_section->vma) : 0)))
+#define L ((bfd_signed_vma) (reloc_data.sym_value			\
+	   + (reloc_data.sym_section->output_section != NULL ?		\
+	      (reloc_data.sym_section->output_offset			\
+	      + reloc_data.sym_section->output_section->vma) : 0)))
+#define A (reloc_data.reloc_addend)
+#define B (0)
+#define G (reloc_data.got_offset_value)
+#define GOT (reloc_data.got_symbol_vma)
+#define GOT_BEGIN (htab->sgot->output_section->vma)
+
+#define MES (0)
+	/* P: relative offset to PCL The offset should be to the
+	  current location aligned to 32 bits.  */
+#define P ((bfd_signed_vma) (						\
+	   (								\
+	    (reloc_data.input_section->output_section != NULL ?		\
+	     reloc_data.input_section->output_section->vma : 0)		\
+	    + reloc_data.input_section->output_offset			\
+	    + (reloc_data.reloc_offset - (bitsize >= 32 ? 4 : 0)))	\
+	   & ~0x3))
+#define PDATA ((bfd_signed_vma) ( \
+	    (reloc_data.input_section->output_section->vma \
+	     + reloc_data.input_section->output_offset \
+	     + (reloc_data.reloc_offset))))
+#define SECTSTART (bfd_signed_vma) (reloc_data.sym_section->output_section->vma \
+				    + reloc_data.sym_section->output_offset)
+
+#define _SDA_BASE_ (bfd_signed_vma) (reloc_data.sdata_begin_symbol_vma)
+#define TLS_REL (bfd_signed_vma) \
+  ((elf_hash_table (info))->tls_sec->output_section->vma)
+#define TLS_TBSS (8)
+#define TCB_SIZE (8)
+
+#define none (0)
+
+#ifdef ARC_ENABLE_DEBUG
+#define PRINT_DEBUG_RELOC_INFO_BEFORE(FORMULA, TYPE)			\
+  do									\
+    {									\
+      asection *sym_section = reloc_data.sym_section;			\
+      asection *input_section = reloc_data.input_section;		\
+      ARC_DEBUG ("RELOC_TYPE = " TYPE "\n");				\
+      ARC_DEBUG ("FORMULA = " FORMULA "\n");				\
+      ARC_DEBUG ("S = %#lx\n", S);					\
+      ARC_DEBUG ("A = %#lx\n", A);					\
+      ARC_DEBUG ("L = %lx\n", L);					\
+      if (sym_section->output_section != NULL)				\
+	ARC_DEBUG ("symbol_section->vma = %#lx\n",			\
+		   sym_section->output_section->vma			\
+		   + sym_section->output_offset);			\
+      else								\
+	ARC_DEBUG ("symbol_section->vma = NULL\n");			\
+      if (input_section->output_section != NULL)			\
+	ARC_DEBUG ("symbol_section->vma = %#lx\n",			\
+		   input_section->output_section->vma			\
+		   + input_section->output_offset);			\
+      else								\
+	ARC_DEBUG ("symbol_section->vma = NULL\n");			\
+      ARC_DEBUG ("PCL = %#lx\n", P);					\
+      ARC_DEBUG ("P = %#lx\n", P);					\
+      ARC_DEBUG ("G = %#lx\n", G);					\
+      ARC_DEBUG ("SDA_OFFSET = %#lx\n", _SDA_BASE_);			\
+      ARC_DEBUG ("SDA_SET = %d\n", reloc_data.sdata_begin_symbol_vma_set); \
+      ARC_DEBUG ("GOT_OFFSET = %#lx\n", GOT);				\
+      ARC_DEBUG ("relocation = %#08lx\n", relocation);			\
+      ARC_DEBUG ("before = %#08x\n", (unsigned) insn);			\
+      ARC_DEBUG ("data   = %08x (%u) (%d)\n", (unsigned) relocation,	\
+		 (unsigned) relocation, (int) relocation);		\
+    }									\
+  while (0)
+
+#define PRINT_DEBUG_RELOC_INFO_AFTER				\
+  do								\
+    {								\
+      ARC_DEBUG ("after  = 0x%08x\n", (unsigned int) insn);	\
+    }								\
+  while (0)
+
+#else
+
+#define PRINT_DEBUG_RELOC_INFO_BEFORE(...)
+#define PRINT_DEBUG_RELOC_INFO_AFTER 
+
+#endif /* ARC_ENABLE_DEBUG */
+
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  case R_##TYPE:							\
+    {									\
+      bfd_signed_vma bitsize ATTRIBUTE_UNUSED = BITSIZE;		\
+      relocation = FORMULA  ;						\
+      PRINT_DEBUG_RELOC_INFO_BEFORE (#FORMULA, #TYPE);			\
+      insn = middle_endian_convert (insn, IS_ME (#FORMULA, abfd));	\
+      insn = (* get_replace_function (abfd, TYPE)) (insn, relocation);	\
+      insn = middle_endian_convert (insn, IS_ME (#FORMULA, abfd));	\
+      PRINT_DEBUG_RELOC_INFO_AFTER;					\
+    }									\
+    break;
+
+static bfd_reloc_status_type
+arc_do_relocation (bfd_byte * contents,
+		   struct arc_relocation_data reloc_data,
+		   struct bfd_link_info *info)
+{
+  bfd_signed_vma relocation = 0;
+  bfd_vma insn;
+  bfd_vma orig_insn ATTRIBUTE_UNUSED;
+  bfd * abfd = reloc_data.input_section->owner;
+  struct elf_link_hash_table *htab ATTRIBUTE_UNUSED = elf_hash_table (info);
+  bfd_reloc_status_type flag;
+
+  if (reloc_data.should_relocate == FALSE)
+    return bfd_reloc_ok;
+
+  switch (reloc_data.howto->size)
+    {
+      case 2:
+	insn = arc_bfd_get_32 (abfd,
+			       contents + reloc_data.reloc_offset,
+			       reloc_data.input_section);
+	break;
+      case 1:
+	insn = arc_bfd_get_16 (abfd,
+			       contents + reloc_data.reloc_offset,
+			       reloc_data.input_section);
+	break;
+      case 0:
+	insn = arc_bfd_get_8 (abfd,
+			       contents + reloc_data.reloc_offset,
+			       reloc_data.input_section);
+	break;
+      default:
+	insn = 0;
+	BFD_ASSERT (0);
+	break;
+    }
+
+  orig_insn = insn;
+
+  switch (reloc_data.howto->type)
+    {
+#include "elf/arc-reloc.def"
+
+      default:
+	BFD_ASSERT (0);
+	break;
+    }
+
+  /* Check for relocation overflow.  */
+  if (reloc_data.howto->complain_on_overflow != complain_overflow_dont)
+    flag = bfd_check_overflow (reloc_data.howto->complain_on_overflow,
+			       reloc_data.howto->bitsize,
+			       reloc_data.howto->rightshift,
+			       bfd_arch_bits_per_address (abfd),
+			       relocation);
+  else
+    flag = arc_special_overflow_checks (reloc_data, relocation, info);
+
+  if (flag != bfd_reloc_ok)
+    {
+      ARC_DEBUG ("Relocation overflows !\n");
+      DEBUG_ARC_RELOC (reloc_data);
+      ARC_DEBUG ("Relocation value = signed -> %d, unsigned -> %u"
+		 ", hex -> (0x%08x)\n",
+		(int) relocation, (unsigned) relocation, (int) relocation);
+
+      return flag;
+    }
+
+  /* Write updated instruction back to memory.  */
+  switch (reloc_data.howto->size)
+    {
+      case 2:
+	arc_bfd_put_32 (abfd, insn,
+		       contents + reloc_data.reloc_offset,
+		       reloc_data.input_section);
+	break;
+      case 1:
+	arc_bfd_put_16 (abfd, insn,
+		       contents + reloc_data.reloc_offset,
+		       reloc_data.input_section);
+	break;
+      case 0:
+	arc_bfd_put_8 (abfd, insn,
+		       contents + reloc_data.reloc_offset,
+		       reloc_data.input_section);
+	break;
+      default:
+	ARC_DEBUG ("size = %d\n", reloc_data.howto->size);
+	BFD_ASSERT (0);
+	break;
+    }
+
+  return bfd_reloc_ok;
+}
+#undef S
+#undef A
+#undef B
+#undef G
+#undef GOT
+#undef L
+#undef MES
+#undef P
+#undef SECTSTAR
+#undef SECTSTART
+#undef _SDA_BASE_
+#undef none
+
+#undef ARC_RELOC_HOWTO
+
+
+/* Relocate an arc ELF section.
+   Function : elf_arc_relocate_section
+   Brief    : Relocate an arc section, by handling all the relocations
+	     appearing in that section.
+   Args     : output_bfd    : The bfd being written to.
+	      info	    : Link information.
+	      input_bfd     : The input bfd.
+	      input_section : The section being relocated.
+	      contents	    : contents of the section being relocated.
+	      relocs	    : List of relocations in the section.
+	      local_syms    : is a pointer to the swapped in local symbols.
+	      local_section : is an array giving the section in the input file
+			      corresponding to the st_shndx field of each
+			      local symbol.  */
+static bfd_boolean
+elf_arc_relocate_section (bfd *		          output_bfd,
+			  struct bfd_link_info *  info,
+			  bfd *		          input_bfd,
+			  asection *	          input_section,
+			  bfd_byte *	          contents,
+			  Elf_Internal_Rela *     relocs,
+			  Elf_Internal_Sym *      local_syms,
+			  asection **	          local_sections)
+{
+  Elf_Internal_Shdr *	         symtab_hdr;
+  struct elf_link_hash_entry **  sym_hashes;
+  Elf_Internal_Rela *	         rel;
+  Elf_Internal_Rela *	         wrel;
+  Elf_Internal_Rela *	         relend;
+  struct elf_link_hash_table *   htab = elf_hash_table (info);
+
+  symtab_hdr = &((elf_tdata (input_bfd))->symtab_hdr);
+  sym_hashes = elf_sym_hashes (input_bfd);
+
+  rel = wrel = relocs;
+  relend = relocs + input_section->reloc_count;
+  for (; rel < relend; wrel++, rel++)
+    {
+      enum elf_arc_reloc_type       r_type;
+      reloc_howto_type *	    howto;
+      unsigned long		    r_symndx;
+      struct elf_link_hash_entry *  h;
+      Elf_Internal_Sym *	    sym;
+      asection *		    sec;
+      struct elf_link_hash_entry *  h2;
+      const char *                  msg;
+
+      struct arc_relocation_data reloc_data =
+      {
+	.reloc_offset = 0,
+	.reloc_addend = 0,
+	.got_offset_value = 0,
+	.sym_value = 0,	
+	.sym_section = NULL,
+	.howto = NULL,
+	.input_section = NULL,
+	.sdata_begin_symbol_vma = 0,
+	.sdata_begin_symbol_vma_set = FALSE,
+	.got_symbol_vma = 0,
+	.should_relocate = FALSE
+      };
+
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      if (r_type >= (int) R_ARC_max)
+	{
+	  bfd_set_error (bfd_error_bad_value);
+	  return FALSE;
+	}
+      howto = arc_elf_howto (r_type);
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+
+      /* If we are generating another .o file and the symbol in not
+	 local, skip this relocation.  */
+      if (bfd_link_relocatable (info))
+	{
+	  /* This is a relocateable link.  We don't have to change
+	     anything, unless the reloc is against a section symbol,
+	     in which case we have to adjust according to where the
+	     section symbol winds up in the output section.  */
+
+	  /* Checks if this is a local symbol and thus the reloc
+	     might (will??) be against a section symbol.  */
+	  if (r_symndx < symtab_hdr->sh_info)
+	    {
+	      sym = local_syms + r_symndx;
+	      if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+		{
+		  sec = local_sections[r_symndx];
+
+		  /* For RELA relocs.  Just adjust the addend
+		     value in the relocation entry.  */
+		  rel->r_addend += sec->output_offset + sym->st_value;
+
+		  ARC_DEBUG ("local symbols reloc (section=%d %s) seen in %s\n",
+			     (int) r_symndx, local_sections[r_symndx]->name,
+			     __PRETTY_FUNCTION__);
+		}
+	    }
+	}
+
+      h2 = elf_link_hash_lookup (elf_hash_table (info), "__SDATA_BEGIN__",
+				 FALSE, FALSE, TRUE);
+
+      if (reloc_data.sdata_begin_symbol_vma_set == FALSE
+	    && h2 != NULL && h2->root.type != bfd_link_hash_undefined
+	    && h2->root.u.def.section->output_section != NULL)
+	/* TODO: Verify this condition.  */
+	{
+	  reloc_data.sdata_begin_symbol_vma =
+	    (h2->root.u.def.value
+	     + h2->root.u.def.section->output_section->vma);
+	  reloc_data.sdata_begin_symbol_vma_set = TRUE;
+	}
+
+      reloc_data.input_section = input_section;
+      reloc_data.howto = howto;
+      reloc_data.reloc_offset = rel->r_offset;
+      reloc_data.reloc_addend = rel->r_addend;
+
+      /* This is a final link.  */
+      h = NULL;
+      sym = NULL;
+      sec = NULL;
+
+      if (r_symndx < symtab_hdr->sh_info) /* A local symbol.  */
+	{
+	  sym = local_syms + r_symndx;
+	  sec = local_sections[r_symndx];
+	}
+      else
+	{
+	  /* TODO: This code is repeated from below.  We should
+	     clean it and remove duplications.
+	     Sec is used check for discarded sections.
+	     Need to redesign code below.  */
+
+	  /* Get the symbol's entry in the symtab.  */
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+	  /* If we have encountered a definition for this symbol.  */
+	  if (h->root.type == bfd_link_hash_defined
+	      || h->root.type == bfd_link_hash_defweak)
+	    {
+	      reloc_data.sym_value = h->root.u.def.value;
+	      sec = h->root.u.def.section;
+	    }
+	}
+
+      /* Clean relocs for symbols in discarded sections.  */
+      if (sec != NULL && discarded_section (sec))
+	{
+	  _bfd_clear_contents (howto, input_bfd, input_section,
+			       contents + rel->r_offset);
+	  rel->r_offset = rel->r_offset;
+	  rel->r_info = 0;
+	  rel->r_addend = 0;
+
+	  /* For ld -r, remove relocations in debug sections against
+	     sections defined in discarded sections.  Not done for
+	     eh_frame editing code expects to be present.  */
+	   if (bfd_link_relocatable (info)
+	       && (input_section->flags & SEC_DEBUGGING))
+	     wrel--;
+
+	  continue;
+	}
+
+      if (bfd_link_relocatable (info))
+	{
+	  if (wrel != rel)
+	    *wrel = *rel;
+	  continue;
+	}
+
+      if (r_symndx < symtab_hdr->sh_info) /* A local symbol.  */
+	{
+	  reloc_data.sym_value = sym->st_value;
+	  reloc_data.sym_section = sec;
+	  reloc_data.symbol_name =
+	    bfd_elf_string_from_elf_section (input_bfd,
+					     symtab_hdr->sh_link,
+					     sym->st_name);
+
+	  /* Mergeable section handling.  */
+	  if ((sec->flags & SEC_MERGE)
+	      && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+	    {
+	      asection *msec;
+	      msec = sec;
+	      rel->r_addend = _bfd_elf_rel_local_sym (output_bfd, sym,
+						      &msec, rel->r_addend);
+	      rel->r_addend -= (sec->output_section->vma
+				+ sec->output_offset
+				+ sym->st_value);
+	      rel->r_addend += msec->output_section->vma + msec->output_offset;
+
+	      reloc_data.reloc_addend = rel->r_addend;
+	    }
+
+	  BFD_ASSERT (htab->sgot != NULL || !is_reloc_for_GOT (howto));
+	  if (htab->sgot != NULL)
+	    reloc_data.got_symbol_vma = htab->sgot->output_section->vma
+					+ htab->sgot->output_offset;
+
+	  reloc_data.should_relocate = TRUE;
+	}
+      else /* Global symbol.  */
+	{
+	  /* FIXME: We should use the RELOC_FOR_GLOBAL_SYMBOL macro
+	     (defined in elf-bfd.h) here.  */
+
+	  /* Get the symbol's entry in the symtab.  */
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+	  /* TODO: Need to validate what was the intention.  */
+	  /* BFD_ASSERT ((h->dynindx == -1) || (h->forced_local != 0)); */
+	  reloc_data.symbol_name = h->root.root.string;
+
+	  /* If we have encountered a definition for this symbol.  */
+	  if (h->root.type == bfd_link_hash_defined
+	      || h->root.type == bfd_link_hash_defweak)
+	    {
+	      reloc_data.sym_value = h->root.u.def.value;
+	      reloc_data.sym_section = h->root.u.def.section;
+
+	      reloc_data.should_relocate = TRUE;
+
+	      if (is_reloc_for_GOT (howto) && !bfd_link_pic (info))
+		{
+		  /* TODO: Change it to use arc_do_relocation with
+		    ARC_32 reloc.  Try to use ADD_RELA macro.  */
+		  bfd_vma relocation =
+		    reloc_data.sym_value + reloc_data.reloc_addend
+		    + (reloc_data.sym_section->output_section != NULL ?
+			(reloc_data.sym_section->output_offset
+			 + reloc_data.sym_section->output_section->vma)
+		      : 0);
+
+		  BFD_ASSERT (h->got.glist);
+		  bfd_vma got_offset = h->got.glist->offset;
+		  bfd_put_32 (output_bfd, relocation,
+			      htab->sgot->contents + got_offset);
+		}
+	      if (is_reloc_for_PLT (howto) && h->plt.offset != (bfd_vma) -1)
+		{
+		  /* TODO: This is repeated up here.  */
+		  reloc_data.sym_value = h->plt.offset;
+		  reloc_data.sym_section = htab->splt;
+		}
+	    }
+	  else if (h->root.type == bfd_link_hash_undefweak)
+	    {
+	      /* Is weak symbol and has no definition.  */
+	      if (is_reloc_for_GOT (howto))
+		{
+		  reloc_data.sym_value = h->root.u.def.value;
+		  reloc_data.sym_section = htab->sgot;
+		  reloc_data.should_relocate = TRUE;
+		}
+	      else if (is_reloc_for_PLT (howto)
+		       && h->plt.offset != (bfd_vma) -1)
+		{
+		  /* TODO: This is repeated up here.  */
+		  reloc_data.sym_value = h->plt.offset;
+		  reloc_data.sym_section = htab->splt;
+		  reloc_data.should_relocate = TRUE;
+		}
+	      else
+		continue;
+	    }
+	  else
+	    {
+	      if (is_reloc_for_GOT (howto))
+		{
+		  reloc_data.sym_value = h->root.u.def.value;
+		  reloc_data.sym_section = htab->sgot;
+
+		  reloc_data.should_relocate = TRUE;
+		}
+	      else if (is_reloc_for_PLT (howto))
+		{
+		  /* Fail if it is linking for PIE and the symbol is
+		     undefined.  */
+		  if (bfd_link_executable (info))
+		    (*info->callbacks->undefined_symbol)
+		      (info, h->root.root.string, input_bfd, input_section,
+		       rel->r_offset, TRUE);
+		  reloc_data.sym_value = h->plt.offset;
+		  reloc_data.sym_section = htab->splt;
+
+		  reloc_data.should_relocate = TRUE;
+		}
+	      else if (!bfd_link_pic (info) || bfd_link_executable (info))
+		(*info->callbacks->undefined_symbol)
+		  (info, h->root.root.string, input_bfd, input_section,
+		   rel->r_offset, TRUE);
+	    }
+
+	  BFD_ASSERT (htab->sgot != NULL || !is_reloc_for_GOT (howto));
+	  if (htab->sgot != NULL)
+	    reloc_data.got_symbol_vma = htab->sgot->output_section->vma
+					+ htab->sgot->output_offset;
+	}
+
+      if ((is_reloc_for_GOT (howto)
+	   || is_reloc_for_TLS (howto)))
+	{
+	  reloc_data.should_relocate = TRUE;
+
+	  struct got_entry **list
+	    = get_got_entry_list_for_symbol (output_bfd, r_symndx, h);
+
+	  reloc_data.got_offset_value
+	    = relocate_fix_got_relocs_for_got_info (list,
+						    tls_type_for_reloc (howto),
+						    info,
+						    output_bfd,
+						    r_symndx,
+						    local_syms,
+						    local_sections,
+						    h,
+						    &reloc_data);
+
+	  if (h == NULL)
+	    {
+	      create_got_dynrelocs_for_single_entry (
+		  got_entry_for_type (list,
+		      		arc_got_entry_type_for_reloc (howto)),
+		  output_bfd, info, NULL);
+	    }
+	}
+
+      switch (r_type)
+	{
+	  case R_ARC_32:
+	  case R_ARC_32_ME:
+	  case R_ARC_PC32:
+	  case R_ARC_32_PCREL:
+	    if ((bfd_link_pic (info))
+		&& ((r_type != R_ARC_PC32 && r_type != R_ARC_32_PCREL)
+		    || (h != NULL
+			&& h->dynindx != -1
+			&& (!info->symbolic || !h->def_regular))))
+	      {
+		Elf_Internal_Rela outrel;
+		bfd_byte *loc;
+		bfd_boolean skip = FALSE;
+		bfd_boolean relocate = FALSE;
+		asection *sreloc = _bfd_elf_get_dynamic_reloc_section
+				 (input_bfd, input_section,
+				  /*RELA*/ TRUE);
+
+		BFD_ASSERT (sreloc != NULL);
+
+		outrel.r_offset = _bfd_elf_section_offset (output_bfd,
+							   info,
+							   input_section,
+							   rel->r_offset);
+		if (outrel.r_offset == (bfd_vma) -1)
+		  skip = TRUE;
+
+		outrel.r_addend = rel->r_addend;
+		outrel.r_offset += (input_section->output_section->vma
+				    + input_section->output_offset);
+
+#define IS_ARC_PCREL_TYPE(TYPE) \
+  (   (TYPE == R_ARC_PC32)      \
+   || (TYPE == R_ARC_32_PCREL))
+
+		if (skip)
+		  {
+		    memset (&outrel, 0, sizeof outrel);
+		    relocate = FALSE;
+		  }
+		else if (h != NULL
+			 && h->dynindx != -1
+			 && ((IS_ARC_PCREL_TYPE (r_type))
+			 || !(bfd_link_executable (info)
+			      || SYMBOLIC_BIND (info, h))
+			 || ! h->def_regular))
+		  {
+		    BFD_ASSERT (h != NULL);
+		    if ((input_section->flags & SEC_ALLOC) != 0)
+		      relocate = FALSE;
+		    else
+		      relocate = TRUE;
+
+		    BFD_ASSERT (h->dynindx != -1);
+		    outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+		  }
+		else
+		  {
+		    /* Handle local symbols, they either do not have a
+		       global hash table entry (h == NULL), or are
+		       forced local due to a version script
+		       (h->forced_local), or the third condition is
+		       legacy, it appears to say something like, for
+		       links where we are pre-binding the symbols, or
+		       there's not an entry for this symbol in the
+		       dynamic symbol table, and it's a regular symbol
+		       not defined in a shared object, then treat the
+		       symbol as local, resolve it now.  */
+		    relocate = TRUE;
+		    /* outrel.r_addend = 0; */
+		    outrel.r_info = ELF32_R_INFO (0, R_ARC_RELATIVE);
+		  }
+
+		BFD_ASSERT (sreloc->contents != 0);
+
+		loc = sreloc->contents;
+		loc += sreloc->reloc_count * sizeof (Elf32_External_Rela);
+		sreloc->reloc_count += 1;
+
+		bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+
+		if (relocate == FALSE)
+		  continue;
+	      }
+	    break;
+	  default:
+	    break;
+	}
+
+      if (is_reloc_SDA_relative (howto)
+	  && (reloc_data.sdata_begin_symbol_vma_set == FALSE))
+	{
+	  _bfd_error_handler
+	    ("Error: Linker symbol __SDATA_BEGIN__ not found");
+	  bfd_set_error (bfd_error_bad_value);
+	  return FALSE;
+	}
+
+      DEBUG_ARC_RELOC (reloc_data);
+
+      /* Make sure we have with a dynamic linker.  In case of GOT and PLT
+	 the sym_section should point to .got or .plt respectively.  */
+      if ((is_reloc_for_GOT (howto) || is_reloc_for_PLT (howto))
+	  && reloc_data.sym_section == NULL)
+	{
+	  _bfd_error_handler
+	    (_("GOT and PLT relocations cannot be fixed with a non dynamic linker."));
+	  bfd_set_error (bfd_error_bad_value);
+	  return FALSE;
+	}
+
+      msg = NULL;
+      switch (arc_do_relocation (contents, reloc_data, info))
+	{
+	case bfd_reloc_ok:
+	  continue; /* The reloc processing loop.  */
+
+	case bfd_reloc_overflow:
+	  (*info->callbacks->reloc_overflow)
+	    (info, (h ? &h->root : NULL), reloc_data.symbol_name, howto->name, (bfd_vma) 0,
+	     input_bfd, input_section, rel->r_offset);
+	  break;
+
+	case bfd_reloc_undefined:
+	  (*info->callbacks->undefined_symbol)
+	    (info, reloc_data.symbol_name, input_bfd, input_section, rel->r_offset, TRUE);
+	  break;
+
+	case bfd_reloc_other:
+	  /* xgettext:c-format */
+	  msg = _("%B(%A): warning: unaligned access to symbol '%s' in the small data area");
+	  break;
+
+	case bfd_reloc_outofrange:
+	  /* xgettext:c-format */
+	  msg = _("%B(%A): internal error: out of range error");
+	  break;
+
+	case bfd_reloc_notsupported:
+	  /* xgettext:c-format */
+	  msg = _("%B(%A): internal error: unsupported relocation error");
+	  break;
+
+	case bfd_reloc_dangerous:
+	  /* xgettext:c-format */
+	  msg = _("%B(%A): internal error: dangerous relocation");
+	  break;
+
+	default:
+	  /* xgettext:c-format */
+	  msg = _("%B(%A): internal error: unknown error");
+	  break;
+	}
+
+      if (msg)
+	_bfd_error_handler (msg, input_bfd, input_section, reloc_data.symbol_name);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+#define elf_arc_hash_table(p) \
+    (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
+  == ARC_ELF_DATA ? ((struct elf_arc_link_hash_table *) ((p)->hash)) : NULL)
+
+static bfd_boolean
+elf_arc_check_relocs (bfd *			 abfd,
+		      struct bfd_link_info *     info,
+		      asection *		 sec,
+		      const Elf_Internal_Rela *  relocs)
+{
+  Elf_Internal_Shdr *		symtab_hdr;
+  struct elf_link_hash_entry **	sym_hashes;
+  const Elf_Internal_Rela *	rel;
+  const Elf_Internal_Rela *	rel_end;
+  bfd *				dynobj;
+  asection *			sreloc = NULL;
+
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  dynobj = (elf_hash_table (info))->dynobj;
+  symtab_hdr = &((elf_tdata (abfd))->symtab_hdr);
+  sym_hashes = elf_sym_hashes (abfd);
+
+  rel_end = relocs + sec->reloc_count;
+  for (rel = relocs; rel < rel_end; rel++)
+    {
+      enum elf_arc_reloc_type r_type;
+      reloc_howto_type *howto;
+      unsigned long   r_symndx;
+      struct elf_link_hash_entry *h;
+
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      if (r_type >= (int) R_ARC_max)
+	{
+	  bfd_set_error (bfd_error_bad_value);
+	  return FALSE;
+	}
+      howto = arc_elf_howto (r_type);
+
+      if (dynobj == NULL
+	  && (is_reloc_for_GOT (howto) == TRUE
+	      || is_reloc_for_TLS (howto) == TRUE))
+	{
+	  dynobj = elf_hash_table (info)->dynobj = abfd;
+	  if (! _bfd_elf_create_got_section (abfd, info))
+	    return FALSE;
+	}
+
+      /* Load symbol information.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      if (r_symndx < symtab_hdr->sh_info) /* Is a local symbol.  */
+	h = NULL;
+      else /* Global one.  */
+	h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+      switch (r_type)
+	{
+	  case R_ARC_32:
+	  case R_ARC_32_ME:
+	    /* During shared library creation, these relocs should not
+	       appear in a shared library (as memory will be read only
+	       and the dynamic linker can not resolve these.  However
+	       the error should not occur for e.g. debugging or
+	       non-readonly sections.  */
+	    if ((bfd_link_dll (info) && !bfd_link_pie (info))
+		&& (sec->flags & SEC_ALLOC) != 0
+		&& (sec->flags & SEC_READONLY) != 0
+		&& ((sec->flags & SEC_CODE) != 0
+		    || (sec->flags & SEC_DEBUGGING) != 0))
+	      {
+		const char *name;
+		if (h)
+		  name = h->root.root.string;
+		else
+		  /* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);  */
+		  name = "UNKNOWN";
+		_bfd_error_handler
+		  /* xgettext:c-format */
+		  (_("\
+%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+		    abfd,
+		    arc_elf_howto (r_type)->name,
+		    name);
+		bfd_set_error (bfd_error_bad_value);
+		return FALSE;
+	      }
+
+	    /* In some cases we are not setting the 'non_got_ref'
+	       flag, even though the relocations don't require a GOT
+	       access.  We should extend the testing in this area to
+	       ensure that no significant cases are being missed.  */
+	    if (h)
+	      h->non_got_ref = 1;
+	    /* FALLTHROUGH */
+	  case R_ARC_PC32:
+	  case R_ARC_32_PCREL:
+	    if ((bfd_link_pic (info))
+		&& ((r_type != R_ARC_PC32 && r_type != R_ARC_32_PCREL)
+		    || (h != NULL
+			&& (!info->symbolic || !h->def_regular))))
+	      {
+		if (sreloc == NULL)
+		  {
+		    sreloc = _bfd_elf_make_dynamic_reloc_section (sec, dynobj,
+								  2, abfd,
+								  /*rela*/
+								  TRUE);
+
+		    if (sreloc == NULL)
+		      return FALSE;
+		  }
+		sreloc->size += sizeof (Elf32_External_Rela);
+
+	      }
+	  default:
+	    break;
+	}
+
+      if (is_reloc_for_PLT (howto) == TRUE)
+	{
+	  if (h == NULL)
+	    continue;
+	  else
+	    h->needs_plt = 1;
+	}
+
+      /* Add info to the symbol got_entry_list.  */
+      if (is_reloc_for_GOT (howto) == TRUE
+	  || is_reloc_for_TLS (howto) == TRUE)
+	{
+	  arc_fill_got_info_for_reloc (
+		  arc_got_entry_type_for_reloc (howto),
+		  get_got_entry_list_for_symbol (abfd, r_symndx, h),
+		  info,
+		  h);
+	}
+    }
+
+  return TRUE;
+}
+
+#define ELF_DYNAMIC_INTERPRETER  "/sbin/ld-uClibc.so"
+
+static struct plt_version_t *
+arc_get_plt_version (struct bfd_link_info *info)
+{
+  int i;
+
+  for (i = 0; i < 1; i++)
+    {
+      ARC_DEBUG ("%d: size1 = %d, size2 = %d\n", i,
+		 (int) plt_versions[i].entry_size,
+		 (int) plt_versions[i].elem_size);
+    }
+
+  if (bfd_get_mach (info->output_bfd) == bfd_mach_arc_arcv2)
+    {
+      if (bfd_link_pic (info))
+	return &(plt_versions[ELF_ARCV2_PIC]);
+      else
+	return &(plt_versions[ELF_ARCV2_ABS]);
+    }
+  else
+    {
+      if (bfd_link_pic (info))
+	return &(plt_versions[ELF_ARC_PIC]);
+      else
+	return &(plt_versions[ELF_ARC_ABS]);
+    }
+}
+
+static bfd_vma
+add_symbol_to_plt (struct bfd_link_info *info)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+  bfd_vma ret;
+
+  struct plt_version_t *plt_data = arc_get_plt_version (info);
+
+  /* If this is the first .plt entry, make room for the special first
+     entry.  */
+  if (htab->splt->size == 0)
+    htab->splt->size += plt_data->entry_size;
+
+  ret = htab->splt->size;
+
+  htab->splt->size += plt_data->elem_size;
+  ARC_DEBUG ("PLT_SIZE = %d\n", (int) htab->splt->size);
+
+  htab->sgotplt->size += 4;
+  htab->srelplt->size += sizeof (Elf32_External_Rela);
+
+  return ret;
+}
+
+#define PLT_DO_RELOCS_FOR_ENTRY(ABFD, DS, RELOCS)	\
+  plt_do_relocs_for_symbol (ABFD, DS, RELOCS, 0, 0)
+
+static void
+plt_do_relocs_for_symbol (bfd *abfd,
+			  struct elf_link_hash_table *htab,
+			  const struct plt_reloc *reloc,
+			  bfd_vma plt_offset,
+			  bfd_vma symbol_got_offset)
+{
+  while (SYM_ONLY (reloc->symbol) != LAST_RELOC)
+    {
+      bfd_vma relocation = 0;
+
+      switch (SYM_ONLY (reloc->symbol))
+	{
+	  case SGOT:
+		relocation
+		  = htab->sgotplt->output_section->vma
+		    + htab->sgotplt->output_offset + symbol_got_offset;
+		break;
+	}
+      relocation += reloc->addend;
+
+      if (IS_RELATIVE (reloc->symbol))
+	{
+	  bfd_vma reloc_offset = reloc->offset;
+	  reloc_offset -= (IS_INSN_32 (reloc->symbol)) ? 4 : 0;
+	  reloc_offset -= (IS_INSN_24 (reloc->symbol)) ? 2 : 0;
+
+	  relocation -= htab->splt->output_section->vma
+			 + htab->splt->output_offset
+			 + plt_offset + reloc_offset;
+	}
+
+      /* TODO: being ME is not a property of the relocation but of the
+	 section of which is applying the relocation. */
+      if (IS_MIDDLE_ENDIAN (reloc->symbol) && !bfd_big_endian (abfd))
+	{
+	  relocation
+	    = ((relocation & 0xffff0000) >> 16)
+	      | ((relocation & 0xffff) << 16);
+	}
+
+      switch (reloc->size)
+	{
+	  case 32:
+	    bfd_put_32 (htab->splt->output_section->owner,
+			relocation,
+			htab->splt->contents + plt_offset + reloc->offset);
+	    break;
+	}
+
+      reloc = &(reloc[1]); /* Jump to next relocation.  */
+    }
+}
+
+static void
+relocate_plt_for_symbol (bfd *output_bfd,
+			 struct bfd_link_info *info,
+			 struct elf_link_hash_entry *h)
+{
+  struct plt_version_t *plt_data = arc_get_plt_version (info);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  bfd_vma plt_index = (h->plt.offset  - plt_data->entry_size)
+		      / plt_data->elem_size;
+  bfd_vma got_offset = (plt_index + 3) * 4;
+
+  ARC_DEBUG ("arc_info: PLT_OFFSET = %#lx, PLT_ENTRY_VMA = %#lx, \
+GOT_ENTRY_OFFSET = %#lx, GOT_ENTRY_VMA = %#lx, for symbol %s\n",
+	     (long) h->plt.offset,
+	     (long) (htab->splt->output_section->vma
+		     + htab->splt->output_offset
+		     + h->plt.offset),
+	     (long) got_offset,
+	     (long) (htab->sgotplt->output_section->vma
+		     + htab->sgotplt->output_offset
+		     + got_offset),
+	     h->root.root.string);
+
+  {
+    bfd_vma i = 0;
+    uint16_t *ptr = (uint16_t *) plt_data->elem;
+
+    for (i = 0; i < plt_data->elem_size/2; i++)
+      {
+	uint16_t data = ptr[i];
+	bfd_put_16 (output_bfd,
+		    (bfd_vma) data,
+		    htab->splt->contents + h->plt.offset + (i*2));
+      }
+  }
+
+  plt_do_relocs_for_symbol (output_bfd, htab,
+			    plt_data->elem_relocs,
+			    h->plt.offset,
+			    got_offset);
+
+  /* Fill in the entry in the global offset table.  */
+  bfd_put_32 (output_bfd,
+	      (bfd_vma) (htab->splt->output_section->vma
+			 + htab->splt->output_offset),
+	      htab->sgotplt->contents + got_offset);
+
+  /* TODO: Fill in the entry in the .rela.plt section.  */
+  {
+    Elf_Internal_Rela rel;
+    bfd_byte *loc;
+
+    rel.r_offset = (htab->sgotplt->output_section->vma
+		    + htab->sgotplt->output_offset
+		    + got_offset);
+    rel.r_addend = 0;
+
+    BFD_ASSERT (h->dynindx != -1);
+    rel.r_info = ELF32_R_INFO (h->dynindx, R_ARC_JMP_SLOT);
+
+    loc = htab->srelplt->contents;
+    loc += plt_index * sizeof (Elf32_External_Rela); /* relA */
+    bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+  }
+}
+
+static void
+relocate_plt_for_entry (bfd *abfd,
+			struct bfd_link_info *info)
+{
+  struct plt_version_t *plt_data = arc_get_plt_version (info);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  {
+    bfd_vma i = 0;
+    uint16_t *ptr = (uint16_t *) plt_data->entry;
+    for (i = 0; i < plt_data->entry_size/2; i++)
+      {
+	uint16_t data = ptr[i];
+	bfd_put_16 (abfd,
+		    (bfd_vma) data,
+		    htab->splt->contents + (i*2));
+      }
+  }
+  PLT_DO_RELOCS_FOR_ENTRY (abfd, htab, plt_data->entry_relocs);
+}
+
+/* Desc : Adjust a symbol defined by a dynamic object and referenced
+   by a regular object.  The current definition is in some section of
+   the dynamic object, but we're not including those sections.  We
+   have to change the definition to something the rest of the link can
+   understand.  */
+
+static bfd_boolean
+elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info,
+			      struct elf_link_hash_entry *h)
+{
+  asection *s;
+  bfd *dynobj = (elf_hash_table (info))->dynobj;
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  if (h->type == STT_FUNC
+      || h->type == STT_GNU_IFUNC
+      || h->needs_plt == 1)
+    {
+      if (!bfd_link_pic (info) && !h->def_dynamic && !h->ref_dynamic)
+	{
+	  /* This case can occur if we saw a PLT32 reloc in an input
+	     file, but the symbol was never referred to by a dynamic
+	     object.  In such a case, we don't actually need to build
+	     a procedure linkage table, and we can just do a PC32
+	     reloc instead.  */
+	  BFD_ASSERT (h->needs_plt);
+	  return TRUE;
+	}
+
+      /* Make sure this symbol is output as a dynamic symbol.  */
+      if (h->dynindx == -1 && !h->forced_local
+	  && !bfd_elf_link_record_dynamic_symbol (info, h))
+	return FALSE;
+
+      if (bfd_link_pic (info)
+	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
+	{
+	  bfd_vma loc = add_symbol_to_plt (info);
+
+	  if (bfd_link_executable (info) && !h->def_regular)
+	    {
+	      h->root.u.def.section = htab->splt;
+	      h->root.u.def.value = loc;
+	    }
+	  h->plt.offset = loc;
+	}
+      else
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+      return TRUE;
+    }
+
+  /* If this is a weak symbol, and there is a real definition, the
+     processor independent code will have arranged for us to see the
+     real definition first, and we can just use the same value.  */
+  if (h->u.weakdef != NULL)
+    {
+      BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
+		  || h->u.weakdef->root.type == bfd_link_hash_defweak);
+      h->root.u.def.section = h->u.weakdef->root.u.def.section;
+      h->root.u.def.value = h->u.weakdef->root.u.def.value;
+      return TRUE;
+    }
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
+  /* If we are creating a shared library, we must presume that the
+     only references to the symbol are via the global offset table.
+     For such cases we need not do anything here; the relocations will
+     be handled correctly by relocate_section.  */
+  if (!bfd_link_executable (info))
+    return TRUE;
+
+  /* If there are no non-GOT references, we do not need a copy
+     relocation.  */
+  if (!h->non_got_ref)
+    return TRUE;
+
+  /* If -z nocopyreloc was given, we won't generate them either.  */
+  if (info->nocopyreloc)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  /* We must allocate the symbol in our .dynbss section, which will
+     become part of the .bss section of the executable.  There will be
+     an entry for this symbol in the .dynsym section.  The dynamic
+     object will contain position independent code, so all references
+     from the dynamic object to this symbol will go through the global
+     offset table.  The dynamic linker will use the .dynsym entry to
+     determine the address it must put in the global offset table, so
+     both the dynamic object and the regular object will refer to the
+     same memory location for the variable.  */
+
+  if (htab == NULL)
+    return FALSE;
+
+  /* We must generate a R_ARC_COPY reloc to tell the dynamic linker to
+     copy the initial value out of the dynamic object and into the
+     runtime process image.  We need to remember the offset into the
+     .rela.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+    {
+      struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
+
+      BFD_ASSERT (arc_htab->elf.srelbss != NULL);
+      arc_htab->elf.srelbss->size += sizeof (Elf32_External_Rela);
+      h->needs_copy = 1;
+    }
+
+  /* TODO: Move this also to arc_hash_table.  */
+  s = bfd_get_section_by_name (dynobj, ".dynbss");
+  BFD_ASSERT (s != NULL);
+
+  return _bfd_elf_adjust_dynamic_copy (info, h, s);
+}
+
+/* Function :  elf_arc_finish_dynamic_symbol
+   Brief    :  Finish up dynamic symbol handling.  We set the
+	     contents of various dynamic sections here.
+   Args     :  output_bfd :
+	       info	  :
+	       h	  :
+	       sym	  :
+   Returns  : True/False as the return status.  */
+
+static bfd_boolean
+elf_arc_finish_dynamic_symbol (bfd * output_bfd,
+			       struct bfd_link_info *info,
+			       struct elf_link_hash_entry *h,
+			       Elf_Internal_Sym * sym)
+{
+  if (h->plt.offset != (bfd_vma) -1)
+    {
+      relocate_plt_for_symbol (output_bfd, info, h);
+
+      if (!h->def_regular)
+	{
+	  /* Mark the symbol as undefined, rather than as defined in
+	     the .plt section.  Leave the value alone.  */
+	  sym->st_shndx = SHN_UNDEF;
+	}
+    }
+
+
+  /* This function traverses list of GOT entries and
+     create respective dynamic relocs.  */
+  /* TODO: Make function to get list and not access the list directly.  */
+  /* TODO: Move function to relocate_section create this relocs eagerly.  */
+  create_got_dynrelocs_for_got_info (&h->got.glist,
+				     output_bfd,
+				     info,
+				     h);
+
+  if (h->needs_copy)
+    {
+      struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
+
+      if (h->dynindx == -1
+	  || (h->root.type != bfd_link_hash_defined
+	      && h->root.type != bfd_link_hash_defweak)
+	  || arc_htab->elf.srelbss == NULL)
+	abort ();
+
+      bfd_vma rel_offset = (h->root.u.def.value
+			    + h->root.u.def.section->output_section->vma
+			    + h->root.u.def.section->output_offset);
+
+      bfd_byte * loc = arc_htab->elf.srelbss->contents
+	+ (arc_htab->elf.srelbss->reloc_count * sizeof (Elf32_External_Rela));
+      arc_htab->elf.srelbss->reloc_count++;
+
+      Elf_Internal_Rela rel;
+      rel.r_addend = 0;
+      rel.r_offset = rel_offset;
+
+      BFD_ASSERT (h->dynindx != -1);
+      rel.r_info = ELF32_R_INFO (h->dynindx, R_ARC_COPY);
+
+      bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+    }
+
+  /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
+  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+      || strcmp (h->root.root.string, "__DYNAMIC") == 0
+      || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+    sym->st_shndx = SHN_ABS;
+
+  return TRUE;
+}
+
+#define GET_SYMBOL_OR_SECTION(TAG, SYMBOL, SECTION)		\
+  case TAG:							\
+  if (SYMBOL != NULL)						\
+    h = elf_link_hash_lookup (elf_hash_table (info),		\
+			      SYMBOL, FALSE, FALSE, TRUE);	\
+  else if (SECTION != NULL)					\
+    s = bfd_get_linker_section (dynobj, SECTION);		\
+  break;
+
+/* Function :  elf_arc_finish_dynamic_sections
+   Brief    :  Finish up the dynamic sections handling.
+   Args     :  output_bfd :
+	       info	  :
+	       h	  :
+	       sym	  :
+   Returns  : True/False as the return status.  */
+
+static bfd_boolean
+elf_arc_finish_dynamic_sections (bfd * output_bfd,
+				 struct bfd_link_info *info)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+  bfd *dynobj = (elf_hash_table (info))->dynobj;
+  asection *sdyn = bfd_get_linker_section (dynobj, ".dynamic");
+
+  if (sdyn)
+    {
+      Elf32_External_Dyn *dyncon, *dynconend;
+
+      dyncon = (Elf32_External_Dyn *) sdyn->contents;
+      dynconend
+	= (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+      for (; dyncon < dynconend; dyncon++)
+	{
+	  Elf_Internal_Dyn internal_dyn;
+	  bfd_boolean	  do_it = FALSE;
+
+	  struct elf_link_hash_entry *h = NULL;
+	  asection	 *s = NULL;
+
+	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &internal_dyn);
+
+	  switch (internal_dyn.d_tag)
+	    {
+	      GET_SYMBOL_OR_SECTION (DT_INIT, info->init_function, NULL)
+	      GET_SYMBOL_OR_SECTION (DT_FINI, info->fini_function, NULL)
+	      GET_SYMBOL_OR_SECTION (DT_PLTGOT, NULL, ".plt")
+	      GET_SYMBOL_OR_SECTION (DT_JMPREL, NULL, ".rela.plt")
+	      GET_SYMBOL_OR_SECTION (DT_PLTRELSZ, NULL, ".rela.plt")
+	      GET_SYMBOL_OR_SECTION (DT_VERSYM, NULL, ".gnu.version")
+	      GET_SYMBOL_OR_SECTION (DT_VERDEF, NULL, ".gnu.version_d")
+	      GET_SYMBOL_OR_SECTION (DT_VERNEED, NULL, ".gnu.version_r")
+	      default:
+		break;
+	    }
+
+	  /* In case the dynamic symbols should be updated with a symbol.  */
+	  if (h != NULL
+	      && (h->root.type == bfd_link_hash_defined
+		  || h->root.type == bfd_link_hash_defweak))
+	    {
+	      asection	     *asec_ptr;
+
+	      internal_dyn.d_un.d_val = h->root.u.def.value;
+	      asec_ptr = h->root.u.def.section;
+	      if (asec_ptr->output_section != NULL)
+		{
+		  internal_dyn.d_un.d_val +=
+		    (asec_ptr->output_section->vma
+		     + asec_ptr->output_offset);
+		}
+	      else
+		{
+		  /* The symbol is imported from another shared
+		     library and does not apply to this one.  */
+		  internal_dyn.d_un.d_val = 0;
+		}
+	      do_it = TRUE;
+	    }
+	  else if (s != NULL) /* With a section information.  */
+	    {
+	      switch (internal_dyn.d_tag)
+		{
+		  case DT_PLTGOT:
+		  case DT_JMPREL:
+		  case DT_VERSYM:
+		  case DT_VERDEF:
+		  case DT_VERNEED:
+		    internal_dyn.d_un.d_ptr = (s->output_section->vma
+					       + s->output_offset);
+		    do_it = TRUE;
+		    break;
+
+		  case DT_PLTRELSZ:
+		    internal_dyn.d_un.d_val = s->size;
+		    do_it = TRUE;
+		    break;
+
+		  default:
+		    break;
+		}
+	    }
+
+	  if (do_it)
+	    bfd_elf32_swap_dyn_out (output_bfd, &internal_dyn, dyncon);
+	}
+
+      if (htab->splt->size > 0)
+	{
+	  relocate_plt_for_entry (output_bfd, info);
+	}
+
+      /* TODO: Validate this.  */
+      if (htab->srelplt->output_section != bfd_abs_section_ptr)
+	elf_section_data (htab->srelplt->output_section)
+	  ->this_hdr.sh_entsize = 12;
+    }
+
+  /* Fill in the first three entries in the global offset table.  */
+  if (htab->sgot)
+    {
+      struct elf_link_hash_entry *h;
+      h = elf_link_hash_lookup (elf_hash_table (info), "_GLOBAL_OFFSET_TABLE_",
+				 FALSE, FALSE, TRUE);
+
+	if (h != NULL && h->root.type != bfd_link_hash_undefined
+	    && h->root.u.def.section != NULL)
+	{
+	  asection *sec = h->root.u.def.section;
+
+	  if (sdyn == NULL)
+	    bfd_put_32 (output_bfd, (bfd_vma) 0,
+			sec->contents);
+	  else
+	    bfd_put_32 (output_bfd,
+			sdyn->output_section->vma + sdyn->output_offset,
+			sec->contents);
+	  bfd_put_32 (output_bfd, (bfd_vma) 0, sec->contents + 4);
+	  bfd_put_32 (output_bfd, (bfd_vma) 0, sec->contents + 8);
+	}
+    }
+
+  return TRUE;
+}
+
+#define ADD_DYNAMIC_SYMBOL(NAME, TAG)					\
+  h =  elf_link_hash_lookup (elf_hash_table (info),			\
+			     NAME, FALSE, FALSE, FALSE);		\
+  if ((h != NULL && (h->ref_regular || h->def_regular)))		\
+    if (! _bfd_elf_add_dynamic_entry (info, TAG, 0))			\
+      return FALSE;
+
+/* Set the sizes of the dynamic sections.  */
+static bfd_boolean
+elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+			       struct bfd_link_info *info)
+{
+  bfd *dynobj;
+  asection *s;
+  bfd_boolean relocs_exist = FALSE;
+  bfd_boolean reltext_exist = FALSE;
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  dynobj = htab->dynobj;
+  BFD_ASSERT (dynobj != NULL);
+
+  if (htab->dynamic_sections_created)
+    {
+      struct elf_link_hash_entry *h;
+
+      /* Set the contents of the .interp section to the
+	 interpreter.  */
+      if (bfd_link_executable (info) && !info->nointerp)
+	{
+	  s = bfd_get_section_by_name (dynobj, ".interp");
+	  BFD_ASSERT (s != NULL);
+	  s->size = sizeof (ELF_DYNAMIC_INTERPRETER);
+	  s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+	}
+
+      /* Add some entries to the .dynamic section.  We fill in some of
+	 the values later, in elf_bfd_final_link, but we must add the
+	 entries now so that we know the final size of the .dynamic
+	 section.  Checking if the .init section is present.  We also
+	 create DT_INIT and DT_FINI entries if the init_str has been
+	 changed by the user.  */
+      ADD_DYNAMIC_SYMBOL (info->init_function, DT_INIT);
+      ADD_DYNAMIC_SYMBOL (info->fini_function, DT_FINI);
+    }
+  else
+    {
+      /* We may have created entries in the .rela.got section.
+	 However, if we are not creating the dynamic sections, we will
+	 not actually use these entries.  Reset the size of .rela.got,
+	 which will cause it to get stripped from the output file
+	 below.  */
+      if (htab->srelgot != NULL)
+	htab->srelgot->size = 0;
+    }
+
+  for (s = dynobj->sections; s != NULL; s = s->next)
+    {
+      if ((s->flags & SEC_LINKER_CREATED) == 0)
+	continue;
+
+      if (s == htab->splt
+	  || s == htab->sgot
+	  || s == htab->sgotplt
+	  || s == htab->sdynbss)
+	{
+	  /* Strip this section if we don't need it.  */
+	}
+      else if (strncmp (s->name, ".rela", 5) == 0)
+	{
+	  if (s->size != 0 && s != htab->srelplt)
+	    {
+	      if (!reltext_exist)
+		{
+		  const char *name = s->name + 5;
+		  bfd *ibfd;
+		  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
+		    if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour)
+		      {
+			asection *target = bfd_get_section_by_name (ibfd, name);
+			if (target != NULL
+			    && elf_section_data (target)->sreloc == s
+			    && ((target->output_section->flags
+				 & (SEC_READONLY | SEC_ALLOC))
+				== (SEC_READONLY | SEC_ALLOC)))
+			  {
+			    reltext_exist = TRUE;
+			    break;
+			  }
+		      }
+		}
+	      relocs_exist = TRUE;
+	    }
+
+	  /* We use the reloc_count field as a counter if we need to
+	     copy relocs into the output file.  */
+	  s->reloc_count = 0;
+	}
+      else
+	{
+	  /* It's not one of our sections, so don't allocate space.  */
+	  continue;
+	}
+
+      if (s->size == 0)
+	{
+	  s->flags |= SEC_EXCLUDE;
+	  continue;
+	}
+
+      if ((s->flags & SEC_HAS_CONTENTS) == 0)
+	continue;
+
+      /* Allocate memory for the section contents.  */
+      s->contents = bfd_zalloc (dynobj, s->size);
+      if (s->contents == NULL)
+	return FALSE;
+    }
+
+  if (htab->dynamic_sections_created)
+    {
+      /* TODO: Check if this is needed.  */
+      if (!bfd_link_pic (info))
+	if (!_bfd_elf_add_dynamic_entry (info, DT_DEBUG, 0))
+		return FALSE;
+
+      if (htab->splt && (htab->splt->flags & SEC_EXCLUDE) == 0)
+	if (!_bfd_elf_add_dynamic_entry (info, DT_PLTGOT, 0)
+	    || !_bfd_elf_add_dynamic_entry (info, DT_PLTRELSZ, 0)
+	    || !_bfd_elf_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
+	    || !_bfd_elf_add_dynamic_entry (info, DT_JMPREL, 0))
+	  return FALSE;
+
+      if (relocs_exist)
+	if (!_bfd_elf_add_dynamic_entry (info, DT_RELA, 0)
+	    || !_bfd_elf_add_dynamic_entry (info, DT_RELASZ, 0)
+	    || !_bfd_elf_add_dynamic_entry (info, DT_RELAENT,
+					    sizeof (Elf32_External_Rela)))
+	  return FALSE;
+
+      if (reltext_exist)
+	if (!_bfd_elf_add_dynamic_entry (info, DT_TEXTREL, 0))
+	  return FALSE;
+    }
+
+  return TRUE;
+}
+
+
+/* Classify dynamic relocs such that -z combreloc can reorder and combine
+   them.  */
+static enum elf_reloc_type_class
+elf32_arc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+			    const asection *rel_sec ATTRIBUTE_UNUSED,
+			    const Elf_Internal_Rela *rela)
+{
+  switch ((int) ELF32_R_TYPE (rela->r_info))
+    {
+    case R_ARC_RELATIVE:
+      return reloc_class_relative;
+    case R_ARC_JMP_SLOT:
+      return reloc_class_plt;
+    case R_ARC_COPY:
+      return reloc_class_copy;
+    /* TODO: Needed in future to support ifunc.  */
+    /*
+    case R_ARC_IRELATIVE:
+      return reloc_class_ifunc;
+    */
+    default:
+      return reloc_class_normal;
+    }
+}
+
+const struct elf_size_info arc_elf32_size_info =
+{
+  sizeof (Elf32_External_Ehdr),
+  sizeof (Elf32_External_Phdr),
+  sizeof (Elf32_External_Shdr),
+  sizeof (Elf32_External_Rel),
+  sizeof (Elf32_External_Rela),
+  sizeof (Elf32_External_Sym),
+  sizeof (Elf32_External_Dyn),
+  sizeof (Elf_External_Note),
+  4,
+  1,
+  32, 2,
+  ELFCLASS32, EV_CURRENT,
+  bfd_elf32_write_out_phdrs,
+  bfd_elf32_write_shdrs_and_ehdr,
+  bfd_elf32_checksum_contents,
+  bfd_elf32_write_relocs,
+  bfd_elf32_swap_symbol_in,
+  bfd_elf32_swap_symbol_out,
+  bfd_elf32_slurp_reloc_table,
+  bfd_elf32_slurp_symbol_table,
+  bfd_elf32_swap_dyn_in,
+  bfd_elf32_swap_dyn_out,
+  bfd_elf32_swap_reloc_in,
+  bfd_elf32_swap_reloc_out,
+  bfd_elf32_swap_reloca_in,
+  bfd_elf32_swap_reloca_out
+};
+
+#define elf_backend_size_info		arc_elf32_size_info
+
+/* Hook called by the linker routine which adds symbols from an object
+   file.  */
+
+static bfd_boolean
+elf_arc_add_symbol_hook (bfd * abfd,
+			 struct bfd_link_info * info,
+			 Elf_Internal_Sym * sym,
+			 const char ** namep ATTRIBUTE_UNUSED,
+			 flagword * flagsp ATTRIBUTE_UNUSED,
+			 asection ** secp ATTRIBUTE_UNUSED,
+			 bfd_vma * valp ATTRIBUTE_UNUSED)
+{
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+      && (abfd->flags & DYNAMIC) == 0
+      && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
+
+  return TRUE;
+}
+
+/* GDB expects general purpose registers to be in section .reg.  However Linux
+   kernel doesn't create this section and instead writes registers to NOTE
+   section.  It is up to the binutils to create a pseudo-section .reg from the
+   contents of NOTE.  Also BFD will read pid and signal number from NOTE.  This
+   function relies on offsets inside elf_prstatus structure in Linux to be
+   stable.  */
+
+static bfd_boolean
+elf32_arc_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  int offset;
+  size_t size;
+
+  switch (note->descsz)
+    {
+    default:
+      return FALSE;
+
+    case 236: /* sizeof (struct elf_prstatus) on Linux/arc.  */
+      /* pr_cursig */
+      elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
+      /* pr_pid */
+      elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
+      /* pr_regs */
+      offset = 72;
+      size = (40 * 4); /* There are 40 registers in user_regs_struct.  */
+      break;
+    }
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg", size,
+					  note->descpos + offset);
+}
+
+#define TARGET_LITTLE_SYM   arc_elf32_le_vec
+#define TARGET_LITTLE_NAME  "elf32-littlearc"
+#define TARGET_BIG_SYM	    arc_elf32_be_vec
+#define TARGET_BIG_NAME     "elf32-bigarc"
+#define ELF_ARCH	    bfd_arch_arc
+#define ELF_TARGET_ID	    ARC_ELF_DATA
+#define ELF_MACHINE_CODE    EM_ARC_COMPACT
+#define ELF_MACHINE_ALT1    EM_ARC_COMPACT2
+#define ELF_MAXPAGESIZE     0x2000
+
+#define bfd_elf32_bfd_link_hash_table_create	arc_elf_link_hash_table_create
+
+#define bfd_elf32_bfd_merge_private_bfd_data    arc_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_reloc_type_lookup		arc_elf32_bfd_reloc_type_lookup
+#define bfd_elf32_bfd_set_private_flags		arc_elf_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data    arc_elf_print_private_bfd_data
+#define bfd_elf32_bfd_copy_private_bfd_data     arc_elf_copy_private_bfd_data
+
+#define elf_info_to_howto_rel		     arc_info_to_howto_rel
+#define elf_backend_object_p		     arc_elf_object_p
+#define elf_backend_final_write_processing   arc_elf_final_write_processing
+
+#define elf_backend_relocate_section	     elf_arc_relocate_section
+#define elf_backend_check_relocs	     elf_arc_check_relocs
+#define elf_backend_create_dynamic_sections  _bfd_elf_create_dynamic_sections
+
+#define elf_backend_reloc_type_class		elf32_arc_reloc_type_class
+
+#define elf_backend_adjust_dynamic_symbol    elf_arc_adjust_dynamic_symbol
+#define elf_backend_finish_dynamic_symbol    elf_arc_finish_dynamic_symbol
+
+#define elf_backend_finish_dynamic_sections  elf_arc_finish_dynamic_sections
+#define elf_backend_size_dynamic_sections    elf_arc_size_dynamic_sections
+#define elf_backend_add_symbol_hook	     elf_arc_add_symbol_hook
+
+#define elf_backend_can_gc_sections	1
+#define elf_backend_want_got_plt	1
+#define elf_backend_plt_readonly	1
+#define elf_backend_rela_plts_and_copies_p 1
+#define elf_backend_want_plt_sym	0
+#define elf_backend_got_header_size	12
+#define elf_backend_dtrel_excludes_plt	1
+
+#define elf_backend_may_use_rel_p	0
+#define elf_backend_may_use_rela_p	1
+#define elf_backend_default_use_rela_p	1
+
+#define elf_backend_grok_prstatus elf32_arc_grok_prstatus
+
+#define elf_backend_default_execstack	0
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-arm.c ./bfd/elf32-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for ARM
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1689,6 +1689,60 @@ static reloc_howto_type elf32_arm_howto_
 	 0x00000000,		/* src_mask */
 	 0x00000000,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+  EMPTY_HOWTO (130),
+  EMPTY_HOWTO (131),
+  HOWTO (R_ARM_THM_ALU_ABS_G0_NC,/* type.  */
+	 0,			/* rightshift.  */
+	 1,			/* size (0 = byte, 1 = short, 2 = long).  */
+	 16,			/* bitsize.  */
+	 FALSE,			/* pc_relative.  */
+	 0,			/* bitpos.  */
+	 complain_overflow_bitfield,/* complain_on_overflow.  */
+	 bfd_elf_generic_reloc,	/* special_function.  */
+	 "R_ARM_THM_ALU_ABS_G0_NC",/* name.  */
+	 FALSE,			/* partial_inplace.  */
+	 0x00000000,		/* src_mask.  */
+	 0x00000000,		/* dst_mask.  */
+	 FALSE),		/* pcrel_offset.  */
+  HOWTO (R_ARM_THM_ALU_ABS_G1_NC,/* type.  */
+	 0,			/* rightshift.  */
+	 1,			/* size (0 = byte, 1 = short, 2 = long).  */
+	 16,			/* bitsize.  */
+	 FALSE,			/* pc_relative.  */
+	 0,			/* bitpos.  */
+	 complain_overflow_bitfield,/* complain_on_overflow.  */
+	 bfd_elf_generic_reloc,	/* special_function.  */
+	 "R_ARM_THM_ALU_ABS_G1_NC",/* name.  */
+	 FALSE,			/* partial_inplace.  */
+	 0x00000000,		/* src_mask.  */
+	 0x00000000,		/* dst_mask.  */
+	 FALSE),		/* pcrel_offset.  */
+  HOWTO (R_ARM_THM_ALU_ABS_G2_NC,/* type.  */
+	 0,			/* rightshift.  */
+	 1,			/* size (0 = byte, 1 = short, 2 = long).  */
+	 16,			/* bitsize.  */
+	 FALSE,			/* pc_relative.  */
+	 0,			/* bitpos.  */
+	 complain_overflow_bitfield,/* complain_on_overflow.  */
+	 bfd_elf_generic_reloc,	/* special_function.  */
+	 "R_ARM_THM_ALU_ABS_G2_NC",/* name.  */
+	 FALSE,			/* partial_inplace.  */
+	 0x00000000,		/* src_mask.  */
+	 0x00000000,		/* dst_mask.  */
+	 FALSE),		/* pcrel_offset.  */
+  HOWTO (R_ARM_THM_ALU_ABS_G3_NC,/* type.  */
+	 0,			/* rightshift.  */
+	 1,			/* size (0 = byte, 1 = short, 2 = long).  */
+	 16,			/* bitsize.  */
+	 FALSE,			/* pc_relative.  */
+	 0,			/* bitpos.  */
+	 complain_overflow_bitfield,/* complain_on_overflow.  */
+	 bfd_elf_generic_reloc,	/* special_function.  */
+	 "R_ARM_THM_ALU_ABS_G3_NC",/* name.  */
+	 FALSE,			/* partial_inplace.  */
+	 0x00000000,		/* src_mask.  */
+	 0x00000000,		/* dst_mask.  */
+	 FALSE),		/* pcrel_offset.  */
 };
 
 /* 160 onwards: */
@@ -1889,7 +1943,11 @@ static const struct elf32_arm_reloc_map 
     {BFD_RELOC_ARM_LDC_SB_G0, R_ARM_LDC_SB_G0},
     {BFD_RELOC_ARM_LDC_SB_G1, R_ARM_LDC_SB_G1},
     {BFD_RELOC_ARM_LDC_SB_G2, R_ARM_LDC_SB_G2},
-    {BFD_RELOC_ARM_V4BX,	     R_ARM_V4BX}
+    {BFD_RELOC_ARM_V4BX,	     R_ARM_V4BX},
+    {BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC, R_ARM_THM_ALU_ABS_G3_NC},
+    {BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC, R_ARM_THM_ALU_ABS_G2_NC},
+    {BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC, R_ARM_THM_ALU_ABS_G1_NC},
+    {BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC, R_ARM_THM_ALU_ABS_G0_NC}
   };
 
 static reloc_howto_type *
@@ -2072,11 +2130,16 @@ typedef unsigned short int insn16;
 #define VFP11_ERRATUM_VENEER_SECTION_NAME ".vfp11_veneer"
 #define VFP11_ERRATUM_VENEER_ENTRY_NAME   "__vfp11_veneer_%x"
 
+#define STM32L4XX_ERRATUM_VENEER_SECTION_NAME ".text.stm32l4xx_veneer"
+#define STM32L4XX_ERRATUM_VENEER_ENTRY_NAME   "__stm32l4xx_veneer_%x"
+
 #define ARM_BX_GLUE_SECTION_NAME ".v4_bx"
 #define ARM_BX_GLUE_ENTRY_NAME   "__bx_r%d"
 
 #define STUB_ENTRY_NAME   "__%s_veneer"
 
+#define CMSE_PREFIX "__acle_se_"
+
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 #define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
@@ -2299,6 +2362,8 @@ enum stub_insn_type
    is inserted in arm_build_one_stub().  */
 #define THUMB16_BCOND_INSN(X)	{(X), THUMB16_TYPE, R_ARM_NONE, 1}
 #define THUMB32_INSN(X)		{(X), THUMB32_TYPE, R_ARM_NONE, 0}
+#define THUMB32_MOVT(X)		{(X), THUMB32_TYPE, R_ARM_THM_MOVT_ABS, 0}
+#define THUMB32_MOVW(X)		{(X), THUMB32_TYPE, R_ARM_THM_MOVW_ABS_NC, 0}
 #define THUMB32_B_INSN(X, Z)	{(X), THUMB32_TYPE, R_ARM_THM_JUMP24, (Z)}
 #define ARM_INSN(X)		{(X), ARM_TYPE, R_ARM_NONE, 0}
 #define ARM_REL_INSN(X, Z)	{(X), ARM_TYPE, R_ARM_JUMP24, (Z)}
@@ -2341,6 +2406,22 @@ static const insn_sequence elf32_arm_stu
   DATA_WORD (0, R_ARM_ABS32, 0),     /* dcd  R_ARM_ABS32(X) */
 };
 
+/* Thumb -> Thumb long branch stub in thumb2 encoding.  Used on armv7.  */
+static const insn_sequence elf32_arm_stub_long_branch_thumb2_only[] =
+{
+  THUMB32_INSN (0xf85ff000),         /* ldr.w  pc, [pc, #-0] */
+  DATA_WORD (0, R_ARM_ABS32, 0),     /* dcd  R_ARM_ABS32(x) */
+};
+
+/* Thumb -> Thumb long branch stub. Used for PureCode sections on Thumb2
+   M-profile architectures.  */
+static const insn_sequence elf32_arm_stub_long_branch_thumb2_only_pure[] =
+{
+  THUMB32_MOVW (0xf2400c00),	     /* mov.w ip, R_ARM_MOVW_ABS_NC */
+  THUMB32_MOVT (0xf2c00c00),	     /* movt  ip, R_ARM_MOVT_ABS << 16 */
+  THUMB16_INSN (0x4760),             /* bx   ip */
+};
+
 /* V4T Thumb -> Thumb long branch stub. Using the stack is not
    allowed.  */
 static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_thumb[] =
@@ -2482,6 +2563,13 @@ static const insn_sequence elf32_arm_stu
   DATA_WORD (0, R_ARM_NONE, 0),         /* .word 0 */
 };
 
+/* Stub used for transition to secure state (aka SG veneer).  */
+static const insn_sequence elf32_arm_stub_cmse_branch_thumb_only[] =
+{
+  THUMB32_INSN (0xe97fe97f),		/* sg.  */
+  THUMB32_B_INSN (0xf000b800, -4),	/* b.w original_branch_dest.  */
+};
+
 
 /* Cortex-A8 erratum-workaround stubs.  */
 
@@ -2561,21 +2649,26 @@ static const insn_sequence elf32_arm_stu
   DEF_STUB(long_branch_v4t_thumb_tls_pic) \
   DEF_STUB(long_branch_arm_nacl) \
   DEF_STUB(long_branch_arm_nacl_pic) \
+  DEF_STUB(cmse_branch_thumb_only) \
   DEF_STUB(a8_veneer_b_cond) \
   DEF_STUB(a8_veneer_b) \
   DEF_STUB(a8_veneer_bl) \
-  DEF_STUB(a8_veneer_blx)
+  DEF_STUB(a8_veneer_blx) \
+  DEF_STUB(long_branch_thumb2_only) \
+  DEF_STUB(long_branch_thumb2_only_pure)
 
 #define DEF_STUB(x) arm_stub_##x,
 enum elf32_arm_stub_type
 {
   arm_stub_none,
   DEF_STUBS
-  /* Note the first a8_veneer type.  */
-  arm_stub_a8_veneer_lwm = arm_stub_a8_veneer_b_cond
+  max_stub_type
 };
 #undef DEF_STUB
 
+/* Note the first a8_veneer type.  */
+const unsigned arm_stub_a8_veneer_lwm = arm_stub_a8_veneer_b_cond;
+
 typedef struct
 {
   const insn_sequence* template_sequence;
@@ -2605,8 +2698,12 @@ struct elf32_arm_stub_hash_entry
   bfd_vma target_value;
   asection *target_section;
 
-  /* Offset to apply to relocation referencing target_value.  */
-  bfd_vma target_addend;
+  /* Same as above but for the source of the branch to the stub.  Used for
+     Cortex-A8 erratum workaround to patch it to branch to the stub.  As
+     such, source section does not need to be recorded since Cortex-A8 erratum
+     workaround stubs are only generated when both source and target are in the
+     same section.  */
+  bfd_vma source_value;
 
   /* The instruction which caused this stub to be generated (only valid for
      Cortex-A8 erratum workaround stubs at present).  */
@@ -2679,6 +2776,36 @@ typedef struct elf32_vfp11_erratum_list
 }
 elf32_vfp11_erratum_list;
 
+/* Information about a STM32L4XX erratum veneer, or a branch to such a
+   veneer.  */
+typedef enum
+{
+  STM32L4XX_ERRATUM_BRANCH_TO_VENEER,
+  STM32L4XX_ERRATUM_VENEER
+}
+elf32_stm32l4xx_erratum_type;
+
+typedef struct elf32_stm32l4xx_erratum_list
+{
+  struct elf32_stm32l4xx_erratum_list *next;
+  bfd_vma vma;
+  union
+  {
+    struct
+    {
+      struct elf32_stm32l4xx_erratum_list *veneer;
+      unsigned int insn;
+    } b;
+    struct
+    {
+      struct elf32_stm32l4xx_erratum_list *branch;
+      unsigned int id;
+    } v;
+  } u;
+  elf32_stm32l4xx_erratum_type type;
+}
+elf32_stm32l4xx_erratum_list;
+
 typedef enum
 {
   DELETE_EXIDX_ENTRY,
@@ -2709,6 +2836,9 @@ typedef struct _arm_elf_section_data
   /* Information about CPU errata.  */
   unsigned int erratumcount;
   elf32_vfp11_erratum_list *erratumlist;
+  unsigned int stm32l4xx_erratumcount;
+  elf32_stm32l4xx_erratum_list *stm32l4xx_erratumlist;
+  unsigned int additional_reloc_count;
   /* Information about unwind tables.  */
   union
   {
@@ -2742,7 +2872,7 @@ struct a8_erratum_fix
   bfd *input_bfd;
   asection *section;
   bfd_vma offset;
-  bfd_vma addend;
+  bfd_vma target_offset;
   unsigned long orig_insn;
   char *stub_name;
   enum elf32_arm_stub_type stub_type;
@@ -2942,6 +3072,10 @@ struct elf32_arm_link_hash_table
      veneers.  */
   bfd_size_type vfp11_erratum_glue_size;
 
+ /* The size in bytes of the section containing glue for STM32L4XX erratum
+     veneers.  */
+  bfd_size_type stm32l4xx_erratum_glue_size;
+
   /* A table of fix locations for Cortex-A8 Thumb-2 branch/TLB erratum.  This
      holds Cortex-A8 erratum fix locations between elf32_arm_size_stubs() and
      elf32_arm_write_section().  */
@@ -2982,6 +3116,13 @@ struct elf32_arm_link_hash_table
   /* Global counter for the number of fixes we have emitted.  */
   int num_vfp11_fixes;
 
+  /* What sort of code sequences we should look for which may trigger the
+     STM32L4XX erratum.  */
+  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
+
+  /* Global counter for the number of fixes we have emitted.  */
+  int num_stm32l4xx_fixes;
+
   /* Nonzero to force PIC branch veneers.  */
   int pic_veneer;
 
@@ -3003,16 +3144,20 @@ struct elf32_arm_link_hash_table
   /* True if the target uses REL relocations.  */
   int use_rel;
 
+  /* Nonzero if import library must be a secure gateway import library
+     as per ARMv8-M Security Extensions.  */
+  int cmse_implib;
+
+  /* The import library whose symbols' address must remain stable in
+     the import library generated.  */
+  bfd *in_implib_bfd;
+
   /* The index of the next unused R_ARM_TLS_DESC slot in .rel.plt.  */
   bfd_vma next_tls_desc_index;
 
   /* How many R_ARM_TLS_DESC relocations were generated so far.  */
   bfd_vma num_tls_desc;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   /* The (unloaded but important) VxWorks .rela.plt.unloaded section.  */
   asection *srelplt2;
 
@@ -3053,22 +3198,67 @@ struct elf32_arm_link_hash_table
   bfd *stub_bfd;
 
   /* Linker call-backs.  */
-  asection * (*add_stub_section) (const char *, asection *, unsigned int);
+  asection * (*add_stub_section) (const char *, asection *, asection *,
+				  unsigned int);
   void (*layout_sections_again) (void);
 
   /* Array to keep track of which stub sections have been created, and
      information on stub grouping.  */
   struct map_stub *stub_group;
 
+  /* Input stub section holding secure gateway veneers.  */
+  asection *cmse_stub_sec;
+
+  /* Offset in cmse_stub_sec where new SG veneers (not in input import library)
+     start to be allocated.  */
+  bfd_vma new_cmse_stub_offset;
+
   /* Number of elements in stub_group.  */
-  int top_id;
+  unsigned int top_id;
 
   /* Assorted information used by elf32_arm_size_stubs.  */
   unsigned int bfd_count;
-  int top_index;
+  unsigned int top_index;
   asection **input_list;
 };
 
+static inline int
+ctz (unsigned int mask)
+{
+#if GCC_VERSION >= 3004
+  return __builtin_ctz (mask);
+#else
+  unsigned int i;
+
+  for (i = 0; i < 8 * sizeof (mask); i++)
+    {
+      if (mask & 0x1)
+	break;
+      mask = (mask >> 1);
+    }
+  return i;
+#endif
+}
+
+static inline int
+elf32_arm_popcount (unsigned int mask)
+{
+#if GCC_VERSION >= 3004
+  return __builtin_popcount (mask);
+#else
+  unsigned int i;
+  int sum = 0;
+
+  for (i = 0; i < 8 * sizeof (mask); i++)
+    {
+      if (mask & 0x1)
+	sum++;
+      mask = (mask >> 1);
+    }
+  return sum;
+#endif
+}
+
 /* Create an entry in an ARM ELF linker hash table.  */
 
 static struct bfd_hash_entry *
@@ -3172,12 +3362,16 @@ elf32_arm_create_local_iplt (bfd *abfd, 
    union and *ARM_PLT at the ARM-specific information.  */
 
 static bfd_boolean
-elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_entry *h,
+elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_table *globals,
+			struct elf32_arm_link_hash_entry *h,
 			unsigned long r_symndx, union gotplt_union **root_plt,
 			struct arm_plt_info **arm_plt)
 {
   struct arm_local_iplt_info *local_iplt;
 
+  if (globals->root.splt == NULL && globals->root.iplt == NULL)
+    return FALSE;
+
   if (h != NULL)
     {
       *root_plt = &h->root.plt;
@@ -3271,15 +3465,15 @@ stub_hash_newfunc (struct bfd_hash_entry
       /* Initialize the local fields.  */
       eh = (struct elf32_arm_stub_hash_entry *) entry;
       eh->stub_sec = NULL;
-      eh->stub_offset = 0;
+      eh->stub_offset = (bfd_vma) -1;
+      eh->source_value = 0;
       eh->target_value = 0;
       eh->target_section = NULL;
-      eh->target_addend = 0;
       eh->orig_insn = 0;
       eh->stub_type = arm_stub_none;
       eh->stub_size = 0;
       eh->stub_template = NULL;
-      eh->stub_template_size = 0;
+      eh->stub_template_size = -1;
       eh->h = NULL;
       eh->id_sec = NULL;
       eh->output_name = NULL;
@@ -3363,20 +3557,28 @@ create_ifunc_sections (struct bfd_link_i
 static bfd_boolean
 using_thumb_only (struct elf32_arm_link_hash_table *globals)
 {
-  int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
-				       Tag_CPU_arch);
-  int profile;
-
-  if (arch == TAG_CPU_ARCH_V6_M || arch == TAG_CPU_ARCH_V6S_M)
+  int arch;
+  int profile = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
+					  Tag_CPU_arch_profile);
+
+  if (profile)
+    return profile == 'M';
+
+  arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, Tag_CPU_arch);
+
+  /* Force return logic to be reviewed for each new architecture.  */
+  BFD_ASSERT (arch <= TAG_CPU_ARCH_V8
+	      || arch == TAG_CPU_ARCH_V8M_BASE
+	      || arch == TAG_CPU_ARCH_V8M_MAIN);
+
+  if (arch == TAG_CPU_ARCH_V6_M
+      || arch == TAG_CPU_ARCH_V6S_M
+      || arch == TAG_CPU_ARCH_V7E_M
+      || arch == TAG_CPU_ARCH_V8M_BASE
+      || arch == TAG_CPU_ARCH_V8M_MAIN)
     return TRUE;
 
-  if (arch != TAG_CPU_ARCH_V7 && arch != TAG_CPU_ARCH_V7E_M)
-    return FALSE;
-
-  profile = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
-				      Tag_CPU_arch_profile);
-
-  return profile == 'M';
+  return FALSE;
 }
 
 /* Determine if we're dealing with a Thumb-2 object.  */
@@ -3384,9 +3586,43 @@ using_thumb_only (struct elf32_arm_link_
 static bfd_boolean
 using_thumb2 (struct elf32_arm_link_hash_table *globals)
 {
-  int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
-				       Tag_CPU_arch);
-  return arch == TAG_CPU_ARCH_V6T2 || arch >= TAG_CPU_ARCH_V7;
+  int arch;
+  int thumb_isa = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
+					    Tag_THUMB_ISA_use);
+
+  if (thumb_isa)
+    return thumb_isa == 2;
+
+  arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, Tag_CPU_arch);
+
+  /* Force return logic to be reviewed for each new architecture.  */
+  BFD_ASSERT (arch <= TAG_CPU_ARCH_V8
+	      || arch == TAG_CPU_ARCH_V8M_BASE
+	      || arch == TAG_CPU_ARCH_V8M_MAIN);
+
+  return (arch == TAG_CPU_ARCH_V6T2
+	  || arch == TAG_CPU_ARCH_V7
+	  || arch == TAG_CPU_ARCH_V7E_M
+	  || arch == TAG_CPU_ARCH_V8
+	  || arch == TAG_CPU_ARCH_V8M_MAIN);
+}
+
+/* Determine whether Thumb-2 BL instruction is available.  */
+
+static bfd_boolean
+using_thumb2_bl (struct elf32_arm_link_hash_table *globals)
+{
+  int arch =
+    bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, Tag_CPU_arch);
+
+  /* Force return logic to be reviewed for each new architecture.  */
+  BFD_ASSERT (arch <= TAG_CPU_ARCH_V8
+	      || arch == TAG_CPU_ARCH_V8M_BASE
+	      || arch == TAG_CPU_ARCH_V8M_MAIN);
+
+  /* Architecture was introduced after ARMv6T2 (eg. ARMv6-M).  */
+  return (arch == TAG_CPU_ARCH_V6T2
+	  || arch >= TAG_CPU_ARCH_V7);
 }
 
 /* Create .plt, .rel(a).plt, .got, .got.plt, .rel(a).got, .dynbss, and
@@ -3408,17 +3644,12 @@ elf32_arm_create_dynamic_sections (bfd *
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj,
-					    RELOC_SECTION (htab, ".bss"));
-
   if (htab->vxworks_p)
     {
       if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
 	return FALSE;
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  htab->plt_header_size = 0;
 	  htab->plt_entry_size
@@ -3431,6 +3662,9 @@ elf32_arm_create_dynamic_sections (bfd *
 	  htab->plt_entry_size
 	    = 4 * ARRAY_SIZE (elf32_arm_vxworks_exec_plt_entry);
 	}
+
+      if (elf_elfheader (dynobj))
+	elf_elfheader (dynobj)->e_ident[EI_CLASS] = ELFCLASS32;
     }
   else
     {
@@ -3451,8 +3685,8 @@ elf32_arm_create_dynamic_sections (bfd *
 
   if (!htab->root.splt
       || !htab->root.srelplt
-      || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
+      || !htab->root.sdynbss
+      || (!bfd_link_pic (info) && !htab->root.srelbss))
     abort ();
 
   return TRUE;
@@ -3559,6 +3793,7 @@ elf32_arm_link_hash_table_create (bfd *a
     }
 
   ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
+  ret->stm32l4xx_fix = BFD_ARM_STM32L4XX_FIX_NONE;
 #ifdef FOUR_WORD_PLT
   ret->plt_header_size = 16;
   ret->plt_entry_size = 16;
@@ -3587,19 +3822,16 @@ arch_has_arm_nop (struct elf32_arm_link_
 {
   const int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
 					     Tag_CPU_arch);
-  return arch == TAG_CPU_ARCH_V6T2
-	 || arch == TAG_CPU_ARCH_V6K
-	 || arch == TAG_CPU_ARCH_V7
-	 || arch == TAG_CPU_ARCH_V7E_M;
-}
 
-static bfd_boolean
-arch_has_thumb2_nop (struct elf32_arm_link_hash_table *globals)
-{
-  const int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
-					     Tag_CPU_arch);
-  return (arch == TAG_CPU_ARCH_V6T2 || arch == TAG_CPU_ARCH_V7
-	  || arch == TAG_CPU_ARCH_V7E_M);
+  /* Force return logic to be reviewed for each new architecture.  */
+  BFD_ASSERT (arch <= TAG_CPU_ARCH_V8
+	      || arch == TAG_CPU_ARCH_V8M_BASE
+	      || arch == TAG_CPU_ARCH_V8M_MAIN);
+
+  return (arch == TAG_CPU_ARCH_V6T2
+	  || arch == TAG_CPU_ARCH_V6K
+	  || arch == TAG_CPU_ARCH_V7
+	  || arch == TAG_CPU_ARCH_V8);
 }
 
 static bfd_boolean
@@ -3608,11 +3840,14 @@ arm_stub_is_thumb (enum elf32_arm_stub_t
   switch (stub_type)
     {
     case arm_stub_long_branch_thumb_only:
+    case arm_stub_long_branch_thumb2_only:
+    case arm_stub_long_branch_thumb2_only_pure:
     case arm_stub_long_branch_v4t_thumb_arm:
     case arm_stub_short_branch_v4t_thumb_arm:
     case arm_stub_long_branch_v4t_thumb_arm_pic:
     case arm_stub_long_branch_v4t_thumb_tls_pic:
     case arm_stub_long_branch_thumb_only_pic:
+    case arm_stub_cmse_branch_thumb_only:
       return TRUE;
     case arm_stub_none:
       BFD_FAIL ();
@@ -3641,13 +3876,14 @@ arm_type_of_stub (struct bfd_link_info *
   bfd_signed_vma branch_offset;
   unsigned int r_type;
   struct elf32_arm_link_hash_table * globals;
-  int thumb2;
-  int thumb_only;
+  bfd_boolean thumb2, thumb2_bl, thumb_only;
   enum elf32_arm_stub_type stub_type = arm_stub_none;
   int use_plt = 0;
   enum arm_st_branch_type branch_type = *actual_branch_type;
   union gotplt_union *root_plt;
   struct arm_plt_info *arm_plt;
+  int arch;
+  int thumb2_movw;
 
   if (branch_type == ST_BRANCH_LONG)
     return stub_type;
@@ -3657,8 +3893,13 @@ arm_type_of_stub (struct bfd_link_info *
     return stub_type;
 
   thumb_only = using_thumb_only (globals);
-
   thumb2 = using_thumb2 (globals);
+  thumb2_bl = using_thumb2_bl (globals);
+
+  arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, Tag_CPU_arch);
+
+  /* True for architectures that implement the thumb2 movw instruction.  */
+  thumb2_movw = thumb2 || (arch  == TAG_CPU_ARCH_V8M_BASE);
 
   /* Determine where the call point is.  */
   location = (input_sec->output_offset
@@ -3678,8 +3919,9 @@ arm_type_of_stub (struct bfd_link_info *
      the address of the appropriate trampoline.  */
   if (r_type != R_ARM_TLS_CALL
       && r_type != R_ARM_THM_TLS_CALL
-      && elf32_arm_get_plt_info (input_bfd, hash, ELF32_R_SYM (rel->r_info),
-				 &root_plt, &arm_plt)
+      && elf32_arm_get_plt_info (input_bfd, globals, hash,
+				 ELF32_R_SYM (rel->r_info), &root_plt,
+				 &arm_plt)
       && root_plt->offset != (bfd_vma) -1)
     {
       asection *splt;
@@ -3695,17 +3937,43 @@ arm_type_of_stub (struct bfd_link_info *
 	  /* Note when dealing with PLT entries: the main PLT stub is in
 	     ARM mode, so if the branch is in Thumb mode, another
 	     Thumb->ARM stub will be inserted later just before the ARM
-	     PLT stub. We don't take this extra distance into account
-	     here, because if a long branch stub is needed, we'll add a
-	     Thumb->Arm one and branch directly to the ARM PLT entry
-	     because it avoids spreading offset corrections in several
-	     places.  */
+	     PLT stub. If a long branch stub is needed, we'll add a
+	     Thumb->Arm one and branch directly to the ARM PLT entry.
+	     Here, we have to check if a pre-PLT Thumb->ARM stub
+	     is needed and if it will be close enough.  */
 
 	  destination = (splt->output_section->vma
 			 + splt->output_offset
 			 + root_plt->offset);
 	  st_type = STT_FUNC;
-	  branch_type = ST_BRANCH_TO_ARM;
+
+	  /* Thumb branch/call to PLT: it can become a branch to ARM
+	     or to Thumb. We must perform the same checks and
+	     corrections as in elf32_arm_final_link_relocate.  */
+	  if ((r_type == R_ARM_THM_CALL)
+	      || (r_type == R_ARM_THM_JUMP24))
+	    {
+	      if (globals->use_blx
+		  && r_type == R_ARM_THM_CALL
+		  && !thumb_only)
+		{
+		  /* If the Thumb BLX instruction is available, convert
+		     the BL to a BLX instruction to call the ARM-mode
+		     PLT entry.  */
+		  branch_type = ST_BRANCH_TO_ARM;
+		}
+	      else
+		{
+		  if (!thumb_only)
+		    /* Target the Thumb stub before the ARM PLT entry.  */
+		    destination -= PLT_THUMB_STUB_SIZE;
+		  branch_type = ST_BRANCH_TO_THUMB;
+		}
+	    }
+	  else
+	    {
+	      branch_type = ST_BRANCH_TO_ARM;
+	    }
 	}
     }
   /* Calls to STT_GNU_IFUNC symbols should go through a PLT.  */
@@ -3722,12 +3990,11 @@ arm_type_of_stub (struct bfd_link_info *
 	 - it's a Thumb->Arm call and blx is not available, or it's a
 	   Thumb->Arm branch (not bl). A stub is needed in this case,
 	   but only if this call is not through a PLT entry. Indeed,
-	   PLT stubs handle mode switching already.
-      */
-      if ((!thumb2
+	   PLT stubs handle mode switching already.  */
+      if ((!thumb2_bl
 	    && (branch_offset > THM_MAX_FWD_BRANCH_OFFSET
 		|| (branch_offset < THM_MAX_BWD_BRANCH_OFFSET)))
-	  || (thumb2
+	  || (thumb2_bl
 	      && (branch_offset > THM2_MAX_FWD_BRANCH_OFFSET
 		  || (branch_offset < THM2_MAX_BWD_BRANCH_OFFSET)))
 	  || (thumb2
@@ -3741,12 +4008,28 @@ arm_type_of_stub (struct bfd_link_info *
                   || (r_type == R_ARM_THM_JUMP19))
 	      && !use_plt))
 	{
+	  /* If we need to insert a Thumb-Thumb long branch stub to a
+	     PLT, use one that branches directly to the ARM PLT
+	     stub. If we pretended we'd use the pre-PLT Thumb->ARM
+	     stub, undo this now.  */
+	  if ((branch_type == ST_BRANCH_TO_THUMB) && use_plt && !thumb_only)
+	    {
+	      branch_type = ST_BRANCH_TO_ARM;
+	      branch_offset += PLT_THUMB_STUB_SIZE;
+	    }
+
 	  if (branch_type == ST_BRANCH_TO_THUMB)
 	    {
 	      /* Thumb to thumb.  */
 	      if (!thumb_only)
 		{
-		  stub_type = (info->shared | globals->pic_veneer)
+		  if (input_sec->flags & SEC_ELF_PURECODE)
+		    _bfd_error_handler (_("\
+%B(%A): warning: long branch  veneers used in section with SHF_ARM_PURECODE section \
+attribute is only supported for M-profile targets that implement the movw instruction."),
+					input_sec);
+
+		  stub_type = (bfd_link_pic (info) | globals->pic_veneer)
 		    /* PIC stubs.  */
 		    ? ((globals->use_blx
 			&& (r_type == R_ARM_THM_CALL))
@@ -3768,28 +4051,49 @@ arm_type_of_stub (struct bfd_link_info *
 		}
 	      else
 		{
-		  stub_type = (info->shared | globals->pic_veneer)
-		    /* PIC stub.  */
-		    ? arm_stub_long_branch_thumb_only_pic
-		    /* non-PIC stub.  */
-		    : arm_stub_long_branch_thumb_only;
+		  if (thumb2_movw && (input_sec->flags & SEC_ELF_PURECODE))
+		      stub_type = arm_stub_long_branch_thumb2_only_pure;
+		  else
+		    {
+		      if (input_sec->flags & SEC_ELF_PURECODE)
+			_bfd_error_handler (_("\
+%B(%A): warning: long branch  veneers used in section with SHF_ARM_PURECODE section \
+attribute is only supported for M-profile targets that implement the movw instruction."),
+					    input_sec);
+
+		      stub_type = (bfd_link_pic (info) | globals->pic_veneer)
+			/* PIC stub.  */
+			? arm_stub_long_branch_thumb_only_pic
+			/* non-PIC stub.  */
+			: (thumb2 ? arm_stub_long_branch_thumb2_only
+				  : arm_stub_long_branch_thumb_only);
+		    }
 		}
 	    }
 	  else
 	    {
+	      if (input_sec->flags & SEC_ELF_PURECODE)
+		_bfd_error_handler (_("%B(%s): warning: long branch "
+				      " veneers used in section with "
+				      "SHF_ARM_PURECODE section "
+				      "attribute is only supported"
+				      " for M-profile targets that "
+				      "implement the movw "
+				      "instruction."));
+
 	      /* Thumb to arm.  */
 	      if (sym_sec != NULL
 		  && sym_sec->owner != NULL
 		  && !INTERWORK_FLAG (sym_sec->owner))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("%B(%s): warning: interworking not enabled.\n"
 		       "  first occurrence: %B: Thumb call to ARM"),
 		     sym_sec->owner, input_bfd, name);
 		}
 
 	      stub_type =
-		(info->shared | globals->pic_veneer)
+		(bfd_link_pic (info) | globals->pic_veneer)
 		/* PIC stubs.  */
 		? (r_type == R_ARM_THM_TLS_CALL
 		   /* TLS PIC stubs.  */
@@ -3821,6 +4125,14 @@ arm_type_of_stub (struct bfd_link_info *
 	   || r_type == R_ARM_PLT32
 	   || r_type == R_ARM_TLS_CALL)
     {
+      if (input_sec->flags & SEC_ELF_PURECODE)
+	_bfd_error_handler (_("%B(%s): warning: long branch "
+			      " veneers used in section with "
+			      "SHF_ARM_PURECODE section "
+			      "attribute is only supported"
+			      " for M-profile targets that "
+			      "implement the movw "
+			      "instruction."));
       if (branch_type == ST_BRANCH_TO_THUMB)
 	{
 	  /* Arm to thumb.  */
@@ -3829,7 +4141,7 @@ arm_type_of_stub (struct bfd_link_info *
 	      && sym_sec->owner != NULL
 	      && !INTERWORK_FLAG (sym_sec->owner))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B(%s): warning: interworking not enabled.\n"
 		   "  first occurrence: %B: ARM call to Thumb"),
 		 sym_sec->owner, input_bfd, name);
@@ -3843,7 +4155,7 @@ arm_type_of_stub (struct bfd_link_info *
 	      || (r_type == R_ARM_JUMP24)
 	      || (r_type == R_ARM_PLT32))
 	    {
-	      stub_type = (info->shared | globals->pic_veneer)
+	      stub_type = (bfd_link_pic (info) | globals->pic_veneer)
 		/* PIC stubs.  */
 		? ((globals->use_blx)
 		   /* V5T and above.  */
@@ -3866,7 +4178,7 @@ arm_type_of_stub (struct bfd_link_info *
 	      || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET))
 	    {
 	      stub_type =
-		(info->shared | globals->pic_veneer)
+		(bfd_link_pic (info) | globals->pic_veneer)
 		/* PIC stubs.  */
 		? (r_type == R_ARM_TLS_CALL
 		   /* TLS PIC Stub.  */
@@ -3953,6 +4265,7 @@ elf32_arm_get_stub_entry (const asection
      Stub names need to include a section id, as there may well be
      more than one stub used to reach say, printf, and we need to
      distinguish between them.  */
+  BFD_ASSERT (input_section->id <= htab->top_id);
   id_sec = htab->stub_group[input_section->id].link_sec;
 
   if (h != NULL && h->stub_cache != NULL
@@ -3981,66 +4294,193 @@ elf32_arm_get_stub_entry (const asection
   return stub_entry;
 }
 
-/* Find or create a stub section.  Returns a pointer to the stub section, and
-   the section to which the stub section will be attached (in *LINK_SEC_P).
+/* Whether veneers of type STUB_TYPE require to be in a dedicated output
+   section.  */
+
+static bfd_boolean
+arm_dedicated_stub_output_section_required (enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return TRUE;
+
+    default:
+      return FALSE;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* Required alignment (as a power of 2) for the dedicated section holding
+   veneers of type STUB_TYPE, or 0 if veneers of this type are interspersed
+   with input sections.  */
+
+static int
+arm_dedicated_stub_output_section_required_alignment
+  (enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    /* Vectors of Secure Gateway veneers must be aligned on 32byte
+       boundary.  */
+    case arm_stub_cmse_branch_thumb_only:
+      return 5;
+
+    default:
+      BFD_ASSERT (!arm_dedicated_stub_output_section_required (stub_type));
+      return 0;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* Name of the dedicated output section to put veneers of type STUB_TYPE, or
+   NULL if veneers of this type are interspersed with input sections.  */
+
+static const char *
+arm_dedicated_stub_output_section_name (enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return ".gnu.sgstubs";
+
+    default:
+      BFD_ASSERT (!arm_dedicated_stub_output_section_required (stub_type));
+      return NULL;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* If veneers of type STUB_TYPE should go in a dedicated output section,
+   returns the address of the hash table field in HTAB holding a pointer to the
+   corresponding input section.  Otherwise, returns NULL.  */
+
+static asection **
+arm_dedicated_stub_input_section_ptr (struct elf32_arm_link_hash_table *htab,
+				      enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return &htab->cmse_stub_sec;
+
+    default:
+      BFD_ASSERT (!arm_dedicated_stub_output_section_required (stub_type));
+      return NULL;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* Find or create a stub section to contain a stub of type STUB_TYPE.  SECTION
+   is the section that branch into veneer and can be NULL if stub should go in
+   a dedicated output section.  Returns a pointer to the stub section, and the
+   section to which the stub section will be attached (in *LINK_SEC_P).
    LINK_SEC_P may be NULL.  */
 
 static asection *
 elf32_arm_create_or_find_stub_sec (asection **link_sec_p, asection *section,
-				   struct elf32_arm_link_hash_table *htab)
+				   struct elf32_arm_link_hash_table *htab,
+				   enum elf32_arm_stub_type stub_type)
 {
-  asection *link_sec;
-  asection *stub_sec;
+  asection *link_sec, *out_sec, **stub_sec_p;
+  const char *stub_sec_prefix;
+  bfd_boolean dedicated_output_section =
+    arm_dedicated_stub_output_section_required (stub_type);
+  int align;
+
+  if (dedicated_output_section)
+    {
+      bfd *output_bfd = htab->obfd;
+      const char *out_sec_name =
+	arm_dedicated_stub_output_section_name (stub_type);
+      link_sec = NULL;
+      stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
+      stub_sec_prefix = out_sec_name;
+      align = arm_dedicated_stub_output_section_required_alignment (stub_type);
+      out_sec = bfd_get_section_by_name (output_bfd, out_sec_name);
+      if (out_sec == NULL)
+	{
+	  _bfd_error_handler (_("No address assigned to the veneers output "
+				"section %s"), out_sec_name);
+	  return NULL;
+	}
+    }
+  else
+    {
+      BFD_ASSERT (section->id <= htab->top_id);
+      link_sec = htab->stub_group[section->id].link_sec;
+      BFD_ASSERT (link_sec != NULL);
+      stub_sec_p = &htab->stub_group[section->id].stub_sec;
+      if (*stub_sec_p == NULL)
+	stub_sec_p = &htab->stub_group[link_sec->id].stub_sec;
+      stub_sec_prefix = link_sec->name;
+      out_sec = link_sec->output_section;
+      align = htab->nacl_p ? 4 : 3;
+    }
+
+  if (*stub_sec_p == NULL)
+    {
+      size_t namelen;
+      bfd_size_type len;
+      char *s_name;
+
+      namelen = strlen (stub_sec_prefix);
+      len = namelen + sizeof (STUB_SUFFIX);
+      s_name = (char *) bfd_alloc (htab->stub_bfd, len);
+      if (s_name == NULL)
+	return NULL;
 
-  link_sec = htab->stub_group[section->id].link_sec;
-  BFD_ASSERT (link_sec != NULL);
-  stub_sec = htab->stub_group[section->id].stub_sec;
+      memcpy (s_name, stub_sec_prefix, namelen);
+      memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
+      *stub_sec_p = (*htab->add_stub_section) (s_name, out_sec, link_sec,
+					       align);
+      if (*stub_sec_p == NULL)
+	return NULL;
 
-  if (stub_sec == NULL)
-    {
-      stub_sec = htab->stub_group[link_sec->id].stub_sec;
-      if (stub_sec == NULL)
-	{
-	  size_t namelen;
-	  bfd_size_type len;
-	  char *s_name;
-
-	  namelen = strlen (link_sec->name);
-	  len = namelen + sizeof (STUB_SUFFIX);
-	  s_name = (char *) bfd_alloc (htab->stub_bfd, len);
-	  if (s_name == NULL)
-	    return NULL;
-
-	  memcpy (s_name, link_sec->name, namelen);
-	  memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
-	  stub_sec = (*htab->add_stub_section) (s_name, link_sec,
-						htab->nacl_p ? 4 : 3);
-	  if (stub_sec == NULL)
-	    return NULL;
-	  htab->stub_group[link_sec->id].stub_sec = stub_sec;
-	}
-      htab->stub_group[section->id].stub_sec = stub_sec;
+      out_sec->flags |= SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+			| SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY
+			| SEC_KEEP;
     }
 
+  if (!dedicated_output_section)
+    htab->stub_group[section->id].stub_sec = *stub_sec_p;
+
   if (link_sec_p)
     *link_sec_p = link_sec;
 
-  return stub_sec;
+  return *stub_sec_p;
 }
 
 /* Add a new stub entry to the stub hash.  Not all fields of the new
    stub entry are initialised.  */
 
 static struct elf32_arm_stub_hash_entry *
-elf32_arm_add_stub (const char *stub_name,
-		    asection *section,
-		    struct elf32_arm_link_hash_table *htab)
+elf32_arm_add_stub (const char *stub_name, asection *section,
+		    struct elf32_arm_link_hash_table *htab,
+		    enum elf32_arm_stub_type stub_type)
 {
   asection *link_sec;
   asection *stub_sec;
   struct elf32_arm_stub_hash_entry *stub_entry;
 
-  stub_sec = elf32_arm_create_or_find_stub_sec (&link_sec, section, htab);
+  stub_sec = elf32_arm_create_or_find_stub_sec (&link_sec, section, htab,
+						stub_type);
   if (stub_sec == NULL)
     return NULL;
 
@@ -4049,14 +4489,15 @@ elf32_arm_add_stub (const char *stub_nam
 				     TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-			     section->owner,
-			     stub_name);
+      if (section == NULL)
+	section = stub_sec;
+      _bfd_error_handler (_("%s: cannot create stub entry %s"),
+			  section->owner, stub_name);
       return NULL;
     }
 
   stub_entry->stub_sec = stub_sec;
-  stub_entry->stub_offset = 0;
+  stub_entry->stub_offset = (bfd_vma) -1;
   stub_entry->id_sec = link_sec;
 
   return stub_entry;
@@ -4088,6 +4529,26 @@ put_thumb_insn (struct elf32_arm_link_ha
     bfd_putb16 (val, ptr);
 }
 
+/* Store a Thumb2 insn into an output section not processed by
+   elf32_arm_write_section.  */
+
+static void
+put_thumb2_insn (struct elf32_arm_link_hash_table * htab,
+		 bfd * output_bfd, bfd_vma val, bfd_byte * ptr)
+{
+  /* T2 instructions are 16-bit streamed.  */
+  if (htab->byteswap_code != bfd_little_endian (output_bfd))
+    {
+      bfd_putl16 ((val >> 16) & 0xffff, ptr);
+      bfd_putl16 ((val & 0xffff), ptr + 2);
+    }
+  else
+    {
+      bfd_putb16 ((val >> 16) & 0xffff, ptr);
+      bfd_putb16 ((val & 0xffff), ptr + 2);
+    }
+}
+
 /* If it's possible to change R_TYPE to a more efficient access
    model, return the new reloc type.  */
 
@@ -4097,7 +4558,8 @@ elf32_arm_tls_transition (struct bfd_lin
 {
   int is_local = (h == NULL);
 
-  if (info->shared || (h && h->root.type == bfd_link_hash_undefweak))
+  if (bfd_link_pic (info)
+      || (h && h->root.type == bfd_link_hash_undefweak))
     return r_type;
 
   /* We do not support relaxations for Old TLS models.  */
@@ -4133,6 +4595,8 @@ arm_stub_required_alignment (enum elf32_
     case arm_stub_long_branch_any_any:
     case arm_stub_long_branch_v4t_arm_thumb:
     case arm_stub_long_branch_thumb_only:
+    case arm_stub_long_branch_thumb2_only:
+    case arm_stub_long_branch_thumb2_only_pure:
     case arm_stub_long_branch_v4t_thumb_thumb:
     case arm_stub_long_branch_v4t_thumb_arm:
     case arm_stub_short_branch_v4t_thumb_arm:
@@ -4144,6 +4608,7 @@ arm_stub_required_alignment (enum elf32_
     case arm_stub_long_branch_thumb_only_pic:
     case arm_stub_long_branch_any_tls_pic:
     case arm_stub_long_branch_v4t_thumb_tls_pic:
+    case arm_stub_cmse_branch_thumb_only:
     case arm_stub_a8_veneer_blx:
       return 4;
 
@@ -4156,11 +4621,73 @@ arm_stub_required_alignment (enum elf32_
     }
 }
 
+/* Returns whether stubs of type STUB_TYPE take over the symbol they are
+   veneering (TRUE) or have their own symbol (FALSE).  */
+
+static bfd_boolean
+arm_stub_sym_claimed (enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return TRUE;
+
+    default:
+      return FALSE;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* Returns the padding needed for the dedicated section used stubs of type
+   STUB_TYPE.  */
+
+static int
+arm_dedicated_stub_section_padding (enum elf32_arm_stub_type stub_type)
+{
+  if (stub_type >= max_stub_type)
+    abort ();  /* Should be unreachable.  */
+
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return 32;
+
+    default:
+      return 0;
+    }
+
+  abort ();  /* Should be unreachable.  */
+}
+
+/* If veneers of type STUB_TYPE should go in a dedicated output section,
+   returns the address of the hash table field in HTAB holding the offset at
+   which new veneers should be layed out in the stub section.  */
+
+static bfd_vma*
+arm_new_stubs_start_offset_ptr (struct elf32_arm_link_hash_table *htab,
+				enum elf32_arm_stub_type stub_type)
+{
+  switch (stub_type)
+    {
+    case arm_stub_cmse_branch_thumb_only:
+      return &htab->new_cmse_stub_offset;
+
+    default:
+      BFD_ASSERT (!arm_dedicated_stub_output_section_required (stub_type));
+      return NULL;
+    }
+}
+
 static bfd_boolean
 arm_build_one_stub (struct bfd_hash_entry *gen_entry,
 		    void * in_arg)
 {
 #define MAXRELOCS 3
+  bfd_boolean removed_sg_veneer;
   struct elf32_arm_stub_hash_entry *stub_entry;
   struct elf32_arm_link_hash_table *globals;
   struct bfd_link_info *info;
@@ -4175,6 +4702,7 @@ arm_build_one_stub (struct bfd_hash_entr
   int stub_reloc_idx[MAXRELOCS] = {-1, -1};
   int stub_reloc_offset[MAXRELOCS] = {0, 0};
   int nrelocs = 0;
+  int just_allocated = 0;
 
   /* Massage our args to the form they really have.  */
   stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
@@ -4191,8 +4719,12 @@ arm_build_one_stub (struct bfd_hash_entr
     /* We have to do less-strictly-aligned fixes last.  */
     return TRUE;
 
-  /* Make a note of the offset within the stubs for this entry.  */
-  stub_entry->stub_offset = stub_sec->size;
+  /* Assign a slot at the end of section if none assigned yet.  */
+  if (stub_entry->stub_offset == (bfd_vma) -1)
+    {
+      stub_entry->stub_offset = stub_sec->size;
+      just_allocated = 1;
+    }
   loc = stub_sec->contents + stub_entry->stub_offset;
 
   stub_bfd = stub_sec->owner;
@@ -4266,7 +4798,8 @@ arm_build_one_stub (struct bfd_hash_entr
 	}
     }
 
-  stub_sec->size += size;
+  if (just_allocated)
+    stub_sec->size += size;
 
   /* Stub size has already been computed in arm_size_one_stub. Check
      consistency.  */
@@ -4276,70 +4809,43 @@ arm_build_one_stub (struct bfd_hash_entr
   if (stub_entry->branch_type == ST_BRANCH_TO_THUMB)
     sym_value |= 1;
 
-  /* Assume there is at least one and at most MAXRELOCS entries to relocate
-     in each stub.  */
-  BFD_ASSERT (nrelocs != 0 && nrelocs <= MAXRELOCS);
+  /* Assume non empty slots have at least one and at most MAXRELOCS entries
+     to relocate in each stub.  */
+  removed_sg_veneer =
+    (size == 0 && stub_entry->stub_type == arm_stub_cmse_branch_thumb_only);
+  BFD_ASSERT (removed_sg_veneer || (nrelocs != 0 && nrelocs <= MAXRELOCS));
 
   for (i = 0; i < nrelocs; i++)
-    if (template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP24
-	|| template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP19
-	|| template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_CALL
-	|| template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_XPC22)
-      {
-	Elf_Internal_Rela rel;
-	bfd_boolean unresolved_reloc;
-	char *error_message;
-	enum arm_st_branch_type branch_type
-	  = (template_sequence[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22
-	     ? ST_BRANCH_TO_THUMB : ST_BRANCH_TO_ARM);
-	bfd_vma points_to = sym_value + stub_entry->target_addend;
-
-	rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
-	rel.r_info = ELF32_R_INFO (0,
-				   template_sequence[stub_reloc_idx[i]].r_type);
-	rel.r_addend = template_sequence[stub_reloc_idx[i]].reloc_addend;
-
-	if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0)
-	  /* The first relocation in the elf32_arm_stub_a8_veneer_b_cond[]
-	     template should refer back to the instruction after the original
-	     branch.  */
-	  points_to = sym_value;
-
-	/* There may be unintended consequences if this is not true.  */
-	BFD_ASSERT (stub_entry->h == NULL);
-
-	/* Note: _bfd_final_link_relocate doesn't handle these relocations
-	   properly.  We should probably use this function unconditionally,
-	   rather than only for certain relocations listed in the enclosing
-	   conditional, for the sake of consistency.  */
-	elf32_arm_final_link_relocate (elf32_arm_howto_from_type
-	    (template_sequence[stub_reloc_idx[i]].r_type),
-	  stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
-	  points_to, info, stub_entry->target_section, "", STT_FUNC,
-	  branch_type, (struct elf_link_hash_entry *) stub_entry->h,
-	  &unresolved_reloc, &error_message);
-      }
-    else
-      {
-	Elf_Internal_Rela rel;
-	bfd_boolean unresolved_reloc;
-	char *error_message;
-	bfd_vma points_to = sym_value + stub_entry->target_addend
-	  + template_sequence[stub_reloc_idx[i]].reloc_addend;
-
-	rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
-	rel.r_info = ELF32_R_INFO (0,
-				   template_sequence[stub_reloc_idx[i]].r_type);
-	rel.r_addend = 0;
-
-	elf32_arm_final_link_relocate (elf32_arm_howto_from_type
-	    (template_sequence[stub_reloc_idx[i]].r_type),
-	  stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
-	  points_to, info, stub_entry->target_section, "", STT_FUNC,
-	  stub_entry->branch_type,
-	  (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
-	  &error_message);
-      }
+    {
+      Elf_Internal_Rela rel;
+      bfd_boolean unresolved_reloc;
+      char *error_message;
+      bfd_vma points_to =
+	sym_value + template_sequence[stub_reloc_idx[i]].reloc_addend;
+
+      rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
+      rel.r_info = ELF32_R_INFO (0,
+				 template_sequence[stub_reloc_idx[i]].r_type);
+      rel.r_addend = 0;
+
+      if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0)
+	/* The first relocation in the elf32_arm_stub_a8_veneer_b_cond[]
+	   template should refer back to the instruction after the original
+	   branch.  We use target_section as Cortex-A8 erratum workaround stubs
+	   are only generated when both source and target are in the same
+	   section.  */
+	points_to = stub_entry->target_section->output_section->vma
+		    + stub_entry->target_section->output_offset
+		    + stub_entry->source_value;
+
+      elf32_arm_final_link_relocate (elf32_arm_howto_from_type
+	  (template_sequence[stub_reloc_idx[i]].r_type),
+	   stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
+	   points_to, info, stub_entry->target_section, "", STT_FUNC,
+	   stub_entry->branch_type,
+	   (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
+	   &error_message);
+    }
 
   return TRUE;
 #undef MAXRELOCS
@@ -4409,9 +4915,17 @@ arm_size_one_stub (struct bfd_hash_entry
   size = find_stub_size_and_template (stub_entry->stub_type, &template_sequence,
 				      &template_size);
 
-  stub_entry->stub_size = size;
-  stub_entry->stub_template = template_sequence;
-  stub_entry->stub_template_size = template_size;
+  /* Initialized to -1.  Null size indicates an empty slot full of zeros.  */
+  if (stub_entry->stub_template_size)
+    {
+      stub_entry->stub_size = size;
+      stub_entry->stub_template = template_sequence;
+      stub_entry->stub_template_size = template_size;
+    }
+
+  /* Already accounted for.  */
+  if (stub_entry->stub_offset != (bfd_vma) -1)
+    return TRUE;
 
   size = (size + 7) & ~7;
   stub_entry->stub_sec->size += size;
@@ -4431,7 +4945,7 @@ elf32_arm_setup_section_lists (bfd *outp
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -4932,7 +5446,8 @@ cortex_a8_erratum_scan (bfd *input_bfd,
 			  a8_fixes[num_a8_fixes].input_bfd = input_bfd;
 			  a8_fixes[num_a8_fixes].section = section;
 			  a8_fixes[num_a8_fixes].offset = i;
-			  a8_fixes[num_a8_fixes].addend = offset;
+			  a8_fixes[num_a8_fixes].target_offset =
+			    target - base_vma;
 			  a8_fixes[num_a8_fixes].orig_insn = insn;
 			  a8_fixes[num_a8_fixes].stub_name = stub_name;
 			  a8_fixes[num_a8_fixes].stub_type = stub_type;
@@ -4961,25 +5476,617 @@ cortex_a8_erratum_scan (bfd *input_bfd,
   return FALSE;
 }
 
-/* Determine and set the size of the stub section for a final link.
+/* Create or update a stub entry depending on whether the stub can already be
+   found in HTAB.  The stub is identified by:
+   - its type STUB_TYPE
+   - its source branch (note that several can share the same stub) whose
+     section and relocation (if any) are given by SECTION and IRELA
+     respectively
+   - its target symbol whose input section, hash, name, value and branch type
+     are given in SYM_SEC, HASH, SYM_NAME, SYM_VALUE and BRANCH_TYPE
+     respectively
+
+   If found, the value of the stub's target symbol is updated from SYM_VALUE
+   and *NEW_STUB is set to FALSE.  Otherwise, *NEW_STUB is set to
+   TRUE and the stub entry is initialized.
 
-   The basic idea here is to examine all the relocations looking for
-   PC-relative calls to a target that is unreachable with a "bl"
-   instruction.  */
+   Returns the stub that was created or updated, or NULL if an error
+   occurred.  */
 
-bfd_boolean
-elf32_arm_size_stubs (bfd *output_bfd,
-		      bfd *stub_bfd,
-		      struct bfd_link_info *info,
-		      bfd_signed_vma group_size,
-		      asection * (*add_stub_section) (const char *, asection *,
-						      unsigned int),
-		      void (*layout_sections_again) (void))
+static struct elf32_arm_stub_hash_entry *
+elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab,
+		       enum elf32_arm_stub_type stub_type, asection *section,
+		       Elf_Internal_Rela *irela, asection *sym_sec,
+		       struct elf32_arm_link_hash_entry *hash, char *sym_name,
+		       bfd_vma sym_value, enum arm_st_branch_type branch_type,
+		       bfd_boolean *new_stub)
 {
-  bfd_size_type stub_group_size;
-  bfd_boolean stubs_always_after_branch;
-  struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
-  struct a8_erratum_fix *a8_fixes = NULL;
+  const asection *id_sec;
+  char *stub_name;
+  struct elf32_arm_stub_hash_entry *stub_entry;
+  unsigned int r_type;
+  bfd_boolean sym_claimed = arm_stub_sym_claimed (stub_type);
+
+  BFD_ASSERT (stub_type != arm_stub_none);
+  *new_stub = FALSE;
+
+  if (sym_claimed)
+    stub_name = sym_name;
+  else
+    {
+      BFD_ASSERT (irela);
+      BFD_ASSERT (section);
+      BFD_ASSERT (section->id <= htab->top_id);
+
+      /* Support for grouping stub sections.  */
+      id_sec = htab->stub_group[section->id].link_sec;
+
+      /* Get the name of this stub.  */
+      stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash, irela,
+				       stub_type);
+      if (!stub_name)
+	return NULL;
+    }
+
+  stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, FALSE,
+				     FALSE);
+  /* The proper stub has already been created, just update its value.  */
+  if (stub_entry != NULL)
+    {
+      if (!sym_claimed)
+	free (stub_name);
+      stub_entry->target_value = sym_value;
+      return stub_entry;
+    }
+
+  stub_entry = elf32_arm_add_stub (stub_name, section, htab, stub_type);
+  if (stub_entry == NULL)
+    {
+      if (!sym_claimed)
+	free (stub_name);
+      return NULL;
+    }
+
+  stub_entry->target_value = sym_value;
+  stub_entry->target_section = sym_sec;
+  stub_entry->stub_type = stub_type;
+  stub_entry->h = hash;
+  stub_entry->branch_type = branch_type;
+
+  if (sym_claimed)
+    stub_entry->output_name = sym_name;
+  else
+    {
+      if (sym_name == NULL)
+	sym_name = "unnamed";
+      stub_entry->output_name = (char *)
+	bfd_alloc (htab->stub_bfd, sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
+				   + strlen (sym_name));
+      if (stub_entry->output_name == NULL)
+	{
+	  free (stub_name);
+	  return NULL;
+	}
+
+      /* For historical reasons, use the existing names for ARM-to-Thumb and
+	 Thumb-to-ARM stubs.  */
+      r_type = ELF32_R_TYPE (irela->r_info);
+      if ((r_type == (unsigned int) R_ARM_THM_CALL
+	   || r_type == (unsigned int) R_ARM_THM_JUMP24
+	   || r_type == (unsigned int) R_ARM_THM_JUMP19)
+	  && branch_type == ST_BRANCH_TO_ARM)
+	sprintf (stub_entry->output_name, THUMB2ARM_GLUE_ENTRY_NAME, sym_name);
+      else if ((r_type == (unsigned int) R_ARM_CALL
+		|| r_type == (unsigned int) R_ARM_JUMP24)
+	       && branch_type == ST_BRANCH_TO_THUMB)
+	sprintf (stub_entry->output_name, ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
+      else
+	sprintf (stub_entry->output_name, STUB_ENTRY_NAME, sym_name);
+    }
+
+  *new_stub = TRUE;
+  return stub_entry;
+}
+
+/* Scan symbols in INPUT_BFD to identify secure entry functions needing a
+   gateway veneer to transition from non secure to secure state and create them
+   accordingly.
+
+   "ARMv8-M Security Extensions: Requirements on Development Tools" document
+   defines the conditions that govern Secure Gateway veneer creation for a
+   given symbol <SYM> as follows:
+   - it has function type
+   - it has non local binding
+   - a symbol named __acle_se_<SYM> (called special symbol) exists with the
+     same type, binding and value as <SYM> (called normal symbol).
+   An entry function can handle secure state transition itself in which case
+   its special symbol would have a different value from the normal symbol.
+
+   OUT_ATTR gives the output attributes, SYM_HASHES the symbol index to hash
+   entry mapping while HTAB gives the name to hash entry mapping.
+   *CMSE_STUB_CREATED is increased by the number of secure gateway veneer
+   created.
+
+   The return value gives whether a stub failed to be allocated.  */
+
+static bfd_boolean
+cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab,
+	   obj_attribute *out_attr, struct elf_link_hash_entry **sym_hashes,
+	   int *cmse_stub_created)
+{
+  const struct elf_backend_data *bed;
+  Elf_Internal_Shdr *symtab_hdr;
+  unsigned i, j, sym_count, ext_start;
+  Elf_Internal_Sym *cmse_sym, *local_syms;
+  struct elf32_arm_link_hash_entry *hash, *cmse_hash = NULL;
+  enum arm_st_branch_type branch_type;
+  char *sym_name, *lsym_name;
+  bfd_vma sym_value;
+  asection *section;
+  struct elf32_arm_stub_hash_entry *stub_entry;
+  bfd_boolean is_v8m, new_stub, cmse_invalid, ret = TRUE;
+
+  bed = get_elf_backend_data (input_bfd);
+  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+  sym_count = symtab_hdr->sh_size / bed->s->sizeof_sym;
+  ext_start = symtab_hdr->sh_info;
+  is_v8m = (out_attr[Tag_CPU_arch].i >= TAG_CPU_ARCH_V8M_BASE
+	    && out_attr[Tag_CPU_arch_profile].i == 'M');
+
+  local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+  if (local_syms == NULL)
+    local_syms = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+				       symtab_hdr->sh_info, 0, NULL, NULL,
+				       NULL);
+  if (symtab_hdr->sh_info && local_syms == NULL)
+    return FALSE;
+
+  /* Scan symbols.  */
+  for (i = 0; i < sym_count; i++)
+    {
+      cmse_invalid = FALSE;
+
+      if (i < ext_start)
+	{
+	  cmse_sym = &local_syms[i];
+	  /* Not a special symbol.  */
+	  if (!ARM_GET_SYM_CMSE_SPCL (cmse_sym->st_target_internal))
+	    continue;
+	  sym_name = bfd_elf_string_from_elf_section (input_bfd,
+						      symtab_hdr->sh_link,
+						      cmse_sym->st_name);
+	  /* Special symbol with local binding.  */
+	  cmse_invalid = TRUE;
+	}
+      else
+	{
+	  cmse_hash = elf32_arm_hash_entry (sym_hashes[i - ext_start]);
+	  sym_name = (char *) cmse_hash->root.root.root.string;
+
+	  /* Not a special symbol.  */
+	  if (!ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
+	    continue;
+
+	  /* Special symbol has incorrect binding or type.  */
+	  if ((cmse_hash->root.root.type != bfd_link_hash_defined
+	       && cmse_hash->root.root.type != bfd_link_hash_defweak)
+	      || cmse_hash->root.type != STT_FUNC)
+	    cmse_invalid = TRUE;
+	}
+
+      if (!is_v8m)
+	{
+	  _bfd_error_handler (_("%B: Special symbol `%s' only allowed for "
+				"ARMv8-M architecture or later."),
+			      input_bfd, sym_name);
+	  is_v8m = TRUE; /* Avoid multiple warning.  */
+	  ret = FALSE;
+	}
+
+      if (cmse_invalid)
+	{
+	  _bfd_error_handler (_("%B: invalid special symbol `%s'."),
+			      input_bfd, sym_name);
+	  _bfd_error_handler (_("It must be a global or weak function "
+				"symbol."));
+	  ret = FALSE;
+	  if (i < ext_start)
+	    continue;
+	}
+
+      sym_name += strlen (CMSE_PREFIX);
+      hash = (struct elf32_arm_link_hash_entry *)
+	elf_link_hash_lookup (&(htab)->root, sym_name, FALSE, FALSE, TRUE);
+
+      /* No associated normal symbol or it is neither global nor weak.  */
+      if (!hash
+	  || (hash->root.root.type != bfd_link_hash_defined
+	      && hash->root.root.type != bfd_link_hash_defweak)
+	  || hash->root.type != STT_FUNC)
+	{
+	  /* Initialize here to avoid warning about use of possibly
+	     uninitialized variable.  */
+	  j = 0;
+
+	  if (!hash)
+	    {
+	      /* Searching for a normal symbol with local binding.  */
+	      for (; j < ext_start; j++)
+		{
+		  lsym_name =
+		    bfd_elf_string_from_elf_section (input_bfd,
+						     symtab_hdr->sh_link,
+						     local_syms[j].st_name);
+		  if (!strcmp (sym_name, lsym_name))
+		    break;
+		}
+	    }
+
+	  if (hash || j < ext_start)
+	    {
+	      _bfd_error_handler
+		(_("%B: invalid standard symbol `%s'."), input_bfd, sym_name);
+	      _bfd_error_handler
+		(_("It must be a global or weak function symbol."));
+	    }
+	  else
+	    _bfd_error_handler
+	      (_("%B: absent standard symbol `%s'."), input_bfd, sym_name);
+	  ret = FALSE;
+	  if (!hash)
+	    continue;
+	}
+
+      sym_value = hash->root.root.u.def.value;
+      section = hash->root.root.u.def.section;
+
+      if (cmse_hash->root.root.u.def.section != section)
+	{
+	  _bfd_error_handler
+	    (_("%B: `%s' and its special symbol are in different sections."),
+	     input_bfd, sym_name);
+	  ret = FALSE;
+	}
+      if (cmse_hash->root.root.u.def.value != sym_value)
+	continue; /* Ignore: could be an entry function starting with SG.  */
+
+	/* If this section is a link-once section that will be discarded, then
+	   don't create any stubs.  */
+      if (section->output_section == NULL)
+	{
+	  _bfd_error_handler
+	    (_("%B: entry function `%s' not output."), input_bfd, sym_name);
+	  continue;
+	}
+
+      if (hash->root.size == 0)
+	{
+	  _bfd_error_handler
+	    (_("%B: entry function `%s' is empty."), input_bfd, sym_name);
+	  ret = FALSE;
+	}
+
+      if (!ret)
+	continue;
+      branch_type = ARM_GET_SYM_BRANCH_TYPE (hash->root.target_internal);
+      stub_entry
+	= elf32_arm_create_stub (htab, arm_stub_cmse_branch_thumb_only,
+				 NULL, NULL, section, hash, sym_name,
+				 sym_value, branch_type, &new_stub);
+
+      if (stub_entry == NULL)
+	 ret = FALSE;
+      else
+	{
+	  BFD_ASSERT (new_stub);
+	  (*cmse_stub_created)++;
+	}
+    }
+
+  if (!symtab_hdr->contents)
+    free (local_syms);
+  return ret;
+}
+
+/* Return TRUE iff a symbol identified by its linker HASH entry is a secure
+   code entry function, ie can be called from non secure code without using a
+   veneer.  */
+
+static bfd_boolean
+cmse_entry_fct_p (struct elf32_arm_link_hash_entry *hash)
+{
+  bfd_byte contents[4];
+  uint32_t first_insn;
+  asection *section;
+  file_ptr offset;
+  bfd *abfd;
+
+  /* Defined symbol of function type.  */
+  if (hash->root.root.type != bfd_link_hash_defined
+      && hash->root.root.type != bfd_link_hash_defweak)
+    return FALSE;
+  if (hash->root.type != STT_FUNC)
+    return FALSE;
+
+  /* Read first instruction.  */
+  section = hash->root.root.u.def.section;
+  abfd = section->owner;
+  offset = hash->root.root.u.def.value - section->vma;
+  if (!bfd_get_section_contents (abfd, section, contents, offset,
+				 sizeof (contents)))
+    return FALSE;
+
+  first_insn = bfd_get_32 (abfd, contents);
+
+  /* Starts by SG instruction.  */
+  return first_insn == 0xe97fe97f;
+}
+
+/* Output the name (in symbol table) of the veneer GEN_ENTRY if it is a new
+   secure gateway veneers (ie. the veneers was not in the input import library)
+   and there is no output import library (GEN_INFO->out_implib_bfd is NULL.  */
+
+static bfd_boolean
+arm_list_new_cmse_stub (struct bfd_hash_entry *gen_entry, void *gen_info)
+{
+  struct elf32_arm_stub_hash_entry *stub_entry;
+  struct bfd_link_info *info;
+
+  /* Massage our args to the form they really have.  */
+  stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
+  info = (struct bfd_link_info *) gen_info;
+
+  if (info->out_implib_bfd)
+    return TRUE;
+
+  if (stub_entry->stub_type != arm_stub_cmse_branch_thumb_only)
+    return TRUE;
+
+  if (stub_entry->stub_offset == (bfd_vma) -1)
+    _bfd_error_handler ("  %s", stub_entry->output_name);
+
+  return TRUE;
+}
+
+/* Set offset of each secure gateway veneers so that its address remain
+   identical to the one in the input import library referred by
+   HTAB->in_implib_bfd.  A warning is issued for veneers that disappeared
+   (present in input import library but absent from the executable being
+   linked) or if new veneers appeared and there is no output import library
+   (INFO->out_implib_bfd is NULL and *CMSE_STUB_CREATED is bigger than the
+   number of secure gateway veneers found in the input import library.
+
+   The function returns whether an error occurred.  If no error occurred,
+   *CMSE_STUB_CREATED gives the number of SG veneers created by both cmse_scan
+   and this function and HTAB->new_cmse_stub_offset is set to the biggest
+   veneer observed set for new veneers to be layed out after.  */
+
+static bfd_boolean
+set_cmse_veneer_addr_from_implib (struct bfd_link_info *info,
+				  struct elf32_arm_link_hash_table *htab,
+				  int *cmse_stub_created)
+{
+  long symsize;
+  char *sym_name;
+  flagword flags;
+  long i, symcount;
+  bfd *in_implib_bfd;
+  asection *stub_out_sec;
+  bfd_boolean ret = TRUE;
+  Elf_Internal_Sym *intsym;
+  const char *out_sec_name;
+  bfd_size_type cmse_stub_size;
+  asymbol **sympp = NULL, *sym;
+  struct elf32_arm_link_hash_entry *hash;
+  const insn_sequence *cmse_stub_template;
+  struct elf32_arm_stub_hash_entry *stub_entry;
+  int cmse_stub_template_size, new_cmse_stubs_created = *cmse_stub_created;
+  bfd_vma veneer_value, stub_offset, next_cmse_stub_offset;
+  bfd_vma cmse_stub_array_start = (bfd_vma) -1, cmse_stub_sec_vma = 0;
+
+  /* No input secure gateway import library.  */
+  if (!htab->in_implib_bfd)
+    return TRUE;
+
+  in_implib_bfd = htab->in_implib_bfd;
+  if (!htab->cmse_implib)
+    {
+      _bfd_error_handler (_("%B: --in-implib only supported for Secure "
+			    "Gateway import libraries."), in_implib_bfd);
+      return FALSE;
+    }
+
+  /* Get symbol table size.  */
+  symsize = bfd_get_symtab_upper_bound (in_implib_bfd);
+  if (symsize < 0)
+    return FALSE;
+
+  /* Read in the input secure gateway import library's symbol table.  */
+  sympp = (asymbol **) xmalloc (symsize);
+  symcount = bfd_canonicalize_symtab (in_implib_bfd, sympp);
+  if (symcount < 0)
+    {
+      ret = FALSE;
+      goto free_sym_buf;
+    }
+
+  htab->new_cmse_stub_offset = 0;
+  cmse_stub_size =
+    find_stub_size_and_template (arm_stub_cmse_branch_thumb_only,
+				 &cmse_stub_template,
+				 &cmse_stub_template_size);
+  out_sec_name =
+    arm_dedicated_stub_output_section_name (arm_stub_cmse_branch_thumb_only);
+  stub_out_sec =
+    bfd_get_section_by_name (htab->obfd, out_sec_name);
+  if (stub_out_sec != NULL)
+    cmse_stub_sec_vma = stub_out_sec->vma;
+
+  /* Set addresses of veneers mentionned in input secure gateway import
+     library's symbol table.  */
+  for (i = 0; i < symcount; i++)
+    {
+      sym = sympp[i];
+      flags = sym->flags;
+      sym_name = (char *) bfd_asymbol_name (sym);
+      intsym = &((elf_symbol_type *) sym)->internal_elf_sym;
+
+      if (sym->section != bfd_abs_section_ptr
+	  || !(flags & (BSF_GLOBAL | BSF_WEAK))
+	  || (flags & BSF_FUNCTION) != BSF_FUNCTION
+	  || (ARM_GET_SYM_BRANCH_TYPE (intsym->st_target_internal)
+	      != ST_BRANCH_TO_THUMB))
+	{
+	  _bfd_error_handler (_("%B: invalid import library entry: `%s'."),
+			      in_implib_bfd, sym_name);
+	  _bfd_error_handler (_("Symbol should be absolute, global and "
+				"refer to Thumb functions."));
+	  ret = FALSE;
+	  continue;
+	}
+
+      veneer_value = bfd_asymbol_value (sym);
+      stub_offset = veneer_value - cmse_stub_sec_vma;
+      stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, sym_name,
+					 FALSE, FALSE);
+      hash = (struct elf32_arm_link_hash_entry *)
+	elf_link_hash_lookup (&(htab)->root, sym_name, FALSE, FALSE, TRUE);
+
+      /* Stub entry should have been created by cmse_scan or the symbol be of
+	 a secure function callable from non secure code.  */
+      if (!stub_entry && !hash)
+	{
+	  bfd_boolean new_stub;
+
+	  _bfd_error_handler
+	    (_("Entry function `%s' disappeared from secure code."), sym_name);
+	  hash = (struct elf32_arm_link_hash_entry *)
+	    elf_link_hash_lookup (&(htab)->root, sym_name, TRUE, TRUE, TRUE);
+	  stub_entry
+	    = elf32_arm_create_stub (htab, arm_stub_cmse_branch_thumb_only,
+				     NULL, NULL, bfd_abs_section_ptr, hash,
+				     sym_name, veneer_value,
+				     ST_BRANCH_TO_THUMB, &new_stub);
+	  if (stub_entry == NULL)
+	    ret = FALSE;
+	  else
+	  {
+	    BFD_ASSERT (new_stub);
+	    new_cmse_stubs_created++;
+	    (*cmse_stub_created)++;
+	  }
+	  stub_entry->stub_template_size = stub_entry->stub_size = 0;
+	  stub_entry->stub_offset = stub_offset;
+	}
+      /* Symbol found is not callable from non secure code.  */
+      else if (!stub_entry)
+	{
+	  if (!cmse_entry_fct_p (hash))
+	    {
+	      _bfd_error_handler (_("`%s' refers to a non entry function."),
+				  sym_name);
+	      ret = FALSE;
+	    }
+	  continue;
+	}
+      else
+	{
+	  /* Only stubs for SG veneers should have been created.  */
+	  BFD_ASSERT (stub_entry->stub_type == arm_stub_cmse_branch_thumb_only);
+
+	  /* Check visibility hasn't changed.  */
+	  if (!!(flags & BSF_GLOBAL)
+	      != (hash->root.root.type == bfd_link_hash_defined))
+	    _bfd_error_handler
+	      (_("%B: visibility of symbol `%s' has changed."), in_implib_bfd,
+	       sym_name);
+
+	  stub_entry->stub_offset = stub_offset;
+	}
+
+      /* Size should match that of a SG veneer.  */
+      if (intsym->st_size != cmse_stub_size)
+	{
+	  _bfd_error_handler (_("%B: incorrect size for symbol `%s'."),
+			      in_implib_bfd, sym_name);
+	  ret = FALSE;
+	}
+
+      /* Previous veneer address is before current SG veneer section.  */
+      if (veneer_value < cmse_stub_sec_vma)
+	{
+	  /* Avoid offset underflow.  */
+	  if (stub_entry)
+	    stub_entry->stub_offset = 0;
+	  stub_offset = 0;
+	  ret = FALSE;
+	}
+
+      /* Complain if stub offset not a multiple of stub size.  */
+      if (stub_offset % cmse_stub_size)
+	{
+	  _bfd_error_handler
+	    (_("Offset of veneer for entry function `%s' not a multiple of "
+	       "its size."), sym_name);
+	  ret = FALSE;
+	}
+
+      if (!ret)
+	continue;
+
+      new_cmse_stubs_created--;
+      if (veneer_value < cmse_stub_array_start)
+	cmse_stub_array_start = veneer_value;
+      next_cmse_stub_offset = stub_offset + ((cmse_stub_size + 7) & ~7);
+      if (next_cmse_stub_offset > htab->new_cmse_stub_offset)
+	htab->new_cmse_stub_offset = next_cmse_stub_offset;
+    }
+
+  if (!info->out_implib_bfd && new_cmse_stubs_created != 0)
+    {
+      BFD_ASSERT (new_cmse_stubs_created > 0);
+      _bfd_error_handler
+	(_("new entry function(s) introduced but no output import library "
+	   "specified:"));
+      bfd_hash_traverse (&htab->stub_hash_table, arm_list_new_cmse_stub, info);
+    }
+
+  if (cmse_stub_array_start != cmse_stub_sec_vma)
+    {
+      _bfd_error_handler
+	(_("Start address of `%s' is different from previous link."),
+	 out_sec_name);
+      ret = FALSE;
+    }
+
+free_sym_buf:
+  free (sympp);
+  return ret;
+}
+
+/* Determine and set the size of the stub section for a final link.
+
+   The basic idea here is to examine all the relocations looking for
+   PC-relative calls to a target that is unreachable with a "bl"
+   instruction.  */
+
+bfd_boolean
+elf32_arm_size_stubs (bfd *output_bfd,
+		      bfd *stub_bfd,
+		      struct bfd_link_info *info,
+		      bfd_signed_vma group_size,
+		      asection * (*add_stub_section) (const char *, asection *,
+						      asection *,
+						      unsigned int),
+		      void (*layout_sections_again) (void))
+{
+  bfd_boolean ret = TRUE;
+  obj_attribute *out_attr;
+  int cmse_stub_created = 0;
+  bfd_size_type stub_group_size;
+  bfd_boolean m_profile, stubs_always_after_branch, first_veneer_scan = TRUE;
+  struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
+  struct a8_erratum_fix *a8_fixes = NULL;
   unsigned int num_a8_fixes = 0, a8_fix_table_size = 10;
   struct a8_erratum_reloc *a8_relocs = NULL;
   unsigned int num_a8_relocs = 0, a8_reloc_table_size = 10, i;
@@ -5006,6 +6113,9 @@ elf32_arm_size_stubs (bfd *output_bfd,
   htab->layout_sections_again = layout_sections_again;
   stubs_always_after_branch = group_size < 0;
 
+  out_attr = elf_known_obj_attributes_proc (output_bfd);
+  m_profile = out_attr[Tag_CPU_arch_profile].i == 'M';
+
   /* The Cortex-A8 erratum fix depends on stubs not being in the same 4K page
      as the first half of a 32-bit branch straddling two 4K pages.  This is a
      crude way of enforcing that.  */
@@ -5048,6 +6158,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
       bfd *input_bfd;
       unsigned int bfd_indx;
       asection *stub_sec;
+      enum elf32_arm_stub_type stub_type;
       bfd_boolean stub_changed = FALSE;
       unsigned prev_num_a8_fixes = num_a8_fixes;
 
@@ -5070,6 +6181,21 @@ elf32_arm_size_stubs (bfd *output_bfd,
 	  if (symtab_hdr->sh_info == 0)
 	    continue;
 
+	  /* Limit scan of symbols to object file whose profile is
+	     Microcontroller to not hinder performance in the general case.  */
+	  if (m_profile && first_veneer_scan)
+	    {
+	      struct elf_link_hash_entry **sym_hashes;
+
+	      sym_hashes = elf_sym_hashes (input_bfd);
+	      if (!cmse_scan (input_bfd, htab, out_attr, sym_hashes,
+			      &cmse_stub_created))
+		goto error_ret_free_local;
+
+	      if (cmse_stub_created != 0)
+		stub_changed = TRUE;
+	    }
+
 	  /* Walk over each section attached to the input bfd.  */
 	  for (section = input_bfd->sections;
 	       section != NULL;
@@ -5103,15 +6229,11 @@ elf32_arm_size_stubs (bfd *output_bfd,
 	      for (; irela < irelaend; irela++)
 		{
 		  unsigned int r_type, r_indx;
-		  enum elf32_arm_stub_type stub_type;
-		  struct elf32_arm_stub_hash_entry *stub_entry;
 		  asection *sym_sec;
 		  bfd_vma sym_value;
 		  bfd_vma destination;
 		  struct elf32_arm_link_hash_entry *hash;
 		  const char *sym_name;
-		  char *stub_name;
-		  const asection *id_sec;
 		  unsigned char st_type;
 		  enum arm_st_branch_type branch_type;
 		  bfd_boolean created_stub = FALSE;
@@ -5125,7 +6247,13 @@ elf32_arm_size_stubs (bfd *output_bfd,
 		    error_ret_free_internal:
 		      if (elf_section_data (section)->relocs == NULL)
 			free (internal_relocs);
-		      goto error_ret_free_local;
+		    /* Fall through.  */
+		    error_ret_free_local:
+		      if (local_syms != NULL
+			  && (symtab_hdr->contents
+			      != (unsigned char *) local_syms))
+			free (local_syms);
+		      return FALSE;
 		    }
 
 		  hash = NULL;
@@ -5213,7 +6341,8 @@ elf32_arm_size_stubs (bfd *output_bfd,
 				     + sym_sec->output_offset
 				     + sym_sec->output_section->vma);
 		      st_type = ELF_ST_TYPE (sym->st_info);
-		      branch_type = ARM_SYM_BRANCH_TYPE (sym);
+		      branch_type =
+			ARM_GET_SYM_BRANCH_TYPE (sym->st_target_internal);
 		      sym_name
 			= bfd_elf_string_from_elf_section (input_bfd,
 							   symtab_hdr->sh_link,
@@ -5288,12 +6417,16 @@ elf32_arm_size_stubs (bfd *output_bfd,
 			  goto error_ret_free_internal;
 			}
 		      st_type = hash->root.type;
-		      branch_type = hash->root.target_internal;
+		      branch_type =
+			ARM_GET_SYM_BRANCH_TYPE (hash->root.target_internal);
 		      sym_name = hash->root.root.root.string;
 		    }
 
 		  do
 		    {
+		      bfd_boolean new_stub;
+		      struct elf32_arm_stub_hash_entry *stub_entry;
+
 		      /* Determine what (if any) linker stub is needed.  */
 		      stub_type = arm_type_of_stub (info, section, irela,
 						    st_type, &branch_type,
@@ -5302,74 +6435,21 @@ elf32_arm_size_stubs (bfd *output_bfd,
 		      if (stub_type == arm_stub_none)
 			break;
 
-		      /* Support for grouping stub sections.  */
-		      id_sec = htab->stub_group[section->id].link_sec;
-
-		      /* Get the name of this stub.  */
-		      stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash,
-						       irela, stub_type);
-		      if (!stub_name)
-			goto error_ret_free_internal;
-
 		      /* We've either created a stub for this reloc already,
 			 or we are about to.  */
-		      created_stub = TRUE;
-
-		      stub_entry = arm_stub_hash_lookup
-				     (&htab->stub_hash_table, stub_name,
-				      FALSE, FALSE);
-		      if (stub_entry != NULL)
-			{
-			  /* The proper stub has already been created.  */
-			  free (stub_name);
-			  stub_entry->target_value = sym_value;
-			  break;
-			}
-
-		      stub_entry = elf32_arm_add_stub (stub_name, section,
-						       htab);
-		      if (stub_entry == NULL)
-			{
-			  free (stub_name);
-			  goto error_ret_free_internal;
-			}
-
-		      stub_entry->target_value = sym_value;
-		      stub_entry->target_section = sym_sec;
-		      stub_entry->stub_type = stub_type;
-		      stub_entry->h = hash;
-		      stub_entry->branch_type = branch_type;
-
-		      if (sym_name == NULL)
-			sym_name = "unnamed";
-		      stub_entry->output_name = (char *)
-			  bfd_alloc (htab->stub_bfd,
-				     sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
-				     + strlen (sym_name));
-		      if (stub_entry->output_name == NULL)
-			{
-			  free (stub_name);
-			  goto error_ret_free_internal;
-			}
+		      stub_entry =
+			elf32_arm_create_stub (htab, stub_type, section, irela,
+					       sym_sec, hash,
+					       (char *) sym_name, sym_value,
+					       branch_type, &new_stub);
 
-		      /* For historical reasons, use the existing names for
-			 ARM-to-Thumb and Thumb-to-ARM stubs.  */
-		      if ((r_type == (unsigned int) R_ARM_THM_CALL
-			   || r_type == (unsigned int) R_ARM_THM_JUMP24
-                           || r_type == (unsigned int) R_ARM_THM_JUMP19)
-			  && branch_type == ST_BRANCH_TO_ARM)
-			sprintf (stub_entry->output_name,
-				 THUMB2ARM_GLUE_ENTRY_NAME, sym_name);
-		      else if ((r_type == (unsigned int) R_ARM_CALL
-			       || r_type == (unsigned int) R_ARM_JUMP24)
-			       && branch_type == ST_BRANCH_TO_THUMB)
-			sprintf (stub_entry->output_name,
-				 ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
+		      created_stub = stub_entry != NULL;
+		      if (!created_stub)
+			goto error_ret_free_internal;
+		      else if (!new_stub)
+			break;
 		      else
-			sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
-				 sym_name);
-
-		      stub_changed = TRUE;
+			stub_changed = TRUE;
 		    }
 		  while (0);
 
@@ -5434,8 +6514,22 @@ elf32_arm_size_stubs (bfd *output_bfd,
 		  != 0)
 		goto error_ret_free_local;
 	    }
+
+	  if (local_syms != NULL
+	      && symtab_hdr->contents != (unsigned char *) local_syms)
+	    {
+	      if (!info->keep_memory)
+		free (local_syms);
+	      else
+		symtab_hdr->contents = (unsigned char *) local_syms;
+	    }
 	}
 
+      if (first_veneer_scan
+	  && !set_cmse_veneer_addr_from_implib (info, htab,
+						&cmse_stub_created))
+	ret = FALSE;
+
       if (prev_num_a8_fixes != num_a8_fixes)
 	stub_changed = TRUE;
 
@@ -5455,17 +6549,55 @@ elf32_arm_size_stubs (bfd *output_bfd,
 	  stub_sec->size = 0;
 	}
 
+      /* Add new SG veneers after those already in the input import
+	 library.  */
+      for (stub_type = arm_stub_none + 1; stub_type < max_stub_type;
+	   stub_type++)
+	{
+	  bfd_vma *start_offset_p;
+	  asection **stub_sec_p;
+
+	  start_offset_p = arm_new_stubs_start_offset_ptr (htab, stub_type);
+	  stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
+	  if (start_offset_p == NULL)
+	    continue;
+
+	  BFD_ASSERT (stub_sec_p != NULL);
+	  if (*stub_sec_p != NULL)
+	    (*stub_sec_p)->size = *start_offset_p;
+	}
+
+      /* Compute stub section size, considering padding.  */
       bfd_hash_traverse (&htab->stub_hash_table, arm_size_one_stub, htab);
+      for (stub_type = arm_stub_none + 1; stub_type < max_stub_type;
+	   stub_type++)
+	{
+	  int size, padding;
+	  asection **stub_sec_p;
+
+	  padding = arm_dedicated_stub_section_padding (stub_type);
+	  stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
+	  /* Skip if no stub input section or no stub section padding
+	     required.  */
+	  if ((stub_sec_p != NULL && *stub_sec_p == NULL) || padding == 0)
+	    continue;
+	  /* Stub section padding required but no dedicated section.  */
+	  BFD_ASSERT (stub_sec_p);
+
+	  size = (*stub_sec_p)->size;
+	  size = (size + padding - 1) & ~(padding - 1);
+	  (*stub_sec_p)->size = size;
+	}
 
       /* Add Cortex-A8 erratum veneers to stub section sizes too.  */
       if (htab->fix_cortex_a8)
 	for (i = 0; i < num_a8_fixes; i++)
 	  {
 	    stub_sec = elf32_arm_create_or_find_stub_sec (NULL,
-			 a8_fixes[i].section, htab);
+			 a8_fixes[i].section, htab, a8_fixes[i].stub_type);
 
 	    if (stub_sec == NULL)
-	      goto error_ret_free_local;
+	      return FALSE;
 
 	    stub_sec->size
 	      += find_stub_size_and_template (a8_fixes[i].stub_type, NULL,
@@ -5475,6 +6607,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
 
       /* Ask the linker to do its stuff.  */
       (*htab->layout_sections_again) ();
+      first_veneer_scan = FALSE;
     }
 
   /* Add stubs for Cortex-A8 erratum fixes now.  */
@@ -5495,19 +6628,18 @@ elf32_arm_size_stubs (bfd *output_bfd,
 					     TRUE, FALSE);
 	  if (stub_entry == NULL)
 	    {
-	      (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-				     section->owner,
-				     stub_name);
+	      _bfd_error_handler (_("%s: cannot create stub entry %s"),
+				  section->owner, stub_name);
 	      return FALSE;
 	    }
 
 	  stub_entry->stub_sec = stub_sec;
-	  stub_entry->stub_offset = 0;
+	  stub_entry->stub_offset = (bfd_vma) -1;
 	  stub_entry->id_sec = link_sec;
 	  stub_entry->stub_type = a8_fixes[i].stub_type;
+	  stub_entry->source_value = a8_fixes[i].offset;
 	  stub_entry->target_section = a8_fixes[i].section;
-	  stub_entry->target_value = a8_fixes[i].offset;
-	  stub_entry->target_addend = a8_fixes[i].addend;
+	  stub_entry->target_value = a8_fixes[i].target_offset;
 	  stub_entry->orig_insn = a8_fixes[i].orig_insn;
 	  stub_entry->branch_type = a8_fixes[i].branch_type;
 
@@ -5530,10 +6662,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
       htab->a8_erratum_fixes = NULL;
       htab->num_a8_erratum_fixes = 0;
     }
-  return TRUE;
-
- error_ret_free_local:
-  return FALSE;
+  return ret;
 }
 
 /* Build all the stubs associated with the current output file.  The
@@ -5547,6 +6676,7 @@ elf32_arm_build_stubs (struct bfd_link_i
 {
   asection *stub_sec;
   struct bfd_hash_table *table;
+  enum elf32_arm_stub_type stub_type;
   struct elf32_arm_link_hash_table *htab;
 
   htab = elf32_arm_hash_table (info);
@@ -5563,14 +6693,34 @@ elf32_arm_build_stubs (struct bfd_link_i
       if (!strstr (stub_sec->name, STUB_SUFFIX))
 	continue;
 
-      /* Allocate memory to hold the linker stubs.  */
+      /* Allocate memory to hold the linker stubs.  Zeroing the stub sections
+	 must at least be done for stub section requiring padding and for SG
+	 veneers to ensure that a non secure code branching to a removed SG
+	 veneer causes an error.  */
       size = stub_sec->size;
       stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size);
       if (stub_sec->contents == NULL && size != 0)
 	return FALSE;
+
       stub_sec->size = 0;
     }
 
+  /* Add new SG veneers after those already in the input import library.  */
+  for (stub_type = arm_stub_none + 1; stub_type < max_stub_type; stub_type++)
+    {
+      bfd_vma *start_offset_p;
+      asection **stub_sec_p;
+
+      start_offset_p = arm_new_stubs_start_offset_ptr (htab, stub_type);
+      stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
+      if (start_offset_p == NULL)
+	continue;
+
+      BFD_ASSERT (stub_sec_p != NULL);
+      if (*stub_sec_p != NULL)
+	(*stub_sec_p)->size = *start_offset_p;
+    }
+
   /* Build the stubs as directed by the stub hash table.  */
   table = &htab->stub_hash_table;
   bfd_hash_traverse (table, arm_build_one_stub, info);
@@ -5717,6 +6867,8 @@ static const insn16 t2a2_noop_insn = 0x4
 static const insn32 t2a3_b_insn = 0xea000000;
 
 #define VFP11_ERRATUM_VENEER_SIZE 8
+#define STM32L4XX_ERRATUM_LDM_VENEER_SIZE 16
+#define STM32L4XX_ERRATUM_VLDM_VENEER_SIZE 24
 
 #define ARM_BX_VENEER_SIZE 12
 static const insn32 armbx1_tst_insn = 0xe3100001;
@@ -5774,6 +6926,10 @@ bfd_elf32_arm_allocate_interworking_sect
 				   VFP11_ERRATUM_VENEER_SECTION_NAME);
 
   arm_allocate_glue_section_space (globals->bfd_of_glue_owner,
+				   globals->stm32l4xx_erratum_glue_size,
+				   STM32L4XX_ERRATUM_VENEER_SECTION_NAME);
+
+  arm_allocate_glue_section_space (globals->bfd_of_glue_owner,
 				   globals->bx_glue_size,
 				   ARM_BX_GLUE_SECTION_NAME);
 
@@ -5838,7 +6994,8 @@ record_arm_to_thumb_glue (struct bfd_lin
 
   free (tmp_name);
 
-  if (link_info->shared || globals->root.is_relocatable_executable
+  if (bfd_link_pic (link_info)
+      || globals->root.is_relocatable_executable
       || globals->pic_veneer)
     size = ARM2THUMB_PIC_GLUE_SIZE;
   else if (globals->use_blx)
@@ -6063,6 +7220,125 @@ record_vfp11_erratum_veneer (struct bfd_
   return val;
 }
 
+/* Record information about a STM32L4XX STM erratum veneer.  Only THUMB-mode
+   veneers need to be handled because used only in Cortex-M.  */
+
+static bfd_vma
+record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info,
+				 elf32_stm32l4xx_erratum_list *branch,
+				 bfd *branch_bfd,
+				 asection *branch_sec,
+				 unsigned int offset,
+				 bfd_size_type veneer_size)
+{
+  asection *s;
+  struct elf32_arm_link_hash_table *hash_table;
+  char *tmp_name;
+  struct elf_link_hash_entry *myh;
+  struct bfd_link_hash_entry *bh;
+  bfd_vma val;
+  struct _arm_elf_section_data *sec_data;
+  elf32_stm32l4xx_erratum_list *newerr;
+
+  hash_table = elf32_arm_hash_table (link_info);
+  BFD_ASSERT (hash_table != NULL);
+  BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
+
+  s = bfd_get_linker_section
+    (hash_table->bfd_of_glue_owner, STM32L4XX_ERRATUM_VENEER_SECTION_NAME);
+
+  BFD_ASSERT (s != NULL);
+
+  sec_data = elf32_arm_section_data (s);
+
+  tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
+				  (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME) + 10);
+
+  BFD_ASSERT (tmp_name);
+
+  sprintf (tmp_name, STM32L4XX_ERRATUM_VENEER_ENTRY_NAME,
+	   hash_table->num_stm32l4xx_fixes);
+
+  myh = elf_link_hash_lookup
+    (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
+
+  BFD_ASSERT (myh == NULL);
+
+  bh = NULL;
+  val = hash_table->stm32l4xx_erratum_glue_size;
+  _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+				    tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
+				    NULL, TRUE, FALSE, &bh);
+
+  myh = (struct elf_link_hash_entry *) bh;
+  myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
+  myh->forced_local = 1;
+
+  /* Link veneer back to calling location.  */
+  sec_data->stm32l4xx_erratumcount += 1;
+  newerr = (elf32_stm32l4xx_erratum_list *)
+      bfd_zmalloc (sizeof (elf32_stm32l4xx_erratum_list));
+
+  newerr->type = STM32L4XX_ERRATUM_VENEER;
+  newerr->vma = -1;
+  newerr->u.v.branch = branch;
+  newerr->u.v.id = hash_table->num_stm32l4xx_fixes;
+  branch->u.b.veneer = newerr;
+
+  newerr->next = sec_data->stm32l4xx_erratumlist;
+  sec_data->stm32l4xx_erratumlist = newerr;
+
+  /* A symbol for the return from the veneer.  */
+  sprintf (tmp_name, STM32L4XX_ERRATUM_VENEER_ENTRY_NAME "_r",
+	   hash_table->num_stm32l4xx_fixes);
+
+  myh = elf_link_hash_lookup
+    (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
+
+  if (myh != NULL)
+    abort ();
+
+  bh = NULL;
+  val = offset + 4;
+  _bfd_generic_link_add_one_symbol (link_info, branch_bfd, tmp_name, BSF_LOCAL,
+				    branch_sec, val, NULL, TRUE, FALSE, &bh);
+
+  myh = (struct elf_link_hash_entry *) bh;
+  myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
+  myh->forced_local = 1;
+
+  free (tmp_name);
+
+  /* Generate a mapping symbol for the veneer section, and explicitly add an
+     entry for that symbol to the code/data map for the section.  */
+  if (hash_table->stm32l4xx_erratum_glue_size == 0)
+    {
+      bh = NULL;
+      /* Creates a THUMB symbol since there is no other choice.  */
+      _bfd_generic_link_add_one_symbol (link_info,
+					hash_table->bfd_of_glue_owner, "$t",
+					BSF_LOCAL, s, 0, NULL,
+					TRUE, FALSE, &bh);
+
+      myh = (struct elf_link_hash_entry *) bh;
+      myh->type = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
+      myh->forced_local = 1;
+
+      /* The elf32_arm_init_maps function only cares about symbols from input
+	 BFDs.  We must make a note of this generated mapping symbol
+	 ourselves so that code byteswapping works properly in
+	 elf32_arm_write_section.  */
+      elf32_arm_section_map_add (s, 't', 0);
+    }
+
+  s->size += veneer_size;
+  hash_table->stm32l4xx_erratum_glue_size += veneer_size;
+  hash_table->num_stm32l4xx_fixes++;
+
+  /* The offset of the veneer.  */
+  return val;
+}
+
 #define ARM_GLUE_SECTION_FLAGS \
   (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE \
    | SEC_READONLY | SEC_LINKER_CREATED)
@@ -6108,15 +7384,57 @@ bfd_boolean
 bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
 					struct bfd_link_info *info)
 {
+  struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info);
+  bfd_boolean dostm32l4xx = globals
+    && globals->stm32l4xx_fix != BFD_ARM_STM32L4XX_FIX_NONE;
+  bfd_boolean addglue;
+
   /* If we are only performing a partial
      link do not bother adding the glue.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
-  return arm_make_glue_section (abfd, ARM2THUMB_GLUE_SECTION_NAME)
+  addglue = arm_make_glue_section (abfd, ARM2THUMB_GLUE_SECTION_NAME)
     && arm_make_glue_section (abfd, THUMB2ARM_GLUE_SECTION_NAME)
     && arm_make_glue_section (abfd, VFP11_ERRATUM_VENEER_SECTION_NAME)
     && arm_make_glue_section (abfd, ARM_BX_GLUE_SECTION_NAME);
+
+  if (!dostm32l4xx)
+    return addglue;
+
+  return addglue
+    && arm_make_glue_section (abfd, STM32L4XX_ERRATUM_VENEER_SECTION_NAME);
+}
+
+/* Mark output sections of veneers needing a dedicated one with SEC_KEEP.  This
+   ensures they are not marked for deletion by
+   strip_excluded_output_sections () when veneers are going to be created
+   later.  Not doing so would trigger assert on empty section size in
+   lang_size_sections_1 ().  */
+
+void
+bfd_elf32_arm_keep_private_stub_output_sections (struct bfd_link_info *info)
+{
+  enum elf32_arm_stub_type stub_type;
+
+  /* If we are only performing a partial
+     link do not bother adding the glue.  */
+  if (bfd_link_relocatable (info))
+    return;
+
+  for (stub_type = arm_stub_none + 1; stub_type < max_stub_type; stub_type++)
+    {
+      asection *out_sec;
+      const char *out_sec_name;
+
+      if (!arm_dedicated_stub_output_section_required (stub_type))
+	continue;
+
+     out_sec_name = arm_dedicated_stub_output_section_name (stub_type);
+     out_sec = bfd_get_section_by_name (info->output_bfd, out_sec_name);
+     if (out_sec != NULL)
+	out_sec->flags |= SEC_KEEP;
+    }
 }
 
 /* Select a BFD to be used to hold the sections used by the glue code.
@@ -6130,7 +7448,7 @@ bfd_elf32_arm_get_bfd_for_interworking (
 
   /* If we are only performing a partial link
      do not bother getting a bfd to hold the glue.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Make sure we don't attach the glue sections to a dynamic object.  */
@@ -6182,7 +7500,7 @@ bfd_elf32_arm_process_before_allocation 
 
   /* If we are only performing a partial link do not bother
      to construct any glue.  */
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     return TRUE;
 
   /* Here we have a bfd that is to be included on the link.  We have a
@@ -6295,7 +7613,8 @@ bfd_elf32_arm_process_before_allocation 
 	      /* This one is a call from arm code.  We need to look up
 		 the target of the call.  If it is a thumb target, we
 		 insert glue.  */
-	      if (h->target_internal == ST_BRANCH_TO_THUMB)
+	      if (ARM_GET_SYM_BRANCH_TYPE (h->target_internal)
+		  == ST_BRANCH_TO_THUMB)
 		record_arm_to_thumb_glue (link_info, h);
 	      break;
 
@@ -6424,7 +7743,7 @@ bfd_elf32_arm_set_vfp11_fix (bfd *obfd, 
 
 	default:
 	  /* Give a warning, but do as the user requests anyway.  */
-	  (*_bfd_error_handler) (_("%B: warning: selected VFP11 erratum "
+	  _bfd_error_handler (_("%B: warning: selected VFP11 erratum "
 	    "workaround is not necessary for target architecture"), obfd);
 	}
     }
@@ -6435,6 +7754,26 @@ bfd_elf32_arm_set_vfp11_fix (bfd *obfd, 
     globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
 }
 
+void
+bfd_elf32_arm_set_stm32l4xx_fix (bfd *obfd, struct bfd_link_info *link_info)
+{
+  struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
+  obj_attribute *out_attr = elf_known_obj_attributes_proc (obfd);
+
+  if (globals == NULL)
+    return;
+
+  /* We assume only Cortex-M4 may require the fix.  */
+  if (out_attr[Tag_CPU_arch].i != TAG_CPU_ARCH_V7E_M
+      || out_attr[Tag_CPU_arch_profile].i != 'M')
+    {
+      if (globals->stm32l4xx_fix != BFD_ARM_STM32L4XX_FIX_NONE)
+	/* Give a warning, but do as the user requests anyway.  */
+	_bfd_error_handler
+	  (_("%B: warning: selected STM32L4XX erratum "
+	     "workaround is not necessary for target architecture"), obfd);
+    }
+}
 
 enum bfd_arm_vfp11_pipe
 {
@@ -6746,7 +8085,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
 
   /* If we are only performing a partial link do not bother
      to construct any glue.  */
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     return TRUE;
 
   /* Skip if this bfd does not correspond to an ELF image.  */
@@ -6901,7 +8240,441 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
 		  state = 0;
 		}
 
-	      i = next_i;
+	      i = next_i;
+	    }
+	}
+
+      if (contents != NULL
+	  && elf_section_data (sec)->this_hdr.contents != contents)
+	free (contents);
+      contents = NULL;
+    }
+
+  return TRUE;
+
+error_return:
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+
+  return FALSE;
+}
+
+/* Find virtual-memory addresses for VFP11 erratum veneers and return locations
+   after sections have been laid out, using specially-named symbols.  */
+
+void
+bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd,
+					  struct bfd_link_info *link_info)
+{
+  asection *sec;
+  struct elf32_arm_link_hash_table *globals;
+  char *tmp_name;
+
+  if (bfd_link_relocatable (link_info))
+    return;
+
+  /* Skip if this bfd does not correspond to an ELF image.  */
+  if (! is_arm_elf (abfd))
+    return;
+
+  globals = elf32_arm_hash_table (link_info);
+  if (globals == NULL)
+    return;
+
+  tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
+				  (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
+
+  for (sec = abfd->sections; sec != NULL; sec = sec->next)
+    {
+      struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
+      elf32_vfp11_erratum_list *errnode = sec_data->erratumlist;
+
+      for (; errnode != NULL; errnode = errnode->next)
+	{
+	  struct elf_link_hash_entry *myh;
+	  bfd_vma vma;
+
+	  switch (errnode->type)
+	    {
+	    case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
+	    case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
+	      /* Find veneer symbol.  */
+	      sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
+		       errnode->u.b.veneer->u.v.id);
+
+	      myh = elf_link_hash_lookup
+		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+	      if (myh == NULL)
+		_bfd_error_handler (_("%B: unable to find VFP11 veneer "
+				      "`%s'"), abfd, tmp_name);
+
+	      vma = myh->root.u.def.section->output_section->vma
+		    + myh->root.u.def.section->output_offset
+		    + myh->root.u.def.value;
+
+	      errnode->u.b.veneer->vma = vma;
+	      break;
+
+	    case VFP11_ERRATUM_ARM_VENEER:
+	    case VFP11_ERRATUM_THUMB_VENEER:
+	      /* Find return location.  */
+	      sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
+		       errnode->u.v.id);
+
+	      myh = elf_link_hash_lookup
+		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+	      if (myh == NULL)
+		_bfd_error_handler (_("%B: unable to find VFP11 veneer "
+				      "`%s'"), abfd, tmp_name);
+
+	      vma = myh->root.u.def.section->output_section->vma
+		    + myh->root.u.def.section->output_offset
+		    + myh->root.u.def.value;
+
+	      errnode->u.v.branch->vma = vma;
+	      break;
+
+	    default:
+	      abort ();
+	    }
+	}
+    }
+
+  free (tmp_name);
+}
+
+/* Find virtual-memory addresses for STM32L4XX erratum veneers and
+   return locations after sections have been laid out, using
+   specially-named symbols.  */
+
+void
+bfd_elf32_arm_stm32l4xx_fix_veneer_locations (bfd *abfd,
+					      struct bfd_link_info *link_info)
+{
+  asection *sec;
+  struct elf32_arm_link_hash_table *globals;
+  char *tmp_name;
+
+  if (bfd_link_relocatable (link_info))
+    return;
+
+  /* Skip if this bfd does not correspond to an ELF image.  */
+  if (! is_arm_elf (abfd))
+    return;
+
+  globals = elf32_arm_hash_table (link_info);
+  if (globals == NULL)
+    return;
+
+  tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
+				  (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME) + 10);
+
+  for (sec = abfd->sections; sec != NULL; sec = sec->next)
+    {
+      struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
+      elf32_stm32l4xx_erratum_list *errnode = sec_data->stm32l4xx_erratumlist;
+
+      for (; errnode != NULL; errnode = errnode->next)
+	{
+	  struct elf_link_hash_entry *myh;
+	  bfd_vma vma;
+
+	  switch (errnode->type)
+	    {
+	    case STM32L4XX_ERRATUM_BRANCH_TO_VENEER:
+	      /* Find veneer symbol.  */
+	      sprintf (tmp_name, STM32L4XX_ERRATUM_VENEER_ENTRY_NAME,
+		       errnode->u.b.veneer->u.v.id);
+
+	      myh = elf_link_hash_lookup
+		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+	      if (myh == NULL)
+		_bfd_error_handler (_("%B: unable to find STM32L4XX veneer "
+				      "`%s'"), abfd, tmp_name);
+
+	      vma = myh->root.u.def.section->output_section->vma
+		+ myh->root.u.def.section->output_offset
+		+ myh->root.u.def.value;
+
+	      errnode->u.b.veneer->vma = vma;
+	      break;
+
+	    case STM32L4XX_ERRATUM_VENEER:
+	      /* Find return location.  */
+	      sprintf (tmp_name, STM32L4XX_ERRATUM_VENEER_ENTRY_NAME "_r",
+		       errnode->u.v.id);
+
+	      myh = elf_link_hash_lookup
+		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+	      if (myh == NULL)
+		_bfd_error_handler (_("%B: unable to find STM32L4XX veneer "
+				      "`%s'"), abfd, tmp_name);
+
+	      vma = myh->root.u.def.section->output_section->vma
+		+ myh->root.u.def.section->output_offset
+		+ myh->root.u.def.value;
+
+	      errnode->u.v.branch->vma = vma;
+	      break;
+
+	    default:
+	      abort ();
+	    }
+	}
+    }
+
+  free (tmp_name);
+}
+
+static inline bfd_boolean
+is_thumb2_ldmia (const insn32 insn)
+{
+  /* Encoding T2: LDM<c>.W <Rn>{!},<registers>
+     1110 - 1000 - 10W1 - rrrr - PM (0) l - llll - llll - llll.  */
+  return (insn & 0xffd02000) == 0xe8900000;
+}
+
+static inline bfd_boolean
+is_thumb2_ldmdb (const insn32 insn)
+{
+  /* Encoding T1: LDMDB<c> <Rn>{!},<registers>
+     1110 - 1001 - 00W1 - rrrr - PM (0) l - llll - llll - llll.  */
+  return (insn & 0xffd02000) == 0xe9100000;
+}
+
+static inline bfd_boolean
+is_thumb2_vldm (const insn32 insn)
+{
+  /* A6.5 Extension register load or store instruction
+     A7.7.229
+     We look for SP 32-bit and DP 64-bit registers.
+     Encoding T1 VLDM{mode}<c> <Rn>{!}, <list>
+     <list> is consecutive 64-bit registers
+     1110 - 110P - UDW1 - rrrr - vvvv - 1011 - iiii - iiii
+     Encoding T2 VLDM{mode}<c> <Rn>{!}, <list>
+     <list> is consecutive 32-bit registers
+     1110 - 110P - UDW1 - rrrr - vvvv - 1010 - iiii - iiii
+     if P==0 && U==1 && W==1 && Rn=1101 VPOP
+     if PUW=010 || PUW=011 || PUW=101 VLDM.  */
+  return
+    (((insn & 0xfe100f00) == 0xec100b00) ||
+     ((insn & 0xfe100f00) == 0xec100a00))
+    && /* (IA without !).  */
+    (((((insn << 7) >> 28) & 0xd) == 0x4)
+     /* (IA with !), includes VPOP (when reg number is SP).  */
+     || ((((insn << 7) >> 28) & 0xd) == 0x5)
+     /* (DB with !).  */
+     || ((((insn << 7) >> 28) & 0xd) == 0x9));
+}
+
+/* STM STM32L4XX erratum : This function assumes that it receives an LDM or
+   VLDM opcode and:
+ - computes the number and the mode of memory accesses
+ - decides if the replacement should be done:
+   . replaces only if > 8-word accesses
+   . or (testing purposes only) replaces all accesses.  */
+
+static bfd_boolean
+stm32l4xx_need_create_replacing_stub (const insn32 insn,
+				      bfd_arm_stm32l4xx_fix stm32l4xx_fix)
+{
+  int nb_words = 0;
+
+  /* The field encoding the register list is the same for both LDMIA
+     and LDMDB encodings.  */
+  if (is_thumb2_ldmia (insn) || is_thumb2_ldmdb (insn))
+    nb_words = elf32_arm_popcount (insn & 0x0000ffff);
+  else if (is_thumb2_vldm (insn))
+   nb_words = (insn & 0xff);
+
+  /* DEFAULT mode accounts for the real bug condition situation,
+     ALL mode inserts stubs for each LDM/VLDM instruction (testing).  */
+  return
+    (stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_DEFAULT) ? nb_words > 8 :
+    (stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_ALL) ? TRUE : FALSE;
+}
+
+/* Look for potentially-troublesome code sequences which might trigger
+   the STM STM32L4XX erratum.  */
+
+bfd_boolean
+bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd,
+				      struct bfd_link_info *link_info)
+{
+  asection *sec;
+  bfd_byte *contents = NULL;
+  struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
+
+  if (globals == NULL)
+    return FALSE;
+
+  /* If we are only performing a partial link do not bother
+     to construct any glue.  */
+  if (bfd_link_relocatable (link_info))
+    return TRUE;
+
+  /* Skip if this bfd does not correspond to an ELF image.  */
+  if (! is_arm_elf (abfd))
+    return TRUE;
+
+  if (globals->stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_NONE)
+    return TRUE;
+
+  /* Skip this BFD if it corresponds to an executable or dynamic object.  */
+  if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
+    return TRUE;
+
+  for (sec = abfd->sections; sec != NULL; sec = sec->next)
+    {
+      unsigned int i, span;
+      struct _arm_elf_section_data *sec_data;
+
+      /* If we don't have executable progbits, we're not interested in this
+	 section.  Also skip if section is to be excluded.  */
+      if (elf_section_type (sec) != SHT_PROGBITS
+	  || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
+	  || (sec->flags & SEC_EXCLUDE) != 0
+	  || sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS
+	  || sec->output_section == bfd_abs_section_ptr
+	  || strcmp (sec->name, STM32L4XX_ERRATUM_VENEER_SECTION_NAME) == 0)
+	continue;
+
+      sec_data = elf32_arm_section_data (sec);
+
+      if (sec_data->mapcount == 0)
+	continue;
+
+      if (elf_section_data (sec)->this_hdr.contents != NULL)
+	contents = elf_section_data (sec)->this_hdr.contents;
+      else if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+	goto error_return;
+
+      qsort (sec_data->map, sec_data->mapcount, sizeof (elf32_arm_section_map),
+	     elf32_arm_compare_mapping);
+
+      for (span = 0; span < sec_data->mapcount; span++)
+	{
+	  unsigned int span_start = sec_data->map[span].vma;
+	  unsigned int span_end = (span == sec_data->mapcount - 1)
+	    ? sec->size : sec_data->map[span + 1].vma;
+	  char span_type = sec_data->map[span].type;
+	  int itblock_current_pos = 0;
+
+	  /* Only Thumb2 mode need be supported with this CM4 specific
+	     code, we should not encounter any arm mode eg span_type
+	     != 'a'.  */
+	  if (span_type != 't')
+	    continue;
+
+	  for (i = span_start; i < span_end;)
+	    {
+	      unsigned int insn = bfd_get_16 (abfd, &contents[i]);
+	      bfd_boolean insn_32bit = FALSE;
+	      bfd_boolean is_ldm = FALSE;
+	      bfd_boolean is_vldm = FALSE;
+	      bfd_boolean is_not_last_in_it_block = FALSE;
+
+	      /* The first 16-bits of all 32-bit thumb2 instructions start
+		 with opcode[15..13]=0b111 and the encoded op1 can be anything
+		 except opcode[12..11]!=0b00.
+		 See 32-bit Thumb instruction encoding.  */
+	      if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000)
+		insn_32bit = TRUE;
+
+	      /* Compute the predicate that tells if the instruction
+		 is concerned by the IT block
+		 - Creates an error if there is a ldm that is not
+		   last in the IT block thus cannot be replaced
+		 - Otherwise we can create a branch at the end of the
+		   IT block, it will be controlled naturally by IT
+		   with the proper pseudo-predicate
+		 - So the only interesting predicate is the one that
+		   tells that we are not on the last item of an IT
+		   block.  */
+	      if (itblock_current_pos != 0)
+		  is_not_last_in_it_block = !!--itblock_current_pos;
+
+	      if (insn_32bit)
+		{
+		  /* Load the rest of the insn (in manual-friendly order).  */
+		  insn = (insn << 16) | bfd_get_16 (abfd, &contents[i + 2]);
+		  is_ldm = is_thumb2_ldmia (insn) || is_thumb2_ldmdb (insn);
+		  is_vldm = is_thumb2_vldm (insn);
+
+		  /* Veneers are created for (v)ldm depending on
+		     option flags and memory accesses conditions; but
+		     if the instruction is not the last instruction of
+		     an IT block, we cannot create a jump there, so we
+		     bail out.  */
+		    if ((is_ldm || is_vldm)
+			&& stm32l4xx_need_create_replacing_stub
+			(insn, globals->stm32l4xx_fix))
+		      {
+			if (is_not_last_in_it_block)
+			  {
+			    _bfd_error_handler
+			      /* Note - overlong line used here to allow for translation.  */
+			      /* xgettext:c-format */
+			      (_("\
+%B(%A+0x%lx): error: multiple load detected in non-last IT block instruction : STM32L4XX veneer cannot be generated.\n"
+				 "Use gcc option -mrestrict-it to generate only one instruction per IT block.\n"),
+			       abfd, sec, (long) i);
+			  }
+			else
+			  {
+			    elf32_stm32l4xx_erratum_list *newerr =
+			      (elf32_stm32l4xx_erratum_list *)
+			      bfd_zmalloc
+			      (sizeof (elf32_stm32l4xx_erratum_list));
+
+			    elf32_arm_section_data (sec)
+			      ->stm32l4xx_erratumcount += 1;
+			    newerr->u.b.insn = insn;
+			    /* We create only thumb branches.  */
+			    newerr->type =
+			      STM32L4XX_ERRATUM_BRANCH_TO_VENEER;
+			    record_stm32l4xx_erratum_veneer
+			      (link_info, newerr, abfd, sec,
+			       i,
+			       is_ldm ?
+			       STM32L4XX_ERRATUM_LDM_VENEER_SIZE:
+			       STM32L4XX_ERRATUM_VLDM_VENEER_SIZE);
+			    newerr->vma = -1;
+			    newerr->next = sec_data->stm32l4xx_erratumlist;
+			    sec_data->stm32l4xx_erratumlist = newerr;
+			  }
+		      }
+		}
+	      else
+		{
+		  /* A7.7.37 IT p208
+		     IT blocks are only encoded in T1
+		     Encoding T1: IT{x{y{z}}} <firstcond>
+		     1 0 1 1 - 1 1 1 1 - firstcond - mask
+		     if mask = '0000' then see 'related encodings'
+		     We don't deal with UNPREDICTABLE, just ignore these.
+		     There can be no nested IT blocks so an IT block
+		     is naturally a new one for which it is worth
+		     computing its size.  */
+		  bfd_boolean is_newitblock = ((insn & 0xff00) == 0xbf00)
+		    && ((insn & 0x000f) != 0x0000);
+		  /* If we have a new IT block we compute its size.  */
+		  if (is_newitblock)
+		    {
+		      /* Compute the number of instructions controlled
+			 by the IT block, it will be used to decide
+			 whether we are inside an IT block or not.  */
+		      unsigned int mask = insn & 0x000f;
+		      itblock_current_pos = 4 - ctz (mask);
+		    }
+		}
+
+	      i += insn_32bit ? 4 : 2;
 	    }
 	}
 
@@ -6921,106 +8694,12 @@ error_return:
   return FALSE;
 }
 
-/* Find virtual-memory addresses for VFP11 erratum veneers and return locations
-   after sections have been laid out, using specially-named symbols.  */
-
-void
-bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd,
-					  struct bfd_link_info *link_info)
-{
-  asection *sec;
-  struct elf32_arm_link_hash_table *globals;
-  char *tmp_name;
-
-  if (link_info->relocatable)
-    return;
-
-  /* Skip if this bfd does not correspond to an ELF image.  */
-  if (! is_arm_elf (abfd))
-    return;
-
-  globals = elf32_arm_hash_table (link_info);
-  if (globals == NULL)
-    return;
-
-  tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
-				  (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
-
-  for (sec = abfd->sections; sec != NULL; sec = sec->next)
-    {
-      struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
-      elf32_vfp11_erratum_list *errnode = sec_data->erratumlist;
-
-      for (; errnode != NULL; errnode = errnode->next)
-	{
-	  struct elf_link_hash_entry *myh;
-	  bfd_vma vma;
-
-	  switch (errnode->type)
-	    {
-	    case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
-	    case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
-	      /* Find veneer symbol.  */
-	      sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
-		       errnode->u.b.veneer->u.v.id);
-
-	      myh = elf_link_hash_lookup
-		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
-
-	      if (myh == NULL)
-		(*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
-					 "`%s'"), abfd, tmp_name);
-
-	      vma = myh->root.u.def.section->output_section->vma
-		    + myh->root.u.def.section->output_offset
-		    + myh->root.u.def.value;
-
-	      errnode->u.b.veneer->vma = vma;
-	      break;
-
-	    case VFP11_ERRATUM_ARM_VENEER:
-	    case VFP11_ERRATUM_THUMB_VENEER:
-	      /* Find return location.  */
-	      sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
-		       errnode->u.v.id);
-
-	      myh = elf_link_hash_lookup
-		(&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
-
-	      if (myh == NULL)
-		(*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
-					 "`%s'"), abfd, tmp_name);
-
-	      vma = myh->root.u.def.section->output_section->vma
-		    + myh->root.u.def.section->output_offset
-		    + myh->root.u.def.value;
-
-	      errnode->u.v.branch->vma = vma;
-	      break;
-
-	    default:
-	      abort ();
-	    }
-	}
-    }
-
-  free (tmp_name);
-}
-
-
 /* Set target relocation values needed during linking.  */
 
 void
-bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd,
+bfd_elf32_arm_set_target_params (struct bfd *output_bfd,
 				 struct bfd_link_info *link_info,
-				 int target1_is_rel,
-				 char * target2_type,
-				 int fix_v4bx,
-				 int use_blx,
-				 bfd_arm_vfp11_fix vfp11_fix,
-				 int no_enum_warn, int no_wchar_warn,
-				 int pic_veneer, int fix_cortex_a8,
-				 int fix_arm1176)
+				 struct elf32_arm_params *params)
 {
   struct elf32_arm_link_hash_table *globals;
 
@@ -7028,28 +8707,33 @@ bfd_elf32_arm_set_target_relocs (struct 
   if (globals == NULL)
     return;
 
-  globals->target1_is_rel = target1_is_rel;
-  if (strcmp (target2_type, "rel") == 0)
+  globals->target1_is_rel = params->target1_is_rel;
+  if (strcmp (params->target2_type, "rel") == 0)
     globals->target2_reloc = R_ARM_REL32;
-  else if (strcmp (target2_type, "abs") == 0)
+  else if (strcmp (params->target2_type, "abs") == 0)
     globals->target2_reloc = R_ARM_ABS32;
-  else if (strcmp (target2_type, "got-rel") == 0)
+  else if (strcmp (params->target2_type, "got-rel") == 0)
     globals->target2_reloc = R_ARM_GOT_PREL;
   else
     {
       _bfd_error_handler (_("Invalid TARGET2 relocation type '%s'."),
-			  target2_type);
+			  params->target2_type);
     }
-  globals->fix_v4bx = fix_v4bx;
-  globals->use_blx |= use_blx;
-  globals->vfp11_fix = vfp11_fix;
-  globals->pic_veneer = pic_veneer;
-  globals->fix_cortex_a8 = fix_cortex_a8;
-  globals->fix_arm1176 = fix_arm1176;
+  globals->fix_v4bx = params->fix_v4bx;
+  globals->use_blx |= params->use_blx;
+  globals->vfp11_fix = params->vfp11_denorm_fix;
+  globals->stm32l4xx_fix = params->stm32l4xx_fix;
+  globals->pic_veneer = params->pic_veneer;
+  globals->fix_cortex_a8 = params->fix_cortex_a8;
+  globals->fix_arm1176 = params->fix_arm1176;
+  globals->cmse_implib = params->cmse_implib;
+  globals->in_implib_bfd = params->in_implib_bfd;
 
   BFD_ASSERT (is_arm_elf (output_bfd));
-  elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
-  elf_arm_tdata (output_bfd)->no_wchar_size_warning = no_wchar_warn;
+  elf_arm_tdata (output_bfd)->no_enum_size_warning
+    = params->no_enum_size_warning;
+  elf_arm_tdata (output_bfd)->no_wchar_size_warning
+    = params->no_wchar_size_warning;
 }
 
 /* Replace the target offset of a Thumb bl or b.w instruction.  */
@@ -7121,7 +8805,7 @@ elf32_thumb_to_arm_stub (struct bfd_link
 	  && sym_sec->owner != NULL
 	  && !INTERWORK_FLAG (sym_sec->owner))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B(%s): warning: interworking not enabled.\n"
 	       "  first occurrence: %B: Thumb call to ARM"),
 	     sym_sec->owner, input_bfd, name);
@@ -7211,7 +8895,7 @@ elf32_arm_create_thumb_stub (struct bfd_
 	  && sym_sec->owner != NULL
 	  && !INTERWORK_FLAG (sym_sec->owner))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B(%s): warning: interworking not enabled.\n"
 	       "  first occurrence: %B: arm call to thumb"),
 	     sym_sec->owner, input_bfd, name);
@@ -7220,7 +8904,8 @@ elf32_arm_create_thumb_stub (struct bfd_
       --my_offset;
       myh->root.u.def.value = my_offset;
 
-      if (info->shared || globals->root.is_relocatable_executable
+      if (bfd_link_pic (info)
+	  || globals->root.is_relocatable_executable
 	  || globals->pic_veneer)
 	{
 	  /* For relocatable objects we can't use absolute addresses,
@@ -7671,7 +9356,7 @@ elf32_arm_populate_plt_entry (bfd *outpu
 		     + root_plt->offset);
 
       ptr = splt->contents + root_plt->offset;
-      if (htab->vxworks_p && info->shared)
+      if (htab->vxworks_p && bfd_link_pic (info))
 	{
 	  unsigned int i;
 	  bfd_vma val;
@@ -8036,8 +9721,9 @@ elf32_arm_tls_relax (struct elf32_arm_li
 	       error generation.  */
 	    insn = (insn << 16)
 	      | bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
-	  (*_bfd_error_handler)
-	    (_("%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"),
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B(%A+0x%lx): unexpected Thumb instruction '0x%x' in TLS trampoline"),
 	     input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
 	  return bfd_reloc_notsupported;
 	}
@@ -8075,8 +9761,9 @@ elf32_arm_tls_relax (struct elf32_arm_li
 	}
       else
 	{
-	  (*_bfd_error_handler)
-	    (_("%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"),
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B(%A+0x%lx): unexpected ARM instruction '0x%x' in TLS trampoline"),
 	     input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
 	  return bfd_reloc_notsupported;
 	}
@@ -8094,7 +9781,7 @@ elf32_arm_tls_relax (struct elf32_arm_li
       if (!is_local)
 	/* add r0,pc; ldr r0, [r0]  */
 	insn = 0x44786800;
-      else if (arch_has_thumb2_nop (globals))
+      else if (using_thumb2 (globals))
 	/* nop.w */
 	insn = 0xf3af8000;
       else
@@ -8280,7 +9967,8 @@ elf32_arm_final_link_relocate (reloc_how
   /* Find out whether the symbol has a PLT.  Set ST_VALUE, BRANCH_TYPE and
      VALUE appropriately for relocations that we resolve at link time.  */
   has_iplt_entry = FALSE;
-  if (elf32_arm_get_plt_info (input_bfd, eh, r_symndx, &root_plt, &arm_plt)
+  if (elf32_arm_get_plt_info (input_bfd, globals, eh, r_symndx, &root_plt,
+			      &arm_plt)
       && root_plt->offset != (bfd_vma) -1)
     {
       plt_offset = root_plt->offset;
@@ -8342,6 +10030,7 @@ elf32_arm_final_link_relocate (reloc_how
     case R_ARM_ABS12:
       if (!globals->vxworks_p)
 	return elf32_arm_abs12_reloc (input_bfd, hit_data, value + addend);
+      /* Fall through.  */
 
     case R_ARM_PC24:
     case R_ARM_ABS32:
@@ -8383,7 +10072,8 @@ elf32_arm_final_link_relocate (reloc_how
       /* When generating a shared object or relocatable executable, these
 	 relocations are copied into the output file to be resolved at
 	 run time.  */
-      if ((info->shared || globals->root.is_relocatable_executable)
+      if ((bfd_link_pic (info)
+	   || globals->root.is_relocatable_executable)
 	  && (input_section->flags & SEC_ALLOC)
 	  && !(globals->vxworks_p
 	       && strcmp (input_section->output_section->name,
@@ -8409,10 +10099,10 @@ elf32_arm_final_link_relocate (reloc_how
 	    {
 	      char *v = _("shared object");
 
-	      if (info->executable)
+	      if (bfd_link_executable (info))
 		v = _("PIE executable");
 
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: relocation %s against external or undefined symbol `%s'"
 		   " can not be used when making a %s; recompile with -fPIC"), input_bfd,
 		 elf32_arm_howto_table_1[r_type].name, h->root.root.string, v);
@@ -8448,8 +10138,9 @@ elf32_arm_final_link_relocate (reloc_how
 	    memset (&outrel, 0, sizeof outrel);
 	  else if (h != NULL
 		   && h->dynindx != -1
-		   && (!info->shared
-		       || !info->symbolic
+		   && (!bfd_link_pic (info)
+		       || !(bfd_link_pie (info)
+			    || SYMBOLIC_BIND (info, h))
 		       || !h->def_regular))
 	    outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
 	  else
@@ -8542,7 +10233,7 @@ elf32_arm_final_link_relocate (reloc_how
 	      /* FIXME: Should we translate the instruction into a BL
 		 instruction instead ?  */
 	      if (branch_type != ST_BRANCH_TO_THUMB)
-		(*_bfd_error_handler)
+		_bfd_error_handler
 		  (_("\%B: Warning: Arm BLX instruction targets Arm function '%s'."),
 		   input_bfd,
 		   h ? h->root.root.string : "(local)");
@@ -8812,7 +10503,7 @@ elf32_arm_final_link_relocate (reloc_how
 			  + input_section->output_offset
 			  + rel->r_offset);
 
-	value = abs (relocation);
+	value = relocation;
 
 	if (value >= 0x1000)
 	  return bfd_reloc_overflow;
@@ -8847,7 +10538,7 @@ elf32_arm_final_link_relocate (reloc_how
 			  + input_section->output_offset
 			  + rel->r_offset);
 
-	value = abs (relocation);
+	value = relocation;
 
 	/* We do not check for overflow of this reloc.  Although strictly
 	   speaking this is incorrect, it appears to be necessary in order
@@ -8884,7 +10575,7 @@ elf32_arm_final_link_relocate (reloc_how
 			  + input_section->output_offset
 			  + rel->r_offset);
 
-	value = abs (relocation);
+	value = relocation;
 
 	if (value >= 0x1000)
 	  return bfd_reloc_overflow;
@@ -8915,6 +10606,7 @@ elf32_arm_final_link_relocate (reloc_how
 	bfd_signed_vma signed_check;
 	int bitsize;
 	const int thumb2 = using_thumb2 (globals);
+	const int thumb2_bl = using_thumb2_bl (globals);
 
 	/* A branch to an undefined weak symbol is turned into a jump to
 	   the next instruction unless a PLT entry will be created.
@@ -8923,7 +10615,7 @@ elf32_arm_final_link_relocate (reloc_how
 	if (h && h->root.type == bfd_link_hash_undefweak
 	    && plt_offset == (bfd_vma) -1)
 	  {
-	    if (arch_has_thumb2_nop (globals))
+	    if (thumb2)
 	      {
 		bfd_put_16 (input_bfd, 0xf3af, hit_data);
 		bfd_put_16 (input_bfd, 0x8000, hit_data + 2);
@@ -8961,7 +10653,7 @@ elf32_arm_final_link_relocate (reloc_how
 	    /* FIXME: Should we translate the instruction into a BL
 	       instruction instead ?  */
 	    if (branch_type == ST_BRANCH_TO_THUMB)
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: Warning: Thumb BLX instruction targets thumb function '%s'."),
 		 input_bfd,
 		 h ? h->root.root.string : "(local)");
@@ -9091,7 +10783,7 @@ elf32_arm_final_link_relocate (reloc_how
 	   this relocation according to whether we're relocating for
 	   Thumb-2 or not.  */
 	bitsize = howto->bitsize;
-	if (!thumb2)
+	if (!thumb2_bl)
 	  bitsize -= 2;
 	reloc_signed_max = (1 << (bitsize - 1)) - 1;
 	reloc_signed_min = ~reloc_signed_max;
@@ -9398,9 +11090,9 @@ elf32_arm_final_link_relocate (reloc_how
 		{
 		  if (dynreloc_st_type == STT_GNU_IFUNC)
 		    outrel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
-		  else if (info->shared &&
-			   (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-			    || h->root.type != bfd_link_hash_undefweak))
+		  else if (bfd_link_pic (info)
+			   && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+			       || h->root.type != bfd_link_hash_undefweak))
 		    outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
 		  else
 		    outrel.r_info = 0;
@@ -9432,8 +11124,8 @@ elf32_arm_final_link_relocate (reloc_how
 	{
 	  bfd_vma off;
 
-	  BFD_ASSERT (local_got_offsets != NULL &&
-		      local_got_offsets[r_symndx] != (bfd_vma) -1);
+	  BFD_ASSERT (local_got_offsets != NULL
+		      && local_got_offsets[r_symndx] != (bfd_vma) -1);
 
 	  off = local_got_offsets[r_symndx];
 
@@ -9447,7 +11139,7 @@ elf32_arm_final_link_relocate (reloc_how
 	      if (globals->use_rel)
 		bfd_put_32 (output_bfd, dynreloc_value, sgot->contents + off);
 
-	      if (info->shared || dynreloc_st_type == STT_GNU_IFUNC)
+	      if (bfd_link_pic (info) || dynreloc_st_type == STT_GNU_IFUNC)
 		{
 		  Elf_Internal_Rela outrel;
 
@@ -9496,7 +11188,7 @@ elf32_arm_final_link_relocate (reloc_how
 	  {
 	    /* If we don't know the module number, create a relocation
 	       for it.  */
-	    if (info->shared)
+	    if (bfd_link_pic (info))
 	      {
 		Elf_Internal_Rela outrel;
 
@@ -9546,8 +11238,10 @@ elf32_arm_final_link_relocate (reloc_how
 	  {
 	    bfd_boolean dyn;
 	    dyn = globals->root.dynamic_sections_created;
-	    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		&& (!info->shared
+	    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						 bfd_link_pic (info),
+						 h)
+		&& (!bfd_link_pic (info)
 		    || !SYMBOL_REFERENCES_LOCAL (info, h)))
 	      {
 		*unresolved_reloc_p = FALSE;
@@ -9584,7 +11278,7 @@ elf32_arm_final_link_relocate (reloc_how
 	       now, and emit any relocations.  If both an IE GOT and a
 	       GD GOT are necessary, we emit the GD first.  */
 
-	    if ((info->shared || indx != 0)
+	    if ((bfd_link_pic (info) || indx != 0)
 		&& (h == NULL
 		    || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		    || h->root.type != bfd_link_hash_undefweak))
@@ -9600,7 +11294,7 @@ elf32_arm_final_link_relocate (reloc_how
 		/* We should have relaxed, unless this is an undefined
 		   weak symbol.  */
 		BFD_ASSERT ((h && (h->root.type == bfd_link_hash_undefweak))
-			    || info->shared);
+			    || bfd_link_pic (info));
 		BFD_ASSERT (globals->sgotplt_jump_table_size + offplt + 8
 			    <= globals->root.sgotplt->size);
 
@@ -9825,8 +11519,9 @@ elf32_arm_final_link_relocate (reloc_how
 		  value = -5;
 		else
 		  {
-		    (*_bfd_error_handler)
-		      (_("%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"),
+		    _bfd_error_handler
+		      /* xgettext:c-format */
+		      (_("%B(%A+0x%lx): unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"),
 		       input_bfd, input_section,
 		       (unsigned long)rel->r_offset, insn);
 		    return bfd_reloc_notsupported;
@@ -9848,8 +11543,9 @@ elf32_arm_final_link_relocate (reloc_how
 		    break;
 
 		  default:
-		    (*_bfd_error_handler)
-		      (_("%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"),
+		    _bfd_error_handler
+		      /* xgettext:c-format */
+		      (_("%B(%A+0x%lx): unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"),
 		       input_bfd, input_section,
 		       (unsigned long)rel->r_offset, insn);
 		    return bfd_reloc_notsupported;
@@ -9875,9 +11571,10 @@ elf32_arm_final_link_relocate (reloc_how
       }
 
     case R_ARM_TLS_LE32:
-      if (info->shared && !info->pie)
+      if (bfd_link_dll (info))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
 	     input_bfd, input_section,
 	     (long) rel->r_offset, howto->name);
@@ -10090,7 +11787,8 @@ elf32_arm_final_link_relocate (reloc_how
 	    negative = identify_add_or_sub (insn);
 	    if (negative == 0)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
 		  input_bfd, input_section,
 		  (long) rel->r_offset, howto->name);
@@ -10119,8 +11817,8 @@ elf32_arm_final_link_relocate (reloc_how
 
 	/* Calculate the value of the relevant G_n, in encoded
 	   constant-with-rotation format.  */
-	g_n = calculate_group_reloc_mask (abs (signed_value), group,
-					  &residual);
+	g_n = calculate_group_reloc_mask (signed_value < 0 ? - signed_value : signed_value,
+					  group, &residual);
 
 	/* Check for overflow if required.  */
 	if ((r_type == R_ARM_ALU_PC_G0
@@ -10130,10 +11828,12 @@ elf32_arm_final_link_relocate (reloc_how
 	     || r_type == R_ARM_ALU_SB_G1
 	     || r_type == R_ARM_ALU_SB_G2) && residual != 0)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
 	      input_bfd, input_section,
-	      (long) rel->r_offset, abs (signed_value), howto->name);
+	       (long) rel->r_offset, signed_value < 0 ? - signed_value : signed_value,
+	       howto->name);
 	    return bfd_reloc_overflow;
 	  }
 
@@ -10213,15 +11913,17 @@ elf32_arm_final_link_relocate (reloc_how
 
 	/* Calculate the value of the relevant G_{n-1} to obtain
 	   the residual at that stage.  */
-	calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+	calculate_group_reloc_mask (signed_value < 0 ? - signed_value : signed_value,
+				    group - 1, &residual);
 
 	/* Check for overflow.  */
 	if (residual >= 0x1000)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-	      input_bfd, input_section,
-	      (long) rel->r_offset, abs (signed_value), howto->name);
+	       input_bfd, input_section,
+	       (long) rel->r_offset, labs (signed_value), howto->name);
 	    return bfd_reloc_overflow;
 	  }
 
@@ -10297,15 +11999,17 @@ elf32_arm_final_link_relocate (reloc_how
 
 	/* Calculate the value of the relevant G_{n-1} to obtain
 	   the residual at that stage.  */
-	calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+	calculate_group_reloc_mask (signed_value < 0 ? - signed_value : signed_value,
+				    group - 1, &residual);
 
 	/* Check for overflow.  */
 	if (residual >= 0x100)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-	      input_bfd, input_section,
-	      (long) rel->r_offset, abs (signed_value), howto->name);
+	       input_bfd, input_section,
+	       (long) rel->r_offset, labs (signed_value), howto->name);
 	    return bfd_reloc_overflow;
 	  }
 
@@ -10381,17 +12085,19 @@ elf32_arm_final_link_relocate (reloc_how
 
 	/* Calculate the value of the relevant G_{n-1} to obtain
 	   the residual at that stage.  */
-	calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+	calculate_group_reloc_mask (signed_value < 0 ? - signed_value : signed_value,
+				    group - 1, &residual);
 
 	/* Check for overflow.  (The absolute value to go in the place must be
 	   divisible by four and, after having been divided by four, must
 	   fit in eight bits.)  */
 	if ((residual & 0x3) != 0 || residual >= 0x400)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
 	      input_bfd, input_section,
-	      (long) rel->r_offset, abs (signed_value), howto->name);
+	      (long) rel->r_offset, labs (signed_value), howto->name);
 	    return bfd_reloc_overflow;
 	  }
 
@@ -10409,6 +12115,33 @@ elf32_arm_final_link_relocate (reloc_how
       }
       return bfd_reloc_ok;
 
+    case R_ARM_THM_ALU_ABS_G0_NC:
+    case R_ARM_THM_ALU_ABS_G1_NC:
+    case R_ARM_THM_ALU_ABS_G2_NC:
+    case R_ARM_THM_ALU_ABS_G3_NC:
+	{
+	    const int shift_array[4] = {0, 8, 16, 24};
+	    bfd_vma insn = bfd_get_16 (input_bfd, hit_data);
+	    bfd_vma addr = value;
+	    int shift = shift_array[r_type - R_ARM_THM_ALU_ABS_G0_NC];
+
+	    /* Compute address.  */
+	    if (globals->use_rel)
+		signed_addend = insn & 0xff;
+	    addr += signed_addend;
+	    if (branch_type == ST_BRANCH_TO_THUMB)
+		addr |= 1;
+	    /* Clean imm8 insn.  */
+	    insn &= 0xff00;
+	    /* And update with correct part of address.  */
+	    insn |= (addr >> shift) & 0xff;
+	    /* Update insn.  */
+	    bfd_put_16 (input_bfd, insn, hit_data);
+	}
+
+	*unresolved_reloc_p = FALSE;
+	return bfd_reloc_ok;
+
     default:
       return bfd_reloc_notsupported;
     }
@@ -10582,21 +12315,18 @@ elf32_arm_relocate_section (bfd *       
 	      && r_symndx != STN_UNDEF
 	      && bfd_is_und_section (sec)
 	      && ELF_ST_BIND (sym->st_info) != STB_WEAK)
-	    {
-	      if (!info->callbacks->undefined_symbol
-		  (info, bfd_elf_string_from_elf_section
-		   (input_bfd, symtab_hdr->sh_link, sym->st_name),
-		   input_bfd, input_section,
-		   rel->r_offset, TRUE))
-		return FALSE;
-	    }
+	    (*info->callbacks->undefined_symbol)
+	      (info, bfd_elf_string_from_elf_section
+	       (input_bfd, symtab_hdr->sh_link, sym->st_name),
+	       input_bfd, input_section,
+	       rel->r_offset, TRUE);
 
 	  if (globals->use_rel)
 	    {
 	      relocation = (sec->output_section->vma
 			    + sec->output_offset
 			    + sym->st_value);
-	      if (!info->relocatable
+	      if (!bfd_link_relocatable (info)
 		  && (sec->flags & SEC_MERGE)
 		  && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
 		{
@@ -10627,7 +12357,8 @@ elf32_arm_relocate_section (bfd *       
 		      if (howto->rightshift
 			  || (howto->src_mask & (howto->src_mask + 1)))
 			{
-			  (*_bfd_error_handler)
+			  _bfd_error_handler
+			    /* xgettext:c-format */
 			    (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
 			     input_bfd, input_section,
 			     (long) rel->r_offset, howto->name);
@@ -10703,7 +12434,7 @@ elf32_arm_relocate_section (bfd *       
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -10737,9 +12468,11 @@ elf32_arm_relocate_section (bfd *       
 	      || h->root.type == bfd_link_hash_defweak)
 	  && IS_ARM_TLS_RELOC (r_type) != (sym_type == STT_TLS))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    ((sym_type == STT_TLS
+	      /* xgettext:c-format */
 	      ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+	      /* xgettext:c-format */
 	      : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
 	     input_bfd,
 	     input_section,
@@ -10753,28 +12486,34 @@ elf32_arm_relocate_section (bfd *       
 	 and we won't let anybody mess with it. Also, we have to do
 	 addend adjustments in case of a R_ARM_TLS_GOTDESC relocation
 	 both in relaxed and non-relaxed cases.  */
-     if ((elf32_arm_tls_transition (info, r_type, h) != (unsigned)r_type)
-	 || (IS_ARM_TLS_GNU_RELOC (r_type)
-	     && !((h ? elf32_arm_hash_entry (h)->tls_type :
-		   elf32_arm_local_got_tls_type (input_bfd)[r_symndx])
-		  & GOT_TLS_GDESC)))
-       {
-	 r = elf32_arm_tls_relax (globals, input_bfd, input_section,
-				  contents, rel, h == NULL);
-	 /* This may have been marked unresolved because it came from
-	    a shared library.  But we've just dealt with that.  */
-	 unresolved_reloc = 0;
-       }
-     else
-       r = bfd_reloc_continue;
+      if ((elf32_arm_tls_transition (info, r_type, h) != (unsigned)r_type)
+	  || (IS_ARM_TLS_GNU_RELOC (r_type)
+	      && !((h ? elf32_arm_hash_entry (h)->tls_type :
+		    elf32_arm_local_got_tls_type (input_bfd)[r_symndx])
+		   & GOT_TLS_GDESC)))
+	{
+	  r = elf32_arm_tls_relax (globals, input_bfd, input_section,
+				   contents, rel, h == NULL);
+	  /* This may have been marked unresolved because it came from
+	     a shared library.  But we've just dealt with that.  */
+	  unresolved_reloc = 0;
+	}
+      else
+	r = bfd_reloc_continue;
 
-     if (r == bfd_reloc_continue)
-       r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
-					  input_section, contents, rel,
-					  relocation, info, sec, name, sym_type,
-					  (h ? h->target_internal
-					   : ARM_SYM_BRANCH_TYPE (sym)), h,
-					  &unresolved_reloc, &error_message);
+      if (r == bfd_reloc_continue)
+	{
+	  unsigned char branch_type =
+	    h ? ARM_GET_SYM_BRANCH_TYPE (h->target_internal)
+	      : ARM_GET_SYM_BRANCH_TYPE (sym->st_target_internal);
+
+	  r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
+					     input_section, contents, rel,
+					     relocation, info, sec, name,
+					     sym_type, branch_type, h,
+					     &unresolved_reloc,
+					     &error_message);
+	}
 
       /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
 	 because such sections are not SEC_ALLOC and thus ld.so will
@@ -10785,7 +12524,8 @@ elf32_arm_relocate_section (bfd *       
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section,
@@ -10803,20 +12543,15 @@ elf32_arm_relocate_section (bfd *       
 	      /* If the overflowing reloc was to an undefined symbol,
 		 we have already printed one error message and there
 		 is no point complaining again.  */
-	      if ((! h ||
-		   h->root.type != bfd_link_hash_undefined)
-		  && (!((*info->callbacks->reloc_overflow)
-			(info, (h ? &h->root : NULL), name, howto->name,
-			 (bfd_vma) 0, input_bfd, input_section,
-			 rel->r_offset))))
-		  return FALSE;
+	      if (!h || h->root.type != bfd_link_hash_undefined)
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -10837,10 +12572,8 @@ elf32_arm_relocate_section (bfd *       
 
 	    common_error:
 	      BFD_ASSERT (error_message != NULL);
-	      if (!((*info->callbacks->reloc_dangerous)
-		    (info, error_message, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info, error_message, input_bfd, input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -10920,6 +12653,8 @@ insert_cantunwind_after(asection *text_s
     &exidx_arm_data->u.exidx.unwind_edit_tail,
     INSERT_EXIDX_CANTUNWIND_AT_END, text_sec, UINT_MAX);
 
+  exidx_arm_data->additional_reloc_count++;
+
   adjust_exidx_size(exidx_sec, 8);
 }
 
@@ -11035,6 +12770,18 @@ elf32_arm_fix_exidx_coverage (asection *
 	/* An error?  */
 	continue;
 
+      if (last_unwind_type > 0)
+	{
+	  unsigned int first_word = bfd_get_32 (ibfd, contents);
+	  /* Add cantunwind if first unwind item does not match section
+	     start.  */
+	  if (first_word != sec->vma)
+	    {
+	      insert_cantunwind_after (last_text_sec, last_exidx_sec);
+	      last_unwind_type = 0;
+	    }
+	}
+
       for (j = 0; j < hdr->sh_size; j += 8)
 	{
 	  unsigned int second_word = bfd_get_32 (ibfd, contents + j + 4);
@@ -11062,7 +12809,7 @@ elf32_arm_fix_exidx_coverage (asection *
 	  else
 	    unwind_type = 2;
 
-	  if (elide)
+	  if (elide && !bfd_link_relocatable (info))
 	    {
 	      add_unwind_table_edit (&unwind_edit_head, &unwind_edit_tail,
 				     DELETE_EXIDX_ENTRY, NULL, j / 8);
@@ -11089,7 +12836,8 @@ elf32_arm_fix_exidx_coverage (asection *
     }
 
   /* Add terminating CANTUNWIND entry.  */
-  if (last_exidx_sec && last_unwind_type != 0)
+  if (!bfd_link_relocatable (info) && last_exidx_sec
+      && last_unwind_type != 0)
     insert_cantunwind_after(last_text_sec, last_exidx_sec);
 
   return TRUE;
@@ -11131,7 +12879,7 @@ elf32_arm_final_link (bfd *abfd, struct 
 
   /* Process stub sections (eg BE8 encoding, ...).  */
   struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
-  int i;
+  unsigned int i;
   for (i=0; i<htab->top_id; i++)
     {
       sec = htab->stub_group[i].stub_sec;
@@ -11167,6 +12915,11 @@ elf32_arm_final_link (bfd *abfd, struct 
 
       if (! elf32_arm_output_glue_section (info, abfd,
 					   globals->bfd_of_glue_owner,
+					   STM32L4XX_ERRATUM_VENEER_SECTION_NAME))
+	return FALSE;
+
+      if (! elf32_arm_output_glue_section (info, abfd,
+					   globals->bfd_of_glue_owner,
 					   ARM_BX_GLUE_SECTION_NAME))
 	return FALSE;
     }
@@ -11257,7 +13010,7 @@ elf32_arm_set_private_flags (bfd *abfd, 
       if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
 	{
 	  if (flags & EF_ARM_INTERWORK)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
 	      (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
 	       abfd);
 	  else
@@ -11567,6 +13320,47 @@ tag_cpu_arch_combine (bfd *ibfd, int old
       T(V8),		/* V7E_M.  */
       T(V8)		/* V8.  */
     };
+  const int v8m_baseline[] =
+    {
+      -1,		/* PRE_V4.  */
+      -1,		/* V4.  */
+      -1,		/* V4T.  */
+      -1,		/* V5T.  */
+      -1,		/* V5TE.  */
+      -1,		/* V5TEJ.  */
+      -1,		/* V6.  */
+      -1,		/* V6KZ.  */
+      -1,		/* V6T2.  */
+      -1,		/* V6K.  */
+      -1,		/* V7.  */
+      T(V8M_BASE),	/* V6_M.  */
+      T(V8M_BASE),	/* V6S_M.  */
+      -1,		/* V7E_M.  */
+      -1,		/* V8.  */
+      -1,
+      T(V8M_BASE)	/* V8-M BASELINE.  */
+    };
+  const int v8m_mainline[] =
+    {
+      -1,		/* PRE_V4.  */
+      -1,		/* V4.  */
+      -1,		/* V4T.  */
+      -1,		/* V5T.  */
+      -1,		/* V5TE.  */
+      -1,		/* V5TEJ.  */
+      -1,		/* V6.  */
+      -1,		/* V6KZ.  */
+      -1,		/* V6T2.  */
+      -1,		/* V6K.  */
+      T(V8M_MAIN),	/* V7.  */
+      T(V8M_MAIN),	/* V6_M.  */
+      T(V8M_MAIN),	/* V6S_M.  */
+      T(V8M_MAIN),	/* V7E_M.  */
+      -1,		/* V8.  */
+      -1,
+      T(V8M_MAIN),	/* V8-M BASELINE.  */
+      T(V8M_MAIN)	/* V8-M MAINLINE.  */
+    };
   const int v4t_plus_v6_m[] =
     {
       -1,		/* PRE_V4.  */
@@ -11584,6 +13378,9 @@ tag_cpu_arch_combine (bfd *ibfd, int old
       T(V6S_M),		/* V6S_M.  */
       T(V7E_M),		/* V7E_M.  */
       T(V8),		/* V8.  */
+      -1,		/* Unused.  */
+      T(V8M_BASE),	/* V8-M BASELINE.  */
+      T(V8M_MAIN),	/* V8-M MAINLINE.  */
       T(V4T_PLUS_V6_M)	/* V4T plus V6_M.  */
     };
   const int *comb[] =
@@ -11595,6 +13392,9 @@ tag_cpu_arch_combine (bfd *ibfd, int old
       v6s_m,
       v7e_m,
       v8,
+      NULL,
+      v8m_baseline,
+      v8m_mainline,
       /* Pseudo-architecture.  */
       v4t_plus_v6_m
     };
@@ -11627,7 +13427,7 @@ tag_cpu_arch_combine (bfd *ibfd, int old
   if (tagh <= TAG_CPU_ARCH_V6KZ)
     return result;
 
-  result = comb[tagh - T(V6T2)][tagl];
+  result = comb[tagh - T(V6T2)] ? comb[tagh - T(V6T2)][tagl] : -1;
 
   /* Use Tag_CPU_arch == V4T and Tag_also_compatible_with (Tag_CPU_arch V6_M)
      as the canonical version.  */
@@ -11694,8 +13494,9 @@ elf32_arm_attributes_forbid_div (const o
    are conflicting attributes.  */
 
 static bfd_boolean
-elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
+elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   /* Some tags have 0 = don't care, 1 = strong requirement,
@@ -11810,7 +13611,10 @@ elf32_arm_merge_eabi_attributes (bfd *ib
 		"ARM v7",
 		"ARM v6-M",
 		"ARM v6S-M",
-		"ARM v8"
+		"ARM v8",
+		"",
+		"ARM v8-M.baseline",
+		"ARM v8-M.mainline",
 	    };
 
 	    /* Merge Tag_CPU_arch and Tag_also_compatible_with.  */
@@ -11955,6 +13759,31 @@ elf32_arm_merge_eabi_attributes (bfd *ib
 		}
 	    }
 	  break;
+
+	case Tag_DSP_extension:
+	  /* No need to change output value if any of:
+	     - pre (<=) ARMv5T input architecture (do not have DSP)
+	     - M input profile not ARMv7E-M and do not have DSP.  */
+	  if (in_attr[Tag_CPU_arch].i <= 3
+	      || (in_attr[Tag_CPU_arch_profile].i == 'M'
+		  && in_attr[Tag_CPU_arch].i != 13
+		  && in_attr[i].i == 0))
+	    ; /* Do nothing.  */
+	  /* Output value should be 0 if DSP part of architecture, ie.
+	     - post (>=) ARMv5te architecture output
+	     - A, R or S profile output or ARMv7E-M output architecture.  */
+	  else if (out_attr[Tag_CPU_arch].i >= 4
+		   && (out_attr[Tag_CPU_arch_profile].i == 'A'
+		       || out_attr[Tag_CPU_arch_profile].i == 'R'
+		       || out_attr[Tag_CPU_arch_profile].i == 'S'
+		       || out_attr[Tag_CPU_arch].i == 13))
+	    out_attr[i].i = 0;
+	  /* Otherwise, DSP instructions are added and not part of output
+	     architecture.  */
+	  else
+	    out_attr[i].i = 1;
+	  break;
+
 	case Tag_FP_arch:
 	    {
 	      /* Tag_ABI_HardFP_use is handled along with Tag_FP_arch since
@@ -12222,7 +14051,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
+  if (!_bfd_elf_merge_object_attributes (ibfd, info))
     return FALSE;
 
   /* Check for any attributes not known on ARM.  */
@@ -12250,7 +14079,7 @@ elf32_arm_versions_compatible (unsigned 
    object file when linking.  */
 
 static bfd_boolean
-elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd);
+elf32_arm_merge_private_bfd_data (bfd *, struct bfd_link_info *);
 
 /* Display the flags field.  */
 
@@ -12269,7 +14098,6 @@ elf32_arm_print_private_bfd_data (bfd *a
   /* Ignore init flag - it may not be set, despite the flags field
      containing valid data.  */
 
-  /* xgettext:c-format */
   fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
 
   switch (EF_ARM_EABI_VERSION (flags))
@@ -12448,7 +14276,7 @@ elf32_arm_gc_sweep_hook (bfd *          
   const Elf_Internal_Rela *rel, *relend;
   struct elf32_arm_link_hash_table * globals;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   globals = elf32_arm_hash_table (info);
@@ -12546,7 +14374,7 @@ elf32_arm_gc_sweep_hook (bfd *          
 	case R_ARM_THM_MOVW_PREL_NC:
 	case R_ARM_THM_MOVT_PREL:
 	  /* Should the interworking branches be here also?  */
-	  if ((info->shared || globals->root.is_relocatable_executable)
+	  if ((bfd_link_pic (info) || globals->root.is_relocatable_executable)
 	      && (sec->flags & SEC_ALLOC) != 0)
 	    {
 	      if (h == NULL
@@ -12567,7 +14395,8 @@ elf32_arm_gc_sweep_hook (bfd *          
 	}
 
       if (may_need_local_target_p
-	  && elf32_arm_get_plt_info (abfd, eh, r_symndx, &root_plt, &arm_plt))
+	  && elf32_arm_get_plt_info (abfd, globals, eh, r_symndx, &root_plt,
+				     &arm_plt))
 	{
 	  /* If PLT refcount book-keeping is wrong and too low, we'll
 	     see a zero value (going to -1) for the root PLT reference
@@ -12644,7 +14473,7 @@ elf32_arm_check_relocs (bfd *abfd, struc
   bfd_boolean may_need_local_target_p;
   unsigned long nsyms;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_arm_elf (abfd));
@@ -12694,8 +14523,8 @@ elf32_arm_check_relocs (bfd *abfd, struc
 	     object file containing relocations but no symbol table.  */
 	  && (r_symndx > STN_UNDEF || nsyms > 0))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd,
-				   r_symndx);
+	  _bfd_error_handler (_("%B: bad symbol index: %d"), abfd,
+			      r_symndx);
 	  return FALSE;
 	}
 
@@ -12761,7 +14590,7 @@ elf32_arm_check_relocs (bfd *abfd, struc
 		default: tls_type = GOT_NORMAL; break;
 		}
 
-	      if (!info->executable && (tls_type & GOT_TLS_IE))
+	      if (!bfd_link_executable (info) && (tls_type & GOT_TLS_IE))
 		info->flags |= DF_STATIC_TLS;
 
 	      if (h != NULL)
@@ -12840,15 +14669,17 @@ elf32_arm_check_relocs (bfd *abfd, struc
 		may_need_local_target_p = TRUE;
 		break;
 	      }
+	    else goto jump_over;
+
 	    /* Fall through.  */
 
 	  case R_ARM_MOVW_ABS_NC:
 	  case R_ARM_MOVT_ABS:
 	  case R_ARM_THM_MOVW_ABS_NC:
 	  case R_ARM_THM_MOVT_ABS:
-	    if (info->shared)
+	    if (bfd_link_pic (info))
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
 		  (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
 		   abfd, elf32_arm_howto_table_1[r_type].name,
 		   (h) ? h->root.root.string : "a local symbol");
@@ -12859,7 +14690,8 @@ elf32_arm_check_relocs (bfd *abfd, struc
 	    /* Fall through.  */
 	  case R_ARM_ABS32:
 	  case R_ARM_ABS32_NOI:
-	    if (h != NULL && info->executable)
+	jump_over:
+	    if (h != NULL && bfd_link_executable (info))
 	      {
 		h->pointer_equality_needed = 1;
 	      }
@@ -12872,7 +14704,7 @@ elf32_arm_check_relocs (bfd *abfd, struc
 	  case R_ARM_THM_MOVT_PREL:
 
 	    /* Should the interworking branches be listed here?  */
-	    if ((info->shared || htab->root.is_relocatable_executable)
+	    if ((bfd_link_pic (info) || htab->root.is_relocatable_executable)
 		&& (sec->flags & SEC_ALLOC) != 0)
 	      {
 		if (h == NULL
@@ -13031,8 +14863,173 @@ elf32_arm_check_relocs (bfd *abfd, struc
   return TRUE;
 }
 
+static void
+elf32_arm_update_relocs (asection *o,
+			 struct bfd_elf_section_reloc_data *reldata)
+{
+  void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
+  void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
+  const struct elf_backend_data *bed;
+  _arm_elf_section_data *eado;
+  struct bfd_link_order *p;
+  bfd_byte *erela_head, *erela;
+  Elf_Internal_Rela *irela_head, *irela;
+  Elf_Internal_Shdr *rel_hdr;
+  bfd *abfd;
+  unsigned int count;
+
+  eado = get_arm_elf_section_data (o);
+
+  if (!eado || eado->elf.this_hdr.sh_type != SHT_ARM_EXIDX)
+    return;
+
+  abfd = o->owner;
+  bed = get_elf_backend_data (abfd);
+  rel_hdr = reldata->hdr;
+
+  if (rel_hdr->sh_entsize == bed->s->sizeof_rel)
+    {
+      swap_in = bed->s->swap_reloc_in;
+      swap_out = bed->s->swap_reloc_out;
+    }
+  else if (rel_hdr->sh_entsize == bed->s->sizeof_rela)
+    {
+      swap_in = bed->s->swap_reloca_in;
+      swap_out = bed->s->swap_reloca_out;
+    }
+  else
+    abort ();
+
+  erela_head = rel_hdr->contents;
+  irela_head = (Elf_Internal_Rela *) bfd_zmalloc
+    ((NUM_SHDR_ENTRIES (rel_hdr) + 1) * sizeof (*irela_head));
+
+  erela = erela_head;
+  irela = irela_head;
+  count = 0;
+
+  for (p = o->map_head.link_order; p; p = p->next)
+    {
+      if (p->type == bfd_section_reloc_link_order
+	  || p->type == bfd_symbol_reloc_link_order)
+	{
+	  (*swap_in) (abfd, erela, irela);
+	  erela += rel_hdr->sh_entsize;
+	  irela++;
+	  count++;
+	}
+      else if (p->type == bfd_indirect_link_order)
+	{
+	  struct bfd_elf_section_reloc_data *input_reldata;
+	  arm_unwind_table_edit *edit_list, *edit_tail;
+	  _arm_elf_section_data *eadi;
+	  bfd_size_type j;
+	  bfd_vma offset;
+	  asection *i;
+
+	  i = p->u.indirect.section;
+
+	  eadi = get_arm_elf_section_data (i);
+	  edit_list = eadi->u.exidx.unwind_edit_list;
+	  edit_tail = eadi->u.exidx.unwind_edit_tail;
+	  offset = o->vma + i->output_offset;
+
+	  if (eadi->elf.rel.hdr &&
+	      eadi->elf.rel.hdr->sh_entsize == rel_hdr->sh_entsize)
+	    input_reldata = &eadi->elf.rel;
+	  else if (eadi->elf.rela.hdr &&
+		   eadi->elf.rela.hdr->sh_entsize == rel_hdr->sh_entsize)
+	    input_reldata = &eadi->elf.rela;
+	  else
+	    abort ();
+
+	  if (edit_list)
+	    {
+	      for (j = 0; j < NUM_SHDR_ENTRIES (input_reldata->hdr); j++)
+		{
+		  arm_unwind_table_edit *edit_node, *edit_next;
+		  bfd_vma bias;
+		  bfd_vma reloc_index;
+
+		  (*swap_in) (abfd, erela, irela);
+		  reloc_index = (irela->r_offset - offset) / 8;
+
+		  bias = 0;
+		  edit_node = edit_list;
+		  for (edit_next = edit_list;
+		       edit_next && edit_next->index <= reloc_index;
+		       edit_next = edit_node->next)
+		    {
+		      bias++;
+		      edit_node = edit_next;
+		    }
+
+		  if (edit_node->type != DELETE_EXIDX_ENTRY
+		      || edit_node->index != reloc_index)
+		    {
+		      irela->r_offset -= bias * 8;
+		      irela++;
+		      count++;
+		    }
+
+		  erela += rel_hdr->sh_entsize;
+		}
+
+	      if (edit_tail->type == INSERT_EXIDX_CANTUNWIND_AT_END)
+		{
+		  /* New relocation entity.  */
+		  asection *text_sec = edit_tail->linked_section;
+		  asection *text_out = text_sec->output_section;
+		  bfd_vma exidx_offset = offset + i->size - 8;
+
+		  irela->r_addend = 0;
+		  irela->r_offset = exidx_offset;
+		  irela->r_info = ELF32_R_INFO
+		    (text_out->target_index, R_ARM_PREL31);
+		  irela++;
+		  count++;
+		}
+	    }
+	  else
+	    {
+	      for (j = 0; j < NUM_SHDR_ENTRIES (input_reldata->hdr); j++)
+		{
+		  (*swap_in) (abfd, erela, irela);
+		  erela += rel_hdr->sh_entsize;
+		  irela++;
+		}
+
+	      count += NUM_SHDR_ENTRIES (input_reldata->hdr);
+	    }
+	}
+    }
+
+  reldata->count = count;
+  rel_hdr->sh_size = count * rel_hdr->sh_entsize;
+
+  erela = erela_head;
+  irela = irela_head;
+  while (count > 0)
+    {
+      (*swap_out) (abfd, irela, erela);
+      erela += rel_hdr->sh_entsize;
+      irela++;
+      count--;
+    }
+
+  free (irela_head);
+
+  /* Hashes are no longer valid.  */
+  free (reldata->hashes);
+  reldata->hashes = NULL;
+}
+
 /* Unwinding tables are not referenced directly.  This pass marks them as
-   required if the corresponding code section is marked.  */
+   required if the corresponding code section is marked.  Similarly, ARMv8-M
+   secure entry functions can only be referenced by SG veneers which are
+   created after the GC process. They need to be marked in case they reside in
+   their own section (as would be the case if code was compiled with
+   -ffunction-sections).  */
 
 static bfd_boolean
 elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info,
@@ -13040,10 +15037,21 @@ elf32_arm_gc_mark_extra_sections (struct
 {
   bfd *sub;
   Elf_Internal_Shdr **elf_shdrp;
-  bfd_boolean again;
+  asection *cmse_sec;
+  obj_attribute *out_attr;
+  Elf_Internal_Shdr *symtab_hdr;
+  unsigned i, sym_count, ext_start;
+  const struct elf_backend_data *bed;
+  struct elf_link_hash_entry **sym_hashes;
+  struct elf32_arm_link_hash_entry *cmse_hash;
+  bfd_boolean again, is_v8m, first_bfd_browse = TRUE;
 
   _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook);
 
+  out_attr = elf_known_obj_attributes_proc (info->output_bfd);
+  is_v8m = out_attr[Tag_CPU_arch].i >= TAG_CPU_ARCH_V8M_BASE
+	   && out_attr[Tag_CPU_arch_profile].i == 'M';
+
   /* Marking EH data may cause additional code sections to be marked,
      requiring multiple passes.  */
   again = TRUE;
@@ -13074,7 +15082,35 @@ elf32_arm_gc_mark_extra_sections (struct
 		    return FALSE;
 		}
 	    }
+
+	  /* Mark section holding ARMv8-M secure entry functions.  We mark all
+	     of them so no need for a second browsing.  */
+	  if (is_v8m && first_bfd_browse)
+	    {
+	      sym_hashes = elf_sym_hashes (sub);
+	      bed = get_elf_backend_data (sub);
+	      symtab_hdr = &elf_tdata (sub)->symtab_hdr;
+	      sym_count = symtab_hdr->sh_size / bed->s->sizeof_sym;
+	      ext_start = symtab_hdr->sh_info;
+
+	      /* Scan symbols.  */
+	      for (i = ext_start; i < sym_count; i++)
+		{
+		  cmse_hash = elf32_arm_hash_entry (sym_hashes[i - ext_start]);
+
+		  /* Assume it is a special symbol.  If not, cmse_scan will
+		     warn about it and user can do something about it.  */
+		  if (ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
+		    {
+		      cmse_sec = cmse_hash->root.root.u.def.section;
+		      if (!cmse_sec->gc_mark
+			  && !_bfd_elf_gc_mark (info, cmse_sec, gc_mark_hook))
+			return FALSE;
+		    }
+		}
+	    }
 	}
+      first_bfd_browse = FALSE;
     }
 
   return TRUE;
@@ -13228,7 +15264,7 @@ elf32_arm_adjust_dynamic_symbol (struct 
 				 struct elf_link_hash_entry * h)
 {
   bfd * dynobj;
-  asection * s;
+  asection *s, *srel;
   struct elf32_arm_link_hash_entry * eh;
   struct elf32_arm_link_hash_table *globals;
 
@@ -13315,7 +15351,7 @@ elf32_arm_adjust_dynamic_symbol (struct 
      be handled correctly by relocate_section.  Relocatable executables
      can reference data in shared objects directly, so we don't need to
      do anything here.  */
-  if (info->shared || globals->root.is_relocatable_executable)
+  if (bfd_link_pic (info) || globals->root.is_relocatable_executable)
     return TRUE;
 
   /* We must allocate the symbol in our .dynbss section, which will
@@ -13327,18 +15363,24 @@ elf32_arm_adjust_dynamic_symbol (struct 
      determine the address it must put in the global offset table, so
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
-  s = bfd_get_linker_section (dynobj, ".dynbss");
-  BFD_ASSERT (s != NULL);
-
-  /* We must generate a R_ARM_COPY reloc to tell the dynamic linker to
-     copy the initial value out of the dynamic object and into the
-     runtime process image.  We need to remember the offset into the
+  /* If allowed, we must generate a R_ARM_COPY reloc to tell the dynamic
+     linker to copy the initial value out of the dynamic object and into
+     the runtime process image.  We need to remember the offset into the
      .rel(a).bss section we are going to use.  */
-  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = globals->root.sdynrelro;
+      srel = globals->root.sreldynrelro;
+    }
+  else
+    {
+      s = globals->root.sdynbss;
+      srel = globals->root.srelbss;
+    }
+  if (info->nocopyreloc == 0
+      && (h->root.u.def.section->flags & SEC_ALLOC) != 0
+      && h->size != 0)
     {
-      asection *srel;
-
-      srel = bfd_get_linker_section (dynobj, RELOC_SECTION (globals, ".bss"));
       elf32_arm_allocate_dynrelocs (info, srel, 1);
       h->needs_copy = 1;
     }
@@ -13397,7 +15439,7 @@ allocate_dynrelocs_for_symbol (struct el
 	    h->got.refcount = 0;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || eh->is_iplt
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
@@ -13408,7 +15450,7 @@ allocate_dynrelocs_for_symbol (struct el
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = htab->root.splt;
@@ -13417,13 +15459,13 @@ allocate_dynrelocs_for_symbol (struct el
 	      /* Make sure the function is not marked as Thumb, in case
 		 it is the target of an ABS32 relocation, which will
 		 point to the PLT entry.  */
-	      h->target_internal = ST_BRANCH_TO_ARM;
+	      ARM_SET_SYM_BRANCH_TYPE (h->target_internal, ST_BRANCH_TO_ARM);
 	    }
 
 	  /* VxWorks executables have a second set of relocations for
 	     each PLT entry.  They go in a separate relocation section,
 	     which is processed by the kernel loader.  */
-	  if (htab->vxworks_p && !info->shared)
+	  if (htab->vxworks_p && !bfd_link_pic (info))
 	    {
 	      /* There is a relocation for the initial PLT entry:
 		 an R_ARM_32 relocation for _GLOBAL_OFFSET_TABLE_.  */
@@ -13510,13 +15552,15 @@ allocate_dynrelocs_for_symbol (struct el
 	  dyn = htab->root.dynamic_sections_created;
 
 	  indx = 0;
-	  if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-	      && (!info->shared
+	  if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+					       bfd_link_pic (info),
+					       h)
+	      && (!bfd_link_pic (info)
 		  || !SYMBOL_REFERENCES_LOCAL (info, h)))
 	    indx = h->dynindx;
 
 	  if (tls_type != GOT_NORMAL
-	      && (info->shared || indx != 0)
+	      && (bfd_link_pic (info) || indx != 0)
 	      && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		  || h->root.type != bfd_link_hash_undefweak))
 	    {
@@ -13550,8 +15594,9 @@ allocate_dynrelocs_for_symbol (struct el
 	       they all resolve dynamically instead.  Reserve room for the
 	       GOT entry's R_ARM_IRELATIVE relocation.  */
 	    elf32_arm_allocate_irelocs (info, htab->root.srelgot, 1);
-	  else if (info->shared && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-				    || h->root.type != bfd_link_hash_undefweak))
+	  else if (bfd_link_pic (info)
+		   && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		       || h->root.type != bfd_link_hash_undefweak))
 	    /* Reserve room for the GOT entry's R_ARM_RELATIVE relocation.  */
 	    elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
 	}
@@ -13562,7 +15607,7 @@ allocate_dynrelocs_for_symbol (struct el
   /* Allocate stubs for exported Thumb functions on v4t.  */
   if (!htab->use_blx && h->dynindx != -1
       && h->def_regular
-      && h->target_internal == ST_BRANCH_TO_THUMB
+      && ARM_GET_SYM_BRANCH_TYPE (h->target_internal) == ST_BRANCH_TO_THUMB
       && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
     {
       struct elf_link_hash_entry * th;
@@ -13582,12 +15627,12 @@ allocate_dynrelocs_for_symbol (struct el
       myh = (struct elf_link_hash_entry *) bh;
       myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
       myh->forced_local = 1;
-      myh->target_internal = ST_BRANCH_TO_THUMB;
+      ARM_SET_SYM_BRANCH_TYPE (myh->target_internal, ST_BRANCH_TO_THUMB);
       eh->export_glue = myh;
       th = record_arm_to_thumb_glue (info, h);
       /* Point the symbol at the stub.  */
       h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC);
-      h->target_internal = ST_BRANCH_TO_ARM;
+      ARM_SET_SYM_BRANCH_TYPE (h->target_internal, ST_BRANCH_TO_ARM);
       h->root.u.def.section = th->root.u.def.section;
       h->root.u.def.value = th->root.u.def.value & ~1;
     }
@@ -13601,7 +15646,7 @@ allocate_dynrelocs_for_symbol (struct el
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared || htab->root.is_relocatable_executable)
+  if (bfd_link_pic (info) || htab->root.is_relocatable_executable)
     {
       /* Relocs that use pc_count are PC-relative forms, which will appear
 	 on something like ".long foo - ." or "movw REG, foo - .".  We want
@@ -13777,7 +15822,7 @@ elf32_arm_size_dynamic_sections (bfd * o
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -13929,13 +15974,13 @@ elf32_arm_size_dynamic_sections (bfd * o
 		  && (local_iplt == NULL
 		      || local_iplt->arm.noncall_refcount == 0))
 		elf32_arm_allocate_irelocs (info, srel, 1);
-	      else if (info->shared || output_bfd->flags & DYNAMIC)
+	      else if (bfd_link_pic (info) || output_bfd->flags & DYNAMIC)
 		{
-		  if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
+		  if ((bfd_link_pic (info) && !(*local_tls_type & GOT_TLS_GDESC))
 		      || *local_tls_type & GOT_TLS_GD)
 		    elf32_arm_allocate_dynrelocs (info, srel, 1);
 
-		  if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+		  if (bfd_link_pic (info) && *local_tls_type & GOT_TLS_GDESC)
 		    {
 		      elf32_arm_allocate_dynrelocs (info,
 						    htab->root.srelplt, 1);
@@ -13954,7 +15999,7 @@ elf32_arm_size_dynamic_sections (bfd * o
 	 for R_ARM_TLS_LDM32 relocations.  */
       htab->tls_ldm_got.offset = htab->root.sgot->size;
       htab->root.sgot->size += 8;
-      if (info->shared)
+      if (bfd_link_pic (info))
 	elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
     }
   else
@@ -13974,8 +16019,8 @@ elf32_arm_size_dynamic_sections (bfd * o
       bfd_elf32_arm_init_maps (ibfd);
 
       if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
-	  || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info))
-	/* xgettext:c-format */
+	  || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info)
+	  || !bfd_elf32_arm_stm32l4xx_erratum_scan (ibfd, info))
 	_bfd_error_handler (_("Errors encountered processing file %s"),
 			    ibfd->filename);
     }
@@ -14050,7 +16095,8 @@ elf32_arm_size_dynamic_sections (bfd * o
 	       && s != htab->root.sgotplt
 	       && s != htab->root.iplt
 	       && s != htab->root.igotplt
-	       && s != htab->sdynbss)
+	       && s != htab->root.sdynbss
+	       && s != htab->root.sdynrelro)
 	{
 	  /* It's not one of our sections, so don't allocate space.  */
 	  continue;
@@ -14090,7 +16136,7 @@ elf32_arm_size_dynamic_sections (bfd * o
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-     if (info->executable)
+     if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -14105,9 +16151,9 @@ elf32_arm_size_dynamic_sections (bfd * o
 	      || !add_dynamic_entry (DT_JMPREL, 0))
 	    return FALSE;
 
-	  if (htab->dt_tlsdesc_plt &&
-		(!add_dynamic_entry (DT_TLSDESC_PLT,0)
-		 || !add_dynamic_entry (DT_TLSDESC_GOT,0)))
+	  if (htab->dt_tlsdesc_plt
+	      && (!add_dynamic_entry (DT_TLSDESC_PLT,0)
+		  || !add_dynamic_entry (DT_TLSDESC_GOT,0)))
 	    return FALSE;
 	}
 
@@ -14158,7 +16204,7 @@ elf32_arm_always_size_sections (bfd *out
 {
   asection *tls_sec;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   tls_sec = elf_hash_table (info)->tls_sec;
@@ -14241,7 +16287,7 @@ elf32_arm_finish_dynamic_symbol (bfd * o
 	  /* At least one non-call relocation references this .iplt entry,
 	     so the .iplt entry is the function's canonical address.  */
 	  sym->st_info = ELF_ST_INFO (ELF_ST_BIND (sym->st_info), STT_FUNC);
-	  sym->st_target_internal = ST_BRANCH_TO_ARM;
+	  ARM_SET_SYM_BRANCH_TYPE (sym->st_target_internal, ST_BRANCH_TO_ARM);
 	  sym->st_shndx = (_bfd_elf_section_from_bfd_section
 			   (output_bfd, htab->root.iplt->output_section));
 	  sym->st_value = (h->plt.offset
@@ -14260,14 +16306,15 @@ elf32_arm_finish_dynamic_symbol (bfd * o
 		  && (h->root.type == bfd_link_hash_defined
 		      || h->root.type == bfd_link_hash_defweak));
 
-      s = htab->srelbss;
-      BFD_ASSERT (s != NULL);
-
       rel.r_addend = 0;
       rel.r_offset = (h->root.u.def.value
 		      + h->root.u.def.section->output_section->vma
 		      + h->root.u.def.section->output_offset);
       rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY);
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	s = htab->root.sreldynrelro;
+      else
+	s = htab->root.srelbss;
       elf32_arm_add_dynreloc (output_bfd, info, s, &rel);
     }
 
@@ -14404,27 +16451,26 @@ elf32_arm_finish_dynamic_sections (bfd *
 	      goto get_vma_if_bpabi;
 
 	    case DT_PLTGOT:
-	      name = ".got";
+	      name = htab->symbian_p ? ".got" : ".got.plt";
 	      goto get_vma;
 	    case DT_JMPREL:
 	      name = RELOC_SECTION (htab, ".plt");
 	    get_vma:
-	      s = bfd_get_section_by_name (output_bfd, name);
+	      s = bfd_get_linker_section (dynobj, name);
 	      if (s == NULL)
 		{
-		  /* PR ld/14397: Issue an error message if a required section is missing.  */
-		  (*_bfd_error_handler)
-		    (_("error: required section '%s' not found in the linker script"), name);
+		  _bfd_error_handler
+		    (_("could not find section %s"), name);
 		  bfd_set_error (bfd_error_invalid_operation);
 		  return FALSE;
 		}
 	      if (!htab->symbian_p)
-		dyn.d_un.d_ptr = s->vma;
+		dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      else
 		/* In the BPABI, tags in the PT_DYNAMIC section point
 		   at the file offset, not the memory address, for the
 		   convenience of the post linker.  */
-		dyn.d_un.d_ptr = s->filepos;
+		dyn.d_un.d_ptr = s->output_section->filepos + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
@@ -14442,35 +16488,15 @@ elf32_arm_finish_dynamic_sections (bfd *
 
 	    case DT_RELSZ:
 	    case DT_RELASZ:
-	      if (!htab->symbian_p)
-		{
-		  /* My reading of the SVR4 ABI indicates that the
-		     procedure linkage table relocs (DT_JMPREL) should be
-		     included in the overall relocs (DT_REL).  This is
-		     what Solaris does.  However, UnixWare can not handle
-		     that case.  Therefore, we override the DT_RELSZ entry
-		     here to make it not include the JMPREL relocs.  Since
-		     the linker script arranges for .rel(a).plt to follow all
-		     other relocation sections, we don't have to worry
-		     about changing the DT_REL entry.  */
-		  s = htab->root.srelplt;
-		  if (s != NULL)
-		    dyn.d_un.d_val -= s->size;
-		  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-		  break;
-		}
-	      /* Fall through.  */
-
 	    case DT_REL:
 	    case DT_RELA:
 	      /* In the BPABI, the DT_REL tag must point at the file
 		 offset, not the VMA, of the first relocation
 		 section.  So, we use code similar to that in
 		 elflink.c, but do not check for SHF_ALLOC on the
-		 relcoation section, since relocations sections are
-		 never allocated under the BPABI.  The comments above
-		 about Unixware notwithstanding, we include all of the
-		 relocations here.  */
+		 relocation section, since relocation sections are
+		 never allocated under the BPABI.  PLT relocs are also
+		 included.  */
 	      if (htab->symbian_p)
 		{
 		  unsigned int i;
@@ -14525,7 +16551,9 @@ elf32_arm_finish_dynamic_sections (bfd *
 
 		  eh = elf_link_hash_lookup (elf_hash_table (info), name,
 					     FALSE, FALSE, TRUE);
-		  if (eh != NULL && eh->target_internal == ST_BRANCH_TO_THUMB)
+		  if (eh != NULL
+		      && ARM_GET_SYM_BRANCH_TYPE (eh->target_internal)
+			 == ST_BRANCH_TO_THUMB)
 		    {
 		      dyn.d_un.d_val |= 1;
 		      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -14649,7 +16677,9 @@ elf32_arm_finish_dynamic_sections (bfd *
 #endif
 	}
 
-      if (htab->vxworks_p && !info->shared && htab->root.splt->size > 0)
+      if (htab->vxworks_p
+	  && !bfd_link_pic (info)
+	  && htab->root.splt->size > 0)
 	{
 	  /* Correct the .rel(a).plt.unloaded relocations.  They will have
 	     incorrect symbol indexes.  */
@@ -14707,6 +16737,7 @@ elf32_arm_post_process_headers (bfd * ab
 {
   Elf_Internal_Ehdr * i_ehdrp;	/* ELF file header, internal form.  */
   struct elf32_arm_link_hash_table *globals;
+  struct elf_segment_map *m;
 
   i_ehdrp = elf_elfheader (abfd);
 
@@ -14732,6 +16763,26 @@ elf32_arm_post_process_headers (bfd * ab
       else
 	i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_SOFT;
     }
+
+  /* Scan segment to set p_flags attribute if it contains only sections with
+     SHF_ARM_PURECODE flag.  */
+  for (m = elf_seg_map (abfd); m != NULL; m = m->next)
+    {
+      unsigned int j;
+
+      if (m->count == 0)
+	continue;
+      for (j = 0; j < m->count; j++)
+	{
+	  if (!(elf_section_flags (m->sections[j]) & SHF_ARM_PURECODE))
+	    break;
+	}
+      if (j == m->count)
+	{
+	  m->p_flags = PF_X;
+	  m->p_flags_valid = 1;
+	}
+    }
 }
 
 static enum elf_reloc_type_class
@@ -14747,6 +16798,8 @@ elf32_arm_reloc_type_class (const struct
       return reloc_class_plt;
     case R_ARM_COPY:
       return reloc_class_copy;
+    case R_ARM_IRELATIVE:
+      return reloc_class_ifunc;
     default:
       return reloc_class_normal;
     }
@@ -14783,6 +16836,10 @@ elf32_arm_fake_sections (bfd * abfd, Elf
       hdr->sh_type = SHT_ARM_EXIDX;
       hdr->sh_flags |= SHF_LINK_ORDER;
     }
+
+  if (sec->flags & SEC_ELF_PURECODE)
+    hdr->sh_flags |= SHF_ARM_PURECODE;
+
   return TRUE;
 }
 
@@ -14975,9 +17032,23 @@ elf32_arm_output_plt_map (struct elf_lin
        symbol in a hash traversal.  So look at it now.  */
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
-  eh = (struct elf32_arm_link_hash_entry *) h;
-  return elf32_arm_output_plt_map_1 (osi, SYMBOL_CALLS_LOCAL (osi->info, h),
-				     &h->plt, &eh->plt);
+  eh = (struct elf32_arm_link_hash_entry *) h;
+  return elf32_arm_output_plt_map_1 (osi, SYMBOL_CALLS_LOCAL (osi->info, h),
+				     &h->plt, &eh->plt);
+}
+
+/* Bind a veneered symbol to its veneer identified by its hash entry
+   STUB_ENTRY.  The veneered location thus loose its symbol.  */
+
+static void
+arm_stub_claim_sym (struct elf32_arm_stub_hash_entry *stub_entry)
+{
+  struct elf32_arm_link_hash_entry *hash = stub_entry->h;
+
+  BFD_ASSERT (hash);
+  hash->root.root.u.def.section = stub_entry->stub_sec;
+  hash->root.root.u.def.value = stub_entry->stub_offset;
+  hash->root.size = stub_entry->stub_size;
 }
 
 /* Output a single local symbol for a generated stub.  */
@@ -15026,24 +17097,30 @@ arm_map_one_stub (struct bfd_hash_entry 
     return TRUE;
 
   addr = (bfd_vma) stub_entry->stub_offset;
-  stub_name = stub_entry->output_name;
-
   template_sequence = stub_entry->stub_template;
-  switch (template_sequence[0].type)
+
+  if (arm_stub_sym_claimed (stub_entry->stub_type))
+    arm_stub_claim_sym (stub_entry);
+  else
     {
-    case ARM_TYPE:
-      if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size))
-	return FALSE;
-      break;
-    case THUMB16_TYPE:
-    case THUMB32_TYPE:
-      if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1,
-				      stub_entry->stub_size))
-	return FALSE;
-      break;
-    default:
-      BFD_FAIL ();
-      return 0;
+      stub_name = stub_entry->output_name;
+      switch (template_sequence[0].type)
+	{
+	case ARM_TYPE:
+	  if (!elf32_arm_output_stub_sym (osi, stub_name, addr,
+					  stub_entry->stub_size))
+	    return FALSE;
+	  break;
+	case THUMB16_TYPE:
+	case THUMB32_TYPE:
+	  if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1,
+					  stub_entry->stub_size))
+	    return FALSE;
+	  break;
+	default:
+	  BFD_FAIL ();
+	  return 0;
+	}
     }
 
   prev_type = DATA_TYPE;
@@ -15168,7 +17245,7 @@ elf32_arm_output_arch_local_syms (bfd *o
 
       osi.sec_shndx = _bfd_elf_section_from_bfd_section
 	  (output_bfd, osi.sec->output_section);
-      if (info->shared || htab->root.is_relocatable_executable
+      if (bfd_link_pic (info) || htab->root.is_relocatable_executable
 	  || htab->pic_veneer)
 	size = ARM2THUMB_PIC_GLUE_SIZE;
       else if (htab->use_blx)
@@ -15246,7 +17323,7 @@ elf32_arm_output_arch_local_syms (bfd *o
       if (htab->vxworks_p)
 	{
 	  /* VxWorks shared libraries have no PLT header.  */
-	  if (!info->shared)
+	  if (!bfd_link_pic (info))
 	    {
 	      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
 		return FALSE;
@@ -15336,6 +17413,95 @@ elf32_arm_output_arch_local_syms (bfd *o
   return TRUE;
 }
 
+/* Filter normal symbols of CMSE entry functions of ABFD to include in
+   the import library.  All SYMCOUNT symbols of ABFD can be examined
+   from their pointers in SYMS.  Pointers of symbols to keep should be
+   stored continuously at the beginning of that array.
+
+   Returns the number of symbols to keep.  */
+
+static unsigned int
+elf32_arm_filter_cmse_symbols (bfd *abfd ATTRIBUTE_UNUSED,
+			       struct bfd_link_info *info,
+			       asymbol **syms, long symcount)
+{
+  size_t maxnamelen;
+  char *cmse_name;
+  long src_count, dst_count = 0;
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  if (!htab->stub_bfd || !htab->stub_bfd->sections)
+    symcount = 0;
+
+  maxnamelen = 128;
+  cmse_name = (char *) bfd_malloc (maxnamelen);
+  for (src_count = 0; src_count < symcount; src_count++)
+    {
+      struct elf32_arm_link_hash_entry *cmse_hash;
+      asymbol *sym;
+      flagword flags;
+      char *name;
+      size_t namelen;
+
+      sym = syms[src_count];
+      flags = sym->flags;
+      name = (char *) bfd_asymbol_name (sym);
+
+      if ((flags & BSF_FUNCTION) != BSF_FUNCTION)
+	continue;
+      if (!(flags & (BSF_GLOBAL | BSF_WEAK)))
+	continue;
+
+      namelen = strlen (name) + sizeof (CMSE_PREFIX) + 1;
+      if (namelen > maxnamelen)
+	{
+	  cmse_name = (char *)
+	    bfd_realloc (cmse_name, namelen);
+	  maxnamelen = namelen;
+	}
+      snprintf (cmse_name, maxnamelen, "%s%s", CMSE_PREFIX, name);
+      cmse_hash = (struct elf32_arm_link_hash_entry *)
+	elf_link_hash_lookup (&(htab)->root, cmse_name, FALSE, FALSE, TRUE);
+
+      if (!cmse_hash
+	  || (cmse_hash->root.root.type != bfd_link_hash_defined
+	      && cmse_hash->root.root.type != bfd_link_hash_defweak)
+	  || cmse_hash->root.type != STT_FUNC)
+	continue;
+
+      if (!ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
+	continue;
+
+      syms[dst_count++] = sym;
+    }
+  free (cmse_name);
+
+  syms[dst_count] = NULL;
+
+  return dst_count;
+}
+
+/* Filter symbols of ABFD to include in the import library.  All
+   SYMCOUNT symbols of ABFD can be examined from their pointers in
+   SYMS.  Pointers of symbols to keep should be stored continuously at
+   the beginning of that array.
+
+   Returns the number of symbols to keep.  */
+
+static unsigned int
+elf32_arm_filter_implib_symbols (bfd *abfd ATTRIBUTE_UNUSED,
+				 struct bfd_link_info *info,
+				 asymbol **syms, long symcount)
+{
+  struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info);
+
+  if (globals->cmse_implib)
+    return elf32_arm_filter_cmse_symbols (abfd, info, syms, symcount);
+  else
+    return _bfd_elf_filter_global_symbols (abfd, info, syms, symcount);
+}
+
 /* Allocate target specific section data.  */
 
 static bfd_boolean
@@ -15432,7 +17598,7 @@ make_branch_to_a8_stub (struct bfd_hash_
   bfd_vma veneered_insn_loc, veneer_entry_loc;
   bfd_signed_vma branch_offset;
   bfd *abfd;
-  unsigned int target;
+  unsigned int loc;
 
   stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
   data = (struct a8_branch_to_stub_data *) in_arg;
@@ -15443,9 +17609,11 @@ make_branch_to_a8_stub (struct bfd_hash_
 
   contents = data->contents;
 
+  /* We use target_section as Cortex-A8 erratum workaround stubs are only
+     generated when both source and target are in the same section.  */
   veneered_insn_loc = stub_entry->target_section->output_section->vma
 		      + stub_entry->target_section->output_offset
-		      + stub_entry->target_value;
+		      + stub_entry->source_value;
 
   veneer_entry_loc = stub_entry->stub_sec->output_section->vma
 		     + stub_entry->stub_sec->output_offset
@@ -15457,15 +17625,15 @@ make_branch_to_a8_stub (struct bfd_hash_
   branch_offset = veneer_entry_loc - veneered_insn_loc - 4;
 
   abfd = stub_entry->target_section->owner;
-  target = stub_entry->target_value;
+  loc = stub_entry->source_value;
 
   /* We attempt to avoid this condition by setting stubs_always_after_branch
      in elf32_arm_size_stubs if we've enabled the Cortex-A8 erratum workaround.
      This check is just to be on the safe side...  */
   if ((veneered_insn_loc & ~0xfff) == (veneer_entry_loc & ~0xfff))
     {
-      (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub is "
-			       "allocated in unsafe location"), abfd);
+      _bfd_error_handler (_("%B: error: Cortex-A8 erratum stub is "
+			    "allocated in unsafe location"), abfd);
       return FALSE;
     }
 
@@ -15491,8 +17659,8 @@ make_branch_to_a8_stub (struct bfd_hash_
 	  {
 	    /* There's not much we can do apart from complain if this
 	       happens.  */
-	    (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub out "
-				     "of range (input file too large)"), abfd);
+	    _bfd_error_handler (_("%B: error: Cortex-A8 erratum stub out "
+				  "of range (input file too large)"), abfd);
 	    return FALSE;
 	  }
 
@@ -15518,12 +17686,744 @@ make_branch_to_a8_stub (struct bfd_hash_
       return FALSE;
     }
 
-  bfd_put_16 (abfd, (branch_insn >> 16) & 0xffff, &contents[target]);
-  bfd_put_16 (abfd, branch_insn & 0xffff, &contents[target + 2]);
+  bfd_put_16 (abfd, (branch_insn >> 16) & 0xffff, &contents[loc]);
+  bfd_put_16 (abfd, branch_insn & 0xffff, &contents[loc + 2]);
 
   return TRUE;
 }
 
+/* Beginning of stm32l4xx work-around.  */
+
+/* Functions encoding instructions necessary for the emission of the
+   fix-stm32l4xx-629360.
+   Encoding is extracted from the
+   ARM (C) Architecture Reference Manual
+   ARMv7-A and ARMv7-R edition
+   ARM DDI 0406C.b (ID072512).  */
+
+static inline bfd_vma
+create_instruction_branch_absolute (int branch_offset)
+{
+  /* A8.8.18 B (A8-334)
+     B target_address (Encoding T4).  */
+  /* 1111 - 0Sii - iiii - iiii - 10J1 - Jiii - iiii - iiii.  */
+  /* jump offset is:  S:I1:I2:imm10:imm11:0.  */
+  /* with : I1 = NOT (J1 EOR S) I2 = NOT (J2 EOR S).  */
+
+  int s = ((branch_offset & 0x1000000) >> 24);
+  int j1 = s ^ !((branch_offset & 0x800000) >> 23);
+  int j2 = s ^ !((branch_offset & 0x400000) >> 22);
+
+  if (branch_offset < -(1 << 24) || branch_offset >= (1 << 24))
+    BFD_ASSERT (0 && "Error: branch out of range.  Cannot create branch.");
+
+  bfd_vma patched_inst = 0xf0009000
+    | s << 26 /* S.  */
+    | (((unsigned long) (branch_offset) >> 12) & 0x3ff) << 16 /* imm10.  */
+    | j1 << 13 /* J1.  */
+    | j2 << 11 /* J2.  */
+    | (((unsigned long) (branch_offset) >> 1) & 0x7ff); /* imm11.  */
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_ldmia (int base_reg, int wback, int reg_mask)
+{
+  /* A8.8.57 LDM/LDMIA/LDMFD (A8-396)
+     LDMIA Rn!, {Ra, Rb, Rc, ...} (Encoding T2).  */
+  bfd_vma patched_inst = 0xe8900000
+    | (/*W=*/wback << 21)
+    | (base_reg << 16)
+    | (reg_mask & 0x0000ffff);
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_ldmdb (int base_reg, int wback, int reg_mask)
+{
+  /* A8.8.60 LDMDB/LDMEA (A8-402)
+     LDMDB Rn!, {Ra, Rb, Rc, ...} (Encoding T1).  */
+  bfd_vma patched_inst = 0xe9100000
+    | (/*W=*/wback << 21)
+    | (base_reg << 16)
+    | (reg_mask & 0x0000ffff);
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_mov (int target_reg, int source_reg)
+{
+  /* A8.8.103 MOV (register) (A8-486)
+     MOV Rd, Rm (Encoding T1).  */
+  bfd_vma patched_inst = 0x4600
+    | (target_reg & 0x7)
+    | ((target_reg & 0x8) >> 3) << 7
+    | (source_reg << 3);
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_sub (int target_reg, int source_reg, int value)
+{
+  /* A8.8.221 SUB (immediate) (A8-708)
+     SUB Rd, Rn, #value (Encoding T3).  */
+  bfd_vma patched_inst = 0xf1a00000
+    | (target_reg << 8)
+    | (source_reg << 16)
+    | (/*S=*/0 << 20)
+    | ((value & 0x800) >> 11) << 26
+    | ((value & 0x700) >>  8) << 12
+    | (value & 0x0ff);
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_vldmia (int base_reg, int is_dp, int wback, int num_words,
+			   int first_reg)
+{
+  /* A8.8.332 VLDM (A8-922)
+     VLMD{MODE} Rn{!}, {list} (Encoding T1 or T2).  */
+  bfd_vma patched_inst = (is_dp ? 0xec900b00 : 0xec900a00)
+    | (/*W=*/wback << 21)
+    | (base_reg << 16)
+    | (num_words & 0x000000ff)
+    | (((unsigned)first_reg >> 1) & 0x0000000f) << 12
+    | (first_reg & 0x00000001) << 22;
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_vldmdb (int base_reg, int is_dp, int num_words,
+			   int first_reg)
+{
+  /* A8.8.332 VLDM (A8-922)
+     VLMD{MODE} Rn!, {} (Encoding T1 or T2).  */
+  bfd_vma patched_inst = (is_dp ? 0xed300b00 : 0xed300a00)
+    | (base_reg << 16)
+    | (num_words & 0x000000ff)
+    | (((unsigned)first_reg >>1 ) & 0x0000000f) << 12
+    | (first_reg & 0x00000001) << 22;
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_udf_w (int value)
+{
+  /* A8.8.247 UDF (A8-758)
+     Undefined (Encoding T2).  */
+  bfd_vma patched_inst = 0xf7f0a000
+    | (value & 0x00000fff)
+    | (value & 0x000f0000) << 16;
+
+  return patched_inst;
+}
+
+static inline bfd_vma
+create_instruction_udf (int value)
+{
+  /* A8.8.247 UDF (A8-758)
+     Undefined (Encoding T1).  */
+  bfd_vma patched_inst = 0xde00
+    | (value & 0xff);
+
+  return patched_inst;
+}
+
+/* Functions writing an instruction in memory, returning the next
+   memory position to write to.  */
+
+static inline bfd_byte *
+push_thumb2_insn32 (struct elf32_arm_link_hash_table * htab,
+		    bfd * output_bfd, bfd_byte *pt, insn32 insn)
+{
+  put_thumb2_insn (htab, output_bfd, insn, pt);
+  return pt + 4;
+}
+
+static inline bfd_byte *
+push_thumb2_insn16 (struct elf32_arm_link_hash_table * htab,
+		    bfd * output_bfd, bfd_byte *pt, insn32 insn)
+{
+  put_thumb_insn (htab, output_bfd, insn, pt);
+  return pt + 2;
+}
+
+/* Function filling up a region in memory with T1 and T2 UDFs taking
+   care of alignment.  */
+
+static bfd_byte *
+stm32l4xx_fill_stub_udf (struct elf32_arm_link_hash_table * htab,
+			 bfd *                   output_bfd,
+			 const bfd_byte * const  base_stub_contents,
+			 bfd_byte * const        from_stub_contents,
+			 const bfd_byte * const  end_stub_contents)
+{
+  bfd_byte *current_stub_contents = from_stub_contents;
+
+  /* Fill the remaining of the stub with deterministic contents : UDF
+     instructions.
+     Check if realignment is needed on modulo 4 frontier using T1, to
+     further use T2.  */
+  if ((current_stub_contents < end_stub_contents)
+      && !((current_stub_contents - base_stub_contents) % 2)
+      && ((current_stub_contents - base_stub_contents) % 4))
+    current_stub_contents =
+      push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
+			  create_instruction_udf (0));
+
+  for (; current_stub_contents < end_stub_contents;)
+    current_stub_contents =
+      push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			  create_instruction_udf_w (0));
+
+  return current_stub_contents;
+}
+
+/* Functions writing the stream of instructions equivalent to the
+   derived sequence for ldmia, ldmdb, vldm respectively.  */
+
+static void
+stm32l4xx_create_replacing_stub_ldmia (struct elf32_arm_link_hash_table * htab,
+				       bfd * output_bfd,
+				       const insn32 initial_insn,
+				       const bfd_byte *const initial_insn_addr,
+				       bfd_byte *const base_stub_contents)
+{
+  int wback = (initial_insn & 0x00200000) >> 21;
+  int ri, rn = (initial_insn & 0x000F0000) >> 16;
+  int insn_all_registers = initial_insn & 0x0000ffff;
+  int insn_low_registers, insn_high_registers;
+  int usable_register_mask;
+  int nb_registers = elf32_arm_popcount (insn_all_registers);
+  int restore_pc = (insn_all_registers & (1 << 15)) ? 1 : 0;
+  int restore_rn = (insn_all_registers & (1 << rn)) ? 1 : 0;
+  bfd_byte *current_stub_contents = base_stub_contents;
+
+  BFD_ASSERT (is_thumb2_ldmia (initial_insn));
+
+  /* In BFD_ARM_STM32L4XX_FIX_ALL mode we may have to deal with
+     smaller than 8 registers load sequences that do not cause the
+     hardware issue.  */
+  if (nb_registers <= 8)
+    {
+      /* UNTOUCHED : LDMIA Rn{!}, {R-all-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    initial_insn);
+
+      /* B initial_insn_addr+4.  */
+      if (!restore_pc)
+	current_stub_contents =
+	  push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			      create_instruction_branch_absolute
+			      (initial_insn_addr - current_stub_contents));
+
+      /* Fill the remaining of the stub with deterministic contents.  */
+      current_stub_contents =
+	stm32l4xx_fill_stub_udf (htab, output_bfd,
+				 base_stub_contents, current_stub_contents,
+				 base_stub_contents +
+				 STM32L4XX_ERRATUM_LDM_VENEER_SIZE);
+
+      return;
+    }
+
+  /* - reg_list[13] == 0.  */
+  BFD_ASSERT ((insn_all_registers & (1 << 13))==0);
+
+  /* - reg_list[14] & reg_list[15] != 1.  */
+  BFD_ASSERT ((insn_all_registers & 0xC000) != 0xC000);
+
+  /* - if (wback==1) reg_list[rn] == 0.  */
+  BFD_ASSERT (!wback || !restore_rn);
+
+  /* - nb_registers > 8.  */
+  BFD_ASSERT (elf32_arm_popcount (insn_all_registers) > 8);
+
+  /* At this point, LDMxx initial insn loads between 9 and 14 registers.  */
+
+  /* In the following algorithm, we split this wide LDM using 2 LDM insns:
+    - One with the 7 lowest registers (register mask 0x007F)
+      This LDM will finally contain between 2 and 7 registers
+    - One with the 7 highest registers (register mask 0xDF80)
+      This ldm will finally contain between 2 and 7 registers.  */
+  insn_low_registers = insn_all_registers & 0x007F;
+  insn_high_registers = insn_all_registers & 0xDF80;
+
+  /* A spare register may be needed during this veneer to temporarily
+     handle the base register.  This register will be restored with the
+     last LDM operation.
+     The usable register may be any general purpose register (that
+     excludes PC, SP, LR : register mask is 0x1FFF).  */
+  usable_register_mask = 0x1FFF;
+
+  /* Generate the stub function.  */
+  if (wback)
+    {
+      /* LDMIA Rn!, {R-low-register-list} : (Encoding T2).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (rn, /*wback=*/1, insn_low_registers));
+
+      /* LDMIA Rn!, {R-high-register-list} : (Encoding T2).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (rn, /*wback=*/1, insn_high_registers));
+      if (!restore_pc)
+	{
+	  /* B initial_insn_addr+4.  */
+	  current_stub_contents =
+	    push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+				create_instruction_branch_absolute
+				(initial_insn_addr - current_stub_contents));
+       }
+    }
+  else /* if (!wback).  */
+    {
+      ri = rn;
+
+      /* If Rn is not part of the high-register-list, move it there.  */
+      if (!(insn_high_registers & (1 << rn)))
+	{
+	  /* Choose a Ri in the high-register-list that will be restored.  */
+	  ri = ctz (insn_high_registers & usable_register_mask & ~(1 << rn));
+
+	  /* MOV Ri, Rn.  */
+	  current_stub_contents =
+	    push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
+				create_instruction_mov (ri, rn));
+	}
+
+      /* LDMIA Ri!, {R-low-register-list} : (Encoding T2).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/1, insn_low_registers));
+
+      /* LDMIA Ri, {R-high-register-list} : (Encoding T2).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/0, insn_high_registers));
+
+      if (!restore_pc)
+	{
+	  /* B initial_insn_addr+4.  */
+	  current_stub_contents =
+	    push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+				create_instruction_branch_absolute
+				(initial_insn_addr - current_stub_contents));
+	}
+    }
+
+  /* Fill the remaining of the stub with deterministic contents.  */
+  current_stub_contents =
+    stm32l4xx_fill_stub_udf (htab, output_bfd,
+			     base_stub_contents, current_stub_contents,
+			     base_stub_contents +
+			     STM32L4XX_ERRATUM_LDM_VENEER_SIZE);
+}
+
+static void
+stm32l4xx_create_replacing_stub_ldmdb (struct elf32_arm_link_hash_table * htab,
+				       bfd * output_bfd,
+				       const insn32 initial_insn,
+				       const bfd_byte *const initial_insn_addr,
+				       bfd_byte *const base_stub_contents)
+{
+  int wback = (initial_insn & 0x00200000) >> 21;
+  int ri, rn = (initial_insn & 0x000f0000) >> 16;
+  int insn_all_registers = initial_insn & 0x0000ffff;
+  int insn_low_registers, insn_high_registers;
+  int usable_register_mask;
+  int restore_pc = (insn_all_registers & (1 << 15)) ? 1 : 0;
+  int restore_rn = (insn_all_registers & (1 << rn)) ? 1 : 0;
+  int nb_registers = elf32_arm_popcount (insn_all_registers);
+  bfd_byte *current_stub_contents = base_stub_contents;
+
+  BFD_ASSERT (is_thumb2_ldmdb (initial_insn));
+
+  /* In BFD_ARM_STM32L4XX_FIX_ALL mode we may have to deal with
+     smaller than 8 registers load sequences that do not cause the
+     hardware issue.  */
+  if (nb_registers <= 8)
+    {
+      /* UNTOUCHED : LDMIA Rn{!}, {R-all-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    initial_insn);
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+
+      /* Fill the remaining of the stub with deterministic contents.  */
+      current_stub_contents =
+	stm32l4xx_fill_stub_udf (htab, output_bfd,
+				 base_stub_contents, current_stub_contents,
+				 base_stub_contents +
+				 STM32L4XX_ERRATUM_LDM_VENEER_SIZE);
+
+      return;
+    }
+
+  /* - reg_list[13] == 0.  */
+  BFD_ASSERT ((insn_all_registers & (1 << 13)) == 0);
+
+  /* - reg_list[14] & reg_list[15] != 1.  */
+  BFD_ASSERT ((insn_all_registers & 0xC000) != 0xC000);
+
+  /* - if (wback==1) reg_list[rn] == 0.  */
+  BFD_ASSERT (!wback || !restore_rn);
+
+  /* - nb_registers > 8.  */
+  BFD_ASSERT (elf32_arm_popcount (insn_all_registers) > 8);
+
+  /* At this point, LDMxx initial insn loads between 9 and 14 registers.  */
+
+  /* In the following algorithm, we split this wide LDM using 2 LDM insn:
+    - One with the 7 lowest registers (register mask 0x007F)
+      This LDM will finally contain between 2 and 7 registers
+    - One with the 7 highest registers (register mask 0xDF80)
+      This ldm will finally contain between 2 and 7 registers.  */
+  insn_low_registers = insn_all_registers & 0x007F;
+  insn_high_registers = insn_all_registers & 0xDF80;
+
+  /* A spare register may be needed during this veneer to temporarily
+     handle the base register.  This register will be restored with
+     the last LDM operation.
+     The usable register may be any general purpose register (that excludes
+     PC, SP, LR : register mask is 0x1FFF).  */
+  usable_register_mask = 0x1FFF;
+
+  /* Generate the stub function.  */
+  if (!wback && !restore_pc && !restore_rn)
+    {
+      /* Choose a Ri in the low-register-list that will be restored.  */
+      ri = ctz (insn_low_registers & usable_register_mask & ~(1 << rn));
+
+      /* MOV Ri, Rn.  */
+      current_stub_contents =
+	push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
+			    create_instruction_mov (ri, rn));
+
+      /* LDMDB Ri!, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (ri, /*wback=*/1, insn_high_registers));
+
+      /* LDMDB Ri, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (ri, /*wback=*/0, insn_low_registers));
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+    }
+  else if (wback && !restore_pc && !restore_rn)
+    {
+      /* LDMDB Rn!, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (rn, /*wback=*/1, insn_high_registers));
+
+      /* LDMDB Rn!, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (rn, /*wback=*/1, insn_low_registers));
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+    }
+  else if (!wback && restore_pc && !restore_rn)
+    {
+      /* Choose a Ri in the high-register-list that will be restored.  */
+      ri = ctz (insn_high_registers & usable_register_mask & ~(1 << rn));
+
+      /* SUB Ri, Rn, #(4*nb_registers).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_sub (ri, rn, (4 * nb_registers)));
+
+      /* LDMIA Ri!, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/1, insn_low_registers));
+
+      /* LDMIA Ri, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/0, insn_high_registers));
+    }
+  else if (wback && restore_pc && !restore_rn)
+    {
+      /* Choose a Ri in the high-register-list that will be restored.  */
+      ri = ctz (insn_high_registers & usable_register_mask & ~(1 << rn));
+
+      /* SUB Rn, Rn, #(4*nb_registers)  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_sub (rn, rn, (4 * nb_registers)));
+
+      /* MOV Ri, Rn.  */
+      current_stub_contents =
+	push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
+			    create_instruction_mov (ri, rn));
+
+      /* LDMIA Ri!, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/1, insn_low_registers));
+
+      /* LDMIA Ri, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/0, insn_high_registers));
+    }
+  else if (!wback && !restore_pc && restore_rn)
+    {
+      ri = rn;
+      if (!(insn_low_registers & (1 << rn)))
+	{
+	  /* Choose a Ri in the low-register-list that will be restored.  */
+	  ri = ctz (insn_low_registers & usable_register_mask & ~(1 << rn));
+
+	  /* MOV Ri, Rn.  */
+	  current_stub_contents =
+	    push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
+				create_instruction_mov (ri, rn));
+	}
+
+      /* LDMDB Ri!, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (ri, /*wback=*/1, insn_high_registers));
+
+      /* LDMDB Ri, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmdb
+			    (ri, /*wback=*/0, insn_low_registers));
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+    }
+  else if (!wback && restore_pc && restore_rn)
+    {
+      ri = rn;
+      if (!(insn_high_registers & (1 << rn)))
+	{
+	  /* Choose a Ri in the high-register-list that will be restored.  */
+	  ri = ctz (insn_high_registers & usable_register_mask & ~(1 << rn));
+	}
+
+      /* SUB Ri, Rn, #(4*nb_registers).  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_sub (ri, rn, (4 * nb_registers)));
+
+      /* LDMIA Ri!, {R-low-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/1, insn_low_registers));
+
+      /* LDMIA Ri, {R-high-register-list}.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_ldmia
+			    (ri, /*wback=*/0, insn_high_registers));
+    }
+  else if (wback && restore_rn)
+    {
+      /* The assembler should not have accepted to encode this.  */
+      BFD_ASSERT (0 && "Cannot patch an instruction that has an "
+	"undefined behavior.\n");
+    }
+
+  /* Fill the remaining of the stub with deterministic contents.  */
+  current_stub_contents =
+    stm32l4xx_fill_stub_udf (htab, output_bfd,
+			     base_stub_contents, current_stub_contents,
+			     base_stub_contents +
+			     STM32L4XX_ERRATUM_LDM_VENEER_SIZE);
+
+}
+
+static void
+stm32l4xx_create_replacing_stub_vldm (struct elf32_arm_link_hash_table * htab,
+				      bfd * output_bfd,
+				      const insn32 initial_insn,
+				      const bfd_byte *const initial_insn_addr,
+				      bfd_byte *const base_stub_contents)
+{
+  int num_words = ((unsigned int) initial_insn << 24) >> 24;
+  bfd_byte *current_stub_contents = base_stub_contents;
+
+  BFD_ASSERT (is_thumb2_vldm (initial_insn));
+
+  /* In BFD_ARM_STM32L4XX_FIX_ALL mode we may have to deal with
+     smaller than 8 words load sequences that do not cause the
+     hardware issue.  */
+  if (num_words <= 8)
+    {
+      /* Untouched instruction.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    initial_insn);
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+    }
+  else
+    {
+      bfd_boolean is_dp = /* DP encoding.  */
+	(initial_insn & 0xfe100f00) == 0xec100b00;
+      bfd_boolean is_ia_nobang = /* (IA without !).  */
+	(((initial_insn << 7) >> 28) & 0xd) == 0x4;
+      bfd_boolean is_ia_bang = /* (IA with !) - includes VPOP.  */
+	(((initial_insn << 7) >> 28) & 0xd) == 0x5;
+      bfd_boolean is_db_bang = /* (DB with !).  */
+	(((initial_insn << 7) >> 28) & 0xd) == 0x9;
+      int base_reg = ((unsigned int) initial_insn << 12) >> 28;
+      /* d = UInt (Vd:D);.  */
+      int first_reg = ((((unsigned int) initial_insn << 16) >> 28) << 1)
+	| (((unsigned int)initial_insn << 9) >> 31);
+
+      /* Compute the number of 8-words chunks needed to split.  */
+      int chunks = (num_words % 8) ? (num_words / 8 + 1) : (num_words / 8);
+      int chunk;
+
+      /* The test coverage has been done assuming the following
+	 hypothesis that exactly one of the previous is_ predicates is
+	 true.  */
+      BFD_ASSERT (    (is_ia_nobang ^ is_ia_bang ^ is_db_bang)
+		  && !(is_ia_nobang & is_ia_bang & is_db_bang));
+
+      /* We treat the cutting of the words in one pass for all
+	 cases, then we emit the adjustments:
+
+	 vldm rx, {...}
+	 -> vldm rx!, {8_words_or_less} for each needed 8_word
+	 -> sub rx, rx, #size (list)
+
+	 vldm rx!, {...}
+	 -> vldm rx!, {8_words_or_less} for each needed 8_word
+	 This also handles vpop instruction (when rx is sp)
+
+	 vldmd rx!, {...}
+	 -> vldmb rx!, {8_words_or_less} for each needed 8_word.  */
+      for (chunk = 0; chunk < chunks; ++chunk)
+	{
+	  bfd_vma new_insn = 0;
+
+	  if (is_ia_nobang || is_ia_bang)
+	    {
+	      new_insn = create_instruction_vldmia
+		(base_reg,
+		 is_dp,
+		 /*wback= .  */1,
+		 chunks - (chunk + 1) ?
+		 8 : num_words - chunk * 8,
+		 first_reg + chunk * 8);
+	    }
+	  else if (is_db_bang)
+	    {
+	      new_insn = create_instruction_vldmdb
+		(base_reg,
+		 is_dp,
+		 chunks - (chunk + 1) ?
+		 8 : num_words - chunk * 8,
+		 first_reg + chunk * 8);
+	    }
+
+	  if (new_insn)
+	    current_stub_contents =
+	      push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+				  new_insn);
+	}
+
+      /* Only this case requires the base register compensation
+	 subtract.  */
+      if (is_ia_nobang)
+	{
+	  current_stub_contents =
+	    push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+				create_instruction_sub
+				(base_reg, base_reg, 4*num_words));
+	}
+
+      /* B initial_insn_addr+4.  */
+      current_stub_contents =
+	push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
+			    create_instruction_branch_absolute
+			    (initial_insn_addr - current_stub_contents));
+    }
+
+  /* Fill the remaining of the stub with deterministic contents.  */
+  current_stub_contents =
+    stm32l4xx_fill_stub_udf (htab, output_bfd,
+			     base_stub_contents, current_stub_contents,
+			     base_stub_contents +
+			     STM32L4XX_ERRATUM_VLDM_VENEER_SIZE);
+}
+
+static void
+stm32l4xx_create_replacing_stub (struct elf32_arm_link_hash_table * htab,
+				 bfd * output_bfd,
+				 const insn32 wrong_insn,
+				 const bfd_byte *const wrong_insn_addr,
+				 bfd_byte *const stub_contents)
+{
+  if (is_thumb2_ldmia (wrong_insn))
+    stm32l4xx_create_replacing_stub_ldmia (htab, output_bfd,
+					   wrong_insn, wrong_insn_addr,
+					   stub_contents);
+  else if (is_thumb2_ldmdb (wrong_insn))
+    stm32l4xx_create_replacing_stub_ldmdb (htab, output_bfd,
+					   wrong_insn, wrong_insn_addr,
+					   stub_contents);
+  else if (is_thumb2_vldm (wrong_insn))
+    stm32l4xx_create_replacing_stub_vldm (htab, output_bfd,
+					  wrong_insn, wrong_insn_addr,
+					  stub_contents);
+}
+
+/* End of stm32l4xx work-around.  */
+
+
 /* Do code byteswapping.  Return FALSE afterwards so that the section is
    written out as normal.  */
 
@@ -15538,6 +18438,7 @@ elf32_arm_write_section (bfd *output_bfd
   struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
   elf32_arm_section_map *map;
   elf32_vfp11_erratum_list *errnode;
+  elf32_stm32l4xx_erratum_list *stm32l4xx_errnode;
   bfd_vma ptr;
   bfd_vma end;
   bfd_vma offset = sec->output_section->vma + sec->output_offset;
@@ -15585,8 +18486,8 @@ elf32_arm_write_section (bfd *output_bfd
 
 		if ((signed) branch_to_veneer < -(1 << 25)
 		    || (signed) branch_to_veneer >= (1 << 25))
-		  (*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
-					   "range"), output_bfd);
+		  _bfd_error_handler (_("%B: error: VFP11 veneer out of "
+					"range"), output_bfd);
 
 		insn |= (branch_to_veneer >> 2) & 0xffffff;
 		contents[endianflip ^ target] = insn & 0xff;
@@ -15607,8 +18508,8 @@ elf32_arm_write_section (bfd *output_bfd
 
 		if ((signed) branch_from_veneer < -(1 << 25)
 		    || (signed) branch_from_veneer >= (1 << 25))
-		  (*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
-					   "range"), output_bfd);
+		  _bfd_error_handler (_("%B: error: VFP11 veneer out of "
+					"range"), output_bfd);
 
 		/* Original instruction.  */
 		insn = errnode->u.v.branch->u.b.vfp_insn;
@@ -15632,6 +18533,89 @@ elf32_arm_write_section (bfd *output_bfd
 	}
     }
 
+  if (arm_data->stm32l4xx_erratumcount != 0)
+    {
+      for (stm32l4xx_errnode = arm_data->stm32l4xx_erratumlist;
+	   stm32l4xx_errnode != 0;
+	   stm32l4xx_errnode = stm32l4xx_errnode->next)
+	{
+	  bfd_vma target = stm32l4xx_errnode->vma - offset;
+
+	  switch (stm32l4xx_errnode->type)
+	    {
+	    case STM32L4XX_ERRATUM_BRANCH_TO_VENEER:
+	      {
+		unsigned int insn;
+		bfd_vma branch_to_veneer =
+		  stm32l4xx_errnode->u.b.veneer->vma - stm32l4xx_errnode->vma;
+
+		if ((signed) branch_to_veneer < -(1 << 24)
+		    || (signed) branch_to_veneer >= (1 << 24))
+		  {
+		    bfd_vma out_of_range =
+		      ((signed) branch_to_veneer < -(1 << 24)) ?
+		      - branch_to_veneer - (1 << 24) :
+		      ((signed) branch_to_veneer >= (1 << 24)) ?
+		      branch_to_veneer - (1 << 24) : 0;
+
+		    _bfd_error_handler
+		      (_("%B(%#x): error: Cannot create STM32L4XX veneer. "
+			 "Jump out of range by %ld bytes. "
+			 "Cannot encode branch instruction. "),
+		       output_bfd,
+		       (long) (stm32l4xx_errnode->vma - 4),
+		       out_of_range);
+		    continue;
+		  }
+
+		insn = create_instruction_branch_absolute
+		  (stm32l4xx_errnode->u.b.veneer->vma - stm32l4xx_errnode->vma);
+
+		/* The instruction is before the label.  */
+		target -= 4;
+
+		put_thumb2_insn (globals, output_bfd,
+				 (bfd_vma) insn, contents + target);
+	      }
+	      break;
+
+	    case STM32L4XX_ERRATUM_VENEER:
+	      {
+		bfd_byte * veneer;
+		bfd_byte * veneer_r;
+		unsigned int insn;
+
+		veneer = contents + target;
+		veneer_r = veneer
+		  + stm32l4xx_errnode->u.b.veneer->vma
+		  - stm32l4xx_errnode->vma - 4;
+
+		if ((signed) (veneer_r - veneer -
+			      STM32L4XX_ERRATUM_VLDM_VENEER_SIZE >
+			      STM32L4XX_ERRATUM_LDM_VENEER_SIZE ?
+			      STM32L4XX_ERRATUM_VLDM_VENEER_SIZE :
+			      STM32L4XX_ERRATUM_LDM_VENEER_SIZE) < -(1 << 24)
+		    || (signed) (veneer_r - veneer) >= (1 << 24))
+		  {
+		    _bfd_error_handler (_("%B: error: Cannot create STM32L4XX "
+					  "veneer."), output_bfd);
+		     continue;
+		  }
+
+		/* Original instruction.  */
+		insn = stm32l4xx_errnode->u.v.branch->u.b.insn;
+
+		stm32l4xx_create_replacing_stub
+		  (globals, output_bfd, insn, (void*)veneer_r, (void*)veneer);
+	      }
+	      break;
+
+	    default:
+	      abort ();
+	    }
+	}
+    }
+
   if (arm_data->elf.this_hdr.sh_type == SHT_ARM_EXIDX)
     {
       arm_unwind_table_edit *edit_node
@@ -15684,6 +18668,14 @@ elf32_arm_write_section (bfd *output_bfd
 			   usual BFD method.  */
 			prel31_offset = (text_offset - exidx_offset)
 					& 0x7ffffffful;
+			if (bfd_link_relocatable (link_info))
+			  {
+			    /* Here relocation for new EXIDX_CANTUNWIND is
+			       created, so there is no need to
+			       adjust offset by hand.  */
+			    prel31_offset = text_sec->output_offset
+					    + text_sec->size;
+			  }
 
 			/* First address we can't unwind.  */
 			bfd_put_32 (output_bfd, prel31_offset,
@@ -15728,8 +18720,8 @@ elf32_arm_write_section (bfd *output_bfd
       data.writing_section = sec;
       data.contents = contents;
 
-      bfd_hash_traverse (&globals->stub_hash_table, make_branch_to_a8_stub,
-			 &data);
+      bfd_hash_traverse (& globals->stub_hash_table, make_branch_to_a8_stub,
+			 & data);
     }
 
   if (mapcount == 0)
@@ -15798,8 +18790,12 @@ elf32_arm_swap_symbol_in (bfd * abfd,
 			  const void *pshn,
 			  Elf_Internal_Sym *dst)
 {
+  Elf_Internal_Shdr *symtab_hdr;
+  const char *name = NULL;
+
   if (!bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst))
     return FALSE;
+  dst->st_target_internal = 0;
 
   /* New EABI objects mark thumb function symbols by setting the low bit of
      the address.  */
@@ -15809,20 +18805,28 @@ elf32_arm_swap_symbol_in (bfd * abfd,
       if (dst->st_value & 1)
 	{
 	  dst->st_value &= ~(bfd_vma) 1;
-	  dst->st_target_internal = ST_BRANCH_TO_THUMB;
+	  ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal,
+				   ST_BRANCH_TO_THUMB);
 	}
       else
-	dst->st_target_internal = ST_BRANCH_TO_ARM;
+	ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_TO_ARM);
     }
   else if (ELF_ST_TYPE (dst->st_info) == STT_ARM_TFUNC)
     {
       dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_FUNC);
-      dst->st_target_internal = ST_BRANCH_TO_THUMB;
+      ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_TO_THUMB);
     }
   else if (ELF_ST_TYPE (dst->st_info) == STT_SECTION)
-    dst->st_target_internal = ST_BRANCH_LONG;
+    ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_LONG);
   else
-    dst->st_target_internal = ST_BRANCH_UNKNOWN;
+    ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_UNKNOWN);
+
+  /* Mark CMSE special symbols.  */
+  symtab_hdr = & elf_symtab_hdr (abfd);
+  if (symtab_hdr->sh_size)
+    name = bfd_elf_sym_name (abfd, symtab_hdr, dst, NULL);
+  if (name && CONST_STRNEQ (name, CMSE_PREFIX))
+    ARM_SET_SYM_CMSE_SPCL (dst->st_target_internal);
 
   return TRUE;
 }
@@ -15842,7 +18846,7 @@ elf32_arm_swap_symbol_out (bfd *abfd,
      of the address set, as per the new EABI.  We do this unconditionally
      because objcopy does not set the elf header flags until after
      it writes out the symbol table.  */
-  if (src->st_target_internal == ST_BRANCH_TO_THUMB)
+  if (ARM_GET_SYM_BRANCH_TYPE (src->st_target_internal) == ST_BRANCH_TO_THUMB)
     {
       newsym = *src;
       if (ELF_ST_TYPE (src->st_info) != STT_GNU_IFUNC)
@@ -15924,11 +18928,10 @@ elf32_arm_add_symbol_hook (bfd *abfd, st
 			   Elf_Internal_Sym *sym, const char **namep,
 			   flagword *flagsp, asection **secp, bfd_vma *valp)
 {
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   if (elf32_arm_hash_table (info) == NULL)
     return FALSE;
@@ -16171,6 +19174,163 @@ elf32_arm_get_synthetic_symtab (bfd *abf
   return n;
 }
 
+static bfd_boolean
+elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr * hdr)
+{
+  if (hdr->sh_flags & SHF_ARM_PURECODE)
+    *flags |= SEC_ELF_PURECODE;
+  return TRUE;
+}
+
+static flagword
+elf32_arm_lookup_section_flags (char *flag_name)
+{
+  if (!strcmp (flag_name, "SHF_ARM_PURECODE"))
+    return SHF_ARM_PURECODE;
+
+  return SEC_NO_FLAGS;
+}
+
+static unsigned int
+elf32_arm_count_additional_relocs (asection *sec)
+{
+  struct _arm_elf_section_data *arm_data;
+  arm_data = get_arm_elf_section_data (sec);
+
+  return arm_data == NULL ? 0 : arm_data->additional_reloc_count;
+}
+
+/* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
+   has a type >= SHT_LOOS.  Returns TRUE if these fields were initialised
+   FALSE otherwise.  ISECTION is the best guess matching section from the
+   input bfd IBFD, but it might be NULL.  */
+
+static bfd_boolean
+elf32_arm_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED,
+				       bfd *obfd ATTRIBUTE_UNUSED,
+				       const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED,
+				       Elf_Internal_Shdr *osection)
+{
+  switch (osection->sh_type)
+    {
+    case SHT_ARM_EXIDX:
+      {
+	Elf_Internal_Shdr **oheaders = elf_elfsections (obfd);
+	Elf_Internal_Shdr **iheaders = elf_elfsections (ibfd);
+	unsigned i = 0;
+
+	osection->sh_flags = SHF_ALLOC | SHF_LINK_ORDER;
+	osection->sh_info = 0;
+
+	/* The sh_link field must be set to the text section associated with
+	   this index section.  Unfortunately the ARM EHABI does not specify
+	   exactly how to determine this association.  Our caller does try
+	   to match up OSECTION with its corresponding input section however
+	   so that is a good first guess.  */
+	if (isection != NULL
+	    && osection->bfd_section != NULL
+	    && isection->bfd_section != NULL
+	    && isection->bfd_section->output_section != NULL
+	    && isection->bfd_section->output_section == osection->bfd_section
+	    && iheaders != NULL
+	    && isection->sh_link > 0
+	    && isection->sh_link < elf_numsections (ibfd)
+	    && iheaders[isection->sh_link]->bfd_section != NULL
+	    && iheaders[isection->sh_link]->bfd_section->output_section != NULL
+	    )
+	  {
+	    for (i = elf_numsections (obfd); i-- > 0;)
+	      if (oheaders[i]->bfd_section
+		  == iheaders[isection->sh_link]->bfd_section->output_section)
+		break;
+	  }
+
+	if (i == 0)
+	  {
+	    /* Failing that we have to find a matching section ourselves.  If
+	       we had the output section name available we could compare that
+	       with input section names.  Unfortunately we don't.  So instead
+	       we use a simple heuristic and look for the nearest executable
+	       section before this one.  */
+	    for (i = elf_numsections (obfd); i-- > 0;)
+	      if (oheaders[i] == osection)
+		break;
+	    if (i == 0)
+	      break;
+
+	    while (i-- > 0)
+	      if (oheaders[i]->sh_type == SHT_PROGBITS
+		  && (oheaders[i]->sh_flags & (SHF_ALLOC | SHF_EXECINSTR))
+		  == (SHF_ALLOC | SHF_EXECINSTR))
+		break;
+	  }
+
+	if (i)
+	  {
+	    osection->sh_link = i;
+	    /* If the text section was part of a group
+	       then the index section should be too.  */
+	    if (oheaders[i]->sh_flags & SHF_GROUP)
+	      osection->sh_flags |= SHF_GROUP;
+	    return TRUE;
+	  }
+      }
+      break;
+
+    case SHT_ARM_PREEMPTMAP:
+      osection->sh_flags = SHF_ALLOC;
+      break;
+
+    case SHT_ARM_ATTRIBUTES:
+    case SHT_ARM_DEBUGOVERLAY:
+    case SHT_ARM_OVERLAYSECTION:
+    default:
+      break;
+    }
+
+  return FALSE;
+}
+
+/* Returns TRUE if NAME is an ARM mapping symbol.
+   Traditionally the symbols $a, $d and $t have been used.
+   The ARM ELF standard also defines $x (for A64 code).  It also allows a
+   period initiated suffix to be added to the symbol: "$[adtx]\.[:sym_char]+".
+   Other tools might also produce $b (Thumb BL), $f, $p, $m and $v, but we do
+   not support them here.  $t.x indicates the start of ThumbEE instructions.  */
+
+static bfd_boolean
+is_arm_mapping_symbol (const char * name)
+{
+  return name != NULL /* Paranoia.  */
+    && name[0] == '$' /* Note: if objcopy --prefix-symbols has been used then
+			 the mapping symbols could have acquired a prefix.
+			 We do not support this here, since such symbols no
+			 longer conform to the ARM ELF ABI.  */
+    && (name[1] == 'a' || name[1] == 'd' || name[1] == 't' || name[1] == 'x')
+    && (name[2] == 0 || name[2] == '.');
+  /* FIXME: Strictly speaking the symbol is only a valid mapping symbol if
+     any characters that follow the period are legal characters for the body
+     of a symbol's name.  For now we just assume that this is the case.  */
+}
+
+/* Make sure that mapping symbols in object files are not removed via the
+   "strip --strip-unneeded" tool.  These symbols are needed in order to
+   correctly generate interworking veneers, and for byte swapping code
+   regions.  Once an object file has been linked, it is safe to remove the
+   symbols as they will no longer be needed.  */
+
+static void
+elf32_arm_backend_symbol_processing (bfd *abfd, asymbol *sym)
+{
+  if (((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+      && sym->section != bfd_abs_section_ptr
+      && is_arm_mapping_symbol (sym->name))
+    sym->flags |= BSF_KEEP;
+}
+
+#undef  elf_backend_copy_special_section_fields
+#define elf_backend_copy_special_section_fields elf32_arm_copy_special_section_fields
+
 #define ELF_ARCH			bfd_arch_arm
 #define ELF_TARGET_ID			ARM_ELF_DATA
 #define ELF_MACHINE_CODE		EM_ARM
@@ -16203,6 +19363,7 @@ elf32_arm_get_synthetic_symtab (bfd *abf
 #define elf_backend_gc_mark_extra_sections	elf32_arm_gc_mark_extra_sections
 #define elf_backend_gc_sweep_hook               elf32_arm_gc_sweep_hook
 #define elf_backend_check_relocs                elf32_arm_check_relocs
+#define elf_backend_update_relocs		elf32_arm_update_relocs
 #define elf_backend_relocate_section		elf32_arm_relocate_section
 #define elf_backend_write_section		elf32_arm_write_section
 #define elf_backend_adjust_dynamic_symbol	elf32_arm_adjust_dynamic_symbol
@@ -16223,19 +19384,25 @@ elf32_arm_get_synthetic_symtab (bfd *abf
 #define elf_backend_modify_segment_map		elf32_arm_modify_segment_map
 #define elf_backend_additional_program_headers  elf32_arm_additional_program_headers
 #define elf_backend_output_arch_local_syms      elf32_arm_output_arch_local_syms
+#define elf_backend_filter_implib_symbols	elf32_arm_filter_implib_symbols
 #define elf_backend_begin_write_processing      elf32_arm_begin_write_processing
 #define elf_backend_add_symbol_hook		elf32_arm_add_symbol_hook
+#define elf_backend_count_additional_relocs	elf32_arm_count_additional_relocs
+#define elf_backend_symbol_processing		elf32_arm_backend_symbol_processing
 
 #define elf_backend_can_refcount       1
 #define elf_backend_can_gc_sections    1
 #define elf_backend_plt_readonly       1
 #define elf_backend_want_got_plt       1
 #define elf_backend_want_plt_sym       0
+#define elf_backend_want_dynrelro      1
 #define elf_backend_may_use_rel_p      1
 #define elf_backend_may_use_rela_p     0
 #define elf_backend_default_use_rela_p 0
+#define elf_backend_dtrel_excludes_plt 1
 
 #define elf_backend_got_header_size	12
+#define elf_backend_extern_protected_data 1
 
 #undef  elf_backend_obj_attrs_vendor
 #define elf_backend_obj_attrs_vendor		"aeabi"
@@ -16248,6 +19415,11 @@ elf32_arm_get_synthetic_symtab (bfd *abf
 #define elf_backend_obj_attrs_order		elf32_arm_obj_attrs_order
 #define elf_backend_obj_attrs_handle_unknown 	elf32_arm_obj_attrs_handle_unknown
 
+#undef  elf_backend_section_flags
+#define elf_backend_section_flags		elf32_arm_section_flags
+#undef  elf_backend_lookup_section_flags_hook
+#define elf_backend_lookup_section_flags_hook   elf32_arm_lookup_section_flags
+
 #include "elf32-target.h"
 
 /* Native Client targets.  */
@@ -16326,6 +19498,7 @@ elf32_arm_nacl_plt_sym_val (bfd_vma i, c
 #undef bfd_elf32_get_synthetic_symtab
 #undef  elf_backend_plt_sym_val
 #define elf_backend_plt_sym_val			elf32_arm_nacl_plt_sym_val
+#undef  elf_backend_copy_special_section_fields
 
 #undef	ELF_MINPAGESIZE
 #undef	ELF_COMMONPAGESIZE
@@ -16411,21 +19584,22 @@ elf32_arm_vxworks_final_write_processing
    object file when linking.  */
 
 static bfd_boolean
-elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   bfd_boolean flags_compatible = TRUE;
   asection *sec;
 
   /* Check if we have the same endianness.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd))
     return TRUE;
 
-  if (!elf32_arm_merge_eabi_attributes (ibfd, obfd))
+  if (!elf32_arm_merge_eabi_attributes (ibfd, info))
     return FALSE;
 
   /* The input BFD must have had its flags initialised.  */
@@ -16745,7 +19919,6 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i
   return plt->vma + 4 * ARRAY_SIZE (elf32_arm_symbian_plt_entry) * i;
 }
 
-
 #undef  elf32_bed
 #define elf32_bed elf32_arm_symbian_bed
 
@@ -16788,6 +19961,8 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i
 #define elf_backend_default_use_rela_p	0
 #undef  elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	0
+#undef  elf_backend_dtrel_excludes_plt
+#define elf_backend_dtrel_excludes_plt	0
 #undef  ELF_MAXPAGESIZE
 #define ELF_MAXPAGESIZE			0x8000
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-avr.c ./bfd/elf32-avr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-avr.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-avr.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* AVR-specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -89,7 +89,7 @@ struct elf32_avr_link_hash_table
 
   /* Assorted information used by elf32_avr_size_stubs.  */
   unsigned int        bfd_count;
-  int                 top_index;
+  unsigned int        top_index;
   asection **         input_list;
   Elf_Internal_Sym ** all_local_syms;
 
@@ -641,7 +641,22 @@ static reloc_howto_type elf_avr_howto_ta
 	 FALSE,			/* partial_inplace */
 	 0xffffff,		/* src_mask */
 	 0xffffff,		/* dst_mask */
-	 FALSE) 		/* pcrel_offset */
+	 FALSE), 		/* pcrel_offset */
+
+  /* A 32 bit PC relative relocation.  */
+  HOWTO (R_AVR_32_PCREL,	/* type */
+	 0,				/* rightshift */
+	 2,				/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_generic_reloc, /* special_function */
+	 "R_AVR_32_PCREL",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffffffff,	/* src_mask */
+	 0xffffffff,	/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 /* Map BFD reloc types to AVR ELF reloc types.  */
@@ -689,7 +704,8 @@ static const struct avr_reloc_map avr_re
   { BFD_RELOC_AVR_DIFF32,           R_AVR_DIFF32 },
   { BFD_RELOC_AVR_LDS_STS_16,       R_AVR_LDS_STS_16},
   { BFD_RELOC_AVR_PORT6,            R_AVR_PORT6},
-  { BFD_RELOC_AVR_PORT5,            R_AVR_PORT5}
+  { BFD_RELOC_AVR_PORT5,            R_AVR_PORT5},
+  { BFD_RELOC_32_PCREL,             R_AVR_32_PCREL}
 };
 
 /* Meant to be filled one day with the wrap around address for the
@@ -939,6 +955,7 @@ avr_info_to_howto_rela (bfd *abfd ATTRIB
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_AVR_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid AVR reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1458,7 +1475,7 @@ elf32_avr_relocate_section (bfd *output_
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = avr_final_link_relocate (howto, input_bfd, input_section,
@@ -1471,14 +1488,13 @@ elf32_avr_relocate_section (bfd *output_
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
-		(info, (h ? &h->root : NULL),
-		 name, howto->name, (bfd_vma) 0,
-		 input_bfd, input_section, rel->r_offset);
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -1500,11 +1516,8 @@ elf32_avr_relocate_section (bfd *output_
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -1729,22 +1742,22 @@ elf32_avr_adjust_diff_reloc_value (bfd *
   reloc_contents = isec_contents + irel->r_offset;
 
   /* Read value written in object file. */
- bfd_vma x = 0;
+  bfd_signed_vma x = 0;
   switch (ELF32_R_TYPE (irel->r_info))
   {
   case R_AVR_DIFF8:
     {
-      x = *reloc_contents;
+      x = bfd_get_signed_8 (abfd, reloc_contents);
       break;
     }
   case R_AVR_DIFF16:
     {
-      x = bfd_get_16 (abfd, reloc_contents);
+      x = bfd_get_signed_16 (abfd, reloc_contents);
       break;
     }
   case R_AVR_DIFF32:
     {
-      x = bfd_get_32 (abfd, reloc_contents);
+      x = bfd_get_signed_32 (abfd, reloc_contents);
       break;
     }
   default:
@@ -1758,30 +1771,41 @@ elf32_avr_adjust_diff_reloc_value (bfd *
      symval (<start_of_section>) + reloc addend. Compute the start and end
      addresses and check if the shrinked insn falls between sym1 and sym2. */
 
-  bfd_vma end_address = symval + irel->r_addend;
-  bfd_vma start_address = end_address - x;
+  bfd_vma sym2_address = symval + irel->r_addend;
+  bfd_vma sym1_address = sym2_address - x;
+
+  /* Don't assume sym2 is bigger than sym1 - the difference
+     could be negative. Compute start and end addresses, and
+     use those to see if they span shrinked_insn_address. */
+
+  bfd_vma start_address = sym1_address < sym2_address
+    ? sym1_address : sym2_address;
+  bfd_vma end_address = sym1_address > sym2_address
+    ? sym1_address : sym2_address;
 
-  /* Reduce the diff value by count bytes and write it back into section
-    contents. */
 
   if (shrinked_insn_address >= start_address
       && shrinked_insn_address <= end_address)
   {
+    /* Reduce the diff value by count bytes and write it back into section
+       contents. */
+    bfd_signed_vma new_diff = x < 0 ? x + count : x - count;
+
     switch (ELF32_R_TYPE (irel->r_info))
     {
     case R_AVR_DIFF8:
       {
-        *reloc_contents = (x - count);
+        bfd_put_signed_8 (abfd, new_diff, reloc_contents);
         break;
       }
     case R_AVR_DIFF16:
       {
-        bfd_put_16 (abfd, (x - count) & 0xFFFF, reloc_contents);
+        bfd_put_signed_16 (abfd, new_diff & 0xFFFF, reloc_contents);
         break;
       }
     case R_AVR_DIFF32:
       {
-        bfd_put_32 (abfd, (x - count) & 0xFFFFFFFF, reloc_contents);
+        bfd_put_signed_32 (abfd, new_diff & 0xFFFFFFFF, reloc_contents);
         break;
       }
     default:
@@ -1793,16 +1817,57 @@ elf32_avr_adjust_diff_reloc_value (bfd *
   }
 }
 
+static void
+elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd,
+                                      asection *isec,
+                                      Elf_Internal_Rela *irel,  bfd_vma symval,
+                                      bfd_vma shrinked_insn_address,
+                                      bfd_vma shrink_boundary,
+                                      int count)
+{
+
+  if (elf32_avr_is_diff_reloc (irel))
+    {
+      elf32_avr_adjust_diff_reloc_value (abfd, isec, irel,
+                                         symval,
+                                         shrinked_insn_address,
+                                         count);
+    }
+  else
+    {
+      bfd_vma reloc_value = symval + irel->r_addend;
+      bfd_boolean addend_within_shrink_boundary =
+        (reloc_value <= shrink_boundary);
+
+      bfd_boolean reloc_spans_insn =
+        (symval <= shrinked_insn_address
+         && reloc_value > shrinked_insn_address
+         && addend_within_shrink_boundary);
+
+      if (! reloc_spans_insn)
+        return;
+
+      irel->r_addend -= count;
+
+      if (debug_relax)
+        printf ("Relocation's addend needed to be fixed \n");
+    }
+}
+
 /* Delete some bytes from a section while changing the size of an instruction.
    The parameter "addr" denotes the section-relative offset pointing just
    behind the shrinked instruction. "addr+count" point at the first
-   byte just behind the original unshrinked instruction.  */
+   byte just behind the original unshrinked instruction. If delete_shrinks_insn
+   is FALSE, we are deleting redundant padding bytes from relax_info prop
+   record handling. In that case, addr is section-relative offset of start
+   of padding, and count is the number of padding bytes to delete. */
 
 static bfd_boolean
 elf32_avr_relax_delete_bytes (bfd *abfd,
                               asection *sec,
                               bfd_vma addr,
-                              int count)
+                              int count,
+                              bfd_boolean delete_shrinks_insn)
 {
   Elf_Internal_Shdr *symtab_hdr;
   unsigned int sec_shndx;
@@ -1810,12 +1875,13 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Sym *isym;
   Elf_Internal_Sym *isymbuf = NULL;
-  bfd_vma toaddr;
+  bfd_vma toaddr, reloc_toaddr;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
   struct avr_relax_info *relax_info;
   struct avr_property_record *prop_record = NULL;
+  bfd_boolean did_shrink = FALSE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
@@ -1846,15 +1912,32 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
         }
     }
 
+  /* We need to look at all relocs with offsets less than toaddr. prop
+     records handling adjusts toaddr downwards to avoid moving syms at the
+     address of the property record, but all relocs with offsets between addr
+     and the current value of toaddr need to have their offsets adjusted.
+     Assume addr = 0, toaddr = 4 and count = 2. After prop records handling,
+     toaddr becomes 2, but relocs with offsets 2 and 3 still need to be
+     adjusted (to 0 and 1 respectively), as the first 2 bytes are now gone.
+     So record the current value of toaddr here, and use it when adjusting
+     reloc offsets. */
+  reloc_toaddr = toaddr;
+
   irel = elf_section_data (sec)->relocs;
   irelend = irel + sec->reloc_count;
 
   /* Actually delete the bytes.  */
   if (toaddr - addr - count > 0)
-    memmove (contents + addr, contents + addr + count,
-             (size_t) (toaddr - addr - count));
+    {
+      memmove (contents + addr, contents + addr + count,
+               (size_t) (toaddr - addr - count));
+      did_shrink = TRUE;
+    }
   if (prop_record == NULL)
-    sec->size -= count;
+    {
+      sec->size -= count;
+      did_shrink = TRUE;
+    }
   else
     {
       /* Use the property record to fill in the bytes we've opened up.  */
@@ -1873,6 +1956,11 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
           prop_record->data.align.preceding_deleted += count;
           break;
         };
+      /* If toaddr == (addr + count), then we didn't delete anything, yet
+         we fill count bytes backwards from toaddr. This is still ok - we
+         end up overwriting the bytes we would have deleted. We just need
+         to remember we didn't delete anything i.e. don't set did_shrink,
+         so that we don't corrupt reloc offsets or symbol values.*/
       memset (contents + toaddr - count, fill, count);
 
       /* Adjust the TOADDR to avoid moving symbols located at the address
@@ -1880,6 +1968,9 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
       toaddr -= count;
     }
 
+  if (!did_shrink)
+    return TRUE;
+
   /* Adjust all the reloc addresses.  */
   for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
     {
@@ -1890,7 +1981,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
 
       /* Get the new reloc address.  */
       if ((irel->r_offset > addr
-           && irel->r_offset < toaddr))
+           && irel->r_offset < reloc_toaddr))
         {
           if (debug_relax)
             printf ("Relocation at address 0x%x needs to be moved.\n"
@@ -1927,7 +2018,9 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
 	 continue;
 
        shrinked_insn_address = (sec->output_section->vma
-                                + sec->output_offset + addr - count);
+                                + sec->output_offset + addr);
+       if (delete_shrinks_insn)
+         shrinked_insn_address -= count;
 
        irel = elf_section_data (isec)->relocs;
        /* PR 12161: Read in the relocs for this section if necessary.  */
@@ -1964,6 +2057,12 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
                   a symbol or section associated with it.  */
                if (sym_sec == sec)
                  {
+                   /* If there is an alignment boundary, we only need to
+                      adjust addends that end up below the boundary. */
+                   bfd_vma shrink_boundary = (reloc_toaddr
+                                              + sec->output_section->vma
+                                              + sec->output_offset);
+
                    symval += sym_sec->output_section->vma
                              + sym_sec->output_offset;
 
@@ -1977,22 +2076,11 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
                              (unsigned int) (symval + irel->r_addend),
                              (unsigned int) shrinked_insn_address);
 
-                   if (symval <= shrinked_insn_address
-                       && (symval + irel->r_addend) > shrinked_insn_address)
-                     {
-                       if (elf32_avr_is_diff_reloc (irel))
-                         {
-                           elf32_avr_adjust_diff_reloc_value (abfd, isec, irel,
+                   elf32_avr_adjust_reloc_if_spans_insn (abfd, isec, irel,
                                                          symval,
                                                          shrinked_insn_address,
-                                                        count);
-                         }
-
-                       irel->r_addend -= count;
-
-                       if (debug_relax)
-                         printf ("Relocation's addend needed to be fixed \n");
-                     }
+                                                         shrink_boundary,
+                                                         count);
                  }
 	       /* else...Reference symbol is absolute.  No adjustment needed.  */
 	     }
@@ -2359,7 +2447,7 @@ elf32_avr_relax_section (bfd *abfd,
       || !strcmp (sec->name,".jumptables"))
     shrinkable = FALSE;
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -2397,7 +2485,7 @@ elf32_avr_relax_section (bfd *abfd,
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -2610,7 +2698,8 @@ elf32_avr_relax_section (bfd *abfd,
                   {
                     /* Delete two bytes of data.  */
                     if (!elf32_avr_relax_delete_bytes (abfd, sec,
-                                                       irel->r_offset + 2, 2))
+                                                       irel->r_offset + 2, 2,
+                                                       TRUE))
                       goto error_return;
 
                     /* That will change things, so, we should relax again.
@@ -2619,6 +2708,7 @@ elf32_avr_relax_section (bfd *abfd,
                   }
               }
           }
+	  /* Fall through.  */
 
         default:
           {
@@ -2934,7 +3024,8 @@ elf32_avr_relax_section (bfd *abfd,
 
 			    /* Delete two bytes of data.  */
 			    if (!elf32_avr_relax_delete_bytes (abfd, sec,
-							       irel->r_offset + insn_size, 2))
+							       irel->r_offset + insn_size, 2,
+							       TRUE))
 			      goto error_return;
 
 			    /* That will change things, so, we should relax
@@ -3002,7 +3093,7 @@ elf32_avr_relax_section (bfd *abfd,
                         record->offset -= count;
                         elf32_avr_relax_delete_bytes (abfd, sec,
                                                       addr - count,
-                                                      count);
+                                                      count, FALSE);
                         *again = TRUE;
                       }
                   }
@@ -3192,8 +3283,9 @@ avr_add_stub (const char *stub_name,
 
   if (hsh == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-                             NULL, stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+			  NULL, stub_name);
       return NULL;
     }
 
@@ -3349,7 +3441,7 @@ elf32_avr_setup_section_lists (bfd *outp
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -3625,7 +3717,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
                         }
                       else if (hh->root.type == bfd_link_hash_undefweak)
                         {
-                          if (! info->shared)
+                          if (! bfd_link_pic (info))
                             continue;
                         }
                       else if (hh->root.type == bfd_link_hash_undefined)
@@ -4052,11 +4144,13 @@ avr_elf32_load_records_from_section (bfd
     }
 
   free (contents);
-  free (internal_relocs);
+  if (elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   return r_list;
 
  load_failed:
-  free (internal_relocs);
+  if (elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   free (contents);
   free (r_list);
   return NULL;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-avr.h ./bfd/elf32-avr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-avr.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-avr.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* AVR-specific support for 32-bit ELF.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Written by Bjoern Haase <bjoern.m.haase@web.de>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-bfin.c ./bfd/elf32-bfin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-bfin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-bfin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ADI Blackfin BFD support for 32-bit ELF.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -103,7 +103,7 @@ bfin_pcrel24_reloc (bfd *abfd,
   /* if rightshift is 1 and the number odd, return error.  */
   if (howto->rightshift && (relocation & 0x01))
     {
-      (*_bfd_error_handler) (_("relocation should be even number"));
+      _bfd_error_handler (_("relocation should be even number"));
       return bfd_reloc_overflow;
     }
 
@@ -359,7 +359,7 @@ bfin_bfd_reloc (bfd *abfd,
   /* If rightshift is 1 and the number odd, return error.  */
   if (howto->rightshift && (relocation & 0x01))
     {
-      (*_bfd_error_handler) (_("relocation should be even number"));
+      _bfd_error_handler (_("relocation should be even number"));
       return bfd_reloc_overflow;
     }
 
@@ -1165,7 +1165,7 @@ bfin_check_relocs (bfd * abfd,
   asection *sgot;
   asection *srelgot;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -1226,28 +1226,9 @@ bfin_check_relocs (bfd * abfd,
 		return FALSE;
 	    }
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
-
-	  if (srelgot == NULL && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || !bfd_set_section_alignment (dynobj, srelgot, 2))
-		    return FALSE;
-		}
-	    }
+	  sgot = elf_hash_table (info)->sgot;
+	  srelgot = elf_hash_table (info)->srelgot;
+	  BFD_ASSERT (sgot != NULL);
 
 	  if (h != NULL)
 	    {
@@ -1285,7 +1266,7 @@ bfin_check_relocs (bfd * abfd,
 	      if (local_got_refcounts[r_symndx] == 0)
 		{
 		  sgot->size += 4;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      /* If we are generating a shared object, we need to
 		         output a R_68K_RELATIVE reloc so that the dynamic
@@ -1455,7 +1436,7 @@ bfin_relocate_section (bfd * output_bfd,
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       address = rel->r_offset;
@@ -1480,20 +1461,17 @@ bfin_relocate_section (bfd * output_bfd,
 	  {
 	    bfd_vma off;
 
-	  if (dynobj == NULL)
-	    {
-	      /* Create the .got section.  */
-	      elf_hash_table (info)->dynobj = dynobj = output_bfd;
-	      if (!_bfd_elf_create_got_section (dynobj, info))
-		return FALSE;
-	    }
-
-	    if (sgot == NULL)
+	    if (dynobj == NULL)
 	      {
-		sgot = bfd_get_linker_section (dynobj, ".got");
-		BFD_ASSERT (sgot != NULL);
+		/* Create the .got section.  */
+		elf_hash_table (info)->dynobj = dynobj = output_bfd;
+		if (!_bfd_elf_create_got_section (dynobj, info))
+		  return FALSE;
 	      }
 
+	    sgot = elf_hash_table (info)->sgot;
+	    BFD_ASSERT (sgot != NULL);
+
 	    if (h != NULL)
 	      {
 		bfd_boolean dyn;
@@ -1502,8 +1480,10 @@ bfin_relocate_section (bfd * output_bfd,
 		BFD_ASSERT (off != (bfd_vma) - 1);
 		dyn = elf_hash_table (info)->dynamic_sections_created;
 
-		if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		    || (info->shared
+		if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						      bfd_link_pic (info),
+						      h)
+		    || (bfd_link_pic (info)
 			&& (info->symbolic
 			    || h->dynindx == -1
 			    || h->forced_local)
@@ -1548,13 +1528,13 @@ bfin_relocate_section (bfd * output_bfd,
 		  {
 		    bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-		    if (info->shared)
+		    if (bfd_link_pic (info))
 		      {
 			asection *s;
 			Elf_Internal_Rela outrel;
 			bfd_byte *loc;
 
-			s = bfd_get_linker_section (dynobj, ".rela.got");
+			s = elf_hash_table (info)->srelgot;
 			BFD_ASSERT (s != NULL);
 
 			outrel.r_offset = (sgot->output_section->vma
@@ -1596,7 +1576,8 @@ bfin_relocate_section (bfd * output_bfd,
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section, (long) rel->r_offset, h->root.root.string);
@@ -1621,15 +1602,13 @@ bfin_relocate_section (bfd * output_bfd,
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-	      if (!(info->callbacks->reloc_overflow
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
@@ -1683,8 +1662,8 @@ bfin_gc_sweep_hook (bfd * abfd,
   sym_hashes = elf_sym_hashes (abfd);
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
-  sgot = bfd_get_linker_section (dynobj, ".got");
-  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+  sgot = elf_hash_table (info)->sgot;
+  srelgot = elf_hash_table (info)->srelgot;
 
   relend = relocs + sec->reloc_count;
   for (rel = relocs; rel < relend; rel++)
@@ -1719,7 +1698,7 @@ bfin_gc_sweep_hook (bfd * abfd,
 		    {
 		      /* We don't need the .got entry any more.  */
 		      sgot->size -= 4;
-		      if (info->shared)
+		      if (bfd_link_pic (info))
 			srelgot->size -= sizeof (Elf32_External_Rela);
 		    }
 		}
@@ -1741,16 +1720,8 @@ struct bfinfdpic_elf_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* A pointer to the .got section.  */
-  asection *sgot;
-  /* A pointer to the .rel.got section.  */
-  asection *sgotrel;
   /* A pointer to the .rofixup section.  */
   asection *sgotfixup;
-  /* A pointer to the .plt section.  */
-  asection *splt;
-  /* A pointer to the .rel.plt section.  */
-  asection *spltrel;
   /* GOT base offset.  */
   bfd_vma got0;
   /* Location of the first non-lazy PLT entry, i.e., the number of
@@ -1771,15 +1742,15 @@ struct bfinfdpic_elf_link_hash_table
   == BFIN_ELF_DATA ? ((struct bfinfdpic_elf_link_hash_table *) ((info)->hash)) : NULL)
 
 #define bfinfdpic_got_section(info) \
-  (bfinfdpic_hash_table (info)->sgot)
+  (bfinfdpic_hash_table (info)->elf.sgot)
 #define bfinfdpic_gotrel_section(info) \
-  (bfinfdpic_hash_table (info)->sgotrel)
+  (bfinfdpic_hash_table (info)->elf.srelgot)
 #define bfinfdpic_gotfixup_section(info) \
   (bfinfdpic_hash_table (info)->sgotfixup)
 #define bfinfdpic_plt_section(info) \
-  (bfinfdpic_hash_table (info)->splt)
+  (bfinfdpic_hash_table (info)->elf.splt)
 #define bfinfdpic_pltrel_section(info) \
-  (bfinfdpic_hash_table (info)->spltrel)
+  (bfinfdpic_hash_table (info)->elf.srelplt)
 #define bfinfdpic_relocs_info(info) \
   (bfinfdpic_hash_table (info)->relocs_info)
 #define bfinfdpic_got_initial_offset(info) \
@@ -2213,7 +2184,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (
       /* If we're linking an executable at a fixed address, we can
 	 omit the dynamic relocation as long as the symbol is local to
 	 this module.  */
-      if (info->executable && !info->pie
+      if (bfd_link_pde (info)
 	  && (entry->symndx != -1
 	      || BFINFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
@@ -2268,7 +2239,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (
 	  if (entry->symndx == -1
 	      && ! BFINFDPIC_FUNCDESC_LOCAL (info, entry->d.h)
 	      && BFINFDPIC_SYM_LOCAL (info, entry->d.h)
-	      && !(info->executable && !info->pie))
+	      && !bfd_link_pde (info))
 	    {
 	      reloc = R_BFIN_FUNCDESC;
 	      idx = elf_section_data (entry->d.h->root.u.def.section
@@ -2304,7 +2275,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (
 	     dynamic symbol entry for the got section, so idx will be
 	     zero, which means we can and should compute the address
 	     of the private descriptor ourselves.  */
-	  if (info->executable && !info->pie
+	  if (bfd_link_pde (info)
 	      && (entry->symndx != -1
 		  || BFINFDPIC_FUNCDESC_LOCAL (info, entry->d.h)))
 	    {
@@ -2367,7 +2338,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (
       /* If we're linking an executable at a fixed address, we can
 	 omit the dynamic relocation as long as the symbol is local to
 	 this module.  */
-      if (info->executable && !info->pie
+      if (bfd_link_pde (info)
 	  && (entry->symndx != -1 || BFINFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
 	  if (sec)
@@ -2415,7 +2386,9 @@ _bfinfdpic_emit_got_relocs_plt_entries (
 
       /* If we've omitted the dynamic relocation, just emit the fixed
 	 addresses of the symbol and of the local GOT base offset.  */
-      if (info->executable && !info->pie && sec && sec->output_section)
+      if (bfd_link_pde (info)
+	  && sec
+	  && sec->output_section)
 	{
 	  lowword = ad;
 	  highword = bfinfdpic_got_section (info)->output_section->vma
@@ -2595,7 +2568,7 @@ bfinfdpic_relocate_section (bfd * output
   Elf_Internal_Rela *relend;
   unsigned isec_segment, got_segment, plt_segment,
     check_segment[2];
-  int silence_segment_error = !(info->shared || info->pie);
+  int silence_segment_error = !bfd_link_pic (info);
 
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -2675,7 +2648,7 @@ bfinfdpic_relocate_section (bfd * output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL
@@ -2694,6 +2667,7 @@ bfinfdpic_relocate_section (bfd * output
 	case R_BFIN_BYTE4_DATA:
 	  if (! IS_FDPIC (output_bfd))
 	    goto non_fdpic;
+	  /* Fall through.  */
 
 	case R_BFIN_GOT17M4:
 	case R_BFIN_GOTHI:
@@ -2727,7 +2701,8 @@ bfinfdpic_relocate_section (bfd * output
 						       osec, sym,
 						       rel->r_addend))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"),
 		 input_bfd, input_section, rel->r_offset, name);
 	      return FALSE;
@@ -2829,7 +2804,7 @@ bfinfdpic_relocate_section (bfd * output
 		   section+offset.  */
 		if (h && ! BFINFDPIC_FUNCDESC_LOCAL (info, h)
 		    && BFINFDPIC_SYM_LOCAL (info, h)
-		    && !(info->executable && !info->pie))
+		    && !bfd_link_pde (info))
 		  {
 		    dynindx = elf_section_data (h->root.u.def.section
 						->output_section)->dynindx;
@@ -2866,7 +2841,7 @@ bfinfdpic_relocate_section (bfd * output
 		   dynamic symbol entry for the got section, so idx will
 		   be zero, which means we can and should compute the
 		   address of the private descriptor ourselves.  */
-		if (info->executable && !info->pie
+		if (bfd_link_pde (info)
 		    && (!h || BFINFDPIC_FUNCDESC_LOCAL (info, h)))
 		  {
 		    bfd_vma offset;
@@ -2989,7 +2964,7 @@ bfinfdpic_relocate_section (bfd * output
 	       can omit the dynamic relocation as long as the symbol
 	       is defined in the current link unit (which is implied
 	       by its output section not being NULL).  */
-	    if (info->executable && !info->pie
+	    if (bfd_link_pde (info)
 		&& (!h || BFINFDPIC_SYM_LOCAL (info, h)))
 	      {
 		if (osec)
@@ -3069,7 +3044,7 @@ bfinfdpic_relocate_section (bfd * output
 		/* If we've omitted the dynamic relocation, just emit
 		   the fixed addresses of the symbol and of the local
 		   GOT base offset.  */
-		if (info->executable && !info->pie
+		if (bfd_link_pde (info)
 		    && (!h || BFINFDPIC_SYM_LOCAL (info, h)))
 		  bfd_put_32 (output_bfd,
 			      bfinfdpic_got_section (info)->output_section->vma
@@ -3127,11 +3102,11 @@ bfinfdpic_relocate_section (bfd * output
 		   && picrel->d.h->root.type == bfd_link_hash_undefined))
 	    info->callbacks->warning
 	      (info,
-	       (info->shared || info->pie)
+	       bfd_link_pic (info)
 	       ? _("relocations between different segments are not supported")
 	       : _("warning: relocation references a different segment"),
 	       name, input_bfd, input_section, rel->r_offset);
-	  if (!silence_segment_error && (info->shared || info->pie))
+	  if (!silence_segment_error && bfd_link_pic (info))
 	    return FALSE;
 	  elf_elfheader (output_bfd)->e_flags |= EF_BFIN_PIC;
 	}
@@ -3205,13 +3180,13 @@ bfinfdpic_relocate_section (bfd * output
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -3233,11 +3208,8 @@ bfinfdpic_relocate_section (bfd * output
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -3393,7 +3365,7 @@ _bfin_create_got_section (bfd *abfd, str
   int ptralign;
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
+  s = elf_hash_table (info)->sgot;
   if (s != NULL)
     return TRUE;
 
@@ -3408,18 +3380,11 @@ _bfin_create_got_section (bfd *abfd, str
   pltflags = flags;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
+  elf_hash_table (info)->sgot = s;
   if (s == NULL
       || !bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (bed->want_got_plt)
-    {
-      s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
-      if (s == NULL
-	  || !bfd_set_section_alignment (abfd, s, ptralign))
-	return FALSE;
-    }
-
   if (bed->want_got_sym)
     {
       /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
@@ -3444,7 +3409,6 @@ _bfin_create_got_section (bfd *abfd, str
      data for the got.  */
   if (IS_FDPIC (abfd))
     {
-      bfinfdpic_got_section (info) = s;
       bfinfdpic_relocs_info (info) = htab_try_create (1,
 						      bfinfdpic_relocs_info_hash,
 						      bfinfdpic_relocs_info_eq,
@@ -3497,7 +3461,7 @@ _bfin_create_got_section (bfd *abfd, str
       h->def_regular = 1;
       h->type = STT_OBJECT;
 
-      if (! info->executable
+      if (! bfd_link_executable (info)
 	  && ! bfd_elf_link_record_dynamic_symbol (info, h))
 	return FALSE;
     }
@@ -3566,7 +3530,7 @@ elf32_bfinfdpic_create_dynamic_sections 
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  ".rela.bss",
@@ -3649,7 +3613,7 @@ _bfinfdpic_count_relocs_fixups (struct b
 {
   bfd_vma relocs = 0, fixups = 0;
 
-  if (!dinfo->info->executable || dinfo->info->pie)
+  if (!bfd_link_pde (dinfo->info))
     relocs = entry->relocs32 + entry->relocsfd + entry->relocsfdv;
   else
     {
@@ -4251,7 +4215,7 @@ elf32_bfinfdpic_size_dynamic_sections (b
   if (htab->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -4318,7 +4282,7 @@ static bfd_boolean
 elf32_bfinfdpic_always_size_sections (bfd *output_bfd,
 				     struct bfd_link_info *info)
 {
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && !bfd_elf_stack_segment_size (output_bfd, info,
 				      "__stacksize", DEFAULT_STACK_SIZE))
     return FALSE;
@@ -4453,7 +4417,13 @@ elf32_bfinfdpic_finish_dynamic_sections 
   if (bfinfdpic_got_section (info))
     {
       BFD_ASSERT (bfinfdpic_gotrel_section (info)->size
-		  == (bfinfdpic_gotrel_section (info)->reloc_count
+		  /* PR 17334: It appears that the GOT section can end up
+		     being bigger than the number of relocs.  Presumably
+		     because some relocs have been deleted.  A test case has
+		     yet to be generated for verify this, but in the meantime
+		     the test below has been changed from == to >= so that
+		     applications can continue to be built.  */
+		  >= (bfinfdpic_gotrel_section (info)->reloc_count
 		      * sizeof (Elf32_External_Rel)));
 
       if (bfinfdpic_gotfixup_section (info))
@@ -4469,7 +4439,7 @@ elf32_bfinfdpic_finish_dynamic_sections 
 	  if (bfinfdpic_gotfixup_section (info)->size
 	      != (bfinfdpic_gotfixup_section (info)->reloc_count * 4))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		("LINKER BUG: .rofixup section size mismatch");
 	      return FALSE;
 	    }
@@ -4735,7 +4705,7 @@ bfinfdpic_check_relocs (bfd *abfd, struc
   bfd *dynobj;
   struct bfinfdpic_relocs_info *picrel;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -4902,7 +4872,8 @@ bfinfdpic_check_relocs (bfd *abfd, struc
 
 	default:
 	bad_reloc:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unsupported relocation type %i"),
 	     abfd, ELF32_R_TYPE (rel->r_info));
 	  return FALSE;
@@ -4962,8 +4933,9 @@ elf32_bfin_print_private_bfd_data (bfd *
    object file when linking.  */
 
 static bfd_boolean
-elf32_bfin_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, new_flags;
   bfd_boolean error = FALSE;
 
@@ -4976,9 +4948,10 @@ elf32_bfin_merge_private_bfd_data (bfd *
 #ifndef DEBUG
   if (0)
 #endif
-  (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
-			 old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
-			 bfd_get_filename (ibfd));
+  _bfd_error_handler
+    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+     old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
+     bfd_get_filename (ibfd));
 
   if (!elf_flags_init (obfd))			/* First call, no flags set.  */
     {
@@ -4990,11 +4963,11 @@ elf32_bfin_merge_private_bfd_data (bfd *
     {
       error = TRUE;
       if (IS_FDPIC (obfd))
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%s: cannot link non-fdpic object file into fdpic executable"),
 	   bfd_get_filename (ibfd));
       else
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%s: cannot link fdpic object file into non-fdpic executable"),
 	   bfd_get_filename (ibfd));
     }
@@ -5118,10 +5091,6 @@ bfin_finish_dynamic_symbol (bfd * output
 			    struct elf_link_hash_entry *h,
 			    Elf_Internal_Sym * sym)
 {
-  bfd *dynobj;
-
-  dynobj = elf_hash_table (info)->dynobj;
-
   if (h->got.offset != (bfd_vma) - 1)
     {
       asection *sgot;
@@ -5132,8 +5101,8 @@ bfin_finish_dynamic_symbol (bfd * output
       /* This symbol has an entry in the global offset table.
          Set it up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srela = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srela = elf_hash_table (info)->srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -5145,12 +5114,12 @@ bfin_finish_dynamic_symbol (bfd * output
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic
 	      || h->dynindx == -1 || h->forced_local) && h->def_regular)
 	{
-	  (*_bfd_error_handler) (_("*** check this relocation %s"),
-				 __FUNCTION__);
+	  _bfd_error_handler (_("*** check this relocation %s"),
+			      __FUNCTION__);
 	  rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24);
 	  rela.r_addend = bfd_get_signed_32 (output_bfd,
 					     (sgot->contents
@@ -5232,7 +5201,7 @@ bfin_adjust_dynamic_symbol (struct bfd_l
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* We must allocate the symbol in our .dynbss section, which will
@@ -5248,7 +5217,8 @@ bfin_adjust_dynamic_symbol (struct bfd_l
   s = bfd_get_linker_section (dynobj, ".dynbss");
   BFD_ASSERT (s != NULL);
 
-  /* We must generate a R_68K_COPY reloc to tell the dynamic linker to
+#if 0 /* Bfin does not currently have a COPY reloc.  */
+  /* We must generate a R_BFIN_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
@@ -5261,7 +5231,13 @@ bfin_adjust_dynamic_symbol (struct bfd_l
       srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
-
+#else
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+    {
+      _bfd_error_handler (_("the bfin target does not currently support the generation of copy relocations"));
+      return FALSE;
+    }
+#endif
   /* We need to figure out the alignment required for this symbol.  I
      have no idea how ELF linkers handle this.  */
   power_of_two = bfd_log2 (h->size);
@@ -5362,7 +5338,7 @@ bfin_size_dynamic_sections (bfd * output
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -5377,7 +5353,7 @@ bfin_size_dynamic_sections (bfd * output
          not actually use these entries.  Reset the size of .rela.got,
          which will cause it to get stripped from the output file
          below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
 	s->size = 0;
     }
@@ -5388,7 +5364,7 @@ bfin_size_dynamic_sections (bfd * output
      against symbols that have become local due to visibility changes.
      We allocated space for them in the check_relocs routine, but we
      will not fill them in in the relocate_section routine.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     elf_link_hash_traverse (elf_hash_table (info),
 			    bfin_discard_copies, info);
 
@@ -5467,7 +5443,7 @@ bfin_size_dynamic_sections (bfd * output
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -5515,7 +5491,7 @@ bfd_bfin_elf32_create_embedded_relocs (b
   bfd_byte *p;
   bfd_size_type amt;
 
-  BFD_ASSERT (! info->relocatable);
+  BFD_ASSERT (! bfd_link_relocatable (info));
 
   *errmsg = NULL;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32.c ./bfd/elf32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF 32-bit executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cr16.c ./bfd/elf32-cr16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cr16.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-cr16.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for National Semiconductor's CR16 ELF
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
    Written by M R Swami Reddy.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -582,10 +582,11 @@ _bfd_cr16_elf_create_got_section (bfd * 
   asection * s;
   struct elf_link_hash_entry * h;
   const struct elf_backend_data * bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
   int ptralign;
 
   /* This function may be called more than once.  */
-  if (bfd_get_linker_section (abfd, ".got") != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   switch (bed->s->arch_size)
@@ -607,6 +608,7 @@ _bfd_cr16_elf_create_got_section (bfd * 
            | SEC_LINKER_CREATED);
 
   s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
+  htab->sgot= s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
@@ -614,6 +616,7 @@ _bfd_cr16_elf_create_got_section (bfd * 
   if (bed->want_got_plt)
     {
       s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
+      htab->sgotplt = s;
       if (s == NULL
           || ! bfd_set_section_alignment (abfd, s, ptralign))
         return FALSE;
@@ -624,7 +627,7 @@ _bfd_cr16_elf_create_got_section (bfd * 
      because we don't want to define the symbol if we are not creating
      a global offset table.  */
   h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_");
-  elf_hash_table (info)->hgot = h;
+  htab->hgot = h;
   if (h == NULL)
     return FALSE;
 
@@ -647,7 +650,7 @@ elf_cr16_reloc_type_lookup (bfd *abfd AT
     if (code == cr16_reloc_map[i].bfd_reloc_enum)
       return &cr16_elf_howto_table[cr16_reloc_map[i].cr16_reloc_type];
 
-  _bfd_error_handler ("Unsupported CR16 relocation type: 0x%x\n", code);
+  _bfd_error_handler (_("Unsupported CR16 relocation type: 0x%x\n"), code);
   return NULL;
 }
 
@@ -675,8 +678,9 @@ elf_cr16_info_to_howto (bfd *abfd ATTRIB
 
   if (r_type >= R_CR16_MAX)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised CR16 reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised CR16 reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_CR16_NONE;
     }
@@ -705,7 +709,7 @@ cr16_elf_check_relocs (bfd *abfd, struct
   srelgot = NULL;
   bfd_boolean result = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -760,29 +764,9 @@ cr16_elf_check_relocs (bfd *abfd, struct
         case R_CR16_GOTC_REGREL20:
           /* This symbol requires a global offset table entry.  */
 
-          if (sgot == NULL)
-            {
-              sgot = bfd_get_linker_section (dynobj, ".got");
-              BFD_ASSERT (sgot != NULL);
-            }
-
-          if (srelgot == NULL
-              && (h != NULL || info->executable))
-            {
-              srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-              if (srelgot == NULL)
-                {
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-                  if (srelgot == NULL
-                      || ! bfd_set_section_alignment (dynobj, srelgot, 2))
-                    goto fail;
-                }
-            }
+	  sgot = elf_hash_table (info)->sgot;
+	  srelgot = elf_hash_table (info)->srelgot;
+	  BFD_ASSERT (sgot != NULL && srelgot != NULL);
 
           if (h != NULL)
             {
@@ -828,7 +812,7 @@ cr16_elf_check_relocs (bfd *abfd, struct
 
               local_got_offsets[r_symndx] = sgot->size;
 
-              if (info->executable)
+              if (bfd_link_executable (info))
                 /* If we are generating a shared object, we need to
                    output a R_CR16_RELATIVE reloc so that the dynamic
                    linker can adjust this GOT entry.  */
@@ -869,9 +853,6 @@ cr16_elf_final_link_relocate (reloc_howt
   unsigned short r_type = howto->type;
   bfd_byte *hit_data = contents + offset;
   bfd_vma reloc_bits, check, Rvalue1;
-  bfd *      dynobj;
-
-  dynobj = elf_hash_table (info)->dynobj;
 
   switch (r_type)
     {
@@ -1055,7 +1036,7 @@ cr16_elf_final_link_relocate (reloc_howt
           }
         else if (r_type == R_CR16_GOT_REGREL20)
           {
-            asection * sgot = bfd_get_linker_section (dynobj, ".got");
+            asection *sgot = elf_hash_table (info)->sgot;
 
             if (h != NULL)
               {
@@ -1103,8 +1084,7 @@ cr16_elf_final_link_relocate (reloc_howt
           }
         else if (r_type == R_CR16_GOTC_REGREL20)
           {
-             asection * sgot;
-             sgot = bfd_get_linker_section (dynobj, ".got");
+             asection *sgot = elf_hash_table (info)->sgot;
 
              if (h != NULL)
                {
@@ -1443,7 +1423,7 @@ elf32_cr16_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
         continue;
 
       r = cr16_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -1472,18 +1452,14 @@ elf32_cr16_relocate_section (bfd *output
           switch (r)
             {
              case bfd_reloc_overflow:
-               if (!((*info->callbacks->reloc_overflow)
-                     (info, (h ? &h->root : NULL), name, howto->name,
-                      (bfd_vma) 0, input_bfd, input_section,
-                      rel->r_offset)))
-                 return FALSE;
+	       (*info->callbacks->reloc_overflow)
+		 (info, (h ? &h->root : NULL), name, howto->name,
+		  (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
                break;
 
              case bfd_reloc_undefined:
-               if (!((*info->callbacks->undefined_symbol)
-                     (info, name, input_bfd, input_section,
-                      rel->r_offset, TRUE)))
-                 return FALSE;
+	       (*info->callbacks->undefined_symbol)
+		 (info, name, input_bfd, input_section, rel->r_offset, TRUE);
                break;
 
              case bfd_reloc_outofrange:
@@ -1503,10 +1479,8 @@ elf32_cr16_relocate_section (bfd *output
                /* Fall through.  */
 
              common_error:
-               if (!((*info->callbacks->warning)
-                     (info, msg, name, input_bfd, input_section,
-                      rel->r_offset)))
-                 return FALSE;
+	       (*info->callbacks->warning) (info, msg, name, input_bfd,
+					    input_section, rel->r_offset);
                break;
             }
         }
@@ -1731,8 +1705,10 @@ _bfd_cr16_elf_object_p (bfd *abfd)
    object file when linking.  */
 
 static bfd_boolean
-_bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
+
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
     return TRUE;
@@ -1776,7 +1752,7 @@ elf32_cr16_relax_section (bfd *abfd, ase
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -2251,6 +2227,7 @@ _bfd_cr16_elf_create_dynamic_sections (b
   flagword   flags;
   asection * s;
   const struct elf_backend_data * bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
   int ptralign = 0;
 
   switch (bed->s->arch_size)
@@ -2278,6 +2255,7 @@ _bfd_cr16_elf_create_dynamic_sections (b
 					  (bed->default_use_rela_p
 					   ? ".rela.plt" : ".rel.plt"),
 					  flags | SEC_READONLY);
+  htab->srelplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
@@ -2309,7 +2287,7 @@ _bfd_cr16_elf_create_dynamic_sections (b
          be needed, we can discard it later.  We will never need this
          section when generating a shared object, since they do not use
          copy relocs.  */
-      if (! info->executable)
+      if (! bfd_link_executable (info))
         {
           s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -2353,7 +2331,7 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->executable
+      if (! bfd_link_executable (info)
           && !h->def_dynamic
           && !h->ref_dynamic)
         {
@@ -2376,13 +2354,13 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str
       /* We also need to make an entry in the .got.plt section, which
          will be placed in the .got section by the linker script.  */
 
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = elf_hash_table (info)->sgotplt;
       BFD_ASSERT (s != NULL);
       s->size += 4;
 
       /* We also need to make an entry in the .rela.plt section.  */
 
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = elf_hash_table (info)->srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
 
@@ -2408,7 +2386,7 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->executable)
+  if (bfd_link_executable (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2464,7 +2442,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
         {
 #if 0
           s = bfd_get_linker_section (dynobj, ".interp");
@@ -2481,7 +2459,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd
          not actually use these entries.  Reset the size of .rela.got,
          which will cause it to get stripped from the output file
          below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
         s->size = 0;
     }
@@ -2581,7 +2559,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd
          but we must add the entries now so that we get the correct
          size for the .dynamic section.  The DT_DEBUG entry is filled
          in by the dynamic linker and used by the debugger.  */
-      if (! info->executable)
+      if (! bfd_link_executable (info))
         {
           if (!_bfd_elf_add_dynamic_entry (info, DT_DEBUG, 0))
             return FALSE;
@@ -2636,8 +2614,8 @@ _bfd_cr16_elf_finish_dynamic_symbol (bfd
 
       /* This symbol has an entry in the global offset table.  Set it up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srel = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srel = elf_hash_table (info)->srelgot;
       BFD_ASSERT (sgot != NULL && srel != NULL);
 
       rel.r_offset = (sgot->output_section->vma
@@ -2649,7 +2627,7 @@ _bfd_cr16_elf_finish_dynamic_symbol (bfd
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->executable
+      if (bfd_link_executable (info)
           && (info->symbolic || h->dynindx == -1)
           && h->def_regular)
         {
@@ -2715,7 +2693,7 @@ _bfd_cr16_elf_finish_dynamic_sections (b
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = elf_hash_table (info)->sgotplt;
   BFD_ASSERT (sgot != NULL);
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
@@ -2732,7 +2710,6 @@ _bfd_cr16_elf_finish_dynamic_sections (b
       for (; dyncon < dynconend; dyncon++)
         {
           Elf_Internal_Dyn dyn;
-          const char * name;
           asection * s;
 
           bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
@@ -2743,40 +2720,21 @@ _bfd_cr16_elf_finish_dynamic_sections (b
               break;
 
             case DT_PLTGOT:
-              name = ".got";
+              s = elf_hash_table (info)->sgotplt;
               goto get_vma;
 
             case DT_JMPREL:
-              name = ".rela.plt";
+              s = elf_hash_table (info)->srelplt;
             get_vma:
-              s = bfd_get_section_by_name (output_bfd, name);
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
 
             case DT_PLTRELSZ:
-              s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-              BFD_ASSERT (s != NULL);
+              s = elf_hash_table (info)->srelplt;
               dyn.d_un.d_val = s->size;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
-
-            case DT_RELASZ:
-              /* My reading of the SVR4 ABI indicates that the
-                 procedure linkage table relocs (DT_JMPREL) should be
-                 included in the overall relocs (DT_RELA).  This is
-                 what Solaris does.  However, UnixWare can not handle
-                 that case.  Therefore, we override the DT_RELASZ entry
-                 here to make it not include the JMPREL relocs.  Since
-                 the linker script arranges for .rela.plt to follow all
-                 other relocation sections, we don't have to worry
-                 about changing the DT_RELA entry.  */
-              s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-              if (s != NULL)
-                dyn.d_un.d_val -= s->size;
-              bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-              break;
             }
         }
 
@@ -2819,7 +2777,7 @@ bfd_cr16_elf32_create_embedded_relocs (b
   bfd_byte *p;
   bfd_size_type amt;
 
-  BFD_ASSERT (! info->relocatable);
+  BFD_ASSERT (! bfd_link_relocatable (info));
 
   *errmsg = NULL;
 
@@ -2994,5 +2952,6 @@ _bfd_cr16_elf_reloc_type_class (const st
 #define elf_backend_plt_readonly        1
 #define elf_backend_want_plt_sym        0
 #define elf_backend_got_header_size     12
+#define elf_backend_dtrel_excludes_plt	1
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cr16c.c ./bfd/elf32-cr16c.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cr16c.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-cr16c.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for National Semiconductor's CR16C ELF
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -182,6 +182,7 @@ elf_cr16c_info_to_howto_rel (bfd *abfd A
 
   if (r_type >= RINDEX_16C_MAX)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid CR16C reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -730,7 +731,7 @@ elf32_cr16c_relocate_section (bfd *outpu
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -765,18 +766,14 @@ elf32_cr16c_relocate_section (bfd *outpu
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -796,10 +793,8 @@ elf32_cr16c_relocate_section (bfd *outpu
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cris.c ./bfd/elf32-cris.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-cris.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-cris.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* CRIS-specific support for 32-bit ELF.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson, based on elf32-fr30.c
    PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
@@ -463,6 +463,7 @@ cris_info_to_howto_rela (bfd * abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_CRIS_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid CRIS reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -989,7 +990,7 @@ cris_elf_relocate_section (bfd *output_b
   if (htab == NULL)
     return FALSE;
 
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -1002,8 +1003,8 @@ cris_elf_relocate_section (bfd *output_b
 
   if (dynobj != NULL)
     {
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      sgot = bfd_get_linker_section (dynobj, ".got");
+      splt = htab->root.splt;
+      sgot = htab->root.sgot;
     }
 
   for (rel = relocs; rel < relend; rel ++)
@@ -1092,8 +1093,8 @@ cris_elf_relocate_section (bfd *output_b
 		 time.  FIXME: Not sure this example covers the
 		 h->elf_link_hash_flags test, though it's there in
 		 other targets.  */
-	      if (info->shared
-		  && ((! info->symbolic && h->dynindx != -1)
+	      if (bfd_link_pic (info)
+		  && ((!SYMBOLIC_BIND (info, h) && h->dynindx != -1)
 		      || !h->def_regular)
 		  && (input_section->flags & SEC_ALLOC) != 0
 		  && (r_type == R_CRIS_8
@@ -1103,13 +1104,14 @@ cris_elf_relocate_section (bfd *output_b
 		      || r_type == R_CRIS_16_PCREL
 		      || r_type == R_CRIS_32_PCREL))
 		relocation = 0;
-	      else if (!info->relocatable && unresolved_reloc
+	      else if (!bfd_link_relocatable (info) && unresolved_reloc
 		       && (_bfd_elf_section_offset (output_bfd, info,
 						    input_section,
 						    rel->r_offset)
 			   != (bfd_vma) -1))
 		{
 		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B, section %A: unresolvable relocation %s against symbol `%s'"),
 		     input_bfd,
 		     input_section,
@@ -1125,7 +1127,7 @@ cris_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -1140,8 +1142,7 @@ cris_elf_relocate_section (bfd *output_b
 	  if (h != NULL
 	      && ((struct elf_cris_link_hash_entry *) h)->gotplt_offset != 0)
 	    {
-	      asection *sgotplt
-		= bfd_get_linker_section (dynobj, ".got.plt");
+	      asection *sgotplt = htab->root.sgotplt;
 	      bfd_vma got_offset;
 
 	      BFD_ASSERT (h->dynindx != -1);
@@ -1165,15 +1166,17 @@ cris_elf_relocate_section (bfd *output_b
 	     these call-specific relocs don't address non-functions.  */
 	  if (h != NULL
 	      && (h->got.offset == (bfd_vma) -1
-		  || (!info->shared
+		  || (!bfd_link_pic (info)
 		      && !(h->def_regular
 			   || (!h->def_dynamic
 			       && h->root.type == bfd_link_hash_undefweak)))))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		((h->got.offset == (bfd_vma) -1)
+		 /* xgettext:c-format */
 		 ? _("%B, section %A: No PLT nor GOT for relocation %s"
 		     " against symbol `%s'")
+		 /* xgettext:c-format */
 		 : _("%B, section %A: No PLT for relocation %s"
 		     " against symbol `%s'"),
 		 input_bfd,
@@ -1207,20 +1210,20 @@ cris_elf_relocate_section (bfd *output_b
 		BFD_ASSERT (off != (bfd_vma) -1);
 
 		if (!elf_hash_table (info)->dynamic_sections_created
-		    || (! info->shared
+		    || (! bfd_link_pic (info)
 			&& (h->def_regular
 			    || h->type == STT_FUNC
 			    || h->needs_plt))
-		    || (info->shared
-			&& (info->symbolic || h->dynindx == -1)
+		    || (bfd_link_pic (info)
+			&& (SYMBOLIC_BIND (info, h) || h->dynindx == -1)
 			&& h->def_regular))
 		  {
-		    /* This wasn't checked above for ! info->shared, but
+		    /* This wasn't checked above for ! bfd_link_pic (info), but
 		       must hold there if we get here; the symbol must
 		       be defined in the regular program or be undefweak
 		       or be a function or otherwise need a PLT.  */
 		    BFD_ASSERT (!elf_hash_table (info)->dynamic_sections_created
-				|| info->shared
+				|| bfd_link_pic (info)
 				|| h->def_regular
 				|| h->type == STT_FUNC
 				|| h->needs_plt
@@ -1266,14 +1269,12 @@ cris_elf_relocate_section (bfd *output_b
 		  {
 		    bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-		    if (info->shared)
+		    if (bfd_link_pic (info))
 		      {
 			Elf_Internal_Rela outrel;
 			bfd_byte *loc;
 
-			if (srelgot == NULL)
-			  srelgot
-			    = bfd_get_linker_section (dynobj, ".rela.got");
+			srelgot = htab->root.srelgot;
 			BFD_ASSERT (srelgot != NULL);
 
 			outrel.r_offset = (sgot->output_section->vma
@@ -1298,7 +1299,8 @@ cris_elf_relocate_section (bfd *output_b
 		   symbols.  Make this an error; the compiler isn't
 		   allowed to pass us these kinds of things.  */
 		if (h == NULL)
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B, section %A: relocation %s with non-zero addend %d"
 		       " against local symbol"),
 		     input_bfd,
@@ -1306,7 +1308,8 @@ cris_elf_relocate_section (bfd *output_b
 		     cris_elf_howto_table[r_type].name,
 		     rel->r_addend);
 		else
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B, section %A: relocation %s with non-zero addend %d"
 		       " against symbol `%s'"),
 		     input_bfd,
@@ -1327,12 +1330,13 @@ cris_elf_relocate_section (bfd *output_b
 	     defined in an ordinary (non-DSO) object or is undefined weak.  */
 	  if (h != NULL
 	      && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-	      && !(!info->shared
+	      && !(!bfd_link_pic (info)
 		   && (h->def_regular
 		       || (!h->def_dynamic
 			   && h->root.type == bfd_link_hash_undefweak))))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A: relocation %s is"
 		   " not allowed for global symbol: `%s'"),
 		 input_bfd,
@@ -1348,7 +1352,8 @@ cris_elf_relocate_section (bfd *output_b
 	     it's noticed if it happens elsewhere.  */
 	  if (sgot == NULL)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A: relocation %s with no GOT created"),
 		 input_bfd,
 		 input_section,
@@ -1426,13 +1431,13 @@ cris_elf_relocate_section (bfd *output_b
 	case R_CRIS_8:
 	case R_CRIS_16:
 	case R_CRIS_32:
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && r_symndx != STN_UNDEF
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && ((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 +1489,7 @@ cris_elf_relocate_section (bfd *output_b
 	      /* 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);
@@ -1557,16 +1562,18 @@ cris_elf_relocate_section (bfd *output_b
 	  if (h != NULL
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-	      && (info->shared
+	      && (bfd_link_pic (info)
 		  || (!h->def_regular
 		      && h->root.type != bfd_link_hash_undefined)))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		((h->root.type == bfd_link_hash_undefined)
 		 /* We shouldn't get here for GCC-emitted code.  */
+		 /* xgettext:c-format */
 		 ? _("%B, section %A: relocation %s has an undefined"
 		     " reference to `%s', perhaps a declaration mixup?")
-		 : ("%B, section %A: relocation %s is"
+		 /* xgettext:c-format */
+		 : _("%B, section %A: relocation %s is"
 		     " not allowed for `%s', a global symbol with default"
 		     " visibility, perhaps a declaration mixup?"),
 		 input_bfd,
@@ -1589,16 +1596,15 @@ cris_elf_relocate_section (bfd *output_b
 	  if (htab->dtpmod_refcount > 0
 	      && (input_section->flags & SEC_ALLOC) != 0)
 	    {
-	      asection *sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
+	      asection *sgotplt = htab->root.sgotplt;
 	      BFD_ASSERT (sgotplt != NULL);
 
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  Elf_Internal_Rela outrel;
 		  bfd_byte *loc;
 
-		  if (srelgot == NULL)
-		    srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+		  srelgot = htab->root.srelgot;
 		  BFD_ASSERT (srelgot != NULL);
 		  loc = srelgot->contents;
 		  loc += srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
@@ -1631,7 +1637,7 @@ cris_elf_relocate_section (bfd *output_b
 	  break;
 
 	case R_CRIS_32_GD:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bfd_set_error (bfd_error_invalid_operation);
 
@@ -1649,7 +1655,8 @@ cris_elf_relocate_section (bfd *output_b
 		 symbol *plus offset*.  The GOT holds relocations for
 		 symbols.  Make this an error; the compiler isn't allowed
 		 to pass us these kinds of things.  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A: relocation %s with non-zero addend %d"
 		   " against symbol `%s'"),
 		 input_bfd,
@@ -1662,7 +1669,7 @@ cris_elf_relocate_section (bfd *output_b
 	      return FALSE;
 	    }
 
-	  if (!info->shared
+	  if (!bfd_link_pic (info)
 	      && (h == NULL || h->def_regular || ELF_COMMON_DEF_P (h)))
 	    {
 	      /* Known contents of the GOT.  */
@@ -1741,8 +1748,7 @@ cris_elf_relocate_section (bfd *output_b
 		  bfd_put_32 (output_bfd, 0, sgot->contents + off);
 		  bfd_put_32 (output_bfd, 0, sgot->contents + off + 4);
 
-		  if (srelgot == NULL)
-		    srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+		  srelgot = htab->root.srelgot;
 		  BFD_ASSERT (srelgot != NULL);
 
 		  if (h != NULL && h->dynindx != -1)
@@ -1783,7 +1789,7 @@ cris_elf_relocate_section (bfd *output_b
 	  break;
 
 	case R_CRIS_32_IE:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bfd_set_error (bfd_error_invalid_operation);
 
@@ -1802,7 +1808,8 @@ cris_elf_relocate_section (bfd *output_b
 		 relocations for symbols.  Make this an error; the
 		 compiler isn't allowed to pass us these kinds of
 		 things.  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A: relocation %s with non-zero addend %d"
 		   " against symbol `%s'"),
 		 input_bfd,
@@ -1814,7 +1821,7 @@ cris_elf_relocate_section (bfd *output_b
 	      return FALSE;
 	    }
 
-	  if (!info->shared
+	  if (!bfd_link_pic (info)
 	      && (h == NULL || h->def_regular || ELF_COMMON_DEF_P (h)))
 	    {
 	      /* Known contents of the GOT.  */
@@ -1873,8 +1880,7 @@ cris_elf_relocate_section (bfd *output_b
 		  else
 		    local_got_offsets[r_symndx] |= 1;
 
-		  if (srelgot == NULL)
-		    srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+		  srelgot = htab->root.srelgot;
 		  BFD_ASSERT (srelgot != NULL);
 
 		  if (h != NULL && h->dynindx != -1)
@@ -1920,7 +1926,7 @@ cris_elf_relocate_section (bfd *output_b
 	case R_CRIS_32_TPREL:
 	  /* This relocation must only be performed against symbols
 	     defined in an ordinary (non-DSO) object.  */
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bfd_set_error (bfd_error_invalid_operation);
 
@@ -1936,7 +1942,8 @@ cris_elf_relocate_section (bfd *output_b
 		 been emitted.  */
 	      && h->root.type != bfd_link_hash_undefined)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A: relocation %s is"
 		   " not allowed for symbol: `%s'"
 		   " which is defined outside the program,"
@@ -1973,7 +1980,7 @@ cris_elf_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), symname, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      if (additional_relocation_error_msg_count > 0)
@@ -1989,14 +1996,14 @@ cris_elf_relocate_section (bfd *output_b
 			 only.  */
 		    case R_CRIS_16_GOT_TPREL:
 		    case R_CRIS_16_GOT_GD:
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
 			(_("(too many global variables for -fpic:"
 			   " recompile with -fPIC)"));
 		      break;
 
 		    case R_CRIS_16_TPREL:
 		    case R_CRIS_16_DTPREL:
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
 			(_("(thread-local data too big for -fpic or"
 			   " -msmall-tls: recompile with -fPIC or"
 			   " -mno-small-tls)"));
@@ -2010,9 +2017,8 @@ cris_elf_relocate_section (bfd *output_b
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, symname, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, symname, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -2033,11 +2039,8 @@ cris_elf_relocate_section (bfd *output_b
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, symname, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, symname, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -2054,7 +2057,6 @@ elf_cris_finish_dynamic_symbol (bfd *out
 				Elf_Internal_Sym *sym)
 {
   struct elf_cris_link_hash_table * htab;
-  bfd *dynobj;
 
   /* Where in the plt entry to put values.  */
   int plt_off1 = 2, plt_off2 = 10, plt_off3 = 16;
@@ -2086,8 +2088,6 @@ elf_cris_finish_dynamic_symbol (bfd *out
       plt_pic_entry = elf_cris_pic_plt_entry_v32;
     }
 
-  dynobj = elf_hash_table (info)->dynobj;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       asection *splt;
@@ -2130,16 +2130,16 @@ elf_cris_finish_dynamic_symbol (bfd *out
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-      srela = bfd_get_linker_section (dynobj, ".rela.plt");
+      splt = htab->root.splt;
+      sgotplt = htab->root.sgotplt;
+      srela = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgotplt != NULL
 		  && (! has_gotplt || srela != NULL));
 
       got_base = sgotplt->output_section->vma + sgotplt->output_offset;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  memcpy (splt->contents + h->plt.offset, plt_entry,
 		  plt_entry_size);
@@ -2215,7 +2215,7 @@ elf_cris_finish_dynamic_symbol (bfd *out
      references to the function symbol are redirected to the PLT.  */
   if (h->got.offset != (bfd_vma) -1
       && (elf_cris_hash_entry (h)->reg_got_refcount > 0)
-      && (info->shared
+      && (bfd_link_pic (info)
 	  || (h->dynindx != -1
 	      && h->plt.offset == (bfd_vma) -1
 	      && !h->def_regular
@@ -2229,8 +2229,8 @@ elf_cris_finish_dynamic_symbol (bfd *out
 
       /* This symbol has an entry in the global offset table.  Set it up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srela = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = htab->root.sgot;
+      srela = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -2244,8 +2244,8 @@ elf_cris_finish_dynamic_symbol (bfd *out
 	 initialized in the relocate_section function.  */
       where = sgot->contents + (h->got.offset &~ (bfd_vma) 1);
       if (! elf_hash_table (info)->dynamic_sections_created
-	  || (info->shared
-	      && (info->symbolic || h->dynindx == -1)
+	  || (bfd_link_pic (info)
+	      && (SYMBOLIC_BIND (info, h) || h->dynindx == -1)
 	      && h->def_regular))
 	{
 	  rela.r_info = ELF32_R_INFO (0, R_CRIS_RELATIVE);
@@ -2275,8 +2275,10 @@ elf_cris_finish_dynamic_symbol (bfd *out
 		  && (h->root.type == bfd_link_hash_defined
 		      || h->root.type == bfd_link_hash_defweak));
 
-      s = bfd_get_linker_section (dynobj, ".rela.bss");
-      BFD_ASSERT (s != NULL);
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	s = htab->root.sreldynrelro;
+      else
+	s = htab->root.srelbss;
 
       rela.r_offset = (h->root.u.def.value
 		       + h->root.u.def.section->output_section->vma
@@ -2309,7 +2311,7 @@ elf_cris_finish_dynamic_sections (bfd *o
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = elf_hash_table (info)->sgotplt;
   BFD_ASSERT (sgot != NULL);
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
@@ -2318,7 +2320,7 @@ elf_cris_finish_dynamic_sections (bfd *o
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
@@ -2336,42 +2338,27 @@ elf_cris_finish_dynamic_sections (bfd *o
 	      break;
 
 	    case DT_PLTGOT:
-	      s = bfd_get_section_by_name (output_bfd, ".got");
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = sgot->output_section->vma + sgot->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_JMPREL:
 	      /* Yes, we *can* have a .plt and no .plt.rela, for instance
 		 if all symbols are found in the .got (not .got.plt).  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      dyn.d_un.d_ptr = s != NULL ? s->vma : 0;
+	      s = elf_hash_table (info)->srelplt;
+	      dyn.d_un.d_ptr = s != NULL ? (s->output_section->vma
+					    + s->output_offset) : 0;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+	      s = elf_hash_table (info)->srelplt;
 	      if (s == NULL)
 		dyn.d_un.d_val = 0;
 	      else
 		dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
@@ -2380,7 +2367,7 @@ elf_cris_finish_dynamic_sections (bfd *o
 	{
 	  if (bfd_get_mach (output_bfd) == bfd_mach_cris_v32)
 	    {
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		memcpy (splt->contents, elf_cris_pic_plt0_entry_v32,
 			PLT_ENTRY_SIZE_V32);
 	      else
@@ -2398,7 +2385,7 @@ elf_cris_finish_dynamic_sections (bfd *o
 	    }
 	  else
 	    {
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		memcpy (splt->contents, elf_cris_pic_plt0_entry,
 			PLT_ENTRY_SIZE);
 	      else
@@ -2481,7 +2468,7 @@ cris_elf_gc_sweep_hook (bfd *abfd,
   asection *sgot;
   asection *srelgot;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -2496,8 +2483,8 @@ cris_elf_gc_sweep_hook (bfd *abfd,
   sym_hashes = elf_sym_hashes (abfd);
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
-  sgot = bfd_get_linker_section (dynobj, ".got");
-  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+  sgot = htab->root.sgot;
+  srelgot = htab->root.srelgot;
 
   relend = relocs + sec->reloc_count;
   for (rel = relocs; rel < relend; rel++)
@@ -2592,7 +2579,7 @@ cris_elf_gc_sweep_hook (bfd *abfd,
 		{
 		  /* We don't need the .got entry any more.  */
 		  sgot->size -= got_element_size;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srelgot->size -= sizeof (Elf32_External_Rela);
 		}
 	    }
@@ -2747,13 +2734,11 @@ elf_cris_adjust_gotplt_to_got (struct el
   else
     {
       /* No GOT entry for this symbol.  We need to create one.  */
-      bfd *dynobj = elf_hash_table (info)->dynobj;
       asection *sgot;
       asection *srelgot;
 
-      BFD_ASSERT (dynobj != NULL);
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srelgot = elf_hash_table (info)->srelgot;
 
       /* Put accurate refcounts there.  */
       h->root.got.refcount += h->gotplt_refcount;
@@ -2854,13 +2839,14 @@ elf_cris_adjust_dynamic_symbol (struct b
   struct elf_cris_link_hash_table * htab;
   bfd *dynobj;
   asection *s;
+  asection *srel;
   bfd_size_type plt_entry_size;
 
   htab = elf_cris_hash_table (info);
   if (htab == NULL)
     return FALSE;
 
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
 
   /* Make sure we know what is going on here.  */
   BFD_ASSERT (dynobj != NULL
@@ -2886,7 +2872,7 @@ elf_cris_adjust_dynamic_symbol (struct b
 	 result as one built without -fpic, specifically considering weak
 	 symbols.
 	 FIXME: m68k and i386 differ here, for unclear reasons.  */
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && !h->def_dynamic)
 	{
 	  /* This case can occur if we saw a PLT reloc in an input file,
@@ -2908,7 +2894,7 @@ elf_cris_adjust_dynamic_symbol (struct b
 	 like R_CRIS_JUMP_SLOT after symbol evaluation) we could get rid
 	 of the PLT.  We can't for the executable, because the GOT
 	 entries will point to the PLT there (and be constant).  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && !elf_cris_try_fold_plt_to_got ((struct elf_cris_link_hash_entry*)
 					    h, info))
 	return FALSE;
@@ -2928,7 +2914,7 @@ elf_cris_adjust_dynamic_symbol (struct b
 	    return FALSE;
 	}
 
-      s = bfd_get_linker_section (dynobj, ".plt");
+      s = htab->root.splt;
       BFD_ASSERT (s != NULL);
 
       /* If this is the first .plt entry, make room for the special
@@ -2939,7 +2925,7 @@ elf_cris_adjust_dynamic_symbol (struct b
       /* If this symbol is not defined in a regular file, and we are
 	 not generating a shared library, then set the symbol to this
 	 location in the .plt.  */
-      if (!info->shared
+      if (!bfd_link_pic (info)
 	  && !h->def_regular)
 	{
 	  h->root.u.def.section = s;
@@ -2952,7 +2938,7 @@ elf_cris_adjust_dynamic_symbol (struct b
 	 executable, because then the reloc associated with the PLT
 	 would get a non-PLT reloc pointing to the PLT.  FIXME: Move
 	 this to elf_cris_try_fold_plt_to_got.  */
-      if (info->shared && h->got.refcount > 0)
+      if (bfd_link_pic (info) && h->got.refcount > 0)
 	{
 	  h->got.refcount += h->plt.refcount;
 
@@ -2987,13 +2973,13 @@ elf_cris_adjust_dynamic_symbol (struct b
 	= htab->next_gotplt_entry;
       htab->next_gotplt_entry += 4;
 
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = htab->root.sgotplt;
       BFD_ASSERT (s != NULL);
       s->size += 4;
 
       /* We also need to make an entry in the .rela.plt section.  */
 
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = htab->root.srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
 
@@ -3023,7 +3009,7 @@ elf_cris_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -3041,23 +3027,30 @@ elf_cris_adjust_dynamic_symbol (struct b
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
 
-  s = bfd_get_linker_section (dynobj, ".dynbss");
-  BFD_ASSERT (s != NULL);
-
   /* We must generate a R_CRIS_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
+
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->root.sdynrelro;
+      srel = htab->root.sreldynrelro;
+    }
+  else
+    {
+      s = htab->root.sdynbss;
+      srel = htab->root.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      asection *srel;
-
-      srel = bfd_get_linker_section (dynobj, ".rela.bss");
       BFD_ASSERT (srel != NULL);
       srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
 
+  BFD_ASSERT (s != NULL);
+
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -3143,7 +3136,7 @@ cris_elf_check_relocs (bfd *abfd,
   asection *srelgot;
   asection *sreloc;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf_cris_hash_table (info);
@@ -3233,7 +3226,8 @@ cris_elf_check_relocs (bfd *abfd,
 		 that, we must insist on dynobj being a specific mach.  */
 	      if (bfd_get_mach (dynobj) == bfd_mach_cris_v10_v32)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B, section %A:\n  v10/v32 compatible object %s"
 		       " must not contain a PIC relocation"),
 		     abfd, sec);
@@ -3251,7 +3245,8 @@ cris_elf_check_relocs (bfd *abfd,
 	      if (!_bfd_elf_create_got_section (dynobj, info))
 		return FALSE;
 
-	      sgot = bfd_get_linker_section (dynobj, ".got");
+	      sgot = elf_hash_table (info)->sgot;
+	      srelgot = elf_hash_table (info)->srelgot;
 	    }
 
 	  if (local_got_refcounts == NULL)
@@ -3276,62 +3271,6 @@ cris_elf_check_relocs (bfd *abfd,
 	  break;
 	}
 
-      /* Some relocs require a global offset table (but perhaps not a
-	 specific GOT entry).  */
-      switch (r_type)
-	{
-	case R_CRIS_16_DTPREL:
-	case R_CRIS_32_DTPREL:
-	  /* Not requesting .got.rela for an executable: the contents
-	     of the first entry is constant there.  For a shared
-	     library, we need .got.rela for the R_CRIS_DTPMOD
-	     relocation at index 3.  */
-	  if (!info->shared)
-	    break;
-	  /* Fall through.  */
-
-	case R_CRIS_32_IE:
-	case R_CRIS_32_GD:
-	case R_CRIS_16_GOT_GD:
-	case R_CRIS_32_GOT_GD:
-	case R_CRIS_32_GOT_TPREL:
-	case R_CRIS_16_GOT_TPREL:
-	  /* Fall through.  */
-
-	  /* For R_CRIS_16_GOTPLT and R_CRIS_32_GOTPLT, we need a GOT
-	     entry only for local symbols.  Unfortunately, we don't know
-	     until later on if there's a version script that forces the
-	     symbol local.  We must have the .rela.got section in place
-	     before we know if the symbol looks global now, so we need
-	     to treat the reloc just like for R_CRIS_16_GOT and
-	     R_CRIS_32_GOT.  */
-	case R_CRIS_16_GOTPLT:
-	case R_CRIS_32_GOTPLT:
-	case R_CRIS_16_GOT:
-	case R_CRIS_32_GOT:
-	  if (srelgot == NULL
-	      && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || !bfd_set_section_alignment (dynobj, srelgot, 2))
-		    return FALSE;
-		}
-	    }
-	  break;
-
-	default:
-	  break;
-	}
-
       /* Warn and error for invalid input.  */
       switch (r_type)
 	{
@@ -3339,9 +3278,10 @@ cris_elf_check_relocs (bfd *abfd,
 	case R_CRIS_32_TPREL:
 	case R_CRIS_16_TPREL:
 	case R_CRIS_32_GD:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A:\n  relocation %s not valid"
 		   " in a shared object;"
 		   " typically an option mixup, recompile with -fPIC"),
@@ -3381,7 +3321,7 @@ cris_elf_check_relocs (bfd *abfd,
 	  /* Those relocs also require that a DSO is of type
 	     Initial Exec.  Like other targets, we don't reset this
 	     flag even if the relocs are GC:ed away.  */
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  break;
 
@@ -3484,7 +3424,7 @@ cris_elf_check_relocs (bfd *abfd,
 	      if (local_got_refcounts[r_symndx_lgot] == 0)
 		{
 		  sgot->size += got_element_size;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      /* If we are generating a shared object, we need
 			 to output a R_CRIS_RELATIVE reloc so that the
@@ -3550,12 +3490,13 @@ cris_elf_check_relocs (bfd *abfd,
 	     can't help tables of (global) function pointers, for
 	     example, though they must be emitted in a (writable) data
 	     section to avoid having impure text sections.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      && (sec->flags & SEC_READONLY) != 0)
 	    {
 	      /* FIXME: How do we make this optionally a warning only?  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B, section %A:\n  relocation %s should not"
 		   " be used in a shared object; recompile with -fPIC"),
 		 abfd,
@@ -3594,7 +3535,7 @@ cris_elf_check_relocs (bfd *abfd,
 	     render the symbol local.  */
 
 	  /* No need to do anything if we're not creating a shared object.  */
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    break;
 
 	  /* We may need to create a reloc section in the dynobj and made room
@@ -3643,7 +3584,7 @@ cris_elf_check_relocs (bfd *abfd,
 	     render the symbol local.  */
 
 	  /* No need to do anything if we're not creating a shared object.  */
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    break;
 
 	  /* We don't need to handle relocs into sections not going into
@@ -3661,7 +3602,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;
@@ -3758,13 +3699,13 @@ elf_cris_size_dynamic_sections (bfd *out
   if (htab == NULL)
     return FALSE;
 
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
   BFD_ASSERT (dynobj != NULL);
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -3783,7 +3724,7 @@ elf_cris_size_dynamic_sections (bfd *out
 	 not actually use these entries.  Reset the size of .rela.got,
 	 which will cause it to get stripped from the output file
 	 below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = htab->root.srelgot;
       if (s != NULL)
 	s->size = 0;
     }
@@ -3795,7 +3736,7 @@ elf_cris_size_dynamic_sections (bfd *out
      for relocs that have become for local symbols due to symbol
      visibility changes.  For programs, we discard space for relocs for
      symbols not referenced by any dynamic object.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     elf_cris_link_hash_traverse (htab,
 				 elf_cris_discard_excess_dso_dynamics,
 				 info);
@@ -3837,7 +3778,7 @@ elf_cris_size_dynamic_sections (bfd *out
 	{
 	  if (strcmp (name, ".rela.got") == 0
 	      && htab->dtpmod_refcount != 0
-	      && info->shared)
+	      && bfd_link_pic (info))
 	    s->size += sizeof (Elf32_External_Rela);
 
 	  if (s->size != 0)
@@ -3853,7 +3794,8 @@ elf_cris_size_dynamic_sections (bfd *out
 	    }
 	}
       else if (! CONST_STRNEQ (name, ".got")
-	       && strcmp (name, ".dynbss") != 0)
+	       && strcmp (name, ".dynbss") != 0
+	       && s != htab->root.sdynrelro)
 	{
 	  /* It's not one of our sections, so don't allocate space.  */
 	  continue;
@@ -3897,7 +3839,7 @@ elf_cris_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3953,7 +3895,7 @@ elf_cris_discard_excess_dso_dynamics (st
      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)
 	{
@@ -3977,7 +3919,8 @@ elf_cris_discard_excess_dso_dynamics (st
     if ((s->section->flags & SEC_READONLY) != 0)
       {
 	/* FIXME: How do we make this optionally a warning only?  */
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B, section `%A', to symbol `%s':\n"
 	     "  relocation %s should not be used"
 	     " in a shared object; recompile with -fPIC"),
@@ -4017,12 +3960,9 @@ elf_cris_discard_excess_program_dynamics
 	  && elf_hash_table (info)->dynamic_sections_created)
 	{
 	  bfd *dynobj = elf_hash_table (info)->dynobj;
-	  asection *srelgot;
+	  asection *srelgot = elf_hash_table (info)->srelgot;
 
 	  BFD_ASSERT (dynobj != NULL);
-
-	  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-
 	  BFD_ASSERT (srelgot != NULL);
 
 	  srelgot->size -= sizeof (Elf32_External_Rela);
@@ -4032,8 +3972,10 @@ elf_cris_discard_excess_program_dynamics
 	 have to export it as a dynamic symbol.  This was already done for
 	 functions; doing this for all symbols would presumably not
 	 introduce new problems.  Of course we don't do this if we're
-	 exporting all dynamic symbols.  */
-      if (! info->export_dynamic
+	 exporting all dynamic symbols, or all data symbols, regardless of
+	 them being referenced or not.  */
+      if (! (info->export_dynamic
+	     || (h->root.type != STT_FUNC && info->dynamic_data))
 	  && h->root.dynindx != -1
 	  && !h->root.def_dynamic
 	  && !h->root.ref_dynamic)
@@ -4157,11 +4099,12 @@ cris_elf_print_private_bfd_data (bfd *ab
 /* Don't mix files with and without a leading underscore.  */
 
 static bfd_boolean
-cris_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   int imach, omach;
 
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -4189,7 +4132,7 @@ cris_elf_merge_private_bfd_data (bfd *ib
   if (bfd_get_symbol_leading_char (ibfd)
       != bfd_get_symbol_leading_char (obfd))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(bfd_get_symbol_leading_char (ibfd) == '_'
 	 ? _("%B: uses _-prefixed symbols, but writing file with non-prefixed symbols")
 	 : _("%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
@@ -4209,7 +4152,7 @@ cris_elf_merge_private_bfd_data (bfd *ib
 	  || (omach == bfd_mach_cris_v32
 	      && imach != bfd_mach_cris_v10_v32))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    ((imach == bfd_mach_cris_v32)
 	     ? _("%B contains CRIS v32 code, incompatible"
 		 " with previous objects")
@@ -4236,18 +4179,14 @@ cris_elf_merge_private_bfd_data (bfd *ib
 static bfd_boolean
 cris_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
-  /* Call the base function.  */
-  if (!_bfd_elf_copy_private_bfd_data (ibfd, obfd))
-    return FALSE;
-
-  /* If output is big-endian for some obscure reason, stop here.  */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
-    return FALSE;
-
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
     return TRUE;
 
+  /* Call the base function.  */
+  if (!_bfd_elf_copy_private_bfd_data (ibfd, obfd))
+    return FALSE;
+
   /* Do what we really came here for.  */
   return bfd_set_arch_mach (obfd, bfd_arch_cris, bfd_get_mach (ibfd));
 }
@@ -4393,6 +4332,8 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBU
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
 #define elf_backend_got_elt_size elf_cris_got_elt_size
+#define elf_backend_dtrel_excludes_plt	1
+#define elf_backend_want_dynrelro	1
 
 /* Later, we my want to optimize RELA entries into REL entries for dynamic
    linking and libraries (if it's a win of any significance).  Until then,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-crx.c ./bfd/elf32-crx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-crx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-crx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for National Semiconductor's CRX ELF
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
    Written by Tomer Levi, NSC, Israel.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -425,8 +425,9 @@ elf_crx_info_to_howto (bfd *abfd ATTRIBU
   unsigned int r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_CRX_MAX)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised CRX reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised CRX reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_CRX_NONE;
     }
@@ -882,7 +883,7 @@ elf32_crx_relocate_section (bfd *output_
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = crx_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -909,18 +910,14 @@ elf32_crx_relocate_section (bfd *output_
 	  switch (r)
 	    {
 	     case bfd_reloc_overflow:
-	       if (!((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		 return FALSE;
+	       (*info->callbacks->reloc_overflow)
+		 (info, (h ? &h->root : NULL), name, howto->name,
+		  (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	       break;
 
 	     case bfd_reloc_undefined:
-	       if (!((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      rel->r_offset, TRUE)))
-		 return FALSE;
+	       (*info->callbacks->undefined_symbol)
+		 (info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	       break;
 
 	     case bfd_reloc_outofrange:
@@ -940,10 +937,8 @@ elf32_crx_relocate_section (bfd *output_
 	       /* Fall through.  */
 
 	     common_error:
-	       if (!((*info->callbacks->warning)
-		     (info, msg, name, input_bfd, input_section,
-		      rel->r_offset)))
-		 return FALSE;
+	       (*info->callbacks->warning) (info, msg, name, input_bfd,
+					    input_section, rel->r_offset);
 	       break;
 	    }
 	}
@@ -979,7 +974,7 @@ elf32_crx_relax_section (bfd *abfd, asec
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-d10v.c ./bfd/elf32-d10v.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-d10v.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-d10v.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* D10V-specific support for 32-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -230,6 +230,7 @@ d10v_info_to_howto_rel (bfd *abfd ATTRIB
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_D10V_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid D10V reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -269,7 +270,7 @@ elf32_d10v_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -439,7 +440,7 @@ elf32_d10v_relocate_section (bfd *output
 			+ sym->st_value);
 	  if (ELF_ST_TYPE (sym->st_info) == STT_SECTION
 	      && ((sec->flags & SEC_MERGE) != 0
-		  || (info->relocatable
+		  || (bfd_link_relocatable (info)
 		      && sec->output_offset != 0)))
 	    {
 	      bfd_vma addend;
@@ -447,7 +448,7 @@ elf32_d10v_relocate_section (bfd *output
 
 	      addend = extract_rel_addend (input_bfd, where, howto);
 
-	      if (info->relocatable)
+	      if (bfd_link_relocatable (info))
 		addend += sec->output_offset;
 	      else
 		{
@@ -474,7 +475,7 @@ elf32_d10v_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL)
@@ -498,18 +499,14 @@ elf32_d10v_relocate_section (bfd *output
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -529,10 +526,8 @@ elf32_d10v_relocate_section (bfd *output
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-d30v.c ./bfd/elf32-d30v.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-d30v.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-d30v.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* D30V-specific support for 32-bit ELF
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -518,6 +518,7 @@ d30v_info_to_howto_rel (bfd *abfd ATTRIB
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_D30V_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid D30V reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -536,6 +537,7 @@ d30v_info_to_howto_rela (bfd *abfd ATTRI
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_D30V_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid D30V reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-dlx.c ./bfd/elf32-dlx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-dlx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-dlx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* DLX specific support for 32-bit ELF
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -23,6 +23,7 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/dlx.h"
+#include "elf32-dlx.h"
 
 #define USE_REL 1
 
@@ -40,8 +41,6 @@
 
 static int skip_dlx_elf_hi16_reloc = 0;
 
-extern int set_dlx_skip_hi16_flag (int);
-
 int
 set_dlx_skip_hi16_flag (int flag)
 {
@@ -138,8 +137,9 @@ elf32_dlx_relocate16 (bfd *abfd,
   /* Can not support a long jump to sections other then .text.  */
   if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
     {
-      (*_bfd_error_handler) (_("BFD Link Error: branch (PC rel16) to section (%s) not supported"),
-			     symbol->section->output_section->name);
+      _bfd_error_handler
+	(_("BFD Link Error: branch (PC rel16) to section (%s) not supported"),
+	 symbol->section->output_section->name);
       return bfd_reloc_undefined;
     }
 
@@ -200,8 +200,9 @@ elf32_dlx_relocate26 (bfd *abfd,
   /* Can not support a long jump to sections other then .text   */
   if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
     {
-      (*_bfd_error_handler) (_("BFD Link Error: jump (PC rel26) to section (%s) not supported"),
-			     symbol->section->output_section->name);
+      _bfd_error_handler
+	(_("BFD Link Error: jump (PC rel26) to section (%s) not supported"),
+	 symbol->section->output_section->name);
       return bfd_reloc_undefined;
     }
 
@@ -429,7 +430,7 @@ elf32_dlx_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-dlx.h ./bfd/elf32-dlx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-dlx.h	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elf32-dlx.h	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,34 @@
+/* DLX specific support for 32-bit ELF
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef _ELF32_DLX_H
+#define _ELF32_DLX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int set_dlx_skip_hi16_flag (int);
+
+#ifdef __cplusplus
+     }
+#endif
+
+#endif /* _ELF32_DLX_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-epiphany.c ./bfd/elf32-epiphany.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-epiphany.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-epiphany.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Adapteva epiphany specific support for 32-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Embecosm on behalf of Adapteva, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -212,7 +212,7 @@ epiphany_elf_relax_section (bfd *abfd, a
   /* We don't have to do anything for a relocatable link,
      if this section does not have relocs, or if this is
      not a code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -372,6 +372,7 @@ epiphany_info_to_howto_rela (bfd * abfd 
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_EPIPHANY_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid Epiphany reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -420,9 +421,10 @@ epiphany_final_link_relocate (reloc_howt
       relocation += rel->r_addend;
       if ((unsigned int) relocation > 0x7ff)
 	return bfd_reloc_outofrange;
+      /* Fall through.  */
     disp11:
-      relocation = ((relocation & 7) << 5)
-	|| ((relocation & 0x7f8 )  << 13);
+      relocation = (((relocation & 7) << 5)
+		    | ((relocation & 0x7f8 ) << 13));
       return _bfd_relocate_contents (howto, input_bfd, relocation,
 				     contents + rel->r_offset);
 
@@ -533,7 +535,7 @@ epiphany_elf_relocate_section (bfd *outp
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Finally, the sole EPIPHANY-specific part.  */
@@ -547,13 +549,13 @@ epiphany_elf_relocate_section (bfd *outp
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -578,11 +580,8 @@ epiphany_elf_relocate_section (bfd *outp
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-fr30.c ./bfd/elf32-fr30.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-fr30.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-fr30.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* FR30-specific support for 32-bit ELF.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -377,6 +377,7 @@ fr30_info_to_howto_rela (bfd *abfd ATTRI
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_FR30_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid FR30 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -563,7 +564,7 @@ fr30_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = fr30_final_link_relocate (howto, input_bfd, input_section,
@@ -576,15 +577,14 @@ fr30_elf_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -605,11 +605,8 @@ fr30_elf_relocate_section (bfd *output_b
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -652,7 +649,7 @@ fr30_elf_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-frv.c ./bfd/elf32-frv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-frv.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-frv.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* FRV-specific support for 32-bit ELF.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -805,16 +805,8 @@ struct frvfdpic_elf_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* A pointer to the .got section.  */
-  asection *sgot;
-  /* A pointer to the .rel.got section.  */
-  asection *sgotrel;
   /* A pointer to the .rofixup section.  */
   asection *sgotfixup;
-  /* A pointer to the .plt section.  */
-  asection *splt;
-  /* A pointer to the .rel.plt section.  */
-  asection *spltrel;
   /* GOT base offset.  */
   bfd_vma got0;
   /* Location of the first non-lazy PLT entry, i.e., the number of
@@ -837,15 +829,15 @@ struct frvfdpic_elf_link_hash_table
   == FRV_ELF_DATA ? ((struct frvfdpic_elf_link_hash_table *) ((p)->hash)) : NULL)
 
 #define frvfdpic_got_section(info) \
-  (frvfdpic_hash_table (info)->sgot)
+  (frvfdpic_hash_table (info)->elf.sgot)
 #define frvfdpic_gotrel_section(info) \
-  (frvfdpic_hash_table (info)->sgotrel)
+  (frvfdpic_hash_table (info)->elf.srelgot)
 #define frvfdpic_gotfixup_section(info) \
   (frvfdpic_hash_table (info)->sgotfixup)
 #define frvfdpic_plt_section(info) \
-  (frvfdpic_hash_table (info)->splt)
+  (frvfdpic_hash_table (info)->elf.splt)
 #define frvfdpic_pltrel_section(info) \
-  (frvfdpic_hash_table (info)->spltrel)
+  (frvfdpic_hash_table (info)->elf.srelplt)
 #define frvfdpic_relocs_info(info) \
   (frvfdpic_hash_table (info)->relocs_info)
 #define frvfdpic_got_initial_offset(info) \
@@ -1384,7 +1376,7 @@ _frvfdpic_emit_got_relocs_plt_entries (s
       /* If we're linking an executable at a fixed address, we can
 	 omit the dynamic relocation as long as the symbol is local to
 	 this module.  */
-      if (info->executable && !info->pie
+      if (bfd_link_pde (info)
 	  && (entry->symndx != -1
 	      || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
@@ -1439,7 +1431,7 @@ _frvfdpic_emit_got_relocs_plt_entries (s
 	  if (entry->symndx == -1
 	      && ! FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)
 	      && FRVFDPIC_SYM_LOCAL (info, entry->d.h)
-	      && !(info->executable && !info->pie))
+	      && !bfd_link_pde (info))
 	    {
 	      reloc = R_FRV_FUNCDESC;
 	      idx = elf_section_data (entry->d.h->root.u.def.section
@@ -1482,7 +1474,7 @@ _frvfdpic_emit_got_relocs_plt_entries (s
 	     dynamic symbol entry for the got section, so idx will be
 	     zero, which means we can and should compute the address
 	     of the private descriptor ourselves.  */
-	  if (info->executable && !info->pie
+	  if (bfd_link_pde (info)
 	      && (entry->symndx != -1
 		  || FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)))
 	    {
@@ -1545,7 +1537,7 @@ _frvfdpic_emit_got_relocs_plt_entries (s
       /* If we're linking an executable at a fixed address, we can
 	 omit the dynamic relocation as long as the symbol is local to
 	 this module.  */
-      if (info->executable && !info->pie
+      if (bfd_link_pde (info)
 	  && (entry->symndx != -1 || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
 	  if (sec)
@@ -1593,7 +1585,9 @@ _frvfdpic_emit_got_relocs_plt_entries (s
 
       /* If we've omitted the dynamic relocation, just emit the fixed
 	 addresses of the symbol and of the local GOT base offset.  */
-      if (info->executable && !info->pie && sec && sec->output_section)
+      if (bfd_link_pde (info)
+	  && sec
+	  && sec->output_section)
 	{
 	  lowword = ad;
 	  highword = frvfdpic_got_section (info)->output_section->vma
@@ -1768,14 +1762,14 @@ _frvfdpic_emit_got_relocs_plt_entries (s
 
       /* *ABS*+addend is special for TLS relocations, use only the
 	 addend.  */
-      if (info->executable
+      if (bfd_link_executable (info)
 	  && idx == 0
 	  && (bfd_is_abs_section (sec)
 	      || bfd_is_und_section (sec)))
 	;
       /* If we're linking an executable, we can entirely omit the
 	 dynamic relocation if the symbol is local to this module.  */
-      else if (info->executable
+      else if (bfd_link_executable (info)
 	       && (entry->symndx != -1
 		   || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
@@ -1841,10 +1835,10 @@ _frvfdpic_emit_got_relocs_plt_entries (s
       /* If we didn't set up a TLS offset entry, but we're linking an
 	 executable and the symbol binds locally, we can use the
 	 module offset in the TLS descriptor in relaxations.  */
-      if (info->executable && ! entry->tlsoff_entry)
+      if (bfd_link_executable (info) && ! entry->tlsoff_entry)
 	entry->tlsoff_entry = entry->tlsdesc_entry + 4;
 
-      if (info->executable && !info->pie
+      if (bfd_link_pde (info)
 	  && ((idx == 0
 	       && (bfd_is_abs_section (sec)
 		   || bfd_is_und_section (sec)))
@@ -1943,7 +1937,7 @@ _frvfdpic_emit_got_relocs_plt_entries (s
       bfd_byte *plt_code = frvfdpic_plt_section (info)->contents
 	+ entry->tlsplt_entry;
 
-      if (info->executable
+      if (bfd_link_executable (info)
 	  && (entry->symndx != -1
 	      || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
 	{
@@ -2559,6 +2553,7 @@ frv_info_to_howto_rela (bfd *abfd ATTRIB
     default:
       if (r_type >= (unsigned int) R_FRV_max)
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: invalid FRV reloc number: %d"), abfd, r_type);
 	  r_type = 0;
 	}
@@ -2666,7 +2661,7 @@ elf32_frv_relocate_section (bfd *output_
   Elf_Internal_Rela *relend;
   unsigned isec_segment, got_segment, plt_segment, gprel_segment, tls_segment,
     check_segment[2];
-  int silence_segment_error = !(info->shared || info->pie);
+  int silence_segment_error = !bfd_link_pic (info);
   unsigned long insn;
 
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
@@ -2754,7 +2749,7 @@ elf32_frv_relocate_section (bfd *output_
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (r_type != R_FRV_TLSMOFF
@@ -2773,6 +2768,7 @@ elf32_frv_relocate_section (bfd *output_
 	case R_FRV_32:
 	  if (! IS_FDPIC (output_bfd))
 	    goto non_fdpic;
+	  /* Fall through.  */
 
 	case R_FRV_GOT12:
 	case R_FRV_GOTHI:
@@ -2823,6 +2819,7 @@ elf32_frv_relocate_section (bfd *output_
 						      rel->r_addend))
 	    {
 	      info->callbacks->einfo
+		/* xgettext:c-format */
 		(_("%H: relocation to `%s+%v'"
 		   " may have caused the error above\n"),
 		 input_bfd, input_section, rel->r_offset, name, rel->r_addend);
@@ -2880,10 +2877,10 @@ elf32_frv_relocate_section (bfd *output_
 	  {
 
 #define LOCAL_EXEC_P(info, picrel) \
-  ((info)->executable \
+  (bfd_link_executable (info) \
    && (picrel->symndx != -1 || FRVFDPIC_SYM_LOCAL ((info), (picrel)->d.h)))
 #define INITIAL_EXEC_P(info, picrel) \
-  (((info)->executable || (info)->flags & DF_STATIC_TLS) \
+  ((bfd_link_executable (info)|| (info)->flags & DF_STATIC_TLS) \
    && (picrel)->tlsoff_entry)
 
 #define IN_RANGE_FOR_OFST12_P(value) \
@@ -3520,7 +3517,7 @@ elf32_frv_relocate_section (bfd *output_
 		   section+offset.  */
 		if (h && ! FRVFDPIC_FUNCDESC_LOCAL (info, h)
 		    && FRVFDPIC_SYM_LOCAL (info, h)
-		    && !(info->executable && !info->pie))
+		    && !bfd_link_pde (info))
 		  {
 		    dynindx = elf_section_data (h->root.u.def.section
 						->output_section)->dynindx;
@@ -3558,7 +3555,7 @@ elf32_frv_relocate_section (bfd *output_
 		   dynamic symbol entry for the got section, so idx will
 		   be zero, which means we can and should compute the
 		   address of the private descriptor ourselves.  */
-		if (info->executable && !info->pie
+		if (bfd_link_pde (info)
 		    && (!h || FRVFDPIC_FUNCDESC_LOCAL (info, h)))
 		  {
 		    addend += frvfdpic_got_section (info)->output_section->vma;
@@ -3680,7 +3677,7 @@ elf32_frv_relocate_section (bfd *output_
 	       can omit the dynamic relocation as long as the symbol
 	       is defined in the current link unit (which is implied
 	       by its output section not being NULL).  */
-	    if (info->executable && !info->pie
+	    if (bfd_link_pde (info)
 		&& (!h || FRVFDPIC_SYM_LOCAL (info, h)))
 	      {
 		if (osec)
@@ -3769,7 +3766,7 @@ elf32_frv_relocate_section (bfd *output_
 		/* If we've omitted the dynamic relocation, just emit
 		   the fixed addresses of the symbol and of the local
 		   GOT base offset.  */
-		if (info->executable && !info->pie
+		if (bfd_link_pde (info)
 		    && (!h || FRVFDPIC_SYM_LOCAL (info, h)))
 		  bfd_put_32 (output_bfd,
 			      frvfdpic_got_section (info)->output_section->vma
@@ -3909,10 +3906,11 @@ elf32_frv_relocate_section (bfd *output_
 		   && picrel->d.h->root.type == bfd_link_hash_undefined))
 	    {
 	      info->callbacks->einfo
+		/* xgettext:c-format */
 		(_("%H: reloc against `%s' references a different segment\n"),
 		 input_bfd, input_section, rel->r_offset, name);
 	    }
-	  if (!silence_segment_error && (info->shared || info->pie))
+	  if (!silence_segment_error && bfd_link_pic (info))
 	    return FALSE;
 	  elf_elfheader (output_bfd)->e_flags |= EF_FRV_PIC;
 	}
@@ -4029,13 +4027,13 @@ elf32_frv_relocate_section (bfd *output_
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -4059,13 +4057,11 @@ elf32_frv_relocate_section (bfd *output_
 	  if (msg)
 	    {
 	      info->callbacks->einfo
+		/* xgettext:c-format */
 		(_("%H: reloc against `%s': %s\n"),
 		 input_bfd, input_section, rel->r_offset, name, msg);
 	      return FALSE;
 	    }
-
-	  if (! r)
-	    return FALSE;
 	}
     }
 
@@ -4106,7 +4102,7 @@ elf32_frv_add_symbol_hook (bfd *abfd,
 			   bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && (int)sym->st_size <= (int)bfd_get_gp_size (abfd))
     {
       /* Common symbols less than or equal to -G nn bytes are
@@ -4171,7 +4167,7 @@ _frv_create_got_section (bfd *abfd, stru
   int offset;
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
+  s = elf_hash_table (info)->sgot;
   if (s != NULL)
     return TRUE;
 
@@ -4186,18 +4182,11 @@ _frv_create_got_section (bfd *abfd, stru
   pltflags = flags;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
+  elf_hash_table (info)->sgot = s;
   if (s == NULL
       || !bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (bed->want_got_plt)
-    {
-      s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
-      if (s == NULL
-	  || !bfd_set_section_alignment (abfd, s, ptralign))
-	return FALSE;
-    }
-
   if (bed->want_got_sym)
     {
       /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
@@ -4222,7 +4211,6 @@ _frv_create_got_section (bfd *abfd, stru
      data for the got.  */
   if (IS_FDPIC (abfd))
     {
-      frvfdpic_got_section (info) = s;
       frvfdpic_relocs_info (info) = htab_try_create (1,
 						     frvfdpic_relocs_info_hash,
 						     frvfdpic_relocs_info_eq,
@@ -4232,12 +4220,11 @@ _frv_create_got_section (bfd *abfd, stru
 
       s = bfd_make_section_anyway_with_flags (abfd, ".rel.got",
 					      (flags | SEC_READONLY));
+      elf_hash_table (info)->srelgot = s;
       if (s == NULL
 	  || ! bfd_set_section_alignment (abfd, s, 2))
 	return FALSE;
 
-      frvfdpic_gotrel_section (info) = s;
-
       /* Machine-specific.  */
       s = bfd_make_section_anyway_with_flags (abfd, ".rofixup",
 					      (flags | SEC_READONLY));
@@ -4371,7 +4358,7 @@ elf32_frvfdpic_create_dynamic_sections (
      be needed, we can discard it later.  We will never need this
      section when generating a shared object, since they do not use
      copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -4508,7 +4495,7 @@ _frvfdpic_count_relocs_fixups (struct fr
 {
   bfd_vma relocs = 0, fixups = 0, tlsrets = 0;
 
-  if (!dinfo->info->executable || dinfo->info->pie)
+  if (!bfd_link_pde (dinfo->info))
     {
       relocs = entry->relocs32 + entry->relocsfd + entry->relocsfdv
 	+ entry->relocstlsd;
@@ -4520,7 +4507,7 @@ _frvfdpic_count_relocs_fixups (struct fr
 	 emit dynamic relocations even for local symbols, because we
 	 don't know the module id the library is going to get at
 	 run-time, nor its TLS base offset.  */
-      if (!dinfo->info->executable
+      if (!bfd_link_executable (dinfo->info)
 	  || (entry->symndx == -1
 	      && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)))
 	relocs += entry->relocstlsoff;
@@ -4579,7 +4566,7 @@ _frvfdpic_relax_tls_entries (struct frvf
 {
   bfd_boolean changed = ! relaxing;
 
-  BFD_ASSERT (dinfo->info->executable
+  BFD_ASSERT (bfd_link_executable (dinfo->info)
 	      || (dinfo->info->flags & DF_STATIC_TLS));
 
   if (entry->tlsdesc12 || entry->tlsdesclos || entry->tlsdeschilo)
@@ -4598,7 +4585,7 @@ _frvfdpic_relax_tls_entries (struct frvf
 	 to GOTTLSOFF, we must keep the GOT entry in range.  We know
 	 it has to fit because we'll be trading the 4 words of hte TLS
 	 descriptor for a single word in the same range.  */
-      if (! dinfo->info->executable
+      if (! bfd_link_executable (dinfo->info)
 	  || (entry->symndx == -1
 	      && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)))
 	{
@@ -4622,7 +4609,7 @@ _frvfdpic_relax_tls_entries (struct frvf
      do better than this.  */
   if ((entry->tlsplt
        || entry->tlsoff12 || entry->tlsofflos || entry->tlsoffhilo)
-      && dinfo->info->executable && relaxing
+      && bfd_link_executable (dinfo->info) && relaxing
       && ((entry->symndx == -1
 	   && FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)
 	   /* The above may hold for an undefweak TLS symbol, so make
@@ -4638,7 +4625,7 @@ _frvfdpic_relax_tls_entries (struct frvf
 			    + 32768) < (bfd_vma)65536))
 	  || (entry->symndx != -1
 	      && (elf_hash_table (dinfo->info)->tls_sec->size
-		  + abs (entry->addend) < 32768 + FRVFDPIC_TLS_BIAS))))
+		  + entry->addend < 32768 + FRVFDPIC_TLS_BIAS))))
     {
       if (! changed)
 	{
@@ -4695,7 +4682,8 @@ _frvfdpic_count_got_plt_entries (void **
 
   _frvfdpic_count_nontls_entries (entry, dinfo);
 
-  if (dinfo->info->executable || (dinfo->info->flags & DF_STATIC_TLS))
+  if (bfd_link_executable (dinfo->info)
+      || (dinfo->info->flags & DF_STATIC_TLS))
     _frvfdpic_relax_tls_entries (entry, dinfo, FALSE);
   else
     {
@@ -5088,7 +5076,7 @@ _frvfdpic_assign_plt_entries (void **ent
       entry->tlsplt_entry
 	= frvfdpic_plt_section (dinfo->g.info)->size;
 
-      if (dinfo->g.info->executable
+      if (bfd_link_executable (dinfo->g.info)
 	  && (entry->symndx != -1
 	      || FRVFDPIC_SYM_LOCAL (dinfo->g.info, entry->d.h)))
 	{
@@ -5439,7 +5427,7 @@ elf32_frvfdpic_size_dynamic_sections (bf
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -5498,7 +5486,7 @@ static bfd_boolean
 elf32_frvfdpic_always_size_sections (bfd *output_bfd,
 				     struct bfd_link_info *info)
 {
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && !bfd_elf_stack_segment_size (output_bfd, info,
 				      "__stacksize", DEFAULT_STACK_SIZE))
     return FALSE;
@@ -5640,7 +5628,7 @@ elf32_frvfdpic_relax_section (bfd *abfd 
 {
   struct _frvfdpic_dynamic_got_plt_info gpinfo;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     (*info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -5653,7 +5641,7 @@ elf32_frvfdpic_relax_section (bfd *abfd 
 
   /* We can only relax when linking the main executable or a library
      that can't be dlopened.  */
-  if (! info->executable && ! (info->flags & DF_STATIC_TLS))
+  if (! bfd_link_executable (info) && ! (info->flags & DF_STATIC_TLS))
     return TRUE;
 
   /* If there isn't a TLS section for this binary, we can't do
@@ -6028,7 +6016,7 @@ elf32_frv_check_relocs (bfd *abfd,
   bfd *dynobj;
   struct frvfdpic_relocs_info *picrel;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -6266,6 +6254,7 @@ elf32_frv_check_relocs (bfd *abfd,
 	default:
 	bad_reloc:
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%B: unsupported relocation type %i\n"),
 	     abfd, ELF32_R_TYPE (rel->r_info));
 	  return FALSE;
@@ -6348,8 +6337,9 @@ frv_elf_arch_extension_p (flagword base,
    object file when linking.  */
 
 static bfd_boolean
-frv_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, old_partial;
   flagword new_flags, new_partial;
   bfd_boolean error = FALSE;
@@ -6364,9 +6354,10 @@ frv_elf_merge_private_bfd_data (bfd *ibf
     new_flags &= ~EF_FRV_PIC;
 
 #ifdef DEBUG
-  (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
-			 old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
-			 bfd_get_filename (ibfd));
+  _bfd_error_handler
+    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+     old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
+     bfd_get_filename (ibfd));
 #endif
 
   if (!elf_flags_init (obfd))			/* First call, no flags set.  */
@@ -6514,7 +6505,8 @@ frv_elf_merge_private_bfd_data (bfd *ibf
 	      old_flags &= ~ EF_FRV_PIC_FLAGS;
 #ifndef FRV_NO_PIC_ERROR
 	      error = TRUE;
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: compiled with %s and linked with modules that use non-pic relocations"),
 		 bfd_get_filename (ibfd),
 		 (new_flags & EF_FRV_BIGPIC) ? "-fPIC" : "-fpic");
@@ -6567,7 +6559,8 @@ frv_elf_merge_private_bfd_data (bfd *ibf
       if (new_opt[0])
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: compiled with %s and linked with modules compiled with %s"),
 	     bfd_get_filename (ibfd), new_opt, old_opt);
 	}
@@ -6579,7 +6572,8 @@ frv_elf_merge_private_bfd_data (bfd *ibf
 	{
 	  old_flags |= new_partial;
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"),
 	     bfd_get_filename (ibfd), (long)new_partial, (long)old_partial);
 	}
@@ -6600,11 +6594,11 @@ frv_elf_merge_private_bfd_data (bfd *ibf
     {
       error = TRUE;
       if (IS_FDPIC (obfd))
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%s: cannot link non-fdpic object file into fdpic executable"),
 	   bfd_get_filename (ibfd));
       else
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%s: cannot link fdpic object file into non-fdpic executable"),
 	   bfd_get_filename (ibfd));
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ft32.c ./bfd/elf32-ft32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ft32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-ft32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,8 +1,8 @@
 /* ft32-specific support for 32-bit ELF.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Copied from elf32-moxie.c which is..
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -160,7 +160,7 @@ struct ft32_reloc_map
 static const struct ft32_reloc_map ft32_reloc_map [] =
 {
   { BFD_RELOC_NONE,            R_FT32_NONE },
-  { BFD_RELOC_32,              R_FT32_20 },
+  { BFD_RELOC_32,              R_FT32_32 },
   { BFD_RELOC_16,              R_FT32_16 },
   { BFD_RELOC_8,               R_FT32_8 },
   { BFD_RELOC_FT32_10,           R_FT32_10 },
@@ -306,7 +306,7 @@ ft32_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -320,15 +320,14 @@ ft32_elf_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -349,11 +348,8 @@ ft32_elf_relocate_section (bfd *output_b
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-gen.c ./bfd/elf32-gen.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-gen.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-gen.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -65,6 +65,7 @@ check_for_relocs (bfd * abfd, asection *
       Elf_Internal_Ehdr *ehdrp;
 
       ehdrp = elf_elfheader (abfd);
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: Relocations in generic ELF (EM: %d)"),
 			  abfd, ehdrp->e_machine);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-h8300.c ./bfd/elf32-h8300.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-h8300.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-h8300.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Renesas H8/300 ELF binaries.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -33,7 +33,8 @@ static void elf32_h8_info_to_howto_rel
 static unsigned long elf32_h8_mach (flagword);
 static void elf32_h8_final_write_processing (bfd *, bfd_boolean);
 static bfd_boolean elf32_h8_object_p (bfd *);
-static bfd_boolean elf32_h8_merge_private_bfd_data (bfd *, bfd *);
+static bfd_boolean elf32_h8_merge_private_bfd_data
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean elf32_h8_relax_section
   (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
 static bfd_boolean elf32_h8_relax_delete_bytes
@@ -480,7 +481,7 @@ elf32_h8_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
@@ -507,18 +508,14 @@ elf32_h8_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -538,10 +535,8 @@ elf32_h8_relocate_section (bfd *output_b
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -646,8 +641,10 @@ elf32_h8_object_p (bfd *abfd)
    time is the architecture/machine information.  */
 
 static bfd_boolean
-elf32_h8_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
+
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
     return TRUE;
@@ -707,7 +704,7 @@ elf32_h8_relax_section (bfd *abfd, asect
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -742,7 +739,7 @@ elf32_h8_relax_section (bfd *abfd, asect
 	 some long jumps created by the compiler.  */
       if (irel != internal_relocs)
 	last_reloc = irel - 1;
-      
+
       switch(ELF32_R_TYPE (irel->r_info))
 	{
 	case R_H8_DIR24R8:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-hppa.c ./bfd/elf32-hppa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-hppa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-hppa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HP PA-RISC ELF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Original code by
 	Center for Software Science
@@ -270,18 +270,10 @@ struct elf32_hppa_link_hash_table
 
   /* Assorted information used by elf32_hppa_size_stubs.  */
   unsigned int bfd_count;
-  int top_index;
+  unsigned int top_index;
   asection **input_list;
   Elf_Internal_Sym **all_local_syms;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Used during a final link to store the base of the text and data
      segments so that we can perform SEGREL relocations.  */
   bfd_vma text_segment_base;
@@ -455,6 +447,18 @@ elf32_hppa_link_hash_table_create (bfd *
   return &htab->etab.root;
 }
 
+/* Initialize the linker stubs BFD so that we can use it for linker
+   created dynamic sections.  */
+
+void
+elf32_hppa_init_stub_bfd (bfd *abfd, struct bfd_link_info *info)
+{
+  struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
+
+  elf_elfheader (abfd)->e_ident[EI_CLASS] = ELFCLASS32;
+  htab->etab.dynobj = abfd;
+}
+
 /* Build a name for an entry in the stub hash table.  */
 
 static char *
@@ -579,9 +583,9 @@ hppa_add_stub (const char *stub_name,
 				      TRUE, FALSE);
   if (hsh == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-			     section->owner,
-			     stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+			  section->owner, stub_name);
       return NULL;
     }
 
@@ -609,7 +613,7 @@ hppa_type_of_stub (asection *input_sec,
       && hh->eh.plt.offset != (bfd_vma) -1
       && hh->eh.dynindx != -1
       && !hh->plabel
-      && (info->shared
+      && (bfd_link_pic (info)
 	  || !hh->eh.def_regular
 	  || hh->eh.root.type == bfd_link_hash_defweak))
     {
@@ -768,9 +772,9 @@ hppa_build_one_stub (struct bfd_hash_ent
 
       off &= ~ (bfd_vma) 1;
       sym_value = (off
-		   + htab->splt->output_offset
-		   + htab->splt->output_section->vma
-		   - elf_gp (htab->splt->output_section->owner));
+		   + htab->etab.splt->output_offset
+		   + htab->etab.splt->output_section->vma
+		   - elf_gp (htab->etab.splt->output_section->owner));
 
       insn = ADDIL_DP;
 #if R19_STUBS
@@ -830,7 +834,8 @@ hppa_build_one_stub (struct bfd_hash_ent
 	  && (!htab->has_22bit_branch
 	      || sym_value - 8 + (1 << (22 + 1)) >= (1 << (22 + 2))))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
 	     hsh->target_section->owner,
 	     stub_sec,
@@ -982,22 +987,13 @@ elf32_hppa_create_dynamic_sections (bfd 
   htab = hppa_link_hash_table (info);
   if (htab == NULL)
     return FALSE;
-  if (htab->splt != NULL)
+  if (htab->etab.splt != NULL)
     return TRUE;
 
   /* Call the generic code to do most of the work.  */
   if (! _bfd_elf_create_dynamic_sections (abfd, info))
     return FALSE;
 
-  htab->splt = bfd_get_linker_section (abfd, ".plt");
-  htab->srelplt = bfd_get_linker_section (abfd, ".rela.plt");
-
-  htab->sgot = bfd_get_linker_section (abfd, ".got");
-  htab->srelgot = bfd_get_linker_section (abfd, ".rela.got");
-
-  htab->sdynbss = bfd_get_linker_section (abfd, ".dynbss");
-  htab->srelbss = bfd_get_linker_section (abfd, ".rela.bss");
-
   /* hppa-linux needs _GLOBAL_OFFSET_TABLE_ to be visible from the main
      application, because __canonicalize_funcptr_for_compare needs it.  */
   eh = elf_hash_table (info)->hgot;
@@ -1060,19 +1056,20 @@ elf32_hppa_copy_indirect_symbol (struct 
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      eh_dir->ref_dynamic |= eh_ind->ref_dynamic;
+      if (eh_dir->versioned != versioned_hidden)
+	eh_dir->ref_dynamic |= eh_ind->ref_dynamic;
       eh_dir->ref_regular |= eh_ind->ref_regular;
       eh_dir->ref_regular_nonweak |= eh_ind->ref_regular_nonweak;
       eh_dir->needs_plt |= eh_ind->needs_plt;
     }
   else
     {
-      if (eh_ind->root.type == bfd_link_hash_indirect
-          && eh_dir->got.refcount <= 0)
-        {
-          hh_dir->tls_type = hh_ind->tls_type;
-          hh_ind->tls_type = GOT_UNKNOWN;
-        }
+      if (eh_ind->root.type == bfd_link_hash_indirect)
+	{
+	  hh_dir->plabel |= hh_ind->plabel;
+	  hh_dir->tls_type |= hh_ind->tls_type;
+	  hh_ind->tls_type = GOT_UNKNOWN;
+	}
 
       _bfd_elf_link_hash_copy_indirect (info, eh_dir, eh_ind);
     }
@@ -1137,7 +1134,7 @@ elf32_hppa_check_relocs (bfd *abfd,
   asection *sreloc;
   int tls_type = GOT_UNKNOWN, old_tls_type = GOT_UNKNOWN;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = hppa_link_hash_table (info);
@@ -1266,9 +1263,10 @@ elf32_hppa_check_relocs (bfd *abfd,
 	case R_PARISC_DPREL14F: /* Used for gp rel data load/store.  */
 	case R_PARISC_DPREL14R:
 	case R_PARISC_DPREL21L:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s can not be used when making a shared object; recompile with -fPIC"),
 		 abfd,
 		 elf_hppa_howto_table[r_type].name);
@@ -1312,7 +1310,7 @@ elf32_hppa_check_relocs (bfd *abfd,
 
 	case R_PARISC_TLS_IE21L:
 	case R_PARISC_TLS_IE14R:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
             info->flags |= DF_STATIC_TLS;
 	  need_entry = NEED_GOT;
 	  break;
@@ -1345,10 +1343,8 @@ elf32_hppa_check_relocs (bfd *abfd,
 
 	  /* Allocate space for a GOT entry, as well as a dynamic
 	     relocation for this entry.  */
-	  if (htab->sgot == NULL)
+	  if (htab->etab.sgot == NULL)
 	    {
-	      if (htab->etab.dynobj == NULL)
-		htab->etab.dynobj = abfd;
 	      if (!elf32_hppa_create_dynamic_sections (htab->etab.dynobj, info))
 		return FALSE;
 	    }
@@ -1432,7 +1428,7 @@ elf32_hppa_check_relocs (bfd *abfd,
 	  /* Flag this symbol as having a non-got, non-plt reference
 	     so that we generate copy relocs if it turns out to be
 	     dynamic.  */
-	  if (hh != NULL && !info->shared)
+	  if (hh != NULL && !bfd_link_pic (info))
 	    hh->eh.non_got_ref = 1;
 
 	  /* If we are creating a shared library then we need to copy
@@ -1463,15 +1459,15 @@ elf32_hppa_check_relocs (bfd *abfd,
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (IS_ABSOLUTE_RELOC (r_type)
 		   || (hh != NULL
-		       && (!info->symbolic
+		       && (!SYMBOLIC_BIND (info, &hh->eh)
 			   || hh->eh.root.type == bfd_link_hash_defweak
 			   || !hh->eh.def_regular))))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && hh != NULL
 		  && (hh->eh.root.type == bfd_link_hash_defweak
@@ -1484,9 +1480,6 @@ elf32_hppa_check_relocs (bfd *abfd,
 		 this reloc.  */
 	      if (sreloc == NULL)
 		{
-		  if (htab->etab.dynobj == NULL)
-		    htab->etab.dynobj = abfd;
-
 		  sreloc = _bfd_elf_make_dynamic_reloc_section
 		    (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ TRUE);
 
@@ -1589,7 +1582,7 @@ elf32_hppa_gc_sweep_hook (bfd *abfd,
   const Elf_Internal_Rela *rela, *relend;
   struct elf32_hppa_link_hash_table *htab;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = hppa_link_hash_table (info);
@@ -1801,7 +1794,7 @@ elf32_hppa_adjust_dynamic_symbol (struct
 				  struct elf_link_hash_entry *eh)
 {
   struct elf32_hppa_link_hash_table *htab;
-  asection *sec;
+  asection *sec, *srel;
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later.  */
@@ -1819,7 +1812,7 @@ elf32_hppa_adjust_dynamic_symbol (struct
 	  || (eh->def_regular
 	      && eh->root.type != bfd_link_hash_defweak
 	      && ! hppa_elf_hash_entry (eh)->plabel
-	      && (!info->shared || info->symbolic)))
+	      && (!bfd_link_pic (info) || SYMBOLIC_BIND (info, eh))))
 	{
 	  /* The .plt entry is not needed when:
 	     a) Garbage collection has removed all references to the
@@ -1860,7 +1853,7 @@ elf32_hppa_adjust_dynamic_symbol (struct
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -1907,17 +1900,40 @@ elf32_hppa_adjust_dynamic_symbol (struct
   /* We must generate a COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((eh->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      sec = htab->etab.sdynrelro;
+      srel = htab->etab.sreldynrelro;
+    }
+  else
+    {
+      sec = htab->etab.sdynbss;
+      srel = htab->etab.srelbss;
+    }
   if ((eh->root.u.def.section->flags & SEC_ALLOC) != 0 && eh->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      srel->size += sizeof (Elf32_External_Rela);
       eh->needs_copy = 1;
     }
 
-  sec = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, eh, sec);
 }
 
+/* Make an undefined weak symbol dynamic.  */
+
+static bfd_boolean
+ensure_undef_weak_dynamic (struct bfd_link_info *info,
+			   struct elf_link_hash_entry *eh)
+{
+  if (eh->dynindx == -1
+      && !eh->forced_local
+      && eh->type != STT_PARISC_MILLI
+      && eh->root.type == bfd_link_hash_undefweak
+      && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT)
+    return bfd_elf_link_record_dynamic_symbol (info, eh);
+  return TRUE;
+}
+
 /* Allocate space in the .plt for entries that won't have relocations.
    ie. plabel entries.  */
 
@@ -1941,17 +1957,10 @@ allocate_plt_static (struct elf_link_has
   if (htab->etab.dynamic_sections_created
       && eh->plt.refcount > 0)
     {
-      /* Make sure this symbol is output as a dynamic symbol.
-	 Undefined weak syms won't yet be marked as dynamic.  */
-      if (eh->dynindx == -1
-	  && !eh->forced_local
-	  && eh->type != STT_PARISC_MILLI)
-	{
-	  if (! bfd_elf_link_record_dynamic_symbol (info, eh))
-	    return FALSE;
-	}
+      if (!ensure_undef_weak_dynamic (info, eh))
+	return FALSE;
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, eh))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), eh))
 	{
 	  /* Allocate these later.  From this point on, h->plabel
 	     means that the plt entry is only used by a plabel.
@@ -1964,9 +1973,11 @@ allocate_plt_static (struct elf_link_has
 	{
 	  /* Make an entry in the .plt section for plabel references
 	     that won't have a .plt entry for other reasons.  */
-	  sec = htab->splt;
+	  sec = htab->etab.splt;
 	  eh->plt.offset = sec->size;
 	  sec->size += PLT_ENTRY_SIZE;
+	  if (bfd_link_pic (info))
+	    htab->etab.srelplt->size += sizeof (Elf32_External_Rela);
 	}
       else
 	{
@@ -2012,28 +2023,21 @@ allocate_dynrelocs (struct elf_link_hash
       && eh->plt.refcount > 0)
     {
       /* Make an entry in the .plt section.  */
-      sec = htab->splt;
+      sec = htab->etab.splt;
       eh->plt.offset = sec->size;
       sec->size += PLT_ENTRY_SIZE;
 
       /* We also need to make an entry in the .rela.plt section.  */
-      htab->srelplt->size += sizeof (Elf32_External_Rela);
+      htab->etab.srelplt->size += sizeof (Elf32_External_Rela);
       htab->need_plt_stub = 1;
     }
 
   if (eh->got.refcount > 0)
     {
-      /* Make sure this symbol is output as a dynamic symbol.
-	 Undefined weak syms won't yet be marked as dynamic.  */
-      if (eh->dynindx == -1
-	  && !eh->forced_local
-	  && eh->type != STT_PARISC_MILLI)
-	{
-	  if (! bfd_elf_link_record_dynamic_symbol (info, eh))
-	    return FALSE;
-	}
+      if (!ensure_undef_weak_dynamic (info, eh))
+	return FALSE;
 
-      sec = htab->sgot;
+      sec = htab->etab.sgot;
       eh->got.offset = sec->size;
       sec->size += GOT_ENTRY_SIZE;
       /* R_PARISC_TLS_GD* needs two GOT entries */
@@ -2042,15 +2046,15 @@ allocate_dynrelocs (struct elf_link_hash
       else if ((hh->tls_type & GOT_TLS_GD) == GOT_TLS_GD)
       	sec->size += GOT_ENTRY_SIZE;
       if (htab->etab.dynamic_sections_created
-	  && (info->shared
+	  && (bfd_link_pic (info)
 	      || (eh->dynindx != -1
 		  && !eh->forced_local)))
 	{
-	  htab->srelgot->size += sizeof (Elf32_External_Rela);
+	  htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
 	  if ((hh->tls_type & (GOT_TLS_GD | GOT_TLS_IE)) == (GOT_TLS_GD | GOT_TLS_IE))
-	    htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
+	    htab->etab.srelgot->size += 2 * sizeof (Elf32_External_Rela);
 	  else if ((hh->tls_type & GOT_TLS_GD) == GOT_TLS_GD)
-	    htab->srelgot->size += sizeof (Elf32_External_Rela);
+	    htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
 	}
     }
   else
@@ -2064,7 +2068,7 @@ allocate_dynrelocs (struct elf_link_hash
      defined in a regular object.  For the normal shared case, discard
      space for relocs that have become local due to symbol visibility
      changes.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
 #if RELATIVE_DYNRELOCS
       if (SYMBOL_CALLS_LOCAL (info, eh))
@@ -2091,14 +2095,8 @@ allocate_dynrelocs (struct elf_link_hash
 	  if (ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT)
 	    hh->dyn_relocs = NULL;
 
-	  /* Make sure undefined weak symbols are output as a dynamic
-	     symbol in PIEs.  */
-	  else if (eh->dynindx == -1
-		   && !eh->forced_local)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, eh))
-		return FALSE;
-	    }
+	  else if (!ensure_undef_weak_dynamic (info, eh))
+	    return FALSE;
 	}
     }
   else
@@ -2115,15 +2113,8 @@ allocate_dynrelocs (struct elf_link_hash
 		   && (eh->root.type == bfd_link_hash_undefweak
 		       || eh->root.type == bfd_link_hash_undefined))))
 	{
-	  /* Make sure this symbol is output as a dynamic symbol.
-	     Undefined weak syms won't yet be marked as dynamic.  */
-	  if (eh->dynindx == -1
-	      && !eh->forced_local
-	      && eh->type != STT_PARISC_MILLI)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, eh))
-		return FALSE;
-	    }
+	  if (!ensure_undef_weak_dynamic (info, eh))
+	    return FALSE;
 
 	  /* If that succeeded, we know we'll be keeping all the
 	     relocs.  */
@@ -2215,7 +2206,7 @@ elf32_hppa_size_dynamic_sections (bfd *o
   if (htab->etab.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  sec = bfd_get_linker_section (dynobj, ".interp");
 	  if (sec == NULL)
@@ -2281,8 +2272,8 @@ elf32_hppa_size_dynamic_sections (bfd *o
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
       local_tls_type = hppa_elf_local_got_tls_type (ibfd);
-      sec = htab->sgot;
-      srel = htab->srelgot;
+      sec = htab->etab.sgot;
+      srel = htab->etab.srelgot;
       for (; local_got < end_local_got; ++local_got)
 	{
 	  if (*local_got > 0)
@@ -2293,7 +2284,7 @@ elf32_hppa_size_dynamic_sections (bfd *o
 		sec->size += 2 * GOT_ENTRY_SIZE;
 	      else if ((*local_tls_type & GOT_TLS_GD) == GOT_TLS_GD)
 		sec->size += GOT_ENTRY_SIZE;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 	        {
 		  srel->size += sizeof (Elf32_External_Rela);
 		  if ((*local_tls_type & (GOT_TLS_GD | GOT_TLS_IE)) == (GOT_TLS_GD | GOT_TLS_IE))
@@ -2318,15 +2309,15 @@ elf32_hppa_size_dynamic_sections (bfd *o
 	}
       else
 	{
-	  sec = htab->splt;
-	  srel = htab->srelplt;
+	  sec = htab->etab.splt;
+	  srel = htab->etab.srelplt;
 	  for (; local_plt < end_local_plt; ++local_plt)
 	    {
 	      if (*local_plt > 0)
 		{
 		  *local_plt = sec->size;
 		  sec->size += PLT_ENTRY_SIZE;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srel->size += sizeof (Elf32_External_Rela);
 		}
 	      else
@@ -2339,9 +2330,9 @@ elf32_hppa_size_dynamic_sections (bfd *o
     {
       /* Allocate 2 got entries and 1 dynamic reloc for
          R_PARISC_TLS_DTPMOD32 relocs.  */
-      htab->tls_ldm_got.offset = htab->sgot->size;
-      htab->sgot->size += (GOT_ENTRY_SIZE * 2);
-      htab->srelgot->size += sizeof (Elf32_External_Rela);
+      htab->tls_ldm_got.offset = htab->etab.sgot->size;
+      htab->etab.sgot->size += (GOT_ENTRY_SIZE * 2);
+      htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     htab->tls_ldm_got.offset = -1;
@@ -2364,14 +2355,14 @@ elf32_hppa_size_dynamic_sections (bfd *o
       if ((sec->flags & SEC_LINKER_CREATED) == 0)
 	continue;
 
-      if (sec == htab->splt)
+      if (sec == htab->etab.splt)
 	{
 	  if (htab->need_plt_stub)
 	    {
 	      /* Make space for the plt stub at the end of the .plt
 		 section.  We want this stub right at the end, up
 		 against the .got section.  */
-	      int gotalign = bfd_section_alignment (dynobj, htab->sgot);
+	      int gotalign = bfd_section_alignment (dynobj, htab->etab.sgot);
 	      int pltalign = bfd_section_alignment (dynobj, sec);
 	      bfd_size_type mask;
 
@@ -2381,8 +2372,9 @@ elf32_hppa_size_dynamic_sections (bfd *o
 	      sec->size = (sec->size + sizeof (plt_stub) + mask) & ~mask;
 	    }
 	}
-      else if (sec == htab->sgot
-	       || sec == htab->sdynbss)
+      else if (sec == htab->etab.sgot
+	       || sec == htab->etab.sdynbss
+	       || sec == htab->etab.sdynrelro)
 	;
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, sec), ".rela"))
 	{
@@ -2390,7 +2382,7 @@ elf32_hppa_size_dynamic_sections (bfd *o
 	    {
 	      /* Remember whether there are any reloc sections other
 		 than .rela.plt.  */
-	      if (sec != htab->srelplt)
+	      if (sec != htab->etab.srelplt)
 		relocs = TRUE;
 
 	      /* We use the reloc_count field as a counter if we need
@@ -2446,13 +2438,13 @@ elf32_hppa_size_dynamic_sections (bfd *o
 	 must add the entries now so that we get the correct size for
 	 the .dynamic section.  The DT_DEBUG entry is filled in by the
 	 dynamic linker and used by the debugger.  */
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->srelplt->size != 0)
+      if (htab->etab.srelplt->size != 0)
 	{
 	  if (!add_dynamic_entry (DT_PLTRELSZ, 0)
 	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
@@ -2495,7 +2487,7 @@ elf32_hppa_setup_section_lists (bfd *out
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -2722,7 +2714,7 @@ get_local_syms (bfd *output_bfd, bfd *in
 
       all_local_syms[bfd_indx] = local_syms;
 
-      if (info->shared && htab->multi_subspace)
+      if (bfd_link_pic (info) && htab->multi_subspace)
 	{
 	  struct elf_link_hash_entry **eh_syms;
 	  struct elf_link_hash_entry **eh_symend;
@@ -2782,9 +2774,9 @@ get_local_syms (bfd *output_bfd, bfd *in
 		    }
 		  else
 		    {
-		      (*_bfd_error_handler) (_("%B: duplicate export stub %s"),
-					     input_bfd,
-					     stub_name);
+		      /* xgettext:c-format */
+		      _bfd_error_handler (_("%B: duplicate export stub %s"),
+					  input_bfd, stub_name);
 		    }
 		}
 	    }
@@ -2994,7 +2986,7 @@ elf32_hppa_size_stubs
 			}
 		      else if (hh->eh.root.type == bfd_link_hash_undefweak)
 			{
-			  if (! info->shared)
+			  if (! bfd_link_pic (info))
 			    continue;
 			}
 		      else if (hh->eh.root.type == bfd_link_hash_undefined)
@@ -3046,7 +3038,7 @@ elf32_hppa_size_stubs
 		  hsh->target_value = sym_value;
 		  hsh->target_section = sym_sec;
 		  hsh->stub_type = stub_type;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      if (stub_type == hppa_stub_import)
 			hsh->stub_type = hppa_stub_import_shared;
@@ -3071,7 +3063,8 @@ elf32_hppa_size_stubs
       for (stub_sec = htab->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
-	stub_sec->size = 0;
+	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	  stub_sec->size = 0;
 
       bfd_hash_traverse (&htab->bstab, hppa_size_one_stub, htab);
 
@@ -3193,16 +3186,15 @@ elf32_hppa_build_stubs (struct bfd_link_
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
        stub_sec = stub_sec->next)
-    {
-      bfd_size_type size;
-
-      /* Allocate memory to hold the linker stubs.  */
-      size = stub_sec->size;
-      stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
-      if (stub_sec->contents == NULL && size != 0)
-	return FALSE;
-      stub_sec->size = 0;
-    }
+    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0
+	&& stub_sec->size != 0)
+      {
+	/* Allocate memory to hold the linker stubs.  */
+	stub_sec->contents = bfd_zalloc (htab->stub_bfd, stub_sec->size);
+	if (stub_sec->contents == NULL)
+	  return FALSE;
+	stub_sec->size = 0;
+      }
 
   /* Build the stubs as directed by the stub hash table.  */
   table = &htab->bstab;
@@ -3245,13 +3237,22 @@ tpoff (struct bfd_link_info *info, bfd_v
 static bfd_boolean
 elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
 {
+  struct stat buf;
+
   /* Invoke the regular ELF linker to do all the work.  */
   if (!bfd_elf_final_link (abfd, info))
     return FALSE;
 
   /* If we're producing a final executable, sort the contents of the
      unwind section.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  /* Do not attempt to sort non-regular files.  This is here
+     especially for configure scripts and kernel builds which run
+     tests with "ld [...] -o /dev/null".  */
+  if (stat (abfd->filename, &buf) != 0
+      || !S_ISREG(buf.st_mode))
     return TRUE;
 
   return elf_hppa_sort_unwind (abfd);
@@ -3329,7 +3330,7 @@ final_link_relocate (asection *input_sec
 
   /* If we are not building a shared library, convert DLTIND relocs to
      DPREL relocs.  */
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       switch (r_type)
 	{
@@ -3366,7 +3367,7 @@ final_link_relocate (asection *input_sec
 	      && hh->eh.plt.offset != (bfd_vma) -1
 	      && hh->eh.dynindx != -1
 	      && !hh->plabel
-	      && (info->shared
+	      && (bfd_link_pic (info)
 		  || !hh->eh.def_regular
 		  || hh->eh.root.type == bfd_link_hash_defweak)))
 	{
@@ -3427,7 +3428,8 @@ final_link_relocate (asection *input_sec
 		/* We must have a ldil instruction.  It's too hard to find
 		   and convert the associated add instruction, so issue an
 		   error.  */
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
 		   input_bfd,
 		   input_section,
@@ -3592,7 +3594,8 @@ final_link_relocate (asection *input_sec
   if (max_branch_offset != 0
       && value + addend + max_branch_offset >= 2*max_branch_offset)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
 	 input_bfd,
 	 input_section,
@@ -3707,7 +3710,7 @@ elf32_hppa_relocate_section (bfd *output
 				   unresolved_reloc, warned_undef,
 				   ignored);
 
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && relocation == 0
 	      && eh->root.type != bfd_link_hash_defined
 	      && eh->root.type != bfd_link_hash_defweak
@@ -3717,10 +3720,9 @@ elf32_hppa_relocate_section (bfd *output
 		  && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
 		  && eh->type == STT_PARISC_MILLI)
 		{
-		  if (! info->callbacks->undefined_symbol
-		      (info, eh_name (eh), input_bfd,
-		       input_section, rela->r_offset, FALSE))
-		    return FALSE;
+		  (*info->callbacks->undefined_symbol)
+		    (info, eh_name (eh), input_bfd,
+		     input_section, rela->r_offset, FALSE);
 		  warned_undef = TRUE;
 		}
 	    }
@@ -3733,7 +3735,7 @@ elf32_hppa_relocate_section (bfd *output
 					 elf_hppa_howto_table + r_type, 0,
 					 contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Do any required modifications to the relocation value, and
@@ -3757,7 +3759,8 @@ elf32_hppa_relocate_section (bfd *output
 
 		off = hh->eh.got.offset;
 		dyn = htab->etab.dynamic_sections_created;
-		if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+		if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						       bfd_link_pic (info),
 						       &hh->eh))
 		  {
 		    /* If we aren't going to call finish_dynamic_symbol,
@@ -3797,18 +3800,18 @@ elf32_hppa_relocate_section (bfd *output
 
 	    if (do_got)
 	      {
-		if (info->shared)
+		if (bfd_link_pic (info))
 		  {
 		    /* Output a dynamic relocation for this GOT entry.
 		       In this case it is relative to the base of the
 		       object because the symbol index is zero.  */
 		    Elf_Internal_Rela outrel;
 		    bfd_byte *loc;
-		    asection *sec = htab->srelgot;
+		    asection *sec = htab->etab.srelgot;
 
 		    outrel.r_offset = (off
-				       + htab->sgot->output_offset
-				       + htab->sgot->output_section->vma);
+				       + htab->etab.sgot->output_offset
+				       + htab->etab.sgot->output_section->vma);
 		    outrel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32);
 		    outrel.r_addend = relocation;
 		    loc = sec->contents;
@@ -3817,7 +3820,7 @@ elf32_hppa_relocate_section (bfd *output
 		  }
 		else
 		  bfd_put_32 (output_bfd, relocation,
-			      htab->sgot->contents + off);
+			      htab->etab.sgot->contents + off);
 	      }
 
 	    if (off >= (bfd_vma) -2)
@@ -3825,8 +3828,8 @@ elf32_hppa_relocate_section (bfd *output
 
 	    /* Add the base of the GOT to the relocation value.  */
 	    relocation = (off
-			  + htab->sgot->output_offset
-			  + htab->sgot->output_section->vma);
+			  + htab->etab.sgot->output_offset
+			  + htab->etab.sgot->output_section->vma);
 	  }
 	  break;
 
@@ -3849,7 +3852,8 @@ elf32_hppa_relocate_section (bfd *output
 	      if (hh != NULL)
 		{
 		  off = hh->eh.plt.offset;
-		  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared,
+		  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (1,
+							 bfd_link_pic (info),
 							 &hh->eh))
 		    {
 		      /* In a non-shared link, adjust_dynamic_symbols
@@ -3888,17 +3892,17 @@ elf32_hppa_relocate_section (bfd *output
 
 	      if (do_plt)
 		{
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      /* Output a dynamic IPLT relocation for this
 			 PLT entry.  */
 		      Elf_Internal_Rela outrel;
 		      bfd_byte *loc;
-		      asection *s = htab->srelplt;
+		      asection *s = htab->etab.srelplt;
 
 		      outrel.r_offset = (off
-					 + htab->splt->output_offset
-					 + htab->splt->output_section->vma);
+					 + htab->etab.splt->output_offset
+					 + htab->etab.splt->output_section->vma);
 		      outrel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT);
 		      outrel.r_addend = relocation;
 		      loc = s->contents;
@@ -3909,10 +3913,10 @@ elf32_hppa_relocate_section (bfd *output
 		    {
 		      bfd_put_32 (output_bfd,
 				  relocation,
-				  htab->splt->contents + off);
+				  htab->etab.splt->contents + off);
 		      bfd_put_32 (output_bfd,
-				  elf_gp (htab->splt->output_section->owner),
-				  htab->splt->contents + off + 4);
+				  elf_gp (htab->etab.splt->output_section->owner),
+				  htab->etab.splt->contents + off + 4);
 		    }
 		}
 
@@ -3930,13 +3934,13 @@ elf32_hppa_relocate_section (bfd *output
 		      && hh->eh.root.type != bfd_link_hash_undefined))
 		{
 		  relocation = (off
-				+ htab->splt->output_offset
-				+ htab->splt->output_section->vma
+				+ htab->etab.splt->output_offset
+				+ htab->etab.splt->output_section->vma
 				+ 2);
 		}
 	      plabel = 1;
 	    }
-	  /* Fall through and possibly emit a dynamic relocation.  */
+	  /* Fall through.  */
 
 	case R_PARISC_DIR17F:
 	case R_PARISC_DIR17R:
@@ -3962,13 +3966,13 @@ elf32_hppa_relocate_section (bfd *output
 	     which is why we can't use just that test here.
 	     Conversely, DEF_DYNAMIC can't be used in check_relocs as
 	     there all files have not been loaded.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (hh == NULL
 		   || ELF_ST_VISIBILITY (hh->eh.other) == STV_DEFAULT
 		   || hh->eh.root.type != bfd_link_hash_undefweak)
 	       && (IS_ABSOLUTE_RELOC (r_type)
 		   || !SYMBOL_CALLS_LOCAL (info, &hh->eh)))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && hh != NULL
 		  && hh->eh.dynindx != -1
 		  && !hh->eh.non_got_ref
@@ -4004,8 +4008,8 @@ elf32_hppa_relocate_section (bfd *output
 		       && hh->eh.dynindx != -1
 		       && (plabel
 			   || !IS_ABSOLUTE_RELOC (r_type)
-			   || !info->shared
-			   || !info->symbolic
+			   || !bfd_link_pic (info)
+			   || !SYMBOLIC_BIND (info, &hh->eh)
 			   || !hh->eh.def_regular))
 		{
 		  outrel.r_info = ELF32_R_INFO (hh->eh.dynindx, r_type);
@@ -4072,12 +4076,12 @@ elf32_hppa_relocate_section (bfd *output
 		bfd_byte *loc;
 
 		outrel.r_offset = (off
-				   + htab->sgot->output_section->vma
-				   + htab->sgot->output_offset);
+				   + htab->etab.sgot->output_section->vma
+				   + htab->etab.sgot->output_offset);
 		outrel.r_addend = 0;
 		outrel.r_info = ELF32_R_INFO (0, R_PARISC_TLS_DTPMOD32);
-		loc = htab->srelgot->contents;
-		loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
+		loc = htab->etab.srelgot->contents;
+		loc += htab->etab.srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
 
 		bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
 		htab->tls_ldm_got.offset |= 1;
@@ -4085,8 +4089,8 @@ elf32_hppa_relocate_section (bfd *output
 
 	    /* Add the base of the GOT to the relocation value.  */
 	    relocation = (off
-			  + htab->sgot->output_offset
-			  + htab->sgot->output_section->vma);
+			  + htab->etab.sgot->output_offset
+			  + htab->etab.sgot->output_section->vma);
 
 	    break;
 	  }
@@ -4111,8 +4115,10 @@ elf32_hppa_relocate_section (bfd *output
 	        bfd_boolean dyn;
 	        dyn = htab->etab.dynamic_sections_created;
 
-		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, &hh->eh)
-		    && (!info->shared
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     &hh->eh)
+		    && (!bfd_link_pic (info)
 			|| !SYMBOL_REFERENCES_LOCAL (info, &hh->eh)))
 		  {
 		    indx = hh->eh.dynindx;
@@ -4142,15 +4148,15 @@ elf32_hppa_relocate_section (bfd *output
 	           now, and emit any relocations.  If both an IE GOT and a
 	           GD GOT are necessary, we emit the GD first.  */
 
-		if ((info->shared || indx != 0)
+		if ((bfd_link_pic (info) || indx != 0)
 		    && (hh == NULL
 			|| ELF_ST_VISIBILITY (hh->eh.other) == STV_DEFAULT
 			|| hh->eh.root.type != bfd_link_hash_undefweak))
 		  {
 		    need_relocs = TRUE;
-		    loc = htab->srelgot->contents;
+		    loc = htab->etab.srelgot->contents;
 		    /* FIXME (CAO): Should this be reloc_count++ ? */
-		    loc += htab->srelgot->reloc_count * sizeof (Elf32_External_Rela);
+		    loc += htab->etab.srelgot->reloc_count * sizeof (Elf32_External_Rela);
 		  }
 
 		if (tls_type & GOT_TLS_GD)
@@ -4158,26 +4164,26 @@ elf32_hppa_relocate_section (bfd *output
 		    if (need_relocs)
 		      {
 			outrel.r_offset = (cur_off
-					   + htab->sgot->output_section->vma
-					   + htab->sgot->output_offset);
+					   + htab->etab.sgot->output_section->vma
+					   + htab->etab.sgot->output_offset);
 			outrel.r_info = ELF32_R_INFO (indx,R_PARISC_TLS_DTPMOD32);
 			outrel.r_addend = 0;
-			bfd_put_32 (output_bfd, 0, htab->sgot->contents + cur_off);
+			bfd_put_32 (output_bfd, 0, htab->etab.sgot->contents + cur_off);
 			bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
-			htab->srelgot->reloc_count++;
+			htab->etab.srelgot->reloc_count++;
 			loc += sizeof (Elf32_External_Rela);
 
 			if (indx == 0)
 			  bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
-				      htab->sgot->contents + cur_off + 4);
+				      htab->etab.sgot->contents + cur_off + 4);
 			else
 			  {
 			    bfd_put_32 (output_bfd, 0,
-					htab->sgot->contents + cur_off + 4);
+					htab->etab.sgot->contents + cur_off + 4);
 			    outrel.r_info = ELF32_R_INFO (indx, R_PARISC_TLS_DTPOFF32);
 			    outrel.r_offset += 4;
 			    bfd_elf32_swap_reloca_out (output_bfd, &outrel,loc);
-			    htab->srelgot->reloc_count++;
+			    htab->etab.srelgot->reloc_count++;
 			    loc += sizeof (Elf32_External_Rela);
 			  }
 		      }
@@ -4189,9 +4195,9 @@ elf32_hppa_relocate_section (bfd *output
 		           symbol binding locally.  Mark it as belonging
 		           to module 1, the executable.  */
 		        bfd_put_32 (output_bfd, 1,
-				    htab->sgot->contents + cur_off);
+				    htab->etab.sgot->contents + cur_off);
 		        bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
-				    htab->sgot->contents + cur_off + 4);
+				    htab->etab.sgot->contents + cur_off + 4);
 		      }
 
 
@@ -4203,8 +4209,8 @@ elf32_hppa_relocate_section (bfd *output
 		    if (need_relocs)
 		      {
 			outrel.r_offset = (cur_off
-					   + htab->sgot->output_section->vma
-					   + htab->sgot->output_offset);
+					   + htab->etab.sgot->output_section->vma
+					   + htab->etab.sgot->output_offset);
 			outrel.r_info = ELF32_R_INFO (indx, R_PARISC_TLS_TPREL32);
 
 			if (indx == 0)
@@ -4213,12 +4219,12 @@ elf32_hppa_relocate_section (bfd *output
 			  outrel.r_addend = 0;
 
 			bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
-			htab->srelgot->reloc_count++;
+			htab->etab.srelgot->reloc_count++;
 			loc += sizeof (Elf32_External_Rela);
 		      }
 		    else
 		      bfd_put_32 (output_bfd, tpoff (info, relocation),
-				  htab->sgot->contents + cur_off);
+				  htab->etab.sgot->contents + cur_off);
 
 		    cur_off += 4;
 		  }
@@ -4236,8 +4242,8 @@ elf32_hppa_relocate_section (bfd *output
 
 	    /* Add the base of the GOT to the relocation value.  */
 	    relocation = (off
-			  + htab->sgot->output_offset
-			  + htab->sgot->output_section->vma);
+			  + htab->etab.sgot->output_offset
+			  + htab->etab.sgot->output_section->vma);
 
 	    break;
 	  }
@@ -4279,7 +4285,8 @@ elf32_hppa_relocate_section (bfd *output
 	{
 	  if (rstatus == bfd_reloc_notsupported || !warned_undef)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): cannot handle %s for %s"),
 		 input_bfd,
 		 input_section,
@@ -4291,12 +4298,9 @@ elf32_hppa_relocate_section (bfd *output
 	    }
 	}
       else
-	{
-	  if (!((*info->callbacks->reloc_overflow)
-		(info, (hh ? &hh->eh.root : NULL), sym_name, howto->name,
-		 (bfd_vma) 0, input_bfd, input_section, rela->r_offset)))
-	    return FALSE;
-	}
+	(*info->callbacks->reloc_overflow)
+	  (info, (hh ? &hh->eh.root : NULL), sym_name, howto->name,
+	   (bfd_vma) 0, input_bfd, input_section, rela->r_offset);
     }
 
   return TRUE;
@@ -4345,8 +4349,8 @@ elf32_hppa_finish_dynamic_symbol (bfd *o
 
       /* Create a dynamic IPLT relocation for this entry.  */
       rela.r_offset = (eh->plt.offset
-		      + htab->splt->output_offset
-		      + htab->splt->output_section->vma);
+		      + htab->etab.splt->output_offset
+		      + htab->etab.splt->output_section->vma);
       if (eh->dynindx != -1)
 	{
 	  rela.r_info = ELF32_R_INFO (eh->dynindx, R_PARISC_IPLT);
@@ -4360,9 +4364,9 @@ elf32_hppa_finish_dynamic_symbol (bfd *o
 	  rela.r_addend = value;
 	}
 
-      loc = htab->srelplt->contents;
-      loc += htab->srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
-      bfd_elf32_swap_reloca_out (htab->splt->output_section->owner, &rela, loc);
+      loc = htab->etab.srelplt->contents;
+      loc += htab->etab.srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
+      bfd_elf32_swap_reloca_out (htab->etab.splt->output_section->owner, &rela, loc);
 
       if (!eh->def_regular)
 	{
@@ -4380,16 +4384,16 @@ elf32_hppa_finish_dynamic_symbol (bfd *o
 	 up.  */
 
       rela.r_offset = ((eh->got.offset &~ (bfd_vma) 1)
-		      + htab->sgot->output_offset
-		      + htab->sgot->output_section->vma);
+		      + htab->etab.sgot->output_offset
+		      + htab->etab.sgot->output_section->vma);
 
       /* If this is a -Bsymbolic link and the symbol is defined
 	 locally or was forced to be local because of a version file,
 	 we just want to emit a RELATIVE reloc.  The entry in the
 	 global offset table will already have been initialized in the
 	 relocate_section function.  */
-      if (info->shared
-	  && (info->symbolic || eh->dynindx == -1)
+      if (bfd_link_pic (info)
+	  && (SYMBOLIC_BIND (info, eh) || eh->dynindx == -1)
 	  && eh->def_regular)
 	{
 	  rela.r_info = ELF32_R_INFO (0, R_PARISC_DIR32);
@@ -4402,13 +4406,13 @@ elf32_hppa_finish_dynamic_symbol (bfd *o
 	  if ((eh->got.offset & 1) != 0)
 	    abort ();
 
-	  bfd_put_32 (output_bfd, 0, htab->sgot->contents + (eh->got.offset & ~1));
+	  bfd_put_32 (output_bfd, 0, htab->etab.sgot->contents + (eh->got.offset & ~1));
 	  rela.r_info = ELF32_R_INFO (eh->dynindx, R_PARISC_DIR32);
 	  rela.r_addend = 0;
 	}
 
-      loc = htab->srelgot->contents;
-      loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
+      loc = htab->etab.srelgot->contents;
+      loc += htab->etab.srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
     }
 
@@ -4423,13 +4427,15 @@ elf32_hppa_finish_dynamic_symbol (bfd *o
 		 || eh->root.type == bfd_link_hash_defweak)))
 	abort ();
 
-      sec = htab->srelbss;
-
       rela.r_offset = (eh->root.u.def.value
 		      + eh->root.u.def.section->output_offset
 		      + eh->root.u.def.section->output_section->vma);
       rela.r_addend = 0;
       rela.r_info = ELF32_R_INFO (eh->dynindx, R_PARISC_COPY);
+      if (eh->root.u.def.section == htab->etab.sdynrelro)
+	sec = htab->etab.sreldynrelro;
+      else
+	sec = htab->etab.srelbss;
       loc = sec->contents + sec->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
     }
@@ -4493,7 +4499,7 @@ elf32_hppa_finish_dynamic_sections (bfd 
 
   dynobj = htab->etab.dynobj;
 
-  sgot = htab->sgot;
+  sgot = htab->etab.sgot;
   /* A broken linker script might have discarded the dynamic sections.
      Catch this here so that we do not seg-fault later on.  */
   if (sgot != NULL && bfd_is_abs_section (sgot->output_section))
@@ -4528,35 +4534,14 @@ elf32_hppa_finish_dynamic_sections (bfd 
 	      break;
 
 	    case DT_JMPREL:
-	      s = htab->srelplt;
+	      s = htab->etab.srelplt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->srelplt;
+	      s = htab->etab.srelplt;
 	      dyn.d_un.d_val = s->size;
 	      break;
-
-	    case DT_RELASZ:
-	      /* Don't count procedure linkage table relocs in the
-		 overall reloc count.  */
-	      s = htab->srelplt;
-	      if (s == NULL)
-		continue;
-	      dyn.d_un.d_val -= s->size;
-	      break;
-
-	    case DT_RELA:
-	      /* We may not be using the standard ELF linker script.
-		 If .rela.plt is the first .rela section, we adjust
-		 DT_RELA to not include it.  */
-	      s = htab->srelplt;
-	      if (s == NULL)
-		continue;
-	      if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
-		continue;
-	      dyn.d_un.d_ptr += s->size;
-	      break;
 	    }
 
 	  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -4579,26 +4564,27 @@ elf32_hppa_finish_dynamic_sections (bfd 
 	->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
     }
 
-  if (htab->splt != NULL && htab->splt->size != 0)
+  if (htab->etab.splt != NULL && htab->etab.splt->size != 0)
     {
-      /* Set plt entry size.  */
-      elf_section_data (htab->splt->output_section)
-	->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+      /* Set plt entry size to 0 instead of PLT_ENTRY_SIZE, since we add the
+	 plt stubs and as such the section does not hold a table of fixed-size
+	 entries.  */
+      elf_section_data (htab->etab.splt->output_section)->this_hdr.sh_entsize = 0;
 
       if (htab->need_plt_stub)
 	{
 	  /* Set up the .plt stub.  */
-	  memcpy (htab->splt->contents
-		  + htab->splt->size - sizeof (plt_stub),
+	  memcpy (htab->etab.splt->contents
+		  + htab->etab.splt->size - sizeof (plt_stub),
 		  plt_stub, sizeof (plt_stub));
 
-	  if ((htab->splt->output_offset
-	       + htab->splt->output_section->vma
-	       + htab->splt->size)
+	  if ((htab->etab.splt->output_offset
+	       + htab->etab.splt->output_section->vma
+	       + htab->etab.splt->size)
 	      != (sgot->output_offset
 		  + sgot->output_section->vma))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_(".got section not immediately after .plt section"));
 	      return FALSE;
 	    }
@@ -4657,7 +4643,10 @@ elf32_hppa_elf_get_symbol_type (Elf_Inte
 #define elf_backend_plt_readonly	     0
 #define elf_backend_want_plt_sym	     0
 #define elf_backend_got_header_size	     8
+#define elf_backend_want_dynrelro	     1
 #define elf_backend_rela_normal		     1
+#define elf_backend_dtrel_excludes_plt	     1
+#define elf_backend_no_page_alias	     1
 
 #define TARGET_BIG_SYM		hppa_elf32_vec
 #define TARGET_BIG_NAME		"elf32-hppa"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-hppa.h ./bfd/elf32-hppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-hppa.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-hppa.h	2017-03-06 01:49:05.000000000 +0000
@@ -4,7 +4,7 @@
    in the Stratus FTX/Golf Object File Format (SED-1762) dated
    February 1994.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by:
 
@@ -36,6 +36,13 @@
 #include "libhppa.h"
 #include "elf/hppa.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void elf32_hppa_init_stub_bfd
+  (bfd *, struct bfd_link_info *);
+
 int elf32_hppa_setup_section_lists
   (bfd *, struct bfd_link_info *);
 
@@ -74,4 +81,8 @@ extern elf_hppa_reloc_type ** _bfd_elf32
 #define R_HPPA_ABS_CALL			R_PARISC_DIR17F
 #define R_HPPA_COMPLEX			R_PARISC_UNIMPLEMENTED
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _ELF32_HPPA_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i370.c ./bfd/elf32-i370.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i370.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-i370.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* i370-specific support for 32-bit ELF
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas for i370 linas@linas.org
 
@@ -303,8 +303,9 @@ i370_elf_info_to_howto (bfd *abfd ATTRIB
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_I370_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised I370 reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised I370 reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_I370_NONE;
     }
@@ -330,8 +331,9 @@ i370_elf_set_private_flags (bfd *abfd, f
    object file when linking.  */
 
 static bfd_boolean
-i370_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+i370_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
 
@@ -352,8 +354,9 @@ i370_elf_merge_private_bfd_data (bfd *ib
 
   else					/* Incompatible flags.  */
     {
-      (*_bfd_error_handler)
-	("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
 	 ibfd, (long) new_flags, (long) old_flags);
 
       bfd_set_error (bfd_error_bad_value);
@@ -433,7 +436,7 @@ i370_elf_create_dynamic_sections (bfd *a
   if (s == NULL)
     return FALSE;
 
-  if (! info->shared)
+  if (! bfd_link_pic (info))
     {
       s = bfd_make_section_anyway_with_flags (abfd, ".rela.sbss",
 					      flags | SEC_READONLY);
@@ -503,7 +506,7 @@ i370_elf_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* We must allocate the symbol in our .dynbss section, which will
@@ -594,7 +597,7 @@ i370_elf_size_dynamic_sections (bfd *out
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -713,7 +716,7 @@ i370_elf_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -755,7 +758,7 @@ i370_elf_size_dynamic_sections (bfd *out
      locations in linker-created sections that do not have
      externally-visible names. Instead, we should work out precisely
      which sections relocations are targeted at.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       int c;
 
@@ -804,7 +807,7 @@ i370_elf_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel_end;
   asection *sreloc;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
 #ifdef DEBUG
@@ -839,7 +842,7 @@ i370_elf_check_relocs (bfd *abfd,
 	  h->root.non_ir_ref = 1;
 	}
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 #ifdef DEBUG
 	  fprintf (stderr,
@@ -881,7 +884,7 @@ i370_elf_finish_dynamic_sections (bfd *o
 {
   asection *sdyn;
   bfd *dynobj = elf_hash_table (info)->dynobj;
-  asection *sgot = bfd_get_linker_section (dynobj, ".got");
+  asection *sgot = elf_hash_table (info)->sgot;
 
 #ifdef DEBUG
   fprintf (stderr, "i370_elf_finish_dynamic_sections called\n");
@@ -894,7 +897,7 @@ i370_elf_finish_dynamic_sections (bfd *o
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
@@ -902,35 +905,39 @@ i370_elf_finish_dynamic_sections (bfd *o
       for (; dyncon < dynconend; dyncon++)
 	{
 	  Elf_Internal_Dyn dyn;
-	  const char *name;
+	  asection *s;
 	  bfd_boolean size;
 
 	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
 
 	  switch (dyn.d_tag)
 	    {
-	    case DT_PLTGOT:   name = ".plt";	  size = FALSE; break;
-	    case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE;  break;
-	    case DT_JMPREL:   name = ".rela.plt"; size = FALSE; break;
-	    default:	      name = NULL;	  size = FALSE; break;
+	    case DT_PLTGOT:
+	      s = elf_hash_table (info)->splt;
+	      size = FALSE;
+	      break;
+	    case DT_PLTRELSZ:
+	      s = elf_hash_table (info)->srelplt;
+	      size = TRUE;
+	      break;
+	    case DT_JMPREL:
+	      s = elf_hash_table (info)->srelplt;
+	      size = FALSE;
+	      break;
+	    default:
+	      continue;
 	    }
 
-	  if (name != NULL)
+	  if (s == NULL)
+	    dyn.d_un.d_val = 0;
+	  else
 	    {
-	      asection *s;
-
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      if (s == NULL)
-		dyn.d_un.d_val = 0;
+	      if (!size)
+		dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      else
-		{
-		  if (! size)
-		    dyn.d_un.d_ptr = s->vma;
-		  else
-		    dyn.d_un.d_val = s->size;
-		}
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+		dyn.d_un.d_val = s->size;
 	    }
+	  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	}
     }
 
@@ -948,7 +955,7 @@ i370_elf_finish_dynamic_sections (bfd *o
       elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
     }
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       asection *sdynsym;
       asection *s;
@@ -1049,7 +1056,7 @@ i370_elf_relocate_section (bfd *output_b
   _bfd_error_handler ("i370_elf_relocate_section called for %B section %A, %ld relocations%s",
 		      input_bfd, input_section,
 		      (long) input_section->reloc_count,
-		      (info->relocatable) ? " (relocatable)" : "");
+		      (bfd_link_relocatable (info)) ? " (relocatable)" : "");
 #endif
 
   if (!i370_elf_howto_table[ R_I370_ADDR31 ])
@@ -1074,9 +1081,9 @@ i370_elf_relocate_section (bfd *output_b
       if ((unsigned) r_type >= (unsigned) R_I370_max
 	  || !i370_elf_howto_table[(int)r_type])
 	{
-	  (*_bfd_error_handler) ("%B: unknown relocation type %d",
-				 input_bfd,
-				 (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: unknown relocation type %d"),
+			      input_bfd, (int) r_type);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
@@ -1113,7 +1120,7 @@ i370_elf_relocate_section (bfd *output_b
 	      || h->root.type == bfd_link_hash_defweak)
 	    {
 	      sec = h->root.u.def.section;
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  && ((! info->symbolic && h->dynindx != -1)
 		      || !h->def_regular)
 		  && (input_section->flags & SEC_ALLOC) != 0
@@ -1135,17 +1142,15 @@ i370_elf_relocate_section (bfd *output_b
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable)
+	  else if (!bfd_link_relocatable (info))
 	    {
-	      if ((*info->callbacks->undefined_symbol)
-		  (info, h->root.root.string, input_bfd,
-		   input_section, rel->r_offset,
-		   (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-		    || ELF_ST_VISIBILITY (h->other))))
-		{
-		  ret = FALSE;
-		  continue;
-		}
+	      (*info->callbacks->undefined_symbol)
+		(info, h->root.root.string, input_bfd,
+		 input_section, rel->r_offset,
+		 (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+		  || ELF_ST_VISIBILITY (h->other)));
+	      ret = FALSE;
+	      continue;
 	    }
 	}
 
@@ -1153,14 +1158,14 @@ i370_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch ((int) r_type)
 	{
 	default:
-	  (*_bfd_error_handler)
-	    ("%B: unknown relocation type %d for symbol %s",
+	  _bfd_error_handler
+	    (_("%B: unknown relocation type %d for symbol %s"),
 	     input_bfd, (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -1184,7 +1189,7 @@ i370_elf_relocate_section (bfd *output_b
 	   object.  */
 	case (int) R_I370_ADDR31:
 	case (int) R_I370_ADDR16:
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && r_symndx != STN_UNDEF)
 	    {
 	      Elf_Internal_Rela outrel;
@@ -1300,8 +1305,9 @@ i370_elf_relocate_section (bfd *output_b
 
 	case (int) R_I370_COPY:
 	case (int) R_I370_RELATIVE:
-	  (*_bfd_error_handler)
-	    ("%B: Relocation %s is not yet supported for symbol %s.",
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: Relocation %s is not yet supported for symbol %s."),
 	     input_bfd,
 	     i370_elf_howto_table[(int) r_type]->name,
 	     sym_name);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i386.c ./bfd/elf32-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel 80386/80486-specific support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -29,6 +29,7 @@
 #include "objalloc.h"
 #include "hashtab.h"
 #include "dwarf2.h"
+#include "opcode/i386.h"
 
 /* 386 uses REL relocations instead of RELA.  */
 #define USE_REL	1
@@ -146,10 +147,13 @@ static reloc_howto_type elf_howto_table[
   HOWTO(R_386_IRELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
 	bfd_elf_generic_reloc, "R_386_IRELATIVE",
 	TRUE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO(R_386_GOT32X, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+	bfd_elf_generic_reloc, "R_386_GOT32X",
+	TRUE, 0xffffffff, 0xffffffff, FALSE),
 
   /* Another gap.  */
-#define R_386_irelative (R_386_IRELATIVE + 1 - R_386_tls_offset)
-#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_irelative)
+#define R_386_ext2 (R_386_GOT32X + 1 - R_386_tls_offset)
+#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_ext2)
 
 /* GNU extension to record C++ vtable hierarchy.  */
   HOWTO (R_386_GNU_VTINHERIT,	/* type */
@@ -332,6 +336,10 @@ elf_i386_reloc_type_lookup (bfd *abfd AT
       TRACE ("BFD_RELOC_386_IRELATIVE");
       return &elf_howto_table[R_386_IRELATIVE - R_386_tls_offset];
 
+    case BFD_RELOC_386_GOT32X:
+      TRACE ("BFD_RELOC_386_GOT32X");
+      return &elf_howto_table[R_386_GOT32X - R_386_tls_offset];
+
     case BFD_RELOC_VTABLE_INHERIT:
       TRACE ("BFD_RELOC_VTABLE_INHERIT");
       return &elf_howto_table[R_386_GNU_VTINHERIT - R_386_vt_offset];
@@ -371,12 +379,13 @@ elf_i386_rtype_to_howto (bfd *abfd, unsi
       && ((indx = r_type - R_386_ext_offset) - R_386_standard
 	  >= R_386_ext - R_386_standard)
       && ((indx = r_type - R_386_tls_offset) - R_386_ext
-	  >= R_386_irelative - R_386_ext)
-      && ((indx = r_type - R_386_vt_offset) - R_386_irelative
-	  >= R_386_vt - R_386_irelative))
-    {
-      (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-			     abfd, (int) r_type);
+	  >= R_386_ext2 - R_386_ext)
+      && ((indx = r_type - R_386_vt_offset) - R_386_ext2
+	  >= R_386_vt - R_386_ext2))
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: invalid relocation type %d"),
+			  abfd, (int) r_type);
       indx = R_386_NONE;
     }
   /* PR 17512: file: 0f67f69d.  */
@@ -639,6 +648,32 @@ static const bfd_byte elf_i386_eh_frame_
   DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
 };
 
+/* .eh_frame covering the .plt.got section.  */
+
+static const bfd_byte elf_i386_eh_frame_plt_got[] =
+{
+#define PLT_GOT_FDE_LENGTH		16
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x7c,				/* Data alignment factor */
+  8,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 4, 4,		/* DW_CFA_def_cfa: r4 (esp) ofs 4 */
+  DW_CFA_offset + 8, 1,		/* DW_CFA_offset: r8 (eip) at cfa-4 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_GOT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* the start of .plt.got goes here */
+  0, 0, 0, 0,			/* .plt.got size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
 struct elf_i386_plt_layout
 {
   /* The first entry in an absolute procedure linkage table looks like this.  */
@@ -670,6 +705,10 @@ struct elf_i386_plt_layout
   /* .eh_frame covering the .plt section.  */
   const bfd_byte *eh_frame_plt;
   unsigned int eh_frame_plt_size;
+
+  /* .eh_frame covering the .plt.got section.  */
+  const bfd_byte *eh_frame_plt_got;
+  unsigned int eh_frame_plt_got_size;
 };
 
 #define GET_PLT_ENTRY_SIZE(abfd) \
@@ -692,6 +731,8 @@ static const struct elf_i386_plt_layout 
     elf_i386_pic_plt_entry,             /* pic_plt_entry */
     elf_i386_eh_frame_plt,              /* eh_frame_plt */
     sizeof (elf_i386_eh_frame_plt),     /* eh_frame_plt_size */
+    elf_i386_eh_frame_plt_got,          /* eh_frame_plt_got */
+    sizeof (elf_i386_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 
 
@@ -729,6 +770,20 @@ static const struct elf_i386_backend_dat
 
 #define	elf_backend_arch_data	&elf_i386_arch_bed
 
+/* Is a undefined weak symbol which is resolved to 0.  Reference to an
+   undefined weak symbol is resolved to 0 when building executable if
+   it isn't dynamic and
+   1. Has non-GOT/non-PLT relocations in text section.  Or
+   2. Has no GOT/PLT relocation.
+ */
+#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, GOT_RELOC, EH)	\
+  ((EH)->elf.root.type == bfd_link_hash_undefweak		\
+   && bfd_link_executable (INFO)				\
+   && (elf_i386_hash_table (INFO)->interp == NULL	 	\
+       || !(GOT_RELOC)						\
+       || (EH)->has_non_got_reloc				\
+       || !(INFO)->dynamic_undefined_weak))
+
 /* i386 ELF linker hash entry.  */
 
 struct elf_i386_link_hash_entry
@@ -759,6 +814,21 @@ struct elf_i386_link_hash_entry
   /* Symbol is referenced by R_386_GOTOFF relocation.  */
   unsigned int gotoff_ref : 1;
 
+  /* Symbol has GOT or PLT relocations.  */
+  unsigned int has_got_reloc : 1;
+
+  /* Symbol has non-GOT/non-PLT relocations in text sections.  */
+  unsigned int has_non_got_reloc : 1;
+
+  /* 0: symbol isn't ___tls_get_addr.
+     1: symbol is ___tls_get_addr.
+     2: symbol is unknown.  */
+  unsigned int tls_get_addr : 2;
+
+  /* Reference count of C/C++ function pointer relocations in read-write
+     section which can be resolved at run-time.  */
+  bfd_signed_vma func_pointer_refcount;
+
   /* Information about the GOT PLT entry. Filled when there are both
      GOT and PLT relocations against the same function.  */
   union gotplt_union plt_got;
@@ -809,10 +879,10 @@ struct elf_i386_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
+  asection *interp;
   asection *plt_eh_frame;
   asection *plt_got;
+  asection *plt_got_eh_frame;
 
   union
   {
@@ -845,6 +915,10 @@ struct elf_i386_link_hash_table
 
   /* The index of the next unused R_386_IRELATIVE slot in .rel.plt.  */
   bfd_vma next_irelative_index;
+
+  /* TRUE if there are dynamic relocs against IFUNC symbols that apply
+     to read-only sections.  */
+  bfd_boolean readonly_dynrelocs_against_ifunc;
 };
 
 /* Get the i386 ELF linker hash table from a link_info structure.  */
@@ -883,6 +957,10 @@ elf_i386_link_hash_newfunc (struct bfd_h
       eh->dyn_relocs = NULL;
       eh->tls_type = GOT_UNKNOWN;
       eh->gotoff_ref = 0;
+      eh->has_got_reloc = 0;
+      eh->has_non_got_reloc = 0;
+      eh->tls_get_addr = 2;
+      eh->func_pointer_refcount = 0;
       eh->plt_got.offset = (bfd_vma) -1;
       eh->tlsdesc_got = (bfd_vma) -1;
     }
@@ -952,6 +1030,7 @@ elf_i386_get_local_sym_hash (struct elf_
       ret->elf.indx = sec->id;
       ret->elf.dynstr_index = ELF32_R_SYM (rel->r_info);
       ret->elf.dynindx = -1;
+      ret->func_pointer_refcount = 0;
       ret->plt_got.offset = (bfd_vma) -1;
       *slot = ret;
     }
@@ -1025,27 +1104,15 @@ elf_i386_create_dynamic_sections (bfd *d
   if (htab == NULL)
     return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!htab->sdynbss)
-    abort ();
-
-  if (info->executable)
+  /* Set the contents of the .interp section to the interpreter.  */
+  if (bfd_link_executable (info) && !info->nointerp)
     {
-      /* Always allow copy relocs for building executables.  */
-      asection *s = bfd_get_linker_section (dynobj, ".rel.bss");
+      asection *s = bfd_get_linker_section (dynobj, ".interp");
       if (s == NULL)
-	{
-	  const struct elf_backend_data *bed = get_elf_backend_data (dynobj);
-	  s = bfd_make_section_anyway_with_flags (dynobj,
-						  ".rel.bss",
-						  (bed->dynamic_sec_flags
-						   | SEC_READONLY));
-	  if (s == NULL
-	      || ! bfd_set_section_alignment (dynobj, s,
-					      bed->s->log_file_align))
-	    return FALSE;
-	}
-      htab->srelbss = s;
+	abort ();
+      s->size = sizeof ELF_DYNAMIC_INTERPRETER;
+      s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+      htab->interp = s;
     }
 
   if (get_elf_i386_backend_data (dynobj)->is_vxworks
@@ -1124,6 +1191,9 @@ elf_i386_copy_indirect_symbol (struct bf
      generate a R_386_COPY reloc.  */
   edir->gotoff_ref |= eind->gotoff_ref;
 
+  edir->has_got_reloc |= eind->has_got_reloc;
+  edir->has_non_got_reloc |= eind->has_non_got_reloc;
+
   if (ELIMINATE_COPY_RELOCS
       && ind->root.type != bfd_link_hash_indirect
       && dir->dynamic_adjusted)
@@ -1131,21 +1201,30 @@ elf_i386_copy_indirect_symbol (struct bf
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      dir->ref_dynamic |= ind->ref_dynamic;
+      if (dir->versioned != versioned_hidden)
+	dir->ref_dynamic |= ind->ref_dynamic;
       dir->ref_regular |= ind->ref_regular;
       dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
       dir->needs_plt |= ind->needs_plt;
       dir->pointer_equality_needed |= ind->pointer_equality_needed;
     }
   else
-    _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+    {
+      if (eind->func_pointer_refcount > 0)
+	{
+	  edir->func_pointer_refcount += eind->func_pointer_refcount;
+	  eind->func_pointer_refcount = 0;
+	}
+
+      _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+    }
 }
 
 /* Return TRUE if the TLS access code sequence support transition
    from R_TYPE.  */
 
 static bfd_boolean
-elf_i386_check_tls_transition (bfd *abfd, asection *sec,
+elf_i386_check_tls_transition (asection *sec,
 			       bfd_byte *contents,
 			       Elf_Internal_Shdr *symtab_hdr,
 			       struct elf_link_hash_entry **sym_hashes,
@@ -1153,26 +1232,12 @@ elf_i386_check_tls_transition (bfd *abfd
 			       const Elf_Internal_Rela *rel,
 			       const Elf_Internal_Rela *relend)
 {
-  unsigned int val, type;
+  unsigned int val, type, reg;
   unsigned long r_symndx;
   struct elf_link_hash_entry *h;
   bfd_vma offset;
-
-  /* Get the section contents.  */
-  if (contents == NULL)
-    {
-      if (elf_section_data (sec)->this_hdr.contents != NULL)
-	contents = elf_section_data (sec)->this_hdr.contents;
-      else
-	{
-	  /* FIXME: How to better handle error condition?  */
-	  if (!bfd_malloc_and_get_section (abfd, sec, &contents))
-	    return FALSE;
-
-	  /* Cache the section contents for elf_link_input_bfd.  */
-	  elf_section_data (sec)->this_hdr.contents = contents;
-	}
-    }
+  bfd_byte *call;
+  bfd_boolean indirect_call, tls_get_addr;
 
   offset = rel->r_offset;
   switch (r_type)
@@ -1182,69 +1247,130 @@ elf_i386_check_tls_transition (bfd *abfd
       if (offset < 2 || (rel + 1) >= relend)
 	return FALSE;
 
-      type = bfd_get_8 (abfd, contents + offset - 2);
+      indirect_call = FALSE;
+      call = contents + offset + 4;
+      val = *(call - 5);
+      type = *(call - 6);
       if (r_type == R_386_TLS_GD)
 	{
 	  /* Check transition from GD access model.  Only
-		leal foo@tlsgd(,%reg,1), %eax; call ___tls_get_addr
-		leal foo@tlsgd(%reg), %eax; call ___tls_get_addr; nop
+		leal foo@tlsgd(,%ebx,1), %eax
+		call ___tls_get_addr@PLT
+	     or
+		leal foo@tlsgd(%ebx) %eax
+		call ___tls_get_addr@PLT
+		nop
+	     or
+		leal foo@tlsgd(%reg), %eax
+		call *___tls_get_addr@GOT(%reg)
+		which may be converted to
+		addr32 call ___tls_get_addr
 	     can transit to different access model.  */
-	  if ((offset + 10) > sec->size ||
-	      (type != 0x8d && type != 0x04))
+	  if ((offset + 10) > sec->size
+	      || (type != 0x8d && type != 0x04))
 	    return FALSE;
 
-	  val = bfd_get_8 (abfd, contents + offset - 1);
 	  if (type == 0x04)
 	    {
-	      /* leal foo@tlsgd(,%reg,1), %eax; call ___tls_get_addr */
+	      /* leal foo@tlsgd(,%ebx,1), %eax
+		 call ___tls_get_addr@PLT  */
 	      if (offset < 3)
 		return FALSE;
 
-	      if (bfd_get_8 (abfd, contents + offset - 3) != 0x8d)
-		return FALSE;
-
-	      if ((val & 0xc7) != 0x05 || val == (4 << 3))
+	      if (*(call - 7) != 0x8d
+		  || val != 0x1d
+		  || call[0] != 0xe8)
 		return FALSE;
 	    }
 	  else
 	    {
-	      /* leal foo@tlsgd(%reg), %eax; call ___tls_get_addr; nop  */
-	      if ((val & 0xf8) != 0x80 || (val & 7) == 4)
+	      /* This must be
+			leal foo@tlsgd(%ebx), %eax
+			call ___tls_get_addr@PLT
+			nop
+		 or
+			leal foo@tlsgd(%reg), %eax
+			call *___tls_get_addr@GOT(%reg)
+			which may be converted to
+			addr32 call ___tls_get_addr
+
+		 %eax can't be used as the GOT base register since it
+		 is used to pass parameter to ___tls_get_addr.  */
+	      reg = val & 7;
+	      if ((val & 0xf8) != 0x80 || reg == 4 || reg == 0)
 		return FALSE;
 
-	      if (bfd_get_8 (abfd, contents + offset + 9) != 0x90)
+	      indirect_call = call[0] == 0xff;
+	      if (!(reg == 3 && call[0] == 0xe8 && call[5] == 0x90)
+		  && !(call[0] == 0x67 && call[1] == 0xe8)
+		  && !(indirect_call
+		       && (call[1] & 0xf8) == 0x90
+		       && (call[1] & 0x7) == reg))
 		return FALSE;
 	    }
 	}
       else
 	{
 	  /* Check transition from LD access model.  Only
-		leal foo@tlsgd(%reg), %eax; call ___tls_get_addr
+		leal foo@tlsldm(%ebx), %eax
+		call ___tls_get_addr@PLT
+	     or
+		leal foo@tlsldm(%reg), %eax
+		call *___tls_get_addr@GOT(%reg)
+		which may be converted to
+		addr32 call ___tls_get_addr
 	     can transit to different access model.  */
 	  if (type != 0x8d || (offset + 9) > sec->size)
 	    return FALSE;
 
-	  val = bfd_get_8 (abfd, contents + offset - 1);
-	  if ((val & 0xf8) != 0x80 || (val & 7) == 4)
+	  /* %eax can't be used as the GOT base register since it is
+	     used to pass parameter to ___tls_get_addr.  */
+	  reg = val & 7;
+	  if ((val & 0xf8) != 0x80 || reg == 4 || reg == 0)
 	    return FALSE;
-	}
 
-      if (bfd_get_8 (abfd, contents + offset + 4) != 0xe8)
-	return FALSE;
+	  indirect_call = call[0] == 0xff;
+	  if (!(reg == 3 && call[0] == 0xe8)
+	      && !(call[0] == 0x67 && call[1] == 0xe8)
+	      && !(indirect_call
+		   && (call[1] & 0xf8) == 0x90
+		   && (call[1] & 0x7) == reg))
+	    return FALSE;
+	}
 
       r_symndx = ELF32_R_SYM (rel[1].r_info);
       if (r_symndx < symtab_hdr->sh_info)
 	return FALSE;
 
+      tls_get_addr = FALSE;
       h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-      /* Use strncmp to check ___tls_get_addr since ___tls_get_addr
-	 may be versioned.  */
-      return (h != NULL
-	      && h->root.root.string != NULL
-	      && (ELF32_R_TYPE (rel[1].r_info) == R_386_PC32
-		  || ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32)
-	      && (strncmp (h->root.root.string, "___tls_get_addr",
-			   15) == 0));
+      if (h != NULL && h->root.root.string != NULL)
+	{
+	  struct elf_i386_link_hash_entry *eh
+	    = (struct elf_i386_link_hash_entry *) h;
+	  tls_get_addr = eh->tls_get_addr == 1;
+	  if (eh->tls_get_addr > 1)
+	    {
+	      /* Use strncmp to check ___tls_get_addr since
+		 ___tls_get_addr may be versioned.  */
+	      if (strncmp (h->root.root.string, "___tls_get_addr", 15)
+		  == 0)
+		{
+		  eh->tls_get_addr = 1;
+		  tls_get_addr = TRUE;
+		}
+	      else
+		eh->tls_get_addr = 0;
+	    }
+	}
+
+      if (!tls_get_addr)
+	return FALSE;
+      else if (indirect_call)
+	return (ELF32_R_TYPE (rel[1].r_info) == R_386_GOT32X);
+      else
+	return (ELF32_R_TYPE (rel[1].r_info) == R_386_PC32
+		|| ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32);
 
     case R_386_TLS_IE:
       /* Check transition from IE access model:
@@ -1306,13 +1432,13 @@ elf_i386_check_tls_transition (bfd *abfd
 
     case R_386_TLS_DESC_CALL:
       /* Check transition from GDesc access model:
-		call *x@tlsdesc(%rax)
+		call *x@tlsdesc(%eax)
        */
       if (offset + 2 <= sec->size)
 	{
-	  /* Make sure that it's a call *x@tlsdesc(%rax).  */
-	  static const unsigned char call[] = { 0xff, 0x10 };
-	  return memcmp (contents + offset, call, 2) == 0;
+	  /* Make sure that it's a call *x@tlsdesc(%eax).  */
+	  call = contents + offset;
+	  return call[0] == 0xff && call[1] == 0x10;
 	}
 
       return FALSE;
@@ -1334,7 +1460,8 @@ elf_i386_tls_transition (struct bfd_link
 			 const Elf_Internal_Rela *rel,
 			 const Elf_Internal_Rela *relend,
 			 struct elf_link_hash_entry *h,
-			 unsigned long r_symndx)
+			 unsigned long r_symndx,
+			 bfd_boolean from_relocate_section)
 {
   unsigned int from_type = *r_type;
   unsigned int to_type = from_type;
@@ -1354,7 +1481,7 @@ elf_i386_tls_transition (struct bfd_link
     case R_386_TLS_IE_32:
     case R_386_TLS_IE:
     case R_386_TLS_GOTIE:
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (h == NULL)
 	    to_type = R_386_TLS_LE_32;
@@ -1363,14 +1490,13 @@ elf_i386_tls_transition (struct bfd_link
 	    to_type = R_386_TLS_IE_32;
 	}
 
-      /* When we are called from elf_i386_relocate_section, CONTENTS
-	 isn't NULL and there may be additional transitions based on
-	 TLS_TYPE.  */
-      if (contents != NULL)
+      /* When we are called from elf_i386_relocate_section, there may
+	 be additional transitions based on TLS_TYPE.  */
+      if (from_relocate_section)
 	{
 	  unsigned int new_to_type = to_type;
 
-	  if (info->executable
+	  if (bfd_link_executable (info)
 	      && h != NULL
 	      && h->dynindx == -1
 	      && (tls_type & GOT_TLS_IE))
@@ -1396,7 +1522,7 @@ elf_i386_tls_transition (struct bfd_link
       break;
 
     case R_386_TLS_LDM:
-      if (info->executable)
+      if (bfd_link_executable (info))
 	to_type = R_386_TLS_LE_32;
       break;
 
@@ -1410,7 +1536,7 @@ elf_i386_tls_transition (struct bfd_link
 
   /* Check if the transition can be performed.  */
   if (check
-      && ! elf_i386_check_tls_transition (abfd, sec, contents,
+      && ! elf_i386_check_tls_transition (sec, contents,
 					  symtab_hdr, sym_hashes,
 					  from_type, rel, relend))
     {
@@ -1439,7 +1565,8 @@ elf_i386_tls_transition (struct bfd_link
 	    }
 	}
 
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: TLS transition from %s to %s against `%s' at 0x%lx "
 	   "in section `%A' failed"),
 	 abfd, sec, from->name, to->name, name,
@@ -1452,9 +1579,262 @@ elf_i386_tls_transition (struct bfd_link
   return TRUE;
 }
 
+/* With the local symbol, foo, we convert
+   mov foo@GOT[(%reg1)], %reg2
+   to
+   lea foo[@GOTOFF(%reg1)], %reg2
+   and convert
+   call/jmp *foo@GOT[(%reg)]
+   to
+   nop call foo/jmp foo nop
+   When PIC is false, convert
+   test %reg1, foo@GOT[(%reg2)]
+   to
+   test $foo, %reg1
+   and convert
+   binop foo@GOT[(%reg1)], %reg2
+   to
+   binop $foo, %reg2
+   where binop is one of adc, add, and, cmp, or, sbb, sub, xor
+   instructions.  */
+
+static
+bfd_boolean
+elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
+			     bfd_byte *contents,
+			     Elf_Internal_Rela *irel,
+			     struct elf_link_hash_entry *h,
+			     bfd_boolean *converted,
+			     struct bfd_link_info *link_info)
+{
+  struct elf_i386_link_hash_table *htab;
+  unsigned int opcode;
+  unsigned int modrm;
+  bfd_boolean baseless;
+  Elf_Internal_Sym *isym;
+  unsigned int addend;
+  unsigned int nop;
+  bfd_vma nop_offset;
+  bfd_boolean is_pic;
+  bfd_boolean to_reloc_32;
+  unsigned int r_type;
+  unsigned int r_symndx;
+  bfd_vma roff = irel->r_offset;
+
+  if (roff < 2)
+    return TRUE;
+
+  /* Addend for R_386_GOT32X relocations must be 0.  */
+  addend = bfd_get_32 (abfd, contents + roff);
+  if (addend != 0)
+    return TRUE;
+
+  htab = elf_i386_hash_table (link_info);
+  is_pic = bfd_link_pic (link_info);
+
+  r_type = ELF32_R_TYPE (irel->r_info);
+  r_symndx = ELF32_R_SYM (irel->r_info);
+
+  modrm = bfd_get_8 (abfd, contents + roff - 1);
+  baseless = (modrm & 0xc7) == 0x5;
+
+  if (baseless && is_pic)
+    {
+      /* For PIC, disallow R_386_GOT32X without a base register
+	 since we don't know what the GOT base is.  */
+      const char *name;
+
+      if (h == NULL)
+	{
+	  isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd,
+					r_symndx);
+	  name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);
+	}
+      else
+	name = h->root.root.string;
+
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: direct GOT relocation R_386_GOT32X against `%s' without base register can not be used when making a shared object"),
+	 abfd, name);
+      return FALSE;
+    }
+
+  opcode = bfd_get_8 (abfd, contents + roff - 2);
+
+  /* Convert to R_386_32 if PIC is false or there is no base
+     register.  */
+  to_reloc_32 = !is_pic || baseless;
+
+  /* Try to convert R_386_GOT32X.  Get the symbol referred to by the
+     reloc.  */
+  if (h == NULL)
+    {
+      if (opcode == 0x0ff)
+	/* Convert "call/jmp *foo@GOT[(%reg)]".  */
+	goto convert_branch;
+      else
+	/* Convert "mov foo@GOT[(%reg1)], %reg2",
+	   "test %reg1, foo@GOT(%reg2)" and
+	   "binop foo@GOT[(%reg1)], %reg2". */
+	goto convert_load;
+    }
+
+  /* Undefined weak symbol is only bound locally in executable
+     and its reference is resolved as 0.  */
+  if (UNDEFINED_WEAK_RESOLVED_TO_ZERO (link_info, TRUE,
+				       elf_i386_hash_entry (h)))
+    {
+      if (opcode == 0xff)
+	{
+	  /* No direct branch to 0 for PIC.  */
+	  if (is_pic)
+	    return TRUE;
+	  else
+	    goto convert_branch;
+	}
+      else
+	{
+	  /* We can convert load of address 0 to R_386_32.  */
+	  to_reloc_32 = TRUE;
+	  goto convert_load;
+	}
+    }
+
+  if (opcode == 0xff)
+    {
+      /* We have "call/jmp *foo@GOT[(%reg)]".  */
+      if ((h->root.type == bfd_link_hash_defined
+	   || h->root.type == bfd_link_hash_defweak)
+	  && SYMBOL_REFERENCES_LOCAL (link_info, h))
+	{
+	  /* The function is locally defined.   */
+convert_branch:
+	  /* Convert R_386_GOT32X to R_386_PC32.  */
+	  if (modrm == 0x15 || (modrm & 0xf8) == 0x90)
+	    {
+	      struct elf_i386_link_hash_entry *eh
+		= (struct elf_i386_link_hash_entry *) h;
+
+	      /* Convert to "nop call foo".  ADDR_PREFIX_OPCODE
+		 is a nop prefix.  */
+	      modrm = 0xe8;
+	      /* To support TLS optimization, always use addr32 prefix
+		 for "call *___tls_get_addr@GOT(%reg)".  */
+	      if (eh && eh->tls_get_addr == 1)
+		{
+		  nop = 0x67;
+		  nop_offset = irel->r_offset - 2;
+		}
+	      else
+		{
+		  nop = link_info->call_nop_byte;
+		  if (link_info->call_nop_as_suffix)
+		    {
+		      nop_offset = roff + 3;
+		      irel->r_offset -= 1;
+		    }
+		  else
+		    nop_offset = roff - 2;
+		}
+	    }
+	  else
+	    {
+	      /* Convert to "jmp foo nop".  */
+	      modrm = 0xe9;
+	      nop = NOP_OPCODE;
+	      nop_offset = roff + 3;
+	      irel->r_offset -= 1;
+	    }
+
+	  bfd_put_8 (abfd, nop, contents + nop_offset);
+	  bfd_put_8 (abfd, modrm, contents + irel->r_offset - 1);
+	  /* When converting to PC-relative relocation, we
+	     need to adjust addend by -4.  */
+	  bfd_put_32 (abfd, -4, contents + irel->r_offset);
+	  irel->r_info = ELF32_R_INFO (r_symndx, R_386_PC32);
+
+	  *converted = TRUE;
+	}
+    }
+  else
+    {
+      /* We have "mov foo@GOT[(%re1g)], %reg2",
+	 "test %reg1, foo@GOT(%reg2)" and
+	 "binop foo@GOT[(%reg1)], %reg2".
+
+	 Avoid optimizing _DYNAMIC since ld.so may use its
+	 link-time address.  */
+      if (h == htab->elf.hdynamic)
+	return TRUE;
+
+      /* def_regular is set by an assignment in a linker script in
+	 bfd_elf_record_link_assignment.  */
+      if ((h->def_regular
+	   || h->root.type == bfd_link_hash_defined
+	   || h->root.type == bfd_link_hash_defweak)
+	  && SYMBOL_REFERENCES_LOCAL (link_info, h))
+	{
+convert_load:
+	  if (opcode == 0x8b)
+	    {
+	      if (to_reloc_32)
+		{
+		  /* Convert "mov foo@GOT[(%reg1)], %reg2" to
+		     "mov $foo, %reg2" with R_386_32.  */
+		  r_type = R_386_32;
+		  modrm = 0xc0 | (modrm & 0x38) >> 3;
+		  bfd_put_8 (abfd, modrm, contents + roff - 1);
+		  opcode = 0xc7;
+		}
+	      else
+		{
+		  /* Convert "mov foo@GOT(%reg1), %reg2" to
+		     "lea foo@GOTOFF(%reg1), %reg2".  */
+		  r_type = R_386_GOTOFF;
+		  opcode = 0x8d;
+		}
+	    }
+	  else
+	    {
+	      /* Only R_386_32 is supported.  */
+	      if (!to_reloc_32)
+		return TRUE;
+
+	      if (opcode == 0x85)
+		{
+		  /* Convert "test %reg1, foo@GOT(%reg2)" to
+		     "test $foo, %reg1".  */
+		  modrm = 0xc0 | (modrm & 0x38) >> 3;
+		  opcode = 0xf7;
+		}
+	      else
+		{
+		  /* Convert "binop foo@GOT(%reg1), %reg2" to
+		     "binop $foo, %reg2".  */
+		  modrm = (0xc0
+			   | (modrm & 0x38) >> 3
+			   | (opcode & 0x3c));
+		  opcode = 0x81;
+		}
+	      bfd_put_8 (abfd, modrm, contents + roff - 1);
+	      r_type = R_386_32;
+	    }
+
+	  bfd_put_8 (abfd, opcode, contents + roff - 2);
+	  irel->r_info = ELF32_R_INFO (r_symndx, r_type);
+
+	  *converted = TRUE;
+	}
+    }
+
+  return TRUE;
+}
+
 /* Rename some of the generic section flags to better document how they
    are used here.  */
-#define need_convert_mov_to_lea sec_flg0
+#define need_convert_load	sec_flg0
+#define check_relocs_failed	sec_flg1
 
 /* Look through the relocs for a section during the first phase, and
    calculate needed space in the global offset table, procedure linkage
@@ -1472,16 +1852,38 @@ elf_i386_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   asection *sreloc;
+  bfd_byte *contents;
   bfd_boolean use_plt_got;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  /* Don't do anything special with non-loaded, non-alloced sections.
+     In particular, any relocs in such sections should not affect GOT
+     and PLT reference counting (ie. we don't allow them to create GOT
+     or PLT entries), there's no possibility or desire to optimize TLS
+     relocs, and there's not much point in propagating relocs to shared
+     libs that the dynamic linker won't relocate.  */
+  if ((sec->flags & SEC_ALLOC) == 0)
     return TRUE;
 
   BFD_ASSERT (is_i386_elf (abfd));
 
   htab = elf_i386_hash_table (info);
   if (htab == NULL)
-    return FALSE;
+    {
+      sec->check_relocs_failed = 1;
+      return FALSE;
+    }
+
+  /* Get the section contents.  */
+  if (elf_section_data (sec)->this_hdr.contents != NULL)
+    contents = elf_section_data (sec)->this_hdr.contents;
+  else if (!bfd_malloc_and_get_section (abfd, sec, &contents))
+    {
+      sec->check_relocs_failed = 1;
+      return FALSE;
+    }
 
   use_plt_got = (!get_elf_i386_backend_data (abfd)->is_vxworks
 		 && (get_elf_i386_backend_data (abfd)
@@ -1508,10 +1910,10 @@ elf_i386_check_relocs (bfd *abfd,
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd,
-				 r_symndx);
-	  return FALSE;
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
+	  goto error_return;
 	}
 
       if (r_symndx < symtab_hdr->sh_info)
@@ -1520,14 +1922,14 @@ elf_i386_check_relocs (bfd *abfd,
 	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
 					abfd, r_symndx);
 	  if (isym == NULL)
-	    return FALSE;
+	    goto error_return;
 
 	  /* Check relocation against local STT_GNU_IFUNC symbol.  */
 	  if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
 	    {
 	      h = elf_i386_get_local_sym_hash (htab, abfd, rel, TRUE);
 	      if (h == NULL)
-		return FALSE;
+		goto error_return;
 
 	      /* Fake a STT_GNU_IFUNC symbol.  */
 	      h->type = STT_GNU_IFUNC;
@@ -1551,10 +1953,6 @@ elf_i386_check_relocs (bfd *abfd,
       eh = (struct elf_i386_link_hash_entry *) h;
       if (h != NULL)
 	{
-	  /* Create the ifunc sections for static executables.  If we
-	     never see an indirect function symbol nor we are building
-	     a static executable, those sections will be empty and
-	     won't appear in output.  */
 	  switch (r_type)
 	    {
 	    default:
@@ -1562,27 +1960,36 @@ elf_i386_check_relocs (bfd *abfd,
 
 	    case R_386_GOTOFF:
 	      eh->gotoff_ref = 1;
+	      /* Fall through.  */
 	    case R_386_32:
 	    case R_386_PC32:
 	    case R_386_PLT32:
 	    case R_386_GOT32:
+	    case R_386_GOT32X:
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
-	      if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info))
-		return FALSE;
+	      /* Create the ifunc sections for static executables.  */
+	      if (h->type == STT_GNU_IFUNC
+		  && !_bfd_elf_create_ifunc_sections (htab->elf.dynobj,
+						      info))
+		goto error_return;
 	      break;
 	    }
 
 	  /* It is referenced by a non-shared object. */
 	  h->ref_regular = 1;
 	  h->root.non_ir_ref = 1;
+
+	  if (h->type == STT_GNU_IFUNC)
+	    elf_tdata (info->output_bfd)->has_gnu_symbols
+	      |= elf_gnu_symbol_ifunc;
 	}
 
-      if (! elf_i386_tls_transition (info, abfd, sec, NULL,
+      if (! elf_i386_tls_transition (info, abfd, sec, contents,
 				     symtab_hdr, sym_hashes,
 				     &r_type, GOT_UNKNOWN,
-				     rel, rel_end, h, r_symndx))
-	return FALSE;
+				     rel, rel_end, h, r_symndx, FALSE))
+	goto error_return;
 
       switch (r_type)
 	{
@@ -1603,6 +2010,7 @@ elf_i386_check_relocs (bfd *abfd,
 	  if (h == NULL)
 	    continue;
 
+	  eh->has_got_reloc = 1;
 	  h->needs_plt = 1;
 	  h->plt.refcount += 1;
 	  break;
@@ -1614,11 +2022,12 @@ elf_i386_check_relocs (bfd *abfd,
 	case R_386_TLS_IE_32:
 	case R_386_TLS_IE:
 	case R_386_TLS_GOTIE:
-	  if (!info->executable)
+	  if (!bfd_link_executable (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
 	case R_386_GOT32:
+	case R_386_GOT32X:
 	case R_386_TLS_GD:
 	case R_386_TLS_GOTDESC:
 	case R_386_TLS_DESC_CALL:
@@ -1629,7 +2038,10 @@ elf_i386_check_relocs (bfd *abfd,
 	    switch (r_type)
 	      {
 	      default:
-	      case R_386_GOT32: tls_type = GOT_NORMAL; break;
+	      case R_386_GOT32:
+	      case R_386_GOT32X:
+		tls_type = GOT_NORMAL;
+		break;
 	      case R_386_TLS_GD: tls_type = GOT_TLS_GD; break;
 	      case R_386_TLS_GOTDESC:
 	      case R_386_TLS_DESC_CALL:
@@ -1668,7 +2080,7 @@ elf_i386_check_relocs (bfd *abfd,
 		    local_got_refcounts = (bfd_signed_vma *)
                         bfd_zalloc (abfd, size);
 		    if (local_got_refcounts == NULL)
-		      return FALSE;
+		      goto error_return;
 		    elf_local_got_refcounts (abfd) = local_got_refcounts;
 		    elf_i386_local_tlsdesc_gotent (abfd)
 		      = (bfd_vma *) (local_got_refcounts + symtab_hdr->sh_info);
@@ -1699,12 +2111,13 @@ elf_i386_check_relocs (bfd *abfd,
 		    else
 		      name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
 					     NULL);
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as normal and "
 			 "thread local symbol"),
 		       abfd, name);
 		    bfd_set_error (bfd_error_bad_value);
-		    return FALSE;
+		    goto error_return;
 		  }
 	      }
 
@@ -1726,22 +2139,36 @@ elf_i386_check_relocs (bfd *abfd,
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
 	      if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
-		return FALSE;
+		goto error_return;
 	    }
 	  if (r_type != R_386_TLS_IE)
-	    break;
+	    {
+	      if (eh != NULL)
+		eh->has_got_reloc = 1;
+	      break;
+	    }
 	  /* Fall through */
 
 	case R_386_TLS_LE_32:
 	case R_386_TLS_LE:
-	  if (info->executable)
+	  if (eh != NULL)
+	    eh->has_got_reloc = 1;
+	  if (bfd_link_executable (info))
 	    break;
 	  info->flags |= DF_STATIC_TLS;
-	  /* Fall through */
+	  goto do_relocation;
 
 	case R_386_32:
 	case R_386_PC32:
-	  if (h != NULL && info->executable)
+	  if (eh != NULL && (sec->flags & SEC_CODE) != 0)
+	    eh->has_non_got_reloc = 1;
+do_relocation:
+	  /* We are called after all symbols have been resolved.  Only
+	     relocation against STT_GNU_IFUNC symbol must go through
+	     PLT.  */
+	  if (h != NULL
+	      && (bfd_link_executable (info)
+		  || h->type == STT_GNU_IFUNC))
 	    {
 	      /* If this reloc is in a read-only section, we might
 		 need a copy reloc.  We can't check reliably at this
@@ -1751,11 +2178,44 @@ elf_i386_check_relocs (bfd *abfd,
 		 adjust_dynamic_symbol.  */
 	      h->non_got_ref = 1;
 
-	      /* We may need a .plt entry if the function this reloc
-		 refers to is in a shared lib.  */
-	      h->plt.refcount += 1;
-	      if (r_type != R_386_PC32)
-		h->pointer_equality_needed = 1;
+	      /* We may need a .plt entry if the symbol is a function
+		 defined in a shared lib or is a STT_GNU_IFUNC function
+		 referenced from the code or read-only section.  */
+	      if (!h->def_regular
+		  || (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
+		h->plt.refcount += 1;
+
+	      if (r_type == R_386_PC32)
+		{
+		  /* Since something like ".long foo - ." may be used
+		     as pointer, make sure that PLT is used if foo is
+		     a function defined in a shared library.  */
+		  if ((sec->flags & SEC_CODE) == 0)
+		    h->pointer_equality_needed = 1;
+		  else if (h->type == STT_GNU_IFUNC
+			   && bfd_link_pic (info))
+		    {
+		    if (isym == NULL)
+		      name = h->root.root.string;
+		    else
+		      name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
+					       NULL);
+		    _bfd_error_handler
+		      /* xgettext:c-format */
+		      (_("%B: unsupported non-PIC call to IFUNC `%s'"),
+		       abfd, name);
+		      bfd_set_error (bfd_error_bad_value);
+		      goto error_return;
+		    }
+		}
+	      else
+		{
+		  h->pointer_equality_needed = 1;
+		  /* R_386_32 can be resolved at run-time.  */
+		  if (r_type == R_386_32
+		      && (sec->flags & SEC_READONLY) == 0)
+		    eh->func_pointer_refcount += 1;
+		}
 	    }
 
 	  size_reloc = FALSE;
@@ -1780,17 +2240,23 @@ do_size:
 	     If on the other hand, we are creating an executable, we
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
-	     symbol.  */
-	  if ((info->shared
-	       && (sec->flags & SEC_ALLOC) != 0
+	     symbol.
+
+	     Generate dynamic pointer relocation against STT_GNU_IFUNC
+	     symbol in the non-code section.  */
+	  if ((bfd_link_pic (info)
 	       && (r_type != R_386_PC32
 		   || (h != NULL
-		       && (! SYMBOLIC_BIND (info, h)
+		       && (! (bfd_link_pie (info)
+			      || SYMBOLIC_BIND (info, h))
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
+	      || (h != NULL
+		  && h->type == STT_GNU_IFUNC
+		  && r_type == R_386_32
+		  && (sec->flags & SEC_CODE) == 0)
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
-		  && (sec->flags & SEC_ALLOC) != 0
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular)))
@@ -1810,7 +2276,7 @@ do_size:
 		    (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ FALSE);
 
 		  if (sreloc == NULL)
-		    return FALSE;
+		    goto error_return;
 		}
 
 	      /* If this is a global symbol, we count the number of
@@ -1830,7 +2296,7 @@ do_size:
 		  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
 						abfd, r_symndx);
 		  if (isym == NULL)
-		    return FALSE;
+		    goto error_return;
 
 		  s = bfd_section_from_elf_index (abfd, isym->st_shndx);
 		  if (s == NULL)
@@ -1847,7 +2313,7 @@ do_size:
 		  p = (struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj,
                                                            amt);
 		  if (p == NULL)
-		    return FALSE;
+		    goto error_return;
 		  p->next = *head;
 		  *head = p;
 		  p->sec = sec;
@@ -1866,7 +2332,7 @@ do_size:
 	     Reconstruct it for later use during GC.  */
 	case R_386_GNU_VTINHERIT:
 	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
-	    return FALSE;
+	    goto error_return;
 	  break;
 
 	  /* This relocation describes which C++ vtable entries are actually
@@ -1875,7 +2341,7 @@ do_size:
 	  BFD_ASSERT (h != NULL);
 	  if (h != NULL
 	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
-	    return FALSE;
+	    goto error_return;
 	  break;
 
 	default:
@@ -1913,15 +2379,50 @@ do_size:
 	      || !bfd_set_section_alignment (htab->elf.dynobj,
 					     htab->plt_got,
 					     plt_got_align))
-	    return FALSE;
+	    goto error_return;
+
+	  if (!info->no_ld_generated_unwind_info
+	      && htab->plt_got_eh_frame == NULL
+	      && get_elf_i386_backend_data (abfd)->plt->eh_frame_plt_got != NULL)
+	    {
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+				| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+				| SEC_LINKER_CREATED);
+	      htab->plt_got_eh_frame
+		= bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+						      ".eh_frame",
+						      flags);
+	      if (htab->plt_got_eh_frame == NULL
+		  || !bfd_set_section_alignment (htab->elf.dynobj,
+						 htab->plt_got_eh_frame,
+						 2))
+		goto error_return;
+	    }
 	}
 
-      if (r_type == R_386_GOT32
+      if (r_type == R_386_GOT32X
 	  && (h == NULL || h->type != STT_GNU_IFUNC))
-	sec->need_convert_mov_to_lea = 1;
+	sec->need_convert_load = 1;
+    }
+
+  if (elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (!info->keep_memory)
+	free (contents);
+      else
+	{
+	  /* Cache the section contents for elf_link_input_bfd.  */
+	  elf_section_data (sec)->this_hdr.contents = contents;
+	}
     }
 
   return TRUE;
+
+error_return:
+  if (elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  sec->check_relocs_failed = 1;
+  return FALSE;
 }
 
 /* Return the section that should be marked against GC for a given
@@ -1945,151 +2446,22 @@ elf_i386_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
-/* Update the got entry reference counts for the section being removed.  */
+/* Remove undefined weak symbol from the dynamic symbol table if it
+   is resolved to 0.   */
 
 static bfd_boolean
-elf_i386_gc_sweep_hook (bfd *abfd,
-			struct bfd_link_info *info,
-			asection *sec,
-			const Elf_Internal_Rela *relocs)
+elf_i386_fixup_symbol (struct bfd_link_info *info,
+		       struct elf_link_hash_entry *h)
 {
-  struct elf_i386_link_hash_table *htab;
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  bfd_signed_vma *local_got_refcounts;
-  const Elf_Internal_Rela *rel, *relend;
-
-  if (info->relocatable)
-    return TRUE;
-
-  htab = elf_i386_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  elf_section_data (sec)->local_dynrel = NULL;
-
-  symtab_hdr = &elf_symtab_hdr (abfd);
-  sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (abfd);
-
-  relend = relocs + sec->reloc_count;
-  for (rel = relocs; rel < relend; rel++)
-    {
-      unsigned long r_symndx;
-      unsigned int r_type;
-      struct elf_link_hash_entry *h = NULL;
-
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx >= symtab_hdr->sh_info)
-	{
-	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	}
-      else
-	{
-	  /* A local symbol.  */
-	  Elf_Internal_Sym *isym;
-
-	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
-					abfd, r_symndx);
-
-	  /* Check relocation against local STT_GNU_IFUNC symbol.  */
-	  if (isym != NULL
-	      && ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
-	    {
-	      h = elf_i386_get_local_sym_hash (htab, abfd, rel, FALSE);
-	      if (h == NULL)
-		abort ();
-	    }
-	}
-
-      if (h)
-	{
-	  struct elf_i386_link_hash_entry *eh;
-	  struct elf_dyn_relocs **pp;
-	  struct elf_dyn_relocs *p;
-
-	  eh = (struct elf_i386_link_hash_entry *) h;
-	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
-	    if (p->sec == sec)
-	      {
-		/* Everything must go for SEC.  */
-		*pp = p->next;
-		break;
-	      }
-	}
-
-      r_type = ELF32_R_TYPE (rel->r_info);
-      if (! elf_i386_tls_transition (info, abfd, sec, NULL,
-				     symtab_hdr, sym_hashes,
-				     &r_type, GOT_UNKNOWN,
-				     rel, relend, h, r_symndx))
-	return FALSE;
-
-      switch (r_type)
-	{
-	case R_386_TLS_LDM:
-	  if (htab->tls_ldm_got.refcount > 0)
-	    htab->tls_ldm_got.refcount -= 1;
-	  break;
-
-	case R_386_TLS_GD:
-	case R_386_TLS_GOTDESC:
-	case R_386_TLS_DESC_CALL:
-	case R_386_TLS_IE_32:
-	case R_386_TLS_IE:
-	case R_386_TLS_GOTIE:
-	case R_386_GOT32:
-	  if (h != NULL)
-	    {
-	      if (h->got.refcount > 0)
-		h->got.refcount -= 1;
-	      if (h->type == STT_GNU_IFUNC)
-		{
-		  if (h->plt.refcount > 0)
-		    h->plt.refcount -= 1;
-		}
-	    }
-	  else if (local_got_refcounts != NULL)
-	    {
-	      if (local_got_refcounts[r_symndx] > 0)
-		local_got_refcounts[r_symndx] -= 1;
-	    }
-	  break;
-
-	case R_386_32:
-	case R_386_PC32:
-	case R_386_SIZE32:
-	  if (info->shared
-	      && (h == NULL || h->type != STT_GNU_IFUNC))
-	    break;
-	  /* Fall through */
-
-	case R_386_PLT32:
-	  if (h != NULL)
-	    {
-	      if (h->plt.refcount > 0)
-		h->plt.refcount -= 1;
-	    }
-	  break;
-
-	case R_386_GOTOFF:
-	  if (h != NULL && h->type == STT_GNU_IFUNC)
-	    {
-	      if (h->got.refcount > 0)
-		h->got.refcount -= 1;
-	      if (h->plt.refcount > 0)
-		h->plt.refcount -= 1;
-	    }
-	  break;
-
-	default:
-	  break;
-	}
+  if (h->dynindx != -1
+      && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+					  elf_i386_hash_entry (h)->has_got_reloc,
+					  elf_i386_hash_entry (h)))
+    {
+      h->dynindx = -1;
+      _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+			      h->dynstr_index);
     }
-
   return TRUE;
 }
 
@@ -2104,7 +2476,7 @@ elf_i386_adjust_dynamic_symbol (struct b
 				struct elf_link_hash_entry *h)
 {
   struct elf_i386_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
@@ -2134,12 +2506,17 @@ elf_i386_adjust_dynamic_symbol (struct b
 
 	  if (pc_count || count)
 	    {
-	      h->needs_plt = 1;
 	      h->non_got_ref = 1;
-	      if (h->plt.refcount <= 0)
-		h->plt.refcount = 1;
-	      else
-		h->plt.refcount += 1;
+	      if (pc_count)
+		{
+		  /* Increment PLT reference count only for PC-relative
+		     references.  */
+		  h->needs_plt = 1;
+		  if (h->plt.refcount <= 0)
+		    h->plt.refcount = 1;
+		  else
+		    h->plt.refcount += 1;
+		}
 	    }
 	}
 
@@ -2202,7 +2579,7 @@ elf_i386_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (!info->executable)
+  if (!bfd_link_executable (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2259,14 +2636,22 @@ elf_i386_adjust_dynamic_symbol (struct b
   /* We must generate a R_386_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rel);
+      srel->size += sizeof (Elf32_External_Rel);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -2281,6 +2666,7 @@ elf_i386_allocate_dynrelocs (struct elf_
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
   unsigned plt_entry_size;
+  bfd_boolean resolved_to_zero;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
@@ -2294,6 +2680,15 @@ elf_i386_allocate_dynrelocs (struct elf_
 
   plt_entry_size = GET_PLT_ENTRY_SIZE (info->output_bfd);
 
+  resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+						      eh->has_got_reloc,
+						      eh);
+
+  /* Clear the reference count of function pointer relocations if
+     symbol isn't a normal function.  */
+  if (h->type != STT_FUNC)
+    eh->func_pointer_refcount = 0;
+
   /* We can't use the GOT PLT if pointer equality is needed since
      finish_dynamic_symbol won't clear symbol value and the dynamic
      linker won't update the GOT slot.  We will get into an infinite
@@ -2317,13 +2712,21 @@ elf_i386_allocate_dynrelocs (struct elf_
   if (h->type == STT_GNU_IFUNC
       && h->def_regular)
     return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, &eh->dyn_relocs,
-                                               plt_entry_size,
-					       plt_entry_size, 4);
+					       &htab->readonly_dynrelocs_against_ifunc,
+					       plt_entry_size,
+					       plt_entry_size, 4, TRUE);
+  /* Don't create the PLT entry if there are only function pointer
+     relocations which can be resolved at run-time.  */
   else if (htab->elf.dynamic_sections_created
-	   && (h->plt.refcount > 0 || eh->plt_got.refcount > 0))
+	   && (h->plt.refcount > eh->func_pointer_refcount
+	       || eh->plt_got.refcount > 0))
     {
       bfd_boolean use_plt_got;
 
+      /* Clear the reference count of function pointer relocations
+	 if PLT is used.  */
+      eh->func_pointer_refcount = 0;
+
       if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
 	{
 	  /* Don't use the regular PLT for DF_BIND_NOW. */
@@ -2339,13 +2742,14 @@ elf_i386_allocate_dynrelocs (struct elf_
       /* Make sure this symbol is output as a dynamic symbol.
 	 Undefined weak syms won't yet be marked as dynamic.  */
       if (h->dynindx == -1
-	  && !h->forced_local)
+	  && !h->forced_local
+	  && !resolved_to_zero)
 	{
 	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->elf.splt;
@@ -2367,7 +2771,7 @@ elf_i386_allocate_dynrelocs (struct elf_
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      if (use_plt_got)
@@ -2396,13 +2800,19 @@ elf_i386_allocate_dynrelocs (struct elf_
 		 script.  */
 	      htab->elf.sgotplt->size += 4;
 
-	      /* We also need to make an entry in the .rel.plt section.  */
-	      htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
-	      htab->elf.srelplt->reloc_count++;
+	      /* There should be no PLT relocation against resolved
+		 undefined weak symbol in executable.  */
+	      if (!resolved_to_zero)
+		{
+		  /* We also need to make an entry in the .rel.plt
+		     section.  */
+		  htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
+		  htab->elf.srelplt->reloc_count++;
+		}
 	    }
 
 	  if (get_elf_i386_backend_data (info->output_bfd)->is_vxworks
-              && !info->shared)
+              && !bfd_link_pic (info))
 	    {
 	      /* VxWorks has a second set of relocations for each PLT entry
 		 in executables.  They go in a separate relocation section,
@@ -2424,12 +2834,14 @@ elf_i386_allocate_dynrelocs (struct elf_
 	}
       else
 	{
+	  eh->plt_got.offset = (bfd_vma) -1;
 	  h->plt.offset = (bfd_vma) -1;
 	  h->needs_plt = 0;
 	}
     }
   else
     {
+      eh->plt_got.offset = (bfd_vma) -1;
       h->plt.offset = (bfd_vma) -1;
       h->needs_plt = 0;
     }
@@ -2439,7 +2851,7 @@ elf_i386_allocate_dynrelocs (struct elf_
   /* If R_386_TLS_{IE_32,IE,GOTIE} symbol is now local to the binary,
      make it a R_386_TLS_LE_32 requiring no TLS entry.  */
   if (h->got.refcount > 0
-      && info->executable
+      && bfd_link_executable (info)
       && h->dynindx == -1
       && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE))
     h->got.offset = (bfd_vma) -1;
@@ -2452,7 +2864,8 @@ elf_i386_allocate_dynrelocs (struct elf_
       /* Make sure this symbol is output as a dynamic symbol.
 	 Undefined weak syms won't yet be marked as dynamic.  */
       if (h->dynindx == -1
-	  && !h->forced_local)
+	  && !h->forced_local
+	  && !resolved_to_zero)
 	{
 	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
 	    return FALSE;
@@ -2480,7 +2893,8 @@ elf_i386_allocate_dynrelocs (struct elf_
 	 R_386_TLS_IE resp. R_386_TLS_GOTIE needs one dynamic relocation,
 	 (but if both R_386_TLS_IE_32 and R_386_TLS_IE is present, we
 	 need two), R_386_TLS_GD needs one if local symbol and two if
-	 global.  */
+	 global.  No dynamic relocation against resolved undefined weak
+	 symbol in executable.  */
       if (tls_type == GOT_TLS_IE_BOTH)
 	htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel);
       else if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1)
@@ -2489,9 +2903,10 @@ elf_i386_allocate_dynrelocs (struct elf_
       else if (GOT_TLS_GD_P (tls_type))
 	htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel);
       else if (! GOT_TLS_GDESC_P (tls_type)
-	       && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+	       && ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		    && !resolved_to_zero)
 		   || h->root.type != bfd_link_hash_undefweak)
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	htab->elf.srelgot->size += sizeof (Elf32_External_Rel);
       if (GOT_TLS_GDESC_P (tls_type))
@@ -2509,7 +2924,7 @@ elf_i386_allocate_dynrelocs (struct elf_
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       /* The only reloc that uses pc_count is R_386_PC32, which will
 	 appear on a call or on something like ".long foo - .".  We
@@ -2545,15 +2960,43 @@ elf_i386_allocate_dynrelocs (struct elf_
 	}
 
       /* Also discard relocs on undefined weak syms with non-default
-    	 visibility.  */
+	 visibility or in PIE.  */
       if (eh->dyn_relocs != NULL
 	  && h->root.type == bfd_link_hash_undefweak)
 	{
-	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-	    eh->dyn_relocs = NULL;
+	  /* Undefined weak symbol is never bound locally in shared
+	     library.  */
+	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+	      || resolved_to_zero)
+	    {
+	      if (h->non_got_ref)
+		{
+		  /* Keep dynamic non-GOT/non-PLT relocation so that we
+		     can branch to 0 without PLT.  */
+		  struct elf_dyn_relocs **pp;
+
+		  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+		    if (p->pc_count == 0)
+		      *pp = p->next;
+		    else
+		      {
+			/* Remove non-R_386_PC32 relocation.  */
+			p->count = p->pc_count;
+			pp = &p->next;
+		      }
 
-	  /* Make sure undefined weak symbols are output as a dynamic
-	     symbol in PIEs.  */
+		  if (eh->dyn_relocs != NULL)
+		    {
+		      /* Make sure undefined weak symbols are output
+			 as dynamic symbols in PIEs for dynamic non-GOT
+			 non-PLT reloations.  */
+		      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+			return FALSE;
+		    }
+		}
+	      else
+		eh->dyn_relocs = NULL;
+	    }
 	  else if (h->dynindx == -1
 		   && !h->forced_local)
 	    {
@@ -2566,9 +3009,13 @@ elf_i386_allocate_dynrelocs (struct elf_
     {
       /* For the non-shared case, discard space for relocs against
 	 symbols which turn out to need copy relocs or are not
-	 dynamic.  */
+	 dynamic.  Keep dynamic relocations for run-time function
+	 pointer initialization.  */
 
-      if (!h->non_got_ref
+      if ((!h->non_got_ref
+	   || eh->func_pointer_refcount > 0
+	   || (h->root.type == bfd_link_hash_undefweak
+	       && !resolved_to_zero))
 	  && ((h->def_dynamic
 	       && !h->def_regular)
 	      || (htab->elf.dynamic_sections_created
@@ -2578,7 +3025,8 @@ elf_i386_allocate_dynrelocs (struct elf_
 	  /* Make sure this symbol is output as a dynamic symbol.
 	     Undefined weak syms won't yet be marked as dynamic.  */
 	  if (h->dynindx == -1
-	      && !h->forced_local)
+	      && !h->forced_local
+	      && !resolved_to_zero)
 	    {
 	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
 		return FALSE;
@@ -2591,6 +3039,7 @@ elf_i386_allocate_dynrelocs (struct elf_
 	}
 
       eh->dyn_relocs = NULL;
+      eh->func_pointer_refcount = 0;
 
     keep: ;
     }
@@ -2651,8 +3100,9 @@ elf_i386_readonly_dynrelocs (struct elf_
 
 	  info->flags |= DF_TEXTREL;
 
-	  if ((info->warn_shared_textrel && info->shared)
+	  if ((info->warn_shared_textrel && bfd_link_pic (info))
 	      || info->error_textrel)
+	    /* xgettext:c-format */
 	    info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'\n"),
 				    p->sec->owner, h->root.root.string,
 				    p->sec);
@@ -2664,23 +3114,18 @@ elf_i386_readonly_dynrelocs (struct elf_
   return TRUE;
 }
 
-/* Convert
-   mov foo@GOT(%reg), %reg
-   to
-   lea foo@GOTOFF(%reg), %reg
-   with the local symbol, foo.  */
+/* Convert load via the GOT slot to load immediate.  */
 
 static bfd_boolean
-elf_i386_convert_mov_to_lea (bfd *abfd, asection *sec,
-			     struct bfd_link_info *link_info)
+elf_i386_convert_load (bfd *abfd, asection *sec,
+		       struct bfd_link_info *link_info)
 {
+  struct elf_i386_link_hash_table *htab;
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *internal_relocs;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents;
-  struct elf_i386_link_hash_table *htab;
-  bfd_boolean changed_contents;
-  bfd_boolean changed_relocs;
+  bfd_boolean changed;
   bfd_signed_vma *local_got_refcounts;
 
   /* Don't even try to convert non-ELF outputs.  */
@@ -2689,7 +3134,7 @@ elf_i386_convert_mov_to_lea (bfd *abfd, 
 
   /* Nothing to do if there is no need or no output.  */
   if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
-      || sec->need_convert_mov_to_lea == 0
+      || sec->need_convert_load == 0
       || bfd_is_abs_section (sec->output_section))
     return TRUE;
 
@@ -2702,9 +3147,8 @@ elf_i386_convert_mov_to_lea (bfd *abfd, 
   if (internal_relocs == NULL)
     return FALSE;
 
+  changed = FALSE;
   htab = elf_i386_hash_table (link_info);
-  changed_contents = FALSE;
-  changed_relocs = FALSE;
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
   /* Get the section contents.  */
@@ -2720,67 +3164,58 @@ elf_i386_convert_mov_to_lea (bfd *abfd, 
   for (irel = internal_relocs; irel < irelend; irel++)
     {
       unsigned int r_type = ELF32_R_TYPE (irel->r_info);
-      unsigned int r_symndx = ELF32_R_SYM (irel->r_info);
-      unsigned int indx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
+      bfd_boolean converted;
 
-      if (r_type != R_386_GOT32)
+      /* Don't convert R_386_GOT32 since we can't tell if it is applied
+	 to "mov $foo@GOT, %reg" which isn't a load via GOT.  */
+      if (r_type != R_386_GOT32X)
 	continue;
 
-      /* Get the symbol referred to by the reloc.  */
+      r_symndx = ELF32_R_SYM (irel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
+	h = elf_i386_get_local_sym_hash (htab, sec->owner,
+					 (const Elf_Internal_Rela *) irel,
+					 FALSE);
+      else
 	{
-	  Elf_Internal_Sym *isym;
+	  h = elf_sym_hashes (abfd)[r_symndx - symtab_hdr->sh_info];
+	   while (h->root.type == bfd_link_hash_indirect
+		  || h->root.type == bfd_link_hash_warning)
+	     h = (struct elf_link_hash_entry *) h->root.u.i.link;
+	}
 
-	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
-					abfd, r_symndx);
+      /* STT_GNU_IFUNC must keep GOT32 relocations.  */
+      if (h != NULL && h->type == STT_GNU_IFUNC)
+	continue;
 
-	  /* STT_GNU_IFUNC must keep R_386_GOT32 relocation.  */
-	  if (ELF_ST_TYPE (isym->st_info) != STT_GNU_IFUNC
-	      && irel->r_offset >= 2
-	      && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
+      converted = FALSE;
+      if (!elf_i386_convert_load_reloc (abfd, symtab_hdr, contents,
+					irel, h, &converted, link_info))
+	goto error_return;
+
+      if (converted)
+	{
+	  changed = converted;
+	  if (h)
+	    {
+	      if (h->got.refcount > 0)
+		h->got.refcount -= 1;
+	    }
+	  else
 	    {
-	      bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
-	      irel->r_info = ELF32_R_INFO (r_symndx, R_386_GOTOFF);
 	      if (local_got_refcounts != NULL
 		  && local_got_refcounts[r_symndx] > 0)
 		local_got_refcounts[r_symndx] -= 1;
-	      changed_contents = TRUE;
-	      changed_relocs = TRUE;
 	    }
-	  continue;
-	}
-
-      indx = r_symndx - symtab_hdr->sh_info;
-      h = elf_sym_hashes (abfd)[indx];
-      BFD_ASSERT (h != NULL);
-
-      while (h->root.type == bfd_link_hash_indirect
-	     || h->root.type == bfd_link_hash_warning)
-	h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-      /* STT_GNU_IFUNC must keep R_386_GOT32 relocation.  We also avoid
-	 optimizing _DYNAMIC since ld.so may use its link-time address.  */
-      if (h->def_regular
-	  && h->type != STT_GNU_IFUNC
-	  && h != htab->elf.hdynamic
-	  && SYMBOL_REFERENCES_LOCAL (link_info, h)
-	  && irel->r_offset >= 2
-	  && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
-	{
-	  bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
-	  irel->r_info = ELF32_R_INFO (r_symndx, R_386_GOTOFF);
-	  if (h->got.refcount > 0)
-	    h->got.refcount -= 1;
-	  changed_contents = TRUE;
-	  changed_relocs = TRUE;
 	}
     }
 
   if (contents != NULL
       && elf_section_data (sec)->this_hdr.contents != contents)
     {
-      if (!changed_contents && !link_info->keep_memory)
+      if (!changed && !link_info->keep_memory)
 	free (contents);
       else
 	{
@@ -2791,7 +3226,7 @@ elf_i386_convert_mov_to_lea (bfd *abfd, 
 
   if (elf_section_data (sec)->relocs != internal_relocs)
     {
-      if (!changed_relocs)
+      if (!changed)
 	free (internal_relocs);
       else
 	elf_section_data (sec)->relocs = internal_relocs;
@@ -2827,19 +3262,6 @@ elf_i386_size_dynamic_sections (bfd *out
   if (dynobj == NULL)
     abort ();
 
-  if (htab->elf.dynamic_sections_created)
-    {
-      /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
-	{
-	  s = bfd_get_linker_section (dynobj, ".interp");
-	  if (s == NULL)
-	    abort ();
-	  s->size = sizeof ELF_DYNAMIC_INTERPRETER;
-	  s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
-	}
-    }
-
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
@@ -2859,7 +3281,7 @@ elf_i386_size_dynamic_sections (bfd *out
 	{
 	  struct elf_dyn_relocs *p;
 
-	  if (!elf_i386_convert_mov_to_lea (ibfd, s, info))
+	  if (!elf_i386_convert_load (ibfd, s, info))
 	    return FALSE;
 
 	  for (p = ((struct elf_dyn_relocs *)
@@ -2890,8 +3312,9 @@ elf_i386_size_dynamic_sections (bfd *out
 		      && (info->flags & DF_TEXTREL) == 0)
 		    {
 		      info->flags |= DF_TEXTREL;
-		      if ((info->warn_shared_textrel && info->shared)
+		      if ((info->warn_shared_textrel && bfd_link_pic (info))
 			  || info->error_textrel)
+			/* xgettext:c-format */
 			info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'\n"),
 						p->sec->owner, p->sec);
 		    }
@@ -2932,7 +3355,7 @@ elf_i386_size_dynamic_sections (bfd *out
 		      || *local_tls_type == GOT_TLS_IE_BOTH)
 		    s->size += 4;
 		}
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  || GOT_TLS_GD_ANY_P (*local_tls_type)
 		  || (*local_tls_type & GOT_TLS_IE))
 		{
@@ -3007,13 +3430,22 @@ elf_i386_size_dynamic_sections (bfd *out
 	htab->elf.sgotplt->size = 0;
     }
 
-
-  if (htab->plt_eh_frame != NULL
-      && htab->elf.splt != NULL
-      && htab->elf.splt->size != 0
-      && !bfd_is_abs_section (htab->elf.splt->output_section)
-      && _bfd_elf_eh_frame_present (info))
-    htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
+  if (_bfd_elf_eh_frame_present (info))
+    {
+      if (htab->plt_eh_frame != NULL
+	  && htab->elf.splt != NULL
+	  && htab->elf.splt->size != 0
+	  && !bfd_is_abs_section (htab->elf.splt->output_section))
+	htab->plt_eh_frame->size
+	  = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_size;
+
+      if (htab->plt_got_eh_frame != NULL
+	  && htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && !bfd_is_abs_section (htab->plt_got->output_section))
+	htab->plt_got_eh_frame->size
+	  = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got_size;
+    }
 
   /* We now have determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
@@ -3042,7 +3474,9 @@ elf_i386_size_dynamic_sections (bfd *out
 	       || s == htab->elf.igotplt
 	       || s == htab->plt_got
 	       || s == htab->plt_eh_frame
-	       || s == htab->sdynbss)
+	       || s == htab->plt_got_eh_frame
+	       || s == htab->elf.sdynbss
+	       || s == htab->elf.sdynrelro)
 	{
 	  /* Strip these too.  */
 	}
@@ -3095,12 +3529,24 @@ elf_i386_size_dynamic_sections (bfd *out
   if (htab->plt_eh_frame != NULL
       && htab->plt_eh_frame->contents != NULL)
     {
-      memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
-	      sizeof (elf_i386_eh_frame_plt));
+      memcpy (htab->plt_eh_frame->contents,
+	      get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt,
+	      htab->plt_eh_frame->size);
       bfd_put_32 (dynobj, htab->elf.splt->size,
 		  htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
     }
 
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      memcpy (htab->plt_got_eh_frame->contents,
+	      get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got,
+	      htab->plt_got_eh_frame->size);
+      bfd_put_32 (dynobj, htab->plt_got->size,
+		  (htab->plt_got_eh_frame->contents
+		   + PLT_FDE_LEN_OFFSET));
+    }
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -3111,7 +3557,7 @@ elf_i386_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3148,6 +3594,14 @@ elf_i386_size_dynamic_sections (bfd *out
 
 	  if ((info->flags & DF_TEXTREL) != 0)
 	    {
+	      if (htab->readonly_dynrelocs_against_ifunc)
+		{
+		  info->callbacks->einfo
+		    (_("%P%X: read-only segment has dynamic IFUNC relocations; recompile with -fPIC\n"));
+		  bfd_set_error (bfd_error_bad_value);
+		  return FALSE;
+		}
+
 	      if (!add_dynamic_entry (DT_TEXTREL, 0))
 		return FALSE;
 	    }
@@ -3250,7 +3704,7 @@ elf_i386_set_tls_module_base (struct bfd
   struct elf_i386_link_hash_table *htab;
   struct bfd_link_hash_entry *base;
 
-  if (!info->executable)
+  if (!bfd_link_executable (info))
     return;
 
   htab = elf_i386_hash_table (info);
@@ -3314,12 +3768,17 @@ elf_i386_relocate_section (bfd *output_b
   bfd_vma *local_got_offsets;
   bfd_vma *local_tlsdesc_gotents;
   Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *wrel;
   Elf_Internal_Rela *relend;
   bfd_boolean is_vxworks_tls;
   unsigned plt_entry_size;
 
   BFD_ASSERT (is_i386_elf (input_bfd));
 
+  /* Skip if check_relocs failed.  */
+  if (input_section->check_relocs_failed)
+    return FALSE;
+
   htab = elf_i386_hash_table (info);
   if (htab == NULL)
     return FALSE;
@@ -3330,7 +3789,7 @@ elf_i386_relocate_section (bfd *output_b
   /* We have to handle relocations in vxworks .tls_vars sections
      specially, because the dynamic loader is 'weird'.  */
   is_vxworks_tls = (get_elf_i386_backend_data (output_bfd)->is_vxworks
-                    && info->shared
+                    && bfd_link_pic (info)
 		    && !strcmp (input_section->output_section->name,
 				".tls_vars"));
 
@@ -3338,9 +3797,9 @@ elf_i386_relocate_section (bfd *output_b
 
   plt_entry_size = GET_PLT_ENTRY_SIZE (output_bfd);
 
-  rel = relocs;
+  rel = wrel = relocs;
   relend = relocs + input_section->reloc_count;
-  for (; rel < relend; rel++)
+  for (; rel < relend; wrel++, rel++)
     {
       unsigned int r_type;
       reloc_howto_type *howto;
@@ -3357,19 +3816,25 @@ elf_i386_relocate_section (bfd *output_b
       int tls_type;
       bfd_vma st_size;
       asection *resolved_plt;
+      bfd_boolean resolved_to_zero;
 
       r_type = ELF32_R_TYPE (rel->r_info);
       if (r_type == R_386_GNU_VTINHERIT
 	  || r_type == R_386_GNU_VTENTRY)
-	continue;
+	{
+	  if (wrel != rel)
+	    *wrel = *rel;
+	  continue;
+	}
 
       if ((indx = r_type) >= R_386_standard
 	  && ((indx = r_type - R_386_ext_offset) - R_386_standard
 	      >= R_386_ext - R_386_standard)
 	  && ((indx = r_type - R_386_tls_offset) - R_386_ext
-	      >= R_386_irelative - R_386_ext))
+	      >= R_386_ext2 - R_386_ext))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
 	     input_bfd, input_section, r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -3393,7 +3858,7 @@ elf_i386_relocate_section (bfd *output_b
 
 	  if (ELF_ST_TYPE (sym->st_info) == STT_SECTION
 	      && ((sec->flags & SEC_MERGE) != 0
-		  || (info->relocatable
+		  || (bfd_link_relocatable (info)
 		      && sec->output_offset != 0)))
 	    {
 	      bfd_vma addend;
@@ -3429,7 +3894,7 @@ elf_i386_relocate_section (bfd *output_b
 		  abort ();
 		}
 
-	      if (info->relocatable)
+	      if (bfd_link_relocatable (info))
 		addend += sec->output_offset;
 	      else
 		{
@@ -3460,7 +3925,7 @@ elf_i386_relocate_section (bfd *output_b
 		  break;
 		}
 	    }
-	  else if (!info->relocatable
+	  else if (!bfd_link_relocatable (info)
 		   && ELF32_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 	    {
 	      /* Relocate against local STT_GNU_IFUNC symbol.  */
@@ -3487,36 +3952,155 @@ elf_i386_relocate_section (bfd *output_b
 	}
 
       if (sec != NULL && discarded_section (sec))
-	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-					 rel, 1, relend, howto, 0, contents);
+	{
+	  _bfd_clear_contents (howto, input_bfd, input_section,
+			       contents + rel->r_offset);
+	  wrel->r_offset = rel->r_offset;
+	  wrel->r_info = 0;
+	  wrel->r_addend = 0;
+
+	  /* For ld -r, remove relocations in debug sections against
+	     sections defined in discarded sections.  Not done for
+	     eh_frame editing code expects to be present.  */
+	   if (bfd_link_relocatable (info)
+	       && (input_section->flags & SEC_DEBUGGING))
+	     wrel--;
+
+	   continue;
+	}
+
+      if (bfd_link_relocatable (info))
+	{
+	  if (wrel != rel)
+	    *wrel = *rel;
+	  continue;
+	}
+
+      /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
+	 it here if it is defined in a non-shared object.  */
+      if (h != NULL
+	  && h->type == STT_GNU_IFUNC
+	  && h->def_regular)
+	{
+	  asection *plt, *gotplt, *base_got;
+	  bfd_vma plt_index;
+	  const char *name;
+
+	  if ((input_section->flags & SEC_ALLOC) == 0)
+	    {
+	      /* Dynamic relocs are not propagated for SEC_DEBUGGING
+		 sections because such sections are not SEC_ALLOC and
+		 thus ld.so will not process them.  */
+	      if ((input_section->flags & SEC_DEBUGGING) != 0)
+		continue;
+	      abort ();
+	    }
+
+	  /* STT_GNU_IFUNC symbol must go through PLT.  */
+	  if (htab->elf.splt != NULL)
+	    {
+	      plt = htab->elf.splt;
+	      gotplt = htab->elf.sgotplt;
+	    }
+	  else
+	    {
+	      plt = htab->elf.iplt;
+	      gotplt = htab->elf.igotplt;
+	    }
+
+	  switch (r_type)
+	    {
+	    default:
+	      break;
+
+	    case R_386_GOT32:
+	    case R_386_GOT32X:
+	      base_got = htab->elf.sgot;
+	      off = h->got.offset;
+
+	      if (base_got == NULL)
+		abort ();
+
+	      if (off == (bfd_vma) -1)
+		{
+		  /* We can't use h->got.offset here to save state, or
+		     even just remember the offset, as finish_dynamic_symbol
+		     would use that as offset into .got.  */
+
+		  if (h->plt.offset == (bfd_vma) -1)
+		    abort ();
+
+		  if (htab->elf.splt != NULL)
+		    {
+		      plt_index = h->plt.offset / plt_entry_size - 1;
+		      off = (plt_index + 3) * 4;
+		      base_got = htab->elf.sgotplt;
+		    }
+		  else
+		    {
+		      plt_index = h->plt.offset / plt_entry_size;
+		      off = plt_index * 4;
+		      base_got = htab->elf.igotplt;
+		    }
+
+		  if (h->dynindx == -1
+		      || h->forced_local
+		      || info->symbolic)
+		    {
+		      /* This references the local defitionion.  We must
+			 initialize this entry in the global offset table.
+			 Since the offset must always be a multiple of 8,
+			 we use the least significant bit to record
+			 whether we have initialized it already.
 
-      if (info->relocatable)
-	continue;
+			 When doing a dynamic link, we create a .rela.got
+			 relocation entry to initialize the value.  This
+			 is done in the finish_dynamic_symbol routine.	 */
+		      if ((off & 1) != 0)
+			off &= ~1;
+		      else
+			{
+			  bfd_put_32 (output_bfd, relocation,
+				      base_got->contents + off);
+			  h->got.offset |= 1;
+			}
+		    }
 
-      /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
-	 it here if it is defined in a non-shared object.  */
-      if (h != NULL
-	  && h->type == STT_GNU_IFUNC
-	  && h->def_regular)
-	{
-	  asection *plt, *gotplt, *base_got;
-	  bfd_vma plt_index;
-	  const char *name;
+		  relocation = off;
+		}
+	      else
+		relocation = (base_got->output_section->vma
+			      + base_got->output_offset + off
+			      - gotplt->output_section->vma
+			      - gotplt->output_offset);
+
+	      if (rel->r_offset > 1
+		  && (*(contents + rel->r_offset - 1) & 0xc7) == 0x5
+		  && *(contents + rel->r_offset - 2) != 0x8d)
+		{
+		  if (bfd_link_pic (info))
+		    goto disallow_got32;
 
-	  if ((input_section->flags & SEC_ALLOC) == 0
-	      || h->plt.offset == (bfd_vma) -1)
-	    abort ();
+		  /* Add the GOT base if there is no base register.  */
+		  relocation += (gotplt->output_section->vma
+				 + gotplt->output_offset);
+		}
+	      else if (htab->elf.splt == NULL)
+		{
+		  /* Adjust for static executables.  */
+		  relocation += gotplt->output_offset;
+		}
 
-	  /* STT_GNU_IFUNC symbol must go through PLT.  */
-	  if (htab->elf.splt != NULL)
-	    {
-	      plt = htab->elf.splt;
-	      gotplt = htab->elf.sgotplt;
+	      goto do_relocation;
 	    }
-	  else
+
+	  if (h->plt.offset == (bfd_vma) -1)
 	    {
-	      plt = htab->elf.iplt;
-	      gotplt = htab->elf.igotplt;
+	      /* Handle static pointers of STT_GNU_IFUNC symbols.  */
+	      if (r_type == R_386_32
+		  && (input_section->flags & SEC_CODE) == 0)
+		goto do_ifunc_pointer;
+	      goto bad_ifunc_reloc;
 	    }
 
 	  relocation = (plt->output_section->vma
@@ -3525,28 +4109,31 @@ elf_i386_relocate_section (bfd *output_b
 	  switch (r_type)
 	    {
 	    default:
+bad_ifunc_reloc:
 	      if (h->root.root.string)
 		name = h->root.root.string;
 	      else
 		name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 					 NULL);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against STT_GNU_IFUNC "
-		   "symbol `%s' isn't handled by %s"), input_bfd,
-		 elf_howto_table[r_type].name,
-		 name, __FUNCTION__);
+		   "symbol `%s' isn't supported"), input_bfd,
+		 howto->name, name);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 
 	    case R_386_32:
 	      /* Generate dynamic relcoation only when there is a
 		 non-GOT reference in a shared object.  */
-	      if (info->shared && h->non_got_ref)
+	      if ((bfd_link_pic (info) && h->non_got_ref)
+		  || h->plt.offset == (bfd_vma) -1)
 		{
 		  Elf_Internal_Rela outrel;
 		  asection *sreloc;
 		  bfd_vma offset;
 
+do_ifunc_pointer:
 		  /* Need a dynamic relocation to get the real function
 		     adddress.  */
 		  offset = _bfd_elf_section_offset (output_bfd,
@@ -3563,7 +4150,7 @@ elf_i386_relocate_section (bfd *output_b
 
 		  if (h->dynindx == -1
 		      || h->forced_local
-		      || info->executable)
+		      || bfd_link_executable (info))
 		    {
 		      /* This symbol is resolved locally.  */
 		      outrel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
@@ -3576,7 +4163,16 @@ elf_i386_relocate_section (bfd *output_b
 		  else
 		    outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
 
-		  sreloc = htab->elf.irelifunc;
+		  /* Dynamic relocations are stored in
+		     1. .rel.ifunc section in PIC object.
+		     2. .rel.got section in dynamic executable.
+		     3. .rel.iplt section in static executable.  */
+		  if (bfd_link_pic (info))
+		    sreloc = htab->elf.irelifunc;
+		  else if (htab->elf.splt != NULL)
+		    sreloc = htab->elf.srelgot;
+		  else
+		    sreloc = htab->elf.irelplt;
 		  elf_append_rel (output_bfd, sreloc, &outrel);
 
 		  /* If this reloc is against an external symbol, we
@@ -3591,74 +4187,6 @@ elf_i386_relocate_section (bfd *output_b
 	    case R_386_PLT32:
 	      goto do_relocation;
 
-	    case R_386_GOT32:
-	      base_got = htab->elf.sgot;
-	      off = h->got.offset;
-
-	      if (base_got == NULL)
-		abort ();
-
-	      if (off == (bfd_vma) -1)
-		{
-		  /* We can't use h->got.offset here to save state, or
-		     even just remember the offset, as finish_dynamic_symbol
-		     would use that as offset into .got.  */
-
-		  if (htab->elf.splt != NULL)
-		    {
-		      plt_index = h->plt.offset / plt_entry_size - 1;
-		      off = (plt_index + 3) * 4;
-		      base_got = htab->elf.sgotplt;
-		    }
-		  else
-		    {
-		      plt_index = h->plt.offset / plt_entry_size;
-		      off = plt_index * 4;
-		      base_got = htab->elf.igotplt;
-		    }
-
-		  if (h->dynindx == -1
-		      || h->forced_local
-		      || info->symbolic)
-		    {
-		      /* This references the local defitionion.  We must
-			 initialize this entry in the global offset table.
-			 Since the offset must always be a multiple of 8,
-			 we use the least significant bit to record
-			 whether we have initialized it already.
-
-			 When doing a dynamic link, we create a .rela.got
-			 relocation entry to initialize the value.  This
-			 is done in the finish_dynamic_symbol routine.	 */
-		      if ((off & 1) != 0)
-			off &= ~1;
-		      else
-			{
-			  bfd_put_32 (output_bfd, relocation,
-				      base_got->contents + off);
-			  h->got.offset |= 1;
-			}
-		    }
-
-		  relocation = off;
-
-		  /* Adjust for static executables.  */
-		  if (htab->elf.splt == NULL)
-		    relocation += gotplt->output_offset;
-		}
-	      else
-		{
-		  relocation = (base_got->output_section->vma
-				+ base_got->output_offset + off
-				- gotplt->output_section->vma
-				- gotplt->output_offset);
-		  /* Adjust for static executables.  */
-		  if (htab->elf.splt == NULL)
-		    relocation += gotplt->output_offset;
-		}
-
-	      goto do_relocation;
-
 	    case R_386_GOTOFF:
 	      relocation -= (gotplt->output_section->vma
 			     + gotplt->output_offset);
@@ -3666,9 +4194,74 @@ elf_i386_relocate_section (bfd *output_b
 	    }
 	}
 
+      eh = (struct elf_i386_link_hash_entry *) h;
+      resolved_to_zero = (eh != NULL
+			  && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+							      eh->has_got_reloc,
+							      eh));
+
       switch (r_type)
 	{
+	case R_386_GOT32X:
+	  /* Avoid optimizing _DYNAMIC since ld.so may use its
+	     link-time address.  */
+	  if (h == htab->elf.hdynamic)
+	    goto r_386_got32;
+
+	  if (bfd_link_pic (info))
+	    {
+	      /* It is OK to convert mov to lea and convert indirect
+		 branch to direct branch.  It is OK to convert adc,
+		 add, and, cmp, or, sbb, sub, test, xor only when PIC
+		 is false.   */
+	      unsigned int opcode, addend;
+	      addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      if (addend != 0)
+		goto r_386_got32;
+	      opcode = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
+	      if (opcode != 0x8b && opcode != 0xff)
+		goto r_386_got32;
+	    }
+
+	  /* Resolve "mov GOT[(%reg)], %reg",
+	     "call/jmp *GOT[(%reg)]", "test %reg, foo@GOT[(%reg)]"
+	     and "binop foo@GOT[(%reg)], %reg".  */
+	  if (h == NULL
+	      || (h->plt.offset == (bfd_vma) -1
+		  && h->got.offset == (bfd_vma) -1)
+	      || htab->elf.sgotplt == NULL)
+	    abort ();
+
+	  offplt = (htab->elf.sgotplt->output_section->vma
+		    + htab->elf.sgotplt->output_offset);
+
+	  /* It is relative to .got.plt section.  */
+	  if (h->got.offset != (bfd_vma) -1)
+	    /* Use GOT entry.  Mask off the least significant bit in
+	       GOT offset which may be set by R_386_GOT32 processing
+	       below.  */
+	    relocation = (htab->elf.sgot->output_section->vma
+			  + htab->elf.sgot->output_offset
+			  + (h->got.offset & ~1) - offplt);
+	  else
+	    /* Use GOTPLT entry.  */
+	    relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4;
+
+	  if (!bfd_link_pic (info))
+	    {
+	      /* If not PIC, add the .got.plt section address for
+		 baseless addressing.  */
+	      unsigned int modrm;
+	      modrm = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
+	      if ((modrm & 0xc7) == 0x5)
+		relocation += offplt;
+	    }
+
+	  unresolved_reloc = FALSE;
+	  break;
+
 	case R_386_GOT32:
+r_386_got32:
 	  /* Relocation is to the entry for this symbol in the global
 	     offset table.  */
 	  if (htab->elf.sgot == NULL)
@@ -3680,8 +4273,10 @@ elf_i386_relocate_section (bfd *output_b
 
 	      off = h->got.offset;
 	      dyn = htab->elf.dynamic_sections_created;
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h))
 		  || (ELF_ST_VISIBILITY (h->other)
 		      && h->root.type == bfd_link_hash_undefweak))
@@ -3727,7 +4322,7 @@ elf_i386_relocate_section (bfd *output_b
 		  bfd_put_32 (output_bfd, relocation,
 			      htab->elf.sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -3750,10 +4345,42 @@ elf_i386_relocate_section (bfd *output_b
 	  if (off >= (bfd_vma) -2)
 	    abort ();
 
-	  relocation = htab->elf.sgot->output_section->vma
-		       + htab->elf.sgot->output_offset + off
-		       - htab->elf.sgotplt->output_section->vma
-		       - htab->elf.sgotplt->output_offset;
+	  relocation = (htab->elf.sgot->output_section->vma
+			+ htab->elf.sgot->output_offset + off);
+	  if (rel->r_offset > 1
+	      && (*(contents + rel->r_offset - 1) & 0xc7) == 0x5
+	      && *(contents + rel->r_offset - 2) != 0x8d)
+	    {
+	      if (bfd_link_pic (info))
+		{
+		  /* For PIC, disallow R_386_GOT32 without a base
+		     register, except for "lea foo@GOT, %reg", since
+		     we don't know what the GOT base is.  */
+		  const char *name;
+
+disallow_got32:
+		  if (h == NULL || h->root.root.string == NULL)
+		    name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
+					     NULL);
+		  else
+		    name = h->root.root.string;
+
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%B: direct GOT relocation %s against `%s' without base register can not be used when making a shared object"),
+		     input_bfd, howto->name, name);
+		  bfd_set_error (bfd_error_bad_value);
+		  return FALSE;
+		}
+	    }
+	  else
+	    {
+	      /* Subtract the .got.plt section address only with a base
+		 register.  */
+	      relocation -= (htab->elf.sgotplt->output_section->vma
+			     + htab->elf.sgotplt->output_offset);
+	    }
+
 	  break;
 
 	case R_386_GOTOFF:
@@ -3764,7 +4391,7 @@ elf_i386_relocate_section (bfd *output_b
 	     symbol for shared library since it may not be local when
 	     used as function address or with copy relocation.  We also
 	     need to make sure that a symbol is referenced locally.  */
-	  if (!info->executable && h)
+	  if (!bfd_link_executable (info) && h)
 	    {
 	      if (!h->def_regular)
 		{
@@ -3786,7 +4413,8 @@ elf_i386_relocate_section (bfd *output_b
 		      break;
 		    }
 
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object"),
 		     input_bfd, v, h->root.root.string);
 		  bfd_set_error (bfd_error_bad_value);
@@ -3797,7 +4425,8 @@ elf_i386_relocate_section (bfd *output_b
 			   || h->type == STT_OBJECT)
 		       && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: relocation R_386_GOTOFF against protected %s `%s' can not be used when making a shared object"),
 		     input_bfd,
 		     h->type == STT_FUNC ? "function" : "data",
@@ -3832,7 +4461,6 @@ elf_i386_relocate_section (bfd *output_b
 	  if (h == NULL)
 	    break;
 
-	  eh = (struct elf_i386_link_hash_entry *) h;
 	  if ((h->plt.offset == (bfd_vma) -1
 	       && eh->plt_got.offset == (bfd_vma) -1)
 	      || htab->elf.splt == NULL)
@@ -3871,21 +4499,29 @@ elf_i386_relocate_section (bfd *output_b
 	      || is_vxworks_tls)
 	    break;
 
-	  if ((info->shared
+	  /* Copy dynamic function pointer relocations.  Don't generate
+	     dynamic relocations against resolved undefined weak symbols
+	     in PIE, except for R_386_PC32.  */
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
-		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-		   || h->root.type != bfd_link_hash_undefweak)
+		   || ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+			&& (!resolved_to_zero
+			    || r_type == R_386_PC32))
+		       || h->root.type != bfd_link_hash_undefweak))
 	       && ((r_type != R_386_PC32 && r_type != R_386_SIZE32)
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
-		  && !h->non_got_ref
-		  && ((h->def_dynamic
-		       && !h->def_regular)
-		      || h->root.type == bfd_link_hash_undefweak
-		      || h->root.type == bfd_link_hash_undefined)))
+		  && (!h->non_got_ref
+		      || eh->func_pointer_refcount > 0
+		      || (h->root.type == bfd_link_hash_undefweak
+			  && !resolved_to_zero))
+		  && ((h->def_dynamic && !h->def_regular)
+		      /* Undefined weak symbol is bound locally when
+			 PIC is false.  */
+		      || h->root.type == bfd_link_hash_undefweak)))
 	    {
 	      Elf_Internal_Rela outrel;
 	      bfd_boolean skip, relocate;
@@ -3913,8 +4549,8 @@ elf_i386_relocate_section (bfd *output_b
 	      else if (h != NULL
 		       && h->dynindx != -1
 		       && (r_type == R_386_PC32
-			   || !info->shared
-			   || !SYMBOLIC_BIND (info, h)
+			   || !(bfd_link_executable (info)
+				|| SYMBOLIC_BIND (info, h))
 			   || !h->def_regular))
 		outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
 	      else
@@ -3944,7 +4580,7 @@ elf_i386_relocate_section (bfd *output_b
 	  break;
 
 	case R_386_TLS_IE:
-	  if (!info->executable)
+	  if (!bfd_link_executable (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      asection *sreloc;
@@ -3977,7 +4613,7 @@ elf_i386_relocate_section (bfd *output_b
 					 input_section, contents,
 					 symtab_hdr, sym_hashes,
 					 &r_type, tls_type, rel,
-					 relend, h, r_symndx))
+					 relend, h, r_symndx, TRUE))
 	    return FALSE;
 
 	  if (r_type == R_386_TLS_LE_32)
@@ -3989,31 +4625,41 @@ elf_i386_relocate_section (bfd *output_b
 		  bfd_vma roff;
 
 		  /* GD->LE transition.  */
-		  type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
+		  type = *(contents + rel->r_offset - 2);
 		  if (type == 0x04)
 		    {
-		      /* leal foo(,%reg,1), %eax; call ___tls_get_addr
-			 Change it into:
-			 movl %gs:0, %eax; subl $foo@tpoff, %eax
+		      /* Change
+				leal foo@tlsgd(,%ebx,1), %eax
+				call ___tls_get_addr@PLT
+			 into:
+				movl %gs:0, %eax
+				subl $foo@tpoff, %eax
 			 (6 byte form of subl).  */
-		      memcpy (contents + rel->r_offset - 3,
-			      "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12);
 		      roff = rel->r_offset + 5;
 		    }
 		  else
 		    {
-		      /* leal foo(%reg), %eax; call ___tls_get_addr; nop
-			 Change it into:
-			 movl %gs:0, %eax; subl $foo@tpoff, %eax
+		      /* Change
+				leal foo@tlsgd(%ebx), %eax
+				call ___tls_get_addr@PLT
+				nop
+			 or
+				leal foo@tlsgd(%reg), %eax
+				call *___tls_get_addr@GOT(%reg)
+				which may be converted to
+				addr32 call ___tls_get_addr
+			 into:
+				movl %gs:0, %eax; subl $foo@tpoff, %eax
 			 (6 byte form of subl).  */
-		      memcpy (contents + rel->r_offset - 2,
-			      "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12);
 		      roff = rel->r_offset + 6;
 		    }
+		  memcpy (contents + roff - 8,
+			  "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12);
 		  bfd_put_32 (output_bfd, elf_i386_tpoff (info, relocation),
 			      contents + roff);
-		  /* Skip R_386_PC32/R_386_PLT32.  */
+		  /* Skip R_386_PC32, R_386_PLT32 and R_386_GOT32X.  */
 		  rel++;
+		  wrel++;
 		  continue;
 		}
 	      else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
@@ -4318,21 +4964,33 @@ elf_i386_relocate_section (bfd *output_b
 	      bfd_vma roff;
 
 	      /* GD->IE transition.  */
-	      type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
-	      val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
+	      type = *(contents + rel->r_offset - 2);
+	      val = *(contents + rel->r_offset - 1);
 	      if (type == 0x04)
 		{
-		  /* leal foo(,%reg,1), %eax; call ___tls_get_addr
-		     Change it into:
-		     movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax.  */
+		  /* Change
+			leal foo@tlsgd(,%ebx,1), %eax
+			call ___tls_get_addr@PLT
+		     into:
+			movl %gs:0, %eax
+			subl $foo@gottpoff(%ebx), %eax.  */
 		  val >>= 3;
 		  roff = rel->r_offset - 3;
 		}
 	      else
 		{
-		  /* leal foo(%reg), %eax; call ___tls_get_addr; nop
-		     Change it into:
-		     movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax.  */
+		  /* Change
+			leal foo@tlsgd(%ebx), %eax
+			call ___tls_get_addr@PLT
+			nop
+		     or
+			leal foo@tlsgd(%reg), %eax
+			call *___tls_get_addr@GOT(%reg)
+			which may be converted to
+			addr32 call ___tls_get_addr
+		     into:
+			movl %gs:0, %eax;
+			subl $foo@gottpoff(%reg), %eax.  */
 		  roff = rel->r_offset - 2;
 		}
 	      memcpy (contents + roff,
@@ -4351,8 +5009,9 @@ elf_i386_relocate_section (bfd *output_b
 			  - htab->elf.sgotplt->output_section->vma
 			  - htab->elf.sgotplt->output_offset,
 			  contents + roff + 8);
-	      /* Skip R_386_PLT32.  */
+	      /* Skip R_386_PLT32 and R_386_GOT32X.  */
 	      rel++;
+	      wrel++;
 	      continue;
 	    }
 	  else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
@@ -4436,20 +5095,37 @@ elf_i386_relocate_section (bfd *output_b
 					 input_section, contents,
 					 symtab_hdr, sym_hashes,
 					 &r_type, GOT_UNKNOWN, rel,
-					 relend, h, r_symndx))
+					 relend, h, r_symndx, TRUE))
 	    return FALSE;
 
 	  if (r_type != R_386_TLS_LDM)
 	    {
-	      /* LD->LE transition:
-		 leal foo(%reg), %eax; call ___tls_get_addr.
-		 We change it into:
-		 movl %gs:0, %eax; nop; leal 0(%esi,1), %esi.  */
+	      /* LD->LE transition.  Change
+			leal foo@tlsldm(%ebx) %eax
+			call ___tls_get_addr@PLT
+		 into:
+			movl %gs:0, %eax
+			nop
+			leal 0(%esi,1), %esi
+		 or change
+			leal foo@tlsldm(%reg) %eax
+			call *___tls_get_addr@GOT(%reg)
+			which may be converted to
+			addr32 call ___tls_get_addr
+		 into:
+			movl %gs:0, %eax
+			leal 0(%esi), %esi  */
 	      BFD_ASSERT (r_type == R_386_TLS_LE_32);
-	      memcpy (contents + rel->r_offset - 2,
-		      "\x65\xa1\0\0\0\0\x90\x8d\x74\x26", 11);
+	      if (*(contents + rel->r_offset + 4) == 0xff
+		  || *(contents + rel->r_offset + 4) == 0x67)
+		memcpy (contents + rel->r_offset - 2,
+			"\x65\xa1\0\0\0\0\x8d\xb6\0\0\0", 12);
+	      else
+		memcpy (contents + rel->r_offset - 2,
+			"\x65\xa1\0\0\0\0\x90\x8d\x74\x26", 11);
 	      /* Skip R_386_PC32/R_386_PLT32.  */
 	      rel++;
+	      wrel++;
 	      continue;
 	    }
 
@@ -4485,7 +5161,8 @@ elf_i386_relocate_section (bfd *output_b
 	  break;
 
 	case R_386_TLS_LDO_32:
-	  if (!info->executable || (input_section->flags & SEC_CODE) == 0)
+	  if (!bfd_link_executable (info)
+	      || (input_section->flags & SEC_CODE) == 0)
 	    relocation -= elf_i386_dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */
@@ -4494,7 +5171,7 @@ elf_i386_relocate_section (bfd *output_b
 
 	case R_386_TLS_LE_32:
 	case R_386_TLS_LE:
-	  if (!info->executable)
+	  if (!bfd_link_executable (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      asection *sreloc;
@@ -4540,7 +5217,8 @@ elf_i386_relocate_section (bfd *output_b
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section,
@@ -4574,22 +5252,42 @@ check_relocation_error:
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
 	      return FALSE;
 	    }
 	}
+
+      if (wrel != rel)
+	*wrel = *rel;
+    }
+
+  if (wrel != rel)
+    {
+      Elf_Internal_Shdr *rel_hdr;
+      size_t deleted = rel - wrel;
+
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      if (rel_hdr->sh_size == 0)
+	{
+	  /* It is too late to remove an empty reloc section.  Leave
+	     one NONE reloc.
+	     ??? What is wrong with an empty section???  */
+	  rel_hdr->sh_size = rel_hdr->sh_entsize;
+	  deleted -= 1;
+	}
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      input_section->reloc_count -= deleted;
     }
 
   return TRUE;
@@ -4608,6 +5306,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
   unsigned plt_entry_size;
   const struct elf_i386_backend_data *abed;
   struct elf_i386_link_hash_entry *eh;
+  bfd_boolean local_undefweak;
 
   htab = elf_i386_hash_table (info);
   if (htab == NULL)
@@ -4618,6 +5317,13 @@ elf_i386_finish_dynamic_symbol (bfd *out
 
   eh = (struct elf_i386_link_hash_entry *) h;
 
+  /* We keep PLT/GOT entries without dynamic PLT/GOT relocations for
+     resolved undefined weak symbols in executable so that their
+     references have value 0 at run-time.  */
+  local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+						     eh->has_got_reloc,
+						     eh);
+
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma plt_index;
@@ -4645,7 +5351,8 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	 it up.  */
 
       if ((h->dynindx == -1
-	   && !((h->forced_local || info->executable)
+	   && !local_undefweak
+	   && !((h->forced_local || bfd_link_executable (info))
 		&& h->def_regular
 		&& h->type == STT_GNU_IFUNC))
 	  || plt == NULL
@@ -4676,7 +5383,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	}
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  memcpy (plt->contents + h->plt.offset, abed->plt->plt_entry,
 		  abed->plt->plt_entry_size);
@@ -4698,7 +5405,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	      s = ((h->plt.offset - abed->plt->plt_entry_size)
                    / abed->plt->plt_entry_size);
 	      /* K: Number of relocations for PLTResolve. */
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		k = PLTRESOLVE_RELOCS_SHLIB;
 	      else
 		k = PLTRESOLVE_RELOCS;
@@ -4733,54 +5440,61 @@ elf_i386_finish_dynamic_symbol (bfd *out
                       + abed->plt->plt_got_offset);
 	}
 
-      /* Fill in the entry in the global offset table.  */
-      bfd_put_32 (output_bfd,
-		  (plt->output_section->vma
-		   + plt->output_offset
-		   + h->plt.offset
-		   + abed->plt->plt_lazy_offset),
-		  gotplt->contents + got_offset);
-
-      /* Fill in the entry in the .rel.plt section.  */
-      rel.r_offset = (gotplt->output_section->vma
-		      + gotplt->output_offset
-		      + got_offset);
-      if (h->dynindx == -1
-	  || ((info->executable
-	       || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-	      && h->def_regular
-	       && h->type == STT_GNU_IFUNC))
-	{
-	  /* If an STT_GNU_IFUNC symbol is locally defined, generate
-	     R_386_IRELATIVE instead of R_386_JUMP_SLOT.  Store addend
-	     in the .got.plt section.  */
+      /* Fill in the entry in the global offset table.  Leave the entry
+	 as zero for undefined weak symbol in PIE.  No PLT relocation
+	 against undefined weak symbol in PIE.  */
+      if (!local_undefweak)
+	{
 	  bfd_put_32 (output_bfd,
-		      (h->root.u.def.value
-		       + h->root.u.def.section->output_section->vma
-		       + h->root.u.def.section->output_offset),
+		      (plt->output_section->vma
+		       + plt->output_offset
+		       + h->plt.offset
+		       + abed->plt->plt_lazy_offset),
 		      gotplt->contents + got_offset);
-	  rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
-	  /* R_386_IRELATIVE comes last.  */
-	  plt_index = htab->next_irelative_index--;
-	}
-      else
-	{
-	  rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
-	  plt_index = htab->next_jump_slot_index++;
-	}
-      loc = relplt->contents + plt_index * sizeof (Elf32_External_Rel);
-      bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
 
-      /* Don't fill PLT entry for static executables.  */
-      if (plt == htab->elf.splt)
-	{
-	  bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel),
-		      plt->contents + h->plt.offset
-                      + abed->plt->plt_reloc_offset);
-	  bfd_put_32 (output_bfd, - (h->plt.offset
-                                     + abed->plt->plt_plt_offset + 4),
-		      plt->contents + h->plt.offset
-                      + abed->plt->plt_plt_offset);
+	  /* Fill in the entry in the .rel.plt section.  */
+	  rel.r_offset = (gotplt->output_section->vma
+			  + gotplt->output_offset
+			  + got_offset);
+	  if (h->dynindx == -1
+	      || ((bfd_link_executable (info)
+		   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+		  && h->def_regular
+		  && h->type == STT_GNU_IFUNC))
+	    {
+	      /* If an STT_GNU_IFUNC symbol is locally defined, generate
+		 R_386_IRELATIVE instead of R_386_JUMP_SLOT.  Store addend
+		 in the .got.plt section.  */
+	      bfd_put_32 (output_bfd,
+			  (h->root.u.def.value
+			   + h->root.u.def.section->output_section->vma
+			   + h->root.u.def.section->output_offset),
+			  gotplt->contents + got_offset);
+	      rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
+	      /* R_386_IRELATIVE comes last.  */
+	      plt_index = htab->next_irelative_index--;
+	    }
+	  else
+	    {
+	      rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
+	      plt_index = htab->next_jump_slot_index++;
+	    }
+
+	  loc = relplt->contents + plt_index * sizeof (Elf32_External_Rel);
+	  bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+
+	  /* Don't fill PLT entry for static executables.  */
+	  if (plt == htab->elf.splt)
+	    {
+	      bfd_put_32 (output_bfd,
+			  plt_index * sizeof (Elf32_External_Rel),
+			  plt->contents + h->plt.offset
+			  + abed->plt->plt_reloc_offset);
+	      bfd_put_32 (output_bfd, - (h->plt.offset
+					 + abed->plt->plt_plt_offset + 4),
+			  plt->contents + h->plt.offset
+			  + abed->plt->plt_plt_offset);
+	    }
 	}
     }
   else if (eh->plt_got.offset != (bfd_vma) -1)
@@ -4805,7 +5519,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	abort ();
 
       /* Fill in the entry in the GOT procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  got_plt_entry = elf_i386_got_plt_entry;
 	  got_offset += got->output_section->vma + got->output_offset;
@@ -4826,7 +5540,8 @@ elf_i386_finish_dynamic_symbol (bfd *out
 		  plt->contents + plt_offset + plt_got_offset);
     }
 
-  if (!h->def_regular
+  if (!local_undefweak
+      && !h->def_regular
       && (h->plt.offset != (bfd_vma) -1
 	  || eh->plt_got.offset != (bfd_vma) -1))
     {
@@ -4843,11 +5558,15 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	sym->st_value = 0;
     }
 
+  /* Don't generate dynamic GOT relocation against undefined weak
+     symbol in executable.  */
   if (h->got.offset != (bfd_vma) -1
       && ! GOT_TLS_GD_ANY_P (elf_i386_hash_entry(h)->tls_type)
-      && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE) == 0)
+      && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE) == 0
+      && !local_undefweak)
     {
       Elf_Internal_Rela rel;
+      asection *relgot = htab->elf.srelgot;
 
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
@@ -4867,7 +5586,28 @@ elf_i386_finish_dynamic_symbol (bfd *out
       if (h->def_regular
 	  && h->type == STT_GNU_IFUNC)
 	{
-	  if (info->shared)
+	  if (h->plt.offset == (bfd_vma) -1)
+	    {
+	      /* STT_GNU_IFUNC is referenced without PLT.  */
+	      if (htab->elf.splt == NULL)
+		{
+		  /* use .rel[a].iplt section to store .got relocations
+		     in static executable.  */
+		  relgot = htab->elf.irelplt;
+		}
+	      if (SYMBOL_REFERENCES_LOCAL (info, h))
+		{
+		  bfd_put_32 (output_bfd,
+			      (h->root.u.def.value
+			       + h->root.u.def.section->output_section->vma
+			       + h->root.u.def.section->output_offset),
+			      htab->elf.sgot->contents + h->got.offset);
+		  rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
+		}
+	      else
+		goto do_glob_dat;
+	    }
+	  else if (bfd_link_pic (info))
 	    {
 	      /* Generate R_386_GLOB_DAT.  */
 	      goto do_glob_dat;
@@ -4890,7 +5630,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
 	      return TRUE;
 	    }
 	}
-      else if (info->shared
+      else if (bfd_link_pic (info)
 	       && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  BFD_ASSERT((h->got.offset & 1) != 0);
@@ -4905,26 +5645,32 @@ do_glob_dat:
 	  rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT);
 	}
 
-      elf_append_rel (output_bfd, htab->elf.srelgot, &rel);
+      elf_append_rel (output_bfd, relgot, &rel);
     }
 
   if (h->needs_copy)
     {
       Elf_Internal_Rela rel;
+      asection *s;
 
       /* This symbol needs a copy reloc.  Set it up.  */
 
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->elf.srelbss == NULL
+	  || htab->elf.sreldynrelro == NULL)
 	abort ();
 
       rel.r_offset = (h->root.u.def.value
 		      + h->root.u.def.section->output_section->vma
 		      + h->root.u.def.section->output_offset);
       rel.r_info = ELF32_R_INFO (h->dynindx, R_386_COPY);
-      elf_append_rel (output_bfd, htab->srelbss, &rel);
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
+      elf_append_rel (output_bfd, s, &rel);
     }
 
   return TRUE;
@@ -4945,16 +5691,61 @@ elf_i386_finish_local_dynamic_symbol (vo
 					 h, NULL);
 }
 
+/* Finish up undefined weak symbol handling in PIE.  Fill its PLT entry
+   here since undefined weak symbol may not be dynamic and may not be
+   called for elf_i386_finish_dynamic_symbol.  */
+
+static bfd_boolean
+elf_i386_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh,
+				      void *inf)
+{
+  struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) bh;
+  struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+  if (h->root.type != bfd_link_hash_undefweak
+      || h->dynindx != -1)
+    return TRUE;
+
+  return elf_i386_finish_dynamic_symbol (info->output_bfd,
+					     info, h, NULL);
+}
+
 /* Used to decide how to sort relocs in an optimal manner for the
    dynamic linker, before writing them out.  */
 
 static enum elf_reloc_type_class
-elf_i386_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+elf_i386_reloc_type_class (const struct bfd_link_info *info,
 			   const asection *rel_sec ATTRIBUTE_UNUSED,
 			   const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  if (htab->dynsym != NULL
+      && htab->dynsym->contents != NULL)
+    {
+      /* Check relocation against STT_GNU_IFUNC symbol if there are
+         dynamic symbols.  */
+      unsigned long r_symndx = ELF32_R_SYM (rela->r_info);
+      if (r_symndx != STN_UNDEF)
+	{
+	  Elf_Internal_Sym sym;
+	  if (!bed->s->swap_symbol_in (abfd,
+				       (htab->dynsym->contents
+					+ r_symndx * sizeof (Elf32_External_Sym)),
+				       0, &sym))
+	    abort ();
+
+	  if (ELF32_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+	    return reloc_class_ifunc;
+	}
+    }
+
   switch (ELF32_R_TYPE (rela->r_info))
     {
+    case R_386_IRELATIVE:
+      return reloc_class_ifunc;
     case R_386_RELATIVE:
       return reloc_class_relative;
     case R_386_JUMP_SLOT:
@@ -5023,31 +5814,6 @@ elf_i386_finish_dynamic_sections (bfd *o
 	      s = htab->elf.srelplt;
 	      dyn.d_un.d_val = s->size;
 	      break;
-
-	    case DT_RELSZ:
-	      /* My reading of the SVR4 ABI indicates that the
-		 procedure linkage table relocs (DT_JMPREL) should be
-		 included in the overall relocs (DT_REL).  This is
-		 what Solaris does.  However, UnixWare can not handle
-		 that case.  Therefore, we override the DT_RELSZ entry
-		 here to make it not include the JMPREL relocs.  */
-	      s = htab->elf.srelplt;
-	      if (s == NULL)
-		continue;
-	      dyn.d_un.d_val -= s->size;
-	      break;
-
-	    case DT_REL:
-	      /* We may not be using the standard ELF linker script.
-		 If .rel.plt is the first .rel section, we adjust
-		 DT_REL to not include it.  */
-	      s = htab->elf.srelplt;
-	      if (s == NULL)
-		continue;
-	      if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
-		continue;
-	      dyn.d_un.d_ptr += s->size;
-	      break;
 	    }
 
 	  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -5056,7 +5822,7 @@ elf_i386_finish_dynamic_sections (bfd *o
       /* Fill in the first entry in the procedure linkage table.  */
       if (htab->elf.splt && htab->elf.splt->size > 0)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      memcpy (htab->elf.splt->contents, abed->plt->pic_plt0_entry,
 		      abed->plt->plt0_entry_size);
@@ -5114,14 +5880,14 @@ elf_i386_finish_dynamic_sections (bfd *o
 	    ->this_hdr.sh_entsize = 4;
 
 	  /* Correct the .rel.plt.unloaded relocations.  */
-	  if (abed->is_vxworks && !info->shared)
+	  if (abed->is_vxworks && !bfd_link_pic (info))
 	    {
 	      int num_plts = (htab->elf.splt->size
                               / abed->plt->plt_entry_size) - 1;
 	      unsigned char *p;
 
 	      p = htab->srelplt2->contents;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		p += PLTRESOLVE_RELOCS_SHLIB * sizeof (Elf32_External_Rel);
 	      else
 		p += PLTRESOLVE_RELOCS * sizeof (Elf32_External_Rel);
@@ -5147,7 +5913,7 @@ elf_i386_finish_dynamic_sections (bfd *o
     {
       if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
 	  return FALSE;
 	}
@@ -5194,9 +5960,64 @@ elf_i386_finish_dynamic_sections (bfd *o
 	}
     }
 
+  /* Adjust .eh_frame for .plt.got section.  */
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      if (htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && (htab->plt_got->flags & SEC_EXCLUDE) == 0
+	  && htab->plt_got->output_section != NULL
+	  && htab->plt_got_eh_frame->output_section != NULL)
+	{
+	  bfd_vma plt_start = htab->plt_got->output_section->vma;
+	  bfd_vma eh_frame_start = htab->plt_got_eh_frame->output_section->vma
+				   + htab->plt_got_eh_frame->output_offset
+				   + PLT_FDE_START_OFFSET;
+	  bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+			     htab->plt_got_eh_frame->contents
+			     + PLT_FDE_START_OFFSET);
+	}
+      if (htab->plt_got_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
+	{
+	  if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+						 htab->plt_got_eh_frame,
+						 htab->plt_got_eh_frame->contents))
+	    return FALSE;
+	}
+    }
+
   if (htab->elf.sgot && htab->elf.sgot->size > 0)
     elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
 
+  /* Fill PLT entries for undefined weak symbols in PIE.  */
+  if (bfd_link_pie (info))
+    bfd_hash_traverse (&info->hash->table,
+		       elf_i386_pie_finish_undefweak_symbol,
+		       info);
+
+  return TRUE;
+}
+
+/* Fill PLT/GOT entries and allocate dynamic relocations for local
+   STT_GNU_IFUNC symbols, which aren't in the ELF linker hash table.
+   It has to be done before elf_link_sort_relocs is called so that
+   dynamic relocations are properly sorted.  */
+
+static bfd_boolean
+elf_i386_output_arch_local_syms
+  (bfd *output_bfd ATTRIBUTE_UNUSED,
+   struct bfd_link_info *info,
+   void *flaginfo ATTRIBUTE_UNUSED,
+   int (*func) (void *, const char *,
+		Elf_Internal_Sym *,
+		asection *,
+		struct elf_link_hash_entry *) ATTRIBUTE_UNUSED)
+{
+  struct elf_i386_link_hash_table *htab = elf_i386_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
   /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols.  */
   htab_traverse (htab->loc_hash_table,
 		 elf_i386_finish_local_dynamic_symbol,
@@ -5264,9 +6085,9 @@ bad_return:
       reloc_index = H_GET_32 (abfd, (plt_contents + plt_offset
 				     + bed->plt->plt_reloc_offset));
       reloc_index /= sizeof (Elf32_External_Rel);
-      if (reloc_index >= count)
-	abort ();
-      plt_sym_val[reloc_index] = plt->vma + plt_offset;
+      if (reloc_index < count)
+	plt_sym_val[reloc_index] = plt->vma + plt_offset;
+
       plt_offset += bed->plt->plt_entry_size;
 
       /* PR binutils/18437: Skip extra relocations in the .rel.plt
@@ -5310,27 +6131,6 @@ elf_i386_hash_symbol (struct elf_link_ha
   return _bfd_elf_hash_symbol (h);
 }
 
-/* Hook called by the linker routine which adds symbols from an object
-   file.  */
-
-static bfd_boolean
-elf_i386_add_symbol_hook (bfd * abfd,
-			  struct bfd_link_info * info,
-			  Elf_Internal_Sym * sym,
-			  const char ** namep ATTRIBUTE_UNUSED,
-			  flagword * flagsp ATTRIBUTE_UNUSED,
-			  asection ** secp ATTRIBUTE_UNUSED,
-			  bfd_vma * valp ATTRIBUTE_UNUSED)
-{
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
-      && (abfd->flags & DYNAMIC) == 0
-      && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
-
-  return TRUE;
-}
-
 #define TARGET_LITTLE_SYM		i386_elf32_vec
 #define TARGET_LITTLE_NAME		"elf32-i386"
 #define ELF_ARCH			bfd_arch_i386
@@ -5345,7 +6145,10 @@ elf_i386_add_symbol_hook (bfd * abfd,
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
 #define elf_backend_plt_alignment	4
+#define elf_backend_dtrel_excludes_plt	1
 #define elf_backend_extern_protected_data 1
+#define elf_backend_caches_rawsize	1
+#define elf_backend_want_dynrelro	1
 
 /* Support RELA for objdump of prelink objects.  */
 #define elf_info_to_howto		      elf_i386_info_to_howto_rel
@@ -5367,8 +6170,8 @@ elf_i386_add_symbol_hook (bfd * abfd,
 #define elf_backend_fake_sections	      elf_i386_fake_sections
 #define elf_backend_finish_dynamic_sections   elf_i386_finish_dynamic_sections
 #define elf_backend_finish_dynamic_symbol     elf_i386_finish_dynamic_symbol
+#define elf_backend_output_arch_local_syms     elf_i386_output_arch_local_syms
 #define elf_backend_gc_mark_hook	      elf_i386_gc_mark_hook
-#define elf_backend_gc_sweep_hook	      elf_i386_gc_sweep_hook
 #define elf_backend_grok_prstatus	      elf_i386_grok_prstatus
 #define elf_backend_grok_psinfo		      elf_i386_grok_psinfo
 #define elf_backend_reloc_type_class	      elf_i386_reloc_type_class
@@ -5378,7 +6181,7 @@ elf_i386_add_symbol_hook (bfd * abfd,
 #define elf_backend_omit_section_dynsym \
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
 #define elf_backend_hash_symbol		      elf_i386_hash_symbol
-#define elf_backend_add_symbol_hook           elf_i386_add_symbol_hook
+#define elf_backend_fixup_symbol	      elf_i386_fixup_symbol
 
 #include "elf32-target.h"
 
@@ -5436,16 +6239,99 @@ elf_i386_fbsd_post_process_headers (bfd 
 
 /* The 32-bit static TLS arena size is rounded to the nearest 8-byte
    boundary.  */
-#undef elf_backend_static_tls_alignment
+#undef  elf_backend_static_tls_alignment
 #define elf_backend_static_tls_alignment 8
 
 /* The Solaris 2 ABI requires a plt symbol on all platforms.
 
    Cf. Linker and Libraries Guide, Ch. 2, Link-Editor, Generating the Output
    File, p.63.  */
-#undef elf_backend_want_plt_sym
+#undef  elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	1
 
+#undef  elf_backend_strtab_flags
+#define elf_backend_strtab_flags	SHF_STRINGS
+
+/* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
+   has a type >= SHT_LOOS.  Returns TRUE if these fields were initialised 
+   FALSE otherwise.  ISECTION is the best guess matching section from the
+   input bfd IBFD, but it might be NULL.  */
+
+static bfd_boolean
+elf32_i386_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED,
+						bfd *obfd ATTRIBUTE_UNUSED,
+						const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED,
+						Elf_Internal_Shdr *osection ATTRIBUTE_UNUSED)
+{
+  /* PR 19938: FIXME: Need to add code for setting the sh_info
+     and sh_link fields of Solaris specific section types.  */
+  return FALSE;
+
+  /* Based upon Oracle Solaris 11.3 Linkers and Libraries Guide, Ch. 13,
+     Object File Format, Table 13-9  ELF sh_link and sh_info Interpretation:
+
+http://docs.oracle.com/cd/E53394_01/html/E54813/chapter6-94076.html#scrolltoc
+
+     The following values should be set:
+     
+Type                 Link                           Info
+-----------------------------------------------------------------------------
+SHT_SUNW_ancillary   The section header index of    0
+ [0x6fffffee]        the associated string table.
+	
+SHT_SUNW_capinfo     The section header index of    For a dynamic object, the
+ [0x6ffffff0]        the associated symbol table.   section header index of
+                                                    the associated
+						    SHT_SUNW_capchain table,
+						    otherwise 0.
+
+SHT_SUNW_symsort     The section header index of    0
+ [0x6ffffff1]        the associated symbol table.
+
+SHT_SUNW_tlssort     The section header index of    0
+ [0x6ffffff2]        the associated symbol table.
+	
+SHT_SUNW_LDYNSYM     The section header index of    One greater than the 
+ [0x6ffffff3]        the associated string table.   symbol table index of the
+		     This index is the same string  last local symbol, 
+		     table used by the SHT_DYNSYM   STB_LOCAL. Since
+		     section.                       SHT_SUNW_LDYNSYM only
+		                                    contains local symbols,
+						    sh_info is equivalent to
+						    the number of symbols in
+						    the table.
+
+SHT_SUNW_cap         If symbol capabilities exist,  If any capabilities refer
+ [0x6ffffff5]        the section header index of    to named strings, the
+                     the associated                 section header index of
+		     SHT_SUNW_capinfo table,        the associated string 
+			  otherwise 0.              table, otherwise 0.
+
+SHT_SUNW_move        The section header index of    0
+ [0x6ffffffa]        the associated symbol table.
+	
+SHT_SUNW_COMDAT      0                              0
+ [0x6ffffffb]
+
+SHT_SUNW_syminfo     The section header index of    The section header index
+ [0x6ffffffc]        the associated symbol table.   of the associated
+		                                    .dynamic section.
+
+SHT_SUNW_verdef      The section header index of    The number of version 
+ [0x6ffffffd]        the associated string table.   definitions within the
+		                                    section.
+
+SHT_SUNW_verneed     The section header index of    The number of version
+ [0x6ffffffe]        the associated string table.   dependencies within the
+                                                    section.
+
+SHT_SUNW_versym      The section header index of    0
+ [0x6fffffff]        the associated symbol table.  */
+}
+
+#undef  elf_backend_copy_special_section_fields
+#define elf_backend_copy_special_section_fields elf32_i386_copy_solaris_special_section_fields
+
 #include "elf32-target.h"
 
 /* Intel MCU support.  */
@@ -5462,7 +6348,7 @@ elf32_iamcu_elf_object_p (bfd *abfd)
 #define TARGET_LITTLE_SYM		iamcu_elf32_vec
 #undef  TARGET_LITTLE_NAME
 #define TARGET_LITTLE_NAME		"elf32-iamcu"
-#undef ELF_ARCH
+#undef  ELF_ARCH
 #define ELF_ARCH			bfd_arch_iamcu
 
 #undef	ELF_MACHINE_CODE
@@ -5481,6 +6367,9 @@ elf32_iamcu_elf_object_p (bfd *abfd)
 #undef	elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	    0
 
+#undef  elf_backend_strtab_flags
+#undef  elf_backend_copy_special_section_fields
+
 #include "elf32-target.h"
 
 /* Restore defaults.  */
@@ -5641,6 +6530,8 @@ static const struct elf_i386_plt_layout 
     elf_i386_nacl_pic_plt_entry,	/* pic_plt_entry */
     elf_i386_nacl_eh_frame_plt,		/* eh_frame_plt */
     sizeof (elf_i386_nacl_eh_frame_plt),/* eh_frame_plt_size */
+    NULL,				/* eh_frame_plt_got */
+    0,					/* eh_frame_plt_got_size */
   };
 
 static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i860.c ./bfd/elf32-i860.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i860.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-i860.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel i860 specific support for 32-bit ELF.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Full i860 support contributed by Jason Eckhardt <jle@cygnus.com>.
 
@@ -74,7 +74,7 @@ i860_howto_pc26_reloc (bfd *abfd ATTRIBU
 
   /* Check for target out of range.  */
   if ((bfd_signed_vma)relocation > (0x3ffffff << 2)
-      || (bfd_signed_vma)relocation < (-0x4000000 << 2))
+      || (bfd_signed_vma)relocation < (-0x4000000 * 4))
     return bfd_reloc_outofrange;
 
   addr = (bfd_byte *) data + reloc_entry->address;
@@ -137,7 +137,7 @@ i860_howto_pc16_reloc (bfd *abfd,
 
   /* Check for target out of range.  */
   if ((bfd_signed_vma)relocation > (0x7fff << 2)
-      || (bfd_signed_vma)relocation < (-0x8000 << 2))
+      || (bfd_signed_vma)relocation < (-0x8000 * 4))
     return bfd_reloc_outofrange;
 
   addr = (bfd_byte *) data + reloc_entry->address;
@@ -1131,7 +1131,7 @@ elf32_i860_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -1196,13 +1196,13 @@ elf32_i860_relocate_section (bfd *output
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -1224,11 +1224,8 @@ elf32_i860_relocate_section (bfd *output
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i960.c ./bfd/elf32-i960.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-i960.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-i960.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel 960 specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -136,6 +136,7 @@ elf32_i960_info_to_howto_rel (bfd *abfd 
   /* PR 17521: file: 9609b8d6.  */
   if (type >= R_960_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid i960 reloc number: %d"), abfd, type);
       type = 0;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ip2k.c ./bfd/elf32-ip2k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ip2k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-ip2k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Ubicom IP2xxx specific support for 32-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1096,7 +1096,7 @@ ip2k_elf_relax_section (bfd *abfd,
   /* We don't have to do anything for a relocatable link,
      if this section does not have relocs, or if this is
      not a code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -1241,6 +1241,7 @@ ip2k_info_to_howto_rela (bfd * abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_IP2K_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid IP2K reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1293,6 +1294,7 @@ ip2k_final_link_relocate (reloc_howto_ty
 	  if (PAGENO (relocation + rel->r_addend) !=
 	      ip2k_nominal_page_bits (input_bfd, input_section,
 	      			      rel->r_offset, contents))
+	    /* xgettext:c-format */
 	    _bfd_error_handler (_("ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."),
 				BASEADDR (input_section) + rel->r_offset,
 				relocation + rel->r_addend);
@@ -1309,6 +1311,7 @@ ip2k_final_link_relocate (reloc_howto_ty
 	      && (PAGENO (relocation + rel->r_addend) ==
 		  ip2k_nominal_page_bits (input_bfd, input_section,
 					  rel->r_offset - 2, contents)))
+	    /* xgettext:c-format */
 	    _bfd_error_handler (_("ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."),
 				page_addr,
 				relocation + rel->r_addend);
@@ -1444,7 +1447,7 @@ ip2k_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Finally, the sole IP2K-specific part.  */
@@ -1458,13 +1461,13 @@ ip2k_elf_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -1489,11 +1492,8 @@ ip2k_elf_relocate_section (bfd *output_b
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-iq2000.c ./bfd/elf32-iq2000.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-iq2000.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-iq2000.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IQ2000-specific support for 32-bit ELF.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -437,6 +437,7 @@ iq2000_info_to_howto_rela (bfd * abfd AT
     default:
       if (r_type >= (unsigned int) R_IQ2000_max)
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: invalid IQ2000 reloc number: %d"), abfd, r_type);
 	  r_type = 0;
 	}
@@ -461,7 +462,7 @@ iq2000_elf_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel_end;
   bfd_boolean changed = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -645,7 +646,7 @@ iq2000_elf_relocate_section (bfd *		    
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -678,13 +679,13 @@ iq2000_elf_relocate_section (bfd *		    
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -706,11 +707,8 @@ iq2000_elf_relocate_section (bfd *		    
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -771,8 +769,9 @@ iq2000_elf_set_private_flags (bfd *abfd,
    file to the output object file when linking.  */
 
 static bfd_boolean
-iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, old_partial;
   flagword new_flags, new_partial;
   bfd_boolean error = FALSE;
@@ -829,6 +828,7 @@ iq2000_elf_merge_private_bfd_data (bfd *
 	{
 	  error = TRUE;
 	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: compiled with %s and linked with modules compiled with %s"),
 	     bfd_get_filename (ibfd), new_opt, old_opt);
 	}
@@ -842,6 +842,7 @@ iq2000_elf_merge_private_bfd_data (bfd *
 	  error = TRUE;
 
 	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
 	     bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-lm32.c ./bfd/elf32-lm32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-lm32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-lm32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Lattice Mico32-specific support for 32-bit ELF
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -87,12 +87,7 @@ struct elf_lm32_link_hash_table
   struct elf_link_hash_table root;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
   asection *sfixup32;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
 
@@ -106,9 +101,9 @@ struct elf_lm32_link_hash_table
   == LM32_ELF_DATA ? ((struct elf_lm32_link_hash_table *) ((p)->hash)) : NULL)
 
 #define lm32fdpic_got_section(info) \
-  (lm32_elf_hash_table (info)->sgot)
+  (lm32_elf_hash_table (info)->root.sgot)
 #define lm32fdpic_gotrel_section(info) \
-  (lm32_elf_hash_table (info)->srelgot)
+  (lm32_elf_hash_table (info)->root.srelgot)
 #define lm32fdpic_fixup32_section(info) \
   (lm32_elf_hash_table (info)->sfixup32)
 
@@ -197,36 +192,6 @@ _lm32fdpic_add_rofixup (bfd *output_bfd,
   return fixup_offset;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_lm32_link_hash_table *htab;
-  asection *s;
-
-  /* This function may be called more than once.  */
-  s = bfd_get_linker_section (dynobj, ".got");
-  if (s != NULL)
-    return TRUE;
-
-  htab = lm32_elf_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab->sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
-    abort ();
-
-  return TRUE;
-}
-
 /* Create .rofixup sections in DYNOBJ, and set up
    shortcuts to them in our hash table.  */
 
@@ -590,6 +555,7 @@ lm32_info_to_howto_rela (bfd *abfd ATTRI
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_LM32_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid LM32 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -822,17 +788,15 @@ lm32_elf_relocate_section (bfd *output_b
   struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
   Elf_Internal_Rela *rel, *relend;
   struct elf_lm32_link_hash_table *htab = lm32_elf_hash_table (info);
-  bfd *dynobj;
   bfd_vma *local_got_offsets;
   asection *sgot;
 
   if (htab == NULL)
     return FALSE;
 
-  dynobj = htab->root.dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -892,7 +856,7 @@ lm32_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
         {
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -945,8 +909,10 @@ lm32_elf_relocate_section (bfd *output_b
                   BFD_ASSERT (off != (bfd_vma) -1);
 
                   dyn = htab->root.dynamic_sections_created;
-                  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-                      || (info->shared
+                  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							 bfd_link_pic (info),
+							 h)
+                      || (bfd_link_pic (info)
                           && (info->symbolic
                               || h->dynindx == -1
                               || h->forced_local)
@@ -1019,15 +985,14 @@ lm32_elf_relocate_section (bfd *output_b
                                                    + off);
                         }
 
-                      if (info->shared)
+                      if (bfd_link_pic (info))
                         {
                           asection *srelgot;
                           Elf_Internal_Rela outrel;
 
                           /* We need to generate a R_LM32_RELATIVE reloc
                              for the dynamic linker.  */
-                          srelgot = bfd_get_linker_section (dynobj,
-							    ".rela.got");
+                          srelgot = htab->root.srelgot;
                           BFD_ASSERT (srelgot != NULL);
 
                           outrel.r_offset = (sgot->output_section->vma
@@ -1050,7 +1015,7 @@ lm32_elf_relocate_section (bfd *output_b
 
               /* Addend should be zero.  */
               if (rel->r_addend != 0)
-                (*_bfd_error_handler) (_("internal error: addend should be zero for R_LM32_16_GOT"));
+		_bfd_error_handler (_("internal error: addend should be zero for R_LM32_16_GOT"));
 
               r = _bfd_final_link_relocate (howto,
                                             input_bfd,
@@ -1147,17 +1112,14 @@ lm32_elf_relocate_section (bfd *output_b
 	      if ((h != NULL)
                  && (h->root.type == bfd_link_hash_undefweak))
 	        break;
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
             case bfd_reloc_undefined:
-              if (! ((*info->callbacks->undefined_symbol)
-                     (info, name, input_bfd, input_section,
-                      rel->r_offset, TRUE)))
-                return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
               break;
 
             case bfd_reloc_outofrange:
@@ -1177,10 +1139,8 @@ lm32_elf_relocate_section (bfd *output_b
               /* fall through */
 
             common_error:
-              if (!((*info->callbacks->warning)
-                    (info, msg, name, input_bfd, input_section,
-                     rel->r_offset)))
-                return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
               break;
             }
         }
@@ -1277,7 +1237,7 @@ lm32_elf_check_relocs (bfd *abfd,
   struct elf_lm32_link_hash_table *htab;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1316,7 +1276,7 @@ lm32_elf_check_relocs (bfd *abfd,
 	}
 
       /* Some relocs require a global offset table.  */
-      if (htab->sgot == NULL)
+      if (htab->root.sgot == NULL)
         {
           switch (r_type)
             {
@@ -1325,7 +1285,7 @@ lm32_elf_check_relocs (bfd *abfd,
             case R_LM32_GOTOFF_LO16:
               if (dynobj == NULL)
                 htab->root.dynobj = dynobj = abfd;
-              if (! create_got_section (dynobj, info))
+              if (!_bfd_elf_create_got_section (dynobj, info))
                 return FALSE;
               break;
             }
@@ -1341,7 +1301,7 @@ lm32_elf_check_relocs (bfd *abfd,
                  (Normal ELF doesn't). */
               if (dynobj == NULL)
                 htab->root.dynobj = dynobj = abfd;
-              if (! create_got_section (dynobj, info))
+              if (!_bfd_elf_create_got_section (dynobj, info))
                 return FALSE;
               /* Create .rofixup section */
               if (htab->sfixup32 == NULL)
@@ -1428,7 +1388,7 @@ lm32_elf_finish_dynamic_sections (bfd *o
 
   dynobj = htab->root.dynobj;
 
-  sgot = htab->sgotplt;
+  sgot = htab->root.sgotplt;
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
@@ -1454,48 +1414,28 @@ lm32_elf_finish_dynamic_sections (bfd *o
               break;
 
             case DT_PLTGOT:
-              s = htab->sgot->output_section;
+              s = htab->root.sgotplt;
               goto get_vma;
             case DT_JMPREL:
-              s = htab->srelplt->output_section;
+              s = htab->root.srelplt;
             get_vma:
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
 
             case DT_PLTRELSZ:
-              s = htab->srelplt->output_section;
-              BFD_ASSERT (s != NULL);
+              s = htab->root.srelplt;
 	      dyn.d_un.d_val = s->size;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
-
-            case DT_RELASZ:
-              /* My reading of the SVR4 ABI indicates that the
-                 procedure linkage table relocs (DT_JMPREL) should be
-                 included in the overall relocs (DT_RELA).  This is
-                 what Solaris does.  However, UnixWare can not handle
-                 that case.  Therefore, we override the DT_RELASZ entry
-                 here to make it not include the JMPREL relocs.  Since
-                 the linker script arranges for .rela.plt to follow all
-                 other relocation sections, we don't have to worry
-                 about changing the DT_RELA entry.  */
-              if (htab->srelplt != NULL)
-                {
-                  s = htab->srelplt->output_section;
-		  dyn.d_un.d_val -= s->size;
-                }
-              bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-              break;
             }
         }
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->root.splt;
       if (splt && splt->size > 0)
         {
-          if (info->shared)
+          if (bfd_link_pic (info))
             {
               bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD0, splt->contents);
               bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD1, splt->contents + 4);
@@ -1556,7 +1496,7 @@ lm32_elf_finish_dynamic_sections (bfd *o
       if (lm32fdpic_fixup32_section (info)->size
               != (lm32fdpic_fixup32_section (info)->reloc_count * 4))
         {
-          (*_bfd_error_handler)
+	  _bfd_error_handler
             ("LINKER BUG: .rofixup section size mismatch: size/4 %d != relocs %d",
             lm32fdpic_fixup32_section (info)->size/4,
             lm32fdpic_fixup32_section (info)->reloc_count);
@@ -1578,7 +1518,7 @@ lm32_elf_finish_dynamic_sections (bfd *o
           BFD_ASSERT (hend->u.def.value == value);
           if (hend->u.def.value != value)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
                 ("LINKER BUG: .rofixup section hend->u.def.value != value: %ld != %ld", hend->u.def.value, value);
               return FALSE;
             }
@@ -1618,9 +1558,9 @@ lm32_elf_finish_dynamic_symbol (bfd *out
          it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      sgot = htab->sgotplt;
-      srela = htab->srelplt;
+      splt = htab->root.splt;
+      sgot = htab->root.sgotplt;
+      srela = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -1635,7 +1575,7 @@ lm32_elf_finish_dynamic_symbol (bfd *out
       got_offset = (plt_index + 3) * 4;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
         {
           /* TODO */
         }
@@ -1679,8 +1619,8 @@ lm32_elf_finish_dynamic_symbol (bfd *out
 
       /* This symbol has an entry in the global offset table.  Set it
          up.  */
-      sgot = htab->sgot;
-      srela = htab->srelgot;
+      sgot = htab->root.sgot;
+      srela = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -1692,7 +1632,7 @@ lm32_elf_finish_dynamic_symbol (bfd *out
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
           && (info->symbolic
 	      || h->dynindx == -1
 	      || h->forced_local)
@@ -1794,7 +1734,7 @@ lm32_elf_adjust_dynamic_symbol (struct b
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->shared
+      if (! bfd_link_pic (info)
           && !h->def_dynamic
           && !h->ref_dynamic
 	  && h->root.type != bfd_link_hash_undefweak
@@ -1833,7 +1773,7 @@ lm32_elf_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -1932,9 +1872,9 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
         {
-          asection *s = htab->splt;
+          asection *s = htab->root.splt;
 
           /* If this is the first .plt entry, make room for the special
              first entry.  */
@@ -1948,7 +1888,7 @@ allocate_dynrelocs (struct elf_link_hash
              location in the .plt.  This is required to make function
              pointers compare as equal between the normal executable and
              the shared library.  */
-          if (! info->shared
+          if (! bfd_link_pic (info)
               && !h->def_regular)
             {
               h->root.u.def.section = s;
@@ -1960,10 +1900,10 @@ allocate_dynrelocs (struct elf_link_hash
 
           /* We also need to make an entry in the .got.plt section, which
              will be placed in the .got section by the linker script.  */
-          htab->sgotplt->size += 4;
+          htab->root.sgotplt->size += 4;
 
           /* We also need to make an entry in the .rel.plt section.  */
-          htab->srelplt->size += sizeof (Elf32_External_Rela);
+          htab->root.srelplt->size += sizeof (Elf32_External_Rela);
         }
       else
         {
@@ -1991,13 +1931,13 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      s = htab->sgot;
+      s = htab->root.sgot;
 
       h->got.offset = s->size;
       s->size += 4;
       dyn = htab->root.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
-        htab->srelgot->size += sizeof (Elf32_External_Rela);
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
+        htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     h->got.offset = (bfd_vma) -1;
@@ -2011,7 +1951,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->def_regular
           && (h->forced_local
@@ -2139,7 +2079,7 @@ lm32_elf_size_dynamic_sections (bfd *out
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2195,15 +2135,15 @@ lm32_elf_size_dynamic_sections (bfd *out
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
       for (; local_got < end_local_got; ++local_got)
         {
           if (*local_got > 0)
             {
               *local_got = s->size;
               s->size += 4;
-              if (info->shared)
+              if (bfd_link_pic (info))
                 srel->size += sizeof (Elf32_External_Rela);
             }
           else
@@ -2223,9 +2163,9 @@ lm32_elf_size_dynamic_sections (bfd *out
       if ((s->flags & SEC_LINKER_CREATED) == 0)
         continue;
 
-      if (s == htab->splt
-          || s == htab->sgot
-          || s == htab->sgotplt
+      if (s == htab->root.splt
+          || s == htab->root.sgot
+          || s == htab->root.sgotplt
 	  || s == htab->sdynbss)
         {
           /* Strip this section if we don't need it; see the
@@ -2233,7 +2173,7 @@ lm32_elf_size_dynamic_sections (bfd *out
         }
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
         {
-          if (s->size != 0 && s != htab->srelplt)
+          if (s->size != 0 && s != htab->root.srelplt)
             relocs = TRUE;
 
           /* We use the reloc_count field as a counter if we need
@@ -2282,13 +2222,13 @@ lm32_elf_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-     if (info->executable)
+     if (bfd_link_executable (info))
 	{
 	  if (! add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->splt->size != 0)
+      if (htab->root.splt->size != 0)
         {
           if (! add_dynamic_entry (DT_PLTGOT, 0)
               || ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2433,7 +2373,8 @@ lm32_elf_size_dynamic_sections (bfd *out
         }
 
       /* Size sections.  */
-      lm32fdpic_fixup32_section (info)->size = (r32_count + (htab->sgot->size / 4) - rgot_weak_count + 1) * 4;
+      lm32fdpic_fixup32_section (info)->size
+	= (r32_count + (htab->root.sgot->size / 4) - rgot_weak_count + 1) * 4;
       if (lm32fdpic_fixup32_section (info)->size == 0)
         lm32fdpic_fixup32_section (info)->flags |= SEC_EXCLUDE;
       else
@@ -2465,7 +2406,7 @@ lm32_elf_create_dynamic_sections (bfd *a
 
   /* Make sure we have a GOT - For the case where we have a dynamic object
      but none of the relocs in check_relocs */
-  if (! create_got_section (abfd, info))
+  if (!_bfd_elf_create_got_section (abfd, info))
     return FALSE;
   if (IS_FDPIC (abfd) && (htab->sfixup32 == NULL))
     {
@@ -2486,7 +2427,7 @@ lm32_elf_create_dynamic_sections (bfd *a
     pltflags |= SEC_READONLY;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
-  htab->splt = s;
+  htab->root.splt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
     return FALSE;
@@ -2508,7 +2449,7 @@ lm32_elf_create_dynamic_sections (bfd *a
       h->type = STT_OBJECT;
       htab->root.hplt = h;
 
-      if (info->shared
+      if (bfd_link_pic (info)
           && ! bfd_elf_link_record_dynamic_symbol (info, h))
         return FALSE;
     }
@@ -2517,13 +2458,13 @@ lm32_elf_create_dynamic_sections (bfd *a
 					  bed->default_use_rela_p
 					  ? ".rela.plt" : ".rel.plt",
 					  flags | SEC_READONLY);
-  htab->srelplt = s;
+  htab->root.srelplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (htab->sgot == NULL
-      && ! create_got_section (abfd, info))
+  if (htab->root.sgot == NULL
+      && !_bfd_elf_create_got_section (abfd, info))
     return FALSE;
 
   if (bed->want_dynbss)
@@ -2550,7 +2491,7 @@ lm32_elf_create_dynamic_sections (bfd *a
          be needed, we can discard it later.  We will never need this
          section when generating a shared object, since they do not use
          copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
         {
           s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -2616,7 +2557,7 @@ lm32_elf_copy_indirect_symbol (struct bf
 static bfd_boolean
 lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       if (!bfd_elf_stack_segment_size (output_bfd, info,
 				       "__stacksize", DEFAULT_STACK_SIZE))
@@ -2697,6 +2638,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bf
 #define elf_backend_want_got_plt                1
 #define elf_backend_want_plt_sym                0
 #define elf_backend_got_header_size             12
+#define elf_backend_dtrel_excludes_plt		1
 #define bfd_elf32_bfd_link_hash_table_create    lm32_elf_link_hash_table_create
 #define elf_backend_check_relocs                lm32_elf_check_relocs
 #define elf_backend_reloc_type_class            lm32_elf_reloc_type_class
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m32c.c ./bfd/elf32-m32c.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m32c.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m32c.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* M16C/M32C specific support for 32-bit ELF.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -301,6 +301,7 @@ m32c_info_to_howto_rela
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_M32C_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid M32C reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -399,17 +400,13 @@ m32c_elf_relocate_section
   struct elf_link_hash_entry ** sym_hashes;
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
-  bfd *dynobj;
   asection *splt;
 
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
 
-  dynobj = elf_hash_table (info)->dynobj;
-  splt = NULL;
-  if (dynobj != NULL)
-    splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
 
   for (rel = relocs; rel < relend; rel ++)
     {
@@ -477,20 +474,17 @@ m32c_elf_relocate_section
 	    }
 	  else if (h->root.type == bfd_link_hash_undefweak)
 	    ;
-	  else if (!info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd,
-		      input_section, rel->r_offset, TRUE)))
-		return FALSE;
-	    }
+	  else if (!bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol) (info, h->root.root.string,
+						  input_bfd, input_section,
+						  rel->r_offset, TRUE);
 	}
 
       if (sec != NULL && discarded_section (sec))
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
              anything, unless the reloc is against a section symbol,
@@ -613,15 +607,14 @@ m32c_elf_relocate_section
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		 input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -642,11 +635,8 @@ m32c_elf_relocate_section
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -671,7 +661,7 @@ m32c_elf_check_relocs
   asection *splt;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -710,20 +700,18 @@ m32c_elf_check_relocs
 	case R_M32C_16:
 	  if (dynobj == NULL)
 	    elf_hash_table (info)->dynobj = dynobj = abfd;
+	  splt = elf_hash_table (info)->splt;
 	  if (splt == NULL)
 	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      if (splt == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY | SEC_CODE);
-		  splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
-							     flags);
-		  if (splt == NULL
-		      || ! bfd_set_section_alignment (dynobj, splt, 1))
-		    return FALSE;
-		}
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+				| SEC_IN_MEMORY | SEC_LINKER_CREATED
+				| SEC_READONLY | SEC_CODE);
+	      splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
+							 flags);
+	      elf_hash_table (info)->splt = splt;
+	      if (splt == NULL
+		  || ! bfd_set_section_alignment (dynobj, splt, 1))
+		return FALSE;
 	    }
 
 	  if (h != NULL)
@@ -765,14 +753,13 @@ static bfd_boolean
 m32c_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
                                   struct bfd_link_info *info)
 {
-  bfd *dynobj;
-  asection *splt;
+  bfd *dynobj = elf_hash_table (info)->dynobj;
+  asection *splt = elf_hash_table (info)->splt;
 
   /* As an extra sanity check, verify that all plt entries have
      been filled in.  */
 
-  if ((dynobj = elf_hash_table (info)->dynobj) != NULL
-      && (splt = bfd_get_linker_section (dynobj, ".plt")) != NULL)
+  if (dynobj != NULL && splt != NULL)
     {
       bfd_byte *contents = splt->contents;
       unsigned int i, size = splt->size;
@@ -793,14 +780,14 @@ m32c_elf_always_size_sections (bfd *outp
   bfd *dynobj;
   asection *splt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj == NULL)
     return TRUE;
 
-  splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
   BFD_ASSERT (splt != NULL);
 
   splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->size);
@@ -824,8 +811,9 @@ m32c_elf_set_private_flags (bfd *abfd, f
    object file when linking.  */
 
 static bfd_boolean
-m32c_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, old_partial;
   flagword new_flags, new_partial;
   bfd_boolean error = FALSE;
@@ -837,9 +825,10 @@ m32c_elf_merge_private_bfd_data (bfd *ib
   old_flags = elf_elfheader (obfd)->e_flags;
 
 #ifdef DEBUG
-  (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
-			 old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
-			 bfd_get_filename (ibfd));
+  _bfd_error_handler
+    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+     old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
+     bfd_get_filename (ibfd));
 #endif
 
   if (!elf_flags_init (obfd))
@@ -883,7 +872,8 @@ m32c_elf_merge_private_bfd_data (bfd *ib
       if (new_opt[0])
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: compiled with %s and linked with modules compiled with %s"),
 	     bfd_get_filename (ibfd), new_opt, old_opt);
 	}
@@ -895,7 +885,8 @@ m32c_elf_merge_private_bfd_data (bfd *ib
       if (new_flags != old_flags)
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
 	     bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
 	}
@@ -1165,7 +1156,7 @@ m32c_elf_relax_plt_section (asection *sp
   /* Assume nothing changes.  */
   *again = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Quick check for an empty plt.  */
@@ -1467,14 +1458,17 @@ m32c_elf_relax_section
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
     return TRUE;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+  symtab_hdr = & elf_symtab_hdr (abfd);
+  if (elf_symtab_shndx_list (abfd))
+    shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+  else
+    shndx_hdr = NULL;
 
   /* Get the section contents.  */
   if (elf_section_data (sec)->this_hdr.contents != NULL)
@@ -1495,7 +1489,7 @@ m32c_elf_relax_section
       symtab_hdr->contents = (bfd_byte *) intsyms;
     }
 
-  if (shndx_hdr->sh_size != 0)
+  if (shndx_hdr && shndx_hdr->sh_size != 0)
     {
       bfd_size_type amt;
 
@@ -2043,8 +2037,16 @@ m32c_elf_relax_delete_bytes
   isymend = isym + symtab_hdr->sh_info;
 
   sec_shndx  = _bfd_elf_section_from_bfd_section (abfd, sec);
-  shndx_hdr  = & elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx_buf  = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+  if (elf_symtab_shndx_list (abfd))
+    {
+      shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+      shndx_buf  = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+    }
+  else
+    {
+      shndx_hdr = NULL;
+      shndx_buf = NULL;
+    }
   shndx = shndx_buf;
 
   for (; isym < isymend; isym++, shndx = (shndx ? shndx + 1 : NULL))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m32r.c ./bfd/elf32-m32r.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m32r.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m32r.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* M32R-specific support for 32-bit ELF.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1282,6 +1282,7 @@ m32r_info_to_howto_rel (bfd *abfd ATTRIB
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type > (unsigned int) R_M32R_GNU_VTENTRY)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid M32R reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1369,7 +1370,7 @@ m32r_elf_add_symbol_hook (bfd *abfd,
 			  asection **secp,
 			  bfd_vma *valp)
 {
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && (*namep)[0] == '_' && (*namep)[1] == 'S'
       && strcmp (*namep, "_SDA_BASE_") == 0
       && is_elf_hash_table (info->hash))
@@ -1522,11 +1523,6 @@ struct elf_m32r_link_hash_table
   struct elf_link_hash_table root;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
 
@@ -1605,30 +1601,6 @@ m32r_elf_link_hash_table_create (bfd *ab
   return &ret->root.root;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_m32r_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab = m32r_elf_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  htab->sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
-    abort ();
-
-  return TRUE;
-}
-
 /* Create dynamic sections when linking against a dynamic object.  */
 
 static bfd_boolean
@@ -1657,7 +1629,7 @@ m32r_elf_create_dynamic_sections (bfd *a
     pltflags |= SEC_READONLY;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
-  htab->splt = s;
+  htab->root.splt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
     return FALSE;
@@ -1679,7 +1651,7 @@ m32r_elf_create_dynamic_sections (bfd *a
       h->type = STT_OBJECT;
       htab->root.hplt = h;
 
-      if (info->shared
+      if (bfd_link_pic (info)
           && ! bfd_elf_link_record_dynamic_symbol (info, h))
         return FALSE;
     }
@@ -1688,13 +1660,13 @@ m32r_elf_create_dynamic_sections (bfd *a
 					  bed->default_use_rela_p
 					  ? ".rela.plt" : ".rel.plt",
 					  flags | SEC_READONLY);
-  htab->srelplt = s;
+  htab->root.srelplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (htab->sgot == NULL
-      && ! create_got_section (abfd, info))
+  if (htab->root.sgot == NULL
+      && !_bfd_elf_create_got_section (abfd, info))
     return FALSE;
 
   if (bed->want_dynbss)
@@ -1721,7 +1693,7 @@ m32r_elf_create_dynamic_sections (bfd *a
          be needed, we can discard it later.  We will never need this
          section when generating a shared object, since they do not use
          copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
         {
           s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -1821,7 +1793,7 @@ m32r_elf_adjust_dynamic_symbol (struct b
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->shared
+      if (! bfd_link_pic (info)
           && !h->def_dynamic
           && !h->ref_dynamic
 	  && h->root.type != bfd_link_hash_undefweak
@@ -1860,7 +1832,7 @@ m32r_elf_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -1959,9 +1931,9 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
         {
-          asection *s = htab->splt;
+          asection *s = htab->root.splt;
 
           /* If this is the first .plt entry, make room for the special
              first entry.  */
@@ -1975,7 +1947,7 @@ allocate_dynrelocs (struct elf_link_hash
              location in the .plt.  This is required to make function
              pointers compare as equal between the normal executable and
              the shared library.  */
-          if (! info->shared
+          if (! bfd_link_pic (info)
               && !h->def_regular)
             {
               h->root.u.def.section = s;
@@ -1987,10 +1959,10 @@ allocate_dynrelocs (struct elf_link_hash
 
           /* We also need to make an entry in the .got.plt section, which
              will be placed in the .got section by the linker script.  */
-          htab->sgotplt->size += 4;
+          htab->root.sgotplt->size += 4;
 
           /* We also need to make an entry in the .rel.plt section.  */
-          htab->srelplt->size += sizeof (Elf32_External_Rela);
+          htab->root.srelplt->size += sizeof (Elf32_External_Rela);
         }
       else
         {
@@ -2018,13 +1990,13 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      s = htab->sgot;
+      s = htab->root.sgot;
 
       h->got.offset = s->size;
       s->size += 4;
       dyn = htab->root.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
-        htab->srelgot->size += sizeof (Elf32_External_Rela);
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
+        htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     h->got.offset = (bfd_vma) -1;
@@ -2038,7 +2010,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->def_regular
           && (h->forced_local
@@ -2170,7 +2142,7 @@ m32r_elf_size_dynamic_sections (bfd *out
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2226,15 +2198,15 @@ m32r_elf_size_dynamic_sections (bfd *out
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
       for (; local_got < end_local_got; ++local_got)
         {
           if (*local_got > 0)
             {
               *local_got = s->size;
               s->size += 4;
-              if (info->shared)
+              if (bfd_link_pic (info))
                 srel->size += sizeof (Elf32_External_Rela);
             }
           else
@@ -2254,9 +2226,9 @@ m32r_elf_size_dynamic_sections (bfd *out
       if ((s->flags & SEC_LINKER_CREATED) == 0)
         continue;
 
-      if (s == htab->splt
-          || s == htab->sgot
-          || s == htab->sgotplt
+      if (s == htab->root.splt
+          || s == htab->root.sgot
+          || s == htab->root.sgotplt
 	  || s == htab->sdynbss)
         {
           /* Strip this section if we don't need it; see the
@@ -2264,7 +2236,7 @@ m32r_elf_size_dynamic_sections (bfd *out
         }
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
         {
-          if (s->size != 0 && s != htab->srelplt)
+          if (s->size != 0 && s != htab->root.srelplt)
             relocs = TRUE;
 
           /* We use the reloc_count field as a counter if we need
@@ -2313,13 +2285,13 @@ m32r_elf_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-     if (info->executable)
+     if (bfd_link_executable (info))
 	{
 	  if (! add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->splt->size != 0)
+      if (htab->root.splt->size != 0)
         {
           if (! add_dynamic_entry (DT_PLTGOT, 0)
               || ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2403,7 +2375,6 @@ m32r_elf_relocate_section (bfd *output_b
   /* Assume success.  */
   bfd_boolean ret = TRUE;
   struct elf_m32r_link_hash_table *htab = m32r_elf_hash_table (info);
-  bfd *dynobj;
   bfd_vma *local_got_offsets;
   asection *sgot, *splt, *sreloc;
   bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
@@ -2411,11 +2382,10 @@ m32r_elf_relocate_section (bfd *output_b
   if (htab == NULL)
     return FALSE;
 
-  dynobj = htab->root.dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
 
-  sgot = htab->sgot;
-  splt = htab->splt;
+  sgot = htab->root.sgot;
+  splt = htab->root.splt;
   sreloc = NULL;
 
   rel = relocs;
@@ -2444,9 +2414,9 @@ m32r_elf_relocate_section (bfd *output_b
       r_type = ELF32_R_TYPE (rel->r_info);
       if (r_type < 0 || r_type >= (int) R_M32R_max)
 	{
-	  (*_bfd_error_handler) (_("%B: unknown relocation type %d"),
-				 input_bfd,
-				 (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: unknown relocation type %d"),
+			      input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
 	  continue;
@@ -2524,11 +2494,12 @@ m32r_elf_relocate_section (bfd *output_b
 		       || r_type == R_M32R_GOT16_HI_SLO
 		       || r_type == R_M32R_GOT16_LO)
 		      && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
-							  info->shared, h)
-		      && (! info->shared
+							  bfd_link_pic (info),
+							  h)
+		      && (! bfd_link_pic (info)
 			  || (! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular))
-		  || (info->shared
+		  || (bfd_link_pic (info)
 		      && ((! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular)
 		      && (((r_type == R_M32R_16_RELA
@@ -2558,13 +2529,14 @@ m32r_elf_relocate_section (bfd *output_b
 		relocation = (h->root.u.def.value
 			      + sec->output_section->vma
 			      + sec->output_offset);
-	      else if (!info->relocatable
+	      else if (!bfd_link_relocatable (info)
 		       && (_bfd_elf_section_offset (output_bfd, info,
 						    input_section,
 						    rel->r_offset)
 			   != (bfd_vma) -1))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 		     input_bfd,
 		     input_section,
@@ -2578,22 +2550,19 @@ m32r_elf_relocate_section (bfd *output_b
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd,
-		      input_section, offset,
-		      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-		       || ELF_ST_VISIBILITY (h->other)))))
-		return FALSE;
-	    }
+	  else if (!bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd,
+	       input_section, offset,
+	       (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+		|| ELF_ST_VISIBILITY (h->other)));
 	}
 
       if (sec != NULL && discarded_section (sec))
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable && !use_rel)
+      if (bfd_link_relocatable (info) && !use_rel)
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -2604,7 +2573,7 @@ m32r_elf_relocate_section (bfd *output_b
 	  continue;
 	}
 
-      if (info->relocatable && use_rel)
+      if (bfd_link_relocatable (info) && use_rel)
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -2733,8 +2702,10 @@ m32r_elf_relocate_section (bfd *output_b
                   BFD_ASSERT (off != (bfd_vma) -1);
 
                   dyn = htab->root.dynamic_sections_created;
-                  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-                      || (info->shared
+                  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							 bfd_link_pic (info),
+							 h)
+                      || (bfd_link_pic (info)
                           && (info->symbolic
                               || h->dynindx == -1
                               || h->forced_local)
@@ -2783,15 +2754,14 @@ m32r_elf_relocate_section (bfd *output_b
                     {
                       bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-                      if (info->shared)
+                      if (bfd_link_pic (info))
                         {
                           asection *srelgot;
                           Elf_Internal_Rela outrel;
 
                           /* We need to generate a R_M32R_RELATIVE reloc
                              for the dynamic linker.  */
-                          srelgot = bfd_get_linker_section (dynobj,
-							    ".rela.got");
+                          srelgot = htab->root.srelgot;
                           BFD_ASSERT (srelgot != NULL);
 
                           outrel.r_offset = (sgot->output_section->vma
@@ -2854,7 +2824,7 @@ m32r_elf_relocate_section (bfd *output_b
             case R_M32R_26_PCREL_RELA:
             case R_M32R_HI16_ULO_RELA:
             case R_M32R_LO16_RELA:
-              if (info->shared
+              if (bfd_link_pic (info)
                   && r_symndx != STN_UNDEF
                   && (input_section->flags & SEC_ALLOC) != 0
                   && ((   r_type != R_M32R_10_PCREL_RELA
@@ -3009,7 +2979,8 @@ m32r_elf_relocate_section (bfd *output_b
 		  }
 		else
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: The target (%s) of an %s relocation is in the wrong section (%A)"),
 		       input_bfd,
 		       sec,
@@ -3059,17 +3030,14 @@ m32r_elf_relocate_section (bfd *output_b
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section, offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -3089,10 +3057,8 @@ m32r_elf_relocate_section (bfd *output_b
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, errmsg, name, input_bfd, input_section,
-		     offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+					   input_section, offset);
 	      break;
 	    }
 	}
@@ -3136,9 +3102,9 @@ m32r_elf_finish_dynamic_symbol (bfd *out
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      sgot = htab->sgotplt;
-      srela = htab->srelplt;
+      splt = htab->root.splt;
+      sgot = htab->root.sgotplt;
+      srela = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -3153,7 +3119,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out
       got_offset = (plt_index + 3) * 4;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
         {
           bfd_put_32 (output_bfd,
               (PLT_ENTRY_WORD0b
@@ -3232,8 +3198,8 @@ m32r_elf_finish_dynamic_symbol (bfd *out
       /* This symbol has an entry in the global offset table.  Set it
          up.  */
 
-      sgot = htab->sgot;
-      srela = htab->srelgot;
+      sgot = htab->root.sgot;
+      srela = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -3245,7 +3211,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
           && (info->symbolic
 	      || h->dynindx == -1
 	      || h->forced_local)
@@ -3324,7 +3290,7 @@ m32r_elf_finish_dynamic_sections (bfd *o
 
   dynobj = htab->root.dynobj;
 
-  sgot = htab->sgotplt;
+  sgot = htab->root.sgotplt;
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
@@ -3350,48 +3316,28 @@ m32r_elf_finish_dynamic_sections (bfd *o
               break;
 
             case DT_PLTGOT:
-              s = htab->sgot->output_section;
+              s = htab->root.sgotplt;
               goto get_vma;
             case DT_JMPREL:
-              s = htab->srelplt->output_section;
+              s = htab->root.srelplt;
             get_vma:
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
 
             case DT_PLTRELSZ:
-              s = htab->srelplt->output_section;
-              BFD_ASSERT (s != NULL);
+              s = htab->root.srelplt;
 	      dyn.d_un.d_val = s->size;
               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
               break;
-
-            case DT_RELASZ:
-              /* My reading of the SVR4 ABI indicates that the
-                 procedure linkage table relocs (DT_JMPREL) should be
-                 included in the overall relocs (DT_RELA).  This is
-                 what Solaris does.  However, UnixWare can not handle
-                 that case.  Therefore, we override the DT_RELASZ entry
-                 here to make it not include the JMPREL relocs.  Since
-                 the linker script arranges for .rela.plt to follow all
-                 other relocation sections, we don't have to worry
-                 about changing the DT_RELA entry.  */
-              if (htab->srelplt != NULL)
-                {
-                  s = htab->srelplt->output_section;
-		  dyn.d_un.d_val -= s->size;
-                }
-              bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-              break;
             }
         }
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->root.splt;
       if (splt && splt->size > 0)
         {
-          if (info->shared)
+          if (bfd_link_pic (info))
             {
               bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD0, splt->contents);
               bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD1, splt->contents + 4);
@@ -3491,8 +3437,9 @@ m32r_elf_set_private_flags (bfd *abfd, f
    object file when linking.  */
 
 static bfd_boolean
-m32r_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
 
@@ -3535,7 +3482,7 @@ m32r_elf_merge_private_bfd_data (bfd *ib
           || ((out_flags & EF_M32R_ARCH) == E_M32R_ARCH)
           || ((in_flags  & EF_M32R_ARCH) == E_M32R2_ARCH))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: Instruction set mismatch with previous modules"), ibfd);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -3604,7 +3551,7 @@ m32r_elf_gc_sweep_hook (bfd *abfd ATTRIB
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   elf_section_data (sec)->local_dynrel = NULL;
@@ -3671,7 +3618,7 @@ m32r_elf_gc_sweep_hook (bfd *abfd ATTRIB
 	      struct elf_m32r_dyn_relocs **pp;
 	      struct elf_m32r_dyn_relocs *p;
 
-	      if (!info->shared && h->plt.refcount > 0)
+	      if (!bfd_link_pic (info) && h->plt.refcount > 0)
 		h->plt.refcount -= 1;
 
 	      eh = (struct elf_m32r_link_hash_entry *) h;
@@ -3726,7 +3673,7 @@ m32r_elf_check_relocs (bfd *abfd,
   bfd *dynobj;
   asection *sreloc;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   sreloc = NULL;
@@ -3763,7 +3710,7 @@ m32r_elf_check_relocs (bfd *abfd,
 	}
 
       /* Some relocs require a global offset table.  */
-      if (htab->sgot == NULL)
+      if (htab->root.sgot == NULL)
         {
           switch (r_type)
             {
@@ -3781,7 +3728,7 @@ m32r_elf_check_relocs (bfd *abfd,
             case R_M32R_GOT24:
               if (dynobj == NULL)
                 htab->root.dynobj = dynobj = abfd;
-              if (! create_got_section (dynobj, info))
+              if (!_bfd_elf_create_got_section (dynobj, info))
                 return FALSE;
               break;
 
@@ -3852,7 +3799,7 @@ m32r_elf_check_relocs (bfd *abfd,
         case R_M32R_18_PCREL_RELA:
         case R_M32R_26_PCREL_RELA:
 
-          if (h != NULL && !info->shared)
+          if (h != NULL && !bfd_link_pic (info))
             {
               h->non_got_ref = 1;
               h->plt.refcount += 1;
@@ -3877,7 +3824,7 @@ m32r_elf_check_relocs (bfd *abfd,
              may need to keep relocations for symbols satisfied by a
              dynamic library if we manage to avoid copy relocs for the
              symbol.  */
-          if ((info->shared
+          if ((bfd_link_pic (info)
                && (sec->flags & SEC_ALLOC) != 0
 	       && ((   r_type != R_M32R_26_PCREL_RELA
                     && r_type != R_M32R_18_PCREL_RELA
@@ -3887,7 +3834,7 @@ m32r_elf_check_relocs (bfd *abfd,
 		       && (! info->symbolic
 		           || h->root.type == bfd_link_hash_defweak
 		           || !h->def_regular))))
-              || (!info->shared
+              || (!bfd_link_pic (info)
                   && (sec->flags & SEC_ALLOC) != 0
                   && h != NULL
                   && (h->root.type == bfd_link_hash_defweak
@@ -4049,6 +3996,7 @@ m32r_elf_reloc_type_class (const struct 
 #define elf_backend_plt_readonly 1
 #define elf_backend_want_plt_sym 0
 #define elf_backend_got_header_size 12
+#define elf_backend_dtrel_excludes_plt	1
 
 #define elf_backend_may_use_rel_p       1
 #ifdef USE_M32R_OLD_RELOC
@@ -4083,4 +4031,3 @@ m32r_elf_reloc_type_class (const struct 
 #define elf32_bed               elf32_m32r_lin_bed
 
 #include "elf32-target.h"
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc11.c ./bfd/elf32-m68hc11.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc11.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m68hc11.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 68HC11-specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
    (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
 
@@ -386,6 +386,7 @@ m68hc11_info_to_howto_rel (bfd *abfd ATT
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_M68HC11_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid M68HC11 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -696,7 +697,7 @@ m68hc11_elf_relax_section (bfd *abfd, as
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc12.c ./bfd/elf32-m68hc12.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc12.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m68hc12.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 68HC12-specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
    (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
 
@@ -506,6 +506,7 @@ m68hc11_info_to_howto_rel (bfd *abfd ATT
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_M68HC11_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid M68HC12 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc1x.c ./bfd/elf32-m68hc1x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc1x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m68hc1x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 68HC11/HC12-specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -28,7 +28,7 @@
 #include "elf32-m68hc1x.h"
 #include "elf/m68hc11.h"
 #include "opcode/m68hc11.h"
-
+#include "libiberty.h"
 
 #define m68hc12_stub_hash_lookup(table, string, create, copy) \
   ((struct elf32_m68hc11_stub_hash_entry *) \
@@ -161,8 +161,9 @@ m68hc12_add_stub (const char *stub_name,
                                          TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-			     section->owner, stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+			  section->owner, stub_name);
       return NULL;
     }
 
@@ -237,7 +238,7 @@ elf32_m68hc11_setup_section_lists (bfd *
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -592,13 +593,13 @@ m68hc11_elf_export_one_stub (struct bfd_
   result = (* htab->build_one_stub) (gen_entry, in_arg);
 
   /* Make a printable name that does not conflict with the real function.  */
-  name = alloca (strlen (stub_entry->root.string) + 16);
-  sprintf (name, "tramp.%s", stub_entry->root.string);
+  name = concat ("tramp.", stub_entry->root.string, NULL);
 
   /* Export the symbol for debugging/disassembling.  */
   m68hc11_elf_set_symbol (htab->stub_bfd, info, name,
                           stub_entry->stub_offset,
                           stub_entry->stub_sec);
+  free (name);
   return result;
 }
 
@@ -853,7 +854,7 @@ elf32_m68hc11_check_relocs (bfd *abfd, s
   const Elf_Internal_Rela *     rel;
   const Elf_Internal_Rela *     rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
@@ -956,6 +957,8 @@ elf32_m68hc11_relocate_section (bfd *out
       bfd_boolean is_section_symbol = FALSE;
       struct elf_link_hash_entry *h;
       bfd_vma val;
+      const char * msg;
+      char * buf;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
       r_type = ELF32_R_TYPE (rel->r_info);
@@ -998,7 +1001,7 @@ elf32_m68hc11_relocate_section (bfd *out
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -1113,15 +1116,14 @@ elf32_m68hc11_relocate_section (bfd *out
           /* Get virtual address of instruction having the relocation.  */
           if (is_far)
             {
-              const char* msg;
-              char* buf;
               msg = _("Reference to the far symbol `%s' using a wrong "
                       "relocation may result in incorrect execution");
-              buf = alloca (strlen (msg) + strlen (name) + 10);
+              buf = xmalloc (strlen (msg) + strlen (name) + 10);
               sprintf (buf, msg, name);
 
-              (* info->callbacks->warning)
-                (info, buf, name, input_bfd, NULL, rel->r_offset);
+	      (*info->callbacks->warning)
+		(info, buf, name, input_bfd, NULL, rel->r_offset);
+	      free (buf);
             }
 
           /* Get virtual address of instruction having the relocation.  */
@@ -1148,18 +1150,15 @@ elf32_m68hc11_relocate_section (bfd *out
 		}
 	      else
 		{
-		  const char * msg;
-		  char * buf;
-
 		  msg = _("XGATE address (%lx) is not within shared RAM"
 			  "(0xE000-0xFFFF), therefore you must manually offset "
 			  "the address, and possibly manage the page, in your "
 			  "code.");
-		  buf = alloca (strlen (msg) + 128);
+		  buf = xmalloc (strlen (msg) + 128);
 		  sprintf (buf, msg, phys_addr);
-		  if (!((*info->callbacks->warning) (info, buf, name, input_bfd,
-						     input_section, insn_addr)))
-		    return FALSE;
+		  (*info->callbacks->warning) (info, buf, name, input_bfd,
+					       input_section, insn_addr);
+		  free (buf);
 		  break;
 		}
 	    }
@@ -1168,39 +1167,30 @@ elf32_m68hc11_relocate_section (bfd *out
               && m68hc11_addr_is_banked (pinfo, insn_addr)
               && phys_page != insn_page && !(e_flags & E_M68HC11_NO_BANK_WARNING))
             {
-              const char * msg;
-              char * buf;
-
+	      /* xgettext:c-format */
               msg = _("banked address [%lx:%04lx] (%lx) is not in the same bank "
                       "as current banked address [%lx:%04lx] (%lx)");
-
-              buf = alloca (strlen (msg) + 128);
+              buf = xmalloc (strlen (msg) + 128);
               sprintf (buf, msg, phys_page, phys_addr,
                        (long) (relocation + rel->r_addend),
                        insn_page, m68hc11_phys_addr (pinfo, insn_addr),
                        (long) (insn_addr));
-              if (!((*info->callbacks->warning)
-                    (info, buf, name, input_bfd, input_section,
-                     rel->r_offset)))
-                return FALSE;
+	      (*info->callbacks->warning) (info, buf, name, input_bfd,
+					   input_section, rel->r_offset);
+	      free (buf);
               break;
             }
 
           if (phys_page != 0 && insn_page == 0)
             {
-              const char * msg;
-              char * buf;
-
+	      /* xgettext:c-format */
               msg = _("reference to a banked address [%lx:%04lx] in the "
                       "normal address space at %04lx");
-
-              buf = alloca (strlen (msg) + 128);
+              buf = xmalloc (strlen (msg) + 128);
               sprintf (buf, msg, phys_page, phys_addr, insn_addr);
-              if (!((*info->callbacks->warning)
-                    (info, buf, name, input_bfd, input_section,
-                     insn_addr)))
-                return FALSE;
-
+	      (*info->callbacks->warning) (info, buf, name, input_bfd,
+					   input_section, insn_addr);
+	      free (buf);
               relocation = phys_addr;
               break;
             }
@@ -1231,9 +1221,6 @@ elf32_m68hc11_relocate_section (bfd *out
                 relocation += 0xC000;
               else
                 {
-                  const char * msg;
-                  char * buf;
-
                   /* Get virtual address of instruction having the relocation.  */
                   insn_addr = input_section->output_section->vma
                       + input_section->output_offset + rel->r_offset;
@@ -1241,11 +1228,11 @@ elf32_m68hc11_relocate_section (bfd *out
                   msg = _("S12 address (%lx) is not within shared RAM"
                       "(0x2000-0x4000), therefore you must manually "
                       "offset the address in your code");
-                  buf = alloca (strlen (msg) + 128);
+                  buf = xmalloc (strlen (msg) + 128);
                   sprintf (buf, msg, phys_addr);
-                  if (!((*info->callbacks->warning) (info, buf, name, input_bfd,
-						     input_section, insn_addr)))
-                    return FALSE;
+		  (*info->callbacks->warning) (info, buf, name, input_bfd,
+					       input_section, insn_addr);
+		  free (buf);
                   break;
                 }
             }
@@ -1265,22 +1252,17 @@ elf32_m68hc11_relocate_section (bfd *out
 
       if (r != bfd_reloc_ok)
 	{
-	  const char * msg = (const char *) 0;
-
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, NULL, name, howto->name, (bfd_vma) 0,
-		     input_bfd, input_section, rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, NULL, name, howto->name, (bfd_vma) 0,
+		 input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -1300,10 +1282,8 @@ elf32_m68hc11_relocate_section (bfd *out
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -1331,14 +1311,15 @@ _bfd_m68hc11_elf_set_private_flags (bfd 
    object file when linking.  */
 
 bfd_boolean
-_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
   bfd_boolean ok = TRUE;
 
   /* Check if we have the same endianness */
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -1370,14 +1351,14 @@ _bfd_m68hc11_elf_merge_private_bfd_data 
   /* Check ABI compatibility.  */
   if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking files compiled for 16-bit integers (-mshort) "
            "and others for 32-bit integers"), ibfd);
       ok = FALSE;
     }
   if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking files compiled for 32-bit double (-fshort-double) "
            "and others for 64-bit double"), ibfd);
       ok = FALSE;
@@ -1386,7 +1367,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data 
   /* Processor compatibility.  */
   if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking files compiled for HCS12 with "
            "others compiled for HC12"), ibfd);
       ok = FALSE;
@@ -1402,7 +1383,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data 
   /* Warn about any other mismatches */
   if (new_flags != old_flags)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
 	 ibfd, (unsigned long) new_flags, (unsigned long) old_flags);
       ok = FALSE;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc1x.h ./bfd/elf32-m68hc1x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68hc1x.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m68hc1x.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 68HC11/68HC12-specific support for 32-bit ELF
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -33,7 +33,8 @@
 #define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual"
 
 /* Set and control ELF flags in ELF header.  */
-extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data (bfd*,bfd*);
+extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword);
 extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68k.c ./bfd/elf32-m68k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m68k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m68k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 68k series support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -348,8 +348,9 @@ rtype_to_howto (bfd *abfd, arelent *cach
 
   if (indx >= (unsigned int) R_68K_max)
     {
-      (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-			     abfd, (int) indx);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: invalid relocation type %d"),
+			  abfd, (int) indx);
       indx = R_68K_NONE;
     }
   cache_ptr->howto = &howto_table[indx];
@@ -507,7 +508,8 @@ static const bfd_byte elf_m68k_plt_entry
   0, 0, 0, 0		  /* + .plt - . */
 };
 
-static const struct elf_m68k_plt_info elf_m68k_plt_info = {
+static const struct elf_m68k_plt_info elf_m68k_plt_info =
+{
   PLT_ENTRY_SIZE,
   elf_m68k_plt0_entry, { 4, 12 },
   elf_m68k_plt_entry, { 4, 16 }, 8
@@ -541,7 +543,8 @@ static const bfd_byte elf_isab_plt_entry
   0, 0, 0, 0              /* + .plt - . */
 };
 
-static const struct elf_m68k_plt_info elf_isab_plt_info = {
+static const struct elf_m68k_plt_info elf_isab_plt_info =
+{
   ISAB_PLT_ENTRY_SIZE,
   elf_isab_plt0_entry, { 2, 12 },
   elf_isab_plt_entry, { 2, 20 }, 12
@@ -575,7 +578,8 @@ static const bfd_byte elf_isac_plt_entry
   0, 0, 0, 0 		  /* replaced with .plt - . */
 };
 
-static const struct elf_m68k_plt_info elf_isac_plt_info = {
+static const struct elf_m68k_plt_info elf_isac_plt_info =
+{
   ISAC_PLT_ENTRY_SIZE,
   elf_isac_plt0_entry, { 2, 12},
   elf_isac_plt_entry, { 2, 20 }, 12
@@ -606,7 +610,8 @@ static const bfd_byte elf_cpu32_plt_entr
   0, 0
 };
 
-static const struct elf_m68k_plt_info elf_cpu32_plt_info = {
+static const struct elf_m68k_plt_info elf_cpu32_plt_info =
+{
   CPU32_PLT_ENTRY_SIZE,
   elf_cpu32_plt0_entry, { 4, 12 },
   elf_cpu32_plt_entry, { 4, 18 }, 10
@@ -1117,8 +1122,9 @@ elf32_m68k_set_private_flags (bfd *abfd,
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
 static bfd_boolean
-elf32_m68k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   flagword out_isa;
@@ -1670,17 +1676,19 @@ elf_m68k_add_entry_to_got (struct elf_m6
     /* This BFD has too many relocation.  */
     {
       if (got->n_slots[R_8] > ELF_M68K_R_8_MAX_N_SLOTS_IN_GOT (info))
-	(*_bfd_error_handler) (_("%B: GOT overflow: "
-				 "Number of relocations with 8-bit "
-				 "offset > %d"),
-			       abfd,
-			       ELF_M68K_R_8_MAX_N_SLOTS_IN_GOT (info));
+	/* xgettext:c-format */
+	_bfd_error_handler (_("%B: GOT overflow: "
+			      "Number of relocations with 8-bit "
+			      "offset > %d"),
+			    abfd,
+			    ELF_M68K_R_8_MAX_N_SLOTS_IN_GOT (info));
       else
-	(*_bfd_error_handler) (_("%B: GOT overflow: "
-				 "Number of relocations with 8- or 16-bit "
-				 "offset > %d"),
-			       abfd,
-			       ELF_M68K_R_8_16_MAX_N_SLOTS_IN_GOT (info));
+	/* xgettext:c-format */
+	_bfd_error_handler (_("%B: GOT overflow: "
+			      "Number of relocations with 8- or 16-bit "
+			      "offset > %d"),
+			    abfd,
+			    ELF_M68K_R_8_16_MAX_N_SLOTS_IN_GOT (info));
 
       return NULL;
     }
@@ -2232,7 +2240,7 @@ elf_m68k_partition_multi_got_2 (struct e
 
   arg->n_slots += arg->current_got->n_slots[R_32];
 
-  if (!arg->info->shared)
+  if (!bfd_link_pic (arg->info))
     /* If we are generating a shared object, we need to
        output a R_68K_RELATIVE reloc so that the dynamic
        linker can adjust this GOT entry.  Overwise we
@@ -2426,7 +2434,7 @@ elf_m68k_partition_multi_got (struct bfd
     {
       asection *s;
 
-      s = bfd_get_linker_section (elf_hash_table (info)->dynobj, ".got");
+      s = elf_hash_table (info)->sgot;
       if (s != NULL)
 	s->size = arg_.offset;
       else
@@ -2435,7 +2443,7 @@ elf_m68k_partition_multi_got (struct bfd
       BFD_ASSERT (arg_.slots_relas_diff <= arg_.n_slots);
       arg_.n_slots -= arg_.slots_relas_diff;
 
-      s = bfd_get_linker_section (elf_hash_table (info)->dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
 	s->size = arg_.n_slots * sizeof (Elf32_External_Rela);
       else
@@ -2549,20 +2557,16 @@ elf_m68k_check_relocs (bfd *abfd,
   struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
-  asection *sgot;
-  asection *srelgot;
   asection *sreloc;
   struct elf_m68k_got *got;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
 
-  sgot = NULL;
-  srelgot = NULL;
   sreloc = NULL;
 
   got = NULL;
@@ -2620,7 +2624,7 @@ elf_m68k_check_relocs (bfd *abfd,
 	case R_68K_TLS_DTPREL32:
 
 	  if (ELF32_R_TYPE (rel->r_info) == R_68K_TLS_TPREL32
-	      && info->shared)
+	      && bfd_link_pic (info))
 	    /* Do the special chorus for libraries with static TLS.  */
 	    info->flags |= DF_STATIC_TLS;
 
@@ -2634,30 +2638,6 @@ elf_m68k_check_relocs (bfd *abfd,
 		return FALSE;
 	    }
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
-
-	  if (srelgot == NULL
-	      && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || !bfd_set_section_alignment (dynobj, srelgot, 2))
-		    return FALSE;
-		}
-	    }
-
 	  if (got == NULL)
 	    {
 	      struct elf_m68k_bfd2got_entry *bfd2got_entry;
@@ -2755,10 +2735,10 @@ elf_m68k_check_relocs (bfd *abfd,
 	     will be set later (it is never cleared).  We account for that
 	     possibility below by storing information in the
 	     pcrel_relocs_copied field of the hash table entry.  */
-	  if (!(info->shared
+	  if (!(bfd_link_pic (info)
 		&& (sec->flags & SEC_ALLOC) != 0
 		&& h != NULL
-		&& (!info->symbolic
+		&& (!SYMBOLIC_BIND (info, h)
 		    || h->root.type == bfd_link_hash_defweak
 		    || !h->def_regular)))
 	    {
@@ -2786,14 +2766,14 @@ elf_m68k_check_relocs (bfd *abfd,
 		 turns out to be a function defined by a dynamic object.  */
 	      h->plt.refcount++;
 
-	      if (info->executable)
+	      if (bfd_link_executable (info))
 		/* This symbol needs a non-GOT reference.  */
 		h->non_got_ref = 1;
 	    }
 
 	  /* If we are creating a shared library, we need to copy the
 	     reloc into the shared library.  */
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* When creating a shared object, we must copy these
 		 reloc types into the output file.  We create a reloc
@@ -2938,7 +2918,7 @@ elf_m68k_gc_sweep_hook (bfd *abfd,
   bfd *dynobj;
   struct elf_m68k_got *got;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -3097,7 +3077,7 @@ elf_m68k_adjust_dynamic_symbol (struct b
   asection *s;
 
   htab = elf_m68k_hash_table (info);
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
 
   /* Make sure we know what is going on here.  */
   BFD_ASSERT (dynobj != NULL
@@ -3140,7 +3120,7 @@ elf_m68k_adjust_dynamic_symbol (struct b
 	    return FALSE;
 	}
 
-      s = bfd_get_linker_section (dynobj, ".plt");
+      s = htab->root.splt;
       BFD_ASSERT (s != NULL);
 
       /* If this is the first .plt entry, make room for the special
@@ -3153,7 +3133,7 @@ elf_m68k_adjust_dynamic_symbol (struct b
 	 location in the .plt.  This is required to make function
 	 pointers compare as equal between the normal executable and
 	 the shared library.  */
-      if (!info->shared
+      if (!bfd_link_pic (info)
 	  && !h->def_regular)
 	{
 	  h->root.u.def.section = s;
@@ -3167,12 +3147,12 @@ elf_m68k_adjust_dynamic_symbol (struct b
 
       /* We also need to make an entry in the .got.plt section, which
 	 will be placed in the .got section by the linker script.  */
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = htab->root.sgotplt;
       BFD_ASSERT (s != NULL);
       s->size += 4;
 
       /* We also need to make an entry in the .rela.plt section.  */
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = htab->root.srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
 
@@ -3202,7 +3182,7 @@ elf_m68k_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -3257,7 +3237,7 @@ elf_m68k_size_dynamic_sections (bfd *out
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -3272,7 +3252,7 @@ elf_m68k_size_dynamic_sections (bfd *out
 	 not actually use these entries.  Reset the size of .rela.got,
 	 which will cause it to get stripped from the output file
 	 below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
 	s->size = 0;
     }
@@ -3283,7 +3263,7 @@ elf_m68k_size_dynamic_sections (bfd *out
      against symbols that have become local due to visibility changes.
      We allocated space for them in the check_relocs routine, but we
      will not fill them in in the relocate_section routine.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     elf_link_hash_traverse (elf_hash_table (info),
 			    elf_m68k_discard_copies,
 			    info);
@@ -3366,7 +3346,7 @@ elf_m68k_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3609,7 +3589,6 @@ elf_m68k_relocate_section (bfd *output_b
 			   Elf_Internal_Sym *local_syms,
 			   asection **local_sections)
 {
-  bfd *dynobj;
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   asection *sgot;
@@ -3620,7 +3599,6 @@ elf_m68k_relocate_section (bfd *output_b
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
-  dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
 
@@ -3680,7 +3658,7 @@ elf_m68k_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -3698,21 +3676,16 @@ elf_m68k_relocate_section (bfd *output_b
 		  bfd_vma sgot_output_offset;
 		  bfd_vma got_offset;
 
-		  if (sgot == NULL)
-		    {
-		      sgot = bfd_get_linker_section (dynobj, ".got");
+		  sgot = elf_hash_table (info)->sgot;
 
-		      if (sgot != NULL)
-			sgot_output_offset = sgot->output_offset;
-		      else
-			/* In this case we have a reference to
-			   _GLOBAL_OFFSET_TABLE_, but the GOT itself is
-			   empty.
-			   ??? Issue a warning?  */
-			sgot_output_offset = 0;
-		    }
-		  else
+		  if (sgot != NULL)
 		    sgot_output_offset = sgot->output_offset;
+		  else
+		    /* In this case we have a reference to
+		       _GLOBAL_OFFSET_TABLE_, but the GOT itself is
+		       empty.
+		       ??? Issue a warning?  */
+		    sgot_output_offset = 0;
 
 		  if (got == NULL)
 		    {
@@ -3773,11 +3746,8 @@ elf_m68k_relocate_section (bfd *output_b
 	    bfd_vma *off_ptr;
 	    bfd_vma off;
 
-	    if (sgot == NULL)
-	      {
-		sgot = bfd_get_linker_section (dynobj, ".got");
-		BFD_ASSERT (sgot != NULL);
-	      }
+	    sgot = elf_hash_table (info)->sgot;
+	    BFD_ASSERT (sgot != NULL);
 
 	    if (got == NULL)
 	      {
@@ -3810,8 +3780,10 @@ elf_m68k_relocate_section (bfd *output_b
 		    bfd_boolean dyn;
 
 		    dyn = elf_hash_table (info)->dynamic_sections_created;
-		    if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-			|| (info->shared
+		    if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							  bfd_link_pic (info),
+							  h)
+			|| (bfd_link_pic (info)
 			    && SYMBOL_REFERENCES_LOCAL (info, h))
 			|| (ELF_ST_VISIBILITY (h->other)
 			    && h->root.type == bfd_link_hash_undefweak))
@@ -3841,14 +3813,11 @@ elf_m68k_relocate_section (bfd *output_b
 		    else
 		      unresolved_reloc = FALSE;
 		  }
-		else if (info->shared) /* && h == NULL */
+		else if (bfd_link_pic (info)) /* && h == NULL */
 		  /* Process local symbol during dynamic link.  */
 		  {
-		    if (srela == NULL)
-		      {
-			srela = bfd_get_linker_section (dynobj, ".rela.got");
-			BFD_ASSERT (srela != NULL);
-		      }
+		    srela = elf_hash_table (info)->srelgot;
+		    BFD_ASSERT (srela != NULL);
 
 		    elf_m68k_init_got_entry_local_shared (info,
 							  output_bfd,
@@ -3860,7 +3829,7 @@ elf_m68k_relocate_section (bfd *output_b
 
 		    *off_ptr |= 1;
 		  }
-		else /* h == NULL && !info->shared */
+		else /* h == NULL && !bfd_link_pic (info) */
 		  {
 		    elf_m68k_init_got_entry_static (info,
 						    output_bfd,
@@ -3914,9 +3883,10 @@ elf_m68k_relocate_section (bfd *output_b
 	case R_68K_TLS_LE32:
 	case R_68K_TLS_LE16:
 	case R_68K_TLS_LE8:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted "
 		   "in shared object"),
 		 input_bfd, input_section, (long) rel->r_offset, howto->name);
@@ -3948,11 +3918,8 @@ elf_m68k_relocate_section (bfd *output_b
 	      break;
 	    }
 
-	  if (splt == NULL)
-	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      BFD_ASSERT (splt != NULL);
-	    }
+	  splt = elf_hash_table (info)->splt;
+	  BFD_ASSERT (splt != NULL);
 
 	  relocation = (splt->output_section->vma
 			+ splt->output_offset
@@ -3967,11 +3934,8 @@ elf_m68k_relocate_section (bfd *output_b
 	     the procedure linkage table.  */
 	  BFD_ASSERT (h != NULL && h->plt.offset != (bfd_vma) -1);
 
-	  if (splt == NULL)
-	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      BFD_ASSERT (splt != NULL);
-	    }
+	  splt = elf_hash_table (info)->splt;
+	  BFD_ASSERT (splt != NULL);
 
 	  relocation = h->plt.offset;
 	  unresolved_reloc = FALSE;
@@ -3987,7 +3951,7 @@ elf_m68k_relocate_section (bfd *output_b
 	case R_68K_PC8:
 	case R_68K_PC16:
 	case R_68K_PC32:
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && r_symndx != STN_UNDEF
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && (h == NULL
@@ -4026,8 +3990,8 @@ elf_m68k_relocate_section (bfd *output_b
 		       && (r_type == R_68K_PC8
 			   || r_type == R_68K_PC16
 			   || r_type == R_68K_PC32
-			   || !info->shared
-			   || !info->symbolic
+			   || !bfd_link_pic (info)
+			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
 		  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@@ -4115,7 +4079,8 @@ elf_m68k_relocate_section (bfd *output_b
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section,
@@ -4149,9 +4114,11 @@ elf_m68k_relocate_section (bfd *output_b
 		    name = bfd_section_name (input_bfd, sec);
 		}
 
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		((sym_type == STT_TLS
+		  /* xgettext:c-format */
 		  ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+		  /* xgettext:c-format */
 		  : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
 		 input_bfd,
 		 input_section,
@@ -4183,16 +4150,13 @@ elf_m68k_relocate_section (bfd *output_b
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-	      if (!(info->callbacks->reloc_overflow
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
@@ -4249,9 +4213,9 @@ elf_m68k_finish_dynamic_symbol (bfd *out
       BFD_ASSERT (h->dynindx != -1);
 
       plt_info = elf_m68k_hash_table (info)->plt_info;
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      sgot = bfd_get_linker_section (dynobj, ".got.plt");
-      srela = bfd_get_linker_section (dynobj, ".rela.plt");
+      splt = elf_hash_table (info)->splt;
+      sgot = elf_hash_table (info)->sgotplt;
+      srela = elf_hash_table (info)->srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -4316,8 +4280,8 @@ elf_m68k_finish_dynamic_symbol (bfd *out
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srela = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srela = elf_hash_table (info)->srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       got_entry = elf_m68k_hash_entry (h)->glist;
@@ -4335,7 +4299,7 @@ elf_m68k_finish_dynamic_symbol (bfd *out
 	     the symbol was forced to be local because of a version file.
 	     The entry in the global offset table already have been
 	     initialized in the relocate_section function.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && SYMBOL_REFERENCES_LOCAL (info, h))
 	    {
 	      bfd_vma relocation;
@@ -4466,7 +4430,7 @@ elf_m68k_finish_dynamic_sections (bfd *o
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = elf_hash_table (info)->sgotplt;
   BFD_ASSERT (sgot != NULL);
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
@@ -4475,7 +4439,7 @@ elf_m68k_finish_dynamic_sections (bfd *o
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
@@ -4483,7 +4447,6 @@ elf_m68k_finish_dynamic_sections (bfd *o
       for (; dyncon < dynconend; dyncon++)
 	{
 	  Elf_Internal_Dyn dyn;
-	  const char *name;
 	  asection *s;
 
 	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
@@ -4494,37 +4457,20 @@ elf_m68k_finish_dynamic_sections (bfd *o
 	      break;
 
 	    case DT_PLTGOT:
-	      name = ".got";
+	      s = elf_hash_table (info)->sgotplt;
 	      goto get_vma;
 	    case DT_JMPREL:
-	      name = ".rela.plt";
+	      s = elf_hash_table (info)->srelplt;
 	    get_vma:
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      BFD_ASSERT (s != NULL);
+	      s = elf_hash_table (info)->srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
@@ -4577,12 +4523,9 @@ elf_m68k_finish_dynamic_sections (bfd *o
    objects, and before the final_link entry point is called.  */
 
 bfd_boolean
-bfd_m68k_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *datasec;
-     asection *relsec;
-     char **errmsg;
+bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info,
+				       asection *datasec, asection *relsec,
+				       char **errmsg)
 {
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Sym *isymbuf = NULL;
@@ -4591,7 +4534,7 @@ bfd_m68k_elf32_create_embedded_relocs (a
   bfd_byte *p;
   bfd_size_type amt;
 
-  BFD_ASSERT (! info->relocatable);
+  BFD_ASSERT (! bfd_link_relocatable (info));
 
   *errmsg = NULL;
 
@@ -4842,11 +4785,10 @@ elf_m68k_add_symbol_hook (bfd *abfd,
 			  asection **secp ATTRIBUTE_UNUSED,
 			  bfd_vma *valp ATTRIBUTE_UNUSED)
 {
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   return TRUE;
 }
@@ -4898,5 +4840,6 @@ elf_m68k_add_symbol_hook (bfd *abfd,
 #define elf_backend_want_plt_sym 0
 #define elf_backend_got_header_size	12
 #define elf_backend_rela_normal		1
+#define elf_backend_dtrel_excludes_plt	1
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m88k.c ./bfd/elf32-m88k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-m88k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-m88k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola 88k-specific support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mcore.c ./bfd/elf32-mcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mcore.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-mcore.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola MCore specific support for 32-bit ELF
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -49,13 +49,14 @@ mcore_elf_set_private_flags (bfd * abfd,
    object file when linking.  */
 
 static bfd_boolean
-mcore_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
 
   /* Check if we have the same endianness.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -95,6 +96,7 @@ mcore_elf_unsupported_reloc (bfd * abfd,
 {
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
 
+  /* xgettext:c-format */
   _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
 		      abfd,
 		      reloc_entry->howto->name,
@@ -349,8 +351,9 @@ mcore_elf_info_to_howto (bfd * abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_MCORE_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised MCore reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised MCore reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_MCORE_NONE;
     }
@@ -409,7 +412,7 @@ mcore_elf_relocate_section (bfd * output
      input_bfd,
      input_section,
      (long) input_section->reloc_count,
-     (info->relocatable) ? " (relocatable)" : "");
+     (bfd_link_relocatable (info)) ? " (relocatable)" : "");
 #endif
 
   if (! mcore_elf_howto_table [R_MCORE_PCRELIMM8BY4])	/* Initialize howto table if needed */
@@ -433,6 +436,7 @@ mcore_elf_relocate_section (bfd * output
       if ((unsigned) r_type >= (unsigned) R_MCORE_max
 	  || ! mcore_elf_howto_table [(int)r_type])
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: Unknown relocation type %d\n"),
 			      input_bfd, (int) r_type);
 
@@ -447,6 +451,7 @@ mcore_elf_relocate_section (bfd * output
       /* Complain about known relocation that are not yet supported.  */
       if (howto->special_function == mcore_elf_unsupported_reloc)
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
 			      input_bfd,
 			      howto->name,
@@ -478,7 +483,7 @@ mcore_elf_relocate_section (bfd * output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -598,7 +603,7 @@ mcore_elf_check_relocs (bfd * abfd,
   const Elf_Internal_Rela * rel;
   const Elf_Internal_Rela * rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mep.c ./bfd/elf32-mep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mep.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-mep.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MeP-specific support for 32-bit ELF.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -136,14 +136,15 @@ mep_reloc_type_lookup
 
     default:
       /* Pacify gcc -Wall.  */
-      (*_bfd_error_handler) (_("mep: no reloc for code %d"), code);
+      _bfd_error_handler (_("mep: no reloc for code %d"), code);
       return NULL;
     }
 
   if (mep_elf_howto_table[type].type != type)
     {
-      (*_bfd_error_handler) (_("MeP: howto %d has type %d"),
-			     type, mep_elf_howto_table[type].type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("MeP: howto %d has type %d"),
+			  type, mep_elf_howto_table[type].type);
       abort ();
     }
 
@@ -385,6 +386,7 @@ mep_info_to_howto_rela
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_MEP_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid MEP reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -491,7 +493,7 @@ mep_elf_relocate_section
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (r_type == R_RELC)
@@ -508,13 +510,13 @@ mep_elf_relocate_section
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		 input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -536,11 +538,8 @@ mep_elf_relocate_section
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -571,14 +570,15 @@ mep_elf_set_private_flags (bfd *    abfd
    object file when linking.  */
 
 static bfd_boolean
-mep_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   static bfd *last_ibfd = 0;
   flagword old_flags, new_flags;
   flagword old_partial, new_partial;
 
   /* Check if we have the same endianness.  */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   new_flags = elf_elfheader (ibfd)->e_flags;
@@ -616,6 +616,7 @@ mep_elf_merge_private_bfd_data (bfd * ib
 	old_flags = (old_flags & ~EF_MEP_CPU_MASK) | new_partial;
       else
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B and %B are for different cores"), last_ibfd, ibfd);
 	  bfd_set_error (bfd_error_invalid_target);
 	  return FALSE;
@@ -633,6 +634,7 @@ mep_elf_merge_private_bfd_data (bfd * ib
 	old_flags = (old_flags & ~EF_MEP_INDEX_MASK) | new_partial;
       else
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B and %B are for different configurations"), last_ibfd, ibfd);
 	  bfd_set_error (bfd_error_invalid_target);
 	  return FALSE;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-metag.c ./bfd/elf32-metag.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-metag.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-metag.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Meta support for 32-bit ELF
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Imagination Technologies Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -838,19 +838,10 @@ struct elf_metag_link_hash_table
 
   /* Assorted information used by elf_metag_size_stubs.  */
   unsigned int bfd_count;
-  int top_index;
+  unsigned int top_index;
   asection **input_list;
   Elf_Internal_Sym **all_local_syms;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Small local sym cache.  */
   struct sym_cache sym_cache;
 
@@ -898,6 +889,7 @@ metag_info_to_howto_rela (bfd *abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_METAG_MAX)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid METAG reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1202,9 +1194,9 @@ metag_add_stub (const char *stub_name,
 				TRUE, FALSE);
   if (hsh == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-			     section->owner,
-			     stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+			  section->owner, stub_name);
       return NULL;
     }
 
@@ -1418,7 +1410,7 @@ metag_final_link_relocate (reloc_howto_t
     _bfd_clear_contents (howto, input_bfd, input_section,		\
 			 contents + rel->r_offset);			\
 									\
-    if (info->relocatable						\
+    if (bfd_link_relocatable (info)					\
 	&& (input_section->flags & SEC_DEBUGGING))			\
       {									\
 	/* Only remove relocations in debug sections since other	\
@@ -1559,7 +1551,7 @@ elf_metag_relocate_section (bfd *output_
 	  METAG_RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 						 rel, relend, howto, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -1569,12 +1561,12 @@ elf_metag_relocate_section (bfd *output_
 	  if ((input_section->flags & SEC_ALLOC) == 0)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && r_symndx != STN_UNDEF
 	       && (input_section->flags & SEC_ALLOC) != 0
 	       && (r_type != R_METAG_RELBRANCH
 		   || !SYMBOL_CALLS_LOCAL (info, &hh->eh)))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && hh != NULL
 		  && hh->eh.dynindx != -1
 		  && !hh->eh.non_got_ref
@@ -1663,8 +1655,7 @@ elf_metag_relocate_section (bfd *output_
 	  if (hh->eh.forced_local)
 	    break;
 
-	  if (hh->eh.plt.offset == (bfd_vma) -1 ||
-	      htab->splt == NULL)
+	  if (hh->eh.plt.offset == (bfd_vma) -1 || htab->etab.splt == NULL)
 	    {
 	      /* We didn't make a PLT entry for this symbol.  This
 		 happens when statically linking PIC code, or when
@@ -1672,16 +1663,16 @@ elf_metag_relocate_section (bfd *output_
 	      break;
 	    }
 
-	  relocation = (htab->splt->output_section->vma
-			+ htab->splt->output_offset
+	  relocation = (htab->etab.splt->output_section->vma
+			+ htab->etab.splt->output_offset
 			+ hh->eh.plt.offset);
 	  break;
 	case R_METAG_HI16_GOTPC:
 	case R_METAG_LO16_GOTPC:
-	  BFD_ASSERT (htab->sgot != NULL);
+	  BFD_ASSERT (htab->etab.sgot != NULL);
 
-	  relocation = (htab->sgot->output_section->vma +
-			htab->sgot->output_offset);
+	  relocation = (htab->etab.sgot->output_section->vma +
+			htab->etab.sgot->output_offset);
 	  relocation += GOT_REG_OFFSET;
 	  relocation -= (input_section->output_section->vma
 			 + input_section->output_offset
@@ -1690,10 +1681,10 @@ elf_metag_relocate_section (bfd *output_
 	case R_METAG_HI16_GOTOFF:
 	case R_METAG_LO16_GOTOFF:
 	case R_METAG_GETSET_GOTOFF:
-	  BFD_ASSERT (htab->sgot != NULL);
+	  BFD_ASSERT (htab->etab.sgot != NULL);
 
-	  relocation -= (htab->sgot->output_section->vma +
-			 htab->sgot->output_offset);
+	  relocation -= (htab->etab.sgot->output_section->vma +
+			 htab->etab.sgot->output_offset);
 	  relocation -= GOT_REG_OFFSET;
 	  break;
 	case R_METAG_GETSET_GOT:
@@ -1709,7 +1700,8 @@ elf_metag_relocate_section (bfd *output_
 
 		off = hh->eh.got.offset;
 		dyn = htab->etab.dynamic_sections_created;
-		if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+		if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						       bfd_link_pic (info),
 						       &hh->eh))
 		  {
 		    /* If we aren't going to call finish_dynamic_symbol,
@@ -1749,18 +1741,18 @@ elf_metag_relocate_section (bfd *output_
 
 	    if (do_got)
 	      {
-		if (info->shared)
+		if (bfd_link_pic (info))
 		  {
 		    /* Output a dynamic relocation for this GOT entry.
 		       In this case it is relative to the base of the
 		       object because the symbol index is zero.  */
 		    Elf_Internal_Rela outrel;
 		    bfd_byte *loc;
-		    asection *s = htab->srelgot;
+		    asection *s = htab->etab.srelgot;
 
 		    outrel.r_offset = (off
-				       + htab->sgot->output_offset
-				       + htab->sgot->output_section->vma);
+				       + htab->etab.sgot->output_offset
+				       + htab->etab.sgot->output_section->vma);
 		    outrel.r_info = ELF32_R_INFO (0, R_METAG_RELATIVE);
 		    outrel.r_addend = relocation;
 		    loc = s->contents;
@@ -1769,7 +1761,7 @@ elf_metag_relocate_section (bfd *output_
 		  }
 		else
 		  bfd_put_32 (output_bfd, relocation,
-			      htab->sgot->contents + off);
+			      htab->etab.sgot->contents + off);
 	      }
 
 	    if (off >= (bfd_vma) -2)
@@ -1787,7 +1779,7 @@ elf_metag_relocate_section (bfd *output_
 	    int indx;
 	    char tls_type;
 
-	    if (htab->sgot == NULL)
+	    if (htab->etab.sgot == NULL)
 	      abort();
 
 	    indx = 0;
@@ -1796,8 +1788,10 @@ elf_metag_relocate_section (bfd *output_
 		bfd_boolean dyn;
 		dyn = htab->etab.dynamic_sections_created;
 
-		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, &hh->eh)
-		    && (!info->shared
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     &hh->eh)
+		    && (!bfd_link_pic (info)
 			|| !SYMBOL_REFERENCES_LOCAL (info, &hh->eh)))
 		  {
 		    indx = hh->eh.dynindx;
@@ -1816,7 +1810,7 @@ elf_metag_relocate_section (bfd *output_
 	      }
 
 	    if (tls_type == GOT_UNKNOWN)
-	      abort();
+	      abort ();
 
 	    if ((off & 1) != 0)
 	      off &= ~1;
@@ -1831,15 +1825,15 @@ elf_metag_relocate_section (bfd *output_
 		   now, and emit any relocations.  If both an IE GOT and a
 		   GD GOT are necessary, we emit the GD first.  */
 
-		if ((info->shared || indx != 0)
+		if ((bfd_link_pic (info) || indx != 0)
 		    && (hh == NULL
 			|| ELF_ST_VISIBILITY (hh->eh.other) == STV_DEFAULT
 			|| hh->eh.root.type != bfd_link_hash_undefweak))
 		  {
 		    need_relocs = TRUE;
-		    loc = htab->srelgot->contents;
+		    loc = htab->etab.srelgot->contents;
 		    /* FIXME (CAO): Should this be reloc_count++ ? */
-		    loc += htab->srelgot->reloc_count * sizeof (Elf32_External_Rela);
+		    loc += htab->etab.srelgot->reloc_count * sizeof (Elf32_External_Rela);
 		  }
 
 		if (tls_type & GOT_TLS_GD)
@@ -1847,36 +1841,43 @@ elf_metag_relocate_section (bfd *output_
 		    if (need_relocs)
 		      {
 			outrel.r_offset = (cur_off
-					   + htab->sgot->output_section->vma
-					   + htab->sgot->output_offset);
+					   + htab->etab.sgot->output_section->vma
+					   + htab->etab.sgot->output_offset);
 			outrel.r_info = ELF32_R_INFO (indx, R_METAG_TLS_DTPMOD);
 			outrel.r_addend = 0;
-			bfd_put_32 (output_bfd, 0, htab->sgot->contents + cur_off);
+			bfd_put_32 (output_bfd, 0, htab->etab.sgot->contents + cur_off);
 
 			bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
-			htab->srelgot->reloc_count++;
+			htab->etab.srelgot->reloc_count++;
 			loc += sizeof (Elf32_External_Rela);
 
 			if (indx == 0)
 			  bfd_put_32 (output_bfd, 0,
-				      htab->sgot->contents + cur_off + 4);
+				      htab->etab.sgot->contents + cur_off + 4);
 			else
 			  {
 			    bfd_put_32 (output_bfd, 0,
-					htab->sgot->contents + cur_off + 4);
+					htab->etab.sgot->contents + cur_off + 4);
 			    outrel.r_info = ELF32_R_INFO (indx,
 						      R_METAG_TLS_DTPOFF);
 			    outrel.r_offset += 4;
 			    bfd_elf32_swap_reloca_out (output_bfd,
 						       &outrel, loc);
-			    htab->srelgot->reloc_count++;
+			    htab->etab.srelgot->reloc_count++;
 			    loc += sizeof (Elf32_External_Rela);
 			  }
 		      }
 		    else
 		      {
 			/* We don't support changing the TLS model.  */
-			abort ();
+			/* PR 20675 */
+			if (bfd_link_pic (info))
+			  _bfd_error_handler (_("%B(%A): multiple TLS models are not supported"),
+					      input_bfd, input_section, name);
+			else
+			  _bfd_error_handler (_("%B(%A): shared library symbol %s encountered whilst performing a static link"),
+					      input_bfd, input_section, name);
+			return FALSE;
 		      }
 
 		    cur_off += 8;
@@ -1887,8 +1888,8 @@ elf_metag_relocate_section (bfd *output_
 		    if (need_relocs)
 		      {
 			outrel.r_offset = (cur_off
-					   + htab->sgot->output_section->vma
-					   + htab->sgot->output_offset);
+					   + htab->etab.sgot->output_section->vma
+					   + htab->etab.sgot->output_offset);
 			outrel.r_info = ELF32_R_INFO (indx, R_METAG_TLS_TPOFF);
 
 			if (indx == 0)
@@ -1897,12 +1898,12 @@ elf_metag_relocate_section (bfd *output_
 			  outrel.r_addend = 0;
 
 			bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
-			htab->srelgot->reloc_count++;
+			htab->etab.srelgot->reloc_count++;
 			loc += sizeof (Elf32_External_Rela);
 		      }
 		    else
 		      bfd_put_32 (output_bfd, tpoff (info, relocation),
-				  htab->sgot->contents + cur_off);
+				  htab->etab.sgot->contents + cur_off);
 
 		    cur_off += 4;
 		  }
@@ -1923,9 +1924,10 @@ elf_metag_relocate_section (bfd *output_
 	case R_METAG_TLS_IENONPIC_LO16:
 	case R_METAG_TLS_LE_HI16:
 	case R_METAG_TLS_LE_LO16:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, howto->name);
@@ -1936,7 +1938,7 @@ elf_metag_relocate_section (bfd *output_
 	  break;
 	case R_METAG_TLS_LDO_HI16:
 	case R_METAG_TLS_LDO_LO16:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    relocation = tpoff (info, relocation);
 	  else
 	    relocation -= dtpoff_base (info);
@@ -1945,7 +1947,7 @@ elf_metag_relocate_section (bfd *output_
 	  {
 	    bfd_vma off;
 
-	    if (htab->sgot == NULL)
+	    if (htab->etab.sgot == NULL)
 	      abort();
 	    off = htab->tls_ldm_got.offset;
 	    if (off & 1)
@@ -1956,13 +1958,13 @@ elf_metag_relocate_section (bfd *output_
 		bfd_byte *loc;
 
 		outrel.r_offset = (off
-				   + htab->sgot->output_section->vma
-				   + htab->sgot->output_offset);
+				   + htab->etab.sgot->output_section->vma
+				   + htab->etab.sgot->output_offset);
 
 		outrel.r_addend = 0;
 		outrel.r_info = ELF32_R_INFO (0, R_METAG_TLS_DTPMOD);
-		loc = htab->srelgot->contents;
-		loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
+		loc = htab->etab.srelgot->contents;
+		loc += htab->etab.srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
 		bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
 		htab->tls_ldm_got.offset |= 1;
 	      }
@@ -1985,15 +1987,14 @@ elf_metag_relocate_section (bfd *output_
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (hh ? &hh->eh.root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -2014,11 +2015,8 @@ elf_metag_relocate_section (bfd *output_
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -2038,32 +2036,22 @@ elf_metag_create_dynamic_sections (bfd *
 
   /* Don't try to create the .plt and .got twice.  */
   htab = metag_link_hash_table (info);
-  if (htab->splt != NULL)
+  if (htab->etab.splt != NULL)
     return TRUE;
 
   /* Call the generic code to do most of the work.  */
   if (! _bfd_elf_create_dynamic_sections (abfd, info))
     return FALSE;
 
-  htab->sgot = bfd_get_linker_section (abfd, ".got");
-  if (! htab->sgot)
-    return FALSE;
+  /* The header goes at the start of the dynamic .got section, which
+     is placed after the dynamic .got.plt section.  ie. The header is
+     not necessarily at the start of the output .got section.  */
+  htab->etab.sgot->size += 12;
 
-  htab->sgotplt = bfd_make_section_with_flags (abfd, ".got.plt",
-					       (SEC_ALLOC | SEC_LOAD |
-						SEC_HAS_CONTENTS |
-						SEC_IN_MEMORY |
-						SEC_LINKER_CREATED));
-  if (htab->sgotplt == NULL
-      || !bfd_set_section_alignment (abfd, htab->sgotplt, 2))
-    return FALSE;
-
-  /* Define the symbol __GLOBAL_OFFSET_TABLE__ at the start of the .got
-     section.  We don't do this in the linker script because we don't want
-     to define the symbol if we are not creating a global offset table.  */
+  /* Define the symbol __GLOBAL_OFFSET_TABLE__ on the header.  */
   bh = NULL;
   if (!(_bfd_generic_link_add_one_symbol
-	(info, abfd, "__GLOBAL_OFFSET_TABLE__", BSF_GLOBAL, htab->sgot,
+	(info, abfd, "__GLOBAL_OFFSET_TABLE__", BSF_GLOBAL, htab->etab.sgot,
 	 (bfd_vma) 0, NULL, FALSE, bed->collect, &bh)))
     return FALSE;
   eh = (struct elf_link_hash_entry *) bh;
@@ -2071,19 +2059,11 @@ elf_metag_create_dynamic_sections (bfd *
   eh->type = STT_OBJECT;
   eh->other = STV_HIDDEN;
 
-  if (! info->executable
+  if (! bfd_link_executable (info)
       && ! bfd_elf_link_record_dynamic_symbol (info, eh))
     return FALSE;
 
-  elf_hash_table (info)->hgot = eh;
-
-  htab->splt = bfd_get_linker_section (abfd, ".plt");
-  htab->srelplt = bfd_get_linker_section (abfd, ".rela.plt");
-
-  htab->srelgot = bfd_get_linker_section (abfd, ".rela.got");
-
-  htab->sdynbss = bfd_get_linker_section (abfd, ".dynbss");
-  htab->srelbss = bfd_get_linker_section (abfd, ".rela.bss");
+  htab->etab.hgot = eh;
 
   return TRUE;
 }
@@ -2108,7 +2088,7 @@ elf_metag_check_relocs (bfd *abfd,
   bfd *dynobj;
   int tls_type = GOT_UNKNOWN, old_tls_type = GOT_UNKNOWN;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = metag_link_hash_table (info);
@@ -2156,14 +2136,14 @@ elf_metag_check_relocs (bfd *abfd,
 	}
 
       /* Some relocs require a global offset table.  */
-      if (htab->sgot == NULL)
+      if (htab->etab.sgot == NULL)
 	{
 	  switch (r_type)
 	    {
 	    case R_METAG_TLS_GD:
 	    case R_METAG_TLS_LDM:
 	    case R_METAG_TLS_IE:
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		info->flags |= DF_STATIC_TLS;
 	      /* Fall through.  */
 
@@ -2277,7 +2257,7 @@ elf_metag_check_relocs (bfd *abfd,
 	     cannot be used in shared libs.  Don't error out for
 	     sections we don't care about, such as debug sections or
 	     non-constant sections.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      && (sec->flags & SEC_READONLY) != 0)
 	    {
@@ -2287,7 +2267,8 @@ elf_metag_check_relocs (bfd *abfd,
 		name = hh->eh.root.root.string;
 	      else
 		name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
 		 abfd, elf_metag_howto_table[r_type].name, name);
 	      bfd_set_error (bfd_error_bad_value);
@@ -2298,7 +2279,7 @@ elf_metag_check_relocs (bfd *abfd,
 	case R_METAG_ADDR32:
 	case R_METAG_RELBRANCH:
 	case R_METAG_GETSETOFF:
-	  if (hh != NULL && !info->shared)
+	  if (hh != NULL && !bfd_link_pic (info))
 	    {
 	      hh->eh.non_got_ref = 1;
 	      hh->eh.plt.refcount += 1;
@@ -2323,14 +2304,14 @@ elf_metag_check_relocs (bfd *abfd,
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (r_type != R_METAG_RELBRANCH
 		   || (hh != NULL
 		       && (! info->symbolic
 			   || hh->eh.root.type == bfd_link_hash_defweak
 			   || !hh->eh.def_regular))))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && hh != NULL
 		  && (hh->eh.root.type == bfd_link_hash_defweak
@@ -2489,7 +2470,7 @@ elf_metag_adjust_dynamic_symbol (struct 
   struct elf_metag_link_hash_table *htab;
   struct elf_metag_link_hash_entry *hh;
   struct elf_metag_dyn_reloc_entry *hdh_p;
-  asection *s;
+  asection *s, *srel;
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later,
@@ -2537,7 +2518,7 @@ elf_metag_adjust_dynamic_symbol (struct 
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2583,14 +2564,22 @@ elf_metag_adjust_dynamic_symbol (struct 
   /* We must generate a COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((eh->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->etab.sdynrelro;
+      srel = htab->etab.sreldynrelro;
+    }
+  else
+    {
+      s = htab->etab.sdynbss;
+      srel = htab->etab.srelbss;
+    }
   if ((eh->root.u.def.section->flags & SEC_ALLOC) != 0 && eh->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      srel->size += sizeof (Elf32_External_Rela);
       eh->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, eh, s);
 }
 
@@ -2626,9 +2615,9 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, eh))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), eh))
 	{
-	  asection *s = htab->splt;
+	  asection *s = htab->etab.splt;
 
 	  /* If this is the first .plt entry, make room for the special
 	     first entry.  */
@@ -2642,7 +2631,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !eh->def_regular)
 	    {
 	      eh->root.u.def.section = s;
@@ -2654,10 +2643,10 @@ allocate_dynrelocs (struct elf_link_hash
 
 	  /* We also need to make an entry in the .got.plt section, which
 	     will be placed in the .got section by the linker script.  */
-	  htab->sgotplt->size += 4;
+	  htab->etab.sgotplt->size += 4;
 
 	  /* We also need to make an entry in the .rel.plt section.  */
-	  htab->srelplt->size += sizeof (Elf32_External_Rela);
+	  htab->etab.srelplt->size += sizeof (Elf32_External_Rela);
 	}
       else
 	{
@@ -2686,7 +2675,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      s = htab->sgot;
+      s = htab->etab.sgot;
 
       eh->got.offset = s->size;
       s->size += 4;
@@ -2698,11 +2687,13 @@ allocate_dynrelocs (struct elf_link_hash
 	 R_METAG_TLS_GD needs one if local symbol and two if global.  */
       if ((tls_type == GOT_TLS_GD && eh->dynindx == -1)
 	  || (tls_type == GOT_TLS_IE && dyn))
-	htab->srelgot->size += sizeof (Elf32_External_Rela);
+	htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
       else if (tls_type == GOT_TLS_GD)
-	  htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
-      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, eh))
-	  htab->srelgot->size += sizeof (Elf32_External_Rela);
+	  htab->etab.srelgot->size += 2 * sizeof (Elf32_External_Rela);
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						bfd_link_pic (info),
+						eh))
+	  htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     eh->got.offset = (bfd_vma) -1;
@@ -2716,7 +2707,7 @@ allocate_dynrelocs (struct elf_link_hash
      defined in a regular object.  For the normal shared case, discard
      space for relocs that have become local due to symbol visibility
      changes.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, eh))
 	{
@@ -2843,7 +2834,7 @@ elf_metag_size_dynamic_sections (bfd *ou
   if (htab->etab.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -2902,8 +2893,8 @@ elf_metag_size_dynamic_sections (bfd *ou
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
       local_tls_type = metag_elf_local_got_tls_type (ibfd);
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->etab.sgot;
+      srel = htab->etab.srelgot;
       for (; local_got < end_local_got; ++local_got)
 	{
 	  if (*local_got > 0)
@@ -2913,7 +2904,7 @@ elf_metag_size_dynamic_sections (bfd *ou
 	      /* R_METAG_TLS_GD relocs need 2 consecutive GOT entries.  */
 	      if (*local_tls_type == GOT_TLS_GD)
 		s->size += 4;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		srel->size += sizeof (Elf32_External_Rela);
 	    }
 	  else
@@ -2926,9 +2917,9 @@ elf_metag_size_dynamic_sections (bfd *ou
     {
       /* Allocate 2 got entries and 1 dynamic reloc for R_METAG_TLS_LDM
 	 reloc.  */
-      htab->tls_ldm_got.offset = htab->sgot->size;
-      htab->sgot->size += 8;
-      htab->srelgot->size += sizeof (Elf32_External_Rela);
+      htab->tls_ldm_got.offset = htab->etab.sgot->size;
+      htab->etab.sgot->size += 8;
+      htab->etab.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     htab->tls_ldm_got.offset = -1;
@@ -2947,17 +2938,18 @@ elf_metag_size_dynamic_sections (bfd *ou
       if ((s->flags & SEC_LINKER_CREATED) == 0)
 	continue;
 
-      if (s == htab->splt
-	  || s == htab->sgot
-	  || s == htab->sgotplt
-	  || s == htab->sdynbss)
+      if (s == htab->etab.splt
+	  || s == htab->etab.sgot
+	  || s == htab->etab.sgotplt
+	  || s == htab->etab.sdynbss
+	  || s == htab->etab.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
 	}
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
 	{
-	  if (s->size != 0 && s != htab->srelplt)
+	  if (s->size != 0 && s != htab->etab.srelplt)
 	    relocs = TRUE;
 
 	  /* We use the reloc_count field as a counter if we need
@@ -3022,13 +3014,13 @@ elf_metag_size_dynamic_sections (bfd *ou
       if (!add_dynamic_entry (DT_PLTGOT, 0))
 	return FALSE;
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->srelplt->size != 0)
+      if (htab->etab.srelplt->size != 0)
 	{
 	  if (!add_dynamic_entry (DT_PLTRELSZ, 0)
 	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
@@ -3090,9 +3082,9 @@ elf_metag_finish_dynamic_symbol (bfd *ou
 
       BFD_ASSERT (eh->dynindx != -1);
 
-      splt = htab->splt;
-      sgot = htab->sgotplt;
-      srela = htab->srelplt;
+      splt = htab->etab.splt;
+      sgot = htab->etab.sgotplt;
+      srela = htab->etab.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -3114,7 +3106,7 @@ elf_metag_finish_dynamic_symbol (bfd *ou
       BFD_ASSERT (plt_index < (1 << 16));
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  bfd_put_32 (output_bfd,
 		      (plt_entry[0]
@@ -3170,7 +3162,7 @@ elf_metag_finish_dynamic_symbol (bfd *ou
 		      + got_offset);
       rel.r_info = ELF32_R_INFO (eh->dynindx, R_METAG_JMP_SLOT);
       rel.r_addend = 0;
-      loc = htab->srelplt->contents;
+      loc = htab->etab.srelplt->contents;
       loc += plt_index * sizeof(Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
 
@@ -3190,15 +3182,15 @@ elf_metag_finish_dynamic_symbol (bfd *ou
 	 up.  */
 
       rel.r_offset = ((eh->got.offset &~ (bfd_vma) 1)
-		      + htab->sgot->output_offset
-		      + htab->sgot->output_section->vma);
+		      + htab->etab.sgot->output_offset
+		      + htab->etab.sgot->output_section->vma);
 
       /* If this is a -Bsymbolic link and the symbol is defined
 	 locally or was forced to be local because of a version file,
 	 we just want to emit a RELATIVE reloc.  The entry in the
 	 global offset table will already have been initialized in the
 	 relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic || eh->dynindx == -1)
 	  && eh->def_regular)
 	{
@@ -3211,13 +3203,13 @@ elf_metag_finish_dynamic_symbol (bfd *ou
 	{
 	  if ((eh->got.offset & 1) != 0)
 	    abort ();
-	  bfd_put_32 (output_bfd, 0, htab->sgot->contents + eh->got.offset);
+	  bfd_put_32 (output_bfd, 0, htab->etab.sgot->contents + eh->got.offset);
 	  rel.r_info = ELF32_R_INFO (eh->dynindx, R_METAG_GLOB_DAT);
 	  rel.r_addend = 0;
 	}
 
-      loc = htab->srelgot->contents;
-      loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
+      loc = htab->etab.srelgot->contents;
+      loc += htab->etab.srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
     }
 
@@ -3232,13 +3224,15 @@ elf_metag_finish_dynamic_symbol (bfd *ou
 		 || eh->root.type == bfd_link_hash_defweak)))
 	abort ();
 
-      s = htab->srelbss;
-
       rel.r_offset = (eh->root.u.def.value
 		      + eh->root.u.def.section->output_offset
 		      + eh->root.u.def.section->output_section->vma);
       rel.r_addend = 0;
       rel.r_info = ELF32_R_INFO (eh->dynindx, R_METAG_COPY);
+      if (eh->root.u.def.section == htab->etab.sdynrelro)
+	s = htab->etab.sreldynrelro;
+      else
+	s = htab->etab.srelbss;
       loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
     }
@@ -3325,59 +3319,35 @@ elf_metag_finish_dynamic_sections (bfd *
 	      continue;
 
 	    case DT_PLTGOT:
-	      s = htab->sgot->output_section;
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma + htab->sgot->output_offset;
+	      s = htab->etab.sgot;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_JMPREL:
-	      s = htab->srelplt->output_section;
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      s = htab->etab.srelplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->srelplt;
+	      s = htab->etab.srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* Don't count procedure linkage table relocs in the
-		 overall reloc count.  */
-	      if (htab->srelplt) {
-		s = htab->srelplt;
-		dyn.d_un.d_val -= s->size;
-	      }
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
-
-	    case DT_RELA:
-	      /* We may not be using the standard ELF linker script.
-		 If .rela.plt is the first .rela section, we adjust
-		 DT_RELA to not include it.  */
-	      if (htab->srelplt) {
-		s = htab->srelplt;
-		if (dyn.d_un.d_ptr == s->output_section->vma + s->output_offset)
-		  dyn.d_un.d_ptr += s->size;
-	      }
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 
 	}
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->etab.splt;
       if (splt && splt->size > 0)
 	{
 	  unsigned long addr;
 	  /* addr = .got + 4 */
-	  addr = htab->sgot->output_section->vma +
-	    htab->sgot->output_offset + 4;
-	  if (info->shared)
+	  addr = (htab->etab.sgot->output_section->vma
+		  + htab->etab.sgot->output_offset + 4);
+	  if (bfd_link_pic (info))
 	    {
 	      addr -= splt->output_section->vma + splt->output_offset;
 	      bfd_put_32 (output_bfd,
@@ -3408,19 +3378,19 @@ elf_metag_finish_dynamic_sections (bfd *
 	}
     }
 
-  if (htab->sgot != NULL && htab->sgot->size != 0)
+  if (htab->etab.sgot != NULL && htab->etab.sgot->size != 0)
     {
       /* Fill in the first entry in the global offset table.
 	 We use it to point to our dynamic section, if we have one.  */
       bfd_put_32 (output_bfd,
 		  sdyn ? sdyn->output_section->vma + sdyn->output_offset : 0,
-		  htab->sgot->contents);
+		  htab->etab.sgot->contents);
 
       /* The second entry is reserved for use by the dynamic linker.  */
-      memset (htab->sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
+      memset (htab->etab.sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
 
       /* Set .got entry size.  */
-      elf_section_data (htab->sgot->output_section)
+      elf_section_data (htab->etab.sgot->output_section)
 	->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
     }
 
@@ -3463,7 +3433,7 @@ elf_metag_gc_sweep_hook (bfd *abfd ATTRI
   bfd_signed_vma *local_plt_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   elf_section_data (sec)->local_dynrel = NULL;
@@ -3546,7 +3516,7 @@ elf_metag_gc_sweep_hook (bfd *abfd ATTRI
 	      struct elf_metag_dyn_reloc_entry **hdh_pp;
 	      struct elf_metag_dyn_reloc_entry *hdh_p;
 
-	      if (!info->shared && eh->plt.refcount > 0)
+	      if (!bfd_link_pic (info) && eh->plt.refcount > 0)
 		eh->plt.refcount -= 1;
 
 	      hh = (struct elf_metag_link_hash_entry *) eh;
@@ -3604,7 +3574,7 @@ metag_type_of_stub (asection *input_sec,
 
   if (branch_offset + max_branch_offset >= 2*max_branch_offset)
     {
-      if (info->shared)
+      if (bfd_link_pic (info))
 	return metag_stub_long_branch_shared;
       else
 	return metag_stub_long_branch;
@@ -3724,7 +3694,7 @@ elf_metag_setup_section_lists (bfd *outp
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -4132,7 +4102,7 @@ elf_metag_size_stubs(bfd *output_bfd, bf
 			      && hh->eh.dynindx != -1
 			      && r_type == (unsigned int) R_METAG_RELBRANCH_PLT)
 			    {
-			      sym_sec = htab->splt;
+			      sym_sec = htab->etab.splt;
 			      sym_value = hh->eh.plt.offset;
 			    }
 
@@ -4145,7 +4115,7 @@ elf_metag_size_stubs(bfd *output_bfd, bf
 			}
 		      else if (hh->eh.root.type == bfd_link_hash_undefweak)
 			{
-			  if (! info->shared)
+			  if (! bfd_link_pic (info))
 			    continue;
 			}
 		      else if (hh->eh.root.type == bfd_link_hash_undefined)
@@ -4321,11 +4291,13 @@ elf_metag_plt_sym_val (bfd_vma i, const 
 
 #define elf_backend_can_gc_sections		1
 #define elf_backend_can_refcount		1
-#define elf_backend_got_header_size		12
-#define elf_backend_rela_normal		1
+#define elf_backend_rela_normal			1
+#define elf_backend_want_got_plt		1
 #define elf_backend_want_got_sym		0
 #define elf_backend_want_plt_sym		0
 #define elf_backend_plt_readonly		1
+#define elf_backend_dtrel_excludes_plt		1
+#define elf_backend_want_dynrelro		1
 
 #define bfd_elf32_bfd_reloc_type_lookup	metag_reloc_type_lookup
 #define bfd_elf32_bfd_reloc_name_lookup	metag_reloc_name_lookup
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-metag.h ./bfd/elf32-metag.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-metag.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-metag.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Meta support for 32-bit ELF
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Imagination Technologies Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-microblaze.c ./bfd/elf32-microblaze.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-microblaze.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-microblaze.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* Xilinx MicroBlaze-specific support for 32-bit ELF
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -652,8 +652,9 @@ microblaze_elf_info_to_howto (bfd * abfd
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_MICROBLAZE_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised MicroBlaze reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised MicroBlaze reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_MICROBLAZE_NONE;
     }
@@ -729,15 +730,6 @@ struct elf32_mb_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Small local sym to section mapping cache.  */
   struct sym_cache sym_sec;
 
@@ -956,8 +948,9 @@ microblaze_elf_relocate_section (bfd *ou
 
       if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max)
 	{
-	  (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
-				 bfd_get_filename (input_bfd), (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%s: unknown relocation type %d"),
+			      bfd_get_filename (input_bfd), (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
 	  continue;
@@ -966,7 +959,7 @@ microblaze_elf_relocate_section (bfd *ou
       howto = microblaze_elf_howto_table[r_type];
       r_symndx = ELF32_R_SYM (rel->r_info);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -1082,11 +1075,14 @@ microblaze_elf_relocate_section (bfd *ou
 		      }
 		    else
 		      {
-			(*_bfd_error_handler) (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
-					       bfd_get_filename (input_bfd),
-					       sym_name,
-					       microblaze_elf_howto_table[(int) r_type]->name,
-					       bfd_get_section_name (sec->owner, sec));
+			_bfd_error_handler
+			  /* xgettext:c-format */
+			  (_("%s: The target (%s) of an %s relocation "
+			     "is in the wrong section (%s)"),
+			   bfd_get_filename (input_bfd),
+			   sym_name,
+			   microblaze_elf_howto_table[(int) r_type]->name,
+			   bfd_get_section_name (sec->owner, sec));
 			/*bfd_set_error (bfd_error_bad_value); ??? why? */
 			ret = FALSE;
 			continue;
@@ -1127,11 +1123,14 @@ microblaze_elf_relocate_section (bfd *ou
 		      }
 		    else
 		      {
-			(*_bfd_error_handler) (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
-					       bfd_get_filename (input_bfd),
-					       sym_name,
-					       microblaze_elf_howto_table[(int) r_type]->name,
-					       bfd_get_section_name (sec->owner, sec));
+			_bfd_error_handler
+			  /* xgettext:c-format */
+			  (_("%s: The target (%s) of an %s relocation "
+			     "is in the wrong section (%s)"),
+			   bfd_get_filename (input_bfd),
+			   sym_name,
+			   microblaze_elf_howto_table[(int) r_type]->name,
+			   bfd_get_section_name (sec->owner, sec));
 			/*bfd_set_error (bfd_error_bad_value); ??? why? */
 			ret = FALSE;
 			continue;
@@ -1144,8 +1143,8 @@ microblaze_elf_relocate_section (bfd *ou
 	      break; /* Do nothing.  */
 
 	    case (int) R_MICROBLAZE_GOTPC_64:
-	      relocation = htab->sgotplt->output_section->vma
-		+ htab->sgotplt->output_offset;
+	      relocation = (htab->elf.sgotplt->output_section->vma
+			    + htab->elf.sgotplt->output_offset);
 	      relocation -= (input_section->output_section->vma
 			     + input_section->output_offset
 			     + offset + INST_WORD_SIZE);
@@ -1159,11 +1158,11 @@ microblaze_elf_relocate_section (bfd *ou
 	    case (int) R_MICROBLAZE_PLT_64:
 	      {
 		bfd_vma immediate;
-		if (htab->splt != NULL && h != NULL
+		if (htab->elf.splt != NULL && h != NULL
 		    && h->plt.offset != (bfd_vma) -1)
 		  {
-		    relocation = (htab->splt->output_section->vma
-				  + htab->splt->output_offset
+		    relocation = (htab->elf.splt->output_section->vma
+				  + htab->elf.splt->output_offset
 				  + h->plt.offset);
 		    unresolved_reloc = FALSE;
 		    immediate = relocation - (input_section->output_section->vma
@@ -1193,6 +1192,7 @@ microblaze_elf_relocate_section (bfd *ou
 	      goto dogot;
 	    case (int) R_MICROBLAZE_TLSLD:
 	      tls_type = (TLS_TLS | TLS_LD);
+	      /* Fall through.  */
 	    dogot:
 	    case (int) R_MICROBLAZE_GOT_64:
 	      {
@@ -1202,7 +1202,7 @@ microblaze_elf_relocate_section (bfd *ou
 		bfd_vma static_value;
 
 		bfd_boolean need_relocs = FALSE;
-		if (htab->sgot == NULL)
+		if (htab->elf.sgot == NULL)
 		  abort ();
 
 		indx = 0;
@@ -1218,10 +1218,11 @@ microblaze_elf_relocate_section (bfd *ou
 		  offp = &htab->tlsld_got.offset;
 		else if (h != NULL)
 		  {
-		    if (htab->sgotplt != NULL && h->got.offset != (bfd_vma) -1)
-			offp = &h->got.offset;
+		    if (htab->elf.sgotplt != NULL
+			&& h->got.offset != (bfd_vma) -1)
+		      offp = &h->got.offset;
 		    else
-			abort ();
+		      abort ();
 		  }
 		else
 		  {
@@ -1245,13 +1246,16 @@ microblaze_elf_relocate_section (bfd *ou
 		    bfd_boolean dyn =
 			elf_hash_table (info)->dynamic_sections_created;
 
-		    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-			&& (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, h)))
+		    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							 bfd_link_pic (info),
+							 h)
+			&& (!bfd_link_pic (info)
+			    || !SYMBOL_REFERENCES_LOCAL (info, h)))
 		      indx = h->dynindx;
 		  }
 
 		/* Need to generate relocs ? */
-		if ((info->shared || indx != 0)
+		if ((bfd_link_pic (info) || indx != 0)
 		    && (h == NULL
 		    || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		    || h->root.type != bfd_link_hash_undefweak))
@@ -1265,97 +1269,95 @@ microblaze_elf_relocate_section (bfd *ou
 		  {
 		    bfd_vma got_offset;
 
-		    got_offset = (htab->sgot->output_section->vma
-				  + htab->sgot->output_offset
+		    got_offset = (htab->elf.sgot->output_section->vma
+				  + htab->elf.sgot->output_offset
 				  + off);
 
 		    /* Process module-id */
 		    if (IS_TLS_LD(tls_type))
 		      {
-			if (! info->shared)
-			  {
-			    bfd_put_32 (output_bfd, 1, htab->sgot->contents + off);
-			  }
+			if (! bfd_link_pic (info))
+			  bfd_put_32 (output_bfd, 1,
+				      htab->elf.sgot->contents + off);
 			else
-			  {
-			    microblaze_elf_output_dynamic_relocation (output_bfd,
-			      htab->srelgot, htab->srelgot->reloc_count++,
-			      /* symindex= */ 0, R_MICROBLAZE_TLSDTPMOD32,
-			      got_offset, 0);
-			  }
+			  microblaze_elf_output_dynamic_relocation
+			    (output_bfd,
+			     htab->elf.srelgot,
+			     htab->elf.srelgot->reloc_count++,
+			     /* symindex= */ 0, R_MICROBLAZE_TLSDTPMOD32,
+			     got_offset, 0);
 		      }
 		    else if (IS_TLS_GD(tls_type))
 		      {
 		        if (! need_relocs)
-			  {
-			    bfd_put_32 (output_bfd, 1, htab->sgot->contents + off);
-			  }
+			  bfd_put_32 (output_bfd, 1,
+				      htab->elf.sgot->contents + off);
 		        else
-			  {
-			    microblaze_elf_output_dynamic_relocation (output_bfd,
-			      htab->srelgot,
-			      htab->srelgot->reloc_count++,
-			      /* symindex= */ indx, R_MICROBLAZE_TLSDTPMOD32,
-			      got_offset, indx ? 0 : static_value);
-			  }
+			  microblaze_elf_output_dynamic_relocation
+			    (output_bfd,
+			     htab->elf.srelgot,
+			     htab->elf.srelgot->reloc_count++,
+			     /* symindex= */ indx, R_MICROBLAZE_TLSDTPMOD32,
+			     got_offset, indx ? 0 : static_value);
 		      }
 
 		    /* Process Offset */
-		    if (htab->srelgot == NULL)
+		    if (htab->elf.srelgot == NULL)
 		      abort ();
 
-		    got_offset = (htab->sgot->output_section->vma
-				  + htab->sgot->output_offset
+		    got_offset = (htab->elf.sgot->output_section->vma
+				  + htab->elf.sgot->output_offset
 				  + off2);
 		    if (IS_TLS_LD(tls_type))
 		      {
 		        /* For LD, offset should be 0 */
 		        *offp |= 1;
-		        bfd_put_32 (output_bfd, 0, htab->sgot->contents + off2);
+		        bfd_put_32 (output_bfd, 0,
+				    htab->elf.sgot->contents + off2);
 		      }
 		    else if (IS_TLS_GD(tls_type))
 		      {
 		        *offp |= 1;
 		        static_value -= dtprel_base(info);
 		        if (need_relocs)
-		          {
-			    microblaze_elf_output_dynamic_relocation (output_bfd,
-			      htab->srelgot, htab->srelgot->reloc_count++,
-			      /* symindex= */ indx, R_MICROBLAZE_TLSDTPREL32,
-			      got_offset, indx ? 0 : static_value);
-		          }
+			  microblaze_elf_output_dynamic_relocation
+			    (output_bfd,
+			     htab->elf.srelgot,
+			     htab->elf.srelgot->reloc_count++,
+			     /* symindex= */ indx, R_MICROBLAZE_TLSDTPREL32,
+			     got_offset, indx ? 0 : static_value);
 		        else
-			  {
-			    bfd_put_32 (output_bfd, static_value,
-					htab->sgot->contents + off2);
-		          }
+			  bfd_put_32 (output_bfd, static_value,
+				      htab->elf.sgot->contents + off2);
 		      }
 		    else
 		      {
-			  bfd_put_32 (output_bfd, static_value,
-				      htab->sgot->contents + off2);
+			bfd_put_32 (output_bfd, static_value,
+				    htab->elf.sgot->contents + off2);
 
-			  /* Relocs for dyn symbols generated by
-			     finish_dynamic_symbols */
-			  if (info->shared && h == NULL)
-			    {
-			      *offp |= 1;
-			      microblaze_elf_output_dynamic_relocation (output_bfd,
-				htab->srelgot, htab->srelgot->reloc_count++,
-				/* symindex= */ indx, R_MICROBLAZE_REL,
-				got_offset, static_value);
-			    }
+			/* Relocs for dyn symbols generated by
+			   finish_dynamic_symbols */
+			if (bfd_link_pic (info) && h == NULL)
+			  {
+			    *offp |= 1;
+			    microblaze_elf_output_dynamic_relocation
+			      (output_bfd,
+			       htab->elf.srelgot,
+			       htab->elf.srelgot->reloc_count++,
+			       /* symindex= */ indx, R_MICROBLAZE_REL,
+			       got_offset, static_value);
+			  }
 		      }
 		  }
 
 		/* 4. Fixup Relocation with GOT offset value
 		      Compute relative address of GOT entry for applying
 		      the current relocation */
-		relocation = htab->sgot->output_section->vma
-			     + htab->sgot->output_offset
+		relocation = htab->elf.sgot->output_section->vma
+			     + htab->elf.sgot->output_offset
 			     + off
-			     - htab->sgotplt->output_section->vma
-			     - htab->sgotplt->output_offset;
+			     - htab->elf.sgotplt->output_section->vma
+			     - htab->elf.sgotplt->output_offset;
 
 		/* Apply Current Relocation */
 		bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff,
@@ -1372,22 +1374,23 @@ microblaze_elf_relocate_section (bfd *ou
 		bfd_vma immediate;
 		unsigned short lo, high;
 		relocation += addend;
-		relocation -= htab->sgotplt->output_section->vma
-		  + htab->sgotplt->output_offset;
+		relocation -= (htab->elf.sgotplt->output_section->vma
+			       + htab->elf.sgotplt->output_offset);
 		/* Write this value into correct location.  */
 		immediate = relocation;
 		lo = immediate & 0x0000ffff;
 		high = (immediate >> 16) & 0x0000ffff;
 		bfd_put_16 (input_bfd, high, contents + offset + endian);
-		bfd_put_16 (input_bfd, lo, contents + offset + INST_WORD_SIZE + endian);
+		bfd_put_16 (input_bfd, lo,
+			    contents + offset + INST_WORD_SIZE + endian);
 		break;
 	      }
 
 	    case (int) R_MICROBLAZE_GOTOFF_32:
 	      {
 		relocation += addend;
-		relocation -= htab->sgotplt->output_section->vma
-		  + htab->sgotplt->output_offset;
+		relocation -= (htab->elf.sgotplt->output_section->vma
+			       + htab->elf.sgotplt->output_offset);
 		/* Write this value into correct location.  */
 		bfd_put_32 (input_bfd, relocation, contents + offset);
 		break;
@@ -1427,7 +1430,7 @@ microblaze_elf_relocate_section (bfd *ou
 		    break;
 		  }
 
-		if ((info->shared
+		if ((bfd_link_pic (info)
 		     && (h == NULL
 			 || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 			 || h->root.type != bfd_link_hash_undefweak)
@@ -1436,7 +1439,7 @@ microblaze_elf_relocate_section (bfd *ou
 			     && h->dynindx != -1
 			     && (!info->symbolic
 				 || !h->def_regular))))
-		    || (!info->shared
+		    || (!bfd_link_pic (info)
 			&& h != NULL
 			&& h->dynindx != -1
 			&& !h->non_got_ref
@@ -1489,7 +1492,7 @@ microblaze_elf_relocate_section (bfd *ou
 			else
 			  {
 			    BFD_FAIL ();
-			    (*_bfd_error_handler)
+			    _bfd_error_handler
 			      (_("%B: probably compiled without -fPIC?"),
 			       input_bfd);
 			    bfd_set_error (bfd_error_bad_value);
@@ -1553,16 +1556,14 @@ microblaze_elf_relocate_section (bfd *ou
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section, offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section, offset, TRUE)))
-	        return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -1581,9 +1582,8 @@ microblaze_elf_relocate_section (bfd *ou
 	      errmsg = _("internal error: unknown error");
 	      /* Fall through.  */
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, errmsg, name, input_bfd, input_section, offset)))
-	        return FALSE;
+	      (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+					   input_section, offset);
 	      break;
 	    }
 	}
@@ -1591,21 +1591,6 @@ microblaze_elf_relocate_section (bfd *ou
 
   return ret;
 }
-
-/* Merge backend specific data from an object file to the output
-   object file when linking.
-
-   Note: We only use this hook to catch endian mismatches.  */
-static bfd_boolean
-microblaze_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
-{
-  /* Check if we have the same endianess.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
-    return FALSE;
-
-  return TRUE;
-}
-
 
 /* Calculate fixup value for reference.  */
 
@@ -1688,7 +1673,7 @@ microblaze_elf_relax_section (bfd *abfd,
   *again = FALSE;
 
   /* Only do this for a text section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || (sec->reloc_count == 0)
       || (sec->flags & SEC_CODE) == 0)
@@ -2254,39 +2239,6 @@ microblaze_elf_gc_sweep_hook (bfd * abfd
 #define PLT_ENTRY_WORD_2  0x98186000          /* "brad r12".  */
 #define PLT_ENTRY_WORD_3  0x80000000          /* "nop".  */
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf32_mb_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-  htab = elf32_mb_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  htab->sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  if (!htab->sgot || !htab->sgotplt)
-    return FALSE;
-
-  if ((htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got")) == NULL)
-    htab->srelgot = bfd_make_section_anyway (dynobj, ".rela.got");
-  if (htab->srelgot == NULL
-      || ! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC
-                                  | SEC_LOAD
-                                  | SEC_HAS_CONTENTS
-                                  | SEC_IN_MEMORY
-                                  | SEC_LINKER_CREATED
-                                  | SEC_READONLY)
-      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
-    return FALSE;
-  return TRUE;
-}
-
 static bfd_boolean
 update_local_sym_info (bfd *abfd,
 		       Elf_Internal_Shdr *symtab_hdr,
@@ -2330,7 +2282,7 @@ microblaze_elf_check_relocs (bfd * abfd,
   struct elf32_mb_link_hash_table *htab;
   asection *sreloc = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf32_mb_hash_table (info);
@@ -2397,14 +2349,17 @@ microblaze_elf_check_relocs (bfd * abfd,
           goto dogottls;
         case R_MICROBLAZE_TLSLD:
           tls_type |= (TLS_TLS | TLS_LD);
+	  /* Fall through.  */
         dogottls:
           sec->has_tls_reloc = 1;
+	  /* Fall through.  */
+        case R_MICROBLAZE_GOTOFF_64:
         case R_MICROBLAZE_GOT_64:
-          if (htab->sgot == NULL)
+          if (htab->elf.sgot == NULL)
             {
               if (htab->elf.dynobj == NULL)
                 htab->elf.dynobj = abfd;
-              if (!create_got_section (htab->elf.dynobj, info))
+              if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
                 return FALSE;
             }
           if (h != NULL)
@@ -2423,7 +2378,7 @@ microblaze_elf_check_relocs (bfd * abfd,
         case R_MICROBLAZE_64_PCREL:
         case R_MICROBLAZE_32:
           {
-            if (h != NULL && !info->shared)
+            if (h != NULL && !bfd_link_pic (info))
 	      {
 		/* we may need a copy reloc.  */
 		h->non_got_ref = 1;
@@ -2457,14 +2412,14 @@ microblaze_elf_check_relocs (bfd * abfd,
 	       dynamic library if we manage to avoid copy relocs for the
 	       symbol.  */
 
-            if ((info->shared
+            if ((bfd_link_pic (info)
                  && (sec->flags & SEC_ALLOC) != 0
                  && (r_type != R_MICROBLAZE_64_PCREL
                      || (h != NULL
 			 && (! info->symbolic
 			     || h->root.type == bfd_link_hash_defweak
 			     || !h->def_regular))))
-                || (!info->shared
+                || (!bfd_link_pic (info)
                     && (sec->flags & SEC_ALLOC) != 0
                     && h != NULL
                     && (h->root.type == bfd_link_hash_defweak
@@ -2545,34 +2500,6 @@ microblaze_elf_check_relocs (bfd * abfd,
   return TRUE;
 }
 
-static bfd_boolean
-microblaze_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf32_mb_link_hash_table *htab;
-
-  htab = elf32_mb_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  if (!htab->sgot && !create_got_section (dynobj, info))
-    return FALSE;
-
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->splt = bfd_get_linker_section (dynobj, ".plt");
-  htab->srelplt = bfd_get_linker_section (dynobj, ".rela.plt");
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->splt || !htab->srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
-}
-
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
@@ -2631,9 +2558,8 @@ microblaze_elf_adjust_dynamic_symbol (st
   struct elf32_mb_link_hash_table *htab;
   struct elf32_mb_link_hash_entry * eh;
   struct elf32_mb_dyn_relocs *p;
-  asection *sdynbss, *s;
+  asection *s, *srel;
   unsigned int power_of_two;
-  bfd *dynobj;
 
   htab = elf32_mb_hash_table (info);
   if (htab == NULL)
@@ -2688,7 +2614,7 @@ microblaze_elf_adjust_dynamic_symbol (st
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2732,11 +2658,19 @@ microblaze_elf_adjust_dynamic_symbol (st
   /* We must generate a R_MICROBLAZE_COPY reloc to tell the dynamic linker
      to copy the initial value out of the dynamic object and into the
      runtime process image.  */
-  dynobj = elf_hash_table (info)->dynobj;
-  BFD_ASSERT (dynobj != NULL);
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
 
@@ -2746,21 +2680,20 @@ microblaze_elf_adjust_dynamic_symbol (st
   if (power_of_two > 3)
     power_of_two = 3;
 
-  sdynbss = htab->sdynbss;
   /* Apply the required alignment.  */
-  sdynbss->size = BFD_ALIGN (sdynbss->size, (bfd_size_type) (1 << power_of_two));
-  if (power_of_two > bfd_get_section_alignment (dynobj, sdynbss))
+  s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
+  if (power_of_two > s->alignment_power)
     {
-      if (! bfd_set_section_alignment (dynobj, sdynbss, power_of_two))
+      if (!bfd_set_section_alignment (s->owner, s, power_of_two))
 	return FALSE;
     }
 
   /* Define the symbol as being at this point in the section.  */
-  h->root.u.def.section = sdynbss;
-  h->root.u.def.value = sdynbss->size;
+  h->root.u.def.section = s;
+  h->root.u.def.value = s->size;
 
   /* Increment the section size to make room for the symbol.  */
-  sdynbss->size += h->size;
+  s->size += h->size;
   return TRUE;
 }
 
@@ -2795,9 +2728,9 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
         {
-          asection *s = htab->splt;
+          asection *s = htab->elf.splt;
 
           /* The first entry in .plt is reserved.  */
           if (s->size == 0)
@@ -2810,7 +2743,7 @@ allocate_dynrelocs (struct elf_link_hash
              location in the .plt.  This is required to make function
              pointers compare as equal between the normal executable and
              the shared library.  */
-          if (! info->shared
+          if (! bfd_link_pic (info)
               && !h->def_regular)
             {
               h->root.u.def.section = s;
@@ -2822,10 +2755,10 @@ allocate_dynrelocs (struct elf_link_hash
 
           /* We also need to make an entry in the .got.plt section, which
              will be placed in the .got section by the linker script.  */
-	  htab->sgotplt->size += 4;
+	  htab->elf.sgotplt->size += 4;
 
           /* We also need to make an entry in the .rel.plt section.  */
-          htab->srelplt->size += sizeof (Elf32_External_Rela);
+          htab->elf.srelplt->size += sizeof (Elf32_External_Rela);
         }
       else
         {
@@ -2882,10 +2815,10 @@ allocate_dynrelocs (struct elf_link_hash
         }
       else
         {
-          s = htab->sgot;
+          s = htab->elf.sgot;
           h->got.offset = s->size;
           s->size += need;
-          htab->srelgot->size += need * (sizeof (Elf32_External_Rela) / 4);
+          htab->elf.srelgot->size += need * (sizeof (Elf32_External_Rela) / 4);
         }
     }
   else
@@ -2900,7 +2833,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->def_regular
 	  && (h->forced_local
@@ -3029,8 +2962,8 @@ microblaze_elf_size_dynamic_sections (bf
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
       lgot_masks = (unsigned char *) end_local_got;
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->elf.sgot;
+      srel = htab->elf.srelgot;
 
       for (; local_got < end_local_got; ++local_got, ++lgot_masks)
 	{
@@ -3055,7 +2988,7 @@ microblaze_elf_size_dynamic_sections (bf
 		{
 		  *local_got = s->size;
 		  s->size += need;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srel->size += need * (sizeof (Elf32_External_Rela) / 4);
 		}
             }
@@ -3070,10 +3003,10 @@ microblaze_elf_size_dynamic_sections (bf
 
   if (htab->tlsld_got.refcount > 0)
     {
-      htab->tlsld_got.offset = htab->sgot->size;
-      htab->sgot->size += 8;
-      if (info->shared)
-        htab->srelgot->size += sizeof (Elf32_External_Rela);
+      htab->tlsld_got.offset = htab->elf.sgot->size;
+      htab->elf.sgot->size += 8;
+      if (bfd_link_pic (info))
+        htab->elf.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     htab->tlsld_got.offset = (bfd_vma) -1;
@@ -3081,8 +3014,8 @@ microblaze_elf_size_dynamic_sections (bf
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Make space for the trailing nop in .plt.  */
-      if (htab->splt->size > 0)
-        htab->splt->size += 4;
+      if (htab->elf.splt->size > 0)
+        htab->elf.splt->size += 4;
     }
 
   /* The check_relocs and adjust_dynamic_symbol entry points have
@@ -3122,7 +3055,11 @@ microblaze_elf_size_dynamic_sections (bf
               s->reloc_count = 0;
             }
         }
-      else if (s != htab->splt && s != htab->sgot && s != htab->sgotplt)
+      else if (s != htab->elf.splt
+	       && s != htab->elf.sgot
+	       && s != htab->elf.sgotplt
+	       && s != htab->elf.sdynbss
+	       && s != htab->elf.sdynrelro)
         {
           /* It's not one of our sections, so don't allocate space.  */
           continue;
@@ -3155,7 +3092,7 @@ microblaze_elf_size_dynamic_sections (bf
 #define add_dynamic_entry(TAG, VAL)			\
       _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
         {
           if (!add_dynamic_entry (DT_DEBUG, 0))
             return FALSE;
@@ -3166,7 +3103,7 @@ microblaze_elf_size_dynamic_sections (bf
           || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
 	return FALSE;
 
-      if (htab->splt->size != 0)
+      if (htab->elf.splt->size != 0)
         {
           if (!add_dynamic_entry (DT_PLTGOT, 0)
               || !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -3217,9 +3154,9 @@ microblaze_elf_finish_dynamic_symbol (bf
          it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      srela = htab->srelplt;
-      sgotplt = htab->sgotplt;
+      splt = htab->elf.splt;
+      srela = htab->elf.srelplt;
+      sgotplt = htab->elf.sgotplt;
       BFD_ASSERT (splt != NULL && srela != NULL && sgotplt != NULL);
 
       plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; /* first entry reserved.  */
@@ -3227,13 +3164,13 @@ microblaze_elf_finish_dynamic_symbol (bf
       got_addr = got_offset;
 
       /* For non-PIC objects we need absolute address of the GOT entry.  */
-      if (!info->shared)
-        got_addr += htab->sgotplt->output_section->vma + sgotplt->output_offset;
+      if (!bfd_link_pic (info))
+        got_addr += sgotplt->output_section->vma + sgotplt->output_offset;
 
       /* Fill in the entry in the procedure linkage table.  */
       bfd_put_32 (output_bfd, PLT_ENTRY_WORD_0 + ((got_addr >> 16) & 0xffff),
                   splt->contents + h->plt.offset);
-      if (info->shared)
+      if (bfd_link_pic (info))
         bfd_put_32 (output_bfd, PLT_ENTRY_WORD_1 + (got_addr & 0xffff),
                     splt->contents + h->plt.offset + 4);
       else
@@ -3280,30 +3217,37 @@ microblaze_elf_finish_dynamic_symbol (bf
       /* This symbol has an entry in the global offset table.  Set it
          up.  */
 
-      sgot = htab->sgot;
-      srela = htab->srelgot;
+      sgot = htab->elf.sgot;
+      srela = htab->elf.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       offset = (sgot->output_section->vma + sgot->output_offset
-                       + (h->got.offset &~ (bfd_vma) 1));
+		+ (h->got.offset &~ (bfd_vma) 1));
 
       /* If this is a -Bsymbolic link, and the symbol is defined
          locally, we just want to emit a RELATIVE reloc.  Likewise if
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared
-          && (info->symbolic || h->dynindx == -1)
-          && h->def_regular)
+      if (bfd_link_pic (info)
+          && ((info->symbolic && h->def_regular)
+	      || h->dynindx == -1))
         {
           asection *sec = h->root.u.def.section;
+	  bfd_vma value;
+
+	  value = h->root.u.def.value;
+	  if (sec->output_section != NULL)
+	    /* PR 21180: If the output section is NULL, then the symbol is no
+	       longer needed, and in theory the GOT entry is redundant.  But
+	       it is too late to change our minds now...  */
+	    value += sec->output_section->vma + sec->output_offset;
+
           microblaze_elf_output_dynamic_relocation (output_bfd,
                                                     srela, srela->reloc_count++,
                                                     /* symindex= */ 0,
                                                     R_MICROBLAZE_REL, offset,
-                                                    h->root.u.def.value
-                                                    + sec->output_section->vma
-                                                    + sec->output_offset);
+                                                    value);
         }
       else
         {
@@ -3328,14 +3272,15 @@ microblaze_elf_finish_dynamic_symbol (bf
 
       BFD_ASSERT (h->dynindx != -1);
 
-      s = bfd_get_linker_section (htab->elf.dynobj, ".rela.bss");
-      BFD_ASSERT (s != NULL);
-
       rela.r_offset = (h->root.u.def.value
                        + h->root.u.def.section->output_section->vma
                        + h->root.u.def.section->output_offset);
       rela.r_info = ELF32_R_INFO (h->dynindx, R_MICROBLAZE_COPY);
       rela.r_addend = 0;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
       loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
     }
@@ -3373,47 +3318,52 @@ microblaze_elf_finish_dynamic_sections (
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      BFD_ASSERT (splt != NULL && sdyn != NULL);
-
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
       dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
       for (; dyncon < dynconend; dyncon++)
         {
           Elf_Internal_Dyn dyn;
-          const char *name;
+	  asection *s;
           bfd_boolean size;
 
           bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
 
           switch (dyn.d_tag)
             {
-            case DT_PLTGOT:   name = ".got.plt"; size = FALSE; break;
-            case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
-            case DT_JMPREL:   name = ".rela.plt"; size = FALSE; break;
-            case DT_RELA:     name = ".rela.dyn"; size = FALSE; break;
-            case DT_RELASZ:   name = ".rela.dyn"; size = TRUE; break;
-            default:	  name = NULL; size = FALSE; break;
-            }
+	    case DT_PLTGOT:
+	      s = htab->elf.sgotplt;
+	      size = FALSE;
+	      break;
 
-          if (name != NULL)
-            {
-              asection *s;
+	    case DT_PLTRELSZ:
+	      s = htab->elf.srelplt;
+	      size = TRUE;
+	      break;
 
-              s = bfd_get_section_by_name (output_bfd, name);
-              if (s == NULL)
-                dyn.d_un.d_val = 0;
-              else
-                {
-                  if (! size)
-                    dyn.d_un.d_ptr = s->vma;
-                  else
-                    dyn.d_un.d_val = s->size;
-                }
-              bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+	    case DT_JMPREL:
+	      s = htab->elf.srelplt;
+	      size = FALSE;
+	      break;
+
+	    default:
+	      continue;
             }
+
+	  if (s == NULL)
+	    dyn.d_un.d_val = 0;
+	  else
+	    {
+	      if (!size)
+		dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	      else
+		dyn.d_un.d_val = s->size;
+	    }
+	  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
         }
 
+      splt = htab->elf.splt;
+      BFD_ASSERT (splt != NULL && sdyn != NULL);
+
       /* Clear the first entry in the procedure linkage table,
 	 and put a nop in the last four bytes.  */
       if (splt->size > 0)
@@ -3428,7 +3378,7 @@ microblaze_elf_finish_dynamic_sections (
 
   /* Set the first entry in the global offset table to the address of
      the dynamic section.  */
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = htab->elf.sgotplt;
   if (sgot && sgot->size > 0)
     {
       if (sdyn == NULL)
@@ -3440,8 +3390,8 @@ microblaze_elf_finish_dynamic_sections (
       elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
     }
 
-  if (htab->sgot && htab->sgot->size > 0)
-    elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
+  if (htab->elf.sgot && htab->elf.sgot->size > 0)
+    elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
 
   return TRUE;
 }
@@ -3459,7 +3409,7 @@ microblaze_elf_add_symbol_hook (bfd *abf
 			        bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && sym->st_size <= elf_gp_size (abfd))
     {
       /* Common symbols less than or equal to -G nn bytes are automatically
@@ -3493,7 +3443,7 @@ microblaze_elf_add_symbol_hook (bfd *abf
 #define bfd_elf32_bfd_is_local_label_name       microblaze_elf_is_local_label_name
 #define elf_backend_relocate_section		microblaze_elf_relocate_section
 #define bfd_elf32_bfd_relax_section             microblaze_elf_relax_section
-#define bfd_elf32_bfd_merge_private_bfd_data    microblaze_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data    _bfd_generic_verify_endian_match
 #define bfd_elf32_bfd_reloc_name_lookup		microblaze_elf_reloc_name_lookup
 
 #define elf_backend_gc_mark_hook		microblaze_elf_gc_mark_hook
@@ -3506,10 +3456,12 @@ microblaze_elf_add_symbol_hook (bfd *abf
 #define elf_backend_want_got_plt    		1
 #define elf_backend_plt_readonly    		1
 #define elf_backend_got_header_size 		12
+#define elf_backend_want_dynrelro		1
 #define elf_backend_rela_normal     		1
+#define elf_backend_dtrel_excludes_plt		1
 
 #define elf_backend_adjust_dynamic_symbol       microblaze_elf_adjust_dynamic_symbol
-#define elf_backend_create_dynamic_sections     microblaze_elf_create_dynamic_sections
+#define elf_backend_create_dynamic_sections     _bfd_elf_create_dynamic_sections
 #define elf_backend_finish_dynamic_sections     microblaze_elf_finish_dynamic_sections
 #define elf_backend_finish_dynamic_symbol       microblaze_elf_finish_dynamic_symbol
 #define elf_backend_size_dynamic_sections       microblaze_elf_size_dynamic_sections
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mips.c ./bfd/elf32-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS-specific support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -1027,6 +1027,21 @@ static reloc_howto_type elf_mips16_howto
 	 0x0000ffff,		/* src_mask */
 	 0x0000ffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* MIPS16 16-bit PC-relative branch offset.  */
+  HOWTO (R_MIPS16_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS16_PC16_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 static reloc_howto_type elf_micromips_howto_table_rel[] =
@@ -1548,9 +1563,9 @@ static reloc_howto_type elf_mips_gnu_rel
 	 TRUE);			/* pcrel_offset */
 
 /* 32 bit pc-relative.  This was a GNU extension used by embedded-PIC.
-   It was co-opted by mips-linux for exception-handling data.  It is no
-   longer used, but should continue to be supported by the linker for
-   backward compatibility.  (GCC stopped using it in May, 2004.)  */
+   It was co-opted by mips-linux for exception-handling data.  GCC stopped
+   using it in May, 2004, then started using it again for compact unwind
+   tables.  */
 static reloc_howto_type elf_mips_gnu_pcrel32 =
   HOWTO (R_MIPS_PC32,		/* type */
 	 0,			/* rightshift */
@@ -2023,7 +2038,8 @@ static const struct elf_reloc_map mips16
     R_MIPS16_TLS_DTPREL_LO16 - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_GOTTPREL, R_MIPS16_TLS_GOTTPREL - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_TPREL_HI16, R_MIPS16_TLS_TPREL_HI16 - R_MIPS16_min },
-  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min }
+  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min },
+  { BFD_RELOC_MIPS16_16_PCREL_S1, R_MIPS16_PC16_S1 - R_MIPS16_min }
 };
 
 static const struct elf_reloc_map micromips_reloc_map[] =
@@ -2206,7 +2222,7 @@ mips_elf32_rtype_to_howto (unsigned int 
         return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
       if (r_type >= (unsigned int) R_MIPS_max)
 	{
-	  (*_bfd_error_handler) (_("Unrecognised MIPS reloc number: %d"), r_type);
+	  _bfd_error_handler (_("Unrecognised MIPS reloc number: %d"), r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  r_type = R_MIPS_NONE;
 	}
@@ -2466,6 +2482,7 @@ static const struct ecoff_debug_swap mip
 #define elf_backend_ecoff_debug_swap	&mips_elf32_ecoff_debug_swap
 
 #define elf_backend_got_header_size	(4 * MIPS_RESERVED_GOTNO)
+#define elf_backend_want_dynrelro	1
 #define elf_backend_may_use_rel_p	1
 #define elf_backend_may_use_rela_p	0
 #define elf_backend_default_use_rela_p	0
@@ -2601,6 +2618,8 @@ mips_vxworks_final_write_processing (bfd
 #define elf_backend_default_use_rela_p		1
 #undef elf_backend_got_header_size
 #define elf_backend_got_header_size		(4 * 3)
+#undef elf_backend_dtrel_excludes_plt
+#define elf_backend_dtrel_excludes_plt		1
 
 #undef elf_backend_finish_dynamic_symbol
 #define elf_backend_finish_dynamic_symbol \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-moxie.c ./bfd/elf32-moxie.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-moxie.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-moxie.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,8 +1,8 @@
 /* moxie-specific support for 32-bit ELF.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    Copied from elf32-fr30.c which is..
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -133,6 +133,7 @@ moxie_info_to_howto_rela (bfd *abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_MOXIE_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid Moxie reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -257,7 +258,7 @@ moxie_elf_relocate_section (bfd *output_
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = moxie_final_link_relocate (howto, input_bfd, input_section,
@@ -270,15 +271,14 @@ moxie_elf_relocate_section (bfd *output_
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -299,11 +299,8 @@ moxie_elf_relocate_section (bfd *output_
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -338,7 +335,7 @@ moxie_elf_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-msp430.c ./bfd/elf32-msp430.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-msp430.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-msp430.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /*  MSP430-specific support for 32-bit ELF
-    Copyright (C) 2002-2015 Free Software Foundation, Inc.
+    Copyright (C) 2002-2017 Free Software Foundation, Inc.
     Contributed by Dmitry Diky <diwil@mail.ru>
 
     This file is part of BFD, the Binary File Descriptor library.
@@ -215,7 +215,7 @@ static reloc_howto_type elf_msp430_howto
 	 FALSE,			/* partial_inplace */
 	 0xffffffff,		/* src_mask */
 	 0xffffffff,		/* dst_mask */
-	 FALSE)			/* pcrel_offset */  
+	 FALSE)			/* pcrel_offset */
 };
 
 static reloc_howto_type elf_msp430x_howto_table[] =
@@ -473,7 +473,7 @@ static reloc_howto_type elf_msp430x_howt
 	 TRUE),                 /* pcrel_offset */
 
   EMPTY_HOWTO (R_MSP430_EHTYPE),
-  
+
   /* A 10 bit PC relative relocation.  */
   HOWTO (R_MSP430X_10_PCREL,	/* type */
 	 1,			/* rightshift */
@@ -518,7 +518,7 @@ static reloc_howto_type elf_msp430x_howt
 	 FALSE,			/* partial_inplace */
 	 0xffffffff,		/* src_mask */
 	 0xffffffff,		/* dst_mask */
-	 FALSE)			/* pcrel_offset */  
+	 FALSE)			/* pcrel_offset */
 };
 
 /* Map BFD reloc types to MSP430 ELF reloc types.  */
@@ -644,6 +644,7 @@ msp430_info_to_howto_rela (bfd * abfd AT
     {
       if (r_type >= (unsigned int) R_MSP430x_max)
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: invalid MSP430X reloc number: %d"), abfd, r_type);
 	  r_type = 0;
 	}
@@ -653,6 +654,7 @@ msp430_info_to_howto_rela (bfd * abfd AT
 
   if (r_type >= (unsigned int) R_MSP430_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid MSP430 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -672,7 +674,7 @@ elf32_msp430_check_relocs (bfd * abfd, s
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -739,7 +741,7 @@ msp430_final_link_relocate (reloc_howto_
   if (sym_diff_section != NULL)
     {
       BFD_ASSERT (sym_diff_section == input_section);
- 
+
      if (uses_msp430x_relocs (input_bfd))
        switch (howto->type)
 	 {
@@ -778,7 +780,7 @@ msp430_final_link_relocate (reloc_howto_
 	 default:
 	   return bfd_reloc_dangerous;
 	 }
-       
+
       sym_diff_section = NULL;
     }
 
@@ -854,7 +856,7 @@ msp430_final_link_relocate (reloc_howto_
 	    addend = (bfd_get_16 (input_bfd, contents) & 0xf) << 16;
 	    addend |= bfd_get_16 (input_bfd, contents + 6);
 	    srel += addend;
-	    
+
 	  }
 	else
 	  srel += rel->r_addend;
@@ -1050,7 +1052,7 @@ msp430_final_link_relocate (reloc_howto_
 	  srel += rel->r_addend;
 	x = srel;
 	if (x > 0xffff)
-	  return bfd_reloc_overflow;	
+	  return bfd_reloc_overflow;
 	bfd_put_16 (input_bfd, srel & 0xffff, contents);
 	break;
 
@@ -1062,7 +1064,7 @@ msp430_final_link_relocate (reloc_howto_
 	srel += rel->r_addend;
 	bfd_put_16 (input_bfd, (srel >> 16) & 0xffff, contents);
 	break;
-      
+
       case R_MSP430X_PCR20_CALL:
 	/* [0,4]+[16,16] = ---F FFFF*/
 	contents += rel->r_offset;
@@ -1085,7 +1087,7 @@ msp430_final_link_relocate (reloc_howto_
 	x = (x & 0xfff0) | (srel & 0xf);
 	bfd_put_16 (input_bfd, x, contents);
 	break;
-	
+
       case R_MSP430X_PCR16:
 	contents += rel->r_offset;
 	srel = (bfd_signed_vma) relocation;
@@ -1098,7 +1100,7 @@ msp430_final_link_relocate (reloc_howto_
 		 input_section->output_offset);
 	bfd_put_16 (input_bfd, srel & 0xffff, contents);
 	break;
-      
+
       case R_MSP430_PREL31:
 	contents += rel->r_offset;
 	srel = (bfd_signed_vma) relocation;
@@ -1111,7 +1113,7 @@ msp430_final_link_relocate (reloc_howto_
 	x = (x & 0x80000000) | ((srel >> 31) & 0x7fffffff);
 	bfd_put_32 (input_bfd, x, contents);
 	break;
-	
+
       default:
 	r = _bfd_final_link_relocate (howto, input_bfd, input_section,
 				      contents, rel->r_offset,
@@ -1152,7 +1154,7 @@ msp430_final_link_relocate (reloc_howto_
 	    }
 	  return bfd_reloc_overflow;
 	}
-      
+
       x = bfd_get_16 (input_bfd, contents);
       x = (x & 0xfc00) | (srel & 0x3ff);
       bfd_put_16 (input_bfd, x, contents);
@@ -1240,7 +1242,7 @@ msp430_final_link_relocate (reloc_howto_
 
       bfd_put_8 (input_bfd, srel & 0xff, contents);
       break;
-	 
+
     case R_MSP430_SYM_DIFF:
       /* Cache the input section and value.
 	 The offset is unreliable, since relaxation may
@@ -1328,7 +1330,7 @@ elf32_msp430_relocate_section (bfd * out
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = msp430_final_link_relocate (howto, input_bfd, input_section,
@@ -1341,15 +1343,14 @@ elf32_msp430_relocate_section (bfd * out
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
-		   (bfd_vma) 0, input_bfd, input_section,
-		   rel->r_offset);
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		  (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -1370,11 +1371,8 @@ elf32_msp430_relocate_section (bfd * out
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-		(info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (!r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
 
     }
@@ -1465,7 +1463,7 @@ elf32_msp430_object_p (bfd * abfd)
 	case E_MSP430_MACH_MSP430X: e_set = bfd_mach_msp430x; break;
 	}
     }
-  
+
   return bfd_default_set_arch_mach (abfd, bfd_arch_msp430, e_set);
 }
 
@@ -1633,7 +1631,7 @@ msp430_elf_relax_adjust_locals (bfd * ab
 	  && lsym->st_shndx == sec_shndx)
 	irel->r_addend -= count;
     }
-  
+
   return TRUE;
 }
 
@@ -1682,7 +1680,7 @@ msp430_elf_relax_delete_bytes (bfd * abf
 
   for (p = abfd->sections; p != NULL; p = p->next)
     msp430_elf_relax_adjust_locals (abfd,p,addr,count,sec_shndx,toaddr);
-  
+
   /* Adjust the local symbols defined in this section.  */
   symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
   isym = (Elf_Internal_Sym *) symtab_hdr->contents;
@@ -1696,7 +1694,7 @@ msp430_elf_relax_delete_bytes (bfd * abf
 
       if (isym->st_shndx != sec_shndx)
 	continue;
-      
+
       if (isym->st_value > addr
 	  && (isym->st_value < toaddr
 	      /* We also adjust a symbol at the end of the section if its name is
@@ -1784,7 +1782,7 @@ msp430_elf_relax_add_two_words (bfd * ab
 
   /* Update the section information.  */
   sec->size += 4;
-  elf_section_data (sec)->this_hdr.contents = contents;  
+  elf_section_data (sec)->this_hdr.contents = contents;
 
   /* Adjust all the relocs.  */
   irel = elf_section_data (sec)->relocs;
@@ -1827,7 +1825,7 @@ msp430_elf_relax_add_two_words (bfd * ab
 
   return contents;
 }
-   
+
 static bfd_boolean
 msp430_elf_relax_section (bfd * abfd, asection * sec,
 			  struct bfd_link_info * link_info,
@@ -1846,7 +1844,7 @@ msp430_elf_relax_section (bfd * abfd, as
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
     || (sec->flags & SEC_RELOC) == 0
     || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0)
     return TRUE;
@@ -1967,7 +1965,7 @@ msp430_elf_relax_section (bfd * abfd, as
 
       /* Get the opcode.  */
       opcode = bfd_get_16 (abfd, contents + irel->r_offset);
-	  
+
       /* Compute the new opcode.  We are going to convert:
 	 J<cond> label
 	 into:
@@ -1976,7 +1974,7 @@ msp430_elf_relax_section (bfd * abfd, as
 	 1:                     */
       switch (opcode & 0xfc00)
 	{
-	case 0x3800: opcode = 0x3402; break; /* Jl  -> Jge +2 */  
+	case 0x3800: opcode = 0x3402; break; /* Jl  -> Jge +2 */
 	case 0x3400: opcode = 0x3802; break; /* Jge -> Jl  +2 */
 	case 0x2c00: opcode = 0x2802; break; /* Jhs -> Jlo +2 */
 	case 0x2800: opcode = 0x2c02; break; /* Jlo -> Jhs +2 */
@@ -2007,7 +2005,7 @@ msp430_elf_relax_section (bfd * abfd, as
       /* Insert the new branch instruction.  */
       if (uses_msp430x_relocs (abfd))
 	{
-	  /* Insert an absolute branch (aka MOVA) instruction.  */	  
+	  /* Insert an absolute branch (aka MOVA) instruction.  */
 	  contents = msp430_elf_relax_add_two_words
 	    (abfd, sec, irel->r_offset + 2, 0x0080, 0x0000);
 
@@ -2114,7 +2112,7 @@ msp430_elf_relax_section (bfd * abfd, as
 
 	/* Try to turn a 16bit pc-relative branch into a 10bit pc-relative
 	   branch.  */
-	/* Paranoia? paranoia...  */      
+	/* Paranoia? paranoia...  */
 	if (! uses_msp430x_relocs (abfd)
 	    && ELF32_R_TYPE (irel->r_info) == (int) R_MSP430_RL_PCREL)
 	  {
@@ -2237,7 +2235,7 @@ msp430_elf_relax_section (bfd * abfd, as
 	    value -= (sec->output_section->vma + sec->output_offset);
 	    value -= irel->r_offset;
 	    value += irel->r_addend;
-	   
+
 	    /* See if the value will fit in 10 bits, note the high value is
 	       1016 as the target will be two bytes closer if we are
 	       able to relax.  */
@@ -2352,6 +2350,7 @@ static bfd_boolean
 elf32_msp430_obj_attrs_handle_unknown (bfd *abfd, int tag)
 {
   _bfd_error_handler
+    /* xgettext:c-format */
     (_("Warning: %B: Unknown MSPABI object attribute %d"),
      abfd, tag);
   return TRUE;
@@ -2410,8 +2409,9 @@ data_model (int model)
    Raise an error if there are conflicting attributes.  */
 
 static bfd_boolean
-elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
+elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   bfd_boolean result = TRUE;
@@ -2443,6 +2443,7 @@ elf32_msp430_merge_mspabi_attributes (bf
   if (in_attr[OFBA_MSPABI_Tag_ISA].i != out_attr[OFBA_MSPABI_Tag_ISA].i)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses %s instructions but %B uses %s"),
 	 ibfd, first_input_bfd,
 	 isa_type (in_attr[OFBA_MSPABI_Tag_ISA].i),
@@ -2455,6 +2456,7 @@ elf32_msp430_merge_mspabi_attributes (bf
       out_attr[OFBA_MSPABI_Tag_Code_Model].i)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses the %s code model whereas %B uses the %s code model"),
 	 ibfd, first_input_bfd,
 	 code_model (in_attr[OFBA_MSPABI_Tag_Code_Model].i),
@@ -2467,6 +2469,7 @@ elf32_msp430_merge_mspabi_attributes (bf
       && out_attr[OFBA_MSPABI_Tag_ISA].i != 2)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses the large code model but %B uses MSP430 instructions"),
 	 ibfd, first_input_bfd);
       result = FALSE;
@@ -2477,6 +2480,7 @@ elf32_msp430_merge_mspabi_attributes (bf
       out_attr[OFBA_MSPABI_Tag_Data_Model].i)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses the %s data model whereas %B uses the %s data model"),
 	 ibfd, first_input_bfd,
 	 data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
@@ -2489,6 +2493,7 @@ elf32_msp430_merge_mspabi_attributes (bf
       && out_attr[OFBA_MSPABI_Tag_Data_Model].i != 1)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses the small code model but %B uses the %s data model"),
 	 ibfd, first_input_bfd,
 	 data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
@@ -2500,12 +2505,13 @@ elf32_msp430_merge_mspabi_attributes (bf
       && out_attr[OFBA_MSPABI_Tag_ISA].i != 2)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B uses the %s data model but %B only uses MSP430 instructions"),
 	 ibfd, first_input_bfd,
 	 data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i));
       result = FALSE;
     }
-  
+
   return result;
 }
 
@@ -2513,8 +2519,9 @@ elf32_msp430_merge_mspabi_attributes (bf
    object file when linking.  */
 
 static bfd_boolean
-elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+elf32_msp430_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   /* Make sure that the machine number reflects the most
      advanced version of the MSP architecture required.  */
 #define max(a,b) ((a) > (b) ? (a) : (b))
@@ -2523,7 +2530,7 @@ elf32_msp430_merge_private_bfd_data (bfd
 			       max (bfd_get_mach (ibfd), bfd_get_mach (obfd)));
 #undef max
 
-  return elf32_msp430_merge_mspabi_attributes (ibfd, obfd);
+  return elf32_msp430_merge_mspabi_attributes (ibfd, info);
 }
 
 static bfd_boolean
@@ -2532,13 +2539,34 @@ msp430_elf_is_target_special_symbol (bfd
   return _bfd_elf_is_local_label_name (abfd, sym->name);
 }
 
+static bfd_boolean
+uses_large_model (bfd *abfd)
+{
+  obj_attribute * attr;
+
+  if (abfd->flags & BFD_LINKER_CREATED)
+    return FALSE;
+
+  attr = elf_known_obj_attributes_proc (abfd);
+  if (attr == NULL)
+    return FALSE;
+
+  return attr[OFBA_MSPABI_Tag_Code_Model].i == 2;
+}
+
+static unsigned int
+elf32_msp430_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+{
+  return uses_large_model (abfd) ? 4 : 2;
+}
+
 /* This is gross.  The MSP430 EABI says that (sec 11.5):
 
      "An implementation may choose to use Rel or Rela
       type relocations for other relocations."
 
    But it also says that:
-   
+
      "Certain relocations are identified as Rela only. [snip]
       Where Rela is specified, an implementation must honor
       this requirement."
@@ -2563,6 +2591,7 @@ msp430_elf_is_target_special_symbol (bfd
 #undef  elf_backend_obj_attrs_arg_type
 #define elf_backend_obj_attrs_arg_type		elf32_msp430_obj_attrs_arg_type
 #define bfd_elf32_bfd_merge_private_bfd_data	elf32_msp430_merge_private_bfd_data
+#define elf_backend_eh_frame_address_size	elf32_msp430_eh_frame_address_size
 
 #define ELF_ARCH		bfd_arch_msp430
 #define ELF_MACHINE_CODE	EM_MSP430
@@ -2595,7 +2624,7 @@ msp430_elf_is_target_special_symbol (bfd
 #undef  elf32_bed
 #define elf32_bed		elf32_msp430_ti_bed
 
-#undef	ELF_OSABI		
+#undef	ELF_OSABI
 #define	ELF_OSABI		ELFOSABI_NONE
 
 static const struct bfd_elf_special_section msp430_ti_elf_special_sections[] =
@@ -2607,4 +2636,7 @@ static const struct bfd_elf_special_sect
   { NULL, 0,                                0, 0,                      0 }
 };
 
+#undef  elf_backend_special_sections
+#define elf_backend_special_sections 		msp430_ti_elf_special_sections
+
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mt.c ./bfd/elf32-mt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-mt.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-mt.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Morpho Technologies MT specific support for 32-bit ELF
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -238,6 +238,7 @@ mt_info_to_howto_rela
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_MT_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid MT reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -362,7 +363,7 @@ mt_elf_relocate_section
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Finally, the sole MT-specific part.  */
@@ -385,13 +386,13 @@ mt_elf_relocate_section
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		 input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -409,11 +410,8 @@ mt_elf_relocate_section
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -436,7 +434,7 @@ mt_elf_check_relocs
   const Elf_Internal_Rela *     rel;
   const Elf_Internal_Rela *     rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -505,13 +503,14 @@ mt_elf_set_private_flags (bfd *    abfd,
    object file when linking.  */
 
 static bfd_boolean
-mt_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword     old_flags, new_flags;
   bfd_boolean  ok = TRUE;
 
   /* Check if we have the same endianness.  */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   /* If they're not both mt, then merging is meaningless, so just
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nds32.c ./bfd/elf32-nds32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nds32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-nds32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NDS32-specific support for 32-bit ELF.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Andes Technology Corporation.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -77,7 +77,8 @@ static bfd_boolean nds32_elf_relocate_se
 static bfd_boolean nds32_elf_object_p (bfd *);
 static void nds32_elf_final_write_processing (bfd *, bfd_boolean);
 static bfd_boolean nds32_elf_set_private_flags (bfd *, flagword);
-static bfd_boolean nds32_elf_merge_private_bfd_data (bfd *, bfd *);
+static bfd_boolean nds32_elf_merge_private_bfd_data
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean nds32_elf_print_private_bfd_data (bfd *, void *);
 static bfd_boolean nds32_elf_gc_sweep_hook
   (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
@@ -2300,7 +2301,7 @@ nds32_insertion_sort (void *base, size_t
 {
   char *ptr = (char *) base;
   int i, j;
-  char *tmp = alloca (size);
+  char *tmp = xmalloc (size);
 
   /* If i is less than j, i is inserted before j.
 
@@ -2324,6 +2325,7 @@ nds32_insertion_sort (void *base, size_t
       memmove (ptr + (j + 1) * size, ptr + j * size, (i - j) * size);
       memcpy (ptr + j * size, tmp, size);
     }
+  free (tmp);
 }
 
 /* Sort relocation by r_offset.
@@ -2968,6 +2970,7 @@ nds32_info_to_howto_rel (bfd *abfd ATTRI
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type > R_NDS32_GNU_VTENTRY)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid NDS32 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -3045,6 +3048,7 @@ nds32_elf_grok_psinfo (bfd *abfd, Elf_In
 	_bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
       elf_tdata (abfd)->core->command =
 	_bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+      break;
 
     default:
       return FALSE;
@@ -3302,7 +3306,7 @@ nds32_elf_final_sda_base (bfd *output_bf
 	}
       else
 	{
-	  (*_bfd_error_handler) (_("error: Can't find symbol: _SDA_BASE_."));
+	  _bfd_error_handler (_("error: Can't find symbol: _SDA_BASE_."));
 	  return bfd_reloc_dangerous;
 	}
     }
@@ -3376,50 +3380,9 @@ nds32_elf_link_hash_table_create (bfd *a
       return NULL;
     }
 
-  ret->sgot = NULL;
-  ret->sgotplt = NULL;
-  ret->srelgot = NULL;
-  ret->splt = NULL;
-  ret->srelplt = NULL;
-  ret->sdynbss = NULL;
-  ret->srelbss = NULL;
-  ret->sym_ld_script = NULL;
-  ret->ex9_export_file = NULL;
-  ret->ex9_import_file = NULL;
-
   return &ret->root.root;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_nds32_link_hash_table *htab;
-
-  if (!_bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab = nds32_elf_hash_table (info);
-  htab->sgot = bfd_get_section_by_name (dynobj, ".got");
-  htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
-  if (!htab->sgot || !htab->sgotplt)
-    abort ();
-
-  /* _bfd_elf_create_got_section will create it for us.  */
-  htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-  if (htab->srelgot == NULL
-      || !bfd_set_section_flags (dynobj, htab->srelgot,
-				 (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				  | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				  | SEC_READONLY))
-      || !bfd_set_section_alignment (dynobj, htab->srelgot, 2))
-    return FALSE;
-
-  return TRUE;
-}
-
 /* Create dynamic sections when linking against a dynamic object.  */
 
 static bfd_boolean
@@ -3449,7 +3412,7 @@ nds32_elf_create_dynamic_sections (bfd *
     pltflags |= SEC_READONLY;
 
   s = bfd_make_section (abfd, ".plt");
-  htab->splt = s;
+  htab->root.splt = s;
   if (s == NULL
       || !bfd_set_section_flags (abfd, s, pltflags)
       || !bfd_set_section_alignment (abfd, s, bed->plt_alignment))
@@ -3472,19 +3435,19 @@ nds32_elf_create_dynamic_sections (bfd *
       h->def_regular = 1;
       h->type = STT_OBJECT;
 
-      if (info->shared && !bfd_elf_link_record_dynamic_symbol (info, h))
+      if (bfd_link_pic (info) && !bfd_elf_link_record_dynamic_symbol (info, h))
 	return FALSE;
     }
 
   s = bfd_make_section (abfd,
 			bed->default_use_rela_p ? ".rela.plt" : ".rel.plt");
-  htab->srelplt = s;
+  htab->root.srelplt = s;
   if (s == NULL
       || !bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
       || !bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (htab->sgot == NULL && !create_got_section (abfd, info))
+  if (htab->root.sgot == NULL && !_bfd_elf_create_got_section (abfd, info))
     return FALSE;
 
   {
@@ -3537,7 +3500,7 @@ nds32_elf_create_dynamic_sections (bfd *
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  s = bfd_make_section (abfd, (bed->default_use_rela_p
 				       ? ".rela.bss" : ".rel.bss"));
@@ -3632,7 +3595,7 @@ nds32_elf_adjust_dynamic_symbol (struct 
      when we know the address of the .got section.  */
   if (h->type == STT_FUNC || h->needs_plt)
     {
-      if (!info->shared
+      if (!bfd_link_pic (info)
 	  && !h->def_dynamic
 	  && !h->ref_dynamic
 	  && h->root.type != bfd_link_hash_undefweak
@@ -3671,7 +3634,7 @@ nds32_elf_adjust_dynamic_symbol (struct 
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -3790,9 +3753,9 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
 	{
-	  asection *s = htab->splt;
+	  asection *s = htab->root.splt;
 
 	  /* If this is the first .plt entry, make room for the special
 	     first entry.  */
@@ -3806,7 +3769,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (!info->shared && !h->def_regular)
+	  if (!bfd_link_pic (info) && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
 	      h->root.u.def.value = h->plt.offset;
@@ -3817,10 +3780,10 @@ allocate_dynrelocs (struct elf_link_hash
 
 	  /* We also need to make an entry in the .got.plt section, which
 	     will be placed in the .got section by the linker script.  */
-	  htab->sgotplt->size += 4;
+	  htab->root.sgotplt->size += 4;
 
 	  /* We also need to make an entry in the .rel.plt section.  */
-	  htab->srelplt->size += sizeof (Elf32_External_Rela);
+	  htab->root.srelplt->size += sizeof (Elf32_External_Rela);
 	}
       else
 	{
@@ -3848,7 +3811,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      s = htab->sgot;
+      s = htab->root.sgot;
       h->got.offset = s->size;
 
       if (tls_type == GOT_UNKNOWN)
@@ -3859,8 +3822,8 @@ allocate_dynrelocs (struct elf_link_hash
 	s->size += 4;
 
       dyn = htab->root.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
-	htab->srelgot->size += sizeof (Elf32_External_Rela);
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
+	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     h->got.offset = (bfd_vma) - 1;
@@ -3874,7 +3837,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->def_regular && (h->forced_local || info->symbolic))
 	{
@@ -3980,7 +3943,7 @@ nds32_elf_size_dynamic_sections (bfd *ou
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (!bfd_link_pic (info) && !info->nointerp)
 	{
 	  s = bfd_get_section_by_name (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -4035,15 +3998,15 @@ nds32_elf_size_dynamic_sections (bfd *ou
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
       for (; local_got < end_local_got; ++local_got)
 	{
 	  if (*local_got > 0)
 	    {
 	      *local_got = s->size;
 	      s->size += 4;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		srel->size += sizeof (Elf32_External_Rela);
 	    }
 	  else
@@ -4063,22 +4026,22 @@ nds32_elf_size_dynamic_sections (bfd *ou
       if ((s->flags & SEC_LINKER_CREATED) == 0)
 	continue;
 
-      if (s == htab->splt)
+      if (s == htab->root.splt)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
 	}
-      else if (s == htab->sgot)
+      else if (s == htab->root.sgot)
 	{
 	  got_size += s->size;
 	}
-      else if (s == htab->sgotplt)
+      else if (s == htab->root.sgotplt)
 	{
 	  got_size += s->size;
 	}
       else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
 	{
-	  if (s->size != 0 && s != htab->srelplt)
+	  if (s->size != 0 && s != htab->root.srelplt)
 	    relocs = TRUE;
 
 	  /* We use the reloc_count field as a counter if we need
@@ -4127,13 +4090,13 @@ nds32_elf_size_dynamic_sections (bfd *ou
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->splt->size != 0)
+      if (htab->root.splt->size != 0)
 	{
 	  if (!add_dynamic_entry (DT_PLTGOT, 0)
 	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -4495,8 +4458,8 @@ nds32_elf_relocate_section (bfd *       
   dynobj = htab->root.dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
 
-  sgot = htab->sgot;
-  splt = htab->splt;
+  sgot = htab->root.sgot;
+  splt = htab->root.splt;
   sreloc = NULL;
 
   rel = relocs;
@@ -4505,7 +4468,7 @@ nds32_elf_relocate_section (bfd *       
   table = nds32_elf_hash_table (info);
   eliminate_gc_relocs = table->eliminate_gc_relocs;
   /* By this time, we can adjust the value of _SDA_BASE_.  */
-  if ((!info->relocatable))
+  if ((!bfd_link_relocatable (info)))
     {
       is_SDA_BASE_set = 1;
       r = nds32_elf_final_sda_base (output_bfd, info, &gp, TRUE);
@@ -4518,15 +4481,15 @@ nds32_elf_relocate_section (bfd *       
       /* Set the _ITB_BASE_.  */
       if (!nds32_elf_ex9_itb_base (info))
 	{
-	  (*_bfd_error_handler) (_("%B: error: Cannot set _ITB_BASE_"),
-				 output_bfd);
+	  _bfd_error_handler (_("%B: error: Cannot set _ITB_BASE_"),
+			      output_bfd);
 	  bfd_set_error (bfd_error_bad_value);
 	}
     }
 
   if (table->target_optimize & NDS32_RELAX_JUMP_IFC_ON)
     if (!nds32_elf_ifc_reloc ())
-      (*_bfd_error_handler) (_("error: IFC relocation error."));
+      _bfd_error_handler (_("error: IFC relocation error."));
 
  /* Relocation for .ex9.itable.  */
   if (table->target_optimize & NDS32_RELAX_EX9_ON
@@ -4559,8 +4522,9 @@ nds32_elf_relocate_section (bfd *       
       r_type = ELF32_R_TYPE (rel->r_info);
       if (r_type >= R_NDS32_max)
 	{
-	  (*_bfd_error_handler) (_("%B: error: unknown relocation type %d."),
-				 input_bfd, r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: error: unknown relocation type %d."),
+			      input_bfd, r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
 	  continue;
@@ -4597,7 +4561,7 @@ nds32_elf_relocate_section (bfd *       
 
       if (((r_type >= R_NDS32_DWARF2_OP1_RELA
 	    && r_type <= R_NDS32_DWARF2_LEB_RELA)
-	   || r_type >= R_NDS32_RELAX_ENTRY) && !info->relocatable)
+	   || r_type >= R_NDS32_RELAX_ENTRY) && !bfd_link_relocatable (info))
 	continue;
 
       howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type);
@@ -4645,7 +4609,7 @@ nds32_elf_relocate_section (bfd *       
 
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
 	     anything, unless the reloc is against a section symbol,
@@ -4805,8 +4769,10 @@ nds32_elf_relocate_section (bfd *       
 	      off = h->got.offset;
 	      BFD_ASSERT (off != (bfd_vma) - 1);
 	      dyn = htab->root.dynamic_sections_created;
-	      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						    bfd_link_pic (info),
+						    h)
+		  || (bfd_link_pic (info)
 		      && (info->symbolic
 			  || h->dynindx == -1
 			  || h->forced_local) && h->def_regular))
@@ -4853,14 +4819,14 @@ nds32_elf_relocate_section (bfd *       
 		{
 		  bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *srelgot;
 		      Elf_Internal_Rela outrel;
 
 		      /* We need to generate a R_NDS32_RELATIVE reloc
 			 for the dynamic linker.  */
-		      srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+		      srelgot = htab->root.srelgot;
 		      BFD_ASSERT (srelgot != NULL);
 
 		      outrel.r_offset = (elf_gp (output_bfd)
@@ -4899,7 +4865,7 @@ nds32_elf_relocate_section (bfd *       
 	case R_NDS32_LO12S1_RELA:
 	case R_NDS32_LO12S0_RELA:
 	case R_NDS32_LO12S0_ORI_RELA:
-	  if (info->shared && r_symndx != 0
+	  if (bfd_link_pic (info) && r_symndx != 0
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && (eliminate_gc_relocs == 0
 		  || (sec && (sec->flags & SEC_EXCLUDE) == 0))
@@ -5000,9 +4966,9 @@ nds32_elf_relocate_section (bfd *       
 	  break;
 
 	case R_NDS32_25_ABS_RELA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared "
 		   "mode."), bfd_get_filename (input_bfd));
 	      return FALSE;
@@ -5060,11 +5026,12 @@ nds32_elf_relocate_section (bfd *       
 
 		  dyn = htab->root.dynamic_sections_created;
 		  if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL
-		      (dyn, info->shared, h) || (info->shared
-						 && (info->symbolic
-						     || h->dynindx == -1
-						     || h->forced_local)
-						 && h->def_regular))
+		      (dyn, bfd_link_pic (info), h)
+		      || (bfd_link_pic (info)
+			  && (info->symbolic
+			      || h->dynindx == -1
+			      || h->forced_local)
+			  && h->def_regular))
 		    {
 		      /* This is actually a static link, or it is a
 			 -Bsymbolic link and the symbol is defined
@@ -5106,14 +5073,14 @@ nds32_elf_relocate_section (bfd *       
 		    {
 		      bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-		      if (info->shared)
+		      if (bfd_link_pic (info))
 			{
 			  asection *srelgot;
 			  Elf_Internal_Rela outrel;
 
 			  /* We need to generate a R_NDS32_RELATIVE reloc
 			     for the dynamic linker.  */
-			  srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+			  srelgot = htab->root.srelgot;
 			  BFD_ASSERT (srelgot != NULL);
 
 			  outrel.r_offset = (elf_gp (output_bfd)
@@ -5135,7 +5102,7 @@ nds32_elf_relocate_section (bfd *       
 	  if (relocation & align)
 	    {
 	      /* Incorrect alignment.  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: warning: unaligned access to GOT entry."), input_bfd);
 	      ret = FALSE;
 	      r = bfd_reloc_dangerous;
@@ -5177,7 +5144,7 @@ handle_sda:
 	      r = nds32_elf_final_sda_base (output_bfd, info, &gp, FALSE);
 	      if (r != bfd_reloc_ok)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("%B: warning: relocate SDA_BASE failed."), input_bfd);
 		  ret = FALSE;
 		  goto check_reloc;
@@ -5198,7 +5165,8 @@ handle_sda:
 	      if (relocation & align)
 		{
 		  /* Incorrect alignment.  */
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A): warning: unaligned small data access of type %d."),
 		     input_bfd, input_section, r_type);
 		  ret = FALSE;
@@ -5242,8 +5210,8 @@ handle_sda:
 		BFD_ASSERT (off != (bfd_vma) - 1);
 		dyn = htab->root.dynamic_sections_created;
 		tls_type = ((struct elf_nds32_link_hash_entry *) h)->tls_type;
-		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		    && (!info->shared
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+		    && (!bfd_link_pic (info)
 			|| !SYMBOL_REFERENCES_LOCAL (info, h)))
 		  indx = h->dynindx;
 	      }
@@ -5270,8 +5238,8 @@ handle_sda:
 	    else
 	      {
 		bfd_boolean need_relocs = FALSE;
-		srelgot = htab->srelgot;
-		if ((info->shared || indx != 0)
+		srelgot = htab->root.srelgot;
+		if ((bfd_link_pic (info) || indx != 0)
 		    && (h == NULL
 			|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 			|| h->root.type != bfd_link_hash_undefweak))
@@ -5420,16 +5388,14 @@ check_reloc:
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, (h ? &h->root : NULL), name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section, offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section, offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -5448,10 +5414,9 @@ check_reloc:
 	      errmsg = _("internal error: unknown error");
 	      /* Fall through.  */
 
-common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, errmsg, name, input_bfd, input_section, offset)))
-		return FALSE;
+	    common_error:
+	      (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+					   input_section, offset);
 	      break;
 	    }
 	}
@@ -5488,9 +5453,9 @@ nds32_elf_finish_dynamic_symbol (bfd *ou
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      sgot = htab->sgotplt;
-      srela = htab->srelplt;
+      splt = htab->root.splt;
+      sgot = htab->root.sgotplt;
+      srela = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -5505,7 +5470,7 @@ nds32_elf_finish_dynamic_symbol (bfd *ou
       got_offset = (plt_index + 3) * 4;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  unsigned long insn;
 
@@ -5597,8 +5562,8 @@ nds32_elf_finish_dynamic_symbol (bfd *ou
       /* This symbol has an entry in the global offset table.
 	 Set it up.  */
 
-      sgot = htab->sgot;
-      srela = htab->srelgot;
+      sgot = htab->root.sgot;
+      srela = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -5609,7 +5574,7 @@ nds32_elf_finish_dynamic_symbol (bfd *ou
 	 the symbol was forced to be local because of a version file.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic
 	      || h->dynindx == -1 || h->forced_local) && h->def_regular)
 	{
@@ -5680,7 +5645,7 @@ nds32_elf_finish_dynamic_sections (bfd *
   htab = nds32_elf_hash_table (info);
   dynobj = htab->root.dynobj;
 
-  sgot = htab->sgotplt;
+  sgot = htab->root.sgotplt;
   sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
@@ -5706,49 +5671,28 @@ nds32_elf_finish_dynamic_sections (bfd *
 	      break;
 
 	    case DT_PLTGOT:
-	      /* name = ".got"; */
-	      s = htab->sgot->output_section;
+	      s = htab->root.sgotplt;
 	      goto get_vma;
 	    case DT_JMPREL:
-	      s = htab->srelplt->output_section;
+	      s = htab->root.srelplt;
 	    get_vma:
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->srelplt->output_section;
-	      BFD_ASSERT (s != NULL);
+	      s = htab->root.srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* My reading of the SVR4 ABI indicates that the
-		 procedure linkage table relocs (DT_JMPREL) should be
-		 included in the overall relocs (DT_RELA).  This is
-		 what Solaris does.  However, UnixWare can not handle
-		 that case.  Therefore, we override the DT_RELASZ entry
-		 here to make it not include the JMPREL relocs.  Since
-		 the linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      if (htab->srelplt != NULL)
-		{
-		  s = htab->srelplt->output_section;
-		  dyn.d_un.d_val -= s->size;
-		}
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->root.splt;
       if (splt && splt->size > 0)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      unsigned long insn;
 	      long offset;
@@ -5969,11 +5913,13 @@ nds32_check_vec_size (bfd *ibfd)
 	nds32_vec_size = (flag_t & 0x3);
       else if (nds32_vec_size != (flag_t & 0x3))
 	{
-	  (*_bfd_error_handler) (_("%B: ISR vector size mismatch"
-				   " with previous modules, previous %u-byte, current %u-byte"),
-				 ibfd,
-				 nds32_vec_size == 1 ? 4 : nds32_vec_size == 2 ? 16 : 0xffffffff,
-				 (flag_t & 0x3) == 1 ? 4 : (flag_t & 0x3) == 2 ? 16 : 0xffffffff);
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: ISR vector size mismatch"
+	       " with previous modules, previous %u-byte, current %u-byte"),
+	     ibfd,
+	     nds32_vec_size == 1 ? 4 : nds32_vec_size == 2 ? 16 : 0xffffffff,
+	     (flag_t & 0x3) == 1 ? 4 : (flag_t & 0x3) == 2 ? 16 : 0xffffffff);
 	  return FALSE;
 	}
       else
@@ -5988,8 +5934,9 @@ nds32_check_vec_size (bfd *ibfd)
    object file when linking.  */
 
 static bfd_boolean
-nds32_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   flagword out_16regs;
@@ -6011,7 +5958,7 @@ nds32_elf_merge_private_bfd_data (bfd *i
 
   if (bfd_little_endian (ibfd) != bfd_little_endian (obfd))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: warning: Endian mismatch with previous modules."), ibfd);
 
       bfd_set_error (bfd_error_bad_value);
@@ -6021,7 +5968,7 @@ nds32_elf_merge_private_bfd_data (bfd *i
   in_version = elf_elfheader (ibfd)->e_flags & EF_NDS32_ELF_VERSION;
   if (in_version == E_NDS32_ELF_VER_1_2)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: warning: Older version of object file encountered, "
 	   "Please recompile with current tool chain."), ibfd);
     }
@@ -6099,7 +6046,7 @@ nds32_elf_merge_private_bfd_data (bfd *i
   /* Check flag compatibility.  */
   if ((in_flags & EF_NDS_ABI) != (out_flags & EF_NDS_ABI))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: error: ABI mismatch with previous modules."), ibfd);
 
       bfd_set_error (bfd_error_bad_value);
@@ -6110,7 +6057,7 @@ nds32_elf_merge_private_bfd_data (bfd *i
     {
       if (((in_flags & EF_NDS_ARCH) != E_N1_ARCH))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: error: Instruction set mismatch with previous modules."), ibfd);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -6135,9 +6082,11 @@ nds32_elf_merge_private_bfd_data (bfd *i
   else
     {
       if (in_version != out_version)
-	(*_bfd_error_handler) (_("%B: warning: Incompatible elf-versions %s and  %s."),
-				 ibfd, nds32_elfver_strtab[out_version],
-				 nds32_elfver_strtab[in_version]);
+	_bfd_error_handler
+	  /* xgettext:c-format */
+	  (_("%B: warning: Incompatible elf-versions %s and  %s."),
+	   ibfd, nds32_elfver_strtab[out_version],
+	   nds32_elfver_strtab[in_version]);
 
       elf_elfheader (obfd)->e_flags = in_flags | out_flags
 	| (in_16regs & out_16regs) | (in_no_mac & out_no_mac)
@@ -6299,7 +6248,7 @@ nds32_elf_gc_sweep_hook (bfd *abfd, stru
 	      struct elf_nds32_dyn_relocs **pp;
 	      struct elf_nds32_dyn_relocs *p;
 
-	      if (!info->shared && h->plt.refcount > 0)
+	      if (!bfd_link_pic (info) && h->plt.refcount > 0)
 		h->plt.refcount -= 1;
 
 	      eh = (struct elf_nds32_link_hash_entry *) h;
@@ -6352,7 +6301,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
   bfd *dynobj;
   asection *sreloc = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -6388,7 +6337,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
       /* Some relocs require a global offset table.  We create
 	 got section here, since these relocation need got section
 	 and it is not created yet.  */
-      if (htab->sgot == NULL)
+      if (htab->root.sgot == NULL)
 	{
 	  switch (r_type)
 	    {
@@ -6411,7 +6360,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
 	    case R_NDS32_TLS_IE_LO12S2:
 	      if (dynobj == NULL)
 		htab->root.dynobj = dynobj = abfd;
-	      if (!create_got_section (dynobj, info))
+	      if (!_bfd_elf_create_got_section (dynobj, info))
 		return FALSE;
 	      break;
 
@@ -6537,7 +6486,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
 	case R_NDS32_17_PCREL_RELA:
 	case R_NDS32_25_PCREL_RELA:
 
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      h->non_got_ref = 1;
 	      h->plt.refcount += 1;
@@ -6559,7 +6508,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
 	     If on the other hand, we are creating an executable, we may need
 	     to keep relocations for symbols satisfied by a dynamic library
 	     if we manage to avoid copy relocs for the symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && ((r_type != R_NDS32_25_PCREL_RELA
 		    && r_type != R_NDS32_15_PCREL_RELA
@@ -6570,7 +6519,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
 		       && (!info->symbolic
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -6626,6 +6575,7 @@ nds32_elf_check_relocs (bfd *abfd, struc
 	      else
 		{
 		  asection *s;
+		  void *vpp;
 
 		  Elf_Internal_Sym *isym;
 		  isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx);
@@ -6637,8 +6587,8 @@ nds32_elf_check_relocs (bfd *abfd, struc
 		  if (s == NULL)
 		    return FALSE;
 
-		  head = ((struct elf_nds32_dyn_relocs **)
-			&elf_section_data (s)->local_dynrel);
+		  vpp = &elf_section_data (s)->local_dynrel;
+		  head = (struct elf_nds32_dyn_relocs **) vpp;
 		}
 
 	      p = *head;
@@ -6816,7 +6766,7 @@ calculate_plt_memory_address (bfd *abfd,
       h = elf_sym_hashes (abfd)[indx];
       BFD_ASSERT (h != NULL);
       htab = nds32_elf_hash_table (link_info);
-      splt = htab->splt;
+      splt = htab->root.splt;
 
       while (h->root.type == bfd_link_hash_indirect
 	     || h->root.type == bfd_link_hash_warning)
@@ -6865,7 +6815,7 @@ nds32_convert_32_to_16_alu1 (bfd *abfd, 
 			     int *pinsn_type)
 {
   uint16_t insn16 = 0;
-  int insn_type;
+  int insn_type = 0;
   unsigned long mach = bfd_get_mach (abfd);
 
   if (N32_SH5 (insn) != 0)
@@ -8092,15 +8042,17 @@ calculate_got_memory_address (bfd *abfd,
   if (symndx >= 0)
     {
       BFD_ASSERT (h != NULL);
-      return htab->sgot->output_section->vma + htab->sgot->output_offset
-	     + h->got.offset;
+      return (htab->root.sgot->output_section->vma
+	      + htab->root.sgot->output_offset
+	      + h->got.offset);
     }
   else
     {
       local_got_offsets = elf_local_got_offsets (abfd);
       BFD_ASSERT (local_got_offsets != NULL);
-      return htab->sgot->output_section->vma + htab->sgot->output_offset
-	     + local_got_offsets[ELF32_R_SYM (irel->r_info)];
+      return (htab->root.sgot->output_section->vma
+	      + htab->root.sgot->output_offset
+	      + local_got_offsets[ELF32_R_SYM (irel->r_info)]);
     }
 
   /* The _GLOBAL_OFFSET_TABLE_ may be undefweak(or should be?).  */
@@ -8328,7 +8280,7 @@ static Elf_Internal_Rela *
 find_relocs_at_address_addr (Elf_Internal_Rela *reloc,
 			     Elf_Internal_Rela *relocs,
 			     Elf_Internal_Rela *irelend,
-			     unsigned char reloc_type,
+			     enum elf_nds32_reloc_type reloc_type,
 			     bfd_vma offset_p)
 {
   Elf_Internal_Rela *rel_t = NULL;
@@ -8679,7 +8631,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd
 	      unsigned long val = 0;
 	      unsigned long mask;
 	      long before, between;
-	      long offset;
+	      long offset = 0;
 
 	      switch (ELF32_R_TYPE (irel->r_info))
 		{
@@ -8744,8 +8696,8 @@ nds32_elf_relax_delete_blanks (bfd *abfd
 	      unsigned long before, between;
 	      bfd_byte *endp, *p;
 
-	      val = read_unsigned_leb128 (abfd, contents + irel->r_offset,
-					  &len);
+	      val = _bfd_read_unsigned_leb128 (abfd, contents + irel->r_offset,
+					       &len);
 
 	      before = get_nds32_elf_blank_total (&blank_t, irel->r_addend, 0);
 	      between = get_nds32_elf_blank_total (&blank_t,
@@ -8774,9 +8726,8 @@ done_adjust_diff:
 	      if (blank_t2 && blank_t2->next
 		  && (blank_t2->offset > raddr
 		      || blank_t2->next->offset <= raddr))
-		(*_bfd_error_handler)
-		  (_("%B: %s\n"), abfd,
-		   "Error: search_nds32_elf_blank reports wrong node");
+		_bfd_error_handler
+		  (_("%B: Error: search_nds32_elf_blank reports wrong node\n"), abfd);
 
 	      /* Mark reloc in deleted portion as NONE.
 		 For some relocs like R_NDS32_LABEL that doesn't modify the
@@ -9033,6 +8984,10 @@ relax_range_measurement (bfd *abfd)
 #define IS_OPTIMIZE(addend)     ((addend) & 0x40000000)
 #define IS_16BIT_ON(addend)     ((addend) & 0x20000000)
 
+static const char * unrecognized_reloc_msg =
+  /* xgettext:c-format */
+  N_("%B: warning: %s points to unrecognized reloc at 0x%lx.");
+
 /* Relax LONGCALL1 relocation for nds32_elf_relax_section.  */
 
 static bfd_boolean
@@ -9083,9 +9038,8 @@ nds32_elf_relax_longcall1 (bfd *abfd, as
 
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL1 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL1",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9165,9 +9119,8 @@ nds32_elf_relax_longcall2 (bfd *abfd, as
 
   if (i1_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL2 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL2",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9272,9 +9225,8 @@ nds32_elf_relax_longcall3 (bfd *abfd, as
 
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL3 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL3",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9407,9 +9359,8 @@ nds32_elf_relax_longjump1 (bfd *abfd, as
 				 R_NDS32_LO12S0_ORI_RELA, laddr + 4);
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP1 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP1",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9614,9 +9565,8 @@ nds32_elf_relax_longjump2 (bfd *abfd, as
 
   if (i2_irelfn == irelend || cond_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP2 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP2",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9807,9 +9757,8 @@ nds32_elf_relax_longjump3 (bfd *abfd, as
 
   if (hi_irelfn == irelend || lo_irelfn == irelend || cond_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP3 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP3",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -9988,9 +9937,8 @@ nds32_elf_relax_longcall4 (bfd *abfd, as
 
   if (hi_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL4 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10019,9 +9967,8 @@ nds32_elf_relax_longcall4 (bfd *abfd, as
 
   if (ptr_irel == irelend || em_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL4 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
+			  (long) irel->r_offset);
       return FALSE;
     }
   /* Check these is enough space to insert jal in R_NDS32_EMPTY.  */
@@ -10091,9 +10038,8 @@ nds32_elf_relax_longcall5 (bfd *abfd, as
 				 R_NDS32_25_PCREL_RELA, irel->r_addend);
   if (cond_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL5 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL5",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10170,9 +10116,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, as
 
   if (em_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGCALL6 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10209,9 +10154,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, as
 				     R_NDS32_PTR_RESOLVED, irel->r_addend);
       if (cond_irel == irelend)
 	{
-	  (*_bfd_error_handler)
-	    ("%B: warning: R_NDS32_LONGCALL6 points to unrecognized"
-	     "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+	  _bfd_error_handler (unrecognized_reloc_msg, abfd,
+			      "R_NDS32_LONGCALL6", (long) irel->r_offset);
 	  return FALSE;
 	}
       cond_irel->r_addend = 1;
@@ -10259,9 +10203,8 @@ nds32_elf_relax_longcall6 (bfd *abfd, as
 				     R_NDS32_PTR_RESOLVED, irel->r_addend);
       if (cond_irel == irelend)
 	{
-	  (*_bfd_error_handler)
-	    ("%B: warning: R_NDS32_LONGCALL6 points to unrecognized"
-	     "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+	  _bfd_error_handler (unrecognized_reloc_msg, abfd,
+			      "R_NDS32_LONGCALL6", (long) irel->r_offset);
 	  return FALSE;
 	}
       cond_irel->r_addend = 1;
@@ -10310,9 +10253,8 @@ nds32_elf_relax_longjump4 (bfd *abfd, as
 
   if (hi_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP4 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10333,9 +10275,8 @@ nds32_elf_relax_longjump4 (bfd *abfd, as
 
   if (ptr_irel == irelend || em_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP4 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10408,9 +10349,8 @@ nds32_elf_relax_longjump5 (bfd *abfd, as
 				 R_NDS32_25_PCREL_RELA, irel->r_addend);
   if (cond_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP5 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP5",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10538,9 +10478,8 @@ nds32_elf_relax_longjump6 (bfd *abfd, as
 
   if (em_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP6 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP6",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10709,9 +10648,8 @@ nds32_elf_relax_longjump7 (bfd *abfd, as
 				 R_NDS32_15_PCREL_RELA, irel->r_addend);
   if (cond_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LONGJUMP7 points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP7",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -10784,7 +10722,8 @@ nds32_elf_relax_loadstore (struct bfd_li
 			   bfd_byte *contents, Elf_Internal_Sym *isymbuf,
 			   Elf_Internal_Shdr *symtab_hdr, int load_store_relax)
 {
-  int eliminate_sethi = 0, range_type, i;
+  int eliminate_sethi = 0, range_type;
+  unsigned int i;
   bfd_vma local_sda, laddr;
   int seq_len;	/* Original length of instruction sequence.  */
   uint32_t insn;
@@ -10804,7 +10743,7 @@ nds32_elf_relax_loadstore (struct bfd_li
   *insn_len = seq_len;
 
   /* Get the high part relocation.  */
-  for (i = 0; (unsigned) i < sizeof (checked_types); i++)
+  for (i = 0; i < ARRAY_SIZE (checked_types); i++)
     {
       hi_irelfn = find_relocs_at_address_addr (irel, internal_relocs, irelend,
 					       checked_types[i], laddr);
@@ -10814,9 +10753,8 @@ nds32_elf_relax_loadstore (struct bfd_li
 
   if (hi_irelfn == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_LOADSTORE points to unrecognized"
-	 "reloc at 0x%lx.", abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LOADSTORE",
+			  (long) irel->r_offset);
 	return FALSE;
     }
 
@@ -11227,6 +11165,7 @@ nds32_elf_relax_letlsls (struct bfd_link
 	  success = 1;
 	  break;
 	}
+      /* Fall through.  */
     case (N32_OP6_MEM << 8) | N32_MEM_LH:
     case (N32_OP6_MEM << 8) | N32_MEM_SH:
     case (N32_OP6_MEM << 8) | N32_MEM_LHS:
@@ -11241,6 +11180,7 @@ nds32_elf_relax_letlsls (struct bfd_link
 	  success = 1;
 	  break;
 	}
+      /* Fall through.  */
     case (N32_OP6_MEM << 8) | N32_MEM_LW:
     case (N32_OP6_MEM << 8) | N32_MEM_SW:
       /* The range is +/-64k.  */
@@ -11254,6 +11194,7 @@ nds32_elf_relax_letlsls (struct bfd_link
 	  success = 1;
 	  break;
 	}
+      /* Fall through.  */
     default:
       break;
     }
@@ -11286,9 +11227,8 @@ nds32_elf_relax_ptr (bfd *abfd, asection
 
   if (re_irel == irelend)
     {
-      (*_bfd_error_handler)
-	("%B: warning: R_NDS32_PTR points to unrecognized reloc at 0x%lx.",
-	 abfd, (long) irel->r_offset);
+      _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_PTR",
+			  (long) irel->r_offset);
       return FALSE;
     }
 
@@ -11907,7 +11847,7 @@ nds32_elf_pick_relax (bfd_boolean init, 
 	  break;
 	case NDS32_RELAX_JUMP_IFC_ROUND:
 	  if (!nds32_elf_ifc_finish (link_info))
-	    (*_bfd_error_handler) (_("error: Jump IFC Fail."));
+	    _bfd_error_handler (_("error: Jump IFC Fail."));
 	  if (table->target_optimize & NDS32_RELAX_EX9_ON)
 	    {
 	      pass++;
@@ -11924,7 +11864,7 @@ nds32_elf_pick_relax (bfd_boolean init, 
 	    {
 	      /* Do jump IFC optimization again.  */
 	      if (!nds32_elf_ifc_finish (link_info))
-		(*_bfd_error_handler) (_("error: Jump IFC Fail."));
+		_bfd_error_handler (_("error: Jump IFC Fail."));
 	    }
 	  break;
 	default:
@@ -11967,7 +11907,7 @@ nds32_elf_relax_section (bfd *abfd, asec
    * non-code section or
    * empty content or
    * no reloc entry.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || (sec->flags & SEC_EXCLUDE) == 1
       || (sec->flags & SEC_CODE) == 0
@@ -12035,7 +11975,7 @@ nds32_elf_relax_section (bfd *abfd, asec
       /* Set the _ITB_BASE_.  */
       if (!nds32_elf_ex9_itb_base (link_info))
 	{
-	  (*_bfd_error_handler) (_("%B: error: Cannot set _ITB_BASE_"), abfd);
+	  _bfd_error_handler (_("%B: error: Cannot set _ITB_BASE_"), abfd);
 	  bfd_set_error (bfd_error_bad_value);
 	}
     }
@@ -12340,8 +12280,8 @@ nds32_elf_relax_section (bfd *abfd, asec
       Elf_Internal_Rela *tmp_rel;
 
       /* Pad to alignment boundary.  Only handle current section alignment.  */
-      sec_size_align = (sec->size + (~((-1) << sec->alignment_power)))
-		       & ((-1) << sec->alignment_power);
+      sec_size_align = (sec->size + (~((-1U) << sec->alignment_power)))
+		       & ((-1U) << sec->alignment_power);
       if ((sec_size_align - sec->size) & 0x2)
 	{
 	  insn16 = NDS32_NOP16;
@@ -12780,7 +12720,8 @@ nds32_relax_fp_as_gp (struct bfd_link_in
 	{
 	  /* Begin of the region.  */
 	  if (begin_rel)
-	    (*_bfd_error_handler) (_("%B: Nested OMIT_FP in %A."), abfd, sec);
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("%B: Nested OMIT_FP in %A."), abfd, sec);
 
 	  begin_rel = irel;
 	  nds32_fag_init (&fag_head);
@@ -12798,7 +12739,8 @@ nds32_relax_fp_as_gp (struct bfd_link_in
 
 	  if (begin_rel == NULL)
 	    {
-	      (*_bfd_error_handler) (_("%B: Unmatched OMIT_FP in %A."), abfd, sec);
+	      /* xgettext:c-format */
+	      _bfd_error_handler (_("%B: Unmatched OMIT_FP in %A."), abfd, sec);
 	      continue;
 	    }
 
@@ -13057,25 +12999,22 @@ nds32_elf_get_relocated_section_contents
 	      switch (r)
 		{
 		case bfd_reloc_undefined:
-		  if (!((*link_info->callbacks->undefined_symbol)
-			(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 input_bfd, input_section, (*parent)->address, TRUE)))
-		    goto error_return;
+		  (*link_info->callbacks->undefined_symbol)
+		    (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     input_bfd, input_section, (*parent)->address, TRUE);
 		  break;
 		case bfd_reloc_dangerous:
 		  BFD_ASSERT (error_message != NULL);
-		  if (!((*link_info->callbacks->reloc_dangerous)
-			(link_info, error_message, input_bfd, input_section,
-			 (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_dangerous)
+		    (link_info, error_message,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_overflow:
-		  if (!((*link_info->callbacks->reloc_overflow)
-			(link_info, NULL,
-			 bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 (*parent)->howto->name, (*parent)->addend,
-			 input_bfd, input_section, (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_overflow)
+		    (link_info, NULL,
+		     bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     (*parent)->howto->name, (*parent)->addend,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_outofrange:
 		  /* PR ld/13730:
@@ -13083,6 +13022,7 @@ nds32_elf_get_relocated_section_contents
 		     complete binaries.  Do not abort, but issue an error
 		     message instead.  */
 		  link_info->callbacks->einfo
+		    /* xgettext:c-format */
 		    (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"),
 		     abfd, input_section, * parent);
 		  goto error_return;
@@ -14859,7 +14799,7 @@ nds32_elf_ex9_init (void)
 			      sizeof (struct elf_nds32_code_hash_entry),
 			      1023))
     {
-      (*_bfd_error_handler) (_("Linker: cannot init ex9 hash table error \n"));
+      _bfd_error_handler (_("Linker: cannot init ex9 hash table error \n"));
       return FALSE;
     }
   return TRUE;
@@ -15009,7 +14949,6 @@ nds32_elf_ex9_import_table (struct bfd_l
 {
   int num = 0;
   bfd_byte *contents;
-  unsigned long insn;
   FILE *ex9_import_file;
   int update_ex9_table;
   struct elf_nds32_link_hash_table *table;
@@ -15023,6 +14962,7 @@ nds32_elf_ex9_import_table (struct bfd_l
   /* Read instructions from the input file and build the list.  */
   while (!feof (ex9_import_file))
     {
+      unsigned long insn;
       char *code;
       struct elf_nds32_insn_times_entry *ptr;
       size_t nread;
@@ -15033,7 +14973,7 @@ nds32_elf_ex9_import_table (struct bfd_l
 	break;
       insn = bfd_getb32 (contents);
       code = bfd_malloc (sizeof (char) * 9);
-      snprintf (code, 9, "%08lx", insn);
+      snprintf (code, 9, "%08lx", (insn & 0xffffffff));
       ptr = bfd_malloc (sizeof (struct elf_nds32_insn_times_entry));
       ptr->string = code;
       ptr->order = num;
@@ -15267,7 +15207,7 @@ nds32_elf_ex9_reloc_jmp (struct bfd_link
 				  if (!nds32_get_section_contents
 					 (fix_ptr->sec->owner, fix_ptr->sec,
 					  &source_contents, TRUE))
-				    (*_bfd_error_handler)
+				    _bfd_error_handler
 				      (_("Linker: error cannot fixed ex9 relocation \n"));
 				  if (temp_ptr->order < 32)
 				    insn_ex9 = INSN_EX9_IT_2;
@@ -15281,7 +15221,7 @@ nds32_elf_ex9_reloc_jmp (struct bfd_link
 			  else
 			    {
 			      if (!temp_ptr->next || temp_ptr->m_list != temp_ptr->next->m_list)
-				(*_bfd_error_handler)
+				_bfd_error_handler
 				  (_("Linker: error cannot fixed ex9 relocation \n"));
 			      else
 				temp_ptr = temp_ptr->next;
@@ -15491,7 +15431,8 @@ nds32_elf_ex9_build_hash_table (bfd *abf
 		      if (relocation & align)
 			{
 			  /* Incorrect alignment.  */
-			  (*_bfd_error_handler)
+			  _bfd_error_handler
+			    /* xgettext:c-format */
 			    (_("%s: warning: unaligned small data access. "
 			       "For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."),
 			     bfd_get_filename (abfd), irel->r_offset,
@@ -15524,7 +15465,7 @@ nds32_elf_ex9_build_hash_table (bfd *abf
 	    bfd_hash_lookup (&ex9_code_table, code, TRUE, TRUE);
 	  if (entry == NULL)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%P%F: failed creating ex9.it %s hash table: %E\n"), code);
 	      return FALSE;
 	    }
@@ -15735,6 +15676,7 @@ nds32_elf_ex9_itb_base (struct bfd_link_
 #define elf_backend_may_use_rel_p		1
 #define elf_backend_default_use_rela_p		1
 #define elf_backend_may_use_rela_p		1
+#define elf_backend_dtrel_excludes_plt		1
 
 #include "elf32-target.h"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nds32.h ./bfd/elf32-nds32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nds32.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-nds32.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NDS32-specific support for 32-bit ELF.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Andes Technology Corporation.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -22,6 +22,10 @@
 #ifndef ELF32_NDS32_H
 #define ELF32_NDS32_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Relocation flags encoded in r_addend.  */
 
 /* Relocation flags for R_NDS32_ERLAX_ENTRY.  */
@@ -125,11 +129,6 @@ struct elf_nds32_link_hash_table
   struct elf_link_hash_table root;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
 
@@ -152,4 +151,9 @@ struct elf_nds32_link_hash_table
   bfd_boolean ex9_loop_aware;	/* Ignore ex9 if inside a loop.  */
   bfd_boolean ifc_loop_aware;	/* Ignore ifc if inside a loop.  */
 };
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nios2.c ./bfd/elf32-nios2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nios2.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-nios2.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for Nios II.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Nigel Gray (ngray@altera.com).
    Contributed by Mentor Graphics, Inc.
 
@@ -1420,7 +1420,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0xfe00,
 	 0xfe00,
 	 TRUE),
-	 
+
   HOWTO (R_NIOS2_R2_T1I7_2,
 	 2,
 	 1,
@@ -1434,7 +1434,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0xfe00,
 	 0xfe00,
 	 FALSE),
-	 
+
   HOWTO (R_NIOS2_R2_T2I4,
 	 0,
 	 1,
@@ -1490,7 +1490,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0x1fc0,
 	 0x1fc0,
 	 FALSE),
-	 
+
   HOWTO (R_NIOS2_R2_X2L5,
 	 0,
 	 1,
@@ -1504,7 +1504,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0x07c0,
 	 0x07c0,
 	 FALSE),
-	 
+
   HOWTO (R_NIOS2_R2_F1I5_2,
 	 2,
 	 1,
@@ -1546,7 +1546,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0x7e00,
 	 0x7e00,
 	 FALSE),
-  
+
   HOWTO (R_NIOS2_R2_T1X1I6_2,
 	 2,
 	 2,
@@ -1560,7 +1560,7 @@ static reloc_howto_type elf_nios2_r2_how
 	 0x7e00,
 	 0x7e00,
 	 FALSE),
-  
+
 /* Add other relocations here.  */
 };
 
@@ -1815,13 +1815,11 @@ struct elf32_nios2_link_hash_table
 
     /* Assorted information used by nios2_elf32_size_stubs.  */
     unsigned int bfd_count;
-    int top_index;
+    unsigned int top_index;
     asection **input_list;
     Elf_Internal_Sym **all_local_syms;
 
     /* Short-cuts to get to dynamic linker sections.  */
-    asection *sdynbss;
-    asection *srelbss;
     asection *sbss;
 
     /* GOT pointer symbol _gp_got.  */
@@ -1905,7 +1903,7 @@ nios2_elf32_install_imm16 (asection *sec
 {
   bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset);
 
-  BFD_ASSERT(value <= 0xffff);
+  BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff);
 
   bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6),
 	      sec->contents + offset);
@@ -2225,9 +2223,10 @@ nios2_add_stub (const char *stub_name,
 				TRUE, FALSE);
   if (hsh == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-			     section->owner,
-			     stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+			  section->owner,
+			  stub_name);
       return NULL;
     }
 
@@ -2245,7 +2244,7 @@ nios2_elf32_setup_section_lists (bfd *ou
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -2779,7 +2778,7 @@ nios2_elf32_size_stubs (bfd *output_bfd,
 			}
 		      else if (hh->root.root.type == bfd_link_hash_undefweak)
 			{
-			  if (! info->shared)
+			  if (! bfd_link_pic (info))
 			    continue;
 			}
 		      else if (hh->root.root.type == bfd_link_hash_undefined)
@@ -2889,7 +2888,7 @@ nios2_elf32_build_stubs (struct bfd_link
        SEC_LINKER_CREATED flag set, while stub sections do not
        have that flag.  Ignore any non-stub sections here.  */
     if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
-      {  
+      {
 	bfd_size_type size;
 
 	/* Allocate memory to hold the linker stubs.  */
@@ -2916,8 +2915,9 @@ nios2_elf32_build_stubs (struct bfd_link
    object file when linking.  */
 
 static bfd_boolean
-nios2_elf32_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
 
@@ -2925,7 +2925,7 @@ nios2_elf32_merge_private_bfd_data (bfd 
     return TRUE;
 
   /* Check if we have the same endianness.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   new_flags = elf_elfheader (ibfd)->e_flags;
@@ -2945,7 +2945,7 @@ nios2_elf32_merge_private_bfd_data (bfd 
 	case EF_NIOS2_ARCH_R2:
 	  if (bfd_big_endian (ibfd))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("error: %B: Big-endian R2 is not supported."), ibfd);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
@@ -2960,7 +2960,8 @@ nios2_elf32_merge_private_bfd_data (bfd 
     {
       /* So far, the only incompatible flags denote incompatible
 	 architectures.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B: Conflicting CPU architectures %d/%d"),
 	 ibfd, new_flags, old_flags);
       bfd_set_error (bfd_error_bad_value);
@@ -2968,7 +2969,7 @@ nios2_elf32_merge_private_bfd_data (bfd 
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  _bfd_elf_merge_object_attributes (ibfd, info);
 
   return TRUE;
 }
@@ -2981,7 +2982,7 @@ nios2_elf32_bfd_reloc_type_lookup (bfd *
 				   bfd_reloc_code_real_type code)
 {
   int i;
-  
+
   for (i = 0;
        i < (int) (sizeof (nios2_reloc_map) / sizeof (struct elf_reloc_map));
        ++i)
@@ -3012,11 +3013,11 @@ nios2_elf32_bfd_reloc_name_lookup (bfd *
       howto_tbl_size = (int) (sizeof (elf_nios2_r1_howto_table_rel)
 			      / sizeof (elf_nios2_r1_howto_table_rel[0]));
     }
-    
+
   for (i = 0; i < howto_tbl_size; i++)
     if (howto_tbl[i].name && strcasecmp (howto_tbl[i].name, r_name) == 0)
       return howto_tbl + i;
-  return NULL;	
+  return NULL;
 }
 
 /* Implement elf_info_to_howto:
@@ -3086,7 +3087,15 @@ lookup:
 	case bfd_link_hash_defined:
 	case bfd_link_hash_defweak:
 	  gp_found = TRUE;
-	  *pgp = lh->u.def.value;
+	  {
+	    asection *sym_sec = lh->u.def.section;
+	    bfd_vma sym_value = lh->u.def.value;
+
+	    if (sym_sec->output_section)
+	      sym_value = (sym_value + sym_sec->output_offset
+			   + sym_sec->output_section->vma);
+	    *pgp = sym_value;
+	  }
 	  break;
 	case bfd_link_hash_indirect:
 	case bfd_link_hash_warning:
@@ -3120,7 +3129,7 @@ lookup:
    symbol value for an external symbol if we are producing relocatable
    output.  */
 static bfd_reloc_status_type
-nios2_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, 
+nios2_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable,
 		    char **error_message, bfd_vma *pgp)
 {
   if (bfd_is_und_section (symbol->section) && !relocatable)
@@ -3151,9 +3160,9 @@ nios2_elf_final_gp (bfd *output_bfd, asy
 
 /* Do the relocations that require special handling.  */
 static bfd_reloc_status_type
-nios2_elf32_do_hi16_relocate (bfd *abfd, reloc_howto_type *howto, 
+nios2_elf32_do_hi16_relocate (bfd *abfd, reloc_howto_type *howto,
 			      asection *input_section,
-			      bfd_byte *data, bfd_vma offset, 
+			      bfd_byte *data, bfd_vma offset,
 			      bfd_vma symbol_value, bfd_vma addend)
 {
   symbol_value = symbol_value + addend;
@@ -3166,7 +3175,7 @@ nios2_elf32_do_hi16_relocate (bfd *abfd,
 static bfd_reloc_status_type
 nios2_elf32_do_lo16_relocate (bfd *abfd, reloc_howto_type *howto,
 			      asection *input_section,
-			      bfd_byte *data, bfd_vma offset, 
+			      bfd_byte *data, bfd_vma offset,
 			      bfd_vma symbol_value, bfd_vma addend)
 {
   symbol_value = symbol_value + addend;
@@ -3221,10 +3230,10 @@ nios2_elf32_do_pcrel_hiadj16_relocate (b
 static bfd_reloc_status_type
 nios2_elf32_do_pcrel16_relocate (bfd *abfd, reloc_howto_type *howto,
 				 asection *input_section,
-				 bfd_byte *data, bfd_vma offset, 
+				 bfd_byte *data, bfd_vma offset,
 				 bfd_vma symbol_value, bfd_vma addend)
 {
-  /* NIOS2 pc relative relocations are relative to the next 32-bit instruction 
+  /* NIOS2 pc relative relocations are relative to the next 32-bit instruction
      so we need to subtract 4 before doing a final_link_relocate. */
   symbol_value = symbol_value + addend - 4;
   addend = 0;
@@ -3235,11 +3244,11 @@ nios2_elf32_do_pcrel16_relocate (bfd *ab
 static bfd_reloc_status_type
 nios2_elf32_do_call26_relocate (bfd *abfd, reloc_howto_type *howto,
 				asection *input_section,
-				bfd_byte *data, bfd_vma offset, 
+				bfd_byte *data, bfd_vma offset,
 				bfd_vma symbol_value, bfd_vma addend)
 {
   /* Check that the relocation is in the same page as the current address.  */
-  if (CALL26_SEGMENT (symbol_value + addend) 
+  if (CALL26_SEGMENT (symbol_value + addend)
       != CALL26_SEGMENT (input_section->output_section->vma
 			 + input_section->output_offset
 			 + offset))
@@ -3257,7 +3266,7 @@ nios2_elf32_do_call26_relocate (bfd *abf
 static bfd_reloc_status_type
 nios2_elf32_do_gprel_relocate (bfd *abfd, reloc_howto_type *howto,
 			       asection *input_section,
-			       bfd_byte *data, bfd_vma offset, 
+			       bfd_byte *data, bfd_vma offset,
 			       bfd_vma symbol_value, bfd_vma addend)
 {
   /* Because we need the output_bfd, the special handling is done
@@ -3269,7 +3278,7 @@ nios2_elf32_do_gprel_relocate (bfd *abfd
 static bfd_reloc_status_type
 nios2_elf32_do_ujmp_relocate (bfd *abfd, reloc_howto_type *howto,
 			      asection *input_section,
-			      bfd_byte *data, bfd_vma offset, 
+			      bfd_byte *data, bfd_vma offset,
 			      bfd_vma symbol_value, bfd_vma addend)
 {
   bfd_vma symbol_lo16, symbol_hi16;
@@ -3292,7 +3301,7 @@ nios2_elf32_do_ujmp_relocate (bfd *abfd,
 static bfd_reloc_status_type
 nios2_elf32_do_cjmp_relocate (bfd *abfd, reloc_howto_type *howto,
 			      asection *input_section,
-			      bfd_byte *data, bfd_vma offset, 
+			      bfd_byte *data, bfd_vma offset,
 			      bfd_vma symbol_value, bfd_vma addend)
 {
   bfd_vma symbol_lo16, symbol_hi16;
@@ -3315,7 +3324,7 @@ nios2_elf32_do_cjmp_relocate (bfd *abfd,
 static bfd_reloc_status_type
 nios2_elf32_do_callr_relocate (bfd *abfd, reloc_howto_type *howto,
 			       asection *input_section,
-			       bfd_byte *data, bfd_vma offset, 
+			       bfd_byte *data, bfd_vma offset,
 			       bfd_vma symbol_value, bfd_vma addend)
 {
   bfd_vma symbol_lo16, symbol_hi16;
@@ -3341,9 +3350,9 @@ nios2_elf32_do_callr_relocate (bfd *abfd
    changes in size of section don't screw up .align.  */
 static bfd_reloc_status_type
 nios2_elf32_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
-			  asymbol *symbol ATTRIBUTE_UNUSED, 
-			  void *data ATTRIBUTE_UNUSED, asection *input_section, 
-			  bfd *output_bfd, 
+			  asymbol *symbol ATTRIBUTE_UNUSED,
+			  void *data ATTRIBUTE_UNUSED, asection *input_section,
+			  bfd *output_bfd,
 			  char **error_message ATTRIBUTE_UNUSED)
 {
   if (output_bfd != NULL)
@@ -3352,9 +3361,9 @@ nios2_elf32_ignore_reloc (bfd *abfd ATTR
 }
 
 static bfd_reloc_status_type
-nios2_elf32_hi16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol, 
-			   void *data, asection *input_section, 
-			   bfd *output_bfd, 
+nios2_elf32_hi16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+			   void *data, asection *input_section,
+			   bfd *output_bfd,
 			   char **error_message ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3381,8 +3390,8 @@ nios2_elf32_hi16_relocate (bfd *abfd, ar
 
 static bfd_reloc_status_type
 nios2_elf32_lo16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			   void *data, asection *input_section, 
-			   bfd *output_bfd, 
+			   void *data, asection *input_section,
+			   bfd *output_bfd,
 			   char **error_message ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3409,8 +3418,8 @@ nios2_elf32_lo16_relocate (bfd *abfd, ar
 
 static bfd_reloc_status_type
 nios2_elf32_hiadj16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			      void *data, asection *input_section, 
-			      bfd *output_bfd, 
+			      void *data, asection *input_section,
+			      bfd *output_bfd,
 			      char **error_message ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3489,8 +3498,8 @@ nios2_elf32_pcrel_hiadj16_relocate (bfd 
 
 static bfd_reloc_status_type
 nios2_elf32_pcrel16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			      void *data, asection *input_section, 
-			      bfd *output_bfd, 
+			      void *data, asection *input_section,
+			      bfd *output_bfd,
 			      char **error_message ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3517,8 +3526,8 @@ nios2_elf32_pcrel16_relocate (bfd *abfd,
 
 static bfd_reloc_status_type
 nios2_elf32_call26_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			     void *data, asection *input_section, 
-			     bfd *output_bfd, 
+			     void *data, asection *input_section,
+			     bfd *output_bfd,
 			     char **error_message ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3545,7 +3554,7 @@ nios2_elf32_call26_relocate (bfd *abfd, 
 
 static bfd_reloc_status_type
 nios2_elf32_gprel_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			    void *data, asection *input_section, 
+			    void *data, asection *input_section,
 			    bfd *output_bfd, char **msg)
 {
   bfd_vma relocation;
@@ -3593,7 +3602,7 @@ nios2_elf32_gprel_relocate (bfd *abfd, a
 
 static bfd_reloc_status_type
 nios2_elf32_ujmp_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			   void *data, asection *input_section, 
+			   void *data, asection *input_section,
 			   bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3620,7 +3629,7 @@ nios2_elf32_ujmp_relocate (bfd *abfd, ar
 
 static bfd_reloc_status_type
 nios2_elf32_cjmp_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			   void *data, asection *input_section, 
+			   void *data, asection *input_section,
 			   bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3647,7 +3656,7 @@ nios2_elf32_cjmp_relocate (bfd *abfd, ar
 
 static bfd_reloc_status_type
 nios2_elf32_callr_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
-			    void *data, asection *input_section, 
+			    void *data, asection *input_section,
 			    bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
 {
   /* This part is from bfd_elf_generic_reloc.  */
@@ -3672,7 +3681,7 @@ nios2_elf32_callr_relocate (bfd *abfd, a
 					reloc_entry->addend);
 }
 
- 
+
 /* Implement elf_backend_relocate_section.  */
 static bfd_boolean
 nios2_elf32_relocate_section (bfd *output_bfd,
@@ -3704,10 +3713,10 @@ nios2_elf32_relocate_section (bfd *outpu
   splt = htab->root.splt;
   local_got_offsets = elf_local_got_offsets (input_bfd);
 
-  if (elf32_nios2_hash_table (info)->h_gp_got == NULL)
+  if (htab->h_gp_got == NULL)
     got_base = 0;
   else
-    got_base = elf32_nios2_hash_table (info)->h_gp_got->root.u.def.value;
+    got_base = htab->h_gp_got->root.u.def.value;
 
   for (rel = relocs; rel < relend; rel++)
     {
@@ -3719,7 +3728,6 @@ nios2_elf32_relocate_section (bfd *outpu
       struct elf32_nios2_link_hash_entry *eh;
       bfd_vma relocation;
       bfd_vma gp;
-      bfd_vma reloc_address;
       bfd_reloc_status_type r = bfd_reloc_ok;
       const char *name = NULL;
       int r_type;
@@ -3759,15 +3767,9 @@ nios2_elf32_relocate_section (bfd *outpu
 					 rel, 1, relend, howto, 0, contents);
 
       /* Nothing more to do unless this is a final link.  */
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
-      if (sec && sec->output_section)
-	reloc_address = (sec->output_section->vma + sec->output_offset
-			 + rel->r_offset);
-      else
-	reloc_address = 0;
-		
       if (howto)
 	{
 	  switch (howto->type)
@@ -3816,6 +3818,15 @@ nios2_elf32_relocate_section (bfd *outpu
 	      /* Turns an absolute address into a gp-relative address.  */
 	      if (!nios2_elf_assign_gp (output_bfd, &gp, info))
 		{
+		  bfd_vma reloc_address;
+
+		  if (sec && sec->output_section)
+		    reloc_address = (sec->output_section->vma
+				     + sec->output_offset
+				     + rel->r_offset);
+		  else
+		    reloc_address = 0;
+
 		  format = _("global pointer relative relocation at address "
 			     "0x%08x when _gp not defined\n");
 		  sprintf (msgbuf, format, reloc_address);
@@ -3825,7 +3836,7 @@ nios2_elf32_relocate_section (bfd *outpu
 	      else
 		{
 		  bfd_vma symbol_address = rel->r_addend + relocation;
-		  relocation = relocation + rel->r_addend - gp;
+		  relocation = symbol_address - gp;
 		  rel->r_addend = 0;
 		  if (((signed) relocation < -32768
 		       || (signed) relocation > 32767)
@@ -3833,11 +3844,14 @@ nios2_elf32_relocate_section (bfd *outpu
 			  || h->root.type == bfd_link_hash_defined
 			  || h->root.type == bfd_link_hash_defweak))
 		    {
+		      if (h)
+			name = h->root.root.string;
+		      /* xgettext:c-format */
 		      format = _("Unable to reach %s (at 0x%08x) from the "
 				 "global pointer (at 0x%08x) because the "
 				 "offset (%d) is out of the allowed range, "
 				 "-32678 to 32767.\n" );
-		      sprintf (msgbuf, format, name, symbol_address, gp, 
+		      sprintf (msgbuf, format, name, symbol_address, gp,
 			       (signed)relocation);
 		      msg = msgbuf;
 		      r = bfd_reloc_outofrange;
@@ -3848,7 +3862,6 @@ nios2_elf32_relocate_section (bfd *outpu
 						  rel->r_offset, relocation,
 						  rel->r_addend);
 		}
-
 	      break;
 	    case R_NIOS2_UJMP:
 	      r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
@@ -3985,9 +3998,11 @@ nios2_elf32_relocate_section (bfd *outpu
 
 		  off = h->got.offset;
 		  BFD_ASSERT (off != (bfd_vma) -1);
-		  dyn = elf_hash_table (info)->dynamic_sections_created;
-		  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		      || (info->shared
+		  dyn = htab->root.dynamic_sections_created;
+		  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							 bfd_link_pic (info),
+							 h)
+		      || (bfd_link_pic (info)
 			  && SYMBOL_REFERENCES_LOCAL (info, h))
 		      || (ELF_ST_VISIBILITY (h->other)
 			  && h->root.type == bfd_link_hash_undefweak))
@@ -4031,7 +4046,7 @@ nios2_elf32_relocate_section (bfd *outpu
 		      bfd_put_32 (output_bfd, relocation,
 				  sgot->contents + off);
 
-		      if (info->shared)
+		      if (bfd_link_pic (info))
 			{
 			  asection *srelgot;
 			  Elf_Internal_Rela outrel;
@@ -4055,7 +4070,7 @@ nios2_elf32_relocate_section (bfd *outpu
 		    }
 		}
 
-	      if (use_plt && info->shared)
+	      if (use_plt && bfd_link_pic (info))
 		{
 		  off = ((h->plt.offset - 24) / 12 + 3) * 4;
 		  relocation = (htab->root.sgotplt->output_offset + off
@@ -4156,7 +4171,7 @@ nios2_elf32_relocate_section (bfd *outpu
 		{
 		  /* If we don't know the module number, create a relocation
 		     for it.  */
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      Elf_Internal_Rela outrel;
 		      bfd_byte *loc;
@@ -4203,8 +4218,10 @@ nios2_elf32_relocate_section (bfd *outpu
 		  {
 		    bfd_boolean dyn;
 		    dyn = htab->root.dynamic_sections_created;
-		    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-			&& (!info->shared
+		    if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							 bfd_link_pic (info),
+							 h)
+			&& (!bfd_link_pic (info)
 			    || !SYMBOL_REFERENCES_LOCAL (info, h)))
 		      {
 			unresolved_reloc = FALSE;
@@ -4239,7 +4256,7 @@ nios2_elf32_relocate_section (bfd *outpu
 		       now, and emit any relocations.  If both an IE GOT and a
 		       GD GOT are necessary, we emit the GD first.  */
 
-		    if ((info->shared || indx != 0)
+		    if ((bfd_link_pic (info) || indx != 0)
 			&& (h == NULL
 			    || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 			    || h->root.type != bfd_link_hash_undefweak))
@@ -4348,9 +4365,10 @@ nios2_elf32_relocate_section (bfd *outpu
 
 	      break;
 	    case R_NIOS2_TLS_LE16:
-	      if (info->shared && !info->pie)
+	      if (bfd_link_dll (info))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not "
 		       "permitted in shared object"),
 		     input_bfd, input_section,
@@ -4366,7 +4384,7 @@ nios2_elf32_relocate_section (bfd *outpu
 	      break;
 
 	    case R_NIOS2_BFD_RELOC_32:
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  && (input_section->flags & SEC_ALLOC) != 0
 		  && (h == NULL
 		      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -4397,8 +4415,8 @@ nios2_elf32_relocate_section (bfd *outpu
 		    memset (&outrel, 0, sizeof outrel);
 		  else if (h != NULL
 			   && h->dynindx != -1
-			   && (!info->shared
-			       || !info->symbolic
+			   && (!bfd_link_pic (info)
+			       || !SYMBOLIC_BIND (info, h)
 			       || !h->def_regular))
 		    {
 		      outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@@ -4465,16 +4483,16 @@ nios2_elf32_relocate_section (bfd *outpu
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow (info, NULL, name,
-						   howto->name, (bfd_vma) 0,
-						   input_bfd, input_section,
-						   rel->r_offset);
+	      (*info->callbacks->reloc_overflow) (info, NULL, name,
+						  howto->name, (bfd_vma) 0,
+						  input_bfd, input_section,
+						  rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol (info, name, input_bfd,
-						     input_section,
-						     rel->r_offset, TRUE);
+	      (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+						    input_section,
+						    rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -4500,8 +4518,8 @@ nios2_elf32_relocate_section (bfd *outpu
 
 	  if (msg)
 	    {
-	      r = info->callbacks->warning
-		(info, msg, name, input_bfd, input_section, rel->r_offset);
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      return FALSE;
 	    }
 	}
@@ -4562,7 +4580,7 @@ create_got_section (bfd *dynobj, struct 
      points to the base of the GOT while _gp_got may include a bias.  */
   h = _bfd_elf_define_linkage_sym (dynobj, info, htab->root.sgotplt,
 				   "_gp_got");
-  elf32_nios2_hash_table (info)->h_gp_got = h;
+  htab->h_gp_got = h;
   if (h == NULL)
     return FALSE;
 
@@ -4582,26 +4600,14 @@ nios2_elf32_create_dynamic_sections (bfd
   if (!htab->root.sgot && !create_got_section (dynobj, info))
     return FALSE;
 
-  _bfd_elf_create_dynamic_sections (dynobj, info);
+  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+    return FALSE;
 
   /* In order for the two loads in a shared object .PLTresolve to share the
      same %hiadj, the start of the PLT (as well as the GOT) must be aligned
      to a 16-byte boundary.  This is because the addresses for these loads
      include the -(.plt+4) PIC correction.  */
-  if (!bfd_set_section_alignment (dynobj, htab->root.splt, 4))
-    return FALSE;
-
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!htab->sdynbss)
-    return FALSE;
-  if (!info->shared)
-    {
-      htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-      if (!htab->srelbss)
-	return FALSE;
-    }
-
-  return TRUE;
+  return bfd_set_section_alignment (dynobj, htab->root.splt, 4);
 }
 
 /* Implement elf_backend_copy_indirect_symbol:
@@ -4688,21 +4694,17 @@ static bfd_boolean
 nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info,
 			  asection *sec, const Elf_Internal_Rela *relocs)
 {
-  bfd *dynobj;
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   struct elf32_nios2_link_hash_table *htab;
-  asection *sgot;
-  asection *srelgot;
   asection *sreloc = NULL;
   bfd_signed_vma *local_got_refcounts;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
-  dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
   sym_hashes_end = (sym_hashes
@@ -4712,8 +4714,6 @@ nios2_elf32_check_relocs (bfd *abfd, str
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
   htab = elf32_nios2_hash_table (info);
-  sgot = htab->root.sgot;
-  srelgot = htab->root.srelgot;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
@@ -4772,26 +4772,6 @@ nios2_elf32_check_relocs (bfd *abfd, str
 		break;
 	      }
 
-	    if (dynobj == NULL)
-	      {
-		/* Create the .got section.  */
-		elf_hash_table (info)->dynobj = dynobj = abfd;
-		nios2_elf32_create_dynamic_sections (dynobj, info);
-	      }
-
-	    if (sgot == NULL)
-	      {
-		sgot = htab->root.sgot;
-		BFD_ASSERT (sgot != NULL);
-	      }
-
-	    if (srelgot == NULL
-		&& (h != NULL || info->shared))
-	      {
-		srelgot = htab->root.srelgot;
-		BFD_ASSERT (srelgot != NULL);
-	      }
-
 	    if (h != NULL)
 	      {
 		struct elf32_nios2_link_hash_entry *eh
@@ -4850,11 +4830,7 @@ nios2_elf32_check_relocs (bfd *abfd, str
 		  elf32_nios2_local_got_tls_type (abfd) [r_symndx] = tls_type;
 	      }
 	  }
-	  /* Fall through */
-	case R_NIOS2_TLS_LDM16:
-	  if (r_type == R_NIOS2_TLS_LDM16)
-	    htab->tls_ldm_got.refcount++;
-
+	make_got:
 	  if (htab->root.sgot == NULL)
 	    {
 	      if (htab->root.dynobj == NULL)
@@ -4864,6 +4840,10 @@ nios2_elf32_check_relocs (bfd *abfd, str
 	    }
 	  break;
 
+	case R_NIOS2_TLS_LDM16:
+	  htab->tls_ldm_got.refcount++;
+	  goto make_got;
+
 	  /* This relocation describes the C++ object vtable hierarchy.
 	     Reconstruct it for later use during GC.  */
 	case R_NIOS2_GNU_VTINHERIT:
@@ -4892,7 +4872,7 @@ nios2_elf32_check_relocs (bfd *abfd, str
 		   sections have not yet been mapped to output sections.
 		   Tentatively set the flag for now, and correct in
 		   adjust_dynamic_symbol.  */
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		h->non_got_ref = 1;
 
 	      /* Make sure a plt entry is created for this symbol if it
@@ -4905,11 +4885,11 @@ nios2_elf32_check_relocs (bfd *abfd, str
 
 	  /* If we are creating a shared library, we need to copy the
 	     reloc into the shared library.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      && (r_type == R_NIOS2_BFD_RELOC_32
 		  || (h != NULL && ! h->needs_plt
-		      && (! info->symbolic || ! h->def_regular))))
+		      && (! SYMBOLIC_BIND (info, h) || ! h->def_regular))))
 	    {
 	      struct elf32_nios2_dyn_relocs *p;
 	      struct elf32_nios2_dyn_relocs **head;
@@ -4919,8 +4899,11 @@ nios2_elf32_check_relocs (bfd *abfd, str
 		 section in dynobj and make room for this reloc.  */
 	      if (sreloc == NULL)
 		{
+		  if (htab->root.dynobj == NULL)
+		    htab->root.dynobj = abfd;
+
 		  sreloc = _bfd_elf_make_dynamic_reloc_section
-		    (sec, dynobj, 2, abfd, TRUE);
+		    (sec, htab->root.dynobj, 2, abfd, TRUE);
 		  if (sreloc == NULL)
 		    return FALSE;
 		}
@@ -5012,7 +4995,7 @@ nios2_elf32_gc_sweep_hook (bfd *abfd,
   const Elf_Internal_Rela *rel, *relend;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   elf_section_data (sec)->local_dynrel = NULL;
@@ -5138,7 +5121,7 @@ nios2_elf32_finish_dynamic_symbol (bfd *
       BFD_ASSERT (splt != NULL && sgotplt != NULL && srela != NULL);
 
       /* Emit the PLT entry.  */
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  nios2_elf32_install_data (splt, nios2_so_plt_entry, h->plt.offset,
 				    3);
@@ -5228,7 +5211,7 @@ nios2_elf32_finish_dynamic_symbol (bfd *
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
 
-      if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+      if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  rela.r_info = ELF32_R_INFO (0, R_NIOS2_RELATIVE);
 	  rela.r_addend = bfd_get_signed_32 (output_bfd,
@@ -5269,22 +5252,24 @@ nios2_elf32_finish_dynamic_symbol (bfd *
 		  && (h->root.type == bfd_link_hash_defined
 		      || h->root.type == bfd_link_hash_defweak));
 
-      s = htab->srelbss;
-      BFD_ASSERT (s != NULL);
-
       rela.r_offset = (h->root.u.def.value
 		       + h->root.u.def.section->output_section->vma
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELF32_R_INFO (h->dynindx, R_NIOS2_COPY);
       rela.r_addend = 0;
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	s = htab->root.sreldynrelro;
+      else
+	s = htab->root.srelbss;
+      BFD_ASSERT (s != NULL);
       loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
     }
 
   /* Mark _DYNAMIC, _GLOBAL_OFFSET_TABLE_, and _gp_got as absolute.  */
   if (strcmp (h->root.root.string, "_DYNAMIC") == 0
-      || h == elf_hash_table (info)->hgot
-      || h == elf32_nios2_hash_table (info)->h_gp_got)
+      || h == htab->root.hgot
+      || h == htab->h_gp_got)
     sym->st_shndx = SHN_ABS;
 
   return TRUE;
@@ -5295,24 +5280,22 @@ static bfd_boolean
 nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
 				     struct bfd_link_info *info)
 {
-  bfd *dynobj;
   asection *sgotplt;
   asection *sdyn;
   struct elf32_nios2_link_hash_table *htab;
 
   htab = elf32_nios2_hash_table (info);
-  dynobj = elf_hash_table (info)->dynobj;
   sgotplt = htab->root.sgotplt;
-  BFD_ASSERT (sgotplt != NULL);
-  sdyn = bfd_get_linker_section (dynobj, ".dynamic");
+  sdyn = NULL;
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (htab->root.dynamic_sections_created)
     {
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
       splt = htab->root.splt;
-      BFD_ASSERT (splt != NULL && sdyn != NULL);
+      sdyn = bfd_get_linker_section (htab->root.dynobj, ".dynamic");
+      BFD_ASSERT (splt != NULL && sdyn != NULL && sgotplt != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
       dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
@@ -5321,7 +5304,7 @@ nios2_elf32_finish_dynamic_sections (bfd
 	  Elf_Internal_Dyn dyn;
 	  asection *s;
 
-	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+	  bfd_elf32_swap_dyn_in (htab->root.dynobj, dyncon, &dyn);
 
 	  switch (dyn.d_tag)
 	    {
@@ -5329,44 +5312,27 @@ nios2_elf32_finish_dynamic_sections (bfd
 	      break;
 
 	    case DT_PLTGOT:
-	      s = htab->root.sgot;
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->output_section->vma;
+	      s = htab->root.sgotplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_JMPREL:
 	      s = htab->root.srelplt;
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->output_section->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
 	      s = htab->root.srelplt;
-	      BFD_ASSERT (s != NULL);
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = htab->root.srelplt;
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
-
 	    case DT_NIOS2_GP:
-	      s = htab->root.sgot;
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->output_section->vma + 0x7ff0;
+	      s = htab->root.sgotplt;
+	      dyn.d_un.d_ptr
+		= s->output_section->vma + s->output_offset + 0x7ff0;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 	    }
@@ -5377,14 +5343,19 @@ nios2_elf32_finish_dynamic_sections (bfd
 	{
 	  bfd_vma got_address = (sgotplt->output_section->vma
 				 + sgotplt->output_offset);
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
-	      bfd_vma corrected = got_address - (splt->output_section->vma
-						 + splt->output_offset + 4);
+	      bfd_vma got_pcrel = got_address - (splt->output_section->vma
+						 + splt->output_offset);
+	      /* Both GOT and PLT must be aligned to a 16-byte boundary
+		 for the two loads to share the %hiadj part.  The 4-byte
+		 offset for nextpc is accounted for in the %lo offsets
+		 on the loads.  */
+	      BFD_ASSERT ((got_pcrel & 0xf) == 0);
 	      nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
-	      nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
-	      nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
-	      nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
+	      nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
+	      nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
+	      nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
 	    }
 	  else
 	    {
@@ -5400,6 +5371,10 @@ nios2_elf32_finish_dynamic_sections (bfd
 			    6 | ((res_size - (res_offset + 4)) << 6),
 			    splt->contents + res_offset);
 
+	      /* The GOT must be aligned to a 16-byte boundary for the
+		 two loads to share the same %hiadj part.  */
+	      BFD_ASSERT ((got_address & 0xf) == 0);
+
 	      nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
 	      nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
 	      nios2_elf32_install_imm16 (splt, res_size + 4,
@@ -5407,14 +5382,15 @@ nios2_elf32_finish_dynamic_sections (bfd
 	      nios2_elf32_install_imm16 (splt, res_size + 12,
 					 hiadj (got_address));
 	      nios2_elf32_install_imm16 (splt, res_size + 16,
-					 (got_address & 0xffff) + 4);
+					 (got_address + 4) & 0xffff);
 	      nios2_elf32_install_imm16 (splt, res_size + 20,
-					 (got_address & 0xffff) + 8);
+					 (got_address + 8) & 0xffff);
 	    }
 	}
     }
+
   /* Fill in the first three entries in the global offset table.  */
-  if (sgotplt->size > 0)
+  if (sgotplt != NULL && sgotplt->size > 0)
     {
       if (sdyn == NULL)
 	bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents);
@@ -5424,9 +5400,10 @@ nios2_elf32_finish_dynamic_sections (bfd
 		    sgotplt->contents);
       bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents + 4);
       bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents + 8);
-    }
 
-  elf_section_data (sgotplt->output_section)->this_hdr.sh_entsize = 4;
+      if (sgotplt->output_section != bfd_abs_section_ptr)
+	elf_section_data (sgotplt->output_section)->this_hdr.sh_entsize = 4;
+    }
 
   return TRUE;
 }
@@ -5443,11 +5420,11 @@ nios2_elf32_adjust_dynamic_symbol (struc
 {
   struct elf32_nios2_link_hash_table *htab;
   bfd *dynobj;
-  asection *s;
+  asection *s, *srel;
   unsigned align2;
 
   htab = elf32_nios2_hash_table (info);
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
 
   /* Make sure we know what is going on here.  */
   BFD_ASSERT (dynobj != NULL
@@ -5506,13 +5483,13 @@ nios2_elf32_adjust_dynamic_symbol (struc
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   if (h->size == 0)
     {
-      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
-			     h->root.root.string);
+      _bfd_error_handler (_("dynamic variable `%s' is zero size"),
+			  h->root.root.string);
       return TRUE;
     }
 
@@ -5525,19 +5502,22 @@ nios2_elf32_adjust_dynamic_symbol (struc
      determine the address it must put in the global offset table, so
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
-  s = htab->sdynbss;
-  BFD_ASSERT (s != NULL);
-
   /* We must generate a R_NIOS2_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->root.sdynrelro;
+      srel = htab->root.sreldynrelro;
+    }
+  else
+    {
+      s = htab->root.sdynbss;
+      srel = htab->root.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
     {
-      asection *srel;
-
-      srel = htab->srelbss;
-      BFD_ASSERT (srel != NULL);
       srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
@@ -5623,14 +5603,14 @@ allocate_dynrelocs (struct elf_link_hash
 	  && !bfd_elf_link_record_dynamic_symbol (info, h))
 	return FALSE;
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
 	{
 	  asection *s = htab->root.splt;
 
 	  /* Allocate room for the header.  */
 	  if (s->size == 0)
 	    {
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		s->size = 24;
 	      else
 		s->size = 28;
@@ -5643,7 +5623,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -5711,13 +5691,13 @@ allocate_dynrelocs (struct elf_link_hash
       dyn = htab->root.dynamic_sections_created;
 
       indx = 0;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-	  && (!info->shared
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+	  && (!bfd_link_pic (info)
 	      || !SYMBOL_REFERENCES_LOCAL (info, h)))
 	indx = h->dynindx;
 
       if (tls_type != GOT_NORMAL
-	  && (info->shared || indx != 0)
+	  && (bfd_link_pic (info) || indx != 0)
 	  && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	      || h->root.type != bfd_link_hash_undefweak))
 	{
@@ -5733,7 +5713,7 @@ allocate_dynrelocs (struct elf_link_hash
       else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		|| h->root.type != bfd_link_hash_undefweak)
 	       && !use_plt
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
@@ -5749,10 +5729,10 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->def_regular
-	  && (h->forced_local || info->symbolic))
+	  && (h->forced_local || SYMBOLIC_BIND (info, h)))
 	{
 	  struct elf32_nios2_dyn_relocs **pp;
 
@@ -5831,21 +5811,19 @@ nios2_elf32_size_dynamic_sections (bfd *
 {
   bfd *dynobj;
   asection *s;
-  bfd_boolean plt;
-  bfd_boolean got;
   bfd_boolean relocs;
   bfd *ibfd;
   struct elf32_nios2_link_hash_table *htab;
 
   htab = elf32_nios2_hash_table (info);
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->root.dynobj;
   BFD_ASSERT (dynobj != NULL);
 
   htab->res_n_size = 0;
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -5926,7 +5904,7 @@ nios2_elf32_size_dynamic_sections (bfd *
 	      if (*local_tls_type == GOT_NORMAL)
 		s->size += 4;
 
-	      if (info->shared || *local_tls_type == GOT_TLS_GD)
+	      if (bfd_link_pic (info) || *local_tls_type == GOT_TLS_GD)
 		srel->size += sizeof (Elf32_External_Rela);
 	    }
 	  else
@@ -5940,7 +5918,7 @@ nios2_elf32_size_dynamic_sections (bfd *
 	 for R_NIOS2_TLS_LDM16 relocations.  */
       htab->tls_ldm_got.offset = htab->root.sgot->size;
       htab->root.sgot->size += 8;
-      if (info->shared)
+      if (bfd_link_pic (info))
 	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
@@ -5950,21 +5928,19 @@ nios2_elf32_size_dynamic_sections (bfd *
      sym dynamic relocs.  */
   elf_link_hash_traverse (& htab->root, allocate_dynrelocs, info);
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (htab->root.dynamic_sections_created)
     {
       /* If the .got section is more than 0x8000 bytes, we add
 	 0x8000 to the value of _gp_got, so that 16-bit relocations
 	 have a greater chance of working. */
       if (htab->root.sgot->size >= 0x8000
-	  && elf32_nios2_hash_table (info)->h_gp_got->root.u.def.value == 0)
-	elf32_nios2_hash_table (info)->h_gp_got->root.u.def.value = 0x8000;
+	  && htab->h_gp_got->root.u.def.value == 0)
+	htab->h_gp_got->root.u.def.value = 0x8000;
     }
 
   /* The check_relocs and adjust_dynamic_symbol entry points have
      determined the sizes of the various dynamic sections.  Allocate
      memory for them.  */
-  plt = FALSE;
-  got = FALSE;
   relocs = FALSE;
   for (s = dynobj->sections; s != NULL; s = s->next)
     {
@@ -5977,46 +5953,37 @@ nios2_elf32_size_dynamic_sections (bfd *
 	 of the dynobj section names depend upon the input files.  */
       name = bfd_get_section_name (dynobj, s);
 
-      if (strcmp (name, ".plt") == 0)
-	{
-	  /* Remember whether there is a PLT.  */
-	  plt = s->size != 0;
-
-	  /* Correct for the number of res_N branches.  */
-	  if (plt && !info->shared)
-	    {
-	      htab->res_n_size = (s->size-28) / 3;
-	      s->size += htab->res_n_size;
-	    }
-	}
-      else if (CONST_STRNEQ (name, ".rela"))
+      if (CONST_STRNEQ (name, ".rela"))
 	{
 	  if (s->size != 0)
 	    {
-	      relocs = TRUE;
+	      if (s != htab->root.srelplt)
+		relocs = TRUE;
 
 	      /* We use the reloc_count field as a counter if we need
 		 to copy relocs into the output file.  */
 	      s->reloc_count = 0;
 	    }
 	}
-      else if (CONST_STRNEQ (name, ".got"))
-	got = s->size != 0;
-      else if (strcmp (name, ".dynbss") != 0)
+      else if (s == htab->root.splt)
+	{
+	  /* Correct for the number of res_N branches.  */
+	  if (s->size != 0 && !bfd_link_pic (info))
+	    {
+	      htab->res_n_size = (s->size - 28) / 3;
+	      s->size += htab->res_n_size;
+	    }
+	}
+      else if (s != htab->sbss
+	       && s != htab->root.sgot
+	       && s != htab->root.sgotplt
+	       && s != htab->root.sdynbss
+	       && s != htab->root.sdynrelro)
 	/* It's not one of our sections, so don't allocate space.  */
 	continue;
 
       if (s->size == 0)
 	{
-	  /* If we don't need this section, strip it from the
-	     output file.  This is mostly to handle .rela.bss and
-	     .rela.plt.  We must create both sections in
-	     create_dynamic_sections, because they must be created
-	     before the linker maps input sections to output
-	     sections.  The linker does that before
-	     adjust_dynamic_symbol is called, and it is that
-	     function which decides whether anything needs to go
-	     into these sections.  */
 	  s->flags |= SEC_EXCLUDE;
 	  continue;
 	}
@@ -6025,11 +5992,6 @@ nios2_elf32_size_dynamic_sections (bfd *
 	continue;
 
       /* Allocate memory for the section contents.  */
-      /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
-	 Unused entries should be reclaimed before the section's contents
-	 are written out, but at the moment this does not happen.  Thus in
-	 order to prevent writing out garbage, we initialize the section's
-	 contents to zero.  */
       s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
       if (s->contents == NULL)
 	return FALSE;
@@ -6040,7 +6002,7 @@ nios2_elf32_size_dynamic_sections (bfd *
   if (htab->res_n_size)
     elf_link_hash_traverse (& htab->root, adjust_dynrelocs, info);
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (htab->root.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
 	 values later, in elf_nios2_finish_dynamic_sections, but we
@@ -6050,13 +6012,14 @@ nios2_elf32_size_dynamic_sections (bfd *
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared && !add_dynamic_entry (DT_DEBUG, 0))
+      if (!bfd_link_pic (info) && !add_dynamic_entry (DT_DEBUG, 0))
 	return FALSE;
 
-      if (got && !add_dynamic_entry (DT_PLTGOT, 0))
+      if (htab->root.sgotplt->size != 0
+	  && !add_dynamic_entry (DT_PLTGOT, 0))
 	return FALSE;
 
-      if (plt
+      if (htab->root.splt->size != 0
 	  && (!add_dynamic_entry (DT_PLTRELSZ, 0)
 	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
 	      || !add_dynamic_entry (DT_JMPREL, 0)))
@@ -6068,7 +6031,7 @@ nios2_elf32_size_dynamic_sections (bfd *
 	      || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela))))
 	return FALSE;
 
-      if (!info->shared && !add_dynamic_entry (DT_NIOS2_GP, 0))
+      if (!bfd_link_pic (info) && !add_dynamic_entry (DT_NIOS2_GP, 0))
 	return FALSE;
 
       if ((info->flags & DF_TEXTREL) != 0
@@ -6163,10 +6126,8 @@ nios2_elf_add_symbol_hook (bfd *abfd,
 			   asection **secp,
 			   bfd_vma *valp)
 {
-  bfd *dynobj;
-
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && sym->st_size <= elf_gp_size (abfd)
       && is_nios2_elf_target (info->output_bfd->xvec))
     {
@@ -6179,12 +6140,11 @@ nios2_elf_add_symbol_hook (bfd *abfd,
 	{
 	  flagword flags = SEC_IS_COMMON | SEC_LINKER_CREATED;
 
-	  dynobj = elf_hash_table (info)->dynobj;
-	  if (!dynobj)
-	    dynobj = abfd;
+	  if (htab->root.dynobj == NULL)
+	    htab->root.dynobj = abfd;
 
-	  htab->sbss = bfd_make_section_anyway_with_flags (dynobj, ".sbss",
-							   flags);
+	  htab->sbss = bfd_make_section_anyway_with_flags (htab->root.dynobj,
+							   ".sbss", flags);
 	  if (htab->sbss == NULL)
 	    return FALSE;
 	}
@@ -6251,7 +6211,9 @@ const struct bfd_elf_special_section elf
 #define elf_backend_can_refcount	1
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_got_plt	1
+#define elf_backend_want_dynrelro	1
 #define elf_backend_rela_normal		1
+#define elf_backend_dtrel_excludes_plt	1
 
 #define elf_backend_relocate_section	  nios2_elf32_relocate_section
 #define elf_backend_section_flags	  nios2_elf32_section_flags
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nios2.h ./bfd/elf32-nios2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-nios2.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-nios2.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Nios II support for 32-bit ELF
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Mentor Graphics
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -29,7 +29,7 @@ extern void nios2_elf32_next_input_secti
   (struct bfd_link_info *, asection *);
 
 extern bfd_boolean nios2_elf32_size_stubs
-  (bfd *, bfd *, struct bfd_link_info *, 
+  (bfd *, bfd *, struct bfd_link_info *,
    asection * (*) (const char *, asection *, bfd_boolean), void (*) (void));
 
 extern bfd_boolean nios2_elf32_build_stubs
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-or1k.c ./bfd/elf32-or1k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-or1k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-or1k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Or1k-specific support for 32-bit ELF.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org
 
    PIC parts added by Stefan Kristiansson, stefan.kristiansson@saunalahti.fi,
@@ -199,7 +199,7 @@ static reloc_howto_type or1k_elf_howto_t
          FALSE,                 /* partial_inplace */
          0,                     /* src_mask */
          0xffffffff,            /* dst_mask */
-         FALSE),                /* pcrel_offset */
+         TRUE),                 /* pcrel_offset */
 
   HOWTO (R_OR1K_16_PCREL,
          0,                     /* rightshift */
@@ -213,7 +213,7 @@ static reloc_howto_type or1k_elf_howto_t
          FALSE,                 /* partial_inplace */
          0,                     /* src_mask */
          0xffff,                /* dst_mask */
-         FALSE),                /* pcrel_offset */
+         TRUE),                 /* pcrel_offset */
 
   HOWTO (R_OR1K_8_PCREL,
          0,                     /* rightshift */
@@ -227,7 +227,7 @@ static reloc_howto_type or1k_elf_howto_t
          FALSE,                 /* partial_inplace */
          0,                     /* src_mask */
          0xff,                  /* dst_mask */
-         FALSE),                /* pcrel_offset */
+         TRUE),                 /* pcrel_offset */
 
    HOWTO (R_OR1K_GOTPC_HI16,    /* Type.  */
          16,                    /* Rightshift.  */
@@ -615,15 +615,6 @@ struct elf_or1k_link_hash_table
 {
   struct elf_link_hash_table root;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Small local sym to section mapping cache.  */
   struct sym_cache sym_sec;
 };
@@ -740,6 +731,7 @@ or1k_info_to_howto_rela (bfd * abfd ATTR
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_OR1K_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid OR1K reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -819,7 +811,7 @@ or1k_elf_relocate_section (bfd *output_b
 
   sreloc = elf_section_data (input_section)->sreloc;
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -879,18 +871,18 @@ or1k_elf_relocate_section (bfd *output_b
         RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                          rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
         continue;
 
       switch (howto->type)
         {
         case R_OR1K_PLT26:
           {
-            if (htab->splt != NULL && h != NULL
+            if (htab->root.splt != NULL && h != NULL
                 && h->plt.offset != (bfd_vma) -1)
               {
-                relocation = (htab->splt->output_section->vma
-                              + htab->splt->output_offset
+                relocation = (htab->root.splt->output_section->vma
+                              + htab->root.splt->output_offset
                               + h->plt.offset);
               }
             break;
@@ -909,8 +901,10 @@ or1k_elf_relocate_section (bfd *output_b
               BFD_ASSERT (off != (bfd_vma) -1);
 
               dyn = htab->root.dynamic_sections_created;
-              if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-                  || (info->shared
+              if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+                  || (bfd_link_pic (info)
                       && SYMBOL_REFERENCES_LOCAL (info, h)))
                 {
                   /* This is actually a static link, or it is a
@@ -959,14 +953,14 @@ or1k_elf_relocate_section (bfd *output_b
                 {
                   /* Write entry in GOT.  */
                   bfd_put_32 (output_bfd, relocation, sgot->contents + off);
-                  if (info->shared)
+                  if (bfd_link_pic (info))
                     {
                       asection *srelgot;
                       Elf_Internal_Rela outrel;
 
                       /* We need to generate a R_OR1K_RELATIVE reloc
                          for the dynamic linker.  */
-                      srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+                      srelgot = htab->root.srelgot;
                       BFD_ASSERT (srelgot != NULL);
 
                       outrel.r_offset = (sgot->output_section->vma
@@ -987,7 +981,7 @@ or1k_elf_relocate_section (bfd *output_b
 
           /* Addend should be zero.  */
           if (rel->r_addend != 0)
-            (*_bfd_error_handler)
+	    _bfd_error_handler
               (_("internal error: addend should be zero for R_OR1K_GOT16"));
 
           break;
@@ -996,7 +990,10 @@ or1k_elf_relocate_section (bfd *output_b
         case R_OR1K_GOTOFF_HI16:
           /* Relocation is offset from GOT.  */
           BFD_ASSERT (sgot != NULL);
-          relocation -= sgot->output_section->vma;
+	  relocation
+	    -= (htab->root.hgot->root.u.def.value
+		+ htab->root.hgot->root.u.def.section->output_offset
+		+ htab->root.hgot->root.u.def.section->output_section->vma);
           break;
 
         case R_OR1K_INSN_REL_26:
@@ -1012,13 +1009,13 @@ or1k_elf_relocate_section (bfd *output_b
                 || (input_section->flags & SEC_ALLOC) == 0)
               break;
 
-            if ((info->shared
+            if ((bfd_link_pic (info)
                  && (h == NULL
                      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                      || h->root.type != bfd_link_hash_undefweak)
 		 && (howto->type != R_OR1K_INSN_REL_26
 		     || !SYMBOL_CALLS_LOCAL (info, h)))
-                || (!info->shared
+                || (!bfd_link_pic (info)
                     && h != NULL
                     && h->dynindx != -1
                     && !h->non_got_ref
@@ -1071,7 +1068,7 @@ or1k_elf_relocate_section (bfd *output_b
                     else
                       {
                         BFD_FAIL ();
-                        (*_bfd_error_handler)
+			_bfd_error_handler
                           (_("%B: probably compiled without -fPIC?"),
                            input_bfd);
                         bfd_set_error (bfd_error_bad_value);
@@ -1093,7 +1090,7 @@ or1k_elf_relocate_section (bfd *output_b
         case R_OR1K_TLS_LDO_LO16:
           /* TODO: implement support for local dynamic.  */
           BFD_FAIL ();
-          (*_bfd_error_handler)
+	  _bfd_error_handler
             (_("%B: support for local dynamic not implemented"),
              input_bfd);
           bfd_set_error (bfd_error_bad_value);
@@ -1138,7 +1135,7 @@ or1k_elf_relocate_section (bfd *output_b
             /* Dynamic entries will require relocations. if we do not need
                them we will just use the default R_OR1K_NONE and
                not set anything.  */
-            dynamic = info->shared
+            dynamic = bfd_link_pic (info)
 	      || (sec && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak || !h->def_regular));
@@ -1228,7 +1225,7 @@ or1k_elf_relocate_section (bfd *output_b
           /* These are resolved dynamically on load and shouldn't
              be used as linker input.  */
           BFD_FAIL ();
-          (*_bfd_error_handler)
+	  _bfd_error_handler
             (_("%B: will not resolve runtime TLS relocation"),
              input_bfd);
           bfd_set_error (bfd_error_bad_value);
@@ -1247,13 +1244,13 @@ or1k_elf_relocate_section (bfd *output_b
           switch (r)
             {
             case bfd_reloc_overflow:
-              r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
                 (info, (h ? &h->root : NULL), name, howto->name,
                  (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
               break;
 
             case bfd_reloc_undefined:
-              r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
                 (info, name, input_bfd, input_section, rel->r_offset, TRUE);
               break;
 
@@ -1275,11 +1272,8 @@ or1k_elf_relocate_section (bfd *output_b
             }
 
           if (msg)
-            r = info->callbacks->warning
-              (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-          if (!r)
-            return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
         }
     }
 
@@ -1362,46 +1356,6 @@ or1k_elf_gc_sweep_hook (bfd *abfd,
   return TRUE;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_or1k_link_hash_table *htab;
-  asection *s;
-
-  /* This function may be called more than once.  */
-  s = bfd_get_section_by_name (dynobj, ".got");
-  if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0)
-    return TRUE;
-
-  htab = or1k_elf_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab->sgot = bfd_get_section_by_name (dynobj, ".got");
-  htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-
-  if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
-    abort ();
-
-  if (! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC
-                               | SEC_LOAD
-                               | SEC_HAS_CONTENTS
-                               | SEC_IN_MEMORY
-                               | SEC_LINKER_CREATED
-                               | SEC_READONLY)
-      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
-    return FALSE;
-
-  return TRUE;
-}
-
 /* Look through the relocs for a section during the first phase.  */
 
 static bfd_boolean
@@ -1419,7 +1373,7 @@ or1k_elf_check_relocs (bfd *abfd,
   bfd *dynobj;
   asection *sreloc = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1533,11 +1487,11 @@ or1k_elf_check_relocs (bfd *abfd,
         case R_OR1K_TLS_GD_LO16:
         case R_OR1K_TLS_IE_HI16:
         case R_OR1K_TLS_IE_LO16:
-          if (htab->sgot == NULL)
+          if (htab->root.sgot == NULL)
             {
               if (dynobj == NULL)
                 htab->root.dynobj = dynobj = abfd;
-              if (! create_got_section (dynobj, info))
+              if (!_bfd_elf_create_got_section (dynobj, info))
                 return FALSE;
             }
 
@@ -1574,7 +1528,7 @@ or1k_elf_check_relocs (bfd *abfd,
         case R_OR1K_32:
           /* R_OR1K_16? */
           {
-            if (h != NULL && !info->shared)
+            if (h != NULL && !bfd_link_pic (info))
               {
                 /* We may need a copy reloc.  */
                 h->non_got_ref = 1;
@@ -1607,14 +1561,14 @@ or1k_elf_check_relocs (bfd *abfd,
                dynamic library if we manage to avoid copy relocs for the
                symbol.  */
 
-            if ((info->shared
+            if ((bfd_link_pic (info)
                  && (sec->flags & SEC_ALLOC) != 0
                  && (ELF32_R_TYPE (rel->r_info) != R_OR1K_INSN_REL_26
                      || (h != NULL
                          && (!SYMBOLIC_BIND (info, h)
                              || h->root.type == bfd_link_hash_defweak
                              || !h->def_regular))))
-                || (!info->shared
+                || (!bfd_link_pic (info)
                     && (sec->flags & SEC_ALLOC) != 0
                     && h != NULL
                     && (h->root.type == bfd_link_hash_defweak
@@ -1640,7 +1594,8 @@ or1k_elf_check_relocs (bfd *abfd,
                         || strcmp (bfd_get_section_name (abfd, sec),
                                    name + 5) != 0)
                       {
-                        (*_bfd_error_handler)
+			_bfd_error_handler
+			  /* xgettext:c-format */
                           (_("%B: bad relocation section name `%s\'"),
                            abfd, name);
                       }
@@ -1731,7 +1686,7 @@ or1k_elf_finish_dynamic_sections (bfd *o
 
   dynobj = htab->root.dynobj;
 
-  sgot = htab->sgotplt;
+  sgot = htab->root.sgotplt;
   sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
@@ -1757,60 +1712,29 @@ or1k_elf_finish_dynamic_sections (bfd *o
               continue;
 
             case DT_PLTGOT:
-              s = htab->sgot->output_section;
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              s = htab->root.sgotplt;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               break;
 
             case DT_JMPREL:
-              s = htab->srelplt->output_section;
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              s = htab->root.srelplt;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               break;
 
             case DT_PLTRELSZ:
-              s = htab->srelplt->output_section;
-              BFD_ASSERT (s != NULL);
+              s = htab->root.srelplt;
               dyn.d_un.d_val = s->size;
               break;
-
-            case DT_RELASZ:
-              /* My reading of the SVR4 ABI indicates that the
-                 procedure linkage table relocs (DT_JMPREL) should be
-                 included in the overall relocs (DT_RELA).  This is
-                 what Solaris does.  However, UnixWare can not handle
-                 that case.  Therefore, we override the DT_RELASZ entry
-                 here to make it not include the JMPREL relocs.  Since
-                 the linker script arranges for .rela.plt to follow all
-                 other relocation sections, we don't have to worry
-                 about changing the DT_RELA entry.  */
-              if (htab->srelplt != NULL)
-                {
-                  /* FIXME: this calculation sometimes produces
-                     wrong result, the problem is that the dyn.d_un.d_val
-                     is not always correct, needs investigation why
-                     that happens. In the meantime, reading the
-                     ".rela.dyn" section by name seems to yield
-                     correct result.
-
-                  s = htab->srelplt->output_section;
-                  dyn.d_un.d_val -= s->size;
-                  */
-
-                  s = bfd_get_section_by_name (output_bfd, ".rela.dyn");
-                  dyn.d_un.d_val = s ? s->size : 0;
-                }
-              break;
             }
           bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
         }
 
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->root.splt;
       if (splt && splt->size > 0)
         {
-          if (info->shared)
+          if (bfd_link_pic (info))
             {
               bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD0,
                           splt->contents);
@@ -1856,8 +1780,8 @@ or1k_elf_finish_dynamic_sections (bfd *o
       elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
     }
 
-  if (htab->sgot && htab->sgot->size > 0)
-    elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
+  if (htab->root.sgot && htab->root.sgot->size > 0)
+    elf_section_data (htab->root.sgot->output_section)->this_hdr.sh_entsize = 4;
 
   return TRUE;
 }
@@ -1893,9 +1817,9 @@ or1k_elf_finish_dynamic_symbol (bfd *out
          it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      sgot = htab->sgotplt;
-      srela = htab->srelplt;
+      splt = htab->root.splt;
+      sgot = htab->root.sgotplt;
+      srela = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -1911,10 +1835,10 @@ or1k_elf_finish_dynamic_symbol (bfd *out
       got_addr = got_offset;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
         {
-          got_addr += htab->sgotplt->output_section->vma
-            + htab->sgotplt->output_offset;
+          got_addr += htab->root.sgotplt->output_section->vma
+            + htab->root.sgotplt->output_offset;
           bfd_put_32 (output_bfd, PLT_ENTRY_WORD0 | ((got_addr >> 16) & 0xffff),
                       splt->contents + h->plt.offset);
           bfd_put_32 (output_bfd, PLT_ENTRY_WORD1 | (got_addr & 0xffff),
@@ -1976,8 +1900,8 @@ or1k_elf_finish_dynamic_symbol (bfd *out
 
       /* This symbol has an entry in the global offset table.  Set it
          up.  */
-      sgot = htab->sgot;
-      srela = htab->srelgot;
+      sgot = htab->root.sgot;
+      srela = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -1989,7 +1913,7 @@ or1k_elf_finish_dynamic_symbol (bfd *out
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+      if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
         {
           rela.r_info = ELF32_R_INFO (0, R_OR1K_RELATIVE);
           rela.r_addend = (h->root.u.def.value
@@ -2020,17 +1944,16 @@ or1k_elf_finish_dynamic_symbol (bfd *out
                   && (h->root.type == bfd_link_hash_defined
                       || h->root.type == bfd_link_hash_defweak));
 
-      s = bfd_get_section_by_name (h->root.u.def.section->owner,
-                                   ".rela.bss");
-      BFD_ASSERT (s != NULL);
-
       rela.r_offset = (h->root.u.def.value
                        + h->root.u.def.section->output_section->vma
                        + h->root.u.def.section->output_offset);
       rela.r_info = ELF32_R_INFO (h->dynindx, R_OR1K_COPY);
       rela.r_addend = 0;
-      loc = s->contents;
-      loc += s->reloc_count * sizeof (Elf32_External_Rela);
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	s = htab->root.sreldynrelro;
+      else
+	s = htab->root.srelbss;
+      loc = s->contents + s->reloc_count * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
       ++s->reloc_count;
     }
@@ -2071,7 +1994,7 @@ or1k_elf_adjust_dynamic_symbol (struct b
   struct elf_or1k_link_hash_entry *eh;
   struct elf_or1k_dyn_relocs *p;
   bfd *dynobj;
-  asection *s;
+  asection *s, *srel;
 
   dynobj = elf_hash_table (info)->dynobj;
 
@@ -2089,7 +2012,7 @@ or1k_elf_adjust_dynamic_symbol (struct b
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->shared
+      if (! bfd_link_pic (info)
           && !h->def_dynamic
           && !h->ref_dynamic
           && h->root.type != bfd_link_hash_undefweak
@@ -2128,7 +2051,7 @@ or1k_elf_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2174,19 +2097,22 @@ or1k_elf_adjust_dynamic_symbol (struct b
   if (htab == NULL)
     return FALSE;
 
-  s = htab->sdynbss;
-  BFD_ASSERT (s != NULL);
-
   /* We must generate a R_OR1K_COPY reloc to tell the dynamic linker
      to copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->root.sdynrelro;
+      srel = htab->root.sreldynrelro;
+    }
+  else
+    {
+      s = htab->root.sdynbss;
+      srel = htab->root.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      asection *srel;
-
-      srel = htab->srelbss;
-      BFD_ASSERT (srel != NULL);
       srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
@@ -2227,9 +2153,9 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
         {
-          asection *s = htab->splt;
+          asection *s = htab->root.splt;
 
           /* If this is the first .plt entry, make room for the special
              first entry.  */
@@ -2243,7 +2169,7 @@ allocate_dynrelocs (struct elf_link_hash
              location in the .plt.  This is required to make function
              pointers compare as equal between the normal executable and
              the shared library.  */
-          if (! info->shared
+          if (! bfd_link_pic (info)
               && !h->def_regular)
             {
               h->root.u.def.section = s;
@@ -2255,10 +2181,10 @@ allocate_dynrelocs (struct elf_link_hash
 
           /* We also need to make an entry in the .got.plt section, which
              will be placed in the .got section by the linker script.  */
-          htab->sgotplt->size += 4;
+          htab->root.sgotplt->size += 4;
 
           /* We also need to make an entry in the .rel.plt section.  */
-          htab->srelplt->size += sizeof (Elf32_External_Rela);
+          htab->root.srelplt->size += sizeof (Elf32_External_Rela);
         }
       else
         {
@@ -2287,7 +2213,7 @@ allocate_dynrelocs (struct elf_link_hash
             return FALSE;
         }
 
-      s = htab->sgot;
+      s = htab->root.sgot;
 
       h->got.offset = s->size;
 
@@ -2299,12 +2225,12 @@ allocate_dynrelocs (struct elf_link_hash
       else
         s->size += 4;
       dyn = htab->root.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
         {
           if (tls_type == TLS_GD)
-            htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
+            htab->root.srelgot->size += 2 * sizeof (Elf32_External_Rela);
           else
-            htab->srelgot->size += sizeof (Elf32_External_Rela);
+            htab->root.srelgot->size += sizeof (Elf32_External_Rela);
         }
     }
   else
@@ -2319,7 +2245,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
         {
@@ -2445,7 +2371,7 @@ or1k_elf_size_dynamic_sections (bfd *out
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
         {
           s = bfd_get_section_by_name (dynobj, ".interp");
           BFD_ASSERT (s != NULL);
@@ -2502,8 +2428,8 @@ or1k_elf_size_dynamic_sections (bfd *out
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
       local_tls_type = (unsigned char *) elf_or1k_local_tls_type (ibfd);
       for (; local_got < end_local_got; ++local_got)
         {
@@ -2516,7 +2442,7 @@ or1k_elf_size_dynamic_sections (bfd *out
                 s->size += 8;
               else
                 s->size += 4;
-              if (info->shared)
+              if (bfd_link_pic (info))
                 {
                   if (local_tls_type != NULL && *local_tls_type == TLS_GD)
                     srel->size += 2 * sizeof (Elf32_External_Rela);
@@ -2545,17 +2471,18 @@ or1k_elf_size_dynamic_sections (bfd *out
       if ((s->flags & SEC_LINKER_CREATED) == 0)
         continue;
 
-      if (s == htab->splt
-          || s == htab->sgot
-          || s == htab->sgotplt
-          || s == htab->sdynbss)
+      if (s == htab->root.splt
+          || s == htab->root.sgot
+          || s == htab->root.sgotplt
+	  || s == htab->root.sdynbss
+	  || s == htab->root.sdynrelro)
         {
           /* Strip this section if we don't need it; see the
              comment below.  */
         }
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
         {
-          if (s->size != 0 && s != htab->srelplt)
+          if (s->size != 0 && s != htab->root.srelplt)
             relocs = TRUE;
 
           /* We use the reloc_count field as a counter if we need
@@ -2605,13 +2532,13 @@ or1k_elf_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-     if (info->executable)
+     if (bfd_link_executable (info))
        {
          if (! add_dynamic_entry (DT_DEBUG, 0))
            return FALSE;
        }
 
-     if (htab->splt->size != 0)
+     if (htab->root.splt->size != 0)
        {
          if (! add_dynamic_entry (DT_PLTGOT, 0)
              || ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2646,36 +2573,6 @@ or1k_elf_size_dynamic_sections (bfd *out
   return TRUE;
 }
 
-/* Create dynamic sections when linking against a dynamic object.  */
-
-static bfd_boolean
-or1k_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_or1k_link_hash_table *htab;
-
-  htab = or1k_elf_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  if (!htab->sgot && !create_got_section (dynobj, info))
-    return FALSE;
-
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->splt = bfd_get_section_by_name (dynobj, ".plt");
-  htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
-  htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
-
-  if (!htab->splt || !htab->srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
-}
-
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
@@ -2777,8 +2674,9 @@ or1k_elf_set_private_flags (bfd *abfd, f
    EF_OR1K_NODELAY flag setting.  */
 
 static bfd_boolean
-elf32_or1k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
 
@@ -2802,7 +2700,7 @@ elf32_or1k_merge_private_bfd_data (bfd *
 
   if ((in_flags & EF_OR1K_NODELAY) != (out_flags & EF_OR1K_NODELAY))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: EF_OR1K_NODELAY flag mismatch with previous modules"), ibfd);
 
       bfd_set_error (bfd_error_bad_value);
@@ -2846,9 +2744,12 @@ elf32_or1k_merge_private_bfd_data (bfd *
 #define elf_backend_want_got_plt                1
 #define elf_backend_want_plt_sym                0
 #define elf_backend_got_header_size             12
+#define elf_backend_dtrel_excludes_plt		1
+#define elf_backend_want_dynrelro		1
+
 #define bfd_elf32_bfd_link_hash_table_create    or1k_elf_link_hash_table_create
 #define elf_backend_copy_indirect_symbol        or1k_elf_copy_indirect_symbol
-#define elf_backend_create_dynamic_sections     or1k_elf_create_dynamic_sections
+#define elf_backend_create_dynamic_sections     _bfd_elf_create_dynamic_sections
 #define elf_backend_finish_dynamic_sections     or1k_elf_finish_dynamic_sections
 #define elf_backend_size_dynamic_sections       or1k_elf_size_dynamic_sections
 #define elf_backend_adjust_dynamic_symbol       or1k_elf_adjust_dynamic_symbol
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-pj.c ./bfd/elf32-pj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-pj.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-pj.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* picoJava specific support for 32-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Steve Chamberlan of Transmeta (sac@pobox.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -321,8 +321,9 @@ pj_elf_info_to_howto (bfd *abfd ATTRIBUT
 
   if (r >= R_PJ_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised PicoJava reloc number: %d"),
-			     abfd, r);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised PicoJava reloc number: %d"),
+			  abfd, r);
       bfd_set_error (bfd_error_bad_value);
       r = R_PJ_NONE;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ppc.c ./bfd/elf32-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PowerPC-specific support for 32-bit ELF
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -35,7 +35,7 @@
 #include "elf32-ppc.h"
 #include "elf-vxworks.h"
 #include "dwarf2.h"
-#include "elf-linux-psinfo.h"
+#include "opcode/ppc.h"
 
 typedef enum split16_format_type
 {
@@ -414,7 +414,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_GOT16",		/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -430,7 +430,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_GOT16_LO",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -446,7 +446,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_GOT16_HI",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -462,7 +462,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_GOT16_HA",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -477,8 +477,8 @@ static reloc_howto_type ppc_elf_howto_ra
 	 26,			/* bitsize */
 	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_signed,  /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLTREL24",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -497,7 +497,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_COPY",		/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -513,7 +513,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_GLOB_DAT",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -528,7 +528,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_JMP_SLOT",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -623,7 +623,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLT32",		/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -639,7 +639,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLTREL32",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -655,7 +655,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLT16_LO",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -671,7 +671,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLT16_HI",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -687,7 +687,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_PLT16_HA",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -703,7 +703,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_SDAREL16",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -718,7 +718,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_SECTOFF",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -733,7 +733,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_SECTOFF_LO",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -748,7 +748,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_SECTOFF_HI",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -763,7 +763,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_SECTOFF_HA",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1239,7 +1239,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_NADDR32",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1254,7 +1254,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_NADDR16",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1269,7 +1269,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont,/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_ADDR16_LO",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1284,7 +1284,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_NADDR16_HI", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1301,7 +1301,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_NADDR16_HA", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1318,7 +1318,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_SDAI16",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1335,7 +1335,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_SDA2I16",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1351,7 +1351,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_SDA2REL",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1368,7 +1368,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_SDA21",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1392,7 +1392,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_EMB_RELSDA",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1426,7 +1426,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 "R_PPC_VLE_REL15",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfe,			/* dst_mask */
+	 0xfffe,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
 
   /* A relative 24 bit branch.  */
@@ -1452,11 +1452,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_VLE_LO16A",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* The 16 LSBS in split16d format.  */
@@ -1467,11 +1467,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_LO16D",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_LO16D",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 split16a format.  */
@@ -1482,11 +1482,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_HI16A",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_HI16A",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 split16d format.  */
@@ -1497,11 +1497,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_HI16D",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_HI16D",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 (High Adjusted) in split16a format.  */
@@ -1512,11 +1512,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_HA16A",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_HA16A",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 (High Adjusted) in split16d format.  */
@@ -1527,11 +1527,11 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_HA16D",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_HA16D",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* This reloc is like R_PPC_EMB_SDA21 but only applies to e_add16i
@@ -1544,8 +1544,8 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_PPC_VLE_SDA21",		/* name */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDA21",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
 	 0xffff,		/* dst_mask */
@@ -1559,7 +1559,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_VLE_SDA21_LO",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1573,12 +1573,12 @@ static reloc_howto_type ppc_elf_howto_ra
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_LO16A",	/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_LO16A", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* The 16 LSBS relative to _SDA_BASE_ in split16d format.  */
@@ -1588,72 +1588,72 @@ static reloc_howto_type ppc_elf_howto_ra
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_LO16D",		/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_LO16D", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 relative to _SDA_BASE_ in split16a format.  */
-  HOWTO (R_PPC_VLE_SDAREL_HI16A,	/* type */
+  HOWTO (R_PPC_VLE_SDAREL_HI16A, /* type */
 	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_HI16A",	/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_HI16A", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 relative to _SDA_BASE_ in split16d format.  */
-  HOWTO (R_PPC_VLE_SDAREL_HI16D,	/* type */
+  HOWTO (R_PPC_VLE_SDAREL_HI16D, /* type */
 	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_HI16D",	/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_HI16D", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 (HA) relative to _SDA_BASE split16a format.  */
-  HOWTO (R_PPC_VLE_SDAREL_HA16A,	/* type */
+  HOWTO (R_PPC_VLE_SDAREL_HA16A, /* type */
 	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_HA16A",	/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_HA16A", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f007ff,		/* dst_mask */
+	 0x1f07ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   /* Bits 16-31 (HA) relative to _SDA_BASE split16d format.  */
-  HOWTO (R_PPC_VLE_SDAREL_HA16D,	/* type */
+  HOWTO (R_PPC_VLE_SDAREL_HA16D, /* type */
 	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
-	 "R_PPC_VLE_SDAREL_HA16D",	/* name */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc_elf_unhandled_reloc, /* special_function */
+	 "R_PPC_VLE_SDAREL_HA16D", /* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x1f07ff,		/* dst_mask */
+	 0x3e007ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   HOWTO (R_PPC_IRELATIVE,	/* type */
@@ -1663,7 +1663,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	 /* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_IRELATIVE",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1731,6 +1731,36 @@ static reloc_howto_type ppc_elf_howto_ra
 	 0xffff,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
 
+  /* Like R_PPC_REL16_HA but for split field in addpcis.  */
+  HOWTO (R_PPC_REL16DX_HA,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 "R_PPC_REL16DX_HA",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x1fffc1,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* A split-field reloc for addpcis, non-relative (gas internal use only).  */
+  HOWTO (R_PPC_16DX_HA,		/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 ppc_elf_addr16_ha_reloc, /* special_function */
+	 "R_PPC_16DX_HA",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x1fffc1,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   /* GNU extension to record C++ vtable hierarchy.  */
   HOWTO (R_PPC_GNU_VTINHERIT,	/* type */
 	 0,			/* rightshift */
@@ -1769,7 +1799,7 @@ static reloc_howto_type ppc_elf_howto_ra
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc_elf_unhandled_reloc, /* special_function */
 	 "R_PPC_TOC16",		/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -1804,30 +1834,28 @@ struct elf_external_ppc_linux_prpsinfo32
     char pr_psargs[80];			/* Initial part of arg list.  */
   };
 
-/* Helper macro to swap (properly handling endianess) things from the
-   `elf_internal_prpsinfo' structure to the `elf_external_ppc_prpsinfo32'
-   structure.
-
-   Note that FROM should be a pointer, and TO should be the explicit type.  */
-
-#define PPC_LINUX_PRPSINFO32_SWAP_FIELDS(abfd, from, to)	      \
-  do								      \
-    {								      \
-      H_PUT_8 (abfd, from->pr_state, &to.pr_state);		      \
-      H_PUT_8 (abfd, from->pr_sname, &to.pr_sname);		      \
-      H_PUT_8 (abfd, from->pr_zomb, &to.pr_zomb);		      \
-      H_PUT_8 (abfd, from->pr_nice, &to.pr_nice);		      \
-      H_PUT_32 (abfd, from->pr_flag, to.pr_flag);		      \
-      H_PUT_32 (abfd, from->pr_uid, to.pr_uid);			      \
-      H_PUT_32 (abfd, from->pr_gid, to.pr_gid);			      \
-      H_PUT_32 (abfd, from->pr_pid, to.pr_pid);			      \
-      H_PUT_32 (abfd, from->pr_ppid, to.pr_ppid);		      \
-      H_PUT_32 (abfd, from->pr_pgrp, to.pr_pgrp);		      \
-      H_PUT_32 (abfd, from->pr_sid, to.pr_sid);			      \
-      strncpy (to.pr_fname, from->pr_fname, sizeof (to.pr_fname));    \
-      strncpy (to.pr_psargs, from->pr_psargs, sizeof (to.pr_psargs)); \
-    } while (0)
+/* Helper function to copy an elf_internal_linux_prpsinfo in host
+   endian to an elf_external_ppc_linux_prpsinfo32 in target endian.  */
 
+static inline void
+swap_ppc_linux_prpsinfo32_out (bfd *obfd,
+			       const struct elf_internal_linux_prpsinfo *from,
+			       struct elf_external_ppc_linux_prpsinfo32 *to)
+{
+  bfd_put_8 (obfd, from->pr_state, &to->pr_state);
+  bfd_put_8 (obfd, from->pr_sname, &to->pr_sname);
+  bfd_put_8 (obfd, from->pr_zomb, &to->pr_zomb);
+  bfd_put_8 (obfd, from->pr_nice, &to->pr_nice);
+  bfd_put_32 (obfd, from->pr_flag, to->pr_flag);
+  bfd_put_32 (obfd, from->pr_uid, to->pr_uid);
+  bfd_put_32 (obfd, from->pr_gid, to->pr_gid);
+  bfd_put_32 (obfd, from->pr_pid, to->pr_pid);
+  bfd_put_32 (obfd, from->pr_ppid, to->pr_ppid);
+  bfd_put_32 (obfd, from->pr_pgrp, to->pr_pgrp);
+  bfd_put_32 (obfd, from->pr_sid, to->pr_sid);
+  strncpy (to->pr_fname, from->pr_fname, sizeof (to->pr_fname));
+  strncpy (to->pr_psargs, from->pr_psargs, sizeof (to->pr_psargs));
+}
 
 /* Initialize the ppc_elf_howto_table, so that linear accesses can be done.  */
 
@@ -1989,6 +2017,8 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATT
     case BFD_RELOC_LO16_PCREL:		r = R_PPC_REL16_LO;		break;
     case BFD_RELOC_HI16_PCREL:		r = R_PPC_REL16_HI;		break;
     case BFD_RELOC_HI16_S_PCREL:	r = R_PPC_REL16_HA;		break;
+    case BFD_RELOC_PPC_16DX_HA:		r = R_PPC_16DX_HA;		break;
+    case BFD_RELOC_PPC_REL16DX_HA:	r = R_PPC_REL16DX_HA;		break;
     case BFD_RELOC_VTABLE_INHERIT:	r = R_PPC_GNU_VTINHERIT;	break;
     case BFD_RELOC_VTABLE_ENTRY:	r = R_PPC_GNU_VTENTRY;		break;
     }
@@ -2028,8 +2058,9 @@ ppc_elf_info_to_howto (bfd *abfd ATTRIBU
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_PPC_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised PPC reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised PPC reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_PPC_NONE;
     }
@@ -2039,8 +2070,9 @@ ppc_elf_info_to_howto (bfd *abfd ATTRIBU
      ELF32_R_TYPE (dst->r_info) is necessarily a valid relocation.  */
   if (!cache_ptr->howto)
     {
-      (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-                             abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: invalid relocation type %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
 
       cache_ptr->howto = ppc_elf_howto_table[R_PPC_NONE];
@@ -2058,7 +2090,10 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRI
 			 bfd *output_bfd,
 			 char **error_message ATTRIBUTE_UNUSED)
 {
-  bfd_vma relocation;
+  enum elf_ppc_reloc_type r_type;
+  long insn;
+  bfd_size_type octets;
+  bfd_vma value;
 
   if (output_bfd != NULL)
     {
@@ -2066,20 +2101,28 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRI
       return bfd_reloc_ok;
     }
 
-  if (bfd_is_com_section (symbol->section))
-    relocation = 0;
-  else
-    relocation = symbol->value;
-
-  relocation += symbol->section->output_section->vma;
-  relocation += symbol->section->output_offset;
-  relocation += reloc_entry->addend;
-  if (reloc_entry->howto->pc_relative)
-    relocation -= reloc_entry->address;
-
-  reloc_entry->addend += (relocation & 0x8000) << 1;
-
-  return bfd_reloc_continue;
+  reloc_entry->addend += 0x8000;
+  r_type = reloc_entry->howto->type;
+  if (r_type != R_PPC_REL16DX_HA)
+    return bfd_reloc_continue;
+
+  value = 0;
+  if (!bfd_is_com_section (symbol->section))
+    value = symbol->value;
+  value += (reloc_entry->addend
+	    + symbol->section->output_offset
+	    + symbol->section->output_section->vma);
+  value -= (reloc_entry->address
+	    + input_section->output_offset
+	    + input_section->output_section->vma);
+  value >>= 16;
+
+  octets = reloc_entry->address * bfd_octets_per_byte (abfd);
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
+  insn &= ~0x1fffc1;
+  insn |= (value & 0xffc1) | ((value & 0x3e) << 15);
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
+  return bfd_reloc_ok;
 }
 
 static bfd_reloc_status_type
@@ -2172,13 +2215,94 @@ ppc_elf_mkobject (bfd *abfd)
 				  PPC32_ELF_DATA);
 }
 
+/* When defaulting arch/mach, decode apuinfo to find a better match.  */
+
+bfd_boolean
+_bfd_elf_ppc_set_arch (bfd *abfd)
+{
+  unsigned long mach = 0;
+  asection *s;
+  unsigned char *contents;
+
+  if (abfd->arch_info->bits_per_word == 32
+      && bfd_big_endian (abfd))
+    {
+
+      for (s = abfd->sections; s != NULL; s = s->next)
+	if ((elf_section_data (s)->this_hdr.sh_flags & SHF_PPC_VLE) != 0)
+	  break;
+      if (s != NULL)
+	mach = bfd_mach_ppc_vle;
+    }
+
+  if (mach == 0)
+    {
+      s = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
+      if (s != NULL && bfd_malloc_and_get_section (abfd, s, &contents))
+	{
+	  unsigned int apuinfo_size = bfd_get_32 (abfd, contents + 4);
+	  unsigned int i;
+
+	  for (i = 20; i < apuinfo_size + 20 && i + 4 <= s->size; i += 4)
+	    {
+	      unsigned int val = bfd_get_32 (abfd, contents + i);
+	      switch (val >> 16)
+		{
+		case PPC_APUINFO_PMR:
+		case PPC_APUINFO_RFMCI:
+		  if (mach == 0)
+		    mach = bfd_mach_ppc_titan;
+		  break;
+
+		case PPC_APUINFO_ISEL:
+		case PPC_APUINFO_CACHELCK:
+		  if (mach == bfd_mach_ppc_titan)
+		    mach = bfd_mach_ppc_e500mc;
+		  break;
+
+		case PPC_APUINFO_SPE:
+		case PPC_APUINFO_EFS:
+		case PPC_APUINFO_BRLOCK:
+		  if (mach != bfd_mach_ppc_vle)
+		    mach = bfd_mach_ppc_e500;
+		  break;
+
+		case PPC_APUINFO_VLE:
+		  mach = bfd_mach_ppc_vle;
+		  break;
+
+		default:
+		  mach = -1ul;
+		}
+	    }
+	  free (contents);
+	}
+    }
+
+  if (mach != 0 && mach != -1ul)
+    {
+      const bfd_arch_info_type *arch;
+
+      for (arch = abfd->arch_info->next; arch; arch = arch->next)
+	if (arch->mach == mach)
+	  {
+	    abfd->arch_info = arch;
+	    break;
+	  }
+    }
+  return TRUE;
+}
+
 /* Fix bad default arch selected for a 32 bit input bfd when the
-   default is 64 bit.  */
+   default is 64 bit.  Also select arch based on apuinfo.  */
 
 static bfd_boolean
 ppc_elf_object_p (bfd *abfd)
 {
-  if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64)
+  if (!abfd->arch_info->the_default)
+    return TRUE;
+
+  if (abfd->arch_info->bits_per_word == 64)
     {
       Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
 
@@ -2189,7 +2313,7 @@ ppc_elf_object_p (bfd *abfd)
 	  BFD_ASSERT (abfd->arch_info->bits_per_word == 32);
 	}
     }
-  return TRUE;
+  return _bfd_elf_ppc_set_arch (abfd);
 }
 
 /* Function to set whether a module needs the -mrelocatable bit set.  */
@@ -2270,14 +2394,15 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Inte
 }
 
 char *
-elfcore_write_ppc_linux_prpsinfo32 (bfd *abfd, char *buf, int *bufsiz,
-				      const struct elf_internal_linux_prpsinfo *prpsinfo)
+elfcore_write_ppc_linux_prpsinfo32
+  (bfd *abfd,
+   char *buf,
+   int *bufsiz,
+   const struct elf_internal_linux_prpsinfo *prpsinfo)
 {
   struct elf_external_ppc_linux_prpsinfo32 data;
 
-  memset (&data, 0, sizeof (data));
-  PPC_LINUX_PRPSINFO32_SWAP_FIELDS (abfd, prpsinfo, data);
-
+  swap_ppc_linux_prpsinfo32_out (abfd, prpsinfo, &data);
   return elfcore_write_note (abfd, buf, bufsiz,
 			     "CORE", NT_PRPSINFO, &data, sizeof (data));
 }
@@ -2338,18 +2463,6 @@ ppc_elf_lookup_section_flags (char *flag
   return 0;
 }
 
-/* Add the VLE flag if required.  */
-
-bfd_boolean
-ppc_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *shdr)
-{
-  if (bfd_get_mach (abfd) == bfd_mach_ppc_vle
-      && (shdr->sh_flags & SHF_EXECINSTR) != 0)
-    shdr->sh_flags |= SHF_PPC_VLE;
-
-  return TRUE;
-}
-
 /* Return address for Ith PLT stub in section PLT, for relocation REL
    or (bfd_vma) -1 if it should not be included.  */
 
@@ -2429,10 +2542,7 @@ bfd_boolean
 ppc_elf_modify_segment_map (bfd *abfd,
 			    struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
-  struct elf_segment_map *m, *n;
-  bfd_size_type amt;
-  unsigned int j, k;
-  bfd_boolean sect0_vle, sectj_vle;
+  struct elf_segment_map *m;
 
   /* At this point in the link, output sections have already been sorted by
      LMA and assigned to segments.  All that is left to do is to ensure
@@ -2442,25 +2552,59 @@ ppc_elf_modify_segment_map (bfd *abfd,
 
   for (m = elf_seg_map (abfd); m != NULL; m = m->next)
     {
-      if (m->count == 0)
+      struct elf_segment_map *n;
+      bfd_size_type amt;
+      unsigned int j, k;
+      unsigned int p_flags;
+
+      if (m->p_type != PT_LOAD || m->count == 0)
 	continue;
 
-      sect0_vle = (elf_section_flags (m->sections[0]) & SHF_PPC_VLE) != 0;
-      for (j = 1; j < m->count; ++j)
+      for (p_flags = PF_R, j = 0; j != m->count; ++j)
 	{
-	  sectj_vle = (elf_section_flags (m->sections[j]) & SHF_PPC_VLE) != 0;
+	  if ((m->sections[j]->flags & SEC_READONLY) == 0)
+	    p_flags |= PF_W;
+	  if ((m->sections[j]->flags & SEC_CODE) != 0)
+	    {
+	      p_flags |= PF_X;
+	      if ((elf_section_flags (m->sections[j]) & SHF_PPC_VLE) != 0)
+		p_flags |= PF_PPC_VLE;
+	      break;
+	    }
+	}
+      if (j != m->count)
+	while (++j != m->count)
+	  {
+	    unsigned int p_flags1 = PF_R;
 
-	  if (sectj_vle != sect0_vle)
-	    break;
-        }
-      if (j >= m->count)
+	    if ((m->sections[j]->flags & SEC_READONLY) == 0)
+	      p_flags1 |= PF_W;
+	    if ((m->sections[j]->flags & SEC_CODE) != 0)
+	      {
+		p_flags1 |= PF_X;
+		if ((elf_section_flags (m->sections[j]) & SHF_PPC_VLE) != 0)
+		  p_flags1 |= PF_PPC_VLE;
+		if (((p_flags1 ^ p_flags) & PF_PPC_VLE) != 0)
+		  break;
+	      }
+	    p_flags |= p_flags1;
+	  }
+      /* If we're splitting a segment which originally contained rw
+	 sections then those sections might now only be in one of the
+	 two parts.  So always set p_flags if splitting, even if we
+	 are being called for objcopy with p_flags_valid set.  */
+      if (j != m->count || !m->p_flags_valid)
+	{
+	  m->p_flags_valid = 1;
+	  m->p_flags = p_flags;
+	}
+      if (j == m->count)
 	continue;
 
-      /* sections 0..j-1 stay in this (current) segment,
+      /* Sections 0..j-1 stay in this (current) segment,
 	 the remainder are put in a new segment.
 	 The scan resumes with the new segment.  */
 
-      /* Fix the new segment.  */
       amt = sizeof (struct elf_segment_map);
       amt += (m->count - j - 1) * sizeof (asection *);
       n = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
@@ -2468,20 +2612,13 @@ ppc_elf_modify_segment_map (bfd *abfd,
         return FALSE;
 
       n->p_type = PT_LOAD;
-      n->p_flags = PF_X | PF_R;
-      if (sectj_vle)
-        n->p_flags |= PF_PPC_VLE;
       n->count = m->count - j;
       for (k = 0; k < n->count; ++k)
-        {
-          n->sections[k] = m->sections[j+k];
-          m->sections[j+k] = NULL;
-	}
+	n->sections[k] = m->sections[j + k];
+      m->count = j;
+      m->p_size_valid = 0;
       n->next = m->next;
       m->next = n;
-
-      /* Fix the current segment  */
-      m->count = j;
     }
 
   return TRUE;
@@ -2494,16 +2631,16 @@ ppc_elf_modify_segment_map (bfd *abfd,
 
 static const struct bfd_elf_special_section ppc_elf_special_sections[] =
 {
-  { STRING_COMMA_LEN (".plt"),             0, SHT_NOBITS,   SHF_ALLOC + SHF_EXECINSTR },
-  { STRING_COMMA_LEN (".sbss"),           -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
-  { STRING_COMMA_LEN (".sbss2"),          -2, SHT_PROGBITS, SHF_ALLOC },
-  { STRING_COMMA_LEN (".sdata"),          -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
-  { STRING_COMMA_LEN (".sdata2"),         -2, SHT_PROGBITS, SHF_ALLOC },
-  { STRING_COMMA_LEN (".tags"),            0, SHT_ORDERED,  SHF_ALLOC },
-  { STRING_COMMA_LEN (".PPC.EMB.apuinfo"), 0, SHT_NOTE,     0 },
-  { STRING_COMMA_LEN (".PPC.EMB.sbss0"),   0, SHT_PROGBITS, SHF_ALLOC },
-  { STRING_COMMA_LEN (".PPC.EMB.sdata0"),  0, SHT_PROGBITS, SHF_ALLOC },
-  { NULL,                              0,  0, 0,            0 }
+  { STRING_COMMA_LEN (".plt"), 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+  { STRING_COMMA_LEN (".sbss2"), -2, SHT_PROGBITS, SHF_ALLOC },
+  { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { STRING_COMMA_LEN (".sdata2"), -2, SHT_PROGBITS, SHF_ALLOC },
+  { STRING_COMMA_LEN (".tags"), 0, SHT_ORDERED, SHF_ALLOC },
+  { STRING_COMMA_LEN (APUINFO_SECTION_NAME), 0, SHT_NOTE, 0 },
+  { STRING_COMMA_LEN (".PPC.EMB.sbss0"), 0, SHT_PROGBITS, SHF_ALLOC },
+  { STRING_COMMA_LEN (".PPC.EMB.sdata0"), 0, SHT_PROGBITS, SHF_ALLOC },
+  { NULL, 0, 0, 0, 0 }
 };
 
 /* This is what we want for new plt/got.  */
@@ -2612,9 +2749,6 @@ apuinfo_list_finish (void)
   head = NULL;
 }
 
-#define APUINFO_SECTION_NAME	".PPC.EMB.apuinfo"
-#define APUINFO_LABEL		"APUinfo"
-
 /* Scan the input BFDs and create a linked list of
    the APUinfo values that will need to be emitted.  */
 
@@ -2643,6 +2777,7 @@ ppc_elf_begin_write_processing (bfd *abf
       if (asec == NULL)
 	continue;
 
+      /* xgettext:c-format */
       error_message = _("corrupt %s section in %B");
       length = asec->size;
       if (length < 20)
@@ -2662,6 +2797,7 @@ ppc_elf_begin_write_processing (bfd *abf
       if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0
 	  || (bfd_bread (buffer, length, ibfd) != length))
 	{
+	  /* xgettext:c-format */
 	  error_message = _("unable to read in %s section from %B");
 	  goto fail;
 	}
@@ -2703,6 +2839,7 @@ ppc_elf_begin_write_processing (bfd *abf
       if (asec && ! bfd_set_section_size (abfd, asec, 20 + num_entries * 4))
 	{
 	  ibfd = abfd;
+	  /* xgettext:c-format */
 	  error_message = _("warning: unable to set size of %s section in %B");
 	}
     }
@@ -2712,7 +2849,7 @@ ppc_elf_begin_write_processing (bfd *abf
     free (buffer);
 
   if (error_message)
-    (*_bfd_error_handler) (error_message, ibfd, APUINFO_SECTION_NAME);
+    _bfd_error_handler (error_message, ibfd, APUINFO_SECTION_NAME);
 }
 
 /* Prevent the output section from accumulating the input sections'
@@ -2752,7 +2889,7 @@ ppc_elf_final_write_processing (bfd *abf
   buffer = bfd_malloc (length);
   if (buffer == NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("failed to allocate space for new APUinfo section."));
       return;
     }
@@ -2772,10 +2909,10 @@ ppc_elf_final_write_processing (bfd *abf
     }
 
   if (length != asec->size)
-    (*_bfd_error_handler) (_("failed to compute new APUinfo section."));
+    _bfd_error_handler (_("failed to compute new APUinfo section."));
 
   if (! bfd_set_section_contents (abfd, asec, buffer, (file_ptr) 0, length))
-    (*_bfd_error_handler) (_("failed to install new APUinfo section."));
+    _bfd_error_handler (_("failed to install new APUinfo section."));
 
   free (buffer);
 
@@ -3080,7 +3217,7 @@ must_be_dyn_reloc (struct bfd_link_info 
     case R_PPC_TPREL16_LO:
     case R_PPC_TPREL16_HI:
     case R_PPC_TPREL16_HA:
-      return !info->executable;
+      return !bfd_link_executable (info);
     }
 }
 
@@ -3154,15 +3291,7 @@ struct ppc_elf_link_hash_table
   struct ppc_elf_params *params;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *got;
-  asection *relgot;
   asection *glink;
-  asection *plt;
-  asection *relplt;
-  asection *iplt;
-  asection *reliplt;
-  asection *dynbss;
-  asection *relbss;
   asection *dynsbss;
   asection *relsbss;
   elf_linker_section_t sdata[2];
@@ -3172,9 +3301,6 @@ struct ppc_elf_link_hash_table
   /* The (unloaded but important) .rela.plt.unloaded on VxWorks.  */
   asection *srelplt2;
 
-  /* The .got.plt section (VxWorks only)*/
-  asection *sgotplt;
-
   /* Shortcut to __tls_get_addr.  */
   struct elf_link_hash_entry *tls_get_addr;
 
@@ -3263,7 +3389,8 @@ static struct bfd_link_hash_table *
 ppc_elf_link_hash_table_create (bfd *abfd)
 {
   struct ppc_elf_link_hash_table *ret;
-  static struct ppc_elf_params default_params = { PLT_OLD, 0, 1, 0, 0, 12, 0 };
+  static struct ppc_elf_params default_params
+    = { PLT_OLD, 0, 1, 0, 0, 12, 0, 0, 0 };
 
   ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table));
   if (ret == NULL)
@@ -3309,6 +3436,7 @@ ppc_elf_link_params (struct bfd_link_inf
 
   if (htab)
     htab->params = params;
+  params->pagesize_p2 = bfd_log2 (params->pagesize);
 }
 
 /* Create .got and the related sections.  */
@@ -3317,37 +3445,21 @@ static bfd_boolean
 ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info)
 {
   struct ppc_elf_link_hash_table *htab;
-  asection *s;
-  flagword flags;
 
   if (!_bfd_elf_create_got_section (abfd, info))
     return FALSE;
 
   htab = ppc_elf_hash_table (info);
-  htab->got = s = bfd_get_linker_section (abfd, ".got");
-  if (s == NULL)
-    abort ();
-
-  if (htab->is_vxworks)
-    {
-      htab->sgotplt = bfd_get_linker_section (abfd, ".got.plt");
-      if (!htab->sgotplt)
-	abort ();
-    }
-  else
+  if (!htab->is_vxworks)
     {
       /* The powerpc .got has a blrl instruction in it.  Mark it
 	 executable.  */
-      flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS
-	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-      if (!bfd_set_section_flags (abfd, s, flags))
+      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS
+			| SEC_IN_MEMORY | SEC_LINKER_CREATED);
+      if (!bfd_set_section_flags (abfd, htab->elf.sgot, flags))
 	return FALSE;
     }
 
-  htab->relgot = bfd_get_linker_section (abfd, ".rela.got");
-  if (!htab->relgot)
-    abort ();
-
   return TRUE;
 }
 
@@ -3410,7 +3522,7 @@ ppc_elf_create_glink (bfd *abfd, struct 
 
   flags = SEC_ALLOC | SEC_LINKER_CREATED;
   s = bfd_make_section_anyway_with_flags (abfd, ".iplt", flags);
-  htab->iplt = s;
+  htab->elf.iplt = s;
   if (s == NULL
       || !bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
@@ -3418,7 +3530,7 @@ ppc_elf_create_glink (bfd *abfd, struct 
   flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
 	   | SEC_IN_MEMORY | SEC_LINKER_CREATED);
   s = bfd_make_section_anyway_with_flags (abfd, ".rela.iplt", flags);
-  htab->reliplt = s;
+  htab->elf.irelplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, 2))
     return FALSE;
@@ -3447,7 +3559,7 @@ ppc_elf_create_dynamic_sections (bfd *ab
 
   htab = ppc_elf_hash_table (info);
 
-  if (htab->got == NULL
+  if (htab->elf.sgot == NULL
       && !ppc_elf_create_got (abfd, info))
     return FALSE;
 
@@ -3458,16 +3570,14 @@ ppc_elf_create_dynamic_sections (bfd *ab
       && !ppc_elf_create_glink (abfd, info))
     return FALSE;
 
-  htab->dynbss = bfd_get_linker_section (abfd, ".dynbss");
   s = bfd_make_section_anyway_with_flags (abfd, ".dynsbss",
 					  SEC_ALLOC | SEC_LINKER_CREATED);
   htab->dynsbss = s;
   if (s == NULL)
     return FALSE;
 
-  if (! info->shared)
+  if (! bfd_link_pic (info))
     {
-      htab->relbss = bfd_get_linker_section (abfd, ".rela.bss");
       flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
 	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
       s = bfd_make_section_anyway_with_flags (abfd, ".rela.sbss", flags);
@@ -3481,11 +3591,7 @@ ppc_elf_create_dynamic_sections (bfd *ab
       && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
     return FALSE;
 
-  htab->relplt = bfd_get_linker_section (abfd, ".rela.plt");
-  htab->plt = s = bfd_get_linker_section (abfd, ".plt");
-  if (s == NULL)
-    abort ();
-
+  s = htab->elf.splt;
   flags = SEC_ALLOC | SEC_CODE | SEC_LINKER_CREATED;
   if (htab->plt_type == PLT_VXWORKS)
     /* The VxWorks PLT is a loaded section with contents.  */
@@ -3516,7 +3622,8 @@ ppc_elf_copy_indirect_symbol (struct bfd
 	&& edir->elf.dynamic_adjusted))
     edir->elf.non_got_ref |= eind->elf.non_got_ref;
 
-  edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
+  if (edir->elf.versioned != versioned_hidden)
+    edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
   edir->elf.ref_regular |= eind->elf.ref_regular;
   edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
   edir->elf.needs_plt |= eind->elf.needs_plt;
@@ -3622,7 +3729,7 @@ ppc_elf_add_symbol_hook (bfd *abfd,
 			 bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && is_ppc_elf (info->output_bfd)
       && sym->st_size <= elf_gp_size (abfd))
     {
@@ -3649,11 +3756,10 @@ ppc_elf_add_symbol_hook (bfd *abfd,
       *valp = sym->st_size;
     }
 
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   return TRUE;
 }
@@ -3845,13 +3951,15 @@ is_branch_reloc (enum elf_ppc_reloc_type
 	  || r_type == R_PPC_ADDR24
 	  || r_type == R_PPC_ADDR14
 	  || r_type == R_PPC_ADDR14_BRTAKEN
-	  || r_type == R_PPC_ADDR14_BRNTAKEN);
+	  || r_type == R_PPC_ADDR14_BRNTAKEN
+	  || r_type == R_PPC_VLE_REL24);
 }
 
 static void
 bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type)
 {
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext:c-format */
     (_("%B: relocation %s cannot be used when making a shared object"),
      abfd,
      ppc_elf_howto_table[r_type]->name);
@@ -3876,7 +3984,7 @@ ppc_elf_check_relocs (bfd *abfd,
   asection *got2, *sreloc;
   struct elf_link_hash_entry *tga;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Don't do anything special with non-loaded, non-alloced sections.
@@ -3921,6 +4029,7 @@ ppc_elf_check_relocs (bfd *abfd,
       enum elf_ppc_reloc_type r_type;
       struct elf_link_hash_entry *h;
       int tls_type;
+      struct plt_entry **ifunc;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
@@ -3941,7 +4050,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	 This shows up in particular in an R_PPC_ADDR32 in the eabi
 	 startup code.  */
       if (h != NULL
-	  && htab->got == NULL
+	  && htab->elf.sgot == NULL
 	  && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
 	{
 	  if (htab->elf.dynobj == NULL)
@@ -3953,6 +4062,7 @@ ppc_elf_check_relocs (bfd *abfd,
 
       tls_type = 0;
       r_type = ELF32_R_TYPE (rel->r_info);
+      ifunc = NULL;
       if (h == NULL && !htab->is_vxworks)
 	{
 	  Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
@@ -3962,8 +4072,6 @@ ppc_elf_check_relocs (bfd *abfd,
 
 	  if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
 	    {
-	      struct plt_entry **ifunc;
-
 	      /* Set PLT_IFUNC flag for this sym, no GOT entry yet.  */
 	      ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx,
 					     PLT_IFUNC);
@@ -3973,14 +4081,14 @@ ppc_elf_check_relocs (bfd *abfd,
 	      /* STT_GNU_IFUNC symbols must have a PLT entry;
 		 In a non-pie executable even when there are
 		 no plt calls.  */
-	      if (!info->shared
+	      if (!bfd_link_pic (info)
 		  || is_branch_reloc (r_type))
 		{
 		  bfd_vma addend = 0;
 		  if (r_type == R_PPC_PLTREL24)
 		    {
 		      ppc_elf_tdata (abfd)->makes_plt_call = 1;
-		      if (info->shared)
+		      if (bfd_link_pic (info))
 			addend = rel->r_addend;
 		    }
 		  if (!update_plt_info (abfd, ifunc, got2, addend))
@@ -4031,7 +4139,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_GOT_TPREL16_LO:
 	case R_PPC_GOT_TPREL16_HI:
 	case R_PPC_GOT_TPREL16_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  tls_type = TLS_TLS | TLS_TPREL;
 	  goto dogottls;
@@ -4043,7 +4151,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	  tls_type = TLS_TLS | TLS_DTPREL;
 	dogottls:
 	  sec->has_tls_reloc = 1;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	  /* GOT16 relocations */
 	case R_PPC_GOT16:
@@ -4051,7 +4159,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_GOT16_HI:
 	case R_PPC_GOT16_HA:
 	  /* This symbol requires a global offset table entry.  */
-	  if (htab->got == NULL)
+	  if (htab->elf.sgot == NULL)
 	    {
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
@@ -4070,7 +4178,7 @@ ppc_elf_check_relocs (bfd *abfd,
 
 	  /* We may also need a plt entry if the symbol turns out to be
 	     an ifunc.  */
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      if (!update_plt_info (abfd, &h->plt.plist, NULL, 0))
 		return FALSE;
@@ -4079,7 +4187,7 @@ ppc_elf_check_relocs (bfd *abfd,
 
 	  /* Indirect .sdata relocation.  */
 	case R_PPC_EMB_SDAI16:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bad_shared_reloc (abfd, r_type);
 	      return FALSE;
@@ -4097,7 +4205,7 @@ ppc_elf_check_relocs (bfd *abfd,
 
 	  /* Indirect .sdata2 relocation.  */
 	case R_PPC_EMB_SDA2I16:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bad_shared_reloc (abfd, r_type);
 	      return FALSE;
@@ -4115,7 +4223,7 @@ ppc_elf_check_relocs (bfd *abfd,
 
 	case R_PPC_SDAREL16:
 	  htab->sdata[0].sym->ref_regular = 1;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	case R_PPC_VLE_SDAREL_LO16A:
 	case R_PPC_VLE_SDAREL_LO16D:
@@ -4142,7 +4250,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	  break;
 
 	case R_PPC_EMB_SDA2REL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bad_shared_reloc (abfd, r_type);
 	      return FALSE;
@@ -4159,7 +4267,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_VLE_SDA21:
 	case R_PPC_EMB_SDA21:
 	case R_PPC_EMB_RELSDA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bad_shared_reloc (abfd, r_type);
 	      return FALSE;
@@ -4176,7 +4284,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_EMB_NADDR16_LO:
 	case R_PPC_EMB_NADDR16_HI:
 	case R_PPC_EMB_NADDR16_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      bad_shared_reloc (abfd, r_type);
 	      return FALSE;
@@ -4197,21 +4305,21 @@ ppc_elf_check_relocs (bfd *abfd,
 #ifdef DEBUG
 	  fprintf (stderr, "Reloc requires a PLT entry\n");
 #endif
-	  /* This symbol requires a procedure linkage table entry.  We
-	     actually build the entry in finish_dynamic_symbol,
-	     because this might be a case of linking PIC code without
-	     linking in any dynamic objects, in which case we don't
-	     need to generate a procedure linkage table after all.  */
-
+	  /* This symbol requires a procedure linkage table entry.  */
 	  if (h == NULL)
 	    {
-	      /* It does not make sense to have a procedure linkage
-		 table entry for a local symbol.  */
-	      info->callbacks->einfo (_("%P: %H: %s reloc against local symbol\n"),
-				      abfd, sec, rel->r_offset,
-				      ppc_elf_howto_table[r_type]->name);
-	      bfd_set_error (bfd_error_bad_value);
-	      return FALSE;
+	      if (ifunc == NULL)
+		{
+		  /* It does not make sense to have a procedure linkage
+		     table entry for a non-ifunc local symbol.  */
+		  info->callbacks->einfo
+		    /* xgettext:c-format */
+		    (_("%H: %s reloc against local symbol\n"),
+		     abfd, sec, rel->r_offset,
+		     ppc_elf_howto_table[r_type]->name);
+		  bfd_set_error (bfd_error_bad_value);
+		  return FALSE;
+		}
 	    }
 	  else
 	    {
@@ -4220,7 +4328,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	      if (r_type == R_PPC_PLTREL24)
 		{
 		  ppc_elf_tdata (abfd)->makes_plt_call = 1;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    addend = rel->r_addend;
 		}
 	      h->needs_plt = 1;
@@ -4247,6 +4355,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_REL16_LO:
 	case R_PPC_REL16_HI:
 	case R_PPC_REL16_HA:
+	case R_PPC_REL16DX_HA:
 	  ppc_elf_tdata (abfd)->has_rel16 = 1;
 	  break;
 
@@ -4258,6 +4367,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_RELAX:
 	case R_PPC_RELAX_PLT:
 	case R_PPC_RELAX_PLTREL24:
+	case R_PPC_16DX_HA:
 	  break;
 
 	  /* These should only appear in dynamic objects.  */
@@ -4286,14 +4396,6 @@ ppc_elf_check_relocs (bfd *abfd,
 	    }
 	  if (h != NULL && h->type == STT_GNU_IFUNC)
 	    {
-	      if (info->shared)
-		{
-		  info->callbacks->einfo (_("%P: %H: @local call to ifunc %s\n"),
-					  abfd, sec, rel->r_offset,
-					  h->root.root.string);
-		  bfd_set_error (bfd_error_bad_value);
-		  return FALSE;
-		}
 	      h->needs_plt = 1;
 	      if (!update_plt_info (abfd, &h->plt.plist, NULL, 0))
 		return FALSE;
@@ -4322,7 +4424,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_TPREL16_LO:
 	case R_PPC_TPREL16_HI:
 	case R_PPC_TPREL16_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  goto dodyn;
 
@@ -4335,7 +4437,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	  if (h == NULL
 	      && got2 != NULL
 	      && (sec->flags & SEC_CODE) != 0
-	      && info->shared
+	      && bfd_link_pic (info)
 	      && htab->plt_type == PLT_UNSET)
 	    {
 	      /* Old -fPIC gcc code has .long LCTOC1-LCFx just before
@@ -4370,7 +4472,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_ADDR16_HA:
 	case R_PPC_UADDR32:
 	case R_PPC_UADDR16:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      /* We may need a plt entry if the symbol turns out to be
 		 a function defined in a dynamic object.  */
@@ -4408,7 +4510,7 @@ ppc_elf_check_relocs (bfd *abfd,
 	case R_PPC_ADDR14:
 	case R_PPC_ADDR14_BRTAKEN:
 	case R_PPC_ADDR14_BRNTAKEN:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      /* We may need a plt entry if the symbol turns out to be
 		 a function defined in a dynamic object.  */
@@ -4440,14 +4542,14 @@ ppc_elf_check_relocs (bfd *abfd,
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (must_be_dyn_reloc (info, r_type)
 		   || (h != NULL
 		       && (!SYMBOLIC_BIND (info, h)
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular)))
@@ -4544,68 +4646,98 @@ ppc_elf_check_relocs (bfd *abfd,
   return TRUE;
 }
 
-
-/* Merge object attributes from IBFD into OBFD.  Raise an error if
-   there are conflicting attributes.  */
-static bfd_boolean
-ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+/* Warn for conflicting Tag_GNU_Power_ABI_FP attributes between IBFD
+   and OBFD, and merge non-conflicting ones.  */
+void
+_bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr, *in_attrs;
   obj_attribute *out_attr, *out_attrs;
 
-  if (!elf_known_obj_attributes_proc (obfd)[0].i)
-    {
-      /* This is the first object.  Copy the attributes.  */
-      _bfd_elf_copy_obj_attributes (ibfd, obfd);
-
-      /* Use the Tag_null value to indicate the attributes have been
-	 initialized.  */
-      elf_known_obj_attributes_proc (obfd)[0].i = 1;
-
-      return TRUE;
-    }
-
   in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
   out_attrs = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
 
-  /* Check for conflicting Tag_GNU_Power_ABI_FP attributes and merge
-     non-conflicting ones.  */
   in_attr = &in_attrs[Tag_GNU_Power_ABI_FP];
   out_attr = &out_attrs[Tag_GNU_Power_ABI_FP];
+
   if (in_attr->i != out_attr->i)
     {
-      out_attr->type = 1;
-      if (out_attr->i == 0)
-	out_attr->i = in_attr->i;
-      else if (in_attr->i == 0)
+      int in_fp = in_attr->i & 3;
+      int out_fp = out_attr->i & 3;
+
+      if (in_fp == 0)
 	;
-      else if (out_attr->i == 1 && in_attr->i == 2)
+      else if (out_fp == 0)
+	{
+	  out_attr->type = 1;
+	  out_attr->i ^= in_fp;
+	}
+      else if (out_fp != 2 && in_fp == 2)
 	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("Warning: %B uses hard float, %B uses soft float"), obfd, ibfd);
-      else if (out_attr->i == 1 && in_attr->i == 3)
+      else if (out_fp == 2 && in_fp != 2)
+	_bfd_error_handler
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd);
+      else if (out_fp == 1 && in_fp == 3)
 	_bfd_error_handler
-	  (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"),
-	  obfd, ibfd);
-      else if (out_attr->i == 3 && in_attr->i == 1)
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses double-precision hard float, "
+	     "%B uses single-precision hard float"), obfd, ibfd);
+      else if (out_fp == 3 && in_fp == 1)
 	_bfd_error_handler
-	  (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"),
-	  ibfd, obfd);
-      else if (out_attr->i == 3 && in_attr->i == 2)
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses double-precision hard float, "
+	     "%B uses single-precision hard float"), ibfd, obfd);
+
+      in_fp = in_attr->i & 0xc;
+      out_fp = out_attr->i & 0xc;
+      if (in_fp == 0)
+	;
+      else if (out_fp == 0)
+	{
+	  out_attr->type = 1;
+	  out_attr->i ^= in_fp;
+	}
+      else if (out_fp != 2 * 4 && in_fp == 2 * 4)
 	_bfd_error_handler
-	  (_("Warning: %B uses soft float, %B uses single-precision hard float"),
-	  ibfd, obfd);
-      else if (out_attr->i == 2 && (in_attr->i == 1 || in_attr->i == 3))
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses 64-bit long double, "
+	     "%B uses 128-bit long double"), ibfd, obfd);
+      else if (in_fp != 2 * 4 && out_fp == 2 * 4)
 	_bfd_error_handler
-	  (_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd);
-      else if (in_attr->i > 3)
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses 64-bit long double, "
+	     "%B uses 128-bit long double"), obfd, ibfd);
+      else if (out_fp == 1 * 4 && in_fp == 3 * 4)
 	_bfd_error_handler
-	  (_("Warning: %B uses unknown floating point ABI %d"), ibfd,
-	   in_attr->i);
-      else
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses IBM long double, "
+	     "%B uses IEEE long double"), ibfd, obfd);
+      else if (out_fp == 3 * 4 && in_fp == 1 * 4)
 	_bfd_error_handler
-	  (_("Warning: %B uses unknown floating point ABI %d"), obfd,
-	   out_attr->i);
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses IBM long double, "
+	     "%B uses IEEE long double"), obfd, ibfd);
     }
+}
+
+/* Merge object attributes from IBFD into OBFD.  Warn if
+   there are conflicting attributes.  */
+static bfd_boolean
+ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
+{
+  bfd *obfd;
+  obj_attribute *in_attr, *in_attrs;
+  obj_attribute *out_attr, *out_attrs;
+
+  _bfd_elf_ppc_merge_fp_attributes (ibfd, info);
+
+  obfd = info->output_bfd;
+  in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
+  out_attrs = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
 
   /* Check for conflicting Tag_GNU_Power_ABI_Vector attributes and
      merge non-conflicting ones.  */
@@ -4613,48 +4745,38 @@ ppc_elf_merge_obj_attributes (bfd *ibfd,
   out_attr = &out_attrs[Tag_GNU_Power_ABI_Vector];
   if (in_attr->i != out_attr->i)
     {
-      const char *in_abi = NULL, *out_abi = NULL;
-
-      switch (in_attr->i)
-	{
-	case 1: in_abi = "generic"; break;
-	case 2: in_abi = "AltiVec"; break;
-	case 3: in_abi = "SPE"; break;
-	}
+      int in_vec = in_attr->i & 3;
+      int out_vec = out_attr->i & 3;
 
-      switch (out_attr->i)
+      if (in_vec == 0)
+	;
+      else if (out_vec == 0)
 	{
-	case 1: out_abi = "generic"; break;
-	case 2: out_abi = "AltiVec"; break;
-	case 3: out_abi = "SPE"; break;
+	  out_attr->type = 1;
+	  out_attr->i = in_vec;
 	}
-
-      out_attr->type = 1;
-      if (out_attr->i == 0)
-	out_attr->i = in_attr->i;
-      else if (in_attr->i == 0)
-	;
       /* For now, allow generic to transition to AltiVec or SPE
 	 without a warning.  If GCC marked files with their stack
 	 alignment and used don't-care markings for files which are
 	 not affected by the vector ABI, we could warn about this
 	 case too.  */
-      else if (out_attr->i == 1)
-	out_attr->i = in_attr->i;
-      else if (in_attr->i == 1)
+      else if (in_vec == 1)
 	;
-      else if (in_abi == NULL)
-	_bfd_error_handler
-	  (_("Warning: %B uses unknown vector ABI %d"), ibfd,
-	   in_attr->i);
-      else if (out_abi == NULL)
+      else if (out_vec == 1)
+	{
+	  out_attr->type = 1;
+	  out_attr->i = in_vec;
+	}
+      else if (out_vec < in_vec)
 	_bfd_error_handler
-	  (_("Warning: %B uses unknown vector ABI %d"), obfd,
-	   in_attr->i);
-      else
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses AltiVec vector ABI, %B uses SPE vector ABI"),
+	   obfd, ibfd);
+      else if (out_vec > in_vec)
 	_bfd_error_handler
-	  (_("Warning: %B uses vector ABI \"%s\", %B uses \"%s\""),
-	   ibfd, obfd, in_abi, out_abi);
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses AltiVec vector ABI, %B uses SPE vector ABI"),
+	   ibfd, obfd);
     }
 
   /* Check for conflicting Tag_GNU_Power_ABI_Struct_Return attributes
@@ -4663,29 +4785,30 @@ ppc_elf_merge_obj_attributes (bfd *ibfd,
   out_attr = &out_attrs[Tag_GNU_Power_ABI_Struct_Return];
   if (in_attr->i != out_attr->i)
     {
-      out_attr->type = 1;
-      if (out_attr->i == 0)
-       out_attr->i = in_attr->i;
-      else if (in_attr->i == 0)
+      int in_struct = in_attr->i & 3;
+      int out_struct = out_attr->i & 3;
+
+      if (in_struct == 0 || in_struct == 3)
        ;
-      else if (out_attr->i == 1 && in_attr->i == 2)
-       _bfd_error_handler
-         (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), obfd, ibfd);
-      else if (out_attr->i == 2 && in_attr->i == 1)
-       _bfd_error_handler
-         (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), ibfd, obfd);
-      else if (in_attr->i > 2)
-       _bfd_error_handler
-         (_("Warning: %B uses unknown small structure return convention %d"), ibfd,
-          in_attr->i);
-      else
-       _bfd_error_handler
-         (_("Warning: %B uses unknown small structure return convention %d"), obfd,
-          out_attr->i);
+      else if (out_struct == 0)
+	{
+	  out_attr->type = 1;
+	  out_attr->i = in_struct;
+	}
+      else if (out_struct < in_struct)
+	_bfd_error_handler
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses r3/r4 for small structure returns, "
+	     "%B uses memory"), obfd, ibfd);
+      else if (out_struct > in_struct)
+	_bfd_error_handler
+	  /* xgettext:c-format */
+	  (_("Warning: %B uses r3/r4 for small structure returns, "
+	     "%B uses memory"), ibfd, obfd);
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  _bfd_elf_merge_object_attributes (ibfd, info);
 
   return TRUE;
 }
@@ -4694,8 +4817,9 @@ ppc_elf_merge_obj_attributes (bfd *ibfd,
    object file when linking.  */
 
 static bfd_boolean
-ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
   bfd_boolean error;
@@ -4704,10 +4828,10 @@ ppc_elf_merge_private_bfd_data (bfd *ibf
     return TRUE;
 
   /* Check if we have the same endianness.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
-  if (!ppc_elf_merge_obj_attributes (ibfd, obfd))
+  if (!ppc_elf_merge_obj_attributes (ibfd, info))
     return FALSE;
 
   new_flags = elf_elfheader (ibfd)->e_flags;
@@ -4733,7 +4857,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibf
 	  && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: compiled with -mrelocatable and linked with "
 	       "modules compiled normally"), ibfd);
 	}
@@ -4741,7 +4865,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibf
 	       && (old_flags & EF_PPC_RELOCATABLE) != 0)
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: compiled normally and linked with "
 	       "modules compiled with -mrelocatable"), ibfd);
 	}
@@ -4768,7 +4892,8 @@ ppc_elf_merge_private_bfd_data (bfd *ibf
       if (new_flags != old_flags)
 	{
 	  error = TRUE;
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: uses different e_flags (0x%lx) fields "
 	       "than previous modules (0x%lx)"),
 	     ibfd, (long) new_flags, (long) old_flags);
@@ -4785,21 +4910,61 @@ ppc_elf_merge_private_bfd_data (bfd *ibf
 }
 
 static void
-ppc_elf_vle_split16 (bfd *output_bfd, bfd_byte *loc,
+ppc_elf_vle_split16 (bfd *input_bfd,
+		     asection *input_section,
+		     unsigned long offset,
+		     bfd_byte *loc,
 		     bfd_vma value,
-		     split16_format_type split16_format)
-
+		     split16_format_type split16_format,
+		     bfd_boolean fixup)
 {
-  unsigned int insn, top5;
+  unsigned int insn, opcode, top5;
 
-  insn = bfd_get_32 (output_bfd, loc);
+  insn = bfd_get_32 (input_bfd, loc);
+  opcode = insn & 0xfc00f800;
+  if (opcode == E_OR2I_INSN
+      || opcode == E_AND2I_DOT_INSN
+      || opcode == E_OR2IS_INSN
+      || opcode == E_LIS_INSN
+      || opcode == E_AND2IS_DOT_INSN)
+    {
+      if (split16_format != split16a_type)
+	{
+	  if (fixup)
+	    split16_format = split16a_type;
+	  else
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%B(%A+0x%lx): expected 16A style relocation on 0x%08x insn"),
+	       input_bfd, input_section, offset, opcode);
+	}
+    }
+  else if (opcode == E_ADD2I_DOT_INSN
+	   || opcode == E_ADD2IS_INSN
+	   || opcode == E_CMP16I_INSN
+	   || opcode == E_MULL2I_INSN
+	   || opcode == E_CMPL16I_INSN
+	   || opcode == E_CMPH16I_INSN
+	   || opcode == E_CMPHL16I_INSN)
+    {
+      if (split16_format != split16d_type)
+	{
+	  if (fixup)
+	    split16_format = split16d_type;
+	  else
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%B(%A+0x%lx): expected 16D style relocation on 0x%08x insn"),
+	       input_bfd, input_section, offset, opcode);
+	}
+    }
   top5 = value & 0xf800;
-  top5 = top5 << (split16_format == split16a_type ? 9 : 5);
+  top5 = top5 << (split16_format == split16a_type ? 5 : 10);
+  insn &= (split16_format == split16a_type ? ~0x1f07ff : ~0x3e007ff);
   insn |= top5;
   insn |= value & 0x7ff;
-  bfd_put_32 (output_bfd, insn, loc);
+  bfd_put_32 (input_bfd, insn, loc);
 }
-
 
 /* Choose which PLT scheme to use, and set .plt flags appropriately.
    Returns -1 on error, 0 for old PLT, 1 for new PLT.  */
@@ -4818,7 +4983,7 @@ ppc_elf_select_plt_layout (bfd *output_b
 
       if (htab->params->plt_style == PLT_OLD)
 	htab->plt_type = PLT_OLD;
-      else if (info->shared
+      else if (bfd_link_pic (info)
 	       && htab->elf.dynamic_sections_created
 	       && (h = elf_link_hash_lookup (&htab->elf, "_mcount",
 					     FALSE, FALSE, TRUE)) != NULL
@@ -4878,13 +5043,13 @@ ppc_elf_select_plt_layout (bfd *output_b
 	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
 
       /* The new PLT is a loaded section.  */
-      if (htab->plt != NULL
-	  && !bfd_set_section_flags (htab->elf.dynobj, htab->plt, flags))
+      if (htab->elf.splt != NULL
+	  && !bfd_set_section_flags (htab->elf.dynobj, htab->elf.splt, flags))
 	return -1;
 
       /* The new GOT is not executable.  */
-      if (htab->got != NULL
-	  && !bfd_set_section_flags (htab->elf.dynobj, htab->got, flags))
+      if (htab->elf.sgot != NULL
+	  && !bfd_set_section_flags (htab->elf.dynobj, htab->elf.sgot, flags))
 	return -1;
     }
   else
@@ -4934,7 +5099,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
   const Elf_Internal_Rela *rel, *relend;
   asection *got2;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   if ((sec->flags & SEC_ALLOC) == 0)
@@ -4980,7 +5145,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
       if (!htab->is_vxworks
 	  && h == NULL
 	  && local_got_refcounts != NULL
-	  && (!info->shared
+	  && (!bfd_link_pic (info)
 	      || is_branch_reloc (r_type)))
 	{
 	  struct plt_entry **local_plt = (struct plt_entry **)
@@ -4993,7 +5158,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
 	      bfd_vma addend = 0;
 	      struct plt_entry *ent;
 
-	      if (r_type == R_PPC_PLTREL24 && info->shared)
+	      if (r_type == R_PPC_PLTREL24 && bfd_link_pic (info))
 		addend = rel->r_addend;
 	      ent = find_plt_ent (ifunc, got2, addend);
 	      if (ent->plt.refcount > 0)
@@ -5028,7 +5193,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
 	    {
 	      if (h->got.refcount > 0)
 		h->got.refcount--;
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		{
 		  struct plt_entry *ent;
 
@@ -5051,7 +5216,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
 	case R_PPC_REL32:
 	  if (h == NULL || h == htab->elf.hgot)
 	    break;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	case R_PPC_ADDR32:
 	case R_PPC_ADDR24:
@@ -5064,8 +5229,9 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
 	case R_PPC_ADDR14_BRNTAKEN:
 	case R_PPC_UADDR32:
 	case R_PPC_UADDR16:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
+	  /* Fall through.  */
 
 	case R_PPC_PLT32:
 	case R_PPC_PLTREL24:
@@ -5078,7 +5244,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
 	      bfd_vma addend = 0;
 	      struct plt_entry *ent;
 
-	      if (r_type == R_PPC_PLTREL24 && info->shared)
+	      if (r_type == R_PPC_PLTREL24 && bfd_link_pic (info))
 		addend = rel->r_addend;
 	      ent = find_plt_ent (&h->plt.plist, got2, addend);
 	      if (ent != NULL && ent->plt.refcount > 0)
@@ -5138,6 +5304,7 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd
 		  tga->root.type = bfd_link_hash_indirect;
 		  tga->root.u.i.link = &opt->root;
 		  ppc_elf_copy_indirect_symbol (info, opt, tga);
+		  opt->mark = 1;
 		  if (opt->dynindx != -1)
 		    {
 		      /* Use __tls_get_addr_opt in dynamic relocations.  */
@@ -5155,11 +5322,11 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd
 	htab->params->no_tls_get_addr_opt = TRUE;
     }
   if (htab->plt_type == PLT_NEW
-      && htab->plt != NULL
-      && htab->plt->output_section != NULL)
+      && htab->elf.splt != NULL
+      && htab->elf.splt->output_section != NULL)
     {
-      elf_section_type (htab->plt->output_section) = SHT_PROGBITS;
-      elf_section_flags (htab->plt->output_section) = SHF_ALLOC + SHF_WRITE;
+      elf_section_type (htab->elf.splt->output_section) = SHT_PROGBITS;
+      elf_section_flags (htab->elf.splt->output_section) = SHF_ALLOC + SHF_WRITE;
     }
 
   return _bfd_elf_tls_setup (obfd, info);
@@ -5204,7 +5371,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUT
   struct ppc_elf_link_hash_table *htab;
   int pass;
 
-  if (info->relocatable || !info->executable)
+  if (!bfd_link_executable (info))
     return TRUE;
 
   htab = ppc_elf_hash_table (info);
@@ -5292,7 +5459,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUT
 		    case R_PPC_GOT_TLSLD16:
 		    case R_PPC_GOT_TLSLD16_LO:
 		      expecting_tls_get_addr = 1;
-		      /* Fall thru */
+		      /* Fall through.  */
 
 		    case R_PPC_GOT_TLSLD16_HI:
 		    case R_PPC_GOT_TLSLD16_HA:
@@ -5310,7 +5477,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUT
 		    case R_PPC_GOT_TLSGD16:
 		    case R_PPC_GOT_TLSGD16_LO:
 		      expecting_tls_get_addr = 1;
-		      /* Fall thru */
+		      /* Fall through.  */
 
 		    case R_PPC_GOT_TLSGD16_HI:
 		    case R_PPC_GOT_TLSGD16_HA:
@@ -5377,7 +5544,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUT
 		      struct plt_entry *ent;
 		      bfd_vma addend = 0;
 
-		      if (info->shared
+		      if (bfd_link_pic (info)
 			  && ELF32_R_TYPE (rel[1].r_info) == R_PPC_PLTREL24)
 			addend = rel[1].r_addend;
 		      ent = find_plt_ent (&htab->tls_get_addr->plt.plist,
@@ -5534,33 +5701,24 @@ ppc_elf_adjust_dynamic_symbol (struct bf
 	  /* Taking a function's address in a read/write section
 	     doesn't require us to define the function symbol in the
 	     executable on a plt call stub.  A dynamic reloc can
-	     be used instead.  */
-	  if (h->pointer_equality_needed
-	      && h->type != STT_GNU_IFUNC
+	     be used instead, giving better runtime performance.
+	     (Calls via that function pointer don't need to bounce
+	     through the plt call stub.)  Similarly, use a dynamic
+	     reloc for a weak reference when possible, allowing the
+	     resolution of the symbol to be set at load time rather
+	     than link time.  */
+	  if ((h->pointer_equality_needed
+	       || (!h->ref_regular_nonweak && h->non_got_ref))
 	      && !htab->is_vxworks
 	      && !ppc_elf_hash_entry (h)->has_sda_refs
 	      && !readonly_dynrelocs (h))
 	    {
 	      h->pointer_equality_needed = 0;
+	      /* After adjust_dynamic_symbol, non_got_ref set in the
+		 non-pic case means that dyn_relocs for this symbol
+		 should be discarded.  */
 	      h->non_got_ref = 0;
 	    }
-
-	  /* After adjust_dynamic_symbol, non_got_ref set in the
-	     non-shared case means that we have allocated space in
-	     .dynbss for the symbol and thus dyn_relocs for this
-	     symbol should be discarded.
-	     If we get here we know we are making a PLT entry for this
-	     symbol, and in an executable we'd normally resolve
-	     relocations against this symbol to the PLT entry.  Allow
-	     dynamic relocs if the reference is weak, and the dynamic
-	     relocs will not cause text relocation.  */
-	  else if (!h->ref_regular_nonweak
-		   && h->non_got_ref
-		   && h->type != STT_GNU_IFUNC
-		   && !htab->is_vxworks
-		   && !ppc_elf_hash_entry (h)->has_sda_refs
-		   && !readonly_dynrelocs (h))
-	    h->non_got_ref = 0;
 	}
       h->protected_def = 0;
       return TRUE;
@@ -5589,7 +5747,7 @@ ppc_elf_adjust_dynamic_symbol (struct bf
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       h->protected_def = 0;
       return TRUE;
@@ -5657,8 +5815,10 @@ ppc_elf_adjust_dynamic_symbol (struct bf
 
   if (ppc_elf_hash_entry (h)->has_sda_refs)
     s = htab->dynsbss;
+  else if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    s = htab->elf.sdynrelro;
   else
-    s = htab->dynbss;
+    s = htab->elf.sdynbss;
   BFD_ASSERT (s != NULL);
 
   /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
@@ -5671,8 +5831,10 @@ ppc_elf_adjust_dynamic_symbol (struct bf
 
       if (ppc_elf_hash_entry (h)->has_sda_refs)
 	srel = htab->relsbss;
+      else if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+	srel = htab->elf.sreldynrelro;
       else
-	srel = htab->relbss;
+	srel = htab->elf.srelbss;
       BFD_ASSERT (srel != NULL);
       srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
@@ -5698,7 +5860,7 @@ add_stub_sym (struct plt_entry *ent,
   const char *stub;
   struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     stub = ".plt_pic32.";
   else
     stub = ".plt_call32.";
@@ -5745,8 +5907,8 @@ allocate_got (struct ppc_elf_link_hash_t
 
   if (htab->plt_type == PLT_VXWORKS)
     {
-      where = htab->got->size;
-      htab->got->size += need;
+      where = htab->elf.sgot->size;
+      htab->elf.sgot->size += need;
     }
   else
     {
@@ -5758,19 +5920,36 @@ allocate_got (struct ppc_elf_link_hash_t
 	}
       else
 	{
-	  if (htab->got->size + need > max_before_header
-	      && htab->got->size <= max_before_header)
+	  if (htab->elf.sgot->size + need > max_before_header
+	      && htab->elf.sgot->size <= max_before_header)
 	    {
-	      htab->got_gap = max_before_header - htab->got->size;
-	      htab->got->size = max_before_header + htab->got_header_size;
+	      htab->got_gap = max_before_header - htab->elf.sgot->size;
+	      htab->elf.sgot->size = max_before_header + htab->got_header_size;
 	    }
-	  where = htab->got->size;
-	  htab->got->size += need;
+	  where = htab->elf.sgot->size;
+	  htab->elf.sgot->size += need;
 	}
     }
   return where;
 }
 
+/* If H is undefined weak, make it dynamic if that makes sense.  */
+
+static bfd_boolean
+ensure_undefweak_dynamic (struct bfd_link_info *info,
+			  struct elf_link_hash_entry *h)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  if (htab->dynamic_sections_created
+      && h->root.type == bfd_link_hash_undefweak
+      && h->dynindx == -1
+      && !h->forced_local
+      && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+    return bfd_elf_link_record_dynamic_symbol (info, h);
+  return TRUE;
+}
+
 /* Allocate space in associated reloc sections for dynamic relocs.  */
 
 static bfd_boolean
@@ -5780,175 +5959,12 @@ allocate_dynrelocs (struct elf_link_hash
   struct ppc_elf_link_hash_entry *eh;
   struct ppc_elf_link_hash_table *htab;
   struct elf_dyn_relocs *p;
+  bfd_boolean dyn;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
   htab = ppc_elf_hash_table (info);
-  if (htab->elf.dynamic_sections_created
-      || h->type == STT_GNU_IFUNC)
-    {
-      struct plt_entry *ent;
-      bfd_boolean doneone = FALSE;
-      bfd_vma plt_offset = 0, glink_offset = 0;
-      bfd_boolean dyn;
-
-      for (ent = h->plt.plist; ent != NULL; ent = ent->next)
-	if (ent->plt.refcount > 0)
-	  {
-	    /* Make sure this symbol is output as a dynamic symbol.  */
-	    if (h->dynindx == -1
-		&& !h->forced_local
-		&& !h->def_regular
-		&& htab->elf.dynamic_sections_created)
-	      {
-		if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		  return FALSE;
-	      }
-
-	    dyn = htab->elf.dynamic_sections_created;
-	    if (info->shared
-		|| h->type == STT_GNU_IFUNC
-		|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
-	      {
-		asection *s = htab->plt;
-		if (!dyn || h->dynindx == -1)
-		  s = htab->iplt;
-
-		if (htab->plt_type == PLT_NEW || !dyn || h->dynindx == -1)
-		  {
-		    if (!doneone)
-		      {
-			plt_offset = s->size;
-			s->size += 4;
-		      }
-		    ent->plt.offset = plt_offset;
-
-		    s = htab->glink;
-		    if (!doneone || info->shared)
-		      {
-			glink_offset = s->size;
-			s->size += GLINK_ENTRY_SIZE;
-			if (h == htab->tls_get_addr
-			    && !htab->params->no_tls_get_addr_opt)
-			  s->size += TLS_GET_ADDR_GLINK_SIZE - GLINK_ENTRY_SIZE;
-		      }
-		    if (!doneone
-			&& !info->shared
-			&& h->def_dynamic
-			&& !h->def_regular)
-		      {
-			h->root.u.def.section = s;
-			h->root.u.def.value = glink_offset;
-		      }
-		    ent->glink_offset = glink_offset;
-
-		    if (htab->params->emit_stub_syms
-			&& !add_stub_sym (ent, h, info))
-		      return FALSE;
-		  }
-		else
-		  {
-		    if (!doneone)
-		      {
-			/* If this is the first .plt entry, make room
-			   for the special first entry.  */
-			if (s->size == 0)
-			  s->size += htab->plt_initial_entry_size;
-
-			/* The PowerPC PLT is actually composed of two
-			   parts, the first part is 2 words (for a load
-			   and a jump), and then there is a remaining
-			   word available at the end.  */
-			plt_offset = (htab->plt_initial_entry_size
-				      + (htab->plt_slot_size
-					 * ((s->size
-					     - htab->plt_initial_entry_size)
-					    / htab->plt_entry_size)));
-
-			/* If this symbol is not defined in a regular
-			   file, and we are not generating a shared
-			   library, then set the symbol to this location
-			   in the .plt.  This is to avoid text
-			   relocations, and is required to make
-			   function pointers compare as equal between
-			   the normal executable and the shared library.  */
-			if (! info->shared
-			    && h->def_dynamic
-			    && !h->def_regular)
-			  {
-			    h->root.u.def.section = s;
-			    h->root.u.def.value = plt_offset;
-			  }
-
-			/* Make room for this entry.  */
-			s->size += htab->plt_entry_size;
-			/* After the 8192nd entry, room for two entries
-			   is allocated.  */
-			if (htab->plt_type == PLT_OLD
-			    && (s->size - htab->plt_initial_entry_size)
-				/ htab->plt_entry_size
-			       > PLT_NUM_SINGLE_ENTRIES)
-			  s->size += htab->plt_entry_size;
-		      }
-		    ent->plt.offset = plt_offset;
-		  }
-
-		/* We also need to make an entry in the .rela.plt section.  */
-		if (!doneone)
-		  {
-		    if (!htab->elf.dynamic_sections_created
-			|| h->dynindx == -1)
-		      htab->reliplt->size += sizeof (Elf32_External_Rela);
-		    else
-		      {
-			htab->relplt->size += sizeof (Elf32_External_Rela);
-
-			if (htab->plt_type == PLT_VXWORKS)
-			  {
-			    /* Allocate space for the unloaded relocations.  */
-			    if (!info->shared
-				&& htab->elf.dynamic_sections_created)
-			      {
-				if (ent->plt.offset
-				    == (bfd_vma) htab->plt_initial_entry_size)
-				  {
-				    htab->srelplt2->size
-				      += (sizeof (Elf32_External_Rela)
-					  * VXWORKS_PLTRESOLVE_RELOCS);
-				  }
-
-				htab->srelplt2->size
-				  += (sizeof (Elf32_External_Rela)
-				      * VXWORKS_PLT_NON_JMP_SLOT_RELOCS);
-			      }
-
-			    /* Every PLT entry has an associated GOT entry in
-			       .got.plt.  */
-			    htab->sgotplt->size += 4;
-			  }
-		      }
-		    doneone = TRUE;
-		  }
-	      }
-	    else
-	      ent->plt.offset = (bfd_vma) -1;
-	  }
-	else
-	  ent->plt.offset = (bfd_vma) -1;
-
-      if (!doneone)
-	{
-	  h->plt.plist = NULL;
-	  h->needs_plt = 0;
-	}
-    }
-  else
-    {
-      h->plt.plist = NULL;
-      h->needs_plt = 0;
-    }
-
   eh = (struct ppc_elf_link_hash_entry *) h;
   if (eh->elf.got.refcount > 0
       || (ELIMINATE_COPY_RELOCS
@@ -5958,18 +5974,12 @@ allocate_dynrelocs (struct elf_link_hash
 	  && eh->has_addr16_lo
 	  && htab->params->pic_fixup > 0))
     {
-      bfd_boolean dyn;
       unsigned int need;
 
-      /* Make sure this symbol is output as a dynamic symbol.  */
-      if (eh->elf.dynindx == -1
-	  && !eh->elf.forced_local
-	  && eh->elf.type != STT_GNU_IFUNC
-	  && htab->elf.dynamic_sections_created)
-	{
-	  if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf))
-	    return FALSE;
-	}
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (!ensure_undefweak_dynamic (info, &eh->elf))
+	return FALSE;
 
       need = 0;
       if ((eh->tls_mask & TLS_TLS) != 0)
@@ -5998,16 +6008,17 @@ allocate_dynrelocs (struct elf_link_hash
       else
 	{
 	  eh->elf.got.offset = allocate_got (htab, need);
-	  dyn = htab->elf.dynamic_sections_created;
-	  if ((info->shared
-	       || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
+	  if ((bfd_link_pic (info)
+	       || (htab->elf.dynamic_sections_created
+		   && eh->elf.dynindx != -1
+		   && !SYMBOL_REFERENCES_LOCAL (info, &eh->elf)))
 	      && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT
 		  || eh->elf.root.type != bfd_link_hash_undefweak))
 	    {
-	      asection *rsec = htab->relgot;
+	      asection *rsec = htab->elf.srelgot;
 
 	      if (eh->elf.type == STT_GNU_IFUNC)
-		rsec = htab->reliplt;
+		rsec = htab->elf.irelplt;
 	      /* All the entries we allocated need relocs.
 		 Except LD only needs one.  */
 	      if ((eh->tls_mask & TLS_LD) != 0
@@ -6020,17 +6031,19 @@ allocate_dynrelocs (struct elf_link_hash
   else
     eh->elf.got.offset = (bfd_vma) -1;
 
-  if (eh->dyn_relocs == NULL
-      || !htab->elf.dynamic_sections_created)
-    return TRUE;
+  if (!htab->elf.dynamic_sections_created
+      && h->type != STT_GNU_IFUNC)
+    eh->dyn_relocs = NULL;
+
+  if (eh->dyn_relocs == NULL)
+    ;
 
   /* In the shared -Bsymbolic case, discard space allocated for
      dynamic pc-relative relocs against symbols which turn out to be
      defined in regular objects.  For the normal shared case, discard
      space for relocs that have become local due to symbol visibility
      changes.  */
-
-  if (info->shared)
+  else if (bfd_link_pic (info))
     {
       /* Relocs that use pc_count are those that appear on a call insn,
 	 or certain REL relocs (see must_be_dyn_reloc) that can be
@@ -6083,21 +6096,15 @@ allocate_dynrelocs (struct elf_link_hash
 
 	  /* Make sure undefined weak symbols are output as a dynamic
 	     symbol in PIEs.  */
-	  else if (h->dynindx == -1
-		   && !h->forced_local
-		   && !h->def_regular)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		return FALSE;
-	    }
+	  else if (!ensure_undefweak_dynamic (info, h))
+	    return FALSE;
 	}
     }
   else if (ELIMINATE_COPY_RELOCS)
     {
-      /* For the non-shared case, discard space for relocs against
+      /* For the non-pic case, discard space for relocs against
 	 symbols which turn out to need copy relocs or are not
 	 dynamic.  */
-
       if (!h->non_got_ref
 	  && !h->def_regular
 	  && !(h->protected_def
@@ -6107,33 +6114,171 @@ allocate_dynrelocs (struct elf_link_hash
 	{
 	  /* Make sure this symbol is output as a dynamic symbol.
 	     Undefined weak syms won't yet be marked as dynamic.  */
-	  if (h->dynindx == -1
-	      && !h->forced_local)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		return FALSE;
-	    }
+	  if (!ensure_undefweak_dynamic (info, h))
+	    return FALSE;
 
-	  /* If that succeeded, we know we'll be keeping all the
-	     relocs.  */
-	  if (h->dynindx != -1)
-	    goto keep;
+	  if (h->dynindx == -1)
+	    eh->dyn_relocs = NULL;
 	}
-
-      eh->dyn_relocs = NULL;
-
-    keep: ;
+      else
+	eh->dyn_relocs = NULL;
     }
 
-  /* Finally, allocate space.  */
+  /* Allocate space.  */
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
       asection *sreloc = elf_section_data (p->sec)->sreloc;
       if (eh->elf.type == STT_GNU_IFUNC)
-	sreloc = htab->reliplt;
+	sreloc = htab->elf.irelplt;
       sreloc->size += p->count * sizeof (Elf32_External_Rela);
     }
 
+  /* Handle PLT relocs.  Done last, after dynindx has settled.  */
+  dyn = htab->elf.dynamic_sections_created && h->dynindx != -1;
+  if (dyn || h->type == STT_GNU_IFUNC)
+    {
+      struct plt_entry *ent;
+      bfd_boolean doneone = FALSE;
+      bfd_vma plt_offset = 0, glink_offset = 0;
+
+      for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+	if (ent->plt.refcount > 0)
+	  {
+	    asection *s = htab->elf.splt;
+
+	    if (!dyn)
+	      s = htab->elf.iplt;
+
+	    if (htab->plt_type == PLT_NEW || !dyn)
+	      {
+		if (!doneone)
+		  {
+		    plt_offset = s->size;
+		    s->size += 4;
+		  }
+		ent->plt.offset = plt_offset;
+
+		s = htab->glink;
+		if (!doneone || bfd_link_pic (info))
+		  {
+		    glink_offset = s->size;
+		    s->size += GLINK_ENTRY_SIZE;
+		    if (h == htab->tls_get_addr
+			&& !htab->params->no_tls_get_addr_opt)
+		      s->size += TLS_GET_ADDR_GLINK_SIZE - GLINK_ENTRY_SIZE;
+		  }
+		if (!doneone
+		    && !bfd_link_pic (info)
+		    && h->def_dynamic
+		    && !h->def_regular)
+		  {
+		    h->root.u.def.section = s;
+		    h->root.u.def.value = glink_offset;
+		  }
+		ent->glink_offset = glink_offset;
+
+		if (htab->params->emit_stub_syms
+		    && !add_stub_sym (ent, h, info))
+		  return FALSE;
+	      }
+	    else
+	      {
+		if (!doneone)
+		  {
+		    /* If this is the first .plt entry, make room
+		       for the special first entry.  */
+		    if (s->size == 0)
+		      s->size += htab->plt_initial_entry_size;
+
+		    /* The PowerPC PLT is actually composed of two
+		       parts, the first part is 2 words (for a load
+		       and a jump), and then there is a remaining
+		       word available at the end.  */
+		    plt_offset = (htab->plt_initial_entry_size
+				  + (htab->plt_slot_size
+				     * ((s->size
+					 - htab->plt_initial_entry_size)
+					/ htab->plt_entry_size)));
+
+		    /* If this symbol is not defined in a regular
+		       file, and we are not generating a shared
+		       library, then set the symbol to this location
+		       in the .plt.  This is to avoid text
+		       relocations, and is required to make
+		       function pointers compare as equal between
+		       the normal executable and the shared library.  */
+		    if (! bfd_link_pic (info)
+			&& h->def_dynamic
+			&& !h->def_regular)
+		      {
+			h->root.u.def.section = s;
+			h->root.u.def.value = plt_offset;
+		      }
+
+		    /* Make room for this entry.  */
+		    s->size += htab->plt_entry_size;
+		    /* After the 8192nd entry, room for two entries
+		       is allocated.  */
+		    if (htab->plt_type == PLT_OLD
+			&& (s->size - htab->plt_initial_entry_size)
+			/ htab->plt_entry_size
+			> PLT_NUM_SINGLE_ENTRIES)
+		      s->size += htab->plt_entry_size;
+		  }
+		ent->plt.offset = plt_offset;
+	      }
+
+	    /* We also need to make an entry in the .rela.plt section.  */
+	    if (!doneone)
+	      {
+		if (!dyn)
+		  htab->elf.irelplt->size += sizeof (Elf32_External_Rela);
+		else
+		  {
+		    htab->elf.srelplt->size += sizeof (Elf32_External_Rela);
+
+		    if (htab->plt_type == PLT_VXWORKS)
+		      {
+			/* Allocate space for the unloaded relocations.  */
+			if (!bfd_link_pic (info)
+			    && htab->elf.dynamic_sections_created)
+			  {
+			    if (ent->plt.offset
+				== (bfd_vma) htab->plt_initial_entry_size)
+			      {
+				htab->srelplt2->size
+				  += (sizeof (Elf32_External_Rela)
+				      * VXWORKS_PLTRESOLVE_RELOCS);
+			      }
+
+			    htab->srelplt2->size
+			      += (sizeof (Elf32_External_Rela)
+				  * VXWORKS_PLT_NON_JMP_SLOT_RELOCS);
+			  }
+
+			/* Every PLT entry has an associated GOT entry in
+			   .got.plt.  */
+			htab->elf.sgotplt->size += 4;
+		      }
+		  }
+		doneone = TRUE;
+	      }
+	  }
+	else
+	  ent->plt.offset = (bfd_vma) -1;
+
+      if (!doneone)
+	{
+	  h->plt.plist = NULL;
+	  h->needs_plt = 0;
+	}
+    }
+  else
+    {
+      h->plt.plist = NULL;
+      h->needs_plt = 0;
+    }
+
   return TRUE;
 }
 
@@ -6191,7 +6336,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (htab->elf.dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -6248,7 +6393,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
 		{
 		  asection *sreloc = elf_section_data (p->sec)->sreloc;
 		  if (p->ifunc)
-		    sreloc = htab->reliplt;
+		    sreloc = htab->elf.irelplt;
 		  sreloc->size += p->count * sizeof (Elf32_External_Rela);
 		  if ((p->sec->output_section->flags
 		       & (SEC_READONLY | SEC_ALLOC))
@@ -6291,11 +6436,11 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	    else
 	      {
 		*local_got = allocate_got (htab, need);
-		if (info->shared)
+		if (bfd_link_pic (info))
 		  {
-		    asection *srel = htab->relgot;
+		    asection *srel = htab->elf.srelgot;
 		    if ((*lgot_masks & PLT_IFUNC) != 0)
-		      srel = htab->reliplt;
+		      srel = htab->elf.irelplt;
 		    srel->size += need * (sizeof (Elf32_External_Rela) / 4);
 		  }
 	      }
@@ -6316,7 +6461,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	  for (ent = *local_plt; ent != NULL; ent = ent->next)
 	    if (ent->plt.refcount > 0)
 	      {
-		s = htab->iplt;
+		s = htab->elf.iplt;
 
 		if (!doneone)
 		  {
@@ -6326,7 +6471,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
 		ent->plt.offset = plt_offset;
 
 		s = htab->glink;
-		if (!doneone || info->shared)
+		if (!doneone || bfd_link_pic (info))
 		  {
 		    glink_offset = s->size;
 		    s->size += GLINK_ENTRY_SIZE;
@@ -6335,7 +6480,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
 
 		if (!doneone)
 		  {
-		    htab->reliplt->size += sizeof (Elf32_External_Rela);
+		    htab->elf.irelplt->size += sizeof (Elf32_External_Rela);
 		    doneone = TRUE;
 		  }
 	      }
@@ -6350,13 +6495,13 @@ ppc_elf_size_dynamic_sections (bfd *outp
   if (htab->tlsld_got.refcount > 0)
     {
       htab->tlsld_got.offset = allocate_got (htab, 8);
-      if (info->shared)
-	htab->relgot->size += sizeof (Elf32_External_Rela);
+      if (bfd_link_pic (info))
+	htab->elf.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     htab->tlsld_got.offset = (bfd_vma) -1;
 
-  if (htab->got != NULL && htab->plt_type != PLT_VXWORKS)
+  if (htab->elf.sgot != NULL && htab->plt_type != PLT_VXWORKS)
     {
       unsigned int g_o_t = 32768;
 
@@ -6364,17 +6509,17 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	 for old plt/got the got size will be 0 to 32764 (not allocated),
 	 or 32780 to 65536 (header allocated).  For new plt/got, the
 	 corresponding ranges are 0 to 32768 and 32780 to 65536.  */
-      if (htab->got->size <= 32768)
+      if (htab->elf.sgot->size <= 32768)
 	{
-	  g_o_t = htab->got->size;
+	  g_o_t = htab->elf.sgot->size;
 	  if (htab->plt_type == PLT_OLD)
 	    g_o_t += 4;
-	  htab->got->size += htab->got_header_size;
+	  htab->elf.sgot->size += htab->got_header_size;
 	}
 
       htab->elf.hgot->root.u.def.value = g_o_t;
     }
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       struct elf_link_hash_entry *sda = htab->sdata[0].sym;
 
@@ -6397,7 +6542,9 @@ ppc_elf_size_dynamic_sections (bfd *outp
       && htab->elf.dynamic_sections_created)
     {
       htab->glink_pltresolve = htab->glink->size;
-      /* Space for the branch table.  */
+      /* Space for the branch table.  ??? We don't need entries for
+	 non-dynamic symbols in this table.  This case can arise with
+	 static ifuncs or forced local ifuncs.  */
       htab->glink->size += htab->glink->size / (GLINK_ENTRY_SIZE / 4) - 4;
       /* Pad out to align the start of PLTresolve.  */
       htab->glink->size += -htab->glink->size & (htab->params->ppc476_workaround
@@ -6450,7 +6597,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
     {
       s = htab->glink_eh_frame;
       s->size = sizeof (glink_eh_frame_cie) + 20;
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  s->size += 4;
 	  if (htab->glink->size - GLINK_PLTRESOLVE + 8 >= 256)
@@ -6468,8 +6615,8 @@ ppc_elf_size_dynamic_sections (bfd *outp
       if ((s->flags & SEC_LINKER_CREATED) == 0)
 	continue;
 
-      if (s == htab->plt
-	  || s == htab->got)
+      if (s == htab->elf.splt
+	  || s == htab->elf.sgot)
 	{
 	  /* We'd like to strip these sections if they aren't needed, but if
 	     we've exported dynamic symbols from them we must leave them.
@@ -6479,12 +6626,13 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
 	}
-      else if (s == htab->iplt
+      else if (s == htab->elf.iplt
 	       || s == htab->glink
 	       || s == htab->glink_eh_frame
-	       || s == htab->sgotplt
+	       || s == htab->elf.sgotplt
 	       || s == htab->sbss
-	       || s == htab->dynbss
+	       || s == htab->elf.sdynbss
+	       || s == htab->elf.sdynrelro
 	       || s == htab->dynsbss)
 	{
 	  /* Strip these too.  */
@@ -6547,13 +6695,13 @@ ppc_elf_size_dynamic_sections (bfd *outp
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->plt != NULL && htab->plt->size != 0)
+      if (htab->elf.splt != NULL && htab->elf.splt->size != 0)
 	{
 	  if (!add_dynamic_entry (DT_PLTGOT, 0)
 	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -6626,7 +6774,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
       /* Augmentation.  */
       p += 1;
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && htab->elf.dynamic_sections_created)
 	{
 	  bfd_vma adv = (htab->glink->size - GLINK_PLTRESOLVE + 8) >> 2;
@@ -6794,7 +6942,7 @@ ppc_elf_relax_section (bfd *abfd,
   /* We cannot represent the required PIC relocs in the output, so don't
      do anything.  The linker doesn't support mixing -shared and -r
      anyway.  */
-  if (link_info->relocatable && link_info->shared)
+  if (bfd_link_relocatable (link_info) && bfd_link_pic (link_info))
     return TRUE;
 
   htab = ppc_elf_hash_table (link_info);
@@ -6938,7 +7086,7 @@ ppc_elf_relax_section (bfd *abfd,
 		       || h->root.type == bfd_link_hash_undefweak)
 		{
 		  tsec = bfd_und_section_ptr;
-		  toff = link_info->relocatable ? indx : 0;
+		  toff = bfd_link_relocatable (link_info) ? indx : 0;
 		}
 	      else
 		continue;
@@ -6946,8 +7094,7 @@ ppc_elf_relax_section (bfd *abfd,
 	      /* If this branch is to __tls_get_addr then we may later
 		 optimise away the call.  We won't be needing a long-
 		 branch stub in that case.  */
-	      if (link_info->executable
-		  && !link_info->relocatable
+	      if (bfd_link_executable (link_info)
 		  && h == htab->tls_get_addr
 		  && irel != internal_relocs)
 		{
@@ -7038,7 +7185,7 @@ ppc_elf_relax_section (bfd *abfd,
 	      bfd_vma addend = 0;
 	      struct plt_entry *ent;
 
-	      if (r_type == R_PPC_PLTREL24 && link_info->shared)
+	      if (r_type == R_PPC_PLTREL24 && bfd_link_pic (link_info))
 		addend = irel->r_addend;
 	      ent = find_plt_ent (plist, got2, addend);
 	      if (ent != NULL)
@@ -7053,7 +7200,7 @@ ppc_elf_relax_section (bfd *abfd,
 		    }
 		  else
 		    {
-		      tsec = htab->plt;
+		      tsec = htab->elf.splt;
 		      toff = ent->plt.offset;
 		    }
 		}
@@ -7104,7 +7251,7 @@ ppc_elf_relax_section (bfd *abfd,
 	    toff += irel->r_addend;
 
 	  /* Attempted -shared link of non-pic code loses.  */
-	  if ((!link_info->relocatable
+	  if ((!bfd_link_relocatable (link_info)
 	       && tsec == bfd_und_section_ptr)
 	      || tsec->output_section == NULL
 	      || (tsec->owner != NULL
@@ -7115,7 +7262,7 @@ ppc_elf_relax_section (bfd *abfd,
 
 	  /* If the branch is in range, no need to do anything.  */
 	  if (tsec != bfd_und_section_ptr
-	      && (!link_info->relocatable
+	      && (!bfd_link_relocatable (link_info)
 		  /* A relocatable link may have sections moved during
 		     final link, so do not presume they remain in range.  */
 		  || tsec->output_section == isec->output_section))
@@ -7145,7 +7292,7 @@ ppc_elf_relax_section (bfd *abfd,
 		   one.  We'll report an error later.  */
 		continue;
 
-	      if (link_info->shared)
+	      if (bfd_link_pic (link_info))
 		{
 		  size = 4 * ARRAY_SIZE (shared_stub_entry);
 		  insn_offset = 12;
@@ -7156,7 +7303,7 @@ ppc_elf_relax_section (bfd *abfd,
 		  insn_offset = 0;
 		}
 	      stub_rtype = R_PPC_RELAX;
-	      if (tsec == htab->plt
+	      if (tsec == htab->elf.splt
 		  || tsec == htab->glink)
 		{
 		  stub_rtype = R_PPC_RELAX_PLT;
@@ -7240,7 +7387,7 @@ ppc_elf_relax_section (bfd *abfd,
   workaround_change = FALSE;
   newsize = trampoff;
   if (htab->params->ppc476_workaround
-      && (!link_info->relocatable
+      && (!bfd_link_relocatable (link_info)
 	  || isec->output_section->alignment_power >= htab->params->pagesize_p2))
     {
       bfd_vma addr, end_addr;
@@ -7448,7 +7595,7 @@ write_glink_stub (struct plt_entry *ent,
 	 + plt_sec->output_section->vma
 	 + plt_sec->output_offset);
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       bfd_vma got = 0;
 
@@ -7605,7 +7752,9 @@ is_insn_ds_form (unsigned int insn)
 static bfd_boolean
 is_insn_dq_form (unsigned int insn)
 {
-  return (insn & (0x3f << 26)) == 56u << 26; /* lq */
+  return ((insn & (0x3f << 26)) == 56u << 26 /* lq */
+	  || ((insn & (0x3f << 26)) == (61u << 26) /* lxv, stxv */
+	      && (insn & 3) == 1));
 }
 
 /* The RELOCATE_SECTION function is called by the ELF backend linker
@@ -7651,12 +7800,13 @@ ppc_elf_relocate_section (bfd *output_bf
   struct elf_link_hash_entry **sym_hashes;
   struct ppc_elf_link_hash_table *htab;
   Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *wrel;
   Elf_Internal_Rela *relend;
   Elf_Internal_Rela outrel;
   asection *got2;
   bfd_vma *local_got_offsets;
   bfd_boolean ret = TRUE;
-  bfd_vma d_offset = (bfd_big_endian (output_bfd) ? 2 : 0);
+  bfd_vma d_offset = (bfd_big_endian (input_bfd) ? 2 : 0);
   bfd_boolean is_vxworks_tls;
   unsigned int picfixup_size = 0;
   struct ppc_elf_relax_info *relax_info = NULL;
@@ -7666,7 +7816,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		      "%ld relocations%s",
 		      input_bfd, input_section,
 		      (long) input_section->reloc_count,
-		      (info->relocatable) ? " (relocatable)" : "");
+		      (bfd_link_relocatable (info)) ? " (relocatable)" : "");
 #endif
 
   got2 = bfd_get_section_by_name (input_bfd, ".got2");
@@ -7681,14 +7831,14 @@ ppc_elf_relocate_section (bfd *output_bf
   sym_hashes = elf_sym_hashes (input_bfd);
   /* We have to handle relocations in vxworks .tls_vars sections
      specially, because the dynamic loader is 'weird'.  */
-  is_vxworks_tls = (htab->is_vxworks && info->shared
+  is_vxworks_tls = (htab->is_vxworks && bfd_link_pic (info)
 		    && !strcmp (input_section->output_section->name,
 				".tls_vars"));
   if (input_section->sec_info_type == SEC_INFO_TYPE_TARGET)
     relax_info = elf_section_data (input_section)->sec_info;
-  rel = relocs;
+  rel = wrel = relocs;
   relend = relocs + input_section->reloc_count;
-  for (; rel < relend; rel++)
+  for (; rel < relend; wrel++, rel++)
     {
       enum elf_ppc_reloc_type r_type;
       bfd_vma addend;
@@ -7707,6 +7857,7 @@ ppc_elf_relocate_section (bfd *output_bf
       struct plt_entry **ifunc;
       struct reloc_howto_struct alt_howto;
 
+    again:
       r_type = ELF32_R_TYPE (rel->r_info);
       sym = NULL;
       sec = NULL;
@@ -7743,11 +7894,25 @@ ppc_elf_relocate_section (bfd *output_bf
 	  howto = NULL;
 	  if (r_type < R_PPC_max)
 	    howto = ppc_elf_howto_table[r_type];
-	  RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-					   rel, 1, relend, howto, 0, contents);
+
+	  _bfd_clear_contents (howto, input_bfd, input_section,
+			       contents + rel->r_offset);
+	  wrel->r_offset = rel->r_offset;
+	  wrel->r_info = 0;
+	  wrel->r_addend = 0;
+
+	  /* For ld -r, remove relocations in debug sections against
+	     sections defined in discarded sections.  Not done for
+	     non-debug to preserve relocs in .eh_frame which the
+	     eh_frame editing code expects to be present.  */
+	  if (bfd_link_relocatable (info)
+	      && (input_section->flags & SEC_DEBUGGING))
+	    wrel--;
+
+	  continue;
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  if (got2 != NULL
 	      && r_type == R_PPC_PLTREL24
@@ -7760,7 +7925,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	  if (r_type != R_PPC_RELAX_PLT
 	      && r_type != R_PPC_RELAX_PLTREL24
 	      && r_type != R_PPC_RELAX)
-	    continue;
+	    goto copy_reloc;
 	}
 
       /* TLS optimizations.  Replace instruction sequences and relocs
@@ -7803,10 +7968,12 @@ ppc_elf_relocate_section (bfd *output_bf
 	    {
 	      bfd_vma insn;
 
-	      insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
+	      insn = bfd_get_32 (input_bfd,
+				 contents + rel->r_offset - d_offset);
 	      insn &= 31 << 21;
 	      insn |= 0x3c020000;	/* addis 0,2,0 */
-	      bfd_put_32 (output_bfd, insn, contents + rel->r_offset - d_offset);
+	      bfd_put_32 (input_bfd, insn,
+			  contents + rel->r_offset - d_offset);
 	      r_type = R_PPC_TPREL16_HA;
 	      rel->r_info = ELF32_R_INFO (r_symndx, r_type);
 	    }
@@ -7818,11 +7985,11 @@ ppc_elf_relocate_section (bfd *output_bf
 	    {
 	      bfd_vma insn;
 
-	      insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 	      insn = _bfd_elf_ppc_at_tls_transform (insn, 2);
 	      if (insn == 0)
 		abort ();
-	      bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 	      r_type = R_PPC_TPREL16_LO;
 	      rel->r_info = ELF32_R_INFO (r_symndx, r_type);
 
@@ -7850,7 +8017,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	      else
 		{
 		  rel->r_offset -= d_offset;
-		  bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+		  bfd_put_32 (input_bfd, NOP, contents + rel->r_offset);
 		  r_type = R_PPC_NONE;
 		}
 	      rel->r_info = ELF32_R_INFO (r_symndx, r_type);
@@ -7887,7 +8054,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		 the destination reg.  It may be something other than
 		 the usual r3, and moved to r3 before the call by
 		 intervening code.  */
-	      insn1 = bfd_get_32 (output_bfd,
+	      insn1 = bfd_get_32 (input_bfd,
 				  contents + rel->r_offset - d_offset);
 	      if ((tls_mask & tls_gd) != 0)
 		{
@@ -7898,7 +8065,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		    {
 		      rel[1].r_info = ELF32_R_INFO (STN_UNDEF, R_PPC_NONE);
 		      insn2 = 0x7c631214;	/* add 3,3,2 */
-		      bfd_put_32 (output_bfd, insn2, contents + offset);
+		      bfd_put_32 (input_bfd, insn2, contents + offset);
 		    }
 		  r_type = (((r_type - (R_PPC_GOT_TLSGD16 & 3)) & 3)
 			    + R_PPC_GOT_TPREL16);
@@ -7933,17 +8100,16 @@ ppc_elf_relocate_section (bfd *output_bf
 		      rel[1].r_offset = offset + d_offset;
 		      rel[1].r_addend = rel->r_addend;
 		      insn2 = 0x38630000;	/* addi 3,3,0 */
-		      bfd_put_32 (output_bfd, insn2, contents + offset);
+		      bfd_put_32 (input_bfd, insn2, contents + offset);
 		    }
 		}
-	      bfd_put_32 (output_bfd, insn1,
+	      bfd_put_32 (input_bfd, insn1,
 			  contents + rel->r_offset - d_offset);
 	      if (tls_gd == 0)
 		{
 		  /* We changed the symbol on an LD reloc.  Start over
 		     in order to get h, sym, sec etc. right.  */
-		  rel--;
-		  continue;
+		  goto again;
 		}
 	    }
 	  break;
@@ -7968,7 +8134,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		  insn2 = 0x38630000;	/* addi 3,3,0 */
 		}
 	      rel->r_info = ELF32_R_INFO (r_symndx, r_type);
-	      bfd_put_32 (output_bfd, insn2, contents + offset);
+	      bfd_put_32 (input_bfd, insn2, contents + offset);
 	      /* Zap the reloc on the _tls_get_addr call too.  */
 	      BFD_ASSERT (offset == rel[1].r_offset);
 	      rel[1].r_info = ELF32_R_INFO (STN_UNDEF, R_PPC_NONE);
@@ -7996,13 +8162,12 @@ ppc_elf_relocate_section (bfd *output_bf
 	      rel->r_info = ELF32_R_INFO (r_symndx, R_PPC_TPREL16_LO);
 	      rel->r_offset += d_offset;
 	      insn2 = 0x38630000;	/* addi 3,3,0 */
-	      bfd_put_32 (output_bfd, insn2,
+	      bfd_put_32 (input_bfd, insn2,
 			  contents + rel->r_offset - d_offset);
 	      /* Zap the reloc on the _tls_get_addr call too.  */
 	      BFD_ASSERT (rel->r_offset - d_offset == rel[1].r_offset);
 	      rel[1].r_info = ELF32_R_INFO (STN_UNDEF, R_PPC_NONE);
-	      rel--;
-	      continue;
+	      goto again;
 	    }
 	  break;
 	}
@@ -8018,7 +8183,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_ADDR14_BRTAKEN:
 	case R_PPC_REL14_BRTAKEN:
 	  branch_bit = BRANCH_PREDICT_BIT;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	  /* Branch not taken prediction relocations.  */
 	case R_PPC_ADDR14_BRNTAKEN:
@@ -8026,7 +8191,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	  {
 	    bfd_vma insn;
 
-	    insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
+	    insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 	    insn &= ~BRANCH_PREDICT_BIT;
 	    insn |= branch_bit;
 
@@ -8038,7 +8203,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	    if ((bfd_signed_vma) (relocation + rel->r_addend - from) < 0)
 	      insn ^= BRANCH_PREDICT_BIT;
 
-	    bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+	    bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 	    break;
 	  }
 	}
@@ -8057,7 +8222,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	  if (r_type == R_PPC_ADDR16_HA)
 	    {
-	      insn = bfd_get_32 (output_bfd,
+	      insn = bfd_get_32 (input_bfd,
 				 contents + rel->r_offset - d_offset);
 	      if ((insn & (0x3f << 26)) == (15u << 26)
 		  && (insn & (0x1f << 16)) == 0 /* lis */)
@@ -8073,37 +8238,38 @@ ppc_elf_relocate_section (bfd *output_bf
 		  off = (p - contents) - (rel->r_offset - d_offset);
 		  if (off > 0x1fffffc || (off & 3) != 0)
 		    info->callbacks->einfo
-		      (_("%P: %H: fixup branch overflow\n"),
+		      (_("%H: fixup branch overflow\n"),
 		       input_bfd, input_section, rel->r_offset);
 
-		  bfd_put_32 (output_bfd, B | off,
+		  bfd_put_32 (input_bfd, B | off,
 			      contents + rel->r_offset - d_offset);
-		  got_addr = (htab->got->output_section->vma
-			      + htab->got->output_offset
+		  got_addr = (htab->elf.sgot->output_section->vma
+			      + htab->elf.sgot->output_offset
 			      + (h->got.offset & ~1));
-		  rel->r_info = ELF32_R_INFO (0, R_PPC_ADDR16_HA);
-		  rel->r_addend = got_addr;
-		  rel->r_offset = (p - contents) + d_offset;
+		  wrel->r_offset = (p - contents) + d_offset;
+		  wrel->r_info = ELF32_R_INFO (0, R_PPC_ADDR16_HA);
+		  wrel->r_addend = got_addr;
 		  insn &= ~0xffff;
 		  insn |= ((unsigned int )(got_addr + 0x8000) >> 16) & 0xffff;
-		  bfd_put_32 (output_bfd, insn, p);
+		  bfd_put_32 (input_bfd, insn, p);
 
 		  /* Convert lis to lwz, loading address from GOT.  */
 		  insn &= ~0xffff;
 		  insn ^= (32u ^ 15u) << 26;
 		  insn |= (insn & (0x1f << 21)) >> 5;
 		  insn |= got_addr & 0xffff;
-		  bfd_put_32 (output_bfd, insn, p + 4);
+		  bfd_put_32 (input_bfd, insn, p + 4);
 
-		  bfd_put_32 (output_bfd, B | ((-4 - off) & 0x3ffffff), p + 8);
+		  bfd_put_32 (input_bfd, B | ((-4 - off) & 0x3ffffff), p + 8);
 		  picfixup_size += 12;
 
 		  /* Use one of the spare relocs, so --emit-relocs
 		     output is reasonable.  */
 		  memmove (rel + 1, rel, (relend - rel - 1) * sizeof (*rel));
-		  rel++;
+		  wrel++, rel++;
+		  rel->r_offset = wrel[-1].r_offset + 4;
 		  rel->r_info = ELF32_R_INFO (0, R_PPC_ADDR16_LO);
-		  rel->r_offset += 4;
+		  rel->r_addend = wrel[-1].r_addend;
 
 		  /* Continue on as if we had a got reloc, to output
 		     dynamic reloc.  */
@@ -8111,13 +8277,14 @@ ppc_elf_relocate_section (bfd *output_bf
 		}
 	      else
 		info->callbacks->einfo
-		  (_("%P: %H: error: %s with unexpected instruction %x\n"),
+		  /* xgettext:c-format */
+		  (_("%H: error: %s with unexpected instruction %x\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   "R_PPC_ADDR16_HA", insn);
 	    }
 	  else if (r_type == R_PPC_ADDR16_LO)
 	    {
-	      insn = bfd_get_32 (output_bfd,
+	      insn = bfd_get_32 (input_bfd,
 				 contents + rel->r_offset - d_offset);
 	      if ((insn & (0x3f << 26)) == 14u << 26    /* addi */
 		  || (insn & (0x3f << 26)) == 32u << 26 /* lwz */
@@ -8145,7 +8312,8 @@ ppc_elf_relocate_section (bfd *output_bf
 		}
 	      else
 		info->callbacks->einfo
-		  (_("%P: %H: error: %s with unexpected instruction %x\n"),
+		  /* xgettext:c-format */
+		  (_("%H: error: %s with unexpected instruction %x\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   "R_PPC_ADDR16_LO", insn);
 	    }
@@ -8173,28 +8341,49 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	  ent = NULL;
 	  if (ifunc != NULL
-	      && (!info->shared
+	      && (!bfd_link_pic (info)
 		  || is_branch_reloc (r_type)))
 	    {
 	      addend = 0;
-	      if (r_type == R_PPC_PLTREL24 && info->shared)
+	      if (r_type == R_PPC_PLTREL24 && bfd_link_pic (info))
 		addend = rel->r_addend;
 	      ent = find_plt_ent (ifunc, got2, addend);
 	    }
 	  if (ent != NULL)
 	    {
+	      if (bfd_link_pic (info)
+		  && ent->sec != got2
+		  && htab->plt_type != PLT_NEW
+		  && (!htab->elf.dynamic_sections_created
+		      || h == NULL
+		      || h->dynindx == -1))
+		{
+		  /* Uh oh, we are going to create a pic glink stub
+		     for an ifunc (here for h == NULL and later in
+		     finish_dynamic_symbol for h != NULL), and
+		     apparently are using code compiled with
+		     -mbss-plt.  The difficulty is that -mbss-plt code
+		     gives no indication via a magic PLTREL24 addend
+		     whether r30 is equal to _GLOBAL_OFFSET_TABLE_ or
+		     is pointing into a .got2 section (and how far
+		     into .got2).  */
+		    info->callbacks->einfo
+		      /* xgettext:c-format */
+		      (_("%X%H: unsupported bss-plt -fPIC ifunc %s\n"),
+		       input_bfd, input_section, rel->r_offset, sym_name);
+		}
 	      if (h == NULL && (ent->plt.offset & 1) == 0)
 		{
 		  Elf_Internal_Rela rela;
 		  bfd_byte *loc;
 
-		  rela.r_offset = (htab->iplt->output_section->vma
-				   + htab->iplt->output_offset
+		  rela.r_offset = (htab->elf.iplt->output_section->vma
+				   + htab->elf.iplt->output_offset
 				   + ent->plt.offset);
 		  rela.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE);
 		  rela.r_addend = relocation;
-		  loc = htab->reliplt->contents;
-		  loc += (htab->reliplt->reloc_count++
+		  loc = htab->elf.irelplt->contents;
+		  loc += (htab->elf.irelplt->reloc_count++
 			  * sizeof (Elf32_External_Rela));
 		  bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
 
@@ -8204,7 +8393,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		{
 		  unsigned char *p = ((unsigned char *) htab->glink->contents
 				      + ent->glink_offset);
-		  write_glink_stub (ent, htab->iplt, p, info);
+		  write_glink_stub (ent, htab->elf.iplt, p, info);
 		  ent->glink_offset |= 1;
 		}
 
@@ -8217,8 +8406,8 @@ ppc_elf_relocate_section (bfd *output_bf
 			      + htab->glink->output_offset
 			      + (ent->glink_offset & ~1));
 	      else
-		relocation = (htab->plt->output_section->vma
-			      + htab->plt->output_offset
+		relocation = (htab->elf.splt->output_section->vma
+			      + htab->elf.splt->output_offset
 			      + ent->plt.offset);
 	    }
 	}
@@ -8232,12 +8421,13 @@ ppc_elf_relocate_section (bfd *output_bf
 	{
 	default:
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%P: %B: unknown relocation type %d for symbol %s\n"),
 	     input_bfd, (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
-	  continue;
+	  goto copy_reloc;
 
 	case R_PPC_NONE:
 	case R_PPC_TLS:
@@ -8246,7 +8436,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_EMB_MRKREF:
 	case R_PPC_GNU_VTINHERIT:
 	case R_PPC_GNU_VTENTRY:
-	  continue;
+	  goto copy_reloc;
 
 	  /* GOT16 relocations.  Like an ADDR16 using the symbol's
 	     address in the GOT as relocation value instead of the
@@ -8293,7 +8483,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	    bfd_vma *offp;
 	    unsigned long indx;
 
-	    if (htab->got == NULL)
+	    if (htab->elf.sgot == NULL)
 	      abort ();
 
 	    indx = 0;
@@ -8303,11 +8493,11 @@ ppc_elf_relocate_section (bfd *output_bf
 	      offp = &htab->tlsld_got.offset;
 	    else if (h != NULL)
 	      {
-		bfd_boolean dyn;
-		dyn = htab->elf.dynamic_sections_created;
-		if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		    || (info->shared
-			&& SYMBOL_REFERENCES_LOCAL (info, h)))
+		if (!htab->elf.dynamic_sections_created
+		    || h->dynindx == -1
+		    || SYMBOL_REFERENCES_LOCAL (info, h)
+		    || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+			&& h->root.type == bfd_link_hash_undefweak))
 		  /* This is actually a static link, or it is a
 		     -Bsymbolic link and the symbol is defined
 		     locally, or the symbol was forced to be local
@@ -8315,7 +8505,6 @@ ppc_elf_relocate_section (bfd *output_bf
 		  ;
 		else
 		  {
-		    BFD_ASSERT (h->dynindx != -1);
 		    indx = h->dynindx;
 		    unresolved_reloc = FALSE;
 		  }
@@ -8374,19 +8563,20 @@ ppc_elf_relocate_section (bfd *output_bf
 		      }
 
 		    /* Generate relocs for the dynamic linker.  */
-		    if ((info->shared || indx != 0)
-			&& (offp == &htab->tlsld_got.offset
-			    || h == NULL
-			    || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-			    || h->root.type != bfd_link_hash_undefweak))
+		    if (indx != 0
+			|| (bfd_link_pic (info)
+			    && (h == NULL
+				|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+				|| h->root.type != bfd_link_hash_undefweak
+				|| offp == &htab->tlsld_got.offset)))
 		      {
-			asection *rsec = htab->relgot;
+			asection *rsec = htab->elf.srelgot;
 			bfd_byte * loc;
 
 			if (ifunc != NULL)
-			  rsec = htab->reliplt;
-			outrel.r_offset = (htab->got->output_section->vma
-					   + htab->got->output_offset
+			  rsec = htab->elf.irelplt;
+			outrel.r_offset = (htab->elf.sgot->output_section->vma
+					   + htab->elf.sgot->output_offset
 					   + off);
 			outrel.r_addend = 0;
 			if (tls_ty & (TLS_LD | TLS_GD))
@@ -8436,29 +8626,35 @@ ppc_elf_relocate_section (bfd *output_bf
 		    else
 		      {
 			bfd_vma value = relocation;
+			int tlsopt = (htab->plt_type == PLT_NEW
+				      && !htab->params->no_tls_get_addr_opt
+				      && htab->tls_get_addr != NULL
+				      && htab->tls_get_addr->plt.plist != NULL);
 
-			if (tls_ty == (TLS_TLS | TLS_LD))
-			  value = 1;
-			else if (tls_ty != 0)
+			if (tls_ty != 0)
 			  {
 			    if (htab->elf.tls_sec == NULL)
 			      value = 0;
 			    else
 			      {
-				value -= htab->elf.tls_sec->vma + DTP_OFFSET;
-				if (tls_ty == (TLS_TLS | TLS_TPREL))
+				if (tls_ty & TLS_LD)
+				  value = 0;
+				else
+				  value -= htab->elf.tls_sec->vma + DTP_OFFSET;
+				if ((tls_ty & TLS_TPREL)
+				    || (tlsopt && !(tls_ty & TLS_DTPREL)))
 				  value += DTP_OFFSET - TP_OFFSET;
 			      }
 
-			    if (tls_ty == (TLS_TLS | TLS_GD))
+			    if (tls_ty & (TLS_LD | TLS_GD))
 			      {
-				bfd_put_32 (output_bfd, value,
-					    htab->got->contents + off + 4);
-				value = 1;
+				bfd_put_32 (input_bfd, value,
+					    htab->elf.sgot->contents + off + 4);
+				value = !tlsopt;
 			      }
 			  }
-			bfd_put_32 (output_bfd, value,
-				    htab->got->contents + off);
+			bfd_put_32 (input_bfd, value,
+				    htab->elf.sgot->contents + off);
 		      }
 
 		    off += 4;
@@ -8497,10 +8693,10 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	    /* If here for a picfixup, we're done.  */
 	    if (r_type != ELF32_R_TYPE (rel->r_info))
-	      continue;
+	      goto copy_reloc;
 
-	    relocation = (htab->got->output_section->vma
-			  + htab->got->output_offset
+	    relocation = (htab->elf.sgot->output_section->vma
+			  + htab->elf.sgot->output_offset
 			  + off
 			  - SYM_VAL (htab->elf.hgot));
 
@@ -8510,7 +8706,8 @@ ppc_elf_relocate_section (bfd *output_bf
 	       got at entry m+n bears little relation to the entry m.  */
 	    if (addend != 0)
 	      info->callbacks->einfo
-		(_("%P: %H: non-zero addend on %s reloc against `%s'\n"),
+		/* xgettext:c-format */
+		(_("%H: non-zero addend on %s reloc against `%s'\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name,
 		 sym_name);
@@ -8523,14 +8720,28 @@ ppc_elf_relocate_section (bfd *output_bf
 	     at a symbol not in this object.  */
 	  if (unresolved_reloc)
 	    {
-	      if (! (*info->callbacks->undefined_symbol) (info,
-							  h->root.root.string,
-							  input_bfd,
-							  input_section,
-							  rel->r_offset,
-							  TRUE))
-		return FALSE;
-	      continue;
+	      (*info->callbacks->undefined_symbol) (info,
+						    h->root.root.string,
+						    input_bfd,
+						    input_section,
+						    rel->r_offset,
+						    TRUE);
+	      goto copy_reloc;
+	    }
+	  if (h != NULL && h->type == STT_GNU_IFUNC && bfd_link_pic (info))
+	    {
+	      /* @local on an ifunc does not really make sense since
+		 the ifunc resolver can take you anywhere.  More
+		 seriously, calls to ifuncs must go through a plt call
+		 stub, and for pic the plt call stubs uses r30 to
+		 access the PLT.  The problem is that a call that is
+		 local won't have the +32k reloc addend trick marking
+		 -fPIC code, so the linker won't know whether r30 is
+		 _GLOBAL_OFFSET_TABLE_ or pointing into a .got2 section.  */
+	      /* xgettext:c-format */
+	      info->callbacks->einfo (_("%X%H: @local call to ifunc %s\n"),
+				      input_bfd, input_section, rel->r_offset,
+				      h->root.root.string);
 	    }
 	  break;
 
@@ -8557,10 +8768,10 @@ ppc_elf_relocate_section (bfd *output_bf
 		 code using weak externs ought to check that they are
 		 defined before using them.  */
 	      bfd_byte *p = contents + rel->r_offset - d_offset;
-	      unsigned int insn = bfd_get_32 (output_bfd, p);
+	      unsigned int insn = bfd_get_32 (input_bfd, p);
 	      insn = _bfd_elf_ppc_at_tprel_transform (insn, 2);
 	      if (insn != 0)
-		bfd_put_32 (output_bfd, insn, p);
+		bfd_put_32 (input_bfd, insn, p);
 	      break;
 	    }
 	  if (htab->elf.tls_sec != NULL)
@@ -8589,6 +8800,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_REL16_LO:
 	case R_PPC_REL16_HI:
 	case R_PPC_REL16_HA:
+	case R_PPC_REL16DX_HA:
 	  break;
 
 	case R_PPC_REL32:
@@ -8623,7 +8835,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_ADDR14:
 	case R_PPC_ADDR14_BRTAKEN:
 	case R_PPC_ADDR14_BRNTAKEN:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    break;
 	  /* fall through */
 
@@ -8632,7 +8844,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	      || is_vxworks_tls)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && !(h != NULL
 		    && ((h->root.type == bfd_link_hash_undefined
 			 && (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
@@ -8642,7 +8854,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	       && (must_be_dyn_reloc (info, r_type)
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -8667,7 +8879,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		 time.  */
 	      sreloc = elf_section_data (input_section)->sreloc;
 	      if (ifunc)
-		sreloc = htab->reliplt;
+		sreloc = htab->elf.irelplt;
 	      if (sreloc == NULL)
 		return FALSE;
 
@@ -8716,7 +8928,8 @@ ppc_elf_relocate_section (bfd *output_bf
 			     So we'll segfault when trying to run the
 			     indirection function to resolve the reloc.  */
 			  info->callbacks->einfo
-			    (_("%P: %H: relocation %s for indirect "
+			    /* xgettext:c-format */
+			    (_("%H: relocation %s for indirect "
 			       "function %s unsupported\n"),
 			     input_bfd, input_section, rel->r_offset,
 			     howto->name,
@@ -8769,19 +8982,45 @@ ppc_elf_relocate_section (bfd *output_bf
 	      bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
 
 	      if (skip == -1)
-		continue;
+		goto copy_reloc;
 
-	      /* This reloc will be computed at runtime.  We clear the memory
-		 so that it contains predictable value.  */
-	      if (! skip
-		  && ((input_section->flags & SEC_ALLOC) != 0
-		      || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE))
+	      /* This reloc will be computed at runtime.  Clear the memory
+		 so that it contains a predictable value for prelink.  */
+	      if (!skip)
 		{
 		  relocation = howto->pc_relative ? outrel.r_offset : 0;
 		  addend = 0;
 		  break;
 		}
 	    }
+	  else if (r_type == R_PPC_DTPMOD32
+		   && htab->plt_type == PLT_NEW
+		   && !htab->params->no_tls_get_addr_opt
+		   && htab->tls_get_addr != NULL
+		   && htab->tls_get_addr->plt.plist != NULL)
+	    {
+	      /* Set up for __tls_get_addr_opt stub when this entry
+		 does not have dynamic relocs.  */
+	      relocation = 0;
+	      /* Set up the next word for local dynamic.  If it turns
+		 out to be global dynamic, the reloc will overwrite
+		 this value.  */
+	      if (rel->r_offset + 8 <= input_section->size)
+		bfd_put_32 (input_bfd, DTP_OFFSET - TP_OFFSET,
+			    contents + rel->r_offset + 4);
+	    }
+	  else if (r_type == R_PPC_DTPREL32
+		   && htab->plt_type == PLT_NEW
+		   && !htab->params->no_tls_get_addr_opt
+		   && htab->tls_get_addr != NULL
+		   && htab->tls_get_addr->plt.plist != NULL
+		   && rel > relocs
+		   && rel[-1].r_info == ELF32_R_INFO (r_symndx, R_PPC_DTPMOD32)
+		   && rel[-1].r_offset + 4 == rel->r_offset)
+	    {
+	      /* __tls_get_addr_opt stub value.  */
+	      addend += DTP_OFFSET - TP_OFFSET;
+	    }
 	  break;
 
 	case R_PPC_RELAX_PLT:
@@ -8793,7 +9032,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	      if (r_type == R_PPC_RELAX_PLTREL24)
 		{
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    got2_addend = addend;
 		  addend = 0;
 		}
@@ -8803,11 +9042,11 @@ ppc_elf_relocate_section (bfd *output_bf
 			      + htab->glink->output_offset
 			      + ent->glink_offset);
 	      else
-		relocation = (htab->plt->output_section->vma
-			      + htab->plt->output_offset
+		relocation = (htab->elf.splt->output_section->vma
+			      + htab->elf.splt->output_offset
 			      + ent->plt.offset);
 	    }
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	case R_PPC_RELAX:
 	  {
@@ -8816,15 +9055,15 @@ ppc_elf_relocate_section (bfd *output_bf
 	    size_t insn_offset = rel->r_offset;
 	    unsigned int insn;
 
-	    if (info->shared)
+	    if (bfd_link_pic (info))
 	      {
 		relocation -= (input_section->output_section->vma
 			       + input_section->output_offset
 			       + rel->r_offset - 4);
 		stub = shared_stub_entry;
-		bfd_put_32 (output_bfd, stub[0], contents + insn_offset - 12);
-		bfd_put_32 (output_bfd, stub[1], contents + insn_offset - 8);
-		bfd_put_32 (output_bfd, stub[2], contents + insn_offset - 4);
+		bfd_put_32 (input_bfd, stub[0], contents + insn_offset - 12);
+		bfd_put_32 (input_bfd, stub[1], contents + insn_offset - 8);
+		bfd_put_32 (input_bfd, stub[2], contents + insn_offset - 4);
 		stub += 3;
 		size = ARRAY_SIZE (shared_stub_entry) - 3;
 	      }
@@ -8835,18 +9074,18 @@ ppc_elf_relocate_section (bfd *output_bf
 	      }
 
 	    relocation += addend;
-	    if (info->relocatable)
+	    if (bfd_link_relocatable (info))
 	      relocation = 0;
 
 	    /* First insn is HA, second is LO.  */
 	    insn = *stub++;
 	    insn |= ((relocation + 0x8000) >> 16) & 0xffff;
-	    bfd_put_32 (output_bfd, insn, contents + insn_offset);
+	    bfd_put_32 (input_bfd, insn, contents + insn_offset);
 	    insn_offset += 4;
 
 	    insn = *stub++;
 	    insn |= relocation & 0xffff;
-	    bfd_put_32 (output_bfd, insn, contents + insn_offset);
+	    bfd_put_32 (input_bfd, insn, contents + insn_offset);
 	    insn_offset += 4;
 	    size -= 2;
 
@@ -8854,7 +9093,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	      {
 		insn = *stub++;
 		--size;
-		bfd_put_32 (output_bfd, insn, contents + insn_offset);
+		bfd_put_32 (input_bfd, insn, contents + insn_offset);
 		insn_offset += 4;
 	      }
 
@@ -8862,12 +9101,13 @@ ppc_elf_relocate_section (bfd *output_bf
 	       relocs to describe this relocation.  */
 	    BFD_ASSERT (ELF32_R_TYPE (relend[-1].r_info) == R_PPC_NONE);
 	    /* The relocs are at the bottom 2 bytes */
-	    rel[0].r_offset += d_offset;
-	    memmove (rel + 1, rel, (relend - rel - 1) * sizeof (*rel));
-	    rel[0].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_HA);
-	    rel[1].r_offset += 4;
-	    rel[1].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_LO);
-	    rel++;
+	    wrel->r_offset = rel->r_offset + d_offset;
+	    wrel->r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_HA);
+	    wrel->r_addend = rel->r_addend;
+	    memmove (wrel + 1, wrel, (relend - wrel - 1) * sizeof (*wrel));
+	    wrel++, rel++;
+	    wrel->r_offset += 4;
+	    wrel->r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_LO);
 	  }
 	  continue;
 
@@ -8920,10 +9160,12 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_PLTREL24:
 	  if (h != NULL && ifunc == NULL)
 	    {
-	      struct plt_entry *ent = find_plt_ent (&h->plt.plist, got2,
-						    info->shared ? addend : 0);
+	      struct plt_entry *ent;
+
+	      ent = find_plt_ent (&h->plt.plist, got2,
+				  bfd_link_pic (info) ? addend : 0);
 	      if (ent == NULL
-		  || htab->plt == NULL)
+		  || htab->elf.splt == NULL)
 		{
 		  /* We didn't make a PLT entry for this symbol.  This
 		     happens when statically linking PIC code, or when
@@ -8939,8 +9181,8 @@ ppc_elf_relocate_section (bfd *output_bf
 				  + htab->glink->output_offset
 				  + ent->glink_offset);
 		  else
-		    relocation = (htab->plt->output_section->vma
-				  + htab->plt->output_offset
+		    relocation = (htab->elf.splt->output_section->vma
+				  + htab->elf.splt->output_offset
 				  + ent->plt.offset);
 		}
 	    }
@@ -8971,6 +9213,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		  || strcmp (name, ".sbss") == 0))
 	      {
 		info->callbacks->einfo
+		  /* xgettext:c-format */
 		  (_("%P: %B: the target (%s) of a %s relocation is "
 		     "in the wrong output section (%s)\n"),
 		   input_bfd,
@@ -9001,6 +9244,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		  || strcmp (name, ".sbss2") == 0))
 	      {
 		info->callbacks->einfo
+		  /* xgettext:c-format */
 		  (_("%P: %B: the target (%s) of a %s relocation is "
 		     "in the wrong output section (%s)\n"),
 		   input_bfd,
@@ -9013,39 +9257,45 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	case R_PPC_VLE_LO16A:
 	  relocation = relocation + addend;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16a_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16a_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	case R_PPC_VLE_LO16D:
 	  relocation = relocation + addend;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16d_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16d_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	case R_PPC_VLE_HI16A:
 	  relocation = (relocation + addend) >> 16;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16a_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16a_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	case R_PPC_VLE_HI16D:
 	  relocation = (relocation + addend) >> 16;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16d_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16d_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	case R_PPC_VLE_HA16A:
 	  relocation = (relocation + addend + 0x8000) >> 16;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16a_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16a_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	case R_PPC_VLE_HA16D:
 	  relocation = (relocation + addend + 0x8000) >> 16;
-	  ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-			       relocation, split16d_type);
-	  continue;
+	  ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+			       contents + rel->r_offset, relocation,
+			       split16d_type, htab->params->vle_reloc_fixup);
+	  goto copy_reloc;
 
 	  /* Relocate against either _SDA_BASE_, _SDA2_BASE_, or 0.  */
 	case R_PPC_EMB_SDA21:
@@ -9085,6 +9335,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	    else
 	      {
 		info->callbacks->einfo
+		  /* xgettext:c-format */
 		  (_("%P: %B: the target (%s) of a %s relocation is "
 		     "in the wrong output section (%s)\n"),
 		   input_bfd,
@@ -9094,7 +9345,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
 		bfd_set_error (bfd_error_bad_value);
 		ret = FALSE;
-		continue;
+		goto copy_reloc;
 	      }
 
 	    if (sda != NULL)
@@ -9107,7 +9358,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		addend -= SYM_VAL (sda);
 	      }
 
-	    insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
+	    insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 	    if (reg == 0
 		&& (r_type == R_PPC_VLE_SDA21
 		    || r_type == R_PPC_VLE_SDA21_LO))
@@ -9127,12 +9378,12 @@ ppc_elf_relocate_section (bfd *output_bf
 		/* And the final 11 bits of the value to bits 21 to 31.  */
 		insn |= relocation & 0x7ff;
 
-		bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+		bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 
 		if (r_type == R_PPC_VLE_SDA21
 		    && ((relocation + 0x80000) & 0xffffffff) > 0x100000)
 		  goto overflow;
-		continue;
+		goto copy_reloc;
 	      }
 	    else if (r_type == R_PPC_EMB_SDA21
 		     || r_type == R_PPC_VLE_SDA21
@@ -9141,7 +9392,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		/* Fill in register field.  */
 		insn = (insn & ~RA_REGISTER_MASK) | (reg << RA_REGISTER_SHIFT);
 	      }
-	    bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+	    bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 	  }
 	  break;
 
@@ -9154,7 +9405,6 @@ ppc_elf_relocate_section (bfd *output_bf
 	  {
 	    bfd_vma value;
 	    const char *name;
-	    //int reg;
 	    struct elf_link_hash_entry *sda = NULL;
 
 	    if (sec == NULL || sec->output_section == NULL)
@@ -9166,19 +9416,14 @@ ppc_elf_relocate_section (bfd *output_bf
 	    name = bfd_get_section_name (output_bfd, sec->output_section);
 	    if (strcmp (name, ".sdata") == 0
 		|| strcmp (name, ".sbss") == 0)
-	      {
-		//reg = 13;
-		sda = htab->sdata[0].sym;
-	      }
+	      sda = htab->sdata[0].sym;
 	    else if (strcmp (name, ".sdata2") == 0
 		     || strcmp (name, ".sbss2") == 0)
-	      {
-		//reg = 2;
-		sda = htab->sdata[1].sym;
-	      }
+	      sda = htab->sdata[1].sym;
 	    else
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: the target (%s) of a %s relocation is "
 		     "in the wrong output section (%s)"),
 		   input_bfd,
@@ -9188,54 +9433,60 @@ ppc_elf_relocate_section (bfd *output_bf
 
 		bfd_set_error (bfd_error_bad_value);
 		ret = FALSE;
-		continue;
+		goto copy_reloc;
 	      }
 
-	    if (sda != NULL)
+	    if (sda == NULL || !is_static_defined (sda))
 	      {
-		if (!is_static_defined (sda))
-		  {
-		    unresolved_reloc = TRUE;
-		    break;
-		  }
+		unresolved_reloc = TRUE;
+		break;
 	      }
-
-	    value = (sda->root.u.def.section->output_section->vma
-		     + sda->root.u.def.section->output_offset
-		     + addend);
+	    value = relocation + addend - SYM_VAL (sda);
 
 	    if (r_type == R_PPC_VLE_SDAREL_LO16A)
-	      ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				   value, split16a_type);
+	      ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				   contents + rel->r_offset, value,
+				   split16a_type,
+				   htab->params->vle_reloc_fixup);
 	    else if (r_type == R_PPC_VLE_SDAREL_LO16D)
-	      ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				   value, split16d_type);
+	      ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				   contents + rel->r_offset, value,
+				   split16d_type,
+				   htab->params->vle_reloc_fixup);
 	    else if (r_type == R_PPC_VLE_SDAREL_HI16A)
 	      {
 		value = value >> 16;
-		ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				     value, split16a_type);
+		ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				     contents + rel->r_offset, value,
+				     split16a_type,
+				     htab->params->vle_reloc_fixup);
 	      }
 	    else if (r_type == R_PPC_VLE_SDAREL_HI16D)
 	      {
 		value = value >> 16;
-		ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				     value, split16d_type);
+		ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				     contents + rel->r_offset, value,
+				     split16d_type,
+				     htab->params->vle_reloc_fixup);
 	      }
 	    else if (r_type == R_PPC_VLE_SDAREL_HA16A)
 	      {
 		value = (value + 0x8000) >> 16;
-		ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				     value, split16a_type);
+		ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				     contents + rel->r_offset, value,
+				     split16a_type,
+				     htab->params->vle_reloc_fixup);
 	      }
 	    else if (r_type == R_PPC_VLE_SDAREL_HA16D)
 	      {
 		value = (value + 0x8000) >> 16;
-		ppc_elf_vle_split16 (output_bfd, contents + rel->r_offset,
-				     value, split16d_type);
+		ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
+				     contents + rel->r_offset, value,
+				     split16d_type,
+				     htab->params->vle_reloc_fixup);
 	      }
 	  }
-	  continue;
+	  goto copy_reloc;
 
 	  /* Relocate against the beginning of the section.  */
 	case R_PPC_SECTOFF:
@@ -9276,6 +9527,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	case R_PPC_EMB_RELST_HA:
 	case R_PPC_EMB_BIT_FLD:
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%P: %B: relocation %s is not yet supported for symbol %s\n"),
 	     input_bfd,
 	     howto->name,
@@ -9283,7 +9535,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	  bfd_set_error (bfd_error_invalid_operation);
 	  ret = FALSE;
-	  continue;
+	  goto copy_reloc;
 	}
 
       /* Do any further special processing.  */
@@ -9294,6 +9546,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
 	case R_PPC_ADDR16_HA:
 	case R_PPC_REL16_HA:
+	case R_PPC_REL16DX_HA:
 	case R_PPC_SECTOFF_HA:
 	case R_PPC_TPREL16_HA:
 	case R_PPC_DTPREL16_HA:
@@ -9305,7 +9558,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	     alone (it will be set to zero elsewhere in the link).  */
 	  if (sec == NULL)
 	    break;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	case R_PPC_PLT16_HA:
 	case R_PPC_GOT16_HA:
@@ -9343,7 +9596,8 @@ ppc_elf_relocate_section (bfd *output_bf
 	       that make up part of the insn opcode.  */
 	    unsigned int insn, mask, lobit;
 
-	    insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
+	    insn = bfd_get_32 (input_bfd,
+			       contents + rel->r_offset - d_offset);
 	    mask = 0;
 	    if (is_insn_ds_form (insn))
 	      mask = 3;
@@ -9351,18 +9605,20 @@ ppc_elf_relocate_section (bfd *output_bf
 	      mask = 15;
 	    else
 	      break;
-	    lobit = mask & (relocation + addend);
+	    relocation += addend;
+	    addend = insn & mask;
+	    lobit = mask & relocation;
 	    if (lobit != 0)
 	      {
-		addend -= lobit;
+		relocation ^= lobit;
 		info->callbacks->einfo
-		  (_("%P: %H: error: %s against `%s' not a multiple of %u\n"),
+		  /* xgettext:c-format */
+		  (_("%H: error: %s against `%s' not a multiple of %u\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   howto->name, sym_name, mask + 1);
 		bfd_set_error (bfd_error_bad_value);
 		ret = FALSE;
 	      }
-	    addend += insn & mask;
 	  }
 	  break;
 	}
@@ -9385,7 +9641,8 @@ ppc_elf_relocate_section (bfd *output_bf
 				      rel->r_offset) != (bfd_vma) -1)
 	{
 	  info->callbacks->einfo
-	    (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"),
+	    /* xgettext:c-format */
+	    (_("%H: unresolvable %s relocation against symbol `%s'\n"),
 	     input_bfd, input_section, rel->r_offset,
 	     howto->name,
 	     sym_name);
@@ -9421,8 +9678,30 @@ ppc_elf_relocate_section (bfd *output_bf
 	    }
 	}
 
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
-				    rel->r_offset, relocation, addend);
+      if (r_type == R_PPC_REL16DX_HA)
+	{
+	  /* Split field reloc isn't handled by _bfd_final_link_relocate.  */
+	  if (rel->r_offset + 4 > input_section->size)
+	    r = bfd_reloc_outofrange;
+	  else
+	    {
+	      unsigned int insn;
+
+	      relocation += addend;
+	      relocation -= (rel->r_offset
+			     + input_section->output_offset
+			     + input_section->output_section->vma);
+	      relocation >>= 16;
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      insn &= ~0x1fffc1;
+	      insn |= (relocation & 0xffc1) | ((relocation & 0x3e) << 15);
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+	      r = bfd_reloc_ok;
+	    }
+	}
+      else
+	r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
+				      rel->r_offset, relocation, addend);
 
       if (r != bfd_reloc_ok)
 	{
@@ -9436,23 +9715,45 @@ ppc_elf_relocate_section (bfd *output_bf
 		       && (h->root.type == bfd_link_hash_undefweak
 			   || h->root.type == bfd_link_hash_undefined)
 		       && is_branch_reloc (r_type)))
-		{
-		  if (!((*info->callbacks->reloc_overflow)
-			(info, (h ? &h->root : NULL), sym_name,
-			 howto->name, rel->r_addend,
-			 input_bfd, input_section, rel->r_offset)))
-		    return FALSE;
-		}
+		info->callbacks->reloc_overflow
+		  (info, (h ? &h->root : NULL), sym_name, howto->name,
+		   rel->r_addend, input_bfd, input_section, rel->r_offset);
 	    }
 	  else
 	    {
 	      info->callbacks->einfo
-		(_("%P: %H: %s reloc against `%s': error %d\n"),
+		/* xgettext:c-format */
+		(_("%H: %s reloc against `%s': error %d\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name, sym_name, (int) r);
 	      ret = FALSE;
 	    }
 	}
+    copy_reloc:
+      if (wrel != rel)
+	*wrel = *rel;
+    }
+
+  if (wrel != rel)
+    {
+      Elf_Internal_Shdr *rel_hdr;
+      size_t deleted = rel - wrel;
+
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      if (rel_hdr->sh_size == 0)
+	{
+	  /* It is too late to remove an empty reloc section.  Leave
+	     one NONE reloc.
+	     ??? What is wrong with an empty section???  */
+	  rel_hdr->sh_size = rel_hdr->sh_entsize;
+	  deleted -= 1;
+	  wrel++;
+	}
+      relend = wrel;
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      input_section->reloc_count -= deleted;
     }
 
 #ifdef DEBUG
@@ -9471,7 +9772,7 @@ ppc_elf_relocate_section (bfd *output_bf
 
   if (htab->params->ppc476_workaround
       && input_section->sec_info_type == SEC_INFO_TYPE_TARGET
-      && (!info->relocatable
+      && (!bfd_link_relocatable (info)
 	  || (input_section->output_section->alignment_power
 	      >= htab->params->pagesize_p2)))
     {
@@ -9581,13 +9882,13 @@ ppc_elf_relocate_section (bfd *output_bf
 	     prevent the bad prefetch from happening in the first
 	     place:
 	     .
-	     .	lis 9,new_page@ha	 lis 9,new_page@ha	
-	     .	addi 9,9,new_page@l	 addi 9,9,new_page@l	
-	     .	mtctr 9			 mtctr 9			
-	     .	bctr			 bctr			
+	     .	lis 9,new_page@ha	 lis 9,new_page@ha
+	     .	addi 9,9,new_page@l	 addi 9,9,new_page@l
+	     .	mtctr 9			 mtctr 9
+	     .	bctr			 bctr
 	     .	nop			 b somewhere_else
-	     .	b somewhere_else	 nop			
-	     . new_page:		new_page:		
+	     .	b somewhere_else	 nop
+	     . new_page:		new_page:
 	     .  */
 	  insn = bfd_get_32 (input_bfd, contents + offset);
 	  if ((insn & (0x3f << 26)) == (18u << 26)          /* b,bl,ba,bla */
@@ -9683,9 +9984,9 @@ ppc_elf_relocate_section (bfd *output_bf
 	      bfd_vma delta = ((insn & 0xfffc) ^ 0x8000) - 0x8000;
 
 	      delta += offset - patch_off;
-	      if (info->relocatable && rel != NULL)
+	      if (bfd_link_relocatable (info) && rel != NULL)
 		delta = 0;
-	      if (!info->relocatable && rel != NULL)
+	      if (!bfd_link_relocatable (info) && rel != NULL)
 		{
 		  enum elf_ppc_reloc_type r_type;
 
@@ -9811,18 +10112,18 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		got_offset = (reloc_index + 3) * 4;
 
 		/* Use the right PLT. */
-		plt_entry = info->shared ? ppc_elf_vxworks_pic_plt_entry
+		plt_entry = bfd_link_pic (info) ? ppc_elf_vxworks_pic_plt_entry
 			    : ppc_elf_vxworks_plt_entry;
 
 		/* Fill in the .plt on VxWorks.  */
-		if (info->shared)
+		if (bfd_link_pic (info))
 		  {
 		    bfd_put_32 (output_bfd,
 				plt_entry[0] | PPC_HA (got_offset),
-				htab->plt->contents + ent->plt.offset + 0);
+				htab->elf.splt->contents + ent->plt.offset + 0);
 		    bfd_put_32 (output_bfd,
 				plt_entry[1] | PPC_LO (got_offset),
-				htab->plt->contents + ent->plt.offset + 4);
+				htab->elf.splt->contents + ent->plt.offset + 4);
 		  }
 		else
 		  {
@@ -9830,16 +10131,16 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 
 		    bfd_put_32 (output_bfd,
 				plt_entry[0] | PPC_HA (got_loc),
-				htab->plt->contents + ent->plt.offset + 0);
+				htab->elf.splt->contents + ent->plt.offset + 0);
 		    bfd_put_32 (output_bfd,
 				plt_entry[1] | PPC_LO (got_loc),
-				htab->plt->contents + ent->plt.offset + 4);
+				htab->elf.splt->contents + ent->plt.offset + 4);
 		  }
 
 		bfd_put_32 (output_bfd, plt_entry[2],
-			    htab->plt->contents + ent->plt.offset + 8);
+			    htab->elf.splt->contents + ent->plt.offset + 8);
 		bfd_put_32 (output_bfd, plt_entry[3],
-			    htab->plt->contents + ent->plt.offset + 12);
+			    htab->elf.splt->contents + ent->plt.offset + 12);
 
 		/* This instruction is an immediate load.  The value loaded is
 		   the byte offset of the R_PPC_JMP_SLOT relocation from the
@@ -9849,7 +10150,7 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		   prescaled offset.  */
 		bfd_put_32 (output_bfd,
 			    plt_entry[4] | reloc_index,
-			    htab->plt->contents + ent->plt.offset + 16);
+			    htab->elf.splt->contents + ent->plt.offset + 16);
 		/* This instruction is a PC-relative branch whose target is
 		   the start of the PLT section.  The address of this branch
 		   instruction is 20 bytes beyond the start of this PLT entry.
@@ -9859,21 +10160,21 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		bfd_put_32 (output_bfd,
 			    (plt_entry[5]
 			     | (-(ent->plt.offset + 20) & 0x03fffffc)),
-			    htab->plt->contents + ent->plt.offset + 20);
+			    htab->elf.splt->contents + ent->plt.offset + 20);
 		bfd_put_32 (output_bfd, plt_entry[6],
-			    htab->plt->contents + ent->plt.offset + 24);
+			    htab->elf.splt->contents + ent->plt.offset + 24);
 		bfd_put_32 (output_bfd, plt_entry[7],
-			    htab->plt->contents + ent->plt.offset + 28);
+			    htab->elf.splt->contents + ent->plt.offset + 28);
 
 		/* Fill in the GOT entry corresponding to this PLT slot with
 		   the address immediately after the "bctr" instruction
 		   in this PLT entry.  */
-		bfd_put_32 (output_bfd, (htab->plt->output_section->vma
-					 + htab->plt->output_offset
+		bfd_put_32 (output_bfd, (htab->elf.splt->output_section->vma
+					 + htab->elf.splt->output_offset
 					 + ent->plt.offset + 16),
-			    htab->sgotplt->contents + got_offset);
+			    htab->elf.sgotplt->contents + got_offset);
 
-		if (!info->shared)
+		if (!bfd_link_pic (info))
 		  {
 		    /* Fill in a couple of entries in .rela.plt.unloaded.  */
 		    loc = htab->srelplt2->contents
@@ -9882,8 +10183,8 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 			 * sizeof (Elf32_External_Rela));
 
 		    /* Provide the @ha relocation for the first instruction.  */
-		    rela.r_offset = (htab->plt->output_section->vma
-				     + htab->plt->output_offset
+		    rela.r_offset = (htab->elf.splt->output_section->vma
+				     + htab->elf.splt->output_offset
 				     + ent->plt.offset + 2);
 		    rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
 						R_PPC_ADDR16_HA);
@@ -9892,8 +10193,8 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		    loc += sizeof (Elf32_External_Rela);
 
 		    /* Provide the @l relocation for the second instruction.  */
-		    rela.r_offset = (htab->plt->output_section->vma
-				     + htab->plt->output_offset
+		    rela.r_offset = (htab->elf.splt->output_section->vma
+				     + htab->elf.splt->output_offset
 				     + ent->plt.offset + 6);
 		    rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
 						R_PPC_ADDR16_LO);
@@ -9903,8 +10204,8 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 
 		    /* Provide a relocation for the GOT entry corresponding to this
 		       PLT slot.  Point it at the middle of the .plt entry.  */
-		    rela.r_offset = (htab->sgotplt->output_section->vma
-				     + htab->sgotplt->output_offset
+		    rela.r_offset = (htab->elf.sgotplt->output_section->vma
+				     + htab->elf.sgotplt->output_offset
 				     + got_offset);
 		    rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx,
 						R_PPC_ADDR32);
@@ -9917,17 +10218,17 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		   address of the PLT entry for this function, as specified
 		   by the ABI.  Instead, the offset is set to the address of
 		   the GOT slot for this function.  See EABI 4.4.4.1.  */
-		rela.r_offset = (htab->sgotplt->output_section->vma
-				 + htab->sgotplt->output_offset
+		rela.r_offset = (htab->elf.sgotplt->output_section->vma
+				 + htab->elf.sgotplt->output_offset
 				 + got_offset);
 
 	      }
 	    else
 	      {
-		asection *splt = htab->plt;
+		asection *splt = htab->elf.splt;
 		if (!htab->elf.dynamic_sections_created
 		    || h->dynindx == -1)
-		  splt = htab->iplt;
+		  splt = htab->elf.iplt;
 
 		rela.r_offset = (splt->output_section->vma
 				 + splt->output_offset
@@ -9966,11 +10267,11 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 
 	    if (!htab->elf.dynamic_sections_created
 		|| h->dynindx == -1)
-	      loc = (htab->reliplt->contents
-		     + (htab->reliplt->reloc_count++
+	      loc = (htab->elf.irelplt->contents
+		     + (htab->elf.irelplt->reloc_count++
 			* sizeof (Elf32_External_Rela)));
 	    else
-	      loc = (htab->relplt->contents
+	      loc = (htab->elf.srelplt->contents
 		     + reloc_index * sizeof (Elf32_External_Rela));
 	    bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
 
@@ -9995,7 +10296,7 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 		  }
 	      }
 	    else if (h->type == STT_GNU_IFUNC
-		     && !info->shared)
+		     && !bfd_link_pic (info))
 	      {
 		/* Set the value of ifunc symbols in a non-pie
 		   executable to the glink entry.  This is to avoid
@@ -10018,10 +10319,10 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 	    || h->dynindx == -1)
 	  {
 	    unsigned char *p;
-	    asection *splt = htab->plt;
+	    asection *splt = htab->elf.splt;
 	    if (!htab->elf.dynamic_sections_created
 		|| h->dynindx == -1)
-	      splt = htab->iplt;
+	      splt = htab->elf.iplt;
 
 	    p = (unsigned char *) htab->glink->contents + ent->glink_offset;
 
@@ -10047,7 +10348,7 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 
 	    write_glink_stub (ent, splt, p, info);
 
-	    if (!info->shared)
+	    if (!bfd_link_pic (info))
 	      /* We only need one non-PIC glink stub.  */
 	      break;
 	  }
@@ -10071,8 +10372,10 @@ ppc_elf_finish_dynamic_symbol (bfd *outp
 
       if (ppc_elf_hash_entry (h)->has_sda_refs)
 	s = htab->relsbss;
+      else if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
       else
-	s = htab->relbss;
+	s = htab->elf.srelbss;
       BFD_ASSERT (s != NULL);
 
       rela.r_offset = SYM_VAL (h);
@@ -10096,7 +10399,7 @@ ppc_elf_reloc_type_class (const struct b
 {
   struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
 
-  if (rel_sec == htab->reliplt)
+  if (rel_sec == htab->elf.irelplt)
     return reloc_class_ifunc;
 
   switch (ELF32_R_TYPE (rela->r_info))
@@ -10119,7 +10422,6 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 				 struct bfd_link_info *info)
 {
   asection *sdyn;
-  asection *splt;
   struct ppc_elf_link_hash_table *htab;
   bfd_vma got;
   bfd *dynobj;
@@ -10130,12 +10432,8 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 #endif
 
   htab = ppc_elf_hash_table (info);
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = htab->elf.dynobj;
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
-  if (htab->is_vxworks)
-    splt = bfd_get_linker_section (dynobj, ".plt");
-  else
-    splt = NULL;
 
   got = 0;
   if (htab->elf.hgot != NULL)
@@ -10145,7 +10443,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
     {
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      BFD_ASSERT (htab->plt != NULL && sdyn != NULL);
+      BFD_ASSERT (htab->elf.splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
       dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
@@ -10160,18 +10458,18 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	    {
 	    case DT_PLTGOT:
 	      if (htab->is_vxworks)
-		s = htab->sgotplt;
+		s = htab->elf.sgotplt;
 	      else
-		s = htab->plt;
+		s = htab->elf.splt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_PLTRELSZ:
-	      dyn.d_un.d_val = htab->relplt->size;
+	      dyn.d_un.d_val = htab->elf.srelplt->size;
 	      break;
 
 	    case DT_JMPREL:
-	      s = htab->relplt;
+	      s = htab->elf.srelplt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
@@ -10179,15 +10477,6 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	      dyn.d_un.d_ptr = got;
 	      break;
 
-	    case DT_RELASZ:
-	      if (htab->is_vxworks)
-		{
-		  if (htab->relplt)
-		    dyn.d_un.d_ptr -= htab->relplt->size;
-		  break;
-		}
-	      continue;
-
 	    default:
 	      if (htab->is_vxworks
 		  && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn))
@@ -10199,10 +10488,11 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	}
     }
 
-  if (htab->got != NULL)
+  if (htab->elf.sgot != NULL
+      && htab->elf.sgot->output_section != bfd_abs_section_ptr)
     {
-      if (htab->elf.hgot->root.u.def.section == htab->got
-	  || htab->elf.hgot->root.u.def.section == htab->sgotplt)
+      if (htab->elf.hgot->root.u.def.section == htab->elf.sgot
+	  || htab->elf.hgot->root.u.def.section == htab->elf.sgotplt)
 	{
 	  unsigned char *p = htab->elf.hgot->root.u.def.section->contents;
 
@@ -10227,26 +10517,32 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	}
       else
 	{
+	  /* xgettext:c-format */
 	  info->callbacks->einfo (_("%P: %s not defined in linker created %s\n"),
 				  htab->elf.hgot->root.root.string,
-				  (htab->sgotplt != NULL
-				   ? htab->sgotplt->name : htab->got->name));
+				  (htab->elf.sgotplt != NULL
+				   ? htab->elf.sgotplt->name
+				   : htab->elf.sgot->name));
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
 	}
 
-      elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 4;
+      elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
     }
 
   /* Fill in the first entry in the VxWorks procedure linkage table.  */
-  if (splt && splt->size > 0)
+  if (htab->is_vxworks
+      && htab->elf.splt != NULL
+      && htab->elf.splt->size != 0
+      && htab->elf.splt->output_section != bfd_abs_section_ptr)
     {
+      asection *splt = htab->elf.splt;
       /* Use the right PLT. */
-      const bfd_vma *plt_entry = (info->shared
+      const bfd_vma *plt_entry = (bfd_link_pic (info)
 				  ? ppc_elf_vxworks_pic_plt0_entry
 				  : ppc_elf_vxworks_plt0_entry);
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  bfd_vma got_value = SYM_VAL (htab->elf.hgot);
 
@@ -10267,7 +10563,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
       bfd_put_32 (output_bfd, plt_entry[6], splt->contents + 24);
       bfd_put_32 (output_bfd, plt_entry[7], splt->contents + 28);
 
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  Elf_Internal_Rela rela;
 	  bfd_byte *loc;
@@ -10275,8 +10571,8 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	  loc = htab->srelplt2->contents;
 
 	  /* Output the @ha relocation for the first instruction.  */
-	  rela.r_offset = (htab->plt->output_section->vma
-			   + htab->plt->output_offset
+	  rela.r_offset = (htab->elf.splt->output_section->vma
+			   + htab->elf.splt->output_offset
 			   + 2);
 	  rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
 	  rela.r_addend = 0;
@@ -10284,8 +10580,8 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	  loc += sizeof (Elf32_External_Rela);
 
 	  /* Output the @l relocation for the second instruction.  */
-	  rela.r_offset = (htab->plt->output_section->vma
-			   + htab->plt->output_offset
+	  rela.r_offset = (htab->elf.splt->output_section->vma
+			   + htab->elf.splt->output_offset
 			   + 6);
 	  rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
 	  rela.r_addend = 0;
@@ -10484,7 +10780,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	}
 
       /* Last comes the PLTresolve stub.  */
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  bfd_vma bcl;
 
@@ -10615,6 +10911,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 #endif
 
 #define elf_backend_plt_not_loaded	1
+#define elf_backend_want_dynrelro	1
 #define elf_backend_can_gc_sections	1
 #define elf_backend_can_refcount	1
 #define elf_backend_rela_normal		1
@@ -10658,7 +10955,6 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 #define elf_backend_action_discarded		ppc_elf_action_discarded
 #define elf_backend_init_index_section		_bfd_elf_init_1_index_section
 #define elf_backend_lookup_section_flags_hook	ppc_elf_lookup_section_flags
-#define elf_backend_section_processing		ppc_elf_section_processing
 
 #include "elf32-target.h"
 
@@ -10764,6 +11060,8 @@ ppc_elf_vxworks_final_write_processing (
 #define elf_backend_plt_readonly		1
 #undef elf_backend_got_header_size
 #define elf_backend_got_header_size		12
+#undef elf_backend_dtrel_excludes_plt
+#define elf_backend_dtrel_excludes_plt		1
 
 #undef bfd_elf32_get_synthetic_symtab
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ppc.h ./bfd/elf32-ppc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-ppc.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-ppc.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PowerPC-specific support for 64-bit ELF.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -48,6 +48,11 @@ struct ppc_elf_params
   /* The bfd backend detected a non-PIC reference to a protected symbol
      defined in a shared library.  */
   int pic_fixup;
+
+  /* Relocate 16A relocs as 16D and vice versa.  */
+  int vle_reloc_fixup;
+
+  bfd_vma pagesize;
 };
 
 void ppc_elf_link_params (struct bfd_link_info *, struct ppc_elf_params *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-pru.c ./bfd/elf32-pru.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-pru.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elf32-pru.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,1469 @@
+/* 32-bit ELF support for TI PRU.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
+   Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+   Based on elf32-nios2.c
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+/* This file handles TI PRU ELF targets.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+#include "genlink.h"
+#include "elf-bfd.h"
+#include "elf/pru.h"
+#include "opcode/pru.h"
+
+#define SWAP_VALS(A,B)		      \
+  do {				      \
+      (A) ^= (B);		      \
+      (B) ^= (A);		      \
+      (A) ^= (B);		      \
+  } while (0)
+
+/* Enable debugging printout at stdout with this variable.  */
+static bfd_boolean debug_relax = FALSE;
+
+/* Forward declarations.  */
+static bfd_reloc_status_type pru_elf32_pmem_relocate
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type pru_elf32_s10_pcrel_relocate
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type pru_elf32_u8_pcrel_relocate
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type pru_elf32_ldi32_relocate
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type bfd_elf_pru_diff_relocate
+  (bfd *, arelent *, asymbol *, void *,	asection *, bfd *, char **);
+
+/* Target vector.  */
+extern const bfd_target pru_elf32_vec;
+
+/* The relocation table used for SHT_REL sections.  */
+static reloc_howto_type elf_pru_howto_table_rel[] = {
+  /* No relocation.  */
+  HOWTO (R_PRU_NONE,		/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 3,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_PRU_NONE",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_16_PMEM,
+	 2,
+	 1,			/* short */
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_PRU_16_PMEM",
+	 FALSE,
+	 0,			/* src_mask */
+	 0xffff,
+	 FALSE),
+
+  HOWTO (R_PRU_U16_PMEMIMM,
+	 2,
+	 2,
+	 32,
+	 FALSE,
+	 8,
+	 complain_overflow_unsigned,
+	 pru_elf32_pmem_relocate,
+	 "R_PRU_U16_PMEMIMM",
+	 FALSE,
+	 0,			/* src_mask */
+	 0x00ffff00,
+	 FALSE),
+
+  HOWTO (R_PRU_BFD_RELOC_16,
+	 0,
+	 1,			/* short */
+	 16,
+	 FALSE,
+	 0,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_PRU_BFD_RELOC16",
+	 FALSE,
+	 0,			/* src_mask */
+	 0x0000ffff,
+	 FALSE),
+
+  /* 16-bit unsigned immediate relocation.  */
+  HOWTO (R_PRU_U16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 8,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain on overflow */
+	 bfd_elf_generic_reloc,	/* special function */
+	 "R_PRU_U16",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x00ffff00,		/* dest_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_32_PMEM,
+	 2,
+	 2,			/* long */
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 pru_elf32_pmem_relocate,
+	 "R_PRU_32_PMEM",
+	 FALSE,
+	 0,			/* src_mask */
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_PRU_BFD_RELOC_32,
+	 0,
+	 2,			/* long */
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_PRU_BFD_RELOC32",
+	 FALSE,
+	 0,			/* src_mask */
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_PRU_S10_PCREL,
+	 2,
+	 2,
+	 10,
+	 TRUE,
+	 0,
+	 complain_overflow_bitfield,
+	 pru_elf32_s10_pcrel_relocate,
+	 "R_PRU_S10_PCREL",
+	 FALSE,
+	 0,			/* src_mask */
+	 0x060000ff,
+	 TRUE),
+
+  HOWTO (R_PRU_U8_PCREL,
+	 2,
+	 2,
+	 8,
+	 TRUE,
+	 0,
+	 complain_overflow_unsigned,
+	 pru_elf32_u8_pcrel_relocate,
+	 "R_PRU_U8_PCREL",
+	 FALSE,
+	 0,			/* src_mask */
+	 0x000000ff,
+	 TRUE),
+
+  HOWTO (R_PRU_LDI32,
+	 0,			/* rightshift */
+	 4,			/* size (4 = 8bytes) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned, /* complain on overflow */
+	 pru_elf32_ldi32_relocate, /* special function */
+	 "R_PRU_LDI32",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dest_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* GNU-specific relocations.  */
+  HOWTO (R_PRU_GNU_BFD_RELOC_8,
+	 0,
+	 0,			/* byte */
+	 8,
+	 FALSE,
+	 0,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_PRU_BFD_RELOC8",
+	 FALSE,
+	 0,			/* src_mask */
+	 0x000000ff,
+	 FALSE),
+
+  HOWTO (R_PRU_GNU_DIFF8,	/* type */
+	 0,			/* rightshift */
+	 0, 			/* size (0 = byte, 1 = short, 2 = long) */
+	 8, 			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_pru_diff_relocate, /* special_function */
+	 "R_PRU_DIFF8",     	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_GNU_DIFF16,  	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_pru_diff_relocate,/* special_function */
+	 "R_PRU_DIFF16",     	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_GNU_DIFF32,  	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_pru_diff_relocate,/* special_function */
+	 "R_PRU_DIFF32",     	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,    	/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_GNU_DIFF16_PMEM,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_pru_diff_relocate,/* special_function */
+	 "R_PRU_DIFF16_PMEM",   /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_PRU_GNU_DIFF32_PMEM, /* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_pru_diff_relocate,/* special_function */
+	 "R_PRU_DIFF32_PMEM",   /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+/* Add other relocations here.  */
+};
+
+static unsigned char elf_code_to_howto_index[R_PRU_ILLEGAL + 1];
+
+/* Return the howto for relocation RTYPE.  */
+static reloc_howto_type *
+lookup_howto (unsigned int rtype)
+{
+  static int initialized = 0;
+  int i;
+  int howto_tbl_size = (int) (sizeof (elf_pru_howto_table_rel)
+			      / sizeof (elf_pru_howto_table_rel[0]));
+
+  if (!initialized)
+    {
+      initialized = 1;
+      memset (elf_code_to_howto_index, 0xff,
+	      sizeof (elf_code_to_howto_index));
+      for (i = 0; i < howto_tbl_size; i++)
+	elf_code_to_howto_index[elf_pru_howto_table_rel[i].type] = i;
+    }
+
+  BFD_ASSERT (rtype <= R_PRU_ILLEGAL);
+  i = elf_code_to_howto_index[rtype];
+  if (i >= howto_tbl_size)
+    return 0;
+  return elf_pru_howto_table_rel + i;
+}
+
+/* Map for converting BFD reloc types to PRU reloc types.  */
+struct elf_reloc_map
+{
+  bfd_reloc_code_real_type bfd_val;
+  enum elf_pru_reloc_type elf_val;
+};
+
+static const struct elf_reloc_map pru_reloc_map[] = {
+  {BFD_RELOC_NONE, R_PRU_NONE},
+  {BFD_RELOC_PRU_16_PMEM, R_PRU_16_PMEM},
+  {BFD_RELOC_PRU_U16_PMEMIMM, R_PRU_U16_PMEMIMM},
+  {BFD_RELOC_16, R_PRU_BFD_RELOC_16},
+  {BFD_RELOC_PRU_U16, R_PRU_U16},
+  {BFD_RELOC_PRU_32_PMEM, R_PRU_32_PMEM},
+  {BFD_RELOC_32, R_PRU_BFD_RELOC_32},
+  {BFD_RELOC_PRU_S10_PCREL, R_PRU_S10_PCREL},
+  {BFD_RELOC_PRU_U8_PCREL, R_PRU_U8_PCREL},
+  {BFD_RELOC_PRU_LDI32, R_PRU_LDI32},
+
+  {BFD_RELOC_8, R_PRU_GNU_BFD_RELOC_8},
+  {BFD_RELOC_PRU_GNU_DIFF8, R_PRU_GNU_DIFF8},
+  {BFD_RELOC_PRU_GNU_DIFF16, R_PRU_GNU_DIFF16},
+  {BFD_RELOC_PRU_GNU_DIFF32, R_PRU_GNU_DIFF32},
+  {BFD_RELOC_PRU_GNU_DIFF16_PMEM, R_PRU_GNU_DIFF16_PMEM},
+  {BFD_RELOC_PRU_GNU_DIFF32_PMEM, R_PRU_GNU_DIFF32_PMEM},
+};
+
+
+/* Assorted hash table functions.  */
+
+/* Create an entry in a PRU ELF linker hash table.  */
+static struct bfd_hash_entry *
+link_hash_newfunc (struct bfd_hash_entry *entry,
+		   struct bfd_hash_table *table, const char *string)
+{
+  /* Allocate the structure if it has not already been allocated by a
+     subclass.  */
+  if (entry == NULL)
+    {
+      entry = bfd_hash_allocate (table,
+				 sizeof (struct elf_link_hash_entry));
+      if (entry == NULL)
+	return entry;
+    }
+
+  /* Call the allocation method of the superclass.  */
+  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+
+  return entry;
+}
+
+/* Implement bfd_elf32_bfd_reloc_type_lookup:
+   Given a BFD reloc type, return a howto structure.  */
+static reloc_howto_type *
+pru_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+				   bfd_reloc_code_real_type code)
+{
+  int i;
+  for (i = 0;
+       i < (int) (sizeof (pru_reloc_map) / sizeof (struct elf_reloc_map));
+       ++i)
+    if (pru_reloc_map[i].bfd_val == code)
+      return lookup_howto ((unsigned int) pru_reloc_map[i].elf_val);
+  return NULL;
+}
+
+/* Implement bfd_elf32_bfd_reloc_name_lookup:
+   Given a reloc name, return a howto structure.  */
+static reloc_howto_type *
+pru_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+				   const char *r_name)
+{
+  unsigned int i;
+  for (i = 0;
+       i < (sizeof (elf_pru_howto_table_rel)
+	    / sizeof (elf_pru_howto_table_rel[0]));
+       i++)
+    if (elf_pru_howto_table_rel[i].name
+	&& strcasecmp (elf_pru_howto_table_rel[i].name, r_name) == 0)
+      return &elf_pru_howto_table_rel[i];
+
+  return NULL;
+}
+
+/* Implement elf_info_to_howto:
+   Given a ELF32 relocation, fill in a arelent structure.  */
+static void
+pru_elf32_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+			 Elf_Internal_Rela *dst)
+{
+  unsigned int r_type;
+
+  r_type = ELF32_R_TYPE (dst->r_info);
+  BFD_ASSERT (r_type < R_PRU_ILLEGAL);
+  cache_ptr->howto = lookup_howto (r_type);
+}
+
+/* Do the relocations that require special handling.  */
+/* Produce a word address for program memory.  Linker scripts will put .text
+   at a high offset in order to differentiate it from .data.  So here we also
+   mask the high bits of PMEM address.
+
+   But why 1MB when internal Program Memory much smaller? We want to catch
+   unintended overflows.
+
+   Why not use (1<<31) as an offset and a mask? Sitara DDRAM usually resides
+   there, and users might want to put some shared carveout memory region in
+   their linker scripts.  So 0x80000000 might be a valid .data address.
+
+   Note that we still keep and pass down the original howto.  This way we
+   can reuse this function for several different relocations.  */
+static bfd_reloc_status_type
+pru_elf32_do_pmem_relocate (bfd *abfd, reloc_howto_type *howto,
+			    asection *input_section,
+			    bfd_byte *data, bfd_vma offset,
+			    bfd_vma symbol_value, bfd_vma addend)
+{
+  symbol_value = symbol_value + addend;
+  addend = 0;
+  symbol_value &= 0x3fffff;
+  return _bfd_final_link_relocate (howto, abfd, input_section,
+				   data, offset, symbol_value, addend);
+}
+
+/* Direct copy of _bfd_final_link_relocate, but with special
+   "fill-in".  This copy-paste mumbo jumbo is only needed because BFD
+   cannot deal correctly with non-contiguous bit fields.  */
+static bfd_reloc_status_type
+pru_elf32_do_s10_pcrel_relocate (bfd *input_bfd, reloc_howto_type *howto,
+				 asection *input_section,
+				 bfd_byte *contents, bfd_vma address,
+				 bfd_vma relocation, bfd_vma addend)
+{
+  bfd_byte *location;
+  bfd_vma x = 0;
+  bfd_vma qboff;
+  bfd_reloc_status_type flag = bfd_reloc_ok;
+
+  /* Sanity check the address.  */
+  if (address > bfd_get_section_limit (input_bfd, input_section))
+    return bfd_reloc_outofrange;
+
+  BFD_ASSERT (howto->pc_relative);
+  BFD_ASSERT (howto->pcrel_offset);
+
+  relocation = relocation + addend - (input_section->output_section->vma
+		+ input_section->output_offset) - address;
+
+  location = contents + address;
+
+  /* Get the value we are going to relocate.  */
+  BFD_ASSERT (bfd_get_reloc_size (howto) == 4);
+  x = bfd_get_32 (input_bfd, location);
+
+  qboff = GET_BROFF_SIGNED (x) << howto->rightshift;
+  relocation += qboff;
+
+  BFD_ASSERT (howto->complain_on_overflow == complain_overflow_bitfield);
+
+  if (relocation > 2047 && relocation < (bfd_vma)-2048l)
+    flag = bfd_reloc_overflow;
+
+  /* Check that target address is word-aligned.  */
+  if (relocation & ((1 << howto->rightshift) - 1))
+    flag = bfd_reloc_outofrange;
+
+  relocation >>= (bfd_vma) howto->rightshift;
+
+  /* Fill-in the RELOCATION to the right bits of X.  */
+  SET_BROFF_URAW (x, relocation);
+
+  bfd_put_32 (input_bfd, x, location);
+
+  return flag;
+}
+
+static bfd_reloc_status_type
+pru_elf32_do_u8_pcrel_relocate (bfd *abfd, reloc_howto_type *howto,
+				asection *input_section,
+				bfd_byte *data, bfd_vma offset,
+				bfd_vma symbol_value, bfd_vma addend)
+{
+  bfd_vma relocation;
+
+  BFD_ASSERT (howto->pc_relative);
+  BFD_ASSERT (howto->pcrel_offset);
+
+  relocation = symbol_value + addend - (input_section->output_section->vma
+		+ input_section->output_offset) - offset;
+  relocation >>= howto->rightshift;
+
+  /* 0 and 1 are invalid target labels for LOOP.  We cannot
+     encode this info in HOWTO, so catch such cases here.  */
+  if (relocation < 2)
+      return bfd_reloc_outofrange;
+
+  return _bfd_final_link_relocate (howto, abfd, input_section,
+				   data, offset, symbol_value, addend);
+}
+
+/* Idea and code taken from elf32-d30v.  */
+static bfd_reloc_status_type
+pru_elf32_do_ldi32_relocate (bfd *abfd, reloc_howto_type *howto,
+			     asection *input_section,
+			     bfd_byte *data, bfd_vma offset,
+			     bfd_vma symbol_value, bfd_vma addend)
+{
+  bfd_signed_vma relocation;
+  bfd_size_type octets = offset * bfd_octets_per_byte (abfd);
+  bfd_byte *location;
+  unsigned long in1, in2, num;
+
+  /* A hacked-up version of _bfd_final_link_relocate() follows.  */
+
+  /* Sanity check the address.  */
+  if (octets + bfd_get_reloc_size (howto)
+      > bfd_get_section_limit_octets (abfd, input_section))
+    return bfd_reloc_outofrange;
+
+  /* This function assumes that we are dealing with a basic relocation
+     against a symbol.  We want to compute the value of the symbol to
+     relocate to.  This is just VALUE, the value of the symbol, plus
+     ADDEND, any addend associated with the reloc.  */
+  relocation = symbol_value + addend;
+
+  BFD_ASSERT (!howto->pc_relative);
+
+  /* A hacked-up version of _bfd_relocate_contents() follows.  */
+  location = data + offset * bfd_octets_per_byte (abfd);
+
+  BFD_ASSERT (!howto->pc_relative);
+
+  in1 = bfd_get_32 (abfd, location);
+  in2 = bfd_get_32 (abfd, location + 4);
+
+  /* Extract the addend - should be zero per my understanding.  */
+  num = GET_INSN_FIELD (IMM16, in1) | (GET_INSN_FIELD (IMM16, in2) << 16);
+  BFD_ASSERT (!num);
+
+  relocation += num;
+
+  SET_INSN_FIELD (IMM16, in1, relocation & 0xffff);
+  SET_INSN_FIELD (IMM16, in2, relocation >> 16);
+
+  bfd_put_32 (abfd, in1, location);
+  bfd_put_32 (abfd, in2, location + 4);
+
+  return bfd_reloc_ok;
+}
+
+/* HOWTO handlers for relocations that require special handling.  */
+
+static bfd_reloc_status_type
+pru_elf32_pmem_relocate (bfd *abfd, arelent *reloc_entry,
+			 asymbol *symbol, void *data,
+			 asection *input_section, bfd *output_bfd,
+			 char **error_message)
+{
+  /* If this is a relocatable link (output_bfd test tells us), just
+     call the generic function.  Any adjustment will be done at final
+     link time.  */
+  if (output_bfd != NULL)
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				  input_section, output_bfd, error_message);
+
+  return pru_elf32_do_pmem_relocate (abfd, reloc_entry->howto,
+				     input_section,
+				     data, reloc_entry->address,
+				     (symbol->value
+				      + symbol->section->output_section->vma
+				      + symbol->section->output_offset),
+				     reloc_entry->addend);
+}
+
+static bfd_reloc_status_type
+pru_elf32_s10_pcrel_relocate (bfd *abfd, arelent *reloc_entry,
+				 asymbol *symbol, void *data,
+				 asection *input_section, bfd *output_bfd,
+				 char **error_message)
+{
+  /* If this is a relocatable link (output_bfd test tells us), just
+     call the generic function.  Any adjustment will be done at final
+     link time.  */
+  if (output_bfd != NULL)
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				  input_section, output_bfd, error_message);
+
+  return pru_elf32_do_s10_pcrel_relocate (abfd, reloc_entry->howto,
+					  input_section, data,
+					  reloc_entry->address,
+					  (symbol->value
+					   + symbol->section->output_section->vma
+					   + symbol->section->output_offset),
+					  reloc_entry->addend);
+}
+
+static bfd_reloc_status_type
+pru_elf32_u8_pcrel_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+			     void *data, asection *input_section,
+			     bfd *output_bfd,
+			     char **error_message)
+{
+  /* If this is a relocatable link (output_bfd test tells us), just
+     call the generic function.  Any adjustment will be done at final
+     link time.  */
+  if (output_bfd != NULL)
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				  input_section, output_bfd, error_message);
+
+  return pru_elf32_do_u8_pcrel_relocate (abfd, reloc_entry->howto,
+					 input_section,
+					 data, reloc_entry->address,
+					 (symbol->value
+					  + symbol->section->output_section->vma
+					  + symbol->section->output_offset),
+					 reloc_entry->addend);
+}
+
+static bfd_reloc_status_type
+pru_elf32_ldi32_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+			  void *data, asection *input_section,
+			  bfd *output_bfd,
+			  char **error_message)
+{
+  /* If this is a relocatable link (output_bfd test tells us), just
+     call the generic function.  Any adjustment will be done at final
+     link time.  */
+  if (output_bfd != NULL)
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				  input_section, output_bfd, error_message);
+
+  return pru_elf32_do_ldi32_relocate (abfd, reloc_entry->howto,
+				      input_section,
+				      data, reloc_entry->address,
+				      (symbol->value
+				       + symbol->section->output_section->vma
+				       + symbol->section->output_offset),
+				      reloc_entry->addend);
+}
+
+
+/* Implement elf_backend_relocate_section.  */
+static bfd_boolean
+pru_elf32_relocate_section (bfd *output_bfd,
+			    struct bfd_link_info *info,
+			    bfd *input_bfd,
+			    asection *input_section,
+			    bfd_byte *contents,
+			    Elf_Internal_Rela *relocs,
+			    Elf_Internal_Sym *local_syms,
+			    asection **local_sections)
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *relend;
+
+  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (input_bfd);
+  relend = relocs + input_section->reloc_count;
+
+  for (rel = relocs; rel < relend; rel++)
+    {
+      reloc_howto_type *howto;
+      unsigned long r_symndx;
+      Elf_Internal_Sym *sym;
+      asection *sec;
+      struct elf_link_hash_entry *h;
+      bfd_vma relocation;
+      bfd_reloc_status_type r = bfd_reloc_ok;
+      const char *name = NULL;
+      const char* msg = (const char*) NULL;
+      bfd_boolean unresolved_reloc;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+
+      howto = lookup_howto ((unsigned) ELF32_R_TYPE (rel->r_info));
+      h = NULL;
+      sym = NULL;
+      sec = NULL;
+
+      if (r_symndx < symtab_hdr->sh_info)
+	{
+	  sym = local_syms + r_symndx;
+	  sec = local_sections[r_symndx];
+	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+	}
+      else
+	{
+	  bfd_boolean warned, ignored;
+
+	  RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+				   r_symndx, symtab_hdr, sym_hashes,
+				   h, sec, relocation,
+				   unresolved_reloc, warned, ignored);
+	}
+
+      if (sec && discarded_section (sec))
+	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+					 rel, 1, relend, howto, 0, contents);
+
+      /* Nothing more to do unless this is a final link.  */
+      if (bfd_link_relocatable (info))
+	continue;
+
+      if (howto)
+	{
+	  switch (howto->type)
+	    {
+	    case R_PRU_NONE:
+	      /* We don't need to find a value for this symbol.  It's just a
+		 marker.  */
+	      r = bfd_reloc_ok;
+	      break;
+
+	    case R_PRU_U16_PMEMIMM:
+	    case R_PRU_32_PMEM:
+	    case R_PRU_16_PMEM:
+	      r = pru_elf32_do_pmem_relocate (input_bfd, howto,
+						input_section,
+						contents, rel->r_offset,
+						relocation, rel->r_addend);
+	      break;
+	    case R_PRU_S10_PCREL:
+	      r = pru_elf32_do_s10_pcrel_relocate (input_bfd, howto,
+						      input_section,
+						      contents,
+						      rel->r_offset,
+						      relocation,
+						      rel->r_addend);
+	      break;
+	    case R_PRU_U8_PCREL:
+	      r = pru_elf32_do_u8_pcrel_relocate (input_bfd, howto,
+						      input_section,
+						      contents,
+						      rel->r_offset,
+						      relocation,
+						      rel->r_addend);
+	      break;
+	    case R_PRU_LDI32:
+	      r = pru_elf32_do_ldi32_relocate (input_bfd, howto,
+					       input_section,
+					       contents,
+					       rel->r_offset,
+					       relocation,
+					       rel->r_addend);
+	      break;
+	    case R_PRU_GNU_DIFF8:
+	    case R_PRU_GNU_DIFF16:
+	    case R_PRU_GNU_DIFF32:
+	    case R_PRU_GNU_DIFF16_PMEM:
+	    case R_PRU_GNU_DIFF32_PMEM:
+	      /* Nothing to do here, as contents already contain the
+		 diff value.  */
+	      r = bfd_reloc_ok;
+	      break;
+
+	    default:
+	      r = _bfd_final_link_relocate (howto, input_bfd,
+					    input_section, contents,
+					    rel->r_offset, relocation,
+					    rel->r_addend);
+	      break;
+	    }
+	}
+      else
+	r = bfd_reloc_notsupported;
+
+      if (r != bfd_reloc_ok)
+	{
+	  if (h != NULL)
+	    name = h->root.root.string;
+	  else
+	    {
+	      name = bfd_elf_string_from_elf_section (input_bfd,
+						      symtab_hdr->sh_link,
+						      sym->st_name);
+	      if (name == NULL || *name == '\0')
+		name = bfd_section_name (input_bfd, sec);
+	    }
+
+	  switch (r)
+	    {
+	    case bfd_reloc_overflow:
+	      (*info->callbacks->reloc_overflow) (info, NULL, name,
+						  howto->name, (bfd_vma) 0,
+						  input_bfd, input_section,
+						  rel->r_offset);
+	      break;
+
+	    case bfd_reloc_undefined:
+	      (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+						    input_section,
+						    rel->r_offset, TRUE);
+	      break;
+
+	    case bfd_reloc_outofrange:
+	      if (msg == NULL)
+		msg = _("relocation out of range");
+	      break;
+
+	    case bfd_reloc_notsupported:
+	      if (msg == NULL)
+		msg = _("unsupported relocation");
+	      break;
+
+	    case bfd_reloc_dangerous:
+	      if (msg == NULL)
+		msg = _("dangerous relocation");
+	      break;
+
+	    default:
+	      if (msg == NULL)
+		msg = _("unknown error");
+	      break;
+	    }
+
+	  if (msg)
+	    {
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
+	      return FALSE;
+	    }
+	}
+    }
+  return TRUE;
+}
+
+
+/* Perform a diff relocation.  Nothing to do, as the difference value is
+   already written into the section's contents.  */
+
+static bfd_reloc_status_type
+bfd_elf_pru_diff_relocate (bfd *abfd ATTRIBUTE_UNUSED,
+			   arelent *reloc_entry ATTRIBUTE_UNUSED,
+			   asymbol *symbol ATTRIBUTE_UNUSED,
+			   void *data ATTRIBUTE_UNUSED,
+			   asection *input_section ATTRIBUTE_UNUSED,
+			   bfd *output_bfd ATTRIBUTE_UNUSED,
+			   char **error_message ATTRIBUTE_UNUSED)
+{
+  return bfd_reloc_ok;
+}
+
+
+/* Returns whether the relocation type passed is a diff reloc.  */
+
+static bfd_boolean
+elf32_pru_is_diff_reloc (Elf_Internal_Rela *irel)
+{
+  return (ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF8
+	  || ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF16
+	  || ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF32
+	  || ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF16_PMEM
+	  || ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF32_PMEM);
+}
+
+/* Reduce the diff value written in the section by count if the shrinked
+   insn address happens to fall between the two symbols for which this
+   diff reloc was emitted.  */
+
+static void
+elf32_pru_adjust_diff_reloc_value (bfd *abfd,
+				   struct bfd_section *isec,
+				   Elf_Internal_Rela *irel,
+				   bfd_vma symval,
+				   bfd_vma shrinked_insn_address,
+				   int count)
+{
+  unsigned char *reloc_contents = NULL;
+  unsigned char *isec_contents = elf_section_data (isec)->this_hdr.contents;
+  if (isec_contents == NULL)
+  {
+    if (! bfd_malloc_and_get_section (abfd, isec, &isec_contents))
+      return;
+
+    elf_section_data (isec)->this_hdr.contents = isec_contents;
+  }
+
+  reloc_contents = isec_contents + irel->r_offset;
+
+  /* Read value written in object file.  */
+  bfd_signed_vma x = 0;
+  switch (ELF32_R_TYPE (irel->r_info))
+  {
+  case R_PRU_GNU_DIFF8:
+    {
+      x = bfd_get_signed_8 (abfd, reloc_contents);
+      break;
+    }
+  case R_PRU_GNU_DIFF16:
+    {
+      x = bfd_get_signed_16 (abfd, reloc_contents);
+      break;
+    }
+  case R_PRU_GNU_DIFF32:
+    {
+      x = bfd_get_signed_32 (abfd, reloc_contents);
+      break;
+    }
+  case R_PRU_GNU_DIFF16_PMEM:
+    {
+      x = bfd_get_signed_16 (abfd, reloc_contents) * 4;
+      break;
+    }
+  case R_PRU_GNU_DIFF32_PMEM:
+    {
+      x = bfd_get_signed_32 (abfd, reloc_contents) * 4;
+      break;
+    }
+  default:
+    {
+      BFD_FAIL ();
+    }
+  }
+
+  /* For a diff reloc sym1 - sym2 the diff at assembly time (x) is written
+     into the object file at the reloc offset.  sym2's logical value is
+     symval (<start_of_section>) + reloc addend.  Compute the start and end
+     addresses and check if the shrinked insn falls between sym1 and sym2.  */
+
+  bfd_vma end_address = symval + irel->r_addend;
+  bfd_vma start_address = end_address - x;
+
+  /* Shrink the absolute DIFF value (get the to labels "closer"
+     together), because we have removed data between labels.  */
+  if (x < 0)
+    {
+      x += count;
+      /* In case the signed x is negative, restore order.  */
+      SWAP_VALS (end_address, start_address);
+    }
+  else
+    {
+      x -= count;
+    }
+
+  /* Reduce the diff value by count bytes and write it back into section
+    contents.  */
+
+  if (shrinked_insn_address >= start_address
+      && shrinked_insn_address <= end_address)
+  {
+    switch (ELF32_R_TYPE (irel->r_info))
+    {
+    case R_PRU_GNU_DIFF8:
+      {
+	bfd_put_signed_8 (abfd, x & 0xFF, reloc_contents);
+	break;
+      }
+    case R_PRU_GNU_DIFF16:
+      {
+	bfd_put_signed_16 (abfd, x & 0xFFFF, reloc_contents);
+	break;
+      }
+    case R_PRU_GNU_DIFF32:
+      {
+	bfd_put_signed_32 (abfd, x & 0xFFFFFFFF, reloc_contents);
+	break;
+      }
+    case R_PRU_GNU_DIFF16_PMEM:
+      {
+	bfd_put_signed_16 (abfd, (x / 4) & 0xFFFF, reloc_contents);
+	break;
+      }
+    case R_PRU_GNU_DIFF32_PMEM:
+      {
+	bfd_put_signed_32 (abfd, (x / 4) & 0xFFFFFFFF, reloc_contents);
+	break;
+      }
+    default:
+      {
+	BFD_FAIL ();
+      }
+    }
+
+  }
+}
+
+/* Delete some bytes from a section while changing the size of an instruction.
+   The parameter "addr" denotes the section-relative offset pointing just
+   behind the shrinked instruction. "addr+count" point at the first
+   byte just behind the original unshrinked instruction.
+
+   Idea copied from the AVR port.  */
+
+static bfd_boolean
+pru_elf_relax_delete_bytes (bfd *abfd,
+			    asection *sec,
+			    bfd_vma addr,
+			    int count)
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  unsigned int sec_shndx;
+  bfd_byte *contents;
+  Elf_Internal_Rela *irel, *irelend;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymbuf = NULL;
+  bfd_vma toaddr;
+  struct elf_link_hash_entry **sym_hashes;
+  struct elf_link_hash_entry **end_hashes;
+  unsigned int symcount;
+
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+  contents = elf_section_data (sec)->this_hdr.contents;
+
+  toaddr = sec->size;
+
+  irel = elf_section_data (sec)->relocs;
+  irelend = irel + sec->reloc_count;
+
+  /* Actually delete the bytes.  */
+  if (toaddr - addr - count > 0)
+    memmove (contents + addr, contents + addr + count,
+	     (size_t) (toaddr - addr - count));
+  sec->size -= count;
+
+  /* Adjust all the reloc addresses.  */
+  for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+    {
+      bfd_vma old_reloc_address;
+
+      old_reloc_address = (sec->output_section->vma
+			   + sec->output_offset + irel->r_offset);
+
+      /* Get the new reloc address.  */
+      if ((irel->r_offset > addr
+	   && irel->r_offset < toaddr))
+	{
+	  if (debug_relax)
+	    printf ("Relocation at address 0x%x needs to be moved.\n"
+		    "Old section offset: 0x%x, New section offset: 0x%x \n",
+		    (unsigned int) old_reloc_address,
+		    (unsigned int) irel->r_offset,
+		    (unsigned int) ((irel->r_offset) - count));
+
+	  irel->r_offset -= count;
+	}
+
+    }
+
+   /* The reloc's own addresses are now ok.  However, we need to readjust
+      the reloc's addend, i.e. the reloc's value if two conditions are met:
+      1.) the reloc is relative to a symbol in this section that
+	  is located in front of the shrinked instruction
+      2.) symbol plus addend end up behind the shrinked instruction.
+
+      The most common case where this happens are relocs relative to
+      the section-start symbol.
+
+      This step needs to be done for all of the sections of the bfd.  */
+
+  {
+    struct bfd_section *isec;
+
+    for (isec = abfd->sections; isec; isec = isec->next)
+     {
+       bfd_vma symval;
+       bfd_vma shrinked_insn_address;
+
+       if (isec->reloc_count == 0)
+	 continue;
+
+       shrinked_insn_address = (sec->output_section->vma
+				+ sec->output_offset + addr - count);
+
+       irel = elf_section_data (isec)->relocs;
+       /* PR 12161: Read in the relocs for this section if necessary.  */
+       if (irel == NULL)
+	 irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
+
+       for (irelend = irel + isec->reloc_count;
+	    irel < irelend;
+	    irel++)
+	 {
+	   /* Read this BFD's local symbols if we haven't done
+	      so already.  */
+	   if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+	     {
+	       isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	       if (isymbuf == NULL)
+		 isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						 symtab_hdr->sh_info, 0,
+						 NULL, NULL, NULL);
+	       if (isymbuf == NULL)
+		 return FALSE;
+	     }
+
+	   /* Get the value of the symbol referred to by the reloc.  */
+	   if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+	     {
+	       /* A local symbol.  */
+	       asection *sym_sec;
+
+	       isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	       sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	       symval = isym->st_value;
+	       /* If the reloc is absolute, it will not have
+		  a symbol or section associated with it.  */
+	       if (sym_sec == sec)
+		 {
+		   symval += sym_sec->output_section->vma
+		     + sym_sec->output_offset;
+
+		   if (debug_relax)
+		     printf ("Checking if the relocation's "
+			     "addend needs corrections.\n"
+			     "Address of anchor symbol: 0x%x \n"
+			     "Address of relocation target: 0x%x \n"
+			     "Address of relaxed insn: 0x%x \n",
+			     (unsigned int) symval,
+			     (unsigned int) (symval + irel->r_addend),
+			     (unsigned int) shrinked_insn_address);
+
+		   /* Shrink the special DIFF relocations.  */
+		   if (elf32_pru_is_diff_reloc (irel))
+		     {
+		       elf32_pru_adjust_diff_reloc_value (abfd, isec, irel,
+							  symval,
+							  shrinked_insn_address,
+							  count);
+		     }
+
+		   /* Fix the addend, if it is affected.  */
+		   if (symval <= shrinked_insn_address
+		       && (symval + irel->r_addend) > shrinked_insn_address)
+		     {
+
+		       irel->r_addend -= count;
+
+		       if (debug_relax)
+			 printf ("Relocation's addend needed to be fixed \n");
+		     }
+		 }
+	       /* else...Reference symbol is absolute.
+		  No adjustment needed.  */
+	     }
+	   /* else...Reference symbol is extern.  No need for adjusting
+	      the addend.  */
+	 }
+     }
+  }
+
+  /* Adjust the local symbols defined in this section.  */
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  /* Fix PR 9841, there may be no local symbols.  */
+  if (isym != NULL)
+    {
+      Elf_Internal_Sym *isymend;
+
+      isymend = isym + symtab_hdr->sh_info;
+      for (; isym < isymend; isym++)
+	{
+	  if (isym->st_shndx == sec_shndx)
+	    {
+	      if (isym->st_value > addr
+		  && isym->st_value <= toaddr)
+		isym->st_value -= count;
+
+	      if (isym->st_value <= addr
+		  && isym->st_value + isym->st_size > addr)
+		{
+		  /* If this assert fires then we have a symbol that ends
+		     part way through an instruction.  Does that make
+		     sense?  */
+		  BFD_ASSERT (isym->st_value + isym->st_size >= addr + count);
+		  isym->st_size -= count;
+		}
+	    }
+	}
+    }
+
+  /* Now adjust the global symbols defined in this section.  */
+  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+	      - symtab_hdr->sh_info);
+  sym_hashes = elf_sym_hashes (abfd);
+  end_hashes = sym_hashes + symcount;
+  for (; sym_hashes < end_hashes; sym_hashes++)
+    {
+      struct elf_link_hash_entry *sym_hash = *sym_hashes;
+      if ((sym_hash->root.type == bfd_link_hash_defined
+	   || sym_hash->root.type == bfd_link_hash_defweak)
+	  && sym_hash->root.u.def.section == sec)
+	{
+	  if (sym_hash->root.u.def.value > addr
+	      && sym_hash->root.u.def.value <= toaddr)
+	    sym_hash->root.u.def.value -= count;
+
+	  if (sym_hash->root.u.def.value <= addr
+	      && (sym_hash->root.u.def.value + sym_hash->size > addr))
+	    {
+	      /* If this assert fires then we have a symbol that ends
+		 part way through an instruction.  Does that make
+		 sense?  */
+	      BFD_ASSERT (sym_hash->root.u.def.value + sym_hash->size
+			  >= addr + count);
+	      sym_hash->size -= count;
+	    }
+	}
+    }
+
+  return TRUE;
+}
+
+static bfd_boolean
+pru_elf32_relax_section (bfd * abfd, asection * sec,
+			  struct bfd_link_info * link_info,
+			  bfd_boolean * again)
+{
+  Elf_Internal_Shdr * symtab_hdr;
+  Elf_Internal_Rela * internal_relocs;
+  Elf_Internal_Rela * irel;
+  Elf_Internal_Rela * irelend;
+  bfd_byte *	      contents = NULL;
+  Elf_Internal_Sym *  isymbuf = NULL;
+
+  /* Assume nothing changes.  */
+  *again = FALSE;
+
+  /* We don't have to do anything for a relocatable link, if
+     this section does not have relocs, or if this is not a
+     code section.  */
+  if (bfd_link_relocatable (link_info)
+    || (sec->flags & SEC_RELOC) == 0
+    || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0)
+    return TRUE;
+
+  symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
+
+  /* Get a copy of the native relocations.  */
+  internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
+					       link_info->keep_memory);
+  if (internal_relocs == NULL)
+    goto error_return;
+
+  /* Walk through them looking for relaxing opportunities.  */
+  irelend = internal_relocs + sec->reloc_count;
+
+  for (irel = internal_relocs; irel < irelend; irel++)
+    {
+      bfd_vma symval;
+
+      /* Get the section contents if we haven't done so already.  */
+      if (contents == NULL)
+	{
+	  /* Get cached copy if it exists.  */
+	  if (elf_section_data (sec)->this_hdr.contents != NULL)
+	    contents = elf_section_data (sec)->this_hdr.contents;
+	  else if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+	    goto error_return;
+	}
+
+      /* Read this BFD's local symbols if we haven't done so already.  */
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
+
+      /* Get the value of the symbol referred to by the reloc.  */
+      if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+	{
+	  /* A local symbol.  */
+	  Elf_Internal_Sym *isym;
+	  asection *sym_sec;
+
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
+	    sym_sec = bfd_und_section_ptr;
+	  else if (isym->st_shndx == SHN_ABS)
+	    sym_sec = bfd_abs_section_ptr;
+	  else if (isym->st_shndx == SHN_COMMON)
+	    sym_sec = bfd_com_section_ptr;
+	  else
+	    sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	  symval = (isym->st_value
+		    + sym_sec->output_section->vma + sym_sec->output_offset);
+	}
+      else
+	{
+	  unsigned long indx;
+	  struct elf_link_hash_entry *h;
+
+	  /* An external symbol.  */
+	  indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+	  h = elf_sym_hashes (abfd)[indx];
+	  BFD_ASSERT (h != NULL);
+
+	  if (h->root.type != bfd_link_hash_defined
+	      && h->root.type != bfd_link_hash_defweak)
+	    /* This appears to be a reference to an undefined
+	       symbol.  Just ignore it--it will be caught by the
+	       regular reloc processing.  */
+	    continue;
+
+	  symval = (h->root.u.def.value
+		    + h->root.u.def.section->output_section->vma
+		    + h->root.u.def.section->output_offset);
+	}
+
+      /* For simplicity of coding, we are going to modify the section
+	 contents, the section relocs, and the BFD symbol table.  We
+	 must tell the rest of the code not to free up this
+	 information.  It would be possible to instead create a table
+	 of changes which have to be made, as is done in coff-mips.c;
+	 that would be more work, but would require less memory when
+	 the linker is run.  */
+
+      /* Check if we can remove an LDI instruction from the LDI32
+	 pseudo instruction if the upper 16 operand bits are zero.  */
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_PRU_LDI32)
+	{
+	  bfd_vma value = symval + irel->r_addend;
+
+	  if (debug_relax)
+	    printf ("R_PRU_LDI32 with value=0x%lx\n", (long) value);
+
+	  if ((long) value >> 16 == 0)
+	    {
+	      /* Note that we've changed the relocs, section contents.  */
+	      elf_section_data (sec)->relocs = internal_relocs;
+	      elf_section_data (sec)->this_hdr.contents = contents;
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
+
+	      /* Delete bytes.  */
+	      if (!pru_elf_relax_delete_bytes (abfd, sec, irel->r_offset + 4, 4))
+		goto error_return;
+
+	      /* We're done with deletion of the second instruction.
+		 Set a regular LDI relocation for the first instruction
+		 we left to load the 16-bit value into the 32-bit
+		 register.  */
+	      irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+					   R_PRU_U16);
+
+	      /* That will change things, so, we should relax again.
+		 Note that this is not required, and it may be slow.  */
+	      *again = TRUE;
+	    }
+	}
+    }
+
+  if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+    {
+      if (!link_info->keep_memory)
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (!link_info->keep_memory)
+	free (contents);
+      else
+	{
+	  /* Cache the section contents for elf_link_input_bfd.  */
+	  elf_section_data (sec)->this_hdr.contents = contents;
+	}
+    }
+
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+
+  return TRUE;
+
+error_return:
+  if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+
+  return FALSE;
+}
+
+/* Free the derived linker hash table.  */
+static void
+pru_elf32_link_hash_table_free (bfd *obfd)
+{
+  _bfd_elf_link_hash_table_free (obfd);
+}
+
+/* Implement bfd_elf32_bfd_link_hash_table_create.  */
+static struct bfd_link_hash_table *
+pru_elf32_link_hash_table_create (bfd *abfd)
+{
+  struct elf_link_hash_table *ret;
+  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+
+  ret = bfd_zmalloc (amt);
+  if (ret == NULL)
+    return NULL;
+
+  if (!_bfd_elf_link_hash_table_init (ret, abfd,
+				      link_hash_newfunc,
+				      sizeof (struct
+					      elf_link_hash_entry),
+				      PRU_ELF_DATA))
+    {
+      free (ret);
+      return NULL;
+    }
+
+  ret->root.hash_table_free = pru_elf32_link_hash_table_free;
+
+  return &ret->root;
+}
+
+#define ELF_ARCH			bfd_arch_pru
+#define ELF_TARGET_ID			PRU_ELF_DATA
+#define ELF_MACHINE_CODE		EM_TI_PRU
+
+#define ELF_MAXPAGESIZE			1
+
+#define bfd_elf32_bfd_link_hash_table_create \
+					  pru_elf32_link_hash_table_create
+
+/* Relocation table lookup macros.  */
+
+#define bfd_elf32_bfd_reloc_type_lookup	  pru_elf32_bfd_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup	  pru_elf32_bfd_reloc_name_lookup
+
+/* elf_info_to_howto (using RELA relocations).  */
+
+#define elf_info_to_howto		pru_elf32_info_to_howto
+
+/* elf backend functions.  */
+
+#define elf_backend_rela_normal		1
+
+#define elf_backend_relocate_section	pru_elf32_relocate_section
+#define bfd_elf32_bfd_relax_section	pru_elf32_relax_section
+
+#define TARGET_LITTLE_SYM		pru_elf32_vec
+#define TARGET_LITTLE_NAME		"elf32-pru"
+
+#include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rl78.c ./bfd/elf32-rl78.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rl78.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-rl78.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Renesas RL78 specific support for 32-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -287,6 +287,7 @@ rl78_info_to_howto_rela (bfd *          
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_RL78_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid RL78 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -295,7 +296,6 @@ rl78_info_to_howto_rela (bfd *          
 
 static bfd_vma
 get_symbol_value (const char *            name,
-		  bfd_reloc_status_type * status,
 		  struct bfd_link_info *  info,
 		  bfd *                   input_bfd,
 		  asection *              input_section,
@@ -312,12 +312,8 @@ get_symbol_value (const char *          
       || (h->type != bfd_link_hash_defined
 	  && h->type != bfd_link_hash_defweak))
     {
-      bfd_reloc_status_type res;
-
-      res = info->callbacks->undefined_symbol
+      (*info->callbacks->undefined_symbol)
 	(info, name, input_bfd, input_section, offset, TRUE);
-      if (status)
-	* status = res;
       return 0;
     }
 
@@ -327,44 +323,36 @@ get_symbol_value (const char *          
 }
 
 static bfd_vma
-get_romstart (bfd_reloc_status_type * status,
-	      struct bfd_link_info *  info,
+get_romstart (struct bfd_link_info *  info,
 	      bfd *                   abfd,
 	      asection *              sec,
 	      int		      offset)
 {
   static bfd_boolean cached = FALSE;
   static bfd_vma     cached_value = 0;
-  static bfd_reloc_status_type cached_status;
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("_start", & cached_status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("_start", info, abfd, sec, offset);
       cached = TRUE;
     }
-  if (status)
-    * status = cached_status;
   return cached_value;
 }
 
 static bfd_vma
-get_ramstart (bfd_reloc_status_type * status,
-	      struct bfd_link_info *  info,
+get_ramstart (struct bfd_link_info *  info,
 	      bfd *                   abfd,
 	      asection *              sec,
 	      int		      offset)
 {
   static bfd_boolean cached = FALSE;
   static bfd_vma     cached_value = 0;
-  static bfd_reloc_status_type cached_status;
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__datastart", & cached_status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset);
       cached = TRUE;
     }
-  if (status)
-    * status = cached_status;
   return cached_value;
 }
 
@@ -448,7 +436,7 @@ rl78_compute_complex_reloc (unsigned lon
     case R_RL78_SYM:
       RL78_STACK_PUSH (symval);
       return 0;
-      
+
     case R_RL78_OPneg:
       RL78_STACK_POP (tmp1);
       tmp1 = - tmp1;
@@ -573,12 +561,12 @@ rl78_special_reloc (bfd *      input_bfd
 	break;
 
     case R_RL78_OPromtop:
-      relocation = get_romstart (&r, NULL, input_bfd, input_section,
+      relocation = get_romstart (NULL, input_bfd, input_section,
 				 reloc->address);
       break;
 
     case R_RL78_OPramtop:
-      relocation = get_ramstart (&r, NULL, input_bfd, input_section,
+      relocation = get_ramstart (NULL, input_bfd, input_section,
 				 reloc->address);
       break;
     }
@@ -697,17 +685,13 @@ rl78_elf_relocate_section
   struct elf_link_hash_entry ** sym_hashes;
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
-  bfd *dynobj;
   asection *splt;
 
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
 
-  dynobj = elf_hash_table (info)->dynobj;
-  splt = NULL;
-  if (dynobj != NULL)
-    splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
 
   for (rel = relocs; rel < relend; rel ++)
     {
@@ -758,7 +742,7 @@ rl78_elf_relocate_section
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
              anything, unless the reloc is against a section symbol,
@@ -1046,7 +1030,7 @@ rl78_elf_relocate_section
 	      break;
 	    }
 	  break;
-	  
+
 	case R_RL78_SYM:
 	  if (r_symndx < symtab_hdr->sh_info)
 	    relocation = sec->output_section->vma + sec->output_offset
@@ -1068,12 +1052,12 @@ rl78_elf_relocate_section
 	  break;
 
 	case R_RL78_OPromtop:
-	  relocation = get_romstart (&r, info, input_bfd, input_section, rel->r_offset);
+	  relocation = get_romstart (info, input_bfd, input_section, rel->r_offset);
 	  (void) rl78_compute_complex_reloc (r_type, relocation, input_section);
 	  break;
 
 	case R_RL78_OPramtop:
-	  relocation = get_ramstart (&r, info, input_bfd, input_section, rel->r_offset);
+	  relocation = get_ramstart (info, input_bfd, input_section, rel->r_offset);
 	  (void) rl78_compute_complex_reloc (r_type, relocation, input_section);
 	  break;
 
@@ -1092,45 +1076,47 @@ rl78_elf_relocate_section
 	      /* Catch the case of a missing function declaration
 		 and emit a more helpful error message.  */
 	      if (r_type == R_RL78_DIR24S_PCREL)
+		/* xgettext:c-format */
 		msg = _("%B(%A): error: call to undefined function '%s'");
 	      else
-		r = info->callbacks->reloc_overflow
+		(*info->callbacks->reloc_overflow)
 		  (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		   input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_other:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): warning: unaligned access to symbol '%s' in the small data area");
 	      break;
 
 	    case bfd_reloc_outofrange:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: out of range error");
 	      break;
 
 	    case bfd_reloc_notsupported:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: unsupported relocation error");
 	      break;
 
 	    case bfd_reloc_dangerous:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: dangerous relocation");
 	      break;
 
 	    default:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: unknown error");
 	      break;
 	    }
 
 	  if (msg)
 	    _bfd_error_handler (msg, input_bfd, input_section, name);
-
-	  if (! r)
-	    return FALSE;
 	}
     }
 
@@ -1173,8 +1159,9 @@ rl78_cpu_name (flagword flags)
    object file when linking.  */
 
 static bfd_boolean
-rl78_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword new_flags;
   flagword old_flags;
   bfd_boolean error = FALSE;
@@ -1209,7 +1196,8 @@ rl78_elf_merge_private_bfd_data (bfd * i
 		     but that is still incompatible with the G10 ABI.  */
 		  error = TRUE;
 
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("RL78 ABI conflict: G10 file %s cannot be linked with %s file %s"),
 		     bfd_get_filename (ibfd),
 		     rl78_cpu_name (out_cpu), bfd_get_filename (obfd));
@@ -1225,7 +1213,8 @@ rl78_elf_merge_private_bfd_data (bfd * i
 	    {
 	      error = TRUE;
 
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("RL78 ABI conflict: cannot link %s file %s with %s file %s"),
 		 rl78_cpu_name (in_cpu),  bfd_get_filename (ibfd),
 		 rl78_cpu_name (out_cpu), bfd_get_filename (obfd));
@@ -1234,17 +1223,19 @@ rl78_elf_merge_private_bfd_data (bfd * i
 
       if (changed_flags & E_FLAG_RL78_64BIT_DOUBLES)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("RL78 merge conflict: cannot link 32-bit and 64-bit objects together"));
 
 	  if (old_flags & E_FLAG_RL78_64BIT_DOUBLES)
-	    (*_bfd_error_handler) (_("- %s is 64-bit, %s is not"),
-				   bfd_get_filename (obfd), bfd_get_filename (ibfd));
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("- %s is 64-bit, %s is not"),
+				bfd_get_filename (obfd), bfd_get_filename (ibfd));
 	  else
-	    (*_bfd_error_handler) (_("- %s is 64-bit, %s is not"),
-				   bfd_get_filename (ibfd), bfd_get_filename (obfd));
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("- %s is 64-bit, %s is not"),
+				bfd_get_filename (ibfd), bfd_get_filename (obfd));
 	  error = TRUE;
-	}    
+	}
     }
 
   return !error;
@@ -1310,13 +1301,12 @@ rl78_elf_check_relocs
   asection *splt;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
   local_plt_offsets = elf_local_got_offsets (abfd);
-  splt = NULL;
   dynobj = elf_hash_table(info)->dynobj;
 
   rel_end = relocs + sec->reloc_count;
@@ -1349,20 +1339,18 @@ rl78_elf_check_relocs
 	case R_RL78_DIR16S:
 	  if (dynobj == NULL)
 	    elf_hash_table (info)->dynobj = dynobj = abfd;
+	  splt = elf_hash_table (info)->splt;
 	  if (splt == NULL)
 	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      if (splt == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY | SEC_CODE);
-		  splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
-							     flags);
-		  if (splt == NULL
-		      || ! bfd_set_section_alignment (dynobj, splt, 1))
-		    return FALSE;
-		}
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+				| SEC_IN_MEMORY | SEC_LINKER_CREATED
+				| SEC_READONLY | SEC_CODE);
+	      splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
+							 flags);
+	      elf_hash_table (info)->splt = splt;
+	      if (splt == NULL
+		  || ! bfd_set_section_alignment (dynobj, splt, 1))
+		return FALSE;
 	    }
 
 	  if (h != NULL)
@@ -1419,8 +1407,9 @@ rl78_elf_finish_dynamic_sections (bfd *a
   if (info->relax_trip > 0)
     return TRUE;
 
-  if ((dynobj = elf_hash_table (info)->dynobj) != NULL
-      && (splt = bfd_get_linker_section (dynobj, ".plt")) != NULL)
+  dynobj = elf_hash_table (info)->dynobj;
+  splt = elf_hash_table (info)->splt;
+  if (dynobj != NULL && splt != NULL)
     {
       bfd_byte *contents = splt->contents;
       unsigned int i, size = splt->size;
@@ -1442,14 +1431,14 @@ rl78_elf_always_size_sections (bfd *outp
   bfd *dynobj;
   asection *splt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj == NULL)
     return TRUE;
 
-  splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
   BFD_ASSERT (splt != NULL);
 
   splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->size);
@@ -1529,7 +1518,7 @@ rl78_elf_relax_plt_section (bfd *dynobj,
   /* Assume nothing changes.  */
   *again = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* We only relax the .plt section at the moment.  */
@@ -1932,12 +1921,12 @@ rl78_offset_for_reloc (bfd *            
 	  break;
 
 	case R_RL78_OPromtop:
-	  symval = get_romstart (NULL, info, input_bfd, input_section, rel->r_offset);
+	  symval = get_romstart (info, input_bfd, input_section, rel->r_offset);
 	  (void) rl78_compute_complex_reloc (r_type, symval, input_section);
 	  break;
 
 	case R_RL78_OPramtop:
-	  symval = get_ramstart (NULL, info, input_bfd, input_section, rel->r_offset);
+	  symval = get_ramstart (info, input_bfd, input_section, rel->r_offset);
 	  (void) rl78_compute_complex_reloc (r_type, symval, input_section);
 	  break;
 
@@ -1971,10 +1960,19 @@ rl78_offset_for_reloc (bfd *            
 	case R_RL78_ABS8UW:
 	  *scale = 2;
 	  goto reloc_computes_value;
-	  
+
 	default:
 	reloc_computes_value:
-	  symval = rl78_compute_complex_reloc (r_type, 0, input_section);
+	  symval = rl78_compute_complex_reloc (r_type, symval, input_section);
+	  /* Fall through.  */
+	case R_RL78_DIR32:
+	case R_RL78_DIR24S:
+	case R_RL78_DIR16:
+	case R_RL78_DIR16U:
+	case R_RL78_DIR16S:
+	case R_RL78_DIR24S_PCREL:
+	case R_RL78_DIR16S_PCREL:
+	case R_RL78_DIR8S_PCREL:
 	  if (lrel)
 	    *lrel = rel;
 	  return symval;
@@ -2088,14 +2086,17 @@ rl78_elf_relax_section
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
     return TRUE;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+  symtab_hdr = & elf_symtab_hdr (abfd);
+  if (elf_symtab_shndx_list (abfd))
+    shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+  else
+    shndx_hdr = NULL;
 
   /* Get the section contents.  */
   if (elf_section_data (sec)->this_hdr.contents != NULL)
@@ -2118,7 +2119,7 @@ rl78_elf_relax_section
       symtab_hdr->contents = (bfd_byte *) intsyms;
     }
 
-  if (shndx_hdr->sh_size != 0)
+  if (shndx_hdr && shndx_hdr->sh_size != 0)
     {
       bfd_size_type amt;
 
@@ -2313,6 +2314,27 @@ rl78_elf_relax_section
 
 	  switch (insn[0])
 	    {
+	    case 0xdc: /* BC */
+	    case 0xdd: /* BZ */
+	    case 0xde: /* BNC */
+	    case 0xdf: /* BNZ */
+	      if (insn[1] == 0x03 && insn[2] == 0xee /* BR */
+		  && (srel->r_offset - irel->r_offset) > 1) /* a B<c> without its own reloc */
+		{
+		  /* This is a "long" conditional as generated by gas:
+		     DC 03 EE ad.dr  */
+		  if (pcrel < 127
+		      && pcrel > -127)
+		    {
+		      insn[0] ^= 0x02; /* invert conditional */
+		      SNIPNR (4, 1);
+		      SNIP (1, 2, R_RL78_DIR8S_PCREL);
+		      insn[1] = pcrel;
+		      *again = TRUE;
+		    }
+		}
+	      break;
+
 	    case 0xec: /* BR !!abs20 */
 
 	      if (pcrel < 127
@@ -2328,7 +2350,7 @@ rl78_elf_relax_section
 		  insn[0] = 0xed;
 		  insn[1] = symval & 0xff;
 		  insn[2] = symval >> 8;
-		  SNIP (2, 1, R_RL78_DIR16S);
+		  SNIP (2, 1, R_RL78_DIR16U);
 		  *again = TRUE;
 		}
 	      else if (pcrel < 32767
@@ -2360,7 +2382,7 @@ rl78_elf_relax_section
 		  insn[0] = 0xfd;
 		  insn[1] = symval & 0xff;
 		  insn[2] = symval >> 8;
-		  SNIP (2, 1, R_RL78_DIR16S);
+		  SNIP (2, 1, R_RL78_DIR16U);
 		  *again = TRUE;
 		}
 	      else if (pcrel < 32767
@@ -2383,6 +2405,25 @@ rl78_elf_relax_section
 		 here anyway. */
 	      switch (insn[1])
 		{
+		case 0xd3: /* BNH */
+		case 0xc3: /* BH */
+		  if (insn[2] == 0x03 && insn[3] == 0xee
+		      && (srel->r_offset - irel->r_offset) > 2) /* a B<c> without its own reloc */
+		    {
+		      /* Another long branch by gas:
+			 61 D3 03 EE ad.dr  */
+		      if (pcrel < 127
+			  && pcrel > -127)
+			{
+			  insn[1] ^= 0x10; /* invert conditional */
+			  SNIPNR (5, 1);
+			  SNIP (2, 2, R_RL78_DIR8S_PCREL);
+			  insn[2] = pcrel;
+			  *again = TRUE;
+			}
+		    }
+		  break;
+
 		case 0xc8: /* SKC */
 		  if (insn[2] == 0xef)
 		    {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rx.c ./bfd/elf32-rx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-rx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Renesas RX specific support for 32-bit ELF.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -309,6 +309,7 @@ rx_info_to_howto_rela (bfd *            
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_RX_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid RX reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -317,7 +318,6 @@ rx_info_to_howto_rela (bfd *            
 
 static bfd_vma
 get_symbol_value (const char *            name,
-		  bfd_reloc_status_type * status,
 		  struct bfd_link_info *  info,
 		  bfd *                   input_bfd,
 		  asection *              input_section,
@@ -331,7 +331,7 @@ get_symbol_value (const char *          
   if (h == NULL
       || (h->type != bfd_link_hash_defined
 	  && h->type != bfd_link_hash_defweak))
-    * status = info->callbacks->undefined_symbol
+    (*info->callbacks->undefined_symbol)
       (info, name, input_bfd, input_section, offset, TRUE);
   else
     value = (h->u.def.value
@@ -340,6 +340,7 @@ get_symbol_value (const char *          
 
   return value;
 }
+
 static bfd_vma
 get_symbol_value_maybe (const char *            name,
 			struct bfd_link_info *  info)
@@ -362,8 +363,7 @@ get_symbol_value_maybe (const char *    
 }
 
 static bfd_vma
-get_gp (bfd_reloc_status_type * status,
-	struct bfd_link_info *  info,
+get_gp (struct bfd_link_info *  info,
 	bfd *                   abfd,
 	asection *              sec,
 	int			offset)
@@ -373,15 +373,14 @@ get_gp (bfd_reloc_status_type * status,
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__gp", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__gp", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
 }
 
 static bfd_vma
-get_romstart (bfd_reloc_status_type * status,
-	      struct bfd_link_info *  info,
+get_romstart (struct bfd_link_info *  info,
 	      bfd *                   abfd,
 	      asection *              sec,
 	      int		      offset)
@@ -391,15 +390,14 @@ get_romstart (bfd_reloc_status_type * st
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("_start", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("_start", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
 }
 
 static bfd_vma
-get_ramstart (bfd_reloc_status_type * status,
-	      struct bfd_link_info *  info,
+get_ramstart (struct bfd_link_info *  info,
 	      bfd *                   abfd,
 	      asection *              sec,
 	      int		      offset)
@@ -409,7 +407,7 @@ get_ramstart (bfd_reloc_status_type * st
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__datastart", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
@@ -553,7 +551,6 @@ rx_elf_relocate_section
 	  bfd_vma entry_vma;
 	  int idx;
 	  char *buf;
-	  bfd_reloc_status_type tstat = 0;
 
 	  if (table_default_cache != name)
 	    {
@@ -571,18 +568,14 @@ rx_elf_relocate_section
 	      buf = (char *) malloc (13 + strlen (name + 20));
 
 	      sprintf (buf, "$tablestart$%s", name + 20);
-	      tstat = 0;
 	      table_start_cache = get_symbol_value (buf,
-						    &tstat,
 						    info,
 						    input_bfd,
 						    input_section,
 						    rel->r_offset);
 
 	      sprintf (buf, "$tableend$%s", name + 20);
-	      tstat = 0;
 	      table_end_cache = get_symbol_value (buf,
-						  &tstat,
 						  info,
 						  input_bfd,
 						  input_section,
@@ -597,12 +590,14 @@ rx_elf_relocate_section
 
 	  if (table_end_cache <= entry_vma || entry_vma < table_start_cache)
 	    {
+	      /* xgettext:c-format */
 	      _bfd_error_handler (_("%B:%A: table entry %s outside table"),
 				  input_bfd, input_section,
 				  name);
 	    }
 	  else if ((int) (entry_vma - table_start_cache) % 4)
 	    {
+	      /* xgettext:c-format */
 	      _bfd_error_handler (_("%B:%A: table entry %s not word-aligned within table"),
 				  input_bfd, input_section,
 				  name);
@@ -632,7 +627,7 @@ rx_elf_relocate_section
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  We don't have to change
              anything, unless the reloc is against a section symbol,
@@ -668,6 +663,7 @@ rx_elf_relocate_section
 #define ALIGN(m)   if (relocation & m) r = bfd_reloc_other;
 #define OP(i)      (contents[rel->r_offset + (i)])
 #define WARN_REDHAT(type) \
+      /* xgettext:c-format */ \
       _bfd_error_handler (_("%B:%A: Warning: deprecated Red Hat reloc " type " detected against: %s."), \
       input_bfd, input_section, name)
 
@@ -686,6 +682,7 @@ rx_elf_relocate_section
 	  && strcmp (name, "__gp") != 0					\
 	  && strcmp (name, "__romdatastart") != 0			\
 	  && !saw_subtract)						\
+	/* xgettext:c-format */						\
 	_bfd_error_handler (_("%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"), \
 			    input_bfd, input_section, howto->name,	\
 			    input_section->output_section->vma + input_section->output_offset + rel->r_offset, \
@@ -712,6 +709,7 @@ rx_elf_relocate_section
 	case R_RX_RH_8_NEG:
 	  WARN_REDHAT ("RX_RH_8_NEG");
 	  relocation = - relocation;
+	  /* Fall through.  */
 	case R_RX_DIR8S_PCREL:
 	  UNSAFE_FOR_PID;
 	  RANGE (-128, 127);
@@ -733,6 +731,7 @@ rx_elf_relocate_section
 	case R_RX_RH_16_NEG:
 	  WARN_REDHAT ("RX_RH_16_NEG");
 	  relocation = - relocation;
+	  /* Fall through.  */
 	case R_RX_DIR16S_PCREL:
 	  UNSAFE_FOR_PID;
 	  RANGE (-32768, 32767);
@@ -817,6 +816,7 @@ rx_elf_relocate_section
 	  UNSAFE_FOR_PID;
 	  WARN_REDHAT ("RX_RH_24_NEG");
 	  relocation = - relocation;
+	  /* Fall through.  */
 	case R_RX_DIR24S_PCREL:
 	  RANGE (-0x800000, 0x7fffff);
 #if RX_OPCODE_BIG_ENDIAN
@@ -956,7 +956,7 @@ rx_elf_relocate_section
 
 	case R_RX_RH_GPRELB:
 	  WARN_REDHAT ("RX_RH_GPRELB");
-	  relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+	  relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
 	  RANGE (0, 65535);
 #if RX_OPCODE_BIG_ENDIAN
 	  OP (1) = relocation;
@@ -969,7 +969,7 @@ rx_elf_relocate_section
 
 	case R_RX_RH_GPRELW:
 	  WARN_REDHAT ("RX_RH_GPRELW");
-	  relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+	  relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
 	  ALIGN (1);
 	  relocation >>= 1;
 	  RANGE (0, 65535);
@@ -984,7 +984,7 @@ rx_elf_relocate_section
 
 	case R_RX_RH_GPRELL:
 	  WARN_REDHAT ("RX_RH_GPRELL");
-	  relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+	  relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
 	  ALIGN (3);
 	  relocation >>= 2;
 	  RANGE (0, 65535);
@@ -1240,6 +1240,7 @@ rx_elf_relocate_section
 
 	case R_RX_ABS8S:
 	  UNSAFE_FOR_PID;
+	  /* Fall through.  */
 	case R_RX_ABS8S_PCREL:
 	  RX_STACK_POP (relocation);
 	  RANGE (-128, 127);
@@ -1407,11 +1408,11 @@ rx_elf_relocate_section
 	  break;
 
 	case R_RX_OPromtop:
-	  RX_STACK_PUSH (get_romstart (&r, info, input_bfd, input_section, rel->r_offset));
+	  RX_STACK_PUSH (get_romstart (info, input_bfd, input_section, rel->r_offset));
 	  break;
 
 	case R_RX_OPramtop:
-	  RX_STACK_PUSH (get_ramstart (&r, info, input_bfd, input_section, rel->r_offset));
+	  RX_STACK_PUSH (get_ramstart (info, input_bfd, input_section, rel->r_offset));
 	  break;
 
 	default:
@@ -1429,45 +1430,47 @@ rx_elf_relocate_section
 	      /* Catch the case of a missing function declaration
 		 and emit a more helpful error message.  */
 	      if (r_type == R_RX_DIR24S_PCREL)
+		/* xgettext:c-format */
 		msg = _("%B(%A): error: call to undefined function '%s'");
 	      else
-		r = info->callbacks->reloc_overflow
+		(*info->callbacks->reloc_overflow)
 		  (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		   input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_other:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): warning: unaligned access to symbol '%s' in the small data area");
 	      break;
 
 	    case bfd_reloc_outofrange:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: out of range error");
 	      break;
 
 	    case bfd_reloc_notsupported:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: unsupported relocation error");
 	      break;
 
 	    case bfd_reloc_dangerous:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: dangerous relocation");
 	      break;
 
 	    default:
+	      /* xgettext:c-format */
 	      msg = _("%B(%A): internal error: unknown error");
 	      break;
 	    }
 
 	  if (msg)
 	    _bfd_error_handler (msg, input_bfd, input_section, name);
-
-	  if (! r)
-	    return FALSE;
 	}
     }
 
@@ -1531,7 +1534,8 @@ next_smaller_reloc (int r)
 
 static bfd_boolean
 elf32_rx_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count,
-			     Elf_Internal_Rela *alignment_rel, int force_snip)
+			     Elf_Internal_Rela *alignment_rel, int force_snip,
+			     Elf_Internal_Rela *irelstart)
 {
   Elf_Internal_Shdr * symtab_hdr;
   unsigned int        sec_shndx;
@@ -1558,20 +1562,7 @@ elf32_rx_relax_delete_bytes (bfd *abfd, 
   if (alignment_rel)
     toaddr = alignment_rel->r_offset;
 
-  irel = elf_section_data (sec)->relocs;
-  irelend = irel + sec->reloc_count;
-
-  if (irel == NULL && sec->reloc_count > 0)
-    {
-      /* If the relocs have not been kept in the section data
-	 structure (because -no-keep-memory was used) then
-	 reread them now.  */
-      irel = (_bfd_elf_link_read_relocs
-	      (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, FALSE));
-      if (irel == NULL)
-	/* FIXME: Return FALSE instead ?  */
-	irelend = irel;
-    }
+  BFD_ASSERT (toaddr > addr);  
 
   /* Actually delete the bytes.  */
   memmove (contents + addr, contents + addr + count,
@@ -1585,6 +1576,10 @@ elf32_rx_relax_delete_bytes (bfd *abfd, 
   else
     memset (contents + toaddr - count, 0x03, count);
 
+  irel = irelstart;
+  BFD_ASSERT (irel != NULL || sec->reloc_count == 0);
+  irelend = irel + sec->reloc_count;
+
   /* Adjust all the relocs.  */
   for (; irel < irelend; irel++)
     {
@@ -1910,11 +1905,11 @@ rx_offset_for_reloc (bfd *              
 	  break;
 
 	case R_RX_OPromtop:
-	  RX_STACK_PUSH (get_romstart (&r, info, input_bfd, input_section, rel->r_offset));
+	  RX_STACK_PUSH (get_romstart (info, input_bfd, input_section, rel->r_offset));
 	  break;
 
 	case R_RX_OPramtop:
-	  RX_STACK_PUSH (get_ramstart (&r, info, input_bfd, input_section, rel->r_offset));
+	  RX_STACK_PUSH (get_ramstart (info, input_bfd, input_section, rel->r_offset));
 	  break;
 
 	case R_RX_DIR16UL:
@@ -1949,6 +1944,8 @@ rx_offset_for_reloc (bfd *              
 
       rel ++;
     }
+  /* FIXME.  */
+  (void) r;
 }
 
 static void
@@ -1977,7 +1974,6 @@ elf32_rx_relax_section (bfd *           
   Elf_Internal_Shdr * symtab_hdr;
   Elf_Internal_Shdr * shndx_hdr;
   Elf_Internal_Rela * internal_relocs;
-  Elf_Internal_Rela * free_relocs = NULL;
   Elf_Internal_Rela * irel;
   Elf_Internal_Rela * srel;
   Elf_Internal_Rela * irelend;
@@ -2003,14 +1999,17 @@ elf32_rx_relax_section (bfd *           
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
     return TRUE;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+  symtab_hdr = & elf_symtab_hdr (abfd);
+  if (elf_symtab_shndx_list (abfd))
+    shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+  else
+    shndx_hdr = NULL;
 
   sec_start = sec->output_section->vma + sec->output_offset;
 
@@ -2035,7 +2034,7 @@ elf32_rx_relax_section (bfd *           
       symtab_hdr->contents = (bfd_byte *) intsyms;
     }
 
-  if (shndx_hdr->sh_size != 0)
+  if (shndx_hdr && shndx_hdr->sh_size != 0)
     {
       bfd_size_type amt;
 
@@ -2051,13 +2050,15 @@ elf32_rx_relax_section (bfd *           
     }
 
   /* Get a copy of the native relocations.  */
-  internal_relocs = (_bfd_elf_link_read_relocs
-		     (abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
-		      link_info->keep_memory));
+  /* Note - we ignore the setting of link_info->keep_memory when reading
+     in these relocs.  We have to maintain a permanent copy of the relocs
+     because we are going to walk over them multiple times, adjusting them
+     as bytes are deleted from the section, and with this relaxation
+     function itself being called multiple times on the same section...  */
+  internal_relocs = _bfd_elf_link_read_relocs
+    (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, TRUE);
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   /* The RL_ relocs must be just before the operand relocs they go
      with, so we must sort them to guarantee this.  We use bubblesort
@@ -2147,7 +2148,7 @@ elf32_rx_relax_section (bfd *           
 	  nbytes *= alignment;
 
 	  elf32_rx_relax_delete_bytes (abfd, sec, erel->r_offset-nbytes, nbytes, next_alignment,
-				       erel->r_offset == sec->size);
+				       erel->r_offset == sec->size, internal_relocs);
 	  *again = TRUE;
 
 	  continue;
@@ -2186,7 +2187,7 @@ elf32_rx_relax_section (bfd *           
       nrelocs --;
 
 #define SNIPNR(offset, nbytes) \
-	elf32_rx_relax_delete_bytes (abfd, sec, (insn - contents) + offset, nbytes, next_alignment, 0);
+      elf32_rx_relax_delete_bytes (abfd, sec, (insn - contents) + offset, nbytes, next_alignment, 0, internal_relocs);
 #define SNIP(offset, nbytes, newtype) \
         SNIPNR (offset, nbytes);						\
 	srel->r_info = ELF32_R_INFO (ELF32_R_SYM (srel->r_info), newtype)
@@ -3006,9 +3007,6 @@ elf32_rx_relax_section (bfd *           
   return TRUE;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-
   if (free_contents != NULL)
     free (free_contents);
 
@@ -3096,8 +3094,9 @@ describe_flags (flagword flags)
    object file when linking.  */
 
 static bfd_boolean
-rx_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
   bfd_boolean error = FALSE;
@@ -3143,11 +3142,11 @@ rx_elf_merge_private_bfd_data (bfd * ibf
 	    }
 	  else
 	    {
-	      _bfd_error_handler ("There is a conflict merging the ELF header flags from %s",
+	      _bfd_error_handler (_("There is a conflict merging the ELF header flags from %s"),
 				  bfd_get_filename (ibfd));
-	      _bfd_error_handler ("  the input  file's flags: %s",
+	      _bfd_error_handler (_("  the input  file's flags: %s"),
 				  describe_flags (new_flags));
-	      _bfd_error_handler ("  the output file's flags: %s",
+	      _bfd_error_handler (_("  the output file's flags: %s"),
 				  describe_flags (old_flags));
 	      error = TRUE;
 	    }
@@ -3201,9 +3200,11 @@ rx_elf_object_p (bfd * abfd)
   int i;
   unsigned int u;
   Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;
-  int nphdrs = elf_elfheader (abfd)->e_phnum;
+  Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd);
+  int nphdrs = ehdr->e_phnum;
   sec_ptr bsec;
   static int saw_be = FALSE;
+  bfd_vma end_phdroff;
 
   /* We never want to automatically choose the non-swapping big-endian
      target.  The user can only get that explicitly, such as with -I
@@ -3228,6 +3229,17 @@ rx_elf_object_p (bfd * abfd)
      corresponds (based on matching file offsets) and use its VMA
      information to reconstruct the p_vaddr field we clobbered when we
      wrote it out.  */
+  /* If PT_LOAD headers include the ELF file header or program headers
+     then the PT_LOAD header does not start with some section contents.
+     Making adjustments based on the difference between sh_offset and
+     p_offset is nonsense in such cases.  Exclude them.  Note that
+     since standard linker scripts for RX do not use SIZEOF_HEADERS,
+     the linker won't normally create PT_LOAD segments covering the
+     headers so this is mainly for passing the ld testsuite.
+     FIXME.  Why are we looking at non-PT_LOAD headers here?  */
+  end_phdroff = ehdr->e_ehsize;
+  if (ehdr->e_phoff != 0)
+    end_phdroff = ehdr->e_phoff + nphdrs * ehdr->e_phentsize;
   for (i=0; i<nphdrs; i++)
     {
       for (u=0; u<elf_tdata(abfd)->num_elf_sections; u++)
@@ -3235,7 +3247,10 @@ rx_elf_object_p (bfd * abfd)
 	  Elf_Internal_Shdr *sec = elf_tdata(abfd)->elf_sect_ptr[u];
 
 	  if (phdr[i].p_filesz
+	      && phdr[i].p_offset >= end_phdroff
 	      && phdr[i].p_offset <= (bfd_vma) sec->sh_offset
+	      && sec->sh_size > 0
+	      && sec->sh_type != SHT_NOBITS
 	      && (bfd_vma)sec->sh_offset <= phdr[i].p_offset + (phdr[i].p_filesz - 1))
 	    {
 	      /* Found one!  The difference between the two addresses,
@@ -3553,7 +3568,7 @@ rx_set_section_contents (bfd *         a
       if (! rv)
 	return rv;
 
-      location ++;
+      location = (bfd_byte *) location + 1;
       offset ++;
       count --;
       caddr ++;
@@ -3579,7 +3594,7 @@ rx_set_section_contents (bfd *         a
     }
 
   count -= scount;
-  location += scount;
+  location = (bfd_byte *) location + scount;
   offset += scount;
 
   if (count > 0)
@@ -3598,7 +3613,7 @@ rx_set_section_contents (bfd *         a
 	  if (! rv)
 	    return rv;
 
-	  location ++;
+	  location = (bfd_byte *) location + 1;
 	  offset ++;
 	  count --;
 	  caddr ++;
@@ -3737,6 +3752,7 @@ rx_table_find (struct bfd_hash_entry *ve
   if (!h || (h->type != bfd_link_hash_defined
 	     && h->type != bfd_link_hash_defweak))
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B:%A: table %s missing corresponding %s"),
 			  abfd, sec, name, buf);
       return TRUE;
@@ -3744,6 +3760,7 @@ rx_table_find (struct bfd_hash_entry *ve
 
   if (h->u.def.section != ent->u.def.section)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B:%A: %s and %s must be in the same input section"),
 			  h->u.def.section->owner, h->u.def.section,
 			  name, buf);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rx.h ./bfd/elf32-rx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-rx.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-rx.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Renesas RX specific support for 32-bit ELF.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-s390.c ./bfd/elf32-s390.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-s390.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-s390.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM S/390-specific support for 32-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -25,6 +25,7 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/s390.h"
+#include <stdarg.h>
 
 static bfd_reloc_status_type
 s390_tls_reloc (bfd *, arelent *, asymbol *, void *,
@@ -341,8 +342,9 @@ elf_s390_info_to_howto (bfd *abfd ATTRIB
     default:
       if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
 	{
-	  (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-				 abfd, (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: invalid relocation type %d"),
+			      abfd, (int) r_type);
 	  r_type = R_390_NONE;
 	}
       cache_ptr->howto = &elf_howto_table[r_type];
@@ -736,8 +738,6 @@ struct elf_s390_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
   asection *irelifunc;
 
   union
@@ -816,56 +816,6 @@ elf_s390_link_hash_table_create (bfd *ab
   return &ret->elf.root;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_s390_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab = elf_s390_hash_table (info);
-  htab->elf.sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->elf.sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->elf.srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  if (!htab->elf.sgot || !htab->elf.sgotplt || !htab->elf.srelgot)
-    abort ();
-
-  return TRUE;
-}
-
-/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and
-   .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
-   hash table.  */
-
-static bfd_boolean
-elf_s390_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct elf_s390_link_hash_table *htab;
-
-  htab = elf_s390_hash_table (info);
-  if (!htab->elf.sgot && !create_got_section (dynobj, info))
-    return FALSE;
-
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->elf.splt = bfd_get_linker_section (dynobj, ".plt");
-  htab->elf.srelplt = bfd_get_linker_section (dynobj, ".rela.plt");
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
-}
-
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
@@ -923,7 +873,8 @@ elf_s390_copy_indirect_symbol (struct bf
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      dir->ref_dynamic |= ind->ref_dynamic;
+      if (dir->versioned != versioned_hidden)
+	dir->ref_dynamic |= ind->ref_dynamic;
       dir->ref_regular |= ind->ref_regular;
       dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
       dir->needs_plt |= ind->needs_plt;
@@ -937,7 +888,7 @@ elf_s390_tls_transition (struct bfd_link
 			 int r_type,
 			 int is_local)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   switch (r_type)
@@ -978,7 +929,7 @@ elf_s390_check_relocs (bfd *abfd,
   int tls_type, old_tls_type;
   Elf_Internal_Sym *isym;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_s390_elf (abfd));
@@ -1001,8 +952,9 @@ elf_s390_check_relocs (bfd *abfd,
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1087,7 +1039,7 @@ elf_s390_check_relocs (bfd *abfd,
 	    {
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
-	      if (!create_got_section (htab->elf.dynobj, info))
+	      if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
 		return FALSE;
 	    }
 	}
@@ -1112,8 +1064,6 @@ elf_s390_check_relocs (bfd *abfd,
 	}
       switch (r_type)
 	{
-	case R_390_GOTOFF16:
-	case R_390_GOTOFF32:
 	case R_390_GOTPC:
 	case R_390_GOTPCDBL:
 	  /* These relocs do not need a GOT slot.  They just load the
@@ -1121,6 +1071,11 @@ elf_s390_check_relocs (bfd *abfd,
 	     the GOT.  Since the GOT pointer has been set up above we
 	     are done.  */
 	  break;
+	case R_390_GOTOFF16:
+	case R_390_GOTOFF32:
+	  if (h == NULL || !s390_is_ifunc_symbol_p (h) || !h->def_regular)
+	    break;
+	  /* Fall through.  */
 
 	case R_390_PLT12DBL:
 	case R_390_PLT16DBL:
@@ -1177,7 +1132,7 @@ elf_s390_check_relocs (bfd *abfd,
 	case R_390_TLS_GOTIE20:
 	case R_390_TLS_GOTIE32:
 	case R_390_TLS_IEENT:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through.  */
 
@@ -1228,7 +1183,8 @@ elf_s390_check_relocs (bfd *abfd,
 	    {
 	      if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: `%s' accessed both as normal and thread local symbol"),
 		     abfd, h->root.root.string);
 		  return FALSE;
@@ -1253,10 +1209,10 @@ elf_s390_check_relocs (bfd *abfd,
 	  /* For static linking and executables this reloc will be
 	     calculated at linktime otherwise a TLS_TPOFF runtime
 	     reloc will be generated.  */
-	  if (r_type == R_390_TLS_LE32 && info->pie)
+	  if (r_type == R_390_TLS_LE32 && bfd_link_pie (info))
 	    break;
 
-	  if (!info->shared)
+	  if (!bfd_link_pic (info))
 	    break;
 	  info->flags |= DF_STATIC_TLS;
 	  /* Fall through.  */
@@ -1270,7 +1226,7 @@ elf_s390_check_relocs (bfd *abfd,
 	case R_390_PC24DBL:
 	case R_390_PC32DBL:
 	case R_390_PC32:
-	  if (h != NULL)
+	  if (h != NULL && bfd_link_executable (info))
 	    {
 	      /* If this reloc is in a read-only section, we might
 		 need a copy reloc.  We can't check reliably at this
@@ -1280,7 +1236,7 @@ elf_s390_check_relocs (bfd *abfd,
 		 adjust_dynamic_symbol.  */
 	      h->non_got_ref = 1;
 
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		{
 		  /* We may need a .plt entry if the function this reloc
 		     refers to is in a shared lib.  */
@@ -1309,7 +1265,7 @@ elf_s390_check_relocs (bfd *abfd,
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && ((ELF32_R_TYPE (rel->r_info) != R_390_PC16
 		    && ELF32_R_TYPE (rel->r_info) != R_390_PC12DBL
@@ -1322,7 +1278,7 @@ elf_s390_check_relocs (bfd *abfd,
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -1459,7 +1415,7 @@ elf_s390_gc_sweep_hook (bfd *abfd,
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf_s390_hash_table (info);
@@ -1527,6 +1483,18 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	    elf_s390_hash_table (info)->tls_ldm_got.refcount -= 1;
 	  break;
 
+	case R_390_GOTOFF16:
+	case R_390_GOTOFF32:
+	  if (h != NULL && s390_is_ifunc_symbol_p (h) && h->def_regular)
+	    {
+	      h->plt.refcount--;
+	      break;
+	    }
+
+	case R_390_GOTPC:
+	case R_390_GOTPCDBL:
+	  break;
+
 	case R_390_TLS_GD32:
 	case R_390_TLS_IE32:
 	case R_390_TLS_GOTIE12:
@@ -1537,10 +1505,6 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	case R_390_GOT16:
 	case R_390_GOT20:
 	case R_390_GOT32:
-	case R_390_GOTOFF16:
-	case R_390_GOTOFF32:
-	case R_390_GOTPC:
-	case R_390_GOTPCDBL:
 	case R_390_GOTENT:
 	  if (h != NULL)
 	    {
@@ -1565,7 +1529,7 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	case R_390_PC24DBL:
 	case R_390_PC32DBL:
 	case R_390_PC32:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
 	  /* Fall through.  */
 
@@ -1644,11 +1608,51 @@ elf_s390_adjust_dynamic_symbol (struct b
 				struct elf_link_hash_entry *h)
 {
   struct elf_s390_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
 
   /* STT_GNU_IFUNC symbol must go through PLT. */
   if (s390_is_ifunc_symbol_p (h))
-    return TRUE;
+    {
+      /* All local STT_GNU_IFUNC references must be treated as local
+	 calls via local PLT.  */
+      if (h->ref_regular && SYMBOL_CALLS_LOCAL (info, h))
+	{
+	  bfd_size_type pc_count = 0, count = 0;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_s390_link_hash_entry *eh;
+	  struct elf_dyn_relocs *p;
+
+	  eh = (struct elf_s390_link_hash_entry *) h;
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      pc_count += p->pc_count;
+	      p->count -= p->pc_count;
+	      p->pc_count = 0;
+	      count += p->count;
+	      if (p->count == 0)
+		*pp = p->next;
+	      else
+		pp = &p->next;
+	    }
+
+	  if (pc_count || count)
+	    {
+	      h->needs_plt = 1;
+	      h->non_got_ref = 1;
+	      if (h->plt.refcount <= 0)
+		h->plt.refcount = 1;
+	      else
+		h->plt.refcount += 1;
+	    }
+	}
+
+      if (h->plt.refcount <= 0)
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+      return TRUE;
+    }
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later
@@ -1702,7 +1706,7 @@ elf_s390_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -1754,14 +1758,22 @@ elf_s390_adjust_dynamic_symbol (struct b
   /* We must generate a R_390_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -1785,8 +1797,7 @@ allocate_dynrelocs (struct elf_link_hash
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
      here if it is defined and referenced in a non-shared object.  */
   if (s390_is_ifunc_symbol_p (h) && h->def_regular)
-    return s390_elf_allocate_ifunc_dyn_relocs (info, h,
-					       &eh->dyn_relocs);
+    return s390_elf_allocate_ifunc_dyn_relocs (info, h);
   else if (htab->elf.dynamic_sections_created
 	   && h->plt.refcount > 0)
     {
@@ -1799,7 +1810,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->elf.splt;
@@ -1816,7 +1827,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -1852,7 +1863,7 @@ allocate_dynrelocs (struct elf_link_hash
      to R_390_TLS_LE32 requiring no TLS entry. For GOTIE12 and IEENT
      we can save the dynamic TLS relocation.  */
   if (h->got.refcount > 0
-      && !info->shared
+      && !bfd_link_pic (info)
       && h->dynindx == -1
       && elf_s390_hash_entry(h)->tls_type >= GOT_TLS_IE)
     {
@@ -1868,7 +1879,7 @@ allocate_dynrelocs (struct elf_link_hash
 	h->got.offset = (bfd_vma) -1;
     }
   else if (h->got.refcount > 0)
-   {
+    {
       asection *s;
       bfd_boolean dyn;
       int tls_type = elf_s390_hash_entry(h)->tls_type;
@@ -1898,7 +1909,7 @@ allocate_dynrelocs (struct elf_link_hash
 	htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rela);
       else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		|| h->root.type != bfd_link_hash_undefweak)
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	htab->elf.srelgot->size += sizeof (Elf32_External_Rela);
     }
@@ -1914,7 +1925,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -2039,7 +2050,7 @@ elf_s390_size_dynamic_sections (bfd *out
   if (htab->elf.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -2107,7 +2118,7 @@ elf_s390_size_dynamic_sections (bfd *out
 	      s->size += GOT_ENTRY_SIZE;
 	      if (*local_tls_type == GOT_TLS_GD)
 		s->size += GOT_ENTRY_SIZE;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		srela->size += sizeof (Elf32_External_Rela);
 	    }
 	  else
@@ -2154,7 +2165,8 @@ elf_s390_size_dynamic_sections (bfd *out
       if (s == htab->elf.splt
 	  || s == htab->elf.sgot
 	  || s == htab->elf.sgotplt
-	  || s == htab->sdynbss
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro
 	  || s == htab->elf.iplt
 	  || s == htab->elf.igotplt
 	  || s == htab->irelifunc)
@@ -2216,7 +2228,7 @@ elf_s390_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2293,7 +2305,8 @@ invalid_tls_insn (bfd *input_bfd,
   reloc_howto_type *howto;
 
   howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext:c-format */
     (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
@@ -2432,7 +2445,7 @@ elf_s390_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -2515,8 +2528,10 @@ elf_s390_relocate_section (bfd *output_b
 			 finish_dynamic_symbol.  */
 		    }
 		}
-	      else if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		       || (info->shared
+	      else if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							  bfd_link_pic (info),
+							  h)
+		       || (bfd_link_pic (info)
 			   && SYMBOL_REFERENCES_LOCAL (info, h))
 		       || (ELF_ST_VISIBILITY (h->other)
 			   && h->root.type == bfd_link_hash_undefweak))
@@ -2544,7 +2559,7 @@ elf_s390_relocate_section (bfd *output_b
 		    }
 
 		  if ((h->def_regular
-		       && info->shared
+		       && bfd_link_pic (info)
 		       && SYMBOL_REFERENCES_LOCAL (info, h))
 		      /* lrl rx,sym@GOTENT -> larl rx, sym */
 		      && ((r_type == R_390_GOTENT
@@ -2593,7 +2608,7 @@ elf_s390_relocate_section (bfd *output_b
 		  bfd_put_32 (output_bfd, relocation,
 			      htab->elf.sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *srelgot;
 		      Elf_Internal_Rela outrel;
@@ -2637,6 +2652,18 @@ elf_s390_relocate_section (bfd *output_b
 	  /* Relocation is relative to the start of the global offset
 	     table.  */
 
+	  if (h != NULL
+	      && s390_is_ifunc_symbol_p (h)
+	      && h->def_regular
+	      && !bfd_link_executable (info))
+	    {
+	      relocation = (htab->elf.iplt->output_section->vma
+			    + htab->elf.iplt->output_offset
+			    + h->plt.offset
+			    - htab->elf.sgot->output_section->vma);
+	      goto do_relocation;
+	    }
+
 	  /* Note that sgot->output_offset is not involved in this
 	     calculation.  We always want the start of .got.  If we
 	     defined _GLOBAL_OFFSET_TABLE in a different way, as is
@@ -2713,9 +2740,6 @@ elf_s390_relocate_section (bfd *output_b
 	  unresolved_reloc = FALSE;
 	  break;
 
-	case R_390_8:
-	case R_390_16:
-	case R_390_32:
 	case R_390_PC16:
 	case R_390_PC12DBL:
 	case R_390_PC16DBL:
@@ -2724,9 +2748,33 @@ elf_s390_relocate_section (bfd *output_b
 	case R_390_PC32:
 	  if (h != NULL
 	      && s390_is_ifunc_symbol_p (h)
+	      && h->def_regular
+	      && !bfd_link_executable (info))
+	    {
+	      /* This will not work our if the function does not
+		 happen to set up the GOT pointer for some other
+		 reason.  31 bit PLT entries require r12 to hold the
+		 GOT pointer.
+		 FIXME: Implement an errorcheck.
+		 NOTE: It will work when brasl is not available
+		 (e.g. with -m31 -march=g5) since a local function
+		 call then does use GOTOFF which implies r12 being set
+		 up.  */
+	      relocation = (htab->elf.iplt->output_section->vma
+			    + htab->elf.iplt->output_offset
+			    + h ->plt.offset);
+	      goto do_relocation;
+	    }
+	  /* Fall through.  */
+
+	case R_390_8:
+	case R_390_16:
+	case R_390_32:
+	  if (h != NULL
+	      && s390_is_ifunc_symbol_p (h)
 	      && h->def_regular)
 	    {
-	      if (!info->shared || !h->non_got_ref)
+	      if (!bfd_link_pic (info) || !h->non_got_ref)
 		{
 		  /* For a non-shared object STT_GNU_IFUNC symbol must
 		     go through PLT.  */
@@ -2757,7 +2805,7 @@ elf_s390_relocate_section (bfd *output_b
 
 		  if (h->dynindx == -1
 		      || h->forced_local
-		      || info->executable)
+		      || bfd_link_executable (info))
 		    {
 		      /* This symbol is resolved locally.  */
 		      outrel.r_info = ELF32_R_INFO (0, R_390_IRELATIVE);
@@ -2786,7 +2834,7 @@ elf_s390_relocate_section (bfd *output_b
 	  if ((input_section->flags & SEC_ALLOC) == 0)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
 		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak)
@@ -2798,7 +2846,7 @@ elf_s390_relocate_section (bfd *output_b
 		    && r_type != R_390_PC32)
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -2839,7 +2887,7 @@ elf_s390_relocate_section (bfd *output_b
 			   || r_type == R_390_PC24DBL
 			   || r_type == R_390_PC32DBL
 			   || r_type == R_390_PC32
-			   || !info->shared
+			   || !bfd_link_pic (info)
 			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
@@ -2909,7 +2957,7 @@ elf_s390_relocate_section (bfd *output_b
 
 	  /* Relocations for tls literal pool entries.  */
 	case R_390_TLS_IE32:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      asection *sreloc;
@@ -2937,7 +2985,9 @@ elf_s390_relocate_section (bfd *output_b
 	  else if (h != NULL)
 	    {
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (!info->shared && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
+	      if (!bfd_link_pic (info)
+		  && h->dynindx == -1
+		  && tls_type >= GOT_TLS_IE)
 		r_type = R_390_TLS_LE32;
 	    }
 	  if (r_type == R_390_TLS_GD32 && tls_type >= GOT_TLS_IE)
@@ -3048,14 +3098,16 @@ elf_s390_relocate_section (bfd *output_b
 	      if (local_got_offsets == NULL)
 		abort();
 	      off = local_got_offsets[r_symndx];
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		goto emit_tls_relocs;
 	    }
 	  else
 	    {
 	      off = h->got.offset;
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (info->shared || h->dynindx != -1 || tls_type < GOT_TLS_IE)
+	      if (bfd_link_pic (info)
+		  || h->dynindx != -1
+		  || tls_type < GOT_TLS_IE)
 		goto emit_tls_relocs;
 	    }
 
@@ -3072,7 +3124,7 @@ elf_s390_relocate_section (bfd *output_b
 	  break;
 
 	case R_390_TLS_LDM32:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    /* The literal pool entry this relocation refers to gets ignored
 	       by the optimized code of the local exec model. Do nothing
 	       and the value will turn out zero.  */
@@ -3110,7 +3162,7 @@ elf_s390_relocate_section (bfd *output_b
 	  break;
 
 	case R_390_TLS_LE32:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
 	      /* Linking a shared library with non-fpic code requires
 		 a R_390_TLS_TPOFF relocation.  */
@@ -3147,7 +3199,7 @@ elf_s390_relocate_section (bfd *output_b
 	  continue;
 
 	case R_390_TLS_LDO32:
-	  if (info->shared || (input_section->flags & SEC_DEBUGGING))
+	  if (bfd_link_pic (info) || (input_section->flags & SEC_DEBUGGING))
 	    relocation -= dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */
@@ -3169,7 +3221,7 @@ elf_s390_relocate_section (bfd *output_b
 
 	  if (r_type == R_390_TLS_LOAD)
 	    {
-	      if (!info->shared && (h == NULL || h->dynindx == -1))
+	      if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 		{
 		  /* IE->LE transition. Four valid cases:
 		     l %rx,0(0,%ry)    -> lr %rx,%ry + bcr 0,0
@@ -3207,7 +3259,7 @@ elf_s390_relocate_section (bfd *output_b
 		  (insn & 0xffff0000) != 0xc0e50000 &&
 		  (insn & 0xff000000) != 0x0d000000)
 		invalid_tls_insn (input_bfd, input_section, rel);
-	      if (!info->shared && (h == NULL || h->dynindx == -1))
+	      if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 		{
 		  if ((insn & 0xff000000) == 0x0d000000)
 		    {
@@ -3257,7 +3309,7 @@ elf_s390_relocate_section (bfd *output_b
 	    }
 	  else if (r_type == R_390_TLS_LDCALL)
 	    {
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		{
 		  unsigned int insn;
 
@@ -3304,7 +3356,8 @@ elf_s390_relocate_section (bfd *output_b
 	       && h->def_dynamic)
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	   input_bfd,
 	   input_section,
@@ -3355,17 +3408,13 @@ elf_s390_relocate_section (bfd *output_b
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
@@ -3415,14 +3464,14 @@ elf_s390_finish_ifunc_symbol (bfd *outpu
   /* S390 uses halfwords for relative branch calc!  */
   relative_offset = - (plt->output_offset +
 		       (PLT_ENTRY_SIZE * iplt_index) + 18) / 2;
-/* If offset is > 32768, branch to a previous branch
-   390 can only handle +-64 K jumps.  */
+  /* If offset is > 32768, branch to a previous branch
+     390 can only handle +-64 K jumps.  */
   if ( -32768 > (int) relative_offset )
     relative_offset
       = -(unsigned) (((65536 / PLT_ENTRY_SIZE - 1) * PLT_ENTRY_SIZE) / 2);
 
   /* Fill in the entry in the procedure linkage table.  */
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       memcpy (plt->contents + iplt_offset, elf_s390_plt_entry,
 	      PLT_ENTRY_SIZE);
@@ -3505,7 +3554,7 @@ elf_s390_finish_ifunc_symbol (bfd *outpu
 
   if (!h
       || h->dynindx == -1
-      || ((info->executable
+      || ((bfd_link_executable (info)
 	   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	  && h->def_regular))
     {
@@ -3547,16 +3596,15 @@ elf_s390_finish_dynamic_symbol (bfd *out
 
       /* This symbol has an entry in the procedure linkage table.  Set
 	 it up.  */
-      if (s390_is_ifunc_symbol_p (h))
+      if (s390_is_ifunc_symbol_p (h) && h->def_regular)
 	{
-	  /* If we can resolve the IFUNC symbol locally we generate an
-	     IRELATIVE reloc.  */
-	  elf_s390_finish_ifunc_symbol (output_bfd, info, h, htab, h->plt.offset,
-					eh->ifunc_resolver_address +
-					eh->ifunc_resolver_section->output_offset +
-					eh->ifunc_resolver_section->output_section->vma);
-	  /* Fallthrough.  Handling of explicit GOT slots of IFUNC
-	     symbols is below.  */
+	  elf_s390_finish_ifunc_symbol (output_bfd, info, h,
+	    htab, h->plt.offset,
+	    eh->ifunc_resolver_address +
+	    eh->ifunc_resolver_section->output_offset +
+	    eh->ifunc_resolver_section->output_section->vma);
+	  /* Do not return yet.  Handling of explicit GOT slots of
+	     IFUNC symbols is below.  */
 	}
       else
 	{
@@ -3584,7 +3632,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
 	      = -(unsigned) (((65536 / PLT_ENTRY_SIZE - 1) * PLT_ENTRY_SIZE) / 2);
 
 	  /* Fill in the entry in the procedure linkage table.  */
-	  if (!info->shared)
+	  if (!bfd_link_pic (info))
 	    {
 	      memcpy (htab->elf.splt->contents + h->plt.offset, elf_s390_plt_entry,
 		      PLT_ENTRY_SIZE);
@@ -3610,7 +3658,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
 
 	      /* Put in the GOT offset as displacement value.  The 0xc000
 		 value comes from the first word of the plt entry.  Look
-		 at the elf_s390_plt_pic16_entry content.  */
+		 at the elf_s390_plt_pic12_entry content.  */
 	      bfd_put_16 (output_bfd, (bfd_vma)0xc000 | got_offset,
 			  htab->elf.splt->contents + h->plt.offset + 2);
 
@@ -3708,7 +3756,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
 	 initialized in the relocate_section function.  */
       if (h->def_regular && s390_is_ifunc_symbol_p (h))
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* An explicit GOT slot usage needs GLOB_DAT.  If the
 		 symbol references local the implicit got.iplt slot
@@ -3728,8 +3776,8 @@ elf_s390_finish_dynamic_symbol (bfd *out
 	      return TRUE;
 	    }
 	}
-      else if (info->shared
-	  && SYMBOL_REFERENCES_LOCAL (info, h))
+      else if (bfd_link_pic (info)
+	       && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  /* If this is a static link, or it is a -Bsymbolic link and
 	     the symbol is defined locally or was forced to be local
@@ -3762,6 +3810,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
   if (h->needs_copy)
     {
       Elf_Internal_Rela rela;
+      asection *s;
       bfd_byte *loc;
 
       /* This symbols needs a copy reloc.  Set it up.  */
@@ -3769,7 +3818,8 @@ elf_s390_finish_dynamic_symbol (bfd *out
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->elf.srelbss == NULL
+	  || htab->elf.sreldynrelro == NULL)
 	abort ();
 
       rela.r_offset = (h->root.u.def.value
@@ -3777,8 +3827,11 @@ elf_s390_finish_dynamic_symbol (bfd *out
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELF32_R_INFO (h->dynindx, R_390_COPY);
       rela.r_addend = 0;
-      loc = htab->srelbss->contents;
-      loc += htab->srelbss->reloc_count++ * sizeof (Elf32_External_Rela);
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
+      loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
     }
 
@@ -3799,6 +3852,23 @@ elf_s390_reloc_type_class (const struct 
 			   const asection *rel_sec ATTRIBUTE_UNUSED,
 			   const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
+  unsigned long r_symndx = ELF32_R_SYM (rela->r_info);
+  Elf_Internal_Sym sym;
+
+  if (htab->elf.dynsym == NULL
+      || !bed->s->swap_symbol_in (abfd,
+				  (htab->elf.dynsym->contents
+				   + r_symndx * bed->s->sizeof_sym),
+				  0, &sym))
+    abort ();
+
+  /* Check relocation against STT_GNU_IFUNC symbol.  */
+  if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+    return reloc_class_ifunc;
+
   switch ((int) ELF32_R_TYPE (rela->r_info))
     {
     case R_390_RELATIVE:
@@ -3850,16 +3920,17 @@ elf_s390_finish_dynamic_sections (bfd *o
 	      continue;
 
 	    case DT_PLTGOT:
-	      dyn.d_un.d_ptr = htab->elf.sgot->output_section->vma;
+	      s = htab->elf.sgotplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_JMPREL:
-	      dyn.d_un.d_ptr = htab->elf.srelplt->output_section->vma;
+	      s = htab->elf.srelplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->elf.srelplt->output_section;
-	      dyn.d_un.d_val = s->size;
+	      dyn.d_un.d_val = htab->elf.srelplt->size + htab->elf.irelplt->size;
 	      break;
 	    }
 
@@ -3870,7 +3941,7 @@ elf_s390_finish_dynamic_sections (bfd *o
       if (htab->elf.splt && htab->elf.splt->size > 0)
 	{
 	  memset (htab->elf.splt->contents, 0, PLT_FIRST_ENTRY_SIZE);
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      memcpy (htab->elf.splt->contents, elf_s390_plt_pic_first_entry,
 		      PLT_FIRST_ENTRY_SIZE);
@@ -3883,7 +3954,7 @@ elf_s390_finish_dynamic_sections (bfd *o
 			  htab->elf.sgotplt->output_section->vma
 			  + htab->elf.sgotplt->output_offset,
 			  htab->elf.splt->contents + 24);
-	   }
+	    }
 	  elf_section_data (htab->elf.splt->output_section)
 	    ->this_hdr.sh_entsize = 4;
 	}
@@ -3940,6 +4011,8 @@ elf_s390_finish_dynamic_sections (bfd *o
     }
   return TRUE;
 }
+
+/* Support for core dump NOTE sections.  */
 
 static bfd_boolean
 elf_s390_grok_prstatus (bfd * abfd, Elf_Internal_Note * note)
@@ -3949,20 +4022,20 @@ elf_s390_grok_prstatus (bfd * abfd, Elf_
 
   switch (note->descsz)
     {
-      default:
-	return FALSE;
+    default:
+      return FALSE;
 
-      case 224:		/* S/390 Linux.  */
-	/* pr_cursig */
-	elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
-
-	/* pr_pid */
-	elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
-
-	/* pr_reg */
-	offset = 72;
-	size = 144;
-	break;
+    case 224:			/* S/390 Linux.  */
+      /* pr_cursig */
+      elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
+
+      /* pr_pid */
+      elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
+
+      /* pr_reg */
+      offset = 72;
+      size = 144;
+      break;
     }
 
   /* Make a ".reg/999" section.  */
@@ -3970,6 +4043,89 @@ elf_s390_grok_prstatus (bfd * abfd, Elf_
 					  size, note->descpos + offset);
 }
 
+static bfd_boolean
+elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->descsz)
+    {
+    default:
+      return FALSE;
+
+    case 124:			/* sizeof(struct elf_prpsinfo) on s390 */
+      elf_tdata (abfd)->core->pid
+	= bfd_get_32 (abfd, note->descdata + 12);
+      elf_tdata (abfd)->core->program
+	= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
+      elf_tdata (abfd)->core->command
+	= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+      break;
+    }
+
+  /* Note that for some reason, a spurious space is tacked
+     onto the end of the args in some (at least one anyway)
+     implementations, so strip it off if it exists.  */
+
+  {
+    char *command = elf_tdata (abfd)->core->command;
+    int n = strlen (command);
+
+    if (0 < n && command[n - 1] == ' ')
+      command[n - 1] = '\0';
+  }
+
+  return TRUE;
+}
+
+static char *
+elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
+			  int note_type, ...)
+{
+  va_list ap;
+
+  switch (note_type)
+    {
+    default:
+      return NULL;
+
+    case NT_PRPSINFO:
+      {
+	char data[124] = { 0 };
+	const char *fname, *psargs;
+
+	va_start (ap, note_type);
+	fname = va_arg (ap, const char *);
+	psargs = va_arg (ap, const char *);
+	va_end (ap);
+
+	strncpy (data + 28, fname, 16);
+	strncpy (data + 44, psargs, 80);
+	return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				   &data, sizeof (data));
+      }
+
+    case NT_PRSTATUS:
+      {
+	char data[224] = { 0 };
+	long pid;
+	int cursig;
+	const void *gregs;
+
+	va_start (ap, note_type);
+	pid = va_arg (ap, long);
+	cursig = va_arg (ap, int);
+	gregs = va_arg (ap, const void *);
+	va_end (ap);
+
+	bfd_put_16 (abfd, cursig, data + 12);
+	bfd_put_32 (abfd, pid, data + 24);
+	memcpy (data + 72, gregs, 144);
+	return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				   &data, sizeof (data));
+      }
+    }
+  /* NOTREACHED */
+}
+
 /* Return address for Ith PLT stub in section PLT, for relocation REL
    or (bfd_vma) -1 if it should not be included.  */
 
@@ -3984,12 +4140,14 @@ elf_s390_plt_sym_val (bfd_vma i, const a
    object file when linking.  */
 
 static bfd_boolean
-elf32_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
+
   if (!is_s390_elf (ibfd) || !is_s390_elf (obfd))
     return TRUE;
 
-  if (!elf_s390_merge_obj_attributes (ibfd, obfd))
+  if (!elf_s390_merge_obj_attributes (ibfd, info))
     return FALSE;
 
   elf_elfheader (obfd)->e_flags |= elf_elfheader (ibfd)->e_flags;
@@ -4011,6 +4169,7 @@ elf32_s390_merge_private_bfd_data (bfd *
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
+#define elf_backend_want_dynrelro	1
 #define elf_backend_rela_normal		1
 
 #define elf_info_to_howto		      elf_s390_info_to_howto
@@ -4025,7 +4184,7 @@ elf32_s390_merge_private_bfd_data (bfd *
 #define elf_backend_adjust_dynamic_symbol     elf_s390_adjust_dynamic_symbol
 #define elf_backend_check_relocs	      elf_s390_check_relocs
 #define elf_backend_copy_indirect_symbol      elf_s390_copy_indirect_symbol
-#define elf_backend_create_dynamic_sections   elf_s390_create_dynamic_sections
+#define elf_backend_create_dynamic_sections   _bfd_elf_create_dynamic_sections
 #define elf_backend_finish_dynamic_sections   elf_s390_finish_dynamic_sections
 #define elf_backend_finish_dynamic_symbol     elf_s390_finish_dynamic_symbol
 #define elf_backend_gc_mark_hook	      elf_s390_gc_mark_hook
@@ -4035,6 +4194,8 @@ elf32_s390_merge_private_bfd_data (bfd *
 #define elf_backend_size_dynamic_sections     elf_s390_size_dynamic_sections
 #define elf_backend_init_index_section	      _bfd_elf_init_1_index_section
 #define elf_backend_grok_prstatus	      elf_s390_grok_prstatus
+#define elf_backend_grok_psinfo		      elf_s390_grok_psinfo
+#define elf_backend_write_core_note	      elf_s390_write_core_note
 #define elf_backend_plt_sym_val		      elf_s390_plt_sym_val
 #define elf_backend_add_symbol_hook           elf_s390_add_symbol_hook
 #define elf_backend_sort_relocs_p             elf_s390_elf_sort_relocs_p
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score7.c ./bfd/elf32-score7.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score7.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-score7.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -1287,7 +1287,8 @@ score_elf_create_got_section (bfd *abfd,
   /* We have to use an alignment of 2**4 here because this is hardcoded
      in the function stub generation and in the linker script.  */
   s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
-   if (s == NULL
+  elf_hash_table (info)->sgot = s;
+  if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
 
@@ -1304,8 +1305,10 @@ score_elf_create_got_section (bfd *abfd,
   h->non_elf = 0;
   h->def_regular = 1;
   h->type = STT_OBJECT;
+  elf_hash_table (info)->hgot = h;
 
-  if (info->shared && ! bfd_elf_link_record_dynamic_symbol (info, h))
+  if (bfd_link_pic (info)
+      && ! bfd_elf_link_record_dynamic_symbol (info, h))
     return FALSE;
 
   amt = sizeof (struct score_got_info);
@@ -1375,7 +1378,7 @@ score_elf_create_local_got_entry (bfd *a
     {
       (*loc)->gotidx = -1;
       /* We didn't allocate enough space in the GOT.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
         (_("not enough GOT space for local GOT entries"));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1849,10 +1852,13 @@ score_elf_final_link_relocate (reloc_how
 
       bh = bfd_link_hash_lookup (info->hash, "_gp", 0, 0, 1);
       if (bh != NULL && bh->type == bfd_link_hash_defined)
-        elf_gp (output_bfd) = (bh->u.def.value
-                               + bh->u.def.section->output_section->vma
-                               + bh->u.def.section->output_offset);
-      else if (info->relocatable)
+	{
+	  elf_gp (output_bfd) = (bh->u.def.value
+				 + bh->u.def.section->output_offset);
+	  if (bh->u.def.section->output_section)
+	    elf_gp (output_bfd) += bh->u.def.section->output_section->vma;
+	}
+      else if (bfd_link_relocatable (info))
         {
           bfd_vma lo = -1;
 
@@ -1965,7 +1971,7 @@ score_elf_final_link_relocate (reloc_how
           g = score_elf_global_got_index (elf_hash_table (info)->dynobj,
                                           (struct elf_link_hash_entry *) h);
           if ((! elf_hash_table(info)->dynamic_sections_created
-               || (info->shared
+               || (bfd_link_pic (info)
                    && (info->symbolic || h->root.dynindx == -1)
                    && h->root.def_regular)))
             {
@@ -2017,7 +2023,7 @@ score_elf_final_link_relocate (reloc_how
 
     case R_SCORE_ABS32:
     case R_SCORE_REL32:
-      if ((info->shared
+      if ((bfd_link_pic (info)
            || (elf_hash_table (info)->dynamic_sections_created
                && h != NULL
                && h->root.def_dynamic
@@ -2064,7 +2070,7 @@ score_elf_final_link_relocate (reloc_how
       if ((offset & 0x1000000) != 0)
         offset |= 0xfe000000;
       value += offset;
-      abs_value = abs (value - rel_addr);
+      abs_value = value - rel_addr;
       if ((abs_value & 0xfe000000) != 0)
         return bfd_reloc_overflow;
       addend = (addend & ~howto->src_mask)
@@ -2094,7 +2100,7 @@ score_elf_final_link_relocate (reloc_how
       if ((offset & 0x800) != 0)        /* Offset is negative.  */
         offset |= 0xfffff000;
       value += offset;
-      abs_value = abs (value - rel_addr);
+      abs_value = value - rel_addr;
       if ((abs_value & 0xfffff000) != 0)
         return bfd_reloc_overflow;
       addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
@@ -2251,7 +2257,7 @@ s7_bfd_score_elf_relocate_section (bfd *
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       bfd_size_type dynsecsymcount = 0;
-      if (info->shared)
+      if (bfd_link_pic (info))
         {
           asection * p;
           const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
@@ -2300,7 +2306,7 @@ s7_bfd_score_elf_relocate_section (bfd *
           relocation = sec->output_section->vma + sec->output_offset;
           name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
 
-          if (!info->relocatable)
+          if (!bfd_link_relocatable (info))
             {
               if (ELF_ST_TYPE (sym->st_info) != STT_SECTION
                       || (sec->flags & SEC_MERGE))
@@ -2433,18 +2439,17 @@ s7_bfd_score_elf_relocate_section (bfd *
               /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol
                  in s7_bfd_score_elf_create_dynamic_sections.  Otherwise, we should define
                  the symbol with a value of 0.  */
-              BFD_ASSERT (! info->shared);
+              BFD_ASSERT (! bfd_link_pic (info));
               BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL);
               relocation = 0;
             }
-          else if (!info->relocatable)
+          else if (!bfd_link_relocatable (info))
             {
-              if (! ((*info->callbacks->undefined_symbol)
-                     (info, h->root.root.root.string, input_bfd,
-                      input_section, rel->r_offset,
-                      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-                      || ELF_ST_VISIBILITY (h->root.other))))
-                return bfd_reloc_undefined;
+	      (*info->callbacks->undefined_symbol)
+		(info, h->root.root.root.string, input_bfd,
+		 input_section, rel->r_offset,
+		 (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+		 || ELF_ST_VISIBILITY (h->root.other));
               relocation = 0;
             }
         }
@@ -2453,7 +2458,7 @@ s7_bfd_score_elf_relocate_section (bfd *
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
         {
           /* This is a relocatable link.  We don't have to change
              anything, unless the reloc is against a section symbol,
@@ -2527,16 +2532,14 @@ s7_bfd_score_elf_relocate_section (bfd *
               /* If the overflowing reloc was to an undefined symbol,
                  we have already printed one error message and there
                  is no point complaining again.  */
-              if (((!h) || (h->root.root.type != bfd_link_hash_undefined))
-                  && (!((*info->callbacks->reloc_overflow)
-                        (info, NULL, name, howto->name, (bfd_vma) 0,
-                         input_bfd, input_section, rel->r_offset))))
-                return FALSE;
+              if (!h || h->root.root.type != bfd_link_hash_undefined)
+		(*info->callbacks->reloc_overflow)
+		  (info, NULL, name, howto->name, (bfd_vma) 0,
+		   input_bfd, input_section, rel->r_offset);
               break;
             case bfd_reloc_undefined:
-              if (!((*info->callbacks->undefined_symbol)
-                    (info, name, input_bfd, input_section, rel->r_offset, TRUE)))
-                return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
               break;
 
             case bfd_reloc_outofrange:
@@ -2553,12 +2556,11 @@ s7_bfd_score_elf_relocate_section (bfd *
 
             default:
               msg = _("internal error: unknown error");
-              /* fall through */
+              /* Fall through.  */
 
             common_error:
-              if (!((*info->callbacks->warning)
-                    (info, msg, name, input_bfd, input_section, rel->r_offset)))
-                return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
               break;
             }
         }
@@ -2588,7 +2590,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
   asection *sreloc;
   const struct elf_backend_data *bed;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -2634,7 +2636,9 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
         }
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
         {
-          (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name);
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%s: Malformed reloc detected for section %s"), abfd, name);
           bfd_set_error (bfd_error_bad_value);
           return FALSE;
         }
@@ -2669,7 +2673,9 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
               break;
             case R_SCORE_ABS32:
             case R_SCORE_REL32:
-              if (dynobj == NULL && (info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+              if (dynobj == NULL
+		  && (bfd_link_pic (info) || h != NULL)
+		  && (sec->flags & SEC_ALLOC) != 0)
                 elf_hash_table (info)->dynobj = dynobj = abfd;
               break;
             default:
@@ -2688,7 +2694,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
         case R_SCORE_CALL15:
           if (h == NULL)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
                  abfd, (unsigned long) rel->r_offset);
               bfd_set_error (bfd_error_bad_value);
@@ -2712,7 +2719,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
           break;
         case R_SCORE_ABS32:
         case R_SCORE_REL32:
-          if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+          if ((bfd_link_pic (info) || h != NULL)
+	      && (sec->flags & SEC_ALLOC) != 0)
             {
               if (sreloc == NULL)
                 {
@@ -2721,7 +2729,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd
                     return FALSE;
                 }
 #define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
-              if (info->shared)
+              if (bfd_link_pic (info))
                 {
                   /* When creating a shared object, we must copy these reloc types into
                      the output file as R_SCORE_REL32 relocs.  We make room for this reloc
@@ -2914,7 +2922,7 @@ s7_bfd_score_elf_adjust_dynamic_symbol (
      any R_SCORE_ABS32 or R_SCORE_REL32 relocs against it into the output
      file.  */
   hscore = (struct score_elf_link_hash_entry *) h;
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && hscore->possibly_dynamic_relocs != 0
       && (h->root.type == bfd_link_hash_defweak || !h->def_regular))
     {
@@ -3074,7 +3082,7 @@ s7_bfd_score_elf_size_dynamic_sections (
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (!bfd_link_pic (info) && !info->nointerp)
         {
           s = bfd_get_linker_section (dynobj, ".interp");
           BFD_ASSERT (s != NULL);
@@ -3259,7 +3267,7 @@ s7_bfd_score_elf_create_dynamic_sections
         return FALSE;
     }
 
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       const char *name;
 
@@ -3425,21 +3433,18 @@ s7_bfd_score_elf_finish_dynamic_sections
           switch (dyn.d_tag)
             {
             case DT_RELENT:
-              s = score_elf_rel_dyn_section (dynobj, FALSE);
-              BFD_ASSERT (s != NULL);
               dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj);
               break;
 
             case DT_STRSZ:
               /* Rewrite DT_STRSZ.  */
-              dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
-                    break;
+              dyn.d_un.d_val
+                = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+              break;
 
             case DT_PLTGOT:
-              name = ".got";
-              s = bfd_get_section_by_name (output_bfd, name);
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              s = elf_hash_table (info)->sgot;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               break;
 
             case DT_SCORE_BASE_ADDRESS:
@@ -3467,14 +3472,13 @@ s7_bfd_score_elf_finish_dynamic_sections
                 }
               /* In case if we don't have global got symbols we default
                   to setting DT_SCORE_GOTSYM to the same value as
-                  DT_SCORE_SYMTABNO, so we just fall through.  */
+                  DT_SCORE_SYMTABNO.  */
+	      /* Fall through.  */
 
             case DT_SCORE_SYMTABNO:
               name = ".dynsym";
               elemsize = SCORE_ELF_SYM_SIZE (output_bfd);
-              s = bfd_get_section_by_name (output_bfd, name);
-              BFD_ASSERT (s != NULL);
-
+              s = bfd_get_linker_section (dynobj, name);
               dyn.d_un.d_val = s->size / elemsize;
               break;
 
@@ -3826,12 +3830,13 @@ s7_elf32_score_print_private_bfd_data (b
 }
 
 bfd_boolean
-s7_elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword in_flags;
   flagword out_flags;
 
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   in_flags  = elf_elfheader (ibfd)->e_flags;
@@ -3860,7 +3865,7 @@ s7_elf32_score_merge_private_bfd_data (b
 
   if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0))
     {
-      (*_bfd_error_handler) (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
+      _bfd_error_handler (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
     }
 
   /* Maybe dependency fix compatibility should be checked here.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score.c ./bfd/elf32-score.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-score.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -1429,7 +1429,8 @@ score_elf_create_got_section (bfd *abfd,
   /* We have to use an alignment of 2**4 here because this is hardcoded
      in the function stub generation and in the linker script.  */
   s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
-   if (s == NULL
+  elf_hash_table (info)->sgot = s;
+  if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
 
@@ -1446,8 +1447,9 @@ score_elf_create_got_section (bfd *abfd,
   h->non_elf = 0;
   h->def_regular = 1;
   h->type = STT_OBJECT;
+  elf_hash_table (info)->hgot = h;
 
-  if (info->shared && ! bfd_elf_link_record_dynamic_symbol (info, h))
+  if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h))
     return FALSE;
 
   amt = sizeof (struct score_got_info);
@@ -1515,7 +1517,7 @@ score_elf_create_local_got_entry (bfd *a
     {
       (*loc)->gotidx = -1;
       /* We didn't allocate enough space in the GOT.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
         (_("not enough GOT space for local GOT entries"));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -2003,7 +2005,7 @@ score_elf_final_link_relocate (reloc_how
         elf_gp (output_bfd) = (bh->u.def.value
                                + bh->u.def.section->output_section->vma
                                + bh->u.def.section->output_offset);
-      else if (info->relocatable)
+      else if (bfd_link_relocatable (info))
         {
           bfd_vma lo = -1;
 
@@ -2067,7 +2069,7 @@ score_elf_final_link_relocate (reloc_how
           g = score_elf_global_got_index (elf_hash_table (info)->dynobj,
                                           (struct elf_link_hash_entry *) h);
           if ((! elf_hash_table (info)->dynamic_sections_created
-               || (info->shared
+               || (bfd_link_pic (info)
                    && (info->symbolic || h->root.dynindx == -1)
                    && h->root.def_regular)))
             {
@@ -2118,7 +2120,7 @@ score_elf_final_link_relocate (reloc_how
 
     case R_SCORE_ABS32:
     case R_SCORE_REL32:
-      if ((info->shared
+      if ((bfd_link_pic (info)
            || (elf_hash_table (info)->dynamic_sections_created
                && h != NULL
                && h->root.def_dynamic
@@ -2165,7 +2167,7 @@ score_elf_final_link_relocate (reloc_how
       if ((offset & 0x1000000) != 0)
         offset |= 0xfe000000;
       value += offset;
-      abs_value = abs (value - rel_addr);
+      abs_value = value - rel_addr;
       if ((abs_value & 0xfe000000) != 0)
         return bfd_reloc_overflow;
       addend = (addend & ~howto->src_mask)
@@ -2241,7 +2243,7 @@ score_elf_final_link_relocate (reloc_how
       if ((offset & 0x800) != 0)        /* Offset is negative.  */
         offset |= 0xfffff000;
       value += offset;
-      abs_value = abs (value - rel_addr);
+      abs_value = value - rel_addr;
       if ((abs_value & 0xfffff000) != 0)
         return bfd_reloc_overflow;
       addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
@@ -2413,7 +2415,7 @@ s3_bfd_score_elf_relocate_section (bfd *
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       bfd_size_type dynsecsymcount = 0;
-      if (info->shared)
+      if (bfd_link_pic (info))
         {
           asection * p;
           const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
@@ -2464,7 +2466,7 @@ s3_bfd_score_elf_relocate_section (bfd *
                         + sym->st_value);
           name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
 
-          if (!info->relocatable
+          if (!bfd_link_relocatable (info)
               && (sec->flags & SEC_MERGE)
               && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
             {
@@ -2661,18 +2663,17 @@ s3_bfd_score_elf_relocate_section (bfd *
               /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol
                  in s3_bfd_score_elf_create_dynamic_sections.  Otherwise, we should define
                  the symbol with a value of 0.  */
-              BFD_ASSERT (! info->shared);
+              BFD_ASSERT (! bfd_link_pic (info));
               BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL);
               relocation = 0;
             }
-          else if (!info->relocatable)
+          else if (!bfd_link_relocatable (info))
             {
-              if (! ((*info->callbacks->undefined_symbol)
-                     (info, h->root.root.root.string, input_bfd,
-                      input_section, rel->r_offset,
-                      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-                      || ELF_ST_VISIBILITY (h->root.other))))
-                return bfd_reloc_undefined;
+	      (*info->callbacks->undefined_symbol)
+		(info, h->root.root.root.string, input_bfd,
+		 input_section, rel->r_offset,
+		 (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+		 || ELF_ST_VISIBILITY (h->root.other));
               relocation = 0;
             }
         }
@@ -2681,7 +2682,7 @@ s3_bfd_score_elf_relocate_section (bfd *
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
         {
           /* This is a relocatable link.  We don't have to change
              anything, unless the reloc is against a section symbol,
@@ -2718,16 +2719,14 @@ s3_bfd_score_elf_relocate_section (bfd *
               /* If the overflowing reloc was to an undefined symbol,
                  we have already printed one error message and there
                  is no point complaining again.  */
-              if (((!h) || (h->root.root.type != bfd_link_hash_undefined))
-                  && (!((*info->callbacks->reloc_overflow)
-                        (info, NULL, name, howto->name, (bfd_vma) 0,
-                         input_bfd, input_section, rel->r_offset))))
-                return FALSE;
+	      if (!h || h->root.root.type != bfd_link_hash_undefined)
+		(*info->callbacks->reloc_overflow)
+		  (info, NULL, name, howto->name, (bfd_vma) 0,
+		   input_bfd, input_section, rel->r_offset);
               break;
             case bfd_reloc_undefined:
-              if (!((*info->callbacks->undefined_symbol)
-                    (info, name, input_bfd, input_section, rel->r_offset, TRUE)))
-                return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
               break;
 
             case bfd_reloc_outofrange:
@@ -2749,12 +2748,11 @@ s3_bfd_score_elf_relocate_section (bfd *
 
             default:
               msg = _("internal error: unknown error");
-              /* fall through */
+              /* Fall through.  */
 
             common_error:
-              if (!((*info->callbacks->warning)
-                    (info, msg, name, input_bfd, input_section, rel->r_offset)))
-                return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
               break;
             }
         }
@@ -2783,7 +2781,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
   asection *sreloc;
   const struct elf_backend_data *bed;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -2829,7 +2827,9 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
         }
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
         {
-          (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name);
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%s: Malformed reloc detected for section %s"), abfd, name);
           bfd_set_error (bfd_error_bad_value);
           return FALSE;
         }
@@ -2864,7 +2864,9 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
               break;
             case R_SCORE_ABS32:
             case R_SCORE_REL32:
-              if (dynobj == NULL && (info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+              if (dynobj == NULL
+		  && (bfd_link_pic (info) || h != NULL)
+		  && (sec->flags & SEC_ALLOC) != 0)
                 elf_hash_table (info)->dynobj = dynobj = abfd;
               break;
             default:
@@ -2883,7 +2885,8 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
         case R_SCORE_CALL15:
           if (h == NULL)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
                  abfd, (unsigned long) rel->r_offset);
               bfd_set_error (bfd_error_bad_value);
@@ -2907,7 +2910,8 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
           break;
         case R_SCORE_ABS32:
         case R_SCORE_REL32:
-          if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+          if ((bfd_link_pic (info) || h != NULL)
+	      && (sec->flags & SEC_ALLOC) != 0)
             {
               if (sreloc == NULL)
                 {
@@ -2916,7 +2920,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd
                     return FALSE;
                 }
 #define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
-              if (info->shared)
+              if (bfd_link_pic (info))
                 {
                   /* When creating a shared object, we must copy these reloc types into
                      the output file as R_SCORE_REL32 relocs.  We make room for this reloc
@@ -3108,7 +3112,7 @@ s3_bfd_score_elf_adjust_dynamic_symbol (
      any R_SCORE_ABS32 or R_SCORE_REL32 relocs against it into the output
      file.  */
   hscore = (struct score_elf_link_hash_entry *)h;
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && hscore->possibly_dynamic_relocs != 0
       && (h->root.type == bfd_link_hash_defweak || !h->def_regular))
     {
@@ -3266,7 +3270,7 @@ s3_bfd_score_elf_size_dynamic_sections (
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (!bfd_link_pic (info) && !info->nointerp)
         {
           s = bfd_get_linker_section (dynobj, ".interp");
           BFD_ASSERT (s != NULL);
@@ -3451,7 +3455,7 @@ s3_bfd_score_elf_create_dynamic_sections
         return FALSE;
     }
 
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       const char *name;
 
@@ -3615,21 +3619,18 @@ s3_bfd_score_elf_finish_dynamic_sections
           switch (dyn.d_tag)
             {
             case DT_RELENT:
-              s = score_elf_rel_dyn_section (dynobj, FALSE);
-              BFD_ASSERT (s != NULL);
               dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj);
               break;
 
             case DT_STRSZ:
               /* Rewrite DT_STRSZ.  */
-              dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
-                    break;
+              dyn.d_un.d_val
+                = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+              break;
 
             case DT_PLTGOT:
-              name = ".got";
-              s = bfd_get_section_by_name (output_bfd, name);
-              BFD_ASSERT (s != NULL);
-              dyn.d_un.d_ptr = s->vma;
+              s = elf_hash_table (info)->sgot;
+              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
               break;
 
             case DT_SCORE_BASE_ADDRESS:
@@ -3657,14 +3658,13 @@ s3_bfd_score_elf_finish_dynamic_sections
                 }
               /* In case if we don't have global got symbols we default
                   to setting DT_SCORE_GOTSYM to the same value as
-                  DT_SCORE_SYMTABNO, so we just fall through.  */
+                  DT_SCORE_SYMTABNO.  */
+	      /* Fall through.  */
 
             case DT_SCORE_SYMTABNO:
               name = ".dynsym";
               elemsize = SCORE_ELF_SYM_SIZE (output_bfd);
-              s = bfd_get_section_by_name (output_bfd, name);
-              BFD_ASSERT (s != NULL);
-
+              s = bfd_get_linker_section (dynobj, name);
               dyn.d_un.d_val = s->size / elemsize;
               break;
 
@@ -4021,12 +4021,13 @@ s3_elf32_score_print_private_bfd_data (b
 }
 
 static bfd_boolean
-s3_elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword in_flags;
   flagword out_flags;
 
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   in_flags  = elf_elfheader (ibfd)->e_flags;
@@ -4054,9 +4055,8 @@ s3_elf32_score_merge_private_bfd_data (b
     }
 
   if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0))
-    {
-      (*_bfd_error_handler) (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
-    }
+    _bfd_error_handler
+      (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
 
   /* FIXME: Maybe dependency fix compatibility should be checked here.  */
 
@@ -4396,12 +4396,12 @@ elf32_score_print_private_bfd_data (bfd 
 }
 
 static bfd_boolean
-elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
-  if (bfd_get_mach (obfd) == bfd_mach_score3)
-    return s3_elf32_score_merge_private_bfd_data (ibfd, obfd);
+  if (bfd_get_mach (info->output_bfd) == bfd_mach_score3)
+    return s3_elf32_score_merge_private_bfd_data (ibfd, info);
   else
-    return s7_elf32_score_merge_private_bfd_data (ibfd, obfd);
+    return s7_elf32_score_merge_private_bfd_data (ibfd, info);
 }
 
 static bfd_boolean
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score.h ./bfd/elf32-score.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-score.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-score.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -141,7 +141,7 @@ extern bfd_boolean
 s7_elf32_score_print_private_bfd_data (bfd *, void *);
 
 extern bfd_boolean
-s7_elf32_score_merge_private_bfd_data (bfd *, bfd *);
+s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean
 s7_elf32_score_new_section_hook (bfd *, asection *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64.c ./bfd/elf32-sh64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 32-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -44,7 +44,7 @@ static bfd_boolean sh64_elf_new_section_
 static bfd_boolean sh64_elf_copy_private_data
   (bfd *, bfd *);
 static bfd_boolean sh64_elf_merge_private_data
-  (bfd *, bfd *);
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean sh64_elf_fake_sections
   (bfd *, Elf_Internal_Shdr *, asection *);
 static bfd_boolean sh64_elf_set_private_flags
@@ -203,11 +203,12 @@ sh64_elf_copy_private_data (bfd * ibfd, 
 }
 
 static bfd_boolean
-sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
+sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, new_flags;
 
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -220,15 +221,18 @@ sh64_elf_merge_private_data (bfd *ibfd, 
 
       if (bfd_get_arch_size (ibfd) == 32
 	  && bfd_get_arch_size (obfd) == 64)
+	/* xgettext:c-format */
 	msg = _("%s: compiled as 32-bit object and %s is 64-bit");
       else if (bfd_get_arch_size (ibfd) == 64
 	       && bfd_get_arch_size (obfd) == 32)
+	/* xgettext:c-format */
 	msg = _("%s: compiled as 64-bit object and %s is 32-bit");
       else
+	/* xgettext:c-format */
 	msg = _("%s: object size does not match that of target %s");
 
-      (*_bfd_error_handler) (msg, bfd_get_filename (ibfd),
-			     bfd_get_filename (obfd));
+      _bfd_error_handler (msg, bfd_get_filename (ibfd),
+			  bfd_get_filename (obfd));
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
     }
@@ -244,7 +248,7 @@ sh64_elf_merge_private_data (bfd *ibfd, 
   /* We don't allow linking in non-SH64 code.  */
   else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	("%s: uses non-SH64 instructions while previous modules use SH64 instructions",
 	 bfd_get_filename (ibfd));
       bfd_set_error (bfd_error_bad_value);
@@ -397,7 +401,7 @@ sh64_elf_add_symbol_hook (bfd *abfd, str
 	 right, and tweak the name when it's output.  Otherwise, we make
 	 an indirect symbol of it.  */
       flagword flags
-	= info->relocatable || info->emitrelocations
+	= bfd_link_relocatable (info) || info->emitrelocations
 	? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
 
       char *dl_name
@@ -441,13 +445,13 @@ sh64_elf_add_symbol_hook (bfd *abfd, str
 	free (dl_name);
 
       if (h->type != STT_DATALABEL
-	  || ((info->relocatable || info->emitrelocations)
+	  || ((bfd_link_relocatable (info) || info->emitrelocations)
 	      && h->root.type != bfd_link_hash_undefined)
-	  || (! info->relocatable && !info->emitrelocations
+	  || (! bfd_link_relocatable (info) && !info->emitrelocations
 	      && h->root.type != bfd_link_hash_indirect))
 	{
 	  /* Make sure we don't get confused on invalid input.  */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: encountered datalabel symbol in input"),
 	     bfd_get_filename (abfd));
 	  bfd_set_error (bfd_error_bad_value);
@@ -487,7 +491,7 @@ sh64_elf_link_output_symbol_hook (struct
 {
   char *name = (char *) cname;
 
-  if (info->relocatable || info->emitrelocations)
+  if (bfd_link_relocatable (info) || info->emitrelocations)
     {
       if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
 	name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
@@ -530,11 +534,9 @@ shmedia_prepare_reloc (struct bfd_link_i
 		     && ((*relocation + rel->r_addend) & 1) == 0)
 	      msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
 
-	    if (msg != NULL
-		&& ! ((*info->callbacks->reloc_dangerous)
-		      (info, msg, abfd, input_section,
-		       rel->r_offset)))
-	      return FALSE;
+	    if (msg != NULL)
+	      (*info->callbacks->reloc_dangerous)
+		(info, msg, abfd, input_section, rel->r_offset);
 	  }
 	else
 	  {
@@ -545,7 +547,7 @@ shmedia_prepare_reloc (struct bfd_link_i
 	       unknown destination (or when relaxing) will get us here.  */
 	    if ((insn & SHMEDIA_PTB_BIT) != 0)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
 		  (_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"),
 		   bfd_get_filename (input_section->owner));
 		return FALSE;
@@ -594,7 +596,8 @@ shmedia_prepare_reloc (struct bfd_link_i
     }
   if (dropped != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
 	 input_section->owner, ELF32_R_TYPE (rel->r_info),
 	 (unsigned) rel->r_offset, relocation);
@@ -670,7 +673,7 @@ sh64_elf_final_write_processing (bfd *ab
 				      ld_generated_cranges_size))
 	{
 	  bfd_set_error (bfd_error_file_truncated);
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: could not write out added .cranges entries"),
 	     bfd_get_filename (abfd));
 	}
@@ -730,7 +733,7 @@ sh64_elf_final_write_processing (bfd *ab
 					  cranges_size))
 	    {
 	      bfd_set_error (bfd_error_file_truncated);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%s: could not write out sorted .cranges entries"),
 		 bfd_get_filename (abfd));
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64-com.c ./bfd/elf32-sh64-com.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64-com.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh64-com.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 32-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64.h ./bfd/elf32-sh64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh64.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh64.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SH ELF support for BFD.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh.c ./bfd/elf32-sh.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Renesas / SuperH SH specific support for 32-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -487,8 +487,9 @@ sh_elf_info_to_howto (bfd *abfd, arelent
       || (r >= R_SH_FIRST_INVALID_RELOC_5 && r <= R_SH_LAST_INVALID_RELOC_5)
       || (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6))
     {
-      (*_bfd_error_handler) (_("%B: unrecognised SH reloc number: %d"),
-			     abfd, r);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised SH reloc number: %d"),
+			  abfd, r);
       bfd_set_error (bfd_error_bad_value);
       r = R_SH_NONE;
     }
@@ -519,7 +520,7 @@ sh_elf_relax_section (bfd *abfd, asectio
 
   *again = FALSE;
 
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0)
     return TRUE;
@@ -575,9 +576,9 @@ sh_elf_relax_section (bfd *abfd, asectio
       laddr = irel->r_offset + 4 + irel->r_addend;
       if (laddr >= sec->size)
 	{
-	  (*_bfd_error_handler) (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
-				 abfd,
-				 (unsigned long) irel->r_offset);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
+			      abfd, (unsigned long) irel->r_offset);
 	  continue;
 	}
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -586,9 +587,10 @@ sh_elf_relax_section (bfd *abfd, asectio
 	 do.  */
       if ((insn & 0xf000) != 0xd000)
 	{
-	  ((*_bfd_error_handler)
-	   (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
-	    abfd, (unsigned long) irel->r_offset, insn));
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
+	     abfd, (unsigned long) irel->r_offset, insn);
 	  continue;
 	}
 
@@ -603,9 +605,10 @@ sh_elf_relax_section (bfd *abfd, asectio
       paddr += (laddr + 4) &~ (bfd_vma) 3;
       if (paddr >= sec->size)
 	{
-	  ((*_bfd_error_handler)
-	   (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
-	    abfd, (unsigned long) irel->r_offset));
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
+	     abfd, (unsigned long) irel->r_offset);
 	  continue;
 	}
 
@@ -618,9 +621,10 @@ sh_elf_relax_section (bfd *abfd, asectio
 	  break;
       if (irelfn >= irelend)
 	{
-	  ((*_bfd_error_handler)
-	   (_("%B: 0x%lx: warning: could not find expected reloc"),
-	    abfd, (unsigned long) paddr));
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: 0x%lx: warning: could not find expected reloc"),
+	     abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -646,9 +650,10 @@ sh_elf_relax_section (bfd *abfd, asectio
 	  if (isym->st_shndx
 	      != (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: warning: symbol in unexpected section"),
-		abfd, (unsigned long) paddr));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: warning: symbol in unexpected section"),
+		 abfd, (unsigned long) paddr);
 	      continue;
 	    }
 
@@ -775,9 +780,10 @@ sh_elf_relax_section (bfd *abfd, asectio
       /* Now check whether we got a COUNT reloc.  */
       if (irelcount >= irelend)
 	{
-	  ((*_bfd_error_handler)
-	   (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
-	    abfd, (unsigned long) paddr));
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
+	     abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -785,9 +791,9 @@ sh_elf_relax_section (bfd *abfd, asectio
 	 just deleted one.  */
       if (irelcount->r_addend == 0)
 	{
-	  ((*_bfd_error_handler) (_("%B: 0x%lx: warning: bad count"),
-				  abfd,
-				  (unsigned long) paddr));
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: 0x%lx: warning: bad count"),
+			      abfd, (unsigned long) paddr);
 	  continue;
 	}
 
@@ -1188,9 +1194,10 @@ sh_elf_relax_delete_bytes (bfd *abfd, as
 
 	  if (overflow)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-		abfd, (unsigned long) irel->r_offset));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+		 abfd, (unsigned long) irel->r_offset);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -1558,9 +1565,10 @@ sh_elf_swap_insns (bfd *abfd, asection *
 
 	  if (overflow)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-		abfd, (unsigned long) irel->r_offset));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+		 abfd, (unsigned long) irel->r_offset);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -2467,11 +2475,6 @@ struct elf_sh_link_hash_table
   struct elf_link_hash_table root;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
   asection *sfuncdesc;
@@ -2623,12 +2626,6 @@ create_got_section (bfd *dynobj, struct 
   if (htab == NULL)
     return FALSE;
 
-  htab->sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
-    abort ();
-
   htab->sfuncdesc = bfd_make_section_anyway_with_flags (dynobj, ".got.funcdesc",
 							(SEC_ALLOC | SEC_LOAD
 							 | SEC_HAS_CONTENTS
@@ -2710,7 +2707,7 @@ sh_elf_create_dynamic_sections (bfd *abf
     pltflags |= SEC_READONLY;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
-  htab->splt = s;
+  htab->root.splt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
     return FALSE;
@@ -2733,7 +2730,7 @@ sh_elf_create_dynamic_sections (bfd *abf
       h->type = STT_OBJECT;
       htab->root.hplt = h;
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && ! bfd_elf_link_record_dynamic_symbol (info, h))
 	return FALSE;
     }
@@ -2742,12 +2739,12 @@ sh_elf_create_dynamic_sections (bfd *abf
 					  bed->default_use_rela_p
 					  ? ".rela.plt" : ".rel.plt",
 					  flags | SEC_READONLY);
-  htab->srelplt = s;
+  htab->root.srelplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (htab->sgot == NULL
+  if (htab->root.sgot == NULL
       && !create_got_section (abfd, info))
     return FALSE;
 
@@ -2776,7 +2773,7 @@ sh_elf_create_dynamic_sections (bfd *abf
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -2871,7 +2868,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2978,10 +2975,10 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
-	  asection *s = htab->splt;
+	  asection *s = htab->root.splt;
 	  const struct elf_sh_plt_info *plt_info;
 
 	  /* If this is the first .plt entry, make room for the special
@@ -2998,7 +2995,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     the shared library.  Skip this for FDPIC, since the
 	     function's address will be the address of the canonical
 	     function descriptor.  */
-	  if (!htab->fdpic_p && !info->shared && !h->def_regular)
+	  if (!htab->fdpic_p && !bfd_link_pic (info) && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
 	      h->root.u.def.value = h->plt.offset;
@@ -3014,14 +3011,14 @@ allocate_dynrelocs (struct elf_link_hash
 	  /* We also need to make an entry in the .got.plt section, which
 	     will be placed in the .got section by the linker script.  */
 	  if (!htab->fdpic_p)
-	    htab->sgotplt->size += 4;
+	    htab->root.sgotplt->size += 4;
 	  else
-	    htab->sgotplt->size += 8;
+	    htab->root.sgotplt->size += 8;
 
 	  /* We also need to make an entry in the .rel.plt section.  */
-	  htab->srelplt->size += sizeof (Elf32_External_Rela);
+	  htab->root.srelplt->size += sizeof (Elf32_External_Rela);
 
-	  if (htab->vxworks_p && !info->shared)
+	  if (htab->vxworks_p && !bfd_link_pic (info))
 	    {
 	      /* VxWorks executables have a second set of relocations
 		 for each PLT entry.  They go in a separate relocation
@@ -3065,7 +3062,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      s = htab->sgot;
+      s = htab->root.sgot;
       h->got.offset = s->size;
       s->size += 4;
       /* R_SH_TLS_GD needs 2 consecutive GOT slots.  */
@@ -3075,34 +3072,38 @@ allocate_dynrelocs (struct elf_link_hash
       if (!dyn)
 	{
 	  /* No dynamic relocations required.  */
-	  if (htab->fdpic_p && !info->shared
+	  if (htab->fdpic_p && !bfd_link_pic (info)
 	      && h->root.type != bfd_link_hash_undefweak
 	      && (got_type == GOT_NORMAL || got_type == GOT_FUNCDESC))
 	    htab->srofixup->size += 4;
 	}
       /* No dynamic relocations required when IE->LE conversion happens.  */
-      else if (got_type == GOT_TLS_IE && !h->def_dynamic && !info->shared)
+      else if (got_type == GOT_TLS_IE
+	       && !h->def_dynamic
+	       && !bfd_link_pic (info))
 	;
       /* R_SH_TLS_IE_32 needs one dynamic relocation if dynamic,
 	 R_SH_TLS_GD needs one if local symbol and two if global.  */
       else if ((got_type == GOT_TLS_GD && h->dynindx == -1)
 	       || got_type == GOT_TLS_IE)
-	htab->srelgot->size += sizeof (Elf32_External_Rela);
+	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
       else if (got_type == GOT_TLS_GD)
-	htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
+	htab->root.srelgot->size += 2 * sizeof (Elf32_External_Rela);
       else if (got_type == GOT_FUNCDESC)
 	{
-	  if (!info->shared && SYMBOL_FUNCDESC_LOCAL (info, h))
+	  if (!bfd_link_pic (info) && SYMBOL_FUNCDESC_LOCAL (info, h))
 	    htab->srofixup->size += 4;
 	  else
-	    htab->srelgot->size += sizeof (Elf32_External_Rela);
+	    htab->root.srelgot->size += sizeof (Elf32_External_Rela);
 	}
       else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		|| h->root.type != bfd_link_hash_undefweak)
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
-	htab->srelgot->size += sizeof (Elf32_External_Rela);
-      else if (htab->fdpic_p && !info->shared && got_type == GOT_NORMAL
+	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
+      else if (htab->fdpic_p
+	       && !bfd_link_pic (info)
+	       && got_type == GOT_NORMAL
 	       && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak))
 	htab->srofixup->size += 4;
@@ -3125,12 +3126,12 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      s = htab->sgot;
+      s = htab->root.sgot;
       eh->datalabel_got.offset = s->size;
       s->size += 4;
       dyn = htab->root.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
-	htab->srelgot->size += sizeof (Elf32_External_Rela);
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
+	htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     eh->datalabel_got.offset = (bfd_vma) -1;
@@ -3146,10 +3147,10 @@ allocate_dynrelocs (struct elf_link_hash
 	  || (htab->root.dynamic_sections_created
 	      && ! SYMBOL_CALLS_LOCAL (info, h))))
     {
-      if (!info->shared && SYMBOL_FUNCDESC_LOCAL (info, h))
+      if (!bfd_link_pic (info) && SYMBOL_FUNCDESC_LOCAL (info, h))
 	htab->srofixup->size += eh->abs_funcdesc_refcount * 4;
       else
-	htab->srelgot->size
+	htab->root.srelgot->size
 	  += eh->abs_funcdesc_refcount * sizeof (Elf32_External_Rela);
     }
 
@@ -3170,7 +3171,7 @@ allocate_dynrelocs (struct elf_link_hash
 
       /* We will need a relocation or two fixups to initialize the
 	 function descriptor, so allocate those too.  */
-      if (!info->shared && SYMBOL_CALLS_LOCAL (info, h))
+      if (!bfd_link_pic (info) && SYMBOL_CALLS_LOCAL (info, h))
 	htab->srofixup->size += 8;
       else
 	htab->srelfuncdesc->size += sizeof (Elf32_External_Rela);
@@ -3185,7 +3186,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -3273,7 +3274,7 @@ allocate_dynrelocs (struct elf_link_hash
       sreloc->size += p->count * sizeof (Elf32_External_Rela);
 
       /* If we need relocations, we do not need fixups.  */
-      if (htab->fdpic_p && !info->shared)
+      if (htab->fdpic_p && !bfd_link_pic (info))
 	htab->srofixup->size -= 4 * (p->count - p->pc_count);
     }
 
@@ -3313,9 +3314,10 @@ readonly_dynrelocs (struct elf_link_hash
 static bfd_boolean
 sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
-  sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd, info->shared);
+  sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd,
+						     bfd_link_pic (info));
 
-  if (sh_elf_hash_table (info)->fdpic_p && !info->relocatable
+  if (sh_elf_hash_table (info)->fdpic_p && !bfd_link_relocatable (info)
       && !bfd_elf_stack_segment_size (output_bfd, info,
 				      "__stacksize", DEFAULT_STACK_SIZE))
     return FALSE;
@@ -3344,7 +3346,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -3400,7 +3402,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
 		    info->flags |= DF_TEXTREL;
 
 		  /* If we need relocations, we do not need fixups.  */
-		  if (htab->fdpic_p && !info->shared)
+		  if (htab->fdpic_p && !bfd_link_pic (info))
 		    htab->srofixup->size -= 4 * (p->count - p->pc_count);
 		}
 	    }
@@ -3412,8 +3414,8 @@ sh_elf_size_dynamic_sections (bfd *outpu
       /* Count datalabel local GOT.  */
       locsymcount *= 2;
 #endif
-      s = htab->sgot;
-      srel = htab->srelgot;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
 
       local_got = elf_local_got_refcounts (ibfd);
       if (local_got)
@@ -3429,7 +3431,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
 		  s->size += 4;
 		  if (*local_got_type == GOT_TLS_GD)
 		    s->size += 4;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srel->size += sizeof (Elf32_External_Rela);
 		  else
 		    htab->srofixup->size += 4;
@@ -3470,7 +3472,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
 		{
 		  local_funcdesc->offset = htab->sfuncdesc->size;
 		  htab->sfuncdesc->size += 8;
-		  if (!info->shared)
+		  if (!bfd_link_pic (info))
 		    htab->srofixup->size += 8;
 		  else
 		    htab->srelfuncdesc->size += sizeof (Elf32_External_Rela);
@@ -3486,9 +3488,9 @@ sh_elf_size_dynamic_sections (bfd *outpu
     {
       /* Allocate 2 got entries and 1 dynamic reloc for R_SH_TLS_LD_32
 	 relocs.  */
-      htab->tls_ldm_got.offset = htab->sgot->size;
-      htab->sgot->size += 8;
-      htab->srelgot->size += sizeof (Elf32_External_Rela);
+      htab->tls_ldm_got.offset = htab->root.sgot->size;
+      htab->root.sgot->size += 8;
+      htab->root.srelgot->size += sizeof (Elf32_External_Rela);
     }
   else
     htab->tls_ldm_got.offset = -1;
@@ -3497,8 +3499,8 @@ sh_elf_size_dynamic_sections (bfd *outpu
      the end of .got.plt.  */
   if (htab->fdpic_p)
     {
-      BFD_ASSERT (htab->sgotplt && htab->sgotplt->size == 12);
-      htab->sgotplt->size = 0;
+      BFD_ASSERT (htab->root.sgotplt && htab->root.sgotplt->size == 12);
+      htab->root.sgotplt->size = 0;
     }
 
   /* Allocate global sym .plt and .got entries, and space for global
@@ -3509,8 +3511,8 @@ sh_elf_size_dynamic_sections (bfd *outpu
      end of the FDPIC .got.plt.  */
   if (htab->fdpic_p)
     {
-      htab->root.hgot->root.u.def.value = htab->sgotplt->size;
-      htab->sgotplt->size += 12;
+      htab->root.hgot->root.u.def.value = htab->root.sgotplt->size;
+      htab->root.sgotplt->size += 12;
     }
 
   /* At the very end of the .rofixup section is a pointer to the GOT.  */
@@ -3525,9 +3527,9 @@ sh_elf_size_dynamic_sections (bfd *outpu
       if ((s->flags & SEC_LINKER_CREATED) == 0)
 	continue;
 
-      if (s == htab->splt
-	  || s == htab->sgot
-	  || s == htab->sgotplt
+      if (s == htab->root.splt
+	  || s == htab->root.sgot
+	  || s == htab->root.sgotplt
 	  || s == htab->sfuncdesc
 	  || s == htab->srofixup
 	  || s == htab->sdynbss)
@@ -3537,7 +3539,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
 	}
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
 	{
-	  if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
+	  if (s->size != 0 && s != htab->root.srelplt && s != htab->srelplt2)
 	    relocs = TRUE;
 
 	  /* We use the reloc_count field as a counter if we need
@@ -3589,13 +3591,13 @@ sh_elf_size_dynamic_sections (bfd *outpu
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (! add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
 	}
 
-      if (htab->splt->size != 0)
+      if (htab->root.splt->size != 0)
 	{
 	  if (! add_dynamic_entry (DT_PLTGOT, 0)
 	      || ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -3603,8 +3605,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
 	      || ! add_dynamic_entry (DT_JMPREL, 0))
 	    return FALSE;
 	}
-      else if ((elf_elfheader (output_bfd)->e_flags & EF_SH_FDPIC)
-	       && htab->sgot->size != 0)
+      else if ((elf_elfheader (output_bfd)->e_flags & EF_SH_FDPIC))
 	{
 	  if (! add_dynamic_entry (DT_PLTGOT, 0))
 	    return FALSE;
@@ -3678,7 +3679,7 @@ sh_elf_add_rofixup (bfd *output_bfd, ase
 static bfd_signed_vma
 sh_elf_got_offset (struct elf_sh_link_hash_table *htab)
 {
-  return (htab->sgot->output_offset - htab->sgotplt->output_offset
+  return (htab->root.sgot->output_offset - htab->root.sgotplt->output_offset
 	  - htab->root.hgot->root.u.def.value);
 }
 
@@ -3749,7 +3750,7 @@ sh_elf_initialize_funcdesc (bfd *output_
       addr = seg = 0;
     }
 
-  if (!info->shared && SYMBOL_CALLS_LOCAL (info, h))
+  if (!bfd_link_pic (info) && SYMBOL_CALLS_LOCAL (info, h))
     {
       if (h == NULL || h->root.type != bfd_link_hash_undefweak)
 	{
@@ -3825,7 +3826,6 @@ sh_elf_relocate_section (bfd *output_bfd
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
-  bfd *dynobj = NULL;
   bfd_vma *local_got_offsets;
   asection *sgot = NULL;
   asection *sgotplt = NULL;
@@ -3841,10 +3841,10 @@ sh_elf_relocate_section (bfd *output_bfd
   htab = sh_elf_hash_table (info);
   if (htab != NULL)
     {
-      dynobj = htab->root.dynobj;
-      sgot = htab->sgot;
-      sgotplt = htab->sgotplt;
-      splt = htab->splt;
+      sgot = htab->root.sgot;
+      sgotplt = htab->root.sgotplt;
+      srelgot = htab->root.srelgot;
+      splt = htab->root.splt;
       fdpic_p = htab->fdpic_p;
     }
   symtab_hdr = &elf_symtab_hdr (input_bfd);
@@ -3866,7 +3866,7 @@ sh_elf_relocate_section (bfd *output_bfd
 
   /* We have to handle relocations in vxworks .tls_vars sections
      specially, because the dynamic loader is 'weird'.  */
-  is_vxworks_tls = (htab && htab->vxworks_p && info->shared
+  is_vxworks_tls = (htab && htab->vxworks_p && bfd_link_pic (info)
 		    && !strcmp (input_section->output_section->name,
 				".tls_vars"));
 
@@ -3948,15 +3948,15 @@ sh_elf_relocate_section (bfd *output_bfd
 	     datalabel processing here.  Make sure this does not change
 	     without notice.  */
 	  if ((sym->st_other & STO_SH5_ISA32) != 0)
-	    ((*info->callbacks->reloc_dangerous)
-	     (info,
-	      _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
-	      input_bfd, input_section, rel->r_offset));
+	    (*info->callbacks->reloc_dangerous)
+	      (info,
+	       _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
+	       input_bfd, input_section, rel->r_offset);
 
 	  if (sec != NULL && discarded_section (sec))
 	    /* Handled below.  */
 	    ;
-	  else if (info->relocatable)
+	  else if (bfd_link_relocatable (info))
 	    {
 	      /* This is a relocatable link.  We don't have to change
 		 anything, unless the reloc is against a section symbol,
@@ -4004,7 +4004,8 @@ sh_elf_relocate_section (bfd *output_bfd
 
 	      if (howto->rightshift || howto->src_mask != 0xffffffff)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
 		     input_bfd, input_section,
 		     (long) rel->r_offset, howto->name);
@@ -4071,8 +4072,10 @@ sh_elf_relocate_section (bfd *output_bfd
 		       || r_type == R_SH_GOT_MEDLOW16
 		       || r_type == R_SH_GOT_MEDHI16
 		       || r_type == R_SH_GOT_HI16)
-		      && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		      && (! info->shared
+		      && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							  bfd_link_pic (info),
+							  h)
+		      && (! bfd_link_pic (info)
 			  || (! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular))
 		  /* The cases above are those in which relocation is
@@ -4080,7 +4083,7 @@ sh_elf_relocate_section (bfd *output_bfd
 		     below are those in which we must defer relocation
 		     to run-time, because we can't resolve absolute
 		     addresses when creating a shared library.  */
-		  || (info->shared
+		  || (bfd_link_pic (info)
 		      && ((! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular)
 		      && ((r_type == R_SH_DIR32
@@ -4113,13 +4116,14 @@ sh_elf_relocate_section (bfd *output_bfd
 				 STT_DATALABEL on the way to it.  */
 			      | ((h->other & STO_SH5_ISA32) != 0
 				 && ! seen_stt_datalabel));
-	      else if (!info->relocatable
+	      else if (!bfd_link_relocatable (info)
 		       && (_bfd_elf_section_offset (output_bfd, info,
 						    input_section,
 						    rel->r_offset)
 			   != (bfd_vma) -1))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 		     input_bfd,
 		     input_section,
@@ -4134,22 +4138,19 @@ sh_elf_relocate_section (bfd *output_bfd
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable)
-	    {
-	      if (! info->callbacks->undefined_symbol
-		  (info, h->root.root.string, input_bfd,
-		   input_section, rel->r_offset,
-		   (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-		    || ELF_ST_VISIBILITY (h->other))))
-		return FALSE;
-	    }
+	  else if (!bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd,
+	       input_section, rel->r_offset,
+	       (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+		|| ELF_ST_VISIBILITY (h->other)));
 	}
 
       if (sec != NULL && discarded_section (sec))
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Check for inter-segment relocations in FDPIC files.  Most
@@ -4200,10 +4201,11 @@ sh_elf_relocate_section (bfd *output_bfd
 		}
 	      if (disp & mask)
 		{
-		  ((*_bfd_error_handler)
-		   (_("%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
-		    input_section->owner,
-		    (unsigned long) rel->r_offset));
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
+		     input_section->owner,
+		     (unsigned long) rel->r_offset);
 		  bfd_set_error (bfd_error_bad_value);
 		  return FALSE;
 		}
@@ -4233,11 +4235,12 @@ sh_elf_relocate_section (bfd *output_bfd
 	case R_SH_DIR4UL:
 	  if (relocation & 3)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
-		input_section->owner,
-		(unsigned long) rel->r_offset, howto->name,
-		(unsigned long) relocation));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+		 input_section->owner,
+		 (unsigned long) rel->r_offset, howto->name,
+		 (unsigned long) relocation);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -4248,11 +4251,12 @@ sh_elf_relocate_section (bfd *output_bfd
 	case R_SH_DIR4UW:
 	  if (relocation & 1)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
-		input_section->owner,
-		(unsigned long) rel->r_offset, howto->name,
-		(unsigned long) relocation));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+		 input_section->owner,
+		 (unsigned long) rel->r_offset, howto->name,
+		 (unsigned long) relocation);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -4262,11 +4266,12 @@ sh_elf_relocate_section (bfd *output_bfd
 	  if ((signed int)relocation < -32
 	      || (signed int)relocation > 32)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"),
-		input_section->owner,
-		(unsigned long) rel->r_offset,
-		(unsigned long) relocation));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"),
+		 input_section->owner,
+		 (unsigned long) rel->r_offset,
+		 (unsigned long) relocation);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -4276,11 +4281,12 @@ sh_elf_relocate_section (bfd *output_bfd
 	  if ((signed int)relocation < -16
 	      || (signed int)relocation > 16)
 	    {
-	      ((*_bfd_error_handler)
-	       (_("%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"),
-		input_section->owner,
-		(unsigned long) rel->r_offset,
-		(unsigned long) relocation));
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"),
+		 input_section->owner,
+		 (unsigned long) rel->r_offset,
+		 (unsigned long) relocation);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -4294,7 +4300,7 @@ sh_elf_relocate_section (bfd *output_bfd
 	case R_SH_IMM_MEDHI16_PCREL:
 	case R_SH_IMM_HI16_PCREL:
 #endif
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (h == NULL
 		  || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		  || h->root.type != bfd_link_hash_undefweak)
@@ -4409,7 +4415,7 @@ sh_elf_relocate_section (bfd *output_bfd
 	      if (! relocate)
 		continue;
 	    }
-	  else if (fdpic_p && !info->shared
+	  else if (fdpic_p && !bfd_link_pic (info)
 		   && r_type == R_SH_DIR32
 		   && (input_section->flags & SEC_ALLOC) != 0)
 	    {
@@ -4420,7 +4426,8 @@ sh_elf_relocate_section (bfd *output_bfd
 		if (sh_elf_osec_readonly_p (output_bfd,
 					    input_section->output_section))
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"),
 		       input_bfd,
 		       input_section,
@@ -4443,7 +4450,7 @@ sh_elf_relocate_section (bfd *output_bfd
 	       symbols.  */
 	    else if (r_type == R_SH_REL32
 		     && h
-		     && h->root.type == bfd_link_hash_undefweak) 
+		     && h->root.type == bfd_link_hash_undefweak)
 	      check_segment[0] = check_segment[1] = -1;
 	  goto final_link_relocate;
 
@@ -4461,7 +4468,7 @@ sh_elf_relocate_section (bfd *output_bfd
 
 	  if (h == NULL
 	      || h->forced_local
-	      || ! info->shared
+	      || ! bfd_link_pic (info)
 	      || info->symbolic
 	      || h->dynindx == -1
 	      || h->plt.offset == (bfd_vma) -1
@@ -4518,8 +4525,10 @@ sh_elf_relocate_section (bfd *output_bfd
 	      BFD_ASSERT (off != (bfd_vma) -1);
 
 	      dyn = htab->root.dynamic_sections_created;
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h))
 		  || (ELF_ST_VISIBILITY (h->other)
 		      && h->root.type == bfd_link_hash_undefweak))
@@ -4556,7 +4565,7 @@ sh_elf_relocate_section (bfd *output_bfd
 
 		      /* If we initialize the GOT entry here with a valid
 			 symbol address, also add a fixup.  */
-		      if (fdpic_p && !info->shared
+		      if (fdpic_p && !bfd_link_pic (info)
 			  && sh_elf_hash_entry (h)->got_type == GOT_NORMAL
 			  && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 			      || h->root.type != bfd_link_hash_undefweak))
@@ -4602,18 +4611,11 @@ sh_elf_relocate_section (bfd *output_bfd
 		{
 		  bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      Elf_Internal_Rela outrel;
 		      bfd_byte *loc;
 
-		      if (srelgot == NULL)
-			{
-			  srelgot = bfd_get_linker_section (dynobj,
-							    ".rela.got");
-			  BFD_ASSERT (srelgot != NULL);
-			}
-
 		      outrel.r_offset = (sgot->output_section->vma
 					 + sgot->output_offset
 					 + off);
@@ -4889,14 +4891,15 @@ sh_elf_relocate_section (bfd *output_bfd
 		relocation = htab->sfuncdesc->output_offset + (offset & ~1);
 	      }
 
-	    if (!info->shared && SYMBOL_FUNCDESC_LOCAL (info, h))
+	    if (!bfd_link_pic (info) && SYMBOL_FUNCDESC_LOCAL (info, h))
 	      {
 		bfd_vma offset;
 
 		if (sh_elf_osec_readonly_p (output_bfd,
 					    reloc_section->output_section))
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"),
 		       input_bfd,
 		       input_section,
@@ -4929,12 +4932,6 @@ sh_elf_relocate_section (bfd *output_bfd
 		    return FALSE;
 		  }
 
-		if (srelgot == NULL)
-		  {
-		    srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-		    BFD_ASSERT (srelgot != NULL);
-		  }
-
 		offset = _bfd_elf_section_offset (output_bfd, info,
 						  reloc_section, reloc_offset);
 
@@ -5004,6 +5001,7 @@ sh_elf_relocate_section (bfd *output_bfd
 		    || !SYMBOL_FUNCDESC_LOCAL (info, h)))
 	    {
 	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): %s relocation against external symbol \"%s\""),
 		 input_bfd, input_section, (long) rel->r_offset, howto->name,
 		 h->root.root.string);
@@ -5092,7 +5090,7 @@ sh_elf_relocate_section (bfd *output_bfd
 	  else if (h != NULL)
 	    {
 	      got_type = sh_elf_hash_entry (h)->got_type;
-	      if (! info->shared
+	      if (! bfd_link_pic (info)
 		  && (h->dynindx == -1
 		      || h->def_regular))
 		r_type = R_SH_TLS_LE_32;
@@ -5219,12 +5217,6 @@ sh_elf_relocate_section (bfd *output_bfd
 	      bfd_byte *loc;
 	      int dr_type, indx;
 
-	      if (srelgot == NULL)
-		{
-		  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-		  BFD_ASSERT (srelgot != NULL);
-		}
-
 	      outrel.r_offset = (sgot->output_section->vma
 				 + sgot->output_offset + off);
 
@@ -5336,7 +5328,7 @@ sh_elf_relocate_section (bfd *output_bfd
 	case R_SH_TLS_LD_32:
 	  BFD_ASSERT (htab);
 	  check_segment[0] = check_segment[1] = -1;
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    {
 	      bfd_vma offset;
 	      unsigned short insn;
@@ -5394,10 +5386,6 @@ sh_elf_relocate_section (bfd *output_bfd
 	      Elf_Internal_Rela outrel;
 	      bfd_byte *loc;
 
-	      srelgot = htab->srelgot;
-	      if (srelgot == NULL)
-		abort ();
-
 	      outrel.r_offset = (sgot->output_section->vma
 				 + sgot->output_offset + off);
 	      outrel.r_addend = 0;
@@ -5415,7 +5403,7 @@ sh_elf_relocate_section (bfd *output_bfd
 
 	case R_SH_TLS_LDO_32:
 	  check_segment[0] = check_segment[1] = -1;
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    relocation = tpoff (info, relocation);
 	  else
 	    relocation -= dtpoff_base (info);
@@ -5431,7 +5419,7 @@ sh_elf_relocate_section (bfd *output_bfd
 
 	    check_segment[0] = check_segment[1] = -1;
 
-	    if (! info->shared || info->pie)
+	    if (!bfd_link_dll (info))
 	      {
 		relocation = tpoff (info, relocation);
 		addend = rel->r_addend;
@@ -5474,20 +5462,22 @@ sh_elf_relocate_section (bfd *output_bfd
 	  /* We don't want duplicate errors for undefined symbols.  */
 	  if (!h || h->root.type != bfd_link_hash_undefined)
 	    {
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  info->callbacks->einfo
+		    /* xgettext:c-format */
 		    (_("%X%C: relocation to \"%s\" references a different segment\n"),
 		     input_bfd, input_section, rel->r_offset, symname);
 		  return FALSE;
 		}
 	      else
 		info->callbacks->einfo
+		  /* xgettext:c-format */
 		  (_("%C: warning: relocation to \"%s\" references a different segment\n"),
 		   input_bfd, input_section, rel->r_offset, symname);
 	    }
 
-	  elf_elfheader (output_bfd)->e_flags &= ~EF_SH_PIC;
+	  elf_elfheader (output_bfd)->e_flags |= EF_SH_PIC;
 	}
 
       if (r != bfd_reloc_ok)
@@ -5512,11 +5502,9 @@ sh_elf_relocate_section (bfd *output_bfd
 		    if (*name == '\0')
 		      name = bfd_section_name (input_bfd, sec);
 		  }
-		if (! ((*info->callbacks->reloc_overflow)
-		       (info, (h ? &h->root : NULL), name, howto->name,
-			(bfd_vma) 0, input_bfd, input_section,
-			rel->r_offset)))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      }
 	      break;
 	    }
@@ -5679,220 +5667,6 @@ sh_elf_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
-/* Update the got entry reference counts for the section being removed.  */
-
-static bfd_boolean
-sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
-		      asection *sec, const Elf_Internal_Rela *relocs)
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  bfd_signed_vma *local_got_refcounts;
-  union gotref *local_funcdesc;
-  const Elf_Internal_Rela *rel, *relend;
-
-  if (info->relocatable)
-    return TRUE;
-
-  elf_section_data (sec)->local_dynrel = NULL;
-
-  symtab_hdr = &elf_symtab_hdr (abfd);
-  sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (abfd);
-  local_funcdesc = sh_elf_local_funcdesc (abfd);
-
-  relend = relocs + sec->reloc_count;
-  for (rel = relocs; rel < relend; rel++)
-    {
-      unsigned long r_symndx;
-      unsigned int r_type;
-      struct elf_link_hash_entry *h = NULL;
-#ifdef INCLUDE_SHMEDIA
-      int seen_stt_datalabel = 0;
-#endif
-
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx >= symtab_hdr->sh_info)
-	{
-	  struct elf_sh_link_hash_entry *eh;
-	  struct elf_sh_dyn_relocs **pp;
-	  struct elf_sh_dyn_relocs *p;
-
-	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    {
-#ifdef INCLUDE_SHMEDIA
-	      seen_stt_datalabel |= h->type == STT_DATALABEL;
-#endif
-	      h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	    }
-	  eh = (struct elf_sh_link_hash_entry *) h;
-	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
-	    if (p->sec == sec)
-	      {
-		/* Everything must go for SEC.  */
-		*pp = p->next;
-		break;
-	      }
-	}
-
-      r_type = ELF32_R_TYPE (rel->r_info);
-      switch (sh_elf_optimized_tls_reloc (info, r_type, h != NULL))
-	{
-	case R_SH_TLS_LD_32:
-	  if (sh_elf_hash_table (info)->tls_ldm_got.refcount > 0)
-	    sh_elf_hash_table (info)->tls_ldm_got.refcount -= 1;
-	  break;
-
-	case R_SH_GOT32:
-	case R_SH_GOT20:
-	case R_SH_GOTOFF:
-	case R_SH_GOTOFF20:
-	case R_SH_GOTPC:
-#ifdef INCLUDE_SHMEDIA
-	case R_SH_GOT_LOW16:
-	case R_SH_GOT_MEDLOW16:
-	case R_SH_GOT_MEDHI16:
-	case R_SH_GOT_HI16:
-	case R_SH_GOT10BY4:
-	case R_SH_GOT10BY8:
-	case R_SH_GOTOFF_LOW16:
-	case R_SH_GOTOFF_MEDLOW16:
-	case R_SH_GOTOFF_MEDHI16:
-	case R_SH_GOTOFF_HI16:
-	case R_SH_GOTPC_LOW16:
-	case R_SH_GOTPC_MEDLOW16:
-	case R_SH_GOTPC_MEDHI16:
-	case R_SH_GOTPC_HI16:
-#endif
-	case R_SH_TLS_GD_32:
-	case R_SH_TLS_IE_32:
-	case R_SH_GOTFUNCDESC:
-	case R_SH_GOTFUNCDESC20:
-	  if (h != NULL)
-	    {
-#ifdef INCLUDE_SHMEDIA
-	      if (seen_stt_datalabel)
-		{
-		  struct elf_sh_link_hash_entry *eh;
-		  eh = (struct elf_sh_link_hash_entry *) h;
-		  if (eh->datalabel_got.refcount > 0)
-		    eh->datalabel_got.refcount -= 1;
-		}
-	      else
-#endif
-		if (h->got.refcount > 0)
-		  h->got.refcount -= 1;
-	    }
-	  else if (local_got_refcounts != NULL)
-	    {
-#ifdef INCLUDE_SHMEDIA
-	      if (rel->r_addend & 1)
-		{
-		  if (local_got_refcounts[symtab_hdr->sh_info + r_symndx] > 0)
-		    local_got_refcounts[symtab_hdr->sh_info + r_symndx] -= 1;
-		}
-	      else
-#endif
-		if (local_got_refcounts[r_symndx] > 0)
-		  local_got_refcounts[r_symndx] -= 1;
-	    }
-	  break;
-
-	case R_SH_FUNCDESC:
-	  if (h != NULL)
-	    sh_elf_hash_entry (h)->abs_funcdesc_refcount -= 1;
-	  else if (sh_elf_hash_table (info)->fdpic_p && !info->shared)
-	    sh_elf_hash_table (info)->srofixup->size -= 4;
-
-	  /* Fall through.  */
-
-	case R_SH_GOTOFFFUNCDESC:
-	case R_SH_GOTOFFFUNCDESC20:
-	  if (h != NULL)
-	    sh_elf_hash_entry (h)->funcdesc.refcount -= 1;
-	  else
-	    local_funcdesc[r_symndx].refcount -= 1;
-	  break;
-
-	case R_SH_DIR32:
-	  if (sh_elf_hash_table (info)->fdpic_p && !info->shared
-	      && (sec->flags & SEC_ALLOC) != 0)
-	    sh_elf_hash_table (info)->srofixup->size -= 4;
-	  /* Fall thru */
-
-	case R_SH_REL32:
-	  if (info->shared)
-	    break;
-	  /* Fall thru */
-
-	case R_SH_PLT32:
-#ifdef INCLUDE_SHMEDIA
-	case R_SH_PLT_LOW16:
-	case R_SH_PLT_MEDLOW16:
-	case R_SH_PLT_MEDHI16:
-	case R_SH_PLT_HI16:
-#endif
-	  if (h != NULL)
-	    {
-	      if (h->plt.refcount > 0)
-		h->plt.refcount -= 1;
-	    }
-	  break;
-
-	case R_SH_GOTPLT32:
-#ifdef INCLUDE_SHMEDIA
-	case R_SH_GOTPLT_LOW16:
-	case R_SH_GOTPLT_MEDLOW16:
-	case R_SH_GOTPLT_MEDHI16:
-	case R_SH_GOTPLT_HI16:
-	case R_SH_GOTPLT10BY4:
-	case R_SH_GOTPLT10BY8:
-#endif
-	  if (h != NULL)
-	    {
-	      struct elf_sh_link_hash_entry *eh;
-	      eh = (struct elf_sh_link_hash_entry *) h;
-	      if (eh->gotplt_refcount > 0)
-		{
-		  eh->gotplt_refcount -= 1;
-		  if (h->plt.refcount > 0)
-		    h->plt.refcount -= 1;
-		}
-#ifdef INCLUDE_SHMEDIA
-	      else if (seen_stt_datalabel)
-		{
-		  if (eh->datalabel_got.refcount > 0)
-		    eh->datalabel_got.refcount -= 1;
-		}
-#endif
-	      else if (h->got.refcount > 0)
-		h->got.refcount -= 1;
-	    }
-	  else if (local_got_refcounts != NULL)
-	    {
-#ifdef INCLUDE_SHMEDIA
-	      if (rel->r_addend & 1)
-		{
-		  if (local_got_refcounts[symtab_hdr->sh_info + r_symndx] > 0)
-		    local_got_refcounts[symtab_hdr->sh_info + r_symndx] -= 1;
-		}
-	      else
-#endif
-		if (local_got_refcounts[r_symndx] > 0)
-		  local_got_refcounts[r_symndx] -= 1;
-	    }
-	  break;
-
-	default:
-	  break;
-	}
-    }
-
-  return TRUE;
-}
-
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
@@ -5959,7 +5733,8 @@ sh_elf_copy_indirect_symbol (struct bfd_
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      dir->ref_dynamic |= ind->ref_dynamic;
+      if (dir->versioned != versioned_hidden)
+	dir->ref_dynamic |= ind->ref_dynamic;
       dir->ref_regular |= ind->ref_regular;
       dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
       dir->needs_plt |= ind->needs_plt;
@@ -5972,7 +5747,7 @@ static int
 sh_elf_optimized_tls_reloc (struct bfd_link_info *info, int r_type,
 			    int is_local)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   switch (r_type)
@@ -6008,7 +5783,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 
   sreloc = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_sh_elf (abfd));
@@ -6052,7 +5827,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	}
 
       r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL);
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && r_type == R_SH_TLS_IE_32
 	  && h != NULL
 	  && h->root.type != bfd_link_hash_undefined
@@ -6086,7 +5861,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	  }
 
       /* Some relocs require a global offset table.  */
-      if (htab->sgot == NULL)
+      if (htab->root.sgot == NULL)
 	{
 	  switch (r_type)
 	    {
@@ -6094,6 +5869,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	      /* This may require an rofixup.  */
 	      if (!htab->fdpic_p)
 		break;
+	      /* Fall through.  */
 	    case R_SH_GOTPLT32:
 	    case R_SH_GOT32:
 	    case R_SH_GOT20:
@@ -6160,7 +5936,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	  break;
 
 	case R_SH_TLS_IE_32:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 
 	  /* FALLTHROUGH */
@@ -6264,18 +6040,21 @@ sh_elf_check_relocs (bfd *abfd, struct b
 		{
 		  if ((old_got_type == GOT_FUNCDESC || got_type == GOT_FUNCDESC)
 		      && (old_got_type == GOT_NORMAL || got_type == GOT_NORMAL))
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as normal and FDPIC symbol"),
 		       abfd, h->root.root.string);
 		  else if (old_got_type == GOT_FUNCDESC
 			   || got_type == GOT_FUNCDESC)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as FDPIC and thread local symbol"),
 		       abfd, h->root.root.string);
 		  else
-		    (*_bfd_error_handler)
-		    (_("%B: `%s' accessed both as normal and thread local symbol"),
-		     abfd, h->root.root.string);
+		    _bfd_error_handler
+		      /* xgettext:c-format */
+		      (_("%B: `%s' accessed both as normal and thread local symbol"),
+		       abfd, h->root.root.string);
 		  return FALSE;
 		}
 	    }
@@ -6299,7 +6078,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	case R_SH_GOTOFFFUNCDESC20:
 	  if (rel->r_addend)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: Function descriptor relocation with non-zero addend"),
 		 abfd);
 	      return FALSE;
@@ -6329,10 +6108,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
 
 	      if (r_type == R_SH_FUNCDESC)
 		{
-		  if (!info->shared)
+		  if (!bfd_link_pic (info))
 		    htab->srofixup->size += 4;
 		  else
-		    htab->srelgot->size += sizeof (Elf32_External_Rela);
+		    htab->root.srelgot->size += sizeof (Elf32_External_Rela);
 		}
 	    }
 	  else
@@ -6347,11 +6126,13 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	      if (old_got_type != GOT_FUNCDESC && old_got_type != GOT_UNKNOWN)
 		{
 		  if (old_got_type == GOT_NORMAL)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as normal and FDPIC symbol"),
 		       abfd, h->root.root.string);
 		  else
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as FDPIC and thread local symbol"),
 		       abfd, h->root.root.string);
 		}
@@ -6372,7 +6153,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 
 	  if (h == NULL
 	      || h->forced_local
-	      || ! info->shared
+	      || ! bfd_link_pic (info)
 	      || info->symbolic
 	      || h->dynindx == -1)
 	    goto force_got;
@@ -6417,7 +6198,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	case R_SH_IMM_MEDHI16_PCREL:
 	case R_SH_IMM_HI16_PCREL:
 #endif
-	  if (h != NULL && ! info->shared)
+	  if (h != NULL && ! bfd_link_pic (info))
 	    {
 	      h->non_got_ref = 1;
 	      h->plt.refcount += 1;
@@ -6442,14 +6223,14 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (r_type != R_SH_REL32
 		   || (h != NULL
 		       && (! info->symbolic
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
-	      || (! info->shared
+	      || (! bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -6526,16 +6307,16 @@ sh_elf_check_relocs (bfd *abfd, struct b
 	  /* Allocate the fixup regardless of whether we need a relocation.
 	     If we end up generating the relocation, we'll unallocate the
 	     fixup.  */
-	  if (htab->fdpic_p && !info->shared
+	  if (htab->fdpic_p && !bfd_link_pic (info)
 	      && r_type == R_SH_DIR32
 	      && (sec->flags & SEC_ALLOC) != 0)
 	    htab->srofixup->size += 4;
 	  break;
 
 	case R_SH_TLS_LE_32:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: TLS local exec code cannot be linked into shared objects"),
 		 abfd);
 	      return FALSE;
@@ -6626,13 +6407,64 @@ sh_find_elf_flags (unsigned int arch_set
   return sh_elf_get_flags_from_mach (bfd_mach);
 }
 
+/* Merge the architecture type of two BFD files, such that the
+   resultant architecture supports all the features required
+   by the two input BFDs.
+   If the input BFDs are multually incompatible - i.e. one uses
+   DSP while the other uses FPU - or there is no known architecture
+   that fits the requirements then an error is emitted.  */
+
+static bfd_boolean
+sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info)
+{
+  bfd *obfd = info->output_bfd;
+  unsigned int old_arch, new_arch, merged_arch;
+
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
+    return FALSE;
+
+  old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd));
+  new_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (ibfd));
+
+  merged_arch = SH_MERGE_ARCH_SET (old_arch, new_arch);
+
+  if (!SH_VALID_CO_ARCH_SET (merged_arch))
+    {
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: uses %s instructions while previous modules "
+	   "use %s instructions"),
+	 ibfd,
+	 SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point",
+	 SH_ARCH_SET_HAS_DSP (new_arch) ? "floating point" : "dsp");
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+  else if (!SH_VALID_ARCH_SET (merged_arch))
+    {
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("internal error: merge of architecture '%s' with "
+	   "architecture '%s' produced unknown architecture"),
+	 bfd_printable_name (obfd),
+	 bfd_printable_name (ibfd));
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+
+  bfd_default_set_arch_mach (obfd, bfd_arch_sh,
+			     sh_get_bfd_mach_from_arch_set (merged_arch));
+
+  return TRUE;
+}
+
 /* This routine initialises the elf flags when required and
    calls sh_merge_bfd_arch() to check dsp/fpu compatibility.  */
 
 static bfd_boolean
-sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
+sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
 {
-  extern bfd_boolean sh_merge_bfd_arch (bfd *, bfd *);
+  bfd *obfd = info->output_bfd;
 
   if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd))
     return TRUE;
@@ -6644,13 +6476,13 @@ sh_elf_merge_private_data (bfd *ibfd, bf
       elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
       sh_elf_set_mach_from_flags (obfd);
       if (elf_elfheader (obfd)->e_flags & EF_SH_FDPIC)
-	elf_elfheader (obfd)->e_flags |= EF_SH_PIC;
+	elf_elfheader (obfd)->e_flags &= ~EF_SH_PIC;
     }
 
-  if (! sh_merge_bfd_arch (ibfd, obfd))
+  if (! sh_merge_bfd_arch (ibfd, info))
     {
-      _bfd_error_handler ("%B: uses instructions which are incompatible "
-			  "with instructions used in previous modules",
+      _bfd_error_handler (_("%B: uses instructions which are incompatible "
+			    "with instructions used in previous modules"),
 			  ibfd);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
@@ -6662,7 +6494,7 @@ sh_elf_merge_private_data (bfd *ibfd, bf
 
   if (fdpic_object_p (ibfd) != fdpic_object_p (obfd))
     {
-      _bfd_error_handler ("%B: attempt to mix FDPIC and non-FDPIC objects",
+      _bfd_error_handler (_("%B: attempt to mix FDPIC and non-FDPIC objects"),
 			  ibfd);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
@@ -6717,9 +6549,9 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = htab->splt;
-      sgotplt = htab->sgotplt;
-      srelplt = htab->srelplt;
+      splt = htab->root.splt;
+      sgotplt = htab->root.sgotplt;
+      srelplt = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgotplt != NULL && srelplt != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -6745,7 +6577,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 	got_offset = (plt_index + 3) * 4;
 
 #ifdef GOT_BIAS
-      if (info->shared)
+      if (bfd_link_pic (info))
 	got_offset -= GOT_BIAS;
 #endif
 
@@ -6754,7 +6586,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 	      plt_info->symbol_entry,
 	      plt_info->symbol_entry_size);
 
-      if (info->shared || htab->fdpic_p)
+      if (bfd_link_pic (info) || htab->fdpic_p)
 	{
 	  if (plt_info->symbol_fields.got20)
 	    {
@@ -6823,7 +6655,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 
       /* Make got_offset relative to the start of .got.plt.  */
 #ifdef GOT_BIAS
-      if (info->shared)
+      if (bfd_link_pic (info))
 	got_offset += GOT_BIAS;
 #endif
       if (htab->fdpic_p)
@@ -6845,8 +6677,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 		  sgotplt->contents + got_offset);
       if (htab->fdpic_p)
 	bfd_put_32 (output_bfd,
-		    sh_elf_osec_to_segment (output_bfd,
-					    htab->splt->output_section),
+		    sh_elf_osec_to_segment (output_bfd, splt->output_section),
 		    sgotplt->contents + got_offset + 4);
 
       /* Fill in the entry in the .rela.plt section.  */
@@ -6864,7 +6695,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
       loc = srelplt->contents + plt_index * sizeof (Elf32_External_Rela);
       bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
 
-      if (htab->vxworks_p && !info->shared)
+      if (htab->vxworks_p && !bfd_link_pic (info))
 	{
 	  /* Create the .rela.plt.unloaded relocations for this PLT entry.
 	     Begin by pointing LOC to the first such relocation.  */
@@ -6873,8 +6704,8 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 
 	  /* Create a .rela.plt.unloaded R_SH_DIR32 relocation
 	     for the PLT entry's pointer to the .got.plt entry.  */
-	  rel.r_offset = (htab->splt->output_section->vma
-			  + htab->splt->output_offset
+	  rel.r_offset = (splt->output_section->vma
+			  + splt->output_offset
 			  + h->plt.offset
 			  + plt_info->symbol_fields.got_entry);
 	  rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_SH_DIR32);
@@ -6913,8 +6744,8 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
 
-      sgot = htab->sgot;
-      srelgot = htab->srelgot;
+      sgot = htab->root.sgot;
+      srelgot = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srelgot != NULL);
 
       rel.r_offset = (sgot->output_section->vma
@@ -6926,7 +6757,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 	 of a version file, we just want to emit a RELATIVE reloc.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  if (htab->fdpic_p)
@@ -6974,8 +6805,8 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 	/* This symbol has a datalabel entry in the global offset table.
 	   Set it up.  */
 
-	sgot = htab->sgot;
-	srelgot = htab->srelgot;
+	sgot = htab->root.sgot;
+	srelgot = htab->root.srelgot;
 	BFD_ASSERT (sgot != NULL && srelgot != NULL);
 
 	rel.r_offset = (sgot->output_section->vma
@@ -6987,7 +6818,7 @@ sh_elf_finish_dynamic_symbol (bfd *outpu
 	   of a version file, we just want to emit a RELATIVE reloc.
 	   The entry in the global offset table will already have been
 	   initialized in the relocate_section function.  */
-	if (info->shared
+	if (bfd_link_pic (info)
 	    && SYMBOL_REFERENCES_LOCAL (info, h))
 	  {
 	    if (htab->fdpic_p)
@@ -7070,7 +6901,7 @@ sh_elf_finish_dynamic_sections (bfd *out
   if (htab == NULL)
     return FALSE;
 
-  sgotplt = htab->sgotplt;
+  sgotplt = htab->root.sgotplt;
   sdyn = bfd_get_linker_section (htab->root.dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
@@ -7132,41 +6963,23 @@ sh_elf_finish_dynamic_sections (bfd *out
 	      break;
 
 	    case DT_JMPREL:
-	      s = htab->srelplt->output_section;
+	      s = htab->root.srelplt->output_section;
 	      BFD_ASSERT (s != NULL);
 	      dyn.d_un.d_ptr = s->vma;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->srelplt->output_section;
+	      s = htab->root.srelplt->output_section;
 	      BFD_ASSERT (s != NULL);
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* My reading of the SVR4 ABI indicates that the
-		 procedure linkage table relocs (DT_JMPREL) should be
-		 included in the overall relocs (DT_RELA).  This is
-		 what Solaris does.  However, UnixWare can not handle
-		 that case.  Therefore, we override the DT_RELASZ entry
-		 here to make it not include the JMPREL relocs.  Since
-		 the linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      if (htab->srelplt != NULL)
-		{
-		  s = htab->srelplt->output_section;
-		  dyn.d_un.d_val -= s->size;
-		}
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = htab->splt;
+      splt = htab->root.splt;
       if (splt && splt->size > 0 && htab->plt_info->plt0_entry)
 	{
 	  unsigned int i;
@@ -7262,9 +7075,9 @@ sh_elf_finish_dynamic_sections (bfd *out
     BFD_ASSERT (htab->srelfuncdesc->reloc_count * sizeof (Elf32_External_Rela)
 		== htab->srelfuncdesc->size);
 
-  if (htab->srelgot)
-    BFD_ASSERT (htab->srelgot->reloc_count * sizeof (Elf32_External_Rela)
-		== htab->srelgot->size);
+  if (htab->root.srelgot)
+    BFD_ASSERT (htab->root.srelgot->reloc_count * sizeof (Elf32_External_Rela)
+		== htab->root.srelgot->size);
 
   return TRUE;
 }
@@ -7452,7 +7265,6 @@ sh_elf_encode_eh_address (bfd *abfd,
 					sh_elf_merge_private_data
 
 #define elf_backend_gc_mark_hook	sh_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook	sh_elf_gc_sweep_hook
 #define elf_backend_check_relocs	sh_elf_check_relocs
 #define elf_backend_copy_indirect_symbol \
 					sh_elf_copy_indirect_symbol
@@ -7487,6 +7299,7 @@ sh_elf_encode_eh_address (bfd *abfd,
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
+#define elf_backend_dtrel_excludes_plt	1
 
 #if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh-relocs.h ./bfd/elf32-sh-relocs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh-relocs.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh-relocs.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh-symbian.c ./bfd/elf32-sh-symbian.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sh-symbian.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sh-symbian.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Renesas / SuperH specific support for Symbian 32-bit ELF files
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
    Contributed by Red Hat
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -126,6 +126,7 @@ sh_symbian_import_as (struct bfd_link_in
 	  return TRUE;
 
 	bfd_set_error (bfd_error_invalid_operation);
+	/* xgettext:c-format */
 	_bfd_error_handler (_("%B: IMPORT AS directive for %s conceals previous IMPORT AS"),
 			    abfd, current_name);
 	return FALSE;
@@ -379,6 +380,7 @@ sh_symbian_process_embedded_commands (st
 		     (long) (directive - (char *) contents));
 
 	  bfd_set_error (bfd_error_invalid_operation);
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: Unrecognised .directive command: %s"),
 			      abfd, directive);
 	  break;
@@ -432,7 +434,7 @@ sh_symbian_relocate_section (bfd *      
 			     asection **            local_sections)
 {
   /* When performing a final link we implement the IMPORT AS directives.  */
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       Elf_Internal_Rela *            rel;
       Elf_Internal_Rela *            relend;
@@ -496,6 +498,7 @@ sh_symbian_relocate_section (bfd *      
 
 	  if (new_hash == NULL)
 	    {
+	      /* xgettext:c-format */
 	      _bfd_error_handler (_("%B: Failed to add renamed symbol %s"),
 				  input_bfd, ptr->new_name);
 	      continue;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sparc.c ./bfd/elf32-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPARC-specific support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -67,8 +67,9 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_
    object file when linking.  */
 
 static bfd_boolean
-elf32_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   bfd_boolean error;
   unsigned long ibfd_mach;
   /* FIXME: This should not be static.  */
@@ -84,7 +85,7 @@ elf32_sparc_merge_private_bfd_data (bfd 
   if (bfd_mach_sparc_64bit_p (ibfd_mach))
     {
       error = TRUE;
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: compiled for a 64 bit system and target is 32 bit"), ibfd);
     }
   else if ((ibfd->flags & DYNAMIC) == 0)
@@ -97,7 +98,7 @@ elf32_sparc_merge_private_bfd_data (bfd 
        != previous_ibfd_e_flags)
       && previous_ibfd_e_flags != (unsigned long) -1)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking little endian files with big endian files"), ibfd);
       error = TRUE;
     }
@@ -109,7 +110,7 @@ elf32_sparc_merge_private_bfd_data (bfd 
       return FALSE;
     }
 
-  return _bfd_sparc_elf_merge_private_bfd_data (ibfd, obfd);
+  return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info);
 }
 
 /* The final processing done just before writing out the object file.
@@ -136,6 +137,11 @@ elf32_sparc_final_write_processing (bfd 
       elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1;
       break;
     case bfd_mach_sparc_v8plusb :
+    case bfd_mach_sparc_v8plusc :
+    case bfd_mach_sparc_v8plusd :
+    case bfd_mach_sparc_v8pluse :
+    case bfd_mach_sparc_v8plusv :
+    case bfd_mach_sparc_v8plusm :
       elf_elfheader (abfd)->e_machine = EM_SPARC32PLUS;
       elf_elfheader (abfd)->e_flags &=~ EF_SPARC_32PLUS_MASK;
       elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1
@@ -180,11 +186,10 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
 			     asection ** secp ATTRIBUTE_UNUSED,
 			     bfd_vma * valp ATTRIBUTE_UNUSED)
 {
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
   return TRUE;
 }
 
@@ -240,6 +245,7 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
 #define elf_backend_plt_readonly 0
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 4
+#define elf_backend_want_dynrelro 1
 #define elf_backend_rela_normal 1
 
 #define elf_backend_add_symbol_hook		elf32_sparc_add_symbol_hook
@@ -258,9 +264,26 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
 
 /* The 32-bit static TLS arena size is rounded to the nearest 8-byte
    boundary.  */
-#undef elf_backend_static_tls_alignment
+#undef  elf_backend_static_tls_alignment
 #define elf_backend_static_tls_alignment	8
 
+#undef  elf_backend_strtab_flags
+#define elf_backend_strtab_flags	SHF_STRINGS
+
+static bfd_boolean
+elf32_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED,
+						 bfd *obfd ATTRIBUTE_UNUSED,
+						 const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED,
+						 Elf_Internal_Shdr *osection ATTRIBUTE_UNUSED)
+{
+  /* PR 19938: FIXME: Need to add code for setting the sh_info
+     and sh_link fields of Solaris specific section types.  */
+  return FALSE;
+}
+
+#undef  elf_backend_copy_special_section_fields
+#define elf_backend_copy_special_section_fields elf32_sparc_copy_solaris_special_section_fields
+
 #include "elf32-target.h"
 
 /* A wrapper around _bfd_sparc_elf_link_hash_table_create that identifies
@@ -292,39 +315,43 @@ elf32_sparc_vxworks_final_write_processi
   elf_vxworks_final_write_processing (abfd, linker);
 }
 
-#undef TARGET_BIG_SYM
+#undef  TARGET_BIG_SYM
 #define TARGET_BIG_SYM	sparc_elf32_vxworks_vec
-#undef TARGET_BIG_NAME
+#undef  TARGET_BIG_NAME
 #define TARGET_BIG_NAME	"elf32-sparc-vxworks"
 
-#undef ELF_MINPAGESIZE
+#undef  ELF_MINPAGESIZE
 #define ELF_MINPAGESIZE	0x1000
 
 #undef bfd_elf32_bfd_link_hash_table_create
 #define bfd_elf32_bfd_link_hash_table_create \
   elf32_sparc_vxworks_link_hash_table_create
 
-#undef elf_backend_want_got_plt
+#undef  elf_backend_want_got_plt
 #define elf_backend_want_got_plt		1
-#undef elf_backend_plt_readonly
+#undef  elf_backend_plt_readonly
 #define elf_backend_plt_readonly		1
-#undef elf_backend_got_header_size
+#undef  elf_backend_got_header_size
 #define elf_backend_got_header_size		12
-#undef elf_backend_add_symbol_hook
+#undef  elf_backend_dtrel_excludes_plt
+#define elf_backend_dtrel_excludes_plt		1
+#undef  elf_backend_add_symbol_hook
 #define elf_backend_add_symbol_hook \
   elf_vxworks_add_symbol_hook
-#undef elf_backend_link_output_symbol_hook
+#undef  elf_backend_link_output_symbol_hook
 #define elf_backend_link_output_symbol_hook \
   elf_vxworks_link_output_symbol_hook
-#undef elf_backend_emit_relocs
+#undef  elf_backend_emit_relocs
 #define elf_backend_emit_relocs \
   elf_vxworks_emit_relocs
-#undef elf_backend_final_write_processing
+#undef  elf_backend_final_write_processing
 #define elf_backend_final_write_processing \
   elf32_sparc_vxworks_final_write_processing
-#undef elf_backend_static_tls_alignment
+#undef  elf_backend_static_tls_alignment
+#undef  elf_backend_strtab_flags
+#undef  elf_backend_copy_special_section_fields
 
-#undef elf32_bed
+#undef  elf32_bed
 #define elf32_bed				sparc_elf_vxworks_bed
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-spu.c ./bfd/elf32-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-spu.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-spu.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* SPU specific support for 32-bit ELF
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -156,8 +156,9 @@ spu_elf_info_to_howto (bfd *abfd ATTRIBU
   /* PR 17512: file: 90c2a92e.  */
   if (r_type >= R_SPU_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised SPU reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised SPU reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_SPU_NONE;
     }
@@ -790,6 +791,7 @@ spu_elf_find_overlays (struct bfd_link_i
 		  spu_elf_section_data (s)->u.o.ovl_buf = num_buf;
 		  if (s0->vma != s->vma)
 		    {
+		      /* xgettext:c-format */
 		      info->callbacks->einfo (_("%X%P: overlay sections %A "
 						"and %A do not start at the "
 						"same address.\n"),
@@ -1014,9 +1016,10 @@ needs_ovl_stub (struct elf_link_hash_ent
 					       sym,
 					       sym_sec);
 		}
-	      (*_bfd_error_handler) (_("warning: call to non-function"
-				       " symbol %s defined in %B"),
-				     sym_sec->owner, sym_name);
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("warning: call to non-function symbol %s defined in %B"),
+		 sym_sec->owner, sym_name);
 
 	    }
 	}
@@ -1364,6 +1367,7 @@ build_stub (struct bfd_link_info *info,
 
 	  if (stub_type != br000_ovl_stub
 	      && lrlive != stub_type - br000_ovl_stub)
+	    /* xgettext:c-format */
 	    info->callbacks->einfo (_("%A:0x%v lrlive .brinfo (%u) differs "
 				      "from analysis (%u)\n"),
 				    isec, irela->r_offset, lrlive,
@@ -1895,16 +1899,17 @@ define_ovtab_symbol (struct spu_link_has
     }
   else if (h->root.u.def.section->owner != NULL)
     {
-      (*_bfd_error_handler) (_("%B is not allowed to define %s"),
-			     h->root.u.def.section->owner,
-			     h->root.root.string);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B is not allowed to define %s"),
+			  h->root.u.def.section->owner,
+			  h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
   else
     {
-      (*_bfd_error_handler) (_("you are not allowed to define %s in a script"),
-			     h->root.root.string);
+      _bfd_error_handler (_("you are not allowed to define %s in a script"),
+			  h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -1937,8 +1942,8 @@ spu_elf_build_stubs (struct bfd_link_inf
 	      s = h->root.u.def.section->output_section;
 	      if (spu_elf_section_data (s)->u.o.ovl_index)
 		{
-		  (*_bfd_error_handler) (_("%s in overlay section"),
-					 h->root.root.string);
+		  _bfd_error_handler (_("%s in overlay section"),
+				      h->root.root.string);
 		  bfd_set_error (bfd_error_bad_value);
 		  return FALSE;
 		}
@@ -1966,7 +1971,7 @@ spu_elf_build_stubs (struct bfd_link_inf
 
       if (htab->stub_err)
 	{
-	  (*_bfd_error_handler) (_("overlay stub relocation overflow"));
+	  _bfd_error_handler (_("overlay stub relocation overflow"));
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
@@ -1975,7 +1980,7 @@ spu_elf_build_stubs (struct bfd_link_inf
 	{
 	  if (htab->stub_sec[i]->size != htab->stub_sec[i]->rawsize)
 	    {
-	      (*_bfd_error_handler)  (_("stubs don't match calculated size"));
+	      _bfd_error_handler  (_("stubs don't match calculated size"));
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -2557,6 +2562,7 @@ check_function_ranges (asection *sec, st
 	const char *f1 = func_name (&sinfo->fun[i - 1]);
 	const char *f2 = func_name (&sinfo->fun[i]);
 
+	/* xgettext:c-format */
 	info->callbacks->einfo (_("warning: %s overlaps %s\n"), f1, f2);
 	sinfo->fun[i - 1].hi = sinfo->fun[i].lo;
       }
@@ -2604,6 +2610,7 @@ find_function (asection *sec, bfd_vma of
       else
 	return &sinfo->fun[mid];
     }
+  /* xgettext:c-format */
   info->callbacks->einfo (_("%A:0x%v not found in function table\n"),
 			  sec, offset);
   bfd_set_error (bfd_error_bad_value);
@@ -2744,6 +2751,7 @@ mark_functions_via_relocs (asection *sec
 		{
 		  if (!warned)
 		    info->callbacks->einfo
+		      /* xgettext:c-format */
 		      (_("%B(%A+0x%v): call to non-code section"
 			 " %B(%A), analysis incomplete\n"),
 		       sec->owner, sec, irela->r_offset,
@@ -3312,6 +3320,7 @@ remove_cycles (struct function_info *fun
 	      const char *f1 = func_name (fun);
 	      const char *f2 = func_name (call->fun);
 
+	      /* xgettext:c-format */
 	      info->callbacks->info (_("Stack analysis will ignore the call "
 				       "from %s to %s\n"),
 				     f1, f2);
@@ -4003,8 +4012,8 @@ sum_stack (struct function_info *fun,
   if (htab->params->stack_analysis)
     {
       if (!fun->non_root)
-	info->callbacks->info (_("  %s: 0x%v\n"), f1, (bfd_vma) cum_stack);
-      info->callbacks->minfo (_("%s: 0x%v 0x%v\n"),
+	info->callbacks->info ("  %s: 0x%v\n", f1, (bfd_vma) cum_stack);
+      info->callbacks->minfo ("%s: 0x%v 0x%v\n",
 			      f1, (bfd_vma) stack, (bfd_vma) cum_stack);
 
       if (has_call)
@@ -4017,7 +4026,7 @@ sum_stack (struct function_info *fun,
 		const char *ann1 = call->fun == max ? "*" : " ";
 		const char *ann2 = call->is_tail ? "t" : " ";
 
-		info->callbacks->minfo (_("   %s%s %s\n"), ann1, ann2, f2);
+		info->callbacks->minfo ("   %s%s %s\n", ann1, ann2, f2);
 	      }
 	}
     }
@@ -4322,6 +4331,7 @@ spu_elf_auto_overlay (struct bfd_link_in
 	    if (bfd_arr[i - 1]->my_archive == bfd_arr[i]->my_archive)
 	      {
 		if (bfd_arr[i - 1]->my_archive && bfd_arr[i]->my_archive)
+		  /* xgettext:c-format */
 		  info->callbacks->einfo (_("%s duplicated in %s\n"),
 					  bfd_arr[i]->filename,
 					  bfd_arr[i]->my_archive->filename);
@@ -4374,6 +4384,7 @@ spu_elf_auto_overlay (struct bfd_link_in
     }
 
   if (fixed_size + mos_param.max_overlay_size > htab->local_store)
+    /* xgettext:c-format */
     info->callbacks->einfo (_("non-overlay size of 0x%v plus maximum overlay "
 			      "size of 0x%v exceeds local store\n"),
 			    (bfd_vma) fixed_size,
@@ -4529,6 +4540,7 @@ spu_elf_auto_overlay (struct bfd_link_in
 
       if (i == base)
 	{
+	  /* xgettext:c-format */
 	  info->callbacks->einfo (_("%B:%A%s exceeds overlay size\n"),
 				  ovly_sections[2 * i]->owner,
 				  ovly_sections[2 * i],
@@ -4670,7 +4682,7 @@ spu_elf_auto_overlay (struct bfd_link_in
  file_err:
   bfd_set_error (bfd_error_system_call);
  err_exit:
-  info->callbacks->einfo ("%F%P: auto overlay error: %E\n");
+  info->callbacks->einfo (_("%F%P: auto overlay error: %E\n"));
   xexit (1);
 }
 
@@ -4721,15 +4733,15 @@ spu_elf_final_link (bfd *output_bfd, str
        || (htab->params->ovly_flavour == ovly_soft_icache
 	   && htab->params->lrlive_analysis))
       && !spu_elf_stack_analysis (info))
-    info->callbacks->einfo ("%X%P: stack/lrlive analysis error: %E\n");
+    info->callbacks->einfo (_("%X%P: stack/lrlive analysis error: %E\n"));
 
   if (!spu_elf_build_stubs (info))
-    info->callbacks->einfo ("%F%P: can not build overlay stubs: %E\n");
+    info->callbacks->einfo (_("%F%P: can not build overlay stubs: %E\n"));
 
   return bfd_elf_final_link (output_bfd, info);
 }
 
-/* Called when not normally emitting relocs, ie. !info->relocatable
+/* Called when not normally emitting relocs, ie. !bfd_link_relocatable (info)
    and !info->emitrelocations.  Returns a count of special relocs
    that need to be emitted.  */
 
@@ -4793,7 +4805,7 @@ spu_elf_emit_fixup (bfd * output_bfd, st
       if (qaddr != (base & ~(bfd_vma) 15))
 	{
 	  if ((sfixup->reloc_count + 1) * FIXUP_RECORD_SIZE > sfixup->size)
-	    (*_bfd_error_handler) (_("fatal error while creating .fixup"));
+	    _bfd_error_handler (_("fatal error while creating .fixup"));
 	  FIXUP_PUT (output_bfd, htab, sfixup->reloc_count, qaddr | bit);
 	  sfixup->reloc_count++;
 	}
@@ -4902,18 +4914,17 @@ spu_elf_relocate_section (bfd *output_bf
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable
+	  else if (!bfd_link_relocatable (info)
 		   && !(r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64))
 	    {
 	      bfd_boolean err;
 	      err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
 		     || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT);
-	      if (!info->callbacks->undefined_symbol (info,
-						      h->root.root.string,
-						      input_bfd,
-						      input_section,
-						      rel->r_offset, err))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol) (info,
+						    h->root.root.string,
+						    input_bfd,
+						    input_section,
+						    rel->r_offset, err);
 	    }
 	  sym_name = h->root.root.string;
 	}
@@ -4922,7 +4933,7 @@ spu_elf_relocate_section (bfd *output_bf
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* Change "a rt,ra,rb" to "ai rt,ra,0". */
@@ -4990,7 +5001,7 @@ spu_elf_relocate_section (bfd *output_bf
 	    }
 	}
 
-      if (htab->params->emit_fixups && !info->relocatable
+      if (htab->params->emit_fixups && !bfd_link_relocatable (info)
 	  && (input_section->flags & SEC_ALLOC) != 0
 	  && r_type == R_SPU_ADDR32)
 	{
@@ -5027,7 +5038,8 @@ spu_elf_relocate_section (bfd *output_bf
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     bfd_get_section_name (input_bfd, input_section),
@@ -5050,17 +5062,14 @@ spu_elf_relocate_section (bfd *output_bf
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!((*info->callbacks->reloc_overflow)
-		    (info, (h ? &h->root : NULL), sym_name, howto->name,
-		     (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), sym_name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, sym_name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, sym_name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -5081,10 +5090,8 @@ spu_elf_relocate_section (bfd *output_bf
 
 	    common_error:
 	      ret = FALSE;
-	      if (!((*info->callbacks->warning)
-		    (info, msg, sym_name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, sym_name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -5135,7 +5142,7 @@ spu_elf_output_symbol_hook (struct bfd_l
 {
   struct spu_link_hash_table *htab = spu_hash_table (info);
 
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && htab->stub_sec != NULL
       && h != NULL
       && (h->root.type == bfd_link_hash_defined
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-spu.h ./bfd/elf32-spu.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-spu.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-spu.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* SPU specific support for 32-bit ELF.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tic6x.c ./bfd/elf32-tic6x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tic6x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tic6x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for TI C6X
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
    Contributed by Joseph Myers <joseph@codesourcery.com>
    		  Bernd Schmidt  <bernds@codesourcery.com>
 
@@ -43,10 +43,6 @@ struct elf32_tic6x_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   /* C6X specific command line arguments.  */
   struct elf32_tic6x_params params;
 
@@ -1591,7 +1587,7 @@ elf32_tic6x_link_hash_table_create (bfd 
 static bfd_boolean
 elf32_tic6x_final_link (bfd *abfd, struct bfd_link_info *info)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       obj_attribute *out_attr;
       out_attr = elf_known_obj_attributes_proc (abfd);
@@ -1660,14 +1656,6 @@ elf32_tic6x_create_dynamic_sections (bfd
       || ! bfd_set_section_alignment (dynobj, htab->elf.splt, 5))
     return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
   return TRUE;
 }
 
@@ -1735,11 +1723,9 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
 				   struct elf_link_hash_entry *h,
 				   Elf_Internal_Sym * sym)
 {
-  bfd *dynobj;
   struct elf32_tic6x_link_hash_table *htab;
 
   htab = elf32_tic6x_hash_table (info);
-  dynobj = htab->elf.dynobj;
 
   if (h->plt.offset != (bfd_vma) -1)
     {
@@ -1761,7 +1747,7 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
 	 it up.  */
 
       if ((h->dynindx == -1
-	   && !((h->forced_local || info->executable)
+	   && !((h->forced_local || bfd_link_executable (info))
 		&& h->def_regular
 		&& h->type == STT_GNU_IFUNC))
 	  || plt == NULL
@@ -1839,8 +1825,8 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
       /* This symbol has an entry in the global offset table.
          Set it up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srela = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = htab->elf.sgot;
+      srela = htab->elf.srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       /* If this is a -Bsymbolic link, and the symbol is defined
@@ -1848,8 +1834,8 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
          the symbol was forced to be local because of a version file.
          The entry in the global offset table will already have been
          initialized in the relocate_section function.  */
-      if (info->shared
-	  && (info->symbolic
+      if (bfd_link_pic (info)
+	  && (SYMBOLIC_BIND (info, h)
 	      || h->dynindx == -1 || h->forced_local) && h->def_regular)
 	{
 	  asection *s = h->root.u.def.section;
@@ -1874,13 +1860,15 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
   if (h->needs_copy)
     {
       Elf_Internal_Rela rel;
+      asection *s;
 
       /* This symbol needs a copy reloc.  Set it up.  */
 
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->elf.srelbss == NULL
+	  || htab->elf.sreldynrelro == NULL)
 	abort ();
 
       rel.r_offset = (h->root.u.def.value
@@ -1888,8 +1876,12 @@ elf32_tic6x_finish_dynamic_symbol (bfd *
 		      + h->root.u.def.section->output_offset);
       rel.r_info = ELF32_R_INFO (h->dynindx, R_C6000_COPY);
       rel.r_addend = 0;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
 
-      elf32_tic6x_install_rela (output_bfd, htab->srelbss, &rel);
+      elf32_tic6x_install_rela (output_bfd, s, &rel);
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
@@ -1993,7 +1985,7 @@ elf32_tic6x_gc_sweep_hook (bfd *abfd,
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf32_tic6x_hash_table (info);
@@ -2075,7 +2067,7 @@ elf32_tic6x_adjust_dynamic_symbol (struc
 {
   struct elf32_tic6x_link_hash_table *htab;
   bfd *dynobj;
-  asection *s;
+  asection *s, *srel;
 
   dynobj = elf_hash_table (info)->dynobj;
 
@@ -2128,7 +2120,7 @@ elf32_tic6x_adjust_dynamic_symbol (struc
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2160,14 +2152,22 @@ elf32_tic6x_adjust_dynamic_symbol (struc
   /* We must generate a R_C6000_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      srel->size += sizeof (Elf32_External_Rela);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -2321,7 +2321,7 @@ elf32_tic6x_relocate_section (bfd *outpu
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  if (is_rel
 	      && sym != NULL
@@ -2365,6 +2365,7 @@ elf32_tic6x_relocate_section (bfd *outpu
 		  goto done_reloc;
 		}
 	    }
+	  /* Fall through.  */
 
 	case R_C6000_PCR_S12:
 	case R_C6000_PCR_S10:
@@ -2403,7 +2404,7 @@ elf32_tic6x_relocate_section (bfd *outpu
 
 	case R_C6000_DSBT_INDEX:
 	  relocation = elf32_tic6x_hash_table (info)->params.dsbt_index;
-	  if (!info->shared || relocation != 0)
+	  if (!bfd_link_pic (info) || relocation != 0)
 	    break;
 
 	  /* fall through */
@@ -2416,7 +2417,7 @@ elf32_tic6x_relocate_section (bfd *outpu
 	  /* When generating a shared object or relocatable executable, these
 	     relocations are copied into the output file to be resolved at
 	     run time.  */
-	  if ((info->shared || elf32_tic6x_using_dsbt (output_bfd))
+	  if ((bfd_link_pic (info) || elf32_tic6x_using_dsbt (output_bfd))
 	      && (input_section->flags & SEC_ALLOC)
 	      && (h == NULL
 		  || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -2448,8 +2449,8 @@ elf32_tic6x_relocate_section (bfd *outpu
 		memset (&outrel, 0, sizeof outrel);
 	      else if (h != NULL
 		       && h->dynindx != -1
-		       && (!info->shared
-			   || !info->symbolic
+		       && (!bfd_link_pic (info)
+			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
 		  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@@ -2521,9 +2522,9 @@ elf32_tic6x_relocate_section (bfd *outpu
 	    }
 	  else
 	    {
-	      (*_bfd_error_handler) (_("%B: SB-relative relocation but "
-				       "__c6xabi_DSBT_BASE not defined"),
-				     input_bfd);
+	      _bfd_error_handler (_("%B: SB-relative relocation but "
+				    "__c6xabi_DSBT_BASE not defined"),
+				  input_bfd);
 	      ok = FALSE;
 	      continue;
 	    }
@@ -2544,8 +2545,10 @@ elf32_tic6x_relocate_section (bfd *outpu
 
 	      off = h->got.offset;
 	      dyn = htab->elf.dynamic_sections_created;
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h))
 		  || (ELF_ST_VISIBILITY (h->other)
 		      && h->root.type == bfd_link_hash_undefweak))
@@ -2570,7 +2573,8 @@ elf32_tic6x_relocate_section (bfd *outpu
 				  htab->elf.sgot->contents + off);
 		      h->got.offset |= 1;
 
-		      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+		      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							    bfd_link_pic (info),
 							    h)
 			  && !(ELF_ST_VISIBILITY (h->other)
 			       && h->root.type == bfd_link_hash_undefweak))
@@ -2598,7 +2602,7 @@ elf32_tic6x_relocate_section (bfd *outpu
 		  bfd_put_32 (output_bfd, relocation,
 			      htab->elf.sgot->contents + off);
 
-		  if (info->shared || elf32_tic6x_using_dsbt (output_bfd))
+		  if (bfd_link_pic (info) || elf32_tic6x_using_dsbt (output_bfd))
 		    elf32_tic6x_make_got_dynreloc (output_bfd, htab, sec, off);
 
 		  local_got_offsets[r_symndx] |= 1;
@@ -2626,7 +2630,8 @@ elf32_tic6x_relocate_section (bfd *outpu
 		 symbols.  Make this an error; the compiler isn't
 		 allowed to pass us these kinds of things.  */
 	      if (h == NULL)
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B, section %A: relocation %s with non-zero addend %d"
 		     " against local symbol"),
 		   input_bfd,
@@ -2634,7 +2639,8 @@ elf32_tic6x_relocate_section (bfd *outpu
 		   elf32_tic6x_howto_table[r_type].name,
 		   rel->r_addend);
 	      else
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B, section %A: relocation %s with non-zero addend %d"
 		     " against symbol `%s'"),
 		   input_bfd,
@@ -2664,8 +2670,9 @@ elf32_tic6x_relocate_section (bfd *outpu
 	  /* Invalid in relocatable object.  */
 	default:
 	  /* Unknown relocation.  */
-	  (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-				 input_bfd, r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: invalid relocation type %d"),
+			      input_bfd, r_type);
 	  ok = FALSE;
 	  continue;
 	}
@@ -2716,20 +2723,16 @@ elf32_tic6x_relocate_section (bfd *outpu
 	      /* If the overflowing reloc was to an undefined symbol,
 		 we have already printed one error message and there
 		 is no point complaining again.  */
-	      if ((! h ||
-		   h->root.type != bfd_link_hash_undefined)
-		  && (!((*info->callbacks->reloc_overflow)
-			(info, (h ? &h->root : NULL), name, howto->name,
-			 (bfd_vma) 0, input_bfd, input_section,
-			 rel->r_offset))))
-		  return FALSE;
+	      if (!h || h->root.type != bfd_link_hash_undefined)
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+						    input_section,
+						    rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -2750,10 +2753,8 @@ elf32_tic6x_relocate_section (bfd *outpu
 
 	    common_error:
 	      BFD_ASSERT (error_message != NULL);
-	      if (!((*info->callbacks->reloc_dangerous)
-		    (info, error_message, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info, error_message, input_bfd, input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -2778,7 +2779,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
   const Elf_Internal_Rela *rel_end;
   asection *sreloc;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf32_tic6x_hash_table (info);
@@ -2787,7 +2788,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
 
   /* Create dynamic sections for relocatable executables so that we can
      copy relocations.  */
-  if ((info->shared || elf32_tic6x_using_dsbt (abfd))
+  if ((bfd_link_pic (info) || elf32_tic6x_using_dsbt (abfd))
       && ! htab->elf.dynamic_sections_created)
     {
       if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
@@ -2809,9 +2810,9 @@ elf32_tic6x_check_relocs (bfd *abfd, str
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd,
-				 r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -2902,7 +2903,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
 	     store the number of R_C6000_DSBT_INDEX relocs in the
 	     pc_count field, and potentially discard the extra space
 	     in elf32_tic6x_allocate_dynrelocs.  */
-	  if (!info->shared)
+	  if (!bfd_link_pic (info))
 	    break;
 
 	  /* fall through */
@@ -2933,7 +2934,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared || elf32_tic6x_using_dsbt (abfd))
+	  if ((bfd_link_pic (info) || elf32_tic6x_using_dsbt (abfd))
 	      && (sec->flags & SEC_ALLOC) != 0)
 	    {
 	      struct elf_dyn_relocs *p;
@@ -3006,7 +3007,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
 	case R_C6000_SBR_H16_B:
 	case R_C6000_SBR_H16_H:
 	case R_C6000_SBR_H16_W:
-	  if (h != NULL && info->executable)
+	  if (h != NULL && bfd_link_executable (info))
 	    {
 	      /* For B14-relative addresses, we might need a copy
 		 reloc.  */
@@ -3130,7 +3131,7 @@ elf32_tic6x_allocate_dynrelocs (struct e
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->elf.splt;
@@ -3147,7 +3148,7 @@ elf32_tic6x_allocate_dynrelocs (struct e
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared && !h->def_regular)
+	  if (! bfd_link_pic (info) && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
 	      h->root.u.def.value = h->plt.offset;
@@ -3202,7 +3203,7 @@ elf32_tic6x_allocate_dynrelocs (struct e
 
   /* Discard relocs on undefined weak syms with non-default
      visibility.  */
-  if (info->shared || elf32_tic6x_using_dsbt (htab->obfd))
+  if (bfd_link_pic (info) || elf32_tic6x_using_dsbt (htab->obfd))
     {
       /* We use the pc_count field to hold the number of
 	 R_C6000_DSBT_INDEX relocs.  */
@@ -3297,7 +3298,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
   if (htab->elf.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -3360,7 +3361,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
 	      *local_got = s->size;
 	      s->size += 4;
 
-	      if (info->shared || elf32_tic6x_using_dsbt (output_bfd))
+	      if (bfd_link_pic (info) || elf32_tic6x_using_dsbt (output_bfd))
 		{
 		  srel->size += sizeof (Elf32_External_Rela);
 		}
@@ -3389,7 +3390,8 @@ elf32_tic6x_size_dynamic_sections (bfd *
       else if (s == htab->elf.splt
 	       || s == htab->elf.sgot
 	       || s == htab->elf.sgotplt
-	       || s == htab->sdynbss)
+	       || s == htab->elf.sdynbss
+	       || s == htab->elf.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -3459,7 +3461,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3511,7 +3513,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
 static bfd_boolean
 elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
-  if (elf32_tic6x_using_dsbt (output_bfd) && !info->relocatable
+  if (elf32_tic6x_using_dsbt (output_bfd) && !bfd_link_relocatable (info)
       && !bfd_elf_stack_segment_size (output_bfd, info,
 				      "__stacksize", DEFAULT_STACK_SIZE))
     return FALSE;
@@ -3645,6 +3647,7 @@ elf32_tic6x_obj_attrs_handle_unknown (bf
   if ((tag & 127) < 64)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: error: unknown mandatory EABI object attribute %d"),
 	 abfd, tag);
       bfd_set_error (bfd_error_bad_value);
@@ -3653,6 +3656,7 @@ elf32_tic6x_obj_attrs_handle_unknown (bf
   else
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: warning: unknown EABI object attribute %d"),
 	 abfd, tag);
       return TRUE;
@@ -3733,8 +3737,9 @@ elf32_tic6x_array_alignment_to_tag (int 
    succeeded, FALSE otherwise.  */
 
 static bfd_boolean
-elf32_tic6x_merge_attributes (bfd *ibfd, bfd *obfd)
+elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   bfd_boolean result = TRUE;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
@@ -3765,6 +3770,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
       < in_attr[Tag_ABI_stack_align_needed].i)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B requires more stack alignment than %B preserves"),
 	 ibfd, obfd);
       result = FALSE;
@@ -3773,6 +3779,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
       < out_attr[Tag_ABI_stack_align_needed].i)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B requires more stack alignment than %B preserves"),
 	 obfd, ibfd);
       result = FALSE;
@@ -3818,6 +3825,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
   if (array_align_out < array_expect_in)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B requires more array alignment than %B preserves"),
 	 ibfd, obfd);
       result = FALSE;
@@ -3825,6 +3833,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
   if (array_align_in < array_expect_out)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("error: %B requires more array alignment than %B preserves"),
 	 obfd, ibfd);
       result = FALSE;
@@ -3847,6 +3856,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
 	      && out_attr[i].i != in_attr[i].i)
 	    {
 	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("warning: %B and %B differ in wchar_t size"), obfd, ibfd);
 	    }
 	  break;
@@ -3865,6 +3875,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
 	  if (out_attr[i].i != in_attr[i].i)
 	    {
 	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("warning: %B and %B differ in whether code is "
 		   "compiled for DSBT"),
 		 obfd, ibfd);
@@ -3919,7 +3930,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
     }
 
   /* Merge Tag_ABI_compatibility attributes and any common GNU ones.  */
-  if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
+  if (!_bfd_elf_merge_object_attributes (ibfd, info))
     return FALSE;
 
   result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd);
@@ -3928,15 +3939,15 @@ elf32_tic6x_merge_attributes (bfd *ibfd,
 }
 
 static bfd_boolean
-elf32_tic6x_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_tic6x_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
-  if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (obfd))
+  if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (info->output_bfd))
     return TRUE;
 
-  if (!elf32_tic6x_merge_attributes (ibfd, obfd))
+  if (!elf32_tic6x_merge_attributes (ibfd, info))
     return FALSE;
 
   return TRUE;
@@ -4373,6 +4384,7 @@ elf32_tic6x_write_section (bfd *output_b
 #define elf_backend_can_refcount	1
 #define elf_backend_want_got_plt	1
 #define elf_backend_want_dynbss		1
+#define elf_backend_want_dynrelro	1
 #define elf_backend_plt_readonly	1
 #define elf_backend_rela_normal		1
 #define elf_backend_got_header_size     8
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tic6x.h ./bfd/elf32-tic6x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tic6x.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tic6x.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for TI C6X
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -18,6 +18,10 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int elf32_tic6x_merge_arch_attributes (int, int);
 
 /* This function is provided for use from the assembler.  */
@@ -32,3 +36,7 @@ struct elf32_tic6x_params
 
 extern void elf32_tic6x_setup (struct bfd_link_info *,
 			       struct elf32_tic6x_params *);
+
+#ifdef __cplusplus
+}
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilegx.c ./bfd/elf32-tilegx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilegx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tilegx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx-specific support for 32-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -128,6 +128,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I
 #define elf_backend_plt_alignment 6
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 4
+#define elf_backend_want_dynrelro 1
 #define elf_backend_rela_normal 1
 #define elf_backend_default_execstack 0
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilegx.h ./bfd/elf32-tilegx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilegx.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tilegx.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx-specific support for 32-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilepro.c ./bfd/elf32-tilepro.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilepro.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tilepro.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILEPro-specific support for 32-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -754,10 +754,6 @@ struct tilepro_elf_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Small local sym to section mapping cache.  */
   struct sym_cache sym_cache;
 };
@@ -1234,8 +1230,7 @@ tilepro_elf_create_got_section (bfd *abf
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
-  if (s != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   flags = bed->dynamic_sec_flags;
@@ -1296,26 +1291,10 @@ static bfd_boolean
 tilepro_elf_create_dynamic_sections (bfd *dynobj,
 				     struct bfd_link_info *info)
 {
-  struct tilepro_elf_link_hash_table *htab;
-
-  htab = tilepro_elf_hash_table (info);
-  BFD_ASSERT (htab != NULL);
-
   if (!tilepro_elf_create_got_section (dynobj, info))
     return FALSE;
 
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
+  return _bfd_elf_create_dynamic_sections (dynobj, info);
 }
 
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
@@ -1454,7 +1433,7 @@ static int
 tilepro_elf_tls_transition (struct bfd_link_info *info, int r_type,
 			    int is_local)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   if (is_local)
@@ -1479,7 +1458,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
   asection *sreloc;
   int num_relocs;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = tilepro_elf_hash_table (info);
@@ -1508,8 +1487,9 @@ tilepro_elf_check_relocs (bfd *abfd, str
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1538,7 +1518,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
         case R_TILEPRO_IMM16_X1_TLS_LE_HI:
         case R_TILEPRO_IMM16_X0_TLS_LE_HA:
         case R_TILEPRO_IMM16_X1_TLS_LE_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    goto r_tilepro_plt32;
 	  break;
 
@@ -1550,7 +1530,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
         case R_TILEPRO_IMM16_X1_TLS_GD_HI:
         case R_TILEPRO_IMM16_X0_TLS_GD_HA:
         case R_TILEPRO_IMM16_X1_TLS_GD_HA:
-	  BFD_ASSERT (info->shared);
+	  BFD_ASSERT (bfd_link_pic (info));
 	  tls_type = GOT_TLS_GD;
           goto have_got_reference;
 
@@ -1563,7 +1543,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
         case R_TILEPRO_IMM16_X0_TLS_IE_HA:
         case R_TILEPRO_IMM16_X1_TLS_IE_HA:
           tls_type = GOT_TLS_IE;
-          if (info->shared)
+          if (bfd_link_pic (info))
             info->flags |= DF_STATIC_TLS;
           goto have_got_reference;
 
@@ -1623,7 +1603,8 @@ tilepro_elf_check_relocs (bfd *abfd, str
 		  tls_type = old_tls_type;
 		else
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as normal and thread local symbol"),
 		       abfd, h ? h->root.root.string : "<local>");
 		    return FALSE;
@@ -1648,7 +1629,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
 	  break;
 
 	case R_TILEPRO_TLS_GD_CALL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* These are basically R_TILEPRO_JOFFLONG_X1_PLT relocs
 		 against __tls_get_addr.  */
@@ -1737,7 +1718,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
               h->non_got_ref = 1;
 
 	r_tilepro_plt32:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      /* We may need a .plt entry if the function this reloc
 		 refers to is in a shared lib.  */
@@ -1765,14 +1746,14 @@ tilepro_elf_check_relocs (bfd *abfd, str
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (! tilepro_elf_howto_table[r_type].pc_relative
 		   || (h != NULL
 		       && (! info->symbolic
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -1880,8 +1861,8 @@ tilepro_elf_gc_mark_hook (asection *sec,
     }
 
   /* FIXME: The test here, in check_relocs and in relocate_section
-     dealing with TLS optimization, ought to be !info->executable.  */
-  if (info->shared)
+     dealing with TLS optimization, ought to be !bfd_link_executable (info).  */
+  if (bfd_link_pic (info))
     {
       switch (ELF32_R_TYPE (rel->r_info))
 	{
@@ -1915,7 +1896,7 @@ tilepro_elf_gc_sweep_hook (bfd *abfd, st
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_tilepro_elf (abfd) || sec->reloc_count == 0);
@@ -2048,7 +2029,7 @@ tilepro_elf_gc_sweep_hook (bfd *abfd, st
         case R_TILEPRO_SHAMT_X1:
         case R_TILEPRO_SHAMT_Y0:
         case R_TILEPRO_SHAMT_Y1:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
 	  /* Fall through.  */
 
@@ -2081,7 +2062,7 @@ tilepro_elf_adjust_dynamic_symbol (struc
   struct tilepro_elf_link_hash_table *htab;
   struct tilepro_elf_link_hash_entry * eh;
   struct tilepro_elf_dyn_relocs *p;
-  asection *s;
+  asection *s, *srel;
 
   htab = tilepro_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2138,7 +2119,7 @@ tilepro_elf_adjust_dynamic_symbol (struc
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2183,13 +2164,23 @@ tilepro_elf_adjust_dynamic_symbol (struc
      to copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rel.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += TILEPRO_ELF_RELA_BYTES;
+      srel->size += TILEPRO_ELF_RELA_BYTES;
       h->needs_copy = 1;
     }
 
-  return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss);
+  return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
 /* Allocate space in .plt, .got and associated reloc sections for
@@ -2222,7 +2213,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
 	{
 	  asection *s = htab->elf.splt;
 
@@ -2239,7 +2230,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -2270,7 +2261,7 @@ allocate_dynrelocs (struct elf_link_hash
   /* If a TLS_IE symbol is now local to the binary, make it a TLS_LE
      requiring no TLS entry.  */
   if (h->got.refcount > 0
-      && !info->shared
+      && !bfd_link_pic (info)
       && h->dynindx == -1
       && tilepro_elf_hash_entry(h)->tls_type == GOT_TLS_IE)
     h->got.offset = (bfd_vma) -1;
@@ -2301,7 +2292,9 @@ allocate_dynrelocs (struct elf_link_hash
 	 global.  */
       if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE)
 	htab->elf.srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES;
-      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						bfd_link_pic (info),
+						h))
 	htab->elf.srelgot->size += TILEPRO_ELF_RELA_BYTES;
     }
   else
@@ -2317,7 +2310,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -2461,7 +2454,7 @@ tilepro_elf_size_dynamic_sections (bfd *
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2526,7 +2519,7 @@ tilepro_elf_size_dynamic_sections (bfd *
 	      s->size += TILEPRO_BYTES_PER_WORD;
 	      if (*local_tls_type == GOT_TLS_GD)
 		s->size += TILEPRO_BYTES_PER_WORD;
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  || *local_tls_type == GOT_TLS_GD
 		  || *local_tls_type == GOT_TLS_IE)
 		srel->size += TILEPRO_ELF_RELA_BYTES;
@@ -2582,7 +2575,8 @@ tilepro_elf_size_dynamic_sections (bfd *
       if (s == htab->elf.splt
 	  || s == htab->elf.sgot
 	  || s == htab->elf.sgotplt
-	  || s == htab->sdynbss)
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -2638,7 +2632,7 @@ tilepro_elf_size_dynamic_sections (bfd *
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2869,7 +2863,8 @@ tilepro_elf_relocate_section (bfd *outpu
       if ((unsigned int)r_type >= NELEMS(tilepro_elf_howto_table))
 	{
           /* Not clear if we need to check here, but just be paranoid. */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
 	     input_bfd, r_type, input_section);
 	  bfd_set_error (bfd_error_bad_value);
@@ -2915,7 +2910,7 @@ tilepro_elf_relocate_section (bfd *outpu
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL)
@@ -2946,8 +2941,8 @@ tilepro_elf_relocate_section (bfd *outpu
 	  else if (h != NULL)
 	    tls_type = tilepro_elf_hash_entry(h)->tls_type;
 
-	  is_tls_iele = (! info->shared || tls_type == GOT_TLS_IE);
-	  is_tls_le = is_tls_iele && (!info->shared
+	  is_tls_iele = (! bfd_link_pic (info) || tls_type == GOT_TLS_IE);
+	  is_tls_le = is_tls_iele && (!bfd_link_pic (info)
 				      && (h == NULL || h->dynindx == -1));
 
 	  if (r_type == R_TILEPRO_TLS_GD_CALL)
@@ -3024,7 +3019,7 @@ tilepro_elf_relocate_section (bfd *outpu
 	    }
 	  break;
 	case R_TILEPRO_TLS_IE_LOAD:
-	  if (!info->shared && (h == NULL || h->dynindx == -1))
+	  if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 	    /* IE -> LE */
 	    tilepro_replace_insn (contents + rel->r_offset,
 				  insn_mask_X1_no_dest_no_srca,
@@ -3063,8 +3058,10 @@ tilepro_elf_relocate_section (bfd *outpu
 	      BFD_ASSERT (off != (bfd_vma) -1);
 	      dyn = elf_hash_table (info)->dynamic_sections_created;
 
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h)))
 		{
 		  /* This is actually a static link, or it is a
@@ -3105,7 +3102,7 @@ tilepro_elf_relocate_section (bfd *outpu
 		off &= ~1;
 	      else
 		{
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -3204,13 +3201,13 @@ tilepro_elf_relocate_section (bfd *outpu
 	  if ((input_section->flags & SEC_ALLOC) == 0)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
 		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak)
 	       && (! howto->pc_relative
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -3262,7 +3259,7 @@ tilepro_elf_relocate_section (bfd *outpu
 	      else if (h != NULL &&
 		       h->dynindx != -1
 		       && (! is_plt
-			   || !info->shared
+			   || !bfd_link_pic (info)
 			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
@@ -3316,7 +3313,7 @@ tilepro_elf_relocate_section (bfd *outpu
 			  if (indx == 0)
 			    {
 			      BFD_FAIL ();
-			      (*_bfd_error_handler)
+			      _bfd_error_handler
 				(_("%B: probably compiled without -fPIC?"),
 				 input_bfd);
 			      bfd_set_error (bfd_error_bad_value);
@@ -3345,7 +3342,7 @@ tilepro_elf_relocate_section (bfd *outpu
         case R_TILEPRO_IMM16_X1_TLS_LE_HI:
         case R_TILEPRO_IMM16_X0_TLS_LE_HA:
         case R_TILEPRO_IMM16_X1_TLS_LE_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      bfd_boolean skip;
@@ -3400,7 +3397,7 @@ tilepro_elf_relocate_section (bfd *outpu
 	  else if (h != NULL)
 	    {
 	      tls_type = tilepro_elf_hash_entry(h)->tls_type;
-	      if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+	      if (!bfd_link_pic (info) && h->dynindx == -1 && tls_type == GOT_TLS_IE)
 		r_type = tilepro_tls_translate_to_le (r_type);
 	    }
 	  if (tls_type == GOT_TLS_IE)
@@ -3450,8 +3447,10 @@ tilepro_elf_relocate_section (bfd *outpu
 	        bfd_boolean dyn;
 	        dyn = htab->elf.dynamic_sections_created;
 
-		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		    && (!info->shared
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		    && (!bfd_link_pic (info)
 			|| !SYMBOL_REFERENCES_LOCAL (info, h)))
 		  {
 		    indx = h->dynindx;
@@ -3460,7 +3459,7 @@ tilepro_elf_relocate_section (bfd *outpu
 
 	      /* The GOT entries have not been initialized yet.  Do it
 	         now, and emit any relocations. */
-	      if ((info->shared || indx != 0)
+	      if ((bfd_link_pic (info) || indx != 0)
 		  && (h == NULL
 		      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		      || h->root.type != bfd_link_hash_undefweak))
@@ -3565,7 +3564,8 @@ tilepro_elf_relocate_section (bfd *outpu
 	       && h->def_dynamic)
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	   input_bfd,
 	   input_section,
@@ -3651,15 +3651,14 @@ tilepro_elf_relocate_section (bfd *outpu
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -3680,11 +3679,8 @@ tilepro_elf_relocate_section (bfd *outpu
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -3783,7 +3779,7 @@ tilepro_elf_finish_dynamic_symbol (bfd *
 	 the symbol was forced to be local because of a version file.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic || h->dynindx == -1)
 	  && h->def_regular)
 	{
@@ -3812,14 +3808,15 @@ tilepro_elf_finish_dynamic_symbol (bfd *
       /* This symbols needs a copy reloc.  Set it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      s = htab->srelbss;
-      BFD_ASSERT (s != NULL);
-
       rela.r_offset = (h->root.u.def.value
 		       + h->root.u.def.section->output_section->vma
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_COPY);
       rela.r_addend = 0;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
       tilepro_elf_append_rela_32 (output_bfd, s, &rela);
     }
 
@@ -3919,7 +3916,7 @@ tilepro_elf_finish_dynamic_sections (bfd
     {
       if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
 	  return FALSE;
 	}
@@ -4060,6 +4057,7 @@ tilepro_additional_program_headers (bfd 
 #define elf_backend_plt_alignment 6
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size GOT_ENTRY_SIZE
+#define elf_backend_want_dynrelro 1
 #define elf_backend_rela_normal 1
 #define elf_backend_default_execstack 0
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilepro.h ./bfd/elf32-tilepro.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-tilepro.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-tilepro.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILEPro-specific support for 32-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-v850.c ./bfd/elf32-v850.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-v850.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-v850.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* V850-specific support for 32-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -57,7 +57,7 @@ v850_elf_check_relocs (bfd *abfd,
   int other = 0;
   const char *common = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
 #ifdef DEBUG
@@ -464,7 +464,7 @@ v850_elf_perform_lo16_relocation (bfd *a
 	}
       else
 	{
-	  (*_bfd_error_handler) (_("FAILED to find previous HI16 reloc"));
+	  _bfd_error_handler (_("FAILED to find previous HI16 reloc"));
 	  return FALSE;
 	}
     }
@@ -1898,6 +1898,7 @@ v850_elf_info_to_howto_rel (bfd *abfd AT
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_V850_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid V850 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1916,6 +1917,7 @@ v850_elf_info_to_howto_rela (bfd *abfd A
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_V850_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid V850 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -2243,7 +2245,7 @@ v850_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       /* FIXME: We should use the addend, but the COFF relocations don't.  */
@@ -2271,18 +2273,14 @@ v850_elf_relocate_section (bfd *output_b
 	  switch ((int) r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -2314,10 +2312,8 @@ v850_elf_relocate_section (bfd *output_b
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -2361,7 +2357,7 @@ v850_set_note (bfd * abfd, asection * s,
 
 static asection *
 v850_elf_make_note_section (bfd * abfd)
-{  
+{
   asection *s;
   bfd_byte *data;
   flagword flags;
@@ -2428,10 +2424,10 @@ v850_elf_set_note (bfd * abfd, enum v850
   return TRUE;
 }
 
-/* Copy backend specific data from one object module to another.  */
+/* Copy a v850 note section from one object module to another.  */
 
-static bfd_boolean
-v850_elf_copy_private_bfd_data (bfd * ibfd, bfd * obfd)
+static void
+v850_elf_copy_notes (bfd *ibfd, bfd *obfd)
 {
   asection * onotes;
   asection * inotes;
@@ -2440,15 +2436,16 @@ v850_elf_copy_private_bfd_data (bfd * ib
      skip the merge.  The normal input to output section
      copying will take care of everythng for us.  */
   if ((onotes = bfd_get_section_by_name (obfd, V850_NOTE_SECNAME)) == NULL)
-    return TRUE;
+    return;
 
-  if ((inotes = bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME)) != NULL)
+  if ((inotes = bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME)) == NULL)
+    return;
+
+  if (bfd_section_size (ibfd, inotes) == bfd_section_size (obfd, onotes))
     {
       bfd_byte * icont;
       bfd_byte * ocont;
 
-      BFD_ASSERT (bfd_section_size (ibfd, inotes) == bfd_section_size (obfd, onotes));
-
       if ((icont = elf_section_data (inotes)->this_hdr.contents) == NULL)
 	BFD_ASSERT (bfd_malloc_and_get_section (ibfd, inotes, & icont));
 
@@ -2458,12 +2455,19 @@ v850_elf_copy_private_bfd_data (bfd * ib
       /* Copy/overwrite notes from the input to the output.  */
       memcpy (ocont, icont, bfd_section_size (obfd, onotes));
     }
+}
 
-  return TRUE;
+/* Copy backend specific data from one object module to another.  */
+
+static bfd_boolean
+v850_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+  v850_elf_copy_notes (ibfd, obfd);
+  return _bfd_elf_copy_private_bfd_data (ibfd, obfd);
 }
 #define bfd_elf32_bfd_copy_private_bfd_data	v850_elf_copy_private_bfd_data
 
-static bfd_boolean 
+static bfd_boolean
 v850_elf_merge_notes (bfd * ibfd, bfd *obfd)
 {
   asection * onotes;
@@ -2502,7 +2506,7 @@ v850_elf_merge_notes (bfd * ibfd, bfd *o
 
 	  if (ival == 0 || ival == oval)
 	    continue;
-	  
+
 	  if (oval == 0)
 	    {
 	      bfd_put_32 (obfd, ival, odata);
@@ -2518,6 +2522,7 @@ v850_elf_merge_notes (bfd * ibfd, bfd *o
 	      if (oval == EF_RH850_DATA_ALIGN4)
 		{
 		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("error: %B needs 8-byte aligment but %B is set for 4-byte alignment"),
 				      ibfd, obfd);
 		  result = FALSE;
@@ -2532,8 +2537,10 @@ v850_elf_merge_notes (bfd * ibfd, bfd *o
 	    case V850_NOTE_DATA_SIZE:
 	      if (oval == EF_RH850_DOUBLE32)
 		{
-		  _bfd_error_handler (_("error: %B uses 64-bit doubles but %B uses 32-bit doubles"),
-				      ibfd, obfd);
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("error: %B uses 64-bit doubles but "
+		       "%B uses 32-bit doubles"), ibfd, obfd);
 		  result = FALSE;
 		}
 	      else
@@ -2545,8 +2552,10 @@ v850_elf_merge_notes (bfd * ibfd, bfd *o
 	    case V850_NOTE_FPU_INFO:
 	      if (oval == EF_RH850_FPU20)
 		{
-		  _bfd_error_handler (_("error: %B uses FPU-3.0 but %B only supports FPU-2.0"),
-				     ibfd, obfd);
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("error: %B uses FPU-3.0 but %B only supports FPU-2.0"),
+		     ibfd, obfd);
 		  result = FALSE;
 		}
 	      else
@@ -2587,7 +2596,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     case V850_NOTE_DATA_SIZE:
       fprintf (file, _(" size of doubles: "));
       switch (value)
@@ -2599,7 +2608,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     case V850_NOTE_FPU_INFO:
       fprintf (file, _(" FPU support required: "));
       switch (value)
@@ -2611,7 +2620,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     case V850_NOTE_SIMD_INFO:
       fprintf (file, _("SIMD use: "));
       switch (value)
@@ -2622,7 +2631,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     case V850_NOTE_CACHE_INFO:
       fprintf (file, _("CACHE use: "));
       switch (value)
@@ -2633,7 +2642,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     case V850_NOTE_MMU_INFO:
       fprintf (file, _("MMU use: "));
       switch (value)
@@ -2644,7 +2653,7 @@ print_v850_note (bfd * abfd, FILE * file
 	}
       fputc ('\n', file);
       break;
-	
+
     default:
       BFD_ASSERT (0);
     }
@@ -2756,8 +2765,9 @@ v850_elf_set_private_flags (bfd *abfd, f
    to the output object file when linking.  */
 
 static bfd_boolean
-v850_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+v850_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   bfd_boolean result = TRUE;
@@ -2800,8 +2810,8 @@ v850_elf_merge_private_bfd_data (bfd *ib
     {
       if ((in_flags & EF_V800_850E3) != (out_flags & EF_V800_850E3))
 	{
-	  _bfd_error_handler (_("%B: Architecture mismatch with previous modules"),
-			      ibfd);
+	  _bfd_error_handler
+	    (_("%B: Architecture mismatch with previous modules"), ibfd);
 	  elf_elfheader (obfd)->e_flags |= EF_V800_850E3;
 	}
 
@@ -2856,8 +2866,8 @@ v850_elf_merge_private_bfd_data (bfd *ib
 	  return result;
 	}
 
-      _bfd_error_handler (_("%B: Architecture mismatch with previous modules"),
-			  ibfd);
+      _bfd_error_handler
+	(_("%B: Architecture mismatch with previous modules"), ibfd);
     }
 
   return result;
@@ -3205,7 +3215,6 @@ v850_elf_relax_delete_bytes (bfd *abfd,
   Elf_Internal_Rela *irel;
   Elf_Internal_Rela *irelend;
   struct elf_link_hash_entry *sym_hash;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_External_Sym_Shndx *shndx;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -3230,8 +3239,17 @@ v850_elf_relax_delete_bytes (bfd *abfd,
   /* Adjust all the relocs.  */
   irel = elf_section_data (sec)->relocs;
   irelend = irel + sec->reloc_count;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+  if (elf_symtab_shndx_list (abfd))
+    {
+      Elf_Internal_Shdr *shndx_hdr;
+
+      shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+      shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+    }
+  else
+    {
+      shndx = NULL;
+    }
 
   for (; irel < irelend; irel++)
     {
@@ -3433,7 +3451,7 @@ v850_elf_relax_section (bfd *abfd,
 
   *again = FALSE;
 
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0)
     return TRUE;
@@ -3580,19 +3598,23 @@ v850_elf_relax_section (bfd *abfd,
 		}
 	      else
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insns",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+		       "unrecognized insns"),
+		     bfd_get_filename (abfd), (unsigned long) irel->r_offset);
 		  continue;
 		}
 
 	      if (no_match >= 0)
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insn 0x%x",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset+no_match, insn[no_match]));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+		       "unrecognized insn 0x%x"),
+		     bfd_get_filename (abfd),
+		     (unsigned long) irel->r_offset + no_match,
+		     insn[no_match]);
 		  continue;
 		}
 
@@ -3631,9 +3653,11 @@ v850_elf_relax_section (bfd *abfd,
 		  || lo_irelfn == irelend
 		  || irelcall  == irelend)
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset ));
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+		       "unrecognized reloc"),
+		     bfd_get_filename (abfd), (unsigned long) irel->r_offset);
 
 		  continue;
 		}
@@ -3669,10 +3693,12 @@ v850_elf_relax_section (bfd *abfd,
 
 	      if (symval + irelcall->r_addend != irelcall->r_offset + 4)
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc 0x%lx",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset, irelcall->r_offset ));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGCALL points to "
+		       "unrecognized reloc 0x%lx"),
+		     bfd_get_filename (abfd), (unsigned long) irel->r_offset,
+		     irelcall->r_offset);
 		  continue;
 		}
 
@@ -3810,19 +3836,23 @@ v850_elf_relax_section (bfd *abfd,
 		}
 	      else
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insns",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGJUMP points to "
+		       "unrecognized insns"),
+		     bfd_get_filename (abfd), (unsigned long) irel->r_offset);
 		  continue;
 		}
 
 	      if (no_match >= 0)
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insn 0x%x",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset+no_match, insn[no_match]));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGJUMP points to "
+		       "unrecognized insn 0x%x"),
+		     bfd_get_filename (abfd),
+		     (unsigned long) irel->r_offset + no_match,
+		     insn[no_match]);
 		  continue;
 		}
 
@@ -3850,10 +3880,11 @@ v850_elf_relax_section (bfd *abfd,
 	      if (   hi_irelfn == irelend
 		  || lo_irelfn == irelend)
 		{
-		  ((*_bfd_error_handler)
-		   ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized reloc",
-		    bfd_get_filename (abfd), (unsigned long) irel->r_offset ));
-
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("%s: 0x%lx: warning: R_V850_LONGJUMP points to "
+		       "unrecognized reloc"),
+		     bfd_get_filename (abfd), (unsigned long) irel->r_offset);
 		  continue;
 		}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-vax.c ./bfd/elf32-vax.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-vax.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-vax.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* VAX series support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Contributed by Matt Thomas <matt@3am-software.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -50,7 +50,6 @@ static bfd_vma elf_vax_plt_sym_val (bfd_
 				    const arelent *);
 
 static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
-static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
 static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
 
 static reloc_howto_type howto_table[] = {
@@ -287,8 +286,9 @@ rtype_to_howto (bfd *abfd, arelent *cach
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_VAX_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised VAX reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised VAX reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_VAX_NONE;
     }
@@ -499,8 +499,9 @@ elf32_vax_set_private_flags (bfd *abfd, 
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
 static bfd_boolean
-elf32_vax_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_vax_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword in_flags;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -560,19 +561,15 @@ elf_vax_check_relocs (bfd *abfd, struct 
   struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
-  asection *sgot;
-  asection *srelgot;
   asection *sreloc;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
 
-  sgot = NULL;
-  srelgot = NULL;
   sreloc = NULL;
 
   rel_end = relocs + sec->reloc_count;
@@ -619,31 +616,6 @@ elf_vax_check_relocs (bfd *abfd, struct 
 		return FALSE;
 	    }
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
-
-	  if (srelgot == NULL
-	      && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || !bfd_set_section_alignment (dynobj, srelgot, 2))
-		    return FALSE;
-		}
-	    }
-
 	  if (h != NULL)
 	    {
 	      struct elf_vax_link_hash_entry *eh;
@@ -658,7 +630,8 @@ elf_vax_check_relocs (bfd *abfd, struct 
 		{
 		  h->got.refcount++;
 		  if (eh->got_addend != (bfd_vma) rel->r_addend)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: warning: GOT addend of %ld to `%s' does"
 			 " not match previous GOT addend of %ld"),
 			 bfd_get_filename (abfd), rel->r_addend,
@@ -703,7 +676,7 @@ elf_vax_check_relocs (bfd *abfd, struct 
 	     will be set later (it is never cleared).  We account for that
 	     possibility below by storing information in the
 	     pcrel_relocs_copied field of the hash table entry.  */
-	  if (!(info->shared
+	  if (!(bfd_link_pic (info)
 		&& (sec->flags & SEC_ALLOC) != 0
 		&& h != NULL
 		&& (!info->symbolic
@@ -745,7 +718,7 @@ elf_vax_check_relocs (bfd *abfd, struct 
 
 	  /* If we are creating a shared library, we need to copy the
 	     reloc into the shared library.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0)
 	    {
 	      /* When creating a shared object, we must copy these
@@ -860,7 +833,7 @@ elf_vax_gc_sweep_hook (bfd *abfd, struct
   const Elf_Internal_Rela *rel, *relend;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -955,7 +928,7 @@ elf_vax_adjust_dynamic_symbol (struct bf
 	  return TRUE;
 	}
 
-      s = bfd_get_linker_section (dynobj, ".plt");
+      s = elf_hash_table (info)->splt;
       BFD_ASSERT (s != NULL);
 
       /* If this is the first .plt entry, make room for the special
@@ -970,7 +943,7 @@ elf_vax_adjust_dynamic_symbol (struct bf
 	 location in the .plt.  This is required to make function
 	 pointers compare as equal between the normal executable and
 	 the shared library.  */
-      if (!info->shared
+      if (!bfd_link_pic (info)
 	  && !h->def_regular)
 	{
 	  h->root.u.def.section = s;
@@ -985,13 +958,13 @@ elf_vax_adjust_dynamic_symbol (struct bf
       /* We also need to make an entry in the .got.plt section, which
 	 will be placed in the .got section by the linker script.  */
 
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = elf_hash_table (info)->sgotplt;
       BFD_ASSERT (s != NULL);
       s->size += 4;
 
       /* We also need to make an entry in the .rela.plt section.  */
 
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = elf_hash_table (info)->srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
 
@@ -1021,7 +994,7 @@ elf_vax_adjust_dynamic_symbol (struct bf
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* We must allocate the symbol in our .dynbss section, which will
@@ -1086,13 +1059,13 @@ elf_vax_always_size_sections (bfd *outpu
 	 not actually use these entries.  Reset the size of .rela.got
 	 and .got, which will cause them to get stripped from the output
 	 file below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
 	s->size = 0;
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = elf_hash_table (info)->sgotplt;
       if (s != NULL)
 	s->size = 0;
-      s = bfd_get_linker_section (dynobj, ".got");
+      s = elf_hash_table (info)->sgot;
       if (s != NULL)
 	s->size = 0;
     }
@@ -1124,7 +1097,7 @@ elf_vax_size_dynamic_sections (bfd *outp
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -1137,7 +1110,7 @@ elf_vax_size_dynamic_sections (bfd *outp
      relative relocs against symbols defined in a regular object.  We
      allocated space for them in the check_relocs routine, but we will not
      fill them in in the relocate_section routine.  */
-  if (info->shared && info->symbolic)
+  if (bfd_link_pic (info) && info->symbolic)
     elf_vax_link_hash_traverse (elf_hash_table (info),
 				elf_vax_discard_copies,
 				NULL);
@@ -1244,7 +1217,7 @@ elf_vax_size_dynamic_sections (bfd *outp
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -1322,8 +1295,8 @@ elf_vax_instantiate_got_entries (struct 
   dynobj = elf_hash_table (info)->dynobj;
   BFD_ASSERT (dynobj != NULL);
 
-  sgot = bfd_get_linker_section (dynobj, ".got");
-  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+  sgot = elf_hash_table (info)->sgot;
+  srelgot = elf_hash_table (info)->srelgot;
 
   if (SYMBOL_REFERENCES_LOCAL (info, h))
     {
@@ -1359,7 +1332,6 @@ elf_vax_relocate_section (bfd *output_bf
 			  Elf_Internal_Sym *local_syms,
 			  asection **local_sections)
 {
-  bfd *dynobj;
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   bfd_vma plt_index;
@@ -1371,7 +1343,6 @@ elf_vax_relocate_section (bfd *output_bf
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
-  dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
 
@@ -1431,10 +1402,10 @@ elf_vax_relocate_section (bfd *output_bf
 		      && h->got.offset != (bfd_vma) -1
 		      && !h->forced_local
 		      && elf_hash_table (info)->dynamic_sections_created
-		      && (! info->shared
+		      && (! bfd_link_pic (info)
 			  || (! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular))
-		  || (info->shared
+		  || (bfd_link_pic (info)
 		      && ((! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular)
 		      && ((input_section->flags & SEC_ALLOC) != 0
@@ -1458,7 +1429,7 @@ elf_vax_relocate_section (bfd *output_bf
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -1476,11 +1447,8 @@ elf_vax_relocate_section (bfd *output_bf
 	  {
 	    bfd_vma off;
 
-	    if (sgot == NULL)
-	      {
-		sgot = bfd_get_linker_section (dynobj, ".got");
-		BFD_ASSERT (sgot != NULL);
-	      }
+	    sgot = elf_hash_table (info)->sgot;
+	    BFD_ASSERT (sgot != NULL);
 
 	    off = h->got.offset;
 	    BFD_ASSERT (off < sgot->size);
@@ -1502,7 +1470,7 @@ elf_vax_relocate_section (bfd *output_bf
 	     reloc refers to is in a shared lib, then we made a PLT
 	     entry for this symbol and need to handle the reloc like
 	     a PLT reloc.  */
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	     goto r_vax_pc32_shared;
 	  /* Fall through.  */
 	case R_VAX_PLT32:
@@ -1515,17 +1483,11 @@ elf_vax_relocate_section (bfd *output_bf
 	      || h->plt.offset == (bfd_vma) -1)
 	    break;
 
-	  if (splt == NULL)
-	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      BFD_ASSERT (splt != NULL);
-	    }
+	  splt = elf_hash_table (info)->splt;
+	  BFD_ASSERT (splt != NULL);
 
-	  if (sgotplt == NULL)
-	    {
-	      sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-	      BFD_ASSERT (sgotplt != NULL);
-	    }
+	  sgotplt = elf_hash_table (info)->sgotplt;
+	  BFD_ASSERT (sgotplt != NULL);
 
 	  plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
 
@@ -1545,7 +1507,8 @@ elf_vax_relocate_section (bfd *output_bf
 	      h->plt.offset |= 1;
 	    }
 	  else if (rel->r_addend != 0)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: warning: PLT addend of %d to `%s' from %s section ignored"),
 		      bfd_get_filename (input_bfd), rel->r_addend,
 		      h->root.root.string,
@@ -1565,7 +1528,7 @@ elf_vax_relocate_section (bfd *output_bf
 	case R_VAX_8:
 	case R_VAX_16:
 	case R_VAX_32:
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && r_symndx != STN_UNDEF
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && ((r_type != R_VAX_PC8
@@ -1670,13 +1633,15 @@ elf_vax_relocate_section (bfd *output_bf
 		      && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT))
 		{
 		  if (h != NULL)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: warning: %s relocation against symbol `%s' from %s section"),
 		      bfd_get_filename (input_bfd), howto->name,
 		      h->root.root.string,
 		      bfd_get_section_name (input_bfd, input_section));
 		  else
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: warning: %s relocation to 0x%x from %s section"),
 		      bfd_get_filename (input_bfd), howto->name,
 		      outrel.r_addend,
@@ -1738,11 +1703,9 @@ elf_vax_relocate_section (bfd *output_bf
 		    if (*name == '\0')
 		      name = bfd_section_name (input_bfd, sec);
 		  }
-		if (!(info->callbacks->reloc_overflow
-		      (info, (h ? &h->root : NULL), name, howto->name,
-		       (bfd_vma) 0, input_bfd, input_section,
-		       rel->r_offset)))
-		  return FALSE;
+		info->callbacks->reloc_overflow
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      }
 	      break;
 	    }
@@ -1779,9 +1742,9 @@ elf_vax_finish_dynamic_symbol (bfd *outp
 	 it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      sgot = bfd_get_linker_section (dynobj, ".got.plt");
-      srela = bfd_get_linker_section (dynobj, ".rela.plt");
+      splt = elf_hash_table (info)->splt;
+      sgot = elf_hash_table (info)->sgotplt;
+      srela = elf_hash_table (info)->srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
 
       addend = 2 * (h->plt.offset & 1);
@@ -1843,8 +1806,8 @@ elf_vax_finish_dynamic_symbol (bfd *outp
 
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srela = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srela = elf_hash_table (info)->srelgot;
       BFD_ASSERT (sgot != NULL && srela != NULL);
 
       rela.r_offset = (sgot->output_section->vma
@@ -1901,7 +1864,7 @@ elf_vax_finish_dynamic_sections (bfd *ou
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = elf_hash_table (info)->sgotplt;
   BFD_ASSERT (sgot != NULL);
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
@@ -1910,7 +1873,7 @@ elf_vax_finish_dynamic_sections (bfd *ou
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
@@ -1918,7 +1881,6 @@ elf_vax_finish_dynamic_sections (bfd *ou
       for (; dyncon < dynconend; dyncon++)
 	{
 	  Elf_Internal_Dyn dyn;
-	  const char *name;
 	  asection *s;
 
 	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
@@ -1929,37 +1891,20 @@ elf_vax_finish_dynamic_sections (bfd *ou
 	      break;
 
 	    case DT_PLTGOT:
-	      name = ".got";
+	      s = elf_hash_table (info)->sgotplt;
 	      goto get_vma;
 	    case DT_JMPREL:
-	      name = ".rela.plt";
+	      s = elf_hash_table (info)->srelplt;
 	    get_vma:
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      BFD_ASSERT (s != NULL);
+	      s = elf_hash_table (info)->srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
@@ -2067,5 +2012,6 @@ elf_vax_plt_sym_val (bfd_vma i, const as
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	16
 #define elf_backend_rela_normal		1
+#define elf_backend_dtrel_excludes_plt	1
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-visium.c ./bfd/elf32-visium.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-visium.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-visium.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* Visium-specific support for 32-bit ELF.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -276,32 +276,6 @@ static reloc_howto_type visium_elf_vtent
 	 0,			   /* dst_mask */
 	 FALSE);		   /* pcrel_offset */
 
-/* Map BFD reloc types to VISIUM ELF reloc types.  */
-struct visium_reloc_map
-{
-  bfd_reloc_code_real_type bfd_reloc_val;
-  unsigned int visium_reloc_val;
-};
-
-static const struct visium_reloc_map visium_reloc_map[] = {
-  {BFD_RELOC_NONE, 		R_VISIUM_NONE},
-  {BFD_RELOC_8, 		R_VISIUM_8},
-  {BFD_RELOC_16,		R_VISIUM_16},
-  {BFD_RELOC_32, 		R_VISIUM_32},
-  {BFD_RELOC_8_PCREL,		R_VISIUM_8_PCREL},
-  {BFD_RELOC_16_PCREL,		R_VISIUM_16_PCREL},
-  {BFD_RELOC_32_PCREL,		R_VISIUM_32_PCREL},
-  {BFD_RELOC_VISIUM_REL16,	R_VISIUM_PC16},
-  {BFD_RELOC_VISIUM_HI16,	R_VISIUM_HI16},
-  {BFD_RELOC_VISIUM_LO16,	R_VISIUM_LO16},
-  {BFD_RELOC_VISIUM_IM16,	R_VISIUM_IM16},
-  {BFD_RELOC_VISIUM_HI16_PCREL,	R_VISIUM_HI16_PCREL},
-  {BFD_RELOC_VISIUM_LO16_PCREL,	R_VISIUM_LO16_PCREL},
-  {BFD_RELOC_VISIUM_IM16_PCREL,	R_VISIUM_IM16_PCREL},
-  {BFD_RELOC_VTABLE_INHERIT,	R_VISIUM_GNU_VTINHERIT},
-  {BFD_RELOC_VTABLE_ENTRY,	R_VISIUM_GNU_VTENTRY},
-};
-
 /* Return the parity bit for INSN shifted to its final position.  */
 
 static bfd_vma
@@ -503,6 +477,7 @@ visium_info_to_howto_rela (bfd *abfd ATT
     default:
       if (r_type >= (unsigned int) R_VISIUM_max)
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: invalid Visium reloc number: %d"), abfd, r_type);
 	  r_type = 0;
 	}
@@ -524,7 +499,7 @@ visium_elf_check_relocs (bfd *abfd, stru
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -649,7 +624,7 @@ visium_elf_relocate_section (bfd *output
 	  continue;
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -688,13 +663,13 @@ visium_elf_relocate_section (bfd *output
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
 		 input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
+	      (*info->callbacks->undefined_symbol)
 		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
@@ -716,11 +691,8 @@ visium_elf_relocate_section (bfd *output
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (!r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -792,8 +764,9 @@ visium_elf_copy_private_bfd_data (bfd *i
    file to the output object file when linking.  */
 
 static bfd_boolean
-visium_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
   flagword mismatch;
@@ -840,9 +813,9 @@ visium_elf_merge_private_bfd_data (bfd *
 
       if (mismatch)
 	_bfd_error_handler
-	  (_
-	   ("%s: compiled %s -mtune=%s and linked with modules"
-	    " compiled %s -mtune=%s"),
+	  /* xgettext:c-format */
+	  (_("%s: compiled %s -mtune=%s and linked with modules"
+	     " compiled %s -mtune=%s"),
 	   bfd_get_filename (ibfd), new_opt_with, opt_arch, old_opt_with,
 	   opt_arch);
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xc16x.c ./bfd/elf32-xc16x.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xc16x.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-xc16x.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Infineon XC16X-specific support for 16-bit ELF.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by KPIT Cummins Infosystems
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -392,7 +392,7 @@ elf32_xc16x_relocate_section (bfd *outpu
 					   rel, 1, relend, howto, 0, contents);
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       elf32_xc16x_final_link_relocate (r_type, input_bfd, output_bfd,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xgate.c ./bfd/elf32-xgate.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xgate.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-xgate.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Freescale XGATE-specific support for 32-bit ELF
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
    Contributed by Sean Keys(skeys@ipdatasys.com)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -424,6 +424,7 @@ xgate_info_to_howto_rel (bfd *abfd ATTRI
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_XGATE_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid XGate reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -654,16 +655,6 @@ _bfd_xgate_elf_set_private_flags (bfd *a
   return TRUE;
 }
 
-/* Merge backend specific data from an object file to the output
-   object file when linking.  */
-
-bfd_boolean
-_bfd_xgate_elf_merge_private_bfd_data (bfd *ibfd ATTRIBUTE_UNUSED,
-				       bfd *obfd ATTRIBUTE_UNUSED)
-{
-  return TRUE;
-}
-
 bfd_boolean
 _bfd_xgate_elf_print_private_bfd_data (bfd *abfd, void *ptr)
 {
@@ -722,7 +713,6 @@ elf32_xgate_post_process_headers (bfd *a
 #define elf_backend_add_symbol_hook          elf32_xgate_add_symbol_hook
 
 #define bfd_elf32_bfd_link_hash_table_create xgate_elf_bfd_link_hash_table_create
-#define bfd_elf32_bfd_merge_private_bfd_data _bfd_xgate_elf_merge_private_bfd_data
 #define bfd_elf32_bfd_set_private_flags      _bfd_xgate_elf_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data _bfd_xgate_elf_print_private_bfd_data
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xgate.h ./bfd/elf32-xgate.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xgate.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-xgate.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Freescale XGATE-specific support for 32-bit ELF
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Sean Keys (skeys@ipdatasys.com)
    (Heavily copied from the HC11 port by Stephane Carrez (stcarrez@nerim.fr))
@@ -29,7 +29,6 @@
 #include "elf/xgate.h"
 
 /* Set and control ELF flags in ELF header.  */
-extern bfd_boolean _bfd_xgate_elf_merge_private_bfd_data (bfd*,bfd*);
 extern bfd_boolean _bfd_xgate_elf_set_private_flags (bfd*,flagword);
 extern bfd_boolean _bfd_xgate_elf_print_private_bfd_data (bfd*, void*);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xstormy16.c ./bfd/elf32-xstormy16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xstormy16.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-xstormy16.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Xstormy16-specific support for 32-bit ELF.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -411,13 +411,12 @@ xstormy16_elf_check_relocs (bfd *abfd,
   asection *splt;
   bfd *dynobj;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
   local_plt_offsets = elf_local_got_offsets (abfd);
-  splt = NULL;
   dynobj = elf_hash_table(info)->dynobj;
 
   relend = relocs + sec->reloc_count;
@@ -457,21 +456,19 @@ xstormy16_elf_check_relocs (bfd *abfd,
 
 	  if (dynobj == NULL)
 	    elf_hash_table (info)->dynobj = dynobj = abfd;
+	  splt = elf_hash_table (info)->splt;
 	  if (splt == NULL)
 	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      if (splt == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY | SEC_CODE);
-
-		  splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
-							     flags);
-		  if (splt == NULL
-		      || ! bfd_set_section_alignment (dynobj, splt, 1))
-		    return FALSE;
-		}
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+				| SEC_IN_MEMORY | SEC_LINKER_CREATED
+				| SEC_READONLY | SEC_CODE);
+
+	      splt = bfd_make_section_anyway_with_flags (dynobj, ".plt",
+							 flags);
+	      elf_hash_table (info)->splt = splt;
+	      if (splt == NULL
+		  || ! bfd_set_section_alignment (dynobj, splt, 1))
+		return FALSE;
 	    }
 
 	  if (h != NULL)
@@ -589,7 +586,7 @@ xstormy16_elf_relax_section (bfd *dynobj
   /* Assume nothing changes.  */
   *again = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* We only relax the .plt section at the moment.  */
@@ -712,14 +709,14 @@ xstormy16_elf_always_size_sections (bfd 
   bfd *dynobj;
   asection *splt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj == NULL)
     return TRUE;
 
-  splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
   BFD_ASSERT (splt != NULL);
 
   splt->contents = bfd_zalloc (dynobj, splt->size);
@@ -773,17 +770,13 @@ xstormy16_elf_relocate_section (bfd *   
   struct elf_link_hash_entry ** sym_hashes;
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
-  bfd *dynobj;
   asection *splt;
 
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
 
-  dynobj = elf_hash_table (info)->dynobj;
-  splt = NULL;
-  if (dynobj != NULL)
-    splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table (info)->splt;
 
   for (rel = relocs; rel < relend; rel ++)
     {
@@ -829,7 +822,7 @@ xstormy16_elf_relocate_section (bfd *   
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL)
@@ -920,15 +913,14 @@ xstormy16_elf_relocate_section (bfd *   
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -949,11 +941,8 @@ xstormy16_elf_relocate_section (bfd *   
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -966,14 +955,13 @@ static bfd_boolean
 xstormy16_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
 				       struct bfd_link_info *info)
 {
-  bfd *dynobj;
-  asection *splt;
+  bfd *dynobj = elf_hash_table (info)->dynobj;
+  asection *splt = elf_hash_table (info)->splt;
 
   /* As an extra sanity check, verify that all plt entries have
      been filled in.  */
 
-  if ((dynobj = elf_hash_table (info)->dynobj) != NULL
-      && (splt = bfd_get_linker_section (dynobj, ".plt")) != NULL)
+  if (dynobj != NULL && splt != NULL)
     {
       bfd_byte *contents = splt->contents;
       unsigned int i, size = splt->size;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xtensa.c ./bfd/elf32-xtensa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf32-xtensa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf32-xtensa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Xtensa-specific support for 32-bit ELF.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -110,7 +110,6 @@ static bfd_boolean xtensa_is_proptable_s
 static int internal_reloc_compare (const void *, const void *);
 static int internal_reloc_matches (const void *, const void *);
 static asection *xtensa_get_property_section (asection *, const char *);
-extern asection *xtensa_make_property_section (asection *, const char *);
 static flagword xtensa_get_property_predef_flags (asection *);
 
 /* Other functions called directly by the linker.  */
@@ -482,6 +481,7 @@ elf_xtensa_info_to_howto_rela (bfd *abfd
 
   if (r_type >= (unsigned int) R_XTENSA_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid XTENSA reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -521,7 +521,9 @@ elf_xtensa_info_to_howto_rela (bfd *abfd
 
 static const bfd_byte elf_xtensa_be_plt_entry[PLT_ENTRY_SIZE] =
 {
+#if XSHAL_ABI == XTHAL_ABI_WINDOWED
   0x6c, 0x10, 0x04,	/* entry sp, 32 */
+#endif
   0x18, 0x00, 0x00,	/* l32r  a8, [got entry for rtld's resolver] */
   0x1a, 0x00, 0x00,	/* l32r  a10, [got entry for rtld's link map] */
   0x1b, 0x00, 0x00,	/* l32r  a11, [literal for reloc index] */
@@ -531,7 +533,9 @@ static const bfd_byte elf_xtensa_be_plt_
 
 static const bfd_byte elf_xtensa_le_plt_entry[PLT_ENTRY_SIZE] =
 {
+#if XSHAL_ABI == XTHAL_ABI_WINDOWED
   0x36, 0x41, 0x00,	/* entry sp, 32 */
+#endif
   0x81, 0x00, 0x00,	/* l32r  a8, [got entry for rtld's resolver] */
   0xa1, 0x00, 0x00,	/* l32r  a10, [got entry for rtld's link map] */
   0xb1, 0x00, 0x00,	/* l32r  a11, [literal for reloc index] */
@@ -596,11 +600,6 @@ struct elf_xtensa_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sgotloc;
   asection *spltlittbl;
 
@@ -909,8 +908,9 @@ xtensa_read_table_entries (bfd *abfd,
 	  if (blocks[blk - 1].address == blocks[blk].address &&
 	      blocks[blk - 1].size != 0)
 	    {
-	      (*_bfd_error_handler) (_("%B(%A): invalid property table"),
-				     abfd, section);
+	      /* xgettext:c-format */
+	      _bfd_error_handler (_("%B(%A): invalid property table"),
+				  abfd, section);
 	      bfd_set_error (bfd_error_bad_value);
 	      free (blocks);
 	      return -1;
@@ -971,7 +971,7 @@ elf_xtensa_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable || (sec->flags & SEC_ALLOC) == 0)
+  if (bfd_link_relocatable (info) || (sec->flags & SEC_ALLOC) == 0)
     return TRUE;
 
   BFD_ASSERT (is_xtensa_elf (abfd));
@@ -1000,8 +1000,9 @@ elf_xtensa_check_relocs (bfd *abfd,
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1021,7 +1022,7 @@ elf_xtensa_check_relocs (bfd *abfd,
       switch (r_type)
 	{
 	case R_XTENSA_TLSDESC_FN:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      tls_type = GOT_TLS_GD;
 	      is_got = TRUE;
@@ -1032,7 +1033,7 @@ elf_xtensa_check_relocs (bfd *abfd,
 	  break;
 
 	case R_XTENSA_TLSDESC_ARG:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      tls_type = GOT_TLS_GD;
 	      is_got = TRUE;
@@ -1046,7 +1047,7 @@ elf_xtensa_check_relocs (bfd *abfd,
 	  break;
 
 	case R_XTENSA_TLS_DTPOFF:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    tls_type = GOT_TLS_GD;
 	  else
 	    tls_type = GOT_TLS_IE;
@@ -1054,9 +1055,9 @@ elf_xtensa_check_relocs (bfd *abfd,
 
 	case R_XTENSA_TLS_TPOFF:
 	  tls_type = GOT_TLS_IE;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    is_got = TRUE;
 	  break;
 
@@ -1176,7 +1177,8 @@ elf_xtensa_check_relocs (bfd *abfd,
 	    tls_type |= old_tls_type;
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: `%s' accessed both as normal and thread local symbol"),
 		 abfd,
 		 h ? h->root.root.string : "<local>");
@@ -1201,7 +1203,7 @@ static void
 elf_xtensa_make_sym_local (struct bfd_link_info *info,
                            struct elf_link_hash_entry *h)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (h->plt.refcount > 0)
         {
@@ -1288,7 +1290,7 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
   if (htab == NULL)
     return FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   if ((sec->flags & SEC_ALLOC) == 0)
@@ -1322,7 +1324,7 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
       switch (r_type)
 	{
 	case R_XTENSA_TLSDESC_FN:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      is_got = TRUE;
 	      is_tlsfunc = TRUE;
@@ -1330,7 +1332,7 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
 	  break;
 
 	case R_XTENSA_TLSDESC_ARG:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    is_got = TRUE;
 	  else
 	    {
@@ -1340,7 +1342,7 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
 	  break;
 
 	case R_XTENSA_TLS_TPOFF:
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    is_got = TRUE;
 	  break;
 
@@ -1416,11 +1418,6 @@ elf_xtensa_create_dynamic_sections (bfd 
   /* First do all the standard stuff.  */
   if (! _bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
-  htab->splt = bfd_get_linker_section (dynobj, ".plt");
-  htab->srelplt = bfd_get_linker_section (dynobj, ".rela.plt");
-  htab->sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got");
 
   /* Create any extra PLT sections in case check_relocs has already
      been called on all the non-dynamic input files.  */
@@ -1432,8 +1429,8 @@ elf_xtensa_create_dynamic_sections (bfd 
   flags = noalloc_flags | SEC_ALLOC | SEC_LOAD;
 
   /* Mark the ".got.plt" section READONLY.  */
-  if (htab->sgotplt == NULL
-      || ! bfd_set_section_flags (dynobj, htab->sgotplt, flags))
+  if (htab->elf.sgotplt == NULL
+      || ! bfd_set_section_flags (dynobj, htab->elf.sgotplt, flags))
     return FALSE;
 
   /* Create ".got.loc" (literal tables for use by dynamic linker).  */
@@ -1551,10 +1548,10 @@ elf_xtensa_allocate_dynrelocs (struct el
     elf_xtensa_make_sym_local (info, h);
 
   if (h->plt.refcount > 0)
-    htab->srelplt->size += (h->plt.refcount * sizeof (Elf32_External_Rela));
+    htab->elf.srelplt->size += (h->plt.refcount * sizeof (Elf32_External_Rela));
 
   if (h->got.refcount > 0)
-    htab->srelgot->size += (h->got.refcount * sizeof (Elf32_External_Rela));
+    htab->elf.srelgot->size += (h->got.refcount * sizeof (Elf32_External_Rela));
 
   return TRUE;
 }
@@ -1596,8 +1593,8 @@ elf_xtensa_allocate_local_got_size (stru
 	    }
 
 	  if (local_got_refcounts[j] > 0)
-	    htab->srelgot->size += (local_got_refcounts[j]
-				    * sizeof (Elf32_External_Rela));
+	    htab->elf.srelgot->size += (local_got_refcounts[j]
+					* sizeof (Elf32_External_Rela));
 	}
     }
 }
@@ -1625,19 +1622,19 @@ elf_xtensa_size_dynamic_sections (bfd *o
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj == NULL)
     abort ();
-  srelgot = htab->srelgot;
-  srelplt = htab->srelplt;
+  srelgot = htab->elf.srelgot;
+  srelplt = htab->elf.srelplt;
 
   if (elf_hash_table (info)->dynamic_sections_created)
     {
-      BFD_ASSERT (htab->srelgot != NULL
-		  && htab->srelplt != NULL
-		  && htab->sgot != NULL
+      BFD_ASSERT (htab->elf.srelgot != NULL
+		  && htab->elf.srelplt != NULL
+		  && htab->elf.sgot != NULL
 		  && htab->spltlittbl != NULL
 		  && htab->sgotloc != NULL);
 
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -1647,7 +1644,7 @@ elf_xtensa_size_dynamic_sections (bfd *o
 	}
 
       /* Allocate room for one word in ".got".  */
-      htab->sgot->size = 4;
+      htab->elf.sgot->size = 4;
 
       /* Allocate space in ".rela.got" for literals that reference global
 	 symbols and space in ".rela.plt" for literals that have PLT
@@ -1659,7 +1656,7 @@ elf_xtensa_size_dynamic_sections (bfd *o
       /* If we are generating a shared object, we also need space in
 	 ".rela.got" for R_XTENSA_RELATIVE relocs for literals that
 	 reference local symbols.  */
-      if (info->shared)
+      if (bfd_link_pic (info))
 	elf_xtensa_allocate_local_got_size (info);
 
       /* Allocate space in ".plt" to match the size of ".rela.plt".  For
@@ -1815,7 +1812,7 @@ elf_xtensa_size_dynamic_sections (bfd *o
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2317,7 +2314,7 @@ elf_xtensa_create_plt_entry (struct bfd_
 {
   asection *splt, *sgotplt;
   bfd_vma plt_base, got_base;
-  bfd_vma code_offset, lit_offset;
+  bfd_vma code_offset, lit_offset, abi_offset;
   int chunk;
 
   chunk = reloc_index / PLT_ENTRIES_PER_CHUNK;
@@ -2342,15 +2339,16 @@ elf_xtensa_create_plt_entry (struct bfd_
 	   ? elf_xtensa_be_plt_entry
 	   : elf_xtensa_le_plt_entry),
 	  PLT_ENTRY_SIZE);
+  abi_offset = XSHAL_ABI == XTHAL_ABI_WINDOWED ? 3 : 0;
   bfd_put_16 (output_bfd, l32r_offset (got_base + 0,
-				       plt_base + code_offset + 3),
-	      splt->contents + code_offset + 4);
+				       plt_base + code_offset + abi_offset),
+	      splt->contents + code_offset + abi_offset + 1);
   bfd_put_16 (output_bfd, l32r_offset (got_base + 4,
-				       plt_base + code_offset + 6),
-	      splt->contents + code_offset + 7);
+				       plt_base + code_offset + abi_offset + 3),
+	      splt->contents + code_offset + abi_offset + 4);
   bfd_put_16 (output_bfd, l32r_offset (got_base + lit_offset,
-				       plt_base + code_offset + 9),
-	      splt->contents + code_offset + 10);
+				       plt_base + code_offset + abi_offset + 6),
+	      splt->contents + code_offset + abi_offset + 7);
 
   return plt_base + code_offset;
 }
@@ -2627,7 +2625,7 @@ elf_xtensa_relocate_section (bfd *output
       unresolved_reloc = FALSE;
       warned = FALSE;
 
-      if (howto->partial_inplace && !info->relocatable)
+      if (howto->partial_inplace && !bfd_link_relocatable (info))
 	{
 	  /* Because R_XTENSA_32 was made partial_inplace to fix some
 	     problems with DWARF info in partial links, there may be
@@ -2665,7 +2663,7 @@ elf_xtensa_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  bfd_vma dest_addr;
 	  asection * sym_sec = get_elf_r_symndx_section (input_bfd, r_symndx);
@@ -2697,12 +2695,10 @@ elf_xtensa_relocate_section (bfd *output
 	      r = contract_asm_expansion (contents, input_size, rel,
 					  &error_message);
 	      if (r != bfd_reloc_ok)
-		{
-		  if (!((*info->callbacks->reloc_dangerous)
-			(info, error_message, input_bfd, input_section,
-			 rel->r_offset)))
-		    return FALSE;
-		}
+		(*info->callbacks->reloc_dangerous)
+		  (info, error_message,
+		   input_bfd, input_section, rel->r_offset);
+
 	      r_type = ELF32_R_TYPE (rel->r_info);
 	    }
 
@@ -2754,12 +2750,9 @@ elf_xtensa_relocate_section (bfd *output
 		}
 	    }
 	  if (r != bfd_reloc_ok)
-	    {
-	      if (!((*info->callbacks->reloc_dangerous)
-		    (info, error_message, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_dangerous)
+	      (info, error_message,
+	       input_bfd, input_section, rel->r_offset);
 
 	  /* Done with work for relocatable link; continue with next reloc.  */
 	  continue;
@@ -2778,7 +2771,8 @@ elf_xtensa_relocate_section (bfd *output
       if (rel->r_offset >= input_size
 	  && ELF32_R_TYPE (rel->r_info) != R_XTENSA_NONE)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): relocation offset out of range (size=0x%x)"),
 	     input_bfd, input_section, rel->r_offset, input_size);
 	  bfd_set_error (bfd_error_bad_value);
@@ -2802,9 +2796,11 @@ elf_xtensa_relocate_section (bfd *output
 	      || h->root.type == bfd_link_hash_defweak)
 	  && IS_XTENSA_TLS_RELOC (r_type) != (sym_type == STT_TLS))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    ((sym_type == STT_TLS
+	      /* xgettext:c-format */
 	      ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+	      /* xgettext:c-format */
 	      : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
 	     input_bfd,
 	     input_section,
@@ -2827,16 +2823,16 @@ elf_xtensa_relocate_section (bfd *output
 	case R_XTENSA_PLT:
 	  if (elf_hash_table (info)->dynamic_sections_created
 	      && (input_section->flags & SEC_ALLOC) != 0
-	      && (dynamic_symbol || info->shared))
+	      && (dynamic_symbol || bfd_link_pic (info)))
 	    {
 	      Elf_Internal_Rela outrel;
 	      bfd_byte *loc;
 	      asection *srel;
 
 	      if (dynamic_symbol && r_type == R_XTENSA_PLT)
-		srel = htab->srelplt;
+		srel = htab->elf.srelplt;
 	      else
-		srel = htab->srelgot;
+		srel = htab->elf.srelgot;
 
 	      BFD_ASSERT (srel != NULL);
 
@@ -2859,10 +2855,9 @@ elf_xtensa_relocate_section (bfd *output
 		    {
 		      error_message =
 			_("dynamic relocation in read-only section");
-		      if (!((*info->callbacks->reloc_dangerous)
-			    (info, error_message, input_bfd, input_section,
-			     rel->r_offset)))
-			return FALSE;
+		      (*info->callbacks->reloc_dangerous)
+			(info, error_message,
+			 input_bfd, input_section, rel->r_offset);
 		    }
 
 		  if (dynamic_symbol)
@@ -2915,7 +2910,7 @@ elf_xtensa_relocate_section (bfd *output
 
 	case R_XTENSA_TLS_TPOFF:
 	  /* Switch to LE model for local symbols in an executable.  */
-	  if (! info->shared && ! dynamic_symbol)
+	  if (! bfd_link_pic (info) && ! dynamic_symbol)
 	    {
 	      relocation = tpoff (info, relocation);
 	      break;
@@ -2927,12 +2922,12 @@ elf_xtensa_relocate_section (bfd *output
 	  {
 	    if (r_type == R_XTENSA_TLSDESC_FN)
 	      {
-		if (! info->shared || (tls_type & GOT_TLS_IE) != 0)
+		if (! bfd_link_pic (info) || (tls_type & GOT_TLS_IE) != 0)
 		  r_type = R_XTENSA_NONE;
 	      }
 	    else if (r_type == R_XTENSA_TLSDESC_ARG)
 	      {
-		if (info->shared)
+		if (bfd_link_pic (info))
 		  {
 		    if ((tls_type & GOT_TLS_IE) != 0)
 		      r_type = R_XTENSA_TLS_TPOFF;
@@ -2956,16 +2951,15 @@ elf_xtensa_relocate_section (bfd *output
 	      {
 		error_message =
 		  _("TLS relocation invalid without dynamic sections");
-		if (!((*info->callbacks->reloc_dangerous)
-		      (info, error_message, input_bfd, input_section,
-		       rel->r_offset)))
-		  return FALSE;
+		(*info->callbacks->reloc_dangerous)
+		  (info, error_message,
+		   input_bfd, input_section, rel->r_offset);
 	      }
 	    else
 	      {
 		Elf_Internal_Rela outrel;
 		bfd_byte *loc;
-		asection *srel = htab->srelgot;
+		asection *srel = htab->elf.srelgot;
 		int indx;
 
 		outrel.r_offset = (input_section->output_section->vma
@@ -2980,10 +2974,9 @@ elf_xtensa_relocate_section (bfd *output
 		  {
 		    error_message =
 		      _("dynamic relocation in read-only section");
-		    if (!((*info->callbacks->reloc_dangerous)
-			  (info, error_message, input_bfd, input_section,
-			   rel->r_offset)))
-		      return FALSE;
+		    (*info->callbacks->reloc_dangerous)
+		      (info, error_message,
+		       input_bfd, input_section, rel->r_offset);
 		  }
 
 		indx = h && h->dynindx != -1 ? h->dynindx : 0;
@@ -3008,7 +3001,7 @@ elf_xtensa_relocate_section (bfd *output
 	  break;
 
 	case R_XTENSA_TLS_DTPOFF:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    /* Switch from LD model to LE model.  */
 	    relocation = tpoff (info, relocation);
 	  else
@@ -3025,12 +3018,9 @@ elf_xtensa_relocate_section (bfd *output
 		(h && elf_xtensa_hash_entry (h) == htab->tlsbase);
 	      if (! replace_tls_insn (rel, input_bfd, input_section, contents,
 				      is_ld_model, &error_message))
-		{
-		  if (!((*info->callbacks->reloc_dangerous)
-			(info, error_message, input_bfd, input_section,
-			 rel->r_offset)))
-		    return FALSE;
-		}
+		(*info->callbacks->reloc_dangerous)
+		  (info, error_message,
+		   input_bfd, input_section, rel->r_offset);
 
 	      if (r_type != R_XTENSA_TLS_ARG || is_ld_model)
 		{
@@ -3049,10 +3039,8 @@ elf_xtensa_relocate_section (bfd *output
 	      error_message =
 		vsprint_msg ("invalid relocation for dynamic symbol", ": %s",
 			     strlen (name) + 2, name);
-	      if (!((*info->callbacks->reloc_dangerous)
-		    (info, error_message, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info, error_message, input_bfd, input_section, rel->r_offset);
 	      continue;
 	    }
 	  break;
@@ -3067,7 +3055,8 @@ elf_xtensa_relocate_section (bfd *output
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section,
@@ -3100,10 +3089,8 @@ elf_xtensa_relocate_section (bfd *output
 					 strlen (name) + 22,
 					 name, (int) rel->r_addend);
 
-	  if (!((*info->callbacks->reloc_dangerous)
-		(info, error_message, input_bfd, input_section,
-		 rel->r_offset)))
-	    return FALSE;
+	  (*info->callbacks->reloc_dangerous)
+	    (info, error_message, input_bfd, input_section, rel->r_offset);
 	}
     }
 
@@ -3173,7 +3160,7 @@ elf_xtensa_combine_prop_entries (bfd *ou
   sgotloc_size = sgotloc->size;
   if (sgotloc_size != section_size)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("internal inconsistency in size of .got.loc section"));
       return -1;
     }
@@ -3285,7 +3272,7 @@ elf_xtensa_finish_dynamic_sections (bfd 
 
   /* Set the first entry in the global offset table to the address of
      the dynamic section.  */
-  sgot = htab->sgot;
+  sgot = htab->elf.sgot;
   if (sgot)
     {
       BFD_ASSERT (sgot->size == 4);
@@ -3297,7 +3284,7 @@ elf_xtensa_finish_dynamic_sections (bfd 
 		    sgot->contents);
     }
 
-  srelplt = htab->srelplt;
+  srelplt = htab->elf.srelplt;
   if (srelplt && srelplt->size != 0)
     {
       asection *sgotplt, *srelgot, *spltlittbl;
@@ -3306,7 +3293,7 @@ elf_xtensa_finish_dynamic_sections (bfd 
       bfd_byte *loc;
       unsigned rtld_reloc;
 
-      srelgot = htab->srelgot;
+      srelgot = htab->elf.srelgot;
       spltlittbl = htab->spltlittbl;
       BFD_ASSERT (srelgot != NULL && spltlittbl != NULL);
 
@@ -3395,7 +3382,7 @@ elf_xtensa_finish_dynamic_sections (bfd 
     }
 
   /* Combine adjacent literal table entries.  */
-  BFD_ASSERT (! info->relocatable);
+  BFD_ASSERT (! bfd_link_relocatable (info));
   sxtlit = bfd_get_section_by_name (output_bfd, ".xt.lit");
   sgotloc = htab->sgotloc;
   BFD_ASSERT (sgotloc);
@@ -3425,30 +3412,22 @@ elf_xtensa_finish_dynamic_sections (bfd 
 	  break;
 
 	case DT_XTENSA_GOT_LOC_OFF:
-	  dyn.d_un.d_ptr = htab->sgotloc->output_section->vma;
+	  dyn.d_un.d_ptr = (htab->sgotloc->output_section->vma
+			    + htab->sgotloc->output_offset);
 	  break;
 
 	case DT_PLTGOT:
-	  dyn.d_un.d_ptr = htab->sgot->output_section->vma;
+	  dyn.d_un.d_ptr = (htab->elf.sgot->output_section->vma
+			    + htab->elf.sgot->output_offset);
 	  break;
 
 	case DT_JMPREL:
-	  dyn.d_un.d_ptr = htab->srelplt->output_section->vma;
+	  dyn.d_un.d_ptr = (htab->elf.srelplt->output_section->vma
+			    + htab->elf.srelplt->output_offset);
 	  break;
 
 	case DT_PLTRELSZ:
-	  dyn.d_un.d_val = htab->srelplt->output_section->size;
-	  break;
-
-	case DT_RELASZ:
-	  /* Adjust RELASZ to not include JMPREL.  This matches what
-	     glibc expects and what is done for several other ELF
-	     targets (e.g., i386, alpha), but the "correct" behavior
-	     seems to be unresolved.  Since the linker script arranges
-	     for .rela.plt to follow all other relocation sections, we
-	     don't have to worry about changing the DT_RELA entry.  */
-	  if (htab->srelplt)
-	    dyn.d_un.d_val -= htab->srelplt->output_section->size;
+	  dyn.d_un.d_val = htab->elf.srelplt->size;
 	  break;
 	}
 
@@ -3465,13 +3444,14 @@ elf_xtensa_finish_dynamic_sections (bfd 
    object file when linking.  */
 
 static bfd_boolean
-elf_xtensa_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   unsigned out_mach, in_mach;
   flagword out_flag, in_flag;
 
   /* Check if we have the same endianness.  */
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   /* Don't even pretend to support mixed-format linking.  */
@@ -3486,7 +3466,8 @@ elf_xtensa_merge_private_bfd_data (bfd *
   in_mach = in_flag & EF_XTENSA_MACH;
   if (out_mach != in_mach)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: incompatible machine type. Output is 0x%x. Input is 0x%x"),
 	 ibfd, out_mach, in_mach);
       bfd_set_error (bfd_error_wrong_format);
@@ -6552,7 +6533,8 @@ extend_ebb_bounds_forward (ebb_t *ebb)
 				  entry_end - ebb->end_offset);
       if (insn_block_len != (entry_end - ebb->end_offset))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
 	     ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
 	  return FALSE;
@@ -6628,7 +6610,8 @@ extend_ebb_bounds_backward (ebb_t *ebb)
 				  ebb->start_offset - block_begin);
       if (insn_block_len != ebb->start_offset - block_begin)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
 	     ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
 	  return FALSE;
@@ -7348,7 +7331,7 @@ is_resolvable_asm_expansion (bfd *abfd,
   /* For relocatable sections, we can only simplify when the output
      section of the target is the same as the output section of the
      source.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       && (target_sec->output_section != sec->output_section
 	  || is_reloc_sym_weak (abfd, irel)))
     return FALSE;
@@ -7741,7 +7724,8 @@ compute_text_actions (bfd *abfd,
       simplify_size = get_asm_simplify_size (contents, sec_size, r_offset);
       if (simplify_size == 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"),
 	     sec->owner, sec, r_offset);
 	  continue;
@@ -7999,7 +7983,8 @@ compute_ebb_proposed_actions (ebb_constr
   return TRUE;
 
  decode_error:
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext:c-format */
     (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
      ebb->sec->owner, ebb->sec, offset);
   return FALSE;
@@ -9004,7 +8989,7 @@ identify_literal_placement (bfd *abfd,
   sec_size = bfd_get_section_limit (abfd, sec);
 
   final_static_link =
-    (!link_info->relocatable
+    (!bfd_link_relocatable (link_info)
      && !elf_hash_table (link_info)->dynamic_sections_created);
 
   /* The placement algorithm first checks to see if the literal is
@@ -9043,7 +9028,7 @@ identify_literal_placement (bfd *abfd,
   /* For relocatable links, do not try to move literals.  To do it
      correctly might increase the number of relocations in an input
      section making the default relocatable linking fail.  */
-  if (!link_info->relocatable && !literal_placed
+  if (!bfd_link_relocatable (link_info) && !literal_placed
       && values->has_last_loc && !(*last_loc_is_prev_p))
     {
       asection *target_sec = r_reloc_get_section (&values->last_loc);
@@ -10119,18 +10104,18 @@ shrink_dynamic_reloc_sections (struct bf
 
   if ((r_type == R_XTENSA_32 || r_type == R_XTENSA_PLT)
       && (input_section->flags & SEC_ALLOC) != 0
-      && (dynamic_symbol || info->shared))
+      && (dynamic_symbol || bfd_link_pic (info)))
     {
       asection *srel;
       bfd_boolean is_plt = FALSE;
 
       if (dynamic_symbol && r_type == R_XTENSA_PLT)
 	{
-	  srel = htab->srelplt;
+	  srel = htab->elf.srelplt;
 	  is_plt = TRUE;
 	}
       else
-	srel = htab->srelgot;
+	srel = htab->elf.srelgot;
 
       /* Reduce size of the .rela.* section by one reloc.  */
       BFD_ASSERT (srel != NULL);
@@ -10159,7 +10144,7 @@ shrink_dynamic_reloc_sections (struct bf
 	  if (reloc_index % PLT_ENTRIES_PER_CHUNK == 0)
 	    {
 	      /* The two magic GOT entries for that chunk can go away.  */
-	      srelgot = htab->srelgot;
+	      srelgot = htab->elf.srelgot;
 	      BFD_ASSERT (srelgot != NULL);
 	      srelgot->reloc_count -= 2;
 	      srelgot->size -= 2 * sizeof (Elf32_External_Rela);
@@ -10225,7 +10210,7 @@ move_literal (bfd *abfd,
       bfd_put_32 (abfd, lit->value, contents + offset);
 
       /* Currently, we cannot move relocations during a relocatable link.  */
-      BFD_ASSERT (!link_info->relocatable);
+      BFD_ASSERT (!bfd_link_relocatable (link_info));
       fix = reloc_bfd_fix_init (sec, offset, r_type,
 				r_reloc_get_section (r_rel),
 				r_rel->target_offset + r_rel->virtual_offset,
@@ -10464,7 +10449,7 @@ relax_property_section (bfd *abfd,
      finish_dynamic_sections() but at that point it's too late to
      reclaim the space in the output section, so we do this twice.  */
 
-  if (internal_relocs && (!link_info->relocatable
+  if (internal_relocs && (!bfd_link_relocatable (link_info)
 			  || xtensa_is_littable_section (sec)))
     {
       Elf_Internal_Rela *last_irel = NULL;
@@ -10775,7 +10760,8 @@ do_fix_for_relocatable_link (Elf_Interna
     {
       if (r_type != R_XTENSA_ASM_EXPAND)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unexpected fix for %s relocation"),
 	     input_bfd, input_section, rel->r_offset,
 	     elf_howto_table[r_type].name);
@@ -10835,18 +10821,11 @@ do_fix_for_final_link (Elf_Internal_Rela
 static asection *
 elf_xtensa_get_plt_section (struct bfd_link_info *info, int chunk)
 {
-  struct elf_xtensa_link_hash_table *htab;
   bfd *dynobj;
   char plt_name[10];
 
   if (chunk == 0)
-    {
-      htab = elf_xtensa_hash_table (info);
-      if (htab == NULL)
-	return NULL;
-
-      return htab->splt;
-    }
+    return elf_hash_table (info)->splt;
 
   dynobj = elf_hash_table (info)->dynobj;
   sprintf (plt_name, ".plt.%u", chunk);
@@ -10857,17 +10836,11 @@ elf_xtensa_get_plt_section (struct bfd_l
 static asection *
 elf_xtensa_get_gotplt_section (struct bfd_link_info *info, int chunk)
 {
-  struct elf_xtensa_link_hash_table *htab;
   bfd *dynobj;
   char got_name[14];
 
   if (chunk == 0)
-    {
-      htab = elf_xtensa_hash_table (info);
-      if (htab == NULL)
-	return NULL;
-      return htab->sgotplt;
-    }
+    return elf_hash_table (info)->sgotplt;
 
   dynobj = elf_hash_table (info)->dynobj;
   sprintf (got_name, ".got.plt.%u", chunk);
@@ -11250,7 +11223,7 @@ xtensa_callback_required_dependence (bfd
 
       /* Find the corresponding ".got.plt*" section.  */
       if (sec->name[4] == '\0')
-	sgotplt = bfd_get_linker_section (sec->owner, ".got.plt");
+	sgotplt = elf_hash_table (link_info)->sgotplt;
       else
 	{
 	  char got_name[14];
@@ -11357,6 +11330,7 @@ static const struct bfd_elf_special_sect
 #define elf_backend_got_header_size	4
 #define elf_backend_want_dynbss		0
 #define elf_backend_want_got_plt	1
+#define elf_backend_dtrel_excludes_plt	1
 
 #define elf_info_to_howto		     elf_xtensa_info_to_howto_rela
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-alpha.c ./bfd/elf64-alpha.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-alpha.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-alpha.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Alpha specific support for 64-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1108,8 +1108,9 @@ elf64_alpha_info_to_howto (bfd *abfd ATT
 
   if (r_type >= R_ALPHA_max)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised Alpha reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised Alpha reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_ALPHA_NONE;
     }
@@ -1227,7 +1228,7 @@ elf64_alpha_add_symbol_hook (bfd *abfd, 
 			     asection **secp, bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && sym->st_size <= elf_gp_size (abfd))
     {
       /* Common symbols less than or equal to -G nn bytes are
@@ -1299,6 +1300,7 @@ elf64_alpha_create_dynamic_sections (bfd
 	   | SEC_LINKER_CREATED
 	   | (elf64_alpha_use_secureplt ? SEC_READONLY : 0));
   s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags);
+  elf_hash_table (info)->splt = s;
   if (s == NULL || ! bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
 
@@ -1313,6 +1315,7 @@ elf64_alpha_create_dynamic_sections (bfd
   flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
 	   | SEC_LINKER_CREATED | SEC_READONLY);
   s = bfd_make_section_anyway_with_flags (abfd, ".rela.plt", flags);
+  elf_hash_table (info)->srelplt = s;
   if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
     return FALSE;
 
@@ -1320,6 +1323,7 @@ elf64_alpha_create_dynamic_sections (bfd
     {
       flags = SEC_ALLOC | SEC_LINKER_CREATED;
       s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
+      elf_hash_table (info)->sgotplt = s;
       if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
 	return FALSE;
     }
@@ -1336,6 +1340,7 @@ elf64_alpha_create_dynamic_sections (bfd
   flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
 	   | SEC_LINKER_CREATED | SEC_READONLY);
   s = bfd_make_section_anyway_with_flags (abfd, ".rela.got", flags);
+  elf_hash_table (info)->srelgot = s;
   if (s == NULL
       || !bfd_set_section_alignment (abfd, s, 3))
     return FALSE;
@@ -1757,6 +1762,18 @@ elf64_alpha_want_plt (struct alpha_elf_l
 	  && (ah->flags & ~ALPHA_ELF_LINK_HASH_LU_PLT) == 0);
 }
 
+/* Whether to sort relocs output by ld -r or ld --emit-relocs, by r_offset.
+   Don't do so for code sections.  We want to keep ordering of LITERAL/LITUSE
+   as is.  On the other hand, elf-eh-frame.c processing requires .eh_frame
+   relocs to be sorted.  */
+
+static bfd_boolean
+elf64_alpha_sort_relocs_p (asection *sec)
+{
+  return (sec->flags & SEC_CODE) == 0;
+}
+
+
 /* Handle dynamic relocations when doing an Alpha ELF link.  */
 
 static bfd_boolean
@@ -1770,7 +1787,7 @@ elf64_alpha_check_relocs (bfd *abfd, str
   const Elf_Internal_Rela *rel, *relend;
   bfd_size_type amt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Don't do anything special with non-loaded, non-alloced sections.
@@ -1830,7 +1847,7 @@ elf64_alpha_check_relocs (bfd *abfd, str
          have yet been processed.  Do something with what we know, as
          this may help reduce memory usage and processing time later.  */
       maybe_dynamic = FALSE;
-      if (h && ((info->shared
+      if (h && ((bfd_link_pic (info)
 		 && (!info->symbolic
 		     || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 		|| !h->root.def_regular
@@ -1871,7 +1888,7 @@ elf64_alpha_check_relocs (bfd *abfd, str
 
 	case R_ALPHA_REFLONG:
 	case R_ALPHA_REFQUAD:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need = NEED_DYNREL;
 	  break;
 
@@ -1891,12 +1908,12 @@ elf64_alpha_check_relocs (bfd *abfd, str
 	case R_ALPHA_GOTTPREL:
 	  need = NEED_GOT | NEED_GOT_ENTRY;
 	  gotent_flags = ALPHA_ELF_LINK_HASH_TLS_IE;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  break;
 
 	case R_ALPHA_TPREL64:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
 	      info->flags |= DF_STATIC_TLS;
 	      need = NEED_DYNREL;
@@ -1988,7 +2005,7 @@ elf64_alpha_check_relocs (bfd *abfd, str
 	      else
 		rent->count++;
 	    }
-	  else if (info->shared)
+	  else if (bfd_link_pic (info))
 	    {
 	      /* If this is a shared library, and the section is to be
 		 loaded into memory, we need a RELATIVE reloc.  */
@@ -2033,7 +2050,7 @@ elf64_alpha_gc_sweep_hook (bfd *abfd, st
   struct alpha_elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_symtab_hdr (abfd);
@@ -2115,7 +2132,7 @@ elf64_alpha_adjust_dynamic_symbol (struc
     {
       h->needs_plt = TRUE;
 
-      s = bfd_get_linker_section (dynobj, ".plt");
+      s = elf_hash_table(info)->splt;
       if (!s && !elf64_alpha_create_dynamic_sections (dynobj, info))
 	return FALSE;
 
@@ -2206,7 +2223,7 @@ elf64_alpha_copy_indirect_symbol (struct
 		&& gi->reloc_type == gs->reloc_type
 		&& gi->addend == gs->addend)
 	      {
-		gi->use_count += gs->use_count;
+		gs->use_count += gi->use_count;
 	        goto got_found;
 	      }
 	  gi->next = hs->got_entries;
@@ -2507,7 +2524,8 @@ elf64_alpha_size_got_sections (struct bf
           if (alpha_elf_tdata (this_got)->total_got_size > MAX_GOT_SIZE)
 	    {
 	      /* Yikes! A single object file has too many entries.  */
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 	        (_("%B: .got subsegment exceeds 64K (size %d)"),
 	         i, alpha_elf_tdata (this_got)->total_got_size);
 	      return FALSE;
@@ -2598,15 +2616,13 @@ elf64_alpha_size_plt_section (struct bfd
 {
   asection *splt, *spltrel, *sgotplt;
   unsigned long entries;
-  bfd *dynobj;
   struct alpha_elf_link_hash_table * htab;
 
   htab = alpha_elf_hash_table (info);
   if (htab == NULL)
     return;
 
-  dynobj = elf_hash_table(info)->dynobj;
-  splt = bfd_get_linker_section (dynobj, ".plt");
+  splt = elf_hash_table(info)->splt;
   if (splt == NULL)
     return;
 
@@ -2616,7 +2632,7 @@ elf64_alpha_size_plt_section (struct bfd
 				elf64_alpha_size_plt_section_1, splt);
 
   /* Every plt entry requires a JMP_SLOT relocation.  */
-  spltrel = bfd_get_linker_section (dynobj, ".rela.plt");
+  spltrel = elf_hash_table(info)->srelplt;
   entries = 0;
   if (splt->size)
     {
@@ -2632,7 +2648,7 @@ elf64_alpha_size_plt_section (struct bfd
      entire contents of the .got.plt section.  */
   if (elf64_alpha_use_secureplt)
     {
-      sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
+      sgotplt = elf_hash_table(info)->sgotplt;
       sgotplt->size = entries ? 16 : 0;
     }
 }
@@ -2644,7 +2660,7 @@ elf64_alpha_always_size_sections (bfd *o
   bfd *i;
   struct alpha_elf_link_hash_table * htab;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = alpha_elf_hash_table (info);
@@ -2735,14 +2751,15 @@ elf64_alpha_calc_dynrel_sizes (struct al
 
   /* If the symbol is a hidden undefined weak, then we never have any
      relocations.  Avoid the loop which may want to add RELATIVE relocs
-     based on info->shared.  */
+     based on bfd_link_pic (info).  */
   if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
     return TRUE;
 
   for (relent = h->reloc_entries; relent; relent = relent->next)
     {
       entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
-						 info->shared, info->pie);
+						 bfd_link_pic (info),
+						 bfd_link_pie (info));
       if (entries)
 	{
 	  relent->srel->size +=
@@ -2778,7 +2795,7 @@ elf64_alpha_size_rela_got_1 (struct alph
 
   /* If the symbol is a hidden undefined weak, then we never have any
      relocations.  Avoid the loop which may want to add RELATIVE relocs
-     based on info->shared.  */
+     based on bfd_link_pic (info).  */
   if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
     return TRUE;
 
@@ -2786,12 +2803,12 @@ elf64_alpha_size_rela_got_1 (struct alph
   for (gotent = h->got_entries; gotent ; gotent = gotent->next)
     if (gotent->use_count > 0)
       entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type, dynamic,
-						  info->shared, info->pie);
+						  bfd_link_pic (info),
+						  bfd_link_pie (info));
 
   if (entries > 0)
     {
-      bfd *dynobj = elf_hash_table(info)->dynobj;
-      asection *srel = bfd_get_linker_section (dynobj, ".rela.got");
+      asection *srel = elf_hash_table(info)->srelgot;
       BFD_ASSERT (srel != NULL);
       srel->size += sizeof (Elf64_External_Rela) * entries;
     }
@@ -2805,7 +2822,7 @@ static void
 elf64_alpha_size_rela_got_section (struct bfd_link_info *info)
 {
   unsigned long entries;
-  bfd *i, *dynobj;
+  bfd *i;
   asection *srel;
   struct alpha_elf_link_hash_table * htab;
 
@@ -2836,12 +2853,12 @@ elf64_alpha_size_rela_got_section (struc
 		 gotent ; gotent = gotent->next)
 	      if (gotent->use_count > 0)
 		entries += (alpha_dynamic_entries_for_reloc
-			    (gotent->reloc_type, 0, info->shared, info->pie));
+			    (gotent->reloc_type, 0, bfd_link_pic (info),
+			     bfd_link_pie (info)));
 	}
     }
 
-  dynobj = elf_hash_table(info)->dynobj;
-  srel = bfd_get_linker_section (dynobj, ".rela.got");
+  srel = elf_hash_table(info)->srelgot;
   if (!srel)
     {
       BFD_ASSERT (entries == 0);
@@ -2862,7 +2879,7 @@ elf64_alpha_size_dynamic_sections (bfd *
 {
   bfd *dynobj;
   asection *s;
-  bfd_boolean relplt;
+  bfd_boolean relplt, relocs;
   struct alpha_elf_link_hash_table * htab;
 
   htab = alpha_elf_hash_table (info);
@@ -2875,7 +2892,7 @@ elf64_alpha_size_dynamic_sections (bfd *
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2899,6 +2916,7 @@ elf64_alpha_size_dynamic_sections (bfd *
      determined the sizes of the various dynamic sections.  Allocate
      memory for them.  */
   relplt = FALSE;
+  relocs = FALSE;
   for (s = dynobj->sections; s != NULL; s = s->next)
     {
       const char *name;
@@ -2916,6 +2934,8 @@ elf64_alpha_size_dynamic_sections (bfd *
 	    {
 	      if (strcmp (name, ".rela.plt") == 0)
 		relplt = TRUE;
+	      else
+		relocs = TRUE;
 
 	      /* We use the reloc_count field as a counter if we need
 		 to copy relocs into the output file.  */
@@ -2961,7 +2981,7 @@ elf64_alpha_size_dynamic_sections (bfd *
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2980,15 +3000,18 @@ elf64_alpha_size_dynamic_sections (bfd *
 	    return FALSE;
 	}
 
-      if (!add_dynamic_entry (DT_RELA, 0)
-	  || !add_dynamic_entry (DT_RELASZ, 0)
-	  || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
-	return FALSE;
-
-      if (info->flags & DF_TEXTREL)
+      if (relocs)
 	{
-	  if (!add_dynamic_entry (DT_TEXTREL, 0))
+	  if (!add_dynamic_entry (DT_RELA, 0)
+	      || !add_dynamic_entry (DT_RELASZ, 0)
+	      || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
 	    return FALSE;
+
+	  if (info->flags & DF_TEXTREL)
+	    {
+	      if (!add_dynamic_entry (DT_TEXTREL, 0))
+		return FALSE;
+	    }
 	}
     }
 #undef add_dynamic_entry
@@ -3056,10 +3079,11 @@ elf64_alpha_relax_got_load (struct alpha
   if (insn >> 26 != OP_LDQ)
     {
       reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
-      ((*_bfd_error_handler)
-       ("%B: %A+0x%lx: warning: %s relocation against unexpected insn",
-	info->abfd, info->sec,
-	(unsigned long) irel->r_offset, howto->name));
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: %A+0x%lx: warning: %s relocation against unexpected insn"),
+	 info->abfd, info->sec,
+	 (unsigned long) irel->r_offset, howto->name);
       return TRUE;
     }
 
@@ -3069,7 +3093,7 @@ elf64_alpha_relax_got_load (struct alpha
 
   /* Can't use local-exec relocations in shared libraries.  */
   if (r_type == R_ALPHA_GOTTPREL
-      && (info->link_info->shared && !info->link_info->pie))
+      && bfd_link_dll (info->link_info))
     return TRUE;
 
   if (r_type == R_ALPHA_LITERAL)
@@ -3077,7 +3101,7 @@ elf64_alpha_relax_got_load (struct alpha
       /* Look for nice constant addresses.  This includes the not-uncommon
 	 special case of 0 for undefweak symbols.  */
       if ((info->h && info->h->root.root.type == bfd_link_hash_undefweak)
-	  || (!info->link_info->shared
+	  || (!bfd_link_pic (info->link_info)
 	      && (symval >= (bfd_vma)-0x8000 || symval < 0x8000)))
 	{
 	  disp = 0;
@@ -3197,7 +3221,9 @@ elf64_alpha_relax_opt_call (struct alpha
 	  if (tsec_relocs == NULL)
 	    return 0;
 	  tsec_relend = tsec_relocs + info->tsec->reloc_count;
-	  tsec_free = (info->link_info->keep_memory ? NULL : tsec_relocs);
+	  tsec_free = (elf_section_data (info->tsec)->relocs == tsec_relocs
+		       ? NULL
+		       : tsec_relocs);
 	}
 
       /* Recover the symbol's offset within the section.  */
@@ -3249,10 +3275,11 @@ elf64_alpha_relax_with_lituse (struct al
   lit_insn = bfd_get_32 (abfd, contents + irel->r_offset);
   if (lit_insn >> 26 != OP_LDQ)
     {
-      ((*_bfd_error_handler)
-       ("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn",
-	abfd, info->sec,
-	(unsigned long) irel->r_offset));
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn"),
+	 abfd, info->sec,
+	 (unsigned long) irel->r_offset);
       return TRUE;
     }
 
@@ -3540,12 +3567,12 @@ elf64_alpha_relax_tls_get_addr (struct a
 
   /* If the symbol is local, and we've already committed to DF_STATIC_TLS,
      then we might as well relax to IE.  */
-  else if (info->link_info->shared && !dynamic
+  else if (bfd_link_pic (info->link_info) && !dynamic
 	   && (info->link_info->flags & DF_STATIC_TLS))
     ;
 
   /* Otherwise we must be building an executable to do anything.  */
-  else if (info->link_info->shared)
+  else if (bfd_link_pic (info->link_info))
     return TRUE;
 
   /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and
@@ -3646,7 +3673,7 @@ elf64_alpha_relax_tls_get_addr (struct a
 
   /* Some compilers warn about a Boolean-looking expression being
      used in a switch.  The explicit cast silences them.  */
-  switch ((int) (!dynamic && !info->link_info->shared))
+  switch ((int) (!dynamic && !bfd_link_pic (info->link_info)))
     {
     case 1:
       {
@@ -3789,7 +3816,7 @@ elf64_alpha_relax_section (bfd *abfd, as
   /* There's nothing to change, yet.  */
   *again = FALSE;
 
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC))
 	  != (SEC_CODE | SEC_RELOC | SEC_ALLOC))
       || sec->reloc_count == 0)
@@ -4135,7 +4162,8 @@ elf64_alpha_relocate_section_r (bfd *out
       r_type = ELF64_R_TYPE (rel->r_info);
       if (r_type >= R_ALPHA_max)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unknown relocation type %d"),
 	     input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -4206,7 +4234,7 @@ elf64_alpha_relocate_section (bfd *outpu
   BFD_ASSERT (is_alpha_elf (input_bfd));
 
   /* Handle relocatable links with a smaller loop.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return elf64_alpha_relocate_section_r (output_bfd, info, input_bfd,
 					   input_section, contents, relocs,
 					   local_syms, local_sections);
@@ -4218,10 +4246,7 @@ elf64_alpha_relocate_section (bfd *outpu
   symtab_hdr = &elf_symtab_hdr (input_bfd);
 
   dynobj = elf_hash_table (info)->dynobj;
-  if (dynobj)
-    srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  else
-    srelgot = NULL;
+  srelgot = elf_hash_table (info)->srelgot;
 
   if (input_section->flags & SEC_ALLOC)
     {
@@ -4285,7 +4310,8 @@ elf64_alpha_relocate_section (bfd *outpu
       r_type = ELF64_R_TYPE(rel->r_info);
       if (r_type >= R_ALPHA_max)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unknown relocation type %d"),
 	     input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -4431,7 +4457,9 @@ elf64_alpha_relocate_section (bfd *outpu
 	      /* If the symbol has been forced local, output a
 		 RELATIVE reloc, otherwise it will be handled in
 		 finish_dynamic_symbol.  */
-	      if (info->shared && !dynamic_symbol_p && !undef_weak_ref)
+	      if (bfd_link_pic (info)
+		  && !dynamic_symbol_p
+		  && !undef_weak_ref)
 		elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
 					 gotent->got_offset, 0,
 					 R_ALPHA_RELATIVE, value);
@@ -4448,7 +4476,8 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_GPRELLOW:
 	  if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: gp-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4460,7 +4489,8 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_GPRELHIGH:
 	  if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: gp-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4486,7 +4516,8 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_BRADDR:
 	  if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: pc-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4514,7 +4545,8 @@ elf64_alpha_relocate_section (bfd *outpu
 		&& alpha_elf_tdata (sec->owner)->gotobj
 		&& gotobj != alpha_elf_tdata (sec->owner)->gotobj)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: change in gp: BRSGP %s"),
 		   input_bfd, h->root.root.root.string);
 		ret_val = FALSE;
@@ -4544,7 +4576,8 @@ elf64_alpha_relocate_section (bfd *outpu
 		    else if (name[0] == 0)
 		      name = bfd_section_name (input_bfd, sec);
 		  }
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: !samegp reloc against symbol without .prologue: %s"),
 		   input_bfd, name);
 		ret_val = FALSE;
@@ -4581,7 +4614,7 @@ elf64_alpha_relocate_section (bfd *outpu
 	    else if (r_type == R_ALPHA_TPREL64)
 	      {
 		BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
-		if (!info->shared || info->pie)
+		if (!bfd_link_dll (info))
 		  {
 		    value -= tp_base;
 		    goto default_reloc;
@@ -4589,7 +4622,7 @@ elf64_alpha_relocate_section (bfd *outpu
 		dynindx = 0;
 		dynaddend = value - dtp_base;
 	      }
-	    else if (info->shared
+	    else if (bfd_link_pic (info)
 		     && r_symndx != STN_UNDEF
 		     && (input_section->flags & SEC_ALLOC)
 		     && !undef_weak_ref
@@ -4601,7 +4634,8 @@ elf64_alpha_relocate_section (bfd *outpu
 	      {
 		if (r_type == R_ALPHA_REFLONG)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: unhandled dynamic relocation against %s"),
 		       input_bfd,
 		       h->root.root.root.string);
@@ -4626,14 +4660,17 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_SREL64:
 	  if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: pc-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
             }
-	  else if ((info->shared || info->pie) && undef_weak_ref)
+	  else if (bfd_link_pic (info)
+		   && undef_weak_ref)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: pc-relative relocation against undefined weak symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4664,13 +4701,14 @@ elf64_alpha_relocate_section (bfd *outpu
 	      gotent->reloc_done = 1;
 
 	      /* Note that the module index for the main program is 1.  */
-	      bfd_put_64 (output_bfd, !info->shared && !dynamic_symbol_p,
+	      bfd_put_64 (output_bfd,
+			  !bfd_link_pic (info) && !dynamic_symbol_p,
 			  sgot->contents + gotent->got_offset);
 
 	      /* If the symbol has been forced local, output a
 		 DTPMOD64 reloc, otherwise it will be handled in
 		 finish_dynamic_symbol.  */
-	      if (info->shared && !dynamic_symbol_p)
+	      if (bfd_link_pic (info) && !dynamic_symbol_p)
 		elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
 					 gotent->got_offset, 0,
 					 R_ALPHA_DTPMOD64, 0);
@@ -4697,7 +4735,8 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_DTPREL16:
 	  if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: dtp-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4711,16 +4750,18 @@ elf64_alpha_relocate_section (bfd *outpu
 	case R_ALPHA_TPRELHI:
 	case R_ALPHA_TPRELLO:
 	case R_ALPHA_TPREL16:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: TLS local exec code cannot be linked into shared objects"),
 		input_bfd);
               ret_val = FALSE;
 	    }
 	  else if (dynamic_symbol_p)
             {
-              (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
                 (_("%B: tp-relative relocation against dynamic symbol %s"),
                  input_bfd, h->root.root.root.string);
               ret_val = FALSE;
@@ -4749,7 +4790,7 @@ elf64_alpha_relocate_section (bfd *outpu
 		  BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
 		  if (r_type == R_ALPHA_GOTDTPREL)
 		    value -= dtp_base;
-		  else if (!info->shared)
+		  else if (!bfd_link_pic (info))
 		    value -= tp_base;
 		  else
 		    {
@@ -4806,11 +4847,9 @@ elf64_alpha_relocate_section (bfd *outpu
 		if (*name == '\0')
 		  name = bfd_section_name (input_bfd, sec);
 	      }
-	    if (! ((*info->callbacks->reloc_overflow)
-		   (info, (h ? &h->root.root : NULL), name, howto->name,
-		    (bfd_vma) 0, input_bfd, input_section,
-		    rel->r_offset)))
-	      ret_val = FALSE;
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root.root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  }
 	  break;
 
@@ -4832,7 +4871,6 @@ elf64_alpha_finish_dynamic_symbol (bfd *
 				   Elf_Internal_Sym *sym)
 {
   struct alpha_elf_link_hash_entry *ah = (struct alpha_elf_link_hash_entry *)h;
-  bfd *dynobj = elf_hash_table(info)->dynobj;
 
   if (h->needs_plt)
     {
@@ -4846,9 +4884,9 @@ elf64_alpha_finish_dynamic_symbol (bfd *
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL);
-      srel = bfd_get_linker_section (dynobj, ".rela.plt");
+      srel = elf_hash_table (info)->srelplt;
       BFD_ASSERT (srel != NULL);
 
       for (gotent = ah->got_entries; gotent ; gotent = gotent->next)
@@ -4918,7 +4956,7 @@ elf64_alpha_finish_dynamic_symbol (bfd *
       asection *srel;
       struct alpha_elf_got_entry *gotent;
 
-      srel = bfd_get_linker_section (dynobj, ".rela.got");
+      srel = elf_hash_table (info)->srelgot;
       BFD_ASSERT (srel != NULL);
 
       for (gotent = ((struct alpha_elf_link_hash_entry *) h)->got_entries;
@@ -4991,8 +5029,8 @@ elf64_alpha_finish_dynamic_sections (bfd
       Elf64_External_Dyn *dyncon, *dynconend;
       bfd_vma plt_vma, gotplt_vma;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      srelaplt = bfd_get_linker_section (output_bfd, ".rela.plt");
+      splt = elf_hash_table (info)->splt;
+      srelaplt = elf_hash_table (info)->srelplt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       plt_vma = splt->output_section->vma + splt->output_offset;
@@ -5000,7 +5038,7 @@ elf64_alpha_finish_dynamic_sections (bfd
       gotplt_vma = 0;
       if (elf64_alpha_use_secureplt)
 	{
-	  sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
+	  sgotplt = elf_hash_table (info)->sgotplt;
 	  BFD_ASSERT (sgotplt != NULL);
 	  if (sgotplt->size > 0)
 	    gotplt_vma = sgotplt->output_section->vma + sgotplt->output_offset;
@@ -5024,17 +5062,8 @@ elf64_alpha_finish_dynamic_sections (bfd
 	      dyn.d_un.d_val = srelaplt ? srelaplt->size : 0;
 	      break;
 	    case DT_JMPREL:
-	      dyn.d_un.d_ptr = srelaplt ? srelaplt->vma : 0;
-	      break;
-
-	    case DT_RELASZ:
-	      /* My interpretation of the TIS v1.1 ELF document indicates
-		 that RELASZ should not include JMPREL.  This is not what
-		 the rest of the BFD does.  It is, however, what the
-		 glibc ld.so wants.  Do this fixup here until we found
-		 out who is right.  */
-	      if (srelaplt)
-		dyn.d_un.d_val -= srelaplt->size;
+	      dyn.d_un.d_ptr = srelaplt ? (srelaplt->output_section->vma
+					   + srelaplt->output_offset) : 0;
 	      break;
 	    }
 
@@ -5518,6 +5547,8 @@ static const struct elf_size_info alpha_
   elf64_alpha_add_symbol_hook
 #define elf_backend_relocs_compatible \
   _bfd_elf_relocs_compatible
+#define elf_backend_sort_relocs_p \
+  elf64_alpha_sort_relocs_p
 #define elf_backend_check_relocs \
   elf64_alpha_check_relocs
 #define elf_backend_create_dynamic_sections \
@@ -5563,6 +5594,7 @@ static const struct elf_size_info alpha_
 #define elf_backend_plt_readonly 0
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 0
+#define elf_backend_dtrel_excludes_plt 1
 
 #include "elf64-target.h"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64.c ./bfd/elf64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF 64-bit executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-gen.c ./bfd/elf64-gen.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-gen.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-gen.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic support for 64-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -65,6 +65,7 @@ check_for_relocs (bfd * abfd, asection *
       Elf_Internal_Ehdr *ehdrp;
 
       ehdrp = elf_elfheader (abfd);
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: Relocations in generic ELF (EM: %d)"),
 			  abfd, ehdrp->e_machine);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-hppa.c ./bfd/elf64-hppa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-hppa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-hppa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for HPPA 64-bit ELF
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -26,7 +26,7 @@
 #include "elf/hppa.h"
 #include "libhppa.h"
 #include "elf64-hppa.h"
-
+#include "libiberty.h"
 
 #define ARCH_SIZE	       64
 
@@ -503,7 +503,7 @@ elf64_hppa_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   unsigned int sec_symndx;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* If this is the first dynamic object found in the link, create
@@ -522,7 +522,7 @@ elf64_hppa_check_relocs (bfd *abfd,
   /* If necessary, build a new table holding section symbols indices
      for this BFD.  */
 
-  if (info->shared && hppa_info->section_syms_bfd != abfd)
+  if (bfd_link_pic (info) && hppa_info->section_syms_bfd != abfd)
     {
       unsigned long i;
       unsigned int highest_shndx;
@@ -596,7 +596,7 @@ elf64_hppa_check_relocs (bfd *abfd,
      relocations when building shared libraries.  When not building shared
      libraries this value is never really used, but assign it to zero to
      prevent out of bounds memory accesses in other routines.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       sec_symndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
@@ -655,7 +655,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 	 have yet been processed.  Do something with what we know, as
 	 this may help reduce memory usage and processing time later.  */
       maybe_dynamic = FALSE;
-      if (hh && ((info->shared
+      if (hh && ((bfd_link_pic (info)
 		 && (!info->symbolic
 		     || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 		|| !hh->eh.def_regular
@@ -730,7 +730,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 	  break;
 
 	case R_PARISC_DIR64:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = (NEED_DYNREL);
 	  dynrel_type = R_PARISC_DIR64;
 	  break;
@@ -747,7 +747,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 	case R_PARISC_LTOFF_FPTR16F:
 	case R_PARISC_LTOFF_FPTR16WF:
 	case R_PARISC_LTOFF_FPTR16DF:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
 	  else
 	    need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
@@ -756,7 +756,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 
 	/* This is a simple OPD entry.  */
 	case R_PARISC_FPTR64:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = (NEED_OPD | NEED_PLT | NEED_DYNREL);
 	  else
 	    need_entry = (NEED_OPD | NEED_PLT);
@@ -882,7 +882,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 	     a dynamic R_PARISC_FPTR64 relocation, then make sure the
 	     section symbol for this section ends up in the dynamic
 	     symbol table.  */
-	  if (info->shared && dynrel_type == R_PARISC_FPTR64
+	  if (bfd_link_pic (info) && dynrel_type == R_PARISC_FPTR64
 	      && ! (bfd_elf_link_record_local_dynamic_symbol
 		    (info, abfd, sec_symndx)))
 	    return FALSE;
@@ -966,7 +966,7 @@ allocate_global_data_dlt (struct elf_lin
 
   if (hh->want_dlt)
     {
-      if (x->info->shared)
+      if (bfd_link_pic (x->info))
 	{
 	  /* Possibly add the symbol to the local dynamic symbol
 	     table since we might need to create a dynamic relocation
@@ -1062,7 +1062,7 @@ allocate_global_data_opd (struct elf_lin
       /* If we are creating a shared library, took the address of a local
 	 function or might export this function from this object file, then
 	 we have to create an opd descriptor.  */
-      else if (x->info->shared
+      else if (bfd_link_pic (x->info)
 	       || hh == NULL
 	       || (hh->eh.dynindx == -1 && hh->eh.type != STT_PARISC_MILLI)
 	       || (hh->eh.root.type == bfd_link_hash_defined
@@ -1072,7 +1072,7 @@ allocate_global_data_opd (struct elf_lin
 	     create a runtime relocation for the symbol to properly
 	     initialize the .opd entry.  Make sure the symbol gets
 	     added to the dynamic symbol table.  */
-	  if (x->info->shared
+	  if (bfd_link_pic (x->info)
 	      && (hh == NULL || (hh->eh.dynindx == -1)))
 	    {
 	      bfd *owner;
@@ -1089,25 +1089,23 @@ allocate_global_data_opd (struct elf_lin
 	     in dynamic relocs.  But name munging does make the result
 	     much easier to debug.  ie, the EPLT reloc will reference
 	     a symbol like .foobar, instead of .text + offset.  */
-	  if (x->info->shared && eh)
+	  if (bfd_link_pic (x->info) && eh)
 	    {
 	      char *new_name;
 	      struct elf_link_hash_entry *nh;
 
-	      new_name = alloca (strlen (eh->root.root.string) + 2);
-	      new_name[0] = '.';
-	      strcpy (new_name + 1, eh->root.root.string);
+	      new_name = concat (".", eh->root.root.string, NULL);
 
 	      nh = elf_link_hash_lookup (elf_hash_table (x->info),
 					 new_name, TRUE, TRUE, TRUE);
 
+	      free (new_name);
 	      nh->root.type = eh->root.type;
 	      nh->root.u.def.value = eh->root.u.def.value;
 	      nh->root.u.def.section = eh->root.u.def.section;
 
 	      if (! bfd_elf_link_record_dynamic_symbol (x->info, nh))
 		return FALSE;
-
 	     }
 	  hh->opd_offset = x->ofs;
 	  x->ofs += OPD_ENTRY_SIZE;
@@ -1407,7 +1405,7 @@ allocate_dynrel_entries (struct elf_link
     return FALSE;
 
   dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, x->info);
-  shared = x->info->shared;
+  shared = bfd_link_pic (x->info);
 
   /* We may need to allocate relocations for a non-dynamic symbol
      when creating a shared library.  */
@@ -1539,7 +1537,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
   if (hppa_info == NULL)
     return FALSE;
 
-  dynobj = elf_hash_table (info)->dynobj;
+  dynobj = hppa_info->root.dynobj;
   BFD_ASSERT (dynobj != NULL);
 
   /* Mark each function this program exports so that we will allocate
@@ -1549,16 +1547,16 @@ elf64_hppa_size_dynamic_sections (bfd *o
 
      We have to traverse the main linker hash table since we have to
      find functions which may not have been mentioned in any relocs.  */
-  elf_link_hash_traverse (elf_hash_table (info),
-			  (elf_hash_table (info)->dynamic_sections_created
+  elf_link_hash_traverse (&hppa_info->root,
+			  (hppa_info->root.dynamic_sections_created
 			   ? elf64_hppa_mark_milli_and_exported_functions
 			   : elf64_hppa_mark_exported_functions),
 			  info);
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (hppa_info->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  sec = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (sec != NULL);
@@ -1573,7 +1571,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 	 not actually use these entries.  Reset the size of .rela.dlt,
 	 which will cause it to get stripped from the output file
 	 below.  */
-      sec = bfd_get_linker_section (dynobj, ".rela.dlt");
+      sec = hppa_info->dlt_rel_sec;
       if (sec != NULL)
 	sec->size = 0;
     }
@@ -1637,7 +1635,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 	    {
 	      *local_dlt = sec->size;
 	      sec->size += DLT_ENTRY_SIZE;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 	        {
 		  srel->size += sizeof (Elf64_External_Rela);
 	        }
@@ -1664,7 +1662,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 		{
 		  *local_plt = sec->size;
 		  sec->size += PLT_ENTRY_SIZE;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srel->size += sizeof (Elf64_External_Rela);
 		}
 	      else
@@ -1690,7 +1688,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 		{
 		  *local_opd = sec->size;
 		  sec->size += OPD_ENTRY_SIZE;
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    srel->size += sizeof (Elf64_External_Rela);
 		}
 	      else
@@ -1705,7 +1703,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
   if (hppa_info->dlt_sec)
     {
       data.ofs = hppa_info->dlt_sec->size;
-      elf_link_hash_traverse (elf_hash_table (info),
+      elf_link_hash_traverse (&hppa_info->root,
 			      allocate_global_data_dlt, &data);
       hppa_info->dlt_sec->size = data.ofs;
     }
@@ -1713,7 +1711,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
   if (hppa_info->plt_sec)
     {
       data.ofs = hppa_info->plt_sec->size;
-      elf_link_hash_traverse (elf_hash_table (info),
+      elf_link_hash_traverse (&hppa_info->root,
 		              allocate_global_data_plt, &data);
       hppa_info->plt_sec->size = data.ofs;
     }
@@ -1721,7 +1719,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
   if (hppa_info->stub_sec)
     {
       data.ofs = 0x0;
-      elf_link_hash_traverse (elf_hash_table (info),
+      elf_link_hash_traverse (&hppa_info->root,
 			      allocate_global_data_stub, &data);
       hppa_info->stub_sec->size = data.ofs;
     }
@@ -1730,14 +1728,14 @@ elf64_hppa_size_dynamic_sections (bfd *o
   if (hppa_info->opd_sec)
     {
       data.ofs = hppa_info->opd_sec->size;
-      elf_link_hash_traverse (elf_hash_table (info),
+      elf_link_hash_traverse (&hppa_info->root,
 			      allocate_global_data_opd, &data);
       hppa_info->opd_sec->size = data.ofs;
     }
 
   /* Now allocate space for dynamic relocations, if necessary.  */
   if (hppa_info->root.dynamic_sections_created)
-    elf_link_hash_traverse (elf_hash_table (info),
+    elf_link_hash_traverse (&hppa_info->root,
 			    allocate_dynrel_entries, &data);
 
   /* The sizes of all the sections are set.  Allocate memory for them.  */
@@ -1838,7 +1836,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 	}
     }
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (hppa_info->root.dynamic_sections_created)
     {
       /* Always create a DT_PLTGOT.  It actually has nothing to do with
 	 the PLT, it is how we communicate the __gp value of a load
@@ -1855,7 +1853,7 @@ elf64_hppa_size_dynamic_sections (bfd *o
 	 must add the entries now so that we get the correct size for
 	 the .dynamic section.  The DT_DEBUG entry is filled in by the
 	 dynamic linker and used by the debugger.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0)
 	      || !add_dynamic_entry (DT_HP_DLD_HOOK, 0)
@@ -1997,7 +1995,7 @@ elf64_hppa_finish_dynamic_symbol (bfd *o
 	 if we are creating a shared library and the symbol is
 	 still undefined, we create a dynamic relocation to fill
 	 in the correct value.  */
-      if (info->shared && eh->root.type == bfd_link_hash_undefined)
+      if (bfd_link_pic (info) && eh->root.type == bfd_link_hash_undefined)
 	value = 0;
       else
 	value = (eh->root.u.def.value + eh->root.u.def.section->vma);
@@ -2079,9 +2077,10 @@ elf64_hppa_finish_dynamic_symbol (bfd *o
 
       if ((value & 7) || value + max_offset >= 2*max_offset - 8)
 	{
-	  (*_bfd_error_handler) (_("stub entry for %s cannot load .plt, dp offset = %ld"),
-				 hh->eh.root.root.string,
-				 (long) value);
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("stub entry for %s cannot load .plt, dp offset = %ld"),
+	     hh->eh.root.root.string, (long) value);
 	  return FALSE;
 	}
 
@@ -2152,7 +2151,7 @@ elf64_hppa_finalize_opd (struct elf_link
   /* If we are generating a shared library, we must generate EPLT relocations
      for each entry in the .opd, even for static functions (they may have
      had their address taken).  */
-  if (info->shared && hh->want_opd)
+  if (bfd_link_pic (info) && hh->want_opd)
     {
       Elf_Internal_Rela rel;
       bfd_byte *loc;
@@ -2205,9 +2204,7 @@ elf64_hppa_finalize_opd (struct elf_link
 	  char *new_name;
 	  struct elf_link_hash_entry *nh;
 
-	  new_name = alloca (strlen (eh->root.root.string) + 2);
-	  new_name[0] = '.';
-	  strcpy (new_name + 1, eh->root.root.string);
+	  new_name = concat (".", eh->root.root.string, NULL);
 
 	  nh = elf_link_hash_lookup (elf_hash_table (info),
 				     new_name, TRUE, TRUE, FALSE);
@@ -2216,6 +2213,7 @@ elf64_hppa_finalize_opd (struct elf_link
 	     symbol index.  */
 	  if (nh)
 	    dynindx = nh->dynindx;
+	  free (new_name);
 	}
 
       rel.r_addend = 0;
@@ -2251,7 +2249,7 @@ elf64_hppa_finalize_dlt (struct elf_link
      address, so there is no need to create a relocation.  Just install
      the proper value into the DLT, note this shortcut can not be
      skipped when building a shared library.  */
-  if (! info->shared && hh && hh->want_dlt)
+  if (! bfd_link_pic (info) && hh && hh->want_dlt)
     {
       bfd_vma value;
 
@@ -2289,7 +2287,7 @@ elf64_hppa_finalize_dlt (struct elf_link
   /* Create a relocation for the DLT entry associated with this symbol.
      When building a shared library the symbol does not have to be dynamic.  */
   if (hh->want_dlt
-      && (elf64_hppa_dynamic_symbol_p (eh, info) || info->shared))
+      && (elf64_hppa_dynamic_symbol_p (eh, info) || bfd_link_pic (info)))
     {
       Elf_Internal_Rela rel;
       bfd_byte *loc;
@@ -2337,7 +2335,7 @@ elf64_hppa_finalize_dynreloc (struct elf
 
   dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, info);
 
-  if (!dynamic_symbol && !info->shared)
+  if (!dynamic_symbol && !bfd_link_pic (info))
     return TRUE;
 
   if (hh->reloc_entries)
@@ -2366,7 +2364,8 @@ elf64_hppa_finalize_dynreloc (struct elf
 
 	  /* Allocate one iff we are building a shared library, the relocation
 	     isn't a R_PARISC_FPTR64, or we don't want an opd entry.  */
-	  if (!info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd)
+	  if (!bfd_link_pic (info)
+	      && rent->type == R_PARISC_FPTR64 && hh->want_opd)
 	    continue;
 
 	  /* Create a dynamic relocation for this entry.
@@ -2396,7 +2395,8 @@ elf64_hppa_finalize_dynreloc (struct elf
 	     We use a section symbol recorded by check_relocs as the
 	     base symbol for the relocation.  The addend is the difference
 	     between the section symbol and the address of the .opd entry.  */
-	  if (info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd)
+	  if (bfd_link_pic (info)
+	      && rent->type == R_PARISC_FPTR64 && hh->want_opd)
 	    {
 	      bfd_vma value, value2;
 
@@ -2666,6 +2666,14 @@ elf64_hppa_additional_program_headers (b
   return 0;
 }
 
+static bfd_boolean
+elf64_hppa_allow_non_load_phdr (bfd *abfd ATTRIBUTE_UNUSED,
+				const Elf_Internal_Phdr *phdr ATTRIBUTE_UNUSED,
+				unsigned int count ATTRIBUTE_UNUSED)
+{
+  return TRUE;
+}
+
 /* Allocate and initialize any program headers required by this
    specific backend.
 
@@ -2680,37 +2688,29 @@ elf64_hppa_additional_program_headers (b
    existence of a .interp section.  */
 
 static bfd_boolean
-elf64_hppa_modify_segment_map (bfd *abfd,
-			       struct bfd_link_info *info ATTRIBUTE_UNUSED)
+elf64_hppa_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
 {
   struct elf_segment_map *m;
-  asection *s;
 
-  s = bfd_get_section_by_name (abfd, ".interp");
-  if (! s)
+  m = elf_seg_map (abfd);
+  if (info != NULL && !info->user_phdrs && m != NULL && m->p_type != PT_PHDR)
     {
-      for (m = elf_seg_map (abfd); m != NULL; m = m->next)
-	if (m->p_type == PT_PHDR)
-	  break;
+      m = ((struct elf_segment_map *)
+	   bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
       if (m == NULL)
-	{
-	  m = ((struct elf_segment_map *)
-	       bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
-	  if (m == NULL)
-	    return FALSE;
+	return FALSE;
 
-	  m->p_type = PT_PHDR;
-	  m->p_flags = PF_R | PF_X;
-	  m->p_flags_valid = 1;
-	  m->p_paddr_valid = 1;
-	  m->includes_phdrs = 1;
+      m->p_type = PT_PHDR;
+      m->p_flags = PF_R | PF_X;
+      m->p_flags_valid = 1;
+      m->p_paddr_valid = 1;
+      m->includes_phdrs = 1;
 
-	  m->next = elf_seg_map (abfd);
-	  elf_seg_map (abfd) = m;
-	}
+      m->next = elf_seg_map (abfd);
+      elf_seg_map (abfd) = m;
     }
 
-  for (m = elf_seg_map (abfd); m != NULL; m = m->next)
+  for (m = elf_seg_map (abfd) ; m != NULL; m = m->next)
     if (m->p_type == PT_LOAD)
       {
 	unsigned int i;
@@ -2843,7 +2843,7 @@ elf_hppa_unmark_useless_dynamic_symbols 
 
      Ultimately we should have better controls over the generic ELF BFD
      linker code.  */
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && info->unresolved_syms_in_shared_libs != RM_IGNORE
       && h->root.type == bfd_link_hash_undefined
       && h->ref_dynamic
@@ -2874,7 +2874,7 @@ elf_hppa_remark_useless_dynamic_symbols 
 
      Ultimately we should have better controls over the generic ELF BFD
      linker code.  */
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && info->unresolved_syms_in_shared_libs != RM_IGNORE
       && h->root.type == bfd_link_hash_undefined
       && !h->ref_dynamic
@@ -2943,13 +2943,13 @@ elf_hppa_record_segment_addrs (bfd *abfd
 static bfd_boolean
 elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
 {
-  bfd_boolean retval;
+  struct stat buf;
   struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info);
 
   if (hppa_info == NULL)
     return FALSE;
 
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     {
       struct elf_link_hash_entry *gp;
       bfd_vma gp_val;
@@ -3027,7 +3027,8 @@ elf_hppa_final_link (bfd *abfd, struct b
 			  info);
 
   /* Invoke the regular ELF backend linker to do all the work.  */
-  retval = bfd_elf_final_link (abfd, info);
+  if (!bfd_elf_final_link (abfd, info))
+    return FALSE;
 
   elf_link_hash_traverse (elf_hash_table (info),
 			  elf_hppa_remark_useless_dynamic_symbols,
@@ -3035,10 +3036,17 @@ elf_hppa_final_link (bfd *abfd, struct b
 
   /* If we're producing a final executable, sort the contents of the
      unwind section. */
-  if (retval && !info->relocatable)
-    retval = elf_hppa_sort_unwind (abfd);
+  if (bfd_link_relocatable (info))
+    return TRUE;
 
-  return retval;
+  /* Do not attempt to sort non-regular files.  This is here
+     especially for configure scripts and kernel builds which run
+     tests with "ld [...] -o /dev/null".  */
+  if (stat (abfd->filename, &buf) != 0
+      || !S_ISREG(buf.st_mode))
+    return TRUE;
+
+  return elf_hppa_sort_unwind (abfd);
 }
 
 /* Relocate the given INSN.  VALUE should be the actual value we want
@@ -3274,7 +3282,8 @@ elf_hppa_final_link_relocate (Elf_Intern
 	if (max_branch_offset != 0
 	    && value + addend + max_branch_offset >= 2*max_branch_offset)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%" BFD_VMA_FMT "x): cannot reach %s"),
 	      input_bfd,
 	      input_section,
@@ -3893,23 +3902,22 @@ elf64_hppa_relocate_section (bfd *output
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable
+	  else if (!bfd_link_relocatable (info)
 		   && elf_hppa_is_dynamic_loader_symbol (eh->root.root.string))
 	    continue;
-	  else if (!info->relocatable)
+	  else if (!bfd_link_relocatable (info))
 	    {
 	      bfd_boolean err;
 	      err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
 		     || ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT);
-	      if (!info->callbacks->undefined_symbol (info,
-						      eh->root.root.string,
-						      input_bfd,
-						      input_section,
-						      rel->r_offset, err))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol) (info,
+						    eh->root.root.string,
+						    input_bfd,
+						    input_section,
+						    rel->r_offset, err);
 	    }
 
-          if (!info->relocatable
+          if (!bfd_link_relocatable (info)
               && relocation == 0
               && eh->root.type != bfd_link_hash_defined
               && eh->root.type != bfd_link_hash_defweak
@@ -3918,12 +3926,9 @@ elf64_hppa_relocate_section (bfd *output
               if (info->unresolved_syms_in_objects == RM_IGNORE
                   && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
                   && eh->type == STT_PARISC_MILLI)
-                {
-                  if (! info->callbacks->undefined_symbol
-                      (info, eh_name (eh), input_bfd,
-                       input_section, rel->r_offset, FALSE))
-                    return FALSE;
-                }
+		(*info->callbacks->undefined_symbol)
+		  (info, eh_name (eh), input_bfd,
+		   input_section, rel->r_offset, FALSE);
             }
 	}
 
@@ -3931,7 +3936,7 @@ elf64_hppa_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
@@ -3962,11 +3967,9 @@ elf64_hppa_relocate_section (bfd *output
 		      sym_name = bfd_section_name (input_bfd, sym_sec);
 		  }
 
-		if (!((*info->callbacks->reloc_overflow)
-		      (info, (eh ? &eh->root : NULL), sym_name,
-		       howto->name, (bfd_vma) 0, input_bfd,
-		       input_section, rel->r_offset)))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow)
+		  (info, (eh ? &eh->root : NULL), sym_name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      }
 	      break;
 	    }
@@ -4081,6 +4084,9 @@ const struct elf_size_info hppa64_elf_si
 #define elf_backend_modify_segment_map \
 	elf64_hppa_modify_segment_map
 
+#define elf_backend_allow_non_load_phdr \
+	elf64_hppa_allow_non_load_phdr
+
 #define elf_backend_link_output_symbol_hook \
 	elf64_hppa_link_output_symbol_hook
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-hppa.h ./bfd/elf64-hppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-hppa.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-hppa.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* ELF64/HPPA support
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ia64-vms.c ./bfd/elf64-ia64-vms.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ia64-vms.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-ia64-vms.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IA-64 support for OpenVMS
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -348,7 +348,7 @@ elf64_ia64_relax_section (bfd *abfd, ase
      one pass.  */
   *again = FALSE;
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -582,7 +582,8 @@ elf64_ia64_relax_section (bfd *abfd, ase
 	  if (strcmp (sec->output_section->name, ".init") == 0
 	      || strcmp (sec->output_section->name, ".fini") == 0)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."),
 		 sec->owner, sec, (unsigned long) roff);
 	      bfd_set_error (bfd_error_bad_value);
@@ -858,7 +859,7 @@ elf64_ia64_add_symbol_hook (bfd *abfd,
 			    bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && sym->st_size <= elf_gp_size (abfd))
     {
       /* Common symbols less than or equal to -G nn bytes are
@@ -1757,7 +1758,7 @@ get_fptr (bfd *abfd, struct bfd_link_inf
 						  | SEC_LOAD
 						  | SEC_HAS_CONTENTS
 						  | SEC_IN_MEMORY
-						  | (info->pie ? 0
+						  | (bfd_link_pie (info) ? 0
 						     : SEC_READONLY)
 						  | SEC_LINKER_CREATED));
       if (!fptr
@@ -1769,7 +1770,7 @@ get_fptr (bfd *abfd, struct bfd_link_inf
 
       ia64_info->fptr_sec = fptr;
 
-      if (info->pie)
+      if (bfd_link_pie (info))
 	{
 	  asection *fptr_rel;
 	  fptr_rel = bfd_make_section_anyway_with_flags (dynobj, ".rela.opd",
@@ -1922,7 +1923,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
   unsigned long r_symndx;
   bfd_boolean maybe_dynamic;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1955,7 +1956,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	 locally or externally defined, as not all of the input files
 	 have yet been processed.  Do something with what we know, as
 	 this may help reduce memory usage and processing time later.  */
-      maybe_dynamic = (h && ((!info->executable
+      maybe_dynamic = (h && ((!bfd_link_executable (info)
 			      && (!SYMBOLIC_BIND (info, h)
 				  || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 			     || !h->def_regular
@@ -1996,7 +1997,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_FPTR32LSB:
 	case R_IA64_FPTR64MSB:
 	case R_IA64_FPTR64LSB:
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    need_entry = NEED_FPTR | NEED_DYNREL;
 	  else
 	    need_entry = NEED_FPTR;
@@ -2047,7 +2048,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
@@ -2107,7 +2108,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	 locally or externally defined, as not all of the input files
 	 have yet been processed.  Do something with what we know, as
 	 this may help reduce memory usage and processing time later.  */
-      maybe_dynamic = (h && ((!info->executable
+      maybe_dynamic = (h && ((!bfd_link_executable (info)
 			      && (!SYMBOLIC_BIND (info, h)
 				  || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 			     || !h->def_regular
@@ -2144,7 +2145,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_FPTR32LSB:
 	case R_IA64_FPTR64MSB:
 	case R_IA64_FPTR64LSB:
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    need_entry = NEED_FPTR | NEED_DYNREL;
 	  else
 	    need_entry = NEED_FPTR;
@@ -2190,7 +2191,7 @@ elf64_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_DIR64LSB;
 	  break;
@@ -2460,7 +2461,7 @@ allocate_dynrel_entries (struct elf64_ia
   /* Note that this can't be used in relation to FPTR relocs below.  */
   dynamic_symbol = elf64_ia64_dynamic_symbol_p (dyn_i->h);
 
-  shared = x->info->shared;
+  shared = bfd_link_pic (x->info);
   resolved_zero = (dyn_i->h
 		   && ELF_ST_VISIBILITY (dyn_i->h->other)
 		   && dyn_i->h->root.type == bfd_link_hash_undefweak);
@@ -2519,7 +2520,7 @@ allocate_dynrel_entries (struct elf64_ia
 	     will be true only if we're actually allocating one statically
 	     in the main executable.  Position independent executables
 	     need a relative reloc.  */
-	  if (dyn_i->want_fptr && !x->info->pie)
+	  if (dyn_i->want_fptr && !bfd_link_pie (x->info))
 	    continue;
 	  break;
 	case R_IA64_PCREL32LSB:
@@ -2999,13 +3000,13 @@ set_got_entry (bfd *abfd, struct bfd_lin
       bfd_put_64 (abfd, value, got_sec->contents + got_offset);
 
       /* Install a dynamic relocation if needed.  */
-      if (((info->shared
+      if (((bfd_link_pic (info)
 	    && (!dyn_i->h
 		|| ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
 		|| dyn_i->h->root.type != bfd_link_hash_undefweak))
            || elf64_ia64_dynamic_symbol_p (dyn_i->h))
 	  && (!dyn_i->want_ltoff_fptr
-	      || !info->pie
+	      || !bfd_link_pie (info)
 	      || !dyn_i->h
 	      || dyn_i->h->root.type != bfd_link_hash_undefweak))
 	{
@@ -3109,7 +3110,7 @@ set_pltoff_entry (bfd *abfd, struct bfd_
 
       /* Install dynamic relocations if needed.  */
       if (!is_plt
-	  && info->shared
+	  && bfd_link_pic (info)
 	  && (!dyn_i->h
 	      || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
 	      || dyn_i->h->root.type != bfd_link_hash_undefweak))
@@ -3275,7 +3276,8 @@ elf64_ia64_choose_gp (bfd *abfd, struct 
       if (max_short_vma - min_short_vma >= 0x400000)
 	{
 overflow:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: short data segment overflowed (0x%lx >= 0x400000)"),
 	     bfd_get_filename (abfd),
 	     (unsigned long) (max_short_vma - min_short_vma));
@@ -3286,7 +3288,7 @@ overflow:
 	       || (gp_val < max_short_vma
 		   && max_short_vma - gp_val >= 0x200000))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: __gp does not cover short data segment"),
 	     bfd_get_filename (abfd));
 	  return FALSE;
@@ -3309,7 +3311,7 @@ elf64_ia64_final_link (bfd *abfd, struct
     return FALSE;
 
   /* Make sure we've got ourselves a nice fat __gp value.  */
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       bfd_vma gp_val;
       struct elf_link_hash_entry *gp;
@@ -3335,7 +3337,7 @@ elf64_ia64_final_link (bfd *abfd, struct
      of the .IA_64.unwind section.  Force this section to be relocated
      into memory rather than written immediately to the output file.  */
   unwind_output_sec = NULL;
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       asection *s = bfd_get_section_by_name (abfd, ELF_STRING_ia64_unwind);
       if (s)
@@ -3392,7 +3394,7 @@ elf64_ia64_relocate_section (bfd *output
     return FALSE;
 
   /* Infect various flags from the input section to the output section.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       bfd_vma flags;
 
@@ -3425,7 +3427,8 @@ elf64_ia64_relocate_section (bfd *output
       r_type = ELF64_R_TYPE (rel->r_info);
       if (r_type > R_IA64_MAX_RELOC_CODE)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unknown relocation type %d"),
 	     input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -3448,7 +3451,7 @@ elf64_ia64_relocate_section (bfd *output
 	  sym_sec = local_sections[r_symndx];
 	  msec = sym_sec;
 	  value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && (sym_sec->flags & SEC_MERGE) != 0
 	      && ELF_ST_TYPE (sym->st_info) == STT_SECTION
 	      && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
@@ -3516,7 +3519,7 @@ elf64_ia64_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       hit_addr = contents + rel->r_offset;
@@ -3537,7 +3540,7 @@ elf64_ia64_relocate_section (bfd *output
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Install a dynamic relocation for this reloc.  */
-	  if ((dynamic_symbol_p || info->shared)
+	  if ((dynamic_symbol_p || bfd_link_pic (info))
 	      && r_symndx != 0
 	      && (input_section->flags & SEC_ALLOC) != 0)
 	    {
@@ -3551,7 +3554,8 @@ elf64_ia64_relocate_section (bfd *output
 		case R_IA64_IMM64:
 		  /* ??? People shouldn't be doing non-pic code in
 		     shared libraries nor dynamic executables.  */
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: non-pic code with imm relocation against dynamic symbol `%s'"),
 		     input_bfd,
 		     h ? h->root.root.string
@@ -3613,7 +3617,8 @@ elf64_ia64_relocate_section (bfd *output
 	case R_IA64_GPREL64LSB:
 	  if (dynamic_symbol_p)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: @gprel relocation against dynamic symbol %s"),
 		 input_bfd,
 		 h ? h->root.root.string
@@ -3657,7 +3662,7 @@ elf64_ia64_relocate_section (bfd *output
 	      if (!undef_weak_ref)
 		value = set_fptr_entry (output_bfd, info, dyn_i, value);
 	    }
-	  if (!dyn_i->want_fptr || info->pie)
+	  if (!dyn_i->want_fptr || bfd_link_pie (info))
 	    {
 	      /* Otherwise, we expect the dynamic linker to create
 		 the entry.  */
@@ -3672,7 +3677,7 @@ elf64_ia64_relocate_section (bfd *output
 			 dynamic symbol table.  */
 		      /* ??? People shouldn't be doing non-pic code in
 			 shared libraries.  Hork.  */
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
 			(_("%B: linking non-pic code in a position independent executable"),
 			 input_bfd);
 		      ret_val = FALSE;
@@ -3774,17 +3779,20 @@ elf64_ia64_relocate_section (bfd *output
 	      const char *msg;
 
 	      if (r_type == R_IA64_PCREL21BI)
+		/* xgettext:c-format */
 		msg = _("%B: @internal branch to dynamic symbol %s");
 	      else if (r_type == R_IA64_PCREL21F || r_type == R_IA64_PCREL21M)
+		/* xgettext:c-format */
 		msg = _("%B: speculation fixup to dynamic symbol %s");
 	      else
+		/* xgettext:c-format */
 		msg = _("%B: @pcrel relocation against dynamic symbol %s");
-	      (*_bfd_error_handler) (msg, input_bfd,
-				     h ? h->root.root.string
-				       : bfd_elf_sym_name (input_bfd,
-							   symtab_hdr,
-							   sym,
-							   sym_sec));
+	      _bfd_error_handler (msg, input_bfd,
+				  h ? h->root.root.string
+				  : bfd_elf_sym_name (input_bfd,
+						      symtab_hdr,
+						      sym,
+						      sym_sec));
 	      ret_val = FALSE;
 	      continue;
 	    }
@@ -3838,7 +3846,7 @@ elf64_ia64_relocate_section (bfd *output
 	case R_IA64_IPLTMSB:
 	case R_IA64_IPLTLSB:
 	  /* Install a dynamic relocation for this reloc.  */
-	  if ((dynamic_symbol_p || info->shared)
+	  if ((dynamic_symbol_p || bfd_link_pic (info))
 	      && (input_section->flags & SEC_ALLOC) != 0)
 	    {
               /* VMS: FIXFD ??  */
@@ -3902,10 +3910,9 @@ elf64_ia64_relocate_section (bfd *output
 	    else
 	      name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 				       sym_sec);
-	    if (!(*info->callbacks->warning) (info, _("unsupported reloc"),
-					      name, input_bfd,
-					      input_section, rel->r_offset))
-	      return FALSE;
+	    (*info->callbacks->warning) (info, _("unsupported reloc"),
+					 name, input_bfd,
+					 input_section, rel->r_offset);
 	    ret_val = FALSE;
 	  }
 	  break;
@@ -3938,7 +3945,8 @@ elf64_ia64_relocate_section (bfd *output
 	      case R_IA64_LTOFF_TPREL22:
 	      case R_IA64_LTOFF_DTPMOD22:
 	      case R_IA64_LTOFF_DTPREL22:
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."),
 		   input_bfd, input_section, howto->name, name,
 		   rel->r_offset);
@@ -3953,22 +3961,23 @@ elf64_ia64_relocate_section (bfd *output
 		    /* Relaxtion is always performed for ELF output.
 		       Overflow failures for those relocations mean
 		       that the section is too big to relax.  */
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."),
 		       input_bfd, input_section, howto->name, name,
 		       rel->r_offset, input_section->size);
 		    break;
 		  }
+		/* Fall through.  */
 	      default:
-		if (!(*info->callbacks->reloc_overflow) (info,
-							 &h->root,
-							 name,
-							 howto->name,
-							 (bfd_vma) 0,
-							 input_bfd,
-							 input_section,
-							 rel->r_offset))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow) (info,
+						    &h->root,
+						    name,
+						    howto->name,
+						    (bfd_vma) 0,
+						    input_bfd,
+						    input_section,
+						    rel->r_offset);
 		break;
 	      }
 
@@ -4203,8 +4212,9 @@ elf64_ia64_set_private_flags (bfd *abfd,
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
 static bfd_boolean
-elf64_ia64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   bfd_boolean ok = TRUE;
@@ -4242,7 +4252,7 @@ elf64_ia64_merge_private_bfd_data (bfd *
 
   if ((in_flags & EF_IA_64_TRAPNIL) != (out_flags & EF_IA_64_TRAPNIL))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking trap-on-NULL-dereference with non-trapping files"),
 	 ibfd);
 
@@ -4251,7 +4261,7 @@ elf64_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking big-endian files with little-endian files"),
 	 ibfd);
 
@@ -4260,7 +4270,7 @@ elf64_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking 64-bit files with 32-bit files"),
 	 ibfd);
 
@@ -4269,7 +4279,7 @@ elf64_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking constant-gp files with non-constant-gp files"),
 	 ibfd);
 
@@ -4279,7 +4289,7 @@ elf64_ia64_merge_private_bfd_data (bfd *
   if ((in_flags & EF_IA_64_NOFUNCDESC_CONS_GP)
       != (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking auto-pic files with non-auto-pic files"),
 	 ibfd);
 
@@ -4740,11 +4750,11 @@ elf64_vms_link_add_object_symbols (bfd *
       /* You can't use -r against a dynamic object.  Also, there's no
 	 hope of using a dynamic object which does not exactly match
 	 the format of the output file.  */
-      if (info->relocatable
+      if (bfd_link_relocatable (info)
 	  || !is_elf_hash_table (htab)
 	  || info->output_bfd->xvec != abfd->xvec)
 	{
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    bfd_set_error (bfd_error_invalid_operation);
 	  else
 	    bfd_set_error (bfd_error_wrong_format);
@@ -4759,7 +4769,7 @@ elf64_vms_link_add_object_symbols (bfd *
 	 so we attach them to this BFD, provided it is the right
 	 format.  FIXME: If there are no input BFD's of the same
 	 format as the output, we can't make a shared library.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && is_elf_hash_table (htab)
 	  && info->output_bfd->xvec == abfd->xvec
 	  && !htab->dynamic_sections_created)
@@ -5121,13 +5131,15 @@ error_free_dyn:
 		{
 		  /* PR binutils/2735 */
 		  if (normal_bfd == NULL)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("Warning: alignment %u of common symbol `%s' in %B"
 			 " is greater than the alignment (%u) of its section %A"),
 		       common_bfd, h->root.u.def.section,
 		       1 << common_align, name, 1 << normal_align);
 		  else
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("Warning: alignment %u of symbol `%s' in %B"
 			 " is smaller than %u in %B"),
 		       normal_bfd, common_bfd,
@@ -5142,7 +5154,8 @@ error_free_dyn:
 	      if (h->size != 0
 		  && h->size != isym->st_size
 		  && ! size_change_ok)
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("Warning: size of symbol `%s' changed"
 		     " from %lu in %B to %lu in %B"),
 		   old_bfd, abfd,
@@ -5169,7 +5182,8 @@ error_free_dyn:
 	      if (h->type != type)
 		{
 		  if (h->type != STT_NOTYPE && ! type_change_ok)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("Warning: type of symbol `%s' changed"
 			 " from %d to %d in %B"),
 		       abfd, name, h->type, type);
@@ -5361,7 +5375,7 @@ elf64_vms_link_add_archive_symbols (bfd 
 	 to include it.  We don't need to check anything.  */
       if (! (*info->callbacks->add_archive_element) (info, element,
                                                      h->root.string, &element))
-	return FALSE;
+	continue;
       if (! elf64_vms_link_add_object_symbols (element, info))
 	return FALSE;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-mips.c ./bfd/elf64-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS-specific support for 64-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Ian Lance Taylor, Cygnus Support
    Linker support added by Mark Mitchell, CodeSourcery, LLC.
    <mark@codesourcery.com>
@@ -1881,6 +1881,21 @@ static reloc_howto_type mips16_elf64_how
 	 0x0000ffff,		/* src_mask */
 	 0x0000ffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* MIPS16 16-bit PC-relative branch offset.  */
+  HOWTO (R_MIPS16_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS16_PC16_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 static reloc_howto_type mips16_elf64_howto_table_rela[] =
@@ -2082,6 +2097,21 @@ static reloc_howto_type mips16_elf64_how
 	 0,			/* src_mask */
 	 0x0000ffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* MIPS16 16-bit PC-relative branch offset.  */
+  HOWTO (R_MIPS16_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS16_PC16_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 static reloc_howto_type micromips_elf64_howto_table_rel[] =
@@ -3415,7 +3445,8 @@ static const struct elf_reloc_map mips16
     R_MIPS16_TLS_DTPREL_LO16 - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_GOTTPREL, R_MIPS16_TLS_GOTTPREL - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_TPREL_HI16, R_MIPS16_TLS_TPREL_HI16 - R_MIPS16_min },
-  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min }
+  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min },
+  { BFD_RELOC_MIPS16_16_PCREL_S1, R_MIPS16_PC16_S1 - R_MIPS16_min }
 };
 
 static const struct elf_reloc_map micromips_reloc_map[] =
@@ -3587,7 +3618,7 @@ mips_elf64_rtype_to_howto (unsigned int 
 	}
       if (r_type >= R_MIPS_max)
 	{
-	  (*_bfd_error_handler) (_("unrecognised MIPS reloc number: %d"), r_type);
+	  _bfd_error_handler (_("unrecognised MIPS reloc number: %d"), r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  r_type = R_MIPS_NONE;
 	}
@@ -4436,6 +4467,7 @@ const struct elf_size_info mips_elf64_si
 #define elf_backend_grok_psinfo		elf64_mips_grok_psinfo
 
 #define elf_backend_got_header_size	(8 * MIPS_RESERVED_GOTNO)
+#define elf_backend_want_dynrelro	1
 
 /* MIPS ELF64 can use a mixture of REL and RELA, but some Relocations
    work better/work only in RELA, so we default to this.  */
@@ -4475,32 +4507,8 @@ const struct elf_size_info mips_elf64_si
 #define bfd_elf64_canonicalize_reloc mips_elf64_canonicalize_reloc
 #define bfd_elf64_get_dynamic_reloc_upper_bound mips_elf64_get_dynamic_reloc_upper_bound
 #define bfd_elf64_canonicalize_dynamic_reloc mips_elf64_canonicalize_dynamic_reloc
-#define bfd_elf64_bfd_relax_section     _bfd_mips_relax_section
 #define bfd_elf64_mkobject		_bfd_mips_elf_mkobject
 
-/* MIPS ELF64 archive functions.  */
-#define bfd_elf64_archive_functions
-extern bfd_boolean bfd_elf64_archive_slurp_armap
-  (bfd *);
-extern bfd_boolean bfd_elf64_archive_write_armap
-  (bfd *, unsigned int, struct orl *, unsigned int, int);
-#define bfd_elf64_archive_slurp_extended_name_table \
-			_bfd_archive_coff_slurp_extended_name_table
-#define bfd_elf64_archive_construct_extended_name_table \
-			_bfd_archive_coff_construct_extended_name_table
-#define bfd_elf64_archive_truncate_arname \
-			_bfd_archive_coff_truncate_arname
-#define bfd_elf64_archive_read_ar_hdr	_bfd_archive_coff_read_ar_hdr
-#define bfd_elf64_archive_write_ar_hdr	_bfd_archive_coff_write_ar_hdr
-#define bfd_elf64_archive_openr_next_archived_file \
-			_bfd_archive_coff_openr_next_archived_file
-#define bfd_elf64_archive_get_elt_at_index \
-			_bfd_archive_coff_get_elt_at_index
-#define bfd_elf64_archive_generic_stat_arch_elt \
-			_bfd_archive_coff_generic_stat_arch_elt
-#define bfd_elf64_archive_update_armap_timestamp \
-			_bfd_archive_coff_update_armap_timestamp
-
 /* The SGI style (n)64 NewABI.  */
 #define TARGET_LITTLE_SYM		mips_elf64_le_vec
 #define TARGET_LITTLE_NAME		"elf64-littlemips"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-mmix.c ./bfd/elf64-mmix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-mmix.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-mmix.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MMIX-specific support for 64-bit ELF.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Hans-Peter Nilsson <hp@bitrange.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -172,7 +172,7 @@ extern void mmix_elf_symbol_processing (
 
 /* Only intended to be called from a debugger.  */
 extern void mmix_dump_bpo_gregs
-  (struct bfd_link_info *, bfd_error_handler_type);
+  (struct bfd_link_info *, void (*) (const char *, ...));
 
 static void
 mmix_set_relaxable_size (bfd *, asection *, void *);
@@ -1190,7 +1190,8 @@ mmix_elf_perform_relocation (asection *i
 	   doesn't cost much, so can be left in at all times.  */
 	if (value != gregdata->reloc_request[bpo_index].value)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: Internal inconsistency error for value for\n\
  linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"),
 	       bfd_get_filename (isec->owner),
@@ -1261,6 +1262,7 @@ mmix_info_to_howto_rela (bfd *abfd ATTRI
   r_type = ELF64_R_TYPE (dst->r_info);
   if (r_type >= (unsigned int) R_MMIX_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid MMIX reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1429,7 +1431,7 @@ mmix_elf_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  /* This is a relocatable link.  For most relocs we don't have to
 	     change anything, unless the reloc is against a section
@@ -1516,13 +1518,12 @@ mmix_elf_relocate_section (bfd *output_b
 
       if (r != bfd_reloc_ok)
 	{
-	  bfd_boolean check_ok = TRUE;
 	  const char * msg = (const char *) NULL;
 
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      check_ok = info->callbacks->reloc_overflow
+	      info->callbacks->reloc_overflow
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
@@ -1530,9 +1531,8 @@ mmix_elf_relocate_section (bfd *output_b
 	    case bfd_reloc_undefined:
 	      /* We may have sent this message above.  */
 	      if (! undefined_signalled)
-		check_ok = info->callbacks->undefined_symbol
-		  (info, name, input_bfd, input_section, rel->r_offset,
-		   TRUE);
+		info->callbacks->undefined_symbol
+		  (info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      undefined_signalled = TRUE;
 	      break;
 
@@ -1554,11 +1554,8 @@ mmix_elf_relocate_section (bfd *output_b
 	    }
 
 	  if (msg)
-	    check_ok = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! check_ok)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -1616,12 +1613,14 @@ mmix_final_link_relocate (reloc_howto_ty
 	  /* Note: This is separated out into two messages in order
 	     to ease the translation into other languages.  */
 	  if (symname == NULL || *symname == 0)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: base-plus-offset relocation against register symbol: (unknown) in %s"),
 	       bfd_get_filename (input_section->owner),
 	       bfd_get_section_name (symsec->owner, symsec));
 	  else
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: base-plus-offset relocation against register symbol: %s in %s"),
 	       bfd_get_filename (input_section->owner), symname,
 	       bfd_get_section_name (symsec->owner, symsec));
@@ -1665,12 +1664,14 @@ mmix_final_link_relocate (reloc_howto_ty
 	  /* Note: This is separated out into two messages in order
 	     to ease the translation into other languages.  */
 	  if (symname == NULL || *symname == 0)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: register relocation against non-register symbol: (unknown) in %s"),
 	       bfd_get_filename (input_section->owner),
 	       bfd_get_section_name (symsec->owner, symsec));
 	  else
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: register relocation against non-register symbol: %s in %s"),
 	       bfd_get_filename (input_section->owner), symname,
 	       bfd_get_section_name (symsec->owner, symsec));
@@ -1707,7 +1708,7 @@ mmix_final_link_relocate (reloc_howto_ty
 	    && strcmp (bfd_get_section_name (symsec->owner, symsec),
 		       MMIX_REG_SECTION_NAME) != 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: directive LOCAL valid only with a register or absolute value"),
 	     bfd_get_filename (input_section->owner));
 
@@ -1737,7 +1738,8 @@ mmix_final_link_relocate (reloc_howto_ty
 	if ((bfd_vma) srel >= first_global)
 	  {
 	    /* FIXME: Better error message.  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."),
 	       bfd_get_filename (input_section->owner), (long) srel, (long) first_global);
 
@@ -1870,7 +1872,7 @@ mmix_elf_check_common_relocs  (bfd *abfd
 	     DSO-related stuff if that member is non-NULL.  */
 	case R_MMIX_BASE_PLUS_OFFSET:
 	  /* We don't do anything with this reloc for a relocatable link.  */
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    break;
 
 	  if (bpo_greg_owner == NULL)
@@ -1994,7 +1996,7 @@ mmix_elf_check_relocs (bfd *abfd,
   if (!mmix_elf_check_common_relocs (abfd, info, sec, relocs))
     return FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   rel_end = relocs + sec->reloc_count;
@@ -2114,9 +2116,7 @@ static asymbol *mmix_elf_reg_section_sym
 /* Handle the special section numbers that a symbol may use.  */
 
 void
-mmix_elf_symbol_processing (abfd, asym)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asymbol *asym;
+mmix_elf_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym)
 {
   elf_symbol_type *elfsym;
 
@@ -2196,10 +2196,12 @@ mmix_elf_add_symbol_hook (bfd *abfd,
 	{
 	  /* How do we get the asymbol (or really: the filename) from h?
 	     h->u.def.section->owner is NULL.  */
-	  ((*_bfd_error_handler)
-	   (_("%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"),
-	    bfd_get_filename (abfd), *namep,
-	    *namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)));
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%s: Error: multiple definition of `%s'; start of %s "
+	       "is set in a earlier linked file\n"),
+	     bfd_get_filename (abfd), *namep,
+	     *namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX));
 	   bfd_set_error (bfd_error_bad_value);
 	   return FALSE;
 	}
@@ -2303,7 +2305,7 @@ mmix_set_relaxable_size (bfd *abfd ATTRI
 
   /* For use in relocatable link, we start with a max stubs size.  See
      mmix_elf_relax_section.  */
-  if (info->relocatable && sec->output_section)
+  if (bfd_link_relocatable (info) && sec->output_section)
     mmix_elf_section_data (sec->output_section)->pjs.stubs_size_sum
       += (mmix_elf_section_data (sec)->pjs.n_pushj_relocs
 	  * MAX_PUSHJ_STUB_SIZE);
@@ -2439,7 +2441,8 @@ _bfd_mmix_after_linker_allocation (bfd *
   if (gregdata->n_remaining_bpo_relocs_this_relaxation_round
       != gregdata->n_bpo_relocs)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("Internal inconsistency: remaining %u != max %u.\n\
   Please report this bug."),
 	 gregdata->n_remaining_bpo_relocs_this_relaxation_round,
@@ -2491,9 +2494,8 @@ bpo_reloc_request_sort_fn (const void * 
    from base-plus-offset relocs.  */
 
 void
-mmix_dump_bpo_gregs (link_info, pf)
-     struct bfd_link_info *link_info;
-     bfd_error_handler_type pf;
+mmix_dump_bpo_gregs (struct bfd_link_info *link_info,
+		     void (*pf) (const char *fmt, ...))
 {
   bfd *bpo_greg_owner;
   asection *bpo_gregs_section;
@@ -2624,7 +2626,7 @@ mmix_elf_relax_section (bfd *abfd,
       /* We process relocs in a distinctly different way when this is a
 	 relocatable link (for one, we don't look at symbols), so we avoid
 	 mixing its code with that for the "normal" relaxation.  */
-      if (link_info->relocatable)
+      if (bfd_link_relocatable (link_info))
 	{
 	  /* The only transformation in a relocatable link is to generate
 	     a full stub at the location of the stub calculated for the
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ppc.c ./bfd/elf64-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PowerPC64-specific support for 64-bit ELF.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Linus Nordberg, Swox AB <info@swox.com>,
    based on elf32-ppc.c by Ian Lance Taylor.
    Largely rewritten by Alan Modra.
@@ -72,9 +72,11 @@ static bfd_vma opd_entry_value
 #define elf_backend_plt_alignment 3
 #define elf_backend_plt_not_loaded 1
 #define elf_backend_got_header_size 8
+#define elf_backend_want_dynrelro 1
 #define elf_backend_can_gc_sections 1
 #define elf_backend_can_refcount 1
 #define elf_backend_rela_normal 1
+#define elf_backend_dtrel_excludes_plt 1
 #define elf_backend_default_execstack 0
 
 #define bfd_elf64_mkobject		      ppc64_elf_mkobject
@@ -86,12 +88,13 @@ static bfd_vma opd_entry_value
 #define bfd_elf64_bfd_link_hash_table_create  ppc64_elf_link_hash_table_create
 #define bfd_elf64_get_synthetic_symtab	      ppc64_elf_get_synthetic_symtab
 #define bfd_elf64_bfd_link_just_syms	      ppc64_elf_link_just_syms
+#define bfd_elf64_bfd_gc_sections	      ppc64_elf_gc_sections
 
 #define elf_backend_object_p		      ppc64_elf_object_p
 #define elf_backend_grok_prstatus	      ppc64_elf_grok_prstatus
 #define elf_backend_grok_psinfo		      ppc64_elf_grok_psinfo
 #define elf_backend_write_core_note	      ppc64_elf_write_core_note
-#define elf_backend_create_dynamic_sections   ppc64_elf_create_dynamic_sections
+#define elf_backend_create_dynamic_sections   _bfd_elf_create_dynamic_sections
 #define elf_backend_copy_indirect_symbol      ppc64_elf_copy_indirect_symbol
 #define elf_backend_add_symbol_hook	      ppc64_elf_add_symbol_hook
 #define elf_backend_check_directives	      ppc64_elf_before_check_relocs
@@ -117,6 +120,7 @@ static bfd_vma opd_entry_value
 #define elf_backend_link_output_symbol_hook   ppc64_elf_output_symbol_hook
 #define elf_backend_special_sections	      ppc64_elf_special_sections
 #define elf_backend_merge_symbol_attribute    ppc64_elf_merge_symbol_attribute
+#define elf_backend_merge_symbol	      ppc64_elf_merge_symbol
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
@@ -173,8 +177,12 @@ static bfd_vma opd_entry_value
 #define LD_R2_0R2	0xe8420000	/* ld	 %r2,xxx+0(%r2)  */
 
 #define LD_R2_0R1	0xe8410000	/* ld    %r2,0(%r1)      */
+#define LD_R2_0R12	0xe84c0000	/* ld    %r2,0(%r12)     */
+#define ADD_R2_R2_R12	0x7c426214	/* add   %r2,%r2,%r12    */
 
-#define ADDIS_R12_R2	0x3d820000	/* addis %r12,%r2,xxx@ha     */
+#define LIS_R2		0x3c400000	/* lis %r2,xxx@ha         */
+#define ADDIS_R2_R12	0x3c4c0000	/* addis %r2,%r12,xxx@ha  */
+#define ADDIS_R12_R2	0x3d820000	/* addis %r12,%r2,xxx@ha  */
 #define ADDIS_R12_R12	0x3d8c0000	/* addis %r12,%r12,xxx@ha */
 #define LD_R12_0R12	0xe98c0000	/* ld    %r12,xxx@l(%r12) */
 
@@ -238,6 +246,10 @@ static bfd_vma opd_entry_value
 #define NO_OPD_RELOCS 0
 #endif
 
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+#endif
+
 static inline int
 abiversion (bfd *abfd)
 {
@@ -679,7 +691,7 @@ static reloc_howto_type ppc64_elf_howto_
 	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 ppc64_elf_unhandled_reloc, /* special_function */
 	 "R_PPC64_PLTREL32",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -2018,6 +2030,36 @@ static reloc_howto_type ppc64_elf_howto_
 	 0xffff,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
 
+  /* Like R_PPC64_REL16_HA but for split field in addpcis.  */
+  HOWTO (R_PPC64_REL16DX_HA,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 ppc64_elf_ha_reloc,	/* special_function */
+	 "R_PPC64_REL16DX_HA",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x1fffc1,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* A split-field reloc for addpcis, non-relative (gas internal use only).  */
+  HOWTO (R_PPC64_16DX_HA,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 ppc64_elf_ha_reloc,	/* special_function */
+	 "R_PPC64_16DX_HA",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x1fffc1,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   /* Like R_PPC64_ADDR16_HI, but no overflow.  */
   HOWTO (R_PPC64_ADDR16_HIGH,	/* type */
 	 16,			/* rightshift */
@@ -2108,6 +2150,21 @@ static reloc_howto_type ppc64_elf_howto_
 	 0xffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
+  /* Marker reloc on ELFv2 large-model function entry.  */
+  HOWTO (R_PPC64_ENTRY,
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_PPC64_ENTRY",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   /* Like ADDR64, but use local entry point of function.  */
   HOWTO (R_PPC64_ADDR64_LOCAL,	/* type */
 	 0,			/* rightshift */
@@ -2163,13 +2220,10 @@ ppc_howto_init (void)
 {
   unsigned int i, type;
 
-  for (i = 0;
-       i < sizeof (ppc64_elf_howto_raw) / sizeof (ppc64_elf_howto_raw[0]);
-       i++)
+  for (i = 0; i < ARRAY_SIZE (ppc64_elf_howto_raw); i++)
     {
       type = ppc64_elf_howto_raw[i].type;
-      BFD_ASSERT (type < (sizeof (ppc64_elf_howto_table)
-			  / sizeof (ppc64_elf_howto_table[0])));
+      BFD_ASSERT (type < ARRAY_SIZE (ppc64_elf_howto_table));
       ppc64_elf_howto_table[type] = &ppc64_elf_howto_raw[i];
     }
 }
@@ -2411,6 +2465,12 @@ ppc64_elf_reloc_type_lookup (bfd *abfd A
       break;
     case BFD_RELOC_HI16_S_PCREL:		r = R_PPC64_REL16_HA;
       break;
+    case BFD_RELOC_PPC_16DX_HA:			r = R_PPC64_16DX_HA;
+      break;
+    case BFD_RELOC_PPC_REL16DX_HA:		r = R_PPC64_REL16DX_HA;
+      break;
+    case BFD_RELOC_PPC64_ENTRY:			r = R_PPC64_ENTRY;
+      break;
     case BFD_RELOC_PPC64_ADDR64_LOCAL:		r = R_PPC64_ADDR64_LOCAL;
       break;
     case BFD_RELOC_VTABLE_INHERIT:		r = R_PPC64_GNU_VTINHERIT;
@@ -2428,9 +2488,7 @@ ppc64_elf_reloc_name_lookup (bfd *abfd A
 {
   unsigned int i;
 
-  for (i = 0;
-       i < sizeof (ppc64_elf_howto_raw) / sizeof (ppc64_elf_howto_raw[0]);
-       i++)
+  for (i = 0; i < ARRAY_SIZE (ppc64_elf_howto_raw); i++)
     if (ppc64_elf_howto_raw[i].name != NULL
 	&& strcasecmp (ppc64_elf_howto_raw[i].name, r_name) == 0)
       return &ppc64_elf_howto_raw[i];
@@ -2451,11 +2509,11 @@ ppc64_elf_info_to_howto (bfd *abfd ATTRI
     ppc_howto_init ();
 
   type = ELF64_R_TYPE (dst->r_info);
-  if (type >= (sizeof (ppc64_elf_howto_table)
-	       / sizeof (ppc64_elf_howto_table[0])))
+  if (type >= ARRAY_SIZE (ppc64_elf_howto_table))
     {
-      (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-			     abfd, (int) type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: invalid relocation type %d"),
+			  abfd, (int) type);
       type = R_PPC64_NONE;
     }
   cache_ptr->howto = ppc64_elf_howto_table[type];
@@ -2468,6 +2526,11 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *
 		    void *data, asection *input_section,
 		    bfd *output_bfd, char **error_message)
 {
+  enum elf_ppc64_reloc_type r_type;
+  long insn;
+  bfd_size_type octets;
+  bfd_vma value;
+
   /* If this is a relocatable link (output_bfd test tells us), just
      call the generic function.  Any adjustment will be done at final
      link time.  */
@@ -2479,7 +2542,29 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *
      We won't actually be using the low 16 bits, so trashing them
      doesn't matter.  */
   reloc_entry->addend += 0x8000;
-  return bfd_reloc_continue;
+  r_type = reloc_entry->howto->type;
+  if (r_type != R_PPC64_REL16DX_HA)
+    return bfd_reloc_continue;
+
+  value = 0;
+  if (!bfd_is_com_section (symbol->section))
+    value = symbol->value;
+  value += (reloc_entry->addend
+	    + symbol->section->output_offset
+	    + symbol->section->output_section->vma);
+  value -= (reloc_entry->address
+	    + input_section->output_offset
+	    + input_section->output_section->vma);
+  value = (bfd_signed_vma) value >> 16;
+
+  octets = reloc_entry->address * bfd_octets_per_byte (abfd);
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
+  insn &= ~0x1fffc1;
+  insn |= (value & 0xffc1) | ((value & 0x3e) << 15);
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
+  if (value + 0x8000 > 0xffff)
+    return bfd_reloc_overflow;
+  return bfd_reloc_ok;
 }
 
 static bfd_reloc_status_type
@@ -2507,6 +2592,7 @@ ppc64_elf_branch_reloc (bfd *abfd, arele
       elf_symbol_type *elfsym = (elf_symbol_type *) symbol;
 
       if (symbol->section->owner != abfd
+	  && symbol->section->owner != NULL
 	  && abiversion (symbol->section->owner) >= 2)
 	{
 	  unsigned int i;
@@ -2824,12 +2910,15 @@ ppc64_elf_mkobject (bfd *abfd)
 }
 
 /* Fix bad default arch selected for a 64 bit input bfd when the
-   default is 32 bit.  */
+   default is 32 bit.  Also select arch based on apuinfo.  */
 
 static bfd_boolean
 ppc64_elf_object_p (bfd *abfd)
 {
-  if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 32)
+  if (!abfd->arch_info->the_default)
+    return TRUE;
+
+  if (abfd->arch_info->bits_per_word == 32)
     {
       Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
 
@@ -2840,7 +2929,7 @@ ppc64_elf_object_p (bfd *abfd)
 	  BFD_ASSERT (abfd->arch_info->bits_per_word == 64);
 	}
     }
-  return TRUE;
+  return _bfd_elf_ppc_set_arch (abfd);
 }
 
 /* Support for core dump NOTE sections.  */
@@ -3018,6 +3107,7 @@ get_opd_info (asection * sec)
 
 /* Parameters for the qsort hook.  */
 static bfd_boolean synthetic_relocatable;
+static asection *synthetic_opd;
 
 /* qsort comparison function for ppc64_elf_get_synthetic_symtab.  */
 
@@ -3034,12 +3124,15 @@ compare_symbols (const void *ap, const v
     return 1;
 
   /* then .opd symbols.  */
-  if (strcmp (a->section->name, ".opd") == 0
-      && strcmp (b->section->name, ".opd") != 0)
-    return -1;
-  if (strcmp (a->section->name, ".opd") != 0
-      && strcmp (b->section->name, ".opd") == 0)
-    return 1;
+  if (synthetic_opd != NULL)
+    {
+      if (strcmp (a->section->name, ".opd") == 0
+	  && strcmp (b->section->name, ".opd") != 0)
+	return -1;
+      if (strcmp (a->section->name, ".opd") != 0
+	  && strcmp (b->section->name, ".opd") == 0)
+	return 1;
+    }
 
   /* then other code symbols.  */
   if ((a->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
@@ -3101,11 +3194,11 @@ compare_symbols (const void *ap, const v
 /* Search SYMS for a symbol of the given VALUE.  */
 
 static asymbol *
-sym_exists_at (asymbol **syms, long lo, long hi, int id, bfd_vma value)
+sym_exists_at (asymbol **syms, long lo, long hi, unsigned int id, bfd_vma value)
 {
   long mid;
 
-  if (id == -1)
+  if (id == (unsigned) -1)
     {
       while (lo < hi)
 	{
@@ -3198,6 +3291,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abf
     memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms));
 
   synthetic_relocatable = relocatable;
+  synthetic_opd = opd;
   qsort (syms, symcount, sizeof (*syms), compare_symbols);
 
   if (!relocatable && symcount > 1)
@@ -3214,7 +3308,11 @@ ppc64_elf_get_synthetic_symtab (bfd *abf
     }
 
   i = 0;
-  if (strcmp (syms[i]->section->name, ".opd") == 0)
+  /* Note that here and in compare_symbols we can't compare opd and
+     sym->section directly.  With separate debug info files, the
+     symbols will be extracted from the debug file while abfd passed
+     to this function is the real binary.  */
+  if (opd != NULL && strcmp (syms[i]->section->name, ".opd") == 0)
     ++i;
   codesecsym = i;
 
@@ -3230,9 +3328,10 @@ ppc64_elf_get_synthetic_symtab (bfd *abf
       break;
   secsymend = i;
 
-  for (; i < symcount; ++i)
-    if (strcmp (syms[i]->section->name, ".opd") != 0)
-      break;
+  if (opd != NULL)
+    for (; i < symcount; ++i)
+      if (strcmp (syms[i]->section->name, ".opd") != 0)
+	break;
   opdsymend = i;
 
   for (; i < symcount; ++i)
@@ -3716,7 +3815,7 @@ must_be_dyn_reloc (struct bfd_link_info 
     case R_PPC64_TPREL16_HIGHEST:
     case R_PPC64_TPREL16_HIGHESTA:
     case R_PPC64_TPREL64:
-      return !info->executable;
+      return !bfd_link_executable (info);
     }
 }
 
@@ -3796,7 +3895,22 @@ enum ppc_stub_type {
   ppc_stub_plt_branch_r2off,
   ppc_stub_plt_call,
   ppc_stub_plt_call_r2save,
-  ppc_stub_global_entry
+  ppc_stub_global_entry,
+  ppc_stub_save_res
+};
+
+/* Information on stub grouping.  */
+struct map_stub
+{
+  /* The stub section.  */
+  asection *stub_sec;
+  /* This is the section to which stubs in the group will be attached.  */
+  asection *link_sec;
+  /* Next group.  */
+  struct map_stub *next;
+  /* Whether to emit a copy of register save/restore functions in this
+     group.  */
+  int needs_save_res;
 };
 
 struct ppc_stub_hash_entry {
@@ -3806,8 +3920,8 @@ struct ppc_stub_hash_entry {
 
   enum ppc_stub_type stub_type;
 
-  /* The stub section.  */
-  asection *stub_sec;
+  /* Group information.  */
+  struct map_stub *group;
 
   /* Offset within stub_sec of the beginning of this stub.  */
   bfd_vma stub_offset;
@@ -3821,10 +3935,6 @@ struct ppc_stub_hash_entry {
   struct ppc_link_hash_entry *h;
   struct plt_entry *plt_ent;
 
-  /* Where this stub is being called from, or, in the case of combined
-     stub sections, the first input section in the group.  */
-  asection *id_sec;
-
   /* Symbol st_other.  */
   unsigned char other;
 };
@@ -3872,6 +3982,9 @@ struct ppc_link_hash_entry
   /* Track dynamic relocs copied for this symbol.  */
   struct elf_dyn_relocs *dyn_relocs;
 
+  /* Chain of aliases referring to a weakdef.  */
+  struct ppc_link_hash_entry *weakref;
+
   /* Link between function code and descriptor symbols.  */
   struct ppc_link_hash_entry *oh;
 
@@ -3885,8 +3998,9 @@ struct ppc_link_hash_entry
      should be set for all globals defined in any opd/toc section.  */
   unsigned int adjust_done:1;
 
-  /* Set if we twiddled this symbol to weak at some stage.  */
-  unsigned int was_undefined:1;
+  /* Set if this is an out-of-line register save/restore function,
+     with non-standard calling convention.  */
+  unsigned int save_res:1;
 
   /* Contexts in which symbol is used in the GOT (or TOC).
      TLS_GD .. TLS_EXPLICIT bits are or'd into the mask as the
@@ -3925,37 +4039,38 @@ struct ppc_link_hash_table
   /* Various options and other info passed from the linker.  */
   struct ppc64_elf_params *params;
 
-  /* Array to keep track of which stub sections have been created, and
-     information on stub grouping.  */
-  struct map_stub {
-    /* This is the section to which stubs in the group will be attached.  */
-    asection *link_sec;
-    /* The stub section.  */
-    asection *stub_sec;
-    /* Along with elf_gp, specifies the TOC pointer used in this group.  */
+  /* The size of sec_info below.  */
+  unsigned int sec_info_arr_size;
+
+  /* Per-section array of extra section info.  Done this way rather
+     than as part of ppc64_elf_section_data so we have the info for
+     non-ppc64 sections.  */
+  struct
+  {
+    /* Along with elf_gp, specifies the TOC pointer used by this section.  */
     bfd_vma toc_off;
-  } *stub_group;
+
+    union
+    {
+      /* The section group that this section belongs to.  */
+      struct map_stub *group;
+      /* A temp section list pointer.  */
+      asection *list;
+    } u;
+  } *sec_info;
+
+  /* Linked list of groups.  */
+  struct map_stub *group;
 
   /* Temp used when calculating TOC pointers.  */
   bfd_vma toc_curr;
   bfd *toc_bfd;
   asection *toc_first_sec;
 
-  /* Highest input section id.  */
-  int top_id;
-
-  /* Highest output section index.  */
-  int top_index;
-
   /* Used when adding symbols.  */
   struct ppc_link_hash_entry *dot_syms;
 
-  /* List of input sections for each output section.  */
-  asection **input_list;
-
   /* Shortcuts to get to dynamic linker sections.  */
-  asection *dynbss;
-  asection *relbss;
   asection *glink;
   asection *sfpr;
   asection *brlt;
@@ -3987,8 +4102,8 @@ struct ppc_link_hash_table
   /* Set on error.  */
   unsigned int stub_error:1;
 
-  /* Temp used by ppc64_elf_before_check_relocs.  */
-  unsigned int twiddled_syms:1;
+  /* Whether func_desc_adjust needs to be run over symbols.  */
+  unsigned int need_func_desc_adj:1;
 
   /* Incremented every time we size stubs.  */
   unsigned int stub_iteration;
@@ -4056,13 +4171,12 @@ stub_hash_newfunc (struct bfd_hash_entry
       /* Initialize the local fields.  */
       eh = (struct ppc_stub_hash_entry *) entry;
       eh->stub_type = ppc_stub_none;
-      eh->stub_sec = NULL;
+      eh->group = NULL;
       eh->stub_offset = 0;
       eh->target_value = 0;
       eh->target_section = NULL;
       eh->h = NULL;
       eh->plt_ent = NULL;
-      eh->id_sec = NULL;
       eh->other = 0;
     }
 
@@ -4264,14 +4378,20 @@ create_linkage_sections (bfd *dynobj, st
 
   htab = ppc_hash_table (info);
 
-  /* Create .sfpr for code to save and restore fp regs.  */
   flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
 	   | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-  htab->sfpr = bfd_make_section_anyway_with_flags (dynobj, ".sfpr",
-						   flags);
-  if (htab->sfpr == NULL
-      || ! bfd_set_section_alignment (dynobj, htab->sfpr, 2))
-    return FALSE;
+  if (htab->params->save_restore_funcs)
+    {
+      /* Create .sfpr for code to save and restore fp regs.  */
+      htab->sfpr = bfd_make_section_anyway_with_flags (dynobj, ".sfpr",
+						       flags);
+      if (htab->sfpr == NULL
+	  || ! bfd_set_section_alignment (dynobj, htab->sfpr, 2))
+	return FALSE;
+    }
+
+  if (bfd_link_relocatable (info))
+    return TRUE;
 
   /* Create .glink for lazy dynamic linking support.  */
   htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink",
@@ -4315,7 +4435,7 @@ create_linkage_sections (bfd *dynobj, st
       || ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
     return FALSE;
 
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     return TRUE;
 
   flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
@@ -4344,14 +4464,9 @@ ppc64_elf_init_stub_bfd (struct bfd_link
    linker created stub bfd.  This ensures that the GOT header is at
    the start of the output TOC section.  */
   htab = ppc_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
   htab->elf.dynobj = params->stub_bfd;
   htab->params = params;
 
-  if (info->relocatable)
-    return TRUE;
-
   return create_linkage_sections (htab->elf.dynobj, info);
 }
 
@@ -4412,18 +4527,20 @@ ppc_get_stub_entry (const asection *inpu
 		    struct ppc_link_hash_table *htab)
 {
   struct ppc_stub_hash_entry *stub_entry;
-  const asection *id_sec;
+  struct map_stub *group;
 
   /* If this input section is part of a group of sections sharing one
      stub section, then use the id of the first section in the group.
      Stub names need to include a section id, as there may well be
      more than one stub used to reach say, printf, and we need to
      distinguish between them.  */
-  id_sec = htab->stub_group[input_section->id].link_sec;
+  group = htab->sec_info[input_section->id].u.group;
+  if (group == NULL)
+    return NULL;
 
   if (h != NULL && h->u.stub_cache != NULL
       && h->u.stub_cache->h == h
-      && h->u.stub_cache->id_sec == id_sec)
+      && h->u.stub_cache->group == group)
     {
       stub_entry = h->u.stub_cache;
     }
@@ -4431,7 +4548,7 @@ ppc_get_stub_entry (const asection *inpu
     {
       char *stub_name;
 
-      stub_name = ppc_stub_name (id_sec, sym_sec, h, rel);
+      stub_name = ppc_stub_name (group->link_sec, sym_sec, h, rel);
       if (stub_name == NULL)
 	return NULL;
 
@@ -4455,35 +4572,32 @@ ppc_add_stub (const char *stub_name,
 	      struct bfd_link_info *info)
 {
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
+  struct map_stub *group;
   asection *link_sec;
   asection *stub_sec;
   struct ppc_stub_hash_entry *stub_entry;
 
-  link_sec = htab->stub_group[section->id].link_sec;
-  stub_sec = htab->stub_group[section->id].stub_sec;
+  group = htab->sec_info[section->id].u.group;
+  link_sec = group->link_sec;
+  stub_sec = group->stub_sec;
   if (stub_sec == NULL)
     {
-      stub_sec = htab->stub_group[link_sec->id].stub_sec;
+      size_t namelen;
+      bfd_size_type len;
+      char *s_name;
+
+      namelen = strlen (link_sec->name);
+      len = namelen + sizeof (STUB_SUFFIX);
+      s_name = bfd_alloc (htab->params->stub_bfd, len);
+      if (s_name == NULL)
+	return NULL;
+
+      memcpy (s_name, link_sec->name, namelen);
+      memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
+      stub_sec = (*htab->params->add_stub_section) (s_name, link_sec);
       if (stub_sec == NULL)
-	{
-	  size_t namelen;
-	  bfd_size_type len;
-	  char *s_name;
-
-	  namelen = strlen (link_sec->name);
-	  len = namelen + sizeof (STUB_SUFFIX);
-	  s_name = bfd_alloc (htab->params->stub_bfd, len);
-	  if (s_name == NULL)
-	    return NULL;
-
-	  memcpy (s_name, link_sec->name, namelen);
-	  memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
-	  stub_sec = (*htab->params->add_stub_section) (s_name, link_sec);
-	  if (stub_sec == NULL)
-	    return NULL;
-	  htab->stub_group[link_sec->id].stub_sec = stub_sec;
-	}
-      htab->stub_group[section->id].stub_sec = stub_sec;
+	return NULL;
+      group->stub_sec = stub_sec;
     }
 
   /* Enter this entry into the linker stub hash table.  */
@@ -4491,14 +4605,14 @@ ppc_add_stub (const char *stub_name,
 				     TRUE, FALSE);
   if (stub_entry == NULL)
     {
+      /* xgettext:c-format */
       info->callbacks->einfo (_("%P: %B: cannot create stub entry %s\n"),
 			      section->owner, stub_name);
       return NULL;
     }
 
-  stub_entry->stub_sec = stub_sec;
+  stub_entry->group = group;
   stub_entry->stub_offset = 0;
-  stub_entry->id_sec = link_sec;
   return stub_entry;
 }
 
@@ -4540,31 +4654,6 @@ create_got_section (bfd *abfd, struct bf
   return TRUE;
 }
 
-/* Create the dynamic sections, and set up shortcuts.  */
-
-static bfd_boolean
-ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
-{
-  struct ppc_link_hash_table *htab;
-
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab = ppc_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  htab->dynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->relbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->elf.sgot || !htab->elf.splt || !htab->elf.srelplt || !htab->dynbss
-      || (!info->shared && !htab->relbss))
-    abort ();
-
-  return TRUE;
-}
-
 /* Follow indirect and warning symbol links.  */
 
 static inline struct bfd_link_hash_entry *
@@ -4649,12 +4738,52 @@ ppc64_elf_copy_indirect_symbol (struct b
 	&& edir->elf.dynamic_adjusted))
     edir->elf.non_got_ref |= eind->elf.non_got_ref;
 
-  edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
+  if (edir->elf.versioned != versioned_hidden)
+    edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
   edir->elf.ref_regular |= eind->elf.ref_regular;
   edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
   edir->elf.needs_plt |= eind->elf.needs_plt;
   edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
 
+  /* If we were called to copy over info for a weak sym, don't copy
+     dyn_relocs, plt/got info, or dynindx.  We used to copy dyn_relocs
+     in order to simplify readonly_dynrelocs and save a field in the
+     symbol hash entry, but that means dyn_relocs can't be used in any
+     tests about a specific symbol, or affect other symbol flags which
+     are then tested.
+     Chain weakdefs so we can get from the weakdef back to an alias.
+     The list is circular so that we don't need to use u.weakdef as
+     well as this list to look at all aliases.  */
+  if (eind->elf.root.type != bfd_link_hash_indirect)
+    {
+      struct ppc_link_hash_entry *cur, *add, *next;
+
+      add = eind;
+      do
+	{
+	  cur = edir->weakref;
+	  if (cur != NULL)
+	    {
+	      do
+		{
+		  /* We can be called twice for the same symbols.
+		     Don't make multiple loops.  */
+		  if (cur == add)
+		    return;
+		  cur = cur->weakref;
+		} while (cur != edir);
+	    }
+	  next = add->weakref;
+	  if (cur != add)
+	    {
+	      add->weakref = edir->weakref != NULL ? edir->weakref : edir;
+	      edir->weakref = add;
+	    }
+	  add = next;
+	} while (add != NULL && add != eind);
+      return;
+    }
+
   /* Copy over any dynamic relocs we may have on the indirect sym.  */
   if (eind->dyn_relocs != NULL)
     {
@@ -4687,16 +4816,6 @@ ppc64_elf_copy_indirect_symbol (struct b
       eind->dyn_relocs = NULL;
     }
 
-  /* If we were called to copy over info for a weak sym, that's all.
-     You might think dyn_relocs need not be copied over;  After all,
-     both syms will be dynamic or both non-dynamic so we're just
-     moving reloc accounting around.  However, ELIMINATE_COPY_RELOCS
-     code in ppc64_elf_adjust_dynamic_symbol needs to check for
-     dyn_relocs in read-only sections, and it does so on what is the
-     DIR sym here.  */
-  if (eind->elf.root.type != bfd_link_hash_indirect)
-    return;
-
   /* Copy over got entries that we may have already seen to the
      symbol which just became indirect.  */
   if (eind->elf.got.glist != NULL)
@@ -4767,32 +4886,29 @@ lookup_fdh (struct ppc_link_hash_entry *
       fh->oh = fdh;
     }
 
-  return ppc_follow_link (fdh);
+  fdh = ppc_follow_link (fdh);
+  fdh->is_func_descriptor = 1;
+  fdh->oh = fh;
+  return fdh;
 }
 
-/* Make a fake function descriptor sym for the code sym FH.  */
+/* Make a fake function descriptor sym for the undefined code sym FH.  */
 
 static struct ppc_link_hash_entry *
 make_fdh (struct bfd_link_info *info,
 	  struct ppc_link_hash_entry *fh)
 {
-  bfd *abfd;
-  asymbol *newsym;
-  struct bfd_link_hash_entry *bh;
+  bfd *abfd = fh->elf.root.u.undef.abfd;
+  struct bfd_link_hash_entry *bh = NULL;
   struct ppc_link_hash_entry *fdh;
-
-  abfd = fh->elf.root.u.undef.abfd;
-  newsym = bfd_make_empty_symbol (abfd);
-  newsym->name = fh->elf.root.root.string + 1;
-  newsym->section = bfd_und_section_ptr;
-  newsym->value = 0;
-  newsym->flags = BSF_WEAK;
-
-  bh = NULL;
-  if (!_bfd_generic_link_add_one_symbol (info, abfd, newsym->name,
-					 newsym->flags, newsym->section,
-					 newsym->value, NULL, FALSE, FALSE,
-					 &bh))
+  flagword flags = (fh->elf.root.type == bfd_link_hash_undefweak
+		    ? BSF_WEAK
+		    : BSF_GLOBAL);
+
+  if (!_bfd_generic_link_add_one_symbol (info, abfd,
+					 fh->elf.root.root.string + 1,
+					 flags, bfd_und_section_ptr, 0,
+					 NULL, FALSE, FALSE, &bh))
     return NULL;
 
   fdh = (struct ppc_link_hash_entry *) bh;
@@ -4817,11 +4933,10 @@ ppc64_elf_add_symbol_hook (bfd *ibfd,
 			   asection **sec,
 			   bfd_vma *value)
 {
-  if ((ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (isym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC
       && (ibfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   if (*sec != NULL
       && strcmp ((*sec)->name, ".opd") == 0)
@@ -4834,7 +4949,7 @@ ppc64_elf_add_symbol_hook (bfd *ibfd,
 
       /* If the symbol is a function defined in .opd, and the function
 	 code is in a discarded group, let it appear to be undefined.  */
-      if (!info->relocatable
+      if (!bfd_link_relocatable (info)
 	  && (*sec)->reloc_count != 0
 	  && opd_entry_value (*sec, *value, &code_sec, NULL,
 			      FALSE) != (bfd_vma) -1
@@ -4882,6 +4997,22 @@ ppc64_elf_merge_symbol_attribute (struct
 		| ELF_ST_VISIBILITY (h->other));
 }
 
+/* Hook called on merging a symbol.  We use this to clear "fake" since
+   we now have a real symbol.  */
+
+static bfd_boolean
+ppc64_elf_merge_symbol (struct elf_link_hash_entry *h,
+			const Elf_Internal_Sym *isym ATTRIBUTE_UNUSED,
+			asection **psec ATTRIBUTE_UNUSED,
+			bfd_boolean newdef ATTRIBUTE_UNUSED,
+			bfd_boolean olddef ATTRIBUTE_UNUSED,
+			bfd *oldbfd ATTRIBUTE_UNUSED,
+			const asection *oldsec ATTRIBUTE_UNUSED)
+{
+  ((struct ppc_link_hash_entry *) h)->fake = 0;
+  return TRUE;
+}
+
 /* This function makes an old ABI object reference to ".bar" cause the
    inclusion of a new ABI object archive that defines "bar".
    NAME is a symbol defined in an archive.  Return a symbol in the hash
@@ -4900,8 +5031,7 @@ ppc64_elf_archive_symbol_lookup (bfd *ab
   if (h != NULL
       /* Don't return this sym if it is a fake function descriptor
 	 created by add_symbol_adjust.  */
-      && !(h->root.type == bfd_link_hash_undefweak
-	   && ((struct ppc_link_hash_entry *) h)->fake))
+      && !((struct ppc_link_hash_entry *) h)->fake)
     return h;
 
   if (name[0] == '.')
@@ -4933,12 +5063,12 @@ add_symbol_adjust (struct ppc_link_hash_
   struct ppc_link_hash_table *htab;
   struct ppc_link_hash_entry *fdh;
 
-  if (eh->elf.root.type == bfd_link_hash_indirect)
-    return TRUE;
-
   if (eh->elf.root.type == bfd_link_hash_warning)
     eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
 
+  if (eh->elf.root.type == bfd_link_hash_indirect)
+    return TRUE;
+
   if (eh->elf.root.root.string[0] != '.')
     abort ();
 
@@ -4947,38 +5077,49 @@ add_symbol_adjust (struct ppc_link_hash_
     return FALSE;
 
   fdh = lookup_fdh (eh, htab);
-  if (fdh == NULL)
-    {
-      if (!info->relocatable
-	  && (eh->elf.root.type == bfd_link_hash_undefined
-	      || eh->elf.root.type == bfd_link_hash_undefweak)
-	  && eh->elf.ref_regular)
-	{
-	  /* Make an undefweak function descriptor sym, which is enough to
-	     pull in an --as-needed shared lib, but won't cause link
-	     errors.  Archives are handled elsewhere.  */
-	  fdh = make_fdh (info, eh);
-	  if (fdh == NULL)
-	    return FALSE;
-	  fdh->elf.ref_regular = 1;
-	}
+  if (fdh == NULL
+      && !bfd_link_relocatable (info)
+      && (eh->elf.root.type == bfd_link_hash_undefined
+	  || eh->elf.root.type == bfd_link_hash_undefweak)
+      && eh->elf.ref_regular)
+    {
+      /* Make an undefined function descriptor sym, in order to
+	 pull in an --as-needed shared lib.  Archives are handled
+	 elsewhere.  */
+      fdh = make_fdh (info, eh);
+      if (fdh == NULL)
+	return FALSE;
     }
-  else
+
+  if (fdh != NULL)
     {
       unsigned entry_vis = ELF_ST_VISIBILITY (eh->elf.other) - 1;
       unsigned descr_vis = ELF_ST_VISIBILITY (fdh->elf.other) - 1;
+
+      /* Make both descriptor and entry symbol have the most
+	 constraining visibility of either symbol.  */
       if (entry_vis < descr_vis)
 	fdh->elf.other += entry_vis - descr_vis;
       else if (entry_vis > descr_vis)
 	eh->elf.other += descr_vis - entry_vis;
 
-      if ((fdh->elf.root.type == bfd_link_hash_defined
-	   || fdh->elf.root.type == bfd_link_hash_defweak)
-	  && eh->elf.root.type == bfd_link_hash_undefined)
-	{
-	  eh->elf.root.type = bfd_link_hash_undefweak;
-	  eh->was_undefined = 1;
-	  htab->twiddled_syms = 1;
+      /* Propagate reference flags from entry symbol to function
+	 descriptor symbol.  */
+      fdh->elf.root.non_ir_ref |= eh->elf.root.non_ir_ref;
+      fdh->elf.ref_regular |= eh->elf.ref_regular;
+      fdh->elf.ref_regular_nonweak |= eh->elf.ref_regular_nonweak;
+
+      if (!fdh->elf.forced_local
+	  && fdh->elf.dynindx == -1
+	  && fdh->elf.versioned != versioned_hidden
+	  && (bfd_link_dll (info)
+	      || fdh->elf.def_dynamic
+	      || fdh->elf.ref_dynamic)
+	  && (eh->elf.ref_regular
+	      || eh->elf.def_regular))
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, &fdh->elf))
+	    return FALSE;
 	}
     }
 
@@ -4999,8 +5140,9 @@ ppc64_elf_before_check_relocs (bfd *ibfd
     {
       if (abiversion (ibfd) == 0)
 	set_abiversion (ibfd, 1);
-      else if (abiversion (ibfd) == 2)
+      else if (abiversion (ibfd) >= 2)
 	{
+	  /* xgettext:c-format */
 	  info->callbacks->einfo (_("%P: %B .opd not allowed in ABI"
 				    " version %d\n"),
 				  ibfd, abiversion (ibfd));
@@ -5059,26 +5201,14 @@ ppc64_elf_before_check_relocs (bfd *ibfd
       else if (htab->elf.hgot == NULL
 	       && strcmp (eh->elf.root.root.string, ".TOC.") == 0)
 	htab->elf.hgot = &eh->elf;
-      else if (!add_symbol_adjust (eh, info))
-	return FALSE;
-      p = &eh->u.next_dot_sym;
-    }
-
-  /* Clear the list for non-ppc64 input files.  */
-  p = &htab->dot_syms;
-  while ((eh = *p) != NULL)
-    {
-      *p = NULL;
+      else if (abiversion (ibfd) <= 1)
+	{
+	  htab->need_func_desc_adj = 1;
+	  if (!add_symbol_adjust (eh, info))
+	    return FALSE;
+	}
       p = &eh->u.next_dot_sym;
     }
-
-  /* We need to fix the undefs list for any syms we have twiddled to
-     undef_weak.  */
-  if (htab->twiddled_syms)
-    {
-      bfd_link_repair_undef_list (&htab->elf.root);
-      htab->twiddled_syms = 0;
-    }
   return TRUE;
 }
 
@@ -5226,7 +5356,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
   asection **opd_sym_map;
   struct elf_link_hash_entry *tga, *dottga;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* Don't do anything special with non-loaded, non-alloced sections.
@@ -5264,19 +5394,24 @@ ppc64_elf_check_relocs (bfd *abfd, struc
       enum elf_ppc64_reloc_type r_type;
       int tls_type;
       struct _ppc64_elf_section_data *ppc64_sec;
-      struct plt_entry **ifunc;
+      struct plt_entry **ifunc, **plt_list;
 
       r_symndx = ELF64_R_SYM (rel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
 	h = NULL;
       else
 	{
+	  struct ppc_link_hash_entry *eh;
+
 	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 	  h = elf_follow_link (h);
+	  eh = (struct ppc_link_hash_entry *) h;
 
 	  /* PR15323, ref flags aren't set for references in the same
 	     object.  */
 	  h->root.non_ir_ref = 1;
+	  if (eh->is_func && eh->oh != NULL)
+	    eh->oh->elf.root.non_ir_ref = 1;
 
 	  if (h == htab->elf.hgot)
 	    sec->has_toc_reloc = 1;
@@ -5307,28 +5442,8 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 		return FALSE;
 	    }
 	}
-      r_type = ELF64_R_TYPE (rel->r_info);
-      if (is_branch_reloc (r_type))
-	{
-	  if (h != NULL && (h == tga || h == dottga))
-	    {
-	      if (rel != relocs
-		  && (ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSGD
-		      || ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSLD))
-		/* We have a new-style __tls_get_addr call with a marker
-		   reloc.  */
-		;
-	      else
-		/* Mark this section as having an old-style call.  */
-		sec->has_tls_get_addr_call = 1;
-	    }
-
-	  /* STT_GNU_IFUNC symbols must have a PLT entry.  */
-	  if (ifunc != NULL
-	      && !update_plt_info (abfd, ifunc, rel->r_addend))
-	    return FALSE;
-	}
 
+      r_type = ELF64_R_TYPE (rel->r_info);
       switch (r_type)
 	{
 	case R_PPC64_TLSGD:
@@ -5355,7 +5470,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_GOT_TPREL16_LO_DS:
 	case R_PPC64_GOT_TPREL16_HI:
 	case R_PPC64_GOT_TPREL16_HA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  tls_type = TLS_TLS | TLS_TPREL;
 	  goto dogottls;
@@ -5367,7 +5482,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	  tls_type = TLS_TLS | TLS_DTPREL;
 	dogottls:
 	  sec->has_tls_reloc = 1;
-	  /* Fall thru */
+	  /* Fall through */
 
 	case R_PPC64_GOT16:
 	case R_PPC64_GOT16_DS:
@@ -5428,7 +5543,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 
 	  /* We may also need a plt entry if the symbol turns out to be
 	     an ifunc.  */
-	  if (h != NULL && !info->shared && abiversion (abfd) != 1)
+	  if (h != NULL && !bfd_link_pic (info) && abiversion (abfd) != 1)
 	    {
 	      if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend))
 		return FALSE;
@@ -5440,27 +5555,30 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_PLT16_LO:
 	case R_PPC64_PLT32:
 	case R_PPC64_PLT64:
-	  /* This symbol requires a procedure linkage table entry.  We
-	     actually build the entry in adjust_dynamic_symbol,
-	     because this might be a case of linking PIC code without
-	     linking in any dynamic objects, in which case we don't
-	     need to generate a procedure linkage table after all.  */
-	  if (h == NULL)
-	    {
-	      /* It does not make sense to have a procedure linkage
-		 table entry for a local symbol.  */
-	      bfd_set_error (bfd_error_bad_value);
-	      return FALSE;
-	    }
-	  else
+	  /* This symbol requires a procedure linkage table entry.  */
+	  plt_list = ifunc;
+	  if (h != NULL)
 	    {
-	      if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend))
-		return FALSE;
 	      h->needs_plt = 1;
 	      if (h->root.root.string[0] == '.'
 		  && h->root.root.string[1] != '\0')
 		((struct ppc_link_hash_entry *) h)->is_func = 1;
+	      plt_list = &h->plt.plist;
 	    }
+	  if (plt_list == NULL)
+	    {
+	      /* It does not make sense to have a procedure linkage
+		 table entry for a non-ifunc local symbol.  */
+	      info->callbacks->einfo
+		/* xgettext:c-format */
+		(_("%H: %s reloc against local symbol\n"),
+		 abfd, sec, rel->r_offset,
+		 ppc64_elf_howto_table[r_type]->name);
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
+	  if (!update_plt_info (abfd, plt_list, rel->r_addend))
+	    return FALSE;
 	  break;
 
 	  /* The following relocations don't need to propagate the
@@ -5491,15 +5609,17 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_REL16_LO:
 	case R_PPC64_REL16_HI:
 	case R_PPC64_REL16_HA:
+	case R_PPC64_REL16DX_HA:
 	  break;
 
 	  /* Not supported as a dynamic relocation.  */
 	case R_PPC64_ADDR64_LOCAL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
 		ppc_howto_init ();
-	      info->callbacks->einfo (_("%P: %H: %s reloc unsupported "
+	      /* xgettext:c-format */
+	      info->callbacks->einfo (_("%H: %s reloc unsupported "
 					"in shared libraries and PIEs.\n"),
 				      abfd, sec, rel->r_offset,
 				      ppc64_elf_howto_table[r_type]->name);
@@ -5512,6 +5632,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_TOC16_DS:
 	  htab->do_multi_toc = 1;
 	  ppc64_elf_tdata (abfd)->has_small_toc_reloc = 1;
+	  /* Fall through.  */
 	case R_PPC64_TOC16_LO:
 	case R_PPC64_TOC16_HI:
 	case R_PPC64_TOC16_HA:
@@ -5519,6 +5640,10 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	  sec->has_toc_reloc = 1;
 	  break;
 
+	  /* Marker reloc.  */
+	case R_PPC64_ENTRY:
+	  break;
+
 	  /* This relocation describes the C++ object vtable hierarchy.
 	     Reconstruct it for later use during GC.  */
 	case R_PPC64_GNU_VTINHERIT:
@@ -5568,24 +5693,46 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	  /* Fall through.  */
 
 	case R_PPC64_REL24:
-	  if (h != NULL && ifunc == NULL)
+	  plt_list = ifunc;
+	  if (h != NULL)
 	    {
-	      /* We may need a .plt entry if the function this reloc
-		 refers to is in a shared lib.  */
-	      if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend))
-		return FALSE;
 	      h->needs_plt = 1;
 	      if (h->root.root.string[0] == '.'
 		  && h->root.root.string[1] != '\0')
 		((struct ppc_link_hash_entry *) h)->is_func = 1;
+
 	      if (h == tga || h == dottga)
-		sec->has_tls_reloc = 1;
+		{
+		  sec->has_tls_reloc = 1;
+		  if (rel != relocs
+		      && (ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSGD
+			  || ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSLD))
+		    /* We have a new-style __tls_get_addr call with
+		       a marker reloc.  */
+		    ;
+		  else
+		    /* Mark this section as having an old-style call.  */
+		    sec->has_tls_get_addr_call = 1;
+		}
+	      plt_list = &h->plt.plist;
 	    }
+
+	  /* We may need a .plt entry if the function this reloc
+	     refers to is in a shared lib.  */
+	  if (plt_list
+	      && !update_plt_info (abfd, plt_list, rel->r_addend))
+	    return FALSE;
 	  break;
 
+	case R_PPC64_ADDR14:
+	case R_PPC64_ADDR14_BRNTAKEN:
+	case R_PPC64_ADDR14_BRTAKEN:
+	case R_PPC64_ADDR24:
+	  goto dodyn;
+
 	case R_PPC64_TPREL64:
 	  tls_type = TLS_EXPLICIT | TLS_TLS | TLS_TPREL;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  goto dotlstoc;
 
@@ -5661,7 +5808,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_TPREL16_HIGHERA:
 	case R_PPC64_TPREL16_HIGHEST:
 	case R_PPC64_TPREL16_HIGHESTA:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      info->flags |= DF_STATIC_TLS;
 	      goto dodyn;
@@ -5674,14 +5821,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	      && ELF64_R_TYPE ((rel + 1)->r_info) == R_PPC64_TOC)
 	    {
 	      if (h != NULL)
-		{
-		  if (h->root.root.string[0] == '.'
-		      && h->root.root.string[1] != 0
-		      && lookup_fdh ((struct ppc_link_hash_entry *) h, htab))
-		    ;
-		  else
-		    ((struct ppc_link_hash_entry *) h)->is_func = 1;
-		}
+		((struct ppc_link_hash_entry *) h)->is_func = 1;
 	      else
 		{
 		  asection *s;
@@ -5711,7 +5851,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_ADDR16_HIGHESTA:
 	case R_PPC64_ADDR16_LO:
 	case R_PPC64_ADDR16_LO_DS:
-	  if (h != NULL && !info->shared && abiversion (abfd) != 1
+	  if (h != NULL && !bfd_link_pic (info) && abiversion (abfd) != 1
 	      && rel->r_addend == 0)
 	    {
 	      /* We may need a .plt entry if this reloc refers to a
@@ -5725,16 +5865,12 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_REL30:
 	case R_PPC64_REL32:
 	case R_PPC64_REL64:
-	case R_PPC64_ADDR14:
-	case R_PPC64_ADDR14_BRNTAKEN:
-	case R_PPC64_ADDR14_BRTAKEN:
-	case R_PPC64_ADDR24:
 	case R_PPC64_ADDR32:
 	case R_PPC64_UADDR16:
 	case R_PPC64_UADDR32:
 	case R_PPC64_UADDR64:
 	case R_PPC64_TOC:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    /* We may need a copy reloc.  */
 	    h->non_got_ref = 1;
 
@@ -5764,18 +5900,18 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
 	dodyn:
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (must_be_dyn_reloc (info, r_type)
 		   || (h != NULL
 		       && (!SYMBOLIC_BIND (info, h)
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && ifunc != NULL))
 	    {
 	      /* We must copy these reloc types into the output file.
@@ -5869,8 +6005,9 @@ ppc64_elf_check_relocs (bfd *abfd, struc
    object file when linking.  */
 
 static bfd_boolean
-ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   unsigned long iflags, oflags;
 
   if ((ibfd->flags & BFD_LINKER_CREATED) != 0)
@@ -5879,7 +6016,7 @@ ppc64_elf_merge_private_bfd_data (bfd *i
   if (!is_ppc64_elf (ibfd) || !is_ppc64_elf (obfd))
     return TRUE;
 
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   iflags = elf_elfheader (ibfd)->e_flags;
@@ -5887,22 +6024,26 @@ ppc64_elf_merge_private_bfd_data (bfd *i
 
   if (iflags & ~EF_PPC64_ABI)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B uses unknown e_flags 0x%lx"), ibfd, iflags);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
   else if (iflags != oflags && iflags != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: ABI version %ld is not compatible with ABI version %ld output"),
 	 ibfd, iflags, oflags);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
 
+  _bfd_elf_ppc_merge_fp_attributes (ibfd, info);
+
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  _bfd_elf_merge_object_attributes (ibfd, info);
 
   return TRUE;
 }
@@ -5917,7 +6058,6 @@ ppc64_elf_print_private_bfd_data (bfd *a
     {
       FILE *file = ptr;
 
-      /* xgettext:c-format */
       fprintf (file, _("private flags = 0x%lx:"),
 	       elf_elfheader (abfd)->e_flags);
 
@@ -6034,14 +6174,13 @@ opd_entry_value (asection *opd_sec,
 		  if (rh != NULL)
 		    {
 		      rh = elf_follow_link (rh);
-		      BFD_ASSERT (rh->root.type == bfd_link_hash_defined
-				  || rh->root.type == bfd_link_hash_defweak);
-		      val = rh->root.u.def.value;
-		      sec = rh->root.u.def.section;
-		      if (sec->owner != opd_bfd)
+		      if (rh->root.type != bfd_link_hash_defined
+			  && rh->root.type != bfd_link_hash_defweak)
+			break;
+		      if (rh->root.u.def.section->owner == opd_bfd)
 			{
-			  sec = NULL;
-			  val = (bfd_vma) -1;
+			  val = rh->root.u.def.value;
+			  sec = rh->root.u.def.section;
 			}
 		    }
 		}
@@ -6120,7 +6259,23 @@ ppc64_elf_maybe_function_sym (const asym
 
   if (strcmp (sym->section->name, ".opd") == 0)
     {
-      if (opd_entry_value (sym->section, sym->value,
+      struct _opd_sec_data *opd = get_opd_info (sym->section);
+      bfd_vma symval = sym->value;
+
+      if (opd != NULL
+	  && opd->adjust != NULL
+	  && elf_section_data (sym->section)->relocs != NULL)
+	{
+	  /* opd_entry_value will use cached relocs that have been
+	     adjusted, but with raw symbols.  That means both local
+	     and global symbols need adjusting.  */
+	  long adjust = opd->adjust[OPD_NDX (symval)];
+	  if (adjust == -1)
+	    return 0;
+	  symval += adjust;
+	}
+
+      if (opd_entry_value (sym->section, symval,
 			   &sec, code_off, TRUE) == (bfd_vma) -1)
 	return 0;
       /* An old ABI binary with dot-syms has a size of 24 on the .opd
@@ -6193,6 +6348,23 @@ defined_func_desc (struct ppc_link_hash_
   return NULL;
 }
 
+static bfd_boolean func_desc_adjust (struct elf_link_hash_entry *, void *);
+
+/* Garbage collect sections, after first dealing with dot-symbols.  */
+
+static bfd_boolean
+ppc64_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
+{
+  struct ppc_link_hash_table *htab = ppc_hash_table (info);
+
+  if (htab != NULL && htab->need_func_desc_adj)
+    {
+      elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
+      htab->need_func_desc_adj = 0;
+    }
+  return bfd_elf_gc_sections (abfd, info);
+}
+
 /* Mark all our entry sym sections, both opd and code section.  */
 
 static void
@@ -6257,12 +6429,13 @@ ppc64_elf_gc_mark_dynamic_ref (struct el
 	  || ((eh->elf.def_regular || ELF_COMMON_DEF_P (&eh->elf))
 	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
 	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN
-	      && (!info->executable
+	      && (!bfd_link_executable (info)
+		  || info->gc_keep_exported
 		  || info->export_dynamic
 		  || (eh->elf.dynamic
 		      && d != NULL
 		      && (*d->match) (&d->head, NULL, eh->elf.root.root.string)))
-	      && (strchr (eh->elf.root.root.string, ELF_VER_CHR) != NULL
+	      && (eh->elf.versioned >= versioned
 		  || !bfd_hide_sym_by_version (info->version_info,
 					       eh->elf.root.root.string)))))
     {
@@ -6327,7 +6500,15 @@ ppc64_elf_gc_mark_hook (asection *sec,
 	      eh = (struct ppc_link_hash_entry *) h;
 	      fdh = defined_func_desc (eh);
 	      if (fdh != NULL)
-		eh = fdh;
+		{
+		  /* -mcall-aixdesc code references the dot-symbol on
+		     a call reloc.  Mark the function descriptor too
+		     against garbage collection.  */
+		  fdh->elf.mark = 1;
+		  if (fdh->elf.u.weakdef != NULL)
+		    fdh->elf.u.weakdef->mark = 1;
+		  eh = fdh;
+		}
 
 	      /* Function descriptor syms cause the associated
 		 function code sym section to be marked.  */
@@ -6387,7 +6568,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
   struct got_entry **local_got_ents;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   if ((sec->flags & SEC_ALLOC) == 0)
@@ -6409,6 +6590,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
       unsigned long r_symndx;
       enum elf_ppc64_reloc_type r_type;
       struct elf_link_hash_entry *h = NULL;
+      struct plt_entry **plt_list;
       unsigned char tls_type = 0;
 
       r_symndx = ELF64_R_SYM (rel->r_info);
@@ -6432,39 +6614,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
 	      }
 	}
 
-      if (is_branch_reloc (r_type))
-	{
-	  struct plt_entry **ifunc = NULL;
-	  if (h != NULL)
-	    {
-	      if (h->type == STT_GNU_IFUNC)
-		ifunc = &h->plt.plist;
-	    }
-	  else if (local_got_ents != NULL)
-	    {
-	      struct plt_entry **local_plt = (struct plt_entry **)
-		(local_got_ents + symtab_hdr->sh_info);
-	      unsigned char *local_got_tls_masks = (unsigned char *)
-		(local_plt + symtab_hdr->sh_info);
-	      if ((local_got_tls_masks[r_symndx] & PLT_IFUNC) != 0)
-		ifunc = local_plt + r_symndx;
-	    }
-	  if (ifunc != NULL)
-	    {
-	      struct plt_entry *ent;
-
-	      for (ent = *ifunc; ent != NULL; ent = ent->next)
-		if (ent->addend == rel->r_addend)
-		  break;
-	      if (ent == NULL)
-		abort ();
-	      if (ent->plt.refcount > 0)
-		ent->plt.refcount -= 1;
-	      continue;
-	    }
-	}
-
-      switch (r_type)
+      switch (r_type)
 	{
 	case R_PPC64_GOT_TLSLD16:
 	case R_PPC64_GOT_TLSLD16_LO:
@@ -6530,11 +6680,23 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
 	case R_PPC64_REL14_BRNTAKEN:
 	case R_PPC64_REL14_BRTAKEN:
 	case R_PPC64_REL24:
+	  plt_list = NULL;
 	  if (h != NULL)
+	    plt_list = &h->plt.plist;
+	  else if (local_got_ents != NULL)
+	    {
+	      struct plt_entry **local_plt = (struct plt_entry **)
+		(local_got_ents + symtab_hdr->sh_info);
+	      unsigned char *local_got_tls_masks = (unsigned char *)
+		(local_plt + symtab_hdr->sh_info);
+	      if ((local_got_tls_masks[r_symndx] & PLT_IFUNC) != 0)
+		plt_list = local_plt + r_symndx;
+	    }
+	  if (plt_list)
 	    {
 	      struct plt_entry *ent;
 
-	      for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+	      for (ent = *plt_list; ent != NULL; ent = ent->next)
 		if (ent->addend == rel->r_addend)
 		  break;
 	      if (ent != NULL && ent->plt.refcount > 0)
@@ -6560,10 +6722,14 @@ struct sfpr_def_parms
   bfd_byte * (*write_tail) (bfd *, bfd_byte *, int);
 };
 
-/* Auto-generate _save*, _rest* functions in .sfpr.  */
+/* Auto-generate _save*, _rest* functions in .sfpr.
+   If STUB_SEC is non-null, define alias symbols in STUB_SEC
+   instead.  */
 
 static bfd_boolean
-sfpr_define (struct bfd_link_info *info, const struct sfpr_def_parms *parm)
+sfpr_define (struct bfd_link_info *info,
+	     const struct sfpr_def_parms *parm,
+	     asection *stub_sec)
 {
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
   unsigned int i;
@@ -6579,26 +6745,61 @@ sfpr_define (struct bfd_link_info *info,
 
   for (i = parm->lo; i <= parm->hi; i++)
     {
-      struct elf_link_hash_entry *h;
+      struct ppc_link_hash_entry *h;
 
       sym[len + 0] = i / 10 + '0';
       sym[len + 1] = i % 10 + '0';
-      h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
-      if (h != NULL
-	  && !h->def_regular)
+      h = (struct ppc_link_hash_entry *)
+	elf_link_hash_lookup (&htab->elf, sym, writing, TRUE, TRUE);
+      if (stub_sec != NULL)
 	{
-	  h->root.type = bfd_link_hash_defined;
-	  h->root.u.def.section = htab->sfpr;
-	  h->root.u.def.value = htab->sfpr->size;
-	  h->type = STT_FUNC;
-	  h->def_regular = 1;
-	  _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
-	  writing = TRUE;
-	  if (htab->sfpr->contents == NULL)
+	  if (h != NULL
+	      && h->elf.root.type == bfd_link_hash_defined
+	      && h->elf.root.u.def.section == htab->sfpr)
 	    {
-	      htab->sfpr->contents = bfd_alloc (htab->elf.dynobj, SFPR_MAX);
-	      if (htab->sfpr->contents == NULL)
+	      struct elf_link_hash_entry *s;
+	      char buf[32];
+	      sprintf (buf, "%08x.%s", stub_sec->id & 0xffffffff, sym);
+	      s = elf_link_hash_lookup (&htab->elf, buf, TRUE, TRUE, FALSE);
+	      if (s == NULL)
 		return FALSE;
+	      if (s->root.type == bfd_link_hash_new
+		  || (s->root.type = bfd_link_hash_defined
+		      && s->root.u.def.section == stub_sec))
+		{
+		  s->root.type = bfd_link_hash_defined;
+		  s->root.u.def.section = stub_sec;
+		  s->root.u.def.value = (stub_sec->size
+					 + h->elf.root.u.def.value);
+		  s->ref_regular = 1;
+		  s->def_regular = 1;
+		  s->ref_regular_nonweak = 1;
+		  s->forced_local = 1;
+		  s->non_elf = 0;
+		  s->root.linker_def = 1;
+		}
+	    }
+	  continue;
+	}
+      if (h != NULL)
+	{
+	  h->save_res = 1;
+	  if (!h->elf.def_regular)
+	    {
+	      h->elf.root.type = bfd_link_hash_defined;
+	      h->elf.root.u.def.section = htab->sfpr;
+	      h->elf.root.u.def.value = htab->sfpr->size;
+	      h->elf.type = STT_FUNC;
+	      h->elf.def_regular = 1;
+	      h->elf.non_elf = 0;
+	      _bfd_elf_link_hash_hide_symbol (info, &h->elf, TRUE);
+	      writing = TRUE;
+	      if (htab->sfpr->contents == NULL)
+		{
+		  htab->sfpr->contents = bfd_alloc (htab->elf.dynobj, SFPR_MAX);
+		  if (htab->sfpr->contents == NULL)
+		    return FALSE;
+		}
 	    }
 	}
       if (writing)
@@ -6786,7 +6987,6 @@ func_desc_adjust (struct elf_link_hash_e
 {
   struct bfd_link_info *info;
   struct ppc_link_hash_table *htab;
-  struct plt_entry *ent;
   struct ppc_link_hash_entry *fh;
   struct ppc_link_hash_entry *fdh;
   bfd_boolean force_local;
@@ -6795,18 +6995,29 @@ func_desc_adjust (struct elf_link_hash_e
   if (fh->elf.root.type == bfd_link_hash_indirect)
     return TRUE;
 
+  if (!fh->is_func)
+    return TRUE;
+
+  if (fh->elf.root.root.string[0] != '.'
+      || fh->elf.root.root.string[1] == '\0')
+    return TRUE;
+
   info = inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
     return FALSE;
 
+  /* Find the corresponding function descriptor symbol.  */
+  fdh = lookup_fdh (fh, htab);
+
   /* Resolve undefined references to dot-symbols as the value
      in the function descriptor, if we have one in a regular object.
      This is to satisfy cases like ".quad .foo".  Calls to functions
      in dynamic objects are handled elsewhere.  */
-  if (fh->elf.root.type == bfd_link_hash_undefweak
-      && fh->was_undefined
-      && (fdh = defined_func_desc (fh)) != NULL
+  if ((fh->elf.root.type == bfd_link_hash_undefined
+       || fh->elf.root.type == bfd_link_hash_undefweak)
+      && (fdh->elf.root.type == bfd_link_hash_defined
+	  || fdh->elf.root.type == bfd_link_hash_defweak)
       && get_opd_info (fdh->elf.root.u.def.section) != NULL
       && opd_entry_value (fdh->elf.root.u.def.section,
 			  fdh->elf.root.u.def.value,
@@ -6819,25 +7030,20 @@ func_desc_adjust (struct elf_link_hash_e
       fh->elf.def_dynamic = fdh->elf.def_dynamic;
     }
 
-  /* If this is a function code symbol, transfer dynamic linking
-     information to the function descriptor symbol.  */
-  if (!fh->is_func)
-    return TRUE;
-
-  for (ent = fh->elf.plt.plist; ent != NULL; ent = ent->next)
-    if (ent->plt.refcount > 0)
-      break;
-  if (ent == NULL
-      || fh->elf.root.root.string[0] != '.'
-      || fh->elf.root.root.string[1] == '\0')
-    return TRUE;
+  if (!fh->elf.dynamic)
+    {
+      struct plt_entry *ent;
 
-  /* Find the corresponding function descriptor symbol.  Create it
-     as undefined if necessary.  */
+      for (ent = fh->elf.plt.plist; ent != NULL; ent = ent->next)
+	if (ent->plt.refcount > 0)
+	  break;
+      if (ent == NULL)
+	return TRUE;
+    }
 
-  fdh = lookup_fdh (fh, htab);
+  /* Create a descriptor as undefined if necessary.  */
   if (fdh == NULL
-      && !info->executable
+      && !bfd_link_executable (info)
       && (fh->elf.root.type == bfd_link_hash_undefined
 	  || fh->elf.root.type == bfd_link_hash_undefweak))
     {
@@ -6846,51 +7052,30 @@ func_desc_adjust (struct elf_link_hash_e
 	return FALSE;
     }
 
-  /* Fake function descriptors are made undefweak.  If the function
-     code symbol is strong undefined, make the fake sym the same.
-     If the function code symbol is defined, then force the fake
-     descriptor local;  We can't support overriding of symbols in a
-     shared library on a fake descriptor.  */
-
+  /* We can't support overriding of symbols on a fake descriptor.  */
   if (fdh != NULL
       && fdh->fake
-      && fdh->elf.root.type == bfd_link_hash_undefweak)
-    {
-      if (fh->elf.root.type == bfd_link_hash_undefined)
-	{
-	  fdh->elf.root.type = bfd_link_hash_undefined;
-	  bfd_link_add_undef (&htab->elf.root, &fdh->elf.root);
-	}
-      else if (fh->elf.root.type == bfd_link_hash_defined
-	       || fh->elf.root.type == bfd_link_hash_defweak)
-	{
-	  _bfd_elf_link_hash_hide_symbol (info, &fdh->elf, TRUE);
-	}
-    }
+      && (fh->elf.root.type == bfd_link_hash_defined
+	  || fh->elf.root.type == bfd_link_hash_defweak))
+    _bfd_elf_link_hash_hide_symbol (info, &fdh->elf, TRUE);
 
-  if (fdh != NULL
-      && !fdh->elf.forced_local
-      && (!info->executable
-	  || fdh->elf.def_dynamic
-	  || fdh->elf.ref_dynamic
-	  || (fdh->elf.root.type == bfd_link_hash_undefweak
-	      && ELF_ST_VISIBILITY (fdh->elf.other) == STV_DEFAULT)))
+  /* Transfer dynamic linking information to the function descriptor.  */
+  if (fdh != NULL)
     {
-      if (fdh->elf.dynindx == -1)
-	if (! bfd_elf_link_record_dynamic_symbol (info, &fdh->elf))
-	  return FALSE;
       fdh->elf.ref_regular |= fh->elf.ref_regular;
       fdh->elf.ref_dynamic |= fh->elf.ref_dynamic;
       fdh->elf.ref_regular_nonweak |= fh->elf.ref_regular_nonweak;
       fdh->elf.non_got_ref |= fh->elf.non_got_ref;
-      if (ELF_ST_VISIBILITY (fh->elf.other) == STV_DEFAULT)
-	{
-	  move_plt_plist (fh, fdh);
-	  fdh->elf.needs_plt = 1;
-	}
-      fdh->is_func_descriptor = 1;
-      fdh->oh = fh;
-      fh->oh = fdh;
+      fdh->elf.dynamic |= fh->elf.dynamic;
+      fdh->elf.needs_plt |= (fh->elf.needs_plt
+			     || fh->elf.type == STT_FUNC
+			     || fh->elf.type == STT_GNU_IFUNC);
+      move_plt_plist (fh, fdh);
+
+      if (!fdh->elf.forced_local
+	  && fh->elf.dynindx != -1)
+	if (!bfd_elf_link_record_dynamic_symbol (info, &fdh->elf))
+	  return FALSE;
     }
 
   /* Now that the info is on the function descriptor, clear the
@@ -6909,6 +7094,22 @@ func_desc_adjust (struct elf_link_hash_e
   return TRUE;
 }
 
+static const struct sfpr_def_parms save_res_funcs[] =
+  {
+    { "_savegpr0_", 14, 31, savegpr0, savegpr0_tail },
+    { "_restgpr0_", 14, 29, restgpr0, restgpr0_tail },
+    { "_restgpr0_", 30, 31, restgpr0, restgpr0_tail },
+    { "_savegpr1_", 14, 31, savegpr1, savegpr1_tail },
+    { "_restgpr1_", 14, 31, restgpr1, restgpr1_tail },
+    { "_savefpr_", 14, 31, savefpr, savefpr0_tail },
+    { "_restfpr_", 14, 29, restfpr, restfpr0_tail },
+    { "_restfpr_", 30, 31, restfpr, restfpr0_tail },
+    { "._savef", 14, 31, savefpr, savefpr1_tail },
+    { "._restf", 14, 31, restfpr, restfpr1_tail },
+    { "_savevr_", 20, 31, savevr, savevr_tail },
+    { "_restvr_", 20, 31, restvr, restvr_tail }
+  };
+
 /* Called near the start of bfd_elf_size_dynamic_sections.  We use
    this hook to a) provide some gcc support functions, and b) transfer
    dynamic linking information gathered so far on function code symbol
@@ -6919,62 +7120,57 @@ ppc64_elf_func_desc_adjust (bfd *obfd AT
 			    struct bfd_link_info *info)
 {
   struct ppc_link_hash_table *htab;
-  unsigned int i;
-  static const struct sfpr_def_parms funcs[] =
-    {
-      { "_savegpr0_", 14, 31, savegpr0, savegpr0_tail },
-      { "_restgpr0_", 14, 29, restgpr0, restgpr0_tail },
-      { "_restgpr0_", 30, 31, restgpr0, restgpr0_tail },
-      { "_savegpr1_", 14, 31, savegpr1, savegpr1_tail },
-      { "_restgpr1_", 14, 31, restgpr1, restgpr1_tail },
-      { "_savefpr_", 14, 31, savefpr, savefpr0_tail },
-      { "_restfpr_", 14, 29, restfpr, restfpr0_tail },
-      { "_restfpr_", 30, 31, restfpr, restfpr0_tail },
-      { "._savef", 14, 31, savefpr, savefpr1_tail },
-      { "._restf", 14, 31, restfpr, restfpr1_tail },
-      { "_savevr_", 20, 31, savevr, savevr_tail },
-      { "_restvr_", 20, 31, restvr, restvr_tail }
-    };
 
   htab = ppc_hash_table (info);
   if (htab == NULL)
     return FALSE;
 
-  if (!info->relocatable
-      && htab->elf.hgot != NULL)
+  /* Provide any missing _save* and _rest* functions.  */
+  if (htab->sfpr != NULL)
+    {
+      unsigned int i;
+
+      htab->sfpr->size = 0;
+      for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
+	if (!sfpr_define (info, &save_res_funcs[i], NULL))
+	  return FALSE;
+      if (htab->sfpr->size == 0)
+	htab->sfpr->flags |= SEC_EXCLUDE;
+    }
+
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  if (htab->elf.hgot != NULL)
     {
       _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, TRUE);
       /* Make .TOC. defined so as to prevent it being made dynamic.
 	 The wrong value here is fixed later in ppc64_elf_set_toc.  */
+      if (!htab->elf.hgot->def_regular
+	  || htab->elf.hgot->root.type != bfd_link_hash_defined)
+	{
+	  htab->elf.hgot->root.type = bfd_link_hash_defined;
+	  htab->elf.hgot->root.u.def.value = 0;
+	  htab->elf.hgot->root.u.def.section = bfd_abs_section_ptr;
+	  htab->elf.hgot->def_regular = 1;
+	  htab->elf.hgot->root.linker_def = 1;
+	}
       htab->elf.hgot->type = STT_OBJECT;
-      htab->elf.hgot->root.type = bfd_link_hash_defined;
-      htab->elf.hgot->root.u.def.value = 0;
-      htab->elf.hgot->root.u.def.section = bfd_abs_section_ptr;
-      htab->elf.hgot->def_regular = 1;
       htab->elf.hgot->other = ((htab->elf.hgot->other & ~ELF_ST_VISIBILITY (-1))
 			       | STV_HIDDEN);
     }
 
-  if (htab->sfpr == NULL)
-    /* We don't have any relocs.  */
-    return TRUE;
-
-  /* Provide any missing _save* and _rest* functions.  */
-  htab->sfpr->size = 0;
-  if (htab->params->save_restore_funcs)
-    for (i = 0; i < sizeof (funcs) / sizeof (funcs[0]); i++)
-      if (!sfpr_define (info, &funcs[i]))
-	return FALSE;
-
-  elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
-
-  if (htab->sfpr->size == 0)
-    htab->sfpr->flags |= SEC_EXCLUDE;
+  if (htab->need_func_desc_adj)
+    {
+      elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
+      htab->need_func_desc_adj = 0;
+    }
 
   return TRUE;
 }
 
-/* Return true if we have dynamic relocs that apply to read-only sections.  */
+/* Return true if we have dynamic relocs against H that apply to
+   read-only sections.  */
 
 static bfd_boolean
 readonly_dynrelocs (struct elf_link_hash_entry *h)
@@ -6993,6 +7189,58 @@ readonly_dynrelocs (struct elf_link_hash
   return FALSE;
 }
 
+/* Return true if we have dynamic relocs against H or any of its weak
+   aliases, that apply to read-only sections.  */
+
+static bfd_boolean
+alias_readonly_dynrelocs (struct elf_link_hash_entry *h)
+{
+  struct ppc_link_hash_entry *eh;
+
+  eh = (struct ppc_link_hash_entry *) h;
+  do
+    {
+      if (readonly_dynrelocs (&eh->elf))
+	return TRUE;
+      eh = eh->weakref;
+    } while (eh != NULL && &eh->elf != h);
+
+  return FALSE;
+}
+
+/* Return whether EH has pc-relative dynamic relocs.  */
+
+static bfd_boolean
+pc_dynrelocs (struct ppc_link_hash_entry *eh)
+{
+  struct elf_dyn_relocs *p;
+
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    if (p->pc_count != 0)
+      return TRUE;
+  return FALSE;
+}
+
+/* Return true if a global entry stub will be created for H.  Valid
+   for ELFv2 before plt entries have been allocated.  */
+
+static bfd_boolean
+global_entry_stub (struct elf_link_hash_entry *h)
+{
+  struct plt_entry *pent;
+
+  if (!h->pointer_equality_needed
+      || h->def_regular)
+    return FALSE;
+
+  for (pent = h->plt.plist; pent != NULL; pent = pent->next)
+    if (pent->plt.refcount > 0
+	&& pent->addend == 0)
+      return TRUE;
+
+  return FALSE;
+}
+
 /* Adjust a symbol defined by a dynamic object and referenced by a
    regular object.  The current definition is in some section of the
    dynamic object, but we're not including those sections.  We have to
@@ -7004,7 +7252,7 @@ ppc64_elf_adjust_dynamic_symbol (struct 
 				 struct elf_link_hash_entry *h)
 {
   struct ppc_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
 
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -7025,41 +7273,32 @@ ppc64_elf_adjust_dynamic_symbol (struct 
 	  || (h->type != STT_GNU_IFUNC
 	      && (SYMBOL_CALLS_LOCAL (info, h)
 		  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
-		      && h->root.type == bfd_link_hash_undefweak))))
+		      && h->root.type == bfd_link_hash_undefweak)))
+	  || ((struct ppc_link_hash_entry *) h)->save_res)
 	{
 	  h->plt.plist = NULL;
 	  h->needs_plt = 0;
 	  h->pointer_equality_needed = 0;
 	}
-      else if (abiversion (info->output_bfd) == 2)
+      else if (abiversion (info->output_bfd) >= 2)
 	{
 	  /* Taking a function's address in a read/write section
 	     doesn't require us to define the function symbol in the
 	     executable on a global entry stub.  A dynamic reloc can
-	     be used instead.  */
-	  if (h->pointer_equality_needed
-	      && h->type != STT_GNU_IFUNC
-	      && !readonly_dynrelocs (h))
+	     be used instead.  The reason we prefer a few more dynamic
+	     relocs is that calling via a global entry stub costs a
+	     few more instructions, and pointer_equality_needed causes
+	     extra work in ld.so when resolving these symbols.  */
+	  if (global_entry_stub (h)
+	      && !alias_readonly_dynrelocs (h))
 	    {
 	      h->pointer_equality_needed = 0;
+	      /* After adjust_dynamic_symbol, non_got_ref set in
+		 the non-pic case means that dyn_relocs for this
+		 symbol should be discarded.  */
 	      h->non_got_ref = 0;
 	    }
 
-	  /* After adjust_dynamic_symbol, non_got_ref set in the
-	     non-shared case means that we have allocated space in
-	     .dynbss for the symbol and thus dyn_relocs for this
-	     symbol should be discarded.
-	     If we get here we know we are making a PLT entry for this
-	     symbol, and in an executable we'd normally resolve
-	     relocations against this symbol to the PLT entry.  Allow
-	     dynamic relocs if the reference is weak, and the dynamic
-	     relocs will not cause text relocation.  */
-	  else if (!h->ref_regular_nonweak
-		   && h->non_got_ref
-		   && h->type != STT_GNU_IFUNC
-		   && !readonly_dynrelocs (h))
-	    h->non_got_ref = 0;
-
 	  /* If making a plt entry, then we don't need copy relocs.  */
 	  return TRUE;
 	}
@@ -7085,7 +7324,7 @@ ppc64_elf_adjust_dynamic_symbol (struct 
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -7094,29 +7333,20 @@ ppc64_elf_adjust_dynamic_symbol (struct 
     return TRUE;
 
   /* Don't generate a copy reloc for symbols defined in the executable.  */
-  if (!h->def_dynamic || !h->ref_regular || h->def_regular)
-    return TRUE;
+  if (!h->def_dynamic || !h->ref_regular || h->def_regular
 
-  /* If -z nocopyreloc was given, don't generate them either.  */
-  if (info->nocopyreloc)
-    {
-      h->non_got_ref = 0;
-      return TRUE;
-    }
+      /* If -z nocopyreloc was given, don't generate them either.  */
+      || info->nocopyreloc
 
-  /* If we didn't find any dynamic relocs in read-only sections, then
-     we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
-  if (ELIMINATE_COPY_RELOCS && !readonly_dynrelocs (h))
-    {
-      h->non_got_ref = 0;
-      return TRUE;
-    }
-
-  /* Protected variables do not work with .dynbss.  The copy in
-     .dynbss won't be used by the shared library with the protected
-     definition for the variable.  Text relocations are preferable
-     to an incorrect program.  */
-  if (h->protected_def)
+      /* If we didn't find any dynamic relocs in read-only sections, then
+	 we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
+      || (ELIMINATE_COPY_RELOCS && !alias_readonly_dynrelocs (h))
+
+      /* Protected variables do not work with .dynbss.  The copy in
+	 .dynbss won't be used by the shared library with the protected
+	 definition for the variable.  Text relocations are preferable
+	 to an incorrect program.  */
+      || h->protected_def)
     {
       h->non_got_ref = 0;
       return TRUE;
@@ -7152,14 +7382,22 @@ ppc64_elf_adjust_dynamic_symbol (struct 
      to copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->relbss->size += sizeof (Elf64_External_Rela);
+      srel->size += sizeof (Elf64_External_Rela);
       h->needs_copy = 1;
     }
 
-  s = htab->dynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -7181,7 +7419,7 @@ ppc64_elf_hide_symbol (struct bfd_link_i
       if (fh == NULL)
 	{
 	  const char *p, *q;
-	  struct ppc_link_hash_table *htab;
+	  struct elf_link_hash_table *htab = elf_hash_table (info);
 	  char save;
 
 	  /* We aren't supposed to use alloca in BFD because on
@@ -7196,12 +7434,8 @@ ppc64_elf_hide_symbol (struct bfd_link_i
 	  p = eh->elf.root.root.string - 1;
 	  save = *p;
 	  *(char *) p = '.';
-	  htab = ppc_hash_table (info);
-	  if (htab == NULL)
-	    return;
-
 	  fh = (struct ppc_link_hash_entry *)
-	    elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+	    elf_link_hash_lookup (htab, p, FALSE, FALSE, FALSE);
 	  *(char *) p = save;
 
 	  /* Unfortunately, if it so happens that the string we were
@@ -7215,7 +7449,7 @@ ppc64_elf_hide_symbol (struct bfd_link_i
 		--q, --p;
 	      if (q < eh->elf.root.root.string && *p == '.')
 		fh = (struct ppc_link_hash_entry *)
-		  elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+		  elf_link_hash_lookup (htab, p, FALSE, FALSE, FALSE);
 	    }
 	  if (fh != NULL)
 	    {
@@ -7392,7 +7626,7 @@ tocsave_find (struct ppc_link_hash_table
     return NULL;
   if (ent.sec == NULL || ent.sec->output_section == NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: undefined symbol on R_PPC64_TOCSAVE relocation"));
       return NULL;
     }
@@ -7504,7 +7738,7 @@ dec_dynrel_count (bfd_vma r_info,
     case R_PPC64_TPREL16_HIGHERA:
     case R_PPC64_TPREL16_HIGHEST:
     case R_PPC64_TPREL16_HIGHESTA:
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	return TRUE;
 
     case R_PPC64_TPREL64:
@@ -7548,14 +7782,14 @@ dec_dynrel_count (bfd_vma r_info,
 	return FALSE;
     }
 
-  if ((info->shared
+  if ((bfd_link_pic (info)
        && (must_be_dyn_reloc (info, r_type)
 	   || (h != NULL
 	       && (!SYMBOLIC_BIND (info, h)
 		   || h->root.type == bfd_link_hash_defweak
 		   || !h->def_regular))))
       || (ELIMINATE_COPY_RELOCS
-	  && !info->shared
+	  && !bfd_link_pic (info)
 	  && h != NULL
 	  && (h->root.type == bfd_link_hash_defweak
 	      || !h->def_regular)))
@@ -7622,6 +7856,7 @@ dec_dynrel_count (bfd_vma r_info,
 	}
     }
 
+  /* xgettext:c-format */
   info->callbacks->einfo (_("%P: dynreloc miscount for %B, section %A\n"),
 			  sec->owner, sec);
   bfd_set_error (bfd_error_bad_value);
@@ -7710,7 +7945,7 @@ ppc64_elf_edit_opd (struct bfd_link_info
 		 something silly in .opd with the assembler.  No .opd
 		 optimization for them!  */
 	    broken_opd:
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: .opd is not a regular array of opd entries"), ibfd);
 	      broken = TRUE;
 	      break;
@@ -7719,7 +7954,8 @@ ppc64_elf_edit_opd (struct bfd_link_info
 	  if ((r_type = ELF64_R_TYPE (rel->r_info)) != R_PPC64_ADDR64
 	      || (r_type = ELF64_R_TYPE ((rel + 1)->r_info)) != R_PPC64_TOC)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: unexpected reloc type %u in .opd section"),
 		 ibfd, r_type);
 	      broken = TRUE;
@@ -7740,7 +7976,8 @@ ppc64_elf_edit_opd (struct bfd_link_info
 		sym_name = bfd_elf_sym_name (ibfd, symtab_hdr, sym,
 					     sym_sec);
 
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: undefined sym `%s' in .opd section"),
 		 ibfd, sym_name);
 	      broken = TRUE;
@@ -7882,11 +8119,14 @@ ppc64_elf_edit_opd (struct bfd_link_info
 	      if (h != NULL
 		  && h->root.root.string[0] == '.')
 		{
-		  fdh = lookup_fdh ((struct ppc_link_hash_entry *) h, htab);
-		  if (fdh != NULL
-		      && fdh->elf.root.type != bfd_link_hash_defined
-		      && fdh->elf.root.type != bfd_link_hash_defweak)
-		    fdh = NULL;
+		  fdh = ((struct ppc_link_hash_entry *) h)->oh;
+		  if (fdh != NULL)
+		    {
+		      fdh = ppc_follow_link (fdh);
+		      if (fdh->elf.root.type != bfd_link_hash_defined
+			  && fdh->elf.root.type != bfd_link_hash_defweak)
+			fdh = NULL;
+		    }
 		}
 
 	      skip = (sym_sec->owner != ibfd
@@ -7902,7 +8142,7 @@ ppc64_elf_edit_opd (struct bfd_link_info
 		    }
 		  opd->adjust[OPD_NDX (rel->r_offset)] = -1;
 
-		  if (NO_OPD_RELOCS || info->relocatable)
+		  if (NO_OPD_RELOCS || bfd_link_relocatable (info))
 		    rel = next_rel;
 		  else
 		    while (1)
@@ -8002,7 +8242,7 @@ ppc64_elf_edit_opd (struct bfd_link_info
 
   /* If we are doing a final link and the last .opd entry is just 16 byte
      long, add a 8 byte padding after it.  */
-  if (need_pad != NULL && !info->relocatable)
+  if (need_pad != NULL && !bfd_link_relocatable (info))
     {
       bfd_byte *p;
 
@@ -8065,7 +8305,7 @@ ppc64_elf_tls_setup (struct bfd_link_inf
   htab->tls_get_addr_fd = ((struct ppc_link_hash_entry *)
 			   elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
 						 FALSE, FALSE, TRUE));
-  if (!htab->params->no_tls_get_addr_opt)
+  if (htab->params->tls_get_addr_opt)
     {
       struct elf_link_hash_entry *opt, *opt_fd, *tga, *tga_fd;
 
@@ -8102,6 +8342,7 @@ ppc64_elf_tls_setup (struct bfd_link_inf
 		  tga_fd->root.type = bfd_link_hash_indirect;
 		  tga_fd->root.u.i.link = &opt_fd->root;
 		  ppc64_elf_copy_indirect_symbol (info, opt_fd, tga_fd);
+		  opt_fd->mark = 1;
 		  if (opt_fd->dynindx != -1)
 		    {
 		      /* Use __tls_get_addr_opt in dynamic relocations.  */
@@ -8118,6 +8359,7 @@ ppc64_elf_tls_setup (struct bfd_link_inf
 		      tga->root.type = bfd_link_hash_indirect;
 		      tga->root.u.i.link = &opt->root;
 		      ppc64_elf_copy_indirect_symbol (info, opt, tga);
+		      opt->mark = 1;
 		      _bfd_elf_link_hash_hide_symbol (info, opt,
 						      tga->forced_local);
 		      htab->tls_get_addr = (struct ppc_link_hash_entry *) opt;
@@ -8132,8 +8374,8 @@ ppc64_elf_tls_setup (struct bfd_link_inf
 		}
 	    }
 	}
-      else
-	htab->params->no_tls_get_addr_opt = TRUE;
+      else if (htab->params->tls_get_addr_opt < 0)
+	htab->params->tls_get_addr_opt = 0;
     }
   return _bfd_elf_tls_setup (info->output_bfd, info);
 }
@@ -8180,7 +8422,7 @@ ppc64_elf_tls_optimize (struct bfd_link_
   unsigned char *toc_ref;
   int pass;
 
-  if (info->relocatable || !info->executable)
+  if (!bfd_link_executable (info))
     return TRUE;
 
   htab = ppc_hash_table (info);
@@ -8275,7 +8517,8 @@ ppc64_elf_tls_optimize (struct bfd_link_
 		      if (h != NULL
 			  && h->root.type == bfd_link_hash_undefweak)
 			ok_tprel = TRUE;
-		      else
+		      else if (sym_sec != NULL
+			       && sym_sec->output_section != NULL)
 			{
 			  value += sym_sec->output_offset;
 			  value += sym_sec->output_section->vma;
@@ -8314,7 +8557,7 @@ ppc64_elf_tls_optimize (struct bfd_link_
 		    case R_PPC64_GOT_TLSLD16_LO:
 		      expecting_tls_get_addr = 1;
 		      found_tls_get_addr_arg = 1;
-		      /* Fall thru */
+		      /* Fall through.  */
 
 		    case R_PPC64_GOT_TLSLD16_HI:
 		    case R_PPC64_GOT_TLSLD16_HA:
@@ -8334,7 +8577,7 @@ ppc64_elf_tls_optimize (struct bfd_link_
 		    case R_PPC64_GOT_TLSGD16_LO:
 		      expecting_tls_get_addr = 1;
 		      found_tls_get_addr_arg = 1;
-		      /* Fall thru */
+		      /* Fall through. */
 
 		    case R_PPC64_GOT_TLSGD16_HI:
 		    case R_PPC64_GOT_TLSGD16_HA:
@@ -8365,7 +8608,7 @@ ppc64_elf_tls_optimize (struct bfd_link_
 		    case R_PPC64_TLSGD:
 		    case R_PPC64_TLSLD:
 		      found_tls_get_addr_arg = 1;
-		      /* Fall thru */
+		      /* Fall through.  */
 
 		    case R_PPC64_TLS:
 		    case R_PPC64_TOC16:
@@ -8497,6 +8740,7 @@ ppc64_elf_tls_optimize (struct bfd_link_
 			 could just mark this symbol to exclude it
 			 from tls optimization but it's safer to skip
 			 the entire optimization.  */
+		      /* xgettext:c-format */
 		      info->callbacks->minfo (_("%H arg lost __tls_get_addr, "
 						"TLS optimization disabled\n"),
 					      ibfd, sec, rel->r_offset);
@@ -8641,7 +8885,7 @@ adjust_toc_syms (struct elf_link_hash_en
 
       if ((toc_inf->skip[i] & (ref_from_discarded | can_optimize)) != 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s defined on removed toc entry"), eh->elf.root.root.string);
 	  do
 	    ++i;
@@ -8658,12 +8902,14 @@ adjust_toc_syms (struct elf_link_hash_en
   return TRUE;
 }
 
-/* Return TRUE iff INSN is one we expect on a _LO variety toc/got reloc.  */
+/* Return TRUE iff INSN with a relocation of R_TYPE is one we expect
+   on a _LO variety toc/got reloc.  */
 
 static bfd_boolean
-ok_lo_toc_insn (unsigned int insn)
+ok_lo_toc_insn (unsigned int insn, enum elf_ppc64_reloc_type r_type)
 {
-  return ((insn & (0x3f << 26)) == 14u << 26 /* addi */
+  return ((insn & (0x3f << 26)) == 12u << 26 /* addic */
+	  || (insn & (0x3f << 26)) == 14u << 26 /* addi */
 	  || (insn & (0x3f << 26)) == 32u << 26 /* lwz */
 	  || (insn & (0x3f << 26)) == 34u << 26 /* lbz */
 	  || (insn & (0x3f << 26)) == 36u << 26 /* stw */
@@ -8677,11 +8923,20 @@ ok_lo_toc_insn (unsigned int insn)
 	  || (insn & (0x3f << 26)) == 50u << 26 /* lfd */
 	  || (insn & (0x3f << 26)) == 52u << 26 /* stfs */
 	  || (insn & (0x3f << 26)) == 54u << 26 /* stfd */
-	  || ((insn & (0x3f << 26)) == 58u << 26 /* lwa,ld,lmd */
-	      && (insn & 3) != 1)
-	  || ((insn & (0x3f << 26)) == 62u << 26 /* std, stmd */
-	      && ((insn & 3) == 0 || (insn & 3) == 3))
-	  || (insn & (0x3f << 26)) == 12u << 26 /* addic */);
+	  || (insn & (0x3f << 26)) == 56u << 26 /* lq,lfq */
+	  || ((insn & (0x3f << 26)) == 57u << 26 /* lxsd,lxssp,lfdp */
+	      /* Exclude lfqu by testing reloc.  If relocs are ever
+		 defined for the reduced D field in psq_lu then those
+		 will need testing too.  */
+	      && r_type != R_PPC64_TOC16_LO && r_type != R_PPC64_GOT16_LO)
+	  || ((insn & (0x3f << 26)) == 58u << 26 /* ld,lwa */
+	      && (insn & 1) == 0)
+	  || (insn & (0x3f << 26)) == 60u << 26 /* stfq */
+	  || ((insn & (0x3f << 26)) == 61u << 26 /* lxv,stx{v,sd,ssp},stfdp */
+	      /* Exclude stfqu.  psq_stu as above for psq_lu.  */
+	      && r_type != R_PPC64_TOC16_LO && r_type != R_PPC64_GOT16_LO)
+	  || ((insn & (0x3f << 26)) == 62u << 26 /* std,stq */
+	      && (insn & 1) == 0));
 }
 
 /* Examine all relocs referencing .toc sections in order to remove
@@ -8836,6 +9091,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 		goto error_ret;
 
 	      if (sym_sec == NULL
+		  || sym_sec->output_section == NULL
 		  || discarded_section (sym_sec))
 		continue;
 
@@ -8985,7 +9241,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			}
 		      insn = bfd_get_32 (ibfd, buf);
 		      if (insn_check == check_lo
-			  ? !ok_lo_toc_insn (insn)
+			  ? !ok_lo_toc_insn (insn, r_type)
 			  : ((insn & ((0x3f << 26) | 0x1f << 16))
 			     != ((15u << 26) | (2 << 16)) /* addis rt,2,imm */))
 			{
@@ -8994,7 +9250,8 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			  ppc64_elf_tdata (ibfd)->unexpected_toc_insn = 1;
 			  sprintf (str, "%#08x", insn);
 			  info->callbacks->einfo
-			    (_("%P: %H: toc optimization is not supported for"
+			    /* xgettext:c-format */
+			    (_("%H: toc optimization is not supported for"
 			       " %s instruction.\n"),
 			     ibfd, sec, rel->r_offset & ~3, str);
 			}
@@ -9057,7 +9314,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			    }
 			  if ((opc & (0x3f << 2)) == (58u << 2))
 			    break;
-			  /* Fall thru */
+			  /* Fall through.  */
 
 			default:
 			  /* Wrong sort of reloc, or not a ld.  We may
@@ -9222,7 +9479,8 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			  if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
 			    ppc_howto_init ();
 			  info->callbacks->einfo
-			    (_("%P: %H: %s references "
+			    /* xgettext:c-format */
+			    (_("%H: %s references "
 			       "optimized away TOC entry\n"),
 			     ibfd, sec, rel->r_offset,
 			     ppc64_elf_howto_table[r_type]->name);
@@ -9264,7 +9522,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 		  if ((skip[i] & (ref_from_discarded | can_optimize)) != 0)
 		    {
 		      if (local_toc_syms)
-			(*_bfd_error_handler)
+			_bfd_error_handler
 			  (_("%s defined on removed toc entry"),
 			   bfd_elf_sym_name (ibfd, symtab_hdr, sym, NULL));
 		      do
@@ -9357,7 +9615,6 @@ allocate_got (struct elf_link_hash_entry
 	      struct got_entry *gent)
 {
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
-  bfd_boolean dyn;
   struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
   int entsize = (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)
 		 ? 16 : 8);
@@ -9368,14 +9625,15 @@ allocate_got (struct elf_link_hash_entry
   gent->got.offset = got->size;
   got->size += entsize;
 
-  dyn = htab->elf.dynamic_sections_created;
   if (h->type == STT_GNU_IFUNC)
     {
       htab->elf.irelplt->size += rentsize;
       htab->got_reli_size += rentsize;
     }
-  else if ((info->shared
-	    || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
+  else if ((bfd_link_pic (info)
+	    || (htab->elf.dynamic_sections_created
+		&& h->dynindx != -1
+		&& !SYMBOL_REFERENCES_LOCAL (info, h)))
 	   && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	       || h->root.type != bfd_link_hash_undefweak))
     {
@@ -9404,6 +9662,23 @@ merge_got_entries (struct got_entry **pe
 	  }
 }
 
+/* If H is undefined weak, make it dynamic if that makes sense.  */
+
+static bfd_boolean
+ensure_undefweak_dynamic (struct bfd_link_info *info,
+			  struct elf_link_hash_entry *h)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  if (htab->dynamic_sections_created
+      && h->root.type == bfd_link_hash_undefweak
+      && h->dynindx == -1
+      && !h->forced_local
+      && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+    return bfd_elf_link_record_dynamic_symbol (info, h);
+  return TRUE;
+}
+
 /* Allocate space in .plt, .got and associated reloc sections for
    dynamic relocs.  */
 
@@ -9414,7 +9689,6 @@ allocate_dynrelocs (struct elf_link_hash
   struct ppc_link_hash_table *htab;
   asection *s;
   struct ppc_link_hash_entry *eh;
-  struct elf_dyn_relocs *p;
   struct got_entry **pgent, *gent;
 
   if (h->root.type == bfd_link_hash_indirect)
@@ -9425,71 +9699,6 @@ allocate_dynrelocs (struct elf_link_hash
   if (htab == NULL)
     return FALSE;
 
-  if ((htab->elf.dynamic_sections_created
-       && h->dynindx != -1
-       && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
-      || h->type == STT_GNU_IFUNC)
-    {
-      struct plt_entry *pent;
-      bfd_boolean doneone = FALSE;
-      for (pent = h->plt.plist; pent != NULL; pent = pent->next)
-	if (pent->plt.refcount > 0)
-	  {
-	    if (!htab->elf.dynamic_sections_created
-		|| h->dynindx == -1)
-	      {
-		s = htab->elf.iplt;
-		pent->plt.offset = s->size;
-		s->size += PLT_ENTRY_SIZE (htab);
-		s = htab->elf.irelplt;
-	      }
-	    else
-	      {
-		/* If this is the first .plt entry, make room for the special
-		   first entry.  */
-		s = htab->elf.splt;
-		if (s->size == 0)
-		  s->size += PLT_INITIAL_ENTRY_SIZE (htab);
-
-		pent->plt.offset = s->size;
-
-		/* Make room for this entry.  */
-		s->size += PLT_ENTRY_SIZE (htab);
-
-		/* Make room for the .glink code.  */
-		s = htab->glink;
-		if (s->size == 0)
-		  s->size += GLINK_CALL_STUB_SIZE;
-		if (htab->opd_abi)
-		  {
-		    /* We need bigger stubs past index 32767.  */
-		    if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
-		      s->size += 4;
-		    s->size += 2*4;
-		  }
-		else
-		  s->size += 4;
-
-		/* We also need to make an entry in the .rela.plt section.  */
-		s = htab->elf.srelplt;
-	      }
-	    s->size += sizeof (Elf64_External_Rela);
-	    doneone = TRUE;
-	  }
-	else
-	  pent->plt.offset = (bfd_vma) -1;
-      if (!doneone)
-	{
-	  h->plt.plist = NULL;
-	  h->needs_plt = 0;
-	}
-    }
-  else
-    {
-      h->plt.plist = NULL;
-      h->needs_plt = 0;
-    }
-
   eh = (struct ppc_link_hash_entry *) h;
   /* Run through the TLS GD got entries first if we're changing them
      to TPREL.  */
@@ -9542,16 +9751,9 @@ allocate_dynrelocs (struct elf_link_hash
     if (!gent->is_indirect)
       {
 	/* Make sure this symbol is output as a dynamic symbol.
-	   Undefined weak syms won't yet be marked as dynamic,
-	   nor will all TLS symbols.  */
-	if (h->dynindx == -1
-	    && !h->forced_local
-	    && h->type != STT_GNU_IFUNC
-	    && htab->elf.dynamic_sections_created)
-	  {
-	    if (! bfd_elf_link_record_dynamic_symbol (info, h))
-	      return FALSE;
-	  }
+	   Undefined weak syms won't yet be marked as dynamic.  */
+	if (!ensure_undefweak_dynamic (info, h))
+	  return FALSE;
 
 	if (!is_ppc64_elf (gent->owner))
 	  abort ();
@@ -9559,99 +9761,171 @@ allocate_dynrelocs (struct elf_link_hash
 	allocate_got (h, info, gent);
       }
 
-  if (eh->dyn_relocs == NULL
-      || (!htab->elf.dynamic_sections_created
-	  && h->type != STT_GNU_IFUNC))
-    return TRUE;
-
-  /* In the shared -Bsymbolic case, discard space allocated for
-     dynamic pc-relative relocs against symbols which turn out to be
-     defined in regular objects.  For the normal shared case, discard
-     space for relocs that have become local due to symbol visibility
-     changes.  */
-
-  if (info->shared)
-    {
-      /* Relocs that use pc_count are those that appear on a call insn,
-	 or certain REL relocs (see must_be_dyn_reloc) that can be
-	 generated via assembly.  We want calls to protected symbols to
-	 resolve directly to the function rather than going via the plt.
-	 If people want function pointer comparisons to work as expected
-	 then they should avoid writing weird assembly.  */
-      if (SYMBOL_CALLS_LOCAL (info, h))
-	{
-	  struct elf_dyn_relocs **pp;
+  if (!htab->elf.dynamic_sections_created
+      && h->type != STT_GNU_IFUNC)
+    eh->dyn_relocs = NULL;
+
+  if (eh->dyn_relocs != NULL)
+    {
+      struct elf_dyn_relocs *p, **pp;
+
+      /* In the shared -Bsymbolic case, discard space allocated for
+	 dynamic pc-relative relocs against symbols which turn out to
+	 be defined in regular objects.  For the normal shared case,
+	 discard space for relocs that have become local due to symbol
+	 visibility changes.  */
+
+      if (bfd_link_pic (info))
+	{
+	  /* Relocs that use pc_count are those that appear on a call
+	     insn, or certain REL relocs (see must_be_dyn_reloc) that
+	     can be generated via assembly.  We want calls to
+	     protected symbols to resolve directly to the function
+	     rather than going via the plt.  If people want function
+	     pointer comparisons to work as expected then they should
+	     avoid writing weird assembly.  */
+	  if (SYMBOL_CALLS_LOCAL (info, h))
+	    {
+	      for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+		{
+		  p->count -= p->pc_count;
+		  p->pc_count = 0;
+		  if (p->count == 0)
+		    *pp = p->next;
+		  else
+		    pp = &p->next;
+		}
+	    }
 
-	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	  /* Also discard relocs on undefined weak syms with
+	     non-default visibility.  */
+	  if (eh->dyn_relocs != NULL
+	      && h->root.type == bfd_link_hash_undefweak)
 	    {
-	      p->count -= p->pc_count;
-	      p->pc_count = 0;
-	      if (p->count == 0)
-		*pp = p->next;
-	      else
-		pp = &p->next;
+	      if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+		eh->dyn_relocs = NULL;
+
+	      /* Make sure this symbol is output as a dynamic symbol.
+		 Undefined weak syms won't yet be marked as dynamic.  */
+	      else if (!ensure_undefweak_dynamic (info, h))
+		return FALSE;
+	    }
+	}
+      else if (h->type == STT_GNU_IFUNC)
+	{
+	  /* A plt entry is always created when making direct calls to
+	     an ifunc, even when building a static executable, but
+	     that doesn't cover all cases.  We may have only an ifunc
+	     initialised function pointer for a given ifunc symbol.
+
+	     For ELFv2, dynamic relocations are not required when
+	     generating a global entry PLT stub.  */
+	  if (abiversion (info->output_bfd) >= 2)
+	    {
+	      if (global_entry_stub (h))
+		eh->dyn_relocs = NULL;
+	    }
+
+	  /* For ELFv1 we have function descriptors.  Descriptors need
+	     to be treated like PLT entries and thus have dynamic
+	     relocations.  One exception is when the function
+	     descriptor is copied into .dynbss (which should only
+	     happen with ancient versions of gcc).  */
+	  else if (h->needs_copy)
+	    eh->dyn_relocs = NULL;
+	}
+      else if (ELIMINATE_COPY_RELOCS)
+	{
+	  /* For the non-pic case, discard space for relocs against
+	     symbols which turn out to need copy relocs or are not
+	     dynamic.  */
+	  if (!h->non_got_ref
+	      && !h->def_regular)
+	    {
+	      /* Make sure this symbol is output as a dynamic symbol.
+		 Undefined weak syms won't yet be marked as dynamic.  */
+	      if (!ensure_undefweak_dynamic (info, h))
+		return FALSE;
+
+	      if (h->dynindx == -1)
+		eh->dyn_relocs = NULL;
 	    }
+	  else
+	    eh->dyn_relocs = NULL;
 	}
 
-      /* Also discard relocs on undefined weak syms with non-default
-	 visibility.  */
-      if (eh->dyn_relocs != NULL
-	  && h->root.type == bfd_link_hash_undefweak)
+      /* Finally, allocate space.  */
+      for (p = eh->dyn_relocs; p != NULL; p = p->next)
 	{
-	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-	    eh->dyn_relocs = NULL;
-
-	  /* Make sure this symbol is output as a dynamic symbol.
-	     Undefined weak syms won't yet be marked as dynamic.  */
-	  else if (h->dynindx == -1
-		   && !h->forced_local)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		return FALSE;
-	    }
+	  asection *sreloc = elf_section_data (p->sec)->sreloc;
+	  if (eh->elf.type == STT_GNU_IFUNC)
+	    sreloc = htab->elf.irelplt;
+	  sreloc->size += p->count * sizeof (Elf64_External_Rela);
 	}
     }
-  else if (h->type == STT_GNU_IFUNC)
-    {
-      if (!h->non_got_ref)
-	eh->dyn_relocs = NULL;
-    }
-  else if (ELIMINATE_COPY_RELOCS)
+
+  if ((htab->elf.dynamic_sections_created
+       && h->dynindx != -1)
+      || h->type == STT_GNU_IFUNC)
     {
-      /* For the non-shared case, discard space for relocs against
-	 symbols which turn out to need copy relocs or are not
-	 dynamic.  */
+      struct plt_entry *pent;
+      bfd_boolean doneone = FALSE;
+      for (pent = h->plt.plist; pent != NULL; pent = pent->next)
+	if (pent->plt.refcount > 0)
+	  {
+	    if (!htab->elf.dynamic_sections_created
+		|| h->dynindx == -1)
+	      {
+		s = htab->elf.iplt;
+		pent->plt.offset = s->size;
+		s->size += PLT_ENTRY_SIZE (htab);
+		s = htab->elf.irelplt;
+	      }
+	    else
+	      {
+		/* If this is the first .plt entry, make room for the special
+		   first entry.  */
+		s = htab->elf.splt;
+		if (s->size == 0)
+		  s->size += PLT_INITIAL_ENTRY_SIZE (htab);
 
-      if (!h->non_got_ref
-	  && !h->def_regular)
-	{
-	  /* Make sure this symbol is output as a dynamic symbol.
-	     Undefined weak syms won't yet be marked as dynamic.  */
-	  if (h->dynindx == -1
-	      && !h->forced_local)
-	    {
-	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		return FALSE;
-	    }
+		pent->plt.offset = s->size;
 
-	  /* If that succeeded, we know we'll be keeping all the
-	     relocs.  */
-	  if (h->dynindx != -1)
-	    goto keep;
-	}
+		/* Make room for this entry.  */
+		s->size += PLT_ENTRY_SIZE (htab);
 
-      eh->dyn_relocs = NULL;
+		/* Make room for the .glink code.  */
+		s = htab->glink;
+		if (s->size == 0)
+		  s->size += GLINK_CALL_STUB_SIZE;
+		if (htab->opd_abi)
+		  {
+		    /* We need bigger stubs past index 32767.  */
+		    if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
+		      s->size += 4;
+		    s->size += 2*4;
+		  }
+		else
+		  s->size += 4;
 
-    keep: ;
+		/* We also need to make an entry in the .rela.plt section.  */
+		s = htab->elf.srelplt;
+	      }
+	    s->size += sizeof (Elf64_External_Rela);
+	    doneone = TRUE;
+	  }
+	else
+	  pent->plt.offset = (bfd_vma) -1;
+      if (!doneone)
+	{
+	  h->plt.plist = NULL;
+	  h->needs_plt = 0;
+	}
     }
-
-  /* Finally, allocate space.  */
-  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+  else
     {
-      asection *sreloc = elf_section_data (p->sec)->sreloc;
-      if (eh->elf.type == STT_GNU_IFUNC)
-	sreloc = htab->elf.irelplt;
-      sreloc->size += p->count * sizeof (Elf64_External_Rela);
+      h->plt.plist = NULL;
+      h->needs_plt = 0;
     }
 
   return TRUE;
@@ -9693,6 +9967,7 @@ size_global_entry_stubs (struct elf_link
 	   need to define the symbol in the executable on a call stub.
 	   This is to avoid text relocations.  */
 	s->size = (s->size + 15) & -16;
+	h->root.type = bfd_link_hash_defined;
 	h->root.u.def.section = s;
 	h->root.u.def.value = s->size;
 	s->size += 16;
@@ -9744,7 +10019,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
   if (htab->elf.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -9836,7 +10111,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 			htab->elf.irelplt->size += rel_size;
 			htab->got_reli_size += rel_size;
 		      }
-		    else if (info->shared)
+		    else if (bfd_link_pic (info))
 		      {
 			asection *srel = ppc64_elf_tdata (ibfd)->relgot;
 			srel->size += rel_size;
@@ -9874,7 +10149,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
   if (htab->glink != NULL)
     htab->glink->rawsize = htab->glink->size;
 
-  if (!htab->opd_abi && !info->shared)
+  if (!htab->opd_abi && !bfd_link_pic (info))
     elf_link_hash_traverse (&htab->elf, size_global_entry_stubs, info);
 
   first_tlsld = NULL;
@@ -9901,7 +10176,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	      ent->got.offset = s->size;
 	      ent->owner = ibfd;
 	      s->size += 16;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  asection *srel = ppc64_elf_tdata (ibfd)->relgot;
 		  srel->size += sizeof (Elf64_External_Rela);
@@ -9927,7 +10202,8 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	       || s == htab->elf.splt
 	       || s == htab->elf.iplt
 	       || s == htab->glink
-	       || s == htab->dynbss)
+	       || s == htab->elf.sdynbss
+	       || s == htab->elf.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -9980,7 +10256,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	 but this way if it does we get a R_PPC64_NONE reloc in .rela
 	 sections instead of garbage.
 	 We also rely on the section contents being zero when writing
-	 the GOT.  */
+	 the GOT and .dynrelro.  */
       s->contents = bfd_zalloc (dynobj, s->size);
       if (s->contents == NULL)
 	return FALSE;
@@ -10031,7 +10307,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -10054,7 +10330,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	    return FALSE;
 	}
 
-      tls_opt = (!htab->params->no_tls_get_addr_opt
+      tls_opt = (htab->params->tls_get_addr_opt
 		 && htab->tls_get_addr_fd != NULL
 		 && htab->tls_get_addr_fd->elf.plt.plist != NULL);
       if (tls_opt || !htab->opd_abi)
@@ -10239,7 +10515,7 @@ plt_stub_size (struct ppc_link_hash_tabl
   if (stub_entry->h != NULL
       && (stub_entry->h == htab->tls_get_addr_fd
 	  || stub_entry->h == htab->tls_get_addr)
-      && !htab->params->no_tls_get_addr_opt)
+      && htab->params->tls_get_addr_opt)
     size += 13 * 4;
   return size;
 }
@@ -10253,7 +10529,7 @@ plt_stub_pad (struct ppc_link_hash_table
 {
   int stub_align = 1 << htab->params->plt_stub_align;
   unsigned stub_size = plt_stub_size (htab, stub_entry, plt_off);
-  bfd_vma stub_off = stub_entry->stub_sec->size;
+  bfd_vma stub_off = stub_entry->group->stub_sec->size;
 
   if (((stub_off + stub_size - 1) & -stub_align) - (stub_off & -stub_align)
       > ((stub_size - 1) & -stub_align))
@@ -10283,7 +10559,7 @@ build_plt_stub (struct ppc_link_hash_tab
       && plt_thread_safe
       && !((stub_entry->h == htab->tls_get_addr_fd
 	    || stub_entry->h == htab->tls_get_addr)
-	   && !htab->params->no_tls_get_addr_opt))
+	   && htab->params->tls_get_addr_opt))
     {
       bfd_vma pltoff = stub_entry->plt_ent->plt.offset & ~1;
       bfd_vma pltindex = ((pltoff - PLT_INITIAL_ENTRY_SIZE (htab))
@@ -10296,7 +10572,7 @@ build_plt_stub (struct ppc_link_hash_tab
       to = (glinkoff
 	    + htab->glink->output_offset
 	    + htab->glink->output_section->vma);
-      from = (p - stub_entry->stub_sec->contents
+      from = (p - stub_entry->group->stub_sec->contents
 	      + 4 * (ALWAYS_EMIT_R2SAVE
 		     || stub_entry->stub_type == ppc_stub_plt_call_r2save)
 	      + 4 * (PPC_HA (offset) != 0)
@@ -10304,8 +10580,8 @@ build_plt_stub (struct ppc_link_hash_tab
 		     != PPC_HA (offset))
 	      + 4 * (plt_static_chain != 0)
 	      + 20
-	      + stub_entry->stub_sec->output_offset
-	      + stub_entry->stub_sec->output_section->vma);
+	      + stub_entry->group->stub_sec->output_offset
+	      + stub_entry->group->stub_sec->output_section->vma);
       cmp_branch_off = to - from;
       use_fake_dep = cmp_branch_off + (1 << 25) >= (1 << 26);
     }
@@ -10518,7 +10794,7 @@ get_r2off (struct bfd_link_info *info,
 	   struct ppc_stub_hash_entry *stub_entry)
 {
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
-  bfd_vma r2off = htab->stub_group[stub_entry->target_section->id].toc_off;
+  bfd_vma r2off = htab->sec_info[stub_entry->target_section->id].toc_off;
 
   if (r2off == 0)
     {
@@ -10536,14 +10812,14 @@ get_r2off (struct bfd_link_info *info,
 	  info->callbacks->einfo (_("%P: cannot find opd entry toc for `%T'\n"),
 				  stub_entry->h->elf.root.root.string);
 	  bfd_set_error (bfd_error_bad_value);
-	  return 0;
+	  return (bfd_vma) -1;
 	}
       if (!bfd_get_section_contents (opd->owner, opd, buf, opd_off + 8, 8))
-	return 0;
+	return (bfd_vma) -1;
       r2off = bfd_get_64 (opd->owner, buf);
       r2off -= elf_gp (info->output_bfd);
     }
-  r2off -= htab->stub_group[stub_entry->id_sec->id].toc_off;
+  r2off -= htab->sec_info[stub_entry->group->link_sec->id].toc_off;
   return r2off;
 }
 
@@ -10570,8 +10846,8 @@ ppc_build_one_stub (struct bfd_hash_entr
     return FALSE;
 
   /* Make a note of the offset within the stubs for this entry.  */
-  stub_entry->stub_offset = stub_entry->stub_sec->size;
-  loc = stub_entry->stub_sec->contents + stub_entry->stub_offset;
+  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
+  loc = stub_entry->group->stub_sec->contents + stub_entry->stub_offset;
 
   htab->stub_count[stub_entry->stub_type - 1] += 1;
   switch (stub_entry->stub_type)
@@ -10587,31 +10863,36 @@ ppc_build_one_stub (struct bfd_hash_entr
 
       /* And this is where we are coming from.  */
       off -= (stub_entry->stub_offset
-	      + stub_entry->stub_sec->output_offset
-	      + stub_entry->stub_sec->output_section->vma);
+	      + stub_entry->group->stub_sec->output_offset
+	      + stub_entry->group->stub_sec->output_section->vma);
 
       size = 4;
       if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
 	{
 	  bfd_vma r2off = get_r2off (info, stub_entry);
 
-	  if (r2off == 0)
+	  if (r2off == (bfd_vma) -1)
 	    {
 	      htab->stub_error = TRUE;
 	      return FALSE;
 	    }
 	  bfd_put_32 (htab->params->stub_bfd, STD_R2_0R1 + STK_TOC (htab), loc);
 	  loc += 4;
-	  size = 12;
+	  size = 8;
 	  if (PPC_HA (r2off) != 0)
 	    {
-	      size = 16;
 	      bfd_put_32 (htab->params->stub_bfd,
 			  ADDIS_R2_R2 | PPC_HA (r2off), loc);
 	      loc += 4;
+	      size += 4;
+	    }
+	  if (PPC_LO (r2off) != 0)
+	    {
+	      bfd_put_32 (htab->params->stub_bfd,
+			  ADDI_R2_R2 | PPC_LO (r2off), loc);
+	      loc += 4;
+	      size += 4;
 	    }
-	  bfd_put_32 (htab->params->stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
-	  loc += 4;
 	  off -= size - 4;
 	}
       bfd_put_32 (htab->params->stub_bfd, B_DOT | (off & 0x3fffffc), loc);
@@ -10627,10 +10908,10 @@ ppc_build_one_stub (struct bfd_hash_entr
 
       if (info->emitrelocations)
 	{
-	  r = get_relocs (stub_entry->stub_sec, 1);
+	  r = get_relocs (stub_entry->group->stub_sec, 1);
 	  if (r == NULL)
 	    return FALSE;
-	  r->r_offset = loc - stub_entry->stub_sec->contents;
+	  r->r_offset = loc - stub_entry->group->stub_sec->contents;
 	  r->r_info = ELF64_R_INFO (0, R_PPC64_REL24);
 	  r->r_addend = dest;
 	  if (stub_entry->h != NULL)
@@ -10737,7 +11018,7 @@ ppc_build_one_stub (struct bfd_hash_entr
 
       off = (dest
 	     - elf_gp (htab->brlt->output_section->owner)
-	     - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	     - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
@@ -10751,10 +11032,10 @@ ppc_build_one_stub (struct bfd_hash_entr
 
       if (info->emitrelocations)
 	{
-	  r = get_relocs (stub_entry->stub_sec, 1 + (PPC_HA (off) != 0));
+	  r = get_relocs (stub_entry->group->stub_sec, 1 + (PPC_HA (off) != 0));
 	  if (r == NULL)
 	    return FALSE;
-	  r[0].r_offset = loc - stub_entry->stub_sec->contents;
+	  r[0].r_offset = loc - stub_entry->group->stub_sec->contents;
 	  if (bfd_big_endian (info->output_bfd))
 	    r[0].r_offset += 2;
 	  if (stub_entry->stub_type == ppc_stub_plt_branch_r2off)
@@ -10792,7 +11073,7 @@ ppc_build_one_stub (struct bfd_hash_entr
 	{
 	  bfd_vma r2off = get_r2off (info, stub_entry);
 
-	  if (r2off == 0 && htab->opd_abi)
+	  if (r2off == (bfd_vma) -1)
 	    {
 	      htab->stub_error = TRUE;
 	      return FALSE;
@@ -10843,15 +11124,11 @@ ppc_build_one_stub (struct bfd_hash_entr
 	  struct ppc_link_hash_entry *fh = ppc_follow_link (stub_entry->h->oh);
 
 	  /* If the old-ABI "dot-symbol" is undefined make it weak so
-	     we don't get a link error from RELOC_FOR_GLOBAL_SYMBOL.
-	     FIXME: We used to define the symbol on one of the call
-	     stubs instead, which is why we test symbol section id
-	     against htab->top_id in various places.  Likely all
-	     these checks could now disappear.  */
-	  if (fh->elf.root.type == bfd_link_hash_undefined)
+	     we don't get a link error from RELOC_FOR_GLOBAL_SYMBOL.  */
+	  if (fh->elf.root.type == bfd_link_hash_undefined
+	      && (stub_entry->h->elf.root.type == bfd_link_hash_defined
+		  || stub_entry->h->elf.root.type == bfd_link_hash_defweak))
 	    fh->elf.root.type = bfd_link_hash_undefweak;
-	  /* Stop undo_symbol_twiddle changing it back to undefined.  */
-	  fh->was_undefined = 0;
 	}
 
       /* Now build the stub.  */
@@ -10891,11 +11168,12 @@ ppc_build_one_stub (struct bfd_hash_entr
 
       off = (dest
 	     - elf_gp (plt->output_section->owner)
-	     - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	     - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%P: linkage table error against `%T'\n"),
 	     stub_entry->h != NULL
 	     ? stub_entry->h->elf.root.root.string
@@ -10909,15 +11187,15 @@ ppc_build_one_stub (struct bfd_hash_entr
 	{
 	  unsigned pad = plt_stub_pad (htab, stub_entry, off);
 
-	  stub_entry->stub_sec->size += pad;
-	  stub_entry->stub_offset = stub_entry->stub_sec->size;
+	  stub_entry->group->stub_sec->size += pad;
+	  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
 	  loc += pad;
 	}
 
       r = NULL;
       if (info->emitrelocations)
 	{
-	  r = get_relocs (stub_entry->stub_sec,
+	  r = get_relocs (stub_entry->group->stub_sec,
 			  ((PPC_HA (off) != 0)
 			   + (htab->opd_abi
 			      ? 2 + (htab->params->plt_static_chain
@@ -10925,7 +11203,7 @@ ppc_build_one_stub (struct bfd_hash_entr
 			      : 1)));
 	  if (r == NULL)
 	    return FALSE;
-	  r[0].r_offset = loc - stub_entry->stub_sec->contents;
+	  r[0].r_offset = loc - stub_entry->group->stub_sec->contents;
 	  if (bfd_big_endian (info->output_bfd))
 	    r[0].r_offset += 2;
 	  r[0].r_addend = dest;
@@ -10933,19 +11211,22 @@ ppc_build_one_stub (struct bfd_hash_entr
       if (stub_entry->h != NULL
 	  && (stub_entry->h == htab->tls_get_addr_fd
 	      || stub_entry->h == htab->tls_get_addr)
-	  && !htab->params->no_tls_get_addr_opt)
+	  && htab->params->tls_get_addr_opt)
 	p = build_tls_get_addr_stub (htab, stub_entry, loc, off, r);
       else
 	p = build_plt_stub (htab, stub_entry, loc, off, r);
       size = p - loc;
       break;
 
+    case ppc_stub_save_res:
+      return TRUE;
+
     default:
       BFD_FAIL ();
       return FALSE;
     }
 
-  stub_entry->stub_sec->size += size;
+  stub_entry->group->stub_sec->size += size;
 
   if (htab->params->emit_stub_syms)
     {
@@ -10973,7 +11254,7 @@ ppc_build_one_stub (struct bfd_hash_entr
       if (h->root.type == bfd_link_hash_new)
 	{
 	  h->root.type = bfd_link_hash_defined;
-	  h->root.u.def.section = stub_entry->stub_sec;
+	  h->root.u.def.section = stub_entry->group->stub_sec;
 	  h->root.u.def.value = stub_entry->stub_offset;
 	  h->ref_regular = 1;
 	  h->def_regular = 1;
@@ -11008,6 +11289,18 @@ ppc_size_one_stub (struct bfd_hash_entry
   if (htab == NULL)
     return FALSE;
 
+  if (stub_entry->h != NULL
+      && stub_entry->h->save_res
+      && stub_entry->h->elf.root.type == bfd_link_hash_defined
+      && stub_entry->h->elf.root.u.def.section == htab->sfpr)
+    {
+      /* Don't make stubs to out-of-line register save/restore
+	 functions.  Instead, emit copies of the functions.  */
+      stub_entry->group->needs_save_res = 1;
+      stub_entry->stub_type = ppc_stub_save_res;
+      return TRUE;
+    }
+
   if (stub_entry->stub_type == ppc_stub_plt_call
       || stub_entry->stub_type == ppc_stub_plt_call_r2save)
     {
@@ -11023,20 +11316,20 @@ ppc_size_one_stub (struct bfd_hash_entry
       off += (plt->output_offset
 	      + plt->output_section->vma
 	      - elf_gp (plt->output_section->owner)
-	      - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	      - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
 
       size = plt_stub_size (htab, stub_entry, off);
       if (htab->params->plt_stub_align)
 	size += plt_stub_pad (htab, stub_entry, off);
       if (info->emitrelocations)
 	{
-	  stub_entry->stub_sec->reloc_count
+	  stub_entry->group->stub_sec->reloc_count
 	    += ((PPC_HA (off) != 0)
 		+ (htab->opd_abi
 		   ? 2 + (htab->params->plt_static_chain
 			  && PPC_HA (off + 16) == PPC_HA (off))
 		   : 1));
-	  stub_entry->stub_sec->flags |= SEC_RELOC;
+	  stub_entry->group->stub_sec->flags |= SEC_RELOC;
 	}
     }
   else
@@ -11049,9 +11342,9 @@ ppc_size_one_stub (struct bfd_hash_entry
       off = (stub_entry->target_value
 	     + stub_entry->target_section->output_offset
 	     + stub_entry->target_section->output_section->vma);
-      off -= (stub_entry->stub_sec->size
-	      + stub_entry->stub_sec->output_offset
-	      + stub_entry->stub_sec->output_section->vma);
+      off -= (stub_entry->group->stub_sec->size
+	      + stub_entry->group->stub_sec->output_offset
+	      + stub_entry->group->stub_sec->output_section->vma);
 
       /* Reset the stub type from the plt variant in case we now
 	 can reach with a shorter stub.  */
@@ -11062,14 +11355,16 @@ ppc_size_one_stub (struct bfd_hash_entry
       if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
 	{
 	  r2off = get_r2off (info, stub_entry);
-	  if (r2off == 0 && htab->opd_abi)
+	  if (r2off == (bfd_vma) -1)
 	    {
 	      htab->stub_error = TRUE;
 	      return FALSE;
 	    }
-	  size = 12;
+	  size = 8;
 	  if (PPC_HA (r2off) != 0)
-	    size = 16;
+	    size += 4;
+	  if (PPC_LO (r2off) != 0)
+	    size += 4;
 	  off -= size - 4;
 	}
 
@@ -11079,7 +11374,8 @@ ppc_size_one_stub (struct bfd_hash_entry
 	 Do the same for -R objects without function descriptors.  */
       if (off + (1 << 25) >= (bfd_vma) (1 << 26) - local_off
 	  || (stub_entry->stub_type == ppc_stub_long_branch_r2off
-	      && r2off == 0))
+	      && r2off == 0
+	      && htab->sec_info[stub_entry->target_section->id].toc_off == 0))
 	{
 	  struct ppc_branch_hash_entry *br_entry;
 
@@ -11114,12 +11410,13 @@ ppc_size_one_stub (struct bfd_hash_entry
 		 + htab->brlt->output_offset
 		 + htab->brlt->output_section->vma
 		 - elf_gp (htab->brlt->output_section->owner)
-		 - htab->stub_group[stub_entry->id_sec->id].toc_off);
+		 - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
 
 	  if (info->emitrelocations)
 	    {
-	      stub_entry->stub_sec->reloc_count += 1 + (PPC_HA (off) != 0);
-	      stub_entry->stub_sec->flags |= SEC_RELOC;
+	      stub_entry->group->stub_sec->reloc_count
+		+= 1 + (PPC_HA (off) != 0);
+	      stub_entry->group->stub_sec->flags |= SEC_RELOC;
 	    }
 
 	  if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
@@ -11142,12 +11439,12 @@ ppc_size_one_stub (struct bfd_hash_entry
 	}
       else if (info->emitrelocations)
 	{
-	  stub_entry->stub_sec->reloc_count += 1;
-	  stub_entry->stub_sec->flags |= SEC_RELOC;
+	  stub_entry->group->stub_sec->reloc_count += 1;
+	  stub_entry->group->stub_sec->flags |= SEC_RELOC;
 	}
     }
 
-  stub_entry->stub_sec->size += size;
+  stub_entry->group->stub_sec->size += size;
   return TRUE;
 }
 
@@ -11158,57 +11455,22 @@ ppc_size_one_stub (struct bfd_hash_entry
 int
 ppc64_elf_setup_section_lists (struct bfd_link_info *info)
 {
-  bfd *input_bfd;
-  int top_id, top_index, id;
-  asection *section;
-  asection **input_list;
+  unsigned int id;
   bfd_size_type amt;
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
   if (htab == NULL)
     return -1;
 
-  /* Find the top input section id.  */
-  for (input_bfd = info->input_bfds, top_id = 3;
-       input_bfd != NULL;
-       input_bfd = input_bfd->link.next)
-    {
-      for (section = input_bfd->sections;
-	   section != NULL;
-	   section = section->next)
-	{
-	  if (top_id < section->id)
-	    top_id = section->id;
-	}
-    }
-
-  htab->top_id = top_id;
-  amt = sizeof (struct map_stub) * (top_id + 1);
-  htab->stub_group = bfd_zmalloc (amt);
-  if (htab->stub_group == NULL)
+  htab->sec_info_arr_size = bfd_get_next_section_id ();
+  amt = sizeof (*htab->sec_info) * (htab->sec_info_arr_size);
+  htab->sec_info = bfd_zmalloc (amt);
+  if (htab->sec_info == NULL)
     return -1;
 
   /* Set toc_off for com, und, abs and ind sections.  */
   for (id = 0; id < 3; id++)
-    htab->stub_group[id].toc_off = TOC_BASE_OFF;
-
-  /* We can't use output_bfd->section_count here to find the top output
-     section index as some sections may have been removed, and
-     strip_excluded_output_sections doesn't renumber the indices.  */
-  for (section = info->output_bfd->sections, top_index = 0;
-       section != NULL;
-       section = section->next)
-    {
-      if (top_index < section->index)
-	top_index = section->index;
-    }
-
-  htab->top_index = top_index;
-  amt = sizeof (asection *) * (top_index + 1);
-  input_list = bfd_zmalloc (amt);
-  htab->input_list = input_list;
-  if (input_list == NULL)
-    return -1;
+    htab->sec_info[id].toc_off = TOC_BASE_OFF;
 
   return 1;
 }
@@ -11452,7 +11714,7 @@ ppc64_elf_layout_multitoc (struct bfd_li
 		  htab->elf.irelplt->size += rel_size;
 		  htab->got_reli_size += rel_size;
 		}
-	      else if (info->shared)
+	      else if (bfd_link_pic (info))
 		{
 		  asection *srel = ppc64_elf_tdata (ibfd)->relgot;
 		  srel->size += rel_size;
@@ -11477,7 +11739,7 @@ ppc64_elf_layout_multitoc (struct bfd_li
 	  asection *s = ppc64_elf_tdata (ibfd)->got;
 	  ent->got.offset = s->size;
 	  s->size += 16;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      asection *srel = ppc64_elf_tdata (ibfd)->relgot;
 	      srel->size += sizeof (Elf64_External_Rela);
@@ -11757,15 +12019,13 @@ ppc64_elf_next_input_section (struct bfd
     return FALSE;
 
   if ((isec->output_section->flags & SEC_CODE) != 0
-      && isec->output_section->index <= htab->top_index)
+      && isec->output_section->id < htab->sec_info_arr_size)
     {
-      asection **list = htab->input_list + isec->output_section->index;
-      /* Steal the link_sec pointer for our list.  */
-#define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
       /* This happens to make the list in reverse order,
 	 which is what we want.  */
-      PREV_SEC (isec) = *list;
-      *list = isec;
+      htab->sec_info[isec->id].u.list
+	= htab->sec_info[isec->output_section->id].u.list;
+      htab->sec_info[isec->output_section->id].u.list = isec;
     }
 
   if (htab->multi_toc_needed)
@@ -11789,7 +12049,7 @@ ppc64_elf_next_input_section (struct bfd
 	htab->toc_curr = elf_gp (isec->owner);
     }
 
-  htab->stub_group[isec->id].toc_off = htab->toc_curr;
+  htab->sec_info[isec->id].toc_off = htab->toc_curr;
   return TRUE;
 }
 
@@ -11811,8 +12071,8 @@ check_pasted_section (struct bfd_link_in
 	if (i->has_toc_reloc)
 	  {
 	    if (toc_off == 0)
-	      toc_off = htab->stub_group[i->id].toc_off;
-	    else if (toc_off != htab->stub_group[i->id].toc_off)
+	      toc_off = htab->sec_info[i->id].toc_off;
+	    else if (toc_off != htab->sec_info[i->id].toc_off)
 	      return FALSE;
 	  }
 
@@ -11820,14 +12080,14 @@ check_pasted_section (struct bfd_link_in
 	for (i = o->map_head.s; i != NULL; i = i->map_head.s)
 	  if (i->makes_toc_func_call)
 	    {
-	      toc_off = htab->stub_group[i->id].toc_off;
+	      toc_off = htab->sec_info[i->id].toc_off;
 	      break;
 	    }
 
       /* Make sure the whole pasted function uses the same toc offset.  */
       if (toc_off != 0)
 	for (i = o->map_head.s; i != NULL; i = i->map_head.s)
-	  htab->stub_group[i->id].toc_off = toc_off;
+	  htab->sec_info[i->id].toc_off = toc_off;
     }
   return TRUE;
 }
@@ -11846,37 +12106,38 @@ ppc64_elf_check_init_fini (struct bfd_li
    _init and _fini functions into multiple parts.  Putting a stub in
    the middle of a function is not a good idea.  */
 
-static void
-group_sections (struct ppc_link_hash_table *htab,
+static bfd_boolean
+group_sections (struct bfd_link_info *info,
 		bfd_size_type stub_group_size,
 		bfd_boolean stubs_always_before_branch)
 {
-  asection **list;
-  bfd_size_type stub14_group_size;
+  struct ppc_link_hash_table *htab;
+  asection *osec;
   bfd_boolean suppress_size_errors;
 
+  htab = ppc_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
   suppress_size_errors = FALSE;
-  stub14_group_size = stub_group_size >> 10;
   if (stub_group_size == 1)
     {
       /* Default values.  */
       if (stubs_always_before_branch)
-	{
-	  stub_group_size = 0x1e00000;
-	  stub14_group_size = 0x7800;
-	}
+	stub_group_size = 0x1e00000;
       else
-	{
-	  stub_group_size = 0x1c00000;
-	  stub14_group_size = 0x7000;
-	}
+	stub_group_size = 0x1c00000;
       suppress_size_errors = TRUE;
     }
 
-  list = htab->input_list + htab->top_index;
-  do
+  for (osec = info->output_bfd->sections; osec != NULL; osec = osec->next)
     {
-      asection *tail = *list;
+      asection *tail;
+
+      if (osec->id >= htab->sec_info_arr_size)
+	continue;
+
+      tail = htab->sec_info[osec->id].u.list;
       while (tail != NULL)
 	{
 	  asection *curr;
@@ -11884,44 +12145,57 @@ group_sections (struct ppc_link_hash_tab
 	  bfd_size_type total;
 	  bfd_boolean big_sec;
 	  bfd_vma curr_toc;
+	  struct map_stub *group;
+	  bfd_size_type group_size;
 
 	  curr = tail;
 	  total = tail->size;
-	  big_sec = total > (ppc64_elf_section_data (tail) != NULL
-			     && ppc64_elf_section_data (tail)->has_14bit_branch
-			     ? stub14_group_size : stub_group_size);
+	  group_size = (ppc64_elf_section_data (tail) != NULL
+			&& ppc64_elf_section_data (tail)->has_14bit_branch
+			? stub_group_size >> 10 : stub_group_size);
+
+	  big_sec = total > group_size;
 	  if (big_sec && !suppress_size_errors)
-	    (*_bfd_error_handler) (_("%B section %A exceeds stub group size"),
-				     tail->owner, tail);
-	  curr_toc = htab->stub_group[tail->id].toc_off;
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("%B section %A exceeds stub group size"),
+				tail->owner, tail);
+	  curr_toc = htab->sec_info[tail->id].toc_off;
 
-	  while ((prev = PREV_SEC (curr)) != NULL
+	  while ((prev = htab->sec_info[curr->id].u.list) != NULL
 		 && ((total += curr->output_offset - prev->output_offset)
 		     < (ppc64_elf_section_data (prev) != NULL
 			&& ppc64_elf_section_data (prev)->has_14bit_branch
-			? stub14_group_size : stub_group_size))
-		 && htab->stub_group[prev->id].toc_off == curr_toc)
+			? (group_size = stub_group_size >> 10) : group_size))
+		 && htab->sec_info[prev->id].toc_off == curr_toc)
 	    curr = prev;
 
 	  /* OK, the size from the start of CURR to the end is less
-	     than stub_group_size and thus can be handled by one stub
+	     than group_size and thus can be handled by one stub
 	     section.  (or the tail section is itself larger than
-	     stub_group_size, in which case we may be toast.)  We
-	     should really be keeping track of the total size of stubs
-	     added here, as stubs contribute to the final output
-	     section size.  That's a little tricky, and this way will
-	     only break if stubs added make the total size more than
-	     2^25, ie. for the default stub_group_size, if stubs total
-	     more than 2097152 bytes, or nearly 75000 plt call stubs.  */
+	     group_size, in which case we may be toast.)  We should
+	     really be keeping track of the total size of stubs added
+	     here, as stubs contribute to the final output section
+	     size.  That's a little tricky, and this way will only
+	     break if stubs added make the total size more than 2^25,
+	     ie. for the default stub_group_size, if stubs total more
+	     than 2097152 bytes, or nearly 75000 plt call stubs.  */
+	  group = bfd_alloc (curr->owner, sizeof (*group));
+	  if (group == NULL)
+	    return FALSE;
+	  group->link_sec = curr;
+	  group->stub_sec = NULL;
+	  group->needs_save_res = 0;
+	  group->next = htab->group;
+	  htab->group = group;
 	  do
 	    {
-	      prev = PREV_SEC (tail);
+	      prev = htab->sec_info[tail->id].u.list;
 	      /* Set up this stub group.  */
-	      htab->stub_group[tail->id].link_sec = curr;
+	      htab->sec_info[tail->id].u.group = group;
 	    }
 	  while (tail != curr && (tail = prev) != NULL);
 
-	  /* But wait, there's more!  Input sections up to stub_group_size
+	  /* But wait, there's more!  Input sections up to group_size
 	     bytes before the stub section can be handled by it too.
 	     Don't do this if we have a really large section after the
 	     stubs, as adding more stubs increases the chance that
@@ -11933,20 +12207,18 @@ group_sections (struct ppc_link_hash_tab
 		     && ((total += tail->output_offset - prev->output_offset)
 			 < (ppc64_elf_section_data (prev) != NULL
 			    && ppc64_elf_section_data (prev)->has_14bit_branch
-			    ? stub14_group_size : stub_group_size))
-		     && htab->stub_group[prev->id].toc_off == curr_toc)
+			    ? (group_size = stub_group_size >> 10) : group_size))
+		     && htab->sec_info[prev->id].toc_off == curr_toc)
 		{
 		  tail = prev;
-		  prev = PREV_SEC (tail);
-		  htab->stub_group[tail->id].link_sec = curr;
+		  prev = htab->sec_info[tail->id].u.list;
+		  htab->sec_info[tail->id].u.group = group;
 		}
 	    }
 	  tail = prev;
 	}
     }
-  while (list-- != htab->input_list);
-  free (htab->input_list);
-#undef PREV_SEC
+  return TRUE;
 }
 
 static const unsigned char glink_eh_frame_cie[] =
@@ -11960,8 +12232,7 @@ static const unsigned char glink_eh_fram
   65,					/* RA reg.  */
   1,					/* Augmentation size.  */
   DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding.  */
-  DW_CFA_def_cfa, 1, 0,			/* def_cfa: r1 offset 0.  */
-  0, 0, 0, 0
+  DW_CFA_def_cfa, 1, 0			/* def_cfa: r1 offset 0.  */
 };
 
 /* Stripping output sections is normally done before dynamic section
@@ -12001,7 +12272,7 @@ ppc64_elf_size_stubs (struct bfd_link_in
   if (htab == NULL)
     return FALSE;
 
-  if (htab->params->plt_thread_safe == -1 && !info->executable)
+  if (htab->params->plt_thread_safe == -1 && !bfd_link_executable (info))
     htab->params->plt_thread_safe = 1;
   if (!htab->opd_abi)
     htab->params->plt_thread_safe = 0;
@@ -12035,7 +12306,7 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	};
       unsigned i;
 
-      for (i = 0; i < sizeof (thread_starter)/ sizeof (thread_starter[0]); i++)
+      for (i = 0; i < ARRAY_SIZE (thread_starter); i++)
 	{
 	  struct elf_link_hash_entry *h;
 	  h = elf_link_hash_lookup (&htab->elf, thread_starter[i],
@@ -12051,12 +12322,21 @@ ppc64_elf_size_stubs (struct bfd_link_in
   else
     stub_group_size = htab->params->group_size;
 
-  group_sections (htab, stub_group_size, stubs_always_before_branch);
+  if (!group_sections (info, stub_group_size, stubs_always_before_branch))
+    return FALSE;
+
+#define STUB_SHRINK_ITER 20
+  /* Loop until no stubs added.  After iteration 20 of this loop we may
+     exit on a stub section shrinking.  This is to break out of a
+     pathological case where adding stubs on one iteration decreases
+     section gaps (perhaps due to alignment), which then requires
+     fewer or smaller stubs on the next iteration.  */
 
   while (1)
     {
       bfd *input_bfd;
       unsigned int bfd_indx;
+      struct map_stub *group;
       asection *stub_sec;
 
       htab->stub_iteration += 1;
@@ -12158,7 +12438,9 @@ ppc64_elf_size_stubs (struct bfd_link_in
 		  if (hash == NULL)
 		    {
 		      sym_value = sym->st_value;
-		      ok_dest = TRUE;
+		      if (sym_sec != NULL
+			  && sym_sec->output_section != NULL)
+			ok_dest = TRUE;
 		    }
 		  else if (hash->elf.root.type == bfd_link_hash_defined
 			   || hash->elf.root.type == bfd_link_hash_defweak)
@@ -12174,8 +12456,9 @@ ppc64_elf_size_stubs (struct bfd_link_in
 			 use the func descriptor sym instead if it is
 			 defined.  */
 		      if (hash->elf.root.root.string[0] == '.'
-			  && (fdh = lookup_fdh (hash, htab)) != NULL)
+			  && hash->oh != NULL)
 			{
+			  fdh = ppc_follow_link (hash->oh);
 			  if (fdh->elf.root.type == bfd_link_hash_defined
 			      || fdh->elf.root.type == bfd_link_hash_defweak)
 			    {
@@ -12254,8 +12537,8 @@ ppc64_elf_size_stubs (struct bfd_link_in
 			 fact a call needing a TOC adjustment.  */
 		      if (code_sec != NULL
 			  && code_sec->output_section != NULL
-			  && (htab->stub_group[code_sec->id].toc_off
-			      != htab->stub_group[section->id].toc_off)
+			  && (htab->sec_info[code_sec->id].toc_off
+			      != htab->sec_info[section->id].toc_off)
 			  && (code_sec->has_toc_reloc
 			      || code_sec->makes_toc_func_call))
 			stub_type = ppc_stub_long_branch_r2off;
@@ -12295,7 +12578,7 @@ ppc64_elf_size_stubs (struct bfd_link_in
 		    stub_type = ppc_stub_plt_call_r2save;
 
 		  /* Support for grouping stub sections.  */
-		  id_sec = htab->stub_group[section->id].link_sec;
+		  id_sec = htab->sec_info[section->id].u.group->link_sec;
 
 		  /* Get the name of this stub.  */
 		  stub_name = ppc_stub_name (id_sec, sym_sec, hash, irela);
@@ -12370,7 +12653,10 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	   stub_sec = stub_sec->next)
 	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
 	  {
-	    stub_sec->rawsize = stub_sec->size;
+	    if (htab->stub_iteration <= STUB_SHRINK_ITER
+		|| stub_sec->rawsize < stub_sec->size)
+	      /* Past STUB_SHRINK_ITER, rawsize is the max size seen.  */
+	      stub_sec->rawsize = stub_sec->size;
 	    stub_sec->size = 0;
 	    stub_sec->reloc_count = 0;
 	    stub_sec->flags &= ~SEC_RELOC;
@@ -12384,6 +12670,10 @@ ppc64_elf_size_stubs (struct bfd_link_in
 
       bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, info);
 
+      for (group = htab->group; group != NULL; group = group->next)
+	if (group->needs_save_res)
+	  group->stub_sec->size += htab->sfpr->size;
+
       if (info->emitrelocations
 	  && htab->glink != NULL && htab->glink->size != 0)
 	{
@@ -12395,21 +12685,19 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	  && !bfd_is_abs_section (htab->glink_eh_frame->output_section)
 	  && htab->glink_eh_frame->output_section->size != 0)
 	{
-	  size_t size = 0, align;
+	  size_t size = 0, align = 4;
 
 	  for (stub_sec = htab->params->stub_bfd->sections;
 	       stub_sec != NULL;
 	       stub_sec = stub_sec->next)
 	    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
-	      size += 24;
+	      size += (17 + align - 1) & -align;
 	  if (htab->glink != NULL && htab->glink->size != 0)
-	    size += 24;
+	    size += (24 + align - 1) & -align;
 	  if (size != 0)
-	    size += sizeof (glink_eh_frame_cie);
-	  align = 1;
-	  align <<= htab->glink_eh_frame->output_section->alignment_power;
-	  align -= 1;
-	  size = (size + align) & ~align;
+	    size += (sizeof (glink_eh_frame_cie) + align - 1) & -align;
+	  align = 1ul << htab->glink_eh_frame->output_section->alignment_power;
+	  size = (size + align - 1) & -align;
 	  htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
 	  htab->glink_eh_frame->size = size;
 	}
@@ -12421,17 +12709,17 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	  if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
 	    stub_sec->size = ((stub_sec->size
 			       + (1 << htab->params->plt_stub_align) - 1)
-			      & (-1 << htab->params->plt_stub_align));
+			      & -(1 << htab->params->plt_stub_align));
 
       for (stub_sec = htab->params->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
 	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0
-	    && stub_sec->rawsize != stub_sec->size)
+	    && stub_sec->rawsize != stub_sec->size
+	    && (htab->stub_iteration <= STUB_SHRINK_ITER
+		|| stub_sec->rawsize < stub_sec->size))
 	  break;
 
-      /* Exit from this loop when no stubs have been added, and no stubs
-	 have changed size.  */
       if (stub_sec == NULL
 	  && (htab->glink_eh_frame == NULL
 	      || htab->glink_eh_frame->rawsize == htab->glink_eh_frame->size))
@@ -12454,12 +12742,13 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	return FALSE;
       htab->glink_eh_frame->contents = p;
       last_fde = p;
+      align = 4;
 
       memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
       /* CIE length (rewrite in case little-endian).  */
-      last_fde_len = sizeof (glink_eh_frame_cie) - 4;
+      last_fde_len = ((sizeof (glink_eh_frame_cie) + align - 1) & -align) - 4;
       bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
-      p += sizeof (glink_eh_frame_cie);
+      p += last_fde_len + 4;
 
       for (stub_sec = htab->params->stub_bfd->sections;
 	   stub_sec != NULL;
@@ -12467,9 +12756,9 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
 	  {
 	    last_fde = p;
-	    last_fde_len = 20;
+	    last_fde_len = ((17 + align - 1) & -align) - 4;
 	    /* FDE length.  */
-	    bfd_put_32 (htab->elf.dynobj, 20, p);
+	    bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
 	    p += 4;
 	    /* CIE pointer.  */
 	    val = p - htab->glink_eh_frame->contents;
@@ -12483,14 +12772,14 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	    /* Augmentation.  */
 	    p += 1;
 	    /* Pad.  */
-	    p += 7;
+	    p += ((17 + align - 1) & -align) - 17;
 	  }
       if (htab->glink != NULL && htab->glink->size != 0)
 	{
 	  last_fde = p;
-	  last_fde_len = 20;
+	  last_fde_len = ((24 + align - 1) & -align) - 4;
 	  /* FDE length.  */
-	  bfd_put_32 (htab->elf.dynobj, 20, p);
+	  bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
 	  p += 4;
 	  /* CIE pointer.  */
 	  val = p - htab->glink_eh_frame->contents;
@@ -12507,19 +12796,18 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	  *p++ = DW_CFA_advance_loc + 1;
 	  *p++ = DW_CFA_register;
 	  *p++ = 65;
-	  *p++ = 12;
+	  *p++ = htab->opd_abi ? 12 : 0;
 	  *p++ = DW_CFA_advance_loc + 4;
 	  *p++ = DW_CFA_restore_extended;
 	  *p++ = 65;
+	  p += ((24 + align - 1) & -align) - 24;
 	}
       /* Subsume any padding into the last FDE if user .eh_frame
 	 sections are aligned more than glink_eh_frame.  Otherwise any
 	 zero padding will be seen as a terminator.  */
+      align = 1ul << htab->glink_eh_frame->output_section->alignment_power;
       size = p - htab->glink_eh_frame->contents;
-      align = 1;
-      align <<= htab->glink_eh_frame->output_section->alignment_power;
-      align -= 1;
-      pad = ((size + align) & ~align) - size;
+      pad = ((size + align - 1) & -align) - size;
       htab->glink_eh_frame->size = size + pad;
       bfd_put_32 (htab->elf.dynobj, last_fde_len + pad, last_fde);
     }
@@ -12540,6 +12828,34 @@ ppc64_elf_set_toc (struct bfd_link_info 
   asection *s;
   bfd_vma TOCstart, adjust;
 
+  if (info != NULL)
+    {
+      struct elf_link_hash_entry *h;
+      struct elf_link_hash_table *htab = elf_hash_table (info);
+
+      if (is_elf_hash_table (htab)
+	  && htab->hgot != NULL)
+	h = htab->hgot;
+      else
+	{
+	  h = elf_link_hash_lookup (htab, ".TOC.", FALSE, FALSE, TRUE);
+	  if (is_elf_hash_table (htab))
+	    htab->hgot = h;
+	}
+      if (h != NULL
+	  && h->root.type == bfd_link_hash_defined
+	  && !h->root.linker_def
+	  && (!is_elf_hash_table (htab)
+	      || h->def_regular))
+	{
+	  TOCstart = (h->root.u.def.value - TOC_BASE_OFF
+		      + h->root.u.def.section->output_offset
+		      + h->root.u.def.section->output_section->vma);
+	  _bfd_set_gp_value (obfd, TOCstart);
+	  return TOCstart;
+	}
+    }
+
   /* The TOC consists of sections .got, .toc, .tocbss, .plt in that
      order.  The TOC starts where the first of these sections starts.  */
   s = bfd_get_section_by_name (obfd, ".got");
@@ -12716,6 +13032,7 @@ ppc64_elf_build_stubs (struct bfd_link_i
 		       char **stats)
 {
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
+  struct map_stub *group;
   asection *stub_sec;
   bfd_byte *p;
   int stub_sec_count = 0;
@@ -12733,9 +13050,6 @@ ppc64_elf_build_stubs (struct bfd_link_i
 	stub_sec->contents = bfd_zalloc (htab->params->stub_bfd, stub_sec->size);
 	if (stub_sec->contents == NULL)
 	  return FALSE;
-	/* We want to check that built size is the same as calculated
-	   size.  rawsize is a convenient location to use.  */
-	stub_sec->rawsize = stub_sec->size;
 	stub_sec->size = 0;
       }
 
@@ -12889,6 +13203,23 @@ ppc64_elf_build_stubs (struct bfd_link_i
   /* Build the stubs as directed by the stub hash table.  */
   bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
 
+  for (group = htab->group; group != NULL; group = group->next)
+    if (group->needs_save_res)
+      {
+	stub_sec = group->stub_sec;
+	memcpy (stub_sec->contents + stub_sec->size, htab->sfpr->contents,
+		htab->sfpr->size);
+	if (htab->params->emit_stub_syms)
+	  {
+	    unsigned int i;
+
+	    for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
+	      if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
+		return FALSE;
+	  }
+	stub_sec->size += htab->sfpr->size;
+      }
+
   if (htab->relbrlt != NULL)
     htab->relbrlt->reloc_count = 0;
 
@@ -12899,7 +13230,7 @@ ppc64_elf_build_stubs (struct bfd_link_i
       if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
 	stub_sec->size = ((stub_sec->size
 			   + (1 << htab->params->plt_stub_align) - 1)
-			  & (-1 << htab->params->plt_stub_align));
+			  & -(1 << htab->params->plt_stub_align));
 
   for (stub_sec = htab->params->stub_bfd->sections;
        stub_sec != NULL;
@@ -12907,7 +13238,9 @@ ppc64_elf_build_stubs (struct bfd_link_i
     if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
       {
 	stub_sec_count += 1;
-	if (stub_sec->rawsize != stub_sec->size)
+	if (stub_sec->rawsize != stub_sec->size
+	    && (htab->stub_iteration <= STUB_SHRINK_ITER
+		|| stub_sec->rawsize < stub_sec->size))
 	  break;
       }
 
@@ -12952,33 +13285,6 @@ ppc64_elf_build_stubs (struct bfd_link_i
   return TRUE;
 }
 
-/* This function undoes the changes made by add_symbol_adjust.  */
-
-static bfd_boolean
-undo_symbol_twiddle (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
-{
-  struct ppc_link_hash_entry *eh;
-
-  if (h->root.type == bfd_link_hash_indirect)
-    return TRUE;
-
-  eh = (struct ppc_link_hash_entry *) h;
-  if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
-    return TRUE;
-
-  eh->elf.root.type = bfd_link_hash_undefined;
-  return TRUE;
-}
-
-void
-ppc64_elf_restore_symbols (struct bfd_link_info *info)
-{
-  struct ppc_link_hash_table *htab = ppc_hash_table (info);
-
-  if (htab != NULL)
-    elf_link_hash_traverse (&htab->elf, undo_symbol_twiddle, info);
-}
-
 /* What to do when ld finds relocations against symbols defined in
    discarded sections.  */
 
@@ -13040,6 +13346,7 @@ ppc64_elf_relocate_section (bfd *output_
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *wrel;
   Elf_Internal_Rela *relend;
   Elf_Internal_Rela outrel;
   bfd_byte *loc;
@@ -13049,7 +13356,7 @@ ppc64_elf_relocate_section (bfd *output_
   bfd_boolean is_opd;
   /* Assume 'at' branch hints.  */
   bfd_boolean is_isa_v2 = TRUE;
-  bfd_vma d_offset = (bfd_big_endian (output_bfd) ? 2 : 0);
+  bfd_vma d_offset = (bfd_big_endian (input_bfd) ? 2 : 0);
 
   /* Initialize howto table if needed.  */
   if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
@@ -13071,9 +13378,9 @@ ppc64_elf_relocate_section (bfd *output_
   sym_hashes = elf_sym_hashes (input_bfd);
   is_opd = ppc64_elf_section_data (input_section)->sec_type == sec_opd;
 
-  rel = relocs;
+  rel = wrel = relocs;
   relend = relocs + input_section->reloc_count;
-  for (; rel < relend; rel++)
+  for (; rel < relend; wrel++, rel++)
     {
       enum elf_ppc64_reloc_type r_type;
       bfd_vma addend;
@@ -13097,10 +13404,13 @@ ppc64_elf_relocate_section (bfd *output_
       struct ppc_stub_hash_entry *stub_entry;
       bfd_vma max_br_offset;
       bfd_vma from;
-      const Elf_Internal_Rela orig_rel = *rel;
+      Elf_Internal_Rela orig_rel;
       reloc_howto_type *howto;
       struct reloc_howto_struct alt_howto;
 
+    again:
+      orig_rel = *rel;
+
       r_type = ELF64_R_TYPE (rel->r_info);
       r_symndx = ELF64_R_SYM (rel->r_info);
 
@@ -13108,10 +13418,10 @@ ppc64_elf_relocate_section (bfd *output_
 	 symbol of the previous ADDR64 reloc.  The symbol gives us the
 	 proper TOC base to use.  */
       if (rel->r_info == ELF64_R_INFO (0, R_PPC64_TOC)
-	  && rel != relocs
-	  && ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_ADDR64
+	  && wrel != relocs
+	  && ELF64_R_TYPE (wrel[-1].r_info) == R_PPC64_ADDR64
 	  && is_opd)
-	r_symndx = ELF64_R_SYM (rel[-1].r_info);
+	r_symndx = ELF64_R_SYM (wrel[-1].r_info);
 
       sym = NULL;
       sec = NULL;
@@ -13192,18 +13502,31 @@ ppc64_elf_relocate_section (bfd *output_
       h = (struct ppc_link_hash_entry *) h_elf;
 
       if (sec != NULL && discarded_section (sec))
-	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-					 rel, 1, relend,
-					 ppc64_elf_howto_table[r_type], 0,
-					 contents);
+	{
+	  _bfd_clear_contents (ppc64_elf_howto_table[r_type],
+			       input_bfd, input_section,
+			       contents + rel->r_offset);
+	  wrel->r_offset = rel->r_offset;
+	  wrel->r_info = 0;
+	  wrel->r_addend = 0;
+
+	  /* For ld -r, remove relocations in debug sections against
+	     sections defined in discarded sections.  Not done for
+	     non-debug to preserve relocs in .eh_frame which the
+	     eh_frame editing code expects to be present.  */
+	  if (bfd_link_relocatable (info)
+	      && (input_section->flags & SEC_DEBUGGING))
+	    wrel--;
 
-      if (info->relocatable)
-	continue;
+	  continue;
+	}
+
+      if (bfd_link_relocatable (info))
+	goto copy_reloc;
 
       if (h != NULL && &h->elf == htab->elf.hgot)
 	{
-	  relocation = (TOCstart
-			+ htab->stub_group[input_section->id].toc_off);
+	  relocation = TOCstart + htab->sec_info[input_section->id].toc_off;
 	  sec = bfd_abs_section_ptr;
 	  unresolved_reloc = FALSE;
 	}
@@ -13262,8 +13585,10 @@ ppc64_elf_relocate_section (bfd *output_
 	  else
 	    info->callbacks->einfo
 	      (!IS_PPC64_TLS_RELOC (r_type)
-	       ? _("%P: %H: %s used with TLS symbol `%T'\n")
-	       : _("%P: %H: %s used with non-TLS symbol `%T'\n"),
+	       /* xgettext:c-format */
+	       ? _("%H: %s used with TLS symbol `%T'\n")
+	       /* xgettext:c-format */
+	       : _("%H: %s used with non-TLS symbol `%T'\n"),
 	       input_bfd, input_section, rel->r_offset,
 	       ppc64_elf_howto_table[r_type]->name,
 	       sym_name);
@@ -13288,11 +13613,11 @@ ppc64_elf_relocate_section (bfd *output_
 	  break;
 
 	case R_PPC64_LO_DS_OPT:
-	  insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
+	  insn = bfd_get_32 (input_bfd, contents + rel->r_offset - d_offset);
 	  if ((insn & (0x3f << 26)) != 58u << 26)
 	    abort ();
 	  insn += (14u << 26) - (58u << 26);
-	  bfd_put_32 (output_bfd, insn, contents + rel->r_offset - d_offset);
+	  bfd_put_32 (input_bfd, insn, contents + rel->r_offset - d_offset);
 	  r_type = R_PPC64_TOC16_LO;
 	  rel->r_info = ELF64_R_INFO (r_symndx, r_type);
 	  break;
@@ -13347,7 +13672,7 @@ ppc64_elf_relocate_section (bfd *output_
 	      && (tls_mask & TLS_TPREL) == 0)
 	    {
 	      rel->r_offset -= d_offset;
-	      bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+	      bfd_put_32 (input_bfd, NOP, contents + rel->r_offset);
 	      r_type = R_PPC64_NONE;
 	      rel->r_info = ELF64_R_INFO (r_symndx, r_type);
 	    }
@@ -13359,10 +13684,12 @@ ppc64_elf_relocate_section (bfd *output_
 	      && (tls_mask & TLS_TPREL) == 0)
 	    {
 	    toctprel:
-	      insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
+	      insn = bfd_get_32 (input_bfd,
+				 contents + rel->r_offset - d_offset);
 	      insn &= 31 << 21;
 	      insn |= 0x3c0d0000;	/* addis 0,13,0 */
-	      bfd_put_32 (output_bfd, insn, contents + rel->r_offset - d_offset);
+	      bfd_put_32 (input_bfd, insn,
+			  contents + rel->r_offset - d_offset);
 	      r_type = R_PPC64_TPREL16_HA;
 	      if (toc_symndx != 0)
 		{
@@ -13370,8 +13697,7 @@ ppc64_elf_relocate_section (bfd *output_
 		  rel->r_addend = toc_addend;
 		  /* We changed the symbol.  Start over in order to
 		     get h, sym, sec etc. right.  */
-		  rel--;
-		  continue;
+		  goto again;
 		}
 	      else
 		rel->r_info = ELF64_R_INFO (r_symndx, r_type);
@@ -13382,11 +13708,11 @@ ppc64_elf_relocate_section (bfd *output_
 	  if (tls_mask != 0
 	      && (tls_mask & TLS_TPREL) == 0)
 	    {
-	      insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 	      insn = _bfd_elf_ppc_at_tls_transform (insn, 13);
 	      if (insn == 0)
 		abort ();
-	      bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 	      /* Was PPC64_TLS which sits on insn boundary, now
 		 PPC64_TPREL16_LO which is at low-order half-word.  */
 	      rel->r_offset += d_offset;
@@ -13397,8 +13723,7 @@ ppc64_elf_relocate_section (bfd *output_
 		  rel->r_addend = toc_addend;
 		  /* We changed the symbol.  Start over in order to
 		     get h, sym, sec etc. right.  */
-		  rel--;
-		  continue;
+		  goto again;
 		}
 	      else
 		rel->r_info = ELF64_R_INFO (r_symndx, r_type);
@@ -13423,7 +13748,7 @@ ppc64_elf_relocate_section (bfd *output_
 	      else
 		{
 		  rel->r_offset -= d_offset;
-		  bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+		  bfd_put_32 (input_bfd, NOP, contents + rel->r_offset);
 		  r_type = R_PPC64_NONE;
 		}
 	      rel->r_info = ELF64_R_INFO (r_symndx, r_type);
@@ -13461,7 +13786,7 @@ ppc64_elf_relocate_section (bfd *output_
 		 need to keep the destination reg.  It may be
 		 something other than the usual r3, and moved to r3
 		 before the call by intervening code.  */
-	      insn1 = bfd_get_32 (output_bfd,
+	      insn1 = bfd_get_32 (input_bfd,
 				  contents + rel->r_offset - d_offset);
 	      if ((tls_mask & tls_gd) != 0)
 		{
@@ -13517,28 +13842,27 @@ ppc64_elf_relocate_section (bfd *output_
 		      rel[1].r_addend = rel->r_addend;
 		    }
 		}
-	      bfd_put_32 (output_bfd, insn1,
+	      bfd_put_32 (input_bfd, insn1,
 			  contents + rel->r_offset - d_offset);
 	      if (offset != (bfd_vma) -1)
 		{
-		  insn3 = bfd_get_32 (output_bfd,
+		  insn3 = bfd_get_32 (input_bfd,
 				      contents + offset + 4);
 		  if (insn3 == NOP
 		      || insn3 == CROR_151515 || insn3 == CROR_313131)
 		    {
 		      rel[1].r_offset += 4;
-		      bfd_put_32 (output_bfd, insn2, contents + offset + 4);
+		      bfd_put_32 (input_bfd, insn2, contents + offset + 4);
 		      insn2 = NOP;
 		    }
-		  bfd_put_32 (output_bfd, insn2, contents + offset);
+		  bfd_put_32 (input_bfd, insn2, contents + offset);
 		}
 	      if ((tls_mask & tls_gd) == 0
 		  && (tls_gd == 0 || toc_symndx != 0))
 		{
 		  /* We changed the symbol.  Start over in order
 		     to get h, sym, sec etc. right.  */
-		  rel--;
-		  continue;
+		  goto again;
 		}
 	    }
 	  break;
@@ -13571,21 +13895,18 @@ ppc64_elf_relocate_section (bfd *output_
 	      /* Zap the reloc on the _tls_get_addr call too.  */
 	      BFD_ASSERT (offset == rel[1].r_offset);
 	      rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE);
-	      insn3 = bfd_get_32 (output_bfd,
+	      insn3 = bfd_get_32 (input_bfd,
 				  contents + offset + 4);
 	      if (insn3 == NOP
 		  || insn3 == CROR_151515 || insn3 == CROR_313131)
 		{
 		  rel->r_offset += 4;
-		  bfd_put_32 (output_bfd, insn2, contents + offset + 4);
+		  bfd_put_32 (input_bfd, insn2, contents + offset + 4);
 		  insn2 = NOP;
 		}
-	      bfd_put_32 (output_bfd, insn2, contents + offset);
+	      bfd_put_32 (input_bfd, insn2, contents + offset);
 	      if ((tls_mask & TLS_TPRELGD) == 0 && toc_symndx != 0)
-		{
-		  rel--;
-		  continue;
-		}
+		goto again;
 	    }
 	  break;
 
@@ -13617,18 +13938,17 @@ ppc64_elf_relocate_section (bfd *output_
 	      BFD_ASSERT (offset == rel[1].r_offset);
 	      rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE);
 	      insn2 = 0x38630000;	/* addi 3,3,0 */
-	      insn3 = bfd_get_32 (output_bfd,
+	      insn3 = bfd_get_32 (input_bfd,
 				  contents + offset + 4);
 	      if (insn3 == NOP
 		  || insn3 == CROR_151515 || insn3 == CROR_313131)
 		{
 		  rel->r_offset += 4;
-		  bfd_put_32 (output_bfd, insn2, contents + offset + 4);
+		  bfd_put_32 (input_bfd, insn2, contents + offset + 4);
 		  insn2 = NOP;
 		}
-	      bfd_put_32 (output_bfd, insn2, contents + offset);
-	      rel--;
-	      continue;
+	      bfd_put_32 (input_bfd, insn2, contents + offset);
+	      goto again;
 	    }
 	  break;
 
@@ -13669,6 +13989,52 @@ ppc64_elf_relocate_section (bfd *output_
 	    }
 	  break;
 
+	case R_PPC64_ENTRY:
+	  relocation = TOCstart + htab->sec_info[input_section->id].toc_off;
+	  if (!bfd_link_pic (info)
+	      && !info->traditional_format
+	      && relocation + 0x80008000 <= 0xffffffff)
+	    {
+	      unsigned int insn1, insn2;
+
+	      insn1 = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      insn2 = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+	      if ((insn1 & ~0xfffc) == LD_R2_0R12
+		  && insn2 == ADD_R2_R2_R12)
+		{
+		  bfd_put_32 (input_bfd,
+			      LIS_R2 + PPC_HA (relocation),
+			      contents + rel->r_offset);
+		  bfd_put_32 (input_bfd,
+			      ADDI_R2_R2 + PPC_LO (relocation),
+			      contents + rel->r_offset + 4);
+		}
+	    }
+	  else
+	    {
+	      relocation -= (rel->r_offset
+			     + input_section->output_offset
+			     + input_section->output_section->vma);
+	      if (relocation + 0x80008000 <= 0xffffffff)
+		{
+		  unsigned int insn1, insn2;
+
+		  insn1 = bfd_get_32 (input_bfd, contents + rel->r_offset);
+		  insn2 = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+		  if ((insn1 & ~0xfffc) == LD_R2_0R12
+		      && insn2 == ADD_R2_R2_R12)
+		    {
+		      bfd_put_32 (input_bfd,
+				  ADDIS_R2_R12 + PPC_HA (relocation),
+				  contents + rel->r_offset);
+		      bfd_put_32 (input_bfd,
+				  ADDI_R2_R2 + PPC_LO (relocation),
+				  contents + rel->r_offset + 4);
+		    }
+		}
+	    }
+	  break;
+
 	case R_PPC64_REL16_HA:
 	  /* If we are generating a non-PIC executable, edit
 	     .	0:	addis 2,12,.TOC.-0b@ha
@@ -13677,8 +14043,10 @@ ppc64_elf_relocate_section (bfd *output_
 	     .		lis 2,.TOC.@ha
 	     .		addi 2,2,.TOC.@l
 	     if .TOC. is in range.  */
-	  if (!info->shared
+	  if (!bfd_link_pic (info)
 	      && !info->traditional_format
+	      && !htab->opd_abi
+	      && rel->r_addend == d_offset
 	      && h != NULL && &h->elf == htab->elf.hgot
 	      && rel + 1 < relend
 	      && rel[1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_REL16_LO)
@@ -13688,17 +14056,17 @@ ppc64_elf_relocate_section (bfd *output_
 	    {
 	      unsigned int insn1, insn2;
 	      bfd_vma offset = rel->r_offset - d_offset;
-	      insn1 = bfd_get_32 (output_bfd, contents + offset);
-	      insn2 = bfd_get_32 (output_bfd, contents + offset + 4);
-	      if ((insn1 & 0xffff0000) == 0x3c4c0000 /* addis 2,12 */
-		  && (insn2 & 0xffff0000) == 0x38420000 /* addi 2,2 */)
+	      insn1 = bfd_get_32 (input_bfd, contents + offset);
+	      insn2 = bfd_get_32 (input_bfd, contents + offset + 4);
+	      if ((insn1 & 0xffff0000) == ADDIS_R2_R12
+		  && (insn2 & 0xffff0000) == ADDI_R2_R2)
 		{
 		  r_type = R_PPC64_ADDR16_HA;
 		  rel->r_info = ELF64_R_INFO (r_symndx, r_type);
 		  rel->r_addend -= d_offset;
 		  rel[1].r_info = ELF64_R_INFO (r_symndx, R_PPC64_ADDR16_LO);
 		  rel[1].r_addend -= d_offset + 4;
-		  bfd_put_32 (output_bfd, 0x3c400000, contents + offset);
+		  bfd_put_32 (input_bfd, LIS_R2, contents + offset);
 		}
 	    }
 	  break;
@@ -13734,18 +14102,18 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_ADDR14_BRTAKEN:
 	case R_PPC64_REL14_BRTAKEN:
 	  insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field.  */
-	  /* Fall thru.  */
+	  /* Fall through.  */
 
 	  /* Branch not taken prediction relocations.  */
 	case R_PPC64_ADDR14_BRNTAKEN:
 	case R_PPC64_REL14_BRNTAKEN:
-	  insn |= bfd_get_32 (output_bfd,
+	  insn |= bfd_get_32 (input_bfd,
 			      contents + rel->r_offset) & ~(0x01 << 21);
-	  /* Fall thru.  */
+	  /* Fall through.  */
 
 	case R_PPC64_REL14:
 	  max_br_offset = 1 << 15;
-	  /* Fall thru.  */
+	  /* Fall through.  */
 
 	case R_PPC64_REL24:
 	  /* Calls to functions with a different TOC, such as calls to
@@ -13790,7 +14158,7 @@ ppc64_elf_relocate_section (bfd *output_
 			  if (h != NULL
 			      && (h == htab->tls_get_addr_fd
 				  || h == htab->tls_get_addr)
-			      && !htab->params->no_tls_get_addr_opt)
+			      && htab->params->tls_get_addr_opt)
 			    {
 			      /* Special stub used, leave nop alone.  */
 			    }
@@ -13849,12 +14217,14 @@ ppc64_elf_relocate_section (bfd *output_
 		  if (stub_entry->stub_type == ppc_stub_plt_call
 		      || stub_entry->stub_type == ppc_stub_plt_call_r2save)
 		    info->callbacks->einfo
-		      (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
+		      /* xgettext:c-format */
+		      (_("%H: call to `%T' lacks nop, can't restore toc; "
 			 "recompile with -fPIC\n"),
 		       input_bfd, input_section, rel->r_offset, sym_name);
 		  else
 		    info->callbacks->einfo
-		      (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
+		      /* xgettext:c-format */
+		      (_("%H: call to `%T' lacks nop, can't restore toc; "
 			 "(-mcmodel=small toc adjust stub)\n"),
 		       input_bfd, input_section, rel->r_offset, sym_name);
 
@@ -13910,9 +14280,18 @@ ppc64_elf_relocate_section (bfd *output_
 	    {
 	      /* Munge up the value and addend so that we call the stub
 		 rather than the procedure directly.  */
-	      relocation = (stub_entry->stub_offset
-			    + stub_entry->stub_sec->output_offset
-			    + stub_entry->stub_sec->output_section->vma);
+	      asection *stub_sec = stub_entry->group->stub_sec;
+
+	      if (stub_entry->stub_type == ppc_stub_save_res)
+		relocation += (stub_sec->output_offset
+			       + stub_sec->output_section->vma
+			       + stub_sec->size - htab->sfpr->size
+			       - htab->sfpr->output_offset
+			       - htab->sfpr->output_section->vma);
+	      else
+		relocation = (stub_entry->stub_offset
+			      + stub_sec->output_offset
+			      + stub_sec->output_section->vma);
 	      addend = 0;
 	      reloc_dest = DEST_STUB;
 
@@ -13947,7 +14326,7 @@ ppc64_elf_relocate_section (bfd *output_
 		    insn ^= 0x01 << 21;
 		}
 
-	      bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
 	    }
 
 	  /* NOP out calls to undefined weak functions.
@@ -13960,8 +14339,8 @@ ppc64_elf_relocate_section (bfd *output_
 		   && relocation == 0
 		   && addend == 0)
 	    {
-	      bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
-	      continue;
+	      bfd_put_32 (input_bfd, NOP, contents + rel->r_offset);
+	      goto copy_reloc;
 	    }
 	  break;
 	}
@@ -13972,12 +14351,13 @@ ppc64_elf_relocate_section (bfd *output_
 	{
 	default:
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%P: %B: unknown relocation type %d for `%T'\n"),
 	     input_bfd, (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
-	  continue;
+	  goto copy_reloc;
 
 	case R_PPC64_NONE:
 	case R_PPC64_TLS:
@@ -13986,7 +14366,8 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_TOCSAVE:
 	case R_PPC64_GNU_VTINHERIT:
 	case R_PPC64_GNU_VTENTRY:
-	  continue;
+	case R_PPC64_ENTRY:
+	  goto copy_reloc;
 
 	  /* GOT16 relocations.  Like an ADDR16 using the symbol's
 	     address in the GOT as relocation value instead of the
@@ -14042,14 +14423,13 @@ ppc64_elf_relocate_section (bfd *output_
 	      ent = ppc64_tlsld_got (input_bfd);
 	    else
 	      {
-
 		if (h != NULL)
 		  {
-		    bfd_boolean dyn = htab->elf.dynamic_sections_created;
-		    if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
-							  &h->elf)
-			|| (info->shared
-			    && SYMBOL_REFERENCES_LOCAL (info, &h->elf)))
+		    if (!htab->elf.dynamic_sections_created
+			|| h->elf.dynindx == -1
+			|| SYMBOL_REFERENCES_LOCAL (info, &h->elf)
+			|| (ELF_ST_VISIBILITY (h->elf.other) != STV_DEFAULT
+			    && h->elf.root.type == bfd_link_hash_undefweak))
 		      /* This is actually a static link, or it is a
 			 -Bsymbolic link and the symbol is defined
 			 locally, or the symbol was forced to be local
@@ -14057,7 +14437,6 @@ ppc64_elf_relocate_section (bfd *output_
 		      ;
 		    else
 		      {
-			BFD_ASSERT (h->elf.dynindx != -1);
 			indx = h->elf.dynindx;
 			unresolved_reloc = FALSE;
 		      }
@@ -14107,12 +14486,14 @@ ppc64_elf_relocate_section (bfd *output_
 			 : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC);
 		if (ifunc)
 		  relgot = htab->elf.irelplt;
-		else if ((info->shared || indx != 0)
-			 && (h == NULL
-			     || (tls_type == (TLS_TLS | TLS_LD)
-				 && !h->elf.def_dynamic)
-			     || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
-			     || h->elf.root.type != bfd_link_hash_undefweak))
+		else if (indx != 0
+			 || (bfd_link_pic (info)
+			     && (h == NULL
+				 || (ELF_ST_VISIBILITY (h->elf.other)
+				     == STV_DEFAULT)
+				 || h->elf.root.type != bfd_link_hash_undefweak
+				 || (tls_type == (TLS_TLS | TLS_LD)
+				     && !h->elf.def_dynamic))))
 		  relgot = ppc64_elf_tdata (ent->owner)->relgot;
 		if (relgot != NULL)
 		  {
@@ -14178,28 +14559,34 @@ ppc64_elf_relocate_section (bfd *output_
 		   emitting a reloc.  */
 		else
 		  {
+		    int tlsopt
+		      = (htab->params->tls_get_addr_opt
+			 && htab->tls_get_addr_fd != NULL
+			 && htab->tls_get_addr_fd->elf.plt.plist != NULL);
+
 		    relocation += addend;
-		    if (tls_type == (TLS_TLS | TLS_LD))
-		      relocation = 1;
-		    else if (tls_type != 0)
+		    if (tls_type != 0)
 		      {
 			if (htab->elf.tls_sec == NULL)
 			  relocation = 0;
 			else
 			  {
-			    relocation -= htab->elf.tls_sec->vma + DTP_OFFSET;
-			    if (tls_type == (TLS_TLS | TLS_TPREL))
+			    if (tls_type & TLS_LD)
+			      relocation = 0;
+			    else
+			      relocation -= htab->elf.tls_sec->vma + DTP_OFFSET;
+			    if ((tls_type & TLS_TPREL)
+				|| (tlsopt && !(tls_type & TLS_DTPREL)))
 			      relocation += DTP_OFFSET - TP_OFFSET;
 			  }
 
-			if (tls_type == (TLS_TLS | TLS_GD))
+			if (tls_type & (TLS_GD | TLS_LD))
 			  {
 			    bfd_put_64 (output_bfd, relocation,
 					got->contents + off + 8);
-			    relocation = 1;
+			    relocation = !tlsopt;
 			  }
 		      }
-
 		    bfd_put_64 (output_bfd, relocation,
 				got->contents + off);
 		  }
@@ -14209,7 +14596,7 @@ ppc64_elf_relocate_section (bfd *output_
 	      abort ();
 
 	    relocation = got->output_section->vma + got->output_offset + off;
-	    addend = -(TOCstart + htab->stub_group[input_section->id].toc_off);
+	    addend = -(TOCstart + htab->sec_info[input_section->id].toc_off);
 	  }
 	  break;
 
@@ -14220,41 +14607,54 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_PLT64:
 	  /* Relocation is to the entry for this symbol in the
 	     procedure linkage table.  */
+	  {
+	    struct plt_entry **plt_list = NULL;
+	    if (h != NULL)
+	      plt_list = &h->elf.plt.plist;
+	    else if (local_got_ents != NULL)
+	      {
+		struct plt_entry **local_plt = (struct plt_entry **)
+		  (local_got_ents + symtab_hdr->sh_info);
+		unsigned char *local_got_tls_masks = (unsigned char *)
+		  (local_plt + symtab_hdr->sh_info);
+		if ((local_got_tls_masks[r_symndx] & PLT_IFUNC) != 0)
+		  plt_list = local_plt + r_symndx;
+	      }
+	    if (plt_list)
+	      {
+		struct plt_entry *ent;
 
-	  /* Resolve a PLT reloc against a local symbol directly,
-	     without using the procedure linkage table.  */
-	  if (h == NULL)
-	    break;
-
-	  /* It's possible that we didn't make a PLT entry for this
-	     symbol.  This happens when statically linking PIC code,
-	     or when using -Bsymbolic.  Go find a match if there is a
-	     PLT entry.  */
-	  if (htab->elf.splt != NULL)
-	    {
-	      struct plt_entry *ent;
-	      for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
-		if (ent->plt.offset != (bfd_vma) -1
-		    && ent->addend == orig_rel.r_addend)
-		  {
-		    relocation = (htab->elf.splt->output_section->vma
-				  + htab->elf.splt->output_offset
-				  + ent->plt.offset);
-		    unresolved_reloc = FALSE;
-		    break;
-		  }
-	    }
+		for (ent = *plt_list; ent != NULL; ent = ent->next)
+		  if (ent->plt.offset != (bfd_vma) -1
+		      && ent->addend == orig_rel.r_addend)
+		    {
+		      asection *plt;
+
+		      plt = htab->elf.splt;
+		      if (!htab->elf.dynamic_sections_created
+			  || h == NULL
+			  || h->elf.dynindx == -1)
+			plt = htab->elf.iplt;
+		      relocation = (plt->output_section->vma
+				    + plt->output_offset
+				    + ent->plt.offset);
+		      addend = 0;
+		      unresolved_reloc = FALSE;
+		      break;
+		    }
+	      }
+	  }
 	  break;
 
 	case R_PPC64_TOC:
 	  /* Relocation value is TOC base.  */
 	  relocation = TOCstart;
 	  if (r_symndx == STN_UNDEF)
-	    relocation += htab->stub_group[input_section->id].toc_off;
+	    relocation += htab->sec_info[input_section->id].toc_off;
 	  else if (unresolved_reloc)
 	    ;
-	  else if (sec != NULL && sec->id <= htab->top_id)
-	    relocation += htab->stub_group[sec->id].toc_off;
+	  else if (sec != NULL && sec->id < htab->sec_info_arr_size)
+	    relocation += htab->sec_info[sec->id].toc_off;
 	  else
 	    unresolved_reloc = TRUE;
 	  goto dodyn;
@@ -14269,7 +14669,7 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_TOC16_DS:
 	case R_PPC64_TOC16_LO_DS:
 	case R_PPC64_TOC16_HA:
-	  addend -= TOCstart + htab->stub_group[input_section->id].toc_off;
+	  addend -= TOCstart + htab->sec_info[input_section->id].toc_off;
 	  break;
 
 	  /* Relocate against the beginning of the section.  */
@@ -14287,6 +14687,7 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_REL16_LO:
 	case R_PPC64_REL16_HI:
 	case R_PPC64_REL16_HA:
+	case R_PPC64_REL16DX_HA:
 	  break;
 
 	case R_PPC64_REL14:
@@ -14317,15 +14718,15 @@ ppc64_elf_relocate_section (bfd *output_
 		 defined before using them.  */
 	      bfd_byte *p = contents + rel->r_offset - d_offset;
 
-	      insn = bfd_get_32 (output_bfd, p);
+	      insn = bfd_get_32 (input_bfd, p);
 	      insn = _bfd_elf_ppc_at_tprel_transform (insn, 13);
 	      if (insn != 0)
-		bfd_put_32 (output_bfd, insn, p);
+		bfd_put_32 (input_bfd, insn, p);
 	      break;
 	    }
 	  if (htab->elf.tls_sec != NULL)
 	    addend -= htab->elf.tls_sec->vma + TP_OFFSET;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    /* The TPREL16 relocs shouldn't really be used in shared
 	       libs as they will result in DT_TEXTREL being set, but
 	       support them anyway.  */
@@ -14367,7 +14768,7 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_DTPREL64:
 	  if (htab->elf.tls_sec != NULL)
 	    addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	  /* Relocations that may need to be propagated if this is a
 	     dynamic object.  */
@@ -14402,22 +14803,12 @@ ppc64_elf_relocate_section (bfd *output_
 	  if (NO_OPD_RELOCS && is_opd)
 	    break;
 
-	  if ((info->shared
-	       && (h == NULL
-		   || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
-		   || h->elf.root.type != bfd_link_hash_undefweak)
-	       && (must_be_dyn_reloc (info, r_type)
-		   || !SYMBOL_CALLS_LOCAL (info, &h->elf)))
-	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
-		  && h != NULL
-		  && h->elf.dynindx != -1
-		  && !h->elf.non_got_ref
-		  && !h->elf.def_regular)
-	      || (!info->shared
-		  && (h != NULL
-		      ? h->elf.type == STT_GNU_IFUNC
-		      : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)))
+	  if (bfd_link_pic (info)
+	      ? ((h != NULL && pc_dynrelocs (h))
+		 || must_be_dyn_reloc (info, r_type))
+	      : (h != NULL
+		 ? h->dyn_relocs != NULL
+		 : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC))
 	    {
 	      bfd_boolean skip, relocate;
 	      asection *sreloc;
@@ -14509,7 +14900,8 @@ ppc64_elf_relocate_section (bfd *output_
 			  : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 			{
 			  info->callbacks->einfo
-			    (_("%P: %H: %s for indirect "
+			    /* xgettext:c-format */
+			    (_("%H: %s for indirect "
 			       "function `%T' unsupported\n"),
 			     input_bfd, input_section, rel->r_offset,
 			     ppc64_elf_howto_table[r_type]->name,
@@ -14589,11 +14981,35 @@ ppc64_elf_relocate_section (bfd *output_
 		    addend = outrel.r_addend;
 		  /* Adjust pc_relative relocs to have zero in *r_offset.  */
 		  else if (ppc64_elf_howto_table[r_type]->pc_relative)
-		    addend = (input_section->output_section->vma
-			      + input_section->output_offset
-			      + rel->r_offset);
+		    addend = outrel.r_offset;
 		}
 	    }
+	  else if (r_type == R_PPC64_DTPMOD64
+		   && htab->params->tls_get_addr_opt
+		   && htab->tls_get_addr_fd != NULL
+		   && htab->tls_get_addr_fd->elf.plt.plist != NULL)
+	    {
+	      /* Set up for __tls_get_addr_opt stub, when this entry
+		 does not have dynamic relocs.  */
+	      relocation = 0;
+	      /* Set up the next word for local dynamic.  If it turns
+		 out to be global dynamic, the reloc will overwrite
+		 this value.  */
+	      if (rel->r_offset + 16 <= input_section->size)
+		bfd_put_64 (input_bfd, DTP_OFFSET - TP_OFFSET,
+			    contents + rel->r_offset + 8);
+	    }
+	  else if (r_type == R_PPC64_DTPREL64
+		   && htab->params->tls_get_addr_opt
+		   && htab->tls_get_addr_fd != NULL
+		   && htab->tls_get_addr_fd->elf.plt.plist != NULL
+		   && rel > relocs
+		   && rel[-1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_DTPMOD64)
+		   && rel[-1].r_offset + 8 == rel->r_offset)
+	    {
+	      /* __tls_get_addr_opt stub value.  */
+	      addend += DTP_OFFSET - TP_OFFSET;
+	    }
 	  break;
 
 	case R_PPC64_COPY:
@@ -14616,13 +15032,14 @@ ppc64_elf_relocate_section (bfd *output_
 	  /* These ones haven't been implemented yet.  */
 
 	  info->callbacks->einfo
+	    /* xgettext:c-format */
 	    (_("%P: %B: %s is not supported for `%T'\n"),
 	     input_bfd,
 	     ppc64_elf_howto_table[r_type]->name, sym_name);
 
 	  bfd_set_error (bfd_error_invalid_operation);
 	  ret = FALSE;
-	  continue;
+	  goto copy_reloc;
 	}
 
       /* Multi-instruction sequences that access the TOC can be
@@ -14699,6 +15116,7 @@ ppc64_elf_relocate_section (bfd *output_
 	  break;
 
 	case R_PPC64_REL16_HA:
+	case R_PPC64_REL16DX_HA:
 	case R_PPC64_ADDR16_HA:
 	case R_PPC64_ADDR16_HIGHA:
 	case R_PPC64_ADDR16_HIGHERA:
@@ -14719,7 +15137,7 @@ ppc64_elf_relocate_section (bfd *output_
 	     alone (it will be set to zero elsewhere in the link).  */
 	  if (sec == NULL)
 	    break;
-	  /* Fall thru */
+	  /* Fall through.  */
 
 	case R_PPC64_GOT16_HA:
 	case R_PPC64_PLTGOT16_HA:
@@ -14754,24 +15172,29 @@ ppc64_elf_relocate_section (bfd *output_
 	case R_PPC64_DTPREL16_LO_DS:
 	  insn = bfd_get_32 (input_bfd, contents + (rel->r_offset & ~3));
 	  mask = 3;
-	  /* If this reloc is against an lq insn, then the value must be
-	     a multiple of 16.  This is somewhat of a hack, but the
-	     "correct" way to do this by defining _DQ forms of all the
-	     _DS relocs bloats all reloc switches in this file.  It
-	     doesn't seem to make much sense to use any of these relocs
-	     in data, so testing the insn should be safe.  */
-	  if ((insn & (0x3f << 26)) == (56u << 26))
+	  /* If this reloc is against an lq, lxv, or stxv insn, then
+	     the value must be a multiple of 16.  This is somewhat of
+	     a hack, but the "correct" way to do this by defining _DQ
+	     forms of all the _DS relocs bloats all reloc switches in
+	     this file.  It doesn't make much sense to use these
+	     relocs in data, so testing the insn should be safe.  */
+	  if ((insn & (0x3f << 26)) == (56u << 26)
+	      || ((insn & (0x3f << 26)) == (61u << 26) && (insn & 3) == 1))
 	    mask = 15;
-	  if (((relocation + addend) & mask) != 0)
+	  relocation += addend;
+	  addend = insn & (mask ^ 3);
+	  if ((relocation & mask) != 0)
 	    {
+	      relocation ^= relocation & mask;
 	      info->callbacks->einfo
-		(_("%P: %H: error: %s not a multiple of %u\n"),
+		/* xgettext:c-format */
+		(_("%H: error: %s not a multiple of %u\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name,
 		 mask + 1);
 	      bfd_set_error (bfd_error_bad_value);
 	      ret = FALSE;
-	      continue;
+	      goto copy_reloc;
 	    }
 	  break;
 	}
@@ -14786,7 +15209,8 @@ ppc64_elf_relocate_section (bfd *output_
 				      rel->r_offset) != (bfd_vma) -1)
 	{
 	  info->callbacks->einfo
-	    (_("%P: %H: unresolvable %s against `%T'\n"),
+	    /* xgettext:c-format */
+	    (_("%H: unresolvable %s against `%T'\n"),
 	     input_bfd, input_section, rel->r_offset,
 	     howto->name,
 	     h->elf.root.root.string);
@@ -14821,8 +15245,30 @@ ppc64_elf_relocate_section (bfd *output_
 	    }
 	}
 
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
-				    rel->r_offset, relocation, addend);
+      if (r_type == R_PPC64_REL16DX_HA)
+	{
+	  /* Split field reloc isn't handled by _bfd_final_link_relocate.  */
+	  if (rel->r_offset + 4 > input_section->size)
+	    r = bfd_reloc_outofrange;
+	  else
+	    {
+	      relocation += addend;
+	      relocation -= (rel->r_offset
+			     + input_section->output_offset
+			     + input_section->output_section->vma);
+	      relocation = (bfd_signed_vma) relocation >> 16;
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      insn &= ~0x1fffc1;
+	      insn |= (relocation & 0xffc1) | ((relocation & 0x3e) << 15);
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+	      r = bfd_reloc_ok;
+	      if (relocation + 0x8000 > 0xffff)
+		r = bfd_reloc_overflow;
+	    }
+	}
+      else
+	r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
+				      rel->r_offset, relocation, addend);
 
       if (r != bfd_reloc_ok)
 	{
@@ -14851,18 +15297,17 @@ ppc64_elf_relocate_section (bfd *output_
 			   && (h->elf.root.type == bfd_link_hash_undefweak
 			       || h->elf.root.type == bfd_link_hash_undefined)
 			   && is_branch_reloc (r_type))))
-		{
-		  if (!((*info->callbacks->reloc_overflow)
-			(info, &h->elf.root, sym_name,
-			 reloc_name, orig_rel.r_addend,
-			 input_bfd, input_section, rel->r_offset)))
-		    return FALSE;
-		}
+		info->callbacks->reloc_overflow (info, &h->elf.root,
+						 sym_name, reloc_name,
+						 orig_rel.r_addend,
+						 input_bfd, input_section,
+						 rel->r_offset);
 	    }
 	  else
 	    {
 	      info->callbacks->einfo
-		(_("%P: %H: %s against `%T': error %d\n"),
+		/* xgettext:c-format */
+		(_("%H: %s against `%T': error %d\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 reloc_name, sym_name, (int) r);
 	      ret = FALSE;
@@ -14870,6 +15315,29 @@ ppc64_elf_relocate_section (bfd *output_
 	  if (more_info != NULL)
 	    free (more_info);
 	}
+    copy_reloc:
+      if (wrel != rel)
+	*wrel = *rel;
+    }
+
+  if (wrel != rel)
+    {
+      Elf_Internal_Shdr *rel_hdr;
+      size_t deleted = rel - wrel;
+
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      if (rel_hdr->sh_size == 0)
+	{
+	  /* It is too late to remove an empty reloc section.  Leave
+	     one NONE reloc.
+	     ??? What is wrong with an empty section???  */
+	  rel_hdr->sh_size = rel_hdr->sh_entsize;
+	  deleted -= 1;
+	}
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      input_section->reloc_count -= deleted;
     }
 
   /* If we're emitting relocations, then shortly after this function
@@ -14877,7 +15345,7 @@ ppc64_elf_relocate_section (bfd *output_
      adjusted.  Worse, reloc symbol indices will be for the output
      file rather than the input.  Save a copy of the relocs for
      opd_entry_value.  */
-  if (is_opd && (info->emitrelocations || info->relocatable))
+  if (is_opd && (info->emitrelocations || bfd_link_relocatable (info)))
     {
       bfd_size_type amt;
       amt = input_section->reloc_count * sizeof (Elf_Internal_Rela);
@@ -14912,7 +15380,7 @@ ppc64_elf_output_symbol_hook (struct bfd
     return 1;
 
   value = elfsym->st_value - input_sec->output_offset;
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     value -= input_sec->output_section->vma;
 
   adjust = opd->adjust[OPD_NDX (value)];
@@ -15009,11 +15477,13 @@ ppc64_elf_finish_dynamic_symbol (bfd *ou
   if (h->needs_copy)
     {
       /* This symbol needs a copy reloc.  Set it up.  */
+      asection *srel;
 
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->relbss == NULL)
+	  || htab->elf.srelbss == NULL
+	  || htab->elf.sreldynrelro == NULL)
 	abort ();
 
       rela.r_offset = (h->root.u.def.value
@@ -15021,8 +15491,12 @@ ppc64_elf_finish_dynamic_symbol (bfd *ou
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_COPY);
       rela.r_addend = 0;
-      loc = htab->relbss->contents;
-      loc += htab->relbss->reloc_count++ * sizeof (Elf64_External_Rela);
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	srel = htab->elf.sreldynrelro;
+      else
+	srel = htab->elf.srelbss;
+      loc = srel->contents;
+      loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
       bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
     }
 
@@ -15137,34 +15611,14 @@ ppc64_elf_finish_dynamic_sections (bfd *
 	    case DT_PLTRELSZ:
 	      dyn.d_un.d_val = htab->elf.srelplt->size;
 	      break;
-
-	    case DT_RELASZ:
-	      /* Don't count procedure linkage table relocs in the
-		 overall reloc count.  */
-	      s = htab->elf.srelplt;
-	      if (s == NULL)
-		continue;
-	      dyn.d_un.d_val -= s->size;
-	      break;
-
-	    case DT_RELA:
-	      /* We may not be using the standard ELF linker script.
-		 If .rela.plt is the first .rela section, we adjust
-		 DT_RELA to not include it.  */
-	      s = htab->elf.srelplt;
-	      if (s == NULL)
-		continue;
-	      if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
-		continue;
-	      dyn.d_un.d_ptr += s->size;
-	      break;
 	    }
 
 	  bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
 	}
     }
 
-  if (htab->elf.sgot != NULL && htab->elf.sgot->size != 0)
+  if (htab->elf.sgot != NULL && htab->elf.sgot->size != 0
+      && htab->elf.sgot->output_section != bfd_abs_section_ptr)
     {
       /* Fill in the first entry in the global offset table.
 	 We use it to hold the link-time TOCbase.  */
@@ -15176,7 +15630,8 @@ ppc64_elf_finish_dynamic_sections (bfd *
       elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 8;
     }
 
-  if (htab->elf.splt != NULL && htab->elf.splt->size != 0)
+  if (htab->elf.splt != NULL && htab->elf.splt->size != 0
+      && htab->elf.splt->output_section != bfd_abs_section_ptr)
     {
       /* Set .plt entry size.  */
       elf_section_data (htab->elf.splt->output_section)->this_hdr.sh_entsize
@@ -15209,8 +15664,10 @@ ppc64_elf_finish_dynamic_sections (bfd *
       bfd_vma val;
       bfd_byte *p;
       asection *stub_sec;
+      size_t align = 4;
 
-      p = htab->glink_eh_frame->contents + sizeof (glink_eh_frame_cie);
+      p = htab->glink_eh_frame->contents;
+      p += (sizeof (glink_eh_frame_cie) + align - 1) & -align;
       for (stub_sec = htab->params->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
@@ -15240,7 +15697,7 @@ ppc64_elf_finish_dynamic_sections (bfd *
 	    /* Augmentation.  */
 	    p += 1;
 	    /* Pad.  */
-	    p += 7;
+	    p += ((17 + align - 1) & -align) - 17;
 	  }
       if (htab->glink != NULL && htab->glink->size != 0)
 	{
@@ -15270,6 +15727,7 @@ ppc64_elf_finish_dynamic_sections (bfd *
 	  p += 1;
 	  /* Ops.  */
 	  p += 7;
+	  p += ((24 + align - 1) & -align) - 24;
 	}
 
       if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ppc.h ./bfd/elf64-ppc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-ppc.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-ppc.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PowerPC64-specific support for 64-bit ELF.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -34,7 +34,7 @@ struct ppc64_elf_params
   bfd_signed_vma group_size;
 
   /* Whether to use a special call stub for __tls_get_addr.  */
-  int no_tls_get_addr_opt;
+  int tls_get_addr_opt;
 
   /* Whether to allow multiple toc sections.  */
   int no_multi_toc;
@@ -94,5 +94,3 @@ bfd_boolean ppc64_elf_size_stubs
 (struct bfd_link_info *);
 bfd_boolean ppc64_elf_build_stubs
   (struct bfd_link_info *, char **);
-void ppc64_elf_restore_symbols
-  (struct bfd_link_info *info);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-s390.c ./bfd/elf64-s390.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-s390.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-s390.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM S/390-specific support for 64-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -25,6 +25,7 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/s390.h"
+#include <stdarg.h>
 
 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value
    from smaller values.  Start with zero, widen, *then* decrement.  */
@@ -337,10 +338,10 @@ elf_s390_reloc_name_lookup (bfd *abfd AT
 	&& strcasecmp (elf_howto_table[i].name, r_name) == 0)
       return &elf_howto_table[i];
 
-    if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
-      return &elf64_s390_vtinherit_howto;
-    if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
-      return &elf64_s390_vtentry_howto;
+  if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
+    return &elf64_s390_vtinherit_howto;
+  if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
+    return &elf64_s390_vtentry_howto;
 
   return NULL;
 }
@@ -367,8 +368,9 @@ elf_s390_info_to_howto (bfd *abfd ATTRIB
     default:
       if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
 	{
-	  (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-				 abfd, (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: invalid relocation type %d"),
+			      abfd, (int) r_type);
 	  r_type = R_390_NONE;
 	}
       cache_ptr->howto = &elf_howto_table[r_type];
@@ -492,8 +494,8 @@ elf_s390_is_local_label_name (bfd *abfd,
 
    The GOT holds the address in the PLT to be executed.
    The loader then gets:
-   24(15) =  Pointer to the structure describing the object.
-   28(15) =  Offset in symbol table
+   48(15) =  Pointer to the structure describing the object.
+   56(15) =  Offset in symbol table
    The loader  must  then find the module where the function is
    and insert the address in the GOT.
 
@@ -649,8 +651,6 @@ struct elf_s390_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
   asection *irelifunc;
 
   union {
@@ -664,9 +664,9 @@ struct elf_s390_link_hash_table
 
 /* Get the s390 ELF linker hash table from a link_info structure.  */
 
-#define elf_s390_hash_table(p) \
-  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
-  == S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL)
+#define elf_s390_hash_table(p)						\
+  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash))	\
+   == S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL)
 
 #define ELF64 1
 #include "elf-s390-common.c"
@@ -728,63 +728,6 @@ elf_s390_link_hash_table_create (bfd *ab
   return &ret->elf.root;
 }
 
-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
-
-static bfd_boolean
-create_got_section (bfd *dynobj,
-		    struct bfd_link_info *info)
-{
-  struct elf_s390_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
-
-  htab = elf_s390_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  htab->elf.sgot = bfd_get_linker_section (dynobj, ".got");
-  htab->elf.sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-  htab->elf.srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-  if (!htab->elf.sgot || !htab->elf.sgotplt || !htab->elf.srelgot)
-    abort ();
-  return TRUE;
-}
-
-/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and
-   .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
-   hash table.  */
-
-static bfd_boolean
-elf_s390_create_dynamic_sections (bfd *dynobj,
-				  struct bfd_link_info *info)
-{
-  struct elf_s390_link_hash_table *htab;
-
-  htab = elf_s390_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  if (!htab->elf.sgot && !create_got_section (dynobj, info))
-    return FALSE;
-
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->elf.splt = bfd_get_linker_section (dynobj, ".plt");
-  htab->elf.srelplt = bfd_get_linker_section (dynobj, ".rela.plt");
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
-}
-
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
@@ -842,7 +785,8 @@ elf_s390_copy_indirect_symbol (struct bf
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      dir->ref_dynamic |= ind->ref_dynamic;
+      if (dir->versioned != versioned_hidden)
+	dir->ref_dynamic |= ind->ref_dynamic;
       dir->ref_regular |= ind->ref_regular;
       dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
       dir->needs_plt |= ind->needs_plt;
@@ -856,7 +800,7 @@ elf_s390_tls_transition (struct bfd_link
 			 int r_type,
 			 int is_local)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   switch (r_type)
@@ -896,7 +840,7 @@ elf_s390_check_relocs (bfd *abfd,
   bfd_signed_vma *local_got_refcounts;
   int tls_type, old_tls_type;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_s390_elf (abfd));
@@ -923,9 +867,9 @@ elf_s390_check_relocs (bfd *abfd,
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd,
-				 r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1014,7 +958,7 @@ elf_s390_check_relocs (bfd *abfd,
 	    {
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
-	      if (!create_got_section (htab->elf.dynobj, info))
+	      if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
 		return FALSE;
 	    }
 	}
@@ -1040,9 +984,6 @@ elf_s390_check_relocs (bfd *abfd,
 
       switch (r_type)
 	{
-	case R_390_GOTOFF16:
-	case R_390_GOTOFF32:
-	case R_390_GOTOFF64:
 	case R_390_GOTPC:
 	case R_390_GOTPCDBL:
 	  /* These relocs do not need a GOT slot.  They just load the
@@ -1050,6 +991,12 @@ elf_s390_check_relocs (bfd *abfd,
 	     the GOT.  Since the GOT pointer has been set up above we
 	     are done.  */
 	  break;
+	case R_390_GOTOFF16:
+	case R_390_GOTOFF32:
+	case R_390_GOTOFF64:
+	  if (h == NULL || !s390_is_ifunc_symbol_p (h) || !h->def_regular)
+	    break;
+	  /* Fall through.  */
 
 	case R_390_PLT12DBL:
 	case R_390_PLT16DBL:
@@ -1109,7 +1056,7 @@ elf_s390_check_relocs (bfd *abfd,
 	case R_390_TLS_GOTIE20:
 	case R_390_TLS_GOTIE64:
 	case R_390_TLS_IEENT:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
@@ -1161,7 +1108,8 @@ elf_s390_check_relocs (bfd *abfd,
 	    {
 	      if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: `%s' accessed both as normal and thread local symbol"),
 		     abfd, h->root.root.string);
 		  return FALSE;
@@ -1186,10 +1134,10 @@ elf_s390_check_relocs (bfd *abfd,
 	  /* For static linking and executables this reloc will be
 	     calculated at linktime otherwise a TLS_TPOFF runtime
 	     reloc will be generated.  */
-	  if (r_type == R_390_TLS_LE64 && info->pie)
+	  if (r_type == R_390_TLS_LE64 && bfd_link_pie (info))
 	    break;
 
-	  if (!info->shared)
+	  if (!bfd_link_pic (info))
 	    break;
 	  info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
@@ -1205,7 +1153,7 @@ elf_s390_check_relocs (bfd *abfd,
 	case R_390_PC32:
 	case R_390_PC32DBL:
 	case R_390_PC64:
-	  if (h != NULL)
+	  if (h != NULL && bfd_link_executable (info))
 	    {
 	      /* If this reloc is in a read-only section, we might
 		 need a copy reloc.  We can't check reliably at this
@@ -1215,7 +1163,7 @@ elf_s390_check_relocs (bfd *abfd,
 		 adjust_dynamic_symbol.  */
 	      h->non_got_ref = 1;
 
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		{
 		  /* We may need a .plt entry if the function this reloc
 		     refers to is in a shared lib.  */
@@ -1244,7 +1192,7 @@ elf_s390_check_relocs (bfd *abfd,
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && ((ELF64_R_TYPE (rel->r_info) != R_390_PC16
 		    && ELF64_R_TYPE (rel->r_info) != R_390_PC12DBL
@@ -1258,7 +1206,7 @@ elf_s390_check_relocs (bfd *abfd,
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -1395,7 +1343,7 @@ elf_s390_gc_sweep_hook (bfd *abfd,
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf_s390_hash_table (info);
@@ -1462,6 +1410,18 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	  if (htab->tls_ldm_got.refcount > 0)
 	    htab->tls_ldm_got.refcount -= 1;
 	  break;
+	case R_390_GOTOFF16:
+	case R_390_GOTOFF32:
+	case R_390_GOTOFF64:
+	  if (h != NULL && s390_is_ifunc_symbol_p (h) && h->def_regular)
+	    {
+	      h->plt.refcount--;
+	      break;
+	    }
+
+	case R_390_GOTPC:
+	case R_390_GOTPCDBL:
+	  break;
 
 	case R_390_TLS_GD64:
 	case R_390_TLS_IE64:
@@ -1474,11 +1434,6 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	case R_390_GOT20:
 	case R_390_GOT32:
 	case R_390_GOT64:
-	case R_390_GOTOFF16:
-	case R_390_GOTOFF32:
-	case R_390_GOTOFF64:
-	case R_390_GOTPC:
-	case R_390_GOTPCDBL:
 	case R_390_GOTENT:
 	  if (h != NULL)
 	    {
@@ -1505,7 +1460,7 @@ elf_s390_gc_sweep_hook (bfd *abfd,
 	case R_390_PC32:
 	case R_390_PC32DBL:
 	case R_390_PC64:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
 	  /* Fall through */
 
@@ -1587,11 +1542,51 @@ elf_s390_adjust_dynamic_symbol (struct b
 				struct elf_link_hash_entry *h)
 {
   struct elf_s390_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
 
   /* STT_GNU_IFUNC symbol must go through PLT. */
   if (s390_is_ifunc_symbol_p (h))
-    return TRUE;
+    {
+      /* All local STT_GNU_IFUNC references must be treated as local
+	 calls via local PLT.  */
+      if (h->ref_regular && SYMBOL_CALLS_LOCAL (info, h))
+	{
+	  bfd_size_type pc_count = 0, count = 0;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_s390_link_hash_entry *eh;
+	  struct elf_dyn_relocs *p;
+
+	  eh = (struct elf_s390_link_hash_entry *) h;
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      pc_count += p->pc_count;
+	      p->count -= p->pc_count;
+	      p->pc_count = 0;
+	      count += p->count;
+	      if (p->count == 0)
+		*pp = p->next;
+	      else
+		pp = &p->next;
+	    }
+
+	  if (pc_count || count)
+	    {
+	      h->needs_plt = 1;
+	      h->non_got_ref = 1;
+	      if (h->plt.refcount <= 0)
+		h->plt.refcount = 1;
+	      else
+		h->plt.refcount += 1;
+	    }
+	}
+
+      if (h->plt.refcount <= 0)
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+      return TRUE;
+    }
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later
@@ -1645,7 +1640,7 @@ elf_s390_adjust_dynamic_symbol (struct b
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -1699,14 +1694,22 @@ elf_s390_adjust_dynamic_symbol (struct b
   /* We must generate a R_390_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += sizeof (Elf64_External_Rela);
+      srel->size += sizeof (Elf64_External_Rela);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -1733,8 +1736,7 @@ allocate_dynrelocs (struct elf_link_hash
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
      here if it is defined and referenced in a non-shared object.  */
   if (s390_is_ifunc_symbol_p (h) && h->def_regular)
-    return s390_elf_allocate_ifunc_dyn_relocs (info, h,
-					       &eh->dyn_relocs);
+    return s390_elf_allocate_ifunc_dyn_relocs (info, h);
   else if (htab->elf.dynamic_sections_created
 	   && h->plt.refcount > 0)
     {
@@ -1747,7 +1749,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->elf.splt;
@@ -1764,7 +1766,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -1800,7 +1802,7 @@ allocate_dynrelocs (struct elf_link_hash
      to R_390_TLS_LE64 requiring no TLS entry. For GOTIE12 and IEENT
      we can save the dynamic TLS relocation.  */
   if (h->got.refcount > 0
-      && !info->shared
+      && !bfd_link_pic (info)
       && h->dynindx == -1
       && elf_s390_hash_entry(h)->tls_type >= GOT_TLS_IE)
     {
@@ -1846,7 +1848,7 @@ allocate_dynrelocs (struct elf_link_hash
 	htab->elf.srelgot->size += 2 * sizeof (Elf64_External_Rela);
       else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		|| h->root.type != bfd_link_hash_undefweak)
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	htab->elf.srelgot->size += sizeof (Elf64_External_Rela);
     }
@@ -1862,7 +1864,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -1989,7 +1991,7 @@ elf_s390_size_dynamic_sections (bfd *out
   if (htab->elf.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -2057,7 +2059,7 @@ elf_s390_size_dynamic_sections (bfd *out
 	      s->size += GOT_ENTRY_SIZE;
 	      if (*local_tls_type == GOT_TLS_GD)
 		s->size += GOT_ENTRY_SIZE;
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		srela->size += sizeof (Elf64_External_Rela);
 	    }
 	  else
@@ -2105,7 +2107,8 @@ elf_s390_size_dynamic_sections (bfd *out
       if (s == htab->elf.splt
 	  || s == htab->elf.sgot
 	  || s == htab->elf.sgotplt
-	  || s == htab->sdynbss
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro
 	  || s == htab->elf.iplt
 	  || s == htab->elf.igotplt
 	  || s == htab->irelifunc)
@@ -2167,7 +2170,7 @@ elf_s390_size_dynamic_sections (bfd *out
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2245,7 +2248,8 @@ invalid_tls_insn (bfd *input_bfd,
   reloc_howto_type *howto;
 
   howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext:c-format */
     (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
@@ -2391,7 +2395,7 @@ elf_s390_relocate_section (bfd *output_b
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       switch (r_type)
@@ -2431,7 +2435,7 @@ elf_s390_relocate_section (bfd *output_b
 		    PLT_ENTRY_SIZE;
 
 		  /* Offset in GOT is PLT index plus GOT headers(3)
-		     times 4, addr & GOT addr.  */
+		     times 8, addr & GOT addr.  */
 		  relocation = (plt_index + 3) * GOT_ENTRY_SIZE;
 		  if (r_type == R_390_GOTPLTENT)
 		    relocation += htab->elf.sgot->output_section->vma;
@@ -2476,8 +2480,10 @@ elf_s390_relocate_section (bfd *output_b
 			 finish_dynamic_symbol.  */
 		    }
 		}
-	      else if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		       || (info->shared
+	      else if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+							  bfd_link_pic (info),
+							  h)
+		       || (bfd_link_pic (info)
 			   && SYMBOL_REFERENCES_LOCAL (info, h))
 		       || (ELF_ST_VISIBILITY (h->other)
 			   && h->root.type == bfd_link_hash_undefweak))
@@ -2504,7 +2510,7 @@ elf_s390_relocate_section (bfd *output_b
 		    }
 
 		  if ((h->def_regular
-		       && info->shared
+		       && bfd_link_pic (info)
 		       && SYMBOL_REFERENCES_LOCAL (info, h))
 		      /* lgrl rx,sym@GOTENT -> larl rx, sym */
 		      && ((r_type == R_390_GOTENT
@@ -2554,7 +2560,7 @@ elf_s390_relocate_section (bfd *output_b
 		  bfd_put_64 (output_bfd, relocation,
 			      htab->elf.sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -2599,6 +2605,18 @@ elf_s390_relocate_section (bfd *output_b
 	  /* Relocation is relative to the start of the global offset
 	     table.  */
 
+	  if (h != NULL
+	      && s390_is_ifunc_symbol_p (h)
+	      && h->def_regular
+	      && !bfd_link_executable (info))
+	    {
+	      relocation = (htab->elf.iplt->output_section->vma
+			    + htab->elf.iplt->output_offset
+			    + h->plt.offset
+			    - htab->elf.sgot->output_section->vma);
+	      goto do_relocation;
+	    }
+
 	  /* Note that sgot->output_offset is not involved in this
 	     calculation.  We always want the start of .got.  If we
 	     defined _GLOBAL_OFFSET_TABLE in a different way, as is
@@ -2676,10 +2694,6 @@ elf_s390_relocate_section (bfd *output_b
 	  unresolved_reloc = FALSE;
 	  break;
 
-	case R_390_8:
-	case R_390_16:
-	case R_390_32:
-	case R_390_64:
 	case R_390_PC16:
 	case R_390_PC12DBL:
 	case R_390_PC16DBL:
@@ -2687,12 +2701,43 @@ elf_s390_relocate_section (bfd *output_b
 	case R_390_PC32:
 	case R_390_PC32DBL:
 	case R_390_PC64:
+	  if (h != NULL
+	      && bfd_link_pie (info)
+	      && !h->def_regular)
+	    {
+	      _bfd_error_handler (_("%B: `%s' non-PLT reloc for symbol defined "
+				    "in shared library and accessed "
+				    "from executable "
+				    "(rebuild file with -fPIC ?)"),
+				  input_bfd, h->root.root.string);
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
+	  /* The target of these relocs are instruction operands
+	     residing in read-only sections.  We cannot emit a runtime
+	     reloc for it.  */
+	  if (h != NULL
+	      && s390_is_ifunc_symbol_p (h)
+	      && h->def_regular
+	      && bfd_link_pic (info))
+	    {
+	      relocation = (htab->elf.iplt->output_section->vma
+			    + htab->elf.iplt->output_offset
+			    + h->plt.offset);
+	      goto do_relocation;
+	    }
+	  /* Fall through.  */
+
+	case R_390_8:
+	case R_390_16:
+	case R_390_32:
+	case R_390_64:
 
 	  if (h != NULL
 	      && s390_is_ifunc_symbol_p (h)
 	      && h->def_regular)
 	    {
-	      if (!info->shared || !h->non_got_ref)
+	      if (!bfd_link_pic (info) || !h->non_got_ref)
 		{
 		  /* For a non-shared object STT_GNU_IFUNC symbol must
 		     go through PLT.  */
@@ -2723,7 +2768,7 @@ elf_s390_relocate_section (bfd *output_b
 
 		  if (h->dynindx == -1
 		      || h->forced_local
-		      || info->executable)
+		      || bfd_link_executable (info))
 		    {
 		      /* This symbol is resolved locally.  */
 		      outrel.r_info = ELF64_R_INFO (0, R_390_IRELATIVE);
@@ -2752,7 +2797,7 @@ elf_s390_relocate_section (bfd *output_b
 	  if ((input_section->flags & SEC_ALLOC) == 0)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
 		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak)
@@ -2765,7 +2810,7 @@ elf_s390_relocate_section (bfd *output_b
 		    && r_type != R_390_PC64)
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -2807,7 +2852,7 @@ elf_s390_relocate_section (bfd *output_b
 			   || r_type == R_390_PC32
 			   || r_type == R_390_PC32DBL
 			   || r_type == R_390_PC64
-			   || !info->shared
+			   || !bfd_link_pic (info)
 			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
@@ -2879,7 +2924,7 @@ elf_s390_relocate_section (bfd *output_b
 
 	  /* Relocations for tls literal pool entries.  */
 	case R_390_TLS_IE64:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      asection *sreloc;
@@ -2907,7 +2952,7 @@ elf_s390_relocate_section (bfd *output_b
 	  else if (h != NULL)
 	    {
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (!info->shared && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
+	      if (!bfd_link_pic (info) && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
 		r_type = R_390_TLS_LE64;
 	    }
 	  if (r_type == R_390_TLS_GD64 && tls_type >= GOT_TLS_IE)
@@ -3018,14 +3063,14 @@ elf_s390_relocate_section (bfd *output_b
 	      if (local_got_offsets == NULL)
 		abort();
 	      off = local_got_offsets[r_symndx];
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		goto emit_tls_relocs;
 	    }
 	  else
 	    {
 	      off = h->got.offset;
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (info->shared || h->dynindx != -1 || tls_type < GOT_TLS_IE)
+	      if (bfd_link_pic (info) || h->dynindx != -1 || tls_type < GOT_TLS_IE)
 		goto emit_tls_relocs;
 	    }
 
@@ -3042,7 +3087,7 @@ elf_s390_relocate_section (bfd *output_b
 	  break;
 
 	case R_390_TLS_LDM64:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    /* The literal pool entry this relocation refers to gets ignored
 	       by the optimized code of the local exec model. Do nothing
 	       and the value will turn out zero.  */
@@ -3080,7 +3125,7 @@ elf_s390_relocate_section (bfd *output_b
 	  break;
 
 	case R_390_TLS_LE64:
-	  if (info->shared && !info->pie)
+	  if (bfd_link_dll (info))
 	    {
 	      /* Linking a shared library with non-fpic code requires
 		 a R_390_TLS_TPOFF relocation.  */
@@ -3117,7 +3162,7 @@ elf_s390_relocate_section (bfd *output_b
 	  continue;
 
 	case R_390_TLS_LDO64:
-	  if (info->shared || (input_section->flags & SEC_DEBUGGING))
+	  if (bfd_link_pic (info) || (input_section->flags & SEC_DEBUGGING))
 	    relocation -= dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */
@@ -3139,7 +3184,7 @@ elf_s390_relocate_section (bfd *output_b
 
 	  if (r_type == R_390_TLS_LOAD)
 	    {
-	      if (!info->shared && (h == NULL || h->dynindx == -1))
+	      if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 		{
 		  /* IE->LE transition. Four valid cases:
 		     lg %rx,(0,%ry)    -> sllg %rx,%ry,0
@@ -3181,7 +3226,7 @@ elf_s390_relocate_section (bfd *output_b
 	      insn1 = bfd_get_16 (input_bfd, contents + rel->r_offset + 4);
 	      if ((insn0 & 0xffff0000) != 0xc0e50000)
 		invalid_tls_insn (input_bfd, input_section, rel);
-	      if (!info->shared && (h == NULL || h->dynindx == -1))
+	      if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 		{
 		  /* GD->LE transition.
 		     brasl %r14,__tls_get_addr@plt -> brcl 0,. */
@@ -3200,7 +3245,7 @@ elf_s390_relocate_section (bfd *output_b
 	    }
 	  else if (r_type == R_390_TLS_LDCALL)
 	    {
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		{
 		  unsigned int insn0, insn1;
 
@@ -3230,7 +3275,8 @@ elf_s390_relocate_section (bfd *output_b
 	       && h->def_dynamic)
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	   input_bfd,
 	   input_section,
@@ -3281,17 +3327,13 @@ elf_s390_relocate_section (bfd *output_b
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
@@ -3370,7 +3412,7 @@ elf_s390_finish_ifunc_symbol (bfd *outpu
 
   if (!h
       || h->dynindx == -1
-      || ((info->executable
+      || ((bfd_link_executable (info)
 	   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	  && h->def_regular))
     {
@@ -3414,17 +3456,16 @@ elf_s390_finish_dynamic_symbol (bfd *out
 
       /* This symbol has an entry in the procedure linkage table.  Set
 	 it up.  */
-      if (s390_is_ifunc_symbol_p (h))
+      if (s390_is_ifunc_symbol_p (h) && h->def_regular)
 	{
-	  /* If we can resolve the IFUNC symbol locally we generate an
-	     IRELATIVE reloc.  */
-	  elf_s390_finish_ifunc_symbol (output_bfd, info, h, htab, h->plt.offset,
-					eh->ifunc_resolver_address +
-					eh->ifunc_resolver_section->output_offset +
-					eh->ifunc_resolver_section->output_section->vma);
-				 ;
-	  /* Fallthrough.  Handling of explicit GOT slots of IFUNC
-	     symbols is below.  */
+	  elf_s390_finish_ifunc_symbol (output_bfd, info, h,
+	    htab, h->plt.offset,
+	    eh->ifunc_resolver_address +
+	    eh->ifunc_resolver_section->output_offset +
+	    eh->ifunc_resolver_section->output_section->vma);
+
+	  /* Do not return yet.  Handling of explicit GOT slots of
+	     IFUNC symbols is below.  */
 	}
       else
 	{
@@ -3512,7 +3553,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
 
       if (h->def_regular && s390_is_ifunc_symbol_p (h))
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* An explicit GOT slot usage needs GLOB_DAT.  If the
 		 symbol references local the implicit got.iplt slot
@@ -3532,8 +3573,8 @@ elf_s390_finish_dynamic_symbol (bfd *out
 	      return TRUE;
 	    }
 	}
-      else if (info->shared
-	  && SYMBOL_REFERENCES_LOCAL (info, h))
+      else if (bfd_link_pic (info)
+	       && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  /* If this is a static link, or it is a -Bsymbolic link and
 	     the symbol is defined locally or was forced to be local
@@ -3552,7 +3593,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
       else
 	{
 	  BFD_ASSERT((h->got.offset & 1) == 0);
-do_glob_dat:
+	do_glob_dat:
 	  bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgot->contents + h->got.offset);
 	  rela.r_info = ELF64_R_INFO (h->dynindx, R_390_GLOB_DAT);
 	  rela.r_addend = 0;
@@ -3566,6 +3607,7 @@ do_glob_dat:
   if (h->needs_copy)
     {
       Elf_Internal_Rela rela;
+      asection *s;
       bfd_byte *loc;
 
       /* This symbols needs a copy reloc.  Set it up.  */
@@ -3573,7 +3615,7 @@ do_glob_dat:
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->elf.srelbss == NULL)
 	abort ();
 
       rela.r_offset = (h->root.u.def.value
@@ -3581,8 +3623,11 @@ do_glob_dat:
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELF64_R_INFO (h->dynindx, R_390_COPY);
       rela.r_addend = 0;
-      loc = htab->srelbss->contents;
-      loc += htab->srelbss->reloc_count++ * sizeof (Elf64_External_Rela);
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
+      loc = s->contents + s->reloc_count++ * sizeof (Elf64_External_Rela);
       bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
     }
 
@@ -3603,6 +3648,23 @@ elf_s390_reloc_type_class (const struct 
 			   const asection *rel_sec ATTRIBUTE_UNUSED,
 			   const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
+  unsigned long r_symndx = ELF64_R_SYM (rela->r_info);
+  Elf_Internal_Sym sym;
+
+  if (htab->elf.dynsym == NULL
+      || !bed->s->swap_symbol_in (abfd,
+				  (htab->elf.dynsym->contents
+				   + r_symndx * bed->s->sizeof_sym),
+				  0, &sym))
+    abort ();
+
+  /* Check relocation against STT_GNU_IFUNC symbol.  */
+  if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+    return reloc_class_ifunc;
+
   switch ((int) ELF64_R_TYPE (rela->r_info))
     {
     case R_390_RELATIVE:
@@ -3657,16 +3719,17 @@ elf_s390_finish_dynamic_sections (bfd *o
 	      continue;
 
 	    case DT_PLTGOT:
-	      dyn.d_un.d_ptr = htab->elf.sgot->output_section->vma;
+	      s = htab->elf.sgotplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_JMPREL:
-	      dyn.d_un.d_ptr = htab->elf.srelplt->output_section->vma;
+	      s = htab->elf.srelplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = htab->elf.srelplt->output_section;
-	      dyn.d_un.d_val = s->size;
+	      dyn.d_un.d_val = htab->elf.srelplt->size + htab->elf.irelplt->size;
 	      break;
 
 	    case DT_RELASZ:
@@ -3677,8 +3740,7 @@ elf_s390_finish_dynamic_sections (bfd *o
 		 linker script arranges for .rela.plt to follow all
 		 other relocation sections, we don't have to worry
 		 about changing the DT_RELA entry.  */
-	      s = htab->elf.srelplt->output_section;
-	      dyn.d_un.d_val -= s->size;
+	      dyn.d_un.d_val -= htab->elf.srelplt->size + htab->elf.irelplt->size;
 	      break;
 	    }
 
@@ -3693,9 +3755,10 @@ elf_s390_finish_dynamic_sections (bfd *o
 		  PLT_FIRST_ENTRY_SIZE);
 	  /* Fixup relative address to start of GOT */
 	  bfd_put_32 (output_bfd,
-		      (htab->elf.sgotplt->output_section->vma +
-		       htab->elf.sgotplt->output_offset
-		       - htab->elf.splt->output_section->vma - 6)/2,
+		      (htab->elf.sgotplt->output_section->vma
+		       + htab->elf.sgotplt->output_offset
+		       - htab->elf.splt->output_section->vma
+		       - htab->elf.splt->output_offset - 6)/2,
 		      htab->elf.splt->contents + 8);
 	}
       if (elf_section_data (htab->elf.splt->output_section) != NULL)
@@ -3715,7 +3778,7 @@ elf_s390_finish_dynamic_sections (bfd *o
 	  /* One entry for shared object struct ptr.  */
 	  bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 8);
 	  /* One entry for _dl_runtime_resolve.  */
-	  bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 12);
+	  bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 16);
 	}
 
       elf_section_data (htab->elf.sgot->output_section)
@@ -3755,7 +3818,120 @@ elf_s390_finish_dynamic_sections (bfd *o
 
   return TRUE;
 }
+
+/* Support for core dump NOTE sections.  */
+
+static bfd_boolean
+elf_s390_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  int offset;
+  size_t size;
+
+  switch (note->descsz)
+    {
+    default:
+      return FALSE;
+
+    case 336:			/* sizeof(struct elf_prstatus) on s390x */
+      /* pr_cursig */
+      elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
+
+      /* pr_pid */
+      elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 32);
+
+      /* pr_reg */
+      offset = 112;
+      size = 216;
+      break;
+    }
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+					  size, note->descpos + offset);
+}
+
+static bfd_boolean
+elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->descsz)
+    {
+    default:
+      return FALSE;
+
+    case 136:			/* sizeof(struct elf_prpsinfo) on s390x */
+      elf_tdata (abfd)->core->pid
+	= bfd_get_32 (abfd, note->descdata + 24);
+      elf_tdata (abfd)->core->program
+	= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
+      elf_tdata (abfd)->core->command
+	= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
+    }
+
+  /* Note that for some reason, a spurious space is tacked
+     onto the end of the args in some (at least one anyway)
+     implementations, so strip it off if it exists.  */
+
+  {
+    char *command = elf_tdata (abfd)->core->command;
+    int n = strlen (command);
 
+    if (0 < n && command[n - 1] == ' ')
+      command[n - 1] = '\0';
+  }
+
+  return TRUE;
+}
+
+static char *
+elf_s390_write_core_note (bfd *abfd, char *buf, int *bufsiz,
+			  int note_type, ...)
+{
+  va_list ap;
+
+  switch (note_type)
+    {
+    default:
+      return NULL;
+
+    case NT_PRPSINFO:
+      {
+	char data[136] = { 0 };
+	const char *fname, *psargs;
+
+	va_start (ap, note_type);
+	fname = va_arg (ap, const char *);
+	psargs = va_arg (ap, const char *);
+	va_end (ap);
+
+	strncpy (data + 40, fname, 16);
+	strncpy (data + 56, psargs, 80);
+	return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				   &data, sizeof (data));
+      }
+
+    case NT_PRSTATUS:
+      {
+	char data[336] = { 0 };
+	long pid;
+	int cursig;
+	const void *gregs;
+
+	va_start (ap, note_type);
+	pid = va_arg (ap, long);
+	cursig = va_arg (ap, int);
+	gregs = va_arg (ap, const void *);
+	va_end (ap);
+
+	bfd_put_16 (abfd, cursig, data + 12);
+	bfd_put_32 (abfd, pid, data + 32);
+	memcpy (data + 112, gregs, 216);
+	return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				   &data, sizeof (data));
+      }
+    }
+  /* NOTREACHED */
+}
+
 /* Return address for Ith PLT stub in section PLT, for relocation REL
    or (bfd_vma) -1 if it should not be included.  */
 
@@ -3770,15 +3946,12 @@ elf_s390_plt_sym_val (bfd_vma i, const a
    object file when linking.  */
 
 static bfd_boolean
-elf64_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
-  if (!is_s390_elf (ibfd) || !is_s390_elf (obfd))
+  if (!is_s390_elf (ibfd) || !is_s390_elf (info->output_bfd))
     return TRUE;
 
-  if (!elf_s390_merge_obj_attributes (ibfd, obfd))
-    return FALSE;
-
-  return TRUE;
+  return elf_s390_merge_obj_attributes (ibfd, info);
 }
 
 /* Why was the hash table entry size definition changed from
@@ -3832,6 +4005,7 @@ const struct elf_size_info s390_elf64_si
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	24
+#define elf_backend_want_dynrelro	1
 #define elf_backend_rela_normal		1
 
 #define elf_info_to_howto		elf_s390_info_to_howto
@@ -3845,7 +4019,7 @@ const struct elf_size_info s390_elf64_si
 #define elf_backend_adjust_dynamic_symbol     elf_s390_adjust_dynamic_symbol
 #define elf_backend_check_relocs	      elf_s390_check_relocs
 #define elf_backend_copy_indirect_symbol      elf_s390_copy_indirect_symbol
-#define elf_backend_create_dynamic_sections   elf_s390_create_dynamic_sections
+#define elf_backend_create_dynamic_sections   _bfd_elf_create_dynamic_sections
 #define elf_backend_finish_dynamic_sections   elf_s390_finish_dynamic_sections
 #define elf_backend_finish_dynamic_symbol     elf_s390_finish_dynamic_symbol
 #define elf_backend_gc_mark_hook	      elf_s390_gc_mark_hook
@@ -3854,6 +4028,9 @@ const struct elf_size_info s390_elf64_si
 #define elf_backend_relocate_section	      elf_s390_relocate_section
 #define elf_backend_size_dynamic_sections     elf_s390_size_dynamic_sections
 #define elf_backend_init_index_section	      _bfd_elf_init_1_index_section
+#define elf_backend_grok_prstatus	      elf_s390_grok_prstatus
+#define elf_backend_grok_psinfo		      elf_s390_grok_psinfo
+#define elf_backend_write_core_note	      elf_s390_write_core_note
 #define elf_backend_plt_sym_val		      elf_s390_plt_sym_val
 #define elf_backend_add_symbol_hook           elf_s390_add_symbol_hook
 #define elf_backend_sort_relocs_p             elf_s390_elf_sort_relocs_p
@@ -3861,19 +4038,4 @@ const struct elf_size_info s390_elf64_si
 #define bfd_elf64_mkobject		elf_s390_mkobject
 #define elf_backend_object_p		elf_s390_object_p
 
-/* Enable ELF64 archive functions.  */
-#define bfd_elf64_archive_functions
-extern bfd_boolean bfd_elf64_archive_slurp_armap (bfd *);
-extern bfd_boolean bfd_elf64_archive_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int);
-
-#define bfd_elf64_archive_slurp_extended_name_table 	_bfd_archive_coff_slurp_extended_name_table
-#define bfd_elf64_archive_construct_extended_name_table _bfd_archive_coff_construct_extended_name_table
-#define bfd_elf64_archive_truncate_arname 		_bfd_archive_coff_truncate_arname
-#define bfd_elf64_archive_read_ar_hdr			_bfd_archive_coff_read_ar_hdr
-#define bfd_elf64_archive_write_ar_hdr			_bfd_archive_coff_write_ar_hdr
-#define bfd_elf64_archive_openr_next_archived_file 	_bfd_archive_coff_openr_next_archived_file
-#define bfd_elf64_archive_get_elt_at_index 		_bfd_archive_coff_get_elt_at_index
-#define bfd_elf64_archive_generic_stat_arch_elt 	_bfd_archive_coff_generic_stat_arch_elt
-#define bfd_elf64_archive_update_armap_timestamp 	_bfd_archive_coff_update_armap_timestamp
-
 #include "elf64-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-sh64.c ./bfd/elf64-sh64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-sh64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-sh64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 64-bit ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -53,7 +53,7 @@
 #define elf_sh64_plt_symbol_offset(info) 0
 
 /* Return offset of the relocation in PLT entry.  */
-#define elf_sh64_plt_reloc_offset(info) (info->shared ? 52 : 44)
+#define elf_sh64_plt_reloc_offset(info) (bfd_link_pic (info) ? 52 : 44)
 
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
 
@@ -1432,7 +1432,6 @@ sh_elf64_relocate_section (bfd *output_b
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
-  bfd *dynobj;
   bfd_vma *local_got_offsets;
   asection *sgot;
   asection *sgotplt;
@@ -1442,12 +1441,8 @@ sh_elf64_relocate_section (bfd *output_b
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
-  dynobj = elf_hash_table (info)->dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
 
-  sgot = NULL;
-  sgotplt = NULL;
-  splt = NULL;
   sreloc = NULL;
 
   rel = relocs;
@@ -1508,15 +1503,15 @@ sh_elf64_relocate_section (bfd *output_b
 	     datalabel processing here.  Make sure this does not change
 	     without notice.  */
 	  if ((sym->st_other & STO_SH5_ISA32) != 0)
-	    ((*info->callbacks->reloc_dangerous)
-	     (info,
-	      _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
-	      input_bfd, input_section, rel->r_offset));
+	    (*info->callbacks->reloc_dangerous)
+	      (info,
+	       _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
+	       input_bfd, input_section, rel->r_offset);
 
 	  if (sec != NULL && discarded_section (sec))
 	    /* Handled below.  */
 	    ;
-	  else if (info->relocatable)
+	  else if (bfd_link_relocatable (info))
 	    {
 	      /* This is a relocatable link.  We don't have to change
 		 anything, unless the reloc is against a section symbol,
@@ -1539,7 +1534,8 @@ sh_elf64_relocate_section (bfd *output_b
 
 	      if (howto->rightshift || howto->src_mask != 0xffffffff)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
 		     input_bfd, input_section,
 		     (long) rel->r_offset, howto->name);
@@ -1592,7 +1588,7 @@ sh_elf64_relocate_section (bfd *output_b
 		       || r_type == R_SH_GOT_MEDHI16
 		       || r_type == R_SH_GOT_HI16)
 		      && elf_hash_table (info)->dynamic_sections_created
-		      && (! info->shared
+		      && (! bfd_link_pic (info)
 			  || (! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular))
 		  /* The cases above are those in which relocation is
@@ -1600,7 +1596,7 @@ sh_elf64_relocate_section (bfd *output_b
 		     below are those in which we must defer relocation
 		     to run-time, because we can't resolve absolute
 		     addresses when creating a shared library.  */
-		  || (info->shared
+		  || (bfd_link_pic (info)
 		      && ((! info->symbolic && h->dynindx != -1)
 			  || !h->def_regular)
 		      && ((r_type == R_SH_64
@@ -1629,13 +1625,14 @@ sh_elf64_relocate_section (bfd *output_b
 				 STT_DATALABEL on the way to it.  */
 			      | ((h->other & STO_SH5_ISA32) != 0
 				 && ! seen_stt_datalabel));
-	      else if (!info->relocatable
+	      else if (!bfd_link_relocatable (info)
 		       && (_bfd_elf_section_offset (output_bfd, info,
 						    input_section,
 						    rel->r_offset)
 			   != (bfd_vma) -1))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 		     input_bfd,
 		     input_section,
@@ -1649,22 +1646,19 @@ sh_elf64_relocate_section (bfd *output_b
 	  else if (info->unresolved_syms_in_objects == RM_IGNORE
 		   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    ;
-	  else if (!info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd,
-		      input_section, rel->r_offset,
-		      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-		       || ELF_ST_VISIBILITY (h->other)))))
-		return FALSE;
-	    }
+	  else if (!bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd,
+	       input_section, rel->r_offset,
+	       (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+		|| ELF_ST_VISIBILITY (h->other)));
 	}
 
       if (sec != NULL && discarded_section (sec))
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       disp = (relocation
@@ -1681,7 +1675,8 @@ sh_elf64_relocate_section (bfd *output_b
 	}
       if (dropped != 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: error: unaligned relocation type %d at %08x reloc %08x\n"),
 	     bfd_get_filename (input_bfd), (int)r_type, (unsigned)rel->r_offset, (unsigned)relocation);
 	  bfd_set_error (bfd_error_bad_value);
@@ -1691,7 +1686,7 @@ sh_elf64_relocate_section (bfd *output_b
 	{
 	case R_SH_64:
 	case R_SH_64_PCREL:
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (input_section->flags & SEC_ALLOC) != 0
 	      && (r_type != R_SH_64_PCREL
 		  || (h != NULL
@@ -1785,7 +1780,7 @@ sh_elf64_relocate_section (bfd *output_b
 	  if (h == NULL
 	      || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
 	      || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
-	      || ! info->shared
+	      || ! bfd_link_pic (info)
 	      || info->symbolic
 	      || h->dynindx == -1
 	      || h->plt.offset == (bfd_vma) -1
@@ -1794,11 +1789,8 @@ sh_elf64_relocate_section (bfd *output_b
 
 	  /* Relocation is to the entry for this symbol in the global
 	     offset table extension for the procedure linkage table.  */
-	  if (sgotplt == NULL)
-	    {
-	      sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
-	      BFD_ASSERT (sgotplt != NULL);
-	    }
+	  sgotplt = elf_hash_table (info)->sgotplt;
+	  BFD_ASSERT (sgotplt != NULL);
 
 	  relocation = (sgotplt->output_offset
 			+ ((h->plt.offset / elf_sh64_sizeof_plt (info)
@@ -1817,11 +1809,8 @@ sh_elf64_relocate_section (bfd *output_b
 	case R_SH_GOT10BY8:
 	  /* Relocation is to the entry for this symbol in the global
 	     offset table.  */
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
+	  sgot = elf_hash_table (info)->sgot;
+	  BFD_ASSERT (sgot != NULL);
 
 	  if (h != NULL)
 	    {
@@ -1838,7 +1827,7 @@ sh_elf64_relocate_section (bfd *output_b
 	      BFD_ASSERT (off != (bfd_vma) -1);
 
 	      if (! elf_hash_table (info)->dynamic_sections_created
-		  || (info->shared
+		  || (bfd_link_pic (info)
 		      && (info->symbolic || h->dynindx == -1
 			  || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
 			  || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
@@ -1907,13 +1896,13 @@ sh_elf64_relocate_section (bfd *output_b
 		{
 		  bfd_put_64 (output_bfd, relocation, sgot->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
 		      bfd_byte *loc;
 
-		      s = bfd_get_linker_section (dynobj, ".rela.got");
+		      s = elf_hash_table (info)->srelgot;
 		      BFD_ASSERT (s != NULL);
 
 		      outrel.r_offset = (sgot->output_section->vma
@@ -1946,11 +1935,8 @@ sh_elf64_relocate_section (bfd *output_b
 	  /* Relocation is relative to the start of the global offset
 	     table.  */
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
+	  sgot = elf_hash_table (info)->sgot;
+	  BFD_ASSERT (sgot != NULL);
 
 	  /* Note that sgot->output_offset is not involved in this
 	     calculation.  We always want the start of .got.  If we
@@ -1971,11 +1957,8 @@ sh_elf64_relocate_section (bfd *output_b
 	case R_SH_GOTPC_HI16:
 	  /* Use global offset table as symbol value.  */
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
+	  sgot = elf_hash_table (info)->sgot;
+	  BFD_ASSERT (sgot != NULL);
 
 	  relocation = sgot->output_section->vma;
 
@@ -2009,11 +1992,8 @@ sh_elf64_relocate_section (bfd *output_b
 	      goto final_link_relocate;
 	    }
 
-	  if (splt == NULL)
-	    {
-	      splt = bfd_get_linker_section (dynobj, ".plt");
-	      BFD_ASSERT (splt != NULL);
-	    }
+	  splt = elf_hash_table (info)->splt;
+	  BFD_ASSERT (splt != NULL);
 
 	  relocation = (splt->output_section->vma
 			+ splt->output_offset
@@ -2081,11 +2061,9 @@ sh_elf64_relocate_section (bfd *output_b
 		    if (*name == '\0')
 		      name = bfd_section_name (input_bfd, sec);
 		  }
-		if (! ((*info->callbacks->reloc_overflow)
-		       (info, (h ? &h->root : NULL), name, howto->name,
-			(bfd_vma) 0, input_bfd, input_section,
-			rel->r_offset)))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      }
 	      break;
 	    }
@@ -2265,7 +2243,7 @@ sh_elf64_copy_private_data_internal (bfd
 
   /* Copy object attributes.  */
   _bfd_elf_copy_private_bfd_data (ibfd, obfd);
-  
+
   return sh_elf64_set_private_flags (obfd, elf_elfheader (ibfd)->e_flags);
 }
 
@@ -2276,11 +2254,12 @@ sh_elf64_copy_private_data (bfd *ibfd, b
 }
 
 static bfd_boolean
-sh_elf64_merge_private_data (bfd *ibfd, bfd *obfd)
+sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags, new_flags;
 
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -2293,15 +2272,18 @@ sh_elf64_merge_private_data (bfd *ibfd, 
 
       if (bfd_get_arch_size (ibfd) == 32
 	  && bfd_get_arch_size (obfd) == 64)
+	/* xgettext:c-format */
 	msg = _("%s: compiled as 32-bit object and %s is 64-bit");
       else if (bfd_get_arch_size (ibfd) == 64
 	       && bfd_get_arch_size (obfd) == 32)
+	/* xgettext:c-format */
 	msg = _("%s: compiled as 64-bit object and %s is 32-bit");
       else
+	/* xgettext:c-format */
 	msg = _("%s: object size does not match that of target %s");
 
-      (*_bfd_error_handler) (msg, bfd_get_filename (ibfd),
-			     bfd_get_filename (obfd));
+      _bfd_error_handler (msg, bfd_get_filename (ibfd),
+			  bfd_get_filename (obfd));
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
     }
@@ -2319,7 +2301,7 @@ sh_elf64_merge_private_data (bfd *ibfd, 
      here as things change.  */
   else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	("%s: does not use the SH64 64-bit ABI as previous modules do",
 	 bfd_get_filename (ibfd));
       bfd_set_error (bfd_error_bad_value);
@@ -2374,11 +2356,9 @@ sh_elf64_check_relocs (bfd *abfd, struct
   asection *srelgot;
   asection *sreloc;
 
-  sgot = NULL;
-  srelgot = NULL;
   sreloc = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2470,29 +2450,9 @@ sh_elf64_check_relocs (bfd *abfd, struct
 	case R_SH_GOT10BY8:
 	  /* This symbol requires a global offset table entry.  */
 
-	  if (sgot == NULL)
-	    {
-	      sgot = bfd_get_linker_section (dynobj, ".got");
-	      BFD_ASSERT (sgot != NULL);
-	    }
-
-	  if (srelgot == NULL
-	      && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || ! bfd_set_section_alignment (dynobj, srelgot, 2))
-		    return FALSE;
-		}
-	    }
+	  sgot = elf_hash_table (info)->sgot;
+	  srelgot = elf_hash_table (info)->srelgot;
+	  BFD_ASSERT (sgot != NULL && srelgot != NULL);
 
 	  if (h != NULL)
 	    {
@@ -2569,7 +2529,7 @@ sh_elf64_check_relocs (bfd *abfd, struct
 		  local_got_offsets[r_symndx] = sgot->size;
 		}
 
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  /* If we are generating a shared object, we need to
 		     output a R_SH_RELATIVE reloc so that the dynamic
@@ -2594,7 +2554,7 @@ sh_elf64_check_relocs (bfd *abfd, struct
 	  if (h == NULL
 	      || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
 	      || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
-	      || ! info->shared
+	      || ! bfd_link_pic (info)
 	      || info->symbolic
 	      || h->dynindx == -1
 	      || h->got.offset != (bfd_vma) -1)
@@ -2652,7 +2612,7 @@ sh_elf64_check_relocs (bfd *abfd, struct
 	     later (it is never cleared).  We account for that
 	     possibility below by storing information in the
 	     pcrel_relocs_copied field of the hash table entry.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      && (ELF32_R_TYPE (rel->r_info) != R_SH_64_PCREL
 		  || (h != NULL
@@ -2763,7 +2723,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, s
 	 right, and tweak the name when it's output.  Otherwise, we make
 	 an indirect symbol of it.  */
       flagword flags
-	= info->relocatable || info->emitrelocations
+	= bfd_link_relocatable (info) || info->emitrelocations
 	? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
 
       char *dl_name
@@ -2807,13 +2767,13 @@ sh64_elf64_add_symbol_hook (bfd *abfd, s
 	free (dl_name);
 
       if (h->type != STT_DATALABEL
-	  || ((info->relocatable || info->emitrelocations)
+	  || ((bfd_link_relocatable (info) || info->emitrelocations)
 	      && h->root.type != bfd_link_hash_undefined)
-	  || (! info->relocatable && !info->emitrelocations
+	  || (! bfd_link_relocatable (info) && !info->emitrelocations
 	      && h->root.type != bfd_link_hash_indirect))
 	{
 	  /* Make sure we don't get confused on invalid input.  */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: encountered datalabel symbol in input"),
 	     bfd_get_filename (abfd));
 	  bfd_set_error (bfd_error_bad_value);
@@ -2853,7 +2813,7 @@ sh64_elf64_link_output_symbol_hook (stru
 {
   char *name = (char *) cname;
 
-  if (info->relocatable || info->emitrelocations)
+  if (bfd_link_relocatable (info) || info->emitrelocations)
     {
       if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
 	name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
@@ -3161,7 +3121,7 @@ sh64_elf64_create_dynamic_sections (bfd 
       h->type = STT_OBJECT;
       elf_hash_table (info)->hplt = h;
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && ! bfd_elf_link_record_dynamic_symbol (info, h))
 	return FALSE;
     }
@@ -3201,7 +3161,7 @@ sh64_elf64_create_dynamic_sections (bfd 
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -3245,7 +3205,7 @@ sh64_elf64_adjust_dynamic_symbol (struct
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && !h->def_dynamic
 	  && !h->ref_dynamic)
 	{
@@ -3265,7 +3225,7 @@ sh64_elf64_adjust_dynamic_symbol (struct
 	    return FALSE;
 	}
 
-      s = bfd_get_linker_section (dynobj, ".plt");
+      s = elf_hash_table (info)->splt;
       BFD_ASSERT (s != NULL);
 
       /* If this is the first .plt entry, make room for the special
@@ -3278,7 +3238,7 @@ sh64_elf64_adjust_dynamic_symbol (struct
 	 location in the .plt.  This is required to make function
 	 pointers compare as equal between the normal executable and
 	 the shared library.  */
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && !h->def_regular)
 	{
 	  h->root.u.def.section = s;
@@ -3293,13 +3253,13 @@ sh64_elf64_adjust_dynamic_symbol (struct
       /* We also need to make an entry in the .got.plt section, which
 	 will be placed in the .got section by the linker script.  */
 
-      s = bfd_get_linker_section (dynobj, ".got.plt");
+      s = elf_hash_table (info)->sgotplt;
       BFD_ASSERT (s != NULL);
       s->size += 8;
 
       /* We also need to make an entry in the .rela.plt section.  */
 
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = elf_hash_table (info)->srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf64_External_Rela);
 
@@ -3325,7 +3285,7 @@ sh64_elf64_adjust_dynamic_symbol (struct
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -3404,7 +3364,7 @@ sh64_elf64_size_dynamic_sections (bfd *o
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -3419,7 +3379,7 @@ sh64_elf64_size_dynamic_sections (bfd *o
 	 not actually use these entries.  Reset the size of .rela.got,
 	 which will cause it to get stripped from the output file
 	 below.  */
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = elf_hash_table (info)->srelgot;
       if (s != NULL)
 	s->size = 0;
     }
@@ -3428,7 +3388,7 @@ sh64_elf64_size_dynamic_sections (bfd *o
      PC relative relocs against symbols defined in a regular object.
      We allocated space for them in the check_relocs routine, but we
      will not fill them in in the relocate_section routine.  */
-  if (info->shared && info->symbolic)
+  if (bfd_link_pic (info) && info->symbolic)
     sh64_elf64_link_hash_traverse (elf_hash_table (info),
 				   sh64_elf64_discard_copies, NULL);
 
@@ -3525,7 +3485,7 @@ sh64_elf64_size_dynamic_sections (bfd *o
 	 must add the entries now so that we get the correct size for
 	 the .dynamic section.  The DT_DEBUG entry is filled in by the
 	 dynamic linker and used by the debugger.  */
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!_bfd_elf_add_dynamic_entry (info, DT_DEBUG, 0))
 	    return FALSE;
@@ -3588,9 +3548,9 @@ sh64_elf64_finish_dynamic_symbol (bfd *o
 
       BFD_ASSERT (h->dynindx != -1);
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
-      sgot = bfd_get_linker_section (dynobj, ".got.plt");
-      srel = bfd_get_linker_section (dynobj, ".rela.plt");
+      splt = elf_hash_table (info)->splt;
+      sgot = elf_hash_table (info)->sgotplt;
+      srel = elf_hash_table (info)->srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -3604,11 +3564,11 @@ sh64_elf64_finish_dynamic_symbol (bfd *o
 	 The first three are reserved.  */
       got_offset = (plt_index + 3) * 8;
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	got_offset -= GOT_BIAS;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  if (elf_sh64_plt_entry == NULL)
 	    {
@@ -3647,7 +3607,7 @@ sh64_elf64_finish_dynamic_symbol (bfd *o
 			      + elf_sh64_plt_symbol_offset (info)));
 	}
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	got_offset += GOT_BIAS;
 
       movi_shori_putval (output_bfd,
@@ -3691,8 +3651,8 @@ sh64_elf64_finish_dynamic_symbol (bfd *o
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
 
-      sgot = bfd_get_linker_section (dynobj, ".got");
-      srel = bfd_get_linker_section (dynobj, ".rela.got");
+      sgot = elf_hash_table (info)->sgot;
+      srel = elf_hash_table (info)->srelgot;
       BFD_ASSERT (sgot != NULL && srel != NULL);
 
       rel.r_offset = (sgot->output_section->vma
@@ -3704,7 +3664,7 @@ sh64_elf64_finish_dynamic_symbol (bfd *o
 	 the symbol was forced to be local because of a version file.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic || h->dynindx == -1)
 	  && h->def_regular)
 	{
@@ -3770,7 +3730,7 @@ sh64_elf64_finish_dynamic_sections (bfd 
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_linker_section (dynobj, ".got.plt");
+  sgot = elf_hash_table (info)->sgotplt;
   BFD_ASSERT (sgot != NULL);
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
@@ -3817,48 +3777,29 @@ sh64_elf64_finish_dynamic_sections (bfd 
 	      break;
 
 	    case DT_PLTGOT:
-	      name = ".got";
+	      s = elf_hash_table (info)->sgotplt;
 	      goto get_vma;
 
 	    case DT_JMPREL:
-	      name = ".rela.plt";
+	      s = elf_hash_table (info)->srelplt;
 	    get_vma:
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      BFD_ASSERT (s != NULL);
+	      s = elf_hash_table (info)->srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* My reading of the SVR4 ABI indicates that the
-		 procedure linkage table relocs (DT_JMPREL) should be
-		 included in the overall relocs (DT_RELA).  This is
-		 what Solaris does.  However, UnixWare can not handle
-		 that case.  Therefore, we override the DT_RELASZ entry
-		 here to make it not include the JMPREL relocs.  Since
-		 the linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
       /* Fill in the first entry in the procedure linkage table.  */
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       if (splt && splt->size > 0)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      if (elf_sh64_pic_plt_entry == NULL)
 		{
@@ -4003,6 +3944,7 @@ static const struct bfd_elf_special_sect
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	24
+#define elf_backend_dtrel_excludes_plt	1
 
 #include "elf64-target.h"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-sparc.c ./bfd/elf64-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPARC-specific support for 64-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -99,7 +99,9 @@ elf64_sparc_slurp_one_reloc_table (bfd *
 
       if (ELF64_R_SYM (rela.r_info) == STN_UNDEF
 	  /* PR 17512: file: 996185f8.  */
-	  || ELF64_R_SYM (rela.r_info) > bfd_get_symcount (abfd))
+	  || (!dynamic && ELF64_R_SYM(rela.r_info) > bfd_get_symcount(abfd))
+          || (dynamic
+              && ELF64_R_SYM(rela.r_info) > bfd_get_dynamic_symcount(abfd)))
 	relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
       else
 	{
@@ -426,11 +428,10 @@ elf64_sparc_add_symbol_hook (bfd *abfd, 
 {
   static const char *const stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
 
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
     {
@@ -443,7 +444,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, 
 	case 2: reg -= 2; break;
 	case 6: reg -= 4; break;
 	default:
-          (*_bfd_error_handler)
+	  _bfd_error_handler
             (_("%B: Only registers %%g[2367] can be declared using STT_REGISTER"),
              abfd);
 	  return FALSE;
@@ -463,7 +464,8 @@ elf64_sparc_add_symbol_hook (bfd *abfd, 
 
       if (p->name != NULL && strcmp (p->name, *namep))
 	{
-          (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
             (_("Register %%g%d used incompatibly: %s in %B, previously %s in %B"),
              abfd, p->abfd, (int) sym->st_value,
              **namep ? *namep : "#scratch",
@@ -486,7 +488,8 @@ elf64_sparc_add_symbol_hook (bfd *abfd, 
 
 		  if (type > STT_FUNC)
 		    type = 0;
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"),
 		     abfd, p->abfd, *namep, stt_types[type]);
 		  return FALSE;
@@ -531,7 +534,8 @@ elf64_sparc_add_symbol_hook (bfd *abfd, 
 
 	    if (type > STT_FUNC)
 	      type = 0;
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"),
 	       abfd, p->abfd, *namep, stt_types[type]);
 	    return FALSE;
@@ -637,8 +641,9 @@ elf64_sparc_symbol_processing (bfd *abfd
    object file when linking.  */
 
 static bfd_boolean
-elf64_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   bfd_boolean error;
   flagword new_flags, old_flags;
   int new_mm, old_mm;
@@ -684,7 +689,7 @@ elf64_sparc_merge_private_bfd_data (bfd 
 	      && (old_flags & EF_SPARC_HAL_R1))
 	    {
 	      error = TRUE;
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("%B: linking UltraSPARC specific with HAL specific code"),
 		 ibfd);
 	    }
@@ -703,7 +708,8 @@ elf64_sparc_merge_private_bfd_data (bfd 
       if (new_flags != old_flags)
         {
           error = TRUE;
-          (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
             (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
              ibfd, (long) new_flags, (long) old_flags);
         }
@@ -716,7 +722,7 @@ elf64_sparc_merge_private_bfd_data (bfd 
           return FALSE;
         }
     }
-  return _bfd_sparc_elf_merge_private_bfd_data (ibfd, obfd);
+  return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info);
 }
 
 /* MARCO: Set the correct entry size for the .stab section.  */
@@ -916,6 +922,7 @@ const struct elf_size_info elf64_sparc_s
 #define elf_backend_plt_readonly 0
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 8
+#define elf_backend_want_dynrelro 1
 #define elf_backend_rela_normal 1
 
 /* Section 5.2.4 of the ABI specifies a 256-byte boundary for the table.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-tilegx.c ./bfd/elf64-tilegx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-tilegx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-tilegx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx-specific support for 64-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -129,6 +129,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I
 #define elf_backend_plt_alignment 6
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 8
+#define elf_backend_want_dynrelro 1
 #define elf_backend_rela_normal 1
 #define elf_backend_default_execstack 0
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-tilegx.h ./bfd/elf64-tilegx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-tilegx.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-tilegx.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx-specific support for 64-bit ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-x86-64.c ./bfd/elf64-x86-64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf64-x86-64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf64-x86-64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* X86-64 specific support for ELF
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Jan Hubicka <jh@suse.cz>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -31,6 +31,7 @@
 #include "dwarf2.h"
 #include "libiberty.h"
 
+#include "opcode/i386.h"
 #include "elf/x86-64.h"
 
 #ifdef CORE_HEADER
@@ -176,12 +177,18 @@ static reloc_howto_type x86_64_elf_howto
   HOWTO(R_X86_64_PLT32_BND, 0, 2, 32, TRUE, 0, complain_overflow_signed,
 	bfd_elf_generic_reloc, "R_X86_64_PLT32_BND", FALSE, 0xffffffff, 0xffffffff,
 	TRUE),
+  HOWTO(R_X86_64_GOTPCRELX, 0, 2, 32, TRUE, 0, complain_overflow_signed,
+	bfd_elf_generic_reloc, "R_X86_64_GOTPCRELX", FALSE, 0xffffffff,
+	0xffffffff, TRUE),
+  HOWTO(R_X86_64_REX_GOTPCRELX, 0, 2, 32, TRUE, 0, complain_overflow_signed,
+	bfd_elf_generic_reloc, "R_X86_64_REX_GOTPCRELX", FALSE, 0xffffffff,
+	0xffffffff, TRUE),
 
   /* We have a gap in the reloc numbers here.
      R_X86_64_standard counts the number up to this point, and
      R_X86_64_vt_offset is the value to subtract from a reloc type of
      R_X86_64_GNU_VT* to form an index into this table.  */
-#define R_X86_64_standard (R_X86_64_PLT32_BND + 1)
+#define R_X86_64_standard (R_X86_64_REX_GOTPCRELX + 1)
 #define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard)
 
 /* GNU extension to record C++ vtable hierarchy.  */
@@ -253,8 +260,10 @@ static const struct elf_reloc_map x86_64
   { BFD_RELOC_X86_64_TLSDESC_CALL, R_X86_64_TLSDESC_CALL, },
   { BFD_RELOC_X86_64_TLSDESC,	R_X86_64_TLSDESC, },
   { BFD_RELOC_X86_64_IRELATIVE,	R_X86_64_IRELATIVE, },
-  { BFD_RELOC_X86_64_PC32_BND,	R_X86_64_PC32_BND,},
-  { BFD_RELOC_X86_64_PLT32_BND,	R_X86_64_PLT32_BND,},
+  { BFD_RELOC_X86_64_PC32_BND,	R_X86_64_PC32_BND, },
+  { BFD_RELOC_X86_64_PLT32_BND,	R_X86_64_PLT32_BND, },
+  { BFD_RELOC_X86_64_GOTPCRELX, R_X86_64_GOTPCRELX, },
+  { BFD_RELOC_X86_64_REX_GOTPCRELX, R_X86_64_REX_GOTPCRELX, },
   { BFD_RELOC_VTABLE_INHERIT,	R_X86_64_GNU_VTINHERIT, },
   { BFD_RELOC_VTABLE_ENTRY,	R_X86_64_GNU_VTENTRY, },
 };
@@ -276,8 +285,9 @@ elf_x86_64_rtype_to_howto (bfd *abfd, un
     {
       if (r_type >= (unsigned int) R_X86_64_standard)
 	{
-	  (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
-				 abfd, (int) r_type);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: invalid relocation type %d"),
+			      abfd, (int) r_type);
 	  r_type = R_X86_64_NONE;
 	}
       i = r_type;
@@ -649,6 +659,68 @@ static const bfd_byte elf_x86_64_eh_fram
   DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
 };
 
+/* .eh_frame covering the BND .plt section.  */
+
+static const bfd_byte elf_x86_64_eh_frame_bnd_plt[] =
+{
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x78,				/* Data alignment factor */
+  16,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 7, 8,		/* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
+  DW_CFA_offset + 16, 1,	/* DW_CFA_offset: r16 (rip) at cfa-8 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* R_X86_64_PC32 .plt goes here */
+  0, 0, 0, 0,			/* .plt size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_def_cfa_offset, 16,	/* DW_CFA_def_cfa_offset: 16 */
+  DW_CFA_advance_loc + 6,	/* DW_CFA_advance_loc: 6 to __PLT__+6 */
+  DW_CFA_def_cfa_offset, 24,	/* DW_CFA_def_cfa_offset: 24 */
+  DW_CFA_advance_loc + 10,	/* DW_CFA_advance_loc: 10 to __PLT__+16 */
+  DW_CFA_def_cfa_expression,	/* DW_CFA_def_cfa_expression */
+  11,				/* Block length */
+  DW_OP_breg7, 8,		/* DW_OP_breg7 (rsp): 8 */
+  DW_OP_breg16, 0,		/* DW_OP_breg16 (rip): 0 */
+  DW_OP_lit15, DW_OP_and, DW_OP_lit5, DW_OP_ge,
+  DW_OP_lit3, DW_OP_shl, DW_OP_plus,
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
+/* .eh_frame covering the .plt.got section.  */
+
+static const bfd_byte elf_x86_64_eh_frame_plt_got[] =
+{
+#define PLT_GOT_FDE_LENGTH		20
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x78,				/* Data alignment factor */
+  16,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 7, 8,		/* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
+  DW_CFA_offset + 16, 1,	/* DW_CFA_offset: r16 (rip) at cfa-8 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_GOT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* the start of .plt.got goes here */
+  0, 0, 0, 0,			/* .plt.got size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop,
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
 /* Architecture-specific backend data for x86-64.  */
 
 struct elf_x86_64_backend_data
@@ -683,6 +755,10 @@ struct elf_x86_64_backend_data
   /* .eh_frame covering the .plt section.  */
   const bfd_byte *eh_frame_plt;
   unsigned int eh_frame_plt_size;
+
+  /* .eh_frame covering the .plt.got section.  */
+  const bfd_byte *eh_frame_plt_got;
+  unsigned int eh_frame_plt_got_size;
 };
 
 #define get_elf_x86_64_arch_data(bed) \
@@ -711,6 +787,8 @@ static const struct elf_x86_64_backend_d
     6,                                  /* plt_lazy_offset */
     elf_x86_64_eh_frame_plt,            /* eh_frame_plt */
     sizeof (elf_x86_64_eh_frame_plt),   /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_plt_got,        /* eh_frame_plt_got */
+    sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 
 static const struct elf_x86_64_backend_data elf_x86_64_bnd_arch_bed =
@@ -727,12 +805,28 @@ static const struct elf_x86_64_backend_d
     1+6,                                /* plt_got_insn_size */
     11,                                 /* plt_plt_insn_end */
     0,                                  /* plt_lazy_offset */
-    elf_x86_64_eh_frame_plt,            /* eh_frame_plt */
-    sizeof (elf_x86_64_eh_frame_plt),   /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_bnd_plt,        /* eh_frame_plt */
+    sizeof (elf_x86_64_eh_frame_bnd_plt), /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_plt_got,        /* eh_frame_plt_got */
+    sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 
 #define	elf_backend_arch_data	&elf_x86_64_arch_bed
 
+/* Is a undefined weak symbol which is resolved to 0.  Reference to an
+   undefined weak symbol is resolved to 0 when building executable if
+   it isn't dynamic and
+   1. Has non-GOT/non-PLT relocations in text section.  Or
+   2. Has no GOT/PLT relocation.
+ */
+#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, GOT_RELOC, EH)	\
+  ((EH)->elf.root.type == bfd_link_hash_undefweak		\
+   && bfd_link_executable (INFO)				\
+   && (elf_x86_64_hash_table (INFO)->interp == NULL	 	\
+       || !(GOT_RELOC)						\
+       || (EH)->has_non_got_reloc				\
+       || !(INFO)->dynamic_undefined_weak))
+
 /* x86-64 ELF linker hash entry.  */
 
 struct elf_x86_64_link_hash_entry
@@ -767,6 +861,21 @@ struct elf_x86_64_link_hash_entry
   /* TRUE if symbol has at least one BND relocation.  */
   unsigned int has_bnd_reloc : 1;
 
+  /* TRUE if symbol has GOT or PLT relocations.  */
+  unsigned int has_got_reloc : 1;
+
+  /* TRUE if symbol has non-GOT/non-PLT relocations in text sections.  */
+  unsigned int has_non_got_reloc : 1;
+
+  /* 0: symbol isn't __tls_get_addr.
+     1: symbol is __tls_get_addr.
+     2: symbol is unknown.  */
+  unsigned int tls_get_addr : 2;
+
+  /* Reference count of C/C++ function pointer relocations in read-write
+     section which can be resolved at run-time.  */
+  bfd_signed_vma func_pointer_refcount;
+
   /* Information about the GOT PLT entry. Filled when there are both
      GOT and PLT relocations against the same function.  */
   union gotplt_union plt_got;
@@ -822,11 +931,12 @@ struct elf_x86_64_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
+  asection *interp;
   asection *plt_eh_frame;
   asection *plt_bnd;
+  asection *plt_bnd_eh_frame;
   asection *plt_got;
+  asection *plt_got_eh_frame;
 
   union
   {
@@ -866,6 +976,10 @@ struct elf_x86_64_link_hash_table
   bfd_vma next_jump_slot_index;
   /* The index of the next R_X86_64_IRELATIVE entry in .rela.plt.  */
   bfd_vma next_irelative_index;
+
+  /* TRUE if there are dynamic relocs against IFUNC symbols that apply
+     to read-only sections.  */
+  bfd_boolean readonly_dynrelocs_against_ifunc;
 };
 
 /* Get the x86-64 ELF linker hash table from a link_info structure.  */
@@ -906,6 +1020,10 @@ elf_x86_64_link_hash_newfunc (struct bfd
       eh->tls_type = GOT_UNKNOWN;
       eh->needs_copy = 0;
       eh->has_bnd_reloc = 0;
+      eh->has_got_reloc = 0;
+      eh->has_non_got_reloc = 0;
+      eh->tls_get_addr = 2;
+      eh->func_pointer_refcount = 0;
       eh->plt_bnd.offset = (bfd_vma) -1;
       eh->plt_got.offset = (bfd_vma) -1;
       eh->tlsdesc_got = (bfd_vma) -1;
@@ -976,6 +1094,7 @@ elf_x86_64_get_local_sym_hash (struct el
       ret->elf.indx = sec->id;
       ret->elf.dynstr_index = htab->r_sym (rel->r_info);
       ret->elf.dynindx = -1;
+      ret->func_pointer_refcount = 0;
       ret->plt_got.offset = (bfd_vma) -1;
       *slot = ret;
     }
@@ -1067,27 +1186,15 @@ elf_x86_64_create_dynamic_sections (bfd 
   if (htab == NULL)
     return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!htab->sdynbss)
-    abort ();
-
-  if (info->executable)
+  /* Set the contents of the .interp section to the interpreter.  */
+  if (bfd_link_executable (info) && !info->nointerp)
     {
-      /* Always allow copy relocs for building executables.  */
-      asection *s = bfd_get_linker_section (dynobj, ".rela.bss");
+      asection *s = bfd_get_linker_section (dynobj, ".interp");
       if (s == NULL)
-	{
-	  const struct elf_backend_data *bed = get_elf_backend_data (dynobj);
-	  s = bfd_make_section_anyway_with_flags (dynobj,
-						  ".rela.bss",
-						  (bed->dynamic_sec_flags
-						   | SEC_READONLY));
-	  if (s == NULL
-	      || ! bfd_set_section_alignment (dynobj, s,
-					      bed->s->log_file_align))
-	    return FALSE;
-	}
-      htab->srelbss = s;
+	abort ();
+      s->size = htab->dynamic_interpreter_size;
+      s->contents = (unsigned char *) htab->dynamic_interpreter;
+      htab->interp = s;
     }
 
   if (!info->no_ld_generated_unwind_info
@@ -1100,9 +1207,21 @@ elf_x86_64_create_dynamic_sections (bfd 
       htab->plt_eh_frame
 	= bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", flags);
       if (htab->plt_eh_frame == NULL
-	  || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3))
+	  || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame,
+					 ABI_64_P (dynobj) ? 3 : 2))
 	return FALSE;
     }
+
+  /* Align .got section to its entry size.  */
+  if (htab->elf.sgot != NULL
+      && !bfd_set_section_alignment (dynobj, htab->elf.sgot, 3))
+    return FALSE;
+
+  /* Align .got.plt section to its entry size.  */
+  if (htab->elf.sgotplt != NULL
+      && !bfd_set_section_alignment (dynobj, htab->elf.sgotplt, 3))
+    return FALSE;
+
   return TRUE;
 }
 
@@ -1118,8 +1237,9 @@ elf_x86_64_copy_indirect_symbol (struct 
   edir = (struct elf_x86_64_link_hash_entry *) dir;
   eind = (struct elf_x86_64_link_hash_entry *) ind;
 
-  if (!edir->has_bnd_reloc)
-    edir->has_bnd_reloc = eind->has_bnd_reloc;
+  edir->has_bnd_reloc |= eind->has_bnd_reloc;
+  edir->has_got_reloc |= eind->has_got_reloc;
+  edir->has_non_got_reloc |= eind->has_non_got_reloc;
 
   if (eind->dyn_relocs != NULL)
     {
@@ -1166,14 +1286,23 @@ elf_x86_64_copy_indirect_symbol (struct 
       /* If called to transfer flags for a weakdef during processing
 	 of elf_adjust_dynamic_symbol, don't copy non_got_ref.
 	 We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
-      dir->ref_dynamic |= ind->ref_dynamic;
+      if (dir->versioned != versioned_hidden)
+	dir->ref_dynamic |= ind->ref_dynamic;
       dir->ref_regular |= ind->ref_regular;
       dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
       dir->needs_plt |= ind->needs_plt;
       dir->pointer_equality_needed |= ind->pointer_equality_needed;
     }
   else
-    _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+    {
+      if (eind->func_pointer_refcount > 0)
+	{
+	  edir->func_pointer_refcount += eind->func_pointer_refcount;
+	  eind->func_pointer_refcount = 0;
+	}
+
+      _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+    }
 }
 
 static bfd_boolean
@@ -1212,22 +1341,8 @@ elf_x86_64_check_tls_transition (bfd *ab
   struct elf_link_hash_entry *h;
   bfd_vma offset;
   struct elf_x86_64_link_hash_table *htab;
-
-  /* Get the section contents.  */
-  if (contents == NULL)
-    {
-      if (elf_section_data (sec)->this_hdr.contents != NULL)
-	contents = elf_section_data (sec)->this_hdr.contents;
-      else
-	{
-	  /* FIXME: How to better handle error condition?  */
-	  if (!bfd_malloc_and_get_section (abfd, sec, &contents))
-	    return FALSE;
-
-	  /* Cache the section contents for elf_link_input_bfd.  */
-	  elf_section_data (sec)->this_hdr.contents = contents;
-	}
-    }
+  bfd_byte *call;
+  bfd_boolean indirect_call, tls_get_addr;
 
   htab = elf_x86_64_hash_table (info);
   offset = rel->r_offset;
@@ -1242,32 +1357,61 @@ elf_x86_64_check_tls_transition (bfd *ab
 	{
 	  /* Check transition from GD access model.  For 64bit, only
 		.byte 0x66; leaq foo@tlsgd(%rip), %rdi
-		.word 0x6666; rex64; call __tls_get_addr
+		.word 0x6666; rex64; call __tls_get_addr@PLT
+	     or
+		.byte 0x66; leaq foo@tlsgd(%rip), %rdi
+		.byte 0x66; rex64
+		call *__tls_get_addr@GOTPCREL(%rip)
+		which may be converted to
+		addr32 call __tls_get_addr
 	     can transit to different access model.  For 32bit, only
 		leaq foo@tlsgd(%rip), %rdi
-		.word 0x6666; rex64; call __tls_get_addr
-	     can transit to different access model.  For largepic
+		.word 0x6666; rex64; call __tls_get_addr@PLT
+	     or
+		leaq foo@tlsgd(%rip), %rdi
+		.byte 0x66; rex64
+		call *__tls_get_addr@GOTPCREL(%rip)
+		which may be converted to
+		addr32 call __tls_get_addr
+	     can transit to different access model.  For largepic,
 	     we also support:
 	        leaq foo@tlsgd(%rip), %rdi
 	        movabsq $__tls_get_addr@pltoff, %rax
+	        addq $r15, %rax
+	        call *%rax
+	     or
+	        leaq foo@tlsgd(%rip), %rdi
+	        movabsq $__tls_get_addr@pltoff, %rax
 	        addq $rbx, %rax
-	        call *%rax.  */
+	        call *%rax  */
 
-	  static const unsigned char call[] = { 0x66, 0x66, 0x48, 0xe8 };
 	  static const unsigned char leaq[] = { 0x66, 0x48, 0x8d, 0x3d };
 
 	  if ((offset + 12) > sec->size)
 	    return FALSE;
 
-	  if (memcmp (contents + offset + 4, call, 4) != 0)
+	  call = contents + offset + 4;
+	  if (call[0] != 0x66
+	      || !((call[1] == 0x48
+		    && call[2] == 0xff
+		    && call[3] == 0x15)
+		   || (call[1] == 0x48
+		       && call[2] == 0x67
+		       && call[3] == 0xe8)
+		   || (call[1] == 0x66
+		       && call[2] == 0x48
+		       && call[3] == 0xe8)))
 	    {
 	      if (!ABI_64_P (abfd)
 		  || (offset + 19) > sec->size
 		  || offset < 3
-		  || memcmp (contents + offset - 3, leaq + 1, 3) != 0
-		  || memcmp (contents + offset + 4, "\x48\xb8", 2) != 0
-		  || memcmp (contents + offset + 14, "\x48\x01\xd8\xff\xd0", 5)
-		     != 0)
+		  || memcmp (call - 7, leaq + 1, 3) != 0
+		  || memcmp (call, "\x48\xb8", 2) != 0
+		  || call[11] != 0x01
+		  || call[13] != 0xff
+		  || call[14] != 0xd0
+		  || !((call[10] == 0x48 && call[12] == 0xd8)
+		       || (call[10] == 0x4c && call[12] == 0xf8)))
 		return FALSE;
 	      largepic = TRUE;
 	    }
@@ -1283,18 +1427,29 @@ elf_x86_64_check_tls_transition (bfd *ab
 		  || memcmp (contents + offset - 3, leaq + 1, 3) != 0)
 		return FALSE;
 	    }
+	  indirect_call = call[2] == 0xff;
 	}
       else
 	{
 	  /* Check transition from LD access model.  Only
 		leaq foo@tlsld(%rip), %rdi;
-		call __tls_get_addr
+		call __tls_get_addr@PLT
+             or
+		leaq foo@tlsld(%rip), %rdi;
+		call *__tls_get_addr@GOTPCREL(%rip)
+		which may be converted to
+		addr32 call __tls_get_addr
 	     can transit to different access model.  For largepic
 	     we also support:
 	        leaq foo@tlsld(%rip), %rdi
 	        movabsq $__tls_get_addr@pltoff, %rax
+	        addq $r15, %rax
+	        call *%rax
+	     or
+	        leaq foo@tlsld(%rip), %rdi
+	        movabsq $__tls_get_addr@pltoff, %rax
 	        addq $rbx, %rax
-	        call *%rax.  */
+	        call *%rax  */
 
 	  static const unsigned char lea[] = { 0x48, 0x8d, 0x3d };
 
@@ -1304,33 +1459,60 @@ elf_x86_64_check_tls_transition (bfd *ab
 	  if (memcmp (contents + offset - 3, lea, 3) != 0)
 	    return FALSE;
 
-	  if (0xe8 != *(contents + offset + 4))
+	  call = contents + offset + 4;
+	  if (!(call[0] == 0xe8
+		|| (call[0] == 0xff && call[1] == 0x15)
+		|| (call[0] == 0x67 && call[1] == 0xe8)))
 	    {
 	      if (!ABI_64_P (abfd)
 		  || (offset + 19) > sec->size
-		  || memcmp (contents + offset + 4, "\x48\xb8", 2) != 0
-		  || memcmp (contents + offset + 14, "\x48\x01\xd8\xff\xd0", 5)
-		     != 0)
+		  || memcmp (call, "\x48\xb8", 2) != 0
+		  || call[11] != 0x01
+		  || call[13] != 0xff
+		  || call[14] != 0xd0
+		  || !((call[10] == 0x48 && call[12] == 0xd8)
+		       || (call[10] == 0x4c && call[12] == 0xf8)))
 		return FALSE;
 	      largepic = TRUE;
 	    }
+	  indirect_call = call[0] == 0xff;
 	}
 
       r_symndx = htab->r_sym (rel[1].r_info);
       if (r_symndx < symtab_hdr->sh_info)
 	return FALSE;
 
+      tls_get_addr = FALSE;
       h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-      /* Use strncmp to check __tls_get_addr since __tls_get_addr
-	 may be versioned.  */
-      return (h != NULL
-	      && h->root.root.string != NULL
-	      && (largepic
-		  ? ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PLTOFF64
-		  : (ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PC32
-		     || ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PLT32))
-	      && (strncmp (h->root.root.string,
-			   "__tls_get_addr", 14) == 0));
+      if (h != NULL && h->root.root.string != NULL)
+	{
+	  struct elf_x86_64_link_hash_entry *eh
+	    = (struct elf_x86_64_link_hash_entry *) h;
+	  tls_get_addr = eh->tls_get_addr == 1;
+	  if (eh->tls_get_addr > 1)
+	    {
+	      /* Use strncmp to check __tls_get_addr since
+		 __tls_get_addr may be versioned.  */
+	      if (strncmp (h->root.root.string, "__tls_get_addr", 14)
+		  == 0)
+		{
+		  eh->tls_get_addr = 1;
+		  tls_get_addr = TRUE;
+		}
+	      else
+		eh->tls_get_addr = 0;
+	    }
+	}
+
+      if (!tls_get_addr)
+	return FALSE;
+      else if (largepic)
+	return ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PLTOFF64;
+      else if (indirect_call)
+	return ELF32_R_TYPE (rel[1].r_info) == R_X86_64_GOTPCRELX;
+      else
+	return (ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PC32
+		|| ELF32_R_TYPE (rel[1].r_info) == R_X86_64_PLT32);
 
     case R_X86_64_GOTTPOFF:
       /* Check transition from IE access model:
@@ -1393,8 +1575,8 @@ elf_x86_64_check_tls_transition (bfd *ab
       if (offset + 2 <= sec->size)
 	{
 	  /* Make sure that it's a call *x@tlsdesc(%rax).  */
-	  static const unsigned char call[] = { 0xff, 0x10 };
-	  return memcmp (contents + offset, call, 2) == 0;
+	  call = contents + offset;
+	  return call[0] == 0xff && call[1] == 0x10;
 	}
 
       return FALSE;
@@ -1416,7 +1598,8 @@ elf_x86_64_tls_transition (struct bfd_li
 			   const Elf_Internal_Rela *rel,
 			   const Elf_Internal_Rela *relend,
 			   struct elf_link_hash_entry *h,
-			   unsigned long r_symndx)
+			   unsigned long r_symndx,
+			   bfd_boolean from_relocate_section)
 {
   unsigned int from_type = *r_type;
   unsigned int to_type = from_type;
@@ -1434,7 +1617,7 @@ elf_x86_64_tls_transition (struct bfd_li
     case R_X86_64_GOTPC32_TLSDESC:
     case R_X86_64_TLSDESC_CALL:
     case R_X86_64_GOTTPOFF:
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (h == NULL)
 	    to_type = R_X86_64_TPOFF32;
@@ -1442,14 +1625,13 @@ elf_x86_64_tls_transition (struct bfd_li
 	    to_type = R_X86_64_GOTTPOFF;
 	}
 
-      /* When we are called from elf_x86_64_relocate_section,
-	 CONTENTS isn't NULL and there may be additional transitions
-	 based on TLS_TYPE.  */
-      if (contents != NULL)
+      /* When we are called from elf_x86_64_relocate_section, there may
+	 be additional transitions based on TLS_TYPE.  */
+      if (from_relocate_section)
 	{
 	  unsigned int new_to_type = to_type;
 
-	  if (info->executable
+	  if (bfd_link_executable (info)
 	      && h != NULL
 	      && h->dynindx == -1
 	      && tls_type == GOT_TLS_IE)
@@ -1473,7 +1655,7 @@ elf_x86_64_tls_transition (struct bfd_li
       break;
 
     case R_X86_64_TLSLD:
-      if (info->executable)
+      if (bfd_link_executable (info))
 	to_type = R_X86_64_TPOFF32;
       break;
 
@@ -1516,7 +1698,8 @@ elf_x86_64_tls_transition (struct bfd_li
 	    }
 	}
 
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: TLS transition from %s to %s against `%s' at 0x%lx "
 	   "in section `%A' failed"),
 	 abfd, sec, from->name, to->name, name,
@@ -1531,7 +1714,474 @@ elf_x86_64_tls_transition (struct bfd_li
 
 /* Rename some of the generic section flags to better document how they
    are used here.  */
-#define need_convert_mov_to_lea sec_flg0
+#define need_convert_load	sec_flg0
+#define check_relocs_failed	sec_flg1
+
+static bfd_boolean
+elf_x86_64_need_pic (bfd *input_bfd, asection *sec,
+		     struct elf_link_hash_entry *h,
+		     Elf_Internal_Shdr *symtab_hdr,
+		     Elf_Internal_Sym *isym,
+		     reloc_howto_type *howto)
+{
+  const char *v = "";
+  const char *und = "";
+  const char *pic = "";
+
+  const char *name;
+  if (h)
+    {
+      name = h->root.root.string;
+      switch (ELF_ST_VISIBILITY (h->other))
+	{
+	case STV_HIDDEN:
+	  v = _("hidden symbol ");
+	  break;
+	case STV_INTERNAL:
+	  v = _("internal symbol ");
+	  break;
+	case STV_PROTECTED:
+	  v = _("protected symbol ");
+	  break;
+	default:
+	  v = _("symbol ");
+	  pic = _("; recompile with -fPIC");
+	  break;
+	}
+
+      if (!h->def_regular && !h->def_dynamic)
+	und = _("undefined ");
+    }
+  else
+    {
+      name = bfd_elf_sym_name (input_bfd, symtab_hdr, isym, NULL);
+      pic = _("; recompile with -fPIC");
+    }
+
+  /* xgettext:c-format */
+  _bfd_error_handler (_("%B: relocation %s against %s%s`%s' can "
+			"not be used when making a shared object%s"),
+		      input_bfd, howto->name, und, v, name, pic);
+  bfd_set_error (bfd_error_bad_value);
+  sec->check_relocs_failed = 1;
+  return FALSE;
+}
+
+/* With the local symbol, foo, we convert
+   mov foo@GOTPCREL(%rip), %reg
+   to
+   lea foo(%rip), %reg
+   and convert
+   call/jmp *foo@GOTPCREL(%rip)
+   to
+   nop call foo/jmp foo nop
+   When PIC is false, convert
+   test %reg, foo@GOTPCREL(%rip)
+   to
+   test $foo, %reg
+   and convert
+   binop foo@GOTPCREL(%rip), %reg
+   to
+   binop $foo, %reg
+   where binop is one of adc, add, and, cmp, or, sbb, sub, xor
+   instructions.  */
+
+static bfd_boolean
+elf_x86_64_convert_load_reloc (bfd *abfd, asection *sec,
+			       bfd_byte *contents,
+			       Elf_Internal_Rela *irel,
+			       struct elf_link_hash_entry *h,
+			       bfd_boolean *converted,
+			       struct bfd_link_info *link_info)
+{
+  struct elf_x86_64_link_hash_table *htab;
+  bfd_boolean is_pic;
+  bfd_boolean require_reloc_pc32;
+  bfd_boolean relocx;
+  bfd_boolean to_reloc_pc32;
+  asection *tsec;
+  char symtype;
+  bfd_signed_vma raddend;
+  unsigned int opcode;
+  unsigned int modrm;
+  unsigned int r_type = ELF32_R_TYPE (irel->r_info);
+  unsigned int r_symndx;
+  bfd_vma toff;
+  bfd_vma roff = irel->r_offset;
+
+  if (roff < (r_type == R_X86_64_REX_GOTPCRELX ? 3 : 2))
+    return TRUE;
+
+  raddend = irel->r_addend;
+  /* Addend for 32-bit PC-relative relocation must be -4.  */
+  if (raddend != -4)
+    return TRUE;
+
+  htab = elf_x86_64_hash_table (link_info);
+  is_pic = bfd_link_pic (link_info);
+
+  relocx = (r_type == R_X86_64_GOTPCRELX
+	    || r_type == R_X86_64_REX_GOTPCRELX);
+
+  /* TRUE if we can convert only to R_X86_64_PC32.  Enable it for
+     --no-relax.  */
+  require_reloc_pc32
+    = link_info->disable_target_specific_optimizations > 1;
+
+  r_symndx = htab->r_sym (irel->r_info);
+
+  opcode = bfd_get_8 (abfd, contents + roff - 2);
+
+  /* Convert mov to lea since it has been done for a while.  */
+  if (opcode != 0x8b)
+    {
+      /* Only convert R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX
+	 for call, jmp or one of adc, add, and, cmp, or, sbb, sub,
+	 test, xor instructions.  */
+      if (!relocx)
+	return TRUE;
+    }
+
+  /* We convert only to R_X86_64_PC32:
+     1. Branch.
+     2. R_X86_64_GOTPCREL since we can't modify REX byte.
+     3. require_reloc_pc32 is true.
+     4. PIC.
+     */
+  to_reloc_pc32 = (opcode == 0xff
+		   || !relocx
+		   || require_reloc_pc32
+		   || is_pic);
+
+  /* Get the symbol referred to by the reloc.  */
+  if (h == NULL)
+    {
+      Elf_Internal_Sym *isym
+	= bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx);
+
+      /* Skip relocation against undefined symbols.  */
+      if (isym->st_shndx == SHN_UNDEF)
+	return TRUE;
+
+      symtype = ELF_ST_TYPE (isym->st_info);
+
+      if (isym->st_shndx == SHN_ABS)
+	tsec = bfd_abs_section_ptr;
+      else if (isym->st_shndx == SHN_COMMON)
+	tsec = bfd_com_section_ptr;
+      else if (isym->st_shndx == SHN_X86_64_LCOMMON)
+	tsec = &_bfd_elf_large_com_section;
+      else
+	tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+
+      toff = isym->st_value;
+    }
+  else
+    {
+      /* Undefined weak symbol is only bound locally in executable
+	 and its reference is resolved as 0 without relocation
+	 overflow.  We can only perform this optimization for
+	 GOTPCRELX relocations since we need to modify REX byte.
+	 It is OK convert mov with R_X86_64_GOTPCREL to
+	 R_X86_64_PC32.  */
+      if ((relocx || opcode == 0x8b)
+	  && UNDEFINED_WEAK_RESOLVED_TO_ZERO (link_info,
+					      TRUE,
+					      elf_x86_64_hash_entry (h)))
+	{
+	  if (opcode == 0xff)
+	    {
+	      /* Skip for branch instructions since R_X86_64_PC32
+		 may overflow.  */
+	      if (require_reloc_pc32)
+		return TRUE;
+	    }
+	  else if (relocx)
+	    {
+	      /* For non-branch instructions, we can convert to
+		 R_X86_64_32/R_X86_64_32S since we know if there
+		 is a REX byte.  */
+	      to_reloc_pc32 = FALSE;
+	    }
+
+	  /* Since we don't know the current PC when PIC is true,
+	     we can't convert to R_X86_64_PC32.  */
+	  if (to_reloc_pc32 && is_pic)
+	    return TRUE;
+
+	  goto convert;
+	}
+      /* Avoid optimizing GOTPCREL relocations againt _DYNAMIC since
+	 ld.so may use its link-time address.  */
+      else if ((h->def_regular
+		|| h->root.type == bfd_link_hash_defined
+		|| h->root.type == bfd_link_hash_defweak)
+	       && h != htab->elf.hdynamic
+	       && SYMBOL_REFERENCES_LOCAL (link_info, h))
+	{
+	  /* bfd_link_hash_new or bfd_link_hash_undefined is
+	     set by an assignment in a linker script in
+	     bfd_elf_record_link_assignment.   */
+	  if (h->def_regular
+	      && (h->root.type == bfd_link_hash_new
+		  || h->root.type == bfd_link_hash_undefined
+		  || ((h->root.type == bfd_link_hash_defined
+		       || h->root.type == bfd_link_hash_defweak)
+		      && h->root.u.def.section == bfd_und_section_ptr)))
+	    {
+	      /* Skip since R_X86_64_32/R_X86_64_32S may overflow.  */
+	      if (require_reloc_pc32)
+		return TRUE;
+	      goto convert;
+	    }
+	  tsec = h->root.u.def.section;
+	  toff = h->root.u.def.value;
+	  symtype = h->type;
+	}
+      else
+	return TRUE;
+    }
+
+  /* Don't convert GOTPCREL relocation against large section.  */
+  if (elf_section_data (tsec) !=  NULL
+      && (elf_section_flags (tsec) & SHF_X86_64_LARGE) != 0)
+    return TRUE;
+
+  /* We can only estimate relocation overflow for R_X86_64_PC32.  */
+  if (!to_reloc_pc32)
+    goto convert;
+
+  if (tsec->sec_info_type == SEC_INFO_TYPE_MERGE)
+    {
+      /* At this stage in linking, no SEC_MERGE symbol has been
+	 adjusted, so all references to such symbols need to be
+	 passed through _bfd_merged_section_offset.  (Later, in
+	 relocate_section, all SEC_MERGE symbols *except* for
+	 section symbols have been adjusted.)
+
+	 gas may reduce relocations against symbols in SEC_MERGE
+	 sections to a relocation against the section symbol when
+	 the original addend was zero.  When the reloc is against
+	 a section symbol we should include the addend in the
+	 offset passed to _bfd_merged_section_offset, since the
+	 location of interest is the original symbol.  On the
+	 other hand, an access to "sym+addend" where "sym" is not
+	 a section symbol should not include the addend;  Such an
+	 access is presumed to be an offset from "sym";  The
+	 location of interest is just "sym".  */
+      if (symtype == STT_SECTION)
+	toff += raddend;
+
+      toff = _bfd_merged_section_offset (abfd, &tsec,
+					 elf_section_data (tsec)->sec_info,
+					 toff);
+
+      if (symtype != STT_SECTION)
+	toff += raddend;
+    }
+  else
+    toff += raddend;
+
+  /* Don't convert if R_X86_64_PC32 relocation overflows.  */
+  if (tsec->output_section == sec->output_section)
+    {
+      if ((toff - roff + 0x80000000) > 0xffffffff)
+	return TRUE;
+    }
+  else
+    {
+      bfd_signed_vma distance;
+
+      /* At this point, we don't know the load addresses of TSEC
+	 section nor SEC section.  We estimate the distrance between
+	 SEC and TSEC.  We store the estimated distances in the
+	 compressed_size field of the output section, which is only
+	 used to decompress the compressed input section.  */
+      if (sec->output_section->compressed_size == 0)
+	{
+	  asection *asect;
+	  bfd_size_type size = 0;
+	  for (asect = link_info->output_bfd->sections;
+	       asect != NULL;
+	       asect = asect->next)
+	    /* Skip debug sections since compressed_size is used to
+	       compress debug sections.  */
+	    if ((asect->flags & SEC_DEBUGGING) == 0)
+	      {
+		asection *i;
+		for (i = asect->map_head.s;
+		     i != NULL;
+		     i = i->map_head.s)
+		  {
+		    size = align_power (size, i->alignment_power);
+		    size += i->size;
+		  }
+		asect->compressed_size = size;
+	      }
+	}
+
+      /* Don't convert GOTPCREL relocations if TSEC isn't placed
+	 after SEC.  */
+      distance = (tsec->output_section->compressed_size
+		  - sec->output_section->compressed_size);
+      if (distance < 0)
+	return TRUE;
+
+      /* Take PT_GNU_RELRO segment into account by adding
+	 maxpagesize.  */
+      if ((toff + distance + get_elf_backend_data (abfd)->maxpagesize
+	   - roff + 0x80000000) > 0xffffffff)
+	return TRUE;
+    }
+
+convert:
+  if (opcode == 0xff)
+    {
+      /* We have "call/jmp *foo@GOTPCREL(%rip)".  */
+      unsigned int nop;
+      unsigned int disp;
+      bfd_vma nop_offset;
+
+      /* Convert R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX to
+	 R_X86_64_PC32.  */
+      modrm = bfd_get_8 (abfd, contents + roff - 1);
+      if (modrm == 0x25)
+	{
+	  /* Convert to "jmp foo nop".  */
+	  modrm = 0xe9;
+	  nop = NOP_OPCODE;
+	  nop_offset = irel->r_offset + 3;
+	  disp = bfd_get_32 (abfd, contents + irel->r_offset);
+	  irel->r_offset -= 1;
+	  bfd_put_32 (abfd, disp, contents + irel->r_offset);
+	}
+      else
+	{
+	  struct elf_x86_64_link_hash_entry *eh
+	    = (struct elf_x86_64_link_hash_entry *) h;
+
+	  /* Convert to "nop call foo".  ADDR_PREFIX_OPCODE
+	     is a nop prefix.  */
+	  modrm = 0xe8;
+	  /* To support TLS optimization, always use addr32 prefix for
+	     "call *__tls_get_addr@GOTPCREL(%rip)".  */
+	  if (eh && eh->tls_get_addr == 1)
+	    {
+	      nop = 0x67;
+	      nop_offset = irel->r_offset - 2;
+	    }
+	  else
+	    {
+	      nop = link_info->call_nop_byte;
+	      if (link_info->call_nop_as_suffix)
+		{
+		  nop_offset = irel->r_offset + 3;
+		  disp = bfd_get_32 (abfd, contents + irel->r_offset);
+		  irel->r_offset -= 1;
+		  bfd_put_32 (abfd, disp, contents + irel->r_offset);
+		}
+	      else
+		nop_offset = irel->r_offset - 2;
+	    }
+	}
+      bfd_put_8 (abfd, nop, contents + nop_offset);
+      bfd_put_8 (abfd, modrm, contents + irel->r_offset - 1);
+      r_type = R_X86_64_PC32;
+    }
+  else
+    {
+      unsigned int rex;
+      unsigned int rex_mask = REX_R;
+
+      if (r_type == R_X86_64_REX_GOTPCRELX)
+	rex = bfd_get_8 (abfd, contents + roff - 3);
+      else
+	rex = 0;
+
+      if (opcode == 0x8b)
+	{
+	  if (to_reloc_pc32)
+	    {
+	      /* Convert "mov foo@GOTPCREL(%rip), %reg" to
+		 "lea foo(%rip), %reg".  */
+	      opcode = 0x8d;
+	      r_type = R_X86_64_PC32;
+	    }
+	  else
+	    {
+	      /* Convert "mov foo@GOTPCREL(%rip), %reg" to
+		 "mov $foo, %reg".  */
+	      opcode = 0xc7;
+	      modrm = bfd_get_8 (abfd, contents + roff - 1);
+	      modrm = 0xc0 | (modrm & 0x38) >> 3;
+	      if ((rex & REX_W) != 0
+		  && ABI_64_P (link_info->output_bfd))
+		{
+		  /* Keep the REX_W bit in REX byte for LP64.  */
+		  r_type = R_X86_64_32S;
+		  goto rewrite_modrm_rex;
+		}
+	      else
+		{
+		  /* If the REX_W bit in REX byte isn't needed,
+		     use R_X86_64_32 and clear the W bit to avoid
+		     sign-extend imm32 to imm64.  */
+		  r_type = R_X86_64_32;
+		  /* Clear the W bit in REX byte.  */
+		  rex_mask |= REX_W;
+		  goto rewrite_modrm_rex;
+		}
+	    }
+	}
+      else
+	{
+	  /* R_X86_64_PC32 isn't supported.  */
+	  if (to_reloc_pc32)
+	    return TRUE;
+
+	  modrm = bfd_get_8 (abfd, contents + roff - 1);
+	  if (opcode == 0x85)
+	    {
+	      /* Convert "test %reg, foo@GOTPCREL(%rip)" to
+		 "test $foo, %reg".  */
+	      modrm = 0xc0 | (modrm & 0x38) >> 3;
+	      opcode = 0xf7;
+	    }
+	  else
+	    {
+	      /* Convert "binop foo@GOTPCREL(%rip), %reg" to
+		 "binop $foo, %reg".  */
+	      modrm = 0xc0 | (modrm & 0x38) >> 3 | (opcode & 0x3c);
+	      opcode = 0x81;
+	    }
+
+	  /* Use R_X86_64_32 with 32-bit operand to avoid relocation
+	     overflow when sign-extending imm32 to imm64.  */
+	  r_type = (rex & REX_W) != 0 ? R_X86_64_32S : R_X86_64_32;
+
+rewrite_modrm_rex:
+	  bfd_put_8 (abfd, modrm, contents + roff - 1);
+
+	  if (rex)
+	    {
+	      /* Move the R bit to the B bit in REX byte.  */
+	      rex = (rex & ~rex_mask) | (rex & REX_R) >> 2;
+	      bfd_put_8 (abfd, rex, contents + roff - 3);
+	    }
+
+	  /* No addend for R_X86_64_32/R_X86_64_32S relocations.  */
+	  irel->r_addend = 0;
+	}
+
+      bfd_put_8 (abfd, opcode, contents + roff - 2);
+    }
+
+  irel->r_info = htab->r_info (r_symndx, r_type);
+
+  *converted = TRUE;
+
+  return TRUE;
+}
 
 /* Look through the relocs for a section during the first phase, and
    calculate needed space in the global offset table, procedure
@@ -1548,16 +2198,38 @@ elf_x86_64_check_relocs (bfd *abfd, stru
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   asection *sreloc;
+  bfd_byte *contents;
   bfd_boolean use_plt_got;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  /* Don't do anything special with non-loaded, non-alloced sections.
+     In particular, any relocs in such sections should not affect GOT
+     and PLT reference counting (ie. we don't allow them to create GOT
+     or PLT entries), there's no possibility or desire to optimize TLS
+     relocs, and there's not much point in propagating relocs to shared
+     libs that the dynamic linker won't relocate.  */
+  if ((sec->flags & SEC_ALLOC) == 0)
     return TRUE;
 
   BFD_ASSERT (is_x86_64_elf (abfd));
 
   htab = elf_x86_64_hash_table (info);
   if (htab == NULL)
-    return FALSE;
+    {
+      sec->check_relocs_failed = 1;
+      return FALSE;
+    }
+
+  /* Get the section contents.  */
+  if (elf_section_data (sec)->this_hdr.contents != NULL)
+    contents = elf_section_data (sec)->this_hdr.contents;
+  else if (!bfd_malloc_and_get_section (abfd, sec, &contents))
+    {
+      sec->check_relocs_failed = 1;
+      return FALSE;
+    }
 
   use_plt_got = get_elf_x86_64_backend_data (abfd) == &elf_x86_64_arch_bed;
 
@@ -1572,6 +2244,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
       unsigned int r_type;
       unsigned long r_symndx;
       struct elf_link_hash_entry *h;
+      struct elf_x86_64_link_hash_entry *eh;
       Elf_Internal_Sym *isym;
       const char *name;
       bfd_boolean size_reloc;
@@ -1581,9 +2254,10 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
-	  return FALSE;
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
+	  goto error_return;
 	}
 
       if (r_symndx < symtab_hdr->sh_info)
@@ -1592,7 +2266,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
 					abfd, r_symndx);
 	  if (isym == NULL)
-	    return FALSE;
+	    goto error_return;
 
 	  /* Check relocation against local STT_GNU_IFUNC symbol.  */
 	  if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
@@ -1600,7 +2274,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	      h = elf_x86_64_get_local_sym_hash (htab, abfd, rel,
 						 TRUE);
 	      if (h == NULL)
-		return FALSE;
+		goto error_return;
 
 	      /* Fake a STT_GNU_IFUNC symbol.  */
 	      h->type = STT_GNU_IFUNC;
@@ -1643,22 +2317,19 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 		else
 		  name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
 					   NULL);
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: relocation %s against symbol `%s' isn't "
 		     "supported in x32 mode"), abfd,
 		   x86_64_elf_howto_table[r_type].name, name);
 		bfd_set_error (bfd_error_bad_value);
-		return FALSE;
+		goto error_return;
 	      }
 	    break;
 	  }
 
       if (h != NULL)
 	{
-	  /* Create the ifunc sections for static executables.  If we
-	     never see an indirect function symbol nor we are building
-	     a static executable, those sections will be empty and
-	     won't appear in output.  */
 	  switch (r_type)
 	    {
 	    default:
@@ -1673,23 +2344,21 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	      /* MPX PLT is supported only if elf_x86_64_arch_bed
 		 is used in 64-bit mode.  */
 	      if (ABI_64_P (abfd)
-		      && info->bndplt
-		      && (get_elf_x86_64_backend_data (abfd)
-			  == &elf_x86_64_arch_bed))
+		  && info->bndplt
+		  && (get_elf_x86_64_backend_data (abfd)
+		      == &elf_x86_64_arch_bed))
 		{
 		  elf_x86_64_hash_entry (h)->has_bnd_reloc = 1;
 
 		  /* Create the second PLT for Intel MPX support.  */
 		  if (htab->plt_bnd == NULL)
 		    {
-		      unsigned int plt_bnd_align;
 		      const struct elf_backend_data *bed;
 
 		      bed = get_elf_backend_data (info->output_bfd);
 		      BFD_ASSERT (sizeof (elf_x86_64_bnd_plt2_entry) == 8
 				  && (sizeof (elf_x86_64_bnd_plt2_entry)
 				      == sizeof (elf_x86_64_legacy_plt2_entry)));
-		      plt_bnd_align = 3;
 
 		      if (htab->elf.dynobj == NULL)
 			htab->elf.dynobj = abfd;
@@ -1704,33 +2373,61 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 		      if (htab->plt_bnd == NULL
 			  || !bfd_set_section_alignment (htab->elf.dynobj,
 							 htab->plt_bnd,
-							 plt_bnd_align))
-			return FALSE;
+							 3))
+			goto error_return;
+		    }
+
+		  if (!info->no_ld_generated_unwind_info
+		      && htab->plt_bnd_eh_frame == NULL)
+		    {
+		      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+					| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+					| SEC_LINKER_CREATED);
+		      htab->plt_bnd_eh_frame
+			= bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+							      ".eh_frame",
+							      flags);
+		      if (htab->plt_bnd_eh_frame == NULL
+			  || !bfd_set_section_alignment (htab->elf.dynobj,
+							 htab->plt_bnd_eh_frame,
+							 3))
+			goto error_return;
 		    }
 		}
+	      /* Fall through.  */
 
 	    case R_X86_64_32S:
 	    case R_X86_64_PC64:
 	    case R_X86_64_GOTPCREL:
+	    case R_X86_64_GOTPCRELX:
+	    case R_X86_64_REX_GOTPCRELX:
 	    case R_X86_64_GOTPCREL64:
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
-	      if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info))
-		return FALSE;
+	      /* Create the ifunc sections for static executables.  */
+	      if (h->type == STT_GNU_IFUNC
+		  && !_bfd_elf_create_ifunc_sections (htab->elf.dynobj,
+						      info))
+		goto error_return;
 	      break;
 	    }
 
 	  /* It is referenced by a non-shared object. */
 	  h->ref_regular = 1;
 	  h->root.non_ir_ref = 1;
+
+	  if (h->type == STT_GNU_IFUNC)
+	    elf_tdata (info->output_bfd)->has_gnu_symbols
+	      |= elf_gnu_symbol_ifunc;
 	}
 
-      if (! elf_x86_64_tls_transition (info, abfd, sec, NULL,
+      if (! elf_x86_64_tls_transition (info, abfd, sec, contents,
 				       symtab_hdr, sym_hashes,
 				       &r_type, GOT_UNKNOWN,
-				       rel, rel_end, h, r_symndx))
-	return FALSE;
+				       rel, rel_end, h, r_symndx, FALSE))
+	goto error_return;
 
+      eh = (struct elf_x86_64_link_hash_entry *) h;
       switch (r_type)
 	{
 	case R_X86_64_TLSLD:
@@ -1738,29 +2435,22 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	  goto create_got;
 
 	case R_X86_64_TPOFF32:
-	  if (!info->executable && ABI_64_P (abfd))
-	    {
-	      if (h)
-		name = h->root.root.string;
-	      else
-		name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
-					 NULL);
-	      (*_bfd_error_handler)
-		(_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
-		 abfd,
-		 x86_64_elf_howto_table[r_type].name, name);
-	      bfd_set_error (bfd_error_bad_value);
-	      return FALSE;
-	    }
+	  if (!bfd_link_executable (info) && ABI_64_P (abfd))
+	    return elf_x86_64_need_pic (abfd, sec, h, symtab_hdr, isym,
+					&x86_64_elf_howto_table[r_type]);
+	  if (eh != NULL)
+	    eh->has_got_reloc = 1;
 	  break;
 
 	case R_X86_64_GOTTPOFF:
-	  if (!info->executable)
+	  if (!bfd_link_executable (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
 	case R_X86_64_GOT32:
 	case R_X86_64_GOTPCREL:
+	case R_X86_64_GOTPCRELX:
+	case R_X86_64_REX_GOTPCRELX:
 	case R_X86_64_TLSGD:
 	case R_X86_64_GOT64:
 	case R_X86_64_GOTPCREL64:
@@ -1784,7 +2474,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	    if (h != NULL)
 	      {
 		h->got.refcount += 1;
-		old_tls_type = elf_x86_64_hash_entry (h)->tls_type;
+		old_tls_type = eh->tls_type;
 	      }
 	    else
 	      {
@@ -1802,7 +2492,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 		    local_got_refcounts = ((bfd_signed_vma *)
 					   bfd_zalloc (abfd, size));
 		    if (local_got_refcounts == NULL)
-		      return FALSE;
+		      goto error_return;
 		    elf_local_got_refcounts (abfd) = local_got_refcounts;
 		    elf_x86_64_local_tlsdesc_gotent (abfd)
 		      = (bfd_vma *) (local_got_refcounts + symtab_hdr->sh_info);
@@ -1832,18 +2522,19 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 		    else
 		      name = bfd_elf_sym_name (abfd, symtab_hdr,
 					       isym, NULL);
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: '%s' accessed both as normal and thread local symbol"),
 		       abfd, name);
 		    bfd_set_error (bfd_error_bad_value);
-		    return FALSE;
+		    goto error_return;
 		  }
 	      }
 
 	    if (old_tls_type != tls_type)
 	      {
-		if (h != NULL)
-		  elf_x86_64_hash_entry (h)->tls_type = tls_type;
+		if (eh != NULL)
+		  eh->tls_type = tls_type;
 		else
 		  elf_x86_64_local_got_tls_type (abfd) [r_symndx] = tls_type;
 	      }
@@ -1854,13 +2545,15 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	case R_X86_64_GOTPC32:
 	case R_X86_64_GOTPC64:
 	create_got:
+	  if (eh != NULL)
+	    eh->has_got_reloc = 1;
 	  if (htab->elf.sgot == NULL)
 	    {
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
 	      if (!_bfd_elf_create_got_section (htab->elf.dynobj,
 						info))
-		return FALSE;
+		goto error_return;
 	    }
 	  break;
 
@@ -1878,6 +2571,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	  if (h == NULL)
 	    continue;
 
+	  eh->has_got_reloc = 1;
 	  h->needs_plt = 1;
 	  h->plt.refcount += 1;
 	  break;
@@ -1900,27 +2594,23 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	case R_X86_64_32:
 	  if (!ABI_64_P (abfd))
 	    goto pointer;
+	  /* Fall through.  */
 	case R_X86_64_8:
 	case R_X86_64_16:
 	case R_X86_64_32S:
-	  /* Let's help debug shared library creation.  These relocs
-	     cannot be used in shared libs.  Don't error out for
+	  /* Check relocation overflow as these relocs may lead to
+	     run-time relocation overflow.  Don't error out for
 	     sections we don't care about, such as debug sections or
-	     non-constant sections.  */
-	  if (info->shared
-	      && (sec->flags & SEC_ALLOC) != 0
-	      && (sec->flags & SEC_READONLY) != 0)
-	    {
-	      if (h)
-		name = h->root.root.string;
-	      else
-		name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);
-	      (*_bfd_error_handler)
-		(_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
-		 abfd, x86_64_elf_howto_table[r_type].name, name);
-	      bfd_set_error (bfd_error_bad_value);
-	      return FALSE;
-	    }
+	     when relocation overflow check is disabled.  */
+	  if (!info->no_reloc_overflow_check
+	      && (bfd_link_pic (info)
+		  || (bfd_link_executable (info)
+		      && h != NULL
+		      && !h->def_regular
+		      && h->def_dynamic
+		      && (sec->flags & SEC_READONLY) == 0)))
+	    return elf_x86_64_need_pic (abfd, sec, h, symtab_hdr, isym,
+					&x86_64_elf_howto_table[r_type]);
 	  /* Fall through.  */
 
 	case R_X86_64_PC8:
@@ -1930,7 +2620,14 @@ elf_x86_64_check_relocs (bfd *abfd, stru
 	case R_X86_64_PC64:
 	case R_X86_64_64:
 pointer:
-	  if (h != NULL && info->executable)
+	  if (eh != NULL && (sec->flags & SEC_CODE) != 0)
+	    eh->has_non_got_reloc = 1;
+	  /* We are called after all symbols have been resolved.  Only
+	     relocation against STT_GNU_IFUNC symbol must go through
+	     PLT.  */
+	  if (h != NULL
+	      && (bfd_link_executable (info)
+		  || h->type == STT_GNU_IFUNC))
 	    {
 	      /* If this reloc is in a read-only section, we might
 		 need a copy reloc.  We can't check reliably at this
@@ -1940,13 +2637,35 @@ pointer:
 		 adjust_dynamic_symbol.  */
 	      h->non_got_ref = 1;
 
-	      /* We may need a .plt entry if the function this reloc
-		 refers to is in a shared lib.  */
-	      h->plt.refcount += 1;
-	      if (r_type != R_X86_64_PC32
-		  && r_type != R_X86_64_PC32_BND
-		  && r_type != R_X86_64_PC64)
-		h->pointer_equality_needed = 1;
+	      /* We may need a .plt entry if the symbol is a function
+		 defined in a shared lib or is a STT_GNU_IFUNC function
+		 referenced from the code or read-only section.  */
+	      if (!h->def_regular
+		  || (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
+		h->plt.refcount += 1;
+
+	      if (r_type == R_X86_64_PC32)
+		{
+		  /* Since something like ".long foo - ." may be used
+		     as pointer, make sure that PLT is used if foo is
+		     a function defined in a shared library.  */
+		  if ((sec->flags & SEC_CODE) == 0)
+		    h->pointer_equality_needed = 1;
+		}
+	      else if (r_type != R_X86_64_PC32_BND
+		       && r_type != R_X86_64_PC64)
+		{
+		  h->pointer_equality_needed = 1;
+		  /* At run-time, R_X86_64_64 can be resolved for both
+		     x86-64 and x32. But R_X86_64_32 and R_X86_64_32S
+		     can only be resolved for x32.  */
+		  if ((sec->flags & SEC_READONLY) == 0
+		      && (r_type == R_X86_64_64
+			  || (!ABI_64_P (abfd)
+			      && (r_type == R_X86_64_32
+				  || r_type == R_X86_64_32S))))
+		    eh->func_pointer_refcount += 1;
+		}
 	    }
 
 	  size_reloc = FALSE;
@@ -1971,17 +2690,23 @@ do_size:
 	     If on the other hand, we are creating an executable, we
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
-	     symbol.  */
-	  if ((info->shared
-	       && (sec->flags & SEC_ALLOC) != 0
+	     symbol.
+
+	     Generate dynamic pointer relocation against STT_GNU_IFUNC
+	     symbol in the non-code section.  */
+	  if ((bfd_link_pic (info)
 	       && (! IS_X86_64_PCREL_TYPE (r_type)
 		   || (h != NULL
-		       && (! SYMBOLIC_BIND (info, h)
+		       && (! (bfd_link_pie (info)
+			      || SYMBOLIC_BIND (info, h))
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
+	      || (h != NULL
+		  && h->type == STT_GNU_IFUNC
+		  && r_type == htab->pointer_r_type
+		  && (sec->flags & SEC_CODE) == 0)
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
-		  && (sec->flags & SEC_ALLOC) != 0
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular)))
@@ -2002,15 +2727,13 @@ do_size:
 		     abfd, /*rela?*/ TRUE);
 
 		  if (sreloc == NULL)
-		    return FALSE;
+		    goto error_return;
 		}
 
 	      /* If this is a global symbol, we count the number of
 		 relocations we need for this symbol.  */
 	      if (h != NULL)
-		{
-		  head = &((struct elf_x86_64_link_hash_entry *) h)->dyn_relocs;
-		}
+		head = &eh->dyn_relocs;
 	      else
 		{
 		  /* Track dynamic relocs needed for local syms too.
@@ -2022,7 +2745,7 @@ do_size:
 		  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
 						abfd, r_symndx);
 		  if (isym == NULL)
-		    return FALSE;
+		    goto error_return;
 
 		  s = bfd_section_from_elf_index (abfd, isym->st_shndx);
 		  if (s == NULL)
@@ -2042,7 +2765,7 @@ do_size:
 		  p = ((struct elf_dyn_relocs *)
 		       bfd_alloc (htab->elf.dynobj, amt));
 		  if (p == NULL)
-		    return FALSE;
+		    goto error_return;
 		  p->next = *head;
 		  *head = p;
 		  p->sec = sec;
@@ -2061,7 +2784,7 @@ do_size:
 	     Reconstruct it for later use during GC.  */
 	case R_X86_64_GNU_VTINHERIT:
 	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
-	    return FALSE;
+	    goto error_return;
 	  break;
 
 	  /* This relocation describes which C++ vtable entries are actually
@@ -2070,7 +2793,7 @@ do_size:
 	  BFD_ASSERT (h != NULL);
 	  if (h != NULL
 	      && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
-	    return FALSE;
+	    goto error_return;
 	  break;
 
 	default:
@@ -2108,15 +2831,52 @@ do_size:
 	      || !bfd_set_section_alignment (htab->elf.dynobj,
 					     htab->plt_got,
 					     plt_got_align))
-	    return FALSE;
+	    goto error_return;
+
+	  if (!info->no_ld_generated_unwind_info
+	      && htab->plt_got_eh_frame == NULL
+	      && get_elf_x86_64_backend_data (abfd)->eh_frame_plt_got != NULL)
+	    {
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+				| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+				| SEC_LINKER_CREATED);
+	      htab->plt_got_eh_frame
+		= bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+						      ".eh_frame",
+						      flags);
+	      if (htab->plt_got_eh_frame == NULL
+		  || !bfd_set_section_alignment (htab->elf.dynobj,
+						 htab->plt_got_eh_frame,
+						 ABI_64_P (htab->elf.dynobj) ? 3 : 2))
+		goto error_return;
+	    }
 	}
 
-      if (r_type == R_X86_64_GOTPCREL
+      if ((r_type == R_X86_64_GOTPCREL
+	   || r_type == R_X86_64_GOTPCRELX
+	   || r_type == R_X86_64_REX_GOTPCRELX)
 	  && (h == NULL || h->type != STT_GNU_IFUNC))
-	sec->need_convert_mov_to_lea = 1;
+	sec->need_convert_load = 1;
+    }
+
+  if (elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (!info->keep_memory)
+	free (contents);
+      else
+	{
+	  /* Cache the section contents for elf_link_input_bfd.  */
+	  elf_section_data (sec)->this_hdr.contents = contents;
+	}
     }
 
   return TRUE;
+
+error_return:
+  if (elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  sec->check_relocs_failed = 1;
+  return FALSE;
 }
 
 /* Return the section that should be marked against GC for a given
@@ -2140,155 +2900,22 @@ elf_x86_64_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
-/* Update the got entry reference counts for the section being removed.	 */
+/* Remove undefined weak symbol from the dynamic symbol table if it
+   is resolved to 0.   */
 
 static bfd_boolean
-elf_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
-			  asection *sec,
-			  const Elf_Internal_Rela *relocs)
+elf_x86_64_fixup_symbol (struct bfd_link_info *info,
+		       struct elf_link_hash_entry *h)
 {
-  struct elf_x86_64_link_hash_table *htab;
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  bfd_signed_vma *local_got_refcounts;
-  const Elf_Internal_Rela *rel, *relend;
-
-  if (info->relocatable)
-    return TRUE;
-
-  htab = elf_x86_64_hash_table (info);
-  if (htab == NULL)
-    return FALSE;
-
-  elf_section_data (sec)->local_dynrel = NULL;
-
-  symtab_hdr = &elf_symtab_hdr (abfd);
-  sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (abfd);
-
-  htab = elf_x86_64_hash_table (info);
-  relend = relocs + sec->reloc_count;
-  for (rel = relocs; rel < relend; rel++)
-    {
-      unsigned long r_symndx;
-      unsigned int r_type;
-      struct elf_link_hash_entry *h = NULL;
-
-      r_symndx = htab->r_sym (rel->r_info);
-      if (r_symndx >= symtab_hdr->sh_info)
-	{
-	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	}
-      else
-	{
-	  /* A local symbol.  */
-	  Elf_Internal_Sym *isym;
-
-	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
-					abfd, r_symndx);
-
-	  /* Check relocation against local STT_GNU_IFUNC symbol.  */
-	  if (isym != NULL
-	      && ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
-	    {
-	      h = elf_x86_64_get_local_sym_hash (htab, abfd, rel, FALSE);
-	      if (h == NULL)
-		abort ();
-	    }
-	}
-
-      if (h)
-	{
-	  struct elf_x86_64_link_hash_entry *eh;
-	  struct elf_dyn_relocs **pp;
-	  struct elf_dyn_relocs *p;
-
-	  eh = (struct elf_x86_64_link_hash_entry *) h;
-
-	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
-	    if (p->sec == sec)
-	      {
-		/* Everything must go for SEC.  */
-		*pp = p->next;
-		break;
-	      }
-	}
-
-      r_type = ELF32_R_TYPE (rel->r_info);
-      if (! elf_x86_64_tls_transition (info, abfd, sec, NULL,
-				       symtab_hdr, sym_hashes,
-				       &r_type, GOT_UNKNOWN,
-				       rel, relend, h, r_symndx))
-	return FALSE;
-
-      switch (r_type)
-	{
-	case R_X86_64_TLSLD:
-	  if (htab->tls_ld_got.refcount > 0)
-	    htab->tls_ld_got.refcount -= 1;
-	  break;
-
-	case R_X86_64_TLSGD:
-	case R_X86_64_GOTPC32_TLSDESC:
-	case R_X86_64_TLSDESC_CALL:
-	case R_X86_64_GOTTPOFF:
-	case R_X86_64_GOT32:
-	case R_X86_64_GOTPCREL:
-	case R_X86_64_GOT64:
-	case R_X86_64_GOTPCREL64:
-	case R_X86_64_GOTPLT64:
-	  if (h != NULL)
-	    {
-	      if (h->got.refcount > 0)
-		h->got.refcount -= 1;
-	      if (h->type == STT_GNU_IFUNC)
-		{
-		  if (h->plt.refcount > 0)
-		    h->plt.refcount -= 1;
-		}
-	    }
-	  else if (local_got_refcounts != NULL)
-	    {
-	      if (local_got_refcounts[r_symndx] > 0)
-		local_got_refcounts[r_symndx] -= 1;
-	    }
-	  break;
-
-	case R_X86_64_8:
-	case R_X86_64_16:
-	case R_X86_64_32:
-	case R_X86_64_64:
-	case R_X86_64_32S:
-	case R_X86_64_PC8:
-	case R_X86_64_PC16:
-	case R_X86_64_PC32:
-	case R_X86_64_PC32_BND:
-	case R_X86_64_PC64:
-	case R_X86_64_SIZE32:
-	case R_X86_64_SIZE64:
-	  if (info->shared
-	      && (h == NULL || h->type != STT_GNU_IFUNC))
-	    break;
-	  /* Fall thru */
-
-	case R_X86_64_PLT32:
-	case R_X86_64_PLT32_BND:
-	case R_X86_64_PLTOFF64:
-	  if (h != NULL)
-	    {
-	      if (h->plt.refcount > 0)
-		h->plt.refcount -= 1;
-	    }
-	  break;
-
-	default:
-	  break;
-	}
+  if (h->dynindx != -1
+      && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+					  elf_x86_64_hash_entry (h)->has_got_reloc,
+					  elf_x86_64_hash_entry (h)))
+    {
+      h->dynindx = -1;
+      _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+			      h->dynstr_index);
     }
-
   return TRUE;
 }
 
@@ -2303,7 +2930,7 @@ elf_x86_64_adjust_dynamic_symbol (struct
 				  struct elf_link_hash_entry *h)
 {
   struct elf_x86_64_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
   struct elf_x86_64_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
@@ -2333,12 +2960,17 @@ elf_x86_64_adjust_dynamic_symbol (struct
 
 	  if (pc_count || count)
 	    {
-	      h->needs_plt = 1;
 	      h->non_got_ref = 1;
-	      if (h->plt.refcount <= 0)
-		h->plt.refcount = 1;
-	      else
-		h->plt.refcount += 1;
+	      if (pc_count)
+		{
+		  /* Increment PLT reference count only for PC-relative
+		     references.  */
+		  h->needs_plt = 1;
+		  if (h->plt.refcount <= 0)
+		    h->plt.refcount = 1;
+		  else
+		    h->plt.refcount += 1;
+		}
 	    }
 	}
 
@@ -2405,7 +3037,7 @@ elf_x86_64_adjust_dynamic_symbol (struct
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.	*/
-  if (!info->executable)
+  if (!bfd_link_executable (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2456,16 +3088,24 @@ elf_x86_64_adjust_dynamic_symbol (struct
   /* We must generate a R_X86_64_COPY reloc to tell the dynamic linker
      to copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
       const struct elf_backend_data *bed;
       bed = get_elf_backend_data (info->output_bfd);
-      htab->srelbss->size += bed->s->sizeof_rela;
+      srel->size += bed->s->sizeof_rela;
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -2481,6 +3121,7 @@ elf_x86_64_allocate_dynrelocs (struct el
   struct elf_dyn_relocs *p;
   const struct elf_backend_data *bed;
   unsigned int plt_entry_size;
+  bfd_boolean resolved_to_zero;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
@@ -2494,6 +3135,10 @@ elf_x86_64_allocate_dynrelocs (struct el
   bed = get_elf_backend_data (info->output_bfd);
   plt_entry_size = GET_PLT_ENTRY_SIZE (info->output_bfd);
 
+  resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+						      eh->has_got_reloc,
+						      eh);
+
   /* We can't use the GOT PLT if pointer equality is needed since
      finish_dynamic_symbol won't clear symbol value and the dynamic
      linker won't update the GOT slot.  We will get into an infinite
@@ -2512,6 +3157,11 @@ elf_x86_64_allocate_dynrelocs (struct el
       eh->plt_got.refcount = 1;
     }
 
+  /* Clear the reference count of function pointer relocations if
+     symbol isn't a normal function.  */
+  if (h->type != STT_FUNC)
+    eh->func_pointer_refcount = 0;
+
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
      here if it is defined and referenced in a non-shared object.  */
   if (h->type == STT_GNU_IFUNC
@@ -2519,9 +3169,10 @@ elf_x86_64_allocate_dynrelocs (struct el
     {
       if (_bfd_elf_allocate_ifunc_dyn_relocs (info, h,
 					      &eh->dyn_relocs,
+					      &htab->readonly_dynrelocs_against_ifunc,
 					      plt_entry_size,
 					      plt_entry_size,
-					      GOT_ENTRY_SIZE))
+					      GOT_ENTRY_SIZE, TRUE))
 	{
 	  asection *s = htab->plt_bnd;
 	  if (h->plt.offset != (bfd_vma) -1 && s != NULL)
@@ -2538,11 +3189,18 @@ elf_x86_64_allocate_dynrelocs (struct el
       else
 	return FALSE;
     }
+  /* Don't create the PLT entry if there are only function pointer
+     relocations which can be resolved at run-time.  */
   else if (htab->elf.dynamic_sections_created
-	   && (h->plt.refcount > 0 || eh->plt_got.refcount > 0))
+	   && (h->plt.refcount > eh->func_pointer_refcount
+	       || eh->plt_got.refcount > 0))
     {
       bfd_boolean use_plt_got;
 
+      /* Clear the reference count of function pointer relocations
+	 if PLT is used.  */
+      eh->func_pointer_refcount = 0;
+
       if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
 	{
 	  /* Don't use the regular PLT for DF_BIND_NOW. */
@@ -2558,13 +3216,14 @@ elf_x86_64_allocate_dynrelocs (struct el
       /* Make sure this symbol is output as a dynamic symbol.
 	 Undefined weak syms won't yet be marked as dynamic.  */
       if (h->dynindx == -1
-	  && !h->forced_local)
+	  && !h->forced_local
+	  && !resolved_to_zero)
 	{
 	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
 	    return FALSE;
 	}
 
-      if (info->shared
+      if (bfd_link_pic (info)
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->elf.splt;
@@ -2591,7 +3250,7 @@ elf_x86_64_allocate_dynrelocs (struct el
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      if (use_plt_got)
@@ -2632,20 +3291,27 @@ elf_x86_64_allocate_dynrelocs (struct el
 		 script.  */
 	      htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
 
-	      /* We also need to make an entry in the .rela.plt
-		 section.  */
-	      htab->elf.srelplt->size += bed->s->sizeof_rela;
-	      htab->elf.srelplt->reloc_count++;
+	      /* There should be no PLT relocation against resolved
+		 undefined weak symbol in executable.  */
+	      if (!resolved_to_zero)
+		{
+		  /* We also need to make an entry in the .rela.plt
+		     section.  */
+		  htab->elf.srelplt->size += bed->s->sizeof_rela;
+		  htab->elf.srelplt->reloc_count++;
+		}
 	    }
 	}
       else
 	{
+	  eh->plt_got.offset = (bfd_vma) -1;
 	  h->plt.offset = (bfd_vma) -1;
 	  h->needs_plt = 0;
 	}
     }
   else
     {
+      eh->plt_got.offset = (bfd_vma) -1;
       h->plt.offset = (bfd_vma) -1;
       h->needs_plt = 0;
     }
@@ -2655,7 +3321,7 @@ elf_x86_64_allocate_dynrelocs (struct el
   /* If R_X86_64_GOTTPOFF symbol is now local to the binary,
      make it a R_X86_64_TPOFF32 requiring no GOT entry.  */
   if (h->got.refcount > 0
-      && info->executable
+      && bfd_link_executable (info)
       && h->dynindx == -1
       && elf_x86_64_hash_entry (h)->tls_type == GOT_TLS_IE)
     {
@@ -2670,7 +3336,8 @@ elf_x86_64_allocate_dynrelocs (struct el
       /* Make sure this symbol is output as a dynamic symbol.
 	 Undefined weak syms won't yet be marked as dynamic.  */
       if (h->dynindx == -1
-	  && !h->forced_local)
+	  && !h->forced_local
+	  && !resolved_to_zero)
 	{
 	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
 	    return FALSE;
@@ -2694,17 +3361,19 @@ elf_x86_64_allocate_dynrelocs (struct el
 	}
       dyn = htab->elf.dynamic_sections_created;
       /* R_X86_64_TLSGD needs one dynamic relocation if local symbol
-	 and two if global.
-	 R_X86_64_GOTTPOFF needs one dynamic relocation.  */
+	 and two if global.  R_X86_64_GOTTPOFF needs one dynamic
+	 relocation.  No dynamic relocation against resolved undefined
+	 weak symbol in executable.  */
       if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1)
 	  || tls_type == GOT_TLS_IE)
 	htab->elf.srelgot->size += bed->s->sizeof_rela;
       else if (GOT_TLS_GD_P (tls_type))
 	htab->elf.srelgot->size += 2 * bed->s->sizeof_rela;
       else if (! GOT_TLS_GDESC_P (tls_type)
-	       && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+	       && ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		    && !resolved_to_zero)
 		   || h->root.type != bfd_link_hash_undefweak)
-	       && (info->shared
+	       && (bfd_link_pic (info)
 		   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	htab->elf.srelgot->size += bed->s->sizeof_rela;
       if (GOT_TLS_GDESC_P (tls_type))
@@ -2725,7 +3394,7 @@ elf_x86_64_allocate_dynrelocs (struct el
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       /* Relocs that use pc_count are those that appear on a call
 	 insn, or certain REL relocs that can generated via assembly.
@@ -2749,16 +3418,16 @@ elf_x86_64_allocate_dynrelocs (struct el
 	}
 
       /* Also discard relocs on undefined weak syms with non-default
-	 visibility.  */
+	 visibility or in PIE.  */
       if (eh->dyn_relocs != NULL)
 	{
 	  if (h->root.type == bfd_link_hash_undefweak)
 	    {
-	      if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+	      /* Undefined weak symbol is never bound locally in shared
+		 library.  */
+	      if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+		  || resolved_to_zero)
 		eh->dyn_relocs = NULL;
-
-	      /* Make sure undefined weak symbols are output as a dynamic
-		 symbol in PIEs.  */
 	      else if (h->dynindx == -1
 		       && ! h->forced_local
 		       && ! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -2766,7 +3435,7 @@ elf_x86_64_allocate_dynrelocs (struct el
 	    }
 	  /* For PIE, discard space for pc-relative relocs against
 	     symbols which turn out to need copy relocs.  */
-	  else if (info->executable
+	  else if (bfd_link_executable (info)
 		   && (h->needs_copy || eh->needs_copy)
 		   && h->def_dynamic
 		   && !h->def_regular)
@@ -2787,9 +3456,13 @@ elf_x86_64_allocate_dynrelocs (struct el
     {
       /* For the non-shared case, discard space for relocs against
 	 symbols which turn out to need copy relocs or are not
-	 dynamic.  */
+	 dynamic.  Keep dynamic relocations for run-time function
+	 pointer initialization.  */
 
-      if (!h->non_got_ref
+      if ((!h->non_got_ref
+	   || eh->func_pointer_refcount > 0
+	   || (h->root.type == bfd_link_hash_undefweak
+	       && !resolved_to_zero))
 	  && ((h->def_dynamic
 	       && !h->def_regular)
 	      || (htab->elf.dynamic_sections_created
@@ -2800,6 +3473,7 @@ elf_x86_64_allocate_dynrelocs (struct el
 	     Undefined weak syms won't yet be marked as dynamic.  */
 	  if (h->dynindx == -1
 	      && ! h->forced_local
+	      && ! resolved_to_zero
 	      && ! bfd_elf_link_record_dynamic_symbol (info, h))
 	    return FALSE;
 
@@ -2810,6 +3484,7 @@ elf_x86_64_allocate_dynrelocs (struct el
 	}
 
       eh->dyn_relocs = NULL;
+      eh->func_pointer_refcount = 0;
 
     keep: ;
     }
@@ -2872,8 +3547,9 @@ elf_x86_64_readonly_dynrelocs (struct el
 
 	  info->flags |= DF_TEXTREL;
 
-	  if ((info->warn_shared_textrel && info->shared)
+	  if ((info->warn_shared_textrel && bfd_link_pic (info))
 	      || info->error_textrel)
+	    /* xgettext:c-format */
 	    info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'\n"),
 				    p->sec->owner, h->root.root.string,
 				    p->sec);
@@ -2885,25 +3561,19 @@ elf_x86_64_readonly_dynrelocs (struct el
   return TRUE;
 }
 
-/* Convert
-   mov foo@GOTPCREL(%rip), %reg
-   to
-   lea foo(%rip), %reg
-   with the local symbol, foo.  */
+/* Convert load via the GOT slot to load immediate.  */
 
 static bfd_boolean
-elf_x86_64_convert_mov_to_lea (bfd *abfd, asection *sec,
-			       struct bfd_link_info *link_info)
+elf_x86_64_convert_load (bfd *abfd, asection *sec,
+			 struct bfd_link_info *link_info)
 {
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *internal_relocs;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents;
   struct elf_x86_64_link_hash_table *htab;
-  bfd_boolean changed_contents;
-  bfd_boolean changed_relocs;
+  bfd_boolean changed;
   bfd_signed_vma *local_got_refcounts;
-  bfd_vma maxpagesize;
 
   /* Don't even try to convert non-ELF outputs.  */
   if (!is_elf_hash_table (link_info->hash))
@@ -2911,7 +3581,7 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd
 
   /* Nothing to do if there is no need or no output.  */
   if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
-      || sec->need_convert_mov_to_lea == 0
+      || sec->need_convert_load == 0
       || bfd_is_abs_section (sec->output_section))
     return TRUE;
 
@@ -2924,11 +3594,9 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd
   if (internal_relocs == NULL)
     return FALSE;
 
+  changed = FALSE;
   htab = elf_x86_64_hash_table (link_info);
-  changed_contents = FALSE;
-  changed_relocs = FALSE;
   local_got_refcounts = elf_local_got_refcounts (abfd);
-  maxpagesize = get_elf_backend_data (abfd)->maxpagesize;
 
   /* Get the section contents.  */
   if (elf_section_data (sec)->this_hdr.contents != NULL)
@@ -2943,187 +3611,58 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd
   for (irel = internal_relocs; irel < irelend; irel++)
     {
       unsigned int r_type = ELF32_R_TYPE (irel->r_info);
-      unsigned int r_symndx = htab->r_sym (irel->r_info);
-      unsigned int indx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
-      asection *tsec;
-      char symtype;
-      bfd_vma toff, roff;
-      enum {
-	none, local, global
-      } convert_mov_to_lea;
-      unsigned int opcode;
-
-      if (r_type != R_X86_64_GOTPCREL)
-	continue;
-
-      roff = irel->r_offset;
+      bfd_boolean converted;
 
-      if (roff < 2)
+      if (r_type != R_X86_64_GOTPCRELX
+	  && r_type != R_X86_64_REX_GOTPCRELX
+	  && r_type != R_X86_64_GOTPCREL)
 	continue;
 
-      opcode = bfd_get_8 (abfd, contents + roff - 2);
-
-      /* PR ld/18591: Don't convert R_X86_64_GOTPCREL relocation if it
-         isn't for mov instruction.  */
-      if (opcode != 0x8b)
-	continue;
-
-      tsec = NULL;
-      convert_mov_to_lea = none;
-
-      /* Get the symbol referred to by the reloc.  */
+      r_symndx = htab->r_sym (irel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
-	{
-	  Elf_Internal_Sym *isym;
-
-	  /* Silence older GCC warning.  */
-	  h = NULL;
-
-	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
-					abfd, r_symndx);
-
-	  symtype = ELF_ST_TYPE (isym->st_info);
-
-	  /* STT_GNU_IFUNC must keep R_X86_64_GOTPCREL relocation and
-	     skip relocation against undefined symbols.  */
-	  if (symtype != STT_GNU_IFUNC && isym->st_shndx != SHN_UNDEF)
-	    {
-	      if (isym->st_shndx == SHN_ABS)
-		tsec = bfd_abs_section_ptr;
-	      else if (isym->st_shndx == SHN_COMMON)
-		tsec = bfd_com_section_ptr;
-	      else if (isym->st_shndx == SHN_X86_64_LCOMMON)
-		tsec = &_bfd_elf_large_com_section;
-	      else
-		tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
-
-	      toff = isym->st_value;
-	      convert_mov_to_lea = local;
-	    }
-	}
+	h = elf_x86_64_get_local_sym_hash (htab, sec->owner,
+					   (const Elf_Internal_Rela *) irel,
+					   FALSE);
       else
 	{
-	  indx = r_symndx - symtab_hdr->sh_info;
-	  h = elf_sym_hashes (abfd)[indx];
-	  BFD_ASSERT (h != NULL);
-
+	  h = elf_sym_hashes (abfd)[r_symndx - symtab_hdr->sh_info];
 	  while (h->root.type == bfd_link_hash_indirect
 		 || h->root.type == bfd_link_hash_warning)
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-	  /* STT_GNU_IFUNC must keep R_X86_64_GOTPCREL relocation.  We also
-	     avoid optimizing _DYNAMIC since ld.so may use its link-time
-	     address.  */
-	  if (h->def_regular
-	      && h->type != STT_GNU_IFUNC
-	      && h != htab->elf.hdynamic
-	      && SYMBOL_REFERENCES_LOCAL (link_info, h))
-	    {
-	      tsec = h->root.u.def.section;
-	      toff = h->root.u.def.value;
-	      symtype = h->type;
-	      convert_mov_to_lea = global;
-	    }
 	}
 
-      if (convert_mov_to_lea == none)
+      /* STT_GNU_IFUNC must keep GOTPCREL relocations.  */
+      if (h != NULL && h->type == STT_GNU_IFUNC)
 	continue;
 
-      if (tsec->sec_info_type == SEC_INFO_TYPE_MERGE)
-	{
-	  /* At this stage in linking, no SEC_MERGE symbol has been
-	     adjusted, so all references to such symbols need to be
-	     passed through _bfd_merged_section_offset.  (Later, in
-	     relocate_section, all SEC_MERGE symbols *except* for
-	     section symbols have been adjusted.)
-
-	     gas may reduce relocations against symbols in SEC_MERGE
-	     sections to a relocation against the section symbol when
-	     the original addend was zero.  When the reloc is against
-	     a section symbol we should include the addend in the
-	     offset passed to _bfd_merged_section_offset, since the
-	     location of interest is the original symbol.  On the
-	     other hand, an access to "sym+addend" where "sym" is not
-	     a section symbol should not include the addend;  Such an
-	     access is presumed to be an offset from "sym";  The
-	     location of interest is just "sym".  */
-	   if (symtype == STT_SECTION)
-	     toff += irel->r_addend;
-
-	   toff = _bfd_merged_section_offset (abfd, &tsec,
-					      elf_section_data (tsec)->sec_info,
-					      toff);
-
-	   if (symtype != STT_SECTION)
-	     toff += irel->r_addend;
-	}
-      else
-	toff += irel->r_addend;
+      converted = FALSE;
+      if (!elf_x86_64_convert_load_reloc (abfd, sec, contents, irel, h,
+					  &converted, link_info))
+	goto error_return;
 
-      /* Don't convert if R_X86_64_PC32 relocation overflows.  */
-      if (tsec->output_section == sec->output_section)
+      if (converted)
 	{
-	  if ((toff - roff + 0x80000000) > 0xffffffff)
-	    continue;
-	}
-      else
-	{
-	  asection *asect;
-	  bfd_size_type size;
-
-	  /* At this point, we don't know the load addresses of TSEC
-	     section nor SEC section.  We estimate the distrance between
-	     SEC and TSEC.  */
-	  size = 0;
-	  for (asect = sec->output_section;
-	       asect != NULL && asect != tsec->output_section;
-	       asect = asect->next)
+	  changed = converted;
+	  if (h)
 	    {
-	      asection *i;
-	      for (i = asect->output_section->map_head.s;
-		   i != NULL;
-		   i = i->map_head.s)
-		{
-		  size = align_power (size, i->alignment_power);
-		  size += i->size;
-		}
+	      if (h->got.refcount > 0)
+		h->got.refcount -= 1;
+	    }
+	  else
+	    {
+	      if (local_got_refcounts != NULL
+		  && local_got_refcounts[r_symndx] > 0)
+		local_got_refcounts[r_symndx] -= 1;
 	    }
-
-	  /* Don't convert R_X86_64_GOTPCREL if TSEC isn't placed after
-	     SEC.  */
-	  if (asect == NULL)
-	    continue;
-
-	  /* Take PT_GNU_RELRO segment into account by adding
-	     maxpagesize.  */
-	  if ((toff + size + maxpagesize - roff + 0x80000000)
-	      > 0xffffffff)
-	    continue;
-	}
-
-      bfd_put_8 (abfd, 0x8d, contents + roff - 2);
-      irel->r_info = htab->r_info (r_symndx, R_X86_64_PC32);
-      changed_contents = TRUE;
-      changed_relocs = TRUE;
-
-      if (convert_mov_to_lea == local)
-	{
-	  if (local_got_refcounts != NULL
-	      && local_got_refcounts[r_symndx] > 0)
-	    local_got_refcounts[r_symndx] -= 1;
-	}
-      else
-	{
-	  if (h->got.refcount > 0)
-	    h->got.refcount -= 1;
 	}
     }
 
   if (contents != NULL
       && elf_section_data (sec)->this_hdr.contents != contents)
     {
-      if (!changed_contents && !link_info->keep_memory)
+      if (!changed && !link_info->keep_memory)
 	free (contents);
       else
 	{
@@ -3134,7 +3673,7 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd
 
   if (elf_section_data (sec)->relocs != internal_relocs)
     {
-      if (!changed_relocs)
+      if (!changed)
 	free (internal_relocs);
       else
 	elf_section_data (sec)->relocs = internal_relocs;
@@ -3164,6 +3703,7 @@ elf_x86_64_size_dynamic_sections (bfd *o
   bfd_boolean relocs;
   bfd *ibfd;
   const struct elf_backend_data *bed;
+  const struct elf_x86_64_backend_data *arch_data;
 
   htab = elf_x86_64_hash_table (info);
   if (htab == NULL)
@@ -3174,19 +3714,6 @@ elf_x86_64_size_dynamic_sections (bfd *o
   if (dynobj == NULL)
     abort ();
 
-  if (htab->elf.dynamic_sections_created)
-    {
-      /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
-	{
-	  s = bfd_get_linker_section (dynobj, ".interp");
-	  if (s == NULL)
-	    abort ();
-	  s->size = htab->dynamic_interpreter_size;
-	  s->contents = (unsigned char *) htab->dynamic_interpreter;
-	}
-    }
-
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
@@ -3206,7 +3733,7 @@ elf_x86_64_size_dynamic_sections (bfd *o
 	{
 	  struct elf_dyn_relocs *p;
 
-	  if (!elf_x86_64_convert_mov_to_lea (ibfd, s, info))
+	  if (!elf_x86_64_convert_load (ibfd, s, info))
 	    return FALSE;
 
 	  for (p = (struct elf_dyn_relocs *)
@@ -3230,8 +3757,9 @@ elf_x86_64_size_dynamic_sections (bfd *o
 		      && (info->flags & DF_TEXTREL) == 0)
 		    {
 		      info->flags |= DF_TEXTREL;
-		      if ((info->warn_shared_textrel && info->shared)
+		      if ((info->warn_shared_textrel && bfd_link_pic (info))
 			  || info->error_textrel)
+			/* xgettext:c-format */
 			info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'\n"),
 						p->sec->owner, p->sec);
 		    }
@@ -3271,7 +3799,7 @@ elf_x86_64_size_dynamic_sections (bfd *o
 		  if (GOT_TLS_GD_P (*local_tls_type))
 		    s->size += GOT_ENTRY_SIZE;
 		}
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  || GOT_TLS_GD_ANY_P (*local_tls_type)
 		  || *local_tls_type == GOT_TLS_IE)
 		{
@@ -3367,15 +3895,31 @@ elf_x86_64_size_dynamic_sections (bfd *o
 	htab->elf.sgotplt->size = 0;
     }
 
-  if (htab->plt_eh_frame != NULL
-      && htab->elf.splt != NULL
-      && htab->elf.splt->size != 0
-      && !bfd_is_abs_section (htab->elf.splt->output_section)
-      && _bfd_elf_eh_frame_present (info))
-    {
-      const struct elf_x86_64_backend_data *arch_data
-	= get_elf_x86_64_arch_data (bed);
-      htab->plt_eh_frame->size = arch_data->eh_frame_plt_size;
+  arch_data = (htab->plt_bnd != NULL
+	       ? &elf_x86_64_bnd_arch_bed
+	       : get_elf_x86_64_arch_data (bed));
+
+  if (_bfd_elf_eh_frame_present (info))
+    {
+      if (htab->plt_eh_frame != NULL
+	  && htab->elf.splt != NULL
+	  && htab->elf.splt->size != 0
+	  && !bfd_is_abs_section (htab->elf.splt->output_section))
+	htab->plt_eh_frame->size = arch_data->eh_frame_plt_size;
+
+      if (htab->plt_got_eh_frame != NULL
+	  && htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && !bfd_is_abs_section (htab->plt_got->output_section))
+	htab->plt_got_eh_frame->size = arch_data->eh_frame_plt_got_size;
+
+      /* Unwind info for .plt.bnd and .plt.got sections are
+	 identical.  */
+      if (htab->plt_bnd_eh_frame != NULL
+	  && htab->plt_bnd != NULL
+	  && htab->plt_bnd->size != 0
+	  && !bfd_is_abs_section (htab->plt_bnd->output_section))
+	htab->plt_bnd_eh_frame->size = arch_data->eh_frame_plt_got_size;
     }
 
   /* We now have determined the sizes of the various dynamic sections.
@@ -3394,7 +3938,10 @@ elf_x86_64_size_dynamic_sections (bfd *o
 	  || s == htab->plt_bnd
 	  || s == htab->plt_got
 	  || s == htab->plt_eh_frame
-	  || s == htab->sdynbss)
+	  || s == htab->plt_got_eh_frame
+	  || s == htab->plt_bnd_eh_frame
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -3447,15 +3994,34 @@ elf_x86_64_size_dynamic_sections (bfd *o
   if (htab->plt_eh_frame != NULL
       && htab->plt_eh_frame->contents != NULL)
     {
-      const struct elf_x86_64_backend_data *arch_data
-	= get_elf_x86_64_arch_data (bed);
-
       memcpy (htab->plt_eh_frame->contents,
 	      arch_data->eh_frame_plt, htab->plt_eh_frame->size);
       bfd_put_32 (dynobj, htab->elf.splt->size,
 		  htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
     }
 
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      memcpy (htab->plt_got_eh_frame->contents,
+	      arch_data->eh_frame_plt_got,
+	      htab->plt_got_eh_frame->size);
+      bfd_put_32 (dynobj, htab->plt_got->size,
+		  (htab->plt_got_eh_frame->contents
+		   + PLT_FDE_LEN_OFFSET));
+    }
+
+  if (htab->plt_bnd_eh_frame != NULL
+      && htab->plt_bnd_eh_frame->contents != NULL)
+    {
+      memcpy (htab->plt_bnd_eh_frame->contents,
+	      arch_data->eh_frame_plt_got,
+	      htab->plt_bnd_eh_frame->size);
+      bfd_put_32 (dynobj, htab->plt_bnd->size,
+		  (htab->plt_bnd_eh_frame->contents
+		   + PLT_FDE_LEN_OFFSET));
+    }
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -3466,7 +4032,7 @@ elf_x86_64_size_dynamic_sections (bfd *o
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3509,6 +4075,14 @@ elf_x86_64_size_dynamic_sections (bfd *o
 
 	  if ((info->flags & DF_TEXTREL) != 0)
 	    {
+	      if (htab->readonly_dynrelocs_against_ifunc)
+		{
+		  info->callbacks->einfo
+		    (_("%P%X: read-only segment has dynamic IFUNC relocations; recompile with -fPIC\n"));
+		  bfd_set_error (bfd_error_bad_value);
+		  return FALSE;
+		}
+
 	      if (!add_dynamic_entry (DT_TEXTREL, 0))
 		return FALSE;
 	    }
@@ -3574,7 +4148,7 @@ elf_x86_64_set_tls_module_base (struct b
   struct elf_x86_64_link_hash_table *htab;
   struct bfd_link_hash_entry *base;
 
-  if (!info->executable)
+  if (!bfd_link_executable (info))
     return;
 
   htab = elf_x86_64_hash_table (info);
@@ -3656,11 +4230,16 @@ elf_x86_64_relocate_section (bfd *output
   bfd_vma *local_got_offsets;
   bfd_vma *local_tlsdesc_gotents;
   Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *wrel;
   Elf_Internal_Rela *relend;
   const unsigned int plt_entry_size = GET_PLT_ENTRY_SIZE (info->output_bfd);
 
   BFD_ASSERT (is_x86_64_elf (input_bfd));
 
+  /* Skip if check_relocs failed.  */
+  if (input_section->check_relocs_failed)
+    return FALSE;
+
   htab = elf_x86_64_hash_table (info);
   if (htab == NULL)
     return FALSE;
@@ -3671,9 +4250,9 @@ elf_x86_64_relocate_section (bfd *output
 
   elf_x86_64_set_tls_module_base (info);
 
-  rel = relocs;
+  rel = wrel = relocs;
   relend = relocs + input_section->reloc_count;
-  for (; rel < relend; rel++)
+  for (; rel < relend; wrel++, rel++)
     {
       unsigned int r_type;
       reloc_howto_type *howto;
@@ -3689,15 +4268,21 @@ elf_x86_64_relocate_section (bfd *output
       int tls_type;
       asection *base_got, *resolved_plt;
       bfd_vma st_size;
+      bfd_boolean resolved_to_zero;
 
       r_type = ELF32_R_TYPE (rel->r_info);
       if (r_type == (int) R_X86_64_GNU_VTINHERIT
 	  || r_type == (int) R_X86_64_GNU_VTENTRY)
-	continue;
+	{
+	  if (wrel != rel)
+	    *wrel = *rel;
+	  continue;
+	}
 
       if (r_type >= (int) R_X86_64_standard)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
 	     input_bfd, input_section, r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -3725,7 +4310,7 @@ elf_x86_64_relocate_section (bfd *output
 	  st_size = sym->st_size;
 
 	  /* Relocate against local STT_GNU_IFUNC symbol.  */
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 	    {
 	      h = elf_x86_64_get_local_sym_hash (htab, input_bfd,
@@ -3750,45 +4335,147 @@ elf_x86_64_relocate_section (bfd *output
 	  st_size = h->size;
 	}
 
-      if (sec != NULL && discarded_section (sec))
-	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-					 rel, 1, relend, howto, 0, contents);
+      if (sec != NULL && discarded_section (sec))
+	{
+	  _bfd_clear_contents (howto, input_bfd, input_section,
+			       contents + rel->r_offset);
+	  wrel->r_offset = rel->r_offset;
+	  wrel->r_info = 0;
+	  wrel->r_addend = 0;
+
+	  /* For ld -r, remove relocations in debug sections against
+	     sections defined in discarded sections.  Not done for
+	     eh_frame editing code expects to be present.  */
+	   if (bfd_link_relocatable (info)
+	       && (input_section->flags & SEC_DEBUGGING))
+	     wrel--;
+
+	  continue;
+	}
+
+      if (bfd_link_relocatable (info))
+	{
+	  if (wrel != rel)
+	    *wrel = *rel;
+	  continue;
+	}
+
+      if (rel->r_addend == 0 && !ABI_64_P (output_bfd))
+	{
+	  if (r_type == R_X86_64_64)
+	    {
+	      /* For x32, treat R_X86_64_64 like R_X86_64_32 and
+		 zero-extend it to 64bit if addend is zero.  */
+	      r_type = R_X86_64_32;
+	      memset (contents + rel->r_offset + 4, 0, 4);
+	    }
+	  else if (r_type == R_X86_64_SIZE64)
+	    {
+	      /* For x32, treat R_X86_64_SIZE64 like R_X86_64_SIZE32 and
+		 zero-extend it to 64bit if addend is zero.  */
+	      r_type = R_X86_64_SIZE32;
+	      memset (contents + rel->r_offset + 4, 0, 4);
+	    }
+	}
+
+      eh = (struct elf_x86_64_link_hash_entry *) h;
+
+      /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
+	 it here if it is defined in a non-shared object.  */
+      if (h != NULL
+	  && h->type == STT_GNU_IFUNC
+	  && h->def_regular)
+	{
+	  bfd_vma plt_index;
+	  const char *name;
+
+	  if ((input_section->flags & SEC_ALLOC) == 0)
+	    {
+	      /* Dynamic relocs are not propagated for SEC_DEBUGGING
+		 sections because such sections are not SEC_ALLOC and
+		 thus ld.so will not process them.  */
+	      if ((input_section->flags & SEC_DEBUGGING) != 0)
+		continue;
+	      abort ();
+	    }
+
+	  switch (r_type)
+	    {
+	    default:
+	      break;
+
+	    case R_X86_64_GOTPCREL:
+	    case R_X86_64_GOTPCRELX:
+	    case R_X86_64_REX_GOTPCRELX:
+	    case R_X86_64_GOTPCREL64:
+	      base_got = htab->elf.sgot;
+	      off = h->got.offset;
+
+	      if (base_got == NULL)
+		abort ();
+
+	      if (off == (bfd_vma) -1)
+		{
+		  /* We can't use h->got.offset here to save state, or
+		     even just remember the offset, as finish_dynamic_symbol
+		     would use that as offset into .got.  */
+
+		  if (h->plt.offset == (bfd_vma) -1)
+		    abort ();
+
+		  if (htab->elf.splt != NULL)
+		    {
+		      plt_index = h->plt.offset / plt_entry_size - 1;
+		      off = (plt_index + 3) * GOT_ENTRY_SIZE;
+		      base_got = htab->elf.sgotplt;
+		    }
+		  else
+		    {
+		      plt_index = h->plt.offset / plt_entry_size;
+		      off = plt_index * GOT_ENTRY_SIZE;
+		      base_got = htab->elf.igotplt;
+		    }
+
+		  if (h->dynindx == -1
+		      || h->forced_local
+		      || info->symbolic)
+		    {
+		      /* This references the local defitionion.  We must
+			 initialize this entry in the global offset table.
+			 Since the offset must always be a multiple of 8,
+			 we use the least significant bit to record
+			 whether we have initialized it already.
+
+			 When doing a dynamic link, we create a .rela.got
+			 relocation entry to initialize the value.  This
+			 is done in the finish_dynamic_symbol routine.	 */
+		      if ((off & 1) != 0)
+			off &= ~1;
+		      else
+			{
+			  bfd_put_64 (output_bfd, relocation,
+				      base_got->contents + off);
+			  /* Note that this is harmless for the GOTPLT64
+			     case, as -1 | 1 still is -1.  */
+			  h->got.offset |= 1;
+			}
+		    }
+		}
 
-      if (info->relocatable)
-	continue;
+	      relocation = (base_got->output_section->vma
+			    + base_got->output_offset + off);
 
-      if (rel->r_addend == 0 && !ABI_64_P (output_bfd))
-	{
-	  if (r_type == R_X86_64_64)
-	    {
-	      /* For x32, treat R_X86_64_64 like R_X86_64_32 and
-		 zero-extend it to 64bit if addend is zero.  */
-	      r_type = R_X86_64_32;
-	      memset (contents + rel->r_offset + 4, 0, 4);
+	      goto do_relocation;
 	    }
-	  else if (r_type == R_X86_64_SIZE64)
+
+	  if (h->plt.offset == (bfd_vma) -1)
 	    {
-	      /* For x32, treat R_X86_64_SIZE64 like R_X86_64_SIZE32 and
-		 zero-extend it to 64bit if addend is zero.  */
-	      r_type = R_X86_64_SIZE32;
-	      memset (contents + rel->r_offset + 4, 0, 4);
+	      /* Handle static pointers of STT_GNU_IFUNC symbols.  */
+	      if (r_type == htab->pointer_r_type
+		  && (input_section->flags & SEC_CODE) == 0)
+		goto do_ifunc_pointer;
+	      goto bad_ifunc_reloc;
 	    }
-	}
-
-      eh = (struct elf_x86_64_link_hash_entry *) h;
-
-      /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
-	 it here if it is defined in a non-shared object.  */
-      if (h != NULL
-	  && h->type == STT_GNU_IFUNC
-	  && h->def_regular)
-	{
-	  bfd_vma plt_index;
-	  const char *name;
-
-	  if ((input_section->flags & SEC_ALLOC) == 0
-	      || h->plt.offset == (bfd_vma) -1)
-	    abort ();
 
 	  /* STT_GNU_IFUNC symbol must go through PLT.  */
 	  if (htab->elf.splt != NULL)
@@ -3816,21 +4503,22 @@ elf_x86_64_relocate_section (bfd *output
 	  switch (r_type)
 	    {
 	    default:
+bad_ifunc_reloc:
 	      if (h->root.root.string)
 		name = h->root.root.string;
 	      else
 		name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 					 NULL);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against STT_GNU_IFUNC "
-		   "symbol `%s' isn't handled by %s"), input_bfd,
-		 x86_64_elf_howto_table[r_type].name,
-		 name, __FUNCTION__);
+		   "symbol `%s' isn't supported"), input_bfd,
+		 howto->name, name);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 
 	    case R_X86_64_32S:
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		abort ();
 	      goto do_relocation;
 
@@ -3839,6 +4527,7 @@ elf_x86_64_relocate_section (bfd *output
 		goto do_relocation;
 	      /* FALLTHROUGH */
 	    case R_X86_64_64:
+do_ifunc_pointer:
 	      if (rel->r_addend != 0)
 		{
 		  if (h->root.root.string)
@@ -3846,18 +4535,20 @@ elf_x86_64_relocate_section (bfd *output
 		  else
 		    name = bfd_elf_sym_name (input_bfd, symtab_hdr,
 					     sym, NULL);
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: relocation %s against STT_GNU_IFUNC "
 		       "symbol `%s' has non-zero addend: %d"),
-		     input_bfd, x86_64_elf_howto_table[r_type].name,
-		     name, rel->r_addend);
+		     input_bfd, howto->name, name, rel->r_addend);
 		  bfd_set_error (bfd_error_bad_value);
 		  return FALSE;
 		}
 
 	      /* Generate dynamic relcoation only when there is a
-		 non-GOT reference in a shared object.  */
-	      if (info->shared && h->non_got_ref)
+		 non-GOT reference in a shared object or there is no
+		 PLT.  */
+	      if ((bfd_link_pic (info) && h->non_got_ref)
+		  || h->plt.offset == (bfd_vma) -1)
 		{
 		  Elf_Internal_Rela outrel;
 		  asection *sreloc;
@@ -3877,7 +4568,7 @@ elf_x86_64_relocate_section (bfd *output
 
 		  if (h->dynindx == -1
 		      || h->forced_local
-		      || info->executable)
+		      || bfd_link_executable (info))
 		    {
 		      /* This symbol is resolved locally.  */
 		      outrel.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
@@ -3891,7 +4582,16 @@ elf_x86_64_relocate_section (bfd *output
 		      outrel.r_addend = 0;
 		    }
 
-		  sreloc = htab->elf.irelifunc;
+		  /* Dynamic relocations are stored in
+		     1. .rela.ifunc section in PIC object.
+		     2. .rela.got section in dynamic executable.
+		     3. .rela.iplt section in static executable.  */
+		  if (bfd_link_pic (info))
+		    sreloc = htab->elf.irelifunc;
+		  else if (htab->elf.splt != NULL)
+		    sreloc = htab->elf.srelgot;
+		  else
+		    sreloc = htab->elf.irelplt;
 		  elf_append_rela (output_bfd, sreloc, &outrel);
 
 		  /* If this reloc is against an external symbol, we
@@ -3908,67 +4608,14 @@ elf_x86_64_relocate_section (bfd *output
 	    case R_X86_64_PLT32:
 	    case R_X86_64_PLT32_BND:
 	      goto do_relocation;
-
-	    case R_X86_64_GOTPCREL:
-	    case R_X86_64_GOTPCREL64:
-	      base_got = htab->elf.sgot;
-	      off = h->got.offset;
-
-	      if (base_got == NULL)
-		abort ();
-
-	      if (off == (bfd_vma) -1)
-		{
-		  /* We can't use h->got.offset here to save state, or
-		     even just remember the offset, as finish_dynamic_symbol
-		     would use that as offset into .got.  */
-
-		  if (htab->elf.splt != NULL)
-		    {
-		      plt_index = h->plt.offset / plt_entry_size - 1;
-		      off = (plt_index + 3) * GOT_ENTRY_SIZE;
-		      base_got = htab->elf.sgotplt;
-		    }
-		  else
-		    {
-		      plt_index = h->plt.offset / plt_entry_size;
-		      off = plt_index * GOT_ENTRY_SIZE;
-		      base_got = htab->elf.igotplt;
-		    }
-
-		  if (h->dynindx == -1
-		      || h->forced_local
-		      || info->symbolic)
-		    {
-		      /* This references the local defitionion.  We must
-			 initialize this entry in the global offset table.
-			 Since the offset must always be a multiple of 8,
-			 we use the least significant bit to record
-			 whether we have initialized it already.
-
-			 When doing a dynamic link, we create a .rela.got
-			 relocation entry to initialize the value.  This
-			 is done in the finish_dynamic_symbol routine.	 */
-		      if ((off & 1) != 0)
-			off &= ~1;
-		      else
-			{
-			  bfd_put_64 (output_bfd, relocation,
-				      base_got->contents + off);
-			  /* Note that this is harmless for the GOTPLT64
-			     case, as -1 | 1 still is -1.  */
-			  h->got.offset |= 1;
-			}
-		    }
-		}
-
-	      relocation = (base_got->output_section->vma
-			    + base_got->output_offset + off);
-
-	      goto do_relocation;
 	    }
 	}
 
+      resolved_to_zero = (eh != NULL
+			  && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+							      eh->has_got_reloc,
+							      eh));
+
       /* When generating a shared object, the relocations handled here are
 	 copied into the output file to be resolved at run time.  */
       switch (r_type)
@@ -3978,6 +4625,8 @@ elf_x86_64_relocate_section (bfd *output
 	  /* Relocation is to the entry for this symbol in the global
 	     offset table.  */
 	case R_X86_64_GOTPCREL:
+	case R_X86_64_GOTPCRELX:
+	case R_X86_64_REX_GOTPCRELX:
 	case R_X86_64_GOTPCREL64:
 	  /* Use global offset table entry as symbol value.  */
 	case R_X86_64_GOTPLT64:
@@ -4007,8 +4656,8 @@ elf_x86_64_relocate_section (bfd *output
 
 	      dyn = htab->elf.dynamic_sections_created;
 
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h))
 		  || (ELF_ST_VISIBILITY (h->other)
 		      && h->root.type == bfd_link_hash_undefweak))
@@ -4055,7 +4704,7 @@ elf_x86_64_relocate_section (bfd *output
 		  bfd_put_64 (output_bfd, relocation,
 			      base_got->contents + off);
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -4083,7 +4732,10 @@ elf_x86_64_relocate_section (bfd *output
 
 	  relocation = base_got->output_section->vma
 		       + base_got->output_offset + off;
-	  if (r_type != R_X86_64_GOTPCREL && r_type != R_X86_64_GOTPCREL64)
+	  if (r_type != R_X86_64_GOTPCREL
+	      && r_type != R_X86_64_GOTPCRELX
+	      && r_type != R_X86_64_REX_GOTPCRELX
+	      && r_type != R_X86_64_GOTPCREL64)
 	    relocation -= htab->elf.sgotplt->output_section->vma
 			  - htab->elf.sgotplt->output_offset;
 
@@ -4097,7 +4749,7 @@ elf_x86_64_relocate_section (bfd *output
 	     symbol for shared library since it may not be local when
 	     used as function address or with copy relocation.  We also
 	     need to make sure that a symbol is referenced locally.  */
-	  if (info->shared && h)
+	  if (bfd_link_pic (info) && h)
 	    {
 	      if (!h->def_regular)
 		{
@@ -4119,19 +4771,21 @@ elf_x86_64_relocate_section (bfd *output
 		      break;
 		    }
 
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: relocation R_X86_64_GOTOFF64 against undefined %s `%s' can not be used when making a shared object"),
 		     input_bfd, v, h->root.root.string);
 		  bfd_set_error (bfd_error_bad_value);
 		  return FALSE;
 		}
-	      else if (!info->executable
+	      else if (!bfd_link_executable (info)
 		       && !SYMBOL_REFERENCES_LOCAL (info, h)
 		       && (h->type == STT_FUNC
 			   || h->type == STT_OBJECT)
 		       && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+	      /* xgettext:c-format */
 		    (_("%B: relocation R_X86_64_GOTOFF64 against protected %s `%s' can not be used when making a shared object"),
 		     input_bfd,
 		     h->type == STT_FUNC ? "function" : "data",
@@ -4163,10 +4817,17 @@ elf_x86_64_relocate_section (bfd *output
 	     symbols it's the symbol itself relative to GOT.  */
 	  if (h != NULL
 	      /* See PLT32 handling.  */
-	      && h->plt.offset != (bfd_vma) -1
+	      && (h->plt.offset != (bfd_vma) -1
+		  || eh->plt_got.offset != (bfd_vma) -1)
 	      && htab->elf.splt != NULL)
 	    {
-	      if (htab->plt_bnd != NULL)
+	      if (eh->plt_got.offset != (bfd_vma) -1)
+		{
+		  /* Use the GOT PLT.  */
+		  resolved_plt = htab->plt_got;
+		  plt_offset = eh->plt_got.offset;
+		}
+	      else if (htab->plt_bnd != NULL)
 		{
 		  resolved_plt = htab->plt_bnd;
 		  plt_offset = eh->plt_bnd.offset;
@@ -4244,13 +4905,16 @@ elf_x86_64_relocate_section (bfd *output
 	case R_X86_64_PC32:
 	case R_X86_64_PC32_BND:
 	  /* Don't complain about -fPIC if the symbol is undefined when
-	     building executable.  */
-	  if (info->shared
-	      && (input_section->flags & SEC_ALLOC) != 0
+	     building executable unless it is unresolved weak symbol.  */
+          if ((input_section->flags & SEC_ALLOC) != 0
 	      && (input_section->flags & SEC_READONLY) != 0
 	      && h != NULL
-	      && !(info->executable
-		   && h->root.type == bfd_link_hash_undefined))
+	      && ((bfd_link_executable (info)
+		  && h->root.type == bfd_link_hash_undefweak
+		  && !resolved_to_zero)
+		  || (bfd_link_pic (info)
+		      && !(bfd_link_pie (info)
+			   && h->root.type == bfd_link_hash_undefined))))
 	    {
 	      bfd_boolean fail = FALSE;
 	      bfd_boolean branch
@@ -4264,7 +4928,7 @@ elf_x86_64_relocate_section (bfd *output
 		     defined locally or for a branch.  */
 		  fail = !h->def_regular && !branch;
 		}
-	      else if (!(info->executable
+	      else if (!(bfd_link_pie (info)
 			 && (h->needs_copy || eh->needs_copy)))
 		{
 		  /* Symbol doesn't need copy reloc and isn't referenced
@@ -4275,39 +4939,8 @@ elf_x86_64_relocate_section (bfd *output
 		}
 
 	      if (fail)
-		{
-		  const char *fmt;
-		  const char *v;
-		  const char *pic = "";
-
-		  switch (ELF_ST_VISIBILITY (h->other))
-		    {
-		    case STV_HIDDEN:
-		      v = _("hidden symbol");
-		      break;
-		    case STV_INTERNAL:
-		      v = _("internal symbol");
-		      break;
-		    case STV_PROTECTED:
-		      v = _("protected symbol");
-		      break;
-		    default:
-		      v = _("symbol");
-		      pic = _("; recompile with -fPIC");
-		      break;
-		    }
-
-		  if (h->def_regular)
-		    fmt = _("%B: relocation %s against %s `%s' can not be used when making a shared object%s");
-		  else
-		    fmt = _("%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s");
-
-		  (*_bfd_error_handler) (fmt, input_bfd,
-					 x86_64_elf_howto_table[r_type].name,
-					 v,  h->root.root.string, pic);
-		  bfd_set_error (bfd_error_bad_value);
-		  return FALSE;
-		}
+		return elf_x86_64_need_pic (input_bfd, input_section,
+					    h, NULL, NULL, howto);
 	    }
 	  /* Fall through.  */
 
@@ -4325,29 +4958,37 @@ direct:
 
 	   /* Don't copy a pc-relative relocation into the output file
 	      if the symbol needs copy reloc or the symbol is undefined
-	      when building executable.  */
-	  if ((info->shared
-	       && !(info->executable
+	      when building executable.  Copy dynamic function pointer
+	      relocations.  Don't generate dynamic relocations against
+	      resolved undefined weak symbols in PIE.  */
+	  if ((bfd_link_pic (info)
+	       && !(bfd_link_pie (info)
 		    && h != NULL
 		    && (h->needs_copy
 			|| eh->needs_copy
 			|| h->root.type == bfd_link_hash_undefined)
-		    && IS_X86_64_PCREL_TYPE (r_type))
+		    && (IS_X86_64_PCREL_TYPE (r_type)
+			|| r_type == R_X86_64_SIZE32
+			|| r_type == R_X86_64_SIZE64))
 	       && (h == NULL
-		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-		   || h->root.type != bfd_link_hash_undefweak)
+		   || ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+			&& !resolved_to_zero)
+		       || h->root.type != bfd_link_hash_undefweak))
 	       && ((! IS_X86_64_PCREL_TYPE (r_type)
 		      && r_type != R_X86_64_SIZE32
 		      && r_type != R_X86_64_SIZE64)
 		   || ! SYMBOL_CALLS_LOCAL (info, h)))
 	      || (ELIMINATE_COPY_RELOCS
-		  && !info->shared
+		  && !bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
-		  && !h->non_got_ref
-		  && ((h->def_dynamic
-		       && !h->def_regular)
-		      || h->root.type == bfd_link_hash_undefweak
+		  && (!h->non_got_ref
+		      || eh->func_pointer_refcount > 0
+		      || (h->root.type == bfd_link_hash_undefweak
+			  && !resolved_to_zero))
+		  && ((h->def_dynamic && !h->def_regular)
+		      /* Undefined weak symbol is bound locally when
+			 PIC is false.  */
 		      || h->root.type == bfd_link_hash_undefined)))
 	    {
 	      Elf_Internal_Rela outrel;
@@ -4379,8 +5020,8 @@ direct:
 	      else if (h != NULL
 		       && h->dynindx != -1
 		       && (IS_X86_64_PCREL_TYPE (r_type)
-			   || ! info->shared
-			   || ! SYMBOLIC_BIND (info, h)
+			   || !(bfd_link_executable (info)
+				|| SYMBOLIC_BIND (info, h))
 			   || ! h->def_regular))
 		{
 		  outrel.r_info = htab->r_info (h->dynindx, r_type);
@@ -4388,8 +5029,12 @@ direct:
 		}
 	      else
 		{
-		  /* This symbol is local, or marked to become local.  */
-		  if (r_type == htab->pointer_r_type)
+		  /* This symbol is local, or marked to become local.
+		     When relocation overflow check is disabled, we
+		     convert R_X86_64_32 to dynamic R_X86_64_RELATIVE.  */
+		  if (r_type == htab->pointer_r_type
+		      || (r_type == R_X86_64_32
+			  && info->no_reloc_overflow_check))
 		    {
 		      relocate = TRUE;
 		      outrel.r_info = htab->r_info (0, R_X86_64_RELATIVE);
@@ -4414,21 +5059,23 @@ direct:
 			    name = bfd_elf_sym_name (input_bfd, symtab_hdr,
 						     sym, NULL);
 			  if (addend < 0)
-			    (*_bfd_error_handler)
+			    _bfd_error_handler
+			      /* xgettext:c-format */
 			      (_("%B: addend -0x%x in relocation %s against "
 				 "symbol `%s' at 0x%lx in section `%A' is "
 				 "out of range"),
 			       input_bfd, input_section, addend,
-			       x86_64_elf_howto_table[r_type].name,
-			       name, (unsigned long) rel->r_offset);
+			       howto->name, name,
+			       (unsigned long) rel->r_offset);
 			  else
-			    (*_bfd_error_handler)
+			    _bfd_error_handler
+			      /* xgettext:c-format */
 			      (_("%B: addend 0x%x in relocation %s against "
 				 "symbol `%s' at 0x%lx in section `%A' is "
 				 "out of range"),
 			       input_bfd, input_section, addend,
-			       x86_64_elf_howto_table[r_type].name,
-			       name, (unsigned long) rel->r_offset);
+			       howto->name, name,
+			       (unsigned long) rel->r_offset);
 			  bfd_set_error (bfd_error_bad_value);
 			  return FALSE;
 			}
@@ -4502,7 +5149,7 @@ direct:
 					   input_section, contents,
 					   symtab_hdr, sym_hashes,
 					   &r_type, tls_type, rel,
-					   relend, h, r_symndx))
+					   relend, h, r_symndx, TRUE))
 	    return FALSE;
 
 	  if (r_type == R_X86_64_TPOFF32)
@@ -4514,39 +5161,53 @@ direct:
 	      if (ELF32_R_TYPE (rel->r_info) == R_X86_64_TLSGD)
 		{
 		  /* GD->LE transition.  For 64bit, change
-		     .byte 0x66; leaq foo@tlsgd(%rip), %rdi
-		     .word 0x6666; rex64; call __tls_get_addr
+			.byte 0x66; leaq foo@tlsgd(%rip), %rdi
+			.word 0x6666; rex64; call __tls_get_addr@PLT
+		     or
+			.byte 0x66; leaq foo@tlsgd(%rip), %rdi
+			.byte 0x66; rex64
+			call *__tls_get_addr@GOTPCREL(%rip)
+			which may be converted to
+			addr32 call __tls_get_addr
 		     into:
-		     movq %fs:0, %rax
-		     leaq foo@tpoff(%rax), %rax
+			movq %fs:0, %rax
+			leaq foo@tpoff(%rax), %rax
 		     For 32bit, change
-		     leaq foo@tlsgd(%rip), %rdi
-		     .word 0x6666; rex64; call __tls_get_addr
+			leaq foo@tlsgd(%rip), %rdi
+			.word 0x6666; rex64; call __tls_get_addr@PLT
+		     or
+			leaq foo@tlsgd(%rip), %rdi
+			.byte 0x66; rex64
+			call *__tls_get_addr@GOTPCREL(%rip)
+			which may be converted to
+			addr32 call __tls_get_addr
 		     into:
-		     movl %fs:0, %eax
-		     leaq foo@tpoff(%rax), %rax
+			movl %fs:0, %eax
+			leaq foo@tpoff(%rax), %rax
 		     For largepic, change:
-		     leaq foo@tlsgd(%rip), %rdi
-		     movabsq $__tls_get_addr@pltoff, %rax
-		     addq %rbx, %rax
-		     call *%rax
+			leaq foo@tlsgd(%rip), %rdi
+			movabsq $__tls_get_addr@pltoff, %rax
+			addq %r15, %rax
+			call *%rax
 		     into:
-		     movq %fs:0, %rax
-		     leaq foo@tpoff(%rax), %rax
-		     nopw 0x0(%rax,%rax,1) */
+			movq %fs:0, %rax
+			leaq foo@tpoff(%rax), %rax
+			nopw 0x0(%rax,%rax,1)  */
 		  int largepic = 0;
-		  if (ABI_64_P (output_bfd)
-		      && contents[roff + 5] == (bfd_byte) '\xb8')
+		  if (ABI_64_P (output_bfd))
 		    {
-		      memcpy (contents + roff - 3,
-			      "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80"
-			      "\0\0\0\0\x66\x0f\x1f\x44\0", 22);
-		      largepic = 1;
+		      if (contents[roff + 5] == 0xb8)
+			{
+			  memcpy (contents + roff - 3,
+				  "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80"
+				  "\0\0\0\0\x66\x0f\x1f\x44\0", 22);
+			  largepic = 1;
+			}
+		      else
+			memcpy (contents + roff - 4,
+				"\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0",
+				16);
 		    }
-		  else if (ABI_64_P (output_bfd))
-		    memcpy (contents + roff - 4,
-			    "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0",
-			    16);
 		  else
 		    memcpy (contents + roff - 3,
 			    "\x64\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0",
@@ -4554,8 +5215,10 @@ direct:
 		  bfd_put_32 (output_bfd,
 			      elf_x86_64_tpoff (info, relocation),
 			      contents + roff + 8 + largepic);
-		  /* Skip R_X86_64_PC32/R_X86_64_PLT32/R_X86_64_PLTOFF64.  */
+		  /* Skip R_X86_64_PC32, R_X86_64_PLT32,
+		     R_X86_64_GOTPCRELX and R_X86_64_PLTOFF64.  */
 		  rel++;
+		  wrel++;
 		  continue;
 		}
 	      else if (ELF32_R_TYPE (rel->r_info) == R_X86_64_GOTPC32_TLSDESC)
@@ -4789,39 +5452,53 @@ direct:
 	      if (ELF32_R_TYPE (rel->r_info) == R_X86_64_TLSGD)
 		{
 		  /* GD->IE transition.  For 64bit, change
-		     .byte 0x66; leaq foo@tlsgd(%rip), %rdi
-		     .word 0x6666; rex64; call __tls_get_addr@plt
+			.byte 0x66; leaq foo@tlsgd(%rip), %rdi
+			.word 0x6666; rex64; call __tls_get_addr@PLT
+		     or
+			.byte 0x66; leaq foo@tlsgd(%rip), %rdi
+			.byte 0x66; rex64
+			call *__tls_get_addr@GOTPCREL(%rip
+			which may be converted to
+			addr32 call __tls_get_addr
 		     into:
-		     movq %fs:0, %rax
-		     addq foo@gottpoff(%rip), %rax
+			movq %fs:0, %rax
+			addq foo@gottpoff(%rip), %rax
 		     For 32bit, change
-		     leaq foo@tlsgd(%rip), %rdi
-		     .word 0x6666; rex64; call __tls_get_addr@plt
+			leaq foo@tlsgd(%rip), %rdi
+			.word 0x6666; rex64; call __tls_get_addr@PLT
+		     or
+			leaq foo@tlsgd(%rip), %rdi
+			.byte 0x66; rex64;
+			call *__tls_get_addr@GOTPCREL(%rip)
+			which may be converted to
+			addr32 call __tls_get_addr
 		     into:
-		     movl %fs:0, %eax
-		     addq foo@gottpoff(%rip), %rax
+			movl %fs:0, %eax
+			addq foo@gottpoff(%rip), %rax
 		     For largepic, change:
-		     leaq foo@tlsgd(%rip), %rdi
-		     movabsq $__tls_get_addr@pltoff, %rax
-		     addq %rbx, %rax
-		     call *%rax
+			leaq foo@tlsgd(%rip), %rdi
+			movabsq $__tls_get_addr@pltoff, %rax
+			addq %r15, %rax
+			call *%rax
 		     into:
-		     movq %fs:0, %rax
-		     addq foo@gottpoff(%rax), %rax
-		     nopw 0x0(%rax,%rax,1) */
+			movq %fs:0, %rax
+			addq foo@gottpoff(%rax), %rax
+			nopw 0x0(%rax,%rax,1)  */
 		  int largepic = 0;
-		  if (ABI_64_P (output_bfd)
-		      && contents[roff + 5] == (bfd_byte) '\xb8')
+		  if (ABI_64_P (output_bfd))
 		    {
-		      memcpy (contents + roff - 3,
-			      "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05"
-			      "\0\0\0\0\x66\x0f\x1f\x44\0", 22);
-		      largepic = 1;
+		      if (contents[roff + 5] == 0xb8)
+			{
+			  memcpy (contents + roff - 3,
+				  "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05"
+				  "\0\0\0\0\x66\x0f\x1f\x44\0", 22);
+			  largepic = 1;
+			}
+		      else
+			memcpy (contents + roff - 4,
+				"\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0",
+				16);
 		    }
-		  else if (ABI_64_P (output_bfd))
-		    memcpy (contents + roff - 4,
-			    "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0",
-			    16);
 		  else
 		    memcpy (contents + roff - 3,
 			    "\x64\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0",
@@ -4838,6 +5515,7 @@ direct:
 			      contents + roff + 8 + largepic);
 		  /* Skip R_X86_64_PLT32/R_X86_64_PLTOFF64.  */
 		  rel++;
+		  wrel++;
 		  continue;
 		}
 	      else if (ELF32_R_TYPE (rel->r_info) == R_X86_64_GOTPC32_TLSDESC)
@@ -4887,41 +5565,67 @@ direct:
 	  if (! elf_x86_64_tls_transition (info, input_bfd,
 					   input_section, contents,
 					   symtab_hdr, sym_hashes,
-					   &r_type, GOT_UNKNOWN,
-					   rel, relend, h, r_symndx))
+					   &r_type, GOT_UNKNOWN, rel,
+					   relend, h, r_symndx, TRUE))
 	    return FALSE;
 
 	  if (r_type != R_X86_64_TLSLD)
 	    {
 	      /* LD->LE transition:
-		 leaq foo@tlsld(%rip), %rdi; call __tls_get_addr.
+			leaq foo@tlsld(%rip), %rdi
+			call __tls_get_addr@PLT
+		 For 64bit, we change it into:
+			.word 0x6666; .byte 0x66; movq %fs:0, %rax
+		 For 32bit, we change it into:
+			nopl 0x0(%rax); movl %fs:0, %eax
+		 Or
+			leaq foo@tlsld(%rip), %rdi;
+			call *__tls_get_addr@GOTPCREL(%rip)
+			which may be converted to
+			addr32 call __tls_get_addr
 		 For 64bit, we change it into:
-		 .word 0x6666; .byte 0x66; movq %fs:0, %rax.
+			.word 0x6666; .word 0x6666; movq %fs:0, %rax
 		 For 32bit, we change it into:
-		 nopl 0x0(%rax); movl %fs:0, %eax.
+			nopw 0x0(%rax); movl %fs:0, %eax
 		 For largepic, change:
-		 leaq foo@tlsgd(%rip), %rdi
-		 movabsq $__tls_get_addr@pltoff, %rax
-		 addq %rbx, %rax
-		 call *%rax
-		 into:
-		 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1)
-		 movq %fs:0, %eax */
+			leaq foo@tlsgd(%rip), %rdi
+			movabsq $__tls_get_addr@pltoff, %rax
+			addq %rbx, %rax
+			call *%rax
+		 into
+			data16 data16 data16 nopw %cs:0x0(%rax,%rax,1)
+			movq %fs:0, %eax  */
 
 	      BFD_ASSERT (r_type == R_X86_64_TPOFF32);
-	      if (ABI_64_P (output_bfd)
-		  && contents[rel->r_offset + 5] == (bfd_byte) '\xb8')
-		memcpy (contents + rel->r_offset - 3,
-			"\x66\x66\x66\x66\x2e\x0f\x1f\x84\0\0\0\0\0"
-			"\x64\x48\x8b\x04\x25\0\0\0", 22);
-	      else if (ABI_64_P (output_bfd))
-		memcpy (contents + rel->r_offset - 3,
-			"\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0", 12);
+	      if (ABI_64_P (output_bfd))
+		{
+		  if (contents[rel->r_offset + 5] == 0xb8)
+		    memcpy (contents + rel->r_offset - 3,
+			    "\x66\x66\x66\x66\x2e\x0f\x1f\x84\0\0\0\0\0"
+			    "\x64\x48\x8b\x04\x25\0\0\0", 22);
+		  else if (contents[rel->r_offset + 4] == 0xff
+			   || contents[rel->r_offset + 4] == 0x67)
+		    memcpy (contents + rel->r_offset - 3,
+			    "\x66\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0",
+			    13);
+		  else
+		    memcpy (contents + rel->r_offset - 3,
+			    "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0", 12);
+		}
 	      else
-		memcpy (contents + rel->r_offset - 3,
-			"\x0f\x1f\x40\x00\x64\x8b\x04\x25\0\0\0", 12);
-	      /* Skip R_X86_64_PC32/R_X86_64_PLT32/R_X86_64_PLTOFF64.  */
+		{
+		  if (contents[rel->r_offset + 4] == 0xff)
+		    memcpy (contents + rel->r_offset - 3,
+			    "\x66\x0f\x1f\x40\x00\x64\x8b\x04\x25\0\0\0",
+			    13);
+		  else
+		    memcpy (contents + rel->r_offset - 3,
+			    "\x0f\x1f\x40\x00\x64\x8b\x04\x25\0\0\0", 12);
+		}
+	      /* Skip R_X86_64_PC32, R_X86_64_PLT32, R_X86_64_GOTPCRELX
+		 and R_X86_64_PLTOFF64.  */
 	      rel++;
+	      wrel++;
 	      continue;
 	    }
 
@@ -4957,7 +5661,8 @@ direct:
 	  break;
 
 	case R_X86_64_DTPOFF32:
-	  if (!info->executable|| (input_section->flags & SEC_CODE) == 0)
+	  if (!bfd_link_executable (info)
+	      || (input_section->flags & SEC_CODE) == 0)
 	    relocation -= elf_x86_64_dtpoff_base (info);
 	  else
 	    relocation = elf_x86_64_tpoff (info, relocation);
@@ -4965,7 +5670,7 @@ direct:
 
 	case R_X86_64_TPOFF32:
 	case R_X86_64_TPOFF64:
-	  BFD_ASSERT (info->executable);
+	  BFD_ASSERT (bfd_link_executable (info));
 	  relocation = elf_x86_64_tpoff (info, relocation);
 	  break;
 
@@ -4987,7 +5692,8 @@ direct:
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd,
 	     input_section,
@@ -5021,22 +5727,42 @@ check_relocation_error:
 	    }
 
 	  if (r == bfd_reloc_overflow)
-	    {
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
-	    }
+	    (*info->callbacks->reloc_overflow)
+	      (info, (h ? &h->root : NULL), name, howto->name,
+	       (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B(%A+0x%lx): reloc against `%s': error %d"),
 		 input_bfd, input_section,
 		 (long) rel->r_offset, name, (int) r);
 	      return FALSE;
 	    }
 	}
+
+      if (wrel != rel)
+	*wrel = *rel;
+    }
+
+  if (wrel != rel)
+    {
+      Elf_Internal_Shdr *rel_hdr;
+      size_t deleted = rel - wrel;
+
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      if (rel_hdr->sh_size == 0)
+	{
+	  /* It is too late to remove an empty reloc section.  Leave
+	     one NONE reloc.
+	     ??? What is wrong with an empty section???  */
+	  rel_hdr->sh_size = rel_hdr->sh_entsize;
+	  deleted -= 1;
+	}
+      rel_hdr = _bfd_elf_single_rel_hdr (input_section);
+      rel_hdr->sh_size -= rel_hdr->sh_entsize * deleted;
+      input_section->reloc_count -= deleted;
     }
 
   return TRUE;
@@ -5049,12 +5775,13 @@ static bfd_boolean
 elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
 				  struct bfd_link_info *info,
 				  struct elf_link_hash_entry *h,
-				  Elf_Internal_Sym *sym ATTRIBUTE_UNUSED)
+				  Elf_Internal_Sym *sym)
 {
   struct elf_x86_64_link_hash_table *htab;
   const struct elf_x86_64_backend_data *abed;
   bfd_boolean use_plt_bnd;
   struct elf_x86_64_link_hash_entry *eh;
+  bfd_boolean local_undefweak;
 
   htab = elf_x86_64_hash_table (info);
   if (htab == NULL)
@@ -5069,6 +5796,13 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 
   eh = (struct elf_x86_64_link_hash_entry *) h;
 
+  /* We keep PLT/GOT entries without dynamic PLT/GOT relocations for
+     resolved undefined weak symbols in executable so that their
+     references have value 0 at run-time.  */
+  local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+						     eh->has_got_reloc,
+						     eh);
+
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma plt_index;
@@ -5098,7 +5832,8 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
       /* This symbol has an entry in the procedure linkage table.  Set
 	 it up.	 */
       if ((h->dynindx == -1
-	   && !((h->forced_local || info->executable)
+	   && !local_undefweak
+	   && !((h->forced_local || bfd_link_executable (info))
 		&& h->def_regular
 		&& h->type == STT_GNU_IFUNC))
 	  || plt == NULL
@@ -5191,6 +5926,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 
       /* Check PC-relative offset overflow in PLT entry.  */
       if ((plt_got_pcrel_offset + 0x80000000) > 0xffffffff)
+	/* xgettext:c-format */
 	info->callbacks->einfo (_("%F%B: PC-relative offset overflow in PLT entry for `%s'\n"),
 				output_bfd, h->root.root.string);
 
@@ -5198,60 +5934,68 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 		  resolved_plt->contents + plt_offset + plt_got_offset);
 
       /* Fill in the entry in the global offset table, initially this
-	 points to the second part of the PLT entry.  */
-      bfd_put_64 (output_bfd, (plt->output_section->vma
-			       + plt->output_offset
-			       + h->plt.offset + abed->plt_lazy_offset),
-		  gotplt->contents + got_offset);
-
-      /* Fill in the entry in the .rela.plt section.  */
-      rela.r_offset = (gotplt->output_section->vma
-		       + gotplt->output_offset
-		       + got_offset);
-      if (h->dynindx == -1
-	  || ((info->executable
-	       || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-	      && h->def_regular
-	      && h->type == STT_GNU_IFUNC))
-	{
-	  /* If an STT_GNU_IFUNC symbol is locally defined, generate
-	     R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT.  */
-	  rela.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
-	  rela.r_addend = (h->root.u.def.value
-			   + h->root.u.def.section->output_section->vma
-			   + h->root.u.def.section->output_offset);
-	  /* R_X86_64_IRELATIVE comes last.  */
-	  plt_index = htab->next_irelative_index--;
-	}
-      else
-	{
-	  rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT);
-	  rela.r_addend = 0;
-	  plt_index = htab->next_jump_slot_index++;
+	 points to the second part of the PLT entry.  Leave the entry
+	 as zero for undefined weak symbol in PIE.  No PLT relocation
+	 against undefined weak symbol in PIE.  */
+      if (!local_undefweak)
+	{
+	  bfd_put_64 (output_bfd, (plt->output_section->vma
+				   + plt->output_offset
+				   + h->plt.offset
+				   + abed->plt_lazy_offset),
+		      gotplt->contents + got_offset);
+
+	  /* Fill in the entry in the .rela.plt section.  */
+	  rela.r_offset = (gotplt->output_section->vma
+			   + gotplt->output_offset
+			   + got_offset);
+	  if (h->dynindx == -1
+	      || ((bfd_link_executable (info)
+		   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+		  && h->def_regular
+		  && h->type == STT_GNU_IFUNC))
+	    {
+	      /* If an STT_GNU_IFUNC symbol is locally defined, generate
+		 R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT.  */
+	      rela.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
+	      rela.r_addend = (h->root.u.def.value
+			       + h->root.u.def.section->output_section->vma
+			       + h->root.u.def.section->output_offset);
+	      /* R_X86_64_IRELATIVE comes last.  */
+	      plt_index = htab->next_irelative_index--;
+	    }
+	  else
+	    {
+	      rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT);
+	      rela.r_addend = 0;
+	      plt_index = htab->next_jump_slot_index++;
+	    }
+
+	  /* Don't fill PLT entry for static executables.  */
+	  if (plt == htab->elf.splt)
+	    {
+	      bfd_vma plt0_offset = h->plt.offset + plt_plt_insn_end;
+
+	      /* Put relocation index.  */
+	      bfd_put_32 (output_bfd, plt_index,
+			  (plt->contents + h->plt.offset
+			   + abed->plt_reloc_offset));
+
+	      /* Put offset for jmp .PLT0 and check for overflow.  We don't
+		 check relocation index for overflow since branch displacement
+		 will overflow first.  */
+	      if (plt0_offset > 0x80000000)
+		/* xgettext:c-format */
+		info->callbacks->einfo (_("%F%B: branch displacement overflow in PLT entry for `%s'\n"),
+					output_bfd, h->root.root.string);
+	      bfd_put_32 (output_bfd, - plt0_offset,
+			  plt->contents + h->plt.offset + plt_plt_offset);
+	    }
+
+	  bed = get_elf_backend_data (output_bfd);
+	  loc = relplt->contents + plt_index * bed->s->sizeof_rela;
+	  bed->s->swap_reloca_out (output_bfd, &rela, loc);
 	}
-
-      /* Don't fill PLT entry for static executables.  */
-      if (plt == htab->elf.splt)
-	{
-	  bfd_vma plt0_offset = h->plt.offset + plt_plt_insn_end;
-
-	  /* Put relocation index.  */
-	  bfd_put_32 (output_bfd, plt_index,
-		      plt->contents + h->plt.offset + abed->plt_reloc_offset);
-
-	  /* Put offset for jmp .PLT0 and check for overflow.  We don't
-	     check relocation index for overflow since branch displacement
-	     will overflow first.  */
-	  if (plt0_offset > 0x80000000)
-	    info->callbacks->einfo (_("%F%B: branch displacement overflow in PLT entry for `%s'\n"),
-				    output_bfd, h->root.root.string);
-	  bfd_put_32 (output_bfd, - plt0_offset,
-		      plt->contents + h->plt.offset + plt_plt_offset);
-	}
-
-      bed = get_elf_backend_data (output_bfd);
-      loc = relplt->contents + plt_index * bed->s->sizeof_rela;
-      bed->s->swap_reloca_out (output_bfd, &rela, loc);
     }
   else if (eh->plt_got.offset != (bfd_vma) -1)
     {
@@ -5306,6 +6050,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
       got_after_plt = got->output_section->vma > plt->output_section->vma;
       if ((got_after_plt && got_pcrel_offset < 0)
 	  || (!got_after_plt && got_pcrel_offset > 0))
+	/* xgettext:c-format */
 	info->callbacks->einfo (_("%F%B: PC-relative offset overflow in GOT PLT entry for `%s'\n"),
 				output_bfd, h->root.root.string);
 
@@ -5313,7 +6058,8 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 		  plt->contents + plt_offset + plt_got_offset);
     }
 
-  if (!h->def_regular
+  if (!local_undefweak
+      && !h->def_regular
       && (h->plt.offset != (bfd_vma) -1
 	  || eh->plt_got.offset != (bfd_vma) -1))
     {
@@ -5330,11 +6076,15 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 	sym->st_value = 0;
     }
 
+  /* Don't generate dynamic GOT relocation against undefined weak
+     symbol in executable.  */
   if (h->got.offset != (bfd_vma) -1
       && ! GOT_TLS_GD_ANY_P (elf_x86_64_hash_entry (h)->tls_type)
-      && elf_x86_64_hash_entry (h)->tls_type != GOT_TLS_IE)
+      && elf_x86_64_hash_entry (h)->tls_type != GOT_TLS_IE
+      && !local_undefweak)
     {
       Elf_Internal_Rela rela;
+      asection *relgot = htab->elf.srelgot;
 
       /* This symbol has an entry in the global offset table.  Set it
 	 up.  */
@@ -5353,7 +6103,27 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
       if (h->def_regular
 	  && h->type == STT_GNU_IFUNC)
 	{
-	  if (info->shared)
+	  if (h->plt.offset == (bfd_vma) -1)
+	    {
+	      /* STT_GNU_IFUNC is referenced without PLT.  */
+	      if (htab->elf.splt == NULL)
+		{
+		  /* use .rel[a].iplt section to store .got relocations
+		     in static executable.  */
+		  relgot = htab->elf.irelplt;
+		}
+	      if (SYMBOL_REFERENCES_LOCAL (info, h))
+		{
+		  rela.r_info = htab->r_info (0,
+					      R_X86_64_IRELATIVE);
+		  rela.r_addend = (h->root.u.def.value
+				   + h->root.u.def.section->output_section->vma
+				   + h->root.u.def.section->output_offset);
+		}
+	      else
+		goto do_glob_dat;
+	    }
+	  else if (bfd_link_pic (info))
 	    {
 	      /* Generate R_X86_64_GLOB_DAT.  */
 	      goto do_glob_dat;
@@ -5376,7 +6146,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *o
 	      return TRUE;
 	    }
 	}
-      else if (info->shared
+      else if (bfd_link_pic (info)
 	       && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  if (!h->def_regular)
@@ -5397,19 +6167,21 @@ do_glob_dat:
 	  rela.r_addend = 0;
 	}
 
-      elf_append_rela (output_bfd, htab->elf.srelgot, &rela);
+      elf_append_rela (output_bfd, relgot, &rela);
     }
 
   if (h->needs_copy)
     {
       Elf_Internal_Rela rela;
+      asection *s;
 
       /* This symbol needs a copy reloc.  Set it up.  */
 
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->elf.srelbss == NULL
+	  || htab->elf.sreldynrelro == NULL)
 	abort ();
 
       rela.r_offset = (h->root.u.def.value
@@ -5417,7 +6189,11 @@ do_glob_dat:
 		       + h->root.u.def.section->output_offset);
       rela.r_info = htab->r_info (h->dynindx, R_X86_64_COPY);
       rela.r_addend = 0;
-      elf_append_rela (output_bfd, htab->srelbss, &rela);
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
+      elf_append_rela (output_bfd, s, &rela);
     }
 
   return TRUE;
@@ -5438,16 +6214,61 @@ elf_x86_64_finish_local_dynamic_symbol (
 					     info, h, NULL);
 }
 
+/* Finish up undefined weak symbol handling in PIE.  Fill its PLT entry
+   here since undefined weak symbol may not be dynamic and may not be
+   called for elf_x86_64_finish_dynamic_symbol.  */
+
+static bfd_boolean
+elf_x86_64_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh,
+					void *inf)
+{
+  struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) bh;
+  struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+  if (h->root.type != bfd_link_hash_undefweak
+      || h->dynindx != -1)
+    return TRUE;
+
+  return elf_x86_64_finish_dynamic_symbol (info->output_bfd,
+					     info, h, NULL);
+}
+
 /* Used to decide how to sort relocs in an optimal manner for the
    dynamic linker, before writing them out.  */
 
 static enum elf_reloc_type_class
-elf_x86_64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+elf_x86_64_reloc_type_class (const struct bfd_link_info *info,
 			     const asection *rel_sec ATTRIBUTE_UNUSED,
 			     const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_x86_64_link_hash_table *htab = elf_x86_64_hash_table (info);
+
+  if (htab->elf.dynsym != NULL
+      && htab->elf.dynsym->contents != NULL)
+    {
+      /* Check relocation against STT_GNU_IFUNC symbol if there are
+         dynamic symbols.  */
+      unsigned long r_symndx = htab->r_sym (rela->r_info);
+      if (r_symndx != STN_UNDEF)
+	{
+	  Elf_Internal_Sym sym;
+	  if (!bed->s->swap_symbol_in (abfd,
+				       (htab->elf.dynsym->contents
+					+ r_symndx * bed->s->sizeof_sym),
+				       0, &sym))
+	    abort ();
+
+	  if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+	    return reloc_class_ifunc;
+	}
+    }
+
   switch ((int) ELF32_R_TYPE (rela->r_info))
     {
+    case R_X86_64_IRELATIVE:
+      return reloc_class_ifunc;
     case R_X86_64_RELATIVE:
     case R_X86_64_RELATIVE64:
       return reloc_class_relative;
@@ -5523,21 +6344,6 @@ elf_x86_64_finish_dynamic_sections (bfd 
 	      dyn.d_un.d_val = s->size;
 	      break;
 
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      if (htab->elf.srelplt != NULL)
-		{
-		  s = htab->elf.srelplt->output_section;
-		  dyn.d_un.d_val -= s->size;
-		}
-	      break;
-
 	    case DT_TLSDESC_PLT:
 	      s = htab->elf.splt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset
@@ -5629,7 +6435,7 @@ elf_x86_64_finish_dynamic_sections (bfd 
     {
       if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
 	  return FALSE;
 	}
@@ -5681,10 +6487,92 @@ elf_x86_64_finish_dynamic_sections (bfd 
 	}
     }
 
+  /* Adjust .eh_frame for .plt.got section.  */
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      if (htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && (htab->plt_got->flags & SEC_EXCLUDE) == 0
+	  && htab->plt_got->output_section != NULL
+	  && htab->plt_got_eh_frame->output_section != NULL)
+	{
+	  bfd_vma plt_start = htab->plt_got->output_section->vma;
+	  bfd_vma eh_frame_start = htab->plt_got_eh_frame->output_section->vma
+				   + htab->plt_got_eh_frame->output_offset
+				   + PLT_FDE_START_OFFSET;
+	  bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+			     htab->plt_got_eh_frame->contents
+			     + PLT_FDE_START_OFFSET);
+	}
+      if (htab->plt_got_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
+	{
+	  if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+						 htab->plt_got_eh_frame,
+						 htab->plt_got_eh_frame->contents))
+	    return FALSE;
+	}
+    }
+
+  /* Adjust .eh_frame for .plt.bnd section.  */
+  if (htab->plt_bnd_eh_frame != NULL
+      && htab->plt_bnd_eh_frame->contents != NULL)
+    {
+      if (htab->plt_bnd != NULL
+	  && htab->plt_bnd->size != 0
+	  && (htab->plt_bnd->flags & SEC_EXCLUDE) == 0
+	  && htab->plt_bnd->output_section != NULL
+	  && htab->plt_bnd_eh_frame->output_section != NULL)
+	{
+	  bfd_vma plt_start = htab->plt_bnd->output_section->vma;
+	  bfd_vma eh_frame_start = htab->plt_bnd_eh_frame->output_section->vma
+				   + htab->plt_bnd_eh_frame->output_offset
+				   + PLT_FDE_START_OFFSET;
+	  bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+			     htab->plt_bnd_eh_frame->contents
+			     + PLT_FDE_START_OFFSET);
+	}
+      if (htab->plt_bnd_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
+	{
+	  if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+						 htab->plt_bnd_eh_frame,
+						 htab->plt_bnd_eh_frame->contents))
+	    return FALSE;
+	}
+    }
+
   if (htab->elf.sgot && htab->elf.sgot->size > 0)
     elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize
       = GOT_ENTRY_SIZE;
 
+  /* Fill PLT entries for undefined weak symbols in PIE.  */
+  if (bfd_link_pie (info))
+    bfd_hash_traverse (&info->hash->table,
+		       elf_x86_64_pie_finish_undefweak_symbol,
+		       info);
+
+  return TRUE;
+}
+
+/* Fill PLT/GOT entries and allocate dynamic relocations for local
+   STT_GNU_IFUNC symbols, which aren't in the ELF linker hash table.
+   It has to be done before elf_link_sort_relocs is called so that
+   dynamic relocations are properly sorted.  */
+
+static bfd_boolean
+elf_x86_64_output_arch_local_syms
+  (bfd *output_bfd ATTRIBUTE_UNUSED,
+   struct bfd_link_info *info,
+   void *flaginfo ATTRIBUTE_UNUSED,
+   int (*func) (void *, const char *,
+		Elf_Internal_Sym *,
+		asection *,
+		struct elf_link_hash_entry *) ATTRIBUTE_UNUSED)
+{
+  struct elf_x86_64_link_hash_table *htab = elf_x86_64_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
   /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols.  */
   htab_traverse (htab->loc_hash_table,
 		 elf_x86_64_finish_local_dynamic_symbol,
@@ -5766,19 +6654,20 @@ bad_return:
 
       reloc_index = H_GET_32 (abfd, (plt_contents + plt_offset
 				     + bed->plt_reloc_offset));
-      if (reloc_index >= count)
-	abort ();
-      if (plt_bnd)
+      if (reloc_index < count)
 	{
-	  /* This is the index in .plt section.  */
-	  long plt_index = plt_offset / bed->plt_entry_size;
-	  /* Store VMA + the offset in .plt.bnd section.  */
-	  plt_sym_val[reloc_index] =
-	    (plt_bnd->vma
-	     + (plt_index - 1) * sizeof (elf_x86_64_legacy_plt2_entry));
+	  if (plt_bnd)
+	    {
+	      /* This is the index in .plt section.  */
+	      long plt_index = plt_offset / bed->plt_entry_size;
+	      /* Store VMA + the offset in .plt.bnd section.  */
+	      plt_sym_val[reloc_index] =
+		(plt_bnd->vma
+		 + (plt_index - 1) * sizeof (elf_x86_64_legacy_plt2_entry));
+	    }
+	  else
+	    plt_sym_val[reloc_index] = plt->vma + plt_offset;
 	}
-      else
-	plt_sym_val[reloc_index] = plt->vma + plt_offset;
       plt_offset += bed->plt_entry_size;
 
       /* PR binutils/18437: Skip extra relocations in the .rela.plt
@@ -5836,7 +6725,7 @@ elf_x86_64_section_from_shdr (bfd *abfd,
 
 static bfd_boolean
 elf_x86_64_add_symbol_hook (bfd *abfd,
-			    struct bfd_link_info *info,
+			    struct bfd_link_info *info ATTRIBUTE_UNUSED,
 			    Elf_Internal_Sym *sym,
 			    const char **namep ATTRIBUTE_UNUSED,
 			    flagword *flagsp ATTRIBUTE_UNUSED,
@@ -5865,12 +6754,6 @@ elf_x86_64_add_symbol_hook (bfd *abfd,
       return TRUE;
     }
 
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
-      && (abfd->flags & DYNAMIC) == 0
-      && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
-
   return TRUE;
 }
 
@@ -6043,6 +6926,9 @@ static const struct bfd_elf_special_sect
 #define elf_backend_rela_normal		    1
 #define elf_backend_plt_alignment           4
 #define elf_backend_extern_protected_data   1
+#define elf_backend_caches_rawsize	    1
+#define elf_backend_dtrel_excludes_plt	    1
+#define elf_backend_want_dynrelro	    1
 
 #define elf_info_to_howto		    elf_x86_64_info_to_howto
 
@@ -6059,8 +6945,8 @@ static const struct bfd_elf_special_sect
 #define elf_backend_create_dynamic_sections elf_x86_64_create_dynamic_sections
 #define elf_backend_finish_dynamic_sections elf_x86_64_finish_dynamic_sections
 #define elf_backend_finish_dynamic_symbol   elf_x86_64_finish_dynamic_symbol
+#define elf_backend_output_arch_local_syms  elf_x86_64_output_arch_local_syms
 #define elf_backend_gc_mark_hook	    elf_x86_64_gc_mark_hook
-#define elf_backend_gc_sweep_hook	    elf_x86_64_gc_sweep_hook
 #define elf_backend_grok_prstatus	    elf_x86_64_grok_prstatus
 #define elf_backend_grok_psinfo		    elf_x86_64_grok_psinfo
 #ifdef CORE_HEADER
@@ -6098,6 +6984,10 @@ static const struct bfd_elf_special_sect
   elf_x86_64_additional_program_headers
 #define elf_backend_hash_symbol \
   elf_x86_64_hash_symbol
+#define elf_backend_omit_section_dynsym \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
+#define elf_backend_fixup_symbol \
+  elf_x86_64_fixup_symbol
 
 #include "elf64-target.h"
 
@@ -6147,16 +7037,33 @@ static const struct bfd_elf_special_sect
 
 /* The 64-bit static TLS arena size is rounded to the nearest 16-byte
    boundary.  */
-#undef elf_backend_static_tls_alignment
+#undef  elf_backend_static_tls_alignment
 #define elf_backend_static_tls_alignment    16
 
 /* The Solaris 2 ABI requires a plt symbol on all platforms.
 
    Cf. Linker and Libraries Guide, Ch. 2, Link-Editor, Generating the Output
    File, p.63.  */
-#undef elf_backend_want_plt_sym
+#undef  elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	    1
 
+#undef  elf_backend_strtab_flags
+#define elf_backend_strtab_flags	SHF_STRINGS
+
+static bfd_boolean
+elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED,
+						  bfd *obfd ATTRIBUTE_UNUSED,
+						  const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED,
+						  Elf_Internal_Shdr *osection ATTRIBUTE_UNUSED)
+{
+  /* PR 19938: FIXME: Need to add code for setting the sh_info
+     and sh_link fields of Solaris specific section types.  */
+  return FALSE;
+}
+
+#undef  elf_backend_copy_special_section_fields
+#define elf_backend_copy_special_section_fields elf64_x86_64_copy_solaris_special_section_fields
+
 #include "elf64-target.h"
 
 /* Native Client support.  */
@@ -6188,6 +7095,8 @@ elf64_x86_64_nacl_elf_object_p (bfd *abf
 #undef	elf_backend_static_tls_alignment
 #undef	elf_backend_want_plt_sym
 #define elf_backend_want_plt_sym	0
+#undef  elf_backend_strtab_flags
+#undef  elf_backend_copy_special_section_fields
 
 /* NaCl uses substantially different PLT entries for the same effects.  */
 
@@ -6208,11 +7117,11 @@ static const bfd_byte elf_x86_64_nacl_pl
     0x66, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw 0x0(%rax,%rax,1)	*/
 
     /* 32 bytes of nop to pad out to the standard size.  */
-    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data32 prefixes	*/
+    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data16 prefixes	*/
     0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1)	*/
-    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data32 prefixes	*/
+    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data16 prefixes	*/
     0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1)	*/
-    0x66,                                  /* excess data32 prefix	*/
+    0x66,                                  /* excess data16 prefix	*/
     0x90                                   /* nop */
   };
 
@@ -6224,7 +7133,7 @@ static const bfd_byte elf_x86_64_nacl_pl
     0x41, 0xff, 0xe3,             	/* jmpq *%r11			*/
 
     /* 15-byte nop sequence to pad out to the next 32-byte boundary.  */
-    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data32 prefixes	*/
+    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data16 prefixes	*/
     0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1)	*/
 
     /* Lazy GOT entries point here (32-byte aligned).  */
@@ -6234,7 +7143,7 @@ static const bfd_byte elf_x86_64_nacl_pl
     0, 0, 0, 0,           /* replaced with offset to start of .plt0.  */
 
     /* 22 bytes of nop to pad out to the standard size.  */
-    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data32 prefixes	*/
+    0x66, 0x66, 0x66, 0x66, 0x66, 0x66,    /* excess data16 prefixes	*/
     0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1)	*/
     0x0f, 0x1f, 0x80, 0, 0, 0, 0,          /* nopl 0x0(%rax)		*/
   };
@@ -6296,6 +7205,8 @@ static const struct elf_x86_64_backend_d
     32,                                      /* plt_lazy_offset */
     elf_x86_64_nacl_eh_frame_plt,            /* eh_frame_plt */
     sizeof (elf_x86_64_nacl_eh_frame_plt),   /* eh_frame_plt_size */
+    NULL,                                    /* eh_frame_plt_got */
+    0,                                       /* eh_frame_plt_got_size */
   };
 
 #undef	elf_backend_arch_data
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-attrs.c ./bfd/elf-attrs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-attrs.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-attrs.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF attributes support (based on ARM EABI attributes).
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -450,7 +450,7 @@ _bfd_elf_parse_attributes (bfd *abfd, El
   p = contents;
   p_end = p + hdr->sh_size;
   std_sec = get_elf_backend_data (abfd)->obj_attrs_vendor;
-  
+
   if (*(p++) == 'A')
     {
       len = hdr->sh_size - 1;
@@ -493,7 +493,7 @@ _bfd_elf_parse_attributes (bfd *abfd, El
 	      bfd_vma subsection_len;
 	      bfd_byte *end;
 
-	      tag = safe_read_leb128 (abfd, p, &n, FALSE, p_end);
+	      tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, p_end);
 	      p += n;
 	      if (p < p_end - 4)
 		subsection_len = bfd_get_32 (abfd, p);
@@ -517,13 +517,13 @@ _bfd_elf_parse_attributes (bfd *abfd, El
 		    {
 		      int type;
 
-		      tag = safe_read_leb128 (abfd, p, &n, FALSE, end);
+		      tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
 		      p += n;
 		      type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag);
 		      switch (type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL))
 			{
 			case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL:
-			  val = safe_read_leb128 (abfd, p, &n, FALSE, end);
+			  val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
 			  p += n;
 			  bfd_elf_add_obj_attr_int_string (abfd, vendor, tag,
 							   val, (char *) p);
@@ -535,7 +535,7 @@ _bfd_elf_parse_attributes (bfd *abfd, El
 			  p += strlen ((char *)p) + 1;
 			  break;
 			case ATTR_TYPE_FLAG_INT_VAL:
-			  val = safe_read_leb128 (abfd, p, &n, FALSE, end);
+			  val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
 			  p += n;
 			  bfd_elf_add_obj_attr_int (abfd, vendor, tag, val);
 			  break;
@@ -571,8 +571,9 @@ _bfd_elf_parse_attributes (bfd *abfd, El
    attributes.  */
 
 bfd_boolean
-_bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
+_bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   int vendor;
@@ -590,6 +591,7 @@ _bfd_elf_merge_object_attributes (bfd *i
       if (in_attr->i > 0 && strcmp (in_attr->s, "gnu") != 0)
 	{
 	  _bfd_error_handler
+	    /* xgettext:c-format */
 		(_("error: %B: Object has vendor-specific contents that "
 		   "must be processed by the '%s' toolchain"),
 		 ibfd, in_attr->s);
@@ -599,6 +601,7 @@ _bfd_elf_merge_object_attributes (bfd *i
       if (in_attr->i != out_attr->i
 	  || (in_attr->i != 0 && strcmp (in_attr->s, out_attr->s) != 0))
 	{
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("error: %B: Object tag '%d, %s' is "
 				"incompatible with tag '%d, %s'"),
 			      ibfd,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-bfd.h ./bfd/elf-bfd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-bfd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-bfd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end data structures for ELF files.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -108,6 +108,15 @@ struct elf_link_virtual_table_entry
     struct elf_link_hash_entry *parent;
   };
 
+/* ELF symbol version.  */
+enum elf_symbol_version
+  {
+    unknown = 0,
+    unversioned,
+    versioned,
+    versioned_hidden
+  };
+
 /* ELF linker hash table entries.  */
 
 struct elf_link_hash_entry
@@ -115,7 +124,8 @@ struct elf_link_hash_entry
   struct bfd_link_hash_entry root;
 
   /* Symbol index in output file.  This is initialized to -1.  It is
-     set to -2 if the symbol is used by a reloc.  */
+     set to -2 if the symbol is used by a reloc.  It is set to -3 if
+     this symbol is defined in a discarded section.  */
   long indx;
 
   /* Symbol index as a dynamic symbol.  Initialized to -1, and remains
@@ -178,8 +188,8 @@ struct elf_link_hash_entry
   unsigned int needs_plt : 1;
   /* Symbol appears in a non-ELF input file.  */
   unsigned int non_elf : 1;
-  /* Symbol should be marked as hidden in the version information.  */
-  unsigned int hidden : 1;
+  /* Symbol version information.  */
+  ENUM_BITFIELD (elf_symbol_version) versioned : 2;
   /* Symbol was forced to local scope due to a version script file.  */
   unsigned int forced_local : 1;
   /* Symbol was forced to be dynamic due to a version script file.  */
@@ -332,6 +342,10 @@ struct eh_cie_fde
 	 make_per_encoding_relative is.  */
       unsigned int per_encoding_relative : 1;
 
+      /* True if the CIE contains personality data aligned to a
+	 multiple of eight bytes.  */
+      unsigned int per_encoding_aligned8 : 1;
+
       /* True if we need to add an 'R' (FDE encoding) entry to the
 	 CIE's augmentation data.  */
       unsigned int add_fde_encoding : 1;
@@ -340,7 +354,7 @@ struct eh_cie_fde
       unsigned int merged : 1;
 
       /* Unused bits.  */
-      unsigned int pad1 : 18;
+      unsigned int pad1 : 17;
     } cie;
   } u;
   unsigned int reloc_index;
@@ -434,6 +448,7 @@ enum elf_target_id
 {
   AARCH64_ELF_DATA = 1,
   ALPHA_ELF_DATA,
+  ARC_ELF_DATA,
   ARM_ELF_DATA,
   AVR_ELF_DATA,
   BFIN_ELF_DATA,
@@ -456,6 +471,7 @@ enum elf_target_id
   OR1K_ELF_DATA,
   PPC32_ELF_DATA,
   PPC64_ELF_DATA,
+  PRU_ELF_DATA,
   S390_ELF_DATA,
   SH_ELF_DATA,
   SPARC_ELF_DATA,
@@ -466,6 +482,7 @@ enum elf_target_id
   XGATE_ELF_DATA,
   TILEGX_ELF_DATA,
   TILEPRO_ELF_DATA,
+  RISCV_ELF_DATA,
   GENERIC_ELF_DATA
 };
 
@@ -511,9 +528,10 @@ struct elf_link_hash_table
   union gotplt_union init_got_offset;
   union gotplt_union init_plt_offset;
 
-  /* The number of symbols found in the link which must be put into
-     the .dynsym section.  */
+  /* The number of symbols found in the link which is intended for the
+     mandatory DT_SYMTAB tag (.dynsym section) in .dynamic section.  */
   bfd_size_type dynsymcount;
+  bfd_size_type local_dynsymcount;
 
   /* The string table of dynamic symbols, which becomes the .dynstr
      section.  */
@@ -582,10 +600,15 @@ struct elf_link_hash_table
   asection *srelgot;
   asection *splt;
   asection *srelplt;
+  asection *sdynbss;
+  asection *srelbss;
+  asection *sdynrelro;
+  asection *sreldynrelro;
   asection *igotplt;
   asection *iplt;
   asection *irelplt;
   asection *irelifunc;
+  asection *dynsym;
 };
 
 /* Look up an entry in an ELF linker hash table.  */
@@ -692,9 +715,9 @@ struct elf_size_info {
 enum elf_reloc_type_class {
   reloc_class_normal,
   reloc_class_relative,
-  reloc_class_plt,
   reloc_class_copy,
-  reloc_class_ifunc
+  reloc_class_ifunc,
+  reloc_class_plt
 };
 
 struct elf_reloc_cookie
@@ -721,15 +744,15 @@ typedef enum {
 struct bfd_elf_special_section
 {
   const char *prefix;
-  int prefix_length;
+  unsigned int prefix_length;
   /* 0 means name must match PREFIX exactly.
      -1 means name must start with PREFIX followed by an arbitrary string.
      -2 means name must match PREFIX exactly or consist of PREFIX followed
      by a dot then anything.
      > 0 means name must start with the first PREFIX_LENGTH chars of
      PREFIX and finish with the last SUFFIX_LENGTH chars of PREFIX.  */
-  int suffix_length;
-  int type;
+  signed int suffix_length;
+  unsigned int type;
   bfd_vma attr;
 };
 
@@ -743,6 +766,8 @@ typedef asection * (*elf_gc_mark_hook_fn
   (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
    struct elf_link_hash_entry *, Elf_Internal_Sym *);
 
+struct bfd_elf_section_reloc_data;
+
 struct elf_backend_data
 {
   /* The architecture for this backend.  */
@@ -755,7 +780,7 @@ struct elf_backend_data
   /* The ELF machine code (EM_xxxx) for this backend.  */
   int elf_machine_code;
 
-  /* EI_OSABI. */
+  /* EI_OSABI.  */
   int elf_osabi;
 
   /* The maximum page size for this backend.  */
@@ -1061,6 +1086,11 @@ struct elf_backend_data
   bfd_boolean (*elf_backend_modify_program_headers)
     (bfd *, struct bfd_link_info *);
 
+  /* This function is called to see if the PHDR header should be
+     checked for validity.  */
+  bfd_boolean (*elf_backend_allow_non_load_phdr)
+    (bfd *,  const Elf_Internal_Phdr *, unsigned);
+
   /* This function is called before section garbage collection to
      mark entry symbol sections.  */
   void (*gc_keep)
@@ -1115,6 +1145,11 @@ struct elf_backend_data
      bfd_boolean (*) (void *, const char *, Elf_Internal_Sym *, asection *,
 		      struct elf_link_hash_entry *));
 
+  /* Filter what symbols of the output file to include in the import
+     library if one is created.  */
+  unsigned int (*elf_backend_filter_implib_symbols)
+    (bfd *, struct bfd_link_info *, asymbol **, long);
+
   /* Copy any information related to dynamic linking from a pre-existing
      symbol to a newly created symbol.  Also called to copy flags and
      other back-end info to a weakdef, in which case the symbol is not
@@ -1155,11 +1190,21 @@ struct elf_backend_data
     (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
      struct elf_link_hash_entry **);
 
+  /* Update relocations.  It is allowed to change the number and the order.
+     In such a case hashes should be invalidated.  */
+  void (*elf_backend_update_relocs)
+    (asection *, struct bfd_elf_section_reloc_data *);
+
   /* Count relocations.  Not called for relocatable links
      or if all relocs are being preserved in the output.  */
   unsigned int (*elf_backend_count_relocs)
     (struct bfd_link_info *, asection *);
 
+  /* Count additionals relocations.  Called for relocatable links if
+     additional relocations needs to be created.  */
+  unsigned int (*elf_backend_count_additional_relocs)
+    (asection *);
+
   /* Say whether to sort relocs output by ld -r and ld --emit-relocs,
      by r_offset.  If NULL, default to true.  */
   bfd_boolean (*sort_relocs_p)
@@ -1285,8 +1330,18 @@ struct elf_backend_data
   /* Return the section which RELOC_SEC applies to.  */
   asection *(*get_reloc_section) (asection *reloc_sec);
 
+  /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
+     has a type >= SHT_LOOS.  Returns TRUE if the fields were initialised,
+     FALSE otherwise.  Can be called multiple times for a given section,
+     until it returns TRUE.  Most of the times it is called ISECTION will be
+     set to an input section that might be associated with the output section.
+     The last time that it is called, ISECTION will be set to NULL.  */
+  bfd_boolean (*elf_backend_copy_special_section_fields)
+    (const bfd *ibfd, bfd *obfd, const Elf_Internal_Shdr *isection,
+     Elf_Internal_Shdr *osection);
+		
   /* Used to handle bad SHF_LINK_ORDER input.  */
-  bfd_error_handler_type link_order_error_handler;
+  void (*link_order_error_handler) (const char *, ...);
 
   /* Name of the PLT relocation section.  */
   const char *relplt_name;
@@ -1343,9 +1398,12 @@ struct elf_backend_data
   /* This is non-zero if static TLS segments require a special alignment.  */
   unsigned static_tls_alignment;
 
-  /* Alignment for the PT_GNU_STACK segment. */
+  /* Alignment for the PT_GNU_STACK segment.  */
   unsigned stack_align;
 
+  /* Flag bits to assign to a section of type SHT_STRTAB.  */
+  unsigned long elf_strtab_flags;
+
   /* This is TRUE if the linker should act like collect and gather
      global constructors and destructors by name.  This is TRUE for
      MIPS ELF because the Irix 5 tools can not handle the .init
@@ -1383,6 +1441,10 @@ struct elf_backend_data
      backend relocate_section routine for relocatable linking.  */
   unsigned rela_normal : 1;
 
+  /* Set if DT_REL/DT_RELA/DT_RELSZ/DT_RELASZ should not include PLT
+     relocations.  */
+  unsigned dtrel_excludes_plt : 1;
+
   /* TRUE if addresses "naturally" sign extend.  This is used when
      swapping in from Elf32 when BFD64.  */
   unsigned sign_extend_vma : 1;
@@ -1396,12 +1458,17 @@ struct elf_backend_data
   unsigned can_refcount : 1;
   unsigned want_got_sym : 1;
   unsigned want_dynbss : 1;
+  unsigned want_dynrelro : 1;
 
   /* Targets which do not support physical addressing often require
      that the p_paddr field in the section header to be set to zero.
      This field indicates whether this behavior is required.  */
   unsigned want_p_paddr_set_to_zero : 1;
 
+  /* Target has broken hardware and/or kernel that requires pages not
+     to be mapped twice with different permissions.  */
+  unsigned no_page_alias : 1;
+
   /* True if an object file lacking a .note.GNU-stack section
      should be assumed to be requesting exec stack.  At least one
      other file in the link needs to have a .note.GNU-stack section
@@ -1632,6 +1699,25 @@ struct output_elf_obj_tdata
   bfd_boolean flags_init;
 };
 
+/* Indicate if the bfd contains symbols that have the STT_GNU_IFUNC
+   symbol type or STB_GNU_UNIQUE binding.  Used to set the osabi
+   field in the ELF header structure.  */
+enum elf_gnu_symbols
+{
+  elf_gnu_symbol_none = 0,
+  elf_gnu_symbol_any = 1 << 0,
+  elf_gnu_symbol_ifunc = (elf_gnu_symbol_any | 1 << 1),
+  elf_gnu_symbol_unique = (elf_gnu_symbol_any | 1 << 2),
+  elf_gnu_symbol_all = (elf_gnu_symbol_ifunc | elf_gnu_symbol_unique)
+};
+
+typedef struct elf_section_list
+{
+  Elf_Internal_Shdr          hdr;
+  unsigned int               ndx;
+  struct elf_section_list *  next;
+} elf_section_list;
+
 /* Some private data is stashed away for future use using the tdata pointer
    in the bfd structure.  */
 
@@ -1648,7 +1734,7 @@ struct elf_obj_tdata
   Elf_Internal_Shdr dynversym_hdr;
   Elf_Internal_Shdr dynverref_hdr;
   Elf_Internal_Shdr dynverdef_hdr;
-  Elf_Internal_Shdr symtab_shndx_hdr;
+  elf_section_list * symtab_shndx_list;
   bfd_vma gp;				/* The gp value */
   unsigned int gp_size;			/* The gp size */
   unsigned int num_elf_sections;	/* elf_sect_ptr size */
@@ -1723,7 +1809,7 @@ struct elf_obj_tdata
   Elf_Internal_Shdr **group_sect_ptr;
   int num_group;
 
-  unsigned int symtab_section, symtab_shndx_section, dynsymtab_section;
+  unsigned int symtab_section, dynsymtab_section;
   unsigned int dynversym_section, dynverdef_section, dynverref_section;
 
   /* An identifier used to distinguish different target
@@ -1742,10 +1828,7 @@ struct elf_obj_tdata
      symbols.  */
   bfd_boolean bad_symtab;
 
-  /* True if the bfd contains symbols that have the STT_GNU_IFUNC
-     symbol type or STB_GNU_UNIQUE binding.  Used to set the osabi
-     field in the ELF header structure.  */
-  bfd_boolean has_gnu_symbols;
+  enum elf_gnu_symbols has_gnu_symbols;
 
   /* Information grabbed from an elf core file.  */
   struct core_elf_obj_tdata *core;
@@ -1768,7 +1851,7 @@ struct elf_obj_tdata
 #define elf_stack_flags(bfd)	(elf_tdata(bfd) -> o->stack_flags)
 #define elf_shstrtab(bfd)	(elf_tdata(bfd) -> o->strtab_ptr)
 #define elf_onesymtab(bfd)	(elf_tdata(bfd) -> symtab_section)
-#define elf_symtab_shndx(bfd)	(elf_tdata(bfd) -> symtab_shndx_section)
+#define elf_symtab_shndx_list(bfd)	(elf_tdata(bfd) -> symtab_shndx_list)
 #define elf_strtab_sec(bfd)	(elf_tdata(bfd) -> o->strtab_section)
 #define elf_shstrtab_sec(bfd)	(elf_tdata(bfd) -> o->shstrtab_section)
 #define elf_symtab_hdr(bfd)	(elf_tdata(bfd) -> symtab_hdr)
@@ -1905,6 +1988,8 @@ extern bfd_boolean _bfd_elf_section_alre
   (bfd *, asection *, struct bfd_link_info *);
 extern void bfd_elf_set_group_contents
   (bfd *, asection *, void *);
+extern unsigned int _bfd_elf_filter_global_symbols
+  (bfd *, struct bfd_link_info *, asymbol **, long);
 extern asection *_bfd_elf_check_kept_section
   (asection *, struct bfd_link_info *);
 #define _bfd_elf_link_just_syms _bfd_generic_link_just_syms
@@ -1969,7 +2054,7 @@ extern bfd_boolean _bfd_elf_find_line
   (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
 extern bfd_boolean _bfd_elf_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *);
-extern bfd_boolean _bfd_elf_find_function
+extern asymbol *_bfd_elf_find_function
   (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **);
 #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
 #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
@@ -2003,22 +2088,24 @@ extern struct elf_strtab_hash * _bfd_elf
   (void);
 extern void _bfd_elf_strtab_free
   (struct elf_strtab_hash *);
-extern bfd_size_type _bfd_elf_strtab_add
+extern size_t _bfd_elf_strtab_add
   (struct elf_strtab_hash *, const char *, bfd_boolean);
 extern void _bfd_elf_strtab_addref
-  (struct elf_strtab_hash *, bfd_size_type);
+  (struct elf_strtab_hash *, size_t);
 extern void _bfd_elf_strtab_delref
-  (struct elf_strtab_hash *, bfd_size_type);
+  (struct elf_strtab_hash *, size_t);
 extern unsigned int _bfd_elf_strtab_refcount
-  (struct elf_strtab_hash *, bfd_size_type);
+  (struct elf_strtab_hash *, size_t);
 extern void _bfd_elf_strtab_clear_all_refs
-  (struct elf_strtab_hash *tab);
-extern void _bfd_elf_strtab_restore_size
-  (struct elf_strtab_hash *, bfd_size_type);
+  (struct elf_strtab_hash *);
+extern void *_bfd_elf_strtab_save
+  (struct elf_strtab_hash *);
+extern void _bfd_elf_strtab_restore
+  (struct elf_strtab_hash *, void *);
 extern bfd_size_type _bfd_elf_strtab_size
   (struct elf_strtab_hash *);
 extern bfd_size_type _bfd_elf_strtab_offset
-  (struct elf_strtab_hash *, bfd_size_type);
+  (struct elf_strtab_hash *, size_t);
 extern bfd_boolean _bfd_elf_strtab_emit
   (bfd *, struct elf_strtab_hash *);
 extern void _bfd_elf_strtab_finalize
@@ -2218,6 +2305,8 @@ extern bfd_boolean bfd_elf_link_add_symb
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_add_dynamic_entry
   (struct bfd_link_info *, bfd_vma, bfd_vma);
+extern bfd_boolean _bfd_elf_link_check_relocs
+  (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean bfd_elf_link_record_dynamic_symbol
   (struct bfd_link_info *, struct elf_link_hash_entry *);
@@ -2269,7 +2358,7 @@ extern asection *_bfd_elf_gc_mark_hook
 
 extern asection *_bfd_elf_gc_mark_rsec
   (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn,
-   struct elf_reloc_cookie *);
+   struct elf_reloc_cookie *, bfd_boolean *);
 
 extern bfd_boolean _bfd_elf_gc_mark_reloc
   (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn,
@@ -2291,6 +2380,9 @@ extern bfd_boolean bfd_elf_gc_common_fin
 extern bfd_boolean bfd_elf_gc_common_final_link
   (bfd *, struct bfd_link_info *);
 
+extern asection *_bfd_elf_is_start_stop
+  (const struct bfd_link_info *, struct elf_link_hash_entry *);
+
 extern bfd_boolean bfd_elf_reloc_symbol_deleted_p
   (bfd_vma, void *);
 
@@ -2315,7 +2407,18 @@ extern bfd_boolean bfd_elf_lookup_sectio
 extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section
   (bfd * abfd, asection * section);
 
-/* Exported interface for writing elf corefile notes. */
+/* PowerPC @tls opcode transform/validate.  */
+extern unsigned int _bfd_elf_ppc_at_tls_transform
+  (unsigned int, unsigned int);
+/* PowerPC @tprel opcode transform/validate.  */
+extern unsigned int _bfd_elf_ppc_at_tprel_transform
+  (unsigned int, unsigned int);
+/* PowerPC elf_object_p tweak.  */
+extern bfd_boolean _bfd_elf_ppc_set_arch (bfd *);
+/* PowerPC .gnu.attributes handling common to both 32-bit and 64-bit.  */
+extern void _bfd_elf_ppc_merge_fp_attributes (bfd *, struct bfd_link_info *);
+
+/* Exported interface for writing elf corefile notes.  */
 extern char *elfcore_write_note
   (bfd *, char *, int *, const char *, int, const void *, int);
 extern char *elfcore_write_prpsinfo
@@ -2429,7 +2532,8 @@ extern char *_bfd_elf_attr_strdup (bfd *
 extern void _bfd_elf_copy_obj_attributes (bfd *, bfd *);
 extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, unsigned int);
 extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *);
-extern bfd_boolean _bfd_elf_merge_object_attributes (bfd *, bfd *);
+extern bfd_boolean _bfd_elf_merge_object_attributes
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_merge_unknown_attribute_low (bfd *, bfd *, int);
 extern bfd_boolean _bfd_elf_merge_unknown_attribute_list (bfd *, bfd *);
 extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr (asection *sec);
@@ -2458,7 +2562,8 @@ extern bfd_boolean _bfd_elf_create_ifunc
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
   (struct bfd_link_info *, struct elf_link_hash_entry *,
-   struct elf_dyn_relocs **, unsigned int, unsigned int, unsigned int);
+   struct elf_dyn_relocs **, bfd_boolean *, unsigned int,
+   unsigned int, unsigned int, bfd_boolean);
 extern long _bfd_elf_ifunc_get_synthetic_symtab
   (bfd *, long, asymbol **, long, asymbol **, asymbol **, asection *,
    bfd_vma *(*) (bfd *, asymbol **, asection *, asection *));
@@ -2537,17 +2642,16 @@ extern asection _bfd_elf_large_com_secti
       else if (info->unresolved_syms_in_objects == RM_IGNORE		\
 	       && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)		\
 	ignored = TRUE;							\
-      else if (!info->relocatable)					\
+      else if (!bfd_link_relocatable (info))				\
 	{								\
 	  bfd_boolean err;						\
 	  err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR	\
 		 || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT);	\
-	  if (!info->callbacks->undefined_symbol (info,			\
-						  h->root.root.string,	\
-						  input_bfd,		\
-						  input_section,	\
-						  rel->r_offset, err))	\
-	    return FALSE;						\
+	  (*info->callbacks->undefined_symbol) (info,			\
+						h->root.root.string,	\
+						input_bfd,		\
+						input_section,		\
+						rel->r_offset, err);	\
 	  warned = TRUE;						\
 	}								\
       (void) unresolved_reloc;						\
@@ -2572,7 +2676,7 @@ extern asection _bfd_elf_large_com_secti
     _bfd_clear_contents (howto, input_bfd, input_section,		\
 			 contents + rel[index].r_offset);		\
 									\
-    if (info->relocatable						\
+    if (bfd_link_relocatable (info)					\
 	&& (input_section->flags & SEC_DEBUGGING))			\
       {									\
 	/* Only remove relocations in debug sections since other	\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf.c ./bfd/elf.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* ELF executable support for BFD.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -42,7 +42,7 @@ SECTION
 #include "elf-bfd.h"
 #include "libiberty.h"
 #include "safe-ctype.h"
-#include "elf-linux-psinfo.h"
+#include "elf-linux-core.h"
 
 #ifdef CORE_HEADER
 #include CORE_HEADER
@@ -338,6 +338,7 @@ bfd_elf_string_from_elf_section (bfd *ab
       if (hdr->sh_type != SHT_STRTAB && hdr->sh_type < SHT_LOOS)
 	{
 	  /* PR 17512: file: f057ec89.  */
+	  /* xgettext:c-format */
 	  _bfd_error_handler (_("%B: attempt to load strings from a non-string section (number %d)"),
 			      abfd, shindex);
 	  return NULL;
@@ -350,7 +351,8 @@ bfd_elf_string_from_elf_section (bfd *ab
   if (strindex >= hdr->sh_size)
     {
       unsigned int shstrndx = elf_elfheader(abfd)->e_shstrndx;
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: invalid string offset %u >= %lu for section `%s'"),
 	 abfd, strindex, (unsigned long) hdr->sh_size,
 	 (shindex == shstrndx && strindex == hdr->sh_name
@@ -400,8 +402,34 @@ bfd_elf_get_elf_syms (bfd *ibfd,
 
   /* Normal syms might have section extension entries.  */
   shndx_hdr = NULL;
-  if (symtab_hdr == &elf_tdata (ibfd)->symtab_hdr)
-    shndx_hdr = &elf_tdata (ibfd)->symtab_shndx_hdr;
+  if (elf_symtab_shndx_list (ibfd) != NULL)
+    {
+      elf_section_list * entry;
+      Elf_Internal_Shdr **sections = elf_elfsections (ibfd);
+
+      /* Find an index section that is linked to this symtab section.  */
+      for (entry = elf_symtab_shndx_list (ibfd); entry != NULL; entry = entry->next)
+	{
+	  /* PR 20063.  */
+	  if (entry->hdr.sh_link >= elf_numsections (ibfd))
+	    continue;
+
+	  if (sections[entry->hdr.sh_link] == symtab_hdr)
+	    {
+	      shndx_hdr = & entry->hdr;
+	      break;
+	    };
+	}
+
+      if (shndx_hdr == NULL)
+	{
+	  if (symtab_hdr == & elf_symtab_hdr (ibfd))
+	    /* Not really accurate, but this was how the old code used to work.  */
+	    shndx_hdr = & elf_symtab_shndx_list (ibfd)->hdr;
+	  /* Otherwise we do nothing.  The assumption is that
+	     the index table will not be needed.  */
+	}
+    }
 
   /* Read the symbols.  */
   alloc_ext = NULL;
@@ -409,7 +437,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
   alloc_intsym = NULL;
   bed = get_elf_backend_data (ibfd);
   extsym_size = bed->s->sizeof_sym;
-  amt = symcount * extsym_size;
+  amt = (bfd_size_type) symcount * extsym_size;
   pos = symtab_hdr->sh_offset + symoffset * extsym_size;
   if (extsym_buf == NULL)
     {
@@ -428,7 +456,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
     extshndx_buf = NULL;
   else
     {
-      amt = symcount * sizeof (Elf_External_Sym_Shndx);
+      amt = (bfd_size_type) symcount * sizeof (Elf_External_Sym_Shndx);
       pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx);
       if (extshndx_buf == NULL)
 	{
@@ -463,9 +491,10 @@ bfd_elf_get_elf_syms (bfd *ibfd,
     if (!(*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym))
       {
 	symoffset += (esym - (bfd_byte *) extsym_buf) / extsym_size;
-	(*_bfd_error_handler) (_("%B symbol number %lu references "
-				 "nonexistent SHT_SYMTAB_SHNDX section"),
-			       ibfd, (unsigned long) symoffset);
+	/* xgettext:c-format */
+	_bfd_error_handler (_("%B symbol number %lu references "
+			      "nonexistent SHT_SYMTAB_SHNDX section"),
+			    ibfd, (unsigned long) symoffset);
 	if (alloc_intsym != NULL)
 	  free (alloc_intsym);
 	intsym_buf = NULL;
@@ -619,6 +648,7 @@ setup_group (bfd *abfd, Elf_Internal_Shd
 		  if (shdr->contents == NULL)
 		    {
 		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
 		      bfd_set_error (bfd_error_bad_value);
 		      -- num_group;
@@ -632,6 +662,7 @@ setup_group (bfd *abfd, Elf_Internal_Shd
 			  != shdr->sh_size))
 		    {
 		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: invalid size field in group section header: 0x%lx"), abfd, shdr->sh_size);
 		      bfd_set_error (bfd_error_bad_value);
 		      -- num_group;
@@ -665,8 +696,8 @@ setup_group (bfd *abfd, Elf_Internal_Shd
 			}
 		      if (idx >= shnum)
 			{
-			  ((*_bfd_error_handler)
-			   (_("%B: invalid SHT_GROUP entry"), abfd));
+			  _bfd_error_handler
+			    (_("%B: invalid SHT_GROUP entry"), abfd);
 			  idx = 0;
 			}
 		      dest->shdr = elf_elfsections (abfd)[idx];
@@ -684,7 +715,8 @@ setup_group (bfd *abfd, Elf_Internal_Shd
 		{
 		  elf_tdata (abfd)->group_sect_ptr = NULL;
 		  elf_tdata (abfd)->num_group = num_group = -1;
-		  (*_bfd_error_handler) (_("%B: no valid group sections found"), abfd);
+		  _bfd_error_handler
+		    (_("%B: no valid group sections found"), abfd);
 		  bfd_set_error (bfd_error_bad_value);
 		}
 	    }
@@ -751,8 +783,9 @@ setup_group (bfd *abfd, Elf_Internal_Shd
 
   if (elf_group_name (newsect) == NULL)
     {
-      (*_bfd_error_handler) (_("%B: no group info for section %A"),
-			     abfd, newsect);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: no group info for section %A"),
+			  abfd, newsect);
       return FALSE;
     }
   return TRUE;
@@ -781,6 +814,7 @@ _bfd_elf_setup_sections (bfd *abfd)
 	      const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 	      if (bed->link_order_error_handler)
 		bed->link_order_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: warning: sh_link not set for section `%A'"),
 		   abfd, s);
 	    }
@@ -799,7 +833,8 @@ _bfd_elf_setup_sections (bfd *abfd)
 		 sh_link.  We don't want to proceed.  */
 	      if (linksec == NULL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: sh_link [%d] in section `%A' is incorrect"),
 		     s->owner, s, elfsec);
 		  result = FALSE;
@@ -808,6 +843,15 @@ _bfd_elf_setup_sections (bfd *abfd)
 	      elf_linked_to_section (s) = linksec;
 	    }
 	}
+      else if (this_hdr->sh_type == SHT_GROUP
+	       && elf_next_in_group (s) == NULL)
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: SHT_GROUP section [index %d] has no SHF_GROUP sections"),
+	     abfd, elf_section_data (s)->this_idx);
+	  result = FALSE;
+	}
     }
 
   /* Process section groups.  */
@@ -817,8 +861,22 @@ _bfd_elf_setup_sections (bfd *abfd)
   for (i = 0; i < num_group; i++)
     {
       Elf_Internal_Shdr *shdr = elf_tdata (abfd)->group_sect_ptr[i];
-      Elf_Internal_Group *idx = (Elf_Internal_Group *) shdr->contents;
-      unsigned int n_elt = shdr->sh_size / 4;
+      Elf_Internal_Group *idx;
+      unsigned int n_elt;
+
+      /* PR binutils/18758: Beware of corrupt binaries with invalid group data.  */
+      if (shdr == NULL || shdr->bfd_section == NULL || shdr->contents == NULL)
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: section group entry number %u is corrupt"),
+	     abfd, i);
+	  result = FALSE;
+	  continue;
+	}
+
+      idx = (Elf_Internal_Group *) shdr->contents;
+      n_elt = shdr->sh_size / 4;
 
       while (--n_elt != 0)
 	if ((++idx)->shdr->bfd_section)
@@ -834,7 +892,8 @@ _bfd_elf_setup_sections (bfd *abfd)
 	else
 	  {
 	    /* There are some unknown sections in the group.  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: unknown [%d] section `%s' in group [%s]"),
 	       abfd,
 	       (unsigned int) idx->shdr->sh_type,
@@ -937,9 +996,9 @@ _bfd_elf_make_section_from_shdr (bfd *ab
     {
       flags |= SEC_MERGE;
       newsect->entsize = hdr->sh_entsize;
-      if ((hdr->sh_flags & SHF_STRINGS) != 0)
-	flags |= SEC_STRINGS;
     }
+  if ((hdr->sh_flags & SHF_STRINGS) != 0)
+    flags |= SEC_STRINGS;
   if (hdr->sh_flags & SHF_GROUP)
     if (!setup_group (abfd, hdr, newsect))
       return FALSE;
@@ -1003,7 +1062,7 @@ _bfd_elf_make_section_from_shdr (bfd *ab
       if (!bfd_malloc_and_get_section (abfd, newsect, &contents))
 	return FALSE;
 
-      elf_parse_notes (abfd, (char *) contents, hdr->sh_size, -1);
+      elf_parse_notes (abfd, (char *) contents, hdr->sh_size, hdr->sh_offset);
       free (contents);
     }
 
@@ -1100,7 +1159,8 @@ _bfd_elf_make_section_from_shdr (bfd *ab
 	{
 	  if (!bfd_init_section_compress_status (abfd, newsect))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: unable to initialize compress status for section %s"),
 		 abfd, name);
 	      return FALSE;
@@ -1110,7 +1170,8 @@ _bfd_elf_make_section_from_shdr (bfd *ab
 	{
 	  if (!bfd_init_section_decompress_status (abfd, newsect))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: unable to initialize decompress status for section %s"),
 		 abfd, name);
 	      return FALSE;
@@ -1142,7 +1203,8 @@ _bfd_elf_make_section_from_shdr (bfd *ab
   return TRUE;
 }
 
-const char *const bfd_elf_section_type_names[] = {
+const char *const bfd_elf_section_type_names[] =
+{
   "SHT_NULL", "SHT_PROGBITS", "SHT_SYMTAB", "SHT_STRTAB",
   "SHT_RELA", "SHT_HASH", "SHT_DYNAMIC", "SHT_NOTE",
   "SHT_NOBITS", "SHT_REL", "SHT_SHLIB", "SHT_DYNSYM",
@@ -1179,14 +1241,178 @@ bfd_elf_generic_reloc (bfd *abfd ATTRIBU
   return bfd_reloc_continue;
 }
 
+/* Returns TRUE if section A matches section B.
+   Names, addresses and links may be different, but everything else
+   should be the same.  */
+
+static bfd_boolean
+section_match (const Elf_Internal_Shdr * a,
+	       const Elf_Internal_Shdr * b)
+{
+  return
+    a->sh_type         == b->sh_type
+    && (a->sh_flags & ~ SHF_INFO_LINK)
+    == (b->sh_flags & ~ SHF_INFO_LINK)
+    && a->sh_addralign == b->sh_addralign
+    && a->sh_size      == b->sh_size
+    && a->sh_entsize   == b->sh_entsize
+    /* FIXME: Check sh_addr ?  */
+    ;
+}
+
+/* Find a section in OBFD that has the same characteristics
+   as IHEADER.  Return the index of this section or SHN_UNDEF if
+   none can be found.  Check's section HINT first, as this is likely
+   to be the correct section.  */
+
+static unsigned int
+find_link (const bfd * obfd, const Elf_Internal_Shdr * iheader, const unsigned int hint)
+{
+  Elf_Internal_Shdr ** oheaders = elf_elfsections (obfd);
+  unsigned int i;
+
+  BFD_ASSERT (iheader != NULL);
+
+  /* See PR 20922 for a reproducer of the NULL test.  */
+  if (oheaders[hint] != NULL
+      && section_match (oheaders[hint], iheader))
+    return hint;
+
+  for (i = 1; i < elf_numsections (obfd); i++)
+    {
+      Elf_Internal_Shdr * oheader = oheaders[i];
+
+      if (oheader == NULL)
+	continue;
+      if (section_match (oheader, iheader))
+	/* FIXME: Do we care if there is a potential for
+	   multiple matches ?  */
+	return i;
+    }
+
+  return SHN_UNDEF;
+}
+
+/* PR 19938: Attempt to set the ELF section header fields of an OS or
+   Processor specific section, based upon a matching input section.
+   Returns TRUE upon success, FALSE otherwise.  */
+   
+static bfd_boolean
+copy_special_section_fields (const bfd *ibfd,
+			     bfd *obfd,
+			     const Elf_Internal_Shdr *iheader,
+			     Elf_Internal_Shdr *oheader,
+			     const unsigned int secnum)
+{
+  const struct elf_backend_data *bed = get_elf_backend_data (obfd);
+  const Elf_Internal_Shdr **iheaders = (const Elf_Internal_Shdr **) elf_elfsections (ibfd);
+  bfd_boolean changed = FALSE;
+  unsigned int sh_link;
+
+  if (oheader->sh_type == SHT_NOBITS)
+    {
+      /* This is a 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.
+
+	 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;
+      return TRUE;
+    }
+
+  /* Allow the target a chance to decide how these fields should be set.  */
+  if (bed->elf_backend_copy_special_section_fields != NULL
+      && bed->elf_backend_copy_special_section_fields
+      (ibfd, obfd, iheader, oheader))
+    return TRUE;
+
+  /* We have an iheader which might match oheader, and which has non-zero
+     sh_info and/or sh_link fields.  Attempt to follow those links and find
+     the section in the output bfd which corresponds to the linked section
+     in the input bfd.  */
+  if (iheader->sh_link != SHN_UNDEF)
+    {
+      /* See PR 20931 for a reproducer.  */
+      if (iheader->sh_link >= elf_numsections (ibfd))
+	{
+	  (* _bfd_error_handler)
+	    /* xgettext:c-format */
+	    (_("%B: Invalid sh_link field (%d) in section number %d"),
+	     ibfd, iheader->sh_link, secnum);
+	  return FALSE;
+	}
+
+      sh_link = find_link (obfd, iheaders[iheader->sh_link], iheader->sh_link);
+      if (sh_link != SHN_UNDEF)
+	{
+	  oheader->sh_link = sh_link;
+	  changed = TRUE;
+	}
+      else
+	/* FIXME: Should we install iheader->sh_link
+	   if we could not find a match ?  */
+	(* _bfd_error_handler)
+	  /* xgettext:c-format */
+	  (_("%B: Failed to find link section for section %d"), obfd, secnum);
+    }
+
+  if (iheader->sh_info)
+    {
+      /* The sh_info field can hold arbitrary information, but if the
+	 SHF_LINK_INFO flag is set then it should be interpreted as a
+	 section index.  */
+      if (iheader->sh_flags & SHF_INFO_LINK)
+	{
+	  sh_link = find_link (obfd, iheaders[iheader->sh_info],
+			       iheader->sh_info);
+	  if (sh_link != SHN_UNDEF)
+	    oheader->sh_flags |= SHF_INFO_LINK;
+	}
+      else
+	/* No idea what it means - just copy it.  */
+	sh_link = iheader->sh_info;
+
+      if (sh_link != SHN_UNDEF)
+	{
+	  oheader->sh_info = sh_link;
+	  changed = TRUE;
+	}
+      else
+	(* _bfd_error_handler)
+	  /* xgettext:c-format */
+	  (_("%B: Failed to find info section for section %d"), obfd, secnum);
+    }
+
+  return changed;
+}
+  
 /* Copy the program header and other data from one object module to
    another.  */
 
 bfd_boolean
 _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
+  const Elf_Internal_Shdr **iheaders = (const Elf_Internal_Shdr **) elf_elfsections (ibfd);
+  Elf_Internal_Shdr **oheaders = elf_elfsections (obfd);
+  const struct elf_backend_data *bed;
+  unsigned int i;
+
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
-      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
     return TRUE;
 
   if (!elf_flags_init (obfd))
@@ -1201,8 +1427,105 @@ _bfd_elf_copy_private_bfd_data (bfd *ibf
   elf_elfheader (obfd)->e_ident[EI_OSABI] =
     elf_elfheader (ibfd)->e_ident[EI_OSABI];
 
+  /* If set, copy the EI_ABIVERSION field.  */
+  if (elf_elfheader (ibfd)->e_ident[EI_ABIVERSION])
+    elf_elfheader (obfd)->e_ident[EI_ABIVERSION]
+      = elf_elfheader (ibfd)->e_ident[EI_ABIVERSION];
+  
   /* Copy object attributes.  */
   _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+  if (iheaders == NULL || oheaders == NULL)
+    return TRUE;
+
+  bed = get_elf_backend_data (obfd);
+
+  /* Possibly copy other fields in the section header.  */
+  for (i = 1; i < elf_numsections (obfd); i++)
+    {
+      unsigned int j;
+      Elf_Internal_Shdr * oheader = oheaders[i];
+
+      /* Ignore ordinary sections.  SHT_NOBITS sections are considered however
+	 because of a special case need for generating separate debug info
+	 files.  See below for more details.  */
+      if (oheader == NULL
+	  || (oheader->sh_type != SHT_NOBITS
+	      && oheader->sh_type < SHT_LOOS))
+	continue;
+
+      /* Ignore empty sections, and sections whose
+	 fields have already been initialised.  */
+      if (oheader->sh_size == 0
+	  || (oheader->sh_info != 0 && oheader->sh_link != 0))
+	continue;
+
+      /* Scan for the matching section in the input bfd.
+	 First we try for a direct mapping between the input and output sections.  */
+      for (j = 1; j < elf_numsections (ibfd); j++)
+	{
+	  const Elf_Internal_Shdr * iheader = iheaders[j];
+
+	  if (iheader == NULL)
+	    continue;
+
+	  if (oheader->bfd_section != NULL
+	      && iheader->bfd_section != NULL
+	      && iheader->bfd_section->output_section != NULL
+	      && iheader->bfd_section->output_section == oheader->bfd_section)
+	    {
+	      /* We have found a connection from the input section to the
+		 output section.  Attempt to copy the header fields.  If
+		 this fails then do not try any further sections - there
+		 should only be a one-to-one mapping between input and output. */
+	      if (! copy_special_section_fields (ibfd, obfd, iheader, oheader, i))
+		j = elf_numsections (ibfd);
+	      break;
+	    }
+	}
+
+      if (j < elf_numsections (ibfd))
+	continue;
+
+      /* That failed.  So try to deduce the corresponding input section.
+	 Unfortunately we cannot compare names as the output string table
+	 is empty, so instead we check size, address and type.  */
+      for (j = 1; j < elf_numsections (ibfd); j++)
+	{
+	  const Elf_Internal_Shdr * iheader = iheaders[j];
+
+	  if (iheader == NULL)
+	    continue;
+
+	  /* Try matching fields in the input section's header.
+	     Since --only-keep-debug turns all non-debug sections into
+	     SHT_NOBITS sections, the output SHT_NOBITS type matches any
+	     input type.  */
+	  if ((oheader->sh_type == SHT_NOBITS
+	       || iheader->sh_type == oheader->sh_type)
+	      && (iheader->sh_flags & ~ SHF_INFO_LINK)
+	      == (oheader->sh_flags & ~ SHF_INFO_LINK)
+	      && iheader->sh_addralign == oheader->sh_addralign
+	      && iheader->sh_entsize == oheader->sh_entsize
+	      && iheader->sh_size == oheader->sh_size
+	      && iheader->sh_addr == oheader->sh_addr
+	      && (iheader->sh_info != oheader->sh_info
+		  || iheader->sh_link != oheader->sh_link))
+	    {
+	      if (copy_special_section_fields (ibfd, obfd, iheader, oheader, i))
+		break;
+	    }
+	}
+
+      if (j == elf_numsections (ibfd) && oheader->sh_type >= SHT_LOOS)
+	{
+	  /* Final attempt.  Call the backend copy function
+	     with a NULL input section.  */
+	  if (bed->elf_backend_copy_special_section_fields != NULL)
+	    bed->elf_backend_copy_special_section_fields (ibfd, obfd, NULL, oheader);
+	}
+    }
+
   return TRUE;
 }
 
@@ -1653,7 +1976,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	}
       if (sections_being_created [shindex])
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: warning: loop in section dependencies detected"), abfd);
 	  return FALSE;
 	}
@@ -1756,10 +2079,19 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	  goto success;
 	}
 
-      BFD_ASSERT (elf_onesymtab (abfd) == 0);
+      /* PR 18854: A binary might contain more than one symbol table.
+	 Unusual, but possible.  Warn, but continue.  */
+      if (elf_onesymtab (abfd) != 0)
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: warning: multiple symbol tables detected - ignoring the table in section %u"),
+	     abfd, shindex);
+	  goto success;
+	}
       elf_onesymtab (abfd) = shindex;
-      elf_tdata (abfd)->symtab_hdr = *hdr;
-      elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->symtab_hdr;
+      elf_symtab_hdr (abfd) = *hdr;
+      elf_elfsections (abfd)[shindex] = hdr = & elf_symtab_hdr (abfd);
       abfd->flags |= HAS_SYMS;
 
       /* Sometimes a shared object will map in the symbol table.  If
@@ -1777,30 +2109,39 @@ bfd_section_from_shdr (bfd *abfd, unsign
       /* Go looking for SHT_SYMTAB_SHNDX too, since if there is one we
 	 can't read symbols without that section loaded as well.  It
 	 is most likely specified by the next section header.  */
-      if (elf_elfsections (abfd)[elf_symtab_shndx (abfd)]->sh_link != shindex)
-	{
-	  unsigned int i, num_sec;
+      {
+	elf_section_list * entry;
+	unsigned int i, num_sec;
 
-	  num_sec = elf_numsections (abfd);
-	  for (i = shindex + 1; i < num_sec; i++)
+	for (entry = elf_symtab_shndx_list (abfd); entry != NULL; entry = entry->next)
+	  if (entry->hdr.sh_link == shindex)
+	    goto success;
+
+	num_sec = elf_numsections (abfd);
+	for (i = shindex + 1; i < num_sec; i++)
+	  {
+	    Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
+
+	    if (hdr2->sh_type == SHT_SYMTAB_SHNDX
+		&& hdr2->sh_link == shindex)
+	      break;
+	  }
+
+	if (i == num_sec)
+	  for (i = 1; i < shindex; i++)
 	    {
 	      Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
+
 	      if (hdr2->sh_type == SHT_SYMTAB_SHNDX
 		  && hdr2->sh_link == shindex)
 		break;
 	    }
-	  if (i == num_sec)
-	    for (i = 1; i < shindex; i++)
-	      {
-		Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
-		if (hdr2->sh_type == SHT_SYMTAB_SHNDX
-		    && hdr2->sh_link == shindex)
-		  break;
-	      }
-	  if (i != shindex)
-	    ret = bfd_section_from_shdr (abfd, i);
-	}
-      goto success;
+
+	if (i != shindex)
+	  ret = bfd_section_from_shdr (abfd, i);
+	/* else FIXME: we have failed to find the symbol table - should we issue an error ? */
+	goto success;
+      }
 
     case SHT_DYNSYM:		/* A dynamic symbol table.  */
       if (elf_dynsymtab (abfd) == shindex)
@@ -1821,7 +2162,16 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	  goto success;
 	}
 
-      BFD_ASSERT (elf_dynsymtab (abfd) == 0);
+      /* PR 18854: A binary might contain more than one dynamic symbol table.
+	 Unusual, but possible.  Warn, but continue.  */
+      if (elf_dynsymtab (abfd) != 0)
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: warning: multiple dynamic symbol tables detected - ignoring the table in section %u"),
+	     abfd, shindex);
+	  goto success;
+	}
       elf_dynsymtab (abfd) = shindex;
       elf_tdata (abfd)->dynsymtab_hdr = *hdr;
       elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->dynsymtab_hdr;
@@ -1833,14 +2183,23 @@ bfd_section_from_shdr (bfd *abfd, unsign
       goto success;
 
     case SHT_SYMTAB_SHNDX:	/* Symbol section indices when >64k sections.  */
-      if (elf_symtab_shndx (abfd) == shindex)
-	goto success;
+      {
+	elf_section_list * entry;
 
-      BFD_ASSERT (elf_symtab_shndx (abfd) == 0);
-      elf_symtab_shndx (abfd) = shindex;
-      elf_tdata (abfd)->symtab_shndx_hdr = *hdr;
-      elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->symtab_shndx_hdr;
-      goto success;
+	for (entry = elf_symtab_shndx_list (abfd); entry != NULL; entry = entry->next)
+	  if (entry->ndx == shindex)
+	    goto success;
+	
+	entry = bfd_alloc (abfd, sizeof * entry);
+	if (entry == NULL)
+	  goto fail;
+	entry->ndx = shindex;
+	entry->hdr = * hdr;
+	entry->next = elf_symtab_shndx_list (abfd);
+	elf_symtab_shndx_list (abfd) = entry;
+	elf_elfsections (abfd)[shindex] = & entry->hdr;
+	goto success;
+      }
 
     case SHT_STRTAB:		/* A string table.  */
       if (hdr->bfd_section != NULL)
@@ -1910,7 +2269,6 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	Elf_Internal_Shdr *hdr2, **p_hdr;
 	unsigned int num_sec = elf_numsections (abfd);
 	struct bfd_elf_section_data *esdt;
-	bfd_size_type amt;
 
 	if (hdr->sh_entsize
 	    != (bfd_size_type) (hdr->sh_type == SHT_REL
@@ -1920,9 +2278,10 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	/* Check for a bogus link to avoid crashing.  */
 	if (hdr->sh_link >= num_sec)
 	  {
-	    ((*_bfd_error_handler)
-	     (_("%B: invalid link %lu for reloc section %s (index %u)"),
-	      abfd, hdr->sh_link, name, shindex));
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%B: invalid link %lu for reloc section %s (index %u)"),
+	       abfd, hdr->sh_link, name, shindex);
 	    ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
 						   shindex);
 	    goto success;
@@ -2003,8 +2362,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	/* PR 17512: file: 0b4f81b7.  */
 	if (*p_hdr != NULL)
 	  goto fail;
-	amt = sizeof (*hdr2);
-	hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+	hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, sizeof (*hdr2));
 	if (hdr2 == NULL)
 	  goto fail;
 	*hdr2 = *hdr;
@@ -2106,7 +2464,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	  if ((hdr->sh_flags & SHF_ALLOC) != 0)
 	    /* FIXME: How to properly handle allocated section reserved
 	       for applications?  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: don't know how to handle allocated, application "
 		 "specific section `%s' [0x%8x]"),
 	       abfd, name, hdr->sh_type);
@@ -2121,7 +2480,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
       else if (hdr->sh_type >= SHT_LOPROC
 	       && hdr->sh_type <= SHT_HIPROC)
 	/* FIXME: We should handle this section.  */
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B: don't know how to handle processor specific section "
 	     "`%s' [0x%8x]"),
 	   abfd, name, hdr->sh_type);
@@ -2132,7 +2492,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	    /* SHF_OS_NONCONFORMING indicates that special knowledge is
 	       required to correctly process the section and the file should
 	       be rejected with an error message.  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: don't know how to handle OS specific section "
 		 "`%s' [0x%8x]"),
 	       abfd, name, hdr->sh_type);
@@ -2145,7 +2506,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
 	}
       else
 	/* FIXME: We should handle this section.  */
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B: don't know how to handle section `%s' [0x%8x]"),
 	   abfd, name, hdr->sh_type);
 
@@ -2704,11 +3066,9 @@ _bfd_elf_init_reloc_shdr (bfd *abfd,
 {
   Elf_Internal_Shdr *rel_hdr;
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  bfd_size_type amt;
 
-  amt = sizeof (Elf_Internal_Shdr);
   BFD_ASSERT (reldata->hdr == NULL);
-  rel_hdr = bfd_zalloc (abfd, amt);
+  rel_hdr = bfd_zalloc (abfd, sizeof (*rel_hdr));
   reldata->hdr = rel_hdr;
 
   if (delay_st_name_p)
@@ -2780,7 +3140,7 @@ elf_fake_sections (bfd *abfd, asection *
 	     compressed.  */
 	  asect->flags |= SEC_ELF_COMPRESS;
 
-	  /* If this section will be compressed, delay adding setion
+	  /* If this section will be compressed, delay adding section
 	     name to section name section after it is compressed in
 	     _bfd_elf_assign_file_positions_for_non_load.  */
 	  delay_st_name_p = TRUE;
@@ -2850,7 +3210,8 @@ elf_fake_sections (bfd *abfd, asection *
   /* PR 17512: file: 0eb809fe, 8b0535ee.  */
   if (asect->alignment_power >= (sizeof (bfd_vma) * 8) - 1)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: error: Alignment power %d of section `%A' is too big"),
 	 abfd, asect, asect->alignment_power);
       arg->failed = TRUE;
@@ -2880,7 +3241,7 @@ elf_fake_sections (bfd *abfd, asection *
 	 allow the link to proceed.  This can happen when users link
 	 non-bss input sections to bss output sections, or emit data
 	 to a bss output section via a linker script.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("warning: section `%A' type changed to PROGBITS"), asect);
       this_hdr->sh_type = sh_type;
     }
@@ -2891,14 +3252,17 @@ elf_fake_sections (bfd *abfd, asection *
       break;
 
     case SHT_STRTAB:
-    case SHT_INIT_ARRAY:
-    case SHT_FINI_ARRAY:
-    case SHT_PREINIT_ARRAY:
     case SHT_NOTE:
     case SHT_NOBITS:
     case SHT_PROGBITS:
       break;
 
+    case SHT_INIT_ARRAY:
+    case SHT_FINI_ARRAY:
+    case SHT_PREINIT_ARRAY:
+      this_hdr->sh_entsize = bed->s->arch_size / 8;
+      break;
+
     case SHT_HASH:
       this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
       break;
@@ -2968,9 +3332,9 @@ elf_fake_sections (bfd *abfd, asection *
     {
       this_hdr->sh_flags |= SHF_MERGE;
       this_hdr->sh_entsize = asect->entsize;
-      if ((asect->flags & SEC_STRINGS) != 0)
-	this_hdr->sh_flags |= SHF_STRINGS;
     }
+  if ((asect->flags & SEC_STRINGS) != 0)
+    this_hdr->sh_flags |= SHF_STRINGS;
   if ((asect->flags & SEC_GROUP) == 0 && elf_group_name (asect) != NULL)
     this_hdr->sh_flags |= SHF_GROUP;
   if ((asect->flags & SEC_THREAD_LOCAL) != 0)
@@ -3004,7 +3368,8 @@ elf_fake_sections (bfd *abfd, asection *
       if (arg->link_info
 	  /* Do the normal setup if we wouldn't create any sections here.  */
 	  && esd->rel.count + esd->rela.count > 0
-	  && (arg->link_info->relocatable || arg->link_info->emitrelocations))
+	  && (bfd_link_relocatable (arg->link_info)
+	      || arg->link_info->emitrelocations))
 	{
 	  if (esd->rel.count && esd->rel.hdr == NULL
 	      && !_bfd_elf_init_reloc_shdr (abfd, &esd->rel, name, FALSE,
@@ -3086,12 +3451,19 @@ bfd_elf_set_group_contents (bfd *abfd, a
       /* The ELF backend linker sets sh_info to -2 when the group
 	 signature symbol is global, and thus the index can't be
 	 set until all local symbols are output.  */
-      asection *igroup = elf_sec_group (elf_next_in_group (sec));
-      struct bfd_elf_section_data *sec_data = elf_section_data (igroup);
-      unsigned long symndx = sec_data->this_hdr.sh_info;
-      unsigned long extsymoff = 0;
+      asection *igroup;
+      struct bfd_elf_section_data *sec_data;
+      unsigned long symndx;
+      unsigned long extsymoff;
       struct elf_link_hash_entry *h;
 
+      /* The point of this little dance to the first SHF_GROUP section
+	 then back to the SHT_GROUP section is that this gets us to
+	 the SHT_GROUP in the input object.  */
+      igroup = elf_sec_group (elf_next_in_group (sec));
+      sec_data = elf_section_data (igroup);
+      symndx = sec_data->this_hdr.sh_info;
+      extsymoff = 0;
       if (!elf_bad_symtab (igroup->owner))
 	{
 	  Elf_Internal_Shdr *symtab_hdr;
@@ -3221,8 +3593,10 @@ assign_section_numbers (bfd *abfd, struc
   _bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd));
 
   /* SHT_GROUP sections are in relocatable files only.  */
-  if (link_info == NULL || link_info->relocatable)
+  if (link_info == NULL || bfd_link_relocatable (link_info))
     {
+      size_t reloc_count = 0;
+
       /* Put SHT_GROUP sections first.  */
       for (sec = abfd->sections; sec != NULL; sec = sec->next)
 	{
@@ -3239,7 +3613,14 @@ assign_section_numbers (bfd *abfd, struc
 	      else
 		d->this_idx = section_number++;
 	    }
+
+	  /* Count relocations.  */
+	  reloc_count += sec->reloc_count;
 	}
+
+      /* Clear HAS_RELOC if there are no relocations.  */
+      if (reloc_count == 0)
+	abfd->flags &= ~HAS_RELOC;
     }
 
   for (sec = abfd->sections; sec; sec = sec->next)
@@ -3269,10 +3650,6 @@ assign_section_numbers (bfd *abfd, struc
 	d->rela.idx = 0;
     }
 
-  elf_shstrtab_sec (abfd) = section_number++;
-  _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name);
-  elf_elfheader (abfd)->e_shstrndx = elf_shstrtab_sec (abfd);
-
   need_symtab = (bfd_get_symcount (abfd) > 0
 		|| (link_info == NULL
 		    && ((abfd->flags & (EXEC_P | DYNAMIC | HAS_RELOC))
@@ -3283,19 +3660,30 @@ assign_section_numbers (bfd *abfd, struc
       _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->symtab_hdr.sh_name);
       if (section_number > ((SHN_LORESERVE - 2) & 0xFFFF))
 	{
-	  elf_symtab_shndx (abfd) = section_number++;
-	  t->symtab_shndx_hdr.sh_name
+	  elf_section_list * entry;
+
+	  BFD_ASSERT (elf_symtab_shndx_list (abfd) == NULL);
+
+	  entry = bfd_zalloc (abfd, sizeof * entry);
+	  entry->ndx = section_number++;
+	  elf_symtab_shndx_list (abfd) = entry;
+	  entry->hdr.sh_name
 	    = (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd),
 						  ".symtab_shndx", FALSE);
-	  if (t->symtab_shndx_hdr.sh_name == (unsigned int) -1)
+	  if (entry->hdr.sh_name == (unsigned int) -1)
 	    return FALSE;
 	}
       elf_strtab_sec (abfd) = section_number++;
       _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->strtab_hdr.sh_name);
     }
 
+  elf_shstrtab_sec (abfd) = section_number++;
+  _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name);
+  elf_elfheader (abfd)->e_shstrndx = elf_shstrtab_sec (abfd);
+
   if (section_number >= SHN_LORESERVE)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: too many sections: %u"),
 			  abfd, section_number);
       return FALSE;
@@ -3327,8 +3715,10 @@ assign_section_numbers (bfd *abfd, struc
       i_shdrp[elf_onesymtab (abfd)] = &t->symtab_hdr;
       if (elf_numsections (abfd) > (SHN_LORESERVE & 0xFFFF))
 	{
-	  i_shdrp[elf_symtab_shndx (abfd)] = &t->symtab_shndx_hdr;
-	  t->symtab_shndx_hdr.sh_link = elf_onesymtab (abfd);
+	  elf_section_list * entry = elf_symtab_shndx_list (abfd);
+	  BFD_ASSERT (entry != NULL);
+	  i_shdrp[entry->ndx] = & entry->hdr;
+	  entry->hdr.sh_link = elf_onesymtab (abfd);
 	}
       i_shdrp[elf_strtab_sec (abfd)] = &t->strtab_hdr;
       t->symtab_hdr.sh_link = elf_strtab_sec (abfd);
@@ -3377,7 +3767,8 @@ assign_section_numbers (bfd *abfd, struc
 		  if (discarded_section (s))
 		    {
 		      asection *kept;
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: sh_link of section `%A' points to discarded section `%A' of `%B'"),
 			 abfd, d->this_hdr.bfd_section,
 			 s, s->owner);
@@ -3400,7 +3791,8 @@ assign_section_numbers (bfd *abfd, struc
 		  /* Handle objcopy. */
 		  if (s->output_section == NULL)
 		    {
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: sh_link of section `%A' points to removed section `%A' of `%B'"),
 			 abfd, d->this_hdr.bfd_section, s, s->owner);
 		      bfd_set_error (bfd_error_bad_value);
@@ -3421,6 +3813,7 @@ assign_section_numbers (bfd *abfd, struc
 		= get_elf_backend_data (abfd);
 	      if (bed->link_order_error_handler)
 		bed->link_order_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: warning: sh_link not set for section `%A'"),
 		   abfd, sec);
 	    }
@@ -3536,6 +3929,44 @@ sym_is_global (bfd *abfd, asymbol *sym)
 	  || bfd_is_com_section (bfd_get_section (sym)));
 }
 
+/* Filter global symbols of ABFD to include in the import library.  All
+   SYMCOUNT symbols of ABFD can be examined from their pointers in
+   SYMS.  Pointers of symbols to keep should be stored contiguously at
+   the beginning of that array.
+
+   Returns the number of symbols to keep.  */
+
+unsigned int
+_bfd_elf_filter_global_symbols (bfd *abfd, struct bfd_link_info *info,
+				asymbol **syms, long symcount)
+{
+  long src_count, dst_count = 0;
+
+  for (src_count = 0; src_count < symcount; src_count++)
+    {
+      asymbol *sym = syms[src_count];
+      char *name = (char *) bfd_asymbol_name (sym);
+      struct bfd_link_hash_entry *h;
+
+      if (!sym_is_global (abfd, sym))
+	continue;
+
+      h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, FALSE);
+      if (h == NULL)
+	continue;
+      if (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak)
+	continue;
+      if (h->linker_def || h->ldscript_def)
+	continue;
+
+      syms[dst_count++] = sym;
+    }
+
+  syms[dst_count] = NULL;
+
+  return dst_count;
+}
+
 /* Don't output section symbols for sections that are not going to be
    output, that are duplicates or there is no BFD section.  */
 
@@ -3570,7 +4001,7 @@ elf_map_symbols (bfd *abfd, unsigned int
   unsigned int num_globals = 0;
   unsigned int num_locals2 = 0;
   unsigned int num_globals2 = 0;
-  int max_index = 0;
+  unsigned int max_index = 0;
   unsigned int idx;
   asection *asect;
   asymbol **new_syms;
@@ -3770,7 +4201,7 @@ _bfd_elf_compute_section_file_positions 
   shstrtab_hdr = &elf_tdata (abfd)->shstrtab_hdr;
   /* sh_name was set in prep_headers.  */
   shstrtab_hdr->sh_type = SHT_STRTAB;
-  shstrtab_hdr->sh_flags = 0;
+  shstrtab_hdr->sh_flags = bed->elf_strtab_flags;
   shstrtab_hdr->sh_addr = 0;
   /* sh_size is set in _bfd_elf_assign_file_positions_for_non_load.  */
   shstrtab_hdr->sh_entsize = 0;
@@ -3789,12 +4220,16 @@ _bfd_elf_compute_section_file_positions 
 
       off = elf_next_file_pos (abfd);
 
-      hdr = &elf_tdata (abfd)->symtab_hdr;
+      hdr = & elf_symtab_hdr (abfd);
       off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
 
-      hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-      if (hdr->sh_size != 0)
-	off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
+      if (elf_symtab_shndx_list (abfd) != NULL)
+	{
+	  hdr = & elf_symtab_shndx_list (abfd)->hdr;
+	  if (hdr->sh_size != 0)
+	    off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
+	  /* FIXME: What about other symtab_shndx sections in the list ?  */
+	}
 
       hdr = &elf_tdata (abfd)->strtab_hdr;
       off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
@@ -4019,7 +4454,10 @@ elf_modify_segment_map (bfd *abfd,
 	}
       (*m)->count = new_count;
 
-      if (remove_empty_load && (*m)->p_type == PT_LOAD && (*m)->count == 0)
+      if (remove_empty_load
+	  && (*m)->p_type == PT_LOAD
+	  && (*m)->count == 0
+	  && !(*m)->includes_phdrs)
 	*m = (*m)->next;
       else
 	m = &(*m)->next;
@@ -4069,6 +4507,7 @@ _bfd_elf_map_sections_to_segments (bfd *
       asection *dynsec, *eh_frame_hdr;
       bfd_size_type amt;
       bfd_vma addr_mask, wrap_to = 0;
+      bfd_boolean linker_created_pt_phdr_segment = FALSE;
 
       /* Select the allocated sections, and sort them.  */
 
@@ -4121,7 +4560,7 @@ _bfd_elf_map_sections_to_segments (bfd *
 	  m->p_flags = PF_R | PF_X;
 	  m->p_flags_valid = 1;
 	  m->includes_phdrs = 1;
-
+	  linker_created_pt_phdr_segment = TRUE;
 	  *pm = m;
 	  pm = &m->next;
 
@@ -4172,7 +4611,19 @@ _bfd_elf_map_sections_to_segments (bfd *
 	      || ((sections[0]->lma & addr_mask) % maxpagesize
 		  < phdr_size % maxpagesize)
 	      || (sections[0]->lma & addr_mask & -maxpagesize) < wrap_to)
-	    phdr_in_segment = FALSE;
+	    {
+	      /* PR 20815: The ELF standard says that a PT_PHDR segment, if
+		 present, must be included as part of the memory image of the
+		 program.  Ie it must be part of a PT_LOAD segment as well.
+		 If we have had to create our own PT_PHDR segment, but it is
+		 not going to be covered by the first PT_LOAD segment, then
+		 force the inclusion if we can...  */
+	      if ((abfd->flags & D_PAGED) != 0
+		  && linker_created_pt_phdr_segment)
+		phdr_in_segment = TRUE;
+	      else
+		phdr_in_segment = FALSE;
+	    }
 	}
 
       for (i = 0, hdrpp = sections; i < count; i++, hdrpp++)
@@ -4220,11 +4671,18 @@ _bfd_elf_map_sections_to_segments (bfd *
 	      new_segment = TRUE;
 	    }
 	  else if ((last_hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) == 0
-		   && (hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != 0)
-	    {
-	      /* We don't want to put a loadable section after a
-		 nonloadable section in the same segment.
-		 Consider .tbss sections as loadable for this purpose.  */
+		   && (hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != 0
+		   && ((abfd->flags & D_PAGED) == 0
+		       || (((last_hdr->lma + last_size - 1) & -maxpagesize)
+			   != (hdr->lma & -maxpagesize))))
+	    {
+	      /* We don't want to put a loaded section after a
+		 nonloaded (ie. bss style) section in the same segment
+		 as that will force the non-loaded section to be loaded.
+		 Consider .tbss sections as loaded for this purpose.
+		 However, like the writable/non-writable case below,
+		 if they are on the same page then they must be put
+		 in the same segment.  */
 	      new_segment = TRUE;
 	    }
 	  else if ((abfd->flags & D_PAGED) == 0)
@@ -4495,9 +4953,6 @@ _bfd_elf_map_sections_to_segments (bfd *
 		goto error_return;
 	      m->next = NULL;
 	      m->p_type = PT_GNU_RELRO;
-	      m->p_flags = PF_R;
-	      m->p_flags_valid = 1;
-
 	      *pm = m;
 	      pm = &m->next;
 	    }
@@ -4670,6 +5125,7 @@ assign_file_positions_for_load_sections 
   Elf_Internal_Phdr *p;
   file_ptr off;
   bfd_size_type maxpagesize;
+  unsigned int pt_load_count = 0;
   unsigned int alloc;
   unsigned int i, j;
   bfd_vma header_pad = 0;
@@ -4797,6 +5253,7 @@ assign_file_positions_for_load_sections 
 	    maxpagesize = m->p_align;
 
 	  p->p_align = maxpagesize;
+	  pt_load_count += 1;
 	}
       else if (m->p_align_valid)
 	p->p_align = m->p_align;
@@ -4848,6 +5305,15 @@ assign_file_positions_for_load_sections 
 	      }
 
 	  off_adjust = vma_page_aligned_bias (p->p_vaddr, off, align);
+
+	  /* Broken hardware and/or kernel require that files do not
+	     map the same page with different permissions on some hppa
+	     processors.  */
+	  if (pt_load_count > 1
+	      && bed->no_page_alias
+	      && (off & (maxpagesize - 1)) != 0
+	      && (off & -maxpagesize) == ((off + off_adjust) & -maxpagesize))
+	    off_adjust += maxpagesize;
 	  off += off_adjust;
 	  if (no_contents)
 	    {
@@ -4892,9 +5358,11 @@ assign_file_positions_for_load_sections 
 	  p->p_memsz = bed->s->sizeof_ehdr;
 	  if (m->count > 0)
 	    {
-	      if (p->p_vaddr < (bfd_vma) off)
+	      if (p->p_vaddr < (bfd_vma) off
+		  || (!m->p_paddr_valid
+		      && p->p_paddr < (bfd_vma) off))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("%B: Not enough room for program headers, try linking with -N"),
 		     abfd);
 		  bfd_set_error (bfd_error_bad_value);
@@ -4980,7 +5448,8 @@ assign_file_positions_for_load_sections 
 		  && (s_start < p_end
 		      || p_end < p_start))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: section %A lma %#lx adjusted to %#lx"), abfd, sec,
 		     (unsigned long) s_start, (unsigned long) p_end);
 		  adjust = 0;
@@ -5116,7 +5585,8 @@ assign_file_positions_for_load_sections 
 	      if (!ELF_SECTION_IN_SEGMENT_1 (this_hdr, p, check_vma, 0)
 		  && !ELF_TBSS_SPECIAL (this_hdr, p))
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: section `%A' can't be allocated in segment %d"),
 		     abfd, sec, j);
 		  print_segment_map (m);
@@ -5163,7 +5633,8 @@ assign_file_positions_for_non_load_secti
       else if ((hdr->sh_flags & SHF_ALLOC) != 0)
 	{
 	  if (hdr->sh_size != 0)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: warning: allocated section `%s' not in segment"),
 	       abfd,
 	       (hdr->bfd_section == NULL
@@ -5185,7 +5656,8 @@ assign_file_positions_for_non_load_secti
 		   && (hdr->bfd_section->flags & SEC_ELF_COMPRESS))
 		   /* Compress DWARF debug sections.  */
 	       || hdr == i_shdrpp[elf_onesymtab (abfd)]
-	       || hdr == i_shdrpp[elf_symtab_shndx (abfd)]
+	       || (elf_symtab_shndx_list (abfd) != NULL
+		   && hdr == i_shdrpp[elf_symtab_shndx_list (abfd)->ndx])
 	       || hdr == i_shdrpp[elf_strtab_sec (abfd)]
 	       || hdr == i_shdrpp[elf_shstrtab_sec (abfd)])
 	hdr->sh_offset = -1;
@@ -5328,7 +5800,7 @@ assign_file_positions_for_non_load_secti
 	      if (!m->p_align_valid)
 		p->p_align = 1;
 	      if (!m->p_flags_valid)
-		p->p_flags = (lp->p_flags & ~PF_W);
+		p->p_flags = PF_R;
 	    }
 	  else
 	    {
@@ -5344,16 +5816,25 @@ assign_file_positions_for_non_load_secti
       else if (m->count != 0)
 	{
 	  unsigned int i;
+
 	  if (p->p_type != PT_LOAD
 	      && (p->p_type != PT_NOTE
 		  || bfd_get_format (abfd) != bfd_core))
 	    {
+	      /* A user specified segment layout may include a PHDR
+		 segment that overlaps with a LOAD segment...  */
+	      if (p->p_type == PT_PHDR)
+		{
+		  m->count = 0;
+		  continue;
+		}
+
 	      if (m->includes_filehdr || m->includes_phdrs)
 		{
 		  /* PR 17512: file: 2195325e.  */
-		  (*_bfd_error_handler)
-		    (_("%B: warning: non-load segment includes file header and/or program header"),
-		     abfd);
+		  _bfd_error_handler
+		    (_("%B: error: non-load segment %d includes file header and/or program header"),
+		     abfd, (int)(p - phdrs));
 		  return FALSE;
 		}
 
@@ -5391,6 +5872,15 @@ assign_file_positions_for_non_load_secti
   return TRUE;
 }
 
+static elf_section_list *
+find_section_in_list (unsigned int i, elf_section_list * list)
+{
+  for (;list != NULL; list = list->next)
+    if (list->ndx == i)
+      break;
+  return list;
+}
+
 /* Work out the file positions of all the sections.  This is called by
    _bfd_elf_compute_section_file_positions.  All the section sizes and
    VMAs must be known before this is called.
@@ -5439,7 +5929,8 @@ assign_file_positions_except_relocs (bfd
 		  && (hdr->bfd_section->flags & SEC_ELF_COMPRESS))
 		  /* Compress DWARF debug sections.  */
 	      || i == elf_onesymtab (abfd)
-	      || i == elf_symtab_shndx (abfd)
+	      || (elf_symtab_shndx_list (abfd) != NULL
+		  && hdr == i_shdrpp[elf_symtab_shndx_list (abfd)->ndx])
 	      || i == elf_strtab_sec (abfd)
 	      || i == elf_shstrtab_sec (abfd))
 	    {
@@ -5471,9 +5962,7 @@ assign_file_positions_except_relocs (bfd
 	}
 
       /* Set e_type in ELF header to ET_EXEC for -pie -Ttext-segment=.  */
-      if (link_info != NULL
-	  && link_info->executable
-	  && link_info->shared)
+      if (link_info != NULL && bfd_link_pie (link_info))
 	{
 	  unsigned int num_segments = elf_elfheader (abfd)->e_phnum;
 	  Elf_Internal_Phdr *segment = elf_tdata (abfd)->phdr;
@@ -5493,6 +5982,39 @@ assign_file_positions_except_relocs (bfd
 
       /* Write out the program headers.  */
       alloc = elf_program_header_size (abfd) / bed->s->sizeof_phdr;
+
+      /* Sort the program headers into the ordering required by the ELF standard.  */
+      if (alloc == 0)
+	return TRUE;
+
+      /* PR ld/20815 - Check that the program header segment, if present, will
+	 be loaded into memory.  FIXME: The check below is not sufficient as
+	 really all PT_LOAD segments should be checked before issuing an error
+	 message.  Plus the PHDR segment does not have to be the first segment
+	 in the program header table.  But this version of the check should
+	 catch all real world use cases.
+
+	 FIXME: We used to have code here to sort the PT_LOAD segments into
+	 ascending order, as per the ELF spec.  But this breaks some programs,
+	 including the Linux kernel.  But really either the spec should be
+         changed or the programs updated.  */
+      if (alloc > 1
+	  && tdata->phdr[0].p_type == PT_PHDR
+	  && ! bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr, alloc)
+	  && tdata->phdr[1].p_type == PT_LOAD
+	  && (tdata->phdr[1].p_vaddr > tdata->phdr[0].p_vaddr
+	      || (tdata->phdr[1].p_vaddr + tdata->phdr[1].p_memsz)
+	      <  (tdata->phdr[0].p_vaddr + tdata->phdr[0].p_memsz)))
+	{
+	  /* The fix for this error is usually to edit the linker script being
+	     used and set up the program headers manually.  Either that or
+	     leave room for the headers at the start of the SECTIONS.  */
+	  _bfd_error_handler (_("\
+%B: error: PHDR segment not covered by LOAD segment"),
+			      abfd);
+	  return FALSE;
+	}
+
       if (bfd_seek (abfd, (bfd_signed_vma) bed->s->sizeof_ehdr, SEEK_SET) != 0
 	  || bed->s->write_out_phdrs (abfd, tdata->phdr, alloc) != 0)
 	return FALSE;
@@ -5637,7 +6159,7 @@ _bfd_elf_assign_file_positions_for_non_l
 			return FALSE;
 		      name = new_name;
 		    }
-		  /* Add setion name to section name section.  */
+		  /* Add section name to section name section.  */
 		  if (shdrp->sh_name != (unsigned int) -1)
 		    abort ();
 		  shdrp->sh_name
@@ -5645,7 +6167,7 @@ _bfd_elf_assign_file_positions_for_non_l
 							  name, FALSE);
 		  d = elf_section_data (sec);
 
-		  /* Add reloc setion name to section name section.  */
+		  /* Add reloc section name to section name section.  */
 		  if (d->rel.hdr
 		      && !_bfd_elf_set_reloc_sh_name (abfd,
 						      d->rel.hdr,
@@ -5654,7 +6176,7 @@ _bfd_elf_assign_file_positions_for_non_l
 		  if (d->rela.hdr
 		      && !_bfd_elf_set_reloc_sh_name (abfd,
 						      d->rela.hdr,
-						      name, FALSE))
+						      name, TRUE))
 		    return FALSE;
 
 		  /* Update section size and contents.  */
@@ -5829,7 +6351,8 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *ab
     {
       /* This case can occur when using --strip-symbol on a symbol
 	 which is used in a relocation entry.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: symbol `%s' required but not present"),
 	 abfd, bfd_asymbol_name (asym_ptr));
       bfd_set_error (bfd_error_no_symbols);
@@ -6166,11 +6689,16 @@ rewrite_elf_program_header (bfd *ibfd, b
 	  /* Special segments, such as the PT_PHDR segment, may contain
 	     no sections, but ordinary, loadable segments should contain
 	     something.  They are allowed by the ELF spec however, so only
-	     a warning is produced.  */
-	  if (segment->p_type == PT_LOAD)
-	    (*_bfd_error_handler) (_("\
-%B: warning: Empty loadable segment detected, is this intentional ?"),
-				   ibfd);
+	     a warning is produced.  
+	     There is however the valid use case of embedded systems which
+	     have segments with p_filesz of 0 and a p_memsz > 0 to initialize
+	     flash memory with zeros.  No warning is shown for that case.  */
+	  if (segment->p_type == PT_LOAD
+	      && (segment->p_filesz > 0 || segment->p_memsz == 0))
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("\
+%B: warning: Empty loadable segment detected at vaddr=0x%.8x, is this intentional ?"),
+				ibfd, segment->p_vaddr);
 
 	  map->count = 0;
 	  *pointer_to_map = map;
@@ -6223,13 +6751,9 @@ rewrite_elf_program_header (bfd *ibfd, b
       first_matching_lma = TRUE;
       first_suggested_lma = TRUE;
 
-      for (section = ibfd->sections;
+      for (section = first_section, j = 0;
 	   section != NULL;
 	   section = section->next)
-	if (section == first_section)
-	  break;
-
-      for (j = 0; section != NULL; section = section->next)
 	{
 	  if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
 	    {
@@ -6785,9 +7309,10 @@ rewrite:
 	  {
 	    /* PR 17512: file: f17299af.  */
 	    if (segment->p_align > (bfd_vma) 1 << ((sizeof (bfd_vma) * 8) - 2))
-	      (*_bfd_error_handler) (_("\
+	      /* xgettext:c-format */
+	      _bfd_error_handler (_("\
 %B: warning: segment alignment of 0x%llx is too large"),
-				     ibfd, (long long) segment->p_align);
+				  ibfd, (long long) segment->p_align);
 	    else
 	      maxpagesize = segment->p_align;
 	  }
@@ -6810,7 +7335,8 @@ _bfd_elf_init_private_section_data (bfd 
 
 {
   Elf_Internal_Shdr *ihdr, *ohdr;
-  bfd_boolean final_link = link_info != NULL && !link_info->relocatable;
+  bfd_boolean final_link = (link_info != NULL
+			    && !bfd_link_relocatable (link_info));
 
   if (ibfd->xvec->flavour != bfd_target_elf_flavour
       || obfd->xvec->flavour != bfd_target_elf_flavour)
@@ -7030,7 +7556,7 @@ _bfd_elf_copy_private_symbol_data (bfd *
 	shndx = MAP_STRTAB;
       else if (shndx == elf_shstrtab_sec (ibfd))
 	shndx = MAP_SHSTRTAB;
-      else if (shndx == elf_symtab_shndx (ibfd))
+      else if (find_section_in_list (shndx, elf_symtab_shndx_list (ibfd)))
 	shndx = MAP_SYM_SHNDX;
       osym->internal_elf_sym.st_shndx = shndx;
     }
@@ -7105,20 +7631,25 @@ error_return:
 
   outbound_shndx = NULL;
   outbound_shndx_index = 0;
-  symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  if (symtab_shndx_hdr->sh_name != 0)
+
+  if (elf_symtab_shndx_list (abfd))
     {
-      amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx);
-      outbound_shndx =  (bfd_byte *)
-          bfd_zalloc2 (abfd, 1 + symcount, sizeof (Elf_External_Sym_Shndx));
-      if (outbound_shndx == NULL)
-	goto error_return;
+      symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+      if (symtab_shndx_hdr->sh_name != 0)
+	{
+	  amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx);
+	  outbound_shndx =  (bfd_byte *)
+	    bfd_zalloc2 (abfd, 1 + symcount, sizeof (Elf_External_Sym_Shndx));
+	  if (outbound_shndx == NULL)
+	    goto error_return;
 
-      symtab_shndx_hdr->contents = outbound_shndx;
-      symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
-      symtab_shndx_hdr->sh_size = amt;
-      symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx);
-      symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
+	  symtab_shndx_hdr->contents = outbound_shndx;
+	  symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
+	  symtab_shndx_hdr->sh_size = amt;
+	  symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx);
+	  symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
+	}
+      /* FIXME: What about any other headers in the list ?  */
     }
 
   /* Now generate the data (for "contents").  */
@@ -7227,7 +7758,8 @@ error_return:
 		  shndx = elf_shstrtab_sec (abfd);
 		  break;
 		case MAP_SYM_SHNDX:
-		  shndx = elf_symtab_shndx (abfd);
+		  if (elf_symtab_shndx_list (abfd))
+		    shndx = elf_symtab_shndx_list (abfd)->ndx;
 		  break;
 		default:
 		  shndx = SHN_ABS;
@@ -7250,8 +7782,11 @@ error_return:
 		     section of a symbol to be a section that is
 		     actually in the output file.  */
 		  sec2 = bfd_get_section_by_name (abfd, sec->name);
-		  if (sec2 == NULL)
+		  if (sec2 != NULL)
+		    shndx = _bfd_elf_section_from_bfd_section (abfd, sec2);
+		  if (shndx == SHN_BAD)
 		    {
+		      /* xgettext:c-format */
 		      _bfd_error_handler (_("\
 Unable to find equivalent output section for symbol '%s' from section '%s'"),
 					  syms[idx]->name ? syms[idx]->name : "<Local sym>",
@@ -7259,9 +7794,6 @@ Unable to find equivalent output section
 		      bfd_set_error (bfd_error_invalid_operation);
 		      goto error_return;
 		    }
-
-		  shndx = _bfd_elf_section_from_bfd_section (abfd, sec2);
-		  BFD_ASSERT (shndx != SHN_BAD);
 		}
 	    }
 
@@ -7301,12 +7833,16 @@ Unable to find equivalent output section
 	}
       else if (bfd_is_com_section (syms[idx]->section))
 	{
-#ifdef USE_STT_COMMON
-	  if (type == STT_OBJECT)
-	    sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_COMMON);
-	  else
-#endif
-	    sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
+	  if (type != STT_TLS)
+	    {
+	      if ((abfd->flags & BFD_CONVERT_ELF_COMMON))
+		type = ((abfd->flags & BFD_USE_ELF_STT_COMMON)
+			? STT_COMMON : STT_OBJECT);
+	      else
+		type = ((flags & BSF_ELF_COMMON) != 0
+			? STT_COMMON : STT_OBJECT);
+	    }
+	  sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
 	}
       else if (bfd_is_und_section (syms[idx]->section))
 	sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
@@ -7378,8 +7914,7 @@ Unable to find equivalent output section
   *sttp = stt;
   symstrtab_hdr->sh_size = _bfd_elf_strtab_size (stt);
   symstrtab_hdr->sh_type = SHT_STRTAB;
-
-  symstrtab_hdr->sh_flags = 0;
+  symstrtab_hdr->sh_flags = bed->elf_strtab_flags;
   symstrtab_hdr->sh_addr = 0;
   symstrtab_hdr->sh_entsize = 0;
   symstrtab_hdr->sh_link = 0;
@@ -7583,7 +8118,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd
       if (hdr->sh_info == 0 || hdr->sh_size < sizeof (Elf_External_Verneed))
 	{
 error_return_bad_verref:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: .gnu.version_r invalid entry"), abfd);
 	  bfd_set_error (bfd_error_bad_value);
 error_return_verref:
@@ -7710,7 +8245,7 @@ error_return_verref:
       if (hdr->sh_info == 0 || hdr->sh_size < sizeof (Elf_External_Verdef))
 	{
 	error_return_bad_verdef:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: .gnu.version_d invalid entry"), abfd);
 	  bfd_set_error (bfd_error_bad_value);
 	error_return_verdef:
@@ -7787,7 +8322,7 @@ error_return_verref:
 	    goto error_return_bad_verdef;
 
 	  iverdef = &iverdefarr[(iverdefmem.vd_ndx & VERSYM_VERSION) - 1];
-	  memcpy (iverdef, &iverdefmem, sizeof (Elf_Internal_Verdef));
+	  memcpy (iverdef, &iverdefmem, offsetof (Elf_Internal_Verdef, vd_bfd));
 
 	  iverdef->vd_bfd = abfd;
 
@@ -7836,6 +8371,7 @@ error_return_verref:
 			  ((bfd_byte *) everdaux + iverdaux->vda_next));
 	    }
 
+	  iverdef->vd_nodename = NULL;
 	  if (iverdef->vd_cnt)
 	    iverdef->vd_nodename = iverdef->vd_auxptr->vda_nodename;
 
@@ -8103,7 +8639,7 @@ _bfd_elf_sizeof_headers (bfd *abfd, stru
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   int ret = bed->s->sizeof_ehdr;
 
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       bfd_size_type phdr_size = elf_program_header_size (abfd);
 
@@ -8260,7 +8796,8 @@ _bfd_elf_validate_reloc (bfd *abfd, arel
   return TRUE;
 
  fail:
-  (*_bfd_error_handler)
+  _bfd_error_handler
+    /* xgettext:c-format */
     (_("%B: unsupported relocation type %s"),
      abfd, areloc->howto->name);
   bfd_set_error (bfd_error_bad_value);
@@ -8969,9 +9506,6 @@ elfcore_grok_note (bfd *abfd, Elf_Intern
       if (note->namesz == 6
 	  && strcmp (note->namedata, "LINUX") == 0)
 	return elfcore_grok_xstatereg (abfd, note);
-      else if (note->namesz == 8
-	  && strcmp (note->namedata, "FreeBSD") == 0)
-	return elfcore_grok_xstatereg (abfd, note);
       else
 	return TRUE;
 
@@ -9126,6 +9660,7 @@ elfcore_grok_note (bfd *abfd, Elf_Intern
     case NT_SIGINFO:
       return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
 					      note);
+
     }
 }
 
@@ -9191,6 +9726,168 @@ elfobj_grok_stapsdt_note (bfd *abfd, Elf
 }
 
 static bfd_boolean
+elfcore_grok_freebsd_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  size_t offset;
+
+  switch (abfd->arch_info->bits_per_word)
+    {
+    case 32:
+      if (note->descsz < 108)
+	return FALSE;
+      break;
+
+    case 64:
+      if (note->descsz < 120)
+	return FALSE;
+      break;
+
+    default:
+      return FALSE;
+    }
+
+  /* Check for version 1 in pr_version.  */
+  if (bfd_h_get_32 (abfd, (bfd_byte *) note->descdata) != 1)
+    return FALSE;
+  offset = 4;
+
+  /* Skip over pr_psinfosz. */
+  if (abfd->arch_info->bits_per_word == 32)
+    offset += 4;
+  else
+    {
+      offset += 4;	/* Padding before pr_psinfosz. */
+      offset += 8;
+    }
+
+  /* pr_fname is PRFNAMESZ (16) + 1 bytes in size.  */
+  elf_tdata (abfd)->core->program
+    = _bfd_elfcore_strndup (abfd, note->descdata + offset, 17);
+  offset += 17;
+
+  /* pr_psargs is PRARGSZ (80) + 1 bytes in size.  */
+  elf_tdata (abfd)->core->command
+    = _bfd_elfcore_strndup (abfd, note->descdata + offset, 81);
+  offset += 81;
+
+  /* Padding before pr_pid.  */
+  offset += 2;
+
+  /* The pr_pid field was added in version "1a".  */
+  if (note->descsz < offset + 4)
+    return TRUE;
+
+  elf_tdata (abfd)->core->pid
+    = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + offset);
+
+  return TRUE;
+}
+
+static bfd_boolean
+elfcore_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  size_t offset;
+  size_t size;
+
+  /* Check for version 1 in pr_version. */
+  if (bfd_h_get_32 (abfd, (bfd_byte *) note->descdata) != 1)
+    return FALSE;
+  offset = 4;
+
+  /* Skip over pr_statussz.  */
+  switch (abfd->arch_info->bits_per_word)
+    {
+    case 32:
+      offset += 4;
+      break;
+
+    case 64:
+      offset += 4;	/* Padding before pr_statussz. */
+      offset += 8;
+      break;
+
+    default:
+      return FALSE;
+    }
+
+  /* Extract size of pr_reg from pr_gregsetsz.  */
+  if (abfd->arch_info->bits_per_word == 32)
+    size = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + offset);
+  else
+    size = bfd_h_get_64 (abfd, (bfd_byte *) note->descdata + offset);
+
+  /* Skip over pr_gregsetsz and pr_fpregsetsz. */
+  offset += (abfd->arch_info->bits_per_word / 8) * 2;
+
+  /* Skip over pr_osreldate. */
+  offset += 4;
+
+  /* Read signal from pr_cursig. */
+  if (elf_tdata (abfd)->core->signal == 0)
+    elf_tdata (abfd)->core->signal
+      = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + offset);
+  offset += 4;
+
+  /* Read TID from pr_pid. */
+  elf_tdata (abfd)->core->lwpid
+      = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + offset);
+  offset += 4;
+
+  /* Padding before pr_reg. */
+  if (abfd->arch_info->bits_per_word == 64)
+    offset += 4;
+
+  /* Make a ".reg/999" section and a ".reg" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+					  size, note->descpos + offset);
+}
+
+static bfd_boolean
+elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->type)
+    {
+    case NT_PRSTATUS:
+      return elfcore_grok_freebsd_prstatus (abfd, note);
+
+    case NT_FPREGSET:
+      return elfcore_grok_prfpreg (abfd, note);
+
+    case NT_PRPSINFO:
+      return elfcore_grok_freebsd_psinfo (abfd, note);
+
+    case NT_FREEBSD_THRMISC:
+      if (note->namesz == 8)
+	return elfcore_make_note_pseudosection (abfd, ".thrmisc", note);
+      else
+	return TRUE;
+
+    case NT_FREEBSD_PROCSTAT_AUXV:
+      {
+	asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",
+							     SEC_HAS_CONTENTS);
+
+	if (sect == NULL)
+	  return FALSE;
+	sect->size = note->descsz - 4;
+	sect->filepos = note->descpos + 4;
+	sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
+
+	return TRUE;
+      }
+
+    case NT_X86_XSTATE:
+      if (note->namesz == 8)
+	return elfcore_grok_xstatereg (abfd, note);
+      else
+	return TRUE;
+
+    default:
+      return TRUE;
+    }
+}
+
+static bfd_boolean
 elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp)
 {
   char *cp;
@@ -9623,9 +10320,7 @@ elfcore_write_linux_prpsinfo32
 {
   struct elf_external_linux_prpsinfo32 data;
 
-  memset (&data, 0, sizeof (data));
-  LINUX_PRPSINFO32_SWAP_FIELDS (abfd, prpsinfo, data);
-
+  swap_linux_prpsinfo32_out (abfd, prpsinfo, &data);
   return elfcore_write_note (abfd, buf, bufsiz, "CORE", NT_PRPSINFO,
 			     &data, sizeof (data));
 }
@@ -9637,9 +10332,7 @@ elfcore_write_linux_prpsinfo64
 {
   struct elf_external_linux_prpsinfo64 data;
 
-  memset (&data, 0, sizeof (data));
-  LINUX_PRPSINFO64_SWAP_FIELDS (abfd, prpsinfo, data);
-
+  swap_linux_prpsinfo64_out (abfd, prpsinfo, &data);
   return elfcore_write_note (abfd, buf, bufsiz,
 			     "CORE", NT_PRPSINFO, &data, sizeof (data));
 }
@@ -10106,6 +10799,7 @@ elf_parse_notes (bfd *abfd, char *buf, s
 	    grokers[] =
 	    {
 	      GROKER_ELEMENT ("", elfcore_grok_note),
+	      GROKER_ELEMENT ("FreeBSD", elfcore_grok_freebsd_note),
 	      GROKER_ELEMENT ("NetBSD-CORE", elfcore_grok_netbsd_note),
 	      GROKER_ELEMENT ( "OpenBSD", elfcore_grok_openbsd_note),
 	      GROKER_ELEMENT ("QNX", elfcore_grok_nto_note),
@@ -10287,6 +10981,12 @@ _bfd_elf_rel_local_sym (bfd *abfd,
 				     sym->st_value + addend);
 }
 
+/* Adjust an address within a section.  Given OFFSET within SEC, return
+   the new offset within the section, based upon changes made to the
+   section.  Returns -1 if the offset is now invalid.
+   The offset (in abnd out) is in target sized bytes, however big a
+   byte may be.  */
+
 bfd_vma
 _bfd_elf_section_offset (bfd *abfd,
 			 struct bfd_link_info *info,
@@ -10300,12 +11000,17 @@ _bfd_elf_section_offset (bfd *abfd,
 				       offset);
     case SEC_INFO_TYPE_EH_FRAME:
       return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
+
     default:
       if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0)
 	{
+	  /* Reverse the offset.  */
 	  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 	  bfd_size_type address_size = bed->s->arch_size / 8;
-	  offset = sec->size - offset - address_size;
+
+	  /* address_size and sec->size are in octets.  Convert
+	     to bytes before subtracting the original offset.  */
+	  offset = (sec->size - address_size) / bfd_octets_per_byte (abfd) - offset;
 	}
       return offset;
     }
@@ -10453,10 +11158,12 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd
   return n;
 }
 
-/* It is only used by x86-64 so far.  */
+/* It is only used by x86-64 so far.
+   ??? This repeats *COM* id of zero.  sec->id is supposed to be unique,
+   but current usage would allow all of _bfd_std_section to be zero.  t*/
 asection _bfd_elf_large_com_section
-  = BFD_FAKE_SECTION (_bfd_elf_large_com_section,
-		      SEC_IS_COMMON, NULL, "LARGE_COMMON", 0);
+  = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL,
+		      "LARGE_COMMON", 0, SEC_IS_COMMON);
 
 void
 _bfd_elf_post_process_headers (bfd * abfd,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfcode.h ./bfd/elfcode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfcode.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfcode.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF executable support for BFD.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -605,13 +605,10 @@ elf_object_p (bfd *abfd)
 
   if (i_ehdrp->e_shoff != 0)
     {
-      bfd_signed_vma where = i_ehdrp->e_shoff;
-
-      if (where != (file_ptr) where)
-	goto got_wrong_format_error;
+      file_ptr where = (file_ptr) i_ehdrp->e_shoff;
 
       /* Seek to the section header table in the file.  */
-      if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+      if (bfd_seek (abfd, where, SEEK_SET) != 0)
 	goto got_no_match;
 
       /* Read the first section header at index 0, and convert to internal
@@ -657,19 +654,17 @@ elf_object_p (bfd *abfd)
 	    goto got_wrong_format_error;
 
 	  where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
-	  if (where != (file_ptr) where)
-	    goto got_wrong_format_error;
 	  if ((bfd_size_type) where <= i_ehdrp->e_shoff)
 	    goto got_wrong_format_error;
 
-	  if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+	  if (bfd_seek (abfd, where, SEEK_SET) != 0)
 	    goto got_no_match;
 	  if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
 	    goto got_no_match;
 
 	  /* Back to where we were.  */
 	  where = i_ehdrp->e_shoff + sizeof (x_shdr);
-	  if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+	  if (bfd_seek (abfd, where, SEEK_SET) != 0)
 	    goto got_no_match;
 	}
     }
@@ -681,6 +676,10 @@ elf_object_p (bfd *abfd)
       Elf_Internal_Shdr *shdrp;
       unsigned int num_sec;
 
+#ifndef BFD64
+      if (i_ehdrp->e_shnum > ((bfd_size_type) -1) / sizeof (*i_shdrp))
+	goto got_wrong_format_error;
+#endif
       amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum;
       i_shdrp = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
       if (!i_shdrp)
@@ -757,7 +756,8 @@ elf_object_p (bfd *abfd)
 	     So we are kind, and reset the string index value to 0
 	     so that at least some processing can be done.  */
 	  i_ehdrp->e_shstrndx = SHN_UNDEF;
-	  _bfd_error_handler (_("warning: %s has a corrupt string table index - ignoring"), abfd->filename);
+	  _bfd_error_handler (_("warning: %s has a corrupt string table index - ignoring"),
+			      abfd->filename);
 	}
     }
   else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
@@ -771,7 +771,11 @@ elf_object_p (bfd *abfd)
       Elf_Internal_Phdr *i_phdr;
       unsigned int i;
 
-      amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr);
+#ifndef BFD64
+      if (i_ehdrp->e_phnum > ((bfd_size_type) -1) / sizeof (*i_phdr))
+	goto got_wrong_format_error;
+#endif
+      amt = i_ehdrp->e_phnum * sizeof (*i_phdr);
       elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
       if (elf_tdata (abfd)->phdr == NULL)
 	goto got_no_match;
@@ -970,6 +974,7 @@ elf_write_out_phdrs (bfd *abfd,
   while (count--)
     {
       Elf_External_Phdr extphdr;
+
       elf_swap_phdr_out (abfd, phdr, &extphdr);
       if (bfd_bwrite (&extphdr, sizeof (Elf_External_Phdr), abfd)
 	  != sizeof (Elf_External_Phdr))
@@ -1182,7 +1187,8 @@ elf_slurp_symbol_table (bfd *abfd, asymb
       if (verhdr != NULL
 	  && verhdr->sh_size / sizeof (Elf_External_Versym) != symcount)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: version count (%ld) does not match symbol count (%ld)"),
 	     abfd->filename,
 	     (long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
@@ -1299,6 +1305,7 @@ elf_slurp_symbol_table (bfd *abfd, asymb
 	    case STT_COMMON:
 	      /* FIXME: Do we have to put the size field into the value field
 		 as we do with symbols in SHN_COMMON sections (see above) ?  */
+	      sym->symbol.flags |= BSF_ELF_COMMON;
 	      /* Fall through.  */
 	    case STT_OBJECT:
 	      sym->symbol.flags |= BSF_OBJECT;
@@ -1435,7 +1442,8 @@ elf_slurp_reloc_table_from_section (bfd 
 	relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
       else if (ELF_R_SYM (rela.r_info) > symcount)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s(%s): relocation %d has invalid symbol index %ld"),
 	     abfd->filename, asect->name, i, ELF_R_SYM (rela.r_info));
 	  relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfcore.h ./bfd/elfcore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfcore.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfcore.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF core file support for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -188,13 +188,10 @@ elf_core_file_p (bfd *abfd)
     {
       Elf_External_Shdr x_shdr;
       Elf_Internal_Shdr i_shdr;
-      bfd_signed_vma where = i_ehdrp->e_shoff;
-
-      if (where != (file_ptr) where)
-	goto wrong;
+      file_ptr where = (file_ptr) i_ehdrp->e_shoff;
 
       /* Seek to the section header table in the file.  */
-      if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+      if (bfd_seek (abfd, where, SEEK_SET) != 0)
 	goto fail;
 
       /* Read the first section header at index 0, and convert to internal
@@ -217,7 +214,7 @@ elf_core_file_p (bfd *abfd)
     {
       Elf_External_Phdr x_phdr;
       Elf_Internal_Phdr i_phdr;
-      bfd_signed_vma where;
+      file_ptr where;
 
       /* Check that we don't have a totally silly number of
 	 program headers.  */
@@ -225,13 +222,11 @@ elf_core_file_p (bfd *abfd)
 	  || i_ehdrp->e_phnum > (unsigned int) -1 / sizeof (i_phdr))
 	goto wrong;
 
-      where = i_ehdrp->e_phoff + (i_ehdrp->e_phnum - 1) * sizeof (x_phdr);
-      if (where != (file_ptr) where)
-	goto wrong;
+      where = (file_ptr)(i_ehdrp->e_phoff + (i_ehdrp->e_phnum - 1) * sizeof (x_phdr));
       if ((bfd_size_type) where <= i_ehdrp->e_phoff)
 	goto wrong;
 
-      if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+      if (bfd_seek (abfd, where, SEEK_SET) != 0)
 	goto fail;
       if (bfd_bread (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr))
 	goto fail;
@@ -300,7 +295,8 @@ elf_core_file_p (bfd *abfd)
       {
 	if ((bfd_size_type) statbuf.st_size < high)
 	  {
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("Warning: %B is truncated: expected core file "
 		 "size >= %lu, found: %lu."),
 	       abfd, (unsigned long) high, (unsigned long) statbuf.st_size);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-eh-frame.c ./bfd/elf-eh-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-eh-frame.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-eh-frame.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* .eh_frame section optimization.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -309,11 +309,10 @@ extra_augmentation_data_bytes (struct eh
   return size;
 }
 
-/* Return the size that ENTRY will have in the output.  ALIGNMENT is the
-   required alignment of ENTRY in bytes.  */
+/* Return the size that ENTRY will have in the output.  */
 
 static unsigned int
-size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment)
+size_of_output_cie_fde (struct eh_cie_fde *entry)
 {
   if (entry->removed)
     return 0;
@@ -321,8 +320,22 @@ size_of_output_cie_fde (struct eh_cie_fd
     return 4;
   return (entry->size
 	  + extra_augmentation_string_bytes (entry)
-	  + extra_augmentation_data_bytes (entry)
-	  + alignment - 1) & -alignment;
+	  + extra_augmentation_data_bytes (entry));
+}
+
+/* Return the offset of the FDE or CIE after ENT.  */
+
+static unsigned int
+next_cie_fde_offset (struct eh_cie_fde *ent,
+		     struct eh_cie_fde *last,
+		     asection *sec)
+{
+  while (++ent < last)
+    {
+      if (!ent->removed)
+	return ent->new_offset;
+    }
+  return sec->size;
 }
 
 /* Assume that the bytes between *ITER and END are CFA instructions.
@@ -811,6 +824,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 			{
 			  length = -(buf - ehbuf) & (per_width - 1);
 			  REQUIRE (skip_bytes (&buf, end, length));
+			  if (per_width == 8)
+			    this_inf->u.cie.per_encoding_aligned8 = 1;
 			}
 		      this_inf->u.cie.personality_offset = buf - start;
 		      ENSURE_NO_RELOCS (buf);
@@ -833,8 +848,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 
 	  /* For shared libraries, try to get rid of as many RELATIVE relocs
 	     as possible.  */
-	  if (info->shared
-	      && !info->relocatable
+	  if (bfd_link_pic (info)
 	      && (get_elf_backend_data (abfd)
 		  ->elf_backend_can_make_relative_eh_frame
 		  (abfd, info, sec)))
@@ -871,7 +885,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 	  buf += initial_insn_length;
 	  ENSURE_NO_RELOCS (buf);
 
-	  if (!info->relocatable)
+	  if (!bfd_link_relocatable (info))
 	    {
 	      /* Keep info for merging cies.  */
 	      this_inf->u.cie.u.full_cie = cie;
@@ -903,7 +917,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 	      REQUIRE (GET_RELOC (buf));
 
 	      /* Chain together the FDEs for each section.  */
-	      rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
+	      rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook,
+					    cookie, NULL);
 	      /* RSEC will be NULL if FDE was cleared out as it was belonging to
 		 a discarded SHT_GROUP.  */
 	      if (rsec)
@@ -924,6 +939,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 	      && read_value (abfd, buf - length, length, FALSE) == 0)
 	    {
 	      (*info->callbacks->minfo)
+		/* xgettext:c-format */
 		(_("discarding zero address range FDE in %B(%A).\n"),
 		 abfd, sec);
 	      this_inf->u.fde.cie_inf = NULL;
@@ -1018,7 +1034,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 
   elf_section_data (sec)->sec_info = sec_info;
   sec->sec_info_type = SEC_INFO_TYPE_EH_FRAME;
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       /* Keep info for merging cies.  */
       sec_info->cies = local_cies;
@@ -1028,6 +1044,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
 
  free_no_table:
   (*info->callbacks->einfo)
+    /* xgettext:c-format */
     (_("%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"),
      abfd, sec);
   hdr_info->u.dwarf.table = FALSE;
@@ -1264,8 +1281,7 @@ find_merged_cie (bfd *abfd, struct bfd_l
 	}
 
       if (per_binds_local
-	  && info->shared
-	  && !info->relocatable
+	  && bfd_link_pic (info)
 	  && (cie->per_encoding & 0x70) == DW_EH_PE_absptr
 	  && (get_elf_backend_data (abfd)
 	      ->elf_backend_can_make_relative_eh_frame (abfd, info, sec)))
@@ -1325,7 +1341,7 @@ _bfd_elf_discard_section_eh_frame
   struct eh_cie_fde *ent;
   struct eh_frame_sec_info *sec_info;
   struct eh_frame_hdr_info *hdr_info;
-  unsigned int ptr_size, offset;
+  unsigned int ptr_size, offset, eh_alignment;
 
   if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
     return FALSE;
@@ -1365,19 +1381,32 @@ _bfd_elf_discard_section_eh_frame
 	  }
 	if (keep)
 	  {
-	    if (info->shared
+	    if (bfd_link_pic (info)
 		&& (((ent->fde_encoding & 0x70) == DW_EH_PE_absptr
 		     && ent->make_relative == 0)
 		    || (ent->fde_encoding & 0x70) == DW_EH_PE_aligned))
 	      {
+		static int num_warnings_issued = 0;
+
 		/* If a shared library uses absolute pointers
 		   which we cannot turn into PC relative,
 		   don't create the binary search table,
 		   since it is affected by runtime relocations.  */
 		hdr_info->u.dwarf.table = FALSE;
-		(*info->callbacks->einfo)
-		  (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
-		     " table being created.\n"), abfd, sec);
+		if (num_warnings_issued < 10)
+		  {
+		    (*info->callbacks->einfo)
+		      /* xgettext:c-format */
+		      (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
+			 " table being created.\n"), abfd, sec);
+		    num_warnings_issued ++;
+		  }
+		else if (num_warnings_issued == 10)
+		  {
+		    (*info->callbacks->einfo)
+		      (_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n"));
+		    num_warnings_issued ++;
+		  }
 	      }
 	    ent->removed = 0;
 	    hdr_info->u.dwarf.fde_count++;
@@ -1392,14 +1421,46 @@ _bfd_elf_discard_section_eh_frame
       sec_info->cies = NULL;
     }
 
+  /* It may be that some .eh_frame input section has greater alignment
+     than other .eh_frame sections.  In that case we run the risk of
+     padding with zeros before that section, which would be seen as a
+     zero terminator.  Alignment padding must be added *inside* the
+     last FDE instead.  For other FDEs we align according to their
+     encoding, in order to align FDE address range entries naturally.  */
   offset = 0;
   for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
     if (!ent->removed)
       {
+	eh_alignment = 4;
+	if (ent->size == 4)
+	  ;
+	else if (ent->cie)
+	  {
+	    if (ent->u.cie.per_encoding_aligned8)
+	      eh_alignment = 8;
+	  }
+	else
+	  {
+	    eh_alignment = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+	    if (eh_alignment < 4)
+	      eh_alignment = 4;
+	  }
+	offset = (offset + eh_alignment - 1) & -eh_alignment;
 	ent->new_offset = offset;
-	offset += size_of_output_cie_fde (ent, ptr_size);
+	offset += size_of_output_cie_fde (ent);
       }
 
+  /* Pad the last FDE out to the output section alignment if there are
+     following sections, in order to ensure no padding between this
+     section and the next.  (Relies on the output section alignment
+     being the maximum of all input sections alignments, which is the
+     case unless someone is overriding alignment via scripts.)  */
+  eh_alignment = 4;
+  if (sec->map_head.s != NULL
+      && (sec->map_head.s->size != 4
+	  || sec->map_head.s->map_head.s != NULL))
+    eh_alignment = 1 << sec->output_section->alignment_power;
+  offset = (offset + eh_alignment - 1) & -eh_alignment;
   sec->rawsize = sec->size;
   sec->size = offset;
   return offset != sec->rawsize;
@@ -1662,7 +1723,8 @@ _bfd_elf_write_section_eh_frame_entry (b
       addr = bfd_get_signed_32 (abfd, contents + offset) + offset;
       if (addr <= last_addr)
 	{
-	  (*_bfd_error_handler) (_("%B: %s not in order"), sec->owner, sec->name);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: %s not in order"), sec->owner, sec->name);
 	  return FALSE;
 	}
 
@@ -1675,15 +1737,17 @@ _bfd_elf_write_section_eh_frame_entry (b
   addr -= (sec->output_section->vma + sec->output_offset + sec->rawsize);
   if (addr & 1)
     {
-      (*_bfd_error_handler) (_("%B: %s invalid input section size"),
-			     sec->owner, sec->name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: %s invalid input section size"),
+			  sec->owner, sec->name);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
   if (last_addr >= addr + sec->rawsize)
     {
-      (*_bfd_error_handler) (_("%B: %s points past end of text section"),
-			     sec->owner, sec->name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: %s points past end of text section"),
+			  sec->owner, sec->name);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -1715,8 +1779,7 @@ _bfd_elf_write_section_eh_frame (bfd *ab
   struct elf_link_hash_table *htab;
   struct eh_frame_hdr_info *hdr_info;
   unsigned int ptr_size;
-  struct eh_cie_fde *ent;
-  bfd_size_type sec_size;
+  struct eh_cie_fde *ent, *last_ent;
 
   if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
     /* FIXME: octets_per_byte.  */
@@ -1754,7 +1817,8 @@ _bfd_elf_write_section_eh_frame (bfd *ab
     if (!ent->removed && ent->new_offset < ent->offset)
       memmove (contents + ent->new_offset, contents + ent->offset, ent->size);
 
-  for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
+  last_ent = sec_info->entry + sec_info->count;
+  for (ent = sec_info->entry; ent < last_ent; ++ent)
     {
       unsigned char *buf, *end;
       unsigned int new_size;
@@ -1765,13 +1829,13 @@ _bfd_elf_write_section_eh_frame (bfd *ab
       if (ent->size == 4)
 	{
 	  /* Any terminating FDE must be at the end of the section.  */
-	  BFD_ASSERT (ent == sec_info->entry + sec_info->count - 1);
+	  BFD_ASSERT (ent == last_ent - 1);
 	  continue;
 	}
 
       buf = contents + ent->new_offset;
       end = buf + ent->size;
-      new_size = size_of_output_cie_fde (ent, ptr_size);
+      new_size = next_cie_fde_offset (ent, last_ent, sec) - ent->new_offset;
 
       /* Update the size.  It may be shrinked.  */
       bfd_put_32 (abfd, new_size - 4, buf);
@@ -1907,7 +1971,7 @@ _bfd_elf_write_section_eh_frame (bfd *ab
 	  value = ((ent->new_offset + sec->output_offset + 4)
 		   - (cie->new_offset + cie->u.cie.u.sec->output_offset));
 	  bfd_put_32 (abfd, value, buf);
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    continue;
 	  buf += 4;
 	  width = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
@@ -2042,18 +2106,6 @@ _bfd_elf_write_section_eh_frame (bfd *ab
 	}
     }
 
-  /* We don't align the section to its section alignment since the
-     runtime library only expects all CIE/FDE records aligned at
-     the pointer size. _bfd_elf_discard_section_eh_frame should
-     have padded CIE/FDE records to multiple of pointer size with
-     size_of_output_cie_fde.  */
-  sec_size = sec->size;
-  if (sec_info->count != 0
-      && sec_info->entry[sec_info->count - 1].size == 4)
-    sec_size -= 4;
-  if ((sec_size % ptr_size) != 0)
-    abort ();
-
   /* FIXME: octets_per_byte.  */
   return bfd_set_section_contents (abfd, sec->output_section,
 				   contents, (file_ptr) sec->output_offset,
@@ -2112,7 +2164,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_
       sec = hdr_info->u.compact.entries[i];
       if (sec->output_section != osec)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Invalid output section for .eh_frame_entry: %s"),
 	     sec->output_section->name);
 	  return FALSE;
@@ -2135,7 +2187,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_
 
   if (i != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("Invalid contents in %s section"), osec->name);
       return FALSE;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-hppa.h ./bfd/elf-hppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-hppa.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-hppa.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common code for PA ELF implementations.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1117,6 +1117,7 @@ elf_hppa_fake_sections (bfd *abfd, Elf_I
 	  if (asec->name && strcmp (asec->name, ".text") == 0)
 	    {
 	      hdr->sh_info = indx;
+	      hdr->sh_flags |= SHF_INFO_LINK;
 	      break;
 	    }
 	}
@@ -1212,6 +1213,11 @@ elf_hppa_sort_unwind (bfd *abfd)
 static unsigned int
 elf_hppa_action_discarded (asection *sec)
 {
+  /* Ignore relocations in .data.rel.ro.local.  This section can contain
+     PLABEL32 relocations to functions in discarded COMDAT groups.  */
+  if (strcmp (".data.rel.ro.local", sec->name) == 0)
+    return 0;
+
   if (strcmp (".PARISC.unwind", sec->name) == 0)
     return 0;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-ifunc.c ./bfd/elf-ifunc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-ifunc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-ifunc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF STT_GNU_IFUNC support.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -53,9 +53,9 @@ _bfd_elf_create_ifunc_sections (bfd *abf
   if (bed->plt_readonly)
     pltflags |= SEC_READONLY;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
-      /* We need to create .rel[a].ifunc for shared objects.  */
+      /* We need to create .rel[a].ifunc for PIC objects.  */
       const char *rel_sec = (bed->rela_plts_and_copies_p
 			     ? ".rela.ifunc" : ".rel.ifunc");
 
@@ -110,27 +110,35 @@ bfd_boolean
 _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
 				    struct elf_link_hash_entry *h,
 				    struct elf_dyn_relocs **head,
+				    bfd_boolean *readonly_dynrelocs_against_ifunc_p,
 				    unsigned int plt_entry_size,
 				    unsigned int plt_header_size,
-				    unsigned int got_entry_size)
+				    unsigned int got_entry_size,
+				    bfd_boolean avoid_plt)
 {
   asection *plt, *gotplt, *relplt;
   struct elf_dyn_relocs *p;
   unsigned int sizeof_reloc;
   const struct elf_backend_data *bed;
   struct elf_link_hash_table *htab;
-
-  /* When a shared library references a STT_GNU_IFUNC symbol defined
-     in executable, the address of the resolved function may be used.
-     But in non-shared executable, the address of its .plt slot may
-     be used.  Pointer equality may not work correctly.  PIE should
-     be used if pointer equality is required here.  */
-  if (!info->shared
+  bfd_boolean readonly_dynrelocs_against_ifunc;
+  /* If AVOID_PLT is TRUE, don't use PLT if possible.  */
+  bfd_boolean use_plt = !avoid_plt || h->plt.refcount > 0;
+  bfd_boolean need_dynreloc = !use_plt || bfd_link_pic (info);
+
+  /* When a PIC object references a STT_GNU_IFUNC symbol defined
+     in executable or it isn't referenced via PLT, the address of
+     the resolved function may be used.  But in non-PIC executable,
+     the address of its .plt slot may be used.  Pointer equality may
+     not work correctly.  PIE or non-PLT reference should be used if
+     pointer equality is required here.  */
+  if (!need_dynreloc
       && (h->dynindx != -1
 	  || info->export_dynamic)
       && h->pointer_equality_needed)
     {
       info->callbacks->einfo
+	/* xgettext:c-format */
 	(_("%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer "
 	   "equality in `%B' can not be used when making an "
 	   "executable; recompile with -fPIE and relink with -pie\n"),
@@ -142,16 +150,30 @@ _bfd_elf_allocate_ifunc_dyn_relocs (stru
 
   htab = elf_hash_table (info);
 
-  /* When building shared library, we need to handle the case where it is
-     marked with regular reference, but not non-GOT reference since the
-     non-GOT reference bit may not be set here.  */
-  if (info->shared && !h->non_got_ref && h->ref_regular)
-    for (p = *head; p != NULL; p = p->next)
-      if (p->count)
-	{
-	  h->non_got_ref = 1;
-	  goto keep;
-	}
+  /* When the symbol is marked with regular reference, if PLT isn't used
+     or we are building a PIC object, we must keep dynamic relocation
+     if there is non-GOT reference and use PLT if there is PC-relative
+     reference.  */
+  if (need_dynreloc && h->ref_regular)
+    {
+      bfd_boolean keep = FALSE;
+      for (p = *head; p != NULL; p = p->next)
+	if (p->count)
+	  {
+	    h->non_got_ref = 1;
+	    /* Need dynamic relocations for non-GOT reference.  */
+	    keep = TRUE;
+	    if (p->pc_count)
+	      {
+		/* Must use PLT for PC-relative reference.  */
+		use_plt = TRUE;
+		need_dynreloc = bfd_link_pic (info);
+		break;
+	      }
+	  }
+      if (keep)
+	goto keep;
+    }
 
   /* Support garbage collection against STT_GNU_IFUNC symbols.  */
   if (h->plt.refcount <= 0 && h->got.refcount <= 0)
@@ -163,7 +185,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (stru
     }
 
   /* Return and discard space for dynamic relocations against it if
-     it is never referenced in a non-shared object.  */
+     it is never referenced.  */
   if (!h->ref_regular)
     {
       if (h->plt.refcount > 0
@@ -190,9 +212,9 @@ keep:
       gotplt = htab->sgotplt;
       relplt = htab->srelplt;
 
-      /* If this is the first .plt entry, make room for the special
-	 first entry.  */
-      if (plt->size == 0)
+      /* If this is the first .plt entry and PLT is used, make room for
+	 the special first entry.  */
+      if (plt->size == 0 && use_plt)
 	plt->size += plt_header_size;
     }
   else
@@ -202,28 +224,35 @@ keep:
       relplt = htab->irelplt;
     }
 
-  /* Don't update value of STT_GNU_IFUNC symbol to PLT.  We need
-     the original value for R_*_IRELATIVE.  */
-  h->plt.offset = plt->size;
-
-  /* Make room for this entry in the .plt/.iplt section.  */
-  plt->size += plt_entry_size;
-
-  /* We also need to make an entry in the .got.plt/.got.iplt section,
-     which will be placed in the .got section by the linker script.  */
-  gotplt->size += got_entry_size;
+  if (use_plt)
+    {
+      /* Don't update value of STT_GNU_IFUNC symbol to PLT.  We need
+	 the original value for R_*_IRELATIVE.  */
+      h->plt.offset = plt->size;
+
+      /* Make room for this entry in the .plt/.iplt section.  */
+      plt->size += plt_entry_size;
+
+      /* We also need to make an entry in the .got.plt/.got.iplt section,
+	 which will be placed in the .got section by the linker script.  */
+      gotplt->size += got_entry_size;
+    }
 
   /* We also need to make an entry in the .rel[a].plt/.rel[a].iplt
-     section.  */
-  relplt->size += sizeof_reloc;
-  relplt->reloc_count++;
+     section for GOTPLT relocation if PLT is used.  */
+  if (use_plt)
+    {
+      relplt->size += sizeof_reloc;
+      relplt->reloc_count++;
+    }
 
   /* We need dynamic relocation for STT_GNU_IFUNC symbol only when
-     there is a non-GOT reference in a shared object.  */
-  if (!info->shared
-      || !h->non_got_ref)
+     there is a non-GOT reference in a PIC object or PLT isn't used.  */
+  if (!need_dynreloc || !h->non_got_ref)
     *head = NULL;
 
+  readonly_dynrelocs_against_ifunc = FALSE;
+
   /* Finally, allocate space.  */
   p = *head;
   if (p != NULL)
@@ -231,44 +260,97 @@ keep:
       bfd_size_type count = 0;
       do
 	{
+	  if (!readonly_dynrelocs_against_ifunc)
+	    {
+	      asection *s = p->sec->output_section;
+	      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+		readonly_dynrelocs_against_ifunc = TRUE;
+	    }
 	  count += p->count;
 	  p = p->next;
 	}
       while (p != NULL);
-      htab->irelifunc->size += count * sizeof_reloc;
+
+      /* Dynamic relocations are stored in
+	 1. .rel[a].ifunc section in PIC object.
+	 2. .rel[a].got section in dynamic executable.
+	 3. .rel[a].iplt section in static executable.  */
+      if (bfd_link_pic (info))
+	htab->irelifunc->size += count * sizeof_reloc;
+      else if (htab->splt != NULL)
+	htab->srelgot->size += count * sizeof_reloc;
+      else
+	{
+	  relplt->size += count * sizeof_reloc;
+	  relplt->reloc_count += count;
+	}
     }
 
+  if (readonly_dynrelocs_against_ifunc_p)
+    *readonly_dynrelocs_against_ifunc_p = readonly_dynrelocs_against_ifunc;
+
   /* For STT_GNU_IFUNC symbol, .got.plt has the real function address
      and .got has the PLT entry adddress.  We will load the GOT entry
      with the PLT entry in finish_dynamic_symbol if it is used.  For
-     branch, it uses .got.plt.  For symbol value,
-     1. Use .got.plt in a shared object if it is forced local or not
+     branch, it uses .got.plt.  For symbol value, if PLT is used,
+     1. Use .got.plt in a PIC object if it is forced local or not
      dynamic.
-     2. Use .got.plt in a non-shared object if pointer equality isn't
+     2. Use .got.plt in a non-PIC object if pointer equality isn't
      needed.
      3. Use .got.plt in PIE.
      4. Use .got.plt if .got isn't used.
      5. Otherwise use .got so that it can be shared among different
      objects at run-time.
-     We only need to relocate .got entry in shared object.  */
-  if (h->got.refcount <= 0
-      || (info->shared
-	  && (h->dynindx == -1
-	      || h->forced_local))
-      || (!info->shared
-	  && !h->pointer_equality_needed)
-      || (info->executable && info->shared)
-      || htab->sgot == NULL)
+     If PLT isn't used, always use .got for symbol value.
+     We only need to relocate .got entry in PIC object or in dynamic
+     executable without PLT.  */
+  if (use_plt
+      && (h->got.refcount <= 0
+	  || (bfd_link_pic (info)
+	      && (h->dynindx == -1
+		  || h->forced_local))
+	  || (!bfd_link_pic (info)
+	      && !h->pointer_equality_needed)
+	  || bfd_link_pie (info)
+	  || htab->sgot == NULL))
     {
       /* Use .got.plt.  */
       h->got.offset = (bfd_vma) -1;
     }
   else
     {
-      h->got.offset = htab->sgot->size;
-      htab->sgot->size += got_entry_size;
-      if (info->shared)
-	htab->srelgot->size += sizeof_reloc;
+      if (!use_plt)
+	{
+	  /* PLT isn't used.  */
+	  h->plt.offset = (bfd_vma) -1;
+	}
+      if (h->got.refcount <= 0)
+	{
+	  /* GOT isn't need when there are only relocations for static
+	     pointers.  */
+	  h->got.offset = (bfd_vma) -1;
+	}
+      else
+	{
+	  h->got.offset = htab->sgot->size;
+	  htab->sgot->size += got_entry_size;
+	  /* Need to relocate the GOT entry in a PIC object or PLT isn't
+	     used.  Otherwise, the GOT entry will be filled with the PLT
+	     entry and dynamic GOT relocation isn't needed.  */
+	  if (need_dynreloc)
+	    {
+	      /* For non-static executable, dynamic GOT relocation is in
+		 .rel[a].got section, but for static executable, it is
+		 in .rel[a].iplt section.  */
+	      if (htab->splt != NULL)
+		htab->srelgot->size += sizeof_reloc;
+	      else
+		{
+		  relplt->size += sizeof_reloc;
+		  relplt->reloc_count++;
+		}
+	    }
+	}
     }
 
   return TRUE;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elflink.c ./bfd/elflink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elflink.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elflink.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF linking support for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -28,6 +28,10 @@
 #include "safe-ctype.h"
 #include "libiberty.h"
 #include "objalloc.h"
+#if BFD_SUPPORTS_PLUGINS
+#include "plugin-api.h"
+#include "plugin.h"
+#endif
 
 /* This struct is used to pass information to routines called via
    elf_link_hash_traverse which must return failure.  */
@@ -145,8 +149,7 @@ _bfd_elf_create_got_section (bfd *abfd, 
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
-  if (s != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   flags = bed->dynamic_sec_flags;
@@ -204,7 +207,24 @@ _bfd_elf_link_create_dynstrtab (bfd *abf
 
   hash_table = elf_hash_table (info);
   if (hash_table->dynobj == NULL)
-    hash_table->dynobj = abfd;
+    {
+      /* We may not set dynobj, an input file holding linker created
+	 dynamic sections to abfd, which may be a dynamic object with
+	 its own dynamic sections.  We need to find a normal input file
+	 to hold linker created sections if possible.  */
+      if ((abfd->flags & (DYNAMIC | BFD_PLUGIN)) != 0)
+	{
+	  bfd *ibfd;
+	  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
+	    if ((ibfd->flags
+		 & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
+	      {
+		abfd = ibfd;
+		break;
+	      }
+	}
+      hash_table->dynobj = abfd;
+    }
 
   if (hash_table->dynstr == NULL)
     {
@@ -246,7 +266,7 @@ _bfd_elf_link_create_dynamic_sections (b
 
   /* A dynamically linked executable has a .interp section, but a
      shared library does not.  */
-  if (info->executable)
+  if (bfd_link_executable (info) && !info->nointerp)
     {
       s = bfd_make_section_anyway_with_flags (abfd, ".interp",
 					      flags | SEC_READONLY);
@@ -279,6 +299,7 @@ _bfd_elf_link_create_dynamic_sections (b
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
     return FALSE;
+  elf_hash_table (info)->dynsym = s;
 
   s = bfd_make_section_anyway_with_flags (abfd, ".dynstr",
 					  flags | SEC_READONLY);
@@ -403,9 +424,22 @@ _bfd_elf_create_dynamic_sections (bfd *a
 	 initialize them at run time.  The linker script puts the .dynbss
 	 section into the .bss section of the final image.  */
       s = bfd_make_section_anyway_with_flags (abfd, ".dynbss",
-					      (SEC_ALLOC | SEC_LINKER_CREATED));
+					      SEC_ALLOC | SEC_LINKER_CREATED);
       if (s == NULL)
 	return FALSE;
+      htab->sdynbss = s;
+
+      if (bed->want_dynrelro)
+	{
+	  /* Similarly, but for symbols that were originally in read-only
+	     sections.  This section doesn't really need to have contents,
+	     but make it like other .data.rel.ro sections.  */
+	  s = bfd_make_section_anyway_with_flags (abfd, ".data.rel.ro",
+						  flags);
+	  if (s == NULL)
+	    return FALSE;
+	  htab->sdynrelro = s;
+	}
 
       /* The .rel[a].bss section holds copy relocs.  This section is not
 	 normally needed.  We need to create it here, though, so that the
@@ -418,7 +452,7 @@ _bfd_elf_create_dynamic_sections (bfd *a
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (! info->shared)
+      if (bfd_link_executable (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->rela_plts_and_copies_p
@@ -427,6 +461,20 @@ _bfd_elf_create_dynamic_sections (bfd *a
 	  if (s == NULL
 	      || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
 	    return FALSE;
+	  htab->srelbss = s;
+
+	  if (bed->want_dynrelro)
+	    {
+	      s = (bfd_make_section_anyway_with_flags
+		   (abfd, (bed->rela_plts_and_copies_p
+			   ? ".rela.data.rel.ro" : ".rel.data.rel.ro"),
+		    flags | SEC_READONLY));
+	      if (s == NULL
+		  || ! bfd_set_section_alignment (abfd, s,
+						  bed->s->log_file_align))
+		return FALSE;
+	      htab->sreldynrelro = s;
+	    }
 	}
     }
 
@@ -450,7 +498,7 @@ bfd_elf_link_record_dynamic_symbol (stru
       struct elf_strtab_hash *dynstr;
       char *p;
       const char *name;
-      bfd_size_type indx;
+      size_t indx;
 
       /* XXX: The ABI draft says the linker must turn hidden and
 	 internal symbols into STB_LOCAL symbols when producing the
@@ -501,7 +549,7 @@ bfd_elf_link_record_dynamic_symbol (stru
       if (p != NULL)
 	*p = ELF_VER_CHR;
 
-      if (indx == (bfd_size_type) -1)
+      if (indx == (size_t) -1)
 	return FALSE;
       h->dynstr_index = indx;
     }
@@ -519,13 +567,15 @@ bfd_elf_link_mark_dynamic_symbol (struct
   struct bfd_elf_dynamic_list *d = info->dynamic_list;
 
   /* It may be called more than once on the same H.  */
-  if(h->dynamic || info->relocatable)
+  if(h->dynamic || bfd_link_relocatable (info))
     return;
 
   if ((info->dynamic_data
        && (h->type == STT_OBJECT
+	   || h->type == STT_COMMON
 	   || (sym != NULL
-	       && ELF_ST_TYPE (sym->st_info) == STT_OBJECT)))
+	       && (ELF_ST_TYPE (sym->st_info) == STT_OBJECT
+		   || ELF_ST_TYPE (sym->st_info) == STT_COMMON))))
       || (d != NULL
 	  && h->root.type == bfd_link_hash_new
 	  && (*d->match) (&d->head, NULL, h->root.root.string)))
@@ -554,6 +604,22 @@ bfd_elf_record_link_assignment (bfd *out
   if (h == NULL)
     return provide;
 
+  if (h->root.type == bfd_link_hash_warning)
+    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+  if (h->versioned == unknown)
+    {
+      /* Set versioned if symbol version is unknown.  */
+      char *version = strrchr (name, ELF_VER_CHR);
+      if (version)
+	{
+	  if (version > name && version[-1] != ELF_VER_CHR)
+	    h->versioned = versioned_hidden;
+	  else
+	    h->versioned = versioned;
+	}
+    }
+
   switch (h->root.type)
     {
     case bfd_link_hash_defined:
@@ -588,9 +654,9 @@ bfd_elf_record_link_assignment (bfd *out
       hv->root.u.i.link = (struct bfd_link_hash_entry *) h;
       (*bed->elf_backend_copy_indirect_symbol) (info, h, hv);
       break;
-    case bfd_link_hash_warning:
-      abort ();
-      break;
+    default:
+      BFD_FAIL ();
+      return FALSE;
     }
 
   /* If this symbol is being provided by the linker script, and it is
@@ -611,6 +677,9 @@ bfd_elf_record_link_assignment (bfd *out
       && !h->def_regular)
     h->verinfo.verdef = NULL;
 
+  /* Make sure this symbol is not garbage collected.  */
+  h->mark = 1;
+
   h->def_regular = 1;
 
   if (hidden)
@@ -623,7 +692,7 @@ bfd_elf_record_link_assignment (bfd *out
 
   /* STV_HIDDEN and STV_INTERNAL symbols must be STB_LOCAL in shared objects
      and executables.  */
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && h->dynindx != -1
       && (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
 	  || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL))
@@ -631,8 +700,8 @@ bfd_elf_record_link_assignment (bfd *out
 
   if ((h->def_dynamic
        || h->ref_dynamic
-       || info->shared
-       || (info->executable && elf_hash_table (info)->is_relocatable_executable))
+       || bfd_link_dll (info)
+       || elf_hash_table (info)->is_relocatable_executable)
       && h->dynindx == -1)
     {
       if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -665,7 +734,7 @@ bfd_elf_link_record_local_dynamic_symbol
   struct elf_link_local_dynamic_entry *entry;
   struct elf_link_hash_table *eht;
   struct elf_strtab_hash *dynstr;
-  unsigned long dynstr_index;
+  size_t dynstr_index;
   char *name;
   Elf_External_Sym_Shndx eshndx;
   char esym[sizeof (Elf64_External_Sym)];
@@ -720,7 +789,7 @@ bfd_elf_link_record_local_dynamic_symbol
     }
 
   dynstr_index = _bfd_elf_strtab_add (dynstr, name, FALSE);
-  if (dynstr_index == (unsigned long) -1)
+  if (dynstr_index == (size_t) -1)
     return 0;
   entry->isym.st_name = dynstr_index;
 
@@ -842,7 +911,8 @@ _bfd_elf_link_renumber_dynsyms (bfd *out
 {
   unsigned long dynsymcount = 0;
 
-  if (info->shared || elf_hash_table (info)->is_relocatable_executable)
+  if (bfd_link_pic (info)
+      || elf_hash_table (info)->is_relocatable_executable)
     {
       const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
       asection *p;
@@ -866,16 +936,17 @@ _bfd_elf_link_renumber_dynsyms (bfd *out
       for (p = elf_hash_table (info)->dynlocal; p ; p = p->next)
 	p->dynindx = ++dynsymcount;
     }
+  elf_hash_table (info)->local_dynsymcount = dynsymcount;
 
   elf_link_hash_traverse (elf_hash_table (info),
 			  elf_link_renumber_hash_table_dynsyms,
 			  &dynsymcount);
 
-  /* There is an unused NULL entry at the head of the table which
-     we must account for in our count.  Unless there weren't any
-     symbols, which means we'll have no table at all.  */
-  if (dynsymcount != 0)
-    ++dynsymcount;
+  /* There is an unused NULL entry at the head of the table which we
+     must account for in our count even if the table is empty since it
+     is intended for the mandatory DT_SYMTAB tag (.dynsym section) in
+     .dynamic section.  */
+  dynsymcount++;
 
   elf_hash_table (info)->dynsymcount = dynsymcount;
   return dynsymcount;
@@ -939,7 +1010,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
 		       bfd_boolean *skip,
 		       bfd_boolean *override,
 		       bfd_boolean *type_change_ok,
-		       bfd_boolean *size_change_ok)
+		       bfd_boolean *size_change_ok,
+		       bfd_boolean *matched)
 {
   asection *sec, *oldsec;
   struct elf_link_hash_entry *h;
@@ -950,6 +1022,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
   bfd_boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
   bfd_boolean newweak, oldweak, newfunc, oldfunc;
   const struct elf_backend_data *bed;
+  char *new_version;
 
   *skip = FALSE;
   *override = FALSE;
@@ -968,6 +1041,30 @@ _bfd_elf_merge_symbol (bfd *abfd,
 
   bed = get_elf_backend_data (abfd);
 
+  /* NEW_VERSION is the symbol version of the new symbol.  */
+  if (h->versioned != unversioned)
+    {
+      /* Symbol version is unknown or versioned.  */
+      new_version = strrchr (name, ELF_VER_CHR);
+      if (new_version)
+	{
+	  if (h->versioned == unknown)
+	    {
+	      if (new_version > name && new_version[-1] != ELF_VER_CHR)
+		h->versioned = versioned_hidden;
+	      else
+		h->versioned = versioned;
+	    }
+	  new_version += 1;
+	  if (new_version[0] == '\0')
+	    new_version = NULL;
+	}
+      else
+	h->versioned = unversioned;
+    }
+  else
+    new_version = NULL;
+
   /* For merging, we only care about real symbols.  But we need to make
      sure that indirect symbol dynamic flags are updated.  */
   hi = h;
@@ -975,6 +1072,44 @@ _bfd_elf_merge_symbol (bfd *abfd,
 	 || h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
+  if (!*matched)
+    {
+      if (hi == h || h->root.type == bfd_link_hash_new)
+	*matched = TRUE;
+      else
+	{
+	  /* OLD_HIDDEN is true if the existing symbol is only visible
+	     to the symbol with the same symbol version.  NEW_HIDDEN is
+	     true if the new symbol is only visible to the symbol with
+	     the same symbol version.  */
+	  bfd_boolean old_hidden = h->versioned == versioned_hidden;
+	  bfd_boolean new_hidden = hi->versioned == versioned_hidden;
+	  if (!old_hidden && !new_hidden)
+	    /* The new symbol matches the existing symbol if both
+	       aren't hidden.  */
+	    *matched = TRUE;
+	  else
+	    {
+	      /* OLD_VERSION is the symbol version of the existing
+		 symbol. */
+	      char *old_version;
+
+	      if (h->versioned >= versioned)
+		old_version = strrchr (h->root.root.string,
+				       ELF_VER_CHR) + 1;
+	      else
+		 old_version = NULL;
+
+	      /* The new symbol matches the existing symbol if they
+		 have the same symbol version.  */
+	      *matched = (old_version == new_version
+			  || (old_version != NULL
+			      && new_version != NULL
+			      && strcmp (old_version, new_version) == 0));
+	    }
+	}
+    }
+
   /* OLDBFD and OLDSEC are a BFD and an ASECTION associated with the
      existing symbol.  */
 
@@ -1047,7 +1182,9 @@ _bfd_elf_merge_symbol (bfd *abfd,
 	}
       else
 	{
-	  h->dynamic_def = 1;
+	  /* Update the existing symbol only if they match. */
+	  if (*matched)
+	    h->dynamic_def = 1;
 	  hi->dynamic_def = 1;
 	}
     }
@@ -1102,21 +1239,20 @@ _bfd_elf_merge_symbol (bfd *abfd,
   oldfunc = (h->type != STT_NOTYPE
 	     && bed->is_function_type (h->type));
 
-  /* When we try to create a default indirect symbol from the dynamic
-     definition with the default version, we skip it if its type and
-     the type of existing regular definition mismatch.  */
+  /* If creating a default indirect symbol ("foo" or "foo@") from a
+     dynamic versioned definition ("foo@@") skip doing so if there is
+     an existing regular definition with a different type.  We don't
+     want, for example, a "time" variable in the executable overriding
+     a "time" function in a shared library.  */
   if (pold_alignment == NULL
       && newdyn
       && newdef
       && !olddyn
-      && (((olddef || h->root.type == bfd_link_hash_common)
-	   && ELF_ST_TYPE (sym->st_info) != h->type
-	   && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
-	   && h->type != STT_NOTYPE
-	   && !(newfunc && oldfunc))
-	  || (olddef
-	      && ((h->type == STT_GNU_IFUNC)
-		  != (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)))))
+      && (olddef || h->root.type == bfd_link_hash_common)
+      && ELF_ST_TYPE (sym->st_info) != h->type
+      && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
+      && h->type != STT_NOTYPE
+      && !(newfunc && oldfunc))
     {
       *skip = TRUE;
       return TRUE;
@@ -1155,22 +1291,26 @@ _bfd_elf_merge_symbol (bfd *abfd,
 	}
 
       if (tdef && ntdef)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%s: TLS definition in %B section %A "
 	     "mismatches non-TLS definition in %B section %A"),
 	   tbfd, tsec, ntbfd, ntsec, h->root.root.string);
       else if (!tdef && !ntdef)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%s: TLS reference in %B "
 	     "mismatches non-TLS reference in %B"),
 	   tbfd, ntbfd, h->root.root.string);
       else if (tdef)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%s: TLS definition in %B section %A "
 	     "mismatches non-TLS reference in %B"),
 	   tbfd, tsec, ntbfd, h->root.root.string);
       else
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%s: TLS reference in %B "
 	     "mismatches non-TLS definition in %B section %A"),
 	   tbfd, ntbfd, ntsec, h->root.root.string);
@@ -1381,10 +1521,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
 	 the old symbol override the new one as normally happens with
 	 symbols defined in dynamic objects.  */
 
-      if (! ((*info->callbacks->multiple_common)
-	     (info, &h->root, abfd, bfd_link_hash_common, sym->st_size)))
-	return FALSE;
-
+      (*info->callbacks->multiple_common) (info, &h->root, abfd,
+					   bfd_link_hash_common, sym->st_size);
       if (sym->st_size > h->size)
 	h->size = sym->st_size;
 
@@ -1403,13 +1541,16 @@ _bfd_elf_merge_symbol (bfd *abfd,
      represent variables; this can cause confusion in principle, but
      any such confusion would seem to indicate an erroneous program or
      shared library.  We also permit a common symbol in a regular
-     object to override a weak symbol in a shared object.  */
+     object to override a weak symbol in a shared object.  A common
+     symbol in executable also overrides a symbol in a shared object.  */
 
   if (newdyn
       && newdef
       && (olddef
 	  || (h->root.type == bfd_link_hash_common
-	      && (newweak || newfunc))))
+	      && (newweak
+		  || newfunc
+		  || (!olddyn && bfd_link_executable (info))))))
     {
       *override = TRUE;
       newdef = FALSE;
@@ -1539,9 +1680,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
       /* It would be best if we could set the hash table entry to a
 	 common symbol, but we don't know what to use for the section
 	 or the alignment.  */
-      if (! ((*info->callbacks->multiple_common)
-	     (info, &h->root, abfd, bfd_link_hash_common, sym->st_size)))
-	return FALSE;
+      (*info->callbacks->multiple_common) (info, &h->root, abfd,
+					   bfd_link_hash_common, sym->st_size);
 
       /* If the presumed common symbol in the dynamic object is
 	 larger, pretend that the new symbol has its size.  */
@@ -1618,14 +1758,41 @@ _bfd_elf_add_default_symbol (bfd *abfd,
   char *p;
   size_t len, shortlen;
   asection *tmp_sec;
+  bfd_boolean matched;
+
+  if (h->versioned == unversioned || h->versioned == versioned_hidden)
+    return TRUE;
 
   /* If this symbol has a version, and it is the default version, we
      create an indirect symbol from the default name to the fully
      decorated name.  This will cause external references which do not
      specify a version to be bound to this version of the symbol.  */
   p = strchr (name, ELF_VER_CHR);
-  if (p == NULL || p[1] != ELF_VER_CHR)
-    return TRUE;
+  if (h->versioned == unknown)
+    {
+      if (p == NULL)
+	{
+	  h->versioned = unversioned;
+	  return TRUE;
+	}
+      else
+	{
+	  if (p[1] != ELF_VER_CHR)
+	    {
+	      h->versioned = versioned_hidden;
+	      return TRUE;
+	    }
+	  else
+	    h->versioned = versioned;
+	}
+    }
+  else
+    {
+      /* PR ld/19073: We may see an unversioned definition after the
+	 default version.  */
+      if (p == NULL)
+	return TRUE;
+    }
 
   bed = get_elf_backend_data (abfd);
   collect = bed->collect;
@@ -1644,23 +1811,54 @@ _bfd_elf_add_default_symbol (bfd *abfd,
      actually going to define an indirect symbol.  */
   type_change_ok = FALSE;
   size_change_ok = FALSE;
+  matched = TRUE;
   tmp_sec = sec;
   if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value,
 			      &hi, poldbfd, NULL, NULL, &skip, &override,
-			      &type_change_ok, &size_change_ok))
+			      &type_change_ok, &size_change_ok, &matched))
     return FALSE;
 
   if (skip)
     goto nondefault;
 
+  if (hi->def_regular)
+    {
+      /* If the undecorated symbol will have a version added by a
+	 script different to H, then don't indirect to/from the
+	 undecorated symbol.  This isn't ideal because we may not yet
+	 have seen symbol versions, if given by a script on the
+	 command line rather than via --version-script.  */
+      if (hi->verinfo.vertree == NULL && info->version_info != NULL)
+	{
+	  bfd_boolean hide;
+
+	  hi->verinfo.vertree
+	    = bfd_find_version_for_sym (info->version_info,
+					hi->root.root.string, &hide);
+	  if (hi->verinfo.vertree != NULL && hide)
+	    {
+	      (*bed->elf_backend_hide_symbol) (info, hi, TRUE);
+	      goto nondefault;
+	    }
+	}
+      if (hi->verinfo.vertree != NULL
+	  && strcmp (p + 1 + (p[1] == '@'), hi->verinfo.vertree->name) != 0)
+	goto nondefault;
+    }
+
   if (! override)
     {
-      bh = &hi->root;
-      if (! (_bfd_generic_link_add_one_symbol
-	     (info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr,
-	      0, name, FALSE, collect, &bh)))
-	return FALSE;
-      hi = (struct elf_link_hash_entry *) bh;
+      /* Add the default symbol if not performing a relocatable link.  */
+      if (! bfd_link_relocatable (info))
+	{
+	  bh = &hi->root;
+	  if (! (_bfd_generic_link_add_one_symbol
+		 (info, abfd, shortname, BSF_INDIRECT,
+		  bfd_ind_section_ptr,
+		  0, name, FALSE, collect, &bh)))
+	    return FALSE;
+	  hi = (struct elf_link_hash_entry *) bh;
+	}
     }
   else
     {
@@ -1732,7 +1930,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
 	{
 	  if (! dynamic)
 	    {
-	      if (! info->executable
+	      if (! bfd_link_executable (info)
 		  || hi->def_dynamic
 		  || hi->ref_dynamic)
 		*dynsym = TRUE;
@@ -1762,7 +1960,7 @@ nondefault:
   tmp_sec = sec;
   if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value,
 			      &hi, poldbfd, NULL, NULL, &skip, &override,
-			      &type_change_ok, &size_change_ok))
+			      &type_change_ok, &size_change_ok, &matched))
     return FALSE;
 
   if (skip)
@@ -1775,7 +1973,8 @@ nondefault:
 	 overridden by a versioned definition.  */
       if (hi->root.type != bfd_link_hash_defined
 	  && hi->root.type != bfd_link_hash_defweak)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B: unexpected redefinition of indirect versioned symbol `%s'"),
 	   abfd, shortname);
     }
@@ -1804,7 +2003,7 @@ nondefault:
 	    {
 	      if (! dynamic)
 		{
-		  if (! info->executable
+		  if (! bfd_link_executable (info)
 		      || hi->ref_dynamic)
 		    *dynsym = TRUE;
 		}
@@ -1947,7 +2146,6 @@ _bfd_elf_link_assign_sym_version (struct
   const struct elf_backend_data *bed;
   struct elf_info_failed eif;
   char *p;
-  bfd_size_type amt;
 
   sinfo = (struct elf_info_failed *) data;
   info = sinfo->info;
@@ -1972,26 +2170,14 @@ _bfd_elf_link_assign_sym_version (struct
   if (p != NULL && h->verinfo.vertree == NULL)
     {
       struct bfd_elf_version_tree *t;
-      bfd_boolean hidden;
 
-      hidden = TRUE;
-
-      /* There are two consecutive ELF_VER_CHR characters if this is
-	 not a hidden symbol.  */
       ++p;
       if (*p == ELF_VER_CHR)
-	{
-	  hidden = FALSE;
-	  ++p;
-	}
+	++p;
 
       /* If there is no version string, we can just return out.  */
       if (*p == '\0')
-	{
-	  if (hidden)
-	    h->hidden = 1;
-	  return TRUE;
-	}
+	return TRUE;
 
       /* Look for the version.  If we find it, it is no longer weak.  */
       for (t = sinfo->info->version_info; t != NULL; t = t->next)
@@ -2039,7 +2225,7 @@ _bfd_elf_link_assign_sym_version (struct
 
       /* If we are building an application, we need to create a
 	 version node for this version.  */
-      if (t == NULL && info->executable)
+      if (t == NULL && bfd_link_executable (info))
 	{
 	  struct bfd_elf_version_tree **pp;
 	  int version_index;
@@ -2049,8 +2235,8 @@ _bfd_elf_link_assign_sym_version (struct
 	  if (h->dynindx == -1)
 	    return TRUE;
 
-	  amt = sizeof *t;
-	  t = (struct bfd_elf_version_tree *) bfd_zalloc (info->output_bfd, amt);
+	  t = (struct bfd_elf_version_tree *) bfd_zalloc (info->output_bfd,
+							  sizeof *t);
 	  if (t == NULL)
 	    {
 	      sinfo->failed = TRUE;
@@ -2080,16 +2266,14 @@ _bfd_elf_link_assign_sym_version (struct
 	{
 	  /* We could not find the version for a symbol when
 	     generating a shared archive.  Return an error.  */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: version node not found for symbol %s"),
 	     info->output_bfd, h->root.root.string);
 	  bfd_set_error (bfd_error_bad_value);
 	  sinfo->failed = TRUE;
 	  return FALSE;
 	}
-
-      if (hidden)
-	h->hidden = 1;
     }
 
   /* If we don't have a version for this symbol, see if we can find
@@ -2171,7 +2355,8 @@ elf_link_read_relocs_from_section (bfd *
 	{
 	  if ((size_t) r_symndx >= nsyms)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: bad reloc symbol index (0x%lx >= 0x%lx)"
 		   " for offset 0x%lx in section `%A'"),
 		 abfd, sec,
@@ -2182,7 +2367,8 @@ elf_link_read_relocs_from_section (bfd *
 	}
       else if (r_symndx != STN_UNDEF)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A'"
 	       " when the object file has no symbol table"),
 	     abfd, sec,
@@ -2372,7 +2558,8 @@ _bfd_elf_link_output_relocs (bfd *output
     }
   else
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: relocation size mismatch in %B section %A"),
 	 output_bfd, input_section->owner, input_section);
       bfd_set_error (bfd_error_wrong_format);
@@ -2404,7 +2591,7 @@ bfd_boolean
 _bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *info,
 				 struct elf_link_hash_entry *h)
 {
-  if (info->pie
+  if (bfd_link_pie (info)
       && h->dynindx == -1
       && h->root.type == bfd_link_hash_undefweak)
     return bfd_elf_link_record_dynamic_symbol (info, h);
@@ -2500,18 +2687,35 @@ _bfd_elf_fix_symbol_flags (struct elf_li
       && (h->root.u.def.section->owner->flags & (DYNAMIC | BFD_PLUGIN)) == 0)
     h->def_regular = 1;
 
+  /* If a weak undefined symbol has non-default visibility, we also
+     hide it from the dynamic linker.  */
+  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+      && h->root.type == bfd_link_hash_undefweak)
+    (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
+
+  /* A hidden versioned symbol in executable should be forced local if
+     it is is locally defined, not referenced by shared library and not
+     exported.  */
+  else if (bfd_link_executable (eif->info)
+	   && h->versioned == versioned_hidden
+	   && !eif->info->export_dynamic
+	   && !h->dynamic
+	   && !h->ref_dynamic
+	   && h->def_regular)
+    (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
+
   /* If -Bsymbolic was used (which means to bind references to global
      symbols to the definition within the shared object), and this
      symbol was defined in a regular object, then it actually doesn't
      need a PLT entry.  Likewise, if the symbol has non-default
      visibility.  If the symbol has hidden or internal visibility, we
      will force it local.  */
-  if (h->needs_plt
-      && eif->info->shared
-      && is_elf_hash_table (eif->info->hash)
-      && (SYMBOLIC_BIND (eif->info, h)
-	  || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-      && h->def_regular)
+  else if (h->needs_plt
+	   && bfd_link_pic (eif->info)
+	   && is_elf_hash_table (eif->info->hash)
+	   && (SYMBOLIC_BIND (eif->info, h)
+	       || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+	   && h->def_regular)
     {
       bfd_boolean force_local;
 
@@ -2520,12 +2724,6 @@ _bfd_elf_fix_symbol_flags (struct elf_li
       (*bed->elf_backend_hide_symbol) (eif->info, h, force_local);
     }
 
-  /* If a weak undefined symbol has non-default visibility, we also
-     hide it from the dynamic linker.  */
-  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
-      && h->root.type == bfd_link_hash_undefweak)
-    (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
-
   /* If this is a weak defined symbol in a dynamic object, and we know
      the real definition in the dynamic object, copy interesting flags
      over to the real definition.  */
@@ -2654,7 +2852,7 @@ _bfd_elf_adjust_dynamic_symbol (struct e
   if (h->size == 0
       && h->type == STT_NOTYPE
       && !h->needs_plt)
-    (*_bfd_error_handler)
+    _bfd_error_handler
       (_("warning: type and size of dynamic symbol `%s' are not defined"),
        h->root.root.string);
 
@@ -2779,7 +2977,8 @@ _bfd_elf_dynamic_symbol_p (struct elf_li
 
   /* Identify the cases where name binding rules say that a
      visible symbol resolves locally.  */
-  binding_stays_local_p = info->executable || SYMBOLIC_BIND (info, h);
+  binding_stays_local_p = (bfd_link_executable (info)
+			   || SYMBOLIC_BIND (info, h));
 
   switch (ELF_ST_VISIBILITY (h->other))
     {
@@ -2864,7 +3063,7 @@ _bfd_elf_symbol_refs_local_p (struct elf
   /* At this point, we know the symbol is defined and dynamic.  In an
      executable it must resolve locally, likewise when building symbolic
      shared libraries.  */
-  if (info->executable || SYMBOLIC_BIND (info, h))
+  if (bfd_link_executable (info) || SYMBOLIC_BIND (info, h))
     return TRUE;
 
   /* Now deal with defined dynamic symbols in shared libraries.  Ones
@@ -2970,9 +3169,9 @@ static bfd_boolean
 elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef)
 {
   Elf_Internal_Shdr * hdr;
-  bfd_size_type symcount;
-  bfd_size_type extsymcount;
-  bfd_size_type extsymoff;
+  size_t symcount;
+  size_t extsymcount;
+  size_t extsymoff;
   Elf_Internal_Sym *isymbuf;
   Elf_Internal_Sym *isym;
   Elf_Internal_Sym *isymend;
@@ -2982,15 +3181,25 @@ elf_link_is_defined_archive_symbol (bfd 
   if (abfd == NULL)
     return FALSE;
 
-  /* Return FALSE if the object has been claimed by plugin.  */
-  if (abfd->plugin_format == bfd_plugin_yes)
-    return FALSE;
-
   if (! bfd_check_format (abfd, bfd_object))
     return FALSE;
 
-  /* Select the appropriate symbol table.  */
-  if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0)
+  /* Select the appropriate symbol table.  If we don't know if the
+     object file is an IR object, give linker LTO plugin a chance to
+     get the correct symbol table.  */
+  if (abfd->plugin_format == bfd_plugin_yes
+#if BFD_SUPPORTS_PLUGINS
+      || (abfd->plugin_format == bfd_plugin_unknown
+	  && bfd_link_plugin_object_p (abfd))
+#endif
+      )
+    {
+      /* Use the IR symbol table if the object has been claimed by
+	 plugin.  */
+      abfd = abfd->plugin_dummy_bfd;
+      hdr = &elf_tdata (abfd)->symtab_hdr;
+    }
+  else if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0)
     hdr = &elf_tdata (abfd)->symtab_hdr;
   else
     hdr = &elf_tdata (abfd)->dynsymtab_hdr;
@@ -3090,14 +3299,14 @@ elf_add_dt_needed_tag (bfd *abfd,
 		       bfd_boolean do_it)
 {
   struct elf_link_hash_table *hash_table;
-  bfd_size_type strindex;
+  size_t strindex;
 
   if (!_bfd_elf_link_create_dynstrtab (abfd, info))
     return -1;
 
   hash_table = elf_hash_table (info);
   strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE);
-  if (strindex == (bfd_size_type) -1)
+  if (strindex == (size_t) -1)
     return -1;
 
   if (_bfd_elf_strtab_refcount (hash_table->dynstr, strindex) != 1)
@@ -3140,12 +3349,26 @@ elf_add_dt_needed_tag (bfd *abfd,
   return 0;
 }
 
-static bfd_boolean
-on_needed_list (const char *soname, struct bfd_link_needed_list *needed)
-{
-  for (; needed != NULL; needed = needed->next)
-    if ((elf_dyn_lib_class (needed->by) & DYN_AS_NEEDED) == 0
-	&& strcmp (soname, needed->name) == 0)
+/* Return true if SONAME is on the needed list between NEEDED and STOP
+   (or the end of list if STOP is NULL), and needed by a library that
+   will be loaded.  */
+
+static bfd_boolean
+on_needed_list (const char *soname,
+		struct bfd_link_needed_list *needed,
+		struct bfd_link_needed_list *stop)
+{
+  struct bfd_link_needed_list *look;
+  for (look = needed; look != stop; look = look->next)
+    if (strcmp (soname, look->name) == 0
+	&& ((elf_dyn_lib_class (look->by) & DYN_AS_NEEDED) == 0
+	    /* If needed by a library that itself is not directly
+	       needed, recursively check whether that library is
+	       indirectly needed.  Since we add DT_NEEDED entries to
+	       the end of the list, library dependencies appear after
+	       the library.  Therefore search prior to the current
+	       LOOK, preventing possible infinite recursion.  */
+	    || on_needed_list (elf_dt_name (look->by), needed, look)))
       return TRUE;
 
   return FALSE;
@@ -3166,7 +3389,7 @@ elf_sort_symbol (const void *arg1, const
     return vdiff > 0 ? 1 : -1;
   else
     {
-      long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
+      int sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
       if (sdiff != 0)
 	return sdiff > 0 ? 1 : -1;
     }
@@ -3251,7 +3474,7 @@ elf_finalize_dynstr (bfd *output_bfd, st
     {
       asection *s;
       bfd_byte *p;
-      bfd_size_type i;
+      size_t i;
       Elf_Internal_Verdef def;
       Elf_Internal_Verdaux defaux;
 
@@ -3283,7 +3506,7 @@ elf_finalize_dynstr (bfd *output_bfd, st
     {
       asection *s;
       bfd_byte *p;
-      bfd_size_type i;
+      size_t i;
       Elf_Internal_Verneed need;
       Elf_Internal_Vernaux needaux;
 
@@ -3351,7 +3574,7 @@ _bfd_elf_relocs_compatible (const bfd_ta
 
 /* Make a special call to the linker "notice" function to tell it that
    we are about to handle an as-needed lib, or have finished
-   processing the lib.  */ 
+   processing the lib.  */
 
 bfd_boolean
 _bfd_elf_notice_as_needed (bfd *ibfd,
@@ -3361,6 +3584,71 @@ _bfd_elf_notice_as_needed (bfd *ibfd,
   return (*info->callbacks->notice) (info, NULL, NULL, ibfd, NULL, act, 0);
 }
 
+/* Check relocations an ELF object file.  */
+
+bfd_boolean
+_bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
+{
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  /* If this object is the same format as the output object, and it is
+     not a shared library, then let the backend look through the
+     relocs.
+
+     This is required to build global offset table entries and to
+     arrange for dynamic relocs.  It is not required for the
+     particular common case of linking non PIC code, even when linking
+     against shared libraries, but unfortunately there is no way of
+     knowing whether an object file has been compiled PIC or not.
+     Looking through the relocs is not particularly time consuming.
+     The problem is that we must either (1) keep the relocs in memory,
+     which causes the linker to require additional runtime memory or
+     (2) read the relocs twice from the input file, which wastes time.
+     This would be a good case for using mmap.
+
+     I have no idea how to handle linking PIC code into a file of a
+     different format.  It probably can't be done.  */
+  if ((abfd->flags & DYNAMIC) == 0
+      && is_elf_hash_table (htab)
+      && bed->check_relocs != NULL
+      && elf_object_id (abfd) == elf_hash_table_id (htab)
+      && (*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec))
+    {
+      asection *o;
+
+      for (o = abfd->sections; o != NULL; o = o->next)
+	{
+	  Elf_Internal_Rela *internal_relocs;
+	  bfd_boolean ok;
+
+	  /* Don't check relocations in excluded sections.  */
+	  if ((o->flags & SEC_RELOC) == 0
+	      || (o->flags & SEC_EXCLUDE) != 0
+	      || o->reloc_count == 0
+	      || ((info->strip == strip_all || info->strip == strip_debugger)
+		  && (o->flags & SEC_DEBUGGING) != 0)
+	      || bfd_is_abs_section (o->output_section))
+	    continue;
+
+	  internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL,
+						       info->keep_memory);
+	  if (internal_relocs == NULL)
+	    return FALSE;
+
+	  ok = (*bed->check_relocs) (abfd, info, o, internal_relocs);
+
+	  if (elf_section_data (o)->relocs != internal_relocs)
+	    free (internal_relocs);
+
+	  if (! ok)
+	    return FALSE;
+	}
+    }
+
+  return TRUE;
+}
+
 /* Add symbols from an ELF object file to the linker hash table.  */
 
 static bfd_boolean
@@ -3368,16 +3656,16 @@ elf_link_add_object_symbols (bfd *abfd, 
 {
   Elf_Internal_Ehdr *ehdr;
   Elf_Internal_Shdr *hdr;
-  bfd_size_type symcount;
-  bfd_size_type extsymcount;
-  bfd_size_type extsymoff;
+  size_t symcount;
+  size_t extsymcount;
+  size_t extsymoff;
   struct elf_link_hash_entry **sym_hash;
   bfd_boolean dynamic;
   Elf_External_Versym *extversym = NULL;
   Elf_External_Versym *ever;
   struct elf_link_hash_entry *weaks;
   struct elf_link_hash_entry **nondeflt_vers = NULL;
-  bfd_size_type nondeflt_vers_cnt = 0;
+  size_t nondeflt_vers_cnt = 0;
   Elf_Internal_Sym *isymbuf = NULL;
   Elf_Internal_Sym *isym;
   Elf_Internal_Sym *isymend;
@@ -3393,8 +3681,7 @@ elf_link_add_object_symbols (bfd *abfd, 
   void *old_ent;
   struct bfd_link_hash_entry *old_undefs = NULL;
   struct bfd_link_hash_entry *old_undefs_tail = NULL;
-  long old_dynsymcount = 0;
-  bfd_size_type old_dynstr_size = 0;
+  void *old_strtab = NULL;
   size_t tabsize = 0;
   asection *s;
   bfd_boolean just_syms;
@@ -3411,11 +3698,11 @@ elf_link_add_object_symbols (bfd *abfd, 
       /* You can't use -r against a dynamic object.  Also, there's no
 	 hope of using a dynamic object which does not exactly match
 	 the format of the output file.  */
-      if (info->relocatable
+      if (bfd_link_relocatable (info)
 	  || !is_elf_hash_table (htab)
 	  || info->output_bfd->xvec != abfd->xvec)
 	{
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    bfd_set_error (bfd_error_invalid_operation);
 	  else
 	    bfd_set_error (bfd_error_wrong_format);
@@ -3431,6 +3718,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 	  || (bed->elf_machine_alt2 != 0
 	      && ehdr->e_machine == bed->elf_machine_alt2)))
     info->callbacks->einfo
+      /* xgettext:c-format */
       (_("%P: alternate ELF machine code found (%d) in %B, expecting %d\n"),
        ehdr->e_machine, abfd, bed->elf_machine_code);
 
@@ -3488,7 +3776,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 		  FALSE, bed->collect, NULL)))
 	    goto error_return;
 
-	  if (!info->relocatable && info->executable)
+	  if (bfd_link_executable (info))
 	    {
 	      /* Clobber the section size so that the warning does
 		 not get copied into the output file.  */
@@ -3510,11 +3798,14 @@ elf_link_add_object_symbols (bfd *abfd, 
       /* If we are creating a shared library, create all the dynamic
 	 sections immediately.  We need to attach them to something,
 	 so we attach them to this BFD, provided it is the right
-	 format and is not from ld --just-symbols.  FIXME: If there
+	 format and is not from ld --just-symbols.  Always create the
+	 dynamic sections for -E/--dynamic-list.  FIXME: If there
 	 are no input BFD's of the same format as the output, we can't
 	 make a shared library.  */
       if (!just_syms
-	  && info->shared
+	  && (bfd_link_pic (info)
+	      || (!bfd_link_relocatable (info)
+		  && (info->export_dynamic || info->dynamic)))
 	  && is_elf_hash_table (htab)
 	  && info->output_bfd->xvec == abfd->xvec
 	  && !htab->dynamic_sections_created)
@@ -3530,6 +3821,7 @@ elf_link_add_object_symbols (bfd *abfd, 
       const char *soname = NULL;
       char *audit = NULL;
       struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
+      const Elf_Internal_Phdr *phdr;
       int ret;
 
       /* ld --just-symbols and dynamic objects don't mix very well.
@@ -3679,6 +3971,21 @@ error_free_dyn:
 	  *pn = rpath;
 	}
 
+      /* If we have a PT_GNU_RELRO program header, mark as read-only
+	 all sections contained fully therein.  This makes relro
+	 shared library sections appear as they will at run-time.  */
+      phdr = elf_tdata (abfd)->phdr + elf_elfheader (abfd)->e_phnum;
+      while (--phdr >= elf_tdata (abfd)->phdr)
+	if (phdr->p_type == PT_GNU_RELRO)
+	  {
+	    for (s = abfd->sections; s != NULL; s = s->next)
+	      if ((s->flags & SEC_ALLOC) != 0
+		  && s->vma >= phdr->p_vaddr
+		  && s->vma + s->size <= phdr->p_vaddr + phdr->p_memsz)
+		s->flags |= SEC_READONLY;
+	    break;
+	  }
+
       /* We do not want to include any of the sections in a dynamic
 	 object in the output file.  We hack by simply clobbering the
 	 list of sections in the BFD.  This could be handled more
@@ -3756,7 +4063,8 @@ error_free_dyn:
 	{
 	  /* We store a pointer to the hash table entry for each
 	     external symbol.  */
-	  amt = extsymcount * sizeof (struct elf_link_hash_entry *);
+	  amt = extsymcount;
+	  amt *= sizeof (struct elf_link_hash_entry *);
 	  sym_hash = (struct elf_link_hash_entry **) bfd_zalloc (abfd, amt);
 	  if (sym_hash == NULL)
 	    goto error_free_sym;
@@ -3835,8 +4143,9 @@ error_free_dyn:
       old_table = htab->root.table.table;
       old_size = htab->root.table.size;
       old_count = htab->root.table.count;
-      old_dynsymcount = htab->dynsymcount;
-      old_dynstr_size = _bfd_elf_strtab_size (htab->dynstr);
+      old_strtab = _bfd_elf_strtab_save (htab->dynstr);
+      if (old_strtab == NULL)
+	goto error_free_vers;
 
       for (i = 0; i < htab->root.table.size; i++)
 	{
@@ -3878,8 +4187,10 @@ error_free_dyn:
       bfd_boolean old_weak;
       bfd_boolean override;
       bfd_boolean common;
+      bfd_boolean discarded;
       unsigned int old_alignment;
       bfd *old_bfd;
+      bfd_boolean matched;
 
       override = FALSE;
 
@@ -3887,6 +4198,7 @@ error_free_dyn:
       sec = NULL;
       value = isym->st_value;
       common = bed->common_definition (isym);
+      discarded = FALSE;
 
       bind = ELF_ST_BIND (isym->st_info);
       switch (bind)
@@ -3937,6 +4249,7 @@ error_free_dyn:
 	      /* Symbols from discarded section are undefined.  We keep
 		 its visibility.  */
 	      sec = bfd_und_section_ptr;
+	      discarded = TRUE;
 	      isym->st_shndx = SHN_UNDEF;
 	    }
 	  else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
@@ -3965,7 +4278,7 @@ error_free_dyn:
 	}
       else if (isym->st_shndx == SHN_COMMON
 	       && ELF_ST_TYPE (isym->st_info) == STT_TLS
-	       && !info->relocatable)
+	       && !bfd_link_relocatable (info))
 	{
 	  asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon");
 
@@ -4014,6 +4327,7 @@ error_free_dyn:
       size_change_ok = FALSE;
       type_change_ok = bed->type_change_ok;
       old_weak = FALSE;
+      matched = FALSE;
       old_alignment = 0;
       old_bfd = NULL;
       new_sec = sec;
@@ -4063,7 +4377,8 @@ error_free_dyn:
 
 		  if (verstr == NULL)
 		    {
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: %s: invalid version %u (max %d)"),
 			 abfd, name, vernum,
 			 elf_tdata (abfd)->cverdefs);
@@ -4099,7 +4414,8 @@ error_free_dyn:
 		    }
 		  if (verstr == NULL)
 		    {
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: %s: invalid needed version %d"),
 			 abfd, name, vernum);
 		      bfd_set_error (bfd_error_bad_value);
@@ -4133,7 +4449,7 @@ error_free_dyn:
 
 	  /* If this symbol has default visibility and the user has
 	     requested we not re-export it, then mark it as hidden.  */
-	  if (definition
+	  if (!bfd_is_und_section (sec)
 	      && !dynamic
 	      && abfd->no_export
 	      && ELF_ST_VISIBILITY (isym->st_other) != STV_INTERNAL)
@@ -4143,13 +4459,16 @@ error_free_dyn:
 	  if (!_bfd_elf_merge_symbol (abfd, info, name, isym, &sec, &value,
 				      sym_hash, &old_bfd, &old_weak,
 				      &old_alignment, &skip, &override,
-				      &type_change_ok, &size_change_ok))
+				      &type_change_ok, &size_change_ok,
+				      &matched))
 	    goto error_free_vers;
 
 	  if (skip)
 	    continue;
 
-	  if (override)
+	  /* Override a definition only if the new symbol matches the
+	     existing one.  */
+	  if (override && matched)
 	    definition = FALSE;
 
 	  h = *sym_hash;
@@ -4168,6 +4487,11 @@ error_free_dyn:
 	      (struct bfd_link_hash_entry **) sym_hash)))
 	goto error_free_vers;
 
+      if ((flags & BSF_GNU_UNIQUE)
+	  && (abfd->flags & DYNAMIC) == 0
+	  && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
+	elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_unique;
+
       h = *sym_hash;
       /* We need to make sure that indirect symbol dynamic flags are
 	 updated.  */
@@ -4176,6 +4500,11 @@ error_free_dyn:
 	     || h->root.type == bfd_link_hash_warning)
 	h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
+      /* Setting the index to -3 tells elf_link_output_extsym that
+	 this symbol is defined in a discarded section.  */
+      if (discarded)
+	h->indx = -3;
+
       *sym_hash = h;
 
       new_weak = (flags & BSF_WEAK) != 0;
@@ -4257,7 +4586,7 @@ error_free_dyn:
 	      /* If the indirect symbol has been forced local, don't
 		 make the real symbol dynamic.  */
 	      if ((h == hi || !hi->forced_local)
-		  && (! info->executable
+		  && (bfd_link_dll (info)
 		      || h->def_dynamic
 		      || h->ref_dynamic))
 		dynsym = TRUE;
@@ -4313,7 +4642,8 @@ error_free_dyn:
 
 	      symbol_align = ffs (h->root.u.def.value) - 1;
 	      if (h->root.u.def.section->owner != NULL
-		  && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+		  && (h->root.u.def.section->owner->flags
+		       & (DYNAMIC | BFD_PLUGIN)) == 0)
 		{
 		  normal_align = h->root.u.def.section->alignment_power;
 		  if (normal_align > symbol_align)
@@ -4339,13 +4669,15 @@ error_free_dyn:
 		{
 		  /* PR binutils/2735 */
 		  if (normal_bfd == NULL)
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("Warning: alignment %u of common symbol `%s' in %B is"
 			 " greater than the alignment (%u) of its section %A"),
 		       common_bfd, h->root.u.def.section,
 		       1 << common_align, name, 1 << normal_align);
 		  else
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("Warning: alignment %u of symbol `%s' in %B"
 			 " is smaller than %u in %B"),
 		       normal_bfd, common_bfd,
@@ -4361,7 +4693,8 @@ error_free_dyn:
 	      if (h->size != 0
 		  && h->size != isym->st_size
 		  && ! size_change_ok)
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("Warning: size of symbol `%s' changed"
 		     " from %lu in %B to %lu in %B"),
 		   old_bfd, abfd,
@@ -4396,7 +4729,8 @@ error_free_dyn:
 	      if (h->type != type)
 		{
 		  if (h->type != STT_NOTYPE && ! type_change_ok)
-		    (*_bfd_error_handler)
+		    /* xgettext:c-format */
+		    _bfd_error_handler
 		      (_("Warning: type of symbol `%s' changed"
 			 " from %d to %d in %B"),
 		       abfd, name, h->type, type);
@@ -4409,7 +4743,9 @@ error_free_dyn:
 	  elf_merge_st_other (abfd, h, isym, sec, definition, dynamic);
 
 	  /* We don't want to make debug symbol dynamic.  */
-	  if (definition && (sec->flags & SEC_DEBUGGING) && !info->relocatable)
+	  if (definition
+	      && (sec->flags & SEC_DEBUGGING)
+	      && !bfd_link_relocatable (info))
 	    dynsym = FALSE;
 
 	  /* Nor should we make plugin symbols dynamic.  */
@@ -4454,7 +4790,7 @@ error_free_dyn:
 		    goto error_free_vers;
 		}
 	    }
-	  else if (dynsym && h->dynindx != -1)
+	  else if (h->dynindx != -1)
 	    /* If the symbol already has a dynamic index, but
 	       visibility says it should not be visible, turn it into
 	       a local symbol.  */
@@ -4467,8 +4803,10 @@ error_free_dyn:
 		break;
 	      }
 
-	  /* Don't add DT_NEEDED for references from the dummy bfd.  */
+	  /* Don't add DT_NEEDED for references from the dummy bfd nor
+	     for unmatched symbol.  */
 	  if (!add_needed
+	      && matched
 	      && definition
 	      && ((dynsym
 		   && h->ref_regular_nonweak
@@ -4476,7 +4814,8 @@ error_free_dyn:
 		       || (old_bfd->flags & BFD_PLUGIN) == 0))
 		  || (h->ref_dynamic_nonweak
 		      && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
-		      && !on_needed_list (elf_dt_name (abfd), htab->needed))))
+		      && !on_needed_list (elf_dt_name (abfd),
+					  htab->needed, NULL))))
 	    {
 	      int ret;
 	      const char *soname = elf_dt_name (abfd);
@@ -4492,7 +4831,8 @@ error_free_dyn:
 	      if (old_bfd != NULL
 		  && (elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: undefined reference to symbol '%s'"),
 		     old_bfd, name);
 		  bfd_set_error (bfd_error_missing_dso);
@@ -4538,7 +4878,9 @@ error_free_dyn:
       memcpy (htab->root.table.table, old_tab, tabsize);
       htab->root.undefs = old_undefs;
       htab->root.undefs_tail = old_undefs_tail;
-      _bfd_elf_strtab_restore_size (htab->dynstr, old_dynstr_size);
+      _bfd_elf_strtab_restore (htab->dynstr, old_strtab);
+      free (old_strtab);
+      old_strtab = NULL;
       for (i = 0; i < htab->root.table.size; i++)
 	{
 	  struct bfd_hash_entry *p;
@@ -4551,9 +4893,6 @@ error_free_dyn:
 	      h = (struct elf_link_hash_entry *) p;
 	      if (h->root.type == bfd_link_hash_warning)
 		h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	      if (h->dynindx >= old_dynsymcount
-		  && h->dynstr_index < old_dynstr_size)
-		_bfd_elf_strtab_delref (htab->dynstr, h->dynstr_index);
 
 	      /* Preserve the maximum alignment and size for common
 		 symbols even if this dynamic lib isn't on DT_NEEDED
@@ -4609,11 +4948,12 @@ error_free_dyn:
       old_tab = NULL;
     }
 
-  /* Now that all the symbols from this input file are created, handle
-     .symver foo, foo@BAR such that any relocs against foo become foo@BAR.  */
-  if (nondeflt_vers != NULL)
+  /* Now that all the symbols from this input file are created, if
+     not performing a relocatable link, handle .symver foo, foo@BAR
+     such that any relocs against foo become foo@BAR.  */
+  if (!bfd_link_relocatable (info) && nondeflt_vers != NULL)
     {
-      bfd_size_type cnt, symidx;
+      size_t cnt, symidx;
 
       for (cnt = 0; cnt < nondeflt_vers_cnt; ++cnt)
 	{
@@ -4684,7 +5024,8 @@ error_free_dyn:
       /* Since we have to search the whole symbol list for each weak
 	 defined symbol, search time for N weak defined symbols will be
 	 O(N^2). Binary search will cut it down to O(NlogN).  */
-      amt = extsymcount * sizeof (struct elf_link_hash_entry *);
+      amt = extsymcount;
+      amt *= sizeof (struct elf_link_hash_entry *);
       sorted_sym_hash = (struct elf_link_hash_entry **) bfd_malloc (amt);
       if (sorted_sym_hash == NULL)
 	goto error_return;
@@ -4741,7 +5082,7 @@ error_free_dyn:
 		i = idx + 1;
 	      else
 		{
-		  long sdiff = slook->id - h->root.u.def.section->id;
+		  int sdiff = slook->id - h->root.u.def.section->id;
 		  if (sdiff < 0)
 		    j = idx;
 		  else if (sdiff > 0)
@@ -4817,57 +5158,9 @@ error_free_dyn:
       && !(*bed->check_directives) (abfd, info))
     return FALSE;
 
-  /* If this object is the same format as the output object, and it is
-     not a shared library, then let the backend look through the
-     relocs.
-
-     This is required to build global offset table entries and to
-     arrange for dynamic relocs.  It is not required for the
-     particular common case of linking non PIC code, even when linking
-     against shared libraries, but unfortunately there is no way of
-     knowing whether an object file has been compiled PIC or not.
-     Looking through the relocs is not particularly time consuming.
-     The problem is that we must either (1) keep the relocs in memory,
-     which causes the linker to require additional runtime memory or
-     (2) read the relocs twice from the input file, which wastes time.
-     This would be a good case for using mmap.
-
-     I have no idea how to handle linking PIC code into a file of a
-     different format.  It probably can't be done.  */
-  if (! dynamic
-      && is_elf_hash_table (htab)
-      && bed->check_relocs != NULL
-      && elf_object_id (abfd) == elf_hash_table_id (htab)
-      && (*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec))
-    {
-      asection *o;
-
-      for (o = abfd->sections; o != NULL; o = o->next)
-	{
-	  Elf_Internal_Rela *internal_relocs;
-	  bfd_boolean ok;
-
-	  if ((o->flags & SEC_RELOC) == 0
-	      || o->reloc_count == 0
-	      || ((info->strip == strip_all || info->strip == strip_debugger)
-		  && (o->flags & SEC_DEBUGGING) != 0)
-	      || bfd_is_abs_section (o->output_section))
-	    continue;
-
-	  internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL,
-						       info->keep_memory);
-	  if (internal_relocs == NULL)
-	    goto error_return;
-
-	  ok = (*bed->check_relocs) (abfd, info, o, internal_relocs);
-
-	  if (elf_section_data (o)->relocs != internal_relocs)
-	    free (internal_relocs);
-
-	  if (! ok)
-	    goto error_return;
-	}
-    }
+  if (!info->check_relocs_after_open_input
+      && !_bfd_elf_link_check_relocs (abfd, info))
+    return FALSE;
 
   /* If this is a non-traditional link, try to optimize the handling
      of the .stab/.stabstr sections.  */
@@ -4922,6 +5215,8 @@ error_free_dyn:
  error_free_vers:
   if (old_tab != NULL)
     free (old_tab);
+  if (old_strtab != NULL)
+    free (old_strtab);
   if (nondeflt_vers != NULL)
     free (nondeflt_vers);
   if (extversym != NULL)
@@ -5103,7 +5398,7 @@ elf_link_add_archive_symbols (bfd *abfd,
 
 	  if (!(*info->callbacks
 		->add_archive_element) (info, element, symdef->name, &element))
-	    goto error_return;
+	    continue;
 	  if (!bfd_link_add_symbols (element, info))
 	    goto error_return;
 
@@ -5178,7 +5473,6 @@ elf_collect_hash_codes (struct elf_link_
 {
   struct hash_codes_info *inf = (struct hash_codes_info *) data;
   const char *name;
-  char *p;
   unsigned long ha;
   char *alc = NULL;
 
@@ -5187,18 +5481,21 @@ elf_collect_hash_codes (struct elf_link_
     return TRUE;
 
   name = h->root.root.string;
-  p = strchr (name, ELF_VER_CHR);
-  if (p != NULL)
+  if (h->versioned >= versioned)
     {
-      alc = (char *) bfd_malloc (p - name + 1);
-      if (alc == NULL)
+      char *p = strchr (name, ELF_VER_CHR);
+      if (p != NULL)
 	{
-	  inf->error = TRUE;
-	  return FALSE;
+	  alc = (char *) bfd_malloc (p - name + 1);
+	  if (alc == NULL)
+	    {
+	      inf->error = TRUE;
+	      return FALSE;
+	    }
+	  memcpy (alc, name, p - name);
+	  alc[p - name] = '\0';
+	  name = alc;
 	}
-      memcpy (alc, name, p - name);
-      alc[p - name] = '\0';
-      name = alc;
     }
 
   /* Compute the hash value.  */
@@ -5246,7 +5543,6 @@ elf_collect_gnu_hash_codes (struct elf_l
 {
   struct collect_gnu_hash_codes *s = (struct collect_gnu_hash_codes *) data;
   const char *name;
-  char *p;
   unsigned long ha;
   char *alc = NULL;
 
@@ -5259,18 +5555,21 @@ elf_collect_gnu_hash_codes (struct elf_l
     return TRUE;
 
   name = h->root.root.string;
-  p = strchr (name, ELF_VER_CHR);
-  if (p != NULL)
+  if (h->versioned >= versioned)
     {
-      alc = (char *) bfd_malloc (p - name + 1);
-      if (alc == NULL)
+      char *p = strchr (name, ELF_VER_CHR);
+      if (p != NULL)
 	{
-	  s->error = TRUE;
-	  return FALSE;
+	  alc = (char *) bfd_malloc (p - name + 1);
+	  if (alc == NULL)
+	    {
+	      s->error = TRUE;
+	      return FALSE;
+	    }
+	  memcpy (alc, name, p - name);
+	  alc[p - name] = '\0';
+	  name = alc;
 	}
-      memcpy (alc, name, p - name);
-      alc[p - name] = '\0';
-      name = alc;
     }
 
   /* Compute the hash value.  */
@@ -5537,11 +5836,13 @@ bfd_elf_stack_segment_size (bfd *output_
       /* The symbol has no type if specified on the command line.  */
       h->type = STT_OBJECT;
       if (info->stacksize)
-	(*_bfd_error_handler) (_("%B: stack size specified and %s set"),
-			       output_bfd, legacy_symbol);
+	/* xgettext:c-format */
+	_bfd_error_handler (_("%B: stack size specified and %s set"),
+			    output_bfd, legacy_symbol);
       else if (h->root.u.def.section != bfd_abs_section_ptr)
-	(*_bfd_error_handler) (_("%B: %s not absolute"),
-			       output_bfd, legacy_symbol);
+	/* xgettext:c-format */
+	_bfd_error_handler (_("%B: %s not absolute"),
+			    output_bfd, legacy_symbol);
       else
 	info->stacksize = h->root.u.def.value;
     }
@@ -5572,6 +5873,38 @@ bfd_elf_stack_segment_size (bfd *output_
   return TRUE;
 }
 
+/* Sweep symbols in swept sections.  Called via elf_link_hash_traverse.  */
+
+struct elf_gc_sweep_symbol_info
+{
+  struct bfd_link_info *info;
+  void (*hide_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *,
+		       bfd_boolean);
+};
+
+static bfd_boolean
+elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
+{
+  if (!h->mark
+      && (((h->root.type == bfd_link_hash_defined
+	    || h->root.type == bfd_link_hash_defweak)
+	   && !((h->def_regular || ELF_COMMON_DEF_P (h))
+		&& h->root.u.def.section->gc_mark))
+	  || h->root.type == bfd_link_hash_undefined
+	  || h->root.type == bfd_link_hash_undefweak))
+    {
+      struct elf_gc_sweep_symbol_info *inf;
+
+      inf = (struct elf_gc_sweep_symbol_info *) data;
+      (*inf->hide_symbol) (inf->info, h, TRUE);
+      h->def_regular = 0;
+      h->ref_regular = 0;
+      h->ref_regular_nonweak = 0;
+    }
+
+  return TRUE;
+}
+
 /* Set up the sizes and contents of the ELF dynamic sections.  This is
    called by the ELF linker emulation before_allocation routine.  We
    must set the sizes of the sections before the linker sets the
@@ -5588,169 +5921,28 @@ bfd_elf_size_dynamic_sections (bfd *outp
 			       struct bfd_link_info *info,
 			       asection **sinterpptr)
 {
-  bfd_size_type soname_indx;
+  size_t soname_indx;
   bfd *dynobj;
   const struct elf_backend_data *bed;
-  struct elf_info_failed asvinfo;
 
   *sinterpptr = NULL;
 
-  soname_indx = (bfd_size_type) -1;
+  soname_indx = (size_t) -1;
 
   if (!is_elf_hash_table (info->hash))
     return TRUE;
 
-  bed = get_elf_backend_data (output_bfd);
-
-  /* Any syms created from now on start with -1 in
-     got.refcount/offset and plt.refcount/offset.  */
-  elf_hash_table (info)->init_got_refcount
-    = elf_hash_table (info)->init_got_offset;
-  elf_hash_table (info)->init_plt_refcount
-    = elf_hash_table (info)->init_plt_offset;
-
-  if (info->relocatable
-      && !_bfd_elf_size_group_sections (info))
-    return FALSE;
-
-  /* The backend may have to create some sections regardless of whether
-     we're dynamic or not.  */
-  if (bed->elf_backend_always_size_sections
-      && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
-    return FALSE;
-
-  /* Determine any GNU_STACK segment requirements, after the backend
-     has had a chance to set a default segment size.  */
-  if (info->execstack)
-    elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
-  else if (info->noexecstack)
-    elf_stack_flags (output_bfd) = PF_R | PF_W;
-  else
-    {
-      bfd *inputobj;
-      asection *notesec = NULL;
-      int exec = 0;
-
-      for (inputobj = info->input_bfds;
-	   inputobj;
-	   inputobj = inputobj->link.next)
-	{
-	  asection *s;
-
-	  if (inputobj->flags
-	      & (DYNAMIC | EXEC_P | BFD_PLUGIN | BFD_LINKER_CREATED))
-	    continue;
-	  s = bfd_get_section_by_name (inputobj, ".note.GNU-stack");
-	  if (s)
-	    {
-	      if (s->flags & SEC_CODE)
-		exec = PF_X;
-	      notesec = s;
-	    }
-	  else if (bed->default_execstack)
-	    exec = PF_X;
-	}
-      if (notesec || info->stacksize > 0)
-	elf_stack_flags (output_bfd) = PF_R | PF_W | exec;
-      if (notesec && exec && info->relocatable
-	  && notesec->output_section != bfd_abs_section_ptr)
-	notesec->output_section->flags |= SEC_CODE;
-    }
-
   dynobj = elf_hash_table (info)->dynobj;
 
   if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
     {
-      struct elf_info_failed eif;
-      struct elf_link_hash_entry *h;
-      asection *dynstr;
+      struct bfd_elf_version_tree *verdefs;
+      struct elf_info_failed asvinfo;
       struct bfd_elf_version_tree *t;
       struct bfd_elf_version_expr *d;
-      asection *s;
+      struct elf_info_failed eif;
       bfd_boolean all_defined;
-
-      *sinterpptr = bfd_get_linker_section (dynobj, ".interp");
-      BFD_ASSERT (*sinterpptr != NULL || !info->executable);
-
-      if (soname != NULL)
-	{
-	  soname_indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
-					     soname, TRUE);
-	  if (soname_indx == (bfd_size_type) -1
-	      || !_bfd_elf_add_dynamic_entry (info, DT_SONAME, soname_indx))
-	    return FALSE;
-	}
-
-      if (info->symbolic)
-	{
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_SYMBOLIC, 0))
-	    return FALSE;
-	  info->flags |= DF_SYMBOLIC;
-	}
-
-      if (rpath != NULL)
-	{
-	  bfd_size_type indx;
-	  bfd_vma tag;
-
-	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
-				      TRUE);
-	  if (indx == (bfd_size_type) -1)
-	    return FALSE;
-
-	  tag = info->new_dtags ? DT_RUNPATH : DT_RPATH;
-	  if (!_bfd_elf_add_dynamic_entry (info, tag, indx))
-	    return FALSE;
-	}
-
-      if (filter_shlib != NULL)
-	{
-	  bfd_size_type indx;
-
-	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
-				      filter_shlib, TRUE);
-	  if (indx == (bfd_size_type) -1
-	      || !_bfd_elf_add_dynamic_entry (info, DT_FILTER, indx))
-	    return FALSE;
-	}
-
-      if (auxiliary_filters != NULL)
-	{
-	  const char * const *p;
-
-	  for (p = auxiliary_filters; *p != NULL; p++)
-	    {
-	      bfd_size_type indx;
-
-	      indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
-					  *p, TRUE);
-	      if (indx == (bfd_size_type) -1
-		  || !_bfd_elf_add_dynamic_entry (info, DT_AUXILIARY, indx))
-		return FALSE;
-	    }
-	}
-
-      if (audit != NULL)
-	{
-	  bfd_size_type indx;
-
-	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, audit,
-				      TRUE);
-	  if (indx == (bfd_size_type) -1
-	      || !_bfd_elf_add_dynamic_entry (info, DT_AUDIT, indx))
-	    return FALSE;
-	}
-
-      if (depaudit != NULL)
-	{
-	  bfd_size_type indx;
-
-	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, depaudit,
-				      TRUE);
-	  if (indx == (bfd_size_type) -1
-	      || !_bfd_elf_add_dynamic_entry (info, DT_DEPAUDIT, indx))
-	    return FALSE;
-	}
+      asection *s;
 
       eif.info = info;
       eif.failed = FALSE;
@@ -5758,7 +5950,7 @@ bfd_elf_size_dynamic_sections (bfd *outp
       /* If we are supposed to export all symbols into the dynamic symbol
 	 table (this is not the normal case), then do so.  */
       if (info->export_dynamic
-	  || (info->executable && info->dynamic))
+	  || (bfd_link_executable (info) && info->dynamic))
 	{
 	  elf_link_hash_traverse (elf_hash_table (info),
 				  _bfd_elf_export_symbol,
@@ -5837,7 +6029,7 @@ bfd_elf_size_dynamic_sections (bfd *outp
 	    for (d = t->globals.list; d != NULL; d = d->next)
 	      if (d->literal && !d->symver && !d->script)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("%s: undefined version: %s"),
 		     d->pattern, t->name);
 		  all_defined = FALSE;
@@ -5850,157 +6042,33 @@ bfd_elf_size_dynamic_sections (bfd *outp
 	    }
 	}
 
-      /* Find all symbols which were defined in a dynamic object and make
-	 the backend pick a reasonable value for them.  */
-      elf_link_hash_traverse (elf_hash_table (info),
-			      _bfd_elf_adjust_dynamic_symbol,
-			      &eif);
-      if (eif.failed)
-	return FALSE;
+      /* Set up the version definition section.  */
+      s = bfd_get_linker_section (dynobj, ".gnu.version_d");
+      BFD_ASSERT (s != NULL);
 
-      /* Add some entries to the .dynamic section.  We fill in some of the
-	 values later, in bfd_elf_final_link, but we must add the entries
-	 now so that we know the final size of the .dynamic section.  */
+      /* We may have created additional version definitions if we are
+	 just linking a regular application.  */
+      verdefs = info->version_info;
 
-      /* If there are initialization and/or finalization functions to
-	 call then add the corresponding DT_INIT/DT_FINI entries.  */
-      h = (info->init_function
-	   ? elf_link_hash_lookup (elf_hash_table (info),
-				   info->init_function, FALSE,
-				   FALSE, FALSE)
-	   : NULL);
-      if (h != NULL
-	  && (h->ref_regular
-	      || h->def_regular))
-	{
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_INIT, 0))
-	    return FALSE;
-	}
-      h = (info->fini_function
-	   ? elf_link_hash_lookup (elf_hash_table (info),
-				   info->fini_function, FALSE,
-				   FALSE, FALSE)
-	   : NULL);
-      if (h != NULL
-	  && (h->ref_regular
-	      || h->def_regular))
-	{
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_FINI, 0))
-	    return FALSE;
-	}
+      /* Skip anonymous version tag.  */
+      if (verdefs != NULL && verdefs->vernum == 0)
+	verdefs = verdefs->next;
 
-      s = bfd_get_section_by_name (output_bfd, ".preinit_array");
-      if (s != NULL && s->linker_has_input)
+      if (verdefs == NULL && !info->create_default_symver)
+	s->flags |= SEC_EXCLUDE;
+      else
 	{
-	  /* DT_PREINIT_ARRAY is not allowed in shared library.  */
-	  if (! info->executable)
-	    {
-	      bfd *sub;
-	      asection *o;
-
-	      for (sub = info->input_bfds; sub != NULL;
-		   sub = sub->link.next)
-		if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
-		  for (o = sub->sections; o != NULL; o = o->next)
-		    if (elf_section_data (o)->this_hdr.sh_type
-			== SHT_PREINIT_ARRAY)
-		      {
-			(*_bfd_error_handler)
-			  (_("%B: .preinit_array section is not allowed in DSO"),
-			   sub);
-			break;
-		      }
+	  unsigned int cdefs;
+	  bfd_size_type size;
+	  bfd_byte *p;
+	  Elf_Internal_Verdef def;
+	  Elf_Internal_Verdaux defaux;
+	  struct bfd_link_hash_entry *bh;
+	  struct elf_link_hash_entry *h;
+	  const char *name;
 
-	      bfd_set_error (bfd_error_nonrepresentable_section);
-	      return FALSE;
-	    }
-
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAY, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAYSZ, 0))
-	    return FALSE;
-	}
-      s = bfd_get_section_by_name (output_bfd, ".init_array");
-      if (s != NULL && s->linker_has_input)
-	{
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAY, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAYSZ, 0))
-	    return FALSE;
-	}
-      s = bfd_get_section_by_name (output_bfd, ".fini_array");
-      if (s != NULL && s->linker_has_input)
-	{
-	  if (!_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAY, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAYSZ, 0))
-	    return FALSE;
-	}
-
-      dynstr = bfd_get_linker_section (dynobj, ".dynstr");
-      /* If .dynstr is excluded from the link, we don't want any of
-	 these tags.  Strictly, we should be checking each section
-	 individually;  This quick check covers for the case where
-	 someone does a /DISCARD/ : { *(*) }.  */
-      if (dynstr != NULL && dynstr->output_section != bfd_abs_section_ptr)
-	{
-	  bfd_size_type strsize;
-
-	  strsize = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
-	  if ((info->emit_hash
-	       && !_bfd_elf_add_dynamic_entry (info, DT_HASH, 0))
-	      || (info->emit_gnu_hash
-		  && !_bfd_elf_add_dynamic_entry (info, DT_GNU_HASH, 0))
-	      || !_bfd_elf_add_dynamic_entry (info, DT_STRTAB, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_SYMTAB, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_STRSZ, strsize)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_SYMENT,
-					      bed->s->sizeof_sym))
-	    return FALSE;
-	}
-    }
-
-  /* The backend must work out the sizes of all the other dynamic
-     sections.  */
-  if (dynobj != NULL
-      && bed->elf_backend_size_dynamic_sections != NULL
-      && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
-    return FALSE;
-
-  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
-    return FALSE;
-
-  if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
-    {
-      unsigned long section_sym_count;
-      struct bfd_elf_version_tree *verdefs;
-      asection *s;
-
-      /* Set up the version definition section.  */
-      s = bfd_get_linker_section (dynobj, ".gnu.version_d");
-      BFD_ASSERT (s != NULL);
-
-      /* We may have created additional version definitions if we are
-	 just linking a regular application.  */
-      verdefs = info->version_info;
-
-      /* Skip anonymous version tag.  */
-      if (verdefs != NULL && verdefs->vernum == 0)
-	verdefs = verdefs->next;
-
-      if (verdefs == NULL && !info->create_default_symver)
-	s->flags |= SEC_EXCLUDE;
-      else
-	{
-	  unsigned int cdefs;
-	  bfd_size_type size;
-	  struct bfd_elf_version_tree *t;
-	  bfd_byte *p;
-	  Elf_Internal_Verdef def;
-	  Elf_Internal_Verdaux defaux;
-	  struct bfd_link_hash_entry *bh;
-	  struct elf_link_hash_entry *h;
-	  const char *name;
-
-	  cdefs = 0;
-	  size = 0;
+	  cdefs = 0;
+	  size = 0;
 
 	  /* Make space for the base version.  */
 	  size += sizeof (Elf_External_Verdef);
@@ -6055,7 +6123,7 @@ bfd_elf_size_dynamic_sections (bfd *outp
 			     + sizeof (Elf_External_Verdaux));
 	    }
 
-	  if (soname_indx != (bfd_size_type) -1)
+	  if (soname_indx != (size_t) -1)
 	    {
 	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr,
 				      soname_indx);
@@ -6065,13 +6133,13 @@ bfd_elf_size_dynamic_sections (bfd *outp
 	    }
 	  else
 	    {
-	      bfd_size_type indx;
+	      size_t indx;
 
 	      name = lbasename (output_bfd->filename);
 	      def.vd_hash = bfd_elf_hash (name);
 	      indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
 					  name, FALSE);
-	      if (indx == (bfd_size_type) -1)
+	      if (indx == (size_t) -1)
 		return FALSE;
 	      defaux.vda_name = indx;
 	    }
@@ -6142,76 +6210,474 @@ bfd_elf_size_dynamic_sections (bfd *outp
 	      h->type = STT_OBJECT;
 	      h->verinfo.vertree = t;
 
-	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
-		return FALSE;
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+
+	      def.vd_version = VER_DEF_CURRENT;
+	      def.vd_flags = 0;
+	      if (t->globals.list == NULL
+		  && t->locals.list == NULL
+		  && ! t->used)
+		def.vd_flags |= VER_FLG_WEAK;
+	      def.vd_ndx = t->vernum + (info->create_default_symver ? 2 : 1);
+	      def.vd_cnt = cdeps + 1;
+	      def.vd_hash = bfd_elf_hash (t->name);
+	      def.vd_aux = sizeof (Elf_External_Verdef);
+	      def.vd_next = 0;
+
+	      /* If a basever node is next, it *must* be the last node in
+		 the chain, otherwise Verdef construction breaks.  */
+	      if (t->next != NULL && t->next->vernum == 0)
+		BFD_ASSERT (t->next->next == NULL);
+
+	      if (t->next != NULL && t->next->vernum != 0)
+		def.vd_next = (sizeof (Elf_External_Verdef)
+			       + (cdeps + 1) * sizeof (Elf_External_Verdaux));
+
+	      _bfd_elf_swap_verdef_out (output_bfd, &def,
+					(Elf_External_Verdef *) p);
+	      p += sizeof (Elf_External_Verdef);
+
+	      defaux.vda_name = h->dynstr_index;
+	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr,
+				      h->dynstr_index);
+	      defaux.vda_next = 0;
+	      if (t->deps != NULL)
+		defaux.vda_next = sizeof (Elf_External_Verdaux);
+	      t->name_indx = defaux.vda_name;
+
+	      _bfd_elf_swap_verdaux_out (output_bfd, &defaux,
+					 (Elf_External_Verdaux *) p);
+	      p += sizeof (Elf_External_Verdaux);
+
+	      for (n = t->deps; n != NULL; n = n->next)
+		{
+		  if (n->version_needed == NULL)
+		    {
+		      /* This can happen if there was an error in the
+			 version script.  */
+		      defaux.vda_name = 0;
+		    }
+		  else
+		    {
+		      defaux.vda_name = n->version_needed->name_indx;
+		      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr,
+					      defaux.vda_name);
+		    }
+		  if (n->next == NULL)
+		    defaux.vda_next = 0;
+		  else
+		    defaux.vda_next = sizeof (Elf_External_Verdaux);
+
+		  _bfd_elf_swap_verdaux_out (output_bfd, &defaux,
+					     (Elf_External_Verdaux *) p);
+		  p += sizeof (Elf_External_Verdaux);
+		}
+	    }
+
+	  elf_tdata (output_bfd)->cverdefs = cdefs;
+	}
+
+      /* Work out the size of the version reference section.  */
+
+      s = bfd_get_linker_section (dynobj, ".gnu.version_r");
+      BFD_ASSERT (s != NULL);
+      {
+	struct elf_find_verdep_info sinfo;
+
+	sinfo.info = info;
+	sinfo.vers = elf_tdata (output_bfd)->cverdefs;
+	if (sinfo.vers == 0)
+	  sinfo.vers = 1;
+	sinfo.failed = FALSE;
+
+	elf_link_hash_traverse (elf_hash_table (info),
+				_bfd_elf_link_find_version_dependencies,
+				&sinfo);
+	if (sinfo.failed)
+	  return FALSE;
+
+	if (elf_tdata (output_bfd)->verref == NULL)
+	  s->flags |= SEC_EXCLUDE;
+	else
+	  {
+	    Elf_Internal_Verneed *vn;
+	    unsigned int size;
+	    unsigned int crefs;
+	    bfd_byte *p;
+
+	    /* Build the version dependency section.  */
+	    size = 0;
+	    crefs = 0;
+	    for (vn = elf_tdata (output_bfd)->verref;
+		 vn != NULL;
+		 vn = vn->vn_nextref)
+	      {
+		Elf_Internal_Vernaux *a;
+
+		size += sizeof (Elf_External_Verneed);
+		++crefs;
+		for (a = vn->vn_auxptr; a != NULL; a = a->vna_nextptr)
+		  size += sizeof (Elf_External_Vernaux);
+	      }
+
+	    s->size = size;
+	    s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size);
+	    if (s->contents == NULL)
+	      return FALSE;
+
+	    p = s->contents;
+	    for (vn = elf_tdata (output_bfd)->verref;
+		 vn != NULL;
+		 vn = vn->vn_nextref)
+	      {
+		unsigned int caux;
+		Elf_Internal_Vernaux *a;
+		size_t indx;
+
+		caux = 0;
+		for (a = vn->vn_auxptr; a != NULL; a = a->vna_nextptr)
+		  ++caux;
+
+		vn->vn_version = VER_NEED_CURRENT;
+		vn->vn_cnt = caux;
+		indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
+					    elf_dt_name (vn->vn_bfd) != NULL
+					    ? elf_dt_name (vn->vn_bfd)
+					    : lbasename (vn->vn_bfd->filename),
+					    FALSE);
+		if (indx == (size_t) -1)
+		  return FALSE;
+		vn->vn_file = indx;
+		vn->vn_aux = sizeof (Elf_External_Verneed);
+		if (vn->vn_nextref == NULL)
+		  vn->vn_next = 0;
+		else
+		  vn->vn_next = (sizeof (Elf_External_Verneed)
+				+ caux * sizeof (Elf_External_Vernaux));
+
+		_bfd_elf_swap_verneed_out (output_bfd, vn,
+					   (Elf_External_Verneed *) p);
+		p += sizeof (Elf_External_Verneed);
+
+		for (a = vn->vn_auxptr; a != NULL; a = a->vna_nextptr)
+		  {
+		    a->vna_hash = bfd_elf_hash (a->vna_nodename);
+		    indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
+						a->vna_nodename, FALSE);
+		    if (indx == (size_t) -1)
+		      return FALSE;
+		    a->vna_name = indx;
+		    if (a->vna_nextptr == NULL)
+		      a->vna_next = 0;
+		    else
+		      a->vna_next = sizeof (Elf_External_Vernaux);
+
+		    _bfd_elf_swap_vernaux_out (output_bfd, a,
+					       (Elf_External_Vernaux *) p);
+		    p += sizeof (Elf_External_Vernaux);
+		  }
+	      }
+
+	    elf_tdata (output_bfd)->cverrefs = crefs;
+	  }
+      }
+    }
+
+  bed = get_elf_backend_data (output_bfd);
+
+  if (info->gc_sections && bed->can_gc_sections)
+    {
+      struct elf_gc_sweep_symbol_info sweep_info;
+      unsigned long section_sym_count;
+
+      /* Remove the symbols that were in the swept sections from the
+	 dynamic symbol table.  GCFIXME: Anyone know how to get them
+	 out of the static symbol table as well?  */
+      sweep_info.info = info;
+      sweep_info.hide_symbol = bed->elf_backend_hide_symbol;
+      elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol,
+			      &sweep_info);
+
+      _bfd_elf_link_renumber_dynsyms (output_bfd, info, &section_sym_count);
+    }
+
+  /* Any syms created from now on start with -1 in
+     got.refcount/offset and plt.refcount/offset.  */
+  elf_hash_table (info)->init_got_refcount
+    = elf_hash_table (info)->init_got_offset;
+  elf_hash_table (info)->init_plt_refcount
+    = elf_hash_table (info)->init_plt_offset;
+
+  if (bfd_link_relocatable (info)
+      && !_bfd_elf_size_group_sections (info))
+    return FALSE;
+
+  /* The backend may have to create some sections regardless of whether
+     we're dynamic or not.  */
+  if (bed->elf_backend_always_size_sections
+      && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
+    return FALSE;
+
+  /* Determine any GNU_STACK segment requirements, after the backend
+     has had a chance to set a default segment size.  */
+  if (info->execstack)
+    elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
+  else if (info->noexecstack)
+    elf_stack_flags (output_bfd) = PF_R | PF_W;
+  else
+    {
+      bfd *inputobj;
+      asection *notesec = NULL;
+      int exec = 0;
+
+      for (inputobj = info->input_bfds;
+	   inputobj;
+	   inputobj = inputobj->link.next)
+	{
+	  asection *s;
+
+	  if (inputobj->flags
+	      & (DYNAMIC | EXEC_P | BFD_PLUGIN | BFD_LINKER_CREATED))
+	    continue;
+	  s = bfd_get_section_by_name (inputobj, ".note.GNU-stack");
+	  if (s)
+	    {
+	      if (s->flags & SEC_CODE)
+		exec = PF_X;
+	      notesec = s;
+	    }
+	  else if (bed->default_execstack)
+	    exec = PF_X;
+	}
+      if (notesec || info->stacksize > 0)
+	elf_stack_flags (output_bfd) = PF_R | PF_W | exec;
+      if (notesec && exec && bfd_link_relocatable (info)
+	  && notesec->output_section != bfd_abs_section_ptr)
+	notesec->output_section->flags |= SEC_CODE;
+    }
+
+  if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
+    {
+      struct elf_info_failed eif;
+      struct elf_link_hash_entry *h;
+      asection *dynstr;
+      asection *s;
+
+      *sinterpptr = bfd_get_linker_section (dynobj, ".interp");
+      BFD_ASSERT (*sinterpptr != NULL || !bfd_link_executable (info) || info->nointerp);
+
+      if (soname != NULL)
+	{
+	  soname_indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
+					     soname, TRUE);
+	  if (soname_indx == (size_t) -1
+	      || !_bfd_elf_add_dynamic_entry (info, DT_SONAME, soname_indx))
+	    return FALSE;
+	}
+
+      if (info->symbolic)
+	{
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_SYMBOLIC, 0))
+	    return FALSE;
+	  info->flags |= DF_SYMBOLIC;
+	}
+
+      if (rpath != NULL)
+	{
+	  size_t indx;
+	  bfd_vma tag;
+
+	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
+				      TRUE);
+	  if (indx == (size_t) -1)
+	    return FALSE;
+
+	  tag = info->new_dtags ? DT_RUNPATH : DT_RPATH;
+	  if (!_bfd_elf_add_dynamic_entry (info, tag, indx))
+	    return FALSE;
+	}
+
+      if (filter_shlib != NULL)
+	{
+	  size_t indx;
+
+	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
+				      filter_shlib, TRUE);
+	  if (indx == (size_t) -1
+	      || !_bfd_elf_add_dynamic_entry (info, DT_FILTER, indx))
+	    return FALSE;
+	}
+
+      if (auxiliary_filters != NULL)
+	{
+	  const char * const *p;
+
+	  for (p = auxiliary_filters; *p != NULL; p++)
+	    {
+	      size_t indx;
+
+	      indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
+					  *p, TRUE);
+	      if (indx == (size_t) -1
+		  || !_bfd_elf_add_dynamic_entry (info, DT_AUXILIARY, indx))
+		return FALSE;
+	    }
+	}
+
+      if (audit != NULL)
+	{
+	  size_t indx;
+
+	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, audit,
+				      TRUE);
+	  if (indx == (size_t) -1
+	      || !_bfd_elf_add_dynamic_entry (info, DT_AUDIT, indx))
+	    return FALSE;
+	}
+
+      if (depaudit != NULL)
+	{
+	  size_t indx;
+
+	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, depaudit,
+				      TRUE);
+	  if (indx == (size_t) -1
+	      || !_bfd_elf_add_dynamic_entry (info, DT_DEPAUDIT, indx))
+	    return FALSE;
+	}
+
+      eif.info = info;
+      eif.failed = FALSE;
+
+      /* Find all symbols which were defined in a dynamic object and make
+	 the backend pick a reasonable value for them.  */
+      elf_link_hash_traverse (elf_hash_table (info),
+			      _bfd_elf_adjust_dynamic_symbol,
+			      &eif);
+      if (eif.failed)
+	return FALSE;
+
+      /* Add some entries to the .dynamic section.  We fill in some of the
+	 values later, in bfd_elf_final_link, but we must add the entries
+	 now so that we know the final size of the .dynamic section.  */
+
+      /* If there are initialization and/or finalization functions to
+	 call then add the corresponding DT_INIT/DT_FINI entries.  */
+      h = (info->init_function
+	   ? elf_link_hash_lookup (elf_hash_table (info),
+				   info->init_function, FALSE,
+				   FALSE, FALSE)
+	   : NULL);
+      if (h != NULL
+	  && (h->ref_regular
+	      || h->def_regular))
+	{
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_INIT, 0))
+	    return FALSE;
+	}
+      h = (info->fini_function
+	   ? elf_link_hash_lookup (elf_hash_table (info),
+				   info->fini_function, FALSE,
+				   FALSE, FALSE)
+	   : NULL);
+      if (h != NULL
+	  && (h->ref_regular
+	      || h->def_regular))
+	{
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_FINI, 0))
+	    return FALSE;
+	}
+
+      s = bfd_get_section_by_name (output_bfd, ".preinit_array");
+      if (s != NULL && s->linker_has_input)
+	{
+	  /* DT_PREINIT_ARRAY is not allowed in shared library.  */
+	  if (! bfd_link_executable (info))
+	    {
+	      bfd *sub;
+	      asection *o;
 
-	      def.vd_version = VER_DEF_CURRENT;
-	      def.vd_flags = 0;
-	      if (t->globals.list == NULL
-		  && t->locals.list == NULL
-		  && ! t->used)
-		def.vd_flags |= VER_FLG_WEAK;
-	      def.vd_ndx = t->vernum + (info->create_default_symver ? 2 : 1);
-	      def.vd_cnt = cdeps + 1;
-	      def.vd_hash = bfd_elf_hash (t->name);
-	      def.vd_aux = sizeof (Elf_External_Verdef);
-	      def.vd_next = 0;
+	      for (sub = info->input_bfds; sub != NULL;
+		   sub = sub->link.next)
+		if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
+		  for (o = sub->sections; o != NULL; o = o->next)
+		    if (elf_section_data (o)->this_hdr.sh_type
+			== SHT_PREINIT_ARRAY)
+		      {
+			_bfd_error_handler
+			  (_("%B: .preinit_array section is not allowed in DSO"),
+			   sub);
+			break;
+		      }
 
-	      /* If a basever node is next, it *must* be the last node in
-		 the chain, otherwise Verdef construction breaks.  */
-	      if (t->next != NULL && t->next->vernum == 0)
-		BFD_ASSERT (t->next->next == NULL);
+	      bfd_set_error (bfd_error_nonrepresentable_section);
+	      return FALSE;
+	    }
 
-	      if (t->next != NULL && t->next->vernum != 0)
-		def.vd_next = (sizeof (Elf_External_Verdef)
-			       + (cdeps + 1) * sizeof (Elf_External_Verdaux));
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAY, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAYSZ, 0))
+	    return FALSE;
+	}
+      s = bfd_get_section_by_name (output_bfd, ".init_array");
+      if (s != NULL && s->linker_has_input)
+	{
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAY, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAYSZ, 0))
+	    return FALSE;
+	}
+      s = bfd_get_section_by_name (output_bfd, ".fini_array");
+      if (s != NULL && s->linker_has_input)
+	{
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAY, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAYSZ, 0))
+	    return FALSE;
+	}
 
-	      _bfd_elf_swap_verdef_out (output_bfd, &def,
-					(Elf_External_Verdef *) p);
-	      p += sizeof (Elf_External_Verdef);
+      dynstr = bfd_get_linker_section (dynobj, ".dynstr");
+      /* If .dynstr is excluded from the link, we don't want any of
+	 these tags.  Strictly, we should be checking each section
+	 individually;  This quick check covers for the case where
+	 someone does a /DISCARD/ : { *(*) }.  */
+      if (dynstr != NULL && dynstr->output_section != bfd_abs_section_ptr)
+	{
+	  bfd_size_type strsize;
 
-	      defaux.vda_name = h->dynstr_index;
-	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr,
-				      h->dynstr_index);
-	      defaux.vda_next = 0;
-	      if (t->deps != NULL)
-		defaux.vda_next = sizeof (Elf_External_Verdaux);
-	      t->name_indx = defaux.vda_name;
+	  strsize = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+	  if ((info->emit_hash
+	       && !_bfd_elf_add_dynamic_entry (info, DT_HASH, 0))
+	      || (info->emit_gnu_hash
+		  && !_bfd_elf_add_dynamic_entry (info, DT_GNU_HASH, 0))
+	      || !_bfd_elf_add_dynamic_entry (info, DT_STRTAB, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_SYMTAB, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_STRSZ, strsize)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_SYMENT,
+					      bed->s->sizeof_sym))
+	    return FALSE;
+	}
+    }
 
-	      _bfd_elf_swap_verdaux_out (output_bfd, &defaux,
-					 (Elf_External_Verdaux *) p);
-	      p += sizeof (Elf_External_Verdaux);
+  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
+    return FALSE;
 
-	      for (n = t->deps; n != NULL; n = n->next)
-		{
-		  if (n->version_needed == NULL)
-		    {
-		      /* This can happen if there was an error in the
-			 version script.  */
-		      defaux.vda_name = 0;
-		    }
-		  else
-		    {
-		      defaux.vda_name = n->version_needed->name_indx;
-		      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr,
-					      defaux.vda_name);
-		    }
-		  if (n->next == NULL)
-		    defaux.vda_next = 0;
-		  else
-		    defaux.vda_next = sizeof (Elf_External_Verdaux);
+  /* The backend must work out the sizes of all the other dynamic
+     sections.  */
+  if (dynobj != NULL
+      && bed->elf_backend_size_dynamic_sections != NULL
+      && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
+    return FALSE;
 
-		  _bfd_elf_swap_verdaux_out (output_bfd, &defaux,
-					     (Elf_External_Verdaux *) p);
-		  p += sizeof (Elf_External_Verdaux);
-		}
-	    }
+  if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
+    {
+      unsigned long section_sym_count;
+
+      if (elf_tdata (output_bfd)->cverdefs)
+	{
+	  unsigned int crefs = elf_tdata (output_bfd)->cverdefs;
 
 	  if (!_bfd_elf_add_dynamic_entry (info, DT_VERDEF, 0)
-	      || !_bfd_elf_add_dynamic_entry (info, DT_VERDEFNUM, cdefs))
+	      || !_bfd_elf_add_dynamic_entry (info, DT_VERDEFNUM, crefs))
 	    return FALSE;
-
-	  elf_tdata (output_bfd)->cverdefs = cdefs;
 	}
 
       if ((info->new_dtags && info->flags) || (info->flags & DF_STATIC_TLS))
@@ -6227,7 +6693,7 @@ bfd_elf_size_dynamic_sections (bfd *outp
 
       if (info->flags_1)
 	{
-	  if (info->executable)
+	  if (bfd_link_executable (info))
 	    info->flags_1 &= ~ (DF_1_INITFIRST
 				| DF_1_NODELETE
 				| DF_1_NOOPEN);
@@ -6235,120 +6701,22 @@ bfd_elf_size_dynamic_sections (bfd *outp
 	    return FALSE;
 	}
 
-      /* Work out the size of the version reference section.  */
-
-      s = bfd_get_linker_section (dynobj, ".gnu.version_r");
-      BFD_ASSERT (s != NULL);
-      {
-	struct elf_find_verdep_info sinfo;
-
-	sinfo.info = info;
-	sinfo.vers = elf_tdata (output_bfd)->cverdefs;
-	if (sinfo.vers == 0)
-	  sinfo.vers = 1;
-	sinfo.failed = FALSE;
-
-	elf_link_hash_traverse (elf_hash_table (info),
-				_bfd_elf_link_find_version_dependencies,
-				&sinfo);
-	if (sinfo.failed)
-	  return FALSE;
-
-	if (elf_tdata (output_bfd)->verref == NULL)
-	  s->flags |= SEC_EXCLUDE;
-	else
-	  {
-	    Elf_Internal_Verneed *t;
-	    unsigned int size;
-	    unsigned int crefs;
-	    bfd_byte *p;
-
-	    /* Build the version dependency section.  */
-	    size = 0;
-	    crefs = 0;
-	    for (t = elf_tdata (output_bfd)->verref;
-		 t != NULL;
-		 t = t->vn_nextref)
-	      {
-		Elf_Internal_Vernaux *a;
-
-		size += sizeof (Elf_External_Verneed);
-		++crefs;
-		for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
-		  size += sizeof (Elf_External_Vernaux);
-	      }
-
-	    s->size = size;
-	    s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size);
-	    if (s->contents == NULL)
-	      return FALSE;
-
-	    p = s->contents;
-	    for (t = elf_tdata (output_bfd)->verref;
-		 t != NULL;
-		 t = t->vn_nextref)
-	      {
-		unsigned int caux;
-		Elf_Internal_Vernaux *a;
-		bfd_size_type indx;
-
-		caux = 0;
-		for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
-		  ++caux;
-
-		t->vn_version = VER_NEED_CURRENT;
-		t->vn_cnt = caux;
-		indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
-					    elf_dt_name (t->vn_bfd) != NULL
-					    ? elf_dt_name (t->vn_bfd)
-					    : lbasename (t->vn_bfd->filename),
-					    FALSE);
-		if (indx == (bfd_size_type) -1)
-		  return FALSE;
-		t->vn_file = indx;
-		t->vn_aux = sizeof (Elf_External_Verneed);
-		if (t->vn_nextref == NULL)
-		  t->vn_next = 0;
-		else
-		  t->vn_next = (sizeof (Elf_External_Verneed)
-				+ caux * sizeof (Elf_External_Vernaux));
-
-		_bfd_elf_swap_verneed_out (output_bfd, t,
-					   (Elf_External_Verneed *) p);
-		p += sizeof (Elf_External_Verneed);
-
-		for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
-		  {
-		    a->vna_hash = bfd_elf_hash (a->vna_nodename);
-		    indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
-						a->vna_nodename, FALSE);
-		    if (indx == (bfd_size_type) -1)
-		      return FALSE;
-		    a->vna_name = indx;
-		    if (a->vna_nextptr == NULL)
-		      a->vna_next = 0;
-		    else
-		      a->vna_next = sizeof (Elf_External_Vernaux);
-
-		    _bfd_elf_swap_vernaux_out (output_bfd, a,
-					       (Elf_External_Vernaux *) p);
-		    p += sizeof (Elf_External_Vernaux);
-		  }
-	      }
-
-	    if (!_bfd_elf_add_dynamic_entry (info, DT_VERNEED, 0)
-		|| !_bfd_elf_add_dynamic_entry (info, DT_VERNEEDNUM, crefs))
-	      return FALSE;
+      if (elf_tdata (output_bfd)->cverrefs)
+	{
+	  unsigned int crefs = elf_tdata (output_bfd)->cverrefs;
 
-	    elf_tdata (output_bfd)->cverrefs = crefs;
-	  }
-      }
+	  if (!_bfd_elf_add_dynamic_entry (info, DT_VERNEED, 0)
+	      || !_bfd_elf_add_dynamic_entry (info, DT_VERNEEDNUM, crefs))
+	    return FALSE;
+	}
 
       if ((elf_tdata (output_bfd)->cverrefs == 0
 	   && elf_tdata (output_bfd)->cverdefs == 0)
 	  || _bfd_elf_link_renumber_dynsyms (output_bfd, info,
 					     &section_sym_count) == 0)
 	{
+	  asection *s;
+
 	  s = bfd_get_linker_section (dynobj, ".gnu.version");
 	  s->flags |= SEC_EXCLUDE;
 	}
@@ -6435,8 +6803,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *ou
       /* Work out the size of the symbol version section.  */
       s = bfd_get_linker_section (dynobj, ".gnu.version");
       BFD_ASSERT (s != NULL);
-      if (dynsymcount != 0
-	  && (s->flags & SEC_EXCLUDE) == 0)
+      if ((s->flags & SEC_EXCLUDE) == 0)
 	{
 	  s->size = dynsymcount * sizeof (Elf_External_Versym);
 	  s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size);
@@ -6453,21 +6820,18 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *ou
 	 the final symbol table, because until then we do not know the
 	 correct value to give the symbols.  We built the .dynstr
 	 section as we went along in elf_link_add_object_symbols.  */
-      s = bfd_get_linker_section (dynobj, ".dynsym");
+      s = elf_hash_table (info)->dynsym;
       BFD_ASSERT (s != NULL);
       s->size = dynsymcount * bed->s->sizeof_sym;
 
-      if (dynsymcount != 0)
-	{
-	  s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size);
-	  if (s->contents == NULL)
-	    return FALSE;
+      s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size);
+      if (s->contents == NULL)
+	return FALSE;
 
-	  /* The first entry in .dynsym is a dummy symbol.
-	     Clear all the section syms, in case we don't output them all.  */
-	  ++section_sym_count;
-	  memset (s->contents, 0, section_sym_count * bed->s->sizeof_sym);
-	}
+      /* The first entry in .dynsym is a dummy symbol.  Clear all the
+	 section syms, in case we don't output them all.  */
+      ++section_sym_count;
+      memset (s->contents, 0, section_sym_count * bed->s->sizeof_sym);
 
       elf_hash_table (info)->bucketcount = 0;
 
@@ -6721,7 +7085,7 @@ merge_sections_remove_hook (bfd *abfd AT
 /* Finish SHF_MERGE section merging.  */
 
 bfd_boolean
-_bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
+_bfd_elf_merge_sections (bfd *obfd, struct bfd_link_info *info)
 {
   bfd *ibfd;
   asection *sec;
@@ -6730,7 +7094,10 @@ _bfd_elf_merge_sections (bfd *abfd, stru
     return FALSE;
 
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
-    if ((ibfd->flags & DYNAMIC) == 0)
+    if ((ibfd->flags & DYNAMIC) == 0
+	&& bfd_get_flavour (ibfd) == bfd_target_elf_flavour
+	&& (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+	    == get_elf_backend_data (obfd)->s->elfclass))
       for (sec = ibfd->sections; sec != NULL; sec = sec->next)
 	if ((sec->flags & SEC_MERGE) != 0
 	    && !bfd_is_abs_section (sec->output_section))
@@ -6738,7 +7105,7 @@ _bfd_elf_merge_sections (bfd *abfd, stru
 	    struct bfd_elf_section_data *secdata;
 
 	    secdata = elf_section_data (sec);
-	    if (! _bfd_add_merge_section (abfd,
+	    if (! _bfd_add_merge_section (obfd,
 					  &elf_hash_table (info)->merge_info,
 					  sec, &secdata->sec_info))
 	      return FALSE;
@@ -6747,7 +7114,7 @@ _bfd_elf_merge_sections (bfd *abfd, stru
 	  }
 
   if (elf_hash_table (info)->merge_info != NULL)
-    _bfd_merge_sections (abfd, info, elf_hash_table (info)->merge_info,
+    _bfd_merge_sections (obfd, info, elf_hash_table (info)->merge_info,
 			 merge_sections_remove_hook);
   return TRUE;
 }
@@ -6806,7 +7173,8 @@ _bfd_elf_link_hash_copy_indirect (struct
   /* Copy down any references that we may have already seen to the
      symbol which just became indirect.  */
 
-  dir->ref_dynamic |= ind->ref_dynamic;
+  if (dir->versioned != versioned_hidden)
+    dir->ref_dynamic |= ind->ref_dynamic;
   dir->ref_regular |= ind->ref_regular;
   dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
   dir->non_got_ref |= ind->non_got_ref;
@@ -7098,7 +7466,7 @@ struct elf_symbuf_symbol
 struct elf_symbuf_head
 {
   struct elf_symbuf_symbol *ssym;
-  bfd_size_type count;
+  size_t count;
   unsigned int st_shndx;
 };
 
@@ -7132,12 +7500,12 @@ elf_sym_name_compare (const void *arg1, 
 }
 
 static struct elf_symbuf_head *
-elf_create_symbuf (bfd_size_type symcount, Elf_Internal_Sym *isymbuf)
+elf_create_symbuf (size_t symcount, Elf_Internal_Sym *isymbuf)
 {
   Elf_Internal_Sym **ind, **indbufend, **indbuf;
   struct elf_symbuf_symbol *ssym;
   struct elf_symbuf_head *ssymbuf, *ssymhead;
-  bfd_size_type i, shndx_count, total_size;
+  size_t i, shndx_count, total_size;
 
   indbuf = (Elf_Internal_Sym **) bfd_malloc2 (symcount, sizeof (*indbuf));
   if (indbuf == NULL)
@@ -7184,7 +7552,7 @@ elf_create_symbuf (bfd_size_type symcoun
       ssym->st_other = (*ind)->st_other;
       ssymhead->count++;
     }
-  BFD_ASSERT ((bfd_size_type) (ssymhead - ssymbuf) == shndx_count
+  BFD_ASSERT ((size_t) (ssymhead - ssymbuf) == shndx_count
 	      && (((bfd_hostptr_t) ssym - (bfd_hostptr_t) ssymbuf)
 		  == total_size));
 
@@ -7202,12 +7570,12 @@ bfd_elf_match_symbols_in_sections (asect
   bfd *bfd1, *bfd2;
   const struct elf_backend_data *bed1, *bed2;
   Elf_Internal_Shdr *hdr1, *hdr2;
-  bfd_size_type symcount1, symcount2;
+  size_t symcount1, symcount2;
   Elf_Internal_Sym *isymbuf1, *isymbuf2;
   struct elf_symbuf_head *ssymbuf1, *ssymbuf2;
   Elf_Internal_Sym *isym, *isymend;
   struct elf_symbol *symtable1 = NULL, *symtable2 = NULL;
-  bfd_size_type count1, count2, i;
+  size_t count1, count2, i;
   unsigned int shndx1, shndx2;
   bfd_boolean result;
 
@@ -7270,7 +7638,7 @@ bfd_elf_match_symbols_in_sections (asect
   if (ssymbuf1 != NULL && ssymbuf2 != NULL)
     {
       /* Optimized faster version.  */
-      bfd_size_type lo, hi, mid;
+      size_t lo, hi, mid;
       struct elf_symbol *symp;
       struct elf_symbuf_symbol *ssym, *ssymend;
 
@@ -7445,8 +7813,6 @@ struct elf_final_link_info
   bfd *output_bfd;
   /* Symbol string table.  */
   struct elf_strtab_hash *symstrtab;
-  /* .dynsym section.  */
-  asection *dynsym_sec;
   /* .hash section.  */
   asection *hash_sec;
   /* symbol version section (.gnu.version).  */
@@ -7624,10 +7990,15 @@ resolve_symbol (const char *name,
   return FALSE;
 }
 
+/* Looks up NAME in SECTIONS.  If found sets RESULT to NAME's address (in
+   bytes) and returns TRUE, otherwise returns FALSE.  Accepts pseudo-section
+   names like "foo.end" which is the end address of section "foo".  */
+   
 static bfd_boolean
 resolve_section (const char *name,
 		 asection *sections,
-		 bfd_vma *result)
+		 bfd_vma *result,
+		 bfd * abfd)
 {
   asection *curr;
   unsigned int len;
@@ -7640,6 +8011,7 @@ resolve_section (const char *name,
       }
 
   /* Hmm. still haven't found it. try pseudo-section names.  */
+  /* FIXME: This could be coded more efficiently...  */
   for (curr = sections; curr; curr = curr->next)
     {
       len = strlen (curr->name);
@@ -7650,7 +8022,7 @@ resolve_section (const char *name,
 	{
 	  if (strncmp (".end", name + len, 4) == 0)
 	    {
-	      *result = curr->vma + curr->size;
+	      *result = curr->vma + curr->size / bfd_octets_per_byte (abfd);
 	      return TRUE;
 	    }
 
@@ -7664,6 +8036,7 @@ resolve_section (const char *name,
 static void
 undefined_reference (const char *reftype, const char *name)
 {
+  /* xgettext:c-format */
   _bfd_error_handler (_("undefined %s reference in complex symbol: %s"),
 		      reftype, name);
 }
@@ -7710,6 +8083,7 @@ eval_symbol (bfd_vma *result,
 
     case 'S':
       symbol_is_section = TRUE;
+      /* Fall through.  */
     case 's':
       ++sym;
       symlen = strtol (sym, (char **) symp, 10);
@@ -7732,7 +8106,7 @@ eval_symbol (bfd_vma *result,
 
       if (symbol_is_section)
 	{
-	  if (!resolve_section (symbuf, flinfo->output_bfd->sections, result)
+	  if (!resolve_section (symbuf, flinfo->output_bfd->sections, result, input_bfd)
 	      && !resolve_symbol (symbuf, input_bfd, flinfo, result,
 				  isymbuf, locsymcount))
 	    {
@@ -7745,7 +8119,7 @@ eval_symbol (bfd_vma *result,
 	  if (!resolve_symbol (symbuf, input_bfd, flinfo, result,
 			       isymbuf, locsymcount)
 	      && !resolve_section (symbuf, flinfo->output_bfd->sections,
-				   result))
+				   result, input_bfd))
 	    {
 	      undefined_reference ("symbol", symbuf);
 	      return FALSE;
@@ -7969,8 +8343,8 @@ bfd_elf_perform_complex_relocation (bfd 
   else
     shift = (8 * wordsz) - (start + len);
 
-  /* FIXME: octets_per_byte.  */
-  x = get_value (wordsz, chunksz, input_bfd, contents + rel->r_offset);
+  x = get_value (wordsz, chunksz, input_bfd,
+		 contents + rel->r_offset * bfd_octets_per_byte (input_bfd));
 
 #ifdef DEBUG
   printf ("Doing complex reloc: "
@@ -8002,15 +8376,17 @@ bfd_elf_perform_complex_relocation (bfd 
 	  (unsigned long) relocation, (unsigned long) (mask << shift),
 	  (unsigned long) ((relocation & mask) << shift), (unsigned long) x);
 #endif
-  /* FIXME: octets_per_byte.  */
-  put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset);
+  put_value (wordsz, chunksz, input_bfd, x,
+	     contents + rel->r_offset * bfd_octets_per_byte (input_bfd));
   return r;
 }
 
-/* qsort comparison functions sorting external relocs by r_offset.  */
+/* Functions to read r_offset from external (target order) reloc
+   entry.  Faster than bfd_getl32 et al, because we let the compiler
+   know the value is aligned.  */
 
-static int
-cmp_ext32l_r_offset (const void *p, const void *q)
+static bfd_vma
+ext32l_r_offset (const void *p)
 {
   union aligned32
   {
@@ -8018,27 +8394,17 @@ cmp_ext32l_r_offset (const void *p, cons
     unsigned char c[4];
   };
   const union aligned32 *a
-    = (const union aligned32 *) ((const Elf32_External_Rel *) p)->r_offset;
-  const union aligned32 *b
-    = (const union aligned32 *) ((const Elf32_External_Rel *) q)->r_offset;
+    = (const union aligned32 *) &((const Elf32_External_Rel *) p)->r_offset;
 
   uint32_t aval = (  (uint32_t) a->c[0]
 		   | (uint32_t) a->c[1] << 8
 		   | (uint32_t) a->c[2] << 16
 		   | (uint32_t) a->c[3] << 24);
-  uint32_t bval = (  (uint32_t) b->c[0]
-		   | (uint32_t) b->c[1] << 8
-		   | (uint32_t) b->c[2] << 16
-		   | (uint32_t) b->c[3] << 24);
-  if (aval < bval)
-    return -1;
-  else if (aval > bval)
-    return 1;
-  return 0;
+  return aval;
 }
 
-static int
-cmp_ext32b_r_offset (const void *p, const void *q)
+static bfd_vma
+ext32b_r_offset (const void *p)
 {
   union aligned32
   {
@@ -8046,28 +8412,18 @@ cmp_ext32b_r_offset (const void *p, cons
     unsigned char c[4];
   };
   const union aligned32 *a
-    = (const union aligned32 *) ((const Elf32_External_Rel *) p)->r_offset;
-  const union aligned32 *b
-    = (const union aligned32 *) ((const Elf32_External_Rel *) q)->r_offset;
+    = (const union aligned32 *) &((const Elf32_External_Rel *) p)->r_offset;
 
   uint32_t aval = (  (uint32_t) a->c[0] << 24
 		   | (uint32_t) a->c[1] << 16
 		   | (uint32_t) a->c[2] << 8
 		   | (uint32_t) a->c[3]);
-  uint32_t bval = (  (uint32_t) b->c[0] << 24
-		   | (uint32_t) b->c[1] << 16
-		   | (uint32_t) b->c[2] << 8
-		   | (uint32_t) b->c[3]);
-  if (aval < bval)
-    return -1;
-  else if (aval > bval)
-    return 1;
-  return 0;
+  return aval;
 }
 
 #ifdef BFD_HOST_64_BIT
-static int
-cmp_ext64l_r_offset (const void *p, const void *q)
+static bfd_vma
+ext64l_r_offset (const void *p)
 {
   union aligned64
   {
@@ -8075,9 +8431,7 @@ cmp_ext64l_r_offset (const void *p, cons
     unsigned char c[8];
   };
   const union aligned64 *a
-    = (const union aligned64 *) ((const Elf64_External_Rel *) p)->r_offset;
-  const union aligned64 *b
-    = (const union aligned64 *) ((const Elf64_External_Rel *) q)->r_offset;
+    = (const union aligned64 *) &((const Elf64_External_Rel *) p)->r_offset;
 
   uint64_t aval = (  (uint64_t) a->c[0]
 		   | (uint64_t) a->c[1] << 8
@@ -8087,23 +8441,11 @@ cmp_ext64l_r_offset (const void *p, cons
 		   | (uint64_t) a->c[5] << 40
 		   | (uint64_t) a->c[6] << 48
 		   | (uint64_t) a->c[7] << 56);
-  uint64_t bval = (  (uint64_t) b->c[0]
-		   | (uint64_t) b->c[1] << 8
-		   | (uint64_t) b->c[2] << 16
-		   | (uint64_t) b->c[3] << 24
-		   | (uint64_t) b->c[4] << 32
-		   | (uint64_t) b->c[5] << 40
-		   | (uint64_t) b->c[6] << 48
-		   | (uint64_t) b->c[7] << 56);
-  if (aval < bval)
-    return -1;
-  else if (aval > bval)
-    return 1;
-  return 0;
+  return aval;
 }
 
-static int
-cmp_ext64b_r_offset (const void *p, const void *q)
+static bfd_vma
+ext64b_r_offset (const void *p)
 {
   union aligned64
   {
@@ -8111,9 +8453,7 @@ cmp_ext64b_r_offset (const void *p, cons
     unsigned char c[8];
   };
   const union aligned64 *a
-    = (const union aligned64 *) ((const Elf64_External_Rel *) p)->r_offset;
-  const union aligned64 *b
-    = (const union aligned64 *) ((const Elf64_External_Rel *) q)->r_offset;
+    = (const union aligned64 *) &((const Elf64_External_Rel *) p)->r_offset;
 
   uint64_t aval = (  (uint64_t) a->c[0] << 56
 		   | (uint64_t) a->c[1] << 48
@@ -8123,19 +8463,7 @@ cmp_ext64b_r_offset (const void *p, cons
 		   | (uint64_t) a->c[5] << 16
 		   | (uint64_t) a->c[6] << 8
 		   | (uint64_t) a->c[7]);
-  uint64_t bval = (  (uint64_t) b->c[0] << 56
-		   | (uint64_t) b->c[1] << 48
-		   | (uint64_t) b->c[2] << 40
-		   | (uint64_t) b->c[3] << 32
-		   | (uint64_t) b->c[4] << 24
-		   | (uint64_t) b->c[5] << 16
-		   | (uint64_t) b->c[6] << 8
-		   | (uint64_t) b->c[7]);
-  if (aval < bval)
-    return -1;
-  else if (aval > bval)
-    return 1;
-  return 0;
+  return aval;
 }
 #endif
 
@@ -8144,8 +8472,9 @@ cmp_ext64b_r_offset (const void *p, cons
    referenced must be updated.  Update all the relocations found in
    RELDATA.  */
 
-static void
+static bfd_boolean
 elf_link_adjust_relocs (bfd *abfd,
+			asection *sec,
 			struct bfd_elf_section_reloc_data *reldata,
 			bfd_boolean sort)
 {
@@ -8204,16 +8533,23 @@ elf_link_adjust_relocs (bfd *abfd,
       (*swap_out) (abfd, irela, erela);
     }
 
-  if (sort)
+  if (bed->elf_backend_update_relocs)
+    (*bed->elf_backend_update_relocs) (sec, reldata);
+
+  if (sort && count != 0)
     {
-      int (*compare) (const void *, const void *);
+      bfd_vma (*ext_r_off) (const void *);
+      bfd_vma r_off;
+      size_t elt_size;
+      bfd_byte *base, *end, *p, *loc;
+      bfd_byte *buf = NULL;
 
       if (bed->s->arch_size == 32)
 	{
 	  if (abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-	    compare = cmp_ext32l_r_offset;
+	    ext_r_off = ext32l_r_offset;
 	  else if (abfd->xvec->header_byteorder == BFD_ENDIAN_BIG)
-	    compare = cmp_ext32b_r_offset;
+	    ext_r_off = ext32b_r_offset;
 	  else
 	    abort ();
 	}
@@ -8221,17 +8557,96 @@ elf_link_adjust_relocs (bfd *abfd,
 	{
 #ifdef BFD_HOST_64_BIT
 	  if (abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-	    compare = cmp_ext64l_r_offset;
+	    ext_r_off = ext64l_r_offset;
 	  else if (abfd->xvec->header_byteorder == BFD_ENDIAN_BIG)
-	    compare = cmp_ext64b_r_offset;
+	    ext_r_off = ext64b_r_offset;
 	  else
 #endif
 	    abort ();
 	}
-      qsort (reldata->hdr->contents, count, reldata->hdr->sh_entsize, compare);
+
+      /*  Must use a stable sort here.  A modified insertion sort,
+	  since the relocs are mostly sorted already.  */
+      elt_size = reldata->hdr->sh_entsize;
+      base = reldata->hdr->contents;
+      end = base + count * elt_size;
+      if (elt_size > sizeof (Elf64_External_Rela))
+	abort ();
+
+      /* Ensure the first element is lowest.  This acts as a sentinel,
+	 speeding the main loop below.  */
+      r_off = (*ext_r_off) (base);
+      for (p = loc = base; (p += elt_size) < end; )
+	{
+	  bfd_vma r_off2 = (*ext_r_off) (p);
+	  if (r_off > r_off2)
+	    {
+	      r_off = r_off2;
+	      loc = p;
+	    }
+	}
+      if (loc != base)
+	{
+	  /* Don't just swap *base and *loc as that changes the order
+	     of the original base[0] and base[1] if they happen to
+	     have the same r_offset.  */
+	  bfd_byte onebuf[sizeof (Elf64_External_Rela)];
+	  memcpy (onebuf, loc, elt_size);
+	  memmove (base + elt_size, base, loc - base);
+	  memcpy (base, onebuf, elt_size);
+	}
+
+      for (p = base + elt_size; (p += elt_size) < end; )
+	{
+	  /* base to p is sorted, *p is next to insert.  */
+	  r_off = (*ext_r_off) (p);
+	  /* Search the sorted region for location to insert.  */
+	  loc = p - elt_size;
+	  while (r_off < (*ext_r_off) (loc))
+	    loc -= elt_size;
+	  loc += elt_size;
+	  if (loc != p)
+	    {
+	      /* Chances are there is a run of relocs to insert here,
+		 from one of more input files.  Files are not always
+		 linked in order due to the way elf_link_input_bfd is
+		 called.  See pr17666.  */
+	      size_t sortlen = p - loc;
+	      bfd_vma r_off2 = (*ext_r_off) (loc);
+	      size_t runlen = elt_size;
+	      size_t buf_size = 96 * 1024;
+	      while (p + runlen < end
+		     && (sortlen <= buf_size
+			 || runlen + elt_size <= buf_size)
+		     && r_off2 > (*ext_r_off) (p + runlen))
+		runlen += elt_size;
+	      if (buf == NULL)
+		{
+		  buf = bfd_malloc (buf_size);
+		  if (buf == NULL)
+		    return FALSE;
+		}
+	      if (runlen < sortlen)
+		{
+		  memcpy (buf, p, runlen);
+		  memmove (loc + runlen, loc, sortlen);
+		  memcpy (loc, buf, runlen);
+		}
+	      else
+		{
+		  memcpy (buf, loc, sortlen);
+		  memmove (loc, p, runlen);
+		  memcpy (loc + runlen, buf, sortlen);
+		}
+	      p += runlen - elt_size;
+	    }
+	}
+      /* Hashes are no longer valid.  */
       free (reldata->hashes);
       reldata->hashes = NULL;
+      free (buf);
     }
+  return TRUE;
 }
 
 struct elf_link_sort_rela
@@ -8303,6 +8718,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
   struct elf_link_sort_rela *sq;
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   int i2e = bed->s->int_rels_per_ext_rel;
+  unsigned int opb = bfd_octets_per_byte (abfd);
   void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
   void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
   struct bfd_link_order *lo;
@@ -8318,7 +8734,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
       bfd_boolean use_rela_initialised = FALSE;
 
       /* This is just here to stop gcc from complaining.
-	 It's initialization checking code is not perfect.  */
+	 Its initialization checking code is not perfect.  */
       use_rela = TRUE;
 
       /* Both sections are present.  Examine the sizes
@@ -8339,8 +8755,9 @@ elf_link_sort_relocs (bfd *abfd, struct 
 		    /* Section size is only divisible by rela.  */
 		    if (use_rela_initialised && (use_rela == FALSE))
 		      {
-			_bfd_error_handler
-			  (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+			_bfd_error_handler (_("%B: Unable to sort relocs - "
+					      "they are in more than one size"),
+					    abfd);
 			bfd_set_error (bfd_error_invalid_operation);
 			return 0;
 		      }
@@ -8356,8 +8773,9 @@ elf_link_sort_relocs (bfd *abfd, struct 
 		/* Section size is only divisible by rel.  */
 		if (use_rela_initialised && (use_rela == TRUE))
 		  {
-		    _bfd_error_handler
-		      (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+		    _bfd_error_handler (_("%B: Unable to sort relocs - "
+					  "they are in more than one size"),
+					abfd);
 		    bfd_set_error (bfd_error_invalid_operation);
 		    return 0;
 		  }
@@ -8369,9 +8787,10 @@ elf_link_sort_relocs (bfd *abfd, struct 
 	      }
 	    else
 	      {
-		/* The section size is not divisible by either - something is wrong.  */
-		_bfd_error_handler
-		  (_("%B: Unable to sort relocs - they are of an unknown size"), abfd);
+		/* The section size is not divisible by either -
+		   something is wrong.  */
+		_bfd_error_handler (_("%B: Unable to sort relocs - "
+				      "they are of an unknown size"), abfd);
 		bfd_set_error (bfd_error_invalid_operation);
 		return 0;
 	      }
@@ -8393,8 +8812,9 @@ elf_link_sort_relocs (bfd *abfd, struct 
 		    /* Section size is only divisible by rela.  */
 		    if (use_rela_initialised && (use_rela == FALSE))
 		      {
-			_bfd_error_handler
-			  (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+			_bfd_error_handler (_("%B: Unable to sort relocs - "
+					      "they are in more than one size"),
+					    abfd);
 			bfd_set_error (bfd_error_invalid_operation);
 			return 0;
 		      }
@@ -8410,8 +8830,9 @@ elf_link_sort_relocs (bfd *abfd, struct 
 		/* Section size is only divisible by rel.  */
 		if (use_rela_initialised && (use_rela == TRUE))
 		  {
-		    _bfd_error_handler
-		      (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+		    _bfd_error_handler (_("%B: Unable to sort relocs - "
+					  "they are in more than one size"),
+					abfd);
 		    bfd_set_error (bfd_error_invalid_operation);
 		    return 0;
 		  }
@@ -8423,9 +8844,10 @@ elf_link_sort_relocs (bfd *abfd, struct 
 	      }
 	    else
 	      {
-		/* The section size is not divisible by either - something is wrong.  */
-		_bfd_error_handler
-		  (_("%B: Unable to sort relocs - they are of an unknown size"), abfd);
+		/* The section size is not divisible by either -
+		   something is wrong.  */
+		_bfd_error_handler (_("%B: Unable to sort relocs - "
+				      "they are of an unknown size"), abfd);
 		bfd_set_error (bfd_error_invalid_operation);
 		return 0;
 	      }
@@ -8501,8 +8923,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
 	  }
 	erel = o->contents;
 	erelend = o->contents + o->size;
-	/* FIXME: octets_per_byte.  */
-	p = sort + o->output_offset / ext_size * sort_elt;
+	p = sort + o->output_offset * opb / ext_size * sort_elt;
 
 	while (erel < erelend)
 	  {
@@ -8538,6 +8959,35 @@ elf_link_sort_relocs (bfd *abfd, struct 
 
   qsort (s_non_relative, count - ret, sort_elt, elf_link_sort_cmp2);
 
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+  if (htab->srelplt && htab->srelplt->output_section == dynamic_relocs)
+    {
+      /* We have plt relocs in .rela.dyn.  */
+      sq = (struct elf_link_sort_rela *) sort;
+      for (i = 0; i < count; i++)
+	if (sq[count - i - 1].type != reloc_class_plt)
+	  break;
+      if (i != 0 && htab->srelplt->size == i * ext_size)
+	{
+	  struct bfd_link_order **plo;
+	  /* Put srelplt link_order last.  This is so the output_offset
+	     set in the next loop is correct for DT_JMPREL.  */
+	  for (plo = &dynamic_relocs->map_head.link_order; *plo != NULL; )
+	    if ((*plo)->type == bfd_indirect_link_order
+		&& (*plo)->u.indirect.section == htab->srelplt)
+	      {
+		lo = *plo;
+		*plo = lo->next;
+	      }
+	    else
+	      plo = &(*plo)->next;
+	  *plo = lo;
+	  lo->next = NULL;
+	  dynamic_relocs->map_tail.link_order = lo;
+	}
+    }
+
+  p = sort;
   for (lo = dynamic_relocs->map_head.link_order; lo != NULL; lo = lo->next)
     if (lo->type == bfd_indirect_link_order)
       {
@@ -8546,8 +8996,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
 
 	erel = o->contents;
 	erelend = o->contents + o->size;
-	/* FIXME: octets_per_byte.  */
-	p = sort + o->output_offset / ext_size * sort_elt;
+	o->output_offset = (p - sort) / sort_elt * ext_size / opb;
 	while (erel < erelend)
 	  {
 	    struct elf_link_sort_rela *s = (struct elf_link_sort_rela *) p;
@@ -8636,7 +9085,8 @@ static bfd_boolean
 elf_link_swap_symbols_out (struct elf_final_link_info *flinfo)
 {
   struct elf_link_hash_table *hash_table = elf_hash_table (flinfo->info);
-  bfd_size_type amt, i;
+  bfd_size_type amt;
+  size_t i;
   const struct elf_backend_data *bed;
   bfd_byte *symbuf;
   Elf_Internal_Shdr *hdr;
@@ -8654,11 +9104,11 @@ elf_link_swap_symbols_out (struct elf_fi
   symbuf = (bfd_byte *) bfd_malloc (amt);
   if (symbuf == NULL)
     return FALSE;
-  
+
   if (flinfo->symshndxbuf)
     {
-      amt = (sizeof (Elf_External_Sym_Shndx)
-	     * (bfd_get_symcount (flinfo->output_bfd)));
+      amt = sizeof (Elf_External_Sym_Shndx);
+      amt *= bfd_get_symcount (flinfo->output_bfd);
       flinfo->symshndxbuf = (Elf_External_Sym_Shndx *) bfd_zmalloc (amt);
       if (flinfo->symshndxbuf == NULL)
 	{
@@ -8714,7 +9164,8 @@ check_dynsym (bfd *abfd, Elf_Internal_Sy
     {
       /* The gABI doesn't support dynamic symbols in output sections
 	 beyond 64k.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: Too many sections: %d (>= %d)"),
 	 abfd, bfd_count_sections (abfd), SHN_LORESERVE & 0xffff);
       bfd_set_error (bfd_error_nonrepresentable_section);
@@ -8753,7 +9204,8 @@ elf_link_check_versioned_symbol (struct 
     case bfd_link_hash_undefined:
     case bfd_link_hash_undefweak:
       abfd = h->root.u.undef.abfd;
-      if ((abfd->flags & DYNAMIC) == 0
+      if (abfd == NULL
+	  || (abfd->flags & DYNAMIC) == 0
 	  || (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
 	return FALSE;
       break;
@@ -8775,9 +9227,9 @@ elf_link_check_versioned_symbol (struct 
     {
       bfd *input;
       Elf_Internal_Shdr *hdr;
-      bfd_size_type symcount;
-      bfd_size_type extsymcount;
-      bfd_size_type extsymoff;
+      size_t symcount;
+      size_t extsymcount;
+      size_t extsymoff;
       Elf_Internal_Shdr *versymhdr;
       Elf_Internal_Sym *isym;
       Elf_Internal_Sym *isymend;
@@ -8879,6 +9331,28 @@ elf_link_check_versioned_symbol (struct 
   return FALSE;
 }
 
+/* Convert ELF common symbol TYPE.  */
+
+static int
+elf_link_convert_common_type (struct bfd_link_info *info, int type)
+{
+  /* Commom symbol can only appear in relocatable link.  */
+  if (!bfd_link_relocatable (info))
+    abort ();
+  switch (info->elf_stt_common)
+    {
+    case unchanged:
+      break;
+    case elf_stt_common:
+      type = STT_COMMON;
+      break;
+    case no_elf_stt_common:
+      type = STT_OBJECT;
+      break;
+    }
+  return type;
+}
+
 /* Add an external symbol to the symbol table.  This is called from
    the hash table traversal routine.  When generating a shared object,
    we go through the symbol table twice.  The first time we output
@@ -8898,6 +9372,7 @@ elf_link_output_extsym (struct bfd_hash_
   const struct elf_backend_data *bed;
   long indx;
   int ret;
+  unsigned int type;
 
   if (h->root.type == bfd_link_hash_warning)
     {
@@ -8940,25 +9415,20 @@ elf_link_output_extsym (struct bfd_hash_
 	  && (!h->ref_regular || flinfo->info->gc_sections)
 	  && !elf_link_check_versioned_symbol (flinfo->info, bed, h)
 	  && flinfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
-	{
-	  if (!(flinfo->info->callbacks->undefined_symbol
-		(flinfo->info, h->root.root.string,
-		 h->ref_regular ? NULL : h->root.u.undef.abfd,
-		 NULL, 0,
-		 (flinfo->info->unresolved_syms_in_shared_libs
-		  == RM_GENERATE_ERROR))))
-	    {
-	      bfd_set_error (bfd_error_bad_value);
-	      eoinfo->failed = TRUE;
-	      return FALSE;
-	    }
-	}
+	(*flinfo->info->callbacks->undefined_symbol)
+	  (flinfo->info, h->root.root.string,
+	   h->ref_regular ? NULL : h->root.u.undef.abfd,
+	   NULL, 0,
+	   flinfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR);
+
+      /* Strip a global symbol defined in a discarded section.  */
+      if (h->indx == -3)
+	return TRUE;
     }
 
   /* We should also warn if a forced local symbol is referenced from
      shared libraries.  */
-  if (!flinfo->info->relocatable
-      && flinfo->info->executable
+  if (bfd_link_executable (flinfo->info)
       && h->forced_local
       && h->ref_dynamic
       && h->def_regular
@@ -8975,16 +9445,19 @@ elf_link_output_extsym (struct bfd_hash_
 	hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
 
       if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL)
+	/* xgettext:c-format */
 	msg = _("%B: internal symbol `%s' in %B is referenced by DSO");
       else if (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
+	/* xgettext:c-format */
 	msg = _("%B: hidden symbol `%s' in %B is referenced by DSO");
       else
+	/* xgettext:c-format */
 	msg = _("%B: local symbol `%s' in %B is referenced by DSO");
       def_bfd = flinfo->output_bfd;
       if (hi->root.u.def.section != bfd_abs_section_ptr)
 	def_bfd = hi->root.u.def.section->owner;
-      (*_bfd_error_handler) (msg, flinfo->output_bfd, def_bfd,
-			     h->root.root.string);
+      _bfd_error_handler (msg, flinfo->output_bfd, def_bfd,
+			  h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
       eoinfo->failed = TRUE;
       return FALSE;
@@ -9023,35 +9496,21 @@ elf_link_output_extsym (struct bfd_hash_
 	   && (h->root.u.undef.abfd->flags & BFD_PLUGIN) != 0)
     strip = TRUE;
 
+  type = h->type;
+
   /* If we're stripping it, and it's not a dynamic symbol, there's
      nothing else to do.   However, if it is a forced local symbol or
      an ifunc symbol we need to give the backend finish_dynamic_symbol
      function a chance to make it dynamic.  */
   if (strip
       && h->dynindx == -1
-      && h->type != STT_GNU_IFUNC
+      && type != STT_GNU_IFUNC
       && !h->forced_local)
     return TRUE;
 
   sym.st_value = 0;
   sym.st_size = h->size;
   sym.st_other = h->other;
-  if (h->forced_local)
-    {
-      sym.st_info = ELF_ST_INFO (STB_LOCAL, h->type);
-      /* Turn off visibility on local symbol.  */
-      sym.st_other &= ~ELF_ST_VISIBILITY (-1);
-    }
-  /* Set STB_GNU_UNIQUE only if symbol is defined in regular object.  */
-  else if (h->unique_global && h->def_regular)
-    sym.st_info = ELF_ST_INFO (STB_GNU_UNIQUE, h->type);
-  else if (h->root.type == bfd_link_hash_undefweak
-	   || h->root.type == bfd_link_hash_defweak)
-    sym.st_info = ELF_ST_INFO (STB_WEAK, h->type);
-  else
-    sym.st_info = ELF_ST_INFO (STB_GLOBAL, h->type);
-  sym.st_target_internal = h->target_internal;
-
   switch (h->root.type)
     {
     default:
@@ -9077,7 +9536,8 @@ elf_link_output_extsym (struct bfd_hash_
 						 input_sec->output_section);
 	    if (sym.st_shndx == SHN_BAD)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: could not find output section %A for input section %A"),
 		   flinfo->output_bfd, input_sec->output_section, input_sec);
 		bfd_set_error (bfd_error_nonrepresentable_section);
@@ -9089,7 +9549,7 @@ elf_link_output_extsym (struct bfd_hash_
 	       but in nonrelocatable files they are virtual
 	       addresses.  */
 	    sym.st_value = h->root.u.def.value + input_sec->output_offset;
-	    if (!flinfo->info->relocatable)
+	    if (!bfd_link_relocatable (flinfo->info))
 	      {
 		sym.st_value += input_sec->output_section->vma;
 		if (h->type == STT_TLS)
@@ -9126,6 +9586,42 @@ elf_link_output_extsym (struct bfd_hash_
       return TRUE;
     }
 
+  if (type == STT_COMMON || type == STT_OBJECT)
+    switch (h->root.type)
+      {
+      case bfd_link_hash_common:
+	type = elf_link_convert_common_type (flinfo->info, type);
+	break;
+      case bfd_link_hash_defined:
+      case bfd_link_hash_defweak:
+	if (bed->common_definition (&sym))
+	  type = elf_link_convert_common_type (flinfo->info, type);
+	else
+	  type = STT_OBJECT;
+	break;
+      case bfd_link_hash_undefined:
+      case bfd_link_hash_undefweak:
+	break;
+      default:
+	abort ();
+      }
+
+  if (h->forced_local)
+    {
+      sym.st_info = ELF_ST_INFO (STB_LOCAL, type);
+      /* Turn off visibility on local symbol.  */
+      sym.st_other &= ~ELF_ST_VISIBILITY (-1);
+    }
+  /* Set STB_GNU_UNIQUE only if symbol is defined in regular object.  */
+  else if (h->unique_global && h->def_regular)
+    sym.st_info = ELF_ST_INFO (STB_GNU_UNIQUE, type);
+  else if (h->root.type == bfd_link_hash_undefweak
+	   || h->root.type == bfd_link_hash_defweak)
+    sym.st_info = ELF_ST_INFO (STB_WEAK, type);
+  else
+    sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
+  sym.st_target_internal = h->target_internal;
+
   /* Give the processor backend a chance to tweak the symbol value,
      and also to finish up anything that needs to be done for this
      symbol.  FIXME: Not calling elf_backend_finish_dynamic_symbol for
@@ -9133,10 +9629,10 @@ elf_link_output_extsym (struct bfd_hash_
      STT_GNU_IFUNC symbol must go through PLT.  */
   if ((h->type == STT_GNU_IFUNC
        && h->def_regular
-       && !flinfo->info->relocatable)
+       && !bfd_link_relocatable (flinfo->info))
       || ((h->dynindx != -1
 	   || h->forced_local)
-	  && ((flinfo->info->shared
+	  && ((bfd_link_pic (flinfo->info)
 	       && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak))
 	      || !h->forced_local)
@@ -9162,7 +9658,7 @@ elf_link_output_extsym (struct bfd_hash_
 	  || ELF_ST_BIND (sym.st_info) == STB_WEAK))
     {
       int bindtype;
-      unsigned int type = ELF_ST_TYPE (sym.st_info);
+      type = ELF_ST_TYPE (sym.st_info);
 
       /* Turn an undefined IFUNC symbol into a normal FUNC symbol. */
       if (type == STT_GNU_IFUNC)
@@ -9186,7 +9682,7 @@ elf_link_output_extsym (struct bfd_hash_
 
   /* If a non-weak symbol with non-default visibility is not defined
      locally, it is a fatal error.  */
-  if (!flinfo->info->relocatable
+  if (!bfd_link_relocatable (flinfo->info)
       && ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
       && ELF_ST_BIND (sym.st_info) != STB_WEAK
       && h->root.type == bfd_link_hash_undefined
@@ -9195,12 +9691,15 @@ elf_link_output_extsym (struct bfd_hash_
       const char *msg;
 
       if (ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED)
+	/* xgettext:c-format */
 	msg = _("%B: protected symbol `%s' isn't defined");
       else if (ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL)
+	/* xgettext:c-format */
 	msg = _("%B: internal symbol `%s' isn't defined");
       else
+	/* xgettext:c-format */
 	msg = _("%B: hidden symbol `%s' isn't defined");
-      (*_bfd_error_handler) (msg, flinfo->output_bfd, h->root.root.string);
+      _bfd_error_handler (msg, flinfo->output_bfd, h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
       eoinfo->failed = TRUE;
       return FALSE;
@@ -9209,7 +9708,7 @@ elf_link_output_extsym (struct bfd_hash_
   /* If this symbol should be put in the .dynsym section, then put it
      there now.  We already know the symbol index.  We also fill in
      the entry in the .hash section.  */
-  if (flinfo->dynsym_sec != NULL
+  if (elf_hash_table (flinfo->info)->dynsym != NULL
       && h->dynindx != -1
       && elf_hash_table (flinfo->info)->dynamic_sections_created)
     {
@@ -9217,14 +9716,19 @@ elf_link_output_extsym (struct bfd_hash_
 
       /* Since there is no version information in the dynamic string,
 	 if there is no version info in symbol version section, we will
-	 have a run-time problem.  */
-      if (h->verinfo.verdef == NULL)
+	 have a run-time problem if not linking executable, referenced
+	 by shared library, or not bound locally.  */
+      if (h->verinfo.verdef == NULL
+	  && (!bfd_link_executable (flinfo->info)
+	      || h->ref_dynamic
+	      || !h->def_regular))
 	{
 	  char *p = strrchr (h->root.root.string, ELF_VER_CHR);
 
 	  if (p && p [1] != '\0')
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: No symbol version section for versioned symbol `%s'"),
 		 flinfo->output_bfd, h->root.root.string);
 	      eoinfo->failed = TRUE;
@@ -9233,7 +9737,8 @@ elf_link_output_extsym (struct bfd_hash_
 	}
 
       sym.st_name = h->dynstr_index;
-      esym = flinfo->dynsym_sec->contents + h->dynindx * bed->s->sizeof_sym;
+      esym = (elf_hash_table (flinfo->info)->dynsym->contents
+	      + h->dynindx * bed->s->sizeof_sym);
       if (!check_dynsym (flinfo->output_bfd, &sym))
 	{
 	  eoinfo->failed = TRUE;
@@ -9288,7 +9793,9 @@ elf_link_output_extsym (struct bfd_hash_
 		iversym.vs_vers++;
 	    }
 
-	  if (h->hidden)
+	  /* Turn on VERSYM_HIDDEN only if the hidden versioned symbol is
+	     defined locally.  */
+	  if (h->versioned == versioned_hidden && h->def_regular)
 	    iversym.vs_vers |= VERSYM_HIDDEN;
 
 	  eversym = (Elf_External_Versym *) flinfo->symver_sec->contents;
@@ -9302,7 +9809,7 @@ elf_link_output_extsym (struct bfd_hash_
      relocatable output or when needed for --emit-relocs.  */
   else if (input_sec == bfd_und_section_ptr
 	   && h->indx != -2
-	   && !flinfo->info->relocatable)
+	   && !bfd_link_relocatable (flinfo->info))
     return TRUE;
   /* Also strip others that we couldn't earlier due to dynamic symbol
      processing.  */
@@ -9603,7 +10110,8 @@ elf_link_input_bfd (struct elf_final_lin
 	   && (bfd_hash_lookup (flinfo->info->keep_hash, name, FALSE, FALSE)
 	       == NULL))
 	  || (((flinfo->info->discard == discard_sec_merge
-		&& (isec->flags & SEC_MERGE) && !flinfo->info->relocatable)
+		&& (isec->flags & SEC_MERGE)
+		&& !bfd_link_relocatable (flinfo->info))
 	       || flinfo->info->discard == discard_l)
 	      && bfd_is_local_label_name (input_bfd, name)))
 	continue;
@@ -9654,7 +10162,7 @@ elf_link_input_bfd (struct elf_final_lin
 	 output_section.  Any special sections must be set up to meet
 	 these requirements.  */
       osym.st_value += isec->output_offset;
-      if (!flinfo->info->relocatable)
+      if (!bfd_link_relocatable (flinfo->info))
 	{
 	  osym.st_value += isec->output_section->vma;
 	  if (ELF_ST_TYPE (osym.st_info) == STT_TLS)
@@ -9698,7 +10206,7 @@ elf_link_input_bfd (struct elf_final_lin
 	  continue;
 	}
 
-      if (flinfo->info->relocatable
+      if (bfd_link_relocatable (flinfo->info)
 	  && (o->flags & (SEC_LINKER_CREATED | SEC_GROUP)) == SEC_GROUP)
 	{
 	  /* Deal with the group signature symbol.  */
@@ -9824,7 +10332,8 @@ elf_link_input_bfd (struct elf_final_lin
 	    {
 	      if (o->size != o->reloc_count * address_size)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("error: %B: size of section %A is not "
 		       "multiple of address size"),
 		     input_bfd, o);
@@ -9871,7 +10380,8 @@ elf_link_input_bfd (struct elf_final_lin
 		      char buffer [32];
 
 		      sprintf_vma (buffer, rel->r_info);
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("error: %B contains a reloc (0x%s) for section %A "
 			   "that references a non-existent global symbol"),
 			 input_bfd, o, buffer);
@@ -9921,7 +10431,7 @@ elf_link_input_bfd (struct elf_final_lin
 		}
 
 	      if ((s_type == STT_RELC || s_type == STT_SRELC)
-		  && !flinfo->info->relocatable)
+		  && !bfd_link_relocatable (flinfo->info))
 		{
 		  bfd_vma val;
 		  bfd_vma dot = (rel->r_offset
@@ -9956,6 +10466,7 @@ elf_link_input_bfd (struct elf_final_lin
 		      BFD_ASSERT (r_symndx != STN_UNDEF);
 		      if (action_discarded & COMPLAIN)
 			(*flinfo->info->callbacks->einfo)
+			  /* xgettext:c-format */
 			  (_("%X`%s' referenced in section `%A' of %B: "
 			     "defined in discarded section `%A' of %B\n"),
 			   sym_name, o, input_bfd, sec, sec->owner);
@@ -10011,7 +10522,7 @@ elf_link_input_bfd (struct elf_final_lin
 	    return FALSE;
 
 	  if (ret == 2
-	      || flinfo->info->relocatable
+	      || bfd_link_relocatable (flinfo->info)
 	      || flinfo->info->emitrelocations)
 	    {
 	      Elf_Internal_Rela *irela;
@@ -10042,7 +10553,7 @@ elf_link_input_bfd (struct elf_final_lin
 	      rel_hash_list = rel_hash;
 	      rela_hash_list = NULL;
 	      last_offset = o->output_offset;
-	      if (!flinfo->info->relocatable)
+	      if (!bfd_link_relocatable (flinfo->info))
 		last_offset += o->output_section->vma;
 	      for (next_erel = 0; irela < irelaend; irela++, next_erel++)
 		{
@@ -10082,7 +10593,7 @@ elf_link_input_bfd (struct elf_final_lin
 		  irela->r_offset += o->output_offset;
 
 		  /* Relocs in an executable have to be virtual addresses.  */
-		  if (!flinfo->info->relocatable)
+		  if (!bfd_link_relocatable (flinfo->info))
 		    irela->r_offset += o->output_section->vma;
 
 		  last_offset = irela->r_offset;
@@ -10210,7 +10721,7 @@ elf_link_input_bfd (struct elf_final_lin
 			    return FALSE;
 
 			  sym.st_value += sec->output_offset;
-			  if (!flinfo->info->relocatable)
+			  if (!bfd_link_relocatable (flinfo->info))
 			    {
 			      sym.st_value += osec->vma;
 			      if (ELF_ST_TYPE (sym.st_info) == STT_TLS)
@@ -10307,11 +10818,13 @@ elf_link_input_bfd (struct elf_final_lin
 	  break;
 	default:
 	  {
-	    /* FIXME: octets_per_byte.  */
 	    if (! (o->flags & SEC_EXCLUDE))
 	      {
 		file_ptr offset = (file_ptr) o->output_offset;
 		bfd_size_type todo = o->size;
+
+		offset *= bfd_octets_per_byte (output_bfd);
+
 		if ((o->flags & SEC_ELF_REVERSE_COPY))
 		  {
 		    /* Reverse-copy input section to output.  */
@@ -10429,9 +10942,8 @@ elf_reloc_link_order (bfd *output_bfd,
 	}
       else
 	{
-	  if (! ((*info->callbacks->unattached_reloc)
-		 (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
-	    return FALSE;
+	  (*info->callbacks->unattached_reloc)
+	    (info, link_order->u.reloc.p->u.name, NULL, NULL, 0);
 	  indx = 0;
 	}
     }
@@ -10466,17 +10978,16 @@ elf_reloc_link_order (bfd *output_bfd,
 					 link_order->u.reloc.p->u.section);
 	  else
 	    sym_name = link_order->u.reloc.p->u.name;
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, NULL, sym_name, howto->name, addend, NULL,
-		  NULL, (bfd_vma) 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*info->callbacks->reloc_overflow) (info, NULL, sym_name,
+					      howto->name, addend, NULL, NULL,
+					      (bfd_vma) 0);
 	  break;
 	}
+
       ok = bfd_set_section_contents (output_bfd, output_section, buf,
-				     link_order->offset, size);
+				     link_order->offset
+				     * bfd_octets_per_byte (output_bfd),
+				     size);
       free (buf);
       if (! ok)
 	return FALSE;
@@ -10486,7 +10997,7 @@ elf_reloc_link_order (bfd *output_bfd,
      relocatable file, and is a virtual address in an executable
      file.  */
   offset = link_order->offset;
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     offset += output_section->vma;
 
   for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
@@ -10544,6 +11055,7 @@ elf_get_linked_section_vma (struct bfd_l
 	= get_elf_backend_data (s->owner);
       if (bed->link_order_error_handler)
 	bed->link_order_error_handler
+	  /* xgettext:c-format */
 	  (_("%B: warning: sh_link not set for section `%A'"), s->owner, s);
       return 0;
     }
@@ -10623,13 +11135,16 @@ elf_fixup_link_order (bfd *abfd, asectio
       if (seen_other && seen_linkorder)
 	{
 	  if (other_sec && linkorder_sec)
-	    (*_bfd_error_handler) (_("%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"),
-				   o, linkorder_sec,
-				   linkorder_sec->owner, other_sec,
-				   other_sec->owner);
+	    _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%A has both ordered [`%A' in %B] "
+		 "and unordered [`%A' in %B] sections"),
+	       o, linkorder_sec,
+	       linkorder_sec->owner, other_sec,
+	       other_sec->owner);
 	  else
-	    (*_bfd_error_handler) (_("%A has both ordered and unordered sections"),
-				   o);
+	    _bfd_error_handler
+	      (_("%A has both ordered and unordered sections"), o);
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
@@ -10658,9 +11173,8 @@ elf_fixup_link_order (bfd *abfd, asectio
     {
       s = sections[n]->u.indirect.section;
       offset &= ~(bfd_vma) 0 << s->alignment_power;
-      s->output_offset = offset;
+      s->output_offset = offset / bfd_octets_per_byte (abfd);
       sections[n]->offset = offset;
-      /* FIXME: octets_per_byte.  */
       offset += sections[n]->size;
     }
 
@@ -10668,6 +11182,108 @@ elf_fixup_link_order (bfd *abfd, asectio
   return TRUE;
 }
 
+/* Generate an import library in INFO->implib_bfd from symbols in ABFD.
+   Returns TRUE upon success, FALSE otherwise.  */
+
+static bfd_boolean
+elf_output_implib (bfd *abfd, struct bfd_link_info *info)
+{
+  bfd_boolean ret = FALSE;
+  bfd *implib_bfd;
+  const struct elf_backend_data *bed;
+  flagword flags;
+  enum bfd_architecture arch;
+  unsigned int mach;
+  asymbol **sympp = NULL;
+  long symsize;
+  long symcount;
+  long src_count;
+  elf_symbol_type *osymbuf;
+
+  implib_bfd = info->out_implib_bfd;
+  bed = get_elf_backend_data (abfd);
+
+  if (!bfd_set_format (implib_bfd, bfd_object))
+    return FALSE;
+
+  flags = bfd_get_file_flags (abfd);
+  flags &= ~HAS_RELOC;
+  if (!bfd_set_start_address (implib_bfd, 0)
+      || !bfd_set_file_flags (implib_bfd, flags))
+    return FALSE;
+
+  /* Copy architecture of output file to import library file.  */
+  arch = bfd_get_arch (abfd);
+  mach = bfd_get_mach (abfd);
+  if (!bfd_set_arch_mach (implib_bfd, arch, mach)
+      && (abfd->target_defaulted
+	  || bfd_get_arch (abfd) != bfd_get_arch (implib_bfd)))
+    return FALSE;
+
+  /* Get symbol table size.  */
+  symsize = bfd_get_symtab_upper_bound (abfd);
+  if (symsize < 0)
+    return FALSE;
+
+  /* Read in the symbol table.  */
+  sympp = (asymbol **) xmalloc (symsize);
+  symcount = bfd_canonicalize_symtab (abfd, sympp);
+  if (symcount < 0)
+    goto free_sym_buf;
+
+  /* Allow the BFD backend to copy any private header data it
+     understands from the output BFD to the import library BFD.  */
+  if (! bfd_copy_private_header_data (abfd, implib_bfd))
+    goto free_sym_buf;
+
+  /* Filter symbols to appear in the import library.  */
+  if (bed->elf_backend_filter_implib_symbols)
+    symcount = bed->elf_backend_filter_implib_symbols (abfd, info, sympp,
+						       symcount);
+  else
+    symcount = _bfd_elf_filter_global_symbols (abfd, info, sympp, symcount);
+  if (symcount == 0)
+    {
+      bfd_set_error (bfd_error_no_symbols);
+      _bfd_error_handler (_("%B: no symbol found for import library"),
+			  implib_bfd);
+      goto free_sym_buf;
+    }
+
+
+  /* Make symbols absolute.  */
+  osymbuf = (elf_symbol_type *) bfd_alloc2 (implib_bfd, symcount,
+					    sizeof (*osymbuf));
+  for (src_count = 0; src_count < symcount; src_count++)
+    {
+      memcpy (&osymbuf[src_count], (elf_symbol_type *) sympp[src_count],
+	      sizeof (*osymbuf));
+      osymbuf[src_count].symbol.section = bfd_abs_section_ptr;
+      osymbuf[src_count].internal_elf_sym.st_shndx = SHN_ABS;
+      osymbuf[src_count].symbol.value += sympp[src_count]->section->vma;
+      osymbuf[src_count].internal_elf_sym.st_value =
+	osymbuf[src_count].symbol.value;
+      sympp[src_count] = &osymbuf[src_count].symbol;
+    }
+
+  bfd_set_symtab (implib_bfd, sympp, symcount);
+
+  /* Allow the BFD backend to copy any private data it understands
+     from the output BFD to the import library BFD.  This is done last
+     to permit the routine to look at the filtered symbol table.  */
+  if (! bfd_copy_private_bfd_data (abfd, implib_bfd))
+    goto free_sym_buf;
+
+  if (!bfd_close (implib_bfd))
+    goto free_sym_buf;
+
+  ret = TRUE;
+
+free_sym_buf:
+  free (sympp);
+  return ret;
+}
+
 static void
 elf_final_link_free (bfd *obfd, struct elf_final_link_info *flinfo)
 {
@@ -10733,17 +11349,18 @@ bfd_elf_final_link (bfd *abfd, struct bf
   asection *attr_section = NULL;
   bfd_vma attr_size = 0;
   const char *std_attrs_section;
+  struct elf_link_hash_table *htab = elf_hash_table (info);
 
-  if (! is_elf_hash_table (info->hash))
+  if (!is_elf_hash_table (htab))
     return FALSE;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     abfd->flags |= DYNAMIC;
 
-  dynamic = elf_hash_table (info)->dynamic_sections_created;
-  dynobj = elf_hash_table (info)->dynobj;
+  dynamic = htab->dynamic_sections_created;
+  dynobj = htab->dynobj;
 
-  emit_relocs = (info->relocatable
+  emit_relocs = (bfd_link_relocatable (info)
 		 || info->emitrelocations);
 
   flinfo.info = info;
@@ -10754,13 +11371,11 @@ bfd_elf_final_link (bfd *abfd, struct bf
 
   if (! dynamic)
     {
-      flinfo.dynsym_sec = NULL;
       flinfo.hash_sec = NULL;
       flinfo.symver_sec = NULL;
     }
   else
     {
-      flinfo.dynsym_sec = bfd_get_linker_section (dynobj, ".dynsym");
       flinfo.hash_sec = bfd_get_linker_section (dynobj, ".hash");
       /* Note that dynsym_sec can be NULL (on VMS).  */
       flinfo.symver_sec = bfd_get_linker_section (dynobj, ".gnu.version");
@@ -10829,6 +11444,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
       for (p = o->map_head.link_order; p != NULL; p = p->next)
 	{
 	  unsigned int reloc_count = 0;
+	  unsigned int additional_reloc_count = 0;
 	  struct bfd_elf_section_data *esdi = NULL;
 
 	  if (p->type == bfd_section_reloc_link_order
@@ -10839,7 +11455,6 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	      asection *sec;
 
 	      sec = p->u.indirect.section;
-	      esdi = elf_section_data (sec);
 
 	      /* Mark all sections which are to be included in the
 		 link.  This will normally be every section.  We need
@@ -10850,29 +11465,18 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	      if (sec->flags & SEC_MERGE)
 		merged = TRUE;
 
-	      if (esdo->this_hdr.sh_type == SHT_REL
-		  || esdo->this_hdr.sh_type == SHT_RELA)
-		/* Some backends use reloc_count in relocation sections
-		   to count particular types of relocs.  Of course,
-		   reloc sections themselves can't have relocations.  */
-		reloc_count = 0;
-	      else if (info->relocatable || info->emitrelocations)
-		reloc_count = sec->reloc_count;
-	      else if (bed->elf_backend_count_relocs)
-		reloc_count = (*bed->elf_backend_count_relocs) (info, sec);
-
 	      if (sec->rawsize > max_contents_size)
 		max_contents_size = sec->rawsize;
 	      if (sec->size > max_contents_size)
 		max_contents_size = sec->size;
 
-	      /* We are interested in just local symbols, not all
-		 symbols.  */
 	      if (bfd_get_flavour (sec->owner) == bfd_target_elf_flavour
 		  && (sec->owner->flags & DYNAMIC) == 0)
 		{
 		  size_t sym_count;
 
+		  /* We are interested in just local symbols, not all
+		     symbols.  */
 		  if (elf_bad_symtab (sec->owner))
 		    sym_count = (elf_tdata (sec->owner)->symtab_hdr.sh_size
 				 / bed->s->sizeof_sym);
@@ -10883,9 +11487,30 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		    max_sym_count = sym_count;
 
 		  if (sym_count > max_sym_shndx_count
-		      && elf_symtab_shndx (sec->owner) != 0)
+		      && elf_symtab_shndx_list (sec->owner) != NULL)
 		    max_sym_shndx_count = sym_count;
 
+		  if (esdo->this_hdr.sh_type == SHT_REL
+		      || esdo->this_hdr.sh_type == SHT_RELA)
+		    /* Some backends use reloc_count in relocation sections
+		       to count particular types of relocs.  Of course,
+		       reloc sections themselves can't have relocations.  */
+		    ;
+		  else if (emit_relocs)
+		    {
+		      reloc_count = sec->reloc_count;
+		      if (bed->elf_backend_count_additional_relocs)
+			{
+			  int c;
+			  c = (*bed->elf_backend_count_additional_relocs) (sec);
+			  additional_reloc_count += c;
+			}
+		    }
+		  else if (bed->elf_backend_count_relocs)
+		    reloc_count = (*bed->elf_backend_count_relocs) (info, sec);
+
+		  esdi = elf_section_data (sec);
+
 		  if ((sec->flags & SEC_RELOC) != 0)
 		    {
 		      size_t ext_size = 0;
@@ -10906,15 +11531,21 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	  if (reloc_count == 0)
 	    continue;
 
+	  reloc_count += additional_reloc_count;
 	  o->reloc_count += reloc_count;
 
-	  if (p->type == bfd_indirect_link_order
-	      && (info->relocatable || info->emitrelocations))
+	  if (p->type == bfd_indirect_link_order && emit_relocs)
 	    {
 	      if (esdi->rel.hdr)
-		esdo->rel.count += NUM_SHDR_ENTRIES (esdi->rel.hdr);
+		{
+		  esdo->rel.count += NUM_SHDR_ENTRIES (esdi->rel.hdr);
+		  esdo->rel.count += additional_reloc_count;
+		}
 	      if (esdi->rela.hdr)
-		esdo->rela.count += NUM_SHDR_ENTRIES (esdi->rela.hdr);
+		{
+		  esdo->rela.count += NUM_SHDR_ENTRIES (esdi->rela.hdr);
+		  esdo->rela.count += additional_reloc_count;
+		}
 	    }
 	  else
 	    {
@@ -10944,9 +11575,8 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	o->vma = 0;
     }
 
-  if (! info->relocatable && merged)
-    elf_link_hash_traverse (elf_hash_table (info),
-			    _bfd_elf_link_sec_merge_syms, abfd);
+  if (! bfd_link_relocatable (info) && merged)
+    elf_link_hash_traverse (htab, _bfd_elf_link_sec_merge_syms, abfd);
 
   /* Figure out the file positions for everything but the symbol table
      and the relocs.  We set symcount to force assign_section_numbers
@@ -11009,11 +11639,10 @@ bfd_elf_final_link (bfd *abfd, struct bf
 
   if (max_sym_count < 20)
     max_sym_count = 20;
-  elf_hash_table (info)->strtabsize = max_sym_count;
+  htab->strtabsize = max_sym_count;
   amt = max_sym_count * sizeof (struct elf_sym_strtab);
-  elf_hash_table (info)->strtab
-    = (struct elf_sym_strtab *) bfd_malloc (amt);
-  if (elf_hash_table (info)->strtab == NULL)
+  htab->strtab = (struct elf_sym_strtab *) bfd_malloc (amt);
+  if (htab->strtab == NULL)
     goto error_return;
   /* The real buffer will be allocated in elf_link_swap_symbols_out.  */
   flinfo.symshndxbuf
@@ -11060,7 +11689,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	    {
 	      o->target_index = bfd_get_symcount (abfd);
 	      elfsym.st_shndx = i;
-	      if (!info->relocatable)
+	      if (!bfd_link_relocatable (info))
 		elfsym.st_value = o->vma;
 	      if (elf_link_output_symstrtab (&flinfo, NULL, &elfsym, o,
 					     NULL) != 1)
@@ -11125,12 +11754,12 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	goto error_return;
     }
 
-  if (elf_hash_table (info)->tls_sec)
+  if (htab->tls_sec)
     {
       bfd_vma base, end = 0;
       asection *sec;
 
-      for (sec = elf_hash_table (info)->tls_sec;
+      for (sec = htab->tls_sec;
 	   sec && (sec->flags & SEC_THREAD_LOCAL);
 	   sec = sec->next)
 	{
@@ -11146,13 +11775,12 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	    }
 	  end = sec->vma + size;
 	}
-      base = elf_hash_table (info)->tls_sec->vma;
+      base = htab->tls_sec->vma;
       /* Only align end of TLS section if static TLS doesn't have special
 	 alignment requirements.  */
       if (bed->static_tls_alignment == 1)
-	end = align_power (end,
-			   elf_hash_table (info)->tls_sec->alignment_power);
-      elf_hash_table (info)->tls_size = end - base;
+	end = align_power (end, htab->tls_sec->alignment_power);
+      htab->tls_size = end - base;
     }
 
   /* Reorder SHF_LINK_ORDER sections.  */
@@ -11221,19 +11849,25 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		    {
 		      const char *iclass, *oclass;
 
-		      if (bed->s->elfclass == ELFCLASS64)
+		      switch (bed->s->elfclass)
 			{
-			  iclass = "ELFCLASS32";
-			  oclass = "ELFCLASS64";
+			case ELFCLASS64: oclass = "ELFCLASS64"; break;
+			case ELFCLASS32: oclass = "ELFCLASS32"; break;
+			case ELFCLASSNONE: oclass = "ELFCLASSNONE"; break;
+			default: abort ();
 			}
-		      else
+
+		      switch (elf_elfheader (sub)->e_ident[EI_CLASS])
 			{
-			  iclass = "ELFCLASS64";
-			  oclass = "ELFCLASS32";
+			case ELFCLASS64: iclass = "ELFCLASS64"; break;
+			case ELFCLASS32: iclass = "ELFCLASS32"; break;
+			case ELFCLASSNONE: iclass = "ELFCLASSNONE"; break;
+			default: abort ();
 			}
 
 		      bfd_set_error (bfd_error_wrong_format);
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: file class %s incompatible with %s"),
 			 sub, iclass, oclass);
 		    }
@@ -11294,15 +11928,18 @@ bfd_elf_final_link (bfd *abfd, struct bf
   symtab_hdr->sh_info = bfd_get_symcount (abfd);
 
   if (dynamic
-      && flinfo.dynsym_sec != NULL
-      && flinfo.dynsym_sec->output_section != bfd_abs_section_ptr)
+      && htab->dynsym != NULL
+      && htab->dynsym->output_section != bfd_abs_section_ptr)
     {
       Elf_Internal_Sym sym;
-      bfd_byte *dynsym = flinfo.dynsym_sec->contents;
-      long last_local = 0;
+      bfd_byte *dynsym = htab->dynsym->contents;
+
+      o = htab->dynsym->output_section;
+      elf_section_data (o)->this_hdr.sh_info = htab->local_dynsymcount + 1;
 
       /* Write out the section symbols for the output sections.  */
-      if (info->shared || elf_hash_table (info)->is_relocatable_executable)
+      if (bfd_link_pic (info)
+	  || htab->is_relocatable_executable)
 	{
 	  asection *s;
 
@@ -11328,17 +11965,15 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		return FALSE;
 	      sym.st_value = s->vma;
 	      dest = dynsym + dynindx * bed->s->sizeof_sym;
-	      if (last_local < dynindx)
-		last_local = dynindx;
 	      bed->s->swap_symbol_out (abfd, &sym, dest, 0);
 	    }
 	}
 
       /* Write out the local dynsyms.  */
-      if (elf_hash_table (info)->dynlocal)
+      if (htab->dynlocal)
 	{
 	  struct elf_link_local_dynamic_entry *e;
-	  for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
+	  for (e = htab->dynlocal; e ; e = e->next)
 	    {
 	      asection *s;
 	      bfd_byte *dest;
@@ -11362,16 +11997,10 @@ bfd_elf_final_link (bfd *abfd, struct bf
 				  + e->isym.st_value);
 		}
 
-	      if (last_local < e->dynindx)
-		last_local = e->dynindx;
-
 	      dest = dynsym + e->dynindx * bed->s->sizeof_sym;
 	      bed->s->swap_symbol_out (abfd, &sym, dest, 0);
 	    }
 	}
-
-      elf_section_data (flinfo.dynsym_sec->output_section)->this_hdr.sh_info =
-	last_local + 1;
     }
 
   /* We get the global symbols from the hash table.  */
@@ -11412,8 +12041,8 @@ bfd_elf_final_link (bfd *abfd, struct bf
       Elf_Internal_Shdr *symstrtab_hdr;
       file_ptr off = symtab_hdr->sh_offset + symtab_hdr->sh_size;
 
-      symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-      if (symtab_shndx_hdr->sh_name != 0)
+      symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
+      if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0)
 	{
 	  symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
 	  symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
@@ -11432,7 +12061,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
       symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
       /* sh_name was set in prep_headers.  */
       symstrtab_hdr->sh_type = SHT_STRTAB;
-      symstrtab_hdr->sh_flags = 0;
+      symstrtab_hdr->sh_flags = bed->elf_strtab_flags;
       symstrtab_hdr->sh_addr = 0;
       symstrtab_hdr->sh_size = _bfd_elf_strtab_size (flinfo.symstrtab);
       symstrtab_hdr->sh_entsize = 0;
@@ -11450,6 +12079,13 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	return FALSE;
     }
 
+  if (info->out_implib_bfd && !elf_output_implib (abfd, info))
+    {
+      _bfd_error_handler (_("%B: failed to generate import library"),
+			  info->out_implib_bfd);
+      return FALSE;
+    }
+
   /* Adjust the relocs to have the correct symbol indices.  */
   for (o = abfd->sections; o != NULL; o = o->next)
     {
@@ -11459,10 +12095,12 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	continue;
 
       sort = bed->sort_relocs_p == NULL || (*bed->sort_relocs_p) (o);
-      if (esdo->rel.hdr != NULL)
-	elf_link_adjust_relocs (abfd, &esdo->rel, sort);
-      if (esdo->rela.hdr != NULL)
-	elf_link_adjust_relocs (abfd, &esdo->rela, sort);
+      if (esdo->rel.hdr != NULL
+	  && !elf_link_adjust_relocs (abfd, o, &esdo->rel, sort))
+	return FALSE;
+      if (esdo->rela.hdr != NULL
+	  && !elf_link_adjust_relocs (abfd, o, &esdo->rela, sort))
+	return FALSE;
 
       /* Set the reloc_count field to 0 to prevent write_relocs from
 	 trying to swap the relocs out itself.  */
@@ -11489,6 +12127,8 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	  Elf_Internal_Dyn dyn;
 	  const char *name;
 	  unsigned int type;
+	  bfd_size_type sh_size;
+	  bfd_vma sh_addr;
 
 	  bed->s->swap_dyn_in (dynobj, dyncon, &dyn);
 
@@ -11520,8 +12160,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	      {
 		struct elf_link_hash_entry *h;
 
-		h = elf_link_hash_lookup (elf_hash_table (info), name,
-					  FALSE, FALSE, TRUE);
+		h = elf_link_hash_lookup (htab, name, FALSE, FALSE, TRUE);
 		if (h != NULL
 		    && (h->root.type == bfd_link_hash_defined
 			|| h->root.type == bfd_link_hash_defweak))
@@ -11544,35 +12183,37 @@ bfd_elf_final_link (bfd *abfd, struct bf
 
 	    case DT_PREINIT_ARRAYSZ:
 	      name = ".preinit_array";
-	      goto get_size;
+	      goto get_out_size;
 	    case DT_INIT_ARRAYSZ:
 	      name = ".init_array";
-	      goto get_size;
+	      goto get_out_size;
 	    case DT_FINI_ARRAYSZ:
 	      name = ".fini_array";
-	    get_size:
+	    get_out_size:
 	      o = bfd_get_section_by_name (abfd, name);
 	      if (o == NULL)
 		{
-		  (*_bfd_error_handler)
-		    (_("%B: could not find output section %s"), abfd, name);
+		  _bfd_error_handler
+		    (_("could not find section %s"), name);
 		  goto error_return;
 		}
 	      if (o->size == 0)
-		(*_bfd_error_handler)
+		_bfd_error_handler
 		  (_("warning: %s section has zero size"), name);
 	      dyn.d_un.d_val = o->size;
 	      break;
 
 	    case DT_PREINIT_ARRAY:
 	      name = ".preinit_array";
-	      goto get_vma;
+	      goto get_out_vma;
 	    case DT_INIT_ARRAY:
 	      name = ".init_array";
-	      goto get_vma;
+	      goto get_out_vma;
 	    case DT_FINI_ARRAY:
 	      name = ".fini_array";
-	      goto get_vma;
+	    get_out_vma:
+	      o = bfd_get_section_by_name (abfd, name);
+	      goto do_vma;
 
 	    case DT_HASH:
 	      name = ".hash";
@@ -11595,21 +12236,22 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	    case DT_VERSYM:
 	      name = ".gnu.version";
 	    get_vma:
-	      o = bfd_get_section_by_name (abfd, name);
+	      o = bfd_get_linker_section (dynobj, name);
+	    do_vma:
 	      if (o == NULL)
 		{
-		  (*_bfd_error_handler)
-		    (_("%B: could not find output section %s"), abfd, name);
+		  _bfd_error_handler
+		    (_("could not find section %s"), name);
 		  goto error_return;
 		}
 	      if (elf_section_data (o->output_section)->this_hdr.sh_type == SHT_NOTE)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("warning: section '%s' is being made into a note"), name);
 		  bfd_set_error (bfd_error_nonrepresentable_section);
 		  goto error_return;
 		}
-	      dyn.d_un.d_ptr = o->vma;
+	      dyn.d_un.d_ptr = o->output_section->vma + o->output_offset;
 	      break;
 
 	    case DT_REL:
@@ -11620,8 +12262,8 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		type = SHT_REL;
 	      else
 		type = SHT_RELA;
-	      dyn.d_un.d_val = 0;
-	      dyn.d_un.d_ptr = 0;
+	      sh_size = 0;
+	      sh_addr = 0;
 	      for (i = 1; i < elf_numsections (abfd); i++)
 		{
 		  Elf_Internal_Shdr *hdr;
@@ -11630,16 +12272,42 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		  if (hdr->sh_type == type
 		      && (hdr->sh_flags & SHF_ALLOC) != 0)
 		    {
-		      if (dyn.d_tag == DT_RELSZ || dyn.d_tag == DT_RELASZ)
-			dyn.d_un.d_val += hdr->sh_size;
-		      else
-			{
-			  if (dyn.d_un.d_ptr == 0
-			      || hdr->sh_addr < dyn.d_un.d_ptr)
-			    dyn.d_un.d_ptr = hdr->sh_addr;
-			}
+		      sh_size += hdr->sh_size;
+		      if (sh_addr == 0
+			  || sh_addr > hdr->sh_addr)
+			sh_addr = hdr->sh_addr;
 		    }
 		}
+
+	      if (bed->dtrel_excludes_plt && htab->srelplt != NULL)
+		{
+		  /* Don't count procedure linkage table relocs in the
+		     overall reloc count.  */
+		  sh_size -= htab->srelplt->size;
+		  if (sh_size == 0)
+		    /* If the size is zero, make the address zero too.
+		       This is to avoid a glibc bug.  If the backend
+		       emits DT_RELA/DT_RELASZ even when DT_RELASZ is
+		       zero, then we'll put DT_RELA at the end of
+		       DT_JMPREL.  glibc will interpret the end of
+		       DT_RELA matching the end of DT_JMPREL as the
+		       case where DT_RELA includes DT_JMPREL, and for
+		       LD_BIND_NOW will decide that processing DT_RELA
+		       will process the PLT relocs too.  Net result:
+		       No PLT relocs applied.  */
+		    sh_addr = 0;
+
+		  /* If .rela.plt is the first .rela section, exclude
+		     it from DT_RELA.  */
+		  else if (sh_addr == (htab->srelplt->output_section->vma
+				       + htab->srelplt->output_offset))
+		    sh_addr += htab->srelplt->size;
+		}
+
+	      if (dyn.d_tag == DT_RELSZ || dyn.d_tag == DT_RELASZ)
+		dyn.d_un.d_val = sh_size;
+	      else
+		dyn.d_un.d_ptr = sh_addr;
 	      break;
 	    }
 	  bed->s->swap_dyn_out (dynobj, &dyn, dyncon);
@@ -11653,7 +12321,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	goto error_return;
 
       /* Check for DT_TEXTREL (late, in case the backend removes it).  */
-      if (((info->warn_shared_textrel && info->shared)
+      if (((info->warn_shared_textrel && bfd_link_pic (info))
 	   || info->error_textrel)
 	  && (o = bfd_get_linker_section (dynobj, ".dynamic")) != NULL)
 	{
@@ -11692,16 +12360,16 @@ bfd_elf_final_link (bfd *abfd, struct bf
 		 created by _bfd_elf_link_create_dynamic_sections.  */
 	      continue;
 	    }
-	  if (elf_hash_table (info)->stab_info.stabstr == o)
+	  if (htab->stab_info.stabstr == o)
 	    continue;
-	  if (elf_hash_table (info)->eh_info.hdr_sec == o)
+	  if (htab->eh_info.hdr_sec == o)
 	    continue;
 	  if (strcmp (o->name, ".dynstr") != 0)
 	    {
-	      /* FIXME: octets_per_byte.  */
 	      if (! bfd_set_section_contents (abfd, o->output_section,
 					      o->contents,
-					      (file_ptr) o->output_offset,
+					      (file_ptr) o->output_offset
+					      * bfd_octets_per_byte (abfd),
 					      o->size))
 		goto error_return;
 	    }
@@ -11713,14 +12381,13 @@ bfd_elf_final_link (bfd *abfd, struct bf
 
 	      off = elf_section_data (o->output_section)->this_hdr.sh_offset;
 	      if (bfd_seek (abfd, off, SEEK_SET) != 0
-		  || ! _bfd_elf_strtab_emit (abfd,
-					     elf_hash_table (info)->dynstr))
+		  || !_bfd_elf_strtab_emit (abfd, htab->dynstr))
 		goto error_return;
 	    }
 	}
     }
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       bfd_boolean failed = FALSE;
 
@@ -11730,9 +12397,9 @@ bfd_elf_final_link (bfd *abfd, struct bf
     }
 
   /* If we have optimized stabs strings, output them.  */
-  if (elf_hash_table (info)->stab_info.stabstr != NULL)
+  if (htab->stab_info.stabstr != NULL)
     {
-      if (! _bfd_write_stab_strings (abfd, &elf_hash_table (info)->stab_info))
+      if (!_bfd_write_stab_strings (abfd, &htab->stab_info))
 	goto error_return;
     }
 
@@ -11904,8 +12571,6 @@ _bfd_elf_gc_mark_hook (asection *sec,
 		       struct elf_link_hash_entry *h,
 		       Elf_Internal_Sym *sym)
 {
-  const char *sec_name;
-
   if (h != NULL)
     {
       switch (h->root.type)
@@ -11917,33 +12582,6 @@ _bfd_elf_gc_mark_hook (asection *sec,
 	case bfd_link_hash_common:
 	  return h->root.u.c.p->section;
 
-	case bfd_link_hash_undefined:
-	case bfd_link_hash_undefweak:
-	  /* To work around a glibc bug, keep all XXX input sections
-	     when there is an as yet undefined reference to __start_XXX
-	     or __stop_XXX symbols.  The linker will later define such
-	     symbols for orphan input sections that have a name
-	     representable as a C identifier.  */
-	  if (strncmp (h->root.root.string, "__start_", 8) == 0)
-	    sec_name = h->root.root.string + 8;
-	  else if (strncmp (h->root.root.string, "__stop_", 7) == 0)
-	    sec_name = h->root.root.string + 7;
-	  else
-	    sec_name = NULL;
-
-	  if (sec_name && *sec_name != '\0')
-	    {
-	      bfd *i;
-
-	      for (i = info->input_bfds; i; i = i->link.next)
-		{
-		  sec = bfd_get_section_by_name (i, sec_name);
-		  if (sec)
-		    sec->flags |= SEC_KEEP;
-		}
-	    }
-	  break;
-
 	default:
 	  break;
 	}
@@ -11954,6 +12592,55 @@ _bfd_elf_gc_mark_hook (asection *sec,
   return NULL;
 }
 
+/* For undefined __start_<name> and __stop_<name> symbols, return the
+   first input section matching <name>.  Return NULL otherwise.  */
+
+asection *
+_bfd_elf_is_start_stop (const struct bfd_link_info *info,
+			struct elf_link_hash_entry *h)
+{
+  asection *s;
+  const char *sec_name;
+
+  if (h->root.type != bfd_link_hash_undefined
+      && h->root.type != bfd_link_hash_undefweak)
+    return NULL;
+
+  s = h->root.u.undef.section;
+  if (s != NULL)
+    {
+      if (s == (asection *) 0 - 1)
+	return NULL;
+      return s;
+    }
+
+  sec_name = NULL;
+  if (strncmp (h->root.root.string, "__start_", 8) == 0)
+    sec_name = h->root.root.string + 8;
+  else if (strncmp (h->root.root.string, "__stop_", 7) == 0)
+    sec_name = h->root.root.string + 7;
+
+  if (sec_name != NULL && *sec_name != '\0')
+    {
+      bfd *i;
+
+      for (i = info->input_bfds; i != NULL; i = i->link.next)
+	{
+	  s = bfd_get_section_by_name (i, sec_name);
+	  if (s != NULL)
+	    {
+	      h->root.u.undef.section = s;
+	      break;
+	    }
+	}
+    }
+
+  if (s == NULL)
+    h->root.u.undef.section = (asection *) 0 - 1;
+
+  return s;
+}
+
 /* COOKIE->rel describes a relocation against section SEC, which is
    a section we've decided to keep.  Return the section that contains
    the relocation symbol, or NULL if no section contains it.  */
@@ -11961,7 +12648,8 @@ _bfd_elf_gc_mark_hook (asection *sec,
 asection *
 _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec,
 		       elf_gc_mark_hook_fn gc_mark_hook,
-		       struct elf_reloc_cookie *cookie)
+		       struct elf_reloc_cookie *cookie,
+		       bfd_boolean *start_stop)
 {
   unsigned long r_symndx;
   struct elf_link_hash_entry *h;
@@ -11990,6 +12678,23 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_i
 	 handling copy relocs.  */
       if (h->u.weakdef != NULL)
 	h->u.weakdef->mark = 1;
+
+      if (start_stop != NULL)
+	{
+	  /* To work around a glibc bug, mark all XXX input sections
+	     when there is an as yet undefined reference to __start_XXX
+	     or __stop_XXX symbols.  The linker will later define such
+	     symbols for orphan input sections that have a name
+	     representable as a C identifier.  */
+	  asection *s = _bfd_elf_is_start_stop (info, h);
+
+	  if (s != NULL)
+	    {
+	      *start_stop = !s->gc_mark;
+	      return s;
+	    }
+	}
+
       return (*gc_mark_hook) (sec, info, cookie->rel, h, NULL);
     }
 
@@ -12008,15 +12713,22 @@ _bfd_elf_gc_mark_reloc (struct bfd_link_
 			struct elf_reloc_cookie *cookie)
 {
   asection *rsec;
+  bfd_boolean start_stop = FALSE;
 
-  rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
-  if (rsec && !rsec->gc_mark)
+  rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie, &start_stop);
+  while (rsec != NULL)
     {
-      if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour
-	  || (rsec->owner->flags & DYNAMIC) != 0)
-	rsec->gc_mark = 1;
-      else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook))
-	return FALSE;
+      if (!rsec->gc_mark)
+	{
+	  if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour
+	      || (rsec->owner->flags & DYNAMIC) != 0)
+	    rsec->gc_mark = 1;
+	  else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook))
+	    return FALSE;
+	}
+      if (!start_stop)
+	break;
+      rsec = bfd_get_next_section_by_name (rsec->owner, rsec);
     }
   return TRUE;
 }
@@ -12221,38 +12933,6 @@ _bfd_elf_gc_mark_extra_sections (struct 
   return TRUE;
 }
 
-/* Sweep symbols in swept sections.  Called via elf_link_hash_traverse.  */
-
-struct elf_gc_sweep_symbol_info
-{
-  struct bfd_link_info *info;
-  void (*hide_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *,
-		       bfd_boolean);
-};
-
-static bfd_boolean
-elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
-{
-  if (!h->mark
-      && (((h->root.type == bfd_link_hash_defined
-	    || h->root.type == bfd_link_hash_defweak)
-	   && !((h->def_regular || ELF_COMMON_DEF_P (h))
-		&& h->root.u.def.section->gc_mark))
-	  || h->root.type == bfd_link_hash_undefined
-	  || h->root.type == bfd_link_hash_undefweak))
-    {
-      struct elf_gc_sweep_symbol_info *inf;
-
-      inf = (struct elf_gc_sweep_symbol_info *) data;
-      (*inf->hide_symbol) (inf->info, h, TRUE);
-      h->def_regular = 0;
-      h->ref_regular = 0;
-      h->ref_regular_nonweak = 0;
-    }
-
-  return TRUE;
-}
-
 /* The sweep phase of garbage collection.  Remove all garbage sections.  */
 
 typedef bfd_boolean (*gc_sweep_hook_fn)
@@ -12264,8 +12944,6 @@ elf_gc_sweep (bfd *abfd, struct bfd_link
   bfd *sub;
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   gc_sweep_hook_fn gc_sweep_hook = bed->gc_sweep_hook;
-  unsigned long section_sym_count;
-  struct elf_gc_sweep_symbol_info sweep_info;
 
   for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
@@ -12299,7 +12977,9 @@ elf_gc_sweep (bfd *abfd, struct bfd_link
 	  o->flags |= SEC_EXCLUDE;
 
 	  if (info->print_gc_sections && o->size != 0)
-	    _bfd_error_handler (_("Removing unused section '%s' in file '%B'"), sub, o->name);
+	    /* xgettext:c-format */
+	    _bfd_error_handler (_("Removing unused section '%s' in file '%B'"),
+				sub, o->name);
 
 	  /* But we also have to update some of the relocation
 	     info we collected before.  */
@@ -12330,15 +13010,6 @@ elf_gc_sweep (bfd *abfd, struct bfd_link
 	}
     }
 
-  /* Remove the symbols that were in the swept sections from the dynamic
-     symbol table.  GCFIXME: Anyone know how to get them out of the
-     static symbol table as well?  */
-  sweep_info.info = info;
-  sweep_info.hide_symbol = bed->elf_backend_hide_symbol;
-  elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol,
-			  &sweep_info);
-
-  _bfd_elf_link_renumber_dynsyms (abfd, info, &section_sym_count);
   return TRUE;
 }
 
@@ -12463,12 +13134,13 @@ bfd_elf_gc_mark_dynamic_ref_symbol (stru
 	  || ((h->def_regular || ELF_COMMON_DEF_P (h))
 	      && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
 	      && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN
-	      && (!info->executable
+	      && (!bfd_link_executable (info)
+		  || info->gc_keep_exported
 		  || info->export_dynamic
 		  || (h->dynamic
 		      && d != NULL
 		      && (*d->match) (&d->head, NULL, h->root.root.string)))
-	      && (strchr (h->root.root.string, ELF_VER_CHR) != NULL
+	      && (h->versioned >= versioned
 		  || !bfd_hide_sym_by_version (info->version_info,
 					       h->root.root.string)))))
     h->root.u.def.section->flags |= SEC_KEEP;
@@ -12494,7 +13166,8 @@ _bfd_elf_gc_keep (struct bfd_link_info *
       if (h != NULL
 	  && (h->root.type == bfd_link_hash_defined
 	      || h->root.type == bfd_link_hash_defweak)
-	  && !bfd_is_abs_section (h->root.u.def.section))
+	  && !bfd_is_abs_section (h->root.u.def.section)
+	  && !bfd_is_und_section (h->root.u.def.section))
 	h->root.u.def.section->flags |= SEC_KEEP;
     }
 }
@@ -12543,7 +13216,7 @@ bfd_elf_gc_sections (bfd *abfd, struct b
   if (!bed->can_gc_sections
       || !is_elf_hash_table (info->hash))
     {
-      (*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
+      _bfd_error_handler(_("Warning: gc-sections option ignored"));
       return TRUE;
     }
 
@@ -12567,7 +13240,7 @@ bfd_elf_gc_sections (bfd *abfd, struct b
 	      && (sec->flags & SEC_LINKER_CREATED) == 0)
 	    elf_eh_frame_section (sub) = sec;
 	  fini_reloc_cookie_for_section (&cookie, sec);
-	  sec = bfd_get_next_section_by_name (sec);
+	  sec = bfd_get_next_section_by_name (NULL, sec);
 	}
     }
 
@@ -12582,7 +13255,7 @@ bfd_elf_gc_sections (bfd *abfd, struct b
     return FALSE;
 
   /* Mark dynamically referenced symbols.  */
-  if (htab->dynamic_sections_created)
+  if (htab->dynamic_sections_created || info->gc_keep_exported)
     elf_link_hash_traverse (htab, bed->gc_mark_dynamic_ref, info);
 
   /* Grovel through relocs to find out who stays ...  */
@@ -12627,7 +13300,7 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
 {
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
   struct elf_link_hash_entry **search, *child;
-  bfd_size_type extsymcount;
+  size_t extsymcount;
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
   /* The sh_info field of the symtab header tells us where the
@@ -12652,8 +13325,9 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
 	goto win;
     }
 
-  (*_bfd_error_handler) ("%B: %A+%lu: No symbol found for INHERIT",
-			 abfd, sec, (unsigned long) offset);
+  /* xgettext:c-format */
+  _bfd_error_handler (_("%B: %A+%lu: No symbol found for INHERIT"),
+		      abfd, sec, (unsigned long) offset);
   bfd_set_error (bfd_error_invalid_operation);
   return FALSE;
 
@@ -12900,7 +13574,7 @@ bfd_elf_gc_common_finalize_got_offsets (
   for (i = info->input_bfds; i; i = i->link.next)
     {
       bfd_signed_vma *local_got;
-      bfd_size_type j, locsymcount;
+      size_t j, locsymcount;
       Elf_Internal_Shdr *symtab_hdr;
 
       if (bfd_get_flavour (i) != bfd_target_elf_flavour)
@@ -13112,7 +13786,7 @@ bfd_elf_discard_info (bfd *output_bfd, s
     _bfd_elf_end_eh_frame_parsing (info);
 
   if (info->eh_frame_hdr_type
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info))
     changed = 1;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-linux-core.h ./bfd/elf-linux-core.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-linux-core.h	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elf-linux-core.h	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,123 @@
+/* Definitions for PRPSINFO structures under ELF on GNU/Linux.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef ELF_LINUX_CORE_H
+#define ELF_LINUX_CORE_H
+
+/* The PRPSINFO structures defined below are used by most
+   architectures, although some of them define their own versions
+   (like e.g., PPC).  */
+
+/* External 32-bit structure for PRPSINFO.  This structure is
+   ABI-defined, thus we choose to use char arrays here in order to
+   avoid dealing with different types in different architectures.
+
+   This structure will ultimately be written in the corefile's note
+   section, as the PRPSINFO.  */
+
+struct elf_external_linux_prpsinfo32
+  {
+    char pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    char pr_zomb;			/* Zombie.  */
+    char pr_nice;			/* Nice val.  */
+    char pr_flag[4];			/* Flags.  */
+    char pr_uid[2];
+    char pr_gid[2];
+    char pr_pid[4];
+    char pr_ppid[4];
+    char pr_pgrp[4];
+    char pr_sid[4];
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[80];			/* Initial part of arg list.  */
+  };
+
+/* Helper function to copy an elf_internal_linux_prpsinfo in host
+   endian to an elf_external_linux_prpsinfo32 in target endian.  */
+
+static inline void
+swap_linux_prpsinfo32_out (bfd *obfd,
+			   const struct elf_internal_linux_prpsinfo *from,
+			   struct elf_external_linux_prpsinfo32 *to)
+{
+  bfd_put_8 (obfd, from->pr_state, &to->pr_state);
+  bfd_put_8 (obfd, from->pr_sname, &to->pr_sname);
+  bfd_put_8 (obfd, from->pr_zomb, &to->pr_zomb);
+  bfd_put_8 (obfd, from->pr_nice, &to->pr_nice);
+  bfd_put_32 (obfd, from->pr_flag, to->pr_flag);
+  bfd_put_16 (obfd, from->pr_uid, to->pr_uid);
+  bfd_put_16 (obfd, from->pr_gid, to->pr_gid);
+  bfd_put_32 (obfd, from->pr_pid, to->pr_pid);
+  bfd_put_32 (obfd, from->pr_ppid, to->pr_ppid);
+  bfd_put_32 (obfd, from->pr_pgrp, to->pr_pgrp);
+  bfd_put_32 (obfd, from->pr_sid, to->pr_sid);
+  strncpy (to->pr_fname, from->pr_fname, sizeof (to->pr_fname));
+  strncpy (to->pr_psargs, from->pr_psargs, sizeof (to->pr_psargs));
+}
+
+/* External 64-bit structure for PRPSINFO.  This structure is
+   ABI-defined, thus we choose to use char arrays here in order to
+   avoid dealing with different types in different architectures.
+
+   This structure will ultimately be written in the corefile's note
+   section, as the PRPSINFO.  */
+
+struct elf_external_linux_prpsinfo64
+  {
+    char pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    char pr_zomb;			/* Zombie.  */
+    char pr_nice;			/* Nice val.  */
+    char pr_flag[8];			/* Flags.  */
+    char gap[4];
+    char pr_uid[4];
+    char pr_gid[4];
+    char pr_pid[4];
+    char pr_ppid[4];
+    char pr_pgrp[4];
+    char pr_sid[4];
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[80];			/* Initial part of arg list.  */
+  };
+
+/* Helper function to copy an elf_internal_linux_prpsinfo in host
+   endian to an elf_external_linux_prpsinfo64 in target endian.  */
+
+static inline void
+swap_linux_prpsinfo64_out (bfd *obfd,
+			   const struct elf_internal_linux_prpsinfo *from,
+			   struct elf_external_linux_prpsinfo64 *to)
+{
+  bfd_put_8 (obfd, from->pr_state, &to->pr_state);
+  bfd_put_8 (obfd, from->pr_sname, &to->pr_sname);
+  bfd_put_8 (obfd, from->pr_zomb, &to->pr_zomb);
+  bfd_put_8 (obfd, from->pr_nice, &to->pr_nice);
+  bfd_put_64 (obfd, from->pr_flag, to->pr_flag);
+  bfd_put_32 (obfd, from->pr_uid, to->pr_uid);
+  bfd_put_32 (obfd, from->pr_gid, to->pr_gid);
+  bfd_put_32 (obfd, from->pr_pid, to->pr_pid);
+  bfd_put_32 (obfd, from->pr_ppid, to->pr_ppid);
+  bfd_put_32 (obfd, from->pr_pgrp, to->pr_pgrp);
+  bfd_put_32 (obfd, from->pr_sid, to->pr_sid);
+  strncpy (to->pr_fname, from->pr_fname, sizeof (to->pr_fname));
+  strncpy (to->pr_psargs, from->pr_psargs, sizeof (to->pr_psargs));
+}
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-linux-psinfo.h ./bfd/elf-linux-psinfo.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-linux-psinfo.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-linux-psinfo.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,127 +0,0 @@
-/* Definitions for PRPSINFO structures under ELF on GNU/Linux.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#ifndef ELF_LINUX_PSINFO_H
-#define ELF_LINUX_PSINFO_H
-
-/* The PRPSINFO structures defined below are used by most
-   architectures, although some of them define their own versions
-   (like e.g., PPC).  */
-
-/* External 32-bit structure for PRPSINFO.  This structure is
-   ABI-defined, thus we choose to use char arrays here in order to
-   avoid dealing with different types in different architectures.
-
-   This structure will ultimately be written in the corefile's note
-   section, as the PRPSINFO.  */
-
-struct elf_external_linux_prpsinfo32
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    char pr_flag[4];			/* Flags.  */
-    char pr_uid[2];
-    char pr_gid[2];
-    char pr_pid[4];
-    char pr_ppid[4];
-    char pr_pgrp[4];
-    char pr_sid[4];
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[80];			/* Initial part of arg list.  */
-  };
-
-/* Helper macro to swap (properly handling endianess) things from the
-   `elf_internal_linux_prpsinfo' structure to the
-   `elf_external_linux_prpsinfo32' structure.
-
-   Note that FROM should be a pointer, and TO should be the explicit
-   type.  */
-
-#define LINUX_PRPSINFO32_SWAP_FIELDS(abfd, from, to)			\
-  do									\
-    {									\
-      H_PUT_8 (abfd, from->pr_state, &to.pr_state);			\
-      H_PUT_8 (abfd, from->pr_sname, &to.pr_sname);			\
-      H_PUT_8 (abfd, from->pr_zomb, &to.pr_zomb);			\
-      H_PUT_8 (abfd, from->pr_nice, &to.pr_nice);			\
-      H_PUT_32 (abfd, from->pr_flag, to.pr_flag);			\
-      H_PUT_16 (abfd, from->pr_uid, to.pr_uid);				\
-      H_PUT_16 (abfd, from->pr_gid, to.pr_gid);				\
-      H_PUT_32 (abfd, from->pr_pid, to.pr_pid);				\
-      H_PUT_32 (abfd, from->pr_ppid, to.pr_ppid);			\
-      H_PUT_32 (abfd, from->pr_pgrp, to.pr_pgrp);			\
-      H_PUT_32 (abfd, from->pr_sid, to.pr_sid);				\
-      strncpy (to.pr_fname, from->pr_fname, sizeof (to.pr_fname));	\
-      strncpy (to.pr_psargs, from->pr_psargs, sizeof (to.pr_psargs));	\
-    } while (0)
-
-/* External 64-bit structure for PRPSINFO.  This structure is
-   ABI-defined, thus we choose to use char arrays here in order to
-   avoid dealing with different types in different architectures.
-
-   This structure will ultimately be written in the corefile's note
-   section, as the PRPSINFO.  */
-
-struct elf_external_linux_prpsinfo64
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    char pr_flag[8];			/* Flags.  */
-    char gap[4];
-    char pr_uid[4];
-    char pr_gid[4];
-    char pr_pid[4];
-    char pr_ppid[4];
-    char pr_pgrp[4];
-    char pr_sid[4];
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[80];			/* Initial part of arg list.  */
-  };
-
-/* Helper macro to swap (properly handling endianess) things from the
-   `elf_internal_linux_prpsinfo' structure to the
-   `elf_external_linux_prpsinfo64' structure.
-
-   Note that FROM should be a pointer, and TO should be the explicit
-   type.  */
-
-#define LINUX_PRPSINFO64_SWAP_FIELDS(abfd, from, to)			\
-  do									\
-    {									\
-      H_PUT_8 (abfd, from->pr_state, &to.pr_state);			\
-      H_PUT_8 (abfd, from->pr_sname, &to.pr_sname);			\
-      H_PUT_8 (abfd, from->pr_zomb, &to.pr_zomb);			\
-      H_PUT_8 (abfd, from->pr_nice, &to.pr_nice);			\
-      H_PUT_64 (abfd, from->pr_flag, to.pr_flag);			\
-      H_PUT_32 (abfd, from->pr_uid, to.pr_uid);				\
-      H_PUT_32 (abfd, from->pr_gid, to.pr_gid);				\
-      H_PUT_32 (abfd, from->pr_pid, to.pr_pid);				\
-      H_PUT_32 (abfd, from->pr_ppid, to.pr_ppid);			\
-      H_PUT_32 (abfd, from->pr_pgrp, to.pr_pgrp);			\
-      H_PUT_32 (abfd, from->pr_sid, to.pr_sid);				\
-      strncpy (to.pr_fname, from->pr_fname, sizeof (to.pr_fname));	\
-      strncpy (to.pr_psargs, from->pr_psargs, sizeof (to.pr_psargs));	\
-    } while (0)
-
-#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-m10200.c ./bfd/elf-m10200.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-m10200.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-m10200.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Matsushita 10200 specific support for 32-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -383,7 +383,7 @@ mn10200_elf_relocate_section (bfd *outpu
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -410,18 +410,15 @@ mn10200_elf_relocate_section (bfd *outpu
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root : NULL), name, howto->name,
-		      (bfd_vma) 0, input_bfd, input_section,
-		      rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+						    input_section,
+						    rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -441,10 +438,8 @@ mn10200_elf_relocate_section (bfd *outpu
 	      /* fall through */
 
 	    common_error:
-	      if (!((*info->callbacks->warning)
-		    (info, msg, name, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->warning) (info, msg, name, input_bfd,
+					   input_section, rel->r_offset);
 	      break;
 	    }
 	}
@@ -572,7 +567,7 @@ mn10200_elf_relax_section (bfd *abfd,
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-m10300.c ./bfd/elf-m10300.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-m10300.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-m10300.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Matsushita 10300 specific support for 32-bit ELF
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -808,8 +808,9 @@ mn10300_info_to_howto (bfd *abfd ATTRIBU
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_MN10300_MAX)
     {
-      (*_bfd_error_handler) (_("%B: unrecognised MN10300 reloc number: %d"),
-			     abfd, r_type);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: unrecognised MN10300 reloc number: %d"),
+			  abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       r_type = R_MN10300_NONE;
     }
@@ -830,7 +831,7 @@ elf_mn10300_tls_transition (struct bfd_l
       && elf_mn10300_hash_entry (h)->tls_type == GOT_TLS_IE)
     return R_MN10300_TLS_GOTIE;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   if (! (sec->flags & SEC_CODE))
@@ -1022,7 +1023,8 @@ mn10300_do_tls_transition (bfd *        
       break;
 
     default:
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: Unsupported transition from %s to %s"),
 	 bfd_get_filename (input_bfd),
 	 elf_mn10300_howto_table[r_type].name,
@@ -1061,7 +1063,7 @@ mn10300_elf_check_relocs (bfd *abfd,
   srelgot = NULL;
   sreloc  = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1153,7 +1155,7 @@ mn10300_elf_check_relocs (bfd *abfd,
 
 	case R_MN10300_TLS_IE:
 	case R_MN10300_TLS_GOTIE:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
@@ -1172,29 +1174,9 @@ mn10300_elf_check_relocs (bfd *abfd,
 	    default:                  tls_type = GOT_NORMAL; break;
 	    }
 
-	  if (sgot == NULL)
-	    {
-	      sgot = htab->root.sgot;
-	      BFD_ASSERT (sgot != NULL);
-	    }
-
-	  if (srelgot == NULL
-	      && (h != NULL || info->shared))
-	    {
-	      srelgot = bfd_get_linker_section (dynobj, ".rela.got");
-	      if (srelgot == NULL)
-		{
-		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
-				    | SEC_READONLY);
-		  srelgot = bfd_make_section_anyway_with_flags (dynobj,
-								".rela.got",
-								flags);
-		  if (srelgot == NULL
-		      || ! bfd_set_section_alignment (dynobj, srelgot, 2))
-		    goto fail;
-		}
-	    }
+	  sgot = htab->root.sgot;
+	  srelgot = htab->root.srelgot;
+	  BFD_ASSERT (sgot != NULL && srelgot != NULL);
 
 	  if (r_type == R_MN10300_TLS_LD)
 	    {
@@ -1214,7 +1196,8 @@ mn10300_elf_check_relocs (bfd *abfd,
 		    /* Transition GD->IE.  */
 		    tls_type = GOT_TLS_IE;
 		  else
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: %s' accessed both as normal and thread local symbol"),
 		       abfd, h ? h->root.root.string : "<local>");
 		}
@@ -1268,7 +1251,7 @@ mn10300_elf_check_relocs (bfd *abfd,
 
 	      local_got_offsets[r_symndx] = sgot->size;
 
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  /* If we are generating a shared object, we need to
 		     output a R_MN10300_RELATIVE reloc so that the dynamic
@@ -1332,7 +1315,7 @@ mn10300_elf_check_relocs (bfd *abfd,
 	need_shared_relocs:
 	  /* If we are creating a shared library, then we
 	     need to copy the reloc into the shared library.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      /* Do not generate a dynamic reloc for a
 		 reloc associated with a SYM_DIFF operation.  */
@@ -1465,16 +1448,17 @@ mn10300_elf_final_link_relocate (reloc_h
     case R_MN10300_GOTOFF32:
     case R_MN10300_GOTOFF24:
     case R_MN10300_GOTOFF16:
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (input_section->flags & SEC_ALLOC) != 0
 	  && h != NULL
 	  && ! SYMBOL_REFERENCES_LOCAL (info, h))
 	return bfd_reloc_dangerous;
+      /* Fall through.  */
     case R_MN10300_GOT32:
       /* Issue 2052223:
 	 Taking the address of a protected function in a shared library
 	 is illegal.  Issue an error message here.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (input_section->flags & SEC_ALLOC) != 0
 	  && h != NULL
 	  && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED
@@ -1532,7 +1516,7 @@ mn10300_elf_final_link_relocate (reloc_h
       return bfd_reloc_ok;
 
     case R_MN10300_32:
-      if (info->shared
+      if (bfd_link_pic (info)
 	  /* Do not generate relocs when an R_MN10300_32 has been used
 	     with an R_MN10300_SYM_DIFF to compute a difference of two
 	     symbols.  */
@@ -1815,7 +1799,7 @@ mn10300_elf_final_link_relocate (reloc_h
 
       if (!htab->tls_ldm_got.rel_emitted)
 	{
-	  asection * srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+	  asection *srelgot = htab->root.srelgot;
 	  Elf_Internal_Rela rel;
 
 	  BFD_ASSERT (srelgot != NULL);
@@ -1890,12 +1874,11 @@ mn10300_elf_final_link_relocate (reloc_h
 	    {
 	      bfd_put_32 (output_bfd, value, sgot->contents + off);
 
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
-		  asection * srelgot;
+		  asection *srelgot = htab->root.srelgot;;
 		  Elf_Internal_Rela outrel;
 
-		  srelgot = bfd_get_linker_section (dynobj, ".rela.got");
 		  BFD_ASSERT (srelgot != NULL);
 
 		  outrel.r_offset = (sgot->output_section->vma
@@ -2091,7 +2074,7 @@ mn10300_elf_relocate_section (bfd *outpu
 		      /* _32 relocs in executables force _COPY relocs,
 			 such that the address of the symbol ends up
 			 being local.  */
-		      && !info->executable
+		      && !bfd_link_executable (info)
 		      && !SYMBOL_REFERENCES_LOCAL (info, hh)
 		      && ((input_section->flags & SEC_ALLOC) != 0
 			  /* DWARF will emit R_MN10300_32 relocations
@@ -2105,11 +2088,12 @@ mn10300_elf_relocate_section (bfd *outpu
 	       obscure cases sec->output_section will be NULL.  */
 	    relocation = 0;
 
-	  else if (!info->relocatable && unresolved_reloc
+	  else if (!bfd_link_relocatable (info) && unresolved_reloc
 		   && _bfd_elf_section_offset (output_bfd, info, input_section,
 					       rel->r_offset) != (bfd_vma) -1)
 
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	       input_bfd,
 	       input_section,
@@ -2122,7 +2106,7 @@ mn10300_elf_relocate_section (bfd *outpu
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       r = mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -2151,18 +2135,14 @@ mn10300_elf_relocate_section (bfd *outpu
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, (h ? &h->root.root : NULL), name,
-		      howto->name, (bfd_vma) 0, input_bfd,
-		      input_section, rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root.root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, name, input_bfd, input_section,
-		      rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -2178,6 +2158,7 @@ mn10300_elf_relocate_section (bfd *outpu
 		msg = _("error: inappropriate relocation type for shared"
 			" library (did you forget -fpic?)");
 	      else if (r_type == R_MN10300_GOT32)
+		/* xgettext:c-format */
 		msg = _("%B: taking the address of protected function"
 			" '%s' cannot be done when making a shared library");
 	      else
@@ -2665,7 +2646,7 @@ mn10300_elf_relax_section (bfd *abfd,
   asection *section = sec;
   bfd_vma align_gap_adjustment;
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -3287,7 +3268,7 @@ mn10300_elf_relax_section (bfd *abfd,
   /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -4728,8 +4709,10 @@ _bfd_mn10300_elf_object_p (bfd *abfd)
    object file when linking.  */
 
 static bfd_boolean
-_bfd_mn10300_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_mn10300_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
+
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
     return TRUE;
@@ -4776,11 +4759,11 @@ static const bfd_byte elf_mn10300_pic_pl
 
 /* Return size of the first PLT entry.  */
 #define elf_mn10300_sizeof_plt0(info) \
-  (info->shared ? PIC_PLT_ENTRY_SIZE : PLT0_ENTRY_SIZE)
+  (bfd_link_pic (info) ? PIC_PLT_ENTRY_SIZE : PLT0_ENTRY_SIZE)
 
 /* Return size of a PLT entry.  */
 #define elf_mn10300_sizeof_plt(info) \
-  (info->shared ? PIC_PLT_ENTRY_SIZE : PLT_ENTRY_SIZE)
+  (bfd_link_pic (info) ? PIC_PLT_ENTRY_SIZE : PLT_ENTRY_SIZE)
 
 /* Return offset of the PLT0 address in an absolute PLT entry.  */
 #define elf_mn10300_plt_plt0_offset(info) 16
@@ -4872,7 +4855,7 @@ _bfd_mn10300_elf_create_dynamic_sections
 	 be needed, we can discard it later.  We will never need this
 	 section when generating a shared object, since they do not use
 	 copy relocs.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  s = bfd_make_section_anyway_with_flags (abfd,
 						  (bed->default_use_rela_p
@@ -4917,7 +4900,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && !h->def_dynamic
 	  && !h->ref_dynamic)
 	{
@@ -4950,7 +4933,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (
 	 location in the .plt.  This is required to make function
 	 pointers compare as equal between the normal executable and
 	 the shared library.  */
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && !h->def_regular)
 	{
 	  h->root.u.def.section = s;
@@ -4969,7 +4952,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (
       s->size += 4;
 
       /* We also need to make an entry in the .rela.plt section.  */
-      s = bfd_get_linker_section (dynobj, ".rela.plt");
+      s = htab->root.srelplt;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
 
@@ -4995,7 +4978,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -5052,7 +5035,7 @@ _bfd_mn10300_elf_size_dynamic_sections (
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -5074,7 +5057,7 @@ _bfd_mn10300_elf_size_dynamic_sections (
 
   if (htab->tls_ldm_got.refcount > 0)
     {
-      s = bfd_get_linker_section (dynobj, ".rela.got");
+      s = htab->root.srelgot;
       BFD_ASSERT (s != NULL);
       s->size += sizeof (Elf32_External_Rela);
     }
@@ -5174,7 +5157,7 @@ _bfd_mn10300_elf_size_dynamic_sections (
 	 but we must add the entries now so that we get the correct
 	 size for the .dynamic section.  The DT_DEBUG entry is filled
 	 in by the dynamic linker and used by the debugger.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  if (!_bfd_elf_add_dynamic_entry (info, DT_DEBUG, 0))
 	    return FALSE;
@@ -5238,7 +5221,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (
 
       splt = htab->root.splt;
       sgot = htab->root.sgotplt;
-      srel = bfd_get_linker_section (dynobj, ".rela.plt");
+      srel = htab->root.srelplt;
       BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
 
       /* Get the index in the procedure linkage table which
@@ -5254,7 +5237,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (
       got_offset = (plt_index + 3) * 4;
 
       /* Fill in the entry in the procedure linkage table.  */
-      if (! info->shared)
+      if (! bfd_link_pic (info))
 	{
 	  memcpy (splt->contents + h->plt.offset, elf_mn10300_plt_entry,
 		  elf_mn10300_sizeof_plt (info));
@@ -5316,7 +5299,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (
 
       /* This symbol has an entry in the global offset table.  Set it up.  */
       sgot = htab->root.sgot;
-      srel = bfd_get_linker_section (dynobj, ".rela.got");
+      srel = htab->root.srelgot;
       BFD_ASSERT (sgot != NULL && srel != NULL);
 
       rel.r_offset = (sgot->output_section->vma
@@ -5357,7 +5340,7 @@ _bfd_mn10300_elf_finish_dynamic_symbol (
 	     the symbol was forced to be local because of a version file.
 	     The entry in the global offset table will already have been
 	     initialized in the relocate_section function.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      && (info->symbolic || h->dynindx == -1)
 	      && h->def_regular)
 	    {
@@ -5445,7 +5428,6 @@ _bfd_mn10300_elf_finish_dynamic_sections
       for (; dyncon < dynconend; dyncon++)
 	{
 	  Elf_Internal_Dyn dyn;
-	  const char * name;
 	  asection * s;
 
 	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
@@ -5456,40 +5438,21 @@ _bfd_mn10300_elf_finish_dynamic_sections
 	      break;
 
 	    case DT_PLTGOT:
-	      name = ".got";
+	      s = htab->root.sgot;
 	      goto get_vma;
 
 	    case DT_JMPREL:
-	      name = ".rela.plt";
+	      s = htab->root.srelplt;
 	    get_vma:
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      BFD_ASSERT (s != NULL);
-	      dyn.d_un.d_ptr = s->vma;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      BFD_ASSERT (s != NULL);
+	      s = htab->root.srelplt;
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
-
-	    case DT_RELASZ:
-	      /* My reading of the SVR4 ABI indicates that the
-		 procedure linkage table relocs (DT_JMPREL) should be
-		 included in the overall relocs (DT_RELA).  This is
-		 what Solaris does.  However, UnixWare can not handle
-		 that case.  Therefore, we override the DT_RELASZ entry
-		 here to make it not include the JMPREL relocs.  Since
-		 the linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-	      if (s != NULL)
-		dyn.d_un.d_val -= s->size;
-	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-	      break;
 	    }
 	}
 
@@ -5497,7 +5460,7 @@ _bfd_mn10300_elf_finish_dynamic_sections
       splt = htab->root.splt;
       if (splt && splt->size > 0)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      memcpy (splt->contents, elf_mn10300_pic_plt_entry,
 		      elf_mn10300_sizeof_plt (info));
@@ -5630,5 +5593,6 @@ mn10300_elf_mkobject (bfd *abfd)
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
+#define elf_backend_dtrel_excludes_plt	1
 
 #include "elf32-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfn32-mips.c ./bfd/elfn32-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfn32-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfn32-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS-specific support for 32-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -1847,6 +1847,21 @@ static reloc_howto_type elf_mips16_howto
 	 0x0000ffff,		/* src_mask */
 	 0x0000ffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* MIPS16 16-bit PC-relative branch offset.  */
+  HOWTO (R_MIPS16_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS16_PC16_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 static reloc_howto_type elf_mips16_howto_table_rela[] =
@@ -2048,6 +2063,21 @@ static reloc_howto_type elf_mips16_howto
 	 0,			/* src_mask */
 	 0x0000ffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* MIPS16 16-bit PC-relative branch offset.  */
+  HOWTO (R_MIPS16_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS16_PC16_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
 };
 
 static reloc_howto_type elf_micromips_howto_table_rel[] =
@@ -3231,7 +3261,8 @@ static const struct elf_reloc_map mips16
     R_MIPS16_TLS_DTPREL_LO16 - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_GOTTPREL, R_MIPS16_TLS_GOTTPREL - R_MIPS16_min },
   { BFD_RELOC_MIPS16_TLS_TPREL_HI16, R_MIPS16_TLS_TPREL_HI16 - R_MIPS16_min },
-  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min }
+  { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min },
+  { BFD_RELOC_MIPS16_16_PCREL_S1, R_MIPS16_PC16_S1 - R_MIPS16_min }
 };
 
 static const struct elf_reloc_map micromips_reloc_map[] =
@@ -3405,7 +3436,7 @@ mips_elf_n32_rtype_to_howto (unsigned in
 	}
       if (r_type >= R_MIPS_max)
 	{
-	  (*_bfd_error_handler) (_("unrecognised MIPS reloc number: %d"), r_type);
+	  _bfd_error_handler (_("unrecognised MIPS reloc number: %d"), r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  r_type = R_MIPS_NONE;
 	}
@@ -3656,6 +3687,7 @@ static const struct ecoff_debug_swap mip
 #define elf_backend_ecoff_debug_swap	&mips_elf32_ecoff_debug_swap
 
 #define elf_backend_got_header_size	(4 * MIPS_RESERVED_GOTNO)
+#define elf_backend_want_dynrelro	1
 
 /* MIPS n32 ELF can use a mixture of REL and RELA, but some Relocations
    work better/work only in RELA, so we default to this.  */
@@ -3689,7 +3721,6 @@ static const struct ecoff_debug_swap mip
 #define bfd_elf32_bfd_set_private_flags	_bfd_mips_elf_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data \
 					_bfd_mips_elf_print_private_bfd_data
-#define bfd_elf32_bfd_relax_section     _bfd_mips_relax_section
 #define bfd_elf32_mkobject		_bfd_mips_elf_mkobject
 
 /* Support for SGI-ish mips targets using n32 ABI.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-nacl.c ./bfd/elf-nacl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-nacl.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-nacl.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Native Client support for ELF
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -14,9 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sysdep.h"
 #include "bfd.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-nacl.h ./bfd/elf-nacl.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-nacl.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-nacl.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Native Client support for ELF
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -14,9 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "bfd.h"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-aarch64.c ./bfd/elfnn-aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-aarch64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfnn-aarch64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* AArch64-specific support for NN-bit ELF.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -165,41 +165,86 @@
 #endif
 
 #define IS_AARCH64_TLS_RELOC(R_TYPE)				\
-  ((R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21		\
+  ((R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PREL21		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G1		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC	\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC	\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2	\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12	\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC	\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLS_DTPMOD			\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLS_DTPREL			\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLS_TPREL			\
    || IS_AARCH64_TLSDESC_RELOC ((R_TYPE)))
 
-#define IS_AARCH64_TLSDESC_RELOC(R_TYPE)			\
-  ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19		\
+#define IS_AARCH64_TLS_RELAX_RELOC(R_TYPE)			\
+  ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC	\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G1		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_CALL		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDR			\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G1		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDR			\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PREL21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G1		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21)
+
+#define IS_AARCH64_TLSDESC_RELOC(R_TYPE)			\
+  ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC			\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD			\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21		\
    || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_CALL		\
-   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC)
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC	\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDR			\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC		\
+   || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G1)
 
 #define ELIMINATE_COPY_RELOCS 0
 
@@ -213,7 +258,7 @@
 #define PLT_SMALL_ENTRY_SIZE            (16)
 #define PLT_TLSDESC_ENTRY_SIZE          (32)
 
-/* Encoding of the nop instruction */
+/* Encoding of the nop instruction.  */
 #define INSN_NOP 0xd503201f
 
 #define aarch64_compute_jump_table_size(htab)		\
@@ -294,8 +339,8 @@ static reloc_howto_type elfNN_aarch64_ho
 
   /* Basic data relocations.  */
 
-#if ARCH_SIZE == 64
-  HOWTO (R_AARCH64_NULL,	/* type */
+  /* Deprecated, but retained for backwards compatibility.  */
+  HOWTO64 (R_AARCH64_NULL,	/* type */
 	 0,			/* rightshift */
 	 3,			/* size (0 = byte, 1 = short, 2 = long) */
 	 0,			/* bitsize */
@@ -308,7 +353,6 @@ static reloc_howto_type elfNN_aarch64_ho
 	 0,			/* src_mask */
 	 0,			/* dst_mask */
 	 FALSE),		/* pcrel_offset */
-#else
   HOWTO (R_AARCH64_NONE,	/* type */
 	 0,			/* rightshift */
 	 3,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -322,7 +366,6 @@ static reloc_howto_type elfNN_aarch64_ho
 	 0,			/* src_mask */
 	 0,			/* dst_mask */
 	 FALSE),		/* pcrel_offset */
-#endif
 
   /* .xword: (S+A) */
   HOWTO64 (AARCH64_R (ABS64),	/* type */
@@ -530,7 +573,7 @@ static reloc_howto_type elfNN_aarch64_ho
   HOWTO (AARCH64_R (MOVW_SABS_G0),	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
+	 17,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed,	/* complain_on_overflow */
@@ -545,7 +588,7 @@ static reloc_howto_type elfNN_aarch64_ho
   HOWTO64 (AARCH64_R (MOVW_SABS_G1),	/* type */
 	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
+	 17,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed,	/* complain_on_overflow */
@@ -560,7 +603,7 @@ static reloc_howto_type elfNN_aarch64_ho
   HOWTO64 (AARCH64_R (MOVW_SABS_G2),	/* type */
 	 32,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
+	 17,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed,	/* complain_on_overflow */
@@ -848,6 +891,36 @@ static reloc_howto_type elfNN_aarch64_ho
 	 0xffc,			/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
+  /* Lower 16 bits of GOT offset for the symbol.  */
+  HOWTO64 (AARCH64_R (MOVW_GOTOFF_G0_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (MOVW_GOTOFF_G0_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Higher 16 bits of GOT offset for the symbol.  */
+  HOWTO64 (AARCH64_R (MOVW_GOTOFF_G1),	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (MOVW_GOTOFF_G1),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   /* LD64: GOT offset for the symbol.  */
   HOWTO64 (AARCH64_R (LD64_GOTOFF_LO15),	/* type */
 	 3,			/* rightshift */
@@ -940,29 +1013,31 @@ static reloc_howto_type elfNN_aarch64_ho
 	 0xfff,			/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
-  HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G1),	/* type */
-	 16,			/* rightshift */
+  /* Lower 16 bits of GOT offset to tls_index.  */
+  HOWTO64 (AARCH64_R (TLSGD_MOVW_G0_NC),	/* type */
+	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G1),	/* name */
+	 AARCH64_R_STR (TLSGD_MOVW_G0_NC),	/* name */
 	 FALSE,			/* partial_inplace */
 	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
-  HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G0_NC),	/* type */
-	 0,			/* rightshift */
+  /* Higher 16 bits of GOT offset to tls_index.  */
+  HOWTO64 (AARCH64_R (TLSGD_MOVW_G1),	/* type */
+	 16,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G0_NC),	/* name */
+	 AARCH64_R_STR (TLSGD_MOVW_G1),	/* name */
 	 FALSE,			/* partial_inplace */
 	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
@@ -1024,6 +1099,319 @@ static reloc_howto_type elfNN_aarch64_ho
 	 0x1ffffc,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
+  HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G0_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G0_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G1),	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G1),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* ADD: bit[23:12] of byte offset to module TLS base address.  */
+  HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_HI12),	/* type */
+	 12,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADD_DTPREL_HI12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xfff,			/* src_mask */
+	 0xfff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Unsigned 12 bit byte offset to module TLS base address.  */
+  HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_LO12),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xfff,			/* src_mask */
+	 0xfff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.  */
+  HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_LO12_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xfff,			/* src_mask */
+	 0xfff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* ADD: GOT offset G(S) & 0xff8 [no overflow check] */
+  HOWTO (AARCH64_R (TLSLD_ADD_LO12_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADD_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xfff,			/* src_mask */
+	 0xfff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Get to the page for the GOT entry for the symbol
+     (G(S) - P) using an ADRP instruction.  */
+  HOWTO (AARCH64_R (TLSLD_ADR_PAGE21),	/* type */
+	 12,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 21,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADR_PAGE21),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x1fffff,		/* src_mask */
+	 0x1fffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (AARCH64_R (TLSLD_ADR_PREL21),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 21,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_ADR_PREL21),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x1fffff,		/* src_mask */
+	 0x1fffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* LD/ST16: bit[11:1] of byte offset to module TLS base address.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST16_DTPREL_LO12),	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 11,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x1ffc00,		/* src_mask */
+	 0x1ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Same as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST16_DTPREL_LO12_NC),	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 11,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x1ffc00,		/* src_mask */
+	 0x1ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* LD/ST32: bit[11:2] of byte offset to module TLS base address.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST32_DTPREL_LO12),	/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 10,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x3ffc00,		/* src_mask */
+	 0x3ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Same as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST32_DTPREL_LO12_NC),	/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 10,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffc00,		/* src_mask */
+	 0xffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* LD/ST64: bit[11:3] of byte offset to module TLS base address.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST64_DTPREL_LO12),	/* type */
+	 3,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 9,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x3ffc00,		/* src_mask */
+	 0x3ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Same as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST64_DTPREL_LO12_NC),	/* type */
+	 3,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 9,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x7fc00,		/* src_mask */
+	 0x7fc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* LD/ST8: bit[11:0] of byte offset to module TLS base address.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST8_DTPREL_LO12),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x3ffc00,		/* src_mask */
+	 0x3ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Same as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check.  */
+  HOWTO64 (AARCH64_R (TLSLD_LDST8_DTPREL_LO12_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 12,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 10,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x3ffc00,		/* src_mask */
+	 0x3ffc00,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* MOVZ: bit[15:0] of byte offset to module TLS base address.  */
+  HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G0),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0.  */
+  HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G0_NC),	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* MOVZ: bit[31:16] of byte offset to module TLS base address.  */
+  HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G1),	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1.  */
+  HOWTO64 (AARCH64_R (TLSLD_MOVW_DTPREL_G1_NC),	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1_NC),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* MOVZ: bit[47:32] of byte offset to module TLS base address.  */
+  HOWTO64 (AARCH64_R (TLSLD_MOVW_DTPREL_G2),	/* type */
+	 32,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 AARCH64_R_STR (TLSLD_MOVW_DTPREL_G2),	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   HOWTO64 (AARCH64_R (TLSLE_MOVW_TPREL_G2),	/* type */
 	 32,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1231,7 +1619,7 @@ static reloc_howto_type elfNN_aarch64_ho
 	 12,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_dont,	/* complain_on_overflow */
+	 complain_overflow_unsigned,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 AARCH64_R_STR (TLSDESC_OFF_G1),	/* name */
 	 FALSE,			/* partial_inplace */
@@ -1899,16 +2287,15 @@ struct elf_aarch64_link_hash_table
   /* Enable ADRP->ADR rewrite for erratum 843419 workaround.  */
   int fix_erratum_843419_adr;
 
+  /* Don't apply link-time values for dynamic relocations.  */
+  int no_apply_dynamic_relocs;
+
   /* The number of bytes in the initial entry in the PLT.  */
   bfd_size_type plt_header_size;
 
   /* The number of bytes in the subsequent PLT etries.  */
   bfd_size_type plt_entry_size;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Small local sym cache.  */
   struct sym_cache sym_cache;
 
@@ -1942,7 +2329,7 @@ struct elf_aarch64_link_hash_table
 
   /* Assorted information used by elfNN_aarch64_size_stubs.  */
   unsigned int bfd_count;
-  int top_index;
+  unsigned int top_index;
   asection **input_list;
 
   /* The offset into splt of the PLT entry for the TLS descriptor
@@ -2249,28 +2636,19 @@ aarch64_select_branch_stub (bfd_vma valu
 /* Determine the type of stub needed, if any, for a call.  */
 
 static enum elf_aarch64_stub_type
-aarch64_type_of_stub (struct bfd_link_info *info,
-		      asection *input_sec,
+aarch64_type_of_stub (asection *input_sec,
 		      const Elf_Internal_Rela *rel,
+		      asection *sym_sec,
 		      unsigned char st_type,
-		      struct elf_aarch64_link_hash_entry *hash,
 		      bfd_vma destination)
 {
   bfd_vma location;
   bfd_signed_vma branch_offset;
   unsigned int r_type;
-  struct elf_aarch64_link_hash_table *globals;
   enum elf_aarch64_stub_type stub_type = aarch64_stub_none;
-  bfd_boolean via_plt_p;
 
-  if (st_type != STT_FUNC)
-    return stub_type;
-
-  globals = elf_aarch64_hash_table (info);
-  via_plt_p = (globals->root.splt != NULL && hash != NULL
-	       && hash->root.plt.offset != (bfd_vma) - 1);
-
-  if (via_plt_p)
+  if (st_type != STT_FUNC
+      && (sym_sec == input_sec))
     return stub_type;
 
   /* Determine where the call point is.  */
@@ -2330,6 +2708,22 @@ elfNN_aarch64_stub_name (const asection 
   return stub_name;
 }
 
+/* Return TRUE if symbol H should be hashed in the `.gnu.hash' section.  For
+   executable PLT slots where the executable never takes the address of those
+   functions, the function symbols are not added to the hash table.  */
+
+static bfd_boolean
+elf_aarch64_hash_symbol (struct elf_link_hash_entry *h)
+{
+  if (h->plt.offset != (bfd_vma) -1
+      && !h->def_regular
+      && !h->pointer_equality_needed)
+    return FALSE;
+
+  return _bfd_elf_hash_symbol (h);
+}
+
+
 /* Look up an entry in the stub hash.  Stub entries are cached because
    creating the stub name takes a bit of time.  */
 
@@ -2451,8 +2845,9 @@ _bfd_aarch64_add_stub_entry_in_group (co
 					 TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-			     section->owner, stub_name);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%s: cannot create stub entry %s"),
+			  section->owner, stub_name);
       return NULL;
     }
 
@@ -2479,7 +2874,7 @@ _bfd_aarch64_add_stub_entry_after (const
 					 TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("cannot create stub entry %s"), stub_name);
+      _bfd_error_handler (_("cannot create stub entry %s"), stub_name);
       return NULL;
     }
 
@@ -2663,7 +3058,7 @@ elfNN_aarch64_setup_section_lists (bfd *
 {
   bfd *input_bfd;
   unsigned int bfd_count;
-  int top_id, top_index;
+  unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
   bfd_size_type amt;
@@ -2871,9 +3266,7 @@ group_sections (struct elf_aarch64_link_
    For scalar LD/ST instructions PAIR is FALSE, RT is returned and RT2
    is set equal to RT.
 
-   For LD/ST pair instructions PAIR is TRUE, RT and RT2 are returned.
-
- */
+   For LD/ST pair instructions PAIR is TRUE, RT and RT2 are returned.  */
 
 static bfd_boolean
 aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2,
@@ -3748,8 +4141,8 @@ elfNN_aarch64_size_stubs (bfd *output_bf
 		    }
 
 		  /* Determine what (if any) linker stub is needed.  */
-		  stub_type = aarch64_type_of_stub
-		    (info, section, irela, st_type, hash, destination);
+		  stub_type = aarch64_type_of_stub (section, irela, sym_sec,
+						    st_type, destination);
 		  if (stub_type == aarch64_stub_none)
 		    continue;
 
@@ -3780,7 +4173,7 @@ elfNN_aarch64_size_stubs (bfd *output_bf
 		      goto error_ret_free_internal;
 		    }
 
-		  stub_entry->target_value = sym_value;
+		  stub_entry->target_value = sym_value + irela->r_addend;
 		  stub_entry->target_section = sym_sec;
 		  stub_entry->stub_type = stub_type;
 		  stub_entry->h = hash;
@@ -3953,7 +4346,8 @@ bfd_elfNN_aarch64_set_options (struct bf
 			       int no_enum_warn,
 			       int no_wchar_warn, int pic_veneer,
 			       int fix_erratum_835769,
-			       int fix_erratum_843419)
+			       int fix_erratum_843419,
+			       int no_apply_dynamic_relocs)
 {
   struct elf_aarch64_link_hash_table *globals;
 
@@ -3962,6 +4356,7 @@ bfd_elfNN_aarch64_set_options (struct bf
   globals->fix_erratum_835769 = fix_erratum_835769;
   globals->fix_erratum_843419 = fix_erratum_843419;
   globals->fix_erratum_843419_adr = TRUE;
+  globals->no_apply_dynamic_relocs = no_apply_dynamic_relocs;
 
   BFD_ASSERT (is_aarch64_elf (output_bfd));
   elf_aarch64_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
@@ -3984,8 +4379,8 @@ aarch64_calculate_got_entry_vma (struct 
       BFD_ASSERT (basegot != NULL);
       off = h->got.offset;
       BFD_ASSERT (off != (bfd_vma) - 1);
-      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-	  || (info->shared
+      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+	  || (bfd_link_pic (info)
 	      && SYMBOL_REFERENCES_LOCAL (info, h))
 	  || (ELF_ST_VISIBILITY (h->other)
 	      && h->root.type == bfd_link_hash_undefweak))
@@ -4043,6 +4438,21 @@ aarch64_tls_transition_without_check (bf
 	      ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1
 	      : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19);
 
+    case BFD_RELOC_AARCH64_TLSDESC_LDR:
+      return (is_local
+	      ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC
+	      : BFD_RELOC_AARCH64_NONE);
+
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+      return (is_local
+	      ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+	      : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC);
+
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
+      return (is_local
+	      ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
+	      : BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1);
+
     case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC:
     case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
       return (is_local
@@ -4063,11 +4473,29 @@ aarch64_tls_transition_without_check (bf
 	      ? BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12
 	      : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19);
 
+    case BFD_RELOC_AARCH64_TLSDESC_ADD:
     case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_CALL:
       /* Instructions with these relocations will become NOPs.  */
       return BFD_RELOC_AARCH64_NONE;
 
+    case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
+      return is_local ? BFD_RELOC_AARCH64_NONE : r_type;
+
+#if ARCH_SIZE == 64
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+      return is_local
+	? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+	: BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC;
+
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+      return is_local
+	? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
+	: BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1;
+#endif
+
     default:
       break;
     }
@@ -4084,15 +4512,24 @@ aarch64_reloc_got_type (bfd_reloc_code_r
     case BFD_RELOC_AARCH64_GOT_LD_PREL19:
     case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
     case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
     case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
     case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
       return GOT_NORMAL;
 
     case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
       return GOT_TLS_GD;
 
+    case BFD_RELOC_AARCH64_TLSDESC_ADD:
     case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
@@ -4100,24 +4537,19 @@ aarch64_reloc_got_type (bfd_reloc_code_r
     case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
+    case BFD_RELOC_AARCH64_TLSDESC_LDR:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
       return GOT_TLSDESC_GD;
 
     case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
     case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
       return GOT_TLS_IE;
 
-    case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
-    case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
-    case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
-    case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
-    case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
-    case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
-    case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
-    case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
-      return GOT_UNKNOWN;
-
     default:
       break;
     }
@@ -4134,7 +4566,7 @@ aarch64_can_relax_tls (bfd *input_bfd,
   unsigned int symbol_got_type;
   unsigned int reloc_got_type;
 
-  if (! IS_AARCH64_TLS_RELOC (r_type))
+  if (! IS_AARCH64_TLS_RELAX_RELOC (r_type))
     return FALSE;
 
   symbol_got_type = elfNN_aarch64_symbol_got_type (h, input_bfd, r_symndx);
@@ -4143,7 +4575,7 @@ aarch64_can_relax_tls (bfd *input_bfd,
   if (symbol_got_type == GOT_TLS_IE && GOT_TLS_GD_ANY_P (reloc_got_type))
     return TRUE;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     return FALSE;
 
   if  (h && h->root.type == bfd_link_hash_undefweak)
@@ -4338,9 +4770,9 @@ make_branch_to_erratum_835769_stub (stru
 
   abfd = stub_entry->target_section->owner;
   if (!aarch64_valid_branch_p (veneer_entry_loc, veneered_insn_loc))
-	    (*_bfd_error_handler)
-		(_("%B: error: Erratum 835769 stub out "
-		   "of range (input file too large)"), abfd);
+    _bfd_error_handler
+      (_("%B: error: Erratum 835769 stub out "
+	 "of range (input file too large)"), abfd);
 
   target = stub_entry->target_value;
   branch_insn = 0x14000000;
@@ -4419,7 +4851,7 @@ _bfd_aarch64_erratum_843419_branch_to_st
 
       abfd = stub_entry->target_section->owner;
       if (!aarch64_valid_branch_p (veneer_entry_loc, veneered_insn_loc))
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%B: error: Erratum 843419 stub out "
 	     "of range (input file too large)"), abfd);
 
@@ -4472,7 +4904,9 @@ elfNN_aarch64_write_section (bfd *output
   return FALSE;
 }
 
-/* Perform a relocation as part of a final link.  */
+/* Perform a relocation as part of a final link.  The input relocation type
+   should be TLS relaxed.  */
+
 static bfd_reloc_status_type
 elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
 				   bfd *input_bfd,
@@ -4493,7 +4927,6 @@ elfNN_aarch64_final_link_relocate (reloc
   unsigned int r_type = howto->type;
   bfd_reloc_code_real_type bfd_r_type
     = elfNN_aarch64_bfd_reloc_from_howto (howto);
-  bfd_reloc_code_real_type new_bfd_r_type;
   unsigned long r_symndx;
   bfd_byte *hit_data = contents + rel->r_offset;
   bfd_vma place, off;
@@ -4510,17 +4943,6 @@ elfNN_aarch64_final_link_relocate (reloc
 
   r_symndx = ELFNN_R_SYM (rel->r_info);
 
-  /* It is possible to have linker relaxations on some TLS access
-     models.  Update our information here.  */
-  new_bfd_r_type = aarch64_tls_transition (input_bfd, info, r_type, h, r_symndx);
-  if (new_bfd_r_type != bfd_r_type)
-    {
-      bfd_r_type = new_bfd_r_type;
-      howto = elfNN_aarch64_howto_from_bfd_reloc (bfd_r_type);
-      BFD_ASSERT (howto != NULL);
-      r_type = howto->type;
-    }
-
   place = input_section->output_section->vma
     + input_section->output_offset + rel->r_offset;
 
@@ -4558,7 +4980,8 @@ elfNN_aarch64_final_link_relocate (reloc
 	  else
 	    name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 				     NULL);
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: relocation %s against STT_GNU_IFUNC "
 	       "symbol `%s' isn't handled by %s"), input_bfd,
 	     howto->name, name, __FUNCTION__);
@@ -4573,7 +4996,8 @@ elfNN_aarch64_final_link_relocate (reloc
 	      else
 		name = bfd_elf_sym_name (input_bfd, symtab_hdr,
 					 sym, NULL);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against STT_GNU_IFUNC "
 		   "symbol `%s' has non-zero addend: %d"),
 		 input_bfd, howto->name, name, rel->r_addend);
@@ -4583,7 +5007,7 @@ elfNN_aarch64_final_link_relocate (reloc
 
 	  /* Generate dynamic relocation only when there is a
 	     non-GOT reference in a shared object.  */
-	  if (info->shared && h->non_got_ref)
+	  if (bfd_link_pic (info) && h->non_got_ref)
 	    {
 	      Elf_Internal_Rela outrel;
 	      asection *sreloc;
@@ -4603,7 +5027,7 @@ elfNN_aarch64_final_link_relocate (reloc
 
 	      if (h->dynindx == -1
 		  || h->forced_local
-		  || info->executable)
+		  || bfd_link_executable (info))
 		{
 		  /* This symbol is resolved locally.  */
 		  outrel.r_info = ELFNN_R_INFO (0, AARCH64_R (IRELATIVE));
@@ -4640,6 +5064,9 @@ elfNN_aarch64_final_link_relocate (reloc
 	case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
 	case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
 	case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+	case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
 	case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
 	  base_got = globals->root.sgot;
 	  off = h->got.offset;
@@ -4699,10 +5126,23 @@ elfNN_aarch64_final_link_relocate (reloc
 	    value = aarch64_calculate_got_entry_vma (h, globals, info,
 						     value, output_bfd,
 						     unresolved_reloc_p);
-	  if (bfd_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
-	      || bfd_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14)
-	    addend = (globals->root.sgot->output_section->vma
-		      + globals->root.sgot->output_offset);
+
+	  switch (bfd_r_type)
+	    {
+	    case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
+	    case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
+	      addend = (globals->root.sgot->output_section->vma
+			+ globals->root.sgot->output_offset);
+	      break;
+	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+	    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
+	      value = (value - globals->root.sgot->output_section->vma
+		       - globals->root.sgot->output_offset);
+	    default:
+	      break;
+	    }
+
 	  value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
 						       addend, weak_undef_p);
 	  return _bfd_aarch64_elf_put_addend (input_bfd, hit_data, bfd_r_type, howto, value);
@@ -4715,7 +5155,9 @@ elfNN_aarch64_final_link_relocate (reloc
   switch (bfd_r_type)
     {
     case BFD_RELOC_AARCH64_NONE:
+    case BFD_RELOC_AARCH64_TLSDESC_ADD:
     case BFD_RELOC_AARCH64_TLSDESC_CALL:
+    case BFD_RELOC_AARCH64_TLSDESC_LDR:
       *unresolved_reloc_p = FALSE;
       return bfd_reloc_ok;
 
@@ -4724,7 +5166,8 @@ elfNN_aarch64_final_link_relocate (reloc
       /* When generating a shared object or relocatable executable, these
          relocations are copied into the output file to be resolved at
          run time.  */
-      if (((info->shared == TRUE) || globals->root.is_relocatable_executable)
+      if (((bfd_link_pic (info) == TRUE)
+	   || globals->root.is_relocatable_executable)
 	  && (input_section->flags & SEC_ALLOC)
 	  && (h == NULL
 	      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -4759,7 +5202,10 @@ elfNN_aarch64_final_link_relocate (reloc
 	    memset (&outrel, 0, sizeof outrel);
 	  else if (h != NULL
 		   && h->dynindx != -1
-		   && (!info->shared || !SYMBOLIC_BIND (info, h) || !h->def_regular))
+		   && (!bfd_link_pic (info)
+		       || !(bfd_link_pie (info)
+			    || SYMBOLIC_BIND (info, h))
+		       || !h->def_regular))
 	    outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type);
 	  else
 	    {
@@ -4769,6 +5215,7 @@ elfNN_aarch64_final_link_relocate (reloc
 		 relocate the text and data segments independently,
 		 so the symbol does not matter.  */
 	      symbol = 0;
+	      relocate = globals->no_apply_dynamic_relocs ? FALSE : TRUE;
 	      outrel.r_info = ELFNN_R_INFO (symbol, AARCH64_R (RELATIVE));
 	      outrel.r_addend += value;
 	    }
@@ -4822,38 +5269,38 @@ elfNN_aarch64_final_link_relocate (reloc
 	/* If the call goes through a PLT entry, make sure to
 	   check distance to the right destination address.  */
 	if (via_plt_p)
-	  {
-	    value = (splt->output_section->vma
-		     + splt->output_offset + h->plt.offset);
-	    *unresolved_reloc_p = FALSE;
-	  }
+	  value = (splt->output_section->vma
+		   + splt->output_offset + h->plt.offset);
 
-	/* If the target symbol is global and marked as a function the
-	   relocation applies a function call or a tail call.  In this
-	   situation we can veneer out of range branches.  The veneers
-	   use IP0 and IP1 hence cannot be used arbitrary out of range
-	   branches that occur within the body of a function.  */
-	if (h && h->type == STT_FUNC)
+	/* Check if a stub has to be inserted because the destination
+	   is too far away.  */
+	struct elf_aarch64_stub_hash_entry *stub_entry = NULL;
+
+	/* If the branch destination is directed to plt stub, "value" will be
+	   the final destination, otherwise we should plus signed_addend, it may
+	   contain non-zero value, for example call to local function symbol
+	   which are turned into "sec_sym + sec_off", and sec_off is kept in
+	   signed_addend.  */
+	if (! aarch64_valid_branch_p (via_plt_p ? value : value + signed_addend,
+				      place))
+	  /* The target is out of reach, so redirect the branch to
+	     the local stub for this function.  */
+	stub_entry = elfNN_aarch64_get_stub_entry (input_section, sym_sec, h,
+						   rel, globals);
+	if (stub_entry != NULL)
 	  {
-	    /* Check if a stub has to be inserted because the destination
-	       is too far away.  */
-	    if (! aarch64_valid_branch_p (value, place))
-	      {
-		/* The target is out of reach, so redirect the branch to
-		   the local stub for this function.  */
-		struct elf_aarch64_stub_hash_entry *stub_entry;
-		stub_entry = elfNN_aarch64_get_stub_entry (input_section,
-							   sym_sec, h,
-							   rel, globals);
-		if (stub_entry != NULL)
-		  value = (stub_entry->stub_offset
-			   + stub_entry->stub_sec->output_offset
-			   + stub_entry->stub_sec->output_section->vma);
-	      }
+	    value = (stub_entry->stub_offset
+		     + stub_entry->stub_sec->output_offset
+		     + stub_entry->stub_sec->output_section->vma);
+
+	    /* We have redirected the destination to stub entry address,
+	       so ignore any addend record in the original rela entry.  */
+	    signed_addend = 0;
 	  }
       }
       value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
 						   signed_addend, weak_undef_p);
+      *unresolved_reloc_p = FALSE;
       break;
 
     case BFD_RELOC_AARCH64_16_PCREL:
@@ -4863,7 +5310,7 @@ elfNN_aarch64_final_link_relocate (reloc
     case BFD_RELOC_AARCH64_ADR_HI21_PCREL:
     case BFD_RELOC_AARCH64_ADR_LO21_PCREL:
     case BFD_RELOC_AARCH64_LD_LO19_PCREL:
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (input_section->flags & SEC_ALLOC) != 0
 	  && (input_section->flags & SEC_READONLY) != 0
 	  && h != NULL
@@ -4871,7 +5318,8 @@ elfNN_aarch64_final_link_relocate (reloc
 	{
 	  int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
 
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: relocation %s against external symbol `%s' can not be used"
 	       " when making a shared object; recompile with -fPIC"),
 	     input_bfd, elfNN_aarch64_howto_table[howto_index].name,
@@ -4879,6 +5327,7 @@ elfNN_aarch64_final_link_relocate (reloc
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
+      /* Fall through.  */
 
     case BFD_RELOC_AARCH64_16:
 #if ARCH_SIZE == 64
@@ -4937,7 +5386,8 @@ elfNN_aarch64_final_link_relocate (reloc
 	if (locals == NULL)
 	  {
 	    int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%B: Local symbol descriptor table be NULL when applying "
 		 "relocation %s against local symbol"),
 	       input_bfd, elfNN_aarch64_howto_table[howto_index].name);
@@ -4953,7 +5403,7 @@ elfNN_aarch64_final_link_relocate (reloc
 	  {
 	    bfd_put_64 (output_bfd, value, base_got->contents + off);
 
-	    if (info->shared)
+	    if (bfd_link_pic (info))
 	      {
 		asection *s;
 		Elf_Internal_Rela outrel;
@@ -4973,21 +5423,88 @@ elfNN_aarch64_final_link_relocate (reloc
 		elf_append_rela (output_bfd, s, &outrel);
 	      }
 
-	    symbol_got_offset_mark (input_bfd, h, r_symndx);
-	  }
+	    symbol_got_offset_mark (input_bfd, h, r_symndx);
+	  }
+
+	/* Update the relocation value to GOT entry addr as we have transformed
+	   the direct data access into indirect data access through GOT.  */
+	value = got_entry_addr;
+
+	if (bfd_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
+	    || bfd_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14)
+	  addend = base_got->output_section->vma + base_got->output_offset;
+
+	value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
+						     addend, weak_undef_p);
+      }
+
+      break;
+
+    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+      if (h != NULL)
+	  value = aarch64_calculate_got_entry_vma (h, globals, info, value,
+						   output_bfd,
+						   unresolved_reloc_p);
+      else
+	{
+	  struct elf_aarch64_local_symbol *locals
+	    = elf_aarch64_locals (input_bfd);
+
+	  if (locals == NULL)
+	    {
+	      int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%B: Local symbol descriptor table be NULL when applying "
+		   "relocation %s against local symbol"),
+		 input_bfd, elfNN_aarch64_howto_table[howto_index].name);
+	      abort ();
+	    }
+
+	  off = symbol_got_offset (input_bfd, h, r_symndx);
+	  base_got = globals->root.sgot;
+	  if (base_got == NULL)
+	    abort ();
+
+	  bfd_vma got_entry_addr = (base_got->output_section->vma
+				    + base_got->output_offset + off);
 
-	/* Update the relocation value to GOT entry addr as we have transformed
-	   the direct data access into indirect data access through GOT.  */
-	value = got_entry_addr;
+	  if (!symbol_got_offset_mark_p (input_bfd, h, r_symndx))
+	    {
+	      bfd_put_64 (output_bfd, value, base_got->contents + off);
 
-	if (bfd_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
-	    || bfd_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14)
-	  addend = base_got->output_section->vma + base_got->output_offset;
+	      if (bfd_link_pic (info))
+		{
+		  asection *s;
+		  Elf_Internal_Rela outrel;
 
-	value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
-						     addend, weak_undef_p);
-      }
+		  /* For local symbol, we have done absolute relocation in static
+		     linking stage.  While for share library, we need to update
+		     the content of GOT entry according to the share objects
+		     loading base address.  So we need to generate a
+		     R_AARCH64_RELATIVE reloc for dynamic linker.  */
+		  s = globals->root.srelgot;
+		  if (s == NULL)
+		    abort ();
+
+		  outrel.r_offset = got_entry_addr;
+		  outrel.r_info = ELFNN_R_INFO (0, AARCH64_R (RELATIVE));
+		  outrel.r_addend = value;
+		  elf_append_rela (output_bfd, s, &outrel);
+		}
+
+	      symbol_got_offset_mark (input_bfd, h, r_symndx);
+	    }
+	}
 
+      /* Update the relocation value to GOT entry addr as we have transformed
+	 the direct data access into indirect data access through GOT.  */
+      value = symbol_got_offset (input_bfd, h, r_symndx);
+      value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
+						   0, weak_undef_p);
+      *unresolved_reloc_p = FALSE;
       break;
 
     case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
@@ -4997,6 +5514,9 @@ elfNN_aarch64_final_link_relocate (reloc
     case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
       if (globals->root.sgot == NULL)
 	return bfd_reloc_notsupported;
 
@@ -5009,6 +5529,40 @@ elfNN_aarch64_final_link_relocate (reloc
       *unresolved_reloc_p = FALSE;
       break;
 
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
+      if (globals->root.sgot == NULL)
+	return bfd_reloc_notsupported;
+
+      value = symbol_got_offset (input_bfd, h, r_symndx);
+      value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
+						   0, weak_undef_p);
+      *unresolved_reloc_p = FALSE;
+      break;
+
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2:
+      value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
+						   signed_addend - dtpoff_base (info),
+						   weak_undef_p);
+      break;
+
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
@@ -5023,13 +5577,11 @@ elfNN_aarch64_final_link_relocate (reloc
       *unresolved_reloc_p = FALSE;
       break;
 
-    case BFD_RELOC_AARCH64_TLSDESC_ADD:
     case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
     case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
-    case BFD_RELOC_AARCH64_TLSDESC_LDR:
     case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
       if (globals->root.sgot == NULL)
 	return bfd_reloc_notsupported;
@@ -5043,6 +5595,24 @@ elfNN_aarch64_final_link_relocate (reloc
       *unresolved_reloc_p = FALSE;
       break;
 
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
+      if (globals->root.sgot == NULL)
+	return bfd_reloc_notsupported;
+
+      value = (symbol_tlsdesc_got_offset (input_bfd, h, r_symndx)
+	       + globals->root.sgotplt->output_section->vma
+	       + globals->root.sgotplt->output_offset
+	       + globals->sgotplt_jump_table_size);
+
+      value -= (globals->root.sgot->output_section->vma
+		+ globals->root.sgot->output_offset);
+
+      value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
+						   0, weak_undef_p);
+      *unresolved_reloc_p = FALSE;
+      break;
+
     default:
       return bfd_reloc_notsupported;
     }
@@ -5058,6 +5628,35 @@ elfNN_aarch64_final_link_relocate (reloc
 				      howto, value);
 }
 
+/* LP64 and ILP32 operates on x- and w-registers respectively.
+   Next definitions take into account the difference between
+   corresponding machine codes. R means x-register if the target
+   arch is LP64, and w-register if the target is ILP32.  */
+
+#if ARCH_SIZE == 64
+# define add_R0_R0	(0x91000000)
+# define add_R0_R0_R1	(0x8b000020)
+# define add_R0_R1	(0x91400020)
+# define ldr_R0		(0x58000000)
+# define ldr_R0_mask(i)	(i & 0xffffffe0)
+# define ldr_R0_x0	(0xf9400000)
+# define ldr_hw_R0	(0xf2a00000)
+# define movk_R0	(0xf2800000)
+# define movz_R0	(0xd2a00000)
+# define movz_hw_R0	(0xd2c00000)
+#else /*ARCH_SIZE == 32 */
+# define add_R0_R0	(0x11000000)
+# define add_R0_R0_R1	(0x0b000020)
+# define add_R0_R1	(0x11400020)
+# define ldr_R0		(0x18000000)
+# define ldr_R0_mask(i)	(i & 0xbfffffe0)
+# define ldr_R0_x0	(0xb9400000)
+# define ldr_hw_R0	(0x72a00000)
+# define movk_R0	(0x72800000)
+# define movz_R0	(0x52a00000)
+# define movz_hw_R0	(0x52c00000)
+#endif
+
 /* Handle TLS relaxations.  Relaxing is possible for symbols that use
    R_AARCH64_TLSDESC_ADR_{PAGE, LD64_LO12_NC, ADD_LO12_NC} during a static
    link.
@@ -5084,11 +5683,12 @@ elfNN_aarch64_tls_relax (struct elf_aarc
       if (is_local)
 	{
 	  /* GD->LE relaxation:
-	     adrp x0, :tlsgd:var     =>   movz x0, :tprel_g1:var
+	     adrp x0, :tlsgd:var     =>   movz R0, :tprel_g1:var
 	     or
-	     adrp x0, :tlsdesc:var   =>   movz x0, :tprel_g1:var
-	   */
-	  bfd_putl32 (0xd2a00000, contents + rel->r_offset);
+	     adrp x0, :tlsdesc:var   =>   movz R0, :tprel_g1:var
+
+	     Where R is x for LP64, and w for ILP32.  */
+	  bfd_putl32 (movz_R0, contents + rel->r_offset);
 	  return bfd_reloc_continue;
 	}
       else
@@ -5109,11 +5709,12 @@ elfNN_aarch64_tls_relax (struct elf_aarc
       if (is_local)
 	{
 	  /* Tiny TLSDESC->LE relaxation:
-	     ldr   x1, :tlsdesc:var      =>  movz  x0, #:tprel_g1:var
-	     adr   x0, :tlsdesc:var      =>  movk  x0, #:tprel_g0_nc:var
+	     ldr   x1, :tlsdesc:var      =>  movz  R0, #:tprel_g1:var
+	     adr   x0, :tlsdesc:var      =>  movk  R0, #:tprel_g0_nc:var
 	     .tlsdesccall var
 	     blr   x1                    =>  nop
-	   */
+
+	     Where R is x for LP64, and w for ILP32.  */
 	  BFD_ASSERT (ELFNN_R_TYPE (rel[1].r_info) == AARCH64_R (TLSDESC_ADR_PREL21));
 	  BFD_ASSERT (ELFNN_R_TYPE (rel[2].r_info) == AARCH64_R (TLSDESC_CALL));
 
@@ -5121,8 +5722,8 @@ elfNN_aarch64_tls_relax (struct elf_aarc
 					AARCH64_R (TLSLE_MOVW_TPREL_G0_NC));
 	  rel[2].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 
-	  bfd_putl32 (0xd2a00000, contents + rel->r_offset);
-	  bfd_putl32 (0xf2800000, contents + rel->r_offset + 4);
+	  bfd_putl32 (movz_R0, contents + rel->r_offset);
+	  bfd_putl32 (movk_R0, contents + rel->r_offset + 4);
 	  bfd_putl32 (INSN_NOP, contents + rel->r_offset + 8);
 	  return bfd_reloc_continue;
 	}
@@ -5140,7 +5741,7 @@ elfNN_aarch64_tls_relax (struct elf_aarc
 	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 	  rel[2].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 
-	  bfd_putl32 (0x58000000, contents + rel->r_offset);
+	  bfd_putl32 (ldr_R0, contents + rel->r_offset);
 	  bfd_putl32 (INSN_NOP, contents + rel->r_offset + 4);
 	  bfd_putl32 (INSN_NOP, contents + rel->r_offset + 8);
 	  return bfd_reloc_continue;
@@ -5151,16 +5752,17 @@ elfNN_aarch64_tls_relax (struct elf_aarc
 	{
 	  /* Tiny GD->LE relaxation:
 	     adr x0, :tlsgd:var      =>   mrs  x1, tpidr_el0
-             bl   __tls_get_addr     =>   add  x0, x1, #:tprel_hi12:x, lsl #12
-             nop                     =>   add  x0, x0, #:tprel_lo12_nc:x
-	   */
+             bl   __tls_get_addr     =>   add  R0, R1, #:tprel_hi12:x, lsl #12
+             nop                     =>   add  R0, R0, #:tprel_lo12_nc:x
+
+	     Where R is x for LP64, and x for Ilp32.  */
 
 	  /* First kill the tls_get_addr reloc on the bl instruction.  */
 	  BFD_ASSERT (rel->r_offset + 4 == rel[1].r_offset);
 
 	  bfd_putl32 (0xd53bd041, contents + rel->r_offset + 0);
-	  bfd_putl32 (0x91400020, contents + rel->r_offset + 4);
-	  bfd_putl32 (0x91000000, contents + rel->r_offset + 8);
+	  bfd_putl32 (add_R0_R1, contents + rel->r_offset + 4);
+	  bfd_putl32 (add_R0_R0, contents + rel->r_offset + 8);
 
 	  rel[1].r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info),
 					AARCH64_R (TLSLE_ADD_TPREL_LO12_NC));
@@ -5176,21 +5778,68 @@ elfNN_aarch64_tls_relax (struct elf_aarc
       else
 	{
 	  /* Tiny GD->IE relaxation:
-	     adr x0, :tlsgd:var	     =>   ldr  x0, :gottprel:var
+	     adr x0, :tlsgd:var	     =>   ldr  R0, :gottprel:var
 	     bl   __tls_get_addr     =>   mrs  x1, tpidr_el0
-	     nop                     =>   add  x0, x0, x1
-	   */
+	     nop                     =>   add  R0, R0, R1
+
+	     Where R is x for LP64, and w for Ilp32.  */
 
 	  /* First kill the tls_get_addr reloc on the bl instruction.  */
 	  BFD_ASSERT (rel->r_offset + 4 == rel[1].r_offset);
 	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 
-	  bfd_putl32 (0x58000000, contents + rel->r_offset);
+	  bfd_putl32 (ldr_R0, contents + rel->r_offset);
 	  bfd_putl32 (0xd53bd041, contents + rel->r_offset + 4);
-	  bfd_putl32 (0x8b000020, contents + rel->r_offset + 8);
+	  bfd_putl32 (add_R0_R0_R1, contents + rel->r_offset + 8);
 	  return bfd_reloc_continue;
 	}
 
+#if ARCH_SIZE == 64
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+      BFD_ASSERT (ELFNN_R_TYPE (rel[1].r_info) == AARCH64_R (TLSGD_MOVW_G0_NC));
+      BFD_ASSERT (rel->r_offset + 12 == rel[2].r_offset);
+      BFD_ASSERT (ELFNN_R_TYPE (rel[2].r_info) == AARCH64_R (CALL26));
+
+      if (is_local)
+	{
+	  /* Large GD->LE relaxation:
+	     movz x0, #:tlsgd_g1:var    => movz x0, #:tprel_g2:var, lsl #32
+	     movk x0, #:tlsgd_g0_nc:var => movk x0, #:tprel_g1_nc:var, lsl #16
+	     add x0, gp, x0             => movk x0, #:tprel_g0_nc:var
+	     bl __tls_get_addr          => mrs x1, tpidr_el0
+	     nop                        => add x0, x0, x1
+	   */
+	  rel[2].r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info),
+					AARCH64_R (TLSLE_MOVW_TPREL_G0_NC));
+	  rel[2].r_offset = rel->r_offset + 8;
+
+	  bfd_putl32 (movz_hw_R0, contents + rel->r_offset + 0);
+	  bfd_putl32 (ldr_hw_R0, contents + rel->r_offset + 4);
+	  bfd_putl32 (movk_R0, contents + rel->r_offset + 8);
+	  bfd_putl32 (0xd53bd041, contents + rel->r_offset + 12);
+	  bfd_putl32 (add_R0_R0_R1, contents + rel->r_offset + 16);
+	}
+      else
+	{
+	  /* Large GD->IE relaxation:
+	     movz x0, #:tlsgd_g1:var    => movz x0, #:gottprel_g1:var, lsl #16
+	     movk x0, #:tlsgd_g0_nc:var => movk x0, #:gottprel_g0_nc:var
+	     add x0, gp, x0             => ldr x0, [gp, x0]
+	     bl __tls_get_addr          => mrs x1, tpidr_el0
+	     nop                        => add x0, x0, x1
+	   */
+	  rel[2].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
+	  bfd_putl32 (0xd2a80000, contents + rel->r_offset + 0);
+	  bfd_putl32 (ldr_R0, contents + rel->r_offset + 8);
+	  bfd_putl32 (0xd53bd041, contents + rel->r_offset + 12);
+	  bfd_putl32 (add_R0_R0_R1, contents + rel->r_offset + 16);
+	}
+      return bfd_reloc_continue;
+
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+      return bfd_reloc_continue;
+#endif
+
     case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
       return bfd_reloc_continue;
 
@@ -5199,18 +5848,19 @@ elfNN_aarch64_tls_relax (struct elf_aarc
 	{
 	  /* GD->LE relaxation:
 	     ldr xd, [x0, #:tlsdesc_lo12:var]   =>   movk x0, :tprel_g0_nc:var
-	   */
-	  bfd_putl32 (0xf2800000, contents + rel->r_offset);
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
+	  bfd_putl32 (movk_R0, contents + rel->r_offset);
 	  return bfd_reloc_continue;
 	}
       else
 	{
 	  /* GD->IE relaxation:
-	     ldr xd, [x0, #:tlsdesc_lo12:var] => ldr x0, [x0, #:gottprel_lo12:var]
-	   */
+	     ldr xd, [x0, #:tlsdesc_lo12:var] => ldr R0, [x0, #:gottprel_lo12:var]
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
 	  insn = bfd_getl32 (contents + rel->r_offset);
-	  insn &= 0xffffffe0;
-	  bfd_putl32 (insn, contents + rel->r_offset);
+	  bfd_putl32 (ldr_R0_mask (insn), contents + rel->r_offset);
 	  return bfd_reloc_continue;
 	}
 
@@ -5218,44 +5868,46 @@ elfNN_aarch64_tls_relax (struct elf_aarc
       if (is_local)
 	{
 	  /* GD->LE relaxation
-	     add  x0, #:tlsgd_lo12:var  => movk x0, :tprel_g0_nc:var
+	     add  x0, #:tlsgd_lo12:var  => movk R0, :tprel_g0_nc:var
 	     bl   __tls_get_addr        => mrs  x1, tpidr_el0
-	     nop                        => add  x0, x1, x0
-	   */
+	     nop                        => add  R0, R1, R0
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
 
 	  /* First kill the tls_get_addr reloc on the bl instruction.  */
 	  BFD_ASSERT (rel->r_offset + 4 == rel[1].r_offset);
 	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 
-	  bfd_putl32 (0xf2800000, contents + rel->r_offset);
+	  bfd_putl32 (movk_R0, contents + rel->r_offset);
 	  bfd_putl32 (0xd53bd041, contents + rel->r_offset + 4);
-	  bfd_putl32 (0x8b000020, contents + rel->r_offset + 8);
+	  bfd_putl32 (add_R0_R0_R1, contents + rel->r_offset + 8);
 	  return bfd_reloc_continue;
 	}
       else
 	{
 	  /* GD->IE relaxation
-	     ADD  x0, #:tlsgd_lo12:var  => ldr  x0, [x0, #:gottprel_lo12:var]
+	     ADD  x0, #:tlsgd_lo12:var  => ldr  R0, [x0, #:gottprel_lo12:var]
 	     BL   __tls_get_addr        => mrs  x1, tpidr_el0
 	       R_AARCH64_CALL26
-	     NOP                        => add  x0, x1, x0
-	   */
+	     NOP                        => add  R0, R1, R0
+
+	     Where R is x for lp64 mode, and w for ilp32 mode.  */
 
 	  BFD_ASSERT (ELFNN_R_TYPE (rel[1].r_info) == AARCH64_R (CALL26));
 
 	  /* Remove the relocation on the BL instruction.  */
 	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
 
-	  bfd_putl32 (0xf9400000, contents + rel->r_offset);
-
 	  /* We choose to fixup the BL and NOP instructions using the
 	     offset from the second relocation to allow flexibility in
 	     scheduling instructions between the ADD and BL.  */
+	  bfd_putl32 (ldr_R0_x0, contents + rel->r_offset);
 	  bfd_putl32 (0xd53bd041, contents + rel[1].r_offset);
-	  bfd_putl32 (0x8b000020, contents + rel[1].r_offset + 4);
+	  bfd_putl32 (add_R0_R0_R1, contents + rel[1].r_offset + 4);
 	  return bfd_reloc_continue;
 	}
 
+    case BFD_RELOC_AARCH64_TLSDESC_ADD:
     case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSDESC_CALL:
       /* GD->IE/LE relaxation:
@@ -5265,25 +5917,129 @@ elfNN_aarch64_tls_relax (struct elf_aarc
       bfd_putl32 (INSN_NOP, contents + rel->r_offset);
       return bfd_reloc_ok;
 
+    case BFD_RELOC_AARCH64_TLSDESC_LDR:
+      if (is_local)
+	{
+	  /* GD->LE relaxation:
+	     ldr xd, [gp, xn]   =>   movk R0, #:tprel_g0_nc:var
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
+	  bfd_putl32 (movk_R0, contents + rel->r_offset);
+	  return bfd_reloc_continue;
+	}
+      else
+	{
+	  /* GD->IE relaxation:
+	     ldr xd, [gp, xn]   =>   ldr R0, [gp, xn]
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
+	  insn = bfd_getl32 (contents + rel->r_offset);
+	  bfd_putl32 (ldr_R0_mask (insn), contents + rel->r_offset);
+	  return bfd_reloc_ok;
+	}
+
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+      /* GD->LE relaxation:
+	 movk xd, #:tlsdesc_off_g0_nc:var => movk R0, #:tprel_g1_nc:var, lsl #16
+	 GD->IE relaxation:
+	 movk xd, #:tlsdesc_off_g0_nc:var => movk Rd, #:gottprel_g0_nc:var
+
+	 Where R is x for lp64 mode, and w for ILP32 mode.  */
+      if (is_local)
+	bfd_putl32 (ldr_hw_R0, contents + rel->r_offset);
+      return bfd_reloc_continue;
+
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
+      if (is_local)
+	{
+	  /* GD->LE relaxation:
+	     movz xd, #:tlsdesc_off_g1:var => movz R0, #:tprel_g2:var, lsl #32
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
+	  bfd_putl32 (movz_hw_R0, contents + rel->r_offset);
+	  return bfd_reloc_continue;
+	}
+      else
+	{
+	  /*  GD->IE relaxation:
+	      movz xd, #:tlsdesc_off_g1:var => movz Rd, #:gottprel_g1:var, lsl #16
+
+	     Where R is x for lp64 mode, and w for ILP32 mode.  */
+	  insn = bfd_getl32 (contents + rel->r_offset);
+	  bfd_putl32 (movz_R0 | (insn & 0x1f), contents + rel->r_offset);
+	  return bfd_reloc_continue;
+	}
+
     case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
       /* IE->LE relaxation:
-         adrp xd, :gottprel:var   =>   movz xd, :tprel_g1:var
-       */
+         adrp xd, :gottprel:var   =>   movz Rd, :tprel_g1:var
+
+	 Where R is x for lp64 mode, and w for ILP32 mode.  */
       if (is_local)
 	{
 	  insn = bfd_getl32 (contents + rel->r_offset);
-	  bfd_putl32 (0xd2a00000 | (insn & 0x1f), contents + rel->r_offset);
+	  bfd_putl32 (movz_R0 | (insn & 0x1f), contents + rel->r_offset);
 	}
       return bfd_reloc_continue;
 
     case BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC:
       /* IE->LE relaxation:
-         ldr  xd, [xm, #:gottprel_lo12:var]   =>   movk xd, :tprel_g0_nc:var
-       */
+         ldr  xd, [xm, #:gottprel_lo12:var]   =>   movk Rd, :tprel_g0_nc:var
+
+	 Where R is x for lp64 mode, and w for ILP32 mode.  */
       if (is_local)
 	{
 	  insn = bfd_getl32 (contents + rel->r_offset);
-	  bfd_putl32 (0xf2800000 | (insn & 0x1f), contents + rel->r_offset);
+	  bfd_putl32 (movk_R0 | (insn & 0x1f), contents + rel->r_offset);
+	}
+      return bfd_reloc_continue;
+
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
+      /* LD->LE relaxation (tiny):
+	 adr  x0, :tlsldm:x  => mrs x0, tpidr_el0
+	 bl   __tls_get_addr => add R0, R0, TCB_SIZE
+
+	 Where R is x for lp64 mode, and w for ilp32 mode.  */
+      if (is_local)
+	{
+	  BFD_ASSERT (rel->r_offset + 4 == rel[1].r_offset);
+	  BFD_ASSERT (ELFNN_R_TYPE (rel[1].r_info) == AARCH64_R (CALL26));
+	  /* No need of CALL26 relocation for tls_get_addr.  */
+	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
+	  bfd_putl32 (0xd53bd040, contents + rel->r_offset + 0);
+	  bfd_putl32 (add_R0_R0 | (TCB_SIZE << 10),
+		      contents + rel->r_offset + 4);
+	  return bfd_reloc_ok;
+	}
+      return bfd_reloc_continue;
+
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+      /* LD->LE relaxation (small):
+	 adrp  x0, :tlsldm:x       => mrs x0, tpidr_el0
+       */
+      if (is_local)
+	{
+	  bfd_putl32 (0xd53bd040, contents + rel->r_offset);
+	  return bfd_reloc_ok;
+	}
+      return bfd_reloc_continue;
+
+    case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+      /* LD->LE relaxation (small):
+	 add   x0, #:tlsldm_lo12:x => add R0, R0, TCB_SIZE
+	 bl   __tls_get_addr       => nop
+
+	 Where R is x for lp64 mode, and w for ilp32 mode.  */
+      if (is_local)
+	{
+	  BFD_ASSERT (rel->r_offset + 4 == rel[1].r_offset);
+	  BFD_ASSERT (ELFNN_R_TYPE (rel[1].r_info) == AARCH64_R (CALL26));
+	  /* No need of CALL26 relocation for tls_get_addr.  */
+	  rel[1].r_info = ELFNN_R_INFO (STN_UNDEF, R_AARCH64_NONE);
+	  bfd_putl32 (add_R0_R0 | (TCB_SIZE << 10),
+		      contents + rel->r_offset + 0);
+	  bfd_putl32 (INSN_NOP, contents + rel->r_offset + 4);
+	  return bfd_reloc_ok;
 	}
       return bfd_reloc_continue;
 
@@ -5347,7 +6103,8 @@ elfNN_aarch64_relocate_section (bfd *out
 
       if (howto == NULL)
 	{
-	  (*_bfd_error_handler)
+	  /* xgettext:c-format */
+	  _bfd_error_handler
 	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
 	     input_bfd, input_section, r_type);
 	  return FALSE;
@@ -5370,18 +6127,15 @@ elfNN_aarch64_relocate_section (bfd *out
 	  if (r_type != R_AARCH64_NONE && r_type != R_AARCH64_NULL
 	      && bfd_is_und_section (sec)
 	      && ELF_ST_BIND (sym->st_info) != STB_WEAK)
-	    {
-	      if (!info->callbacks->undefined_symbol
-		  (info, bfd_elf_string_from_elf_section
-		   (input_bfd, symtab_hdr->sh_link, sym->st_name),
-		   input_bfd, input_section, rel->r_offset, TRUE))
-		return FALSE;
-	    }
+	    (*info->callbacks->undefined_symbol)
+	      (info, bfd_elf_string_from_elf_section
+	       (input_bfd, symtab_hdr->sh_link, sym->st_name),
+	       input_bfd, input_section, rel->r_offset, TRUE);
 
 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
 
 	  /* Relocate against local STT_GNU_IFUNC symbol.  */
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 	    {
 	      h = elfNN_aarch64_get_local_sym_hash (globals, input_bfd,
@@ -5410,7 +6164,7 @@ elfNN_aarch64_relocate_section (bfd *out
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL)
@@ -5431,9 +6185,11 @@ elfNN_aarch64_relocate_section (bfd *out
 	      || h->root.type == bfd_link_hash_defweak)
 	  && IS_AARCH64_TLS_RELOC (bfd_r_type) != (sym_type == STT_TLS))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    ((sym_type == STT_TLS
+	      /* xgettext:c-format */
 	      ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+	      /* xgettext:c-format */
 	      : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
 	     input_bfd,
 	     input_section, (long) rel->r_offset, howto->name, name);
@@ -5481,6 +6237,11 @@ elfNN_aarch64_relocate_section (bfd *out
 	case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+	case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
 	  if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx))
 	    {
 	      bfd_boolean need_relocs = FALSE;
@@ -5492,7 +6253,7 @@ elfNN_aarch64_relocate_section (bfd *out
 	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
 
 	      need_relocs =
-		(info->shared || indx != 0) &&
+		(bfd_link_pic (info) || indx != 0) &&
 		(h == NULL
 		 || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		 || h->root.type != bfd_link_hash_undefweak);
@@ -5513,7 +6274,21 @@ elfNN_aarch64_relocate_section (bfd *out
 		    * RELOC_SIZE (htab);
 		  bfd_elfNN_swap_reloca_out (output_bfd, &rela, loc);
 
-		  if (indx == 0)
+		  bfd_reloc_code_real_type real_type =
+		    elfNN_aarch64_bfd_reloc_from_type (r_type);
+
+		  if (real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
+		      || real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
+		      || real_type == BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC)
+		    {
+		      /* For local dynamic, don't generate DTPREL in any case.
+			 Initialize the DTPREL slot into zero, so we get module
+			 base address when invoke runtime TLS resolver.  */
+		      bfd_put_NN (output_bfd, 0,
+				  globals->root.sgot->contents + off
+				  + GOT_ENTRY_SIZE);
+		    }
+		  else if (indx == 0)
 		    {
 		      bfd_put_NN (output_bfd,
 				  relocation - dtpoff_base (info),
@@ -5559,6 +6334,8 @@ elfNN_aarch64_relocate_section (bfd *out
 	case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
 	case BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
 	  if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx))
 	    {
 	      bfd_boolean need_relocs = FALSE;
@@ -5571,7 +6348,7 @@ elfNN_aarch64_relocate_section (bfd *out
 	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
 
 	      need_relocs =
-		(info->shared || indx != 0) &&
+		(bfd_link_pic (info) || indx != 0) &&
 		(h == NULL
 		 || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		 || h->root.type != bfd_link_hash_undefweak);
@@ -5608,21 +6385,13 @@ elfNN_aarch64_relocate_section (bfd *out
 	    }
 	  break;
 
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
-	  break;
-
 	case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
 	case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
 	  if (! symbol_tlsdesc_got_offset_mark_p (input_bfd, h, r_symndx))
 	    {
 	      bfd_boolean need_relocs = FALSE;
@@ -5680,10 +6449,6 @@ elfNN_aarch64_relocate_section (bfd *out
 	  break;
 	}
 
-      if (!save_addend)
-	addend = 0;
-
-
       /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
          because such sections are not SEC_ALLOC and thus ld.so will
          not process them.  */
@@ -5693,9 +6458,9 @@ elfNN_aarch64_relocate_section (bfd *out
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      +rel->r_offset) != (bfd_vma) - 1)
 	{
-	  (*_bfd_error_handler)
-	    (_
-	     ("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	     input_bfd, input_section, (long) rel->r_offset, howto->name,
 	     h->root.root.string);
 	  return FALSE;
@@ -5703,20 +6468,58 @@ elfNN_aarch64_relocate_section (bfd *out
 
       if (r != bfd_reloc_ok && r != bfd_reloc_continue)
 	{
+	  bfd_reloc_code_real_type real_r_type
+	    = elfNN_aarch64_bfd_reloc_from_type (r_type);
+
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      if (!(*info->callbacks->reloc_overflow)
-		  (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
-		   input_bfd, input_section, rel->r_offset))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
+		 input_bfd, input_section, rel->r_offset);
+	      if (real_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
+		  || real_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14)
+		{
+		  (*info->callbacks->warning)
+		    (info,
+		     _("Too many GOT entries for -fpic, "
+		       "please recompile with -fPIC"),
+		     name, input_bfd, input_section, rel->r_offset);
+		  return FALSE;
+		}
+	      /* Overflow can occur when a variable is referenced with a type
+		 that has a larger alignment than the type with which it was
+		 declared. eg:
+		   file1.c: extern int foo; int a (void) { return foo; }
+		   file2.c: char bar, foo, baz;
+		 If the variable is placed into a data section at an offset
+		 that is incompatible with the larger alignment requirement
+		 overflow will occur.  (Strictly speaking this is not overflow
+		 but rather an alignment problem, but the bfd_reloc_ error
+		 enum does not have a value to cover that situation).
+
+		 Try to catch this situation here and provide a more helpful
+		 error message to the user.  */
+	      if (addend & ((1 << howto->rightshift) - 1)
+		  /* FIXME: Are we testing all of the appropriate reloc
+		     types here ?  */
+		  && (real_r_type == BFD_RELOC_AARCH64_LD_LO19_PCREL
+		      || real_r_type == BFD_RELOC_AARCH64_LDST16_LO12
+		      || real_r_type == BFD_RELOC_AARCH64_LDST32_LO12
+		      || real_r_type == BFD_RELOC_AARCH64_LDST64_LO12
+		      || real_r_type == BFD_RELOC_AARCH64_LDST128_LO12))
+		{
+		  info->callbacks->warning
+		    (info, _("One possible cause of this error is that the \
+symbol is being referenced in the indicated code as if it had a larger \
+alignment than was declared where it was defined."),
+		     name, input_bfd, input_section, rel->r_offset);
+		}
 	      break;
 
 	    case bfd_reloc_undefined:
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, name, input_bfd, input_section,
-		     rel->r_offset, TRUE)))
-		return FALSE;
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -5737,13 +6540,14 @@ elfNN_aarch64_relocate_section (bfd *out
 
 	    common_error:
 	      BFD_ASSERT (error_message != NULL);
-	      if (!((*info->callbacks->reloc_dangerous)
-		    (info, error_message, input_bfd, input_section,
-		     rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_dangerous)
+		(info, error_message, input_bfd, input_section, rel->r_offset);
 	      break;
 	    }
 	}
+
+      if (!save_addend)
+	addend = 0;
     }
 
   return TRUE;
@@ -5783,15 +6587,16 @@ elfNN_aarch64_set_private_flags (bfd *ab
    object file when linking.  */
 
 static bfd_boolean
-elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   bfd_boolean flags_compatible = TRUE;
   asection *sec;
 
   /* Check if we have the same endianess.  */
-  if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+  if (!_bfd_generic_verify_endian_match (ibfd, info))
     return FALSE;
 
   if (!is_aarch64_elf (ibfd) || !is_aarch64_elf (obfd))
@@ -5908,7 +6713,7 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd,
   struct elf_aarch64_local_symbol *locals;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = elf_aarch64_hash_table (info);
@@ -5982,29 +6787,33 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd,
 	case BFD_RELOC_AARCH64_GOT_LD_PREL19:
 	case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
 	case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+	case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
 	case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
 	case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
 	case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
 	case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
 	case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
 	case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
 	case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
+	case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
 	  if (h != NULL)
 	    {
 	      if (h->got.refcount > 0)
@@ -6042,7 +6851,7 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd,
 	case BFD_RELOC_AARCH64_MOVW_G2_NC:
 	case BFD_RELOC_AARCH64_MOVW_G3:
 	case BFD_RELOC_AARCH64_NN:
-	  if (h != NULL && info->executable)
+	  if (h != NULL && bfd_link_executable (info))
 	    {
 	      if (h->plt.refcount > 0)
 		h->plt.refcount -= 1;
@@ -6068,7 +6877,7 @@ elfNN_aarch64_adjust_dynamic_symbol (str
 				     struct elf_link_hash_entry *h)
 {
   struct elf_aarch64_link_hash_table *htab;
-  asection *s;
+  asection *s, *srel;
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later,
@@ -6115,7 +6924,7 @@ elfNN_aarch64_adjust_dynamic_symbol (str
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -6145,14 +6954,22 @@ elfNN_aarch64_adjust_dynamic_symbol (str
   /* We must generate a R_AARCH64_COPY reloc to tell the dynamic linker
      to copy the initial value out of the dynamic object and into the
      runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->root.sdynrelro;
+      srel = htab->root.sreldynrelro;
+    }
+  else
+    {
+      s = htab->root.sdynbss;
+      srel = htab->root.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += RELOC_SIZE (htab);
+      srel->size += RELOC_SIZE (htab);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 
 }
@@ -6185,8 +7002,7 @@ aarch64_elf_create_got_section (bfd *abf
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
-  if (s != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   flags = bed->dynamic_sec_flags;
@@ -6251,7 +7067,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 
   struct elf_aarch64_link_hash_table *htab;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_aarch64_elf (abfd));
@@ -6276,8 +7092,8 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd,
-				 r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"), abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -6324,6 +7140,22 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 
       if (h != NULL)
 	{
+	  /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
+	     This shows up in particular in an R_AARCH64_PREL64 in large model
+	     when calculating the pc-relative address to .got section which is
+	     used to initialize the gp register.  */
+	  if (h->root.root.string
+	      && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+	    {
+	      if (htab->root.dynobj == NULL)
+		htab->root.dynobj = abfd;
+
+	      if (! aarch64_elf_create_got_section (htab->root.dynobj, info))
+		return FALSE;
+
+	      BFD_ASSERT (h == htab->root.hgot);
+	    }
+
 	  /* Create the ifunc sections for static executables.  If we
 	     never see an indirect function symbol nor we are building
 	     a static executable, those sections will be empty and
@@ -6341,8 +7173,11 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 	    case BFD_RELOC_AARCH64_JUMP26:
 	    case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
 	    case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+	    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
 	    case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
 	    case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
+	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
 	    case BFD_RELOC_AARCH64_NN:
 	      if (htab->root.dynobj == NULL)
 		htab->root.dynobj = abfd;
@@ -6351,7 +7186,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 	      break;
 	    }
 
-	  /* It is referenced by a non-shared object. */
+	  /* It is referenced by a non-shared object.  */
 	  h->ref_regular = 1;
 	  h->root.non_ir_ref = 1;
 	}
@@ -6367,7 +7202,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 
 	  if (h != NULL)
 	    {
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		h->non_got_ref = 1;
 
 	      h->plt.refcount += 1;
@@ -6376,7 +7211,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 
 	  /* No need to do anything if we're not creating a shared
 	     object.  */
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    break;
 
 	  {
@@ -6454,26 +7289,33 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 	case BFD_RELOC_AARCH64_GOT_LD_PREL19:
 	case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
 	case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+	case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
 	case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
 	case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+	case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
 	case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
 	case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+	case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
 	case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
 	case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+	case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
 	case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
 	case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
 	case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
-	case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
-	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+	case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
+	case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+	case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
 	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
 	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
 	case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
@@ -6545,10 +7387,11 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 	case BFD_RELOC_AARCH64_MOVW_G1_NC:
 	case BFD_RELOC_AARCH64_MOVW_G2_NC:
 	case BFD_RELOC_AARCH64_MOVW_G3:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against `%s' can not be used when making "
 		   "a shared object; recompile with -fPIC"),
 		 abfd, elfNN_aarch64_howto_table[howto_index].name,
@@ -6556,11 +7399,12 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
+	  /* Fall through.  */
 
 	case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL:
 	case BFD_RELOC_AARCH64_ADR_HI21_PCREL:
 	case BFD_RELOC_AARCH64_ADR_LO21_PCREL:
-	  if (h != NULL && info->executable)
+	  if (h != NULL && bfd_link_executable (info))
 	    {
 	      /* If this reloc is in a read-only section, we might
 		 need a copy reloc.  We can't check reliably at this
@@ -6918,38 +7762,6 @@ elfNN_aarch64_output_map_sym (output_arc
   return osi->func (osi->finfo, names[type], &sym, osi->sec, NULL) == 1;
 }
 
-
-
-/* Output mapping symbols for PLT entries associated with H.  */
-
-static bfd_boolean
-elfNN_aarch64_output_plt_map (struct elf_link_hash_entry *h, void *inf)
-{
-  output_arch_syminfo *osi = (output_arch_syminfo *) inf;
-  bfd_vma addr;
-
-  if (h->root.type == bfd_link_hash_indirect)
-    return TRUE;
-
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->plt.offset == (bfd_vma) - 1)
-    return TRUE;
-
-  addr = h->plt.offset;
-  if (addr == 32)
-    {
-      if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr))
-	return FALSE;
-    }
-  return TRUE;
-}
-
-
 /* Output a single local symbol for a generated stub.  */
 
 static bfd_boolean
@@ -7082,13 +7894,11 @@ elfNN_aarch64_output_arch_local_syms (bf
   if (!htab->root.splt || htab->root.splt->size == 0)
     return TRUE;
 
-  /* For now live without mapping symbols for the plt.  */
   osi.sec_shndx = _bfd_elf_section_from_bfd_section
     (output_bfd, htab->root.splt->output_section);
   osi.sec = htab->root.splt;
 
-  elf_link_hash_traverse (&htab->root, elfNN_aarch64_output_plt_map,
-			  (void *) &osi);
+  elfNN_aarch64_output_map_sym (&osi, AARCH64_MAP_INSN, 0);
 
   return TRUE;
 
@@ -7152,24 +7962,11 @@ static bfd_boolean
 elfNN_aarch64_create_dynamic_sections (bfd *dynobj,
 				       struct bfd_link_info *info)
 {
-  struct elf_aarch64_link_hash_table *htab;
-
   /* We need to create .got section.  */
   if (!aarch64_elf_create_got_section (dynobj, info))
     return FALSE;
 
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab = elf_aarch64_hash_table (info);
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->sdynbss || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
+  return _bfd_elf_create_dynamic_sections (dynobj, info);
 }
 
 
@@ -7192,8 +7989,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
      because we will also be presented with the concrete instance of
      the symbol and elfNN_aarch64_copy_indirect_symbol () will have been
      called to copy all relevant data from the generic to the concrete
-     symbol instance.
-   */
+     symbol instance.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
@@ -7218,7 +8014,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
 	    return FALSE;
 	}
 
-      if (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
+      if (bfd_link_pic (info) || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
 	  asection *s = htab->root.splt;
 
@@ -7234,7 +8030,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (!info->shared && !h->def_regular)
+	  if (!bfd_link_pic (info) && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
 	      h->root.u.def.value = h->plt.offset;
@@ -7308,7 +8104,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
 	  htab->root.sgot->size += GOT_ENTRY_SIZE;
 	  if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	       || h->root.type != bfd_link_hash_undefweak)
-	      && (info->shared
+	      && (bfd_link_pic (info)
 		  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	    {
 	      htab->root.srelgot->size += RELOC_SIZE (htab);
@@ -7341,7 +8137,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
 	  indx = h && h->dynindx != -1 ? h->dynindx : 0;
 	  if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	       || h->root.type != bfd_link_hash_undefweak)
-	      && (info->shared
+	      && (bfd_link_pic (info)
 		  || indx != 0
 		  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	    {
@@ -7378,7 +8174,7 @@ elfNN_aarch64_allocate_dynrelocs (struct
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       /* Relocs that use pc_count are those that appear on a call
          insn, or certain REL relocs that can generated via assembly.
@@ -7482,8 +8278,7 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (
      because we will also be presented with the concrete instance of
      the symbol and elfNN_aarch64_copy_indirect_symbol () will have been
      called to copy all relevant data from the generic to the concrete
-     symbol instance.
-   */
+     symbol instance.  */
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
@@ -7501,9 +8296,11 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (
       && h->def_regular)
     return _bfd_elf_allocate_ifunc_dyn_relocs (info, h,
 					       &eh->dyn_relocs,
+					       NULL,
 					       htab->plt_entry_size,
 					       htab->plt_header_size,
-					       GOT_ENTRY_SIZE);
+					       GOT_ENTRY_SIZE,
+					       FALSE);
   return TRUE;
 }
 
@@ -7573,6 +8370,7 @@ aarch64_readonly_dynrelocs (struct elf_l
 
 /* This is the most important function of all . Innocuosly named
    though !  */
+
 static bfd_boolean
 elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 				     struct bfd_link_info *info)
@@ -7590,7 +8388,7 @@ elfNN_aarch64_size_dynamic_sections (bfd
 
   if (htab->root.dynamic_sections_created)
     {
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  if (s == NULL)
@@ -7676,7 +8474,7 @@ elfNN_aarch64_size_dynamic_sections (bfd
 		{
 		}
 
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		{
 		  if (got_type & GOT_TLSDESC_GD)
 		    {
@@ -7769,7 +8567,9 @@ elfNN_aarch64_size_dynamic_sections (bfd
 	  || s == htab->root.sgot
 	  || s == htab->root.sgotplt
 	  || s == htab->root.iplt
-	  || s == htab->root.igotplt || s == htab->sdynbss)
+	  || s == htab->root.igotplt
+	  || s == htab->root.sdynbss
+	  || s == htab->root.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -7801,7 +8601,6 @@ elfNN_aarch64_size_dynamic_sections (bfd
 	     adjust_dynamic_symbol is called, and it is that
 	     function which decides whether anything needs to go
 	     into these sections.  */
-
 	  s->flags |= SEC_EXCLUDE;
 	  continue;
 	}
@@ -7829,7 +8628,7 @@ elfNN_aarch64_size_dynamic_sections (bfd
 #define add_dynamic_entry(TAG, VAL)			\
       _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -7970,7 +8769,7 @@ elfNN_aarch64_create_small_pltn_entry (s
   rela.r_offset = gotplt_entry_address;
 
   if (h->dynindx == -1
-      || ((info->executable
+      || ((bfd_link_executable (info)
 	   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	  && h->def_regular
 	  && h->type == STT_GNU_IFUNC))
@@ -8005,7 +8804,7 @@ elfNN_aarch64_always_size_sections (bfd 
 {
   asection *tls_sec;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   tls_sec = elf_hash_table (info)->tls_sec;
@@ -8041,6 +8840,7 @@ elfNN_aarch64_always_size_sections (bfd 
 
 /* Finish up dynamic symbol handling.  We set the contents of various
    dynamic sections here.  */
+
 static bfd_boolean
 elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd,
 				     struct bfd_link_info *info,
@@ -8075,7 +8875,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd
       /* This symbol has an entry in the procedure linkage table.  Set
 	 it up.	 */
       if ((h->dynindx == -1
-	   && !((h->forced_local || info->executable)
+	   && !((h->forced_local || bfd_link_executable (info))
 		&& h->def_regular
 		&& h->type == STT_GNU_IFUNC))
 	  || plt == NULL
@@ -8120,7 +8920,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd
       if (h->def_regular
 	  && h->type == STT_GNU_IFUNC)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* Generate R_AARCH64_GLOB_DAT.  */
 	      goto do_glob_dat;
@@ -8144,7 +8944,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd
 	      return TRUE;
 	    }
 	}
-      else if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+      else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  if (!h->def_regular)
 	    return FALSE;
@@ -8173,14 +8973,14 @@ do_glob_dat:
   if (h->needs_copy)
     {
       Elf_Internal_Rela rela;
+      asection *s;
       bfd_byte *loc;
 
       /* This symbol needs a copy reloc.  Set it up.  */
-
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
-	  || htab->srelbss == NULL)
+	  || htab->root.srelbss == NULL)
 	abort ();
 
       rela.r_offset = (h->root.u.def.value
@@ -8188,8 +8988,11 @@ do_glob_dat:
 		       + h->root.u.def.section->output_offset);
       rela.r_info = ELFNN_R_INFO (h->dynindx, AARCH64_R (COPY));
       rela.r_addend = 0;
-      loc = htab->srelbss->contents;
-      loc += htab->srelbss->reloc_count++ * RELOC_SIZE (htab);
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	s = htab->root.sreldynrelro;
+      else
+	s = htab->root.srelbss;
+      loc = s->contents + s->reloc_count++ * RELOC_SIZE (htab);
       bfd_elfNN_swap_reloca_out (output_bfd, &rela, loc);
     }
 
@@ -8236,8 +9039,7 @@ elfNN_aarch64_init_small_plt0_entry (bfd
 					// GOTPLT entry for this.
      br   x17
      PLT0 will be slightly different in ELF32 due to different got entry
-     size.
-   */
+     size.  */
   bfd_vma plt_got_2nd_ent;	/* Address of GOT[2].  */
   bfd_vma plt_base;
 
@@ -8308,7 +9110,8 @@ elfNN_aarch64_finish_dynamic_sections (b
 	      break;
 
 	    case DT_JMPREL:
-	      dyn.d_un.d_ptr = htab->root.srelplt->output_section->vma;
+	      s = htab->root.srelplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_PLTRELSZ:
@@ -8316,21 +9119,6 @@ elfNN_aarch64_finish_dynamic_sections (b
 	      dyn.d_un.d_val = s->size;
 	      break;
 
-	    case DT_RELASZ:
-	      /* The procedure linkage table relocs (DT_JMPREL) should
-		 not be included in the overall relocs (DT_RELA).
-		 Therefore, we override the DT_RELASZ entry here to
-		 make it not include the JMPREL relocs.  Since the
-		 linker script arranges for .rela.plt to follow all
-		 other relocation sections, we don't have to worry
-		 about changing the DT_RELA entry.  */
-	      if (htab->root.srelplt != NULL)
-		{
-		  s = htab->root.srelplt;
-		  dyn.d_un.d_val -= s->size;
-		}
-	      break;
-
 	    case DT_TLSDESC_PLT:
 	      s = htab->root.splt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset
@@ -8420,7 +9208,7 @@ elfNN_aarch64_finish_dynamic_sections (b
     {
       if (bfd_is_abs_section (htab->root.sgotplt->output_section))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("discarded output section: `%A'"), htab->root.sgotplt);
 	  return FALSE;
 	}
@@ -8475,6 +9263,40 @@ elfNN_aarch64_plt_sym_val (bfd_vma i, co
   return plt->vma + PLT_ENTRY_SIZE + i * PLT_SMALL_ENTRY_SIZE;
 }
 
+/* Returns TRUE if NAME is an AArch64 mapping symbol.
+   The ARM ELF standard defines $x (for A64 code) and $d (for data).
+   It also allows a period initiated suffix to be added to the symbol, ie:
+   "$[adtx]\.[:sym_char]+".  */
+
+static bfd_boolean
+is_aarch64_mapping_symbol (const char * name)
+{
+  return name != NULL /* Paranoia.  */
+    && name[0] == '$' /* Note: if objcopy --prefix-symbols has been used then
+			 the mapping symbols could have acquired a prefix.
+			 We do not support this here, since such symbols no
+			 longer conform to the ARM ELF ABI.  */
+    && (name[1] == 'd' || name[1] == 'x')
+    && (name[2] == 0 || name[2] == '.');
+  /* FIXME: Strictly speaking the symbol is only a valid mapping symbol if
+     any characters that follow the period are legal characters for the body
+     of a symbol's name.  For now we just assume that this is the case.  */
+}
+
+/* Make sure that mapping symbols in object files are not removed via the
+   "strip --strip-unneeded" tool.  These symbols might needed in order to
+   correctly generate linked files.  Once an object file has been linked,
+   it should be safe to remove them.  */
+
+static void
+elfNN_aarch64_backend_symbol_processing (bfd *abfd, asymbol *sym)
+{
+  if (((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+      && sym->section != bfd_abs_section_ptr
+      && is_aarch64_mapping_symbol (sym->name))
+    sym->flags |= BSF_KEEP;
+}
+
 
 /* We use this so we can override certain functions
    (though currently we don't).  */
@@ -8614,19 +9436,45 @@ const struct elf_size_info elfNN_aarch64
 #define elf_backend_write_section		\
   elfNN_aarch64_write_section
 
+#define elf_backend_symbol_processing		\
+  elfNN_aarch64_backend_symbol_processing
+
 #define elf_backend_can_refcount       1
 #define elf_backend_can_gc_sections    1
 #define elf_backend_plt_readonly       1
 #define elf_backend_want_got_plt       1
 #define elf_backend_want_plt_sym       0
+#define elf_backend_want_dynrelro      1
 #define elf_backend_may_use_rel_p      0
 #define elf_backend_may_use_rela_p     1
 #define elf_backend_default_use_rela_p 1
 #define elf_backend_rela_normal        1
+#define elf_backend_dtrel_excludes_plt 1
 #define elf_backend_got_header_size (GOT_ENTRY_SIZE * 3)
 #define elf_backend_default_execstack  0
+#define elf_backend_extern_protected_data 1
+#define elf_backend_hash_symbol elf_aarch64_hash_symbol
 
 #undef  elf_backend_obj_attrs_section
 #define elf_backend_obj_attrs_section		".ARM.attributes"
 
 #include "elfNN-target.h"
+
+/* CloudABI support.  */
+
+#undef	TARGET_LITTLE_SYM
+#define	TARGET_LITTLE_SYM	aarch64_elfNN_le_cloudabi_vec
+#undef	TARGET_LITTLE_NAME
+#define	TARGET_LITTLE_NAME	"elfNN-littleaarch64-cloudabi"
+#undef	TARGET_BIG_SYM
+#define	TARGET_BIG_SYM		aarch64_elfNN_be_cloudabi_vec
+#undef	TARGET_BIG_NAME
+#define	TARGET_BIG_NAME		"elfNN-bigaarch64-cloudabi"
+
+#undef	ELF_OSABI
+#define	ELF_OSABI		ELFOSABI_CLOUDABI
+
+#undef	elfNN_bed
+#define	elfNN_bed		elfNN_aarch64_cloudabi_bed
+
+#include "elfNN-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-ia64.c ./bfd/elfnn-ia64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-ia64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfnn-ia64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IA-64 support for 64-bit ELF
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -346,7 +346,7 @@ elfNN_ia64_relax_section (bfd *abfd, ase
      one pass.  */
   *again = FALSE;
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -615,7 +615,8 @@ elfNN_ia64_relax_section (bfd *abfd, ase
 	  if (strcmp (sec->output_section->name, ".init") == 0
 	      || strcmp (sec->output_section->name, ".fini") == 0)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."),
 		 sec->owner, sec, (unsigned long) roff);
 	      bfd_set_error (bfd_error_bad_value);
@@ -831,7 +832,7 @@ elfNN_ia64_relax_section (bfd *abfd, ase
 	{
 	  /* Resize .rela.got.  */
 	  ia64_info->root.srelgot->size = 0;
-	  if (link_info->shared
+	  if (bfd_link_pic (link_info)
 	      && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
 	    ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
 	  data.only_got = TRUE;
@@ -1033,7 +1034,7 @@ elfNN_ia64_add_symbol_hook (bfd *abfd,
 			    bfd_vma *valp)
 {
   if (sym->st_shndx == SHN_COMMON
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && sym->st_size <= elf_gp_size (abfd))
     {
       /* Common symbols less than or equal to -G nn bytes are
@@ -1273,7 +1274,8 @@ elfNN_ia64_hash_copy_indirect (struct bf
   /* Copy down any references that we may have already seen to the
      symbol which just became indirect.  */
 
-  dir->root.ref_dynamic |= ind->root.ref_dynamic;
+  if (dir->root.versioned != versioned_hidden)
+    dir->root.ref_dynamic |= ind->root.ref_dynamic;
   dir->root.ref_regular |= ind->root.ref_regular;
   dir->root.ref_regular_nonweak |= ind->root.ref_regular_nonweak;
   dir->root.needs_plt |= ind->root.needs_plt;
@@ -1993,8 +1995,8 @@ get_fptr (bfd *abfd, struct bfd_link_inf
 						  | SEC_LOAD
 						  | SEC_HAS_CONTENTS
 						  | SEC_IN_MEMORY
-						  | (info->pie ? 0
-						     : SEC_READONLY)
+						  | (bfd_link_pie (info)
+						     ? 0 : SEC_READONLY)
 						  | SEC_LINKER_CREATED));
       if (!fptr
 	  || !bfd_set_section_alignment (abfd, fptr, 4))
@@ -2005,7 +2007,7 @@ get_fptr (bfd *abfd, struct bfd_link_inf
 
       ia64_info->fptr_sec = fptr;
 
-      if (info->pie)
+      if (bfd_link_pie (info))
 	{
 	  asection *fptr_rel;
 	  fptr_rel = bfd_make_section_anyway_with_flags (dynobj, ".rela.opd",
@@ -2158,7 +2160,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
   unsigned long r_symndx;
   bfd_boolean maybe_dynamic;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2191,7 +2193,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	 locally or externally defined, as not all of the input files
 	 have yet been processed.  Do something with what we know, as
 	 this may help reduce memory usage and processing time later.  */
-      maybe_dynamic = (h && ((!info->executable
+      maybe_dynamic = (h && ((!bfd_link_executable (info)
 			      && (!SYMBOLIC_BIND (info, h)
 				  || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 			     || !h->def_regular
@@ -2202,13 +2204,13 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	{
 	case R_IA64_TPREL64MSB:
 	case R_IA64_TPREL64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
 	case R_IA64_LTOFF_TPREL22:
 	  need_entry = NEED_TPREL;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  break;
 
@@ -2216,7 +2218,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DTPREL32LSB:
 	case R_IA64_DTPREL64MSB:
 	case R_IA64_DTPREL64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
@@ -2226,7 +2228,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 
 	case R_IA64_DTPMOD64MSB:
 	case R_IA64_DTPMOD64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
@@ -2248,7 +2250,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_FPTR32LSB:
 	case R_IA64_FPTR64MSB:
 	case R_IA64_FPTR64LSB:
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    need_entry = NEED_FPTR | NEED_DYNREL;
 	  else
 	    need_entry = NEED_FPTR;
@@ -2299,14 +2301,14 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
 	case R_IA64_IPLTMSB:
 	case R_IA64_IPLTLSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  break;
 
@@ -2366,7 +2368,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	 locally or externally defined, as not all of the input files
 	 have yet been processed.  Do something with what we know, as
 	 this may help reduce memory usage and processing time later.  */
-      maybe_dynamic = (h && ((!info->executable
+      maybe_dynamic = (h && ((!bfd_link_executable (info)
 			      && (!SYMBOLIC_BIND (info, h)
 				  || info->unresolved_syms_in_shared_libs == RM_IGNORE))
 			     || !h->def_regular
@@ -2377,16 +2379,16 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	{
 	case R_IA64_TPREL64MSB:
 	case R_IA64_TPREL64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_TPREL64LSB;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  break;
 
 	case R_IA64_LTOFF_TPREL22:
 	  need_entry = NEED_TPREL;
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  break;
 
@@ -2394,7 +2396,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DTPREL32LSB:
 	case R_IA64_DTPREL64MSB:
 	case R_IA64_DTPREL64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_DTPRELNNLSB;
 	  break;
@@ -2405,7 +2407,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 
 	case R_IA64_DTPMOD64MSB:
 	case R_IA64_DTPMOD64LSB:
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_DTPMOD64LSB;
 	  break;
@@ -2428,7 +2430,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_FPTR32LSB:
 	case R_IA64_FPTR64MSB:
 	case R_IA64_FPTR64LSB:
-	  if (info->shared || h)
+	  if (bfd_link_pic (info) || h)
 	    need_entry = NEED_FPTR | NEED_DYNREL;
 	  else
 	    need_entry = NEED_FPTR;
@@ -2474,7 +2476,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_DIRNNLSB;
 	  break;
@@ -2482,7 +2484,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	case R_IA64_IPLTMSB:
 	case R_IA64_IPLTLSB:
 	  /* Shared objects will always need at least a REL relocation.  */
-	  if (info->shared || maybe_dynamic)
+	  if (bfd_link_pic (info) || maybe_dynamic)
 	    need_entry = NEED_DYNREL;
 	  dynrel_type = R_IA64_IPLTLSB;
 	  break;
@@ -2540,7 +2542,7 @@ elfNN_ia64_check_relocs (bfd *abfd, stru
 	  /* FPTRs for shared libraries are allocated by the dynamic
 	     linker.  Make sure this local symbol will appear in the
 	     dynamic symbol table.  */
-	  if (!h && info->shared)
+	  if (!h && bfd_link_pic (info))
 	    {
 	      if (! (bfd_elf_link_record_local_dynamic_symbol
 		     (info, abfd, (long) r_symndx)))
@@ -2712,7 +2714,7 @@ allocate_fptr (struct elfNN_ia64_dyn_sym
 	       || h->root.type == bfd_link_hash_warning)
 	  h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
-      if (!x->info->executable
+      if (!bfd_link_executable (x->info)
 	  && (!h
 	      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	      || (h->root.type != bfd_link_hash_undefweak
@@ -2841,7 +2843,7 @@ allocate_dynrel_entries (struct elfNN_ia
   /* Note that this can't be used in relation to FPTR relocs below.  */
   dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0);
 
-  shared = x->info->shared;
+  shared = bfd_link_pic (x->info);
   resolved_zero = (dyn_i->h
 		   && ELF_ST_VISIBILITY (dyn_i->h->other)
 		   && dyn_i->h->root.type == bfd_link_hash_undefweak);
@@ -2856,7 +2858,7 @@ allocate_dynrel_entries (struct elfNN_ia
 	  && dyn_i->h->dynindx != -1))
     {
       if (!dyn_i->want_ltoff_fptr
-	  || !x->info->pie
+	  || !bfd_link_pie (x->info)
 	  || dyn_i->h == NULL
 	  || dyn_i->h->root.type != bfd_link_hash_undefweak)
 	ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
@@ -2906,7 +2908,7 @@ allocate_dynrel_entries (struct elfNN_ia
 	     will be true only if we're actually allocating one statically
 	     in the main executable.  Position independent executables
 	     need a relative reloc.  */
-	  if (dyn_i->want_fptr && !x->info->pie)
+	  if (dyn_i->want_fptr && !bfd_link_pie (x->info))
 	    continue;
 	  break;
 	case R_IA64_PCREL32LSB:
@@ -2982,17 +2984,17 @@ elfNN_ia64_size_dynamic_sections (bfd *o
   bfd *dynobj;
   bfd_boolean relplt = FALSE;
 
-  dynobj = elf_hash_table(info)->dynobj;
   ia64_info = elfNN_ia64_hash_table (info);
   if (ia64_info == NULL)
     return FALSE;
+  dynobj = ia64_info->root.dynobj;
   ia64_info->self_dtpmod_offset = (bfd_vma) -1;
   BFD_ASSERT(dynobj != NULL);
   data.info = info;
 
   /* Set the contents of the .interp section to the interpreter.  */
   if (ia64_info->root.dynamic_sections_created
-      && info->executable)
+      && bfd_link_executable (info) && !info->nointerp)
     {
       sec = bfd_get_linker_section (dynobj, ".interp");
       BFD_ASSERT (sec != NULL);
@@ -3051,8 +3053,7 @@ elfNN_ia64_size_dynamic_sections (bfd *o
 
       /* If we've got a .plt, we need some extra memory for the dynamic
 	 linker.  We stuff these in .got.plt.  */
-      sec = bfd_get_linker_section (dynobj, ".got.plt");
-      sec->size = 8 * PLT_RESERVED_WORDS;
+      ia64_info->root.sgotplt->size = 8 * PLT_RESERVED_WORDS;
     }
 
   /* Allocate the PLTOFF entries.  */
@@ -3069,7 +3070,7 @@ elfNN_ia64_size_dynamic_sections (bfd *o
       /* Allocate space for the dynamic relocations that turned out to be
 	 required.  */
 
-      if (info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
+      if (bfd_link_pic (info) && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
 	ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
       data.only_got = FALSE;
       elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data);
@@ -3175,13 +3176,13 @@ elfNN_ia64_size_dynamic_sections (bfd *o
 	}
     }
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (ia64_info->root.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the values
 	 later (in finish_dynamic_sections) but we must add the entries now
 	 so that we get the correct size for the .dynamic section.  */
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  /* The DT_DEBUG entry is filled in by the dynamic linker and used
 	     by the debugger.  */
@@ -3315,7 +3316,7 @@ set_got_entry (bfd *abfd, struct bfd_lin
       bfd_put_64 (abfd, value, got_sec->contents + got_offset);
 
       /* Install a dynamic relocation if needed.  */
-      if (((info->shared
+      if (((bfd_link_pic (info)
 	    && (!dyn_i->h
 		|| ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
 		|| dyn_i->h->root.type != bfd_link_hash_undefweak)
@@ -3326,7 +3327,7 @@ set_got_entry (bfd *abfd, struct bfd_lin
 	       && (dyn_r_type == R_IA64_FPTR32LSB
 		   || dyn_r_type == R_IA64_FPTR64LSB)))
 	  && (!dyn_i->want_ltoff_fptr
-	      || !info->pie
+	      || !bfd_link_pie (info)
 	      || !dyn_i->h
 	      || dyn_i->h->root.type != bfd_link_hash_undefweak))
 	{
@@ -3479,7 +3480,7 @@ set_pltoff_entry (bfd *abfd, struct bfd_
 
       /* Install dynamic relocations if needed.  */
       if (!is_plt
-	  && info->shared
+	  && bfd_link_pic (info)
 	  && (!dyn_i->h
 	      || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
 	      || dyn_i->h->root.type != bfd_link_hash_undefweak))
@@ -3681,7 +3682,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct 
       if (max_short_vma - min_short_vma >= 0x400000)
 	{
 overflow:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: short data segment overflowed (0x%lx >= 0x400000)"),
 	     bfd_get_filename (abfd),
 	     (unsigned long) (max_short_vma - min_short_vma));
@@ -3692,7 +3694,7 @@ overflow:
 	       || (gp_val < max_short_vma
 		   && max_short_vma - gp_val >= 0x200000))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%s: __gp does not cover short data segment"),
 	     bfd_get_filename (abfd));
 	  return FALSE;
@@ -3715,7 +3717,7 @@ elfNN_ia64_final_link (bfd *abfd, struct
     return FALSE;
 
   /* Make sure we've got ourselves a nice fat __gp value.  */
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       bfd_vma gp_val;
       struct elf_link_hash_entry *gp;
@@ -3741,7 +3743,7 @@ elfNN_ia64_final_link (bfd *abfd, struct
      of the .IA_64.unwind section.  Force this section to be relocated
      into memory rather than written immediately to the output file.  */
   unwind_output_sec = NULL;
-  if (!info->relocatable)
+  if (!bfd_link_relocatable (info))
     {
       asection *s = bfd_get_section_by_name (abfd, ELF_STRING_ia64_unwind);
       if (s)
@@ -3799,7 +3801,7 @@ elfNN_ia64_relocate_section (bfd *output
     return FALSE;
 
   /* Infect various flags from the input section to the output section.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       bfd_vma flags;
 
@@ -3833,7 +3835,8 @@ elfNN_ia64_relocate_section (bfd *output
       r_type = ELFNN_R_TYPE (rel->r_info);
       if (r_type > R_IA64_MAX_RELOC_CODE)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unknown relocation type %d"),
 	     input_bfd, (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
@@ -3856,7 +3859,7 @@ elfNN_ia64_relocate_section (bfd *output
 	  sym_sec = local_sections[r_symndx];
 	  msec = sym_sec;
 	  value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && (sym_sec->flags & SEC_MERGE) != 0
 	      && ELF_ST_TYPE (sym->st_info) == STT_SECTION
 	      && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
@@ -3913,7 +3916,7 @@ elfNN_ia64_relocate_section (bfd *output
 
 	  if (h->root.type == bfd_link_hash_undefweak)
 	    undef_weak_ref = TRUE;
-	  else if (warned || (ignored && info->executable))
+	  else if (warned || (ignored && bfd_link_executable (info)))
 	    continue;
 	}
 
@@ -3921,7 +3924,7 @@ elfNN_ia64_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       hit_addr = contents + rel->r_offset;
@@ -3942,7 +3945,7 @@ elfNN_ia64_relocate_section (bfd *output
 	case R_IA64_DIR64MSB:
 	case R_IA64_DIR64LSB:
 	  /* Install a dynamic relocation for this reloc.  */
-	  if ((dynamic_symbol_p || info->shared)
+	  if ((dynamic_symbol_p || bfd_link_pic (info))
 	      && r_symndx != STN_UNDEF
 	      && (input_section->flags & SEC_ALLOC) != 0)
 	    {
@@ -3959,7 +3962,8 @@ elfNN_ia64_relocate_section (bfd *output
 		case R_IA64_IMM64:
 		  /* ??? People shouldn't be doing non-pic code in
 		     shared libraries nor dynamic executables.  */
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: non-pic code with imm relocation against dynamic symbol `%s'"),
 		     input_bfd,
 		     h ? h->root.root.string
@@ -4026,7 +4030,8 @@ elfNN_ia64_relocate_section (bfd *output
 	case R_IA64_GPREL64LSB:
 	  if (dynamic_symbol_p)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: @gprel relocation against dynamic symbol %s"),
 		 input_bfd,
 		 h ? h->root.root.string
@@ -4070,7 +4075,7 @@ elfNN_ia64_relocate_section (bfd *output
 	      if (!undef_weak_ref)
 		value = set_fptr_entry (output_bfd, info, dyn_i, value);
 	    }
-	  if (!dyn_i->want_fptr || info->pie)
+	  if (!dyn_i->want_fptr || bfd_link_pie (info))
 	    {
 	      long dynindx;
 	      unsigned int dyn_r_type = r_type;
@@ -4089,7 +4094,7 @@ elfNN_ia64_relocate_section (bfd *output
 			 dynamic symbol table.  */
 		      /* ??? People shouldn't be doing non-pic code in
 			 shared libraries.  Hork.  */
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
 			(_("%B: linking non-pic code in a position independent executable"),
 			 input_bfd);
 		      ret_val = FALSE;
@@ -4227,17 +4232,20 @@ elfNN_ia64_relocate_section (bfd *output
 	      const char *msg;
 
 	      if (r_type == R_IA64_PCREL21BI)
+		/* xgettext:c-format */
 		msg = _("%B: @internal branch to dynamic symbol %s");
 	      else if (r_type == R_IA64_PCREL21F || r_type == R_IA64_PCREL21M)
+		/* xgettext:c-format */
 		msg = _("%B: speculation fixup to dynamic symbol %s");
 	      else
+		/* xgettext:c-format */
 		msg = _("%B: @pcrel relocation against dynamic symbol %s");
-	      (*_bfd_error_handler) (msg, input_bfd,
-				     h ? h->root.root.string
-				       : bfd_elf_sym_name (input_bfd,
-							   symtab_hdr,
-							   sym,
-							   sym_sec));
+	      _bfd_error_handler (msg, input_bfd,
+				  h ? h->root.root.string
+				  : bfd_elf_sym_name (input_bfd,
+						      symtab_hdr,
+						      sym,
+						      sym_sec));
 	      ret_val = FALSE;
 	      continue;
 	    }
@@ -4291,7 +4299,7 @@ elfNN_ia64_relocate_section (bfd *output
 	case R_IA64_IPLTMSB:
 	case R_IA64_IPLTLSB:
 	  /* Install a dynamic relocation for this reloc.  */
-	  if ((dynamic_symbol_p || info->shared)
+	  if ((dynamic_symbol_p || bfd_link_pic (info))
 	      && (input_section->flags & SEC_ALLOC) != 0)
 	    {
 	      BFD_ASSERT (srel != NULL);
@@ -4368,7 +4376,7 @@ elfNN_ia64_relocate_section (bfd *output
 		  {
 		    if (elf_hash_table (info)->tls_sec == NULL)
 		      goto missing_tls_sec;
-		    if (!info->shared)
+		    if (!bfd_link_pic (info))
 		      value -= elfNN_ia64_tprel_base (info);
 		    else
 		      {
@@ -4379,7 +4387,7 @@ elfNN_ia64_relocate_section (bfd *output
 		got_r_type = R_IA64_TPREL64LSB;
 		break;
 	      case R_IA64_LTOFF_DTPMOD22:
-		if (!dynamic_symbol_p && !info->shared)
+		if (!dynamic_symbol_p && !bfd_link_pic (info))
 		  value = 1;
 		got_r_type = R_IA64_DTPMOD64LSB;
 		break;
@@ -4428,10 +4436,9 @@ elfNN_ia64_relocate_section (bfd *output
 	    else
 	      name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 				       sym_sec);
-	    if (!(*info->callbacks->warning) (info, _("unsupported reloc"),
-					      name, input_bfd,
-					      input_section, rel->r_offset))
-	      return FALSE;
+	    (*info->callbacks->warning) (info, _("unsupported reloc"),
+					 name, input_bfd,
+					 input_section, rel->r_offset);
 	    ret_val = FALSE;
 	  }
 	  break;
@@ -4465,7 +4472,8 @@ missing_tls_sec:
 	      case R_IA64_LTOFF_TPREL22:
 	      case R_IA64_LTOFF_DTPMOD22:
 	      case R_IA64_LTOFF_DTPREL22:
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."),
 		   input_bfd, input_section, howto->name, name,
 		   rel->r_offset);
@@ -4480,22 +4488,23 @@ missing_tls_sec:
 		    /* Relaxtion is always performed for ELF output.
 		       Overflow failures for those relocations mean
 		       that the section is too big to relax.  */
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."),
 		       input_bfd, input_section, howto->name, name,
 		       rel->r_offset, input_section->size);
 		    break;
 		  }
+		/* Fall through.  */
 	      default:
-		if (!(*info->callbacks->reloc_overflow) (info,
-							 &h->root,
-							 name,
-							 howto->name,
-							 (bfd_vma) 0,
-							 input_bfd,
-							 input_section,
-							 rel->r_offset))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow) (info,
+						    &h->root,
+						    name,
+						    howto->name,
+						    (bfd_vma) 0,
+						    input_bfd,
+						    input_section,
+						    rel->r_offset);
 		break;
 	      }
 
@@ -4612,14 +4621,14 @@ elfNN_ia64_finish_dynamic_sections (bfd 
 
   dynobj = ia64_info->root.dynobj;
 
-  if (elf_hash_table (info)->dynamic_sections_created)
+  if (ia64_info->root.dynamic_sections_created)
     {
       ElfNN_External_Dyn *dyncon, *dynconend;
       asection *sdyn, *sgotplt;
       bfd_vma gp_val;
 
       sdyn = bfd_get_linker_section (dynobj, ".dynamic");
-      sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
+      sgotplt = ia64_info->root.sgotplt;
       BFD_ASSERT (sdyn != NULL);
       dyncon = (ElfNN_External_Dyn *) sdyn->contents;
       dynconend = (ElfNN_External_Dyn *) (sdyn->contents + sdyn->size);
@@ -4655,13 +4664,6 @@ elfNN_ia64_finish_dynamic_sections (bfd 
 	      dyn.d_un.d_ptr = (sgotplt->output_section->vma
 				+ sgotplt->output_offset);
 	      break;
-
-	    case DT_RELASZ:
-	      /* Do not have RELASZ include JMPREL.  This makes things
-		 easier on ld.so.  This is not what the rest of BFD set up.  */
-	      dyn.d_un.d_val -= (ia64_info->minplt_entries
-				 * sizeof (ElfNN_External_Rela));
-	      break;
 	    }
 
 	  bfd_elfNN_swap_dyn_out (abfd, &dyn, dyncon);
@@ -4703,8 +4705,9 @@ elfNN_ia64_set_private_flags (bfd *abfd,
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
 static bfd_boolean
-elfNN_ia64_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword out_flags;
   flagword in_flags;
   bfd_boolean ok = TRUE;
@@ -4742,7 +4745,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *
 
   if ((in_flags & EF_IA_64_TRAPNIL) != (out_flags & EF_IA_64_TRAPNIL))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking trap-on-NULL-dereference with non-trapping files"),
 	 ibfd);
 
@@ -4751,7 +4754,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking big-endian files with little-endian files"),
 	 ibfd);
 
@@ -4760,7 +4763,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking 64-bit files with 32-bit files"),
 	 ibfd);
 
@@ -4769,7 +4772,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *
     }
   if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking constant-gp files with non-constant-gp files"),
 	 ibfd);
 
@@ -4779,7 +4782,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *
   if ((in_flags & EF_IA_64_NOFUNCDESC_CONS_GP)
       != (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: linking auto-pic files with non-auto-pic files"),
 	 ibfd);
 
@@ -5065,6 +5068,7 @@ elfNN_hpux_backend_symbol_processing (bf
 #define elf_backend_fixup_symbol	_bfd_elf_link_hash_fixup_symbol
 #define elf_backend_reloc_type_class	elfNN_ia64_reloc_type_class
 #define elf_backend_rela_normal		1
+#define elf_backend_dtrel_excludes_plt	1
 #define elf_backend_special_sections	elfNN_ia64_special_sections
 #define elf_backend_default_execstack	0
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-riscv.c ./bfd/elfnn-riscv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfnn-riscv.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elfnn-riscv.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,3264 @@
+/* RISC-V-specific support for NN-bit ELF.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   Contributed by Andrew Waterman (andrew@sifive.com).
+   Based on TILE-Gx and MIPS targets.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING3. If not,
+   see <http://www.gnu.org/licenses/>.  */
+
+/* This file handles RISC-V ELF targets.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+#include "genlink.h"
+#include "elf-bfd.h"
+#include "elfxx-riscv.h"
+#include "elf/riscv.h"
+#include "opcode/riscv.h"
+
+#define ARCH_SIZE NN
+
+#define MINUS_ONE ((bfd_vma)0 - 1)
+
+#define RISCV_ELF_LOG_WORD_BYTES (ARCH_SIZE == 32 ? 2 : 3)
+
+#define RISCV_ELF_WORD_BYTES (1 << RISCV_ELF_LOG_WORD_BYTES)
+
+/* The name of the dynamic interpreter.  This is put in the .interp
+   section.  */
+
+#define ELF64_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF32_DYNAMIC_INTERPRETER "/lib32/ld.so.1"
+
+#define ELF_ARCH			bfd_arch_riscv
+#define ELF_TARGET_ID			RISCV_ELF_DATA
+#define ELF_MACHINE_CODE		EM_RISCV
+#define ELF_MAXPAGESIZE			0x1000
+#define ELF_COMMONPAGESIZE		0x1000
+
+/* The global pointer's symbol name.  */
+
+#define GP_NAME "__global_pointer$"
+
+/* The RISC-V linker needs to keep track of the number of relocs that it
+   decides to copy as dynamic relocs in check_relocs for each symbol.
+   This is so that it can later discard them if they are found to be
+   unnecessary.  We store the information in a field extending the
+   regular ELF linker hash table.  */
+
+struct riscv_elf_dyn_relocs
+{
+  struct riscv_elf_dyn_relocs *next;
+
+  /* The input section of the reloc.  */
+  asection *sec;
+
+  /* Total number of relocs copied for the input section.  */
+  bfd_size_type count;
+
+  /* Number of pc-relative relocs copied for the input section.  */
+  bfd_size_type pc_count;
+};
+
+/* RISC-V ELF linker hash entry.  */
+
+struct riscv_elf_link_hash_entry
+{
+  struct elf_link_hash_entry elf;
+
+  /* Track dynamic relocs copied for this symbol.  */
+  struct riscv_elf_dyn_relocs *dyn_relocs;
+
+#define GOT_UNKNOWN     0
+#define GOT_NORMAL      1
+#define GOT_TLS_GD      2
+#define GOT_TLS_IE      4
+#define GOT_TLS_LE      8
+  char tls_type;
+};
+
+#define riscv_elf_hash_entry(ent) \
+  ((struct riscv_elf_link_hash_entry *)(ent))
+
+struct _bfd_riscv_elf_obj_tdata
+{
+  struct elf_obj_tdata root;
+
+  /* tls_type for each local got entry.  */
+  char *local_got_tls_type;
+};
+
+#define _bfd_riscv_elf_tdata(abfd) \
+  ((struct _bfd_riscv_elf_obj_tdata *) (abfd)->tdata.any)
+
+#define _bfd_riscv_elf_local_got_tls_type(abfd) \
+  (_bfd_riscv_elf_tdata (abfd)->local_got_tls_type)
+
+#define _bfd_riscv_elf_tls_type(abfd, h, symndx)		\
+  (*((h) != NULL ? &riscv_elf_hash_entry (h)->tls_type		\
+     : &_bfd_riscv_elf_local_got_tls_type (abfd) [symndx]))
+
+#define is_riscv_elf(bfd)				\
+  (bfd_get_flavour (bfd) == bfd_target_elf_flavour	\
+   && elf_tdata (bfd) != NULL				\
+   && elf_object_id (bfd) == RISCV_ELF_DATA)
+
+#include "elf/common.h"
+#include "elf/internal.h"
+
+struct riscv_elf_link_hash_table
+{
+  struct elf_link_hash_table elf;
+
+  /* Short-cuts to get to dynamic linker sections.  */
+  asection *sdyntdata;
+
+  /* Small local sym to section mapping cache.  */
+  struct sym_cache sym_cache;
+};
+
+
+/* Get the RISC-V ELF linker hash table from a link_info structure.  */
+#define riscv_elf_hash_table(p) \
+  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
+  == RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL)
+
+static void
+riscv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+			  arelent *cache_ptr,
+			  Elf_Internal_Rela *dst)
+{
+  cache_ptr->howto = riscv_elf_rtype_to_howto (ELFNN_R_TYPE (dst->r_info));
+}
+
+static void
+riscv_elf_append_rela (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
+{
+  const struct elf_backend_data *bed;
+  bfd_byte *loc;
+
+  bed = get_elf_backend_data (abfd);
+  loc = s->contents + (s->reloc_count++ * bed->s->sizeof_rela);
+  bed->s->swap_reloca_out (abfd, rel, loc);
+}
+
+/* PLT/GOT stuff.  */
+
+#define PLT_HEADER_INSNS 8
+#define PLT_ENTRY_INSNS 4
+#define PLT_HEADER_SIZE (PLT_HEADER_INSNS * 4)
+#define PLT_ENTRY_SIZE (PLT_ENTRY_INSNS * 4)
+
+#define GOT_ENTRY_SIZE RISCV_ELF_WORD_BYTES
+
+#define GOTPLT_HEADER_SIZE (2 * GOT_ENTRY_SIZE)
+
+#define sec_addr(sec) ((sec)->output_section->vma + (sec)->output_offset)
+
+static bfd_vma
+riscv_elf_got_plt_val (bfd_vma plt_index, struct bfd_link_info *info)
+{
+  return sec_addr (riscv_elf_hash_table (info)->elf.sgotplt)
+	 + GOTPLT_HEADER_SIZE + (plt_index * GOT_ENTRY_SIZE);
+}
+
+#if ARCH_SIZE == 32
+# define MATCH_LREG MATCH_LW
+#else
+# define MATCH_LREG MATCH_LD
+#endif
+
+/* Generate a PLT header.  */
+
+static void
+riscv_make_plt_header (bfd_vma gotplt_addr, bfd_vma addr, uint32_t *entry)
+{
+  bfd_vma gotplt_offset_high = RISCV_PCREL_HIGH_PART (gotplt_addr, addr);
+  bfd_vma gotplt_offset_low = RISCV_PCREL_LOW_PART (gotplt_addr, addr);
+
+  /* auipc  t2, %hi(.got.plt)
+     sub    t1, t1, t3               # shifted .got.plt offset + hdr size + 12
+     l[w|d] t3, %lo(.got.plt)(t2)    # _dl_runtime_resolve
+     addi   t1, t1, -(hdr size + 12) # shifted .got.plt offset
+     addi   t0, t2, %lo(.got.plt)    # &.got.plt
+     srli   t1, t1, log2(16/PTRSIZE) # .got.plt offset
+     l[w|d] t0, PTRSIZE(t0)          # link map
+     jr     t3 */
+
+  entry[0] = RISCV_UTYPE (AUIPC, X_T2, gotplt_offset_high);
+  entry[1] = RISCV_RTYPE (SUB, X_T1, X_T1, X_T3);
+  entry[2] = RISCV_ITYPE (LREG, X_T3, X_T2, gotplt_offset_low);
+  entry[3] = RISCV_ITYPE (ADDI, X_T1, X_T1, -(PLT_HEADER_SIZE + 12));
+  entry[4] = RISCV_ITYPE (ADDI, X_T0, X_T2, gotplt_offset_low);
+  entry[5] = RISCV_ITYPE (SRLI, X_T1, X_T1, 4 - RISCV_ELF_LOG_WORD_BYTES);
+  entry[6] = RISCV_ITYPE (LREG, X_T0, X_T0, RISCV_ELF_WORD_BYTES);
+  entry[7] = RISCV_ITYPE (JALR, 0, X_T3, 0);
+}
+
+/* Generate a PLT entry.  */
+
+static void
+riscv_make_plt_entry (bfd_vma got, bfd_vma addr, uint32_t *entry)
+{
+  /* auipc  t3, %hi(.got.plt entry)
+     l[w|d] t3, %lo(.got.plt entry)(t3)
+     jalr   t1, t3
+     nop */
+
+  entry[0] = RISCV_UTYPE (AUIPC, X_T3, RISCV_PCREL_HIGH_PART (got, addr));
+  entry[1] = RISCV_ITYPE (LREG,  X_T3, X_T3, RISCV_PCREL_LOW_PART (got, addr));
+  entry[2] = RISCV_ITYPE (JALR, X_T1, X_T3, 0);
+  entry[3] = RISCV_NOP;
+}
+
+/* Create an entry in an RISC-V ELF linker hash table.  */
+
+static struct bfd_hash_entry *
+link_hash_newfunc (struct bfd_hash_entry *entry,
+		   struct bfd_hash_table *table, const char *string)
+{
+  /* Allocate the structure if it has not already been allocated by a
+     subclass.  */
+  if (entry == NULL)
+    {
+      entry =
+	bfd_hash_allocate (table,
+			   sizeof (struct riscv_elf_link_hash_entry));
+      if (entry == NULL)
+	return entry;
+    }
+
+  /* Call the allocation method of the superclass.  */
+  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+  if (entry != NULL)
+    {
+      struct riscv_elf_link_hash_entry *eh;
+
+      eh = (struct riscv_elf_link_hash_entry *) entry;
+      eh->dyn_relocs = NULL;
+      eh->tls_type = GOT_UNKNOWN;
+    }
+
+  return entry;
+}
+
+/* Create a RISC-V ELF linker hash table.  */
+
+static struct bfd_link_hash_table *
+riscv_elf_link_hash_table_create (bfd *abfd)
+{
+  struct riscv_elf_link_hash_table *ret;
+  bfd_size_type amt = sizeof (struct riscv_elf_link_hash_table);
+
+  ret = (struct riscv_elf_link_hash_table *) bfd_zmalloc (amt);
+  if (ret == NULL)
+    return NULL;
+
+  if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+				      sizeof (struct riscv_elf_link_hash_entry),
+				      RISCV_ELF_DATA))
+    {
+      free (ret);
+      return NULL;
+    }
+
+  return &ret->elf.root;
+}
+
+/* Create the .got section.  */
+
+static bfd_boolean
+riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
+{
+  flagword flags;
+  asection *s, *s_got;
+  struct elf_link_hash_entry *h;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  /* This function may be called more than once.  */
+  if (htab->sgot != NULL)
+    return TRUE;
+
+  flags = bed->dynamic_sec_flags;
+
+  s = bfd_make_section_anyway_with_flags (abfd,
+					  (bed->rela_plts_and_copies_p
+					   ? ".rela.got" : ".rel.got"),
+					  (bed->dynamic_sec_flags
+					   | SEC_READONLY));
+  if (s == NULL
+      || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+    return FALSE;
+  htab->srelgot = s;
+
+  s = s_got = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
+  if (s == NULL
+      || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+    return FALSE;
+  htab->sgot = s;
+
+  /* The first bit of the global offset table is the header.  */
+  s->size += bed->got_header_size;
+
+  if (bed->want_got_plt)
+    {
+      s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s,
+					 bed->s->log_file_align))
+	return FALSE;
+      htab->sgotplt = s;
+
+      /* Reserve room for the header.  */
+      s->size += GOTPLT_HEADER_SIZE;
+    }
+
+  if (bed->want_got_sym)
+    {
+      /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
+	 section.  We don't do this in the linker script because we don't want
+	 to define the symbol if we are not creating a global offset
+	 table.  */
+      h = _bfd_elf_define_linkage_sym (abfd, info, s_got,
+				       "_GLOBAL_OFFSET_TABLE_");
+      elf_hash_table (info)->hgot = h;
+      if (h == NULL)
+	return FALSE;
+    }
+
+  return TRUE;
+}
+
+/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and
+   .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
+   hash table.  */
+
+static bfd_boolean
+riscv_elf_create_dynamic_sections (bfd *dynobj,
+				   struct bfd_link_info *info)
+{
+  struct riscv_elf_link_hash_table *htab;
+
+  htab = riscv_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (!riscv_elf_create_got_section (dynobj, info))
+    return FALSE;
+
+  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+    return FALSE;
+
+  if (!bfd_link_pic (info))
+    {
+      htab->sdyntdata =
+	bfd_make_section_anyway_with_flags (dynobj, ".tdata.dyn",
+					    SEC_ALLOC | SEC_THREAD_LOCAL);
+    }
+
+  if (!htab->elf.splt || !htab->elf.srelplt || !htab->elf.sdynbss
+      || (!bfd_link_pic (info) && (!htab->elf.srelbss || !htab->sdyntdata)))
+    abort ();
+
+  return TRUE;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry.  */
+
+static void
+riscv_elf_copy_indirect_symbol (struct bfd_link_info *info,
+				struct elf_link_hash_entry *dir,
+				struct elf_link_hash_entry *ind)
+{
+  struct riscv_elf_link_hash_entry *edir, *eind;
+
+  edir = (struct riscv_elf_link_hash_entry *) dir;
+  eind = (struct riscv_elf_link_hash_entry *) ind;
+
+  if (eind->dyn_relocs != NULL)
+    {
+      if (edir->dyn_relocs != NULL)
+	{
+	  struct riscv_elf_dyn_relocs **pp;
+	  struct riscv_elf_dyn_relocs *p;
+
+	  /* Add reloc counts against the indirect sym to the direct sym
+	     list.  Merge any entries against the same section.  */
+	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      struct riscv_elf_dyn_relocs *q;
+
+	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
+		if (q->sec == p->sec)
+		  {
+		    q->pc_count += p->pc_count;
+		    q->count += p->count;
+		    *pp = p->next;
+		    break;
+		  }
+	      if (q == NULL)
+		pp = &p->next;
+	    }
+	  *pp = edir->dyn_relocs;
+	}
+
+      edir->dyn_relocs = eind->dyn_relocs;
+      eind->dyn_relocs = NULL;
+    }
+
+  if (ind->root.type == bfd_link_hash_indirect
+      && dir->got.refcount <= 0)
+    {
+      edir->tls_type = eind->tls_type;
+      eind->tls_type = GOT_UNKNOWN;
+    }
+  _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+}
+
+static bfd_boolean
+riscv_elf_record_tls_type (bfd *abfd, struct elf_link_hash_entry *h,
+			   unsigned long symndx, char tls_type)
+{
+  char *new_tls_type = &_bfd_riscv_elf_tls_type (abfd, h, symndx);
+
+  *new_tls_type |= tls_type;
+  if ((*new_tls_type & GOT_NORMAL) && (*new_tls_type & ~GOT_NORMAL))
+    {
+      (*_bfd_error_handler)
+	(_("%B: `%s' accessed both as normal and thread local symbol"),
+	 abfd, h ? h->root.root.string : "<local>");
+      return FALSE;
+    }
+  return TRUE;
+}
+
+static bfd_boolean
+riscv_elf_record_got_reference (bfd *abfd, struct bfd_link_info *info,
+				struct elf_link_hash_entry *h, long symndx)
+{
+  struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
+  Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+  if (htab->elf.sgot == NULL)
+    {
+      if (!riscv_elf_create_got_section (htab->elf.dynobj, info))
+	return FALSE;
+    }
+
+  if (h != NULL)
+    {
+      h->got.refcount += 1;
+      return TRUE;
+    }
+
+  /* This is a global offset table entry for a local symbol.  */
+  if (elf_local_got_refcounts (abfd) == NULL)
+    {
+      bfd_size_type size = symtab_hdr->sh_info * (sizeof (bfd_vma) + 1);
+      if (!(elf_local_got_refcounts (abfd) = bfd_zalloc (abfd, size)))
+	return FALSE;
+      _bfd_riscv_elf_local_got_tls_type (abfd)
+	= (char *) (elf_local_got_refcounts (abfd) + symtab_hdr->sh_info);
+    }
+  elf_local_got_refcounts (abfd) [symndx] += 1;
+
+  return TRUE;
+}
+
+static bfd_boolean
+bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h)
+{
+  (*_bfd_error_handler)
+    (_("%B: relocation %s against `%s' can not be used when making a shared "
+       "object; recompile with -fPIC"),
+      abfd, riscv_elf_rtype_to_howto (r_type)->name,
+      h != NULL ? h->root.root.string : "a local symbol");
+  bfd_set_error (bfd_error_bad_value);
+  return FALSE;
+}
+/* Look through the relocs for a section during the first phase, and
+   allocate space in the global offset table or procedure linkage
+   table.  */
+
+static bfd_boolean
+riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+			asection *sec, const Elf_Internal_Rela *relocs)
+{
+  struct riscv_elf_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  const Elf_Internal_Rela *rel;
+  asection *sreloc = NULL;
+
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  htab = riscv_elf_hash_table (info);
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (abfd);
+
+  if (htab->elf.dynobj == NULL)
+    htab->elf.dynobj = abfd;
+
+  for (rel = relocs; rel < relocs + sec->reloc_count; rel++)
+    {
+      unsigned int r_type;
+      unsigned long r_symndx;
+      struct elf_link_hash_entry *h;
+
+      r_symndx = ELFNN_R_SYM (rel->r_info);
+      r_type = ELFNN_R_TYPE (rel->r_info);
+
+      if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+	{
+	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+				 abfd, r_symndx);
+	  return FALSE;
+	}
+
+      if (r_symndx < symtab_hdr->sh_info)
+	h = NULL;
+      else
+	{
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+	  /* PR15323, ref flags aren't set for references in the same
+	     object.  */
+	  h->root.non_ir_ref = 1;
+	}
+
+      switch (r_type)
+	{
+	case R_RISCV_TLS_GD_HI20:
+	  if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
+	      || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_GD))
+	    return FALSE;
+	  break;
+
+	case R_RISCV_TLS_GOT_HI20:
+	  if (bfd_link_pic (info))
+	    info->flags |= DF_STATIC_TLS;
+	  if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
+	      || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
+	    return FALSE;
+	  break;
+
+	case R_RISCV_GOT_HI20:
+	  if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
+	      || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_NORMAL))
+	    return FALSE;
+	  break;
+
+	case R_RISCV_CALL_PLT:
+	  /* This symbol requires a procedure linkage table entry.  We
+	     actually build the entry in adjust_dynamic_symbol,
+	     because this might be a case of linking PIC code without
+	     linking in any dynamic objects, in which case we don't
+	     need to generate a procedure linkage table after all.  */
+
+	  if (h != NULL)
+	    {
+	      h->needs_plt = 1;
+	      h->plt.refcount += 1;
+	    }
+	  break;
+
+	case R_RISCV_CALL:
+	case R_RISCV_JAL:
+	case R_RISCV_BRANCH:
+	case R_RISCV_RVC_BRANCH:
+	case R_RISCV_RVC_JUMP:
+	case R_RISCV_PCREL_HI20:
+	  /* In shared libraries, these relocs are known to bind locally.  */
+	  if (bfd_link_pic (info))
+	    break;
+	  goto static_reloc;
+
+	case R_RISCV_TPREL_HI20:
+	  if (!bfd_link_executable (info))
+	    return bad_static_reloc (abfd, r_type, h);
+	  if (h != NULL)
+	    riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
+	  goto static_reloc;
+
+	case R_RISCV_HI20:
+	  if (bfd_link_pic (info))
+	    return bad_static_reloc (abfd, r_type, h);
+	  /* Fall through.  */
+
+	case R_RISCV_COPY:
+	case R_RISCV_JUMP_SLOT:
+	case R_RISCV_RELATIVE:
+	case R_RISCV_64:
+	case R_RISCV_32:
+	  /* Fall through.  */
+
+	static_reloc:
+	  /* This reloc might not bind locally.  */
+	  if (h != NULL)
+	    h->non_got_ref = 1;
+
+	  if (h != NULL && !bfd_link_pic (info))
+	    {
+	      /* We may need a .plt entry if the function this reloc
+		 refers to is in a shared lib.  */
+	      h->plt.refcount += 1;
+	    }
+
+	  /* If we are creating a shared library, and this is a reloc
+	     against a global symbol, or a non PC relative reloc
+	     against a local symbol, then we need to copy the reloc
+	     into the shared library.  However, if we are linking with
+	     -Bsymbolic, we do not need to copy a reloc against a
+	     global symbol which is defined in an object we are
+	     including in the link (i.e., DEF_REGULAR is set).  At
+	     this point we have not seen all the input files, so it is
+	     possible that DEF_REGULAR is not set now but will be set
+	     later (it is never cleared).  In case of a weak definition,
+	     DEF_REGULAR may be cleared later by a strong definition in
+	     a shared library.  We account for that possibility below by
+	     storing information in the relocs_copied field of the hash
+	     table entry.  A similar situation occurs when creating
+	     shared libraries and symbol visibility changes render the
+	     symbol local.
+
+	     If on the other hand, we are creating an executable, we
+	     may need to keep relocations for symbols satisfied by a
+	     dynamic library if we manage to avoid copy relocs for the
+	     symbol.  */
+	  if ((bfd_link_pic (info)
+	       && (sec->flags & SEC_ALLOC) != 0
+	       && (! riscv_elf_rtype_to_howto (r_type)->pc_relative
+		   || (h != NULL
+		       && (! info->symbolic
+			   || h->root.type == bfd_link_hash_defweak
+			   || !h->def_regular))))
+	      || (!bfd_link_pic (info)
+		  && (sec->flags & SEC_ALLOC) != 0
+		  && h != NULL
+		  && (h->root.type == bfd_link_hash_defweak
+		      || !h->def_regular)))
+	    {
+	      struct riscv_elf_dyn_relocs *p;
+	      struct riscv_elf_dyn_relocs **head;
+
+	      /* When creating a shared object, we must copy these
+		 relocs into the output file.  We create a reloc
+		 section in dynobj and make room for the reloc.  */
+	      if (sreloc == NULL)
+		{
+		  sreloc = _bfd_elf_make_dynamic_reloc_section
+		    (sec, htab->elf.dynobj, RISCV_ELF_LOG_WORD_BYTES,
+		    abfd, /*rela?*/ TRUE);
+
+		  if (sreloc == NULL)
+		    return FALSE;
+		}
+
+	      /* If this is a global symbol, we count the number of
+		 relocations we need for this symbol.  */
+	      if (h != NULL)
+		head = &((struct riscv_elf_link_hash_entry *) h)->dyn_relocs;
+	      else
+		{
+		  /* Track dynamic relocs needed for local syms too.
+		     We really need local syms available to do this
+		     easily.  Oh well.  */
+
+		  asection *s;
+		  void *vpp;
+		  Elf_Internal_Sym *isym;
+
+		  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
+						abfd, r_symndx);
+		  if (isym == NULL)
+		    return FALSE;
+
+		  s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+		  if (s == NULL)
+		    s = sec;
+
+		  vpp = &elf_section_data (s)->local_dynrel;
+		  head = (struct riscv_elf_dyn_relocs **) vpp;
+		}
+
+	      p = *head;
+	      if (p == NULL || p->sec != sec)
+		{
+		  bfd_size_type amt = sizeof *p;
+		  p = ((struct riscv_elf_dyn_relocs *)
+		       bfd_alloc (htab->elf.dynobj, amt));
+		  if (p == NULL)
+		    return FALSE;
+		  p->next = *head;
+		  *head = p;
+		  p->sec = sec;
+		  p->count = 0;
+		  p->pc_count = 0;
+		}
+
+	      p->count += 1;
+	      p->pc_count += riscv_elf_rtype_to_howto (r_type)->pc_relative;
+	    }
+
+	  break;
+
+	case R_RISCV_GNU_VTINHERIT:
+	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+	    return FALSE;
+	  break;
+
+	case R_RISCV_GNU_VTENTRY:
+	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	    return FALSE;
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+static asection *
+riscv_elf_gc_mark_hook (asection *sec,
+			struct bfd_link_info *info,
+			Elf_Internal_Rela *rel,
+			struct elf_link_hash_entry *h,
+			Elf_Internal_Sym *sym)
+{
+  if (h != NULL)
+    switch (ELFNN_R_TYPE (rel->r_info))
+      {
+      case R_RISCV_GNU_VTINHERIT:
+      case R_RISCV_GNU_VTENTRY:
+	return NULL;
+      }
+
+  return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+}
+
+/* Update the got entry reference counts for the section being removed.  */
+
+static bfd_boolean
+riscv_elf_gc_sweep_hook (bfd *abfd,
+			 struct bfd_link_info *info,
+			 asection *sec,
+			 const Elf_Internal_Rela *relocs)
+{
+  const Elf_Internal_Rela *rel, *relend;
+  Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (abfd);
+  struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (abfd);
+  bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (abfd);
+
+  if (bfd_link_relocatable (info))
+    return TRUE;
+
+  elf_section_data (sec)->local_dynrel = NULL;
+
+  for (rel = relocs, relend = relocs + sec->reloc_count; rel < relend; rel++)
+    {
+      unsigned long r_symndx;
+      struct elf_link_hash_entry *h = NULL;
+
+      r_symndx = ELFNN_R_SYM (rel->r_info);
+      if (r_symndx >= symtab_hdr->sh_info)
+	{
+	  struct riscv_elf_link_hash_entry *eh;
+	  struct riscv_elf_dyn_relocs **pp;
+	  struct riscv_elf_dyn_relocs *p;
+
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+	  eh = (struct riscv_elf_link_hash_entry *) h;
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+	    if (p->sec == sec)
+	      {
+		/* Everything must go for SEC.  */
+		*pp = p->next;
+		break;
+	      }
+	}
+
+      switch (ELFNN_R_TYPE (rel->r_info))
+	{
+	case R_RISCV_GOT_HI20:
+	case R_RISCV_TLS_GOT_HI20:
+	case R_RISCV_TLS_GD_HI20:
+	  if (h != NULL)
+	    {
+	      if (h->got.refcount > 0)
+		h->got.refcount--;
+	    }
+	  else
+	    {
+	      if (local_got_refcounts &&
+		  local_got_refcounts[r_symndx] > 0)
+		local_got_refcounts[r_symndx]--;
+	    }
+	  break;
+
+	case R_RISCV_HI20:
+	case R_RISCV_PCREL_HI20:
+	case R_RISCV_COPY:
+	case R_RISCV_JUMP_SLOT:
+	case R_RISCV_RELATIVE:
+	case R_RISCV_64:
+	case R_RISCV_32:
+	case R_RISCV_BRANCH:
+	case R_RISCV_CALL:
+	case R_RISCV_JAL:
+	case R_RISCV_RVC_BRANCH:
+	case R_RISCV_RVC_JUMP:
+	  if (bfd_link_pic (info))
+	    break;
+	  /* Fall through.  */
+
+	case R_RISCV_CALL_PLT:
+	  if (h != NULL)
+	    {
+	      if (h->plt.refcount > 0)
+		h->plt.refcount--;
+	    }
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+   regular object.  The current definition is in some section of the
+   dynamic object, but we're not including those sections.  We have to
+   change the definition to something the rest of the link can
+   understand.  */
+
+static bfd_boolean
+riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+				 struct elf_link_hash_entry *h)
+{
+  struct riscv_elf_link_hash_table *htab;
+  struct riscv_elf_link_hash_entry * eh;
+  struct riscv_elf_dyn_relocs *p;
+  bfd *dynobj;
+  asection *s, *srel;
+
+  htab = riscv_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  dynobj = htab->elf.dynobj;
+
+  /* Make sure we know what is going on here.  */
+  BFD_ASSERT (dynobj != NULL
+	      && (h->needs_plt
+		  || h->type == STT_GNU_IFUNC
+		  || h->u.weakdef != NULL
+		  || (h->def_dynamic
+		      && h->ref_regular
+		      && !h->def_regular)));
+
+  /* If this is a function, put it in the procedure linkage table.  We
+     will fill in the contents of the procedure linkage table later
+     (although we could actually do it here).  */
+  if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt)
+    {
+      if (h->plt.refcount <= 0
+	  || SYMBOL_CALLS_LOCAL (info, h)
+	  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+	      && h->root.type == bfd_link_hash_undefweak))
+	{
+	  /* This case can occur if we saw a R_RISCV_CALL_PLT reloc in an
+	     input file, but the symbol was never referred to by a dynamic
+	     object, or if all references were garbage collected.  In such
+	     a case, we don't actually need to build a PLT entry.  */
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+
+      return TRUE;
+    }
+  else
+    h->plt.offset = (bfd_vma) -1;
+
+  /* If this is a weak symbol, and there is a real definition, the
+     processor independent code will have arranged for us to see the
+     real definition first, and we can just use the same value.  */
+  if (h->u.weakdef != NULL)
+    {
+      BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
+		  || h->u.weakdef->root.type == bfd_link_hash_defweak);
+      h->root.u.def.section = h->u.weakdef->root.u.def.section;
+      h->root.u.def.value = h->u.weakdef->root.u.def.value;
+      return TRUE;
+    }
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
+  /* If we are creating a shared library, we must presume that the
+     only references to the symbol are via the global offset table.
+     For such cases we need not do anything here; the relocations will
+     be handled correctly by relocate_section.  */
+  if (bfd_link_pic (info))
+    return TRUE;
+
+  /* If there are no references to this symbol that do not use the
+     GOT, we don't need to generate a copy reloc.  */
+  if (!h->non_got_ref)
+    return TRUE;
+
+  /* If -z nocopyreloc was given, we won't generate them either.  */
+  if (info->nocopyreloc)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  eh = (struct riscv_elf_link_hash_entry *) h;
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      s = p->sec->output_section;
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+	break;
+    }
+
+  /* If we didn't find any dynamic relocs in read-only sections, then
+     we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
+  if (p == NULL)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  /* We must allocate the symbol in our .dynbss section, which will
+     become part of the .bss section of the executable.  There will be
+     an entry for this symbol in the .dynsym section.  The dynamic
+     object will contain position independent code, so all references
+     from the dynamic object to this symbol will go through the global
+     offset table.  The dynamic linker will use the .dynsym entry to
+     determine the address it must put in the global offset table, so
+     both the dynamic object and the regular object will refer to the
+     same memory location for the variable.  */
+
+  /* We must generate a R_RISCV_COPY reloc to tell the dynamic linker
+     to copy the initial value out of the dynamic object and into the
+     runtime process image.  We need to remember the offset into the
+     .rel.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
+    {
+      srel->size += sizeof (ElfNN_External_Rela);
+      h->needs_copy = 1;
+    }
+
+  if (eh->tls_type & ~GOT_NORMAL)
+    return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdyntdata);
+
+  return _bfd_elf_adjust_dynamic_copy (info, h, s);
+}
+
+/* Allocate space in .plt, .got and associated reloc sections for
+   dynamic relocs.  */
+
+static bfd_boolean
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct bfd_link_info *info;
+  struct riscv_elf_link_hash_table *htab;
+  struct riscv_elf_link_hash_entry *eh;
+  struct riscv_elf_dyn_relocs *p;
+
+  if (h->root.type == bfd_link_hash_indirect)
+    return TRUE;
+
+  info = (struct bfd_link_info *) inf;
+  htab = riscv_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (htab->elf.dynamic_sections_created
+      && h->plt.refcount > 0)
+    {
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (h->dynindx == -1
+	  && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
+	{
+	  asection *s = htab->elf.splt;
+
+	  if (s->size == 0)
+	    s->size = PLT_HEADER_SIZE;
+
+	  h->plt.offset = s->size;
+
+	  /* Make room for this entry.  */
+	  s->size += PLT_ENTRY_SIZE;
+
+	  /* We also need to make an entry in the .got.plt section.  */
+	  htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
+
+	  /* We also need to make an entry in the .rela.plt section.  */
+	  htab->elf.srelplt->size += sizeof (ElfNN_External_Rela);
+
+	  /* If this symbol is not defined in a regular file, and we are
+	     not generating a shared library, then set the symbol to this
+	     location in the .plt.  This is required to make function
+	     pointers compare as equal between the normal executable and
+	     the shared library.  */
+	  if (! bfd_link_pic (info)
+	      && !h->def_regular)
+	    {
+	      h->root.u.def.section = s;
+	      h->root.u.def.value = h->plt.offset;
+	    }
+	}
+      else
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+    }
+  else
+    {
+      h->plt.offset = (bfd_vma) -1;
+      h->needs_plt = 0;
+    }
+
+  if (h->got.refcount > 0)
+    {
+      asection *s;
+      bfd_boolean dyn;
+      int tls_type = riscv_elf_hash_entry (h)->tls_type;
+
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (h->dynindx == -1
+	  && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      s = htab->elf.sgot;
+      h->got.offset = s->size;
+      dyn = htab->elf.dynamic_sections_created;
+      if (tls_type & (GOT_TLS_GD | GOT_TLS_IE))
+	{
+	  /* TLS_GD needs two dynamic relocs and two GOT slots.  */
+	  if (tls_type & GOT_TLS_GD)
+	    {
+	      s->size += 2 * RISCV_ELF_WORD_BYTES;
+	      htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela);
+	    }
+
+	  /* TLS_IE needs one dynamic reloc and one GOT slot.  */
+	  if (tls_type & GOT_TLS_IE)
+	    {
+	      s->size += RISCV_ELF_WORD_BYTES;
+	      htab->elf.srelgot->size += sizeof (ElfNN_External_Rela);
+	    }
+	}
+      else
+	{
+	  s->size += RISCV_ELF_WORD_BYTES;
+	  if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
+	    htab->elf.srelgot->size += sizeof (ElfNN_External_Rela);
+	}
+    }
+  else
+    h->got.offset = (bfd_vma) -1;
+
+  eh = (struct riscv_elf_link_hash_entry *) h;
+  if (eh->dyn_relocs == NULL)
+    return TRUE;
+
+  /* In the shared -Bsymbolic case, discard space allocated for
+     dynamic pc-relative relocs against symbols which turn out to be
+     defined in regular objects.  For the normal shared case, discard
+     space for pc-relative relocs that have become local due to symbol
+     visibility changes.  */
+
+  if (bfd_link_pic (info))
+    {
+      if (SYMBOL_CALLS_LOCAL (info, h))
+	{
+	  struct riscv_elf_dyn_relocs **pp;
+
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      p->count -= p->pc_count;
+	      p->pc_count = 0;
+	      if (p->count == 0)
+		*pp = p->next;
+	      else
+		pp = &p->next;
+	    }
+	}
+
+      /* Also discard relocs on undefined weak syms with non-default
+	 visibility.  */
+      if (eh->dyn_relocs != NULL
+	  && h->root.type == bfd_link_hash_undefweak)
+	{
+	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+	    eh->dyn_relocs = NULL;
+
+	  /* Make sure undefined weak symbols are output as a dynamic
+	     symbol in PIEs.  */
+	  else if (h->dynindx == -1
+		   && !h->forced_local)
+	    {
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+	    }
+	}
+    }
+  else
+    {
+      /* For the non-shared case, discard space for relocs against
+	 symbols which turn out to need copy relocs or are not
+	 dynamic.  */
+
+      if (!h->non_got_ref
+	  && ((h->def_dynamic
+	       && !h->def_regular)
+	      || (htab->elf.dynamic_sections_created
+		  && (h->root.type == bfd_link_hash_undefweak
+		      || h->root.type == bfd_link_hash_undefined))))
+	{
+	  /* Make sure this symbol is output as a dynamic symbol.
+	     Undefined weak syms won't yet be marked as dynamic.  */
+	  if (h->dynindx == -1
+	      && !h->forced_local)
+	    {
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+	    }
+
+	  /* If that succeeded, we know we'll be keeping all the
+	     relocs.  */
+	  if (h->dynindx != -1)
+	    goto keep;
+	}
+
+      eh->dyn_relocs = NULL;
+
+    keep: ;
+    }
+
+  /* Finally, allocate space.  */
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *sreloc = elf_section_data (p->sec)->sreloc;
+      sreloc->size += p->count * sizeof (ElfNN_External_Rela);
+    }
+
+  return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections.  */
+
+static bfd_boolean
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct riscv_elf_link_hash_entry *eh;
+  struct riscv_elf_dyn_relocs *p;
+
+  eh = (struct riscv_elf_link_hash_entry *) h;
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *s = p->sec->output_section;
+
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+	{
+	  ((struct bfd_link_info *) inf)->flags |= DF_TEXTREL;
+	  return FALSE;
+	}
+    }
+  return TRUE;
+}
+
+static bfd_boolean
+riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+  struct riscv_elf_link_hash_table *htab;
+  bfd *dynobj;
+  asection *s;
+  bfd *ibfd;
+
+  htab = riscv_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  dynobj = htab->elf.dynobj;
+  BFD_ASSERT (dynobj != NULL);
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Set the contents of the .interp section to the interpreter.  */
+      if (bfd_link_executable (info) && !info->nointerp)
+	{
+	  s = bfd_get_linker_section (dynobj, ".interp");
+	  BFD_ASSERT (s != NULL);
+	  s->size = strlen (ELFNN_DYNAMIC_INTERPRETER) + 1;
+	  s->contents = (unsigned char *) ELFNN_DYNAMIC_INTERPRETER;
+	}
+    }
+
+  /* Set up .got offsets for local syms, and space for local dynamic
+     relocs.  */
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
+    {
+      bfd_signed_vma *local_got;
+      bfd_signed_vma *end_local_got;
+      char *local_tls_type;
+      bfd_size_type locsymcount;
+      Elf_Internal_Shdr *symtab_hdr;
+      asection *srel;
+
+      if (! is_riscv_elf (ibfd))
+	continue;
+
+      for (s = ibfd->sections; s != NULL; s = s->next)
+	{
+	  struct riscv_elf_dyn_relocs *p;
+
+	  for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
+	    {
+	      if (!bfd_is_abs_section (p->sec)
+		  && bfd_is_abs_section (p->sec->output_section))
+		{
+		  /* Input section has been discarded, either because
+		     it is a copy of a linkonce section or due to
+		     linker script /DISCARD/, so we'll be discarding
+		     the relocs too.  */
+		}
+	      else if (p->count != 0)
+		{
+		  srel = elf_section_data (p->sec)->sreloc;
+		  srel->size += p->count * sizeof (ElfNN_External_Rela);
+		  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
+		    info->flags |= DF_TEXTREL;
+		}
+	    }
+	}
+
+      local_got = elf_local_got_refcounts (ibfd);
+      if (!local_got)
+	continue;
+
+      symtab_hdr = &elf_symtab_hdr (ibfd);
+      locsymcount = symtab_hdr->sh_info;
+      end_local_got = local_got + locsymcount;
+      local_tls_type = _bfd_riscv_elf_local_got_tls_type (ibfd);
+      s = htab->elf.sgot;
+      srel = htab->elf.srelgot;
+      for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+	{
+	  if (*local_got > 0)
+	    {
+	      *local_got = s->size;
+	      s->size += RISCV_ELF_WORD_BYTES;
+	      if (*local_tls_type & GOT_TLS_GD)
+		s->size += RISCV_ELF_WORD_BYTES;
+	      if (bfd_link_pic (info)
+		  || (*local_tls_type & (GOT_TLS_GD | GOT_TLS_IE)))
+		srel->size += sizeof (ElfNN_External_Rela);
+	    }
+	  else
+	    *local_got = (bfd_vma) -1;
+	}
+    }
+
+  /* Allocate global sym .plt and .got entries, and space for global
+     sym dynamic relocs.  */
+  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
+
+  if (htab->elf.sgotplt)
+    {
+      struct elf_link_hash_entry *got;
+      got = elf_link_hash_lookup (elf_hash_table (info),
+				  "_GLOBAL_OFFSET_TABLE_",
+				  FALSE, FALSE, FALSE);
+
+      /* Don't allocate .got.plt section if there are no GOT nor PLT
+	 entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.  */
+      if ((got == NULL
+	   || !got->ref_regular_nonweak)
+	  && (htab->elf.sgotplt->size == GOTPLT_HEADER_SIZE)
+	  && (htab->elf.splt == NULL
+	      || htab->elf.splt->size == 0)
+	  && (htab->elf.sgot == NULL
+	      || (htab->elf.sgot->size
+		  == get_elf_backend_data (output_bfd)->got_header_size)))
+	htab->elf.sgotplt->size = 0;
+    }
+
+  /* The check_relocs and adjust_dynamic_symbol entry points have
+     determined the sizes of the various dynamic sections.  Allocate
+     memory for them.  */
+  for (s = dynobj->sections; s != NULL; s = s->next)
+    {
+      if ((s->flags & SEC_LINKER_CREATED) == 0)
+	continue;
+
+      if (s == htab->elf.splt
+	  || s == htab->elf.sgot
+	  || s == htab->elf.sgotplt
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro)
+	{
+	  /* Strip this section if we don't need it; see the
+	     comment below.  */
+	}
+      else if (strncmp (s->name, ".rela", 5) == 0)
+	{
+	  if (s->size != 0)
+	    {
+	      /* We use the reloc_count field as a counter if we need
+		 to copy relocs into the output file.  */
+	      s->reloc_count = 0;
+	    }
+	}
+      else
+	{
+	  /* It's not one of our sections.  */
+	  continue;
+	}
+
+      if (s->size == 0)
+	{
+	  /* If we don't need this section, strip it from the
+	     output file.  This is mostly to handle .rela.bss and
+	     .rela.plt.  We must create both sections in
+	     create_dynamic_sections, because they must be created
+	     before the linker maps input sections to output
+	     sections.  The linker does that before
+	     adjust_dynamic_symbol is called, and it is that
+	     function which decides whether anything needs to go
+	     into these sections.  */
+	  s->flags |= SEC_EXCLUDE;
+	  continue;
+	}
+
+      if ((s->flags & SEC_HAS_CONTENTS) == 0)
+	continue;
+
+      /* Allocate memory for the section contents.  Zero the memory
+	 for the benefit of .rela.plt, which has 4 unused entries
+	 at the beginning, and we don't want garbage.  */
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+      if (s->contents == NULL)
+	return FALSE;
+    }
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Add some entries to the .dynamic section.  We fill in the
+	 values later, in riscv_elf_finish_dynamic_sections, but we
+	 must add the entries now so that we get the correct size for
+	 the .dynamic section.  The DT_DEBUG entry is filled in by the
+	 dynamic linker and used by the debugger.  */
+#define add_dynamic_entry(TAG, VAL) \
+  _bfd_elf_add_dynamic_entry (info, TAG, VAL)
+
+      if (bfd_link_executable (info))
+	{
+	  if (!add_dynamic_entry (DT_DEBUG, 0))
+	    return FALSE;
+	}
+
+      if (htab->elf.srelplt->size != 0)
+	{
+	  if (!add_dynamic_entry (DT_PLTGOT, 0)
+	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
+	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+	      || !add_dynamic_entry (DT_JMPREL, 0))
+	    return FALSE;
+	}
+
+      if (!add_dynamic_entry (DT_RELA, 0)
+	  || !add_dynamic_entry (DT_RELASZ, 0)
+	  || !add_dynamic_entry (DT_RELAENT, sizeof (ElfNN_External_Rela)))
+	return FALSE;
+
+      /* If any dynamic relocs apply to a read-only section,
+	 then we need a DT_TEXTREL entry.  */
+      if ((info->flags & DF_TEXTREL) == 0)
+	elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
+
+      if (info->flags & DF_TEXTREL)
+	{
+	  if (!add_dynamic_entry (DT_TEXTREL, 0))
+	    return FALSE;
+	}
+    }
+#undef add_dynamic_entry
+
+  return TRUE;
+}
+
+#define TP_OFFSET 0
+#define DTP_OFFSET 0x800
+
+/* Return the relocation value for a TLS dtp-relative reloc.  */
+
+static bfd_vma
+dtpoff (struct bfd_link_info *info, bfd_vma address)
+{
+  /* If tls_sec is NULL, we should have signalled an error already.  */
+  if (elf_hash_table (info)->tls_sec == NULL)
+    return 0;
+  return address - elf_hash_table (info)->tls_sec->vma - DTP_OFFSET;
+}
+
+/* Return the relocation value for a static TLS tp-relative relocation.  */
+
+static bfd_vma
+tpoff (struct bfd_link_info *info, bfd_vma address)
+{
+  /* If tls_sec is NULL, we should have signalled an error already.  */
+  if (elf_hash_table (info)->tls_sec == NULL)
+    return 0;
+  return address - elf_hash_table (info)->tls_sec->vma - TP_OFFSET;
+}
+
+/* Return the global pointer's value, or 0 if it is not in use.  */
+
+static bfd_vma
+riscv_global_pointer_value (struct bfd_link_info *info)
+{
+  struct bfd_link_hash_entry *h;
+
+  h = bfd_link_hash_lookup (info->hash, GP_NAME, FALSE, FALSE, TRUE);
+  if (h == NULL || h->type != bfd_link_hash_defined)
+    return 0;
+
+  return h->u.def.value + sec_addr (h->u.def.section);
+}
+
+/* Emplace a static relocation.  */
+
+static bfd_reloc_status_type
+perform_relocation (const reloc_howto_type *howto,
+		    const Elf_Internal_Rela *rel,
+		    bfd_vma value,
+		    asection *input_section,
+		    bfd *input_bfd,
+		    bfd_byte *contents)
+{
+  if (howto->pc_relative)
+    value -= sec_addr (input_section) + rel->r_offset;
+  value += rel->r_addend;
+
+  switch (ELFNN_R_TYPE (rel->r_info))
+    {
+    case R_RISCV_HI20:
+    case R_RISCV_TPREL_HI20:
+    case R_RISCV_PCREL_HI20:
+    case R_RISCV_GOT_HI20:
+    case R_RISCV_TLS_GOT_HI20:
+    case R_RISCV_TLS_GD_HI20:
+      if (ARCH_SIZE > 32 && !VALID_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)))
+	return bfd_reloc_overflow;
+      value = ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value));
+      break;
+
+    case R_RISCV_LO12_I:
+    case R_RISCV_GPREL_I:
+    case R_RISCV_TPREL_LO12_I:
+    case R_RISCV_TPREL_I:
+    case R_RISCV_PCREL_LO12_I:
+      value = ENCODE_ITYPE_IMM (value);
+      break;
+
+    case R_RISCV_LO12_S:
+    case R_RISCV_GPREL_S:
+    case R_RISCV_TPREL_LO12_S:
+    case R_RISCV_TPREL_S:
+    case R_RISCV_PCREL_LO12_S:
+      value = ENCODE_STYPE_IMM (value);
+      break;
+
+    case R_RISCV_CALL:
+    case R_RISCV_CALL_PLT:
+      if (ARCH_SIZE > 32 && !VALID_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)))
+	return bfd_reloc_overflow;
+      value = ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value))
+	      | (ENCODE_ITYPE_IMM (value) << 32);
+      break;
+
+    case R_RISCV_JAL:
+      if (!VALID_UJTYPE_IMM (value))
+	return bfd_reloc_overflow;
+      value = ENCODE_UJTYPE_IMM (value);
+      break;
+
+    case R_RISCV_BRANCH:
+      if (!VALID_SBTYPE_IMM (value))
+	return bfd_reloc_overflow;
+      value = ENCODE_SBTYPE_IMM (value);
+      break;
+
+    case R_RISCV_RVC_BRANCH:
+      if (!VALID_RVC_B_IMM (value))
+	return bfd_reloc_overflow;
+      value = ENCODE_RVC_B_IMM (value);
+      break;
+
+    case R_RISCV_RVC_JUMP:
+      if (!VALID_RVC_J_IMM (value))
+	return bfd_reloc_overflow;
+      value = ENCODE_RVC_J_IMM (value);
+      break;
+
+    case R_RISCV_RVC_LUI:
+      if (!VALID_RVC_LUI_IMM (RISCV_CONST_HIGH_PART (value)))
+	return bfd_reloc_overflow;
+      value = ENCODE_RVC_LUI_IMM (RISCV_CONST_HIGH_PART (value));
+      break;
+
+    case R_RISCV_32:
+    case R_RISCV_64:
+    case R_RISCV_ADD8:
+    case R_RISCV_ADD16:
+    case R_RISCV_ADD32:
+    case R_RISCV_ADD64:
+    case R_RISCV_SUB6:
+    case R_RISCV_SUB8:
+    case R_RISCV_SUB16:
+    case R_RISCV_SUB32:
+    case R_RISCV_SUB64:
+    case R_RISCV_SET6:
+    case R_RISCV_SET8:
+    case R_RISCV_SET16:
+    case R_RISCV_SET32:
+    case R_RISCV_TLS_DTPREL32:
+    case R_RISCV_TLS_DTPREL64:
+      break;
+
+    default:
+      return bfd_reloc_notsupported;
+    }
+
+  bfd_vma word = bfd_get (howto->bitsize, input_bfd, contents + rel->r_offset);
+  word = (word & ~howto->dst_mask) | (value & howto->dst_mask);
+  bfd_put (howto->bitsize, input_bfd, word, contents + rel->r_offset);
+
+  return bfd_reloc_ok;
+}
+
+/* Remember all PC-relative high-part relocs we've encountered to help us
+   later resolve the corresponding low-part relocs.  */
+
+typedef struct
+{
+  bfd_vma address;
+  bfd_vma value;
+} riscv_pcrel_hi_reloc;
+
+typedef struct riscv_pcrel_lo_reloc
+{
+  asection *                     input_section;
+  struct bfd_link_info *         info;
+  reloc_howto_type *             howto;
+  const Elf_Internal_Rela *      reloc;
+  bfd_vma                        addr;
+  const char *                   name;
+  bfd_byte *                     contents;
+  struct riscv_pcrel_lo_reloc *  next;
+} riscv_pcrel_lo_reloc;
+
+typedef struct
+{
+  htab_t hi_relocs;
+  riscv_pcrel_lo_reloc *lo_relocs;
+} riscv_pcrel_relocs;
+
+static hashval_t
+riscv_pcrel_reloc_hash (const void *entry)
+{
+  const riscv_pcrel_hi_reloc *e = entry;
+  return (hashval_t)(e->address >> 2);
+}
+
+static bfd_boolean
+riscv_pcrel_reloc_eq (const void *entry1, const void *entry2)
+{
+  const riscv_pcrel_hi_reloc *e1 = entry1, *e2 = entry2;
+  return e1->address == e2->address;
+}
+
+static bfd_boolean
+riscv_init_pcrel_relocs (riscv_pcrel_relocs *p)
+{
+
+  p->lo_relocs = NULL;
+  p->hi_relocs = htab_create (1024, riscv_pcrel_reloc_hash,
+			      riscv_pcrel_reloc_eq, free);
+  return p->hi_relocs != NULL;
+}
+
+static void
+riscv_free_pcrel_relocs (riscv_pcrel_relocs *p)
+{
+  riscv_pcrel_lo_reloc *cur = p->lo_relocs;
+
+  while (cur != NULL)
+    {
+      riscv_pcrel_lo_reloc *next = cur->next;
+      free (cur);
+      cur = next;
+    }
+
+  htab_delete (p->hi_relocs);
+}
+
+static bfd_boolean
+riscv_record_pcrel_hi_reloc (riscv_pcrel_relocs *p, bfd_vma addr, bfd_vma value)
+{
+  riscv_pcrel_hi_reloc entry = {addr, value - addr};
+  riscv_pcrel_hi_reloc **slot =
+    (riscv_pcrel_hi_reloc **) htab_find_slot (p->hi_relocs, &entry, INSERT);
+
+  BFD_ASSERT (*slot == NULL);
+  *slot = (riscv_pcrel_hi_reloc *) bfd_malloc (sizeof (riscv_pcrel_hi_reloc));
+  if (*slot == NULL)
+    return FALSE;
+  **slot = entry;
+  return TRUE;
+}
+
+static bfd_boolean
+riscv_record_pcrel_lo_reloc (riscv_pcrel_relocs *p,
+			     asection *input_section,
+			     struct bfd_link_info *info,
+			     reloc_howto_type *howto,
+			     const Elf_Internal_Rela *reloc,
+			     bfd_vma addr,
+			     const char *name,
+			     bfd_byte *contents)
+{
+  riscv_pcrel_lo_reloc *entry;
+  entry = (riscv_pcrel_lo_reloc *) bfd_malloc (sizeof (riscv_pcrel_lo_reloc));
+  if (entry == NULL)
+    return FALSE;
+  *entry = (riscv_pcrel_lo_reloc) {input_section, info, howto, reloc, addr,
+				   name, contents, p->lo_relocs};
+  p->lo_relocs = entry;
+  return TRUE;
+}
+
+static bfd_boolean
+riscv_resolve_pcrel_lo_relocs (riscv_pcrel_relocs *p)
+{
+  riscv_pcrel_lo_reloc *r;
+
+  for (r = p->lo_relocs; r != NULL; r = r->next)
+    {
+      bfd *input_bfd = r->input_section->owner;
+
+      riscv_pcrel_hi_reloc search = {r->addr, 0};
+      riscv_pcrel_hi_reloc *entry = htab_find (p->hi_relocs, &search);
+      if (entry == NULL)
+        {
+	  ((*r->info->callbacks->reloc_overflow)
+	   (r->info, NULL, r->name, r->howto->name, (bfd_vma) 0,
+	    input_bfd, r->input_section, r->reloc->r_offset));
+	  return TRUE;
+        }
+
+      perform_relocation (r->howto, r->reloc, entry->value, r->input_section,
+			  input_bfd, r->contents);
+    }
+
+  return TRUE;
+}
+
+/* Relocate a RISC-V ELF section.
+
+   The RELOCATE_SECTION function is called by the new ELF backend linker
+   to handle the relocations for a section.
+
+   The relocs are always passed as Rela structures.
+
+   This function is responsible for adjusting the section contents as
+   necessary, and (if generating a relocatable output file) adjusting
+   the reloc addend as necessary.
+
+   This function does not have to worry about setting the reloc
+   address or the reloc symbol index.
+
+   LOCAL_SYMS is a pointer to the swapped in local symbols.
+
+   LOCAL_SECTIONS is an array giving the section in the input file
+   corresponding to the st_shndx field of each local symbol.
+
+   The global hash table entry for the global symbols can be found
+   via elf_sym_hashes (input_bfd).
+
+   When generating relocatable output, this function must handle
+   STB_LOCAL/STT_SECTION symbols specially.  The output symbol is
+   going to be the section symbol corresponding to the output
+   section, which means that the addend must be adjusted
+   accordingly.  */
+
+static bfd_boolean
+riscv_elf_relocate_section (bfd *output_bfd,
+			    struct bfd_link_info *info,
+			    bfd *input_bfd,
+			    asection *input_section,
+			    bfd_byte *contents,
+			    Elf_Internal_Rela *relocs,
+			    Elf_Internal_Sym *local_syms,
+			    asection **local_sections)
+{
+  Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *relend;
+  riscv_pcrel_relocs pcrel_relocs;
+  bfd_boolean ret = FALSE;
+  asection *sreloc = elf_section_data (input_section)->sreloc;
+  struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
+  Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (input_bfd);
+  struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
+  bfd_vma *local_got_offsets = elf_local_got_offsets (input_bfd);
+
+  if (!riscv_init_pcrel_relocs (&pcrel_relocs))
+    return FALSE;
+
+  relend = relocs + input_section->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      unsigned long r_symndx;
+      struct elf_link_hash_entry *h;
+      Elf_Internal_Sym *sym;
+      asection *sec;
+      bfd_vma relocation;
+      bfd_reloc_status_type r = bfd_reloc_ok;
+      const char *name;
+      bfd_vma off, ie_off;
+      bfd_boolean unresolved_reloc, is_ie = FALSE;
+      bfd_vma pc = sec_addr (input_section) + rel->r_offset;
+      int r_type = ELFNN_R_TYPE (rel->r_info), tls_type;
+      reloc_howto_type *howto = riscv_elf_rtype_to_howto (r_type);
+      const char *msg = NULL;
+
+      if (r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY)
+	continue;
+
+      /* This is a final link.  */
+      r_symndx = ELFNN_R_SYM (rel->r_info);
+      h = NULL;
+      sym = NULL;
+      sec = NULL;
+      unresolved_reloc = FALSE;
+      if (r_symndx < symtab_hdr->sh_info)
+	{
+	  sym = local_syms + r_symndx;
+	  sec = local_sections[r_symndx];
+	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+	}
+      else
+	{
+	  bfd_boolean warned, ignored;
+
+	  RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+				   r_symndx, symtab_hdr, sym_hashes,
+				   h, sec, relocation,
+				   unresolved_reloc, warned, ignored);
+	  if (warned)
+	    {
+	      /* To avoid generating warning messages about truncated
+		 relocations, set the relocation's address to be the same as
+		 the start of this section.  */
+	      if (input_section->output_section != NULL)
+		relocation = input_section->output_section->vma;
+	      else
+		relocation = 0;
+	    }
+	}
+
+      if (sec != NULL && discarded_section (sec))
+	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+					 rel, 1, relend, howto, 0, contents);
+
+      if (bfd_link_relocatable (info))
+	continue;
+
+      if (h != NULL)
+	name = h->root.root.string;
+      else
+	{
+	  name = (bfd_elf_string_from_elf_section
+		  (input_bfd, symtab_hdr->sh_link, sym->st_name));
+	  if (name == NULL || *name == '\0')
+	    name = bfd_section_name (input_bfd, sec);
+	}
+
+      switch (r_type)
+	{
+	case R_RISCV_NONE:
+	case R_RISCV_RELAX:
+	case R_RISCV_TPREL_ADD:
+	case R_RISCV_COPY:
+	case R_RISCV_JUMP_SLOT:
+	case R_RISCV_RELATIVE:
+	  /* These require nothing of us at all.  */
+	  continue;
+
+	case R_RISCV_HI20:
+	case R_RISCV_BRANCH:
+	case R_RISCV_RVC_BRANCH:
+	case R_RISCV_RVC_LUI:
+	case R_RISCV_LO12_I:
+	case R_RISCV_LO12_S:
+	case R_RISCV_SET6:
+	case R_RISCV_SET8:
+	case R_RISCV_SET16:
+	case R_RISCV_SET32:
+	  /* These require no special handling beyond perform_relocation.  */
+	  break;
+
+	case R_RISCV_GOT_HI20:
+	  if (h != NULL)
+	    {
+	      bfd_boolean dyn, pic;
+
+	      off = h->got.offset;
+	      BFD_ASSERT (off != (bfd_vma) -1);
+	      dyn = elf_hash_table (info)->dynamic_sections_created;
+	      pic = bfd_link_pic (info);
+
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
+		  || (pic && SYMBOL_REFERENCES_LOCAL (info, h)))
+		{
+		  /* This is actually a static link, or it is a
+		     -Bsymbolic link and the symbol is defined
+		     locally, or the symbol was forced to be local
+		     because of a version file.  We must initialize
+		     this entry in the global offset table.  Since the
+		     offset must always be a multiple of the word size,
+		     we use the least significant bit to record whether
+		     we have initialized it already.
+
+		     When doing a dynamic link, we create a .rela.got
+		     relocation entry to initialize the value.  This
+		     is done in the finish_dynamic_symbol routine.  */
+		  if ((off & 1) != 0)
+		    off &= ~1;
+		  else
+		    {
+		      bfd_put_NN (output_bfd, relocation,
+				  htab->elf.sgot->contents + off);
+		      h->got.offset |= 1;
+		    }
+		}
+	      else
+		unresolved_reloc = FALSE;
+	    }
+	  else
+	    {
+	      BFD_ASSERT (local_got_offsets != NULL
+			  && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+	      off = local_got_offsets[r_symndx];
+
+	      /* The offset must always be a multiple of the word size.
+		 So, we can use the least significant bit to record
+		 whether we have already processed this entry.  */
+	      if ((off & 1) != 0)
+		off &= ~1;
+	      else
+		{
+		  if (bfd_link_pic (info))
+		    {
+		      asection *s;
+		      Elf_Internal_Rela outrel;
+
+		      /* We need to generate a R_RISCV_RELATIVE reloc
+			 for the dynamic linker.  */
+		      s = htab->elf.srelgot;
+		      BFD_ASSERT (s != NULL);
+
+		      outrel.r_offset = sec_addr (htab->elf.sgot) + off;
+		      outrel.r_info =
+			ELFNN_R_INFO (0, R_RISCV_RELATIVE);
+		      outrel.r_addend = relocation;
+		      relocation = 0;
+		      riscv_elf_append_rela (output_bfd, s, &outrel);
+		    }
+
+		  bfd_put_NN (output_bfd, relocation,
+			      htab->elf.sgot->contents + off);
+		  local_got_offsets[r_symndx] |= 1;
+		}
+	    }
+	  relocation = sec_addr (htab->elf.sgot) + off;
+	  if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, relocation))
+	    r = bfd_reloc_overflow;
+	  break;
+
+	case R_RISCV_ADD8:
+	case R_RISCV_ADD16:
+	case R_RISCV_ADD32:
+	case R_RISCV_ADD64:
+	  {
+	    bfd_vma old_value = bfd_get (howto->bitsize, input_bfd,
+					 contents + rel->r_offset);
+	    relocation = old_value + relocation;
+	  }
+	  break;
+
+	case R_RISCV_SUB6:
+	case R_RISCV_SUB8:
+	case R_RISCV_SUB16:
+	case R_RISCV_SUB32:
+	case R_RISCV_SUB64:
+	  {
+	    bfd_vma old_value = bfd_get (howto->bitsize, input_bfd,
+					 contents + rel->r_offset);
+	    relocation = old_value - relocation;
+	  }
+	  break;
+
+	case R_RISCV_CALL_PLT:
+	case R_RISCV_CALL:
+	case R_RISCV_JAL:
+	case R_RISCV_RVC_JUMP:
+	  if (bfd_link_pic (info) && h != NULL && h->plt.offset != MINUS_ONE)
+	    {
+	      /* Refer to the PLT entry.  */
+	      relocation = sec_addr (htab->elf.splt) + h->plt.offset;
+	      unresolved_reloc = FALSE;
+	    }
+	  break;
+
+	case R_RISCV_TPREL_HI20:
+	  relocation = tpoff (info, relocation);
+	  break;
+
+	case R_RISCV_TPREL_LO12_I:
+	case R_RISCV_TPREL_LO12_S:
+	  relocation = tpoff (info, relocation);
+	  break;
+
+	case R_RISCV_TPREL_I:
+	case R_RISCV_TPREL_S:
+	  relocation = tpoff (info, relocation);
+	  if (VALID_ITYPE_IMM (relocation + rel->r_addend))
+	    {
+	      /* We can use tp as the base register.  */
+	      bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      insn &= ~(OP_MASK_RS1 << OP_SH_RS1);
+	      insn |= X_TP << OP_SH_RS1;
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+	    }
+	  else
+	    r = bfd_reloc_overflow;
+	  break;
+
+	case R_RISCV_GPREL_I:
+	case R_RISCV_GPREL_S:
+	  {
+	    bfd_vma gp = riscv_global_pointer_value (info);
+	    bfd_boolean x0_base = VALID_ITYPE_IMM (relocation + rel->r_addend);
+	    if (x0_base || VALID_ITYPE_IMM (relocation + rel->r_addend - gp))
+	      {
+		/* We can use x0 or gp as the base register.  */
+		bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+		insn &= ~(OP_MASK_RS1 << OP_SH_RS1);
+		if (!x0_base)
+		  {
+		    rel->r_addend -= gp;
+		    insn |= X_GP << OP_SH_RS1;
+		  }
+		bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+	      }
+	    else
+	      r = bfd_reloc_overflow;
+	    break;
+	  }
+
+	case R_RISCV_PCREL_HI20:
+	  if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc,
+					    relocation + rel->r_addend))
+	    r = bfd_reloc_overflow;
+	  break;
+
+	case R_RISCV_PCREL_LO12_I:
+	case R_RISCV_PCREL_LO12_S:
+	  if (riscv_record_pcrel_lo_reloc (&pcrel_relocs, input_section, info,
+					   howto, rel, relocation, name,
+					   contents))
+	    continue;
+	  r = bfd_reloc_overflow;
+	  break;
+
+	case R_RISCV_TLS_DTPREL32:
+	case R_RISCV_TLS_DTPREL64:
+	  relocation = dtpoff (info, relocation);
+	  break;
+
+	case R_RISCV_32:
+	case R_RISCV_64:
+	  if ((input_section->flags & SEC_ALLOC) == 0)
+	    break;
+
+	  if ((bfd_link_pic (info)
+	       && (h == NULL
+		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		   || h->root.type != bfd_link_hash_undefweak)
+	       && (! howto->pc_relative
+		   || !SYMBOL_CALLS_LOCAL (info, h)))
+	      || (!bfd_link_pic (info)
+		  && h != NULL
+		  && h->dynindx != -1
+		  && !h->non_got_ref
+		  && ((h->def_dynamic
+		       && !h->def_regular)
+		      || h->root.type == bfd_link_hash_undefweak
+		      || h->root.type == bfd_link_hash_undefined)))
+	    {
+	      Elf_Internal_Rela outrel;
+	      bfd_boolean skip_static_relocation, skip_dynamic_relocation;
+
+	      /* When generating a shared object, these relocations
+		 are copied into the output file to be resolved at run
+		 time.  */
+
+	      outrel.r_offset =
+		_bfd_elf_section_offset (output_bfd, info, input_section,
+					 rel->r_offset);
+	      skip_static_relocation = outrel.r_offset != (bfd_vma) -2;
+	      skip_dynamic_relocation = outrel.r_offset >= (bfd_vma) -2;
+	      outrel.r_offset += sec_addr (input_section);
+
+	      if (skip_dynamic_relocation)
+		memset (&outrel, 0, sizeof outrel);
+	      else if (h != NULL && h->dynindx != -1
+		       && !(bfd_link_pic (info)
+			    && SYMBOLIC_BIND (info, h)
+			    && h->def_regular))
+		{
+		  outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type);
+		  outrel.r_addend = rel->r_addend;
+		}
+	      else
+		{
+		  outrel.r_info = ELFNN_R_INFO (0, R_RISCV_RELATIVE);
+		  outrel.r_addend = relocation + rel->r_addend;
+		}
+
+	      riscv_elf_append_rela (output_bfd, sreloc, &outrel);
+	      if (skip_static_relocation)
+		continue;
+	    }
+	  break;
+
+	case R_RISCV_TLS_GOT_HI20:
+	  is_ie = TRUE;
+	  /* Fall through.  */
+
+	case R_RISCV_TLS_GD_HI20:
+	  if (h != NULL)
+	    {
+	      off = h->got.offset;
+	      h->got.offset |= 1;
+	    }
+	  else
+	    {
+	      off = local_got_offsets[r_symndx];
+	      local_got_offsets[r_symndx] |= 1;
+	    }
+
+	  tls_type = _bfd_riscv_elf_tls_type (input_bfd, h, r_symndx);
+	  BFD_ASSERT (tls_type & (GOT_TLS_IE | GOT_TLS_GD));
+	  /* If this symbol is referenced by both GD and IE TLS, the IE
+	     reference's GOT slot follows the GD reference's slots.  */
+	  ie_off = 0;
+	  if ((tls_type & GOT_TLS_GD) && (tls_type & GOT_TLS_IE))
+	    ie_off = 2 * GOT_ENTRY_SIZE;
+
+	  if ((off & 1) != 0)
+	    off &= ~1;
+	  else
+	    {
+	      Elf_Internal_Rela outrel;
+	      int indx = 0;
+	      bfd_boolean need_relocs = FALSE;
+
+	      if (htab->elf.srelgot == NULL)
+		abort ();
+
+	      if (h != NULL)
+		{
+		  bfd_boolean dyn, pic;
+		  dyn = htab->elf.dynamic_sections_created;
+		  pic = bfd_link_pic (info);
+
+		  if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
+		      && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
+		    indx = h->dynindx;
+		}
+
+	      /* The GOT entries have not been initialized yet.  Do it
+	         now, and emit any relocations.  */
+	      if ((bfd_link_pic (info) || indx != 0)
+		  && (h == NULL
+		      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		      || h->root.type != bfd_link_hash_undefweak))
+		    need_relocs = TRUE;
+
+	      if (tls_type & GOT_TLS_GD)
+		{
+		  if (need_relocs)
+		    {
+		      outrel.r_offset = sec_addr (htab->elf.sgot) + off;
+		      outrel.r_addend = 0;
+		      outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_DTPMODNN);
+		      bfd_put_NN (output_bfd, 0,
+				  htab->elf.sgot->contents + off);
+		      riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
+		      if (indx == 0)
+			{
+			  BFD_ASSERT (! unresolved_reloc);
+			  bfd_put_NN (output_bfd,
+				      dtpoff (info, relocation),
+				      (htab->elf.sgot->contents + off +
+				       RISCV_ELF_WORD_BYTES));
+			}
+		      else
+			{
+			  bfd_put_NN (output_bfd, 0,
+				      (htab->elf.sgot->contents + off +
+				       RISCV_ELF_WORD_BYTES));
+			  outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_DTPRELNN);
+			  outrel.r_offset += RISCV_ELF_WORD_BYTES;
+			  riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
+			}
+		    }
+		  else
+		    {
+		      /* If we are not emitting relocations for a
+			 general dynamic reference, then we must be in a
+			 static link or an executable link with the
+			 symbol binding locally.  Mark it as belonging
+			 to module 1, the executable.  */
+		      bfd_put_NN (output_bfd, 1,
+				  htab->elf.sgot->contents + off);
+		      bfd_put_NN (output_bfd,
+				  dtpoff (info, relocation),
+				  (htab->elf.sgot->contents + off +
+				   RISCV_ELF_WORD_BYTES));
+		   }
+		}
+
+	      if (tls_type & GOT_TLS_IE)
+		{
+		  if (need_relocs)
+		    {
+		      bfd_put_NN (output_bfd, 0,
+				  htab->elf.sgot->contents + off + ie_off);
+		      outrel.r_offset = sec_addr (htab->elf.sgot)
+				       + off + ie_off;
+		      outrel.r_addend = 0;
+		      if (indx == 0)
+			outrel.r_addend = tpoff (info, relocation);
+		      outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_TPRELNN);
+		      riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
+		    }
+		  else
+		    {
+		      bfd_put_NN (output_bfd, tpoff (info, relocation),
+				  htab->elf.sgot->contents + off + ie_off);
+		    }
+		}
+	    }
+
+	  BFD_ASSERT (off < (bfd_vma) -2);
+	  relocation = sec_addr (htab->elf.sgot) + off + (is_ie ? ie_off : 0);
+	  if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, relocation))
+	    r = bfd_reloc_overflow;
+	  unresolved_reloc = FALSE;
+	  break;
+
+	default:
+	  r = bfd_reloc_notsupported;
+	}
+
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
+      if (unresolved_reloc
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
+	       && h->def_dynamic)
+	  && _bfd_elf_section_offset (output_bfd, info, input_section,
+				      rel->r_offset) != (bfd_vma) -1)
+	{
+	  (*_bfd_error_handler)
+	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+	     input_bfd,
+	     input_section,
+	     (long) rel->r_offset,
+	     howto->name,
+	     h->root.root.string);
+	  continue;
+	}
+
+      if (r == bfd_reloc_ok)
+	r = perform_relocation (howto, rel, relocation, input_section,
+				input_bfd, contents);
+
+      switch (r)
+	{
+	case bfd_reloc_ok:
+	  continue;
+
+	case bfd_reloc_overflow:
+	  info->callbacks->reloc_overflow
+	    (info, (h ? &h->root : NULL), name, howto->name,
+	     (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
+	  break;
+
+	case bfd_reloc_undefined:
+	  info->callbacks->undefined_symbol
+	    (info, name, input_bfd, input_section, rel->r_offset,
+	     TRUE);
+	  break;
+
+	case bfd_reloc_outofrange:
+	  msg = _("internal error: out of range error");
+	  break;
+
+	case bfd_reloc_notsupported:
+	  msg = _("internal error: unsupported relocation error");
+	  break;
+
+	case bfd_reloc_dangerous:
+	  msg = _("internal error: dangerous relocation");
+	  break;
+
+	default:
+	  msg = _("internal error: unknown error");
+	  break;
+	}
+
+      if (msg)
+	info->callbacks->warning
+	  (info, msg, name, input_bfd, input_section, rel->r_offset);
+      goto out;
+    }
+
+  ret = riscv_resolve_pcrel_lo_relocs (&pcrel_relocs);
+out:
+  riscv_free_pcrel_relocs (&pcrel_relocs);
+  return ret;
+}
+
+/* Finish up dynamic symbol handling.  We set the contents of various
+   dynamic sections here.  */
+
+static bfd_boolean
+riscv_elf_finish_dynamic_symbol (bfd *output_bfd,
+				 struct bfd_link_info *info,
+				 struct elf_link_hash_entry *h,
+				 Elf_Internal_Sym *sym)
+{
+  struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
+  const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+
+  if (h->plt.offset != (bfd_vma) -1)
+    {
+      /* We've decided to create a PLT entry for this symbol.  */
+      bfd_byte *loc;
+      bfd_vma i, header_address, plt_idx, got_address;
+      uint32_t plt_entry[PLT_ENTRY_INSNS];
+      Elf_Internal_Rela rela;
+
+      BFD_ASSERT (h->dynindx != -1);
+
+      /* Calculate the address of the PLT header.  */
+      header_address = sec_addr (htab->elf.splt);
+
+      /* Calculate the index of the entry.  */
+      plt_idx = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+
+      /* Calculate the address of the .got.plt entry.  */
+      got_address = riscv_elf_got_plt_val (plt_idx, info);
+
+      /* Find out where the .plt entry should go.  */
+      loc = htab->elf.splt->contents + h->plt.offset;
+
+      /* Fill in the PLT entry itself.  */
+      riscv_make_plt_entry (got_address, header_address + h->plt.offset,
+			    plt_entry);
+      for (i = 0; i < PLT_ENTRY_INSNS; i++)
+	bfd_put_32 (output_bfd, plt_entry[i], loc + 4*i);
+
+      /* Fill in the initial value of the .got.plt entry.  */
+      loc = htab->elf.sgotplt->contents
+	    + (got_address - sec_addr (htab->elf.sgotplt));
+      bfd_put_NN (output_bfd, sec_addr (htab->elf.splt), loc);
+
+      /* Fill in the entry in the .rela.plt section.  */
+      rela.r_offset = got_address;
+      rela.r_addend = 0;
+      rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_JUMP_SLOT);
+
+      loc = htab->elf.srelplt->contents + plt_idx * sizeof (ElfNN_External_Rela);
+      bed->s->swap_reloca_out (output_bfd, &rela, loc);
+
+      if (!h->def_regular)
+	{
+	  /* Mark the symbol as undefined, rather than as defined in
+	     the .plt section.  Leave the value alone.  */
+	  sym->st_shndx = SHN_UNDEF;
+	  /* If the symbol is weak, we do need to clear the value.
+	     Otherwise, the PLT entry would provide a definition for
+	     the symbol even if the symbol wasn't defined anywhere,
+	     and so the symbol would never be NULL.  */
+	  if (!h->ref_regular_nonweak)
+	    sym->st_value = 0;
+	}
+    }
+
+  if (h->got.offset != (bfd_vma) -1
+      && !(riscv_elf_hash_entry (h)->tls_type & (GOT_TLS_GD | GOT_TLS_IE)))
+    {
+      asection *sgot;
+      asection *srela;
+      Elf_Internal_Rela rela;
+
+      /* This symbol has an entry in the GOT.  Set it up.  */
+
+      sgot = htab->elf.sgot;
+      srela = htab->elf.srelgot;
+      BFD_ASSERT (sgot != NULL && srela != NULL);
+
+      rela.r_offset = sec_addr (sgot) + (h->got.offset &~ (bfd_vma) 1);
+
+      /* If this is a -Bsymbolic link, and the symbol is defined
+	 locally, we just want to emit a RELATIVE reloc.  Likewise if
+	 the symbol was forced to be local because of a version file.
+	 The entry in the global offset table will already have been
+	 initialized in the relocate_section function.  */
+      if (bfd_link_pic (info)
+	  && (info->symbolic || h->dynindx == -1)
+	  && h->def_regular)
+	{
+	  asection *sec = h->root.u.def.section;
+	  rela.r_info = ELFNN_R_INFO (0, R_RISCV_RELATIVE);
+	  rela.r_addend = (h->root.u.def.value
+			   + sec->output_section->vma
+			   + sec->output_offset);
+	}
+      else
+	{
+	  BFD_ASSERT (h->dynindx != -1);
+	  rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_NN);
+	  rela.r_addend = 0;
+	}
+
+      bfd_put_NN (output_bfd, 0,
+		  sgot->contents + (h->got.offset & ~(bfd_vma) 1));
+      riscv_elf_append_rela (output_bfd, srela, &rela);
+    }
+
+  if (h->needs_copy)
+    {
+      Elf_Internal_Rela rela;
+      asection *s;
+
+      /* This symbols needs a copy reloc.  Set it up.  */
+      BFD_ASSERT (h->dynindx != -1);
+
+      rela.r_offset = sec_addr (h->root.u.def.section) + h->root.u.def.value;
+      rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_COPY);
+      rela.r_addend = 0;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
+      riscv_elf_append_rela (output_bfd, s, &rela);
+    }
+
+  /* Mark some specially defined symbols as absolute.  */
+  if (h == htab->elf.hdynamic
+      || (h == htab->elf.hgot || h == htab->elf.hplt))
+    sym->st_shndx = SHN_ABS;
+
+  return TRUE;
+}
+
+/* Finish up the dynamic sections.  */
+
+static bfd_boolean
+riscv_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
+		  bfd *dynobj, asection *sdyn)
+{
+  struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
+  const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+  size_t dynsize = bed->s->sizeof_dyn;
+  bfd_byte *dyncon, *dynconend;
+
+  dynconend = sdyn->contents + sdyn->size;
+  for (dyncon = sdyn->contents; dyncon < dynconend; dyncon += dynsize)
+    {
+      Elf_Internal_Dyn dyn;
+      asection *s;
+
+      bed->s->swap_dyn_in (dynobj, dyncon, &dyn);
+
+      switch (dyn.d_tag)
+	{
+	case DT_PLTGOT:
+	  s = htab->elf.sgotplt;
+	  dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	  break;
+	case DT_JMPREL:
+	  s = htab->elf.srelplt;
+	  dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	  break;
+	case DT_PLTRELSZ:
+	  s = htab->elf.srelplt;
+	  dyn.d_un.d_val = s->size;
+	  break;
+	default:
+	  continue;
+	}
+
+      bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
+    }
+  return TRUE;
+}
+
+static bfd_boolean
+riscv_elf_finish_dynamic_sections (bfd *output_bfd,
+				   struct bfd_link_info *info)
+{
+  bfd *dynobj;
+  asection *sdyn;
+  struct riscv_elf_link_hash_table *htab;
+
+  htab = riscv_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  dynobj = htab->elf.dynobj;
+
+  sdyn = bfd_get_linker_section (dynobj, ".dynamic");
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      asection *splt;
+      bfd_boolean ret;
+
+      splt = htab->elf.splt;
+      BFD_ASSERT (splt != NULL && sdyn != NULL);
+
+      ret = riscv_finish_dyn (output_bfd, info, dynobj, sdyn);
+
+      if (ret != TRUE)
+	return ret;
+
+      /* Fill in the head and tail entries in the procedure linkage table.  */
+      if (splt->size > 0)
+	{
+	  int i;
+	  uint32_t plt_header[PLT_HEADER_INSNS];
+	  riscv_make_plt_header (sec_addr (htab->elf.sgotplt),
+				 sec_addr (splt), plt_header);
+
+	  for (i = 0; i < PLT_HEADER_INSNS; i++)
+	    bfd_put_32 (output_bfd, plt_header[i], splt->contents + 4*i);
+
+	  elf_section_data (splt->output_section)->this_hdr.sh_entsize
+	    = PLT_ENTRY_SIZE;
+	}
+    }
+
+  if (htab->elf.sgotplt)
+    {
+      asection *output_section = htab->elf.sgotplt->output_section;
+
+      if (bfd_is_abs_section (output_section))
+	{
+	  (*_bfd_error_handler)
+	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
+	  return FALSE;
+	}
+
+      if (htab->elf.sgotplt->size > 0)
+	{
+	  /* Write the first two entries in .got.plt, needed for the dynamic
+	     linker.  */
+	  bfd_put_NN (output_bfd, (bfd_vma) -1, htab->elf.sgotplt->contents);
+	  bfd_put_NN (output_bfd, (bfd_vma) 0,
+		      htab->elf.sgotplt->contents + GOT_ENTRY_SIZE);
+	}
+
+      elf_section_data (output_section)->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
+    }
+
+  if (htab->elf.sgot)
+    {
+      asection *output_section = htab->elf.sgot->output_section;
+
+      if (htab->elf.sgot->size > 0)
+	{
+	  /* Set the first entry in the global offset table to the address of
+	     the dynamic section.  */
+	  bfd_vma val = sdyn ? sec_addr (sdyn) : 0;
+	  bfd_put_NN (output_bfd, val, htab->elf.sgot->contents);
+	}
+
+      elf_section_data (output_section)->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
+    }
+
+  return TRUE;
+}
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+   or (bfd_vma) -1 if it should not be included.  */
+
+static bfd_vma
+riscv_elf_plt_sym_val (bfd_vma i, const asection *plt,
+		       const arelent *rel ATTRIBUTE_UNUSED)
+{
+  return plt->vma + PLT_HEADER_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+static enum elf_reloc_type_class
+riscv_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+			const asection *rel_sec ATTRIBUTE_UNUSED,
+			const Elf_Internal_Rela *rela)
+{
+  switch (ELFNN_R_TYPE (rela->r_info))
+    {
+    case R_RISCV_RELATIVE:
+      return reloc_class_relative;
+    case R_RISCV_JUMP_SLOT:
+      return reloc_class_plt;
+    case R_RISCV_COPY:
+      return reloc_class_copy;
+    default:
+      return reloc_class_normal;
+    }
+}
+
+/* Merge backend specific data from an object file to the output
+   object file when linking.  */
+
+static bfd_boolean
+_bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
+{
+  bfd *obfd = info->output_bfd;
+  flagword new_flags = elf_elfheader (ibfd)->e_flags;
+  flagword old_flags = elf_elfheader (obfd)->e_flags;
+
+  if (!is_riscv_elf (ibfd) || !is_riscv_elf (obfd))
+    return TRUE;
+
+  if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
+    {
+      (*_bfd_error_handler)
+	(_("%B: ABI is incompatible with that of the selected emulation:\n"
+	   "  target emulation `%s' does not match `%s'"),
+	 ibfd, bfd_get_target (ibfd), bfd_get_target (obfd));
+      return FALSE;
+    }
+
+  if (!_bfd_elf_merge_object_attributes (ibfd, info))
+    return FALSE;
+
+  if (! elf_flags_init (obfd))
+    {
+      elf_flags_init (obfd) = TRUE;
+      elf_elfheader (obfd)->e_flags = new_flags;
+      return TRUE;
+    }
+
+  /* Disallow linking different float ABIs.  */
+  if ((old_flags ^ new_flags) & EF_RISCV_FLOAT_ABI)
+    {
+      (*_bfd_error_handler)
+	(_("%B: can't link hard-float modules with soft-float modules"), ibfd);
+      goto fail;
+    }
+
+  /* Allow linking RVC and non-RVC, and keep the RVC flag.  */
+  elf_elfheader (obfd)->e_flags |= new_flags & EF_RISCV_RVC;
+
+  return TRUE;
+
+fail:
+  bfd_set_error (bfd_error_bad_value);
+  return FALSE;
+}
+
+/* Delete some bytes from a section while relaxing.  */
+
+static bfd_boolean
+riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count)
+{
+  unsigned int i, symcount;
+  bfd_vma toaddr = sec->size;
+  struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (abfd);
+  Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  unsigned int sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+  struct bfd_elf_section_data *data = elf_section_data (sec);
+  bfd_byte *contents = data->this_hdr.contents;
+
+  /* Actually delete the bytes.  */
+  sec->size -= count;
+  memmove (contents + addr, contents + addr + count, toaddr - addr - count);
+
+  /* Adjust the location of all of the relocs.  Note that we need not
+     adjust the addends, since all PC-relative references must be against
+     symbols, which we will adjust below.  */
+  for (i = 0; i < sec->reloc_count; i++)
+    if (data->relocs[i].r_offset > addr && data->relocs[i].r_offset < toaddr)
+      data->relocs[i].r_offset -= count;
+
+  /* Adjust the local symbols defined in this section.  */
+  for (i = 0; i < symtab_hdr->sh_info; i++)
+    {
+      Elf_Internal_Sym *sym = (Elf_Internal_Sym *) symtab_hdr->contents + i;
+      if (sym->st_shndx == sec_shndx)
+	{
+	  /* If the symbol is in the range of memory we just moved, we
+	     have to adjust its value.  */
+	  if (sym->st_value > addr && sym->st_value <= toaddr)
+	    sym->st_value -= count;
+
+	  /* If the symbol *spans* the bytes we just deleted (i.e. its
+	     *end* is in the moved bytes but its *start* isn't), then we
+	     must adjust its size.  */
+	  if (sym->st_value <= addr
+	      && sym->st_value + sym->st_size > addr
+	      && sym->st_value + sym->st_size <= toaddr)
+	    sym->st_size -= count;
+	}
+    }
+
+  /* Now adjust the global symbols defined in this section.  */
+  symcount = ((symtab_hdr->sh_size / sizeof (ElfNN_External_Sym))
+	      - symtab_hdr->sh_info);
+
+  for (i = 0; i < symcount; i++)
+    {
+      struct elf_link_hash_entry *sym_hash = sym_hashes[i];
+
+      if ((sym_hash->root.type == bfd_link_hash_defined
+	   || sym_hash->root.type == bfd_link_hash_defweak)
+	  && sym_hash->root.u.def.section == sec)
+	{
+	  /* As above, adjust the value if needed.  */
+	  if (sym_hash->root.u.def.value > addr
+	      && sym_hash->root.u.def.value <= toaddr)
+	    sym_hash->root.u.def.value -= count;
+
+	  /* As above, adjust the size if needed.  */
+	  if (sym_hash->root.u.def.value <= addr
+	      && sym_hash->root.u.def.value + sym_hash->size > addr
+	      && sym_hash->root.u.def.value + sym_hash->size <= toaddr)
+	    sym_hash->size -= count;
+	}
+    }
+
+  return TRUE;
+}
+
+typedef bfd_boolean (*relax_func_t) (bfd *, asection *, asection *,
+				     struct bfd_link_info *,
+				     Elf_Internal_Rela *,
+				     bfd_vma, bfd_vma, bfd_vma, bfd_boolean *);
+
+/* Relax AUIPC + JALR into JAL.  */
+
+static bfd_boolean
+_bfd_riscv_relax_call (bfd *abfd, asection *sec, asection *sym_sec,
+		       struct bfd_link_info *link_info,
+		       Elf_Internal_Rela *rel,
+		       bfd_vma symval,
+		       bfd_vma max_alignment,
+		       bfd_vma reserve_size ATTRIBUTE_UNUSED,
+		       bfd_boolean *again)
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_signed_vma foff = symval - (sec_addr (sec) + rel->r_offset);
+  bfd_boolean near_zero = (symval + RISCV_IMM_REACH/2) < RISCV_IMM_REACH;
+  bfd_vma auipc, jalr;
+  int rd, r_type, len = 4, rvc = elf_elfheader (abfd)->e_flags & EF_RISCV_RVC;
+
+  /* If the call crosses section boundaries, an alignment directive could
+     cause the PC-relative offset to later increase.  */
+  if (VALID_UJTYPE_IMM (foff) && sym_sec->output_section != sec->output_section)
+    foff += (foff < 0 ? -max_alignment : max_alignment);
+
+  /* See if this function call can be shortened.  */
+  if (!VALID_UJTYPE_IMM (foff) && !(!bfd_link_pic (link_info) && near_zero))
+    return TRUE;
+
+  /* Shorten the function call.  */
+  BFD_ASSERT (rel->r_offset + 8 <= sec->size);
+
+  auipc = bfd_get_32 (abfd, contents + rel->r_offset);
+  jalr = bfd_get_32 (abfd, contents + rel->r_offset + 4);
+  rd = (jalr >> OP_SH_RD) & OP_MASK_RD;
+  rvc = rvc && VALID_RVC_J_IMM (foff) && ARCH_SIZE == 32;
+
+  if (rvc && (rd == 0 || rd == X_RA))
+    {
+      /* Relax to C.J[AL] rd, addr.  */
+      r_type = R_RISCV_RVC_JUMP;
+      auipc = rd == 0 ? MATCH_C_J : MATCH_C_JAL;
+      len = 2;
+    }
+  else if (VALID_UJTYPE_IMM (foff))
+    {
+      /* Relax to JAL rd, addr.  */
+      r_type = R_RISCV_JAL;
+      auipc = MATCH_JAL | (rd << OP_SH_RD);
+    }
+  else /* near_zero */
+    {
+      /* Relax to JALR rd, x0, addr.  */
+      r_type = R_RISCV_LO12_I;
+      auipc = MATCH_JALR | (rd << OP_SH_RD);
+    }
+
+  /* Replace the R_RISCV_CALL reloc.  */
+  rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), r_type);
+  /* Replace the AUIPC.  */
+  bfd_put (8 * len, abfd, auipc, contents + rel->r_offset);
+
+  /* Delete unnecessary JALR.  */
+  *again = TRUE;
+  return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + len, 8 - len);
+}
+
+/* Traverse all output sections and return the max alignment.  */
+
+static bfd_vma
+_bfd_riscv_get_max_alignment (asection *sec)
+{
+  unsigned int max_alignment_power = 0;
+  asection *o;
+
+  for (o = sec->output_section->owner->sections; o != NULL; o = o->next)
+    {
+      if (o->alignment_power > max_alignment_power)
+	max_alignment_power = o->alignment_power;
+    }
+
+  return (bfd_vma) 1 << max_alignment_power;
+}
+
+/* Relax non-PIC global variable references.  */
+
+static bfd_boolean
+_bfd_riscv_relax_lui (bfd *abfd,
+		      asection *sec,
+		      asection *sym_sec,
+		      struct bfd_link_info *link_info,
+		      Elf_Internal_Rela *rel,
+		      bfd_vma symval,
+		      bfd_vma max_alignment,
+		      bfd_vma reserve_size,
+		      bfd_boolean *again)
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_vma gp = riscv_global_pointer_value (link_info);
+  int use_rvc = elf_elfheader (abfd)->e_flags & EF_RISCV_RVC;
+
+  /* Mergeable symbols and code might later move out of range.  */
+  if (sym_sec->flags & (SEC_MERGE | SEC_CODE))
+    return TRUE;
+
+  BFD_ASSERT (rel->r_offset + 4 <= sec->size);
+
+  if (gp)
+    {
+      /* If gp and the symbol are in the same output section, then
+	 consider only that section's alignment.  */
+      struct bfd_link_hash_entry *h =
+	bfd_link_hash_lookup (link_info->hash, GP_NAME, FALSE, FALSE, TRUE);
+      if (h->u.def.section->output_section == sym_sec->output_section)
+	max_alignment = (bfd_vma) 1 << sym_sec->output_section->alignment_power;
+    }
+
+  /* Is the reference in range of x0 or gp?
+     Valid gp range conservatively because of alignment issue.  */
+  if (VALID_ITYPE_IMM (symval)
+      || (symval >= gp
+	  && VALID_ITYPE_IMM (symval - gp + max_alignment + reserve_size))
+      || (symval < gp
+	  && VALID_ITYPE_IMM (symval - gp - max_alignment - reserve_size)))
+    {
+      unsigned sym = ELFNN_R_SYM (rel->r_info);
+      switch (ELFNN_R_TYPE (rel->r_info))
+	{
+	case R_RISCV_LO12_I:
+	  rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_I);
+	  return TRUE;
+
+	case R_RISCV_LO12_S:
+	  rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_S);
+	  return TRUE;
+
+	case R_RISCV_HI20:
+	  /* We can delete the unnecessary LUI and reloc.  */
+	  rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE);
+	  *again = TRUE;
+	  return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4);
+
+	default:
+	  abort ();
+	}
+    }
+
+  /* Can we relax LUI to C.LUI?  Alignment might move the section forward;
+     account for this assuming page alignment at worst.  */
+  if (use_rvc
+      && ELFNN_R_TYPE (rel->r_info) == R_RISCV_HI20
+      && VALID_RVC_LUI_IMM (RISCV_CONST_HIGH_PART (symval))
+      && VALID_RVC_LUI_IMM (RISCV_CONST_HIGH_PART (symval + ELF_MAXPAGESIZE)))
+    {
+      /* Replace LUI with C.LUI if legal (i.e., rd != x2/sp).  */
+      bfd_vma lui = bfd_get_32 (abfd, contents + rel->r_offset);
+      if (((lui >> OP_SH_RD) & OP_MASK_RD) == X_SP)
+	return TRUE;
+
+      lui = (lui & (OP_MASK_RD << OP_SH_RD)) | MATCH_C_LUI;
+      bfd_put_32 (abfd, lui, contents + rel->r_offset);
+
+      /* Replace the R_RISCV_HI20 reloc.  */
+      rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_RVC_LUI);
+
+      *again = TRUE;
+      return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + 2, 2);
+    }
+
+  return TRUE;
+}
+
+/* Relax non-PIC TLS references.  */
+
+static bfd_boolean
+_bfd_riscv_relax_tls_le (bfd *abfd,
+			 asection *sec,
+			 asection *sym_sec ATTRIBUTE_UNUSED,
+			 struct bfd_link_info *link_info,
+			 Elf_Internal_Rela *rel,
+			 bfd_vma symval,
+			 bfd_vma max_alignment ATTRIBUTE_UNUSED,
+			 bfd_vma reserve_size ATTRIBUTE_UNUSED,
+			 bfd_boolean *again)
+{
+  /* See if this symbol is in range of tp.  */
+  if (RISCV_CONST_HIGH_PART (tpoff (link_info, symval)) != 0)
+    return TRUE;
+
+  BFD_ASSERT (rel->r_offset + 4 <= sec->size);
+  switch (ELFNN_R_TYPE (rel->r_info))
+    {
+    case R_RISCV_TPREL_LO12_I:
+      rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_TPREL_I);
+      return TRUE;
+
+    case R_RISCV_TPREL_LO12_S:
+      rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_TPREL_S);
+      return TRUE;
+
+    case R_RISCV_TPREL_HI20:
+    case R_RISCV_TPREL_ADD:
+      /* We can delete the unnecessary instruction and reloc.  */
+      rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE);
+      *again = TRUE;
+      return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4);
+
+    default:
+      abort ();
+    }
+}
+
+/* Implement R_RISCV_ALIGN by deleting excess alignment NOPs.  */
+
+static bfd_boolean
+_bfd_riscv_relax_align (bfd *abfd, asection *sec,
+			asection *sym_sec ATTRIBUTE_UNUSED,
+			struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+			Elf_Internal_Rela *rel,
+			bfd_vma symval,
+			bfd_vma max_alignment ATTRIBUTE_UNUSED,
+			bfd_vma reserve_size ATTRIBUTE_UNUSED,
+			bfd_boolean *again ATTRIBUTE_UNUSED)
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_vma alignment = 1, pos;
+  while (alignment <= rel->r_addend)
+    alignment *= 2;
+
+  symval -= rel->r_addend;
+  bfd_vma aligned_addr = ((symval - 1) & ~(alignment - 1)) + alignment;
+  bfd_vma nop_bytes = aligned_addr - symval;
+
+  /* Once we've handled an R_RISCV_ALIGN, we can't relax anything else.  */
+  sec->sec_flg0 = TRUE;
+
+  /* Make sure there are enough NOPs to actually achieve the alignment.  */
+  if (rel->r_addend < nop_bytes)
+    return FALSE;
+
+  /* Delete the reloc.  */
+  rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE);
+
+  /* If the number of NOPs is already correct, there's nothing to do.  */
+  if (nop_bytes == rel->r_addend)
+    return TRUE;
+
+  /* Write as many RISC-V NOPs as we need.  */
+  for (pos = 0; pos < (nop_bytes & -4); pos += 4)
+    bfd_put_32 (abfd, RISCV_NOP, contents + rel->r_offset + pos);
+
+  /* Write a final RVC NOP if need be.  */
+  if (nop_bytes % 4 != 0)
+    bfd_put_16 (abfd, RVC_NOP, contents + rel->r_offset + pos);
+
+  /* Delete the excess bytes.  */
+  return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + nop_bytes,
+				   rel->r_addend - nop_bytes);
+}
+
+/* Relax a section.  Pass 0 shortens code sequences unless disabled.
+   Pass 1, which cannot be disabled, handles code alignment directives.  */
+
+static bfd_boolean
+_bfd_riscv_relax_section (bfd *abfd, asection *sec,
+			  struct bfd_link_info *info,
+			  bfd_boolean *again)
+{
+  Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (abfd);
+  struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
+  struct bfd_elf_section_data *data = elf_section_data (sec);
+  Elf_Internal_Rela *relocs;
+  bfd_boolean ret = FALSE;
+  unsigned int i;
+  bfd_vma max_alignment, reserve_size = 0;
+
+  *again = FALSE;
+
+  if (bfd_link_relocatable (info)
+      || sec->sec_flg0
+      || (sec->flags & SEC_RELOC) == 0
+      || sec->reloc_count == 0
+      || (info->disable_target_specific_optimizations
+	  && info->relax_pass == 0))
+    return TRUE;
+
+  /* Read this BFD's relocs if we haven't done so already.  */
+  if (data->relocs)
+    relocs = data->relocs;
+  else if (!(relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
+						 info->keep_memory)))
+    goto fail;
+
+  max_alignment = _bfd_riscv_get_max_alignment (sec);
+
+  /* Examine and consider relaxing each reloc.  */
+  for (i = 0; i < sec->reloc_count; i++)
+    {
+      asection *sym_sec;
+      Elf_Internal_Rela *rel = relocs + i;
+      relax_func_t relax_func;
+      int type = ELFNN_R_TYPE (rel->r_info);
+      bfd_vma symval;
+
+      if (info->relax_pass == 0)
+	{
+	  if (type == R_RISCV_CALL || type == R_RISCV_CALL_PLT)
+	    relax_func = _bfd_riscv_relax_call;
+	  else if (type == R_RISCV_HI20
+		   || type == R_RISCV_LO12_I
+		   || type == R_RISCV_LO12_S)
+	    relax_func = _bfd_riscv_relax_lui;
+	  else if (type == R_RISCV_TPREL_HI20
+		   || type == R_RISCV_TPREL_ADD
+		   || type == R_RISCV_TPREL_LO12_I
+		   || type == R_RISCV_TPREL_LO12_S)
+	    relax_func = _bfd_riscv_relax_tls_le;
+	  else
+	    continue;
+
+	  /* Only relax this reloc if it is paired with R_RISCV_RELAX.  */
+	  if (i == sec->reloc_count - 1
+	      || ELFNN_R_TYPE ((rel + 1)->r_info) != R_RISCV_RELAX
+	      || rel->r_offset != (rel + 1)->r_offset)
+	    continue;
+
+	  /* Skip over the R_RISCV_RELAX.  */
+	  i++;
+	}
+      else if (type == R_RISCV_ALIGN)
+	relax_func = _bfd_riscv_relax_align;
+      else
+	continue;
+
+      data->relocs = relocs;
+
+      /* Read this BFD's contents if we haven't done so already.  */
+      if (!data->this_hdr.contents
+	  && !bfd_malloc_and_get_section (abfd, sec, &data->this_hdr.contents))
+	goto fail;
+
+      /* Read this BFD's symbols if we haven't done so already.  */
+      if (symtab_hdr->sh_info != 0
+	  && !symtab_hdr->contents
+	  && !(symtab_hdr->contents =
+	       (unsigned char *) bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						       symtab_hdr->sh_info,
+						       0, NULL, NULL, NULL)))
+	goto fail;
+
+      /* Get the value of the symbol referred to by the reloc.  */
+      if (ELFNN_R_SYM (rel->r_info) < symtab_hdr->sh_info)
+	{
+	  /* A local symbol.  */
+	  Elf_Internal_Sym *isym = ((Elf_Internal_Sym *) symtab_hdr->contents
+				    + ELFNN_R_SYM (rel->r_info));
+	  reserve_size = (isym->st_size - rel->r_addend) > isym->st_size
+	    ? 0 : isym->st_size - rel->r_addend;
+
+	  if (isym->st_shndx == SHN_UNDEF)
+	    sym_sec = sec, symval = sec_addr (sec) + rel->r_offset;
+	  else
+	    {
+	      BFD_ASSERT (isym->st_shndx < elf_numsections (abfd));
+	      sym_sec = elf_elfsections (abfd)[isym->st_shndx]->bfd_section;
+	      if (sec_addr (sym_sec) == 0)
+		continue;
+	      symval = sec_addr (sym_sec) + isym->st_value;
+	    }
+	}
+      else
+	{
+	  unsigned long indx;
+	  struct elf_link_hash_entry *h;
+
+	  indx = ELFNN_R_SYM (rel->r_info) - symtab_hdr->sh_info;
+	  h = elf_sym_hashes (abfd)[indx];
+
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+	  if (h->plt.offset != MINUS_ONE)
+	    symval = sec_addr (htab->elf.splt) + h->plt.offset;
+	  else if (h->root.u.def.section->output_section == NULL
+		   || (h->root.type != bfd_link_hash_defined
+		       && h->root.type != bfd_link_hash_defweak))
+	    continue;
+	  else
+	    symval = sec_addr (h->root.u.def.section) + h->root.u.def.value;
+
+	  if (h->type != STT_FUNC)
+	    reserve_size =
+	      (h->size - rel->r_addend) > h->size ? 0 : h->size - rel->r_addend;
+	  sym_sec = h->root.u.def.section;
+	}
+
+      symval += rel->r_addend;
+
+      if (!relax_func (abfd, sec, sym_sec, info, rel, symval,
+		       max_alignment, reserve_size, again))
+	goto fail;
+    }
+
+  ret = TRUE;
+
+fail:
+  if (relocs != data->relocs)
+    free (relocs);
+
+  return ret;
+}
+
+#if ARCH_SIZE == 32
+# define PRSTATUS_SIZE			0 /* FIXME */
+# define PRSTATUS_OFFSET_PR_CURSIG	12
+# define PRSTATUS_OFFSET_PR_PID		24
+# define PRSTATUS_OFFSET_PR_REG		72
+# define ELF_GREGSET_T_SIZE		128
+# define PRPSINFO_SIZE			128
+# define PRPSINFO_OFFSET_PR_PID		16
+# define PRPSINFO_OFFSET_PR_FNAME	32
+# define PRPSINFO_OFFSET_PR_PSARGS	48
+#else
+# define PRSTATUS_SIZE			376
+# define PRSTATUS_OFFSET_PR_CURSIG	12
+# define PRSTATUS_OFFSET_PR_PID		32
+# define PRSTATUS_OFFSET_PR_REG		112
+# define ELF_GREGSET_T_SIZE		256
+# define PRPSINFO_SIZE			136
+# define PRPSINFO_OFFSET_PR_PID		24
+# define PRPSINFO_OFFSET_PR_FNAME	40
+# define PRPSINFO_OFFSET_PR_PSARGS	56
+#endif
+
+/* Support for core dump NOTE sections.  */
+
+static bfd_boolean
+riscv_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->descsz)
+    {
+      default:
+	return FALSE;
+
+      case PRSTATUS_SIZE:  /* sizeof(struct elf_prstatus) on Linux/RISC-V.  */
+	/* pr_cursig */
+	elf_tdata (abfd)->core->signal
+	  = bfd_get_16 (abfd, note->descdata + PRSTATUS_OFFSET_PR_CURSIG);
+
+	/* pr_pid */
+	elf_tdata (abfd)->core->lwpid
+	  = bfd_get_32 (abfd, note->descdata + PRSTATUS_OFFSET_PR_PID);
+	break;
+    }
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg", ELF_GREGSET_T_SIZE,
+					  note->descpos + PRSTATUS_OFFSET_PR_REG);
+}
+
+static bfd_boolean
+riscv_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->descsz)
+    {
+      default:
+	return FALSE;
+
+      case PRPSINFO_SIZE: /* sizeof(struct elf_prpsinfo) on Linux/RISC-V.  */
+	/* pr_pid */
+	elf_tdata (abfd)->core->pid
+	  = bfd_get_32 (abfd, note->descdata + PRPSINFO_OFFSET_PR_PID);
+
+	/* pr_fname */
+	elf_tdata (abfd)->core->program = _bfd_elfcore_strndup
+	  (abfd, note->descdata + PRPSINFO_OFFSET_PR_FNAME, 16);
+
+	/* pr_psargs */
+	elf_tdata (abfd)->core->command = _bfd_elfcore_strndup
+	  (abfd, note->descdata + PRPSINFO_OFFSET_PR_PSARGS, 80);
+	break;
+    }
+
+  /* Note that for some reason, a spurious space is tacked
+     onto the end of the args in some (at least one anyway)
+     implementations, so strip it off if it exists.  */
+
+  {
+    char *command = elf_tdata (abfd)->core->command;
+    int n = strlen (command);
+
+    if (0 < n && command[n - 1] == ' ')
+      command[n - 1] = '\0';
+  }
+
+  return TRUE;
+}
+
+/* Set the right mach type.  */
+static bfd_boolean
+riscv_elf_object_p (bfd *abfd)
+{
+  /* There are only two mach types in RISCV currently.  */
+  if (strcmp (abfd->xvec->name, "elf32-littleriscv") == 0)
+    bfd_default_set_arch_mach (abfd, bfd_arch_riscv, bfd_mach_riscv32);
+  else
+    bfd_default_set_arch_mach (abfd, bfd_arch_riscv, bfd_mach_riscv64);
+
+  return TRUE;
+}
+
+
+#define TARGET_LITTLE_SYM		riscv_elfNN_vec
+#define TARGET_LITTLE_NAME		"elfNN-littleriscv"
+
+#define elf_backend_reloc_type_class	     riscv_reloc_type_class
+
+#define bfd_elfNN_bfd_reloc_name_lookup	     riscv_reloc_name_lookup
+#define bfd_elfNN_bfd_link_hash_table_create riscv_elf_link_hash_table_create
+#define bfd_elfNN_bfd_reloc_type_lookup	     riscv_reloc_type_lookup
+#define bfd_elfNN_bfd_merge_private_bfd_data \
+  _bfd_riscv_elf_merge_private_bfd_data
+
+#define elf_backend_copy_indirect_symbol     riscv_elf_copy_indirect_symbol
+#define elf_backend_create_dynamic_sections  riscv_elf_create_dynamic_sections
+#define elf_backend_check_relocs	     riscv_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol    riscv_elf_adjust_dynamic_symbol
+#define elf_backend_size_dynamic_sections    riscv_elf_size_dynamic_sections
+#define elf_backend_relocate_section	     riscv_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol    riscv_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections  riscv_elf_finish_dynamic_sections
+#define elf_backend_gc_mark_hook	     riscv_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook	     riscv_elf_gc_sweep_hook
+#define elf_backend_plt_sym_val		     riscv_elf_plt_sym_val
+#define elf_backend_grok_prstatus            riscv_elf_grok_prstatus
+#define elf_backend_grok_psinfo              riscv_elf_grok_psinfo
+#define elf_backend_object_p                 riscv_elf_object_p
+#define elf_info_to_howto_rel		     NULL
+#define elf_info_to_howto		     riscv_info_to_howto_rela
+#define bfd_elfNN_bfd_relax_section	     _bfd_riscv_relax_section
+
+#define elf_backend_init_index_section	     _bfd_elf_init_1_index_section
+
+#define elf_backend_can_gc_sections	1
+#define elf_backend_can_refcount	1
+#define elf_backend_want_got_plt	1
+#define elf_backend_plt_readonly	1
+#define elf_backend_plt_alignment	4
+#define elf_backend_want_plt_sym	1
+#define elf_backend_got_header_size	(ARCH_SIZE / 8)
+#define elf_backend_want_dynrelro	1
+#define elf_backend_rela_normal		1
+#define elf_backend_default_execstack	0
+
+#include "elfNN-target.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-s390-common.c ./bfd/elf-s390-common.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-s390-common.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-s390-common.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM S/390-specific support for ELF 32 and 64 bit functions
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Andreas Krebbel.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -45,7 +45,7 @@ s390_elf_create_ifunc_sections (bfd *abf
 
   flags = bed->dynamic_sec_flags;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       s = bfd_make_section_with_flags (abfd, ".rela.ifunc",
 				       flags | SEC_READONLY);
@@ -87,12 +87,12 @@ s390_elf_create_ifunc_sections (bfd *abf
 
 static bfd_boolean
 s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
-				    struct elf_link_hash_entry *h,
-				    struct elf_dyn_relocs **head)
+				    struct elf_link_hash_entry *h)
 {
   struct elf_dyn_relocs *p;
   struct elf_link_hash_table *htab;
   struct elf_s390_link_hash_entry *eh = (struct elf_s390_link_hash_entry*)h;
+  struct elf_dyn_relocs **head = &eh->dyn_relocs;
 
   htab = elf_hash_table (info);
   eh->ifunc_resolver_address = h->root.u.def.value;
@@ -105,7 +105,7 @@ s390_elf_allocate_ifunc_dyn_relocs (stru
          where it is marked with regular reference, but not non-GOT
 	 reference.  It may happen if we didn't see STT_GNU_IFUNC
 	 symbol at the time when checking relocations.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && !h->non_got_ref
 	  && h->ref_regular)
 	for (p = *head; p != NULL; p = p->next)
@@ -151,7 +151,9 @@ keep:
      point to the IPLT slot.  That way the referencing shared lib will
      always get the PLT slot address when resolving the respective
      R_390_GLOB_DAT/R_390_64 relocs on that symbol.  */
-  if (info->executable && !info->shared && h->def_regular && h->ref_dynamic)
+  if (bfd_link_pde (info)
+      && h->def_regular
+      && h->ref_dynamic)
     {
       h->root.u.def.section = htab->iplt;
       h->root.u.def.value = h->plt.offset;
@@ -161,7 +163,7 @@ keep:
 
   /* We need dynamic relocation for STT_GNU_IFUNC symbol only when
      there is a non-GOT reference in a shared object.  */
-  if (!info->shared || !h->non_got_ref)
+  if (!bfd_link_pic (info) || !h->non_got_ref)
     *head = NULL;
 
   /* Finally, allocate space.  */
@@ -182,9 +184,9 @@ keep:
      avoided if the values in the GOT slots could differ for pointer
      equality reasons.  */
   if (h->got.refcount <= 0
-      || (info->shared
+      || (bfd_link_pic (info)
 	  && (h->dynindx == -1 || h->forced_local))
-      || (info->executable && info->shared)
+      || bfd_link_pie (info)
       || htab->sgot == NULL)
     {
       /* Use .got.iplt.  */
@@ -194,7 +196,7 @@ keep:
     {
       h->got.offset = htab->sgot->size;
       htab->sgot->size += GOT_ENTRY_SIZE;
-      if (info->shared)
+      if (bfd_link_pic (info))
 	htab->srelgot->size += RELA_ENTRY_SIZE;
     }
 
@@ -234,11 +236,10 @@ elf_s390_add_symbol_hook (bfd *abfd,
 			  asection **secp ATTRIBUTE_UNUSED,
 			  bfd_vma *valp ATTRIBUTE_UNUSED)
 {
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   return TRUE;
 }
@@ -258,8 +259,9 @@ elf_s390_elf_sort_relocs_p (asection *se
 /* Merge object attributes from IBFD into OBFD.  Raise an error if
    there are conflicting attributes.  */
 static bfd_boolean
-elf_s390_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+elf_s390_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr, *in_attrs;
   obj_attribute *out_attr, *out_attrs;
 
@@ -285,10 +287,12 @@ elf_s390_merge_obj_attributes (bfd *ibfd
 
   if (in_attr->i > 2)
     _bfd_error_handler
+      /* xgettext:c-format */
       (_("Warning: %B uses unknown vector ABI %d"), ibfd,
        in_attr->i);
   else if (out_attr->i > 2)
     _bfd_error_handler
+      /* xgettext:c-format */
       (_("Warning: %B uses unknown vector ABI %d"), obfd,
        out_attr->i);
   else if (in_attr->i != out_attr->i)
@@ -300,6 +304,7 @@ elf_s390_merge_obj_attributes (bfd *ibfd
 	  const char abi_str[3][9] = { "none", "software", "hardware" };
 
 	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("Warning: %B uses vector %s ABI, %B uses %s ABI"),
 	     ibfd, obfd, abi_str[in_attr->i], abi_str[out_attr->i]);
 	}
@@ -308,7 +313,7 @@ elf_s390_merge_obj_attributes (bfd *ibfd
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  _bfd_elf_merge_object_attributes (ibfd, info);
 
   return TRUE;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-strtab.c ./bfd/elf-strtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-strtab.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-strtab.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF strtab with GC and suffix merging support.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -48,9 +48,9 @@ struct elf_strtab_hash
 {
   struct bfd_hash_table table;
   /* Next available index.  */
-  bfd_size_type size;
+  size_t size;
   /* Number of array entries alloced.  */
-  bfd_size_type alloced;
+  size_t alloced;
   /* Final strtab size.  */
   bfd_size_type sec_size;
   /* Array of pointers to strtab entries.  */
@@ -112,8 +112,8 @@ _bfd_elf_strtab_init (void)
   table->size = 1;
   table->alloced = 64;
   amt = sizeof (struct elf_strtab_hasn_entry *);
-  table->array = (struct elf_strtab_hash_entry **)
-      bfd_malloc (table->alloced * amt);
+  table->array = ((struct elf_strtab_hash_entry **)
+		  bfd_malloc (table->alloced * amt));
   if (table->array == NULL)
     {
       free (table);
@@ -138,7 +138,7 @@ _bfd_elf_strtab_free (struct elf_strtab_
 /* Get the index of an entity in a hash table, adding it if it is not
    already present.  */
 
-bfd_size_type
+size_t
 _bfd_elf_strtab_add (struct elf_strtab_hash *tab,
 		     const char *str,
 		     bfd_boolean copy)
@@ -155,7 +155,7 @@ _bfd_elf_strtab_add (struct elf_strtab_h
 	  bfd_hash_lookup (&tab->table, str, TRUE, copy);
 
   if (entry == NULL)
-    return (bfd_size_type) -1;
+    return (size_t) -1;
 
   entry->refcount++;
   if (entry->len == 0)
@@ -170,7 +170,7 @@ _bfd_elf_strtab_add (struct elf_strtab_h
 	  tab->array = (struct elf_strtab_hash_entry **)
               bfd_realloc_or_free (tab->array, tab->alloced * amt);
 	  if (tab->array == NULL)
-	    return (bfd_size_type) -1;
+	    return (size_t) -1;
 	}
 
       entry->u.index = tab->size++;
@@ -180,9 +180,9 @@ _bfd_elf_strtab_add (struct elf_strtab_h
 }
 
 void
-_bfd_elf_strtab_addref (struct elf_strtab_hash *tab, bfd_size_type idx)
+_bfd_elf_strtab_addref (struct elf_strtab_hash *tab, size_t idx)
 {
-  if (idx == 0 || idx == (bfd_size_type) -1)
+  if (idx == 0 || idx == (size_t) -1)
     return;
   BFD_ASSERT (tab->sec_size == 0);
   BFD_ASSERT (idx < tab->size);
@@ -190,9 +190,9 @@ _bfd_elf_strtab_addref (struct elf_strta
 }
 
 void
-_bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx)
+_bfd_elf_strtab_delref (struct elf_strtab_hash *tab, size_t idx)
 {
-  if (idx == 0 || idx == (bfd_size_type) -1)
+  if (idx == 0 || idx == (size_t) -1)
     return;
   BFD_ASSERT (tab->sec_size == 0);
   BFD_ASSERT (idx < tab->size);
@@ -201,7 +201,7 @@ _bfd_elf_strtab_delref (struct elf_strta
 }
 
 unsigned int
-_bfd_elf_strtab_refcount (struct elf_strtab_hash *tab, bfd_size_type idx)
+_bfd_elf_strtab_refcount (struct elf_strtab_hash *tab, size_t idx)
 {
   return tab->array[idx]->refcount;
 }
@@ -209,22 +209,51 @@ _bfd_elf_strtab_refcount (struct elf_str
 void
 _bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab)
 {
-  bfd_size_type idx;
+  size_t idx;
 
   for (idx = 1; idx < tab->size; idx++)
     tab->array[idx]->refcount = 0;
 }
 
-/* Downsizes strtab.  Entries from IDX up to the current size are
-   removed from the array.  */
+/* Save strtab refcounts prior to adding --as-needed library.  */
+
+struct strtab_save
+{
+  size_t size;
+  unsigned int refcount[1];
+};
+
+void *
+_bfd_elf_strtab_save (struct elf_strtab_hash *tab)
+{
+  struct strtab_save *save;
+  size_t idx, size;
+
+  size = sizeof (*save) + (tab->size - 1) * sizeof (save->refcount[0]);
+  save = bfd_malloc (size);
+  if (save == NULL)
+    return save;
+
+  save->size = tab->size;
+  for (idx = 1; idx < tab->size; idx++)
+    save->refcount[idx] = tab->array[idx]->refcount;
+  return save;
+}
+
+/* Restore strtab refcounts on finding --as-needed library not needed.  */
+
 void
-_bfd_elf_strtab_restore_size (struct elf_strtab_hash *tab, bfd_size_type idx)
+_bfd_elf_strtab_restore (struct elf_strtab_hash *tab, void *buf)
 {
-  bfd_size_type curr_size = tab->size;
+  size_t idx, curr_size = tab->size;
+  struct strtab_save *save = (struct strtab_save *) buf;
 
   BFD_ASSERT (tab->sec_size == 0);
-  BFD_ASSERT (idx <= curr_size);
-  tab->size = idx;
+  BFD_ASSERT (save->size <= curr_size);
+  tab->size = save->size;
+  for (idx = 1; idx < save->size; ++idx)
+    tab->array[idx]->refcount = save->refcount[idx];
+
   for (; idx < curr_size; ++idx)
     {
       /* We don't remove entries from the hash table, just set their
@@ -242,7 +271,7 @@ _bfd_elf_strtab_size (struct elf_strtab_
 }
 
 bfd_size_type
-_bfd_elf_strtab_offset (struct elf_strtab_hash *tab, bfd_size_type idx)
+_bfd_elf_strtab_offset (struct elf_strtab_hash *tab, size_t idx)
 {
   struct elf_strtab_hash_entry *entry;
 
@@ -259,7 +288,8 @@ _bfd_elf_strtab_offset (struct elf_strta
 bfd_boolean
 _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
 {
-  bfd_size_type off = 1, i;
+  bfd_size_type off = 1;
+  size_t i;
 
   if (bfd_bwrite ("", 1, abfd) != 1)
     return FALSE;
@@ -329,16 +359,12 @@ void
 _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
 {
   struct elf_strtab_hash_entry **array, **a, *e;
-  bfd_size_type size, amt;
-
-  /* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is
-     a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd.
-     Besides, indexing with a long long wouldn't give anything but extra
-     cycles.  */
-  size_t i;
+  bfd_size_type amt, sec_size;
+  size_t size, i;
 
   /* Sort the strings by suffix and length.  */
-  amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
+  amt = tab->size;
+  amt *= sizeof (struct elf_strtab_hash_entry *);
   array = (struct elf_strtab_hash_entry **) bfd_malloc (amt);
   if (array == NULL)
     goto alloc_failure;
@@ -397,18 +423,18 @@ alloc_failure:
     free (array);
 
   /* Assign positions to the strings we want to keep.  */
-  size = 1;
+  sec_size = 1;
   for (i = 1; i < tab->size; ++i)
     {
       e = tab->array[i];
       if (e->refcount && e->len > 0)
 	{
-	  e->u.index = size;
-	  size += e->len;
+	  e->u.index = sec_size;
+	  sec_size += e->len;
 	}
     }
 
-  tab->sec_size = size;
+  tab->sec_size = sec_size;
 
   /* Adjust the rest.  */
   for (i = 1; i < tab->size; ++i)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-vxworks.c ./bfd/elf-vxworks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-vxworks.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-vxworks.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* VxWorks support for ELF
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -14,9 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file provides routines used by all VxWorks targets.  */
 
@@ -64,7 +62,7 @@ elf_vxworks_add_symbol_hook (bfd *abfd,
      give the symbol weak binding to get the desired samantics.
      This transformation will be undone in
      elf_i386_vxworks_link_output_symbol_hook. */
-  if ((info->shared || abfd->flags & DYNAMIC)
+  if ((bfd_link_pic (info) || abfd->flags & DYNAMIC)
       && elf_vxworks_gott_symbol_p (abfd, *namep))
     {
       sym->st_info = ELF_ST_INFO (STB_WEAK, ELF_ST_TYPE (sym->st_info));
@@ -89,7 +87,7 @@ elf_vxworks_create_dynamic_sections (bfd
   htab = elf_hash_table (info);
   bed = get_elf_backend_data (dynobj);
 
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       s = bfd_make_section_anyway_with_flags (dynobj,
 					      bed->default_use_rela_p
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-vxworks.h ./bfd/elf-vxworks.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elf-vxworks.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elf-vxworks.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* VxWorks support for ELF
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -14,9 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "elf/common.h"
 #include "elf/internal.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-aarch64.c ./bfd/elfxx-aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-aarch64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-aarch64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* AArch64-specific support for ELF.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -241,12 +241,18 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
     case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
     case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
       contents = _bfd_aarch64_reencode_adr_imm (contents, addend);
       break;
 
     case BFD_RELOC_AARCH64_ADD_LO12:
     case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12:
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12:
     case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
@@ -259,6 +265,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
 
     case BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:
     case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
     case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
     case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
     case BFD_RELOC_AARCH64_LDST128_LO12:
@@ -270,6 +277,14 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
     case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
     case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC:
       if (old_addend & ((1 << howto->rightshift) - 1))
 	return bfd_reloc_overflow;
       /* Used for ldr*|str* rt, [rn, #uimm12] to provide the low order
@@ -286,6 +301,9 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
     case BFD_RELOC_AARCH64_MOVW_G0_S:
     case BFD_RELOC_AARCH64_MOVW_G1_S:
     case BFD_RELOC_AARCH64_MOVW_G2_S:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
@@ -301,7 +319,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
 	  /* Force use of MOVZ.  */
 	  contents = reencode_movzn_to_movz (contents);
 	}
-      /* fall through */
+      /* Fall through.  */
 
       /* Group relocations to create a 16, 32, 48 or 64 bit unsigned
          data or abs address inline.  */
@@ -313,6 +331,16 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
     case BFD_RELOC_AARCH64_MOVW_G2:
     case BFD_RELOC_AARCH64_MOVW_G2_NC:
     case BFD_RELOC_AARCH64_MOVW_G3:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
       contents = reencode_movw_imm (contents, addend);
@@ -371,6 +399,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd
     case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:
     case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
     case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21:
     case BFD_RELOC_AARCH64_TSTBR14:
       if (weak_undef_p)
 	value = place;
@@ -384,6 +413,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd
 
     case BFD_RELOC_AARCH64_16:
     case BFD_RELOC_AARCH64_32:
+    case BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:
     case BFD_RELOC_AARCH64_MOVW_G0:
     case BFD_RELOC_AARCH64_MOVW_G0_NC:
     case BFD_RELOC_AARCH64_MOVW_G0_S:
@@ -394,6 +424,28 @@ _bfd_aarch64_elf_resolve_relocation (bfd
     case BFD_RELOC_AARCH64_MOVW_G2_NC:
     case BFD_RELOC_AARCH64_MOVW_G2_S:
     case BFD_RELOC_AARCH64_MOVW_G3:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
+    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:
+    case BFD_RELOC_AARCH64_TLSDESC_OFF_G1:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+    case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12:
+    case BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC:
+    case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2:
       value = value + addend;
       break;
 
@@ -412,6 +464,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd
     case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
     case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
+    case BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21:
       value = PG (value + addend) - PG (place);
       break;
 
@@ -445,6 +498,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd
       value = value + addend;
       break;
 
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
       value = (value + addend) & (bfd_vma) 0xffff0000;
@@ -455,6 +509,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd
       value = (value + addend) & ~(bfd_vma) 0xfff;
       break;
 
+    case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
     case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
       value = (value + addend) & (bfd_vma) 0xffff;
@@ -483,11 +538,10 @@ _bfd_aarch64_elf_add_symbol_hook (bfd *a
 				  asection **secp ATTRIBUTE_UNUSED,
 				  bfd_vma *valp ATTRIBUTE_UNUSED)
 {
-  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
       && (abfd->flags & DYNAMIC) == 0
       && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
-    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+    elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
 
   return TRUE;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-aarch64.h ./bfd/elfxx-aarch64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-aarch64.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-aarch64.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* AArch64-specific backend routines.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-ia64.c ./bfd/elfxx-ia64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-ia64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-ia64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IA-64 support for 64-bit ELF
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-ia64.h ./bfd/elfxx-ia64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-ia64.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-ia64.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IA-64 support for 64-bit ELF
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-mips.c ./bfd/elfxx-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS-specific support for ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -310,14 +310,17 @@ struct mips_elf_hash_sort_data
   struct elf_link_hash_entry *low;
   /* The least dynamic symbol table index corresponding to a non-TLS
      symbol with a GOT entry.  */
-  long min_got_dynindx;
+  bfd_size_type min_got_dynindx;
   /* The greatest dynamic symbol table index corresponding to a symbol
      with a GOT entry that is not referenced (e.g., a dynamic symbol
      with dynamic relocations pointing to it from non-primary GOTs).  */
-  long max_unref_got_dynindx;
-  /* The greatest dynamic symbol table index not corresponding to a
+  bfd_size_type max_unref_got_dynindx;
+  /* The greatest dynamic symbol table index corresponding to a local
+     symbol.  */
+  bfd_size_type max_local_dynindx;
+  /* The greatest dynamic symbol table index corresponding to an external
      symbol without a GOT entry.  */
-  long max_non_got_dynindx;
+  bfd_size_type max_non_got_dynindx;
 };
 
 /* We make up to two PLT entries if needed, one for standard MIPS code
@@ -443,6 +446,9 @@ struct mips_elf_link_hash_table
   /* True if we can only use 32-bit microMIPS instructions.  */
   bfd_boolean insn32;
 
+  /* True if we suppress checks for invalid branches between ISA modes.  */
+  bfd_boolean ignore_branch_isa;
+
   /* True if we're generating code for VxWorks.  */
   bfd_boolean is_vxworks;
 
@@ -451,14 +457,8 @@ struct mips_elf_link_hash_table
 
   /* Shortcuts to some dynamic sections, or NULL if they are not
      being used.  */
-  asection *srelbss;
-  asection *sdynbss;
-  asection *srelplt;
   asection *srelplt2;
-  asection *sgotplt;
-  asection *splt;
   asection *sstubs;
-  asection *sgot;
 
   /* The master GOT information.  */
   struct mips_got_info *got_info;
@@ -911,12 +911,9 @@ static bfd *reldyn_sorting_bfd;
   ((ABI_64_P (abfd)							\
     ? 0xdf998010				/* ld t9,0x8010(gp) */	\
     : 0x8f998010))              		/* lw t9,0x8010(gp) */
-#define STUB_MOVE(abfd)							\
-   ((ABI_64_P (abfd)							\
-     ? 0x03e0782d				/* daddu t7,ra */	\
-     : 0x03e07821))				/* addu t7,ra */
+#define STUB_MOVE 0x03e07825			/* or t7,ra,zero */
 #define STUB_LUI(VAL) (0x3c180000 + (VAL))	/* lui t8,VAL */
-#define STUB_JALR 0x0320f809			/* jalr t9,ra */
+#define STUB_JALR 0x0320f809			/* jalr ra,t9 */
 #define STUB_ORI(VAL) (0x37180000 + (VAL))	/* ori t8,t8,VAL */
 #define STUB_LI16U(VAL) (0x34180000 + (VAL))	/* ori t8,zero,VAL unsigned */
 #define STUB_LI16S(abfd, VAL)						\
@@ -930,10 +927,7 @@ static bfd *reldyn_sorting_bfd;
    ? 0xdf3c8010					/* ld t9,0x8010(gp) */	\
    : 0xff3c8010)				/* lw t9,0x8010(gp) */
 #define STUB_MOVE_MICROMIPS 0x0dff		/* move t7,ra */
-#define STUB_MOVE32_MICROMIPS(abfd)					\
-   (ABI_64_P (abfd)							\
-    ? 0x581f7950				/* daddu t7,ra,zero */	\
-    : 0x001f7950)				/* addu t7,ra,zero */
+#define STUB_MOVE32_MICROMIPS 0x001f7a90	/* or t7,ra,zero */
 #define STUB_LUI_MICROMIPS(VAL)						\
    (0x41b80000 + (VAL))				/* lui t8,VAL */
 #define STUB_JALR_MICROMIPS 0x45d9		/* jalr t9 */
@@ -1030,7 +1024,7 @@ static const bfd_vma mips_o32_exec_plt0_
   0x8f990000,	/* lw $25, %lo(&GOTPLT[0])($28)				*/
   0x279c0000,	/* addiu $28, $28, %lo(&GOTPLT[0])			*/
   0x031cc023,	/* subu $24, $24, $28					*/
-  0x03e07821,	/* move $15, $31	# 32-bit move (addu)		*/
+  0x03e07825,	/* or t7, ra, zero					*/
   0x0018c082,	/* srl $24, $24, 2					*/
   0x0320f809,	/* jalr $25						*/
   0x2718fffe	/* subu $24, $24, 2					*/
@@ -1044,7 +1038,7 @@ static const bfd_vma mips_n32_exec_plt0_
   0x8dd90000,	/* lw $25, %lo(&GOTPLT[0])($14)				*/
   0x25ce0000,	/* addiu $14, $14, %lo(&GOTPLT[0])			*/
   0x030ec023,	/* subu $24, $24, $14					*/
-  0x03e07821,	/* move $15, $31	# 32-bit move (addu)		*/
+  0x03e07825,	/* or t7, ra, zero					*/
   0x0018c082,	/* srl $24, $24, 2					*/
   0x0320f809,	/* jalr $25						*/
   0x2718fffe	/* subu $24, $24, 2					*/
@@ -1058,7 +1052,7 @@ static const bfd_vma mips_n64_exec_plt0_
   0xddd90000,	/* ld $25, %lo(&GOTPLT[0])($14)				*/
   0x25ce0000,	/* addiu $14, $14, %lo(&GOTPLT[0])			*/
   0x030ec023,	/* subu $24, $24, $14					*/
-  0x03e0782d,	/* move $15, $31	# 64-bit move (daddu)		*/
+  0x03e07825,	/* or t7, ra, zero					*/
   0x0018c0c2,	/* srl $24, $24, 3					*/
   0x0320f809,	/* jalr $25						*/
   0x2718fffe	/* subu $24, $24, 2					*/
@@ -1091,7 +1085,7 @@ static const bfd_vma micromips_insn32_o3
   0xff3c, 0x0000,	/* lw $25, %lo(&GOTPLT[0])($28)			*/
   0x339c, 0x0000,	/* addiu $28, $28, %lo(&GOTPLT[0])		*/
   0x0398, 0xc1d0,	/* subu $24, $24, $28				*/
-  0x001f, 0x7950,	/* move $15, $31				*/
+  0x001f, 0x7a90,	/* or $15, $31, zero				*/
   0x0318, 0x1040,	/* srl $24, $24, 2				*/
   0x03f9, 0x0f3c,	/* jalr $25					*/
   0x3318, 0xfffe	/* subu $24, $24, 2				*/
@@ -1584,19 +1578,23 @@ mips_elf_create_stub_symbol (struct bfd_
 			     const char *prefix, asection *s, bfd_vma value,
 			     bfd_vma size)
 {
+  bfd_boolean micromips_p = ELF_ST_IS_MICROMIPS (h->root.other);
   struct bfd_link_hash_entry *bh;
   struct elf_link_hash_entry *elfh;
-  const char *name;
+  char *name;
+  bfd_boolean res;
 
-  if (ELF_ST_IS_MICROMIPS (h->root.other))
+  if (micromips_p)
     value |= 1;
 
   /* Create a new symbol.  */
-  name = ACONCAT ((prefix, h->root.root.root.string, NULL));
+  name = concat (prefix, h->root.root.root.string, NULL);
   bh = NULL;
-  if (!_bfd_generic_link_add_one_symbol (info, s->owner, name,
-					 BSF_LOCAL, s, value, NULL,
-					 TRUE, FALSE, &bh))
+  res = _bfd_generic_link_add_one_symbol (info, s->owner, name,
+					  BSF_LOCAL, s, value, NULL,
+					  TRUE, FALSE, &bh);
+  free (name);
+  if (! res)
     return FALSE;
 
   /* Make it a local function.  */
@@ -1604,6 +1602,8 @@ mips_elf_create_stub_symbol (struct bfd_
   elfh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
   elfh->size = size;
   elfh->forced_local = 1;
+  if (micromips_p)
+    elfh->other = ELF_ST_SET_MICROMIPS (elfh->other);
   return TRUE;
 }
 
@@ -1618,9 +1618,10 @@ mips_elf_create_shadow_symbol (struct bf
 {
   struct bfd_link_hash_entry *bh;
   struct elf_link_hash_entry *elfh;
-  const char *name;
+  char *name;
   asection *s;
   bfd_vma value;
+  bfd_boolean res;
 
   /* Read the symbol's value.  */
   BFD_ASSERT (h->root.root.type == bfd_link_hash_defined
@@ -1629,11 +1630,13 @@ mips_elf_create_shadow_symbol (struct bf
   value = h->root.root.u.def.value;
 
   /* Create a new symbol.  */
-  name = ACONCAT ((prefix, h->root.root.root.string, NULL));
+  name = concat (prefix, h->root.root.root.string, NULL);
   bh = NULL;
-  if (!_bfd_generic_link_add_one_symbol (info, s->owner, name,
-					 BSF_LOCAL, s, value, NULL,
-					 TRUE, FALSE, &bh))
+  res = _bfd_generic_link_add_one_symbol (info, s->owner, name,
+					  BSF_LOCAL, s, value, NULL,
+					  TRUE, FALSE, &bh);
+  free (name);
+  if (! res)
     return FALSE;
 
   /* Make it local and copy the other attributes from H.  */
@@ -1713,6 +1716,7 @@ mips_elf_check_mips16_stubs (struct bfd_
       h->fn_stub->flags &= ~SEC_RELOC;
       h->fn_stub->reloc_count = 0;
       h->fn_stub->flags |= SEC_EXCLUDE;
+      h->fn_stub->output_section = bfd_abs_section_ptr;
     }
 
   if (h->call_stub != NULL
@@ -1725,6 +1729,7 @@ mips_elf_check_mips16_stubs (struct bfd_
       h->call_stub->flags &= ~SEC_RELOC;
       h->call_stub->reloc_count = 0;
       h->call_stub->flags |= SEC_EXCLUDE;
+      h->call_stub->output_section = bfd_abs_section_ptr;
     }
 
   if (h->call_fp_stub != NULL
@@ -1737,6 +1742,7 @@ mips_elf_check_mips16_stubs (struct bfd_
       h->call_fp_stub->flags &= ~SEC_RELOC;
       h->call_fp_stub->reloc_count = 0;
       h->call_fp_stub->flags |= SEC_EXCLUDE;
+      h->call_fp_stub->output_section = bfd_abs_section_ptr;
     }
 }
 
@@ -1802,6 +1808,7 @@ mips_elf_local_pic_function_p (struct mi
 	   || h->root.root.type == bfd_link_hash_defweak)
 	  && h->root.def_regular
 	  && !bfd_is_abs_section (h->root.root.u.def.section)
+	  && !bfd_is_und_section (h->root.root.u.def.section)
 	  && (!ELF_ST_IS_MIPS16 (h->root.other)
 	      || (h->fn_stub && h->need_fn_stub))
 	  && (PIC_OBJECT_P (h->root.root.u.def.section->owner)
@@ -1958,6 +1965,8 @@ mips_elf_add_la25_stub (struct bfd_link_
   /* Prefer to use LUI/ADDIU stubs if the function is at the beginning
      of the section and if we would need no more than 2 nops.  */
   value = mips_elf_get_la25_target (stub, &s);
+  if (ELF_ST_IS_MICROMIPS (stub->h->root.other))
+    value &= ~1;
   use_trampoline_p = (value != 0 || s->alignment_power > 4);
 
   h->la25_stub = stub;
@@ -1975,7 +1984,7 @@ mips_elf_check_symbols (struct mips_elf_
   struct mips_htab_traverse_info *hti;
 
   hti = (struct mips_htab_traverse_info *) data;
-  if (!hti->info->relocatable)
+  if (!bfd_link_relocatable (hti->info))
     mips_elf_check_mips16_stubs (hti->info, h);
 
   if (mips_elf_local_pic_function_p (h))
@@ -1990,7 +1999,7 @@ mips_elf_check_symbols (struct mips_elf_
 	 being PIC.  If we're creating a non-relocatable object with
 	 non-PIC branches and jumps to H, make sure that H has an la25
 	 stub.  */
-      if (hti->info->relocatable)
+      if (bfd_link_relocatable (hti->info))
 	{
 	  if (!PIC_OBJECT_P (hti->output_bfd))
 	    h->root.other = ELF_ST_SET_MIPS_PIC (h->root.other);
@@ -2087,7 +2096,11 @@ mips_elf_check_symbols (struct mips_elf_
 
    All we need to do here is shuffle the bits appropriately.
    As above, the two 16-bit halves must be swapped on a
-   little-endian system.  */
+   little-endian system.
+
+   Finally R_MIPS16_PC16_S1 corresponds to R_MIPS_PC16, however the
+   relocatable field is shifted by 1 rather than 2 and the same bit
+   shuffling is done as with the relocations above.  */
 
 static inline bfd_boolean
 mips16_reloc_p (int r_type)
@@ -2107,6 +2120,7 @@ mips16_reloc_p (int r_type)
     case R_MIPS16_TLS_GOTTPREL:
     case R_MIPS16_TLS_TPREL_HI16:
     case R_MIPS16_TLS_TPREL_LO16:
+    case R_MIPS16_PC16_S1:
       return TRUE;
 
     default:
@@ -2163,18 +2177,6 @@ got_page_reloc_p (unsigned int r_type)
 }
 
 static inline bfd_boolean
-got_ofst_reloc_p (unsigned int r_type)
-{
-  return r_type == R_MIPS_GOT_OFST || r_type == R_MICROMIPS_GOT_OFST;
-}
-
-static inline bfd_boolean
-got_hi16_reloc_p (unsigned int r_type)
-{
-  return r_type == R_MIPS_GOT_HI16 || r_type == R_MICROMIPS_GOT_HI16;
-}
-
-static inline bfd_boolean
 got_lo16_reloc_p (unsigned int r_type)
 {
   return r_type == R_MIPS_GOT_LO16 || r_type == R_MICROMIPS_GOT_LO16;
@@ -2225,6 +2227,19 @@ jal_reloc_p (int r_type)
 }
 
 static inline bfd_boolean
+b_reloc_p (int r_type)
+{
+  return (r_type == R_MIPS_PC26_S2
+	  || r_type == R_MIPS_PC21_S2
+	  || r_type == R_MIPS_PC16
+	  || r_type == R_MIPS_GNU_REL16_S2
+	  || r_type == R_MIPS16_PC16_S1
+	  || r_type == R_MICROMIPS_PC16_S1
+	  || r_type == R_MICROMIPS_PC10_S1
+	  || r_type == R_MICROMIPS_PC7_S1);
+}
+
+static inline bfd_boolean
 aligned_pcrel_reloc_p (int r_type)
 {
   return (r_type == R_MIPS_PC18_S3
@@ -2232,6 +2247,23 @@ aligned_pcrel_reloc_p (int r_type)
 }
 
 static inline bfd_boolean
+branch_reloc_p (int r_type)
+{
+  return (r_type == R_MIPS_26
+	  || r_type == R_MIPS_PC26_S2
+	  || r_type == R_MIPS_PC21_S2
+	  || r_type == R_MIPS_PC16
+	  || r_type == R_MIPS_GNU_REL16_S2);
+}
+
+static inline bfd_boolean
+mips16_branch_reloc_p (int r_type)
+{
+  return (r_type == R_MIPS16_26
+	  || r_type == R_MIPS16_PC16_S1);
+}
+
+static inline bfd_boolean
 micromips_branch_reloc_p (int r_type)
 {
   return (r_type == R_MICROMIPS_26_S1
@@ -3225,11 +3257,11 @@ mips_tls_got_relocs (struct bfd_link_inf
   bfd_boolean need_relocs = FALSE;
   bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
 
-  if (h && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-      && (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, h)))
+  if (h && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+      && (!bfd_link_pic (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
     indx = h->dynindx;
 
-  if ((info->shared || indx != 0)
+  if ((bfd_link_pic (info) || indx != 0)
       && (h == NULL
 	  || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 	  || h->root.type != bfd_link_hash_undefweak))
@@ -3247,7 +3279,7 @@ mips_tls_got_relocs (struct bfd_link_inf
       return 1;
 
     case GOT_TLS_LDM:
-      return info->shared ? 1 : 0;
+      return bfd_link_pic (info) ? 1 : 0;
 
     default:
       return 0;
@@ -3324,22 +3356,24 @@ mips_elf_initialize_tls_slots (bfd *abfd
   if (htab == NULL)
     return;
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
 
   indx = 0;
   if (h != NULL)
     {
       bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, &h->root)
-	  && (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, &h->root)))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info),
+					   &h->root)
+	  && (!bfd_link_pic (info)
+	      || !SYMBOL_REFERENCES_LOCAL (info, &h->root)))
 	indx = h->root.dynindx;
     }
 
   if (entry->tls_initialized)
     return;
 
-  if ((info->shared || indx != 0)
+  if ((bfd_link_pic (info) || indx != 0)
       && (h == NULL
 	  || ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT
 	  || h->root.type != bfd_link_hash_undefweak))
@@ -3414,7 +3448,7 @@ mips_elf_initialize_tls_slots (bfd *abfd
 			 sgot->contents + got_offset
 			 + MIPS_ELF_GOT_SIZE (abfd));
 
-      if (!info->shared)
+      if (!bfd_link_pic (info))
 	MIPS_ELF_PUT_WORD (abfd, 1,
 			   sgot->contents + got_offset);
       else
@@ -3449,8 +3483,8 @@ mips_elf_gotplt_index (struct bfd_link_i
   BFD_ASSERT (h->plt.plist->gotplt_index != MINUS_ONE);
 
   /* Calculate the address of the associated .got.plt entry.  */
-  got_address = (htab->sgotplt->output_section->vma
-		 + htab->sgotplt->output_offset
+  got_address = (htab->root.sgotplt->output_section->vma
+		 + htab->root.sgotplt->output_offset
 		 + (h->plt.plist->gotplt_index
 		    * MIPS_ELF_GOT_SIZE (info->output_bfd)));
 
@@ -3514,7 +3548,7 @@ mips_elf_primary_global_got_index (bfd *
   g = mips_elf_bfd_got (obfd, FALSE);
   got_index = ((h->dynindx - global_got_dynindx + g->local_gotno)
 	       * MIPS_ELF_GOT_SIZE (obfd));
-  BFD_ASSERT (got_index < htab->sgot->size);
+  BFD_ASSERT (got_index < htab->root.sgot->size);
 
   return got_index;
 }
@@ -3548,7 +3582,7 @@ mips_elf_global_got_index (bfd *obfd, st
   BFD_ASSERT (entry);
 
   gotidx = entry->gotidx;
-  BFD_ASSERT (gotidx > 0 && gotidx < htab->sgot->size);
+  BFD_ASSERT (gotidx > 0 && gotidx < htab->root.sgot->size);
 
   if (lookup.tls_type)
     {
@@ -3636,7 +3670,7 @@ mips_elf_got_offset_from_index (struct b
   htab = mips_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
   gp = _bfd_get_gp_value (output_bfd)
     + mips_elf_adjust_gp (output_bfd, htab->got_info, input_bfd);
 
@@ -3699,7 +3733,7 @@ mips_elf_create_local_got_entry (bfd *ab
       BFD_ASSERT (entry);
 
       gotidx = entry->gotidx;
-      BFD_ASSERT (gotidx > 0 && gotidx < htab->sgot->size);
+      BFD_ASSERT (gotidx > 0 && gotidx < htab->root.sgot->size);
 
       return entry;
     }
@@ -3718,7 +3752,7 @@ mips_elf_create_local_got_entry (bfd *ab
   if (g->assigned_low_gotno > g->assigned_high_gotno)
     {
       /* We didn't allocate enough space in the GOT.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("not enough GOT space for local GOT entries"));
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -3739,7 +3773,7 @@ mips_elf_create_local_got_entry (bfd *ab
   *entry = lookup;
   *loc = entry;
 
-  MIPS_ELF_PUT_WORD (abfd, value, htab->sgot->contents + entry->gotidx);
+  MIPS_ELF_PUT_WORD (abfd, value, htab->root.sgot->contents + entry->gotidx);
 
   /* These GOT entries need a dynamic relocation on VxWorks.  */
   if (htab->is_vxworks)
@@ -3750,8 +3784,8 @@ mips_elf_create_local_got_entry (bfd *ab
       bfd_vma got_address;
 
       s = mips_elf_rel_dyn_section (info, FALSE);
-      got_address = (htab->sgot->output_section->vma
-		     + htab->sgot->output_offset
+      got_address = (htab->root.sgot->output_section->vma
+		     + htab->root.sgot->output_offset
 		     + entry->gotidx);
 
       rloc = s->contents + (s->reloc_count++ * sizeof (Elf32_External_Rela));
@@ -3775,7 +3809,8 @@ count_section_dynsyms (bfd *output_bfd, 
   bfd_size_type count;
 
   count = 0;
-  if (info->shared || elf_hash_table (info)->is_relocatable_executable)
+  if (bfd_link_pic (info)
+      || elf_hash_table (info)->is_relocatable_executable)
     {
       asection *p;
       const struct elf_backend_data *bed;
@@ -3800,12 +3835,12 @@ mips_elf_sort_hash_table (bfd *abfd, str
   struct mips_elf_hash_sort_data hsd;
   struct mips_got_info *g;
 
-  if (elf_hash_table (info)->dynsymcount == 0)
-    return TRUE;
-
   htab = mips_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
 
+  if (htab->root.dynsymcount == 0)
+    return TRUE;
+
   g = htab->got_info;
   if (g == NULL)
     return TRUE;
@@ -3813,20 +3848,19 @@ mips_elf_sort_hash_table (bfd *abfd, str
   hsd.low = NULL;
   hsd.max_unref_got_dynindx
     = hsd.min_got_dynindx
-    = (elf_hash_table (info)->dynsymcount - g->reloc_only_gotno);
-  hsd.max_non_got_dynindx = count_section_dynsyms (abfd, info) + 1;
-  mips_elf_link_hash_traverse (((struct mips_elf_link_hash_table *)
-				elf_hash_table (info)),
-			       mips_elf_sort_hash_table_f,
-			       &hsd);
+    = (htab->root.dynsymcount - g->reloc_only_gotno);
+  /* Add 1 to local symbol indices to account for the mandatory NULL entry
+     at the head of the table; see `_bfd_elf_link_renumber_dynsyms'.  */
+  hsd.max_local_dynindx = count_section_dynsyms (abfd, info) + 1;
+  hsd.max_non_got_dynindx = htab->root.local_dynsymcount + 1;
+  mips_elf_link_hash_traverse (htab, mips_elf_sort_hash_table_f, &hsd);
 
   /* There should have been enough room in the symbol table to
      accommodate both the GOT and non-GOT symbols.  */
+  BFD_ASSERT (hsd.max_local_dynindx <= htab->root.local_dynsymcount + 1);
   BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
-  BFD_ASSERT ((unsigned long) hsd.max_unref_got_dynindx
-	      == elf_hash_table (info)->dynsymcount);
-  BFD_ASSERT (elf_hash_table (info)->dynsymcount - hsd.min_got_dynindx
-	      == g->global_gotno);
+  BFD_ASSERT (hsd.max_unref_got_dynindx == htab->root.dynsymcount);
+  BFD_ASSERT (htab->root.dynsymcount - hsd.min_got_dynindx == g->global_gotno);
 
   /* Now we know which dynamic symbol has the lowest dynamic symbol
      table index in the GOT.  */
@@ -3852,7 +3886,10 @@ mips_elf_sort_hash_table_f (struct mips_
   switch (h->global_got_area)
     {
     case GGA_NONE:
-      h->root.dynindx = hsd->max_non_got_dynindx++;
+      if (h->root.forced_local)
+	h->root.dynindx = hsd->max_local_dynindx++;
+      else
+	h->root.dynindx = hsd->max_non_got_dynindx++;
       break;
 
     case GGA_NORMAL:
@@ -4414,7 +4451,7 @@ mips_use_local_got_p (struct bfd_link_in
   /* If this is an executable that must provide a definition of the symbol,
      either though PLTs or copy relocations, then that address should go in
      the local rather than global GOT.  */
-  if (info->executable && h->has_static_relocs)
+  if (bfd_link_executable (info) && h->has_static_relocs)
     return TRUE;
 
   return FALSE;
@@ -4722,7 +4759,7 @@ mips_elf_set_global_gotidx (void **entry
 	}
       arg->g->assigned_low_gotno += 1;
 
-      if (arg->info->shared
+      if (bfd_link_pic (arg->info)
 	  || (elf_hash_table (arg->info)->dynamic_sections_created
 	      && entry->d.h->root.def_dynamic
 	      && !entry->d.h->root.def_regular))
@@ -4929,7 +4966,7 @@ mips_elf_multi_got (bfd *abfd, struct bf
       BFD_ASSERT (g->assigned_low_gotno == g->local_gotno + g->global_gotno);
       g->assigned_low_gotno = save_assign;
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  g->relocs += g->local_gotno - g->assigned_low_gotno;
 	  BFD_ASSERT (g->assigned_low_gotno == g->next->local_gotno
@@ -5102,7 +5139,7 @@ mips_elf_create_got_section (bfd *abfd, 
   BFD_ASSERT (htab != NULL);
 
   /* This function may be called more than once.  */
-  if (htab->sgot)
+  if (htab->root.sgot)
     return TRUE;
 
   flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
@@ -5114,7 +5151,7 @@ mips_elf_create_got_section (bfd *abfd, 
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
-  htab->sgot = s;
+  htab->root.sgot = s;
 
   /* Define the symbol _GLOBAL_OFFSET_TABLE_.  We don't do this in the
      linker script because we don't want to define the symbol if we
@@ -5132,7 +5169,7 @@ mips_elf_create_got_section (bfd *abfd, 
   h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
   elf_hash_table (info)->hgot = h;
 
-  if (info->shared
+  if (bfd_link_pic (info)
       && ! bfd_elf_link_record_dynamic_symbol (info, h))
     return FALSE;
 
@@ -5148,7 +5185,7 @@ mips_elf_create_got_section (bfd *abfd, 
 					  | SEC_LINKER_CREATED);
   if (s == NULL)
     return FALSE;
-  htab->sgotplt = s;
+  htab->root.sgotplt = s;
 
   return TRUE;
 }
@@ -5161,7 +5198,7 @@ static bfd_boolean
 is_gott_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h)
 {
   return (mips_elf_hash_table (info)->is_vxworks
-	  && info->shared
+	  && bfd_link_pic (info)
 	  && (strcmp (h->root.root.string, "__GOTT_BASE__") == 0
 	      || strcmp (h->root.root.string, "__GOTT_INDEX__") == 0));
 }
@@ -5253,6 +5290,9 @@ mips_elf_calculate_relocation (bfd *abfd
   /* TRUE if the symbol referred to by this relocation is a local
      symbol.  */
   bfd_boolean local_p, was_local_p;
+  /* TRUE if the symbol referred to by this relocation is a section
+     symbol.  */
+  bfd_boolean section_p = FALSE;
   /* TRUE if the symbol referred to by this relocation is "_gp_disp".  */
   bfd_boolean gp_disp_p = FALSE;
   /* TRUE if the symbol referred to by this relocation is
@@ -5303,17 +5343,18 @@ mips_elf_calculate_relocation (bfd *abfd
   /* Figure out the value of the symbol.  */
   if (local_p)
     {
+      bfd_boolean micromips_p = MICROMIPS_P (abfd);
       Elf_Internal_Sym *sym;
 
       sym = local_syms + r_symndx;
       sec = local_sections[r_symndx];
 
+      section_p = ELF_ST_TYPE (sym->st_info) == STT_SECTION;
+
       symbol = sec->output_section->vma + sec->output_offset;
-      if (ELF_ST_TYPE (sym->st_info) != STT_SECTION
-	  || (sec->flags & SEC_MERGE))
+      if (!section_p || (sec->flags & SEC_MERGE))
 	symbol += sym->st_value;
-      if ((sec->flags & SEC_MERGE)
-	  && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+      if ((sec->flags & SEC_MERGE) && section_p)
 	{
 	  addend = _bfd_elf_rel_local_sym (abfd, sym, &sec, addend);
 	  addend -= symbol;
@@ -5328,11 +5369,29 @@ mips_elf_calculate_relocation (bfd *abfd
       *namep = bfd_elf_string_from_elf_section (input_bfd,
 						symtab_hdr->sh_link,
 						sym->st_name);
-      if (*namep == '\0')
+      if (*namep == NULL || **namep == '\0')
 	*namep = bfd_section_name (input_bfd, sec);
 
-      target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (sym->st_other);
-      target_is_micromips_code_p = ELF_ST_IS_MICROMIPS (sym->st_other);
+      /* For relocations against a section symbol and ones against no
+         symbol (absolute relocations) infer the ISA mode from the addend.  */
+      if (section_p || r_symndx == STN_UNDEF)
+	{
+	  target_is_16_bit_code_p = (addend & 1) && !micromips_p;
+	  target_is_micromips_code_p = (addend & 1) && micromips_p;
+	}
+      /* For relocations against an absolute symbol infer the ISA mode
+         from the value of the symbol plus addend.  */
+      else if (bfd_is_abs_section (sec))
+	{
+	  target_is_16_bit_code_p = ((symbol + addend) & 1) && !micromips_p;
+	  target_is_micromips_code_p = ((symbol + addend) & 1) && micromips_p;
+	}
+      /* Otherwise just use the regular symbol annotation available.  */
+      else
+	{
+	  target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (sym->st_other);
+	  target_is_micromips_code_p = ELF_ST_IS_MICROMIPS (sym->st_other);
+	}
     }
   else
     {
@@ -5401,7 +5460,7 @@ mips_elf_calculate_relocation (bfd *abfd
 	     Otherwise, we should define the symbol with a value of 0.
 	     FIXME: It should probably get into the symbol table
 	     somehow as well.  */
-	  BFD_ASSERT (! info->shared);
+	  BFD_ASSERT (! bfd_link_pic (info));
 	  BFD_ASSERT (bfd_get_section_by_name (abfd, ".dynamic") == NULL);
 	  symbol = 0;
 	}
@@ -5416,17 +5475,14 @@ mips_elf_calculate_relocation (bfd *abfd
 	     http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf  */
 	  symbol = 0;
 	}
-      else if ((*info->callbacks->undefined_symbol)
-	       (info, h->root.root.root.string, input_bfd,
-		input_section, relocation->r_offset,
-		(info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-		 || ELF_ST_VISIBILITY (h->root.other)))
-	{
-	  return bfd_reloc_undefined;
-	}
       else
 	{
-	  return bfd_reloc_notsupported;
+	  (*info->callbacks->undefined_symbol)
+	    (info, h->root.root.root.string, input_bfd,
+	     input_section, relocation->r_offset,
+	     (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+	     || ELF_ST_VISIBILITY (h->root.other));
+	  return bfd_reloc_undefined;
 	}
 
       target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (h->root.other);
@@ -5443,7 +5499,7 @@ mips_elf_calculate_relocation (bfd *abfd
 
      (c) the section allows direct references to MIPS16 functions.  */
   if (r_type != R_MIPS16_26
-      && !info->relocatable
+      && !bfd_link_relocatable (info)
       && ((h != NULL
 	   && h->fn_stub != NULL
 	   && (r_type != R_MIPS16_CALL16 || h->need_fn_stub))
@@ -5485,7 +5541,7 @@ mips_elf_calculate_relocation (bfd *abfd
      to a standard MIPS function, we need to redirect the call to the stub.
      Note that we specifically exclude R_MIPS16_CALL16 from this behavior;
      indirect calls should use an indirect stub instead.  */
-  else if (r_type == R_MIPS16_26 && !info->relocatable
+  else if (r_type == R_MIPS16_26 && !bfd_link_relocatable (info)
 	   && ((h != NULL && (h->call_stub != NULL || h->call_fp_stub != NULL))
 	       || (local_p
 		   && mips_elf_tdata (input_bfd)->local_call_stubs != NULL
@@ -5529,16 +5585,21 @@ mips_elf_calculate_relocation (bfd *abfd
   else if (h != NULL && h->la25_stub
 	   && mips_elf_relocation_needs_la25_stub (input_bfd, r_type,
 						   target_is_16_bit_code_p))
-    symbol = (h->la25_stub->stub_section->output_section->vma
-	      + h->la25_stub->stub_section->output_offset
-	      + h->la25_stub->offset);
+    {
+	symbol = (h->la25_stub->stub_section->output_section->vma
+		  + h->la25_stub->stub_section->output_offset
+		  + h->la25_stub->offset);
+	if (ELF_ST_IS_MICROMIPS (h->root.other))
+	  symbol |= 1;
+    }
   /* For direct MIPS16 and microMIPS calls make sure the compressed PLT
      entry is used if a standard PLT entry has also been made.  In this
      case the symbol will have been set by mips_elf_set_plt_sym_value
      to point to the standard PLT entry, so redirect to the compressed
      one.  */
-  else if ((r_type == R_MIPS16_26 || r_type == R_MICROMIPS_26_S1)
-	   && !info->relocatable
+  else if ((mips16_branch_reloc_p (r_type)
+	    || micromips_branch_reloc_p (r_type))
+	   && !bfd_link_relocatable (info)
 	   && h != NULL
 	   && h->use_plt_entry
 	   && h->root.plt.plist->comp_offset != MINUS_ONE
@@ -5546,7 +5607,7 @@ mips_elf_calculate_relocation (bfd *abfd
     {
       bfd_boolean micromips_p = MICROMIPS_P (abfd);
 
-      sec = htab->splt;
+      sec = htab->root.splt;
       symbol = (sec->output_section->vma
 		+ sec->output_offset
 		+ htab->plt_header_size
@@ -5559,10 +5620,10 @@ mips_elf_calculate_relocation (bfd *abfd
     }
 
   /* Make sure MIPS16 and microMIPS are not used together.  */
-  if ((r_type == R_MIPS16_26 && target_is_micromips_code_p)
+  if ((mips16_branch_reloc_p (r_type) && target_is_micromips_code_p)
       || (micromips_branch_reloc_p (r_type) && target_is_16_bit_code_p))
    {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("MIPS16 and microMIPS functions cannot call each other"));
       return bfd_reloc_notsupported;
    }
@@ -5573,12 +5634,14 @@ mips_elf_calculate_relocation (bfd *abfd
      because the assembly writer may have "known" that any definition of the
      symbol would be 16-bit code, and that direct jumps were therefore
      acceptable.  */
-  *cross_mode_jump_p = (!info->relocatable
+  *cross_mode_jump_p = (!bfd_link_relocatable (info)
 			&& !(h && h->root.root.type == bfd_link_hash_undefweak)
-			&& ((r_type == R_MIPS16_26 && !target_is_16_bit_code_p)
-			    || (r_type == R_MICROMIPS_26_S1
+			&& ((mips16_branch_reloc_p (r_type)
+			     && !target_is_16_bit_code_p)
+			    || (micromips_branch_reloc_p (r_type)
 				&& !target_is_micromips_code_p)
-			    || ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR)
+			    || ((branch_reloc_p (r_type)
+				 || r_type == R_MIPS_JALR)
 				&& (target_is_16_bit_code_p
 				    || target_is_micromips_code_p))));
 
@@ -5660,7 +5723,7 @@ mips_elf_calculate_relocation (bfd *abfd
 	      if (!TLS_RELOC_P (r_type)
 		  && !elf_hash_table (info)->dynamic_sections_created)
 		/* This is a static link.  We must initialize the GOT entry.  */
-		MIPS_ELF_PUT_WORD (dynobj, symbol, htab->sgot->contents + g);
+		MIPS_ELF_PUT_WORD (dynobj, symbol, htab->root.sgot->contents + g);
 	    }
 	}
       else if (!htab->is_vxworks
@@ -5724,7 +5787,7 @@ mips_elf_calculate_relocation (bfd *abfd
     case R_MIPS_32:
     case R_MIPS_REL32:
     case R_MIPS_64:
-      if ((info->shared
+      if ((bfd_link_pic (info)
 	   || (htab->root.dynamic_sections_created
 	       && h != NULL
 	       && h->root.def_dynamic
@@ -5779,22 +5842,26 @@ mips_elf_calculate_relocation (bfd *abfd
       {
 	unsigned int shift;
 
-	/* Make sure the target of JALX is word-aligned.  Bit 0 must be
-	   the correct ISA mode selector and bit 1 must be 0.  */
-	if (*cross_mode_jump_p && (symbol & 3) != (r_type == R_MIPS_26))
-	  return bfd_reloc_outofrange;
-
 	/* Shift is 2, unusually, for microMIPS JALX.  */
 	shift = (!*cross_mode_jump_p && r_type == R_MICROMIPS_26_S1) ? 1 : 2;
 
-	if (was_local_p)
-	  value = addend | ((p + 4) & (0xfc000000 << shift));
-	else if (howto->partial_inplace)
+	if (howto->partial_inplace && !section_p)
 	  value = _bfd_mips_elf_sign_extend (addend, 26 + shift);
 	else
 	  value = addend;
-	value = (value + symbol) >> shift;
-	if (!was_local_p && h->root.root.type != bfd_link_hash_undefweak)
+	value += symbol;
+
+	/* Make sure the target of a jump is suitably aligned.  Bit 0 must
+	   be the correct ISA mode selector except for weak undefined
+	   symbols.  */
+	if ((was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	    && (*cross_mode_jump_p
+		? (value & 3) != (r_type == R_MIPS_26)
+	        : (value & ((1 << shift) - 1)) != (r_type != R_MIPS_26)))
+	  return bfd_reloc_outofrange;
+
+	value >>= shift;
+	if (was_local_p || h->root.root.type != bfd_link_hash_undefweak)
 	  overflowed_p = (value >> 26) != ((p + 4) >> (26 + shift));
 	value &= howto->dst_mask;
       }
@@ -5859,7 +5926,6 @@ mips_elf_calculate_relocation (bfd *abfd
 	    value = mips_elf_high (addend + gp - p - 1);
 	  else
 	    value = mips_elf_high (addend + gp - p);
-	  overflowed_p = mips_elf_overflow_p (value, 16);
 	}
       break;
 
@@ -5981,7 +6047,12 @@ mips_elf_calculate_relocation (bfd *abfd
       if (howto->partial_inplace)
 	addend = _bfd_mips_elf_sign_extend (addend, 18);
 
-      if ((symbol + addend) & 3)
+      /* No need to exclude weak undefined symbols here as they resolve
+         to 0 and never set `*cross_mode_jump_p', so this alignment check
+         will never trigger for them.  */
+      if (*cross_mode_jump_p
+	  ? ((symbol + addend) & 3) != 1
+	  : ((symbol + addend) & 3) != 0)
 	return bfd_reloc_outofrange;
 
       value = symbol + addend - p;
@@ -5991,6 +6062,23 @@ mips_elf_calculate_relocation (bfd *abfd
       value &= howto->dst_mask;
       break;
 
+    case R_MIPS16_PC16_S1:
+      if (howto->partial_inplace)
+	addend = _bfd_mips_elf_sign_extend (addend, 17);
+
+      if ((was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	  && (*cross_mode_jump_p
+	      ? ((symbol + addend) & 3) != 0
+	      : ((symbol + addend) & 1) == 0))
+	return bfd_reloc_outofrange;
+
+      value = symbol + addend - p;
+      if (was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	overflowed_p = mips_elf_overflow_p (value, 17);
+      value >>= howto->rightshift;
+      value &= howto->dst_mask;
+      break;
+
     case R_MIPS_PC21_S2:
       if (howto->partial_inplace)
 	addend = _bfd_mips_elf_sign_extend (addend, 23);
@@ -6064,6 +6152,13 @@ mips_elf_calculate_relocation (bfd *abfd
     case R_MICROMIPS_PC7_S1:
       if (howto->partial_inplace)
 	addend = _bfd_mips_elf_sign_extend (addend, 8);
+
+      if ((was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	  && (*cross_mode_jump_p
+	      ? ((symbol + addend + 2) & 3) != 0
+	      : ((symbol + addend + 2) & 1) == 0))
+	return bfd_reloc_outofrange;
+
       value = symbol + addend - p;
       if (was_local_p || h->root.root.type != bfd_link_hash_undefweak)
 	overflowed_p = mips_elf_overflow_p (value, 8);
@@ -6074,6 +6169,13 @@ mips_elf_calculate_relocation (bfd *abfd
     case R_MICROMIPS_PC10_S1:
       if (howto->partial_inplace)
 	addend = _bfd_mips_elf_sign_extend (addend, 11);
+
+      if ((was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	  && (*cross_mode_jump_p
+	      ? ((symbol + addend + 2) & 3) != 0
+	      : ((symbol + addend + 2) & 1) == 0))
+	return bfd_reloc_outofrange;
+
       value = symbol + addend - p;
       if (was_local_p || h->root.root.type != bfd_link_hash_undefweak)
 	overflowed_p = mips_elf_overflow_p (value, 11);
@@ -6084,6 +6186,13 @@ mips_elf_calculate_relocation (bfd *abfd
     case R_MICROMIPS_PC16_S1:
       if (howto->partial_inplace)
 	addend = _bfd_mips_elf_sign_extend (addend, 17);
+
+      if ((was_local_p || h->root.root.type != bfd_link_hash_undefweak)
+	  && (*cross_mode_jump_p
+	      ? ((symbol + addend) & 3) != 0
+	      : ((symbol + addend) & 1) == 0))
+	return bfd_reloc_outofrange;
+
       value = symbol + addend - p;
       if (was_local_p || h->root.root.type != bfd_link_hash_undefweak)
 	overflowed_p = mips_elf_overflow_p (value, 17);
@@ -6169,7 +6278,13 @@ mips_elf_calculate_relocation (bfd *abfd
 	 when the symbol does not resolve locally.  */
       if (h != NULL && !SYMBOL_CALLS_LOCAL (info, &h->root))
 	return bfd_reloc_continue;
+      /* We can't optimize cross-mode jumps either.  */
+      if (*cross_mode_jump_p)
+	return bfd_reloc_continue;
       value = symbol + addend;
+      /* Neither we can non-instruction-aligned targets.  */
+      if (r_type == R_MIPS_JALR ? (value & 3) != 0 : (value & 1) == 0)
+	return bfd_reloc_continue;
       break;
 
     case R_MIPS_PJUMP:
@@ -6242,7 +6357,21 @@ mips_elf_perform_relocation (struct bfd_
   /* Set the field.  */
   x |= (value & howto->dst_mask);
 
-  /* If required, turn JAL into JALX.  */
+  /* Detect incorrect JALX usage.  If required, turn JAL or BAL into JALX.  */
+  if (!cross_mode_jump_p && jal_reloc_p (r_type))
+    {
+      bfd_vma opcode = x >> 26;
+
+      if (r_type == R_MIPS16_26 ? opcode == 0x7
+	  : r_type == R_MICROMIPS_26_S1 ? opcode == 0x3c
+	  : opcode == 0x1d)
+	{
+	  info->callbacks->einfo
+	    (_("%X%H: Unsupported JALX to the same ISA mode\n"),
+	     input_bfd, input_section, relocation->r_offset);
+	  return TRUE;
+	}
+    }
   if (cross_mode_jump_p && jal_reloc_p (r_type))
     {
       bfd_boolean ok;
@@ -6270,32 +6399,79 @@ mips_elf_perform_relocation (struct bfd_
          convert J or JALS to JALX.  */
       if (!ok)
 	{
-	  (*_bfd_error_handler)
-	    (_("%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled."),
-	     input_bfd,
-	     input_section,
-	     (unsigned long) relocation->r_offset);
-	  bfd_set_error (bfd_error_bad_value);
-	  return FALSE;
+	  info->callbacks->einfo
+	    (_("%X%H: Unsupported jump between ISA modes; "
+	       "consider recompiling with interlinking enabled\n"),
+	     input_bfd, input_section, relocation->r_offset);
+	  return TRUE;
 	}
 
       /* Make this the JALX opcode.  */
       x = (x & ~(0x3f << 26)) | (jalx_opcode << 26);
     }
+  else if (cross_mode_jump_p && b_reloc_p (r_type))
+    {
+      bfd_boolean ok = FALSE;
+      bfd_vma opcode = x >> 16;
+      bfd_vma jalx_opcode = 0;
+      bfd_vma addr;
+      bfd_vma dest;
+
+      if (r_type == R_MICROMIPS_PC16_S1)
+	{
+	  ok = opcode == 0x4060;
+	  jalx_opcode = 0x3c;
+	  value <<= 1;
+	}
+      else if (r_type == R_MIPS_PC16 || r_type == R_MIPS_GNU_REL16_S2)
+	{
+	  ok = opcode == 0x411;
+	  jalx_opcode = 0x1d;
+	  value <<= 2;
+	}
+
+      if (ok && !bfd_link_pic (info))
+	{
+	  addr = (input_section->output_section->vma
+		  + input_section->output_offset
+		  + relocation->r_offset
+		  + 4);
+	  dest = addr + (((value & 0x3ffff) ^ 0x20000) - 0x20000);
+
+	  if ((addr >> 28) << 28 != (dest >> 28) << 28)
+	    {
+	      info->callbacks->einfo
+		(_("%X%H: Cannot convert branch between ISA modes "
+		   "to JALX: relocation out of range\n"),
+		 input_bfd, input_section, relocation->r_offset);
+	      return TRUE;
+	    }
+
+	  /* Make this the JALX opcode.  */
+	  x = ((dest >> 2) & 0x3ffffff) | jalx_opcode << 26;
+	}
+      else if (!mips_elf_hash_table (info)->ignore_branch_isa)
+	{
+	  info->callbacks->einfo
+	    (_("%X%H: Unsupported branch between ISA modes\n"),
+	     input_bfd, input_section, relocation->r_offset);
+	  return TRUE;
+	}
+    }
 
   /* Try converting JAL to BAL and J(AL)R to B(AL), if the target is in
      range.  */
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && !cross_mode_jump_p
       && ((JAL_TO_BAL_P (input_bfd)
 	   && r_type == R_MIPS_26
-	   && (x >> 26) == 0x3)		/* jal addr */
+	   && (x >> 26) == 0x3)			/* jal addr */
 	  || (JALR_TO_BAL_P (input_bfd)
 	      && r_type == R_MIPS_JALR
-	      && x == 0x0320f809)	/* jalr t9 */
+	      && x == 0x0320f809)		/* jalr t9 */
 	  || (JR_TO_B_P (input_bfd)
 	      && r_type == R_MIPS_JALR
-	      && x == 0x03200008)))	/* jr t9 */
+	      && (x & ~1) == 0x03200008)))	/* jr t9 / jalr zero, t9 */
     {
       bfd_vma addr;
       bfd_vma dest;
@@ -6312,7 +6488,7 @@ mips_elf_perform_relocation (struct bfd_
       off = dest - addr;
       if (off <= 0x1ffff && off >= -0x20000)
 	{
-	  if (x == 0x03200008)	/* jr t9 */
+	  if ((x & ~1) == 0x03200008)		/* jr t9 / jalr zero, t9 */
 	    x = 0x10000000 | (((bfd_vma) off >> 2) & 0xffff);   /* b addr */
 	  else
 	    x = 0x04110000 | (((bfd_vma) off >> 2) & 0xffff);   /* bal addr */
@@ -6324,7 +6500,7 @@ mips_elf_perform_relocation (struct bfd_
   if (size != 0)
     bfd_put (8 * size, input_bfd, x, location);
 
-  _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, !info->relocatable,
+  _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, !bfd_link_relocatable (info),
 			       location);
 
   return TRUE;
@@ -6950,7 +7126,8 @@ _bfd_mips_elf_section_processing (bfd *a
 					&intopt);
 	  if (intopt.size < sizeof (Elf_External_Options))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: Warning: bad `%s' option size %u smaller than its header"),
 		abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
 	      break;
@@ -7183,7 +7360,8 @@ _bfd_mips_elf_section_from_shdr (bfd *ab
 					&intopt);
 	  if (intopt.size < sizeof (Elf_External_Options))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: Warning: bad `%s' option size %u smaller than its header"),
 		abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
 	      break;
@@ -7454,7 +7632,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd
 	  elf_text_symbol->section = elf_text_section;
 	}
       /* This code used to do *secp = bfd_und_section_ptr if
-         info->shared.  I don't know why, and that doesn't make sense,
+         bfd_link_pic (info).  I don't know why, and that doesn't make sense,
          so I took it out.  */
       *secp = mips_elf_tdata (abfd)->elf_text_section;
       break;
@@ -7495,7 +7673,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd
 	  elf_data_symbol->section = elf_data_section;
 	}
       /* This code used to do *secp = bfd_und_section_ptr if
-         info->shared.  I don't know why, and that doesn't make sense,
+         bfd_link_pic (info).  I don't know why, and that doesn't make sense,
          so I took it out.  */
       *secp = mips_elf_tdata (abfd)->elf_data_section;
       break;
@@ -7506,7 +7684,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd
     }
 
   if (SGI_COMPAT (abfd)
-      && ! info->shared
+      && ! bfd_link_pic (info)
       && info->output_bfd->xvec == abfd->xvec
       && strcmp (*namep, "__rld_obj_head") == 0)
     {
@@ -7614,7 +7792,7 @@ _bfd_mips_elf_create_dynamic_sections (b
   htab->sstubs = s;
 
   if (!mips_elf_hash_table (info)->use_rld_obj_head
-      && info->executable
+      && bfd_link_executable (info)
       && bfd_get_linker_section (abfd, ".rld_map") == NULL)
     {
       s = bfd_make_section_anyway_with_flags (abfd, ".rld_map",
@@ -7678,7 +7856,7 @@ _bfd_mips_elf_create_dynamic_sections (b
 	(void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
     }
 
-  if (info->executable)
+  if (bfd_link_executable (info))
     {
       const char *name;
 
@@ -7729,22 +7907,6 @@ _bfd_mips_elf_create_dynamic_sections (b
   if (!_bfd_elf_create_dynamic_sections (abfd, info))
     return FALSE;
 
-  /* Cache the sections created above.  */
-  htab->splt = bfd_get_linker_section (abfd, ".plt");
-  htab->sdynbss = bfd_get_linker_section (abfd, ".dynbss");
-  if (htab->is_vxworks)
-    {
-      htab->srelbss = bfd_get_linker_section (abfd, ".rela.bss");
-      htab->srelplt = bfd_get_linker_section (abfd, ".rela.plt");
-    }
-  else
-    htab->srelplt = bfd_get_linker_section (abfd, ".rel.plt");
-  if (!htab->sdynbss
-      || (htab->is_vxworks && !htab->srelbss && !info->shared)
-      || !htab->srelplt
-      || !htab->splt)
-    abort ();
-
   /* Do the usual VxWorks handling.  */
   if (htab->is_vxworks
       && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
@@ -7786,16 +7948,24 @@ mips_elf_read_rel_addend (bfd *abfd, con
   bfd_byte *location;
   unsigned int r_type;
   bfd_vma addend;
+  bfd_vma bytes;
 
   r_type = ELF_R_TYPE (abfd, rel->r_info);
   location = contents + rel->r_offset;
 
   /* Get the addend, which is stored in the input file.  */
   _bfd_mips_elf_reloc_unshuffle (abfd, r_type, FALSE, location);
-  addend = mips_elf_obtain_contents (howto, rel, abfd, contents);
+  bytes = mips_elf_obtain_contents (howto, rel, abfd, contents);
   _bfd_mips_elf_reloc_shuffle (abfd, r_type, FALSE, location);
 
-  return addend & howto->src_mask;
+  addend = bytes & howto->src_mask;
+
+  /* Shift is 2, unusually, for microMIPS JALX.  Adjust the addend
+     accordingly.  */
+  if (r_type == R_MICROMIPS_26_S1 && (bytes >> 26) == 0x3c)
+    addend <<= 1;
+
+  return addend;
 }
 
 /* REL is a relocation in ABFD that needs a partnering LO16 relocation
@@ -7918,7 +8088,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
   bfd_vma addend;
   reloc_howto_type *howto;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = mips_elf_hash_table (info);
@@ -7945,7 +8115,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
       r_symndx = mips16_stub_symndx (bed, sec, relocs, rel_end);
       if (r_symndx == 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: Warning: cannot determine the target function for"
 	       " stub section `%s'"),
 	     abfd, name);
@@ -8070,7 +8241,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
       r_symndx = mips16_stub_symndx (bed, sec, relocs, rel_end);
       if (r_symndx == 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: Warning: cannot determine the target function for"
 	       " stub section `%s'"),
 	     abfd, name);
@@ -8201,7 +8373,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	h = NULL;
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: Malformed reloc detected for section %s"),
 	     abfd, name);
 	  bfd_set_error (bfd_error_bad_value);
@@ -8274,9 +8447,10 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	    elf_hash_table (info)->dynobj = dynobj = abfd;
 	  if (!mips_elf_create_got_section (dynobj, info))
 	    return FALSE;
-	  if (htab->is_vxworks && !info->shared)
+	  if (htab->is_vxworks && !bfd_link_pic (info))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: GOT reloc at 0x%lx not expected in executables"),
 		 abfd, (unsigned long) rel->r_offset);
 	      bfd_set_error (bfd_error_bad_value);
@@ -8317,7 +8491,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	     one or using copy relocations or PLT entries.  It is
 	     usually better to do the former, unless the relocation is
 	     against a read-only section.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       || (h != NULL
 		   && !htab->is_vxworks
 		   && strcmp (h->root.root.string, "__gnu_local_gp") != 0
@@ -8337,6 +8511,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	case R_MIPS_PC21_S2:
 	case R_MIPS_PC26_S2:
 	case R_MIPS16_26:
+	case R_MIPS16_PC16_S1:
 	case R_MICROMIPS_26_S1:
 	case R_MICROMIPS_PC7_S1:
 	case R_MICROMIPS_PC10_S1:
@@ -8412,7 +8587,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	case R_MICROMIPS_CALL16:
 	  if (h == NULL)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: CALL16 reloc at 0x%lx not against global symbol"),
 		 abfd, (unsigned long) rel->r_offset);
 	      bfd_set_error (bfd_error_bad_value);
@@ -8482,7 +8658,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 
 		  /* This symbol is definitely not overridable.  */
 		  if (hmips->root.def_regular
-		      && ! (info->shared && ! info->symbolic
+		      && ! (bfd_link_pic (info) && ! info->symbolic
 			    && ! hmips->root.forced_local))
 		    h = NULL;
 		}
@@ -8501,7 +8677,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	case R_MIPS_TLS_GOTTPREL:
 	case R_MIPS16_TLS_GOTTPREL:
 	case R_MICROMIPS_TLS_GOTTPREL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
@@ -8549,7 +8725,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 		  if (sreloc == NULL)
 		    return FALSE;
 		}
-	      if (info->shared && h == NULL)
+	      if (bfd_link_pic (info) && h == NULL)
 		{
 		  /* When creating a shared object, we must copy these
 		     reloc types into the output file as R_MIPS_REL32
@@ -8630,7 +8806,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
          a PLT entry is not created because the symbol is satisfied
          locally.  */
       if (h != NULL
-	  && jal_reloc_p (r_type)
+	  && (branch_reloc_p (r_type)
+	      || mips16_branch_reloc_p (r_type)
+	      || micromips_branch_reloc_p (r_type))
 	  && !SYMBOL_CALLS_LOCAL (info, h))
 	{
 	  if (h->plt.plist == NULL)
@@ -8638,7 +8816,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	  if (h->plt.plist == NULL)
 	    return FALSE;
 
-	  if (r_type == R_MIPS_26)
+	  if (branch_reloc_p (r_type))
 	    h->plt.plist->need_mips = TRUE;
 	  else
 	    h->plt.plist->need_comp = TRUE;
@@ -8663,7 +8841,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	 not PIC, but we can create dynamic relocations and the result
 	 will be fine.  Also do not refuse R_MIPS_LO16, which can be
 	 combined with R_MIPS_GOT16.  */
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  switch (r_type)
 	    {
@@ -8695,7 +8873,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 	    case R_MIPS_26:
 	    case R_MICROMIPS_26_S1:
 	      howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
 		 abfd, howto->name,
 		 (h) ? h->root.root.string : "a local symbol");
@@ -8710,167 +8889,6 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
   return TRUE;
 }
 
-bfd_boolean
-_bfd_mips_relax_section (bfd *abfd, asection *sec,
-			 struct bfd_link_info *link_info,
-			 bfd_boolean *again)
-{
-  Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *irel, *irelend;
-  Elf_Internal_Shdr *symtab_hdr;
-  bfd_byte *contents = NULL;
-  size_t extsymoff;
-  bfd_boolean changed_contents = FALSE;
-  bfd_vma sec_start = sec->output_section->vma + sec->output_offset;
-  Elf_Internal_Sym *isymbuf = NULL;
-
-  /* We are not currently changing any sizes, so only one pass.  */
-  *again = FALSE;
-
-  if (link_info->relocatable)
-    return TRUE;
-
-  internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
-					       link_info->keep_memory);
-  if (internal_relocs == NULL)
-    return TRUE;
-
-  irelend = internal_relocs + sec->reloc_count
-    * get_elf_backend_data (abfd)->s->int_rels_per_ext_rel;
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
-
-  for (irel = internal_relocs; irel < irelend; irel++)
-    {
-      bfd_vma symval;
-      bfd_signed_vma sym_offset;
-      unsigned int r_type;
-      unsigned long r_symndx;
-      asection *sym_sec;
-      unsigned long instruction;
-
-      /* Turn jalr into bgezal, and jr into beq, if they're marked
-	 with a JALR relocation, that indicate where they jump to.
-	 This saves some pipeline bubbles.  */
-      r_type = ELF_R_TYPE (abfd, irel->r_info);
-      if (r_type != R_MIPS_JALR)
-	continue;
-
-      r_symndx = ELF_R_SYM (abfd, irel->r_info);
-      /* Compute the address of the jump target.  */
-      if (r_symndx >= extsymoff)
-	{
-	  struct mips_elf_link_hash_entry *h
-	    = ((struct mips_elf_link_hash_entry *)
-	       elf_sym_hashes (abfd) [r_symndx - extsymoff]);
-
-	  while (h->root.root.type == bfd_link_hash_indirect
-		 || h->root.root.type == bfd_link_hash_warning)
-	    h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
-
-	  /* If a symbol is undefined, or if it may be overridden,
-	     skip it.  */
-	  if (! ((h->root.root.type == bfd_link_hash_defined
-		  || h->root.root.type == bfd_link_hash_defweak)
-		 && h->root.root.u.def.section)
-	      || (link_info->shared && ! link_info->symbolic
-		  && !h->root.forced_local))
-	    continue;
-
-	  sym_sec = h->root.root.u.def.section;
-	  if (sym_sec->output_section)
-	    symval = (h->root.root.u.def.value
-		      + sym_sec->output_section->vma
-		      + sym_sec->output_offset);
-	  else
-	    symval = h->root.root.u.def.value;
-	}
-      else
-	{
-	  Elf_Internal_Sym *isym;
-
-	  /* Read this BFD's symbols if we haven't done so already.  */
-	  if (isymbuf == NULL && symtab_hdr->sh_info != 0)
-	    {
-	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
-	      if (isymbuf == NULL)
-		isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
-						symtab_hdr->sh_info, 0,
-						NULL, NULL, NULL);
-	      if (isymbuf == NULL)
-		goto relax_return;
-	    }
-
-	  isym = isymbuf + r_symndx;
-	  if (isym->st_shndx == SHN_UNDEF)
-	    continue;
-	  else if (isym->st_shndx == SHN_ABS)
-	    sym_sec = bfd_abs_section_ptr;
-	  else if (isym->st_shndx == SHN_COMMON)
-	    sym_sec = bfd_com_section_ptr;
-	  else
-	    sym_sec
-	      = bfd_section_from_elf_index (abfd, isym->st_shndx);
-	  symval = isym->st_value
-	    + sym_sec->output_section->vma
-	    + sym_sec->output_offset;
-	}
-
-      /* Compute branch offset, from delay slot of the jump to the
-	 branch target.  */
-      sym_offset = (symval + irel->r_addend)
-	- (sec_start + irel->r_offset + 4);
-
-      /* Branch offset must be properly aligned.  */
-      if ((sym_offset & 3) != 0)
-	continue;
-
-      sym_offset >>= 2;
-
-      /* Check that it's in range.  */
-      if (sym_offset < -0x8000 || sym_offset >= 0x8000)
-	continue;
-
-      /* Get the section contents if we haven't done so already.  */
-      if (!mips_elf_get_section_contents (abfd, sec, &contents))
-	goto relax_return;
-
-      instruction = bfd_get_32 (abfd, contents + irel->r_offset);
-
-      /* If it was jalr <reg>, turn it into bgezal $zero, <target>.  */
-      if ((instruction & 0xfc1fffff) == 0x0000f809)
-	instruction = 0x04110000;
-      /* If it was jr <reg>, turn it into b <target>.  */
-      else if ((instruction & 0xfc1fffff) == 0x00000008)
-	instruction = 0x10000000;
-      else
-	continue;
-
-      instruction |= (sym_offset & 0xffff);
-      bfd_put_32 (abfd, instruction, contents + irel->r_offset);
-      changed_contents = TRUE;
-    }
-
-  if (contents != NULL
-      && elf_section_data (sec)->this_hdr.contents != contents)
-    {
-      if (!changed_contents && !link_info->keep_memory)
-        free (contents);
-      else
-        {
-          /* Cache the section contents for elf_link_input_bfd.  */
-          elf_section_data (sec)->this_hdr.contents = contents;
-        }
-    }
-  return TRUE;
-
- relax_return:
-  if (contents != NULL
-      && elf_section_data (sec)->this_hdr.contents != contents)
-    free (contents);
-  return FALSE;
-}
-
 /* Allocate space for global sym dynamic relocs.  */
 
 static bfd_boolean
@@ -8889,7 +8907,7 @@ allocate_dynrelocs (struct elf_link_hash
 
   /* VxWorks executables are handled elsewhere; we only need to
      allocate relocations in shared objects.  */
-  if (htab->is_vxworks && !info->shared)
+  if (htab->is_vxworks && !bfd_link_pic (info))
     return TRUE;
 
   /* Ignore indirect symbols.  All relocations against such symbols
@@ -8900,11 +8918,11 @@ allocate_dynrelocs (struct elf_link_hash
   /* If this symbol is defined in a dynamic object, or we are creating
      a shared library, we will need to copy any R_MIPS_32 or
      R_MIPS_REL32 relocs against it into the output file.  */
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && hmips->possibly_dynamic_relocs != 0
       && (h->root.type == bfd_link_hash_defweak
 	  || (!h->def_regular && !ELF_COMMON_DEF_P (h))
-	  || info->shared))
+	  || bfd_link_pic (info)))
     {
       bfd_boolean do_copy = TRUE;
 
@@ -8966,6 +8984,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
   bfd *dynobj;
   struct mips_elf_link_hash_entry *hmips;
   struct mips_elf_link_hash_table *htab;
+  asection *s, *srel;
 
   htab = mips_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -9032,7 +9051,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
          for PLT offset calculations.  */
       if (htab->plt_mips_offset + htab->plt_comp_offset == 0)
 	{
-	  BFD_ASSERT (htab->sgotplt->size == 0);
+	  BFD_ASSERT (htab->root.sgotplt->size == 0);
 	  BFD_ASSERT (htab->plt_got_index == 0);
 
 	  /* If we're using the PLT additions to the psABI, each PLT
@@ -9040,12 +9059,12 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
 	     Encourage better cache usage by aligning.  We do this
 	     lazily to avoid pessimizing traditional objects.  */
 	  if (!htab->is_vxworks
-	      && !bfd_set_section_alignment (dynobj, htab->splt, 5))
+	      && !bfd_set_section_alignment (dynobj, htab->root.splt, 5))
 	    return FALSE;
 
 	  /* Make sure that .got.plt is word-aligned.  We do this lazily
 	     for the same reason as above.  */
-	  if (!bfd_set_section_alignment (dynobj, htab->sgotplt,
+	  if (!bfd_set_section_alignment (dynobj, htab->root.sgotplt,
 					  MIPS_ELF_LOG_FILE_ALIGN (dynobj)))
 	    return FALSE;
 
@@ -9058,11 +9077,11 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
 
 	  /* On VxWorks, also allocate room for the header's
 	     .rela.plt.unloaded entries.  */
-	  if (htab->is_vxworks && !info->shared)
+	  if (htab->is_vxworks && !bfd_link_pic (info))
 	    htab->srelplt2->size += 2 * sizeof (Elf32_External_Rela);
 
 	  /* Now work out the sizes of individual PLT entries.  */
-	  if (htab->is_vxworks && info->shared)
+	  if (htab->is_vxworks && bfd_link_pic (info))
 	    htab->plt_mips_entry_size
 	      = 4 * ARRAY_SIZE (mips_vxworks_shared_plt_entry);
 	  else if (htab->is_vxworks)
@@ -9146,16 +9165,16 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
 
       /* If the output file has no definition of the symbol, set the
 	 symbol's value to the address of the stub.  */
-      if (!info->shared && !h->def_regular)
+      if (!bfd_link_pic (info) && !h->def_regular)
 	hmips->use_plt_entry = TRUE;
 
       /* Make room for the R_MIPS_JUMP_SLOT relocation.  */
-      htab->srelplt->size += (htab->is_vxworks
-			      ? MIPS_ELF_RELA_SIZE (dynobj)
-			      : MIPS_ELF_REL_SIZE (dynobj));
+      htab->root.srelplt->size += (htab->is_vxworks
+				   ? MIPS_ELF_RELA_SIZE (dynobj)
+				   : MIPS_ELF_REL_SIZE (dynobj));
 
       /* Make room for the .rela.plt.unloaded relocations.  */
-      if (htab->is_vxworks && !info->shared)
+      if (htab->is_vxworks && !bfd_link_pic (info))
 	htab->srelplt2->size += 3 * sizeof (Elf32_External_Rela);
 
       /* All relocations against this symbol that could have been made
@@ -9189,11 +9208,11 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
 
   /* We're now relying on copy relocations.  Complain if we have
      some that we can't convert.  */
-  if (!htab->use_plts_and_copy_relocs || info->shared)
+  if (!htab->use_plts_and_copy_relocs || bfd_link_pic (info))
     {
-      (*_bfd_error_handler) (_("non-dynamic relocations refer to "
-			       "dynamic symbol %s"),
-			     h->root.root.string);
+      _bfd_error_handler (_("non-dynamic relocations refer to "
+			    "dynamic symbol %s"),
+			  h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -9208,10 +9227,20 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
 
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->root.sdynrelro;
+      srel = htab->root.sreldynrelro;
+    }
+  else
+    {
+      s = htab->root.sdynbss;
+      srel = htab->root.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
     {
       if (htab->is_vxworks)
-	htab->srelbss->size += sizeof (Elf32_External_Rela);
+	srel->size += sizeof (Elf32_External_Rela);
       else
 	mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
       h->needs_copy = 1;
@@ -9221,7 +9250,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
      dynamic will now refer to the local copy instead.  */
   hmips->possibly_dynamic_relocs = 0;
 
-  return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss);
+  return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
 /* This function is called after all the input files have been read,
@@ -9277,7 +9306,7 @@ mips_elf_lay_out_got (bfd *output_bfd, s
   htab = mips_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
 
-  s = htab->sgot;
+  s = htab->root.sgot;
   if (s == NULL)
     return TRUE;
 
@@ -9370,7 +9399,7 @@ mips_elf_lay_out_got (bfd *output_bfd, s
 		  == g->global_gotno + g->local_gotno + g->tls_gotno);
 
       /* Each VxWorks GOT entry needs an explicit relocation.  */
-      if (htab->is_vxworks && info->shared)
+      if (htab->is_vxworks && bfd_link_pic (info))
 	g->relocs += g->global_gotno + g->local_gotno - htab->reserved_gotno;
 
       /* Allocate room for the TLS relocations.  */
@@ -9555,7 +9584,7 @@ mips_elf_set_plt_sym_value (struct mips_
       if (htab->is_vxworks)
 	val += 8;
 
-      h->root.root.u.def.section = htab->splt;
+      h->root.root.u.def.section = htab->root.splt;
       h->root.root.u.def.value = val;
       h->root.other = other;
     }
@@ -9582,7 +9611,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -9604,7 +9633,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 
          Also create the _PROCEDURE_LINKAGE_TABLE_ symbol if we
          haven't already in _bfd_elf_create_dynamic_sections.  */
-      if (htab->splt && htab->plt_mips_offset + htab->plt_comp_offset != 0)
+      if (htab->root.splt && htab->plt_mips_offset + htab->plt_comp_offset != 0)
 	{
 	  bfd_boolean micromips_p = (MICROMIPS_P (output_bfd)
 				     && !htab->plt_mips_offset);
@@ -9614,10 +9643,10 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 	  bfd_vma size;
 
 	  BFD_ASSERT (htab->use_plts_and_copy_relocs);
-	  BFD_ASSERT (htab->sgotplt->size == 0);
-	  BFD_ASSERT (htab->splt->size == 0);
+	  BFD_ASSERT (htab->root.sgotplt->size == 0);
+	  BFD_ASSERT (htab->root.splt->size == 0);
 
-	  if (htab->is_vxworks && info->shared)
+	  if (htab->is_vxworks && bfd_link_pic (info))
 	    size = 4 * ARRAY_SIZE (mips_vxworks_shared_plt0_entry);
 	  else if (htab->is_vxworks)
 	    size = 4 * ARRAY_SIZE (mips_vxworks_exec_plt0_entry);
@@ -9634,17 +9663,17 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 
 	  htab->plt_header_is_comp = micromips_p;
 	  htab->plt_header_size = size;
-	  htab->splt->size = (size
-			      + htab->plt_mips_offset
-			      + htab->plt_comp_offset);
-	  htab->sgotplt->size = (htab->plt_got_index
-				 * MIPS_ELF_GOT_SIZE (dynobj));
+	  htab->root.splt->size = (size
+				   + htab->plt_mips_offset
+				   + htab->plt_comp_offset);
+	  htab->root.sgotplt->size = (htab->plt_got_index
+				      * MIPS_ELF_GOT_SIZE (dynobj));
 
 	  mips_elf_link_hash_traverse (htab, mips_elf_set_plt_sym_value, info);
 
 	  if (htab->root.hplt == NULL)
 	    {
-	      h = _bfd_elf_define_linkage_sym (dynobj, info, htab->splt,
+	      h = _bfd_elf_define_linkage_sym (dynobj, info, htab->root.splt,
 					       "_PROCEDURE_LINKAGE_TABLE_");
 	      htab->root.hplt = h;
 	      if (h == NULL)
@@ -9719,7 +9748,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 	      info->combreloc = 0;
 	    }
 	}
-      else if (info->executable
+      else if (bfd_link_executable (info)
 	       && ! mips_elf_hash_table (info)->use_rld_obj_head
 	       && CONST_STRNEQ (name, ".rld_map"))
 	{
@@ -9730,7 +9759,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd
       else if (SGI_COMPAT (output_bfd)
 	       && CONST_STRNEQ (name, ".compact_rel"))
 	s->size += mips_elf_hash_table (info)->compact_rel_size;
-      else if (s == htab->splt)
+      else if (s == htab->root.splt)
 	{
 	  /* If the last PLT entry has a branch delay slot, allocate
 	     room for an extra nop to fill the delay slot.  This is
@@ -9740,10 +9769,11 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 	    s->size += 4;
 	}
       else if (! CONST_STRNEQ (name, ".init")
-	       && s != htab->sgot
-	       && s != htab->sgotplt
+	       && s != htab->root.sgot
+	       && s != htab->root.sgotplt
 	       && s != htab->sstubs
-	       && s != htab->sdynbss)
+	       && s != htab->root.sdynbss
+	       && s != htab->root.sdynrelro)
 	{
 	  /* It's not one of our sections, so don't allocate space.  */
 	  continue;
@@ -9778,17 +9808,17 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 	 DT_MIPS_RLD_MAP entry.  This must come first because glibc
 	 only fills in DT_MIPS_RLD_MAP (not DT_DEBUG) and some tools
 	 may only look at the first one they see.  */
-      if (!info->shared
+      if (!bfd_link_pic (info)
 	  && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
 	return FALSE;
 
-      if (info->executable
+      if (bfd_link_executable (info)
 	  && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP_REL, 0))
 	return FALSE;
 
       /* The DT_DEBUG entry may be filled in by the dynamic linker and
 	 used by the debugger.  */
-      if (info->executable
+      if (bfd_link_executable (info)
 	  && !SGI_COMPAT (output_bfd)
 	  && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
 	return FALSE;
@@ -9873,7 +9903,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd
 	      && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
 	    return FALSE;
 	}
-      if (htab->splt->size > 0)
+      if (htab->root.splt->size > 0)
 	{
 	  if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTREL, 0))
 	    return FALSE;
@@ -9924,7 +9954,7 @@ mips_elf_adjust_addend (bfd *output_bfd,
       sym = local_syms + r_symndx;
 
       /* Adjust REL's addend to account for section merging.  */
-      if (!info->relocatable)
+      if (!bfd_link_relocatable (info))
 	{
 	  sec = local_sections[r_symndx];
 	  _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
@@ -10100,7 +10130,8 @@ _bfd_mips_elf_relocate_section (bfd *out
 			name = bfd_elf_sym_name (input_bfd, symtab_hdr,
 						 local_syms + r_symndx,
 						 sec);
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"),
 			 input_bfd, input_section, name, howto->name,
 			 rel->r_offset);
@@ -10115,7 +10146,7 @@ _bfd_mips_elf_relocate_section (bfd *out
 				  local_syms, local_sections, rel);
 	}
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd)
 	      && bfd_big_endian (input_bfd))
@@ -10246,10 +10277,9 @@ _bfd_mips_elf_relocate_section (bfd *out
 		  htab->small_data_overflow_reported = TRUE;
 		  (*info->callbacks->einfo) ("%P: %s\n", msg);
 		}
-	      if (! ((*info->callbacks->reloc_overflow)
-		     (info, NULL, name, howto->name, (bfd_vma) 0,
-		      input_bfd, input_section, rel->r_offset)))
-		return FALSE;
+	      (*info->callbacks->reloc_overflow)
+		(info, NULL, name, howto->name, (bfd_vma) 0,
+		 input_bfd, input_section, rel->r_offset);
 	    }
 	  break;
 
@@ -10257,19 +10287,26 @@ _bfd_mips_elf_relocate_section (bfd *out
 	  break;
 
 	case bfd_reloc_outofrange:
+	  msg = NULL;
 	  if (jal_reloc_p (howto->type))
+	    msg = (cross_mode_jump_p
+		   ? _("Cannot convert a jump to JALX "
+		       "for a non-word-aligned address")
+		   : (howto->type == R_MIPS16_26
+		      ? _("Jump to a non-word-aligned address")
+		      : _("Jump to a non-instruction-aligned address")));
+	  else if (b_reloc_p (howto->type))
+	    msg = (cross_mode_jump_p
+		   ? _("Cannot convert a branch to JALX "
+		       "for a non-word-aligned address")
+		   : _("Branch to a non-instruction-aligned address"));
+	  else if (aligned_pcrel_reloc_p (howto->type))
+	    msg = _("PC-relative load from unaligned address");
+	  if (msg)
 	    {
-	      msg = _("JALX to a non-word-aligned address");
-	      info->callbacks->warning
-		(info, msg, name, input_bfd, input_section, rel->r_offset);
-	      return FALSE;
-	    }
-	  if (aligned_pcrel_reloc_p (howto->type))
-	    {
-	      msg = _("PC-relative load from unaligned address");
-	      info->callbacks->warning
-		(info, msg, name, input_bfd, input_section, rel->r_offset);
-	      return FALSE;
+	      info->callbacks->einfo
+		("%X%H: %s\n", input_bfd, input_section, rel->r_offset, msg);
+	      break;
 	    }
 	  /* Fall through.  */
 
@@ -10518,25 +10555,25 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 
       BFD_ASSERT (htab->use_plts_and_copy_relocs);
       BFD_ASSERT (h->dynindx != -1);
-      BFD_ASSERT (htab->splt != NULL);
+      BFD_ASSERT (htab->root.splt != NULL);
       BFD_ASSERT (got_index != MINUS_ONE);
       BFD_ASSERT (!h->def_regular);
 
       /* Calculate the address of the PLT header.  */
       isa_bit = htab->plt_header_is_comp;
-      header_address = (htab->splt->output_section->vma
-			+ htab->splt->output_offset + isa_bit);
+      header_address = (htab->root.splt->output_section->vma
+			+ htab->root.splt->output_offset + isa_bit);
 
       /* Calculate the address of the .got.plt entry.  */
-      got_address = (htab->sgotplt->output_section->vma
-		     + htab->sgotplt->output_offset
+      got_address = (htab->root.sgotplt->output_section->vma
+		     + htab->root.sgotplt->output_offset
 		     + got_index * MIPS_ELF_GOT_SIZE (dynobj));
 
       got_address_high = ((got_address + 0x8000) >> 16) & 0xffff;
       got_address_low = got_address & 0xffff;
 
       /* Initially point the .got.plt entry at the PLT header.  */
-      loc = (htab->sgotplt->contents + got_index * MIPS_ELF_GOT_SIZE (dynobj));
+      loc = (htab->root.sgotplt->contents + got_index * MIPS_ELF_GOT_SIZE (dynobj));
       if (ABI_64_P (output_bfd))
 	bfd_put_64 (output_bfd, header_address, loc);
       else
@@ -10551,10 +10588,10 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 
 	  plt_offset = htab->plt_header_size + h->plt.plist->mips_offset;
 
-	  BFD_ASSERT (plt_offset <= htab->splt->size);
+	  BFD_ASSERT (plt_offset <= htab->root.splt->size);
 
 	  /* Find out where the .plt entry should go.  */
-	  loc = htab->splt->contents + plt_offset;
+	  loc = htab->root.splt->contents + plt_offset;
 
 	  /* Pick the load opcode.  */
 	  load = MIPS_ELF_LOAD_WORD (output_bfd);
@@ -10590,10 +10627,10 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 	  plt_offset = (htab->plt_header_size + htab->plt_mips_offset
 			+ h->plt.plist->comp_offset);
 
-	  BFD_ASSERT (plt_offset <= htab->splt->size);
+	  BFD_ASSERT (plt_offset <= htab->root.splt->size);
 
 	  /* Find out where the .plt entry should go.  */
-	  loc = htab->splt->contents + plt_offset;
+	  loc = htab->root.splt->contents + plt_offset;
 
 	  /* Fill in the PLT entry itself.  */
 	  if (!MICROMIPS_P (output_bfd))
@@ -10629,19 +10666,20 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 
 	      BFD_ASSERT (got_address % 4 == 0);
 
-	      loc_address = (htab->splt->output_section->vma
-			     + htab->splt->output_offset + plt_offset);
+	      loc_address = (htab->root.splt->output_section->vma
+			     + htab->root.splt->output_offset + plt_offset);
 	      gotpc_offset = got_address - ((loc_address | 3) ^ 3);
 
 	      /* ADDIUPC has a span of +/-16MB, check we're in range.  */
 	      if (gotpc_offset + 0x1000000 >= 0x2000000)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: `%A' offset of %ld from `%A' "
 		       "beyond the range of ADDIUPC"),
 		     output_bfd,
-		     htab->sgotplt->output_section,
-		     htab->splt->output_section,
+		     htab->root.sgotplt->output_section,
+		     htab->root.splt->output_section,
 		     (long) gotpc_offset);
 		  bfd_set_error (bfd_error_no_error);
 		  return FALSE;
@@ -10657,7 +10695,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 	}
 
       /* Emit an R_MIPS_JUMP_SLOT relocation against the .got.plt entry.  */
-      mips_elf_output_dynamic_relocation (output_bfd, htab->srelplt,
+      mips_elf_output_dynamic_relocation (output_bfd, htab->root.srelplt,
 					  got_index - 2, h->dynindx,
 					  R_MIPS_JUMP_SLOT, got_address);
 
@@ -10714,8 +10752,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 	  if (htab->insn32)
 	    {
 	      bfd_put_micromips_32 (output_bfd,
-				    STUB_MOVE32_MICROMIPS (output_bfd),
-				    stub + idx);
+				    STUB_MOVE32_MICROMIPS, stub + idx);
 	      idx += 4;
 	    }
 	  else
@@ -10765,7 +10802,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 	  idx = 0;
 	  bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub + idx);
 	  idx += 4;
-	  bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + idx);
+	  bfd_put_32 (output_bfd, STUB_MOVE, stub + idx);
 	  idx += 4;
 	  if (stub_size == stub_big_size)
 	    {
@@ -10822,7 +10859,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
   BFD_ASSERT (h->dynindx != -1
 	      || h->forced_local);
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
   g = htab->got_info;
   BFD_ASSERT (g != NULL);
 
@@ -10858,8 +10895,8 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd
 							   &e)))
 	    {
 	      offset = p->gotidx;
-	      BFD_ASSERT (offset > 0 && offset < htab->sgot->size);
-	      if (info->shared
+	      BFD_ASSERT (offset > 0 && offset < htab->root.sgot->size);
+	      if (bfd_link_pic (info)
 		  || (elf_hash_table (info)->dynamic_sections_created
 		      && p->d.h != NULL
 		      && p->d.h->root.def_dynamic
@@ -11005,18 +11042,18 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
       gotplt_index = h->plt.plist->gotplt_index;
 
       BFD_ASSERT (h->dynindx != -1);
-      BFD_ASSERT (htab->splt != NULL);
+      BFD_ASSERT (htab->root.splt != NULL);
       BFD_ASSERT (gotplt_index != MINUS_ONE);
-      BFD_ASSERT (plt_offset <= htab->splt->size);
+      BFD_ASSERT (plt_offset <= htab->root.splt->size);
 
       /* Calculate the address of the .plt entry.  */
-      plt_address = (htab->splt->output_section->vma
-		     + htab->splt->output_offset
+      plt_address = (htab->root.splt->output_section->vma
+		     + htab->root.splt->output_offset
 		     + plt_offset);
 
       /* Calculate the address of the .got.plt entry.  */
-      got_address = (htab->sgotplt->output_section->vma
-		     + htab->sgotplt->output_offset
+      got_address = (htab->root.sgotplt->output_section->vma
+		     + htab->root.sgotplt->output_offset
 		     + gotplt_index * MIPS_ELF_GOT_SIZE (output_bfd));
 
       /* Calculate the offset of the .got.plt entry from
@@ -11029,13 +11066,13 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
 
       /* Fill in the initial value of the .got.plt entry.  */
       bfd_put_32 (output_bfd, plt_address,
-		  (htab->sgotplt->contents
+		  (htab->root.sgotplt->contents
 		   + gotplt_index * MIPS_ELF_GOT_SIZE (output_bfd)));
 
       /* Find out where the .plt entry should go.  */
-      loc = htab->splt->contents + plt_offset;
+      loc = htab->root.splt->contents + plt_offset;
 
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  plt_entry = mips_vxworks_shared_plt_entry;
 	  bfd_put_32 (output_bfd, plt_entry[0] | branch_offset, loc);
@@ -11082,7 +11119,7 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
 	}
 
       /* Emit an R_MIPS_JUMP_SLOT relocation against the .got.plt entry.  */
-      loc = (htab->srelplt->contents
+      loc = (htab->root.srelplt->contents
 	     + gotplt_index * sizeof (Elf32_External_Rela));
       rel.r_offset = got_address;
       rel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_JUMP_SLOT);
@@ -11095,7 +11132,7 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
 
   BFD_ASSERT (h->dynindx != -1 || h->forced_local);
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
   g = htab->got_info;
   BFD_ASSERT (g != NULL);
 
@@ -11126,6 +11163,8 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
   if (h->needs_copy)
     {
       Elf_Internal_Rela rel;
+      asection *srel;
+      bfd_byte *loc;
 
       BFD_ASSERT (h->dynindx != -1);
 
@@ -11134,11 +11173,13 @@ _bfd_mips_vxworks_finish_dynamic_symbol 
 		      + h->root.u.def.value);
       rel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_COPY);
       rel.r_addend = 0;
-      bfd_elf32_swap_reloca_out (output_bfd, &rel,
-				 htab->srelbss->contents
-				 + (htab->srelbss->reloc_count
-				    * sizeof (Elf32_External_Rela)));
-      ++htab->srelbss->reloc_count;
+      if (h->root.u.def.section == htab->root.sdynrelro)
+	srel = htab->root.sreldynrelro;
+      else
+	srel = htab->root.srelbss;
+      loc = srel->contents + srel->reloc_count * sizeof (Elf32_External_Rela);
+      bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+      ++srel->reloc_count;
     }
 
   /* If this is a mips16/microMIPS symbol, force the value to be even.  */
@@ -11173,8 +11214,8 @@ mips_finish_exec_plt (bfd *output_bfd, s
     plt_entry = micromips_o32_exec_plt0_entry;
 
   /* Calculate the value of .got.plt.  */
-  gotplt_value = (htab->sgotplt->output_section->vma
-		  + htab->sgotplt->output_offset);
+  gotplt_value = (htab->root.sgotplt->output_section->vma
+		  + htab->root.sgotplt->output_offset);
   gotplt_value_high = ((gotplt_value + 0x8000) >> 16) & 0xffff;
   gotplt_value_low = gotplt_value & 0xffff;
 
@@ -11184,7 +11225,7 @@ mips_finish_exec_plt (bfd *output_bfd, s
 	      || ~(gotplt_value | 0x7fffffff) == 0);
 
   /* Install the PLT header.  */
-  loc = htab->splt->contents;
+  loc = htab->root.splt->contents;
   if (plt_entry == micromips_o32_exec_plt0_entry)
     {
       bfd_vma gotpc_offset;
@@ -11193,18 +11234,19 @@ mips_finish_exec_plt (bfd *output_bfd, s
 
       BFD_ASSERT (gotplt_value % 4 == 0);
 
-      loc_address = (htab->splt->output_section->vma
-		     + htab->splt->output_offset);
+      loc_address = (htab->root.splt->output_section->vma
+		     + htab->root.splt->output_offset);
       gotpc_offset = gotplt_value - ((loc_address | 3) ^ 3);
 
       /* ADDIUPC has a span of +/-16MB, check we're in range.  */
       if (gotpc_offset + 0x1000000 >= 0x2000000)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"),
 	     output_bfd,
-	     htab->sgotplt->output_section,
-	     htab->splt->output_section,
+	     htab->root.sgotplt->output_section,
+	     htab->root.splt->output_section,
 	     (long) gotpc_offset);
 	  bfd_set_error (bfd_error_no_error);
 	  return FALSE;
@@ -11269,10 +11311,11 @@ mips_vxworks_finish_exec_plt (bfd *outpu
   got_value_low = got_value & 0xffff;
 
   /* Calculate the address of the PLT header.  */
-  plt_address = htab->splt->output_section->vma + htab->splt->output_offset;
+  plt_address = (htab->root.splt->output_section->vma
+		 + htab->root.splt->output_offset);
 
   /* Install the PLT header.  */
-  loc = htab->splt->contents;
+  loc = htab->root.splt->contents;
   bfd_put_32 (output_bfd, plt_entry[0] | got_value_high, loc);
   bfd_put_32 (output_bfd, plt_entry[1] | got_value_low, loc + 4);
   bfd_put_32 (output_bfd, plt_entry[2], loc + 8);
@@ -11333,7 +11376,7 @@ mips_vxworks_finish_shared_plt (bfd *out
   /* We just need to copy the entry byte-by-byte.  */
   for (i = 0; i < ARRAY_SIZE (mips_vxworks_shared_plt0_entry); i++)
     bfd_put_32 (output_bfd, mips_vxworks_shared_plt0_entry[i],
-		htab->splt->contents + i * 4);
+		htab->root.splt->contents + i * 4);
 }
 
 /* Finish up the dynamic sections.  */
@@ -11355,7 +11398,7 @@ _bfd_mips_elf_finish_dynamic_sections (b
 
   sdyn = bfd_get_linker_section (dynobj, ".dynamic");
 
-  sgot = htab->sgot;
+  sgot = htab->root.sgot;
   gg = htab->got_info;
 
   if (elf_hash_table (info)->dynamic_sections_created)
@@ -11403,12 +11446,12 @@ _bfd_mips_elf_finish_dynamic_sections (b
 	      break;
 
 	    case DT_PLTGOT:
-	      s = htab->sgot;
+	      s = htab->root.sgot;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
 	    case DT_MIPS_PLTGOT:
-	      s = htab->sgotplt;
+	      s = htab->root.sgotplt;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      break;
 
@@ -11463,12 +11506,13 @@ _bfd_mips_elf_finish_dynamic_sections (b
 		}
 	      /* In case if we don't have global got symbols we default
 		 to setting DT_MIPS_GOTSYM to the same value as
-		 DT_MIPS_SYMTABNO, so we just fall through.  */
+		 DT_MIPS_SYMTABNO.  */
+	      /* Fall through.  */
 
 	    case DT_MIPS_SYMTABNO:
 	      name = ".dynsym";
 	      elemsize = MIPS_ELF_SYM_SIZE (output_bfd);
-	      s = bfd_get_section_by_name (output_bfd, name);
+	      s = bfd_get_linker_section (dynobj, name);
 
 	      if (s != NULL)
 		dyn.d_un.d_val = s->size / elemsize;
@@ -11515,7 +11559,7 @@ _bfd_mips_elf_finish_dynamic_sections (b
 		/* The MIPS_RLD_MAP_REL tag stores the offset to the debug
 		   pointer, relative to the address of the tag.  */
 		dt_addr = (sdyn->output_section->vma + sdyn->output_offset
-			   + b - sdyn->contents);
+			   + (b - sdyn->contents));
 		rld_addr = (s->output_section->vma + s->output_offset
 			    + h->root.u.def.value);
 		dyn.d_un.d_ptr = rld_addr - dt_addr;
@@ -11528,13 +11572,6 @@ _bfd_mips_elf_finish_dynamic_sections (b
 	      dyn.d_un.d_ptr = s->vma;
 	      break;
 
-	    case DT_RELASZ:
-	      BFD_ASSERT (htab->is_vxworks);
-	      /* The count does not include the JUMP_SLOT relocations.  */
-	      if (htab->srelplt)
-		dyn.d_un.d_val -= htab->srelplt->size;
-	      break;
-
 	    case DT_PLTREL:
 	      BFD_ASSERT (htab->use_plts_and_copy_relocs);
 	      if (htab->is_vxworks)
@@ -11545,13 +11582,13 @@ _bfd_mips_elf_finish_dynamic_sections (b
 
 	    case DT_PLTRELSZ:
 	      BFD_ASSERT (htab->use_plts_and_copy_relocs);
-	      dyn.d_un.d_val = htab->srelplt->size;
+	      dyn.d_un.d_val = htab->root.srelplt->size;
 	      break;
 
 	    case DT_JMPREL:
 	      BFD_ASSERT (htab->use_plts_and_copy_relocs);
-	      dyn.d_un.d_ptr = (htab->srelplt->output_section->vma
-				+ htab->srelplt->output_offset);
+	      dyn.d_un.d_ptr = (htab->root.srelplt->output_section->vma
+				+ htab->root.srelplt->output_offset);
 	      break;
 
 	    case DT_TEXTREL:
@@ -11650,7 +11687,7 @@ _bfd_mips_elf_finish_dynamic_sections (b
 			     sgot->contents
 			     + got_index++ * MIPS_ELF_GOT_SIZE (output_bfd));
 
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    continue;
 
 	  for (; got_index < g->local_gotno; got_index++)
@@ -11782,18 +11819,18 @@ _bfd_mips_elf_finish_dynamic_sections (b
       }
   }
 
-  if (htab->splt && htab->splt->size > 0)
+  if (htab->root.splt && htab->root.splt->size > 0)
     {
       if (htab->is_vxworks)
 	{
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    mips_vxworks_finish_shared_plt (output_bfd, info);
 	  else
 	    mips_vxworks_finish_exec_plt (output_bfd, info);
 	}
       else
 	{
-	  BFD_ASSERT (!info->shared);
+	  BFD_ASSERT (!bfd_link_pic (info));
 	  if (!mips_finish_exec_plt (output_bfd, info))
 	    return FALSE;
 	}
@@ -12398,7 +12435,7 @@ _bfd_mips_elf_gc_sweep_hook (bfd *abfd A
   unsigned long r_symndx;
   struct elf_link_hash_entry *h;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -12929,25 +12966,22 @@ _bfd_elf_mips_get_relocated_section_cont
 	      switch (r)
 		{
 		case bfd_reloc_undefined:
-		  if (!((*link_info->callbacks->undefined_symbol)
-			(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 input_bfd, input_section, (*parent)->address, TRUE)))
-		    goto error_return;
+		  (*link_info->callbacks->undefined_symbol)
+		    (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     input_bfd, input_section, (*parent)->address, TRUE);
 		  break;
 		case bfd_reloc_dangerous:
 		  BFD_ASSERT (error_message != NULL);
-		  if (!((*link_info->callbacks->reloc_dangerous)
-			(link_info, error_message, input_bfd, input_section,
-			 (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_dangerous)
+		    (link_info, error_message,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_overflow:
-		  if (!((*link_info->callbacks->reloc_overflow)
-			(link_info, NULL,
-			 bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 (*parent)->howto->name, (*parent)->addend,
-			 input_bfd, input_section, (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_overflow)
+		    (link_info, NULL,
+		     bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     (*parent)->howto->name, (*parent)->addend,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_outofrange:
 		default:
@@ -13123,9 +13157,8 @@ static const struct opcode_descriptor bz
 
 /* Switch between a 5-bit register index and its 3-bit shorthand.  */
 
-#define BZ16_REG(opcode) ((((((opcode) >> 7) & 7) + 0x1e) & 0x17) + 2)
-#define BZ16_REG_FIELD(r) \
-  (((2 <= (r) && (r) <= 7) ? (r) : ((r) - 16)) << 7)
+#define BZ16_REG(opcode) ((((((opcode) >> 7) & 7) + 0x1e) & 0xf) + 2)
+#define BZ16_REG_FIELD(r) (((r) & 7) << 7)
 
 
 /* 32-bit instructions with a delay slot.  */
@@ -13224,8 +13257,8 @@ static const struct opcode_descriptor ad
 #define MOVE16_RS_FIELD(r) (((r) & 0x1f)     )
 
 static const struct opcode_descriptor move_insns_32[] = {
-  { /* "move",	"d,s",		*/ 0x00000150, 0xffe007ff }, /* addu d,s,$0 */
   { /* "move",	"d,s",		*/ 0x00000290, 0xffe007ff }, /* or   d,s,$0 */
+  { /* "move",	"d,s",		*/ 0x00000150, 0xffe007ff }, /* addu d,s,$0 */
   { 0, 0 }  /* End marker for find_match().  */
 };
 
@@ -13412,7 +13445,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, 
      this section does not have relocs, or if this is not a
      code section.  */
 
-  if (link_info->relocatable
+  if (bfd_link_relocatable (link_info)
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -13917,125 +13950,224 @@ _bfd_mips_elf_use_plts_and_copy_relocs (
 }
 
 /* A function that the linker calls to select between all or only
-   32-bit microMIPS instructions.  */
+   32-bit microMIPS instructions, and between making or ignoring
+   branch relocation checks for invalid transitions between ISA modes.  */
 
 void
-_bfd_mips_elf_insn32 (struct bfd_link_info *info, bfd_boolean on)
+_bfd_mips_elf_linker_flags (struct bfd_link_info *info, bfd_boolean insn32,
+			    bfd_boolean ignore_branch_isa)
 {
-  mips_elf_hash_table (info)->insn32 = on;
+  mips_elf_hash_table (info)->insn32 = insn32;
+  mips_elf_hash_table (info)->ignore_branch_isa = ignore_branch_isa;
 }
 
-/* Return the .MIPS.abiflags value representing each ISA Extension.  */
+/* Structure for saying that BFD machine EXTENSION extends BASE.  */
 
-unsigned int
-bfd_mips_isa_ext (bfd *abfd)
+struct mips_mach_extension
 {
-  switch (bfd_get_mach (abfd))
-    {
-    case bfd_mach_mips3900:
-      return AFL_EXT_3900;
-    case bfd_mach_mips4010:
-      return AFL_EXT_4010;
-    case bfd_mach_mips4100:
-      return AFL_EXT_4100;
-    case bfd_mach_mips4111:
-      return AFL_EXT_4111;
-    case bfd_mach_mips4120:
-      return AFL_EXT_4120;
-    case bfd_mach_mips4650:
-      return AFL_EXT_4650;
-    case bfd_mach_mips5400:
-      return AFL_EXT_5400;
-    case bfd_mach_mips5500:
-      return AFL_EXT_5500;
-    case bfd_mach_mips5900:
-      return AFL_EXT_5900;
-    case bfd_mach_mips10000:
-      return AFL_EXT_10000;
-    case bfd_mach_mips_loongson_2e:
-      return AFL_EXT_LOONGSON_2E;
-    case bfd_mach_mips_loongson_2f:
-      return AFL_EXT_LOONGSON_2F;
-    case bfd_mach_mips_loongson_3a:
-      return AFL_EXT_LOONGSON_3A;
-    case bfd_mach_mips_sb1:
-      return AFL_EXT_SB1;
-    case bfd_mach_mips_octeon:
-      return AFL_EXT_OCTEON;
-    case bfd_mach_mips_octeonp:
-      return AFL_EXT_OCTEONP;
-    case bfd_mach_mips_octeon3:
-      return AFL_EXT_OCTEON3;
-    case bfd_mach_mips_octeon2:
-      return AFL_EXT_OCTEON2;
-    case bfd_mach_mips_xlr:
-      return AFL_EXT_XLR;
-    }
-  return 0;
+  unsigned long extension, base;
+};
+
+
+/* An array describing how BFD machines relate to one another.  The entries
+   are ordered topologically with MIPS I extensions listed last.  */
+
+static const struct mips_mach_extension mips_mach_extensions[] =
+{
+  /* MIPS64r2 extensions.  */
+  { bfd_mach_mips_octeon3, bfd_mach_mips_octeon2 },
+  { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp },
+  { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
+  { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
+  { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
+
+  /* MIPS64 extensions.  */
+  { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
+  { bfd_mach_mips_sb1, bfd_mach_mipsisa64 },
+  { bfd_mach_mips_xlr, bfd_mach_mipsisa64 },
+
+  /* MIPS V extensions.  */
+  { bfd_mach_mipsisa64, bfd_mach_mips5 },
+
+  /* R10000 extensions.  */
+  { bfd_mach_mips12000, bfd_mach_mips10000 },
+  { bfd_mach_mips14000, bfd_mach_mips10000 },
+  { bfd_mach_mips16000, bfd_mach_mips10000 },
+
+  /* R5000 extensions.  Note: the vr5500 ISA is an extension of the core
+     vr5400 ISA, but doesn't include the multimedia stuff.  It seems
+     better to allow vr5400 and vr5500 code to be merged anyway, since
+     many libraries will just use the core ISA.  Perhaps we could add
+     some sort of ASE flag if this ever proves a problem.  */
+  { bfd_mach_mips5500, bfd_mach_mips5400 },
+  { bfd_mach_mips5400, bfd_mach_mips5000 },
+
+  /* MIPS IV extensions.  */
+  { bfd_mach_mips5, bfd_mach_mips8000 },
+  { bfd_mach_mips10000, bfd_mach_mips8000 },
+  { bfd_mach_mips5000, bfd_mach_mips8000 },
+  { bfd_mach_mips7000, bfd_mach_mips8000 },
+  { bfd_mach_mips9000, bfd_mach_mips8000 },
+
+  /* VR4100 extensions.  */
+  { bfd_mach_mips4120, bfd_mach_mips4100 },
+  { bfd_mach_mips4111, bfd_mach_mips4100 },
+
+  /* MIPS III extensions.  */
+  { bfd_mach_mips_loongson_2e, bfd_mach_mips4000 },
+  { bfd_mach_mips_loongson_2f, bfd_mach_mips4000 },
+  { bfd_mach_mips8000, bfd_mach_mips4000 },
+  { bfd_mach_mips4650, bfd_mach_mips4000 },
+  { bfd_mach_mips4600, bfd_mach_mips4000 },
+  { bfd_mach_mips4400, bfd_mach_mips4000 },
+  { bfd_mach_mips4300, bfd_mach_mips4000 },
+  { bfd_mach_mips4100, bfd_mach_mips4000 },
+  { bfd_mach_mips4010, bfd_mach_mips4000 },
+  { bfd_mach_mips5900, bfd_mach_mips4000 },
+
+  /* MIPS32 extensions.  */
+  { bfd_mach_mipsisa32r2, bfd_mach_mipsisa32 },
+
+  /* MIPS II extensions.  */
+  { bfd_mach_mips4000, bfd_mach_mips6000 },
+  { bfd_mach_mipsisa32, bfd_mach_mips6000 },
+
+  /* MIPS I extensions.  */
+  { bfd_mach_mips6000, bfd_mach_mips3000 },
+  { bfd_mach_mips3900, bfd_mach_mips3000 }
+};
+
+/* Return true if bfd machine EXTENSION is an extension of machine BASE.  */
+
+static bfd_boolean
+mips_mach_extends_p (unsigned long base, unsigned long extension)
+{
+  size_t i;
+
+  if (extension == base)
+    return TRUE;
+
+  if (base == bfd_mach_mipsisa32
+      && mips_mach_extends_p (bfd_mach_mipsisa64, extension))
+    return TRUE;
+
+  if (base == bfd_mach_mipsisa32r2
+      && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension))
+    return TRUE;
+
+  for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++)
+    if (extension == mips_mach_extensions[i].extension)
+      {
+	extension = mips_mach_extensions[i].base;
+	if (extension == base)
+	  return TRUE;
+      }
+
+  return FALSE;
+}
+
+/* Return the BFD mach for each .MIPS.abiflags ISA Extension.  */
+
+static unsigned long
+bfd_mips_isa_ext_mach (unsigned int isa_ext)
+{
+  switch (isa_ext)
+    {
+    case AFL_EXT_3900:        return bfd_mach_mips3900;
+    case AFL_EXT_4010:        return bfd_mach_mips4010;
+    case AFL_EXT_4100:        return bfd_mach_mips4100;
+    case AFL_EXT_4111:        return bfd_mach_mips4111;
+    case AFL_EXT_4120:        return bfd_mach_mips4120;
+    case AFL_EXT_4650:        return bfd_mach_mips4650;
+    case AFL_EXT_5400:        return bfd_mach_mips5400;
+    case AFL_EXT_5500:        return bfd_mach_mips5500;
+    case AFL_EXT_5900:        return bfd_mach_mips5900;
+    case AFL_EXT_10000:       return bfd_mach_mips10000;
+    case AFL_EXT_LOONGSON_2E: return bfd_mach_mips_loongson_2e;
+    case AFL_EXT_LOONGSON_2F: return bfd_mach_mips_loongson_2f;
+    case AFL_EXT_LOONGSON_3A: return bfd_mach_mips_loongson_3a;
+    case AFL_EXT_SB1:         return bfd_mach_mips_sb1;
+    case AFL_EXT_OCTEON:      return bfd_mach_mips_octeon;
+    case AFL_EXT_OCTEONP:     return bfd_mach_mips_octeonp;
+    case AFL_EXT_OCTEON2:     return bfd_mach_mips_octeon2;
+    case AFL_EXT_XLR:         return bfd_mach_mips_xlr;
+    default:                  return bfd_mach_mips3000;
+    }
+}
+
+/* Return the .MIPS.abiflags value representing each ISA Extension.  */
+
+unsigned int
+bfd_mips_isa_ext (bfd *abfd)
+{
+  switch (bfd_get_mach (abfd))
+    {
+    case bfd_mach_mips3900:         return AFL_EXT_3900;
+    case bfd_mach_mips4010:         return AFL_EXT_4010;
+    case bfd_mach_mips4100:         return AFL_EXT_4100;
+    case bfd_mach_mips4111:         return AFL_EXT_4111;
+    case bfd_mach_mips4120:         return AFL_EXT_4120;
+    case bfd_mach_mips4650:         return AFL_EXT_4650;
+    case bfd_mach_mips5400:         return AFL_EXT_5400;
+    case bfd_mach_mips5500:         return AFL_EXT_5500;
+    case bfd_mach_mips5900:         return AFL_EXT_5900;
+    case bfd_mach_mips10000:        return AFL_EXT_10000;
+    case bfd_mach_mips_loongson_2e: return AFL_EXT_LOONGSON_2E;
+    case bfd_mach_mips_loongson_2f: return AFL_EXT_LOONGSON_2F;
+    case bfd_mach_mips_loongson_3a: return AFL_EXT_LOONGSON_3A;
+    case bfd_mach_mips_sb1:         return AFL_EXT_SB1;
+    case bfd_mach_mips_octeon:      return AFL_EXT_OCTEON;
+    case bfd_mach_mips_octeonp:     return AFL_EXT_OCTEONP;
+    case bfd_mach_mips_octeon3:     return AFL_EXT_OCTEON3;
+    case bfd_mach_mips_octeon2:     return AFL_EXT_OCTEON2;
+    case bfd_mach_mips_xlr:         return AFL_EXT_XLR;
+    default:                        return 0;
+    }
 }
 
+/* Encode ISA level and revision as a single value.  */
+#define LEVEL_REV(LEV,REV) ((LEV) << 3 | (REV))
+
+/* Decode a single value into level and revision.  */
+#define ISA_LEVEL(LEVREV)  ((LEVREV) >> 3)
+#define ISA_REV(LEVREV)    ((LEVREV) & 0x7)
+
 /* Update the isa_level, isa_rev, isa_ext fields of abiflags.  */
 
 static void
 update_mips_abiflags_isa (bfd *abfd, Elf_Internal_ABIFlags_v0 *abiflags)
 {
+  int new_isa = 0;
   switch (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH)
     {
-    case E_MIPS_ARCH_1:
-      abiflags->isa_level = 1;
-      abiflags->isa_rev = 0;
-      break;
-    case E_MIPS_ARCH_2:
-      abiflags->isa_level = 2;
-      abiflags->isa_rev = 0;
-      break;
-    case E_MIPS_ARCH_3:
-      abiflags->isa_level = 3;
-      abiflags->isa_rev = 0;
-      break;
-    case E_MIPS_ARCH_4:
-      abiflags->isa_level = 4;
-      abiflags->isa_rev = 0;
-      break;
-    case E_MIPS_ARCH_5:
-      abiflags->isa_level = 5;
-      abiflags->isa_rev = 0;
-      break;
-    case E_MIPS_ARCH_32:
-      abiflags->isa_level = 32;
-      abiflags->isa_rev = 1;
-      break;
-    case E_MIPS_ARCH_32R2:
-      abiflags->isa_level = 32;
-      /* Handle MIPS32r3 and MIPS32r5 which do not have a header flag.  */
-      if (abiflags->isa_rev < 2)
-	abiflags->isa_rev = 2;
-      break;
-    case E_MIPS_ARCH_32R6:
-      abiflags->isa_level = 32;
-      abiflags->isa_rev = 6;
-      break;
-    case E_MIPS_ARCH_64:
-      abiflags->isa_level = 64;
-      abiflags->isa_rev = 1;
-      break;
-    case E_MIPS_ARCH_64R2:
-      /* Handle MIPS64r3 and MIPS64r5 which do not have a header flag.  */
-      abiflags->isa_level = 64;
-      if (abiflags->isa_rev < 2)
-	abiflags->isa_rev = 2;
-      break;
-    case E_MIPS_ARCH_64R6:
-      abiflags->isa_level = 64;
-      abiflags->isa_rev = 6;
-      break;
+    case E_MIPS_ARCH_1:    new_isa = LEVEL_REV (1, 0); break;
+    case E_MIPS_ARCH_2:    new_isa = LEVEL_REV (2, 0); break;
+    case E_MIPS_ARCH_3:    new_isa = LEVEL_REV (3, 0); break;
+    case E_MIPS_ARCH_4:    new_isa = LEVEL_REV (4, 0); break;
+    case E_MIPS_ARCH_5:    new_isa = LEVEL_REV (5, 0); break;
+    case E_MIPS_ARCH_32:   new_isa = LEVEL_REV (32, 1); break;
+    case E_MIPS_ARCH_32R2: new_isa = LEVEL_REV (32, 2); break;
+    case E_MIPS_ARCH_32R6: new_isa = LEVEL_REV (32, 6); break;
+    case E_MIPS_ARCH_64:   new_isa = LEVEL_REV (64, 1); break;
+    case E_MIPS_ARCH_64R2: new_isa = LEVEL_REV (64, 2); break;
+    case E_MIPS_ARCH_64R6: new_isa = LEVEL_REV (64, 6); break;
     default:
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: Unknown architecture %s"),
 	 abfd, bfd_printable_name (abfd));
     }
 
-  abiflags->isa_ext = bfd_mips_isa_ext (abfd);
+  if (new_isa > LEVEL_REV (abiflags->isa_level, abiflags->isa_rev))
+    {
+      abiflags->isa_level = ISA_LEVEL (new_isa);
+      abiflags->isa_rev = ISA_REV (new_isa);
+    }
+
+  /* Update the isa_ext if ABFD describes a further extension.  */
+  if (mips_mach_extends_p (bfd_mips_isa_ext_mach (abiflags->isa_ext),
+			   bfd_get_mach (abfd)))
+    abiflags->isa_ext = bfd_mips_isa_ext (abfd);
 }
 
 /* Return true if the given ELF header flags describe a 32-bit binary.  */
@@ -14169,7 +14301,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
 	elf_gp (abfd) = (h->u.def.section->output_section->vma
 			 + h->u.def.section->output_offset
 			 + h->u.def.value);
-      else if (info->relocatable)
+      else if (bfd_link_relocatable (info))
 	{
 	  bfd_vma lo = MINUS_ONE;
 
@@ -14455,7 +14587,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
 	      input_section->flags &= ~SEC_HAS_CONTENTS;
 	    }
 
-	  if (SGI_COMPAT (abfd) && info->shared)
+	  if (SGI_COMPAT (abfd) && bfd_link_pic (info))
 	    {
 	      /* Create .rtproc section.  */
 	      rtproc_sec = bfd_get_linker_section (abfd, ".rtproc");
@@ -14511,7 +14643,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
 	     information describing how the small data area would
 	     change depending upon the -G switch.  These sections
 	     not used in executables files.  */
-	  if (! info->relocatable)
+	  if (! bfd_link_relocatable (info))
 	    {
 	      for (p = o->map_head.link_order; p != NULL; p = p->next)
 		{
@@ -14550,7 +14682,8 @@ _bfd_mips_elf_final_link (bfd *abfd, str
 	    gptab_bss_sec = o;
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: illegal section name `%s'"),
 		 bfd_get_filename (abfd), o->name);
 	      bfd_set_error (bfd_error_nonrepresentable_section);
@@ -14785,118 +14918,212 @@ _bfd_mips_elf_final_link (bfd *abfd, str
   return TRUE;
 }
 
-/* Structure for saying that BFD machine EXTENSION extends BASE.  */
+/* Merge object file header flags from IBFD into OBFD.  Raise an error
+   if there are conflicting settings.  */
 
-struct mips_mach_extension
+static bfd_boolean
+mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
 {
-  unsigned long extension, base;
-};
+  bfd *obfd = info->output_bfd;
+  struct mips_elf_obj_tdata *out_tdata = mips_elf_tdata (obfd);
+  flagword old_flags;
+  flagword new_flags;
+  bfd_boolean ok;
 
+  new_flags = elf_elfheader (ibfd)->e_flags;
+  elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_NOREORDER;
+  old_flags = elf_elfheader (obfd)->e_flags;
 
-/* An array describing how BFD machines relate to one another.  The entries
-   are ordered topologically with MIPS I extensions listed last.  */
+  /* Check flag compatibility.  */
 
-static const struct mips_mach_extension mips_mach_extensions[] =
-{
-  /* MIPS64r2 extensions.  */
-  { bfd_mach_mips_octeon3, bfd_mach_mips_octeon2 },
-  { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp },
-  { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
-  { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
-  { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
+  new_flags &= ~EF_MIPS_NOREORDER;
+  old_flags &= ~EF_MIPS_NOREORDER;
 
-  /* MIPS64 extensions.  */
-  { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
-  { bfd_mach_mips_sb1, bfd_mach_mipsisa64 },
-  { bfd_mach_mips_xlr, bfd_mach_mipsisa64 },
+  /* Some IRIX 6 BSD-compatibility objects have this bit set.  It
+     doesn't seem to matter.  */
+  new_flags &= ~EF_MIPS_XGOT;
+  old_flags &= ~EF_MIPS_XGOT;
 
-  /* MIPS V extensions.  */
-  { bfd_mach_mipsisa64, bfd_mach_mips5 },
+  /* MIPSpro generates ucode info in n64 objects.  Again, we should
+     just be able to ignore this.  */
+  new_flags &= ~EF_MIPS_UCODE;
+  old_flags &= ~EF_MIPS_UCODE;
 
-  /* R10000 extensions.  */
-  { bfd_mach_mips12000, bfd_mach_mips10000 },
-  { bfd_mach_mips14000, bfd_mach_mips10000 },
-  { bfd_mach_mips16000, bfd_mach_mips10000 },
+  /* DSOs should only be linked with CPIC code.  */
+  if ((ibfd->flags & DYNAMIC) != 0)
+    new_flags |= EF_MIPS_PIC | EF_MIPS_CPIC;
 
-  /* R5000 extensions.  Note: the vr5500 ISA is an extension of the core
-     vr5400 ISA, but doesn't include the multimedia stuff.  It seems
-     better to allow vr5400 and vr5500 code to be merged anyway, since
-     many libraries will just use the core ISA.  Perhaps we could add
-     some sort of ASE flag if this ever proves a problem.  */
-  { bfd_mach_mips5500, bfd_mach_mips5400 },
-  { bfd_mach_mips5400, bfd_mach_mips5000 },
+  if (new_flags == old_flags)
+    return TRUE;
 
-  /* MIPS IV extensions.  */
-  { bfd_mach_mips5, bfd_mach_mips8000 },
-  { bfd_mach_mips10000, bfd_mach_mips8000 },
-  { bfd_mach_mips5000, bfd_mach_mips8000 },
-  { bfd_mach_mips7000, bfd_mach_mips8000 },
-  { bfd_mach_mips9000, bfd_mach_mips8000 },
+  ok = TRUE;
 
-  /* VR4100 extensions.  */
-  { bfd_mach_mips4120, bfd_mach_mips4100 },
-  { bfd_mach_mips4111, bfd_mach_mips4100 },
+  if (((new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0)
+      != ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
+    {
+      _bfd_error_handler
+	(_("%B: warning: linking abicalls files with non-abicalls files"),
+	 ibfd);
+      ok = TRUE;
+    }
 
-  /* MIPS III extensions.  */
-  { bfd_mach_mips_loongson_2e, bfd_mach_mips4000 },
-  { bfd_mach_mips_loongson_2f, bfd_mach_mips4000 },
-  { bfd_mach_mips8000, bfd_mach_mips4000 },
-  { bfd_mach_mips4650, bfd_mach_mips4000 },
-  { bfd_mach_mips4600, bfd_mach_mips4000 },
-  { bfd_mach_mips4400, bfd_mach_mips4000 },
-  { bfd_mach_mips4300, bfd_mach_mips4000 },
-  { bfd_mach_mips4100, bfd_mach_mips4000 },
-  { bfd_mach_mips4010, bfd_mach_mips4000 },
-  { bfd_mach_mips5900, bfd_mach_mips4000 },
+  if (new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC))
+    elf_elfheader (obfd)->e_flags |= EF_MIPS_CPIC;
+  if (! (new_flags & EF_MIPS_PIC))
+    elf_elfheader (obfd)->e_flags &= ~EF_MIPS_PIC;
 
-  /* MIPS32 extensions.  */
-  { bfd_mach_mipsisa32r2, bfd_mach_mipsisa32 },
+  new_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
+  old_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
 
-  /* MIPS II extensions.  */
-  { bfd_mach_mips4000, bfd_mach_mips6000 },
-  { bfd_mach_mipsisa32, bfd_mach_mips6000 },
+  /* Compare the ISAs.  */
+  if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
+    {
+      _bfd_error_handler
+	(_("%B: linking 32-bit code with 64-bit code"),
+	 ibfd);
+      ok = FALSE;
+    }
+  else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
+    {
+      /* OBFD's ISA isn't the same as, or an extension of, IBFD's.  */
+      if (mips_mach_extends_p (bfd_get_mach (obfd), bfd_get_mach (ibfd)))
+	{
+	  /* Copy the architecture info from IBFD to OBFD.  Also copy
+	     the 32-bit flag (if set) so that we continue to recognise
+	     OBFD as a 32-bit binary.  */
+	  bfd_set_arch_info (obfd, bfd_get_arch_info (ibfd));
+	  elf_elfheader (obfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
+	  elf_elfheader (obfd)->e_flags
+	    |= new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
 
-  /* MIPS I extensions.  */
-  { bfd_mach_mips6000, bfd_mach_mips3000 },
-  { bfd_mach_mips3900, bfd_mach_mips3000 }
-};
+	  /* Update the ABI flags isa_level, isa_rev, isa_ext fields.  */
+	  update_mips_abiflags_isa (obfd, &out_tdata->abiflags);
 
+	  /* Copy across the ABI flags if OBFD doesn't use them
+	     and if that was what caused us to treat IBFD as 32-bit.  */
+	  if ((old_flags & EF_MIPS_ABI) == 0
+	      && mips_32bit_flags_p (new_flags)
+	      && !mips_32bit_flags_p (new_flags & ~EF_MIPS_ABI))
+	    elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ABI;
+	}
+      else
+	{
+	  /* The ISAs aren't compatible.  */
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: linking %s module with previous %s modules"),
+	     ibfd,
+	     bfd_printable_name (ibfd),
+	     bfd_printable_name (obfd));
+	  ok = FALSE;
+	}
+    }
 
-/* Return true if bfd machine EXTENSION is an extension of machine BASE.  */
+  new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
+  old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
 
-static bfd_boolean
-mips_mach_extends_p (unsigned long base, unsigned long extension)
-{
-  size_t i;
+  /* Compare ABIs.  The 64-bit ABI does not use EF_MIPS_ABI.  But, it
+     does set EI_CLASS differently from any 32-bit ABI.  */
+  if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
+      || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+	  != elf_elfheader (obfd)->e_ident[EI_CLASS]))
+    {
+      /* Only error if both are set (to different values).  */
+      if (((new_flags & EF_MIPS_ABI) && (old_flags & EF_MIPS_ABI))
+	  || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+	      != elf_elfheader (obfd)->e_ident[EI_CLASS]))
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: ABI mismatch: linking %s module with previous %s modules"),
+	     ibfd,
+	     elf_mips_abi_name (ibfd),
+	     elf_mips_abi_name (obfd));
+	  ok = FALSE;
+	}
+      new_flags &= ~EF_MIPS_ABI;
+      old_flags &= ~EF_MIPS_ABI;
+    }
 
-  if (extension == base)
-    return TRUE;
+  /* Compare ASEs.  Forbid linking MIPS16 and microMIPS ASE modules together
+     and allow arbitrary mixing of the remaining ASEs (retain the union).  */
+  if ((new_flags & EF_MIPS_ARCH_ASE) != (old_flags & EF_MIPS_ARCH_ASE))
+    {
+      int old_micro = old_flags & EF_MIPS_ARCH_ASE_MICROMIPS;
+      int new_micro = new_flags & EF_MIPS_ARCH_ASE_MICROMIPS;
+      int old_m16 = old_flags & EF_MIPS_ARCH_ASE_M16;
+      int new_m16 = new_flags & EF_MIPS_ARCH_ASE_M16;
+      int micro_mis = old_m16 && new_micro;
+      int m16_mis = old_micro && new_m16;
 
-  if (base == bfd_mach_mipsisa32
-      && mips_mach_extends_p (bfd_mach_mipsisa64, extension))
-    return TRUE;
+      if (m16_mis || micro_mis)
+	{
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("%B: ASE mismatch: linking %s module with previous %s modules"),
+	     ibfd,
+	     m16_mis ? "MIPS16" : "microMIPS",
+	     m16_mis ? "microMIPS" : "MIPS16");
+	  ok = FALSE;
+	}
+
+      elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ARCH_ASE;
+
+      new_flags &= ~ EF_MIPS_ARCH_ASE;
+      old_flags &= ~ EF_MIPS_ARCH_ASE;
+    }
+
+  /* Compare NaN encodings.  */
+  if ((new_flags & EF_MIPS_NAN2008) != (old_flags & EF_MIPS_NAN2008))
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
+			  ibfd,
+			  (new_flags & EF_MIPS_NAN2008
+			   ? "-mnan=2008" : "-mnan=legacy"),
+			  (old_flags & EF_MIPS_NAN2008
+			   ? "-mnan=2008" : "-mnan=legacy"));
+      ok = FALSE;
+      new_flags &= ~EF_MIPS_NAN2008;
+      old_flags &= ~EF_MIPS_NAN2008;
+    }
 
-  if (base == bfd_mach_mipsisa32r2
-      && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension))
-    return TRUE;
+  /* Compare FP64 state.  */
+  if ((new_flags & EF_MIPS_FP64) != (old_flags & EF_MIPS_FP64))
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
+			  ibfd,
+			  (new_flags & EF_MIPS_FP64
+			   ? "-mfp64" : "-mfp32"),
+			  (old_flags & EF_MIPS_FP64
+			   ? "-mfp64" : "-mfp32"));
+      ok = FALSE;
+      new_flags &= ~EF_MIPS_FP64;
+      old_flags &= ~EF_MIPS_FP64;
+    }
 
-  for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++)
-    if (extension == mips_mach_extensions[i].extension)
-      {
-	extension = mips_mach_extensions[i].base;
-	if (extension == base)
-	  return TRUE;
-      }
+  /* Warn about any other mismatches */
+  if (new_flags != old_flags)
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler
+	(_("%B: uses different e_flags (0x%lx) fields than previous modules "
+	   "(0x%lx)"),
+	 ibfd, (unsigned long) new_flags,
+	 (unsigned long) old_flags);
+      ok = FALSE;
+    }
 
-  return FALSE;
+  return ok;
 }
 
-
 /* Merge object attributes from IBFD into OBFD.  Raise an error if
    there are conflicting attributes.  */
 static bfd_boolean
-mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   bfd *abi_fp_bfd;
@@ -14966,17 +15193,20 @@ mips_elf_merge_obj_attributes (bfd *ibfd
 	  in_string = _bfd_mips_fp_abi_string (in_fp);
 	  /* First warn about cases involving unrecognised ABIs.  */
 	  if (!out_string && !in_string)
+	    /* xgettext:c-format */
 	    _bfd_error_handler
 	      (_("Warning: %B uses unknown floating point ABI %d "
 		 "(set by %B), %B uses unknown floating point ABI %d"),
 	       obfd, abi_fp_bfd, ibfd, out_fp, in_fp);
 	  else if (!out_string)
 	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("Warning: %B uses unknown floating point ABI %d "
 		 "(set by %B), %B uses %s"),
 	       obfd, abi_fp_bfd, ibfd, out_fp, in_string);
 	  else if (!in_string)
 	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("Warning: %B uses %s (set by %B), "
 		 "%B uses unknown floating point ABI %d"),
 	       obfd, abi_fp_bfd, ibfd, out_string, in_fp);
@@ -14990,6 +15220,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd
 	      else if (out_fp == Val_GNU_MIPS_ABI_FP_SOFT)
 		in_string = "-mhard-float";
 	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("Warning: %B uses %s (set by %B), %B uses %s"),
 		 obfd, abi_fp_bfd, ibfd, out_string, in_string);
 	    }
@@ -15008,6 +15239,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd
 	  {
 	  case Val_GNU_MIPS_ABI_MSA_128:
 	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("Warning: %B uses %s (set by %B), "
 		 "%B uses unknown MSA ABI %d"),
 	       obfd, abi_msa_bfd, ibfd,
@@ -15019,6 +15251,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd
 	      {
 	      case Val_GNU_MIPS_ABI_MSA_128:
 		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("Warning: %B uses unknown MSA ABI %d "
 		     "(set by %B), %B uses %s"),
 		     obfd, abi_msa_bfd, ibfd,
@@ -15027,6 +15260,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd
 
 	      default:
 		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("Warning: %B uses unknown MSA ABI %d "
 		     "(set by %B), %B uses unknown MSA ABI %d"),
 		   obfd, abi_msa_bfd, ibfd,
@@ -15038,7 +15272,37 @@ mips_elf_merge_obj_attributes (bfd *ibfd
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  return _bfd_elf_merge_object_attributes (ibfd, info);
+}
+
+/* Merge object ABI flags from IBFD into OBFD.  Raise an error if
+   there are conflicting settings.  */
+
+static bfd_boolean
+mips_elf_merge_obj_abiflags (bfd *ibfd, bfd *obfd)
+{
+  obj_attribute *out_attr = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
+  struct mips_elf_obj_tdata *out_tdata = mips_elf_tdata (obfd);
+  struct mips_elf_obj_tdata *in_tdata = mips_elf_tdata (ibfd);
+
+  /* Update the output abiflags fp_abi using the computed fp_abi.  */
+  out_tdata->abiflags.fp_abi = out_attr[Tag_GNU_MIPS_ABI_FP].i;
+
+#define max(a, b) ((a) > (b) ? (a) : (b))
+  /* Merge abiflags.  */
+  out_tdata->abiflags.isa_level = max (out_tdata->abiflags.isa_level,
+				       in_tdata->abiflags.isa_level);
+  out_tdata->abiflags.isa_rev = max (out_tdata->abiflags.isa_rev,
+				     in_tdata->abiflags.isa_rev);
+  out_tdata->abiflags.gpr_size = max (out_tdata->abiflags.gpr_size,
+				      in_tdata->abiflags.gpr_size);
+  out_tdata->abiflags.cpr1_size = max (out_tdata->abiflags.cpr1_size,
+				       in_tdata->abiflags.cpr1_size);
+  out_tdata->abiflags.cpr2_size = max (out_tdata->abiflags.cpr2_size,
+				       in_tdata->abiflags.cpr2_size);
+#undef max
+  out_tdata->abiflags.ases |= in_tdata->abiflags.ases;
+  out_tdata->abiflags.flags1 |= in_tdata->abiflags.flags1;
 
   return TRUE;
 }
@@ -15047,19 +15311,19 @@ mips_elf_merge_obj_attributes (bfd *ibfd
    object file when linking.  */
 
 bfd_boolean
-_bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
-  flagword old_flags;
-  flagword new_flags;
-  bfd_boolean ok;
+  bfd *obfd = info->output_bfd;
+  struct mips_elf_obj_tdata *out_tdata;
+  struct mips_elf_obj_tdata *in_tdata;
   bfd_boolean null_input_bfd = TRUE;
   asection *sec;
-  obj_attribute *out_attr;
+  bfd_boolean ok;
 
   /* Check if we have the same endianness.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: endianness incompatible with that of the selected emulation"),
 	 ibfd);
       return FALSE;
@@ -15068,30 +15332,20 @@ _bfd_mips_elf_merge_private_bfd_data (bf
   if (!is_mips_elf (ibfd) || !is_mips_elf (obfd))
     return TRUE;
 
+  in_tdata = mips_elf_tdata (ibfd);
+  out_tdata = mips_elf_tdata (obfd);
+
   if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: ABI is incompatible with that of the selected emulation"),
 	 ibfd);
       return FALSE;
     }
 
-  /* Set up the FP ABI attribute from the abiflags if it is not already
-     set.  */
-  if (mips_elf_tdata (ibfd)->abiflags_valid)
-    {
-      obj_attribute *in_attr = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
-      if (in_attr[Tag_GNU_MIPS_ABI_FP].i == Val_GNU_MIPS_ABI_FP_ANY)
-        in_attr[Tag_GNU_MIPS_ABI_FP].i =
-	  mips_elf_tdata (ibfd)->abiflags.fp_abi;
-    }
-
-  if (!mips_elf_merge_obj_attributes (ibfd, obfd))
-    return FALSE;
-
-  /* Check to see if the input BFD actually contains any sections.
-     If not, its flags may not have been initialised either, but it cannot
-     actually cause any incompatibility.  */
+  /* Check to see if the input BFD actually contains any sections.  If not,
+     then it has no attributes, and its flags may not have been initialized
+     either, but it cannot actually cause any incompatibility.  */
   for (sec = ibfd->sections; sec != NULL; sec = sec->next)
     {
       /* Ignore synthetic sections and empty .text, .data and .bss sections
@@ -15114,54 +15368,63 @@ _bfd_mips_elf_merge_private_bfd_data (bf
     return TRUE;
 
   /* Populate abiflags using existing information.  */
-  if (!mips_elf_tdata (ibfd)->abiflags_valid)
+  if (in_tdata->abiflags_valid)
     {
-      infer_mips_abiflags (ibfd, &mips_elf_tdata (ibfd)->abiflags);
-      mips_elf_tdata (ibfd)->abiflags_valid = TRUE;
-    }
-  else
-    {
-      Elf_Internal_ABIFlags_v0 abiflags;
+      obj_attribute *in_attr = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
       Elf_Internal_ABIFlags_v0 in_abiflags;
+      Elf_Internal_ABIFlags_v0 abiflags;
+
+      /* Set up the FP ABI attribute from the abiflags if it is not already
+         set.  */
+      if (in_attr[Tag_GNU_MIPS_ABI_FP].i == Val_GNU_MIPS_ABI_FP_ANY)
+        in_attr[Tag_GNU_MIPS_ABI_FP].i = in_tdata->abiflags.fp_abi;
+
       infer_mips_abiflags (ibfd, &abiflags);
-      in_abiflags = mips_elf_tdata (ibfd)->abiflags;
+      in_abiflags = in_tdata->abiflags;
 
       /* It is not possible to infer the correct ISA revision
          for R3 or R5 so drop down to R2 for the checks.  */
       if (in_abiflags.isa_rev == 3 || in_abiflags.isa_rev == 5)
 	in_abiflags.isa_rev = 2;
 
-      if (in_abiflags.isa_level != abiflags.isa_level
-	  || in_abiflags.isa_rev != abiflags.isa_rev
-	  || in_abiflags.isa_ext != abiflags.isa_ext)
-	(*_bfd_error_handler)
+      if (LEVEL_REV (in_abiflags.isa_level, in_abiflags.isa_rev)
+	  < LEVEL_REV (abiflags.isa_level, abiflags.isa_rev))
+	_bfd_error_handler
 	  (_("%B: warning: Inconsistent ISA between e_flags and "
 	     ".MIPS.abiflags"), ibfd);
       if (abiflags.fp_abi != Val_GNU_MIPS_ABI_FP_ANY
 	  && in_abiflags.fp_abi != abiflags.fp_abi)
-	(*_bfd_error_handler)
-	  (_("%B: warning: Inconsistent FP ABI between e_flags and "
+	_bfd_error_handler
+	  (_("%B: warning: Inconsistent FP ABI between .gnu.attributes and "
 	     ".MIPS.abiflags"), ibfd);
       if ((in_abiflags.ases & abiflags.ases) != abiflags.ases)
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%B: warning: Inconsistent ASEs between e_flags and "
 	     ".MIPS.abiflags"), ibfd);
-      if (in_abiflags.isa_ext != abiflags.isa_ext)
-	(*_bfd_error_handler)
+      /* The isa_ext is allowed to be an extension of what can be inferred
+	 from e_flags.  */
+      if (!mips_mach_extends_p (bfd_mips_isa_ext_mach (abiflags.isa_ext),
+				bfd_mips_isa_ext_mach (in_abiflags.isa_ext)))
+	_bfd_error_handler
 	  (_("%B: warning: Inconsistent ISA extensions between e_flags and "
 	     ".MIPS.abiflags"), ibfd);
       if (in_abiflags.flags2 != 0)
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("%B: warning: Unexpected flag in the flags2 field of "
 	     ".MIPS.abiflags (0x%lx)"), ibfd,
 	   (unsigned long) in_abiflags.flags2);
     }
+  else
+    {
+      infer_mips_abiflags (ibfd, &in_tdata->abiflags);
+      in_tdata->abiflags_valid = TRUE;
+    }
 
-  if (!mips_elf_tdata (obfd)->abiflags_valid)
+  if (!out_tdata->abiflags_valid)
     {
       /* Copy input abiflags if output abiflags are not already valid.  */
-      mips_elf_tdata (obfd)->abiflags = mips_elf_tdata (ibfd)->abiflags;
-      mips_elf_tdata (obfd)->abiflags_valid = TRUE;
+      out_tdata->abiflags = in_tdata->abiflags;
+      out_tdata->abiflags_valid = TRUE;
     }
 
   if (! elf_flags_init (obfd))
@@ -15181,215 +15444,19 @@ _bfd_mips_elf_merge_private_bfd_data (bf
 	    return FALSE;
 
 	  /* Update the ABI flags isa_level, isa_rev and isa_ext fields.  */
-	  update_mips_abiflags_isa (obfd, &mips_elf_tdata (obfd)->abiflags);
+	  update_mips_abiflags_isa (obfd, &out_tdata->abiflags);
 	}
 
-      return TRUE;
-    }
-
-  /* Update the output abiflags fp_abi using the computed fp_abi.  */
-  out_attr = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
-  mips_elf_tdata (obfd)->abiflags.fp_abi = out_attr[Tag_GNU_MIPS_ABI_FP].i;
-
-#define max(a,b) ((a) > (b) ? (a) : (b))
-  /* Merge abiflags.  */
-  mips_elf_tdata (obfd)->abiflags.isa_rev
-    = max (mips_elf_tdata (obfd)->abiflags.isa_rev,
-	   mips_elf_tdata (ibfd)->abiflags.isa_rev);
-  mips_elf_tdata (obfd)->abiflags.gpr_size
-    = max (mips_elf_tdata (obfd)->abiflags.gpr_size,
-	   mips_elf_tdata (ibfd)->abiflags.gpr_size);
-  mips_elf_tdata (obfd)->abiflags.cpr1_size
-    = max (mips_elf_tdata (obfd)->abiflags.cpr1_size,
-	   mips_elf_tdata (ibfd)->abiflags.cpr1_size);
-  mips_elf_tdata (obfd)->abiflags.cpr2_size
-    = max (mips_elf_tdata (obfd)->abiflags.cpr2_size,
-	   mips_elf_tdata (ibfd)->abiflags.cpr2_size);
-#undef max
-  mips_elf_tdata (obfd)->abiflags.ases
-    |= mips_elf_tdata (ibfd)->abiflags.ases;
-  mips_elf_tdata (obfd)->abiflags.flags1
-    |= mips_elf_tdata (ibfd)->abiflags.flags1;
-
-  new_flags = elf_elfheader (ibfd)->e_flags;
-  elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_NOREORDER;
-  old_flags = elf_elfheader (obfd)->e_flags;
-
-  /* Check flag compatibility.  */
-
-  new_flags &= ~EF_MIPS_NOREORDER;
-  old_flags &= ~EF_MIPS_NOREORDER;
-
-  /* Some IRIX 6 BSD-compatibility objects have this bit set.  It
-     doesn't seem to matter.  */
-  new_flags &= ~EF_MIPS_XGOT;
-  old_flags &= ~EF_MIPS_XGOT;
-
-  /* MIPSpro generates ucode info in n64 objects.  Again, we should
-     just be able to ignore this.  */
-  new_flags &= ~EF_MIPS_UCODE;
-  old_flags &= ~EF_MIPS_UCODE;
-
-  /* DSOs should only be linked with CPIC code.  */
-  if ((ibfd->flags & DYNAMIC) != 0)
-    new_flags |= EF_MIPS_PIC | EF_MIPS_CPIC;
-
-  if (new_flags == old_flags)
-    return TRUE;
-
-  ok = TRUE;
-
-  if (((new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0)
-      != ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
-    {
-      (*_bfd_error_handler)
-	(_("%B: warning: linking abicalls files with non-abicalls files"),
-	 ibfd);
       ok = TRUE;
     }
+  else
+    ok = mips_elf_merge_obj_e_flags (ibfd, info);
 
-  if (new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC))
-    elf_elfheader (obfd)->e_flags |= EF_MIPS_CPIC;
-  if (! (new_flags & EF_MIPS_PIC))
-    elf_elfheader (obfd)->e_flags &= ~EF_MIPS_PIC;
-
-  new_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
-  old_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
-
-  /* Compare the ISAs.  */
-  if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
-    {
-      (*_bfd_error_handler)
-	(_("%B: linking 32-bit code with 64-bit code"),
-	 ibfd);
-      ok = FALSE;
-    }
-  else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
-    {
-      /* OBFD's ISA isn't the same as, or an extension of, IBFD's.  */
-      if (mips_mach_extends_p (bfd_get_mach (obfd), bfd_get_mach (ibfd)))
-	{
-	  /* Copy the architecture info from IBFD to OBFD.  Also copy
-	     the 32-bit flag (if set) so that we continue to recognise
-	     OBFD as a 32-bit binary.  */
-	  bfd_set_arch_info (obfd, bfd_get_arch_info (ibfd));
-	  elf_elfheader (obfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
-	  elf_elfheader (obfd)->e_flags
-	    |= new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
-
-	  /* Update the ABI flags isa_level, isa_rev, isa_ext fields.  */
-	  update_mips_abiflags_isa (obfd, &mips_elf_tdata (obfd)->abiflags);
-
-	  /* Copy across the ABI flags if OBFD doesn't use them
-	     and if that was what caused us to treat IBFD as 32-bit.  */
-	  if ((old_flags & EF_MIPS_ABI) == 0
-	      && mips_32bit_flags_p (new_flags)
-	      && !mips_32bit_flags_p (new_flags & ~EF_MIPS_ABI))
-	    elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ABI;
-	}
-      else
-	{
-	  /* The ISAs aren't compatible.  */
-	  (*_bfd_error_handler)
-	    (_("%B: linking %s module with previous %s modules"),
-	     ibfd,
-	     bfd_printable_name (ibfd),
-	     bfd_printable_name (obfd));
-	  ok = FALSE;
-	}
-    }
-
-  new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
-  old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
-
-  /* Compare ABIs.  The 64-bit ABI does not use EF_MIPS_ABI.  But, it
-     does set EI_CLASS differently from any 32-bit ABI.  */
-  if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
-      || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
-	  != elf_elfheader (obfd)->e_ident[EI_CLASS]))
-    {
-      /* Only error if both are set (to different values).  */
-      if (((new_flags & EF_MIPS_ABI) && (old_flags & EF_MIPS_ABI))
-	  || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
-	      != elf_elfheader (obfd)->e_ident[EI_CLASS]))
-	{
-	  (*_bfd_error_handler)
-	    (_("%B: ABI mismatch: linking %s module with previous %s modules"),
-	     ibfd,
-	     elf_mips_abi_name (ibfd),
-	     elf_mips_abi_name (obfd));
-	  ok = FALSE;
-	}
-      new_flags &= ~EF_MIPS_ABI;
-      old_flags &= ~EF_MIPS_ABI;
-    }
-
-  /* Compare ASEs.  Forbid linking MIPS16 and microMIPS ASE modules together
-     and allow arbitrary mixing of the remaining ASEs (retain the union).  */
-  if ((new_flags & EF_MIPS_ARCH_ASE) != (old_flags & EF_MIPS_ARCH_ASE))
-    {
-      int old_micro = old_flags & EF_MIPS_ARCH_ASE_MICROMIPS;
-      int new_micro = new_flags & EF_MIPS_ARCH_ASE_MICROMIPS;
-      int old_m16 = old_flags & EF_MIPS_ARCH_ASE_M16;
-      int new_m16 = new_flags & EF_MIPS_ARCH_ASE_M16;
-      int micro_mis = old_m16 && new_micro;
-      int m16_mis = old_micro && new_m16;
-
-      if (m16_mis || micro_mis)
-	{
-	  (*_bfd_error_handler)
-	    (_("%B: ASE mismatch: linking %s module with previous %s modules"),
-	     ibfd,
-	     m16_mis ? "MIPS16" : "microMIPS",
-	     m16_mis ? "microMIPS" : "MIPS16");
-	  ok = FALSE;
-	}
-
-      elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ARCH_ASE;
-
-      new_flags &= ~ EF_MIPS_ARCH_ASE;
-      old_flags &= ~ EF_MIPS_ARCH_ASE;
-    }
-
-  /* Compare NaN encodings.  */
-  if ((new_flags & EF_MIPS_NAN2008) != (old_flags & EF_MIPS_NAN2008))
-    {
-      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
-			  ibfd,
-			  (new_flags & EF_MIPS_NAN2008
-			   ? "-mnan=2008" : "-mnan=legacy"),
-			  (old_flags & EF_MIPS_NAN2008
-			   ? "-mnan=2008" : "-mnan=legacy"));
-      ok = FALSE;
-      new_flags &= ~EF_MIPS_NAN2008;
-      old_flags &= ~EF_MIPS_NAN2008;
-    }
-
-  /* Compare FP64 state.  */
-  if ((new_flags & EF_MIPS_FP64) != (old_flags & EF_MIPS_FP64))
-    {
-      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
-			  ibfd,
-			  (new_flags & EF_MIPS_FP64
-			   ? "-mfp64" : "-mfp32"),
-			  (old_flags & EF_MIPS_FP64
-			   ? "-mfp64" : "-mfp32"));
-      ok = FALSE;
-      new_flags &= ~EF_MIPS_FP64;
-      old_flags &= ~EF_MIPS_FP64;
-    }
+  ok = mips_elf_merge_obj_attributes (ibfd, info) && ok;
 
-  /* Warn about any other mismatches */
-  if (new_flags != old_flags)
-    {
-      (*_bfd_error_handler)
-	(_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	 ibfd, (unsigned long) new_flags,
-	 (unsigned long) old_flags);
-      ok = FALSE;
-    }
+  ok = mips_elf_merge_obj_abiflags (ibfd, obfd) && ok;
 
-  if (! ok)
+  if (!ok)
     {
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
@@ -15555,6 +15622,8 @@ print_mips_ases (FILE *file, unsigned in
     fputs ("\n\tDSP ASE", file);
   if (mask & AFL_ASE_DSPR2)
     fputs ("\n\tDSP R2 ASE", file);
+  if (mask & AFL_ASE_DSPR3)
+    fputs ("\n\tDSP R3 ASE", file);
   if (mask & AFL_ASE_EVA)
     fputs ("\n\tEnhanced VA Scheme", file);
   if (mask & AFL_ASE_MCU)
@@ -16120,6 +16189,16 @@ _bfd_mips_elf_get_synthetic_symtab (bfd 
   return n;
 }
 
+/* Return the ABI flags associated with ABFD if available.  */
+
+Elf_Internal_ABIFlags_v0 *
+bfd_mips_elf_get_abiflags (bfd *abfd)
+{
+  struct mips_elf_obj_tdata *tdata = mips_elf_tdata (abfd);
+
+  return tdata->abiflags_valid ? &tdata->abiflags : NULL;
+}
+
 void
 _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-mips.h ./bfd/elfxx-mips.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-mips.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-mips.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS ELF specific backend routines.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -107,7 +107,7 @@ extern struct bfd_link_hash_table *_bfd_
 extern bfd_boolean _bfd_mips_elf_final_link
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_mips_elf_merge_private_bfd_data
-  (bfd *, bfd *);
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_mips_elf_set_private_flags
   (bfd *, flagword);
 extern const char * _bfd_mips_fp_abi_string
@@ -139,8 +139,6 @@ extern bfd_reloc_status_type _bfd_mips_e
   (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 extern unsigned long _bfd_elf_mips_mach
   (flagword);
-extern bfd_boolean _bfd_mips_relax_section
-  (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
 extern bfd_vma _bfd_mips_elf_sign_extend
   (bfd_vma, int);
 extern void _bfd_mips_elf_merge_symbol_attribute
@@ -150,8 +148,8 @@ extern bfd_boolean _bfd_mips_elf_ignore_
   (struct elf_link_hash_entry *);
 extern void _bfd_mips_elf_use_plts_and_copy_relocs
   (struct bfd_link_info *);
-extern void _bfd_mips_elf_insn32
-  (struct bfd_link_info *, bfd_boolean);
+extern void _bfd_mips_elf_linker_flags
+  (struct bfd_link_info *, bfd_boolean, bfd_boolean);
 extern bfd_boolean _bfd_mips_elf_init_stubs
   (struct bfd_link_info *,
    asection *(*) (const char *, asection *, asection *));
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-riscv.c ./bfd/elfxx-riscv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-riscv.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elfxx-riscv.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,937 @@
+/* RISC-V-specific support for ELF.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   Contributed by Andrew Waterman (andrew@sifive.com).
+   Based on TILE-Gx and MIPS targets.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING3. If not,
+   see <http://www.gnu.org/licenses/>.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/riscv.h"
+#include "opcode/riscv.h"
+#include "libiberty.h"
+#include "elfxx-riscv.h"
+#include <stdint.h>
+
+#define MINUS_ONE ((bfd_vma)0 - 1)
+
+/* The relocation table used for SHT_RELA sections.  */
+
+static reloc_howto_type howto_table[] =
+{
+  /* No relocation.  */
+  HOWTO (R_RISCV_NONE,			/* type */
+	 0,				/* rightshift */
+	 3,				/* size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_NONE",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 32 bit relocation.  */
+  HOWTO (R_RISCV_32,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_32",			/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 64 bit relocation.  */
+  HOWTO (R_RISCV_64,			/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_64",			/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Relocation against a local symbol in a shared object.  */
+  HOWTO (R_RISCV_RELATIVE,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_RELATIVE",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_COPY,			/* type */
+	 0,				/* rightshift */
+	 0,				/* this one is variable size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_bitfield,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_COPY",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,         			/* src_mask */
+	 0,		        	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_JUMP_SLOT,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_bitfield,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_JUMP_SLOT",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,         			/* src_mask */
+	 0,		        	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Dynamic TLS relocations.  */
+  HOWTO (R_RISCV_TLS_DTPMOD32,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_DTPMOD32",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_TLS_DTPMOD64,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_DTPMOD64",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_TLS_DTPREL32,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_DTPREL32",	/* name */
+	 TRUE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_TLS_DTPREL64,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_DTPREL64",	/* name */
+	 TRUE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_TLS_TPREL32,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_TPREL32",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  HOWTO (R_RISCV_TLS_TPREL64,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc, 	/* special_function */
+	 "R_RISCV_TLS_TPREL64",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Reserved for future relocs that the dynamic linker must understand.  */
+  EMPTY_HOWTO (12),
+  EMPTY_HOWTO (13),
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
+
+  /* 12-bit PC-relative branch offset.  */
+  HOWTO (R_RISCV_BRANCH,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_BRANCH",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_SBTYPE_IMM (-1U),	/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* 20-bit PC-relative jump offset.  */
+  HOWTO (R_RISCV_JAL,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_JAL",			/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UJTYPE_IMM (-1U),	/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* 32-bit PC-relative function call (AUIPC/JALR).  */
+  HOWTO (R_RISCV_CALL,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 64,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_CALL",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U) | ((bfd_vma) ENCODE_ITYPE_IMM (-1U) << 32),
+					/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* Like R_RISCV_CALL, but not locally binding.  */
+  HOWTO (R_RISCV_CALL_PLT,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 64,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_CALL_PLT",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U) | ((bfd_vma) ENCODE_ITYPE_IMM (-1U) << 32),
+					/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* High 20 bits of 32-bit PC-relative GOT access.  */
+  HOWTO (R_RISCV_GOT_HI20,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_GOT_HI20",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 20 bits of 32-bit PC-relative TLS IE GOT access.  */
+  HOWTO (R_RISCV_TLS_GOT_HI20,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TLS_GOT_HI20",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 20 bits of 32-bit PC-relative TLS GD GOT reference.  */
+  HOWTO (R_RISCV_TLS_GD_HI20,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TLS_GD_HI20",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 20 bits of 32-bit PC-relative reference.  */
+  HOWTO (R_RISCV_PCREL_HI20,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_PCREL_HI20",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* Low 12 bits of a 32-bit PC-relative load or add.  */
+  HOWTO (R_RISCV_PCREL_LO12_I,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_PCREL_LO12_I",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_ITYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Low 12 bits of a 32-bit PC-relative store.  */
+  HOWTO (R_RISCV_PCREL_LO12_S,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_PCREL_LO12_S",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_STYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 20 bits of 32-bit absolute address.  */
+  HOWTO (R_RISCV_HI20,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_HI20",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 12 bits of 32-bit load or add.  */
+  HOWTO (R_RISCV_LO12_I,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_LO12_I",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_ITYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 12 bits of 32-bit store.  */
+  HOWTO (R_RISCV_LO12_S,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_LO12_S",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_STYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* High 20 bits of TLS LE thread pointer offset.  */
+  HOWTO (R_RISCV_TPREL_HI20,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_HI20",		/* name */
+	 TRUE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_UTYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Low 12 bits of TLS LE thread pointer offset for loads and adds.  */
+  HOWTO (R_RISCV_TPREL_LO12_I,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_LO12_I",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_ITYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Low 12 bits of TLS LE thread pointer offset for stores.  */
+  HOWTO (R_RISCV_TPREL_LO12_S,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_LO12_S",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_STYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* TLS LE thread pointer usage.  May be relaxed.  */
+  HOWTO (R_RISCV_TPREL_ADD,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_ADD",		/* name */
+	 TRUE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 8-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_ADD8,			/* type */
+	 0,				/* rightshift */
+	 0,				/* size */
+	 8,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_ADD8",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 16-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_ADD16,			/* type */
+	 0,				/* rightshift */
+	 1,				/* size */
+	 16,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_ADD16",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 32-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_ADD32,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_ADD32",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 64-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_ADD64,			/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_ADD64",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 8-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_SUB8,			/* type */
+	 0,				/* rightshift */
+	 0,				/* size */
+	 8,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SUB8",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 16-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_SUB16,			/* type */
+	 0,				/* rightshift */
+	 1,				/* size */
+	 16,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SUB16",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 32-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_SUB32,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SUB32",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 64-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_SUB64,			/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 64,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SUB64",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* GNU extension to record C++ vtable hierarchy */
+  HOWTO (R_RISCV_GNU_VTINHERIT,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 NULL,				/* special_function */
+	 "R_RISCV_GNU_VTINHERIT",	/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* GNU extension to record C++ vtable member usage */
+  HOWTO (R_RISCV_GNU_VTENTRY,		/* type */
+	 0,				/* rightshift */
+	 4,				/* size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 _bfd_elf_rel_vtable_reloc_fn,	/* special_function */
+	 "R_RISCV_GNU_VTENTRY",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* Indicates an alignment statement.  The addend field encodes how many
+     bytes of NOPs follow the statement.  The desired alignment is the
+     addend rounded up to the next power of two.  */
+  HOWTO (R_RISCV_ALIGN,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_ALIGN",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* 8-bit PC-relative branch offset.  */
+  HOWTO (R_RISCV_RVC_BRANCH,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_RVC_BRANCH",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_RVC_B_IMM (-1U),	/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* 11-bit PC-relative jump offset.  */
+  HOWTO (R_RISCV_RVC_JUMP,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 TRUE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_RVC_JUMP",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_RVC_J_IMM (-1U),	/* dst_mask */
+	 TRUE),				/* pcrel_offset */
+
+  /* High 6 bits of 18-bit absolute address.  */
+  HOWTO (R_RISCV_RVC_LUI,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_RVC_LUI",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_RVC_IMM (-1U),		/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* GP-relative load.  */
+  HOWTO (R_RISCV_GPREL_I,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_GPREL_I",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_ITYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* GP-relative store.  */
+  HOWTO (R_RISCV_GPREL_S,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_GPREL_S",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_STYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* TP-relative TLS LE load.  */
+  HOWTO (R_RISCV_TPREL_I,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_I",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_ITYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* TP-relative TLS LE store.  */
+  HOWTO (R_RISCV_TPREL_S,		/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_signed,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_TPREL_S",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 ENCODE_STYPE_IMM (-1U),	/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* The paired relocation may be relaxed.  */
+  HOWTO (R_RISCV_RELAX,			/* type */
+	 0,				/* rightshift */
+	 3,				/* size */
+	 0,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_RELAX",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 6-bit in-place addition, for local label subtraction.  */
+  HOWTO (R_RISCV_SUB6,			/* type */
+	 0,				/* rightshift */
+	 0,				/* size */
+	 8,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SUB6",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0x3f,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 6-bit in-place setting, for local label subtraction.  */
+  HOWTO (R_RISCV_SET6,			/* type */
+	 0,				/* rightshift */
+	 0,				/* size */
+	 8,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SET6",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 0x3f,				/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 8-bit in-place setting, for local label subtraction.  */
+  HOWTO (R_RISCV_SET8,			/* type */
+	 0,				/* rightshift */
+	 0,				/* size */
+	 8,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SET8",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 16-bit in-place setting, for local label subtraction.  */
+  HOWTO (R_RISCV_SET16,			/* type */
+	 0,				/* rightshift */
+	 1,				/* size */
+	 16,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SET16",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+
+  /* 32-bit in-place setting, for local label subtraction.  */
+  HOWTO (R_RISCV_SET32,			/* type */
+	 0,				/* rightshift */
+	 2,				/* size */
+	 32,				/* bitsize */
+	 FALSE,				/* pc_relative */
+	 0,				/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,		/* special_function */
+	 "R_RISCV_SET32",		/* name */
+	 FALSE,				/* partial_inplace */
+	 0,				/* src_mask */
+	 MINUS_ONE,			/* dst_mask */
+	 FALSE),			/* pcrel_offset */
+};
+
+/* A mapping from BFD reloc types to RISC-V ELF reloc types.  */
+
+struct elf_reloc_map
+{
+  bfd_reloc_code_real_type bfd_val;
+  enum elf_riscv_reloc_type elf_val;
+};
+
+static const struct elf_reloc_map riscv_reloc_map[] =
+{
+  { BFD_RELOC_NONE, R_RISCV_NONE },
+  { BFD_RELOC_32, R_RISCV_32 },
+  { BFD_RELOC_64, R_RISCV_64 },
+  { BFD_RELOC_RISCV_ADD8, R_RISCV_ADD8 },
+  { BFD_RELOC_RISCV_ADD16, R_RISCV_ADD16 },
+  { BFD_RELOC_RISCV_ADD32, R_RISCV_ADD32 },
+  { BFD_RELOC_RISCV_ADD64, R_RISCV_ADD64 },
+  { BFD_RELOC_RISCV_SUB8, R_RISCV_SUB8 },
+  { BFD_RELOC_RISCV_SUB16, R_RISCV_SUB16 },
+  { BFD_RELOC_RISCV_SUB32, R_RISCV_SUB32 },
+  { BFD_RELOC_RISCV_SUB64, R_RISCV_SUB64 },
+  { BFD_RELOC_CTOR, R_RISCV_64 },
+  { BFD_RELOC_12_PCREL, R_RISCV_BRANCH },
+  { BFD_RELOC_RISCV_HI20, R_RISCV_HI20 },
+  { BFD_RELOC_RISCV_LO12_I, R_RISCV_LO12_I },
+  { BFD_RELOC_RISCV_LO12_S, R_RISCV_LO12_S },
+  { BFD_RELOC_RISCV_PCREL_LO12_I, R_RISCV_PCREL_LO12_I },
+  { BFD_RELOC_RISCV_PCREL_LO12_S, R_RISCV_PCREL_LO12_S },
+  { BFD_RELOC_RISCV_CALL, R_RISCV_CALL },
+  { BFD_RELOC_RISCV_CALL_PLT, R_RISCV_CALL_PLT },
+  { BFD_RELOC_RISCV_PCREL_HI20, R_RISCV_PCREL_HI20 },
+  { BFD_RELOC_RISCV_JMP, R_RISCV_JAL },
+  { BFD_RELOC_RISCV_GOT_HI20, R_RISCV_GOT_HI20 },
+  { BFD_RELOC_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD32 },
+  { BFD_RELOC_RISCV_TLS_DTPREL32, R_RISCV_TLS_DTPREL32 },
+  { BFD_RELOC_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPMOD64 },
+  { BFD_RELOC_RISCV_TLS_DTPREL64, R_RISCV_TLS_DTPREL64 },
+  { BFD_RELOC_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL32 },
+  { BFD_RELOC_RISCV_TLS_TPREL64, R_RISCV_TLS_TPREL64 },
+  { BFD_RELOC_RISCV_TPREL_HI20, R_RISCV_TPREL_HI20 },
+  { BFD_RELOC_RISCV_TPREL_ADD, R_RISCV_TPREL_ADD },
+  { BFD_RELOC_RISCV_TPREL_LO12_S, R_RISCV_TPREL_LO12_S },
+  { BFD_RELOC_RISCV_TPREL_LO12_I, R_RISCV_TPREL_LO12_I },
+  { BFD_RELOC_RISCV_TLS_GOT_HI20, R_RISCV_TLS_GOT_HI20 },
+  { BFD_RELOC_RISCV_TLS_GD_HI20, R_RISCV_TLS_GD_HI20 },
+  { BFD_RELOC_RISCV_ALIGN, R_RISCV_ALIGN },
+  { BFD_RELOC_RISCV_RVC_BRANCH, R_RISCV_RVC_BRANCH },
+  { BFD_RELOC_RISCV_RVC_JUMP, R_RISCV_RVC_JUMP },
+  { BFD_RELOC_RISCV_RVC_LUI, R_RISCV_RVC_LUI },
+  { BFD_RELOC_RISCV_GPREL_I, R_RISCV_GPREL_I },
+  { BFD_RELOC_RISCV_GPREL_S, R_RISCV_GPREL_S },
+  { BFD_RELOC_RISCV_TPREL_I, R_RISCV_TPREL_I },
+  { BFD_RELOC_RISCV_TPREL_S, R_RISCV_TPREL_S },
+  { BFD_RELOC_RISCV_RELAX, R_RISCV_RELAX },
+  { BFD_RELOC_RISCV_SUB6, R_RISCV_SUB6 },
+  { BFD_RELOC_RISCV_SET6, R_RISCV_SET6 },
+  { BFD_RELOC_RISCV_SET8, R_RISCV_SET8 },
+  { BFD_RELOC_RISCV_SET16, R_RISCV_SET16 },
+  { BFD_RELOC_RISCV_SET32, R_RISCV_SET32 },
+};
+
+/* Given a BFD reloc type, return a howto structure.  */
+
+reloc_howto_type *
+riscv_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+			 bfd_reloc_code_real_type code)
+{
+  unsigned int i;
+
+  for (i = 0; i < ARRAY_SIZE (riscv_reloc_map); i++)
+    if (riscv_reloc_map[i].bfd_val == code)
+      return &howto_table[(int) riscv_reloc_map[i].elf_val];
+
+  bfd_set_error (bfd_error_bad_value);
+  return NULL;
+}
+
+reloc_howto_type *
+riscv_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0; i < ARRAY_SIZE (howto_table); i++)
+    if (howto_table[i].name && strcasecmp (howto_table[i].name, r_name) == 0)
+      return &howto_table[i];
+
+  return NULL;
+}
+
+reloc_howto_type *
+riscv_elf_rtype_to_howto (unsigned int r_type)
+{
+  if (r_type >= ARRAY_SIZE (howto_table))
+    {
+      (*_bfd_error_handler) (_("unrecognized relocation (0x%x)"), r_type);
+      bfd_set_error (bfd_error_bad_value);
+      return NULL;
+    }
+  return &howto_table[r_type];
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-riscv.h ./bfd/elfxx-riscv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-riscv.h	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/elfxx-riscv.h	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,33 @@
+/* RISC-V ELF specific backend routines.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   Contributed by Andrew Waterman (andrew@sifive.com).
+   Based on MIPS target.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING3. If not,
+   see <http://www.gnu.org/licenses/>.  */
+
+#include "elf/common.h"
+#include "elf/internal.h"
+
+extern reloc_howto_type *
+riscv_reloc_name_lookup (bfd *, const char *);
+
+extern reloc_howto_type *
+riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
+
+extern reloc_howto_type *
+riscv_elf_rtype_to_howto (unsigned int r_type);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-sparc.c ./bfd/elfxx-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPARC-specific support for ELF
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -636,8 +636,7 @@ _bfd_sparc_elf_info_to_howto_ptr (unsign
     default:
       if (r_type >= (unsigned int) R_SPARC_max_std)
 	{
-	  (*_bfd_error_handler) (_("invalid relocation type %d"),
-				 (int) r_type);
+	  _bfd_error_handler (_("invalid relocation type %d"), (int) r_type);
 	  r_type = R_SPARC_NONE;
 	}
       return &_bfd_sparc_elf_howto_table[r_type];
@@ -1207,15 +1206,11 @@ _bfd_sparc_elf_create_dynamic_sections (
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
   if (htab->is_vxworks)
     {
       if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
 	return FALSE;
-      if (info->shared)
+      if (bfd_link_pic (info))
 	{
 	  htab->plt_header_size
 	    = 4 * ARRAY_SIZE (sparc_vxworks_shared_plt0_entry);
@@ -1231,8 +1226,8 @@ _bfd_sparc_elf_create_dynamic_sections (
 	}
     }
 
-  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
+  if (!htab->elf.splt || !htab->elf.srelplt || !htab->elf.sdynbss
+      || (!bfd_link_pic (info) && !htab->elf.srelbss))
     abort ();
 
   return TRUE;
@@ -1330,7 +1325,7 @@ sparc_elf_tls_transition (struct bfd_lin
       && ! _bfd_sparc_elf_tdata (abfd)->has_tlsgd)
     r_type = R_SPARC_REV32;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   switch (r_type)
@@ -1377,7 +1372,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
   int num_relocs;
   bfd_boolean checked_tlsgd = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = _bfd_sparc_elf_hash_table (info);
@@ -1412,8 +1407,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"), abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1501,13 +1496,13 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 
 	case R_SPARC_TLS_LE_HIX22:
 	case R_SPARC_TLS_LE_LOX10:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    goto r_sparc_plt32;
 	  break;
 
 	case R_SPARC_TLS_IE_HI22:
 	case R_SPARC_TLS_IE_LO10:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    info->flags |= DF_STATIC_TLS;
 	  /* Fall through */
 
@@ -1592,7 +1587,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 		  tls_type = old_tls_type;
 		else
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: `%s' accessed both as normal and thread local symbol"),
 		       abfd, h ? h->root.root.string : "<local>");
 		    return FALSE;
@@ -1617,7 +1613,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 
 	case R_SPARC_TLS_GD_CALL:
 	case R_SPARC_TLS_LDM_CALL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* These are basically R_SPARC_TLS_WPLT30 relocs against
 		 __tls_get_addr.  */
@@ -1735,7 +1731,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 	    h->non_got_ref = 1;
 
 	r_sparc_plt32:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      /* We may need a .plt entry if the function this reloc
 		 refers to is in a shared lib.  */
@@ -1763,19 +1759,19 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, 
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (! _bfd_sparc_elf_howto_table[r_type].pc_relative
 		   || (h != NULL
 		       && (! SYMBOLIC_BIND (info, h)
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && h != NULL
 		  && h->type == STT_GNU_IFUNC))
 	    {
@@ -1878,8 +1874,8 @@ _bfd_sparc_elf_gc_mark_hook (asection *s
       }
 
   /* FIXME: The test here, in check_relocs and in relocate_section
-     dealing with TLS optimization, ought to be !info->executable.  */
-  if (info->shared)
+     dealing with TLS optimization, ought to be !bfd_link_executable (info).  */
+  if (bfd_link_pic (info))
     {
       switch (SPARC_ELF_R_TYPE (rel->r_info))
 	{
@@ -1928,7 +1924,7 @@ _bfd_sparc_elf_gc_sweep_hook (bfd *abfd,
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_sparc_elf (abfd) || sec->reloc_count == 0);
@@ -2057,7 +2053,7 @@ _bfd_sparc_elf_gc_sweep_hook (bfd *abfd,
 	case R_SPARC_L44:
 	case R_SPARC_H34:
 	case R_SPARC_UA64:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
 	  /* Fall through.  */
 
@@ -2090,7 +2086,7 @@ _bfd_sparc_elf_adjust_dynamic_symbol (st
   struct _bfd_sparc_elf_link_hash_table *htab;
   struct _bfd_sparc_elf_link_hash_entry * eh;
   struct _bfd_sparc_elf_dyn_relocs *p;
-  asection *s;
+  asection *s, *srel;
 
   htab = _bfd_sparc_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2158,7 +2154,7 @@ _bfd_sparc_elf_adjust_dynamic_symbol (st
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2203,14 +2199,22 @@ _bfd_sparc_elf_adjust_dynamic_symbol (st
      to copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rel.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += SPARC_ELF_RELA_BYTES (htab);
+      srel->size += SPARC_ELF_RELA_BYTES (htab);
       h->needs_copy = 1;
     }
 
-  s = htab->sdynbss;
-
   return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
@@ -2247,7 +2251,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h)
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)
 	  || (h->type == STT_GNU_IFUNC
 	      && h->def_regular))
 	{
@@ -2262,7 +2266,7 @@ allocate_dynrelocs (struct elf_link_hash
 	      s->size = htab->plt_header_size;
 
 	      /* Allocate space for the .rela.plt.unloaded relocations.  */
-	      if (htab->is_vxworks && !info->shared)
+	      if (htab->is_vxworks && !bfd_link_pic (info))
 		htab->srelplt2->size = sizeof (Elf32_External_Rela) * 2;
 	    }
 
@@ -2293,7 +2297,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -2315,7 +2319,7 @@ allocate_dynrelocs (struct elf_link_hash
 	      htab->elf.sgotplt->size += 4;
 
 	      /* ...and for the .rela.plt.unloaded relocations.  */
-	      if (!info->shared)
+	      if (!bfd_link_pic (info))
 		htab->srelplt2->size += sizeof (Elf32_External_Rela) * 3;
 	    }
 	}
@@ -2334,7 +2338,7 @@ allocate_dynrelocs (struct elf_link_hash
   /* If R_SPARC_TLS_IE_{HI22,LO10} symbol is now local to the binary,
      make it a R_SPARC_TLS_LE_{HI22,LO10} requiring no TLS entry.  */
   if (h->got.refcount > 0
-      && !info->shared
+      && !bfd_link_pic (info)
       && h->dynindx == -1
       && _bfd_sparc_elf_hash_entry(h)->tls_type == GOT_TLS_IE)
     h->got.offset = (bfd_vma) -1;
@@ -2369,7 +2373,9 @@ allocate_dynrelocs (struct elf_link_hash
 	htab->elf.srelgot->size += SPARC_ELF_RELA_BYTES (htab);
       else if (tls_type == GOT_TLS_GD)
 	htab->elf.srelgot->size += 2 * SPARC_ELF_RELA_BYTES (htab);
-      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						bfd_link_pic (info),
+						h))
 	htab->elf.srelgot->size += SPARC_ELF_RELA_BYTES (htab);
     }
   else
@@ -2385,7 +2391,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -2557,7 +2563,7 @@ _bfd_sparc_elf_size_dynamic_sections (bf
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2631,7 +2637,7 @@ _bfd_sparc_elf_size_dynamic_sections (bf
 	      s->size += SPARC_ELF_WORD_BYTES (htab);
 	      if (*local_tls_type == GOT_TLS_GD)
 		s->size += SPARC_ELF_WORD_BYTES (htab);
-	      if (info->shared
+	      if (bfd_link_pic (info)
 		  || *local_tls_type == GOT_TLS_GD
 		  || *local_tls_type == GOT_TLS_IE)
 		srel->size += SPARC_ELF_RELA_BYTES (htab);
@@ -2687,7 +2693,8 @@ _bfd_sparc_elf_size_dynamic_sections (bf
 
       if (s == htab->elf.splt
 	  || s == htab->elf.sgot
-	  || s == htab->sdynbss
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro
 	  || s == htab->elf.iplt
 	  || s == htab->elf.sgotplt)
 	{
@@ -2745,7 +2752,7 @@ _bfd_sparc_elf_size_dynamic_sections (bf
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -2864,7 +2871,7 @@ _bfd_sparc_elf_relax_section (bfd *abfd 
 			      struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			      bfd_boolean *again)
 {
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -2920,6 +2927,33 @@ gdopoff (struct bfd_link_info *info, bfd
   return address - got_base;
 }
 
+/* Return whether H is local and its ADDRESS is within 4G of
+   _GLOBAL_OFFSET_TABLE_ and thus the offset may be calculated by a
+   sethi, xor sequence.  */
+
+static bfd_boolean
+gdop_relative_offset_ok (struct bfd_link_info *info,
+			 struct elf_link_hash_entry *h,
+			 bfd_vma address ATTRIBUTE_UNUSED)
+{
+  if (!SYMBOL_REFERENCES_LOCAL (info, h))
+    return FALSE;
+  /* If H is undefined, ADDRESS will be zero.  We can't allow a
+     relative offset to "zero" when producing PIEs or shared libs.
+     Note that to get here with an undefined symbol it must also be
+     hidden or internal visibility.  */
+  if (bfd_link_pic (info)
+      && h != NULL
+      && (h->root.type == bfd_link_hash_undefweak
+	  || h->root.type == bfd_link_hash_undefined))
+    return FALSE;
+#ifdef BFD64
+  return gdopoff (info, address) + ((bfd_vma) 1 << 32) < (bfd_vma) 2 << 32;
+#else
+  return TRUE;
+#endif
+}
+
 /* Relocate a SPARC ELF section.  */
 
 bfd_boolean
@@ -2957,7 +2991,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
   sreloc = elf_section_data (input_section)->sreloc;
   /* We have to handle relocations in vxworks .tls_vars sections
      specially, because the dynamic loader is 'weird'.  */
-  is_vxworks_tls = (htab->is_vxworks && info->shared
+  is_vxworks_tls = (htab->is_vxworks && bfd_link_pic (info)
 		    && !strcmp (input_section->output_section->name,
 				".tls_vars"));
 
@@ -3003,7 +3037,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  sec = local_sections[r_symndx];
 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
 
-	  if (!info->relocatable
+	  if (!bfd_link_relocatable (info)
 	      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 	    {
 	      /* Relocate against local STT_GNU_IFUNC symbol.  */
@@ -3041,7 +3075,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL
@@ -3091,7 +3125,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 	    case R_SPARC_32:
 	    case R_SPARC_64:
-	      if (info->shared && h->non_got_ref)
+	      if (bfd_link_pic (info) && h->non_got_ref)
 		{
 		  Elf_Internal_Rela outrel;
 		  bfd_vma offset;
@@ -3109,7 +3143,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 		  if (h->dynindx == -1
 		      || h->forced_local
-		      || info->executable)
+		      || bfd_link_executable (info))
 		    {
 		      outrel.r_info = SPARC_ELF_R_INFO (htab, NULL,
 							0, R_SPARC_IRELATIVE);
@@ -3134,7 +3168,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	    case R_SPARC_HI22:
 	    case R_SPARC_LO10:
 	      /* We should only see such relocs in static links.  */
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		abort();
 	      relocation = (plt_sec->output_section->vma
 			    + plt_sec->output_offset + h->plt.offset);
@@ -3146,7 +3180,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	      else
 		name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
 					 NULL);
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: relocation %s against STT_GNU_IFUNC "
 		   "symbol `%s' isn't handled by %s"), input_bfd,
 		 _bfd_sparc_elf_howto_table[r_type].name,
@@ -3160,19 +3195,17 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	{
 	case R_SPARC_GOTDATA_OP_HIX22:
 	case R_SPARC_GOTDATA_OP_LOX10:
-	  if (SYMBOL_REFERENCES_LOCAL (info, h))
-	    r_type = (r_type == R_SPARC_GOTDATA_OP_HIX22
-		      ? R_SPARC_GOTDATA_HIX22
-		      : R_SPARC_GOTDATA_LOX10);
-	  else
-	    r_type = (r_type == R_SPARC_GOTDATA_OP_HIX22
-		      ? R_SPARC_GOT22
-		      : R_SPARC_GOT10);
-	  howto = _bfd_sparc_elf_howto_table + r_type;
+	  if (gdop_relative_offset_ok (info, h, relocation))
+	    {
+	      r_type = (r_type == R_SPARC_GOTDATA_OP_HIX22
+			? R_SPARC_GOTDATA_HIX22
+			: R_SPARC_GOTDATA_LOX10);
+	      howto = _bfd_sparc_elf_howto_table + r_type;
+	    }
 	  break;
 
 	case R_SPARC_GOTDATA_OP:
-	  if (SYMBOL_REFERENCES_LOCAL (info, h))
+	  if (gdop_relative_offset_ok (info, h, relocation))
 	    {
 	      bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 
@@ -3190,6 +3223,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  relocation = gdopoff (info, relocation);
 	  break;
 
+	case R_SPARC_GOTDATA_OP_HIX22:
+	case R_SPARC_GOTDATA_OP_LOX10:
 	case R_SPARC_GOT10:
 	case R_SPARC_GOT13:
 	case R_SPARC_GOT22:
@@ -3206,8 +3241,10 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	      BFD_ASSERT (off != (bfd_vma) -1);
 	      dyn = elf_hash_table (info)->dynamic_sections_created;
 
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h)))
 		{
 		  /* This is actually a static link, or it is a
@@ -3249,7 +3286,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	      else
 		{
 
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -3382,13 +3419,13 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	      || is_vxworks_tls)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
 		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak)
 	       && (! howto->pc_relative
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -3464,10 +3501,10 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 		memset (&outrel, 0, sizeof outrel);
 	      /* h->dynindx may be -1 if the symbol was marked to
 		 become local.  */
-	      else if (h != NULL &&
-		       h->dynindx != -1
-		       && (! is_plt
-			   || !info->shared
+	      else if (h != NULL
+		       && h->dynindx != -1
+		       && (_bfd_sparc_elf_howto_table[r_type].pc_relative
+			   || !bfd_link_pic (info)
 			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
@@ -3477,7 +3514,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 		}
 	      else
 		{
-		  if (r_type == R_SPARC_32 || r_type == R_SPARC_64)
+		  if (  (!ABI_64_P (output_bfd) && r_type == R_SPARC_32)
+		      || (ABI_64_P (output_bfd) && r_type == R_SPARC_64))
 		    {
 		      outrel.r_info = SPARC_ELF_R_INFO (htab, NULL,
 							0, R_SPARC_RELATIVE);
@@ -3522,7 +3560,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 			  if (indx == 0)
 			    {
 			      BFD_FAIL ();
-			      (*_bfd_error_handler)
+			      _bfd_error_handler
 				(_("%B: probably compiled without -fPIC?"),
 				 input_bfd);
 			      bfd_set_error (bfd_error_bad_value);
@@ -3565,7 +3603,9 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  else if (h != NULL)
 	    {
 	      tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
-	      if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+	      if (!bfd_link_pic (info)
+		  && h->dynindx == -1
+		  && tls_type == GOT_TLS_IE)
 		switch (SPARC_ELF_R_TYPE (rel->r_info))
 		  {
 		  case R_SPARC_TLS_GD_HI22:
@@ -3687,7 +3727,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 	case R_SPARC_TLS_LDM_HI22:
 	case R_SPARC_TLS_LDM_LO10:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    {
 	      bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
 	      continue;
@@ -3698,7 +3738,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 	case R_SPARC_TLS_LDO_HIX22:
 	case R_SPARC_TLS_LDO_LOX10:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      relocation -= dtpoff_base (info);
 	      break;
@@ -3710,7 +3750,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 	case R_SPARC_TLS_LE_HIX22:
 	case R_SPARC_TLS_LE_LOX10:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      bfd_boolean skip;
@@ -3742,7 +3782,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  break;
 
 	case R_SPARC_TLS_LDM_CALL:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    {
 	      /* mov %g0, %o0 */
 	      bfd_put_32 (output_bfd, 0x90100000, contents + rel->r_offset);
@@ -3756,13 +3796,13 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	    tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
 	  else if (h != NULL)
 	    tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      || (r_type == R_SPARC_TLS_GD_CALL && tls_type == GOT_TLS_IE))
 	    {
 	      Elf_Internal_Rela *rel2;
 	      bfd_vma insn;
 
-	      if (!info->shared && (h == NULL || h->dynindx == -1))
+	      if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 		{
 		  /* GD -> LE */
 		  bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
@@ -3832,7 +3872,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	    tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
 	  else if (h != NULL)
 	    tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
-	  if (! info->shared || tls_type == GOT_TLS_IE)
+	  if (! bfd_link_pic (info) || tls_type == GOT_TLS_IE)
 	    {
 	      /* add %reg1, %reg2, %reg3, %tgd_add(foo)
 		 changed into IE:
@@ -3840,7 +3880,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 		 or LE:
 		 add %g7, %reg2, %reg3.  */
 	      bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
-	      if ((h != NULL && h->dynindx != -1) || info->shared)
+	      if ((h != NULL && h->dynindx != -1) || bfd_link_pic (info))
 		relocation = insn | (ABI_64_P (output_bfd) ? 0xc0580000 : 0xc0000000);
 	      else
 		relocation = (insn & ~0x7c000) | 0x1c000;
@@ -3849,12 +3889,12 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  continue;
 
 	case R_SPARC_TLS_LDM_ADD:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
 	  continue;
 
 	case R_SPARC_TLS_LDO_ADD:
-	  if (! info->shared)
+	  if (! bfd_link_pic (info))
 	    {
 	      /* Change rs1 into %g7.  */
 	      bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -3865,7 +3905,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 
 	case R_SPARC_TLS_IE_LD:
 	case R_SPARC_TLS_IE_LDX:
-	  if (! info->shared && (h == NULL || h->dynindx == -1))
+	  if (! bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
 	    {
 	      bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
 	      int rs2 = insn & 0x1f;
@@ -3900,7 +3940,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	       && h->def_dynamic)
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	   input_bfd,
 	   input_section,
@@ -4008,7 +4049,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 	  r = bfd_reloc_ok;
 	}
       else if (r_type == R_SPARC_HIX22
-	       || r_type == R_SPARC_GOTDATA_HIX22)
+	       || r_type == R_SPARC_GOTDATA_HIX22
+	       || r_type == R_SPARC_GOTDATA_OP_HIX22)
 	{
 	  bfd_vma x;
 
@@ -4027,7 +4069,8 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 				  relocation);
 	}
       else if (r_type == R_SPARC_LOX10
-	       || r_type == R_SPARC_GOTDATA_LOX10)
+	       || r_type == R_SPARC_GOTDATA_LOX10
+	       || r_type == R_SPARC_GOTDATA_OP_LOX10)
 	{
 	  bfd_vma x;
 
@@ -4111,7 +4154,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 					  contents + rel->r_offset - 4);
 			  if ((z & (0xffffffff ^ RD(~0)))
 			      != (INSN_OR | RS1(O7) | RS2(G0)))
-			    break;
+			    continue;
 
 			  /* The sequence was
 			     or %o7, %g0, %rN
@@ -4124,7 +4167,7 @@ _bfd_sparc_elf_relocate_section (bfd *ou
 			  reg = (y & RS1(~0)) >> 14;
 			  if (reg != ((z & RD(~0)) >> 25)
 			      || reg == G0 || reg == O7)
-			    break;
+			    continue;
 
 			  bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
 				      contents + rel->r_offset + 4);
@@ -4193,11 +4236,9 @@ do_relocation:
 		    if (*name == '\0')
 		      name = bfd_section_name (input_bfd, sec);
 		  }
-		if (! ((*info->callbacks->reloc_overflow)
-		       (info, (h ? &h->root : NULL), name, howto->name,
-			(bfd_vma) 0, input_bfd, input_section,
-			rel->r_offset)))
-		  return FALSE;
+		(*info->callbacks->reloc_overflow)
+		  (info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      }
 	      break;
 	    }
@@ -4226,7 +4267,7 @@ sparc_vxworks_build_plt_entry (bfd *outp
   htab = _bfd_sparc_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       plt_entry = sparc_vxworks_shared_plt_entry;
       got_base = 0;
@@ -4270,7 +4311,7 @@ sparc_vxworks_build_plt_entry (bfd *outp
 	      htab->elf.sgotplt->contents + got_offset);
 
   /* Add relocations to .rela.plt.unloaded.  */
-  if (!info->shared)
+  if (!bfd_link_pic (info))
     {
       loc = (htab->srelplt2->contents
 	     + (2 + 3 * plt_index) * sizeof (Elf32_External_Rela));
@@ -4376,7 +4417,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
 
 	  if (h == NULL
 	      || h->dynindx == -1
-	      || ((info->executable
+	      || ((bfd_link_executable (info)
 		   || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 		  && h->def_regular
 		  && h->type == STT_GNU_IFUNC))
@@ -4476,7 +4517,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
 	 the symbol was forced to be local because of a version file.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (! info->shared
+      if (! bfd_link_pic (info)
 	  && h->type == STT_GNU_IFUNC
 	  && h->def_regular)
 	{
@@ -4491,7 +4532,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
 			      + (h->got.offset & ~(bfd_vma) 1));
 	  return TRUE;
 	}
-      else if (info->shared
+      else if (bfd_link_pic (info)
 	       && SYMBOL_REFERENCES_LOCAL (info, h))
 	{
 	  asection *sec = h->root.u.def.section;
@@ -4522,15 +4563,15 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
       /* This symbols needs a copy reloc.  Set it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      s = bfd_get_linker_section (h->root.u.def.section->owner,
-				  ".rela.bss");
-      BFD_ASSERT (s != NULL);
-
       rela.r_offset = (h->root.u.def.value
 		       + h->root.u.def.section->output_section->vma
 		       + h->root.u.def.section->output_offset);
       rela.r_info = SPARC_ELF_R_INFO (htab, NULL, h->dynindx, R_SPARC_COPY);
       rela.r_addend = 0;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
       sparc_elf_append_rela (output_bfd, s, &rela);
     }
 
@@ -4569,22 +4610,11 @@ sparc_finish_dyn (bfd *output_bfd, struc
   for (dyncon = sdyn->contents; dyncon < dynconend; dyncon += dynsize)
     {
       Elf_Internal_Dyn dyn;
-      const char *name;
       bfd_boolean size;
 
       bed->s->swap_dyn_in (dynobj, dyncon, &dyn);
 
-      if (htab->is_vxworks && dyn.d_tag == DT_RELASZ)
-	{
-	  /* On VxWorks, DT_RELASZ should not include the relocations
-	     in .rela.plt.  */
-	  if (htab->elf.srelplt)
-	    {
-	      dyn.d_un.d_val -= htab->elf.srelplt->size;
-	      bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
-	    }
-	}
-      else if (htab->is_vxworks && dyn.d_tag == DT_PLTGOT)
+      if (htab->is_vxworks && dyn.d_tag == DT_PLTGOT)
 	{
 	  /* On VxWorks, DT_PLTGOT should point to the start of the GOT,
 	     not to the start of the PLT.  */
@@ -4612,30 +4642,36 @@ sparc_finish_dyn (bfd *output_bfd, struc
 	}
       else
 	{
+	  asection *s;
+
 	  switch (dyn.d_tag)
 	    {
-	    case DT_PLTGOT:   name = ".plt"; size = FALSE; break;
-	    case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
-	    case DT_JMPREL:   name = ".rela.plt"; size = FALSE; break;
-	    default:	      name = NULL; size = FALSE; break;
+	    case DT_PLTGOT:
+	      s = htab->elf.splt;
+	      size = FALSE;
+	      break;
+	    case DT_PLTRELSZ:
+	      s = htab->elf.srelplt;
+	      size = TRUE;
+	      break;
+	    case DT_JMPREL:
+	      s = htab->elf.srelplt;
+	      size = FALSE;
+	      break;
+	    default:
+	      continue;
 	    }
 
-	  if (name != NULL)
+	  if (s == NULL)
+	    dyn.d_un.d_val = 0;
+	  else
 	    {
-	      asection *s;
-
-	      s = bfd_get_section_by_name (output_bfd, name);
-	      if (s == NULL)
-		dyn.d_un.d_val = 0;
+	      if (!size)
+		dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      else
-		{
-		  if (! size)
-		    dyn.d_un.d_ptr = s->vma;
-		  else
-		    dyn.d_un.d_val = s->size;
-		}
-	      bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
+		dyn.d_un.d_val = s->size;
 	    }
+	  bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
 	}
     }
   return TRUE;
@@ -4779,7 +4815,7 @@ _bfd_sparc_elf_finish_dynamic_sections (
 	{
 	  if (htab->is_vxworks)
 	    {
-	      if (info->shared)
+	      if (bfd_link_pic (info))
 		sparc_vxworks_finish_shared_plt (output_bfd, info);
 	      else
 		sparc_vxworks_finish_exec_plt (output_bfd, info);
@@ -4826,11 +4862,49 @@ _bfd_sparc_elf_finish_dynamic_sections (
 bfd_boolean
 _bfd_sparc_elf_object_p (bfd *abfd)
 {
+  obj_attribute *attrs = elf_known_obj_attributes (abfd)[OBJ_ATTR_GNU];
+  obj_attribute *hwcaps = &attrs[Tag_GNU_Sparc_HWCAPS];
+  obj_attribute *hwcaps2 = &attrs[Tag_GNU_Sparc_HWCAPS2];
+
+  unsigned int v9c_hwcaps_mask = ELF_SPARC_HWCAP_ASI_BLK_INIT;
+  unsigned int v9d_hwcaps_mask = (ELF_SPARC_HWCAP_FMAF
+                                  | ELF_SPARC_HWCAP_VIS3
+                                  | ELF_SPARC_HWCAP_HPC);
+  unsigned int v9e_hwcaps_mask = (ELF_SPARC_HWCAP_AES
+                                  | ELF_SPARC_HWCAP_DES
+                                  | ELF_SPARC_HWCAP_KASUMI
+                                  | ELF_SPARC_HWCAP_CAMELLIA
+                                  | ELF_SPARC_HWCAP_MD5
+                                  | ELF_SPARC_HWCAP_SHA1
+                                  | ELF_SPARC_HWCAP_SHA256
+                                  | ELF_SPARC_HWCAP_SHA512
+                                  | ELF_SPARC_HWCAP_MPMUL
+                                  | ELF_SPARC_HWCAP_MONT
+                                  | ELF_SPARC_HWCAP_CRC32C
+                                  | ELF_SPARC_HWCAP_CBCOND
+                                  | ELF_SPARC_HWCAP_PAUSE);
+  unsigned int v9v_hwcaps_mask = (ELF_SPARC_HWCAP_FJFMAU
+                                 | ELF_SPARC_HWCAP_IMA);
+  unsigned int v9m_hwcaps2_mask = (ELF_SPARC_HWCAP2_SPARC5
+                                   | ELF_SPARC_HWCAP2_MWAIT
+                                   | ELF_SPARC_HWCAP2_XMPMUL
+                                   | ELF_SPARC_HWCAP2_XMONT);
+
   if (ABI_64_P (abfd))
     {
       unsigned long mach = bfd_mach_sparc_v9;
 
-      if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+      if (hwcaps2->i & v9m_hwcaps2_mask)
+        mach = bfd_mach_sparc_v9m;
+      else if (hwcaps->i & v9v_hwcaps_mask)
+        mach = bfd_mach_sparc_v9v;
+      else if (hwcaps->i & v9e_hwcaps_mask)
+        mach = bfd_mach_sparc_v9e;
+      else if (hwcaps->i & v9d_hwcaps_mask)
+        mach = bfd_mach_sparc_v9d;
+      else if (hwcaps->i & v9c_hwcaps_mask)
+        mach = bfd_mach_sparc_v9c;
+      else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
 	mach = bfd_mach_sparc_v9b;
       else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
 	mach = bfd_mach_sparc_v9a;
@@ -4840,7 +4914,22 @@ _bfd_sparc_elf_object_p (bfd *abfd)
     {
       if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
 	{
-	  if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+          if (hwcaps2->i & v9m_hwcaps2_mask)
+	    return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+					      bfd_mach_sparc_v8plusm);
+          else if (hwcaps->i & v9v_hwcaps_mask)
+            return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+					      bfd_mach_sparc_v8plusv);
+          else if (hwcaps->i & v9e_hwcaps_mask)
+            return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+					      bfd_mach_sparc_v8pluse);
+          else if (hwcaps->i & v9d_hwcaps_mask)
+            return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+					      bfd_mach_sparc_v8plusd);
+          else if (hwcaps->i & v9c_hwcaps_mask)
+            return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+					      bfd_mach_sparc_v8plusc);
+	  else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
 	    return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
 					      bfd_mach_sparc_v8plusb);
 	  else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
@@ -4886,8 +4975,9 @@ _bfd_sparc_elf_plt_sym_val (bfd_vma i, c
    object file when linking.  */
 
 bfd_boolean
-_bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr, *in_attrs;
   obj_attribute *out_attr, *out_attrs;
 
@@ -4908,19 +4998,18 @@ _bfd_sparc_elf_merge_private_bfd_data (b
 
   in_attr = &in_attrs[Tag_GNU_Sparc_HWCAPS];
   out_attr = &out_attrs[Tag_GNU_Sparc_HWCAPS];
-  
+
   out_attr->i |= in_attr->i;
   out_attr->type = 1;
 
   in_attr = &in_attrs[Tag_GNU_Sparc_HWCAPS2];
   out_attr = &out_attrs[Tag_GNU_Sparc_HWCAPS2];
-  
+
   out_attr->i |= in_attr->i;
   out_attr->type = 1;
 
-
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  _bfd_elf_merge_object_attributes (ibfd, info);
 
   return TRUE;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-sparc.h ./bfd/elfxx-sparc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-sparc.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-sparc.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPARC ELF specific backend routines.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -46,10 +46,6 @@ struct _bfd_sparc_elf_link_hash_table
 {
   struct elf_link_hash_table elf;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   union
   {
     bfd_signed_vma refcount;
@@ -145,4 +141,4 @@ extern bfd_boolean _bfd_sparc_elf_object
 extern bfd_vma _bfd_sparc_elf_plt_sym_val
   (bfd_vma, const asection *, const arelent *);
 extern bfd_boolean _bfd_sparc_elf_merge_private_bfd_data
-  (bfd *, bfd *);
+  (bfd *, struct bfd_link_info *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-target.h ./bfd/elfxx-target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-target.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-target.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target definitions for NN-bit ELF
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -108,9 +108,15 @@
 #ifndef elf_backend_want_dynbss
 #define elf_backend_want_dynbss 1
 #endif
+#ifndef elf_backend_want_dynrelro
+#define elf_backend_want_dynrelro 0
+#endif
 #ifndef elf_backend_want_p_paddr_set_to_zero
 #define elf_backend_want_p_paddr_set_to_zero 0
 #endif
+#ifndef elf_backend_no_page_alias
+#define elf_backend_no_page_alias 0
+#endif
 #ifndef elf_backend_default_execstack
 #define elf_backend_default_execstack 1
 #endif
@@ -123,6 +129,9 @@
 #ifndef elf_backend_stack_align
 #define elf_backend_stack_align 16
 #endif
+#ifndef elf_backend_strtab_flags
+#define elf_backend_strtab_flags 0
+#endif
 
 #define bfd_elfNN_bfd_debug_info_start	bfd_void
 #define bfd_elfNN_bfd_debug_info_end	bfd_void
@@ -220,7 +229,7 @@
 #endif
 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
 #define bfd_elfNN_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
 #endif
 #ifndef bfd_elfNN_bfd_set_private_flags
 #define bfd_elfNN_bfd_set_private_flags \
@@ -247,6 +256,10 @@
 #ifndef bfd_elfNN_bfd_link_hash_table_create
 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
 #endif
+#ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
+#define bfd_elfNN_bfd_copy_link_hash_symbol_type \
+  _bfd_elf_copy_link_hash_symbol_type
+#endif
 #ifndef bfd_elfNN_bfd_link_add_symbols
 #define bfd_elfNN_bfd_link_add_symbols	bfd_elf_link_add_symbols
 #endif
@@ -263,6 +276,10 @@
 #define bfd_elfNN_bfd_link_hash_table_create \
   _bfd_generic_link_hash_table_create
 #endif
+#ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
+#define bfd_elfNN_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
+#endif
 #ifndef bfd_elfNN_bfd_link_add_symbols
 #define bfd_elfNN_bfd_link_add_symbols	_bfd_generic_link_add_symbols
 #endif
@@ -275,15 +292,14 @@
 #define bfd_elfNN_bfd_link_just_syms	_bfd_elf_link_just_syms
 #endif
 
-#ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
-#define bfd_elfNN_bfd_copy_link_hash_symbol_type \
-  _bfd_elf_copy_link_hash_symbol_type
-#endif
-
 #ifndef bfd_elfNN_bfd_link_split_section
 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
 #endif
 
+#ifndef bfd_elfNN_bfd_link_check_relocs
+#define bfd_elfNN_bfd_link_check_relocs  _bfd_elf_link_check_relocs
+#endif
+
 #ifndef bfd_elfNN_archive_p
 #define bfd_elfNN_archive_p bfd_generic_archive_p
 #endif
@@ -469,6 +485,10 @@
 #ifndef elf_backend_modify_program_headers
 #define elf_backend_modify_program_headers	0
 #endif
+#ifndef elf_backend_allow_non_load_phdr
+#define elf_backend_allow_non_load_phdr	\
+  ((bfd_boolean (*) (bfd *, const Elf_Internal_Phdr *, unsigned)) bfd_false)
+#endif
 #ifndef elf_backend_ecoff_debug_swap
 #define elf_backend_ecoff_debug_swap	0
 #endif
@@ -514,11 +534,14 @@
 #ifndef elf_backend_output_arch_syms
 #define elf_backend_output_arch_syms		NULL
 #endif
+#ifndef elf_backend_filter_implib_symbols
+#define elf_backend_filter_implib_symbols	NULL
+#endif
 #ifndef elf_backend_copy_indirect_symbol
-#define elf_backend_copy_indirect_symbol  _bfd_elf_link_hash_copy_indirect
+#define elf_backend_copy_indirect_symbol	_bfd_elf_link_hash_copy_indirect
 #endif
 #ifndef elf_backend_hide_symbol
-#define elf_backend_hide_symbol		_bfd_elf_link_hash_hide_symbol
+#define elf_backend_hide_symbol			_bfd_elf_link_hash_hide_symbol
 #endif
 #ifndef elf_backend_fixup_symbol
 #define elf_backend_fixup_symbol		NULL
@@ -535,9 +558,15 @@
 #ifndef elf_backend_emit_relocs
 #define elf_backend_emit_relocs			_bfd_elf_link_output_relocs
 #endif
+#ifndef elf_backend_update_relocs
+#define elf_backend_update_relocs		NULL
+#endif
 #ifndef elf_backend_count_relocs
 #define elf_backend_count_relocs		NULL
 #endif
+#ifndef elf_backend_count_additional_relocs
+#define elf_backend_count_additional_relocs	NULL
+#endif
 #ifndef elf_backend_sort_relocs_p
 #define elf_backend_sort_relocs_p		NULL
 #endif
@@ -613,6 +642,10 @@
 #define elf_backend_rela_normal 0
 #endif
 
+#ifndef elf_backend_dtrel_excludes_plt
+#define elf_backend_dtrel_excludes_plt 0
+#endif
+
 #ifndef elf_backend_plt_sym_val
 #define elf_backend_plt_sym_val NULL
 #endif
@@ -641,7 +674,7 @@
 #endif
 
 #ifndef elf_backend_link_order_error_handler
-#define elf_backend_link_order_error_handler _bfd_default_error_handler
+#define elf_backend_link_order_error_handler _bfd_error_handler
 #endif
 
 #ifndef elf_backend_common_definition
@@ -676,6 +709,10 @@
 #define elf_backend_get_reloc_section _bfd_elf_get_reloc_section
 #endif
 
+#ifndef elf_backend_copy_special_section_fields
+#define elf_backend_copy_special_section_fields NULL
+#endif
+
 #ifndef elf_backend_compact_eh_encoding
 #define elf_backend_compact_eh_encoding NULL
 #endif
@@ -738,6 +775,7 @@ static struct elf_backend_data elfNN_bed
   elf_backend_additional_program_headers,
   elf_backend_modify_segment_map,
   elf_backend_modify_program_headers,
+  elf_backend_allow_non_load_phdr,
   elf_backend_gc_keep,
   elf_backend_gc_mark_dynamic_ref,
   elf_backend_gc_mark_hook,
@@ -747,6 +785,7 @@ static struct elf_backend_data elfNN_bed
   elf_backend_print_symbol_all,
   elf_backend_output_arch_local_syms,
   elf_backend_output_arch_syms,
+  elf_backend_filter_implib_symbols,
   elf_backend_copy_indirect_symbol,
   elf_backend_hide_symbol,
   elf_backend_fixup_symbol,
@@ -754,7 +793,9 @@ static struct elf_backend_data elfNN_bed
   elf_backend_get_target_dtag,
   elf_backend_ignore_undef_symbol,
   elf_backend_emit_relocs,
+  elf_backend_update_relocs,
   elf_backend_count_relocs,
+  elf_backend_count_additional_relocs,
   elf_backend_sort_relocs_p,
   elf_backend_grok_prstatus,
   elf_backend_grok_psinfo,
@@ -782,6 +823,7 @@ static struct elf_backend_data elfNN_bed
   elf_backend_is_function_type,
   elf_backend_maybe_function_sym,
   elf_backend_get_reloc_section,
+  elf_backend_copy_special_section_fields,
   elf_backend_link_order_error_handler,
   elf_backend_relplt_name,
   ELF_MACHINE_ALT1,
@@ -800,6 +842,7 @@ static struct elf_backend_data elfNN_bed
   elf_backend_cant_unwind_opcode,
   elf_backend_static_tls_alignment,
   elf_backend_stack_align,
+  elf_backend_strtab_flags,
   elf_backend_collect,
   elf_backend_type_change_ok,
   elf_backend_may_use_rel_p,
@@ -807,6 +850,7 @@ static struct elf_backend_data elfNN_bed
   elf_backend_default_use_rela_p,
   elf_backend_rela_plts_and_copies_p,
   elf_backend_rela_normal,
+  elf_backend_dtrel_excludes_plt,
   elf_backend_sign_extend_vma,
   elf_backend_want_got_plt,
   elf_backend_plt_readonly,
@@ -817,7 +861,9 @@ static struct elf_backend_data elfNN_bed
   elf_backend_can_refcount,
   elf_backend_want_got_sym,
   elf_backend_want_dynbss,
+  elf_backend_want_dynrelro,
   elf_backend_want_p_paddr_set_to_zero,
+  elf_backend_no_page_alias,
   elf_backend_default_execstack,
   elf_backend_caches_rawsize,
   elf_backend_extern_protected_data
@@ -846,7 +892,7 @@ const bfd_target TARGET_BIG_SYM =
   /* object_flags: mask of all file flags */
   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
    | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
-   | BFD_COMPRESS_GABI),
+   | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON),
 
   /* section_flags: mask of all section flags */
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
@@ -906,6 +952,8 @@ const bfd_target TARGET_BIG_SYM =
   BFD_JUMP_TABLE_CORE (bfd_elfNN),
 #ifdef bfd_elfNN_archive_functions
   BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
+#elif defined USE_64_BIT_ARCHIVE
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
 #else
   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
 #endif
@@ -945,7 +993,7 @@ const bfd_target TARGET_LITTLE_SYM =
   /* object_flags: mask of all file flags */
   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
    | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
-   | BFD_COMPRESS_GABI),
+   | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON),
 
   /* section_flags: mask of all section flags */
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
@@ -1005,6 +1053,8 @@ const bfd_target TARGET_LITTLE_SYM =
   BFD_JUMP_TABLE_CORE (bfd_elfNN),
 #ifdef bfd_elfNN_archive_functions
   BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
+#elif defined USE_64_BIT_ARCHIVE
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
 #else
   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-tilegx.c ./bfd/elfxx-tilegx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-tilegx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-tilegx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx-specific support for ELF.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -855,10 +855,6 @@ struct tilegx_elf_link_hash_table
   void (*put_word) (bfd *, bfd_vma, void *);
   const char *dynamic_interpreter;
 
-  /* Short-cuts to get to dynamic linker sections.  */
-  asection *sdynbss;
-  asection *srelbss;
-
   /* Whether LE transition has been disabled for some of the
      sections.  */
   bfd_boolean disable_le_transition;
@@ -1439,8 +1435,7 @@ tilegx_elf_create_got_section (bfd *abfd
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
-  if (s != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   flags = bed->dynamic_sec_flags;
@@ -1501,26 +1496,10 @@ bfd_boolean
 tilegx_elf_create_dynamic_sections (bfd *dynobj,
 				    struct bfd_link_info *info)
 {
-  struct tilegx_elf_link_hash_table *htab;
-
-  htab = tilegx_elf_hash_table (info);
-  BFD_ASSERT (htab != NULL);
-
   if (!tilegx_elf_create_got_section (dynobj, info))
     return FALSE;
 
-  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
-    return FALSE;
-
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
-  if (!info->shared)
-    htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
-
-  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
-      || (!info->shared && !htab->srelbss))
-    abort ();
-
-  return TRUE;
+  return _bfd_elf_create_dynamic_sections (dynobj, info);
 }
 
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
@@ -1643,7 +1622,7 @@ static int
 tilegx_elf_tls_transition (struct bfd_link_info *info, int r_type,
 			   int is_local, bfd_boolean disable_le_transition)
 {
-  if (info->shared)
+  if (bfd_link_pic (info))
     return r_type;
 
   if (is_local && !disable_le_transition)
@@ -1669,7 +1648,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
   int num_relocs;
   bfd_boolean has_tls_gd_or_ie = FALSE, has_tls_add = FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   htab = tilegx_elf_hash_table (info);
@@ -1725,8 +1704,9 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
-				 abfd, r_symndx);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%B: bad symbol index: %d"),
+			      abfd, r_symndx);
 	  return FALSE;
 	}
 
@@ -1754,7 +1734,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	case R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
 	case R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
 	case R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    goto r_tilegx_plt32;
 	  break;
 
@@ -1764,7 +1744,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	case R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
 	case R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
 	case R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
-	  BFD_ASSERT (info->shared);
+	  BFD_ASSERT (bfd_link_pic (info));
 	  tls_type = GOT_TLS_GD;
           goto have_got_reference;
 
@@ -1775,7 +1755,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	case R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
 	case R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
           tls_type = GOT_TLS_IE;
-          if (info->shared)
+          if (bfd_link_pic (info))
             info->flags |= DF_STATIC_TLS;
           goto have_got_reference;
 
@@ -1832,7 +1812,8 @@ tilegx_elf_check_relocs (bfd *abfd, stru
                   tls_type = old_tls_type;
                 else
                   {
-                    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
                       (_("%B: `%s' accessed both as normal and thread local symbol"),
                        abfd, h ? h->root.root.string : "<local>");
                     return FALSE;
@@ -1856,7 +1837,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	  break;
 
 	case R_TILEGX_TLS_GD_CALL:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      /* These are basically R_TILEGX_JUMPOFF_X1_PLT relocs
 		 against __tls_get_addr.  */
@@ -1975,7 +1956,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	    h->non_got_ref = 1;
 
 	r_tilegx_plt32:
-	  if (h != NULL && !info->shared)
+	  if (h != NULL && !bfd_link_pic (info))
 	    {
 	      /* We may need a .plt entry if the function this reloc
 		 refers to is in a shared lib.  */
@@ -2003,14 +1984,14 @@ tilegx_elf_check_relocs (bfd *abfd, stru
 	     may need to keep relocations for symbols satisfied by a
 	     dynamic library if we manage to avoid copy relocs for the
 	     symbol.  */
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (sec->flags & SEC_ALLOC) != 0
 	       && (! tilegx_elf_howto_table[r_type].pc_relative
 		   || (h != NULL
 		       && (! info->symbolic
 			   || h->root.type == bfd_link_hash_defweak
 			   || !h->def_regular))))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && (sec->flags & SEC_ALLOC) != 0
 		  && h != NULL
 		  && (h->root.type == bfd_link_hash_defweak
@@ -2119,8 +2100,8 @@ tilegx_elf_gc_mark_hook (asection *sec,
     }
 
   /* FIXME: The test here, in check_relocs and in relocate_section
-     dealing with TLS optimization, ought to be !info->executable.  */
-  if (info->shared)
+     dealing with TLS optimization, ought to be !bfd_link_executable (info).  */
+  if (bfd_link_pic (info))
     {
       switch (TILEGX_ELF_R_TYPE (rel->r_info))
 	{
@@ -2154,7 +2135,7 @@ tilegx_elf_gc_sweep_hook (bfd *abfd, str
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   BFD_ASSERT (is_tilegx_elf (abfd) || sec->reloc_count == 0);
@@ -2298,7 +2279,7 @@ tilegx_elf_gc_sweep_hook (bfd *abfd, str
 	case R_TILEGX_IMM16_X1_HW1_LAST:
 	case R_TILEGX_IMM16_X0_HW2_LAST:
 	case R_TILEGX_IMM16_X1_HW2_LAST:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    break;
 	  /* Fall through.  */
 
@@ -2346,7 +2327,7 @@ tilegx_elf_adjust_dynamic_symbol (struct
   struct tilegx_elf_link_hash_entry * eh;
   struct tilegx_elf_dyn_relocs *p;
   bfd *dynobj;
-  asection *s;
+  asection *s, *srel;
 
   htab = tilegx_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2405,7 +2386,7 @@ tilegx_elf_adjust_dynamic_symbol (struct
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
      be handled correctly by relocate_section.  */
-  if (info->shared)
+  if (bfd_link_pic (info))
     return TRUE;
 
   /* If there are no references to this symbol that do not use the
@@ -2450,13 +2431,23 @@ tilegx_elf_adjust_dynamic_symbol (struct
      to copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rel.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
+    {
+      s = htab->elf.sdynrelro;
+      srel = htab->elf.sreldynrelro;
+    }
+  else
+    {
+      s = htab->elf.sdynbss;
+      srel = htab->elf.srelbss;
+    }
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
-      htab->srelbss->size += TILEGX_ELF_RELA_BYTES (htab);
+      srel->size += TILEGX_ELF_RELA_BYTES (htab);
       h->needs_copy = 1;
     }
 
-  return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss);
+  return _bfd_elf_adjust_dynamic_copy (info, h, s);
 }
 
 /* Allocate space in .plt, .got and associated reloc sections for
@@ -2489,7 +2480,7 @@ allocate_dynrelocs (struct elf_link_hash
 	    return FALSE;
 	}
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
 	{
 	  asection *s = htab->elf.splt;
 
@@ -2506,7 +2497,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     location in the .plt.  This is required to make function
 	     pointers compare as equal between the normal executable and
 	     the shared library.  */
-	  if (! info->shared
+	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
 	      h->root.u.def.section = s;
@@ -2538,7 +2529,7 @@ allocate_dynrelocs (struct elf_link_hash
      requiring no TLS entry.  */
   if (h->got.refcount > 0
       && !htab->disable_le_transition
-      && !info->shared
+      && !bfd_link_pic (info)
       && h->dynindx == -1
       && tilegx_elf_hash_entry(h)->tls_type == GOT_TLS_IE)
     h->got.offset = (bfd_vma) -1;
@@ -2568,7 +2559,9 @@ allocate_dynrelocs (struct elf_link_hash
          TLS_GD needs two if local symbol and two if global.  */
       if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE)
 	htab->elf.srelgot->size += 2 * TILEGX_ELF_RELA_BYTES (htab);
-      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						bfd_link_pic (info),
+						h))
 	htab->elf.srelgot->size += TILEGX_ELF_RELA_BYTES (htab);
     }
   else
@@ -2584,7 +2577,7 @@ allocate_dynrelocs (struct elf_link_hash
      space for pc-relative relocs that have become local due to symbol
      visibility changes.  */
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     {
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
@@ -2722,7 +2715,7 @@ tilegx_elf_size_dynamic_sections (bfd *o
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (info->executable)
+      if (bfd_link_executable (info) && !info->nointerp)
 	{
 	  s = bfd_get_linker_section (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2787,7 +2780,7 @@ tilegx_elf_size_dynamic_sections (bfd *o
 	      s->size += TILEGX_ELF_WORD_BYTES (htab);
               if (*local_tls_type == GOT_TLS_GD)
                 s->size += TILEGX_ELF_WORD_BYTES (htab);
-              if (info->shared
+              if (bfd_link_pic (info)
                   || *local_tls_type == GOT_TLS_GD
                   || *local_tls_type == GOT_TLS_IE)
 		srel->size += TILEGX_ELF_RELA_BYTES (htab);
@@ -2843,7 +2836,8 @@ tilegx_elf_size_dynamic_sections (bfd *o
       if (s == htab->elf.splt
 	  || s == htab->elf.sgot
 	  || s == htab->elf.sgotplt
-	  || s == htab->sdynbss)
+	  || s == htab->elf.sdynbss
+	  || s == htab->elf.sdynrelro)
 	{
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
@@ -2899,7 +2893,7 @@ tilegx_elf_size_dynamic_sections (bfd *o
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (info->executable)
+      if (bfd_link_executable (info))
 	{
 	  if (!add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
@@ -3168,7 +3162,8 @@ tilegx_elf_relocate_section (bfd *output
       if ((unsigned int)r_type >= ARRAY_SIZE (tilegx_elf_howto_table))
 	{
           /* Not clear if we need to check here, but just be paranoid. */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
 	     input_bfd, r_type, input_section);
 	  bfd_set_error (bfd_error_bad_value);
@@ -3214,7 +3209,7 @@ tilegx_elf_relocate_section (bfd *output
 	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
 					 rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	continue;
 
       if (h != NULL)
@@ -3245,9 +3240,9 @@ tilegx_elf_relocate_section (bfd *output
 	  else if (h != NULL)
 	    tls_type = tilegx_elf_hash_entry(h)->tls_type;
 
-	  is_tls_iele = (! info->shared || tls_type == GOT_TLS_IE);
+	  is_tls_iele = (! bfd_link_pic (info) || tls_type == GOT_TLS_IE);
 	  is_tls_le = is_tls_iele && (!input_section->sec_flg0
-				      && !info->shared
+				      && !bfd_link_pic (info)
 				      && (h == NULL || h->dynindx == -1));
 
 	  if (r_type == R_TILEGX_TLS_GD_CALL)
@@ -3392,7 +3387,7 @@ tilegx_elf_relocate_section (bfd *output
 	  break;
 	case R_TILEGX_TLS_IE_LOAD:
 	  if (!input_section->sec_flg0
-	      && !info->shared
+	      && !bfd_link_pic (info)
 	      && (h == NULL || h->dynindx == -1))
 	    {
 	      /* IE -> LE */
@@ -3439,8 +3434,10 @@ tilegx_elf_relocate_section (bfd *output
 	      BFD_ASSERT (off != (bfd_vma) -1);
 	      dyn = elf_hash_table (info)->dynamic_sections_created;
 
-	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		  || (info->shared
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		  || (bfd_link_pic (info)
 		      && SYMBOL_REFERENCES_LOCAL (info, h)))
 		{
 		  /* This is actually a static link, or it is a
@@ -3481,7 +3478,7 @@ tilegx_elf_relocate_section (bfd *output
 		off &= ~1;
 	      else
 		{
-		  if (info->shared)
+		  if (bfd_link_pic (info))
 		    {
 		      asection *s;
 		      Elf_Internal_Rela outrel;
@@ -3611,13 +3608,13 @@ tilegx_elf_relocate_section (bfd *output
 	  if ((input_section->flags & SEC_ALLOC) == 0)
 	    break;
 
-	  if ((info->shared
+	  if ((bfd_link_pic (info)
 	       && (h == NULL
 		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		   || h->root.type != bfd_link_hash_undefweak)
 	       && (! howto->pc_relative
 		   || !SYMBOL_CALLS_LOCAL (info, h)))
-	      || (!info->shared
+	      || (!bfd_link_pic (info)
 		  && h != NULL
 		  && h->dynindx != -1
 		  && !h->non_got_ref
@@ -3670,7 +3667,7 @@ tilegx_elf_relocate_section (bfd *output
 	      else if (h != NULL &&
 		       h->dynindx != -1
 		       && (! is_plt
-			   || !info->shared
+			   || !bfd_link_pic (info)
 			   || !SYMBOLIC_BIND (info, h)
 			   || !h->def_regular))
 		{
@@ -3725,7 +3722,7 @@ tilegx_elf_relocate_section (bfd *output
 			  if (indx == 0)
 			    {
 			      BFD_FAIL ();
-			      (*_bfd_error_handler)
+			      _bfd_error_handler
 				(_("%B: probably compiled without -fPIC?"),
 				 input_bfd);
 			      bfd_set_error (bfd_error_bad_value);
@@ -3753,7 +3750,7 @@ tilegx_elf_relocate_section (bfd *output
         case R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE:
         case R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE:
         case R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE:
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      Elf_Internal_Rela outrel;
 	      bfd_boolean skip;
@@ -3805,7 +3802,9 @@ tilegx_elf_relocate_section (bfd *output
 	  else if (h != NULL)
 	    {
 	      tls_type = tilegx_elf_hash_entry(h)->tls_type;
-	      if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+	      if (!bfd_link_pic (info)
+		  && h->dynindx == -1
+		  && tls_type == GOT_TLS_IE)
 		r_type = (!input_section->sec_flg0
 			  ? tilegx_tls_translate_to_le (r_type)
 			  : tilegx_tls_translate_to_ie (r_type));
@@ -3856,8 +3855,10 @@ tilegx_elf_relocate_section (bfd *output
 	        bfd_boolean dyn;
 	        dyn = htab->elf.dynamic_sections_created;
 
-		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-		    && (!info->shared
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
+						     bfd_link_pic (info),
+						     h)
+		    && (!bfd_link_pic (info)
 			|| !SYMBOL_REFERENCES_LOCAL (info, h)))
 		  {
 		    indx = h->dynindx;
@@ -3866,7 +3867,7 @@ tilegx_elf_relocate_section (bfd *output
 
 	      /* The GOT entries have not been initialized yet.  Do it
 	         now, and emit any relocations. */
-	      if ((info->shared || indx != 0)
+	      if ((bfd_link_pic (info) || indx != 0)
 		  && (h == NULL
 		      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		      || h->root.type != bfd_link_hash_undefweak))
@@ -3970,7 +3971,8 @@ tilegx_elf_relocate_section (bfd *output
 	       && h->def_dynamic)
 	  && _bfd_elf_section_offset (output_bfd, info, input_section,
 				      rel->r_offset) != (bfd_vma) -1)
-	(*_bfd_error_handler)
+	_bfd_error_handler
+	  /* xgettext:c-format */
 	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
 	   input_bfd,
 	   input_section,
@@ -4036,15 +4038,14 @@ tilegx_elf_relocate_section (bfd *output
 	  switch (r)
 	    {
 	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
+	      (*info->callbacks->reloc_overflow)
 		(info, (h ? &h->root : NULL), name, howto->name,
 		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
 	      break;
 
 	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset,
-		 TRUE);
+	      (*info->callbacks->undefined_symbol)
+		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
 	      break;
 
 	    case bfd_reloc_outofrange:
@@ -4065,11 +4066,8 @@ tilegx_elf_relocate_section (bfd *output
 	    }
 
 	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
+	    (*info->callbacks->warning) (info, msg, name, input_bfd,
+					 input_section, rel->r_offset);
 	}
     }
 
@@ -4171,7 +4169,7 @@ tilegx_elf_finish_dynamic_symbol (bfd *o
 	 the symbol was forced to be local because of a version file.
 	 The entry in the global offset table will already have been
 	 initialized in the relocate_section function.  */
-      if (info->shared
+      if (bfd_link_pic (info)
 	  && (info->symbolic || h->dynindx == -1)
 	  && h->def_regular)
 	{
@@ -4200,7 +4198,10 @@ tilegx_elf_finish_dynamic_symbol (bfd *o
       /* This symbols needs a copy reloc.  Set it up.  */
       BFD_ASSERT (h->dynindx != -1);
 
-      s = htab->srelbss;
+      if (h->root.u.def.section == htab->elf.sdynrelro)
+	s = htab->elf.sreldynrelro;
+      else
+	s = htab->elf.srelbss;
       BFD_ASSERT (s != NULL);
 
       rela.r_offset = (h->root.u.def.value
@@ -4322,7 +4323,7 @@ tilegx_elf_finish_dynamic_sections (bfd 
     {
       if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
 	  return FALSE;
 	}
@@ -4422,14 +4423,16 @@ tilegx_additional_program_headers (bfd *
 
 
 bfd_boolean
-_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   const char *targ1 = bfd_get_target (ibfd);
   const char *targ2 = bfd_get_target (obfd);
 
   if (strcmp (targ1, targ2) != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: Cannot link together %s and %s objects."),
 	 ibfd, targ1, targ2);
       bfd_set_error (bfd_error_bad_value);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-tilegx.h ./bfd/elfxx-tilegx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/elfxx-tilegx.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/elfxx-tilegx.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx ELF specific backend routines.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -96,4 +96,4 @@ extern bfd_boolean
 tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean
-_bfd_tilegx_elf_merge_private_bfd_data (bfd *, bfd *);
+_bfd_tilegx_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/epoc-pe-arm.c ./bfd/epoc-pe-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/epoc-pe-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/epoc-pe-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM EPOC PE files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/epoc-pei-arm.c ./bfd/epoc-pei-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/epoc-pei-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/epoc-pei-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM EPOC PE IMAGE COFF files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/format.c ./bfd/format.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/format.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/format.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic BFD support for file formats.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -104,6 +104,7 @@ struct bfd_preserve
   struct bfd_section *section_last;
   unsigned int section_count;
   struct bfd_hash_table section_htab;
+  const struct bfd_build_id *build_id;
 };
 
 /* When testing an object for compatibility with a particular target
@@ -126,6 +127,7 @@ bfd_preserve_save (bfd *abfd, struct bfd
   preserve->section_count = abfd->section_count;
   preserve->section_htab = abfd->section_htab;
   preserve->marker = bfd_alloc (abfd, 1);
+  preserve->build_id = abfd->build_id;
   if (preserve->marker == NULL)
     return FALSE;
 
@@ -158,6 +160,7 @@ bfd_preserve_restore (bfd *abfd, struct 
   abfd->sections = preserve->sections;
   abfd->section_last = preserve->section_last;
   abfd->section_count = preserve->section_count;
+  abfd->build_id = preserve->build_id;
 
   /* bfd_release frees all memory more recently bfd_alloc'd than
      its arg, as well as its arg.  */
@@ -203,6 +206,9 @@ bfd_boolean
 bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
 {
   extern const bfd_target binary_vec;
+#if BFD_SUPPORTS_PLUGINS
+  extern const bfd_target plugin_vec;
+#endif
   const bfd_target * const *target;
   const bfd_target **matching_vector = NULL;
   const bfd_target *save_targ, *right_targ, *ar_right_targ, *match_targ;
@@ -305,6 +311,16 @@ bfd_check_format_matches (bfd *abfd, bfd
       temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
       if (temp)
 	{
+	  int match_priority = temp->match_priority;
+#if BFD_SUPPORTS_PLUGINS
+	  /* If this object can be handled by a plugin, give that the
+	     lowest priority; objects both handled by a plugin and
+	     with an underlying object format will be claimed
+	     separately by the plugin.  */
+	  if (*target == &plugin_vec)
+	    match_priority = (*target)->match_priority;
+#endif
+
 	  match_targ = temp;
 	  if (preserve.marker != NULL)
 	    bfd_preserve_finish (abfd, &preserve);
@@ -326,9 +342,9 @@ bfd_check_format_matches (bfd *abfd, bfd
 		matching_vector[match_count] = temp;
 	      match_count++;
 
-	      if (temp->match_priority < best_match)
+	      if (match_priority < best_match)
 		{
-		  best_match = temp->match_priority;
+		  best_match = match_priority;
 		  best_count = 0;
 		}
 	      best_count++;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/freebsd.h ./bfd/freebsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/freebsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/freebsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end definitions used by all FreeBSD targets.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -25,31 +25,31 @@
 /* ZMAGIC files start at offset 0.  Does not apply to QMAGIC files. */
 #define TEXT_START_ADDR		0
 
-#define N_GETMAGIC_NET(exec) \
-	((exec).a_info & 0xffff)
-#define N_GETMID_NET(exec) \
-	(((exec).a_info >> 16) & 0x3ff)
-#define N_GETFLAG_NET(ex) \
-	(((exec).a_info >> 26) & 0x3f)
+#define N_GETMAGIC_NET(execp) \
+	((execp)->a_info & 0xffff)
+#define N_GETMID_NET(execp) \
+	(((execp)->a_info >> 16) & 0x3ff)
+#define N_GETFLAG_NET(exexp) \
+	(((execp)->a_info >> 26) & 0x3f)
 
-#define N_MACHTYPE(exec) \
+#define N_MACHTYPE(execp) \
 	((enum machine_type) \
-	 ((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETMID_NET (exec) : \
-	  ((exec).a_info >> 16) & 0x3ff))
-#define N_FLAGS(exec) \
-	((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETFLAG_NET (exec) : \
-	 ((exec).a_info >> 26) & 0x3f)
+	 ((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETMID_NET (execp) : \
+	  ((execp)->a_info >> 16) & 0x3ff))
+#define N_FLAGS(execp) \
+	((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETFLAG_NET (execp) : \
+	 ((execp)->a_info >> 26) & 0x3f)
 
-#define N_SET_INFO(exec, magic, type, flags) \
-	((exec).a_info = ((magic) & 0xffff) \
+#define N_SET_INFO(execp, magic, type, flags) \
+	((execp)->a_info = ((magic) & 0xffff) \
 	 | (((int)(type) & 0x3ff) << 16) \
 	 | (((flags) & 0x3f) << 26))
-#define N_SET_MACHTYPE(exec, machtype) \
-	((exec).a_info = \
-         ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
-#define N_SET_FLAGS(exec, flags) \
-	((exec).a_info = \
-	 ((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
+#define N_SET_MACHTYPE(execp, machtype) \
+	((execp)->a_info = \
+         ((execp)->a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
+#define N_SET_FLAGS(execp, flags) \
+	((execp)->a_info = \
+	 ((execp)->a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -82,25 +82,25 @@ MY (write_object_contents) (bfd *abfd)
     {
     case bfd_arch_m68k:
       if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
-	N_SET_MACHTYPE (*execp, M_68K4K_NETBSD);
+	N_SET_MACHTYPE (execp, M_68K4K_NETBSD);
       else
-	N_SET_MACHTYPE (*execp, M_68K_NETBSD);
+	N_SET_MACHTYPE (execp, M_68K_NETBSD);
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC_NETBSD);
+      N_SET_MACHTYPE (execp, M_SPARC_NETBSD);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386_NETBSD);
+      N_SET_MACHTYPE (execp, M_386_NETBSD);
       break;
     case bfd_arch_ns32k:
-      N_SET_MACHTYPE (*execp, M_532_NETBSD);
+      N_SET_MACHTYPE (execp, M_532_NETBSD);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
       break;
     }
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/gen-aout.c ./bfd/gen-aout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/gen-aout.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/gen-aout.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generate parameters for an a.out system.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -57,7 +57,7 @@ main (int argc, char** argv)
   fclose (file);
 
 #ifdef N_TXTOFF
-  page_size = N_TXTOFF(my_exec);
+  page_size = N_TXTOFF (&my_exec);
   if (page_size == 0)
     printf ("#define N_HEADER_IN_TEXT(x) 1\n");
   else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/genlink.h ./bfd/genlink.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/genlink.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/genlink.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* genlink.h -- interface to the BFD generic linker
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hash.c ./bfd/hash.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hash.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hash.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* hash.c -- hash table routines for BFD
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain <sac@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/host-aout.c ./bfd/host-aout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/host-aout.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/host-aout.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for local host's a.out binaries
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.  Probably John Gilmore's fault.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/alphalinux.h ./bfd/hosts/alphalinux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/alphalinux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/alphalinux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/alphavms.h ./bfd/hosts/alphavms.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/alphavms.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/alphavms.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* alphavms.h -- BFD definitions for an openVMS host
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Klaus Kämpf (kkaempf@progis.de)
    of proGIS Softwareentwicklung, Aachen, Germany
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/decstation.h ./bfd/hosts/decstation.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/decstation.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/decstation.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/delta68.h ./bfd/hosts/delta68.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/delta68.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/delta68.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/dpx2.h ./bfd/hosts/dpx2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/dpx2.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/dpx2.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/hp300bsd.h ./bfd/hosts/hp300bsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/hp300bsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/hp300bsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386bsd.h ./bfd/hosts/i386bsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386bsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/i386bsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386linux.h ./bfd/hosts/i386linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386linux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/i386linux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386mach3.h ./bfd/hosts/i386mach3.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386mach3.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/i386mach3.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386sco.h ./bfd/hosts/i386sco.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i386sco.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/i386sco.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i860mach3.h ./bfd/hosts/i860mach3.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/i860mach3.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/i860mach3.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m68kaux.h ./bfd/hosts/m68kaux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m68kaux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/m68kaux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m68klinux.h ./bfd/hosts/m68klinux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m68klinux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/m68klinux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m88kmach3.h ./bfd/hosts/m88kmach3.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/m88kmach3.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/m88kmach3.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/mipsbsd.h ./bfd/hosts/mipsbsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/mipsbsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/mipsbsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/mipsmach3.h ./bfd/hosts/mipsmach3.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/mipsmach3.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/mipsmach3.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/news.h ./bfd/hosts/news.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/news.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/news.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/news-mips.h ./bfd/hosts/news-mips.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/news-mips.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/news-mips.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/pc532mach.h ./bfd/hosts/pc532mach.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/pc532mach.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/pc532mach.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/riscos.h ./bfd/hosts/riscos.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/riscos.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/riscos.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/symmetry.h ./bfd/hosts/symmetry.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/symmetry.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/symmetry.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/tahoe.h ./bfd/hosts/tahoe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/tahoe.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/tahoe.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxbsd.h ./bfd/hosts/vaxbsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxbsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/vaxbsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxlinux.h ./bfd/hosts/vaxlinux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxlinux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/vaxlinux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxult2.h ./bfd/hosts/vaxult2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxult2.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/vaxult2.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxult.h ./bfd/hosts/vaxult.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/vaxult.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/vaxult.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/x86-64linux.h ./bfd/hosts/x86-64linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hosts/x86-64linux.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hosts/x86-64linux.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hp300bsd.c ./bfd/hp300bsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hp300bsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hp300bsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HP 9000/300 (68000-based) machines running BSD Unix.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hp300hpux.c ./bfd/hp300hpux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hp300hpux.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hp300hpux.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for hp-ux 9000/300
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Glenn Engel.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -224,32 +224,32 @@ MY (callback) (bfd *abfd)
   struct internal_exec *execp = exec_hdr (abfd);
 
   /* Calculate the file positions of the parts of a newly read aout header */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec (abfd)->vma = N_BSSADDR (execp);
 
   obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
 #endif
@@ -257,11 +257,11 @@ MY (callback) (bfd *abfd)
   if (obj_aout_subformat (abfd) == gnu_encap_format)
     {
       /* The file offsets of the relocation info */
-      obj_textsec (abfd)->rel_filepos = N_GNU_TRELOFF (*execp);
-      obj_datasec (abfd)->rel_filepos = N_GNU_DRELOFF (*execp);
+      obj_textsec (abfd)->rel_filepos = N_GNU_TRELOFF (execp);
+      obj_datasec (abfd)->rel_filepos = N_GNU_DRELOFF (execp);
 
       /* The file offsets of the string table and symbol table.  */
-      obj_sym_filepos (abfd) = N_GNU_SYMOFF (*execp);
+      obj_sym_filepos (abfd) = N_GNU_SYMOFF (execp);
       obj_str_filepos (abfd) = (obj_sym_filepos (abfd) + execp->a_syms);
 
       abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
@@ -280,15 +280,13 @@ MY (write_object_contents) (bfd * abfd)
 {
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
-  bfd_size_type text_size;	/* dummy vars */
-  file_ptr text_end;
 
   memset (&exec_bytes, 0, sizeof (exec_bytes));
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
   if (adata (abfd).magic == undecided_magic)
-    NAME (aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+    NAME (aout,adjust_sizes_and_vmas) (abfd);
   execp->a_syms = 0;
 
   execp->a_entry = bfd_get_start_address (abfd);
@@ -298,8 +296,8 @@ MY (write_object_contents) (bfd * abfd)
   execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
 		     obj_reloc_entry_size (abfd));
 
-  N_SET_MACHTYPE (*execp, 0xc);
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_MACHTYPE (execp, 0xc);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   NAME (aout,swap_exec_header_out) (abfd, execp, &exec_bytes);
 
@@ -319,7 +317,7 @@ MY (write_object_contents) (bfd * abfd)
   if (bfd_get_symcount (abfd) != 0)
     {
       /* Skip the relocs to where we want to put the symbols.  */
-      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp) + execp->a_drsize),
+      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp) + execp->a_drsize),
 		    SEEK_SET) != 0)
 	return FALSE;
     }
@@ -329,11 +327,11 @@ MY (write_object_contents) (bfd * abfd)
 
   if (bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) N_TRELOFF (*execp), SEEK_CUR) != 0)
+      if (bfd_seek (abfd, (file_ptr) N_TRELOFF (execp), SEEK_CUR) != 0)
 	return FALSE;
       if (!NAME (aout,squirt_out_relocs) (abfd, obj_textsec (abfd)))
 	return FALSE;
-      if (bfd_seek (abfd, (file_ptr) N_DRELOFF (*execp), SEEK_CUR) != 0)
+      if (bfd_seek (abfd, (file_ptr) N_DRELOFF (execp), SEEK_CUR) != 0)
 	return FALSE;
       if (!NAME (aout,squirt_out_relocs) (abfd, obj_datasec (abfd)))
 	return FALSE;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hppabsd-core.c ./bfd/hppabsd-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hppabsd-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hppabsd-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HPPA BSD core files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hpux-core.c ./bfd/hpux-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/hpux-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/hpux-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HP/UX core files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Stu Grossman, Cygnus Support.
    Converted to back-end form by Ian Lance Taylor, Cygnus SUpport
 
@@ -336,7 +336,7 @@ hpux_core_core_file_p (bfd *abfd)
      built.
      */
   if ((unknown_sections > 0) && (good_sections > 0))
-    (*_bfd_error_handler)
+    _bfd_error_handler
       ("%s appears to be a core file,\nbut contains unknown sections.  It may have been created on an incompatible\nversion of HP-UX.  As a result, some information may be unavailable.\n",
        abfd->filename);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386aout.c ./bfd/i386aout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386aout.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386aout.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -28,7 +28,7 @@
 #define N_HEADER_IN_TEXT(x)	0
 #define N_TXTOFF(x)   		0x20
 #define N_TXTADDR(x) 		(N_MAGIC (x) == ZMAGIC ? 0x1020 : 0)
-#define N_TXTSIZE(x) 		((x).a_text)
+#define N_TXTSIZE(x) 		((x)->a_text)
 #define TARGET_PAGE_SIZE 	4096
 #define SEGMENT_SIZE 		0x400000
 #define DEFAULT_ARCH 		bfd_arch_i386
@@ -54,7 +54,7 @@ i386aout_write_object_contents (bfd *abf
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_386);
+  N_SET_MACHTYPE (execp, M_386);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386bsd.c ./bfd/i386bsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386bsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386bsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries under BSD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386dynix.c ./bfd/i386dynix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386dynix.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386dynix.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries under dynix.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386freebsd.c ./bfd/i386freebsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386freebsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386freebsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for FreeBSD/386 a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386linux.c ./bfd/i386linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386linux.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386linux.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for linux flavored i386 a.out binaries.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -70,11 +70,11 @@ i386linux_write_object_contents (bfd *ab
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_386);
+  N_SET_MACHTYPE (execp, M_386);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
@@ -318,7 +318,7 @@ linux_add_one_symbol (struct bfd_link_in
 
   insert = FALSE;
 
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && linux_hash_table (info)->dynobj == NULL
       && strcmp (name, SHARABLE_CONFLICTS) == 0
       && (flags & BSF_CONSTRUCTOR) != 0
@@ -413,14 +413,14 @@ linux_tally_symbols (struct linux_link_h
 	alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
 
       if (p == NULL || alloc == NULL)
-	(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
-			       name);
+	_bfd_error_handler (_("Output file requires shared library `%s'\n"),
+			    name);
       else
 	{
 	  strcpy (alloc, name);
 	  p = strrchr (alloc, '_');
 	  *p++ = '\0';
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Output file requires shared library `%s.so.%s'\n"),
 	     alloc, p);
 	  free (alloc);
@@ -607,7 +607,7 @@ linux_finish_dynamic_link (bfd *output_b
       if (f->h->root.root.type != bfd_link_hash_defined
 	  && f->h->root.root.type != bfd_link_hash_defweak)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Symbol %s not defined for fixups\n"),
 	     f->h->root.root.root.string);
 	  continue;
@@ -657,7 +657,7 @@ linux_finish_dynamic_link (bfd *output_b
 	  if (f->h->root.root.type != bfd_link_hash_defined
 	      && f->h->root.root.type != bfd_link_hash_defweak)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("Symbol %s not defined for fixups\n"),
 		 f->h->root.root.root.string);
 	      continue;
@@ -682,7 +682,7 @@ linux_finish_dynamic_link (bfd *output_b
 
   if (linux_hash_table (info)->fixup_count != fixups_written)
     {
-      (*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
+      _bfd_error_handler (_("Warning: fixup count mismatch\n"));
       while (linux_hash_table (info)->fixup_count > fixups_written)
 	{
 	  bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386lynx.c ./bfd/i386lynx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386lynx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386lynx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries under LynxOS.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -36,10 +36,8 @@
 #ifndef WRITE_HEADERS
 #define WRITE_HEADERS(abfd, execp)					      \
       {									      \
-	bfd_size_type text_size; /* dummy vars */			      \
-	file_ptr text_end;						      \
 	if (adata(abfd).magic == undecided_magic)			      \
-	  NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);     \
+	  NAME(aout,adjust_sizes_and_vmas) (abfd);			      \
     									      \
 	execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;	      \
 	execp->a_entry = bfd_get_start_address (abfd);			      \
@@ -58,19 +56,19 @@
   									      \
 	if (bfd_get_symcount (abfd) != 0) 				      \
 	    {								      \
-	      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET)    \
+	      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET)    \
 		  != 0)							      \
 	        return FALSE;						      \
 									      \
 	      if (! NAME(aout,write_syms) (abfd)) return FALSE;		      \
 									      \
-	      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET)   \
+	      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET)   \
 		  != 0)							      \
 	        return FALSE;						      \
 									      \
 	      if (!NAME(lynx,squirt_out_relocs) (abfd, obj_textsec (abfd)))   \
 		return FALSE;						      \
-	      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET)   \
+	      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET)   \
 		  != 0)							      \
 	        return 0;						      \
 									      \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386mach3.c ./bfd/i386mach3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386mach3.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386mach3.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -32,7 +32,7 @@
 /* This macro is only relevant when N_MAGIC(x) == ZMAGIC.  */
 #define N_HEADER_IN_TEXT(x)	1
 
-#define N_TXTSIZE(x)	((x).a_text)
+#define N_TXTSIZE(x)	((x)->a_text)
 
 #include "sysdep.h"
 #include "bfd.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386msdos.c ./bfd/i386msdos.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386msdos.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386msdos.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MS-DOS executables.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Bryan Ford of the University of Utah.
 
    Contributed by the Center for Software Science at the
@@ -157,6 +157,7 @@ msdos_set_section_contents (bfd *abfd,
 #define msdos_bfd_final_link _bfd_generic_final_link
 #define msdos_bfd_link_split_section _bfd_generic_link_split_section
 #define msdos_set_arch_mach _bfd_generic_set_arch_mach
+#define msdos_bfd_link_check_relocs _bfd_generic_link_check_relocs
 
 #define msdos_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
 #define msdos_canonicalize_symtab _bfd_nosymbols_canonicalize_symtab
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386netbsd.c ./bfd/i386netbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386netbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386netbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/386 a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386os9k.c ./bfd/i386os9k.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/i386os9k.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/i386os9k.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for os9000 i386 binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -103,8 +103,8 @@ os9k_callback (bfd *abfd)
   obj_datasec (abfd)->filepos = execp->a_dload;
 
   /* The file positions of the relocation info ***
-  obj_textsec (abfd)->rel_filepos = N_TROFF(*execp);
-  obj_datasec (abfd)->rel_filepos =  N_DROFF(*execp);  */
+  obj_textsec (abfd)->rel_filepos = N_TROFF (execp);
+  obj_datasec (abfd)->rel_filepos =  N_DROFF (execp);  */
 
   adata (abfd).page_size = 1;	/* Not applicable.  */
   adata (abfd).segment_size = 1;/* Not applicable.  */
@@ -128,7 +128,7 @@ os9k_object_p (bfd *abfd)
     }
 
   anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       bfd_set_error (bfd_error_wrong_format);
       return 0;
@@ -183,6 +183,7 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE
   _bfd_generic_copy_link_hash_symbol_type
 #define os9k_bfd_final_link _bfd_generic_final_link
 #define os9k_bfd_link_split_section  _bfd_generic_link_split_section
+#define os9k_bfd_link_check_relocs   _bfd_generic_link_check_relocs
 
 const bfd_target i386_aout_os9k_vec =
   {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ieee.c ./bfd/ieee.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ieee.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ieee.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ieee-695 objects.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by Steve Chamberlain of Cygnus Support.
 
@@ -154,7 +154,8 @@ ieee_write_id (bfd *abfd, const char *id
     }
   else
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: string too long (%d chars, max 65535)"),
 	 bfd_get_filename (abfd), length);
       bfd_set_error (bfd_error_invalid_operation);
@@ -288,7 +289,8 @@ ieee_write_expression (bfd *abfd,
 	    }
 	  else
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: unrecognized symbol `%s' flags 0x%x"),
 		 bfd_get_filename (abfd), bfd_asymbol_name (symbol),
 		 symbol->flags);
@@ -823,7 +825,8 @@ ieee_slurp_external_symbols (bfd *abfd)
 		    parse_int (&ieee->h, &value);
 		    break;
 		  default:
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: unimplemented ATI record %u for symbol %u"),
 		       abfd, symbol_attribute_def, symbol_name_index);
 		    bfd_set_error (bfd_error_bad_value);
@@ -847,7 +850,8 @@ ieee_slurp_external_symbols (bfd *abfd)
 		parse_int (&ieee->h, &value);
 		if (value != 0x3f)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B: unexpected ATN type %d in external part"),
 			 abfd, (int) value);
 		    bfd_set_error (bfd_error_bad_value);
@@ -869,7 +873,7 @@ ieee_slurp_external_symbols (bfd *abfd)
 			break;
 
 		      default:
-			(*_bfd_error_handler)
+			_bfd_error_handler
 			  (_("%B: unexpected type after ATN"), abfd);
 			bfd_set_error (bfd_error_bad_value);
 			return FALSE;
@@ -2597,10 +2601,13 @@ write_int (int value)
 	{
 	case 4:
 	  OUT (value >> 24);
+	  /* Fall through.  */
 	case 3:
 	  OUT (value >> 16);
+	  /* Fall through.  */
 	case 2:
 	  OUT (value >> 8);
+	  /* Fall through.  */
 	case 1:
 	  OUT (value);
 	}
@@ -2753,15 +2760,19 @@ drop_int (struct output_buffer_struct *b
 	case 0x84:
 	  ch = THIS ();
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x83:
 	  ch = THIS ();
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x82:
 	  ch = THIS ();
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x81:
 	  ch = THIS ();
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x80:
 	  break;
 	}
@@ -2791,18 +2802,22 @@ copy_int (void)
 	  ch = THIS ();
 	  NEXT ();
 	  OUT (ch);
+	  /* Fall through.  */
 	case 0x83:
 	  ch = THIS ();
 	  NEXT ();
 	  OUT (ch);
+	  /* Fall through.  */
 	case 0x82:
 	  ch = THIS ();
 	  NEXT ();
 	  OUT (ch);
+	  /* Fall through.  */
 	case 0x81:
 	  ch = THIS ();
 	  NEXT ();
 	  OUT (ch);
+	  /* Fall through.  */
 	case 0x80:
 	  break;
 	}
@@ -2833,12 +2848,15 @@ copy_till_end (void)
 	case 0x84:
 	  OUT (THIS ());
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x83:
 	  OUT (THIS ());
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x82:
 	  OUT (THIS ());
 	  NEXT ();
+	  /* Fall through.  */
 	case 0x81:
 	  OUT (THIS ());
 	  NEXT ();
@@ -3863,6 +3881,7 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE
   _bfd_generic_copy_link_hash_symbol_type
 #define ieee_bfd_final_link _bfd_generic_final_link
 #define ieee_bfd_link_split_section  _bfd_generic_link_split_section
+#define ieee_bfd_link_check_relocs   _bfd_generic_link_check_relocs
 
 const bfd_target ieee_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ihex.c ./bfd/ihex.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ihex.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ihex.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel Hex objects.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -219,13 +219,14 @@ ihex_bad_byte (bfd *abfd, unsigned int l
       char buf[10];
 
       if (! ISPRINT (c))
-	sprintf (buf, "\\%03o", (unsigned int) c);
+	sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
       else
 	{
 	  buf[0] = c;
 	  buf[1] = '\0';
 	}
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B:%d: unexpected character `%s' in Intel Hex file"),
 	 abfd, lineno, buf);
       bfd_set_error (bfd_error_bad_value);
@@ -276,7 +277,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;
@@ -332,7 +333,8 @@ ihex_scan (bfd *abfd)
 	    chksum += HEX2 (buf + 2 * i);
 	  if (((- chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
 		 abfd, lineno,
 		 (- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
@@ -387,7 +389,8 @@ ihex_scan (bfd *abfd)
 	      /* An extended address record.  */
 	      if (len != 2)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B:%u: bad extended address record length in Intel Hex file"),
 		     abfd, lineno);
 		  bfd_set_error (bfd_error_bad_value);
@@ -404,7 +407,8 @@ ihex_scan (bfd *abfd)
 	      /* An extended start address record.  */
 	      if (len != 4)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B:%u: bad extended start address length in Intel Hex file"),
 		     abfd, lineno);
 		  bfd_set_error (bfd_error_bad_value);
@@ -421,7 +425,8 @@ ihex_scan (bfd *abfd)
 	      /* An extended linear address record.  */
 	      if (len != 2)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B:%u: bad extended linear address record length in Intel Hex file"),
 		     abfd, lineno);
 		  bfd_set_error (bfd_error_bad_value);
@@ -438,7 +443,8 @@ ihex_scan (bfd *abfd)
 	      /* An extended linear start address record.  */
 	      if (len != 2 && len != 4)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B:%u: bad extended linear start address length in Intel Hex file"),
 		     abfd, lineno);
 		  bfd_set_error (bfd_error_bad_value);
@@ -455,7 +461,8 @@ ihex_scan (bfd *abfd)
 	      break;
 
 	    default:
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B:%u: unrecognized ihex type %u in Intel Hex file"),
 		 abfd, lineno, type);
 	      bfd_set_error (bfd_error_bad_value);
@@ -553,7 +560,7 @@ ihex_read_section (bfd *abfd, asection *
   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;
@@ -574,7 +581,7 @@ ihex_read_section (bfd *abfd, asection *
       /* We should only see type 0 records here.  */
       if (type != 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("%B: internal error in ihex_read_section"), abfd);
 	  bfd_set_error (bfd_error_bad_value);
 	  goto error_return;
@@ -608,7 +615,7 @@ ihex_read_section (bfd *abfd, asection *
 
   if ((bfd_size_type) (p - contents) < section->size)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: bad section length in ihex_read_section"), abfd);
       bfd_set_error (bfd_error_bad_value);
       goto error_return;
@@ -821,7 +828,8 @@ ihex_write_object_contents (bfd *abfd)
 		      char buf[20];
 
 		      sprintf_vma (buf, where);
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%s: address 0x%s out of range for Intel Hex file"),
 			 bfd_get_filename (abfd), buf);
 		      bfd_set_error (bfd_error_bad_value);
@@ -940,10 +948,10 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE
 #define ihex_bfd_link_hash_table_create           _bfd_generic_link_hash_table_create
 #define ihex_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define ihex_bfd_link_just_syms                   _bfd_generic_link_just_syms
-#define ihex_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
+#define ihex_bfd_copy_link_hash_symbol_type       _bfd_generic_copy_link_hash_symbol_type
 #define ihex_bfd_final_link                       _bfd_generic_final_link
 #define ihex_bfd_link_split_section               _bfd_generic_link_split_section
+#define ihex_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 /* The Intel Hex target vector.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/init.c ./bfd/init.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/init.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/init.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd initialization stuff
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/irix-core.c ./bfd/irix-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/irix-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/irix-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Irix core files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Stu Grossman, Cygnus Support.
    Converted to back-end form by Ian Lance Taylor, Cygnus Support
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libaout.h ./bfd/libaout.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libaout.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libaout.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end data structures for a.out (and similar) files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -291,48 +291,48 @@ enum machine_type
   M_CRIS = 255		  /* Axis CRIS binary.  */
 };
 
-#define N_DYNAMIC(exec) ((exec).a_info & 0x80000000)
+#define N_DYNAMIC(execp) ((execp)->a_info & 0x80000000)
 
 #ifndef N_MAGIC
-# define N_MAGIC(exec) ((exec).a_info & 0xffff)
+# define N_MAGIC(execp) ((execp)->a_info & 0xffff)
 #endif
 
 #ifndef N_MACHTYPE
-# define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+# define N_MACHTYPE(execp) ((enum machine_type)(((execp)->a_info >> 16) & 0xff))
 #endif
 
 #ifndef N_FLAGS
-# define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+# define N_FLAGS(execp) (((execp)->a_info >> 24) & 0xff)
 #endif
 
 #ifndef N_SET_INFO
-# define N_SET_INFO(exec, magic, type, flags) \
-((exec).a_info = ((magic) & 0xffff) \
+# define N_SET_INFO(execp, magic, type, flags) \
+((execp)->a_info = ((magic) & 0xffff) \
  | (((int)(type) & 0xff) << 16) \
  | (((flags) & 0xff) << 24))
 #endif
 
 #ifndef N_SET_DYNAMIC
-# define N_SET_DYNAMIC(exec, dynamic) \
-((exec).a_info = (dynamic) ? (long) ((exec).a_info | 0x80000000) : \
-((exec).a_info & 0x7fffffff))
+# define N_SET_DYNAMIC(execp, dynamic) \
+((execp)->a_info = (dynamic) ? (long) ((execp)->a_info | 0x80000000) : \
+((execp)->a_info & 0x7fffffff))
 #endif
 
 #ifndef N_SET_MAGIC
-# define N_SET_MAGIC(exec, magic) \
-((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+# define N_SET_MAGIC(execp, magic) \
+((execp)->a_info = (((execp)->a_info & 0xffff0000) | ((magic) & 0xffff)))
 #endif
 
 #ifndef N_SET_MACHTYPE
-# define N_SET_MACHTYPE(exec, machtype) \
-((exec).a_info = \
- ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+# define N_SET_MACHTYPE(execp, machtype) \
+((execp)->a_info = \
+ ((execp)->a_info & 0xff00ffff) | ((((int) (machtype)) &0xff) << 16))
 #endif
 
 #ifndef N_SET_FLAGS
-# define N_SET_FLAGS(exec, flags) \
-((exec).a_info = \
- ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+# define N_SET_FLAGS(execp, flags) \
+((execp)->a_info = \
+ ((execp)->a_info & 0x00ffffff) | (((flags) & 0xff) << 24))
 #endif
 
 typedef struct aout_symbol
@@ -564,7 +564,7 @@ extern int NAME (aout, sizeof_headers)
   (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
-  (bfd *, bfd_size_type *, file_ptr *);
+  (bfd *);
 
 extern void NAME (aout, swap_exec_header_in)
   (bfd *, struct external_exec *, struct internal_exec *);
@@ -624,11 +624,8 @@ extern bfd_boolean NAME (aout, bfd_free_
 #ifndef WRITE_HEADERS
 #define WRITE_HEADERS(abfd, execp)					      \
       {									      \
-	bfd_size_type text_size; /* Dummy vars.  */			      \
-	file_ptr text_end;						      \
-       									      \
 	if (adata(abfd).magic == undecided_magic)			      \
-	  NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); \
+	  NAME (aout, adjust_sizes_and_vmas) (abfd);			      \
     									      \
 	execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;	      \
 	execp->a_entry = bfd_get_start_address (abfd);			      \
@@ -648,19 +645,19 @@ extern bfd_boolean NAME (aout, bfd_free_
 	if (bfd_get_outsymbols (abfd) != NULL				      \
 	    && bfd_get_symcount (abfd) != 0) 				      \
 	  {								      \
-	    if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)\
+	    if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)\
 	      return FALSE;						      \
 									      \
 	    if (! NAME (aout, write_syms) (abfd))			      \
 	      return FALSE;						      \
 	  }								      \
 									      \
-	if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)  \
+	if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0)   \
 	  return FALSE;						      	      \
 	if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))       \
 	  return FALSE;						      	      \
 									      \
-	if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)  \
+	if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0)   \
 	  return FALSE;						      	      \
 	if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))       \
 	  return FALSE;						      	      \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd.c ./bfd/libbfd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libbfd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Assorted BFD support routines, only used internally.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -785,7 +785,8 @@ _bfd_generic_get_section_contents (bfd *
 
   if (section->compress_status != COMPRESS_SECTION_NONE)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: unable to get decompressed section %A"),
 	 abfd, section);
       bfd_set_error (bfd_error_invalid_operation);
@@ -922,40 +923,14 @@ bfd_generic_is_local_label_name (bfd *ab
   return name[0] == locals_prefix;
 }
 
-/*  Can be used from / for bfd_merge_private_bfd_data to check that
-    endianness matches between input and output file.  Returns
-    TRUE for a match, otherwise returns FALSE and emits an error.  */
-bfd_boolean
-_bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
-{
-  if (ibfd->xvec->byteorder != obfd->xvec->byteorder
-      && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
-      && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
-    {
-      const char *msg;
-
-      if (bfd_big_endian (ibfd))
-	msg = _("%B: compiled for a big endian system and target is little endian");
-      else
-	msg = _("%B: compiled for a little endian system and target is big endian");
-
-      (*_bfd_error_handler) (msg, ibfd);
-
-      bfd_set_error (bfd_error_wrong_format);
-      return FALSE;
-    }
-
-  return TRUE;
-}
-
 /* Give a warning at runtime if someone compiles code which calls
    old routines.  */
 
 void
-warn_deprecated (const char *what,
-		 const char *file,
-		 int line,
-		 const char *func)
+_bfd_warn_deprecated (const char *what,
+		      const char *file,
+		      int line,
+		      const char *func)
 {
   /* Poor man's tracking of functions we've already warned about.  */
   static size_t mask = 0;
@@ -966,6 +941,7 @@ warn_deprecated (const char *what,
       /* Note: separate sentences in order to allow
 	 for translation into other languages.  */
       if (func)
+	/* xgettext:c-format */
 	fprintf (stderr, _("Deprecated %s called at %s line %d in %s\n"),
 		 what, file, line, func);
       else
@@ -978,9 +954,9 @@ warn_deprecated (const char *what,
 /* Helper function for reading uleb128 encoded data.  */
 
 bfd_vma
-read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
-		      bfd_byte *buf,
-		      unsigned int *bytes_read_ptr)
+_bfd_read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+			   bfd_byte *buf,
+			   unsigned int *bytes_read_ptr)
 {
   bfd_vma result;
   unsigned int num_read;
@@ -1009,11 +985,11 @@ read_unsigned_leb128 (bfd *abfd ATTRIBUT
    No bytes will be read at address END or beyond.  */
 
 bfd_vma
-safe_read_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
-		  bfd_byte *data,
-		  unsigned int *length_return,
-		  bfd_boolean sign,
-		  const bfd_byte * const end)
+_bfd_safe_read_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+		       bfd_byte *data,
+		       unsigned int *length_return,
+		       bfd_boolean sign,
+		       const bfd_byte * const end)
 {
   bfd_vma result = 0;
   unsigned int num_read = 0;
@@ -1037,7 +1013,7 @@ safe_read_leb128 (bfd *abfd ATTRIBUTE_UN
     *length_return = num_read;
 
   if (sign && (shift < 8 * sizeof (result)) && (byte & 0x40))
-    result |= (bfd_vma) -1 << shift;
+    result |= -((bfd_vma) 1 << shift);
 
   return result;
 }
@@ -1045,9 +1021,9 @@ safe_read_leb128 (bfd *abfd ATTRIBUTE_UN
 /* Helper function for reading sleb128 encoded data.  */
 
 bfd_signed_vma
-read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
-		    bfd_byte *buf,
-		    unsigned int *bytes_read_ptr)
+_bfd_read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+			 bfd_byte *buf,
+			 unsigned int *bytes_read_ptr)
 {
   bfd_vma result;
   unsigned int shift;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd.h ./bfd/libbfd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libbfd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,12 +1,12 @@
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "libbfd-in.h", "init.c", "libbfd.c", "bfdio.c", 
-   "bfdwin.c", "cache.c", "reloc.c", "archures.c" and "elf.c".
+   generated from "libbfd-in.h", "libbfd.c", "bfdio.c", "bfdwin.c", 
+   "cache.c", "reloc.c", "archures.c" and "linker.c".
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* libbfd.h -- Declarations used by bfd library *implementation*.
    (This include file is not for users of the library.)
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by Cygnus Support.
 
@@ -33,15 +33,6 @@
 extern "C" {
 #endif
 
-/* Align an address upward to a boundary, expressed as a number of bytes.
-   E.g. align to an 8-byte boundary with argument of 8.  Take care never
-   to wrap around if the address is within boundary-1 of the end of the
-   address space.  */
-#define BFD_ALIGN(this, boundary)					  \
-  ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this))		  \
-   ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
-   : ~ (bfd_vma) 0)
-
 /* If you want to read and write large blocks, you might want to do it
    in quanta of this amount */
 #define DEFAULT_BUFFERSIZE 8192
@@ -123,9 +114,7 @@ extern void *bfd_realloc2
 extern void *bfd_zmalloc2
   (bfd_size_type, bfd_size_type);
 
-extern void _bfd_default_error_handler (const char *s, ...);
-extern bfd_error_handler_type _bfd_error_handler;
-extern bfd_assert_handler_type _bfd_assert_handler;
+extern void _bfd_error_handler (const char *s, ...);
 
 /* These routines allocate and free things on the BFD's objalloc.  */
 
@@ -154,6 +143,29 @@ bfd_boolean bfd_slurp_bsd_armap_f2
   (bfd *abfd);
 #define bfd_slurp_bsd_armap bfd_slurp_armap
 #define bfd_slurp_coff_armap bfd_slurp_armap
+bfd_boolean _bfd_archive_64_bit_slurp_armap
+  (bfd *);
+bfd_boolean _bfd_archive_64_bit_write_armap
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
+#define _bfd_archive_64_bit_slurp_extended_name_table \
+  _bfd_slurp_extended_name_table
+#define _bfd_archive_64_bit_construct_extended_name_table \
+  _bfd_archive_coff_construct_extended_name_table
+#define _bfd_archive_64_bit_truncate_arname \
+  bfd_dont_truncate_arname
+#define _bfd_archive_64_bit_read_ar_hdr \
+  _bfd_generic_read_ar_hdr
+#define _bfd_archive_64_bit_write_ar_hdr \
+  _bfd_generic_write_ar_hdr
+#define _bfd_archive_64_bit_openr_next_archived_file \
+  bfd_generic_openr_next_archived_file
+#define _bfd_archive_64_bit_get_elt_at_index \
+  _bfd_generic_get_elt_at_index
+#define _bfd_archive_64_bit_generic_stat_arch_elt \
+  bfd_generic_stat_arch_elt
+#define _bfd_archive_64_bit_update_armap_timestamp \
+  bfd_true
+
 bfd_boolean _bfd_slurp_extended_name_table
   (bfd *abfd);
 extern bfd_boolean _bfd_construct_extended_name_table
@@ -200,11 +212,11 @@ void bfd_bsd_truncate_arname
 void bfd_gnu_truncate_arname
   (bfd *abfd, const char *filename, char *hdr);
 
-bfd_boolean bsd_write_armap
+bfd_boolean _bfd_bsd_write_armap
   (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
    int stridx);
 
-bfd_boolean coff_write_armap
+bfd_boolean _bfd_coff_write_armap
   (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
    int stridx);
 
@@ -255,7 +267,7 @@ extern bfd_boolean _bfd_generic_get_sect
 #define _bfd_generic_bfd_copy_private_bfd_data \
   ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
 #define _bfd_generic_bfd_set_private_flags \
   ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
 #define _bfd_generic_bfd_copy_private_section_data \
@@ -314,7 +326,7 @@ extern int _bfd_nocore_core_file_pid
 extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd_write_armap bsd_write_armap
+#define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap
 #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_bsd_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_bsd_openr_next_archived_file \
@@ -334,7 +346,7 @@ extern bfd_boolean _bfd_archive_bsd_upda
 extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
-#define _bfd_archive_coff_write_armap coff_write_armap
+#define _bfd_archive_coff_write_armap _bfd_coff_write_armap
 #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_coff_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_coff_openr_next_archived_file \
@@ -353,7 +365,7 @@ extern bfd_boolean _bfd_archive_coff_con
 extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd44_write_armap bsd_write_armap
+#define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap
 #define _bfd_archive_bsd44_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_bsd44_write_ar_hdr _bfd_bsd44_write_ar_hdr
 #define _bfd_archive_bsd44_openr_next_archived_file \
@@ -366,16 +378,18 @@ extern bfd_boolean _bfd_archive_bsd44_co
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get VMS style
    archives.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_vms_lib).  Some of them
-   are irrelevant and never called, so defined as NULL.  */
+   are irrelevant.  */
 
 extern bfd_boolean _bfd_vms_lib_write_archive_contents (bfd *arch);
-#define _bfd_vms_lib_slurp_armap NULL
-#define _bfd_vms_lib_slurp_extended_name_table NULL
-#define _bfd_vms_lib_construct_extended_name_table NULL
-#define _bfd_vms_lib_truncate_arname NULL
-#define _bfd_vms_lib_write_armap NULL
-#define _bfd_vms_lib_read_ar_hdr NULL
-#define _bfd_vms_lib_write_ar_hdr NULL
+#define _bfd_vms_lib_slurp_armap _bfd_noarchive_slurp_armap
+#define _bfd_vms_lib_slurp_extended_name_table \
+  _bfd_noarchive_slurp_extended_name_table
+#define _bfd_vms_lib_construct_extended_name_table \
+  _bfd_noarchive_construct_extended_name_table
+#define _bfd_vms_lib_truncate_arname _bfd_noarchive_truncate_arname
+#define _bfd_vms_lib_write_armap _bfd_noarchive_write_armap
+#define _bfd_vms_lib_read_ar_hdr _bfd_noarchive_read_ar_hdr
+#define _bfd_vms_lib_write_ar_hdr _bfd_noarchive_write_ar_hdr
 extern bfd *_bfd_vms_lib_openr_next_archived_file (bfd *, bfd *);
 extern bfd *_bfd_vms_lib_get_elt_at_index (bfd *, symindex);
 extern int _bfd_vms_lib_generic_stat_arch_elt (bfd *, struct stat *);
@@ -504,6 +518,8 @@ extern bfd_boolean _bfd_generic_set_sect
 #define _bfd_nolink_bfd_define_common_symbol \
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \
 		     struct bfd_link_hash_entry *)) bfd_false)
+#define _bfd_nolink_bfd_link_check_relocs \
+  _bfd_generic_link_check_relocs
 
 /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
    have dynamic symbols or relocs.  Use BFD_JUMP_TABLE_DYNAMIC
@@ -559,7 +575,7 @@ extern bfd_boolean _bfd_dwarf2_find_near
 /* Find the bias between DWARF addresses and real addresses.  */
 extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias
   (asymbol **, void **);
-  
+
 /* Find inliner info after calling bfd_find_nearest_line. */
 extern bfd_boolean _bfd_dwarf2_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *, void **);
@@ -602,12 +618,6 @@ extern void _bfd_generic_link_hash_table
 extern bfd_boolean _bfd_generic_link_add_symbols
   (bfd *, struct bfd_link_info *);
 
-/* Generic add symbol routine.  This version is used by targets for
-   which the linker must collect constructors and destructors by name,
-   as the collect2 program does.  */
-extern bfd_boolean _bfd_generic_link_add_symbols_collect
-  (bfd *, struct bfd_link_info *);
-
 /* Generic archive add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_archive_symbols
   (bfd *, struct bfd_link_info *,
@@ -740,10 +750,6 @@ extern bfd_size_type _bfd_stringtab_add
 /* Write out a string table.  */
 extern bfd_boolean _bfd_stringtab_emit
   (bfd *, struct bfd_strtab_hash *);
-
-/* Check that endianness of input and output file match.  */
-extern bfd_boolean _bfd_generic_verify_endian_match
-  (bfd *, bfd *);
 
 /* Macros to tell if bfds are read or write enabled.
 
@@ -781,9 +787,9 @@ extern void _bfd_abort
 
 /* Manipulate a system FILE but using BFD's "file_ptr", rather than
    the system "off_t" or "off64_t", as the offset.  */
-extern file_ptr real_ftell (FILE *file);
-extern int real_fseek (FILE *file, file_ptr offset, int whence);
-extern FILE *real_fopen (const char *filename, const char *modes);
+extern file_ptr _bfd_real_ftell (FILE *file);
+extern int _bfd_real_fseek (FILE *file, file_ptr offset, int whence);
+extern FILE *_bfd_real_fopen (const char *filename, const char *modes);
 
 /* List of supported target vectors, and the default vector (if
    bfd_default_vector[0] is NULL, there is no default).  */
@@ -850,11 +856,10 @@ extern void bfd_section_already_linked_t
   (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
 		    void *), void *);
 
-extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
-extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
-extern bfd_vma safe_read_leb128 (bfd *, bfd_byte *, unsigned int *,
-				 bfd_boolean, const bfd_byte * const);
-/* Extracted from init.c.  */
+extern bfd_vma _bfd_read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_signed_vma _bfd_read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_vma _bfd_safe_read_leb128 (bfd *, bfd_byte *, unsigned int *,
+				      bfd_boolean, const bfd_byte * const);
 /* Extracted from libbfd.c.  */
 bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
 
@@ -1131,6 +1136,7 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_MICROMIPS_7_PCREL_S1",
   "BFD_RELOC_MICROMIPS_10_PCREL_S1",
   "BFD_RELOC_MICROMIPS_16_PCREL_S1",
+  "BFD_RELOC_MIPS16_16_PCREL_S1",
   "BFD_RELOC_MIPS_21_PCREL_S2",
   "BFD_RELOC_MIPS_26_PCREL_S2",
   "BFD_RELOC_MIPS_18_PCREL_S3",
@@ -1292,6 +1298,7 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_386_TLS_DESC_CALL",
   "BFD_RELOC_386_TLS_DESC",
   "BFD_RELOC_386_IRELATIVE",
+  "BFD_RELOC_386_GOT32X",
   "BFD_RELOC_X86_64_GOT32",
   "BFD_RELOC_X86_64_PLT32",
   "BFD_RELOC_X86_64_COPY",
@@ -1321,6 +1328,8 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_X86_64_IRELATIVE",
   "BFD_RELOC_X86_64_PC32_BND",
   "BFD_RELOC_X86_64_PLT32_BND",
+  "BFD_RELOC_X86_64_GOTPCRELX",
+  "BFD_RELOC_X86_64_REX_GOTPCRELX",
   "BFD_RELOC_NS32K_IMM_8",
   "BFD_RELOC_NS32K_IMM_16",
   "BFD_RELOC_NS32K_IMM_32",
@@ -1388,6 +1397,8 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_PPC_VLE_SDAREL_HI16D",
   "BFD_RELOC_PPC_VLE_SDAREL_HA16A",
   "BFD_RELOC_PPC_VLE_SDAREL_HA16D",
+  "BFD_RELOC_PPC_16DX_HA",
+  "BFD_RELOC_PPC_REL16DX_HA",
   "BFD_RELOC_PPC64_HIGHER",
   "BFD_RELOC_PPC64_HIGHER_S",
   "BFD_RELOC_PPC64_HIGHEST",
@@ -1414,6 +1425,7 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_PPC64_ADDR16_HIGH",
   "BFD_RELOC_PPC64_ADDR16_HIGHA",
   "BFD_RELOC_PPC64_ADDR64_LOCAL",
+  "BFD_RELOC_PPC64_ENTRY",
   "BFD_RELOC_PPC_TLS",
   "BFD_RELOC_PPC_TLSGD",
   "BFD_RELOC_PPC_TLSLD",
@@ -1540,6 +1552,10 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_ARM_LDC_SB_G2",
   "BFD_RELOC_ARM_V4BX",
   "BFD_RELOC_ARM_IRELATIVE",
+  "BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC",
+  "BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC",
+  "BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC",
+  "BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC",
   "BFD_RELOC_ARM_IMMEDIATE",
   "BFD_RELOC_ARM_ADRL_IMMEDIATE",
   "BFD_RELOC_ARM_T32_IMMEDIATE",
@@ -1663,8 +1679,74 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_SH_GOTOFFFUNCDESC",
   "BFD_RELOC_SH_GOTOFFFUNCDESC20",
   "BFD_RELOC_SH_FUNCDESC",
-  "BFD_RELOC_ARC_B22_PCREL",
-  "BFD_RELOC_ARC_B26",
+  "BFD_RELOC_ARC_NONE",
+  "BFD_RELOC_ARC_8",
+  "BFD_RELOC_ARC_16",
+  "BFD_RELOC_ARC_24",
+  "BFD_RELOC_ARC_32",
+  "BFD_RELOC_ARC_N8",
+  "BFD_RELOC_ARC_N16",
+  "BFD_RELOC_ARC_N24",
+  "BFD_RELOC_ARC_N32",
+  "BFD_RELOC_ARC_SDA",
+  "BFD_RELOC_ARC_SECTOFF",
+  "BFD_RELOC_ARC_S21H_PCREL",
+  "BFD_RELOC_ARC_S21W_PCREL",
+  "BFD_RELOC_ARC_S25H_PCREL",
+  "BFD_RELOC_ARC_S25W_PCREL",
+  "BFD_RELOC_ARC_SDA32",
+  "BFD_RELOC_ARC_SDA_LDST",
+  "BFD_RELOC_ARC_SDA_LDST1",
+  "BFD_RELOC_ARC_SDA_LDST2",
+  "BFD_RELOC_ARC_SDA16_LD",
+  "BFD_RELOC_ARC_SDA16_LD1",
+  "BFD_RELOC_ARC_SDA16_LD2",
+  "BFD_RELOC_ARC_S13_PCREL",
+  "BFD_RELOC_ARC_W",
+  "BFD_RELOC_ARC_32_ME",
+  "BFD_RELOC_ARC_32_ME_S",
+  "BFD_RELOC_ARC_N32_ME",
+  "BFD_RELOC_ARC_SECTOFF_ME",
+  "BFD_RELOC_ARC_SDA32_ME",
+  "BFD_RELOC_ARC_W_ME",
+  "BFD_RELOC_AC_SECTOFF_U8",
+  "BFD_RELOC_AC_SECTOFF_U8_1",
+  "BFD_RELOC_AC_SECTOFF_U8_2",
+  "BFD_RELOC_AC_SECTOFF_S9",
+  "BFD_RELOC_AC_SECTOFF_S9_1",
+  "BFD_RELOC_AC_SECTOFF_S9_2",
+  "BFD_RELOC_ARC_SECTOFF_ME_1",
+  "BFD_RELOC_ARC_SECTOFF_ME_2",
+  "BFD_RELOC_ARC_SECTOFF_1",
+  "BFD_RELOC_ARC_SECTOFF_2",
+  "BFD_RELOC_ARC_SDA_12",
+  "BFD_RELOC_ARC_SDA16_ST2",
+  "BFD_RELOC_ARC_32_PCREL",
+  "BFD_RELOC_ARC_PC32",
+  "BFD_RELOC_ARC_GOT32",
+  "BFD_RELOC_ARC_GOTPC32",
+  "BFD_RELOC_ARC_PLT32",
+  "BFD_RELOC_ARC_COPY",
+  "BFD_RELOC_ARC_GLOB_DAT",
+  "BFD_RELOC_ARC_JMP_SLOT",
+  "BFD_RELOC_ARC_RELATIVE",
+  "BFD_RELOC_ARC_GOTOFF",
+  "BFD_RELOC_ARC_GOTPC",
+  "BFD_RELOC_ARC_S21W_PCREL_PLT",
+  "BFD_RELOC_ARC_S25H_PCREL_PLT",
+  "BFD_RELOC_ARC_TLS_DTPMOD",
+  "BFD_RELOC_ARC_TLS_TPOFF",
+  "BFD_RELOC_ARC_TLS_GD_GOT",
+  "BFD_RELOC_ARC_TLS_GD_LD",
+  "BFD_RELOC_ARC_TLS_GD_CALL",
+  "BFD_RELOC_ARC_TLS_IE_GOT",
+  "BFD_RELOC_ARC_TLS_DTPOFF",
+  "BFD_RELOC_ARC_TLS_DTPOFF_S9",
+  "BFD_RELOC_ARC_TLS_LE_S9",
+  "BFD_RELOC_ARC_TLS_LE_32",
+  "BFD_RELOC_ARC_S25W_PCREL_PLT",
+  "BFD_RELOC_ARC_S21H_PCREL_PLT",
+  "BFD_RELOC_ARC_NPS_CMEM16",
   "BFD_RELOC_BFIN_16_IMM",
   "BFD_RELOC_BFIN_16_HIGH",
   "BFD_RELOC_BFIN_4_PCREL",
@@ -2081,6 +2163,53 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_AVR_LDS_STS_16",
   "BFD_RELOC_AVR_PORT6",
   "BFD_RELOC_AVR_PORT5",
+  "BFD_RELOC_RISCV_HI20",
+  "BFD_RELOC_RISCV_PCREL_HI20",
+  "BFD_RELOC_RISCV_PCREL_LO12_I",
+  "BFD_RELOC_RISCV_PCREL_LO12_S",
+  "BFD_RELOC_RISCV_LO12_I",
+  "BFD_RELOC_RISCV_LO12_S",
+  "BFD_RELOC_RISCV_GPREL12_I",
+  "BFD_RELOC_RISCV_GPREL12_S",
+  "BFD_RELOC_RISCV_TPREL_HI20",
+  "BFD_RELOC_RISCV_TPREL_LO12_I",
+  "BFD_RELOC_RISCV_TPREL_LO12_S",
+  "BFD_RELOC_RISCV_TPREL_ADD",
+  "BFD_RELOC_RISCV_CALL",
+  "BFD_RELOC_RISCV_CALL_PLT",
+  "BFD_RELOC_RISCV_ADD8",
+  "BFD_RELOC_RISCV_ADD16",
+  "BFD_RELOC_RISCV_ADD32",
+  "BFD_RELOC_RISCV_ADD64",
+  "BFD_RELOC_RISCV_SUB8",
+  "BFD_RELOC_RISCV_SUB16",
+  "BFD_RELOC_RISCV_SUB32",
+  "BFD_RELOC_RISCV_SUB64",
+  "BFD_RELOC_RISCV_GOT_HI20",
+  "BFD_RELOC_RISCV_TLS_GOT_HI20",
+  "BFD_RELOC_RISCV_TLS_GD_HI20",
+  "BFD_RELOC_RISCV_JMP",
+  "BFD_RELOC_RISCV_TLS_DTPMOD32",
+  "BFD_RELOC_RISCV_TLS_DTPREL32",
+  "BFD_RELOC_RISCV_TLS_DTPMOD64",
+  "BFD_RELOC_RISCV_TLS_DTPREL64",
+  "BFD_RELOC_RISCV_TLS_TPREL32",
+  "BFD_RELOC_RISCV_TLS_TPREL64",
+  "BFD_RELOC_RISCV_ALIGN",
+  "BFD_RELOC_RISCV_RVC_BRANCH",
+  "BFD_RELOC_RISCV_RVC_JUMP",
+  "BFD_RELOC_RISCV_RVC_LUI",
+  "BFD_RELOC_RISCV_GPREL_I",
+  "BFD_RELOC_RISCV_GPREL_S",
+  "BFD_RELOC_RISCV_TPREL_I",
+  "BFD_RELOC_RISCV_TPREL_S",
+  "BFD_RELOC_RISCV_RELAX",
+  "BFD_RELOC_RISCV_CFA",
+  "BFD_RELOC_RISCV_SUB6",
+  "BFD_RELOC_RISCV_SET6",
+  "BFD_RELOC_RISCV_SET8",
+  "BFD_RELOC_RISCV_SET16",
+  "BFD_RELOC_RISCV_SET32",
   "BFD_RELOC_RL78_NEG8",
   "BFD_RELOC_RL78_NEG16",
   "BFD_RELOC_RL78_NEG24",
@@ -2613,6 +2742,18 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_NIOS2_R2_L5I4X1",
   "BFD_RELOC_NIOS2_R2_T1X1I6",
   "BFD_RELOC_NIOS2_R2_T1X1I6_2",
+  "BFD_RELOC_PRU_U16",
+  "BFD_RELOC_PRU_U16_PMEMIMM",
+  "BFD_RELOC_PRU_LDI32",
+  "BFD_RELOC_PRU_S10_PCREL",
+  "BFD_RELOC_PRU_U8_PCREL",
+  "BFD_RELOC_PRU_32_PMEM",
+  "BFD_RELOC_PRU_16_PMEM",
+  "BFD_RELOC_PRU_GNU_DIFF8",
+  "BFD_RELOC_PRU_GNU_DIFF16",
+  "BFD_RELOC_PRU_GNU_DIFF32",
+  "BFD_RELOC_PRU_GNU_DIFF16_PMEM",
+  "BFD_RELOC_PRU_GNU_DIFF32_PMEM",
   "BFD_RELOC_IQ2000_OFFSET_16",
   "BFD_RELOC_IQ2000_OFFSET_21",
   "BFD_RELOC_IQ2000_UHI16",
@@ -2682,15 +2823,19 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_MACH_O_SECTDIFF",
   "BFD_RELOC_MACH_O_LOCAL_SECTDIFF",
   "BFD_RELOC_MACH_O_PAIR",
+  "BFD_RELOC_MACH_O_SUBTRACTOR32",
+  "BFD_RELOC_MACH_O_SUBTRACTOR64",
   "BFD_RELOC_MACH_O_X86_64_BRANCH32",
   "BFD_RELOC_MACH_O_X86_64_BRANCH8",
   "BFD_RELOC_MACH_O_X86_64_GOT",
   "BFD_RELOC_MACH_O_X86_64_GOT_LOAD",
-  "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32",
-  "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64",
   "BFD_RELOC_MACH_O_X86_64_PCREL32_1",
   "BFD_RELOC_MACH_O_X86_64_PCREL32_2",
   "BFD_RELOC_MACH_O_X86_64_PCREL32_4",
+  "BFD_RELOC_MACH_O_ARM64_ADDEND",
+  "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21",
+  "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12",
+  "BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT",
   "BFD_RELOC_MICROBLAZE_32_LO",
   "BFD_RELOC_MICROBLAZE_32_LO_PCREL",
   "BFD_RELOC_MICROBLAZE_32_ROSDA",
@@ -2712,6 +2857,7 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL",
   "BFD_RELOC_MICROBLAZE_64_TLSTPREL",
   "BFD_RELOC_AARCH64_RELOC_START",
+  "BFD_RELOC_AARCH64_NULL",
   "BFD_RELOC_AARCH64_NONE",
   "BFD_RELOC_AARCH64_64",
   "BFD_RELOC_AARCH64_32",
@@ -2747,18 +2893,41 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_AARCH64_ADR_GOT_PAGE",
   "BFD_RELOC_AARCH64_LD64_GOT_LO12_NC",
   "BFD_RELOC_AARCH64_LD32_GOT_LO12_NC",
+  "BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC",
+  "BFD_RELOC_AARCH64_MOVW_GOTOFF_G1",
   "BFD_RELOC_AARCH64_LD64_GOTOFF_LO15",
   "BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14",
   "BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15",
   "BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21",
   "BFD_RELOC_AARCH64_TLSGD_ADR_PREL21",
   "BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC",
-  "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1",
-  "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC",
+  "BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC",
+  "BFD_RELOC_AARCH64_TLSGD_MOVW_G1",
   "BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21",
   "BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC",
   "BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC",
   "BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19",
+  "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC",
+  "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1",
+  "BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12",
+  "BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21",
+  "BFD_RELOC_AARCH64_TLSLD_ADR_PREL21",
+  "BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC",
+  "BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0",
+  "BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC",
+  "BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1",
+  "BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC",
+  "BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2",
   "BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2",
   "BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1",
   "BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC",
@@ -2790,6 +2959,8 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_AARCH64_RELOC_END",
   "BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP",
   "BFD_RELOC_AARCH64_LDST_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12",
+  "BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC",
   "BFD_RELOC_AARCH64_LD_GOT_LO12_NC",
   "BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC",
   "BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC",
@@ -3027,9 +3198,6 @@ bfd_byte *bfd_generic_get_relocated_sect
 
 /* Extracted from archures.c.  */
 extern const bfd_arch_info_type bfd_default_arch_struct;
-bfd_boolean bfd_default_set_arch_mach
-   (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
 const bfd_arch_info_type *bfd_default_compatible
    (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
 
@@ -3040,7 +3208,10 @@ void *bfd_arch_default_fill (bfd_size_ty
     bfd_boolean is_bigendian,
     bfd_boolean code);
 
-/* Extracted from elf.c.  */
+/* Extracted from linker.c.  */
+bfd_boolean _bfd_generic_verify_endian_match
+   (bfd *ibfd, struct bfd_link_info *info);
+
 #ifdef __cplusplus
 }
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd-in.h ./bfd/libbfd-in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libbfd-in.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libbfd-in.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,7 +1,7 @@
 /* libbfd.h -- Declarations used by bfd library *implementation*.
    (This include file is not for users of the library.)
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by Cygnus Support.
 
@@ -28,15 +28,6 @@
 extern "C" {
 #endif
 
-/* Align an address upward to a boundary, expressed as a number of bytes.
-   E.g. align to an 8-byte boundary with argument of 8.  Take care never
-   to wrap around if the address is within boundary-1 of the end of the
-   address space.  */
-#define BFD_ALIGN(this, boundary)					  \
-  ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this))		  \
-   ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
-   : ~ (bfd_vma) 0)
-
 /* If you want to read and write large blocks, you might want to do it
    in quanta of this amount */
 #define DEFAULT_BUFFERSIZE 8192
@@ -118,9 +109,7 @@ extern void *bfd_realloc2
 extern void *bfd_zmalloc2
   (bfd_size_type, bfd_size_type);
 
-extern void _bfd_default_error_handler (const char *s, ...);
-extern bfd_error_handler_type _bfd_error_handler;
-extern bfd_assert_handler_type _bfd_assert_handler;
+extern void _bfd_error_handler (const char *s, ...);
 
 /* These routines allocate and free things on the BFD's objalloc.  */
 
@@ -149,6 +138,29 @@ bfd_boolean bfd_slurp_bsd_armap_f2
   (bfd *abfd);
 #define bfd_slurp_bsd_armap bfd_slurp_armap
 #define bfd_slurp_coff_armap bfd_slurp_armap
+bfd_boolean _bfd_archive_64_bit_slurp_armap
+  (bfd *);
+bfd_boolean _bfd_archive_64_bit_write_armap
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
+#define _bfd_archive_64_bit_slurp_extended_name_table \
+  _bfd_slurp_extended_name_table
+#define _bfd_archive_64_bit_construct_extended_name_table \
+  _bfd_archive_coff_construct_extended_name_table
+#define _bfd_archive_64_bit_truncate_arname \
+  bfd_dont_truncate_arname
+#define _bfd_archive_64_bit_read_ar_hdr \
+  _bfd_generic_read_ar_hdr
+#define _bfd_archive_64_bit_write_ar_hdr \
+  _bfd_generic_write_ar_hdr
+#define _bfd_archive_64_bit_openr_next_archived_file \
+  bfd_generic_openr_next_archived_file
+#define _bfd_archive_64_bit_get_elt_at_index \
+  _bfd_generic_get_elt_at_index
+#define _bfd_archive_64_bit_generic_stat_arch_elt \
+  bfd_generic_stat_arch_elt
+#define _bfd_archive_64_bit_update_armap_timestamp \
+  bfd_true
+
 bfd_boolean _bfd_slurp_extended_name_table
   (bfd *abfd);
 extern bfd_boolean _bfd_construct_extended_name_table
@@ -195,11 +207,11 @@ void bfd_bsd_truncate_arname
 void bfd_gnu_truncate_arname
   (bfd *abfd, const char *filename, char *hdr);
 
-bfd_boolean bsd_write_armap
+bfd_boolean _bfd_bsd_write_armap
   (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
    int stridx);
 
-bfd_boolean coff_write_armap
+bfd_boolean _bfd_coff_write_armap
   (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
    int stridx);
 
@@ -250,7 +262,7 @@ extern bfd_boolean _bfd_generic_get_sect
 #define _bfd_generic_bfd_copy_private_bfd_data \
   ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true)
 #define _bfd_generic_bfd_set_private_flags \
   ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
 #define _bfd_generic_bfd_copy_private_section_data \
@@ -309,7 +321,7 @@ extern int _bfd_nocore_core_file_pid
 extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd_write_armap bsd_write_armap
+#define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap
 #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_bsd_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_bsd_openr_next_archived_file \
@@ -329,7 +341,7 @@ extern bfd_boolean _bfd_archive_bsd_upda
 extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
-#define _bfd_archive_coff_write_armap coff_write_armap
+#define _bfd_archive_coff_write_armap _bfd_coff_write_armap
 #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_coff_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_coff_openr_next_archived_file \
@@ -348,7 +360,7 @@ extern bfd_boolean _bfd_archive_coff_con
 extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table
   (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd44_write_armap bsd_write_armap
+#define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap
 #define _bfd_archive_bsd44_read_ar_hdr _bfd_generic_read_ar_hdr
 #define _bfd_archive_bsd44_write_ar_hdr _bfd_bsd44_write_ar_hdr
 #define _bfd_archive_bsd44_openr_next_archived_file \
@@ -361,16 +373,18 @@ extern bfd_boolean _bfd_archive_bsd44_co
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get VMS style
    archives.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_vms_lib).  Some of them
-   are irrelevant and never called, so defined as NULL.  */
+   are irrelevant.  */
 
 extern bfd_boolean _bfd_vms_lib_write_archive_contents (bfd *arch);
-#define _bfd_vms_lib_slurp_armap NULL
-#define _bfd_vms_lib_slurp_extended_name_table NULL
-#define _bfd_vms_lib_construct_extended_name_table NULL
-#define _bfd_vms_lib_truncate_arname NULL
-#define _bfd_vms_lib_write_armap NULL
-#define _bfd_vms_lib_read_ar_hdr NULL
-#define _bfd_vms_lib_write_ar_hdr NULL
+#define _bfd_vms_lib_slurp_armap _bfd_noarchive_slurp_armap
+#define _bfd_vms_lib_slurp_extended_name_table \
+  _bfd_noarchive_slurp_extended_name_table
+#define _bfd_vms_lib_construct_extended_name_table \
+  _bfd_noarchive_construct_extended_name_table
+#define _bfd_vms_lib_truncate_arname _bfd_noarchive_truncate_arname
+#define _bfd_vms_lib_write_armap _bfd_noarchive_write_armap
+#define _bfd_vms_lib_read_ar_hdr _bfd_noarchive_read_ar_hdr
+#define _bfd_vms_lib_write_ar_hdr _bfd_noarchive_write_ar_hdr
 extern bfd *_bfd_vms_lib_openr_next_archived_file (bfd *, bfd *);
 extern bfd *_bfd_vms_lib_get_elt_at_index (bfd *, symindex);
 extern int _bfd_vms_lib_generic_stat_arch_elt (bfd *, struct stat *);
@@ -499,6 +513,8 @@ extern bfd_boolean _bfd_generic_set_sect
 #define _bfd_nolink_bfd_define_common_symbol \
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \
 		     struct bfd_link_hash_entry *)) bfd_false)
+#define _bfd_nolink_bfd_link_check_relocs \
+  _bfd_generic_link_check_relocs
 
 /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
    have dynamic symbols or relocs.  Use BFD_JUMP_TABLE_DYNAMIC
@@ -554,7 +570,7 @@ extern bfd_boolean _bfd_dwarf2_find_near
 /* Find the bias between DWARF addresses and real addresses.  */
 extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias
   (asymbol **, void **);
-  
+
 /* Find inliner info after calling bfd_find_nearest_line. */
 extern bfd_boolean _bfd_dwarf2_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *, void **);
@@ -597,12 +613,6 @@ extern void _bfd_generic_link_hash_table
 extern bfd_boolean _bfd_generic_link_add_symbols
   (bfd *, struct bfd_link_info *);
 
-/* Generic add symbol routine.  This version is used by targets for
-   which the linker must collect constructors and destructors by name,
-   as the collect2 program does.  */
-extern bfd_boolean _bfd_generic_link_add_symbols_collect
-  (bfd *, struct bfd_link_info *);
-
 /* Generic archive add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_archive_symbols
   (bfd *, struct bfd_link_info *,
@@ -735,10 +745,6 @@ extern bfd_size_type _bfd_stringtab_add
 /* Write out a string table.  */
 extern bfd_boolean _bfd_stringtab_emit
   (bfd *, struct bfd_strtab_hash *);
-
-/* Check that endianness of input and output file match.  */
-extern bfd_boolean _bfd_generic_verify_endian_match
-  (bfd *, bfd *);
 
 /* Macros to tell if bfds are read or write enabled.
 
@@ -776,9 +782,9 @@ extern void _bfd_abort
 
 /* Manipulate a system FILE but using BFD's "file_ptr", rather than
    the system "off_t" or "off64_t", as the offset.  */
-extern file_ptr real_ftell (FILE *file);
-extern int real_fseek (FILE *file, file_ptr offset, int whence);
-extern FILE *real_fopen (const char *filename, const char *modes);
+extern file_ptr _bfd_real_ftell (FILE *file);
+extern int _bfd_real_fseek (FILE *file, file_ptr offset, int whence);
+extern FILE *_bfd_real_fopen (const char *filename, const char *modes);
 
 /* List of supported target vectors, and the default vector (if
    bfd_default_vector[0] is NULL, there is no default).  */
@@ -845,7 +851,7 @@ extern void bfd_section_already_linked_t
   (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
 		    void *), void *);
 
-extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
-extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
-extern bfd_vma safe_read_leb128 (bfd *, bfd_byte *, unsigned int *,
-				 bfd_boolean, const bfd_byte * const);
+extern bfd_vma _bfd_read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_signed_vma _bfd_read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_vma _bfd_safe_read_leb128 (bfd *, bfd_byte *, unsigned int *,
+				      bfd_boolean, const bfd_byte * const);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libcoff.h ./bfd/libcoff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libcoff.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libcoff.h	2017-03-06 01:49:05.000000000 +0000
@@ -3,7 +3,7 @@
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* BFD COFF object file private structure.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -316,8 +316,8 @@ extern void coff_mangle_symbols
 extern bfd_boolean coff_write_symbols
   (bfd *);
 extern bfd_boolean coff_write_alien_symbol
-  (bfd *, asymbol *, struct internal_syment *, bfd_vma *,
-   bfd_size_type *, asection **, bfd_size_type *);
+  (bfd *, asymbol *, struct internal_syment *, union internal_auxent *,
+   bfd_vma *, bfd_size_type *, asection **, bfd_size_type *);
 extern bfd_boolean coff_write_linenumbers
   (bfd *);
 extern alent *coff_get_lineno
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libcoff-in.h ./bfd/libcoff-in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libcoff-in.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libcoff-in.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD COFF object file private structure.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -312,8 +312,8 @@ extern void coff_mangle_symbols
 extern bfd_boolean coff_write_symbols
   (bfd *);
 extern bfd_boolean coff_write_alien_symbol
-  (bfd *, asymbol *, struct internal_syment *, bfd_vma *,
-   bfd_size_type *, asection **, bfd_size_type *);
+  (bfd *, asymbol *, struct internal_syment *, union internal_auxent *,
+   bfd_vma *, bfd_size_type *, asection **, bfd_size_type *);
 extern bfd_boolean coff_write_linenumbers
   (bfd *);
 extern alent *coff_get_lineno
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libecoff.h ./bfd/libecoff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libecoff.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libecoff.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD ECOFF object file private structure.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -242,6 +242,7 @@ extern bfd_boolean _bfd_ecoff_get_sectio
   (bfd *, asection *, void * location, file_ptr, bfd_size_type);
 
 #define _bfd_ecoff_bfd_link_split_section _bfd_generic_link_split_section
+#define _bfd_ecoff_bfd_link_check_relocs  _bfd_generic_link_check_relocs
 
 extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data
   (bfd *, bfd *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libhppa.h ./bfd/libhppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libhppa.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libhppa.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* HP PA-RISC SOM object file format:  definitions internal to BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -462,7 +462,7 @@ enum hppa_opcode_type
 static inline int
 bfd_hppa_insn2fmt (bfd *abfd, int insn)
 {
-  enum hppa_opcode_type op = get_opcode (insn);
+  enum hppa_opcode_type op = (enum hppa_opcode_type) get_opcode (insn);
 
   switch (op)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libieee.h ./bfd/libieee.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libieee.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libieee.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IEEE-695 object file formats:  definitions internal to BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.  Mostly Steve Chamberlain's fault.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libnlm.h ./bfd/libnlm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libnlm.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libnlm.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end data structures for NLM (NetWare Loadable Modules) files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/liboasys.h ./bfd/liboasys.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/liboasys.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/liboasys.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD internal declarations for Oasys file format handling.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Scrawled by Steve Chamberlain of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libpei.h ./bfd/libpei.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libpei.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libpei.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for the generic parts of PE/PEI; common header information.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libxcoff.h ./bfd/libxcoff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/libxcoff.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/libxcoff.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD XCOFF object file private structure.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Tom Rix, Redhat.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -64,8 +64,8 @@ struct xcoff_backend_data_rec
   unsigned long _xcoff_ldhdr_version;
 
   bfd_boolean (* _xcoff_put_symbol_name)
-    (bfd *, struct bfd_strtab_hash *, struct internal_syment *,
-     const char *);
+    (struct bfd_link_info *, struct bfd_strtab_hash *,
+     struct internal_syment *, const char *);
 
   bfd_boolean (* _xcoff_put_ldsymbol_name)
     (bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
@@ -154,8 +154,8 @@ struct xcoff_backend_data_rec
 
 #define bfd_xcoff_ldhdr_version(a) ((xcoff_backend (a)->_xcoff_ldhdr_version))
 
-#define bfd_xcoff_put_symbol_name(a, b, c, d) \
-  ((xcoff_backend (a)->_xcoff_put_symbol_name) ((a), (b), (c), (d)))
+#define bfd_xcoff_put_symbol_name(a, b, c, d, e) \
+  ((xcoff_backend (a)->_xcoff_put_symbol_name) ((b), (c), (d), (e)))
 
 #define bfd_xcoff_put_ldsymbol_name(a, b, c, d) \
   ((xcoff_backend (a)->_xcoff_put_ldsymbol_name) ((a), (b), (c), (d)))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/linker.c ./bfd/linker.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/linker.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/linker.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* linker.c -- BFD linker routines
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -403,21 +403,12 @@ SUBSUBSECTION
 */
 
 static bfd_boolean generic_link_add_object_symbols
-  (bfd *, struct bfd_link_info *, bfd_boolean collect);
-static bfd_boolean generic_link_add_symbols
-  (bfd *, struct bfd_link_info *, bfd_boolean);
-static bfd_boolean generic_link_check_archive_element_no_collect
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
-   bfd_boolean *);
-static bfd_boolean generic_link_check_archive_element_collect
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
-   bfd_boolean *);
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean generic_link_check_archive_element
   (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
-   bfd_boolean *, bfd_boolean);
+   bfd_boolean *);
 static bfd_boolean generic_link_add_symbol_list
-  (bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **,
-   bfd_boolean);
+  (bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **);
 static bfd_boolean generic_add_output_symbol
   (bfd *, size_t *psymalloc, asymbol *);
 static bfd_boolean default_data_link_order
@@ -816,29 +807,6 @@ bfd_generic_link_read_symbols (bfd *abfd
   return TRUE;
 }
 
-/* Generic function to add symbols to from an object file to the
-   global hash table.  This version does not automatically collect
-   constructors by name.  */
-
-bfd_boolean
-_bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
-{
-  return generic_link_add_symbols (abfd, info, FALSE);
-}
-
-/* Generic function to add symbols from an object file to the global
-   hash table.  This version automatically collects constructors by
-   name, as the collect2 program does.  It should be used for any
-   target which does not provide some other mechanism for setting up
-   constructors and destructors; these are approximately those targets
-   for which gcc uses collect2 and do not support stabs.  */
-
-bfd_boolean
-_bfd_generic_link_add_symbols_collect (bfd *abfd, struct bfd_link_info *info)
-{
-  return generic_link_add_symbols (abfd, info, TRUE);
-}
-
 /* Indicate that we are only retrieving symbol values from this
    section.  We want the symbols to act as though the values in the
    file are absolute.  */
@@ -862,26 +830,22 @@ _bfd_generic_copy_link_hash_symbol_type 
 {
 }
 
-/* Add symbols from an object file to the global hash table.  */
+/* Generic function to add symbols from an object file to the
+   global hash table.  */
 
-static bfd_boolean
-generic_link_add_symbols (bfd *abfd,
-			  struct bfd_link_info *info,
-			  bfd_boolean collect)
+bfd_boolean
+_bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean ret;
 
   switch (bfd_get_format (abfd))
     {
     case bfd_object:
-      ret = generic_link_add_object_symbols (abfd, info, collect);
+      ret = generic_link_add_object_symbols (abfd, info);
       break;
     case bfd_archive:
       ret = (_bfd_generic_link_add_archive_symbols
-	     (abfd, info,
-	      (collect
-	       ? generic_link_check_archive_element_collect
-	       : generic_link_check_archive_element_no_collect)));
+	     (abfd, info, generic_link_check_archive_element));
       break;
     default:
       bfd_set_error (bfd_error_wrong_format);
@@ -895,8 +859,7 @@ generic_link_add_symbols (bfd *abfd,
 
 static bfd_boolean
 generic_link_add_object_symbols (bfd *abfd,
-				 struct bfd_link_info *info,
-				 bfd_boolean collect)
+				 struct bfd_link_info *info)
 {
   bfd_size_type symcount;
   struct bfd_symbol **outsyms;
@@ -905,7 +868,7 @@ generic_link_add_object_symbols (bfd *ab
     return FALSE;
   symcount = _bfd_generic_link_get_symcount (abfd);
   outsyms = _bfd_generic_link_get_symbols (abfd);
-  return generic_link_add_symbol_list (abfd, info, symcount, outsyms, collect);
+  return generic_link_add_symbol_list (abfd, info, symcount, outsyms);
 }
 
 /* Generic function to add symbols from an archive file to the global
@@ -1044,47 +1007,14 @@ _bfd_generic_link_add_archive_symbols
   return FALSE;
 }
 
-/* See if we should include an archive element.  This version is used
-   when we do not want to automatically collect constructors based on
-   the symbol name, presumably because we have some other mechanism
-   for finding them.  */
-
-static bfd_boolean
-generic_link_check_archive_element_no_collect (bfd *abfd,
-					       struct bfd_link_info *info,
-					       struct bfd_link_hash_entry *h,
-					       const char *name,
-					       bfd_boolean *pneeded)
-{
-  return generic_link_check_archive_element (abfd, info, h, name, pneeded,
-					     FALSE);
-}
-
-/* See if we should include an archive element.  This version is used
-   when we want to automatically collect constructors based on the
-   symbol name, as collect2 does.  */
-
-static bfd_boolean
-generic_link_check_archive_element_collect (bfd *abfd,
-					    struct bfd_link_info *info,
-					    struct bfd_link_hash_entry *h,
-					    const char *name,
-					    bfd_boolean *pneeded)
-{
-  return generic_link_check_archive_element (abfd, info, h, name, pneeded,
-					     TRUE);
-}
-
-/* See if we should include an archive element.  Optionally collect
-   constructors.  */
+/* See if we should include an archive element.  */
 
 static bfd_boolean
 generic_link_check_archive_element (bfd *abfd,
 				    struct bfd_link_info *info,
 				    struct bfd_link_hash_entry *h,
 				    const char *name ATTRIBUTE_UNUSED,
-				    bfd_boolean *pneeded,
-				    bfd_boolean collect)
+				    bfd_boolean *pneeded)
 {
   asymbol **pp, **ppend;
 
@@ -1134,7 +1064,7 @@ generic_link_check_archive_element (bfd 
 	    return FALSE;
 	  /* Potentially, the add_archive_element hook may have set a
 	     substitute BFD for us.  */
-	  return generic_link_add_object_symbols (abfd, info, collect);
+	  return bfd_link_add_symbols (abfd, info);
 	}
 
       /* P is a common symbol.  */
@@ -1192,16 +1122,13 @@ generic_link_check_archive_element (bfd 
 
 /* Add the symbols from an object file to the global hash table.  ABFD
    is the object file.  INFO is the linker information.  SYMBOL_COUNT
-   is the number of symbols.  SYMBOLS is the list of symbols.  COLLECT
-   is TRUE if constructors should be automatically collected by name
-   as is done by collect2.  */
+   is the number of symbols.  SYMBOLS is the list of symbols.  */
 
 static bfd_boolean
 generic_link_add_symbol_list (bfd *abfd,
 			      struct bfd_link_info *info,
 			      bfd_size_type symbol_count,
-			      asymbol **symbols,
-			      bfd_boolean collect)
+			      asymbol **symbols)
 {
   asymbol **pp, **ppend;
 
@@ -1247,7 +1174,7 @@ generic_link_add_symbol_list (bfd *abfd,
 	  bh = NULL;
 	  if (! (_bfd_generic_link_add_one_symbol
 		 (info, abfd, name, p->flags, bfd_get_section (p),
-		  p->value, string, FALSE, collect, &bh)))
+		  p->value, string, FALSE, FALSE, &bh)))
 	    return FALSE;
 	  h = (struct generic_link_hash_entry *) bh;
 
@@ -1475,8 +1402,9 @@ _bfd_generic_link_add_one_symbol (struct
   else if (bfd_is_com_section (section))
     {
       row = COMMON_ROW;
-      if (strcmp (name, "__gnu_lto_slim") == 0)
-	(*_bfd_error_handler)
+      if (!bfd_link_relocatable (info)
+	  && strcmp (name, "__gnu_lto_slim") == 0)
+	_bfd_error_handler
 	  (_("%s: plugin needed to handle lto object"),
 	   bfd_get_filename (abfd));
     }
@@ -1543,9 +1471,8 @@ _bfd_generic_link_add_one_symbol (struct
 	  /* We have found a definition for a symbol which was
 	     previously common.  */
 	  BFD_ASSERT (h->type == bfd_link_hash_common);
-	  if (! ((*info->callbacks->multiple_common)
-		 (info, h, abfd, bfd_link_hash_defined, 0)))
-	    return FALSE;
+	  (*info->callbacks->multiple_common) (info, h, abfd,
+					       bfd_link_hash_defined, 0);
 	  /* Fall through.  */
 	case DEF:
 	case DEFW:
@@ -1602,10 +1529,9 @@ _bfd_generic_link_add_one_symbol (struct
 			if (oldtype == bfd_link_hash_defweak)
 			  abort ();
 
-			if (! ((*info->callbacks->constructor)
-			       (info, c == 'I',
-				h->root.string, abfd, section, value)))
-			  return FALSE;
+			(*info->callbacks->constructor) (info, c == 'I',
+							 h->root.string, abfd,
+							 section, value);
 		      }
 		  }
 	      }
@@ -1674,9 +1600,8 @@ _bfd_generic_link_add_one_symbol (struct
 	     already had a common definition.  Use the maximum of the
 	     two sizes, and use the section required by the larger symbol.  */
 	  BFD_ASSERT (h->type == bfd_link_hash_common);
-	  if (! ((*info->callbacks->multiple_common)
-		 (info, h, abfd, bfd_link_hash_common, value)))
-	    return FALSE;
+	  (*info->callbacks->multiple_common) (info, h, abfd,
+					       bfd_link_hash_common, value);
 	  if (value > h->u.c.size)
 	    {
 	      unsigned int power;
@@ -1714,9 +1639,8 @@ _bfd_generic_link_add_one_symbol (struct
 	case CREF:
 	  /* We have found a common definition for a symbol which
 	     was already defined.  */
-	  if (! ((*info->callbacks->multiple_common)
-		 (info, h, abfd, bfd_link_hash_common, value)))
-	    return FALSE;
+	  (*info->callbacks->multiple_common) (info, h, abfd,
+					       bfd_link_hash_common, value);
 	  break;
 
 	case MIND:
@@ -1727,23 +1651,22 @@ _bfd_generic_link_add_one_symbol (struct
 	  /* Fall through.  */
 	case MDEF:
 	  /* Handle a multiple definition.  */
-	  if (! ((*info->callbacks->multiple_definition)
-		 (info, h, abfd, section, value)))
-	    return FALSE;
+	  (*info->callbacks->multiple_definition) (info, h,
+						   abfd, section, value);
 	  break;
 
 	case CIND:
 	  /* Create an indirect symbol from an existing common symbol.  */
 	  BFD_ASSERT (h->type == bfd_link_hash_common);
-	  if (! ((*info->callbacks->multiple_common)
-		 (info, h, abfd, bfd_link_hash_indirect, 0)))
-	    return FALSE;
+	  (*info->callbacks->multiple_common) (info, h, abfd,
+					       bfd_link_hash_indirect, 0);
 	  /* Fall through.  */
 	case IND:
 	  if (inh->type == bfd_link_hash_indirect
 	      && inh->u.i.link == h)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: indirect symbol `%s' to `%s' is a loop"),
 		 abfd, name, string);
 	      bfd_set_error (bfd_error_invalid_operation);
@@ -1778,9 +1701,8 @@ _bfd_generic_link_add_one_symbol (struct
 
 	case SET:
 	  /* Add an entry to a set.  */
-	  if (! (*info->callbacks->add_to_set) (info, h, BFD_RELOC_CTOR,
-						abfd, section, value))
-	    return FALSE;
+	  (*info->callbacks->add_to_set) (info, h, BFD_RELOC_CTOR,
+					  abfd, section, value);
 	  break;
 
 	case WARNC:
@@ -1789,10 +1711,8 @@ _bfd_generic_link_add_one_symbol (struct
 	  if (h->u.i.warning != NULL
 	      && (abfd->flags & BFD_PLUGIN) == 0)
 	    {
-	      if (! (*info->callbacks->warning) (info, h->u.i.warning,
-						 h->root.string, abfd,
-						 NULL, 0))
-		return FALSE;
+	      (*info->callbacks->warning) (info, h->u.i.warning,
+					   h->root.string, abfd, NULL, 0);
 	      /* Only issue a warning once.  */
 	      h->u.i.warning = NULL;
 	    }
@@ -1818,9 +1738,8 @@ _bfd_generic_link_add_one_symbol (struct
 	       && (h->u.undef.next != NULL || info->hash->undefs_tail == h))
 	      || h->non_ir_ref)
 	    {
-	      if (! (*info->callbacks->warning) (info, string, h->root.string,
-						 hash_entry_bfd (h), NULL, 0))
-		return FALSE;
+	      (*info->callbacks->warning) (info, string, h->root.string,
+					   hash_entry_bfd (h), NULL, 0);
 	      break;
 	    }
 	  /* Fall through.  */
@@ -1906,7 +1825,7 @@ _bfd_generic_final_link (bfd *abfd, stru
   if (! generic_add_output_symbol (abfd, &outsymalloc, NULL))
     return FALSE;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* Allocate space for the output relocs for each section.  */
       for (o = abfd->sections; o != NULL; o = o->next)
@@ -2210,7 +2129,7 @@ _bfd_generic_link_output_symbols (bfd *o
 		  break;
 		case discard_sec_merge:
 		  output = TRUE;
-		  if (info->relocatable
+		  if (bfd_link_relocatable (info)
 		      || ! (sym->section->flags & SEC_MERGE))
 		    break;
 		  /* FALLTHROUGH */
@@ -2380,7 +2299,7 @@ _bfd_generic_reloc_link_order (bfd *abfd
 {
   arelent *r;
 
-  if (! info->relocatable)
+  if (! bfd_link_relocatable (info))
     abort ();
   if (sec->orelocation == NULL)
     abort ();
@@ -2411,9 +2330,8 @@ _bfd_generic_reloc_link_order (bfd *abfd
       if (h == NULL
 	  || ! h->written)
 	{
-	  if (! ((*info->callbacks->unattached_reloc)
-		 (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
-	    return FALSE;
+	  (*info->callbacks->unattached_reloc)
+	    (info, link_order->u.reloc.p->u.name, NULL, NULL, 0);
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
@@ -2447,17 +2365,13 @@ _bfd_generic_reloc_link_order (bfd *abfd
 	case bfd_reloc_outofrange:
 	  abort ();
 	case bfd_reloc_overflow:
-	  if (! ((*info->callbacks->reloc_overflow)
-		 (info, NULL,
-		  (link_order->type == bfd_section_reloc_link_order
-		   ? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
-		   : link_order->u.reloc.p->u.name),
-		  r->howto->name, link_order->u.reloc.p->addend,
-		  NULL, NULL, 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*info->callbacks->reloc_overflow)
+	    (info, NULL,
+	     (link_order->type == bfd_section_reloc_link_order
+	      ? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
+	      : link_order->u.reloc.p->u.name),
+	     r->howto->name, link_order->u.reloc.p->addend,
+	     NULL, NULL, 0);
 	  break;
 	}
       loc = link_order->offset * bfd_octets_per_byte (abfd);
@@ -2611,7 +2525,7 @@ default_indirect_link_order (bfd *output
   BFD_ASSERT (input_section->output_offset == link_order->offset);
   BFD_ASSERT (input_section->size == link_order->size);
 
-  if (info->relocatable
+  if (bfd_link_relocatable (info)
       && input_section->reloc_count > 0
       && output_section->orelocation == NULL)
     {
@@ -2620,7 +2534,8 @@ default_indirect_link_order (bfd *output
 	 because somebody is attempting to link together different
 	 types of object files.  Handling this case correctly is
 	 difficult, and sometimes impossible.  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("Attempt to do relocatable link with %s input and %s output"),
 	 bfd_get_target (input_bfd), bfd_get_target (output_bfd));
       bfd_set_error (bfd_error_wrong_format);
@@ -2705,7 +2620,7 @@ default_indirect_link_order (bfd *output
 	goto error_return;
       new_contents = (bfd_get_relocated_section_contents
 		      (output_bfd, info, link_order, contents,
-		       info->relocatable,
+		       bfd_link_relocatable (info),
 		       _bfd_generic_link_get_symbols (input_bfd)));
       if (!new_contents)
 	goto error_return;
@@ -2906,6 +2821,7 @@ _bfd_handle_already_linked (asection *se
 
     case SEC_LINK_DUPLICATES_ONE_ONLY:
       info->callbacks->einfo
+	/* xgettext:c-format */
 	(_("%B: ignoring duplicate section `%A'\n"),
 	 sec->owner, sec);
       break;
@@ -2915,6 +2831,7 @@ _bfd_handle_already_linked (asection *se
 	;
       else if (sec->size != l->sec->size)
 	info->callbacks->einfo
+	  /* xgettext:c-format */
 	  (_("%B: duplicate section `%A' has different size\n"),
 	   sec->owner, sec);
       break;
@@ -2924,6 +2841,7 @@ _bfd_handle_already_linked (asection *se
 	;
       else if (sec->size != l->sec->size)
 	info->callbacks->einfo
+	  /* xgettext:c-format */
 	  (_("%B: duplicate section `%A' has different size\n"),
 	   sec->owner, sec);
       else if (sec->size != 0)
@@ -2932,15 +2850,18 @@ _bfd_handle_already_linked (asection *se
 
 	  if (!bfd_malloc_and_get_section (sec->owner, sec, &sec_contents))
 	    info->callbacks->einfo
+	      /* xgettext:c-format */
 	      (_("%B: could not read contents of section `%A'\n"),
 	       sec->owner, sec);
 	  else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
 						&l_sec_contents))
 	    info->callbacks->einfo
+	      /* xgettext:c-format */
 	      (_("%B: could not read contents of section `%A'\n"),
 	       l->sec->owner, l->sec);
 	  else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
 	    info->callbacks->einfo
+	      /* xgettext:c-format */
 	      (_("%B: duplicate section `%A' has different contents\n"),
 	       sec->owner, sec);
 
@@ -3303,3 +3224,103 @@ bfd_hide_sym_by_version (struct bfd_elf_
   bfd_find_version_for_sym (verdefs, sym_name, &hidden);
   return hidden;
 }
+
+/*
+FUNCTION
+	bfd_link_check_relocs
+
+SYNOPSIS
+	bfd_boolean bfd_link_check_relocs
+	  (bfd *abfd, struct bfd_link_info *info);
+
+DESCRIPTION
+	Checks the relocs in ABFD for validity.
+	Does not execute the relocs.
+	Return TRUE if everything is OK, FALSE otherwise.
+	This is the external entry point to this code.
+*/
+
+bfd_boolean
+bfd_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
+{
+  return BFD_SEND (abfd, _bfd_link_check_relocs, (abfd, info));
+}
+
+/*
+FUNCTION
+	_bfd_generic_link_check_relocs
+
+SYNOPSIS
+	bfd_boolean _bfd_generic_link_check_relocs
+	  (bfd *abfd, struct bfd_link_info *info);
+
+DESCRIPTION
+        Stub function for targets that do not implement reloc checking.
+	Return TRUE.
+	This is an internal function.  It should not be called from
+	outside the BFD library.
+*/
+
+bfd_boolean
+_bfd_generic_link_check_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+				struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+  return TRUE;
+}
+
+/*
+FUNCTION
+	bfd_merge_private_bfd_data
+
+SYNOPSIS
+	bfd_boolean bfd_merge_private_bfd_data
+	  (bfd *ibfd, struct bfd_link_info *info);
+
+DESCRIPTION
+	Merge private BFD information from the BFD @var{ibfd} to the
+	the output file BFD when linking.  Return <<TRUE>> on success,
+	<<FALSE>> on error.  Possible error returns are:
+
+	o <<bfd_error_no_memory>> -
+	Not enough memory exists to create private data for @var{obfd}.
+
+.#define bfd_merge_private_bfd_data(ibfd, info) \
+.     BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
+.		(ibfd, info))
+*/
+
+/*
+INTERNAL_FUNCTION
+	_bfd_generic_verify_endian_match
+
+SYNOPSIS
+	bfd_boolean _bfd_generic_verify_endian_match
+	  (bfd *ibfd, struct bfd_link_info *info);
+
+DESCRIPTION
+	Can be used from / for bfd_merge_private_bfd_data to check that
+	endianness matches between input and output file.  Returns
+	TRUE for a match, otherwise returns FALSE and emits an error.
+*/
+
+bfd_boolean
+_bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info)
+{
+  bfd *obfd = info->output_bfd;
+
+  if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+      && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
+      && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
+    {
+      if (bfd_big_endian (ibfd))
+	_bfd_error_handler (_("%B: compiled for a big endian system "
+			      "and target is little endian"), ibfd);
+      else
+	_bfd_error_handler (_("%B: compiled for a little endian system "
+			      "and target is big endian"), ibfd);
+      bfd_set_error (bfd_error_wrong_format);
+      return FALSE;
+    }
+
+  return TRUE;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/lynx-core.c ./bfd/lynx-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/lynx-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/lynx-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back end for Lynx core files
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Stu Grossman of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68k4knetbsd.c ./bfd/m68k4knetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68k4knetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/m68k4knetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/m68k a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68klinux.c ./bfd/m68klinux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68klinux.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/m68klinux.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for linux flavored m68k a.out binaries.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -69,11 +69,11 @@ m68klinux_write_object_contents (bfd *ab
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_68020);
+  N_SET_MACHTYPE (execp, M_68020);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
@@ -320,7 +320,7 @@ linux_add_one_symbol (struct bfd_link_in
 
   insert = FALSE;
 
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && linux_hash_table (info)->dynobj == NULL
       && strcmp (name, SHARABLE_CONFLICTS) == 0
       && (flags & BSF_CONSTRUCTOR) != 0
@@ -416,14 +416,15 @@ linux_tally_symbols (struct linux_link_h
 	alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
 
       if (p == NULL || alloc == NULL)
-	(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
-			       name);
+	_bfd_error_handler (_("Output file requires shared library `%s'\n"),
+			    name);
       else
 	{
 	  strcpy (alloc, name);
 	  p = strrchr (alloc, '_');
 	  *p++ = '\0';
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("Output file requires shared library `%s.so.%s'\n"),
 	     alloc, p);
 	  free (alloc);
@@ -612,7 +613,7 @@ linux_finish_dynamic_link (bfd *output_b
       if (f->h->root.root.type != bfd_link_hash_defined
 	  && f->h->root.root.type != bfd_link_hash_defweak)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Symbol %s not defined for fixups\n"),
 	     f->h->root.root.root.string);
 	  continue;
@@ -660,7 +661,7 @@ linux_finish_dynamic_link (bfd *output_b
 	  if (f->h->root.root.type != bfd_link_hash_defined
 	      && f->h->root.root.type != bfd_link_hash_defweak)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("Symbol %s not defined for fixups\n"),
 		 f->h->root.root.root.string);
 	      continue;
@@ -685,7 +686,7 @@ linux_finish_dynamic_link (bfd *output_b
 
   if (linux_hash_table (info)->fixup_count != fixups_written)
     {
-      (*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
+      _bfd_error_handler (_("Warning: fixup count mismatch\n"));
       while (linux_hash_table (info)->fixup_count > fixups_written)
 	{
 	  bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68knetbsd.c ./bfd/m68knetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m68knetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/m68knetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/m68k a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m88kmach3.c ./bfd/m88kmach3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m88kmach3.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/m88kmach3.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola m88k a.out (Mach 3) binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -23,7 +23,7 @@
 #define TEXT_START_ADDR	0
 #define N_HEADER_IN_TEXT(x)	1 		/* (N_MAGIG(x) == ZMAGIC) */
 
-#define N_TXTSIZE(x)	((x).a_text)
+#define N_TXTSIZE(x)	((x)->a_text)
 
 #include "sysdep.h"
 #include "bfd.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m88kopenbsd.c ./bfd/m88kopenbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/m88kopenbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/m88kopenbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for OpenBSD/m88k a.out binaries.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-aarch64.c ./bfd/mach-o-aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-aarch64.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/mach-o-aarch64.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,308 @@
+/* AArch-64 Mach-O support for BFD.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "sysdep.h"
+#include "mach-o.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "mach-o/arm64.h"
+
+#define bfd_mach_o_object_p bfd_mach_o_arm64_object_p
+#define bfd_mach_o_core_p bfd_mach_o_arm64_core_p
+#define bfd_mach_o_mkobject bfd_mach_o_arm64_mkobject
+
+#define bfd_mach_o_canonicalize_one_reloc \
+  bfd_mach_o_arm64_canonicalize_one_reloc
+#define bfd_mach_o_swap_reloc_out NULL
+
+#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_arm64_bfd_reloc_type_lookup
+#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_arm64_bfd_reloc_name_lookup
+
+#define bfd_mach_o_print_thread NULL
+#define bfd_mach_o_tgt_seg_table NULL
+#define bfd_mach_o_section_type_valid_for_tgt NULL
+
+static const bfd_target *
+bfd_mach_o_arm64_object_p (bfd *abfd)
+{
+  return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_ARM64);
+}
+
+static const bfd_target *
+bfd_mach_o_arm64_core_p (bfd *abfd)
+{
+  return bfd_mach_o_header_p (abfd, 0,
+                              BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM64);
+}
+
+static bfd_boolean
+bfd_mach_o_arm64_mkobject (bfd *abfd)
+{
+  bfd_mach_o_data_struct *mdata;
+
+  if (!bfd_mach_o_mkobject_init (abfd))
+    return FALSE;
+
+  mdata = bfd_mach_o_get_data (abfd);
+  mdata->header.magic = BFD_MACH_O_MH_MAGIC;
+  mdata->header.cputype = BFD_MACH_O_CPU_TYPE_ARM64;
+  mdata->header.cpusubtype = BFD_MACH_O_CPU_SUBTYPE_ARM64_ALL;
+  mdata->header.byteorder = BFD_ENDIAN_LITTLE;
+  mdata->header.version = 1;
+
+  return TRUE;
+}
+
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value.  */
+#define MINUS_ONE (~ (bfd_vma) 0)
+
+static reloc_howto_type arm64_howto_table[]=
+{
+  /* 0 */
+  HOWTO (BFD_RELOC_64, 0, 4, 64, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "64",
+	 FALSE, MINUS_ONE, MINUS_ONE, FALSE),
+  HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "16",
+	 FALSE, 0xffff, 0xffff, FALSE),
+  HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "8",
+	 FALSE, 0xff, 0xff, FALSE),
+  /* 4 */
+  HOWTO (BFD_RELOC_64_PCREL, 0, 4, 64, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "DISP64",
+	 FALSE, MINUS_ONE, MINUS_ONE, TRUE),
+  HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "DISP32",
+	 FALSE, 0xffffffff, 0xffffffff, TRUE),
+  HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "DISP16",
+	 FALSE, 0xffff, 0xffff, TRUE),
+  HOWTO (BFD_RELOC_AARCH64_CALL26, 0, 2, 26, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "BRANCH26",
+	 FALSE, 0x03ffffff, 0x03ffffff, TRUE),
+  /* 8 */
+  HOWTO (BFD_RELOC_AARCH64_ADR_HI21_PCREL, 12, 2, 21, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "PAGE21",
+	 FALSE, 0x1fffff, 0x1fffff, TRUE),
+  HOWTO (BFD_RELOC_AARCH64_LDST16_LO12, 1, 2, 12, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "PGOFF12",
+	 FALSE, 0xffe, 0xffe, TRUE),
+  HOWTO (BFD_RELOC_MACH_O_ARM64_ADDEND, 0, 2, 32, FALSE, 0,
+	 complain_overflow_signed,
+	 NULL, "ADDEND",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "SUBTRACTOR32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  /* 12 */
+  HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "SUBTRACTOR64",
+	 FALSE, MINUS_ONE, MINUS_ONE, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21, 12, 2, 21, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "GOT_LD_PG21",
+	 FALSE, 0x1fffff, 0x1fffff, TRUE),
+  HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, 1, 2, 12, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "GOT_LD_PGOFF12",
+	 FALSE, 0xffe, 0xffe, TRUE),
+  HOWTO (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, 0, 2, 32, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "PTR_TO_GOT",
+	 FALSE, 0xffffffff, 0xffffffff, TRUE),
+};
+
+static bfd_boolean
+bfd_mach_o_arm64_canonicalize_one_reloc (bfd *abfd,
+				       struct mach_o_reloc_info_external *raw,
+					 arelent *res, asymbol **syms)
+{
+  bfd_mach_o_reloc_info reloc;
+
+  res->address = bfd_get_32 (abfd, raw->r_address);
+  if (res->address & BFD_MACH_O_SR_SCATTERED)
+    {
+      /* Only non-scattered relocations.  */
+      return FALSE;
+    }
+
+  /* The value and info fields have to be extracted dependent on target
+     endian-ness.  */
+  bfd_mach_o_swap_in_non_scattered_reloc (abfd, &reloc, raw->r_symbolnum);
+
+  if (reloc.r_type == BFD_MACH_O_ARM64_RELOC_ADDEND)
+    {
+      if (reloc.r_length == 2 && reloc.r_pcrel == 0)
+	{
+	  res->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+	  res->addend = reloc.r_value;
+	  res->howto = &arm64_howto_table[10];
+	  return TRUE;
+	}
+      return FALSE;
+    }
+
+  if (!bfd_mach_o_canonicalize_non_scattered_reloc (abfd, &reloc, res, syms))
+    return FALSE;
+
+  switch (reloc.r_type)
+    {
+    case BFD_MACH_O_ARM64_RELOC_UNSIGNED:
+      switch ((reloc.r_length << 1) | reloc.r_pcrel)
+	{
+	case 0: /* len = 0, pcrel = 0  */
+	  res->howto = &arm64_howto_table[3];
+	  return TRUE;
+	case 2: /* len = 1, pcrel = 0  */
+	  res->howto = &arm64_howto_table[2];
+	  return TRUE;
+	case 3: /* len = 1, pcrel = 1  */
+	  res->howto = &arm64_howto_table[6];
+	  return TRUE;
+	case 4: /* len = 2, pcrel = 0  */
+	  res->howto = &arm64_howto_table[1];
+	  return TRUE;
+	case 5: /* len = 2, pcrel = 1  */
+	  res->howto = &arm64_howto_table[5];
+	  return TRUE;
+	case 6: /* len = 3, pcrel = 0  */
+	  res->howto = &arm64_howto_table[0];
+	  return TRUE;
+	case 7: /* len = 3, pcrel = 1  */
+	  res->howto = &arm64_howto_table[4];
+	  return TRUE;
+	default:
+	  return FALSE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_SUBTRACTOR:
+      if (reloc.r_pcrel)
+        return FALSE;
+      switch (reloc.r_length)
+        {
+        case 2:
+          res->howto = &arm64_howto_table[11];
+          return TRUE;
+        case 3:
+          res->howto = &arm64_howto_table[12];
+          return TRUE;
+        default:
+          return FALSE;
+        }
+      break;
+    case BFD_MACH_O_ARM64_RELOC_BRANCH26:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	{
+	  res->howto = &arm64_howto_table[7];
+	  return TRUE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_PAGE21:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	{
+	  res->howto = &arm64_howto_table[8];
+	  return TRUE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_PAGEOFF12:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 0)
+	{
+	  res->howto = &arm64_howto_table[9];
+	  return TRUE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGE21:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	{
+	  res->howto = &arm64_howto_table[13];
+	  return TRUE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGEOFF12:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 0)
+	{
+	  res->howto = &arm64_howto_table[14];
+	  return TRUE;
+	}
+      break;
+    case BFD_MACH_O_ARM64_RELOC_POINTER_TO_GOT:
+      if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	{
+	  res->howto = &arm64_howto_table[15];
+	  return TRUE;
+	}
+      break;
+    default:
+      break;
+    }
+  return FALSE;
+}
+
+static reloc_howto_type *
+bfd_mach_o_arm64_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+					bfd_reloc_code_real_type code)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (arm64_howto_table) / sizeof (*arm64_howto_table);
+       i++)
+    if (code == arm64_howto_table[i].type)
+      return &arm64_howto_table[i];
+  return NULL;
+}
+
+static reloc_howto_type *
+bfd_mach_o_arm64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+				      const char *name ATTRIBUTE_UNUSED)
+{
+  return NULL;
+}
+
+#define TARGET_NAME 		aarch64_mach_o_vec
+#define TARGET_STRING     	"mach-o-arm64"
+#define TARGET_ARCHITECTURE	bfd_arch_aarch64
+#define TARGET_PAGESIZE		4096
+#define TARGET_BIG_ENDIAN 	0
+#define TARGET_ARCHIVE 		0
+#define TARGET_PRIORITY		0
+#include "mach-o-target.c"
+
+#undef TARGET_NAME
+#undef TARGET_STRING
+#undef TARGET_ARCHIVE
+#undef TARGET_PRIORITY
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-arm.c ./bfd/mach-o-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-arm.c	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/mach-o-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,326 @@
+/* ARM Mach-O support for BFD.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "sysdep.h"
+#include "mach-o.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "mach-o/arm.h"
+
+#define bfd_mach_o_object_p bfd_mach_o_arm_object_p
+#define bfd_mach_o_core_p bfd_mach_o_arm_core_p
+#define bfd_mach_o_mkobject bfd_mach_o_arm_mkobject
+
+#define bfd_mach_o_canonicalize_one_reloc bfd_mach_o_arm_canonicalize_one_reloc
+#define bfd_mach_o_swap_reloc_out NULL
+#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_arm_bfd_reloc_type_lookup
+#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_arm_bfd_reloc_name_lookup
+
+#define bfd_mach_o_print_thread NULL
+#define bfd_mach_o_tgt_seg_table NULL
+#define bfd_mach_o_section_type_valid_for_tgt NULL
+
+static const bfd_target *
+bfd_mach_o_arm_object_p (bfd *abfd)
+{
+  return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_ARM);
+}
+
+static const bfd_target *
+bfd_mach_o_arm_core_p (bfd *abfd)
+{
+  return bfd_mach_o_header_p (abfd, 0,
+                              BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM);
+}
+
+static bfd_boolean
+bfd_mach_o_arm_mkobject (bfd *abfd)
+{
+  bfd_mach_o_data_struct *mdata;
+
+  if (!bfd_mach_o_mkobject_init (abfd))
+    return FALSE;
+
+  mdata = bfd_mach_o_get_data (abfd);
+  mdata->header.magic = BFD_MACH_O_MH_MAGIC;
+  mdata->header.cputype = BFD_MACH_O_CPU_TYPE_ARM;
+  mdata->header.cpusubtype = BFD_MACH_O_CPU_SUBTYPE_ARM_ALL;
+  mdata->header.byteorder = BFD_ENDIAN_LITTLE;
+  mdata->header.version = 1;
+
+  return TRUE;
+}
+
+static reloc_howto_type arm_howto_table[]=
+{
+  /* 0 */
+  HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "16",
+	 FALSE, 0xffff, 0xffff, FALSE),
+  HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "8",
+	 FALSE, 0xff, 0xff, FALSE),
+  HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "DISP32",
+	 FALSE, 0xffffffff, 0xffffffff, TRUE),
+  /* 4 */
+  HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "DISP16",
+	 FALSE, 0xffff, 0xffff, TRUE),
+  HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "SECTDIFF_32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "LSECTDIFF_32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 32, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "PAIR_32",
+	 FALSE, 0xffffffff, 0xffffffff, FALSE),
+  /* 8 */
+  HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "SECTDIFF_16",
+	 FALSE, 0xffff, 0xffff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "LSECTDIFF_16",
+	 FALSE, 0xffff, 0xffff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 1, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "PAIR_16",
+	 FALSE, 0xffff, 0xffff, FALSE),
+  HOWTO (BFD_RELOC_ARM_PCREL_CALL, 2, 2, 24, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "BR24",
+	 FALSE, 0x00ffffff, 0x00ffffff, TRUE),
+  /* 12 */
+  HOWTO (BFD_RELOC_ARM_MOVW, 0,	2, 16, FALSE, 0,
+	 complain_overflow_dont,
+	 NULL, "MOVW",
+	 FALSE, 0x000f0fff, 0x000f0fff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "PAIR_W",
+	 FALSE, 0x000f0fff, 0x000f0fff, FALSE),
+  HOWTO (BFD_RELOC_ARM_MOVT, 0, 2, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "MOVT",
+	 FALSE, 0x000f0fff, 0x000f0fff, FALSE),
+  HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, FALSE, 0,
+	 complain_overflow_bitfield,
+	 NULL, "PAIR_T",
+	 FALSE, 0x000f0fff, 0x000f0fff, FALSE),
+  /* 16 */
+  HOWTO (BFD_RELOC_THUMB_PCREL_BLX, 2, 2, 24, TRUE, 0,
+	 complain_overflow_signed,
+	 NULL, "TBR22",
+	 FALSE, 0x07ff2fff, 0x07ff2fff, TRUE)
+};
+
+static bfd_boolean
+bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd,
+                                      struct mach_o_reloc_info_external *raw,
+                                      arelent *res, asymbol **syms)
+ {
+  bfd_mach_o_reloc_info reloc;
+
+  if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms))
+    return FALSE;
+
+  if (reloc.r_scattered)
+    {
+      switch (reloc.r_type)
+        {
+        case BFD_MACH_O_ARM_RELOC_PAIR:
+          if (reloc.r_length == 2)
+            {
+	      res->howto = &arm_howto_table[7];
+	      res->address = res[-1].address;
+	      return TRUE;
+            }
+          else if (reloc.r_length == 1)
+	    {
+	      res->howto = &arm_howto_table[10];
+	      res->address = res[-1].address;
+	      return TRUE;
+	    }
+          return FALSE;
+        case BFD_MACH_O_ARM_RELOC_SECTDIFF:
+          if (reloc.r_length == 2)
+            {
+	      res->howto = &arm_howto_table[5];
+	      return TRUE;
+            }
+          else if (reloc.r_length == 1)
+            {
+	      res->howto = &arm_howto_table[8];
+	      return TRUE;
+            }
+          return FALSE;
+        case BFD_MACH_O_ARM_RELOC_LOCAL_SECTDIFF:
+          if (reloc.r_length == 2)
+            {
+	      res->howto = &arm_howto_table[6];
+	      return TRUE;
+            }
+          else if (reloc.r_length == 1)
+            {
+	      res->howto = &arm_howto_table[9];
+	      return TRUE;
+            }
+          return FALSE;
+	case BFD_MACH_O_ARM_RELOC_HALF_SECTDIFF:
+	  switch (reloc.r_length)
+	    {
+	    case 2: /* :lower16: for movw arm.  */
+	      res->howto = &arm_howto_table[12];
+	      return TRUE;
+	    case 3: /* :upper16: for movt arm.  */
+	      res->howto = &arm_howto_table[14];
+	      return TRUE;
+	    }
+	  return FALSE;
+        default:
+          return FALSE;
+        }
+    }
+  else
+    {
+      switch (reloc.r_type)
+        {
+        case BFD_MACH_O_ARM_RELOC_VANILLA:
+          switch ((reloc.r_length << 1) | reloc.r_pcrel)
+            {
+            case 0: /* len = 0, pcrel = 0  */
+              res->howto = &arm_howto_table[2];
+              return TRUE;
+            case 2: /* len = 1, pcrel = 0  */
+              res->howto = &arm_howto_table[1];
+              return TRUE;
+            case 3: /* len = 1, pcrel = 1  */
+              res->howto = &arm_howto_table[4];
+              return TRUE;
+            case 4: /* len = 2, pcrel = 0  */
+              res->howto = &arm_howto_table[0];
+              return TRUE;
+            case 5: /* len = 2, pcrel = 1  */
+              res->howto = &arm_howto_table[3];
+              return TRUE;
+            default:
+              return FALSE;
+            }
+          break;
+        case BFD_MACH_O_ARM_RELOC_BR24:
+	  if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	    {
+              res->howto = &arm_howto_table[11];
+              return TRUE;
+	    }
+	  else
+	    return FALSE;
+	  break;
+        case BFD_MACH_O_THUMB_RELOC_BR22:
+	  if (reloc.r_length == 2 && reloc.r_pcrel == 1)
+	    {
+              res->howto = &arm_howto_table[16];
+              return TRUE;
+	    }
+	  else
+	    return FALSE;
+	  break;
+        case BFD_MACH_O_ARM_RELOC_HALF:
+	  if (reloc.r_pcrel == 0)
+	    switch (reloc.r_length)
+	      {
+	      case 0: /* :lower16: for movw arm.  */
+		res->howto = &arm_howto_table[12];
+		return TRUE;
+	      case 1: /* :upper16: for movt arm.  */
+		res->howto = &arm_howto_table[14];
+		return TRUE;
+	      }
+	  return FALSE;
+        case BFD_MACH_O_ARM_RELOC_PAIR:
+	  if (res[-1].howto == &arm_howto_table[12]
+	      && reloc.r_length == 0)
+	    {
+	      /* Pair for :lower16: of movw arm.  */
+	      res->howto = &arm_howto_table[13];
+	      /* This reloc contains the other half in its r_address field.  */
+	      res[-1].addend += (res->address & 0xffff) << 16;
+	      res->address = res[-1].address;
+	      return TRUE;
+            }
+	  else if (res[-1].howto == &arm_howto_table[14]
+		   && reloc.r_length == 1)
+	    {
+	      /* Pair for :upper16: of movt arm.  */
+	      res->howto = &arm_howto_table[15];
+	      /* This reloc contains the other half in its r_address field.  */
+	      res[-1].addend += res->address & 0xffff;
+	      res->address = res[-1].address;
+	      return TRUE;
+            }
+          return FALSE;
+        default:
+          return FALSE;
+        }
+    }
+}
+
+static reloc_howto_type *
+bfd_mach_o_arm_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+				      bfd_reloc_code_real_type code)
+{
+  unsigned int i;
+
+  for (i = 0; i < sizeof (arm_howto_table) / sizeof (*arm_howto_table); i++)
+    if (code == arm_howto_table[i].type)
+      return &arm_howto_table[i];
+  return NULL;
+}
+
+static reloc_howto_type *
+bfd_mach_o_arm_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+				      const char *name ATTRIBUTE_UNUSED)
+{
+  return NULL;
+}
+
+#define TARGET_NAME 		arm_mach_o_vec
+#define TARGET_STRING     	"mach-o-arm"
+#define TARGET_ARCHITECTURE	bfd_arch_arm
+#define TARGET_PAGESIZE		4096
+#define TARGET_BIG_ENDIAN 	0
+#define TARGET_ARCHIVE 		0
+#define TARGET_PRIORITY		0
+#include "mach-o-target.c"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o.c ./bfd/mach-o.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mach-o.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -35,7 +35,7 @@
 #define bfd_mach_o_mkobject bfd_mach_o_gen_mkobject
 
 #define FILE_ALIGN(off, algn) \
-  (((off) + ((file_ptr) 1 << (algn)) - 1) & ((file_ptr) -1 << (algn)))
+  (((off) + ((file_ptr) 1 << (algn)) - 1) & ((file_ptr) -1U << (algn)))
 
 static bfd_boolean
 bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd);
@@ -693,15 +693,15 @@ bfd_mach_o_bfd_copy_private_header_data 
 	    /* PR 17512L: file: 730e492d.  */
 	    else
 	      {
-		ody->rebase_size = 
-		  ody->bind_size = 
-		  ody->weak_bind_size = 
-		  ody->lazy_bind_size = 
+		ody->rebase_size =
+		  ody->bind_size =
+		  ody->weak_bind_size =
+		  ody->lazy_bind_size =
 		  ody->export_size = 0;
-		ody->rebase_content = 
-		  ody->bind_content = 
-		  ody->weak_bind_content = 
-		  ody->lazy_bind_content = 
+		ody->rebase_content =
+		  ody->bind_content =
+		  ody->weak_bind_content =
+		  ody->lazy_bind_content =
 		  ody->export_content = NULL;
 	      }
 	  }
@@ -775,7 +775,7 @@ bfd_mach_o_canonicalize_symtab (bfd *abf
 
   if (!bfd_mach_o_read_symtab_symbols (abfd))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
         (_("bfd_mach_o_canonicalize_symtab: unable to load symbols"));
       return 0;
     }
@@ -1299,7 +1299,7 @@ bfd_mach_o_get_reloc_upper_bound (bfd *a
 /* In addition to the need to byte-swap the symbol number, the bit positions
    of the fields in the relocation information vary per target endian-ness.  */
 
-static void
+void
 bfd_mach_o_swap_in_non_scattered_reloc (bfd *abfd, bfd_mach_o_reloc_info *rel,
 				       unsigned char *fields)
 {
@@ -1325,17 +1325,87 @@ bfd_mach_o_swap_in_non_scattered_reloc (
     }
 }
 
-static int
-bfd_mach_o_canonicalize_one_reloc (bfd *abfd,
-                                   struct mach_o_reloc_info_external *raw,
-                                   arelent *res, asymbol **syms)
+/* Set syms_ptr_ptr and addend of RES.  */
+
+bfd_boolean
+bfd_mach_o_canonicalize_non_scattered_reloc (bfd *abfd,
+					     bfd_mach_o_reloc_info *reloc,
+					     arelent *res, asymbol **syms)
 {
   bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
-  bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd);
-  bfd_mach_o_reloc_info reloc;
-  bfd_vma addr;
+  unsigned int num;
   asymbol **sym;
 
+  /* Non-scattered relocation.  */
+  reloc->r_scattered = 0;
+  res->addend = 0;
+
+  num = reloc->r_value;
+
+  if (reloc->r_extern)
+    {
+      /* PR 17512: file: 8396-1185-0.004.  */
+      if (num >= (unsigned) bfd_mach_o_count_symbols (abfd))
+	sym = bfd_und_section_ptr->symbol_ptr_ptr;
+      else if (syms == NULL)
+	sym = bfd_und_section_ptr->symbol_ptr_ptr;
+      else
+	/* An external symbol number.  */
+	sym = syms + num;
+    }
+  else if (num == 0x00ffffff || num == 0)
+    {
+      /* The 'symnum' in a non-scattered PAIR is 0x00ffffff.  But as this
+	 is generic code, we don't know wether this is really a PAIR.
+	 This value is almost certainly not a valid section number, hence
+	 this specific case to avoid an assertion failure.
+	 Target specific swap_reloc_in routine should adjust that.  */
+      sym = bfd_abs_section_ptr->symbol_ptr_ptr;
+    }
+  else
+    {
+      /* PR 17512: file: 006-2964-0.004.  */
+      if (num > mdata->nsects)
+	return FALSE;
+
+      /* A section number.  */
+      sym = mdata->sections[num - 1]->bfdsection->symbol_ptr_ptr;
+      /* For a symbol defined in section S, the addend (stored in the
+	 binary) contains the address of the section.  To comply with
+	 bfd convention, subtract the section address.
+	 Use the address from the header, so that the user can modify
+             the vma of the section.  */
+      res->addend = -mdata->sections[num - 1]->addr;
+    }
+
+  /* Note: Pairs for PPC LO/HI/HA are not scattered, but contain the offset
+     in the lower 16bits of the address value.  So we have to find the
+     'symbol' from the preceding reloc.  We do this even though the
+     section symbol is probably not needed here, because NULL symbol
+     values cause an assert in generic BFD code.  This must be done in
+     the PPC swap_reloc_in routine.  */
+  res->sym_ptr_ptr = sym;
+
+  return TRUE;
+}
+
+/* Do most of the work for canonicalize_relocs on RAW: create internal
+   representation RELOC and set most fields of RES using symbol table SYMS.
+   Each target still has to set the howto of RES and possibly adjust other
+   fields.
+   Previously the Mach-O hook point was simply swap_in, but some targets
+   (like arm64) don't follow the generic rules (symnum is a value for the
+   non-scattered relocation ADDEND).  */
+
+bfd_boolean
+bfd_mach_o_pre_canonicalize_one_reloc (bfd *abfd,
+				       struct mach_o_reloc_info_external *raw,
+				       bfd_mach_o_reloc_info *reloc,
+				       arelent *res, asymbol **syms)
+{
+  bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
+  bfd_vma addr;
+
   addr = bfd_get_32 (abfd, raw->r_address);
   res->sym_ptr_ptr = NULL;
   res->addend = 0;
@@ -1346,11 +1416,11 @@ bfd_mach_o_canonicalize_one_reloc (bfd *
       bfd_vma symnum = bfd_get_32 (abfd, raw->r_symbolnum);
 
       /* Scattered relocation, can't be extern. */
-      reloc.r_scattered = 1;
-      reloc.r_extern = 0;
+      reloc->r_scattered = 1;
+      reloc->r_extern = 0;
 
       /*   Extract section and offset from r_value (symnum).  */
-      reloc.r_value = symnum;
+      reloc->r_value = symnum;
       /* FIXME: This breaks when a symbol in a reloc exactly follows the
 	 end of the data for the section (e.g. in a calculation of section
 	 data length).  At present, the symbol will end up associated with
@@ -1368,81 +1438,33 @@ bfd_mach_o_canonicalize_one_reloc (bfd *
         }
 
       /* Extract the info and address fields from r_address.  */
-      reloc.r_type = BFD_MACH_O_GET_SR_TYPE (addr);
-      reloc.r_length = BFD_MACH_O_GET_SR_LENGTH (addr);
-      reloc.r_pcrel = addr & BFD_MACH_O_SR_PCREL;
-      reloc.r_address = BFD_MACH_O_GET_SR_TYPE (addr);
+      reloc->r_type = BFD_MACH_O_GET_SR_TYPE (addr);
+      reloc->r_length = BFD_MACH_O_GET_SR_LENGTH (addr);
+      reloc->r_pcrel = addr & BFD_MACH_O_SR_PCREL;
+      reloc->r_address = BFD_MACH_O_GET_SR_TYPE (addr);
       res->address = BFD_MACH_O_GET_SR_ADDRESS (addr);
     }
   else
     {
-      unsigned int num;
-
       /* Non-scattered relocation.  */
-      reloc.r_scattered = 0;
+      reloc->r_scattered = 0;
+      reloc->r_address = addr;
+      res->address = addr;
 
       /* The value and info fields have to be extracted dependent on target
          endian-ness.  */
-      bfd_mach_o_swap_in_non_scattered_reloc (abfd, &reloc, raw->r_symbolnum);
-      num = reloc.r_value;
-
-      if (reloc.r_extern)
-	{
-	  /* PR 17512: file: 8396-1185-0.004.  */
-	  if (num >= (unsigned) bfd_mach_o_count_symbols (abfd))
-	    sym = bfd_und_section_ptr->symbol_ptr_ptr;
-	  else if (syms == NULL)
-	    sym = bfd_und_section_ptr->symbol_ptr_ptr;	    
-	  else
-	    /* An external symbol number.  */
-	    sym = syms + num;
-	}
-      else if (num == 0x00ffffff || num == 0)
-	{
-	  /* The 'symnum' in a non-scattered PAIR is 0x00ffffff.  But as this
-	     is generic code, we don't know wether this is really a PAIR.
-	     This value is almost certainly not a valid section number, hence
-	     this specific case to avoid an assertion failure.
-	     Target specific swap_reloc_in routine should adjust that.  */
-	  sym = bfd_abs_section_ptr->symbol_ptr_ptr;
-	}
-      else
-        {
-	  /* PR 17512: file: 006-2964-0.004.  */
-	  if (num > mdata->nsects)
-	    return -1;
-	  
-	  /* A section number.  */
-          sym = mdata->sections[num - 1]->bfdsection->symbol_ptr_ptr;
-          /* For a symbol defined in section S, the addend (stored in the
-             binary) contains the address of the section.  To comply with
-             bfd convention, subtract the section address.
-             Use the address from the header, so that the user can modify
-             the vma of the section.  */
-          res->addend = -mdata->sections[num - 1]->addr;
-        }
-      /* Note: Pairs for PPC LO/HI/HA are not scattered, but contain the offset
-	 in the lower 16bits of the address value.  So we have to find the
-	 'symbol' from the preceding reloc.  We do this even though the
-	 section symbol is probably not needed here, because NULL symbol
-	 values cause an assert in generic BFD code.  This must be done in
-	 the PPC swap_reloc_in routine.  */
-      res->sym_ptr_ptr = sym;
+      bfd_mach_o_swap_in_non_scattered_reloc (abfd, reloc, raw->r_symbolnum);
 
-      /* The 'address' is just r_address.
-         ??? maybe this should be masked with  0xffffff for safety.  */
-      res->address = addr;
-      reloc.r_address = addr;
+      if (!bfd_mach_o_canonicalize_non_scattered_reloc (abfd, reloc,
+							res, syms))
+	return FALSE;
     }
 
   /* We have set up a reloc with all the information present, so the swapper
      can modify address, value and addend fields, if necessary, to convey
      information in the generic BFD reloc that is mach-o specific.  */
 
-  if (!(*bed->_bfd_mach_o_swap_reloc_in)(res, &reloc))
-    return -1;
-
-  return 0;
+  return TRUE;
 }
 
 static int
@@ -1450,6 +1472,7 @@ bfd_mach_o_canonicalize_relocs (bfd *abf
                                 unsigned long count,
                                 arelent *res, asymbol **syms)
 {
+  bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd);
   unsigned long i;
   struct mach_o_reloc_info_external *native_relocs;
   bfd_size_type native_size;
@@ -1472,8 +1495,8 @@ bfd_mach_o_canonicalize_relocs (bfd *abf
 
   for (i = 0; i < count; i++)
     {
-      if (bfd_mach_o_canonicalize_one_reloc (abfd, &native_relocs[i],
-                                             &res[i], syms) < 0)
+      if (!(*bed->_bfd_mach_o_canonicalize_one_reloc)(abfd, &native_relocs[i],
+						      &res[i], syms))
         goto err;
     }
   free (native_relocs);
@@ -1495,7 +1518,7 @@ bfd_mach_o_canonicalize_reloc (bfd *abfd
     return 0;
 
   /* No need to go further if we don't know how to read relocs.  */
-  if (bed->_bfd_mach_o_swap_reloc_in == NULL)
+  if (bed->_bfd_mach_o_canonicalize_one_reloc == NULL)
     return 0;
 
   if (asect->relocation == NULL)
@@ -1550,7 +1573,7 @@ bfd_mach_o_canonicalize_dynamic_reloc (b
     return 0;
 
   /* No need to go further if we don't know how to read relocs.  */
-  if (bed->_bfd_mach_o_swap_reloc_in == NULL)
+  if (bed->_bfd_mach_o_canonicalize_one_reloc == NULL)
     return 0;
 
   if (mdata->dyn_reloc_cache == NULL)
@@ -1955,8 +1978,8 @@ bfd_mach_o_build_dysymtab (bfd *abfd, bf
       || cmd->ntoc != 0
       || cmd->nextrefsyms != 0)
     {
-      (*_bfd_error_handler) (_("sorry: modtab, toc and extrefsyms are not yet"
-				" implemented for dysymtab commands."));
+      _bfd_error_handler (_("sorry: modtab, toc and extrefsyms are not yet"
+			    " implemented for dysymtab commands."));
       return FALSE;
     }
 
@@ -2398,8 +2421,8 @@ bfd_mach_o_mangle_sections (bfd *abfd, b
   /* We need to check that this can be done...  */
   if (nsect > 255)
     {
-      (*_bfd_error_handler) (_("mach-o: there are too many sections (%u)"
-			       " maximum is 255,\n"), nsect);
+      _bfd_error_handler (_("mach-o: there are too many sections (%u)"
+			    " maximum is 255,\n"), nsect);
       return FALSE;
     }
 
@@ -2504,7 +2527,7 @@ bfd_mach_o_write_contents (bfd *abfd)
 	/* Nothing to do.  */
 	break;
       default:
-	(*_bfd_error_handler)
+	_bfd_error_handler
 	  (_("unable to allocate data for load command 0x%lx"),
 	   (unsigned long) cmd->type);
 	break;
@@ -2609,7 +2632,7 @@ bfd_mach_o_write_contents (bfd *abfd)
 	    return FALSE;
 	  break;
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("unable to write unknown load command 0x%lx"),
 	     (unsigned long) cmd->type);
 	  return FALSE;
@@ -2792,7 +2815,8 @@ bfd_mach_o_build_exec_seg_command (bfd *
 
       if (s->addr < vma)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("section address (%lx) below start of segment (%lx)"),
 	       (unsigned long) s->addr, (unsigned long) vma);
 	  return FALSE;
@@ -2933,7 +2957,7 @@ bfd_mach_o_layout_commands (bfd_mach_o_d
 		 + BFD_MACH_O_LC_SIZE;
 	  break;
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("unable to layout unknown load command 0x%lx"),
 	     (unsigned long) cmd->type);
 	  ret = FALSE;
@@ -3260,14 +3284,14 @@ bfd_mach_o_make_empty_symbol (bfd *abfd)
 }
 
 static bfd_boolean
-bfd_mach_o_read_header (bfd *abfd, bfd_mach_o_header *header)
+bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header)
 {
   struct mach_o_header_external raw;
   unsigned int size;
   bfd_vma (*get32) (const void *) = NULL;
 
   /* Just read the magic number.  */
-  if (bfd_seek (abfd, 0, SEEK_SET) != 0
+  if (bfd_seek (abfd, hdr_off, SEEK_SET) != 0
       || bfd_bread (raw.magic, sizeof (raw.magic), abfd) != 4)
     return FALSE;
 
@@ -3309,7 +3333,7 @@ bfd_mach_o_read_header (bfd *abfd, bfd_m
   size = mach_o_wide_p (header) ?
     BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE;
 
-  if (bfd_seek (abfd, 0, SEEK_SET) != 0
+  if (bfd_seek (abfd, hdr_off, SEEK_SET) != 0
       || bfd_bread (&raw, size, abfd) != size)
     return FALSE;
 
@@ -3443,17 +3467,14 @@ bfd_mach_o_make_bfd_section (bfd *abfd,
 }
 
 static asection *
-bfd_mach_o_read_section_32 (bfd *abfd,
-                            unsigned int offset,
-                            unsigned long prot)
+bfd_mach_o_read_section_32 (bfd *abfd, unsigned long prot)
 {
   struct mach_o_section_32_external raw;
   asection *sec;
   bfd_mach_o_section *section;
 
-  if (bfd_seek (abfd, offset, SEEK_SET) != 0
-      || (bfd_bread (&raw, BFD_MACH_O_SECTION_SIZE, abfd)
-          != BFD_MACH_O_SECTION_SIZE))
+  if (bfd_bread (&raw, BFD_MACH_O_SECTION_SIZE, abfd)
+      != BFD_MACH_O_SECTION_SIZE)
     return NULL;
 
   sec = bfd_mach_o_make_bfd_section (abfd, raw.segname, raw.sectname);
@@ -3472,8 +3493,9 @@ bfd_mach_o_read_section_32 (bfd *abfd,
   /* PR 17512: file: 0017eb76.  */
   if (section->align > 64)
     {
-      (*_bfd_error_handler) (_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, using 32 instead"),
-			     section->align);
+      _bfd_error_handler
+	(_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, "
+	   "using 32 instead"), section->align);
       section->align = 32;
     }
   section->reloff = bfd_h_get_32 (abfd, raw.reloff);
@@ -3489,17 +3511,14 @@ bfd_mach_o_read_section_32 (bfd *abfd,
 }
 
 static asection *
-bfd_mach_o_read_section_64 (bfd *abfd,
-                            unsigned int offset,
-                            unsigned long prot)
+bfd_mach_o_read_section_64 (bfd *abfd, unsigned long prot)
 {
   struct mach_o_section_64_external raw;
   asection *sec;
   bfd_mach_o_section *section;
 
-  if (bfd_seek (abfd, offset, SEEK_SET) != 0
-      || (bfd_bread (&raw, BFD_MACH_O_SECTION_64_SIZE, abfd)
-          != BFD_MACH_O_SECTION_64_SIZE))
+  if (bfd_bread (&raw, BFD_MACH_O_SECTION_64_SIZE, abfd)
+      != BFD_MACH_O_SECTION_64_SIZE)
     return NULL;
 
   sec = bfd_mach_o_make_bfd_section (abfd, raw.segname, raw.sectname);
@@ -3517,8 +3536,9 @@ bfd_mach_o_read_section_64 (bfd *abfd,
   section->align = bfd_h_get_32 (abfd, raw.align);
   if (section->align > 64)
     {
-      (*_bfd_error_handler) (_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, using 32 instead"),
-			     section->align);
+      _bfd_error_handler
+	(_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, "
+	   "using 32 instead"), section->align);
       section->align = 32;
     }
   section->reloff = bfd_h_get_32 (abfd, raw.reloff);
@@ -3534,15 +3554,12 @@ bfd_mach_o_read_section_64 (bfd *abfd,
 }
 
 static asection *
-bfd_mach_o_read_section (bfd *abfd,
-                         unsigned int offset,
-                         unsigned long prot,
-                         unsigned int wide)
+bfd_mach_o_read_section (bfd *abfd, unsigned long prot, unsigned int wide)
 {
   if (wide)
-    return bfd_mach_o_read_section_64 (abfd, offset, prot);
+    return bfd_mach_o_read_section_64 (abfd, prot);
   else
-    return bfd_mach_o_read_section_32 (abfd, offset, prot);
+    return bfd_mach_o_read_section_32 (abfd, prot);
 }
 
 static bfd_boolean
@@ -3569,7 +3586,8 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd
   if (bfd_seek (abfd, symoff, SEEK_SET) != 0
       || bfd_bread (&raw, symwidth, abfd) != symwidth)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
         (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"),
          symwidth, (unsigned long) symoff);
       return FALSE;
@@ -3587,7 +3605,8 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd
 
   if (stroff >= sym->strsize)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
         (_("bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"),
          (unsigned long) stroff,
          (unsigned long) sym->strsize);
@@ -3669,9 +3688,12 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd
 	      /* Mach-O uses 0 to mean "no section"; not an error.  */
 	      if (section != 0)
 		{
-		  (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: "
-					   "symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"),
-					 s->symbol.name, section, mdata->nsects);
+		  _bfd_error_handler
+		    /* xgettext:c-format */
+		    (_("bfd_mach_o_read_symtab_symbol: "
+		       "symbol \"%s\" specified invalid section %d (max %lu): "
+		       "setting to undefined"),
+		     s->symbol.name, section, mdata->nsects);
 		}
 	      s->symbol.section = bfd_und_section_ptr;
 	    }
@@ -3685,9 +3707,11 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd
 	  s->symbol.value = 0;
 	  break;
 	default:
-	  (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: "
-				   "symbol \"%s\" specified invalid type field 0x%x: setting to undefined"),
-				 s->symbol.name, symtype);
+	  _bfd_error_handler
+	    /* xgettext:c-format */
+	    (_("bfd_mach_o_read_symtab_symbol: "
+	       "symbol \"%s\" specified invalid type field 0x%x: "
+	       "setting to undefined"), s->symbol.name, symtype);
 	  s->symbol.section = bfd_und_section_ptr;
 	  break;
 	}
@@ -3759,7 +3783,8 @@ bfd_mach_o_read_symtab_symbols (bfd *abf
   sym->symbols = bfd_alloc2 (abfd, sym->nsyms, sizeof (bfd_mach_o_asymbol));
   if (sym->symbols == NULL)
     {
-      (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"));
+      _bfd_error_handler (_("bfd_mach_o_read_symtab_symbols: "
+			    "unable to allocate memory for symbols"));
       sym->nsyms = 0;
       return FALSE;
     }
@@ -3825,8 +3850,7 @@ bfd_mach_o_read_dylinker (bfd *abfd, bfd
   unsigned int nameoff;
   unsigned int namelen;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   nameoff = bfd_h_get_32 (abfd, raw.str);
@@ -3846,6 +3870,7 @@ bfd_mach_o_read_dylinker (bfd *abfd, bfd
 static bfd_boolean
 bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command)
 {
+  bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
   bfd_mach_o_dylib_command *cmd = &command->command.dylib;
   struct mach_o_dylib_command_external raw;
   unsigned int nameoff;
@@ -3865,8 +3890,7 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_ma
       return FALSE;
     }
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   nameoff = bfd_h_get_32 (abfd, raw.name);
@@ -3879,7 +3903,7 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_ma
   cmd->name_str = bfd_alloc (abfd, namelen);
   if (cmd->name_str == NULL)
     return FALSE;
-  if (bfd_seek (abfd, cmd->name_offset, SEEK_SET) != 0
+  if (bfd_seek (abfd, mdata->hdr_offset + cmd->name_offset, SEEK_SET) != 0
       || bfd_bread (cmd->name_str, namelen, abfd) != namelen)
     return FALSE;
   return TRUE;
@@ -3896,8 +3920,7 @@ bfd_mach_o_read_prebound_dylib (bfd *abf
   unsigned int str_len;
   unsigned char *str;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   nameoff = bfd_h_get_32 (abfd, raw.name);
@@ -3928,8 +3951,7 @@ bfd_mach_o_read_prebind_cksum (bfd *abfd
   bfd_mach_o_prebind_cksum_command *cmd = &command->command.prebind_cksum;
   struct mach_o_prebind_cksum_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->cksum = bfd_get_32 (abfd, raw.cksum);
@@ -3943,8 +3965,7 @@ bfd_mach_o_read_twolevel_hints (bfd *abf
   bfd_mach_o_twolevel_hints_command *cmd = &command->command.twolevel_hints;
   struct mach_o_twolevel_hints_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->offset = bfd_get_32 (abfd, raw.offset);
@@ -3960,8 +3981,7 @@ bfd_mach_o_read_fvmlib (bfd *abfd, bfd_m
   unsigned int nameoff;
   unsigned int namelen;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   nameoff = bfd_h_get_32 (abfd, raw.name);
@@ -4103,8 +4123,7 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd
   {
     struct mach_o_dysymtab_command_external raw;
 
-    if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-        || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+    if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
       return FALSE;
 
     cmd->ilocalsym = bfd_h_get_32 (abfd, raw.ilocalsym);
@@ -4280,8 +4299,7 @@ bfd_mach_o_read_symtab (bfd *abfd, bfd_m
 
   BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB);
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   symtab->symoff = bfd_h_get_32 (abfd, raw.symoff);
@@ -4307,8 +4325,7 @@ bfd_mach_o_read_uuid (bfd *abfd, bfd_mac
 
   BFD_ASSERT (command->type == BFD_MACH_O_LC_UUID);
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (cmd->uuid, 16, abfd) != 16)
+  if (bfd_bread (cmd->uuid, 16, abfd) != 16)
     return FALSE;
 
   return TRUE;
@@ -4320,8 +4337,7 @@ bfd_mach_o_read_linkedit (bfd *abfd, bfd
   bfd_mach_o_linkedit_command *cmd = &command->command.linkedit;
   struct mach_o_linkedit_data_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->dataoff = bfd_get_32 (abfd, raw.dataoff);
@@ -4336,8 +4352,7 @@ bfd_mach_o_read_str (bfd *abfd, bfd_mach
   struct mach_o_str_command_external raw;
   unsigned long off;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   off = bfd_get_32 (abfd, raw.str);
@@ -4423,8 +4438,7 @@ bfd_mach_o_read_dyld_info (bfd *abfd, bf
   bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info;
   struct mach_o_dyld_info_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->rebase_off = bfd_get_32 (abfd, raw.rebase_off);
@@ -4452,8 +4466,7 @@ bfd_mach_o_read_version_min (bfd *abfd, 
   struct mach_o_version_min_command_external raw;
   unsigned int ver;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   ver = bfd_get_32 (abfd, raw.version);
@@ -4470,8 +4483,22 @@ bfd_mach_o_read_encryption_info (bfd *ab
   bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info;
   struct mach_o_encryption_info_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+    return FALSE;
+
+  cmd->cryptoff = bfd_get_32 (abfd, raw.cryptoff);
+  cmd->cryptsize = bfd_get_32 (abfd, raw.cryptsize);
+  cmd->cryptid = bfd_get_32 (abfd, raw.cryptid);
+  return TRUE;
+}
+
+static bfd_boolean
+bfd_mach_o_read_encryption_info_64 (bfd *abfd, bfd_mach_o_load_command *command)
+{
+  bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info;
+  struct mach_o_encryption_info_64_command_external raw;
+
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->cryptoff = bfd_get_32 (abfd, raw.cryptoff);
@@ -4486,8 +4513,7 @@ bfd_mach_o_read_main (bfd *abfd, bfd_mac
   bfd_mach_o_main_command *cmd = &command->command.main;
   struct mach_o_entry_point_command_external raw;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   cmd->entryoff = bfd_get_64 (abfd, raw.entryoff);
@@ -4502,8 +4528,7 @@ bfd_mach_o_read_source_version (bfd *abf
   struct mach_o_source_version_command_external raw;
   bfd_uint64_t ver;
 
-  if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-      || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+  if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
     return FALSE;
 
   ver = bfd_get_64 (abfd, raw.version);
@@ -4536,8 +4561,7 @@ bfd_mach_o_read_segment (bfd *abfd,
 
       BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64);
 
-      if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-          || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+      if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
         return FALSE;
 
       memcpy (seg->segname, raw.segname, 16);
@@ -4558,8 +4582,7 @@ bfd_mach_o_read_segment (bfd *abfd,
 
       BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT);
 
-      if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0
-          || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
+      if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw))
         return FALSE;
 
       memcpy (seg->segname, raw.segname, 16);
@@ -4579,17 +4602,9 @@ bfd_mach_o_read_segment (bfd *abfd,
 
   for (i = 0; i < seg->nsects; i++)
     {
-      bfd_vma segoff;
       asection *sec;
 
-      if (wide)
-        segoff = command->offset + BFD_MACH_O_LC_SEGMENT_64_SIZE
-          + (i * BFD_MACH_O_SECTION_64_SIZE);
-      else
-        segoff = command->offset + BFD_MACH_O_LC_SEGMENT_SIZE
-          + (i * BFD_MACH_O_SECTION_SIZE);
-
-      sec = bfd_mach_o_read_section (abfd, segoff, seg->initprot, wide);
+      sec = bfd_mach_o_read_section (abfd, seg->initprot, wide);
       if (sec == NULL)
         return FALSE;
 
@@ -4615,11 +4630,12 @@ bfd_mach_o_read_segment_64 (bfd *abfd, b
 static bfd_boolean
 bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command)
 {
+  bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
   struct mach_o_load_command_external raw;
   unsigned int cmd;
 
   /* Read command type and length.  */
-  if (bfd_seek (abfd, command->offset, SEEK_SET) != 0
+  if (bfd_seek (abfd, mdata->hdr_offset + command->offset, SEEK_SET) != 0
       || bfd_bread (&raw, BFD_MACH_O_LC_SIZE, abfd) != BFD_MACH_O_LC_SIZE)
     return FALSE;
 
@@ -4708,6 +4724,7 @@ bfd_mach_o_read_command (bfd *abfd, bfd_
     case BFD_MACH_O_LC_FUNCTION_STARTS:
     case BFD_MACH_O_LC_DATA_IN_CODE:
     case BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS:
+    case BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT:
       if (!bfd_mach_o_read_linkedit (abfd, command))
 	return FALSE;
       break;
@@ -4715,12 +4732,17 @@ bfd_mach_o_read_command (bfd *abfd, bfd_
       if (!bfd_mach_o_read_encryption_info (abfd, command))
 	return FALSE;
       break;
+    case BFD_MACH_O_LC_ENCRYPTION_INFO_64:
+      if (!bfd_mach_o_read_encryption_info_64 (abfd, command))
+	return FALSE;
+      break;
     case BFD_MACH_O_LC_DYLD_INFO:
       if (!bfd_mach_o_read_dyld_info (abfd, command))
 	return FALSE;
       break;
     case BFD_MACH_O_LC_VERSION_MIN_MACOSX:
     case BFD_MACH_O_LC_VERSION_MIN_IPHONEOS:
+    case BFD_MACH_O_LC_VERSION_MIN_WATCHOS:
       if (!bfd_mach_o_read_version_min (abfd, command))
 	return FALSE;
       break;
@@ -4734,8 +4756,8 @@ bfd_mach_o_read_command (bfd *abfd, bfd_
       break;
     default:
       command->len = 0;
-      (*_bfd_error_handler)(_("%B: unknown load command 0x%lx"),
-			    abfd, (unsigned long) command->type);
+      _bfd_error_handler (_("%B: unknown load command 0x%lx"),
+			  abfd, (unsigned long) command->type);
       return FALSE;
     }
 
@@ -4923,7 +4945,8 @@ bfd_mach_o_scan (bfd *abfd,
 				   &cputype, &cpusubtype);
   if (cputype == bfd_arch_unknown)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
         (_("bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"),
          header->cputype, header->cpusubtype);
       return FALSE;
@@ -5016,20 +5039,21 @@ bfd_mach_o_gen_mkobject (bfd *abfd)
 
 const bfd_target *
 bfd_mach_o_header_p (bfd *abfd,
+		     file_ptr hdr_off,
                      bfd_mach_o_filetype filetype,
                      bfd_mach_o_cpu_type cputype)
 {
   bfd_mach_o_header header;
   bfd_mach_o_data_struct *mdata;
 
-  if (!bfd_mach_o_read_header (abfd, &header))
+  if (!bfd_mach_o_read_header (abfd, hdr_off, &header))
     goto wrong;
 
   if (! (header.byteorder == BFD_ENDIAN_BIG
 	 || header.byteorder == BFD_ENDIAN_LITTLE))
     {
-      (*_bfd_error_handler) (_("unknown header byte-order value 0x%lx"),
-			     (unsigned long) header.byteorder);
+      _bfd_error_handler (_("unknown header byte-order value 0x%lx"),
+			  (unsigned long) header.byteorder);
       goto wrong;
     }
 
@@ -5079,6 +5103,7 @@ bfd_mach_o_header_p (bfd *abfd,
   mdata = (bfd_mach_o_data_struct *) bfd_zalloc (abfd, sizeof (*mdata));
   if (mdata == NULL)
     goto fail;
+  mdata->hdr_offset = hdr_off;
 
   if (!bfd_mach_o_scan (abfd, &header, mdata))
     goto wrong;
@@ -5095,13 +5120,13 @@ bfd_mach_o_header_p (bfd *abfd,
 static const bfd_target *
 bfd_mach_o_gen_object_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd, 0, 0);
+  return bfd_mach_o_header_p (abfd, 0, 0, 0);
 }
 
 static const bfd_target *
 bfd_mach_o_gen_core_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd, BFD_MACH_O_MH_CORE, 0);
+  return bfd_mach_o_header_p (abfd, 0, BFD_MACH_O_MH_CORE, 0);
 }
 
 /* Return the base address of ABFD, ie the address at which the image is
@@ -5149,7 +5174,7 @@ typedef struct mach_o_fat_data_struct
 } mach_o_fat_data_struct;
 
 const bfd_target *
-bfd_mach_o_archive_p (bfd *abfd)
+bfd_mach_o_fat_archive_p (bfd *abfd)
 {
   mach_o_fat_data_struct *adata = NULL;
   struct mach_o_fat_header_external hdr;
@@ -5238,7 +5263,7 @@ bfd_mach_o_fat_member_init (bfd *abfd,
 }
 
 bfd *
-bfd_mach_o_openr_next_archived_file (bfd *archive, bfd *prev)
+bfd_mach_o_fat_openr_next_archived_file (bfd *archive, bfd *prev)
 {
   mach_o_fat_data_struct *adata;
   mach_o_fat_archentry *entry = NULL;
@@ -5616,9 +5641,9 @@ bfd_mach_o_core_file_failing_signal (bfd
 static bfd_mach_o_uuid_command *
 bfd_mach_o_lookup_uuid_command (bfd *abfd)
 {
-  bfd_mach_o_load_command *uuid_cmd;
+  bfd_mach_o_load_command *uuid_cmd = NULL;
   int ncmd = bfd_mach_o_lookup_command (abfd, BFD_MACH_O_LC_UUID, &uuid_cmd);
-  if (ncmd != 1)
+  if (ncmd != 1 || uuid_cmd == NULL)
     return FALSE;
   return &uuid_cmd->command.uuid;
 }
@@ -5695,7 +5720,7 @@ bfd_mach_o_follow_dsym (bfd *abfd)
   if (abfd == NULL || bfd_get_flavour (abfd) != bfd_target_mach_o_flavour)
     return NULL;
 
-  if (abfd->my_archive)
+  if (abfd->my_archive && !bfd_is_thin_archive (abfd->my_archive))
     base_bfd = abfd->my_archive;
   /* BFD may have been opened from a stream. */
   if (base_bfd->filename == NULL)
@@ -5785,20 +5810,29 @@ bfd_mach_o_close_and_cleanup (bfd *abfd)
       if (mdata->dsym_bfd != NULL)
         {
           bfd *fat_bfd = mdata->dsym_bfd->my_archive;
+#if 0
+	  /* FIXME: PR 19435: This calculation to find the memory allocated by
+	     bfd_mach_o_follow_dsym for the filename does not always end up
+	     selecting the correct pointer.  Unfortunately this problem is
+	     very hard to reproduce on a non Mach-O native system, so until it
+	     can be traced and fixed on such a system, this code will remain
+	     commented out.  This does mean that there will be a memory leak,
+	     but it is small, and happens when we are closing down, so it
+	     should not matter too much.  */
           char *dsym_filename = (char *)(fat_bfd
                                          ? fat_bfd->filename
                                          : mdata->dsym_bfd->filename);
+#endif
           bfd_close (mdata->dsym_bfd);
           mdata->dsym_bfd = NULL;
           if (fat_bfd)
             bfd_close (fat_bfd);
+#if 0
           free (dsym_filename);
+#endif
         }
     }
 
-  if (bfd_get_format (abfd) == bfd_archive
-      && abfd->xvec == &mach_o_fat_vec)
-    return TRUE;
   return _bfd_generic_close_and_cleanup (abfd);
 }
 
@@ -5820,7 +5854,7 @@ bfd_boolean bfd_mach_o_free_cached_info 
 #define bfd_mach_o_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
 #define bfd_mach_o_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
 
-#define bfd_mach_o_swap_reloc_in NULL
+#define bfd_mach_o_canonicalize_one_reloc NULL
 #define bfd_mach_o_swap_reloc_out NULL
 #define bfd_mach_o_print_thread NULL
 #define bfd_mach_o_tgt_seg_table NULL
@@ -5864,17 +5898,12 @@ bfd_boolean bfd_mach_o_free_cached_info 
 /* Not yet handled: creating an archive.  */
 #define bfd_mach_o_mkarchive                      _bfd_noarchive_mkarchive
 
+#define bfd_mach_o_close_and_cleanup 		  bfd_true
+
 /* Not used.  */
-#define bfd_mach_o_read_ar_hdr                    _bfd_noarchive_read_ar_hdr
-#define bfd_mach_o_write_ar_hdr                   _bfd_noarchive_write_ar_hdr
-#define bfd_mach_o_slurp_armap                    _bfd_noarchive_slurp_armap
-#define bfd_mach_o_slurp_extended_name_table      _bfd_noarchive_slurp_extended_name_table
-#define bfd_mach_o_construct_extended_name_table  _bfd_noarchive_construct_extended_name_table
-#define bfd_mach_o_truncate_arname                _bfd_noarchive_truncate_arname
-#define bfd_mach_o_write_armap                    _bfd_noarchive_write_armap
-#define bfd_mach_o_get_elt_at_index               _bfd_noarchive_get_elt_at_index
 #define bfd_mach_o_generic_stat_arch_elt          bfd_mach_o_fat_stat_arch_elt
-#define bfd_mach_o_update_armap_timestamp         _bfd_noarchive_update_armap_timestamp
+#define bfd_mach_o_openr_next_archived_file	  bfd_mach_o_fat_openr_next_archived_file
+#define bfd_mach_o_archive_p	bfd_mach_o_fat_archive_p
 
 #define TARGET_NAME 		mach_o_fat_vec
 #define TARGET_STRING 		"mach-o-fat"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o.h ./bfd/mach-o.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mach-o.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -23,6 +23,7 @@
 
 #include "bfd.h"
 #include "mach-o/loader.h"
+#include "mach-o/external.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -591,6 +592,10 @@ typedef struct mach_o_data_struct
 {
   /* Mach-O header.  */
   bfd_mach_o_header header;
+
+  /* File offset of the header.  Usually this is 0.  */
+  file_ptr hdr_offset;
+
   /* Array of load commands (length is given by header.ncmds).  */
   bfd_mach_o_load_command *first_command;
   bfd_mach_o_load_command *last_command;
@@ -641,8 +646,8 @@ bfd_boolean bfd_mach_o_valid (bfd *);
 bfd_boolean bfd_mach_o_mkobject_init (bfd *);
 const bfd_target *bfd_mach_o_object_p (bfd *);
 const bfd_target *bfd_mach_o_core_p (bfd *);
-const bfd_target *bfd_mach_o_archive_p (bfd *);
-bfd *bfd_mach_o_openr_next_archived_file (bfd *, bfd *);
+const bfd_target *bfd_mach_o_fat_archive_p (bfd *);
+bfd *bfd_mach_o_fat_openr_next_archived_file (bfd *, bfd *);
 bfd_boolean bfd_mach_o_set_arch_mach (bfd *, enum bfd_architecture,
                                       unsigned long);
 int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **);
@@ -672,7 +677,7 @@ char *bfd_mach_o_core_file_failing_comma
 int bfd_mach_o_core_file_failing_signal (bfd *);
 bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *);
 bfd *bfd_mach_o_fat_extract (bfd *, bfd_format , const bfd_arch_info_type *);
-const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype,
+const bfd_target *bfd_mach_o_header_p (bfd *, file_ptr, bfd_mach_o_filetype,
                                        bfd_mach_o_cpu_type);
 bfd_boolean bfd_mach_o_build_commands (bfd *);
 bfd_boolean bfd_mach_o_set_section_contents (bfd *, asection *, const void *,
@@ -699,6 +704,11 @@ bfd_boolean bfd_mach_o_read_symtab_strta
 
 bfd_vma bfd_mach_o_get_base_address (bfd *);
 
+void bfd_mach_o_swap_in_non_scattered_reloc (bfd *, bfd_mach_o_reloc_info *,
+					     unsigned char *);
+bfd_boolean bfd_mach_o_canonicalize_non_scattered_reloc (bfd *, bfd_mach_o_reloc_info *, arelent *, asymbol **);
+bfd_boolean bfd_mach_o_pre_canonicalize_one_reloc (bfd *, struct mach_o_reloc_info_external *, bfd_mach_o_reloc_info *, arelent *, asymbol **);
+
 /* A placeholder in case we need to suppress emitting the dysymtab for some
    reason (e.g. compatibility with older system versions).  */
 #define bfd_mach_o_should_emit_dysymtab(x) TRUE
@@ -735,7 +745,8 @@ typedef struct bfd_mach_o_backend_data
 {
   enum bfd_architecture arch;
   bfd_vma page_size;
-  bfd_boolean (*_bfd_mach_o_swap_reloc_in)(arelent *, bfd_mach_o_reloc_info *);
+  bfd_boolean (*_bfd_mach_o_canonicalize_one_reloc)
+    (bfd *, struct mach_o_reloc_info_external *, arelent *, asymbol **);
   bfd_boolean (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *);
   bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *,
                                           void *, char *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-i386.c ./bfd/mach-o-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mach-o-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel i386 Mach-O support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -32,13 +32,13 @@
 static const bfd_target *
 bfd_mach_o_i386_object_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd, 0, BFD_MACH_O_CPU_TYPE_I386);
+  return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_I386);
 }
 
 static const bfd_target *
 bfd_mach_o_i386_core_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd,
+  return bfd_mach_o_header_p (abfd, 0,
                               BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_I386);
 }
 
@@ -112,20 +112,27 @@ static reloc_howto_type i386_howto_table
 };
 
 static bfd_boolean
-bfd_mach_o_i386_swap_reloc_in (arelent *res, bfd_mach_o_reloc_info *reloc)
+bfd_mach_o_i386_canonicalize_one_reloc (bfd *abfd,
+				        struct mach_o_reloc_info_external *raw,
+					arelent *res, asymbol **syms)
 {
-  if (reloc->r_scattered)
+  bfd_mach_o_reloc_info reloc;
+
+  if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms))
+    return FALSE;
+
+  if (reloc.r_scattered)
     {
-      switch (reloc->r_type)
+      switch (reloc.r_type)
         {
         case BFD_MACH_O_GENERIC_RELOC_PAIR:
-          if (reloc->r_length == 2)
+          if (reloc.r_length == 2)
             {
 	      res->howto = &i386_howto_table[7];
 	      res->address = res[-1].address;
 	      return TRUE;
             }
-          else if (reloc->r_length == 1)
+          else if (reloc.r_length == 1)
 	    {
 	      res->howto = &i386_howto_table[10];
 	      res->address = res[-1].address;
@@ -133,24 +140,24 @@ bfd_mach_o_i386_swap_reloc_in (arelent *
 	    }
           return FALSE;
         case BFD_MACH_O_GENERIC_RELOC_SECTDIFF:
-          if (reloc->r_length == 2)
+          if (reloc.r_length == 2)
             {
 	      res->howto = &i386_howto_table[5];
 	      return TRUE;
             }
-          else if (reloc->r_length == 1)
+          else if (reloc.r_length == 1)
             {
 	      res->howto = &i386_howto_table[8];
 	      return TRUE;
             }
           return FALSE;
         case BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF:
-          if (reloc->r_length == 2)
+          if (reloc.r_length == 2)
             {
 	      res->howto = &i386_howto_table[6];
 	      return TRUE;
             }
-          else if (reloc->r_length == 1)
+          else if (reloc.r_length == 1)
             {
 	      res->howto = &i386_howto_table[9];
 	      return TRUE;
@@ -162,10 +169,10 @@ bfd_mach_o_i386_swap_reloc_in (arelent *
     }
   else
     {
-      switch (reloc->r_type)
+      switch (reloc.r_type)
         {
         case BFD_MACH_O_GENERIC_RELOC_VANILLA:
-          switch ((reloc->r_length << 1) | reloc->r_pcrel)
+          switch ((reloc.r_length << 1) | reloc.r_pcrel)
             {
             case 0: /* len = 0, pcrel = 0  */
               res->howto = &i386_howto_table[2];
@@ -384,7 +391,7 @@ const mach_o_segment_name_xlat mach_o_i3
     { NULL, NULL }
   };
 
-#define bfd_mach_o_swap_reloc_in bfd_mach_o_i386_swap_reloc_in
+#define bfd_mach_o_canonicalize_one_reloc bfd_mach_o_i386_canonicalize_one_reloc
 #define bfd_mach_o_swap_reloc_out bfd_mach_o_i386_swap_reloc_out
 #define bfd_mach_o_print_thread bfd_mach_o_i386_print_thread
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-target.c ./bfd/mach-o-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-target.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mach-o-target.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -44,6 +44,7 @@
   _bfd_generic_copy_link_hash_symbol_type
 #define bfd_mach_o_bfd_final_link                     _bfd_generic_final_link
 #define bfd_mach_o_bfd_link_split_section             _bfd_generic_link_split_section
+#define bfd_mach_o_bfd_link_check_relocs              _bfd_generic_link_check_relocs
 #define bfd_mach_o_bfd_merge_private_bfd_data         _bfd_generic_bfd_merge_private_bfd_data
 #define bfd_mach_o_bfd_set_private_flags              bfd_mach_o_bfd_set_private_flags
 #define bfd_mach_o_get_section_contents               _bfd_generic_get_section_contents
@@ -61,6 +62,17 @@
 #define bfd_mach_o_get_dynamic_symtab_upper_bound     bfd_mach_o_get_symtab_upper_bound
 #define bfd_mach_o_canonicalize_dynamic_symtab	      bfd_mach_o_canonicalize_symtab
 
+/* For Mach-O special archives.  */
+#define bfd_mach_o_read_ar_hdr                    _bfd_noarchive_read_ar_hdr
+#define bfd_mach_o_write_ar_hdr                   _bfd_noarchive_write_ar_hdr
+#define bfd_mach_o_slurp_armap                    _bfd_noarchive_slurp_armap
+#define bfd_mach_o_slurp_extended_name_table      _bfd_noarchive_slurp_extended_name_table
+#define bfd_mach_o_construct_extended_name_table  _bfd_noarchive_construct_extended_name_table
+#define bfd_mach_o_truncate_arname                _bfd_noarchive_truncate_arname
+#define bfd_mach_o_write_armap                    _bfd_noarchive_write_armap
+#define bfd_mach_o_get_elt_at_index               _bfd_noarchive_get_elt_at_index
+#define bfd_mach_o_update_armap_timestamp         _bfd_noarchive_update_armap_timestamp
+
 #define TARGET_NAME_BACKEND XCONCAT2(TARGET_NAME,_backend)
 
 #endif /* MACH_O_TARGET_COMMON_DEFINED */
@@ -89,15 +101,11 @@
 #error TARGET_PAGESIZE must be defined
 #endif
 
-#if ((TARGET_ARCHIVE) && (! TARGET_BIG_ENDIAN))
-#error Mach-O fat files must always be big-endian.
-#endif /* ((TARGET_ARCHIVE) && (! TARGET_BIG_ENDIAN)) */
-
 static const bfd_mach_o_backend_data TARGET_NAME_BACKEND =
 {
   TARGET_ARCHITECTURE,
   TARGET_PAGESIZE,
-  bfd_mach_o_swap_reloc_in,
+  bfd_mach_o_canonicalize_one_reloc,
   bfd_mach_o_swap_reloc_out,
   bfd_mach_o_print_thread,
   bfd_mach_o_tgt_seg_table,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-x86-64.c ./bfd/mach-o-x86-64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mach-o-x86-64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mach-o-x86-64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel x86-64 Mach-O support for BFD.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -32,13 +32,13 @@
 static const bfd_target *
 bfd_mach_o_x86_64_object_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd, 0, BFD_MACH_O_CPU_TYPE_X86_64);
+  return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_X86_64);
 }
 
 static const bfd_target *
 bfd_mach_o_x86_64_core_p (bfd *abfd)
 {
-  return bfd_mach_o_header_p (abfd,
+  return bfd_mach_o_header_p (abfd, 0,
                               BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_X86_64);
 }
 
@@ -101,11 +101,11 @@ static reloc_howto_type x86_64_howto_tab
 	NULL, "GOT_LOAD",
 	FALSE, 0xffffffff, 0xffffffff, TRUE),
   /* 8 */
-  HOWTO(BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, 0, 2, 32, FALSE, 0,
+  HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, FALSE, 0,
 	complain_overflow_bitfield,
 	NULL, "SUBTRACTOR32",
 	FALSE, 0xffffffff, 0xffffffff, FALSE),
-  HOWTO(BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, 0, 4, 64, FALSE, 0,
+  HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, FALSE, 0,
 	complain_overflow_bitfield,
 	NULL, "SUBTRACTOR64",
 	FALSE, MINUS_ONE, MINUS_ONE, FALSE),
@@ -120,18 +120,25 @@ static reloc_howto_type x86_64_howto_tab
 };
 
 static bfd_boolean
-bfd_mach_o_x86_64_swap_reloc_in (arelent *res, bfd_mach_o_reloc_info *reloc)
+bfd_mach_o_x86_64_canonicalize_one_reloc (bfd *abfd,
+				        struct mach_o_reloc_info_external *raw,
+					arelent *res, asymbol **syms)
 {
+  bfd_mach_o_reloc_info reloc;
+
+  if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms))
+    return FALSE;
+
   /* On x86-64, scattered relocs are not used.  */
-  if (reloc->r_scattered)
+  if (reloc.r_scattered)
     return FALSE;
 
-  switch (reloc->r_type)
+  switch (reloc.r_type)
     {
     case BFD_MACH_O_X86_64_RELOC_UNSIGNED:
-      if (reloc->r_pcrel)
+      if (reloc.r_pcrel)
         return FALSE;
-      switch (reloc->r_length)
+      switch (reloc.r_length)
         {
         case 2:
           res->howto = &x86_64_howto_table[1];
@@ -143,16 +150,16 @@ bfd_mach_o_x86_64_swap_reloc_in (arelent
           return FALSE;
         }
     case BFD_MACH_O_X86_64_RELOC_SIGNED:
-      if (reloc->r_length == 2 && reloc->r_pcrel)
+      if (reloc.r_length == 2 && reloc.r_pcrel)
         {
           res->howto = &x86_64_howto_table[2];
           return TRUE;
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_BRANCH:
-      if (!reloc->r_pcrel)
+      if (!reloc.r_pcrel)
         return FALSE;
-      switch (reloc->r_length)
+      switch (reloc.r_length)
         {
         case 2:
           res->howto = &x86_64_howto_table[6];
@@ -162,23 +169,23 @@ bfd_mach_o_x86_64_swap_reloc_in (arelent
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_GOT_LOAD:
-      if (reloc->r_length == 2 && reloc->r_pcrel && reloc->r_extern)
+      if (reloc.r_length == 2 && reloc.r_pcrel && reloc.r_extern)
         {
           res->howto = &x86_64_howto_table[7];
           return TRUE;
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_GOT:
-      if (reloc->r_length == 2 && reloc->r_pcrel && reloc->r_extern)
+      if (reloc.r_length == 2 && reloc.r_pcrel && reloc.r_extern)
         {
           res->howto = &x86_64_howto_table[10];
           return TRUE;
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_SUBTRACTOR:
-      if (reloc->r_pcrel)
+      if (reloc.r_pcrel)
         return FALSE;
-      switch (reloc->r_length)
+      switch (reloc.r_length)
         {
         case 2:
           res->howto = &x86_64_howto_table[8];
@@ -191,21 +198,21 @@ bfd_mach_o_x86_64_swap_reloc_in (arelent
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_SIGNED_1:
-      if (reloc->r_length == 2 && reloc->r_pcrel)
+      if (reloc.r_length == 2 && reloc.r_pcrel)
         {
           res->howto = &x86_64_howto_table[3];
           return TRUE;
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_SIGNED_2:
-      if (reloc->r_length == 2 && reloc->r_pcrel)
+      if (reloc.r_length == 2 && reloc.r_pcrel)
         {
           res->howto = &x86_64_howto_table[4];
           return TRUE;
         }
       break;
     case BFD_MACH_O_X86_64_RELOC_SIGNED_4:
-      if (reloc->r_length == 2 && reloc->r_pcrel)
+      if (reloc.r_length == 2 && reloc.r_pcrel)
         {
           res->howto = &x86_64_howto_table[5];
           return TRUE;
@@ -259,12 +266,12 @@ bfd_mach_o_x86_64_swap_reloc_out (arelen
       rinfo->r_pcrel = 1;
       rinfo->r_length = 2;
       break;
-    case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:
+    case BFD_RELOC_MACH_O_SUBTRACTOR32:
       rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR;
       rinfo->r_pcrel = 0;
       rinfo->r_length = 2;
       break;
-    case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:
+    case BFD_RELOC_MACH_O_SUBTRACTOR64:
       rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR;
       rinfo->r_pcrel = 0;
       rinfo->r_length = 3;
@@ -344,7 +351,7 @@ const mach_o_segment_name_xlat mach_o_x8
     { NULL, NULL }
   };
 
-#define bfd_mach_o_swap_reloc_in bfd_mach_o_x86_64_swap_reloc_in
+#define bfd_mach_o_canonicalize_one_reloc bfd_mach_o_x86_64_canonicalize_one_reloc
 #define bfd_mach_o_swap_reloc_out bfd_mach_o_x86_64_swap_reloc_out
 
 #define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_x86_64_bfd_reloc_type_lookup
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/MAINTAINERS ./bfd/MAINTAINERS
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/MAINTAINERS	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/MAINTAINERS	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 See ../binutils/MAINTAINERS
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/Makefile.am ./bfd/Makefile.am
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/Makefile.am	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/Makefile.am	2017-03-06 01:49:05.000000000 +0000
@@ -1,17 +1,17 @@
 ## Process this file with automake to generate Makefile.in
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
@@ -147,7 +147,9 @@ ALL_MACHINES = \
 	cpu-pj.lo \
 	cpu-plugin.lo \
 	cpu-powerpc.lo \
+	cpu-pru.lo \
 	cpu-rs6000.lo \
+	cpu-riscv.lo \
 	cpu-rl78.lo \
 	cpu-rx.lo \
 	cpu-s390.lo \
@@ -234,7 +236,9 @@ ALL_MACHINES_CFILES = \
 	cpu-pj.c \
 	cpu-plugin.c \
 	cpu-powerpc.c \
+	cpu-pru.c \
 	cpu-rs6000.c \
+	cpu-riscv.c \
 	cpu-rl78.c \
 	cpu-rx.c \
 	cpu-s390.c \
@@ -363,6 +367,7 @@ BFD32_BACKENDS = \
 	elf32-or1k.lo \
 	elf32-pj.lo \
 	elf32-ppc.lo \
+	elf32-pru.lo \
 	elf32-rl78.lo \
 	elf32-rx.lo \
 	elf32-s390.lo \
@@ -408,6 +413,7 @@ BFD32_BACKENDS = \
 	m88kopenbsd.lo \
 	mach-o.lo \
 	mach-o-i386.lo \
+	mach-o-arm.lo \
 	mipsbsd.lo \
 	newsos3.lo \
 	nlm.lo \
@@ -554,6 +560,7 @@ BFD32_BACKENDS_CFILES = \
 	elf32-or1k.c \
 	elf32-pj.c \
 	elf32-ppc.c \
+	elf32-pru.c \
 	elf32-rl78.c \
 	elf32-rx.c \
 	elf32-s390.c \
@@ -599,6 +606,7 @@ BFD32_BACKENDS_CFILES = \
 	m88kopenbsd.c \
 	mach-o.c \
 	mach-o-i386.c \
+	mach-o-arm.c \
 	mipsbsd.c \
 	newsos3.c \
 	nlm.c \
@@ -669,18 +677,22 @@ BFD64_BACKENDS = \
 	elf64-hppa.lo \
 	elf64-ia64.lo \
 	elf64-ia64-vms.lo \
+	elfxx-ia64.lo \
+	elfn32-mips.lo \
 	elf64-mips.lo \
+	elfxx-mips.lo \
 	elf64-mmix.lo \
 	elf64-ppc.lo \
+	elf32-riscv.lo \
+	elf64-riscv.lo \
+	elfxx-riscv.lo \
 	elf64-s390.lo \
 	elf64-sh64.lo \
 	elf64-sparc.lo \
 	elf64-tilegx.lo \
 	elf64-x86-64.lo \
 	elf64.lo \
-	elfn32-mips.lo \
-	elfxx-ia64.lo \
-	elfxx-mips.lo \
+	mach-o-aarch64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
 	nlm32-alpha.lo \
@@ -719,6 +731,8 @@ BFD64_BACKENDS_CFILES = \
 	elfxx-aarch64.c \
 	elfxx-ia64.c \
 	elfxx-mips.c \
+	elfxx-riscv.c \
+	mach-o-aarch64.c \
 	mach-o-x86-64.c \
 	mmo.c \
 	nlm32-alpha.c \
@@ -734,6 +748,7 @@ OPTIONAL_BACKENDS = \
 	hpux-core.lo \
 	irix-core.lo \
 	lynx-core.lo \
+	netbsd-core.lo \
 	osf-core.lo \
 	rs6000-core.lo \
 	sco5-core.lo \
@@ -745,6 +760,7 @@ OPTIONAL_BACKENDS_CFILES = \
 	hpux-core.c \
 	irix-core.c \
 	lynx-core.c \
+	netbsd-core.c \
 	osf-core.c \
 	rs6000-core.c \
 	sco5-core.c \
@@ -779,14 +795,16 @@ SOURCE_CFILES = \
 
 BUILD_CFILES = \
 	elf32-aarch64.c elf64-aarch64.c \
-	elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
+	elf32-ia64.c elf64-ia64.c \
+	elf32-riscv.c elf64-riscv.c \
+	peigen.c pepigen.c pex64igen.c
 
 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
 
 ## This is a list of all .h files which are in the source tree.
 SOURCE_HFILES = \
 	aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
-	elf-bfd.h elf-hppa.h elf-linux-psinfo.h elf32-hppa.h \
+	elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
 	elf64-hppa.h elfcode.h elfcore.h \
 	freebsd.h genlink.h go32stub.h \
 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -860,7 +878,7 @@ noinst_LIBRARIES = libbfd.a
 libbfd_a_SOURCES =
 
 stamp-lib: libbfd.la
-	libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+	libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \
 	if [ -f $$libtooldir/libbfd.a ]; then \
 	  cp $$libtooldir/libbfd.a libbfd.tmp; \
 	  $(RANLIB) libbfd.tmp; \
@@ -875,7 +893,7 @@ libbfd.a: stamp-lib ; @true
 # itself, but is included by targets.c.
 targmatch.h: config.bfd targmatch.sed
 	rm -f targmatch.h
-	sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
+	$(SED) -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
 	mv -f targmatch.new targmatch.h
 
 # When compiling archures.c and targets.c, supply the default target
@@ -919,49 +937,61 @@ endif
 
 elf32-target.h : elfxx-target.h
 	rm -f elf32-target.h
-	sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
 	mv -f elf32-target.new elf32-target.h
 
 elf64-target.h : elfxx-target.h
 	rm -f elf64-target.h
-	sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
 	mv -f elf64-target.new elf64-target.h
 
 elf32-aarch64.c : elfnn-aarch64.c
 	rm -f elf32-aarch64.c
 	echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf32-aarch64.new
-	sed -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
 	mv -f elf32-aarch64.new elf32-aarch64.c
 
 elf64-aarch64.c : elfnn-aarch64.c
 	rm -f elf64-aarch64.c
 	echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf64-aarch64.new
-	sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
 	mv -f elf64-aarch64.new elf64-aarch64.c
 
 elf32-ia64.c : elfnn-ia64.c
 	rm -f elf32-ia64.c
-	sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
 	mv -f elf32-ia64.new elf32-ia64.c
 
 elf64-ia64.c : elfnn-ia64.c
 	rm -f elf64-ia64.c
-	sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
 	mv -f elf64-ia64.new elf64-ia64.c
 
+elf32-riscv.c : elfnn-riscv.c
+	rm -f elf32-riscv.c
+	echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf32-riscv.new
+	sed -e s/NN/32/g < $(srcdir)/elfnn-riscv.c >> elf32-riscv.new
+	mv -f elf32-riscv.new elf32-riscv.c
+
+elf64-riscv.c : elfnn-riscv.c
+	rm -f elf64-riscv.c
+	echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf64-riscv.new
+	sed -e s/NN/64/g < $(srcdir)/elfnn-riscv.c >> elf64-riscv.new
+	mv -f elf64-riscv.new elf64-riscv.c
+
 peigen.c : peXXigen.c
 	rm -f peigen.c
-	sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
+	$(SED) -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
 	mv -f peigen.new peigen.c
 
 pepigen.c : peXXigen.c
 	rm -f pepigen.c
-	sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
+	$(SED) -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
 	mv -f pepigen.new pepigen.c
 
 pex64igen.c: peXXigen.c
 	rm -f pex64igen.c
-	sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
+	$(SED) -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
 	mv -f pex64igen.new pex64igen.c
 
 BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
@@ -991,12 +1021,13 @@ stmp-bfd-h: bfd-in3.h
 	rm -f bfd-tmp.h
 	touch stmp-bfd-h
 
-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
-	reloc.c syms.c bfd.c bfdio.c bfdwin.c \
-	archive.c corefile.c targets.c format.c compress.c
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \
+	bfdio.c bfdwin.c section.c archures.c reloc.c \
+	syms.c bfd.c archive.c corefile.c targets.c format.c \
+	linker.c simple.c compress.c
 BFD64_H_FILES = archive64.c
-LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
-	cache.c reloc.c archures.c elf.c
+LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
+	cache.c reloc.c archures.c linker.c
 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
 
 # Could really use a "copy-if-change"...
@@ -1042,18 +1073,18 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
 
 bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
 	@echo "creating $@"
-	@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+	@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
 	bfd_version_string="\"$(VERSION)\"" ;\
 	bfd_soversion="$(VERSION)" ;\
 	bfd_version_package="\"$(PKGVERSION)\"" ;\
 	report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
 	. $(srcdir)/development.sh ;\
 	if test "$$development" = true ; then \
-	  bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
+	  bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
 	  bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
 	  bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
 	fi ;\
-	sed -e "s,@bfd_version@,$$bfd_version," \
+	$(SED) -e "s,@bfd_version@,$$bfd_version," \
 	    -e "s,@bfd_version_string@,$$bfd_version_string," \
 	    -e "s,@bfd_version_package@,$$bfd_version_package," \
 	    -e "s,@report_bugs_to@,$$report_bugs_to," \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/Makefile.in ./bfd/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/Makefile.in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/Makefile.in	2017-03-06 01:49:05.000000000 +0000
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,18 +16,18 @@
 @SET_MAKE@
 
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
@@ -36,6 +36,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -117,6 +134,12 @@ am__nobase_list = $(am__nobase_strip_set
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(bfdlibdir)" \
 	"$(DESTDIR)$(bfdincludedir)"
 LTLIBRARIES = $(bfdlib_LTLIBRARIES) $(noinst_LTLIBRARIES)
@@ -155,6 +178,11 @@ RECURSIVE_TARGETS = all-recursive check-
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
 	$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
 HEADERS = $(bfdinclude_HEADERS)
@@ -260,6 +288,8 @@ TDEFINES = @TDEFINES@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
+WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -450,7 +480,9 @@ ALL_MACHINES = \
 	cpu-pj.lo \
 	cpu-plugin.lo \
 	cpu-powerpc.lo \
+	cpu-pru.lo \
 	cpu-rs6000.lo \
+	cpu-riscv.lo \
 	cpu-rl78.lo \
 	cpu-rx.lo \
 	cpu-s390.lo \
@@ -537,7 +569,9 @@ ALL_MACHINES_CFILES = \
 	cpu-pj.c \
 	cpu-plugin.c \
 	cpu-powerpc.c \
+	cpu-pru.c \
 	cpu-rs6000.c \
+	cpu-riscv.c \
 	cpu-rl78.c \
 	cpu-rx.c \
 	cpu-s390.c \
@@ -667,6 +701,7 @@ BFD32_BACKENDS = \
 	elf32-or1k.lo \
 	elf32-pj.lo \
 	elf32-ppc.lo \
+	elf32-pru.lo \
 	elf32-rl78.lo \
 	elf32-rx.lo \
 	elf32-s390.lo \
@@ -712,6 +747,7 @@ BFD32_BACKENDS = \
 	m88kopenbsd.lo \
 	mach-o.lo \
 	mach-o-i386.lo \
+	mach-o-arm.lo \
 	mipsbsd.lo \
 	newsos3.lo \
 	nlm.lo \
@@ -858,6 +894,7 @@ BFD32_BACKENDS_CFILES = \
 	elf32-or1k.c \
 	elf32-pj.c \
 	elf32-ppc.c \
+	elf32-pru.c \
 	elf32-rl78.c \
 	elf32-rx.c \
 	elf32-s390.c \
@@ -903,6 +940,7 @@ BFD32_BACKENDS_CFILES = \
 	m88kopenbsd.c \
 	mach-o.c \
 	mach-o-i386.c \
+	mach-o-arm.c \
 	mipsbsd.c \
 	newsos3.c \
 	nlm.c \
@@ -974,18 +1012,22 @@ BFD64_BACKENDS = \
 	elf64-hppa.lo \
 	elf64-ia64.lo \
 	elf64-ia64-vms.lo \
+	elfxx-ia64.lo \
+	elfn32-mips.lo \
 	elf64-mips.lo \
+	elfxx-mips.lo \
 	elf64-mmix.lo \
 	elf64-ppc.lo \
+	elf32-riscv.lo \
+	elf64-riscv.lo \
+	elfxx-riscv.lo \
 	elf64-s390.lo \
 	elf64-sh64.lo \
 	elf64-sparc.lo \
 	elf64-tilegx.lo \
 	elf64-x86-64.lo \
 	elf64.lo \
-	elfn32-mips.lo \
-	elfxx-ia64.lo \
-	elfxx-mips.lo \
+	mach-o-aarch64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
 	nlm32-alpha.lo \
@@ -1024,6 +1066,8 @@ BFD64_BACKENDS_CFILES = \
 	elfxx-aarch64.c \
 	elfxx-ia64.c \
 	elfxx-mips.c \
+	elfxx-riscv.c \
+	mach-o-aarch64.c \
 	mach-o-x86-64.c \
 	mmo.c \
 	nlm32-alpha.c \
@@ -1039,6 +1083,7 @@ OPTIONAL_BACKENDS = \
 	hpux-core.lo \
 	irix-core.lo \
 	lynx-core.lo \
+	netbsd-core.lo \
 	osf-core.lo \
 	rs6000-core.lo \
 	sco5-core.lo \
@@ -1050,6 +1095,7 @@ OPTIONAL_BACKENDS_CFILES = \
 	hpux-core.c \
 	irix-core.c \
 	lynx-core.c \
+	netbsd-core.c \
 	osf-core.c \
 	rs6000-core.c \
 	sco5-core.c \
@@ -1086,12 +1132,14 @@ SOURCE_CFILES = \
 
 BUILD_CFILES = \
 	elf32-aarch64.c elf64-aarch64.c \
-	elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
+	elf32-ia64.c elf64-ia64.c \
+	elf32-riscv.c elf64-riscv.c \
+	peigen.c pepigen.c pex64igen.c
 
 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
 SOURCE_HFILES = \
 	aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
-	elf-bfd.h elf-hppa.h elf-linux-psinfo.h elf32-hppa.h \
+	elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
 	elf64-hppa.h elfcode.h elfcore.h \
 	freebsd.h genlink.h go32stub.h \
 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -1134,13 +1182,14 @@ noinst_LIBRARIES = libbfd.a
 libbfd_a_SOURCES = 
 BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
 LOCAL_H_DEPS = libbfd.h sysdep.h config.h
-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
-	reloc.c syms.c bfd.c bfdio.c bfdwin.c \
-	archive.c corefile.c targets.c format.c compress.c
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \
+	bfdio.c bfdwin.c section.c archures.c reloc.c \
+	syms.c bfd.c archive.c corefile.c targets.c format.c \
+	linker.c simple.c compress.c
 
 BFD64_H_FILES = archive64.c
-LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
-	cache.c reloc.c archures.c elf.c
+LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
+	cache.c reloc.c archures.c linker.c
 
 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
 MOSTLYCLEANFILES = ofiles stamp-ofiles
@@ -1153,7 +1202,7 @@ all: $(BUILT_SOURCES) config.h
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-am--refresh:
+am--refresh: Makefile
 	@:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
@@ -1189,10 +1238,8 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -1213,7 +1260,6 @@ clean-noinstLIBRARIES:
 	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
 install-bfdlibLTLIBRARIES: $(bfdlib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(bfdlibdir)" || $(MKDIR_P) "$(DESTDIR)$(bfdlibdir)"
 	@list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \
 	list2=; for p in $$list; do \
 	  if test -f $$p; then \
@@ -1221,6 +1267,8 @@ install-bfdlibLTLIBRARIES: $(bfdlib_LTLI
 	  else :; fi; \
 	done; \
 	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bfdlibdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bfdlibdir)" || exit 1; \
 	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(bfdlibdir)'"; \
 	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(bfdlibdir)"; \
 	}
@@ -1251,7 +1299,7 @@ clean-noinstLTLIBRARIES:
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) 
+libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) $(EXTRA_libbfd_la_DEPENDENCIES) 
 	$(libbfd_la_LINK) $(am_libbfd_la_rpath) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
@@ -1376,6 +1424,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pj.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-plugin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-powerpc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pru.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-riscv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rl78.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rs6000.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rx.Plo@am__quote@
@@ -1465,6 +1515,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or1k.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ppc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pru.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-riscv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rl78.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-s390.Plo@am__quote@
@@ -1496,6 +1548,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mips.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mmix.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-riscv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sh64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@
@@ -1507,6 +1560,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-aarch64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-ia64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-mips.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-riscv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-sparc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-tilegx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoc-pe-arm.Plo@am__quote@
@@ -1538,12 +1592,15 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68knetbsd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m88kmach3.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m88kopenbsd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o-aarch64.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o-arm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o-i386.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o-x86-64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipsbsd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netbsd-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newsos3.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-alpha.Plo@am__quote@
@@ -1644,8 +1701,11 @@ distclean-libtool:
 	-rm -f libtool config.lt
 install-bfdincludeHEADERS: $(bfdinclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bfdincludedir)" || $(MKDIR_P) "$(DESTDIR)$(bfdincludedir)"
 	@list='$(bfdinclude_HEADERS)'; test -n "$(bfdincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bfdincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bfdincludedir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -1659,9 +1719,7 @@ uninstall-bfdincludeHEADERS:
 	@$(NORMAL_UNINSTALL)
 	@list='$(bfdinclude_HEADERS)'; test -n "$(bfdincludedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bfdincludedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bfdincludedir)" && rm -f $$files
+	dir='$(DESTDIR)$(bfdincludedir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -1817,10 +1875,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
 
@@ -1961,7 +2024,7 @@ stamp-ofiles: Makefile
 ofiles: stamp-ofiles ; @true
 
 stamp-lib: libbfd.la
-	libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+	libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \
 	if [ -f $$libtooldir/libbfd.a ]; then \
 	  cp $$libtooldir/libbfd.a libbfd.tmp; \
 	  $(RANLIB) libbfd.tmp; \
@@ -1976,7 +2039,7 @@ libbfd.a: stamp-lib ; @true
 # itself, but is included by targets.c.
 targmatch.h: config.bfd targmatch.sed
 	rm -f targmatch.h
-	sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
+	$(SED) -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
 	mv -f targmatch.new targmatch.h
 
 # When compiling archures.c and targets.c, supply the default target
@@ -2005,49 +2068,61 @@ dwarf2.lo: dwarf2.c Makefile
 
 elf32-target.h : elfxx-target.h
 	rm -f elf32-target.h
-	sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
 	mv -f elf32-target.new elf32-target.h
 
 elf64-target.h : elfxx-target.h
 	rm -f elf64-target.h
-	sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
 	mv -f elf64-target.new elf64-target.h
 
 elf32-aarch64.c : elfnn-aarch64.c
 	rm -f elf32-aarch64.c
 	echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf32-aarch64.new
-	sed -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
 	mv -f elf32-aarch64.new elf32-aarch64.c
 
 elf64-aarch64.c : elfnn-aarch64.c
 	rm -f elf64-aarch64.c
 	echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf64-aarch64.new
-	sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
 	mv -f elf64-aarch64.new elf64-aarch64.c
 
 elf32-ia64.c : elfnn-ia64.c
 	rm -f elf32-ia64.c
-	sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
+	$(SED) -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
 	mv -f elf32-ia64.new elf32-ia64.c
 
 elf64-ia64.c : elfnn-ia64.c
 	rm -f elf64-ia64.c
-	sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
+	$(SED) -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
 	mv -f elf64-ia64.new elf64-ia64.c
 
+elf32-riscv.c : elfnn-riscv.c
+	rm -f elf32-riscv.c
+	echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf32-riscv.new
+	sed -e s/NN/32/g < $(srcdir)/elfnn-riscv.c >> elf32-riscv.new
+	mv -f elf32-riscv.new elf32-riscv.c
+
+elf64-riscv.c : elfnn-riscv.c
+	rm -f elf64-riscv.c
+	echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf64-riscv.new
+	sed -e s/NN/64/g < $(srcdir)/elfnn-riscv.c >> elf64-riscv.new
+	mv -f elf64-riscv.new elf64-riscv.c
+
 peigen.c : peXXigen.c
 	rm -f peigen.c
-	sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
+	$(SED) -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
 	mv -f peigen.new peigen.c
 
 pepigen.c : peXXigen.c
 	rm -f pepigen.c
-	sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
+	$(SED) -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
 	mv -f pepigen.new pepigen.c
 
 pex64igen.c: peXXigen.c
 	rm -f pex64igen.c
-	sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
+	$(SED) -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
 	mv -f pex64igen.new pex64igen.c
 $(BFD32_LIBS) \
  $(BFD64_LIBS) \
@@ -2110,18 +2185,18 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
 
 bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
 	@echo "creating $@"
-	@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+	@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
 	bfd_version_string="\"$(VERSION)\"" ;\
 	bfd_soversion="$(VERSION)" ;\
 	bfd_version_package="\"$(PKGVERSION)\"" ;\
 	report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
 	. $(srcdir)/development.sh ;\
 	if test "$$development" = true ; then \
-	  bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
+	  bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
 	  bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
 	  bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
 	fi ;\
-	sed -e "s,@bfd_version@,$$bfd_version," \
+	$(SED) -e "s,@bfd_version@,$$bfd_version," \
 	    -e "s,@bfd_version_string@,$$bfd_version_string," \
 	    -e "s,@bfd_version_package@,$$bfd_version_package," \
 	    -e "s,@report_bugs_to@,$$report_bugs_to," \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/makefile.vms ./bfd/makefile.vms
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/makefile.vms	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/makefile.vms	2017-03-06 01:49:05.000000000 +0000
@@ -1,22 +1,22 @@
 #
-# Makefile for bfd library under openVMS 
+# Makefile for bfd library under openVMS
 #
 # For use with gnu-make for vms
 #
 # Created by Klaus K"ampf, kkaempf@rmi.de
 #
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mep-relocs.pl ./bfd/mep-relocs.pl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mep-relocs.pl	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mep-relocs.pl	2017-03-06 01:49:05.000000000 +0000
@@ -2,7 +2,7 @@
 # -*- perl -*-
 #
 # Toshiba MeP Media Engine Relocation Generator
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 # This file is part of BFD.
 # Originally written by DJ Delorie <dj@redhat.com>
 #
@@ -10,12 +10,12 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/merge.c ./bfd/merge.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/merge.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/merge.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* SEC_MERGE support.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -859,11 +859,10 @@ _bfd_merged_section_offset (bfd *output_
   if (offset >= sec->rawsize)
     {
       if (offset > sec->rawsize)
-	{
-	  (*_bfd_error_handler)
-	    (_("%s: access beyond end of merged section (%ld)"),
-	     bfd_get_filename (sec->owner), (long) offset);
-	}
+	_bfd_error_handler
+	  /* xgettext:c-format */
+	  (_("%s: access beyond end of merged section (%ld)"),
+	   bfd_get_filename (sec->owner), (long) offset);
       return secinfo->first_str ? sec->size : 0;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mipsbsd.c ./bfd/mipsbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mipsbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mipsbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for MIPS BSD (a.out) binaries.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Ralph Campbell.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -23,7 +23,7 @@
 /* #define ENTRY_CAN_BE_ZERO */
 #define N_HEADER_IN_TEXT(x) 1
 #define N_TXTADDR(x) \
-    (N_MAGIC(x) != ZMAGIC ? (x).a_entry :	/* object file or NMAGIC */\
+    (N_MAGIC(x) != ZMAGIC ? (x)->a_entry :	/* object file or NMAGIC */\
 	    TEXT_START_ADDR + EXEC_BYTES_SIZE	/* no padding */\
     )
 #define N_DATADDR(x) (N_TXTADDR(x)+N_TXTSIZE(x))
@@ -45,8 +45,8 @@
 #include "libbfd.h"
 #include "libaout.h"
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  MY(set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  MY(set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   MY(choose_reloc_size) (ABFD);
 static void MY(set_arch_mach) (bfd *, unsigned long);
 static void MY(choose_reloc_size) (bfd *);
@@ -137,34 +137,34 @@ MY (write_object_contents) (bfd *abfd)
       switch (bfd_get_mach (abfd))
 	{
 	case bfd_mach_m68010:
-	  N_SET_MACHTYPE (*execp, M_68010);
+	  N_SET_MACHTYPE (execp, M_68010);
 	  break;
 	default:
 	case bfd_mach_m68020:
-	  N_SET_MACHTYPE (*execp, M_68020);
+	  N_SET_MACHTYPE (execp, M_68020);
 	  break;
 	}
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC);
+      N_SET_MACHTYPE (execp, M_SPARC);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     case bfd_arch_mips:
       switch (bfd_get_mach (abfd))
 	{
 	case bfd_mach_mips4000:
 	case bfd_mach_mips6000:
-	  N_SET_MACHTYPE (*execp, M_MIPS2);
+	  N_SET_MACHTYPE (execp, M_MIPS2);
 	  break;
 	default:
-	  N_SET_MACHTYPE (*execp, M_MIPS1);
+	  N_SET_MACHTYPE (execp, M_MIPS1);
 	  break;
 	}
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   MY (choose_reloc_size) (abfd);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mmo.c ./bfd/mmo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/mmo.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/mmo.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for mmo objects (MMIX-specific object-format).
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Written by Hans-Peter Nilsson (hp@bitrange.com).
    Infrastructure and other bits originally copied from srec.c and
    binary.c.
@@ -330,6 +330,14 @@ struct mmo_data_struct
 
     /* We also need a buffer to hold the bytes we count reading or writing.  */
     bfd_byte buf[4];
+
+    /* Whether we've calculated symbol consistency requirement yet.  We do this
+       when-needed, which must be at some time after all section
+       contents is known.  */
+    bfd_boolean symbol_consistency_override_calculated;
+
+    /* Whether to consistency-check symbol values, in particular "Main".  */
+    bfd_boolean ignore_symbol_consistency;
   };
 
 typedef struct mmo_data_struct tdata_type;
@@ -455,7 +463,8 @@ mmo_make_section (bfd *abfd, const char 
 
       if (newsecname == NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: No core to allocate section name %s\n"),
 	     bfd_get_filename (abfd), secname);
 	  bfd_set_error (bfd_error_system_call);
@@ -530,7 +539,8 @@ mmo_object_p (bfd *abfd)
 
   if (abfd->tdata.mmo_data->lop_stab_symbol == NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: No core to allocate a symbol %d bytes long\n"),
 	 bfd_get_filename (abfd), abfd->tdata.mmo_data->max_symbol_length);
       goto bad_final;
@@ -586,6 +596,34 @@ mmo_mkobject (bfd *abfd)
 }
 
 static bfd_boolean
+mmo_section_has_contents (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *p ATTRIBUTE_UNUSED)
+{
+  /* The point is to match what --extract-symbols does (well, negated).  */
+  return bfd_get_section_size (sec) != 0;
+}
+
+/* Find out whether we should omit symbol consistency checks for this
+   bfd and cache the value.
+
+   This function must only be called when all section contents is
+   known.  However, calculating symbol consistency at the time the
+   private BFD data is initialized is too late for some uses.  */
+
+static bfd_boolean
+mmo_ignore_symbol_consistency (bfd *abfd)
+{
+  if (!abfd->tdata.mmo_data->symbol_consistency_override_calculated)
+    {
+      abfd->tdata.mmo_data->ignore_symbol_consistency =
+	bfd_sections_find_if (abfd, mmo_section_has_contents, NULL) == NULL;
+
+      abfd->tdata.mmo_data->symbol_consistency_override_calculated = TRUE;
+    }
+
+  return abfd->tdata.mmo_data->ignore_symbol_consistency;
+}
+
+static bfd_boolean
 mmo_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
   if (bfd_get_flavour (ibfd) != bfd_target_mmo_flavour
@@ -915,7 +953,8 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma 
 	 group-wise aligned.  */
       if ((vma & 3) != 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: attempt to emit contents at non-multiple-of-4 address 0x%lx\n"),
 	     bfd_get_filename (abfd), (unsigned long) vma);
 	  bfd_set_error (bfd_error_bad_value);
@@ -1208,9 +1247,10 @@ mmo_create_symbol (bfd *abfd, const char
      object.  For written objects, we do it while setting the symbol
      table.  */
   if (strcmp (symname, MMIX_START_SYMBOL_NAME) == 0
-      && bfd_get_start_address (abfd) != addr)
+      && bfd_get_start_address (abfd) != addr
+      && !mmo_ignore_symbol_consistency (abfd))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%s: invalid mmo file: initialization value for $255 is not `Main'\n"),
 	 bfd_get_filename (abfd));
       bfd_set_error (bfd_error_bad_value);
@@ -1355,7 +1395,8 @@ SUBSECTION
 	      abfd->tdata.mmo_data->lop_stab_symbol
 		[abfd->tdata.mmo_data->symbol_position] = 0;
 
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: unsupported wide character sequence"
 		   " 0x%02X 0x%02X after symbol name starting with `%s'\n"),
 		 bfd_get_filename (abfd), c, c2,
@@ -1589,7 +1630,8 @@ mmo_scan (bfd *abfd)
 	  switch (buf[1])
 	    {
 	    default:
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%s: invalid mmo file: unsupported lopcode `%d'\n"),
 		 bfd_get_filename (abfd), buf[1]);
 	      bfd_set_error (bfd_error_bad_value);
@@ -1599,7 +1641,8 @@ mmo_scan (bfd *abfd)
 	      /* Quote the next 32-bit word.  */
 	      if (y != 0 || z != 1)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"),
 		     bfd_get_filename (abfd), y*256+z);
 		  bfd_set_error (bfd_error_bad_value);
@@ -1635,7 +1678,8 @@ mmo_scan (bfd *abfd)
 		}
 	      else
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"),
 		     bfd_get_filename (abfd), z);
 		  bfd_set_error (bfd_error_bad_value);
@@ -1684,7 +1728,8 @@ mmo_scan (bfd *abfd)
 		  }
 		else
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"),
 		       bfd_get_filename (abfd), z);
 		    bfd_set_error (bfd_error_bad_value);
@@ -1723,7 +1768,8 @@ mmo_scan (bfd *abfd)
 
 		if (y != 0)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"),
 		       bfd_get_filename (abfd), y);
 		    bfd_set_error (bfd_error_bad_value);
@@ -1732,7 +1778,8 @@ mmo_scan (bfd *abfd)
 
 		if (z != 16 && z != 24)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"),
 		       bfd_get_filename (abfd), z);
 		    bfd_set_error (bfd_error_bad_value);
@@ -1755,7 +1802,8 @@ mmo_scan (bfd *abfd)
 		  p = vma - 4 * ((delta & 0xffffff) - (1 << z));
 		else
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"),
 		       bfd_get_filename (abfd), buf[0]);
 		    bfd_set_error (bfd_error_bad_value);
@@ -1778,7 +1826,8 @@ mmo_scan (bfd *abfd)
 
 		  if (fname == NULL)
 		    {
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%s: cannot allocate file name for file number %d, %d bytes\n"),
 			 bfd_get_filename (abfd), y, z * 4 + 1);
 		      bfd_set_error (bfd_error_system_call);
@@ -1798,7 +1847,8 @@ mmo_scan (bfd *abfd)
 
 		  if (file_names[y] != NULL)
 		    {
-		      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
 			(_("%s: invalid mmo file: file number %d `%s',"
 			   " was already entered as `%s'\n"),
 			 bfd_get_filename (abfd), y, fname, file_names[y]);
@@ -1811,7 +1861,8 @@ mmo_scan (bfd *abfd)
 
 	      if (file_names[y] == NULL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%s: invalid mmo file: file name for number %d"
 		       " was not specified before use\n"),
 		     bfd_get_filename (abfd), y);
@@ -1917,7 +1968,8 @@ mmo_scan (bfd *abfd)
 	      /* We read in the symbols now, not later.  */
 	      if (y != 0 || z != 0)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%s: invalid mmo file: fields y and z of lop_stab"
 		       " non-zero, y: %d, z: %d\n"),
 		     bfd_get_filename (abfd), y, z);
@@ -1953,7 +2005,8 @@ mmo_scan (bfd *abfd)
 
 		if (statbuf.st_size != curpos)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: lop_end not last item in"
 			 " file\n"),
 		       bfd_get_filename (abfd));
@@ -1966,7 +2019,8 @@ mmo_scan (bfd *abfd)
 		   it.  */
 		if ((long) (y * 256 + z) * 4 != (curpos - stab_loc) - 4)
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%s: invalid mmo file: YZ of lop_end (%ld)"
 			 " not equal to the number of tetras to the preceding"
 			 " lop_stab (%ld)\n"),
@@ -2083,7 +2137,7 @@ mmo_get_section_contents (bfd *abfd ATTR
 
       memcpy (location, loc, chunk_size);
 
-      location += chunk_size;
+      location = (bfd_byte *) location + chunk_size;
       bytes_to_do -= chunk_size;
       offset += chunk_size;
     }
@@ -2620,7 +2674,7 @@ mmo_set_section_contents (bfd *abfd ATTR
 
       memcpy (loc, location, chunk_size);
 
-      location += chunk_size;
+      location = (bfd_byte *) location + chunk_size;
       bytes_to_do -= chunk_size;
       offset += chunk_size;
     }
@@ -2676,7 +2730,8 @@ mmo_internal_add_3_sym (bfd *abfd, struc
      we discover it and bail out.  */
   if (trie->sym.name != NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: invalid symbol table: duplicate symbol `%s'\n"),
 	 bfd_get_filename (abfd), trie->sym.name);
       bfd_set_error (bfd_error_bad_value);
@@ -2896,16 +2951,18 @@ mmo_write_symbols_and_terminator (bfd *a
 	&& (table[i]->flags & (BSF_DEBUGGING|BSF_GLOBAL)) == BSF_GLOBAL)
       {
 	asymbol *mainsym = table[i];
+	bfd_vma mainvalue
+	  = (mainsym->value
+	     + mainsym->section->output_section->vma
+	     + mainsym->section->output_offset);
 	memcpy (table + 1, orig_table, i * sizeof (asymbol *));
 	table[0] = mainsym;
 
 	/* Check that the value assigned to :Main is the same as the entry
 	   address.  The default linker script asserts this.  This is as
 	   good a place as any to check this consistency. */
-	if ((mainsym->value
-	     + mainsym->section->output_section->vma
-	     + mainsym->section->output_offset)
-	    != bfd_get_start_address (abfd))
+	if (mainvalue != bfd_get_start_address (abfd)
+	    && !mmo_ignore_symbol_consistency (abfd))
 	  {
 	    /* Arbitrary buffer to hold the printable representation of a
 	       vma.  */
@@ -2913,10 +2970,11 @@ mmo_write_symbols_and_terminator (bfd *a
 	    char vmas_start[40];
 	    bfd_vma vma_start = bfd_get_start_address (abfd);
 
-	    sprintf_vma (vmas_main, mainsym->value);
+	    sprintf_vma (vmas_main, mainvalue);
 	    sprintf_vma (vmas_start, vma_start);
 
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: Bad symbol definition: `Main' set to %s rather"
 		 " than the start address %s\n"),
 	       bfd_get_filename (abfd), vmas_main, vmas_start);
@@ -2934,59 +2992,65 @@ mmo_write_symbols_and_terminator (bfd *a
       count++;
     }
 
-  for (i = 0, serno = 1; i < count && table[i] != NULL; i++)
-    {
-      asymbol *s = table[i];
-
-      /* It's not enough to consult bfd_is_local_label, since it does not
-	 mean "local" in the sense of linkable-and-observable-after-link.
-	 Let's just check the BSF_GLOBAL flag.
-
-	 Also, don't export symbols with characters not in the allowed set.  */
-      if ((s->flags & (BSF_DEBUGGING|BSF_GLOBAL)) == BSF_GLOBAL
-	  && strspn (s->name,
-		     valid_mmo_symbol_character_set) == strlen (s->name))
-	{
-	  struct mmo_symbol sym;
-	  memset (&sym, 0, sizeof (sym));
-
-	  /* Need to strip const here; strdup:ing would leak and the
-	     existing string must be safe to reuse.  */
-	  sym.name = (char *) s->name;
-	  sym.value =
-	    s->value
-	    + s->section->output_section->vma
-	    + s->section->output_offset;
-
-	  if (bfd_is_und_section (s->section))
-	    sym.sym_type = mmo_undef_sym;
-	  else if (strcmp (s->section->name, MMO_DATA_SECTION_NAME) == 0
-		   /* The encoding of data symbols require that the "rest"
-		      of the value fits in 6 bytes, so the upper two bytes
-		      must be 0x2000.  All other symbols get to be the
-		      absolute type.  */
-		   && (sym.value >> 48) == 0x2000)
-	    sym.sym_type = mmo_data_sym;
-	  else if (strcmp (s->section->name, MMIX_REG_SECTION_NAME) == 0)
-	    sym.sym_type = mmo_reg_sym;
-	  else if (strcmp (s->section->name,
-			   MMIX_REG_CONTENTS_SECTION_NAME) == 0)
+  /* Don't bother inspecting symbols in plugin dummy objects; their
+     symbols aren't fully inspectable.  */
+  if ((abfd->flags & BFD_PLUGIN) == 0)
+    {
+      for (i = 0, serno = 1; i < count && table[i] != NULL; i++)
+	{
+	  asymbol *s = table[i];
+
+	  /* It's not enough to consult bfd_is_local_label, since it does not
+	     mean "local" in the sense of linkable-and-observable-after-link.
+	     Let's just check the BSF_GLOBAL flag.
+
+	     Also, don't export symbols with characters not in the
+	     allowed set.  */
+	  if ((s->flags & (BSF_DEBUGGING|BSF_GLOBAL)) == BSF_GLOBAL
+	      && strspn (s->name,
+			 valid_mmo_symbol_character_set) == strlen (s->name))
 	    {
-	      sym.sym_type = mmo_reg_sym;
-	      sym.value /= 8;
-	    }
-	  else
-	    sym.sym_type = mmo_abs_sym;
+	      struct mmo_symbol sym;
+	      memset (&sym, 0, sizeof (sym));
 
-	  /* FIXME: We assume the order of the received symbols is an
-	     ordered mapping of the serial numbers.  This is not
-	     necessarily true if we e.g. objcopy a mmo file to another and
-	     there are gaps in the numbering.  Not sure if this can
-	     happen.  Not sure what to do.  */
-	  sym.serno = serno++;
+	      /* Need to strip const here; strdup:ing would leak and the
+		 existing string must be safe to reuse.  */
+	      sym.name = (char *) s->name;
+	      sym.value =
+		s->value
+		+ s->section->output_section->vma
+		+ s->section->output_offset;
+
+	      if (bfd_is_und_section (s->section))
+		sym.sym_type = mmo_undef_sym;
+	      else if (strcmp (s->section->name, MMO_DATA_SECTION_NAME) == 0
+		       /* The encoding of data symbols require that the "rest"
+			  of the value fits in 6 bytes, so the upper two bytes
+			  must be 0x2000.  All other symbols get to be the
+			  absolute type.  */
+		       && (sym.value >> 48) == 0x2000)
+		sym.sym_type = mmo_data_sym;
+	      else if (strcmp (s->section->name, MMIX_REG_SECTION_NAME) == 0)
+		sym.sym_type = mmo_reg_sym;
+	      else if (strcmp (s->section->name,
+			       MMIX_REG_CONTENTS_SECTION_NAME) == 0)
+		{
+		  sym.sym_type = mmo_reg_sym;
+		  sym.value /= 8;
+		}
+	      else
+		sym.sym_type = mmo_abs_sym;
 
-	  if (! mmo_internal_add_3_sym (abfd, &root, &sym))
-	    return FALSE;
+	      /* FIXME: We assume the order of the received symbols is an
+		 ordered mapping of the serial numbers.  This is not
+		 necessarily true if we e.g. objcopy a mmo file to another and
+		 there are gaps in the numbering.  Not sure if this can
+		 happen.  Not sure what to do.  */
+	      sym.serno = serno++;
+
+	      if (! mmo_internal_add_3_sym (abfd, &root, &sym))
+		return FALSE;
+	    }
 	}
     }
 
@@ -3008,7 +3072,8 @@ mmo_write_symbols_and_terminator (bfd *a
 	 There's no specific test-case.  */
       struct mmo_symbol sym;
 
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: warning: symbol table too large for mmo, larger than 65535"
 	   " 32-bit words: %d.  Only `Main' will be emitted.\n"),
 	 bfd_get_filename (abfd), trie_len);
@@ -3053,7 +3118,8 @@ mmo_write_symbols_and_terminator (bfd *a
       /* I haven't seen this trig.  It seems no use claiming this case
 	 isn't debugged and abort if we get here.  Instead emit a
 	 diagnostic and fail "normally".  */
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%s: internal error, symbol table changed size from %d to %d"
 	   " words\n"),
 	 bfd_get_filename (abfd), trie_len,
@@ -3105,7 +3171,8 @@ mmo_write_section_unless_reg_contents (b
 	  /* Make sure it hasn't got contents.  It seems impossible to
 	     make it carry contents, so we don't have a test-case for
 	     this.  */
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: internal error, internal register section %s had"
 	       " contents\n"),
 	     bfd_get_filename (abfd), sec->name);
@@ -3156,18 +3223,20 @@ mmo_write_object_contents (bfd *abfd)
 
 	  if (sec->size == 0)
 	    /* There must always be at least one such register.  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
 	      (_("%s: no initialized registers; section length 0\n"),
 	       bfd_get_filename (abfd));
 	  else if (sec->vma > (256 - 32) * 8)
 	    /* Provide better error message for the case of too many
 	       global registers.  */
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: too many initialized registers; section length %ld\n"),
 	       bfd_get_filename (abfd),
 	       (long) sec->size);
 	  else
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
+	      /* xgettext:c-format */
 	      (_("%s: invalid start address for initialized registers of"
 		 " length %ld: 0x%lx%08lx\n"),
 	       bfd_get_filename (abfd),
@@ -3233,6 +3302,7 @@ mmo_write_object_contents (bfd *abfd)
   _bfd_generic_copy_link_hash_symbol_type
 #define mmo_bfd_final_link _bfd_generic_final_link
 #define mmo_bfd_link_split_section _bfd_generic_link_split_section
+#define mmo_bfd_link_check_relocs  _bfd_generic_link_check_relocs
 
 /* Strictly speaking, only MMIX uses this restricted format, but let's not
    stop anybody from shooting themselves in the foot.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/netbsd-core.c ./bfd/netbsd-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/netbsd-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/netbsd-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back end for NetBSD style core files
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
    Written by Paul Kranenburg, EUR
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/netbsd.h ./bfd/netbsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/netbsd.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/netbsd.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end definitions used by all NetBSD targets.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -34,21 +34,21 @@
 #define N_SHARED_LIB(x) 	(N_DYNAMIC (x))
 
 /* We have 6 bits of flags and 10 bits of machine ID.  */
-#define N_MACHTYPE(exec) \
-	((enum machine_type) (((exec).a_info >> 16) & 0x03ff))
-#define N_FLAGS(exec) \
-	(((exec).a_info >> 26) & 0x3f)
+#define N_MACHTYPE(execp) \
+	((enum machine_type) (((execp)->a_info >> 16) & 0x03ff))
+#define N_FLAGS(execp) \
+	(((execp)->a_info >> 26) & 0x3f)
 
-#define N_SET_INFO(exec, magic, type, flags) \
-	((exec).a_info = ((magic) & 0xffff) \
+#define N_SET_INFO(execp, magic, type, flags) \
+	((execp)->a_info = ((magic) & 0xffff) \
 	 | (((int) (type) & 0x3ff) << 16) \
 	 | (((flags) & 0x3f) << 24))
-#define N_SET_MACHTYPE(exec, machtype) \
-	((exec).a_info = \
-         ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
-#define N_SET_FLAGS(exec, flags) \
-	((exec).a_info = \
-	 ((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
+#define N_SET_MACHTYPE(execp, machtype) \
+	((execp)->a_info = \
+         ((execp)->a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
+#define N_SET_FLAGS(execp, flags) \
+	((execp)->a_info = \
+	 ((execp)->a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -84,12 +84,7 @@ MY (write_object_contents) (bfd *abfd)
      will normally have been done by set_section_contents, but only if
      there actually are some section contents.  */
   if (! abfd->output_has_begun)
-    {
-      bfd_size_type text_size;
-      file_ptr text_end;
-
-      NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
-    }
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
@@ -97,10 +92,10 @@ MY (write_object_contents) (bfd *abfd)
   switch (bfd_get_arch(abfd))
     {
     case DEFAULT_ARCH:
-      N_SET_MACHTYPE(*execp, DEFAULT_MID);
+      N_SET_MACHTYPE (execp, DEFAULT_MID);
       break;
     default:
-      N_SET_MACHTYPE(*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
       break;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/newsos3.c ./bfd/newsos3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/newsos3.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/newsos3.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NewsOS3 (Sony, 68k) binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-alpha.c ./bfd/nlm32-alpha.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-alpha.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm32-alpha.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for 32-bit Alpha NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32.c ./bfd/nlm32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm32.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) 32-bit executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-i386.c ./bfd/nlm32-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm32-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for 32-bit i386 NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-ppc.c ./bfd/nlm32-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm32-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-sparc.c ./bfd/nlm32-sparc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm32-sparc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm32-sparc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for 32-bit SPARC NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm64.c ./bfd/nlm64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) 64-bit executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm.c ./bfd/nlm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlmcode.h ./bfd/nlmcode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlmcode.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlmcode.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, using ELF support as the
    template.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlmswap.h ./bfd/nlmswap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlmswap.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlmswap.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) swapping routines for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, using ELF support as the
    template.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm-target.h ./bfd/nlm-target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/nlm-target.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/nlm-target.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -59,6 +59,7 @@
   _bfd_generic_copy_link_hash_symbol_type
 #define nlm_bfd_final_link                      _bfd_generic_final_link
 #define nlm_bfd_link_split_section              _bfd_generic_link_split_section
+#define nlm_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 /* This structure contains everything that BFD knows about a target.
    It includes things like its byte order, name, what routines to call
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ns32k.h ./bfd/ns32k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ns32k.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ns32k.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file for ns32k routines.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ns32knetbsd.c ./bfd/ns32knetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ns32knetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ns32knetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/ns32k a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/oasys.c ./bfd/oasys.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/oasys.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/oasys.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for oasys objects.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -272,37 +272,35 @@ oasys_archive_p (bfd *abfd)
     filepos = header.mod_tbl_offset;
     for (i = 0; i < header.mod_count; i++)
       {
+	oasys_extmodule_table_type_b_type record_ext;
+
 	if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
 	  return NULL;
 
 	/* There are two ways of specifying the archive header.  */
-	  {
-	    oasys_extmodule_table_type_b_type record_ext;
+	amt = sizeof (record_ext);
+	if (bfd_bread ((void *) &record_ext, amt, abfd) != amt)
+	  return NULL;
 
-	    amt = sizeof (record_ext);
-	    if (bfd_bread ((void *) &record_ext, amt, abfd) != amt)
-	      return NULL;
-
-	    record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
-	    record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
-
-	    record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
-	    record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
-	    record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
-	    record.module_name_size = H_GET_32 (abfd,
-						record_ext.mod_name_length);
-
-	    amt = record.module_name_size;
-	    module[i].name = bfd_alloc (abfd, amt + 1);
-	    if (!module[i].name)
-	      return NULL;
-	    if (bfd_bread ((void *) module[i].name, amt, abfd) != amt)
-	      return NULL;
-	    module[i].name[record.module_name_size] = 0;
-	    filepos += (sizeof (record_ext)
-			+ record.dep_count * 4
-			+ record.module_name_size + 1);
-	  }
+	record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
+	record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
+
+	record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
+	record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
+	record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
+	record.module_name_size = H_GET_32 (abfd,
+					    record_ext.mod_name_length);
+
+	amt = record.module_name_size;
+	module[i].name = bfd_alloc (abfd, amt + 1);
+	if (!module[i].name)
+	  return NULL;
+	if (bfd_bread ((void *) module[i].name, amt, abfd) != amt)
+	  return NULL;
+	module[i].name[record.module_name_size] = 0;
+	filepos += (sizeof (record_ext)
+		    + record.dep_count * 4
+		    + record.module_name_size + 1);
 
 	module[i].size = record.mod_size;
 	module[i].pos = record.file_offset;
@@ -614,6 +612,7 @@ oasys_object_p (bfd *abfd)
 	  break;
 	case oasys_record_is_data_enum:
 	  oasys->first_data_record = bfd_tell (abfd) - record.header.length;
+	  /* Fall through.  */
 	case oasys_record_is_debug_enum:
 	case oasys_record_is_module_enum:
 	case oasys_record_is_named_section_enum:
@@ -877,7 +876,8 @@ oasys_write_sections (bfd *abfd)
     {
       if (!ISDIGIT (s->name[0]))
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%s: can not represent section `%s' in oasys"),
 	     bfd_get_filename (abfd), s->name);
 	  bfd_set_error (bfd_error_nonrepresentable_section);
@@ -1194,6 +1194,7 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUT
   _bfd_generic_copy_link_hash_symbol_type
 #define oasys_bfd_final_link                       _bfd_generic_final_link
 #define oasys_bfd_link_split_section               _bfd_generic_link_split_section
+#define oasys_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 const bfd_target oasys_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/opncls.c ./bfd/opncls.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/opncls.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/opncls.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* opncls.c -- open and close a BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Written by Cygnus Support.
 
@@ -25,6 +25,7 @@
 #include "objalloc.h"
 #include "libbfd.h"
 #include "libiberty.h"
+#include "elf-bfd.h"
 
 #ifndef S_IXUSR
 #define S_IXUSR 0100	/* Execute by owner.  */
@@ -218,7 +219,7 @@ bfd_fopen (const char *filename, const c
     nbfd->iostream = fdopen (fd, mode);
   else
 #endif
-    nbfd->iostream = real_fopen (filename, mode);
+    nbfd->iostream = _bfd_real_fopen (filename, mode);
   if (nbfd->iostream == NULL)
     {
       bfd_set_error (bfd_error_system_call);
@@ -1287,7 +1288,7 @@ separate_debug_file_exists (const char *
 
   BFD_ASSERT (name);
 
-  f = real_fopen (name, FOPEN_RB);
+  f = _bfd_real_fopen (name, FOPEN_RB);
   if (f == NULL)
     return FALSE;
 
@@ -1305,7 +1306,7 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
 	bfd_boolean separate_alt_debug_file_exists
-	  (char *name, unsigned long crc32);
+	  (char *name, unsigned long buildid);
 
 DESCRIPTION
 	Checks to see if @var{name} is a file and if its BuildID
@@ -1320,7 +1321,7 @@ separate_alt_debug_file_exists (const ch
 
   BFD_ASSERT (name);
 
-  f = real_fopen (name, FOPEN_RB);
+  f = _bfd_real_fopen (name, FOPEN_RB);
   if (f == NULL)
     return FALSE;
 
@@ -1336,17 +1337,21 @@ INTERNAL_FUNCTION
 	find_separate_debug_file
 
 SYNOPSIS
-	char *find_separate_debug_file (bfd *abfd);
+	char *find_separate_debug_file
+	  (bfd *abfd, const char *dir, bfd_boolean include_dirs,
+	   get_func_type get, check_func_type check);
 
 DESCRIPTION
-	Searches @var{abfd} for a section called @var{section_name} which
-	is expected to contain a reference to a file containing separate
-	debugging information.  The function scans various locations in
-	the filesystem, including the file tree rooted at
-	@var{debug_file_directory}, and returns the first matching
-	filename that it finds.  If @var{check_crc} is TRUE then the
-	contents of the file must also match the CRC value contained in
-	@var{section_name}.  Returns NULL if no valid file could be found.
+	Searches for a debug information file corresponding to @var{abfd}.
+	The name of the separate debug info file is returned by the @var{get}
+	function.  This function scans various fixed locations in the
+	filesystem, including the file tree rooted at @var{dir}.  If the
+	@var{include_dirs} parameter is true then the directory components of
+	@var{abfd}'s filename will be included in the searched locations.
+
+	Returns the filename of the first file to be found which receives a
+	TRUE result from the @var{check} function.  Returns NULL if no valid
+	file could be found.
 */
 
 typedef char *      (* get_func_type) (bfd *, unsigned long *);
@@ -1355,6 +1360,7 @@ typedef bfd_boolean (* check_func_type) 
 static char *
 find_separate_debug_file (bfd *           abfd,
 			  const char *    debug_file_directory,
+			  bfd_boolean     include_dirs,
 			  get_func_type   get_func,
 			  check_func_type check_func)
 {
@@ -1378,7 +1384,7 @@ find_separate_debug_file (bfd *         
     }
 
   base = get_func (abfd, & crc32);
-    
+
   if (base == NULL)
     return NULL;
 
@@ -1389,18 +1395,27 @@ find_separate_debug_file (bfd *         
       return NULL;
     }
 
-  for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--)
-    if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1]))
-      break;
+  if (include_dirs)
+    {
+      for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--)
+	if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1]))
+	  break;
 
-  dir = (char *) bfd_malloc (dirlen + 1);
-  if (dir == NULL)
+      dir = (char *) bfd_malloc (dirlen + 1);
+      if (dir == NULL)
+	{
+	  free (base);
+	  return NULL;
+	}
+      memcpy (dir, abfd->filename, dirlen);
+      dir[dirlen] = '\0';
+    }
+  else
     {
-      free (base);
-      return NULL;
+      dir = (char *) bfd_malloc (1);
+      * dir = 0;
+      dirlen = 0;
     }
-  memcpy (dir, abfd->filename, dirlen);
-  dir[dirlen] = '\0';
 
   /* Compute the canonical name of the bfd object with all symbolic links
      resolved, for use in the global debugfile directory.  */
@@ -1410,38 +1425,78 @@ find_separate_debug_file (bfd *         
       break;
   canon_dir[canon_dirlen] = '\0';
 
+#ifndef EXTRA_DEBUG_ROOT1
+#define EXTRA_DEBUG_ROOT1 "/usr/lib/debug"
+#endif
+#ifndef EXTRA_DEBUG_ROOT2
+#define EXTRA_DEBUG_ROOT2 "/usr/lib/debug/usr"
+#endif  
+
   debugfile = (char *)
       bfd_malloc (strlen (debug_file_directory) + 1
                   + (canon_dirlen > dirlen ? canon_dirlen : dirlen)
                   + strlen (".debug/")
+#ifdef EXTRA_DEBUG_ROOT1
+		  + strlen (EXTRA_DEBUG_ROOT1)
+#endif
+#ifdef EXTRA_DEBUG_ROOT2
+		  + strlen (EXTRA_DEBUG_ROOT2)
+#endif
                   + strlen (base)
                   + 1);
   if (debugfile == NULL)
     goto found; /* Actually this returns NULL.  */
 
-  /* First try in the same directory as the original file:  */
-  strcpy (debugfile, dir);
-  strcat (debugfile, base);
+  /* First try in the same directory as the original file.
 
+     FIXME: Strictly speaking if we are using the build-id method,
+     (ie include_dirs == FALSE) then we should only check absolute
+     paths, not relative ones like this one (and the next one).
+     The check is left in however as this allows the binutils
+     testsuite to exercise this feature without having to install
+     a file into the root filesystem.  (See binutils/testsuite/
+     binutils-all/objdump.exp for the test).  */
+  sprintf (debugfile, "%s%s", dir, base);
   if (check_func (debugfile, crc32))
     goto found;
 
   /* Then try in a subdirectory called .debug.  */
-  strcpy (debugfile, dir);
-  strcat (debugfile, ".debug/");
-  strcat (debugfile, base);
+  sprintf (debugfile, "%s.debug/%s", dir, base);
+  if (check_func (debugfile, crc32))
+    goto found;
 
+#ifdef EXTRA_DEBUG_ROOT1
+  /* Try the first extra debug file root.  */
+  sprintf (debugfile, "%s%s%s", EXTRA_DEBUG_ROOT1,
+	   include_dirs ? canon_dir : "/", base);
   if (check_func (debugfile, crc32))
     goto found;
+#endif
 
+#ifdef EXTRA_DEBUG_ROOT2
+  /* Try the second extra debug file root.  */
+  sprintf (debugfile, "%s%s%s", EXTRA_DEBUG_ROOT2,
+	   include_dirs ? canon_dir : "/", base);
+  if (check_func (debugfile, crc32))
+    goto found;
+#endif
+  
   /* Then try in the global debugfile directory.  */
   strcpy (debugfile, debug_file_directory);
   dirlen = strlen (debug_file_directory) - 1;
-  if (dirlen > 0
-      && debug_file_directory[dirlen] != '/'
-      && canon_dir[0] != '/')
-    strcat (debugfile, "/");
-  strcat (debugfile, canon_dir);
+  if (include_dirs)
+    {
+      if (dirlen > 0
+	  && debug_file_directory[dirlen] != '/'
+	  && canon_dir[0] != '/')
+	strcat (debugfile, "/");
+      strcat (debugfile, canon_dir);
+    }
+  else
+    {
+      if (dirlen > 0 && debug_file_directory[dirlen] != '/')
+	strcat (debugfile, "/");
+    }
   strcat (debugfile, base);
 
   if (check_func (debugfile, crc32))
@@ -1475,9 +1530,8 @@ DESCRIPTION
 	locations, including the directory tree rooted at @var{dir}, and if
 	found returns the full filename.
 
-	If @var{dir} is NULL, it will search a default path configured into
-	libbfd at build time.  [XXX this feature is not currently
-	implemented].
+	If @var{dir} is NULL, the search will take place starting at
+	the current directory.
 
 RETURNS
 	<<NULL>> on any errors or failure to locate the .debug file,
@@ -1488,7 +1542,7 @@ RETURNS
 char *
 bfd_follow_gnu_debuglink (bfd *abfd, const char *dir)
 {
-  return find_separate_debug_file (abfd, dir,
+  return find_separate_debug_file (abfd, dir, TRUE,
 				   bfd_get_debug_link_info,
 				   separate_debug_file_exists);
 }
@@ -1522,14 +1576,13 @@ DESCRIPTION
 
 	Takes a BFD and searches it for a .gnu_debugaltlink section.  If this
 	section is found, it examines the section for the name of a file
-	containing auxiliary debugging information.  It	then searches the
+	containing auxiliary debugging information.  It then searches the
 	filesystem for this file in a set of standard locations, including
 	the directory tree rooted at @var{dir}, and if found returns the
 	full filename.
 
-	If @var{dir} is NULL, it will search a default path configured into
-	libbfd at build time.  [FIXME: This feature is not currently
-	implemented].
+	If @var{dir} is NULL, the search will take place starting at
+	the current directory.
 
 RETURNS
 	<<NULL>> on any errors or failure to locate the debug file,
@@ -1540,7 +1593,7 @@ RETURNS
 char *
 bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir)
 {
-  return find_separate_debug_file (abfd, dir,
+  return find_separate_debug_file (abfd, dir, TRUE,
 				   get_alt_debug_link_info_shim,
 				   separate_alt_debug_file_exists);
 }
@@ -1592,6 +1645,8 @@ bfd_create_gnu_debuglink_section (bfd *a
   if (sect == NULL)
     return NULL;
 
+  /* Compute the size of the section.  Allow for the CRC after the filename,
+     and padding so that it will start on a 4-byte boundary.  */
   debuglink_size = strlen (filename) + 1;
   debuglink_size += 3;
   debuglink_size &= ~3;
@@ -1601,6 +1656,11 @@ bfd_create_gnu_debuglink_section (bfd *a
     /* XXX Should we delete the section from the bfd ?  */
     return NULL;
 
+  /* PR 21193: Ensure that the section has 4-byte alignment for the CRC.
+     Note - despite the name of the function being called, we are
+     setting an alignment power, not a byte alignment value.  */
+  bfd_set_section_alignment (abfd, sect, 2);
+
   return sect;
 }
 
@@ -1651,7 +1711,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *
      .gnu_debuglink section, we insist upon the user providing us with a
      correct-for-section-creation-time path, but this need not conform to
      the gdb location algorithm.  */
-  handle = real_fopen (filename, FOPEN_RB);
+  handle = _bfd_real_fopen (filename, FOPEN_RB);
   if (handle == NULL)
     {
       bfd_set_error (bfd_error_system_call);
@@ -1695,3 +1755,245 @@ bfd_fill_in_gnu_debuglink_section (bfd *
 
   return TRUE;
 }
+
+/*
+INTERNAL_FUNCTION
+	get_build_id
+
+SYNOPSIS
+	struct bfd_build_id * get_build_id
+	  (bfd *abfd);
+
+DESCRIPTION
+	Finds the build-id associated with @var{abfd}.  If the build-id is
+	extracted from the note section then a build-id structure is built
+	for it, using memory allocated to @var{abfd}, and this is then
+	attached to the @var{abfd}.
+
+	Returns a pointer to the build-id structure if a build-id could be
+	found.  If no build-id is found NULL is returned and error code is
+	set.
+*/
+
+static struct bfd_build_id *
+get_build_id (bfd *abfd)
+{
+  struct bfd_build_id *build_id;
+  Elf_Internal_Note inote;
+  Elf_External_Note *enote;
+  bfd_byte *contents;
+  asection *sect;
+
+  BFD_ASSERT (abfd);
+
+  if (abfd->build_id && abfd->build_id->size > 0)
+    /* Save some time by using the already computed build-id.  */
+    return (struct bfd_build_id *) abfd->build_id;
+
+  sect = bfd_get_section_by_name (abfd, ".note.gnu.build-id");
+  if (sect == NULL)
+    {
+      bfd_set_error (bfd_error_no_debug_section);
+      return NULL;
+    }
+
+  /* FIXME: Should we support smaller build-id notes ?  */
+  if (bfd_get_section_size (sect) < 0x24)
+    {
+      bfd_set_error (bfd_error_invalid_operation);
+      return NULL;
+    }
+
+  if (!bfd_malloc_and_get_section (abfd, sect, & contents))
+    {
+      if (contents != NULL)
+	free (contents);
+      return NULL;
+    }
+
+  enote = (Elf_External_Note *) contents;
+  inote.type = H_GET_32 (abfd, enote->type);
+  inote.namesz = H_GET_32 (abfd, enote->namesz);
+  inote.namedata = enote->name;
+  inote.descsz = H_GET_32 (abfd, enote->descsz);
+  inote.descdata = inote.namedata + BFD_ALIGN (inote.namesz, 4);
+  /* FIXME: Should we check for extra notes in this section ?  */
+	  
+  if (inote.descsz == 0
+      || inote.type != NT_GNU_BUILD_ID
+      || inote.namesz != 4 /* sizeof "GNU"  */
+      || strcmp (inote.namedata, "GNU") != 0)
+    {
+      free (contents);
+      bfd_set_error (bfd_error_invalid_operation);
+      return NULL;
+    }
+
+  build_id = bfd_alloc (abfd, sizeof (struct bfd_build_id) + inote.descsz);
+  if (build_id == NULL)
+    {
+      free (contents);
+      return NULL;
+    }
+
+  build_id->size = inote.descsz;
+  memcpy (build_id->data, inote.descdata, inote.descsz);
+  abfd->build_id = build_id;
+  free (contents);
+
+  return build_id;
+}
+
+/*
+INTERNAL_FUNCTION
+	get_build_id_name
+
+SYNOPSIS
+	char * get_build_id_name
+	  (bfd *abfd, unsigned long *build_id_out)
+
+DESCRIPTION
+	Searches @var{abfd} for a build-id, and then constructs a pathname
+	from it.  The path is computed as .build-id/NN/NN+NN.debug where
+	NNNN+NN is the build-id value as a hexadecimal string.
+
+	Returns the constructed filename or NULL upon error.
+	It is the caller's responsibility to free the memory used to hold the
+	filename.
+	If a filename is returned then the @var{build_id_out} parameter is
+	set to a pointer to the build_id structure.
+*/
+
+static char *
+get_build_id_name (bfd *abfd, unsigned long *build_id_out)
+{
+  struct bfd_build_id *build_id;
+  char *name;
+  char *n;
+  bfd_size_type s;
+  bfd_byte *d;
+
+  if (abfd == NULL || abfd->filename == NULL || build_id_out == NULL)
+    {
+      bfd_set_error (bfd_error_invalid_operation);
+      return NULL;
+    }
+
+  build_id = get_build_id (abfd);
+  if (build_id == NULL)
+    return NULL;
+
+  /* Compute the debug pathname corresponding to the build-id.  */
+  name = bfd_malloc (strlen (".build-id/") + build_id->size * 2 + 2 + strlen (".debug"));
+  if (name == NULL)
+    {
+      bfd_set_error (bfd_error_no_memory);
+      return NULL;
+    }
+  n = name;
+  d = build_id->data;
+  s = build_id->size;
+
+  n += sprintf (n, ".build-id/");
+  n += sprintf (n, "%02x", (unsigned) *d++); s--;
+  n += sprintf (n, "/");
+  while (s--)
+    n += sprintf (n, "%02x", (unsigned) *d++);
+  n += sprintf (n, ".debug");
+
+  * build_id_out = (unsigned long) build_id;
+  return name;
+}
+
+/*
+INTERNAL_FUNCTION
+	check_build_id_file
+
+SYNOPSIS
+	bfd_boolean check_build_id_file
+	  (char *name, unsigned long buildid);
+
+DESCRIPTION
+	Checks to see if @var{name} is a readable file and if its build-id
+	matches @var{buildid}.
+
+	Returns TRUE if the file exists, is readable, and contains a build-id
+	which matches @var{build-id}.
+*/
+
+static bfd_boolean
+check_build_id_file (const char *name,
+		     const unsigned long buildid)
+{
+  struct bfd_build_id *orig_build_id;
+  struct bfd_build_id *build_id;
+  bfd * file;
+  bfd_boolean result;
+
+  BFD_ASSERT (name);
+  BFD_ASSERT (buildid);
+
+  file = bfd_openr (name, NULL);
+  if (file == NULL)
+    return FALSE;
+
+  /* If the file is an archive, process all of its elements.  */
+  if (! bfd_check_format (file, bfd_object))
+    {
+      bfd_close (file);
+      return FALSE;
+    }
+  
+  build_id = get_build_id (file);
+  if (build_id == NULL)
+    {
+      bfd_close (file);
+      return FALSE;
+    }
+
+  orig_build_id = (struct bfd_build_id *) buildid;
+
+  result = build_id->size == orig_build_id->size
+    && memcmp (build_id->data, orig_build_id->data, build_id->size) == 0;
+
+  (void) bfd_close (file);
+
+  return result;
+}
+
+/*
+FUNCTION
+	bfd_follow_build_id_debuglink
+
+SYNOPSIS
+	char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
+
+DESCRIPTION
+
+	Takes @var{abfd} and searches it for a .note.gnu.build-id section.
+	If this section is found, it extracts the value of the NT_GNU_BUILD_ID
+	note, which should be a hexadecimal value @var{NNNN+NN} (for
+	32+ hex digits).  It then searches the filesystem for a file named
+	@var{.build-id/NN/NN+NN.debug} in a set of standard locations,
+	including the directory tree rooted at @var{dir}.  The filename
+	of the first matching file to be found is returned.  A matching
+	file should contain a .note.gnu.build-id section with the same
+	@var{NNNN+NN} note as @var{abfd}, although this check is currently
+	not implemented.
+
+	If @var{dir} is NULL, the search will take place starting at
+	the current directory.
+
+RETURNS
+	<<NULL>> on any errors or failure to locate the debug file,
+	otherwise a pointer to a heap-allocated string containing the
+	filename.  The caller is responsible for freeing this string.
+*/
+
+char *
+bfd_follow_build_id_debuglink (bfd *abfd, const char *dir)
+{
+  return find_separate_debug_file (abfd, dir, FALSE,
+				   get_build_id_name,
+				   check_build_id_file);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/osf-core.c ./bfd/osf-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/osf-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/osf-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for OSF/1 core files.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -124,8 +124,8 @@ osf_core_core_file_p (bfd *abfd)
 	  flags = SEC_HAS_CONTENTS;
 	  break;
 	default:
-	  (*_bfd_error_handler) (_("Unhandled OSF/1 core file section type %d\n"),
-				 core_scnhdr.scntype);
+	  _bfd_error_handler (_("Unhandled OSF/1 core file section type %d\n"),
+			      core_scnhdr.scntype);
 	  continue;
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pc532-mach.c ./bfd/pc532-mach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pc532-mach.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pc532-mach.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Mach3/532 a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -31,7 +31,7 @@
    1 and specially define our own N_TXTSIZE.  */
 
 #define N_HEADER_IN_TEXT(x) 1
-#define N_TXTSIZE(x) ((x).a_text)
+#define N_TXTSIZE(x) ((x)->a_text)
 
 #define TEXT_START_ADDR 0x10000       /* from old ld */
 #define TARGET_PAGE_SIZE 0x1000       /* from old ld,  032 & 532 are really 512/4k */
@@ -39,7 +39,7 @@
 /* Use a_entry of 0 to distinguish object files from OMAGIC executables */
 #define N_TXTADDR(x) \
   (N_MAGIC(x) == OMAGIC ? \
-   ((x).a_entry < TEXT_START_ADDR? 0: TEXT_START_ADDR): \
+   ((x)->a_entry < TEXT_START_ADDR? 0: TEXT_START_ADDR): \
    (N_MAGIC(x) == NMAGIC? TEXT_START_ADDR: \
     TEXT_START_ADDR + EXEC_BYTES_SIZE))
 
@@ -89,16 +89,16 @@ MY(write_object_contents) (bfd *abfd)
   switch (bfd_get_mach (abfd))
     {
     case 32032:
-      N_SET_MACHTYPE (*execp, M_NS32032);
+      N_SET_MACHTYPE (execp, M_NS32032);
       break;
     case 32532:
     default:
-      N_SET_MACHTYPE (*execp, M_NS32532);
+      N_SET_MACHTYPE (execp, M_NS32532);
       break;
     }
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pdp11.c ./bfd/pdp11.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pdp11.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pdp11.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PDP-11 a.out binaries.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -37,7 +37,7 @@
 #define ARCH_SIZE	16
 #undef TARGET_IS_BIG_ENDIAN_P
 
-#define	TARGET_PAGE_SIZE	1024
+#define	TARGET_PAGE_SIZE	256
 #define	SEGMENT__SIZE	TARGET_PAGE_SIZE
 
 #define	DEFAULT_ARCH	bfd_arch_pdp11
@@ -58,9 +58,9 @@
 #define N_HEADER_IN_TEXT(x)	0
 
 /* There is no flags field.  */
-#define N_FLAGS(exec)		0
+#define N_FLAGS(execp)		0
 
-#define N_SET_FLAGS(exec, flags) do { } while (0)
+#define N_SET_FLAGS(execp, flags) do { } while (0)
 #define N_BADMAG(x) (N_MAGIC(x) != OMAGIC	\
 		     && N_MAGIC(x) != NMAGIC	\
 		     && N_MAGIC(x) != ZMAGIC)
@@ -111,11 +111,11 @@ struct pdp11_external_nlist
 #define	EXTERNAL_NLIST_SIZE	8
 
 #define N_TXTOFF(x)	(EXEC_BYTES_SIZE)
-#define N_DATOFF(x)	(N_TXTOFF(x) + (x).a_text)
-#define N_TRELOFF(x)	(N_DATOFF(x) + (x).a_data)
-#define N_DRELOFF(x)	(N_TRELOFF(x) + (x).a_trsize)
-#define N_SYMOFF(x)	(N_DRELOFF(x) + (x).a_drsize)
-#define N_STROFF(x)	(N_SYMOFF(x) + (x).a_syms)
+#define N_DATOFF(x)	(N_TXTOFF(x) + (x)->a_text)
+#define N_TRELOFF(x)	(N_DATOFF(x) + (x)->a_data)
+#define N_DRELOFF(x)	(N_TRELOFF(x) + (x)->a_trsize)
+#define N_SYMOFF(x)	(N_DRELOFF(x) + (x)->a_drsize)
+#define N_STROFF(x)	(N_SYMOFF(x) + (x)->a_syms)
 
 #define WRITE_HEADERS(abfd, execp) pdp11_aout_write_headers (abfd, execp)
 
@@ -292,11 +292,9 @@ static int
 pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp)
 {
   struct external_exec exec_bytes;
-  bfd_size_type text_size;
-  file_ptr text_end;
 
   if (adata(abfd).magic == undecided_magic)
-    NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
   execp->a_entry = bfd_get_start_address (abfd);
@@ -326,7 +324,7 @@ pdp11_aout_write_headers (bfd *abfd, str
   if (bfd_get_outsymbols (abfd) != NULL
       && bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)
 	return FALSE;
 
       if (! NAME (aout, write_syms) (abfd))
@@ -336,9 +334,9 @@ pdp11_aout_write_headers (bfd *abfd, str
   if (obj_textsec (abfd)->reloc_count > 0
       || obj_datasec (abfd)->reloc_count > 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0
+      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0
 	  || !NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))
-	  || bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET) != 0
+	  || bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0
 	  || !NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
 	return FALSE;
     }
@@ -359,12 +357,7 @@ MY(write_object_contents) (bfd *abfd)
      will normally have been done by set_section_contents, but only if
      there actually are some section contents.  */
   if (! abfd->output_has_begun)
-    {
-      bfd_size_type text_size;
-      file_ptr text_end;
-
-      NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
-    }
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   obj_reloc_entry_size (abfd) = RELOC_SIZE;
 
@@ -492,20 +485,20 @@ NAME (aout, some_aout_object_p) (bfd *ab
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC(*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
-  if (N_MAGIC (*execp) == ZMAGIC)
+  if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC)
     adata (abfd).magic = o_magic;
   else
     {
@@ -562,25 +555,25 @@ NAME (aout, some_aout_object_p) (bfd *ab
      in by the callback:  */
   struct exec *execp = exec_hdr (abfd);
 
-  obj_textsec (abfd)->size = N_TXTSIZE(*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
   /* Data and bss are already filled in since they're so standard.  */
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR(*execp);
-  obj_datasec (abfd)->vma = N_DATADDR(*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR(*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF(*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF(*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF(*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
   abfd->obj_arch = bfd_arch_obscure;
@@ -860,7 +853,7 @@ adjust_o_magic (bfd *abfd, struct intern
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss  = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, OMAGIC);
+  N_SET_MAGIC (execp, OMAGIC);
 }
 
 static void
@@ -944,7 +937,7 @@ adjust_z_magic (bfd *abfd, struct intern
   execp->a_text = obj_textsec(abfd)->size;
   if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
     execp->a_text += adata(abfd).exec_bytes_size;
-  N_SET_MAGIC (*execp, ZMAGIC);
+  N_SET_MAGIC (execp, ZMAGIC);
 
   /* Spec says data section should be rounded up to page boundary.  */
   obj_datasec(abfd)->size
@@ -1011,13 +1004,11 @@ adjust_n_magic (bfd *abfd, struct intern
   execp->a_text = obj_textsec(abfd)->size;
   execp->a_data = obj_datasec(abfd)->size;
   execp->a_bss = obj_bsssec(abfd)->size;
-  N_SET_MAGIC (*execp, NMAGIC);
+  N_SET_MAGIC (execp, NMAGIC);
 }
 
 bfd_boolean
-NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
-				    bfd_size_type *text_size,
-				    file_ptr * text_end ATTRIBUTE_UNUSED)
+NAME (aout, adjust_sizes_and_vmas) (bfd *abfd)
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
@@ -1031,7 +1022,6 @@ NAME (aout, adjust_sizes_and_vmas) (bfd 
     align_power(obj_textsec(abfd)->size,
 		obj_textsec(abfd)->alignment_power);
 
-  *text_size = obj_textsec (abfd)->size;
   /* Rule (heuristic) for when to pad to a new page.  Note that there
      are (at least) two ways demand-paged (ZMAGIC) files have been
      handled.  Most Berkeley-based systems start the text segment at
@@ -1142,12 +1132,9 @@ NAME (aout, set_section_contents) (bfd *
 				   file_ptr offset,
 				   bfd_size_type count)
 {
-  file_ptr text_end;
-  bfd_size_type text_size;
-
   if (! abfd->output_has_begun)
     {
-      if (! NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end))
+      if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
 	return FALSE;
     }
 
@@ -1160,8 +1147,9 @@ NAME (aout, set_section_contents) (bfd *
   if (section != obj_textsec (abfd)
       && section != obj_datasec (abfd))
     {
-      (*_bfd_error_handler)
-	("%s: can not represent section `%s' in a.out object file format",
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%s: can not represent section `%s' in a.out object file format"),
 	 bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
       bfd_set_error (bfd_error_nonrepresentable_section);
       return FALSE;
@@ -1392,8 +1380,9 @@ translate_to_native_sym_flags (bfd *abfd
     {
       /* This case occurs, e.g., for the *DEBUG* section of a COFF
 	 file.  */
-      (*_bfd_error_handler)
-	("%B: can not represent section for symbol `%s' in a.out object file format",
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: can not represent section for symbol `%s' in a.out object file format"),
 	 abfd, cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
       bfd_set_error (bfd_error_nonrepresentable_section);
       return FALSE;
@@ -1419,8 +1408,9 @@ translate_to_native_sym_flags (bfd *abfd
     sym_pointer->e_type[0] = N_UNDF | N_EXT;
   else
     {
-      (*_bfd_error_handler)
-	("%B: can not represent section `%A' in a.out object file format",
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%B: can not represent section `%A' in a.out object file format"),
 	 abfd, sec);
       bfd_set_error (bfd_error_nonrepresentable_section);
       return FALSE;
@@ -2621,7 +2611,7 @@ aout_link_check_ar_symbols (bfd *abfd,
 	     However, it might be correct.  */
 	  if (!(*info->callbacks
 		->add_archive_element) (info, abfd, name, subsbfd))
-	    return FALSE;
+	    continue;
 	  *pneeded = TRUE;
 	  return TRUE;
 	}
@@ -2998,6 +2988,7 @@ aout_link_write_other_symbol (struct bfd
     case bfd_link_hash_undefweak:
       type = N_WEAKU;
       val = 0;
+      /* Fall through.  */
     case bfd_link_hash_indirect:
     case bfd_link_hash_warning:
       /* FIXME: Ignore these for now.  The circumstances under which
@@ -3083,9 +3074,8 @@ aout_link_reloc_link_order (struct aout_
 	}
       else
 	{
-	  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-		 (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
-	    return FALSE;
+	  (*flaginfo->info->callbacks->unattached_reloc)
+	    (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0);
 	  r_index = 0;
 	}
     }
@@ -3180,18 +3170,14 @@ aout_link_reloc_link_order (struct aout_
 	case bfd_reloc_outofrange:
 	  abort ();
 	case bfd_reloc_overflow:
-	  if (! ((*flaginfo->info->callbacks->reloc_overflow)
-		 (flaginfo->info, NULL,
-		  (p->type == bfd_section_reloc_link_order
-		   ? bfd_section_name (flaginfo->output_bfd,
-				       pr->u.section)
-		   : pr->u.name),
-		  howto->name, pr->addend, NULL,
-		  (asection *) NULL, (bfd_vma) 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*flaginfo->info->callbacks->reloc_overflow)
+	    (flaginfo->info, NULL,
+	     (p->type == bfd_section_reloc_link_order
+	      ? bfd_section_name (flaginfo->output_bfd,
+				  pr->u.section)
+	      : pr->u.name),
+	     howto->name, pr->addend, NULL,
+	     (asection *) NULL, (bfd_vma) 0);
 	  break;
 	}
       ok = bfd_set_section_contents (flaginfo->output_bfd, o,
@@ -3264,7 +3250,7 @@ pdp11_aout_link_input_section (struct ao
   BFD_ASSERT (input_bfd->xvec->header_byteorder
 	      == output_bfd->xvec->header_byteorder);
 
-  relocatable = flaginfo->info->relocatable;
+  relocatable = bfd_link_relocatable (flaginfo->info);
   syms = obj_aout_external_syms (input_bfd);
   strings = obj_aout_external_strings (input_bfd);
   sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -3368,10 +3354,9 @@ pdp11_aout_link_input_section (struct ao
 
 			  name = strings + GET_WORD (input_bfd,
 						     syms[r_index].e_strx);
-			  if (! ((*flaginfo->info->callbacks->unattached_reloc)
-				 (flaginfo->info, name, input_bfd, input_section,
-				  r_addr)))
-			    return FALSE;
+			  (*flaginfo->info->callbacks->unattached_reloc)
+			    (flaginfo->info, name, input_bfd, input_section,
+			     r_addr);
 			  r_index = 0;
 			}
 		    }
@@ -3474,7 +3459,7 @@ pdp11_aout_link_input_section (struct ao
 	  /* Now warn if a global symbol is undefined.  We could not
              do this earlier, because check_dynamic_reloc might want
              to skip this reloc.  */
-	  if (hundef && ! flaginfo->info->shared)
+	  if (hundef && ! bfd_link_pic (flaginfo->info))
 	    {
 	      const char *name;
 
@@ -3482,10 +3467,9 @@ pdp11_aout_link_input_section (struct ao
 		name = h->root.root.string;
 	      else
 		name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
-	      if (! ((*flaginfo->info->callbacks->undefined_symbol)
-		     (flaginfo->info, name, input_bfd, input_section,
-		      r_addr, TRUE)))
-		return FALSE;
+	      (*flaginfo->info->callbacks->undefined_symbol)
+		(flaginfo->info, name, input_bfd, input_section,
+		 r_addr, TRUE);
 	    }
 
 	  r = MY_final_link_relocate (howto,
@@ -3517,11 +3501,9 @@ pdp11_aout_link_input_section (struct ao
 		    s = aout_reloc_type_to_section (input_bfd, r_type);
 		    name = bfd_section_name (input_bfd, s);
 		  }
-		if (! ((*flaginfo->info->callbacks->reloc_overflow)
-		       (flaginfo->info, (h ? &h->root : NULL), name,
-			howto->name, (bfd_vma) 0, input_bfd,
-			input_section, r_addr)))
-		  return FALSE;
+		(*flaginfo->info->callbacks->reloc_overflow)
+		  (flaginfo->info, (h ? &h->root : NULL), name, howto->name,
+		   (bfd_vma) 0, input_bfd, input_section, r_addr);
 	      }
 	      break;
 	    }
@@ -3581,7 +3563,7 @@ aout_link_input_section (struct aout_fin
 
   /* If we are producing relocatable output, the relocs were
      modified, and we now write them out.  */
-  if (flaginfo->info->relocatable && rel_size > 0)
+  if (bfd_link_relocatable (flaginfo->info) && rel_size > 0)
     {
       if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
 	return FALSE;
@@ -3676,13 +3658,11 @@ NAME (aout, final_link) (bfd *abfd,
   bfd_size_type max_contents_size;
   bfd_size_type max_relocs_size;
   bfd_size_type max_sym_count;
-  bfd_size_type text_size;
-  file_ptr text_end;
   struct bfd_link_order *p;
   asection *o;
   bfd_boolean have_link_order_relocs;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     abfd->flags |= DYNAMIC;
 
   aout_info.info = info;
@@ -3710,7 +3690,7 @@ NAME (aout, final_link) (bfd *abfd,
     {
       size_t sz;
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
 	{
 	  if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
 	    {
@@ -3723,8 +3703,9 @@ NAME (aout, final_link) (bfd *abfd,
 		 and call get_reloc_upper_bound and canonicalize_reloc to
 		 work out the number of relocs needed, and then multiply
 		 by the reloc size.  */
-	      (*_bfd_error_handler)
-		("%s: relocatable link from %s to %s not supported",
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%s: relocatable link from %s to %s not supported"),
 		 bfd_get_filename (abfd),
 		 sub->xvec->name, abfd->xvec->name);
 	      bfd_set_error (bfd_error_invalid_operation);
@@ -3754,7 +3735,7 @@ NAME (aout, final_link) (bfd *abfd,
 	}
     }
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       if (obj_textsec (abfd) != NULL)
 	trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
@@ -3773,7 +3754,7 @@ NAME (aout, final_link) (bfd *abfd,
   /* Adjust the section sizes and vmas according to the magic number.
      This sets a_text, a_data and a_bss in the exec_hdr and sets the
      filepos for each section.  */
-  if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+  if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
     goto error_return;
 
   /* The relocation and symbol file positions differ among a.out
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-arm.c ./bfd/pe-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM PECOFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-arm-wince.c ./bfd/pe-arm-wince.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-arm-wince.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-arm-wince.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM WINCE PE files.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef.c ./bfd/pef.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pef.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PEF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -67,6 +67,7 @@
 #define bfd_pef_bfd_final_link                      _bfd_generic_final_link
 #define bfd_pef_bfd_link_split_section              _bfd_generic_link_split_section
 #define bfd_pef_get_section_contents_in_window      _bfd_generic_get_section_contents_in_window
+#define bfd_pef_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 static int
 bfd_pef_parse_traceback_table (bfd *abfd,
@@ -217,7 +218,7 @@ bfd_pef_print_symbol (bfd *abfd,
       fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
       if (CONST_STRNEQ (symbol->name, "__traceback_"))
 	{
-	  unsigned char *buf = alloca (symbol->udata.i);
+	  unsigned char *buf = xmalloc (symbol->udata.i);
 	  size_t offset = symbol->value + 4;
 	  size_t len = symbol->udata.i;
 	  int ret;
@@ -227,6 +228,7 @@ bfd_pef_print_symbol (bfd *abfd,
 					       len, 0, NULL, file);
 	  if (ret < 0)
 	    fprintf (file, " [ERROR]");
+	  free (buf);
 	}
     }
 }
@@ -487,7 +489,7 @@ bfd_pef_scan_start_address (bfd *abfd)
     goto end;
 
   for (section = abfd->sections; section != NULL; section = section->next)
-    if ((section->index + 1) == header.main_section)
+    if ((long) (section->index + 1) == header.main_section)
       break;
 
   if (section == NULL)
@@ -520,8 +522,8 @@ bfd_pef_scan (bfd *abfd,
   bfd_pef_convert_architecture (header->architecture, &cputype, &cpusubtype);
   if (cputype == bfd_arch_unknown)
     {
-      (*_bfd_error_handler) (_("bfd_pef_scan: unknown architecture 0x%lx"),
-			       header->architecture);
+      _bfd_error_handler (_("bfd_pef_scan: unknown architecture 0x%lx"),
+			  header->architecture);
       return -1;
     }
   bfd_set_arch_mach (abfd, cputype, cpusubtype);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef.h ./bfd/pef.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pef.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PEF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef-traceback.h ./bfd/pef-traceback.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pef-traceback.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pef-traceback.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* PowerPC traceback table support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-i386.c ./bfd/pe-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 PECOFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-arm.c ./bfd/pei-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-arm.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-arm.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for arm PE IMAGE COFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-arm-wince.c ./bfd/pei-arm-wince.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-arm-wince.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-arm-wince.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM WINCE PE IMAGE COFF files.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/peicode.h ./bfd/peicode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/peicode.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/peicode.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for the generic parts of PE/PEI, for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -631,6 +631,20 @@ pe_ILF_make_a_section (pe_ILF_vars * var
   if (size & 1)
     vars->data --;
 
+# if (GCC_VERSION >= 3000)
+  /* PR 18758: See note in pe_ILF_buid_a_bfd.  We must make sure that we
+     preserve host alignment requirements.  We test 'size' rather than
+     vars.data as we cannot perform binary arithmetic on pointers.  We assume
+     that vars.data was sufficiently aligned upon entry to this function.
+     The BFD_ASSERTs in this functions will warn us if we run out of room,
+     but we should already have enough padding built in to ILF_DATA_SIZE.  */
+  {
+    unsigned int alignment = __alignof__ (struct coff_section_tdata);
+
+    if (size & (alignment - 1))
+      vars->data += alignment - (size & (alignment - 1));
+  }
+#endif
   /* Create a coff_section_tdata structure for our use.  */
   sec->used_by_bfd = (struct coff_section_tdata *) vars->data;
   vars->data += sizeof (struct coff_section_tdata);
@@ -757,11 +771,13 @@ pe_ILF_build_a_bfd (bfd *           abfd
 
     case IMPORT_CONST:
       /* XXX code yet to be written.  */
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: Unhandled import type; %x"),
 			  abfd, import_type);
       return FALSE;
 
     default:
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: Unrecognised import type; %x"),
 			  abfd, import_type);
       return FALSE;
@@ -776,6 +792,7 @@ pe_ILF_build_a_bfd (bfd *           abfd
       break;
 
     default:
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: Unrecognised import name type; %x"),
 			  abfd, import_name_type);
       return FALSE;
@@ -836,6 +853,24 @@ pe_ILF_build_a_bfd (bfd *           abfd
 
   /* The remaining space in bim->buffer is used
      by the pe_ILF_make_a_section() function.  */
+# if (GCC_VERSION >= 3000)
+  /* PR 18758: Make sure that the data area is sufficiently aligned for
+     pointers on the host.  __alignof__ is a gcc extension, hence the test
+     above.  For other compilers we will have to assume that the alignment is
+     unimportant, or else extra code can be added here and in
+     pe_ILF_make_a_section.
+
+     Note - we cannot test 'ptr' directly as it is illegal to perform binary
+     arithmetic on pointers, but we know that the strings section is the only
+     one that might end on an unaligned boundary.  */
+  {
+    unsigned int alignment = __alignof__ (char *);
+
+    if (SIZEOF_ILF_STRINGS & (alignment - 1))
+      ptr += alignment - (SIZEOF_ILF_STRINGS & (alignment - 1));
+  }
+#endif
+
   vars.data = ptr;
   vars.abfd = abfd;
   vars.sec_index = 0;
@@ -857,8 +892,8 @@ pe_ILF_build_a_bfd (bfd *           abfd
   if (import_name_type == IMPORT_ORDINAL)
     {
       if (ordinal == 0)
-	/* XXX - treat as IMPORT_NAME ??? */
-	abort ();
+	/* See PR 20907 for a reproducer.  */
+	goto error_return;
 
 #ifdef COFF_WITH_pex64
       ((unsigned int *) id4->contents)[0] = ordinal;
@@ -927,13 +962,19 @@ pe_ILF_build_a_bfd (bfd *           abfd
       pe_ILF_save_relocs (&vars, id5);
     }
 
+  /* Create an import symbol.  */
+  pe_ILF_make_a_symbol (& vars, "__imp_", symbol_name, id5, 0);
+  imp_sym   = vars.sym_ptr_ptr - 1;
+  imp_index = vars.sym_index - 1;
+
   /* Create extra sections depending upon the type of import we are dealing with.  */
   switch (import_type)
     {
       int i;
 
     case IMPORT_CODE:
-      /* Create a .text section.
+      /* CODE functions are special, in that they get a trampoline that
+         jumps to the main import symbol.  Create a .text section to hold it.
 	 First we need to look up its contents in the jump table.  */
       for (i = NUM_ENTRIES (jtab); i--;)
 	{
@@ -954,11 +995,6 @@ pe_ILF_build_a_bfd (bfd *           abfd
       /* Copy in the jump code.  */
       memcpy (text->contents, jtab[i].data, jtab[i].size);
 
-      /* Create an import symbol.  */
-      pe_ILF_make_a_symbol (& vars, "__imp_", symbol_name, id5, 0);
-      imp_sym   = vars.sym_ptr_ptr - 1;
-      imp_index = vars.sym_index - 1;
-
       /* Create a reloc for the data in the text section.  */
 #ifdef MIPS_ARCH_MAGIC_WINCE
       if (magic == MIPS_ARCH_MAGIC_WINCE)
@@ -1036,14 +1072,6 @@ pe_ILF_build_a_bfd (bfd *           abfd
       pe_ILF_make_a_symbol (& vars, "", symbol_name, text,
 			    BSF_NOT_AT_END | BSF_FUNCTION);
 
-      /* Create an import symbol for the DLL, without the
-       .dll suffix.  */
-      ptr = (bfd_byte *) strrchr (source_dll, '.');
-      if (ptr)
-	* ptr = 0;
-      pe_ILF_make_a_symbol (& vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0);
-      if (ptr)
-	* ptr = '.';
       break;
 
     case IMPORT_DATA:
@@ -1055,6 +1083,14 @@ pe_ILF_build_a_bfd (bfd *           abfd
       abort ();
     }
 
+  /* Create an import symbol for the DLL, without the .dll suffix.  */
+  ptr = (bfd_byte *) strrchr (source_dll, '.');
+  if (ptr)
+    * ptr = 0;
+  pe_ILF_make_a_symbol (& vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0);
+  if (ptr)
+    * ptr = '.';
+
   /* Point the bfd at the symbol table.  */
   obj_symbols (abfd) = vars.sym_cache;
   bfd_get_symcount (abfd) = vars.sym_index;
@@ -1177,6 +1213,7 @@ pe_ILF_object_p (bfd * abfd)
       /* We no longer support PowerPC.  */
     default:
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: Unrecognised machine type (0x%x)"
 	   " in Import Library Format archive"),
 	 abfd, machine);
@@ -1189,6 +1226,7 @@ pe_ILF_object_p (bfd * abfd)
   if (magic == 0)
     {
       _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: Recognised but unhandled machine type (0x%x)"
 	   " in Import Library Format archive"),
 	 abfd, machine);
@@ -1231,7 +1269,8 @@ pe_ILF_object_p (bfd * abfd)
     }
 
   symbol_name = (char *) ptr;
-  source_dll  = symbol_name + strlen (symbol_name) + 1;
+  /* See PR 20905 for an example of where the strnlen is necessary.  */
+  source_dll  = symbol_name + strnlen (symbol_name, size - 1) + 1;
 
   /* Verify that the strings are null terminated.  */
   if (ptr[size - 1] != 0
@@ -1256,7 +1295,7 @@ pe_ILF_object_p (bfd * abfd)
 }
 
 static void
-pe_bfd_read_buildid(bfd *abfd)
+pe_bfd_read_buildid (bfd *abfd)
 {
   pe_data_type *pe = pe_data (abfd);
   struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr;
@@ -1273,7 +1312,7 @@ pe_bfd_read_buildid(bfd *abfd)
 
   addr += extra->ImageBase;
 
-  /* Search for the section containing the DebugDirectory */
+  /* Search for the section containing the DebugDirectory.  */
   for (section = abfd->sections; section != NULL; section = section->next)
     {
       if ((addr >= section->vma) && (addr < (section->vma + section->size)))
@@ -1281,16 +1320,21 @@ pe_bfd_read_buildid(bfd *abfd)
     }
 
   if (section == NULL)
-    {
-      return;
-    }
-  else if (!(section->flags & SEC_HAS_CONTENTS))
-    {
-      return;
-    }
+    return;
+
+  if (!(section->flags & SEC_HAS_CONTENTS))
+    return;
 
   dataoff = addr - section->vma;
 
+  /* PR 20605: Make sure that the data is really there.  */
+  if (dataoff + size > section->size)
+    {
+      _bfd_error_handler (_("%B: Error: Debug Data ends beyond end of debug directory."),
+			  abfd);
+      return;
+    }
+  
   /* Read the whole section. */
   if (!bfd_malloc_and_get_section (abfd, section, &data))
     {
@@ -1321,8 +1365,8 @@ pe_bfd_read_buildid(bfd *abfd)
                                               (file_ptr) idd.PointerToRawData,
                                               idd.SizeOfData, cvinfo))
             {
-              struct bfd_build_id* build_id = bfd_alloc(abfd,
-                         sizeof(struct bfd_build_id) + cvinfo->SignatureLength);
+              struct bfd_build_id* build_id = bfd_alloc (abfd,
+                         sizeof (struct bfd_build_id) + cvinfo->SignatureLength);
               if (build_id)
                 {
                   build_id->size = cvinfo->SignatureLength;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-i386.c ./bfd/pei-i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-i386.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-i386.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 PE IMAGE COFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-ia64.c ./bfd/pei-ia64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-ia64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-ia64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for HP/Intel IA-64 PE IMAGE COFF files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger <davidm@hpl.hp.com>
 
    This implementation only supports objcopy to ouput IA-64 PE IMAGE COFF
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-mcore.c ./bfd/pei-mcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-mcore.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-mcore.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MCore PECOFF files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-mips.c ./bfd/pei-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MIPS PE IMAGE COFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-ppc.c ./bfd/pei-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PowerPC PE IMAGE COFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-sh.c ./bfd/pei-sh.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-sh.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-sh.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for SH PE IMAGE COFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-x86_64.c ./bfd/pei-x86_64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pei-x86_64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pei-x86_64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 PE IMAGE COFF files.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -346,7 +346,7 @@ pex64_dump_xdata (FILE *file, bfd *abfd,
     end_addr = sec_size;
 
   pex64_get_unwind_info (abfd, &ui, &xdata[addr]);
-  
+
   if (ui.Version != 1 && ui.Version != 2)
     {
       unsigned int i;
@@ -487,6 +487,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
   stop = pei_section_data (abfd, pdata_section)->virt_size;
   if ((stop % onaline) != 0)
     fprintf (file,
+	     /* xgettext:c-format */
 	     _("Warning: %s section size (%ld) is not a multiple of %d\n"),
 	     pdata_section->name, (long) stop, onaline);
 
@@ -508,6 +509,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
   else if (datasize < stop)
       {
 	fprintf (file,
+		 /* xgettext:c-format */
 		 _("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"),
 		 pdata_section->name, (unsigned long) datasize,
 		 (unsigned long) stop);
@@ -602,7 +604,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
   if (strcmp (pdata_section->name, ".pdata") != 0)
     {
       size_t len = strlen (pdata_section->name);
-      char *xdata_name = alloca (len + 1);
+      char *xdata_name = xmalloc (len + 1);
 
       xdata_name = memcpy (xdata_name, pdata_section->name, len + 1);
       /* Transform .pdata prefix into .xdata prefix.  */
@@ -610,6 +612,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
 	xdata_name [1] = 'x';
       xdata_section = pex64_get_section_by_rva (abfd, xdata_base,
 						xdata_name);
+      free (xdata_name);
     }
   /* Second, try the .xdata section itself.  */
   if (!xdata_section)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-mcore.c ./bfd/pe-mcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-mcore.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-mcore.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MCore PECOFF files.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-mips.c ./bfd/pe-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-mips.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-mips.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for MIPS PE COFF files.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -95,44 +95,44 @@ coff_mips_reloc (bfd *abfd,
 #define DOIT(x) \
   x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + (diff >> howto->rightshift)) & howto->dst_mask))
 
-    if (diff != 0)
-      {
-	reloc_howto_type *howto = reloc_entry->howto;
-	unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+  if (diff != 0)
+    {
+      reloc_howto_type *howto = reloc_entry->howto;
+      unsigned char *addr = (unsigned char *) data + reloc_entry->address;
 
-	switch (howto->size)
+      switch (howto->size)
+	{
+	case 0:
 	  {
-	  case 0:
-	    {
-	      char x = bfd_get_8 (abfd, addr);
+	    char x = bfd_get_8 (abfd, addr);
 
-	      DOIT (x);
-	      bfd_put_8 (abfd, x, addr);
-	    }
-	    break;
-
-	  case 1:
-	    {
-	      short x = bfd_get_16 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_8 (abfd, x, addr);
+	  }
+	  break;
 
-	      DOIT (x);
-	      bfd_put_16 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
+	case 1:
+	  {
+	    short x = bfd_get_16 (abfd, addr);
 
-	  case 2:
-	    {
-	      long x = bfd_get_32 (abfd, addr);
+	    DOIT (x);
+	    bfd_put_16 (abfd, (bfd_vma) x, addr);
+	  }
+	  break;
 
-	      DOIT (x);
-	      bfd_put_32 (abfd, (bfd_vma) x, addr);
-	    }
-	    break;
+	case 2:
+	  {
+	    long x = bfd_get_32 (abfd, addr);
 
-	  default:
-	    abort ();
+	    DOIT (x);
+	    bfd_put_32 (abfd, (bfd_vma) x, addr);
 	  }
-      }
+	  break;
+
+	default:
+	  abort ();
+	}
+    }
 
   /* Now let bfd_perform_relocation finish everything up.  */
   return bfd_reloc_continue;
@@ -603,9 +603,9 @@ coff_pe_mips_relocate_section (bfd *outp
   struct internal_reloc *rel_end;
   unsigned int i;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%B: `ld -r' not supported with PE MIPS objects\n"), input_bfd);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
@@ -661,7 +661,7 @@ coff_pe_mips_relocate_section (bfd *outp
          then we should ignore the symbol value.  */
       if (howto->pc_relative && howto->pcrel_offset)
 	{
-	  if (info->relocatable)
+	  if (bfd_link_relocatable (info))
 	    continue;
 	  if (sym != NULL && sym->n_scnum != 0)
 	    addend += sym->n_value;
@@ -701,13 +701,10 @@ coff_pe_mips_relocate_section (bfd *outp
 		     + sec->output_offset);
 	      }
 
-	  else if (! info->relocatable)
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd, input_section,
-		      rel->r_vaddr - input_section->vma, TRUE)))
-		return FALSE;
-	    }
+	  else if (! bfd_link_relocatable (info))
+	    (*info->callbacks->undefined_symbol)
+	      (info, h->root.root.string, input_bfd, input_section,
+	       rel->r_vaddr - input_section->vma, TRUE);
 	}
 
       src = rel->r_vaddr + input_section->output_section->vma
@@ -718,9 +715,11 @@ coff_pe_mips_relocate_section (bfd *outp
 	   mem = pointer to memory we're fixing up
 	   val = VMA of what we need to refer to.  */
 
-#define UI(x) (*_bfd_error_handler) (_("%B: unimplemented %s\n"), \
-				     input_bfd, x); \
-	      bfd_set_error (bfd_error_bad_value);
+#define UI(x)						       \
+      /* xgettext:c-format */				       \
+	_bfd_error_handler (_("%B: unimplemented %s\n"),       \
+			    input_bfd, x);		       \
+	bfd_set_error (bfd_error_bad_value);
 
       switch (rel->r_type)
 	{
@@ -744,7 +743,7 @@ coff_pe_mips_relocate_section (bfd *outp
 	  targ = val + (tmp & 0x03ffffff) * 4;
 	  if ((src & 0xf0000000) != (targ & 0xf0000000))
 	    {
-	      (*_bfd_error_handler) (_("%B: jump too far away\n"), input_bfd);
+	      _bfd_error_handler (_("%B: jump too far away\n"), input_bfd);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -770,8 +769,8 @@ coff_pe_mips_relocate_section (bfd *outp
 	      targ = val + low + ((tmp & 0xffff) << 16);
 	      break;
 	    default:
-	      (*_bfd_error_handler) (_("%B: bad pair/reflo after refhi\n"),
-				     input_bfd);
+	      _bfd_error_handler (_("%B: bad pair/reflo after refhi\n"),
+				  input_bfd);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-ppc.c ./bfd/pe-ppc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-ppc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-ppc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PowerPC PECOFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-sh.c ./bfd/pe-sh.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-sh.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-sh.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for SH PECOFF files.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-x86_64.c ./bfd/pe-x86_64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/pe-x86_64.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/pe-x86_64.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel/AMD x86_64 PECOFF files.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/peXXigen.c ./bfd/peXXigen.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/peXXigen.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/peXXigen.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for the generic parts of PE/PEI; the common executable parts.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -62,6 +62,7 @@
 #include "libbfd.h"
 #include "coff/internal.h"
 #include "bfdver.h"
+#include "libiberty.h"
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
@@ -119,7 +120,7 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void *
     memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
 
   in->n_value = H_GET_32 (abfd, ext->e_value);
-  in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
 
   if (sizeof (ext->e_type) == 2)
     in->n_type = H_GET_16 (abfd, ext->e_type);
@@ -257,7 +258,7 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void 
 	 as the worst that can happen is that some absolute symbols are
 	 needlessly converted into section relative symbols.  */
       && in->n_value > ((1ULL << (sizeof (in->n_value) > 4 ? 32 : 31)) - 1)
-      && in->n_scnum == -1)
+      && in->n_scnum == N_ABS)
     {
       asection * sec;
 
@@ -526,7 +527,8 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
     /* PR 17512: Corrupt PE binaries can cause seg-faults.  */
     if (a->NumberOfRvaAndSizes > IMAGE_NUMBEROF_DIRECTORY_ENTRIES)
       {
-	(*_bfd_error_handler)
+	/* xgettext:c-format */
+	_bfd_error_handler
 	  (_("%B: aout header specifies an invalid number of data-directory entries: %d"),
 	   abfd, a->NumberOfRvaAndSizes);
 	bfd_set_error (bfd_error_bad_value);
@@ -878,6 +880,8 @@ _bfd_XXi_only_swap_filehdr_out (bfd * ab
   /* Only use a real timestamp if the option was chosen.  */
   if ((pe_data (abfd)->insert_timestamp))
     H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
+  else
+    H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
 
   PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
 		      filehdr_out->f_symptr);
@@ -1060,8 +1064,8 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, vo
   }
 
   if (coff_data (abfd)->link_info
-      && ! coff_data (abfd)->link_info->relocatable
-      && ! coff_data (abfd)->link_info->shared
+      && ! bfd_link_relocatable (coff_data (abfd)->link_info)
+      && ! bfd_link_pic (coff_data (abfd)->link_info)
       && strcmp (scnhdr_int->s_name, ".text") == 0)
     {
       /* By inference from looking at MS output, the 32 bit field
@@ -1081,9 +1085,10 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, vo
 	H_PUT_16 (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
       else
 	{
-	  (*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"),
-				 bfd_get_filename (abfd),
-				 scnhdr_int->s_nlnno);
+	  /* xgettext:c-format */
+	  _bfd_error_handler (_("%s: line number overflow: 0x%lx > 0xffff"),
+			      bfd_get_filename (abfd),
+			      scnhdr_int->s_nlnno);
 	  bfd_set_error (bfd_error_file_truncated);
 	  H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno);
 	  ret = 0;
@@ -1195,13 +1200,15 @@ _bfd_XXi_slurp_codeview_record (bfd * ab
 unsigned int
 _bfd_XXi_write_codeview_record (bfd * abfd, file_ptr where, CODEVIEW_INFO *cvinfo)
 {
-  unsigned int size = sizeof (CV_INFO_PDB70) + 1;
+  const bfd_size_type size = sizeof (CV_INFO_PDB70) + 1;
+  bfd_size_type written;
   CV_INFO_PDB70 *cvinfo70;
-  char buffer[size];
+  char * buffer;
 
   if (bfd_seek (abfd, where, SEEK_SET) != 0)
     return 0;
 
+  buffer = xmalloc (size);
   cvinfo70 = (CV_INFO_PDB70 *) buffer;
   H_PUT_32 (abfd, CVINFO_PDB70_CVSIGNATURE, cvinfo70->CvSignature);
 
@@ -1215,10 +1222,11 @@ _bfd_XXi_write_codeview_record (bfd * ab
   H_PUT_32 (abfd, cvinfo->Age, cvinfo70->Age);
   cvinfo70->PdbFileName[0] = '\0';
 
-  if (bfd_bwrite (buffer, size, abfd) != size)
-    return 0;
+  written = bfd_bwrite (buffer, size, abfd);
 
-  return size;
+  free (buffer);
+
+  return written == size ? size : 0;
 }
 
 static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
@@ -1310,6 +1318,7 @@ pe_print_idata (bfd * abfd, void * vfile
         }
     }
 
+  /* xgettext:c-format */
   fprintf (file, _("\nThere is an import table in %s at 0x%lx\n"),
 	   section->name, (unsigned long) addr);
 
@@ -1355,6 +1364,7 @@ pe_print_idata (bfd * abfd, void * vfile
 	       _("\nFunction descriptor located at the start address: %04lx\n"),
 	       (unsigned long int) (abfd->start_address));
       fprintf (file,
+	       /* xgettext:c-format */
 	       _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"),
 	       start_address, loadable_toc_address, toc_address);
       if (data != NULL)
@@ -1658,11 +1668,13 @@ pe_print_edata (bfd * abfd, void * vfile
   if (datasize < 36)
     {
       fprintf (file,
+	       /* xgettext:c-format */
 	       _("\nThere is an export table in %s, but it is too small (%d)\n"),
 	       section->name, (int) datasize);
       return TRUE;
     }
 
+  /* xgettext:c-format */
   fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"),
 	   section->name, (unsigned long) addr);
 
@@ -1701,6 +1713,7 @@ pe_print_edata (bfd * abfd, void * vfile
 	   _("Time/Date stamp \t\t%lx\n"), (unsigned long) edt.time_stamp);
 
   fprintf (file,
+	   /* xgettext:c-format */
 	   _("Major/Minor \t\t\t%d/%d\n"), edt.major_ver, edt.minor_ver);
 
   fprintf (file,
@@ -1809,12 +1822,14 @@ pe_print_edata (bfd * abfd, void * vfile
       /* PR 17512: file: bb68816e.  */
       || edt.num_names * 4 < edt.num_names
       || (data + edt.npt_addr - adj) < data)
+    /* xgettext:c-format */
     fprintf (file, _("\tInvalid Name Pointer Table rva (0x%lx) or entry count (0x%lx)\n"),
 	     (long) edt.npt_addr,
 	     (long) edt.num_names);
   /* PR 17512: file: 140-147171-0.004.  */
   else if (edt.ot_addr + (edt.num_names * 2) - adj >= datasize
 	   || data + edt.ot_addr - adj < data)
+    /* xgettext:c-format */
     fprintf (file, _("\tInvalid Ordinal Table rva (0x%lx) or entry count (0x%lx)\n"),
 	     (long) edt.ot_addr,
 	     (long) edt.num_names);
@@ -1828,6 +1843,7 @@ pe_print_edata (bfd * abfd, void * vfile
 
       if ((name_ptr - adj) >= datasize)
 	{
+	  /* xgettext:c-format */
 	  fprintf (file, _("\t[%4ld] <corrupt offset: %lx>\n"),
 		   (long) ord, (long) name_ptr);
 	}
@@ -1881,6 +1897,7 @@ pe_print_pdata (bfd * abfd, void * vfile
   stop = pei_section_data (abfd, section)->virt_size;
   if ((stop % onaline) != 0)
     fprintf (file,
+	     /* xgettext:c-format */
 	     _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
 	     (long) stop, onaline);
 
@@ -1902,6 +1919,7 @@ pe_print_pdata (bfd * abfd, void * vfile
   /* PR 17512: file: 002-193900-0.004.  */
   if (datasize < stop)
     {
+      /* xgettext:c-format */
       fprintf (file, _("Virtual size of .pdata section (%ld) larger than real size (%ld)\n"),
 	       (long) stop, (long) datasize);
       return FALSE;
@@ -2076,6 +2094,7 @@ _bfd_XX_print_ce_compressed_pdata (bfd *
   stop = pei_section_data (abfd, section)->virt_size;
   if ((stop % onaline) != 0)
     fprintf (file,
+	     /* xgettext:c-format */
 	     _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
 	     (long) stop, onaline);
 
@@ -2233,6 +2252,7 @@ pe_print_reloc (bfd * abfd, void * vfile
 	break;
 
       fprintf (file,
+	       /* xgettext:c-format */
 	       _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"),
 	       (unsigned long) virtual_address, size, size, number);
 
@@ -2250,6 +2270,7 @@ pe_print_reloc (bfd * abfd, void * vfile
 	    t = (sizeof (tbl) / sizeof (tbl[0])) - 1;
 
 	  fprintf (file,
+		   /* xgettext:c-format */
 		   _("\treloc %4d offset %4x [%4lx] %s"),
 		   j, off, (unsigned long) (off + virtual_address), tbl[t]);
 
@@ -2310,6 +2331,7 @@ rsrc_print_resource_entries (FILE *     
   if (data + 8 >= regions->section_end)
     return regions->section_end + 1;
 
+  /* xgettext:c-format */
   fprintf (file, _("%03x %*.s Entry: "), (int)(data - regions->section_start), indent, " ");
 
   entry = (unsigned long) bfd_get_32 (abfd, data);
@@ -2393,6 +2415,7 @@ rsrc_print_resource_entries (FILE *     
       || leaf < regions->section_start)
     return regions->section_end + 1;
 
+  /* xgettext:c-format */
   fprintf (file, _("%03x %*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"),
 	   (int) (entry), indent, " ",
 	   addr = (long) bfd_get_32 (abfd, leaf),
@@ -2442,6 +2465,7 @@ rsrc_print_resource_directory (FILE *   
       return regions->section_end + 1;
     }
 
+  /* xgettext:c-format */
   fprintf (file, _(" Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"),
 	   (int) bfd_get_32 (abfd, data),
 	   (long) bfd_get_32 (abfd, data + 4),
@@ -2561,12 +2585,12 @@ rsrc_print_section (bfd * abfd, void * v
     }
 
   if (regions.strings_start != NULL)
-    fprintf (file, " String table starts at offset: %#03x\n",
+    fprintf (file, _(" String table starts at offset: %#03x\n"),
 	     (int) (regions.strings_start - regions.section_start));
   if (regions.resource_start != NULL)
-    fprintf (file, " Resources start at offset: %#03x\n",
+    fprintf (file, _(" Resources start at offset: %#03x\n"),
 	     (int) (regions.resource_start - regions.section_start));
-  
+
   free (regions.section_start);
   return TRUE;
 }
@@ -2693,7 +2717,8 @@ pe_print_debugdata (bfd * abfd, void * v
           for (i = 0; i < cvinfo->SignatureLength; i++)
             sprintf (&signature[i*2], "%02x", cvinfo->Signature[i] & 0xff);
 
-          fprintf (file, "(format %c%c%c%c signature %s age %ld)\n",
+	  /* xgettext:c-format */
+          fprintf (file, _("(format %c%c%c%c signature %s age %ld)\n"),
 		   buffer[0], buffer[1], buffer[2], buffer[3],
 		   signature, cvinfo->Age);
         }
@@ -2955,6 +2980,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common
 	  if (ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size + (addr - section->vma)
 	      > bfd_get_section_size (section))
 	    {
+	      /* xgettext:c-format */
 	      _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%lx)"),
 				  obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
 				  bfd_get_section_size (section) - (addr - section->vma));
@@ -3470,7 +3496,7 @@ rsrc_compute_region_sizes (rsrc_director
       sizeof_tables_and_entries += 8;
 
       sizeof_strings += (entry->name_id.name.len + 1) * 2;
-	  
+
       if (entry->is_dir)
 	rsrc_compute_region_sizes (entry->value.directory);
       else
@@ -4293,26 +4319,8 @@ rsrc_process_section (bfd * abfd,
   rsrc_write_directory (& write_data, & new_table);
 
   /* Step five: Replace the old contents with the new.
-     We recompute the size as we may have lost entries due to mergeing.  */
-  size = ((write_data.next_data - new_data) + 3) & ~ 3;
-
-  {
-    int page_size;
-
-    if (coff_data (abfd)->link_info)
-      {
-	page_size = pe_data (abfd)->pe_opthdr.FileAlignment;
-
-	/* If no file alignment has been set, default to one.
-	   This repairs 'ld -r' for arm-wince-pe target.  */
-	if (page_size == 0)
-	  page_size = 1;
-      }
-    else
-      page_size = PE_DEF_FILE_ALIGNMENT;
-    size = (size + page_size - 1) & - page_size;
-  }
-
+     We don't recompute the size as it's too late here to shrink section.
+     See PR ld/20193 for more details.  */
   bfd_set_section_contents (pfinfo->output_bfd, sec, new_data, 0, size);
   sec->size = sec->rawsize = size;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/plugin.c ./bfd/plugin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/plugin.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/plugin.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Plugin support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -106,6 +106,7 @@ dlerror (void)
 #define bfd_plugin_section_already_linked             _bfd_generic_section_already_linked
 #define bfd_plugin_bfd_define_common_symbol           bfd_generic_define_common_symbol
 #define bfd_plugin_bfd_copy_link_hash_symbol_type     _bfd_generic_copy_link_hash_symbol_type
+#define bfd_plugin_bfd_link_check_relocs              _bfd_generic_link_check_relocs
 
 static enum ld_plugin_status
 message (int level ATTRIBUTE_UNUSED,
@@ -157,57 +158,57 @@ bfd_plugin_set_program_name (const char 
   plugin_program_name = program_name;
 }
 
-static int
-try_claim (bfd *abfd)
+int
+bfd_plugin_open_input (bfd *ibfd, struct ld_plugin_input_file *file)
 {
-  int claimed = 0;
-  struct ld_plugin_input_file file;
   bfd *iobfd;
 
-  file.name = abfd->filename;
-
-  if (abfd->my_archive)
-    {
-      iobfd = abfd->my_archive;
-      file.offset = abfd->origin;
-      file.filesize = arelt_size (abfd);
-    }
-  else
-    {
-      iobfd = abfd;
-      file.offset = 0;
-      file.filesize = 0;
-    }
+  iobfd = ibfd;
+  if (ibfd->my_archive && !bfd_is_thin_archive (ibfd->my_archive))
+    iobfd = ibfd->my_archive;
+  file->name = iobfd->filename;
 
   if (!iobfd->iostream && !bfd_open_file (iobfd))
     return 0;
 
-  file.fd = fileno ((FILE *) iobfd->iostream);
+  file->fd = fileno ((FILE *) iobfd->iostream);
 
-  if (!abfd->my_archive)
+  if (iobfd == ibfd)
     {
       struct stat stat_buf;
-      if (fstat (file.fd, &stat_buf))
+      if (fstat (file->fd, &stat_buf))
         return 0;
-      file.filesize = stat_buf.st_size;
+      file->offset = 0;
+      file->filesize = stat_buf.st_size;
+    }
+  else
+    {
+      file->offset = ibfd->origin;
+      file->filesize = arelt_size (ibfd);
     }
+  return 1;
+}
 
+static int
+try_claim (bfd *abfd)
+{
+  int claimed = 0;
+  struct ld_plugin_input_file file;
+
+  if (!bfd_plugin_open_input (abfd, &file))
+    return 0;
   file.handle = abfd;
-  off_t cur_offset = lseek(file.fd, 0, SEEK_CUR);
+  off_t cur_offset = lseek (file.fd, 0, SEEK_CUR);
   claim_file (&file, &claimed);
-  lseek(file.fd, cur_offset, SEEK_SET);
-  if (!claimed)
-    return 0;
-
-  return 1;
+  lseek (file.fd, cur_offset, SEEK_SET);
+  return claimed;
 }
 
 static int
 try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p)
 {
   void *plugin_handle;
-  int tv_size = 4;
-  struct ld_plugin_tv tv[tv_size];
+  struct ld_plugin_tv tv[4];
   int i;
   ld_plugin_onload onload;
   enum ld_plugin_status status;
@@ -217,7 +218,7 @@ try_load_plugin (const char *pname, bfd 
   plugin_handle = dlopen (pname, RTLD_NOW);
   if (!plugin_handle)
     {
-      (*_bfd_error_handler)("%s\n", dlerror ());
+      _bfd_error_handler ("%s\n", dlerror ());
       return 0;
     }
 
@@ -287,6 +288,16 @@ bfd_plugin_specified_p (void)
   return has_plugin > 0;
 }
 
+/* Return TRUE if ABFD can be claimed by linker LTO plugin.  */
+
+bfd_boolean
+bfd_link_plugin_object_p (bfd *abfd)
+{
+  if (ld_plugin_object_p)
+    return ld_plugin_object_p (abfd) != NULL;
+  return FALSE;
+}
+
 extern const bfd_target plugin_vec;
 
 /* Return TRUE if TARGET is a pointer to plugin_vec.  */
@@ -365,7 +376,7 @@ bfd_plugin_object_p (bfd *abfd)
   if (ld_plugin_object_p)
     return ld_plugin_object_p (abfd);
 
-  if (abfd->plugin_format == bfd_plugin_uknown && !load_plugin (abfd))
+  if (abfd->plugin_format == bfd_plugin_unknown && !load_plugin (abfd))
     return NULL;
 
   return abfd->plugin_format == bfd_plugin_yes ? abfd->xvec : NULL;
@@ -566,7 +577,7 @@ const bfd_target plugin_vec =
   0,				/* symbol_leading_char.  */
   '/',				/* ar_pad_char.  */
   15,				/* ar_max_namelen.  */
-  0,				/* match priority.  */
+  255,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
@@ -597,7 +608,11 @@ const bfd_target plugin_vec =
   BFD_JUMP_TABLE_GENERIC (bfd_plugin),
   BFD_JUMP_TABLE_COPY (bfd_plugin),
   BFD_JUMP_TABLE_CORE (bfd_plugin),
+#ifdef USE_64_BIT_ARCHIVE
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
+#else
   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+#endif
   BFD_JUMP_TABLE_SYMBOLS (bfd_plugin),
   BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
   BFD_JUMP_TABLE_WRITE (bfd_plugin),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/plugin.h ./bfd/plugin.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/plugin.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/plugin.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Plugin support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -21,12 +21,12 @@
 #ifndef _PLUGIN_H_
 #define _PLUGIN_H_
 
-#include "bfd.h"
-
 void bfd_plugin_set_program_name (const char *);
+int bfd_plugin_open_input (bfd *, struct ld_plugin_input_file *);
 void bfd_plugin_set_plugin (const char *);
 bfd_boolean bfd_plugin_target_p (const bfd_target *);
 bfd_boolean bfd_plugin_specified_p (void);
+bfd_boolean bfd_link_plugin_object_p (bfd *);
 void register_ld_plugin_object_p (const bfd_target *(*object_p) (bfd *));
 
 typedef struct plugin_data_struct
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/bfd.pot ./bfd/po/bfd.pot
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/bfd.pot	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/bfd.pot	2017-03-06 01:49:05.000000000 +0000
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2014-02-10 09:42+1030\n"
+"POT-Creation-Date: 2016-12-23 09:23+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,7 +17,8 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aout-adobe.c:127
+#: aout-adobe.c:126
+#, c-format
 msgid "%B: Unknown section type in a.out.adobe file: %x\n"
 msgstr ""
 
@@ -26,155 +27,166 @@ msgstr ""
 msgid "%s: Invalid relocation type exported: %d"
 msgstr ""
 
-#: aout-cris.c:243
+#: aout-cris.c:244
+#, c-format
 msgid "%B: Invalid relocation type imported: %d"
 msgstr ""
 
-#: aout-cris.c:254
+#: aout-cris.c:256
+#, c-format
 msgid "%B: Bad relocation record imported: %d"
 msgstr ""
 
-#: aoutx.h:1273 aoutx.h:1611
+#: aoutx.h:1282 aoutx.h:1619 pdp11.c:1152
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
 msgstr ""
 
-#: aoutx.h:1577
+#: aoutx.h:1583
 #, c-format
 msgid ""
 "%s: can not represent section for symbol `%s' in a.out object file format"
 msgstr ""
 
-#: aoutx.h:1579 vms-alpha.c:7564
+#: aoutx.h:1586 vms-alpha.c:7632
 msgid "*unknown*"
 msgstr ""
 
-#: aoutx.h:4018 aoutx.h:4344
+#: aoutx.h:2405 aoutx.h:2423
+msgid "%B: attempt to write out unknown reloc type"
+msgstr ""
+
+#: aoutx.h:4075 aoutx.h:4396
 msgid "%P: %B: unexpected relocation type\n"
 msgstr ""
 
-#: aoutx.h:5375
+#: aoutx.h:5422 pdp11.c:3708
 #, c-format
 msgid "%s: relocatable link from %s to %s not supported"
 msgstr ""
 
-#: archive.c:2249
+#: archive.c:2293
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr ""
 
-#: archive.c:2549
+#: archive.c:2405 linker.c:1481
+#, c-format
+msgid "%s: plugin needed to handle lto object"
+msgstr ""
+
+#: archive.c:2634
 msgid "Reading archive file mod timestamp"
 msgstr ""
 
-#: archive.c:2573
+#: archive.c:2658
 msgid "Writing updated armap timestamp"
 msgstr ""
 
-#: bfd.c:411
+#: bfd.c:453
 msgid "No error"
 msgstr ""
 
-#: bfd.c:412
+#: bfd.c:454
 msgid "System call error"
 msgstr ""
 
-#: bfd.c:413
+#: bfd.c:455
 msgid "Invalid bfd target"
 msgstr ""
 
-#: bfd.c:414
+#: bfd.c:456
 msgid "File in wrong format"
 msgstr ""
 
-#: bfd.c:415
+#: bfd.c:457
 msgid "Archive object file in wrong format"
 msgstr ""
 
-#: bfd.c:416
+#: bfd.c:458
 msgid "Invalid operation"
 msgstr ""
 
-#: bfd.c:417
+#: bfd.c:459
 msgid "Memory exhausted"
 msgstr ""
 
-#: bfd.c:418
+#: bfd.c:460
 msgid "No symbols"
 msgstr ""
 
-#: bfd.c:419
+#: bfd.c:461
 msgid "Archive has no index; run ranlib to add one"
 msgstr ""
 
-#: bfd.c:420
+#: bfd.c:462
 msgid "No more archived files"
 msgstr ""
 
-#: bfd.c:421
+#: bfd.c:463
 msgid "Malformed archive"
 msgstr ""
 
-#: bfd.c:422
+#: bfd.c:464
 msgid "DSO missing from command line"
 msgstr ""
 
-#: bfd.c:423
+#: bfd.c:465
 msgid "File format not recognized"
 msgstr ""
 
-#: bfd.c:424
+#: bfd.c:466
 msgid "File format is ambiguous"
 msgstr ""
 
-#: bfd.c:425
+#: bfd.c:467
 msgid "Section has no contents"
 msgstr ""
 
-#: bfd.c:426
+#: bfd.c:468
 msgid "Nonrepresentable section on output"
 msgstr ""
 
-#: bfd.c:427
+#: bfd.c:469
 msgid "Symbol needs debug section which does not exist"
 msgstr ""
 
-#: bfd.c:428
+#: bfd.c:470
 msgid "Bad value"
 msgstr ""
 
-#: bfd.c:429
+#: bfd.c:471
 msgid "File truncated"
 msgstr ""
 
-#: bfd.c:430
+#: bfd.c:472
 msgid "File too big"
 msgstr ""
 
-#: bfd.c:431
+#: bfd.c:473
 #, c-format
 msgid "Error reading %s: %s"
 msgstr ""
 
-#: bfd.c:432
+#: bfd.c:474
 msgid "#<Invalid error code>"
 msgstr ""
 
-#: bfd.c:1046
+#: bfd.c:1063
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr ""
 
-#: bfd.c:1058
+#: bfd.c:1076
 #, c-format
-msgid "BFD %s internal error, aborting at %s line %d in %s\n"
+msgid "BFD %s internal error, aborting at %s:%d in %s\n"
 msgstr ""
 
-#: bfd.c:1062
+#: bfd.c:1081
 #, c-format
-msgid "BFD %s internal error, aborting at %s line %d\n"
+msgid "BFD %s internal error, aborting at %s:%d\n"
 msgstr ""
 
-#: bfd.c:1064
+#: bfd.c:1083
 msgid "Please report this bug.\n"
 msgstr ""
 
@@ -188,70 +200,73 @@ msgstr ""
 msgid "not mapping: env var not set\n"
 msgstr ""
 
-#: binary.c:271
+#: binary.c:274
 #, c-format
-msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
+msgid "Warning: Writing section `%s' at huge (ie negative) file offset 0x%lx."
 msgstr ""
 
-#: bout.c:1146 elf-m10300.c:2665 elf32-avr.c:1706 elf32-frv.c:5641
-#: elf64-ia64-vms.c:354 elfxx-sparc.c:2869 reloc.c:7324 reloc16.c:160
+#: bout.c:1142 elf-m10300.c:2651 elf32-avr.c:2452 elf32-frv.c:5633
+#: elf64-ia64-vms.c:353 elfxx-sparc.c:2871 reloc.c:7931 reloc16.c:156
 #: elf32-ia64.c:351 elf64-ia64.c:351
 msgid "%P%F: --relax and -r may not be used together\n"
 msgstr ""
 
-#: cache.c:253
+#: cache.c:272
+#, c-format
 msgid "reopening %B: %s\n"
 msgstr ""
 
-#: coff-alpha.c:452
+#: coff-alpha.c:450
 msgid ""
 "%B: Cannot handle compressed Alpha binaries.\n"
 "   Use compiler flags, or objZ, to generate uncompressed binaries."
 msgstr ""
 
-#: coff-alpha.c:603
+#: coff-alpha.c:602
 msgid "%B: unknown/unsupported relocation type %d"
 msgstr ""
 
-#: coff-alpha.c:852 coff-alpha.c:889 coff-alpha.c:1973 coff-mips.c:946
+#: coff-alpha.c:851 coff-alpha.c:888 coff-alpha.c:1961 coff-mips.c:944
 msgid "GP relative relocation used when GP not defined"
 msgstr ""
 
-#: coff-alpha.c:1450
+#: coff-alpha.c:1444
 msgid "using multiple gp values"
 msgstr ""
 
-#: coff-alpha.c:1509
+#: coff-alpha.c:1503
 msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
 msgstr ""
 
-#: coff-alpha.c:1516
+#: coff-alpha.c:1510
 msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
 msgstr ""
 
-#: coff-alpha.c:1523 elf32-m32r.c:2443 elf64-alpha.c:4083 elf64-alpha.c:4233
-#: elf64-ia64-vms.c:3429 elf32-ia64.c:3836 elf64-ia64.c:3836
+#: coff-alpha.c:1518 elf32-i370.c:1085 elf32-m32r.c:2418 elf64-alpha.c:4159
+#: elf64-alpha.c:4307 elf64-ia64-vms.c:3432 elf32-ia64.c:3839
+#: elf64-ia64.c:3839
+#, c-format
 msgid "%B: unknown relocation type %d"
 msgstr ""
 
-#: coff-arm.c:1034
+#: coff-arm.c:1032
 #, c-format
 msgid "%B: unable to find THUMB glue '%s' for `%s'"
 msgstr ""
 
-#: coff-arm.c:1063
+#: coff-arm.c:1061
 #, c-format
 msgid "%B: unable to find ARM glue '%s' for `%s'"
 msgstr ""
 
-#: coff-arm.c:1365 elf32-arm.c:7141
+#: coff-arm.c:1363 elf32-arm.c:8908
 #, c-format
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
 "  first occurrence: %B: arm call to thumb"
 msgstr ""
 
-#: coff-arm.c:1455
+#: coff-arm.c:1453
 #, c-format
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
@@ -259,160 +274,214 @@ msgid ""
 "  consider relinking with --support-old-code enabled"
 msgstr ""
 
-#: coff-arm.c:1750 coff-tic80.c:673 cofflink.c:3168
+#: coff-arm.c:1746 coff-tic80.c:670 cofflink.c:3126
+#, c-format
 msgid "%B: bad reloc address 0x%lx in section `%A'"
 msgstr ""
 
-#: coff-arm.c:2075
+#: coff-arm.c:2071
+#, c-format
 msgid "%B: illegal symbol index in reloc: %d"
 msgstr ""
 
-#: coff-arm.c:2206
+#: coff-arm.c:2203
 #, c-format
 msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
 msgstr ""
 
-#: coff-arm.c:2222 elf32-arm.c:16123
+#: coff-arm.c:2217 elf32-arm.c:19726
 #, c-format
 msgid ""
 "error: %B passes floats in float registers, whereas %B passes them in "
 "integer registers"
 msgstr ""
 
-#: coff-arm.c:2225 elf32-arm.c:16127
+#: coff-arm.c:2222 elf32-arm.c:19730
 #, c-format
 msgid ""
 "error: %B passes floats in integer registers, whereas %B passes them in "
 "float registers"
 msgstr ""
 
-#: coff-arm.c:2239
+#: coff-arm.c:2234
 #, c-format
 msgid ""
 "error: %B is compiled as position independent code, whereas target %B is "
 "absolute position"
 msgstr ""
 
-#: coff-arm.c:2242
+#: coff-arm.c:2239
 #, c-format
 msgid ""
 "error: %B is compiled as absolute position code, whereas target %B is "
 "position independent"
 msgstr ""
 
-#: coff-arm.c:2270 elf32-arm.c:16192
+#: coff-arm.c:2266 elf32-arm.c:19795
 #, c-format
 msgid "Warning: %B supports interworking, whereas %B does not"
 msgstr ""
 
-#: coff-arm.c:2273 elf32-arm.c:16198
+#: coff-arm.c:2271 elf32-arm.c:19801
 #, c-format
 msgid "Warning: %B does not support interworking, whereas %B does"
 msgstr ""
 
-#: coff-arm.c:2297
+#: coff-arm.c:2294
 #, c-format
 msgid "private flags = %x:"
 msgstr ""
 
-#: coff-arm.c:2305 elf32-arm.c:12119
+#: coff-arm.c:2302 elf32-arm.c:14134
 #, c-format
 msgid " [floats passed in float registers]"
 msgstr ""
 
-#: coff-arm.c:2307
+#: coff-arm.c:2304
 #, c-format
 msgid " [floats passed in integer registers]"
 msgstr ""
 
-#: coff-arm.c:2310 elf32-arm.c:12122
+#: coff-arm.c:2307 elf32-arm.c:14137
 #, c-format
 msgid " [position independent]"
 msgstr ""
 
-#: coff-arm.c:2312
+#: coff-arm.c:2309
 #, c-format
 msgid " [absolute position]"
 msgstr ""
 
-#: coff-arm.c:2316
+#: coff-arm.c:2313
 #, c-format
 msgid " [interworking flag not initialised]"
 msgstr ""
 
-#: coff-arm.c:2318
+#: coff-arm.c:2315
 #, c-format
 msgid " [interworking supported]"
 msgstr ""
 
-#: coff-arm.c:2320
+#: coff-arm.c:2317
 #, c-format
 msgid " [interworking not supported]"
 msgstr ""
 
-#: coff-arm.c:2366 elf32-arm.c:11104
-#, c-format
+#: coff-arm.c:2362 elf32-arm.c:13023
 msgid ""
 "Warning: Not setting interworking flag of %B since it has already been "
 "specified as non-interworking"
 msgstr ""
 
-#: coff-arm.c:2370 elf32-arm.c:11108
-#, c-format
+#: coff-arm.c:2365 elf32-arm.c:13027
 msgid "Warning: Clearing the interworking flag of %B due to outside request"
 msgstr ""
 
-#: coff-h8300.c:1096
+#: coff-arm.c:2422 elf32-arm.c:13072
+#, c-format
+msgid ""
+"Warning: Clearing the interworking flag of %B because non-interworking code "
+"in %B has been linked with it"
+msgstr ""
+
+#: coff-h8300.c:1068
 #, c-format
 msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
 msgstr ""
 
-#: coff-i860.c:147
+#: coff-i860.c:146
 #, c-format
 msgid "relocation `%s' not yet implemented"
 msgstr ""
 
-#: coff-i860.c:605 coff-tic54x.c:365 coffcode.h:5209
+#: coff-i860.c:608 coff-tic54x.c:365 coffcode.h:5314
+#, c-format
 msgid "%B: warning: illegal symbol index %ld in relocs"
 msgstr ""
 
-#: coff-i960.c:124 coff-i960.c:480
+#: coff-i960.c:122 coff-i960.c:475
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr ""
 
-#: coff-m68k.c:484 elf32-bfin.c:5556 elf32-cr16.c:2853 elf32-m68k.c:4632
+#: coff-m68k.c:483 elf32-bfin.c:5531 elf32-cr16.c:2817 elf32-m68k.c:4574
 msgid "unsupported reloc type"
 msgstr ""
 
-#: coff-mips.c:636 elf32-mips.c:1637 elf32-score.c:431 elf32-score7.c:330
-#: elf64-mips.c:2925 elfn32-mips.c:2737
+#: coff-mips.c:634 elf32-mips.c:1744 elf32-score.c:430 elf32-score7.c:330
+#: elf64-mips.c:3141 elfn32-mips.c:2954
 msgid "GP relative relocation when _gp not defined"
 msgstr ""
 
-#: coff-or32.c:216
-msgid "Unrecognized reloc"
-msgstr ""
-
-#: coff-rs6000.c:2802
+#: coff-rs6000.c:2741
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr ""
 
-#: coff-rs6000.c:2887
+#: coff-rs6000.c:2827
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr ""
 
-#: coff-rs6000.c:3638 coff64-rs6000.c:2117
+#: coff-rs6000.c:3574 coff64-rs6000.c:2110
+#, c-format
 msgid "%B: symbol `%s' has unrecognized smclas %d"
 msgstr ""
 
-#: coff-sh.c:506
+#: coff-sh.c:504
 #, c-format
 msgid "SH Error: unknown reloc type %d"
 msgstr ""
 
-#: coff-tic4x.c:184 coff-tic54x.c:279 coff-tic80.c:440
+#: coff-sh.c:775 elf32-sh.c:580
+#, c-format
+msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
+msgstr ""
+
+#: coff-sh.c:786 elf32-sh.c:592
+#, c-format
+msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgstr ""
+
+#: coff-sh.c:804 elf32-sh.c:610
+#, c-format
+msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
+msgstr ""
+
+#: coff-sh.c:829 elf32-sh.c:626
+#, c-format
+msgid "%B: 0x%lx: warning: could not find expected reloc"
+msgstr ""
+
+#: coff-sh.c:846 elf32-sh.c:655
+#, c-format
+msgid "%B: 0x%lx: warning: symbol in unexpected section"
+msgstr ""
+
+#: coff-sh.c:972 elf32-sh.c:785
+#, c-format
+msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
+msgstr ""
+
+#: coff-sh.c:982 elf32-sh.c:795
+#, c-format
+msgid "%B: 0x%lx: warning: bad count"
+msgstr ""
+
+#: coff-sh.c:1354 coff-sh.c:2642 elf32-sh.c:1199 elf32-sh.c:1570
+#, c-format
+msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr ""
+
+#: coff-sh.c:1449
+msgid "%B: fatal: generic symbols retrieved before relaxing"
+msgstr ""
+
+#: coff-sh.c:2780 cofflink.c:2964
+#, c-format
+msgid "%B: illegal symbol index %ld in relocs"
+msgstr ""
+
+#: coff-tic4x.c:183 coff-tic54x.c:278 coff-tic80.c:439
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr ""
@@ -422,702 +491,1181 @@ msgstr ""
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr ""
 
-#: coff-w65.c:355
+#: coff-w65.c:352
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr ""
 
-#: coffcode.h:1005
+#: coffcode.h:968
+msgid "%B: unable to load COMDAT section name"
+msgstr ""
+
+#: coffcode.h:1008
+#, c-format
 msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
 msgstr ""
 
+#: coffcode.h:1017
+#, c-format
+msgid "%B: warning: No symbol for section '%s' found"
+msgstr ""
+
 #. Generate a warning message rather using the 'unhandled'
 #. variable as this will allow some .sys files generate by
 #. other toolchains to be processed.  See bugzilla issue 196.
-#: coffcode.h:1230
+#: coffcode.h:1242
+#, c-format
 msgid ""
 "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
 msgstr ""
 
-#: coffcode.h:1297
+#: coffcode.h:1310
+#, c-format
 msgid "%B (%s): Section flag %s (0x%x) ignored"
 msgstr ""
 
-#: coffcode.h:2439
+#: coffcode.h:1945
+#, c-format
+msgid "%s: warning: claims to have 0xffff relocs, without overflow"
+msgstr ""
+
+#: coffcode.h:2461
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr ""
 
-#: coffcode.h:2753
+#: coffcode.h:2787
+#, c-format
 msgid "%B: reloc against a non-existant symbol index: %ld"
 msgstr ""
 
-#: coffcode.h:3311
+#: coffcode.h:3189
+#, c-format
+msgid "%B: page size is too large (0x%x)"
+msgstr ""
+
+#: coffcode.h:3349
+#, c-format
 msgid "%B: too many sections (%d)"
 msgstr ""
 
-#: coffcode.h:3729
+#: coffcode.h:3768
+#, c-format
 msgid "%B: section %s: string table overflow at offset %ld"
 msgstr ""
 
-#: coffcode.h:4534
+#: coffcode.h:4585
 msgid "%B: warning: line number table read failed"
 msgstr ""
 
-#: coffcode.h:4564
-msgid "%B: warning: illegal symbol index %ld in line numbers"
+#: coffcode.h:4619 coffcode.h:4633
+#, c-format
+msgid "%B: warning: illegal symbol index 0x%lx in line number entry %d"
+msgstr ""
+
+#: coffcode.h:4647
+#, c-format
+msgid "%B: warning: illegal symbol in line number entry %d"
 msgstr ""
 
-#: coffcode.h:4578
+#: coffcode.h:4660
+#, c-format
 msgid "%B: warning: duplicate line number information for `%s'"
 msgstr ""
 
-#: coffcode.h:4978
+#: coffcode.h:5074
+#, c-format
 msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
 msgstr ""
 
-#: coffcode.h:5104
+#: coffcode.h:5207
+#, c-format
 msgid "warning: %B: local symbol `%s' has no section"
 msgstr ""
 
-#: coffcode.h:5248
+#: coffcode.h:5354
+#, c-format
 msgid "%B: illegal relocation type %d at address 0x%lx"
 msgstr ""
 
-#: coffgen.c:179 elf.c:1030
+#: coffgen.c:178 elf.c:1164
+#, c-format
 msgid "%B: unable to initialize compress status for section %s"
 msgstr ""
 
-#: coffgen.c:199 elf.c:1050
+#: coffgen.c:202 elf.c:1175
+#, c-format
 msgid "%B: unable to initialize decompress status for section %s"
 msgstr ""
 
-#: coffgen.c:1685
+#: coffgen.c:1711
+#, c-format
 msgid "%B: bad string table size %lu"
 msgstr ""
 
-#: coffgen.c:2608 elflink.c:12906 linker.c:3136
+#: coffgen.c:1880 coffgen.c:1940 coffgen.c:1958 cofflink.c:2040
+#: xcofflink.c:4507
+msgid "<corrupt>"
+msgstr ""
+
+#: coffgen.c:2082
+#, c-format
+msgid "<corrupt info> %s"
+msgstr ""
+
+#: coffgen.c:2633 elflink.c:13856 linker.c:3004
 msgid "%F%P: already_linked_table: %E\n"
 msgstr ""
 
-#: cofflink.c:533 elf64-ia64-vms.c:5173 elflink.c:4356
+#: coffgen.c:2960 elflink.c:12889
+#, c-format
+msgid "Removing unused section '%s' in file '%B'"
+msgstr ""
+
+#: coffgen.c:3036 elflink.c:13135
+msgid "Warning: gc-sections option ignored"
+msgstr ""
+
+#: cofflink.c:348
+#, c-format
+msgid "Warning: symbol `%s' is both section and non-section"
+msgstr ""
+
+#: cofflink.c:450 elf64-ia64-vms.c:5187 elflink.c:4688
+#, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
 msgstr ""
 
-#: cofflink.c:2416
+#: cofflink.c:2368
+#, c-format
 msgid "%B: relocs in section `%A', but it has no contents"
 msgstr ""
 
-#: cofflink.c:2478 elflink.c:9711
+#: cofflink.c:2431 elflink.c:10360
+#, c-format
 msgid ""
 "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' "
 "of %B\n"
 msgstr ""
 
-#: cofflink.c:2777 coffswap.h:826
+#: cofflink.c:2729 coffswap.h:826
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr ""
 
-#: cofflink.c:2786 coffswap.h:812
+#: cofflink.c:2739 coffswap.h:811
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr ""
 
-#: cpu-arm.c:190 cpu-arm.c:201
+#: compress.c:255
+#, c-format
+msgid "error: %B(%A) is too large (%#lx bytes)"
+msgstr ""
+
+#: cpu-arm.c:192 cpu-arm.c:204
+#, c-format
 msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale"
 msgstr ""
 
-#: cpu-arm.c:334
+#: cpu-arm.c:338
 #, c-format
 msgid "warning: unable to update contents of %s section in %s"
 msgstr ""
 
-#: dwarf2.c:514
+#: dwarf2.c:526
 #, c-format
 msgid "Dwarf Error: Can't find %s section."
 msgstr ""
 
-#: dwarf2.c:543
+#: dwarf2.c:556
 #, c-format
 msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."
 msgstr ""
 
-#: dwarf2.c:1071
+#: dwarf2.c:1015
+msgid "Dwarf Error: Info pointer extends beyond end of attributes"
+msgstr ""
+
+#: dwarf2.c:1167
 #, c-format
 msgid "Dwarf Error: Invalid or unhandled FORM value: %#x."
 msgstr ""
 
-#: dwarf2.c:1332
+#: dwarf2.c:1473
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr ""
 
-#: dwarf2.c:1590
+#: dwarf2.c:1761
+#, c-format
+msgid "Dwarf Error: Line info section is too small (%ld)"
+msgstr ""
+
+#: dwarf2.c:1791
+#, c-format
+msgid "Dwarf Error: Line info data is bigger (0x%lx) than the section (0x%lx)"
+msgstr ""
+
+#: dwarf2.c:1803
 #, c-format
 msgid "Dwarf Error: Unhandled .debug_line version %d."
 msgstr ""
 
-#: dwarf2.c:1612
+#: dwarf2.c:1812
+msgid "Dwarf Error: Ran out of room reading prologue"
+msgstr ""
+
+#: dwarf2.c:1837
 msgid "Dwarf Error: Invalid maximum operations per instruction."
 msgstr ""
 
-#: dwarf2.c:1807
+#: dwarf2.c:1856
+msgid "Dwarf Error: Ran out of room reading opcodes"
+msgstr ""
+
+#: dwarf2.c:2044
 msgid "Dwarf Error: mangled line number section."
 msgstr ""
 
-#: dwarf2.c:2160
+#: dwarf2.c:2538
 #, c-format
 msgid "Dwarf Error: Unable to read alt ref %u."
 msgstr ""
 
-#: dwarf2.c:2179 dwarf2.c:2299 dwarf2.c:2595
+#: dwarf2.c:2562 dwarf2.c:2706 dwarf2.c:3023
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr ""
 
-#: dwarf2.c:2551
+#: dwarf2.c:2976
 #, c-format
 msgid ""
 "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 "
 "and 4 information."
 msgstr ""
 
-#: dwarf2.c:2560
+#: dwarf2.c:2987
 #, c-format
 msgid ""
 "Dwarf Error: found address size '%u', this reader can not handle sizes "
 "greater than '%u'."
 msgstr ""
 
-#: dwarf2.c:2586
+#: dwarf2.c:3089
+msgid ""
+"Dwarf Error: DW_AT_comp_dir attribute encountered with a non-string form."
+msgstr ""
+
+#: ecoff.c:964
 #, c-format
-msgid "Dwarf Error: Bad abbrev number: %u."
+msgid "%B: warning: isymMax (%ld) is greater than ifdMax (%d)\n"
 msgstr ""
 
-#: ecoff.c:1233
+#: ecoff.c:1261
 #, c-format
 msgid "Unknown basic type %d"
 msgstr ""
 
-#: ecoff.c:1490
+#: ecoff.c:1518
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1497 ecoff.c:1500
+#: ecoff.c:1525 ecoff.c:1528
 #, c-format
 msgid ""
 "\n"
 "      First symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1512
+#: ecoff.c:1541
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %-7ld   Type:  %s"
 msgstr ""
 
-#: ecoff.c:1519
+#: ecoff.c:1548
 #, c-format
 msgid ""
 "\n"
 "      Local symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1527
+#: ecoff.c:1556
 #, c-format
 msgid ""
 "\n"
 "      struct; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1532
+#: ecoff.c:1561
 #, c-format
 msgid ""
 "\n"
 "      union; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1537
+#: ecoff.c:1566
 #, c-format
 msgid ""
 "\n"
 "      enum; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1543
+#: ecoff.c:1572
 #, c-format
 msgid ""
 "\n"
 "      Type: %s"
 msgstr ""
 
-#: elf-attrs.c:573
+#: elf-attrs.c:595
+#, c-format
 msgid ""
 "error: %B: Object has vendor-specific contents that must be processed by the "
 "'%s' toolchain"
 msgstr ""
 
-#: elf-attrs.c:582
+#: elf-attrs.c:605
+#, c-format
 msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'"
 msgstr ""
 
-#: elf-eh-frame.c:921
+#: elf-eh-frame.c:928
+#, c-format
+msgid "discarding zero address range FDE in %B(%A).\n"
+msgstr ""
+
+#: elf-eh-frame.c:1033
+#, c-format
 msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
 msgstr ""
 
-#: elf-eh-frame.c:1193
+#: elf-eh-frame.c:1385
+#, c-format
+msgid ""
+"%P: FDE encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+msgstr ""
+
+#: elf-eh-frame.c:1392
 msgid ""
-"%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+"%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation "
+"dropped.\n"
+msgstr ""
+
+#: elf-eh-frame.c:1680
+#, c-format
+msgid "%B: %s not in order"
+msgstr ""
+
+#: elf-eh-frame.c:1694
+#, c-format
+msgid "%B: %s invalid input section size"
 msgstr ""
 
-#: elf-eh-frame.c:1612
+#: elf-eh-frame.c:1702
+#, c-format
+msgid "%B: %s points past end of text section"
+msgstr ""
+
+#: elf-eh-frame.c:1951
 msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n"
 msgstr ""
 
-#: elf-ifunc.c:135
+#: elf-eh-frame.c:2133
+#, c-format
+msgid "Invalid output section for .eh_frame_entry: %s"
+msgstr ""
+
+#: elf-eh-frame.c:2156
+#, c-format
+msgid "Invalid contents in %s section"
+msgstr ""
+
+#: elf-eh-frame.c:2312
+msgid "%P: .eh_frame_hdr entry overflow.\n"
+msgstr ""
+
+#: elf-eh-frame.c:2315
+msgid "%P: .eh_frame_hdr refers to overlapping FDEs.\n"
+msgstr ""
+
+#: elf-ifunc.c:142
+#, c-format
 msgid ""
 "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can "
 "not be used when making an executable; recompile with -fPIE and relink with -"
 "pie\n"
 msgstr ""
 
-#: elf-m10200.c:430 elf-m10300.c:2164 elf32-avr.c:1256 elf32-bfin.c:3220
-#: elf32-cr16.c:1484 elf32-cr16c.c:780 elf32-cris.c:2016 elf32-crx.c:922
-#: elf32-d10v.c:513 elf32-epiphany.c:557 elf32-fr30.c:589 elf32-frv.c:4039
-#: elf32-h8300.c:525 elf32-i860.c:1212 elf32-ip2k.c:1468 elf32-iq2000.c:688
-#: elf32-lm32.c:1160 elf32-m32c.c:553 elf32-m32r.c:3066 elf32-m68hc1x.c:1283
-#: elf32-mep.c:535 elf32-metag.c:1992 elf32-microblaze.c:1560
-#: elf32-moxie.c:282 elf32-mt.c:395 elf32-nds32.c:4910 elf32-openrisc.c:404
-#: elf32-score.c:2729 elf32-score7.c:2537 elf32-spu.c:5041
-#: elf32-tilepro.c:3666 elf32-v850.c:2281 elf32-xstormy16.c:936
-#: elf64-mmix.c:1538 elfxx-tilegx.c:4051
+#: elf-m10200.c:425 elf-m10300.c:2149 elf32-avr.c:1502 elf32-bfin.c:3194
+#: elf32-cr16.c:1466 elf32-cr16c.c:780 elf32-cris.c:2025 elf32-crx.c:924
+#: elf32-d10v.c:513 elf32-epiphany.c:563 elf32-fr30.c:591 elf32-frv.c:4041
+#: elf32-ft32.c:334 elf32-h8300.c:522 elf32-i860.c:1210 elf32-ip2k.c:1475
+#: elf32-iq2000.c:693 elf32-lm32.c:1126 elf32-m32c.c:621 elf32-m32r.c:3044
+#: elf32-m68hc1x.c:1269 elf32-mep.c:524 elf32-metag.c:2005
+#: elf32-microblaze.c:1574 elf32-moxie.c:285 elf32-mt.c:400 elf32-nds32.c:5402
+#: elf32-or1k.c:1262 elf32-score.c:2733 elf32-score7.c:2546 elf32-spu.c:5076
+#: elf32-tilepro.c:3674 elf32-v850.c:2287 elf32-visium.c:677
+#: elf32-xstormy16.c:927 elf64-mmix.c:1540 elfxx-tilegx.c:4061
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2256
 msgid "internal error: out of range error"
 msgstr ""
 
-#: elf-m10200.c:434 elf-m10300.c:2168 elf32-avr.c:1260 elf32-bfin.c:3224
-#: elf32-cr16.c:1488 elf32-cr16c.c:784 elf32-cris.c:2020 elf32-crx.c:926
-#: elf32-d10v.c:517 elf32-fr30.c:593 elf32-frv.c:4043 elf32-h8300.c:529
-#: elf32-i860.c:1216 elf32-iq2000.c:692 elf32-lm32.c:1164 elf32-m32c.c:557
-#: elf32-m32r.c:3070 elf32-m68hc1x.c:1287 elf32-mep.c:539 elf32-metag.c:1996
-#: elf32-microblaze.c:1564 elf32-moxie.c:286 elf32-msp430.c:1321
-#: elf32-nds32.c:4914 elf32-openrisc.c:408 elf32-score.c:2733
-#: elf32-score7.c:2541 elf32-spu.c:5045 elf32-tilepro.c:3670 elf32-v850.c:2285
-#: elf32-xstormy16.c:940 elf64-mmix.c:1542 elfxx-mips.c:9995
-#: elfxx-tilegx.c:4055
+#: elf-m10200.c:429 elf-m10300.c:2153 elf32-avr.c:1506 elf32-bfin.c:3198
+#: elf32-cr16.c:1470 elf32-cr16c.c:784 elf32-cris.c:2029 elf32-crx.c:928
+#: elf32-d10v.c:517 elf32-fr30.c:595 elf32-frv.c:4045 elf32-ft32.c:338
+#: elf32-h8300.c:526 elf32-i860.c:1214 elf32-iq2000.c:697 elf32-lm32.c:1130
+#: elf32-m32c.c:625 elf32-m32r.c:3048 elf32-m68hc1x.c:1273 elf32-mep.c:528
+#: elf32-metag.c:2009 elf32-microblaze.c:1578 elf32-moxie.c:289
+#: elf32-msp430.c:1361 elf32-nds32.c:5406 elf32-or1k.c:1266 elf32-score.c:2737
+#: elf32-score7.c:2550 elf32-spu.c:5080 elf32-tilepro.c:3678 elf32-v850.c:2291
+#: elf32-visium.c:681 elf32-xstormy16.c:931 elf64-mmix.c:1544
+#: elfxx-mips.c:10398 elfxx-tilegx.c:4065
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2260
 msgid "internal error: unsupported relocation error"
 msgstr ""
 
-#: elf-m10200.c:438 elf32-cr16.c:1492 elf32-cr16c.c:788 elf32-crx.c:930
-#: elf32-d10v.c:521 elf32-h8300.c:533 elf32-lm32.c:1168 elf32-m32r.c:3074
-#: elf32-m68hc1x.c:1291 elf32-microblaze.c:1568 elf32-nds32.c:4918
-#: elf32-score.c:2737 elf32-score7.c:2545 elf32-spu.c:5049
+#: elf-m10200.c:433 elf32-cr16.c:1474 elf32-cr16c.c:788 elf32-crx.c:932
+#: elf32-d10v.c:521 elf32-h8300.c:530 elf32-lm32.c:1134 elf32-m32r.c:3052
+#: elf32-m68hc1x.c:1277 elf32-microblaze.c:1582 elf32-nds32.c:5410
+#: elf32-score.c:2741 elf32-score7.c:2554 elf32-spu.c:5084
 msgid "internal error: dangerous error"
 msgstr ""
 
-#: elf-m10200.c:442 elf-m10300.c:2184 elf32-avr.c:1268 elf32-bfin.c:3232
-#: elf32-cr16.c:1496 elf32-cr16c.c:792 elf32-cris.c:2028 elf32-crx.c:934
-#: elf32-d10v.c:525 elf32-epiphany.c:572 elf32-fr30.c:601 elf32-frv.c:4051
-#: elf32-h8300.c:537 elf32-i860.c:1224 elf32-ip2k.c:1483 elf32-iq2000.c:700
-#: elf32-lm32.c:1172 elf32-m32c.c:565 elf32-m32r.c:3078 elf32-m68hc1x.c:1295
-#: elf32-mep.c:547 elf32-metag.c:2004 elf32-microblaze.c:1572
-#: elf32-moxie.c:294 elf32-msp430.c:1329 elf32-mt.c:403 elf32-nds32.c:4922
-#: elf32-openrisc.c:416 elf32-score.c:2746 elf32-score7.c:2549
-#: elf32-spu.c:5053 elf32-tilepro.c:3678 elf32-v850.c:2305
-#: elf32-xstormy16.c:948 elf64-mmix.c:1550 elfxx-tilegx.c:4063
+#: elf-m10200.c:437 elf-m10300.c:2170 elf32-avr.c:1514 elf32-bfin.c:3206
+#: elf32-cr16.c:1478 elf32-cr16c.c:792 elf32-cris.c:2037 elf32-crx.c:936
+#: elf32-d10v.c:525 elf32-epiphany.c:578 elf32-fr30.c:603 elf32-frv.c:4053
+#: elf32-ft32.c:346 elf32-h8300.c:534 elf32-i860.c:1222 elf32-ip2k.c:1490
+#: elf32-iq2000.c:705 elf32-lm32.c:1138 elf32-m32c.c:633 elf32-m32r.c:3056
+#: elf32-m68hc1x.c:1281 elf32-mep.c:536 elf32-metag.c:2017
+#: elf32-microblaze.c:1586 elf32-moxie.c:297 elf32-msp430.c:1369
+#: elf32-mt.c:408 elf32-nds32.c:5414 elf32-or1k.c:1274 elf32-score.c:2750
+#: elf32-score7.c:2558 elf32-spu.c:5088 elf32-tilepro.c:3686 elf32-v850.c:2311
+#: elf32-visium.c:689 elf32-xstormy16.c:939 elf64-mmix.c:1552
+#: elfxx-tilegx.c:4073
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2268
 msgid "internal error: unknown error"
 msgstr ""
 
-#: elf-m10300.c:1021
+#: elf-m10300.c:812
+#, c-format
+msgid "%B: unrecognised MN10300 reloc number: %d"
+msgstr ""
+
+#: elf-m10300.c:1028
 #, c-format
 msgid "%s: Unsupported transition from %s to %s"
 msgstr ""
 
-#: elf-m10300.c:1213
+#: elf-m10300.c:1201
+#, c-format
 msgid "%B: %s' accessed both as normal and thread local symbol"
 msgstr ""
 
-#: elf-m10300.c:2108 elf32-arm.c:10632 elf32-i386.c:4363 elf32-m32r.c:2558
-#: elf32-m68k.c:4120 elf32-s390.c:3303 elf32-sh.c:4109 elf32-tilepro.c:3569
-#: elf32-xtensa.c:3063 elf64-s390.c:3229 elf64-sh64.c:1640 elf64-x86-64.c:4463
-#: elfxx-sparc.c:3904 elfxx-tilegx.c:3974
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4450
+#: elf-m10300.c:2097 elf32-arm.c:12538 elf32-i386.c:5160 elf32-m32r.c:2540
+#: elf32-m68k.c:4084 elf32-s390.c:3380 elf32-sh.c:4127 elf32-tilepro.c:3578
+#: elf32-xtensa.c:3060 elf64-s390.c:3291 elf64-sh64.c:1636 elf64-x86-64.c:5573
+#: elfxx-sparc.c:3913 elfxx-tilegx.c:3985
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6423
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2225
+#, c-format
 msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
 msgstr ""
 
-#: elf-m10300.c:2173
+#: elf-m10300.c:2158
 msgid ""
 "error: inappropriate relocation type for shared library (did you forget -"
 "fpic?)"
 msgstr ""
 
-#: elf-m10300.c:2176
+#: elf-m10300.c:2162
+#, c-format
 msgid ""
 "%B: taking the address of protected function '%s' cannot be done when making "
 "a shared library"
 msgstr ""
 
-#: elf-m10300.c:2179
+#: elf-m10300.c:2165
 msgid "internal error: suspicious relocation type used in shared library"
 msgstr ""
 
-#: elf.c:343
+#. PR 17512: file: f057ec89.
+#: elf.c:342
+#, c-format
+msgid "%B: attempt to load strings from a non-string section (number %d)"
+msgstr ""
+
+#: elf.c:356
+#, c-format
 msgid "%B: invalid string offset %u >= %lu for section `%s'"
 msgstr ""
 
-#: elf.c:455
+#: elf.c:495
+#, c-format
 msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
 msgstr ""
 
-#: elf.c:611
-msgid "%B: Corrupt size field in group section header: 0x%lx"
+#: elf.c:652
+#, c-format
+msgid "%B: corrupt size field in group section header: 0x%lx"
+msgstr ""
+
+#: elf.c:666
+#, c-format
+msgid "%B: invalid size field in group section header: 0x%lx"
 msgstr ""
 
-#: elf.c:647
+#: elf.c:700
 msgid "%B: invalid SHT_GROUP entry"
 msgstr ""
 
-#: elf.c:717
+#: elf.c:719
+msgid "%B: no valid group sections found"
+msgstr ""
+
+#: elf.c:787
+#, c-format
 msgid "%B: no group info for section %A"
 msgstr ""
 
-#: elf.c:746 elf.c:3144 elflink.c:10290
+#: elf.c:818 elf.c:3817 elflink.c:10949
+#, c-format
 msgid "%B: warning: sh_link not set for section `%A'"
 msgstr ""
 
-#: elf.c:765
+#: elf.c:838
+#, c-format
 msgid "%B: sh_link [%d] in section `%A' is incorrect"
 msgstr ""
 
-#: elf.c:800
+#: elf.c:851
+#, c-format
+msgid "%B: SHT_GROUP section [index %d] has no SHF_GROUP sections"
+msgstr ""
+
+#: elf.c:872
+#, c-format
+msgid "%B: section group entry number %u is corrupt"
+msgstr ""
+
+#: elf.c:897
+#, c-format
 msgid "%B: unknown [%d] section `%s' in group [%s]"
 msgstr ""
 
-#: elf.c:1174
+#: elf.c:1354
+#, c-format
+msgid "%B: Invalid sh_link field (%d) in section number %d"
+msgstr ""
+
+#: elf.c:1370
+#, c-format
+msgid "%B: Failed to find link section for section %d"
+msgstr ""
+
+#: elf.c:1397
+#, c-format
+msgid "%B: Failed to find info section for section %d"
+msgstr ""
+
+#: elf.c:1569
 #, c-format
 msgid ""
 "\n"
 "Program Header:\n"
 msgstr ""
 
-#: elf.c:1216
+#: elf.c:1611
 #, c-format
 msgid ""
 "\n"
 "Dynamic Section:\n"
 msgstr ""
 
-#: elf.c:1352
+#: elf.c:1752
 #, c-format
 msgid ""
 "\n"
 "Version definitions:\n"
 msgstr ""
 
-#: elf.c:1377
+#: elf.c:1777
 #, c-format
 msgid ""
 "\n"
 "Version References:\n"
 msgstr ""
 
-#: elf.c:1382
+#: elf.c:1782
 #, c-format
 msgid "  required from %s:\n"
 msgstr ""
 
-#: elf.c:1807
+#: elf.c:1980
+msgid "%B: warning: loop in section dependencies detected"
+msgstr ""
+
+#: elf.c:2088
+#, c-format
+msgid ""
+"%B: warning: multiple symbol tables detected - ignoring the table in section "
+"%u"
+msgstr ""
+
+#: elf.c:2171
+#, c-format
+msgid ""
+"%B: warning: multiple dynamic symbol tables detected - ignoring the table in "
+"section %u"
+msgstr ""
+
+#: elf.c:2283
+#, c-format
 msgid "%B: invalid link %lu for reloc section %s (index %u)"
 msgstr ""
 
-#: elf.c:1977
+#: elf.c:2469
+#, c-format
 msgid ""
 "%B: don't know how to handle allocated, application specific section `%s' [0x"
 "%8x]"
 msgstr ""
 
-#: elf.c:1989
+#: elf.c:2485
+#, c-format
 msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
 msgstr ""
 
-#: elf.c:2000
+#: elf.c:2497
+#, c-format
 msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
 msgstr ""
 
-#: elf.c:2010
+#: elf.c:2511
+#, c-format
 msgid "%B: don't know how to handle section `%s' [0x%8x]"
 msgstr ""
 
-#: elf.c:2648
+#: elf.c:3215
+#, c-format
+msgid "%B: error: Alignment power %d of section `%A' is too big"
+msgstr ""
+
+#: elf.c:3245
 #, c-format
 msgid "warning: section `%A' type changed to PROGBITS"
 msgstr ""
 
-#: elf.c:3015
+#: elf.c:3687
+#, c-format
 msgid "%B: too many sections: %u"
 msgstr ""
 
-#: elf.c:3101
+#: elf.c:3772
+#, c-format
 msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
 msgstr ""
 
-#: elf.c:3124
+#: elf.c:3796
+#, c-format
 msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
 msgstr ""
 
-#: elf.c:4126
+#: elf.c:4861
 msgid "%B: TLS sections are not adjacent:"
 msgstr ""
 
-#: elf.c:4133
+#: elf.c:4868
 #, c-format
 msgid "\t    TLS: %A"
 msgstr ""
 
-#: elf.c:4137
+#: elf.c:4872
 #, c-format
 msgid "\tnon-TLS: %A"
 msgstr ""
 
-#: elf.c:4596
+#: elf.c:5328
 msgid ""
 "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
 msgstr ""
 
-#: elf.c:4621
+#: elf.c:5355
 msgid "%B: Not enough room for program headers, try linking with -N"
 msgstr ""
 
-#: elf.c:4707
+#: elf.c:5442
+#, c-format
 msgid "%B: section %A lma %#lx adjusted to %#lx"
 msgstr ""
 
-#: elf.c:4843
+#: elf.c:5579
+#, c-format
 msgid "%B: section `%A' can't be allocated in segment %d"
 msgstr ""
 
-#: elf.c:4892
+#: elf.c:5627
+#, c-format
 msgid "%B: warning: allocated section `%s' not in segment"
 msgstr ""
 
-#: elf.c:5473
+#: elf.c:5825
+msgid ""
+"%B: error: non-load segment %d includes file header and/or program header"
+msgstr ""
+
+#. The fix for this error is usually to edit the linker script being
+#. used and set up the program headers manually.  Either that or
+#. leave room for the headers at the start of the SECTIONS.
+#: elf.c:6001
+msgid "%B: error: PHDR segment not covered by LOAD segment"
+msgstr ""
+
+#: elf.c:6345
+#, c-format
 msgid "%B: symbol `%s' required but not present"
 msgstr ""
 
-#: elf.c:5811
-msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
+#: elf.c:6683
+msgid "%B: warning: Empty loadable segment detected, is this intentional ?"
 msgstr ""
 
-#: elf.c:6867
+#: elf.c:7297
+#, c-format
+msgid "%B: warning: segment alignment of 0x%llx is too large"
+msgstr ""
+
+#: elf.c:7774
 #, c-format
 msgid ""
 "Unable to find equivalent output section for symbol '%s' from section '%s'"
 msgstr ""
 
-#: elf.c:7915
-msgid "%B: unsupported relocation type %s"
+#: elf.c:8106
+msgid "%B: .gnu.version_r invalid entry"
 msgstr ""
 
-#: elf32-arm.c:3722 elf32-arm.c:7051
-msgid ""
-"%B(%s): warning: interworking not enabled.\n"
-"  first occurrence: %B: Thumb call to ARM"
+#: elf.c:8233
+msgid "%B: .gnu.version_d invalid entry"
 msgstr ""
 
-#: elf32-arm.c:3769
-msgid ""
-"%B(%s): warning: interworking not enabled.\n"
-"  first occurrence: %B: ARM call to Thumb"
+#: elf.c:8785
+#, c-format
+msgid "%B: unsupported relocation type %s"
 msgstr ""
 
-#: elf32-arm.c:3988 elf32-arm.c:5433
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:2324
+#: elf32-arc.c:464 elf32-frv.c:6625 elf32-iq2000.c:870 elf32-m32c.c:914
+#: elf32-mt.c:564 elf32-rl78.c:1256 elf32-rx.c:3176 elf32-visium.c:838
+#: elf64-ppc.c:6072
 #, c-format
-msgid "%s: cannot create stub entry %s"
+msgid "private flags = 0x%lx:"
 msgstr ""
 
-#: elf32-arm.c:5549
+#: elf32-arc.c:605
 #, c-format
-msgid "unable to find THUMB glue '%s' for '%s'"
+msgid "ERROR: Attempting to link %B with a binary %s of different architecture"
 msgstr ""
 
-#: elf32-arm.c:5585
+#: elf32-arc.c:615 elf32-iq2000.c:846 elf32-m32c.c:890
 #, c-format
-msgid "unable to find ARM glue '%s' for '%s'"
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr ""
 
-#: elf32-arm.c:6123
-msgid "%B: BE8 images only valid in big-endian mode."
+#: elf32-arc.c:676
+msgid "Error: The ARC4 architecture is no longer supported.\n"
 msgstr ""
 
-#. Give a warning, but do as the user requests anyway.
-#: elf32-arm.c:6353
+#: elf32-arc.c:682
 msgid ""
-"%B: warning: selected VFP11 erratum workaround is not necessary for target "
-"architecture"
+"Warning: unset or old architecture flags. \n"
+"\t       Use default machine.\n"
 msgstr ""
 
-#: elf32-arm.c:6897 elf32-arm.c:6917
-msgid "%B: unable to find VFP11 veneer `%s'"
+#: elf32-arc.c:810
+#, c-format
+msgid ""
+"%B(%A+0x%lx): CMEM relocation to `%s' is invalid, 16 MSB should be 0x%04x "
+"(value is 0x%lx)"
 msgstr ""
 
-#: elf32-arm.c:6966
+#: elf32-arc.c:821
 #, c-format
-msgid "Invalid TARGET2 relocation type '%s'."
+msgid ""
+"%B(%A+0x%lx): CMEM relocation to `%s+0x%lx' is invalid, 16 MSB should be 0x"
+"%04x (value is 0x%lx)"
 msgstr ""
 
-#. PR ld/16017: Do not generate ARM instructions for
-#. the PLT if compiling for a thumb-only target.
-#.
-#. FIXME: We ought to be able to generate thumb PLT instructions...
-#: elf32-arm.c:7696
-msgid "%B: Warning: thumb mode PLT generation not currently supported"
+#: elf32-arc.c:1510
+msgid "GOT and PLT relocations cannot be fixed with a non dynamic linker."
 msgstr ""
 
-#: elf32-arm.c:7909
-msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"
+#: elf32-arc.c:1534 elf32-rl78.c:1094 elf32-rx.c:1448
+#, c-format
+msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
 msgstr ""
 
-#: elf32-arm.c:7948
-msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"
+#: elf32-arc.c:1539 elf32-rl78.c:1099 elf32-rx.c:1453
+#, c-format
+msgid "%B(%A): internal error: out of range error"
 msgstr ""
 
-#: elf32-arm.c:8412
-msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
-msgstr ""
+#: elf32-arc.c:1544 elf32-rl78.c:1104 elf32-rx.c:1458
+#, c-format
+msgid "%B(%A): internal error: unsupported relocation error"
+msgstr ""
+
+#: elf32-arc.c:1549 elf32-rl78.c:1109 elf32-rx.c:1463
+#, c-format
+msgid "%B(%A): internal error: dangerous relocation"
+msgstr ""
+
+#: elf32-arc.c:1554 elf32-rl78.c:1114 elf32-rx.c:1468
+#, c-format
+msgid "%B(%A): internal error: unknown error"
+msgstr ""
+
+#: elf32-arc.c:1737 elf32-arm.c:14692 elf32-metag.c:2279 elfxx-mips.c:8874
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:7347
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:488
+#, c-format
+msgid ""
+"%B: relocation %s against `%s' can not be used when making a shared object; "
+"recompile with -fPIC"
+msgstr ""
+
+#: elf32-arm.c:4036 elf32-arm.c:4068
+msgid ""
+"%B(%A): warning: long branch  veneers used in section with SHF_ARM_PURECODE "
+"section attribute is only supported for M-profile targets that implement the "
+"movw instruction."
+msgstr ""
+
+#: elf32-arm.c:4085 elf32-arm.c:4138
+msgid ""
+"%B(%s): warning: long branch  veneers used in section with SHF_ARM_PURECODE "
+"section attribute is only supported for M-profile targets that implement the "
+"movw instruction."
+msgstr ""
+
+#: elf32-arm.c:4099 elf32-arm.c:8818
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: Thumb call to ARM"
+msgstr ""
+
+#: elf32-arm.c:4154
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: ARM call to Thumb"
+msgstr ""
+
+#: elf32-arm.c:4428
+#, c-format
+msgid "No address assigned to the veneers output section %s"
+msgstr ""
+
+#: elf32-arm.c:4503 elf32-arm.c:6640
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:2837
+#, c-format
+msgid "%s: cannot create stub entry %s"
+msgstr ""
+
+#: elf32-arm.c:5688
+msgid "%B: Special symbol `%s' only allowed for ARMv8-M architecture or later."
+msgstr ""
+
+#: elf32-arm.c:5697
+msgid "%B: invalid special symbol `%s'."
+msgstr ""
+
+#: elf32-arm.c:5699 elf32-arm.c:5739
+msgid "It must be a global or weak function symbol."
+msgstr ""
+
+#: elf32-arm.c:5737
+msgid "%B: invalid standard symbol `%s'."
+msgstr ""
+
+#: elf32-arm.c:5743
+msgid "%B: absent standard symbol `%s'."
+msgstr ""
+
+#: elf32-arm.c:5755
+msgid "%B: `%s' and its special symbol are in different sections."
+msgstr ""
+
+#: elf32-arm.c:5767
+msgid "%B: entry function `%s' not output."
+msgstr ""
+
+#: elf32-arm.c:5774
+msgid "%B: entry function `%s' is empty."
+msgstr ""
+
+#: elf32-arm.c:5903
+msgid "%B: --in-implib only supported for Secure Gateway import libraries."
+msgstr ""
+
+#: elf32-arm.c:5949
+msgid "%B: invalid import library entry: `%s'."
+msgstr ""
+
+#: elf32-arm.c:5951
+msgid "Symbol should be absolute, global and refer to Thumb functions."
+msgstr ""
+
+#: elf32-arm.c:5971
+#, c-format
+msgid "Entry function `%s' disappeared from secure code."
+msgstr ""
+
+#: elf32-arm.c:5995
+#, c-format
+msgid "`%s' refers to a non entry function."
+msgstr ""
+
+#: elf32-arm.c:6010
+msgid "%B: visibility of symbol `%s' has changed."
+msgstr ""
+
+#: elf32-arm.c:6019
+msgid "%B: incorrect size for symbol `%s'."
+msgstr ""
+
+#: elf32-arm.c:6038
+#, c-format
+msgid "Offset of veneer for entry function `%s' not a multiple of its size."
+msgstr ""
+
+#: elf32-arm.c:6058
+msgid ""
+"new entry function(s) introduced but no output import library specified:"
+msgstr ""
+
+#: elf32-arm.c:6066
+#, c-format
+msgid "Start address of `%s' is different from previous link."
+msgstr ""
+
+#: elf32-arm.c:6773
+#, c-format
+msgid "unable to find THUMB glue '%s' for '%s'"
+msgstr ""
+
+#: elf32-arm.c:6809
+#, c-format
+msgid "unable to find ARM glue '%s' for '%s'"
+msgstr ""
+
+#: elf32-arm.c:7524
+msgid "%B: BE8 images only valid in big-endian mode."
+msgstr ""
+
+#. Give a warning, but do as the user requests anyway.
+#: elf32-arm.c:7755
+msgid ""
+"%B: warning: selected VFP11 erratum workaround is not necessary for target "
+"architecture"
+msgstr ""
+
+#: elf32-arm.c:7782
+msgid ""
+"%B: warning: selected STM32L4XX erratum workaround is not necessary for "
+"target architecture"
+msgstr ""
+
+#: elf32-arm.c:8319 elf32-arm.c:8339
+msgid "%B: unable to find VFP11 veneer `%s'"
+msgstr ""
+
+#: elf32-arm.c:8405 elf32-arm.c:8424
+msgid "%B: unable to find STM32L4XX veneer `%s'"
+msgstr ""
+
+#. Note - overlong line used here to allow for translation.
+#: elf32-arm.c:8632
+#, c-format
+msgid ""
+"%B(%A+0x%lx): error: multiple load detected in non-last IT block "
+"instruction : STM32L4XX veneer cannot be generated.\n"
+"Use gcc option -mrestrict-it to generate only one instruction per IT block.\n"
+msgstr ""
+
+#: elf32-arm.c:8728
+#, c-format
+msgid "Invalid TARGET2 relocation type '%s'."
+msgstr ""
+
+#. FIXME: We ought to be able to generate thumb-1 PLT
+#. instructions...
+#: elf32-arm.c:9470
+msgid "%B: Warning: thumb-1 mode PLT generation not currently supported"
+msgstr ""
+
+#: elf32-arm.c:9735
+#, c-format
+msgid "%B(%A+0x%lx): unexpected Thumb instruction '0x%x' in TLS trampoline"
+msgstr ""
+
+#: elf32-arm.c:9775
+#, c-format
+msgid "%B(%A+0x%lx): unexpected ARM instruction '0x%x' in TLS trampoline"
+msgstr ""
+
+#: elf32-arm.c:10109
+msgid "shared object"
+msgstr ""
+
+#: elf32-arm.c:10112
+msgid "PIE executable"
+msgstr ""
+
+#: elf32-arm.c:10115
+msgid ""
+"%B: relocation %s against external or undefined symbol `%s' can not be used "
+"when making a %s; recompile with -fPIC"
+msgstr ""
+
+#: elf32-arm.c:10246
+msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
+msgstr ""
 
-#: elf32-arm.c:8831
+#: elf32-arm.c:10666
 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr ""
 
-#: elf32-arm.c:9672
+#: elf32-arm.c:11533
+#, c-format
 msgid ""
-"%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
+"%B(%A+0x%lx): unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
 msgstr ""
 
-#: elf32-arm.c:9695
+#: elf32-arm.c:11557
+#, c-format
 msgid ""
-"%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
+"%B(%A+0x%lx): unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
 msgstr ""
 
-#: elf32-arm.c:9724
+#: elf32-arm.c:11587
+#, c-format
 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
 msgstr ""
 
-#: elf32-arm.c:9937
+#: elf32-arm.c:11801
+#, c-format
 msgid ""
 "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group "
 "relocations"
 msgstr ""
 
-#: elf32-arm.c:9977 elf32-arm.c:10065 elf32-arm.c:10149 elf32-arm.c:10235
+#: elf32-arm.c:11842 elf32-arm.c:11933 elf32-arm.c:12019 elf32-arm.c:12107
+#, c-format
 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
 msgstr ""
 
-#: elf32-arm.c:10474 elf32-sh.c:3994 elf64-sh64.c:1544
+#: elf32-arm.c:12371 elf32-sh.c:4009 elf64-sh64.c:1539
+#, c-format
 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
 msgstr ""
 
-#: elf32-arm.c:10585 elf32-m68k.c:4155 elf32-xtensa.c:2799
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4192
+#: elf32-arm.c:12483 elf32-m68k.c:4120 elf32-xtensa.c:2802
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6151
+#, c-format
 msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
 msgstr ""
 
-#: elf32-arm.c:10586 elf32-m68k.c:4156 elf32-xtensa.c:2800
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4193
+#: elf32-arm.c:12485 elf32-m68k.c:4122 elf32-xtensa.c:2804
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6153
+#, c-format
 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
 msgstr ""
 
-#: elf32-arm.c:10666 elf32-tic6x.c:2736
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4481
+#: elf32-arm.c:12567 elf32-tic6x.c:2737
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6486
 msgid "out of range"
 msgstr ""
 
-#: elf32-arm.c:10670 elf32-nios2.c:3525 elf32-tic6x.c:2740
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4485
+#: elf32-arm.c:12571 elf32-nios2.c:4507 elf32-tic6x.c:2741
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6490
 msgid "unsupported relocation"
 msgstr ""
 
-#: elf32-arm.c:10678 elf32-nios2.c:3535 elf32-tic6x.c:2748
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4493
+#: elf32-arm.c:12579 elf32-nios2.c:4517 elf32-tic6x.c:2749
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6498
 msgid "unknown error"
 msgstr ""
 
-#: elf32-arm.c:11153
-msgid ""
-"Warning: Clearing the interworking flag of %B because non-interworking code "
-"in %B has been linked with it"
-msgstr ""
-
-#: elf32-arm.c:11240
+#: elf32-arm.c:13159
 msgid "%B: Unknown mandatory EABI object attribute %d"
 msgstr ""
 
-#: elf32-arm.c:11248
+#: elf32-arm.c:13167
 msgid "Warning: %B: Unknown EABI object attribute %d"
 msgstr ""
 
-#: elf32-arm.c:11449
+#: elf32-arm.c:13415
 msgid "error: %B: Unknown CPU architecture"
 msgstr ""
 
-#: elf32-arm.c:11487
+#: elf32-arm.c:13453 elf32-nios2.c:2967
+#, c-format
 msgid "error: %B: Conflicting CPU architectures %d/%d"
 msgstr ""
 
-#: elf32-arm.c:11576
+#: elf32-arm.c:13550
 msgid ""
 "Error: %B has both the current and legacy Tag_MPextension_use attributes"
 msgstr ""
 
-#: elf32-arm.c:11601
+#: elf32-arm.c:13579
 msgid "error: %B uses VFP register arguments, %B does not"
 msgstr ""
 
-#: elf32-arm.c:11747
+#: elf32-arm.c:13737
 msgid "error: %B: unable to merge virtualization attributes with %B"
 msgstr ""
 
-#: elf32-arm.c:11773
+#: elf32-arm.c:13763
 msgid "error: %B: Conflicting architecture profiles %c/%c"
 msgstr ""
 
-#: elf32-arm.c:11877
+#: elf32-arm.c:13893
 msgid "Warning: %B: Conflicting platform configuration"
 msgstr ""
 
-#: elf32-arm.c:11886
+#: elf32-arm.c:13902
 msgid "error: %B: Conflicting use of R9"
 msgstr ""
 
-#: elf32-arm.c:11898
+#: elf32-arm.c:13914
 msgid "error: %B: SB relative addressing conflicts with use of R9"
 msgstr ""
 
-#: elf32-arm.c:11911
+#: elf32-arm.c:13927
 msgid ""
 "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; "
 "use of wchar_t values across objects may fail"
 msgstr ""
 
-#: elf32-arm.c:11942
+#: elf32-arm.c:13958
 msgid ""
 "warning: %B uses %s enums yet the output is to use %s enums; use of enum "
 "values across objects may fail"
 msgstr ""
 
-#: elf32-arm.c:11954
+#: elf32-arm.c:13970
 msgid "error: %B uses iWMMXt register arguments, %B does not"
 msgstr ""
 
-#: elf32-arm.c:11971
+#: elf32-arm.c:13987
 msgid "error: fp16 format mismatch between %B and %B"
 msgstr ""
 
-#: elf32-arm.c:12007
+#: elf32-arm.c:14023
 msgid "%B has has both the current and legacy Tag_MPextension_use attributes"
 msgstr ""
 
@@ -1126,407 +1674,479 @@ msgstr ""
 #. Ignore init flag - it may not be set, despite the flags field containing valid data.
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.c:12095 elf32-bfin.c:4949 elf32-cris.c:4139 elf32-m68hc1x.c:1427
-#: elf32-m68k.c:1195 elf32-score.c:4004 elf32-score7.c:3808 elf32-vax.c:529
-#: elf32-xgate.c:674 elfxx-mips.c:14955
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4645
+#: elf32-arm.c:14110 elf32-bfin.c:4919 elf32-cris.c:4076 elf32-m68hc1x.c:1413
+#: elf32-m68k.c:1200 elf32-score.c:4009 elf32-score7.c:3818 elf32-vax.c:536
+#: elf32-xgate.c:669 elfxx-mips.c:15920
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6652
 #, c-format
 msgid "private flags = %lx:"
 msgstr ""
 
-#: elf32-arm.c:12104
+#: elf32-arm.c:14119
 #, c-format
 msgid " [interworking enabled]"
 msgstr ""
 
-#: elf32-arm.c:12112
+#: elf32-arm.c:14127
 #, c-format
 msgid " [VFP float format]"
 msgstr ""
 
-#: elf32-arm.c:12114
+#: elf32-arm.c:14129
 #, c-format
 msgid " [Maverick float format]"
 msgstr ""
 
-#: elf32-arm.c:12116
+#: elf32-arm.c:14131
 #, c-format
 msgid " [FPA float format]"
 msgstr ""
 
-#: elf32-arm.c:12125
+#: elf32-arm.c:14140
 #, c-format
 msgid " [new ABI]"
 msgstr ""
 
-#: elf32-arm.c:12128
+#: elf32-arm.c:14143
 #, c-format
 msgid " [old ABI]"
 msgstr ""
 
-#: elf32-arm.c:12131
+#: elf32-arm.c:14146
 #, c-format
 msgid " [software FP]"
 msgstr ""
 
-#: elf32-arm.c:12140
+#: elf32-arm.c:14155
 #, c-format
 msgid " [Version1 EABI]"
 msgstr ""
 
-#: elf32-arm.c:12143 elf32-arm.c:12154
+#: elf32-arm.c:14158 elf32-arm.c:14169
 #, c-format
 msgid " [sorted symbol table]"
 msgstr ""
 
-#: elf32-arm.c:12145 elf32-arm.c:12156
+#: elf32-arm.c:14160 elf32-arm.c:14171
 #, c-format
 msgid " [unsorted symbol table]"
 msgstr ""
 
-#: elf32-arm.c:12151
+#: elf32-arm.c:14166
 #, c-format
 msgid " [Version2 EABI]"
 msgstr ""
 
-#: elf32-arm.c:12159
+#: elf32-arm.c:14174
 #, c-format
 msgid " [dynamic symbols use segment index]"
 msgstr ""
 
-#: elf32-arm.c:12162
+#: elf32-arm.c:14177
 #, c-format
 msgid " [mapping symbols precede others]"
 msgstr ""
 
-#: elf32-arm.c:12169
+#: elf32-arm.c:14184
 #, c-format
 msgid " [Version3 EABI]"
 msgstr ""
 
-#: elf32-arm.c:12173
+#: elf32-arm.c:14188
 #, c-format
 msgid " [Version4 EABI]"
 msgstr ""
 
-#: elf32-arm.c:12177
+#: elf32-arm.c:14192
 #, c-format
 msgid " [Version5 EABI]"
 msgstr ""
 
-#: elf32-arm.c:12180
+#: elf32-arm.c:14195
 #, c-format
 msgid " [soft-float ABI]"
 msgstr ""
 
-#: elf32-arm.c:12183
+#: elf32-arm.c:14198
 #, c-format
 msgid " [hard-float ABI]"
 msgstr ""
 
-#: elf32-arm.c:12189
+#: elf32-arm.c:14204
 #, c-format
 msgid " [BE8]"
 msgstr ""
 
-#: elf32-arm.c:12192
+#: elf32-arm.c:14207
 #, c-format
 msgid " [LE8]"
 msgstr ""
 
-#: elf32-arm.c:12198
+#: elf32-arm.c:14213
 #, c-format
 msgid " <EABI version unrecognised>"
 msgstr ""
 
-#: elf32-arm.c:12205
+#: elf32-arm.c:14220
 #, c-format
 msgid " [relocatable executable]"
 msgstr ""
 
-#: elf32-arm.c:12208
-#, c-format
-msgid " [has entry point]"
-msgstr ""
-
-#: elf32-arm.c:12213 /src/binutils-gdb/bfd/elfnn-aarch64.c:4648
+#: elf32-arm.c:14225
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6655
 #, c-format
 msgid "<Unrecognised flag bits set>"
 msgstr ""
 
-#: elf32-arm.c:12522 elf32-i386.c:1452 elf32-s390.c:1005 elf32-tic6x.c:2812
-#: elf32-tilepro.c:1511 elf32-xtensa.c:999 elf64-s390.c:927
-#: elf64-x86-64.c:1467 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:5038
+#: elf32-arm.c:14535 elf32-i386.c:1905 elf32-s390.c:984 elf32-tic6x.c:2812
+#: elf32-tilepro.c:1511 elf32-xtensa.c:1004 elf64-s390.c:903
+#: elf64-x86-64.c:2214 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:7048
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:530
+#, c-format
 msgid "%B: bad symbol index: %d"
 msgstr ""
 
-#: elf32-arm.c:12674 elf32-metag.c:2283 elf64-x86-64.c:1593
-#: elf64-x86-64.c:1771 elfxx-mips.c:8482
-msgid ""
-"%B: relocation %s against `%s' can not be used when making a shared object; "
-"recompile with -fPIC"
-msgstr ""
-
-#: elf32-arm.c:13796
+#: elf32-arm.c:16029
 #, c-format
 msgid "Errors encountered processing file %s"
 msgstr ""
 
-#: elf32-arm.c:14230
+#: elf32-arm.c:16466 elflink.c:12085 elflink.c:12132
 #, c-format
-msgid "error: required section '%s' not found in the linker script"
+msgid "could not find section %s"
 msgstr ""
 
-#: elf32-arm.c:15252
+#: elf32-arm.c:17638
 msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location"
 msgstr ""
 
 #. There's not much we can do apart from complain if this
 #. happens.
-#: elf32-arm.c:15279
+#: elf32-arm.c:17665
 msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)"
 msgstr ""
 
-#: elf32-arm.c:15373 elf32-arm.c:15395
+#: elf32-arm.c:18492 elf32-arm.c:18514
 msgid "%B: error: VFP11 veneer out of range"
 msgstr ""
 
-#: elf32-arm.c:16020
+#: elf32-arm.c:18565
+msgid ""
+"%B(%#x): error: Cannot create STM32L4XX veneer. Jump out of range by %ld "
+"bytes. Cannot encode branch instruction. "
+msgstr ""
+
+#: elf32-arm.c:18603
+msgid "%B: error: Cannot create STM32L4XX veneer."
+msgstr ""
+
+#: elf32-arm.c:19623
 msgid "error: %B is already in final BE8 format"
 msgstr ""
 
-#: elf32-arm.c:16096
+#: elf32-arm.c:19699
 msgid ""
 "error: Source object %B has EABI version %d, but target %B has EABI version "
 "%d"
 msgstr ""
 
-#: elf32-arm.c:16112
+#: elf32-arm.c:19715
 msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
 msgstr ""
 
-#: elf32-arm.c:16137
+#: elf32-arm.c:19740
 msgid "error: %B uses VFP instructions, whereas %B does not"
 msgstr ""
 
-#: elf32-arm.c:16141
+#: elf32-arm.c:19744
 msgid "error: %B uses FPA instructions, whereas %B does not"
 msgstr ""
 
-#: elf32-arm.c:16151
+#: elf32-arm.c:19754
 msgid "error: %B uses Maverick instructions, whereas %B does not"
 msgstr ""
 
-#: elf32-arm.c:16155
+#: elf32-arm.c:19758
 msgid "error: %B does not use Maverick instructions, whereas %B does"
 msgstr ""
 
-#: elf32-arm.c:16174
+#: elf32-arm.c:19777
 msgid "error: %B uses software FP, whereas %B uses hardware FP"
 msgstr ""
 
-#: elf32-arm.c:16178
+#: elf32-arm.c:19781
 msgid "error: %B uses hardware FP, whereas %B uses software FP"
 msgstr ""
 
-#: elf32-avr.c:1264 elf32-bfin.c:3228 elf32-cris.c:2024 elf32-epiphany.c:568
-#: elf32-fr30.c:597 elf32-frv.c:4047 elf32-i860.c:1220 elf32-ip2k.c:1479
-#: elf32-iq2000.c:696 elf32-m32c.c:561 elf32-mep.c:543 elf32-metag.c:2000
-#: elf32-moxie.c:290 elf32-msp430.c:1325 elf32-mt.c:399 elf32-openrisc.c:412
-#: elf32-tilepro.c:3674 elf32-v850.c:2289 elf32-xstormy16.c:944
-#: elf64-mmix.c:1546 elfxx-tilegx.c:4059
+#: elf32-avr.c:959
+#, c-format
+msgid "%B: invalid AVR reloc number: %d"
+msgstr ""
+
+#: elf32-avr.c:1510 elf32-bfin.c:3202 elf32-cris.c:2033 elf32-epiphany.c:574
+#: elf32-fr30.c:599 elf32-frv.c:4049 elf32-ft32.c:342 elf32-i860.c:1218
+#: elf32-ip2k.c:1486 elf32-iq2000.c:701 elf32-m32c.c:629 elf32-mep.c:532
+#: elf32-metag.c:2013 elf32-moxie.c:293 elf32-msp430.c:1365 elf32-mt.c:404
+#: elf32-or1k.c:1270 elf32-tilepro.c:3682 elf32-v850.c:2295 elf32-visium.c:685
+#: elf32-xstormy16.c:935 elf64-mmix.c:1548 elfxx-tilegx.c:4069
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2264
 msgid "internal error: dangerous relocation"
 msgstr ""
 
-#: elf32-avr.c:2476 elf32-hppa.c:578 elf32-m68hc1x.c:160 elf32-metag.c:1197
-#: elf32-nios2.c:1357
+#: elf32-avr.c:3287 elf32-hppa.c:591 elf32-m68hc1x.c:165 elf32-metag.c:1202
+#: elf32-nios2.c:2229
+#, c-format
 msgid "%B: cannot create stub entry %s"
 msgstr ""
 
-#: elf32-bfin.c:107 elf32-bfin.c:363
+#: elf32-bfin.c:106 elf32-bfin.c:362
 msgid "relocation should be even number"
 msgstr ""
 
-#: elf32-bfin.c:1601
+#: elf32-bfin.c:1581
+#, c-format
 msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr ""
 
-#: elf32-bfin.c:1634 elf32-i386.c:4406 elf32-m68k.c:4197 elf32-s390.c:3364
-#: elf64-s390.c:3290 elf64-x86-64.c:4506
+#: elf32-bfin.c:1612 elf32-i386.c:5200 elf32-m68k.c:4160 elf32-s390.c:3437
+#: elf64-s390.c:3348 elf64-x86-64.c:5613
+#, c-format
 msgid "%B(%A+0x%lx): reloc against `%s': error %d"
 msgstr ""
 
-#: elf32-bfin.c:2732
+#: elf32-bfin.c:2706
+#, c-format
 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
 msgstr ""
 
-#: elf32-bfin.c:2748
+#: elf32-bfin.c:2722
 msgid "relocation references symbol not defined in the module"
 msgstr ""
 
-#: elf32-bfin.c:2845
+#: elf32-bfin.c:2819
 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
 msgstr ""
 
-#: elf32-bfin.c:2886 elf32-bfin.c:3009
+#: elf32-bfin.c:2860 elf32-bfin.c:2983
 msgid "cannot emit fixups in read-only section"
 msgstr ""
 
-#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-lm32.c:1095 elf32-sh.c:4913
+#: elf32-bfin.c:2891 elf32-bfin.c:3021 elf32-lm32.c:1064 elf32-sh.c:4930
 msgid "cannot emit dynamic relocations in read-only section"
 msgstr ""
 
-#: elf32-bfin.c:2967
+#: elf32-bfin.c:2941
 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
 msgstr ""
 
-#: elf32-bfin.c:3132
+#: elf32-bfin.c:3106
 msgid "relocations between different segments are not supported"
 msgstr ""
 
-#: elf32-bfin.c:3133
+#: elf32-bfin.c:3107
 msgid "warning: relocation references a different segment"
 msgstr ""
 
-#: elf32-bfin.c:4907
+#: elf32-bfin.c:4877
+#, c-format
 msgid "%B: unsupported relocation type %i"
 msgstr ""
 
-#: elf32-bfin.c:4995 elf32-frv.c:6600
+#: elf32-bfin.c:4967 elf32-frv.c:6598
 #, c-format
 msgid "%s: cannot link non-fdpic object file into fdpic executable"
 msgstr ""
 
-#: elf32-bfin.c:4999 elf32-frv.c:6604
+#: elf32-bfin.c:4971 elf32-frv.c:6602
 #, c-format
 msgid "%s: cannot link fdpic object file into non-fdpic executable"
 msgstr ""
 
-#: elf32-bfin.c:5153
+#: elf32-bfin.c:5121
 #, c-format
 msgid "*** check this relocation %s"
 msgstr ""
 
-#: elf32-cris.c:1110
+#: elf32-bfin.c:5237
+msgid ""
+"the bfin target does not currently support the generation of copy relocations"
+msgstr ""
+
+#: elf32-cr16.c:653
+#, c-format
+msgid "Unsupported CR16 relocation type: 0x%x\n"
+msgstr ""
+
+#: elf32-cr16.c:682
+#, c-format
+msgid "%B: unrecognised CR16 reloc number: %d"
+msgstr ""
+
+#: elf32-cr16c.c:186
+#, c-format
+msgid "%B: invalid CR16C reloc number: %d"
+msgstr ""
+
+#: elf32-cris.c:467
+#, c-format
+msgid "%B: invalid CRIS reloc number: %d"
+msgstr ""
+
+#: elf32-cris.c:1115
+#, c-format
 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
 msgstr ""
 
-#: elf32-cris.c:1172
+#: elf32-cris.c:1177
+#, c-format
 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
 msgstr ""
 
-#: elf32-cris.c:1174
+#: elf32-cris.c:1180
+#, c-format
 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
 msgstr ""
 
-#: elf32-cris.c:1180 elf32-cris.c:1313 elf32-cris.c:1573 elf32-cris.c:1656
-#: elf32-cris.c:1809 elf32-tic6x.c:2645
+#: elf32-cris.c:1186 elf32-cris.c:1319 elf32-cris.c:1583 elf32-cris.c:1666
+#: elf32-cris.c:1819 elf32-tic6x.c:2649
 msgid "[whose name is lost]"
 msgstr ""
 
-#: elf32-cris.c:1299 elf32-tic6x.c:2630
+#: elf32-cris.c:1304 elf32-tic6x.c:2633
+#, c-format
 msgid ""
 "%B, section %A: relocation %s with non-zero addend %d against local symbol"
 msgstr ""
 
-#: elf32-cris.c:1307 elf32-cris.c:1650 elf32-cris.c:1803 elf32-tic6x.c:2638
+#: elf32-cris.c:1313 elf32-cris.c:1660 elf32-cris.c:1813 elf32-tic6x.c:2642
+#, c-format
 msgid ""
 "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
 msgstr ""
 
-#: elf32-cris.c:1333
+#: elf32-cris.c:1340
+#, c-format
 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
 msgstr ""
 
-#: elf32-cris.c:1349
+#: elf32-cris.c:1357
+#, c-format
 msgid "%B, section %A: relocation %s with no GOT created"
 msgstr ""
 
 #. We shouldn't get here for GCC-emitted code.
-#: elf32-cris.c:1564
+#: elf32-cris.c:1573
+#, c-format
 msgid ""
 "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a "
 "declaration mixup?"
 msgstr ""
 
-#: elf32-cris.c:1937
+#: elf32-cris.c:1576
+#, c-format
+msgid ""
+"%B, section %A: relocation %s is not allowed for `%s', a global symbol with "
+"default visibility, perhaps a declaration mixup?"
+msgstr ""
+
+#: elf32-cris.c:1947
+#, c-format
 msgid ""
 "%B, section %A: relocation %s is not allowed for symbol: `%s' which is "
 "defined outside the program, perhaps a declaration mixup?"
 msgstr ""
 
-#: elf32-cris.c:1990
+#: elf32-cris.c:2000
 msgid "(too many global variables for -fpic: recompile with -fPIC)"
 msgstr ""
 
-#: elf32-cris.c:1997
+#: elf32-cris.c:2007
 msgid ""
 "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or "
 "-mno-small-tls)"
 msgstr ""
 
-#: elf32-cris.c:3234
+#: elf32-cris.c:3224
+#, c-format
 msgid ""
 "%B, section %A:\n"
 "  v10/v32 compatible object %s must not contain a PIC relocation"
 msgstr ""
 
-#: elf32-cris.c:3342
+#: elf32-cris.c:3278
+#, c-format
 msgid ""
 "%B, section %A:\n"
 "  relocation %s not valid in a shared object; typically an option mixup, "
 "recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:3556
+#: elf32-cris.c:3493
+#, c-format
 msgid ""
 "%B, section %A:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:3978
+#: elf32-cris.c:3916
+#, c-format
 msgid ""
 "%B, section `%A', to symbol `%s':\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:4091
+#: elf32-cris.c:4028
 msgid "Unexpected machine number"
 msgstr ""
 
-#: elf32-cris.c:4142
+#: elf32-cris.c:4079
 #, c-format
 msgid " [symbols have a _ prefix]"
 msgstr ""
 
-#: elf32-cris.c:4145
+#: elf32-cris.c:4082
 #, c-format
 msgid " [v10 and v32]"
 msgstr ""
 
-#: elf32-cris.c:4148
+#: elf32-cris.c:4085
 #, c-format
 msgid " [v32]"
 msgstr ""
 
-#: elf32-cris.c:4191
+#: elf32-cris.c:4129
 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr ""
 
-#: elf32-cris.c:4192
+#: elf32-cris.c:4130
 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr ""
 
-#: elf32-cris.c:4211
+#: elf32-cris.c:4149
 msgid "%B contains CRIS v32 code, incompatible with previous objects"
 msgstr ""
 
-#: elf32-cris.c:4213
+#: elf32-cris.c:4151
 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
 msgstr ""
 
-#: elf32-dlx.c:142
+#: elf32-crx.c:429
+#, c-format
+msgid "%B: unrecognised CRX reloc number: %d"
+msgstr ""
+
+#: elf32-d10v.c:234
+#, c-format
+msgid "%B: invalid D10V reloc number: %d"
+msgstr ""
+
+#: elf32-d30v.c:522 elf32-d30v.c:541
+#, c-format
+msgid "%B: invalid D30V reloc number: %d"
+msgstr ""
+
+#: elf32-dlx.c:141
 #, c-format
 msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported"
 msgstr ""
@@ -1536,738 +2156,990 @@ msgstr ""
 msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported"
 msgstr ""
 
+#: elf32-dlx.c:552
+#, c-format
+msgid "Invalid DLX reloc number: %d"
+msgstr ""
+
+#: elf32-epiphany.c:376
+#, c-format
+msgid "%B: invalid Epiphany reloc number: %d"
+msgstr ""
+
 #. Only if it's not an unresolved symbol.
-#: elf32-epiphany.c:564 elf32-ip2k.c:1475
+#: elf32-epiphany.c:570 elf32-ip2k.c:1482
 msgid "unsupported relocation between data/insn address spaces"
 msgstr ""
 
-#: elf32-frv.c:1460 elf32-frv.c:1609
+#: elf32-fr30.c:381
+#, c-format
+msgid "%B: invalid FR30 reloc number: %d"
+msgstr ""
+
+#: elf32-frv.c:1451 elf32-frv.c:1602
 msgid "relocation requires zero addend"
 msgstr ""
 
-#: elf32-frv.c:2822
+#: elf32-frv.c:2557
+#, c-format
+msgid "%B: invalid FRV reloc number: %d"
+msgstr ""
+
+#: elf32-frv.c:2823
+#, c-format
 msgid "%H: relocation to `%s+%v' may have caused the error above\n"
 msgstr ""
 
-#: elf32-frv.c:2839
+#: elf32-frv.c:2840
 msgid "%H: relocation references symbol not defined in the module\n"
 msgstr ""
 
-#: elf32-frv.c:2915
+#: elf32-frv.c:2916
 msgid "%H: R_FRV_GETTLSOFF not applied to a call instruction\n"
 msgstr ""
 
-#: elf32-frv.c:2956
+#: elf32-frv.c:2957
 msgid "%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3027
+#: elf32-frv.c:3028
 msgid "%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3064
+#: elf32-frv.c:3065
 msgid "%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3111
+#: elf32-frv.c:3112
 msgid "%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3195
+#: elf32-frv.c:3196
 msgid "%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3249
+#: elf32-frv.c:3250
 msgid "%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3279
+#: elf32-frv.c:3280
 msgid "%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3308
+#: elf32-frv.c:3309
 msgid "%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3338
+#: elf32-frv.c:3339
 msgid "%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3383
+#: elf32-frv.c:3384
 msgid "%H: R_FRV_TLSMOFFHI not applied to a sethi instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3410
+#: elf32-frv.c:3411
 msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction\n"
 msgstr ""
 
-#: elf32-frv.c:3531
+#: elf32-frv.c:3532
 msgid "%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend\n"
 msgstr ""
 
-#: elf32-frv.c:3572 elf32-frv.c:3694
+#: elf32-frv.c:3573 elf32-frv.c:3695
 msgid "%H: cannot emit fixups in read-only section\n"
 msgstr ""
 
-#: elf32-frv.c:3603 elf32-frv.c:3737
+#: elf32-frv.c:3604 elf32-frv.c:3738
 msgid "%H: cannot emit dynamic relocations in read-only section\n"
 msgstr ""
 
-#: elf32-frv.c:3652
+#: elf32-frv.c:3653
 msgid ""
 "%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend\n"
 msgstr ""
 
-#: elf32-frv.c:3908
+#: elf32-frv.c:3910
+#, c-format
 msgid "%H: reloc against `%s' references a different segment\n"
 msgstr ""
 
-#: elf32-frv.c:4058
+#: elf32-frv.c:4061
+#, c-format
 msgid "%H: reloc against `%s': %s\n"
 msgstr ""
 
-#: elf32-frv.c:6265
+#: elf32-frv.c:6258
+#, c-format
 msgid "%B: unsupported relocation type %i\n"
 msgstr ""
 
-#: elf32-frv.c:6514
+#: elf32-frv.c:6510
 #, c-format
 msgid ""
 "%s: compiled with %s and linked with modules that use non-pic relocations"
 msgstr ""
 
-#: elf32-frv.c:6567 elf32-iq2000.c:828 elf32-m32c.c:812
+#: elf32-frv.c:6564 elf32-iq2000.c:832 elf32-m32c.c:877
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
 msgstr ""
 
-#: elf32-frv.c:6579
+#: elf32-frv.c:6577
 #, c-format
 msgid ""
 "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x"
 "%lx)"
 msgstr ""
 
-#: elf32-frv.c:6627 elf32-iq2000.c:865 elf32-m32c.c:848 elf32-mt.c:561
-#: elf32-rl78.c:1069 elf32-rx.c:3040 elf64-ppc.c:5839
-#, c-format
-msgid "private flags = 0x%lx:"
-msgstr ""
-
 #: elf32-gen.c:69 elf64-gen.c:69
+#, c-format
 msgid "%B: Relocations in generic ELF (EM: %d)"
 msgstr ""
 
-#: elf32-hppa.c:830 elf32-hppa.c:3592
+#: elf32-hppa.c:843 elf32-hppa.c:3606
+#, c-format
 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr ""
 
-#: elf32-hppa.c:1268
+#: elf32-hppa.c:1276
+#, c-format
 msgid ""
 "%B: relocation %s can not be used when making a shared object; recompile "
 "with -fPIC"
 msgstr ""
 
-#: elf32-hppa.c:2781
+#: elf32-hppa.c:2785
+#, c-format
 msgid "%B: duplicate export stub %s"
 msgstr ""
 
-#: elf32-hppa.c:3427
+#: elf32-hppa.c:3440
+#, c-format
 msgid ""
 "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
 msgstr ""
 
-#: elf32-hppa.c:4279
+#: elf32-hppa.c:4297
+#, c-format
 msgid "%B(%A+0x%lx): cannot handle %s for %s"
 msgstr ""
 
-#: elf32-hppa.c:4598
+#: elf32-hppa.c:4593
 msgid ".got section not immediately after .plt section"
 msgstr ""
 
+#: elf32-i370.c:307
+#, c-format
+msgid "%B: unrecognised I370 reloc number: %d"
+msgstr ""
+
+#: elf32-i370.c:359 elf32-m68hc1x.c:1388 elf32-ppc.c:4883 elf64-sparc.c:711
+#: elfxx-mips.c:15249
+#, c-format
+msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-i370.c:1168
+msgid "%B: unknown relocation type %d for symbol %s"
+msgstr ""
+
+#: elf32-i370.c:1310
+#, c-format
+msgid "%B: Relocation %s is not yet supported for symbol %s."
+msgstr ""
+
 #. Unknown relocation.
-#: elf32-i386.c:380 elf32-m68k.c:353 elf32-ppc.c:2035 elf32-s390.c:345
-#: elf32-tic6x.c:2667 elf64-ppc.c:2427 elf64-s390.c:371 elf64-x86-64.c:281
+#: elf32-i386.c:387 elf32-m68k.c:352 elf32-ppc.c:2058 elf32-s390.c:346
+#: elf32-tic6x.c:2672 elf64-ppc.c:2497 elf64-s390.c:372 elf64-x86-64.c:289
+#, c-format
 msgid "%B: invalid relocation type %d"
 msgstr ""
 
-#: elf32-i386.c:1394 elf64-x86-64.c:1410
+#: elf32-i386.c:1561 elf64-x86-64.c:1659
+#, c-format
 msgid ""
 "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed"
 msgstr ""
 
-#: elf32-i386.c:1642 elf32-s390.c:1233 elf32-sh.c:6263 elf32-tilepro.c:1627
-#: elf32-xtensa.c:1176 elf64-s390.c:1166 elfxx-sparc.c:1596
-#: elfxx-tilegx.c:1836
+#: elf32-i386.c:1649
+#, c-format
+msgid ""
+"%B: direct GOT relocation R_386_GOT32X against `%s' without base register "
+"can not be used when making a shared object"
+msgstr ""
+
+#: elf32-i386.c:2107 elf32-s390.c:1216 elf32-sh.c:6055 elf32-tilepro.c:1628
+#: elf32-xtensa.c:1182 elf64-s390.c:1145 elfxx-sparc.c:1596
+#: elfxx-tilegx.c:1837
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:444
+#, c-format
 msgid "%B: `%s' accessed both as normal and thread local symbol"
 msgstr ""
 
-#: elf32-i386.c:2500 elf64-x86-64.c:2582
-msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"
+#: elf32-i386.c:2196
+#, c-format
+msgid "%B: unsupported non-PIC call to IFUNC `%s'"
 msgstr ""
 
-#: elf32-i386.c:2740 elf64-x86-64.c:2820
-msgid "%P: %B: warning: relocation in readonly section `%A'.\n"
+#: elf32-i386.c:3071 elf64-x86-64.c:3468
+#, c-format
+msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'\n"
 msgstr ""
 
-#: elf32-i386.c:3207 elf32-tilepro.c:2873 elf64-x86-64.c:3275
-#: elfxx-tilegx.c:3172 /src/binutils-gdb/bfd/elfnn-aarch64.c:4099
+#: elf32-i386.c:3283 elf64-x86-64.c:3677
+#, c-format
+msgid "%P: %B: warning: relocation in readonly section `%A'\n"
+msgstr ""
+
+#: elf32-i386.c:3542 elf64-x86-64.c:3957
+msgid ""
+"%P%X: read-only segment has dynamic IFUNC relocations; recompile with -fPIC\n"
+msgstr ""
+
+#: elf32-i386.c:3780 elf32-tilepro.c:2877 elf64-x86-64.c:4162
+#: elfxx-tilegx.c:3176
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6068
+#, c-format
 msgid "%B: unrecognized relocation (0x%x) in section `%A'"
 msgstr ""
 
-#: elf32-i386.c:3368 elf64-x86-64.c:3380 elfxx-sparc.c:3150
-#: /src/binutils-gdb/bfd/elfnn-aarch64.c:3496
-msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+#: elf32-i386.c:4060 elf64-x86-64.c:4390
+#, c-format
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't supported"
 msgstr ""
 
-#: elf32-i386.c:3610 elf64-x86-64.c:3777
+#: elf32-i386.c:4308
+#, c-format
+msgid ""
+"%B: direct GOT relocation %s against `%s' without base register can not be "
+"used when making a shared object"
+msgstr ""
+
+#: elf32-i386.c:4341 elf64-x86-64.c:4637
 msgid "hidden symbol"
 msgstr ""
 
-#: elf32-i386.c:3613 elf64-x86-64.c:3780
+#: elf32-i386.c:4344 elf64-x86-64.c:4640
 msgid "internal symbol"
 msgstr ""
 
-#: elf32-i386.c:3616 elf64-x86-64.c:3783
+#: elf32-i386.c:4347 elf64-x86-64.c:4643
 msgid "protected symbol"
 msgstr ""
 
-#: elf32-i386.c:3619 elf64-x86-64.c:3786
+#: elf32-i386.c:4350 elf64-x86-64.c:4646
 msgid "symbol"
 msgstr ""
 
-#: elf32-i386.c:3624
+#: elf32-i386.c:4356
+#, c-format
 msgid ""
 "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when "
 "making a shared object"
 msgstr ""
 
-#: elf32-i386.c:3635
+#: elf32-i386.c:4368
+#, c-format
 msgid ""
-"%B: relocation R_386_GOTOFF against protected function `%s' can not be used "
-"when making a shared object"
+"%B: relocation R_386_GOTOFF against protected %s `%s' can not be used when "
+"making a shared object"
 msgstr ""
 
-#: elf32-i386.c:4923 elf32-tilepro.c:3923 elf64-x86-64.c:4964
-#: elfxx-tilegx.c:4326 /src/binutils-gdb/bfd/elfnn-aarch64.c:7105
+#: elf32-i386.c:5849 elf32-tilepro.c:3928 elf64-x86-64.c:6309
+#: elfxx-tilegx.c:4333
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:9174
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2506
 #, c-format
 msgid "discarded output section: `%A'"
 msgstr ""
 
-#: elf32-ip2k.c:857 elf32-ip2k.c:863 elf32-ip2k.c:930 elf32-ip2k.c:936
+#: elf32-i960.c:140
+#, c-format
+msgid "%B: invalid i960 reloc number: %d"
+msgstr ""
+
+#: elf32-ip2k.c:856 elf32-ip2k.c:862 elf32-ip2k.c:929 elf32-ip2k.c:935
 msgid ""
 "ip2k relaxer: switch table without complete matching relocation information."
 msgstr ""
 
-#: elf32-ip2k.c:880 elf32-ip2k.c:963
+#: elf32-ip2k.c:879 elf32-ip2k.c:962
 msgid "ip2k relaxer: switch table header corrupt."
 msgstr ""
 
-#: elf32-ip2k.c:1292
+#: elf32-ip2k.c:1245
+#, c-format
+msgid "%B: invalid IP2K reloc number: %d"
+msgstr ""
+
+#: elf32-ip2k.c:1298
 #, c-format
 msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
 msgstr ""
 
-#: elf32-ip2k.c:1308
+#: elf32-ip2k.c:1315
 #, c-format
 msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
 msgstr ""
 
-#: elf32-iq2000.c:841 elf32-m32c.c:824
+#: elf32-iq2000.c:441
 #, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgid "%B: invalid IQ2000 reloc number: %d"
 msgstr ""
 
-#: elf32-lm32.c:698 elf32-nios2.c:2191
+#: elf32-lm32.c:559
+#, c-format
+msgid "%B: invalid LM32 reloc number: %d"
+msgstr ""
+
+#: elf32-lm32.c:668 elf32-nios2.c:3155
 msgid "global pointer relative relocation when _gp not defined"
 msgstr ""
 
-#: elf32-lm32.c:753 elf32-nios2.c:2623
+#: elf32-lm32.c:723 elf32-nios2.c:3592
 msgid "global pointer relative address out of range"
 msgstr ""
 
-#: elf32-lm32.c:1049
+#: elf32-lm32.c:1018
 msgid "internal error: addend should be zero for R_LM32_16_GOT"
 msgstr ""
 
-#: elf32-m32r.c:1453
+#: elf32-m32c.c:305
+#, c-format
+msgid "%B: invalid M32C reloc number: %d"
+msgstr ""
+
+#: elf32-m32r.c:1286
+#, c-format
+msgid "%B: invalid M32R reloc number: %d"
+msgstr ""
+
+#: elf32-m32r.c:1458
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr ""
 
-#: elf32-m32r.c:3003
+#: elf32-m32r.c:2984
+#, c-format
 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
 msgstr ""
 
-#: elf32-m32r.c:3529
+#: elf32-m32r.c:3486
 msgid "%B: Instruction set mismatch with previous modules"
 msgstr ""
 
-#: elf32-m32r.c:3550 elf32-nds32.c:5636
+#: elf32-m32r.c:3507 elf32-nds32.c:6111
 #, c-format
 msgid "private flags = %lx"
 msgstr ""
 
-#: elf32-m32r.c:3555
+#: elf32-m32r.c:3512
 #, c-format
 msgid ": m32r instructions"
 msgstr ""
 
-#: elf32-m32r.c:3556
+#: elf32-m32r.c:3513
 #, c-format
 msgid ": m32rx instructions"
 msgstr ""
 
-#: elf32-m32r.c:3557
+#: elf32-m32r.c:3514
 #, c-format
 msgid ": m32r2 instructions"
 msgstr ""
 
-#: elf32-m68hc1x.c:1114
+#: elf32-m68hc11.c:390
+#, c-format
+msgid "%B: invalid M68HC11 reloc number: %d"
+msgstr ""
+
+#: elf32-m68hc12.c:510
+#, c-format
+msgid "%B: invalid M68HC12 reloc number: %d"
+msgstr ""
+
+#: elf32-m68hc1x.c:1119
 #, c-format
 msgid ""
 "Reference to the far symbol `%s' using a wrong relocation may result in "
 "incorrect execution"
 msgstr ""
 
-#: elf32-m68hc1x.c:1150
+#: elf32-m68hc1x.c:1153
 #, c-format
 msgid ""
 "XGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you "
 "must manually offset the address, and possibly manage the page, in your code."
 msgstr ""
 
-#: elf32-m68hc1x.c:1170
+#: elf32-m68hc1x.c:1171
 #, c-format
 msgid ""
 "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked "
 "address [%lx:%04lx] (%lx)"
 msgstr ""
 
-#: elf32-m68hc1x.c:1190
+#: elf32-m68hc1x.c:1187
 #, c-format
 msgid ""
 "reference to a banked address [%lx:%04lx] in the normal address space at "
 "%04lx"
 msgstr ""
 
-#: elf32-m68hc1x.c:1237
+#: elf32-m68hc1x.c:1228
 #, c-format
 msgid ""
 "S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you "
 "must manually offset the address in your code"
 msgstr ""
 
-#: elf32-m68hc1x.c:1370
+#: elf32-m68hc1x.c:1355
 msgid ""
 "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-"
 "bit integers"
 msgstr ""
 
-#: elf32-m68hc1x.c:1377
+#: elf32-m68hc1x.c:1362
 msgid ""
 "%B: linking files compiled for 32-bit double (-fshort-double) and others for "
 "64-bit double"
 msgstr ""
 
-#: elf32-m68hc1x.c:1386
+#: elf32-m68hc1x.c:1371
 msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
 msgstr ""
 
-#: elf32-m68hc1x.c:1402 elf32-ppc.c:4776 elf64-sparc.c:706 elfxx-mips.c:14817
-msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr ""
-
-#: elf32-m68hc1x.c:1430 elf32-xgate.c:677
+#: elf32-m68hc1x.c:1416 elf32-xgate.c:672
 #, c-format
 msgid "[abi=32-bit int, "
 msgstr ""
 
-#: elf32-m68hc1x.c:1432 elf32-xgate.c:679
+#: elf32-m68hc1x.c:1418 elf32-xgate.c:674
 #, c-format
 msgid "[abi=16-bit int, "
 msgstr ""
 
-#: elf32-m68hc1x.c:1435 elf32-xgate.c:682
+#: elf32-m68hc1x.c:1421 elf32-xgate.c:677
 #, c-format
 msgid "64-bit double, "
 msgstr ""
 
-#: elf32-m68hc1x.c:1437 elf32-xgate.c:684
+#: elf32-m68hc1x.c:1423 elf32-xgate.c:679
 #, c-format
 msgid "32-bit double, "
 msgstr ""
 
-#: elf32-m68hc1x.c:1440
+#: elf32-m68hc1x.c:1426
 #, c-format
 msgid "cpu=HC11]"
 msgstr ""
 
-#: elf32-m68hc1x.c:1442
+#: elf32-m68hc1x.c:1428
 #, c-format
 msgid "cpu=HCS12]"
 msgstr ""
 
-#: elf32-m68hc1x.c:1444
+#: elf32-m68hc1x.c:1430
 #, c-format
 msgid "cpu=HC12]"
 msgstr ""
 
-#: elf32-m68hc1x.c:1447
+#: elf32-m68hc1x.c:1433
 #, c-format
 msgid " [memory=bank-model]"
 msgstr ""
 
-#: elf32-m68hc1x.c:1449
+#: elf32-m68hc1x.c:1435
 #, c-format
 msgid " [memory=flat]"
 msgstr ""
 
-#: elf32-m68hc1x.c:1452
+#: elf32-m68hc1x.c:1438
 #, c-format
 msgid " [XGATE RAM offsetting]"
 msgstr ""
 
-#: elf32-m68k.c:1210 elf32-m68k.c:1211 vms-alpha.c:7207 vms-alpha.c:7222
+#: elf32-m68k.c:1215 elf32-m68k.c:1216 vms-alpha.c:7256 vms-alpha.c:7272
 msgid "unknown"
 msgstr ""
 
-#: elf32-m68k.c:1674
+#: elf32-m68k.c:1680
+#, c-format
 msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d"
 msgstr ""
 
-#: elf32-m68k.c:1680
+#: elf32-m68k.c:1687
+#, c-format
 msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d"
 msgstr ""
 
-#: elf32-m68k.c:3921
+#: elf32-m68k.c:3890
+#, c-format
 msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object"
 msgstr ""
 
-#: elf32-mcore.c:99 elf32-mcore.c:442
+#: elf32-mcore.c:100 elf32-mcore.c:455
+#, c-format
 msgid "%B: Relocation %s (%d) is not currently supported.\n"
 msgstr ""
 
-#: elf32-mcore.c:428
+#: elf32-mcore.c:355
+#, c-format
+msgid "%B: unrecognised MCore reloc number: %d"
+msgstr ""
+
+#: elf32-mcore.c:440
+#, c-format
 msgid "%B: Unknown relocation type %d\n"
 msgstr ""
 
 #. Pacify gcc -Wall.
-#: elf32-mep.c:157
+#: elf32-mep.c:139
 #, c-format
 msgid "mep: no reloc for code %d"
 msgstr ""
 
-#: elf32-mep.c:163
+#: elf32-mep.c:146
 #, c-format
 msgid "MeP: howto %d has type %d"
 msgstr ""
 
-#: elf32-mep.c:632
+#: elf32-mep.c:390
+#, c-format
+msgid "%B: invalid MEP reloc number: %d"
+msgstr ""
+
+#: elf32-mep.c:620
+#, c-format
 msgid "%B and %B are for different cores"
 msgstr ""
 
-#: elf32-mep.c:649
+#: elf32-mep.c:638
+#, c-format
 msgid "%B and %B are for different configurations"
 msgstr ""
 
-#: elf32-mep.c:686
+#: elf32-mep.c:675
 #, c-format
 msgid "private flags = 0x%lx"
 msgstr ""
 
-#: elf32-metag.c:1921
+#: elf32-metag.c:897
+#, c-format
+msgid "%B: invalid METAG reloc number: %d"
+msgstr ""
+
+#: elf32-metag.c:1879
+msgid "%B(%A): multiple TLS models are not supported"
+msgstr ""
+
+#: elf32-metag.c:1882
+msgid ""
+"%B(%A): shared library symbol %s encountered whilst performing a static link"
+msgstr ""
+
+#: elf32-metag.c:1935
+#, c-format
 msgid ""
 "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared "
 "object"
 msgstr ""
 
-#: elf32-microblaze.c:950
+#: elf32-microblaze.c:656
+#, c-format
+msgid "%B: unrecognised MicroBlaze reloc number: %d"
+msgstr ""
+
+#: elf32-microblaze.c:956
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr ""
 
-#: elf32-microblaze.c:1076 elf32-microblaze.c:1121
+#: elf32-microblaze.c:1084 elf32-microblaze.c:1132
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr ""
 
-#: elf32-microblaze.c:1484 elf32-tilepro.c:3320 elfxx-sparc.c:3526
-#: elfxx-tilegx.c:3729
+#: elf32-microblaze.c:1500 elf32-or1k.c:1076 elf32-tilepro.c:3326
+#: elfxx-sparc.c:3532 elfxx-tilegx.c:3735
 msgid "%B: probably compiled without -fPIC?"
 msgstr ""
 
-#: elf32-mips.c:1670 elf64-mips.c:2990 elfn32-mips.c:2793
+#: elf32-mips.c:1777 elf64-mips.c:3206 elfn32-mips.c:3010
 msgid "literal relocation occurs for an external symbol"
 msgstr ""
 
-#: elf32-mips.c:1717 elf32-score.c:570 elf32-score7.c:469 elf64-mips.c:3033
-#: elfn32-mips.c:2834
+#: elf32-mips.c:1824 elf32-score.c:569 elf32-score7.c:469 elf64-mips.c:3249
+#: elfn32-mips.c:3051
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr ""
 
-#: elf32-msp430.c:801 elf32-msp430.c:1109
+#: elf32-mips.c:2225
+#, c-format
+msgid "Unrecognised MIPS reloc number: %d"
+msgstr ""
+
+#: elf32-moxie.c:137
+#, c-format
+msgid "%B: invalid Moxie reloc number: %d"
+msgstr ""
+
+#: elf32-msp430.c:648
+#, c-format
+msgid "%B: invalid MSP430X reloc number: %d"
+msgstr ""
+
+#: elf32-msp430.c:658
+#, c-format
+msgid "%B: invalid MSP430 reloc number: %d"
+msgstr ""
+
+#: elf32-msp430.c:836 elf32-msp430.c:1150
 msgid "Try enabling relaxation to avoid relocation truncations"
 msgstr ""
 
-#: elf32-msp430.c:1317
+#: elf32-msp430.c:1357
 msgid "internal error: branch/jump to an odd address detected"
 msgstr ""
 
-#: elf32-msp430.c:2221
+#: elf32-msp430.c:2354
+#, c-format
 msgid "Warning: %B: Unknown MSPABI object attribute %d"
 msgstr ""
 
-#: elf32-msp430.c:2312
+#: elf32-msp430.c:2447
+#, c-format
 msgid "error: %B uses %s instructions but %B uses %s"
 msgstr ""
 
-#: elf32-msp430.c:2324
+#: elf32-msp430.c:2460
+#, c-format
 msgid "error: %B uses the %s code model whereas %B uses the %s code model"
 msgstr ""
 
-#: elf32-msp430.c:2336
+#: elf32-msp430.c:2473
+#, c-format
 msgid "error: %B uses the large code model but %B uses MSP430 instructions"
 msgstr ""
 
-#: elf32-msp430.c:2346
+#: elf32-msp430.c:2484
+#, c-format
 msgid "error: %B uses the %s data model whereas %B uses the %s data model"
 msgstr ""
 
-#: elf32-msp430.c:2358
+#: elf32-msp430.c:2497
+#, c-format
 msgid "error: %B uses the small code model but %B uses the %s data model"
 msgstr ""
 
-#: elf32-msp430.c:2369
+#: elf32-msp430.c:2509
+#, c-format
 msgid "error: %B uses the %s data model but %B only uses MSP430 instructions"
 msgstr ""
 
-#: elf32-nds32.c:2921
+#: elf32-mt.c:242
+#, c-format
+msgid "%B: invalid MT reloc number: %d"
+msgstr ""
+
+#: elf32-nds32.c:2974
+#, c-format
+msgid "%B: invalid NDS32 reloc number: %d"
+msgstr ""
+
+#: elf32-nds32.c:3309
 msgid "error: Can't find symbol: _SDA_BASE_."
 msgstr ""
 
-#: elf32-nds32.c:4142
+#: elf32-nds32.c:4484 elf32-nds32.c:11978
+msgid "%B: error: Cannot set _ITB_BASE_"
+msgstr ""
+
+#: elf32-nds32.c:4492
+msgid "error: IFC relocation error."
+msgstr ""
+
+#: elf32-nds32.c:4526
+#, c-format
 msgid "%B: error: unknown relocation type %d."
 msgstr ""
 
-#: elf32-nds32.c:4584
+#: elf32-nds32.c:4972
 #, c-format
 msgid "%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode."
 msgstr ""
 
-#: elf32-nds32.c:4716
+#: elf32-nds32.c:5106
 msgid "%B: warning: unaligned access to GOT entry."
 msgstr ""
 
-#: elf32-nds32.c:4758
+#: elf32-nds32.c:5148
 msgid "%B: warning: relocate SDA_BASE failed."
 msgstr ""
 
-#: elf32-nds32.c:4779
+#: elf32-nds32.c:5170
+#, c-format
 msgid "%B(%A): warning: unaligned small data access of type %d."
 msgstr ""
 
-#: elf32-nds32.c:5446
+#: elf32-nds32.c:5918
+#, c-format
 msgid ""
 "%B: ISR vector size mismatch with previous modules, previous %u-byte, "
 "current %u-byte"
 msgstr ""
 
-#: elf32-nds32.c:5489
+#: elf32-nds32.c:5962
 msgid "%B: warning: Endian mismatch with previous modules."
 msgstr ""
 
-#: elf32-nds32.c:5499
+#: elf32-nds32.c:5972
 msgid ""
 "%B: warning: Older version of object file encountered, Please recompile with "
 "current tool chain."
 msgstr ""
 
-#: elf32-nds32.c:5577
+#: elf32-nds32.c:6050
 msgid "%B: error: ABI mismatch with previous modules."
 msgstr ""
 
-#: elf32-nds32.c:5588
+#: elf32-nds32.c:6061
 msgid "%B: error: Instruction set mismatch with previous modules."
 msgstr ""
 
-#: elf32-nds32.c:5612
+#: elf32-nds32.c:6087
+#, c-format
 msgid "%B: warning: Incompatible elf-versions %s and  %s."
 msgstr ""
 
-#: elf32-nds32.c:5642
+#: elf32-nds32.c:6117
 #, c-format
 msgid ": n1 instructions"
 msgstr ""
 
-#: elf32-nds32.c:5645
+#: elf32-nds32.c:6120
 #, c-format
 msgid ": n1h instructions"
 msgstr ""
 
-#: elf32-nds32.c:8147
-msgid "%B: %s\n"
+#: elf32-nds32.c:8730
+msgid "%B: Error: search_nds32_elf_blank reports wrong node\n"
 msgstr ""
 
-#: elf32-nds32.c:8449
-msgid ""
-"%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-"
-"byte."
+#: elf32-nds32.c:8989
+#, c-format
+msgid "%B: warning: %s points to unrecognized reloc at 0x%lx."
 msgstr ""
 
-#: elf32-nds32.c:8502
-msgid "%B: error: Cannot set _ITB_BASE_"
+#: elf32-nds32.c:11850 elf32-nds32.c:11867
+msgid "error: Jump IFC Fail."
 msgstr ""
 
-#: elf32-nds32.c:11384
+#: elf32-nds32.c:12724
+#, c-format
 msgid "%B: Nested OMIT_FP in %A."
 msgstr ""
 
-#: elf32-nds32.c:11401
+#: elf32-nds32.c:12743
+#, c-format
 msgid "%B: Unmatched OMIT_FP in %A."
 msgstr ""
 
-#: elf32-nds32.c:13357
+#: elf32-nds32.c:13026 reloc.c:8142
+#, c-format
+msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+msgstr ""
+
+#: elf32-nds32.c:14802
 msgid "Linker: cannot init ex9 hash table error \n"
 msgstr ""
 
-#: elf32-nds32.c:13790 elf32-nds32.c:13804
+#: elf32-nds32.c:15211 elf32-nds32.c:15225
 msgid "Linker: error cannot fixed ex9 relocation \n"
 msgstr ""
 
-#: elf32-nds32.c:14015
+#: elf32-nds32.c:15436
 #, c-format
 msgid ""
 "%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x"
 "%x, align = 0x%x."
 msgstr ""
 
-#: elf32-nds32.c:14047
+#: elf32-nds32.c:15469
 msgid "%P%F: failed creating ex9.it %s hash table: %E\n"
 msgstr ""
 
-#: elf32-nios2.c:2861
+#: elf32-nios2.c:2951
+msgid "error: %B: Big-endian R2 is not supported."
+msgstr ""
+
+#: elf32-nios2.c:3832
 #, c-format
 msgid ""
 "global pointer relative relocation at address 0x%08x when _gp not defined\n"
 msgstr ""
 
-#: elf32-nios2.c:2878
+#: elf32-nios2.c:3852
 #, c-format
 msgid ""
 "Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because "
 "the offset (%d) is out of the allowed range, -32678 to 32767.\n"
 msgstr ""
 
-#: elf32-nios2.c:3392
+#: elf32-nios2.c:4374
+#, c-format
 msgid ""
 "%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object"
 msgstr ""
 
-#: elf32-nios2.c:3520
+#: elf32-nios2.c:4502
 msgid "relocation out of range"
 msgstr ""
 
-#: elf32-nios2.c:3530 elf32-tic6x.c:2744
+#: elf32-nios2.c:4512 elf32-tic6x.c:2745
 msgid "dangerous relocation"
 msgstr ""
 
-#: elf32-nios2.c:4529
+#: elf32-nios2.c:5526
 #, c-format
 msgid "dynamic variable `%s' is zero size"
 msgstr ""
 
-#: elf32-ppc.c:2100
+#: elf32-or1k.c:739
+#, c-format
+msgid "%B: invalid OR1K reloc number: %d"
+msgstr ""
+
+#: elf32-or1k.c:989
+msgid "internal error: addend should be zero for R_OR1K_GOT16"
+msgstr ""
+
+#: elf32-or1k.c:1098
+msgid "%B: support for local dynamic not implemented"
+msgstr ""
+
+#: elf32-or1k.c:1233
+msgid "%B: will not resolve runtime TLS relocation"
+msgstr ""
+
+#: elf32-or1k.c:1603
+#, c-format
+msgid "%B: bad relocation section name `%s'"
+msgstr ""
+
+#: elf32-or1k.c:2733
+msgid "%B: EF_OR1K_NODELAY flag mismatch with previous modules"
+msgstr ""
+
+#: elf32-pj.c:325
+#, c-format
+msgid "%B: unrecognised PicoJava reloc number: %d"
+msgstr ""
+
+#: elf32-ppc.c:2046
+#, c-format
+msgid "%B: unrecognised PPC reloc number: %d"
+msgstr ""
+
+#: elf32-ppc.c:2131
 #, c-format
 msgid "generic linker can't handle %s"
 msgstr ""
 
-#: elf32-ppc.c:2642
+#: elf32-ppc.c:2765
+#, c-format
 msgid "corrupt %s section in %B"
 msgstr ""
 
-#: elf32-ppc.c:2661
+#: elf32-ppc.c:2785
+#, c-format
 msgid "unable to read in %s section from %B"
 msgstr ""
 
-#: elf32-ppc.c:2702
+#: elf32-ppc.c:2827
+#, c-format
 msgid "warning: unable to set size of %s section in %B"
 msgstr ""
 
-#: elf32-ppc.c:2752
+#: elf32-ppc.c:2877
 msgid "failed to allocate space for new APUinfo section."
 msgstr ""
 
-#: elf32-ppc.c:2771
+#: elf32-ppc.c:2896
 msgid "failed to compute new APUinfo section."
 msgstr ""
 
-#: elf32-ppc.c:2774
+#: elf32-ppc.c:2899
 msgid "failed to install new APUinfo section."
 msgstr ""
 
-#: elf32-ppc.c:3844
+#: elf32-ppc.c:3950
+#, c-format
 msgid "%B: relocation %s cannot be used when making a shared object"
 msgstr ""
 
-#. It does not make sense to have a procedure linkage
-#. table entry for a local symbol.
-#: elf32-ppc.c:4218
+#: elf32-ppc.c:4304 elf64-ppc.c:5585
+#, c-format
 msgid "%P: %H: %s reloc against local symbol\n"
 msgstr ""
 
-#: elf32-ppc.c:4299
-msgid "%P: %H: @local call to ifunc %s\n"
-msgstr ""
-
-#: elf32-ppc.c:4588 elf32-ppc.c:4603
+#: elf32-ppc.c:4665 elf32-ppc.c:4669
+#, c-format
 msgid "Warning: %B uses hard float, %B uses soft float"
 msgstr ""
 
-#: elf32-ppc.c:4591 elf32-ppc.c:4595
+#: elf32-ppc.c:4673 elf32-ppc.c:4678
+#, c-format
 msgid ""
 "Warning: %B uses double-precision hard float, %B uses single-precision hard "
 "float"
 msgstr ""
 
-#: elf32-ppc.c:4599
-msgid "Warning: %B uses soft float, %B uses single-precision hard float"
-msgstr ""
-
-#: elf32-ppc.c:4606 elf32-ppc.c:4610
-msgid "Warning: %B uses unknown floating point ABI %d"
+#: elf32-ppc.c:4693 elf32-ppc.c:4698
+#, c-format
+msgid "Warning: %B uses 64-bit long double, %B uses 128-bit long double"
 msgstr ""
 
-#: elf32-ppc.c:4652 elf32-ppc.c:4656
-msgid "Warning: %B uses unknown vector ABI %d"
+#: elf32-ppc.c:4703 elf32-ppc.c:4708
+#, c-format
+msgid "Warning: %B uses IBM long double, %B uses IEEE long double"
 msgstr ""
 
-#: elf32-ppc.c:4660
-msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\""
+#: elf32-ppc.c:4759 elf32-ppc.c:4764
+#, c-format
+msgid "Warning: %B uses AltiVec vector ABI, %B uses SPE vector ABI"
 msgstr ""
 
-#: elf32-ppc.c:4677 elf32-ppc.c:4680
+#: elf32-ppc.c:4787 elf32-ppc.c:4792
+#, c-format
 msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory"
 msgstr ""
 
-#: elf32-ppc.c:4683 elf32-ppc.c:4687
-msgid "Warning: %B uses unknown small structure return convention %d"
-msgstr ""
-
-#: elf32-ppc.c:4741
+#: elf32-ppc.c:4847
 msgid ""
 "%B: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr ""
 
-#: elf32-ppc.c:4749
+#: elf32-ppc.c:4855
 msgid ""
 "%B: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr ""
 
-#: elf32-ppc.c:4872
+#: elf32-ppc.c:4924
+#, c-format
+msgid "%B(%A+0x%lx): expected 16A style relocation on 0x%08x insn"
+msgstr ""
+
+#: elf32-ppc.c:4943
+#, c-format
+msgid "%B(%A+0x%lx): expected 16D style relocation on 0x%08x insn"
+msgstr ""
+
+#: elf32-ppc.c:5018
 msgid "%P: bss-plt forced due to %B\n"
 msgstr ""
 
-#: elf32-ppc.c:4875
+#: elf32-ppc.c:5021
 msgid "%P: bss-plt forced by profiling\n"
 msgstr ""
 
@@ -2275,96 +3147,154 @@ msgstr ""
 #. could just mark this symbol to exclude it
 #. from tls optimization but it's safer to skip
 #. the entire optimization.
-#: elf32-ppc.c:5369 elf64-ppc.c:8371
+#: elf32-ppc.c:5520 elf64-ppc.c:8746
+#, c-format
 msgid "%H arg lost __tls_get_addr, TLS optimization disabled\n"
 msgstr ""
 
-#: elf32-ppc.c:7927
+#: elf32-ppc.c:8248
+msgid "%P: %H: fixup branch overflow\n"
+msgstr ""
+
+#: elf32-ppc.c:8288 elf32-ppc.c:8323
+#, c-format
+msgid "%P: %H: error: %s with unexpected instruction %x\n"
+msgstr ""
+
+#: elf32-ppc.c:8379
+#, c-format
+msgid "%X%P: %H: unsupported bss-plt -fPIC ifunc %s\n"
+msgstr ""
+
+#: elf32-ppc.c:8432
+#, c-format
 msgid "%P: %B: unknown relocation type %d for symbol %s\n"
 msgstr ""
 
-#: elf32-ppc.c:8191
+#: elf32-ppc.c:8711
+#, c-format
 msgid "%P: %H: non-zero addend on %s reloc against `%s'\n"
 msgstr ""
 
-#: elf32-ppc.c:8389
+#. @local on an ifunc does not really make sense since
+#. the ifunc resolver can take you anywhere.  More
+#. seriously, calls to ifuncs must go through a plt call
+#. stub, and for pic the plt call stubs uses r30 to
+#. access the PLT.  The problem is that a call that is
+#. local won't have the +32k reloc addend trick marking
+#. -fPIC code, so the linker won't know whether r30 is
+#. _GLOBAL_OFFSET_TABLE_ or pointing into a .got2 section.
+#: elf32-ppc.c:8743
+#, c-format
+msgid "%X%P: %H: @local call to ifunc %s\n"
+msgstr ""
+
+#: elf32-ppc.c:8933
+#, c-format
 msgid "%P: %H: relocation %s for indirect function %s unsupported\n"
 msgstr ""
 
-#: elf32-ppc.c:8646 elf32-ppc.c:8676 elf32-ppc.c:8767
+#: elf32-ppc.c:9192 elf32-ppc.c:9223 elf32-ppc.c:9314
+#, c-format
 msgid ""
 "%P: %B: the target (%s) of a %s relocation is in the wrong output section "
 "(%s)\n"
 msgstr ""
 
-#: elf32-ppc.c:8854
+#: elf32-ppc.c:9409
+#, c-format
 msgid ""
 "%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr ""
 
-#: elf32-ppc.c:8958
+#: elf32-ppc.c:9519
+#, c-format
 msgid "%P: %B: relocation %s is not yet supported for symbol %s\n"
 msgstr ""
 
-#: elf32-ppc.c:9038
+#: elf32-ppc.c:9604
+#, c-format
 msgid "%P: %H: error: %s against `%s' not a multiple of %u\n"
 msgstr ""
 
-#: elf32-ppc.c:9067
+#: elf32-ppc.c:9633
+#, c-format
 msgid "%P: %H: unresolvable %s relocation against symbol `%s'\n"
 msgstr ""
 
-#: elf32-ppc.c:9114
+#: elf32-ppc.c:9714
+#, c-format
 msgid "%P: %H: %s reloc against `%s': error %d\n"
 msgstr ""
 
-#: elf32-ppc.c:9750
+#: elf32-ppc.c:10511
+#, c-format
 msgid "%P: %s not defined in linker created %s\n"
 msgstr ""
 
-#: elf32-rl78.c:784
+#: elf32-rl78.c:291
+#, c-format
+msgid "%B: invalid RL78 reloc number: %d"
+msgstr ""
+
+#: elf32-rl78.c:369
+msgid "Internal Error: RL78 reloc stack overflow"
+msgstr ""
+
+#: elf32-rl78.c:380
+msgid "Internal Error: RL78 reloc stack underflow"
+msgstr ""
+
+#: elf32-rl78.c:1049
 msgid "Warning: RL78_SYM reloc with an unknown symbol"
 msgstr ""
 
-#: elf32-rl78.c:952 elf32-rx.c:1324
+#: elf32-rl78.c:1080 elf32-rx.c:1434
+#, c-format
 msgid "%B(%A): error: call to undefined function '%s'"
 msgstr ""
 
-#: elf32-rl78.c:966 elf32-rx.c:1338
-msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
+#: elf32-rl78.c:1201
+#, c-format
+msgid "RL78 ABI conflict: G10 file %s cannot be linked with %s file %s"
 msgstr ""
 
-#: elf32-rl78.c:970 elf32-rx.c:1342
-msgid "%B(%A): internal error: out of range error"
+#: elf32-rl78.c:1218
+#, c-format
+msgid "RL78 ABI conflict: cannot link %s file %s with %s file %s"
 msgstr ""
 
-#: elf32-rl78.c:974 elf32-rx.c:1346
-msgid "%B(%A): internal error: unsupported relocation error"
+#: elf32-rl78.c:1227
+msgid "RL78 merge conflict: cannot link 32-bit and 64-bit objects together"
 msgstr ""
 
-#: elf32-rl78.c:978 elf32-rx.c:1350
-msgid "%B(%A): internal error: dangerous relocation"
+#: elf32-rl78.c:1231 elf32-rl78.c:1235
+#, c-format
+msgid "- %s is 64-bit, %s is not"
 msgstr ""
 
-#: elf32-rl78.c:982 elf32-rx.c:1354
-msgid "%B(%A): internal error: unknown error"
+#: elf32-rl78.c:1262
+#, c-format
+msgid " [64-bit doubles]"
 msgstr ""
 
-#: elf32-rl78.c:1043
-msgid "RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"
+#: elf32-rx.c:313
+#, c-format
+msgid "%B: invalid RX reloc number: %d"
 msgstr ""
 
-#: elf32-rl78.c:1046 elf32-rl78.c:1049
+#: elf32-rx.c:594
 #, c-format
-msgid "- %s is G10, %s is not"
+msgid "%B:%A: table entry %s outside table"
 msgstr ""
 
-#: elf32-rl78.c:1072
+#: elf32-rx.c:601
 #, c-format
-msgid " [G10]"
+msgid "%B:%A: table entry %s not word-aligned within table"
 msgstr ""
 
-#: elf32-rx.c:563
+#: elf32-rx.c:667
+#, c-format
 msgid "%B:%A: Warning: deprecated Red Hat reloc "
 msgstr ""
 
@@ -2372,331 +3302,380 @@ msgstr ""
 #. an absolute address is being computed.  There are special cases
 #. for relocs against symbols that are known to be referenced in
 #. crt0.o before the PID base address register has been initialised.
-#: elf32-rx.c:581
+#: elf32-rx.c:686
+#, c-format
 msgid "%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"
 msgstr ""
 
-#: elf32-rx.c:1157
+#: elf32-rx.c:1266
 msgid "Warning: RX_SYM reloc with an unknown symbol"
 msgstr ""
 
-#: elf32-s390.c:2292 elf64-s390.c:2244
+#: elf32-rx.c:3145
+#, c-format
+msgid "There is a conflict merging the ELF header flags from %s"
+msgstr ""
+
+#: elf32-rx.c:3147
+#, c-format
+msgid "  the input  file's flags: %s"
+msgstr ""
+
+#: elf32-rx.c:3149
+#, c-format
+msgid "  the output file's flags: %s"
+msgstr ""
+
+#: elf32-rx.c:3756
+#, c-format
+msgid "%B:%A: table %s missing corresponding %s"
+msgstr ""
+
+#: elf32-rx.c:3764
+#, c-format
+msgid "%B:%A: %s and %s must be in the same input section"
+msgstr ""
+
+#: elf32-s390.c:2329 elf64-s390.c:2276
+#, c-format
 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
 msgstr ""
 
-#: elf32-score.c:1520 elf32-score7.c:1379 elfxx-mips.c:3642
+#: elf32-score.c:1521 elf32-score7.c:1382 elfxx-mips.c:3752
 msgid "not enough GOT space for local GOT entries"
 msgstr ""
 
-#: elf32-score.c:2742
+#: elf32-score.c:2746
 msgid "address not word align"
 msgstr ""
 
-#: elf32-score.c:2827 elf32-score7.c:2631
+#: elf32-score.c:2832 elf32-score7.c:2641
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr ""
 
-#: elf32-score.c:2882 elf32-score7.c:2686
+#: elf32-score.c:2890 elf32-score7.c:2699
+#, c-format
 msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
 msgstr ""
 
-#: elf32-score.c:4007 elf32-score7.c:3811
+#: elf32-score.c:4012 elf32-score7.c:3821
 #, c-format
 msgid " [pic]"
 msgstr ""
 
-#: elf32-score.c:4011 elf32-score7.c:3815
+#: elf32-score.c:4016 elf32-score7.c:3825
 #, c-format
 msgid " [fix dep]"
 msgstr ""
 
-#: elf32-score.c:4053 elf32-score7.c:3857
+#: elf32-score.c:4059 elf32-score7.c:3868
 msgid "%B: warning: linking PIC files with non-PIC files"
 msgstr ""
 
 #: elf32-sh-symbian.c:130
+#, c-format
 msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
 msgstr ""
 
-#: elf32-sh-symbian.c:383
+#: elf32-sh-symbian.c:384
+#, c-format
 msgid "%B: Unrecognised .directive command: %s"
 msgstr ""
 
-#: elf32-sh-symbian.c:500
+#: elf32-sh-symbian.c:502
+#, c-format
 msgid "%B: Failed to add renamed symbol %s"
 msgstr ""
 
-#: elf32-sh.c:569
-msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
-msgstr ""
-
-#: elf32-sh.c:581
-msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
-msgstr ""
-
-#: elf32-sh.c:598
-msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
-msgstr ""
-
-#: elf32-sh.c:613
-msgid "%B: 0x%lx: warning: could not find expected reloc"
-msgstr ""
-
-#: elf32-sh.c:641
-msgid "%B: 0x%lx: warning: symbol in unexpected section"
-msgstr ""
-
-#: elf32-sh.c:767
-msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
-msgstr ""
-
-#: elf32-sh.c:776
-msgid "%B: 0x%lx: warning: bad count"
-msgstr ""
-
-#: elf32-sh.c:1180 elf32-sh.c:1550
-msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
+#: elf32-sh.c:491
+#, c-format
+msgid "%B: unrecognised SH reloc number: %d"
 msgstr ""
 
-#: elf32-sh.c:3939 elf64-sh64.c:1514
+#: elf32-sh.c:3953 elf64-sh64.c:1508
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr ""
 
-#: elf32-sh.c:4190
+#: elf32-sh.c:4206
+#, c-format
 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr ""
 
-#: elf32-sh.c:4223 elf32-sh.c:4238
+#: elf32-sh.c:4240 elf32-sh.c:4256
+#, c-format
 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
 msgstr ""
 
-#: elf32-sh.c:4252
+#: elf32-sh.c:4271
+#, c-format
 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
 msgstr ""
 
-#: elf32-sh.c:4266
+#: elf32-sh.c:4286
+#, c-format
 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
 msgstr ""
 
-#: elf32-sh.c:4410 elf32-sh.c:4886
+#: elf32-sh.c:4431 elf32-sh.c:4903
+#, c-format
 msgid "%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"
 msgstr ""
 
-#: elf32-sh.c:4993
+#: elf32-sh.c:5005
+#, c-format
 msgid "%B(%A+0x%lx): %s relocation against external symbol \"%s\""
 msgstr ""
 
-#: elf32-sh.c:5466
+#: elf32-sh.c:5469
 #, c-format
 msgid "%X%C: relocation to \"%s\" references a different segment\n"
 msgstr ""
 
-#: elf32-sh.c:5472
+#: elf32-sh.c:5476
 #, c-format
 msgid "%C: warning: relocation to \"%s\" references a different segment\n"
 msgstr ""
 
-#: elf32-sh.c:6254 elf32-sh.c:6337
+#: elf32-sh.c:6044 elf32-sh.c:6130
+#, c-format
 msgid "%B: `%s' accessed both as normal and FDPIC symbol"
 msgstr ""
 
-#: elf32-sh.c:6259 elf32-sh.c:6341
+#: elf32-sh.c:6050 elf32-sh.c:6135
+#, c-format
 msgid "%B: `%s' accessed both as FDPIC and thread local symbol"
 msgstr ""
 
-#: elf32-sh.c:6289
+#: elf32-sh.c:6081
 msgid "%B: Function descriptor relocation with non-zero addend"
 msgstr ""
 
-#: elf32-sh.c:6525 elf64-alpha.c:4661
+#: elf32-sh.c:6319 elf64-alpha.c:4749
+#, c-format
 msgid "%B: TLS local exec code cannot be linked into shared objects"
 msgstr ""
 
-#: elf32-sh64.c:224 elf64-sh64.c:2318
+#: elf32-sh.c:6434
+#, c-format
+msgid "%B: uses %s instructions while previous modules use %s instructions"
+msgstr ""
+
+#: elf32-sh.c:6446
+#, c-format
+msgid ""
+"internal error: merge of architecture '%s' with architecture '%s' produced "
+"unknown architecture"
+msgstr ""
+
+#: elf32-sh.c:6483
+msgid ""
+"%B: uses instructions which are incompatible with instructions used in "
+"previous modules"
+msgstr ""
+
+#: elf32-sh.c:6496
+msgid "%B: attempt to mix FDPIC and non-FDPIC objects"
+msgstr ""
+
+#: elf32-sh64.c:225 elf64-sh64.c:2276
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr ""
 
-#: elf32-sh64.c:227 elf64-sh64.c:2321
+#: elf32-sh64.c:229 elf64-sh64.c:2280
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr ""
 
-#: elf32-sh64.c:229 elf64-sh64.c:2323
+#: elf32-sh64.c:232 elf64-sh64.c:2283
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr ""
 
-#: elf32-sh64.c:452 elf64-sh64.c:2839
+#: elf32-sh64.c:455 elf64-sh64.c:2777
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr ""
 
-#: elf32-sh64.c:529
+#: elf32-sh64.c:532
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr ""
 
-#: elf32-sh64.c:532
+#: elf32-sh64.c:535
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr ""
 
-#: elf32-sh64.c:550
+#: elf32-sh64.c:551
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr ""
 
-#: elf32-sh64.c:599
+#: elf32-sh64.c:601
+#, c-format
 msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
 msgstr ""
 
-#: elf32-sh64.c:675
+#: elf32-sh64.c:677
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr ""
 
-#: elf32-sh64.c:735
+#: elf32-sh64.c:737
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr ""
 
-#: elf32-sparc.c:90
+#: elf32-sparc.c:89
 msgid "%B: compiled for a 64 bit system and target is 32 bit"
 msgstr ""
 
-#: elf32-sparc.c:103
+#: elf32-sparc.c:102
 msgid "%B: linking little endian files with big endian files"
 msgstr ""
 
-#: elf32-spu.c:716
+#: elf32-spu.c:160
+#, c-format
+msgid "%B: unrecognised SPU reloc number: %d"
+msgstr ""
+
+#: elf32-spu.c:726
 msgid "%X%P: overlay section %A does not start on a cache line.\n"
 msgstr ""
 
-#: elf32-spu.c:724
+#: elf32-spu.c:734
 msgid "%X%P: overlay section %A is larger than a cache line.\n"
 msgstr ""
 
-#: elf32-spu.c:744
+#: elf32-spu.c:754
 msgid "%X%P: overlay section %A is not in cache area.\n"
 msgstr ""
 
-#: elf32-spu.c:784
+#: elf32-spu.c:795
+#, c-format
 msgid "%X%P: overlay sections %A and %A do not start at the same address.\n"
 msgstr ""
 
-#: elf32-spu.c:1008
+#: elf32-spu.c:1021
+#, c-format
 msgid "warning: call to non-function symbol %s defined in %B"
 msgstr ""
 
-#: elf32-spu.c:1358
+#: elf32-spu.c:1371
+#, c-format
 msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n"
 msgstr ""
 
-#: elf32-spu.c:1877
+#: elf32-spu.c:1903
+#, c-format
 msgid "%B is not allowed to define %s"
 msgstr ""
 
-#: elf32-spu.c:1885
+#: elf32-spu.c:1911
 #, c-format
 msgid "you are not allowed to define %s in a script"
 msgstr ""
 
-#: elf32-spu.c:1919
+#: elf32-spu.c:1945
 #, c-format
 msgid "%s in overlay section"
 msgstr ""
 
-#: elf32-spu.c:1948
+#: elf32-spu.c:1974
 msgid "overlay stub relocation overflow"
 msgstr ""
 
-#: elf32-spu.c:1957
+#: elf32-spu.c:1983
 msgid "stubs don't match calculated size"
 msgstr ""
 
-#: elf32-spu.c:2539
+#: elf32-spu.c:2566
 #, c-format
 msgid "warning: %s overlaps %s\n"
 msgstr ""
 
-#: elf32-spu.c:2555
+#: elf32-spu.c:2582
 #, c-format
 msgid "warning: %s exceeds section size\n"
 msgstr ""
 
-#: elf32-spu.c:2586
+#: elf32-spu.c:2614
+#, c-format
 msgid "%A:0x%v not found in function table\n"
 msgstr ""
 
-#: elf32-spu.c:2726
+#: elf32-spu.c:2755
+#, c-format
 msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n"
 msgstr ""
 
-#: elf32-spu.c:3294
+#: elf32-spu.c:3324
 #, c-format
 msgid "Stack analysis will ignore the call from %s to %s\n"
 msgstr ""
 
-#: elf32-spu.c:3985
-msgid "  %s: 0x%v\n"
-msgstr ""
-
-#: elf32-spu.c:3986
-msgid "%s: 0x%v 0x%v\n"
-msgstr ""
-
-#: elf32-spu.c:3991
+#: elf32-spu.c:4021
 msgid "  calls:\n"
 msgstr ""
 
-#: elf32-spu.c:3999
-#, c-format
-msgid "   %s%s %s\n"
-msgstr ""
-
-#: elf32-spu.c:4304
+#: elf32-spu.c:4335
 #, c-format
 msgid "%s duplicated in %s\n"
 msgstr ""
 
-#: elf32-spu.c:4308
+#: elf32-spu.c:4339
 #, c-format
 msgid "%s duplicated\n"
 msgstr ""
 
-#: elf32-spu.c:4315
+#: elf32-spu.c:4346
 msgid "sorry, no support for duplicate object files in auto-overlay script\n"
 msgstr ""
 
-#: elf32-spu.c:4356
+#: elf32-spu.c:4388
+#, c-format
 msgid ""
 "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local "
 "store\n"
 msgstr ""
 
-#: elf32-spu.c:4511
+#: elf32-spu.c:4544
+#, c-format
 msgid "%B:%A%s exceeds overlay size\n"
 msgstr ""
 
-#: elf32-spu.c:4673
+#: elf32-spu.c:4685
+msgid "%F%P: auto overlay error: %E\n"
+msgstr ""
+
+#: elf32-spu.c:4706
 msgid "Stack size for call graph root nodes.\n"
 msgstr ""
 
-#: elf32-spu.c:4674
+#: elf32-spu.c:4707
 msgid ""
 "\n"
 "Stack size for functions.  Annotations: '*' max stack, 't' tail call\n"
 msgstr ""
 
-#: elf32-spu.c:4684
+#: elf32-spu.c:4717
 msgid "Maximum stack required is 0x%v\n"
 msgstr ""
 
-#: elf32-spu.c:4775
+#: elf32-spu.c:4736
+msgid "%X%P: stack/lrlive analysis error: %E\n"
+msgstr ""
+
+#: elf32-spu.c:4739
+msgid "%F%P: can not build overlay stubs: %E\n"
+msgstr ""
+
+#: elf32-spu.c:4808
 msgid "fatal error while creating .fixup"
 msgstr ""
 
-#: elf32-spu.c:5005
+#: elf32-spu.c:5043
+#, c-format
 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
 msgstr ""
 
@@ -2708,39 +3687,45 @@ msgstr ""
 msgid "warning: generating a shared library containing non-PID code"
 msgstr ""
 
-#: elf32-tic6x.c:2524
+#: elf32-tic6x.c:2523
 msgid "%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined"
 msgstr ""
 
 #: elf32-tic6x.c:3648
+#, c-format
 msgid "%B: error: unknown mandatory EABI object attribute %d"
 msgstr ""
 
-#: elf32-tic6x.c:3656
+#: elf32-tic6x.c:3657
+#, c-format
 msgid "%B: warning: unknown EABI object attribute %d"
 msgstr ""
 
-#: elf32-tic6x.c:3768 elf32-tic6x.c:3776
+#: elf32-tic6x.c:3771 elf32-tic6x.c:3780
+#, c-format
 msgid "error: %B requires more stack alignment than %B preserves"
 msgstr ""
 
-#: elf32-tic6x.c:3786 elf32-tic6x.c:3795
+#: elf32-tic6x.c:3790 elf32-tic6x.c:3799
 msgid "error: unknown Tag_ABI_array_object_alignment value in %B"
 msgstr ""
 
-#: elf32-tic6x.c:3804 elf32-tic6x.c:3813
+#: elf32-tic6x.c:3808 elf32-tic6x.c:3817
 msgid "error: unknown Tag_ABI_array_object_align_expected value in %B"
 msgstr ""
 
-#: elf32-tic6x.c:3821 elf32-tic6x.c:3828
+#: elf32-tic6x.c:3826 elf32-tic6x.c:3834
+#, c-format
 msgid "error: %B requires more array alignment than %B preserves"
 msgstr ""
 
-#: elf32-tic6x.c:3850
+#: elf32-tic6x.c:3857
+#, c-format
 msgid "warning: %B and %B differ in wchar_t size"
 msgstr ""
 
-#: elf32-tic6x.c:3868
+#: elf32-tic6x.c:3876
+#, c-format
 msgid "warning: %B and %B differ in whether code is compiled for DSBT"
 msgstr ""
 
@@ -2777,342 +3762,546 @@ msgstr ""
 msgid "FAILED to find previous HI16 reloc"
 msgstr ""
 
-#: elf32-v850.c:2293
+#: elf32-v850.c:1902 elf32-v850.c:1921
+#, c-format
+msgid "%B: invalid V850 reloc number: %d"
+msgstr ""
+
+#: elf32-v850.c:2299
 msgid "could not locate special linker symbol __gp"
 msgstr ""
 
-#: elf32-v850.c:2297
+#: elf32-v850.c:2303
 msgid "could not locate special linker symbol __ep"
 msgstr ""
 
-#: elf32-v850.c:2301
+#: elf32-v850.c:2307
 msgid "could not locate special linker symbol __ctbp"
 msgstr ""
 
-#: elf32-v850.c:2471 elf32-v850.c:2534
-msgid "%B: Architecture mismatch with previous modules"
+#: elf32-v850.c:2526
+#, c-format
+msgid "error: %B needs 8-byte aligment but %B is set for 4-byte alignment"
 msgstr ""
 
-#: elf32-v850.c:2478
-msgid "%B: Alignment mismatch with previous modules"
+#: elf32-v850.c:2542
+#, c-format
+msgid "error: %B uses 64-bit doubles but %B uses 32-bit doubles"
+msgstr ""
+
+#: elf32-v850.c:2557
+#, c-format
+msgid "error: %B uses FPU-3.0 but %B only supports FPU-2.0"
+msgstr ""
+
+#: elf32-v850.c:2589
+#, c-format
+msgid " alignment of 8-byte entities: "
+msgstr ""
+
+#: elf32-v850.c:2592
+#, c-format
+msgid "4-byte"
+msgstr ""
+
+#: elf32-v850.c:2593
+#, c-format
+msgid "8-byte"
+msgstr ""
+
+#: elf32-v850.c:2594 elf32-v850.c:2606
+#, c-format
+msgid "not set"
+msgstr ""
+
+#: elf32-v850.c:2595 elf32-v850.c:2607 elf32-v850.c:2619 elf32-v850.c:2630
+#: elf32-v850.c:2641 elf32-v850.c:2652
+#, c-format
+msgid "unknown: %x"
+msgstr ""
+
+#: elf32-v850.c:2601
+#, c-format
+msgid " size of doubles: "
+msgstr ""
+
+#: elf32-v850.c:2604
+#, c-format
+msgid "4-bytes"
+msgstr ""
+
+#: elf32-v850.c:2605
+#, c-format
+msgid "8-bytes"
+msgstr ""
+
+#: elf32-v850.c:2613
+#, c-format
+msgid " FPU support required: "
+msgstr ""
+
+#: elf32-v850.c:2616
+#, c-format
+msgid "FPU-2.0"
+msgstr ""
+
+#: elf32-v850.c:2617
+#, c-format
+msgid "FPU-3.0"
+msgstr ""
+
+#: elf32-v850.c:2618
+#, c-format
+msgid "none"
+msgstr ""
+
+#: elf32-v850.c:2625
+#, c-format
+msgid "SIMD use: "
+msgstr ""
+
+#: elf32-v850.c:2628 elf32-v850.c:2639 elf32-v850.c:2650
+#, c-format
+msgid "yes"
+msgstr ""
+
+#: elf32-v850.c:2629 elf32-v850.c:2640 elf32-v850.c:2651
+#, c-format
+msgid "no"
+msgstr ""
+
+#: elf32-v850.c:2636
+#, c-format
+msgid "CACHE use: "
+msgstr ""
+
+#: elf32-v850.c:2647
+#, c-format
+msgid "MMU use: "
+msgstr ""
+
+#: elf32-v850.c:2814 elf32-v850.c:2870
+msgid "%B: Architecture mismatch with previous modules"
 msgstr ""
 
 #. xgettext:c-format.
-#: elf32-v850.c:2553
+#: elf32-v850.c:2888
 #, c-format
 msgid "private flags = %lx: "
 msgstr ""
 
-#: elf32-v850.c:2558
+#: elf32-v850.c:2893
 #, c-format
 msgid "unknown v850 architecture"
 msgstr ""
 
-#: elf32-v850.c:2560
+#: elf32-v850.c:2895
 #, c-format
 msgid "v850 E3 architecture"
 msgstr ""
 
-#: elf32-v850.c:2562 elf32-v850.c:2572
+#: elf32-v850.c:2897 elf32-v850.c:2904
+#, c-format
+msgid "v850 architecture"
+msgstr ""
+
+#: elf32-v850.c:2905
+#, c-format
+msgid "v850e architecture"
+msgstr ""
+
+#: elf32-v850.c:2906
+#, c-format
+msgid "v850e1 architecture"
+msgstr ""
+
+#: elf32-v850.c:2907
+#, c-format
+msgid "v850e2 architecture"
+msgstr ""
+
+#: elf32-v850.c:2908
+#, c-format
+msgid "v850e2v3 architecture"
+msgstr ""
+
+#: elf32-v850.c:2909
+#, c-format
+msgid "v850e3v5 architecture"
+msgstr ""
+
+#: elf32-v850.c:3603
+#, c-format
+msgid "%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insns"
+msgstr ""
+
+#: elf32-v850.c:3613
 #, c-format
-msgid "v850 architecture"
+msgid "%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insn 0x%x"
 msgstr ""
 
-#: elf32-v850.c:2565
+#: elf32-v850.c:3658
 #, c-format
-msgid ", 8-byte data alignment"
+msgid "%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc"
 msgstr ""
 
-#: elf32-v850.c:2573
+#: elf32-v850.c:3698
 #, c-format
-msgid "v850e architecture"
+msgid "%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc 0x%lx"
 msgstr ""
 
-#: elf32-v850.c:2574
+#: elf32-v850.c:3841
 #, c-format
-msgid "v850e1 architecture"
+msgid "%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insns"
 msgstr ""
 
-#: elf32-v850.c:2575
+#: elf32-v850.c:3851
 #, c-format
-msgid "v850e2 architecture"
+msgid "%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insn 0x%x"
 msgstr ""
 
-#: elf32-v850.c:2576
+#: elf32-v850.c:3885
 #, c-format
-msgid "v850e2v3 architecture"
+msgid "%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized reloc"
 msgstr ""
 
-#: elf32-v850.c:2577
+#: elf32-vax.c:290
 #, c-format
-msgid "v850e3v5 architecture"
+msgid "%B: unrecognised VAX reloc number: %d"
 msgstr ""
 
-#: elf32-vax.c:532
+#: elf32-vax.c:539
 #, c-format
 msgid " [nonpic]"
 msgstr ""
 
-#: elf32-vax.c:535
+#: elf32-vax.c:542
 #, c-format
 msgid " [d-float]"
 msgstr ""
 
-#: elf32-vax.c:538
+#: elf32-vax.c:545
 #, c-format
 msgid " [g-float]"
 msgstr ""
 
-#: elf32-vax.c:656
+#: elf32-vax.c:635
 #, c-format
 msgid ""
 "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of "
 "%ld"
 msgstr ""
 
-#: elf32-vax.c:1543
+#: elf32-vax.c:1512
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
 msgstr ""
 
-#: elf32-vax.c:1668
+#: elf32-vax.c:1638
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
 msgstr ""
 
-#: elf32-vax.c:1674
+#: elf32-vax.c:1645
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr ""
 
-#: elf32-xgate.c:686
+#: elf32-visium.c:481
+#, c-format
+msgid "%B: invalid Visium reloc number: %d"
+msgstr ""
+
+#: elf32-visium.c:817
+#, c-format
+msgid "%s: compiled %s -mtune=%s and linked with modules compiled %s -mtune=%s"
+msgstr ""
+
+#: elf32-xgate.c:428
+#, c-format
+msgid "%B: invalid XGate reloc number: %d"
+msgstr ""
+
+#: elf32-xgate.c:681
 #, c-format
 msgid "cpu=XGATE]"
 msgstr ""
 
-#: elf32-xgate.c:688
+#: elf32-xgate.c:683
 #, c-format
 msgid "error reading cpu type from elf private data"
 msgstr ""
 
-#: elf32-xstormy16.c:455 elf64-ia64-vms.c:2072 elf32-ia64.c:2330
-#: elf64-ia64.c:2330
+#: elf32-xstormy16.c:453 elf64-ia64-vms.c:2073 elf32-ia64.c:2332
+#: elf64-ia64.c:2332
 msgid "non-zero addend in @fptr reloc"
 msgstr ""
 
-#: elf32-xtensa.c:908
+#: elf32-xtensa.c:485
+#, c-format
+msgid "%B: invalid XTENSA reloc number: %d"
+msgstr ""
+
+#: elf32-xtensa.c:912
+#, c-format
 msgid "%B(%A): invalid property table"
 msgstr ""
 
-#: elf32-xtensa.c:2774
+#: elf32-xtensa.c:2776
+#, c-format
 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
 msgstr ""
 
-#: elf32-xtensa.c:2853 elf32-xtensa.c:2974
+#: elf32-xtensa.c:2857 elf32-xtensa.c:2976
 msgid "dynamic relocation in read-only section"
 msgstr ""
 
-#: elf32-xtensa.c:2950
+#: elf32-xtensa.c:2953
 msgid "TLS relocation invalid without dynamic sections"
 msgstr ""
 
-#: elf32-xtensa.c:3169
+#: elf32-xtensa.c:3164
 msgid "internal inconsistency in size of .got.loc section"
 msgstr ""
 
-#: elf32-xtensa.c:3482
+#: elf32-xtensa.c:3471
+#, c-format
 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
 msgstr ""
 
-#: elf32-xtensa.c:4713 elf32-xtensa.c:4721
+#: elf32-xtensa.c:4702 elf32-xtensa.c:4710
 msgid "Attempt to convert L32R/CALLX to CALL failed"
 msgstr ""
 
-#: elf32-xtensa.c:6330 elf32-xtensa.c:6406 elf32-xtensa.c:7522
+#: elf32-xtensa.c:6538 elf32-xtensa.c:6615 elf32-xtensa.c:7988
+#, c-format
 msgid ""
 "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
 msgstr ""
 
-#: elf32-xtensa.c:7262
+#: elf32-xtensa.c:7729
+#, c-format
 msgid ""
 "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY "
 "relocation; possible configuration mismatch"
 msgstr ""
 
-#: elf32-xtensa.c:9022
+#: elf32-xtensa.c:9571
 msgid "invalid relocation address"
 msgstr ""
 
-#: elf32-xtensa.c:9071
+#: elf32-xtensa.c:9621
 msgid "overflow after relaxation"
 msgstr ""
 
-#: elf32-xtensa.c:10203
+#: elf32-xtensa.c:10765
+#, c-format
 msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
 msgstr ""
 
-#: elf64-alpha.c:474
+#: elf64-alpha.c:472
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr ""
 
-#: elf64-alpha.c:2503
+#: elf64-alpha.c:1112
+#, c-format
+msgid "%B: unrecognised Alpha reloc number: %d"
+msgstr ""
+
+#: elf64-alpha.c:2529
+#, c-format
 msgid "%B: .got subsegment exceeds 64K (size %d)"
 msgstr ""
 
-#: elf64-alpha.c:4396 elf64-alpha.c:4408
+#: elf64-alpha.c:3078
+#, c-format
+msgid "%B: %A+0x%lx: warning: %s relocation against unexpected insn"
+msgstr ""
+
+#: elf64-alpha.c:3272
+#, c-format
+msgid "%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn"
+msgstr ""
+
+#: elf64-alpha.c:4473 elf64-alpha.c:4486
+#, c-format
 msgid "%B: gp-relative relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-alpha.c:4434 elf64-alpha.c:4574
+#: elf64-alpha.c:4513 elf64-alpha.c:4657
+#, c-format
 msgid "%B: pc-relative relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-alpha.c:4462
+#: elf64-alpha.c:4542
+#, c-format
 msgid "%B: change in gp: BRSGP %s"
 msgstr ""
 
-#: elf64-alpha.c:4487
+#: elf64-alpha.c:4567
 msgid "<unknown>"
 msgstr ""
 
-#: elf64-alpha.c:4492
+#: elf64-alpha.c:4573
+#, c-format
 msgid "%B: !samegp reloc against symbol without .prologue: %s"
 msgstr ""
 
-#: elf64-alpha.c:4549
+#: elf64-alpha.c:4631
+#, c-format
 msgid "%B: unhandled dynamic relocation against %s"
 msgstr ""
 
-#: elf64-alpha.c:4581
+#: elf64-alpha.c:4666
+#, c-format
 msgid "%B: pc-relative relocation against undefined weak symbol %s"
 msgstr ""
 
-#: elf64-alpha.c:4645
+#: elf64-alpha.c:4732
+#, c-format
 msgid "%B: dtp-relative relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-alpha.c:4668
+#: elf64-alpha.c:4757
+#, c-format
 msgid "%B: tp-relative relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-hppa.c:2084
+#: elf64-hppa.c:2082
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr ""
 
-#: elf64-hppa.c:3280
+#: elf64-hppa.c:3287
+#, c-format
 msgid "%B(%A+0x%"
 msgstr ""
 
-#: elf64-ia64-vms.c:587 elf32-ia64.c:619 elf64-ia64.c:619
+#: elf64-ia64-vms.c:587 elf32-ia64.c:620 elf64-ia64.c:620
+#, c-format
 msgid ""
 "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect "
 "branch."
 msgstr ""
 
-#: elf64-ia64-vms.c:2027 elf32-ia64.c:2278 elf64-ia64.c:2278
+#: elf64-ia64-vms.c:2028 elf32-ia64.c:2280 elf64-ia64.c:2280
 msgid "@pltoff reloc against local symbol"
 msgstr ""
 
-#: elf64-ia64-vms.c:3279 elf32-ia64.c:3684 elf64-ia64.c:3684
+#: elf64-ia64-vms.c:3281 elf32-ia64.c:3686 elf64-ia64.c:3686
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr ""
 
-#: elf64-ia64-vms.c:3290 elf32-ia64.c:3695 elf64-ia64.c:3695
+#: elf64-ia64-vms.c:3292 elf32-ia64.c:3697 elf64-ia64.c:3697
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr ""
 
-#: elf64-ia64-vms.c:3555 elf32-ia64.c:3962 elf64-ia64.c:3962
+#: elf64-ia64-vms.c:3559 elf32-ia64.c:3966 elf64-ia64.c:3966
+#, c-format
 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
 msgstr ""
 
-#: elf64-ia64-vms.c:3617 elf32-ia64.c:4029 elf64-ia64.c:4029
+#: elf64-ia64-vms.c:3622 elf32-ia64.c:4034 elf64-ia64.c:4034
+#, c-format
 msgid "%B: @gprel relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-ia64-vms.c:3676 elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf64-ia64-vms.c:3681 elf32-ia64.c:4097 elf64-ia64.c:4097
 msgid "%B: linking non-pic code in a position independent executable"
 msgstr ""
 
-#: elf64-ia64-vms.c:3777 elf32-ia64.c:4229 elf64-ia64.c:4229
+#: elf64-ia64-vms.c:3783 elf32-ia64.c:4235 elf64-ia64.c:4235
+#, c-format
 msgid "%B: @internal branch to dynamic symbol %s"
 msgstr ""
 
-#: elf64-ia64-vms.c:3779 elf32-ia64.c:4231 elf64-ia64.c:4231
+#: elf64-ia64-vms.c:3786 elf32-ia64.c:4238 elf64-ia64.c:4238
+#, c-format
 msgid "%B: speculation fixup to dynamic symbol %s"
 msgstr ""
 
-#: elf64-ia64-vms.c:3781 elf32-ia64.c:4233 elf64-ia64.c:4233
+#: elf64-ia64-vms.c:3789 elf32-ia64.c:4241 elf64-ia64.c:4241
+#, c-format
 msgid "%B: @pcrel relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf64-ia64-vms.c:3905 elf32-ia64.c:4430 elf64-ia64.c:4430
+#: elf64-ia64-vms.c:3913 elf32-ia64.c:4438 elf64-ia64.c:4438
 msgid "unsupported reloc"
 msgstr ""
 
-#: elf64-ia64-vms.c:3942 elf32-ia64.c:4468 elf64-ia64.c:4468
+#: elf64-ia64-vms.c:3950 elf32-ia64.c:4476 elf64-ia64.c:4476
+#, c-format
 msgid ""
 "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `"
 "%A'."
 msgstr ""
 
-#: elf64-ia64-vms.c:3957 elf32-ia64.c:4483 elf64-ia64.c:4483
+#: elf64-ia64-vms.c:3966 elf32-ia64.c:4492 elf64-ia64.c:4492
+#, c-format
 msgid ""
 "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> "
 "0x1000000)."
 msgstr ""
 
-#: elf64-ia64-vms.c:4246 elf32-ia64.c:4745 elf64-ia64.c:4745
+#: elf64-ia64-vms.c:4256 elf32-ia64.c:4748 elf64-ia64.c:4748
 msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
 msgstr ""
 
-#: elf64-ia64-vms.c:4255 elf32-ia64.c:4754 elf64-ia64.c:4754
+#: elf64-ia64-vms.c:4265 elf32-ia64.c:4757 elf64-ia64.c:4757
 msgid "%B: linking big-endian files with little-endian files"
 msgstr ""
 
-#: elf64-ia64-vms.c:4264 elf32-ia64.c:4763 elf64-ia64.c:4763
+#: elf64-ia64-vms.c:4274 elf32-ia64.c:4766 elf64-ia64.c:4766
 msgid "%B: linking 64-bit files with 32-bit files"
 msgstr ""
 
-#: elf64-ia64-vms.c:4273 elf32-ia64.c:4772 elf64-ia64.c:4772
+#: elf64-ia64-vms.c:4283 elf32-ia64.c:4775 elf64-ia64.c:4775
 msgid "%B: linking constant-gp files with non-constant-gp files"
 msgstr ""
 
-#: elf64-ia64-vms.c:4283 elf32-ia64.c:4782 elf64-ia64.c:4782
+#: elf64-ia64-vms.c:4293 elf32-ia64.c:4785 elf64-ia64.c:4785
 msgid "%B: linking auto-pic files with non-auto-pic files"
 msgstr ""
 
-#: elf64-ia64-vms.c:5125 elflink.c:4299
+#: elf64-ia64-vms.c:5136 elflink.c:4628
+#, c-format
 msgid ""
 "Warning: alignment %u of common symbol `%s' in %B is greater than the "
 "alignment (%u) of its section %A"
 msgstr ""
 
-#: elf64-ia64-vms.c:5131 elflink.c:4305
+#: elf64-ia64-vms.c:5143 elflink.c:4635
+#, c-format
 msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
 msgstr ""
 
-#: elf64-ia64-vms.c:5146 elflink.c:4321
+#: elf64-ia64-vms.c:5159 elflink.c:4652
+#, c-format
 msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
 msgstr ""
 
-#: elf64-mmix.c:986
+#: elf64-mips.c:3621 elfn32-mips.c:3439
+#, c-format
+msgid "unrecognised MIPS reloc number: %d"
+msgstr ""
+
+#: elf64-mmix.c:984
 msgid ""
 "invalid input relocation when producing non-ELF, non-mmo format output.\n"
 " Please use the objcopy program to convert from ELF or mmo,\n"
 " or assemble using \"-no-expand\" (for gcc, \"-Wa,-no-expand\""
 msgstr ""
 
-#: elf64-mmix.c:1170
+#: elf64-mmix.c:1168
 msgid ""
 "invalid input relocation when producing non-ELF, non-mmo format output.\n"
 " Please use the objcopy program to convert from ELF or mmo,\n"
 " or compile using the gcc-option \"-mno-base-addresses\"."
 msgstr ""
 
-#: elf64-mmix.c:1196
+#: elf64-mmix.c:1195
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
@@ -3120,158 +4309,175 @@ msgid ""
 "%08lx\n"
 msgstr ""
 
+#: elf64-mmix.c:1266
+#, c-format
+msgid "%B: invalid MMIX reloc number: %d"
+msgstr ""
+
 #: elf64-mmix.c:1618
 #, c-format
 msgid ""
 "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr ""
 
-#: elf64-mmix.c:1623
+#: elf64-mmix.c:1624
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr ""
 
-#: elf64-mmix.c:1667
+#: elf64-mmix.c:1669
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr ""
 
-#: elf64-mmix.c:1672
+#: elf64-mmix.c:1675
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr ""
 
-#: elf64-mmix.c:1709
+#: elf64-mmix.c:1712
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr ""
 
-#: elf64-mmix.c:1739
+#: elf64-mmix.c:1743
 #, c-format
 msgid ""
 "%s: LOCAL directive: Register $%ld is not a local register.  First global "
 "register is $%ld."
 msgstr ""
 
-#: elf64-mmix.c:2198
+#: elf64-mmix.c:2201
 #, c-format
 msgid ""
 "%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
 "linked file\n"
 msgstr ""
 
-#: elf64-mmix.c:2252
+#: elf64-mmix.c:2256
 msgid "Register section has contents\n"
 msgstr ""
 
-#: elf64-mmix.c:2441
+#: elf64-mmix.c:2446
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
 "  Please report this bug."
 msgstr ""
 
-#: elf64-ppc.c:4463
+#: elf64-ppc.c:4593
+#, c-format
 msgid "%P: %B: cannot create stub entry %s\n"
 msgstr ""
 
-#: elf64-ppc.c:4810
+#: elf64-ppc.c:4988
 msgid "%P: symbol '%s' has invalid st_other for ABI version 1\n"
 msgstr ""
 
-#: elf64-ppc.c:5170
-msgid "%P: .opd not allowed in ABI version %d\n"
+#: elf64-ppc.c:5157
+#, c-format
+msgid "%P: %B .opd not allowed in ABI version %d\n"
+msgstr ""
+
+#: elf64-ppc.c:5633
+#, c-format
+msgid "%P: %H: %s reloc unsupported in shared libraries and PIEs.\n"
 msgstr ""
 
-#: elf64-ppc.c:5809
+#: elf64-ppc.c:6040
+#, c-format
 msgid "%B uses unknown e_flags 0x%lx"
 msgstr ""
 
-#: elf64-ppc.c:5816
+#: elf64-ppc.c:6048
+#, c-format
 msgid "%B: ABI version %ld is not compatible with ABI version %ld output"
 msgstr ""
 
-#: elf64-ppc.c:5843
+#: elf64-ppc.c:6076
 #, c-format
 msgid " [abiv%ld]"
 msgstr ""
 
-#: elf64-ppc.c:7007
+#: elf64-ppc.c:7373
 msgid ""
 "%P: copy reloc against `%T' requires lazy plt linking; avoid setting "
 "LD_BIND_NOW=1 or upgrade gcc\n"
 msgstr ""
 
-#: elf64-ppc.c:7270
+#: elf64-ppc.c:7632
 msgid "%B: undefined symbol on R_PPC64_TOCSAVE relocation"
 msgstr ""
 
-#: elf64-ppc.c:7499
+#: elf64-ppc.c:7862
+#, c-format
 msgid "%P: dynreloc miscount for %B, section %A\n"
 msgstr ""
 
-#: elf64-ppc.c:7583
+#: elf64-ppc.c:7951
 msgid "%B: .opd is not a regular array of opd entries"
 msgstr ""
 
-#: elf64-ppc.c:7592
+#: elf64-ppc.c:7961
+#, c-format
 msgid "%B: unexpected reloc type %u in .opd section"
 msgstr ""
 
-#: elf64-ppc.c:7613
+#: elf64-ppc.c:7983
+#, c-format
 msgid "%B: undefined sym `%s' in .opd section"
 msgstr ""
 
-#: elf64-ppc.c:8177
+#: elf64-ppc.c:8548
 msgid "%H __tls_get_addr lost arg, TLS optimization disabled\n"
 msgstr ""
 
-#: elf64-ppc.c:8516 elf64-ppc.c:9139
+#: elf64-ppc.c:8891 elf64-ppc.c:9528
 #, c-format
 msgid "%s defined on removed toc entry"
 msgstr ""
 
-#: elf64-ppc.c:8868
+#: elf64-ppc.c:9256
+#, c-format
 msgid "%P: %H: toc optimization is not supported for %s instruction.\n"
 msgstr ""
 
-#: elf64-ppc.c:9096
+#: elf64-ppc.c:9485
+#, c-format
 msgid "%P: %H: %s references optimized away TOC entry\n"
 msgstr ""
 
-#: elf64-ppc.c:10394
+#: elf64-ppc.c:10810
 msgid "%P: cannot find opd entry toc for `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:10479
+#: elf64-ppc.c:10901
 msgid "%P: long branch stub `%s' offset overflow\n"
 msgstr ""
 
-#: elf64-ppc.c:10538
+#: elf64-ppc.c:10960
 msgid "%P: can't find branch stub `%s'\n"
 msgstr ""
 
-#: elf64-ppc.c:10602 elf64-ppc.c:10749 elf64-ppc.c:12416
+#: elf64-ppc.c:11024 elf64-ppc.c:11175 elf64-ppc.c:12979
+#, c-format
 msgid "%P: linkage table error against `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:10940
+#: elf64-ppc.c:11385
 msgid "%P: can't build branch stub `%s'\n"
 msgstr ""
 
-#: elf64-ppc.c:11748
+#: elf64-ppc.c:12158
+#, c-format
 msgid "%B section %A exceeds stub group size"
 msgstr ""
 
-#: elf64-ppc.c:12662 elf64-ppc.c:12697
-msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
-msgstr ""
-
-#: elf64-ppc.c:12758
+#: elf64-ppc.c:13256
 msgid "%P: stubs don't match calculated size\n"
 msgstr ""
 
-#: elf64-ppc.c:12770
+#: elf64-ppc.c:13268
 #, c-format
 msgid ""
 "linker stubs in %u group%s\n"
@@ -3280,47 +4486,68 @@ msgid ""
 "  long branch  %lu\n"
 "  long toc adj %lu\n"
 "  plt call     %lu\n"
-"  plt call toc %lu"
+"  plt call toc %lu\n"
+"  global entry %lu"
 msgstr ""
 
-#: elf64-ppc.c:13096
+#: elf64-ppc.c:13590
+#, c-format
 msgid "%P: %H: %s used with TLS symbol `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:13097
+#: elf64-ppc.c:13592
+#, c-format
 msgid "%P: %H: %s used with non-TLS symbol `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:13675
+#: elf64-ppc.c:14222
+#, c-format
 msgid ""
 "%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC\n"
 msgstr ""
 
-#: elf64-ppc.c:13793
+#: elf64-ppc.c:14228
+#, c-format
+msgid ""
+"%P: %H: call to `%T' lacks nop, can't restore toc; (-mcmodel=small toc "
+"adjust stub)\n"
+msgstr ""
+
+#: elf64-ppc.c:14356
+#, c-format
 msgid "%P: %B: unknown relocation type %d for `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:14310
+#: elf64-ppc.c:14899
+#, c-format
 msgid "%P: %H: %s for indirect function `%T' unsupported\n"
 msgstr ""
 
-#: elf64-ppc.c:14417
+#: elf64-ppc.c:15007
+#, c-format
 msgid "%P: %B: %s is not supported for `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:14565
+#: elf64-ppc.c:15162
+#, c-format
 msgid "%P: %H: error: %s not a multiple of %u\n"
 msgstr ""
 
-#: elf64-ppc.c:14586
+#: elf64-ppc.c:15184
+#, c-format
 msgid "%P: %H: unresolvable %s against `%T'\n"
 msgstr ""
 
-#: elf64-ppc.c:14644
+#: elf64-ppc.c:15281
+#, c-format
 msgid "%P: %H: %s against `%T': error %d\n"
 msgstr ""
 
-#: elf64-sh64.c:1686
+#: elf64-ppc.c:15650 elf64-ppc.c:15679
+msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
+msgstr ""
+
+#: elf64-sh64.c:1680
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr ""
@@ -3329,803 +4556,1077 @@ msgstr ""
 msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr ""
 
-#: elf64-sparc.c:466
+#: elf64-sparc.c:467
+#, c-format
 msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
 msgstr ""
 
-#: elf64-sparc.c:489
+#: elf64-sparc.c:491
+#, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
 msgstr ""
 
-#: elf64-sparc.c:534
+#: elf64-sparc.c:537
+#, c-format
 msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
 msgstr ""
 
-#: elf64-sparc.c:687
+#: elf64-sparc.c:691
 msgid "%B: linking UltraSPARC specific with HAL specific code"
 msgstr ""
 
-#: elf64-x86-64.c:1530
-msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+#: elf64-x86-64.c:1694
+msgid "hidden symbol "
 msgstr ""
 
-#: elf64-x86-64.c:1688
-msgid "%B: '%s' accessed both as normal and thread local symbol"
+#: elf64-x86-64.c:1697
+msgid "internal symbol "
 msgstr ""
 
-#: elf64-x86-64.c:3405 /src/binutils-gdb/bfd/elfnn-aarch64.c:3511
-msgid ""
-"%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
+#: elf64-x86-64.c:1700
+msgid "protected symbol "
 msgstr ""
 
-#: elf64-x86-64.c:3667
-msgid ""
-"%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be "
-"used when making a shared object"
+#: elf64-x86-64.c:1703
+msgid "symbol "
 msgstr ""
 
-#: elf64-x86-64.c:3787
+#: elf64-x86-64.c:1704 elf64-x86-64.c:1714
 msgid "; recompile with -fPIC"
 msgstr ""
 
-#: elf64-x86-64.c:3792
+#: elf64-x86-64.c:1709
+msgid "undefined "
+msgstr ""
+
+#: elf64-x86-64.c:1718
+#, c-format
+msgid ""
+"%B: relocation %s against %s%s`%s' can not be used when making a shared "
+"object%s"
+msgstr ""
+
+#: elf64-x86-64.c:2278
+#, c-format
+msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+msgstr ""
+
+#: elf64-x86-64.c:2468
+#, c-format
+msgid "%B: '%s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf64-x86-64.c:4416
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:4991
+#, c-format
+msgid ""
+"%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
+msgstr ""
+
+#: elf64-x86-64.c:4652
+#, c-format
 msgid ""
-"%B: relocation %s against %s `%s' can not be used when making a shared object"
-"%s"
+"%B: relocation R_X86_64_GOTOFF64 against undefined %s `%s' can not be used "
+"when making a shared object"
 msgstr ""
 
-#: elf64-x86-64.c:3794
+#: elf64-x86-64.c:4665
+#, c-format
 msgid ""
-"%B: relocation %s against undefined %s `%s' can not be used when making a "
-"shared object%s"
+"%B: relocation R_X86_64_GOTOFF64 against protected %s `%s' can not be used "
+"when making a shared object"
 msgstr ""
 
-#: elf64-x86-64.c:3900
+#: elf64-x86-64.c:4940
+#, c-format
 msgid ""
 "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `"
 "%A' is out of range"
 msgstr ""
 
-#: elf64-x86-64.c:3908
+#: elf64-x86-64.c:4949
+#, c-format
 msgid ""
 "%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `"
 "%A' is out of range"
 msgstr ""
 
-#: elfcode.h:760
+#: elf64-x86-64.c:5806
+#, c-format
+msgid "%F%B: PC-relative offset overflow in PLT entry for `%s'\n"
+msgstr ""
+
+#: elf64-x86-64.c:5865
+#, c-format
+msgid "%F%B: branch displacement overflow in PLT entry for `%s'\n"
+msgstr ""
+
+#: elf64-x86-64.c:5930
+#, c-format
+msgid "%F%B: PC-relative offset overflow in GOT PLT entry for `%s'\n"
+msgstr ""
+
+#: elfcode.h:759
 #, c-format
 msgid "warning: %s has a corrupt string table index - ignoring"
 msgstr ""
 
-#: elfcode.h:1186
+#: elfcode.h:1192
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr ""
 
-#: elfcode.h:1440
+#: elfcode.h:1447
 #, c-format
 msgid "%s(%s): relocation %d has invalid symbol index %ld"
 msgstr ""
 
-#: elfcore.h:305
+#: elfcore.h:300
+#, c-format
 msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu."
 msgstr ""
 
-#: elflink.c:1143
+#: elflink.c:1266
+#, c-format
 msgid ""
 "%s: TLS definition in %B section %A mismatches non-TLS definition in %B "
 "section %A"
 msgstr ""
 
-#: elflink.c:1148
+#: elflink.c:1272
+#, c-format
 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
 msgstr ""
 
-#: elflink.c:1153
+#: elflink.c:1278
+#, c-format
 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
 msgstr ""
 
-#: elflink.c:1158
+#: elflink.c:1284
+#, c-format
 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
 msgstr ""
 
-#: elflink.c:1763
+#: elflink.c:1948
+#, c-format
 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
 msgstr ""
 
-#: elflink.c:2066
+#: elflink.c:2241
+#, c-format
 msgid "%B: version node not found for symbol %s"
 msgstr ""
 
-#: elflink.c:2157
+#: elflink.c:2330
+#, c-format
 msgid ""
 "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
 msgstr ""
 
-#: elflink.c:2168
+#: elflink.c:2342
+#, c-format
 msgid ""
 "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the "
 "object file has no symbol table"
 msgstr ""
 
-#: elflink.c:2358
+#: elflink.c:2533
+#, c-format
 msgid "%B: relocation size mismatch in %B section %A"
 msgstr ""
 
-#: elflink.c:2640
+#: elflink.c:2826
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
 msgstr ""
 
-#: elflink.c:3403
+#: elflink.c:2891
+msgid "%P: copy reloc against protected `%T' is dangerous\n"
+msgstr ""
+
+#: elflink.c:3692
+#, c-format
 msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n"
 msgstr ""
 
-#: elflink.c:4032
+#: elflink.c:4336
+#, c-format
 msgid "%B: %s: invalid version %u (max %d)"
 msgstr ""
 
-#: elflink.c:4068
+#: elflink.c:4373
+#, c-format
 msgid "%B: %s: invalid needed version %d"
 msgstr ""
 
-#: elflink.c:4452
+#: elflink.c:4790
+#, c-format
 msgid "%B: undefined reference to symbol '%s'"
 msgstr ""
 
-#: elflink.c:5523
+#: elflink.c:5794
+#, c-format
 msgid "%B: stack size specified and %s set"
 msgstr ""
 
-#: elflink.c:5526
+#: elflink.c:5798
+#, c-format
 msgid "%B: %s not absolute"
 msgstr ""
 
-#: elflink.c:5824
+#: elflink.c:6096
 #, c-format
 msgid "%s: undefined version: %s"
 msgstr ""
 
-#: elflink.c:5892
+#: elflink.c:6164
 msgid "%B: .preinit_array section is not allowed in DSO"
 msgstr ""
 
-#: elflink.c:7657
+#: elflink.c:7930
 #, c-format
 msgid "undefined %s reference in complex symbol: %s"
 msgstr ""
 
-#: elflink.c:7811
+#: elflink.c:8085
 #, c-format
 msgid "unknown operator '%c' in complex symbol"
 msgstr ""
 
-#: elflink.c:8165 elflink.c:8182 elflink.c:8219 elflink.c:8236
+#: elflink.c:8648 elflink.c:8666 elflink.c:8705 elflink.c:8723
 msgid "%B: Unable to sort relocs - they are in more than one size"
 msgstr ""
 
-#: elflink.c:8196 elflink.c:8250
+#. The section size is not divisible by either -
+#. something is wrong.
+#: elflink.c:8682 elflink.c:8739
 msgid "%B: Unable to sort relocs - they are of an unknown size"
 msgstr ""
 
-#: elflink.c:8301
+#: elflink.c:8791
 msgid "Not enough memory to sort relocations"
 msgstr ""
 
-#: elflink.c:8494
+#: elflink.c:9059
+#, c-format
 msgid "%B: Too many sections: %d (>= %d)"
 msgstr ""
 
-#: elflink.c:8775
+#: elflink.c:9339
+#, c-format
 msgid "%B: internal symbol `%s' in %B is referenced by DSO"
 msgstr ""
 
-#: elflink.c:8777
+#: elflink.c:9342
+#, c-format
 msgid "%B: hidden symbol `%s' in %B is referenced by DSO"
 msgstr ""
 
-#: elflink.c:8779
+#: elflink.c:9345
+#, c-format
 msgid "%B: local symbol `%s' in %B is referenced by DSO"
 msgstr ""
 
-#: elflink.c:8890
+#: elflink.c:9431
+#, c-format
 msgid "%B: could not find output section %A for input section %A"
 msgstr ""
 
-#: elflink.c:9013
+#: elflink.c:9585
+#, c-format
 msgid "%B: protected symbol `%s' isn't defined"
 msgstr ""
 
-#: elflink.c:9015
+#: elflink.c:9588
+#, c-format
 msgid "%B: internal symbol `%s' isn't defined"
 msgstr ""
 
-#: elflink.c:9017
+#: elflink.c:9591
+#, c-format
 msgid "%B: hidden symbol `%s' isn't defined"
 msgstr ""
 
-#: elflink.c:9043
+#: elflink.c:9622
+#, c-format
 msgid "%B: No symbol version section for versioned symbol `%s'"
 msgstr ""
 
-#: elflink.c:9598
+#: elflink.c:10227
+#, c-format
 msgid "error: %B: size of section %A is not multiple of address size"
 msgstr ""
 
-#: elflink.c:9645
+#: elflink.c:10275
+#, c-format
+msgid ""
+"error: %B contains a reloc (0x%s) for section %A that references a non-"
+"existent global symbol"
+msgstr ""
+
+#: elflink.c:11030
+#, c-format
+msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+msgstr ""
+
+#: elflink.c:11037
+#, c-format
+msgid "%A has both ordered and unordered sections"
+msgstr ""
+
+#: elflink.c:11138
+msgid "%B: no symbol found for import library"
+msgstr ""
+
+#: elflink.c:11761
+#, c-format
+msgid "%B: file class %s incompatible with %s"
+msgstr ""
+
+#: elflink.c:11974
+msgid "%B: failed to generate import library"
+msgstr ""
+
+#: elflink.c:12090
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr ""
+
+#: elflink.c:12138
+#, c-format
+msgid "warning: section '%s' is being made into a note"
+msgstr ""
+
+#: elflink.c:12216
+msgid "%P%X: read-only segment has dynamic relocations.\n"
+msgstr ""
+
+#: elflink.c:12219
+msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+msgstr ""
+
+#: elflink.c:12343
+msgid "%P%X: can not read symbols: %E\n"
+msgstr ""
+
+#: elflink.c:12541
+msgid "%F%P: corrupt input: %B\n"
+msgstr ""
+
+#: elflink.c:13245
+#, c-format
+msgid "%B: %A+%lu: No symbol found for INHERIT"
+msgstr ""
+
+#: elflink.c:13421
+#, c-format
+msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgstr ""
+
+#: elfxx-mips.c:1440
+msgid "static procedure (no name)"
+msgstr ""
+
+#: elfxx-mips.c:5621
+msgid "MIPS16 and microMIPS functions cannot call each other"
+msgstr ""
+
+#: elfxx-mips.c:6358
+msgid "%X%H: Unsupported JALX to the same ISA mode\n"
+msgstr ""
+
+#: elfxx-mips.c:6391
+msgid ""
+"%X%H: Unsupported jump between ISA modes; consider recompiling with "
+"interlinking enabled\n"
+msgstr ""
+
+#: elfxx-mips.c:6424
+msgid "%X%H: Unsupported branch between ISA modes\n"
+msgstr ""
+
+#: elfxx-mips.c:6438
+msgid ""
+"%X%H: Cannot convert branch between ISA modes to JALX: relocation out of "
+"range\n"
+msgstr ""
+
+#: elfxx-mips.c:7117 elfxx-mips.c:7351
+#, c-format
+msgid "%B: Warning: bad `%s' option size %u smaller than its header"
+msgstr ""
+
+#: elfxx-mips.c:8116 elfxx-mips.c:8242
+#, c-format
+msgid "%B: Warning: cannot determine the target function for stub section `%s'"
+msgstr ""
+
+#: elfxx-mips.c:8374
+#, c-format
+msgid "%B: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elfxx-mips.c:8450
+#, c-format
+msgid "%B: GOT reloc at 0x%lx not expected in executables"
+msgstr ""
+
+#: elfxx-mips.c:8588
+#, c-format
+msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elfxx-mips.c:9369
+#, c-format
+msgid "non-dynamic relocations refer to dynamic symbol %s"
+msgstr ""
+
+#: elfxx-mips.c:10280
+#, c-format
+msgid ""
+"%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `"
+"%A'"
+msgstr ""
+
+#: elfxx-mips.c:10419
 msgid ""
-"error: %B contains a reloc (0x%s) for section %A that references a non-"
-"existent global symbol"
+"small-data section exceeds 64KB; lower small-data size limit (see option -G)"
 msgstr ""
 
-#: elflink.c:10369
-msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+#: elfxx-mips.c:10438
+msgid "Cannot convert a jump to JALX for a non-word-aligned address"
 msgstr ""
 
-#: elflink.c:10374
-#, c-format
-msgid "%A has both ordered and unordered sections"
+#: elfxx-mips.c:10441
+msgid "Jump to a non-word-aligned address"
 msgstr ""
 
-#: elflink.c:10982
-msgid "%B: file class %s incompatible with %s"
+#: elfxx-mips.c:10442
+msgid "Jump to a non-instruction-aligned address"
 msgstr ""
 
-#: elflink.c:11303 elflink.c:11347
-msgid "%B: could not find output section %s"
+#: elfxx-mips.c:10445
+msgid "Cannot convert a branch to JALX for a non-word-aligned address"
 msgstr ""
 
-#: elflink.c:11308
-#, c-format
-msgid "warning: %s section has zero size"
+#: elfxx-mips.c:10447
+msgid "Branch to a non-instruction-aligned address"
 msgstr ""
 
-#: elflink.c:11353
-#, c-format
-msgid "warning: section '%s' is being made into a note"
+#: elfxx-mips.c:10449
+msgid "PC-relative load from unaligned address"
 msgstr ""
 
-#: elflink.c:11419
-msgid "%P%X: read-only segment has dynamic relocations.\n"
+#: elfxx-mips.c:10823 elfxx-mips.c:11387
+#, c-format
+msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
 msgstr ""
 
-#: elflink.c:11422
-msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+#: elfxx-mips.c:14295
+#, c-format
+msgid "%B: Unknown architecture %s"
 msgstr ""
 
-#: elflink.c:11545
-msgid "%P%X: can not read symbols: %E\n"
+#: elfxx-mips.c:14825
+#, c-format
+msgid "%s: illegal section name `%s'"
 msgstr ""
 
-#: elflink.c:11989
-msgid "Removing unused section '%s' in file '%B'"
+#: elfxx-mips.c:15103
+msgid "%B: warning: linking abicalls files with non-abicalls files"
 msgstr ""
 
-#: elflink.c:12200
-msgid "Warning: gc-sections option ignored"
+#: elfxx-mips.c:15120
+msgid "%B: linking 32-bit code with 64-bit code"
 msgstr ""
 
-#: elflink.c:12489
+#: elfxx-mips.c:15152 elfxx-mips.c:15218 elfxx-mips.c:15233
 #, c-format
-msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgid "%B: linking %s module with previous %s modules"
 msgstr ""
 
-#: elfxx-mips.c:1419
-msgid "static procedure (no name)"
+#: elfxx-mips.c:15176
+#, c-format
+msgid "%B: ABI mismatch: linking %s module with previous %s modules"
 msgstr ""
 
-#: elfxx-mips.c:5476
-msgid "MIPS16 and microMIPS functions cannot call each other"
+#: elfxx-mips.c:15201
+#, c-format
+msgid "%B: ASE mismatch: linking %s module with previous %s modules"
 msgstr ""
 
-#: elfxx-mips.c:6087
+#: elfxx-mips.c:15336
 msgid ""
-"%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with "
-"interlinking enabled."
-msgstr ""
-
-#: elfxx-mips.c:6756 elfxx-mips.c:6979
-msgid "%B: Warning: bad `%s' option size %u smaller than its header"
+"Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown "
+"floating point ABI %d"
 msgstr ""
 
-#: elfxx-mips.c:7734 elfxx-mips.c:7859
-msgid "%B: Warning: cannot determine the target function for stub section `%s'"
+#: elfxx-mips.c:15342
+#, c-format
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
 msgstr ""
 
-#: elfxx-mips.c:7990
-msgid "%B: Malformed reloc detected for section %s"
+#: elfxx-mips.c:15348
+#, c-format
+msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
 msgstr ""
 
-#: elfxx-mips.c:8065
-msgid "%B: GOT reloc at 0x%lx not expected in executables"
+#: elfxx-mips.c:15362
+#, c-format
+msgid "Warning: %B uses %s (set by %B), %B uses %s"
 msgstr ""
 
-#: elfxx-mips.c:8199
-msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
+#: elfxx-mips.c:15381
+#, c-format
+msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
 msgstr ""
 
-#: elfxx-mips.c:8977
+#: elfxx-mips.c:15393
 #, c-format
-msgid "non-dynamic relocations refer to dynamic symbol %s"
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
 msgstr ""
 
-#: elfxx-mips.c:9877
+#: elfxx-mips.c:15402
+#, c-format
 msgid ""
-"%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `"
-"%A'"
+"Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
 msgstr ""
 
-#: elfxx-mips.c:10016
-msgid ""
-"small-data section exceeds 64KB; lower small-data size limit (see option -G)"
+#: elfxx-mips.c:15465
+msgid "%B: endianness incompatible with that of the selected emulation"
 msgstr ""
 
-#: elfxx-mips.c:10035
-msgid "JALX to a non-word-aligned address"
+#: elfxx-mips.c:15479
+msgid "%B: ABI is incompatible with that of the selected emulation"
 msgstr ""
 
-#: elfxx-mips.c:10402 elfxx-mips.c:10966
-msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
+#: elfxx-mips.c:15531
+msgid "%B: warning: Inconsistent ISA between e_flags and .MIPS.abiflags"
 msgstr ""
 
-#: elfxx-mips.c:13990
-#, c-format
-msgid "%s: illegal section name `%s'"
+#: elfxx-mips.c:15536
+msgid ""
+"%B: warning: Inconsistent FP ABI between .gnu.attributes and .MIPS.abiflags"
 msgstr ""
 
-#: elfxx-mips.c:14375 elfxx-mips.c:14381 elfxx-mips.c:14387 elfxx-mips.c:14407
-#: elfxx-mips.c:14413 elfxx-mips.c:14419 elfxx-mips.c:14441 elfxx-mips.c:14460
-#: elfxx-mips.c:14467 elfxx-mips.c:14474
-msgid "Warning: %B uses %s (set by %B), %B uses %s"
+#: elfxx-mips.c:15540
+msgid "%B: warning: Inconsistent ASEs between e_flags and .MIPS.abiflags"
 msgstr ""
 
-#: elfxx-mips.c:14394 elfxx-mips.c:14426 elfxx-mips.c:14447 elfxx-mips.c:14480
-msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
+#: elfxx-mips.c:15547
+msgid ""
+"%B: warning: Inconsistent ISA extensions between e_flags and .MIPS.abiflags"
 msgstr ""
 
-#: elfxx-mips.c:14493 elfxx-mips.c:14501 elfxx-mips.c:14509 elfxx-mips.c:14517
-msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
+#: elfxx-mips.c:15551
+msgid ""
+"%B: warning: Unexpected flag in the flags2 field of .MIPS.abiflags (0x%lx)"
 msgstr ""
 
-#: elfxx-mips.c:14525
-msgid ""
-"Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown "
-"floating point ABI %d"
+#: elfxx-mips.c:15740
+msgid "-mips32r2 -mfp64 (12 callee-saved)"
 msgstr ""
 
-#: elfxx-mips.c:14548
-msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
+#: elfxx-mips.c:15788 elfxx-mips.c:15799
+msgid "None"
 msgstr ""
 
-#: elfxx-mips.c:14559
-msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
+#: elfxx-mips.c:15790 elfxx-mips.c:15859
+msgid "Unknown"
 msgstr ""
 
-#: elfxx-mips.c:14567
-msgid ""
-"Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
+#: elfxx-mips.c:15870
+#, c-format
+msgid "Hard or soft float\n"
 msgstr ""
 
-#: elfxx-mips.c:14599
-msgid "%B: endianness incompatible with that of the selected emulation"
+#: elfxx-mips.c:15873
+#, c-format
+msgid "Hard float (double precision)\n"
 msgstr ""
 
-#: elfxx-mips.c:14610
-msgid "%B: ABI is incompatible with that of the selected emulation"
+#: elfxx-mips.c:15876
+#, c-format
+msgid "Hard float (single precision)\n"
 msgstr ""
 
-#: elfxx-mips.c:14694
-msgid "%B: warning: linking abicalls files with non-abicalls files"
+#: elfxx-mips.c:15879
+#, c-format
+msgid "Soft float\n"
 msgstr ""
 
-#: elfxx-mips.c:14711
-msgid "%B: linking 32-bit code with 64-bit code"
+#: elfxx-mips.c:15882
+#, c-format
+msgid "Hard float (MIPS32r2 64-bit FPU 12 callee-saved)\n"
 msgstr ""
 
-#: elfxx-mips.c:14739 elfxx-mips.c:14802
-msgid "%B: linking %s module with previous %s modules"
+#: elfxx-mips.c:15885
+#, c-format
+msgid "Hard float (32-bit CPU, Any FPU)\n"
 msgstr ""
 
-#: elfxx-mips.c:14762
-msgid "%B: ABI mismatch: linking %s module with previous %s modules"
+#: elfxx-mips.c:15888
+#, c-format
+msgid "Hard float (32-bit CPU, 64-bit FPU)\n"
 msgstr ""
 
-#: elfxx-mips.c:14786
-msgid "%B: ASE mismatch: linking %s module with previous %s modules"
+#: elfxx-mips.c:15891
+#, c-format
+msgid "Hard float compat (32-bit CPU, 64-bit FPU)\n"
 msgstr ""
 
-#: elfxx-mips.c:14958
+#: elfxx-mips.c:15923
 #, c-format
 msgid " [abi=O32]"
 msgstr ""
 
-#: elfxx-mips.c:14960
+#: elfxx-mips.c:15925
 #, c-format
 msgid " [abi=O64]"
 msgstr ""
 
-#: elfxx-mips.c:14962
+#: elfxx-mips.c:15927
 #, c-format
 msgid " [abi=EABI32]"
 msgstr ""
 
-#: elfxx-mips.c:14964
+#: elfxx-mips.c:15929
 #, c-format
 msgid " [abi=EABI64]"
 msgstr ""
 
-#: elfxx-mips.c:14966
+#: elfxx-mips.c:15931
 #, c-format
 msgid " [abi unknown]"
 msgstr ""
 
-#: elfxx-mips.c:14968
+#: elfxx-mips.c:15933
 #, c-format
 msgid " [abi=N32]"
 msgstr ""
 
-#: elfxx-mips.c:14970
+#: elfxx-mips.c:15935
 #, c-format
 msgid " [abi=64]"
 msgstr ""
 
-#: elfxx-mips.c:14972
+#: elfxx-mips.c:15937
 #, c-format
 msgid " [no abi set]"
 msgstr ""
 
-#: elfxx-mips.c:14993
+#: elfxx-mips.c:15962
 #, c-format
 msgid " [unknown ISA]"
 msgstr ""
 
-#: elfxx-mips.c:15013
+#: elfxx-mips.c:15982
 #, c-format
 msgid " [not 32bitmode]"
 msgstr ""
 
-#: elfxx-sparc.c:640
+#: elfxx-riscv.c:932
+#, c-format
+msgid "unrecognized relocation (0x%x)"
+msgstr ""
+
+#: elfxx-sparc.c:639
 #, c-format
 msgid "invalid relocation type %d"
 msgstr ""
 
-#: elfxx-tilegx.c:4433
+#: elfxx-sparc.c:3153
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:4975
+#, c-format
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+msgstr ""
+
+#: elfxx-tilegx.c:4442
+#, c-format
 msgid "%B: Cannot link together %s and %s objects."
 msgstr ""
 
-#: i386linux.c:418 m68klinux.c:421 sparclinux.c:414
+#: i386linux.c:416 m68klinux.c:419 sparclinux.c:412
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr ""
 
-#: i386linux.c:426 m68klinux.c:429 sparclinux.c:422
+#: i386linux.c:424 m68klinux.c:428 sparclinux.c:421
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr ""
 
-#: i386linux.c:613 i386linux.c:663 m68klinux.c:618 m68klinux.c:666
-#: sparclinux.c:609 sparclinux.c:659
+#: i386linux.c:611 i386linux.c:661 m68klinux.c:617 m68klinux.c:665
+#: sparclinux.c:608 sparclinux.c:658
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr ""
 
-#: i386linux.c:687 m68klinux.c:690 sparclinux.c:683
+#: i386linux.c:685 m68klinux.c:689 sparclinux.c:682
 msgid "Warning: fixup count mismatch\n"
 msgstr ""
 
-#: ieee.c:158
+#: ieee.c:159
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr ""
 
-#: ieee.c:285
+#: ieee.c:294
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr ""
 
-#: ieee.c:791
+#: ieee.c:830
+#, c-format
 msgid "%B: unimplemented ATI record %u for symbol %u"
 msgstr ""
 
-#: ieee.c:815
+#: ieee.c:855
+#, c-format
 msgid "%B: unexpected ATN type %d in external part"
 msgstr ""
 
-#: ieee.c:837
+#: ieee.c:877
 msgid "%B: unexpected type after ATN"
 msgstr ""
 
 #: ihex.c:230
+#, c-format
 msgid "%B:%d: unexpected character `%s' in Intel Hex file"
 msgstr ""
 
-#: ihex.c:337
+#: ihex.c:338
+#, c-format
 msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr ""
 
-#: ihex.c:392
+#: ihex.c:394
+#, c-format
 msgid "%B:%u: bad extended address record length in Intel Hex file"
 msgstr ""
 
-#: ihex.c:409
+#: ihex.c:412
+#, c-format
 msgid "%B:%u: bad extended start address length in Intel Hex file"
 msgstr ""
 
-#: ihex.c:426
+#: ihex.c:430
+#, c-format
 msgid "%B:%u: bad extended linear address record length in Intel Hex file"
 msgstr ""
 
-#: ihex.c:443
+#: ihex.c:448
+#, c-format
 msgid "%B:%u: bad extended linear start address length in Intel Hex file"
 msgstr ""
 
-#: ihex.c:460
+#: ihex.c:466
+#, c-format
 msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
 msgstr ""
 
-#: ihex.c:579
+#: ihex.c:585
 msgid "%B: internal error in ihex_read_section"
 msgstr ""
 
-#: ihex.c:613
+#: ihex.c:619
 msgid "%B: bad section length in ihex_read_section"
 msgstr ""
 
-#: ihex.c:826
+#: ihex.c:833
 #, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr ""
 
-#: libbfd.c:863
+#: libbfd.c:790
+#, c-format
 msgid "%B: unable to get decompressed section %A"
 msgstr ""
 
-#: libbfd.c:1012
-msgid "%B: compiled for a big endian system and target is little endian"
-msgstr ""
-
-#: libbfd.c:1014
-msgid "%B: compiled for a little endian system and target is big endian"
-msgstr ""
-
-#: libbfd.c:1043
+#: libbfd.c:945
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr ""
 
-#: libbfd.c:1046
+#: libbfd.c:948
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr ""
 
-#: linker.c:1873
+#: linker.c:1743
+#, c-format
 msgid "%B: indirect symbol `%s' to `%s' is a loop"
 msgstr ""
 
-#: linker.c:2750
+#: linker.c:2612
 #, c-format
 msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr ""
 
-#: linker.c:3035
+#: linker.c:2898
+#, c-format
 msgid "%B: ignoring duplicate section `%A'\n"
 msgstr ""
 
-#: linker.c:3044 linker.c:3053
+#: linker.c:2908 linker.c:2918
+#, c-format
 msgid "%B: duplicate section `%A' has different size\n"
 msgstr ""
 
-#: linker.c:3061 linker.c:3066
+#: linker.c:2927 linker.c:2933
+#, c-format
 msgid "%B: could not read contents of section `%A'\n"
 msgstr ""
 
-#: linker.c:3070
+#: linker.c:2938
+#, c-format
 msgid "%B: duplicate section `%A' has different contents\n"
 msgstr ""
 
-#: mach-o.c:648
+#: linker.c:3389
+msgid "%B: compiled for a big endian system and target is little endian"
+msgstr ""
+
+#: linker.c:3392
+msgid "%B: compiled for a little endian system and target is big endian"
+msgstr ""
+
+#: mach-o.c:779
 msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols"
 msgstr ""
 
-#: mach-o.c:1918
+#: mach-o.c:1981
+msgid ""
+"sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab "
+"commands."
+msgstr ""
+
+#: mach-o.c:2424
+#, c-format
+msgid "mach-o: there are too many sections (%u) maximum is 255,\n"
+msgstr ""
+
+#: mach-o.c:2531
 #, c-format
-msgid "mach-o: there are too many sections (%d) maximum is 255,\n"
+msgid "unable to allocate data for load command 0x%lx"
 msgstr ""
 
-#: mach-o.c:2017
+#: mach-o.c:2636
 #, c-format
 msgid "unable to write unknown load command 0x%lx"
 msgstr ""
 
-#: mach-o.c:2272
+#: mach-o.c:2820
+#, c-format
+msgid "section address (%lx) below start of segment (%lx)"
+msgstr ""
+
+#: mach-o.c:2961
+#, c-format
+msgid "unable to layout unknown load command 0x%lx"
+msgstr ""
+
+#: mach-o.c:3497
+#, c-format
 msgid ""
-"sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab "
-"commands."
+"bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, using 32 instead"
+msgstr ""
+
+#: mach-o.c:3540
+#, c-format
+msgid ""
+"bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, using 32 instead"
 msgstr ""
 
-#: mach-o.c:2898
+#: mach-o.c:3591
 #, c-format
 msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"
 msgstr ""
 
-#: mach-o.c:2916
+#: mach-o.c:3610
 #, c-format
 msgid "bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"
 msgstr ""
 
-#: mach-o.c:2997
+#: mach-o.c:3693
 #, c-format
 msgid ""
 "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d "
 "(max %lu): setting to undefined"
 msgstr ""
 
-#: mach-o.c:3013
+#: mach-o.c:3712
 #, c-format
 msgid ""
 "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x"
 "%x: setting to undefined"
 msgstr ""
 
-#: mach-o.c:3085
+#: mach-o.c:3786
 msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"
 msgstr ""
 
-#: mach-o.c:3915
+#: mach-o.c:4759
 msgid "%B: unknown load command 0x%lx"
 msgstr ""
 
-#: mach-o.c:4107
+#: mach-o.c:4950
 #, c-format
 msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"
 msgstr ""
 
-#: mach-o.c:4204
+#: mach-o.c:5055
 #, c-format
 msgid "unknown header byte-order value 0x%lx"
 msgstr ""
 
-#: merge.c:832
+#: merge.c:864
 #, c-format
 msgid "%s: access beyond end of merged section (%ld)"
 msgstr ""
 
-#: mmo.c:455
+#: mmo.c:468
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
 msgstr ""
 
-#: mmo.c:530
+#: mmo.c:544
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr ""
 
-#: mmo.c:1189
+#: mmo.c:958
+#, c-format
+msgid "%s: attempt to emit contents at non-multiple-of-4 address 0x%lx\n"
+msgstr ""
+
+#: mmo.c:1254
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr ""
 
-#: mmo.c:1334
+#: mmo.c:1400
 #, c-format
 msgid ""
 "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
 "starting with `%s'\n"
 msgstr ""
 
-#: mmo.c:1568
+#: mmo.c:1635
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr ""
 
-#: mmo.c:1578
+#: mmo.c:1646
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr ""
 
-#: mmo.c:1614
+#: mmo.c:1683
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr ""
 
-#: mmo.c:1660
+#: mmo.c:1733
 #, c-format
 msgid ""
 "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr ""
 
-#: mmo.c:1699
+#: mmo.c:1773
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr ""
 
-#: mmo.c:1708
+#: mmo.c:1783
 #, c-format
 msgid ""
 "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr ""
 
-#: mmo.c:1731
+#: mmo.c:1807
 #, c-format
 msgid ""
 "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
 "for lop_fixrx\n"
 msgstr ""
 
-#: mmo.c:1754
+#: mmo.c:1831
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr ""
 
-#: mmo.c:1774
+#: mmo.c:1852
 #, c-format
 msgid ""
 "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr ""
 
-#: mmo.c:1787
+#: mmo.c:1866
 #, c-format
 msgid ""
 "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr ""
 
-#: mmo.c:1893
+#: mmo.c:1973
 #, c-format
 msgid ""
 "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr ""
 
-#: mmo.c:1929
+#: mmo.c:2010
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr ""
 
-#: mmo.c:1942
+#: mmo.c:2024
 #, c-format
 msgid ""
 "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
 "to the preceding lop_stab (%ld)\n"
 msgstr ""
 
-#: mmo.c:2652
+#: mmo.c:2735
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr ""
 
-#: mmo.c:2892
+#: mmo.c:2978
 #, c-format
 msgid ""
 "%s: Bad symbol definition: `Main' set to %s rather than the start address "
 "%s\n"
 msgstr ""
 
-#: mmo.c:2984
+#: mmo.c:3077
 #, c-format
 msgid ""
 "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
 "%d.  Only `Main' will be emitted.\n"
 msgstr ""
 
-#: mmo.c:3029
+#: mmo.c:3123
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr ""
 
-#: mmo.c:3081
+#: mmo.c:3176
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr ""
 
-#: mmo.c:3132
+#: mmo.c:3227
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr ""
 
-#: mmo.c:3138
+#: mmo.c:3234
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr ""
 
-#: mmo.c:3143
+#: mmo.c:3240
 #, c-format
 msgid ""
 "%s: invalid start address for initialized registers of length %ld: 0x%lx"
@@ -4137,12 +5638,23 @@ msgstr ""
 msgid "%s: can not represent section `%s' in oasys"
 msgstr ""
 
-#: osf-core.c:128
+#: osf-core.c:127
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
 msgstr ""
 
-#: pe-mips.c:607
+#: pdp11.c:1385
+#, c-format
+msgid ""
+"%B: can not represent section for symbol `%s' in a.out object file format"
+msgstr ""
+
+#: pdp11.c:1413
+#, c-format
+msgid "%B: can not represent section `%A' in a.out object file format"
+msgstr ""
+
+#: pe-mips.c:609
 msgid "%B: `ld -r' not supported with PE MIPS objects\n"
 msgstr ""
 
@@ -4150,154 +5662,220 @@ msgstr ""
 #. src = VMA of the memory we're fixing up
 #. mem = pointer to memory we're fixing up
 #. val = VMA of what we need to refer to.
-#: pe-mips.c:719
+#: pe-mips.c:720
+#, c-format
 msgid "%B: unimplemented %s\n"
 msgstr ""
 
-#: pe-mips.c:745
+#: pe-mips.c:746
 msgid "%B: jump too far away\n"
 msgstr ""
 
-#: pe-mips.c:771
+#: pe-mips.c:772
 msgid "%B: bad pair/reflo after refhi\n"
 msgstr ""
 
-#: pef.c:522
+#: pef.c:525
 #, c-format
 msgid "bfd_pef_scan: unknown architecture 0x%lx"
 msgstr ""
 
-#: pei-x86_64.c:469
+#. PR 17512: file: 2245-7442-0.004.
+#: pei-x86_64.c:281
+#, c-format
+msgid "Unknown: %x"
+msgstr ""
+
+#: pei-x86_64.c:331
+#, c-format
+msgid "warning: xdata section corrupt\n"
+msgstr ""
+
+#: pei-x86_64.c:341
+#, c-format
+msgid "warning: xdata section corrupt"
+msgstr ""
+
+#: pei-x86_64.c:401
+#, c-format
+msgid "Too many unwind codes (%ld)\n"
+msgstr ""
+
+#: pei-x86_64.c:491
+#, c-format
+msgid "Warning: %s section size (%ld) is not a multiple of %d\n"
+msgstr ""
+
+#: pei-x86_64.c:498
+#, c-format
+msgid "Warning: %s section size is zero\n"
+msgstr ""
+
+#: pei-x86_64.c:513
 #, c-format
-msgid "warning: .pdata section size (%ld) is not a multiple of %d\n"
+msgid "Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"
 msgstr ""
 
-#: pei-x86_64.c:474 peigen.c:1626 peigen.c:1809 pepigen.c:1626 pepigen.c:1809
-#: pex64igen.c:1626 pex64igen.c:1809
+#: pei-x86_64.c:522
 #, c-format
 msgid ""
 "\n"
-"The Function Table (interpreted .pdata section contents)\n"
+"The Function Table (interpreted %s section contents)\n"
 msgstr ""
 
-#: pei-x86_64.c:476
+#: pei-x86_64.c:525
 #, c-format
 msgid "vma:\t\t\tBeginAddress\t EndAddress\t  UnwindData\n"
 msgstr ""
 
+#: pei-x86_64.c:654
+#, c-format
+msgid ""
+"\n"
+"Dump of %s\n"
+msgstr ""
+
 #. XXX code yet to be written.
-#: peicode.h:758
+#: peicode.h:775
+#, c-format
 msgid "%B: Unhandled import type; %x"
 msgstr ""
 
-#: peicode.h:763
+#: peicode.h:781
+#, c-format
 msgid "%B: Unrecognised import type; %x"
 msgstr ""
 
-#: peicode.h:777
+#: peicode.h:796
+#, c-format
 msgid "%B: Unrecognised import name type; %x"
 msgstr ""
 
-#: peicode.h:1173
+#: peicode.h:1217
+#, c-format
 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr ""
 
-#: peicode.h:1185
+#: peicode.h:1230
+#, c-format
 msgid ""
 "%B: Recognised but unhandled machine type (0x%x) in Import Library Format "
 "archive"
 msgstr ""
 
-#: peicode.h:1203
+#: peicode.h:1248
 msgid "%B: size field is zero in Import Library Format header"
 msgstr ""
 
-#: peicode.h:1234
+#: peicode.h:1280
 msgid "%B: string not null terminated in ILF object file."
 msgstr ""
 
-#: ppcboot.c:391
+#: peicode.h:1333
+msgid "%B: Error: Debug Data ends beyond end of debug directory."
+msgstr ""
+
+#: ppcboot.c:393
 #, c-format
 msgid ""
 "\n"
 "ppcboot header:\n"
 msgstr ""
 
-#: ppcboot.c:392
+#: ppcboot.c:394
 #, c-format
 msgid "Entry offset        = 0x%.8lx (%ld)\n"
 msgstr ""
 
-#: ppcboot.c:394
+#: ppcboot.c:396
 #, c-format
 msgid "Length              = 0x%.8lx (%ld)\n"
 msgstr ""
 
-#: ppcboot.c:398
+#: ppcboot.c:400
 #, c-format
 msgid "Flag field          = 0x%.2x\n"
 msgstr ""
 
-#: ppcboot.c:404
+#: ppcboot.c:406
 #, c-format
 msgid "Partition name      = \"%s\"\n"
 msgstr ""
 
-#: ppcboot.c:423
+#: ppcboot.c:426
 #, c-format
 msgid ""
 "\n"
 "Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 msgstr ""
 
-#: ppcboot.c:429
+#: ppcboot.c:433
 #, c-format
 msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 msgstr ""
 
-#: ppcboot.c:435
+#: ppcboot.c:440
 #, c-format
 msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
 msgstr ""
 
-#: ppcboot.c:437
+#: ppcboot.c:444
 #, c-format
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr ""
 
-#: reloc.c:7371
+#: reloc.c:7978
 msgid "INPUT_SECTION_FLAGS are not supported.\n"
 msgstr ""
 
-#: reloc.c:7526
-msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+#: reloc.c:8076
+#, c-format
+msgid "%X%P: %B(%A): error: relocation for offset %V has no value\n"
+msgstr ""
+
+#: reloc.c:8152
+#, c-format
+msgid "%X%P: %B(%A): relocation \"%R\" is not supported\n"
 msgstr ""
 
-#: rs6000-core.c:448
+#: reloc.c:8161
+#, c-format
+msgid "%X%P: %B(%A): relocation \"%R\" returns an unrecognized value %x\n"
+msgstr ""
+
+#: rs6000-core.c:471
 #, c-format
 msgid "%s: warning core file truncated"
 msgstr ""
 
-#: som.c:5471
+#: som.c:5473
 #, c-format
 msgid ""
 "\n"
 "Exec Auxiliary Header\n"
 msgstr ""
 
-#: som.c:5776
+#: som.c:5782
 msgid "som_sizeof_headers unimplemented"
 msgstr ""
 
-#: srec.c:261
+#: srec.c:260
+#, c-format
 msgid "%B:%d: Unexpected character `%s' in S-record file\n"
 msgstr ""
 
-#: srec.c:567 srec.c:600
+#: srec.c:488
+#, c-format
+msgid "%B:%d: byte count %d too small\n"
+msgstr ""
+
+#: srec.c:581 srec.c:615
+#, c-format
 msgid "%B:%d: Bad checksum in S-record file\n"
 msgstr ""
 
 #: stabs.c:279
+#, c-format
 msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
 msgstr ""
 
@@ -4305,32 +5883,32 @@ msgstr ""
 msgid "Unsupported .stab relocation"
 msgstr ""
 
-#: vms-alpha.c:1294
+#: vms-alpha.c:1317
 #, c-format
 msgid "Unknown EGSD subtype %d"
 msgstr ""
 
-#: vms-alpha.c:1325
+#: vms-alpha.c:1348
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr ""
 
-#: vms-alpha.c:1338
+#: vms-alpha.c:1361
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr ""
 
 #. These names have not yet been added to this switch statement.
-#: vms-alpha.c:1575
+#: vms-alpha.c:1598
 #, c-format
 msgid "unknown ETIR command %d"
 msgstr ""
 
-#: vms-alpha.c:1762
+#: vms-alpha.c:1784
 #, c-format
 msgid "bad section index in %s"
 msgstr ""
 
-#: vms-alpha.c:1775
+#: vms-alpha.c:1797
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr ""
@@ -4340,2100 +5918,2265 @@ msgstr ""
 #. Rotate.
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-alpha.c:1951 vms-alpha.c:1982 vms-alpha.c:2229
+#: vms-alpha.c:1973 vms-alpha.c:2004 vms-alpha.c:2095 vms-alpha.c:2251
 #, c-format
 msgid "%s: not supported"
 msgstr ""
 
-#: vms-alpha.c:1957
+#: vms-alpha.c:1979
 #, c-format
 msgid "%s: not implemented"
 msgstr ""
 
-#: vms-alpha.c:2213
+#: vms-alpha.c:2235
 #, c-format
 msgid "invalid use of %s with contexts"
 msgstr ""
 
-#: vms-alpha.c:2247
+#: vms-alpha.c:2269
 #, c-format
 msgid "reserved cmd %d"
 msgstr ""
 
-#: vms-alpha.c:2332
+#: vms-alpha.c:2354
 msgid "Object module NOT error-free !\n"
 msgstr ""
 
-#: vms-alpha.c:3657
+#: vms-alpha.c:3675
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr ""
 
-#: vms-alpha.c:3709 vms-alpha.c:3922
+#: vms-alpha.c:3727 vms-alpha.c:3940
 #, c-format
 msgid "Size error in section %s"
 msgstr ""
 
-#: vms-alpha.c:3868
+#: vms-alpha.c:3886
 msgid "Spurious ALPHA_R_BSR reloc"
 msgstr ""
 
-#: vms-alpha.c:3909
+#: vms-alpha.c:3927
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr ""
 
-#: vms-alpha.c:4199
+#: vms-alpha.c:4217
 #, c-format
 msgid "unknown source command %d"
 msgstr ""
 
-#: vms-alpha.c:4260
+#: vms-alpha.c:4278
 msgid "DST__K_SET_LINUM_INCR not implemented"
 msgstr ""
 
-#: vms-alpha.c:4266
+#: vms-alpha.c:4284
 msgid "DST__K_SET_LINUM_INCR_W not implemented"
 msgstr ""
 
-#: vms-alpha.c:4272
+#: vms-alpha.c:4290
 msgid "DST__K_RESET_LINUM_INCR not implemented"
 msgstr ""
 
-#: vms-alpha.c:4278
+#: vms-alpha.c:4296
 msgid "DST__K_BEG_STMT_MODE not implemented"
 msgstr ""
 
-#: vms-alpha.c:4284
+#: vms-alpha.c:4302
 msgid "DST__K_END_STMT_MODE not implemented"
 msgstr ""
 
-#: vms-alpha.c:4311
+#: vms-alpha.c:4329
 msgid "DST__K_SET_PC not implemented"
 msgstr ""
 
-#: vms-alpha.c:4317
+#: vms-alpha.c:4335
 msgid "DST__K_SET_PC_W not implemented"
 msgstr ""
 
-#: vms-alpha.c:4323
+#: vms-alpha.c:4341
 msgid "DST__K_SET_PC_L not implemented"
 msgstr ""
 
-#: vms-alpha.c:4329
+#: vms-alpha.c:4347
 msgid "DST__K_SET_STMTNUM not implemented"
 msgstr ""
 
-#: vms-alpha.c:4372
+#: vms-alpha.c:4390
 #, c-format
 msgid "unknown line command %d"
 msgstr ""
 
-#: vms-alpha.c:4846 vms-alpha.c:4863 vms-alpha.c:4877 vms-alpha.c:4892
-#: vms-alpha.c:4904 vms-alpha.c:4915 vms-alpha.c:4927
+#: vms-alpha.c:4850 vms-alpha.c:4868 vms-alpha.c:4883 vms-alpha.c:4899
+#: vms-alpha.c:4912 vms-alpha.c:4924 vms-alpha.c:4937
 #, c-format
 msgid "Unknown reloc %s + %s"
 msgstr ""
 
-#: vms-alpha.c:4982
+#: vms-alpha.c:4992
 #, c-format
 msgid "Unknown reloc %s"
 msgstr ""
 
-#: vms-alpha.c:4995
+#: vms-alpha.c:5005
 msgid "Invalid section index in ETIR"
 msgstr ""
 
-#: vms-alpha.c:5002
+#: vms-alpha.c:5012
 msgid "Relocation for non-REL psect"
 msgstr ""
 
-#: vms-alpha.c:5049
+#: vms-alpha.c:5059
 #, c-format
 msgid "Unknown symbol in command %s"
 msgstr ""
 
-#: vms-alpha.c:5564
+#: vms-alpha.c:5460
+#, c-format
+msgid "reloc (%d) is *UNKNOWN*"
+msgstr ""
+
+#: vms-alpha.c:5575
 #, c-format
 msgid "  EMH %u (len=%u): "
 msgstr ""
 
-#: vms-alpha.c:5573
+#: vms-alpha.c:5584
 #, c-format
 msgid "Module header\n"
 msgstr ""
 
-#: vms-alpha.c:5574
+#: vms-alpha.c:5585
 #, c-format
 msgid "   structure level: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5575
+#: vms-alpha.c:5586
 #, c-format
 msgid "   max record size: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5578
+#: vms-alpha.c:5589
 #, c-format
 msgid "   module name    : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5580
+#: vms-alpha.c:5591
 #, c-format
 msgid "   module version : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5582
+#: vms-alpha.c:5593
 #, c-format
 msgid "   compile date   : %.17s\n"
 msgstr ""
 
-#: vms-alpha.c:5587
+#: vms-alpha.c:5598
 #, c-format
 msgid "Language Processor Name\n"
 msgstr ""
 
-#: vms-alpha.c:5588
+#: vms-alpha.c:5599
 #, c-format
 msgid "   language name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5595
+#: vms-alpha.c:5606
 #, c-format
 msgid "Source Files Header\n"
 msgstr ""
 
-#: vms-alpha.c:5596
+#: vms-alpha.c:5607
 #, c-format
 msgid "   file: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5603
+#: vms-alpha.c:5614
 #, c-format
 msgid "Title Text Header\n"
 msgstr ""
 
-#: vms-alpha.c:5604
+#: vms-alpha.c:5615
 #, c-format
 msgid "   title: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5611
+#: vms-alpha.c:5622
 #, c-format
 msgid "Copyright Header\n"
 msgstr ""
 
-#: vms-alpha.c:5612
+#: vms-alpha.c:5623
 #, c-format
 msgid "   copyright: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5618
+#: vms-alpha.c:5629
 #, c-format
 msgid "unhandled emh subtype %u\n"
 msgstr ""
 
-#: vms-alpha.c:5628
+#: vms-alpha.c:5639
 #, c-format
 msgid "  EEOM (len=%u):\n"
 msgstr ""
 
-#: vms-alpha.c:5629
+#: vms-alpha.c:5640
 #, c-format
 msgid "   number of cond linkage pairs: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5631
+#: vms-alpha.c:5642
 #, c-format
 msgid "   completion code: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5635
+#: vms-alpha.c:5646
 #, c-format
 msgid "   transfer addr flags: 0x%02x\n"
 msgstr ""
 
-#: vms-alpha.c:5636
+#: vms-alpha.c:5647
 #, c-format
 msgid "   transfer addr psect: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5638
+#: vms-alpha.c:5649
 #, c-format
 msgid "   transfer address   : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5647
+#: vms-alpha.c:5658
 msgid " WEAK"
 msgstr ""
 
-#: vms-alpha.c:5649
+#: vms-alpha.c:5660
 msgid " DEF"
 msgstr ""
 
-#: vms-alpha.c:5651
+#: vms-alpha.c:5662
 msgid " UNI"
 msgstr ""
 
-#: vms-alpha.c:5653 vms-alpha.c:5674
+#: vms-alpha.c:5664 vms-alpha.c:5685
 msgid " REL"
 msgstr ""
 
-#: vms-alpha.c:5655
+#: vms-alpha.c:5666
 msgid " COMM"
 msgstr ""
 
-#: vms-alpha.c:5657
+#: vms-alpha.c:5668
 msgid " VECEP"
 msgstr ""
 
-#: vms-alpha.c:5659
+#: vms-alpha.c:5670
 msgid " NORM"
 msgstr ""
 
-#: vms-alpha.c:5661
+#: vms-alpha.c:5672
 msgid " QVAL"
 msgstr ""
 
-#: vms-alpha.c:5668
+#: vms-alpha.c:5679
 msgid " PIC"
 msgstr ""
 
-#: vms-alpha.c:5670
+#: vms-alpha.c:5681
 msgid " LIB"
 msgstr ""
 
-#: vms-alpha.c:5672
+#: vms-alpha.c:5683
 msgid " OVR"
 msgstr ""
 
-#: vms-alpha.c:5676
+#: vms-alpha.c:5687
 msgid " GBL"
 msgstr ""
 
-#: vms-alpha.c:5678
+#: vms-alpha.c:5689
 msgid " SHR"
 msgstr ""
 
-#: vms-alpha.c:5680
+#: vms-alpha.c:5691
 msgid " EXE"
 msgstr ""
 
-#: vms-alpha.c:5682
+#: vms-alpha.c:5693
 msgid " RD"
 msgstr ""
 
-#: vms-alpha.c:5684
+#: vms-alpha.c:5695
 msgid " WRT"
 msgstr ""
 
-#: vms-alpha.c:5686
+#: vms-alpha.c:5697
 msgid " VEC"
 msgstr ""
 
-#: vms-alpha.c:5688
+#: vms-alpha.c:5699
 msgid " NOMOD"
 msgstr ""
 
-#: vms-alpha.c:5690
+#: vms-alpha.c:5701
 msgid " COM"
 msgstr ""
 
-#: vms-alpha.c:5692
+#: vms-alpha.c:5703
 msgid " 64B"
 msgstr ""
 
-#: vms-alpha.c:5701
+#: vms-alpha.c:5712
 #, c-format
 msgid "  EGSD (len=%u):\n"
 msgstr ""
 
-#: vms-alpha.c:5713
+#: vms-alpha.c:5725
 #, c-format
 msgid "  EGSD entry %2u (type: %u, len: %u): "
 msgstr ""
 
-#: vms-alpha.c:5725
+#: vms-alpha.c:5737
 #, c-format
 msgid "PSC - Program section definition\n"
 msgstr ""
 
-#: vms-alpha.c:5726 vms-alpha.c:5743
+#: vms-alpha.c:5738 vms-alpha.c:5755
 #, c-format
 msgid "   alignment  : 2**%u\n"
 msgstr ""
 
-#: vms-alpha.c:5727 vms-alpha.c:5744
+#: vms-alpha.c:5739 vms-alpha.c:5756
 #, c-format
 msgid "   flags      : 0x%04x"
 msgstr ""
 
-#: vms-alpha.c:5731
+#: vms-alpha.c:5743
 #, c-format
 msgid "   alloc (len): %u (0x%08x)\n"
 msgstr ""
 
-#: vms-alpha.c:5732 vms-alpha.c:5789 vms-alpha.c:5838
+#: vms-alpha.c:5744 vms-alpha.c:5801 vms-alpha.c:5850
 #, c-format
 msgid "   name       : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5742
+#: vms-alpha.c:5754
 #, c-format
 msgid "SPSC - Shared Image Program section def\n"
 msgstr ""
 
-#: vms-alpha.c:5748
+#: vms-alpha.c:5760
 #, c-format
 msgid "   alloc (len)   : %u (0x%08x)\n"
 msgstr ""
 
-#: vms-alpha.c:5749
+#: vms-alpha.c:5761
 #, c-format
 msgid "   image offset  : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5751
+#: vms-alpha.c:5763
 #, c-format
 msgid "   symvec offset : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5753
+#: vms-alpha.c:5765
 #, c-format
 msgid "   name          : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5766
+#: vms-alpha.c:5778
 #, c-format
 msgid "SYM - Global symbol definition\n"
 msgstr ""
 
-#: vms-alpha.c:5767 vms-alpha.c:5827 vms-alpha.c:5848 vms-alpha.c:5867
+#: vms-alpha.c:5779 vms-alpha.c:5839 vms-alpha.c:5860 vms-alpha.c:5879
 #, c-format
 msgid "   flags: 0x%04x"
 msgstr ""
 
-#: vms-alpha.c:5770
+#: vms-alpha.c:5782
 #, c-format
 msgid "   psect offset: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5774
+#: vms-alpha.c:5786
 #, c-format
 msgid "   code address: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5776
+#: vms-alpha.c:5788
 #, c-format
 msgid "   psect index for entry point : %u\n"
 msgstr ""
 
-#: vms-alpha.c:5779 vms-alpha.c:5855 vms-alpha.c:5874
+#: vms-alpha.c:5791 vms-alpha.c:5867 vms-alpha.c:5886
 #, c-format
 msgid "   psect index : %u\n"
 msgstr ""
 
-#: vms-alpha.c:5781 vms-alpha.c:5857 vms-alpha.c:5876
+#: vms-alpha.c:5793 vms-alpha.c:5869 vms-alpha.c:5888
 #, c-format
 msgid "   name        : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5788
+#: vms-alpha.c:5800
 #, c-format
 msgid "SYM - Global symbol reference\n"
 msgstr ""
 
-#: vms-alpha.c:5800
+#: vms-alpha.c:5812
 #, c-format
 msgid "IDC - Ident Consistency check\n"
 msgstr ""
 
-#: vms-alpha.c:5801
+#: vms-alpha.c:5813
 #, c-format
 msgid "   flags         : 0x%08x"
 msgstr ""
 
-#: vms-alpha.c:5805
+#: vms-alpha.c:5817
 #, c-format
 msgid "   id match      : %x\n"
 msgstr ""
 
-#: vms-alpha.c:5807
+#: vms-alpha.c:5819
 #, c-format
 msgid "   error severity: %x\n"
 msgstr ""
 
-#: vms-alpha.c:5810
+#: vms-alpha.c:5822
 #, c-format
 msgid "   entity name   : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5812
+#: vms-alpha.c:5824
 #, c-format
 msgid "   object name   : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5815
+#: vms-alpha.c:5827
 #, c-format
 msgid "   binary ident  : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5818
+#: vms-alpha.c:5830
 #, c-format
 msgid "   ascii ident   : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5826
+#: vms-alpha.c:5838
 #, c-format
 msgid "SYMG - Universal symbol definition\n"
 msgstr ""
 
-#: vms-alpha.c:5830
+#: vms-alpha.c:5842
 #, c-format
 msgid "   symbol vector offset: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5832
+#: vms-alpha.c:5844
 #, c-format
 msgid "   entry point: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5834
+#: vms-alpha.c:5846
 #, c-format
 msgid "   proc descr : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5836
+#: vms-alpha.c:5848
 #, c-format
 msgid "   psect index: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5847
+#: vms-alpha.c:5859
 #, c-format
 msgid "SYMV - Vectored symbol definition\n"
 msgstr ""
 
-#: vms-alpha.c:5851
+#: vms-alpha.c:5863
 #, c-format
 msgid "   vector      : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5853 vms-alpha.c:5872
+#: vms-alpha.c:5865 vms-alpha.c:5884
 #, c-format
 msgid "   psect offset: %u\n"
 msgstr ""
 
-#: vms-alpha.c:5866
+#: vms-alpha.c:5878
 #, c-format
 msgid "SYMM - Global symbol definition with version\n"
 msgstr ""
 
-#: vms-alpha.c:5870
+#: vms-alpha.c:5882
 #, c-format
 msgid "   version mask: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5881
+#: vms-alpha.c:5893
 #, c-format
 msgid "unhandled egsd entry type %u\n"
 msgstr ""
 
-#: vms-alpha.c:5915
+#: vms-alpha.c:5928
 #, c-format
 msgid "    linkage index: %u, replacement insn: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5918
+#: vms-alpha.c:5932
 #, c-format
 msgid "    psect idx 1: %u, offset 1: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:5922
+#: vms-alpha.c:5937
 #, c-format
 msgid "    psect idx 2: %u, offset 2: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:5927
+#: vms-alpha.c:5943
 #, c-format
 msgid "    psect idx 3: %u, offset 3: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:5932
+#: vms-alpha.c:5948
 #, c-format
 msgid "    global name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5942
+#: vms-alpha.c:5959
 #, c-format
 msgid "  %s (len=%u+%u):\n"
 msgstr ""
 
-#: vms-alpha.c:5957
+#: vms-alpha.c:5975
 #, c-format
 msgid "   (type: %3u, size: 4+%3u): "
 msgstr ""
 
-#: vms-alpha.c:5961
+#: vms-alpha.c:5979
 #, c-format
 msgid "STA_GBL (stack global) %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:5965
+#: vms-alpha.c:5983
 #, c-format
 msgid "STA_LW (stack longword) 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:5969
+#: vms-alpha.c:5987
 #, c-format
 msgid "STA_QW (stack quadword) 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:5974
+#: vms-alpha.c:5992
 #, c-format
 msgid "STA_PQ (stack psect base + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:5975
+#: vms-alpha.c:5994
 #, c-format
 msgid "    psect: %u, offset: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:5981
+#: vms-alpha.c:6000
 #, c-format
 msgid "STA_LI (stack literal)\n"
 msgstr ""
 
-#: vms-alpha.c:5984
+#: vms-alpha.c:6003
 #, c-format
 msgid "STA_MOD (stack module)\n"
 msgstr ""
 
-#: vms-alpha.c:5987
+#: vms-alpha.c:6006
 #, c-format
 msgid "STA_CKARG (compare procedure argument)\n"
 msgstr ""
 
-#: vms-alpha.c:5991
+#: vms-alpha.c:6010
 #, c-format
 msgid "STO_B (store byte)\n"
 msgstr ""
 
-#: vms-alpha.c:5994
+#: vms-alpha.c:6013
 #, c-format
 msgid "STO_W (store word)\n"
 msgstr ""
 
-#: vms-alpha.c:5997
+#: vms-alpha.c:6016
 #, c-format
 msgid "STO_LW (store longword)\n"
 msgstr ""
 
-#: vms-alpha.c:6000
+#: vms-alpha.c:6019
 #, c-format
 msgid "STO_QW (store quadword)\n"
 msgstr ""
 
-#: vms-alpha.c:6006
+#: vms-alpha.c:6025
 #, c-format
 msgid "STO_IMMR (store immediate repeat) %u bytes\n"
 msgstr ""
 
-#: vms-alpha.c:6013
+#: vms-alpha.c:6032
 #, c-format
 msgid "STO_GBL (store global) %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6017
+#: vms-alpha.c:6036
 #, c-format
 msgid "STO_CA (store code address) %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6021
+#: vms-alpha.c:6040
 #, c-format
 msgid "STO_RB (store relative branch)\n"
 msgstr ""
 
-#: vms-alpha.c:6024
+#: vms-alpha.c:6043
 #, c-format
 msgid "STO_AB (store absolute branch)\n"
 msgstr ""
 
-#: vms-alpha.c:6027
+#: vms-alpha.c:6046
 #, c-format
 msgid "STO_OFF (store offset to psect)\n"
 msgstr ""
 
-#: vms-alpha.c:6033
+#: vms-alpha.c:6052
 #, c-format
 msgid "STO_IMM (store immediate) %u bytes\n"
 msgstr ""
 
-#: vms-alpha.c:6040
+#: vms-alpha.c:6059
 #, c-format
 msgid "STO_GBL_LW (store global longword) %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6044
+#: vms-alpha.c:6063
 #, c-format
 msgid "STO_OFF (store LP with procedure signature)\n"
 msgstr ""
 
-#: vms-alpha.c:6047
+#: vms-alpha.c:6066
 #, c-format
 msgid "STO_BR_GBL (store branch global) *todo*\n"
 msgstr ""
 
-#: vms-alpha.c:6050
+#: vms-alpha.c:6069
 #, c-format
 msgid "STO_BR_PS (store branch psect + offset) *todo*\n"
 msgstr ""
 
-#: vms-alpha.c:6054
+#: vms-alpha.c:6073
 #, c-format
 msgid "OPR_NOP (no-operation)\n"
 msgstr ""
 
-#: vms-alpha.c:6057
+#: vms-alpha.c:6076
 #, c-format
 msgid "OPR_ADD (add)\n"
 msgstr ""
 
-#: vms-alpha.c:6060
+#: vms-alpha.c:6079
 #, c-format
 msgid "OPR_SUB (substract)\n"
 msgstr ""
 
-#: vms-alpha.c:6063
+#: vms-alpha.c:6082
 #, c-format
 msgid "OPR_MUL (multiply)\n"
 msgstr ""
 
-#: vms-alpha.c:6066
+#: vms-alpha.c:6085
 #, c-format
 msgid "OPR_DIV (divide)\n"
 msgstr ""
 
-#: vms-alpha.c:6069
+#: vms-alpha.c:6088
 #, c-format
 msgid "OPR_AND (logical and)\n"
 msgstr ""
 
-#: vms-alpha.c:6072
+#: vms-alpha.c:6091
 #, c-format
 msgid "OPR_IOR (logical inclusive or)\n"
 msgstr ""
 
-#: vms-alpha.c:6075
+#: vms-alpha.c:6094
 #, c-format
 msgid "OPR_EOR (logical exclusive or)\n"
 msgstr ""
 
-#: vms-alpha.c:6078
+#: vms-alpha.c:6097
 #, c-format
 msgid "OPR_NEG (negate)\n"
 msgstr ""
 
-#: vms-alpha.c:6081
+#: vms-alpha.c:6100
 #, c-format
 msgid "OPR_COM (complement)\n"
 msgstr ""
 
-#: vms-alpha.c:6084
+#: vms-alpha.c:6103
 #, c-format
 msgid "OPR_INSV (insert field)\n"
 msgstr ""
 
-#: vms-alpha.c:6087
+#: vms-alpha.c:6106
 #, c-format
 msgid "OPR_ASH (arithmetic shift)\n"
 msgstr ""
 
-#: vms-alpha.c:6090
+#: vms-alpha.c:6109
 #, c-format
 msgid "OPR_USH (unsigned shift)\n"
 msgstr ""
 
-#: vms-alpha.c:6093
+#: vms-alpha.c:6112
 #, c-format
 msgid "OPR_ROT (rotate)\n"
 msgstr ""
 
-#: vms-alpha.c:6096
+#: vms-alpha.c:6115
 #, c-format
 msgid "OPR_SEL (select)\n"
 msgstr ""
 
-#: vms-alpha.c:6099
+#: vms-alpha.c:6118
 #, c-format
 msgid "OPR_REDEF (redefine symbol to curr location)\n"
 msgstr ""
 
-#: vms-alpha.c:6102
+#: vms-alpha.c:6121
 #, c-format
 msgid "OPR_REDEF (define a literal)\n"
 msgstr ""
 
-#: vms-alpha.c:6106
+#: vms-alpha.c:6125
 #, c-format
 msgid "STC_LP (store cond linkage pair)\n"
 msgstr ""
 
-#: vms-alpha.c:6110
+#: vms-alpha.c:6129
 #, c-format
 msgid "STC_LP_PSB (store cond linkage pair + signature)\n"
 msgstr ""
 
-#: vms-alpha.c:6111
+#: vms-alpha.c:6131
 #, c-format
 msgid "   linkage index: %u, procedure: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6114
+#: vms-alpha.c:6134
 #, c-format
 msgid "   signature: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6117
+#: vms-alpha.c:6137
 #, c-format
 msgid "STC_GBL (store cond global)\n"
 msgstr ""
 
-#: vms-alpha.c:6118
+#: vms-alpha.c:6139
 #, c-format
 msgid "   linkage index: %u, global: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6122
+#: vms-alpha.c:6143
 #, c-format
 msgid "STC_GCA (store cond code address)\n"
 msgstr ""
 
-#: vms-alpha.c:6123
+#: vms-alpha.c:6145
 #, c-format
 msgid "   linkage index: %u, procedure name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6127
+#: vms-alpha.c:6149
 #, c-format
 msgid "STC_PS (store cond psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6129
+#: vms-alpha.c:6152
 #, c-format
 msgid "   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:6136
+#: vms-alpha.c:6159
 #, c-format
 msgid "STC_NOP_GBL (store cond NOP at global addr)\n"
 msgstr ""
 
-#: vms-alpha.c:6140
+#: vms-alpha.c:6163
 #, c-format
 msgid "STC_NOP_PS (store cond NOP at psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6144
+#: vms-alpha.c:6167
 #, c-format
 msgid "STC_BSR_GBL (store cond BSR at global addr)\n"
 msgstr ""
 
-#: vms-alpha.c:6148
+#: vms-alpha.c:6171
 #, c-format
 msgid "STC_BSR_PS (store cond BSR at psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6152
+#: vms-alpha.c:6175
 #, c-format
 msgid "STC_LDA_GBL (store cond LDA at global addr)\n"
 msgstr ""
 
-#: vms-alpha.c:6156
+#: vms-alpha.c:6179
 #, c-format
 msgid "STC_LDA_PS (store cond LDA at psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6160
+#: vms-alpha.c:6183
 #, c-format
 msgid "STC_BOH_GBL (store cond BOH at global addr)\n"
 msgstr ""
 
-#: vms-alpha.c:6164
+#: vms-alpha.c:6187
 #, c-format
 msgid "STC_BOH_PS (store cond BOH at psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6169
+#: vms-alpha.c:6192
 #, c-format
 msgid "STC_NBH_GBL (store cond or hint at global addr)\n"
 msgstr ""
 
-#: vms-alpha.c:6173
+#: vms-alpha.c:6196
 #, c-format
 msgid "STC_NBH_PS (store cond or hint at psect + offset)\n"
 msgstr ""
 
-#: vms-alpha.c:6177
+#: vms-alpha.c:6200
 #, c-format
 msgid "CTL_SETRB (set relocation base)\n"
 msgstr ""
 
-#: vms-alpha.c:6183
+#: vms-alpha.c:6206
 #, c-format
 msgid "CTL_AUGRB (augment relocation base) %u\n"
 msgstr ""
 
-#: vms-alpha.c:6187
+#: vms-alpha.c:6210
 #, c-format
 msgid "CTL_DFLOC (define location)\n"
 msgstr ""
 
-#: vms-alpha.c:6190
+#: vms-alpha.c:6213
 #, c-format
 msgid "CTL_STLOC (set location)\n"
 msgstr ""
 
-#: vms-alpha.c:6193
+#: vms-alpha.c:6216
 #, c-format
 msgid "CTL_STKDL (stack defined location)\n"
 msgstr ""
 
-#: vms-alpha.c:6196 vms-alpha.c:6610
+#: vms-alpha.c:6219 vms-alpha.c:6643 vms-alpha.c:6769
 #, c-format
 msgid "*unhandled*\n"
 msgstr ""
 
-#: vms-alpha.c:6226 vms-alpha.c:6265
+#: vms-alpha.c:6249 vms-alpha.c:6288
 #, c-format
 msgid "cannot read GST record length\n"
 msgstr ""
 
 #. Ill-formed.
-#: vms-alpha.c:6247
+#: vms-alpha.c:6270
 #, c-format
 msgid "cannot find EMH in first GST record\n"
 msgstr ""
 
-#: vms-alpha.c:6273
+#: vms-alpha.c:6296
 #, c-format
 msgid "cannot read GST record header\n"
 msgstr ""
 
-#: vms-alpha.c:6286
+#: vms-alpha.c:6309
 #, c-format
 msgid " corrupted GST\n"
 msgstr ""
 
-#: vms-alpha.c:6294
+#: vms-alpha.c:6317
 #, c-format
 msgid "cannot read GST record\n"
 msgstr ""
 
-#: vms-alpha.c:6323
+#: vms-alpha.c:6346
 #, c-format
 msgid " unhandled EOBJ record type %u\n"
 msgstr ""
 
-#: vms-alpha.c:6346
+#: vms-alpha.c:6370
 #, c-format
 msgid "  bitcount: %u, base addr: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6359
+#: vms-alpha.c:6384
 #, c-format
 msgid "   bitmap: 0x%08x (count: %u):\n"
 msgstr ""
 
-#: vms-alpha.c:6366
+#: vms-alpha.c:6391
 #, c-format
 msgid " %08x"
 msgstr ""
 
-#: vms-alpha.c:6391
+#: vms-alpha.c:6417
 #, c-format
 msgid "  image %u (%u entries)\n"
 msgstr ""
 
-#: vms-alpha.c:6396
+#: vms-alpha.c:6423
 #, c-format
 msgid "   offset: 0x%08x, val: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6417
+#: vms-alpha.c:6445
 #, c-format
 msgid "  image %u (%u entries), offsets:\n"
 msgstr ""
 
-#: vms-alpha.c:6424
+#: vms-alpha.c:6452
 #, c-format
 msgid " 0x%08x"
 msgstr ""
 
 #. 64 bits.
-#: vms-alpha.c:6546
+#: vms-alpha.c:6574
 #, c-format
 msgid "64 bits *unhandled*\n"
 msgstr ""
 
-#: vms-alpha.c:6550
+#: vms-alpha.c:6579
 #, c-format
 msgid "class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6561
+#: vms-alpha.c:6590
 #, c-format
 msgid "non-contiguous array of %s\n"
 msgstr ""
 
-#: vms-alpha.c:6565
+#: vms-alpha.c:6595
 #, c-format
 msgid "dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6569
+#: vms-alpha.c:6600
 #, c-format
 msgid "arsize: %u, a0: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6573
+#: vms-alpha.c:6604
 #, c-format
 msgid "Strides:\n"
 msgstr ""
 
-#: vms-alpha.c:6578
-#, c-format
-msgid "[%u]: %u\n"
-msgstr ""
-
-#: vms-alpha.c:6583
+#: vms-alpha.c:6614
 #, c-format
 msgid "Bounds:\n"
 msgstr ""
 
-#: vms-alpha.c:6588
+#: vms-alpha.c:6620
 #, c-format
 msgid "[%u]: Lower: %u, upper: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6600
+#: vms-alpha.c:6632
 #, c-format
 msgid "unaligned bit-string of %s\n"
 msgstr ""
 
-#: vms-alpha.c:6604
+#: vms-alpha.c:6637
 #, c-format
 msgid "base: %u, pos: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6624
+#: vms-alpha.c:6658
 #, c-format
 msgid "vflags: 0x%02x, value: 0x%08x "
 msgstr ""
 
-#: vms-alpha.c:6630
+#: vms-alpha.c:6664
 #, c-format
 msgid "(no value)\n"
 msgstr ""
 
-#: vms-alpha.c:6633
+#: vms-alpha.c:6667
 #, c-format
 msgid "(not active)\n"
 msgstr ""
 
-#: vms-alpha.c:6636
+#: vms-alpha.c:6670
 #, c-format
 msgid "(not allocated)\n"
 msgstr ""
 
-#: vms-alpha.c:6639
+#: vms-alpha.c:6673
 #, c-format
 msgid "(descriptor)\n"
 msgstr ""
 
-#: vms-alpha.c:6643
+#: vms-alpha.c:6677
 #, c-format
 msgid "(trailing value)\n"
 msgstr ""
 
-#: vms-alpha.c:6646
+#: vms-alpha.c:6680
 #, c-format
 msgid "(value spec follows)\n"
 msgstr ""
 
-#: vms-alpha.c:6649
+#: vms-alpha.c:6683
 #, c-format
 msgid "(at bit offset %u)\n"
 msgstr ""
 
-#: vms-alpha.c:6652
+#: vms-alpha.c:6687
 #, c-format
 msgid "(reg: %u, disp: %u, indir: %u, kind: "
 msgstr ""
 
-#: vms-alpha.c:6659
+#: vms-alpha.c:6694
 msgid "literal"
 msgstr ""
 
-#: vms-alpha.c:6662
+#: vms-alpha.c:6697
 msgid "address"
 msgstr ""
 
-#: vms-alpha.c:6665
+#: vms-alpha.c:6700
 msgid "desc"
 msgstr ""
 
-#: vms-alpha.c:6668
+#: vms-alpha.c:6703
 msgid "reg"
 msgstr ""
 
-#: vms-alpha.c:6743
+#: vms-alpha.c:6720
+#, c-format
+msgid "len: %2u, kind: %2u "
+msgstr ""
+
+#: vms-alpha.c:6726
+#, c-format
+msgid "atomic, type=0x%02x %s\n"
+msgstr ""
+
+#: vms-alpha.c:6730
+#, c-format
+msgid "indirect, defined at 0x%08x\n"
+msgstr ""
+
+#: vms-alpha.c:6734
+#, c-format
+msgid "typed pointer\n"
+msgstr ""
+
+#: vms-alpha.c:6738
+#, c-format
+msgid "pointer\n"
+msgstr ""
+
+#: vms-alpha.c:6746
+#, c-format
+msgid "array, dim: %u, bitmap: "
+msgstr ""
+
+#: vms-alpha.c:6753
+#, c-format
+msgid "array descriptor:\n"
+msgstr ""
+
+#: vms-alpha.c:6760
+#, c-format
+msgid "type spec for element:\n"
+msgstr ""
+
+#: vms-alpha.c:6762
+#, c-format
+msgid "type spec for subscript %u:\n"
+msgstr ""
+
+#: vms-alpha.c:6780
 #, c-format
 msgid "Debug symbol table:\n"
 msgstr ""
 
-#: vms-alpha.c:6754
+#: vms-alpha.c:6791
 #, c-format
 msgid "cannot read DST header\n"
 msgstr ""
 
-#: vms-alpha.c:6759
+#: vms-alpha.c:6797
 #, c-format
 msgid " type: %3u, len: %3u (at 0x%08x): "
 msgstr ""
 
-#: vms-alpha.c:6773
+#: vms-alpha.c:6811
 #, c-format
 msgid "cannot read DST symbol\n"
 msgstr ""
 
-#: vms-alpha.c:6816
+#: vms-alpha.c:6854
 #, c-format
 msgid "standard data: %s\n"
 msgstr ""
 
-#: vms-alpha.c:6819 vms-alpha.c:6903
+#: vms-alpha.c:6857 vms-alpha.c:6945
 #, c-format
 msgid "    name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6826
+#: vms-alpha.c:6864
 #, c-format
 msgid "modbeg\n"
 msgstr ""
 
-#: vms-alpha.c:6827
+#: vms-alpha.c:6866
 #, c-format
 msgid "   flags: %d, language: %u, major: %u, minor: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6833 vms-alpha.c:7099
+#: vms-alpha.c:6872 vms-alpha.c:7146
 #, c-format
 msgid "   module name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6836
+#: vms-alpha.c:6875
 #, c-format
 msgid "   compiler   : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6841
+#: vms-alpha.c:6880
 #, c-format
 msgid "modend\n"
 msgstr ""
 
-#: vms-alpha.c:6848
+#: vms-alpha.c:6887
 msgid "rtnbeg\n"
 msgstr ""
 
-#: vms-alpha.c:6849
+#: vms-alpha.c:6889
 #, c-format
 msgid "    flags: %u, address: 0x%08x, pd-address: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6854
+#: vms-alpha.c:6894
 #, c-format
 msgid "    routine name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6862
+#: vms-alpha.c:6902
 #, c-format
 msgid "rtnend: size 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6870
+#: vms-alpha.c:6910
 #, c-format
 msgid "prolog: bkpt address 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6878
+#: vms-alpha.c:6919
 #, c-format
 msgid "epilog: flags: %u, count: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6887
+#: vms-alpha.c:6929
 #, c-format
 msgid "blkbeg: address: 0x%08x, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6896
+#: vms-alpha.c:6938
 #, c-format
 msgid "blkend: size: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:6902
+#: vms-alpha.c:6944
 #, c-format
 msgid "typspec (len: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:6909
+#: vms-alpha.c:6951
 #, c-format
 msgid "septyp, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6918
+#: vms-alpha.c:6960
 #, c-format
 msgid "recbeg: name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6925
+#: vms-alpha.c:6962
+#, c-format
+msgid "    len: %u bits\n"
+msgstr ""
+
+#: vms-alpha.c:6967
 #, c-format
 msgid "recend\n"
 msgstr ""
 
-#: vms-alpha.c:6928
+#: vms-alpha.c:6971
 #, c-format
 msgid "enumbeg, len: %u, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6932
+#: vms-alpha.c:6975
 #, c-format
 msgid "enumelt, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:6936
+#: vms-alpha.c:6979
 #, c-format
 msgid "enumend\n"
 msgstr ""
 
-#: vms-alpha.c:6953
+#: vms-alpha.c:6984
+#, c-format
+msgid "label, name: %.*s\n"
+msgstr ""
+
+#: vms-alpha.c:6986
+#, c-format
+msgid "    address: 0x%08x\n"
+msgstr ""
+
+#: vms-alpha.c:6996
 #, c-format
 msgid "discontiguous range (nbr: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:6955
+#: vms-alpha.c:6999
 #, c-format
 msgid "    address: 0x%08x, size: %u\n"
 msgstr ""
 
-#: vms-alpha.c:6965
+#: vms-alpha.c:7009
 #, c-format
 msgid "line num  (len: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:6982
+#: vms-alpha.c:7026
 #, c-format
 msgid "delta_pc_w %u\n"
 msgstr ""
 
-#: vms-alpha.c:6989
+#: vms-alpha.c:7033
 #, c-format
 msgid "incr_linum(b): +%u\n"
 msgstr ""
 
-#: vms-alpha.c:6995
+#: vms-alpha.c:7039
 #, c-format
 msgid "incr_linum_w: +%u\n"
 msgstr ""
 
-#: vms-alpha.c:7001
+#: vms-alpha.c:7045
 #, c-format
 msgid "incr_linum_l: +%u\n"
 msgstr ""
 
-#: vms-alpha.c:7007
+#: vms-alpha.c:7051
 #, c-format
 msgid "set_line_num(w) %u\n"
 msgstr ""
 
-#: vms-alpha.c:7012
+#: vms-alpha.c:7056
 #, c-format
 msgid "set_line_num_b %u\n"
 msgstr ""
 
-#: vms-alpha.c:7017
+#: vms-alpha.c:7061
 #, c-format
 msgid "set_line_num_l %u\n"
 msgstr ""
 
-#: vms-alpha.c:7022
+#: vms-alpha.c:7066
 #, c-format
 msgid "set_abs_pc: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7026
+#: vms-alpha.c:7070
 #, c-format
 msgid "delta_pc_l: +0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7031
+#: vms-alpha.c:7075
 #, c-format
 msgid "term(b): 0x%02x"
 msgstr ""
 
-#: vms-alpha.c:7033
+#: vms-alpha.c:7077
 #, c-format
 msgid "        pc: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7038
+#: vms-alpha.c:7082
 #, c-format
 msgid "term_w: 0x%04x"
 msgstr ""
 
-#: vms-alpha.c:7040
+#: vms-alpha.c:7084
 #, c-format
 msgid "    pc: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7046
+#: vms-alpha.c:7090
 #, c-format
 msgid "delta pc +%-4d"
 msgstr ""
 
-#: vms-alpha.c:7049
+#: vms-alpha.c:7094
 #, c-format
 msgid "    pc: 0x%08x line: %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7054
+#: vms-alpha.c:7099
 #, c-format
 msgid "    *unhandled* cmd %u\n"
 msgstr ""
 
-#: vms-alpha.c:7069
+#: vms-alpha.c:7114
 #, c-format
 msgid "source (len: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7083
+#: vms-alpha.c:7129
 #, c-format
 msgid "   declfile: len: %u, flags: %u, fileid: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7087
+#: vms-alpha.c:7134
 #, c-format
 msgid "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7096
+#: vms-alpha.c:7143
 #, c-format
 msgid "   filename   : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7105
+#: vms-alpha.c:7152
 #, c-format
 msgid "   setfile %u\n"
 msgstr ""
 
-#: vms-alpha.c:7110 vms-alpha.c:7115
+#: vms-alpha.c:7157 vms-alpha.c:7162
 #, c-format
 msgid "   setrec %u\n"
 msgstr ""
 
-#: vms-alpha.c:7120 vms-alpha.c:7125
+#: vms-alpha.c:7167 vms-alpha.c:7172
 #, c-format
 msgid "   setlnum %u\n"
 msgstr ""
 
-#: vms-alpha.c:7130 vms-alpha.c:7135
+#: vms-alpha.c:7177 vms-alpha.c:7182
 #, c-format
 msgid "   deflines %u\n"
 msgstr ""
 
-#: vms-alpha.c:7139
+#: vms-alpha.c:7186
 #, c-format
 msgid "   formfeed\n"
 msgstr ""
 
-#: vms-alpha.c:7143
+#: vms-alpha.c:7190
 #, c-format
 msgid "   *unhandled* cmd %u\n"
 msgstr ""
 
-#: vms-alpha.c:7155
+#: vms-alpha.c:7202
 #, c-format
 msgid "*unhandled* dst type %u\n"
 msgstr ""
 
-#: vms-alpha.c:7187
+#: vms-alpha.c:7234
 #, c-format
 msgid "cannot read EIHD\n"
 msgstr ""
 
-#: vms-alpha.c:7190
+#: vms-alpha.c:7238
 #, c-format
 msgid "EIHD: (size: %u, nbr blocks: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7193
+#: vms-alpha.c:7242
 #, c-format
 msgid " majorid: %u, minorid: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7201
+#: vms-alpha.c:7250
 msgid "executable"
 msgstr ""
 
-#: vms-alpha.c:7204
+#: vms-alpha.c:7253
 msgid "linkable image"
 msgstr ""
 
-#: vms-alpha.c:7210
+#: vms-alpha.c:7260
 #, c-format
 msgid " image type: %u (%s)"
 msgstr ""
 
-#: vms-alpha.c:7216
+#: vms-alpha.c:7266
 msgid "native"
 msgstr ""
 
-#: vms-alpha.c:7219
+#: vms-alpha.c:7269
 msgid "CLI"
 msgstr ""
 
-#: vms-alpha.c:7225
+#: vms-alpha.c:7276
 #, c-format
 msgid ", subtype: %u (%s)\n"
 msgstr ""
 
-#: vms-alpha.c:7231
+#: vms-alpha.c:7283
 #, c-format
 msgid " offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7235
+#: vms-alpha.c:7287
 #, c-format
 msgid " fixup info rva: "
 msgstr ""
 
-#: vms-alpha.c:7237
+#: vms-alpha.c:7289
 #, c-format
 msgid ", symbol vector rva: "
 msgstr ""
 
-#: vms-alpha.c:7240
+#: vms-alpha.c:7292
 #, c-format
 msgid ""
 "\n"
 " version array off: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7244
+#: vms-alpha.c:7297
 #, c-format
 msgid " img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7250
+#: vms-alpha.c:7303
 #, c-format
 msgid " linker flags: %08x:"
 msgstr ""
 
-#: vms-alpha.c:7280
+#: vms-alpha.c:7334
 #, c-format
 msgid " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7286
+#: vms-alpha.c:7340
 #, c-format
 msgid " BPAGE: %u"
 msgstr ""
 
-#: vms-alpha.c:7292
+#: vms-alpha.c:7347
 #, c-format
 msgid ", ext fixup offset: %u, no_opt psect off: %u"
 msgstr ""
 
-#: vms-alpha.c:7295
+#: vms-alpha.c:7350
 #, c-format
 msgid ", alias: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7303
+#: vms-alpha.c:7358
 #, c-format
 msgid "system version array information:\n"
 msgstr ""
 
-#: vms-alpha.c:7307
+#: vms-alpha.c:7362
 #, c-format
 msgid "cannot read EIHVN header\n"
 msgstr ""
 
-#: vms-alpha.c:7317
+#: vms-alpha.c:7372
 #, c-format
 msgid "cannot read EIHVN version\n"
 msgstr ""
 
-#: vms-alpha.c:7320
+#: vms-alpha.c:7375
 #, c-format
 msgid "   %02u "
 msgstr ""
 
-#: vms-alpha.c:7324
+#: vms-alpha.c:7379
 msgid "BASE_IMAGE       "
 msgstr ""
 
-#: vms-alpha.c:7327
+#: vms-alpha.c:7382
 msgid "MEMORY_MANAGEMENT"
 msgstr ""
 
-#: vms-alpha.c:7330
+#: vms-alpha.c:7385
 msgid "IO               "
 msgstr ""
 
-#: vms-alpha.c:7333
+#: vms-alpha.c:7388
 msgid "FILES_VOLUMES    "
 msgstr ""
 
-#: vms-alpha.c:7336
+#: vms-alpha.c:7391
 msgid "PROCESS_SCHED    "
 msgstr ""
 
-#: vms-alpha.c:7339
+#: vms-alpha.c:7394
 msgid "SYSGEN           "
 msgstr ""
 
-#: vms-alpha.c:7342
+#: vms-alpha.c:7397
 msgid "CLUSTERS_LOCKMGR "
 msgstr ""
 
-#: vms-alpha.c:7345
+#: vms-alpha.c:7400
 msgid "LOGICAL_NAMES    "
 msgstr ""
 
-#: vms-alpha.c:7348
+#: vms-alpha.c:7403
 msgid "SECURITY         "
 msgstr ""
 
-#: vms-alpha.c:7351
+#: vms-alpha.c:7406
 msgid "IMAGE_ACTIVATOR  "
 msgstr ""
 
-#: vms-alpha.c:7354
+#: vms-alpha.c:7409
 msgid "NETWORKS         "
 msgstr ""
 
-#: vms-alpha.c:7357
+#: vms-alpha.c:7412
 msgid "COUNTERS         "
 msgstr ""
 
-#: vms-alpha.c:7360
+#: vms-alpha.c:7415
 msgid "STABLE           "
 msgstr ""
 
-#: vms-alpha.c:7363
+#: vms-alpha.c:7418
 msgid "MISC             "
 msgstr ""
 
-#: vms-alpha.c:7366
+#: vms-alpha.c:7421
 msgid "CPU              "
 msgstr ""
 
-#: vms-alpha.c:7369
+#: vms-alpha.c:7424
 msgid "VOLATILE         "
 msgstr ""
 
-#: vms-alpha.c:7372
+#: vms-alpha.c:7427
 msgid "SHELL            "
 msgstr ""
 
-#: vms-alpha.c:7375
+#: vms-alpha.c:7430
 msgid "POSIX            "
 msgstr ""
 
-#: vms-alpha.c:7378
+#: vms-alpha.c:7433
 msgid "MULTI_PROCESSING "
 msgstr ""
 
-#: vms-alpha.c:7381
+#: vms-alpha.c:7436
 msgid "GALAXY           "
 msgstr ""
 
-#: vms-alpha.c:7384
+#: vms-alpha.c:7439
 msgid "*unknown*        "
 msgstr ""
 
-#: vms-alpha.c:7387
-#, c-format
-msgid ": %u.%u\n"
-msgstr ""
-
-#: vms-alpha.c:7400 vms-alpha.c:7659
+#: vms-alpha.c:7455 vms-alpha.c:7730
 #, c-format
 msgid "cannot read EIHA\n"
 msgstr ""
 
-#: vms-alpha.c:7403
+#: vms-alpha.c:7458
 #, c-format
 msgid "Image activation:  (size=%u)\n"
 msgstr ""
 
-#: vms-alpha.c:7405
+#: vms-alpha.c:7461
 #, c-format
 msgid " First address : 0x%08x 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7408
+#: vms-alpha.c:7465
 #, c-format
 msgid " Second address: 0x%08x 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7411
+#: vms-alpha.c:7469
 #, c-format
 msgid " Third address : 0x%08x 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7414
+#: vms-alpha.c:7473
 #, c-format
 msgid " Fourth address: 0x%08x 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7417
+#: vms-alpha.c:7477
 #, c-format
 msgid " Shared image  : 0x%08x 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7428
+#: vms-alpha.c:7488
 #, c-format
 msgid "cannot read EIHI\n"
 msgstr ""
 
-#: vms-alpha.c:7431
+#: vms-alpha.c:7492
 #, c-format
 msgid "Image identification: (major: %u, minor: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7434
+#: vms-alpha.c:7495
 #, c-format
 msgid " image name       : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7436
+#: vms-alpha.c:7497
 #, c-format
 msgid " link time        : %s\n"
 msgstr ""
 
-#: vms-alpha.c:7438
+#: vms-alpha.c:7499
 #, c-format
 msgid " image ident      : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7440
+#: vms-alpha.c:7501
 #, c-format
 msgid " linker ident     : %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7442
+#: vms-alpha.c:7503
 #, c-format
 msgid " image build ident: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7452
+#: vms-alpha.c:7513
 #, c-format
 msgid "cannot read EIHS\n"
 msgstr ""
 
-#: vms-alpha.c:7455
+#: vms-alpha.c:7517
 #, c-format
 msgid "Image symbol & debug table: (major: %u, minor: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7460
+#: vms-alpha.c:7523
 #, c-format
 msgid " debug symbol table : vbn: %u, size: %u (0x%x)\n"
 msgstr ""
 
-#: vms-alpha.c:7464
+#: vms-alpha.c:7528
 #, c-format
 msgid " global symbol table: vbn: %u, records: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7468
+#: vms-alpha.c:7533
 #, c-format
 msgid " debug module table : vbn: %u, size: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7481
+#: vms-alpha.c:7546
 #, c-format
 msgid "cannot read EISD\n"
 msgstr ""
 
-#: vms-alpha.c:7491
+#: vms-alpha.c:7557
 #, c-format
 msgid ""
 "Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7498
+#: vms-alpha.c:7565
 #, c-format
 msgid " section: base: 0x%08x%08x size: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7503
+#: vms-alpha.c:7570
 #, c-format
 msgid " flags: 0x%04x"
 msgstr ""
 
-#: vms-alpha.c:7540
+#: vms-alpha.c:7608
 #, c-format
 msgid " vbn: %u, pfc: %u, matchctl: %u type: %u ("
 msgstr ""
 
-#: vms-alpha.c:7546
+#: vms-alpha.c:7614
 msgid "NORMAL"
 msgstr ""
 
-#: vms-alpha.c:7549
+#: vms-alpha.c:7617
 msgid "SHRFXD"
 msgstr ""
 
-#: vms-alpha.c:7552
+#: vms-alpha.c:7620
 msgid "PRVFXD"
 msgstr ""
 
-#: vms-alpha.c:7555
+#: vms-alpha.c:7623
 msgid "SHRPIC"
 msgstr ""
 
-#: vms-alpha.c:7558
+#: vms-alpha.c:7626
 msgid "PRVPIC"
 msgstr ""
 
-#: vms-alpha.c:7561
+#: vms-alpha.c:7629
 msgid "USRSTACK"
 msgstr ""
 
-#: vms-alpha.c:7567
+#: vms-alpha.c:7635
 msgid ")\n"
 msgstr ""
 
-#: vms-alpha.c:7569
+#: vms-alpha.c:7638
 #, c-format
 msgid " ident: 0x%08x, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7579
+#: vms-alpha.c:7648
 #, c-format
 msgid "cannot read DMT\n"
 msgstr ""
 
-#: vms-alpha.c:7583
+#: vms-alpha.c:7652
 #, c-format
 msgid "Debug module table:\n"
 msgstr ""
 
-#: vms-alpha.c:7592
+#: vms-alpha.c:7661
 #, c-format
 msgid "cannot read DMT header\n"
 msgstr ""
 
-#: vms-alpha.c:7597
+#: vms-alpha.c:7667
 #, c-format
 msgid " module offset: 0x%08x, size: 0x%08x, (%u psects)\n"
 msgstr ""
 
-#: vms-alpha.c:7607
+#: vms-alpha.c:7677
 #, c-format
 msgid "cannot read DMT psect\n"
 msgstr ""
 
-#: vms-alpha.c:7610
+#: vms-alpha.c:7681
 #, c-format
 msgid "  psect start: 0x%08x, length: %u\n"
 msgstr ""
 
-#: vms-alpha.c:7623
+#: vms-alpha.c:7694
 #, c-format
 msgid "cannot read DST\n"
 msgstr ""
 
-#: vms-alpha.c:7633
+#: vms-alpha.c:7704
 #, c-format
 msgid "cannot read GST\n"
 msgstr ""
 
-#: vms-alpha.c:7637
+#: vms-alpha.c:7708
 #, c-format
 msgid "Global symbol table:\n"
 msgstr ""
 
-#: vms-alpha.c:7665
+#: vms-alpha.c:7737
 #, c-format
 msgid "Image activator fixup: (major: %u, minor: %u)\n"
 msgstr ""
 
-#: vms-alpha.c:7668
+#: vms-alpha.c:7741
 #, c-format
 msgid "  iaflink : 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:7671
+#: vms-alpha.c:7745
 #, c-format
 msgid "  fixuplnk: 0x%08x %08x\n"
 msgstr ""
 
-#: vms-alpha.c:7674
+#: vms-alpha.c:7748
 #, c-format
 msgid "  size : %u\n"
 msgstr ""
 
-#: vms-alpha.c:7676
+#: vms-alpha.c:7750
 #, c-format
 msgid "  flags: 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7680
+#: vms-alpha.c:7755
 #, c-format
 msgid "  qrelfixoff: %5u, lrelfixoff: %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7684
+#: vms-alpha.c:7760
 #, c-format
 msgid "  qdotadroff: %5u, ldotadroff: %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7688
+#: vms-alpha.c:7765
 #, c-format
 msgid "  codeadroff: %5u, lpfixoff  : %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7691
+#: vms-alpha.c:7768
 #, c-format
 msgid "  chgprtoff : %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7694
+#: vms-alpha.c:7772
 #, c-format
 msgid "  shlstoff  : %5u, shrimgcnt : %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7696
+#: vms-alpha.c:7775
 #, c-format
 msgid "  shlextra  : %5u, permctx   : %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7699
+#: vms-alpha.c:7778
 #, c-format
 msgid "  base_va : 0x%08x\n"
 msgstr ""
 
-#: vms-alpha.c:7701
+#: vms-alpha.c:7780
 #, c-format
 msgid "  lppsbfixoff: %5u\n"
 msgstr ""
 
-#: vms-alpha.c:7709
+#: vms-alpha.c:7788
 #, c-format
 msgid " Shareable images:\n"
 msgstr ""
 
-#: vms-alpha.c:7713
+#: vms-alpha.c:7793
 #, c-format
 msgid "  %u: size: %u, flags: 0x%02x, name: %.*s\n"
 msgstr ""
 
-#: vms-alpha.c:7720
+#: vms-alpha.c:7800
 #, c-format
 msgid " quad-word relocation fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7725
+#: vms-alpha.c:7805
 #, c-format
 msgid " long-word relocation fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7730
+#: vms-alpha.c:7810
 #, c-format
 msgid " quad-word .address reference fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7735
+#: vms-alpha.c:7815
 #, c-format
 msgid " long-word .address reference fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7740
+#: vms-alpha.c:7820
 #, c-format
 msgid " Code Address Reference Fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7745
+#: vms-alpha.c:7825
 #, c-format
 msgid " Linkage Pairs Reference Fixups:\n"
 msgstr ""
 
-#: vms-alpha.c:7754
+#: vms-alpha.c:7834
 #, c-format
 msgid " Change Protection (%u entries):\n"
 msgstr ""
 
-#: vms-alpha.c:7759
+#: vms-alpha.c:7840
 #, c-format
 msgid "  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "
 msgstr ""
 
 #. FIXME: we do not yet support relocatable link.  It is not obvious
 #. how to do it for debug infos.
-#: vms-alpha.c:8599
+#: vms-alpha.c:8680
 msgid "%P: relocatable link is not supported\n"
 msgstr ""
 
-#: vms-alpha.c:8669
+#: vms-alpha.c:8751
+#, c-format
 msgid "%P: multiple entry points: in modules %B and %B\n"
 msgstr ""
 
-#: vms-lib.c:1444
+#: vms-lib.c:1445
 #, c-format
 msgid "could not open shared image '%s' from '%s'"
 msgstr ""
 
-#: vms-misc.c:360
+#: vms-misc.c:359
 msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr ""
 
-#: vms-misc.c:365
+#: vms-misc.c:364
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr ""
 
-#: xcofflink.c:824
+#: xcofflink.c:832
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr ""
 
-#: xcofflink.c:845
+#: xcofflink.c:853
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr ""
 
-#: xcofflink.c:1404
+#: xcofflink.c:1413
+#, c-format
 msgid "%B: `%s' has line numbers but no enclosing section"
 msgstr ""
 
-#: xcofflink.c:1456
+#: xcofflink.c:1466
+#, c-format
 msgid "%B: class %d symbol `%s' has no aux entries"
 msgstr ""
 
-#: xcofflink.c:1478
+#: xcofflink.c:1489
+#, c-format
 msgid "%B: symbol `%s' has unrecognized csect type %d"
 msgstr ""
 
-#: xcofflink.c:1490
+#: xcofflink.c:1502
+#, c-format
 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr ""
 
-#: xcofflink.c:1519
+#: xcofflink.c:1532
+#, c-format
 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr ""
 
-#: xcofflink.c:1665
+#: xcofflink.c:1679
+#, c-format
 msgid "%B: csect `%s' not in enclosing section"
 msgstr ""
 
-#: xcofflink.c:1772
+#: xcofflink.c:1787
+#, c-format
 msgid "%B: misplaced XTY_LD `%s'"
 msgstr ""
 
-#: xcofflink.c:2091
+#: xcofflink.c:2108
+#, c-format
 msgid "%B: reloc %s:%d not in csect"
 msgstr ""
 
-#: xcofflink.c:3182
+#: xcofflink.c:3198
 #, c-format
 msgid "%s: no such symbol"
 msgstr ""
 
-#: xcofflink.c:3287
+#: xcofflink.c:3303
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr ""
 
-#: xcofflink.c:3666
+#: xcofflink.c:3682
 msgid "error: undefined symbol __rtinit"
 msgstr ""
 
-#: xcofflink.c:4045
+#: xcofflink.c:4062
+#, c-format
 msgid "%B: loader reloc in unrecognized section `%s'"
 msgstr ""
 
-#: xcofflink.c:4056
+#: xcofflink.c:4074
+#, c-format
 msgid "%B: `%s' in loader reloc but not loader sym"
 msgstr ""
 
-#: xcofflink.c:4072
+#: xcofflink.c:4091
+#, c-format
 msgid "%B: loader reloc in read-only section %A"
 msgstr ""
 
-#: xcofflink.c:5094
+#: xcofflink.c:5115
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr ""
 
-#: peigen.c:1009 pepigen.c:1009 pex64igen.c:1009
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:1887
+#, c-format
+msgid "Invalid AArch64 reloc number: %d"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:2865
+#, c-format
+msgid "cannot create stub entry %s"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:4764
+msgid "%B: error: Erratum 835769 stub out of range (input file too large)"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:4845
+msgid "%B: error: Erratum 843419 stub out of range (input file too large)"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:5313
+#, c-format
+msgid ""
+"%B: relocation %s against external symbol `%s' can not be used when making a "
+"shared object; recompile with -fPIC"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:5381
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:5450
+#, c-format
+msgid ""
+"%B: Local symbol descriptor table be NULL when applying relocation %s "
+"against local symbol"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6445
+msgid "Too many GOT entries for -fpic, please recompile with -fPIC"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-aarch64.c:6473
+msgid ""
+"One possible cause of this error is that the symbol is being referenced in "
+"the indicated code as if it had a larger alignment than was declared where "
+"it was defined."
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2584
+msgid ""
+"%B: ABI is incompatible with that of the selected emulation:\n"
+"  target emulation `%s' does not match `%s'"
+msgstr ""
+
+#: /Users/gingold/Repositories/fsf/binutils-gdb.git/bfd/elfnn-riscv.c:2604
+msgid "%B: can't link hard-float modules with soft-float modules"
+msgstr ""
+
+#: peigen.c:157 pepigen.c:157 pex64igen.c:157
+msgid "%B: unable to find name for empty section"
+msgstr ""
+
+#: peigen.c:183 pepigen.c:183 pex64igen.c:183
+msgid "%B: out of memory creating name for empty section"
+msgstr ""
+
+#: peigen.c:194 pepigen.c:194 pex64igen.c:194
+msgid "%B: unable to create fake empty section"
+msgstr ""
+
+#: peigen.c:532 pepigen.c:532 pex64igen.c:532
+msgid ""
+"%B: aout header specifies an invalid number of data-directory entries: %d"
+msgstr ""
+
+#: peigen.c:1089 pepigen.c:1089 pex64igen.c:1089
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr ""
 
-#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
+#: peigen.c:1234 pepigen.c:1234 pex64igen.c:1234
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr ""
 
-#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
+#: peigen.c:1235 pepigen.c:1235 pex64igen.c:1235
 msgid "Import Directory [parts of .idata]"
 msgstr ""
 
-#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
+#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
 msgid "Resource Directory [.rsrc]"
 msgstr ""
 
-#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
+#: peigen.c:1237 pepigen.c:1237 pex64igen.c:1237
 msgid "Exception Directory [.pdata]"
 msgstr ""
 
-#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
+#: peigen.c:1238 pepigen.c:1238 pex64igen.c:1238
 msgid "Security Directory"
 msgstr ""
 
-#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
+#: peigen.c:1239 pepigen.c:1239 pex64igen.c:1239
 msgid "Base Relocation Directory [.reloc]"
 msgstr ""
 
-#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
+#: peigen.c:1240 pepigen.c:1240 pex64igen.c:1240
 msgid "Debug Directory"
 msgstr ""
 
-#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
+#: peigen.c:1241 pepigen.c:1241 pex64igen.c:1241
 msgid "Description Directory"
 msgstr ""
 
-#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
+#: peigen.c:1242 pepigen.c:1242 pex64igen.c:1242
 msgid "Special Directory"
 msgstr ""
 
-#: peigen.c:1045 pepigen.c:1045 pex64igen.c:1045
+#: peigen.c:1243 pepigen.c:1243 pex64igen.c:1243
 msgid "Thread Storage Directory [.tls]"
 msgstr ""
 
-#: peigen.c:1046 pepigen.c:1046 pex64igen.c:1046
+#: peigen.c:1244 pepigen.c:1244 pex64igen.c:1244
 msgid "Load Configuration Directory"
 msgstr ""
 
-#: peigen.c:1047 pepigen.c:1047 pex64igen.c:1047
+#: peigen.c:1245 pepigen.c:1245 pex64igen.c:1245
 msgid "Bound Import Directory"
 msgstr ""
 
-#: peigen.c:1048 pepigen.c:1048 pex64igen.c:1048
+#: peigen.c:1246 pepigen.c:1246 pex64igen.c:1246
 msgid "Import Address Table Directory"
 msgstr ""
 
-#: peigen.c:1049 pepigen.c:1049 pex64igen.c:1049
+#: peigen.c:1247 pepigen.c:1247 pex64igen.c:1247
 msgid "Delay Import Directory"
 msgstr ""
 
-#: peigen.c:1050 pepigen.c:1050 pex64igen.c:1050
+#: peigen.c:1248 pepigen.c:1248 pex64igen.c:1248
 msgid "CLR Runtime Header"
 msgstr ""
 
-#: peigen.c:1051 pepigen.c:1051 pex64igen.c:1051
+#: peigen.c:1249 pepigen.c:1249 pex64igen.c:1249
 msgid "Reserved"
 msgstr ""
 
-#: peigen.c:1111 pepigen.c:1111 pex64igen.c:1111
+#: peigen.c:1309 pepigen.c:1309 pex64igen.c:1309
 #, c-format
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1116 pepigen.c:1116 pex64igen.c:1116
+#: peigen.c:1315 pepigen.c:1315 pex64igen.c:1315
+#, c-format
+msgid ""
+"\n"
+"There is an import table in %s, but that section has no contents\n"
+msgstr ""
+
+#: peigen.c:1322 pepigen.c:1322 pex64igen.c:1322
 #, c-format
 msgid ""
 "\n"
 "There is an import table in %s at 0x%lx\n"
 msgstr ""
 
-#: peigen.c:1158 pepigen.c:1158 pex64igen.c:1158
+#: peigen.c:1364 pepigen.c:1364 pex64igen.c:1364
 #, c-format
 msgid ""
 "\n"
 "Function descriptor located at the start address: %04lx\n"
 msgstr ""
 
-#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161
+#: peigen.c:1368 pepigen.c:1368 pex64igen.c:1368
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr ""
 
-#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169
+#: peigen.c:1376 pepigen.c:1376 pex64igen.c:1376
 #, c-format
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
 msgstr ""
 
-#: peigen.c:1174 pepigen.c:1174 pex64igen.c:1174
+#: peigen.c:1381 pepigen.c:1381 pex64igen.c:1381
 #, c-format
 msgid ""
 "\n"
 "The Import Tables (interpreted %s section contents)\n"
 msgstr ""
 
-#: peigen.c:1177 pepigen.c:1177 pex64igen.c:1177
+#: peigen.c:1384 pepigen.c:1384 pex64igen.c:1384
 #, c-format
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
 msgstr ""
 
-#: peigen.c:1225 pepigen.c:1225 pex64igen.c:1225
+#: peigen.c:1434 pepigen.c:1434 pex64igen.c:1434
 #, c-format
 msgid ""
 "\n"
-"\tDLL Name: %s\n"
+"\tDLL Name: %.*s\n"
 msgstr ""
 
-#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
+#: peigen.c:1445 pepigen.c:1445 pex64igen.c:1445
 #, c-format
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr ""
 
-#: peigen.c:1261 pepigen.c:1261 pex64igen.c:1261
+#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
 #, c-format
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1423 pepigen.c:1423 pex64igen.c:1423
+#: peigen.c:1514 peigen.c:1552 pepigen.c:1514 pepigen.c:1552 pex64igen.c:1514
+#: pex64igen.c:1552
+#, c-format
+msgid "\t<corrupt: 0x%04lx>"
+msgstr ""
+
+#: peigen.c:1645 pepigen.c:1645 pex64igen.c:1645
 #, c-format
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432
+#: peigen.c:1651 pepigen.c:1651 pex64igen.c:1651
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s, but that section has no contents\n"
+msgstr ""
+
+#: peigen.c:1661 pepigen.c:1661 pex64igen.c:1661
 #, c-format
 msgid ""
 "\n"
 "There is an export table in %s, but it does not fit into that section\n"
 msgstr ""
 
-#: peigen.c:1438 pepigen.c:1438 pex64igen.c:1438
+#: peigen.c:1672 pepigen.c:1672 pex64igen.c:1672
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s, but it is too small (%d)\n"
+msgstr ""
+
+#: peigen.c:1678 pepigen.c:1678 pex64igen.c:1678
 #, c-format
 msgid ""
 "\n"
 "There is an export table in %s at 0x%lx\n"
 msgstr ""
 
-#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
+#: peigen.c:1706 pepigen.c:1706 pex64igen.c:1706
 #, c-format
 msgid ""
 "\n"
@@ -6441,129 +8184,162 @@ msgid ""
 "\n"
 msgstr ""
 
-#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
+#: peigen.c:1710 pepigen.c:1710 pex64igen.c:1710
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr ""
 
-#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473
+#: peigen.c:1713 pepigen.c:1713 pex64igen.c:1713
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr ""
 
-#: peigen.c:1476 pepigen.c:1476 pex64igen.c:1476
+#: peigen.c:1717 pepigen.c:1717 pex64igen.c:1717
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr ""
 
-#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479
+#: peigen.c:1720 pepigen.c:1720 pex64igen.c:1720
 #, c-format
 msgid "Name \t\t\t\t"
 msgstr ""
 
-#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485
+#: peigen.c:1731 pepigen.c:1731 pex64igen.c:1731
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr ""
 
-#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
+#: peigen.c:1734 pepigen.c:1734 pex64igen.c:1734
 #, c-format
 msgid "Number in:\n"
 msgstr ""
 
-#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
+#: peigen.c:1737 pepigen.c:1737 pex64igen.c:1737
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr ""
 
-#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495
+#: peigen.c:1741 pepigen.c:1741 pex64igen.c:1741
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr ""
 
-#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
+#: peigen.c:1744 pepigen.c:1744 pex64igen.c:1744
 #, c-format
 msgid "Table Addresses\n"
 msgstr ""
 
-#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501
+#: peigen.c:1747 pepigen.c:1747 pex64igen.c:1747
 #, c-format
 msgid "\tExport Address Table \t\t"
 msgstr ""
 
-#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506
+#: peigen.c:1752 pepigen.c:1752 pex64igen.c:1752
 #, c-format
 msgid "\tName Pointer Table \t\t"
 msgstr ""
 
-#: peigen.c:1511 pepigen.c:1511 pex64igen.c:1511
+#: peigen.c:1757 pepigen.c:1757 pex64igen.c:1757
 #, c-format
 msgid "\tOrdinal Table \t\t\t"
 msgstr ""
 
-#: peigen.c:1525 pepigen.c:1525 pex64igen.c:1525
+#: peigen.c:1771 pepigen.c:1771 pex64igen.c:1771
 #, c-format
 msgid ""
 "\n"
 "Export Address Table -- Ordinal Base %ld\n"
 msgstr ""
 
-#: peigen.c:1544 pepigen.c:1544 pex64igen.c:1544
+#: peigen.c:1780 pepigen.c:1780 pex64igen.c:1780
+#, c-format
+msgid "\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"
+msgstr ""
+
+#: peigen.c:1799 pepigen.c:1799 pex64igen.c:1799
 msgid "Forwarder RVA"
 msgstr ""
 
-#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
+#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
 msgid "Export RVA"
 msgstr ""
 
-#: peigen.c:1562 pepigen.c:1562 pex64igen.c:1562
+#: peigen.c:1818 pepigen.c:1818 pex64igen.c:1818
 #, c-format
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
 msgstr ""
 
-#: peigen.c:1622 peigen.c:1805 pepigen.c:1622 pepigen.c:1805 pex64igen.c:1622
-#: pex64igen.c:1805
+#: peigen.c:1826 pepigen.c:1826 pex64igen.c:1826
+#, c-format
+msgid "\tInvalid Name Pointer Table rva (0x%lx) or entry count (0x%lx)\n"
+msgstr ""
+
+#: peigen.c:1833 pepigen.c:1833 pex64igen.c:1833
+#, c-format
+msgid "\tInvalid Ordinal Table rva (0x%lx) or entry count (0x%lx)\n"
+msgstr ""
+
+#: peigen.c:1847 pepigen.c:1847 pex64igen.c:1847
+#, c-format
+msgid "\t[%4ld] <corrupt offset: %lx>\n"
+msgstr ""
+
+#: peigen.c:1901 peigen.c:2098 pepigen.c:1901 pepigen.c:2098 pex64igen.c:1901
+#: pex64igen.c:2098
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr ""
 
-#: peigen.c:1629 pepigen.c:1629 pex64igen.c:1629
+#: peigen.c:1905 peigen.c:2102 pepigen.c:1905 pepigen.c:2102 pex64igen.c:1905
+#: pex64igen.c:2102
+#, c-format
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+
+#: peigen.c:1908 pepigen.c:1908 pex64igen.c:1908
 #, c-format
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr ""
 
-#: peigen.c:1631 pepigen.c:1631 pex64igen.c:1631
+#: peigen.c:1910 pepigen.c:1910 pex64igen.c:1910
 #, c-format
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
 msgstr ""
 
-#: peigen.c:1705 pepigen.c:1705 pex64igen.c:1705
+#: peigen.c:1923 pepigen.c:1923 pex64igen.c:1923
+#, c-format
+msgid "Virtual size of .pdata section (%ld) larger than real size (%ld)\n"
+msgstr ""
+
+#: peigen.c:1993 pepigen.c:1993 pex64igen.c:1993
 #, c-format
 msgid " Register save millicode"
 msgstr ""
 
-#: peigen.c:1708 pepigen.c:1708 pex64igen.c:1708
+#: peigen.c:1996 pepigen.c:1996 pex64igen.c:1996
 #, c-format
 msgid " Register restore millicode"
 msgstr ""
 
-#: peigen.c:1711 pepigen.c:1711 pex64igen.c:1711
+#: peigen.c:1999 pepigen.c:1999 pex64igen.c:1999
 #, c-format
 msgid " Glue code sequence"
 msgstr ""
 
-#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
+#: peigen.c:2104 pepigen.c:2104 pex64igen.c:2104
 #, c-format
 msgid ""
 " vma:\t\tBegin    Prolog   Function Flags    Exception EH\n"
 "     \t\tAddress  Length   Length   32b exc  Handler   Data\n"
 msgstr ""
 
-#: peigen.c:1937 pepigen.c:1937 pex64igen.c:1937
+#: peigen.c:2226 pepigen.c:2226 pex64igen.c:2226
 #, c-format
 msgid ""
 "\n"
@@ -6571,140 +8347,227 @@ msgid ""
 "PE File Base Relocations (interpreted .reloc section contents)\n"
 msgstr ""
 
-#: peigen.c:1966 pepigen.c:1966 pex64igen.c:1966
+#: peigen.c:2256 pepigen.c:2256 pex64igen.c:2256
 #, c-format
 msgid ""
 "\n"
 "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
 msgstr ""
 
-#: peigen.c:1979 pepigen.c:1979 pex64igen.c:1979
+#: peigen.c:2274 pepigen.c:2274 pex64igen.c:2274
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr ""
 
-#: peigen.c:2023 pepigen.c:2023 pex64igen.c:2023
+#: peigen.c:2335 pepigen.c:2335 pex64igen.c:2335
 #, c-format
-msgid "%*.s Entry: "
+msgid "%03x %*.s Entry: "
 msgstr ""
 
-#: peigen.c:2043 pepigen.c:2043 pex64igen.c:2043
+#: peigen.c:2359 pepigen.c:2359 pex64igen.c:2359
 #, c-format
 msgid "name: [val: %08lx len %d]: "
 msgstr ""
 
-#: peigen.c:2054 pepigen.c:2054 pex64igen.c:2054
+#: peigen.c:2379 pepigen.c:2379 pex64igen.c:2379
 #, c-format
-msgid "<corrupt string length: %#x>"
+msgid "<corrupt string length: %#x>\n"
 msgstr ""
 
-#: peigen.c:2057 pepigen.c:2057 pex64igen.c:2057
+#: peigen.c:2389 pepigen.c:2389 pex64igen.c:2389
 #, c-format
-msgid "<corrupt string offset: %#lx>"
+msgid "<corrupt string offset: %#lx>\n"
 msgstr ""
 
-#: peigen.c:2060 pepigen.c:2060 pex64igen.c:2060
+#: peigen.c:2394 pepigen.c:2394 pex64igen.c:2394
 #, c-format
 msgid "ID: %#08lx"
 msgstr ""
 
-#: peigen.c:2063 pepigen.c:2063 pex64igen.c:2063
+#: peigen.c:2397 pepigen.c:2397 pex64igen.c:2397
 #, c-format
 msgid ", Value: %#08lx\n"
 msgstr ""
 
-#: peigen.c:2074 pepigen.c:2074 pex64igen.c:2074
+#: peigen.c:2419 pepigen.c:2419 pex64igen.c:2419
+#, c-format
+msgid "%03x %*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgstr ""
+
+#: peigen.c:2461 pepigen.c:2461 pex64igen.c:2461
 #, c-format
-msgid "%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgid "<unknown directory type: %d>\n"
 msgstr ""
 
-#: peigen.c:2116 pepigen.c:2116 pex64igen.c:2116
+#: peigen.c:2469 pepigen.c:2469 pex64igen.c:2469
 #, c-format
 msgid " Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"
 msgstr ""
 
-#: peigen.c:2204 pepigen.c:2204 pex64igen.c:2204
+#: peigen.c:2558 pepigen.c:2558 pex64igen.c:2558
 #, c-format
 msgid "Corrupt .rsrc section detected!\n"
 msgstr ""
 
-#: peigen.c:2220 pepigen.c:2220 pex64igen.c:2220
+#: peigen.c:2582 pepigen.c:2582 pex64igen.c:2582
 #, c-format
 msgid ""
 "\n"
 "WARNING: Extra data in .rsrc section - it will be ignored by Windows:\n"
 msgstr ""
 
+#: peigen.c:2588 pepigen.c:2588 pex64igen.c:2588
+#, c-format
+msgid " String table starts at offset: %#03x\n"
+msgstr ""
+
+#: peigen.c:2591 pepigen.c:2591 pex64igen.c:2591
+#, c-format
+msgid " Resources start at offset: %#03x\n"
+msgstr ""
+
+#: peigen.c:2643 pepigen.c:2643 pex64igen.c:2643
+#, c-format
+msgid ""
+"\n"
+"There is a debug directory, but the section containing it could not be "
+"found\n"
+msgstr ""
+
+#: peigen.c:2649 pepigen.c:2649 pex64igen.c:2649
+#, c-format
+msgid ""
+"\n"
+"There is a debug directory in %s, but that section has no contents\n"
+msgstr ""
+
+#: peigen.c:2656 pepigen.c:2656 pex64igen.c:2656
+#, c-format
+msgid ""
+"\n"
+"Error: section %s contains the debug data starting address but it is too "
+"small\n"
+msgstr ""
+
+#: peigen.c:2661 pepigen.c:2661 pex64igen.c:2661
+#, c-format
+msgid ""
+"\n"
+"There is a debug directory in %s at 0x%lx\n"
+"\n"
+msgstr ""
+
+#: peigen.c:2668 pepigen.c:2668 pex64igen.c:2668
+#, c-format
+msgid ""
+"The debug data size field in the data directory is too big for the section"
+msgstr ""
+
+#: peigen.c:2673 pepigen.c:2673 pex64igen.c:2673
+#, c-format
+msgid "Type                Size     Rva      Offset\n"
+msgstr ""
+
+#: peigen.c:2721 pepigen.c:2721 pex64igen.c:2721
+#, c-format
+msgid "(format %c%c%c%c signature %s age %ld)\n"
+msgstr ""
+
+#: peigen.c:2729 pepigen.c:2729 pex64igen.c:2729
+#, c-format
+msgid ""
+"The debug directory size is not a multiple of the debug directory entry "
+"size\n"
+msgstr ""
+
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:2243 pepigen.c:2243 pex64igen.c:2243
+#: peigen.c:2749 pepigen.c:2749 pex64igen.c:2749
 #, c-format
 msgid ""
 "\n"
 "Characteristics 0x%x\n"
 msgstr ""
 
-#: peigen.c:3194 pepigen.c:3194 pex64igen.c:3194
+#: peigen.c:2984 pepigen.c:2984 pex64igen.c:2984
+#, c-format
+msgid "%B: Data Directory size (%lx) exceeds space left in section (%lx)"
+msgstr ""
+
+#: peigen.c:3014 pepigen.c:3014 pex64igen.c:3014
+msgid "Failed to update file offsets in debug directory"
+msgstr ""
+
+#: peigen.c:3020 pepigen.c:3020 pex64igen.c:3020
+msgid "%B: Failed to read debug data section"
+msgstr ""
+
+#: peigen.c:3836 pepigen.c:3836 pex64igen.c:3836
 #, c-format
 msgid ".rsrc merge failure: duplicate string resource: %d"
 msgstr ""
 
-#: peigen.c:3329 pepigen.c:3329 pex64igen.c:3329
+#: peigen.c:3971 pepigen.c:3971 pex64igen.c:3971
 msgid ".rsrc merge failure: multiple non-default manifests"
 msgstr ""
 
-#: peigen.c:3347 pepigen.c:3347 pex64igen.c:3347
+#: peigen.c:3989 pepigen.c:3989 pex64igen.c:3989
 msgid ".rsrc merge failure: a directory matches a leaf"
 msgstr ""
 
-#: peigen.c:3389 pepigen.c:3389 pex64igen.c:3389
+#: peigen.c:4031 pepigen.c:4031 pex64igen.c:4031
 msgid ".rsrc merge failure: duplicate leaf"
 msgstr ""
 
-#: peigen.c:3391 pepigen.c:3391 pex64igen.c:3391
+#: peigen.c:4033 pepigen.c:4033 pex64igen.c:4033
 #, c-format
 msgid ".rsrc merge failure: duplicate leaf: %s"
 msgstr ""
 
-#: peigen.c:3457 pepigen.c:3457 pex64igen.c:3457
+#: peigen.c:4099 pepigen.c:4099 pex64igen.c:4099
 msgid ".rsrc merge failure: dirs with differing characteristics\n"
 msgstr ""
 
-#: peigen.c:3464 pepigen.c:3464 pex64igen.c:3464
+#: peigen.c:4106 pepigen.c:4106 pex64igen.c:4106
 msgid ".rsrc merge failure: differing directory versions\n"
 msgstr ""
 
 #. Corrupted .rsrc section - cannot merge.
-#: peigen.c:3537 pepigen.c:3537 pex64igen.c:3537
+#: peigen.c:4223 pepigen.c:4223 pex64igen.c:4223
 #, c-format
 msgid "%s: .rsrc merge failure: corrupt .rsrc section"
 msgstr ""
 
-#: peigen.c:3673 pepigen.c:3673 pex64igen.c:3673
+#: peigen.c:4231 pepigen.c:4231 pex64igen.c:4231
+#, c-format
+msgid "%s: .rsrc merge failure: unexpected .rsrc size"
+msgstr ""
+
+#: peigen.c:4370 pepigen.c:4370 pex64igen.c:4370
 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
 msgstr ""
 
-#: peigen.c:3693 pepigen.c:3693 pex64igen.c:3693
+#: peigen.c:4390 pepigen.c:4390 pex64igen.c:4390
 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
 msgstr ""
 
-#: peigen.c:3714 pepigen.c:3714 pex64igen.c:3714
+#: peigen.c:4411 pepigen.c:4411 pex64igen.c:4411
 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
 msgstr ""
 
-#: peigen.c:3734 pepigen.c:3734 pex64igen.c:3734
+#: peigen.c:4431 pepigen.c:4431 pex64igen.c:4431
 msgid ""
 "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because ."
 "idata$6 is missing"
 msgstr ""
 
-#: peigen.c:3776 pepigen.c:3776 pex64igen.c:3776
+#: peigen.c:4473 pepigen.c:4473 pex64igen.c:4473
 msgid ""
 "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because ."
 "idata$6 is missing"
 msgstr ""
 
-#: peigen.c:3801 pepigen.c:3801 pex64igen.c:3801
+#: peigen.c:4498 pepigen.c:4498 pex64igen.c:4498
 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
 msgstr ""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/BLD-POTFILES.in ./bfd/po/BLD-POTFILES.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/BLD-POTFILES.in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/BLD-POTFILES.in	2017-03-06 01:49:05.000000000 +0000
@@ -2,9 +2,11 @@ bfd_stdint.h
 bfdver.h
 elf32-aarch64.c
 elf32-ia64.c
+elf32-riscv.c
 elf32-target.h
 elf64-aarch64.c
 elf64-ia64.c
+elf64-riscv.c
 elf64-target.h
 peigen.c
 pepigen.c
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/da.gmo ./bfd/po/da.gmo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/da.gmo	2015-07-06 01:51:18.000000000 +0000
+++ ./bfd/po/da.gmo	2017-03-06 01:53:33.000000000 +0000
@@ -1,54 +1,77 @@
-Þ•â,'ƒ<NHhIhbh�h˜h$«h3Ðhi%$iJiAZi&œiÃiÜiõijj =j^j~j—j®jÁj*Ùj9k6>k;uk±kFÃk6
-l:Al5|lJ²l)ýlG'mLom)¼mLæm3nInD`n¥nÄnÖnêno3!oUo0lo�o­o½o+×o+p+/p#[pp—p p¬pÊpápøpq5qNqiq‰q¢q½qÓqëq,ÿq,r<rUrmr„r“r©rÃr1Úrss*sAs\s#ts+˜s&Äs5ës!t9tStitƒtœt³t$Étîtu'u?u$Tuyu�u¢u<»uøuv
v$v8v PvqvŒvœv¼vØvøvw*w=w*Iwtw†w&˜w¿w0Ówx"x	;xEx#Xx|x•x¦x¿x"Øxûx"y#2y#Vyzy#�y#³y×y.äyzz!z&z
-CzNzSz!Yz {zœz¡z¦zÆzæzëzÿz {%{,{2{7{<{B{F{K{g{€{…{¥{¹{Ù{ù{þ{|
-|||'|.|B|I|b|v|‡|˜|©|º|Ë|	Ú|
ä|
ò|
-}
-}
-}!}
-6}A}$H}
-m}#x}%œ}
-Â}Í}à}$ø}~;~!U~w~Œ~
-›~
¦~	´~¾~
-Ï~Ú~á~ù~"9Tc|‹’¢¶(Ï/ø(€A€S€h€+w€£€A¿€��5�O�8d���µ�Ê�&ä�‚*‚>‚2Y‚Œ‚?¦‚&æ‚
ƒ,ƒ(?ƒhƒ"|ƒŸƒ*¿ƒ6êƒ{!„r�„x…‰…DŸ…*ä…7†$G†'l†*”†!¿†=á†A‡Ea‡§‡%Æ‡Dì‡.1ˆ,`ˆ*�ˆ%¸ˆ4Þˆ‰G2‰Jz‰-Å‰+ó‰5Š8UŠ(ŽŠ,·ŠPäŠE5‹F{‹FÂ‹3	Œu=Œ<³Œ%ðŒ�A4�nv�Kå�71Ž6iŽ$ Ž*ÅŽ@ðŽ81�¨j�.�<B�9�B¹�Bü�T?‘T”‘Té‘T>’‰“’<“mZ“[È“P$”<u”D²”^÷”DV•€›•1–JN–I™–>ã–m"—6�—mÇ—-5˜ c˜!„˜#¦˜8Ê˜)™.-™0\™>�™>Ì™/š/;šFkš>²š-ñš(›H›7f›1ž›0Ð›/œ)1œ/[œ;‹œ<Çœ/�-4�&b�3‰�3½�Oñ�WAžO™žoéž5YŸ#�Ÿ7³ŸEëŸ>1 2p :£ 2Þ (¡+:¡<f¡?£¡Qã¡35¢'i¢=‘¢<Ï¢M£KZ£D¦£!ë£:
¤7H¤€¤.ž¤Í¤1í¤'¥%G¥ m¥EŽ¥4Ô¥H	¦?R¦<’¦GÏ¦-§7E§1}§8¯§2è§+¨/G¨7w¨¯¨+Ï¨Lû¨$H©+m©™©·©Ð©ð©+ª57ª@mª@®ªIïªI9«9ƒ«$½«'â«=
-¬QH¬Dš¬1ß¬5­G­-d­?’­AÒ­E®$Z®-®9­®4ç®#¯/@¯%p¯<–¯*Ó¯'þ¯&°4B°w°4–°Ë°.â°(±*:±6e±2œ±5Ï±8²W>²Z–²Bñ²54³=j³<¨³(å³-´<´PV´ §´@È´k	µ4uµ;ªµ$æµ¶2(¶O[¶K«¶G÷¶`?·Y ·Sú·<N¸1‹¸5½¸gó¸a[¹l½¹F*º-qº&Ÿº2Æº(ùº3"»1V»-ˆ»D¶»Bû»6>¼*u¼2 ¼.Ó¼*½(-½JV½¡½4¼½Dñ½C6¾Cz¾E¾¾^¿]c¿)Á¿+ë¿$À)<À8fÀ:ŸÀ&ÚÀ&Á+(Á=TÁ,’Á¿Á+ÝÁ	Â-Â+MÂyÂ,˜Â*ÅÂ2ðÂ"#Ã"FÃ-iÃ,—ÃGÄÃGÄGTÄ(œÄ@ÅÄDÅ2KÅ4~Å7³Å:ëÅ7&Æ-^Æ5ŒÆ/ÂÆ*òÆ1Ç;OÇW‹Ç-ãÇÈ)/È%YÈ2È2²È=åÈ;#ÉB_ÉA¢É:äÉ2Ê?RÊ’Ê›²Ê.NË}Ë#�Ë>ÁË=ÌG>Ì0†Ì&·Ì7ÞÌ8Í9OÍ6‰Í/ÀÍCðÍQ4Î†Î¦ÎµÎÊÎ#àÎ2Ï&7Ï^ÏMmÏT»Ï2Ð|CÐ(ÀÐ[éÐ+EÑ/qÑ(¡ÑRÊÑFÒFdÒ:«Ò6æÒDÓ7bÓ*šÓ-ÅÓ0óÓA$ÔHfÔ>¯Ô+îÔIÕ;dÕ Õ;ÀÕ;üÕ.8Ö.gÖ=–ÖIÔÖ.×/M×@}×*¾×)é×;ØOØ>mØB¬ØlïØ@\Ù?�ÙGÝÙF%ÚJlÚH·ÚKÛGLÛB”ÛX×Û40Ü/eÜN•Ü0äÜ(Ý/>ÝnÝ�Ý•Ý0§Ý=ØÝDÞ0[Þ5ŒÞ)ÂÞ7ìÞ$ß>ß']ß&…ß[¬ßGàOPà9 à>Úà2á5LáP‚á=Óá/âoAâ±â
ÅâÓâ
ßâíâ%þâ\$ã;�ã½ãÏãåãèãõã	ää*ä,7ädäxä/Žä¾ä;Îä
-åå/å8åLåaåvå�å	ªå"´å+×å#æ,'æ:Tæ�æ¡æ.½æ4ìæ	!ç"+çNçeçnçrç…ç—ç©ç'»çãç è#!èEè_è$qè$–è$»è'àè%é'.éVété”é"´é×éçéüéê(ê)>êhê#~ê#¢ê-Æê8ôê1-ëA_ë.¡ëYÐë_*ì;Šì)Æì!ðì$í7íHLí%•í»í5Øíî
-#î#.îRîdî}î˜î­îºîÉî
çîõî/ï+7ï8cïœï²ïÑïãïõï.ð-BðGpð3¸ðìð"ñI.ñ%xñžñ±ñÃñáñóñ$ò1òNò`òrò„ò”òªò¼òÜòíòüòó	óó(ó
-?ó"Jó%mó“óŸó®óÅóáó÷ó	ô)ôBôbôvôˆô ô-¾ôìôþôõ%õ?õ_õ)tõ/žõÎõàõòõùõ!ö."ö,Qö~ö:šö%Õö%ûö!÷=:÷Cx÷<¼÷Bù÷1<ø8nø5§ø5Ýø?ù3Sù4‡ù>¼ù5ûù21ú<dú3¡ú"Õú[øú?Tû”û$³û)Øûüü*&üQü&cüŠüœü£ü(ªüÓü'åü
ý*ýBýbý#zý$žý,Ãý.ðý,þ.Lþ{þ"˜þ,»þ.èþ!ÿ19ÿ0kÿ2œÿ,Ïÿ.üÿ#+Oo(ƒ/¬!Üþ(#D+h”,­ Úû4Hh#‡-«"Ùü&9Qj‘2¬$ß&+	K!UwD‘DÖ/K/]?�ÍÞþ(J17|´*Îù)?Pf%ƒ©¼ÙöJ JkJ¶I	:K	;†	:Â	Eý	6C
-9z
-7´
-9ì
-Q&/xB¨@ë.,=[&™.À/ï-
iM
D·
dü
,aFŽfÕC<€#Ÿ@Ã87=u	•Ÿ»Íß<ô21.d“›²ÊdâG$Z•²4Î'$+7Pˆ™±ÈÙñ	-?Qk†˜©Áà2ÿ]2�-©+×+*/	Z	d
-nyŽ�²Á1Æø'6"^$�¦ÄÙâ]=^(œZÅZ E{AÁGWKW£9û954o9¤4Þ27F5~7´.ì2 N[o@Ë:#G<kN¨-÷O% u>–9Õ
- 1 &L &s !š ¼ ,Û 7!
@!N!a!u!ˆ!7›!Ó!$ó!""A;"}",›"2È"û"#&#A#Ba#D¤#*é#L$a$v$ …$y¦$ %0(%%Y%%‡%�%–%2²%Oå%5&*T& & &K¾&
-'' 1'R'f'{'‘'¥'»'Ò'ï'((N(k()o(6™(Ð(8ð());)K)S)h)|)�)¤)·)LÊ) *D8*}*�*¢*3½*!ñ*+"+=+M+\+%o+'•+$½+â+0þ+,/,\,z,”,œ,
´,Â,'Ú,--3-E-\-7s-«-Ä-Ö-é-ý-.'.-F.Ct.C¸.)ü.>&/ge/xÍ/-F0!t07–0Î0!ç0;	10E15v12¬1.ß1=2/L26|2,³2kà2L4d4‚4–4&­45Ô4%
-5'05X5=h5&¦5Í5ç566,6!L6 n6�6«6À6Ô6)ï6:7AT7?–7Ö7Læ71389e80Ÿ8QÐ8+"9UN9P¤9*õ9O :p:†:Kž:"ê:
;;2;$Q;2v;©;3Á;õ;<<+0<+\<+ˆ<#´<Ø<î<÷<#='=E= \=}=š=³=Ï=ï=>#>9>S>/g>—>§>À>Ú>
ò>??0?-G?u?†?“?ª?Æ?&Ú?-@)/@8Y@’@¨@Â@×@ñ@
-A!A 7AXA"qA”A¬A'ÂAêAÿAB</BlB{B
ŠB˜B«B!ÃBåBC#C!5C WCxC‘C«CÂC/ÎCþCD)*DTD=lDªD&¾DåDîD#E%E>ENEgE$ƒE¨E#¼E#àE#F(F#;F#_FƒF.•FÄFÊFÒF×F
-öFGG&G%3GYG^G cG„G¤G©G½G'ÂGêGñG÷GüGHHHH0HLHQHqH„H¤HÄHÉHÎHÕHÛHàHòHùHII7IQIbIsI„I•I
¦I	´I
¾I
ÌI
-ÚI
-åI
-ðIûIJ!J*(J
-SJ0^J+�J»JÍJßJ$ûJ K@K/[K‹K K
-¯KºKËK×KîKýKLL7LJLbL
€LŽL
§LµL¼LÍLáL3úL?.MnM‡M™M
®M)¼MæMANDN^NxN’N7¨NàNùN
O-(O&VO}O‘O8¬OåO>ÿO->P&lP“P(¦PÏP'ãPQ*+QHVQŠŸQu*R{ RSB0S*sS5žS%ÔS)úS+$T&PTGwTL¿TAUNU1fUH˜U/áU&V)8V bV4ƒV¸VO×VV'W0~W-¯W1ÝW4X)DX.nXR�XDðXC5YHyY3ÂY€öYIwZ*ÁZìZC
-[lN[I»[7\B=\%€\*¦\HÑ\K]³f],^5G^2}^E°^Jö^iA_i«_i`i`—é`5�a�·aZ9bT”b;ébM%cpscHäc†-d5´dFêdD1e7vek®e4ftOf(Äf"íf"g#3g8Wg3�g3Äg2øgO+hO{h=Ëh0	iS:i@Ži<Ïi0j%=j@cj:¤j-ßj,
k':k,bk8�k>Èk9l6Al,xl:¥l:àlUmfqm\Øm�5n;·n)ónCoIao@«o?ìo7,p6dp*›p/ÆpOöp;FqL‚q9Ïq(	rC2rDvrN»rE
-s>Ps#�sH³s<üs9t/Xtˆt.§t"Ötùtu:2u1muKŸuLëuG8vE€v.Æv=õv93w?mw6­w5äw4x?Ox%�x7µxXíx+Fy1ry'¤yÌy!ìyz.*z9YzD“zDØzQ{Qo{?Á{'|,)|EV|Tœ|Kñ|9=}1w}©}3Ä}Bø}B;~S~~0Ò~4@80y#ª5Î*€</€/l€#œ€À€<Û€�67�n�-†�'´�)Ü�5‚2<‚4o‚8¤‚\Ý‚c:ƒQžƒ4ðƒB%„<h„4¥„-Ú„#…P,…,}…=ª…{è…0d†8•†Î†&ê†9‡NK‡Qš‡Iì‡a6ˆY˜ˆXòˆ@K‰5Œ‰=Â‰fŠagŠkÉŠV5‹AŒ‹-Î‹<ü‹)9Œ5cŒ0™Œ*ÊŒCõŒB9�;|�-¸�.æ�(Ž&>Ž-eŽI“ŽÝŽ0úŽ>+�=j�=¨�=æ�V$�U{�-Ñ�/ÿ�$/‘+T‘5€‘;¶‘(ò‘)’%E’Ak’-­’Û’*ö’!“08“*i“”“+²“7Þ“-”*D”*o”4š”3Ï”N•ER•N˜•-ç•D–DZ–3Ÿ–:Ó–6—;E—;�—.½—2ì—8˜6X˜2�˜<Â˜Wÿ˜3W™'‹™.³™$â™&š1.šN`šN¯šVþšRU›J¨›3ó›='œeœ¤…œ+*�"V� y�=š�AØ�Mž0hž*™ž7Äž5üž92Ÿ7lŸ2¤ŸC×ŸP !l Ž � ´ *É 2ô 1'¡Y¡Sh¡[¼¡4¢~M¢+Ì¢_ø¢/X£8ˆ£0Á£Wò£KJ¤K–¤?â¤A"¥>d¥7£¥&Û¥>¦DA¦<†¦BÃ¦A§1H§Lz§9Ç§#¨G%¨Dm¨-²¨-à¨?©HN©2—©0Ê©Jû©.Fª'uª@�ªÞª>ýªF<«lƒ«Að«@2¬Ks¬J¿¬M
-­JX­J£­Gî­?6®]v®9Ô®5¯ND¯+“¯.¿¯1î¯ °9°P°@g°7¨°=à°7±2V±-‰±7·±ï±
-² (².I²dx²EÝ²M#³:q³<¬³5é³<´[\´C¸´<ü´p9µªµ
¾µÌµ
Üµêµ%úµh ¶>‰¶È¶Þ¶õ¶ø¶·!·*·<·3I·}·“·:¨·ã·>ó·2¸H¸X¸a¸v¸Œ¸¢¸»¸Ô¸$Ý¸9¹"<¹9_¹A™¹Û¹#í¹.º2@ºsº…º¥º
-ÂºÍºÑºäºöº»4»O»!o»$‘»¶»Õ»/ç»*¼*B¼*m¼+˜¼-Ä¼#ò¼%½%<½(b½‹½ ½º½!Õ½÷½(¾4¾.H¾&w¾3ž¾AÒ¾5¿GJ¿/’¿hÂ¿k+À@—À)ØÀ$Á$'ÁLÁGhÁ+°ÁÜÁ1øÁ*Â>Â3JÂ~Â�ÂªÂÄÂÞÂðÂÃÃ/Ã6AÃ1xÃ8ªÃãÃøÃÄ*Ä$<Ä3aÄ.•ÄNÄÄ=ÅQÅkÅMŠÅ%ØÅþÅÆ !ÆBÆTÆ%mÆ!“ÆµÆÇÆÙÆëÆûÆÇ!%ÇGÇ^ÇkÇ}Ç	„Ç
-ŽÇ™ÇµÇ$ÄÇ/éÇÈ!È8ÈMÈiÈÈ!“ÈµÈ ÎÈïÈÉÉ 6É7WÉ�É¡É²ÉÇÉåÉÊ(Ê.@ÊoÊ�Ê“ÊšÊ ¡Ê2ÂÊ0õÊ&Ë?BË*‚Ë)­Ë×ËKõËMAÌF�ÌLÖÌ1#Í;UÍ7‘Í8ÉÍFÎ5IÎ7Î8·Î7ðÎ5(Ï6^Ï5•Ï'ËÏdóÏ?XÐ˜Ð.µÐ(äÐ
-
ÑÑ0/Ñ`Ñ(rÑ›Ñ­Ñ´Ñ/»ÑëÑ1ýÑ/ÒKÒbÒ�Ò"–Ò#¹Ò.ÝÒ-Ó.:Ó-iÓ—Ó³Ó.ÓÓ-Ô 0Ô/QÔ5�Ô4·Ô.ìÔ-Õ!IÕkÕ†Õ%˜Õ+¾ÕêÕ	Ö'$Ö LÖ,mÖšÖ'±ÖÙÖùÖ×+×=×\×"z×+�×%É×ï×ØØ/ØHØeØuØ„Ø/¢Ø+ÒØ6þØ&5Ù\Ù*nÙ™ÙEµÙEûÙ9AÚ{Ú2‹ÚJ¾Ú	ÛÛ4ÛMÛ_ÛOhÛ7¸ÛðÛ5Ü;ÜUÜnÜ‚Ü—Ü±ÜÏÜíÜÿÜ'ÝCÝbÝMtÝMÂÝIÞNZÞ<©ÞKæÞJ2ßK}ßJÉß>à<Sà>�àjÏàN:áU‰áUßá25â@hâ(©â8Òâ0ã,<ãniãTØãl-ä0šäPËäeåE‚å'Èå'ðåIæ<bæ=Ÿæ#Ýæ	çç'ç9çKçG_ç1§ç*Ùçè*è7èOè_nèÎè$áèé"é?éA\é6žé&ÕéBüé?êSênêˆêœê·êÒêçêüêë&ëCëaëvëŠë£ë Ãë4äëtìŽì3©ì1Ýì1í*Aí	lí	ví
-€í‹í�í¬íÁíÐí0Öíî$%î-Jî)xî*¢î!Íîïîï
ïk*ï8–ï*Ïï\úïXWðE°ðAöð@8ñayñaÛñ9=ò7wò4¯ò9äò4ó9Só@�ó<Îó@ô-Lô/zô!ªô]ÌôH*õ9sõ­õ@ÍõMö5\öE’ö ØöAùö;;÷w÷0‡÷&¸÷)ß÷#	ø&-ø?Tø=”ø
Òøàøùø
ù ù53ùiù‚ù!¡ù@Ãùú,ú5Jú€ú�úªú!ÅúDçúC,û+pûMœûêûüüz1ü¬ü1´ü%æüýýý#ý8Aýezý%àý,þ 3þ(TþY}þ×þñþ$ÿ0ÿCÿWÿlÿÿ”ÿªÿÇÿØÿìÿHôÿ=%A;g!£<Å+3NbvŠ�e°(O?�¤·8Ö3C#Jn~�)¤1Î"#,?.l›ºØß÷'C"[~#žÂ9â5EVhzŽ7®JæJ17|8´{í�i2ú+-	<Y	–	(²	LÛ	:(
-9c
-3�
-6Ñ
-I8R8‹.Ä;—ˆ¥Ä—b@¦iðÛÝ÷¾¦»ÏóJý¼9F�Ö1lü•eqÅrÉö+õö�§¤J&q�|‚sv£Ö
-âm&{¡
´¥NŠOxj[÷ako›€4àƒ­·ÿ"Úb-<”2}W»Ó�(&wu“DÐÔ¯ð†ôV_×eOÝô¾)âû¢#Á·Øgš‚Ÿæ×R¼¯9Ö�UÜoh	ð-jMˆº¼þÁ.ôSÀALc~Šà‡¨ël5„4cœ$6yÞ*?×1²\Ô¶´SBAÙEË{&–Âg›`M.g±ÎÓ½ÃdÏÉŽM�åqÄ-	CQ×±1´Î
->°ÆkÁ=xápH¢”ì@·¶ÃÄg™X]•:X£Ž”˜oN±�=CéÈìAE·„ÌI7#ŸÊ+ÍFCXPì¹K' ÈhÖf¸`_Ã!ÓŒÒ5!ÎL}Xê 3í…K/Æw.¹4@ÃÏÒ;©Zd:–"®ü.Es¹Ê:—V+%<áTŒ
-VCÒÀ¿©àÕ9‡Û¦TE‹B»{…,çÈ|¸äÿ˜˜[³pž^ä�p|ç’€yDòž`Øƒß½Œx°#;š_™_Ô�\í`ï¢î/#â€Y�ßßær/^ÇIRw
“zá0�óWöºb'ã ^.}fþZ„ãÊµ¾«ayÈÃG€Œ:Ž•›~2þß mÌãdïÎ‘^úýñŸ£vå(6Þ;âáê’¬Ë�FÁ‹Ü/a¹™I¼ç²‚Ò�òWPV ÐÜ­—±6Mïº¨†Ó~Ð‰o8–L‰X*kÿ2¡q‹•]Ñ|{¶û'ué„R\ V{6jœm‡<D§
aÅ¶-­þ=ƒÌ4©UÊë¥‰³À=rv§Ðô�Âc]œªÐf»´¿è½†*};µ³»'*›º
-ìGi-Ïn…RæƒÜõQ^Ñj	É¯9ùuTt>Œ?ÄhJ¬=¥›«Ýù5—dN�])ŠÂ+¬„(HûA,tŠ1~s©`7ÇŸL1ún“™ÛK%Ìè0œaŠhFÁg7çB‡?£¨(ƒ0LUñ¢òÚl¡pÑÀ$v&¤r²Íó©OË‘¹f§´ªÍÍ÷D¸N³¿Z@kS6�ª738 j†">Íâ�"3Ç\B¤’WË$5åÔ¡ˆÈöÕKážóÆy0ë–3ÿÕÚ%ù‘Þ«kešÇ®i×²¡¨@D ¿xtœ)ˆGUéY_�«“,GzS?¢ÅÙd‹wom*Gü
:Å‡…ò8#†“®7¦5<Âµ)<‚µTãžHÌP²Ùý8Q¾\pATå¸EÀ­¤fÙŸS ½î$£P°Ž‰Osù­ü˜¯èC!«ú–�>uîn¯Ôî¨ÑÅ’½P~K¸šÊ	êàÇê‘ñ¼J¦bÛ‘z
?øØžzàøºNÝ™”'…švíeml,ÞøðW¶Q8c®s’/‹¥}z M”n[Æ§Yiª">³2YH¬	Úy±+,ëtŽÞÝHÎÕuäRnËí3x|Bi![br¬ß‰æ%•Ó2J]lÒ��eªZYÙÂØ)·Ñ°€Û¿U9OøõµÉÆû�ý¾4c‚$[QéÕñä�(%ØÖ0¤ÉZÜõh
-ˆ˜ÚIwÄÏ�!q�tïI°ú®÷Fè	Export Address Table 			Export Address Table 		%08lx
+Þ•wÔ+KŒW¸t¹tÆtßtþtu$(u3Mu�uŽu%®uÔuAäu&&vMvfvv˜v¨v Çvèvw!w8wKw*cw9Žw6Èw;ÿw;xFMx6”x:Ëx5yJ<y)‡yG±yLùy)FzLpz½zÓzDêzG/{w{–{¨{¼{Ô{3ó{'|0>|o||�|+©|+Õ|+}#-}Q}i}r}~}œ}³}Ê}ê}~ ~;~[~t~�~¥~½~,Ñ~þ~'?Ve{•1¬Þïü€.€#F€+j€&–€5½€ó€�%�;�U�n�…�$›�À�Ù�ù�‚$&‚K‚_‚t‚<�‚Ê‚Ù‚
è‚ö‚
+ƒ "ƒCƒ^ƒnƒŽƒªƒÊƒãƒüƒ„*„F„X„&j„‘„0¥„Ö„"ê„	
……#*…N…g…x…‘…"ª…Í…"á…#†#(†L†#a†#…†©†¶†¼†Ä†É†
+æ†ñ†ö†!ü† ‡?‡D‡I‡i‡‰‡Ž‡¢‡!§‡É‡Ð‡Ö‡Û‡à‡æ‡ê‡ï‡ˆ$ˆ)ˆIˆ]ˆB}ˆÀˆàˆåˆêˆñˆ÷ˆüˆ‰‰‰%‰>‰R‰c‰t‰…‰–‰§‰¿‰	Î‰
Ø‰
æ‰
+ô‰
+ÿ‰
+
+Š
+Š Š
+5Š$@Š
+eŠ#pŠ%”Š
+ºŠÅŠ×ŠêŠ$‹'‹E‹!_‹�‹–‹
+¥‹
°‹	¾‹È‹
+Ù‹ä‹ë‹ŒŒ/Œ>ŒUŒpŒŒ˜Œ§Œ®Œ(¾Œ/çŒ�)�+8�d�A€�Â�Ü�ö�Ž8%Ž^ŽvŽ‹Ž&¥ŽÌŽëŽ2�?9�&y� �(¿�"è��*+�6V�{��r	‘x|‘õ‘5’A’DN’*“’7¾’$ö’'“*C“!n“=�“AÎ“E”V”%u”D›”à”.þ”,-•*Z•%…•4«•à•>ÿ•Q>–G�–8Ø–	—J—5f—8œ—(Õ—,þ—P+˜E|˜FÂ˜F	™OP™H ™3é™<š%ZšA€šnÂšK1›7}›*µ›8à›.œ<Hœ9…œ@¿œH�BI�JŒ�B×�TžTožTÄž‰Ÿ<£ŸmàŸ[N Pª <û D8¡^}¡DÜ¡€!¢1¢¢JÔ¢I£>i£m¨£6¤aM¤¯¤·¤7Ë¤!¥#%¥8I¥)‚¥.¬¥0Û¥>¦>K¦/Š¦/º¦Fê¦>1§-p§(ž§Ç§7å§1¨0O¨/€¨)°¨/Ú¨;
+©<F©Aƒ©<Å©,ª//ª-_ª&�ª3´ª3èªO«Wl«OÄ«o¬+„¬5°¬#æ¬7
+­EB­>ˆ­2Ç­:ú­U5®2‹®(¾®+ç®¯7-¯<e¯?¢¯Qâ¯34°'h°=�°<Î°"±M.±K|±DÈ±!
²:/²7j²¢².À²ï²1³A³'^³%†³ ¬³EÍ³4´HH´?‘´<Ñ´Gµ>Vµ-•µ<Ãµ7¶18¶8j¶2£¶+Ö¶/·^2·]‘·7ï·'¸+G¸Ls¸+À¸ì¸
+¹#¹C¹+^¹5Š¹@À¹@ºIBºIŒº9Öº$»,5»'b»=Š»QÈ»D¼1_¼5‘¼Ç¼2ä¼.½?F½.†½ µ½AÖ½E¾:^¾$™¾9¾¾5ø¾&.¿&U¿4|¿1±¿$ã¿$À/-À%]À<ƒÀ*ÀÀ'ëÀ3Á&GÁnÁ4ŠÁ¿Á4ÞÁÂ.*Â(YÂ*‚Â6­Â2äÂ5Ã8MÃW†ÃZÞÃB9Ä5|Ä=²Ä<ðÄ(-Å-VÅ0„ÅµÅPÏÅ  Æ@AÆk‚Æ4îÆ;#Ç$_Ç'„Ç¬Ç2ÉÇOüÇKLÈG˜È`àÈAAÉYƒÉSÝÉ<1ÊgnÊaÖÊl8ËF¥Ë-ìË2Ì(MÌ3vÌ1ªÌ-ÜÌD
+ÍBOÍ6’Í*ÉÍ#ôÍ2Î.KÎ*zÎ(¥Î]ÎÎJ,ÏwÏ’Ï4¬ÏDáÏC&ÐCjÐE®Ð^ôÐ]SÑ)±Ñ+ÛÑ$Ò),Ò7VÒ9ŽÒ&ÈÒ&ïÒ2Ó+IÓ=uÓ,³ÓàÓ+þÓ*Ô-@Ô+nÔšÔ¹Ô*ØÔ2Õ"6Õ#YÕ"}Õ- Õ,ÎÕGûÕGCÖG‹Ö(ÓÖ@üÖD=×3‚×2¶×`é×2JØ7}Ø5µØ/ëØ*Ù1FÙ;xÙ&´ÙWÛÙ-3Ú+aÚ-�Ú»Ú)ÙÚ%Û2)Û2\Û=�Û;ÍÛB	ÜALÜ:ŽÜ2ÉÜ?üÜ<Ý›\Ý6øÝ6/ÞAfÞG¨Þ6ðÞ='ß:eß: ßDÛß8 à9YàC“à:×à7á8Já9ƒá,½á6êá!â;=â:yâ.´â/ãâã13ã%eã$‹ã9°ãOêã#:ä,^ä1‹äC½ä6å"8å2[å/Žå(¾å&çå%æ)4æ ^æHæ4Èæ'ýæ1%ç;Wç>“ç%Òç7øç(0è5Yè'�è8·è>ðè /éPé!né �é'±ébÙé)<ê=fêG¤ê%ìê*ë0=ë&në&•ë7¼ë7ôë8,ì0eì9–ì6Ðì/íC7íQ{íÍíííüíî2'î&Zî.�î°îM¿îT
ï2bï|•ï(ð[;ð+—ð/Ãð(óðRñFoñF¶ñ:ýñ68òDoò(´ò7Ýò*ó-@ó0nóAŸóHáó>*ô+iôI•ô;ßôõ;;õ;wõ.³õ.âõ=öIOö.™ö/Èö@øö*9÷)d÷;Ž÷Ê÷>è÷B'øljø@×ø?ùGXùF ùJçùH2úK{úGÇúBûXRû4«û/àûNü0_ü(�ü/¹üéüüüý0"ý=SýD‘ý0Öý5þ)=þ7gþŸþ¹þ'Øþ&ÿ['ÿGƒÿOËÿ9U>u2´5çP=n<¬/éo]‰ç
û	
#%4\Z;·ó;H	ak}•¦,³àô
+/!/Q2�9´#î'2:3m¡;±í/DYk~•²Ï	í"÷+#F,j:—Òä.	4/	?d	=¤		â	"ì	
+&
+/
+3
+F
+X
+j
+'|
+¤
+ Á
+#â
+  2S$q$–'»%ã'	1Oo"�²Â×ì
)
C
#Y
#}
-¡
8Ï
2A;'}.¥YÔ_.;Ž)Ê!ô$;HP%™¿5Ü
+'"2Ug€›°½Ì
êø/
++:8fŸ
+µÀß'ñ+.I-xG¦3î""AId%®Ôçù":L$e*Š+µáþ5FXj€’²ÌÝìþ	
+/":%]ƒ�žµÑçù2Rfx�-®Üî/O)d/Ž¾Ðâé!ð.,An:Š%Å%ëC*=nC¬=ð".[Q?­í))S\vw*î&+Rr„‹(’»'Íõ*J#b$†,«.Ø, .4 c "€ ,£ .Ð !ÿ 1!!0S!2„!,·!.ä!#"7"W"(k"/”"!Ä"æ"(##,#+P#|#,•# Â#ã#ü#$0$P$#o$-“$"Á$ä$ö$%!%:%O%a%2|%$¯%&Ô%û%	&!%&DG&DŒ&/Ñ&'/'?C'ƒ'”'´'Ë'7Þ'(J(‰j(7ô(,)*F)q)‰)¡)·)È)Þ)#û)%*E*X*u*’*J¤*Jï*J:+I…+:Ï+;
+,:F,E�,6Ç,+þ,;*-Ff-Q­-/ÿ-B/.@r.;³.Kï..;/Fj/a±/=0&Q0.x0/§0-×0/1i51DŸ1dä1.I2,x2F¥2fì2CS3—3#¶3@Ú3847T4Œ4˜¬4	E5O5k5}5�5<¤52á5.6C6K6b6z6d’6÷66
+7=A7g7bç7=J8Eˆ81Î8(9$)9N94d9'™9$Á97æ9:/:G:^:o:‡:Ÿ:±:Ã:Õ:ç:;;.;?;W;v;2•;È;-á;+<+;<*g<	’<	œ<
+¦<
+±<¼<Ñ<à<õ<=1	=;=Z='y="¡=Ä=â=÷=>,>]K>=©>(ç>Z?Zk?EÆ?A@GN@W–@Wî@9FA9€A-ºA4èA9B4WB2ŒB7¿B5÷B7-CBeCE¨CBîCC1DAuD.·D2æD E[:E@–E:×E#F=6F<tF%±FN×F-&GOTG;¤G àG>H9@H
+zH1…H&·H&ÞH!I'I,FIJsI7¾I
öIJJ+J>J7QJ6‰JÀJ$àJ"KA(KjK,ˆK2µKèK¾øK»·LsMŽM©MBÉMDN*QNL|NÉNÞNŒíNzO0‚O9³OíOPPP3P:P2VPO‰PÙP*øP #QDQbQoQ ‰QªQ¾QÓQéQýQR*RGRXRlRNtRÃR#ÇRëR6S:S ZS8{S´SÆSÖSÞSóSTT/TBTLUT ¢TDÃTPUYUkU~U3™U!ÍUïU"öUV)V8V%KV'qV$™V*¾VéV0W,6WcW�W›W£W
»W%ÉWïW'X/XIXcXzXŒX£X7ºXòXY Y2YEYYYmYƒY™Y-¸Y)æY>ZgOZx·Z-0[!^[7€[¸[!Ñ[;ó[0/\5`\<–\<Ó\2]/C].s]=¢]/à]6^,G^«t^ `-`E`c`w`&Ž`5µ`
ë`%ù`'aGa=Wa&•a¼aÖañabb!;b ]b~bšb¯bÂb)Ýb:c@Bc?ƒcÃcLÓc0 d9Qd/‹dQ»d+
eT9ePŽe*ßeO
+fZfpfKˆfLÔf"!gDgUgig$ˆg2­gàg1øg*h:hJh+eh+‘h+½h#éh
i#i,i#8i\izi ‘i²iÏièij$j=jXjnjˆj/œjÌjÜjõjk
'k5kKkek-|kªk»kÈkßkûk$l+4l'`l6ˆl¿lÕlïlmm7mNmdm‚m"›m¾mÖm'ìmn)n?n<Yn–n¥n
´nÂnÕn!íno+o#;o!_o �o¢o»oÕoìo/øo(p>p)Tp~p=–pÔp&èpqq#+qOqhqxq‘q$­qÒq#æq#
+r#.rRr#er#‰r­r¿rÅrÍrÒr
+ñrürs&s%.sTsYs ^ssŸs¤s¸s%½sãsêsðsõsústt	t)tEtJtjt}tC�tátuuuuuu$u=uDuKuiuƒu”u¥u¶uÇuØu
ñu	ÿu
	v
v
+%v
+0v
+;v
+FvQvev*wv
+¢v0­v+Þv
+ww.w@w$\w�w¡w/¼wìwx
+xx,x8xOx^xex}x˜xªx½xÕx
óxy
y(y/y3@y?ty´y
Æy)ÔyþyAz\zvz�zªz7Àzøz{"{-<{&j{‘{8¬{>å{-$|&R|'y|'¡|É|*é|H}€]}uÞ}{T~Ð~:ä~?.'n5–%Ì(ò+€&G€Gn€L¶€A�E�1]�G��×�/÷�&'‚)N‚ x‚4™‚Î‚;í‚U)ƒOƒ<Ïƒ	„T„0k„4œ„)Ñ„.û„R*…D}…CÂ…H†LO†Gœ†3ä†H‡*a‡CŒ‡lÐ‡I=ˆ7‡ˆ*¿ˆKêˆ,6‰5c‰2™‰<Ì‰E	Š>OŠGŽŠDÖŠi‹i…‹iï‹–YŒ5ðŒ€&�Y§�SŽ:UŽL�ŽoÝŽGM�‘•�4'�E\�C¢�6æ�j‘4ˆ‘w½‘5’=’?U’"•’#¸’8Ü’3“3I“2}“O°“O”<P”0�”T¾”@•<T•0‘•%Â•@è•:)–,d–,‘–'¾–,æ–8—=L—AŠ—CÌ—6˜9G˜6�˜,¸˜:å˜: ™T[™g°™]š�vš-øš;&›)b›CŒ›IÐ›@œ?[œ7›œTÓœ6(�*_�.Š�¹�>Õ�Nž;cžLŸž9ìž(&ŸCOŸC“Ÿ-×ŸN DT =™  × Hø <A¡~¡.�¡Ì¡.ë¡¢"7¢Z¢y¢:“¢1Î¢K£LL£G™£Eá£L'¤.t¤J£¤=î¤9,¥?f¥5¦¥5Ü¥4¦bG¦aª¦?§%L§7r§Xª§0¨'4¨\¨!|¨ž¨.º¨9é¨D#©Dh©P­©Pþ©?Oª'�ª1·ª+éªD«TZ«J¯«8ú«13¬e¬1€¬3²¬Bæ¬0)­$Z­B­SÂ­=®0T®>…®4Ä®$ù®*¯0I¯,z¯(§¯#Ð¯5ô¯**°<U°/’°#Â°-æ°%±:±:U±�±6¯±æ±,þ±&+²(R²4{²1°²3â²7³[N³bª³K
´3Y´A�´;Ï´3µ,?µ,lµ#™µO½µ,
¶=:¶zx¶0ó¶8$·]·'y·&¡·9È·N¸QQ¸I£¸aí¸GO¹Y—¹Xñ¹@Jºf‹ºaòºkT»VÀ»A¼<Y¼(–¼4¿¼/ô¼*$½AO½@‘½;Ò½-¾+<¾.h¾(—¾&À¾-ç¾^¿Ht¿½¿×¿0ð¿>!À=`À=žÀ=ÜÀVÁUqÁ-ÇÁ/õÁ$%Â*JÂ8uÂ:®Â(éÂ(Ã4;Ã%pÃA–Ã,ØÃÄ* ÄKÄ0bÄ)“Ä%½ÄãÄ7Å-9Å*gÅ+’Å*¾Å4éÅ3ÆNRÆE¡ÆNçÆ-6ÇCdÇD¨Ç4íÇ2"ÈoUÈ2ÅÈ6øÈ2/É8bÉ6›É1ÒÉ;Ê1@ÊWrÊ3ÊÊ3þÊ+2Ë'^Ë.†Ë$µË&ÚË1ÌN3ÌN‚ÌVÑÌR(ÍJ{Í3ÆÍ=úÍ8Î£XÎ9üÎ66ÏKmÏQ¹Ï9Ð@EÐ<†Ð=ÃÐKÑ:MÑ<ˆÑJÅÑ<Ò:MÒ:ˆÒEÃÒ7	Ó3AÓuÓD’ÓB×Ó+Ô2FÔ"yÔ:œÔ'×Ô)ÿÔA)ÕMkÕ ¹Õ+ÚÕ0ÖE7Ö<}ÖºÖ:ØÖ;×(O×(x×&¡×+È×!ô×QØ2hØ,›Ø=ÈØCÙ>JÙ‰Ù2¨Ù.ÛÙ8
+Ú'CÚ8kÚ=¤Ú#âÚ$Û!+Û!MÛ.oÛužÛ.ÜACÜM…ÜÓÜ*ïÜ0Ý)KÝ8uÝ9®Ý7èÝ5 Þ?VÞ8–Þ6ÏÞ1ßB8ßN{ß!Êßìßûßà2&à1Yà7‹àÃàSÒà[&á4‚á~·á+6â_bâ.Ââ8ñâ/*ãUZãJ°ãJûã?FäA†ä=Èä1å78å&på=—åDÕå<æBWæAšæ1ÜæKç9Zç#”çF¸çCÿç-Cè-qè>ŸèGÞè2&é0YéJŠé-Õé'ê@+êlê=ŠêFÈêlëA|ë@¾ëKÿëJKìM–ìJäìJ/íGzí?Âí]î9`î5šîNÐî+ï.Kï0zï«ïÄïÛï@òï73ð=kð6©ð2àð-ñ6Añxñ“ñ ±ñ.ÒñdòEfòM¬ò:úò 5ó<Vó5“ó<Éó[ôCbôB¦ô<éôp&õf—õþõ
ö ö
0ö>ö%Nöhtö>Ýö÷2÷I÷#L÷p÷÷™÷¢÷´÷Ë÷Ý÷3ê÷ø4øIø9aø6›ø9ÒøAù)Nù-xù8¦ù:ßùú>*úiúú�ú˜ú­úÃúÙúìúûû2û$Rûwû$€û9¥û"ßû9ü@<ü}ü#�ü.³ü2âü@ý?Vý–ý¨ýÈý
+åýðýôýþþ+þ4=þrþ!’þ$´þÙþøþ 
+ÿ+ÿ*Gÿ*rÿ*�ÿ+Èÿ-ôÿ#"%F%l(’»Ðê!'(;d.x%§3ÍA6CGz&Â/éhk‚>î'-$U$zŸG»+/1K}‘*�ÈÚô(:Jhy6‹1Â8ô-
+BMm(¨$º3ß.MB=�ÎèM	%U	{	�	ž	4¾	ó	
+%
+*D
+,o
+!œ
+¾
+6Ð
++D!Uw’©¶È	Ï
+Ùä$/4dlƒ˜´Ê!Þ
 
:
R
f
 �
7¢
Ú
ì
ý
0M(b.‹ºÌÞåì20?p?Œ*Ì)÷!F?K†MÒD 'ed�?ò2N'l
+”Ÿ~¶05f'x" ÃÕÜ.ã1$Vr‰¨"½#à.-3.a-�¾Ú.ú-)W,u5¢4Ø.
-<!jŒ§%¹+ß*'E m,Ž»'Òú1L^}"›+¾%ê">Pl|‹/©+Ù6&<c*uE Eæ8,e/uJ¥ðÿ4AFˆN‘�à7p¨4½ò%9Nh†¤ÂÔ'ð M* Mx IÆ N!<_!Kœ!Jè!K3"J"7Ê"F#SI#j�#N$UW$U­$F%UJ%2 %SÓ%o'&@—&(Ø&8'0:'+k'-—'mÅ'T3(lˆ(2õ(0()PY)dª)E*'U*'}*I¥*<ï*=,+#j+�Ž+	,,6,R,d,v,GŠ,1Ò,*-/-*7-b-z-_˜-ø-:.JF.h‘.aú.=\/Hš/.ã/%0$80]0@y02º0&í0B1W1k1†1 1´1Ï1ê1ÿ12)2>2[2y2Ž2¢2»2 Û24ü2132K30~30¯3*à3	4	4
+4
+*454G4V4k4z40€4±4$Î4,ó4) 5!J5l5�5Š52§5kÚ58F6*6\ª6X7E`7A¦7@è7a)8a‹89í87'93_94“99È94:97:@q:<²:@ï:?0;Hp;?¹;Gù;CA<-…</³<!ã<]=Hc=9¬=æ=L>@S>(”>M½>5?EA?7‡? ¿?Aà?;"@^@0n@&Ÿ@)Æ@#ð@%AC:AQ~A7ÐA
BB/BCBVB5iB1ŸBÑBêB!	C@+ClC,…C4²CçCËöCÁÂD„EŸE!ºEDÜEC!F+eFM‘FßFûFŒG˜G1 G7ÒG!
+H,H4H"<H_HfH8„He½H%#I,II vI(—IÀIÚI$õIJ-JAJVJiJ~J”J±JÂJÖJHÞJ'K-+K$YK;~K!ºK!ÜK<þK;LMLdLlL‡L›L¯LÃLÖLeéL(OMOxMRÈMN0NCN8bN3›NÏN#ÖNúN
+OO)0O+ZO!†O1¨OÚO,öO.#PRPqP�P–P®P)ºPäP'üP$Q<Q"SQvQ#–QºQ9ÚQR-R@RPRaRsR…R™R­R7ÍR7S8=S{vS�òS1ƒT*µT<àTU(9ULbU:¯U9êUB$VBgV3ªV,ÞV6WIBW7ŒW7ÄW.üW�ÝgóAX]˜1Ð�rb:Yð
+kê4ÏrGJêæ‘(äOÒªqúçîß/ièB_Œ¾Snwx½RŽÐ	[ïÌT+‚ÿ| Ì¡†c2ºÐFÀí?\ÿJM>ŸAqÀŸ²VýIÔ^š­Ç/rÒä—Ô£HÈ®²è‡bHÔGûì¾Ãn™�®–%­ÊñIkc¶“2<Êº�¥Y´§X5“$
\7÷àã²©æEéãšz´V|ÓòˆK­˜EouÄ$VJK¡»†>Ûì¨
+èñ¢â&	¨k'¸sØv.9¤b†át ˜Ýioðõ[½ÖašŽœžÄQ8‘@ «³dÍ¬zØ8ÅêCt”idþBf–§ž*oÃìËEÞ—ôþ]ºcl0ÑÎ¹\8¼,)œ™�\PõíÁmT±ê�•¬BÇY‰;]¤0ayON£�X6³ÖSu:1r€3"‡n	ö±[rƒÓ=§^=IåMÄ$%X¶<¾”p-á:Á¬�Â@3üRÉOÅeÅµŸ¹ç{÷Œ^ñö›	¶¦¥=e´ç(UˆhD¸Üã5…27e*sôù.é4äMXW	OP_eÉQÛèjÅkLë‚Œ™©1SÅ½³6,Jœ:¿P.’Ö˜Ñ*ë¸ÝU}jt#Ùat~8<ÿ­0!¦uüVÆZ	;�Í³÷ù¬+`ø°`Ê@ÈØ¹ $µ°_Ö£G€‰lò~¯¹!ÞÙ{;…Àóq{M’ˆ¿¼URÇ(!¢C(þïv‹¿JLnIjÒskmswŠG#(?ë¥#"@q�¨Ü’÷+!„Ç‹J6ÒÎÈÚ]‡d'Ô„p¶OÂbîÂ]žÈ›Z
V�x\˜�¦·zur²Á‚Œ™GX;¼ÚˆS?&=xÕ-#©òHEoNcõgÁ¨pÞù*œ¾6«�óúF‡Æ1òdRÆ'
+ÖýeUWC·–>-ËNàÌzé›ZŽ»–K»•ƒi%`Ä¡Ã:h¤¤.k
+n KÛZ*¤w³(I&já ßí/º&A·L�+‘·�å—o4)%6žßûð"ú`‹vâû€ï9úZ}Õ‘,®vzø9+Žní…­â×š=
g)jÊtþUŒiw¿
+ƒ”‚QáW¸Ú2¡m«±!¥÷ûÚ>¢¾+°aYž’d_À€pý_Šæ„ôµ±Ÿ¯ÞÎgÔ½Ûô’gPÿ,•é?�à,Ù
‰ŸÌ§A@á�530^fÌ{¯ú<«×µ5ZRx�-hùBN)…PÒußR „å/�Amyv2€véD>ÝOøNýË8lº±´/›|$Á'D\œIÐ~ãø‹¦ï"V‹Ú;Qùf�l/Š-�Äh$Õ
pÇË—FðàfH"9hâg6ø4”ƒªª}×²Ù|S-°^9%õeØ�a<EWD<ÏÕÎ%•ÿ[puwèìÙh�ÈDyû!£Í:§†; Ym5·bß¥”}ÜÑªWÊÑ…Þöä¦¯8°qñ~]ŠAF)d«Y7M[là—Õ}4ëw�ÂKóC‰F¬ˆ„•"ë>fU3¢f3GØN*ÀÉô
`ñóÎ[îT¸ö¹b»–2FÃÉ7å|Ó.t†TÑ
+?T“Hi.M›µÓîìCEçƒLoòÐqs¢ËÆŽy&®#D™âõ‘'ý`{ðÝ0¯Âüa�x9BC½#¡‚BQÉ“ä¿&ŠªÃ×ÛLüþsLÍ¨y ãç1æ'31K´@QÏ5‡T4Ü©Ó)¶‰Wíl7ÏcH®©S_î¼Ü7æï×~ÍÏ^üåšm »“öPc=,?Æê0¼ j£	    TLS: %A	Export Address Table 			Export Address Table 		%08lx
 	Name Pointer Table 			Ordinal Table 				[Name Pointer/Ordinal] Table	%08lx
 	code-base %08lx toc (loadable/actual) %08lx/%08lx
-	reloc %4d offset %4x [%4lx] %s	vma:  Hint/Ord Member-Name Bound-To
+	non-TLS: %A	reloc %4d offset %4x [%4lx] %s	vma:  Hint/Ord Member-Name Bound-To
 
 	DLL Name: %s
 
@@ -108,6 +131,8 @@ Version definitions:
 
 Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld
 
+WARNING: Extra data in .rsrc section - it will be ignored by Windows:
+
 [Ordinal/Name Pointer] Table
 
 ppcboot header:
@@ -207,23 +232,20 @@ ppcboot header:
   shlextra  : %5u, permctx   : %5u
   shlstoff  : %5u, shrimgcnt : %5u
   size : %u
- #: Segment name     Section name     Address
  %08x 0x%08x 64B <EABI version unrecognised> BPAGE: %u COM COMM Change Protection (%u entries):
  Code Address Reference Fixups:
  DEF EXE First address : 0x%08x 0x%08x
  Fourth address: 0x%08x 0x%08x
- GBL Glue code sequence LIB Linkage Pairs Referece Fixups:
+ GBL Glue code sequence LIB Linkage Pairs Reference Fixups:
  NOMOD NORM OVR PIC QVAL RD REL Register restore millicode Register save millicode SHR Second address: 0x%08x 0x%08x
  Shareable images:
  Shared image  : 0x%08x 0x%08x
+ Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d
  Third address : 0x%08x 0x%08x
- UNI VEC VECEP WEAK WRT [64-bit doubles] [BE8] [FPA float format] [LE8] [Maverick float format] [VFP float format] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolute position] [d-float] [dsp] [dynamic symbols use segment index] [fix dep] [floats passed in float registers] [floats passed in integer registers] [g-float] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [mapping symbols precede others] [memory=bank-model] [memory=flat] [new ABI] [no abi set] [nonpic] [not 32bitmode] [old ABI] [pic] [position independent] [relocatable executable] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table] [v10 and v32] [v32] corrupted GST
- cpusubtype: %08lx
- cputype   : %08lx (%s)
+ UNI VEC VECEP WEAK WRT [BE8] [FPA float format] [G10] [LE8] [Maverick float format] [VFP float format] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [XGATE RAM offsetting] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [abiv%ld] [absolute position] [d-float] [dynamic symbols use segment index] [fix dep] [floats passed in float registers] [floats passed in integer registers] [g-float] [hard-float ABI] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [mapping symbols precede others] [memory=bank-model] [memory=flat] [new ABI] [no abi set] [nonpic] [not 32bitmode] [old ABI] [pic] [position independent] [relocatable executable] [soft-float ABI] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table] [v10 and v32] [v32] corrupted GST
  debug module table : vbn: %u, size: %u
  debug symbol table : vbn: %u, size: %u (0x%x)
- filetype  : %08lx (%s)
- fixup info rva:  flags     : %08lx ( flags: 0x%04x global symbol table: vbn: %u, records: %u
+ fixup info rva:  flags: 0x%04x global symbol table: vbn: %u, records: %u
  ident: 0x%08x, name: %.*s
  ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u
  image build ident: %.*s
@@ -234,16 +256,12 @@ ppcboot header:
  linker flags: %08x: linker ident     : %.*s
  long-word .address reference fixups:
  long-word relocation fixups:
- magic     : %08lx
  majorid: %u, minorid: %u
  module offset: 0x%08x, size: 0x%08x, (%u psects)
- ncmds     : %08lx (%lu)
  offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u
  quad-word .address reference fixups:
  quad-word relocation fixups:
- reserved  : %08x
  section: base: 0x%08x%08x size: 0x%08x
- sizeofcmds: %08lx
  type: %3u, len: %3u (at 0x%08x):  unhandled EOBJ record type %u
  vbn: %u, pfc: %u, matchctl: %u type: %u ( vma:			Begin Address    End Address      Unwind Info
  vma:		Begin    End      EH       EH       PrologEnd  Exception
@@ -252,47 +270,113 @@ ppcboot header:
      		Address  Length   Length   32b exc  Handler   Data
  vma:            Hint    Time      Forward  DLL       First
                  Table   Stamp     Chain    Name      Thunk
-#<Invalid error code>%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections%A has both ordered and unordered sections%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)
+#<Invalid error code>%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d
+%*.s Entry: %A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections%A has both ordered and unordered sections%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)
 %A:0x%v not found in function table
-%B (%s): Section flag %s (0x%x) ignored%B and %B are for different configurations%B and %B are for different cores%B contains CRIS v32 code, incompatible with previous objects%B contains non-CRIS-v32 code, incompatible with previous objects%B has has both the current and legacy Tag_MPextension_use attributes%B is not allowed to define %s%B section %A exceeds stub group size%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section%B(%A): error: call to undefined function '%s'%B(%A): internal error: dangerous relocation%B(%A): internal error: out of range error%B(%A): internal error: unknown error%B(%A): internal error: unsupported relocation error%B(%A): invalid property table%B(%A): warning: unaligned access to symbol '%s' in the small data area%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link%B(%A+0x%lx): %s reloc against `%s': error %d%B(%A+0x%lx): %s reloc against local symbol%B(%A+0x%lx): %s relocation against SEC_MERGE section%B(%A+0x%lx): %s relocation against external symbol "%s"%B(%A+0x%lx): %s used with TLS symbol %s%B(%A+0x%lx): %s used with non-TLS symbol %s%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): Stabs entry has invalid string index.%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section%B(%A+0x%lx): cannot handle %s for %s%B(%A+0x%lx): cannot reach %s%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch%B(%A+0x%lx): could not decode instruction; possible configuration mismatch%B(%A+0x%lx): invalid instruction for TLS relocation %s%B(%A+0x%lx): non-zero addend on %s reloc against `%s'%B(%A+0x%lx): reloc against `%s': %s%B(%A+0x%lx): reloc against `%s': error %d%B(%A+0x%lx): relocation %s for indirect function %s unsupported%B(%A+0x%lx): relocation offset out of range (size=0x%x)%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern%B(%A+0x%lx): unexpected fix for %s relocation%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'%B(%A+0x%lx): unresolvable relocation against symbol `%s'%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete
-%B(%A+0x%x): relocation to `%s+%x' may have caused the error above%B(%s): warning: interworking not enabled.
+%B (%s): Section flag %s (0x%x) ignored%B and %B are for different configurations%B and %B are for different cores%B contains CRIS v32 code, incompatible with previous objects%B contains non-CRIS-v32 code, incompatible with previous objects%B has has both the current and legacy Tag_MPextension_use attributes%B is not allowed to define %s%B section %A exceeds stub group size%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section%B uses unknown e_flags 0x%lx%B(%A): error: call to undefined function '%s'%B(%A): internal error: dangerous relocation%B(%A): internal error: out of range error%B(%A): internal error: unknown error%B(%A): internal error: unsupported relocation error%B(%A): invalid property table%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte.%B(%A): warning: unaligned access to symbol '%s' in the small data area%B(%A): warning: unaligned small data access of type %d.%B(%A+0x%%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link%B(%A+0x%lx): %s relocation against SEC_MERGE section%B(%A+0x%lx): %s relocation against external symbol "%s"%B(%A+0x%lx): %s used with TLS symbol %s%B(%A+0x%lx): %s used with non-TLS symbol %s%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object%B(%A+0x%lx): Stabs entry has invalid string index.%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section%B(%A+0x%lx): cannot handle %s for %s%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch%B(%A+0x%lx): could not decode instruction; possible configuration mismatch%B(%A+0x%lx): invalid instruction for TLS relocation %s%B(%A+0x%lx): reloc against `%s': error %d%B(%A+0x%lx): relocation offset out of range (size=0x%x)%B(%A+0x%lx): unexpected fix for %s relocation%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'%B(%A+0x%lx): unresolvable relocation against symbol `%s'%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete
+%B(%s): warning: interworking not enabled.
   first occurrence: %B: ARM call to Thumb%B(%s): warning: interworking not enabled.
   first occurrence: %B: Thumb call to ARM%B(%s): warning: interworking not enabled.
   first occurrence: %B: arm call to thumb%B(%s): warning: interworking not enabled.
-  first occurrence: %B: thumb call to arm%B(%s): warning: interworking not enabled.
   first occurrence: %B: thumb call to arm
   consider relinking with --support-old-code enabled%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'%B, section %A:
   relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC%B, section %A:
   relocation %s should not be used in a shared object; recompile with -fPIC%B, section %A:
   v10/v32 compatible object %s must not contain a PIC relocation%B, section %A: No PLT for relocation %s against symbol `%s'%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?%B, section %A: relocation %s is not allowed for global symbol: `%s'%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?%B, section %A: relocation %s with no GOT created%B, section %A: relocation %s with non-zero addend %d against local symbol%B, section %A: relocation %s with non-zero addend %d against symbol `%s'%B, section %A: unresolvable relocation %s against symbol `%s'%B, section `%A', to symbol `%s':
-  relocation %s should not be used in a shared object; recompile with -fPIC%B: !samegp reloc against symbol without .prologue: %s%B: %A+0x%lx: Direct jumps between ISA modes are not allowed; consider recompiling with interlinking enabled.%B: %s symbol `%s' in %B is referenced by DSO%B: %s symbol `%s' isn't defined%B: %s: invalid needed version %d%B: %s: invalid version %u (max %d)%B: '%s' accessed both as normal and thread local symbol%B: .got subsegment exceeds 64K (size %d)%B: .opd is not a regular array of opd entries%B: .preinit_array section is not allowed in DSO%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32%B: 0x%lx: fatal: reloc overflow while relaxing%B: 0x%lx: fatal: unaligned %s relocation 0x%lx%B: 0x%lx: fatal: unaligned branch target for relax-support relocation%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%B: 0x%lx: warning: bad R_SH_USES load offset%B: 0x%lx: warning: bad R_SH_USES offset%B: 0x%lx: warning: bad count%B: 0x%lx: warning: could not find expected COUNT reloc%B: 0x%lx: warning: could not find expected reloc%B: 0x%lx: warning: symbol in unexpected section%B: @gprel relocation against dynamic symbol %s%B: @internal branch to dynamic symbol %s%B: @pcrel relocation against dynamic symbol %s%B: ABI is incompatible with that of the selected emulation%B: ABI mismatch: linking %s module with previous %s modules%B: Architecture mismatch with previous modules%B: BE8 images only valid in big-endian mode.%B: Bad relocation record imported: %d%B: CALL15 reloc at 0x%lx not against global symbol%B: CALL16 reloc at 0x%lx not against global symbol%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000).%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch.%B: Cannot handle compressed Alpha binaries.
-   Use compiler flags, or objZ, to generate uncompressed binaries.%B: Corrupt size field in group section header: 0x%lx%B: Failed to add renamed symbol %s%B: Function descriptor relocation with non-zero addend%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d%B: GOT overflow: Number of relocations with 8-bit offset > %d%B: GOT reloc at 0x%lx not expected in executables%B: IMPORT AS directive for %s conceals previous IMPORT AS%B: Instruction set mismatch with previous modules%B: Invalid relocation type imported: %d%B: Malformed reloc detected for section %s%B: Not enough room for program headers, try linking with -N%B: Only registers %%g[2367] can be declared using STT_REGISTER%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive%B: Relocation %s (%d) is not currently supported.
-%B: Relocations in generic ELF (EM: %d)%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined%B: TLS local exec code cannot be linked into shared objects%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed%B: The first section in the PT_DYNAMIC segment is not the .dynamic section%B: The target (%s) of an %s relocation is in the wrong section (%A)%B: Too many sections: %d (>= %d)%B: Unable to sort relocs - they are in more than one size%B: Unable to sort relocs - they are of an unknown size%B: Unhandled import type; %x%B: Unknown mandatory EABI object attribute %d%B: Unknown relocation type %d
+  relocation %s should not be used in a shared object; recompile with -fPIC%B: !samegp reloc against symbol without .prologue: %s%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled.%B: %s
+%B: %s not absolute%B: %s' accessed both as normal and thread local symbol%B: %s: invalid needed version %d%B: %s: invalid version %u (max %d)%B: '%s' accessed both as normal and thread local symbol%B: .got subsegment exceeds 64K (size %d)%B: .opd is not a regular array of opd entries%B: .preinit_array section is not allowed in DSO%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32%B: 0x%lx: fatal: reloc overflow while relaxing%B: 0x%lx: fatal: unaligned %s relocation 0x%lx%B: 0x%lx: fatal: unaligned branch target for relax-support relocation%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%B: 0x%lx: warning: bad R_SH_USES load offset%B: 0x%lx: warning: bad R_SH_USES offset%B: 0x%lx: warning: bad count%B: 0x%lx: warning: could not find expected COUNT reloc%B: 0x%lx: warning: could not find expected reloc%B: 0x%lx: warning: symbol in unexpected section%B: @gprel relocation against dynamic symbol %s%B: @internal branch to dynamic symbol %s%B: @pcrel relocation against dynamic symbol %s%B: ABI is incompatible with that of the selected emulation%B: ABI mismatch: linking %s module with previous %s modules%B: ABI version %ld is not compatible with ABI version %ld output%B: ASE mismatch: linking %s module with previous %s modules%B: Alignment mismatch with previous modules%B: Architecture mismatch with previous modules%B: BE8 images only valid in big-endian mode.%B: Bad relocation record imported: %d%B: CALL15 reloc at 0x%lx not against global symbol%B: CALL16 reloc at 0x%lx not against global symbol%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000).%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch.%B: Cannot handle compressed Alpha binaries.
+   Use compiler flags, or objZ, to generate uncompressed binaries.%B: Cannot link together %s and %s objects.%B: Corrupt size field in group section header: 0x%lx%B: Failed to add renamed symbol %s%B: Function descriptor relocation with non-zero addend%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d%B: GOT overflow: Number of relocations with 8-bit offset > %d%B: GOT reloc at 0x%lx not expected in executables%B: IMPORT AS directive for %s conceals previous IMPORT AS%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte%B: Instruction set mismatch with previous modules%B: Invalid relocation type imported: %d%B: Malformed reloc detected for section %s%B: Nested OMIT_FP in %A.%B: No symbol version section for versioned symbol `%s'%B: Not enough room for program headers, try linking with -N%B: Only registers %%g[2367] can be declared using STT_REGISTER%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive%B: Relocation %s (%d) is not currently supported.
+%B: Relocations in generic ELF (EM: %d)%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined%B: TLS local exec code cannot be linked into shared objects%B: TLS sections are not adjacent:%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed%B: The first section in the PT_DYNAMIC segment is not the .dynamic section%B: The target (%s) of an %s relocation is in the wrong section (%A)%B: Too many sections: %d (>= %d)%B: Unable to sort relocs - they are in more than one size%B: Unable to sort relocs - they are of an unknown size%B: Unhandled import type; %x%B: Unknown mandatory EABI object attribute %d%B: Unknown relocation type %d
 %B: Unknown section type in a.out.adobe file: %x
-%B: Unrecognised .directive command: %s%B: Unrecognised import name type; %x%B: Unrecognised import type; %x%B: Unrecognised machine type (0x%x) in Import Library Format archive%B: Unrecognized storage class %d for %s symbol `%s'%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s%B: Warning: Thumb BLX instruction targets thumb function '%s'.%B: Warning: bad `%s' option size %u smaller than its header%B: Warning: cannot determine the target function for stub section `%s'%B: XMC_TC0 symbol `%s' is class %d scnlen %d%B: `%s' accessed both as FDPIC and thread local symbol%B: `%s' accessed both as normal and FDPIC symbol%B: `%s' accessed both as normal and thread local symbol%B: `%s' has line numbers but no enclosing section%B: `%s' in loader reloc but not loader sym%B: `ld -r' not supported with PE MIPS objects
-%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d%B: bad pair/reflo after refhi
-%B: bad reloc address 0x%lx in section `%A'%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'%B: bad relocation section name `%s'%B: bad section length in ihex_read_section%B: bad string table size %lu%B: bad symbol index: %d%B: cannot create stub entry %s%B: change in gp: BRSGP %s%B: class %d symbol `%s' has no aux entries%B: compiled for a 64 bit system and target is 32 bit%B: compiled for a big endian system and target is little endian%B: compiled for a little endian system and target is big endian%B: compiled normally and linked with modules compiled with -mrelocatable%B: compiled with -mrelocatable and linked with modules compiled normally%B: could not find output section %A for input section %A%B: could not find output section %s%B: csect `%s' not in enclosing section%B: don't know how to handle OS specific section `%s' [0x%8x]%B: don't know how to handle allocated, application specific section `%s' [0x%8x]%B: don't know how to handle processor specific section `%s' [0x%8x]%B: don't know how to handle section `%s' [0x%8x]%B: dtp-relative relocation against dynamic symbol %s%B: duplicate export stub %s%B: duplicate section `%A' has different size%B: endianness incompatible with that of the selected emulation%B: error: Cortex-A8 erratum stub is allocated in unsafe location%B: error: Cortex-A8 erratum stub out of range (input file too large)%B: error: VFP11 veneer out of range%B: error: relocation %s not a multiple of %d%B: error: unaligned relocation type %d at %08x reloc %p
-%B: gp-relative relocation against dynamic symbol %s%B: ignoring duplicate section `%A'%B: illegal relocation type %d at address 0x%lx%B: illegal symbol index in reloc: %d%B: incompatible machine type. Output is 0x%x. Input is 0x%x%B: indirect symbol `%s' to `%s' is a loop%B: internal error in ihex_read_section%B: invalid SHT_GROUP entry%B: invalid link %lu for reloc section %s (index %u)%B: invalid relocation type %d%B: invalid string offset %u >= %lu for section `%s'%B: jump too far away
-%B: linking %s module with previous %s modules%B: linking 32-bit code with 64-bit code%B: linking 64-bit files with 32-bit files%B: linking UltraSPARC specific with HAL specific code%B: linking auto-pic files with non-auto-pic files%B: linking big-endian files with little-endian files%B: linking constant-gp files with non-constant-gp files%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double%B: linking files compiled for HCS12 with others compiled for HC12%B: linking little endian files with big endian files%B: linking non-pic code in a position independent executable%B: linking trap-on-NULL-dereference with non-trapping files%B: loader reloc in read-only section %A%B: loader reloc in unrecognized section `%s'%B: misplaced XTY_LD `%s'%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'.%B: no group info for section %A%B: non-pic code with imm relocation against dynamic symbol `%s'%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table%B: pc-relative relocation against dynamic symbol %s%B: pc-relative relocation against undefined weak symbol %s%B: probably compiled without -fPIC?%B: reloc %s:%d not in csect%B: reloc against a non-existant symbol index: %ld%B: relocation %s against %s `%s' can not be used when making a shared object%s%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s%B: relocation %s can not be used when making a shared object; recompile with -fPIC%B: relocation %s cannot be used when making a shared object%B: relocation %s is not supported for symbol %s.%B: relocation %s is not yet supported for symbol %s.%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend%B: relocation size mismatch in %B section %A%B: relocation type %d not implemented%B: relocs in section `%A', but it has no contents%B: section %A lma %#lx adjusted to %#lx%B: section %s: string table overflow at offset %ld%B: section `%A' can't be allocated in segment %d%B: sh_link [%d] in section `%A' is incorrect%B: sh_link of section `%A' points to discarded section `%A' of `%B'%B: sh_link of section `%A' points to removed section `%A' of `%B'%B: size field is zero in Import Library Format header%B: speculation fixup to dynamic symbol %s%B: string not null terminated in ILF object file.%B: symbol `%s' has unrecognized csect type %d%B: symbol `%s' has unrecognized smclas %d%B: symbol `%s' required but not present%B: the target (%s) of a %s relocation is in the wrong output section (%s)%B: too many sections (%d)%B: tp-relative relocation against dynamic symbol %s%B: unable to fill in DataDictionary[12] because .idata$5 is missing%B: unable to fill in DataDictionary[1] because .idata$2 is missing%B: unable to fill in DataDictionary[1] because .idata$4 is missing%B: unable to fill in DataDictionary[9] because __tls_used is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing%B: unable to find ARM glue '%s' for `%s'%B: unable to find THUMB glue '%s' for `%s'%B: unable to find VFP11 veneer `%s'%B: unable to get decompressed section %A%B: unable to initialize commpress status for section %s%B: unable to initialize decommpress status for section %s%B: undefined reference to symbol '%s'%B: undefined sym `%s' in .opd section%B: unexpected ATN type %d in external part%B: unexpected redefinition of indirect versioned symbol `%s'%B: unexpected reloc type %u in .opd section%B: unexpected type after ATN%B: unhandled dynamic relocation against %s%B: unimplemented %s
-%B: unimplemented ATI record %u for symbol %u%B: unknown [%d] section `%s' in group [%s]%B: unknown relocation type %d%B: unknown relocation type %d for symbol %s%B: unknown/unsupported relocation type %d%B: unrecognized relocation (0x%x) in section `%A'%B: unsupported relocation type %i%B: unsupported relocation type %s%B: unsupported relocation: ALPHA_R_GPRELHIGH%B: unsupported relocation: ALPHA_R_GPRELLOW%B: uses _-prefixed symbols, but writing file with non-prefixed symbols%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%B: uses non-prefixed symbols, but writing file with _-prefixed symbols%B: version node not found for symbol %s%B: warning: COMDAT symbol '%s' does not match section name '%s'%B: warning: Empty loadable segment detected, is this intentional ?
-%B: warning: allocated section `%s' not in segment%B: warning: could not read contents of section `%A'%B: warning: duplicate line number information for `%s'%B: warning: duplicate section `%A' has different contents%B: warning: duplicate section `%A' has different size
-%B: warning: ignoring duplicate section `%A'
-%B: warning: illegal symbol index %ld in line numbers%B: warning: illegal symbol index %ld in relocs%B: warning: line number table read failed%B: warning: linking PIC files with non-PIC files%B: warning: linking abicalls files with non-abicalls files%B: warning: selected VFP11 erratum workaround is not necessary for target architecture%B: warning: sh_link not set for section `%A'%B:%A%s exceeds overlay size
+%B: Unmatched OMIT_FP in %A.%B: Unrecognised .directive command: %s%B: Unrecognised import name type; %x%B: Unrecognised import type; %x%B: Unrecognised machine type (0x%x) in Import Library Format archive%B: Unrecognized storage class %d for %s symbol `%s'%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s%B: Warning: Thumb BLX instruction targets thumb function '%s'.%B: Warning: bad `%s' option size %u smaller than its header%B: Warning: cannot determine the target function for stub section `%s'%B: Warning: thumb mode PLT generation not currently supported%B: XMC_TC0 symbol `%s' is class %d scnlen %d%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC%B: `%s' accessed both as FDPIC and thread local symbol%B: `%s' accessed both as normal and FDPIC symbol%B: `%s' accessed both as normal and thread local symbol%B: `%s' has line numbers but no enclosing section%B: `%s' in loader reloc but not loader sym%B: `ld -r' not supported with PE MIPS objects
+%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d%B: bad pair/reflo after refhi
+%B: bad reloc address 0x%lx in section `%A'%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'%B: bad section length in ihex_read_section%B: bad string table size %lu%B: bad symbol index: %d%B: cannot create stub entry %s%B: change in gp: BRSGP %s%B: class %d symbol `%s' has no aux entries%B: compiled for a 64 bit system and target is 32 bit%B: compiled for a big endian system and target is little endian%B: compiled for a little endian system and target is big endian%B: compiled normally and linked with modules compiled with -mrelocatable%B: compiled with -mrelocatable and linked with modules compiled normally%B: could not find output section %A for input section %A%B: could not find output section %s%B: could not read contents of section `%A'
+%B: csect `%s' not in enclosing section%B: don't know how to handle OS specific section `%s' [0x%8x]%B: don't know how to handle allocated, application specific section `%s' [0x%8x]%B: don't know how to handle processor specific section `%s' [0x%8x]%B: don't know how to handle section `%s' [0x%8x]%B: dtp-relative relocation against dynamic symbol %s%B: duplicate export stub %s%B: duplicate section `%A' has different contents
+%B: duplicate section `%A' has different size
+%B: endianness incompatible with that of the selected emulation%B: error: ABI mismatch with previous modules.%B: error: Cannot set _ITB_BASE_%B: error: Cortex-A8 erratum stub is allocated in unsafe location%B: error: Cortex-A8 erratum stub out of range (input file too large)%B: error: Instruction set mismatch with previous modules.%B: error: VFP11 veneer out of range%B: error: unaligned relocation type %d at %08x reloc %p
+%B: error: unknown mandatory EABI object attribute %d%B: error: unknown relocation type %d.%B: file class %s incompatible with %s%B: gp-relative relocation against dynamic symbol %s%B: hidden symbol `%s' in %B is referenced by DSO%B: hidden symbol `%s' isn't defined%B: ignoring duplicate section `%A'
+%B: illegal relocation type %d at address 0x%lx%B: illegal symbol index in reloc: %d%B: incompatible machine type. Output is 0x%x. Input is 0x%x%B: indirect symbol `%s' to `%s' is a loop%B: internal error in ihex_read_section%B: internal symbol `%s' in %B is referenced by DSO%B: internal symbol `%s' isn't defined%B: invalid SHT_GROUP entry%B: invalid link %lu for reloc section %s (index %u)%B: invalid relocation type %d%B: invalid string offset %u >= %lu for section `%s'%B: jump too far away
+%B: linking %s module with previous %s modules%B: linking 32-bit code with 64-bit code%B: linking 64-bit files with 32-bit files%B: linking UltraSPARC specific with HAL specific code%B: linking auto-pic files with non-auto-pic files%B: linking big-endian files with little-endian files%B: linking constant-gp files with non-constant-gp files%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double%B: linking files compiled for HCS12 with others compiled for HC12%B: linking little endian files with big endian files%B: linking non-pic code in a position independent executable%B: linking trap-on-NULL-dereference with non-trapping files%B: loader reloc in read-only section %A%B: loader reloc in unrecognized section `%s'%B: local symbol `%s' in %B is referenced by DSO%B: misplaced XTY_LD `%s'%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'.%B: no group info for section %A%B: non-pic code with imm relocation against dynamic symbol `%s'%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table%B: pc-relative relocation against dynamic symbol %s%B: pc-relative relocation against undefined weak symbol %s%B: probably compiled without -fPIC?%B: protected symbol `%s' isn't defined%B: reloc %s:%d not in csect%B: reloc against a non-existant symbol index: %ld%B: relocation %s against %s `%s' can not be used when making a shared object%s%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC%B: relocation %s against symbol `%s' isn't supported in x32 mode%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s%B: relocation %s can not be used when making a shared object; recompile with -fPIC%B: relocation %s cannot be used when making a shared object%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend%B: relocation size mismatch in %B section %A%B: relocs in section `%A', but it has no contents%B: section %A lma %#lx adjusted to %#lx%B: section %s: string table overflow at offset %ld%B: section `%A' can't be allocated in segment %d%B: sh_link [%d] in section `%A' is incorrect%B: sh_link of section `%A' points to discarded section `%A' of `%B'%B: sh_link of section `%A' points to removed section `%A' of `%B'%B: size field is zero in Import Library Format header%B: speculation fixup to dynamic symbol %s%B: stack size specified and %s set%B: string not null terminated in ILF object file.%B: symbol `%s' has unrecognized csect type %d%B: symbol `%s' has unrecognized smclas %d%B: symbol `%s' required but not present%B: taking the address of protected function '%s' cannot be done when making a shared library%B: the target (%s) of a %s relocation is in the wrong output section (%s)%B: too many sections (%d)%B: too many sections: %u%B: tp-relative relocation against dynamic symbol %s%B: unable to fill in DataDictionary[12] because .idata$5 is missing%B: unable to fill in DataDictionary[1] because .idata$2 is missing%B: unable to fill in DataDictionary[1] because .idata$4 is missing%B: unable to fill in DataDictionary[9] because __tls_used is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing%B: unable to find ARM glue '%s' for `%s'%B: unable to find THUMB glue '%s' for `%s'%B: unable to find VFP11 veneer `%s'%B: unable to get decompressed section %A%B: unable to initialize compress status for section %s%B: unable to initialize decompress status for section %s%B: undefined reference to symbol '%s'%B: undefined sym `%s' in .opd section%B: undefined symbol on R_PPC64_TOCSAVE relocation%B: unexpected ATN type %d in external part%B: unexpected redefinition of indirect versioned symbol `%s'%B: unexpected reloc type %u in .opd section%B: unexpected type after ATN%B: unhandled dynamic relocation against %s%B: unimplemented %s
+%B: unimplemented ATI record %u for symbol %u%B: unknown [%d] section `%s' in group [%s]%B: unknown load command 0x%lx%B: unknown relocation type %d%B: unknown/unsupported relocation type %d%B: unrecognized relocation (0x%x) in section `%A'%B: unsupported relocation type %i%B: unsupported relocation type %i
+%B: unsupported relocation type %s%B: unsupported relocation: ALPHA_R_GPRELHIGH%B: unsupported relocation: ALPHA_R_GPRELLOW%B: uses _-prefixed symbols, but writing file with non-prefixed symbols%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%B: uses non-prefixed symbols, but writing file with _-prefixed symbols%B: version node not found for symbol %s%B: warning: COMDAT symbol '%s' does not match section name '%s'%B: warning: Empty loadable segment detected, is this intentional ?
+%B: warning: Endian mismatch with previous modules.%B: warning: Incompatible elf-versions %s and  %s.%B: warning: Older version of object file encountered, Please recompile with current tool chain.%B: warning: allocated section `%s' not in segment%B: warning: duplicate line number information for `%s'%B: warning: illegal symbol index %ld in line numbers%B: warning: illegal symbol index %ld in relocs%B: warning: line number table read failed%B: warning: linking PIC files with non-PIC files%B: warning: linking abicalls files with non-abicalls files%B: warning: relocate SDA_BASE failed.%B: warning: selected VFP11 erratum workaround is not necessary for target architecture%B: warning: sh_link not set for section `%A'%B: warning: unaligned access to GOT entry.%B: warning: unknown EABI object attribute %d%B:%A%s exceeds overlay size
 %B:%A: Warning: deprecated Red Hat reloc %B:%d: Bad checksum in S-record file
 %B:%d: Unexpected character `%s' in S-record file
 %B:%d: unexpected character `%s' in Intel Hex file%B:%u: bad checksum in Intel Hex file (expected %u, found %u)%B:%u: bad extended address record length in Intel Hex file%B:%u: bad extended linear address record length in Intel Hex file%B:%u: bad extended linear start address length in Intel Hex file%B:%u: bad extended start address length in Intel Hex file%B:%u: unrecognized ihex type %u in Intel Hex file%C: warning: relocation to "%s" references a different segment
 %F%P: already_linked_table: %E
 %F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie
+%H __tls_get_addr lost arg, TLS optimization disabled
+%H arg lost __tls_get_addr, TLS optimization disabled
+%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend
+%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend
+%H: R_FRV_GETTLSOFF not applied to a call instruction
+%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction
+%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction
+%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction
+%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction
+%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction
+%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction
+%H: R_FRV_TLSMOFFHI not applied to a sethi instruction
+%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction
+%H: cannot emit dynamic relocations in read-only section
+%H: cannot emit fixups in read-only section
+%H: reloc against `%s' references a different segment
+%H: reloc against `%s': %s
+%H: relocation references symbol not defined in the module
+%H: relocation to `%s+%v' may have caused the error above
 %P%F: --relax and -r may not be used together
+%P%F: failed creating ex9.it %s hash table: %E
 %P%X: can not read symbols: %E
+%P%X: read-only segment has dynamic relocations.
+%P: %B: %s is not supported for `%T'
+%P: %B: cannot create stub entry %s
+%P: %B: relocation %s is not yet supported for symbol %s
+%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)
 %P: %B: unexpected relocation type
+%P: %B: unknown relocation type %d for `%T'
+%P: %B: unknown relocation type %d for symbol %s
+%P: %B: warning: relocation against `%s' in readonly section `%A'.
+%P: %B: warning: relocation in readonly section `%A'.
+%P: %H: %s against `%T': error %d
+%P: %H: %s for indirect function `%T' unsupported
+%P: %H: %s references optimized away TOC entry
+%P: %H: %s reloc against `%s': error %d
+%P: %H: %s reloc against local symbol
+%P: %H: %s used with TLS symbol `%T'
+%P: %H: %s used with non-TLS symbol `%T'
+%P: %H: @local call to ifunc %s
+%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC
+%P: %H: error: %s against `%s' not a multiple of %u
+%P: %H: error: %s not a multiple of %u
+%P: %H: non-zero addend on %s reloc against `%s'
+%P: %H: relocation %s for indirect function %s unsupported
+%P: %H: toc optimization is not supported for %s instruction.
+%P: %H: unresolvable %s against `%T'
+%P: %H: unresolvable %s relocation against symbol `%s'
+%P: %s not defined in linker created %s
+%P: %s offset too large for .eh_frame sdata4 encoding%P: .opd not allowed in ABI version %d
+%P: DW_EH_PE_datarel unspecified for this architecture.
 %P: alternate ELF machine code found (%d) in %B, expecting %d
+%P: bss-plt forced by profiling
+%P: bss-plt forced due to %B
+%P: can't build branch stub `%s'
+%P: can't find branch stub `%s'
+%P: cannot find opd entry toc for `%T'
+%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc
+%P: dynreloc miscount for %B, section %A
 %P: error in %B(%A); no .eh_frame_hdr table will be created.
 %P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.
+%P: linkage table error against `%T'
+%P: long branch stub `%s' offset overflow
 %P: multiple entry points: in modules %B and %B
 %P: relocatable link is not supported
+%P: stubs don't match calculated size
+%P: symbol '%s' has invalid st_other for ABI version 1
 %P: warning: creating a DT_TEXTREL in a shared object.
 %X%C: relocation to "%s" references a different segment
+%X%P: %B(%A): relocation "%R" goes out of range
 %X%P: overlay section %A does not start on a cache line.
 %X%P: overlay section %A is larger than a cache line.
 %X%P: overlay section %A is not in cache area.
@@ -300,14 +384,14 @@ ppcboot header:
 %X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B
 %s defined on removed toc entry%s duplicated
 %s duplicated in %s
-%s in overlay section%s not defined in linker created %s%s(%s): relocation %d has invalid symbol index %ld%s: %s: reloc overflow: 0x%lx > 0xffff%s: 0x%v 0x%v
+%s in overlay section%s(%s): relocation %d has invalid symbol index %ld%s: %s: reloc overflow: 0x%lx > 0xffff%s: .rsrc merge failure: corrupt .rsrc section%s: 0x%v 0x%v
 %s: Bad symbol definition: `Main' set to %s rather than the start address %s
 %s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
 %s: GAS error: unexpected PTB insn with R_SH_PT_16%s: Internal inconsistency error for value for
  linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx
 %s: Invalid relocation type exported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: Malformed reloc detected for section %s%s: No core to allocate a symbol %d bytes long
 %s: No core to allocate section name %s
-%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A%s: TLS definition in %B section %A mismatches non-TLS reference in %B%s: TLS reference in %B mismatches non-TLS definition in %B section %A%s: TLS reference in %B mismatches non-TLS reference in %B%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry%s: The target (%s) of an %s relocation is in the wrong section (%s)%s: XCOFF shared object when not producing XCOFF output%s: __gp does not cover short data segment%s: access beyond end of merged section (%ld)%s: address 0x%s out of range for Intel Hex file%s: base-plus-offset relocation against register symbol: %s in %s%s: base-plus-offset relocation against register symbol: (unknown) in %s%s: can not represent section `%s' in a.out object file format%s: can not represent section `%s' in oasys%s: can not represent section for symbol `%s' in a.out object file format%s: cannot allocate file name for file number %d, %d bytes
+%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A%s: TLS definition in %B section %A mismatches non-TLS reference in %B%s: TLS reference in %B mismatches non-TLS definition in %B section %A%s: TLS reference in %B mismatches non-TLS reference in %B%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry%s: The target (%s) of an %s relocation is in the wrong section (%s)%s: Unsupported transition from %s to %s%s: XCOFF shared object when not producing XCOFF output%s: __gp does not cover short data segment%s: access beyond end of merged section (%ld)%s: address 0x%s out of range for Intel Hex file%s: base-plus-offset relocation against register symbol: %s in %s%s: base-plus-offset relocation against register symbol: (unknown) in %s%s: can not represent section `%s' in a.out object file format%s: can not represent section `%s' in oasys%s: can not represent section for symbol `%s' in a.out object file format%s: cannot allocate file name for file number %d, %d bytes
 %s: cannot create stub entry %s%s: cannot link fdpic object file into non-fdpic executable%s: cannot link non-fdpic object file into fdpic executable%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled with %s and linked with modules compiled with %s%s: compiled with %s and linked with modules that use non-pic relocations%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: directive LOCAL valid only with a register or absolute value%s: dynamic object with no .loader section%s: encountered datalabel symbol in input%s: error: unaligned relocation type %d at %08x reloc %08x
 %s: illegal section name `%s'%s: internal error, internal register section %s had contents
 %s: internal error, symbol table changed size from %d to %d words
@@ -329,8 +413,8 @@ ppcboot header:
 %s: line number overflow: 0x%lx > 0xffff%s: no initialized registers; section length 0
 %s: no such symbol%s: not implemented%s: not supported%s: object size does not match that of target %s%s: register relocation against non-register symbol: %s in %s%s: register relocation against non-register symbol: (unknown) in %s%s: relocatable link from %s to %s not supported%s: short data segment overflowed (0x%lx >= 0x400000)%s: string too long (%d chars, max 65535)%s: too many initialized registers; section length %ld
 %s: undefined version: %s%s: unknown relocation type %d%s: unrecognized symbol `%s' flags 0x%x%s: unsupported relocation type 0x%02x%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'
-%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)%s: version count (%ld) does not match symbol count (%ld)%s: warning: %s relocation against symbol `%s' from %s section%s: warning: %s relocation to 0x%x from %s section%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld%s: warning: PLT addend of %d to `%s' from %s section ignored%s: warning: illegal symbol index %ld in relocs%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.
-(at bit offset %u)
+%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)%s: version count (%ld) does not match symbol count (%ld)%s: warning core file truncated%s: warning: %s relocation against symbol `%s' from %s section%s: warning: %s relocation to 0x%x from %s section%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld%s: warning: PLT addend of %d to `%s' from %s section ignored%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode.%s: warning: illegal symbol index %ld in relocs%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.
+%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x.(at bit offset %u)
 (descriptor)
 (no value)
 (not active)
@@ -338,44 +422,49 @@ ppcboot header:
 (reg: %u, disp: %u, indir: %u, kind: (thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)(too many global variables for -fpic: recompile with -fPIC)(trailing value)
 (value spec follows)
 )
-*unhandled*
+*** check this relocation %s*unhandled*
 *unhandled* dst type %u
-*unknown**unknown*        , alias: %u
+*unknown**unknown*        , 8-byte data alignment, Value: %#08lx
+, alias: %u
 , ext fixup offset: %u, no_opt psect off: %u, subtype: %u (%s)
-, symbol vector rva: .got section not immediately after .plt section32-bit double, 32bits gp relative relocation occurs for an external symbol64 bits *unhandled*
+, symbol vector rva: - %s is G10, %s is not.got section not immediately after .plt section.rsrc merge failure: a directory matches a leaf.rsrc merge failure: differing directory versions
+.rsrc merge failure: dirs with differing characteristics
+.rsrc merge failure: duplicate leaf.rsrc merge failure: duplicate leaf: %s.rsrc merge failure: duplicate string resource: %d.rsrc merge failure: multiple non-default manifests32-bit double, 32bits gp relative relocation occurs for an external symbol64 bits *unhandled*
 64-bit double, : %u.%u
-: m32r instructions: m32r2 instructions: m32rx instructions; recompile with -fPIC<Unrecognised flag bits set><unknown>@pltoff reloc against local symbolArchive has no index; run ranlib to add oneArchive object file in wrong formatAttempt to convert L32R/CALLX to CALL failedAttempt to do relocatable link with %s input and %s outputBASE_IMAGE       BFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
+: m32r instructions: m32r2 instructions: m32rx instructions: n1 instructions: n1h instructions; recompile with -fPIC<Unrecognised flag bits set><corrupt string length: %#x><corrupt string offset: %#lx><unknown>@pltoff reloc against local symbolArchive has no index; run ranlib to add oneArchive object file in wrong formatAttempt to convert L32R/CALLX to CALL failedAttempt to do relocatable link with %s input and %s outputBASE_IMAGE       BFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
 BFD %s internal error, aborting at %s line %d in %s
-Bad valueBase Relocation Directory [.reloc]Bound Import DirectoryBounds:
+BFD Link Error: branch (PC rel16) to section (%s) not supportedBFD Link Error: jump (PC rel26) to section (%s) not supportedBad valueBase Relocation Directory [.reloc]Bound Import DirectoryBounds:
 CLICLR Runtime HeaderCLUSTERS_LOCKMGR COUNTERS         CPU              CTL_AUGRB (augment relocation base) %u
 CTL_DFLOC (define location)
 CTL_SETRB (set relocation base)
 CTL_STKDL (stack defined location)
 CTL_STLOC (set location)
 Copyright Header
-DIV usage mismatch between %B and %BDST__K_BEG_STMT_MODE not implementedDST__K_END_STMT_MODE not implementedDST__K_RESET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR_W not implementedDST__K_SET_PC not implementedDST__K_SET_PC_L not implementedDST__K_SET_PC_W not implementedDST__K_SET_STMTNUM not implementedDebug DirectoryDebug module table:
+Corrupt .rsrc section detected!
+DSO missing from command lineDST__K_BEG_STMT_MODE not implementedDST__K_END_STMT_MODE not implementedDST__K_RESET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR_W not implementedDST__K_SET_PC not implementedDST__K_SET_PC_L not implementedDST__K_SET_PC_W not implementedDST__K_SET_STMTNUM not implementedDebug DirectoryDebug module table:
 Debug symbol table:
 Delay Import DirectoryDeprecated %s called
 Deprecated %s called at %s line %d in %s
-Description DirectoryDwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find %s section.Dwarf Error: Could not find abbrev number %u.Dwarf Error: Invalid maximum operations per instruction.Dwarf Error: Invalid or unhandled FORM value: %u.Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu).Dwarf Error: Unhandled .debug_line version %d.Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'.Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information.Dwarf Error: mangled line number section (bad file number).Dwarf Error: mangled line number section.EIHD: (size: %u, nbr blocks: %u)
+Description DirectoryDwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find %s section.Dwarf Error: Could not find abbrev number %u.Dwarf Error: Invalid maximum operations per instruction.Dwarf Error: Invalid or unhandled FORM value: %#x.Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu).Dwarf Error: Unable to read alt ref %u.Dwarf Error: Unhandled .debug_line version %d.Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'.Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information.Dwarf Error: mangled line number section (bad file number).Dwarf Error: mangled line number section.EIHD: (size: %u, nbr blocks: %u)
 Entry offset        = 0x%.8lx (%ld)
 Error reading %s: %sError: %B has both the current and legacy Tag_MPextension_use attributesErrors encountered processing file %sException Directory [.pdata]Export Directory [.edata (or where ever we found it)]Export Flags 			%lx
-Export RVAFAILED to find previous HI16 reloc
-FILES_VOLUMES    File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
+Export RVAFAILED to find previous HI16 relocFILES_VOLUMES    File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
 Forwarder RVAGALAXY           GP relative relocation used when GP not definedGP relative relocation when _gp not definedGPDISP relocation did not find ldah and lda instructionsGlobal symbol table:
-IDC - Ident Consistency check
-IMAGE_ACTIVATOR  IO               Image activation:  (size=%u)
+ID: %#08lxIDC - Ident Consistency check
+IMAGE_ACTIVATOR  INPUT_SECTION_FLAGS are not supported.
+IO               Image activation:  (size=%u)
 Image activator fixup: (major: %u, minor: %u)
 Image identification: (major: %u, minor: %u)
 Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)
 Image symbol & debug table: (major: %u, minor: %u)
 Import Address Table DirectoryImport Directory [parts of .idata]Internal inconsistency: remaining %u != max %u.
-  Please report this bug.Invalid TARGET2 relocation type '%s'.Invalid bfd targetInvalid operationInvalid section index in ETIRLOGICAL_NAMES    Language Processor Name
+  Please report this bug.Invalid TARGET2 relocation type '%s'.Invalid bfd targetInvalid operationInvalid section index in ETIRJALX to a non-word-aligned addressLOGICAL_NAMES    Language Processor Name
 Length              = 0x%.8lx (%ld)
-Load Configuration DirectoryMEMORY_MANAGEMENTMISC             MULTI_PROCESSING Mach-O header:
-Major/Minor 			%d/%d
+Linker: cannot init ex9 hash table error 
+Linker: error cannot fixed ex9 relocation 
+Load Configuration DirectoryMEMORY_MANAGEMENTMIPS16 and microMIPS functions cannot call each otherMISC             MULTI_PROCESSING Major/Minor 			%d/%d
 Malformed archiveMaximum stack required is 0x%v
-Memory exhaustedModule header
+MeP: howto %d has type %dMemory exhaustedModule header
 NETWORKS         NORMALName 				No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsNumber in:
 OPR_ADD (add)
 OPR_AND (logical and)
@@ -404,9 +493,9 @@ ppcboot header:
 Partition[%d] length = 0x%.8lx (%ld)
 Partition[%d] sector = 0x%.8lx (%ld)
 Please report this bug.
-R_BFIN_FUNCDESC references dynamic symbol with nonzero addendR_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addendR_FRV_FUNCDESC references dynamic symbol with nonzero addendR_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addendR_FRV_GETTLSOFF not applied to a call instructionR_FRV_GETTLSOFF_RELAX not applied to a calll instructionR_FRV_GOTTLSDESC12 not applied to an lddi instructionR_FRV_GOTTLSDESCHI not applied to a sethi instructionR_FRV_GOTTLSDESCLO not applied to a setlo or setlos instructionR_FRV_GOTTLSOFF12 not applied to an ldi instructionR_FRV_GOTTLSOFFHI not applied to a sethi instructionR_FRV_GOTTLSOFFLO not applied to a setlo or setlos instructionR_FRV_TLSDESC_RELAX not applied to an ldd instructionR_FRV_TLSMOFFHI not applied to a sethi instructionR_FRV_TLSMOFFLO not applied to a setlo or setlos instructionR_FRV_TLSOFF_RELAX not applied to an ld instructionReading archive file mod timestampReference to the far symbol `%s' using a wrong relocation may result in incorrect executionRegister %%g%d used incompatibly: %s in %B, previously %s in %BRegister section has contents
-Relocation `%s' not yet implemented
-Removing unused section '%s' in file '%B'ReservedResource Directory [.rsrc]SDA relocation when _SDA_BASE_ not definedSECURITY         SEC_RELOC with no relocs in section %sSHELL            SHRFXDSHRPICSPSC - Shared Image Program section def
+RL78/G10 ABI conflict: cannot link G10 and non-G10 objects togetherR_BFIN_FUNCDESC references dynamic symbol with nonzero addendR_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addendR_FRV_TLSMOFFLO not applied to a setlo or setlos instruction
+Reading archive file mod timestampReference to the far symbol `%s' using a wrong relocation may result in incorrect executionRegister %%g%d used incompatibly: %s in %B, previously %s in %BRegister section has contents
+Relocation for non-REL psectRemoving unused section '%s' in file '%B'ReservedResource Directory [.rsrc]S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your codeSDA relocation when _SDA_BASE_ not definedSECURITY         SEC_RELOC with no relocs in section %sSH Error: unknown reloc type %dSHELL            SHRFXDSHRPICSPSC - Shared Image Program section def
 STABLE           STA_CKARG (compare procedure argument)
 STA_GBL (stack global) %.*s
 STA_LI (stack literal)
@@ -449,27 +538,27 @@ ppcboot header:
 SYMG - Universal symbol definition
 SYMM - Global symbol definition with version
 SYMV - Vectored symbol definition
-SYSGEN           Section has no contentsSecurity DirectorySegments and Sections:
-Size error in section %sSource Files Header
+SYSGEN           Section has no contentsSecurity DirectorySize error in section %sSource Files Header
 Special DirectorySpurious ALPHA_R_BSR relocStack analysis will ignore the call from %s to %s
 Stack overflow (%d) in _bfd_vms_pushStack size for call graph root nodes.
 Stack underflow in _bfd_vms_popStrides:
 Symbol %s not defined for fixups
-Symbol %s replaced by %s
 Symbol `%s' has differing types: %s in %B, previously REGISTER in %BSymbol `%s' has differing types: REGISTER in %B, previously %s in %BSymbol needs debug section which does not existSystem call errorTLS relocation invalid without dynamic sectionsTOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compilingTable Addresses
 Thread Storage Directory [.tls]Time/Date stamp 		%lx
 Title Text Header
-USRSTACKUnable to find equivalent output section for symbol '%s' from section '%s'Unexpected STO_SH5_ISA32 on local symbol is not handledUnexpected machine numberUnhandled OSF/1 core file section type %d
-Unhandled relocation %sUnknown EGSD subtype %dUnknown basic type %dUnknown reloc %sUnknown reloc %s + %sUnknown symbol in command %sUnrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationUsing bss-plt due to %BVOLATILE         Variable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning, .pdata section size (%ld) is not a multiple of %d
-Warning: %B does not support interworking, whereas %B doesWarning: %B is truncated: expected core file size >= %lu, found: %lu.Warning: %B supports interworking, whereas %B does notWarning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64Warning: %B uses -msingle-float, %B uses -mdouble-floatWarning: %B uses -msingle-float, %B uses -mips32r2 -mfp64Warning: %B uses double-precision hard float, %B uses single-precision hard floatWarning: %B uses hard float, %B uses soft floatWarning: %B uses r3/r4 for small structure returns, %B uses memoryWarning: %B uses soft float, %B uses single-precision hard floatWarning: %B uses unknown floating point ABI %dWarning: %B uses unknown small structure return convention %dWarning: %B uses unknown vector ABI %dWarning: %B uses vector ABI "%s", %B uses "%s"Warning: %B: Conflicting platform configurationWarning: %B: Unknown EABI object attribute %dWarning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with itWarning: Clearing the interworking flag of %B due to outside requestWarning: Not setting interworking flag of %B since it has already been specified as non-interworkingWarning: RX_SYM reloc with an unknown symbolWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %AWarning: alignment %u of symbol `%s' in %B is smaller than %u in %BWarning: fixup count mismatch
+Try enabling relaxation to avoid relocation truncationsUSRSTACKUnable to find equivalent output section for symbol '%s' from section '%s'Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.
+Unexpected STO_SH5_ISA32 on local symbol is not handledUnexpected machine numberUnhandled OSF/1 core file section type %d
+Unhandled relocation %sUnknown EGSD subtype %dUnknown basic type %dUnknown reloc %sUnknown reloc %s + %sUnknown symbol in command %sUnrecognized INPUT_SECTION_FLAG %s
+Unrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVOLATILE         Variable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning, .pdata section size (%ld) is not a multiple of %d
+Warning: %B does not support interworking, whereas %B doesWarning: %B is truncated: expected core file size >= %lu, found: %lu.Warning: %B supports interworking, whereas %B does notWarning: %B uses %s (set by %B), %B uses %sWarning: %B uses %s (set by %B), %B uses unknown MSA ABI %dWarning: %B uses %s (set by %B), %B uses unknown floating point ABI %dWarning: %B uses double-precision hard float, %B uses single-precision hard floatWarning: %B uses hard float, %B uses soft floatWarning: %B uses r3/r4 for small structure returns, %B uses memoryWarning: %B uses soft float, %B uses single-precision hard floatWarning: %B uses unknown MSA ABI %d (set by %B), %B uses %sWarning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %dWarning: %B uses unknown floating point ABI %dWarning: %B uses unknown floating point ABI %d (set by %B), %B uses %sWarning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %dWarning: %B uses unknown small structure return convention %dWarning: %B uses unknown vector ABI %dWarning: %B uses vector ABI "%s", %B uses "%s"Warning: %B: Conflicting platform configurationWarning: %B: Unknown EABI object attribute %dWarning: %B: Unknown MSPABI object attribute %dWarning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with itWarning: Clearing the interworking flag of %B due to outside requestWarning: Not setting interworking flag of %B since it has already been specified as non-interworkingWarning: RL78_SYM reloc with an unknown symbolWarning: RX_SYM reloc with an unknown symbolWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %AWarning: alignment %u of symbol `%s' in %B is smaller than %u in %BWarning: fixup count mismatch
 Warning: gc-sections option ignoredWarning: size of symbol `%s' changed from %lu in %B to %lu in %BWarning: type of symbol `%s' changed from %d to %d in %BWarning: writing archive was slow: rewriting timestamp
-Writing updated armap timestamp[%u]: %u
+Writing updated armap timestampXGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code.[%u]: %u
 [%u]: Lower: %u, upper: %u
 [abi=16-bit int, [abi=32-bit int, [whose name is lost]\%B: Warning: Arm BLX instruction targets Arm function '%s'._bfd_vms_output_counted called with too many bytes_bfd_vms_output_counted called with zero bytesaddressaddress not word alignarsize: %u, a0: 0x%08x
 bad section index in %sbanked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)base: %u, pos: %u
-blkbeg: address: 0x%08x, name: %.*s
+bfd_mach_o_canonicalize_symtab: unable to load symbolsbfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)bfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid section %d (max %lu): setting to undefinedbfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid type field 0x%x: setting to undefinedbfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lubfd_mach_o_read_symtab_symbols: unable to allocate memory for symbolsbfd_mach_o_scan: unknown architecture 0x%lx/0x%lxbfd_pef_scan: unknown architecture 0x%lxblkbeg: address: 0x%08x, name: %.*s
 blkend: size: 0x%08x
-can't build branch stub `%s'can't find branch stub `%s'cannot emit dynamic relocations in read-only sectioncannot emit fixups in read-only sectioncannot find EMH in first GST record
+cannot emit dynamic relocations in read-only sectioncannot emit fixups in read-only sectioncannot find EMH in first GST record
 cannot handle R_MEM_INDIRECT reloc when using %s outputcannot read DMT
 cannot read DMT header
 cannot read DMT psect
@@ -488,34 +577,41 @@ ppcboot header:
 cannot read GST record header
 cannot read GST record length
 class: %u, dtype: %u, length: %u, pointer: 0x%08x
-copy reloc against `%s' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcccorrupt %s section in %Bcould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcould not open shared image '%s' from '%s'cpu=HC11]cpu=HC12]cpu=HCS12]dangerous relocationdelta pc +%-4ddelta_pc_l: +0x%08x
+corrupt %s section in %Bcould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcould not open shared image '%s' from '%s'cpu=HC11]cpu=HC12]cpu=HCS12]cpu=XGATE]dangerous relocationdelta pc +%-4ddelta_pc_l: +0x%08x
 delta_pc_w %u
 descdimct: %u, aflags: 0x%02x, digits: %u, scale: %u
 discarded output section: `%A'discontiguous range (nbr: %u)
-dynamic relocation in read-only sectiondynamic variable `%s' is zero sizedynreloc miscount for %B, section %Aenumbeg, len: %u, name: %.*s
+dynamic relocation in read-only sectiondynamic variable `%s' is zero sizeenumbeg, len: %u, name: %.*s
 enumelt, name: %.*s
 enumend
 epilog: flags: %u, count: %u
-error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbolerror: %B does not use Maverick instructions, whereas %B doeserror: %B is already in final BE8 formaterror: %B is compiled as absolute position code, whereas target %B is position independenterror: %B is compiled as position independent code, whereas target %B is absolute positionerror: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%derror: %B is compiled for APCS-%d, whereas target %B uses APCS-%derror: %B is compiled for the EP9312, whereas %B is compiled for XScaleerror: %B passes floats in float registers, whereas %B passes them in integer registerserror: %B passes floats in integer registers, whereas %B passes them in float registerserror: %B requires more array alignment than %B preserveserror: %B requires more stack alignment than %B preserveserror: %B uses FPA instructions, whereas %B does noterror: %B uses Maverick instructions, whereas %B does noterror: %B uses VFP instructions, whereas %B does noterror: %B uses VFP register arguments, %B does noterror: %B uses hardware FP, whereas %B uses software FPerror: %B uses iWMMXt register arguments, %B does noterror: %B uses software FP, whereas %B uses hardware FPerror: %B: Conflicting CPU architectures %d/%derror: %B: Conflicting architecture profiles %c/%cerror: %B: Conflicting use of R9error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchainerror: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'error: %B: SB relative addressing conflicts with use of R9error: %B: Unknown CPU architectureerror: %B: unable to merge virtualization attributes with %Berror: Source object %B has EABI version %d, but target %B has EABI version %derror: fp16 format mismatch between %B and %Berror: inappropriate relocation type for shared library (did you forget -fpic?)error: undefined symbol __rtiniterror: unknown Tag_ABI_array_object_align_expected value in %Berror: unknown Tag_ABI_array_object_alignment value in %Bexecutablefailed to allocate space for new APUinfo section.failed to compute new APUinfo section.failed to install new APUinfo section.fatal error while creating .fixupgeneric linker can't handle %sglobal pointer relative address out of rangeglobal pointer relative relocation when _gp not definedhidden symbolignoring reloc %s
+error reading cpu type from elf private dataerror: %B contains a reloc (0x%s) for section %A that references a non-existent global symbolerror: %B does not use Maverick instructions, whereas %B doeserror: %B is already in final BE8 formaterror: %B is compiled as absolute position code, whereas target %B is position independenterror: %B is compiled as position independent code, whereas target %B is absolute positionerror: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%derror: %B is compiled for APCS-%d, whereas target %B uses APCS-%derror: %B is compiled for the EP9312, whereas %B is compiled for XScaleerror: %B passes floats in float registers, whereas %B passes them in integer registerserror: %B passes floats in integer registers, whereas %B passes them in float registerserror: %B requires more array alignment than %B preserveserror: %B requires more stack alignment than %B preserveserror: %B uses %s instructions but %B uses %serror: %B uses FPA instructions, whereas %B does noterror: %B uses Maverick instructions, whereas %B does noterror: %B uses VFP instructions, whereas %B does noterror: %B uses VFP register arguments, %B does noterror: %B uses hardware FP, whereas %B uses software FPerror: %B uses iWMMXt register arguments, %B does noterror: %B uses software FP, whereas %B uses hardware FPerror: %B uses the %s code model whereas %B uses the %s code modelerror: %B uses the %s data model but %B only uses MSP430 instructionserror: %B uses the %s data model whereas %B uses the %s data modelerror: %B uses the large code model but %B uses MSP430 instructionserror: %B uses the small code model but %B uses the %s data modelerror: %B: Conflicting CPU architectures %d/%derror: %B: Conflicting architecture profiles %c/%cerror: %B: Conflicting use of R9error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchainerror: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'error: %B: SB relative addressing conflicts with use of R9error: %B: Unknown CPU architectureerror: %B: size of section %A is not multiple of address sizeerror: %B: unable to merge virtualization attributes with %Berror: Can't find symbol: _SDA_BASE_.error: Source object %B has EABI version %d, but target %B has EABI version %derror: fp16 format mismatch between %B and %Berror: inappropriate relocation type for shared library (did you forget -fpic?)error: required section '%s' not found in the linker scripterror: undefined symbol __rtiniterror: unknown Tag_ABI_array_object_align_expected value in %Berror: unknown Tag_ABI_array_object_alignment value in %Bexecutablefailed to allocate space for new APUinfo section.failed to compute new APUinfo section.failed to install new APUinfo section.fatal error while creating .fixupgeneric linker can't handle %sglobal pointer relative address out of rangeglobal pointer relative relocation at address 0x%08x when _gp not defined
+global pointer relative relocation when _gp not definedhidden symbolignoring reloc %s
 incr_linum(b): +%u
 incr_linum_l: +%u
 incr_linum_w: +%u
-internal error: addend should be zero for R_LM32_16_GOTinternal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: suspicious relocation type used in shared libraryinternal error: unknown errorinternal error: unsupported relocation errorinternal inconsistency in size of .got.loc sectioninternal symbolinvalid relocation addressinvalid relocation type %dinvalid use of %s with contextsip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx).ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch table header corrupt.ip2k relaxer: switch table without complete matching relocation information.line num  (len: %u)
-linkable imagelinkage table error against `%s'linker stubs in %u group%s
+internal error: addend should be zero for R_LM32_16_GOTinternal error: branch/jump to an odd address detectedinternal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: suspicious relocation type used in shared libraryinternal error: unknown errorinternal error: unsupported relocation errorinternal inconsistency in size of .got.loc sectioninternal symbolinvalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or assemble using "-no-expand" (for gcc, "-Wa,-no-expand"invalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or compile using the gcc-option "-mno-base-addresses".invalid relocation addressinvalid relocation type %dinvalid use of %s with contextsip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx).ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch table header corrupt.ip2k relaxer: switch table without complete matching relocation information.line num  (len: %u)
+linkable imagelinker stubs in %u group%s
   branch       %lu
   toc adjust   %lu
   long branch  %lu
   long toc adj %lu
-  plt call     %luliteralliteral relocation occurs for an external symbollong branch stub `%s' offset overflowmodbeg
+  plt call     %lu
+  plt call toc %luliteralliteral relocation occurs for an external symbolmach-o: there are too many sections (%d) maximum is 255,
+mep: no reloc for code %dmodbeg
 modend
-nativenon-contiguous array of %s
+name: [val: %08lx len %d]: nativenon-contiguous array of %s
 non-dynamic relocations refer to dynamic symbol %snon-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store
 non-zero addend in @fptr relocnot enough GOT space for local GOT entriesnot mapping: data=%lx mapped=%d
 not mapping: env var not set
-note: '%s' is defined in DSO %B so try adding it to the linker command lineout of rangeoverflow after relaxationoverlay stub relocation overflowprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lxprivate flags = 0x%lx:prolog: bkpt address 0x%08x
+out of rangeoverflow after relaxationoverlay stub relocation overflowprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lxprivate flags = 0x%lx:prolog: bkpt address 0x%08x
 protected symbolrecbeg: name: %.*s
 recend
-reference to a banked address [%lx:%04lx] in the normal address space at %04lxregrelocation references a different segmentrelocation references symbol not defined in the modulerelocation requires zero addendrelocations between different segments are not supportedreopening %B: %s
+reference to a banked address [%lx:%04lx] in the normal address space at %04lxregrelocation `%s' not yet implementedrelocation out of rangerelocation references symbol not defined in the modulerelocation requires zero addendrelocation should be even numberrelocations between different segments are not supportedreopening %B: %s
 reserved cmd %drtnbeg
 rtnend: size 0x%08x
 septyp, name: %.*s
@@ -524,36 +620,37 @@ ppcboot header:
 set_line_num_b %u
 set_line_num_l %u
 small-data section exceeds 64KB; lower small-data size limit (see option -G)som_sizeof_headers unimplementedsorry, no support for duplicate object files in auto-overlay script
-source (len: %u)
+sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands.source (len: %u)
 standard data: %s
 static procedure (no name)stub entry for %s cannot load .plt, dp offset = %ldstubs don't match calculated sizesymbolsystem version array information:
 term(b): 0x%02xterm_w: 0x%04xtypspec (len: %u)
-unable to find ARM glue '%s' for '%s'unable to find THUMB glue '%s' for '%s'unable to read in %s section from %Bunaligned bit-string of %s
+unable to find ARM glue '%s' for '%s'unable to find THUMB glue '%s' for '%s'unable to read in %s section from %Bunable to write unknown load command 0x%lxunaligned bit-string of %s
 uncertain calling convention for non-COFF symbolundefined %s reference in complex symbol: %sunhandled egsd entry type %u
 unhandled emh subtype %u
-unknownunknown ETIR command %dunknown errorunknown line command %dunknown operator '%c' in complex symbolunknown source command %dunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocationunsupported relocation between data/insn address spacesusing multiple gp valuesv850 architecturev850e architecturev850e1 architecturev850e2 architecturev850e2v3 architecturevflags: 0x%02x, value: 0x%08x vma:			BeginAddress	 EndAddress	  UnwindData
-warning: %B and %B differ in position-dependence of code addressingwarning: %B and %B differ in position-dependence of data addressingwarning: %B and %B differ in wchar_t sizewarning: %B and %B differ in whether code is compiled for DSBTwarning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may failwarning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may failwarning: %B: local symbol `%s' has no sectionwarning: %s exceeds section size
+unknownunknown ETIR command %dunknown errorunknown header byte-order value 0x%lxunknown line command %dunknown operator '%c' in complex symbolunknown source command %dunknown v850 architectureunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocationunsupported relocation between data/insn address spacesusing multiple gp valuesv850 E3 architecturev850 architecturev850e architecturev850e1 architecturev850e2 architecturev850e2v3 architecturev850e3v5 architecturevflags: 0x%02x, value: 0x%08x vma:			BeginAddress	 EndAddress	  UnwindData
+warning: %B and %B differ in wchar_t sizewarning: %B and %B differ in whether code is compiled for DSBTwarning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may failwarning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may failwarning: %B: local symbol `%s' has no sectionwarning: %s exceeds section size
 warning: %s has a corrupt string table index - ignoringwarning: %s overlaps %s
 warning: %s section has zero sizewarning: .pdata section size (%ld) is not a multiple of %d
-warning: attempt to export undefined symbol `%s'warning: call to non-function symbol %s defined in %Bwarning: relocation references a different segmentwarning: section `%A' type changed to PROGBITSwarning: type and size of dynamic symbol `%s' are not definedwarning: unable to set size of %s section in %Bwarning: unable to update contents of %s section in %syou are not allowed to define %s in a scriptProject-Id-Version: bfd-2.20.90
+warning: attempt to export undefined symbol `%s'warning: call to non-function symbol %s defined in %Bwarning: generating a shared library containing non-PIC codewarning: generating a shared library containing non-PID codewarning: relocation references a different segmentwarning: section '%s' is being made into a notewarning: section `%A' type changed to PROGBITSwarning: type and size of dynamic symbol `%s' are not definedwarning: unable to set size of %s section in %Bwarning: unable to update contents of %s section in %syou are not allowed to define %s in a scriptProject-Id-Version: bfd-2.24.90
 Report-Msgid-Bugs-To: bug-binutils@gnu.org
-POT-Creation-Date: 2010-11-05 11:31+0100
-PO-Revision-Date: 2011-03-16 02:31+0100
+POT-Creation-Date: 2014-02-10 09:42+1030
+PO-Revision-Date: 2016-10-27 23:31+0200
 Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>
 Language-Team: Danish <dansk@dansk-gruppen.dk>
 Language: da
 MIME-Version: 1.0
 Content-Type: text/plain; charset=utf-8
 Content-Transfer-Encoding: 8bit
-	Eksportadressetabel 			Eksportadressetabel 		%08lx
+X-Bugs: Report translation errors to the Language-Team address.
+	    TLS: %A	Eksportadressetabel 			Eksportadressetabel 		%08lx
 	Navnepegertabel 			Ordningstalstabel 				[Navnepeger/Ordningstal]-tabel	%08lx
 	kodebase %08lx toc (indlÃ¦seligt/reelt) %08lx/%08lx
-	relokering %4d afstand %4x [%4lx] %s	vma: Tips/Ordn Medlemsnavn Bundet til
+	ikke-TLS: %A	relokering %4d afstand %4x [%4lx] %s	vma: Tips/Ordn Medlemsnavn Bundet til
 
 	DLL-navn: %s
 
 
-PE-filbaserelokeringer (tolket indhold i .reloc-sektionen)
+PE-filbaserelokeringer (tolket indhold i .reloc-afsnittet)
 
       Symbol slut+1: %-7ld  Type:  %s
       Symbol slut+1: %ld
@@ -567,7 +664,7 @@ PE-filbaserelokeringer (tolket indhold i
 
 Karakteristik 0x%x
 
-Dynamisk sektion:
+Dynamisk afsnit:
 
 Ekstraheader til kÃ¸rsel
 
@@ -575,31 +672,31 @@ Eksportadressetabel -- Ordningsbase %ld
 
 Funktionsidentifikatorer fundet pÃ¥ startadressen: %04lx
 
-Ingen reldata-sektion! Funktionsidentifikatorer afkodedes ikke.
+Intet reldata-afsnit! Funktionsidentifikatorer afkodedes ikke.
 
 Start pÃ¥ partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
 
 Programhoved:
 
-StakstÃ¸rrelse til funktioner.  Annotationer: '*' maks stak, 't' tail call
+StakstÃ¸rrelse til funktioner.  Annotationer: "*" maks stak, "t" tail call
 
-Eksporttabellerne (tolket indhold i %s-sektion)
+Eksporttabellerne (tolket indhold i %s-afsnit)
 
-Funktionstabellen (tolket indhold fra .pdata-sektionen)
+Funktionstabellen (tolket indhold fra .pdata-afsnittet)
 
-Importtabellerne (tolket indhold i %s-sektion)
+Importtabellerne (tolket indhold i %s-afsnit)
 
-Der findes en fÃ¸rste thunk, men sektionen som indeholder den kunne ikke findes
+Der findes en fÃ¸rste thunk, men afsnittet som indeholder den kunne ikke findes
 
 Der findes en eksporttabel i %s ved 0x%lx
 
-Der findes en eksporttabel i %s, men den passer ikke ind i den pÃ¥gÃ¦ldende sektion
+Der findes en eksporttabel i %s, men den passer ikke ind i det pÃ¥gÃ¦ldende afsnit
 
-Der findes en eksporttabel, men sektionen som indeholder den kunne ikke findes
+Der findes en eksporttabel, men afsnittet som indeholder den kunne ikke findes
 
 Der findes en importtabel i %s pÃ¥ 0x%lx
 
-Der findes en importtabel, men sektionen som indeholder den kunne ikke findes
+Der findes en importtabel, men afsnittet som indeholder den kunne ikke findes
 
 Versionsreferencer:
 
@@ -607,6 +704,8 @@ Versionsdefinitioner:
 
 Virtuel adresse: %08lx OmrÃ¥desstÃ¸rrelse %ld (0x%lx) Antal rettelser %ld
 
+ADVARSEL: Ekstra data i .rsrc-afsnit - det vil blive ignoreret af Windows:
+
 [Ordningstals-/Navnepeger-]tabel
 
 ppcboot-hoved:
@@ -615,7 +714,7 @@ ppcboot-hoved:
     adresse: 0x%08x, stÃ¸rrelse: %u
     flag: %u, adresse: 0x%08x, pd-adresse: 0x%08x
     globalt navn: %.*s
-    lÃ¦nkningsindeks: %u, erstatnings-insn: 0x%08x
+    linking-indeks: %u, erstatnings-insn: 0x%08x
     navn: %.*s
     pc: 0x%08x
     pc: 0x%08x linje: %5u
@@ -649,10 +748,10 @@ ppcboot-hoved:
    id-match      : %x
    image-afsÃ¦t   : 0x%08x
    sprognavn: %.*s
-   lÃ¦nkningsindeks: %u, global: %.*s
-   lÃ¦nkningsindeks: %u, procedurenavn: %.*s
-   lÃ¦nkningsindeks: %u, procedure: %.*s
-   lÃ¦nkningsindeks: %u, psect: %u, afsÃ¦t: 0x%08x %08x
+   linkingsindeks: %u, global: %.*s
+   linkingsindeks: %u, procedurenavn: %.*s
+   linkingsindeks: %u, procedure: %.*s
+   linkingsindeks: %u, psect: %u, afsÃ¦t: 0x%08x %08x
    maks post-str: %u
    modulnavn      : %.*s
    modulnavn : %.*s
@@ -660,7 +759,7 @@ ppcboot-hoved:
    navn          : %.*s
    navn        : %.*s
    navn       : %.*s
-   antal cond-lÃ¦nkningspar: %u
+   antal cond-linkingpar: %u
    objektnavn    : %.*s
    afsÃ¦t: 0x%08x, vÃ¦rdi: 0x%08x
    proc-beskr : 0x%08x
@@ -706,109 +805,168 @@ ppcboot-hoved:
   shlextra  : %5u, permctx   : %5u
   shlstoff  : %5u, shrimgcnt : %5u
   stÃ¸rrelse: %u
- #: Segmentnavn      Sektionsnavn     Adresse
  %08x 0x%08x 64B <EABI-version genkendes ikke> BPAGE: %u COM COMM Ã†ndringsbeskyttelse (%u elementer):
  Fixup'er til kodeadressereferencer:
  DEF EXE FÃ¸rste adresse: 0x%08x 0x%08x
  Fjerde adresse: 0x%08x 0x%08x
- GBL Klisterkodesekvens LIB Reference-fixup'er til lÃ¦nkningspar:
- NOMOD NORM OVR PIC QVAL RD REL Registergenskabnings millikode Registergemnings millikode SHR Anden adresse : 0x%08x 0x%08x
+ GBL Klisterkodesekvens LIB Reference-fixup'er til linking-par:
+ NOMOD NORM OVR PIC QVAL RD REL Registergenskabnings-millikode Registergemnings-millikode SHR Anden adresse : 0x%08x 0x%08x
  Delelige aftryk:
  Delt aftryk   : 0x%08x 0x%08x
+ Tabel: Tegn: %d, Tid: %08lx, Ver: %d/%d, Num-navne: %d, id'er: %d
  Tredje adresse: 0x%08x 0x%08x
- UNI VEC VECEP WEAK WRT [64 bit-doubles] [BE8] [FPA-flydendetalformat] [LE8] [Maverick-flydendetalformat] [VFP-flydendetalsformat] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [ukendt abi] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolut position] [d-flydende tal] [dsp] [dynamiske symboler bruger segmentindeks] [fix dep] [flydende tal overfÃ¸rt i flydendetalsregistre] [flydende tal overfÃ¸rt i heltalsregistre] [g-flydende tal] [har startpunkt] [samvirkende er aktiveret] [samvirkendeflag er ikke initieret] [samvirken understÃ¸ttes ikke] [samvirken understÃ¸ttes] [mapningssymboler foretrÃ¦kkes frem for andre] [memory=bank-model] [memory=flat] [nyt ABI] [intet abi sat] [ikke-pic] [ikke 32-bittilstand] [gammelt ABI] [pic] [positionsuafhÃ¦ngigt] [relokÃ©rbar kÃ¸rbar fil] [programmeret FP] [sorteret symboltabel] [symboler har et _-prÃ¦fiks] [ukendt ISA] [usorteret symboltabel] [v10 og v32] [v32] beskadiget GST
- cpusubtype: %08lx
- cputype   : %08lx (%s)
+ UNI VEC VECEP WEAK WRT [BE8] [FPA-flydendetalformat] [G10] [LE8] [Maverick-flydendetalformat] [VFP-flydendetalsformat] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [XGATE RAM-forskydning] [ukendt abi] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [abiv%ld] [absolut position] [d-flydende tal] [dynamiske symboler bruger segmentindeks] [fix dep] [flydende tal overfÃ¸rt i flydendetalsregistre] [flydende tal overfÃ¸rt i heltalsregistre] [g-flydende tal] [hard-float ABI] [har startpunkt] [samvirkende er aktiveret] [samvirkendeflag er ikke initieret] [samvirken understÃ¸ttes ikke] [samvirken understÃ¸ttes] [mapningssymboler foretrÃ¦kkes frem for andre] [memory=bank-model] [memory=flat] [nyt ABI] [intet abi sat] [ikke-pic] [ikke 32-bittilstand] [gammelt ABI] [pic] [positionsuafhÃ¦ngigt] [relokÃ©rbar kÃ¸rbar fil] [soft-float ABI] [programmeret FP] [sorteret symboltabel] [symboler har et _-prÃ¦fiks] [ukendt ISA] [usorteret symboltabel] [v10 og v32] [v32] beskadiget GST
  fejlsÃ¸gningsmodultabel : vbn: %u, stÃ¸rrelse: %u
  symboltabel til fejlsÃ¸gning : vbn: %u, stÃ¸rrelse: %u (0x%x)
- filtype   : %08lx (%s)
- fixup info-rva:  flag      : %08lx ( flag: 0x%04x global symboltabel: vbn: %u, poster: %u
+ fixup info-rva:  flag: 0x%04x global symboltabel: vbn: %u, poster: %u
  ident: 0x%08x, navn: %.*s
  ident: 0x%08x, sysver: 0x%08x, match-ktrl: %u, symvect_size: %u
  aftryks bygge-id : %.*s
  aftryks-id       : %.*s
  aftryksnavn      : %.*s
  aftrykstype: %u (%s) img-I/O-tal: %u, antal kanaler: %u, req pri: %08x%08x
- lÃ¦nketidspunkt   : %s
- lÃ¦nkerflag: %08x: lÃ¦nker-id        : %.*s
+ linktidspunkt   : %s
+ linkerflag: %08x: linker-id        : %.*s
  fixup'er til long-word .address-referencer:
  fixup'er til long-word-relokeringer:
- magi      : %08lx
  hovednr: %u, undernr: %u
  modulafsÃ¦t: 0x%08x, stÃ¸rrelse: 0x%08x, (%u psect'er)
- nkmd'er   : %08lx (%lu)
  afsÃ¦t: isd: %u, aktiv: %u, symdbg: %u, imgid: %u, patch: %u
  fixup'er til quad-word .address-referencer:
  fixup'er til quad-word-relokeringer:
- reserveret: %08x
- sektion: base: 0x%08x%08x size: 0x%08x
- sizeofcmds: %08lx
+ afsnit: base: 0x%08x%08x size: 0x%08x
  type: %3u, lÃ¦ngde: %3u (pÃ¥ 0x%08x):  uhÃ¥ndteret EOBJ-post-type %u
  vbn: %u, pfc: %u, matchktl: %u type: %u ( vma:			Startadresse      Slutadresse       Tilbagespolings-information
- vma:		Start-    Slut-     EH-        EH-    Prologsluts-  Undtagelses-
-     		adresse   adresse   hÃ¥ndterer  data   adresse       maske
- vma:		Start    Prolog   Funktion Flag    Undtagelse EH
-     		Adresse  LÃ¦ngde   LÃ¦ngde   32b exc HÃ¥ndtering Data
+ vma:		Start-   Slut-    EH-      EH-     Prologslut- Undtagelses-
+     		adresse  adresse  hÃ¥ndt.   data    adresse     maske
+ vma:		Start    Prolog   Funktion Flag    Undt.-     EH
+     		Adresse  LÃ¦ngde   LÃ¦ngde   32b exc HÃ¥ndt.     Data
  vma:            Tips-   Tids-     Fremad-  DLL-      FÃ¸rste
                  tabel   stempel   kÃ¦de     navn      thunk
-#<Ugyldig fejlkode>%A har bÃ¥de ordnede ["%A" i %B] og uordnede ["%A" i %B] sektioner%A har bÃ¥de ordnede og uordnede sektioner%A:0x%v lrlive .brinfo (%u) afviger fra analyse (%u)
+#<Ugyldig fejlkode>%*.s  Blad: Adr: %#08lx, StÃ¸rrelse: %#08lx, Codepage: %d
+%*.s-indgang: %A har bÃ¥de ordnede ["%A" i %B] og uordnede ["%A" i %B] afsnit%A har bÃ¥de ordnede og uordnede afsnit%A:0x%v lrlive .brinfo (%u) afviger fra analyse (%u)
 %A:0x%v ikke fundet i funktionstabel
-%B (%s): Sektionsflag %s (0x%x) ignoreret%B og %B er til forskellige konfigurationer%B og %B er til forskellige cpu-kerner%B indeholder CRIS v32-kode, som er inkompatibel med tidligere objekter%B indeholder ikke-CRIS-v32-kode, som er inkompatibel med tidligere objekter%B har bÃ¥de nuvÃ¦rende og Ã¦ldre Tag_MPextension_use-attributter%B mÃ¥ ikke definere %s%B-sektionen %A overstiger stub-gruppestÃ¸rrelsen%B-symbol nummer %lu refererer SHT_SYMTAB_SHNDX-sektion, der ikke findes%B(%A): fejl: kald til udefineret funktion "%s"%B(%A): intern fejl: farlig relokering%B(%A): intern fejl: uden for intervallet%B(%A): intern fejl: ukendt fejl%B(%A): intern fejl: relokeringen understÃ¸ttes ikke%B(%A): ugyldig egenskabstabel%B(%A): advarsel: ikke-justeret tilgang til symbol "%s" i det lille dataomrÃ¥de%B(%A+0x%lx): %s-"fixup" for instruktion 0x%x understÃ¸ttes ikke i et ikke-delt lÃ¦nke%B(%A+0x%lx): relokering af %s mod "%s": fejl %d%B(%A+0x%lx): %s-relokering mod lokalt symbol%B(%A+0x%lx): %s-relokering mod SEC_MERGE-sektion%B(%A+0x%lx): %s-relokering mod eksternt symbol "%s"%B(%A+0x%lx): %s bruges med TLS-symbol %s%B(%A+0x%lx): %s bruges med ikke-TLS-symbol %s%B(%A+0x%lx): Kun instruktionerne ADD og SUB er tilladt for ALU-grupperelokeringer%B(%A+0x%lx): OverlÃ¸b ved opdeling af 0x%lx til grupperelokering %s%B(%A+0x%lx): R_68K_TLS_LE32-relokering tillades ikke i delt objekt%B(%A+0x%lx): Relokering af R_ARM_TLS_LE32 er ikke tilladt i delt objekt%B(%A+0x%lx): Stabs-post har ugyldigt strengindeks.%B(%A+0x%lx): flere automatiske TOC'er understÃ¸ttes ikke med dine crt-filer; genkompilÃ©r med -mminimal-toc eller opgradÃ©r gcc%B(%A+0x%lx): kan ikke udsende "fixup" til "%s" i skrivebeskyttet sektion%B(%A+0x%lx): kan ikke hÃ¥ndtere %s til %s%B(%A+0x%lx): kan ikke nÃ¥ %s%B(%A+0x%lx): kan ikke nÃ¥ %s, genkompilÃ©r med -ffunction-sections%B(%A+0x%lx): kunne ikke afkode instruktion til XTENSA_ASM_SIMPLIFY-relokering; mulig konfigurationsmodstrid%B(%A+0x%lx): kunne ikke afkode instruktion; mulig konfigurationsmodstrid%B(%A+0x%lx): ugyldig instruktion til TLS-relokering %s%B(%A+0x%lx): addend forskellig fra nul pÃ¥ %s-relokering mod "%s"%B(%A+0x%lx): relokering mod "%s": %s%B(%A+0x%lx): relokering mod "%s": fejl %d%B(%A+0x%lx): relokering %s for indirekte funktion %s understÃ¸ttes ikke%B(%A+0x%lx): relokeringsafsÃ¦t uden for gyldigt interval (stÃ¸rrelse=0x%x)%B(%A+0x%lx): "sibling call"-optimering til "%s" tillader ikke flere indholdsfortegnelser; genkompilÃ©r med -mminimal-toc eller -fno-optimize-sibling-calls eller gÃ¸r "%s" ekstern%B(%A+0x%lx): uventet fiks til %s-relokering%B(%A+0x%lx): ulÃ¸selig %s-relokering mod symbol "%s"%B(%A+0x%lx): ulÃ¸selig relokering mod symbol "%s"%B(%A+0x%v): kald til ikke-kodesektion %B(%A), analyse ufuldstÃ¦ndig
-%B(%A+0x%x): relokering til "%s+%x" kan have forÃ¥rsaget ovenstÃ¥ende fejl%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.
-  fÃ¸rste forekomst: %B: ARM-kald til Thumb%s(%s): advarsel: samvirken (interworking) er ikke aktiveret.
+%B (%s): afsnitsflag %s (0x%x) ignoreret%B og %B er til forskellige konfigurationer%B og %B er til forskellige cpu-kerner%B indeholder CRIS v32-kode, som er inkompatibel med tidligere objekter%B indeholder ikke-CRIS-v32-kode, som er inkompatibel med tidligere objekter%B har bÃ¥de nuvÃ¦rende og Ã¦ldre Tag_MPextension_use-attributter%B mÃ¥ ikke definere %s%B-afsnittet %A overstiger stub-gruppestÃ¸rrelsen%B-symbol nummer %lu refererer SHT_SYMTAB_SHNDX-afsnit, der ikke findes%B bruger ukendte e_flags 0x%lx%B(%A): fejl: kald til udefineret funktion "%s"%B(%A): intern fejl: farlig relokering%B(%A): intern fejl: uden for intervallet%B(%A): intern fejl: ukendt fejl%B(%A): intern fejl: relokeringen understÃ¸ttes ikke%B(%A): ugyldig egenskabstabel%B(%A): usikker PID-relokering %s ved 0x%08lx (mod %s i %s)%B(%A): advarsel: relaksering undertrykkes for afsnit med justering %d-byte > 4-byte.%B(%A): advarsel: ikke-justeret tilgang til symbol "%s" i det lille dataomrÃ¥de%B(%A): advarsel: ikke-justeret lille dataadgang af type %d.%B(%A+0x%%B(%A+0x%lx): %s-"fixup" for instruktion 0x%x understÃ¸ttes ikke i et ikke-delt link%B(%A+0x%lx): %s-relokering mod SEC_MERGE-afsnit%B(%A+0x%lx): %s-relokering mod eksternt symbol "%s"%B(%A+0x%lx): %s bruges med TLS-symbol %s%B(%A+0x%lx): %s bruges med ikke-TLS-symbol %s%B(%A+0x%lx): Kun instruktionerne ADD og SUB er tilladt for ALU-grupperelokeringer%B(%A+0x%lx): OverlÃ¸b ved opdeling af 0x%lx til grupperelokering %s%B(%A+0x%lx): R_68K_TLS_LE32-relokering tillades ikke i delt objekt%B(%A+0x%lx): Relokering af R_ARM_TLS_LE32 er ikke tilladt i delt objekt%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC-relokering tillades ikke i delt objekt%B(%A+0x%lx): R_NIOS2_TLS_LE16-relokering er ikke tilladt i delt objekt%B(%A+0x%lx): Stabs-post har ugyldigt strengindeks.%B(%A+0x%lx): kan ikke udsende "fixup" til "%s" i skrivebeskyttet afsnit%B(%A+0x%lx): kan ikke hÃ¥ndtere %s til %s%B(%A+0x%lx): kan ikke nÃ¥ %s, genkompilÃ©r med -ffunction-sections%B(%A+0x%lx): kunne ikke afkode instruktion til XTENSA_ASM_SIMPLIFY-relokering; mulig konfigurationsmodstrid%B(%A+0x%lx): kunne ikke afkode instruktion; mulig konfigurationsmodstrid%B(%A+0x%lx): ugyldig instruktion til TLS-relokering %s%B(%A+0x%lx): relokering mod "%s": fejl %d%B(%A+0x%lx): relokeringsafsÃ¦t uden for gyldigt interval (stÃ¸rrelse=0x%x)%B(%A+0x%lx): uventet fiks til %s-relokering%B(%A+0x%lx): ulÃ¸selig %s-relokering mod symbol "%s"%B(%A+0x%lx): ulÃ¸selig relokering mod symbol "%s"%B(%A+0x%lx): uventet ARM-instruktion "0x%x" i TLS-trampolin%B(%A+0x%lx): uventet ARM-instruktion "0x%x" refereret af TLS_GOTDESC%B(%A+0x%lx): uventet Thumb-instruktion "0x%x" i TLS-trampolin%B(%A+0x%lx): uventet Thumb-instruktion "0x%x" refereret af TLS_GOTDESC%B(%A+0x%v): kald til ikke-kodeafsnit %B(%A), analyse ufuldstÃ¦ndig
+%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.
+  fÃ¸rste forekomst: %B: ARM-kald til Thumb%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.
   fÃ¸rste forekomst: %B: Thumb-kald til ARM%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.
-  fÃ¸rste forekomst: %B: arm-kald til thumb%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.
-  fÃ¸rste forekomst: %B: thumb-kald til arm%B(%s): advarsel: "Interworking" er ikke slÃ¥et til.
+  fÃ¸rste forekomst: %B: arm-kald til thumb%B(%s): advarsel: "Interworking" er ikke slÃ¥et til.
   fÃ¸rste forekomst: %B: thumb-kald til arm
-  overvej at genlÃ¦nke med --support-old-code tilvalgt%B(%s+0x%lx): ulÃ¸selig %s-relokering mod symbol "%s"%B, sektion %A:
-  relokeringen %s er ikke gyldig i et delt objekt; dette er typisk en fejl i tilvalgende - genkompilÃ©r med -fPIC%B, sektion %A:
-  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genoversÃ¦t med -fPIC%B, sektion %A:
-  v10/v32-kompatibelt objekt %s mÃ¥ ikke indeholde en PIC-relokering%B, sektion %A: Ingen PLT til relokering %s mod symbol "%s"%B, sektion %A: Hverken nogen PLT eller GOT til relokering %s mod symbol "%s"%B, sektion %A: relokeringen %s har en udefineret reference til "%s". MÃ¥ske er der noget galt med erklÃ¦ringen?%B, sektion %A: relokeringen %s er ikke tilladt for globalt symbol: "%s"%B: relokeringen %A er ikke tilladt for symbol: "%s", som er defineret uden for programmet. MÃ¥ske er der noget galt med erklÃ¦ringen?%B, sektion %A: relokering %s oprettet uden nogen GOT%B, sektion %A: relokering %s med ikke-tom addend %d mod lokalt symbol%B, sektion %A: relokering %s med ikke-tom addend %d mod symbol "%s"%B, sektion %A: ulÃ¸selig relokering %s mod symbol "%s"%B, sektion %A til symbol "%s":
-  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genkompilÃ©r med -fPIC%B: !samegp-relokering mod symbol uden .prologue: %s%B: %A+0x%lx: Direkte hop mellem ISA-tilstande er ikke tilladt; overvej at genkompilere med interlinking slÃ¥et til.%B: %s-symbol "%s" i %B refereres af DSO%B: %s-symbolet "%s" er udefineret%B: %s: ugyldig krÃ¦vet version %d%B: %s: ugyldig version %u (max %d)%B: "%s" tilgÃ¥s bÃ¥de som normalt og trÃ¥dlokalt symbol%B: .got-subsegment overskrider 64K (stÃ¸rrelse %d)%B: .opd er ikke et almindeligt array af opd-poster%B: .preinit_array-sektionen er ikke tilladt i DSO%B: 0x%lx: fatalt: R_SH_PSHA-relokering %d er uden for gyldigt interval -32..32%B: 0x%lx: fatalt: R_SH_PSHL-relokering %d er uden for gyldigt interval -32..32%B: 0x%lx: fatalt: relokering giver overlÃ¸b ved forenklingen%s: 0x%lx: fatalt: ujusteret %s-relokering 0x%lx%B: 0x%lx: fatalt: ujusteret grenmÃ¥l for relokering for forenklingsunderstÃ¸ttelse%B: 0x%lx: advarsel: R_SH_USES peger pÃ¥ ukendt instruktion 0x%x%B: 0x%lx: advarsel: fejlagtig R_SH_USES-indlÃ¦sningsafstand%B: 0x%lx: advarsel: fejlagtig R_SH_USES-afstand%B: 0x%lx: advarsel: fejlagtigt antal%B: 0x%lx: advarsel: kunne ikke finde forventet COUNT-relokering%B: 0x%lx: advarsel: kunne ikke finde forventet relokering%B: 0x%lx: advarsel: symbol i uventet sektion%B: @gprel-relokering mod dynamisk symbol %s%B: @intern gren til dynamisk symbol %s%B: @pcrel-relokering mod dynamisk symbol %s%B: ABI er ikke kompatibel med den valgte emulerings ABI%B: ABI passer ikke: lÃ¦nker %s-modul med tidligere %s-moduler%B: Arkitekturen passer ikke sammen med tidligere moduler%B: BE8-aftryk er kun gyldige i big-endian-tilstanden.%B: Fejlagtig relokeringspost importeret: %d%B: CALL15-relokering ved 0x%lx er ikke mod globalt symbol%B: CALL16-relokering ved 0x%lx er ikke mod globalt symbol%B: Kan ikke finde matchende LO16-relokering mod "%s" for %s ved 0x%lx i sektion "%A"%B: Kan ikke forenkle br (%s) til "%s" pÃ¥ 0x%lx i sektionen "%A" med stÃ¸rrelsen 0x%lx (> 0x1000000).%B: Kan ikke forenkle br ved 0x%lx i sektionen "%A". Brug venligst brl eller indirekte gren.%B: Kan ikke hÃ¥ndtere komprimerede Alpha-binÃ¦rfiler.
-   Brug kompilerflag eller objZ til at generere ukomprimerede binÃ¦rfiler.%B: Beskadiget stÃ¸rrelsesfelt i gruppesektionshoved: 0x%lx%B: Kunne ikke tilfÃ¸je omdÃ¸bt symbol %s%B: Relokering af funktionsdeskriptor med addend forskellig fra nul%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 eller 16 bit-afsÃ¦t > %d%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 bit-afsÃ¦t > %d%B: GOT-relokering ved 0x%lx forventes ikke i eksekveringsfiler%B: IMPORT AS-direktiv til %s skjuler forrige IMPORT AS%B: InstruktionssÃ¦t passer ikke med tidligere moduler%B: Ugyldig relokeringstype importeret: %d%B: Fejlagtig relokering for sektion %s opdaget%s: Ikke tilstrÃ¦kkeligt med plads til programhoveder, forsÃ¸g at lÃ¦nke med -N%B: Kun registrene %%g[2367] kan erklÃ¦res med STT_REGISTER%B: Genkendt men uhÃ¥ndteret maskintype (0x%x) i Import Library Format-arkiv%B: Relokering %s (%d) understÃ¸ttes ikke i Ã¸jeblikket.
-%B: Relokeringer i generisk ELF (EM: %d)%B: SB-relativ relokering, men __c6xabi_DSBT_BASE er ikke defineret%B: lokal TLS-eksekveringskode kan ikke lÃ¦nkes ind i delte objekter%B: TLS-overgang fra %s til %s mod "%s" ved 0x%lx i afsnittet "%A" mislykkedes%B: FÃ¸rste sektion i segmentet PT_DYNAMIC er ikke .dynamic-sektionen%B: MÃ¥let (%s) for en %s-relokering er i forkert sektion (%A)%B: For mange sektioner: %d (>= %d)%B: Kan ikke sortere relokeringer - de har flere forskellige stÃ¸rrelser%B: Kan ikke sortere relokeringer - de har ukendt stÃ¸rrelse%B: UhÃ¥ndteret importtype; %x%B: Ukendt obligatorisk EABI-objekt-attribut %d%B: Ukendt relokeringstype %d
-%B: Ukendt sektionstype i a.out.adobe-fil: %x
-%B: Ukendt .directive-kommando: %s%B: Ukendt importnavnstype; %x%B: Ukendt importtype; %x%B: Ukendt maskintype (0x%x) i Import Library Format-arkiv%B: Ukendt lagringsklasse %d for %s-symbolet "%s"%B: Advarsel: Ignorerer sektionsflag IMAGE_SCN_MEM_NOT_PAGED i sektionen %s%B: Advarsel: Thumb BLX-instruktionen bruger thumb-funktionen "%s" som mÃ¥l.%B: Advarsel: Ugyldig "%s"-tilvalgsstÃ¸rrelse %u mindre end dens header%B: Advarsel: Kan ikke bestemme mÃ¥lfunktionen for stubsektionen "%s"%B: XMC_TC0-symbol "%s" er klasse %d scnlen %d%B: "%s" tilgÃ¥s bÃ¥de som FDPIC-symbol og trÃ¥dlokalt symbol%B: "%s" tilgÃ¥s bÃ¥de som normalt symbol og FDPIC-symbol%B: "%s" tilgÃ¥s bÃ¥de som normalt symbol og trÃ¥dlokalt symbol%B: "%s" har linjenumre, men ingen omsluttende sektion%B: "%s" i indlÃ¦serrelokering, men ikke indlÃ¦sersym%B: "ld -r" understÃ¸ttes ikke med PE MIPS-objekter
-%B: fejlagtigt XTY_ER-symbol "%s": klasse %d scnum %d scnlen %d%B: fejlagtigt par/reflo efter refhi
-%B: fejlagtig relokeringsadresse 0x%lx i sektionen "%s"%B: fejlagtig relokeringssymbolindeks (0x%lx >= 0x%lx) for afsÃ¦t 0x%lx i sektionen "%A"%B: fejlagtigt relokeringssektionsnavn "%s"%B: fejlagtig sektionslÃ¦ngde i ihex_read_sektion%B: fejlagtig strengtabelstÃ¸rrelse %lu%B: fejlagtigt symbolindeks: %d%B: kan ikke oprette stub-post %s%B: Ã¦ndring i gp: BRSGP %s%B: klasse %d-symbol "%s" har ingen aux-poster%B: kompileret til et 64-bitssystem, men mÃ¥let er 32-bit%B: kompileret til et big endian-system, men mÃ¥let er little endian%B: kompileret til et little endian-system, men mÃ¥let er big endian%B: kompileret normalt og lÃ¦nket med moduler som er kompileret med -mrelocatable%B: kompileret med -mrelocatable og lÃ¦nket med moduler som er kompileret normalt%B: kunne ikke finde uddatasektionen %A for inddatasektionen %A%B: kunne ikke finde uddatasektionen %s%B: csect "%s" er ikke i omsluttende sektion%B: ved ikke hvordan OS-specifik sektion "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan allokeret, programspecifik sektion "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan processorspecifik sektion "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan sektion "%s" [0x%8x] skal hÃ¥ndteres%B: dtp-relativ relokering mod dynamisk symbol %s%B: dobbelt eksportstub %s%B: gentaget sektion "%A" har forskellig stÃ¸rrelse%B: endian-hed er ikke kompatibel den valgte emulerings endian-hed%B: fejl: Cortex-A8-erratum-stub er allokeret pÃ¥ et usikkert sted%B: fejl: Cortex-A8-erratum-stub er uden for gyldigt interval (inddatafil for stor)%B: fejl: VFP11-veneer uden for gyldigt interval%B: fejl: relokeringen %s er ikke et multiplum af %d%B: fejl: ujusteret relokeringstype %d pÃ¥ %08x-relokering %08x
-%B: gp-relativ relokering mod dynamisk symbol %s%B: ignorerer gentaget sektion "%A"%B: ikke tilladt relokeringstype %d pÃ¥ adresse 0x%lx%B: illegalt symbolindeks i relokering: %d%B: inkompatibel maskintype. Uddata er 0x%x. Inddata er 0x%x%B: indirekte symbol "%s" til "%s" er en lÃ¸kke%B: intern fejl i ihex_read_section%B: ugyldig SHT_GROUP-post%B: ugyldig lÃ¦nke %lu for relokeringssektion %s (indeks %u)%B: ugyldig relokeringstype %d%B: ugyldigt strengafsÃ¦t %u >= %lu for sektionen "%s"%B: hop for langt bort
-%B: lÃ¦nker %s-modul med tidligere %s-moduler%B: lÃ¦nker 32 bit-kode med 64 bit-kode%B: lÃ¦nker 64 bit-filer med 32 bit-filer%B: lÃ¦nker UltraSPARC-specifik med HAL-specifik kode%B: lÃ¦nker auto-pic-filer med ikke-auto-pic-filer%B: lÃ¦nker big-endian-filer med little endian-filer%B: lÃ¦nker konstant-gp-filer med ikke-konstant-gp-filer%B: lÃ¦nker filer, der er kompileret til 16 bit-heltal (-mshort), og andre til 32 bit-heltal%B: lÃ¦nker filer, der er kompileret til 32 bit-double (-fshort-double), og andre til 64 bit-double%B: lÃ¦nkning af filer kompileret til HCS12 med andre, der er kompileret til HC12%B: lÃ¦nker little endian-filer med big endian-filer%B: lÃ¦nker ikke-pic-kode i en positionsuafhÃ¦ngig eksekverbar fil%B: lÃ¦nker fang-ved-NULL-dereference med ikkefangende filer%B: indlÃ¦serrelokering i skrivebeskyttet sektion %A%B: indlÃ¦serrelokering i ukendt sektion "%s"%B: fejlagtigt placeret XTY_LD "%s"%B: manglende TLS-sektion til relokering %s mod "%s" ved 0x%lx i sektionen "%A".%B: ingen gruppeinformation for sektionen %A%B: ikke-pic-kode med imm-relokering mod dynamisk symbol "%s"%B: symboltabellen (0x%lx) forskelligt fra nul for afsÃ¦t 0x%lx i sektion "%s" mens objektfilen ikke har nogen symboltabelc%B: pc-relativ relokering mod dynamisk symbol %s%B: pc-relativ relokering mod udefineret svagt symbol %s%B: nok oversat uden -fPIC?%B: relokeringen %s:%d er ikke i csect%B: relokering mod et ikke-eksisterende symbolindeks: %ld%B: relokeringen %s mod %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%s%B: relokering %s mod STT_GNU_IFUNC-symbol "%s" har addend forskellig fra nul: %d%B: relokeringen %s mod STT_GNU_IFUNC-symbolet "%s" hÃ¥ndteres ikke af %s%B: relokeringen %s mod "%s" kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC%B: relokeringen %s mod udefineret %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%s%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen %s understÃ¸ttes ikke for symbol %s.%B: relokeringen %s understÃ¸ttes endnu ikke for symbolet %s.%B: relokeringen R_386_GOTOFF mod beskyttet funktion "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen R_386_GOTOFF mod udefineret %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen R_X86_64_GOTOFF64 mod beskyttet funktion "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokering ved "%A+0x%x" refererer til symbolet "%s" med addend forskellig fra nul%B: relokeringsstÃ¸rrelsen stemmer ikke overens i %B-sektionen %A%B: relokeringstypen %d er ikke implementeret%B: relokeringer i sektionen "%s", men den har intet indhold%B: sektion %A lma %#lx justeret til %#lx%B: sektion %s: overlÃ¸b i strengtabel ved afsÃ¦t %ld%B: sektion "%A" kan ikke allokeres i segment %d%B: sh_link [%d] sektionen "%s" er forkert%B: sh_link af sektion "%A" peger pÃ¥ forkastet sektion "%A" i "%B"%B: sh_link af sektion "%A" peger pÃ¥ fjernet sektion "%A" af "%B"%B: stÃ¸rrelsesfeltet er nul i Import Library Format-header%B: spekulations-fixup til dynamisk symbol %s%B: streng ikke nultermineret i ILF-objektfil.%B: symbol "%s" har ukendt csect-type %d%B: symbolet "%s" har ukendt smclas %d%B: symbol "%s" krÃ¦ves, men er ikke tilstede%B: mÃ¥let (%s) for en %s-relokering er i den forkerte uddatasektion (%s)%B: for mange sektioner (%d)%B: tp-relativ relokering mod dynamisk symbol %s%B: kan ikke udfylde DataDictionary[12] fordi .idata$5 mangler%B: kan ikke udfylde DataDictionary[1] fordi .idata$2 mangler%B: kan ikke udfylde DataDictionary[1] fordi .idata$4 mangler%B: kan ikke udfylde DataDictionary[9], da __tls_used mangler%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)], da .idata$6 mangler%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)], da .idata$6 mangler%B: kan ikke finde ARM-klistret "%s" til "%s"%B: kan ikke finde THUMB-klistret "%s" til "%s"%B: kan ikke finde VFP11-veneer "%s"%B: kan ikke hente dekomprimeret sektion %A%B: kan ikke initiere commpress-status for sektion %s%B: kan ikke klargÃ¸re afkomprimeringsstatus for sektion %s%B: udefineret reference til symbol "%s"%B: udefineret symbol "%s" i .opd-sektion%B: uventet ATN-type %d i ekstern del%B: uventet omdefinition af indirekte versionstildelt symbol "%s"%B: uventet relokeringstype %u i .opd-sektion%B: uventet type efter ATN%B: uhÃ¥ndteret dynamisk relokering mod %s%B: uimplementeret %s
-%B: ikke-implementeret ATI-post %u for symbol %u%B: ukendt [%d] sektion "%s" i gruppe [%s]%B: ukendt relokeringstype %d%B: ukendt relokeringstype %d for symbol %s%B: relokeringstypen %d kendes eller understÃ¸ttes ikke%B: ukendt relokering (0x%x) i sektionen "%A"%B: relokeringstypen %i understÃ¸ttes ikke%B: relokeringstypen %s understÃ¸ttes ikke%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELHIGH%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELLOW%B: bruger symboler med _-prÃ¦fiks, men skriver fil med symboler uden prÃ¦fiks%B: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%B: bruger symboler uden prÃ¦fiks, men skriver fil med symboler med _-prÃ¦fiks%B: versionsknude ikke fundet for symbolet %s%B: advarsel: COMDAT-symbol "%s" passer ikke til sektionsnavnet "%s"%B: advarsel: Tomt indlÃ¦seligt segment opdaget, er dette meningen?
-%B: advarsel: allokeret sektion "%s" ikke i segment%B: advarsel: kunne ikke lÃ¦se indholdet af sektionen "%A"%B: advarsel: dobbelt linjenummersinformation for "%s"%B: advarsel: gentaget sektion "%A" har forskelligt indhold%B: advarsel: gentaget sektion "%A" har forskellig lÃ¦ngde
-%B: advarsel: ignorerer gentaget sektion "%A"
-%B: advarsel: illegalt symbolindeks %ld i linjetal%B: advarsel: illegalt symbolindeks %ld i relokeringerne%B: advarsel: lÃ¦sning af linjenummertabel mislykkedes%B: advarsel: lÃ¦nker PIC-filer med ikke-PIC-filer%B: advarsel: lÃ¦nker abicalls-filer med ikke-abicalls-filer%B: advarsel: valgte omgÃ¥else af VFP11-erratum er ikke nÃ¸dvendig for mÃ¥larkitekturen%B: advarsel: sh_link ikke givet for sektionen "%s"%B:%A%s overstiger overlay-stÃ¸rrelsen
+  overvej at genlinke med --support-old-code tilvalgt%B(%s+0x%lx): ulÃ¸selig %s-relokering mod symbol "%s"%B, afsnit %A:
+  relokeringen %s er ikke gyldig i et delt objekt; dette er typisk en fejl i tilvalgende - genkompilÃ©r med -fPIC%B, afsnit %A:
+  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genoversÃ¦t med -fPIC%B, afsnit %A:
+  v10/v32-kompatibelt objekt %s mÃ¥ ikke indeholde en PIC-relokering%B, afsnit %A: Ingen PLT til relokering %s mod symbol "%s"%B, afsnit %A: Hverken nogen PLT eller GOT til relokering %s mod symbol "%s"%B, afsnit %A: relokeringen %s har en udefineret reference til "%s". MÃ¥ske er der noget galt med erklÃ¦ringen?%B, afsnit %A: relokeringen %s er ikke tilladt for globalt symbol: "%s"%B, afsnit %A: relokeringen %s er ikke tilladt for symbol: "%s", som er defineret uden for programmet. MÃ¥ske er der noget galt med erklÃ¦ringen?%B, afsnit %A: relokering %s oprettet uden nogen GOT%B, afsnit %A: relokering %s med ikke-tom addend %d mod lokalt symbol%B, afsnit %A: relokering %s med ikke-tom addend %d mod symbol "%s"%B, afsnit %A: ulÃ¸selig relokering %s mod symbol "%s"%B, afsnit %A til symbol "%s":
+  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genkompilÃ©r med -fPIC%B: !samegp-relokering mod symbol uden .prologue: %s%B: %A+0x%lx: Type af hop mellem ISA-tilstande understÃ¸ttes ikke; overvej at genkompilere med interlinking slÃ¥et til.%B: %s
+%B: %s: er ikke absolut%B: "%s" tilgÃ¥s bÃ¥de som normalt symbol og trÃ¥dlokalt symbol%B: %s: ugyldig krÃ¦vet version %d%B: %s: ugyldig version %u (max %d)%B: "%s" tilgÃ¥s bÃ¥de som normalt og trÃ¥dlokalt symbol%B: .got-subsegment overskrider 64K (stÃ¸rrelse %d)%B: .opd er ikke et almindeligt array af opd-poster%B: .preinit_array-afsnittet er ikke tilladt i DSO%B: 0x%lx: fatalt: R_SH_PSHA-relokering %d er uden for gyldigt interval -32..32%B: 0x%lx: fatalt: R_SH_PSHL-relokering %d er uden for gyldigt interval -32..32%B: 0x%lx: fatalt: relokering giver overlÃ¸b ved relaksering%B: 0x%lx: fatalt: ujusteret %s-relokering 0x%lx%B: 0x%lx: fatalt: ujusteret grenmÃ¥l for relokering for relakseringsunderstÃ¸ttelse%B: 0x%lx: advarsel: R_SH_USES peger pÃ¥ ukendt instruktion 0x%x%B: 0x%lx: advarsel: fejlagtig R_SH_USES-indlÃ¦sningsafstand%B: 0x%lx: advarsel: fejlagtig R_SH_USES-afstand%B: 0x%lx: advarsel: fejlagtigt antal%B: 0x%lx: advarsel: kunne ikke finde forventet COUNT-relokering%B: 0x%lx: advarsel: kunne ikke finde forventet relokering%B: 0x%lx: advarsel: symbol i uventet afsnit%B: @gprel-relokering mod dynamisk symbol %s%B: @intern gren til dynamisk symbol %s%B: @pcrel-relokering mod dynamisk symbol %s%B: ABI er ikke kompatibel med den valgte emulerings ABI%B: ABI passer ikke: linker %s-modul med tidligere %s-moduler%B: ABI-version %ld er ikke kompatibel med output-ABI-version %ld%B: ASE-uoverensstemmelse: linker %s-modul med tidligere %s-moduler%B: Justering passer ikke sammen med tidligere moduler%B: Arkitekturen passer ikke sammen med tidligere moduler%B: BE8-aftryk er kun gyldige i big-endian-tilstanden.%B: Fejlagtig relokeringspost importeret: %d%B: CALL15-relokering ved 0x%lx er ikke mod globalt symbol%B: CALL16-relokering ved 0x%lx er ikke mod globalt symbol%B: Kan ikke finde matchende LO16-relokering mod "%s" for %s ved 0x%lx i afsnit "%A"%B: Kan ikke relaksere br (%s) til "%s" pÃ¥ 0x%lx i afsnittet "%A" med stÃ¸rrelsen 0x%lx (> 0x1000000).%B: Kan ikke relaksere br ved 0x%lx i afsnittet "%A". Brug venligst brl eller indirekte gren.%B: Kan ikke hÃ¥ndtere komprimerede Alpha-binÃ¦rfiler.
+   Brug kompilerflag eller objZ til at generere ukomprimerede binÃ¦rfiler.%B: Kan ikke linke %s- og %s-objekter sammen.%B: Beskadiget stÃ¸rrelsesfelt i gruppeafsnitsshoved: 0x%lx%B: Kunne ikke tilfÃ¸je omdÃ¸bt symbol %s%B: Relokering af funktionsdeskriptor med addend forskellig fra nul%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 eller 16 bit-afsÃ¦t > %d%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 bit-afsÃ¦t > %d%B: GOT-relokering ved 0x%lx forventes ikke i eksekveringsfiler%B: IMPORT AS-direktiv til %s skjuler forrige IMPORT AS%B: ISR-vektorstÃ¸rrelse passer ikke med tidligere moduler; fÃ¸r %u-byte, nu %u-byte%B: InstruktionssÃ¦t passer ikke med tidligere moduler%B: Ugyldig relokeringstype importeret: %d%B: Fejlagtig relokering for afsnit %s opdaget%B: Indlejret OMIT_FP i %A.%B: Intet afsnit med symbolversion for versioneret symbol "%s"%B: Ikke tilstrÃ¦kkeligt med plads til programhoveder, forsÃ¸g at linke med -N%B: Kun registrene %%g[2367] kan erklÃ¦res med STT_REGISTER%B: Genkendt men uhÃ¥ndteret maskintype (0x%x) i Import Library Format-arkiv%B: Relokering %s (%d) understÃ¸ttes ikke i Ã¸jeblikket.
+%B: Relokeringer i generisk ELF (EM: %d)%B: SB-relativ relokering, men __c6xabi_DSBT_BASE er ikke defineret%B: lokal TLS-eksekveringskode kan ikke linkes ind i delte objekter%B: TLS-afsnit er ikke ved siden af hinanden:%B: TLS-overgang fra %s til %s mod "%s" ved 0x%lx i afsnittet "%A" mislykkedes%B: FÃ¸rste afsnit i segmentet PT_DYNAMIC er ikke .dynamic-afsnittet%B: MÃ¥let (%s) for en %s-relokering er i forkert afsnit (%A)%B: For mange afsnit: %d (>= %d)%B: Kan ikke sortere relokeringer - de har flere forskellige stÃ¸rrelser%B: Kan ikke sortere relokeringer - de har ukendt stÃ¸rrelse%B: UhÃ¥ndteret importtype; %x%B: Ukendt obligatorisk EABI-objektattribut %d%B: Ukendt relokeringstype %d
+%B: Ukendt afsnitsstype i a.out.adobe-fil: %x
+%B: OMIT_FP uden match i %A.%B: Ukendt .directive-kommando: %s%B: Ukendt importnavnstype; %x%B: Ukendt importtype; %x%B: Ukendt maskintype (0x%x) i Import Library Format-arkiv%B: Ukendt lagringsklasse %d for %s-symbolet "%s"%B: Advarsel: Ignorerer afsnitssflag IMAGE_SCN_MEM_NOT_PAGED i afsnittet %s%B: Advarsel: Thumb BLX-instruktionen bruger thumb-funktionen "%s" som mÃ¥l.%B: Advarsel: Ugyldig "%s"-tilvalgsstÃ¸rrelse %u mindre end dens header%B: Advarsel: Kan ikke bestemme mÃ¥lfunktionen for stubafsnittet "%s"%B: Advarsel: PLT-generering i "thumb mode" understÃ¸ttes ikke i Ã¸jeblikket%B: XMC_TC0-symbol "%s" er klasse %d scnlen %d%B: "%A"-forskydning pÃ¥ %ld fra "%A" uden for gyldigt interval af ADDIUPC%B: "%s" tilgÃ¥s bÃ¥de som FDPIC-symbol og trÃ¥dlokalt symbol%B: "%s" tilgÃ¥s bÃ¥de som normalt symbol og FDPIC-symbol%B: "%s" tilgÃ¥s bÃ¥de som normalt symbol og trÃ¥dlokalt symbol%B: "%s" har linjenumre, men intet omsluttende afsnit%B: "%s" i indlÃ¦serrelokering, men ikke indlÃ¦sersym%B: "ld -r" understÃ¸ttes ikke med PE MIPS-objekter
+%B: addend -0x%x i relokering %s mod symbol "%s" ved 0x%lx i afsnit "%A" uden for gyldigt interval%B: addend 0x%x i relokering %s mod symbol "%s" ved 0x%lx i afsnit "%A" uden for gyldigt interval%B: fejlagtigt XTY_ER-symbol "%s": klasse %d scnum %d scnlen %d%B: fejlagtigt par/reflo efter refhi
+%B: fejlagtig relokeringsadresse 0x%lx i afsnittet "%A"%B: fejlagtig relokeringssymbolindeks (0x%lx >= 0x%lx) for afsÃ¦t 0x%lx i afsnittet "%A"%B: fejlagtig afsnitslÃ¦ngde i ihex_read_section%B: fejlagtig strengtabelstÃ¸rrelse %lu%B: fejlagtigt symbolindeks: %d%B: kan ikke oprette stub-post %s%B: Ã¦ndring i gp: BRSGP %s%B: klasse %d-symbol "%s" har ingen aux-poster%B: kompileret til et 64-bitssystem, men mÃ¥let er 32-bit%B: kompileret til et big endian-system, men mÃ¥let er little endian%B: kompileret til et little endian-system, men mÃ¥let er big endian%B: kompileret normalt og linket med moduler som er kompileret med -mrelocatable%B: kompileret med -mrelocatable og linket med moduler som er kompileret normalt%B: kunne ikke finde uddataafsnittet %A for inddataafsnittet %A%B: kunne ikke finde uddataafsnittet %s%B: kunne ikke lÃ¦se indholdet af afsnittet "%A"
+%B: csect "%s" er ikke i omsluttende afsnit%B: ved ikke hvordan OS-specifik afsnit "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan allokeret, programspecifikt afsnit "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan processorspecifik afsnit "%s" [0x%8x] skal hÃ¥ndteres%B: ved ikke hvordan afsnit "%s" [0x%8x] skal hÃ¥ndteres%B: dtp-relativ relokering mod dynamisk symbol %s%B: dobbelt eksportstub %s%B: gentaget afsnit "%A" har forskelligt indhold
+%B: gentaget afsnit "%A" har forskellig stÃ¸rrelse
+%B: endian-hed er ikke kompatibel den valgte emulerings endian-hed%B: fejl: ABI passer ikke med tidligere moduler.%B: fejl: Kan ikke sÃ¦tte _ITB_BASE_%B: fejl: Cortex-A8-erratum-stub er allokeret pÃ¥ et usikkert sted%B: fejl: Cortex-A8-erratum-stub er uden for gyldigt interval (inddatafil for stor)%B: fejl: InstruktionssÃ¦t passer ikke med tidligere moduler.%B: fejl: VFP11-veneer uden for gyldigt interval%B: fejl: ujusteret relokeringstype %d pÃ¥ %08x-relokering %p
+%B: fejl: ukendt obligatorisk EABI-objektattribut %d%B: fejl: ukendt relokeringstype %d.%B: filklasse %s er ikke kompatibel med %s%B: gp-relativ relokering mod dynamisk symbol %s%B: skjult symbol "%s" i %B refereres af DSO%B: skjult symbol "%s" er ikke defineret%B: ignorerer gentaget afsnit "%A"
+%B: ikke tilladt relokeringstype %d pÃ¥ adresse 0x%lx%B: illegalt symbolindeks i relokering: %d%B: inkompatibel maskintype. Uddata er 0x%x. Inddata er 0x%x%B: indirekte symbol "%s" til "%s" er en lÃ¸kke%B: intern fejl i ihex_read_section%B: internt symbol "%s" i %B refereres af DSO%B: internt symbol "%s" er udefineret%B: ugyldig SHT_GROUP-post%B: ugyldigt link %lu for relokeringsafsnit %s (indeks %u)%B: ugyldig relokeringstype %d%B: ugyldigt strengafsÃ¦t %u >= %lu for afsnittet "%s"%B: hop for langt bort
+%B: linker %s-modul med tidligere %s-moduler%B: linker 32 bit-kode med 64 bit-kode%B: linker 64 bit-filer med 32 bit-filer%B: linker UltraSPARC-specifik med HAL-specifik kode%B: linker auto-pic-filer med ikke-auto-pic-filer%B: linker big-endian-filer med little endian-filer%B: linker konstant-gp-filer med ikke-konstant-gp-filer%B: linker filer, der er kompileret til 16 bit-heltal (-mshort), og andre til 32 bit-heltal%B: linker filer, der er kompileret til 32 bit-double (-fshort-double), og andre til 64 bit-double%B: linker filer kompileret til HCS12 med andre, der er kompileret til HC12%B: linker little endian-filer med big endian-filer%B: linker ikke-pic-kode i en positionsuafhÃ¦ngig eksekverbar fil%B: linker fang-ved-NULL-dereference med ikkefangende filer%B: indlÃ¦serrelokering i skrivebeskyttet afsnit %A%B: indlÃ¦serrelokering i ukendt afsnit "%s"%B: lokalt symbol "%s" i %B refereres af DSO%B: fejlagtigt placeret XTY_LD "%s"%B: manglende TLS-afsnit til relokering %s mod "%s" ved 0x%lx i afsnittet "%A".%B: ingen gruppeinformation for afsnittet %A%B: ikke-pic-kode med imm-relokering mod dynamisk symbol "%s"%B: symboltabellen (0x%lx) forskelligt fra nul for afsÃ¦t 0x%lx i afsnit "%A" mens objektfilen ikke har nogen symboltabelc%B: pc-relativ relokering mod dynamisk symbol %s%B: pc-relativ relokering mod udefineret svagt symbol %s%B: nok oversat uden -fPIC?%B: beskyttet symbol "%s" er udefineret%B: relokeringen %s:%d er ikke i csect%B: relokering mod et ikke-eksisterende symbolindeks: %ld%B: relokeringen %s mod %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%s%B: relokering %s mod STT_GNU_IFUNC-symbol "%s" har addend forskellig fra nul: %d%B: relokeringen %s mod STT_GNU_IFUNC-symbolet "%s" hÃ¥ndteres ikke af %s%B: relokeringen %s mod "%s" kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC%B: relokeringen %s mod symbolet "%s" understÃ¸ttes ikke i x32-tilstand%B: relokeringen %s mod udefineret %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%s%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen R_386_GOTOFF mod beskyttet funktion "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen R_386_GOTOFF mod udefineret %s "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokeringen R_X86_64_GOTOFF64 mod beskyttet funktion "%s" kan ikke bruges nÃ¥r et delt objekt oprettes%B: relokering ved "%A+0x%x" refererer til symbolet "%s" med addend forskellig fra nul%B: relokeringsstÃ¸rrelsen stemmer ikke overens i %B-afsnittet %A%B: relokeringer i afsnittet "%A", men den har intet indhold%B: afsnit %A lma %#lx justeret til %#lx%B: afsnit %s: overlÃ¸b i strengtabel ved afsÃ¦t %ld%B: afsnit "%A" kan ikke allokeres i segment %d%B: sh_link [%d] afsnittet "%A" er forkert%B: sh_link af afsnit "%A" peger pÃ¥ forkastet afsnit "%A" i "%B"%B: sh_link af afsnit "%A" peger pÃ¥ fjernet afsnit "%A" af "%B"%B: stÃ¸rrelsesfeltet er nul i Import Library Format-header%B: spekulations-fixup til dynamisk symbol %s%B: stakstÃ¸rrelse angivet og %s indstillet%B: streng ikke nultermineret i ILF-objektfil.%B: symbol "%s" har ukendt csect-type %d%B: symbolet "%s" har ukendt smclas %d%B: symbol "%s" krÃ¦ves, men er ikke tilstede%B: man kan ikke tage adressen for en beskyttet funktion "%s" nÃ¥r man laver et delt bibliotek%B: mÃ¥let (%s) for en %s-relokering er i det forkerte uddataafsnit (%s)%B: for mange afsnit (%d)%B: for mange afsnit: %u%B: tp-relativ relokering mod dynamisk symbol %s%B: kan ikke udfylde DataDictionary[12] fordi .idata$5 mangler%B: kan ikke udfylde DataDictionary[1] fordi .idata$2 mangler%B: kan ikke udfylde DataDictionary[1] fordi .idata$4 mangler%B: kan ikke udfylde DataDictionary[9], da __tls_used mangler%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)], da .idata$6 mangler%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)], da .idata$6 mangler%B: kan ikke finde ARM-klistret "%s" til "%s"%B: kan ikke finde THUMB-klistret "%s" til "%s"%B: kan ikke finde VFP11-veneer "%s"%B: kan ikke hente dekomprimeret afsnit %A%B: kan ikke klargÃ¸re komprimeringsstatus for afsnit %s%B: kan ikke klargÃ¸re afkomprimeringsstatus for afsnit %s%B: udefineret reference til symbol "%s"%B: udefineret symbol "%s" i .opd-afsnit%B: udefineret symbol ved R_PPC64_TOCSAVE-relokering%B: uventet ATN-type %d i ekstern del%B: uventet omdefinition af indirekte versionstildelt symbol "%s"%B: uventet relokeringstype %u i .opd-afsnit%B: uventet type efter ATN%B: uhÃ¥ndteret dynamisk relokering mod %s%B: uimplementeret %s
+%B: ikke-implementeret ATI-post %u for symbol %u%B: ukendt [%d] afsnit "%s" i gruppe [%s]%B: ukendt indlÃ¦sningskommando 0x%lx%B: ukendt relokeringstype %d%B: relokeringstypen %d kendes eller understÃ¸ttes ikke%B: ukendt relokering (0x%x) i afsnittet "%A"%B: relokeringstypen %i understÃ¸ttes ikke%B: relokeringstypen %i understÃ¸ttes ikke
+%B: relokeringstypen %s understÃ¸ttes ikke%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELHIGH%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELLOW%B: bruger symboler med _-prÃ¦fiks, men skriver fil med symboler uden prÃ¦fiks%B: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%B: bruger symboler uden prÃ¦fiks, men skriver fil med symboler med _-prÃ¦fiks%B: versionsknude ikke fundet for symbolet %s%B: advarsel: COMDAT-symbol "%s" passer ikke til afsnitsnavnet "%s"%B: advarsel: Tomt indlÃ¦seligt segment opdaget, er dette meningen?
+%B: advarsel: Endian-konflikt med tidligere moduler.%B: advarsel: Inkompatible elf-versioner %s og %s.%B: advarsel: Der blev fundet en Ã¦ldre objektfilversion. GenkompilÃ©r venligst med nuvÃ¦rende vÃ¦rktÃ¸jskÃ¦de.%B: advarsel: allokeret afsnit "%s" ikke i segment%B: advarsel: dobbelt linjenummersinformation for "%s"%B: advarsel: illegalt symbolindeks %ld i linjetal%B: advarsel: illegalt symbolindeks %ld i relokeringerne%B: advarsel: lÃ¦sning af linjenummertabel mislykkedes%B: advarsel: linker PIC-filer med ikke-PIC-filer%B: advarsel: linker abicalls-filer med ikke-abicalls-filer%B: advarsel: relokering af SDA_BASE mislykkedes.%B: advarsel: valgte omgÃ¥else af VFP11-erratum er ikke nÃ¸dvendig for mÃ¥larkitekturen%B: advarsel: sh_link ikke givet for afsnittet "%A"%B: advarsel: ikke-justeret adgang til GOT-indgang.%B: advarsel: ukendt EABI-objektattribut %d%B:%A%s overstiger overlay-stÃ¸rrelsen
 %B:%A: Advarsel: forÃ¦ldet Red Hat-relokering %B:%d: DÃ¥rlig tjeksum i S-post-fil
 %B:%d: Uventet tegn "%s" i S-post-fil
 %B:%d: uventet tegn "%s" i heksadecimal Intel-fil%B:%u: fejlagtig kontrolsum i heksadecimal Intel-fil (forventede %u, fandt %u)%B:%u: fejlagtig lÃ¦ngde pÃ¥ post for udvidet adresse i heksadecimal Intel-fil%B:%u: fejlagtig lÃ¦ngde pÃ¥ post for udvidet lineÃ¦r adresse i heksadecimal Intel-fil%B:%u: fejlagtig lÃ¦ngde pÃ¥ udvidet lineÃ¦r startadresse i heksadecimal Intel-fil%B:%u: fejlagtig lÃ¦ngde pÃ¥ udvidet startadresse i heksadecimal Intel-fil%B:%u: ukendt ihex-type %u i heksadecimal Intel-fil%C: advarsel: relokering til "%s" refererer et andet segment
 %F%P: already_linked_table: %E
-%F%P: dynamisk STT_GNU_IFUNC-symbol "%s" med pointerlighed i "%B" kan ikke bruges nÃ¥r der oprettes en eksekverbar fil; genkompilÃ©r med -fPIE og genlÃ¦nk med -pie
+%F%P: dynamisk STT_GNU_IFUNC-symbol "%s" med pointerlighed i "%B" kan ikke bruges nÃ¥r der oprettes en eksekverbar fil; genkompilÃ©r med -fPIE og genlink med -pie
+%H __tls_get_addr mistede arg, TLS-optimering slÃ¥et fra
+%H arg lost __tls_get_addr, TLS-optimering slÃ¥et fra
+%H: R_FRV_FUNCDESC refererer dynamisk symbol med addend forskellig fra nul
+%H: R_FRV_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nul
+%H: R_FRV_GETTLSOFF ikke anvendt pÃ¥ en call-instruktion
+%H: R_FRV_GETTLSOFF_RELAX ikke anvendt pÃ¥ en calll-instruktion
+%H: R_FRV_GOTTLSDESC12 ikke anvendt pÃ¥ en lddi-instruktion
+%H: R_FRV_GOTTLSDESCHI ikke anvendt pÃ¥ en sethi-instruktion
+%H: R_FRV_GOTTLSDESCLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion
+%H: R_FRV_GOTTLSOFF12 ikke anvendt pÃ¥ en ldi-instruktion
+%H: R_FRV_GOTTLSOFFHI ikke anvendt pÃ¥ en sethi-instruktion
+%H: R_FRV_GOTTLSOFFLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion
+%H: R_FRV_TLSDESC_RELAX ikke anvendt pÃ¥ en ldd-instruktion
+%H: R_FRV_TLSMOFFHI ikke anvendt pÃ¥ en sethi-instruktion
+%H: R_FRV_TLSOFF_RELAX ikke anvendt pÃ¥ en ld-instruktion
+%H: kan ikke udsende dynamiske relokeringer i skrivebeskyttet afsnit
+%H: kan ikke udsende fixup'er i skrivebeskyttet afsnit
+%H: relokering mod "%s" refererer et andet segment
+%H: relokering mod "%s": %s
+%H: relokering refererer til symbol som ikke er defineret i modulet
+%H: relokering til "%s+%v" kan have forÃ¥rsaget ovenstÃ¥ende fejl
 %P%F: --relax og -r kan ikke bruges sammen
+%P%F: kunne ikke oprette ex9.it %s hash-tabel: %E
 %P%X: kan ikke lÃ¦se symboler: %E
+%P%X: skrivebeskyttet segment har dynamiske relokeringer.
+%P: %B: %s understÃ¸ttes ikke for "%T"
+%P: %B: kan ikke oprette stub-indgang %s
+%P: %B: relokeringen %s understÃ¸ttes endnu ikke for symbolet %s
+%P: %B: mÃ¥let (%s) for en %s-relokering er i det forkerte uddataafsnit (%s)
 %P: %B: uventet relokeringstype
+%P: %B: ukendt relokeringstype %d for "%T"
+%P: %B: ukendt relokeringstype %d for symbol %s
+%P: %B: advarsel: relokering mod "%s" i skrivebeskyttet afsnit "%A".
+%P: %B: advarsel: relokering i skrivebeskyttet afsnit "%A".
+%P: %H: %s mod "%T": fejl %d
+%P: %H: %s for indirekte funktion "%T" understÃ¸ttes ikke
+%P: %H: %s refererer til toc-indgang som er optimeret vÃ¦k
+%P: %H: %s-relokering mod "%s": fejl %d
+%P: %H: %s-relokering mod lokalt symbol
+%P: %H: %s bruges med TLS-symbol "%T"
+%P: %H: %s bruges med ikke-TLS-symbol "%T"
+%P: %H: @local-kald til ifunc %s
+%P: %H: kald til "%T" mangler nop, kan ikke gendanne toc; genkompilÃ©r med -fPIC
+%P: %H: fejl: %s mod "%s" ikke et multiplum af %u
+%P: %H: fejl: %s er ikke et multiplum af %u
+%P: %H: addend forskellig fra nul pÃ¥ %s-relokering mod "%s"
+%P: %H: relokering %s for indirekte funktion %s understÃ¸ttes ikke
+%P: %H: toc-optimering understÃ¸ttes ikke for %s-instruktion.
+%P: %H: ulÃ¸selig %s mod "%T"
+%P: %H: ulÃ¸selig %s-relokering mod symbolet "%s"
+%P: %s er ikke defineret i linker-oprettet %s
+%P: %s-forskydning for stor til .eh_frame sdata4-kodning%P: .opd ikke tilladt i ABI-version %d
+%P: DW_EH_PE_datarel ikke angivet for denne arkitektur.
 %P: alternativ ELF-maskinkode fundet (%d) i %B; forventer %d
+%P: bss-plt tvunget af profilering
+%P: bss-plt tvunget pÃ¥ grund af %B
+%P: kan ikke bygge grenstub "%s"
+%P: kan ikke finde grenstub "%s"
+%P: kan ikke finde opd-indgang i toc for "%T"
+%P: kopiering af relokering mod "%T" krÃ¦ver doven plt-lÃ¦nkning; undgÃ¥ at sÃ¦tte LD_BIND_NOW=1 eller opgradÃ©r gcc
+%P: dynreloc-fejloptÃ¦lling for %B, afsnit %A
 %P: fejl i %B(%A); ingen .eh_frame_hdr-tabel vil blive oprettet.
 %P: fde-kodning i %B(%A) forhindrer .eh_frame_hdr-tabel i at blive oprettet.
+%P: linktabelfejl mod "%T"
+%P: afsÃ¦toverlÃ¸b for lang grenstub "%s"
 %P: flere indgangspunkter: i modulerne %B og %B
-%P: relokÃ©rbar lÃ¦nke understÃ¸ttes ikke
+%P: relokÃ©rbart link understÃ¸ttes ikke
+%P: stubbe stemmer ikke overens med beregnet stÃ¸rrelse
+%P: symbolet "%s" har ugyldig st_other for ABI-version 1
 %P: advarsel: opretter en DT_TEXTREL i et delt objekt.
 %X%C: relokering til "%s" refererer et andet segment
-%X%P: overlay-sektion %A starter ikke pÃ¥ en cachelinje.
-%X%P: overlay-sektion %A er stÃ¸rre end en cachelinje.
-%X%P: overlay-sektion %A er ikke i cacheomrÃ¥det.
-%X%P: overlay-sektionerne %A og %A starter ikke pÃ¥ samme adresse.
-%X"%s" refereret i sektion "%A" af %B: defineret i forkastet sektion "%A" af %B
+%X%P: %B(%A): relokeringen "%R" gÃ¥r uden for gyldigt interval
+%X%P: overlay-afsnit %A starter ikke pÃ¥ en cachelinje.
+%X%P: overlay-afsnit %A er stÃ¸rre end en cachelinje.
+%X%P: overlay-afsnit %A er ikke i cacheomrÃ¥det.
+%X%P: overlay-afsnittene %A og %A starter ikke pÃ¥ samme adresse.
+%X"%s" refereret i afsnit "%A" af %B: defineret i forkastet afsnit "%A" af %B
 %s defineret pÃ¥ fjernet toc-post%s duplikeret
 %s er duplikeret i %s
-%s i overlay-sektion%s er ikke defineret i lÃ¦nker-oprettet %s%s(%s): relokering %d har ugyligt symbolindeks %ld%s: %s: relokering giver overlÃ¸b: 0x%lx > 0xffff%s: 0x%v 0x%v
+%s i overlay-afsnit%s(%s): relokering %d har ugyligt symbolindeks %ld%s: %s: relokering giver overlÃ¸b: 0x%lx > 0xffff%s: .rsrc-fletning mislykkedes: beskadiget .rsrc-afsnit%s: 0x%v 0x%v
 %s: Fejlagtig symboldefinition: "Main" er sat til %s i stedet for startadressen %s
 %s: Fejl: flere definitioner af "%s"; begyndelsen pÃ¥ %s er sat i en tidligere lÃ¦nket fil
 %s: GAS-fejl: uventet PTB-instruktion med R_SH_PT_16%s: Intern inkonsistensfejl for vÃ¦rdien for
- lÃ¦nkerallokeret globalt register: lÃ¦nket: 0x%lx%08lx != forenklet: 0x%lx%08lx
-%s: Ugyldig relokeringstype eksporteret: %d%s: LOCAL-direktiv: Register $%ld er ikke et lokalt register. FÃ¸rste globale register er $%ld.%s: Fejlagtig relokering for sektion %s opdaget%s: Ingen kerne til at allokere et %d byte langt symbol
-%s: Ingen kerne til at allokere sektionsnavn %s
-%s: TLS-definition i %B sektion %A stemmer ikke med ikke-TLS-definition i %B sektion %A%s: TLS-definition i %B sektion %A stemmer ikke med ikke-TLS-reference i %B%s: TLS-reference i %B stemmer ikke med ikke-TLS-definition i %B sektion %A%s: TLS-reference i %B stemmer ikke med ikke-TLS-reference i %B%s: TOC-relokering ved 0x%x til symbolet "%s" uden nogen TOC-post%s: MÃ¥let (%s) for en %s-relokering er i forkert sektion (%s)%s: XCOFF delt objekt nÃ¥r ikke XCOFF-uddata produceres%s: __gp dÃ¦kker ikke kort datasegment%s: tilgang ud over slutningen pÃ¥ sammenflettet sektion (%ld)%s: adressen 0x%s er uden for intervallet for heksadecimal Intel-fil%s: base-plus-afstandsrelokering mod registersymbol: %s i %s%s: base-plus-afstandsrelokering mod registersymbol: (ukendt) i %s%s: kan ikke reprÃ¦sentere sektionen "%s" i a.out-objektfilformat%s: kan ikke reprÃ¦sentere sektionen "%s" i oasys%s: kan ikke reprÃ¦sentere sektion for symbolet "%s" i a.out-objektfilformat%s: kan ikke allokere filnavn for fil nummer %d, %d byte
-%s: kan ikke oprette stub-posten %s%s: kan ikke lÃ¦nke fdpic-objektfil ind i en ikke-fdpic-eksekveringsfil%s: kan ikke lÃ¦nke ikke-fdpic-objektfil ind i fdpic-eksekveringsfil%s: oversat som 32-bitsobjekt og %s er 64-bit%s: oversat som 64-bitsobjekt og %s er 32-bit%s: oversat med %s og lÃ¦nket med moduler som oversattes med %s%s: oversat med %s og lÃ¦nket med moduler som bruger ikke-pic-relokering%s: kunne ikke udskrive tilfÃ¸jede .cranges-poster%s: kunne ikke udskrive sorterede cranges-poster%s: LOCAL-direktivet er kun gyldigt med et register eller en absolutvÃ¦rdi%s: dynamisk objekt uden nogen .loader-sektion%s: mÃ¸dte dataetikettesymbol i inddata%s: fejl: ujusteret relokeringstype %d pÃ¥ %08x relokering %08x
-%s: ugyldigt sektionsnavn "%s"%s: intern fejl, den interne registersektion %s havde indhold
+ linkerallokeret globalt register: lÃ¦nket: 0x%lx%08lx != relakseret: 0x%lx%08lx
+%s: Ugyldig relokeringstype eksporteret: %d%s: LOCAL-direktiv: Register $%ld er ikke et lokalt register. FÃ¸rste globale register er $%ld.%s: Fejlagtig relokering for afsnit %s opdaget%s: Ingen kerne til at allokere et %d byte langt symbol
+%s: Ingen kerne til at allokere afsnitsnavn %s
+%s: TLS-definition i %B afsnit %A stemmer ikke med ikke-TLS-definition i %B afsnit %A%s: TLS-definition i %B afsnit %A stemmer ikke med ikke-TLS-reference i %B%s: TLS-reference i %B stemmer ikke med ikke-TLS-definition i %B afsnit %A%s: TLS-reference i %B stemmer ikke med ikke-TLS-reference i %B%s: TOC-relokering ved 0x%x til symbolet "%s" uden nogen TOC-post%s: MÃ¥let (%s) for en %s-relokering er i forkert afsnit (%s)%s: Overgang fra %s til %s som ikke understÃ¸ttes%s: XCOFF delt objekt nÃ¥r ikke XCOFF-uddata produceres%s: __gp dÃ¦kker ikke kort datasegment%s: tilgang ud over slutningen pÃ¥ sammenflettet afsnit (%ld)%s: adressen 0x%s er uden for intervallet for heksadecimal Intel-fil%s: base-plus-afstandsrelokering mod registersymbol: %s i %s%s: base-plus-afstandsrelokering mod registersymbol: (ukendt) i %s%s: kan ikke reprÃ¦sentere afsnittet "%s" i a.out-objektfilformat%s: kan ikke reprÃ¦sentere afsnittet "%s" i oasys%s: kan ikke reprÃ¦sentere afsnit for symbolet "%s" i a.out-objektfilformat%s: kan ikke allokere filnavn for fil nummer %d, %d byte
+%s: kan ikke oprette stub-posten %s%s: kan ikke linke fdpic-objektfil ind i en ikke-fdpic-eksekveringsfil%s: kan ikke linke ikke-fdpic-objektfil ind i fdpic-eksekveringsfil%s: oversat som 32-bitsobjekt og %s er 64-bit%s: oversat som 64-bitsobjekt og %s er 32-bit%s: oversat med %s og linket med moduler som oversattes med %s%s: oversat med %s og linket med moduler som bruger ikke-pic-relokering%s: kunne ikke udskrive tilfÃ¸jede .cranges-poster%s: kunne ikke udskrive sorterede cranges-poster%s: LOCAL-direktivet er kun gyldigt med et register eller en absolutvÃ¦rdi%s: dynamisk objekt uden noget .loader-afsnit%s: mÃ¸dte dataetikettesymbol i inddata%s: fejl: ujusteret relokeringstype %d pÃ¥ %08x relokering %08x
+%s: ugyldigt afsnitsnavn "%s"%s: intern fejl, det interne registerafsnit %s havde indhold
 %s: intern fejl, symboltabellen Ã¦ndrede stÃ¸rrelse fra %d til %d ord
 %s: ugyldig mmo-fil: YZ i lop_end (%ld) er ikke lig med antal af tetraer til den foregÃ¥ende lop_stab (%ld)
 %s: ugyldig mmo-fil: forventede YZ = 1 fik YZ = %d for lop_quote
@@ -825,11 +983,11 @@ ppcboot-hoved:
 %s: ugyldig mmo-fil: lopkode "%d" understÃ¸ttes ikke
 %s: ugyldig startadresse for initierede registre med lÃ¦ngden %ld: 0x%lx%08lx
 %s: ugyldig symboltabel: dubletsymbol "%s"
-%s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff%s: ingen initierede registre; sektionslÃ¦ngde 0
-%s: intet sÃ¥dant symbol%s: ikke implementeret%s: understÃ¸ttes ikke%s: objektstÃ¸rrelsen stemmer ikke overens med den hos mÃ¥let %s%s: registerrelokering mod ikke-registersymbol: %s i %s%s: registerrelokering mod ikke-registersymbol: (ukendt) i %s%s: relokÃ©rbar lÃ¦nke fra %s til %s understÃ¸ttes ikke%s: kort datasegment lÃ¸b over (0x%lx >= 0x400000)%s: strengen er for lang (%d tegn, max 65535)%s: for mange initierede registre; sektionslÃ¦ngde %ld
+%s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff%s: ingen initierede registre; afsnitslÃ¦ngde 0
+%s: intet sÃ¥dant symbol%s: ikke implementeret%s: understÃ¸ttes ikke%s: objektstÃ¸rrelsen stemmer ikke overens med den hos mÃ¥let %s%s: registerrelokering mod ikke-registersymbol: %s i %s%s: registerrelokering mod ikke-registersymbol: (ukendt) i %s%s: relokÃ©rbart link fra %s til %s understÃ¸ttes ikke%s: kort datasegment lÃ¸b over (0x%lx >= 0x400000)%s: strengen er for lang (%d tegn, max 65535)%s: for mange initierede registre; afsnitslÃ¦ngde %ld
 %s: udefineret version: %s%s: ukendt relokeringstype %d%s: ukendt symbol "%s" flag 0x%x%s: relokeringstypen 0x%02x understÃ¸ttes ikke%s: bred tegn-sekvens som ikke understÃ¸ttes 0x%02X 0x%02X efter symbolnavnet som begynder med "%s"
-%s: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%s: bruger andre ukendte e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%s: versionsantal (%ld) stemmer ikke med symbolantal (%ld)%s: advarsel: %s-relokering mod symbol "%s" fra sektionen %s%s: advarsel: %s-relokering til 0x%x fra sektionen %s%s: advarsel: %s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff%s: advarsel: GOT-addendum %ld til "%s" stemmer ikke overens med tidligere GOT-addendum %ld%s: advarsel: PLT-addendum %d til "%s" fra sektionen %s ignoreredes%s: advarsel: ikke tilladt symbolindeks %ld i relokeringerne%s: advarsel: symboltabellen er for stor for mmo, stÃ¸rre end 65535 32-bit ord: %d. Kun "Main" vil blive sendt.
-(ved bitafsÃ¦t %u)
+%s: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%s: bruger andre ukendte e_flags-felter (0x%lx) end tidligere moduler (0x%lx)%s: versionsantal (%ld) stemmer ikke med symbolantal (%ld)%s: advarsel - kernefil afkortet%s: advarsel: %s-relokering mod symbol "%s" fra afsnittet %s%s: advarsel: %s-relokering til 0x%x fra afsnittet %s%s: advarsel: %s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff%s: advarsel: GOT-addendum %ld til "%s" stemmer ikke overens med tidligere GOT-addendum %ld%s: advarsel: PLT-addendum %d til "%s" fra afsnittet %s ignoreredes%s: advarsel: kan ikke udbyde R_NDS32_25_ABS_RELA i delt tilstand.%s: advarsel: ikke tilladt symbolindeks %ld i relokeringerne%s: advarsel: symboltabellen er for stor for mmo, stÃ¸rre end 65535 32-bit ord: %d. Kun "Main" vil blive sendt.
+%s: advarsel: ikke-justeret lille dataadgang. For indgang: {%d, %d, %d}, adr = 0x%x, justering = 0x%x.(ved bitafsÃ¦t %u)
 (deskriptor)
 (ingen vÃ¦rdi)
 (ikke aktiv)
@@ -837,45 +995,50 @@ ppcboot-hoved:
 (reg: %u, disp: %u, indir: %u, type: (trÃ¥dlokale data er for store til -fpic eller -msmall-tls: genkompilÃ©r med -fPIC eller -mno-small-tls)(for mange globale variable til -fpic: genkompilÃ©r med -fPIC)(afsluttende vÃ¦rdi)
 (vÃ¦rdi-spec fÃ¸lger)
 )
-*uhÃ¥ndteret*
+*** kontrollÃ©r denne relokering %s*uhÃ¥ndteret*
 *uhÃ¥ndteret dst-type %u
-*ukendt**ukendt*         , alias: %u
+*ukendt**ukendt*         , 8-byte datajustering, vÃ¦rdi: %#08lx
+, alias: %u
 , ext-fixup-afsÃ¦t: %u, no_opt psect slÃ¥et fra: %u, undertype: %u (%s)
-, symbolvektor-rva: .got-sektionen fÃ¸lger ikke umiddelbart efter .plt-sektion32-bit double, 32-bit gp-relativ relokering forekommer for et eksternt symbol64 bit *uhÃ¥ndteret*
+, symbolvektor-rva: - %s er G10, %s er ikke.got-afsnittet fÃ¸lger ikke umiddelbart efter .plt-afsnit.rsrc-fletning mislykkedes: et katalog matcher et blad.rsrc-fletning mislykkedes: forskellige katalogversioner
+.rsrc-fletning mislykkedes: kataloger med forskellige egenskaber
+.rsrc-fletning mislykkedes: gentaget blad.rsrc-fletning mislykkedes: gentaget blad: %s.rsrc-fletning mislykkedes: gentaget strengressource: %d.rsrc-fletning mislykkedes: flere ikke-standard-manifester32-bit double, 32-bit gp-relativ relokering forekommer for et eksternt symbol64 bit *uhÃ¥ndteret*
 64-bit double, : %u.%u
-: m32r-instruktioner: m32r2-instruktioner: m32rx-instruktioner; genkompilÃ©r med -fPIC<Ukendte flagbit er sat><ukendt>@pltoff-relokering mod lokalt symbolArkivet har intet indeks; kÃ¸r ranlib til at tilfÃ¸je Ã©tArkivobjektfil er i forkert formatForsÃ¸g pÃ¥ at konvertere L32R/CALLX til CALL mislykkedesForsÃ¸g at lave en relokÃ©rbar lÃ¦nke med %s-inddata og %s-uddataBASE_IMAGE       BFD %s-forsikring mislykkedes %s:%dInternt BFD %s-fejl, afbryder ved %s linje %d
+: m32r-instruktioner: m32r2-instruktioner: m32rx-instruktioner: n1-instruktioner: n1h-instruktioner; genkompilÃ©r med -fPIC<Ukendte flagbit er sat><beskadiget strenglÃ¦ngde: %#x><beskadiget strengforskydning: %#lx><ukendt>@pltoff-relokering mod lokalt symbolArkivet har intet indeks; kÃ¸r ranlib til at tilfÃ¸je Ã©tArkivobjektfil er i forkert formatForsÃ¸g pÃ¥ at konvertere L32R/CALLX til CALL mislykkedesForsÃ¸g at lave en relokÃ©rbart link med %s-inddata og %s-uddataBASE_IMAGE       BFD %s-forsikring mislykkedes %s:%dInternt BFD %s-fejl, afbryder ved %s linje %d
 Intern BFD %s-fejl, afbryder ved %s linje %d i %s
-Fejlagtigt vÃ¦rdiBaserelokeringskatalog [.reloc]Katalog over bundne importerGrÃ¦nser:
+BFD-linkfejl: gren (PC rel16) til afsnit (%s) ikke understÃ¸ttetBFD-linkfejl: hop (PC rel26) til afsnit (%s) ikke understÃ¸ttetFejlagtigt vÃ¦rdiBaserelokeringskatalog [.reloc]Katalog over bundne importerGrÃ¦nser:
 CLICLR-runtime-headerCLUSTERS_LOCKMGR COUNTERS         CPU              CTL_AUGRB (sammensÃ¦t (augment) relokeringsbase) %u
 CTL_DFLOC (defineÅ• placering)
 CTL_SETRB (sÃ¦t relokeringsbase)
 CTL_STKDL (stakdefineret placering)
 CTL_STLOC (indstil placering)
 Ophavsretsheader
-Uoverensstemmelse i DIV-forbrug mellem %B og %BDST__K_BEG_STMT_MODE er ikke implementeretDST__K_END_STMT_MODE er ikke implementeretDST__K_RESET_LINUM_INCR ikke implementeretDST__K_SET_LINUM_INCR er ikke implementeretDST__K_SET_LINUM_INCR_W er ikke implementeretDST__K_SET_PC er ikke implementeretDST__K_SET_PC_L er ikke implementeretDST__K_SET_PC_W er ikke implementeretDST__K_SET_STMTNUM er ikke implementeretFejlsÃ¸gningskatalogFejlsÃ¸gningsmodultabel:
+Beskadiget .rsrc-afsnit fundet!
+DSO mangler i kommandolinjeDST__K_BEG_STMT_MODE er ikke implementeretDST__K_END_STMT_MODE er ikke implementeretDST__K_RESET_LINUM_INCR ikke implementeretDST__K_SET_LINUM_INCR er ikke implementeretDST__K_SET_LINUM_INCR_W er ikke implementeretDST__K_SET_PC er ikke implementeretDST__K_SET_PC_L er ikke implementeretDST__K_SET_PC_W er ikke implementeretDST__K_SET_STMTNUM er ikke implementeretFejlsÃ¸gningskatalogFejlsÃ¸gningsmodultabel:
 FejlsÃ¸gningssymboltabel:
 Katalog over forskinkede importerForÃ¦ldet %s kaldt
 ForÃ¦ldet %s kaldt ved %s linje %d i %s
-BeskrivelseskatalogDwarf-fejl: Fejlagtigt forkortelsesnummer: %u.Dwarf-fejl: Kan ikke finde %s-sektion.Dwarf-fejl: Kunne ikke finde forkortelsesnumret %u.Dwarf-fejl: Ugyldigt maksimalt antal operationer per instruktion.Dwarf-fejl: Ugyldig eller ubehandlet FORM-vÃ¦rdi: %u.Dwarf-fejl: AfsÃ¦t (%lu) stÃ¸rre end eller lig med %s-stÃ¸rrelse (%lu).Dwarf-fejl: UhÃ¥ndteret .debug_line-version %d.Dwarf-fejl: fandt adressestÃ¸rrelsen "%u", denne lÃ¦ser kan ikke hÃ¥ndtere stÃ¸rrelser stÃ¸rre end "%u".Dwarf-fejl: fandt dwarf version "%u", men denne lÃ¦ser kan kun hÃ¥ndtere information fra version 2, 3 og 4.Dwarf-fejl: vanskabt linjenummerssektion (fejlagtigt filnummer).Dwarf-fejl: vanskabt linjenummerssektion.EIHD: (stÃ¸rrelse: %u, bloktal: %u)
+BeskrivelseskatalogDwarf-fejl: Fejlagtigt forkortelsesnummer: %u.Dwarf-fejl: Kan ikke finde %s-afsnit.Dwarf-fejl: Kunne ikke finde forkortelsesnumret %u.Dwarf-fejl: Ugyldigt maksimalt antal operationer per instruktion.Dwarf-fejl: Ugyldig eller ubehandlet FORM-vÃ¦rdi: %#x.Dwarf-fejl: AfsÃ¦t (%lu) stÃ¸rre end eller lig med %s-stÃ¸rrelse (%lu).Dwarf-fejl: Kan ikke lÃ¦se alt ref %u.Dwarf-fejl: UhÃ¥ndteret .debug_line-version %d.Dwarf-fejl: fandt adressestÃ¸rrelsen "%u", denne lÃ¦ser kan ikke hÃ¥ndtere stÃ¸rrelser stÃ¸rre end "%u".Dwarf-fejl: fandt dwarf version "%u", men denne lÃ¦ser kan kun hÃ¥ndtere information fra version 2, 3 og 4.Dwarf-fejl: vanskabt linjenummerafsnit (fejlagtigt filnummer).Dwarf-fejl: vanskabt linjenummerafsnit.EIHD: (stÃ¸rrelse: %u, bloktal: %u)
 Startafstand        = 0x%.8lx (%ld)
 Fejl ved lÃ¦sning af %s: %sFejl: %B har bÃ¥de nuvÃ¦rende og Ã¦ldre Tag_MPextension_use-attributterStÃ¸dte pÃ¥ fejl ved behandling af filen %sUndtagelseskatalog [.pdata]Eksportkatalog [.edata (eller hvor vi fandt det)]Eksportflag 			%lx
-Eksport-RVAMISLYKKEDES med at finde tidligere HI16-relokering
-FILES_VOLUMES    Filformatet er flertydigtFilformatet ikke genkendtFilen er i forkert formatFilen er for storFilen trunkeretFlagfelt            = 0x%.2x
+Eksport-RVAKUNNE IKKE finde tidligere HI16-relokeringFILES_VOLUMES    Filformatet er flertydigtFilformatet ikke genkendtFilen er i forkert formatFilen er for storFilen trunkeretFlagfelt            = 0x%.2x
 Videresender-RVAGALAXY           GP-relativ relokering bruges nÃ¥r GP ikke er defineretGP-relativ relokering nÃ¥r _gp ikke var defineretGPDISP-relokering fandt ingen ldah- og lda-instruktionerGlobal symboltabel:
-IDC - identitetskonsistenstjek
-IMAGE_ACTIVATOR  IO               Aftryksaktivering:  (stÃ¸rrelse=%u)
+ID: %#08lxIDC - identitetskonsistenstjek
+IMAGE_ACTIVATOR  INPUT_SECTION_FLAGS understÃ¸ttes ikke.
+IO               Aftryksaktivering:  (stÃ¸rrelse=%u)
 Fixup til aftryksaktivator: (hoved: %u, under: %u)
 Aftryksidentifikation: (hoved: %u, under: %u)
-Aftrykssektionsdeskriptor: (hoved: %u, under: %u, stÃ¸rrelse: %u, afsÃ¦t: %u)
+Aftryksafsnitsdeskriptor: (hoved: %u, under: %u, stÃ¸rrelse: %u, afsÃ¦t: %u)
 Aftrykssymbol- og fejlsÃ¸gningstabel: (hoved: %u, under: %u)
 ImportadressetabelkatalogImportkatalog [dele af .idata]Intern inkonsekvens: genstÃ¥ende %u != max %u.
-  RapportÃ©r gerne denne fejl.Ugyldig TARGET2-relokeringstype "%s".Ugyldigt bfd-mÃ¥lUgyldig handlingFejlagtigt sektionsindeks i ETIRLOGICAL_NAMES    Navn pÃ¥ sprogprocessor
+  RapportÃ©r gerne denne fejl.Ugyldig TARGET2-relokeringstype "%s".Ugyldigt bfd-mÃ¥lUgyldig handlingFejlagtigt afsnitsindeks i ETIRJALX til en adresse som ikke er justeret til et wordLOGICAL_NAMES    Navn pÃ¥ sprogprocessor
 LÃ¦ngde              = 0x%.8lx (%ld)
-IndlÃ¦sningskonfigurationskatalogMEMORY_MANAGEMENTMISC             MULTI_PROCESSING Mach-O-header:
-StÃ¸rre/mindre 			%d/%d
+Linker: kan klargÃ¸re ex9-hashtabel; fejl
+Linker: fejl; kan ikke fikse ex9-relokering
+IndlÃ¦sningskonfigurationskatalogMEMORY_MANAGEMENTMIPS16 og microMIPS-funktioner kan ikke kalde hinandenMISC             MULTI_PROCESSING StÃ¸rre/mindre 			%d/%d
 Forvansket arkivMaksimum pÃ¥krÃ¦vet stak er 0x%v
-Hukommelsen er opbrugtModulheader
-NETWORKS         NORMALNavn 				Ingen fejlIkke flere arkiverede filerIngen symbolerIkkereprÃ¦senterbar sektion i uddataIkke nok hukommelse til at sortere relokeringerTal i:
+MeP: howto %d har typen %dHukommelsen er opbrugtModulheader
+NETWORKS         NORMALNavn 				Ingen fejlIkke flere arkiverede filerIngen symbolerIkkereprÃ¦senterbart afsnit i uddataIkke nok hukommelse til at sortere relokeringerTal i:
 OPR_ADD (lÃ¦g sammen)
 OPR_AND (logisk og)
 OPR_ASH (aritmetisk skift)
@@ -897,15 +1060,15 @@ ppcboot-hoved:
 Ordningsbase 			%ld
 Uddatafilen krÃ¦ver delt bibliotek "%s"
 Uddatafilen krÃ¦ver delt bibliotek "%s.so.%s"
-POSIX            PROCESS_SCHED    PRVFXDPRVPICPSC - Programsektionsdefinition
+POSIX            PROCESS_SCHED    PRVFXDPRVPICPSC - Programafsnitsdefinition
 PTA passer ikke: en SHcompact-adresse (bit 0 == 0)PTB passer ikke: en SHmedia-adresse (bit 0 == 1)Partitionsnavn      = "%s"
 Slut pÃ¥ partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
 LÃ¦ngde pÃ¥ partition[%d] = 0x%.8lx (%ld)
 Sektor for partition[%d] = 0x%.8lx (%ld)
 RapportÃ©r gerne denne fejl.
-R_BFIN_FUNCDESC refererer til dynamisk symbol med addend forskellig fra nulR_BFIN_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nulR_FRV_FUNCDESC refererer dynamisk symbol med addend forskellig fra nulR_FRV_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nulR_FRV_GETTLSOFF ikke anvendt til call-instruktionR_FRV_GETTLSOFF_RELAX ikke anvendt til en calll-instruktionR_FRV_GOTTLSDESC12 ikke anvendt til en lddi-instruktionR_FRV_GOTTLSDESCHI ikke anvendt til en sethi-instruktionR_FRV_GOTTLSDESCLO ikke anvendt til en setlo- eller setlos-instruktionR_FRV_GOTTLSOFF12 ikke anvendt til en ldi-instruktionR_FRV_GOTTLSOFFHI ikke anvendt til en sethi-instruktionR_FRV_GOTTLSOFFLO ikke anvendt til en setlos-instruktionR_FRV_TLSDESC_RELAX ikke anvendt til en ldd-instruktionR_FRV_TLSMOFFHI ikke anvendt til en sethi-instruktionR_FRV_TLSMOFFLO ikke anvendt til en setlos-instruktionR_FRV_TLSOFF_RELAX ikke anvendt til en ld-instruktionLÃ¦ser arkivfilens Ã¦ndringstidsstempelReference til fjernsymbol "%s", der bruger en forkert relokering, kan resultere i forkert udfÃ¸relseRegister %%g%d bruges inkompatibelt: %s i %B, tidligere %s i %BRegistersektion har indhold
-Relokeringen "%s" er endnu ikke implementeret
-Fjerner ubrugt sektion "%s" i filen "%B"ReserveretResursekatalog [.rsrc]SDA-relokering nÃ¥r _SDA_BASE_ ikke er defineretSECURITY         SEC_RELOC uden relokeringer i sektion %sSHELL            SHRFXDSHRPICSPSC - Shared Image Program-sektionsdefinition
+RL78/G10 ABI-konflikt: kan ikke linke G10- og ikke-G10-objekter sammenR_BFIN_FUNCDESC refererer til dynamisk symbol med addend forskellig fra nulR_BFIN_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nulR_FRV_TLSMOFFLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion
+LÃ¦ser arkivfilens Ã¦ndringstidsstempelReference til fjernsymbol "%s", der bruger en forkert relokering, kan resultere i forkert udfÃ¸relseRegister %%g%d bruges inkompatibelt: %s i %B, tidligere %s i %BRegisterafsnit har indhold
+Relokering til ikke-REL-psectFjerner ubrugt afsnit "%s" i filen "%B"ReserveretResursekatalog [.rsrc]S12-adresse (%lx) ligger ikke i delt RAM(0x2000-0x4000), og derfor bliver du nÃ¸dt til manuelt at forskyde adressen i din kodeSDA-relokering nÃ¥r _SDA_BASE_ ikke er defineretSECURITY         SEC_RELOC uden relokeringer i afsnit %sSH-fejl: ukendt relokeringstype %dSHELL            SHRFXDSHRPICSPSC - Shared Image Program-afsnitsdefinition
 STABLE           STA_CKARG (argument til sammenligningsprocedure)
 STA_GBL (stak-global) %.*s
 STA_LI (stak-literal)
@@ -921,8 +1084,8 @@ ppcboot-hoved:
 STC_GCA (gem cond-kodeadresse)
 STC_LDA_GBL (gem cond LDA pÃ¥ global adresse)
 STC_LDA_PS (gem cond LDA pÃ¥ psect + afsÃ¦t)
-STC_LP (gem cond-lÃ¦nkningspar)
-STC_LP_PSB (gem cond-lÃ¦nkningspar + signatur)
+STC_LP (gem cond-linkingpar)
+STC_LP_PSB (gem cond-linkingpar + signatur)
 STC_NBH_GBL (gem cond eller hint pÃ¥ global adresse)
 STC_NBH_PS (gem cond eller hint pÃ¥ psect + afsÃ¦t)
 STC_NOP_GBL (gem cond NOP pÃ¥ global adresse)
@@ -948,27 +1111,27 @@ ppcboot-hoved:
 SYMG - Universel symboldefinition
 SYMM - Global symboldefinition med version
 SYMV - vektoriseret symboldefinition
-SYSGEN           Sektionen har intet indholdSikkerhedskatalogSegmenter og sektioner:
-StÃ¸rrelsesfejl i sektion %sKildefilheader
+SYSGEN           Afsnittet har intet indholdSikkerhedskatalogStÃ¸rrelsesfejl i afsnit %sKildefilheader
 SpecialkatalogUÃ¦gte ALPHA_R_BSD-relokeringStak-analyse vil ignorere kaldet fra %s til %s
 Stakken giver overlÃ¸b (%d) i _bfd_vms_pushStakstÃ¸rrelsen for rodknuder i funktionskaldsgrafen.
 Stakken giver underlÃ¸b i _bfd_vms_popTrinstÃ¸rrelser:
 Symbol %s er ikke defineret for rettelser
-Symbol %s erstattet med %s
-Symbolet "%s" har forskellige typer: %s i %B, tidligere REGISTER i %BSymbolet "%s" har forskellige typer: REGISTER i %B, tidligere %s i %BSymbolet krÃ¦ver fejlsÃ¸gningssektion som ikke eksistererSystemkaldsfejlTLS-relokering er ugyldig uden dynamiske sektionerTOC giver overlÃ¸b: 0x%lx > 0x10000; prÃ¸v -mminimal-toc ved oversÃ¦ttelseTabeladresser
+Symbolet "%s" har forskellige typer: %s i %B, tidligere REGISTER i %BSymbolet "%s" har forskellige typer: REGISTER i %B, tidligere %s i %BSymbolet krÃ¦ver fejlsÃ¸gningsafsnit som ikke eksistererSystemkaldsfejlTLS-relokering er ugyldig uden dynamiske afsnitTOC giver overlÃ¸b: 0x%lx > 0x10000; prÃ¸v -mminimal-toc ved oversÃ¦ttelseTabeladresser
 TrÃ¥dlagringskatalog [.tls]Tids-/datostempel 		%lx
 Titeltekstheader
-USRSTACKKunne ikke finde Ã¦kvivalent uddatasektion for symbolet "%s" fra sektionen "%s"Uventet STO_SH5_ISA32 pÃ¥ lokalt symbol hÃ¥ndteres ikkeUventet maskinnummerUhÃ¥ndteret sektionstype %d for OSF/1-hukommelsesfil
-UhÃ¥ndteret relokering %sUkendt EGSD-undertype %dUkendt grundtype %dUkendt relokering %sUkendt relokering %s + %sUgyldigt symbol i kommando %sUkendt TI COFF-mÃ¥l-id "0x%x"Ukendt relokeringUkendt relokeringstype 0x%x.stab-relokering som ikke understÃ¸ttesBruger bss-plt pÃ¥ grund af %BVOLATILE         Variabel "%s" kan kun vÃ¦re i Ã©t af de smÃ¥, tomme og bittesmÃ¥ dataomrÃ¥derVariabel "%s" kan ikke vÃ¦re i bÃ¥de smÃ¥ og bittesmÃ¥ dataomrÃ¥der samtidigtVariabel "%s" kan ikke vÃ¦re i bÃ¥de smÃ¥ og tomme dataomrÃ¥der samtidigtVariabel "%s" kan ikke vÃ¦re i bÃ¥de tomme og bittesmÃ¥ dataomrÃ¥der samtidigtVariabel "%s" kan ikke befinde sig i flere smÃ¥ dataomrÃ¥derAdvarsel, stÃ¸rrelsen pÃ¥ .pdata-sektionen (%ld) er ikke en multipel af %d
-Advarsel: %B understÃ¸tter ikke samvirken (interworking), mens %B gÃ¸r detAdvarsel: %B er afkortet: forventede kernefilstÃ¸rrelse >= %lu, fandt: %lu.Advarsel: %B understÃ¸tter samvirken (interworking), mens %B ikke gÃ¸r detAdvarsel: %B bruger -mdouble-float, %B bruger -mips32r2 -mfp64Advarsel: %B bruger -msingle-float, %B bruger -mdouble-floatAdvarsel: %B bruger -msingle-float, %B bruger -mips32r2 -mfp64Advarsel: %B bruger dobbeltprÃ¦cisions-float i hardware, mens %B bruger enkeltprÃ¦cisions-float i hardwareAdvarsel: %B bruger flydende tal i hardware, %B bruger flydende tal i softwareAdvarsel: %B bruger r3/r4 til smÃ¥ struktur-returneringer, mens %B bruger hukommelsenAdvarsel: %B bruger software-float, mens %B bruger enkeltprÃ¦cisions-float i hardwareAdvarsel: %B bruger ukendt ABI %d til flydende talAdvarsel: %B bruger ukendt returkonvention %d for smÃ¥strukturerAdvarsel: %B bruger ukendt vektor-ABI %dAdvarsel: %B bruger vektor-ABI "%s", mens %B bruger "%s"Advarsel: %B: Modstridende platformkonfigurationAdvarsel: %B: Ukendt EABI-objekt-attribut %dAdvarsel: Fjerner samvirkendeflaget (interworking) i %B eftersom ikke-samvirkende kode i %B er lÃ¦nket med detAdvarsel: Fjerner samvirkeflaget (interworking) for %B pÃ¥ grund af anmodning udefraAdvarsel: SÃ¦tter ikke samvirkeflaget (interworking) for %B, da den allerede er angivet som ikke-samvirkendeAdvarsel: RX_SYM-relokering med et ukendt symbolAdvarsel: Skrivning af sektionen "%s" til enorm (dvs negativ) afsÃ¦tsbyte 0x%lx.Advarsel: justering %u af fÃ¦lles symbol "%s" i %B er stÃ¸rre end justeringen (%u) af dets sektion %AAdvarsel: justeringen %u pÃ¥ symbolet "%s" i %B er mindre end %u i %BAdvarsel: antal rettelser stemmer ikke
+PrÃ¸v at slÃ¥ relaksering til for at undgÃ¥ relokeringsafkortningUSRSTACKKunne ikke finde Ã¦kvivalent uddataafsnit for symbolet "%s" fra afsnittet "%s"Kan ikke nÃ¥ %s (ved 0x%08x) fra den globale pointer (ved 0x%08x) fordi forskydningen (%d) er uden for det tilladte interval -32678 til 32767.
+Uventet STO_SH5_ISA32 pÃ¥ lokalt symbol hÃ¥ndteres ikkeUventet maskinnummerUhÃ¥ndteret afsnitstype %d for OSF/1-hukommelsesfil
+UhÃ¥ndteret relokering %sUkendt EGSD-undertype %dUkendt grundtype %dUkendt relokering %sUkendt relokering %s + %sUgyldigt symbol i kommando %sUkendt INPUT_SECTION_FLAG %s
+Ukendt TI COFF-mÃ¥l-id "0x%x"Ukendt relokeringUkendt relokeringstype 0x%x.stab-relokering som ikke understÃ¸ttesVOLATILE         Variabel "%s" kan kun vÃ¦re i Ã©t af de smÃ¥, tomme og bittesmÃ¥ dataomrÃ¥derVariabel "%s" kan ikke vÃ¦re i bÃ¥de smÃ¥ og bittesmÃ¥ dataomrÃ¥der samtidigtVariabel "%s" kan ikke vÃ¦re i bÃ¥de smÃ¥ og tomme dataomrÃ¥der samtidigtVariabel "%s" kan ikke vÃ¦re i bÃ¥de tomme og bittesmÃ¥ dataomrÃ¥der samtidigtVariabel "%s" kan ikke befinde sig i flere smÃ¥ dataomrÃ¥derAdvarsel, stÃ¸rrelsen pÃ¥ .pdata-afsnittet (%ld) er ikke en multipel af %d
+Advarsel: %B understÃ¸tter ikke samvirken (interworking), mens %B gÃ¸r detAdvarsel: %B er afkortet: forventede kernefilstÃ¸rrelse >= %lu, fandt: %lu.Advarsel: %B understÃ¸tter samvirken (interworking), mens %B ikke gÃ¸r detAdvarsel: %B bruger %s (givet af %B), mens %B bruger %sAdvarsel: %B bruger %s (givet af %B), mens %B bruger ukendt MSA-ABI %dAdvarsel: %B bruger %s (givet af %B), mens %B bruger ukendt ABI %d til flydende talAdvarsel: %B bruger dobbeltprÃ¦cisions-float i hardware, mens %B bruger enkeltprÃ¦cisions-float i hardwareAdvarsel: %B bruger flydende tal i hardware, %B bruger flydende tal i softwareAdvarsel: %B bruger r3/r4 til smÃ¥ struktur-returneringer, mens %B bruger hukommelsenAdvarsel: %B bruger software-float, mens %B bruger enkeltprÃ¦cisions-float i hardwareAdvarsel: %B bruger ukendt MSA-ABI %d (givet af %B), mens %B bruger %sAdvarsel: %B bruger ukendt MSA-ABI %d (givet af %B), mens %B bruger ukendt MSA-ABI %dAdvarsel: %B bruger ukendt ABI %d til flydende talAdvarsel: %B bruger ukendt ABI %d til flydende tal (givet af %B), mens %B bruger %sAdvarsel: %B bruger ukendt ABI %d til flydende tal (givet af %B), mens %B bruger ukendt ABI %d til flydende talAdvarsel: %B bruger ukendt returkonvention %d for smÃ¥strukturerAdvarsel: %B bruger ukendt vektor-ABI %dAdvarsel: %B bruger vektor-ABI "%s", mens %B bruger "%s"Advarsel: %B: Modstridende platformkonfigurationAdvarsel: %B: Ukendt EABI-objektattribut %dAdvarsel: %B: Ukendt MSPABI-objektattribut %dAdvarsel: Fjerner samvirkendeflaget (interworking) i %B eftersom ikke-samvirkende kode i %B er linket med detAdvarsel: Fjerner samvirkeflaget (interworking) for %B pÃ¥ grund af anmodning udefraAdvarsel: SÃ¦tter ikke samvirkeflaget (interworking) for %B, da den allerede er angivet som ikke-samvirkendeAdvarsel: RL78_SYM-relokering med et ukendt symbolAdvarsel: RX_SYM-relokering med et ukendt symbolAdvarsel: Skrivning af afsnittet "%s" til enorm (dvs negativ) afsÃ¦tsbyte 0x%lx.Advarsel: justering %u af fÃ¦lles symbol "%s" i %B er stÃ¸rre end justeringen (%u) af dets afsnit %AAdvarsel: justeringen %u pÃ¥ symbolet "%s" i %B er mindre end %u i %BAdvarsel: antal rettelser stemmer ikke
 Advarsel: gc-sections-tilvalg ignoreretAdvarsel: stÃ¸rrelsen pÃ¥ symbol "%s" Ã¦ndredes fra %lu i %B til %lu i %BAdvarsel: typen pÃ¥ symbol "%s" Ã¦ndredes fra %d til %d i %BAdvarsel: arkivskrivning var langsom: genskriver tidsstempel
-Skriver opdateret armap-tidsstempel[%u]: %u
+Skriver opdateret armap-tidsstempelXGATE-adresse (%lx) ligger ikke i delt RAM(0xE000-0xFFFF), og du bliver derfor nÃ¸dt til manuelt at forskyde adressen, og mÃ¥ske hÃ¥ndtere siden, i din kode.[%u]: %u
 [%u]: Nedre: %u, Ã¸vre: %u
 [abi=16-bit int, [abi=32-bit int, [hvis navn er tabt]\%B: Advarsel: Arm BLX-instruktion bruger Arm-funktionen "%s" som mÃ¥l._bfd_vms_output_counted  kaldt med for mange byte_bfd_vms_output_counted kaldt med nul byteadresseadresse er ikke justeret til word-positionarsize: %u, a0: 0x%08x
-fejlagtigt sektionsindeks i %sbankadresse [%lx:%04lx] (%lx) er ikke i samme bank som nuvÃ¦rende bankadresse [%lx:%04lx] (%lx)base: %u, pos: %u
-blkbeg: adresse: 0x%08x, navn: %.*s
+fejlagtigt afsnitsindeks i %sbankadresse [%lx:%04lx] (%lx) er ikke i samme bank som nuvÃ¦rende bankadresse [%lx:%04lx] (%lx)base: %u, pos: %u
+bfd_mach_o_canonicalize_symtab: kan ikke indlÃ¦se symbolerbfd_mach_o_read_symtab_symbol: navn uden for gyldigt interval (%lu >= %lu)bfd_mach_o_read_symtab_symbol: symbolet "%s" angav ugyldigt afsnit %d (maks %lu): sÃ¦tter til udefineretbfd_mach_o_read_symtab_symbol: symbolet "%s" angav ugyldigt typefelt 0x%x: sÃ¦tter til udefineretbfd_mach_o_read_symtab_symbol: kan ikke lÃ¦se %d byte ved %lubfd_mach_o_read_symtab_symbols: kan ikke tildele hukommelse til symbolerbfd_mach_o_scan: ukendt arkitektur 0x%lx/0x%lxbfd_pef_scan: ukendt arkitektur 0x%lxblkbeg: adresse: 0x%08x, navn: %.*s
 blkend: stÃ¸rrelse: 0x%08x
-kan ikke bygge grenstub "%s"kan ikke finde grenstub "%s"kan ikke udsende dynamiske relokeringer i skrivebeskyttet sektionkan ikke udsende fixup'er i skrivebeskyttet sektion %skan ikke finde EMH i fÃ¸rste GST-post
+kan ikke udsende dynamiske relokeringer i skrivebeskyttet afsnitkan ikke udsende fixup'er i skrivebeskyttet afsnitkan ikke finde EMH i fÃ¸rste GST-post
 kan ikke hÃ¥ndtere R_MEM_INDIRECT-relokering ved brug af %s-uddatakan ikke lÃ¦se DMT
 kan ikke lÃ¦se DMT-header
 kan ikke lÃ¦se DMT-psect
@@ -987,34 +1150,41 @@ ppcboot-hoved:
 kan ikke lÃ¦se GST-post-header
 kan ikke lÃ¦se GST-post-lÃ¦ngde
 klasse: %u, dtype: %u, lÃ¦ngde: %u, pointer: 0x%08x
-kopiering af relokering mod "%s" krÃ¦ver forsinket plt-lÃ¦nkning; undgÃ¥ at sÃ¦tte LD_BIND_NOW=1 eller opgradÃ©r gccbeskadiget %s-sektion i %Bkunne ikke lokalisere specielt lÃ¦nkersymbol __ctbpkunne ikke lokalisere specielt lÃ¦nkersymbol __epkunne ikke lokalisere specielt lÃ¦nkersymbol __gpkunne ikke Ã¥bne delt aftryk "%s" fra "%s"cpu=HC11]cpu=HC12]cpu=HCS12]farlig relokeringdelta pc +%-4ddelta_pc_l: +0x%08x
+beskadiget %s-afsnit i %Bkunne ikke lokalisere specielt linkersymbol __ctbpkunne ikke lokalisere specielt linkersymbol __epkunne ikke lokalisere specielt linkersymbol __gpkunne ikke Ã¥bne delt aftryk "%s" fra "%s"cpu=HC11]cpu=HC12]cpu=HCS12]cpu=XGATE]farlig relokeringdelta pc +%-4ddelta_pc_l: +0x%08x
 delta_pc_w %u
 beskrdimct: %u, aflags: 0x%02x, cifre: %u, skala: %u
-forkastet uddatasektion: "%A"usammenhÃ¦ngende interval (nbr: %u)
-dynamisk relokering i skrivebeskyttet sektiondynamisk variabel "%s" har stÃ¸rrelse nuldynreloc-fejloptÃ¦lling for %B, sektion %Aenumbeg, lÃ¦ngde: %u, navn: %.*s
+forkastet uddataafsnit: "%A"usammenhÃ¦ngende interval (nbr: %u)
+dynamisk relokering i skrivebeskyttet afsnitdynamisk variabel "%s" har stÃ¸rrelse nulenumbeg, lÃ¦ngde: %u, navn: %.*s
 enumelt, navn: %.*s
 enumend
 epilog: flag: %u, antal: %u
-fejl: %B indeholder en relokering (0x%s) til sektionen %A, som refererer et ikke-eksisterende global symbolfejl: %B bruger ikke Maverick-instruktioner, men %B gÃ¸rfejl: %B er allerede i endeligt BE8-formatfejl: %B er kompileret som kode med absolut position, mens mÃ¥let %B er positionsuafhÃ¦ngigtfejl: %s er kompileret som positionsuafhÃ¦ngig kode, mens mÃ¥let %B har absolut positionfejl: %B er kompileret til APCS-%d, mens %B er kompileret til APCS-%dfejl: %B er kompileret til APCS-%d, mens mÃ¥let %B bruger APCS-%dfejl: %B kompileret til EP9312, mens %B er kompileret til XScalefejl: %B overfÃ¸rer flydende tal i flydendetalsregistre, mens %B overfÃ¸rer dem i heltalsregistrefejl: %B overfÃ¸rer flydende tal i heltalsregistre, mens %B overfÃ¸rer dem i flydendetalsregistrefejl: %B krÃ¦ver mere array-justering end %B prÃ¦servererfejl: %B krÃ¦ver mere stakjustering end %B prÃ¦servererfejl: %B bruger FPA-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger Maverick-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger VFP-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger VFP-registerargumenter, mens %B ikke gÃ¸rfejl: %B bruger flydende tal i hardware, mens %B bruger softwarefejl: %B bruger iWMMXt-registerargumenter, mens %B ikke gÃ¸rfejl: %B bruger flydende tal i software, mens %B bruger hardwarefejl: %B: Modstridende CPU-arkitekturer %d/%dfejl: %B: Modstridende arkitekturprofiler %c/%cfejl: %B: Modstridende brug af R9fejl: %B: Objekt har leverandÃ¸rspecifikt indhold, som skal behandles med  '%s'-vÃ¦rktÃ¸jernefejl: %B: ObjektmÃ¦rke "%d, %d" er ikke kompatibelt med mÃ¦rket "%d, %s"fejl: %B: SB-relativ adressering strider med brugen af R9Fejl: %B: Ukendt CPU-arkitekturfejl: %B: kan ikke sammenfÃ¸je virtualiseringsattributter med %Bfejl: Kildeobjektet %B har EABI-version %d, men mÃ¥let %B har EABI-version %dfejl: uoverensstemmelse i fp16-format mellem %B og %Bfejl: upassende relokeringstype til delt bibliotek (glemte du -fpic?)fejl: udefineret symbol __rtiniterror: ukendt vÃ¦rdi for Tag_ABI_array_object_align_expected i %Bfejl: ukendt vÃ¦rdi for Tag_ABI_array_object_alignment i %Beksekverbar filkunne ikke tildele plads til ny APUinfo-sektion.kunne ikke beregne ny APUinfo-sektion.kunne ikke installere ny APUinfo-sektion.fatal fejl ved oprettelse af .fixupgenerisk lÃ¦nker kan ikke hÃ¥ndtere %sglobal pointer-relativ adresse er uden for det gyldige intervalglobal pointer-relativ relokering, nÃ¥r _gp ikke er defineretskjult symbolignorerer relokering %s
+fejl ved lÃ¦sning af cpu-type fra private elf-datafejl: %B indeholder en relokering (0x%s) til afsnittet %A, som refererer et ikke-eksisterende global symbolfejl: %B bruger ikke Maverick-instruktioner, men %B gÃ¸rfejl: %B er allerede i endeligt BE8-formatfejl: %B er kompileret som kode med absolut position, mens mÃ¥let %B er positionsuafhÃ¦ngigtfejl: %B er kompileret som positionsuafhÃ¦ngig kode, mens mÃ¥let %B har absolut positionfejl: %B er kompileret til APCS-%d, mens %B er kompileret til APCS-%dfejl: %B er kompileret til APCS-%d, mens mÃ¥let %B bruger APCS-%dfejl: %B kompileret til EP9312, mens %B er kompileret til XScalefejl: %B overfÃ¸rer flydende tal i flydendetalsregistre, mens %B overfÃ¸rer dem i heltalsregistrefejl: %B overfÃ¸rer flydende tal i heltalsregistre, mens %B overfÃ¸rer dem i flydendetalsregistrefejl: %B krÃ¦ver mere array-justering end %B prÃ¦servererfejl: %B krÃ¦ver mere stakjustering end %B prÃ¦servererfejl: %B bruger %s-instruktioner, mens %B bruger %sfejl: %B bruger FPA-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger Maverick-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger VFP-instruktioner, mens %B ikke gÃ¸rfejl: %B bruger VFP-registerargumenter, mens %B ikke gÃ¸rfejl: %B bruger flydende tal i hardware, mens %B bruger softwarefejl: %B bruger iWMMXt-registerargumenter, mens %B ikke gÃ¸rfejl: %B bruger flydende tal i software, mens %B bruger hardwarefejl: %B bruger kodemodellen %s, mens %B bruger kodemodellen %sfejl: %B bruger datamodellen %s, mens %B kun bruger MSP430-instruktionerfejl: %B bruger datamodellen %s, mens %B bruger datamodellen %sfejl: %B bruger den store kodemodel, men %B bruger MSP430-instruktionerfejl: %B bruger den lille kodemodel, mens %B bruger datamodellen %sfejl: %B: Modstridende CPU-arkitekturer %d/%dfejl: %B: Modstridende arkitekturprofiler %c/%cfejl: %B: Modstridende brug af R9fejl: %B: Objekt har leverandÃ¸rspecifikt indhold, som skal behandles med  "%s"-vÃ¦rktÃ¸jernefejl: %B: ObjektmÃ¦rke "%d, %s" er ikke kompatibelt med mÃ¦rket "%d, %s"fejl: %B: SB-relativ adressering strider med brugen af R9Fejl: %B: Ukendt CPU-arkitekturfejl: %B: stÃ¸rrelsen af afsnit %A er ikke et multiplum af adressestÃ¸rrelsefejl: %B: kan ikke sammenfÃ¸je virtualiseringsattributter med %Bfejl: Kan ikke finde symbol: _SDA_BASE_.fejl: Kildeobjektet %B har EABI-version %d, men mÃ¥let %B har EABI-version %dfejl: uoverensstemmelse i fp16-format mellem %B og %Bfejl: upassende relokeringstype til delt bibliotek (glemte du -fpic?)fejl: pÃ¥krÃ¦vet afsnit "%s" ikke fundet i linkerscriptfejl: udefineret symbol __rtiniterror: ukendt vÃ¦rdi for Tag_ABI_array_object_align_expected i %Bfejl: ukendt vÃ¦rdi for Tag_ABI_array_object_alignment i %Beksekverbar filkunne ikke tildele plads til nyt APUinfo-afsnit.kunne ikke beregne nyt APUinfo-afsnit.kunne ikke installere nyt APUinfo-afsnit.fatal fejl ved oprettelse af .fixupgenerisk linker kan ikke hÃ¥ndtere %sadresse for relativ global pointer er uden for det gyldige intervalglobal pointer-relativ relokering ved adresse 0x%08x, mens _gp ikke er defineret
+relokering af relativ global pointer med udefineret _gpskjult symbolignorerer relokering %s
 incr_linum(b): +%u
 incr_linum_l: +%u
 incr_linum_w: +%u
-intern fejl: addend burde vÃ¦re nul for R_LM32_16_GOTintern fejl: farlig fejlintern fejl: farlig relokeringintern fejl: uden for intervalletintern fejl: mistÃ¦nkelig relokeringstype brugt i delt bibliotekintern fejl: ukendt fejlintern fejl: relokeringen understÃ¸ttes ikkeintern inkonsistens i stÃ¸rrelsen af .got.loc-sektioninternt symbolugyldig relokeringsadresseugyldig relokeringstype %dugyldig brug af %s med konteksterip2k linker: manglende sideinstruktion ved 0x%08lx (dest = 0x%08lx).ip2k linker: gentaget sideinstruktion ved 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch-tabelhoved beskadiget.ip2k relaxer: switch-tabel uden fuldstÃ¦ndig passende relokeringsinformation.linjenummer  (lÃ¦ngde: %u)
-lÃ¦nkbart aftryklÃ¦nketabelsfejl mod "%s"lÃ¦nkerstubbe i %u gruppe%s
+intern fejl: addend burde vÃ¦re nul for R_LM32_16_GOTintern fejl: gren/hop til en ulige adresse fundetintern fejl: farlig fejlintern fejl: farlig relokeringintern fejl: uden for intervalletintern fejl: mistÃ¦nkelig relokeringstype brugt i delt bibliotekintern fejl: ukendt fejlintern fejl: relokeringen understÃ¸ttes ikkeintern inkonsistens i stÃ¸rrelsen af .got.loc-afsnitinternt symbolugyldig inputrelokering ved output af ikke-ELF, ikke-mmo-format.
+ Brug venligst programmet objcopy til at konvertere fra ELF eller mmo,
+ eller assembl ved hjÃ¦lp af "-no-expand" (for gcc "-Wa,-no-expand"ugyldig inputrelokering ved output af ikke-ELF, ikke-mmo-format.
+ Brug venligst programmet objcopy til at konvertere fra ELF eller mmo,
+ eller kompilÃ©r med gcc-tilvalget "-mno-base-addresses".ugyldig relokeringsadresseugyldig relokeringstype %dugyldig brug af %s med konteksterip2k linker: manglende sideinstruktion ved 0x%08lx (dest = 0x%08lx).ip2k linker: gentaget sideinstruktion ved 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch-tabelhoved beskadiget.ip2k relaxer: switch-tabel uden fuldstÃ¦ndig passende relokeringsinformation.linjenummer  (lÃ¦ngde: %u)
+linkbart aftryklinkerstubbe i %u gruppe%s
   branch       %lu
   toc adjust   %lu
   long branch  %lu
   long toc adj %lu
-  plt call     %luliteralder sker ordret relokering for et eksternt symbolafsÃ¦toverlÃ¸b for lang grenstub "%s"modbeg
+  plt call     %lu
+  plt call toc %luliteralder sker ordret relokering for et eksternt symbolmach-o: der er for mange afsnit (%d); maksimum er 255,
+mep: ingen relokering for kode %dmodbeg
 modend
-nativeusammenhÃ¦ngende array af %s
+navn: [vÃ¦rdi: %08lx lÃ¦ngde %d]: nativeusammenhÃ¦ngende array af %s
 udynamiske relokeringer refererer til dynamisk symbol %sikke-overlay-stÃ¸rrelse af 0x%v plus den maksimale overlaystÃ¸rrelse af 0x%v overstiger lokalt lager
 ikke-tomt addendum i @fptr-relokeringikke nok med GOT-plads for lokale GOT-postermapper ikke: data=%lx mappet=%d
 mapper ikke: miljÃ¸variabel er ikke sat
-bemÃ¦rk: "%s" er defineret i DSO %B, sÃ¥ prÃ¸v at tilfÃ¸je den til lÃ¦nker-kommandolinjenuden for gyldigt intervaloverlÃ¸b efter forenklingoverlÃ¸b ved overlay-stub-relokeringprivate flag = %lxprivate flag = %lx:private flag = %lx: private flag = %x:private flag = 0x%lxprivate flag = 0x%lx:prolog: bkpt-adresse 0x%08x
+uden for gyldigt intervaloverlÃ¸b efter relakseringoverlÃ¸b ved overlay-stub-relokeringprivate flag = %lxprivate flag = %lx:private flag = %lx: private flag = %x:private flag = 0x%lxprivate flag = 0x%lx:prolog: bkpt-adresse 0x%08x
 beskyttet symbolrecbeg: navn: %.*s
 recend
-reference til bankadresse [%lx:%04lx] i det normale adresserum ved %04lxregrelokering refererer et andet segmentrelokering refererer symbol som ikke er defineret i moduletrelokering krÃ¦ver addend pÃ¥ nulrelokeringer mellem forskellige segmenter understÃ¸ttes ikkegenÃ¥bner %B: %s
+reference til bankadresse [%lx:%04lx] i det normale adresserum ved %04lxregrelokeringen "%s" er endnu ikke implementeretrelokering uden for gyldigt intervalrelokering refererer symbol som ikke er defineret i moduletrelokering krÃ¦ver addend pÃ¥ nulrelokering skal vÃ¦re et lige talrelokeringer mellem forskellige segmenter understÃ¸ttes ikkegenÃ¥bner %B: %s
 reserveret kommando %drtnbeg
 rtnend: stÃ¸rrelse 0x%08x
 septyp, navn: %.*s
@@ -1022,16 +1192,16 @@ ppcboot-hoved:
 set_line_num(w) %u
 set_line_num_b %u
 set_line_num_l %u
-sektionen small-data overstiger 6KB; gÃ¸r stÃ¸rrelsesgrÃ¦nsen for small-data mindre (se tilvalget -G)som_sizeof_headers er ikke implementeretbeklager, men auto-overlay-scriptet understÃ¸tter ikke duplikerede objektfiler
-kilde (lÃ¦ngde: %u)
+afsnittet small-data overstiger 6KB; gÃ¸r stÃ¸rrelsesgrÃ¦nsen for small-data mindre (se tilvalget -G)som_sizeof_headers er ikke implementeretbeklager, men auto-overlay-scriptet understÃ¸tter ikke duplikerede objektfiler
+beklager: modtab, toc og extrefsyms er ikke implementeret for dysymtab-kommandoer.kilde (lÃ¦ngde: %u)
 standarddata : %s
 statisk procedure (intet navn)stubpost for %s kan ikke indlÃ¦se .plt, dp-afstand = %ldstubbe stemmer ikke overens med beregnet stÃ¸rrelsesymbolarrayinformation om systemversion:
 term(b): 0x%02xterm_w: 0x%04xtypspec (lÃ¦ngde: %u)
-kan ikke finde ARM-klistret "%s" til "%s"kan ikke finde finde THUMB-klistret "%s" til "%s"kan ikke lÃ¦se i %s-sektion fra %Bujusteret bit-streng af %s
+kan ikke finde ARM-klistret "%s" til "%s"kan ikke finde THUMB-klistret "%s" til "%s"kan ikke lÃ¦se i %s-afsnit fra %Bkan ikke skrive ukendt indlÃ¦sningskommando 0x%lxujusteret bit-streng af %s
 usikker kaldskonvention for ikke-COFF-symboludefineret %s-reference i komplekst symbol: %suhÃ¥ndteret egsd-post-type %u
 uhÃ¥ndteret emh-undertype %u
-ukendtukendt ETIR-kommando %dukendt fejlukendt linjekommando %dukendt operator "%c" i komplekst symbolukendt kildekommando %dSTA-kommando %s understÃ¸ttes ikkerelokeringen understÃ¸ttes ikkerelokeringstypen understÃ¸ttes ikkerelokeringen understÃ¸ttes ikkeikke-understÃ¸ttet relokering mellem data/insn-adresserumbruger flere gp-vÃ¦rdierv850-arkitekturv850e-arkitekturv850e1-arkitekturv850e2-arkitekturv850e2v3-arkitekturvflags: 0x%02x, vÃ¦rdi: 0x%08x vma:			Startadresse	 Slutadresse	  Tilbagespolingsdata
-advarsel: %B og %B har forskellig positionsafhÃ¦ngighed af kodeadresseringadvarsel: %B og %B har forskellig positionsafhÃ¦ngighed af dataadresseringadvarsel: %B og %B har forskellig stÃ¸rrelse af wchar_tadvarsel: forskel pÃ¥ om %B og %B er kompileret til DSBTadvarsel: %B bruger %s-enum'er, men uddata skal bruge %s-enum'er; brug af enum-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galtadvarsel: %B bruger wchar_t pÃ¥ %u byte, men uddata skal bruge wchar_t pÃ¥ %u byte; brug af wchar_t-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galtadvarsel: %B: lokalt symbol "%s" har ingen sektionadvarsel: %s overstiger sektionsstÃ¸rrelse
+ukendtukendt ETIR-kommando %dukendt fejlukendt vÃ¦rdi 0x%lx af byteorden i headerukendt linjekommando %dukendt operator "%c" i komplekst symbolukendt kildekommando %dukendt v850-arkitekturSTA-kommando %s understÃ¸ttes ikkerelokeringen understÃ¸ttes ikkerelokeringstypen understÃ¸ttes ikkerelokeringen understÃ¸ttes ikkeikke-understÃ¸ttet relokering mellem data/insn-adresserumbruger flere gp-vÃ¦rdierv850 E3-arkitekturv850-arkitekturv850e-arkitekturv850e1-arkitekturv850e2-arkitekturv850e2v3-arkitekturv850e3v5-arkitekturvflags: 0x%02x, vÃ¦rdi: 0x%08x vma:			Startadresse	 Slutadresse	  Tilbagespolingsdata
+advarsel: %B og %B har forskellig stÃ¸rrelse af wchar_tadvarsel: forskel pÃ¥ om %B og %B er kompileret til DSBTadvarsel: %B bruger %s-enum'er, men uddata skal bruge %s-enum'er; brug af enum-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galtadvarsel: %B bruger wchar_t pÃ¥ %u byte, men uddata skal bruge wchar_t pÃ¥ %u byte; brug af wchar_t-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galtadvarsel: %B: lokalt symbol "%s" har intet afsnitadvarsel: %s overstiger afsnitsstÃ¸rrelse
 advarsel: %s har et beskadiget strengtabelindeks - ignorereradvarsel: %s overlapper %s
-advarsel: %s-sektionen har nulstÃ¸rrelseadvarsel: stÃ¸rrelsen pÃ¥ .pdata-sektionen (%ld) er ikke et multiplum af %d
-advarsel: forsÃ¸g pÃ¥ at eksportere udefineret symbol "%s"advarsel: kald til ikke-funktionssymbol %s defineret i %Badvarsel: relokering refererer til et andet segmentadvarsel: typen af sektionen "%A" Ã¦ndret til PROGBITSadvarsel: typen og stÃ¸rrelsen pÃ¥ dynamisk symbol "%s" er ikke defineretadvarsel: kan ikke sÃ¦tte stÃ¸rrelsen af %s-sektion i %Badvarsel: kan ikke opdatere indholdet af %s-sektion i %sdu har ikke lov til at definere %s i et script
\ No newline at end of file
+advarsel: %s-afsnittet har nulstÃ¸rrelseadvarsel: stÃ¸rrelsen pÃ¥ .pdata-afsnittet (%ld) er ikke et multiplum af %d
+advarsel: forsÃ¸g pÃ¥ at eksportere udefineret symbol "%s"advarsel: kald til ikke-funktionssymbol %s defineret i %Badvarsel: genererer et delt bibliotek som indeholder ikke-PIC-kodeadvarsel: genererer et delt bibliotek som indeholder ikke-PID-kodeadvarsel: relokering refererer til et andet segmentadvarsel: afsnittet "%s" Ã¦ndres til en noteadvarsel: typen af afsnittet "%A" Ã¦ndret til PROGBITSadvarsel: typen og stÃ¸rrelsen pÃ¥ dynamisk symbol "%s" er ikke defineretadvarsel: kan ikke sÃ¦tte stÃ¸rrelsen af %s-afsnit i %Badvarsel: kan ikke opdatere indholdet af %s-afsnit i %sdu har ikke lov til at definere %s i et script
\ No newline at end of file
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/da.po ./bfd/po/da.po
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/da.po	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/da.po	2017-03-06 01:49:05.000000000 +0000
@@ -1,186 +1,196 @@
 # Danish messages for bfd.
-# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011, 2016 Free Software Foundation, Inc.
 # This file is distributed under the same license as the binutils package.
 #
 # Keld Simonsen <keld@dkuug.dk>, 2002-2003
-# Ask Hjorth Larsen <asklarsen@gmail.com>, 2011
+# Ask Hjorth Larsen <asklarsen@gmail.com>, 2011, 2016
 #
 # FÃ¸lgende konventioner bruges, men jeg er ikke sikker pÃ¥ at de nÃ¸dvendigvis er de bedste:
 #
 # entry (alene) -> post
 # entry point -> startpunkt
-# link -> lÃ¦nke
+# link (vb) -> at linke
+# link (subst) -> link
+# linker (subst) -> linker
 # overlay -> overlay
-# relax -> forenkle
+# relax -> relaksere
 # record -> post
 # image -> aftryk
 # TOC -> TOC (=table of contents, evt. indholdsfortegnelse)
+#
+# XXX offset -> afsÃ¦t, position, forskydning (-justering: alignment)
+# XXX entry: post vs indgang
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd-2.20.90\n"
+"Project-Id-Version: bfd-2.24.90\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2010-11-05 11:31+0100\n"
-"PO-Revision-Date: 2011-03-16 02:31+0100\n"
+"POT-Creation-Date: 2014-02-10 09:42+1030\n"
+"PO-Revision-Date: 2016-10-27 23:31+0200\n"
 "Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
 "Language: da\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
 
 #: aout-adobe.c:127
 msgid "%B: Unknown section type in a.out.adobe file: %x\n"
-msgstr "%B: Ukendt sektionstype i a.out.adobe-fil: %x\n"
+msgstr "%B: Ukendt afsnitsstype i a.out.adobe-fil: %x\n"
 
-#: aout-cris.c:199
+#: aout-cris.c:200
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: Ugyldig relokeringstype eksporteret: %d"
 
-#: aout-cris.c:242
+#: aout-cris.c:243
 msgid "%B: Invalid relocation type imported: %d"
 msgstr "%B: Ugyldig relokeringstype importeret: %d"
 
-#: aout-cris.c:253
+#: aout-cris.c:254
 msgid "%B: Bad relocation record imported: %d"
 msgstr "%B: Fejlagtig relokeringspost importeret: %d"
 
 #: aoutx.h:1273 aoutx.h:1611
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr "%s: kan ikke reprÃ¦sentere sektionen \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan ikke reprÃ¦sentere afsnittet \"%s\" i a.out-objektfilformat"
 
 #: aoutx.h:1577
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr "%s: kan ikke reprÃ¦sentere sektion for symbolet \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan ikke reprÃ¦sentere afsnit for symbolet \"%s\" i a.out-objektfilformat"
 
-#: aoutx.h:1579 vms-alpha.c:7649
+#: aoutx.h:1579 vms-alpha.c:7564
 msgid "*unknown*"
 msgstr "*ukendt*"
 
-#: aoutx.h:4007 aoutx.h:4333
+#: aoutx.h:4018 aoutx.h:4344
 msgid "%P: %B: unexpected relocation type\n"
 msgstr "%P: %B: uventet relokeringstype\n"
 
-#: aoutx.h:5364
+#: aoutx.h:5375
 #, c-format
 msgid "%s: relocatable link from %s to %s not supported"
-msgstr "%s: relokÃ©rbar lÃ¦nke fra %s til %s understÃ¸ttes ikke"
+msgstr "%s: relokÃ©rbart link fra %s til %s understÃ¸ttes ikke"
 
-#: archive.c:2125
+#: archive.c:2249
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr "Advarsel: arkivskrivning var langsom: genskriver tidsstempel\n"
 
-#: archive.c:2416
+#: archive.c:2549
 msgid "Reading archive file mod timestamp"
 msgstr "LÃ¦ser arkivfilens Ã¦ndringstidsstempel"
 
-#: archive.c:2440
+#: archive.c:2573
 msgid "Writing updated armap timestamp"
 msgstr "Skriver opdateret armap-tidsstempel"
 
-#: bfd.c:395
+#: bfd.c:411
 msgid "No error"
 msgstr "Ingen fejl"
 
-#: bfd.c:396
+#: bfd.c:412
 msgid "System call error"
 msgstr "Systemkaldsfejl"
 
-#: bfd.c:397
+#: bfd.c:413
 msgid "Invalid bfd target"
 msgstr "Ugyldigt bfd-mÃ¥l"
 
-#: bfd.c:398
+#: bfd.c:414
 msgid "File in wrong format"
 msgstr "Filen er i forkert format"
 
-#: bfd.c:399
+#: bfd.c:415
 msgid "Archive object file in wrong format"
 msgstr "Arkivobjektfil er i forkert format"
 
-#: bfd.c:400
+#: bfd.c:416
 msgid "Invalid operation"
 msgstr "Ugyldig handling"
 
-#: bfd.c:401
+#: bfd.c:417
 msgid "Memory exhausted"
 msgstr "Hukommelsen er opbrugt"
 
-#: bfd.c:402
+#: bfd.c:418
 msgid "No symbols"
 msgstr "Ingen symboler"
 
-#: bfd.c:403
+#: bfd.c:419
 msgid "Archive has no index; run ranlib to add one"
 msgstr "Arkivet har intet indeks; kÃ¸r ranlib til at tilfÃ¸je Ã©t"
 
-#: bfd.c:404
+#: bfd.c:420
 msgid "No more archived files"
 msgstr "Ikke flere arkiverede filer"
 
-#: bfd.c:405
+#: bfd.c:421
 msgid "Malformed archive"
 msgstr "Forvansket arkiv"
 
-#: bfd.c:406
+#: bfd.c:422
+msgid "DSO missing from command line"
+msgstr "DSO mangler i kommandolinje"
+
+#: bfd.c:423
 msgid "File format not recognized"
 msgstr "Filformatet ikke genkendt"
 
-#: bfd.c:407
+#: bfd.c:424
 msgid "File format is ambiguous"
 msgstr "Filformatet er flertydigt"
 
-#: bfd.c:408
+#: bfd.c:425
 msgid "Section has no contents"
-msgstr "Sektionen har intet indhold"
+msgstr "Afsnittet har intet indhold"
 
-#: bfd.c:409
+#: bfd.c:426
 msgid "Nonrepresentable section on output"
-msgstr "IkkereprÃ¦senterbar sektion i uddata"
+msgstr "IkkereprÃ¦senterbart afsnit i uddata"
 
-#: bfd.c:410
+#: bfd.c:427
 msgid "Symbol needs debug section which does not exist"
-msgstr "Symbolet krÃ¦ver fejlsÃ¸gningssektion som ikke eksisterer"
+msgstr "Symbolet krÃ¦ver fejlsÃ¸gningsafsnit som ikke eksisterer"
 
-#: bfd.c:411
+#: bfd.c:428
 msgid "Bad value"
 msgstr "Fejlagtigt vÃ¦rdi"
 
-#: bfd.c:412
+#: bfd.c:429
 msgid "File truncated"
 msgstr "Filen trunkeret"
 
-#: bfd.c:413
+#: bfd.c:430
 msgid "File too big"
 msgstr "Filen er for stor"
 
-#: bfd.c:414
+#: bfd.c:431
 #, c-format
 msgid "Error reading %s: %s"
 msgstr "Fejl ved lÃ¦sning af %s: %s"
 
-#: bfd.c:415
+#: bfd.c:432
 msgid "#<Invalid error code>"
 msgstr "#<Ugyldig fejlkode>"
 
-#: bfd.c:939
+#: bfd.c:1046
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "BFD %s-forsikring mislykkedes %s:%d"
 
-#: bfd.c:951
+#: bfd.c:1058
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "Intern BFD %s-fejl, afbryder ved %s linje %d i %s\n"
 
-#: bfd.c:955
+#: bfd.c:1062
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "Internt BFD %s-fejl, afbryder ved %s linje %d\n"
 
-#: bfd.c:957
+#: bfd.c:1064
 msgid "Please report this bug.\n"
 msgstr "RapportÃ©r gerne denne fejl.\n"
 
@@ -197,19 +207,19 @@ msgstr "mapper ikke: miljÃ¸variabel er i
 #: binary.c:271
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr "Advarsel: Skrivning af sektionen \"%s\" til enorm (dvs negativ) afsÃ¦tsbyte 0x%lx."
+msgstr "Advarsel: Skrivning af afsnittet \"%s\" til enorm (dvs negativ) afsÃ¦tsbyte 0x%lx."
 
-#: bout.c:1146 elf-m10300.c:2063 elf32-avr.c:1640 elf32-frv.c:5740
-#: elfxx-sparc.c:2795 reloc.c:5646 reloc16.c:162 elf32-ia64.c:842
-#: elf64-ia64.c:842
+#: bout.c:1146 elf-m10300.c:2665 elf32-avr.c:1706 elf32-frv.c:5641
+#: elf64-ia64-vms.c:354 elfxx-sparc.c:2869 reloc.c:7324 reloc16.c:160
+#: elf32-ia64.c:351 elf64-ia64.c:351
 msgid "%P%F: --relax and -r may not be used together\n"
 msgstr "%P%F: --relax og -r kan ikke bruges sammen\n"
 
-#: cache.c:226
+#: cache.c:253
 msgid "reopening %B: %s\n"
 msgstr "genÃ¥bner %B: %s\n"
 
-#: coff-alpha.c:491
+#: coff-alpha.c:452
 msgid ""
 "%B: Cannot handle compressed Alpha binaries.\n"
 "   Use compiler flags, or objZ, to generate uncompressed binaries."
@@ -217,42 +227,42 @@ msgstr ""
 "%B: Kan ikke hÃ¥ndtere komprimerede Alpha-binÃ¦rfiler.\n"
 "   Brug kompilerflag eller objZ til at generere ukomprimerede binÃ¦rfiler."
 
-#: coff-alpha.c:648
+#: coff-alpha.c:603
 msgid "%B: unknown/unsupported relocation type %d"
 msgstr "%B: relokeringstypen %d kendes eller understÃ¸ttes ikke"
 
-#: coff-alpha.c:900 coff-alpha.c:937 coff-alpha.c:2025 coff-mips.c:1003
+#: coff-alpha.c:852 coff-alpha.c:889 coff-alpha.c:1973 coff-mips.c:946
 msgid "GP relative relocation used when GP not defined"
 msgstr "GP-relativ relokering bruges nÃ¥r GP ikke er defineret"
 
-#: coff-alpha.c:1502
+#: coff-alpha.c:1450
 msgid "using multiple gp values"
 msgstr "bruger flere gp-vÃ¦rdier"
 
-#: coff-alpha.c:1561
+#: coff-alpha.c:1509
 msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
 msgstr "%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELHIGH"
 
-#: coff-alpha.c:1568
+#: coff-alpha.c:1516
 msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
 msgstr "%B: relokering understÃ¸ttes ikke: ALPHA_R_GPRELLOW"
 
-#: coff-alpha.c:1575 elf32-m32r.c:2493 elf64-alpha.c:3991 elf64-alpha.c:4140
-#: elf32-ia64.c:4582 elf64-ia64.c:4582
+#: coff-alpha.c:1523 elf32-m32r.c:2443 elf64-alpha.c:4083 elf64-alpha.c:4233
+#: elf64-ia64-vms.c:3429 elf32-ia64.c:3836 elf64-ia64.c:3836
 msgid "%B: unknown relocation type %d"
 msgstr "%B: ukendt relokeringstype %d"
 
-#: coff-arm.c:1038
+#: coff-arm.c:1034
 #, c-format
 msgid "%B: unable to find THUMB glue '%s' for `%s'"
 msgstr "%B: kan ikke finde THUMB-klistret \"%s\" til \"%s\""
 
-#: coff-arm.c:1067
+#: coff-arm.c:1063
 #, c-format
 msgid "%B: unable to find ARM glue '%s' for `%s'"
 msgstr "%B: kan ikke finde ARM-klistret \"%s\" til \"%s\""
 
-#: coff-arm.c:1369 elf32-arm.c:6501
+#: coff-arm.c:1365 elf32-arm.c:7141
 #, c-format
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
@@ -261,7 +271,7 @@ msgstr ""
 "%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.\n"
 "  fÃ¸rste forekomst: %B: arm-kald til thumb"
 
-#: coff-arm.c:1459
+#: coff-arm.c:1455
 #, c-format
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
@@ -270,133 +280,133 @@ msgid ""
 msgstr ""
 "%B(%s): advarsel: \"Interworking\" er ikke slÃ¥et til.\n"
 "  fÃ¸rste forekomst: %B: thumb-kald til arm\n"
-"  overvej at genlÃ¦nke med --support-old-code tilvalgt"
+"  overvej at genlinke med --support-old-code tilvalgt"
 
-#: coff-arm.c:1754 coff-tic80.c:695 cofflink.c:3043
+#: coff-arm.c:1750 coff-tic80.c:673 cofflink.c:3168
 msgid "%B: bad reloc address 0x%lx in section `%A'"
-msgstr "%B: fejlagtig relokeringsadresse 0x%lx i sektionen \"%s\""
+msgstr "%B: fejlagtig relokeringsadresse 0x%lx i afsnittet \"%A\""
 
-#: coff-arm.c:2079
+#: coff-arm.c:2075
 msgid "%B: illegal symbol index in reloc: %d"
 msgstr "%B: illegalt symbolindeks i relokering: %d"
 
-#: coff-arm.c:2210
+#: coff-arm.c:2206
 #, c-format
 msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
 msgstr "fejl: %B er kompileret til APCS-%d, mens %B er kompileret til APCS-%d"
 
-#: coff-arm.c:2226 elf32-arm.c:14105
+#: coff-arm.c:2222 elf32-arm.c:16123
 #, c-format
 msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers"
 msgstr "fejl: %B overfÃ¸rer flydende tal i flydendetalsregistre, mens %B overfÃ¸rer dem i heltalsregistre"
 
-#: coff-arm.c:2229 elf32-arm.c:14109
+#: coff-arm.c:2225 elf32-arm.c:16127
 #, c-format
 msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers"
 msgstr "fejl: %B overfÃ¸rer flydende tal i heltalsregistre, mens %B overfÃ¸rer dem i flydendetalsregistre"
 
-#: coff-arm.c:2243
+#: coff-arm.c:2239
 #, c-format
 msgid "error: %B is compiled as position independent code, whereas target %B is absolute position"
-msgstr "fejl: %s er kompileret som positionsuafhÃ¦ngig kode, mens mÃ¥let %B har absolut position"
+msgstr "fejl: %B er kompileret som positionsuafhÃ¦ngig kode, mens mÃ¥let %B har absolut position"
 
-#: coff-arm.c:2246
+#: coff-arm.c:2242
 #, c-format
 msgid "error: %B is compiled as absolute position code, whereas target %B is position independent"
 msgstr "fejl: %B er kompileret som kode med absolut position, mens mÃ¥let %B er positionsuafhÃ¦ngigt"
 
-#: coff-arm.c:2274 elf32-arm.c:14174
+#: coff-arm.c:2270 elf32-arm.c:16192
 #, c-format
 msgid "Warning: %B supports interworking, whereas %B does not"
 msgstr "Advarsel: %B understÃ¸tter samvirken (interworking), mens %B ikke gÃ¸r det"
 
-#: coff-arm.c:2277 elf32-arm.c:14180
+#: coff-arm.c:2273 elf32-arm.c:16198
 #, c-format
 msgid "Warning: %B does not support interworking, whereas %B does"
 msgstr "Advarsel: %B understÃ¸tter ikke samvirken (interworking), mens %B gÃ¸r det"
 
-#: coff-arm.c:2301
+#: coff-arm.c:2297
 #, c-format
 msgid "private flags = %x:"
 msgstr "private flag = %x:"
 
-#: coff-arm.c:2309 elf32-arm.c:10492
+#: coff-arm.c:2305 elf32-arm.c:12119
 #, c-format
 msgid " [floats passed in float registers]"
 msgstr " [flydende tal overfÃ¸rt i flydendetalsregistre]"
 
-#: coff-arm.c:2311
+#: coff-arm.c:2307
 #, c-format
 msgid " [floats passed in integer registers]"
 msgstr " [flydende tal overfÃ¸rt i heltalsregistre]"
 
-#: coff-arm.c:2314 elf32-arm.c:10495
+#: coff-arm.c:2310 elf32-arm.c:12122
 #, c-format
 msgid " [position independent]"
 msgstr " [positionsuafhÃ¦ngigt]"
 
-#: coff-arm.c:2316
+#: coff-arm.c:2312
 #, c-format
 msgid " [absolute position]"
 msgstr " [absolut position]"
 
-#: coff-arm.c:2320
+#: coff-arm.c:2316
 #, c-format
 msgid " [interworking flag not initialised]"
 msgstr " [samvirkendeflag er ikke initieret]"
 
-#: coff-arm.c:2322
+#: coff-arm.c:2318
 #, c-format
 msgid " [interworking supported]"
 msgstr " [samvirken understÃ¸ttes]"
 
-#: coff-arm.c:2324
+#: coff-arm.c:2320
 #, c-format
 msgid " [interworking not supported]"
 msgstr " [samvirken understÃ¸ttes ikke]"
 
-#: coff-arm.c:2370 elf32-arm.c:9520
+#: coff-arm.c:2366 elf32-arm.c:11104
 #, c-format
 msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"
 msgstr "Advarsel: SÃ¦tter ikke samvirkeflaget (interworking) for %B, da den allerede er angivet som ikke-samvirkende"
 
-#: coff-arm.c:2374 elf32-arm.c:9524
+#: coff-arm.c:2370 elf32-arm.c:11108
 #, c-format
 msgid "Warning: Clearing the interworking flag of %B due to outside request"
 msgstr "Advarsel: Fjerner samvirkeflaget (interworking) for %B pÃ¥ grund af anmodning udefra"
 
-#: coff-h8300.c:1122
+#: coff-h8300.c:1096
 #, c-format
 msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
 msgstr "kan ikke hÃ¥ndtere R_MEM_INDIRECT-relokering ved brug af %s-uddata"
 
 #: coff-i860.c:147
 #, c-format
-msgid "Relocation `%s' not yet implemented\n"
-msgstr "Relokeringen \"%s\" er endnu ikke implementeret\n"
+msgid "relocation `%s' not yet implemented"
+msgstr "relokeringen \"%s\" er endnu ikke implementeret"
 
-#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5147
+#: coff-i860.c:605 coff-tic54x.c:365 coffcode.h:5209
 msgid "%B: warning: illegal symbol index %ld in relocs"
 msgstr "%B: advarsel: illegalt symbolindeks %ld i relokeringerne"
 
-#: coff-i960.c:143 coff-i960.c:506
+#: coff-i960.c:124 coff-i960.c:480
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "usikker kaldskonvention for ikke-COFF-symbol"
 
-#: coff-m68k.c:506 elf32-bfin.c:5678 elf32-cr16.c:2897 elf32-m68k.c:4672
+#: coff-m68k.c:484 elf32-bfin.c:5556 elf32-cr16.c:2853 elf32-m68k.c:4632
 msgid "unsupported reloc type"
 msgstr "relokeringstypen understÃ¸ttes ikke"
 
-#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:430 elf32-score7.c:330
-#: elf64-mips.c:2019 elfn32-mips.c:1832
+#: coff-mips.c:636 elf32-mips.c:1637 elf32-score.c:431 elf32-score7.c:330
+#: elf64-mips.c:2925 elfn32-mips.c:2737
 msgid "GP relative relocation when _gp not defined"
 msgstr "GP-relativ relokering nÃ¥r _gp ikke var defineret"
 
-#: coff-or32.c:229
+#: coff-or32.c:216
 msgid "Unrecognized reloc"
 msgstr "Ukendt relokering"
 
-#: coff-rs6000.c:2794
+#: coff-rs6000.c:2802
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: relokeringstypen 0x%02x understÃ¸ttes ikke"
@@ -406,170 +416,197 @@ msgstr "%s: relokeringstypen 0x%02x unde
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: TOC-relokering ved 0x%x til symbolet \"%s\" uden nogen TOC-post"
 
-#: coff-rs6000.c:3652 coff64-rs6000.c:2175
+#: coff-rs6000.c:3638 coff64-rs6000.c:2117
 msgid "%B: symbol `%s' has unrecognized smclas %d"
 msgstr "%B: symbolet \"%s\" har ukendt smclas %d"
 
-#: coff-tic4x.c:195 coff-tic54x.c:299 coff-tic80.c:458
+#: coff-sh.c:506
+#, c-format
+msgid "SH Error: unknown reloc type %d"
+msgstr "SH-fejl: ukendt relokeringstype %d"
+
+#: coff-tic4x.c:184 coff-tic54x.c:279 coff-tic80.c:440
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Ukendt relokeringstype 0x%x"
 
-#: coff-tic4x.c:240
+#: coff-tic4x.c:227
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: advarsel: ikke tilladt symbolindeks %ld i relokeringerne"
 
-#: coff-w65.c:367
+#: coff-w65.c:355
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "ignorerer relokering %s\n"
 
-#: coffcode.h:973
+#: coffcode.h:1005
 msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
-msgstr "%B: advarsel: COMDAT-symbol \"%s\" passer ikke til sektionsnavnet \"%s\""
+msgstr "%B: advarsel: COMDAT-symbol \"%s\" passer ikke til afsnitsnavnet \"%s\""
 
 #. Generate a warning message rather using the 'unhandled'
 #. variable as this will allow some .sys files generate by
 #. other toolchains to be processed.  See bugzilla issue 196.
-#: coffcode.h:1197
+#: coffcode.h:1230
 msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
-msgstr "%B: Advarsel: Ignorerer sektionsflag IMAGE_SCN_MEM_NOT_PAGED i sektionen %s"
+msgstr "%B: Advarsel: Ignorerer afsnitssflag IMAGE_SCN_MEM_NOT_PAGED i afsnittet %s"
 
-#: coffcode.h:1264
+#: coffcode.h:1297
 msgid "%B (%s): Section flag %s (0x%x) ignored"
-msgstr "%B (%s): Sektionsflag %s (0x%x) ignoreret"
+msgstr "%B (%s): afsnitsflag %s (0x%x) ignoreret"
 
-#: coffcode.h:2390
+#: coffcode.h:2439
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Ukendt TI COFF-mÃ¥l-id \"0x%x\""
 
-#: coffcode.h:2704
+#: coffcode.h:2753
 msgid "%B: reloc against a non-existant symbol index: %ld"
 msgstr "%B: relokering mod et ikke-eksisterende symbolindeks: %ld"
 
-#: coffcode.h:3262
+#: coffcode.h:3311
 msgid "%B: too many sections (%d)"
-msgstr "%B: for mange sektioner (%d)"
+msgstr "%B: for mange afsnit (%d)"
 
-#: coffcode.h:3676
+#: coffcode.h:3729
 msgid "%B: section %s: string table overflow at offset %ld"
-msgstr "%B: sektion %s: overlÃ¸b i strengtabel ved afsÃ¦t %ld"
+msgstr "%B: afsnit %s: overlÃ¸b i strengtabel ved afsÃ¦t %ld"
 
-#: coffcode.h:4481
+#: coffcode.h:4534
 msgid "%B: warning: line number table read failed"
 msgstr "%B: advarsel: lÃ¦sning af linjenummertabel mislykkedes"
 
-#: coffcode.h:4511
+#: coffcode.h:4564
 msgid "%B: warning: illegal symbol index %ld in line numbers"
 msgstr "%B: advarsel: illegalt symbolindeks %ld i linjetal"
 
-#: coffcode.h:4525
+#: coffcode.h:4578
 msgid "%B: warning: duplicate line number information for `%s'"
 msgstr "%B: advarsel: dobbelt linjenummersinformation for \"%s\""
 
-#: coffcode.h:4916
+#: coffcode.h:4978
 msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%B: Ukendt lagringsklasse %d for %s-symbolet \"%s\""
 
-#: coffcode.h:5042
+#: coffcode.h:5104
 msgid "warning: %B: local symbol `%s' has no section"
-msgstr "advarsel: %B: lokalt symbol \"%s\" har ingen sektion"
+msgstr "advarsel: %B: lokalt symbol \"%s\" har intet afsnit"
 
-#: coffcode.h:5186
+#: coffcode.h:5248
 msgid "%B: illegal relocation type %d at address 0x%lx"
 msgstr "%B: ikke tilladt relokeringstype %d pÃ¥ adresse 0x%lx"
 
-#: coffgen.c:1573
+#: coffgen.c:179 elf.c:1030
+msgid "%B: unable to initialize compress status for section %s"
+msgstr "%B: kan ikke klargÃ¸re komprimeringsstatus for afsnit %s"
+
+#: coffgen.c:199 elf.c:1050
+msgid "%B: unable to initialize decompress status for section %s"
+msgstr "%B: kan ikke klargÃ¸re afkomprimeringsstatus for afsnit %s"
+
+#: coffgen.c:1685
 msgid "%B: bad string table size %lu"
 msgstr "%B: fejlagtig strengtabelstÃ¸rrelse %lu"
 
-#: cofflink.c:524 elflink.c:4339
+#: coffgen.c:2608 elflink.c:12906 linker.c:3136
+msgid "%F%P: already_linked_table: %E\n"
+msgstr "%F%P: already_linked_table: %E\n"
+
+#: cofflink.c:533 elf64-ia64-vms.c:5173 elflink.c:4356
 msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
 msgstr "Advarsel: typen pÃ¥ symbol \"%s\" Ã¦ndredes fra %d til %d i %B"
 
-#: cofflink.c:2321
+#: cofflink.c:2416
 msgid "%B: relocs in section `%A', but it has no contents"
-msgstr "%B: relokeringer i sektionen \"%s\", men den har intet indhold"
+msgstr "%B: relokeringer i afsnittet \"%A\", men den har intet indhold"
+
+#: cofflink.c:2478 elflink.c:9711
+msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n"
+msgstr "%X\"%s\" refereret i afsnit \"%A\" af %B: defineret i forkastet afsnit \"%A\" af %B\n"
 
-#: cofflink.c:2652 coffswap.h:826
+#: cofflink.c:2777 coffswap.h:826
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: relokering giver overlÃ¸b: 0x%lx > 0xffff"
 
-#: cofflink.c:2661 coffswap.h:812
+#: cofflink.c:2786 coffswap.h:812
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: advarsel: %s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff"
 
-#: cpu-arm.c:189 cpu-arm.c:200
+#: cpu-arm.c:190 cpu-arm.c:201
 msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale"
 msgstr "fejl: %B kompileret til EP9312, mens %B er kompileret til XScale"
 
-#: cpu-arm.c:333
+#: cpu-arm.c:334
 #, c-format
 msgid "warning: unable to update contents of %s section in %s"
-msgstr "advarsel: kan ikke opdatere indholdet af %s-sektion i %s"
+msgstr "advarsel: kan ikke opdatere indholdet af %s-afsnit i %s"
 
-#: dwarf2.c:490
+#: dwarf2.c:514
 #, c-format
 msgid "Dwarf Error: Can't find %s section."
-msgstr "Dwarf-fejl: Kan ikke finde %s-sektion."
+msgstr "Dwarf-fejl: Kan ikke finde %s-afsnit."
 
-#: dwarf2.c:518
+#: dwarf2.c:543
 #, c-format
 msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."
 msgstr "Dwarf-fejl: AfsÃ¦t (%lu) stÃ¸rre end eller lig med %s-stÃ¸rrelse (%lu)."
 
-#: dwarf2.c:940
+#: dwarf2.c:1071
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
-msgstr "Dwarf-fejl: Ugyldig eller ubehandlet FORM-vÃ¦rdi: %u."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %#x."
+msgstr "Dwarf-fejl: Ugyldig eller ubehandlet FORM-vÃ¦rdi: %#x."
 
-#: dwarf2.c:1191
+#: dwarf2.c:1332
 msgid "Dwarf Error: mangled line number section (bad file number)."
-msgstr "Dwarf-fejl: vanskabt linjenummerssektion (fejlagtigt filnummer)."
+msgstr "Dwarf-fejl: vanskabt linjenummerafsnit (fejlagtigt filnummer)."
 
-#: dwarf2.c:1443
+#: dwarf2.c:1590
 #, c-format
 msgid "Dwarf Error: Unhandled .debug_line version %d."
 msgstr "Dwarf-fejl: UhÃ¥ndteret .debug_line-version %d."
 
-#: dwarf2.c:1465
+#: dwarf2.c:1612
 msgid "Dwarf Error: Invalid maximum operations per instruction."
 msgstr "Dwarf-fejl: Ugyldigt maksimalt antal operationer per instruktion."
 
-#: dwarf2.c:1652
+#: dwarf2.c:1807
 msgid "Dwarf Error: mangled line number section."
-msgstr "Dwarf-fejl: vanskabt linjenummerssektion."
+msgstr "Dwarf-fejl: vanskabt linjenummerafsnit."
 
-#: dwarf2.c:1978 dwarf2.c:2098 dwarf2.c:2382
+# ?
+#: dwarf2.c:2160
+#, c-format
+msgid "Dwarf Error: Unable to read alt ref %u."
+msgstr "Dwarf-fejl: Kan ikke lÃ¦se alt ref %u."
+
+#: dwarf2.c:2179 dwarf2.c:2299 dwarf2.c:2595
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr "Dwarf-fejl: Kunne ikke finde forkortelsesnumret %u."
 
-#: dwarf2.c:2343
+#: dwarf2.c:2551
 #, c-format
 msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information."
 msgstr "Dwarf-fejl: fandt dwarf version \"%u\", men denne lÃ¦ser kan kun hÃ¥ndtere information fra version 2, 3 og 4."
 
-#: dwarf2.c:2350
+#: dwarf2.c:2560
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Dwarf-fejl: fandt adressestÃ¸rrelsen \"%u\", denne lÃ¦ser kan ikke hÃ¥ndtere stÃ¸rrelser stÃ¸rre end \"%u\"."
 
-#: dwarf2.c:2373
+#: dwarf2.c:2586
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr "Dwarf-fejl: Fejlagtigt forkortelsesnummer: %u."
 
-#: ecoff.c:1237
+#: ecoff.c:1233
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Ukendt grundtype %d"
 
-#: ecoff.c:1494
+#: ecoff.c:1490
 #, c-format
 msgid ""
 "\n"
@@ -578,7 +615,7 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %ld"
 
-#: ecoff.c:1501 ecoff.c:1504
+#: ecoff.c:1497 ecoff.c:1500
 #, c-format
 msgid ""
 "\n"
@@ -587,7 +624,7 @@ msgstr ""
 "\n"
 "      FÃ¸rste symbol: %ld"
 
-#: ecoff.c:1516
+#: ecoff.c:1512
 #, c-format
 msgid ""
 "\n"
@@ -596,7 +633,7 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %-7ld  Type:  %s"
 
-#: ecoff.c:1523
+#: ecoff.c:1519
 #, c-format
 msgid ""
 "\n"
@@ -605,7 +642,7 @@ msgstr ""
 "\n"
 "      Lokalt symbol: %ld"
 
-#: ecoff.c:1531
+#: ecoff.c:1527
 #, c-format
 msgid ""
 "\n"
@@ -614,7 +651,7 @@ msgstr ""
 "\n"
 "      struct; symbol slut+1: %ld"
 
-#: ecoff.c:1536
+#: ecoff.c:1532
 #, c-format
 msgid ""
 "\n"
@@ -623,7 +660,7 @@ msgstr ""
 "\n"
 "      union; symbol slut+1: %ld"
 
-#: ecoff.c:1541
+#: ecoff.c:1537
 #, c-format
 msgid ""
 "\n"
@@ -632,7 +669,7 @@ msgstr ""
 "\n"
 "      enum; symbol slut+1: %ld"
 
-#: ecoff.c:1547
+#: ecoff.c:1543
 #, c-format
 msgid ""
 "\n"
@@ -641,132 +678,139 @@ msgstr ""
 "\n"
 "      Type: %s"
 
-#: elf-attrs.c:569
+#: elf-attrs.c:573
 msgid "error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchain"
-msgstr "fejl: %B: Objekt har leverandÃ¸rspecifikt indhold, som skal behandles med  '%s'-vÃ¦rktÃ¸jerne"
+msgstr "fejl: %B: Objekt har leverandÃ¸rspecifikt indhold, som skal behandles med  \"%s\"-vÃ¦rktÃ¸jerne"
 
-#: elf-attrs.c:578
+#: elf-attrs.c:582
 msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'"
-msgstr "fejl: %B: ObjektmÃ¦rke \"%d, %d\" er ikke kompatibelt med mÃ¦rket \"%d, %s\""
+msgstr "fejl: %B: ObjektmÃ¦rke \"%d, %s\" er ikke kompatibelt med mÃ¦rket \"%d, %s\""
 
-#: elf-eh-frame.c:913
+#: elf-eh-frame.c:921
 msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
 msgstr "%P: fejl i %B(%A); ingen .eh_frame_hdr-tabel vil blive oprettet.\n"
 
-#: elf-eh-frame.c:1165
+#: elf-eh-frame.c:1193
 msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
 msgstr "%P: fde-kodning i %B(%A) forhindrer .eh_frame_hdr-tabel i at blive oprettet.\n"
 
-#: elf-ifunc.c:179
+#: elf-eh-frame.c:1612
+msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n"
+msgstr "%P: DW_EH_PE_datarel ikke angivet for denne arkitektur.\n"
+
+#: elf-ifunc.c:135
 msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n"
-msgstr "%F%P: dynamisk STT_GNU_IFUNC-symbol \"%s\" med pointerlighed i \"%B\" kan ikke bruges nÃ¥r der oprettes en eksekverbar fil; genkompilÃ©r med -fPIE og genlÃ¦nk med -pie\n"
+msgstr "%F%P: dynamisk STT_GNU_IFUNC-symbol \"%s\" med pointerlighed i \"%B\" kan ikke bruges nÃ¥r der oprettes en eksekverbar fil; genkompilÃ©r med -fPIE og genlink med -pie\n"
 
-#: elf-m10200.c:450 elf-m10300.c:1560 elf32-avr.c:1263 elf32-bfin.c:3193
-#: elf32-cr16.c:1482 elf32-cr16c.c:780 elf32-cris.c:2077 elf32-crx.c:922
-#: elf32-d10v.c:509 elf32-fr30.c:609 elf32-frv.c:4111 elf32-h8300.c:509
-#: elf32-i860.c:1211 elf32-ip2k.c:1468 elf32-iq2000.c:684 elf32-lm32.c:1168
-#: elf32-m32c.c:553 elf32-m32r.c:3111 elf32-m68hc1x.c:1138 elf32-mep.c:534
-#: elf32-microblaze.c:1231 elf32-moxie.c:282 elf32-msp430.c:486 elf32-mt.c:395
-#: elf32-openrisc.c:404 elf32-score.c:2731 elf32-score7.c:2540
-#: elf32-spu.c:5042 elf32-v850.c:2143 elf32-xstormy16.c:941 elf64-mmix.c:1522
+#: elf-m10200.c:430 elf-m10300.c:2164 elf32-avr.c:1256 elf32-bfin.c:3220
+#: elf32-cr16.c:1484 elf32-cr16c.c:780 elf32-cris.c:2016 elf32-crx.c:922
+#: elf32-d10v.c:513 elf32-epiphany.c:557 elf32-fr30.c:589 elf32-frv.c:4039
+#: elf32-h8300.c:525 elf32-i860.c:1212 elf32-ip2k.c:1468 elf32-iq2000.c:688
+#: elf32-lm32.c:1160 elf32-m32c.c:553 elf32-m32r.c:3066 elf32-m68hc1x.c:1283
+#: elf32-mep.c:535 elf32-metag.c:1992 elf32-microblaze.c:1560
+#: elf32-moxie.c:282 elf32-mt.c:395 elf32-nds32.c:4910 elf32-openrisc.c:404
+#: elf32-score.c:2729 elf32-score7.c:2537 elf32-spu.c:5041
+#: elf32-tilepro.c:3666 elf32-v850.c:2281 elf32-xstormy16.c:936
+#: elf64-mmix.c:1538 elfxx-tilegx.c:4051
 msgid "internal error: out of range error"
 msgstr "intern fejl: uden for intervallet"
 
-#: elf-m10200.c:454 elf-m10300.c:1564 elf32-avr.c:1267 elf32-bfin.c:3197
-#: elf32-cr16.c:1486 elf32-cr16c.c:784 elf32-cris.c:2081 elf32-crx.c:926
-#: elf32-d10v.c:513 elf32-fr30.c:613 elf32-frv.c:4115 elf32-h8300.c:513
-#: elf32-i860.c:1215 elf32-iq2000.c:688 elf32-lm32.c:1172 elf32-m32c.c:557
-#: elf32-m32r.c:3115 elf32-m68hc1x.c:1142 elf32-mep.c:538
-#: elf32-microblaze.c:1235 elf32-moxie.c:286 elf32-msp430.c:490
-#: elf32-openrisc.c:408 elf32-score.c:2735 elf32-score7.c:2544
-#: elf32-spu.c:5046 elf32-v850.c:2147 elf32-xstormy16.c:945 elf64-mmix.c:1526
-#: elfxx-mips.c:9186
+#: elf-m10200.c:434 elf-m10300.c:2168 elf32-avr.c:1260 elf32-bfin.c:3224
+#: elf32-cr16.c:1488 elf32-cr16c.c:784 elf32-cris.c:2020 elf32-crx.c:926
+#: elf32-d10v.c:517 elf32-fr30.c:593 elf32-frv.c:4043 elf32-h8300.c:529
+#: elf32-i860.c:1216 elf32-iq2000.c:692 elf32-lm32.c:1164 elf32-m32c.c:557
+#: elf32-m32r.c:3070 elf32-m68hc1x.c:1287 elf32-mep.c:539 elf32-metag.c:1996
+#: elf32-microblaze.c:1564 elf32-moxie.c:286 elf32-msp430.c:1321
+#: elf32-nds32.c:4914 elf32-openrisc.c:408 elf32-score.c:2733
+#: elf32-score7.c:2541 elf32-spu.c:5045 elf32-tilepro.c:3670 elf32-v850.c:2285
+#: elf32-xstormy16.c:940 elf64-mmix.c:1542 elfxx-mips.c:9995
+#: elfxx-tilegx.c:4055
 msgid "internal error: unsupported relocation error"
 msgstr "intern fejl: relokeringen understÃ¸ttes ikke"
 
-#: elf-m10200.c:458 elf32-cr16.c:1490 elf32-cr16c.c:788 elf32-crx.c:930
-#: elf32-d10v.c:517 elf32-h8300.c:517 elf32-lm32.c:1176 elf32-m32r.c:3119
-#: elf32-m68hc1x.c:1146 elf32-microblaze.c:1239 elf32-score.c:2739
-#: elf32-score7.c:2548 elf32-spu.c:5050
+#: elf-m10200.c:438 elf32-cr16.c:1492 elf32-cr16c.c:788 elf32-crx.c:930
+#: elf32-d10v.c:521 elf32-h8300.c:533 elf32-lm32.c:1168 elf32-m32r.c:3074
+#: elf32-m68hc1x.c:1291 elf32-microblaze.c:1568 elf32-nds32.c:4918
+#: elf32-score.c:2737 elf32-score7.c:2545 elf32-spu.c:5049
 msgid "internal error: dangerous error"
 msgstr "intern fejl: farlig fejl"
 
-#: elf-m10200.c:462 elf-m10300.c:1577 elf32-avr.c:1275 elf32-bfin.c:3205
-#: elf32-cr16.c:1494 elf32-cr16c.c:792 elf32-cris.c:2089 elf32-crx.c:934
-#: elf32-d10v.c:521 elf32-fr30.c:621 elf32-frv.c:4123 elf32-h8300.c:521
-#: elf32-i860.c:1223 elf32-ip2k.c:1483 elf32-iq2000.c:696 elf32-lm32.c:1180
-#: elf32-m32c.c:565 elf32-m32r.c:3123 elf32-m68hc1x.c:1150 elf32-mep.c:546
-#: elf32-microblaze.c:1243 elf32-moxie.c:294 elf32-msp430.c:498 elf32-mt.c:403
-#: elf32-openrisc.c:416 elf32-score.c:2748 elf32-score7.c:2552
-#: elf32-spu.c:5054 elf32-v850.c:2167 elf32-xstormy16.c:953 elf64-mmix.c:1534
+#: elf-m10200.c:442 elf-m10300.c:2184 elf32-avr.c:1268 elf32-bfin.c:3232
+#: elf32-cr16.c:1496 elf32-cr16c.c:792 elf32-cris.c:2028 elf32-crx.c:934
+#: elf32-d10v.c:525 elf32-epiphany.c:572 elf32-fr30.c:601 elf32-frv.c:4051
+#: elf32-h8300.c:537 elf32-i860.c:1224 elf32-ip2k.c:1483 elf32-iq2000.c:700
+#: elf32-lm32.c:1172 elf32-m32c.c:565 elf32-m32r.c:3078 elf32-m68hc1x.c:1295
+#: elf32-mep.c:547 elf32-metag.c:2004 elf32-microblaze.c:1572
+#: elf32-moxie.c:294 elf32-msp430.c:1329 elf32-mt.c:403 elf32-nds32.c:4922
+#: elf32-openrisc.c:416 elf32-score.c:2746 elf32-score7.c:2549
+#: elf32-spu.c:5053 elf32-tilepro.c:3678 elf32-v850.c:2305
+#: elf32-xstormy16.c:948 elf64-mmix.c:1550 elfxx-tilegx.c:4063
 msgid "internal error: unknown error"
 msgstr "intern fejl: ukendt fejl"
 
-#: elf-m10300.c:1504 elf32-arm.c:9098 elf32-i386.c:4081 elf32-m32r.c:2604
-#: elf32-m68k.c:4156 elf32-ppc.c:8089 elf32-s390.c:3010 elf32-sh.c:4223
-#: elf32-xtensa.c:3067 elf64-ppc.c:13115 elf64-s390.c:2985 elf64-sh64.c:1636
-#: elf64-x86-64.c:3719 elfxx-sparc.c:3806
+#: elf-m10300.c:1021
+#, c-format
+msgid "%s: Unsupported transition from %s to %s"
+msgstr "%s: Overgang fra %s til %s som ikke understÃ¸ttes"
+
+# er ' en fejl her?
+#: elf-m10300.c:1213
+msgid "%B: %s' accessed both as normal and thread local symbol"
+msgstr "%B: \"%s\" tilgÃ¥s bÃ¥de som normalt symbol og trÃ¥dlokalt symbol"
+
+#: elf-m10300.c:2108 elf32-arm.c:10632 elf32-i386.c:4363 elf32-m32r.c:2558
+#: elf32-m68k.c:4120 elf32-s390.c:3303 elf32-sh.c:4109 elf32-tilepro.c:3569
+#: elf32-xtensa.c:3063 elf64-s390.c:3229 elf64-sh64.c:1640 elf64-x86-64.c:4463
+#: elfxx-sparc.c:3904 elfxx-tilegx.c:3974
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4450
 msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
 msgstr "%B(%A+0x%lx): ulÃ¸selig %s-relokering mod symbol \"%s\""
 
-#: elf-m10300.c:1569
+#: elf-m10300.c:2173
 msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)"
 msgstr "fejl: upassende relokeringstype til delt bibliotek (glemte du -fpic?)"
 
-#: elf-m10300.c:1572
+#: elf-m10300.c:2176
+msgid "%B: taking the address of protected function '%s' cannot be done when making a shared library"
+msgstr "%B: man kan ikke tage adressen for en beskyttet funktion \"%s\" nÃ¥r man laver et delt bibliotek"
+
+#: elf-m10300.c:2179
 msgid "internal error: suspicious relocation type used in shared library"
 msgstr "intern fejl: mistÃ¦nkelig relokeringstype brugt i delt bibliotek"
 
-#: elf-m10300.c:4372 elf32-arm.c:11392 elf32-cr16.c:2451 elf32-cris.c:3044
-#: elf32-hppa.c:1894 elf32-i370.c:503 elf32-i386.c:2036 elf32-lm32.c:1868
-#: elf32-m32r.c:1927 elf32-m68k.c:3252 elf32-ppc.c:4994 elf32-s390.c:1652
-#: elf32-sh.c:2931 elf32-vax.c:1040 elf64-ppc.c:6483 elf64-s390.c:1635
-#: elf64-sh64.c:3377 elf64-x86-64.c:1871 elfxx-sparc.c:2104
-#, c-format
-msgid "dynamic variable `%s' is zero size"
-msgstr "dynamisk variabel \"%s\" har stÃ¸rrelse nul"
-
-#: elf.c:334
+#: elf.c:343
 msgid "%B: invalid string offset %u >= %lu for section `%s'"
-msgstr "%B: ugyldigt strengafsÃ¦t %u >= %lu for sektionen \"%s\""
+msgstr "%B: ugyldigt strengafsÃ¦t %u >= %lu for afsnittet \"%s\""
 
-#: elf.c:446
+#: elf.c:455
 msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
-msgstr "%B-symbol nummer %lu refererer SHT_SYMTAB_SHNDX-sektion, der ikke findes"
+msgstr "%B-symbol nummer %lu refererer SHT_SYMTAB_SHNDX-afsnit, der ikke findes"
 
-#: elf.c:602
+#: elf.c:611
 msgid "%B: Corrupt size field in group section header: 0x%lx"
-msgstr "%B: Beskadiget stÃ¸rrelsesfelt i gruppesektionshoved: 0x%lx"
+msgstr "%B: Beskadiget stÃ¸rrelsesfelt i gruppeafsnitsshoved: 0x%lx"
 
-#: elf.c:638
+#: elf.c:647
 msgid "%B: invalid SHT_GROUP entry"
 msgstr "%B: ugyldig SHT_GROUP-post"
 
-#: elf.c:708
+#: elf.c:717
 msgid "%B: no group info for section %A"
-msgstr "%B: ingen gruppeinformation for sektionen %A"
+msgstr "%B: ingen gruppeinformation for afsnittet %A"
 
-#: elf.c:737 elf.c:3090 elflink.c:10062
+#: elf.c:746 elf.c:3144 elflink.c:10290
 msgid "%B: warning: sh_link not set for section `%A'"
-msgstr "%B: advarsel: sh_link ikke givet for sektionen \"%s\""
+msgstr "%B: advarsel: sh_link ikke givet for afsnittet \"%A\""
 
-#: elf.c:756
+#: elf.c:765
 msgid "%B: sh_link [%d] in section `%A' is incorrect"
-msgstr "%B: sh_link [%d] sektionen \"%s\" er forkert"
+msgstr "%B: sh_link [%d] afsnittet \"%A\" er forkert"
 
-#: elf.c:791
+#: elf.c:800
 msgid "%B: unknown [%d] section `%s' in group [%s]"
-msgstr "%B: ukendt [%d] sektion \"%s\" i gruppe [%s]"
-
-#: elf.c:1041
-msgid "%B: unable to initialize commpress status for section %s"
-msgstr "%B: kan ikke initiere commpress-status for sektion %s"
+msgstr "%B: ukendt [%d] afsnit \"%s\" i gruppe [%s]"
 
-#: elf.c:1050
-msgid "%B: unable to initialize decommpress status for section %s"
-msgstr "%B: kan ikke klargÃ¸re afkomprimeringsstatus for sektion %s"
-
-#: elf.c:1158
+#: elf.c:1174
 #, c-format
 msgid ""
 "\n"
@@ -775,16 +819,16 @@ msgstr ""
 "\n"
 "Programhoved:\n"
 
-#: elf.c:1200
+#: elf.c:1216
 #, c-format
 msgid ""
 "\n"
 "Dynamic Section:\n"
 msgstr ""
 "\n"
-"Dynamisk sektion:\n"
+"Dynamisk afsnit:\n"
 
-#: elf.c:1336
+#: elf.c:1352
 #, c-format
 msgid ""
 "\n"
@@ -793,7 +837,7 @@ msgstr ""
 "\n"
 "Versionsdefinitioner:\n"
 
-#: elf.c:1361
+#: elf.c:1377
 #, c-format
 msgid ""
 "\n"
@@ -802,90 +846,108 @@ msgstr ""
 "\n"
 "Versionsreferencer:\n"
 
-#: elf.c:1366
+#: elf.c:1382
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  krÃ¦ves fra %s:\n"
 
-#: elf.c:1773
+#: elf.c:1807
 msgid "%B: invalid link %lu for reloc section %s (index %u)"
-msgstr "%B: ugyldig lÃ¦nke %lu for relokeringssektion %s (indeks %u)"
+msgstr "%B: ugyldigt link %lu for relokeringsafsnit %s (indeks %u)"
 
-#: elf.c:1943
+#: elf.c:1977
 msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]"
-msgstr "%B: ved ikke hvordan allokeret, programspecifik sektion \"%s\" [0x%8x] skal hÃ¥ndteres"
+msgstr "%B: ved ikke hvordan allokeret, programspecifikt afsnit \"%s\" [0x%8x] skal hÃ¥ndteres"
 
-#: elf.c:1955
+#: elf.c:1989
 msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
-msgstr "%B: ved ikke hvordan processorspecifik sektion \"%s\" [0x%8x] skal hÃ¥ndteres"
+msgstr "%B: ved ikke hvordan processorspecifik afsnit \"%s\" [0x%8x] skal hÃ¥ndteres"
 
-#: elf.c:1966
+#: elf.c:2000
 msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
-msgstr "%B: ved ikke hvordan OS-specifik sektion \"%s\" [0x%8x] skal hÃ¥ndteres"
+msgstr "%B: ved ikke hvordan OS-specifik afsnit \"%s\" [0x%8x] skal hÃ¥ndteres"
 
-#: elf.c:1976
+#: elf.c:2010
 msgid "%B: don't know how to handle section `%s' [0x%8x]"
-msgstr "%B: ved ikke hvordan sektion \"%s\" [0x%8x] skal hÃ¥ndteres"
+msgstr "%B: ved ikke hvordan afsnit \"%s\" [0x%8x] skal hÃ¥ndteres"
 
-#: elf.c:2603
+#: elf.c:2648
 #, c-format
 msgid "warning: section `%A' type changed to PROGBITS"
-msgstr "advarsel: typen af sektionen \"%A\" Ã¦ndret til PROGBITS"
+msgstr "advarsel: typen af afsnittet \"%A\" Ã¦ndret til PROGBITS"
+
+#: elf.c:3015
+msgid "%B: too many sections: %u"
+msgstr "%B: for mange afsnit: %u"
 
-#: elf.c:3047
+#: elf.c:3101
 msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
-msgstr "%B: sh_link af sektion \"%A\" peger pÃ¥ forkastet sektion \"%A\" i \"%B\""
+msgstr "%B: sh_link af afsnit \"%A\" peger pÃ¥ forkastet afsnit \"%A\" i \"%B\""
 
-#: elf.c:3070
+#: elf.c:3124
 msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
-msgstr "%B: sh_link af sektion \"%A\" peger pÃ¥ fjernet sektion \"%A\" af \"%B\""
+msgstr "%B: sh_link af afsnit \"%A\" peger pÃ¥ fjernet afsnit \"%A\" af \"%B\""
 
-#: elf.c:4480
+#: elf.c:4126
+msgid "%B: TLS sections are not adjacent:"
+msgstr "%B: TLS-afsnit er ikke ved siden af hinanden:"
+
+#: elf.c:4133
+#, c-format
+msgid "\t    TLS: %A"
+msgstr "\t    TLS: %A"
+
+#: elf.c:4137
+#, c-format
+msgid "\tnon-TLS: %A"
+msgstr "\tikke-TLS: %A"
+
+#: elf.c:4596
 msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
-msgstr "%B: FÃ¸rste sektion i segmentet PT_DYNAMIC er ikke .dynamic-sektionen"
+msgstr "%B: FÃ¸rste afsnit i segmentet PT_DYNAMIC er ikke .dynamic-afsnittet"
 
-#: elf.c:4507
+#: elf.c:4621
 msgid "%B: Not enough room for program headers, try linking with -N"
-msgstr "%s: Ikke tilstrÃ¦kkeligt med plads til programhoveder, forsÃ¸g at lÃ¦nke med -N"
+msgstr "%B: Ikke tilstrÃ¦kkeligt med plads til programhoveder, forsÃ¸g at linke med -N"
 
-#: elf.c:4594
+#: elf.c:4707
 msgid "%B: section %A lma %#lx adjusted to %#lx"
-msgstr "%B: sektion %A lma %#lx justeret til %#lx"
+msgstr "%B: afsnit %A lma %#lx justeret til %#lx"
 
-#: elf.c:4713
+#: elf.c:4843
 msgid "%B: section `%A' can't be allocated in segment %d"
-msgstr "%B: sektion \"%A\" kan ikke allokeres i segment %d"
+msgstr "%B: afsnit \"%A\" kan ikke allokeres i segment %d"
 
-#: elf.c:4761
+#: elf.c:4892
 msgid "%B: warning: allocated section `%s' not in segment"
-msgstr "%B: advarsel: allokeret sektion \"%s\" ikke i segment"
+msgstr "%B: advarsel: allokeret afsnit \"%s\" ikke i segment"
 
-#: elf.c:5257
+#: elf.c:5473
 msgid "%B: symbol `%s' required but not present"
 msgstr "%B: symbol \"%s\" krÃ¦ves, men er ikke tilstede"
 
-#: elf.c:5595
+#: elf.c:5811
 msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr "%B: advarsel: Tomt indlÃ¦seligt segment opdaget, er dette meningen?\n"
 
-#: elf.c:6622
+#: elf.c:6867
 #, c-format
 msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
-msgstr "Kunne ikke finde Ã¦kvivalent uddatasektion for symbolet \"%s\" fra sektionen \"%s\""
+msgstr "Kunne ikke finde Ã¦kvivalent uddataafsnit for symbolet \"%s\" fra afsnittet \"%s\""
 
-#: elf.c:7611
+#: elf.c:7915
 msgid "%B: unsupported relocation type %s"
 msgstr "%B: relokeringstypen %s understÃ¸ttes ikke"
 
-#: elf32-arm.c:3183
+#: elf32-arm.c:3722 elf32-arm.c:7051
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
 "  first occurrence: %B: Thumb call to ARM"
 msgstr ""
-"%s(%s): advarsel: samvirken (interworking) er ikke aktiveret.\n"
+"%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.\n"
 "  fÃ¸rste forekomst: %B: Thumb-kald til ARM"
 
-#: elf32-arm.c:3226
+#: elf32-arm.c:3769
 msgid ""
 "%B(%s): warning: interworking not enabled.\n"
 "  first occurrence: %B: ARM call to Thumb"
@@ -893,622 +955,702 @@ msgstr ""
 "%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.\n"
 "  fÃ¸rste forekomst: %B: ARM-kald til Thumb"
 
-#: elf32-arm.c:3432 elf32-arm.c:4807
+#: elf32-arm.c:3988 elf32-arm.c:5433
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:2324
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: kan ikke oprette stub-posten %s"
 
-#: elf32-arm.c:4923
+#: elf32-arm.c:5549
 #, c-format
 msgid "unable to find THUMB glue '%s' for '%s'"
-msgstr "kan ikke finde finde THUMB-klistret \"%s\" til \"%s\""
+msgstr "kan ikke finde THUMB-klistret \"%s\" til \"%s\""
 
-#: elf32-arm.c:4959
+#: elf32-arm.c:5585
 #, c-format
 msgid "unable to find ARM glue '%s' for '%s'"
 msgstr "kan ikke finde ARM-klistret \"%s\" til \"%s\""
 
-#: elf32-arm.c:5485
+#: elf32-arm.c:6123
 msgid "%B: BE8 images only valid in big-endian mode."
 msgstr "%B: BE8-aftryk er kun gyldige i big-endian-tilstanden."
 
 #. Give a warning, but do as the user requests anyway.
-#: elf32-arm.c:5715
+#: elf32-arm.c:6353
 msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture"
 msgstr "%B: advarsel: valgte omgÃ¥else af VFP11-erratum er ikke nÃ¸dvendig for mÃ¥larkitekturen"
 
-#: elf32-arm.c:6259 elf32-arm.c:6279
+#: elf32-arm.c:6897 elf32-arm.c:6917
 msgid "%B: unable to find VFP11 veneer `%s'"
 msgstr "%B: kan ikke finde VFP11-veneer \"%s\""
 
-#: elf32-arm.c:6327
+#: elf32-arm.c:6966
 #, c-format
 msgid "Invalid TARGET2 relocation type '%s'."
 msgstr "Ugyldig TARGET2-relokeringstype \"%s\"."
 
-#: elf32-arm.c:6411
-msgid ""
-"%B(%s): warning: interworking not enabled.\n"
-"  first occurrence: %B: thumb call to arm"
-msgstr ""
-"%B(%s): advarsel: samvirken (interworking) er ikke aktiveret.\n"
-"  fÃ¸rste forekomst: %B: thumb-kald til arm"
+#. PR ld/16017: Do not generate ARM instructions for
+#. the PLT if compiling for a thumb-only target.
+#.
+#. FIXME: We ought to be able to generate thumb PLT instructions...
+#: elf32-arm.c:7696
+msgid "%B: Warning: thumb mode PLT generation not currently supported"
+msgstr "%B: Advarsel: PLT-generering i \"thumb mode\" understÃ¸ttes ikke i Ã¸jeblikket"
+
+#: elf32-arm.c:7909
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): uventet Thumb-instruktion \"0x%x\" i TLS-trampolin"
+
+#: elf32-arm.c:7948
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): uventet ARM-instruktion \"0x%x\" i TLS-trampolin"
 
-#: elf32-arm.c:7130
+#: elf32-arm.c:8412
 msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "\\%B: Advarsel: Arm BLX-instruktion bruger Arm-funktionen \"%s\" som mÃ¥l."
 
-#: elf32-arm.c:7541
+#: elf32-arm.c:8831
 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%B: Advarsel: Thumb BLX-instruktionen bruger thumb-funktionen \"%s\" som mÃ¥l."
 
-#: elf32-arm.c:8223
+#: elf32-arm.c:9672
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): uventet Thumb-instruktion \"0x%x\" refereret af TLS_GOTDESC"
+
+#: elf32-arm.c:9695
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): uventet ARM-instruktion \"0x%x\" refereret af TLS_GOTDESC"
+
+#: elf32-arm.c:9724
 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
 msgstr "%B(%A+0x%lx): Relokering af R_ARM_TLS_LE32 er ikke tilladt i delt objekt"
 
-#: elf32-arm.c:8438
+#: elf32-arm.c:9937
 msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"
 msgstr "%B(%A+0x%lx): Kun instruktionerne ADD og SUB er tilladt for ALU-grupperelokeringer"
 
-#: elf32-arm.c:8478 elf32-arm.c:8565 elf32-arm.c:8648 elf32-arm.c:8733
+#: elf32-arm.c:9977 elf32-arm.c:10065 elf32-arm.c:10149 elf32-arm.c:10235
 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
 msgstr "%B(%A+0x%lx): OverlÃ¸b ved opdeling af 0x%lx til grupperelokering %s"
 
-#: elf32-arm.c:8963 elf32-sh.c:4112 elf64-sh64.c:1544
+#: elf32-arm.c:10474 elf32-sh.c:3994 elf64-sh64.c:1544
 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
-msgstr "%B(%A+0x%lx): %s-relokering mod SEC_MERGE-sektion"
+msgstr "%B(%A+0x%lx): %s-relokering mod SEC_MERGE-afsnit"
 
-#: elf32-arm.c:9074 elf32-m68k.c:4191 elf32-xtensa.c:2805 elf64-ppc.c:11689
+#: elf32-arm.c:10585 elf32-m68k.c:4155 elf32-xtensa.c:2799
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4192
 msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
 msgstr "%B(%A+0x%lx): %s bruges med TLS-symbol %s"
 
-#: elf32-arm.c:9075 elf32-m68k.c:4192 elf32-xtensa.c:2806 elf64-ppc.c:11690
+#: elf32-arm.c:10586 elf32-m68k.c:4156 elf32-xtensa.c:2800
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4193
 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
 msgstr "%B(%A+0x%lx): %s bruges med ikke-TLS-symbol %s"
 
-#: elf32-arm.c:9132 elf32-tic6x.c:1632
+#: elf32-arm.c:10666 elf32-tic6x.c:2736
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4481
 msgid "out of range"
 msgstr "uden for gyldigt interval"
 
-#: elf32-arm.c:9136 elf32-tic6x.c:1636
+#: elf32-arm.c:10670 elf32-nios2.c:3525 elf32-tic6x.c:2740
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4485
 msgid "unsupported relocation"
 msgstr "relokeringen understÃ¸ttes ikke"
 
-#: elf32-arm.c:9144 elf32-tic6x.c:1644
+#: elf32-arm.c:10678 elf32-nios2.c:3535 elf32-tic6x.c:2748
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4493
 msgid "unknown error"
 msgstr "ukendt fejl"
 
-#: elf32-arm.c:9569
+#: elf32-arm.c:11153
 msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"
-msgstr "Advarsel: Fjerner samvirkendeflaget (interworking) i %B eftersom ikke-samvirkende kode i %B er lÃ¦nket med det"
+msgstr "Advarsel: Fjerner samvirkendeflaget (interworking) i %B eftersom ikke-samvirkende kode i %B er linket med det"
 
-#: elf32-arm.c:9663
+#: elf32-arm.c:11240
 msgid "%B: Unknown mandatory EABI object attribute %d"
-msgstr "%B: Ukendt obligatorisk EABI-objekt-attribut %d"
+msgstr "%B: Ukendt obligatorisk EABI-objektattribut %d"
 
-#: elf32-arm.c:9671
+#: elf32-arm.c:11248
 msgid "Warning: %B: Unknown EABI object attribute %d"
-msgstr "Advarsel: %B: Ukendt EABI-objekt-attribut %d"
+msgstr "Advarsel: %B: Ukendt EABI-objektattribut %d"
 
-#: elf32-arm.c:9852
+#: elf32-arm.c:11449
 msgid "error: %B: Unknown CPU architecture"
 msgstr "Fejl: %B: Ukendt CPU-arkitektur"
 
-#: elf32-arm.c:9890
+#: elf32-arm.c:11487
 msgid "error: %B: Conflicting CPU architectures %d/%d"
 msgstr "fejl: %B: Modstridende CPU-arkitekturer %d/%d"
 
-#: elf32-arm.c:9942
+#: elf32-arm.c:11576
 msgid "Error: %B has both the current and legacy Tag_MPextension_use attributes"
 msgstr "Fejl: %B har bÃ¥de nuvÃ¦rende og Ã¦ldre Tag_MPextension_use-attributter"
 
-#: elf32-arm.c:9967
+#: elf32-arm.c:11601
 msgid "error: %B uses VFP register arguments, %B does not"
 msgstr "fejl: %B bruger VFP-registerargumenter, mens %B ikke gÃ¸r"
 
-#: elf32-arm.c:10112
+#: elf32-arm.c:11747
 msgid "error: %B: unable to merge virtualization attributes with %B"
 msgstr "fejl: %B: kan ikke sammenfÃ¸je virtualiseringsattributter med %B"
 
-#: elf32-arm.c:10138
+#: elf32-arm.c:11773
 msgid "error: %B: Conflicting architecture profiles %c/%c"
 msgstr "fejl: %B: Modstridende arkitekturprofiler %c/%c"
 
-#: elf32-arm.c:10239
+#: elf32-arm.c:11877
 msgid "Warning: %B: Conflicting platform configuration"
 msgstr "Advarsel: %B: Modstridende platformkonfiguration"
 
-#: elf32-arm.c:10248
+#: elf32-arm.c:11886
 msgid "error: %B: Conflicting use of R9"
 msgstr "fejl: %B: Modstridende brug af R9"
 
-#: elf32-arm.c:10260
+#: elf32-arm.c:11898
 msgid "error: %B: SB relative addressing conflicts with use of R9"
 msgstr "fejl: %B: SB-relativ adressering strider med brugen af R9"
 
-#: elf32-arm.c:10273
+#: elf32-arm.c:11911
 msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail"
 msgstr "advarsel: %B bruger wchar_t pÃ¥ %u byte, men uddata skal bruge wchar_t pÃ¥ %u byte; brug af wchar_t-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galt"
 
-#: elf32-arm.c:10304
+#: elf32-arm.c:11942
 msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail"
 msgstr "advarsel: %B bruger %s-enum'er, men uddata skal bruge %s-enum'er; brug af enum-vÃ¦rdier pÃ¥ tvÃ¦rs af objekter kan gÃ¥ galt"
 
-#: elf32-arm.c:10316
+#: elf32-arm.c:11954
 msgid "error: %B uses iWMMXt register arguments, %B does not"
 msgstr "fejl: %B bruger iWMMXt-registerargumenter, mens %B ikke gÃ¸r"
 
-#: elf32-arm.c:10333
+#: elf32-arm.c:11971
 msgid "error: fp16 format mismatch between %B and %B"
 msgstr "fejl: uoverensstemmelse i fp16-format mellem %B og %B"
 
-#: elf32-arm.c:10357
-msgid "DIV usage mismatch between %B and %B"
-msgstr "Uoverensstemmelse i DIV-forbrug mellem %B og %B"
-
-#: elf32-arm.c:10376
+#: elf32-arm.c:12007
 msgid "%B has has both the current and legacy Tag_MPextension_use attributes"
 msgstr "%B har bÃ¥de nuvÃ¦rende og Ã¦ldre Tag_MPextension_use-attributter"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
 #. Ignore init flag - it may not be set, despite the flags field containing valid data.
-#: elf32-arm.c:10468 elf32-bfin.c:5065 elf32-cris.c:4162 elf32-m68hc1x.c:1282
-#: elf32-m68k.c:1235 elf32-score.c:3996 elf32-score7.c:3803 elf32-vax.c:528
-#: elfxx-mips.c:12842
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#: elf32-arm.c:12095 elf32-bfin.c:4949 elf32-cris.c:4139 elf32-m68hc1x.c:1427
+#: elf32-m68k.c:1195 elf32-score.c:4004 elf32-score7.c:3808 elf32-vax.c:529
+#: elf32-xgate.c:674 elfxx-mips.c:14955
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4645
 #, c-format
 msgid "private flags = %lx:"
 msgstr "private flag = %lx:"
 
-#: elf32-arm.c:10477
+#: elf32-arm.c:12104
 #, c-format
 msgid " [interworking enabled]"
 msgstr " [samvirkende er aktiveret]"
 
-#: elf32-arm.c:10485
+#: elf32-arm.c:12112
 #, c-format
 msgid " [VFP float format]"
 msgstr " [VFP-flydendetalsformat]"
 
-#: elf32-arm.c:10487
+#: elf32-arm.c:12114
 #, c-format
 msgid " [Maverick float format]"
 msgstr " [Maverick-flydendetalformat]"
 
-#: elf32-arm.c:10489
+#: elf32-arm.c:12116
 #, c-format
 msgid " [FPA float format]"
 msgstr " [FPA-flydendetalformat]"
 
-#: elf32-arm.c:10498
+#: elf32-arm.c:12125
 #, c-format
 msgid " [new ABI]"
 msgstr " [nyt ABI]"
 
-#: elf32-arm.c:10501
+#: elf32-arm.c:12128
 #, c-format
 msgid " [old ABI]"
 msgstr " [gammelt ABI]"
 
-#: elf32-arm.c:10504
+#: elf32-arm.c:12131
 #, c-format
 msgid " [software FP]"
 msgstr " [programmeret FP]"
 
-#: elf32-arm.c:10513
+#: elf32-arm.c:12140
 #, c-format
 msgid " [Version1 EABI]"
 msgstr " [Version1 EABI]"
 
-#: elf32-arm.c:10516 elf32-arm.c:10527
+#: elf32-arm.c:12143 elf32-arm.c:12154
 #, c-format
 msgid " [sorted symbol table]"
 msgstr " [sorteret symboltabel]"
 
-#: elf32-arm.c:10518 elf32-arm.c:10529
+#: elf32-arm.c:12145 elf32-arm.c:12156
 #, c-format
 msgid " [unsorted symbol table]"
 msgstr " [usorteret symboltabel]"
 
-#: elf32-arm.c:10524
+#: elf32-arm.c:12151
 #, c-format
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.c:10532
+#: elf32-arm.c:12159
 #, c-format
 msgid " [dynamic symbols use segment index]"
 msgstr " [dynamiske symboler bruger segmentindeks]"
 
-#: elf32-arm.c:10535
+#: elf32-arm.c:12162
 #, c-format
 msgid " [mapping symbols precede others]"
 msgstr " [mapningssymboler foretrÃ¦kkes frem for andre]"
 
-#: elf32-arm.c:10542
+#: elf32-arm.c:12169
 #, c-format
 msgid " [Version3 EABI]"
 msgstr " [Version3 EABI]"
 
-#: elf32-arm.c:10546
+#: elf32-arm.c:12173
 #, c-format
 msgid " [Version4 EABI]"
 msgstr " [Version4 EABI]"
 
-#: elf32-arm.c:10550
+#: elf32-arm.c:12177
 #, c-format
 msgid " [Version5 EABI]"
 msgstr " [Version5 EABI]"
 
-#: elf32-arm.c:10553
+#: elf32-arm.c:12180
+#, c-format
+msgid " [soft-float ABI]"
+msgstr " [soft-float ABI]"
+
+#: elf32-arm.c:12183
+#, c-format
+msgid " [hard-float ABI]"
+msgstr " [hard-float ABI]"
+
+#: elf32-arm.c:12189
 #, c-format
 msgid " [BE8]"
 msgstr " [BE8]"
 
-#: elf32-arm.c:10556
+#: elf32-arm.c:12192
 #, c-format
 msgid " [LE8]"
 msgstr " [LE8]"
 
-#: elf32-arm.c:10562
+#: elf32-arm.c:12198
 #, c-format
 msgid " <EABI version unrecognised>"
 msgstr " <EABI-version genkendes ikke>"
 
-#: elf32-arm.c:10569
+#: elf32-arm.c:12205
 #, c-format
 msgid " [relocatable executable]"
 msgstr " [relokÃ©rbar kÃ¸rbar fil]"
 
-#: elf32-arm.c:10572
+#: elf32-arm.c:12208
 #, c-format
 msgid " [has entry point]"
 msgstr " [har startpunkt]"
 
-#: elf32-arm.c:10577
+#: elf32-arm.c:12213 /src/binutils-gdb/bfd/elfnn-aarch64.c:4648
 #, c-format
 msgid "<Unrecognised flag bits set>"
 msgstr "<Ukendte flagbit er sat>"
 
-#: elf32-arm.c:10824 elf32-i386.c:1322 elf32-s390.c:1000 elf32-xtensa.c:1009
-#: elf64-s390.c:960 elf64-x86-64.c:1105 elfxx-sparc.c:1370
+#: elf32-arm.c:12522 elf32-i386.c:1452 elf32-s390.c:1005 elf32-tic6x.c:2812
+#: elf32-tilepro.c:1511 elf32-xtensa.c:999 elf64-s390.c:927
+#: elf64-x86-64.c:1467 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:5038
 msgid "%B: bad symbol index: %d"
 msgstr "%B: fejlagtigt symbolindeks: %d"
 
-#: elf32-arm.c:10946 elf64-x86-64.c:1265 elf64-x86-64.c:1434 elfxx-mips.c:7942
+#: elf32-arm.c:12674 elf32-metag.c:2283 elf64-x86-64.c:1593
+#: elf64-x86-64.c:1771 elfxx-mips.c:8482
 msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"
 msgstr "%B: relokeringen %s mod \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC"
 
-#: elf32-arm.c:11948
+#: elf32-arm.c:13796
 #, c-format
 msgid "Errors encountered processing file %s"
 msgstr "StÃ¸dte pÃ¥ fejl ved behandling af filen %s"
 
-#: elf32-arm.c:13334
+#: elf32-arm.c:14230
+#, c-format
+msgid "error: required section '%s' not found in the linker script"
+msgstr "fejl: pÃ¥krÃ¦vet afsnit \"%s\" ikke fundet i linkerscript"
+
+#: elf32-arm.c:15252
 msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location"
 msgstr "%B: fejl: Cortex-A8-erratum-stub er allokeret pÃ¥ et usikkert sted"
 
 #. There's not much we can do apart from complain if this
 #. happens.
-#: elf32-arm.c:13361
+#: elf32-arm.c:15279
 msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)"
 msgstr "%B: fejl: Cortex-A8-erratum-stub er uden for gyldigt interval (inddatafil for stor)"
 
-#: elf32-arm.c:13455 elf32-arm.c:13477
+#: elf32-arm.c:15373 elf32-arm.c:15395
 msgid "%B: error: VFP11 veneer out of range"
 msgstr "%B: fejl: VFP11-veneer uden for gyldigt interval"
 
-#: elf32-arm.c:14002
+#: elf32-arm.c:16020
 msgid "error: %B is already in final BE8 format"
 msgstr "fejl: %B er allerede i endeligt BE8-format"
 
-#: elf32-arm.c:14078
+#: elf32-arm.c:16096
 msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d"
 msgstr "fejl: Kildeobjektet %B har EABI-version %d, men mÃ¥let %B har EABI-version %d"
 
-#: elf32-arm.c:14094
+#: elf32-arm.c:16112
 msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
 msgstr "fejl: %B er kompileret til APCS-%d, mens mÃ¥let %B bruger APCS-%d"
 
-#: elf32-arm.c:14119
+#: elf32-arm.c:16137
 msgid "error: %B uses VFP instructions, whereas %B does not"
 msgstr "fejl: %B bruger VFP-instruktioner, mens %B ikke gÃ¸r"
 
-#: elf32-arm.c:14123
+#: elf32-arm.c:16141
 msgid "error: %B uses FPA instructions, whereas %B does not"
 msgstr "fejl: %B bruger FPA-instruktioner, mens %B ikke gÃ¸r"
 
-#: elf32-arm.c:14133
+#: elf32-arm.c:16151
 msgid "error: %B uses Maverick instructions, whereas %B does not"
 msgstr "fejl: %B bruger Maverick-instruktioner, mens %B ikke gÃ¸r"
 
-#: elf32-arm.c:14137
+#: elf32-arm.c:16155
 msgid "error: %B does not use Maverick instructions, whereas %B does"
 msgstr "fejl: %B bruger ikke Maverick-instruktioner, men %B gÃ¸r"
 
-#: elf32-arm.c:14156
+#: elf32-arm.c:16174
 msgid "error: %B uses software FP, whereas %B uses hardware FP"
 msgstr "fejl: %B bruger flydende tal i software, mens %B bruger hardware"
 
-#: elf32-arm.c:14160
+#: elf32-arm.c:16178
 msgid "error: %B uses hardware FP, whereas %B uses software FP"
 msgstr "fejl: %B bruger flydende tal i hardware, mens %B bruger software"
 
-#: elf32-avr.c:1271 elf32-bfin.c:3201 elf32-cris.c:2085 elf32-fr30.c:617
-#: elf32-frv.c:4119 elf32-i860.c:1219 elf32-ip2k.c:1479 elf32-iq2000.c:692
-#: elf32-m32c.c:561 elf32-mep.c:542 elf32-moxie.c:290 elf32-msp430.c:494
-#: elf32-mt.c:399 elf32-openrisc.c:412 elf32-v850.c:2151 elf32-xstormy16.c:949
-#: elf64-mmix.c:1530
+#: elf32-avr.c:1264 elf32-bfin.c:3228 elf32-cris.c:2024 elf32-epiphany.c:568
+#: elf32-fr30.c:597 elf32-frv.c:4047 elf32-i860.c:1220 elf32-ip2k.c:1479
+#: elf32-iq2000.c:696 elf32-m32c.c:561 elf32-mep.c:543 elf32-metag.c:2000
+#: elf32-moxie.c:290 elf32-msp430.c:1325 elf32-mt.c:399 elf32-openrisc.c:412
+#: elf32-tilepro.c:3674 elf32-v850.c:2289 elf32-xstormy16.c:944
+#: elf64-mmix.c:1546 elfxx-tilegx.c:4059
 msgid "internal error: dangerous relocation"
 msgstr "intern fejl: farlig relokering"
 
-#: elf32-avr.c:2400 elf32-hppa.c:598 elf32-m68hc1x.c:166 elf64-ppc.c:4175
+#: elf32-avr.c:2476 elf32-hppa.c:578 elf32-m68hc1x.c:160 elf32-metag.c:1197
+#: elf32-nios2.c:1357
 msgid "%B: cannot create stub entry %s"
 msgstr "%B: kan ikke oprette stub-post %s"
 
-#: elf32-bfin.c:1575
+#: elf32-bfin.c:107 elf32-bfin.c:363
+msgid "relocation should be even number"
+msgstr "relokering skal vÃ¦re et lige tal"
+
+#: elf32-bfin.c:1601
 msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%B(%A+0x%lx): ulÃ¸selig relokering mod symbol \"%s\""
 
-#: elf32-bfin.c:1608 elf32-i386.c:4123 elf32-m68k.c:4233 elf32-s390.c:3062
-#: elf64-s390.c:3037 elf64-x86-64.c:3759
+#: elf32-bfin.c:1634 elf32-i386.c:4406 elf32-m68k.c:4197 elf32-s390.c:3364
+#: elf64-s390.c:3290 elf64-x86-64.c:4506
 msgid "%B(%A+0x%lx): reloc against `%s': error %d"
 msgstr "%B(%A+0x%lx): relokering mod \"%s\": fejl %d"
 
-#: elf32-bfin.c:2707
+#: elf32-bfin.c:2732
 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
 msgstr "%B: relokering ved \"%A+0x%x\" refererer til symbolet \"%s\" med addend forskellig fra nul"
 
-#: elf32-bfin.c:2721 elf32-frv.c:2901
+#: elf32-bfin.c:2748
 msgid "relocation references symbol not defined in the module"
 msgstr "relokering refererer symbol som ikke er defineret i modulet"
 
-#: elf32-bfin.c:2818
+#: elf32-bfin.c:2845
 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
 msgstr "R_BFIN_FUNCDESC refererer til dynamisk symbol med addend forskellig fra nul"
 
-#: elf32-bfin.c:2859 elf32-bfin.c:2982 elf32-frv.c:3638 elf32-frv.c:3759
+#: elf32-bfin.c:2886 elf32-bfin.c:3009
 msgid "cannot emit fixups in read-only section"
-msgstr "kan ikke udsende fixup'er i skrivebeskyttet sektion %s"
+msgstr "kan ikke udsende fixup'er i skrivebeskyttet afsnit"
 
-#: elf32-bfin.c:2890 elf32-bfin.c:3020 elf32-frv.c:3669 elf32-frv.c:3803
-#: elf32-lm32.c:1103 elf32-sh.c:5021
+#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-lm32.c:1095 elf32-sh.c:4913
 msgid "cannot emit dynamic relocations in read-only section"
-msgstr "kan ikke udsende dynamiske relokeringer i skrivebeskyttet sektion"
+msgstr "kan ikke udsende dynamiske relokeringer i skrivebeskyttet afsnit"
 
-#: elf32-bfin.c:2940
+#: elf32-bfin.c:2967
 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
 msgstr "R_BFIN_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nul"
 
-#: elf32-bfin.c:3105
+#: elf32-bfin.c:3132
 msgid "relocations between different segments are not supported"
 msgstr "relokeringer mellem forskellige segmenter understÃ¸ttes ikke"
 
-#: elf32-bfin.c:3106
+#: elf32-bfin.c:3133
 msgid "warning: relocation references a different segment"
 msgstr "advarsel: relokering refererer til et andet segment"
 
-#: elf32-bfin.c:4957 elf32-frv.c:6406
+#: elf32-bfin.c:4907
 msgid "%B: unsupported relocation type %i"
 msgstr "%B: relokeringstypen %i understÃ¸ttes ikke"
 
-#: elf32-bfin.c:5111 elf32-frv.c:6814
+#: elf32-bfin.c:4995 elf32-frv.c:6600
 #, c-format
 msgid "%s: cannot link non-fdpic object file into fdpic executable"
-msgstr "%s: kan ikke lÃ¦nke ikke-fdpic-objektfil ind i fdpic-eksekveringsfil"
+msgstr "%s: kan ikke linke ikke-fdpic-objektfil ind i fdpic-eksekveringsfil"
 
-#: elf32-bfin.c:5115 elf32-frv.c:6818
+#: elf32-bfin.c:4999 elf32-frv.c:6604
 #, c-format
 msgid "%s: cannot link fdpic object file into non-fdpic executable"
-msgstr "%s: kan ikke lÃ¦nke fdpic-objektfil ind i en ikke-fdpic-eksekveringsfil"
+msgstr "%s: kan ikke linke fdpic-objektfil ind i en ikke-fdpic-eksekveringsfil"
 
-#: elf32-cris.c:1172
+#: elf32-bfin.c:5153
+#, c-format
+msgid "*** check this relocation %s"
+msgstr "*** kontrollÃ©r denne relokering %s"
+
+#: elf32-cris.c:1110
 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
-msgstr "%B, sektion %A: ulÃ¸selig relokering %s mod symbol \"%s\""
+msgstr "%B, afsnit %A: ulÃ¸selig relokering %s mod symbol \"%s\""
 
-#: elf32-cris.c:1234
+#: elf32-cris.c:1172
 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
-msgstr "%B, sektion %A: Hverken nogen PLT eller GOT til relokering %s mod symbol \"%s\""
+msgstr "%B, afsnit %A: Hverken nogen PLT eller GOT til relokering %s mod symbol \"%s\""
 
-#: elf32-cris.c:1236
+#: elf32-cris.c:1174
 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
-msgstr "%B, sektion %A: Ingen PLT til relokering %s mod symbol \"%s\""
+msgstr "%B, afsnit %A: Ingen PLT til relokering %s mod symbol \"%s\""
 
-#: elf32-cris.c:1242 elf32-cris.c:1375 elf32-cris.c:1635 elf32-cris.c:1718
-#: elf32-cris.c:1871
+#: elf32-cris.c:1180 elf32-cris.c:1313 elf32-cris.c:1573 elf32-cris.c:1656
+#: elf32-cris.c:1809 elf32-tic6x.c:2645
 msgid "[whose name is lost]"
 msgstr "[hvis navn er tabt]"
 
-#: elf32-cris.c:1361
+#: elf32-cris.c:1299 elf32-tic6x.c:2630
 msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol"
-msgstr "%B, sektion %A: relokering %s med ikke-tom addend %d mod lokalt symbol"
+msgstr "%B, afsnit %A: relokering %s med ikke-tom addend %d mod lokalt symbol"
 
-#: elf32-cris.c:1369 elf32-cris.c:1712 elf32-cris.c:1865
+#: elf32-cris.c:1307 elf32-cris.c:1650 elf32-cris.c:1803 elf32-tic6x.c:2638
 msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
-msgstr "%B, sektion %A: relokering %s med ikke-tom addend %d mod symbol \"%s\""
+msgstr "%B, afsnit %A: relokering %s med ikke-tom addend %d mod symbol \"%s\""
 
-#: elf32-cris.c:1395
+#: elf32-cris.c:1333
 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
-msgstr "%B, sektion %A: relokeringen %s er ikke tilladt for globalt symbol: \"%s\""
+msgstr "%B, afsnit %A: relokeringen %s er ikke tilladt for globalt symbol: \"%s\""
 
-#: elf32-cris.c:1411
+#: elf32-cris.c:1349
 msgid "%B, section %A: relocation %s with no GOT created"
-msgstr "%B, sektion %A: relokering %s oprettet uden nogen GOT"
+msgstr "%B, afsnit %A: relokering %s oprettet uden nogen GOT"
 
 #. We shouldn't get here for GCC-emitted code.
-#: elf32-cris.c:1626
+#: elf32-cris.c:1564
 msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?"
-msgstr "%B, sektion %A: relokeringen %s har en udefineret reference til \"%s\". MÃ¥ske er der noget galt med erklÃ¦ringen?"
+msgstr "%B, afsnit %A: relokeringen %s har en udefineret reference til \"%s\". MÃ¥ske er der noget galt med erklÃ¦ringen?"
 
-#: elf32-cris.c:1998
+#: elf32-cris.c:1937
 msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?"
-msgstr "%B: relokeringen %A er ikke tilladt for symbol: \"%s\", som er defineret uden for programmet. MÃ¥ske er der noget galt med erklÃ¦ringen?"
+msgstr "%B, afsnit %A: relokeringen %s er ikke tilladt for symbol: \"%s\", som er defineret uden for programmet. MÃ¥ske er der noget galt med erklÃ¦ringen?"
 
-#: elf32-cris.c:2051
+#: elf32-cris.c:1990
 msgid "(too many global variables for -fpic: recompile with -fPIC)"
 msgstr "(for mange globale variable til -fpic: genkompilÃ©r med -fPIC)"
 
-#: elf32-cris.c:2058
+#: elf32-cris.c:1997
 msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)"
 msgstr "(trÃ¥dlokale data er for store til -fpic eller -msmall-tls: genkompilÃ©r med -fPIC eller -mno-small-tls)"
 
-#: elf32-cris.c:3248
+#: elf32-cris.c:3234
 msgid ""
 "%B, section %A:\n"
 "  v10/v32 compatible object %s must not contain a PIC relocation"
 msgstr ""
-"%B, sektion %A:\n"
+"%B, afsnit %A:\n"
 "  v10/v32-kompatibelt objekt %s mÃ¥ ikke indeholde en PIC-relokering"
 
-#: elf32-cris.c:3353
+#: elf32-cris.c:3342
 msgid ""
 "%B, section %A:\n"
 "  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC"
 msgstr ""
-"%B, sektion %A:\n"
+"%B, afsnit %A:\n"
 "  relokeringen %s er ikke gyldig i et delt objekt; dette er typisk en fejl i tilvalgende - genkompilÃ©r med -fPIC"
 
-#: elf32-cris.c:3567
+#: elf32-cris.c:3556
 msgid ""
 "%B, section %A:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
-"%B, sektion %A:\n"
+"%B, afsnit %A:\n"
 "  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genoversÃ¦t med -fPIC"
 
-#: elf32-cris.c:3992
+#: elf32-cris.c:3978
 msgid ""
 "%B, section `%A', to symbol `%s':\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
-"%B, sektion %A til symbol \"%s\":\n"
+"%B, afsnit %A til symbol \"%s\":\n"
 "  relokeringen %s bÃ¸r ikke bruges i et delt objekt; genkompilÃ©r med -fPIC"
 
-#: elf32-cris.c:4111
+#: elf32-cris.c:4091
 msgid "Unexpected machine number"
 msgstr "Uventet maskinnummer"
 
-#: elf32-cris.c:4165
+#: elf32-cris.c:4142
 #, c-format
 msgid " [symbols have a _ prefix]"
 msgstr " [symboler har et _-prÃ¦fiks]"
 
-#: elf32-cris.c:4168
+#: elf32-cris.c:4145
 #, c-format
 msgid " [v10 and v32]"
 msgstr " [v10 og v32]"
 
-#: elf32-cris.c:4171
+#: elf32-cris.c:4148
 #, c-format
 msgid " [v32]"
 msgstr " [v32]"
 
-#: elf32-cris.c:4216
+#: elf32-cris.c:4191
 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%B: bruger symboler med _-prÃ¦fiks, men skriver fil med symboler uden prÃ¦fiks"
 
-#: elf32-cris.c:4217
+#: elf32-cris.c:4192
 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%B: bruger symboler uden prÃ¦fiks, men skriver fil med symboler med _-prÃ¦fiks"
 
-#: elf32-cris.c:4236
+#: elf32-cris.c:4211
 msgid "%B contains CRIS v32 code, incompatible with previous objects"
 msgstr "%B indeholder CRIS v32-kode, som er inkompatibel med tidligere objekter"
 
-#: elf32-cris.c:4238
+#: elf32-cris.c:4213
 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
 msgstr "%B indeholder ikke-CRIS-v32-kode, som er inkompatibel med tidligere objekter"
 
-#: elf32-frv.c:1509 elf32-frv.c:1658
+#: elf32-dlx.c:142
+#, c-format
+msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported"
+msgstr "BFD-linkfejl: gren (PC rel16) til afsnit (%s) ikke understÃ¸ttet"
+
+#: elf32-dlx.c:204
+#, c-format
+msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported"
+msgstr "BFD-linkfejl: hop (PC rel26) til afsnit (%s) ikke understÃ¸ttet"
+
+#. Only if it's not an unresolved symbol.
+#: elf32-epiphany.c:564 elf32-ip2k.c:1475
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "ikke-understÃ¸ttet relokering mellem data/insn-adresserum"
+
+#: elf32-frv.c:1460 elf32-frv.c:1609
 msgid "relocation requires zero addend"
 msgstr "relokering krÃ¦ver addend pÃ¥ nul"
 
-#: elf32-frv.c:2888
-msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above"
-msgstr "%B(%A+0x%x): relokering til \"%s+%x\" kan have forÃ¥rsaget ovenstÃ¥ende fejl"
-
-#: elf32-frv.c:2977
-msgid "R_FRV_GETTLSOFF not applied to a call instruction"
-msgstr "R_FRV_GETTLSOFF ikke anvendt til call-instruktion"
-
-#: elf32-frv.c:3019
-msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction"
-msgstr "R_FRV_GOTTLSDESC12 ikke anvendt til en lddi-instruktion"
-
-#: elf32-frv.c:3090
-msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction"
-msgstr "R_FRV_GOTTLSDESCHI ikke anvendt til en sethi-instruktion"
-
-#: elf32-frv.c:3127
-msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction"
-msgstr "R_FRV_GOTTLSDESCLO ikke anvendt til en setlo- eller setlos-instruktion"
-
-#: elf32-frv.c:3175
-msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction"
-msgstr "R_FRV_TLSDESC_RELAX ikke anvendt til en ldd-instruktion"
+#: elf32-frv.c:2822
+msgid "%H: relocation to `%s+%v' may have caused the error above\n"
+msgstr "%H: relokering til \"%s+%v\" kan have forÃ¥rsaget ovenstÃ¥ende fejl\n"
+
+#: elf32-frv.c:2839
+msgid "%H: relocation references symbol not defined in the module\n"
+msgstr "%H: relokering refererer til symbol som ikke er defineret i modulet\n"
+
+#: elf32-frv.c:2915
+msgid "%H: R_FRV_GETTLSOFF not applied to a call instruction\n"
+msgstr "%H: R_FRV_GETTLSOFF ikke anvendt pÃ¥ en call-instruktion\n"
+
+#: elf32-frv.c:2956
+msgid "%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESC12 ikke anvendt pÃ¥ en lddi-instruktion\n"
+
+#: elf32-frv.c:3027
+msgid "%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESCHI ikke anvendt pÃ¥ en sethi-instruktion\n"
+
+#: elf32-frv.c:3064
+msgid "%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESCLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion\n"
+
+#: elf32-frv.c:3111
+msgid "%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction\n"
+msgstr "%H: R_FRV_TLSDESC_RELAX ikke anvendt pÃ¥ en ldd-instruktion\n"
 
 # virkelig?
-#: elf32-frv.c:3259
-msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction"
-msgstr "R_FRV_GETTLSOFF_RELAX ikke anvendt til en calll-instruktion"
-
-#: elf32-frv.c:3314
-msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction"
-msgstr "R_FRV_GOTTLSOFF12 ikke anvendt til en ldi-instruktion"
-
-#: elf32-frv.c:3344
-msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction"
-msgstr "R_FRV_GOTTLSOFFHI ikke anvendt til en sethi-instruktion"
-
-#: elf32-frv.c:3373
-msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction"
-msgstr "R_FRV_GOTTLSOFFLO ikke anvendt til en setlos-instruktion"
-
-#: elf32-frv.c:3404
-msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction"
-msgstr "R_FRV_TLSOFF_RELAX ikke anvendt til en ld-instruktion"
-
-#: elf32-frv.c:3449
-msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction"
-msgstr "R_FRV_TLSMOFFHI ikke anvendt til en sethi-instruktion"
-
-#: elf32-frv.c:3476
-msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction"
-msgstr "R_FRV_TLSMOFFLO ikke anvendt til en setlos-instruktion"
-
-#: elf32-frv.c:3597
-msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend"
-msgstr "R_FRV_FUNCDESC refererer dynamisk symbol med addend forskellig fra nul"
-
-#: elf32-frv.c:3717
-msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
-msgstr "R_FRV_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nul"
-
-#: elf32-frv.c:3974 elf32-frv.c:4130
-msgid "%B(%A+0x%lx): reloc against `%s': %s"
-msgstr "%B(%A+0x%lx): relokering mod \"%s\": %s"
-
-#: elf32-frv.c:3976 elf32-frv.c:3980
-msgid "relocation references a different segment"
-msgstr "relokering refererer et andet segment"
+#: elf32-frv.c:3195
+msgid "%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction\n"
+msgstr "%H: R_FRV_GETTLSOFF_RELAX ikke anvendt pÃ¥ en calll-instruktion\n"
+
+#: elf32-frv.c:3249
+msgid "%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFF12 ikke anvendt pÃ¥ en ldi-instruktion\n"
+
+#: elf32-frv.c:3279
+msgid "%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFFHI ikke anvendt pÃ¥ en sethi-instruktion\n"
+
+#: elf32-frv.c:3308
+msgid "%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFFLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion\n"
+
+#: elf32-frv.c:3338
+msgid "%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction\n"
+msgstr "%H: R_FRV_TLSOFF_RELAX ikke anvendt pÃ¥ en ld-instruktion\n"
+
+#: elf32-frv.c:3383
+msgid "%H: R_FRV_TLSMOFFHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_TLSMOFFHI ikke anvendt pÃ¥ en sethi-instruktion\n"
+
+#: elf32-frv.c:3410
+msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "R_FRV_TLSMOFFLO ikke anvendt pÃ¥ en setlo- eller setlos-instruktion\n"
+
+#: elf32-frv.c:3531
+msgid "%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend\n"
+msgstr "%H: R_FRV_FUNCDESC refererer dynamisk symbol med addend forskellig fra nul\n"
+
+#: elf32-frv.c:3572 elf32-frv.c:3694
+msgid "%H: cannot emit fixups in read-only section\n"
+msgstr "%H: kan ikke udsende fixup'er i skrivebeskyttet afsnit\n"
+
+#: elf32-frv.c:3603 elf32-frv.c:3737
+msgid "%H: cannot emit dynamic relocations in read-only section\n"
+msgstr "%H: kan ikke udsende dynamiske relokeringer i skrivebeskyttet afsnit\n"
+
+#: elf32-frv.c:3652
+msgid "%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend\n"
+msgstr "%H: R_FRV_FUNCDESC_VALUE refererer dynamisk symbol med addend forskellig fra nul\n"
+
+#: elf32-frv.c:3908
+msgid "%H: reloc against `%s' references a different segment\n"
+msgstr "%H: relokering mod \"%s\" refererer et andet segment\n"
+
+#: elf32-frv.c:4058
+msgid "%H: reloc against `%s': %s\n"
+msgstr "%H: relokering mod \"%s\": %s\n"
+
+#: elf32-frv.c:6265
+msgid "%B: unsupported relocation type %i\n"
+msgstr "%B: relokeringstypen %i understÃ¸ttes ikke\n"
 
-#: elf32-frv.c:6728
+#: elf32-frv.c:6514
 #, c-format
 msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
-msgstr "%s: oversat med %s og lÃ¦nket med moduler som bruger ikke-pic-relokering"
+msgstr "%s: oversat med %s og linket med moduler som bruger ikke-pic-relokering"
 
-#: elf32-frv.c:6781 elf32-iq2000.c:845 elf32-m32c.c:807
+#: elf32-frv.c:6567 elf32-iq2000.c:828 elf32-m32c.c:812
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
-msgstr "%s: oversat med %s og lÃ¦nket med moduler som oversattes med %s"
+msgstr "%s: oversat med %s og linket med moduler som oversattes med %s"
 
-#: elf32-frv.c:6793
+#: elf32-frv.c:6579
 #, c-format
 msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: bruger andre ukendte e_flags-felter (0x%lx) end tidligere moduler (0x%lx)"
 
-#: elf32-frv.c:6843 elf32-iq2000.c:882 elf32-m32c.c:843 elf32-mt.c:576
-#: elf32-rx.c:2925
+#: elf32-frv.c:6627 elf32-iq2000.c:865 elf32-m32c.c:848 elf32-mt.c:561
+#: elf32-rl78.c:1069 elf32-rx.c:3040 elf64-ppc.c:5839
 #, c-format
 msgid "private flags = 0x%lx:"
 msgstr "private flag = 0x%lx:"
@@ -1517,82 +1659,93 @@ msgstr "private flag = 0x%lx:"
 msgid "%B: Relocations in generic ELF (EM: %d)"
 msgstr "%B: Relokeringer i generisk ELF (EM: %d)"
 
-#: elf32-hppa.c:850 elf32-hppa.c:3610
+#: elf32-hppa.c:830 elf32-hppa.c:3592
 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%B(%A+0x%lx): kan ikke nÃ¥ %s, genkompilÃ©r med -ffunction-sections"
 
-#: elf32-hppa.c:1284
+#: elf32-hppa.c:1268
 msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes; genkompilÃ©r med -fPIC"
 
-#: elf32-hppa.c:2803
+#: elf32-hppa.c:2781
 msgid "%B: duplicate export stub %s"
 msgstr "%B: dobbelt eksportstub %s"
 
-#: elf32-hppa.c:3449
+#: elf32-hppa.c:3427
 msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
-msgstr "%B(%A+0x%lx): %s-\"fixup\" for instruktion 0x%x understÃ¸ttes ikke i et ikke-delt lÃ¦nke"
+msgstr "%B(%A+0x%lx): %s-\"fixup\" for instruktion 0x%x understÃ¸ttes ikke i et ikke-delt link"
 
-#: elf32-hppa.c:4296
+#: elf32-hppa.c:4279
 msgid "%B(%A+0x%lx): cannot handle %s for %s"
 msgstr "%B(%A+0x%lx): kan ikke hÃ¥ndtere %s til %s"
 
-#: elf32-hppa.c:4608
+#: elf32-hppa.c:4598
 msgid ".got section not immediately after .plt section"
-msgstr ".got-sektionen fÃ¸lger ikke umiddelbart efter .plt-sektion"
+msgstr ".got-afsnittet fÃ¸lger ikke umiddelbart efter .plt-afsnit"
 
 #. Unknown relocation.
-#: elf32-i386.c:371 elf32-m68k.c:383 elf32-ppc.c:1674 elf32-s390.c:379
-#: elf32-tic6x.c:1563 elf64-ppc.c:2284 elf64-s390.c:403 elf64-x86-64.c:234
+#: elf32-i386.c:380 elf32-m68k.c:353 elf32-ppc.c:2035 elf32-s390.c:345
+#: elf32-tic6x.c:2667 elf64-ppc.c:2427 elf64-s390.c:371 elf64-x86-64.c:281
 msgid "%B: invalid relocation type %d"
 msgstr "%B: ugyldig relokeringstype %d"
 
-#: elf32-i386.c:1265 elf64-x86-64.c:1049
+#: elf32-i386.c:1394 elf64-x86-64.c:1410
 msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed"
 msgstr "%B: TLS-overgang fra %s til %s mod \"%s\" ved 0x%lx i afsnittet \"%A\" mislykkedes"
 
-#: elf32-i386.c:1408 elf32-i386.c:3068 elf64-x86-64.c:1194 elf64-x86-64.c:2780
-#: elfxx-sparc.c:3076
-msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
-msgstr "%B: relokeringen %s mod STT_GNU_IFUNC-symbolet \"%s\" hÃ¥ndteres ikke af %s"
-
-#: elf32-i386.c:1570 elf32-s390.c:1182 elf32-sh.c:6367 elf32-xtensa.c:1182
-#: elf64-s390.c:1151 elfxx-sparc.c:1547
+#: elf32-i386.c:1642 elf32-s390.c:1233 elf32-sh.c:6263 elf32-tilepro.c:1627
+#: elf32-xtensa.c:1176 elf64-s390.c:1166 elfxx-sparc.c:1596
+#: elfxx-tilegx.c:1836
 msgid "%B: `%s' accessed both as normal and thread local symbol"
 msgstr "%B: \"%s\" tilgÃ¥s bÃ¥de som normalt symbol og trÃ¥dlokalt symbol"
 
-#: elf32-i386.c:2910
+#: elf32-i386.c:2500 elf64-x86-64.c:2582
+msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"
+msgstr "%P: %B: advarsel: relokering mod \"%s\" i skrivebeskyttet afsnit \"%A\".\n"
+
+#: elf32-i386.c:2740 elf64-x86-64.c:2820
+msgid "%P: %B: warning: relocation in readonly section `%A'.\n"
+msgstr "%P: %B: advarsel: relokering i skrivebeskyttet afsnit \"%A\".\n"
+
+#: elf32-i386.c:3207 elf32-tilepro.c:2873 elf64-x86-64.c:3275
+#: elfxx-tilegx.c:3172 /src/binutils-gdb/bfd/elfnn-aarch64.c:4099
 msgid "%B: unrecognized relocation (0x%x) in section `%A'"
-msgstr "%B: ukendt relokering (0x%x) i sektionen \"%A\""
+msgstr "%B: ukendt relokering (0x%x) i afsnittet \"%A\""
+
+#: elf32-i386.c:3368 elf64-x86-64.c:3380 elfxx-sparc.c:3150
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:3496
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+msgstr "%B: relokeringen %s mod STT_GNU_IFUNC-symbolet \"%s\" hÃ¥ndteres ikke af %s"
 
-#: elf32-i386.c:3317 elf64-x86-64.c:3174
+#: elf32-i386.c:3610 elf64-x86-64.c:3777
 msgid "hidden symbol"
 msgstr "skjult symbol"
 
-#: elf32-i386.c:3320 elf64-x86-64.c:3177
+#: elf32-i386.c:3613 elf64-x86-64.c:3780
 msgid "internal symbol"
 msgstr "internt symbol"
 
-#: elf32-i386.c:3323 elf64-x86-64.c:3180
+#: elf32-i386.c:3616 elf64-x86-64.c:3783
 msgid "protected symbol"
 msgstr "beskyttet symbol"
 
-#: elf32-i386.c:3326 elf64-x86-64.c:3183
+#: elf32-i386.c:3619 elf64-x86-64.c:3786
 msgid "symbol"
 msgstr "symbol"
 
-#: elf32-i386.c:3331
+#: elf32-i386.c:3624
 msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object"
 msgstr "%B: relokeringen R_386_GOTOFF mod udefineret %s \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes"
 
-#: elf32-i386.c:3341
+#: elf32-i386.c:3635
 msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"
 msgstr "%B: relokeringen R_386_GOTOFF mod beskyttet funktion \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes"
 
-#: elf32-i386.c:4633 elf64-x86-64.c:4206
+#: elf32-i386.c:4923 elf32-tilepro.c:3923 elf64-x86-64.c:4964
+#: elfxx-tilegx.c:4326 /src/binutils-gdb/bfd/elfnn-aarch64.c:7105
 #, c-format
 msgid "discarded output section: `%A'"
-msgstr "forkastet uddatasektion: \"%A\""
+msgstr "forkastet uddataafsnit: \"%A\""
 
 #: elf32-ip2k.c:857 elf32-ip2k.c:863 elf32-ip2k.c:930 elf32-ip2k.c:936
 msgid "ip2k relaxer: switch table without complete matching relocation information."
@@ -1612,25 +1765,20 @@ msgstr "ip2k linker: manglende sideinstr
 msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
 msgstr "ip2k linker: gentaget sideinstruktion ved 0x%08lx (dest = 0x%08lx)."
 
-#. Only if it's not an unresolved symbol.
-#: elf32-ip2k.c:1475
-msgid "unsupported relocation between data/insn address spaces"
-msgstr "ikke-understÃ¸ttet relokering mellem data/insn-adresserum"
-
-#: elf32-iq2000.c:858 elf32-m32c.c:819
+#: elf32-iq2000.c:841 elf32-m32c.c:824
 #, c-format
 msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)"
 
-#: elf32-lm32.c:706
+#: elf32-lm32.c:698 elf32-nios2.c:2191
 msgid "global pointer relative relocation when _gp not defined"
-msgstr "global pointer-relativ relokering, nÃ¥r _gp ikke er defineret"
+msgstr "relokering af relativ global pointer med udefineret _gp"
 
-#: elf32-lm32.c:761
+#: elf32-lm32.c:753 elf32-nios2.c:2623
 msgid "global pointer relative address out of range"
-msgstr "global pointer-relativ adresse er uden for det gyldige interval"
+msgstr "adresse for relativ global pointer er uden for det gyldige interval"
 
-#: elf32-lm32.c:1057
+#: elf32-lm32.c:1049
 msgid "internal error: addend should be zero for R_LM32_16_GOT"
 msgstr "intern fejl: addend burde vÃ¦re nul for R_LM32_16_GOT"
 
@@ -1638,125 +1786,140 @@ msgstr "intern fejl: addend burde vÃ¦re 
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "SDA-relokering nÃ¥r _SDA_BASE_ ikke er defineret"
 
-#: elf32-m32r.c:3048
+#: elf32-m32r.c:3003
 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
-msgstr "%B: MÃ¥let (%s) for en %s-relokering er i forkert sektion (%A)"
+msgstr "%B: MÃ¥let (%s) for en %s-relokering er i forkert afsnit (%A)"
 
-#: elf32-m32r.c:3576
+#: elf32-m32r.c:3529
 msgid "%B: Instruction set mismatch with previous modules"
 msgstr "%B: InstruktionssÃ¦t passer ikke med tidligere moduler"
 
-#: elf32-m32r.c:3597
+#: elf32-m32r.c:3550 elf32-nds32.c:5636
 #, c-format
 msgid "private flags = %lx"
 msgstr "private flag = %lx"
 
-#: elf32-m32r.c:3602
+#: elf32-m32r.c:3555
 #, c-format
 msgid ": m32r instructions"
 msgstr ": m32r-instruktioner"
 
-#: elf32-m32r.c:3603
+#: elf32-m32r.c:3556
 #, c-format
 msgid ": m32rx instructions"
 msgstr ": m32rx-instruktioner"
 
-#: elf32-m32r.c:3604
+#: elf32-m32r.c:3557
 #, c-format
 msgid ": m32r2 instructions"
 msgstr ": m32r2-instruktioner"
 
-#: elf32-m68hc1x.c:1050
+#: elf32-m68hc1x.c:1114
 #, c-format
 msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
 msgstr "Reference til fjernsymbol \"%s\", der bruger en forkert relokering, kan resultere i forkert udfÃ¸relse"
 
-#: elf32-m68hc1x.c:1073
+#: elf32-m68hc1x.c:1150
+#, c-format
+msgid "XGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code."
+msgstr "XGATE-adresse (%lx) ligger ikke i delt RAM(0xE000-0xFFFF), og du bliver derfor nÃ¸dt til manuelt at forskyde adressen, og mÃ¥ske hÃ¥ndtere siden, i din kode."
+
+#: elf32-m68hc1x.c:1170
 #, c-format
 msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
 msgstr "bankadresse [%lx:%04lx] (%lx) er ikke i samme bank som nuvÃ¦rende bankadresse [%lx:%04lx] (%lx)"
 
-#: elf32-m68hc1x.c:1092
+#: elf32-m68hc1x.c:1190
 #, c-format
 msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
 msgstr "reference til bankadresse [%lx:%04lx] i det normale adresserum ved %04lx"
 
-#: elf32-m68hc1x.c:1225
+#: elf32-m68hc1x.c:1237
+#, c-format
+msgid "S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your code"
+msgstr "S12-adresse (%lx) ligger ikke i delt RAM(0x2000-0x4000), og derfor bliver du nÃ¸dt til manuelt at forskyde adressen i din kode"
+
+#: elf32-m68hc1x.c:1370
 msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
-msgstr "%B: lÃ¦nker filer, der er kompileret til 16 bit-heltal (-mshort), og andre til 32 bit-heltal"
+msgstr "%B: linker filer, der er kompileret til 16 bit-heltal (-mshort), og andre til 32 bit-heltal"
 
-#: elf32-m68hc1x.c:1232
+#: elf32-m68hc1x.c:1377
 msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
-msgstr "%B: lÃ¦nker filer, der er kompileret til 32 bit-double (-fshort-double), og andre til 64 bit-double"
+msgstr "%B: linker filer, der er kompileret til 32 bit-double (-fshort-double), og andre til 64 bit-double"
 
-#: elf32-m68hc1x.c:1241
+#: elf32-m68hc1x.c:1386
 msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
-msgstr "%B: lÃ¦nkning af filer kompileret til HCS12 med andre, der er kompileret til HC12"
+msgstr "%B: linker filer kompileret til HCS12 med andre, der er kompileret til HC12"
 
-#: elf32-m68hc1x.c:1257 elf32-ppc.c:4232 elf64-sparc.c:703 elfxx-mips.c:12704
+#: elf32-m68hc1x.c:1402 elf32-ppc.c:4776 elf64-sparc.c:706 elfxx-mips.c:14817
 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%B: bruger andre e_flags-felter (0x%lx) end tidligere moduler (0x%lx)"
 
-#: elf32-m68hc1x.c:1285
+#: elf32-m68hc1x.c:1430 elf32-xgate.c:677
 #, c-format
 msgid "[abi=32-bit int, "
 msgstr "[abi=32-bit int, "
 
-#: elf32-m68hc1x.c:1287
+#: elf32-m68hc1x.c:1432 elf32-xgate.c:679
 #, c-format
 msgid "[abi=16-bit int, "
 msgstr "[abi=16-bit int, "
 
-#: elf32-m68hc1x.c:1290
+#: elf32-m68hc1x.c:1435 elf32-xgate.c:682
 #, c-format
 msgid "64-bit double, "
 msgstr "64-bit double, "
 
-#: elf32-m68hc1x.c:1292
+#: elf32-m68hc1x.c:1437 elf32-xgate.c:684
 #, c-format
 msgid "32-bit double, "
 msgstr "32-bit double, "
 
-#: elf32-m68hc1x.c:1295
+#: elf32-m68hc1x.c:1440
 #, c-format
 msgid "cpu=HC11]"
 msgstr "cpu=HC11]"
 
-#: elf32-m68hc1x.c:1297
+#: elf32-m68hc1x.c:1442
 #, c-format
 msgid "cpu=HCS12]"
 msgstr "cpu=HCS12]"
 
-#: elf32-m68hc1x.c:1299
+#: elf32-m68hc1x.c:1444
 #, c-format
 msgid "cpu=HC12]"
 msgstr "cpu=HC12]"
 
 # ?
-#: elf32-m68hc1x.c:1302
+#: elf32-m68hc1x.c:1447
 #, c-format
 msgid " [memory=bank-model]"
 msgstr " [memory=bank-model]"
 
 # ?
-#: elf32-m68hc1x.c:1304
+#: elf32-m68hc1x.c:1449
 #, c-format
 msgid " [memory=flat]"
 msgstr " [memory=flat]"
 
-#: elf32-m68k.c:1250 elf32-m68k.c:1251 vms-alpha.c:7292 vms-alpha.c:7307
+#: elf32-m68hc1x.c:1452
+#, c-format
+msgid " [XGATE RAM offsetting]"
+msgstr " [XGATE RAM-forskydning]"
+
+#: elf32-m68k.c:1210 elf32-m68k.c:1211 vms-alpha.c:7207 vms-alpha.c:7222
 msgid "unknown"
 msgstr "ukendt"
 
-#: elf32-m68k.c:1714
+#: elf32-m68k.c:1674
 msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d"
 msgstr "%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 bit-afsÃ¦t > %d"
 
-#: elf32-m68k.c:1720
+#: elf32-m68k.c:1680
 msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d"
 msgstr "%B: GOT-overlÃ¸b: Antallet af relokeringer med 8 eller 16 bit-afsÃ¦t > %d"
 
-#: elf32-m68k.c:3959
+#: elf32-m68k.c:3921
 msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object"
 msgstr "%B(%A+0x%lx): R_68K_TLS_LE32-relokering tillades ikke i delt objekt"
 
@@ -1768,237 +1931,470 @@ msgstr "%B: Relokering %s (%d) understÃ¸
 msgid "%B: Unknown relocation type %d\n"
 msgstr "%B: Ukendt relokeringstype %d\n"
 
+#. Pacify gcc -Wall.
+#: elf32-mep.c:157
+#, c-format
+msgid "mep: no reloc for code %d"
+msgstr "mep: ingen relokering for kode %d"
+
 # ?
-#: elf32-mep.c:647
+#: elf32-mep.c:163
+#, c-format
+msgid "MeP: howto %d has type %d"
+msgstr "MeP: howto %d har typen %d"
+
+#: elf32-mep.c:632
 msgid "%B and %B are for different cores"
 msgstr "%B og %B er til forskellige cpu-kerner"
 
-#: elf32-mep.c:664
+#: elf32-mep.c:649
 msgid "%B and %B are for different configurations"
 msgstr "%B og %B er til forskellige konfigurationer"
 
-#: elf32-mep.c:701
+#: elf32-mep.c:686
 #, c-format
 msgid "private flags = 0x%lx"
 msgstr "private flag = 0x%lx"
 
-#: elf32-microblaze.c:742
+#: elf32-metag.c:1921
+msgid "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC-relokering tillades ikke i delt objekt"
+
+#: elf32-microblaze.c:950
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: ukendt relokeringstype %d"
 
-#: elf32-microblaze.c:867 elf32-microblaze.c:912
+#: elf32-microblaze.c:1076 elf32-microblaze.c:1121
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr "%s: MÃ¥let (%s) for en %s-relokering er i forkert sektion (%s)"
+msgstr "%s: MÃ¥let (%s) for en %s-relokering er i forkert afsnit (%s)"
 
-#: elf32-microblaze.c:1155 elfxx-sparc.c:3450
+#: elf32-microblaze.c:1484 elf32-tilepro.c:3320 elfxx-sparc.c:3526
+#: elfxx-tilegx.c:3729
 msgid "%B: probably compiled without -fPIC?"
 msgstr "%B: nok oversat uden -fPIC?"
 
-#: elf32-microblaze.c:2074 elflink.c:12601
-msgid "%B: bad relocation section name `%s'"
-msgstr "%B: fejlagtigt relokeringssektionsnavn \"%s\""
-
-#: elf32-mips.c:1045 elf64-mips.c:2084 elfn32-mips.c:1888
+#: elf32-mips.c:1670 elf64-mips.c:2990 elfn32-mips.c:2793
 msgid "literal relocation occurs for an external symbol"
 msgstr "der sker ordret relokering for et eksternt symbol"
 
-#: elf32-mips.c:1085 elf32-score.c:569 elf32-score7.c:469 elf64-mips.c:2127
-#: elfn32-mips.c:1929
+#: elf32-mips.c:1717 elf32-score.c:570 elf32-score7.c:469 elf64-mips.c:3033
+#: elfn32-mips.c:2834
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "32-bit gp-relativ relokering forekommer for et eksternt symbol"
 
-#: elf32-ppc.c:1739
+#: elf32-msp430.c:801 elf32-msp430.c:1109
+msgid "Try enabling relaxation to avoid relocation truncations"
+msgstr "PrÃ¸v at slÃ¥ relaksering til for at undgÃ¥ relokeringsafkortning"
+
+#: elf32-msp430.c:1317
+msgid "internal error: branch/jump to an odd address detected"
+msgstr "intern fejl: gren/hop til en ulige adresse fundet"
+
+#: elf32-msp430.c:2221
+msgid "Warning: %B: Unknown MSPABI object attribute %d"
+msgstr "Advarsel: %B: Ukendt MSPABI-objektattribut %d"
+
+#: elf32-msp430.c:2312
+msgid "error: %B uses %s instructions but %B uses %s"
+msgstr "fejl: %B bruger %s-instruktioner, mens %B bruger %s"
+
+#: elf32-msp430.c:2324
+msgid "error: %B uses the %s code model whereas %B uses the %s code model"
+msgstr "fejl: %B bruger kodemodellen %s, mens %B bruger kodemodellen %s"
+
+#: elf32-msp430.c:2336
+msgid "error: %B uses the large code model but %B uses MSP430 instructions"
+msgstr "fejl: %B bruger den store kodemodel, men %B bruger MSP430-instruktioner"
+
+#: elf32-msp430.c:2346
+msgid "error: %B uses the %s data model whereas %B uses the %s data model"
+msgstr "fejl: %B bruger datamodellen %s, mens %B bruger datamodellen %s"
+
+#: elf32-msp430.c:2358
+msgid "error: %B uses the small code model but %B uses the %s data model"
+msgstr "fejl: %B bruger den lille kodemodel, mens %B bruger datamodellen %s"
+
+#: elf32-msp430.c:2369
+msgid "error: %B uses the %s data model but %B only uses MSP430 instructions"
+msgstr "fejl: %B bruger datamodellen %s, mens %B kun bruger MSP430-instruktioner"
+
+#: elf32-nds32.c:2921
+msgid "error: Can't find symbol: _SDA_BASE_."
+msgstr "fejl: Kan ikke finde symbol: _SDA_BASE_."
+
+#: elf32-nds32.c:4142
+msgid "%B: error: unknown relocation type %d."
+msgstr "%B: fejl: ukendt relokeringstype %d."
+
+# ?
+#: elf32-nds32.c:4584
+#, c-format
+msgid "%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode."
+msgstr "%s: advarsel: kan ikke udbyde R_NDS32_25_ABS_RELA i delt tilstand."
+
+#: elf32-nds32.c:4716
+msgid "%B: warning: unaligned access to GOT entry."
+msgstr "%B: advarsel: ikke-justeret adgang til GOT-indgang."
+
+#: elf32-nds32.c:4758
+msgid "%B: warning: relocate SDA_BASE failed."
+msgstr "%B: advarsel: relokering af SDA_BASE mislykkedes."
+
+# ?
+#: elf32-nds32.c:4779
+msgid "%B(%A): warning: unaligned small data access of type %d."
+msgstr "%B(%A): advarsel: ikke-justeret lille dataadgang af type %d."
+
+#: elf32-nds32.c:5446
+msgid "%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte"
+msgstr "%B: ISR-vektorstÃ¸rrelse passer ikke med tidligere moduler; fÃ¸r %u-byte, nu %u-byte"
+
+#: elf32-nds32.c:5489
+msgid "%B: warning: Endian mismatch with previous modules."
+msgstr "%B: advarsel: Endian-konflikt med tidligere moduler."
+
+# tool chain?
+#: elf32-nds32.c:5499
+msgid "%B: warning: Older version of object file encountered, Please recompile with current tool chain."
+msgstr "%B: advarsel: Der blev fundet en Ã¦ldre objektfilversion. GenkompilÃ©r venligst med nuvÃ¦rende vÃ¦rktÃ¸jskÃ¦de."
+
+#: elf32-nds32.c:5577
+msgid "%B: error: ABI mismatch with previous modules."
+msgstr "%B: fejl: ABI passer ikke med tidligere moduler."
+
+#: elf32-nds32.c:5588
+msgid "%B: error: Instruction set mismatch with previous modules."
+msgstr "%B: fejl: InstruktionssÃ¦t passer ikke med tidligere moduler."
+
+#: elf32-nds32.c:5612
+msgid "%B: warning: Incompatible elf-versions %s and  %s."
+msgstr "%B: advarsel: Inkompatible elf-versioner %s og %s."
+
+#: elf32-nds32.c:5642
+#, c-format
+msgid ": n1 instructions"
+msgstr ": n1-instruktioner"
+
+#: elf32-nds32.c:5645
+#, c-format
+msgid ": n1h instructions"
+msgstr ": n1h-instruktioner"
+
+#: elf32-nds32.c:8147
+msgid "%B: %s\n"
+msgstr "%B: %s\n"
+
+#: elf32-nds32.c:8449
+msgid "%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte."
+msgstr "%B(%A): advarsel: relaksering undertrykkes for afsnit med justering %d-byte > 4-byte."
+
+#: elf32-nds32.c:8502
+msgid "%B: error: Cannot set _ITB_BASE_"
+msgstr "%B: fejl: Kan ikke sÃ¦tte _ITB_BASE_"
+
+#: elf32-nds32.c:11384
+msgid "%B: Nested OMIT_FP in %A."
+msgstr "%B: Indlejret OMIT_FP i %A."
+
+#: elf32-nds32.c:11401
+msgid "%B: Unmatched OMIT_FP in %A."
+msgstr "%B: OMIT_FP uden match i %A."
+
+# Det ser ud ikke ud til at de prÃ¸ver at klargÃ¸re en fejl.  Det ser ud til blot at *vÃ¦re* en fejl
+#
+# int
+# nds32_elf_ex9_init (void)
+# {
+#   if (!bfd_hash_table_init_n (&ex9_code_table, nds32_elf_code_hash_newfunc,
+#                   sizeof (struct elf_nds32_code_hash_entry),
+#                   1023))
+#     {
+#       (*_bfd_error_handler) (_("Linker: cannot init ex9 hash table error \n"));
+#       return FALSE;
+#     }
+#   return TRUE;
+# }
+#
+#
+#: elf32-nds32.c:13357
+msgid "Linker: cannot init ex9 hash table error \n"
+msgstr "Linker: kan klargÃ¸re ex9-hashtabel; fejl\n"
+
+#: elf32-nds32.c:13790 elf32-nds32.c:13804
+msgid "Linker: error cannot fixed ex9 relocation \n"
+msgstr "Linker: fejl; kan ikke fikse ex9-relokering\n"
+
+#: elf32-nds32.c:14015
+#, c-format
+msgid "%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."
+msgstr "%s: advarsel: ikke-justeret lille dataadgang. For indgang: {%d, %d, %d}, adr = 0x%x, justering = 0x%x."
+
+# ?
+#: elf32-nds32.c:14047
+msgid "%P%F: failed creating ex9.it %s hash table: %E\n"
+msgstr "%P%F: kunne ikke oprette ex9.it %s hash-tabel: %E\n"
+
+#: elf32-nios2.c:2861
+#, c-format
+msgid "global pointer relative relocation at address 0x%08x when _gp not defined\n"
+msgstr "global pointer-relativ relokering ved adresse 0x%08x, mens _gp ikke er defineret\n"
+
+#: elf32-nios2.c:2878
+#, c-format
+msgid "Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.\n"
+msgstr "Kan ikke nÃ¥ %s (ved 0x%08x) fra den globale pointer (ved 0x%08x) fordi forskydningen (%d) er uden for det tilladte interval -32678 til 32767.\n"
+
+#: elf32-nios2.c:3392
+msgid "%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): R_NIOS2_TLS_LE16-relokering er ikke tilladt i delt objekt"
+
+#: elf32-nios2.c:3520
+msgid "relocation out of range"
+msgstr "relokering uden for gyldigt interval"
+
+#: elf32-nios2.c:3530 elf32-tic6x.c:2744
+msgid "dangerous relocation"
+msgstr "farlig relokering"
+
+#: elf32-nios2.c:4529
+#, c-format
+msgid "dynamic variable `%s' is zero size"
+msgstr "dynamisk variabel \"%s\" har stÃ¸rrelse nul"
+
+#: elf32-ppc.c:2100
 #, c-format
 msgid "generic linker can't handle %s"
-msgstr "generisk lÃ¦nker kan ikke hÃ¥ndtere %s"
+msgstr "generisk linker kan ikke hÃ¥ndtere %s"
 
-#: elf32-ppc.c:2180
+#: elf32-ppc.c:2642
 msgid "corrupt %s section in %B"
-msgstr "beskadiget %s-sektion i %B"
+msgstr "beskadiget %s-afsnit i %B"
 
-#: elf32-ppc.c:2199
+#: elf32-ppc.c:2661
 msgid "unable to read in %s section from %B"
-msgstr "kan ikke lÃ¦se i %s-sektion fra %B"
+msgstr "kan ikke lÃ¦se i %s-afsnit fra %B"
 
-#: elf32-ppc.c:2240
+#: elf32-ppc.c:2702
 msgid "warning: unable to set size of %s section in %B"
-msgstr "advarsel: kan ikke sÃ¦tte stÃ¸rrelsen af %s-sektion i %B"
+msgstr "advarsel: kan ikke sÃ¦tte stÃ¸rrelsen af %s-afsnit i %B"
 
-#: elf32-ppc.c:2290
+#: elf32-ppc.c:2752
 msgid "failed to allocate space for new APUinfo section."
-msgstr "kunne ikke tildele plads til ny APUinfo-sektion."
+msgstr "kunne ikke tildele plads til nyt APUinfo-afsnit."
 
-#: elf32-ppc.c:2309
+#: elf32-ppc.c:2771
 msgid "failed to compute new APUinfo section."
-msgstr "kunne ikke beregne ny APUinfo-sektion."
+msgstr "kunne ikke beregne nyt APUinfo-afsnit."
 
-#: elf32-ppc.c:2312
+#: elf32-ppc.c:2774
 msgid "failed to install new APUinfo section."
-msgstr "kunne ikke installere ny APUinfo-sektion."
+msgstr "kunne ikke installere nyt APUinfo-afsnit."
 
-#: elf32-ppc.c:3358
+#: elf32-ppc.c:3844
 msgid "%B: relocation %s cannot be used when making a shared object"
 msgstr "%B: relokeringen %s kan ikke bruges nÃ¥r et delt objekt oprettes"
 
 #. It does not make sense to have a procedure linkage
 #. table entry for a local symbol.
-#: elf32-ppc.c:3702
-msgid "%B(%A+0x%lx): %s reloc against local symbol"
-msgstr "%B(%A+0x%lx): %s-relokering mod lokalt symbol"
+#: elf32-ppc.c:4218
+msgid "%P: %H: %s reloc against local symbol\n"
+msgstr "%P: %H: %s-relokering mod lokalt symbol\n"
+
+#: elf32-ppc.c:4299
+msgid "%P: %H: @local call to ifunc %s\n"
+msgstr "%P: %H: @local-kald til ifunc %s\n"
 
-#: elf32-ppc.c:4044 elf32-ppc.c:4059 elfxx-mips.c:12411 elfxx-mips.c:12437
-#: elfxx-mips.c:12459 elfxx-mips.c:12485
+#: elf32-ppc.c:4588 elf32-ppc.c:4603
 msgid "Warning: %B uses hard float, %B uses soft float"
 msgstr "Advarsel: %B bruger flydende tal i hardware, %B bruger flydende tal i software"
 
-#: elf32-ppc.c:4047 elf32-ppc.c:4051
+#: elf32-ppc.c:4591 elf32-ppc.c:4595
 msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float"
 msgstr "Advarsel: %B bruger dobbeltprÃ¦cisions-float i hardware, mens %B bruger enkeltprÃ¦cisions-float i hardware"
 
-#: elf32-ppc.c:4055
+#: elf32-ppc.c:4599
 msgid "Warning: %B uses soft float, %B uses single-precision hard float"
 msgstr "Advarsel: %B bruger software-float, mens %B bruger enkeltprÃ¦cisions-float i hardware"
 
-#: elf32-ppc.c:4062 elf32-ppc.c:4066 elfxx-mips.c:12391 elfxx-mips.c:12395
+#: elf32-ppc.c:4606 elf32-ppc.c:4610
 msgid "Warning: %B uses unknown floating point ABI %d"
 msgstr "Advarsel: %B bruger ukendt ABI %d til flydende tal"
 
-#: elf32-ppc.c:4108 elf32-ppc.c:4112
+#: elf32-ppc.c:4652 elf32-ppc.c:4656
 msgid "Warning: %B uses unknown vector ABI %d"
 msgstr "Advarsel: %B bruger ukendt vektor-ABI %d"
 
-#: elf32-ppc.c:4116
+#: elf32-ppc.c:4660
 msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\""
 msgstr "Advarsel: %B bruger vektor-ABI \"%s\", mens %B bruger \"%s\""
 
-#: elf32-ppc.c:4133 elf32-ppc.c:4136
+#: elf32-ppc.c:4677 elf32-ppc.c:4680
 msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory"
 msgstr "Advarsel: %B bruger r3/r4 til smÃ¥ struktur-returneringer, mens %B bruger hukommelsen"
 
-#: elf32-ppc.c:4139 elf32-ppc.c:4143
+#: elf32-ppc.c:4683 elf32-ppc.c:4687
 msgid "Warning: %B uses unknown small structure return convention %d"
 msgstr "Advarsel: %B bruger ukendt returkonvention %d for smÃ¥strukturer"
 
-#: elf32-ppc.c:4197
+#: elf32-ppc.c:4741
 msgid "%B: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr "%B: kompileret med -mrelocatable og lÃ¦nket med moduler som er kompileret normalt"
+msgstr "%B: kompileret med -mrelocatable og linket med moduler som er kompileret normalt"
 
-#: elf32-ppc.c:4205
+#: elf32-ppc.c:4749
 msgid "%B: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr "%B: kompileret normalt og lÃ¦nket med moduler som er kompileret med -mrelocatable"
-
-#: elf32-ppc.c:4293
-msgid "Using bss-plt due to %B"
-msgstr "Bruger bss-plt pÃ¥ grund af %B"
+msgstr "%B: kompileret normalt og linket med moduler som er kompileret med -mrelocatable"
 
-#: elf32-ppc.c:7192 elf64-ppc.c:12307
-msgid "%B: unknown relocation type %d for symbol %s"
-msgstr "%B: ukendt relokeringstype %d for symbol %s"
+#: elf32-ppc.c:4872
+msgid "%P: bss-plt forced due to %B\n"
+msgstr "%P: bss-plt tvunget pÃ¥ grund af %B\n"
+
+#: elf32-ppc.c:4875
+msgid "%P: bss-plt forced by profiling\n"
+msgstr "%P: bss-plt tvunget af profilering\n"
+
+#. Uh oh, we didn't find the expected call.  We
+#. could just mark this symbol to exclude it
+#. from tls optimization but it's safer to skip
+#. the entire optimization.
+#: elf32-ppc.c:5369 elf64-ppc.c:8371
+msgid "%H arg lost __tls_get_addr, TLS optimization disabled\n"
+msgstr "%H arg lost __tls_get_addr, TLS-optimering slÃ¥et fra\n"
+
+#: elf32-ppc.c:7927
+msgid "%P: %B: unknown relocation type %d for symbol %s\n"
+msgstr "%P: %B: ukendt relokeringstype %d for symbol %s\n"
+
+#: elf32-ppc.c:8191
+msgid "%P: %H: non-zero addend on %s reloc against `%s'\n"
+msgstr "%P: %H: addend forskellig fra nul pÃ¥ %s-relokering mod \"%s\"\n"
+
+#: elf32-ppc.c:8389
+msgid "%P: %H: relocation %s for indirect function %s unsupported\n"
+msgstr "%P: %H: relokering %s for indirekte funktion %s understÃ¸ttes ikke\n"
+
+#: elf32-ppc.c:8646 elf32-ppc.c:8676 elf32-ppc.c:8767
+msgid "%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)\n"
+msgstr "%P: %B: mÃ¥let (%s) for en %s-relokering er i det forkerte uddataafsnit (%s)\n"
 
-#: elf32-ppc.c:7453
-msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"
-msgstr "%B(%A+0x%lx): addend forskellig fra nul pÃ¥ %s-relokering mod \"%s\""
-
-#: elf32-ppc.c:7651 elf64-ppc.c:12812
-msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported"
-msgstr "%B(%A+0x%lx): relokering %s for indirekte funktion %s understÃ¸ttes ikke"
-
-#: elf32-ppc.c:7881 elf32-ppc.c:7911 elf32-ppc.c:7958
+#: elf32-ppc.c:8854
 msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%B: mÃ¥let (%s) for en %s-relokering er i den forkerte uddatasektion (%s)"
+msgstr "%B: mÃ¥let (%s) for en %s-relokering er i det forkerte uddataafsnit (%s)"
 
-#: elf32-ppc.c:8030
-msgid "%B: relocation %s is not yet supported for symbol %s."
-msgstr "%B: relokeringen %s understÃ¸ttes endnu ikke for symbolet %s."
+#: elf32-ppc.c:8958
+msgid "%P: %B: relocation %s is not yet supported for symbol %s\n"
+msgstr "%P: %B: relokeringen %s understÃ¸ttes endnu ikke for symbolet %s\n"
 
-#: elf32-ppc.c:8138 elf64-ppc.c:13162
-msgid "%B(%A+0x%lx): %s reloc against `%s': error %d"
-msgstr "%B(%A+0x%lx): relokering af %s mod \"%s\": fejl %d"
+#: elf32-ppc.c:9038
+msgid "%P: %H: error: %s against `%s' not a multiple of %u\n"
+msgstr "%P: %H: fejl: %s mod \"%s\" ikke et multiplum af %u\n"
 
-#: elf32-ppc.c:8629
-#, c-format
-msgid "%s not defined in linker created %s"
-msgstr "%s er ikke defineret i lÃ¦nker-oprettet %s"
+#: elf32-ppc.c:9067
+msgid "%P: %H: unresolvable %s relocation against symbol `%s'\n"
+msgstr "%P: %H: ulÃ¸selig %s-relokering mod symbolet \"%s\"\n"
 
-#: elf32-rx.c:544
-msgid "%B:%A: Warning: deprecated Red Hat reloc "
-msgstr "%B:%A: Advarsel: forÃ¦ldet Red Hat-relokering "
+#: elf32-ppc.c:9114
+msgid "%P: %H: %s reloc against `%s': error %d\n"
+msgstr "%P: %H: %s-relokering mod \"%s\": fejl %d\n"
 
-#: elf32-rx.c:1086
-msgid "Warning: RX_SYM reloc with an unknown symbol"
-msgstr "Advarsel: RX_SYM-relokering med et ukendt symbol"
+#: elf32-ppc.c:9750
+msgid "%P: %s not defined in linker created %s\n"
+msgstr "%P: %s er ikke defineret i linker-oprettet %s\n"
+
+#: elf32-rl78.c:784
+msgid "Warning: RL78_SYM reloc with an unknown symbol"
+msgstr "Advarsel: RL78_SYM-relokering med et ukendt symbol"
 
-#: elf32-rx.c:1251
+#: elf32-rl78.c:952 elf32-rx.c:1324
 msgid "%B(%A): error: call to undefined function '%s'"
 msgstr "%B(%A): fejl: kald til udefineret funktion \"%s\""
 
-#: elf32-rx.c:1265
+#: elf32-rl78.c:966 elf32-rx.c:1338
 msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
 msgstr "%B(%A): advarsel: ikke-justeret tilgang til symbol \"%s\" i det lille dataomrÃ¥de"
 
-#: elf32-rx.c:1269
+#: elf32-rl78.c:970 elf32-rx.c:1342
 msgid "%B(%A): internal error: out of range error"
 msgstr "%B(%A): intern fejl: uden for intervallet"
 
-#: elf32-rx.c:1273
+#: elf32-rl78.c:974 elf32-rx.c:1346
 msgid "%B(%A): internal error: unsupported relocation error"
 msgstr "%B(%A): intern fejl: relokeringen understÃ¸ttes ikke"
 
-#: elf32-rx.c:1277
+#: elf32-rl78.c:978 elf32-rx.c:1350
 msgid "%B(%A): internal error: dangerous relocation"
 msgstr "%B(%A): intern fejl: farlig relokering"
 
-#: elf32-rx.c:1281
+#: elf32-rl78.c:982 elf32-rx.c:1354
 msgid "%B(%A): internal error: unknown error"
 msgstr "%B(%A): intern fejl: ukendt fejl"
 
-#: elf32-rx.c:2928
+#: elf32-rl78.c:1043
+msgid "RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"
+msgstr "RL78/G10 ABI-konflikt: kan ikke linke G10- og ikke-G10-objekter sammen"
+
+#: elf32-rl78.c:1046 elf32-rl78.c:1049
 #, c-format
-msgid " [64-bit doubles]"
-msgstr " [64 bit-doubles]"
+msgid "- %s is G10, %s is not"
+msgstr "- %s er G10, %s er ikke"
 
-#: elf32-rx.c:2930
+#: elf32-rl78.c:1072
 #, c-format
-msgid " [dsp]"
-msgstr " [dsp]"
+msgid " [G10]"
+msgstr " [G10]"
+
+#: elf32-rx.c:563
+msgid "%B:%A: Warning: deprecated Red Hat reloc "
+msgstr "%B:%A: Advarsel: forÃ¦ldet Red Hat-relokering "
 
-#: elf32-s390.c:2209 elf64-s390.c:2196
+#. Check for unsafe relocs in PID mode.  These are any relocs where
+#. an absolute address is being computed.  There are special cases
+#. for relocs against symbols that are known to be referenced in
+#. crt0.o before the PID base address register has been initialised.
+#: elf32-rx.c:581
+msgid "%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"
+msgstr "%B(%A): usikker PID-relokering %s ved 0x%08lx (mod %s i %s)"
+
+#: elf32-rx.c:1157
+msgid "Warning: RX_SYM reloc with an unknown symbol"
+msgstr "Advarsel: RX_SYM-relokering med et ukendt symbol"
+
+#: elf32-s390.c:2292 elf64-s390.c:2244
 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
 msgstr "%B(%A+0x%lx): ugyldig instruktion til TLS-relokering %s"
 
-#: elf32-score.c:1522 elf32-score7.c:1382 elfxx-mips.c:3323
+#: elf32-score.c:1520 elf32-score7.c:1379 elfxx-mips.c:3642
 msgid "not enough GOT space for local GOT entries"
 msgstr "ikke nok med GOT-plads for lokale GOT-poster"
 
 # word er en datatype
-#: elf32-score.c:2744
+#: elf32-score.c:2742
 msgid "address not word align"
 msgstr "adresse er ikke justeret til word-position"
 
-#: elf32-score.c:2829 elf32-score7.c:2634
+#: elf32-score.c:2827 elf32-score7.c:2631
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Fejlagtig relokering for sektion %s opdaget"
+msgstr "%s: Fejlagtig relokering for afsnit %s opdaget"
 
-#: elf32-score.c:2880 elf32-score7.c:2685
+#: elf32-score.c:2882 elf32-score7.c:2686
 msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
 msgstr "%B: CALL15-relokering ved 0x%lx er ikke mod globalt symbol"
 
-#: elf32-score.c:3999 elf32-score7.c:3806
+#: elf32-score.c:4007 elf32-score7.c:3811
 #, c-format
 msgid " [pic]"
 msgstr " [pic]"
 
-#: elf32-score.c:4003 elf32-score7.c:3810
+#: elf32-score.c:4011 elf32-score7.c:3815
 #, c-format
 msgid " [fix dep]"
 msgstr " [fix dep]"
 
-#: elf32-score.c:4045 elf32-score7.c:3852
+#: elf32-score.c:4053 elf32-score7.c:3857
 msgid "%B: warning: linking PIC files with non-PIC files"
-msgstr "%B: advarsel: lÃ¦nker PIC-filer med ikke-PIC-filer"
+msgstr "%B: advarsel: linker PIC-filer med ikke-PIC-filer"
 
 #: elf32-sh-symbian.c:130
 msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
@@ -2008,596 +2404,735 @@ msgstr "%B: IMPORT AS-direktiv til %s sk
 msgid "%B: Unrecognised .directive command: %s"
 msgstr "%B: Ukendt .directive-kommando: %s"
 
-#: elf32-sh-symbian.c:503
+#: elf32-sh-symbian.c:500
 msgid "%B: Failed to add renamed symbol %s"
 msgstr "%B: Kunne ikke tilfÃ¸je omdÃ¸bt symbol %s"
 
-#: elf32-sh.c:568
+#: elf32-sh.c:569
 msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%B: 0x%lx: advarsel: fejlagtig R_SH_USES-afstand"
 
-#: elf32-sh.c:580
+#: elf32-sh.c:581
 msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%B: 0x%lx: advarsel: R_SH_USES peger pÃ¥ ukendt instruktion 0x%x"
 
-#: elf32-sh.c:597
+#: elf32-sh.c:598
 msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%B: 0x%lx: advarsel: fejlagtig R_SH_USES-indlÃ¦sningsafstand"
 
-#: elf32-sh.c:612
+#: elf32-sh.c:613
 msgid "%B: 0x%lx: warning: could not find expected reloc"
 msgstr "%B: 0x%lx: advarsel: kunne ikke finde forventet relokering"
 
-#: elf32-sh.c:640
+#: elf32-sh.c:641
 msgid "%B: 0x%lx: warning: symbol in unexpected section"
-msgstr "%B: 0x%lx: advarsel: symbol i uventet sektion"
+msgstr "%B: 0x%lx: advarsel: symbol i uventet afsnit"
 
-#: elf32-sh.c:766
+#: elf32-sh.c:767
 msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%B: 0x%lx: advarsel: kunne ikke finde forventet COUNT-relokering"
 
-#: elf32-sh.c:775
+#: elf32-sh.c:776
 msgid "%B: 0x%lx: warning: bad count"
 msgstr "%B: 0x%lx: advarsel: fejlagtigt antal"
 
-#: elf32-sh.c:1179 elf32-sh.c:1549
+#: elf32-sh.c:1180 elf32-sh.c:1550
 msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
-msgstr "%B: 0x%lx: fatalt: relokering giver overlÃ¸b ved forenklingen"
+msgstr "%B: 0x%lx: fatalt: relokering giver overlÃ¸b ved relaksering"
 
-#: elf32-sh.c:4057 elf64-sh64.c:1514
+#: elf32-sh.c:3939 elf64-sh64.c:1514
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr "Uventet STO_SH5_ISA32 pÃ¥ lokalt symbol hÃ¥ndteres ikke"
 
-#: elf32-sh.c:4304
+#: elf32-sh.c:4190
 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr "%B: 0x%lx: fatalt: ujusteret grenmÃ¥l for relokering for forenklingsunderstÃ¸ttelse"
+msgstr "%B: 0x%lx: fatalt: ujusteret grenmÃ¥l for relokering for relakseringsunderstÃ¸ttelse"
 
-#: elf32-sh.c:4337 elf32-sh.c:4352
+#: elf32-sh.c:4223 elf32-sh.c:4238
 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
-msgstr "%s: 0x%lx: fatalt: ujusteret %s-relokering 0x%lx"
+msgstr "%B: 0x%lx: fatalt: ujusteret %s-relokering 0x%lx"
 
-#: elf32-sh.c:4366
+#: elf32-sh.c:4252
 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
 msgstr "%B: 0x%lx: fatalt: R_SH_PSHA-relokering %d er uden for gyldigt interval -32..32"
 
-#: elf32-sh.c:4380
+#: elf32-sh.c:4266
 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
 msgstr "%B: 0x%lx: fatalt: R_SH_PSHL-relokering %d er uden for gyldigt interval -32..32"
 
-#: elf32-sh.c:4524 elf32-sh.c:4994
+#: elf32-sh.c:4410 elf32-sh.c:4886
 msgid "%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"
-msgstr "%B(%A+0x%lx): kan ikke udsende \"fixup\" til \"%s\" i skrivebeskyttet sektion"
+msgstr "%B(%A+0x%lx): kan ikke udsende \"fixup\" til \"%s\" i skrivebeskyttet afsnit"
 
-#: elf32-sh.c:5101
+#: elf32-sh.c:4993
 msgid "%B(%A+0x%lx): %s relocation against external symbol \"%s\""
 msgstr "%B(%A+0x%lx): %s-relokering mod eksternt symbol \"%s\""
 
-#: elf32-sh.c:5574
+#: elf32-sh.c:5466
 #, c-format
 msgid "%X%C: relocation to \"%s\" references a different segment\n"
 msgstr "%X%C: relokering til \"%s\" refererer et andet segment\n"
 
-#: elf32-sh.c:5580
+#: elf32-sh.c:5472
 #, c-format
 msgid "%C: warning: relocation to \"%s\" references a different segment\n"
 msgstr "%C: advarsel: relokering til \"%s\" refererer et andet segment\n"
 
-#: elf32-sh.c:6358 elf32-sh.c:6441
+#: elf32-sh.c:6254 elf32-sh.c:6337
 msgid "%B: `%s' accessed both as normal and FDPIC symbol"
 msgstr "%B: \"%s\" tilgÃ¥s bÃ¥de som normalt symbol og FDPIC-symbol"
 
-#: elf32-sh.c:6363 elf32-sh.c:6445
+#: elf32-sh.c:6259 elf32-sh.c:6341
 msgid "%B: `%s' accessed both as FDPIC and thread local symbol"
 msgstr "%B: \"%s\" tilgÃ¥s bÃ¥de som FDPIC-symbol og trÃ¥dlokalt symbol"
 
-#: elf32-sh.c:6393
+#: elf32-sh.c:6289
 msgid "%B: Function descriptor relocation with non-zero addend"
 msgstr "%B: Relokering af funktionsdeskriptor med addend forskellig fra nul"
 
-#: elf32-sh.c:6629 elf64-alpha.c:4560
+#: elf32-sh.c:6525 elf64-alpha.c:4661
 msgid "%B: TLS local exec code cannot be linked into shared objects"
-msgstr "%B: lokal TLS-eksekveringskode kan ikke lÃ¦nkes ind i delte objekter"
+msgstr "%B: lokal TLS-eksekveringskode kan ikke linkes ind i delte objekter"
 
-#: elf32-sh64.c:223 elf64-sh64.c:2314
+#: elf32-sh64.c:224 elf64-sh64.c:2318
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr "%s: oversat som 32-bitsobjekt og %s er 64-bit"
 
-#: elf32-sh64.c:226 elf64-sh64.c:2317
+#: elf32-sh64.c:227 elf64-sh64.c:2321
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr "%s: oversat som 64-bitsobjekt og %s er 32-bit"
 
-#: elf32-sh64.c:228 elf64-sh64.c:2319
+#: elf32-sh64.c:229 elf64-sh64.c:2323
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr "%s: objektstÃ¸rrelsen stemmer ikke overens med den hos mÃ¥let %s"
 
-#: elf32-sh64.c:451 elf64-sh64.c:2833
+#: elf32-sh64.c:452 elf64-sh64.c:2839
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr "%s: mÃ¸dte dataetikettesymbol i inddata"
 
-#: elf32-sh64.c:528
+#: elf32-sh64.c:529
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr "PTB passer ikke: en SHmedia-adresse (bit 0 == 1)"
 
-#: elf32-sh64.c:531
+#: elf32-sh64.c:532
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr "PTA passer ikke: en SHcompact-adresse (bit 0 == 0)"
 
-#: elf32-sh64.c:549
+#: elf32-sh64.c:550
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr "%s: GAS-fejl: uventet PTB-instruktion med R_SH_PT_16"
 
-#: elf32-sh64.c:598
+#: elf32-sh64.c:599
 msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
-msgstr "%B: fejl: ujusteret relokeringstype %d pÃ¥ %08x-relokering %08x\n"
+msgstr "%B: fejl: ujusteret relokeringstype %d pÃ¥ %08x-relokering %p\n"
 
-#: elf32-sh64.c:674
+#: elf32-sh64.c:675
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr "%s: kunne ikke udskrive tilfÃ¸jede .cranges-poster"
 
-#: elf32-sh64.c:734
+#: elf32-sh64.c:735
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr "%s: kunne ikke udskrive sorterede cranges-poster"
 
-#: elf32-sparc.c:89
+#: elf32-sparc.c:90
 msgid "%B: compiled for a 64 bit system and target is 32 bit"
 msgstr "%B: kompileret til et 64-bitssystem, men mÃ¥let er 32-bit"
 
-#: elf32-sparc.c:102
+#: elf32-sparc.c:103
 msgid "%B: linking little endian files with big endian files"
-msgstr "%B: lÃ¦nker little endian-filer med big endian-filer"
+msgstr "%B: linker little endian-filer med big endian-filer"
 
-#: elf32-spu.c:719
+#: elf32-spu.c:716
 msgid "%X%P: overlay section %A does not start on a cache line.\n"
-msgstr "%X%P: overlay-sektion %A starter ikke pÃ¥ en cachelinje.\n"
+msgstr "%X%P: overlay-afsnit %A starter ikke pÃ¥ en cachelinje.\n"
 
-#: elf32-spu.c:727
+#: elf32-spu.c:724
 msgid "%X%P: overlay section %A is larger than a cache line.\n"
-msgstr "%X%P: overlay-sektion %A er stÃ¸rre end en cachelinje.\n"
+msgstr "%X%P: overlay-afsnit %A er stÃ¸rre end en cachelinje.\n"
 
-#: elf32-spu.c:747
+#: elf32-spu.c:744
 msgid "%X%P: overlay section %A is not in cache area.\n"
-msgstr "%X%P: overlay-sektion %A er ikke i cacheomrÃ¥det.\n"
+msgstr "%X%P: overlay-afsnit %A er ikke i cacheomrÃ¥det.\n"
 
-#: elf32-spu.c:787
+#: elf32-spu.c:784
 msgid "%X%P: overlay sections %A and %A do not start at the same address.\n"
-msgstr "%X%P: overlay-sektionerne %A og %A starter ikke pÃ¥ samme adresse.\n"
+msgstr "%X%P: overlay-afsnittene %A og %A starter ikke pÃ¥ samme adresse.\n"
 
-#: elf32-spu.c:1011
+#: elf32-spu.c:1008
 msgid "warning: call to non-function symbol %s defined in %B"
 msgstr "advarsel: kald til ikke-funktionssymbol %s defineret i %B"
 
-#: elf32-spu.c:1361
+#: elf32-spu.c:1358
 msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n"
 msgstr "%A:0x%v lrlive .brinfo (%u) afviger fra analyse (%u)\n"
 
-#: elf32-spu.c:1880
+#: elf32-spu.c:1877
 msgid "%B is not allowed to define %s"
 msgstr "%B mÃ¥ ikke definere %s"
 
-#: elf32-spu.c:1888
+#: elf32-spu.c:1885
 #, c-format
 msgid "you are not allowed to define %s in a script"
 msgstr "du har ikke lov til at definere %s i et script"
 
-#: elf32-spu.c:1922
+#: elf32-spu.c:1919
 #, c-format
 msgid "%s in overlay section"
-msgstr "%s i overlay-sektion"
+msgstr "%s i overlay-afsnit"
 
-#: elf32-spu.c:1951
+#: elf32-spu.c:1948
 msgid "overlay stub relocation overflow"
 msgstr "overlÃ¸b ved overlay-stub-relokering"
 
-#: elf32-spu.c:1960 elf64-ppc.c:11327
+#: elf32-spu.c:1957
 msgid "stubs don't match calculated size"
 msgstr "stubbe stemmer ikke overens med beregnet stÃ¸rrelse"
 
-#: elf32-spu.c:2542
+#: elf32-spu.c:2539
 #, c-format
 msgid "warning: %s overlaps %s\n"
 msgstr "advarsel: %s overlapper %s\n"
 
-#: elf32-spu.c:2558
+#: elf32-spu.c:2555
 #, c-format
 msgid "warning: %s exceeds section size\n"
-msgstr "advarsel: %s overstiger sektionsstÃ¸rrelse\n"
+msgstr "advarsel: %s overstiger afsnitsstÃ¸rrelse\n"
 
-#: elf32-spu.c:2589
+#: elf32-spu.c:2586
 msgid "%A:0x%v not found in function table\n"
 msgstr "%A:0x%v ikke fundet i funktionstabel\n"
 
-#: elf32-spu.c:2729
+#: elf32-spu.c:2726
 msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n"
-msgstr "%B(%A+0x%v): kald til ikke-kodesektion %B(%A), analyse ufuldstÃ¦ndig\n"
+msgstr "%B(%A+0x%v): kald til ikke-kodeafsnit %B(%A), analyse ufuldstÃ¦ndig\n"
 
-#: elf32-spu.c:3297
+#: elf32-spu.c:3294
 #, c-format
 msgid "Stack analysis will ignore the call from %s to %s\n"
 msgstr "Stak-analyse vil ignorere kaldet fra %s til %s\n"
 
-#: elf32-spu.c:3988
+#: elf32-spu.c:3985
 msgid "  %s: 0x%v\n"
 msgstr "  %s: 0x%v\n"
 
-#: elf32-spu.c:3989
+#: elf32-spu.c:3986
 msgid "%s: 0x%v 0x%v\n"
 msgstr "%s: 0x%v 0x%v\n"
 
-#: elf32-spu.c:3994
+#: elf32-spu.c:3991
 msgid "  calls:\n"
 msgstr "  kald:\n"
 
-#: elf32-spu.c:4002
+#: elf32-spu.c:3999
 #, c-format
 msgid "   %s%s %s\n"
 msgstr "   %s%s %s\n"
 
-#: elf32-spu.c:4307
+#: elf32-spu.c:4304
 #, c-format
 msgid "%s duplicated in %s\n"
 msgstr "%s er duplikeret i %s\n"
 
-#: elf32-spu.c:4311
+#: elf32-spu.c:4308
 #, c-format
 msgid "%s duplicated\n"
 msgstr "%s duplikeret\n"
 
-#: elf32-spu.c:4318
+#: elf32-spu.c:4315
 msgid "sorry, no support for duplicate object files in auto-overlay script\n"
 msgstr "beklager, men auto-overlay-scriptet understÃ¸tter ikke duplikerede objektfiler\n"
 
-#: elf32-spu.c:4359
+#: elf32-spu.c:4356
 msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n"
 msgstr "ikke-overlay-stÃ¸rrelse af 0x%v plus den maksimale overlaystÃ¸rrelse af 0x%v overstiger lokalt lager\n"
 
-#: elf32-spu.c:4514
+#: elf32-spu.c:4511
 msgid "%B:%A%s exceeds overlay size\n"
 msgstr "%B:%A%s overstiger overlay-stÃ¸rrelsen\n"
 
-#: elf32-spu.c:4676
+#: elf32-spu.c:4673
 msgid "Stack size for call graph root nodes.\n"
 msgstr "StakstÃ¸rrelsen for rodknuder i funktionskaldsgrafen.\n"
 
-#: elf32-spu.c:4677
+#: elf32-spu.c:4674
 msgid ""
 "\n"
 "Stack size for functions.  Annotations: '*' max stack, 't' tail call\n"
 msgstr ""
 "\n"
-"StakstÃ¸rrelse til funktioner.  Annotationer: '*' maks stak, 't' tail call\n"
+"StakstÃ¸rrelse til funktioner.  Annotationer: \"*\" maks stak, \"t\" tail call\n"
 
-#: elf32-spu.c:4687
+#: elf32-spu.c:4684
 msgid "Maximum stack required is 0x%v\n"
 msgstr "Maksimum pÃ¥krÃ¦vet stak er 0x%v\n"
 
-#: elf32-spu.c:4778
+#: elf32-spu.c:4775
 msgid "fatal error while creating .fixup"
 msgstr "fatal fejl ved oprettelse af .fixup"
 
-#: elf32-spu.c:5006
+#: elf32-spu.c:5005
 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
 msgstr "%B(%s+0x%lx): ulÃ¸selig %s-relokering mod symbol \"%s\""
 
-#: elf32-tic6x.c:1539
+#: elf32-tic6x.c:1600
+msgid "warning: generating a shared library containing non-PIC code"
+msgstr "advarsel: genererer et delt bibliotek som indeholder ikke-PIC-kode"
+
+#: elf32-tic6x.c:1605
+msgid "warning: generating a shared library containing non-PID code"
+msgstr "advarsel: genererer et delt bibliotek som indeholder ikke-PID-kode"
+
+#: elf32-tic6x.c:2524
 msgid "%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined"
 msgstr "%B: SB-relativ relokering, men __c6xabi_DSBT_BASE er ikke defineret"
 
-#. Shared libraries and exception handling support not
-#. implemented.
-#: elf32-tic6x.c:1554
-msgid "%B: relocation type %d not implemented"
-msgstr "%B: relokeringstypen %d er ikke implementeret"
-
-#: elf32-tic6x.c:1640
-msgid "dangerous relocation"
-msgstr "farlig relokering"
+#: elf32-tic6x.c:3648
+msgid "%B: error: unknown mandatory EABI object attribute %d"
+msgstr "%B: fejl: ukendt obligatorisk EABI-objektattribut %d"
+
+#: elf32-tic6x.c:3656
+msgid "%B: warning: unknown EABI object attribute %d"
+msgstr "%B: advarsel: ukendt EABI-objektattribut %d"
 
 # ikke sikker pÃ¥ hvad det her betyder, sÃ¥ bruger mere direkte oversÃ¦ttelse end hvad der mÃ¥ske er nÃ¸dvendigt
-#: elf32-tic6x.c:1788 elf32-tic6x.c:1796
+#: elf32-tic6x.c:3768 elf32-tic6x.c:3776
 msgid "error: %B requires more stack alignment than %B preserves"
 msgstr "fejl: %B krÃ¦ver mere stakjustering end %B prÃ¦serverer"
 
-#: elf32-tic6x.c:1806 elf32-tic6x.c:1815
+#: elf32-tic6x.c:3786 elf32-tic6x.c:3795
 msgid "error: unknown Tag_ABI_array_object_alignment value in %B"
 msgstr "fejl: ukendt vÃ¦rdi for Tag_ABI_array_object_alignment i %B"
 
-#: elf32-tic6x.c:1824 elf32-tic6x.c:1833
+#: elf32-tic6x.c:3804 elf32-tic6x.c:3813
 msgid "error: unknown Tag_ABI_array_object_align_expected value in %B"
 msgstr "error: ukendt vÃ¦rdi for Tag_ABI_array_object_align_expected i %B"
 
-#: elf32-tic6x.c:1841 elf32-tic6x.c:1848
+#: elf32-tic6x.c:3821 elf32-tic6x.c:3828
 msgid "error: %B requires more array alignment than %B preserves"
 msgstr "fejl: %B krÃ¦ver mere array-justering end %B prÃ¦serverer"
 
-#: elf32-tic6x.c:1870
+#: elf32-tic6x.c:3850
 msgid "warning: %B and %B differ in wchar_t size"
 msgstr "advarsel: %B og %B har forskellig stÃ¸rrelse af wchar_t"
 
-#: elf32-tic6x.c:1888
+#: elf32-tic6x.c:3868
 msgid "warning: %B and %B differ in whether code is compiled for DSBT"
 msgstr "advarsel: forskel pÃ¥ om %B og %B er kompileret til DSBT"
 
-#: elf32-tic6x.c:1898
-msgid "warning: %B and %B differ in position-dependence of data addressing"
-msgstr "advarsel: %B og %B har forskellig positionsafhÃ¦ngighed af dataadressering"
-
-#: elf32-tic6x.c:1908
-msgid "warning: %B and %B differ in position-dependence of code addressing"
-msgstr "advarsel: %B og %B har forskellig positionsafhÃ¦ngighed af kodeadressering"
-
-#: elf32-v850.c:173
+#: elf32-v850.c:157
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr "Variabel \"%s\" kan ikke befinde sig i flere smÃ¥ dataomrÃ¥der"
 
-#: elf32-v850.c:176
+#: elf32-v850.c:160
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr "Variabel \"%s\" kan kun vÃ¦re i Ã©t af de smÃ¥, tomme og bittesmÃ¥ dataomrÃ¥der"
 
-#: elf32-v850.c:179
+#: elf32-v850.c:163
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr "Variabel \"%s\" kan ikke vÃ¦re i bÃ¥de smÃ¥ og tomme dataomrÃ¥der samtidigt"
 
-#: elf32-v850.c:182
+#: elf32-v850.c:166
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr "Variabel \"%s\" kan ikke vÃ¦re i bÃ¥de smÃ¥ og bittesmÃ¥ dataomrÃ¥der samtidigt"
 
-#: elf32-v850.c:185
+#: elf32-v850.c:169
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr "Variabel \"%s\" kan ikke vÃ¦re i bÃ¥de tomme og bittesmÃ¥ dataomrÃ¥der samtidigt"
 
-#: elf32-v850.c:483
-#, c-format
-msgid "FAILED to find previous HI16 reloc\n"
-msgstr "MISLYKKEDES med at finde tidligere HI16-relokering\n"
+#: elf32-v850.c:467
+msgid "FAILED to find previous HI16 reloc"
+msgstr "KUNNE IKKE finde tidligere HI16-relokering"
 
-#: elf32-v850.c:2155
+#: elf32-v850.c:2293
 msgid "could not locate special linker symbol __gp"
-msgstr "kunne ikke lokalisere specielt lÃ¦nkersymbol __gp"
+msgstr "kunne ikke lokalisere specielt linkersymbol __gp"
 
-#: elf32-v850.c:2159
+#: elf32-v850.c:2297
 msgid "could not locate special linker symbol __ep"
-msgstr "kunne ikke lokalisere specielt lÃ¦nkersymbol __ep"
+msgstr "kunne ikke lokalisere specielt linkersymbol __ep"
 
-#: elf32-v850.c:2163
+#: elf32-v850.c:2301
 msgid "could not locate special linker symbol __ctbp"
-msgstr "kunne ikke lokalisere specielt lÃ¦nkersymbol __ctbp"
+msgstr "kunne ikke lokalisere specielt linkersymbol __ctbp"
 
-#: elf32-v850.c:2341
+#: elf32-v850.c:2471 elf32-v850.c:2534
 msgid "%B: Architecture mismatch with previous modules"
 msgstr "%B: Arkitekturen passer ikke sammen med tidligere moduler"
 
+#: elf32-v850.c:2478
+msgid "%B: Alignment mismatch with previous modules"
+msgstr "%B: Justering passer ikke sammen med tidligere moduler"
+
 #. xgettext:c-format.
-#: elf32-v850.c:2360
+#: elf32-v850.c:2553
 #, c-format
 msgid "private flags = %lx: "
 msgstr "private flag = %lx: "
 
-#: elf32-v850.c:2365
+#: elf32-v850.c:2558
+#, c-format
+msgid "unknown v850 architecture"
+msgstr "ukendt v850-arkitektur"
+
+#: elf32-v850.c:2560
+#, c-format
+msgid "v850 E3 architecture"
+msgstr "v850 E3-arkitektur"
+
+#: elf32-v850.c:2562 elf32-v850.c:2572
 #, c-format
 msgid "v850 architecture"
 msgstr "v850-arkitektur"
 
-#: elf32-v850.c:2366
+#: elf32-v850.c:2565
+#, c-format
+msgid ", 8-byte data alignment"
+msgstr ", 8-byte datajustering"
+
+#: elf32-v850.c:2573
 #, c-format
 msgid "v850e architecture"
 msgstr "v850e-arkitektur"
 
-#: elf32-v850.c:2367
+#: elf32-v850.c:2574
 #, c-format
 msgid "v850e1 architecture"
 msgstr "v850e1-arkitektur"
 
-#: elf32-v850.c:2368
+#: elf32-v850.c:2575
 #, c-format
 msgid "v850e2 architecture"
 msgstr "v850e2-arkitektur"
 
-#: elf32-v850.c:2369
+#: elf32-v850.c:2576
 #, c-format
 msgid "v850e2v3 architecture"
 msgstr "v850e2v3-arkitektur"
 
-#: elf32-vax.c:531
+#: elf32-v850.c:2577
+#, c-format
+msgid "v850e3v5 architecture"
+msgstr "v850e3v5-arkitektur"
+
+#: elf32-vax.c:532
 #, c-format
 msgid " [nonpic]"
 msgstr " [ikke-pic]"
 
-#: elf32-vax.c:534
+#: elf32-vax.c:535
 #, c-format
 msgid " [d-float]"
 msgstr " [d-flydende tal]"
 
-#: elf32-vax.c:537
+#: elf32-vax.c:538
 #, c-format
 msgid " [g-float]"
 msgstr " [g-flydende tal]"
 
-#: elf32-vax.c:654
+#: elf32-vax.c:656
 #, c-format
 msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
 msgstr "%s: advarsel: GOT-addendum %ld til \"%s\" stemmer ikke overens med tidligere GOT-addendum %ld"
 
-#: elf32-vax.c:1587
+#: elf32-vax.c:1543
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
-msgstr "%s: advarsel: PLT-addendum %d til \"%s\" fra sektionen %s ignoreredes"
+msgstr "%s: advarsel: PLT-addendum %d til \"%s\" fra afsnittet %s ignoreredes"
 
-#: elf32-vax.c:1714
+#: elf32-vax.c:1668
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
-msgstr "%s: advarsel: %s-relokering mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: advarsel: %s-relokering mod symbol \"%s\" fra afsnittet %s"
 
-#: elf32-vax.c:1720
+#: elf32-vax.c:1674
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
-msgstr "%s: advarsel: %s-relokering til 0x%x fra sektionen %s"
+msgstr "%s: advarsel: %s-relokering til 0x%x fra afsnittet %s"
+
+#: elf32-xgate.c:686
+#, c-format
+msgid "cpu=XGATE]"
+msgstr "cpu=XGATE]"
+
+#: elf32-xgate.c:688
+#, c-format
+msgid "error reading cpu type from elf private data"
+msgstr "fejl ved lÃ¦sning af cpu-type fra private elf-data"
 
-#: elf32-xstormy16.c:451 elf32-ia64.c:2861 elf64-ia64.c:2861
+#: elf32-xstormy16.c:455 elf64-ia64-vms.c:2072 elf32-ia64.c:2330
+#: elf64-ia64.c:2330
 msgid "non-zero addend in @fptr reloc"
 msgstr "ikke-tomt addendum i @fptr-relokering"
 
-#: elf32-xtensa.c:918
+#: elf32-xtensa.c:908
 msgid "%B(%A): invalid property table"
 msgstr "%B(%A): ugyldig egenskabstabel"
 
-#: elf32-xtensa.c:2780
+#: elf32-xtensa.c:2774
 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
 msgstr "%B(%A+0x%lx): relokeringsafsÃ¦t uden for gyldigt interval (stÃ¸rrelse=0x%x)"
 
-#: elf32-xtensa.c:2859 elf32-xtensa.c:2980
+#: elf32-xtensa.c:2853 elf32-xtensa.c:2974
 msgid "dynamic relocation in read-only section"
-msgstr "dynamisk relokering i skrivebeskyttet sektion"
+msgstr "dynamisk relokering i skrivebeskyttet afsnit"
 
-#: elf32-xtensa.c:2956
+#: elf32-xtensa.c:2950
 msgid "TLS relocation invalid without dynamic sections"
-msgstr "TLS-relokering er ugyldig uden dynamiske sektioner"
+msgstr "TLS-relokering er ugyldig uden dynamiske afsnit"
 
-#: elf32-xtensa.c:3173
+#: elf32-xtensa.c:3169
 msgid "internal inconsistency in size of .got.loc section"
-msgstr "intern inkonsistens i stÃ¸rrelsen af .got.loc-sektion"
+msgstr "intern inkonsistens i stÃ¸rrelsen af .got.loc-afsnit"
 
-#: elf32-xtensa.c:3486
+#: elf32-xtensa.c:3482
 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
 msgstr "%B: inkompatibel maskintype. Uddata er 0x%x. Inddata er 0x%x"
 
-#: elf32-xtensa.c:4715 elf32-xtensa.c:4723
+#: elf32-xtensa.c:4713 elf32-xtensa.c:4721
 msgid "Attempt to convert L32R/CALLX to CALL failed"
 msgstr "ForsÃ¸g pÃ¥ at konvertere L32R/CALLX til CALL mislykkedes"
 
-#: elf32-xtensa.c:6333 elf32-xtensa.c:6409 elf32-xtensa.c:7525
+#: elf32-xtensa.c:6330 elf32-xtensa.c:6406 elf32-xtensa.c:7522
 msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
 msgstr "%B(%A+0x%lx): kunne ikke afkode instruktion; mulig konfigurationsmodstrid"
 
-#: elf32-xtensa.c:7265
+#: elf32-xtensa.c:7262
 msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"
 msgstr "%B(%A+0x%lx): kunne ikke afkode instruktion til XTENSA_ASM_SIMPLIFY-relokering; mulig konfigurationsmodstrid"
 
-#: elf32-xtensa.c:9024
+#: elf32-xtensa.c:9022
 msgid "invalid relocation address"
 msgstr "ugyldig relokeringsadresse"
 
-#: elf32-xtensa.c:9073
+#: elf32-xtensa.c:9071
 msgid "overflow after relaxation"
-msgstr "overlÃ¸b efter forenkling"
+msgstr "overlÃ¸b efter relaksering"
 
-#: elf32-xtensa.c:10205
+#: elf32-xtensa.c:10203
 msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
 msgstr "%B(%A+0x%lx): uventet fiks til %s-relokering"
 
-#: elf64-alpha.c:460
+#: elf64-alpha.c:474
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "GPDISP-relokering fandt ingen ldah- og lda-instruktioner"
 
-#: elf64-alpha.c:2408
+#: elf64-alpha.c:2503
 msgid "%B: .got subsegment exceeds 64K (size %d)"
 msgstr "%B: .got-subsegment overskrider 64K (stÃ¸rrelse %d)"
 
-#: elf64-alpha.c:4304 elf64-alpha.c:4316
+#: elf64-alpha.c:4396 elf64-alpha.c:4408
 msgid "%B: gp-relative relocation against dynamic symbol %s"
 msgstr "%B: gp-relativ relokering mod dynamisk symbol %s"
 
-#: elf64-alpha.c:4342 elf64-alpha.c:4477
+#: elf64-alpha.c:4434 elf64-alpha.c:4574
 msgid "%B: pc-relative relocation against dynamic symbol %s"
 msgstr "%B: pc-relativ relokering mod dynamisk symbol %s"
 
-#: elf64-alpha.c:4370
+#: elf64-alpha.c:4462
 msgid "%B: change in gp: BRSGP %s"
 msgstr "%B: Ã¦ndring i gp: BRSGP %s"
 
-#: elf64-alpha.c:4395
+#: elf64-alpha.c:4487
 msgid "<unknown>"
 msgstr "<ukendt>"
 
-#: elf64-alpha.c:4400
+#: elf64-alpha.c:4492
 msgid "%B: !samegp reloc against symbol without .prologue: %s"
 msgstr "%B: !samegp-relokering mod symbol uden .prologue: %s"
 
-#: elf64-alpha.c:4452
+#: elf64-alpha.c:4549
 msgid "%B: unhandled dynamic relocation against %s"
 msgstr "%B: uhÃ¥ndteret dynamisk relokering mod %s"
 
-#: elf64-alpha.c:4484
+#: elf64-alpha.c:4581
 msgid "%B: pc-relative relocation against undefined weak symbol %s"
 msgstr "%B: pc-relativ relokering mod udefineret svagt symbol %s"
 
-#: elf64-alpha.c:4544
+#: elf64-alpha.c:4645
 msgid "%B: dtp-relative relocation against dynamic symbol %s"
 msgstr "%B: dtp-relativ relokering mod dynamisk symbol %s"
 
-#: elf64-alpha.c:4567
+#: elf64-alpha.c:4668
 msgid "%B: tp-relative relocation against dynamic symbol %s"
 msgstr "%B: tp-relativ relokering mod dynamisk symbol %s"
 
-#: elf64-hppa.c:2101
+#: elf64-hppa.c:2084
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "stubpost for %s kan ikke indlÃ¦se .plt, dp-afstand = %ld"
 
-#: elf64-hppa.c:3299
-msgid "%B(%A+0x%lx): cannot reach %s"
-msgstr "%B(%A+0x%lx): kan ikke nÃ¥ %s"
+#: elf64-hppa.c:3280
+msgid "%B(%A+0x%"
+msgstr "%B(%A+0x%"
+
+#: elf64-ia64-vms.c:587 elf32-ia64.c:619 elf64-ia64.c:619
+msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."
+msgstr "%B: Kan ikke relaksere br ved 0x%lx i afsnittet \"%A\". Brug venligst brl eller indirekte gren."
+
+#: elf64-ia64-vms.c:2027 elf32-ia64.c:2278 elf64-ia64.c:2278
+msgid "@pltoff reloc against local symbol"
+msgstr "@pltoff-relokering mod lokalt symbol"
+
+#: elf64-ia64-vms.c:3279 elf32-ia64.c:3684 elf64-ia64.c:3684
+#, c-format
+msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
+msgstr "%s: kort datasegment lÃ¸b over (0x%lx >= 0x400000)"
+
+#: elf64-ia64-vms.c:3290 elf32-ia64.c:3695 elf64-ia64.c:3695
+#, c-format
+msgid "%s: __gp does not cover short data segment"
+msgstr "%s: __gp dÃ¦kker ikke kort datasegment"
+
+#: elf64-ia64-vms.c:3555 elf32-ia64.c:3962 elf64-ia64.c:3962
+msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
+msgstr "%B: ikke-pic-kode med imm-relokering mod dynamisk symbol \"%s\""
+
+#: elf64-ia64-vms.c:3617 elf32-ia64.c:4029 elf64-ia64.c:4029
+msgid "%B: @gprel relocation against dynamic symbol %s"
+msgstr "%B: @gprel-relokering mod dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3676 elf32-ia64.c:4092 elf64-ia64.c:4092
+msgid "%B: linking non-pic code in a position independent executable"
+msgstr "%B: linker ikke-pic-kode i en positionsuafhÃ¦ngig eksekverbar fil"
+
+#: elf64-ia64-vms.c:3777 elf32-ia64.c:4229 elf64-ia64.c:4229
+msgid "%B: @internal branch to dynamic symbol %s"
+msgstr "%B: @intern gren til dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3779 elf32-ia64.c:4231 elf64-ia64.c:4231
+msgid "%B: speculation fixup to dynamic symbol %s"
+msgstr "%B: spekulations-fixup til dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3781 elf32-ia64.c:4233 elf64-ia64.c:4233
+msgid "%B: @pcrel relocation against dynamic symbol %s"
+msgstr "%B: @pcrel-relokering mod dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3905 elf32-ia64.c:4430 elf64-ia64.c:4430
+msgid "unsupported reloc"
+msgstr "relokeringen understÃ¸ttes ikke"
+
+#: elf64-ia64-vms.c:3942 elf32-ia64.c:4468 elf64-ia64.c:4468
+msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."
+msgstr "%B: manglende TLS-afsnit til relokering %s mod \"%s\" ved 0x%lx i afsnittet \"%A\"."
+
+#: elf64-ia64-vms.c:3957 elf32-ia64.c:4483 elf64-ia64.c:4483
+msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."
+msgstr "%B: Kan ikke relaksere br (%s) til \"%s\" pÃ¥ 0x%lx i afsnittet \"%A\" med stÃ¸rrelsen 0x%lx (> 0x1000000)."
+
+#: elf64-ia64-vms.c:4246 elf32-ia64.c:4745 elf64-ia64.c:4745
+msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
+msgstr "%B: linker fang-ved-NULL-dereference med ikkefangende filer"
+
+#: elf64-ia64-vms.c:4255 elf32-ia64.c:4754 elf64-ia64.c:4754
+msgid "%B: linking big-endian files with little-endian files"
+msgstr "%B: linker big-endian-filer med little endian-filer"
+
+#: elf64-ia64-vms.c:4264 elf32-ia64.c:4763 elf64-ia64.c:4763
+msgid "%B: linking 64-bit files with 32-bit files"
+msgstr "%B: linker 64 bit-filer med 32 bit-filer"
+
+#: elf64-ia64-vms.c:4273 elf32-ia64.c:4772 elf64-ia64.c:4772
+msgid "%B: linking constant-gp files with non-constant-gp files"
+msgstr "%B: linker konstant-gp-filer med ikke-konstant-gp-filer"
+
+#: elf64-ia64-vms.c:4283 elf32-ia64.c:4782 elf64-ia64.c:4782
+msgid "%B: linking auto-pic files with non-auto-pic files"
+msgstr "%B: linker auto-pic-filer med ikke-auto-pic-filer"
+
+#: elf64-ia64-vms.c:5125 elflink.c:4299
+msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A"
+msgstr "Advarsel: justering %u af fÃ¦lles symbol \"%s\" i %B er stÃ¸rre end justeringen (%u) af dets afsnit %A"
 
-#: elf64-mmix.c:1177
+#: elf64-ia64-vms.c:5131 elflink.c:4305
+msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
+msgstr "Advarsel: justeringen %u pÃ¥ symbolet \"%s\" i %B er mindre end %u i %B"
+
+#: elf64-ia64-vms.c:5146 elflink.c:4321
+msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
+msgstr "Advarsel: stÃ¸rrelsen pÃ¥ symbol \"%s\" Ã¦ndredes fra %lu i %B til %lu i %B"
+
+# at assemble -> (bydeform fjerner endelsen -e) assembl
+#: elf64-mmix.c:986
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or assemble using \"-no-expand\" (for gcc, \"-Wa,-no-expand\""
+msgstr ""
+"ugyldig inputrelokering ved output af ikke-ELF, ikke-mmo-format.\n"
+" Brug venligst programmet objcopy til at konvertere fra ELF eller mmo,\n"
+" eller assembl ved hjÃ¦lp af \"-no-expand\" (for gcc \"-Wa,-no-expand\""
+
+#: elf64-mmix.c:1170
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or compile using the gcc-option \"-mno-base-addresses\"."
+msgstr ""
+"ugyldig inputrelokering ved output af ikke-ELF, ikke-mmo-format.\n"
+" Brug venligst programmet objcopy til at konvertere fra ELF eller mmo,\n"
+" eller kompilÃ©r med gcc-tilvalget \"-mno-base-addresses\"."
+
+#: elf64-mmix.c:1196
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
 " linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
 msgstr ""
 "%s: Intern inkonsistensfejl for vÃ¦rdien for\n"
-" lÃ¦nkerallokeret globalt register: lÃ¦nket: 0x%lx%08lx != forenklet: 0x%lx%08lx\n"
+" linkerallokeret globalt register: lÃ¦nket: 0x%lx%08lx != relakseret: 0x%lx%08lx\n"
 
-#: elf64-mmix.c:1607
+#: elf64-mmix.c:1618
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr "%s: base-plus-afstandsrelokering mod registersymbol: (ukendt) i %s"
 
-#: elf64-mmix.c:1612
+#: elf64-mmix.c:1623
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr "%s: base-plus-afstandsrelokering mod registersymbol: %s i %s"
 
-#: elf64-mmix.c:1656
+#: elf64-mmix.c:1667
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr "%s: registerrelokering mod ikke-registersymbol: (ukendt) i %s"
 
-#: elf64-mmix.c:1661
+#: elf64-mmix.c:1672
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: registerrelokering mod ikke-registersymbol: %s i %s"
 
-#: elf64-mmix.c:1698
+#: elf64-mmix.c:1709
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: LOCAL-direktivet er kun gyldigt med et register eller en absolutvÃ¦rdi"
 
-#: elf64-mmix.c:1726
+#: elf64-mmix.c:1739
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr "%s: LOCAL-direktiv: Register $%ld er ikke et lokalt register. FÃ¸rste globale register er $%ld."
 
-#: elf64-mmix.c:2190
+#: elf64-mmix.c:2198
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr "%s: Fejl: flere definitioner af \"%s\"; begyndelsen pÃ¥ %s er sat i en tidligere lÃ¦nket fil\n"
 
-#: elf64-mmix.c:2248
+#: elf64-mmix.c:2252
 msgid "Register section has contents\n"
-msgstr "Registersektion har indhold\n"
+msgstr "Registerafsnit har indhold\n"
 
-#: elf64-mmix.c:2440
+#: elf64-mmix.c:2441
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
@@ -2606,67 +3141,108 @@ msgstr ""
 "Intern inkonsekvens: genstÃ¥ende %u != max %u.\n"
 "  RapportÃ©r gerne denne fejl."
 
-#: elf64-ppc.c:2741 libbfd.c:997
-msgid "%B: compiled for a big endian system and target is little endian"
-msgstr "%B: kompileret til et big endian-system, men mÃ¥let er little endian"
-
-#: elf64-ppc.c:2744 libbfd.c:999
-msgid "%B: compiled for a little endian system and target is big endian"
-msgstr "%B: kompileret til et little endian-system, men mÃ¥let er big endian"
+#: elf64-ppc.c:4463
+msgid "%P: %B: cannot create stub entry %s\n"
+msgstr "%P: %B: kan ikke oprette stub-indgang %s\n"
+
+#: elf64-ppc.c:4810
+msgid "%P: symbol '%s' has invalid st_other for ABI version 1\n"
+msgstr "%P: symbolet \"%s\" har ugyldig st_other for ABI-version 1\n"
+
+#: elf64-ppc.c:5170
+msgid "%P: .opd not allowed in ABI version %d\n"
+msgstr "%P: .opd ikke tilladt i ABI-version %d\n"
+
+#: elf64-ppc.c:5809
+msgid "%B uses unknown e_flags 0x%lx"
+msgstr "%B bruger ukendte e_flags 0x%lx"
+
+#: elf64-ppc.c:5816
+msgid "%B: ABI version %ld is not compatible with ABI version %ld output"
+msgstr "%B: ABI-version %ld er ikke kompatibel med output-ABI-version %ld"
 
-# lazy (i computersammenhÃ¦ng) ~ fÃ¸rst at gÃ¸re noget, nÃ¥r det er nÃ¸dvendigt.  Hvis programmÃ¸ren skriver x = 2 + 2 men fÃ¸rst bruger variablen x senere, vil udregningen 2+2 altsÃ¥ fÃ¸rst ske senere.
-#: elf64-ppc.c:6473
+#: elf64-ppc.c:5843
 #, c-format
-msgid "copy reloc against `%s' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc"
-msgstr "kopiering af relokering mod \"%s\" krÃ¦ver forsinket plt-lÃ¦nkning; undgÃ¥ at sÃ¦tte LD_BIND_NOW=1 eller opgradÃ©r gcc"
+msgid " [abiv%ld]"
+msgstr " [abiv%ld]"
 
-#: elf64-ppc.c:6901
-msgid "dynreloc miscount for %B, section %A"
-msgstr "dynreloc-fejloptÃ¦lling for %B, sektion %A"
+# lazy (i computersammenhÃ¦ng) ~ fÃ¸rst at gÃ¸re noget, nÃ¥r det er nÃ¸dvendigt.  Hvis programmÃ¸ren skriver x = 2 + 2 men fÃ¸rst bruger variablen x senere, vil udregningen 2+2 altsÃ¥ fÃ¸rst ske senere.
+#: elf64-ppc.c:7007
+msgid "%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc\n"
+msgstr "%P: kopiering af relokering mod \"%T\" krÃ¦ver doven plt-lÃ¦nkning; undgÃ¥ at sÃ¦tte LD_BIND_NOW=1 eller opgradÃ©r gcc\n"
+
+#: elf64-ppc.c:7270
+msgid "%B: undefined symbol on R_PPC64_TOCSAVE relocation"
+msgstr "%B: udefineret symbol ved R_PPC64_TOCSAVE-relokering"
+
+#: elf64-ppc.c:7499
+msgid "%P: dynreloc miscount for %B, section %A\n"
+msgstr "%P: dynreloc-fejloptÃ¦lling for %B, afsnit %A\n"
 
-#: elf64-ppc.c:6985
+#: elf64-ppc.c:7583
 msgid "%B: .opd is not a regular array of opd entries"
 msgstr "%B: .opd er ikke et almindeligt array af opd-poster"
 
-#: elf64-ppc.c:6994
+#: elf64-ppc.c:7592
 msgid "%B: unexpected reloc type %u in .opd section"
-msgstr "%B: uventet relokeringstype %u i .opd-sektion"
+msgstr "%B: uventet relokeringstype %u i .opd-afsnit"
 
-#: elf64-ppc.c:7015
+#: elf64-ppc.c:7613
 msgid "%B: undefined sym `%s' in .opd section"
-msgstr "%B: udefineret symbol \"%s\" i .opd-sektion"
+msgstr "%B: udefineret symbol \"%s\" i .opd-afsnit"
+
+#: elf64-ppc.c:8177
+msgid "%H __tls_get_addr lost arg, TLS optimization disabled\n"
+msgstr "%H __tls_get_addr mistede arg, TLS-optimering slÃ¥et fra\n"
 
-#: elf64-ppc.c:7877 elf64-ppc.c:8392
+#: elf64-ppc.c:8516 elf64-ppc.c:9139
 #, c-format
 msgid "%s defined on removed toc entry"
 msgstr "%s defineret pÃ¥ fjernet toc-post"
 
-#: elf64-ppc.c:9459
-#, c-format
-msgid "long branch stub `%s' offset overflow"
-msgstr "afsÃ¦toverlÃ¸b for lang grenstub \"%s\""
-
-#: elf64-ppc.c:9518
-#, c-format
-msgid "can't find branch stub `%s'"
-msgstr "kan ikke finde grenstub \"%s\""
-
-#: elf64-ppc.c:9580 elf64-ppc.c:9716
-#, c-format
-msgid "linkage table error against `%s'"
-msgstr "lÃ¦nketabelsfejl mod \"%s\""
-
-#: elf64-ppc.c:9886
-#, c-format
-msgid "can't build branch stub `%s'"
-msgstr "kan ikke bygge grenstub \"%s\""
+#: elf64-ppc.c:8868
+msgid "%P: %H: toc optimization is not supported for %s instruction.\n"
+msgstr "%P: %H: toc-optimering understÃ¸ttes ikke for %s-instruktion.\n"
+
+# references mÃ¥ vÃ¦re verbum her
+#: elf64-ppc.c:9096
+msgid "%P: %H: %s references optimized away TOC entry\n"
+msgstr "%P: %H: %s refererer til toc-indgang som er optimeret vÃ¦k\n"
+
+#: elf64-ppc.c:10394
+msgid "%P: cannot find opd entry toc for `%T'\n"
+msgstr "%P: kan ikke finde opd-indgang i toc for \"%T\"\n"
+
+#: elf64-ppc.c:10479
+msgid "%P: long branch stub `%s' offset overflow\n"
+msgstr "%P: afsÃ¦toverlÃ¸b for lang grenstub \"%s\"\n"
+
+#: elf64-ppc.c:10538
+msgid "%P: can't find branch stub `%s'\n"
+msgstr "%P: kan ikke finde grenstub \"%s\"\n"
+
+#: elf64-ppc.c:10602 elf64-ppc.c:10749 elf64-ppc.c:12416
+msgid "%P: linkage table error against `%T'\n"
+msgstr "%P: linktabelfejl mod \"%T\"\n"
+
+#: elf64-ppc.c:10940
+msgid "%P: can't build branch stub `%s'\n"
+msgstr "%P: kan ikke bygge grenstub \"%s\"\n"
 
-#: elf64-ppc.c:10684
+#: elf64-ppc.c:11748
 msgid "%B section %A exceeds stub group size"
-msgstr "%B-sektionen %A overstiger stub-gruppestÃ¸rrelsen"
+msgstr "%B-afsnittet %A overstiger stub-gruppestÃ¸rrelsen"
+
+#: elf64-ppc.c:12662 elf64-ppc.c:12697
+msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
+msgstr "%P: %s-forskydning for stor til .eh_frame sdata4-kodning"
+
+#: elf64-ppc.c:12758
+msgid "%P: stubs don't match calculated size\n"
+msgstr "%P: stubbe stemmer ikke overens med beregnet stÃ¸rrelse\n"
 
 # ?
-#: elf64-ppc.c:11339
+#: elf64-ppc.c:12770
 #, c-format
 msgid ""
 "linker stubs in %u group%s\n"
@@ -2674,458 +3250,540 @@ msgid ""
 "  toc adjust   %lu\n"
 "  long branch  %lu\n"
 "  long toc adj %lu\n"
-"  plt call     %lu"
+"  plt call     %lu\n"
+"  plt call toc %lu"
 msgstr ""
-"lÃ¦nkerstubbe i %u gruppe%s\n"
+"linkerstubbe i %u gruppe%s\n"
 "  branch       %lu\n"
 "  toc adjust   %lu\n"
 "  long branch  %lu\n"
 "  long toc adj %lu\n"
-"  plt call     %lu"
-
-#: elf64-ppc.c:12190
-msgid "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
-msgstr "%B(%A+0x%lx): flere automatiske TOC'er understÃ¸ttes ikke med dine crt-filer; genkompilÃ©r med -mminimal-toc eller opgradÃ©r gcc"
-
-#: elf64-ppc.c:12198
-msgid "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
-msgstr "%B(%A+0x%lx): \"sibling call\"-optimering til \"%s\" tillader ikke flere indholdsfortegnelser; genkompilÃ©r med -mminimal-toc eller -fno-optimize-sibling-calls eller gÃ¸r \"%s\" ekstern"
-
-#: elf64-ppc.c:12919
-msgid "%B: relocation %s is not supported for symbol %s."
-msgstr "%B: relokeringen %s understÃ¸ttes ikke for symbol %s."
+"  plt call     %lu\n"
+"  plt call toc %lu"
 
 #: elf64-ppc.c:13096
-msgid "%B: error: relocation %s not a multiple of %d"
-msgstr "%B: fejl: relokeringen %s er ikke et multiplum af %d"
+msgid "%P: %H: %s used with TLS symbol `%T'\n"
+msgstr "%P: %H: %s bruges med TLS-symbol \"%T\"\n"
+
+#: elf64-ppc.c:13097
+msgid "%P: %H: %s used with non-TLS symbol `%T'\n"
+msgstr "%P: %H: %s bruges med ikke-TLS-symbol \"%T\"\n"
+
+#: elf64-ppc.c:13675
+msgid "%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC\n"
+msgstr "%P: %H: kald til \"%T\" mangler nop, kan ikke gendanne toc; genkompilÃ©r med -fPIC\n"
+
+#: elf64-ppc.c:13793
+msgid "%P: %B: unknown relocation type %d for `%T'\n"
+msgstr "%P: %B: ukendt relokeringstype %d for \"%T\"\n"
+
+#: elf64-ppc.c:14310
+msgid "%P: %H: %s for indirect function `%T' unsupported\n"
+msgstr "%P: %H: %s for indirekte funktion \"%T\" understÃ¸ttes ikke\n"
+
+#: elf64-ppc.c:14417
+msgid "%P: %B: %s is not supported for `%T'\n"
+msgstr "%P: %B: %s understÃ¸ttes ikke for \"%T\"\n"
+
+#: elf64-ppc.c:14565
+msgid "%P: %H: error: %s not a multiple of %u\n"
+msgstr "%P: %H: fejl: %s er ikke et multiplum af %u\n"
+
+#: elf64-ppc.c:14586
+msgid "%P: %H: unresolvable %s against `%T'\n"
+msgstr "%P: %H: ulÃ¸selig %s mod \"%T\"\n"
+
+#: elf64-ppc.c:14644
+msgid "%P: %H: %s against `%T': error %d\n"
+msgstr "%P: %H: %s mod \"%T\": fejl %d\n"
 
-#: elf64-sh64.c:1682
+#: elf64-sh64.c:1686
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr "%s: fejl: ujusteret relokeringstype %d pÃ¥ %08x relokering %08x\n"
 
-#: elf64-sparc.c:444
+#: elf64-sparc.c:446
 msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%B: Kun registrene %%g[2367] kan erklÃ¦res med STT_REGISTER"
 
-#: elf64-sparc.c:464
+#: elf64-sparc.c:466
 msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
 msgstr "Register %%g%d bruges inkompatibelt: %s i %B, tidligere %s i %B"
 
-#: elf64-sparc.c:487
+#: elf64-sparc.c:489
 msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
 msgstr "Symbolet \"%s\" har forskellige typer: REGISTER i %B, tidligere %s i %B"
 
-#: elf64-sparc.c:532
+#: elf64-sparc.c:534
 msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
 msgstr "Symbolet \"%s\" har forskellige typer: %s i %B, tidligere REGISTER i %B"
 
-#: elf64-sparc.c:684
+#: elf64-sparc.c:687
 msgid "%B: linking UltraSPARC specific with HAL specific code"
-msgstr "%B: lÃ¦nker UltraSPARC-specifik med HAL-specifik kode"
+msgstr "%B: linker UltraSPARC-specifik med HAL-specifik kode"
 
-#: elf64-x86-64.c:1360
+#: elf64-x86-64.c:1530
+msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+msgstr "%B: relokeringen %s mod symbolet \"%s\" understÃ¸ttes ikke i x32-tilstand"
+
+#: elf64-x86-64.c:1688
 msgid "%B: '%s' accessed both as normal and thread local symbol"
 msgstr "%B: \"%s\" tilgÃ¥s bÃ¥de som normalt og trÃ¥dlokalt symbol"
 
-#: elf64-x86-64.c:2801
+#: elf64-x86-64.c:3405 /src/binutils-gdb/bfd/elfnn-aarch64.c:3511
 msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
 msgstr "%B: relokering %s mod STT_GNU_IFUNC-symbol \"%s\" har addend forskellig fra nul: %d"
 
-#: elf64-x86-64.c:3073
+#: elf64-x86-64.c:3667
 msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object"
 msgstr "%B: relokeringen R_X86_64_GOTOFF64 mod beskyttet funktion \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes"
 
-#: elf64-x86-64.c:3184
+#: elf64-x86-64.c:3787
 msgid "; recompile with -fPIC"
 msgstr "; genkompilÃ©r med -fPIC"
 
-#: elf64-x86-64.c:3189
+#: elf64-x86-64.c:3792
 msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s"
 msgstr "%B: relokeringen %s mod %s \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes%s"
 
-#: elf64-x86-64.c:3191
+#: elf64-x86-64.c:3794
 msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s"
 msgstr "%B: relokeringen %s mod udefineret %s \"%s\" kan ikke bruges nÃ¥r et delt objekt oprettes%s"
 
-#: elfcode.h:826
+#: elf64-x86-64.c:3900
+msgid "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: addend -0x%x i relokering %s mod symbol \"%s\" ved 0x%lx i afsnit \"%A\" uden for gyldigt interval"
+
+#: elf64-x86-64.c:3908
+msgid "%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: addend 0x%x i relokering %s mod symbol \"%s\" ved 0x%lx i afsnit \"%A\" uden for gyldigt interval"
+
+#: elfcode.h:760
 #, c-format
 msgid "warning: %s has a corrupt string table index - ignoring"
 msgstr "advarsel: %s har et beskadiget strengtabelindeks - ignorerer"
 
-#: elfcode.h:1236
+#: elfcode.h:1186
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: versionsantal (%ld) stemmer ikke med symbolantal (%ld)"
 
-#: elfcode.h:1476
+#: elfcode.h:1440
 #, c-format
 msgid "%s(%s): relocation %d has invalid symbol index %ld"
 msgstr "%s(%s): relokering %d har ugyligt symbolindeks %ld"
 
-#: elfcore.h:312
+#: elfcore.h:305
 msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu."
 msgstr "Advarsel: %B er afkortet: forventede kernefilstÃ¸rrelse >= %lu, fandt: %lu."
 
-#: elflink.c:1119
+#: elflink.c:1143
 msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"
-msgstr "%s: TLS-definition i %B sektion %A stemmer ikke med ikke-TLS-definition i %B sektion %A"
+msgstr "%s: TLS-definition i %B afsnit %A stemmer ikke med ikke-TLS-definition i %B afsnit %A"
 
-#: elflink.c:1123
+#: elflink.c:1148
 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
 msgstr "%s: TLS-reference i %B stemmer ikke med ikke-TLS-reference i %B"
 
-#: elflink.c:1127
+#: elflink.c:1153
 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
-msgstr "%s: TLS-definition i %B sektion %A stemmer ikke med ikke-TLS-reference i %B"
+msgstr "%s: TLS-definition i %B afsnit %A stemmer ikke med ikke-TLS-reference i %B"
 
-#: elflink.c:1131
+#: elflink.c:1158
 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
-msgstr "%s: TLS-reference i %B stemmer ikke med ikke-TLS-definition i %B sektion %A"
+msgstr "%s: TLS-reference i %B stemmer ikke med ikke-TLS-definition i %B afsnit %A"
 
 #: elflink.c:1763
 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
 msgstr "%B: uventet omdefinition af indirekte versionstildelt symbol \"%s\""
 
-#: elflink.c:2076
+#: elflink.c:2066
 msgid "%B: version node not found for symbol %s"
 msgstr "%B: versionsknude ikke fundet for symbolet %s"
 
-#: elflink.c:2166
+#: elflink.c:2157
 msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
-msgstr "%B: fejlagtig relokeringssymbolindeks (0x%lx >= 0x%lx) for afsÃ¦t 0x%lx i sektionen \"%A\""
+msgstr "%B: fejlagtig relokeringssymbolindeks (0x%lx >= 0x%lx) for afsÃ¦t 0x%lx i afsnittet \"%A\""
 
-#: elflink.c:2177
+#: elflink.c:2168
 msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table"
-msgstr "%B: symboltabellen (0x%lx) forskelligt fra nul for afsÃ¦t 0x%lx i sektion \"%s\" mens objektfilen ikke har nogen symboltabelc"
+msgstr "%B: symboltabellen (0x%lx) forskelligt fra nul for afsÃ¦t 0x%lx i afsnit \"%A\" mens objektfilen ikke har nogen symboltabelc"
 
-#: elflink.c:2367
+#: elflink.c:2358
 msgid "%B: relocation size mismatch in %B section %A"
-msgstr "%B: relokeringsstÃ¸rrelsen stemmer ikke overens i %B-sektionen %A"
+msgstr "%B: relokeringsstÃ¸rrelsen stemmer ikke overens i %B-afsnittet %A"
 
-#: elflink.c:2662
+#: elflink.c:2640
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
 msgstr "advarsel: typen og stÃ¸rrelsen pÃ¥ dynamisk symbol \"%s\" er ikke defineret"
 
-#: elflink.c:3418
+#: elflink.c:3403
 msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n"
 msgstr "%P: alternativ ELF-maskinkode fundet (%d) i %B; forventer %d\n"
 
-#: elflink.c:4050
+#: elflink.c:4032
 msgid "%B: %s: invalid version %u (max %d)"
 msgstr "%B: %s: ugyldig version %u (max %d)"
 
-#: elflink.c:4086
+#: elflink.c:4068
 msgid "%B: %s: invalid needed version %d"
 msgstr "%B: %s: ugyldig krÃ¦vet version %d"
 
-#: elflink.c:4285
-msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A"
-msgstr "Advarsel: justering %u af fÃ¦lles symbol \"%s\" i %B er stÃ¸rre end justeringen (%u) af dets sektion %A"
-
-#: elflink.c:4291
-msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
-msgstr "Advarsel: justeringen %u pÃ¥ symbolet \"%s\" i %B er mindre end %u i %B"
-
-#: elflink.c:4306
-msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
-msgstr "Advarsel: stÃ¸rrelsen pÃ¥ symbol \"%s\" Ã¦ndredes fra %lu i %B til %lu i %B"
-
-#: elflink.c:4472
+#: elflink.c:4452
 msgid "%B: undefined reference to symbol '%s'"
 msgstr "%B: udefineret reference til symbol \"%s\""
 
-#: elflink.c:4475
-msgid "note: '%s' is defined in DSO %B so try adding it to the linker command line"
-msgstr "bemÃ¦rk: \"%s\" er defineret i DSO %B, sÃ¥ prÃ¸v at tilfÃ¸je den til lÃ¦nker-kommandolinjen"
+#: elflink.c:5523
+msgid "%B: stack size specified and %s set"
+msgstr "%B: stakstÃ¸rrelse angivet og %s indstillet"
+
+#: elflink.c:5526
+msgid "%B: %s not absolute"
+msgstr "%B: %s: er ikke absolut"
 
-#: elflink.c:5779
+#: elflink.c:5824
 #, c-format
 msgid "%s: undefined version: %s"
 msgstr "%s: udefineret version: %s"
 
-#: elflink.c:5847
+#: elflink.c:5892
 msgid "%B: .preinit_array section is not allowed in DSO"
-msgstr "%B: .preinit_array-sektionen er ikke tilladt i DSO"
+msgstr "%B: .preinit_array-afsnittet er ikke tilladt i DSO"
 
-#: elflink.c:7598
+#: elflink.c:7657
 #, c-format
 msgid "undefined %s reference in complex symbol: %s"
 msgstr "udefineret %s-reference i komplekst symbol: %s"
 
-#: elflink.c:7752
+#: elflink.c:7811
 #, c-format
 msgid "unknown operator '%c' in complex symbol"
 msgstr "ukendt operator \"%c\" i komplekst symbol"
 
-#: elflink.c:8091 elflink.c:8108 elflink.c:8145 elflink.c:8162
+#: elflink.c:8165 elflink.c:8182 elflink.c:8219 elflink.c:8236
 msgid "%B: Unable to sort relocs - they are in more than one size"
 msgstr "%B: Kan ikke sortere relokeringer - de har flere forskellige stÃ¸rrelser"
 
-#: elflink.c:8122 elflink.c:8176
+#: elflink.c:8196 elflink.c:8250
 msgid "%B: Unable to sort relocs - they are of an unknown size"
 msgstr "%B: Kan ikke sortere relokeringer - de har ukendt stÃ¸rrelse"
 
-#: elflink.c:8227
+#: elflink.c:8301
 msgid "Not enough memory to sort relocations"
 msgstr "Ikke nok hukommelse til at sortere relokeringer"
 
-#: elflink.c:8420
+#: elflink.c:8494
 msgid "%B: Too many sections: %d (>= %d)"
-msgstr "%B: For mange sektioner: %d (>= %d)"
+msgstr "%B: For mange afsnit: %d (>= %d)"
+
+#: elflink.c:8775
+msgid "%B: internal symbol `%s' in %B is referenced by DSO"
+msgstr "%B: internt symbol \"%s\" i %B refereres af DSO"
 
-#: elflink.c:8663
-msgid "%B: %s symbol `%s' in %B is referenced by DSO"
-msgstr "%B: %s-symbol \"%s\" i %B refereres af DSO"
+#: elflink.c:8777
+msgid "%B: hidden symbol `%s' in %B is referenced by DSO"
+msgstr "%B: skjult symbol \"%s\" i %B refereres af DSO"
 
-#: elflink.c:8754
+#: elflink.c:8779
+msgid "%B: local symbol `%s' in %B is referenced by DSO"
+msgstr "%B: lokalt symbol \"%s\" i %B refereres af DSO"
+
+#: elflink.c:8890
 msgid "%B: could not find output section %A for input section %A"
-msgstr "%B: kunne ikke finde uddatasektionen %A for inddatasektionen %A"
+msgstr "%B: kunne ikke finde uddataafsnittet %A for inddataafsnittet %A"
 
-#: elflink.c:8874
-msgid "%B: %s symbol `%s' isn't defined"
-msgstr "%B: %s-symbolet \"%s\" er udefineret"
+#: elflink.c:9013
+msgid "%B: protected symbol `%s' isn't defined"
+msgstr "%B: beskyttet symbol \"%s\" er udefineret"
 
-#: elflink.c:9428
-msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol"
-msgstr "fejl: %B indeholder en relokering (0x%s) til sektionen %A, som refererer et ikke-eksisterende global symbol"
+#: elflink.c:9015
+msgid "%B: internal symbol `%s' isn't defined"
+msgstr "%B: internt symbol \"%s\" er udefineret"
 
-#: elflink.c:9494
-msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n"
-msgstr "%X\"%s\" refereret i sektion \"%A\" af %B: defineret i forkastet sektion \"%A\" af %B\n"
+#: elflink.c:9017
+msgid "%B: hidden symbol `%s' isn't defined"
+msgstr "%B: skjult symbol \"%s\" er ikke defineret"
+
+#: elflink.c:9043
+msgid "%B: No symbol version section for versioned symbol `%s'"
+msgstr "%B: Intet afsnit med symbolversion for versioneret symbol \"%s\""
+
+#: elflink.c:9598
+msgid "error: %B: size of section %A is not multiple of address size"
+msgstr "fejl: %B: stÃ¸rrelsen af afsnit %A er ikke et multiplum af adressestÃ¸rrelse"
+
+#: elflink.c:9645
+msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol"
+msgstr "fejl: %B indeholder en relokering (0x%s) til afsnittet %A, som refererer et ikke-eksisterende global symbol"
 
-#: elflink.c:10141
+#: elflink.c:10369
 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
-msgstr "%A har bÃ¥de ordnede [\"%A\" i %B] og uordnede [\"%A\" i %B] sektioner"
+msgstr "%A har bÃ¥de ordnede [\"%A\" i %B] og uordnede [\"%A\" i %B] afsnit"
 
-#: elflink.c:10146
+#: elflink.c:10374
 #, c-format
 msgid "%A has both ordered and unordered sections"
-msgstr "%A har bÃ¥de ordnede og uordnede sektioner"
+msgstr "%A har bÃ¥de ordnede og uordnede afsnit"
 
-#: elflink.c:10992 elflink.c:11036
+#: elflink.c:10982
+msgid "%B: file class %s incompatible with %s"
+msgstr "%B: filklasse %s er ikke kompatibel med %s"
+
+#: elflink.c:11303 elflink.c:11347
 msgid "%B: could not find output section %s"
-msgstr "%B: kunne ikke finde uddatasektionen %s"
+msgstr "%B: kunne ikke finde uddataafsnittet %s"
 
-#: elflink.c:10997
+#: elflink.c:11308
 #, c-format
 msgid "warning: %s section has zero size"
-msgstr "advarsel: %s-sektionen har nulstÃ¸rrelse"
+msgstr "advarsel: %s-afsnittet har nulstÃ¸rrelse"
+
+#: elflink.c:11353
+#, c-format
+msgid "warning: section '%s' is being made into a note"
+msgstr "advarsel: afsnittet \"%s\" Ã¦ndres til en note"
 
-#: elflink.c:11102
+#: elflink.c:11419
+msgid "%P%X: read-only segment has dynamic relocations.\n"
+msgstr "%P%X: skrivebeskyttet segment har dynamiske relokeringer.\n"
+
+#: elflink.c:11422
 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
 msgstr "%P: advarsel: opretter en DT_TEXTREL i et delt objekt.\n"
 
-#: elflink.c:11289
+#: elflink.c:11545
 msgid "%P%X: can not read symbols: %E\n"
 msgstr "%P%X: kan ikke lÃ¦se symboler: %E\n"
 
-#: elflink.c:11638
+#: elflink.c:11989
 msgid "Removing unused section '%s' in file '%B'"
-msgstr "Fjerner ubrugt sektion \"%s\" i filen \"%B\""
+msgstr "Fjerner ubrugt afsnit \"%s\" i filen \"%B\""
 
 # gc-sections- eller gc-sektions-?
-#: elflink.c:11850
+#: elflink.c:12200
 msgid "Warning: gc-sections option ignored"
 msgstr "Advarsel: gc-sections-tilvalg ignoreret"
 
-#: elflink.c:12399
-msgid "%B: ignoring duplicate section `%A'"
-msgstr "%B: ignorerer gentaget sektion \"%A\""
-
-#: elflink.c:12406 elflink.c:12413
-msgid "%B: duplicate section `%A' has different size"
-msgstr "%B: gentaget sektion \"%A\" har forskellig stÃ¸rrelse"
-
-#: elflink.c:12421 elflink.c:12426
-msgid "%B: warning: could not read contents of section `%A'"
-msgstr "%B: advarsel: kunne ikke lÃ¦se indholdet af sektionen \"%A\""
-
-#: elflink.c:12430
-msgid "%B: warning: duplicate section `%A' has different contents"
-msgstr "%B: advarsel: gentaget sektion \"%A\" har forskelligt indhold"
-
-#: elflink.c:12531 linker.c:3138
-msgid "%F%P: already_linked_table: %E\n"
-msgstr "%F%P: already_linked_table: %E\n"
+#: elflink.c:12489
+#, c-format
+msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgstr "Ukendt INPUT_SECTION_FLAG %s\n"
 
-#: elfxx-mips.c:1220
+#: elfxx-mips.c:1419
 msgid "static procedure (no name)"
 msgstr "statisk procedure (intet navn)"
 
-#: elfxx-mips.c:5623
-msgid "%B: %A+0x%lx: Direct jumps between ISA modes are not allowed; consider recompiling with interlinking enabled."
-msgstr "%B: %A+0x%lx: Direkte hop mellem ISA-tilstande er ikke tilladt; overvej at genkompilere med interlinking slÃ¥et til."
+#: elfxx-mips.c:5476
+msgid "MIPS16 and microMIPS functions cannot call each other"
+msgstr "MIPS16 og microMIPS-funktioner kan ikke kalde hinanden"
+
+#: elfxx-mips.c:6087
+msgid "%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled."
+msgstr "%B: %A+0x%lx: Type af hop mellem ISA-tilstande understÃ¸ttes ikke; overvej at genkompilere med interlinking slÃ¥et til."
 
-#: elfxx-mips.c:6280 elfxx-mips.c:6503
+#: elfxx-mips.c:6756 elfxx-mips.c:6979
 msgid "%B: Warning: bad `%s' option size %u smaller than its header"
 msgstr "%B: Advarsel: Ugyldig \"%s\"-tilvalgsstÃ¸rrelse %u mindre end dens header"
 
-#: elfxx-mips.c:7254 elfxx-mips.c:7379
+#: elfxx-mips.c:7734 elfxx-mips.c:7859
 msgid "%B: Warning: cannot determine the target function for stub section `%s'"
-msgstr "%B: Advarsel: Kan ikke bestemme mÃ¥lfunktionen for stubsektionen \"%s\""
+msgstr "%B: Advarsel: Kan ikke bestemme mÃ¥lfunktionen for stubafsnittet \"%s\""
 
-#: elfxx-mips.c:7508
+#: elfxx-mips.c:7990
 msgid "%B: Malformed reloc detected for section %s"
-msgstr "%B: Fejlagtig relokering for sektion %s opdaget"
+msgstr "%B: Fejlagtig relokering for afsnit %s opdaget"
 
-#: elfxx-mips.c:7548
+#: elfxx-mips.c:8065
 msgid "%B: GOT reloc at 0x%lx not expected in executables"
 msgstr "%B: GOT-relokering ved 0x%lx forventes ikke i eksekveringsfiler"
 
-#: elfxx-mips.c:7670
+#: elfxx-mips.c:8199
 msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
 msgstr "%B: CALL16-relokering ved 0x%lx er ikke mod globalt symbol"
 
-#: elfxx-mips.c:8365
+#: elfxx-mips.c:8977
 #, c-format
 msgid "non-dynamic relocations refer to dynamic symbol %s"
 msgstr "udynamiske relokeringer refererer til dynamisk symbol %s"
 
-#: elfxx-mips.c:9068
+#: elfxx-mips.c:9877
 msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"
-msgstr "%B: Kan ikke finde matchende LO16-relokering mod \"%s\" for %s ved 0x%lx i sektion \"%A\""
+msgstr "%B: Kan ikke finde matchende LO16-relokering mod \"%s\" for %s ved 0x%lx i afsnit \"%A\""
 
-#: elfxx-mips.c:9207
+#: elfxx-mips.c:10016
 msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)"
-msgstr "sektionen small-data overstiger 6KB; gÃ¸r stÃ¸rrelsesgrÃ¦nsen for small-data mindre (se tilvalget -G)"
+msgstr "afsnittet small-data overstiger 6KB; gÃ¸r stÃ¸rrelsesgrÃ¦nsen for small-data mindre (se tilvalget -G)"
 
-#: elfxx-mips.c:12027
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: ugyldigt sektionsnavn \"%s\""
+#: elfxx-mips.c:10035
+msgid "JALX to a non-word-aligned address"
+msgstr "JALX til en adresse som ikke er justeret til et word"
 
-#: elfxx-mips.c:12405 elfxx-mips.c:12431
-msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float"
-msgstr "Advarsel: %B bruger -msingle-float, %B bruger -mdouble-float"
+#: elfxx-mips.c:10402 elfxx-mips.c:10966
+msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
+msgstr "%B: \"%A\"-forskydning pÃ¥ %ld fra \"%A\" uden for gyldigt interval af ADDIUPC"
 
-#: elfxx-mips.c:12417 elfxx-mips.c:12473
-msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64"
-msgstr "Advarsel: %B bruger -msingle-float, %B bruger -mips32r2 -mfp64"
+#: elfxx-mips.c:13990
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: ugyldigt afsnitsnavn \"%s\""
 
-#: elfxx-mips.c:12443 elfxx-mips.c:12479
-msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64"
-msgstr "Advarsel: %B bruger -mdouble-float, %B bruger -mips32r2 -mfp64"
+#: elfxx-mips.c:14375 elfxx-mips.c:14381 elfxx-mips.c:14387 elfxx-mips.c:14407
+#: elfxx-mips.c:14413 elfxx-mips.c:14419 elfxx-mips.c:14441 elfxx-mips.c:14460
+#: elfxx-mips.c:14467 elfxx-mips.c:14474
+msgid "Warning: %B uses %s (set by %B), %B uses %s"
+msgstr "Advarsel: %B bruger %s (givet af %B), mens %B bruger %s"
+
+#: elfxx-mips.c:14394 elfxx-mips.c:14426 elfxx-mips.c:14447 elfxx-mips.c:14480
+msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Advarsel: %B bruger %s (givet af %B), mens %B bruger ukendt ABI %d til flydende tal"
+
+#: elfxx-mips.c:14493 elfxx-mips.c:14501 elfxx-mips.c:14509 elfxx-mips.c:14517
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
+msgstr "Advarsel: %B bruger ukendt ABI %d til flydende tal (givet af %B), mens %B bruger %s"
+
+#: elfxx-mips.c:14525
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Advarsel: %B bruger ukendt ABI %d til flydende tal (givet af %B), mens %B bruger ukendt ABI %d til flydende tal"
+
+#: elfxx-mips.c:14548
+msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Advarsel: %B bruger %s (givet af %B), mens %B bruger ukendt MSA-ABI %d"
+
+#: elfxx-mips.c:14559
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
+msgstr "Advarsel: %B bruger ukendt MSA-ABI %d (givet af %B), mens %B bruger %s"
+
+#: elfxx-mips.c:14567
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Advarsel: %B bruger ukendt MSA-ABI %d (givet af %B), mens %B bruger ukendt MSA-ABI %d"
 
-#: elfxx-mips.c:12521
+#: elfxx-mips.c:14599
 msgid "%B: endianness incompatible with that of the selected emulation"
 msgstr "%B: endian-hed er ikke kompatibel den valgte emulerings endian-hed"
 
-#: elfxx-mips.c:12532
+#: elfxx-mips.c:14610
 msgid "%B: ABI is incompatible with that of the selected emulation"
 msgstr "%B: ABI er ikke kompatibel med den valgte emulerings ABI"
 
-#: elfxx-mips.c:12613
+#: elfxx-mips.c:14694
 msgid "%B: warning: linking abicalls files with non-abicalls files"
-msgstr "%B: advarsel: lÃ¦nker abicalls-filer med ikke-abicalls-filer"
+msgstr "%B: advarsel: linker abicalls-filer med ikke-abicalls-filer"
 
-#: elfxx-mips.c:12630
+#: elfxx-mips.c:14711
 msgid "%B: linking 32-bit code with 64-bit code"
-msgstr "%B: lÃ¦nker 32 bit-kode med 64 bit-kode"
+msgstr "%B: linker 32 bit-kode med 64 bit-kode"
 
-#: elfxx-mips.c:12658
+#: elfxx-mips.c:14739 elfxx-mips.c:14802
 msgid "%B: linking %s module with previous %s modules"
-msgstr "%B: lÃ¦nker %s-modul med tidligere %s-moduler"
+msgstr "%B: linker %s-modul med tidligere %s-moduler"
 
-#: elfxx-mips.c:12681
+#: elfxx-mips.c:14762
 msgid "%B: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%B: ABI passer ikke: lÃ¦nker %s-modul med tidligere %s-moduler"
+msgstr "%B: ABI passer ikke: linker %s-modul med tidligere %s-moduler"
+
+#: elfxx-mips.c:14786
+msgid "%B: ASE mismatch: linking %s module with previous %s modules"
+msgstr "%B: ASE-uoverensstemmelse: linker %s-modul med tidligere %s-moduler"
 
-#: elfxx-mips.c:12845
+#: elfxx-mips.c:14958
 #, c-format
 msgid " [abi=O32]"
 msgstr " [abi=O32]"
 
-#: elfxx-mips.c:12847
+#: elfxx-mips.c:14960
 #, c-format
 msgid " [abi=O64]"
 msgstr " [abi=O64]"
 
-#: elfxx-mips.c:12849
+#: elfxx-mips.c:14962
 #, c-format
 msgid " [abi=EABI32]"
 msgstr " [abi=EABI32]"
 
-#: elfxx-mips.c:12851
+#: elfxx-mips.c:14964
 #, c-format
 msgid " [abi=EABI64]"
 msgstr " [abi=EABI64]"
 
-#: elfxx-mips.c:12853
+#: elfxx-mips.c:14966
 #, c-format
 msgid " [abi unknown]"
 msgstr " [ukendt abi]"
 
-#: elfxx-mips.c:12855
+#: elfxx-mips.c:14968
 #, c-format
 msgid " [abi=N32]"
 msgstr " [abi=N32]"
 
-#: elfxx-mips.c:12857
+#: elfxx-mips.c:14970
 #, c-format
 msgid " [abi=64]"
 msgstr " [abi=64]"
 
-#: elfxx-mips.c:12859
+#: elfxx-mips.c:14972
 #, c-format
 msgid " [no abi set]"
 msgstr " [intet abi sat]"
 
-#: elfxx-mips.c:12880
+#: elfxx-mips.c:14993
 #, c-format
 msgid " [unknown ISA]"
 msgstr " [ukendt ISA]"
 
-#: elfxx-mips.c:12891
+#: elfxx-mips.c:15013
 #, c-format
 msgid " [not 32bitmode]"
 msgstr " [ikke 32-bittilstand]"
 
-#: elfxx-sparc.c:595
+#: elfxx-sparc.c:640
 #, c-format
 msgid "invalid relocation type %d"
 msgstr "ugyldig relokeringstype %d"
 
-#: i386linux.c:454 m68klinux.c:458 sparclinux.c:452
+#: elfxx-tilegx.c:4433
+msgid "%B: Cannot link together %s and %s objects."
+msgstr "%B: Kan ikke linke %s- og %s-objekter sammen."
+
+#: i386linux.c:418 m68klinux.c:421 sparclinux.c:414
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "Uddatafilen krÃ¦ver delt bibliotek \"%s\"\n"
 
-#: i386linux.c:462 m68klinux.c:466 sparclinux.c:460
+#: i386linux.c:426 m68klinux.c:429 sparclinux.c:422
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Uddatafilen krÃ¦ver delt bibliotek \"%s.so.%s\"\n"
 
-#: i386linux.c:651 i386linux.c:701 m68klinux.c:658 m68klinux.c:706
-#: sparclinux.c:650 sparclinux.c:700
+#: i386linux.c:613 i386linux.c:663 m68klinux.c:618 m68klinux.c:666
+#: sparclinux.c:609 sparclinux.c:659
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "Symbol %s er ikke defineret for rettelser\n"
 
-#: i386linux.c:725 m68klinux.c:730 sparclinux.c:724
+#: i386linux.c:687 m68klinux.c:690 sparclinux.c:683
 msgid "Warning: fixup count mismatch\n"
 msgstr "Advarsel: antal rettelser stemmer ikke\n"
 
-#: ieee.c:159
+#: ieee.c:158
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr "%s: strengen er for lang (%d tegn, max 65535)"
 
-#: ieee.c:286
+#: ieee.c:285
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: ukendt symbol \"%s\" flag 0x%x"
 
-#: ieee.c:792
+#: ieee.c:791
 msgid "%B: unimplemented ATI record %u for symbol %u"
 msgstr "%B: ikke-implementeret ATI-post %u for symbol %u"
 
-#: ieee.c:816
+#: ieee.c:815
 msgid "%B: unexpected ATN type %d in external part"
 msgstr "%B: uventet ATN-type %d i ekstern del"
 
-#: ieee.c:838
+#: ieee.c:837
 msgid "%B: unexpected type after ATN"
 msgstr "%B: uventet type efter ATN"
 
@@ -3163,7 +3821,7 @@ msgstr "%B: intern fejl i ihex_read_sect
 
 #: ihex.c:613
 msgid "%B: bad section length in ihex_read_section"
-msgstr "%B: fejlagtig sektionslÃ¦ngde i ihex_read_sektion"
+msgstr "%B: fejlagtig afsnitslÃ¦ngde i ihex_read_section"
 
 #: ihex.c:826
 #, c-format
@@ -3172,233 +3830,246 @@ msgstr "%s: adressen 0x%s er uden for in
 
 #: libbfd.c:863
 msgid "%B: unable to get decompressed section %A"
-msgstr "%B: kan ikke hente dekomprimeret sektion %A"
+msgstr "%B: kan ikke hente dekomprimeret afsnit %A"
+
+#: libbfd.c:1012
+msgid "%B: compiled for a big endian system and target is little endian"
+msgstr "%B: kompileret til et big endian-system, men mÃ¥let er little endian"
+
+#: libbfd.c:1014
+msgid "%B: compiled for a little endian system and target is big endian"
+msgstr "%B: kompileret til et little endian-system, men mÃ¥let er big endian"
 
-#: libbfd.c:1027
+#: libbfd.c:1043
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr "ForÃ¦ldet %s kaldt ved %s linje %d i %s\n"
 
-#: libbfd.c:1030
+#: libbfd.c:1046
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr "ForÃ¦ldet %s kaldt\n"
 
-#: linker.c:1911
+#: linker.c:1873
 msgid "%B: indirect symbol `%s' to `%s' is a loop"
 msgstr "%B: indirekte symbol \"%s\" til \"%s\" er en lÃ¸kke"
 
-#: linker.c:2778
+#: linker.c:2750
 #, c-format
 msgid "Attempt to do relocatable link with %s input and %s output"
-msgstr "ForsÃ¸g at lave en relokÃ©rbar lÃ¦nke med %s-inddata og %s-uddata"
+msgstr "ForsÃ¸g at lave en relokÃ©rbart link med %s-inddata og %s-uddata"
 
-#: linker.c:3105
-msgid "%B: warning: ignoring duplicate section `%A'\n"
-msgstr "%B: advarsel: ignorerer gentaget sektion \"%A\"\n"
+#: linker.c:3035
+msgid "%B: ignoring duplicate section `%A'\n"
+msgstr "%B: ignorerer gentaget afsnit \"%A\"\n"
 
-#: linker.c:3119
-msgid "%B: warning: duplicate section `%A' has different size\n"
-msgstr "%B: advarsel: gentaget sektion \"%A\" har forskellig lÃ¦ngde\n"
+#: linker.c:3044 linker.c:3053
+msgid "%B: duplicate section `%A' has different size\n"
+msgstr "%B: gentaget afsnit \"%A\" har forskellig stÃ¸rrelse\n"
 
-#: mach-o.c:3403
-msgid "Mach-O header:\n"
-msgstr "Mach-O-header:\n"
+#: linker.c:3061 linker.c:3066
+msgid "%B: could not read contents of section `%A'\n"
+msgstr "%B: kunne ikke lÃ¦se indholdet af afsnittet \"%A\"\n"
 
-# eller skal det vÃ¦re magisk tal?
-#: mach-o.c:3404
-#, c-format
-msgid " magic     : %08lx\n"
-msgstr " magi      : %08lx\n"
+#: linker.c:3070
+msgid "%B: duplicate section `%A' has different contents\n"
+msgstr "%B: gentaget afsnit \"%A\" har forskelligt indhold\n"
+
+#: mach-o.c:648
+msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols"
+msgstr "bfd_mach_o_canonicalize_symtab: kan ikke indlÃ¦se symboler"
 
-#: mach-o.c:3405
+#: mach-o.c:1918
 #, c-format
-msgid " cputype   : %08lx (%s)\n"
-msgstr " cputype   : %08lx (%s)\n"
+msgid "mach-o: there are too many sections (%d) maximum is 255,\n"
+msgstr "mach-o: der er for mange afsnit (%d); maksimum er 255,\n"
 
-#: mach-o.c:3407
+#: mach-o.c:2017
 #, c-format
-msgid " cpusubtype: %08lx\n"
-msgstr " cpusubtype: %08lx\n"
+msgid "unable to write unknown load command 0x%lx"
+msgstr "kan ikke skrive ukendt indlÃ¦sningskommando 0x%lx"
+
+#: mach-o.c:2272
+msgid "sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands."
+msgstr "beklager: modtab, toc og extrefsyms er ikke implementeret for dysymtab-kommandoer."
 
-#: mach-o.c:3408
+#: mach-o.c:2898
 #, c-format
-msgid " filetype  : %08lx (%s)\n"
-msgstr " filtype   : %08lx (%s)\n"
+msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"
+msgstr "bfd_mach_o_read_symtab_symbol: kan ikke lÃ¦se %d byte ved %lu"
 
-# ?
-#: mach-o.c:3411
+#: mach-o.c:2916
 #, c-format
-msgid " ncmds     : %08lx (%lu)\n"
-msgstr " nkmd'er   : %08lx (%lu)\n"
+msgid "bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"
+msgstr "bfd_mach_o_read_symtab_symbol: navn uden for gyldigt interval (%lu >= %lu)"
 
-# kan ikke sÃ¥ godt gÃ¸re de her konsistente
-#: mach-o.c:3412
+#: mach-o.c:2997
 #, c-format
-msgid " sizeofcmds: %08lx\n"
-msgstr " sizeofcmds: %08lx\n"
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: symbolet \"%s\" angav ugyldigt afsnit %d (maks %lu): sÃ¦tter til udefineret"
 
-#: mach-o.c:3413
+#: mach-o.c:3013
 #, c-format
-msgid " flags     : %08lx ("
-msgstr " flag      : %08lx ("
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x%x: setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: symbolet \"%s\" angav ugyldigt typefelt 0x%x: sÃ¦tter til udefineret"
 
-#: mach-o.c:3415 vms-alpha.c:7652
-msgid ")\n"
-msgstr ")\n"
+#: mach-o.c:3085
+msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"
+msgstr "bfd_mach_o_read_symtab_symbols: kan ikke tildele hukommelse til symboler"
+
+#: mach-o.c:3915
+msgid "%B: unknown load command 0x%lx"
+msgstr "%B: ukendt indlÃ¦sningskommando 0x%lx"
 
-#: mach-o.c:3416
+#: mach-o.c:4107
 #, c-format
-msgid " reserved  : %08x\n"
-msgstr " reserveret: %08x\n"
+msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"
+msgstr "bfd_mach_o_scan: ukendt arkitektur 0x%lx/0x%lx"
 
-#: mach-o.c:3426
-msgid "Segments and Sections:\n"
-msgstr "Segmenter og sektioner:\n"
-
-#: mach-o.c:3427
-msgid " #: Segment name     Section name     Address\n"
-msgstr " #: Segmentnavn      Sektionsnavn     Adresse\n"
+#: mach-o.c:4204
+#, c-format
+msgid "unknown header byte-order value 0x%lx"
+msgstr "ukendt vÃ¦rdi 0x%lx af byteorden i header"
 
 #: merge.c:832
 #, c-format
 msgid "%s: access beyond end of merged section (%ld)"
-msgstr "%s: tilgang ud over slutningen pÃ¥ sammenflettet sektion (%ld)"
+msgstr "%s: tilgang ud over slutningen pÃ¥ sammenflettet afsnit (%ld)"
 
-#: mmo.c:456
+#: mmo.c:455
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
-msgstr "%s: Ingen kerne til at allokere sektionsnavn %s\n"
+msgstr "%s: Ingen kerne til at allokere afsnitsnavn %s\n"
 
-#: mmo.c:531
+#: mmo.c:530
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: Ingen kerne til at allokere et %d byte langt symbol\n"
 
-#: mmo.c:1187
+#: mmo.c:1189
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: ugyldig mmo-fil: initieringsvÃ¦rdi for $255 er ikke \"Main\"\n"
 
-#: mmo.c:1332
+#: mmo.c:1334
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr "%s: bred tegn-sekvens som ikke understÃ¸ttes 0x%02X 0x%02X efter symbolnavnet som begynder med \"%s\"\n"
 
-#: mmo.c:1565
+#: mmo.c:1568
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: ugyldig mmo-fil: lopkode \"%d\" understÃ¸ttes ikke\n"
 
-#: mmo.c:1575
+#: mmo.c:1578
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: ugyldig mmo-fil: forventede YZ = 1 fik YZ = %d for lop_quote\n"
 
-#: mmo.c:1611
+#: mmo.c:1614
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr "%s: ugyldig mmo-fil: forventede z = 1 eller z = 2, fik z = %d for lop_loc\n"
 
-#: mmo.c:1657
+#: mmo.c:1660
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: ugyldig mmo-fil: forventede z = 1 eller z = 2, fik z = %d for lop_fixo\n"
 
-#: mmo.c:1696
+#: mmo.c:1699
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: ugyldig mmo-fil: forventede y = 0, fik y = %d for lop_fixrx\n"
 
-#: mmo.c:1705
+#: mmo.c:1708
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr "%s: ugyldig mmo-fil: forventede z = 16 eller z = 24, fik z = %d for lop_fixr\n"
 
-#: mmo.c:1728
+#: mmo.c:1731
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr "%s: ugyldig mmo-fil: indledende byte i operandord skal vÃ¦re 0 eller 1, fik %d for lop_fixrx\n"
 
-#: mmo.c:1751
+#: mmo.c:1754
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: kan ikke allokere filnavn for fil nummer %d, %d byte\n"
 
-#: mmo.c:1771
+#: mmo.c:1774
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: ugyldig mmo-fil: fil nummer %d \"%s\", var allerede angivet som \"%s\"\n"
 
-#: mmo.c:1784
+#: mmo.c:1787
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr "%s: ugyldig mmo-fil: filnavnet for nummer %d blev ikke angivet inden brug\n"
 
-#: mmo.c:1890
+#: mmo.c:1893
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr "%s: ugyldig mmo-fil: felter y og z i lop_stab er ikke-tomme, y: %d, z: %d\n"
 
-#: mmo.c:1926
+#: mmo.c:1929
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: ugyldig mmo-fil: lop_end er ikke sidste objekt i fil\n"
 
-#: mmo.c:1939
+#: mmo.c:1942
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr "%s: ugyldig mmo-fil: YZ i lop_end (%ld) er ikke lig med antal af tetraer til den foregÃ¥ende lop_stab (%ld)\n"
 
-#: mmo.c:2649
+#: mmo.c:2652
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: ugyldig symboltabel: dubletsymbol \"%s\"\n"
 
-#: mmo.c:2889
+#: mmo.c:2892
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr "%s: Fejlagtig symboldefinition: \"Main\" er sat til %s i stedet for startadressen %s\n"
 
-#: mmo.c:2981
+#: mmo.c:2984
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr "%s: advarsel: symboltabellen er for stor for mmo, stÃ¸rre end 65535 32-bit ord: %d. Kun \"Main\" vil blive sendt.\n"
 
-#: mmo.c:3026
+#: mmo.c:3029
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: intern fejl, symboltabellen Ã¦ndrede stÃ¸rrelse fra %d til %d ord\n"
 
-#: mmo.c:3078
+#: mmo.c:3081
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
-msgstr "%s: intern fejl, den interne registersektion %s havde indhold\n"
+msgstr "%s: intern fejl, det interne registerafsnit %s havde indhold\n"
 
-#: mmo.c:3129
+#: mmo.c:3132
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
-msgstr "%s: ingen initierede registre; sektionslÃ¦ngde 0\n"
+msgstr "%s: ingen initierede registre; afsnitslÃ¦ngde 0\n"
 
-#: mmo.c:3135
+#: mmo.c:3138
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
-msgstr "%s: for mange initierede registre; sektionslÃ¦ngde %ld\n"
+msgstr "%s: for mange initierede registre; afsnitslÃ¦ngde %ld\n"
 
-#: mmo.c:3140
+#: mmo.c:3143
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: ugyldig startadresse for initierede registre med lÃ¦ngden %ld: 0x%lx%08lx\n"
 
-#: oasys.c:882
+#: oasys.c:881
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
-msgstr "%s: kan ikke reprÃ¦sentere sektionen \"%s\" i oasys"
+msgstr "%s: kan ikke reprÃ¦sentere afsnittet \"%s\" i oasys"
 
-#: osf-core.c:140
+#: osf-core.c:128
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
-msgstr "UhÃ¥ndteret sektionstype %d for OSF/1-hukommelsesfil\n"
+msgstr "UhÃ¥ndteret afsnitstype %d for OSF/1-hukommelsesfil\n"
 
 #: pe-mips.c:607
 msgid "%B: `ld -r' not supported with PE MIPS objects\n"
@@ -3420,56 +4091,61 @@ msgstr "%B: hop for langt bort\n"
 msgid "%B: bad pair/reflo after refhi\n"
 msgstr "%B: fejlagtigt par/reflo efter refhi\n"
 
-#: pei-x86_64.c:444
+#: pef.c:522
+#, c-format
+msgid "bfd_pef_scan: unknown architecture 0x%lx"
+msgstr "bfd_pef_scan: ukendt arkitektur 0x%lx"
+
+#: pei-x86_64.c:469
 #, c-format
 msgid "warning: .pdata section size (%ld) is not a multiple of %d\n"
-msgstr "advarsel: stÃ¸rrelsen pÃ¥ .pdata-sektionen (%ld) er ikke et multiplum af %d\n"
+msgstr "advarsel: stÃ¸rrelsen pÃ¥ .pdata-afsnittet (%ld) er ikke et multiplum af %d\n"
 
-#: pei-x86_64.c:448 peigen.c:1618 peigen.c:1801 pepigen.c:1618 pepigen.c:1801
-#: pex64igen.c:1618 pex64igen.c:1801
+#: pei-x86_64.c:474 peigen.c:1626 peigen.c:1809 pepigen.c:1626 pepigen.c:1809
+#: pex64igen.c:1626 pex64igen.c:1809
 #, c-format
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
 msgstr ""
 "\n"
-"Funktionstabellen (tolket indhold fra .pdata-sektionen)\n"
+"Funktionstabellen (tolket indhold fra .pdata-afsnittet)\n"
 
-#: pei-x86_64.c:450
+#: pei-x86_64.c:476
 #, c-format
 msgid "vma:\t\t\tBeginAddress\t EndAddress\t  UnwindData\n"
 msgstr "vma:\t\t\tStartadresse\t Slutadresse\t  Tilbagespolingsdata\n"
 
 #. XXX code yet to be written.
-#: peicode.h:751
+#: peicode.h:758
 msgid "%B: Unhandled import type; %x"
 msgstr "%B: UhÃ¥ndteret importtype; %x"
 
-#: peicode.h:756
+#: peicode.h:763
 msgid "%B: Unrecognised import type; %x"
 msgstr "%B: Ukendt importtype; %x"
 
-#: peicode.h:770
+#: peicode.h:777
 msgid "%B: Unrecognised import name type; %x"
 msgstr "%B: Ukendt importnavnstype; %x"
 
-#: peicode.h:1162
+#: peicode.h:1173
 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr "%B: Ukendt maskintype (0x%x) i Import Library Format-arkiv"
 
-#: peicode.h:1174
+#: peicode.h:1185
 msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%B: Genkendt men uhÃ¥ndteret maskintype (0x%x) i Import Library Format-arkiv"
 
-#: peicode.h:1192
+#: peicode.h:1203
 msgid "%B: size field is zero in Import Library Format header"
 msgstr "%B: stÃ¸rrelsesfeltet er nul i Import Library Format-header"
 
-#: peicode.h:1223
+#: peicode.h:1234
 msgid "%B: string not null terminated in ILF object file."
 msgstr "%B: streng ikke nultermineret i ILF-objektfil."
 
-#: ppcboot.c:414
+#: ppcboot.c:391
 #, c-format
 msgid ""
 "\n"
@@ -3478,27 +4154,27 @@ msgstr ""
 "\n"
 "ppcboot-hoved:\n"
 
-#: ppcboot.c:415
+#: ppcboot.c:392
 #, c-format
 msgid "Entry offset        = 0x%.8lx (%ld)\n"
 msgstr "Startafstand        = 0x%.8lx (%ld)\n"
 
-#: ppcboot.c:417
+#: ppcboot.c:394
 #, c-format
 msgid "Length              = 0x%.8lx (%ld)\n"
 msgstr "LÃ¦ngde              = 0x%.8lx (%ld)\n"
 
-#: ppcboot.c:421
+#: ppcboot.c:398
 #, c-format
 msgid "Flag field          = 0x%.2x\n"
 msgstr "Flagfelt            = 0x%.2x\n"
 
-#: ppcboot.c:427
+#: ppcboot.c:404
 #, c-format
 msgid "Partition name      = \"%s\"\n"
 msgstr "Partitionsnavn      = \"%s\"\n"
 
-#: ppcboot.c:446
+#: ppcboot.c:423
 #, c-format
 msgid ""
 "\n"
@@ -3507,21 +4183,34 @@ msgstr ""
 "\n"
 "Start pÃ¥ partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 
-#: ppcboot.c:452
+#: ppcboot.c:429
 #, c-format
 msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 msgstr "Slut pÃ¥ partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 
-#: ppcboot.c:458
+#: ppcboot.c:435
 #, c-format
 msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
 msgstr "Sektor for partition[%d] = 0x%.8lx (%ld)\n"
 
-#: ppcboot.c:460
+#: ppcboot.c:437
 #, c-format
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "LÃ¦ngde pÃ¥ partition[%d] = 0x%.8lx (%ld)\n"
 
+#: reloc.c:7371
+msgid "INPUT_SECTION_FLAGS are not supported.\n"
+msgstr "INPUT_SECTION_FLAGS understÃ¸ttes ikke.\n"
+
+#: reloc.c:7526
+msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+msgstr "%X%P: %B(%A): relokeringen \"%R\" gÃ¥r uden for gyldigt interval\n"
+
+#: rs6000-core.c:448
+#, c-format
+msgid "%s: warning core file truncated"
+msgstr "%s: advarsel - kernefil afkortet"
+
 #: som.c:5471
 #, c-format
 msgid ""
@@ -3552,32 +4241,32 @@ msgstr "%B(%A+0x%lx): Stabs-post har ugy
 msgid "Unsupported .stab relocation"
 msgstr ".stab-relokering som ikke understÃ¸ttes"
 
-#: vms-alpha.c:1287
+#: vms-alpha.c:1294
 #, c-format
 msgid "Unknown EGSD subtype %d"
 msgstr "Ukendt EGSD-undertype %d"
 
-#: vms-alpha.c:1318
+#: vms-alpha.c:1325
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr "Stakken giver overlÃ¸b (%d) i _bfd_vms_push"
 
-#: vms-alpha.c:1331
+#: vms-alpha.c:1338
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr "Stakken giver underlÃ¸b i _bfd_vms_pop"
 
 #. These names have not yet been added to this switch statement.
-#: vms-alpha.c:1568
+#: vms-alpha.c:1575
 #, c-format
 msgid "unknown ETIR command %d"
 msgstr "ukendt ETIR-kommando %d"
 
-#: vms-alpha.c:1755
+#: vms-alpha.c:1762
 #, c-format
 msgid "bad section index in %s"
-msgstr "fejlagtigt sektionsindeks i %s"
+msgstr "fejlagtigt afsnitsindeks i %s"
 
-#: vms-alpha.c:1768
+#: vms-alpha.c:1775
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr "STA-kommando %s understÃ¸ttes ikke"
@@ -3587,1389 +4276,1388 @@ msgstr "STA-kommando %s understÃ¸ttes ik
 #. Rotate.
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-alpha.c:1944 vms-alpha.c:1975 vms-alpha.c:2222
+#: vms-alpha.c:1951 vms-alpha.c:1982 vms-alpha.c:2229
 #, c-format
 msgid "%s: not supported"
 msgstr "%s: understÃ¸ttes ikke"
 
-#: vms-alpha.c:1950
+#: vms-alpha.c:1957
 #, c-format
 msgid "%s: not implemented"
 msgstr "%s: ikke implementeret"
 
-#: vms-alpha.c:2206
+#: vms-alpha.c:2213
 #, c-format
 msgid "invalid use of %s with contexts"
 msgstr "ugyldig brug af %s med kontekster"
 
-#: vms-alpha.c:2240
+#: vms-alpha.c:2247
 #, c-format
 msgid "reserved cmd %d"
 msgstr "reserveret kommando %d"
 
-#: vms-alpha.c:2325
+#: vms-alpha.c:2332
 msgid "Object module NOT error-free !\n"
 msgstr "Objektmodulet IKKE fejlfri!\n"
 
-#: vms-alpha.c:2754
-#, c-format
-msgid "Symbol %s replaced by %s\n"
-msgstr "Symbol %s erstattet med %s\n"
-
-#: vms-alpha.c:3757
+#: vms-alpha.c:3657
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
-msgstr "SEC_RELOC uden relokeringer i sektion %s"
+msgstr "SEC_RELOC uden relokeringer i afsnit %s"
 
-#: vms-alpha.c:3810 vms-alpha.c:4041
+#: vms-alpha.c:3709 vms-alpha.c:3922
 #, c-format
 msgid "Size error in section %s"
-msgstr "StÃ¸rrelsesfejl i sektion %s"
+msgstr "StÃ¸rrelsesfejl i afsnit %s"
 
-#: vms-alpha.c:3980
+#: vms-alpha.c:3868
 msgid "Spurious ALPHA_R_BSR reloc"
 msgstr "UÃ¦gte ALPHA_R_BSD-relokering"
 
-#: vms-alpha.c:4028
+#: vms-alpha.c:3909
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "UhÃ¥ndteret relokering %s"
 
-#: vms-alpha.c:4318
+#: vms-alpha.c:4199
 #, c-format
 msgid "unknown source command %d"
 msgstr "ukendt kildekommando %d"
 
-#: vms-alpha.c:4379
+#: vms-alpha.c:4260
 msgid "DST__K_SET_LINUM_INCR not implemented"
 msgstr "DST__K_SET_LINUM_INCR er ikke implementeret"
 
-#: vms-alpha.c:4385
+#: vms-alpha.c:4266
 msgid "DST__K_SET_LINUM_INCR_W not implemented"
 msgstr "DST__K_SET_LINUM_INCR_W er ikke implementeret"
 
-#: vms-alpha.c:4391
+#: vms-alpha.c:4272
 msgid "DST__K_RESET_LINUM_INCR not implemented"
 msgstr "DST__K_RESET_LINUM_INCR ikke implementeret"
 
-#: vms-alpha.c:4397
+#: vms-alpha.c:4278
 msgid "DST__K_BEG_STMT_MODE not implemented"
 msgstr "DST__K_BEG_STMT_MODE er ikke implementeret"
 
-#: vms-alpha.c:4403
+#: vms-alpha.c:4284
 msgid "DST__K_END_STMT_MODE not implemented"
 msgstr "DST__K_END_STMT_MODE er ikke implementeret"
 
-#: vms-alpha.c:4430
+#: vms-alpha.c:4311
 msgid "DST__K_SET_PC not implemented"
 msgstr "DST__K_SET_PC er ikke implementeret"
 
-#: vms-alpha.c:4436
+#: vms-alpha.c:4317
 msgid "DST__K_SET_PC_W not implemented"
 msgstr "DST__K_SET_PC_W er ikke implementeret"
 
-#: vms-alpha.c:4442
+#: vms-alpha.c:4323
 msgid "DST__K_SET_PC_L not implemented"
 msgstr "DST__K_SET_PC_L er ikke implementeret"
 
-#: vms-alpha.c:4448
+#: vms-alpha.c:4329
 msgid "DST__K_SET_STMTNUM not implemented"
 msgstr "DST__K_SET_STMTNUM er ikke implementeret"
 
-#: vms-alpha.c:4491
+#: vms-alpha.c:4372
 #, c-format
 msgid "unknown line command %d"
 msgstr "ukendt linjekommando %d"
 
-#: vms-alpha.c:4938 vms-alpha.c:4955 vms-alpha.c:4969 vms-alpha.c:4984
-#: vms-alpha.c:4996 vms-alpha.c:5007 vms-alpha.c:5019
+#: vms-alpha.c:4846 vms-alpha.c:4863 vms-alpha.c:4877 vms-alpha.c:4892
+#: vms-alpha.c:4904 vms-alpha.c:4915 vms-alpha.c:4927
 #, c-format
 msgid "Unknown reloc %s + %s"
 msgstr "Ukendt relokering %s + %s"
 
-#: vms-alpha.c:5074
+#: vms-alpha.c:4982
 #, c-format
 msgid "Unknown reloc %s"
 msgstr "Ukendt relokering %s"
 
-#: vms-alpha.c:5087
+#: vms-alpha.c:4995
 msgid "Invalid section index in ETIR"
-msgstr "Fejlagtigt sektionsindeks i ETIR"
+msgstr "Fejlagtigt afsnitsindeks i ETIR"
 
-#: vms-alpha.c:5134
+#: vms-alpha.c:5002
+msgid "Relocation for non-REL psect"
+msgstr "Relokering til ikke-REL-psect"
+
+#: vms-alpha.c:5049
 #, c-format
 msgid "Unknown symbol in command %s"
 msgstr "Ugyldigt symbol i kommando %s"
 
-#: vms-alpha.c:5649
+#: vms-alpha.c:5564
 #, c-format
 msgid "  EMH %u (len=%u): "
 msgstr "  EMH %u (lÃ¦ngde=%u): "
 
-#: vms-alpha.c:5658
+#: vms-alpha.c:5573
 #, c-format
 msgid "Module header\n"
 msgstr "Modulheader\n"
 
-#: vms-alpha.c:5659
+#: vms-alpha.c:5574
 #, c-format
 msgid "   structure level: %u\n"
 msgstr "   strukturniveau : %u\n"
 
-#: vms-alpha.c:5660
+#: vms-alpha.c:5575
 #, c-format
 msgid "   max record size: %u\n"
 msgstr "   maks post-str: %u\n"
 
-#: vms-alpha.c:5663
+#: vms-alpha.c:5578
 #, c-format
 msgid "   module name    : %.*s\n"
 msgstr "   modulnavn      : %.*s\n"
 
-#: vms-alpha.c:5665
+#: vms-alpha.c:5580
 #, c-format
 msgid "   module version : %.*s\n"
 msgstr "   modulversion   : %.*s\n"
 
-#: vms-alpha.c:5667
+#: vms-alpha.c:5582
 #, c-format
 msgid "   compile date   : %.17s\n"
 msgstr "   kompileringsdag: %.17s\n"
 
-#: vms-alpha.c:5672
+#: vms-alpha.c:5587
 #, c-format
 msgid "Language Processor Name\n"
 msgstr "Navn pÃ¥ sprogprocessor\n"
 
-#: vms-alpha.c:5673
+#: vms-alpha.c:5588
 #, c-format
 msgid "   language name: %.*s\n"
 msgstr "   sprognavn: %.*s\n"
 
-#: vms-alpha.c:5680
+#: vms-alpha.c:5595
 #, c-format
 msgid "Source Files Header\n"
 msgstr "Kildefilheader\n"
 
-#: vms-alpha.c:5681
+#: vms-alpha.c:5596
 #, c-format
 msgid "   file: %.*s\n"
 msgstr "   fil: %.*s\n"
 
-#: vms-alpha.c:5688
+#: vms-alpha.c:5603
 #, c-format
 msgid "Title Text Header\n"
 msgstr "Titeltekstheader\n"
 
-#: vms-alpha.c:5689
+#: vms-alpha.c:5604
 #, c-format
 msgid "   title: %.*s\n"
 msgstr "   titel: %.*s\n"
 
-#: vms-alpha.c:5696
+#: vms-alpha.c:5611
 #, c-format
 msgid "Copyright Header\n"
 msgstr "Ophavsretsheader\n"
 
-#: vms-alpha.c:5697
+#: vms-alpha.c:5612
 #, c-format
 msgid "   copyright: %.*s\n"
 msgstr "   ophavsret: %.*s\n"
 
-#: vms-alpha.c:5703
+#: vms-alpha.c:5618
 #, c-format
 msgid "unhandled emh subtype %u\n"
 msgstr "uhÃ¥ndteret emh-undertype %u\n"
 
-#: vms-alpha.c:5713
+#: vms-alpha.c:5628
 #, c-format
 msgid "  EEOM (len=%u):\n"
 msgstr "  EEOM (lÃ¦ngde=%u):\n"
 
-#: vms-alpha.c:5714
+#: vms-alpha.c:5629
 #, c-format
 msgid "   number of cond linkage pairs: %u\n"
-msgstr "   antal cond-lÃ¦nkningspar: %u\n"
+msgstr "   antal cond-linkingpar: %u\n"
 
-#: vms-alpha.c:5716
+#: vms-alpha.c:5631
 #, c-format
 msgid "   completion code: %u\n"
 msgstr "   fuldfÃ¸relseskode: %u\n"
 
-#: vms-alpha.c:5720
+#: vms-alpha.c:5635
 #, c-format
 msgid "   transfer addr flags: 0x%02x\n"
 msgstr "   overfÃ¸rselsadresseflag: 0x%02x\n"
 
-#: vms-alpha.c:5721
+#: vms-alpha.c:5636
 #, c-format
 msgid "   transfer addr psect: %u\n"
 msgstr "   overfÃ¸rselsadresse-psect: %u\n"
 
-#: vms-alpha.c:5723
+#: vms-alpha.c:5638
 #, c-format
 msgid "   transfer address   : 0x%08x\n"
 msgstr "   overfÃ¸rselsadresse : 0x%08x\n"
 
-#: vms-alpha.c:5732
+#: vms-alpha.c:5647
 msgid " WEAK"
 msgstr " WEAK"
 
-#: vms-alpha.c:5734
+#: vms-alpha.c:5649
 msgid " DEF"
 msgstr " DEF"
 
-#: vms-alpha.c:5736
+#: vms-alpha.c:5651
 msgid " UNI"
 msgstr " UNI"
 
-#: vms-alpha.c:5738 vms-alpha.c:5759
+#: vms-alpha.c:5653 vms-alpha.c:5674
 msgid " REL"
 msgstr " REL"
 
-#: vms-alpha.c:5740
+#: vms-alpha.c:5655
 msgid " COMM"
 msgstr " COMM"
 
-#: vms-alpha.c:5742
+#: vms-alpha.c:5657
 msgid " VECEP"
 msgstr " VECEP"
 
-#: vms-alpha.c:5744
+#: vms-alpha.c:5659
 msgid " NORM"
 msgstr " NORM"
 
-#: vms-alpha.c:5746
+#: vms-alpha.c:5661
 msgid " QVAL"
 msgstr " QVAL"
 
-#: vms-alpha.c:5753
+#: vms-alpha.c:5668
 msgid " PIC"
 msgstr " PIC"
 
-#: vms-alpha.c:5755
+#: vms-alpha.c:5670
 msgid " LIB"
 msgstr " LIB"
 
-#: vms-alpha.c:5757
+#: vms-alpha.c:5672
 msgid " OVR"
 msgstr " OVR"
 
-#: vms-alpha.c:5761
+#: vms-alpha.c:5676
 msgid " GBL"
 msgstr " GBL"
 
-#: vms-alpha.c:5763
+#: vms-alpha.c:5678
 msgid " SHR"
 msgstr " SHR"
 
-#: vms-alpha.c:5765
+#: vms-alpha.c:5680
 msgid " EXE"
 msgstr " EXE"
 
-#: vms-alpha.c:5767
+#: vms-alpha.c:5682
 msgid " RD"
 msgstr " RD"
 
-#: vms-alpha.c:5769
+#: vms-alpha.c:5684
 msgid " WRT"
 msgstr " WRT"
 
-#: vms-alpha.c:5771
+#: vms-alpha.c:5686
 msgid " VEC"
 msgstr " VEC"
 
-#: vms-alpha.c:5773
+#: vms-alpha.c:5688
 msgid " NOMOD"
 msgstr " NOMOD"
 
-#: vms-alpha.c:5775
+#: vms-alpha.c:5690
 msgid " COM"
 msgstr " COM"
 
-#: vms-alpha.c:5777
+#: vms-alpha.c:5692
 msgid " 64B"
 msgstr " 64B"
 
-#: vms-alpha.c:5786
+#: vms-alpha.c:5701
 #, c-format
 msgid "  EGSD (len=%u):\n"
 msgstr "  EGSD (lÃ¦ngde=%u):\n"
 
-#: vms-alpha.c:5798
+#: vms-alpha.c:5713
 #, c-format
 msgid "  EGSD entry %2u (type: %u, len: %u): "
 msgstr "  EGSD-post %2u (type: %u, lÃ¦ngde: %u): "
 
-#: vms-alpha.c:5810
+#: vms-alpha.c:5725
 #, c-format
 msgid "PSC - Program section definition\n"
-msgstr "PSC - Programsektionsdefinition\n"
+msgstr "PSC - Programafsnitsdefinition\n"
 
-#: vms-alpha.c:5811 vms-alpha.c:5828
+#: vms-alpha.c:5726 vms-alpha.c:5743
 #, c-format
 msgid "   alignment  : 2**%u\n"
 msgstr "   justering  : 2**%u\n"
 
-#: vms-alpha.c:5812 vms-alpha.c:5829
+#: vms-alpha.c:5727 vms-alpha.c:5744
 #, c-format
 msgid "   flags      : 0x%04x"
 msgstr "   flag       : 0x%04x"
 
-#: vms-alpha.c:5816
+#: vms-alpha.c:5731
 #, c-format
 msgid "   alloc (len): %u (0x%08x)\n"
 msgstr "   allok (lgd): %u (0x%08x)\n"
 
-#: vms-alpha.c:5817 vms-alpha.c:5874 vms-alpha.c:5923
+#: vms-alpha.c:5732 vms-alpha.c:5789 vms-alpha.c:5838
 #, c-format
 msgid "   name       : %.*s\n"
 msgstr "   navn       : %.*s\n"
 
-#: vms-alpha.c:5827
+#: vms-alpha.c:5742
 #, c-format
 msgid "SPSC - Shared Image Program section def\n"
-msgstr "SPSC - Shared Image Program-sektionsdefinition\n"
+msgstr "SPSC - Shared Image Program-afsnitsdefinition\n"
 
-#: vms-alpha.c:5833
+#: vms-alpha.c:5748
 #, c-format
 msgid "   alloc (len)   : %u (0x%08x)\n"
 msgstr "   allok (lÃ¦ngde): %u (0x%08x)\n"
 
-#: vms-alpha.c:5834
+#: vms-alpha.c:5749
 #, c-format
 msgid "   image offset  : 0x%08x\n"
 msgstr "   image-afsÃ¦t   : 0x%08x\n"
 
-#: vms-alpha.c:5836
+#: vms-alpha.c:5751
 #, c-format
 msgid "   symvec offset : 0x%08x\n"
 msgstr "   symvec-afsÃ¦t  : 0x%08x\n"
 
-#: vms-alpha.c:5838
+#: vms-alpha.c:5753
 #, c-format
 msgid "   name          : %.*s\n"
 msgstr "   navn          : %.*s\n"
 
-#: vms-alpha.c:5851
+#: vms-alpha.c:5766
 #, c-format
 msgid "SYM - Global symbol definition\n"
 msgstr "SYM - Global symboldefinition\n"
 
-#: vms-alpha.c:5852 vms-alpha.c:5912 vms-alpha.c:5933 vms-alpha.c:5952
+#: vms-alpha.c:5767 vms-alpha.c:5827 vms-alpha.c:5848 vms-alpha.c:5867
 #, c-format
 msgid "   flags: 0x%04x"
 msgstr "   flag : 0x%04x"
 
-#: vms-alpha.c:5855
+#: vms-alpha.c:5770
 #, c-format
 msgid "   psect offset: 0x%08x\n"
 msgstr "   psect-afsÃ¦t : 0x%08x\n"
 
-#: vms-alpha.c:5859
+#: vms-alpha.c:5774
 #, c-format
 msgid "   code address: 0x%08x\n"
 msgstr "   kodeadresse : 0x%08x\n"
 
-#: vms-alpha.c:5861
+#: vms-alpha.c:5776
 #, c-format
 msgid "   psect index for entry point : %u\n"
 msgstr "   psect-indeks for indgangspunkt : %u\n"
 
-#: vms-alpha.c:5864 vms-alpha.c:5940 vms-alpha.c:5959
+#: vms-alpha.c:5779 vms-alpha.c:5855 vms-alpha.c:5874
 #, c-format
 msgid "   psect index : %u\n"
 msgstr "   psect-indeks : %u\n"
 
-#: vms-alpha.c:5866 vms-alpha.c:5942 vms-alpha.c:5961
+#: vms-alpha.c:5781 vms-alpha.c:5857 vms-alpha.c:5876
 #, c-format
 msgid "   name        : %.*s\n"
 msgstr "   navn        : %.*s\n"
 
-#: vms-alpha.c:5873
+#: vms-alpha.c:5788
 #, c-format
 msgid "SYM - Global symbol reference\n"
 msgstr "SYM - Global symbolreference\n"
 
-#: vms-alpha.c:5885
+#: vms-alpha.c:5800
 #, c-format
 msgid "IDC - Ident Consistency check\n"
 msgstr "IDC - identitetskonsistenstjek\n"
 
-#: vms-alpha.c:5886
+#: vms-alpha.c:5801
 #, c-format
 msgid "   flags         : 0x%08x"
 msgstr "   flag          : 0x%08x"
 
-#: vms-alpha.c:5890
+#: vms-alpha.c:5805
 #, c-format
 msgid "   id match      : %x\n"
 msgstr "   id-match      : %x\n"
 
-#: vms-alpha.c:5892
+#: vms-alpha.c:5807
 #, c-format
 msgid "   error severity: %x\n"
 msgstr "   fejlalvorlighed: %x\n"
 
-#: vms-alpha.c:5895
+#: vms-alpha.c:5810
 #, c-format
 msgid "   entity name   : %.*s\n"
 msgstr "   entitetsnavn  : %.*s\n"
 
-#: vms-alpha.c:5897
+#: vms-alpha.c:5812
 #, c-format
 msgid "   object name   : %.*s\n"
 msgstr "   objektnavn    : %.*s\n"
 
-#: vms-alpha.c:5900
+#: vms-alpha.c:5815
 #, c-format
 msgid "   binary ident  : 0x%08x\n"
 msgstr "   binÃ¦r id      : 0x%08x\n"
 
-#: vms-alpha.c:5903
+#: vms-alpha.c:5818
 #, c-format
 msgid "   ascii ident   : %.*s\n"
 msgstr "   ascii-id      : %.*s\n"
 
-#: vms-alpha.c:5911
+#: vms-alpha.c:5826
 #, c-format
 msgid "SYMG - Universal symbol definition\n"
 msgstr "SYMG - Universel symboldefinition\n"
 
-#: vms-alpha.c:5915
+#: vms-alpha.c:5830
 #, c-format
 msgid "   symbol vector offset: 0x%08x\n"
 msgstr "   symbolvektorafsÃ¦t   : 0x%08x\n"
 
-#: vms-alpha.c:5917
+#: vms-alpha.c:5832
 #, c-format
 msgid "   entry point: 0x%08x\n"
 msgstr "   indgangspunkt: 0x%08x\n"
 
-#: vms-alpha.c:5919
+#: vms-alpha.c:5834
 #, c-format
 msgid "   proc descr : 0x%08x\n"
 msgstr "   proc-beskr : 0x%08x\n"
 
-#: vms-alpha.c:5921
+#: vms-alpha.c:5836
 #, c-format
 msgid "   psect index: %u\n"
 msgstr "   psect-indeks: %u\n"
 
-#: vms-alpha.c:5932
+#: vms-alpha.c:5847
 #, c-format
 msgid "SYMV - Vectored symbol definition\n"
 msgstr "SYMV - vektoriseret symboldefinition\n"
 
-#: vms-alpha.c:5936
+#: vms-alpha.c:5851
 #, c-format
 msgid "   vector      : 0x%08x\n"
 msgstr "   vektor      : 0x%08x\n"
 
-#: vms-alpha.c:5938 vms-alpha.c:5957
+#: vms-alpha.c:5853 vms-alpha.c:5872
 #, c-format
 msgid "   psect offset: %u\n"
 msgstr "   psect-afsÃ¦t : %u\n"
 
-#: vms-alpha.c:5951
+#: vms-alpha.c:5866
 #, c-format
 msgid "SYMM - Global symbol definition with version\n"
 msgstr "SYMM - Global symboldefinition med version\n"
 
-#: vms-alpha.c:5955
+#: vms-alpha.c:5870
 #, c-format
 msgid "   version mask: 0x%08x\n"
 msgstr "   versionsmaske: 0x%08x\n"
 
-#: vms-alpha.c:5966
+#: vms-alpha.c:5881
 #, c-format
 msgid "unhandled egsd entry type %u\n"
 msgstr "uhÃ¥ndteret egsd-post-type %u\n"
 
-#: vms-alpha.c:6000
+#: vms-alpha.c:5915
 #, c-format
 msgid "    linkage index: %u, replacement insn: 0x%08x\n"
-msgstr "    lÃ¦nkningsindeks: %u, erstatnings-insn: 0x%08x\n"
+msgstr "    linking-indeks: %u, erstatnings-insn: 0x%08x\n"
 
-#: vms-alpha.c:6003
+#: vms-alpha.c:5918
 #, c-format
 msgid "    psect idx 1: %u, offset 1: 0x%08x %08x\n"
 msgstr "    psect-idx 1: %u, afsÃ¦t 1: 0x%08x %08x\n"
 
-#: vms-alpha.c:6007
+#: vms-alpha.c:5922
 #, c-format
 msgid "    psect idx 2: %u, offset 2: 0x%08x %08x\n"
 msgstr "    psect-idx 2: %u, afsÃ¦t 2: 0x%08x %08x\n"
 
-#: vms-alpha.c:6012
+#: vms-alpha.c:5927
 #, c-format
 msgid "    psect idx 3: %u, offset 3: 0x%08x %08x\n"
 msgstr "    psect-idx 3: %u, afsÃ¦t 3: 0x%08x %08x\n"
 
-#: vms-alpha.c:6017
+#: vms-alpha.c:5932
 #, c-format
 msgid "    global name: %.*s\n"
 msgstr "    globalt navn: %.*s\n"
 
-#: vms-alpha.c:6027
+#: vms-alpha.c:5942
 #, c-format
 msgid "  %s (len=%u+%u):\n"
 msgstr "  %s (lÃ¦ngde=%u+%u):\n"
 
-#: vms-alpha.c:6042
+#: vms-alpha.c:5957
 #, c-format
 msgid "   (type: %3u, size: 4+%3u): "
 msgstr "   (type: %3u, stÃ¸rrelse: 4+%3u): "
 
-#: vms-alpha.c:6046
+#: vms-alpha.c:5961
 #, c-format
 msgid "STA_GBL (stack global) %.*s\n"
 msgstr "STA_GBL (stak-global) %.*s\n"
 
-#: vms-alpha.c:6050
+#: vms-alpha.c:5965
 #, c-format
 msgid "STA_LW (stack longword) 0x%08x\n"
 msgstr "STA_LW (stak-longword) 0x%08x\n"
 
-#: vms-alpha.c:6054
+#: vms-alpha.c:5969
 #, c-format
 msgid "STA_QW (stack quadword) 0x%08x %08x\n"
 msgstr "STA_QW (stak-quadword) 0x%08x %08x\n"
 
-#: vms-alpha.c:6059
+#: vms-alpha.c:5974
 #, c-format
 msgid "STA_PQ (stack psect base + offset)\n"
 msgstr "STA_PQ (stak-psect base + afsÃ¦t)\n"
 
-#: vms-alpha.c:6060
+#: vms-alpha.c:5975
 #, c-format
 msgid "    psect: %u, offset: 0x%08x %08x\n"
 msgstr "    psect: %u, afsÃ¦t: 0x%08x %08x\n"
 
-#: vms-alpha.c:6066
+#: vms-alpha.c:5981
 #, c-format
 msgid "STA_LI (stack literal)\n"
 msgstr "STA_LI (stak-literal)\n"
 
-#: vms-alpha.c:6069
+#: vms-alpha.c:5984
 #, c-format
 msgid "STA_MOD (stack module)\n"
 msgstr "STA_MOD (stakmodul)\n"
 
-#: vms-alpha.c:6072
+#: vms-alpha.c:5987
 #, c-format
 msgid "STA_CKARG (compare procedure argument)\n"
 msgstr "STA_CKARG (argument til sammenligningsprocedure)\n"
 
-#: vms-alpha.c:6076
+#: vms-alpha.c:5991
 #, c-format
 msgid "STO_B (store byte)\n"
 msgstr "STO_B (gem byte)\n"
 
-#: vms-alpha.c:6079
+#: vms-alpha.c:5994
 #, c-format
 msgid "STO_W (store word)\n"
 msgstr "STO_W (gem word)\n"
 
-#: vms-alpha.c:6082
+#: vms-alpha.c:5997
 #, c-format
 msgid "STO_LW (store longword)\n"
 msgstr "STO_LW (gem longword)\n"
 
-#: vms-alpha.c:6085
+#: vms-alpha.c:6000
 #, c-format
 msgid "STO_QW (store quadword)\n"
 msgstr "STO_QW (gem quadword)\n"
 
-#: vms-alpha.c:6091
+#: vms-alpha.c:6006
 #, c-format
 msgid "STO_IMMR (store immediate repeat) %u bytes\n"
 msgstr "STO_IMMR (gem omgÃ¥ende gentagelse) %u byte\n"
 
-#: vms-alpha.c:6098
+#: vms-alpha.c:6013
 #, c-format
 msgid "STO_GBL (store global) %.*s\n"
 msgstr "STO_GBL (gem global) %.*s\n"
 
-#: vms-alpha.c:6102
+#: vms-alpha.c:6017
 #, c-format
 msgid "STO_CA (store code address) %.*s\n"
 msgstr "STO_CA (gem kodeadresse) %.*s\n"
 
-#: vms-alpha.c:6106
+#: vms-alpha.c:6021
 #, c-format
 msgid "STO_RB (store relative branch)\n"
 msgstr "STO_RB (gem relativ gren)\n"
 
-#: vms-alpha.c:6109
+#: vms-alpha.c:6024
 #, c-format
 msgid "STO_AB (store absolute branch)\n"
 msgstr "STO_AB (gem absolut gren)\n"
 
-#: vms-alpha.c:6112
+#: vms-alpha.c:6027
 #, c-format
 msgid "STO_OFF (store offset to psect)\n"
 msgstr "STO_OFF (gem afsÃ¦t til psect)\n"
 
-#: vms-alpha.c:6118
+#: vms-alpha.c:6033
 #, c-format
 msgid "STO_IMM (store immediate) %u bytes\n"
 msgstr "STO_IMM (gem omgÃ¥ende) %u byte\n"
 
-#: vms-alpha.c:6125
+#: vms-alpha.c:6040
 #, c-format
 msgid "STO_GBL_LW (store global longword) %.*s\n"
 msgstr "STO_GBL_LW (gem globalt longword) %.*s\n"
 
-#: vms-alpha.c:6129
+#: vms-alpha.c:6044
 #, c-format
 msgid "STO_OFF (store LP with procedure signature)\n"
 msgstr "STO_OFF (gem LP med proceduresignatur)\n"
 
-#: vms-alpha.c:6132
+#: vms-alpha.c:6047
 #, c-format
 msgid "STO_BR_GBL (store branch global) *todo*\n"
 msgstr "STO_BR_GBL (gem gren globalt) *todo*\n"
 
-#: vms-alpha.c:6135
+#: vms-alpha.c:6050
 #, c-format
 msgid "STO_BR_PS (store branch psect + offset) *todo*\n"
 msgstr "STO_BR_PS (gem gren-psect + afsÃ¦t) *todo*\n"
 
-#: vms-alpha.c:6139
+#: vms-alpha.c:6054
 #, c-format
 msgid "OPR_NOP (no-operation)\n"
 msgstr "OPR_NOP (ingen operation)\n"
 
-#: vms-alpha.c:6142
+#: vms-alpha.c:6057
 #, c-format
 msgid "OPR_ADD (add)\n"
 msgstr "OPR_ADD (lÃ¦g sammen)\n"
 
-#: vms-alpha.c:6145
+#: vms-alpha.c:6060
 #, c-format
 msgid "OPR_SUB (substract)\n"
 msgstr "OPR_SUB (trÃ¦k fra)\n"
 
-#: vms-alpha.c:6148
+#: vms-alpha.c:6063
 #, c-format
 msgid "OPR_MUL (multiply)\n"
 msgstr "OPR_MUL (multiplicÃ©r)\n"
 
-#: vms-alpha.c:6151
+#: vms-alpha.c:6066
 #, c-format
 msgid "OPR_DIV (divide)\n"
 msgstr "OPR_DIV (dividÃ©r)\n"
 
-#: vms-alpha.c:6154
+#: vms-alpha.c:6069
 #, c-format
 msgid "OPR_AND (logical and)\n"
 msgstr "OPR_AND (logisk og)\n"
 
-#: vms-alpha.c:6157
+#: vms-alpha.c:6072
 #, c-format
 msgid "OPR_IOR (logical inclusive or)\n"
 msgstr "OPR_IOR (logisk inklusiv eller)\n"
 
-#: vms-alpha.c:6160
+#: vms-alpha.c:6075
 #, c-format
 msgid "OPR_EOR (logical exclusive or)\n"
 msgstr "OPR_EOR (logisk eksklusiv eller)\n"
 
-#: vms-alpha.c:6163
+#: vms-alpha.c:6078
 #, c-format
 msgid "OPR_NEG (negate)\n"
 msgstr "OPR_NEG (negation)\n"
 
-#: vms-alpha.c:6166
+#: vms-alpha.c:6081
 #, c-format
 msgid "OPR_COM (complement)\n"
 msgstr "OPR_COM (komplement)\n"
 
-#: vms-alpha.c:6169
+#: vms-alpha.c:6084
 #, c-format
 msgid "OPR_INSV (insert field)\n"
 msgstr "OPR_INSV (indsÃ¦t felt)\n"
 
-#: vms-alpha.c:6172
+#: vms-alpha.c:6087
 #, c-format
 msgid "OPR_ASH (arithmetic shift)\n"
 msgstr "OPR_ASH (aritmetisk skift)\n"
 
-#: vms-alpha.c:6175
+#: vms-alpha.c:6090
 #, c-format
 msgid "OPR_USH (unsigned shift)\n"
 msgstr "OPR_USH (skift uden fortegn)\n"
 
-#: vms-alpha.c:6178
+#: vms-alpha.c:6093
 #, c-format
 msgid "OPR_ROT (rotate)\n"
 msgstr "OPR_ROT (rotÃ©r)\n"
 
-#: vms-alpha.c:6181
+#: vms-alpha.c:6096
 #, c-format
 msgid "OPR_SEL (select)\n"
 msgstr "OPR_SEL (vÃ¦lg)\n"
 
-#: vms-alpha.c:6184
+#: vms-alpha.c:6099
 #, c-format
 msgid "OPR_REDEF (redefine symbol to curr location)\n"
 msgstr "OPR_REDEF (omdefinÃ©r symbol til nuvÃ¦rende placering)\n"
 
-#: vms-alpha.c:6187
+#: vms-alpha.c:6102
 #, c-format
 msgid "OPR_REDEF (define a literal)\n"
 msgstr "OPR_REDEF (definÃ©r en literal)\n"
 
-#: vms-alpha.c:6191
+#: vms-alpha.c:6106
 #, c-format
 msgid "STC_LP (store cond linkage pair)\n"
-msgstr "STC_LP (gem cond-lÃ¦nkningspar)\n"
+msgstr "STC_LP (gem cond-linkingpar)\n"
 
-#: vms-alpha.c:6195
+#: vms-alpha.c:6110
 #, c-format
 msgid "STC_LP_PSB (store cond linkage pair + signature)\n"
-msgstr "STC_LP_PSB (gem cond-lÃ¦nkningspar + signatur)\n"
+msgstr "STC_LP_PSB (gem cond-linkingpar + signatur)\n"
 
-#: vms-alpha.c:6196
+#: vms-alpha.c:6111
 #, c-format
 msgid "   linkage index: %u, procedure: %.*s\n"
-msgstr "   lÃ¦nkningsindeks: %u, procedure: %.*s\n"
+msgstr "   linkingsindeks: %u, procedure: %.*s\n"
 
-#: vms-alpha.c:6199
+#: vms-alpha.c:6114
 #, c-format
 msgid "   signature: %.*s\n"
 msgstr "   signatur: %.*s\n"
 
-#: vms-alpha.c:6202
+#: vms-alpha.c:6117
 #, c-format
 msgid "STC_GBL (store cond global)\n"
 msgstr "STC_GBL (gem cond globalt)\n"
 
-#: vms-alpha.c:6203
+#: vms-alpha.c:6118
 #, c-format
 msgid "   linkage index: %u, global: %.*s\n"
-msgstr "   lÃ¦nkningsindeks: %u, global: %.*s\n"
+msgstr "   linkingsindeks: %u, global: %.*s\n"
 
-#: vms-alpha.c:6207
+#: vms-alpha.c:6122
 #, c-format
 msgid "STC_GCA (store cond code address)\n"
 msgstr "STC_GCA (gem cond-kodeadresse)\n"
 
-#: vms-alpha.c:6208
+#: vms-alpha.c:6123
 #, c-format
 msgid "   linkage index: %u, procedure name: %.*s\n"
-msgstr "   lÃ¦nkningsindeks: %u, procedurenavn: %.*s\n"
+msgstr "   linkingsindeks: %u, procedurenavn: %.*s\n"
 
-#: vms-alpha.c:6212
+#: vms-alpha.c:6127
 #, c-format
 msgid "STC_PS (store cond psect + offset)\n"
 msgstr "STC_PS (gem cond-psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6214
+#: vms-alpha.c:6129
 #, c-format
 msgid "   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"
-msgstr "   lÃ¦nkningsindeks: %u, psect: %u, afsÃ¦t: 0x%08x %08x\n"
+msgstr "   linkingsindeks: %u, psect: %u, afsÃ¦t: 0x%08x %08x\n"
 
-#: vms-alpha.c:6221
+#: vms-alpha.c:6136
 #, c-format
 msgid "STC_NOP_GBL (store cond NOP at global addr)\n"
 msgstr "STC_NOP_GBL (gem cond NOP pÃ¥ global adresse)\n"
 
-#: vms-alpha.c:6225
+#: vms-alpha.c:6140
 #, c-format
 msgid "STC_NOP_PS (store cond NOP at psect + offset)\n"
 msgstr "STC_NOP_PS (gem cond NOP pÃ¥ psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6229
+#: vms-alpha.c:6144
 #, c-format
 msgid "STC_BSR_GBL (store cond BSR at global addr)\n"
 msgstr "STC_BSR_GBL (gem cond BSR pÃ¥ global adresse)\n"
 
-#: vms-alpha.c:6233
+#: vms-alpha.c:6148
 #, c-format
 msgid "STC_BSR_PS (store cond BSR at psect + offset)\n"
 msgstr "STC_BSR_PS (gem cond BSR pÃ¥ psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6237
+#: vms-alpha.c:6152
 #, c-format
 msgid "STC_LDA_GBL (store cond LDA at global addr)\n"
 msgstr "STC_LDA_GBL (gem cond LDA pÃ¥ global adresse)\n"
 
-#: vms-alpha.c:6241
+#: vms-alpha.c:6156
 #, c-format
 msgid "STC_LDA_PS (store cond LDA at psect + offset)\n"
 msgstr "STC_LDA_PS (gem cond LDA pÃ¥ psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6245
+#: vms-alpha.c:6160
 #, c-format
 msgid "STC_BOH_GBL (store cond BOH at global addr)\n"
 msgstr "STC_BOH_GBL (gem cond BOH pÃ¥ global adresse)\n"
 
-#: vms-alpha.c:6249
+#: vms-alpha.c:6164
 #, c-format
 msgid "STC_BOH_PS (store cond BOH at psect + offset)\n"
 msgstr "STC_BOH_PS (gem cond BOH pÃ¥ psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6254
+#: vms-alpha.c:6169
 #, c-format
 msgid "STC_NBH_GBL (store cond or hint at global addr)\n"
 msgstr "STC_NBH_GBL (gem cond eller hint pÃ¥ global adresse)\n"
 
-#: vms-alpha.c:6258
+#: vms-alpha.c:6173
 #, c-format
 msgid "STC_NBH_PS (store cond or hint at psect + offset)\n"
 msgstr "STC_NBH_PS (gem cond eller hint pÃ¥ psect + afsÃ¦t)\n"
 
-#: vms-alpha.c:6262
+#: vms-alpha.c:6177
 #, c-format
 msgid "CTL_SETRB (set relocation base)\n"
 msgstr "CTL_SETRB (sÃ¦t relokeringsbase)\n"
 
-#: vms-alpha.c:6268
+#: vms-alpha.c:6183
 #, c-format
 msgid "CTL_AUGRB (augment relocation base) %u\n"
 msgstr "CTL_AUGRB (sammensÃ¦t (augment) relokeringsbase) %u\n"
 
-#: vms-alpha.c:6272
+#: vms-alpha.c:6187
 #, c-format
 msgid "CTL_DFLOC (define location)\n"
 msgstr "CTL_DFLOC (defineÅ• placering)\n"
 
-#: vms-alpha.c:6275
+#: vms-alpha.c:6190
 #, c-format
 msgid "CTL_STLOC (set location)\n"
 msgstr "CTL_STLOC (indstil placering)\n"
 
-#: vms-alpha.c:6278
+#: vms-alpha.c:6193
 #, c-format
 msgid "CTL_STKDL (stack defined location)\n"
 msgstr "CTL_STKDL (stakdefineret placering)\n"
 
-#: vms-alpha.c:6281 vms-alpha.c:6695
+#: vms-alpha.c:6196 vms-alpha.c:6610
 #, c-format
 msgid "*unhandled*\n"
 msgstr "*uhÃ¥ndteret*\n"
 
-#: vms-alpha.c:6311 vms-alpha.c:6350
+#: vms-alpha.c:6226 vms-alpha.c:6265
 #, c-format
 msgid "cannot read GST record length\n"
 msgstr "kan ikke lÃ¦se GST-post-lÃ¦ngde\n"
 
 #. Ill-formed.
-#: vms-alpha.c:6332
+#: vms-alpha.c:6247
 #, c-format
 msgid "cannot find EMH in first GST record\n"
 msgstr "kan ikke finde EMH i fÃ¸rste GST-post\n"
 
-#: vms-alpha.c:6358
+#: vms-alpha.c:6273
 #, c-format
 msgid "cannot read GST record header\n"
 msgstr "kan ikke lÃ¦se GST-post-header\n"
 
-#: vms-alpha.c:6371
+#: vms-alpha.c:6286
 #, c-format
 msgid " corrupted GST\n"
 msgstr " beskadiget GST\n"
 
-#: vms-alpha.c:6379
+#: vms-alpha.c:6294
 #, c-format
 msgid "cannot read GST record\n"
 msgstr "kan ikke lÃ¦se GST-post\n"
 
-#: vms-alpha.c:6408
+#: vms-alpha.c:6323
 #, c-format
 msgid " unhandled EOBJ record type %u\n"
 msgstr " uhÃ¥ndteret EOBJ-post-type %u\n"
 
-#: vms-alpha.c:6431
+#: vms-alpha.c:6346
 #, c-format
 msgid "  bitcount: %u, base addr: 0x%08x\n"
 msgstr "  antal bit: %u, basisadresse: 0x%08x\n"
 
-#: vms-alpha.c:6444
+#: vms-alpha.c:6359
 #, c-format
 msgid "   bitmap: 0x%08x (count: %u):\n"
 msgstr "   bitmap: 0x%08x (antal: %u):\n"
 
-#: vms-alpha.c:6451
+#: vms-alpha.c:6366
 #, c-format
 msgid " %08x"
 msgstr " %08x"
 
-#: vms-alpha.c:6476
+#: vms-alpha.c:6391
 #, c-format
 msgid "  image %u (%u entries)\n"
 msgstr "  aftryk %u (%u elementer)\n"
 
-#: vms-alpha.c:6481
+#: vms-alpha.c:6396
 #, c-format
 msgid "   offset: 0x%08x, val: 0x%08x\n"
 msgstr "   afsÃ¦t: 0x%08x, vÃ¦rdi: 0x%08x\n"
 
-#: vms-alpha.c:6502
+#: vms-alpha.c:6417
 #, c-format
 msgid "  image %u (%u entries), offsets:\n"
 msgstr "  aftryk %u (%u elementer), afsÃ¦t:\n"
 
-#: vms-alpha.c:6509
+#: vms-alpha.c:6424
 #, c-format
 msgid " 0x%08x"
 msgstr " 0x%08x"
 
 #. 64 bits.
-#: vms-alpha.c:6631
+#: vms-alpha.c:6546
 #, c-format
 msgid "64 bits *unhandled*\n"
 msgstr "64 bit *uhÃ¥ndteret*\n"
 
-#: vms-alpha.c:6635
+#: vms-alpha.c:6550
 #, c-format
 msgid "class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"
 msgstr "klasse: %u, dtype: %u, lÃ¦ngde: %u, pointer: 0x%08x\n"
 
-#: vms-alpha.c:6646
+#: vms-alpha.c:6561
 #, c-format
 msgid "non-contiguous array of %s\n"
 msgstr "usammenhÃ¦ngende array af %s\n"
 
-#: vms-alpha.c:6650
+#: vms-alpha.c:6565
 #, c-format
 msgid "dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"
 msgstr "dimct: %u, aflags: 0x%02x, cifre: %u, skala: %u\n"
 
-#: vms-alpha.c:6654
+#: vms-alpha.c:6569
 #, c-format
 msgid "arsize: %u, a0: 0x%08x\n"
 msgstr "arsize: %u, a0: 0x%08x\n"
 
-#: vms-alpha.c:6658
+#: vms-alpha.c:6573
 #, c-format
 msgid "Strides:\n"
 msgstr "TrinstÃ¸rrelser:\n"
 
-#: vms-alpha.c:6663
+#: vms-alpha.c:6578
 #, c-format
 msgid "[%u]: %u\n"
 msgstr "[%u]: %u\n"
 
-#: vms-alpha.c:6668
+#: vms-alpha.c:6583
 #, c-format
 msgid "Bounds:\n"
 msgstr "GrÃ¦nser:\n"
 
-#: vms-alpha.c:6673
+#: vms-alpha.c:6588
 #, c-format
 msgid "[%u]: Lower: %u, upper: %u\n"
 msgstr "[%u]: Nedre: %u, Ã¸vre: %u\n"
 
-#: vms-alpha.c:6685
+#: vms-alpha.c:6600
 #, c-format
 msgid "unaligned bit-string of %s\n"
 msgstr "ujusteret bit-streng af %s\n"
 
-#: vms-alpha.c:6689
+#: vms-alpha.c:6604
 #, c-format
 msgid "base: %u, pos: %u\n"
 msgstr "base: %u, pos: %u\n"
 
-#: vms-alpha.c:6709
+#: vms-alpha.c:6624
 #, c-format
 msgid "vflags: 0x%02x, value: 0x%08x "
 msgstr "vflags: 0x%02x, vÃ¦rdi: 0x%08x "
 
-#: vms-alpha.c:6715
+#: vms-alpha.c:6630
 #, c-format
 msgid "(no value)\n"
 msgstr "(ingen vÃ¦rdi)\n"
 
-#: vms-alpha.c:6718
+#: vms-alpha.c:6633
 #, c-format
 msgid "(not active)\n"
 msgstr "(ikke aktiv)\n"
 
-#: vms-alpha.c:6721
+#: vms-alpha.c:6636
 #, c-format
 msgid "(not allocated)\n"
 msgstr "(ikke tildelt)\n"
 
-#: vms-alpha.c:6724
+#: vms-alpha.c:6639
 #, c-format
 msgid "(descriptor)\n"
 msgstr "(deskriptor)\n"
 
-#: vms-alpha.c:6728
+#: vms-alpha.c:6643
 #, c-format
 msgid "(trailing value)\n"
 msgstr "(afsluttende vÃ¦rdi)\n"
 
-#: vms-alpha.c:6731
+#: vms-alpha.c:6646
 #, c-format
 msgid "(value spec follows)\n"
 msgstr "(vÃ¦rdi-spec fÃ¸lger)\n"
 
-#: vms-alpha.c:6734
+#: vms-alpha.c:6649
 #, c-format
 msgid "(at bit offset %u)\n"
 msgstr "(ved bitafsÃ¦t %u)\n"
 
-#: vms-alpha.c:6737
+#: vms-alpha.c:6652
 #, c-format
 msgid "(reg: %u, disp: %u, indir: %u, kind: "
 msgstr "(reg: %u, disp: %u, indir: %u, type: "
 
-#: vms-alpha.c:6744
+#: vms-alpha.c:6659
 msgid "literal"
 msgstr "literal"
 
-#: vms-alpha.c:6747
+#: vms-alpha.c:6662
 msgid "address"
 msgstr "adresse"
 
-#: vms-alpha.c:6750
+#: vms-alpha.c:6665
 msgid "desc"
 msgstr "beskr"
 
-#: vms-alpha.c:6753
+#: vms-alpha.c:6668
 msgid "reg"
 msgstr "reg"
 
-#: vms-alpha.c:6828
+#: vms-alpha.c:6743
 #, c-format
 msgid "Debug symbol table:\n"
 msgstr "FejlsÃ¸gningssymboltabel:\n"
 
-#: vms-alpha.c:6839
+#: vms-alpha.c:6754
 #, c-format
 msgid "cannot read DST header\n"
 msgstr "kan ikke lÃ¦se DST-header\n"
 
-#: vms-alpha.c:6844
+#: vms-alpha.c:6759
 #, c-format
 msgid " type: %3u, len: %3u (at 0x%08x): "
 msgstr " type: %3u, lÃ¦ngde: %3u (pÃ¥ 0x%08x): "
 
-#: vms-alpha.c:6858
+#: vms-alpha.c:6773
 #, c-format
 msgid "cannot read DST symbol\n"
 msgstr "kan ikke lÃ¦se DST-symbol\n"
 
-#: vms-alpha.c:6901
+#: vms-alpha.c:6816
 #, c-format
 msgid "standard data: %s\n"
 msgstr "standarddata : %s\n"
 
-#: vms-alpha.c:6904 vms-alpha.c:6988
+#: vms-alpha.c:6819 vms-alpha.c:6903
 #, c-format
 msgid "    name: %.*s\n"
 msgstr "    navn: %.*s\n"
 
-#: vms-alpha.c:6911
+#: vms-alpha.c:6826
 #, c-format
 msgid "modbeg\n"
 msgstr "modbeg\n"
 
-#: vms-alpha.c:6912
+#: vms-alpha.c:6827
 #, c-format
 msgid "   flags: %d, language: %u, major: %u, minor: %u\n"
 msgstr "   flag: %d, sprog: %u, hoved: %u, under: %u\n"
 
-#: vms-alpha.c:6918 vms-alpha.c:7184
+#: vms-alpha.c:6833 vms-alpha.c:7099
 #, c-format
 msgid "   module name: %.*s\n"
 msgstr "   modulnavn : %.*s\n"
 
-#: vms-alpha.c:6921
+#: vms-alpha.c:6836
 #, c-format
 msgid "   compiler   : %.*s\n"
 msgstr "   kompiler   : %.*s\n"
 
-#: vms-alpha.c:6926
+#: vms-alpha.c:6841
 #, c-format
 msgid "modend\n"
 msgstr "modend\n"
 
-#: vms-alpha.c:6933
+#: vms-alpha.c:6848
 msgid "rtnbeg\n"
 msgstr "rtnbeg\n"
 
-#: vms-alpha.c:6934
+#: vms-alpha.c:6849
 #, c-format
 msgid "    flags: %u, address: 0x%08x, pd-address: 0x%08x\n"
 msgstr "    flag: %u, adresse: 0x%08x, pd-adresse: 0x%08x\n"
 
-#: vms-alpha.c:6939
+#: vms-alpha.c:6854
 #, c-format
 msgid "    routine name: %.*s\n"
 msgstr "    rutinenavn: %.*s\n"
 
-#: vms-alpha.c:6947
+#: vms-alpha.c:6862
 #, c-format
 msgid "rtnend: size 0x%08x\n"
 msgstr "rtnend: stÃ¸rrelse 0x%08x\n"
 
-#: vms-alpha.c:6955
+#: vms-alpha.c:6870
 #, c-format
 msgid "prolog: bkpt address 0x%08x\n"
 msgstr "prolog: bkpt-adresse 0x%08x\n"
 
-#: vms-alpha.c:6963
+#: vms-alpha.c:6878
 #, c-format
 msgid "epilog: flags: %u, count: %u\n"
 msgstr "epilog: flag: %u, antal: %u\n"
 
-#: vms-alpha.c:6972
+#: vms-alpha.c:6887
 #, c-format
 msgid "blkbeg: address: 0x%08x, name: %.*s\n"
 msgstr "blkbeg: adresse: 0x%08x, navn: %.*s\n"
 
-#: vms-alpha.c:6981
+#: vms-alpha.c:6896
 #, c-format
 msgid "blkend: size: 0x%08x\n"
 msgstr "blkend: stÃ¸rrelse: 0x%08x\n"
 
-#: vms-alpha.c:6987
+#: vms-alpha.c:6902
 #, c-format
 msgid "typspec (len: %u)\n"
 msgstr "typspec (lÃ¦ngde: %u)\n"
 
-#: vms-alpha.c:6994
+#: vms-alpha.c:6909
 #, c-format
 msgid "septyp, name: %.*s\n"
 msgstr "septyp, navn: %.*s\n"
 
-#: vms-alpha.c:7003
+#: vms-alpha.c:6918
 #, c-format
 msgid "recbeg: name: %.*s\n"
 msgstr "recbeg: navn: %.*s\n"
 
-#: vms-alpha.c:7010
+#: vms-alpha.c:6925
 #, c-format
 msgid "recend\n"
 msgstr "recend\n"
 
-#: vms-alpha.c:7013
+#: vms-alpha.c:6928
 #, c-format
 msgid "enumbeg, len: %u, name: %.*s\n"
 msgstr "enumbeg, lÃ¦ngde: %u, navn: %.*s\n"
 
-#: vms-alpha.c:7017
+#: vms-alpha.c:6932
 #, c-format
 msgid "enumelt, name: %.*s\n"
 msgstr "enumelt, navn: %.*s\n"
 
-#: vms-alpha.c:7021
+#: vms-alpha.c:6936
 #, c-format
 msgid "enumend\n"
 msgstr "enumend\n"
 
-#: vms-alpha.c:7038
+#: vms-alpha.c:6953
 #, c-format
 msgid "discontiguous range (nbr: %u)\n"
 msgstr "usammenhÃ¦ngende interval (nbr: %u)\n"
 
-#: vms-alpha.c:7040
+#: vms-alpha.c:6955
 #, c-format
 msgid "    address: 0x%08x, size: %u\n"
 msgstr "    adresse: 0x%08x, stÃ¸rrelse: %u\n"
 
-#: vms-alpha.c:7050
+#: vms-alpha.c:6965
 #, c-format
 msgid "line num  (len: %u)\n"
 msgstr "linjenummer  (lÃ¦ngde: %u)\n"
 
-#: vms-alpha.c:7067
+#: vms-alpha.c:6982
 #, c-format
 msgid "delta_pc_w %u\n"
 msgstr "delta_pc_w %u\n"
 
-#: vms-alpha.c:7074
+#: vms-alpha.c:6989
 #, c-format
 msgid "incr_linum(b): +%u\n"
 msgstr "incr_linum(b): +%u\n"
 
-#: vms-alpha.c:7080
+#: vms-alpha.c:6995
 #, c-format
 msgid "incr_linum_w: +%u\n"
 msgstr "incr_linum_w: +%u\n"
 
-#: vms-alpha.c:7086
+#: vms-alpha.c:7001
 #, c-format
 msgid "incr_linum_l: +%u\n"
 msgstr "incr_linum_l: +%u\n"
 
-#: vms-alpha.c:7092
+#: vms-alpha.c:7007
 #, c-format
 msgid "set_line_num(w) %u\n"
 msgstr "set_line_num(w) %u\n"
 
-#: vms-alpha.c:7097
+#: vms-alpha.c:7012
 #, c-format
 msgid "set_line_num_b %u\n"
 msgstr "set_line_num_b %u\n"
 
-#: vms-alpha.c:7102
+#: vms-alpha.c:7017
 #, c-format
 msgid "set_line_num_l %u\n"
 msgstr "set_line_num_l %u\n"
 
-#: vms-alpha.c:7107
+#: vms-alpha.c:7022
 #, c-format
 msgid "set_abs_pc: 0x%08x\n"
 msgstr "set_abs_pc: 0x%08x\n"
 
-#: vms-alpha.c:7111
+#: vms-alpha.c:7026
 #, c-format
 msgid "delta_pc_l: +0x%08x\n"
 msgstr "delta_pc_l: +0x%08x\n"
 
-#: vms-alpha.c:7116
+#: vms-alpha.c:7031
 #, c-format
 msgid "term(b): 0x%02x"
 msgstr "term(b): 0x%02x"
 
-#: vms-alpha.c:7118
+#: vms-alpha.c:7033
 #, c-format
 msgid "        pc: 0x%08x\n"
 msgstr "        pc: 0x%08x\n"
 
-#: vms-alpha.c:7123
+#: vms-alpha.c:7038
 #, c-format
 msgid "term_w: 0x%04x"
 msgstr "term_w: 0x%04x"
 
-#: vms-alpha.c:7125
+#: vms-alpha.c:7040
 #, c-format
 msgid "    pc: 0x%08x\n"
 msgstr "    pc: 0x%08x\n"
 
-#: vms-alpha.c:7131
+#: vms-alpha.c:7046
 #, c-format
 msgid "delta pc +%-4d"
 msgstr "delta pc +%-4d"
 
-#: vms-alpha.c:7134
+#: vms-alpha.c:7049
 #, c-format
 msgid "    pc: 0x%08x line: %5u\n"
 msgstr "    pc: 0x%08x linje: %5u\n"
 
-#: vms-alpha.c:7139
+#: vms-alpha.c:7054
 #, c-format
 msgid "    *unhandled* cmd %u\n"
 msgstr "    *uhÃ¥ndteret* kommando %u\n"
 
-#: vms-alpha.c:7154
+#: vms-alpha.c:7069
 #, c-format
 msgid "source (len: %u)\n"
 msgstr "kilde (lÃ¦ngde: %u)\n"
 
-#: vms-alpha.c:7168
+#: vms-alpha.c:7083
 #, c-format
 msgid "   declfile: len: %u, flags: %u, fileid: %u\n"
 msgstr "   declfile: lÃ¦ngde: %u, flag: %u, fil-id: %u\n"
 
-#: vms-alpha.c:7172
+#: vms-alpha.c:7087
 #, c-format
 msgid "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
 msgstr "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
 
-#: vms-alpha.c:7181
+#: vms-alpha.c:7096
 #, c-format
 msgid "   filename   : %.*s\n"
 msgstr "   filnavn    : %.*s\n"
 
-#: vms-alpha.c:7190
+#: vms-alpha.c:7105
 #, c-format
 msgid "   setfile %u\n"
 msgstr "   setfile %u\n"
 
-#: vms-alpha.c:7195 vms-alpha.c:7200
+#: vms-alpha.c:7110 vms-alpha.c:7115
 #, c-format
 msgid "   setrec %u\n"
 msgstr "   setrec %u\n"
 
-#: vms-alpha.c:7205 vms-alpha.c:7210
+#: vms-alpha.c:7120 vms-alpha.c:7125
 #, c-format
 msgid "   setlnum %u\n"
 msgstr "   setlnum %u\n"
 
-#: vms-alpha.c:7215 vms-alpha.c:7220
+#: vms-alpha.c:7130 vms-alpha.c:7135
 #, c-format
 msgid "   deflines %u\n"
 msgstr "   deflines %u\n"
 
-#: vms-alpha.c:7224
+#: vms-alpha.c:7139
 #, c-format
 msgid "   formfeed\n"
 msgstr "   formfeed\n"
 
-#: vms-alpha.c:7228
+#: vms-alpha.c:7143
 #, c-format
 msgid "   *unhandled* cmd %u\n"
 msgstr "   *uhÃ¥ndteret* kommando %u\n"
 
-#: vms-alpha.c:7240
+#: vms-alpha.c:7155
 #, c-format
 msgid "*unhandled* dst type %u\n"
 msgstr "*uhÃ¥ndteret dst-type %u\n"
 
-#: vms-alpha.c:7272
+#: vms-alpha.c:7187
 #, c-format
 msgid "cannot read EIHD\n"
 msgstr "kan ikke lÃ¦se EIHD\n"
 
-#: vms-alpha.c:7275
+#: vms-alpha.c:7190
 #, c-format
 msgid "EIHD: (size: %u, nbr blocks: %u)\n"
 msgstr "EIHD: (stÃ¸rrelse: %u, bloktal: %u)\n"
 
-#: vms-alpha.c:7278
+#: vms-alpha.c:7193
 #, c-format
 msgid " majorid: %u, minorid: %u\n"
 msgstr " hovednr: %u, undernr: %u\n"
 
-#: vms-alpha.c:7286
+#: vms-alpha.c:7201
 msgid "executable"
 msgstr "eksekverbar fil"
 
-#: vms-alpha.c:7289
+#: vms-alpha.c:7204
 msgid "linkable image"
-msgstr "lÃ¦nkbart aftryk"
+msgstr "linkbart aftryk"
 
-#: vms-alpha.c:7295
+#: vms-alpha.c:7210
 #, c-format
 msgid " image type: %u (%s)"
 msgstr " aftrykstype: %u (%s)"
 
-#: vms-alpha.c:7301
+#: vms-alpha.c:7216
 msgid "native"
 msgstr "native"
 
-#: vms-alpha.c:7304
+#: vms-alpha.c:7219
 msgid "CLI"
 msgstr "CLI"
 
-#: vms-alpha.c:7310
+#: vms-alpha.c:7225
 #, c-format
 msgid ", subtype: %u (%s)\n"
 msgstr ", undertype: %u (%s)\n"
 
-#: vms-alpha.c:7316
+#: vms-alpha.c:7231
 #, c-format
 msgid " offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u\n"
 msgstr " afsÃ¦t: isd: %u, aktiv: %u, symdbg: %u, imgid: %u, patch: %u\n"
 
-#: vms-alpha.c:7320
+#: vms-alpha.c:7235
 #, c-format
 msgid " fixup info rva: "
 msgstr " fixup info-rva: "
 
-#: vms-alpha.c:7322
+#: vms-alpha.c:7237
 #, c-format
 msgid ", symbol vector rva: "
 msgstr ", symbolvektor-rva: "
 
-#: vms-alpha.c:7325
+#: vms-alpha.c:7240
 #, c-format
 msgid ""
 "\n"
@@ -4978,467 +5666,471 @@ msgstr ""
 "\n"
 " versions-arrayafsÃ¦t: %u\n"
 
-#: vms-alpha.c:7329
+#: vms-alpha.c:7244
 #, c-format
 msgid " img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"
 msgstr " img-I/O-tal: %u, antal kanaler: %u, req pri: %08x%08x\n"
 
-#: vms-alpha.c:7335
+#: vms-alpha.c:7250
 #, c-format
 msgid " linker flags: %08x:"
-msgstr " lÃ¦nkerflag: %08x:"
+msgstr " linkerflag: %08x:"
 
-#: vms-alpha.c:7365
+#: vms-alpha.c:7280
 #, c-format
 msgid " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
 msgstr " ident: 0x%08x, sysver: 0x%08x, match-ktrl: %u, symvect_size: %u\n"
 
-#: vms-alpha.c:7371
+#: vms-alpha.c:7286
 #, c-format
 msgid " BPAGE: %u"
 msgstr " BPAGE: %u"
 
-#: vms-alpha.c:7377
+#: vms-alpha.c:7292
 #, c-format
 msgid ", ext fixup offset: %u, no_opt psect off: %u"
 msgstr ", ext-fixup-afsÃ¦t: %u, no_opt psect slÃ¥et fra: %u"
 
-#: vms-alpha.c:7380
+#: vms-alpha.c:7295
 #, c-format
 msgid ", alias: %u\n"
 msgstr ", alias: %u\n"
 
-#: vms-alpha.c:7388
+#: vms-alpha.c:7303
 #, c-format
 msgid "system version array information:\n"
 msgstr "arrayinformation om systemversion:\n"
 
-#: vms-alpha.c:7392
+#: vms-alpha.c:7307
 #, c-format
 msgid "cannot read EIHVN header\n"
 msgstr "kan ikke lÃ¦se EIHVN-header\n"
 
-#: vms-alpha.c:7402
+#: vms-alpha.c:7317
 #, c-format
 msgid "cannot read EIHVN version\n"
 msgstr "kan ikke lÃ¦se EIHVN-version\n"
 
-#: vms-alpha.c:7405
+#: vms-alpha.c:7320
 #, c-format
 msgid "   %02u "
 msgstr "   %02u "
 
 # ?
-#: vms-alpha.c:7409
+#: vms-alpha.c:7324
 msgid "BASE_IMAGE       "
 msgstr "BASE_IMAGE       "
 
-#: vms-alpha.c:7412
+#: vms-alpha.c:7327
 msgid "MEMORY_MANAGEMENT"
 msgstr "MEMORY_MANAGEMENT"
 
-#: vms-alpha.c:7415
+#: vms-alpha.c:7330
 msgid "IO               "
 msgstr "IO               "
 
-#: vms-alpha.c:7418
+#: vms-alpha.c:7333
 msgid "FILES_VOLUMES    "
 msgstr "FILES_VOLUMES    "
 
-#: vms-alpha.c:7421
+#: vms-alpha.c:7336
 msgid "PROCESS_SCHED    "
 msgstr "PROCESS_SCHED    "
 
-#: vms-alpha.c:7424
+#: vms-alpha.c:7339
 msgid "SYSGEN           "
 msgstr "SYSGEN           "
 
-#: vms-alpha.c:7427
+#: vms-alpha.c:7342
 msgid "CLUSTERS_LOCKMGR "
 msgstr "CLUSTERS_LOCKMGR "
 
-#: vms-alpha.c:7430
+#: vms-alpha.c:7345
 msgid "LOGICAL_NAMES    "
 msgstr "LOGICAL_NAMES    "
 
-#: vms-alpha.c:7433
+#: vms-alpha.c:7348
 msgid "SECURITY         "
 msgstr "SECURITY         "
 
-#: vms-alpha.c:7436
+#: vms-alpha.c:7351
 msgid "IMAGE_ACTIVATOR  "
 msgstr "IMAGE_ACTIVATOR  "
 
-#: vms-alpha.c:7439
+#: vms-alpha.c:7354
 msgid "NETWORKS         "
 msgstr "NETWORKS         "
 
-#: vms-alpha.c:7442
+#: vms-alpha.c:7357
 msgid "COUNTERS         "
 msgstr "COUNTERS         "
 
-#: vms-alpha.c:7445
+#: vms-alpha.c:7360
 msgid "STABLE           "
 msgstr "STABLE           "
 
-#: vms-alpha.c:7448
+#: vms-alpha.c:7363
 msgid "MISC             "
 msgstr "MISC             "
 
-#: vms-alpha.c:7451
+#: vms-alpha.c:7366
 msgid "CPU              "
 msgstr "CPU              "
 
-#: vms-alpha.c:7454
+#: vms-alpha.c:7369
 msgid "VOLATILE         "
 msgstr "VOLATILE         "
 
-#: vms-alpha.c:7457
+#: vms-alpha.c:7372
 msgid "SHELL            "
 msgstr "SHELL            "
 
-#: vms-alpha.c:7460
+#: vms-alpha.c:7375
 msgid "POSIX            "
 msgstr "POSIX            "
 
-#: vms-alpha.c:7463
+#: vms-alpha.c:7378
 msgid "MULTI_PROCESSING "
 msgstr "MULTI_PROCESSING "
 
-#: vms-alpha.c:7466
+#: vms-alpha.c:7381
 msgid "GALAXY           "
 msgstr "GALAXY           "
 
-#: vms-alpha.c:7469
+#: vms-alpha.c:7384
 msgid "*unknown*        "
 msgstr "*ukendt*         "
 
-#: vms-alpha.c:7472
+#: vms-alpha.c:7387
 #, c-format
 msgid ": %u.%u\n"
 msgstr ": %u.%u\n"
 
-#: vms-alpha.c:7485 vms-alpha.c:7744
+#: vms-alpha.c:7400 vms-alpha.c:7659
 #, c-format
 msgid "cannot read EIHA\n"
 msgstr "kan ikke lÃ¦se EIHA\n"
 
-#: vms-alpha.c:7488
+#: vms-alpha.c:7403
 #, c-format
 msgid "Image activation:  (size=%u)\n"
 msgstr "Aftryksaktivering:  (stÃ¸rrelse=%u)\n"
 
 # Den her og de nedenstÃ¥ende skal tilsyneladende passe sammen med placering af kolon
-#: vms-alpha.c:7490
+#: vms-alpha.c:7405
 #, c-format
 msgid " First address : 0x%08x 0x%08x\n"
 msgstr " FÃ¸rste adresse: 0x%08x 0x%08x\n"
 
-#: vms-alpha.c:7493
+#: vms-alpha.c:7408
 #, c-format
 msgid " Second address: 0x%08x 0x%08x\n"
 msgstr " Anden adresse : 0x%08x 0x%08x\n"
 
-#: vms-alpha.c:7496
+#: vms-alpha.c:7411
 #, c-format
 msgid " Third address : 0x%08x 0x%08x\n"
 msgstr " Tredje adresse: 0x%08x 0x%08x\n"
 
-#: vms-alpha.c:7499
+#: vms-alpha.c:7414
 #, c-format
 msgid " Fourth address: 0x%08x 0x%08x\n"
 msgstr " Fjerde adresse: 0x%08x 0x%08x\n"
 
-#: vms-alpha.c:7502
+#: vms-alpha.c:7417
 #, c-format
 msgid " Shared image  : 0x%08x 0x%08x\n"
 msgstr " Delt aftryk   : 0x%08x 0x%08x\n"
 
-#: vms-alpha.c:7513
+#: vms-alpha.c:7428
 #, c-format
 msgid "cannot read EIHI\n"
 msgstr "kan ikke lÃ¦se EIHI\n"
 
-#: vms-alpha.c:7516
+#: vms-alpha.c:7431
 #, c-format
 msgid "Image identification: (major: %u, minor: %u)\n"
 msgstr "Aftryksidentifikation: (hoved: %u, under: %u)\n"
 
-#: vms-alpha.c:7519
+#: vms-alpha.c:7434
 #, c-format
 msgid " image name       : %.*s\n"
 msgstr " aftryksnavn      : %.*s\n"
 
-#: vms-alpha.c:7521
+#: vms-alpha.c:7436
 #, c-format
 msgid " link time        : %s\n"
-msgstr " lÃ¦nketidspunkt   : %s\n"
+msgstr " linktidspunkt   : %s\n"
 
-#: vms-alpha.c:7523
+#: vms-alpha.c:7438
 #, c-format
 msgid " image ident      : %.*s\n"
 msgstr " aftryks-id       : %.*s\n"
 
-#: vms-alpha.c:7525
+#: vms-alpha.c:7440
 #, c-format
 msgid " linker ident     : %.*s\n"
-msgstr " lÃ¦nker-id        : %.*s\n"
+msgstr " linker-id        : %.*s\n"
 
-#: vms-alpha.c:7527
+#: vms-alpha.c:7442
 #, c-format
 msgid " image build ident: %.*s\n"
 msgstr " aftryks bygge-id : %.*s\n"
 
-#: vms-alpha.c:7537
+#: vms-alpha.c:7452
 #, c-format
 msgid "cannot read EIHS\n"
 msgstr "kan ikke lÃ¦se EIHS\n"
 
-#: vms-alpha.c:7540
+#: vms-alpha.c:7455
 #, c-format
 msgid "Image symbol & debug table: (major: %u, minor: %u)\n"
 msgstr "Aftrykssymbol- og fejlsÃ¸gningstabel: (hoved: %u, under: %u)\n"
 
-#: vms-alpha.c:7545
+#: vms-alpha.c:7460
 #, c-format
 msgid " debug symbol table : vbn: %u, size: %u (0x%x)\n"
 msgstr " symboltabel til fejlsÃ¸gning : vbn: %u, stÃ¸rrelse: %u (0x%x)\n"
 
-#: vms-alpha.c:7549
+#: vms-alpha.c:7464
 #, c-format
 msgid " global symbol table: vbn: %u, records: %u\n"
 msgstr " global symboltabel: vbn: %u, poster: %u\n"
 
-#: vms-alpha.c:7553
+#: vms-alpha.c:7468
 #, c-format
 msgid " debug module table : vbn: %u, size: %u\n"
 msgstr " fejlsÃ¸gningsmodultabel : vbn: %u, stÃ¸rrelse: %u\n"
 
-#: vms-alpha.c:7566
+#: vms-alpha.c:7481
 #, c-format
 msgid "cannot read EISD\n"
 msgstr "kan ikke lÃ¦se EISD\n"
 
-#: vms-alpha.c:7576
+#: vms-alpha.c:7491
 #, c-format
 msgid "Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)\n"
-msgstr "Aftrykssektionsdeskriptor: (hoved: %u, under: %u, stÃ¸rrelse: %u, afsÃ¦t: %u)\n"
+msgstr "Aftryksafsnitsdeskriptor: (hoved: %u, under: %u, stÃ¸rrelse: %u, afsÃ¦t: %u)\n"
 
-#: vms-alpha.c:7583
+#: vms-alpha.c:7498
 #, c-format
 msgid " section: base: 0x%08x%08x size: 0x%08x\n"
-msgstr " sektion: base: 0x%08x%08x size: 0x%08x\n"
+msgstr " afsnit: base: 0x%08x%08x size: 0x%08x\n"
 
-#: vms-alpha.c:7588
+#: vms-alpha.c:7503
 #, c-format
 msgid " flags: 0x%04x"
 msgstr " flag: 0x%04x"
 
-#: vms-alpha.c:7625
+#: vms-alpha.c:7540
 #, c-format
 msgid " vbn: %u, pfc: %u, matchctl: %u type: %u ("
 msgstr " vbn: %u, pfc: %u, matchktl: %u type: %u ("
 
-#: vms-alpha.c:7631
+#: vms-alpha.c:7546
 msgid "NORMAL"
 msgstr "NORMAL"
 
-#: vms-alpha.c:7634
+#: vms-alpha.c:7549
 msgid "SHRFXD"
 msgstr "SHRFXD"
 
-#: vms-alpha.c:7637
+#: vms-alpha.c:7552
 msgid "PRVFXD"
 msgstr "PRVFXD"
 
-#: vms-alpha.c:7640
+#: vms-alpha.c:7555
 msgid "SHRPIC"
 msgstr "SHRPIC"
 
-#: vms-alpha.c:7643
+#: vms-alpha.c:7558
 msgid "PRVPIC"
 msgstr "PRVPIC"
 
-#: vms-alpha.c:7646
+#: vms-alpha.c:7561
 msgid "USRSTACK"
 msgstr "USRSTACK"
 
-#: vms-alpha.c:7654
+#: vms-alpha.c:7567
+msgid ")\n"
+msgstr ")\n"
+
+#: vms-alpha.c:7569
 #, c-format
 msgid " ident: 0x%08x, name: %.*s\n"
 msgstr " ident: 0x%08x, navn: %.*s\n"
 
-#: vms-alpha.c:7664
+#: vms-alpha.c:7579
 #, c-format
 msgid "cannot read DMT\n"
 msgstr "kan ikke lÃ¦se DMT\n"
 
-#: vms-alpha.c:7668
+#: vms-alpha.c:7583
 #, c-format
 msgid "Debug module table:\n"
 msgstr "FejlsÃ¸gningsmodultabel:\n"
 
-#: vms-alpha.c:7677
+#: vms-alpha.c:7592
 #, c-format
 msgid "cannot read DMT header\n"
 msgstr "kan ikke lÃ¦se DMT-header\n"
 
-#: vms-alpha.c:7682
+#: vms-alpha.c:7597
 #, c-format
 msgid " module offset: 0x%08x, size: 0x%08x, (%u psects)\n"
 msgstr " modulafsÃ¦t: 0x%08x, stÃ¸rrelse: 0x%08x, (%u psect'er)\n"
 
-#: vms-alpha.c:7692
+#: vms-alpha.c:7607
 #, c-format
 msgid "cannot read DMT psect\n"
 msgstr "kan ikke lÃ¦se DMT-psect\n"
 
-#: vms-alpha.c:7695
+#: vms-alpha.c:7610
 #, c-format
 msgid "  psect start: 0x%08x, length: %u\n"
 msgstr "  psect-start: 0x%08x, lÃ¦ngde: %u\n"
 
-#: vms-alpha.c:7708
+#: vms-alpha.c:7623
 #, c-format
 msgid "cannot read DST\n"
 msgstr "kan ikke lÃ¦se DST\n"
 
-#: vms-alpha.c:7718
+#: vms-alpha.c:7633
 #, c-format
 msgid "cannot read GST\n"
 msgstr "kan ikke lÃ¦se GST\n"
 
-#: vms-alpha.c:7722
+#: vms-alpha.c:7637
 #, c-format
 msgid "Global symbol table:\n"
 msgstr "Global symboltabel:\n"
 
-#: vms-alpha.c:7750
+#: vms-alpha.c:7665
 #, c-format
 msgid "Image activator fixup: (major: %u, minor: %u)\n"
 msgstr "Fixup til aftryksaktivator: (hoved: %u, under: %u)\n"
 
-#: vms-alpha.c:7753
+#: vms-alpha.c:7668
 #, c-format
 msgid "  iaflink : 0x%08x %08x\n"
 msgstr "  iaflink : 0x%08x %08x\n"
 
-#: vms-alpha.c:7756
+#: vms-alpha.c:7671
 #, c-format
 msgid "  fixuplnk: 0x%08x %08x\n"
 msgstr "  fixuplnk: 0x%08x %08x\n"
 
-#: vms-alpha.c:7759
+#: vms-alpha.c:7674
 #, c-format
 msgid "  size : %u\n"
 msgstr "  stÃ¸rrelse: %u\n"
 
-#: vms-alpha.c:7761
+#: vms-alpha.c:7676
 #, c-format
 msgid "  flags: 0x%08x\n"
 msgstr "  flag: 0x%08x\n"
 
-#: vms-alpha.c:7765
+#: vms-alpha.c:7680
 #, c-format
 msgid "  qrelfixoff: %5u, lrelfixoff: %5u\n"
 msgstr "  qrelfixoff: %5u, lrelfixoff: %5u\n"
 
-#: vms-alpha.c:7769
+#: vms-alpha.c:7684
 #, c-format
 msgid "  qdotadroff: %5u, ldotadroff: %5u\n"
 msgstr "  qdotadroff: %5u, ldotadroff: %5u\n"
 
-#: vms-alpha.c:7773
+#: vms-alpha.c:7688
 #, c-format
 msgid "  codeadroff: %5u, lpfixoff  : %5u\n"
 msgstr "  codeadroff: %5u, lpfixoff  : %5u\n"
 
-#: vms-alpha.c:7776
+#: vms-alpha.c:7691
 #, c-format
 msgid "  chgprtoff : %5u\n"
 msgstr "  chgprtoff : %5u\n"
 
-#: vms-alpha.c:7779
+#: vms-alpha.c:7694
 #, c-format
 msgid "  shlstoff  : %5u, shrimgcnt : %5u\n"
 msgstr "  shlstoff  : %5u, shrimgcnt : %5u\n"
 
-#: vms-alpha.c:7781
+#: vms-alpha.c:7696
 #, c-format
 msgid "  shlextra  : %5u, permctx   : %5u\n"
 msgstr "  shlextra  : %5u, permctx   : %5u\n"
 
-#: vms-alpha.c:7784
+#: vms-alpha.c:7699
 #, c-format
 msgid "  base_va : 0x%08x\n"
 msgstr "  base_va : 0x%08x\n"
 
-#: vms-alpha.c:7786
+#: vms-alpha.c:7701
 #, c-format
 msgid "  lppsbfixoff: %5u\n"
 msgstr "  lppsbfixoff: %5u\n"
 
-#: vms-alpha.c:7794
+#: vms-alpha.c:7709
 #, c-format
 msgid " Shareable images:\n"
 msgstr " Delelige aftryk:\n"
 
-#: vms-alpha.c:7798
+#: vms-alpha.c:7713
 #, c-format
 msgid "  %u: size: %u, flags: 0x%02x, name: %.*s\n"
 msgstr "  %u: stÃ¸rrelse: %u, flag: 0x%02x, navn: %.*s\n"
 
-#: vms-alpha.c:7805
+#: vms-alpha.c:7720
 #, c-format
 msgid " quad-word relocation fixups:\n"
 msgstr " fixup'er til quad-word-relokeringer:\n"
 
-#: vms-alpha.c:7810
+#: vms-alpha.c:7725
 #, c-format
 msgid " long-word relocation fixups:\n"
 msgstr " fixup'er til long-word-relokeringer:\n"
 
-#: vms-alpha.c:7815
+#: vms-alpha.c:7730
 #, c-format
 msgid " quad-word .address reference fixups:\n"
 msgstr " fixup'er til quad-word .address-referencer:\n"
 
-#: vms-alpha.c:7820
+#: vms-alpha.c:7735
 #, c-format
 msgid " long-word .address reference fixups:\n"
 msgstr " fixup'er til long-word .address-referencer:\n"
 
-#: vms-alpha.c:7825
+#: vms-alpha.c:7740
 #, c-format
 msgid " Code Address Reference Fixups:\n"
 msgstr " Fixup'er til kodeadressereferencer:\n"
 
-#: vms-alpha.c:7830
+#: vms-alpha.c:7745
 #, c-format
-msgid " Linkage Pairs Referece Fixups:\n"
-msgstr " Reference-fixup'er til lÃ¦nkningspar:\n"
+msgid " Linkage Pairs Reference Fixups:\n"
+msgstr " Reference-fixup'er til linking-par:\n"
 
-#: vms-alpha.c:7839
+#: vms-alpha.c:7754
 #, c-format
 msgid " Change Protection (%u entries):\n"
 msgstr " Ã†ndringsbeskyttelse (%u elementer):\n"
 
-#: vms-alpha.c:7844
+#: vms-alpha.c:7759
 #, c-format
 msgid "  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "
 msgstr "  base: 0x%08x %08x, stÃ¸rrelse: 0x%08x, beskyttelse: 0x%08x "
 
 #. FIXME: we do not yet support relocatable link.  It is not obvious
 #. how to do it for debug infos.
-#: vms-alpha.c:8676
+#: vms-alpha.c:8599
 msgid "%P: relocatable link is not supported\n"
-msgstr "%P: relokÃ©rbar lÃ¦nke understÃ¸ttes ikke\n"
+msgstr "%P: relokÃ©rbart link understÃ¸ttes ikke\n"
 
-#: vms-alpha.c:8746
+#: vms-alpha.c:8669
 msgid "%P: multiple entry points: in modules %B and %B\n"
 msgstr "%P: flere indgangspunkter: i modulerne %B og %B\n"
 
-#: vms-lib.c:1421
+#: vms-lib.c:1444
 #, c-format
 msgid "could not open shared image '%s' from '%s'"
 msgstr "kunne ikke Ã¥bne delt aftryk \"%s\" fra \"%s\""
@@ -5451,232 +6143,158 @@ msgstr "_bfd_vms_output_counted kaldt me
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr "_bfd_vms_output_counted  kaldt med for mange byte"
 
-#: xcofflink.c:836
+#: xcofflink.c:824
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: XCOFF delt objekt nÃ¥r ikke XCOFF-uddata produceres"
 
-#: xcofflink.c:857
+#: xcofflink.c:845
 #, c-format
 msgid "%s: dynamic object with no .loader section"
-msgstr "%s: dynamisk objekt uden nogen .loader-sektion"
+msgstr "%s: dynamisk objekt uden noget .loader-afsnit"
 
-#: xcofflink.c:1415
+#: xcofflink.c:1404
 msgid "%B: `%s' has line numbers but no enclosing section"
-msgstr "%B: \"%s\" har linjenumre, men ingen omsluttende sektion"
+msgstr "%B: \"%s\" har linjenumre, men intet omsluttende afsnit"
 
-#: xcofflink.c:1467
+#: xcofflink.c:1456
 msgid "%B: class %d symbol `%s' has no aux entries"
 msgstr "%B: klasse %d-symbol \"%s\" har ingen aux-poster"
 
-#: xcofflink.c:1489
+#: xcofflink.c:1478
 msgid "%B: symbol `%s' has unrecognized csect type %d"
 msgstr "%B: symbol \"%s\" har ukendt csect-type %d"
 
-#: xcofflink.c:1501
+#: xcofflink.c:1490
 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%B: fejlagtigt XTY_ER-symbol \"%s\": klasse %d scnum %d scnlen %d"
 
-#: xcofflink.c:1530
+#: xcofflink.c:1519
 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%B: XMC_TC0-symbol \"%s\" er klasse %d scnlen %d"
 
-#: xcofflink.c:1676
+#: xcofflink.c:1665
 msgid "%B: csect `%s' not in enclosing section"
-msgstr "%B: csect \"%s\" er ikke i omsluttende sektion"
+msgstr "%B: csect \"%s\" er ikke i omsluttende afsnit"
 
-#: xcofflink.c:1783
+#: xcofflink.c:1772
 msgid "%B: misplaced XTY_LD `%s'"
 msgstr "%B: fejlagtigt placeret XTY_LD \"%s\""
 
-#: xcofflink.c:2102
+#: xcofflink.c:2091
 msgid "%B: reloc %s:%d not in csect"
 msgstr "%B: relokeringen %s:%d er ikke i csect"
 
-#: xcofflink.c:3186
+#: xcofflink.c:3182
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: intet sÃ¥dant symbol"
 
-#: xcofflink.c:3291
+#: xcofflink.c:3287
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "advarsel: forsÃ¸g pÃ¥ at eksportere udefineret symbol \"%s\""
 
-#: xcofflink.c:3673
+#: xcofflink.c:3666
 msgid "error: undefined symbol __rtinit"
 msgstr "fejl: udefineret symbol __rtinit"
 
-#: xcofflink.c:4052
+#: xcofflink.c:4045
 msgid "%B: loader reloc in unrecognized section `%s'"
-msgstr "%B: indlÃ¦serrelokering i ukendt sektion \"%s\""
+msgstr "%B: indlÃ¦serrelokering i ukendt afsnit \"%s\""
 
-#: xcofflink.c:4063
+#: xcofflink.c:4056
 msgid "%B: `%s' in loader reloc but not loader sym"
 msgstr "%B: \"%s\" i indlÃ¦serrelokering, men ikke indlÃ¦sersym"
 
-#: xcofflink.c:4079
+#: xcofflink.c:4072
 msgid "%B: loader reloc in read-only section %A"
-msgstr "%B: indlÃ¦serrelokering i skrivebeskyttet sektion %A"
+msgstr "%B: indlÃ¦serrelokering i skrivebeskyttet afsnit %A"
 
-#: xcofflink.c:5097
+#: xcofflink.c:5094
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "TOC giver overlÃ¸b: 0x%lx > 0x10000; prÃ¸v -mminimal-toc ved oversÃ¦ttelse"
 
-#: elf32-ia64.c:1110 elf64-ia64.c:1110
-msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."
-msgstr "%B: Kan ikke forenkle br ved 0x%lx i sektionen \"%A\". Brug venligst brl eller indirekte gren."
-
-#: elf32-ia64.c:2809 elf64-ia64.c:2809
-msgid "@pltoff reloc against local symbol"
-msgstr "@pltoff-relokering mod lokalt symbol"
-
-#: elf32-ia64.c:4430 elf64-ia64.c:4430
-#, c-format
-msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
-msgstr "%s: kort datasegment lÃ¸b over (0x%lx >= 0x400000)"
-
-#: elf32-ia64.c:4441 elf64-ia64.c:4441
-#, c-format
-msgid "%s: __gp does not cover short data segment"
-msgstr "%s: __gp dÃ¦kker ikke kort datasegment"
-
-#: elf32-ia64.c:4708 elf64-ia64.c:4708
-msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
-msgstr "%B: ikke-pic-kode med imm-relokering mod dynamisk symbol \"%s\""
-
-#: elf32-ia64.c:4775 elf64-ia64.c:4775
-msgid "%B: @gprel relocation against dynamic symbol %s"
-msgstr "%B: @gprel-relokering mod dynamisk symbol %s"
-
-#: elf32-ia64.c:4838 elf64-ia64.c:4838
-msgid "%B: linking non-pic code in a position independent executable"
-msgstr "%B: lÃ¦nker ikke-pic-kode i en positionsuafhÃ¦ngig eksekverbar fil"
-
-#: elf32-ia64.c:4975 elf64-ia64.c:4975
-msgid "%B: @internal branch to dynamic symbol %s"
-msgstr "%B: @intern gren til dynamisk symbol %s"
-
-#: elf32-ia64.c:4977 elf64-ia64.c:4977
-msgid "%B: speculation fixup to dynamic symbol %s"
-msgstr "%B: spekulations-fixup til dynamisk symbol %s"
-
-#: elf32-ia64.c:4979 elf64-ia64.c:4979
-msgid "%B: @pcrel relocation against dynamic symbol %s"
-msgstr "%B: @pcrel-relokering mod dynamisk symbol %s"
-
-#: elf32-ia64.c:5176 elf64-ia64.c:5176
-msgid "unsupported reloc"
-msgstr "relokeringen understÃ¸ttes ikke"
-
-#: elf32-ia64.c:5214 elf64-ia64.c:5214
-msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."
-msgstr "%B: manglende TLS-sektion til relokering %s mod \"%s\" ved 0x%lx i sektionen \"%A\"."
-
-#: elf32-ia64.c:5229 elf64-ia64.c:5229
-msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."
-msgstr "%B: Kan ikke forenkle br (%s) til \"%s\" pÃ¥ 0x%lx i sektionen \"%A\" med stÃ¸rrelsen 0x%lx (> 0x1000000)."
-
-#: elf32-ia64.c:5491 elf64-ia64.c:5491
-msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
-msgstr "%B: lÃ¦nker fang-ved-NULL-dereference med ikkefangende filer"
-
-#: elf32-ia64.c:5500 elf64-ia64.c:5500
-msgid "%B: linking big-endian files with little-endian files"
-msgstr "%B: lÃ¦nker big-endian-filer med little endian-filer"
-
-#: elf32-ia64.c:5509 elf64-ia64.c:5509
-msgid "%B: linking 64-bit files with 32-bit files"
-msgstr "%B: lÃ¦nker 64 bit-filer med 32 bit-filer"
-
-#: elf32-ia64.c:5518 elf64-ia64.c:5518
-msgid "%B: linking constant-gp files with non-constant-gp files"
-msgstr "%B: lÃ¦nker konstant-gp-filer med ikke-konstant-gp-filer"
-
-#: elf32-ia64.c:5528 elf64-ia64.c:5528
-msgid "%B: linking auto-pic files with non-auto-pic files"
-msgstr "%B: lÃ¦nker auto-pic-filer med ikke-auto-pic-filer"
-
-#: peigen.c:1002 pepigen.c:1002 pex64igen.c:1002
+#: peigen.c:1009 pepigen.c:1009 pex64igen.c:1009
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: linjenummer giver overlÃ¸b: 0x%lx > 0xffff"
 
-#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029
+#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "Eksportkatalog [.edata (eller hvor vi fandt det)]"
 
-#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030
+#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
 msgid "Import Directory [parts of .idata]"
 msgstr "Importkatalog [dele af .idata]"
 
-#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031
+#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
 msgid "Resource Directory [.rsrc]"
 msgstr "Resursekatalog [.rsrc]"
 
-#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032
+#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
 msgid "Exception Directory [.pdata]"
 msgstr "Undtagelseskatalog [.pdata]"
 
-#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033
+#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
 msgid "Security Directory"
 msgstr "Sikkerhedskatalog"
 
-#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034
+#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Baserelokeringskatalog [.reloc]"
 
-#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035
+#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
 msgid "Debug Directory"
 msgstr "FejlsÃ¸gningskatalog"
 
-#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
+#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
 msgid "Description Directory"
 msgstr "Beskrivelseskatalog"
 
-#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
+#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
 msgid "Special Directory"
 msgstr "Specialkatalog"
 
-#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
+#: peigen.c:1045 pepigen.c:1045 pex64igen.c:1045
 msgid "Thread Storage Directory [.tls]"
 msgstr "TrÃ¥dlagringskatalog [.tls]"
 
-#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
+#: peigen.c:1046 pepigen.c:1046 pex64igen.c:1046
 msgid "Load Configuration Directory"
 msgstr "IndlÃ¦sningskonfigurationskatalog"
 
-#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
+#: peigen.c:1047 pepigen.c:1047 pex64igen.c:1047
 msgid "Bound Import Directory"
 msgstr "Katalog over bundne importer"
 
-#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
+#: peigen.c:1048 pepigen.c:1048 pex64igen.c:1048
 msgid "Import Address Table Directory"
 msgstr "Importadressetabelkatalog"
 
-#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
+#: peigen.c:1049 pepigen.c:1049 pex64igen.c:1049
 msgid "Delay Import Directory"
 msgstr "Katalog over forskinkede importer"
 
-#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
+#: peigen.c:1050 pepigen.c:1050 pex64igen.c:1050
 msgid "CLR Runtime Header"
 msgstr "CLR-runtime-header"
 
-#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
+#: peigen.c:1051 pepigen.c:1051 pex64igen.c:1051
 msgid "Reserved"
 msgstr "Reserveret"
 
-#: peigen.c:1104 pepigen.c:1104 pex64igen.c:1104
+#: peigen.c:1111 pepigen.c:1111 pex64igen.c:1111
 #, c-format
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Der findes en importtabel, men sektionen som indeholder den kunne ikke findes\n"
+"Der findes en importtabel, men afsnittet som indeholder den kunne ikke findes\n"
 
-#: peigen.c:1109 pepigen.c:1109 pex64igen.c:1109
+#: peigen.c:1116 pepigen.c:1116 pex64igen.c:1116
 #, c-format
 msgid ""
 "\n"
@@ -5685,7 +6303,7 @@ msgstr ""
 "\n"
 "Der findes en importtabel i %s pÃ¥ 0x%lx\n"
 
-#: peigen.c:1151 pepigen.c:1151 pex64igen.c:1151
+#: peigen.c:1158 pepigen.c:1158 pex64igen.c:1158
 #, c-format
 msgid ""
 "\n"
@@ -5694,31 +6312,31 @@ msgstr ""
 "\n"
 "Funktionsidentifikatorer fundet pÃ¥ startadressen: %04lx\n"
 
-#: peigen.c:1154 pepigen.c:1154 pex64igen.c:1154
+#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tkodebase %08lx toc (indlÃ¦seligt/reelt) %08lx/%08lx\n"
 
-#: peigen.c:1162 pepigen.c:1162 pex64igen.c:1162
+#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169
 #, c-format
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
 msgstr ""
 "\n"
-"Ingen reldata-sektion! Funktionsidentifikatorer afkodedes ikke.\n"
+"Intet reldata-afsnit! Funktionsidentifikatorer afkodedes ikke.\n"
 
-#: peigen.c:1167 pepigen.c:1167 pex64igen.c:1167
+#: peigen.c:1174 pepigen.c:1174 pex64igen.c:1174
 #, c-format
 msgid ""
 "\n"
 "The Import Tables (interpreted %s section contents)\n"
 msgstr ""
 "\n"
-"Importtabellerne (tolket indhold i %s-sektion)\n"
+"Importtabellerne (tolket indhold i %s-afsnit)\n"
 
 # Hvad er thunk?
-#: peigen.c:1170 pepigen.c:1170 pex64igen.c:1170
+#: peigen.c:1177 pepigen.c:1177 pex64igen.c:1177
 #, c-format
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
@@ -5727,7 +6345,7 @@ msgstr ""
 " vma:            Tips-   Tids-     Fremad-  DLL-      FÃ¸rste\n"
 "                 tabel   stempel   kÃ¦de     navn      thunk\n"
 
-#: peigen.c:1218 pepigen.c:1218 pex64igen.c:1218
+#: peigen.c:1225 pepigen.c:1225 pex64igen.c:1225
 #, c-format
 msgid ""
 "\n"
@@ -5736,39 +6354,39 @@ msgstr ""
 "\n"
 "\tDLL-navn: %s\n"
 
-#: peigen.c:1229 pepigen.c:1229 pex64igen.c:1229
+#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
 #, c-format
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr "\tvma: Tips/Ordn Medlemsnavn Bundet til\n"
 
-#: peigen.c:1254 pepigen.c:1254 pex64igen.c:1254
+#: peigen.c:1261 pepigen.c:1261 pex64igen.c:1261
 #, c-format
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Der findes en fÃ¸rste thunk, men sektionen som indeholder den kunne ikke findes\n"
+"Der findes en fÃ¸rste thunk, men afsnittet som indeholder den kunne ikke findes\n"
 
-#: peigen.c:1415 pepigen.c:1415 pex64igen.c:1415
+#: peigen.c:1423 pepigen.c:1423 pex64igen.c:1423
 #, c-format
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Der findes en eksporttabel, men sektionen som indeholder den kunne ikke findes\n"
+"Der findes en eksporttabel, men afsnittet som indeholder den kunne ikke findes\n"
 
-#: peigen.c:1424 pepigen.c:1424 pex64igen.c:1424
+#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432
 #, c-format
 msgid ""
 "\n"
 "There is an export table in %s, but it does not fit into that section\n"
 msgstr ""
 "\n"
-"Der findes en eksporttabel i %s, men den passer ikke ind i den pÃ¥gÃ¦ldende sektion\n"
+"Der findes en eksporttabel i %s, men den passer ikke ind i det pÃ¥gÃ¦ldende afsnit\n"
 
-#: peigen.c:1430 pepigen.c:1430 pex64igen.c:1430
+#: peigen.c:1438 pepigen.c:1438 pex64igen.c:1438
 #, c-format
 msgid ""
 "\n"
@@ -5777,7 +6395,7 @@ msgstr ""
 "\n"
 "Der findes en eksporttabel i %s ved 0x%lx\n"
 
-#: peigen.c:1458 pepigen.c:1458 pex64igen.c:1458
+#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
 #, c-format
 msgid ""
 "\n"
@@ -5785,69 +6403,69 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-"Eksporttabellerne (tolket indhold i %s-sektion)\n"
+"Eksporttabellerne (tolket indhold i %s-afsnit)\n"
 
-#: peigen.c:1462 pepigen.c:1462 pex64igen.c:1462
+#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Eksportflag \t\t\t%lx\n"
 
-#: peigen.c:1465 pepigen.c:1465 pex64igen.c:1465
+#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Tids-/datostempel \t\t%lx\n"
 
-#: peigen.c:1468 pepigen.c:1468 pex64igen.c:1468
+#: peigen.c:1476 pepigen.c:1476 pex64igen.c:1476
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "StÃ¸rre/mindre \t\t\t%d/%d\n"
 
-#: peigen.c:1471 pepigen.c:1471 pex64igen.c:1471
+#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479
 #, c-format
 msgid "Name \t\t\t\t"
 msgstr "Navn \t\t\t\t"
 
-#: peigen.c:1477 pepigen.c:1477 pex64igen.c:1477
+#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Ordningsbase \t\t\t%ld\n"
 
-#: peigen.c:1480 pepigen.c:1480 pex64igen.c:1480
+#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
 #, c-format
 msgid "Number in:\n"
 msgstr "Tal i:\n"
 
-#: peigen.c:1483 pepigen.c:1483 pex64igen.c:1483
+#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tEksportadressetabel \t\t%08lx\n"
 
-#: peigen.c:1487 pepigen.c:1487 pex64igen.c:1487
+#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\t[Navnepeger/Ordningstal]-tabel\t%08lx\n"
 
-#: peigen.c:1490 pepigen.c:1490 pex64igen.c:1490
+#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
 #, c-format
 msgid "Table Addresses\n"
 msgstr "Tabeladresser\n"
 
-#: peigen.c:1493 pepigen.c:1493 pex64igen.c:1493
+#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501
 #, c-format
 msgid "\tExport Address Table \t\t"
 msgstr "\tEksportadressetabel \t\t"
 
-#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
+#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506
 #, c-format
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNavnepegertabel \t\t"
 
-#: peigen.c:1503 pepigen.c:1503 pex64igen.c:1503
+#: peigen.c:1511 pepigen.c:1511 pex64igen.c:1511
 #, c-format
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tOrdningstalstabel \t\t\t"
 
-#: peigen.c:1517 pepigen.c:1517 pex64igen.c:1517
+#: peigen.c:1525 pepigen.c:1525 pex64igen.c:1525
 #, c-format
 msgid ""
 "\n"
@@ -5856,15 +6474,15 @@ msgstr ""
 "\n"
 "Eksportadressetabel -- Ordningsbase %ld\n"
 
-#: peigen.c:1536 pepigen.c:1536 pex64igen.c:1536
+#: peigen.c:1544 pepigen.c:1544 pex64igen.c:1544
 msgid "Forwarder RVA"
 msgstr "Videresender-RVA"
 
-#: peigen.c:1547 pepigen.c:1547 pex64igen.c:1547
+#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
 msgid "Export RVA"
 msgstr "Eksport-RVA"
 
-#: peigen.c:1554 pepigen.c:1554 pex64igen.c:1554
+#: peigen.c:1562 pepigen.c:1562 pex64igen.c:1562
 #, c-format
 msgid ""
 "\n"
@@ -5873,52 +6491,52 @@ msgstr ""
 "\n"
 "[Ordningstals-/Navnepeger-]tabel\n"
 
-#: peigen.c:1614 peigen.c:1797 pepigen.c:1614 pepigen.c:1797 pex64igen.c:1614
-#: pex64igen.c:1797
+#: peigen.c:1622 peigen.c:1805 pepigen.c:1622 pepigen.c:1805 pex64igen.c:1622
+#: pex64igen.c:1805
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
-msgstr "Advarsel, stÃ¸rrelsen pÃ¥ .pdata-sektionen (%ld) er ikke en multipel af %d\n"
+msgstr "Advarsel, stÃ¸rrelsen pÃ¥ .pdata-afsnittet (%ld) er ikke en multipel af %d\n"
 
-#: peigen.c:1621 pepigen.c:1621 pex64igen.c:1621
+#: peigen.c:1629 pepigen.c:1629 pex64igen.c:1629
 #, c-format
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tStartadresse      Slutadresse       Tilbagespolings-information\n"
 
-#: peigen.c:1623 pepigen.c:1623 pex64igen.c:1623
+#: peigen.c:1631 pepigen.c:1631 pex64igen.c:1631
 #, c-format
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
 msgstr ""
-" vma:\t\tStart-    Slut-     EH-        EH-    Prologsluts-  Undtagelses-\n"
-"     \t\tadresse   adresse   hÃ¥ndterer  data   adresse       maske\n"
+" vma:\t\tStart-   Slut-    EH-      EH-     Prologslut- Undtagelses-\n"
+"     \t\tadresse  adresse  hÃ¥ndt.   data    adresse     maske\n"
 
-#: peigen.c:1697 pepigen.c:1697 pex64igen.c:1697
+#: peigen.c:1705 pepigen.c:1705 pex64igen.c:1705
 #, c-format
 msgid " Register save millicode"
-msgstr " Registergemnings millikode"
+msgstr " Registergemnings-millikode"
 
-#: peigen.c:1700 pepigen.c:1700 pex64igen.c:1700
+#: peigen.c:1708 pepigen.c:1708 pex64igen.c:1708
 #, c-format
 msgid " Register restore millicode"
-msgstr " Registergenskabnings millikode"
+msgstr " Registergenskabnings-millikode"
 
-#: peigen.c:1703 pepigen.c:1703 pex64igen.c:1703
+#: peigen.c:1711 pepigen.c:1711 pex64igen.c:1711
 #, c-format
 msgid " Glue code sequence"
 msgstr " Klisterkodesekvens"
 
 # Et bogstav for meget i Undtagelse og HÃ¥ndtering, mon ikke det gÃ¥r?
-#: peigen.c:1803 pepigen.c:1803 pex64igen.c:1803
+#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
 #, c-format
 msgid ""
 " vma:\t\tBegin    Prolog   Function Flags    Exception EH\n"
 "     \t\tAddress  Length   Length   32b exc  Handler   Data\n"
 msgstr ""
-" vma:\t\tStart    Prolog   Funktion Flag    Undtagelse EH\n"
-"     \t\tAdresse  LÃ¦ngde   LÃ¦ngde   32b exc HÃ¥ndtering Data\n"
+" vma:\t\tStart    Prolog   Funktion Flag    Undt.-     EH\n"
+"     \t\tAdresse  LÃ¦ngde   LÃ¦ngde   32b exc HÃ¥ndt.     Data\n"
 
-#: peigen.c:1929 pepigen.c:1929 pex64igen.c:1929
+#: peigen.c:1937 pepigen.c:1937 pex64igen.c:1937
 #, c-format
 msgid ""
 "\n"
@@ -5927,9 +6545,9 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-"PE-filbaserelokeringer (tolket indhold i .reloc-sektionen)\n"
+"PE-filbaserelokeringer (tolket indhold i .reloc-afsnittet)\n"
 
-#: peigen.c:1958 pepigen.c:1958 pex64igen.c:1958
+#: peigen.c:1966 pepigen.c:1966 pex64igen.c:1966
 #, c-format
 msgid ""
 "\n"
@@ -5938,15 +6556,70 @@ msgstr ""
 "\n"
 "Virtuel adresse: %08lx OmrÃ¥desstÃ¸rrelse %ld (0x%lx) Antal rettelser %ld\n"
 
-#: peigen.c:1971 pepigen.c:1971 pex64igen.c:1971
+#: peigen.c:1979 pepigen.c:1979 pex64igen.c:1979
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\trelokering %4d afstand %4x [%4lx] %s"
 
+#: peigen.c:2023 pepigen.c:2023 pex64igen.c:2023
+#, c-format
+msgid "%*.s Entry: "
+msgstr "%*.s-indgang: "
+
+#: peigen.c:2043 pepigen.c:2043 pex64igen.c:2043
+#, c-format
+msgid "name: [val: %08lx len %d]: "
+msgstr "navn: [vÃ¦rdi: %08lx lÃ¦ngde %d]: "
+
+#: peigen.c:2054 pepigen.c:2054 pex64igen.c:2054
+#, c-format
+msgid "<corrupt string length: %#x>"
+msgstr "<beskadiget strenglÃ¦ngde: %#x>"
+
+#: peigen.c:2057 pepigen.c:2057 pex64igen.c:2057
+#, c-format
+msgid "<corrupt string offset: %#lx>"
+msgstr "<beskadiget strengforskydning: %#lx>"
+
+#: peigen.c:2060 pepigen.c:2060 pex64igen.c:2060
+#, c-format
+msgid "ID: %#08lx"
+msgstr "ID: %#08lx"
+
+#: peigen.c:2063 pepigen.c:2063 pex64igen.c:2063
+#, c-format
+msgid ", Value: %#08lx\n"
+msgstr ", vÃ¦rdi: %#08lx\n"
+
+# codepage?
+#: peigen.c:2074 pepigen.c:2074 pex64igen.c:2074
+#, c-format
+msgid "%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgstr "%*.s  Blad: Adr: %#08lx, StÃ¸rrelse: %#08lx, Codepage: %d\n"
+
+#: peigen.c:2116 pepigen.c:2116 pex64igen.c:2116
+#, c-format
+msgid " Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"
+msgstr " Tabel: Tegn: %d, Tid: %08lx, Ver: %d/%d, Num-navne: %d, id'er: %d\n"
+
+#: peigen.c:2204 pepigen.c:2204 pex64igen.c:2204
+#, c-format
+msgid "Corrupt .rsrc section detected!\n"
+msgstr "Beskadiget .rsrc-afsnit fundet!\n"
+
+#: peigen.c:2220 pepigen.c:2220 pex64igen.c:2220
+#, c-format
+msgid ""
+"\n"
+"WARNING: Extra data in .rsrc section - it will be ignored by Windows:\n"
+msgstr ""
+"\n"
+"ADVARSEL: Ekstra data i .rsrc-afsnit - det vil blive ignoreret af Windows:\n"
+
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:2010 pepigen.c:2010 pex64igen.c:2010
+#: peigen.c:2243 pepigen.c:2243 pex64igen.c:2243
 #, c-format
 msgid ""
 "\n"
@@ -5955,205 +6628,62 @@ msgstr ""
 "\n"
 "Karakteristik 0x%x\n"
 
-#: peigen.c:2310 pepigen.c:2310 pex64igen.c:2310
+#: peigen.c:3194 pepigen.c:3194 pex64igen.c:3194
+#, c-format
+msgid ".rsrc merge failure: duplicate string resource: %d"
+msgstr ".rsrc-fletning mislykkedes: gentaget strengressource: %d"
+
+#: peigen.c:3329 pepigen.c:3329 pex64igen.c:3329
+msgid ".rsrc merge failure: multiple non-default manifests"
+msgstr ".rsrc-fletning mislykkedes: flere ikke-standard-manifester"
+
+#: peigen.c:3347 pepigen.c:3347 pex64igen.c:3347
+msgid ".rsrc merge failure: a directory matches a leaf"
+msgstr ".rsrc-fletning mislykkedes: et katalog matcher et blad"
+
+#: peigen.c:3389 pepigen.c:3389 pex64igen.c:3389
+msgid ".rsrc merge failure: duplicate leaf"
+msgstr ".rsrc-fletning mislykkedes: gentaget blad"
+
+#: peigen.c:3391 pepigen.c:3391 pex64igen.c:3391
+#, c-format
+msgid ".rsrc merge failure: duplicate leaf: %s"
+msgstr ".rsrc-fletning mislykkedes: gentaget blad: %s"
+
+#: peigen.c:3457 pepigen.c:3457 pex64igen.c:3457
+msgid ".rsrc merge failure: dirs with differing characteristics\n"
+msgstr ".rsrc-fletning mislykkedes: kataloger med forskellige egenskaber\n"
+
+#: peigen.c:3464 pepigen.c:3464 pex64igen.c:3464
+msgid ".rsrc merge failure: differing directory versions\n"
+msgstr ".rsrc-fletning mislykkedes: forskellige katalogversioner\n"
+
+#. Corrupted .rsrc section - cannot merge.
+#: peigen.c:3537 pepigen.c:3537 pex64igen.c:3537
+#, c-format
+msgid "%s: .rsrc merge failure: corrupt .rsrc section"
+msgstr "%s: .rsrc-fletning mislykkedes: beskadiget .rsrc-afsnit"
+
+#: peigen.c:3673 pepigen.c:3673 pex64igen.c:3673
 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[1] fordi .idata$2 mangler"
 
-#: peigen.c:2330 pepigen.c:2330 pex64igen.c:2330
+#: peigen.c:3693 pepigen.c:3693 pex64igen.c:3693
 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[1] fordi .idata$4 mangler"
 
-#: peigen.c:2351 pepigen.c:2351 pex64igen.c:2351
+#: peigen.c:3714 pepigen.c:3714 pex64igen.c:3714
 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[12] fordi .idata$5 mangler"
 
-#: peigen.c:2371 pepigen.c:2371 pex64igen.c:2371
+#: peigen.c:3734 pepigen.c:3734 pex64igen.c:3734
 msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)], da .idata$6 mangler"
 
-#: peigen.c:2413 pepigen.c:2413 pex64igen.c:2413
+#: peigen.c:3776 pepigen.c:3776 pex64igen.c:3776
 msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)], da .idata$6 mangler"
 
-#: peigen.c:2436 pepigen.c:2436 pex64igen.c:2436
+#: peigen.c:3801 pepigen.c:3801 pex64igen.c:3801
 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
 msgstr "%B: kan ikke udfylde DataDictionary[9], da __tls_used mangler"
-
-# src/menus.c:341
-#~ msgid "Missing IHCONST"
-#~ msgstr "IHCONST mangler"
-
-# src/menus.c:341
-#~ msgid "Missing IHIHALF"
-#~ msgstr "IHIHALF mangler"
-
-#~ msgid "missing IHCONST reloc"
-#~ msgstr "IHCONST-relokering mangler"
-
-#~ msgid "missing IHIHALF reloc"
-#~ msgstr "IHIHALF-relokering mangler"
-
-#~ msgid "  first occurrence: %s: arm call to thumb"
-#~ msgstr "  fÃ¸rste forekomst: %s: arm-kald til thumb"
-
-#~ msgid "  first occurrence: %s: thumb call to arm"
-#~ msgstr "  fÃ¸rste forekomst: %s: thumb-kald til arm"
-
-#~ msgid "  consider relinking with --support-old-code enabled"
-#~ msgstr "  overvej omlÃ¦nkning med --support-old-code aktiveret"
-
-#~ msgid "reloc against unsupported section"
-#~ msgstr "relokering mod sektion som ikke understÃ¸ttes"
-
-#~ msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
-#~ msgstr "Dwarf-fejl: DW_FORM_strp-afstanden (%lu) stÃ¸rre end eller lig med stÃ¸rrelsen pÃ¥ .debug_str (%lu)."
-
-#~ msgid "Dwarf Error: Can't find .debug_abbrev section."
-#~ msgstr "Dwarf-fejl: Kan ikke finde sektionen .debug_abbrev."
-
-#~ msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
-#~ msgstr "Dwarf-fejl: Forkortelsesafstanden (%lu) stÃ¸rre end eller lig med stÃ¸rrelsen .debug_abbrev (%lu)."
-
-#~ msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
-#~ msgstr "%s: advarsel: ulÃ¸selig relokering mod symbol \"%s\" fra sektionen %s"
-
-#~ msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-#~ msgstr "%s: Ikke tilstrÃ¦kkeligt med plads for programhoveder (allokerede %u, behÃ¸ver %u)"
-
-#~ msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
-#~ msgstr "Fejl: FÃ¸rste sektion i segmentet (%s) begynder ved 0x%x mens segmentet begynder ved 0x%x"
-
-#~ msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-#~ msgstr "%s: advarsel: ulÃ¸selig relokering %d mod symbol \"%s\" fra sektionen %s"
-
-#~ msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
-#~ msgstr "FEJL: %s er oversat for EABI version %d, mens %s er oversat for version %d"
-
-#~ msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-#~ msgstr "%s: ulÃ¸selig relokering %s mod symbol \"%s\" fra sektionen %s"
-
-#~ msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
-#~ msgstr "%s: relokeringen %s bÃ¸r ikke bruges nÃ¥r et delt objekt oprettes; genoversÃ¦t med -fPIC"
-
-#~ msgid "%s(%s+0x%lx): fixing %s"
-#~ msgstr "%s(%s+0x%lx): retter %s"
-
-#~ msgid " [m68000]"
-#~ msgstr " [m68000]"
-
-#~ msgid "Linking mips16 objects into %s format is not supported"
-#~ msgstr "LÃ¦nkning af mips16-objekter til %s-format understÃ¸ttes ikke"
-
-#~ msgid "%s: Unknown special linker type %d"
-#~ msgstr "%s: Ukendt speciallÃ¦nkertype %d"
-
-#~ msgid "v850ea architecture"
-#~ msgstr "v850ea-arkitektur"
-
-#~ msgid "%s: check_relocs: unhandled reloc type %d"
-#~ msgstr "%s: check_relocs: uhÃ¥ndteret relokeringstype %d"
-
-#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
-#~ msgstr "%s: Sektionen %s er for stor til at stoppe hul med %ld byte i"
-
-#~ msgid "Error: out of memory"
-#~ msgstr "Fejl: ikke mere hukommelse"
-
-#~ msgid "warning: relocation against removed section; zeroing"
-#~ msgstr "advarsel: relokering mod fjernet sektion; nulstiller"
-
-#~ msgid "local symbols in discarded section %s"
-#~ msgstr "lokale symboler i bortkastet sektion %s"
-
-#~ msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-#~ msgstr "%s: %s+0x%lx: hop til stubrutine som ikke er jal"
-
-#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-#~ msgstr "%s: ISA (-mips%d) passer ikke med tidligere moduler (-mips%d)"
-
-#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-#~ msgstr "%s: ISA (%d) passer ikke med tidligere moduler (%d)"
-
-#~ msgid " [mips1]"
-#~ msgstr " [mips1]"
-
-#~ msgid " [mips2]"
-#~ msgstr " [mips2]"
-
-#~ msgid " [mips3]"
-#~ msgstr " [mips3]"
-
-#~ msgid " [mips4]"
-#~ msgstr " [mips4]"
-
-#~ msgid " [mips5]"
-#~ msgstr " [mips5]"
-
-#~ msgid " [mips32]"
-#~ msgstr " [mips32]"
-
-#~ msgid " [mips64]"
-#~ msgstr " [mips64]"
-
-#~ msgid " [mips16]"
-#~ msgstr " [mips16]"
-
-#~ msgid " [32bitmode]"
-#~ msgstr " [32-bittilstand]"
-
-#~ msgid "bfd_make_section (%s) failed"
-#~ msgstr "bfd_make_section (%s) mislykkedes"
-
-#~ msgid "bfd_set_section_flags (%s, %x) failed"
-#~ msgstr "bfd_set_section_flags (%s, %x) mislykkedes"
-
-#~ msgid "Size mismatch section %s=%lx, %s=%lx"
-#~ msgstr "StÃ¸rrelsen passer ikke pÃ¥ sektion %s=%lx, %s=%lx"
-
-#~ msgid "unknown gsd/egsd subtype %d"
-#~ msgstr "ukendt gsd/egsd-undertype %d"
-
-#~ msgid "failed to enter %s"
-#~ msgstr "mislykkedes med at gÃ¥ ind i %s"
-
-#~ msgid "No Mem !"
-#~ msgstr "Ingen hukommelse!"
-
-#~ msgid "%s: no symbol \"%s\""
-#~ msgstr "%s: intet symbol \"%s\""
-
-#~ msgid "reserved STO cmd %d"
-#~ msgstr "reserveret STO-kommando %d"
-
-#~ msgid "reserved OPR cmd %d"
-#~ msgstr "reserveret OPR-kommando %d"
-
-#~ msgid "reserved CTL cmd %d"
-#~ msgstr "reserveret CTL-kommando %d"
-
-#~ msgid "stack-from-image not implemented"
-#~ msgstr "stack-from-image er ikke implementeret"
-
-#~ msgid "stack-entry-mask not fully implemented"
-#~ msgstr "stack-entry-mask er ikke helt implementeret"
-
-#~ msgid "stack-local-symbol not fully implemented"
-#~ msgstr "stack-local-symbol er ikke helt implementeret"
-
-#~ msgid "stack-literal not fully implemented"
-#~ msgstr "stack-literal er ikke helt implementeret"
-
-#~ msgid "stack-local-symbol-entry-point-mask not fully implemented"
-#~ msgstr "stack-local-symbol-entry-point-mask er ikke helt implementeret"
-
-#~ msgid "obj code %d not found"
-#~ msgstr "objektkode %d kunne ikke findes"
-
-#~ msgid "%s: dynamic relocation against speculation fixup"
-#~ msgstr "%s: dynamisk relokering uden spekulationsrettelser"
-
-#~ msgid "%s: speculation fixup against undefined weak symbol"
-#~ msgstr "%s: spekulationsfix mod udefineret svagt symbol"
-
-#~ msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-#~ msgstr "%s: relokering giver overlÃ¸b 1: 0x%lx > 0xffff"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/Make-in ./bfd/po/Make-in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/Make-in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/Make-in	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 # Makefile for program source directory in GNU NLS utilities package.
 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file may be copied and used freely without restrictions.  It can
 # be used in projects which are not available under the GNU Public License
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/SRC-POTFILES.in ./bfd/po/SRC-POTFILES.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/SRC-POTFILES.in	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/SRC-POTFILES.in	2017-03-06 01:49:05.000000000 +0000
@@ -86,6 +86,7 @@ cpu-i386.c
 cpu-i860.c
 cpu-i960.c
 cpu-ia64.c
+cpu-iamcu.c
 cpu-ip2k.c
 cpu-iq2000.c
 cpu-k1om.c
@@ -118,6 +119,8 @@ cpu-pdp11.c
 cpu-pj.c
 cpu-plugin.c
 cpu-powerpc.c
+cpu-pru.c
+cpu-riscv.c
 cpu-rl78.c
 cpu-rs6000.c
 cpu-rx.c
@@ -156,7 +159,7 @@ elf-bfd.h
 elf-eh-frame.c
 elf-hppa.h
 elf-ifunc.c
-elf-linux-psinfo.h
+elf-linux-core.h
 elf-m10200.c
 elf-m10300.c
 elf-nacl.c
@@ -210,6 +213,7 @@ elf32-nios2.c
 elf32-or1k.c
 elf32-pj.c
 elf32-ppc.c
+elf32-pru.c
 elf32-rl78.c
 elf32-rx.c
 elf32-s390.c
@@ -253,6 +257,7 @@ elfn32-mips.c
 elfxx-aarch64.c
 elfxx-ia64.c
 elfxx-mips.c
+elfxx-riscv.c
 elfxx-sparc.c
 elfxx-tilegx.c
 epoc-pe-arm.c
@@ -297,6 +302,8 @@ m68klinux.c
 m68knetbsd.c
 m88kmach3.c
 m88kopenbsd.c
+mach-o-aarch64.c
+mach-o-arm.c
 mach-o-i386.c
 mach-o-x86-64.c
 mach-o.c
@@ -304,6 +311,7 @@ mach-o.h
 merge.c
 mipsbsd.c
 mmo.c
+netbsd-core.c
 netbsd.h
 newsos3.c
 nlm-target.h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sr.gmo ./bfd/po/sr.gmo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sr.gmo	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/po/sr.gmo	2017-03-06 01:53:33.000000000 +0000
@@ -0,0 +1,1196 @@
+Þ•wÔ+KŒW¸t¹tÆtßtþtu$(u3Mu�uŽu%®uÔuAäu&&vMvfvv˜v¨v Çvèvw!w8wKw*cw9Žw6Èw;ÿw;xFMx6”x:Ëx5yJ<y)‡yG±yLùy)FzLpz½zÓzDêzG/{w{–{¨{¼{Ô{3ó{'|0>|o||�|+©|+Õ|+}#-}Q}i}r}~}œ}³}Ê}ê}~ ~;~[~t~�~¥~½~,Ñ~þ~'?Ve{•1¬Þïü€.€#F€+j€&–€5½€ó€�%�;�U�n�…�$›�À�Ù�ù�‚$&‚K‚_‚t‚<�‚Ê‚Ù‚
è‚ö‚
+ƒ "ƒCƒ^ƒnƒŽƒªƒÊƒãƒüƒ„*„F„X„&j„‘„0¥„Ö„"ê„	
……#*…N…g…x…‘…"ª…Í…"á…#†#(†L†#a†#…†©†¶†¼†Ä†É†
+æ†ñ†ö†!ü† ‡?‡D‡I‡i‡‰‡Ž‡¢‡!§‡É‡Ð‡Ö‡Û‡à‡æ‡ê‡ï‡ˆ$ˆ)ˆIˆ]ˆB}ˆÀˆàˆåˆêˆñˆ÷ˆüˆ‰‰‰%‰>‰R‰c‰t‰…‰–‰§‰¿‰	Î‰
Ø‰
æ‰
+ô‰
+ÿ‰
+
+Š
+Š Š
+5Š$@Š
+eŠ#pŠ%”Š
+ºŠÅŠ×ŠêŠ$‹'‹E‹!_‹�‹–‹
+¥‹
°‹	¾‹È‹
+Ù‹ä‹ë‹ŒŒ/Œ>ŒUŒpŒŒ˜Œ§Œ®Œ(¾Œ/çŒ�)�+8�d�A€�Â�Ü�ö�Ž8%Ž^ŽvŽ‹Ž&¥ŽÌŽëŽ2�?9�&y� �(¿�"è��*+�6V�{��r	‘x|‘õ‘5’A’DN’*“’7¾’$ö’'“*C“!n“=�“AÎ“E”V”%u”D›”à”.þ”,-•*Z•%…•4«•à•>ÿ•Q>–G�–8Ø–	—J—5f—8œ—(Õ—,þ—P+˜E|˜FÂ˜F	™OP™H ™3é™<š%ZšA€šnÂšK1›7}›*µ›8à›.œ<Hœ9…œ@¿œH�BI�JŒ�B×�TžTožTÄž‰Ÿ<£ŸmàŸ[N Pª <û D8¡^}¡DÜ¡€!¢1¢¢JÔ¢I£>i£m¨£6¤aM¤¯¤·¤7Ë¤!¥#%¥8I¥)‚¥.¬¥0Û¥>¦>K¦/Š¦/º¦Fê¦>1§-p§(ž§Ç§7å§1¨0O¨/€¨)°¨/Ú¨;
+©<F©Aƒ©<Å©,ª//ª-_ª&�ª3´ª3èªO«Wl«OÄ«o¬+„¬5°¬#æ¬7
+­EB­>ˆ­2Ç­:ú­U5®2‹®(¾®+ç®¯7-¯<e¯?¢¯Qâ¯34°'h°=�°<Î°"±M.±K|±DÈ±!
²:/²7j²¢².À²ï²1³A³'^³%†³ ¬³EÍ³4´HH´?‘´<Ñ´Gµ>Vµ-•µ<Ãµ7¶18¶8j¶2£¶+Ö¶/·^2·]‘·7ï·'¸+G¸Ls¸+À¸ì¸
+¹#¹C¹+^¹5Š¹@À¹@ºIBºIŒº9Öº$»,5»'b»=Š»QÈ»D¼1_¼5‘¼Ç¼2ä¼.½?F½.†½ µ½AÖ½E¾:^¾$™¾9¾¾5ø¾&.¿&U¿4|¿1±¿$ã¿$À/-À%]À<ƒÀ*ÀÀ'ëÀ3Á&GÁnÁ4ŠÁ¿Á4ÞÁÂ.*Â(YÂ*‚Â6­Â2äÂ5Ã8MÃW†ÃZÞÃB9Ä5|Ä=²Ä<ðÄ(-Å-VÅ0„ÅµÅPÏÅ  Æ@AÆk‚Æ4îÆ;#Ç$_Ç'„Ç¬Ç2ÉÇOüÇKLÈG˜È`àÈAAÉYƒÉSÝÉ<1ÊgnÊaÖÊl8ËF¥Ë-ìË2Ì(MÌ3vÌ1ªÌ-ÜÌD
+ÍBOÍ6’Í*ÉÍ#ôÍ2Î.KÎ*zÎ(¥Î]ÎÎJ,ÏwÏ’Ï4¬ÏDáÏC&ÐCjÐE®Ð^ôÐ]SÑ)±Ñ+ÛÑ$Ò),Ò7VÒ9ŽÒ&ÈÒ&ïÒ2Ó+IÓ=uÓ,³ÓàÓ+þÓ*Ô-@Ô+nÔšÔ¹Ô*ØÔ2Õ"6Õ#YÕ"}Õ- Õ,ÎÕGûÕGCÖG‹Ö(ÓÖ@üÖD=×3‚×2¶×`é×2JØ7}Ø5µØ/ëØ*Ù1FÙ;xÙ&´ÙWÛÙ-3Ú+aÚ-�Ú»Ú)ÙÚ%Û2)Û2\Û=�Û;ÍÛB	ÜALÜ:ŽÜ2ÉÜ?üÜ<Ý›\Ý6øÝ6/ÞAfÞG¨Þ6ðÞ='ß:eß: ßDÛß8 à9YàC“à:×à7á8Já9ƒá,½á6êá!â;=â:yâ.´â/ãâã13ã%eã$‹ã9°ãOêã#:ä,^ä1‹äC½ä6å"8å2[å/Žå(¾å&çå%æ)4æ ^æHæ4Èæ'ýæ1%ç;Wç>“ç%Òç7øç(0è5Yè'�è8·è>ðè /éPé!né �é'±ébÙé)<ê=fêG¤ê%ìê*ë0=ë&në&•ë7¼ë7ôë8,ì0eì9–ì6Ðì/íC7íQ{íÍíííüíî2'î&Zî.�î°îM¿îT
ï2bï|•ï(ð[;ð+—ð/Ãð(óðRñFoñF¶ñ:ýñ68òDoò(´ò7Ýò*ó-@ó0nóAŸóHáó>*ô+iôI•ô;ßôõ;;õ;wõ.³õ.âõ=öIOö.™ö/Èö@øö*9÷)d÷;Ž÷Ê÷>è÷B'øljø@×ø?ùGXùF ùJçùH2úK{úGÇúBûXRû4«û/àûNü0_ü(�ü/¹üéüüüý0"ý=SýD‘ý0Öý5þ)=þ7gþŸþ¹þ'Øþ&ÿ['ÿGƒÿOËÿ9U>u2´5çP=n<¬/éo]‰ç
û	
#%4\Z;·ó;H	ak}•¦,³àô
+/!/Q2�9´#î'2:3m¡;±í/DYk~•²Ï	í"÷+#F,j:—Òä.	4/	?d	=¤		â	"ì	
+&
+/
+3
+F
+X
+j
+'|
+¤
+ Á
+#â
+  2S$q$–'»%ã'	1Oo"�²Â×ì
)
C
#Y
#}
-¡
8Ï
2A;'}.¥YÔ_.;Ž)Ê!ô$;HP%™¿5Ü
+'"2Ug€›°½Ì
êø/
++:8fŸ
+µÀß'ñ+.I-xG¦3î""AId%®Ôçù":L$e*Š+µáþ5FXj€’²ÌÝìþ	
+/":%]ƒ�žµÑçù2Rfx�-®Üî/O)d/Ž¾Ðâé!ð.,An:Š%Å%ëC*=nC¬=ð".[Q?­í))S\vw*î&+Rr„‹(’»'Íõ*J#b$†,«.Ø, .4 c "€ ,£ .Ð !ÿ 1!!0S!2„!,·!.ä!#"7"W"(k"/”"!Ä"æ"(##,#+P#|#,•# Â#ã#ü#$0$P$#o$-“$"Á$ä$ö$%!%:%O%a%2|%$¯%&Ô%û%	&!%&DG&DŒ&/Ñ&'/'?C'ƒ'”'´'Ë'7Þ'(J(‰j(7ô(,)*F)q)‰)¡)·)È)Þ)#û)%*E*X*u*’*J¤*Jï*J:+I…+:Ï+;
+,:F,E�,6Ç,+þ,;*-Ff-Q­-/ÿ-B/.@r.;³.Kï..;/Fj/a±/=0&Q0.x0/§0-×0/1i51DŸ1dä1.I2,x2F¥2fì2CS3—3#¶3@Ú3847T4Œ4˜¬4	E5O5k5}5�5<¤52á5.6C6K6b6z6d’6÷66
+7=A7g7bç7=J8Eˆ81Î8(9$)9N94d9'™9$Á97æ9:/:G:^:o:‡:Ÿ:±:Ã:Õ:ç:;;.;?;W;v;2•;È;-á;+<+;<*g<	’<	œ<
+¦<
+±<¼<Ñ<à<õ<=1	=;=Z='y="¡=Ä=â=÷=>,>]K>=©>(ç>Z?Zk?EÆ?A@GN@W–@Wî@9FA9€A-ºA4èA9B4WB2ŒB7¿B5÷B7-CBeCE¨CBîCC1DAuD.·D2æD E[:E@–E:×E#F=6F<tF%±FN×F-&GOTG;¤G àG>H9@H
+zH1…H&·H&ÞH!I'I,FIJsI7¾I
öIJJ+J>J7QJ6‰JÀJ$àJ"KA(KjK,ˆK2µKèK¾øK»·LsMŽM©MBÉMDN*QNL|NÉNÞNŒíNzO0‚O9³OíOPPP3P:P2VPO‰PÙP*øP #QDQbQoQ ‰QªQ¾QÓQéQýQR*RGRXRlRNtRÃR#ÇRëR6S:S ZS8{S´SÆSÖSÞSóSTT/TBTLUT ¢TDÃTPUYUkU~U3™U!ÍUïU"öUV)V8V%KV'qV$™V*¾VéV0W,6WcW�W›W£W
»W%ÉWïW'X/XIXcXzXŒX£X7ºXòXY Y2YEYYYmYƒY™Y-¸Y)æY>ZgOZx·Z-0[!^[7€[¸[!Ñ[;ó[0/\5`\<–\<Ó\2]/C].s]=¢]/à]6^,G^ít^b`*r`0�`2Î`-aN/am~aìa6ýaG4b|b|•b?c+Rc!~c' cÈc1Þc3d2Dd-wd¥d"Ád0äd\eare{ÔeLPf$�fšÂfZ]ga¸gWh|rhAïhs1ix¥i?jv^jÕj$ðjrk€ˆk;	l!Elgl3{l/¯lLßl ,m_Mm­mÃmÓmFïmF6nF}n5Än#úno'o/3o2co–o.µo,äo(p.:p1ip!›p0½p îp%q%5qI[q¥q'µq!Ýq'ÿq'r%BrhrˆrF¨rïrs%s%Bs!hs;ŠsLÆsAt[Ut3±t,åt,u-?umu�u«u=Èu%v4,v*av%Œv?²v$òv&w*>w<iw¦wµw
ÄwÒw,éw8x+Ox{x:’x4Íx1y4y%Ryxy”yI yêyzG zhzN…zÔz=èz&{7{#J{)n{˜{ ¸{ Ù{1ú{,|;@|#||# |$Ä|#é|#
}1}J}P}X}-]}‹}£}¨}0®}4ß}~~'~-F~t~y~•~@š~Û~â~è~í~ò~ø~ü~+)-W)\†+¡jÍ)8€b€g€l€s€y€~€7…€½€Å€<Ì€7	�A�]�y�•�±�Í�!é�‚‚)‚
:‚
H‚
V‚
+d‚$o‚ ”‚Qµ‚ƒ~ƒt™ƒ „C/„s„/“„HÃ„3…/@…Bp…)³… Ý…þ…#†8†$G†l†	„†-Ž†&¼†Cã†-'‡/U‡9…‡¿‡3Ü‡
ˆˆ%ˆVBˆ`™ˆ#úˆ‰H;‰,„‰�±‰4AŠ*vŠ!¡ŠÃŠPãŠ#4‹/X‹4ˆ‹?½‹:ý‹&8ŒW_Œp·ŒE(�@n�A¯�5ñ�6'ŽA^Ž\ ŽÆýŽÆÄ�·‹�+C‘`o‘Ð‘rà‘DS’S˜’Eì’R2“F…“>Ì“{”€‡”d•?m•`­•q–>€–X¿–J—@c—H¤—Wí—>E˜r„˜‡÷˜‰™t	š	~švˆšWÿšaW›[¹›`œ�vœu�x|�xõ��nžzðžZkŸuÆŸG< |„ ½¡‰¿¡cI¢K­¢bù¢X\£cµ£Z¤rt¤ç¤tg¥�Ü¥l^¦œË¦œh§—¨�¨c¡©×ª¼Ýª�š«}+¬‘©¬Ã;­�ÿ­ù�®b{¯˜Þ¯�w°v±Ú±bZ²º½²x³(€³t©³=´;\´t˜´X
µMfµO´µr¶rw¶qê¶^\·„»·e@¸W¦¸Dþ¸.C¹pr¹dã¹YHºp¢ºP»pd»VÕ»|,¼Y©¼|½U€½YÖ½h0¾B™¾dÜ¾dA¿¢¦¿�IÀ˜ÚÀÿsÁYsÂfÍÂX4Ãb�ÃzðÃokÄ]ÛÄl9Åª¦ÅbQÆP´ÆTÇ1ZÇiŒÇ�öÇ~xÈŠ÷ÈS‚É>ÖÉvÊvŒÊ0Ëˆ4Ëa½Ë\Ì-|ÌsªÌgÍ2†Í\¹Í@ÎYWÎ;±Î:íÎ9(Ï0bÏr“Ï_Ð…fÐsìÐi`ÑÊÑyJÒPÄÒOÓpeÓhÖÓt?Ôb´ÔtÕNŒÕ�ÛÕœyÖb×5y×U¯×ØN…Ø7ÔØ*ÙF7Ù)~ÙN¨ÙS÷ÙqKÚq½Úœ/ÛœÌÛniÜFØÜMÝNmÝp¼Ý‚-Þt°ÞL%ßmrß=àß\à^{à`ÚàX;áD”á~Ùá“XâqìâG^ãz¦ãj!äNŒäPÛäl,åT™åFîåJ5æS€æPÔæX%çL~çKËçVèHnè1·èséèA]é]Ÿé.ýé^,êK‹ê_×êz7ëx²ë}+ì�©ì³:íºîí‰©î}3ïh±ïƒðcžð]ñR`ñ7³ñŠëñCvòxºò¸3ólìóYôBÙôHõ@eõc¦õª
+ö†µö…<÷ÑÂ÷v”øÅù¹Ñù‡‹úÄû¾ØûÉ—üƒaýaåýdGþ@¬þcíþRQÿI¤ÿpîÿp_jÐT;Z�_ëXKV¤Pû¸Lm&s%šlÀy-x§x z™“’¨S;U�GåR-	^€	dß	DD
+I‰
+UÓ
+P)†z^:`X›)ôP
Bo
>²
?ñ
T1K†FÒG@aE¢Dè›-uÉ›?JÛ&š¦hAOªºúYµdothä[Mn©€R™‘ì^~QÝ_/K�SÛL/T|uÑ’G�Ú j¯ž»~ZoÙ/I8y|² |/!}¬!ƒ*"_®"d#`s#aÔ#u6$^¬$`%tl%`á%^B&^¡&y'pz'gë'5S(r‰(nü(Uk)ZÁ)5*^R*F±*Kø*bD+r§+?,RZ,_­,Œ
-tš-:._J.|ª.O'/Uw/OÍ/T0Ar0±´0Zf1BÁ1b2tg2Ü2?\3^œ3_û3^[4Hº4Y5n]5CÌ5<6KM6E™6jß6ãJ7o.8zž8p9KŠ9ZÖ9M1:<:U¼:`;Zs;]Î;G,<]t<[Ò<T.=mƒ=™ñ=c‹>'ï>3?-K?ay?CÛ?_@@—Ž@§&AWÎAÛ&BRCœUCTòC\GDW¤DšüDz—EzFZ�FŽèF\wGHÔGhHQ†HJØHr#I‚–IŽJ}¨JP&K�wKsLH{LtÄLt9M\®M\N}hNŠæNLqOP¾OˆPG˜PSàPv4Q9«QuåQ[RºÛRu–SsT€€TUƒ�UwV’}V…Ww–W¦X~µXc4Y{˜YeZBzZR½Z([9[Y[\w[sÔ[H\WÈ\_ ]C€]ZÄ]-^?M^B�^?Ð^�_u _ˆ`UŸ`Eõ`w;aX³aZbœgb}ct‚ch÷c¿`dª eËeéeûef3fUPf¶¦fw]g"Õg?øg8h;;hwh2�hÂh×h2ôh'iCifWi¾i&Ûi)jN,jf{jrâj€UkSÖkW*ll‚lyïl imqŠm(üm %nFn#On$sn$˜n!½n"ßn2o;5o/qo0¡oÒoQçoZ9pT”pXépzBq½qAÜq\rh{rfärhKs!´sCÖs.tItZt,at.Žt½tÕtBêt(-u?VuA–u(Øu/vA1v:sv6®v6åv9w7Vw9Žw/Èw1øw1*x4\x1‘x4Ãx6øx2/y0byS“y#çy?zNKzUšzvðzjg{QÒ{V$|Q{|°Í|›~}p~M‹~:Ù~0&ErlPß40€de€&Ê€ñ€X�%[�/��7±�8é�("‚$K‚*p‚›‚º‚ŠØ‚]cƒdÁƒ*&„Q„?^„ž„5¼„ò„8…M?…B�…oÐ…_@†= †9Þ†}‡L–‡%ã‡'	ˆ?1ˆ?qˆ±ˆ+Ñˆ*ýˆd(‰c�‰@ñ‰%2ŠjXŠÃŠÛŠôŠ‹;&‹4b‹(—‹À‹ß‹ó‹ú‹
+Œ9 ŒZŒRrŒOÅŒ�+�C�,`���­�3Á�õ�1ŽGŽ]ŽyŽ2–ŽUÉŽ�7�K�'e�;��,É�Zö�`Q�²�#Ë�ï�ö�;ý�J9‘H„‘-Í‘Gû‘4C’4x’(­’pÖ’yG“Á“kA”@­”¸î”†§•4.–5c–X™–ò–3	—¾=—Sü—P˜Fn˜Vµ˜™%™,™T3™ˆ™?¤™1ä™1š3Hš(|šJ¥š=ðšQ.›W€›QØ›W*œ3‚œ:¶œQñœWC�?›�RÛ�Y.ž_ˆžQèžW:ŸD’Ÿ4×Ÿ E+ Vq 1È 'ú :"¡:]¡N˜¡&ç¡C¢9R¢+Œ¢4¸¢í¢9
+£/D£Ft£N»£F
+¤*Q¤&|¤/£¤6Ó¤/
+¥-:¥7h¥c ¥H¦`M¦B®¦ñ¦H§I§É§sI¨.½¨`ì¨”M©â©9ý©/7ª-gª‚•ª«†!«á¨«eŠ¬0ð¬d!­2†­+¹­5å­0®5L®:‚®4½®7ò®'*¯7R¯:Š¯Å¯—ã¯�{°‰	±�“±u#²g™²p³Œr³pÿ³wp´˜è´¼�µæ>¶¦%·•Ì·Âb¸˜%¹¹¾¹nxº¼çº¤»‡¦¼].½lŒ½Tù½_N¾a®¾º¿Ë¿±KÀbýÀ``ÁŽÁÁ°PÂ{ÃD}ÃRÂÃ†ÄtœÄeÅ9wÅ±Å	¹Æ#ÃÆ'çÆ'Ç+7ÇmcÇTÑÇN&ÈuÈ6‚È&¹È,àÈ�
É%«ÉRÑÉO$Ê±tÊ¤&ËYËËf%ÌFŒÌ=ÓÌ>Í*PÍt{Í]ðÍMNÎ|œÎ(Ï9BÏ8|Ï(µÏ9ÞÏ5Ð)NÐ)xÐ)¢Ð)ÌÐ;öÐ72Ñ)jÑ(”Ñ3½ÑLñÑB>ÒP�Ò0ÒÒ[ÓY_ÓY¹ÓPÔdÔ{Ô’ÔªÔ!ÂÔäÔóÔÕÕR Õ4sÕ,¨ÕRÕÕQ(ÖBzÖ2½ÖðÖ3	×d=×§¢×fJØM±Ø¨ÿØ¢¨ÙuKÚxÁÚk:Û×¦Û×~ÜpVÝzÇÝmBÞ\°Þa
ß\oßeÌß‹2àh¾à‹'á~³á�2âŽÀâ‰Oã†ÙãV`äX·äBå«SåuÿåzuæNðæp?çm°çEèšdèOÿè«OéoûéEkêg±êbë|ëb‹ëRîëTAìI–ìGàìZ(í”ƒízî“î5±îçîûîïj!ïqŒï@þïB?ð8‚ðŽ»ð@JñO‹ñ[Ûñ7òaWò[¹ó6õ=LõHŠõxÓõtLöhÁö—*÷&Â÷é÷ø
ùZ"ùK}ù7Éùúú75úmú.|úi«ú¬ûBÂûWü;]üY™üóü2ýO>ý)Žý*¸ý+ãý(þ+8þ,dþ+‘þ½þ.Ýþÿv#ÿšÿ@¡ÿ-âÿj={<¹cö)Z.„³/Ð./CWj¯}4-˜b„û€&Ÿ7ÆmþPl½7Ê-!OOQŸDñ\69“PÍS5r3¨Ü/ï	T?	5”	MÊ	7
+4P
+6…
+)¼
+4æ
+)gEV­$!)"K#n#’%¶%Ü8
\;
T˜
…í
÷skRnRÁr7‡J¿g
+brvÕmLmº^(S‡\Û}8j¶f!Uˆ�ÝgóAX]˜1Ð�rb:Yð
+kê4ÏrGJêæ‘(äOÒªqúçîß/ièB_Œ¾Snwx½RŽÐ	[ïÌT+‚ÿ| Ì¡†c2ºÐFÀí?\ÿJM>ŸAqÀŸ²VýIÔ^š­Ç/rÒä—Ô£HÈ®²è‡bHÔGûì¾Ãn™�®–%­ÊñIkc¶“2<Êº�¥Y´§X5“$
\7÷àã²©æEéãšz´V|ÓòˆK­˜EouÄ$VJK¡»†>Ûì¨
+èñ¢â&	¨k'¸sØv.9¤b†át ˜Ýioðõ[½ÖašŽœžÄQ8‘@ «³dÍ¬zØ8ÅêCt”idþBf–§ž*oÃìËEÞ—ôþ]ºcl0ÑÎ¹\8¼,)œ™�\PõíÁmT±ê�•¬BÇY‰;]¤0ayON£�X6³ÖSu:1r€3"‡n	ö±[rƒÓ=§^=IåMÄ$%X¶<¾”p-á:Á¬�Â@3üRÉOÅeÅµŸ¹ç{÷Œ^ñö›	¶¦¥=e´ç(UˆhD¸Üã5…27e*sôù.é4äMXW	OP_eÉQÛèjÅkLë‚Œ™©1SÅ½³6,Jœ:¿P.’Ö˜Ñ*ë¸ÝU}jt#Ùat~8<ÿ­0!¦uüVÆZ	;�Í³÷ù¬+`ø°`Ê@ÈØ¹ $µ°_Ö£G€‰lò~¯¹!ÞÙ{;…Àóq{M’ˆ¿¼URÇ(!¢C(þïv‹¿JLnIjÒskmswŠG#(?ë¥#"@q�¨Ü’÷+!„Ç‹J6ÒÎÈÚ]‡d'Ô„p¶OÂbîÂ]žÈ›Z
V�x\˜�¦·zur²Á‚Œ™GX;¼ÚˆS?&=xÕ-#©òHEoNcõgÁ¨pÞù*œ¾6«�óúF‡Æ1òdRÆ'
+ÖýeUWC·–>-ËNàÌzé›ZŽ»–K»•ƒi%`Ä¡Ã:h¤¤.k
+n KÛZ*¤w³(I&já ßí/º&A·L�+‘·�å—o4)%6žßûð"ú`‹vâû€ï9úZ}Õ‘,®vzø9+Žní…­â×š=
g)jÊtþUŒiw¿
+ƒ”‚QáW¸Ú2¡m«±!¥÷ûÚ>¢¾+°aYž’d_À€pý_Šæ„ôµ±Ÿ¯ÞÎgÔ½Ûô’gPÿ,•é?�à,Ù
‰ŸÌ§A@á�530^fÌ{¯ú<«×µ5ZRx�-hùBN)…PÒußR „å/�Amyv2€véD>ÝOøNýË8lº±´/›|$Á'D\œIÐ~ãø‹¦ï"V‹Ú;Qùf�l/Š-�Äh$Õ
pÇË—FðàfH"9hâg6ø4”ƒªª}×²Ù|S-°^9%õeØ�a<EWD<ÏÕÎ%•ÿ[puwèìÙh�ÈDyû!£Í:§†; Ym5·bß¥”}ÜÑªWÊÑ…Þöä¦¯8°qñ~]ŠAF)d«Y7M[là—Õ}4ëw�ÂKóC‰F¬ˆ„•"ë>fU3¢f3GØN*ÀÉô
`ñóÎ[îT¸ö¹b»–2FÃÉ7å|Ó.t†TÑ
+?T“Hi.M›µÓîìCEçƒLoòÐqs¢ËÆŽy&®#D™âõ‘'ý`{ðÝ0¯Âüa�x9BC½#¡‚BQÉ“ä¿&ŠªÃ×ÛLüþsLÍ¨y ãç1æ'31K´@QÏ5‡T4Ü©Ó)¶‰Wíl7ÏcH®©S_î¼Ü7æï×~ÍÏ^üåšm »“öPc=,?Æê0¼ j£	    TLS: %A	Export Address Table 			Export Address Table 		%08lx
+	Name Pointer Table 			Ordinal Table 				[Name Pointer/Ordinal] Table	%08lx
+	code-base %08lx toc (loadable/actual) %08lx/%08lx
+	non-TLS: %A	reloc %4d offset %4x [%4lx] %s	vma:  Hint/Ord Member-Name Bound-To
+
+	DLL Name: %s
+
+
+PE File Base Relocations (interpreted .reloc section contents)
+
+      End+1 symbol: %-7ld   Type:  %s
+      End+1 symbol: %ld
+      First symbol: %ld
+      Local symbol: %ld
+      Type: %s
+      enum; End+1 symbol: %ld
+      struct; End+1 symbol: %ld
+      union; End+1 symbol: %ld
+ version array off: %u
+
+Characteristics 0x%x
+
+Dynamic Section:
+
+Exec Auxiliary Header
+
+Export Address Table -- Ordinal Base %ld
+
+Function descriptor located at the start address: %04lx
+
+No reldata section! Function descriptor not decoded.
+
+Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+
+Program Header:
+
+Stack size for functions.  Annotations: '*' max stack, 't' tail call
+
+The Export Tables (interpreted %s section contents)
+
+
+The Function Table (interpreted .pdata section contents)
+
+The Import Tables (interpreted %s section contents)
+
+There is a first thunk, but the section containing it could not be found
+
+There is an export table in %s at 0x%lx
+
+There is an export table in %s, but it does not fit into that section
+
+There is an export table, but the section containing it could not be found
+
+There is an import table in %s at 0x%lx
+
+There is an import table, but the section containing it could not be found
+
+Version References:
+
+Version definitions:
+
+Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld
+
+WARNING: Extra data in .rsrc section - it will be ignored by Windows:
+
+[Ordinal/Name Pointer] Table
+
+ppcboot header:
+        pc: 0x%08x
+    *unhandled* cmd %u
+    address: 0x%08x, size: %u
+    flags: %u, address: 0x%08x, pd-address: 0x%08x
+    global name: %.*s
+    linkage index: %u, replacement insn: 0x%08x
+    name: %.*s
+    pc: 0x%08x
+    pc: 0x%08x line: %5u
+    psect idx 1: %u, offset 1: 0x%08x %08x
+    psect idx 2: %u, offset 2: 0x%08x %08x
+    psect idx 3: %u, offset 3: 0x%08x %08x
+    psect: %u, offset: 0x%08x %08x
+    routine name: %.*s
+   %02u    %s%s %s
+   (type: %3u, size: 4+%3u):    *unhandled* cmd %u
+   alignment  : 2**%u
+   alloc (len)   : %u (0x%08x)
+   alloc (len): %u (0x%08x)
+   ascii ident   : %.*s
+   binary ident  : 0x%08x
+   bitmap: 0x%08x (count: %u):
+   code address: 0x%08x
+   compile date   : %.17s
+   compiler   : %.*s
+   completion code: %u
+   copyright: %.*s
+   declfile: len: %u, flags: %u, fileid: %u
+   deflines %u
+   entity name   : %.*s
+   entry point: 0x%08x
+   error severity: %x
+   file: %.*s
+   filename   : %.*s
+   flags         : 0x%08x   flags      : 0x%04x   flags: %d, language: %u, major: %u, minor: %u
+   flags: 0x%04x   formfeed
+   id match      : %x
+   image offset  : 0x%08x
+   language name: %.*s
+   linkage index: %u, global: %.*s
+   linkage index: %u, procedure name: %.*s
+   linkage index: %u, procedure: %.*s
+   linkage index: %u, psect: %u, offset: 0x%08x %08x
+   max record size: %u
+   module name    : %.*s
+   module name: %.*s
+   module version : %.*s
+   name          : %.*s
+   name        : %.*s
+   name       : %.*s
+   number of cond linkage pairs: %u
+   object name   : %.*s
+   offset: 0x%08x, val: 0x%08x
+   proc descr : 0x%08x
+   psect index : %u
+   psect index for entry point : %u
+   psect index: %u
+   psect offset: %u
+   psect offset: 0x%08x
+   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u
+   setfile %u
+   setlnum %u
+   setrec %u
+   signature: %.*s
+   structure level: %u
+   symbol vector offset: 0x%08x
+   symvec offset : 0x%08x
+   title: %.*s
+   transfer addr flags: 0x%02x
+   transfer addr psect: %u
+   transfer address   : 0x%08x
+   vector      : 0x%08x
+   version mask: 0x%08x
+  %s (len=%u+%u):
+  %s: 0x%v
+  %u: size: %u, flags: 0x%02x, name: %.*s
+  EEOM (len=%u):
+  EGSD (len=%u):
+  EGSD entry %2u (type: %u, len: %u):   EMH %u (len=%u):   base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x   base_va : 0x%08x
+  bitcount: %u, base addr: 0x%08x
+  calls:
+  chgprtoff : %5u
+  codeadroff: %5u, lpfixoff  : %5u
+  fixuplnk: 0x%08x %08x
+  flags: 0x%08x
+  iaflink : 0x%08x %08x
+  image %u (%u entries)
+  image %u (%u entries), offsets:
+  lppsbfixoff: %5u
+  psect start: 0x%08x, length: %u
+  qdotadroff: %5u, ldotadroff: %5u
+  qrelfixoff: %5u, lrelfixoff: %5u
+  required from %s:
+  shlextra  : %5u, permctx   : %5u
+  shlstoff  : %5u, shrimgcnt : %5u
+  size : %u
+ %08x 0x%08x 64B <EABI version unrecognised> BPAGE: %u COM COMM Change Protection (%u entries):
+ Code Address Reference Fixups:
+ DEF EXE First address : 0x%08x 0x%08x
+ Fourth address: 0x%08x 0x%08x
+ GBL Glue code sequence LIB Linkage Pairs Reference Fixups:
+ NOMOD NORM OVR PIC QVAL RD REL Register restore millicode Register save millicode SHR Second address: 0x%08x 0x%08x
+ Shareable images:
+ Shared image  : 0x%08x 0x%08x
+ Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d
+ Third address : 0x%08x 0x%08x
+ UNI VEC VECEP WEAK WRT [BE8] [FPA float format] [G10] [LE8] [Maverick float format] [VFP float format] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [XGATE RAM offsetting] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [abiv%ld] [absolute position] [d-float] [dynamic symbols use segment index] [fix dep] [floats passed in float registers] [floats passed in integer registers] [g-float] [hard-float ABI] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [mapping symbols precede others] [memory=bank-model] [memory=flat] [new ABI] [no abi set] [nonpic] [not 32bitmode] [old ABI] [pic] [position independent] [relocatable executable] [soft-float ABI] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table] [v10 and v32] [v32] corrupted GST
+ debug module table : vbn: %u, size: %u
+ debug symbol table : vbn: %u, size: %u (0x%x)
+ fixup info rva:  flags: 0x%04x global symbol table: vbn: %u, records: %u
+ ident: 0x%08x, name: %.*s
+ ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u
+ image build ident: %.*s
+ image ident      : %.*s
+ image name       : %.*s
+ image type: %u (%s) img I/O count: %u, nbr channels: %u, req pri: %08x%08x
+ link time        : %s
+ linker flags: %08x: linker ident     : %.*s
+ long-word .address reference fixups:
+ long-word relocation fixups:
+ majorid: %u, minorid: %u
+ module offset: 0x%08x, size: 0x%08x, (%u psects)
+ offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u
+ quad-word .address reference fixups:
+ quad-word relocation fixups:
+ section: base: 0x%08x%08x size: 0x%08x
+ type: %3u, len: %3u (at 0x%08x):  unhandled EOBJ record type %u
+ vbn: %u, pfc: %u, matchctl: %u type: %u ( vma:			Begin Address    End Address      Unwind Info
+ vma:		Begin    End      EH       EH       PrologEnd  Exception
+     		Address  Address  Handler  Data     Address    Mask
+ vma:		Begin    Prolog   Function Flags    Exception EH
+     		Address  Length   Length   32b exc  Handler   Data
+ vma:            Hint    Time      Forward  DLL       First
+                 Table   Stamp     Chain    Name      Thunk
+#<Invalid error code>%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d
+%*.s Entry: %A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections%A has both ordered and unordered sections%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)
+%A:0x%v not found in function table
+%B (%s): Section flag %s (0x%x) ignored%B and %B are for different configurations%B and %B are for different cores%B contains CRIS v32 code, incompatible with previous objects%B contains non-CRIS-v32 code, incompatible with previous objects%B has has both the current and legacy Tag_MPextension_use attributes%B is not allowed to define %s%B section %A exceeds stub group size%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section%B uses unknown e_flags 0x%lx%B(%A): error: call to undefined function '%s'%B(%A): internal error: dangerous relocation%B(%A): internal error: out of range error%B(%A): internal error: unknown error%B(%A): internal error: unsupported relocation error%B(%A): invalid property table%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte.%B(%A): warning: unaligned access to symbol '%s' in the small data area%B(%A): warning: unaligned small data access of type %d.%B(%A+0x%%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link%B(%A+0x%lx): %s relocation against SEC_MERGE section%B(%A+0x%lx): %s relocation against external symbol "%s"%B(%A+0x%lx): %s used with TLS symbol %s%B(%A+0x%lx): %s used with non-TLS symbol %s%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object%B(%A+0x%lx): Stabs entry has invalid string index.%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section%B(%A+0x%lx): cannot handle %s for %s%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch%B(%A+0x%lx): could not decode instruction; possible configuration mismatch%B(%A+0x%lx): invalid instruction for TLS relocation %s%B(%A+0x%lx): reloc against `%s': error %d%B(%A+0x%lx): relocation offset out of range (size=0x%x)%B(%A+0x%lx): unexpected fix for %s relocation%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'%B(%A+0x%lx): unresolvable relocation against symbol `%s'%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete
+%B(%s): warning: interworking not enabled.
+  first occurrence: %B: ARM call to Thumb%B(%s): warning: interworking not enabled.
+  first occurrence: %B: Thumb call to ARM%B(%s): warning: interworking not enabled.
+  first occurrence: %B: arm call to thumb%B(%s): warning: interworking not enabled.
+  first occurrence: %B: thumb call to arm
+  consider relinking with --support-old-code enabled%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'%B, section %A:
+  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC%B, section %A:
+  relocation %s should not be used in a shared object; recompile with -fPIC%B, section %A:
+  v10/v32 compatible object %s must not contain a PIC relocation%B, section %A: No PLT for relocation %s against symbol `%s'%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?%B, section %A: relocation %s is not allowed for global symbol: `%s'%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?%B, section %A: relocation %s with no GOT created%B, section %A: relocation %s with non-zero addend %d against local symbol%B, section %A: relocation %s with non-zero addend %d against symbol `%s'%B, section %A: unresolvable relocation %s against symbol `%s'%B, section `%A', to symbol `%s':
+  relocation %s should not be used in a shared object; recompile with -fPIC%B: !samegp reloc against symbol without .prologue: %s%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled.%B: %s
+%B: %s not absolute%B: %s' accessed both as normal and thread local symbol%B: %s: invalid needed version %d%B: %s: invalid version %u (max %d)%B: '%s' accessed both as normal and thread local symbol%B: .got subsegment exceeds 64K (size %d)%B: .opd is not a regular array of opd entries%B: .preinit_array section is not allowed in DSO%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32%B: 0x%lx: fatal: reloc overflow while relaxing%B: 0x%lx: fatal: unaligned %s relocation 0x%lx%B: 0x%lx: fatal: unaligned branch target for relax-support relocation%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%B: 0x%lx: warning: bad R_SH_USES load offset%B: 0x%lx: warning: bad R_SH_USES offset%B: 0x%lx: warning: bad count%B: 0x%lx: warning: could not find expected COUNT reloc%B: 0x%lx: warning: could not find expected reloc%B: 0x%lx: warning: symbol in unexpected section%B: @gprel relocation against dynamic symbol %s%B: @internal branch to dynamic symbol %s%B: @pcrel relocation against dynamic symbol %s%B: ABI is incompatible with that of the selected emulation%B: ABI mismatch: linking %s module with previous %s modules%B: ABI version %ld is not compatible with ABI version %ld output%B: ASE mismatch: linking %s module with previous %s modules%B: Alignment mismatch with previous modules%B: Architecture mismatch with previous modules%B: BE8 images only valid in big-endian mode.%B: Bad relocation record imported: %d%B: CALL15 reloc at 0x%lx not against global symbol%B: CALL16 reloc at 0x%lx not against global symbol%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000).%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch.%B: Cannot handle compressed Alpha binaries.
+   Use compiler flags, or objZ, to generate uncompressed binaries.%B: Cannot link together %s and %s objects.%B: Corrupt size field in group section header: 0x%lx%B: Failed to add renamed symbol %s%B: Function descriptor relocation with non-zero addend%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d%B: GOT overflow: Number of relocations with 8-bit offset > %d%B: GOT reloc at 0x%lx not expected in executables%B: IMPORT AS directive for %s conceals previous IMPORT AS%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte%B: Instruction set mismatch with previous modules%B: Invalid relocation type imported: %d%B: Malformed reloc detected for section %s%B: Nested OMIT_FP in %A.%B: No symbol version section for versioned symbol `%s'%B: Not enough room for program headers, try linking with -N%B: Only registers %%g[2367] can be declared using STT_REGISTER%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive%B: Relocation %s (%d) is not currently supported.
+%B: Relocations in generic ELF (EM: %d)%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined%B: TLS local exec code cannot be linked into shared objects%B: TLS sections are not adjacent:%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed%B: The first section in the PT_DYNAMIC segment is not the .dynamic section%B: The target (%s) of an %s relocation is in the wrong section (%A)%B: Too many sections: %d (>= %d)%B: Unable to sort relocs - they are in more than one size%B: Unable to sort relocs - they are of an unknown size%B: Unhandled import type; %x%B: Unknown mandatory EABI object attribute %d%B: Unknown relocation type %d
+%B: Unknown section type in a.out.adobe file: %x
+%B: Unmatched OMIT_FP in %A.%B: Unrecognised .directive command: %s%B: Unrecognised import name type; %x%B: Unrecognised import type; %x%B: Unrecognised machine type (0x%x) in Import Library Format archive%B: Unrecognized storage class %d for %s symbol `%s'%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s%B: Warning: Thumb BLX instruction targets thumb function '%s'.%B: Warning: bad `%s' option size %u smaller than its header%B: Warning: cannot determine the target function for stub section `%s'%B: Warning: thumb mode PLT generation not currently supported%B: XMC_TC0 symbol `%s' is class %d scnlen %d%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC%B: `%s' accessed both as FDPIC and thread local symbol%B: `%s' accessed both as normal and FDPIC symbol%B: `%s' accessed both as normal and thread local symbol%B: `%s' has line numbers but no enclosing section%B: `%s' in loader reloc but not loader sym%B: `ld -r' not supported with PE MIPS objects
+%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d%B: bad pair/reflo after refhi
+%B: bad reloc address 0x%lx in section `%A'%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'%B: bad section length in ihex_read_section%B: bad string table size %lu%B: bad symbol index: %d%B: cannot create stub entry %s%B: change in gp: BRSGP %s%B: class %d symbol `%s' has no aux entries%B: compiled for a 64 bit system and target is 32 bit%B: compiled for a big endian system and target is little endian%B: compiled for a little endian system and target is big endian%B: compiled normally and linked with modules compiled with -mrelocatable%B: compiled with -mrelocatable and linked with modules compiled normally%B: could not find output section %A for input section %A%B: could not find output section %s%B: could not read contents of section `%A'
+%B: csect `%s' not in enclosing section%B: don't know how to handle OS specific section `%s' [0x%8x]%B: don't know how to handle allocated, application specific section `%s' [0x%8x]%B: don't know how to handle processor specific section `%s' [0x%8x]%B: don't know how to handle section `%s' [0x%8x]%B: dtp-relative relocation against dynamic symbol %s%B: duplicate export stub %s%B: duplicate section `%A' has different contents
+%B: duplicate section `%A' has different size
+%B: endianness incompatible with that of the selected emulation%B: error: ABI mismatch with previous modules.%B: error: Cannot set _ITB_BASE_%B: error: Cortex-A8 erratum stub is allocated in unsafe location%B: error: Cortex-A8 erratum stub out of range (input file too large)%B: error: Instruction set mismatch with previous modules.%B: error: VFP11 veneer out of range%B: error: unaligned relocation type %d at %08x reloc %p
+%B: error: unknown mandatory EABI object attribute %d%B: error: unknown relocation type %d.%B: file class %s incompatible with %s%B: gp-relative relocation against dynamic symbol %s%B: hidden symbol `%s' in %B is referenced by DSO%B: hidden symbol `%s' isn't defined%B: ignoring duplicate section `%A'
+%B: illegal relocation type %d at address 0x%lx%B: illegal symbol index in reloc: %d%B: incompatible machine type. Output is 0x%x. Input is 0x%x%B: indirect symbol `%s' to `%s' is a loop%B: internal error in ihex_read_section%B: internal symbol `%s' in %B is referenced by DSO%B: internal symbol `%s' isn't defined%B: invalid SHT_GROUP entry%B: invalid link %lu for reloc section %s (index %u)%B: invalid relocation type %d%B: invalid string offset %u >= %lu for section `%s'%B: jump too far away
+%B: linking %s module with previous %s modules%B: linking 32-bit code with 64-bit code%B: linking 64-bit files with 32-bit files%B: linking UltraSPARC specific with HAL specific code%B: linking auto-pic files with non-auto-pic files%B: linking big-endian files with little-endian files%B: linking constant-gp files with non-constant-gp files%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double%B: linking files compiled for HCS12 with others compiled for HC12%B: linking little endian files with big endian files%B: linking non-pic code in a position independent executable%B: linking trap-on-NULL-dereference with non-trapping files%B: loader reloc in read-only section %A%B: loader reloc in unrecognized section `%s'%B: local symbol `%s' in %B is referenced by DSO%B: misplaced XTY_LD `%s'%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'.%B: no group info for section %A%B: non-pic code with imm relocation against dynamic symbol `%s'%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table%B: pc-relative relocation against dynamic symbol %s%B: pc-relative relocation against undefined weak symbol %s%B: probably compiled without -fPIC?%B: protected symbol `%s' isn't defined%B: reloc %s:%d not in csect%B: reloc against a non-existant symbol index: %ld%B: relocation %s against %s `%s' can not be used when making a shared object%s%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC%B: relocation %s against symbol `%s' isn't supported in x32 mode%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s%B: relocation %s can not be used when making a shared object; recompile with -fPIC%B: relocation %s cannot be used when making a shared object%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend%B: relocation size mismatch in %B section %A%B: relocs in section `%A', but it has no contents%B: section %A lma %#lx adjusted to %#lx%B: section %s: string table overflow at offset %ld%B: section `%A' can't be allocated in segment %d%B: sh_link [%d] in section `%A' is incorrect%B: sh_link of section `%A' points to discarded section `%A' of `%B'%B: sh_link of section `%A' points to removed section `%A' of `%B'%B: size field is zero in Import Library Format header%B: speculation fixup to dynamic symbol %s%B: stack size specified and %s set%B: string not null terminated in ILF object file.%B: symbol `%s' has unrecognized csect type %d%B: symbol `%s' has unrecognized smclas %d%B: symbol `%s' required but not present%B: taking the address of protected function '%s' cannot be done when making a shared library%B: the target (%s) of a %s relocation is in the wrong output section (%s)%B: too many sections (%d)%B: too many sections: %u%B: tp-relative relocation against dynamic symbol %s%B: unable to fill in DataDictionary[12] because .idata$5 is missing%B: unable to fill in DataDictionary[1] because .idata$2 is missing%B: unable to fill in DataDictionary[1] because .idata$4 is missing%B: unable to fill in DataDictionary[9] because __tls_used is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing%B: unable to find ARM glue '%s' for `%s'%B: unable to find THUMB glue '%s' for `%s'%B: unable to find VFP11 veneer `%s'%B: unable to get decompressed section %A%B: unable to initialize compress status for section %s%B: unable to initialize decompress status for section %s%B: undefined reference to symbol '%s'%B: undefined sym `%s' in .opd section%B: undefined symbol on R_PPC64_TOCSAVE relocation%B: unexpected ATN type %d in external part%B: unexpected redefinition of indirect versioned symbol `%s'%B: unexpected reloc type %u in .opd section%B: unexpected type after ATN%B: unhandled dynamic relocation against %s%B: unimplemented %s
+%B: unimplemented ATI record %u for symbol %u%B: unknown [%d] section `%s' in group [%s]%B: unknown load command 0x%lx%B: unknown relocation type %d%B: unknown/unsupported relocation type %d%B: unrecognized relocation (0x%x) in section `%A'%B: unsupported relocation type %i%B: unsupported relocation type %i
+%B: unsupported relocation type %s%B: unsupported relocation: ALPHA_R_GPRELHIGH%B: unsupported relocation: ALPHA_R_GPRELLOW%B: uses _-prefixed symbols, but writing file with non-prefixed symbols%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%B: uses non-prefixed symbols, but writing file with _-prefixed symbols%B: version node not found for symbol %s%B: warning: COMDAT symbol '%s' does not match section name '%s'%B: warning: Empty loadable segment detected, is this intentional ?
+%B: warning: Endian mismatch with previous modules.%B: warning: Incompatible elf-versions %s and  %s.%B: warning: Older version of object file encountered, Please recompile with current tool chain.%B: warning: allocated section `%s' not in segment%B: warning: duplicate line number information for `%s'%B: warning: illegal symbol index %ld in line numbers%B: warning: illegal symbol index %ld in relocs%B: warning: line number table read failed%B: warning: linking PIC files with non-PIC files%B: warning: linking abicalls files with non-abicalls files%B: warning: relocate SDA_BASE failed.%B: warning: selected VFP11 erratum workaround is not necessary for target architecture%B: warning: sh_link not set for section `%A'%B: warning: unaligned access to GOT entry.%B: warning: unknown EABI object attribute %d%B:%A%s exceeds overlay size
+%B:%A: Warning: deprecated Red Hat reloc %B:%d: Bad checksum in S-record file
+%B:%d: Unexpected character `%s' in S-record file
+%B:%d: unexpected character `%s' in Intel Hex file%B:%u: bad checksum in Intel Hex file (expected %u, found %u)%B:%u: bad extended address record length in Intel Hex file%B:%u: bad extended linear address record length in Intel Hex file%B:%u: bad extended linear start address length in Intel Hex file%B:%u: bad extended start address length in Intel Hex file%B:%u: unrecognized ihex type %u in Intel Hex file%C: warning: relocation to "%s" references a different segment
+%F%P: already_linked_table: %E
+%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie
+%H __tls_get_addr lost arg, TLS optimization disabled
+%H arg lost __tls_get_addr, TLS optimization disabled
+%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend
+%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend
+%H: R_FRV_GETTLSOFF not applied to a call instruction
+%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction
+%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction
+%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction
+%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction
+%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction
+%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction
+%H: R_FRV_TLSMOFFHI not applied to a sethi instruction
+%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction
+%H: cannot emit dynamic relocations in read-only section
+%H: cannot emit fixups in read-only section
+%H: reloc against `%s' references a different segment
+%H: reloc against `%s': %s
+%H: relocation references symbol not defined in the module
+%H: relocation to `%s+%v' may have caused the error above
+%P%F: --relax and -r may not be used together
+%P%F: failed creating ex9.it %s hash table: %E
+%P%X: can not read symbols: %E
+%P%X: read-only segment has dynamic relocations.
+%P: %B: %s is not supported for `%T'
+%P: %B: cannot create stub entry %s
+%P: %B: relocation %s is not yet supported for symbol %s
+%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)
+%P: %B: unexpected relocation type
+%P: %B: unknown relocation type %d for `%T'
+%P: %B: unknown relocation type %d for symbol %s
+%P: %B: warning: relocation against `%s' in readonly section `%A'.
+%P: %B: warning: relocation in readonly section `%A'.
+%P: %H: %s against `%T': error %d
+%P: %H: %s for indirect function `%T' unsupported
+%P: %H: %s references optimized away TOC entry
+%P: %H: %s reloc against `%s': error %d
+%P: %H: %s reloc against local symbol
+%P: %H: %s used with TLS symbol `%T'
+%P: %H: %s used with non-TLS symbol `%T'
+%P: %H: @local call to ifunc %s
+%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC
+%P: %H: error: %s against `%s' not a multiple of %u
+%P: %H: error: %s not a multiple of %u
+%P: %H: non-zero addend on %s reloc against `%s'
+%P: %H: relocation %s for indirect function %s unsupported
+%P: %H: toc optimization is not supported for %s instruction.
+%P: %H: unresolvable %s against `%T'
+%P: %H: unresolvable %s relocation against symbol `%s'
+%P: %s not defined in linker created %s
+%P: %s offset too large for .eh_frame sdata4 encoding%P: .opd not allowed in ABI version %d
+%P: DW_EH_PE_datarel unspecified for this architecture.
+%P: alternate ELF machine code found (%d) in %B, expecting %d
+%P: bss-plt forced by profiling
+%P: bss-plt forced due to %B
+%P: can't build branch stub `%s'
+%P: can't find branch stub `%s'
+%P: cannot find opd entry toc for `%T'
+%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc
+%P: dynreloc miscount for %B, section %A
+%P: error in %B(%A); no .eh_frame_hdr table will be created.
+%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.
+%P: linkage table error against `%T'
+%P: long branch stub `%s' offset overflow
+%P: multiple entry points: in modules %B and %B
+%P: relocatable link is not supported
+%P: stubs don't match calculated size
+%P: symbol '%s' has invalid st_other for ABI version 1
+%P: warning: creating a DT_TEXTREL in a shared object.
+%X%C: relocation to "%s" references a different segment
+%X%P: %B(%A): relocation "%R" goes out of range
+%X%P: overlay section %A does not start on a cache line.
+%X%P: overlay section %A is larger than a cache line.
+%X%P: overlay section %A is not in cache area.
+%X%P: overlay sections %A and %A do not start at the same address.
+%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B
+%s defined on removed toc entry%s duplicated
+%s duplicated in %s
+%s in overlay section%s(%s): relocation %d has invalid symbol index %ld%s: %s: reloc overflow: 0x%lx > 0xffff%s: .rsrc merge failure: corrupt .rsrc section%s: 0x%v 0x%v
+%s: Bad symbol definition: `Main' set to %s rather than the start address %s
+%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
+%s: GAS error: unexpected PTB insn with R_SH_PT_16%s: Internal inconsistency error for value for
+ linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx
+%s: Invalid relocation type exported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: Malformed reloc detected for section %s%s: No core to allocate a symbol %d bytes long
+%s: No core to allocate section name %s
+%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A%s: TLS definition in %B section %A mismatches non-TLS reference in %B%s: TLS reference in %B mismatches non-TLS definition in %B section %A%s: TLS reference in %B mismatches non-TLS reference in %B%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry%s: The target (%s) of an %s relocation is in the wrong section (%s)%s: Unsupported transition from %s to %s%s: XCOFF shared object when not producing XCOFF output%s: __gp does not cover short data segment%s: access beyond end of merged section (%ld)%s: address 0x%s out of range for Intel Hex file%s: base-plus-offset relocation against register symbol: %s in %s%s: base-plus-offset relocation against register symbol: (unknown) in %s%s: can not represent section `%s' in a.out object file format%s: can not represent section `%s' in oasys%s: can not represent section for symbol `%s' in a.out object file format%s: cannot allocate file name for file number %d, %d bytes
+%s: cannot create stub entry %s%s: cannot link fdpic object file into non-fdpic executable%s: cannot link non-fdpic object file into fdpic executable%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled with %s and linked with modules compiled with %s%s: compiled with %s and linked with modules that use non-pic relocations%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: directive LOCAL valid only with a register or absolute value%s: dynamic object with no .loader section%s: encountered datalabel symbol in input%s: error: unaligned relocation type %d at %08x reloc %08x
+%s: illegal section name `%s'%s: internal error, internal register section %s had contents
+%s: internal error, symbol table changed size from %d to %d words
+%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)
+%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote
+%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx
+%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo
+%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc
+%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx
+%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d
+%s: invalid mmo file: file name for number %d was not specified before use
+%s: invalid mmo file: file number %d `%s', was already entered as `%s'
+%s: invalid mmo file: initialization value for $255 is not `Main'
+%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx
+%s: invalid mmo file: lop_end not last item in file
+%s: invalid mmo file: unsupported lopcode `%d'
+%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx
+%s: invalid symbol table: duplicate symbol `%s'
+%s: line number overflow: 0x%lx > 0xffff%s: no initialized registers; section length 0
+%s: no such symbol%s: not implemented%s: not supported%s: object size does not match that of target %s%s: register relocation against non-register symbol: %s in %s%s: register relocation against non-register symbol: (unknown) in %s%s: relocatable link from %s to %s not supported%s: short data segment overflowed (0x%lx >= 0x400000)%s: string too long (%d chars, max 65535)%s: too many initialized registers; section length %ld
+%s: undefined version: %s%s: unknown relocation type %d%s: unrecognized symbol `%s' flags 0x%x%s: unsupported relocation type 0x%02x%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'
+%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)%s: version count (%ld) does not match symbol count (%ld)%s: warning core file truncated%s: warning: %s relocation against symbol `%s' from %s section%s: warning: %s relocation to 0x%x from %s section%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld%s: warning: PLT addend of %d to `%s' from %s section ignored%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode.%s: warning: illegal symbol index %ld in relocs%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.
+%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x.(at bit offset %u)
+(descriptor)
+(no value)
+(not active)
+(not allocated)
+(reg: %u, disp: %u, indir: %u, kind: (thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)(too many global variables for -fpic: recompile with -fPIC)(trailing value)
+(value spec follows)
+)
+*** check this relocation %s*unhandled*
+*unhandled* dst type %u
+*unknown**unknown*        , 8-byte data alignment, Value: %#08lx
+, alias: %u
+, ext fixup offset: %u, no_opt psect off: %u, subtype: %u (%s)
+, symbol vector rva: - %s is G10, %s is not.got section not immediately after .plt section.rsrc merge failure: a directory matches a leaf.rsrc merge failure: differing directory versions
+.rsrc merge failure: dirs with differing characteristics
+.rsrc merge failure: duplicate leaf.rsrc merge failure: duplicate leaf: %s.rsrc merge failure: duplicate string resource: %d.rsrc merge failure: multiple non-default manifests32-bit double, 32bits gp relative relocation occurs for an external symbol64 bits *unhandled*
+64-bit double, : %u.%u
+: m32r instructions: m32r2 instructions: m32rx instructions: n1 instructions: n1h instructions; recompile with -fPIC<Unrecognised flag bits set><corrupt string length: %#x><corrupt string offset: %#lx><unknown>@pltoff reloc against local symbolArchive has no index; run ranlib to add oneArchive object file in wrong formatAttempt to convert L32R/CALLX to CALL failedAttempt to do relocatable link with %s input and %s outputBASE_IMAGE       BFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
+BFD %s internal error, aborting at %s line %d in %s
+BFD Link Error: branch (PC rel16) to section (%s) not supportedBFD Link Error: jump (PC rel26) to section (%s) not supportedBad valueBase Relocation Directory [.reloc]Bound Import DirectoryBounds:
+CLICLR Runtime HeaderCLUSTERS_LOCKMGR COUNTERS         CPU              CTL_AUGRB (augment relocation base) %u
+CTL_DFLOC (define location)
+CTL_SETRB (set relocation base)
+CTL_STKDL (stack defined location)
+CTL_STLOC (set location)
+Copyright Header
+Corrupt .rsrc section detected!
+DSO missing from command lineDST__K_BEG_STMT_MODE not implementedDST__K_END_STMT_MODE not implementedDST__K_RESET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR_W not implementedDST__K_SET_PC not implementedDST__K_SET_PC_L not implementedDST__K_SET_PC_W not implementedDST__K_SET_STMTNUM not implementedDebug DirectoryDebug module table:
+Debug symbol table:
+Delay Import DirectoryDeprecated %s called
+Deprecated %s called at %s line %d in %s
+Description DirectoryDwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find %s section.Dwarf Error: Could not find abbrev number %u.Dwarf Error: Invalid maximum operations per instruction.Dwarf Error: Invalid or unhandled FORM value: %#x.Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu).Dwarf Error: Unable to read alt ref %u.Dwarf Error: Unhandled .debug_line version %d.Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'.Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information.Dwarf Error: mangled line number section (bad file number).Dwarf Error: mangled line number section.EIHD: (size: %u, nbr blocks: %u)
+Entry offset        = 0x%.8lx (%ld)
+Error reading %s: %sError: %B has both the current and legacy Tag_MPextension_use attributesErrors encountered processing file %sException Directory [.pdata]Export Directory [.edata (or where ever we found it)]Export Flags 			%lx
+Export RVAFAILED to find previous HI16 relocFILES_VOLUMES    File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
+Forwarder RVAGALAXY           GP relative relocation used when GP not definedGP relative relocation when _gp not definedGPDISP relocation did not find ldah and lda instructionsGlobal symbol table:
+ID: %#08lxIDC - Ident Consistency check
+IMAGE_ACTIVATOR  INPUT_SECTION_FLAGS are not supported.
+IO               Image activation:  (size=%u)
+Image activator fixup: (major: %u, minor: %u)
+Image identification: (major: %u, minor: %u)
+Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)
+Image symbol & debug table: (major: %u, minor: %u)
+Import Address Table DirectoryImport Directory [parts of .idata]Internal inconsistency: remaining %u != max %u.
+  Please report this bug.Invalid TARGET2 relocation type '%s'.Invalid bfd targetInvalid operationInvalid section index in ETIRJALX to a non-word-aligned addressLOGICAL_NAMES    Language Processor Name
+Length              = 0x%.8lx (%ld)
+Linker: cannot init ex9 hash table error 
+Linker: error cannot fixed ex9 relocation 
+Load Configuration DirectoryMEMORY_MANAGEMENTMIPS16 and microMIPS functions cannot call each otherMISC             MULTI_PROCESSING Major/Minor 			%d/%d
+Malformed archiveMaximum stack required is 0x%v
+MeP: howto %d has type %dMemory exhaustedModule header
+NETWORKS         NORMALName 				No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsNumber in:
+OPR_ADD (add)
+OPR_AND (logical and)
+OPR_ASH (arithmetic shift)
+OPR_COM (complement)
+OPR_DIV (divide)
+OPR_EOR (logical exclusive or)
+OPR_INSV (insert field)
+OPR_IOR (logical inclusive or)
+OPR_MUL (multiply)
+OPR_NEG (negate)
+OPR_NOP (no-operation)
+OPR_REDEF (define a literal)
+OPR_REDEF (redefine symbol to curr location)
+OPR_ROT (rotate)
+OPR_SEL (select)
+OPR_SUB (substract)
+OPR_USH (unsigned shift)
+Object module NOT error-free !
+Ordinal Base 			%ld
+Output file requires shared library `%s'
+Output file requires shared library `%s.so.%s'
+POSIX            PROCESS_SCHED    PRVFXDPRVPICPSC - Program section definition
+PTA mismatch: a SHcompact address (bit 0 == 0)PTB mismatch: a SHmedia address (bit 0 == 1)Partition name      = "%s"
+Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+Partition[%d] length = 0x%.8lx (%ld)
+Partition[%d] sector = 0x%.8lx (%ld)
+Please report this bug.
+RL78/G10 ABI conflict: cannot link G10 and non-G10 objects togetherR_BFIN_FUNCDESC references dynamic symbol with nonzero addendR_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addendR_FRV_TLSMOFFLO not applied to a setlo or setlos instruction
+Reading archive file mod timestampReference to the far symbol `%s' using a wrong relocation may result in incorrect executionRegister %%g%d used incompatibly: %s in %B, previously %s in %BRegister section has contents
+Relocation for non-REL psectRemoving unused section '%s' in file '%B'ReservedResource Directory [.rsrc]S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your codeSDA relocation when _SDA_BASE_ not definedSECURITY         SEC_RELOC with no relocs in section %sSH Error: unknown reloc type %dSHELL            SHRFXDSHRPICSPSC - Shared Image Program section def
+STABLE           STA_CKARG (compare procedure argument)
+STA_GBL (stack global) %.*s
+STA_LI (stack literal)
+STA_LW (stack longword) 0x%08x
+STA_MOD (stack module)
+STA_PQ (stack psect base + offset)
+STA_QW (stack quadword) 0x%08x %08x
+STC_BOH_GBL (store cond BOH at global addr)
+STC_BOH_PS (store cond BOH at psect + offset)
+STC_BSR_GBL (store cond BSR at global addr)
+STC_BSR_PS (store cond BSR at psect + offset)
+STC_GBL (store cond global)
+STC_GCA (store cond code address)
+STC_LDA_GBL (store cond LDA at global addr)
+STC_LDA_PS (store cond LDA at psect + offset)
+STC_LP (store cond linkage pair)
+STC_LP_PSB (store cond linkage pair + signature)
+STC_NBH_GBL (store cond or hint at global addr)
+STC_NBH_PS (store cond or hint at psect + offset)
+STC_NOP_GBL (store cond NOP at global addr)
+STC_NOP_PS (store cond NOP at psect + offset)
+STC_PS (store cond psect + offset)
+STO_AB (store absolute branch)
+STO_B (store byte)
+STO_BR_GBL (store branch global) *todo*
+STO_BR_PS (store branch psect + offset) *todo*
+STO_CA (store code address) %.*s
+STO_GBL (store global) %.*s
+STO_GBL_LW (store global longword) %.*s
+STO_IMM (store immediate) %u bytes
+STO_IMMR (store immediate repeat) %u bytes
+STO_LW (store longword)
+STO_OFF (store LP with procedure signature)
+STO_OFF (store offset to psect)
+STO_QW (store quadword)
+STO_RB (store relative branch)
+STO_W (store word)
+SYM - Global symbol definition
+SYM - Global symbol reference
+SYMG - Universal symbol definition
+SYMM - Global symbol definition with version
+SYMV - Vectored symbol definition
+SYSGEN           Section has no contentsSecurity DirectorySize error in section %sSource Files Header
+Special DirectorySpurious ALPHA_R_BSR relocStack analysis will ignore the call from %s to %s
+Stack overflow (%d) in _bfd_vms_pushStack size for call graph root nodes.
+Stack underflow in _bfd_vms_popStrides:
+Symbol %s not defined for fixups
+Symbol `%s' has differing types: %s in %B, previously REGISTER in %BSymbol `%s' has differing types: REGISTER in %B, previously %s in %BSymbol needs debug section which does not existSystem call errorTLS relocation invalid without dynamic sectionsTOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compilingTable Addresses
+Thread Storage Directory [.tls]Time/Date stamp 		%lx
+Title Text Header
+Try enabling relaxation to avoid relocation truncationsUSRSTACKUnable to find equivalent output section for symbol '%s' from section '%s'Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.
+Unexpected STO_SH5_ISA32 on local symbol is not handledUnexpected machine numberUnhandled OSF/1 core file section type %d
+Unhandled relocation %sUnknown EGSD subtype %dUnknown basic type %dUnknown reloc %sUnknown reloc %s + %sUnknown symbol in command %sUnrecognized INPUT_SECTION_FLAG %s
+Unrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVOLATILE         Variable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning, .pdata section size (%ld) is not a multiple of %d
+Warning: %B does not support interworking, whereas %B doesWarning: %B is truncated: expected core file size >= %lu, found: %lu.Warning: %B supports interworking, whereas %B does notWarning: %B uses %s (set by %B), %B uses %sWarning: %B uses %s (set by %B), %B uses unknown MSA ABI %dWarning: %B uses %s (set by %B), %B uses unknown floating point ABI %dWarning: %B uses double-precision hard float, %B uses single-precision hard floatWarning: %B uses hard float, %B uses soft floatWarning: %B uses r3/r4 for small structure returns, %B uses memoryWarning: %B uses soft float, %B uses single-precision hard floatWarning: %B uses unknown MSA ABI %d (set by %B), %B uses %sWarning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %dWarning: %B uses unknown floating point ABI %dWarning: %B uses unknown floating point ABI %d (set by %B), %B uses %sWarning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %dWarning: %B uses unknown small structure return convention %dWarning: %B uses unknown vector ABI %dWarning: %B uses vector ABI "%s", %B uses "%s"Warning: %B: Conflicting platform configurationWarning: %B: Unknown EABI object attribute %dWarning: %B: Unknown MSPABI object attribute %dWarning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with itWarning: Clearing the interworking flag of %B due to outside requestWarning: Not setting interworking flag of %B since it has already been specified as non-interworkingWarning: RL78_SYM reloc with an unknown symbolWarning: RX_SYM reloc with an unknown symbolWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %AWarning: alignment %u of symbol `%s' in %B is smaller than %u in %BWarning: fixup count mismatch
+Warning: gc-sections option ignoredWarning: size of symbol `%s' changed from %lu in %B to %lu in %BWarning: type of symbol `%s' changed from %d to %d in %BWarning: writing archive was slow: rewriting timestamp
+Writing updated armap timestampXGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code.[%u]: %u
+[%u]: Lower: %u, upper: %u
+[abi=16-bit int, [abi=32-bit int, [whose name is lost]\%B: Warning: Arm BLX instruction targets Arm function '%s'._bfd_vms_output_counted called with too many bytes_bfd_vms_output_counted called with zero bytesaddressaddress not word alignarsize: %u, a0: 0x%08x
+bad section index in %sbanked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)base: %u, pos: %u
+bfd_mach_o_canonicalize_symtab: unable to load symbolsbfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)bfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid section %d (max %lu): setting to undefinedbfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid type field 0x%x: setting to undefinedbfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lubfd_mach_o_read_symtab_symbols: unable to allocate memory for symbolsbfd_mach_o_scan: unknown architecture 0x%lx/0x%lxbfd_pef_scan: unknown architecture 0x%lxblkbeg: address: 0x%08x, name: %.*s
+blkend: size: 0x%08x
+cannot emit dynamic relocations in read-only sectioncannot emit fixups in read-only sectioncannot find EMH in first GST record
+cannot handle R_MEM_INDIRECT reloc when using %s outputcannot read DMT
+cannot read DMT header
+cannot read DMT psect
+cannot read DST
+cannot read DST header
+cannot read DST symbol
+cannot read EIHA
+cannot read EIHD
+cannot read EIHI
+cannot read EIHS
+cannot read EIHVN header
+cannot read EIHVN version
+cannot read EISD
+cannot read GST
+cannot read GST record
+cannot read GST record header
+cannot read GST record length
+class: %u, dtype: %u, length: %u, pointer: 0x%08x
+corrupt %s section in %Bcould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcould not open shared image '%s' from '%s'cpu=HC11]cpu=HC12]cpu=HCS12]cpu=XGATE]dangerous relocationdelta pc +%-4ddelta_pc_l: +0x%08x
+delta_pc_w %u
+descdimct: %u, aflags: 0x%02x, digits: %u, scale: %u
+discarded output section: `%A'discontiguous range (nbr: %u)
+dynamic relocation in read-only sectiondynamic variable `%s' is zero sizeenumbeg, len: %u, name: %.*s
+enumelt, name: %.*s
+enumend
+epilog: flags: %u, count: %u
+error reading cpu type from elf private dataerror: %B contains a reloc (0x%s) for section %A that references a non-existent global symbolerror: %B does not use Maverick instructions, whereas %B doeserror: %B is already in final BE8 formaterror: %B is compiled as absolute position code, whereas target %B is position independenterror: %B is compiled as position independent code, whereas target %B is absolute positionerror: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%derror: %B is compiled for APCS-%d, whereas target %B uses APCS-%derror: %B is compiled for the EP9312, whereas %B is compiled for XScaleerror: %B passes floats in float registers, whereas %B passes them in integer registerserror: %B passes floats in integer registers, whereas %B passes them in float registerserror: %B requires more array alignment than %B preserveserror: %B requires more stack alignment than %B preserveserror: %B uses %s instructions but %B uses %serror: %B uses FPA instructions, whereas %B does noterror: %B uses Maverick instructions, whereas %B does noterror: %B uses VFP instructions, whereas %B does noterror: %B uses VFP register arguments, %B does noterror: %B uses hardware FP, whereas %B uses software FPerror: %B uses iWMMXt register arguments, %B does noterror: %B uses software FP, whereas %B uses hardware FPerror: %B uses the %s code model whereas %B uses the %s code modelerror: %B uses the %s data model but %B only uses MSP430 instructionserror: %B uses the %s data model whereas %B uses the %s data modelerror: %B uses the large code model but %B uses MSP430 instructionserror: %B uses the small code model but %B uses the %s data modelerror: %B: Conflicting CPU architectures %d/%derror: %B: Conflicting architecture profiles %c/%cerror: %B: Conflicting use of R9error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchainerror: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'error: %B: SB relative addressing conflicts with use of R9error: %B: Unknown CPU architectureerror: %B: size of section %A is not multiple of address sizeerror: %B: unable to merge virtualization attributes with %Berror: Can't find symbol: _SDA_BASE_.error: Source object %B has EABI version %d, but target %B has EABI version %derror: fp16 format mismatch between %B and %Berror: inappropriate relocation type for shared library (did you forget -fpic?)error: required section '%s' not found in the linker scripterror: undefined symbol __rtiniterror: unknown Tag_ABI_array_object_align_expected value in %Berror: unknown Tag_ABI_array_object_alignment value in %Bexecutablefailed to allocate space for new APUinfo section.failed to compute new APUinfo section.failed to install new APUinfo section.fatal error while creating .fixupgeneric linker can't handle %sglobal pointer relative address out of rangeglobal pointer relative relocation at address 0x%08x when _gp not defined
+global pointer relative relocation when _gp not definedhidden symbolignoring reloc %s
+incr_linum(b): +%u
+incr_linum_l: +%u
+incr_linum_w: +%u
+internal error: addend should be zero for R_LM32_16_GOTinternal error: branch/jump to an odd address detectedinternal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: suspicious relocation type used in shared libraryinternal error: unknown errorinternal error: unsupported relocation errorinternal inconsistency in size of .got.loc sectioninternal symbolinvalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or assemble using "-no-expand" (for gcc, "-Wa,-no-expand"invalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or compile using the gcc-option "-mno-base-addresses".invalid relocation addressinvalid relocation type %dinvalid use of %s with contextsip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx).ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch table header corrupt.ip2k relaxer: switch table without complete matching relocation information.line num  (len: %u)
+linkable imagelinker stubs in %u group%s
+  branch       %lu
+  toc adjust   %lu
+  long branch  %lu
+  long toc adj %lu
+  plt call     %lu
+  plt call toc %luliteralliteral relocation occurs for an external symbolmach-o: there are too many sections (%d) maximum is 255,
+mep: no reloc for code %dmodbeg
+modend
+name: [val: %08lx len %d]: nativenon-contiguous array of %s
+non-dynamic relocations refer to dynamic symbol %snon-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store
+non-zero addend in @fptr relocnot enough GOT space for local GOT entriesnot mapping: data=%lx mapped=%d
+not mapping: env var not set
+out of rangeoverflow after relaxationoverlay stub relocation overflowprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lxprivate flags = 0x%lx:prolog: bkpt address 0x%08x
+protected symbolrecbeg: name: %.*s
+recend
+reference to a banked address [%lx:%04lx] in the normal address space at %04lxregrelocation `%s' not yet implementedrelocation out of rangerelocation references symbol not defined in the modulerelocation requires zero addendrelocation should be even numberrelocations between different segments are not supportedreopening %B: %s
+reserved cmd %drtnbeg
+rtnend: size 0x%08x
+septyp, name: %.*s
+set_abs_pc: 0x%08x
+set_line_num(w) %u
+set_line_num_b %u
+set_line_num_l %u
+small-data section exceeds 64KB; lower small-data size limit (see option -G)som_sizeof_headers unimplementedsorry, no support for duplicate object files in auto-overlay script
+sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands.source (len: %u)
+standard data: %s
+static procedure (no name)stub entry for %s cannot load .plt, dp offset = %ldstubs don't match calculated sizesymbolsystem version array information:
+term(b): 0x%02xterm_w: 0x%04xtypspec (len: %u)
+unable to find ARM glue '%s' for '%s'unable to find THUMB glue '%s' for '%s'unable to read in %s section from %Bunable to write unknown load command 0x%lxunaligned bit-string of %s
+uncertain calling convention for non-COFF symbolundefined %s reference in complex symbol: %sunhandled egsd entry type %u
+unhandled emh subtype %u
+unknownunknown ETIR command %dunknown errorunknown header byte-order value 0x%lxunknown line command %dunknown operator '%c' in complex symbolunknown source command %dunknown v850 architectureunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocationunsupported relocation between data/insn address spacesusing multiple gp valuesv850 E3 architecturev850 architecturev850e architecturev850e1 architecturev850e2 architecturev850e2v3 architecturev850e3v5 architecturevflags: 0x%02x, value: 0x%08x vma:			BeginAddress	 EndAddress	  UnwindData
+warning: %B and %B differ in wchar_t sizewarning: %B and %B differ in whether code is compiled for DSBTwarning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may failwarning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may failwarning: %B: local symbol `%s' has no sectionwarning: %s exceeds section size
+warning: %s has a corrupt string table index - ignoringwarning: %s overlaps %s
+warning: %s section has zero sizewarning: .pdata section size (%ld) is not a multiple of %d
+warning: attempt to export undefined symbol `%s'warning: call to non-function symbol %s defined in %Bwarning: generating a shared library containing non-PIC codewarning: generating a shared library containing non-PID codewarning: relocation references a different segmentwarning: section '%s' is being made into a notewarning: section `%A' type changed to PROGBITSwarning: type and size of dynamic symbol `%s' are not definedwarning: unable to set size of %s section in %Bwarning: unable to update contents of %s section in %syou are not allowed to define %s in a scriptProject-Id-Version: bfd-2.24.90
+Report-Msgid-Bugs-To: bug-binutils@gnu.org
+POT-Creation-Date: 2014-02-10 09:42+1030
+PO-Revision-Date: 2016-05-29 17:48+0200
+Last-Translator: ÐœÐ¸Ñ€Ð¾Ñ�Ð»Ð°Ð² Ð�Ð¸ÐºÐ¾Ð»Ð¸Ñ› <miroslavnikolic@rocketmail.com>
+Language-Team: Serbian <(nothing)>
+Language: sr
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);
+	    Ð¢Ð›Ð¡: %A	Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° 			Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° 		%08lx
+	Ð¢Ð°Ð±ÐµÐ»Ð° Ð½Ð°Ð·Ð¸Ð²Ð° Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° 			Ð¢Ð°Ð±ÐµÐ»Ð° Ñ€ÐµÐ´Ð½Ð¸Ñ… Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð° 				Ð¢Ð°Ð±ÐµÐ»Ð° [Ð�Ð°Ð·Ð¸Ð² Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°/Ñ€ÐµÐ´Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°]	%08lx
+	Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° %08lx ÐºÐ¾Ð´Ð½Ðµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ (ÑƒÑ‡Ð¸Ñ‚Ñ™Ð¸Ð²Ð°/Ð°ÐºÑ‚ÑƒÐµÐ»Ð½Ð°) %08lx/%08lx
+	Ð½Ðµ-Ð¢Ð›Ð¡: %A	Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ %4d Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ %4x [%4lx] %s	vma:  Ð�Ð°Ñ˜Ð°Ð²Ð°/Ð ÐµÐ´Ð½Ð¸ Ð�Ð°Ð·Ð¸Ð² Ñ‡Ð»Ð°Ð½Ð° Ð¡Ð²ÐµÐ·Ð°Ð½-Ð·Ð°
+
+	Ð”Ð›Ð› Ð½Ð°Ð·Ð¸Ð²: %s
+
+
+ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ ÐŸÐ• Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ â€ž.relocâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°)
+
+      ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %-7ld   Ð’Ñ€Ñ�Ñ‚Ð°:  %s
+      ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+      ÐŸÑ€Ð²Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+      Ð›Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+      Ð’Ñ€Ñ�Ñ‚Ð°: %s
+      enum; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+      struct; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+      union; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld
+ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ð·Ð° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ: %u
+
+ÐžÑ�Ð¾Ð±ÐµÐ½Ð¾Ñ�Ñ‚Ð¸ 0x%x
+
+Ð”Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ð¾Ð´ÐµÑ™Ð°Ðº:
+
+ÐŸÐ¾Ð¼Ð¾Ñ›Ð½Ð¾ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ðµ
+
+Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° â€”â€” ÐžÑ�Ð½Ð¾Ð²Ð° Ñ€ÐµÐ´Ð½Ð¸Ñ… Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð° %ld
+
+ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ñ˜Ðµ Ð¾Ñ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ð½Ð° Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸: %04lx
+
+Ð�ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°! ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð½.
+
+ÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+
+Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°:
+
+Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð·Ð° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ.  Ð�Ð°Ð¿Ð¾Ð¼ÐµÐ½Ðµ: â€ž*â€œ Ð½Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸Ðº, â€žtâ€œ Ð¿Ð¾Ð·Ð¸Ð² Ð¾Ñ�Ñ‚Ð°Ñ‚ÐºÐ°
+
+Ð¢Ð°Ð±ÐµÐ»Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ)
+
+
+Ð¢Ð°Ð±ÐµÐ»Ð° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ)
+
+Ð¢Ð°Ð±ÐµÐ»Ðµ ÑƒÐ²Ð¾Ð·Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ)
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ð¿Ñ€Ð²Ð¸ Ð¿Ð¾Ñ‚Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ð³Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ�Ñ‚Ð°Ð½Ðµ Ñƒ Ñ‚Ð°Ñ˜ Ð¾Ð´ÐµÑ™Ð°Ðº
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð°, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° ÑƒÐ²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx
+
+ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° ÑƒÐ²Ð¾Ð·Ð°, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸
+
+Ð£Ð¿ÑƒÑ‚Ð° Ð¸Ð·Ð´Ð°ÑšÐ°:
+
+Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¸Ð·Ð´Ð°ÑšÐ°:
+
+Ð’Ð¸Ñ€Ñ‚ÑƒÐµÐ»Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð°: %08lx Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´Ð»Ð¾Ð¼ÐºÐ° %ld (0x%lx) Ð‘Ñ€Ð¾Ñ˜ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ¸ %ld
+
+Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: Ð’Ð¸ÑˆÐ°Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ñƒ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ â€“ Ð’Ð¸Ð½Ð´Ð¾ÑƒÐ· Ñ›Ðµ Ð¸Ñ… Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€Ð¸Ñ‚Ð¸:
+
+Ð¢Ð°Ð±ÐµÐ»Ð° [Ð ÐµÐ´Ð½Ð¸/Ð�Ð°Ð·Ð¸Ð² Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°]
+
+Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ â€žppcbootâ€œ:
+        pc: 0x%08x
+    *Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%uâ€œ
+    Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u
+    Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð¿Ð´-Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x
+    Ð¾Ð¿ÑˆÑ‚Ð¸ Ð½Ð°Ð·Ð¸Ð²: %.*s
+    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: 0x%08x
+    Ð½Ð°Ð·Ð¸Ð²: %.*s
+    pc: 0x%08x
+    pc: 0x%08x Ñ€ÐµÐ´: %5u
+    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 1: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 1: 0x%08x %08x
+    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 2: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 2: 0x%08x %08x
+    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 3: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 3: 0x%08x %08x
+    Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x %08x
+    Ð½Ð°Ð·Ð¸Ð² Ñ€ÑƒÑ‚Ð¸Ð½Ðµ : %.*s
+   %02u    %s%s %s
+   (Ð²Ñ€Ñ�Ñ‚Ð°: %3u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 4+%3u):    *Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%uâ€œ
+   Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ : 2**%u
+   Ð´Ð¾Ð´ÐµÐ»Ð° (Ð´ÑƒÐ¶Ð¸Ð½Ð°)  : %u (0x%08x)
+   Ð´Ð¾Ð´ÐµÐ»Ð° (Ð´ÑƒÐ¶Ð¸Ð½Ð°): %u (0x%08x)
+   Ð°Ñ�ÐºÑ€Ð¸ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ   : %.*s
+   ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð±Ð¸Ð½Ð°Ñ€Ð½Ð¾Ð³ : 0x%08x
+   Ð¼Ð°Ð¿Ð° Ð±Ð¸Ñ‚Ð°: 0x%08x (ÑƒÐºÑƒÐ¿Ð½Ð¾: %u):
+   Ð°Ð´Ñ€ÐµÑ�Ð° ÐºÐ¾Ð´Ð°: 0x%08x
+   Ð´Ð°Ñ‚ÑƒÐ¼ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐ°        : %.17s
+   Ð¿Ñ€ÐµÐ²Ð¾Ð´Ð¸Ð»Ð°Ñ†  : %.*s
+   Ð´Ð¾Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐµ ÐºÐ¾Ð´Ð°: %u
+   Ð°ÑƒÑ‚Ð¾Ñ€Ñ�ÐºÐ° Ð¿Ñ€Ð°Ð²Ð°: %.*s
+   declfile: Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð¸Ð´ Ð¿Ð¾Ñ™Ð°: %u
+   deflines %u
+   Ð½Ð°Ð·Ð¸Ð² ÐµÐ½Ñ‚Ð¸Ñ‚ÐµÑ‚Ð°  : %.*s
+   Ñ‚Ð°Ñ‡ÐºÐ° ÑƒÐ½Ð¾Ñ�Ð°: 0x%08x
+   Ð¾Ð·Ð±Ð¸Ñ™Ð½Ð¾Ñ�Ñ‚ Ð³Ñ€ÐµÑˆÐºÐµ: %x
+   Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: %.*s
+   Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ: %.*s
+   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%08x   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%04x   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %d, Ñ˜ÐµÐ·Ð¸Ðº: %u, Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u
+   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%04x   formfeed
+   Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð°ÑšÐµ Ð¸Ð´-Ð° : %x
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð»Ð¸ÐºÐµ: 0x%08x
+   Ð½Ð°Ð·Ð¸Ð² Ñ˜ÐµÐ·Ð¸ÐºÐ°: %.*s
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¾Ð¿ÑˆÑ‚Ðµ: %.*s
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð½Ð°Ð·Ð¸Ð² Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ°: %.*s
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿Ð°Ðº: %.*s
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x %08x
+   Ð½Ð°Ñ˜Ð². Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð±ÐµÐ»ÐµÐ¶ÐµÑšÐ°: %u
+   Ð½Ð°Ð·Ð¸Ð² Ð¼Ð¾Ð´ÑƒÐ»Ð°           : %.*s
+   Ð½Ð°Ð·Ð¸Ð² Ð¼Ð¾Ð´ÑƒÐ»Ð°           : %.*s
+   Ð¸Ð·Ð´Ð°ÑšÐµ Ð¼Ð¾Ð´ÑƒÐ»Ð°          : %.*s
+   Ð½Ð°Ð·Ð¸Ð²           : %.*s
+   Ð½Ð°Ð·Ð¸Ð²         : %.*s
+   Ð½Ð°Ð·Ð¸Ð²        : %.*s
+   Ð±Ñ€Ð¾Ñ˜ â€žcondâ€œ Ð¿Ð°Ñ€Ð¾Ð²Ð° Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u
+   Ð½Ð°Ð·Ð¸Ð² Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°  : %.*s
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x, Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: 0x%08x
+   Ð¾Ð¿Ð¸Ñ�Ð½Ð¸Ðº Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð° : 0x%08x
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° : %u
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° Ð·Ð° Ñ‚Ð°Ñ‡ÐºÑƒ ÑƒÐ½Ð¾Ñ�Ð°: %u
+   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: %u
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: %u
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: 0x%08x
+   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u
+   setfile %u
+   setlnum %u
+   setrec %u
+   Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�: %.*s
+   Ð½Ð¸Ð²Ð¾ Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ         : %u
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: 0x%08x
+   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð¸Ð¼Ð²ÐµÐº-Ð° : 0x%08x
+   Ð½Ð°Ñ�Ð»Ð¾Ð²: %.*s
+   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð°: 0x%02x
+   Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð° : %u
+   Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð°          : 0x%08x
+   Ð²ÐµÐºÑ‚Ð¾Ñ€     : 0x%08x
+   Ð¼Ð°Ñ�ÐºÐ° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ: 0x%08x
+  %s (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u+%u):
+  %s: 0x%v
+  %u: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ð½Ð°Ð·Ð¸Ð²: %.*s
+  EEOM (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u):
+  EGSD (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u):
+  â€žEGSDâ€œ ÑƒÐ½Ð¾Ñ� â€ž%2uâ€œ (Ð²Ñ€Ñ�Ñ‚Ð°ype: %u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u):   EMH %u (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u):   Ð¾Ñ�Ð½Ð¾Ð²Ð°: 0x%08x %08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x, Ð·Ð°ÑˆÑ‚Ð¸Ñ‚Ð°: 0x%08x   base_va : 0x%08x
+  Ð±Ñ€Ð¾Ñ˜ Ð±Ð¸Ñ‚Ð°: %u, Ð¾Ñ�Ð½Ð¾Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x
+  Ð¿Ð¾Ð·Ð¸Ð²Ð¸:
+  chgprtoff : %5u
+  codeadroff: %5u, lpfixoff  : %5u
+  Ð²ÐµÐ·Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ: 0x%08x %08x
+  Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%08x
+  Ð¸Ð°Ñ„ Ð²ÐµÐ·Ð° : 0x%08x %08x
+  Ñ�Ð»Ð¸ÐºÐ° %u (%u ÑƒÐ½Ð¾Ñ�Ð°)
+  Ñ�Ð»Ð¸ÐºÐ° %u (%u ÑƒÐ½Ð¾Ñ�Ð°), Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜:
+  lppsbfixoff: %5u
+  Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: 0x%08x, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u
+  qdotadroff: %5u, ldotadroff: %5u
+  qrelfixoff: %5u, lrelfixoff: %5u
+  Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð°Ð½Ð¾ Ð¸Ð· â€ž%sâ€œ:
+  shlextra  : %5u, permctx   : %5u
+  shlstoff  : %5u, shrimgcnt : %5u
+  Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° : %u
+ %08x 0x%08x 64B <Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ> Ð‘Ð¡Ð¢Ð Ð�Ð�Ð˜Ð¦Ð�: %u COM COMM ÐŸÑ€Ð¾Ð¼ÐµÐ½Ð° Ð·Ð°ÑˆÑ‚Ð¸Ñ‚Ðµ (%u ÑƒÐ½Ð¾Ñ�Ð°):
+ Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ ÑƒÐ¿ÑƒÑ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ ÐºÐ¾Ð´Ð°:
+ DEF EXE ÐŸÑ€Ð²Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x
+ Ð§ÐµÑ‚Ð²Ñ€Ñ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x
+ GBL Ð�Ð¸Ð· ÐºÐ¾Ð´Ð° Ð»ÐµÐ¿ÐºÐ° LIB Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ ÑƒÐ¿ÑƒÑ‚Ðµ Ð¿Ð°Ñ€Ð¾Ð²Ð° Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°:
+ NOMOD NORM OVR PIC QVAL RD REL Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ð²Ñ€Ð°Ñ›Ð° Ð¼Ð¸Ð»Ð¸ÐºÐ¾Ð´ Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ñ‡ÑƒÐ²Ð° Ð¼Ð¸Ð»Ð¸ÐºÐ¾Ð´ SHR Ð”Ñ€ÑƒÐ³Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x
+ Ð”ÐµÑ™Ð¸Ð²Ðµ Ñ�Ð»Ð¸ÐºÐµ:
+ Ð”ÐµÑ™ÐµÐ½Ð° Ñ�Ð»Ð¸ÐºÐ°   : 0x%08x 0x%08x
+ Ð¢Ð°Ð±ÐµÐ»Ð°: Ð—Ð½Ð°Ðº: %d, Ð’Ñ€ÐµÐ¼Ðµ: %08lx, Ð˜Ð·Ð´: %d/%d, Ð‘Ñ€Ð¾Ñ˜ Ð½Ð°Ð·Ð¸Ð²Ð°: %d, Ð˜Ð”-Ð¾Ð²Ð¸: %d
+ Ð¢Ñ€ÐµÑ›Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x
+ UNI VEC VECEP WEAK WRT [BE8] [â€žFPAâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°] [Ð“10] [LE8] [â€žMaverickâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°] [â€žVFPâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°] [Ð˜Ð·Ð´Ð°ÑšÐµ1 â€žEABIâ€œ] [Ð˜Ð·Ð´Ð°ÑšÐµ2 â€žEABIâ€œ] [Ð˜Ð·Ð´Ð°ÑšÐµ3 â€žEABIâ€œ] [Ð˜Ð·Ð´Ð°ÑšÐµ4 â€žEABIâ€œ] [Ð˜Ð·Ð´Ð°ÑšÐµ5 â€žEABIâ€œ] [XGATE RAM Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜] [Ð°Ð±Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾] [Ð°Ð±Ð¸=64] [Ð°Ð±Ð¸=EABI32] [Ð°Ð±Ð¸=EABI64] [Ð°Ð±Ð¸=N32] [Ð°Ð±Ð¸=O32] [Ð°Ð±Ð¸=O64] [abiv%ld] [Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¸ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜] [d-Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·] [Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ðµ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°] [Ñ„Ð¸ÐºÑ� Ð´ÑƒÐ±] [Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÐµÐ½Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸] [Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÐµÐ½Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸] [g-Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·] [â€žABIâ€œ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¾Ð³ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°] [Ð¸Ð¼Ð° Ñ‚Ð°Ñ‡ÐºÑƒ ÑƒÐ»Ð°Ð·Ð°] [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾] [Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð°] [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾] [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾] [Ð¼Ð°Ð¿Ð¸Ñ€Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð¸ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð°] [Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð°=Ð¼Ð¾Ð´ÐµÐ»-Ð³Ñ€ÑƒÐ¿Ðµ] [Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð°=Ð¾Ð±Ð¸Ñ‡Ð½Ð¾] [Ð½Ð¾Ð²Ð¸ â€žABIâ€œ] [Ð°Ð±Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾] [Ð½Ðµ-Ð¿Ð¸Ñ†] [Ð½Ð¸Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ€ÐµÐ¶Ð¸Ð¼] [Ñ�Ñ‚Ð°Ñ€Ð¸ â€žABIâ€œ] [Ð¿Ð¸Ðº] [Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ñ‚Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°] [Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð°] [â€žABIâ€œ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¾Ð³ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°] [Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·] [Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ñ€ÐµÑ’ÐµÐ½Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°] [Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ðµ Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ðµ â€ž _ â€œ] [Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð˜Ð¡Ð�] [Ñ‚Ð°Ð±ÐµÐ»Ð° Ð½ÐµÑ�Ñ€ÐµÑ’ÐµÐ½Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°] [v10 Ð¸ v32] [v32] Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ â€žGSTâ€œ
+ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°: Ð²Ð±Ð½: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u
+ Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ° : Ð²Ð±Ð½: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u (0x%x)
+ Ð¿Ð¾Ð¿Ñ€Ð°Ð²ÐºÐ° Ð¸Ð½Ñ„Ð¾ Ñ€Ð²Ð°:  Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ : 0x%04x Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: Ð²Ð±Ð½: %u, Ð·Ð°Ð¿Ð¸Ñ�Ð¸: %u
+ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ: 0x%08x, Ð½Ð°Ð·Ð¸Ð²: %.*s
+ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ: 0x%08x, Ð²ÐµÑ€Ð·Ð¸Ñ˜Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ð°: 0x%08x, Ð¿Ð¾ÐºÐ»Ð¾Ð¿Ñ™ÐµÐ½Ð¾ ÐºÑ‚Ñ€Ð»: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¸Ð¼Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°: %u
+ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð¸Ð·Ð³Ñ€Ð°Ð´ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ: %.*s
+ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ñ�Ð»Ð¸ÐºÐµ       : %.*s
+ Ð½Ð°Ð·Ð¸Ð² Ñ�Ð»Ð¸ÐºÐµ    : %.*s
+ Ð²Ñ€Ñ�Ñ‚Ð° Ñ�Ð»Ð¸ÐºÐµ: %u (%s) Ð±Ñ€Ð¾Ñ˜ Ð£/Ð˜ Ñ�Ð»Ð¸ÐºÐµ: %u, Ð±Ñ€. ÐºÐ°Ð½Ð°Ð»Ð°: %u, Ñ€ÐµÐº Ð¿Ñ€Ð¸: %08x%08x
+ Ð²Ñ€ÐµÐ¼Ðµ Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°  : %s
+ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°: %08x: ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°       : %.*s
+ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ â€ž.addressâ€œ ÑƒÐ¿ÑƒÑ‚Ðµ Ð´ÑƒÐ³Ðµ-Ñ€ÐµÑ‡Ð¸:
+ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð´ÑƒÐ³Ðµ-Ñ€ÐµÑ‡Ð¸:
+ Ð²ÐµÑ›Ð¸ Ð¸Ð´: %u, Ð¼Ð°ÑšÐ¸ Ð¸Ð´: %u
+ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¼Ð¾Ð´ÑƒÐ»Ð°: 0x%08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x, (%u Ð¿-Ð¾Ð´ÐµÑ™Ð°ÐºÐ°)
+ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ð¸: Ð¸Ñ�Ð´: %u, Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾: %u, Ð¿Ñ€Ð¾Ñ‡ Ñ�Ð¸Ð¼Ð±: %u, Ð¸Ð´ Ñ�Ð»Ð¸ÐºÐµ: %u, Ð·Ð°ÐºÑ€Ð¿Ð°: %u
+ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ â€ž.addressâ€œ ÑƒÐ¿ÑƒÑ‚Ðµ Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾-Ñ€ÐµÑ‡Ð¸:
+ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾-Ñ€ÐµÑ‡Ð¸:
+ Ð¾Ð´ÐµÑ™Ð°Ðº: Ð¾Ñ�Ð½Ð¾Ð²Ð°: 0x%08x%08x Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x
+ Ð²Ñ€Ñ�Ñ‚Ð°: %3u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %3u (Ð¿Ñ€Ð¸ 0x%08x):  Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð² â€žEOBJâ€œ ÑƒÐ½Ð¾Ñ� Ð²Ñ€Ñ�Ñ‚Ðµ %u
+ Ð²Ð±Ð½: %u, Ð¿Ñ„Ñ†: %u, Ð¿Ð¾Ñ€ÐµÐ´Ð¸_Ñ†Ñ‚Ð»: %u Ð²Ñ€Ñ�Ñ‚Ð°: %u ( vma:			Ð�Ð´Ñ€ÐµÑ�Ð° Ð¿Ð¾Ñ‡ÐµÑ‚ÐºÐ°	 Ð�Ð´Ñ€ÐµÑ�Ð° ÐºÑ€Ð°Ñ˜Ð°		Ð˜Ð·Ð»Ð¾Ð¶ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸
+ vma:		ÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº    ÐšÑ€Ð°Ñ˜      EH       EH       ÐšÑ€Ð°Ñ˜ Ð¿Ñ€Ð¾Ð»Ð¾Ð³Ð°  Ð˜Ð·ÑƒÐ·ÐµÑ‚Ð°Ðº
+     		Ð�Ð´Ñ€ÐµÑ�Ð°  Ð�Ð´Ñ€ÐµÑ�Ð°  Ð ÑƒÐºÐ¾Ð²Ð°Ð»Ð°Ñ†  ÐŸÐ¾Ð´Ð°Ñ†Ð¸     Ð�Ð´Ñ€ÐµÑ�Ð°    ÐœÐ°Ñ�ÐºÐ°
+ vma:		ÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº    ÐŸÑ€Ð¾Ð»Ð¾Ð³   Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ð° Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ    Ð˜Ð·ÑƒÐ·ÐµÑ‚Ð°Ðº Ð•Ð¥
+     		Ð�Ð´Ñ€ÐµÑ�Ð°  Ð”ÑƒÐ¶Ð¸Ð½Ð°   Ð”ÑƒÐ¶Ð¸Ð½Ð°   32b Ð¸Ð·Ð²Ñ€  Ð ÑƒÐºÐ¾Ð²Ð»Ð°Ñ†   ÐŸÐ¾Ð´Ð°Ñ†Ð¸
+ vma:            Ð�Ð°Ñ˜Ð°Ð²Ð°    Ð’Ñ€ÐµÐ¼Ðµ     Ð�Ð°Ð¿Ñ€ÐµÐ´    Ð”Ð›Ð›       ÐŸÑ€Ð²Ð¸
+                 Ð¢Ð°Ð±ÐµÐ»Ð°   ÐžÑ‚Ð¸Ñ�Ð°Ðº  Ð›Ð°Ð½Ð°Ñ†   Ð�Ð°Ð·Ð¸Ð²       ÐŸÐ¾Ñ‚Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼
+#<Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ ÐºÐ¾Ð´ Ð³Ñ€ÐµÑˆÐºÐµ>%*.s  Ð›Ð¸Ñ�Ñ‚: Ð�Ð´Ñ€ÐµÑ�Ð°: %#08lx, Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %#08lx, ÐšÐ¾Ð´Ð½Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ð°: %d
+%*.s ÑƒÐ½Ð¾Ñ�: â€ž%Aâ€œ Ð¸Ð¼Ð° Ð¸ ÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ [â€ž%Aâ€œ Ñƒ â€ž%Bâ€œ] Ð¸ Ð½ÐµÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ [â€ž%Aâ€œ Ñƒ â€ž%Bâ€œ] Ð¾Ð´ÐµÑ™Ð°Ðºâ€ž%Aâ€œ Ð¸Ð¼Ð° Ð¸ ÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ Ð¸ Ð½ÐµÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº%A:0x%v â€žlrlive .brinfoâ€œ (%u) Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð°Ð½Ð°Ð»Ð¸Ð·Ðµ (%u)
+â€ž%A:0x%vâ€œ Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñƒ Ñ‚Ð°Ð±ÐµÐ»Ð¸ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ
+%B (%s): Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ (0x%x) Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½Ð°â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ñƒ Ð·Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð° Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐ°â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ñƒ Ð·Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð°â€ž%Bâ€ž Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žCRIS v32â€œ ÐºÐ¾Ð´ ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°â€ž%Bâ€ž Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-â€žCRIS-v32â€œ ÐºÐ¾Ð´ ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°â€ž%Bâ€œ Ð¿Ð¾Ñ�ÐµÐ´ÑƒÑ˜Ðµ Ð¸ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¸ Ð¸ Ñ�Ñ‚Ð°Ñ€Ð¸ â€žTag_MPextension_useâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚â€ž%Bâ€œ Ð½ÐµÐ¼Ð° Ð´Ð¾Ð·Ð²Ð¾Ð»Ñƒ Ð´Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ â€ž%sâ€œâ€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð³Ñ€ÑƒÐ¿Ðµ Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ°â€ž%Bâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð±Ñ€Ð¾Ñ˜ %lu ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð½ÐµÐ¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žSHT_SYMTAB_SHNDXâ€œâ€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ â€že_flagsâ€œ 0x%lx%B(%A): Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ð¾Ð·Ð¸Ð² Ð·Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾%B(%A): Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ð° Ð²Ð»Ð°Ñ�Ð½Ð¸ÑˆÑ‚Ð²Ð°%B(%A): Ð½ÐµÑ�Ð¸Ð³ÑƒÑ€Ð½Ð¾ ÐŸÐ˜Ð” Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð° 0x%08lx (Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñƒ â€ž%sâ€œ)%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ð¸Ñ�Ð½ÑƒÑ‚Ð¾ Ð·Ð° Ð¾Ð´ÐµÑ™ÐºÐµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐ° %d-Ð±Ð°Ñ˜Ñ‚Ð° > 4-Ð±Ð°Ñ˜Ñ‚Ð°.%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¸ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¸Ð¼ Ð¼Ð°Ð»Ð¸Ð¼ Ð¿Ð¾Ð´Ð°Ñ†Ð¸Ð¼Ð° Ð²Ñ€Ñ�Ñ‚Ðµ â€ž%dâ€œ.%B(%A+0x%%B(%A+0x%lx): Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° â€ž%sâ€œ Ð·Ð° â€žinsn 0x%xâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ñƒ Ð½Ðµ-Ð´ÐµÑ™ÐµÐ½Ð¾Ñ˜ Ð²ÐµÐ·Ð¸%B(%A+0x%lx): â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSEC_MERGEâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°%B(%A+0x%lx): â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B(%A+0x%lx): â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ�Ð° â€žTLSâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%sâ€œ%B(%A+0x%lx): â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ�Ð° â€žÐ½Ðµ-TLSâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%sâ€œ%B(%A+0x%lx): Ð”Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ðµ Ñ�Ñƒ Ñ�Ð°Ð¼Ð¾ â€žADDâ€œ Ð¸Ð»Ð¸ â€žSUBâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€žALUâ€œ Ð³Ñ€ÑƒÐ¿Ðµ%B(%A+0x%lx): ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð·Ð° Ð²Ñ€ÐµÐ¼Ðµ Ð´ÐµÑ™ÐµÑšÐ° 0x%lx Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð³Ñ€ÑƒÐ¿Ðµ â€ž%sâ€œ%B(%A+0x%lx): â€žR_68K_TLS_LE32â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°%B(%A+0x%lx): â€žR_ARM_TLS_LE32â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°%B(%A+0x%lx): â€žR_METAG_TLS_LE/IENONPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°%B(%A+0x%lx): â€žR_NIOS2_TLS_LE16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°%B(%A+0x%lx): Ð£Ð½Ð¾Ñ� Ð¾ÐºÑ€ÑšÐ°ÐºÐ° Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ð½Ð¸Ñ�ÐºÐµ.%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° ÑƒÐ½ÐµÑ�ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ñ�Ñ‚Ð¸Ð³Ð½ÐµÐ¼ â€ž%sâ€œ, Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-ffunction-sectionsâ€œ%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð¼ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ Ð·Ð° â€žXTENSA_ASM_SIMPLIFYâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ; Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð¼ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ; Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾%B(%A+0x%lx): Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ð·Ð° Ð¢Ð›Ð¡ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ%B(%A+0x%lx): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d%B(%A+0x%lx): Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°=0x%x)%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° Ð·Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ%B(%A+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B(%A+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žARMâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ñƒ â€žTLSâ€œ Ñ‚Ñ€Ð°Ð¼Ð±ÑƒÐ»Ð¸Ð½Ð¸%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žARMâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ð½Ð° ÐºÐ¾Ñ˜Ñƒ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žTLS_GOTDESCâ€œ%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žThumbâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ñƒ â€žTLSâ€œ Ñ‚Ñ€Ð°Ð¼Ð±ÑƒÐ»Ð¸Ð½Ð¸%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žThumbâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ð½Ð° ÐºÐ¾Ñ˜Ñƒ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žTLS_GOTDESCâ€œ%B(%A+0x%v): Ð¿Ð¾Ð·Ð¸Ð² Ð½Ðµ-ÐºÐ¾Ð´Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%B(%A)â€œ, Ð°Ð½Ð°Ð»Ð¸Ð·Ð° Ñ˜Ðµ Ð½ÐµÐ¿Ð¾Ñ‚Ð¿ÑƒÐ½Ð°
+%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.
+  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žARMâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð½Ð° â€žThumbâ€œ%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.
+  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žThumbâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð½Ð° â€žARMâ€œ%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.
+  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žarmâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° â€žthumbâ€œ%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.
+  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žthumbâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° â€žarmâ€œ
+  Ñ€Ð°Ð·Ð¼Ð¾Ñ‚Ñ€Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµ Ñ�Ð° ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¸Ð¼ â€ž--support-old-codeâ€œ%B(%s+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:
+  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ñ‚Ð¸Ð¿Ð¸Ñ‡Ð½Ð¾ Ð¼ÐµÑˆÐ°ÑšÐµ Ð¾Ð¿Ñ†Ð¸Ñ˜Ð°, Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:
+  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ðµ Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ñ�Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:
+  v10/v32 Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ â€ž%sâ€œ Ð½Ðµ Ñ�Ð¼Ðµ Ð´Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð�ÐµÐ¼Ð° â€žPLTâ€œ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð�ÐµÐ¼Ð° Ð½Ð¸ â€žPLTâ€œ Ð½Ð¸ â€žGOTâ€œ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ñƒ ÑƒÐ¿ÑƒÑ‚Ñƒ ÐºÐ° â€ž%sâ€œ, Ð¼Ð¾Ð¶Ð´Ð° Ñ˜Ðµ Ð´Ð¾ÑˆÐ»Ð¾ Ð´Ð¾ Ð¼ÐµÑˆÐ°ÑšÐ° Ð´ÐµÐºÐ»Ð°Ñ€Ð°Ñ†Ð¸Ñ˜Ðµ?â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ, ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ð¸Ð·Ð²Ð°Ð½ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°, Ð¼Ð¾Ð¶Ð´Ð° Ñ˜Ðµ Ð´Ð¾ÑˆÐ»Ð¾ Ð´Ð¾ Ð¼ÐµÑˆÐ°ÑšÐ° Ð´ÐµÐºÐ»Ð°Ñ€Ð°Ñ†Ð¸Ñ˜Ðµ?â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð±ÐµÐ· Ñ�Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð¾Ð³ â€žGOTâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼ %d Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼ %d Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œâ€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ, ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ:
+  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ðµ Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ñ�Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ%B: â€ž!samegpâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð±ÐµÐ· â€ž.prologueâ€œ-Ð°: %s%B: %A+0x%lx: Ð�ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ Ñ�ÐºÐ¾Ðº Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ð˜Ð¡Ð� Ñ€ÐµÐ¶Ð¸Ð¼Ð°; Ñ€Ð°Ð·Ð¼Ð¾Ñ‚Ñ€Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐµ Ñ�Ð° ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¸Ð¼ Ð¼ÐµÑ’ÑƒÐ¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµÐ¼.%B: %s
+%B: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸%B: %s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ %d%B: %s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ %u (Ð½Ð°Ñ˜Ð². %d)%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸%B: Ð¿Ð¾Ð´-Ð¿Ð¾Ð´ÐµÐ¾Ðº â€ž.gotâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ 64K (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ˜Ðµ %d)%B: â€ž.opdâ€œ Ð½Ð¸Ñ˜Ðµ Ñ€ÐµÐ³ÑƒÐ»Ð°Ñ€Ð°Ð½ Ð½Ð¸Ð· ÑƒÐ½Ð¾Ñ�Ð° Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð°%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž.preinit_arrayâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½ Ñƒ â€žDSOâ€œ-Ñƒ%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: â€žR_SH_PSHAâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¾Ð¿Ñ�ÐµÐ³Ñƒ -32..32%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: â€žR_SH_PSHLâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¾Ð¿Ñ�ÐµÐ³Ñƒ -32..32%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ 0x%lx%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ñ†Ð¸Ñ™ Ð³Ñ€Ð°Ð½Ðµ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¿Ð¾Ð´Ñ€ÑˆÐºÐµ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žR_SH_USESâ€œ Ð¿Ð¾ÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ â€žinsnâ€œ 0x%x%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° â€žR_SH_USESâ€œ%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ â€žR_SH_USESâ€œ%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð±Ñ€Ð¾Ñ˜%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žCOUNTâ€œ%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñ˜Ðµ Ñƒ Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ%B: â€ž@gprelâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: â€ž@internalâ€œ Ð³Ñ€Ð°Ð½Ð° ÐºÐ° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ%B: â€ž@pcrelâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð�Ð‘Ð˜ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð½Ð¾Ð¼ Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ðµ ÐµÐ¼ÑƒÐ»Ð°Ñ†Ð¸Ñ˜Ðµ%B: Ð�Ð‘Ð˜ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°%B: Ð�Ð‘Ð˜ Ð¸Ð·Ð´Ð°ÑšÐµ %ld Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð¾ Ñ�Ð° Ð�Ð‘Ð˜-Ñ˜ÐµÐ¼ Ð¸Ð·Ð´Ð°ÑšÐ° %ld%B: Ð�Ð¡Ð• Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°%B: ÐŸÐ¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°%B: Ð�Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°%B: â€žBE8â€œ Ñ�Ð»Ð¸ÐºÐµ Ñ�Ñƒ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ðµ Ñ�Ð°Ð¼Ð¾ Ñƒ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸.%B: Ð£Ð²ÐµÐ·ÐµÐ½ Ñ˜Ðµ Ð»Ð¾Ñˆ Ñ�Ð½Ð¸Ð¼Ð°Ðº Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d%B: â€žCALL15â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°%B: â€žCALL16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ ÑƒÐ¿Ð¾Ñ€ÐµÑ’ÑƒÑ˜ÑƒÑ›Ðµ â€žLO16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð¿ÑƒÑ�Ñ‚Ð¸Ð¼ â€žbrâ€œ (%s) Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ�Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¾Ð¼ 0x%lx (> 0x1000000).%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð¿ÑƒÑ�Ñ‚Ð¸Ð¼ â€žbrâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ. ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ â€žbrlâ€œ Ð¸Ð»Ð¸ Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ.%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° Ñ�Ð°Ð¶ÐµÑ‚Ð¸Ð¼ Ð±Ð¸Ð½Ð°Ñ€Ð½Ð¸Ð¼ Ð�Ð»Ñ„Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°.
+   ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¿Ñ€ÐµÐ²Ð¾Ð´Ð¸Ð¾Ñ†Ð°, Ð¸Ð»Ð¸ â€žobjZâ€œ, Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð½ÐµÑ�Ð°Ð¶ÐµÑ‚Ðµ Ð±Ð¸Ð½Ð°Ñ€Ð½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ.%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ â€ž%sâ€œ Ð¸ â€ž%sâ€œ.%B: ÐžÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ñ™Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñƒ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° Ð³Ñ€ÑƒÐ¿Ðµ: 0x%lx%B: Ð�Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð´Ð¾Ð´Ð°Ð¼ Ð¿Ñ€ÐµÐ¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿Ð¸Ñ�Ð½Ð¸ÐºÐ° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼%B: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ â€žGOTâ€œ: Ð‘Ñ€Ð¾Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð° 8- Ð¸Ð»Ð¸ 16-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ÐµÐ¼ > %d%B: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ â€žGOTâ€œ: Ð‘Ñ€Ð¾Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð° 8-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ÐµÐ¼ > %d%B: â€žGOTâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ñƒ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¸Ð¼%B: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° Ð£Ð’Ð•Ð—Ð˜ ÐšÐ�Ðž Ð·Ð° â€ž%sâ€œ Ð·Ð°Ñ�ÐµÑšÑƒÑ˜Ðµ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ Ð£Ð’Ð•Ð—Ð˜ ÐšÐ�Ðž%B: Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð²ÐµÐºÑ‚Ð¾Ñ€Ð° â€žISRâ€œ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°: Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð° %u Ð±Ð°Ñ˜Ñ‚Ð°; Ñ‚ÐµÐºÑƒÑ›Ð° %u Ð±Ð°Ñ˜Ñ‚Ð°%B: Ð¡ÐºÑƒÐ¿ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°%B: Ð£Ð²ÐµÐ·ÐµÐ½Ð° Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d%B: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð»Ð¾ÑˆÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%B: Ð£Ð³Ð½ÐµÐ¶Ñ’ÐµÐ½Ð¾ â€žOMIT_FPâ€œ Ñƒ â€ž%Aâ€œ.%B: Ð�ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¸Ð·Ð´Ð°ÑšÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð·Ð° Ð²ÐµÑ€Ð·Ð¸Ð¾Ð½Ð¸Ñ�Ð°Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ%B: Ð�ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ Ð¼ÐµÑ�Ñ‚Ð° Ð·Ð° Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼, Ð¿Ñ€Ð¾Ð±Ð°Ñ˜Ñ‚Ðµ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÑ‚Ðµ Ñ�Ð° â€ž-Nâ€œ%B: Ð¡Ð°Ð¼Ð¾ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð¸ â€ž%%g[2367]â€œ Ð¼Ð¾Ð³Ñƒ Ð±Ð¸Ñ‚Ð¸ Ð´ÐµÐºÐ»Ð°Ñ€Ð¸Ñ�Ð°Ð½Ð¸ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµÐ¼ â€žSTT_REGISTERâ€œ%B: ÐŸÐ¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ð»Ð¸ Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ (0x%x) Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ð¸ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ (%d) Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾.
+%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð¿ÑˆÑ‚ÐµÐ¼ â€žELFâ€œ-Ñƒ (EM: %d)%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ðµ Ð¾Ð´Ð½Ð¾Ñ�Ð¸ Ð½Ð° â€žSBâ€œ Ð°Ð»Ð¸ â€ž__c6xabi_DSBT_BASEâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾%B: Ð¢Ð›Ð¡ Ð¼ÐµÑ�Ð½Ð¸ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¸ ÐºÐ¾Ð´ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°%B: Ð¢Ð›Ð¡ Ð¾Ð´ÐµÑ™Ñ†Ð¸ Ð½Ð¸Ñ�Ñƒ Ñ�ÑƒÑ�ÐµÐ´Ð½Ð¸:%B: Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ¾ â€žTLSâ€œ Ð¿Ñ€ÐµÐ»Ð°Ð· Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð¿Ñ€Ð¸ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ%B: ÐŸÑ€Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ â€žPT_DYNAMICâ€œ Ð½Ð¸Ñ˜Ðµ â€ž.dynamicâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº%B: ÐœÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%A)%B: ÐŸÑ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ°: %d (>= %d)%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€” Ð¸Ð¼Ð°Ñ˜Ñƒ Ð²Ð¸ÑˆÐµ Ð¾Ð´ Ñ˜ÐµÐ´Ð½Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€” Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ðµ Ñ�Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ%B: Ð�ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° ÑƒÐ²Ð¾Ð·Ð°; %x%B: ÐžÐ±Ð°Ð²ÐµÐ·Ð°Ð½ â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ
+%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ â€ža.out.adobeâ€œ: %x
+%B: Ð�ÐµÐ¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ðµ â€žOMIT_FPâ€œ Ñƒ â€ž%Aâ€œ.%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž.directiveâ€œ: %s%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð½Ð°Ð·Ð¸Ð² Ð²Ñ€Ñ�Ñ‚Ðµ ÑƒÐ²Ð¾Ð·Ð°; %x%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° ÑƒÐ²Ð¾Ð·Ð°; %x%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ (0x%x) Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ð¸ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° ÐºÐ»Ð°Ñ�Ð° Ñ�Ð¼ÐµÑˆÑ‚Ð°Ñ˜Ð° â€ž%dâ€œ Ð·Ð° â€ž%sâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð—Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° â€žIMAGE_SCN_MEM_NOT_PAGEDâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žThumb BLXâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ†Ð¸Ñ™Ð° Ð½Ð° â€žthumbâ€œ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ.%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾ÑˆÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð¿Ñ†Ð¸Ñ˜Ðµ â€ž%sâ€œ %u Ð¼Ð°ÑšÐ° Ð¾Ð´ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ð°%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð´Ñ€ÐµÐ´Ð¸Ð¼ Ñ†Ð¸Ñ™Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žPLTâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐµ Ñƒ â€žthumbâ€œ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾%B: â€žXMC_TC0â€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ñ†Ð½Ð´ÑƒÐ¶Ð¸Ð½Ðµ %d%B: â€ž%Aâ€œ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ %ld Ð¸Ð· â€ž%Aâ€œ Ð¸Ð·Ð° Ð¾Ð¿Ñ�ÐµÐ³Ð° â€žADDIUPCâ€œ%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ â€žFDPICâ€œ-Ñƒ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€žFDPICâ€œ%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸%B: â€ž%sâ€œ Ð¸Ð¼Ð° Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ñ€ÐµÐ´Ð¾Ð²Ð° Ð°Ð»Ð¸ Ð½Ðµ Ð¸ Ð·Ð°Ñ‚Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº%B: â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ð°Ð»Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð°%B: â€žld -râ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ Ñ�Ð° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð° â€žPE MIPSâ€œ
+%B: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº -0x%x Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°%B: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº 0x%x Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°%B: Ð»Ð¾Ñˆ â€žXTY_ERâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ: ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ñ†Ð±Ñ€Ð¾Ñ˜ %d Ñ�Ñ†Ð½Ð´ÑƒÐ¶Ð¸Ð½Ðµ %d%B: Ð»Ð¾ÑˆÐµ â€žpair/refloâ€œ Ð½Ð°ÐºÐ¾Ð½ â€žrefhiâ€œ
+%B: Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ%B: Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° (0x%lx >= 0x%lx) Ð·Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ%B: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€žihex_Ð¾Ð´ÐµÑ™Ð°Ðº_Ñ‡Ð¸Ñ‚Ð°ÑšÐ°â€œ%B: Ð»Ð¾ÑˆÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ð·Ð° %lu%B: Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: %d%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ%B: Ð¸Ð·Ð¼ÐµÐ½Ð° Ñƒ â€žgpâ€œ-Ñƒ: BRSGP %s%B: ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð¼Ð¾Ñ›Ð½Ð¸Ñ… ÑƒÐ½Ð¾Ñ�Ð°%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° 64-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚Ð¸ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ Ð¼Ð°Ð»Ð° ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚Ð¸ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ Ð²ÐµÐ»Ð¸ÐºÐ° ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ ÑƒÐ¾Ð±Ð¸Ñ‡Ð°Ñ˜ÐµÐ½Ð¸Ð¼ Ð¿ÑƒÑ‚ÐµÐ¼ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ Ñ�Ð° â€ž-mrelocatableâ€œ%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž-mrelocatableâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ ÑƒÐ¾Ð±Ð¸Ñ‡Ð°Ñ˜ÐµÐ½Ð¸Ð¼ Ð¿ÑƒÑ‚ÐµÐ¼%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð·Ð° ÑƒÐ»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ
+%B: Ñ†-Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð·Ð°Ñ‚Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›ÐµÐ¼ Ð¾Ð´ÐµÑ™ÐºÑƒ%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½, Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]%B: â€ždtpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡Ð¸ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð¸Ð·Ð²Ð¾Ð·Ð° â€ž%sâ€œ%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜
+%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ
+%B: ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð½Ð¾Ð¼ Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ðµ ÐµÐ¼ÑƒÐ»Ð°Ñ†Ð¸Ñ˜Ðµ%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð‘Ð˜ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°.%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð´ÐµÑ�Ð¸Ð¼ â€ž_ITB_BASE_â€œ%B: Ð³Ñ€ÐµÑˆÐºÐ°: ÐžÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€ÐµÑˆÐºÐµ ÐšÐ¾Ñ€Ñ‚ÐµÐºÑ�Ð° Ð�8 Ñ˜Ðµ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½ Ð½ÐµÐ±ÐµÐ·Ð±ÐµÐ´Ð½Ð¾Ñ˜ Ð»Ð¾ÐºÐ°Ñ†Ð¸Ñ˜Ð¸%B: Ð³Ñ€ÐµÑˆÐºÐ°: ÐžÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€ÐµÑˆÐºÐµ ÐšÐ¾Ñ€Ñ‚ÐµÐºÑ�Ð° Ð�8 Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (ÑƒÐ»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ°)%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð¡ÐºÑƒÐ¿ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°.%B: Ð³Ñ€ÐµÑˆÐºÐ°: â€žVFP11â€œ Ð¿Ñ€ÐµÐ²Ð»Ð°ÐºÐ° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð½Ð° %08x Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%pâ€œ
+%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð±Ð°Ð²ÐµÐ·Ð°Ð½ â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ.%B: ÐºÐ»Ð°Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° â€ž%sâ€œ%B: â€žgpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð½Ð° Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ%B: Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½%B: Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ
+%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° %d Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð¸ 0x%lx%B: Ð½ÐµÐ´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ: %d%B: Ð½ÐµÑ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ. Ð˜Ð·Ð»Ð°Ð· Ñ˜Ðµ 0x%x, Ð° ÑƒÐ»Ð°Ð· 0x%x%B: Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÐºÐ° â€ž%sâ€œ Ñ˜Ðµ Ð¿ÐµÑ‚Ñ™Ð°%B: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ñƒ â€žihex_Ð¾Ð´ÐµÑ™Ð°Ðº_Ñ‡Ð¸Ñ‚Ð°ÑšÐ°â€œ%B: Ð½Ð° ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ%B: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ ÑƒÐ½Ð¾Ñ� â€žSHT_GROUPâ€œ%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²ÐµÐ·Ð° â€ž%luâ€œ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ (Ð¸Ð½Ð´ÐµÐºÑ� â€ž%uâ€œ)%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ñ�ÐºÐµ â€ž%u >= %luâ€œ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%B: Ñ�ÐºÐ¾Ðº Ñ˜Ðµ Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð´Ð°Ð»ÐµÐºÐ¾
+%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ 32-Ð±Ð¸Ñ‚Ð½Ð¸ ÐºÐ¾Ð´ Ñ�Ð° 64-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ ÐºÐ¾Ð´Ð¾Ð¼%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ 64-Ð±Ð¸Ñ‚Ð½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ð° 32-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ ÐºÐ¾Ð´ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ â€žUltraSPARCâ€œ-Ñƒ Ñ�Ð° ÐºÐ¾Ð´Ð¾Ð¼ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð½Ð¸Ð¼ â€žHALâ€œ-Ñƒ%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€žÐ°ÑƒÑ‚Ð¾-Ð¿Ð¸Ðºâ€œ-Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° â€žÐ½Ðµ-Ð°ÑƒÑ‚Ð¾-Ð¿Ð¸Ðºâ€œ-Ð°%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸ Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€žÐºÐ¾Ð½Ñ�Ñ‚Ð°Ð½Ñ‚Ð½Ð¾Ð³-Ð³Ð¿â€œ-Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° â€žÐ½Ðµ-ÐºÐ¾Ð½Ñ�Ñ‚Ð°Ð½Ñ‚Ð½Ð¾Ð³-Ð³Ð¿â€œ-Ð°%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 16 Ð±Ð¸Ñ‚Ð° (-mshort) Ð° Ð´Ñ€ÑƒÐ³Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 32 Ð±Ð¸Ñ‚Ð°%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 32 Ð±Ð¸Ñ‚Ð° (-fshort-double) Ð° Ð´Ñ€ÑƒÐ³Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 64 Ð±Ð¸Ñ‚Ð°%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° â€žHCS12â€œ Ñ�Ð° Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸Ð¼ Ð·Ð° â€žHC12â€œ%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸ Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð½Ðµ-Ð¿Ð¸Ðº ÐºÐ¾Ð´ Ñƒ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¾Ð¼ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ð½Ð¾Ð¼ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð·Ð°Ñ…Ð²Ð°Ñ‚-Ð½Ð°-Ð�Ð˜Ð¨Ð¢Ð�Ð’Ð�ÐžÐˆ-Ð´ÐµÑ€ÐµÑ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ�Ð° Ð½Ðµ-Ð·Ð°Ñ…Ð²Ð°Ñ‚Ð½Ð¸Ð¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ â€ž%Aâ€œ%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ñƒ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ%B: Ð½Ð° Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ%B: Ð»Ð¾ÑˆÐµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ â€žXTY_LDâ€œ â€ž%sâ€œ%B: Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð¢Ð›Ð¡ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ.%B: Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð³Ñ€ÑƒÐ¿Ðµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%B: Ð½Ðµ-Ð¿Ð¸Ðº ÐºÐ¾Ð´ Ñ�Ð° â€žimmâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ¼ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° (0x%lx) Ð·Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ°Ð´Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½ÐµÐ¼Ð° Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°%B: â€žpcâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: â€žpcâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð»Ð°Ð±Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð±ÐµÐ· â€ž-fPICâ€œ?%B: Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%s:%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ñ†-Ð¾Ð´ÐµÑ™ÐºÑƒ%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›ÐµÐ³ Ð¸Ð½Ð´ÐµÐºÑ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: %ld%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð¸Ð¼Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº: %d%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð¾Ð´Ñ€Ð°Ð´Ð¸%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ%B: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ñƒ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ x32%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ â€ž%sâ€œ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_386_GOTOFFâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_386_GOTOFFâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ %s â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_X86_64_GOTOFF64â€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° â€ž%A+0x%xâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼%B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ, Ð°Ð»Ð¸ Ð½ÐµÐ¼Ð° Ð½Ð¸ÐºÐ°ÐºÐ²Ð¾Ð³ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%A lma %#lxâ€œ Ñ˜Ðµ Ð´Ð¾Ñ‚ÐµÑ€Ð°Ð½ Ð½Ð° %#lx%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ñ�ÐºÐ¸ Ð½Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ñƒ %ld%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð¾Ð´ÐµÐ»Ð¸Ñ‚Ð¸ Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ %d%B: â€žsh_link [%d]â€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾%B: â€žsh_linkâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ ÑƒÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ%B: â€žsh_linkâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ ÑƒÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° ÑƒÐºÐ»Ð¾ÑšÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ%B: Ð¾Ñ™Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñ˜Ðµ Ð½ÑƒÐ»Ð° Ñƒ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ñƒ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°%B: Ñ€Ð°Ð·Ð¼Ð°Ñ‚Ñ€Ð°Ð¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÑƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ð° Ð¸ â€ž%sâ€œ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð°%B: Ð½Ð¸Ñ�ÐºÐ° Ñ�Ðµ Ð½Ðµ Ð·Ð°Ð²Ñ€ÑˆÐ°Ð²Ð° Ð½ÑƒÐ»Ð¾Ð¼ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð˜Ð›Ð¤ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°.%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð²Ñ€Ñ�Ñ‚Ñƒ Ñ†Ñ�ÐµÐºÑ‚Ð¾Ñ€Ð° â€ž%dâ€œ%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ ÐºÐ»Ð°Ñ�Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%dâ€œ%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ð°Ð»Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�ÑƒÑ‚Ð°Ð½%B: ÑƒÐ·Ð¸Ð¼Ð°ÑšÐµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¾Ð±Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ðµ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ%B: Ð¼ÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)%B: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° (%d)%B: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ°: %u%B: â€žtpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[12] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$5â€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[1] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$2â€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[1] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$4â€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[9] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž__tls_usedâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[PE_IMPORT_ADDRESS_TABLE (12)] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$6â€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[PE_IMPORT_ADDRESS_TABLE(12)] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$6â€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žARMâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žTHUMBâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ â€žVFP11â€œ Ð¿Ñ€ÐµÐ²Ð»Ð°ÐºÑƒ â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð±Ð°Ð²Ð¸Ð¼ Ñ€Ð°Ñ�Ð¿Ð°ÐºÐ¾Ð²Ð°Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ñ�Ñ‚Ð°ÑšÐµ Ñ�Ð°Ð¶Ð¸Ð¼Ð°ÑšÐ° Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ñ�Ñ‚Ð°ÑšÐµ Ñ€Ð°Ñ�Ð¿Ð°ÐºÐ¸Ð²Ð°ÑšÐ° Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%B: Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð° ÑƒÐ¿ÑƒÑ‚Ð° ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ%B: Ð½ÐµÐ¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž.opdâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ%B: Ð½ÐµÐ¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð½Ð° â€žR_PPC64_TOCSAVEâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð�Ð¢Ð� Ð²Ñ€Ñ�Ñ‚Ð° â€ž%dâ€œ Ñƒ Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð¼ Ð´ÐµÐ»Ñƒ%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°ÑšÐµ Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¾ Ð²ÐµÑ€Ð·Ð¸Ð¾Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%uâ€œ Ñƒ â€ž.opdâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð½Ð°ÐºÐ¾Ð½ Ð�Ð¢Ð�-Ð°%B: Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ’ÐµÐ½Ð¾ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ%B: Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ â€ž%sâ€œ
+%B: Ð½ÐµÐ¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¸ Ð�Ð¢Ð˜ Ð·Ð°Ð¿Ð¸Ñ� â€ž%uâ€œ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%uâ€œ%B: [%d] Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ð³Ñ€ÑƒÐ¿Ð¸ [%s]%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° 0x%lx%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð°/Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ (0x%x) Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%iâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%iâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°
+%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° %s Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°%B: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ: â€žALPHA_R_GRELHIGHâ€œ%B: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ: â€žALPHA_R_GRELLOWâ€œ%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ Ñ�Ð° Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð¾Ð¼ â€ž_â€œ, Ð°Ð»Ð¸ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÑ˜Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ñ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸Ð¼Ð° Ð±ÐµÐ· Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð°%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ Ð±ÐµÐ· Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð°, Ð°Ð»Ð¸ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÑ˜Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ñ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸Ð¼Ð° Ñ�Ð° Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð¾Ð¼ â€ž_â€œ%B: Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñ‡Ð²Ð¾Ñ€ Ð¸Ð·Ð´Ð°ÑšÐ° Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žCOMDATâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð° Ñ�Ð° Ð½Ð°Ð·Ð¸Ð²Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ñ˜Ðµ Ð¿Ñ€Ð°Ð·Ð°Ð½ Ð¿Ð¾Ð´ÐµÐ¾Ðº ÐºÐ¾Ñ˜Ð¸ Ñ�Ðµ Ð¼Ð¾Ð¶Ðµ ÑƒÑ‡Ð¸Ñ‚Ð°Ñ‚Ð¸, Ð´Ð° Ð»Ð¸ Ñ˜Ðµ Ñ‚Ð¾ Ð½Ð°Ð¼ÐµÑ€Ð°Ð²Ð°Ð½Ð¾ ?
+%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐšÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°.%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐµÐ»Ñ„ Ð¸Ð·Ð´Ð°ÑšÐ° %s Ð¸ %s Ð½Ð¸Ñ�Ñƒ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð°.%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð�Ð°Ð¸ÑˆÐ°Ð¾ Ñ�Ð°Ð¼ Ð½Ð° Ñ�Ñ‚Ð°Ñ€Ð¸Ñ˜Ðµ Ð¸Ð·Ð´Ð°ÑšÐµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°, Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° Ñ‚ÐµÐºÑƒÑ›Ð¸Ð¼ Ð»Ð°Ð½Ñ†ÐµÐ¼ Ð°Ð»Ð°Ñ‚Ð°.%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð´Ð¾Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ‚Ð°Ðº Ð¾ Ð±Ñ€Ð¾Ñ˜Ñƒ Ñ€ÐµÐ´Ð° Ð·Ð° â€ž%sâ€œ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð¸Ð¼Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ¸Ð¼Ð°%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ Ñ‡Ð¸Ñ‚Ð°ÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€žPICâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ð° Ð½Ðµ-â€žPICâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð°Ð±Ð¸Ð¿Ð¾Ð·Ð¸Ð²Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð½Ðµ-Ð°Ð±Ð¸Ð¿Ð¾Ð·Ð¸Ð²Ð°%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žSDA_BASEâ€œ.%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ð¾ Ñ€ÐµÑˆÐµÑšÐµ â€žVFP11â€œ Ð³Ñ€ÐµÑˆÐ°ÐºÐ° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð½Ð¾ Ð·Ð° Ñ†Ð¸Ñ™Ð½Ñƒ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ñƒ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žsh_linkâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ ÑƒÐ½Ð¾Ñ�Ñƒ â€žGOTâ€œ.%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚â€ž%B:%A%sâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°
+%B:%A: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð·Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð ÐµÐ´ Ð¥ÐµÑ‚Ð° %B:%d: Ð›Ð¾ÑˆÐ° Ñ�ÑƒÐ¼Ð° Ð¿Ñ€Ð¾Ð²ÐµÑ€Ðµ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð¡-Ð·Ð°Ð¿Ð¸Ñ�Ð°
+%B:%d: Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð·Ð½Ð°Ðº â€ž%sâ€œ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð¡-Ð·Ð°Ð¿Ð¸Ñ�Ð°
+%B:%d: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð·Ð½Ð°Ðº â€ž%sâ€œ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%B:%u: Ð»Ð¾ÑˆÐ° Ñ�ÑƒÐ¼Ð° Ð¿Ñ€Ð¾Ð²ÐµÑ€Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ (Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… %u, Ð½Ð°Ñ’Ð¾Ñ… %u)%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð»Ð¸Ð½ÐµÐ°Ñ€Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð»Ð¸Ð½ÐµÐ°Ñ€Ð½Ðµ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%B:%u: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° â€žihexâ€œ Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸%C: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°
+%F%P: Ð²ÐµÑ›_Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð°_Ñ‚Ð°Ð±ÐµÐ»Ð°: %E
+%F%P: Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ�Ð° Ñ˜ÐµÐ´Ð½Ð°ÐºÐ¾ÑˆÑ›Ñƒ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ñƒ â€ž%Bâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð¸Ð·Ð²Ñ€ÑˆÐ½Ðµ; Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° â€ž-fPIEâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ¶Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° â€ž-pieâ€œ
+â€ž%Hâ€œ â€ž__tls_get_addrâ€œ Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ð¸Ð¾ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚, Ð¢Ð›Ð¡ Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�ÐºÑ™ÑƒÑ‡ÐµÐ½Ð°
+Ð�Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚ â€ž%Hâ€œ Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ð¸Ð¾ â€ž__tls_get_addrâ€œ, Ð¢Ð›Ð¡ Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�ÐºÑ™ÑƒÑ‡ÐµÐ½Ð°
+%H: â€žR_FRV_FUNCDESCâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼
+%H: â€žR_FRV_FUNCDESC_VALUEâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼
+%H: â€žR_FRV_GETTLSOFFâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ Ð¿Ð¾Ð·Ð¸Ð²Ð°
+%H: â€žR_FRV_GETTLSOFF_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žcalllâ€œ
+%H: â€žR_FRV_GOTTLSDESC12â€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žlddiâ€œ
+%H: â€žR_FRV_GOTTLSDESCHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ
+%H: â€žR_FRV_GOTTLSDESCLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ
+%H: â€žR_FRV_GOTTLSOFF12â€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žldiâ€œ
+%H: â€žR_FRV_GOTTLSOFFHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ
+%H: â€žR_FRV_GOTTLSOFFLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ
+%H: â€žR_FRV_TLSDESC_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žlddâ€œ
+%H: â€žR_FRV_TLSMOFFHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ
+%H: â€žR_FRV_TLSOFF_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žldâ€œ
+%H: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ
+%H: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ
+%H: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°
+%H: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: %s
+%H: â€žÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ Ð¼Ð¾Ð´ÑƒÐ»Ñƒ
+%H: â€žÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%s+%vâ€œ Ñ˜Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð¿Ñ€Ð¾ÑƒÐ·Ñ€Ð¾ÐºÐ¾Ð²Ð°Ð»Ð¾ Ð³Ð¾Ñ€ÑšÑƒ Ð³Ñ€ÐµÑˆÐºÑƒ
+%P%F: â€ž--relaxâ€œ Ð¸ â€ž-râ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾
+%P%F: Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð½Ð°Ð¿Ñ€Ð°Ð²Ð¸Ð¼ â€žex9.it %sâ€œ Ñ…ÐµÑˆ Ñ‚Ð°Ð±ÐµÐ»Ñƒ: %E
+%P%X: Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ‡Ð¸Ñ‚Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ: %E
+%P%X: Ð¾Ð´ÐµÑ™Ð°Ðº Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ Ð¸Ð¼Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°.
+%P: %B: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%Tâ€œ
+%P: %B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ
+%P: %B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ
+%P: %B: Ð¼ÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)
+%P: %B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°
+%P: %B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð·Ð° â€ž%Tâ€œ
+%P: %B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ
+%P: %B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ.
+%P: %B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ.
+%P: %H: â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d
+%P: %H: â€ž%sâ€œ Ð·Ð° Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%Tâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾
+%P: %H: â€ž%sâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð¾Ð¼ Ð¾Ð´Ñ�Ñ‚Ñ€Ð°ÑšÐµÐ½Ð¸ ÑƒÐ½Ð¾Ñ� Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°
+%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d
+%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°
+%P: %H: â€ž%sâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¾ Ñ�Ð° Ð¢Ð›Ð¡ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%Tâ€œ
+%P: %H: â€ž%sâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¾ Ñ�Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%Tâ€œ
+%P: %H: Ð¿Ð¾Ð·Ð¸Ð² â€ž@localâ€œ Ð·Ð° i-Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ
+%P: %H: Ð¿Ð¾Ð·Ð¸Ð²Ñƒ Ð·Ð° â€ž%Tâ€œ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€žnopâ€œ, Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð²Ñ€Ð°Ñ‚Ð¸Ð¼ Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ
+%P: %H: Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ â€ž%uâ€œ
+%P: %H: Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ â€ž%uâ€œ
+%P: %H: Ð½Ðµ Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ð½Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ
+%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾
+%P: %H: Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð·Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ.
+%P: %H: â€ž%sâ€œ Ñ˜Ðµ Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ
+%P: %H: Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ
+%P: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ñƒ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ñƒ Ñ�Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð¾Ð¼ â€ž%sâ€œ
+%P: â€ž%sâ€œ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸Ðº Ð·Ð° â€ž.eh_frame sdata4â€œ ÐºÐ¾Ð´Ð¸Ñ€Ð°ÑšÐµ%P: â€ž.opdâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½ Ñƒ Ð�Ð‘Ð˜-Ñ˜Ñƒ Ð¸Ð·Ð´Ð°ÑšÐµ %d
+%P: â€žDW_EH_PE_datarelâ€œ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð²Ñƒ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ñƒ.
+%P: Ð½Ð°Ñ’Ð¾Ñ… Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð¸ â€žELFâ€œ Ð¼Ð°ÑˆÐ¸Ð½Ñ�ÐºÐ¸ ÐºÐ¾Ð´ (%d) Ñƒ â€ž%Bâ€œ, Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… â€ž%dâ€œ
+%P: â€žbss-pltâ€œ Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�Ð¸Ñ™ÐµÐ½Ð¾ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð¸Ñ�Ð°ÑšÐµÐ¼
+%P: â€žbss-pltâ€œ Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�Ð¸Ñ™ÐµÐ½Ð¾ Ð·Ð±Ð¾Ð³ â€ž%Bâ€œ
+%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¸Ð·Ð³Ñ€Ð°Ð´Ð¸Ð¼ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ
+%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ
+%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° ÑƒÐ½Ð¾Ñ�Ð° Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð° Ð·Ð° â€ž%Tâ€œ
+%P: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¼Ð½Ð¾Ð¶Ð°Ð²Ð°ÑšÐ° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð»ÐµÑšÐ¾ â€žpltâ€œ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµ; Ð¸Ð·Ð±ÐµÐ³Ð°Ð²Ð°Ñ˜Ñ‚Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ â€žLD_BIND_NOW=1â€œ Ð¸Ð»Ð¸ Ð½Ð°Ð´Ð¾Ð³Ñ€Ð°Ð´Ð¸Ñ‚Ðµ Ð³Ñ†Ñ†
+%P: Ð³Ñ€ÐµÑˆÐºÐ° Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð·Ð° â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ
+%P: Ð³Ñ€ÐµÑˆÐºÐ° Ñƒ â€ž%B(%A)â€œ; Ð½ÐµÑ›Ðµ Ð±Ð¸Ñ‚Ð¸ Ð½Ð°Ð¿Ñ€Ð°Ð²Ñ™ÐµÐ½Ð° Ð½Ð¸Ñ˜ÐµÐ´Ð½Ð° â€ž.eh_frame_hdrâ€œ Ñ‚Ð°Ð±ÐµÐ»Ð°.
+%P: Ñ„Ð´Ðµ ÐºÐ¾Ð´Ð¸Ñ€Ð°ÑšÐµ Ñƒ â€ž%B(%A)â€œ Ñ�Ð¿Ñ€ÐµÑ‡Ð°Ð²Ð° Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐµ â€ž.eh_frame_hdrâ€œ Ñ‚Ð°Ð±ÐµÐ»Ðµ.
+%P: Ð³Ñ€ÐµÑˆÐºÐ° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ
+%P: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ð° Ð´ÑƒÐ³Ð¾Ð³ Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ
+%P: Ñ‚Ð°Ñ‡ÐºÐµ Ð²Ð¸ÑˆÐµ ÑƒÐ½Ð¾Ñ�Ð°: Ñƒ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ
+%P: Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð²ÐµÐ·Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°
+%P: Ð¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜Ñƒ Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ñ‚Ð¾Ñ˜ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸
+%P: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ â€žst_otherâ€œ Ð·Ð° Ð�Ð‘Ð˜ Ð¸Ð·Ð´Ð°ÑšÐµ 1
+%P: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ â€žDT_TEXTRELâ€œ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ.
+%X%C: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°
+%X%P: %B(%A): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%Râ€œ Ð¸Ð´Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°
+%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð½Ðµ Ð¿Ð¾Ñ‡Ð¸ÑšÐµ Ñƒ Ñ€ÐµÐ´Ñƒ Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.
+%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ñ˜Ðµ Ð²ÐµÑ›Ð¸ Ð¾Ð´ Ñ€ÐµÐ´Ð° Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.
+%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ñ€ÐµÐ´Ñƒ Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.
+%X%P: Ð¾Ð´ÐµÑ™Ñ†Ð¸ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð¸ â€ž%Aâ€œ Ð½Ðµ Ð¿Ð¾Ñ‡Ð¸ÑšÑƒ Ð½Ð° Ð¸Ñ�Ñ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸.
+%Xâ€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿ÑƒÑ‚Ð½Ð¾ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ: Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ñ˜Ðµ Ñƒ Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ
+â€ž%sâ€œ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð½Ð° ÑƒÐºÐ»Ð¾ÑšÐµÐ½Ð¾Ð¼ ÑƒÐ½Ð¾Ñ�Ñƒ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¾
+â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¾ Ñƒ â€ž%sâ€œ
+â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°%s(%s): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld%s: %s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: 0x%lx > 0xffff%s: Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¸ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº%s: 0x%v 0x%v
+%s: Ð›Ð¾ÑˆÐ° Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: â€žMainâ€œ Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð½Ð° â€ž%sâ€œ ÑƒÐ¼ÐµÑ�Ñ‚Ð¾ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ â€ž%sâ€œ
+%s: Ð“Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð·Ð° â€ž%sâ€œ; Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½ Ñƒ Ñ€Ð°Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸
+%s: Ð“Ð�Ð¡ Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ ÐŸÐ¢Ð‘ â€žinsnâ€œ Ñ�Ð° â€žR_SH_PT_16â€œ%s: Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð·Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð·Ð°
+ Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡ÐµÐ¼: Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾: 0x%lx%08lx != Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾: 0x%lx%08lx
+%s: Ð˜Ð·Ð²ÐµÐ·ÐµÐ½Ð° Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d%s: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° â€žLOCALâ€œ: Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ â€ž$%ldâ€œ Ð½Ð¸Ñ˜Ðµ Ð¼ÐµÑ�Ð½Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€.  ÐŸÑ€Ð²Ð¸ Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ñ˜Ðµ â€ž$%ldâ€œ.%s: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð»Ð¾ÑˆÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ%s: Ð�ÐµÐ¼Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð° Ð·Ð° Ð´Ð¾Ð´ÐµÑ™Ð¸Ð²Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð´ÑƒÐ³Ð¾Ð³ %d Ð±Ð°Ñ˜Ñ‚Ð°
+%s: Ð�ÐµÐ¼Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð° Ð·Ð° Ð´Ð¾Ð´ÐµÑ™Ð¸Ð²Ð°ÑšÐµ Ð½Ð°Ð·Ð¸Ð²Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ
+%s: Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð¸ Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%s: Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð¸ Ñƒ â€ž%Bâ€œ%s: Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ â€ž%Bâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð¸ Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ%s: Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ â€ž%Bâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð¸ Ñƒ â€ž%Bâ€œ%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° Ð½Ð° 0x%x Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÐºÐ¾Ñ˜Ð¸ Ð½Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ð¸ÐºÐ°ÐºÐ°Ð² ÑƒÐ½Ð¾Ñ�%s: ÐœÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)%s: ÐŸÑ€ÐµÐ»Ð°Ð·Ð°Ðº Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½%s: â€žXCOFFâ€œ Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ ÐºÐ°Ð´Ð° Ñ�Ðµ Ð½Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ â€žXCOFFâ€œ Ð¸Ð·Ð»Ð°Ð·%s: â€ž__gpâ€œ Ð½Ðµ Ð¿Ð¾ÐºÑ€Ð¸Ð²Ð° Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚ ÐºÑ€Ð°Ñ‚ÐºÐ¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°%s: Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð¸Ð·Ð° ÐºÑ€Ð°Ñ˜Ð° Ñ�Ñ‚Ð¾Ð¿Ñ™ÐµÐ½Ð¾Ð³ Ð¾Ð´ÐµÑ™ÐºÐ° (%ld)%s: Ð°Ð´Ñ€ÐµÑ�Ð° 0x%s Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° Ð·Ð° Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ñƒ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ Ð¿Ð»ÑƒÑ� Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: â€ž%sâ€œ Ñƒ â€ž%sâ€œ%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ Ð¿Ð»ÑƒÑ� Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: (Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾) Ñƒ â€ž%sâ€œ%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ â€ža.outâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ â€žoasysâ€œ%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ža.outâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð·Ð° Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ %d, %d Ð±Ð°Ñ˜Ñ‚Ð°
+%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ Ð¿Ñ€Ð¸Ð²Ð¸Ð´Ð½Ð¸ ÑƒÐ½Ð¾Ñ� â€ž%sâ€œ%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ â€žfdpicâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ Ð½Ðµ-â€žfdpicâ€œ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ñƒ%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ð½Ðµ-â€žfdpicâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ â€žfdpicâ€œ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ñƒ%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ñ˜Ðµ ÐºÐ°Ð¾ 32-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð° â€ž%sâ€œ Ñ˜Ðµ 64-Ð±Ð¸Ñ‚Ð½Ð¸%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ñ˜Ðµ ÐºÐ°Ð¾ 64-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð° â€ž%sâ€œ Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž%sâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ Ñ�Ð° â€ž%sâ€œ%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž%sâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ðµ Ð½Ðµ-â€žPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð´Ð¾Ð´Ð°Ñ‚Ðµ â€ž.crangesâ€œ ÑƒÐ½Ð¾Ñ�Ðµ%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð½Ðµ â€ž.crangesâ€œ ÑƒÐ½Ð¾Ñ�Ðµ%s: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° â€žLOCALâ€œ Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ�Ð°Ð¼Ð¾ Ñ�Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð¾Ð¼ Ð¸Ð»Ð¸ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾Ð¼ Ð²Ñ€ÐµÐ´Ð½Ð¾ÑˆÑ›Ñƒ%s: Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð±ÐµÐ· â€ž.loaderâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°%s: Ð½Ð°Ð¸ÑˆÐ°Ð¾ Ñ�Ð°Ð¼ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð½Ð°Ñ‚Ð¿Ð¸Ñ�Ð° Ð´Ð°Ñ‚ÑƒÐ¼Ð° Ñƒ ÑƒÐ»Ð°Ð·Ñƒ%s: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð½Ð° %08x Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ %08x
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð½Ð°Ð·Ð¸Ð² Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ%s: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°, ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° â€ž%sâ€œ Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜
+%s: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°, Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ð»Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¸Ð· %d Ñƒ %d Ñ€ÐµÑ‡Ð¸
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: YZ â€žlop_endâ€œ-Ð° (%ld) Ð½Ð¸Ñ˜Ðµ Ñ˜ÐµÐ´Ð½Ð°ÐºÐ¾ Ñ�Ð° Ð±Ñ€Ð¾Ñ˜ÐµÐ¼ Ñ‚ÐµÑ‚Ñ€Ð°Ñ�Ð° Ð´Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾Ð³ â€žlop_stabâ€œ-Ð° (%ld)
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… YZ = 1 Ð´Ð¾Ð±Ð¸Ñ… YZ = %d Ð·Ð° â€žlop_quoteâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… y = 0 Ð´Ð¾Ð±Ð¸Ñ… y = %d Ð·Ð° â€žlop_fixrxâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 1 Ð¸Ð»Ð¸ z = 2, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_fixoâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 1 Ð¸Ð»Ð¸ z = 2, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_locâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 16 Ð¸Ð»Ð¸ z = 24, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_fixrxâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¿Ð¾Ñ™Ðµ y Ð¸ z â€žlop_stabâ€œ-Ð° Ð½Ð¸Ñ˜Ðµ Ð½ÑƒÐ»Ð°, y: %d, z: %d
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð·Ð° Ð±Ñ€Ð¾Ñ˜ %d Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ´ÐµÐ½ Ð¿Ñ€Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ðµ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ %d â€ž%sâ€œ, Ñ˜Ðµ Ð²ÐµÑ› ÑƒÐ½ÐµÑˆÐµÐ½ ÐºÐ°Ð¾ â€ž%sâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð°ÑšÐ° Ð·Ð° $255 Ð½Ð¸Ñ˜Ðµ â€žMainâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð²Ð¾Ð´ÐµÑ›Ð¸ Ð±Ð°Ñ˜Ñ‚ Ñ€ÐµÑ‡Ð¸ Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð° Ð¼Ð¾Ñ€Ð° Ð±Ð¸Ñ‚Ð¸ 0 Ð¸Ð»Ð¸ 1, Ð´Ð¾Ð±Ð¸Ñ… %d Ð·Ð° â€žlop_fixrxâ€œ
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: â€žlop_endâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ð»ÐµÐ´ÑšÐ° Ñ�Ñ‚Ð°Ð²ÐºÐ° Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð»Ð¾Ð¿ÐºÐ¾Ð´ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð·Ð° Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ðµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÑƒÐ¶Ð¸Ð½Ðµ %ld: 0x%lx%08lx
+%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ
+%s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°: 0x%lx > 0xffff%s: Ð½ÐµÐ¼Ð° Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð¸Ñ… Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€Ð°; Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° 0
+%s: Ð½ÐµÐ¼Ð° Ñ‚Ð°ÐºÐ²Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°%s: Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾%s: Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾%s: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ Ñ†Ð¸Ñ™Ð° â€ž%sâ€œ%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð½Ðµ-Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: â€ž%sâ€œ Ñƒ â€ž%sâ€œ%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð½Ðµ-Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: (Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾) Ñƒ â€ž%sâ€œ%s: Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð²ÐµÐ·Ð° Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°%s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð° ÐºÑ€Ð°Ñ‚ÐºÐ¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° (0x%lx >= 0x400000)%s: Ð½Ð¸Ñ�ÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ´ÑƒÐ³Ð° (%d Ð·Ð½Ð°ÐºÐ°, Ð½Ð°Ñ˜Ð². 65535)%s: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð¸Ñ… Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€Ð°; Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° %ld
+%s: Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ: %s%s: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ%s: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ 0x%x%s: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%02x%s: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ ÑˆÐ¸Ñ€Ð¾ÐºÐ¸ Ð½Ð¸Ð· Ð·Ð½Ð°ÐºÐ° 0x%02X 0x%02X Ð½Ð°ÐºÐ¾Ð½ Ð½Ð°Ð·Ð¸Ð²Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° ÐºÐ¾Ñ˜Ð¸ Ð¿Ð¾Ñ‡Ð¸ÑšÐµ Ñ�Ð° â€ž%sâ€œ
+%s: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)%s: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)%s: Ð±Ñ€Ð¾Ñ˜ Ð¸Ð·Ð´Ð°ÑšÐ° (%ld) Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð±Ñ€Ð¾Ñ˜Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° (%ld)%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜ÐµÐ·Ð³Ñ€Ð°%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ 0x%x Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°: 0x%lx > 0xffff%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žGOTâ€œ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº â€ž%ldâ€œ-Ð° Ð·Ð° â€ž%sâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾Ð¼ â€žGOTâ€œ Ñ�Ð°Ð±Ð¸Ñ€ÐºÑƒ â€ž%ldâ€œ-Ð°%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žPLTâ€œ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº â€ž%dâ€œ-Ð° Ð·Ð° â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€žR_NDS32_25_ABS_RELAâ€œ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ.%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ¸Ð¼Ð°%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð²ÐµÐ»Ð¸ÐºÐ° Ð·Ð° â€žmmoâ€œ, Ð²ÐµÑ›Ð° Ð¾Ð´ 65535 32-Ð±Ð¸Ñ‚Ð½Ð¸Ñ… Ñ€ÐµÑ‡Ð¸: %d.  Ð¡Ð°Ð¼Ð¾ â€žMainâ€œ Ð±Ð¸Ñ›Ðµ Ð´Ð°Ñ‚Ð¾.
+%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°. Ð—Ð° ÑƒÐ½Ð¾Ñ�: {%d, %d, %d}, Ð°Ð´Ñ€ÐµÑ�Ð° = 0x%x, Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ = 0x%x.(Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð±Ð¸Ñ‚Ð° %u)
+(Ð¾Ð¿Ð¸Ñ�Ð½Ð¸Ðº)
+(Ð±ÐµÐ· Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸)
+(Ð½Ð¸Ñ˜Ðµ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾)
+(Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½Ð¾)
+(Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€: %u, Ñ€Ð°Ð·Ð¼ÐµÑˆÑ‚Ð°Ñ˜: %u, Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¾: %u, Ð²Ñ€Ñ�Ñ‚Ð°: (Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸ Ð½Ð¸Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ¸ Ð·Ð° â€ž-fpicâ€œ Ð¸Ð»Ð¸ â€ž-msmall-tlsâ€œ: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ Ð¸Ð»Ð¸ â€ž-mno-small-tlsâ€œ)(Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð¿ÑˆÑ‚Ð¸Ñ… Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð¸Ñ… Ð·Ð° â€ž-fpicâ€œ: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ)(Ð¿Ñ€Ð°Ñ‚ÐµÑ›Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚)
+(Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ˜Ð° Ñ�Ð»ÐµÐ´ÐµÑ›Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸)
+)
+*** Ð¿Ñ€Ð¾Ð²ÐµÑ€Ð°Ð²Ð° Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ*Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð¾*
+*Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð´Ñ�Ñ‚ Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ
+*Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾**Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾*        , 8-Ð±Ð¸Ñ‚Ð½Ð¾ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°, Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: %#08lx
+, Ð°Ð»Ð¸Ñ˜Ð°Ñ�: %u
+, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð¿Ð¾Ñ™Ð½Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° â€žno_optâ€œ-Ð°: %u, Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð°: %u (%s)
+, Ð²ÐµÐºÑ‚Ð¾Ñ€ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€Ð²Ð°: â€” â€ž%sâ€œ Ñ˜Ðµ Ð“10, â€ž%sâ€œ Ð½Ð¸Ñ˜ÐµÐ¾Ð´ÐµÑ™Ð°Ðº â€ž.gotâ€œ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ð¼Ð°Ñ… Ð½Ð°ÐºÐ¾Ð½ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pltâ€œÐ�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð»Ð¸Ñ�Ñ‚ÑƒÐ�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¸Ð·Ð´Ð°ÑšÐ° Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ñƒ
+Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð¸ Ñ�Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð¸Ð¼ Ð¾Ñ�Ð¾Ð±ÐµÐ½Ð¾Ñ�Ñ‚Ð¸Ð¼Ð°
+Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð»Ð¸Ñ�Ñ‚Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð»Ð¸Ñ�Ñ‚: %sÐ�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¸Ð·Ð²Ð¾Ñ€Ð¸ÑˆÑ‚Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ðµ Ð½Ð¸Ñ�ÐºÐµ: %dÐ�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð½Ðµ-Ð¿Ð¾Ð´Ñ€Ð°Ð·ÑƒÐ¼ÐµÐ²Ð°Ð½Ð¸Ñ… Ð¸Ñ�Ð¿Ð¾Ñ™Ð°Ð²Ð°ÑšÐ°32-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¼ÐµÑˆÐ¾Ð²Ð¸Ñ‚Ð¸, Ð´Ð¾ÑˆÐ»Ð¾ Ñ˜Ðµ Ð´Ð¾ 32-Ð±Ð¸Ñ‚Ð½Ð¾Ð³ Ð³Ð¿ Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°64 Ð±Ð¸Ñ‚Ð° *Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾*
+64-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¼ÐµÑˆÐ¾Ð²Ð¸Ñ‚Ð¸, : %u.%u
+: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32râ€œ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32r2â€œ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32rxâ€œ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žn1â€œ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žn1hâ€œ; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ<Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ñ�ÐºÑƒÐ¿ Ð±Ð¸Ñ‚Ð¾Ð²Ð° Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ><Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð½Ð¸Ñ�ÐºÐµ: %#x><Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ñ�ÐºÐµ: %#lx><Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾>â€ž@pltoffâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°Ð�Ñ€Ñ…Ð¸Ð²Ð° Ð½ÐµÐ¼Ð° Ð¸Ð½Ð´ÐµÐºÑ�; Ð¿Ð¾ÐºÑ€ÐµÐ½Ð¸Ñ‚Ðµ â€žranlibâ€œ Ð´Ð° Ð³Ð° Ð´Ð¾Ð´Ð°Ñ‚ÐµÐ”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð°Ñ€Ñ…Ð¸Ð²Ðµ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÐŸÐ¾ÐºÑƒÑˆÐ°Ñ˜ Ð¿Ñ€ÐµÑ‚Ð²Ð°Ñ€Ð°ÑšÐ° â€žL32R/CALLXâ€œ Ñƒ â€žCALLâ€œ Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ÐŸÐ¾ÐºÑƒÑˆÐ°Ð²Ð°Ð¼ Ð´Ð° Ð¾Ð´Ñ€Ð°Ð´Ð¸Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ñƒ Ð²ÐµÐ·Ñƒ Ñ�Ð° â€ž%sâ€œ ÑƒÐ»Ð°Ð·Ð¾Ð¼ Ð¸ â€ž%sâ€œ Ð¸Ð·Ð»Ð°Ð·Ð¾Ð¼Ð¡Ð›Ð˜ÐšÐ�_ÐžÐ¡Ð�ÐžÐ’Ð•       â€žBFDâ€œ â€ž%sâ€œ Ñ‚Ð²Ñ€Ð´ÑšÐ° Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð° â€ž%sâ€œ:%dÐ£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð”-Ð° %s, Ð¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð¼ Ð¿Ñ€Ð¸ â€ž%sâ€œ %d. Ñ€ÐµÐ´Ñƒ
+Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð”-Ð° %s, Ð¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð¼ Ð¿Ñ€Ð¸ â€ž%sâ€œ %d. Ñ€ÐµÐ´Ñƒ Ñƒ â€ž%sâ€œ
+Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð” Ð²ÐµÐ·Ðµ: Ð³Ñ€Ð°Ð½Ð°ÑšÐµ (PC rel16) Ñƒ Ð¾Ð´ÐµÑ™Ð°Ðº (%s) Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð” Ð²ÐµÐ·Ðµ: ÑƒÑ�ÐºÐ°ÐºÐ°ÑšÐµ (PC rel26) Ñƒ Ð¾Ð´ÐµÑ™Ð°Ðº (%s) Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ÐŸÐ¾Ð³Ñ€ÐµÑˆÐ½Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¾Ñ�Ð½Ð¾Ð²Ðµ [.reloc]Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ ÑƒÐ²Ð¾Ð·Ð° Ñ�Ð²ÐµÐ·Ð°Ð“Ñ€Ð°Ð½Ð¸Ñ†Ðµ:
+ÐšÐ›Ð˜Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¦Ð›Ð  Ð¸Ð·Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐ°ÐœÐ“Ð Ð—Ð�ÐšÐ‰Ð£Ð§Ð�Ð’Ð�ÐŠÐ•_ÐšÐ›Ð�Ð¡Ð¢Ð•Ð Ð� Ð‘Ð ÐžÐˆÐ�Ð§Ð˜         Ð¦ÐŸÐ£              CTL_AUGRB (Ð¿Ð¾Ð²ÐµÑ›Ð°Ð²Ð° Ð¾Ñ�Ð½Ð¾Ð²Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°) %u
+CTL_DFLOC (Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ð¼ÐµÑ�Ñ‚Ð¾)
+CTL_SETRB (Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð° Ð¾Ñ�Ð½Ð¾Ð²Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°)
+CTL_STKDL (Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ¾Ð¼ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð¼ÐµÑ�Ñ‚Ð¾)
+CTL_STLOC (Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð° Ð¼ÐµÑ�Ñ‚Ð¾)
+Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð°ÑƒÑ‚Ð¾Ñ€Ñ�ÐºÐ¸Ñ… Ð¿Ñ€Ð°Ð²Ð°
+ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ñ˜Ðµ Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¸ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº!
+Ð”Ð¡Ðž Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð½Ð° Ð»Ð¸Ð½Ð¸Ñ˜Ð¸ Ð½Ð°Ñ€ÐµÐ´Ð±Ð¸â€žDST__K_BEG_STMT_MODEâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_END_STMT_MODEâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_RESET_LINUM_INCRâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_LINUM_INCRâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_LINUM_INCR_Wâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_PCâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_PC_Lâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_PC_Wâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾â€žDST__K_SET_STMTNUMâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°Ð¢Ð°Ð±ÐµÐ»Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°:
+Ð¢Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°:
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð·Ð°Ñ�Ñ‚Ð¾Ñ˜Ð° ÑƒÐ²Ð¾Ð·Ð°Ð—Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾
+Ð—Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñƒ â€ž%sâ€œ %d. Ñ€ÐµÐ´ Ñƒ â€ž%sâ€œ
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¾Ð¿Ð¸Ñ�Ð°â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð›Ð¾Ñˆ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¸ Ð±Ñ€Ð¾Ñ˜: %u.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¸ Ð±Ñ€Ð¾Ñ˜ %u.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð½Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ð±Ñ€Ð¾Ñ˜ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ˜Ð° Ð¿Ð¾ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð¸.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¸Ð»Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žFORMâ€œ: %#x.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: ÐŸÐ¾Ð¼ÐµÑ€Ð°Ñ˜ (%lu) Ñ˜Ðµ >= Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ %s (%lu).â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žaltâ€œ ÑƒÐ¿ÑƒÑ‚Ñƒ %u.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¾Ð±Ñ€Ð°Ñ’ÐµÐ½Ð¾ â€ž.debug_lineâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %d.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð°Ñ’Ð¾Ñ… Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�Ðµ â€ž%uâ€œ, Ð¾Ð²Ð°Ñ˜ Ñ‡Ð¸Ñ‚Ð°Ñ‡ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ€Ð°Ð´Ð¸ Ñ�Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°Ð¼Ð° Ð²ÐµÑ›Ð¸Ð¼ Ð¾Ð´ â€ž%uâ€œ.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð°Ñ’Ð¾Ñ… â€žDWARFâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ â€ž%uâ€œ, Ð¾Ð²Ð°Ñ˜ Ñ‡Ð¸Ñ‚Ð°Ñ‡ Ñ€Ð°Ð´Ð¸ Ñ�Ð°Ð¼Ð¾ Ñ�Ð° Ð¿Ð¾Ð´Ð°Ñ†Ð¸Ð¼Ð° Ð¸Ð·Ð´Ð°ÑšÐ° 2, 3 Ð¸ 4.â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð‘Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¾Ð´Ñ�ÐµÑ‡ÐµÐ½ (Ð»Ð¾Ñˆ Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ).â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð‘Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¾Ð´Ñ�ÐµÑ‡ÐµÐ½.EIHD: (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð±Ñ€Ð¾Ñ˜ Ð±Ð»Ð¾ÐºÐ¾Ð²Ð°: %u)
+ÐŸÐ¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÐ½Ð¾Ñ�Ð°       = 0x%.8lx (%ld)
+Ð“Ñ€ÐµÑˆÐºÐ° Ñ‡Ð¸Ñ‚Ð°ÑšÐ° â€ž%sâ€œ: %sÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ð¾Ñ�ÐµÐ´ÑƒÑ˜Ðµ Ð¸ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¸ Ð¸ Ñ�Ñ‚Ð°Ñ€Ð¸ â€žTag_MPextension_useâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚Ð�Ð°Ð¸Ñ’Ð¾Ñ… Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐµ Ñ‚Ð¾ÐºÐ¾Ð¼ Ð¾Ð±Ñ€Ð°Ð´Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€ž%sâ€œÐ”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·ÑƒÐ·ÐµÑ‚Ð°ÐºÐ° [.pdata]Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·Ð²Ð¾Ð·Ð° [â€ž.edataâ€œ (Ð¸Ð»Ð¸ Ñ‚Ð°Ð¼Ð¾ Ð³Ð´Ðµ Ñ�Ð¼Ð¾ Ð³Ð° Ð½Ð°ÑˆÐ»Ð¸)]Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° 		%lx
+RVA Ð¸Ð·Ð²Ð¾Ð·Ð°Ð�Ð˜Ð¡Ð�Ðœ Ð£Ð¡ÐŸÐ•Ðž Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€žHI16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ’ÐžÐ›Ð£ÐœÐ•Ð�Ð˜_Ð”Ð�Ð¢ÐžÐ¢Ð•ÐšÐ�    Ð—Ð°Ð¿Ð¸Ñ� Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜Ðµ Ð½ÐµÑ˜Ð°Ñ�Ð°Ð½Ð—Ð°Ð¿Ð¸Ñ� Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÐ”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ°Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¾ÐºÑ€ÑšÐµÐ½Ð°ÐŸÐ¾Ñ™Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ      = 0x%.2x
+RVA Ð¿Ñ€ÐµÐ¾Ñ�Ð»ÐµÑ’Ð¸Ð²Ð°Ñ‡Ð°Ð“Ð�Ð›Ð�ÐšÐ¡Ð˜ÐˆÐ�           Ð£Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ˜Ðµ Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° ÐºÐ°Ð´Ð° Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð“ÐŸ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾â€žGPDISPâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð½Ð°ÑˆÐ»Ð¾ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žldahâ€œ Ð¸ â€žldaâ€œÐ¢Ð°Ð±ÐµÐ»Ð° Ð¾Ð¿ÑˆÑ‚Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°:
+Ð˜Ð”: %#08lxIDC â€” ÐŸÑ€Ð¾Ð²ÐµÑ€Ð° Ð´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐ°
+ÐŸÐžÐšÐ Ð•Ð¢Ð�Ð§_Ð¡Ð›Ð˜ÐšÐ•  â€žINPUT_SECTION_FLAGSâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾.
+Ð£Ð˜               Ð�ÐºÑ‚Ð¸Ð²Ð¸Ñ€Ð°ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ:  (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°=%u)
+Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð°Ñ‡Ð° Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u)
+ÐŸÑ€ÐµÐ¿Ð¾Ð·Ð½Ð°Ð²Ð°ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ðµ: %u, Ð¼Ð°ÑšÐµ: %u)
+ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ð¾Ð´ÐµÑ™ÐºÐ° Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: %u)
+Ð¡Ð¸Ð¼Ð±Ð¾Ð» Ñ�Ð»Ð¸ÐºÐµ Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°: (Ð²ÐµÑ›Ðµ: %u, Ð¼Ð°ÑšÐµ: %u)
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ñ‚Ð°Ð±ÐµÐ»Ðµ ÑƒÐ²Ð¾Ð·Ð° Ð°Ð´Ñ€ÐµÑ�ÐµÐ”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ ÑƒÐ²Ð¾Ð·Ð° [Ð´ÐµÐ¾ â€ž.idataâ€œ]Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚: Ð¿Ñ€ÐµÐ¾Ñ�Ñ‚Ð°Ñ˜Ðµ %u != Ð½Ð°Ñ˜Ð². %u.
+  ÐŸÑ€Ð¸Ñ˜Ð°Ð²Ð¸Ñ‚Ðµ Ð¾Ð²Ñƒ Ð³Ñ€ÐµÑˆÐºÑƒ.Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° â€žTARGET2â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ.Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ñ†Ð¸Ñ™ Ð±Ñ„Ð´-Ð°Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ˜Ð°Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€žETIRâ€œ-Ñƒâ€žJALXâ€œ Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ñƒ Ð½Ðµ-Ñ€ÐµÑ‡Ñ˜ÑƒÐ›ÐžÐ“Ð˜Ð§ÐšÐ˜_Ð�Ð�Ð—Ð˜Ð’Ð˜    Ð�Ð°Ð·Ð¸Ð² Ñ˜ÐµÐ·Ð¸ÐºÐ° Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð°
+Ð”ÑƒÐ¶Ð¸Ð½Ð°              = 0x%.8lx (%ld)
+ÐŸÐ¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ð³Ñ€ÐµÑˆÐºÑƒ â€žex9â€œ Ñ…ÐµÑˆ Ñ‚Ð°Ð±ÐµÐ»Ðµ 
+ÐŸÐ¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡: Ð³Ñ€ÐµÑˆÐºÐ° Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð¿Ð¾Ð¿Ñ€Ð°Ð²Ð¸ â€žex9â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ 
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐ° ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ°Ð£ÐŸÐ Ð�Ð’Ð‰Ð�ÐŠÐ•_ÐœÐ•ÐœÐžÐ Ð˜ÐˆÐžÐœÐ¤ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€žMIPS16â€œ Ð¸ â€žmicroMIPSâ€œ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð·Ð¸Ð²Ð°Ñ˜Ñƒ Ñ˜ÐµÐ´Ð½Ð° Ð´Ñ€ÑƒÐ³ÑƒÐ Ð�Ð—Ð�Ðž             Ð’Ð˜Ð¨Ð•_ÐžÐ‘Ð Ð�Ð”Ð�Ðž Ð’ÐµÑ›Ð¸/ÐœÐ°ÑšÐ¸ 			%d/%d
+Ð›Ð¾ÑˆÐ° Ð°Ñ€Ñ…Ð¸Ð²Ð°Ð�Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸Ðº Ñ˜Ðµ 0x%v
+MeP: â€žhowtoâ€œ â€ž%dâ€œ Ð¸Ð¼Ð° Ð²Ñ€Ñ�Ñ‚Ñƒ â€ž%dâ€œÐœÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�Ñ†Ñ€Ð¿Ñ™ÐµÐ½Ð°Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¼Ð¾Ð´ÑƒÐ»Ð°
+ÐœÐ Ð•Ð–Ð•         NORMALÐ�Ð°Ð·Ð¸Ð² 				Ð�ÐµÐ¼Ð° Ð³Ñ€ÐµÑˆÐºÐµÐ�ÐµÐ¼Ð° Ð²Ð¸ÑˆÐµ Ð°Ñ€Ñ…Ð¸Ð²Ð¸Ñ€Ð°Ð½Ð¸Ñ… Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð�ÐµÐ¼Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°Ð�Ð° Ð¸Ð·Ð»Ð°Ð·Ñƒ Ñ˜Ðµ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð¿Ñ€Ð¸ÐºÐ°Ð·Ð°Ñ‚Ð¸Ð�ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ Ð·Ð° Ñ€ÐµÑ’Ð°ÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°Ð‘Ñ€Ð¾Ñ˜ ÑƒÐ»Ð°Ð·Ð°:
+OPR_ADD (Ð·Ð±Ñ€Ð°Ñ˜Ð°)
+OPR_AND (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ Ð˜)
+OPR_ASH (Ð°Ñ€Ð¸Ñ‚Ð¼ÐµÑ‚Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾Ð¼Ð°Ðº)
+OPR_COM (ÐºÐ¾Ð¼Ð¿Ð»ÐµÐ¼ÐµÐ½Ñ‚)
+OPR_DIV (Ð´ÐµÐ»Ð¸)
+OPR_EOR (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ Ð¸Ñ�ÐºÑ™ÑƒÑ‡Ð¸Ð²Ð¾ Ð˜Ð›Ð˜)
+OPR_INSV (ÑƒÐ¼ÐµÑ›Ðµ Ð¿Ð¾Ñ™Ðµ)
+OPR_IOR (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ ÑƒÐºÑ™ÑƒÑ‡Ð¸Ð²Ð¾ Ð˜Ð›Ð˜)
+OPR_MUL (Ð¼Ð½Ð¾Ð¶Ð¸)
+OPR_NEG (Ð½ÐµÐ³Ð°Ñ†Ð¸Ñ˜Ð°)
+OPR_NOP (Ð±ÐµÐ· Ñ€Ð°Ð´ÑšÐµ)
+OPR_REDEF (Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚)
+OPR_REDEF (Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñ‚ÐµÐºÑƒÑ›Ðµ Ð»Ð¾ÐºÐ°Ñ†Ð¸Ñ˜Ðµ)
+OPR_ROT (Ð¾ÐºÑ€ÐµÑ›Ðµ)
+OPR_SEL (Ð±Ð¸Ñ€Ð°)
+OPR_SUB (Ð¾Ð´ÑƒÐ·Ð¸Ð¼Ð°)
+OPR_USH (Ð¿Ð¾Ð¼Ð°Ðº Ð±ÐµÐ· Ð·Ð½Ð°ÐºÐ°)
+ÐœÐ¾Ð´ÑƒÐ» Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð�Ð˜ÐˆÐ• Ð±ÐµÐ· Ð³Ñ€ÐµÑˆÐ°ÐºÐ° !
+Ñ�ÐžÑ�Ð½Ð¾Ð²Ð° Ñ€ÐµÐ´Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°		%ld
+Ð˜Ð·Ð»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ â€ž%sâ€œ
+Ð˜Ð·Ð»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ â€ž%s.so.%sâ€œ
+ÐŸÐžÐ¡Ð˜ÐšÐ¡            Ð—Ð�ÐšÐ�Ð—Ð�Ð�Ð˜_ÐŸÐ ÐžÐ¦Ð•Ð¡Ð˜    PRVFXDPRVPICPSC â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°
+ÐŸÐ¢Ð� Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð°Ð´Ñ€ÐµÑ�Ð° â€žSHcompactâ€œ (Ð±Ð¸Ñ‚ 0 == 0)ÐŸÐ¢Ð‘ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð°Ð´Ñ€ÐµÑ�Ð° â€žSHmediaâ€œ (Ð±Ð¸Ñ‚ 0 == 1)Ð�Ð°Ð·Ð¸Ð² Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ     = â€ž%sâ€œ
+ÐšÑ€Ð°Ñ˜ Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d]   = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+Ð”ÑƒÐ¶Ð¸Ð½Ð° Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = 0x%.8lx (%ld)
+ÐžÐ´ÐµÑ™Ð°Ðº Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = 0x%.8lx (%ld)
+ÐŸÑ€Ð¸Ñ˜Ð°Ð²Ð¸Ñ‚Ðµ Ð¾Ð²Ñƒ Ð³Ñ€ÐµÑˆÐºÑƒ.
+â€žABI RL78/G10â€œ Ñ�ÑƒÐºÐ¾Ð±: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾ Ð“10 Ð¸ Ð½Ðµ-Ð“10 Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµâ€žR_BFIN_FUNCDESCâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼â€žR_BFIN_FUNCDESC_VALUEâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼R_FRV_TLSMOFFLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ
+Ð§Ð¸Ñ‚Ð°Ð¼ Ð²Ñ€ÐµÐ¼Ðµ Ñ€ÐµÐ¶Ð¸Ð¼Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð°Ñ€Ñ…Ð¸Ð²ÐµÐ£Ð¿ÑƒÑ›Ð¸Ð²Ð°ÑšÐµ Ð½Ð° Ð´Ð°Ð»ÐµÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¾Ð¼ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¼Ð¾Ð¶Ðµ Ð´Ð¾Ð²ÐµÑ�Ñ‚Ð¸ Ð´Ð¾ Ð½ÐµÑ‚Ð°Ñ‡Ð½Ð¾Ð³ Ð¸Ð·Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐ°Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ â€ž%%g%dâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½ Ð½ÐµÑ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð¾: â€ž%sâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€ž%sâ€œ Ñƒ â€ž%Bâ€œÐžÐ´ÐµÑ™Ð°Ðº Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜
+ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð½Ðµ-Ð Ð•Ð› Ð¿-Ð¾Ð´ÐµÑ™Ð°ÐºÐ£ÐºÐ»Ð°ÑšÐ°Ð¼ Ð½ÐµÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ â€ž%Bâ€œÐ ÐµÐ·ÐµÑ€Ð²Ð¸Ñ�Ð°Ð½Ð¾Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·Ð²Ð¾Ñ€Ð¸ÑˆÑ‚Ð° [.rsrc]Ð�Ð´Ñ€ÐµÑ�Ð° â€žS12â€œ (%lx) Ð½Ð¸Ñ˜Ðµ ÑƒÐ½ÑƒÑ‚Ð°Ñ€ Ð´ÐµÑ™ÐµÐ½Ðµ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ (0x2000-0x4000), Ñ�Ñ‚Ð¾Ð³Ð° Ð¼Ð¾Ñ€Ð°Ñ‚Ðµ Ñ€ÑƒÑ‡Ð½Ð¾ Ð´Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð¸Ñ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ñƒ Ñƒ Ð²Ð°ÑˆÐµÐ¼ ÐºÐ¾Ð´ÑƒÐ¡Ð”Ð� Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÐºÐ°Ð´Ð° â€ž_SDA_BASE_â€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð‘Ð•Ð—Ð‘Ð•Ð”Ð�ÐžÐ¡Ð¢         â€žSEC_RELOCâ€œ Ð½ÐµÐ¼Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œÐ“Ñ€ÐµÑˆÐºÐ° ÑˆÐºÐ¾Ñ™ÐºÐµ: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œÐ¨ÐšÐžÐ‰ÐšÐ�            SHRFXDSHRPICSPSC â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð° Ð´ÐµÑ™ÐµÐ½Ðµ Ñ�Ð»Ð¸ÐºÐµ
+Ð¡Ð¢Ð�Ð‘Ð˜Ð›Ð�Ðž           STA_CKARG (Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ° Ð¿Ð¾Ñ€ÐµÑ’ÐµÑšÐ°)
+STA_GBL (Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) %.*s
+STA_LI (Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°)
+STA_LW (Ð´ÑƒÐ³Ð° Ñ€ÐµÑ‡ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) 0x%08x
+STA_MOD (Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°)
+STA_PQ (Ð¾Ñ�Ð½Ð¾Ð²Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STA_QW (Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾Ñ€ÐµÑ‡ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) 0x%08x %08x
+STC_BOH_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBOHâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)
+STC_BOH_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBOHâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STC_BSR_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBSRâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)
+STC_BSR_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBSRâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STC_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ ÑƒÑ�Ð»Ð¾Ð²Ð°)
+STC_GCA (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ ÐºÐ¾Ð´Ð° ÑƒÑ�Ð»Ð¾Ð²Ð°)
+STC_LDA_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žLDAâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)
+STC_LDA_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žLDAâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STC_LP (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð°Ñ€ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° ÑƒÑ�Ð»Ð¾Ð²Ð°)
+STC_LP_PSB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð°Ñ€ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° ÑƒÑ�Ð»Ð¾Ð²Ð° + Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�)
+STC_NBH_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° ÑƒÑ�Ð»Ð¾Ð² Ð¸Ð»Ð¸ Ð½Ð°Ñ˜Ð°Ð²Ñƒ Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)
+STC_NBH_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° ÑƒÑ�Ð»Ð¾Ð² Ð¸Ð»Ð¸ Ð½Ð°Ñ˜Ð°Ð²Ñƒ Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STC_NOP_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žNOPâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)
+STC_NOP_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žNOPâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)
+STC_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÑ�Ð»Ð¾Ð²Ð°)
+STO_AB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ)
+STO_B (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð±Ð°Ñ˜Ñ‚)
+STO_BR_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ Ð³Ñ€Ð°Ð½Ðµ) *ÑƒÑ€Ð°Ð´Ð¸Ñ‚Ð¸*
+STO_BR_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð³Ñ€Ð°Ð½Ðµ) *ÑƒÑ€Ð°Ð´Ð¸Ñ‚Ð¸*
+STO_CA (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ ÐºÐ¾Ð´Ð°) %.*s
+STO_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ðµ) %.*s
+STO_GBL_LW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ñƒ Ð´ÑƒÐ³Ñƒ Ñ€ÐµÑ‡) %.*s
+STO_IMM (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¼Ð¾Ð¼ÐµÐ½Ñ‚Ð°Ð»Ð½Ð¾) %u Ð±Ð°Ñ˜Ñ‚Ð°
+STO_IMMR (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¼Ð¾Ð¼ÐµÐ½Ñ‚Ð°Ð»Ð½Ð¾ Ð¿Ð¾Ð½Ð°Ð²Ñ™Ð°ÑšÐµ) %u Ð±Ð°Ñ˜Ñ‚Ð°
+STO_LW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð´ÑƒÐ³Ñƒ Ñ€ÐµÑ‡)
+STO_OFF (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð›ÐŸ Ñ�Ð° Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�Ð¾Ð¼ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ°)
+STO_OFF (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñƒ Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº)
+STO_QW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾Ñ€ÐµÑ‡)
+STO_RB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ)
+STO_W (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ€ÐµÑ‡)
+SYM â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°
+SYM â€” Ð£Ð¿ÑƒÑ‚Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°
+SYMG â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° ÑƒÐ½Ð¸Ð²ÐµÑ€Ð·Ð°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°
+SYMM â€” ÐžÐ¿ÑˆÑ‚Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ð¾Ð¼
+SYMV â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð²ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°
+Ð¡Ð¢Ð’Ð�Ð Ð�ÐŠÐ•_Ð¡Ð˜Ð¡Ð¢Ð•ÐœÐ�           ÐžÐ´ÐµÑ™Ð°Ðº Ð½ÐµÐ¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ÐµÐ”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð±ÐµÐ·Ð±ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸Ð“Ñ€ÐµÑˆÐºÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œÐ—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¸Ð·Ð²Ð¾Ñ€Ð°
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ð¾Ñ�ÐµÐ±Ð½Ð¾Ñ�Ñ‚Ð¸ÐŸÑ€Ð¸Ð²Ð¸Ð´Ð½Ð¾ â€žALPHA_R_BSRâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ�Ð½Ð°Ð»Ð¸Ð·Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñ›Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€Ð¸Ñ‚Ð¸ Ð¿Ð¾Ð·Ð¸Ð² Ð¾Ð´ â€ž%sâ€œ Ð´Ð¾ â€ž%sâ€œ
+ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° (%d) Ñƒ â€ž_bfd_vms_pushâ€œ-ÑƒÐ’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð·Ð° Ð¿Ð¾Ð·Ð¸Ð² Ñ‡Ð²Ð¾Ñ€Ð¾Ð²Ð° ÐºÐ¾Ñ€ÐµÐ½Ð° Ð³Ñ€Ð°Ñ„Ð¸ÐºÐ°.
+ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñƒ â€ž_bfd_vms_popâ€œ-ÑƒÐšÐ¾Ñ€Ð°Ñ†Ð¸:
+Ð¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ð·Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ
+Ð¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ: â€ž%sâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€žREGISTERâ€œ Ñƒ â€ž%Bâ€œÐ¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ: â€žREGISTERâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€ž%sâ€œ Ñƒ â€ž%Bâ€œÐ¡Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° ÑƒÐºÐ»Ð°ÑšÐ°ÑšÐµ Ð³Ñ€ÐµÑˆÐ°ÐºÐ° ÐºÐ¾Ñ˜Ð¸ Ð½Ðµ Ð¿Ð¾Ñ�Ñ‚Ð¾Ñ˜Ð¸Ð“Ñ€ÐµÑˆÐºÐ° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ñ�ÐºÐ¾Ð³ Ð¿Ð¾Ð·Ð¸Ð²Ð°Ð¢Ð›Ð¡ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð±ÐµÐ· Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸Ñ… Ð¾Ð´ÐµÑ™Ð°ÐºÐ°ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°: 0x%lx > 0x10000; Ð¿Ñ€Ð¾Ð±Ð°Ñ˜Ñ‚Ðµ Ñ�Ð° â€ž-mminimal-tocâ€œ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐ°Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð°
+Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ñ�Ð¼ÐµÑˆÑ‚Ð°Ñ˜Ð° Ð½Ð¸Ñ‚Ð¸ [.tls]ÐžÑ‚Ð¸Ñ�Ð°Ðº Ð²Ñ€ÐµÐ¼ÐµÐ½Ð°/Ð´Ð°Ñ‚ÑƒÐ¼Ð° 		%lx
+Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ñ‚ÐµÐºÑ�Ñ‚Ð° Ð½Ð°Ñ�Ð»Ð¾Ð²Ð°
+ÐŸÐ¾ÐºÑƒÑˆÐ°Ñ˜Ñ‚Ðµ Ð´Ð° ÑƒÐºÑ™ÑƒÑ‡Ð¸Ñ‚Ðµ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐµ Ð´Ð° Ð±Ð¸Ñ�Ñ‚Ðµ Ð¸Ð·Ð±ÐµÐ³Ð»Ð¸ Ñ�ÐºÑ€Ð°Ñ›Ð¸Ð²Ð°ÑšÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°USRSTACKÐ�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ ÐµÐºÐ²Ð¸Ð²Ð°Ð»ÐµÐ½Ñ‚Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº Ð¸Ð·Ð»Ð°Ð·Ð° Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œÐ�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ñ�Ñ‚Ð¸Ð³Ð½ÐµÐ¼ â€ž%sâ€œ (Ð½Ð° 0x%08x) Ð¸Ð· Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° (Ð½Ð° 0x%08x) Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ (%d) Ð¸Ð·Ð²Ð°Ð½ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾Ð³ Ð¾Ð¿Ñ�ÐµÐ³Ð°, Ð¾Ð´ -32678 Ð´Ð¾ 32767.
+Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ â€žSTO_SH5_ISA32â€œ Ð½Ð° Ð¼ÐµÑ�Ð½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ñ€Ð°Ñ’ÐµÐ½Ð¾Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð¼Ð°ÑˆÐ¸Ð½Ñ�ÐºÐ¸ Ð±Ñ€Ð¾Ñ˜Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° Ð²Ñ€Ñ�Ñ‚Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÐ° %d Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ OSF/1 Ñ˜ÐµÐ·Ð³Ñ€Ð°
+Ð�ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° EGSD Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð° %dÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð¾Ñ�Ð½Ð¾Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° â€ž%dâ€œÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%s + %sâ€œÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñƒ Ð½Ð°Ñ€ÐµÐ´Ð±Ð¸ â€ž%sâ€œâ€žINPUT_SECTION_FLAG %sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾
+Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¸Ð´ â€žTI COFFâ€œ Ñ†Ð¸Ñ™Ð° â€ž0x%xâ€œÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%xÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž.stabâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ÐŸÐ ÐžÐœÐ•Ð�Ð‰Ð˜Ð’Ðž         Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ñ�Ð°Ð¼Ð¾ Ñƒ Ñ˜ÐµÐ´Ð½Ð¾Ð¼ Ð¾Ð´ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸  Ð¼Ð°Ð»Ð¸Ñ…, Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð¼Ð°Ð»Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð¼Ð°Ð»Ð¸Ñ… Ð¸ Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð·Ð°ÑƒÐ·Ð¼Ðµ Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ (%ld) Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð¾Ð´ %d
+Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: â€ž%Bâ€œ Ð½Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾, Ð´Ð¾Ðº Ð³Ð° â€ž%Bâ€œ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ñ˜Ðµ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¾: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜ÐµÐ·Ð³Ñ€Ð° >= %lu, Ð½Ð°Ñ’Ð¾Ñ…: %lu.Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: â€ž%Bâ€œ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾, Ð´Ð¾Ðº Ð³Ð° â€ž%Bâ€œ Ð½Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ð´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÐºÐµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ñ˜ÐµÐ´Ð½Ðµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žr3/r4â€œ Ð·Ð° Ð¼Ð°Ð»Ðµ Ñ€ÐµÐ·ÑƒÐ»Ñ‚Ð°Ñ‚Ðµ Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜ÑƒÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ñ˜ÐµÐ´Ð½Ðµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%dâ€œ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð¾Ð´Ð³Ð¾Ð²Ð¾Ñ€ Ð¼Ð°Ð»Ð¾Ð³ Ñ€ÐµÐ·ÑƒÐ»Ñ‚Ð°Ñ‚Ð° Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ â€ž%dâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%dâ€œ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%sâ€œ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: ÐŸÐ¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ðµ Ñ˜Ðµ Ñƒ Ñ�ÑƒÐºÐ¾Ð±ÑƒÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žMSPABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð§Ð¸Ñ�Ñ‚Ð¸Ð¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð½ÐµÐ¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²ÐµÐ½Ð¸ ÐºÐ¾Ð´ Ñƒ â€ž%Bâ€œ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½ Ñ�Ð° ÑšÐ¸Ð¼Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð£ÐºÐ»Ð°ÑšÐ°Ð¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ ÑƒÑ�Ð»ÐµÐ´ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ñ�Ð¿Ð¾Ñ™Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð�Ð¸Ñ�Ð°Ð¼ Ð¿Ð¾Ð´ÐµÑ�Ð¸Ð¾ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ Ð¿Ð¾ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð²ÐµÑ› Ð½Ð°Ð²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ Ð½ÐµÐ¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²ÐµÐ½Ð¾Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žRL78_SYMâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žRX_SYMâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð£Ð¿Ð¸Ñ� Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸Ðº (Ð½Ð¿Ñ€. Ð½ÐµÐ³Ð°Ñ‚Ð¸Ð²Ð°Ð½) Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ 0x%lx.Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%uâ€œ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñƒ â€ž%Bâ€œ Ñ˜Ðµ Ð²ÐµÑ›Ðµ Ð¾Ð´ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐ° (%u) ÑšÐµÐ³Ð¾Ð²Ð¾Ð³ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%uâ€œ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñƒ â€ž%Bâ€œ Ñ˜Ðµ Ð¼Ð°ÑšÐµ Ð¾Ð´ â€ž%uâ€œ Ñƒ â€ž%Bâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð±Ñ€Ð¾Ñ˜ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°
+Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð¿Ñ†Ð¸Ñ˜Ð° â€žgcâ€œ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½Ð°Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ð¸Ð· â€ž%luâ€œ Ñƒ â€ž%Bâ€œ Ñƒ â€ž%luâ€œ Ñƒ â€ž%Bâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ð¸Ð· â€ž%dâ€œ Ñƒ â€ž%dâ€œ Ð·Ð° â€ž%Bâ€œÐ£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÑƒÐ¿Ð¸Ñ� Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ñƒ Ñ˜Ðµ Ñ�Ð¿Ð¾Ñ€: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ ÑƒÐ¿Ð¸Ñ�ÑƒÑ˜ÐµÐ¼ Ð²Ñ€ÐµÐ¼Ðµ
+Ð£Ð¿Ð¸Ñ�ÑƒÑ˜ÐµÐ¼ Ð¾Ñ�Ð²ÐµÐ¶ÐµÐ½Ð¾ Ð²Ñ€ÐµÐ¼Ðµ Ð°Ñ€Ð¼Ð°Ð¿Ð°Ð�Ð´Ñ€ÐµÑ�Ð° â€žXGATEâ€œ (%lx) Ð½Ð¸Ñ˜Ðµ ÑƒÐ½ÑƒÑ‚Ð°Ñ€ Ð´ÐµÑ™ÐµÐ½Ðµ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ (0xE000-0xFFFF), Ñ�Ñ‚Ð¾Ð³Ð° Ð¼Ð¾Ñ€Ð°Ñ‚Ðµ Ñ€ÑƒÑ‡Ð½Ð¾ Ð´Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð¸Ñ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ñƒ, Ð¸ Ð¿Ð¾ Ð¼Ð¾Ð³ÑƒÑ›Ñ�Ñ‚Ð²Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ñ‚Ðµ Ñ�Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ð¾Ð¼ Ñƒ Ð²Ð°ÑˆÐµÐ¼ ÐºÐ¾Ð´Ñƒ.[%u]: %u
+[%u]: Ð”Ð¾ÑšÐ°: %u, Ð³Ð¾Ñ€ÑšÐ°: %u
+[Ð°Ð±Ð¸=16-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ†ÐµÐ¾ Ð±Ñ€Ð¾Ñ˜, [Ð°Ð±Ð¸=32-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ†ÐµÐ¾ Ð±Ñ€Ð¾Ñ˜, [Ñ‡Ð¸Ñ˜Ð¸ Ð½Ð°Ð·Ð¸Ð² Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ñ™ÐµÐ½]\%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€žArm BLXâ€œ Ñ†Ð¸Ñ™Ð° Ð½Ð° Ð�Ñ€Ð¼ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ.â€ž_bfd_vms_output_countedâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñ�Ð° Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð±Ð°Ñ˜Ñ‚Ð¾Ð²Ð°â€ž_bfd_vms_output_countedâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñ�Ð° Ð½ÑƒÐ»Ð° Ð±Ð°Ñ˜Ñ‚Ð¾Ð²Ð°Ð°Ð´Ñ€ÐµÑ�Ð°Ð°Ð´Ñ€ÐµÑ�Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð¿Ð¾ Ñ€ÐµÑ‡Ð¸Ð°Ñ€-Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, a0: 0x%08x
+Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€ž%sâ€œÐ³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° [%lx:%04lx] (%lx) Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¸Ñ�Ñ‚Ð¾Ñ˜ Ð³Ñ€ÑƒÐ¿Ð¸ ÐºÐ°Ð¾ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð° Ð³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° [%lx:%04lx] (%lx)Ð¾Ñ�Ð½Ð¾Ð²Ð°: %u, Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜: %u
+bfd_mach_o_canonicalize_symtab: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµbfd_mach_o_read_symtab_symbol: Ð½Ð°Ð·Ð¸Ð² Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (%lu >= %lu)bfd_mach_o_read_symtab_symbol: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ¾ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%dâ€œ (Ð½Ð°Ñ˜Ð². %lu): Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð°Ð¼ Ð½Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾bfd_mach_o_read_symtab_symbol: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ¾ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ð¾Ñ™Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ 0x%x: Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð°Ð¼ Ð½Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾bfd_mach_o_read_symtab_symbol: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ %d Ð±Ð°Ñ˜Ñ‚Ð° Ð½Ð° %lubfd_mach_o_read_symtab_symbols: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ñƒ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµbfd_mach_o_scan: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° 0x%lx/0x%lxbfd_pef_scan: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° 0x%lxÐ±Ð»Ðº Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº: Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð½Ð°Ð·Ð¸Ð²: %.*s
+Ð±Ð»Ðº ÐºÑ€Ð°Ñ˜: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ â€žEMHâ€œ Ñƒ Ð¿Ñ€Ð²Ð¾Ð¼ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€žR_MEM_INDIRECTâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ¼ ÐºÐ°Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ð¼ â€ž%sâ€œ Ð¸Ð·Ð»Ð°Ð·Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDSTâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDSTâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHAâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHDâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHIâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHSâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHVNâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHVNâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEISDâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð°
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ Ð´ÑƒÐ¶Ð¸Ð½Ñƒ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð°
+ÐºÐ»Ð°Ñ�Ð°: %u, Ð´-Ð²Ñ€Ñ�Ñ‚Ð°: %u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡: 0x%08x
+Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ â€ž%sâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº Ñƒ â€ž%Bâ€œÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__ctbpâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__epâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__gpâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ñ�Ð»Ð¸ÐºÑƒ â€ž%sâ€œ Ð¸Ð· â€ž%sâ€œÐ¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HC11]Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HC12]Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HCS12]Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=XGATE]Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµdelta pc +%-4ddelta_pc_l: +0x%08x
+delta_pc_w %u
+Ð¾Ð¿Ð¸Ñ�Ð´Ð¸Ð¼Ñ†Ñ‚: %u, Ð°-Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ñ†Ð¸Ñ„Ñ€Ðµ: %u, Ñ€Ð°Ð·Ð¼ÐµÑ€Ð°: %u
+Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ð¸Ð·Ð»Ð°Ð·Ð°: â€ž%Aâ€œÐ½ÐµÐ¿Ñ€ÐµÐºÐ¸Ð´Ð½Ð¸ Ð¾Ð¿Ñ�ÐµÐ³ (Ð±Ñ€.: %u)
+Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµÐ´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð° â€ž%sâ€œ Ñ˜Ðµ Ð½ÑƒÐ»Ñ‚Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½ÐµÐ¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð½Ð°Ð·Ð¸Ð²: %.*s
+ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð¸ Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°, Ð½Ð°Ð·Ð¸Ð²: %.*s
+ÐºÑ€Ð°Ñ˜ Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°
+ÐµÐ¿Ð¸Ð»Ð¾Ð³: Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð±Ñ€Ð¾Ñ˜: %u
+Ð³Ñ€ÐµÑˆÐºÐ° Ñ‡Ð¸Ñ‚Ð°ÑšÐ° Ð²Ñ€Ñ�Ñ‚Ðµ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð° Ð¸Ð· Ð»Ð¸Ñ‡Ð½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° ÐµÐ»Ñ„-Ð°Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ (0x%s) Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð½Ðµ-Ð¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›Ð¸ Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð½Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žMaverickâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð´Ð°Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð²ÐµÑ› Ñƒ Ð·Ð°Ð²Ñ€ÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ â€žBE8â€œÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ ÐºÐ¾Ð´ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾Ð³ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°, Ð´Ð¾Ðº Ñ˜Ðµ Ñ†Ð¸Ñ™ â€ž%Bâ€œ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ñ‚Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ ÐºÐ¾Ð´ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°, Ð´Ð¾Ðº Ñ˜Ðµ Ñ†Ð¸Ñ™ â€ž%Bâ€œ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¸ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° Ð�ÐŸÐ¦Ð¡-%d, Ð´Ð¾Ðº Ñ˜Ðµ â€ž%Bâ€œ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° Ð�ÐŸÐ¦Ð¡-%dÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° â€žAPCS-%dâ€œ, Ð´Ð¾Ðº Ñ†Ð¸Ñ™Ð½Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žAPCS-%dâ€œÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° EP9312, Ð´Ð¾Ðº Ñ˜Ðµ â€ž%Bâ€œ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° XScaleÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ…, Ð´Ð¾Ðº Ð¸Ñ… â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ…, Ð´Ð¾Ðº Ð¸Ñ… â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð²ÐµÑ›Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð½Ð¸Ð·Ð° Ð½ÐµÐ³Ð¾ ÑˆÑ‚Ð¾ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð²ÐµÑ›Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð½ÐµÐ³Ð¾ ÑˆÑ‚Ð¾ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žFPAâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½ÐµÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žMaverickâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½ÐµÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žVFPâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½ÐµÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ðµ â€žVFPâ€œ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°, Ð° â€ž%Bâ€œ Ð½ÐµÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ðµ â€žiWMMXtâ€œ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°, Ð° â€ž%Bâ€œ Ð½ÐµÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ ÐºÐ¾Ð´Ð° Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ ÐºÐ¾Ð´Ð°Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žMSP430â€œÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð²ÐµÐ»Ð¸ÐºÐ¸ Ð¼Ð¾Ð´ÐµÐ» ÐºÐ¾Ð´Ð° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žMSP430â€œÐ³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸ Ð¼Ð¾Ð´ÐµÐ» ÐºÐ¾Ð´Ð° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð�Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ðµ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð° %d/%d Ñ�Ñƒ Ñƒ Ñ�ÑƒÐºÐ¾Ð±ÑƒÐ³Ñ€ÐµÑˆÐºÐ°: %B: Ð£ Ñ�ÑƒÐºÐ¾Ð±Ñƒ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð¸ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ðµ â€ž%c/%câ€œÐ³Ñ€ÐµÑˆÐºÐ°: %B: Ð£ Ñ�Ð¸ÐºÐ¾Ð±Ñƒ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ â€žR9â€œÐ³Ñ€ÐµÑˆÐºÐ°: %B: ÐžÐ±Ñ˜ÐµÐºÐ°Ñ‚ Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¿Ñ€Ð¾Ð´Ð°Ð²Ñ†Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ ÐºÐ¾Ñ˜Ð¸ Ð¼Ð¾Ñ€Ð° Ð±Ð¸Ñ‚Ð¸ Ð¾Ð±Ñ€Ð°Ñ’ÐµÐ½ Ð°Ð»Ð°Ñ‚Ð½Ð¸Ð¼ Ð»Ð°Ð½Ñ†ÐµÐ¼ â€ž%sâ€œÐ³Ñ€ÐµÑˆÐºÐ°: %B: ÐžÐ·Ð½Ð°ÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° â€ž%d, %sâ€œ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð·Ð½Ð°ÐºÐ¾Ð¼ â€ž%d, %sâ€œÐ³Ñ€ÐµÑˆÐºÐ°: %B: Ð ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ â€žSBâ€œ Ð°Ð´Ñ€ÐµÑ�Ð¸Ñ€Ð°ÑšÐµ Ñ˜Ðµ Ñƒ Ñ�ÑƒÐºÐ¾Ð±Ñƒ Ñ�Ð° ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµÐ¼ â€žR9â€œÐ³Ñ€ÐµÑˆÐºÐ°: %B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð°Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�ÐµÐ³Ñ€ÐµÑˆÐºÐ°: %B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ð¿Ð¾Ñ˜Ð¸Ð¼ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚Ðµ Ð²Ð¸Ñ€Ñ‚ÑƒÐµÐ»Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ðµ Ñ�Ð° â€ž%Bâ€œÐ³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: _SDA_BASE_.Ð³Ñ€ÐµÑˆÐºÐ°: Ð˜Ð·Ð²Ð¾Ñ€Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %d, Ð°Ð»Ð¸ Ñ†Ð¸Ñ™Ð½Ð¸ â€ž%Bâ€œ Ð¸Ð¼Ð° â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %dÐ³Ñ€ÐµÑˆÐºÐ°: â€žfp16â€œ Ð·Ð°Ð¿Ð¸Ñ� Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ñ‚Ð¸ Ð·Ð° â€ž%Bâ€œ Ð¸ â€ž%Bâ€œÐ³Ñ€ÐµÑˆÐºÐ°: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ð° Ð·Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ (Ð´Ð° Ð»Ð¸ Ñ�Ñ‚Ðµ Ð·Ð°Ð±Ð¾Ñ€Ð°Ð²Ð¸Ð»Ð¸ â€ž-fpicâ€œ?)Ð³Ñ€ÐµÑˆÐºÐ°: Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñ‚Ñ€Ð°Ð¶ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž__rtinitâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žTag_ABI_array_object_align_expectedâ€œ Ñƒ â€ž%Bâ€œÐ³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žTag_ABI_array_object_alignmentâ€œ Ñƒ â€ž%Bâ€œÐ¸Ð·Ð²Ñ€ÑˆÐ½Ð°Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€ Ð·Ð° Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ.Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ð¼ Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ.Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð¸Ð½Ñ�Ñ‚Ð°Ð»Ð¸Ñ€Ð°Ð¼ Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ.ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° â€ž.fixupâ€œ-Ð°Ð¾Ð¿ÑˆÑ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ€Ð°Ð´Ð¸ Ñ�Ð° â€ž%sâ€œÑ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð¸ 0x%08x ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾
+Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ
+incr_linum(b): +%u
+incr_linum_l: +%u
+incr_linum_w: +%u
+ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ð±ÑƒÐ´Ðµ Ð½ÑƒÐ»Ð° Ð·Ð° â€žR_LM32_16_GOTâ€œÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ñ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð³Ñ€Ð°Ð½Ð°ÑšÐµ/Ñ�ÐºÐ¾Ðº Ð½Ð° Ð½ÐµÐ¿Ð°Ñ€Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�ÑƒÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð³Ñ€ÐµÑˆÐºÐ° Ð¾Ð¿Ð°Ñ�Ð½Ð¾Ñ�Ñ‚Ð¸ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�ÑƒÐ¼ÑšÐ¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð° Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ñ˜ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÑ†Ð¸ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.got.locâ€œÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ»Ð°Ð·Ð° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð´Ð°Ð²Ð°ÑšÐ° Ð½Ðµ-â€žELFâ€œ, Ð½Ðµ-â€žmmoâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¸Ð·Ð»Ð°Ð·Ð°.
+ ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ â€žobjcopyâ€œ Ð´Ð° Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð¸Ð· â€žELFâ€œ-Ð° Ð¸Ð»Ð¸ â€žmmoâ€œ-Ð°,
+ Ð¸Ð»Ð¸ Ñ�Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ‚Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚ÐµÑ›Ð¸ â€ž-no-expandâ€œ (Ð·Ð° Ð³Ñ†Ñ†, â€ž-Wa,-no-expandâ€œ)Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ»Ð°Ð·Ð° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð´Ð°Ð²Ð°ÑšÐ° Ð½Ðµ-â€žELFâ€œ, Ð½Ðµ-â€žmmoâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¸Ð·Ð»Ð°Ð·Ð°.
+ ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ â€žobjcopyâ€œ Ð´Ð° Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð¸Ð· â€žELFâ€œ-Ð° Ð¸Ð»Ð¸ â€žmmoâ€œ-Ð°,
+ Ð¸Ð»Ð¸ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚ÐµÑ›Ð¸ Ð³Ñ†Ñ†-Ð¾Ð¿Ñ†Ð¸Ñ˜Ñƒ â€ž-mno-base-addressesâ€œ.Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œÐ½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ð° â€ž%sâ€œ Ñ�Ð° ÐºÐ¾Ð½Ñ‚ÐµÐºÑ�Ñ‚Ð¾Ð¼ÑƒÐ²ÐµÐ·Ð¸Ð²Ð°Ñ‡ â€žip2kâ€œ: Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ Ð½Ð° 0x%08lx (Ñ†Ð¸Ñ™ = 0x%08lx).ÑƒÐ²ÐµÐ·Ð¸Ð²Ð°Ñ‡ â€žip2kâ€œ: Ñ�ÑƒÐ²Ð¸ÑˆÐ½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ Ð½Ð° 0x%08lx (Ñ†Ð¸Ñ™ = 0x%08lx).Ñ€ÐµÐ»Ð°ÐºÑ�ÐµÑ€ â€žip2kâ€œ: Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ Ñ˜Ðµ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð¿Ñ€ÐµÐ±Ð°Ñ†Ð¸Ð²Ð°Ñ‡Ð°.Ñ€ÐµÐ»Ð°ÐºÑ�ÐµÑ€ â€žip2kâ€œ: Ð¿Ñ€ÐµÐ±Ð°Ñ†Ð¸Ð²Ð°ÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð±ÐµÐ· Ð¿Ð¾Ñ‚Ð¿ÑƒÐ½Ð¾Ð³ Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð°ÑšÐ° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ.Ð±Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð°  (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)
+Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð° Ñ�Ð»Ð¸ÐºÐ°Ð¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð° Ñƒ â€ž%uâ€œ Ð³Ñ€ÑƒÐ¿Ð° â€ž%sâ€œ
+  Ð³Ñ€Ð°Ð½Ð°            %lu
+  Ñ‚Ð°Ñ� ÑƒÑ€ÐµÑ’ÐµÑšÐµ      %lu
+  Ð´ÑƒÐ³Ð° Ð±Ñ€Ð°Ð½Ð°       %lu
+  ÑƒÑ€ÐµÑ’ÐµÑšÐµ Ð´ÑƒÐ³Ðµ Ñ‚Ð°Ñ� %lu
+  Ð¿Ð»Ñ‚ Ð¿Ð¾Ð·Ð¸Ð²        %lu
+  Ð¿Ð»Ñ‚ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ñ‚Ð°Ñ�   %luÐ´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚Ð´Ð¾ÑˆÐ»Ð¾ Ñ˜Ðµ Ð´Ð¾ Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°mach-o: Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° (%d) Ð½Ð°Ñ˜Ð²Ð¸ÑˆÐµ Ñ˜Ðµ 255,
+mep: Ð½ÐµÐ¼Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð·Ð° ÐºÐ¾Ð´ â€ž%dâ€œÐ¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð¼Ð¾Ð´ÑƒÐ»Ð°
+ÐºÑ€Ð°Ñ˜ Ð¼Ð¾Ð´ÑƒÐ»Ð°
+Ð½Ð°Ð·Ð¸Ð²: [Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: %08lx Ð´ÑƒÐ¶Ð¸Ð½Ð° %d]: Ð¸Ð·Ð²Ð¾Ñ€Ð½Ð°Ð½Ð¸Ð· â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð½ÐµÐ¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð½
+Ð½Ðµ-Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ñƒ Ð½Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œÐ½Ðµ-Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°Ñ˜ÑƒÑ›Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° 0x%v Ð¿Ð»ÑƒÑ� Ð½Ð°Ñ˜Ð²ÐµÑ›Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° 0x%v Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ðµ Ð¼ÐµÑ�Ð½Ð¾ Ñ�Ð¿Ñ€ÐµÐ¼Ð¸ÑˆÑ‚Ðµ
+Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ñƒ â€ž@fptrâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒÐ½ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ â€žGOTâ€œ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€Ð° Ð·Ð° Ð¼ÐµÑ�Ð½Ðµ ÑƒÐ½Ð¾Ñ�Ðµ â€žGOTâ€œÐ½Ðµ Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð¼: Ð¿Ð¾Ð´Ð°Ñ‚Ð°Ðº=%lx  Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð½=%d
+Ð½Ðµ Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð¼: Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð° Ð¾ÐºÑ€ÑƒÐ¶ÐµÑšÐ° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð°
+Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð½Ð°ÐºÐ¾Ð½ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð¿Ñ€ÐµÐºÑ€Ð¸Ð²Ð°ÑšÐ°Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lxÐ¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lx:Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lx: Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ =%x:Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = 0x%lxÐ¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = 0x%lx:Ð¿Ñ€Ð¾Ð»Ð¾Ð³: Ð±ÐºÐ¿Ñ‚ Ð°Ð´Ñ€ÐµÑ�Ð° 0x%08x
+Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð·Ð°Ð¿Ð¸Ñ�Ð°: Ð½Ð°Ð·Ð¸Ð²: %.*s
+ÐºÑ€Ð°Ñ˜ Ð·Ð°Ð¿Ð¸Ñ�Ð°
+ÑƒÐ¿ÑƒÑ‚Ð° Ð½Ð° Ð³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�Ñƒ [%lx:%04lx] Ñƒ Ð¾Ð±Ð¸Ñ‡Ð½Ð¾Ð¼ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€Ñƒ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð½Ð° %04lxÑ€ÐµÐ³Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ Ð¼Ð¾Ð´ÑƒÐ»ÑƒÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°ÐºÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ‚Ñ€ÐµÐ±Ð° Ð±Ð¸Ñ‚Ð¸ Ð¿Ð°Ñ€Ð°Ð½ Ð±Ñ€Ð¾Ñ˜Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð¸Ñ… Ñ�ÐµÐ³Ð¼ÐµÐ½Ð°Ñ‚Ð° Ð½Ð¸Ñ�Ñƒ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¾Ñ‚Ð²Ð°Ñ€Ð°Ð¼ â€ž%Bâ€œ: %s
+Ñ€ÐµÐ·ÐµÑ€Ð²Ð¸Ñ�Ð°Ð½Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%dâ€œÐ¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ñ€ÑƒÑ‚Ð¸Ð½Ðµ
+ÐºÑ€Ð°Ñ˜ Ñ€ÑƒÑ‚Ð¸Ð½Ðµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° 0x%08x
+Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ð¾Ñ�Ñ‚Ð°Ð²ÐºÐµ, Ð½Ð°Ð·Ð¸Ð²: %.*s
+set_abs_pc: 0x%08x
+set_line_num(w) %u
+set_line_num_b %u
+set_line_num_l %u
+Ð¾Ð´ÐµÑ™Ð°Ðº Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ 64KB; Ð´Ð¾ÑšÐ° Ð³Ñ€Ð°Ð½Ð¸Ñ†Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° (Ð²Ð¸Ð´Ð¸Ñ‚Ðµ Ð¾Ð¿Ñ†Ð¸Ñ˜Ñƒ â€ž-Gâ€œ)â€žsom_sizeof_headersâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾Ð¸Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ, Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð´Ñ€ÑˆÐºÐµ Ð·Ð° ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸ Ñ�Ð°Ð¼Ð¾-Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°
+Ð¸Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ: â€žmodtabâ€œ, â€žtocâ€œ Ð¸ â€žextrefsymsâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ�Ñƒ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¸ Ð·Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ðµ â€ždysymtabâ€œ.Ð¸Ð·Ð²Ð¾Ñ€ (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)
+Ñ�Ñ‚Ð°Ð½Ð´Ð°Ñ€Ð´Ð½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸: %s
+Ñ�Ñ‚Ð°Ñ‚Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿Ð°Ðº (Ð±ÐµÐ· Ð½Ð°Ð·Ð¸Ð²Ð°)ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð·Ð° â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° ÑƒÑ‡Ð¸Ñ‚Ð° â€ž.pltâ€œ, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ â€ždpâ€œ = %ldÐ¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜Ñƒ Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ñ‚Ð¾Ñ˜ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð½Ð¸Ð· Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ð°:
+term(b): 0x%02xterm_w: 0x%04xÐ¾Ð´Ñ€ÐµÐ´Ð±Ð° Ð²Ñ€Ñ�Ñ‚Ðµ (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)
+Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žARMâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žTHUMBâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ Ð¸Ð· â€ž%Bâ€œÐ½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð½Ð°Ñ€ÐµÐ´Ð±Ñƒ ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° 0x%lxÐ½Ð¸Ñ�ÐºÐ° Ð±Ð¸Ñ‚Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð°
+Ð½ÐµÑ�Ð¸Ð³ÑƒÑ€Ð°Ð½ Ð´Ð¾Ð³Ð¾Ð²Ð¾Ñ€ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð·Ð° Ð½Ðµ-â€žCOFFâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð° â€ž%sâ€œ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ Ñ�Ð»Ð¾Ð¶ÐµÐ½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ: %sÐ½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð² â€žegsdâ€œ ÑƒÐ½Ð¾Ñ� Ð²Ñ€Ñ�Ñ‚Ðµ %u
+Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° emh Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ
+Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° â€žETIRâ€œ Ð½Ð°Ñ€ÐµÐ´Ð±Ð° %dÐ½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð¿Ð¾Ñ€ÐµÑ‚ÐºÐ° Ð±Ð°Ñ˜Ñ‚Ð° Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ð° 0x%lxÐ½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ñ€ÐµÐ´Ð½Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%dâ€œÐ½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¾Ð¿ÐµÑ€Ð°Ñ‚Ð¾Ñ€ â€ž%câ€œ Ñƒ Ñ�Ð»Ð¾Ð¶ÐµÐ½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»ÑƒÐ½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° Ð¸Ð·Ð²Ð¾Ñ€Ð° â€ž%dâ€œÐ½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850â€œÐ½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° â€žSTAâ€œ Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%sâ€œÐ½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ñ€Ð°Ð·Ð¼Ð°ÐºÐ° Ð°Ð´Ñ€ÐµÑ�Ðµ â€ždata/insnâ€œÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ð¼ Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850 E3â€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850â€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850eâ€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e1â€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e2â€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e2v3â€œÐ°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e3v5â€œÐ²-Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: 0x%08x vma:			Ð�Ð´Ñ€ÐµÑ�Ð° Ð¿Ð¾Ñ‡ÐµÑ‚ÐºÐ°	 Ð�Ð´Ñ€ÐµÑ�Ð° ÐºÑ€Ð°Ñ˜Ð°	  Ð˜Ð·Ð»Ð¾Ð¶ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸
+ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ð¸Ð¼Ð°Ñ˜Ñƒ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ðµ â€žwchar_tâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ñƒ Ð¿Ð¾ Ñ‚Ð¾Ð¼Ðµ Ð´Ð° Ð»Ð¸ Ñ˜Ðµ ÐºÐ¾Ð´ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° â€žDSBTâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %s Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ° Ð¾Ð½Ð´Ð° Ñ›Ðµ Ð¸Ð·Ð»Ð°Ð· Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %s Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ°. ÐšÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ° ÐºÑ€Ð¾Ð· Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð½ÐµÑ›Ðµ ÑƒÑ�Ð¿ÐµÑ‚Ð¸ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %u-Ð±Ð°Ñ˜Ñ‚Ð½Ð¸ â€žwchar_tâ€œ Ð¾Ð½Ð´Ð° Ñ›Ðµ Ð¸Ð·Ð»Ð°Ð· Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %u-Ð±Ð°Ñ˜Ñ‚Ð½Ð¸ â€žwchar_tâ€œ. ÐšÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ â€žwchar_tâ€œ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ ÐºÑ€Ð¾Ð· Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð½ÐµÑ›Ðµ ÑƒÑ�Ð¿ÐµÑ‚Ð¸ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™Ð°ÐºÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ°
+ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¸Ð¼Ð° Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ñ�ÐºÐµ â€” Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð° â€ž%sâ€œ
+ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð½ÑƒÐ»Ñ‚Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½ÐµÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ (%ld) Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð¾Ð´ %d
+ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾ÐºÑƒÑˆÐ°Ñ˜ Ð¸Ð·Ð²Ð¾Ð·Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð·Ð¸Ð² Ð½Ðµ-Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñ�ÐºÐ¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ â€ž%Bâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ ÐºÐ¾Ñ˜Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-ÐŸÐ˜Ð¦ ÐºÐ¾Ð´ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ ÐºÐ¾Ñ˜Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-ÐŸÐ˜Ð” ÐºÐ¾Ð´ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð¸ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½ Ñƒ Ð±ÐµÐ»ÐµÑˆÐºÑƒÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° â€ž%Aâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ñƒ â€žPROGBITSâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð¸Ñ�Ñƒ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ÐµÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ñƒ â€ž%Bâ€œÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ñ�Ð²ÐµÐ¶Ð¸Ð¼ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ â€ž%sâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€ž%sâ€œÐ²Ð¸ Ð½ÐµÐ¼Ð°Ñ‚Ðµ Ð´Ð¾Ð·Ð²Ð¾Ð»Ñƒ Ð´Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµÑ‚Ðµ â€ž%sâ€œ Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸
\ No newline at end of file
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sr.po ./bfd/po/sr.po
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sr.po	1970-01-01 00:00:00.000000000 +0000
+++ ./bfd/po/sr.po	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,6811 @@
+# Messages franÃ§ais pour GNU concernant bfd.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This file is distributed under the same license as the binutils package.
+# ÐœÐ¸Ñ€Ð¾Ñ�Ð»Ð°Ð² Ð�Ð¸ÐºÐ¾Ð»Ð¸Ñ› <miroslavnikolic@rocketmail.com>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: bfd-2.24.90\n"
+"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
+"POT-Creation-Date: 2014-02-10 09:42+1030\n"
+"PO-Revision-Date: 2016-05-29 17:48+0200\n"
+"Last-Translator: ÐœÐ¸Ñ€Ð¾Ñ�Ð»Ð°Ð² Ð�Ð¸ÐºÐ¾Ð»Ð¸Ñ› <miroslavnikolic@rocketmail.com>\n"
+"Language-Team: Serbian <(nothing)>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: aout-adobe.c:127
+msgid "%B: Unknown section type in a.out.adobe file: %x\n"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ â€ža.out.adobeâ€œ: %x\n"
+
+#: aout-cris.c:200
+#, c-format
+msgid "%s: Invalid relocation type exported: %d"
+msgstr "%s: Ð˜Ð·Ð²ÐµÐ·ÐµÐ½Ð° Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d"
+
+#: aout-cris.c:243
+msgid "%B: Invalid relocation type imported: %d"
+msgstr "%B: Ð£Ð²ÐµÐ·ÐµÐ½Ð° Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d"
+
+#: aout-cris.c:254
+msgid "%B: Bad relocation record imported: %d"
+msgstr "%B: Ð£Ð²ÐµÐ·ÐµÐ½ Ñ˜Ðµ Ð»Ð¾Ñˆ Ñ�Ð½Ð¸Ð¼Ð°Ðº Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: %d"
+
+#: aoutx.h:1273 aoutx.h:1611
+#, c-format
+msgid "%s: can not represent section `%s' in a.out object file format"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ â€ža.outâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°"
+
+#: aoutx.h:1577
+#, c-format
+msgid "%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ža.outâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°"
+
+#: aoutx.h:1579 vms-alpha.c:7564
+msgid "*unknown*"
+msgstr "*Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾*"
+
+#: aoutx.h:4018 aoutx.h:4344
+msgid "%P: %B: unexpected relocation type\n"
+msgstr "%P: %B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°\n"
+
+#: aoutx.h:5375
+#, c-format
+msgid "%s: relocatable link from %s to %s not supported"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð²ÐµÐ·Ð° Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°"
+
+#: archive.c:2249
+msgid "Warning: writing archive was slow: rewriting timestamp\n"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÑƒÐ¿Ð¸Ñ� Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ñƒ Ñ˜Ðµ Ñ�Ð¿Ð¾Ñ€: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ ÑƒÐ¿Ð¸Ñ�ÑƒÑ˜ÐµÐ¼ Ð²Ñ€ÐµÐ¼Ðµ\n"
+
+#: archive.c:2549
+msgid "Reading archive file mod timestamp"
+msgstr "Ð§Ð¸Ñ‚Ð°Ð¼ Ð²Ñ€ÐµÐ¼Ðµ Ñ€ÐµÐ¶Ð¸Ð¼Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð°Ñ€Ñ…Ð¸Ð²Ðµ"
+
+#: archive.c:2573
+msgid "Writing updated armap timestamp"
+msgstr "Ð£Ð¿Ð¸Ñ�ÑƒÑ˜ÐµÐ¼ Ð¾Ñ�Ð²ÐµÐ¶ÐµÐ½Ð¾ Ð²Ñ€ÐµÐ¼Ðµ Ð°Ñ€Ð¼Ð°Ð¿Ð°"
+
+#: bfd.c:411
+msgid "No error"
+msgstr "Ð�ÐµÐ¼Ð° Ð³Ñ€ÐµÑˆÐºÐµ"
+
+#: bfd.c:412
+msgid "System call error"
+msgstr "Ð“Ñ€ÐµÑˆÐºÐ° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ñ�ÐºÐ¾Ð³ Ð¿Ð¾Ð·Ð¸Ð²Ð°"
+
+#: bfd.c:413
+msgid "Invalid bfd target"
+msgstr "Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ñ†Ð¸Ñ™ Ð±Ñ„Ð´-Ð°"
+
+#: bfd.c:414
+msgid "File in wrong format"
+msgstr "Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ"
+
+#: bfd.c:415
+msgid "Archive object file in wrong format"
+msgstr "Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð°Ñ€Ñ…Ð¸Ð²Ðµ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ"
+
+#: bfd.c:416
+msgid "Invalid operation"
+msgstr "Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ˜Ð°"
+
+#: bfd.c:417
+msgid "Memory exhausted"
+msgstr "ÐœÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�Ñ†Ñ€Ð¿Ñ™ÐµÐ½Ð°"
+
+#: bfd.c:418
+msgid "No symbols"
+msgstr "Ð�ÐµÐ¼Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: bfd.c:419
+msgid "Archive has no index; run ranlib to add one"
+msgstr "Ð�Ñ€Ñ…Ð¸Ð²Ð° Ð½ÐµÐ¼Ð° Ð¸Ð½Ð´ÐµÐºÑ�; Ð¿Ð¾ÐºÑ€ÐµÐ½Ð¸Ñ‚Ðµ â€žranlibâ€œ Ð´Ð° Ð³Ð° Ð´Ð¾Ð´Ð°Ñ‚Ðµ"
+
+#: bfd.c:420
+msgid "No more archived files"
+msgstr "Ð�ÐµÐ¼Ð° Ð²Ð¸ÑˆÐµ Ð°Ñ€Ñ…Ð¸Ð²Ð¸Ñ€Ð°Ð½Ð¸Ñ… Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°"
+
+#: bfd.c:421
+msgid "Malformed archive"
+msgstr "Ð›Ð¾ÑˆÐ° Ð°Ñ€Ñ…Ð¸Ð²Ð°"
+
+#: bfd.c:422
+msgid "DSO missing from command line"
+msgstr "Ð”Ð¡Ðž Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð½Ð° Ð»Ð¸Ð½Ð¸Ñ˜Ð¸ Ð½Ð°Ñ€ÐµÐ´Ð±Ð¸"
+
+#: bfd.c:423
+msgid "File format not recognized"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ� Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: bfd.c:424
+msgid "File format is ambiguous"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ� Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜Ðµ Ð½ÐµÑ˜Ð°Ñ�Ð°Ð½"
+
+#: bfd.c:425
+msgid "Section has no contents"
+msgstr "ÐžÐ´ÐµÑ™Ð°Ðº Ð½ÐµÐ¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ðµ"
+
+#: bfd.c:426
+msgid "Nonrepresentable section on output"
+msgstr "Ð�Ð° Ð¸Ð·Ð»Ð°Ð·Ñƒ Ñ˜Ðµ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð¿Ñ€Ð¸ÐºÐ°Ð·Ð°Ñ‚Ð¸"
+
+#: bfd.c:427
+msgid "Symbol needs debug section which does not exist"
+msgstr "Ð¡Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° ÑƒÐºÐ»Ð°ÑšÐ°ÑšÐµ Ð³Ñ€ÐµÑˆÐ°ÐºÐ° ÐºÐ¾Ñ˜Ð¸ Ð½Ðµ Ð¿Ð¾Ñ�Ñ‚Ð¾Ñ˜Ð¸"
+
+#: bfd.c:428
+msgid "Bad value"
+msgstr "ÐŸÐ¾Ð³Ñ€ÐµÑˆÐ½Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚"
+
+#: bfd.c:429
+msgid "File truncated"
+msgstr "Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¾ÐºÑ€ÑšÐµÐ½Ð°"
+
+#: bfd.c:430
+msgid "File too big"
+msgstr "Ð”Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ°"
+
+#: bfd.c:431
+#, c-format
+msgid "Error reading %s: %s"
+msgstr "Ð“Ñ€ÐµÑˆÐºÐ° Ñ‡Ð¸Ñ‚Ð°ÑšÐ° â€ž%sâ€œ: %s"
+
+#: bfd.c:432
+msgid "#<Invalid error code>"
+msgstr "#<Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ ÐºÐ¾Ð´ Ð³Ñ€ÐµÑˆÐºÐµ>"
+
+#: bfd.c:1046
+#, c-format
+msgid "BFD %s assertion fail %s:%d"
+msgstr "â€žBFDâ€œ â€ž%sâ€œ Ñ‚Ð²Ñ€Ð´ÑšÐ° Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð° â€ž%sâ€œ:%d"
+
+#: bfd.c:1058
+#, c-format
+msgid "BFD %s internal error, aborting at %s line %d in %s\n"
+msgstr "Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð”-Ð° %s, Ð¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð¼ Ð¿Ñ€Ð¸ â€ž%sâ€œ %d. Ñ€ÐµÐ´Ñƒ Ñƒ â€ž%sâ€œ\n"
+
+#: bfd.c:1062
+#, c-format
+msgid "BFD %s internal error, aborting at %s line %d\n"
+msgstr "Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð”-Ð° %s, Ð¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð¼ Ð¿Ñ€Ð¸ â€ž%sâ€œ %d. Ñ€ÐµÐ´Ñƒ\n"
+
+#: bfd.c:1064
+msgid "Please report this bug.\n"
+msgstr "ÐŸÑ€Ð¸Ñ˜Ð°Ð²Ð¸Ñ‚Ðµ Ð¾Ð²Ñƒ Ð³Ñ€ÐµÑˆÐºÑƒ.\n"
+
+#: bfdwin.c:206
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr "Ð½Ðµ Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð¼: Ð¿Ð¾Ð´Ð°Ñ‚Ð°Ðº=%lx  Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð½=%d\n"
+
+#: bfdwin.c:209
+#, c-format
+msgid "not mapping: env var not set\n"
+msgstr "Ð½Ðµ Ð¼Ð°Ð¿Ð¸Ñ€Ð°Ð¼: Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð° Ð¾ÐºÑ€ÑƒÐ¶ÐµÑšÐ° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð°\n"
+
+#: binary.c:271
+#, c-format
+msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð£Ð¿Ð¸Ñ� Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸Ðº (Ð½Ð¿Ñ€. Ð½ÐµÐ³Ð°Ñ‚Ð¸Ð²Ð°Ð½) Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ 0x%lx."
+
+#: bout.c:1146 elf-m10300.c:2665 elf32-avr.c:1706 elf32-frv.c:5641
+#: elf64-ia64-vms.c:354 elfxx-sparc.c:2869 reloc.c:7324 reloc16.c:160
+#: elf32-ia64.c:351 elf64-ia64.c:351
+msgid "%P%F: --relax and -r may not be used together\n"
+msgstr "%P%F: â€ž--relaxâ€œ Ð¸ â€ž-râ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾\n"
+
+#: cache.c:253
+msgid "reopening %B: %s\n"
+msgstr "Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¾Ñ‚Ð²Ð°Ñ€Ð°Ð¼ â€ž%Bâ€œ: %s\n"
+
+#: coff-alpha.c:452
+msgid ""
+"%B: Cannot handle compressed Alpha binaries.\n"
+"   Use compiler flags, or objZ, to generate uncompressed binaries."
+msgstr ""
+"%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° Ñ�Ð°Ð¶ÐµÑ‚Ð¸Ð¼ Ð±Ð¸Ð½Ð°Ñ€Ð½Ð¸Ð¼ Ð�Ð»Ñ„Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°.\n"
+"   ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¿Ñ€ÐµÐ²Ð¾Ð´Ð¸Ð¾Ñ†Ð°, Ð¸Ð»Ð¸ â€žobjZâ€œ, Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð½ÐµÑ�Ð°Ð¶ÐµÑ‚Ðµ Ð±Ð¸Ð½Ð°Ñ€Ð½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ."
+
+#: coff-alpha.c:603
+msgid "%B: unknown/unsupported relocation type %d"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð°/Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: coff-alpha.c:852 coff-alpha.c:889 coff-alpha.c:1973 coff-mips.c:946
+msgid "GP relative relocation used when GP not defined"
+msgstr "Ð£Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ˜Ðµ Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° ÐºÐ°Ð´Ð° Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½"
+
+#: coff-alpha.c:1450
+msgid "using multiple gp values"
+msgstr "ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ð¼ Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: coff-alpha.c:1509
+msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ: â€žALPHA_R_GRELHIGHâ€œ"
+
+#: coff-alpha.c:1516
+msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ: â€žALPHA_R_GRELLOWâ€œ"
+
+#: coff-alpha.c:1523 elf32-m32r.c:2443 elf64-alpha.c:4083 elf64-alpha.c:4233
+#: elf64-ia64-vms.c:3429 elf32-ia64.c:3836 elf64-ia64.c:3836
+msgid "%B: unknown relocation type %d"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: coff-arm.c:1034
+#, c-format
+msgid "%B: unable to find THUMB glue '%s' for `%s'"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žTHUMBâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ"
+
+#: coff-arm.c:1063
+#, c-format
+msgid "%B: unable to find ARM glue '%s' for `%s'"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žARMâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ"
+
+#: coff-arm.c:1365 elf32-arm.c:7141
+#, c-format
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: arm call to thumb"
+msgstr ""
+"%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.\n"
+"  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žarmâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° â€žthumbâ€œ"
+
+#: coff-arm.c:1455
+#, c-format
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: thumb call to arm\n"
+"  consider relinking with --support-old-code enabled"
+msgstr ""
+"%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.\n"
+"  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žthumbâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° â€žarmâ€œ\n"
+"  Ñ€Ð°Ð·Ð¼Ð¾Ñ‚Ñ€Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµ Ñ�Ð° ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¸Ð¼ â€ž--support-old-codeâ€œ"
+
+#: coff-arm.c:1750 coff-tic80.c:673 cofflink.c:3168
+msgid "%B: bad reloc address 0x%lx in section `%A'"
+msgstr "%B: Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ"
+
+#: coff-arm.c:2075
+msgid "%B: illegal symbol index in reloc: %d"
+msgstr "%B: Ð½ÐµÐ´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ: %d"
+
+#: coff-arm.c:2206
+#, c-format
+msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° Ð�ÐŸÐ¦Ð¡-%d, Ð´Ð¾Ðº Ñ˜Ðµ â€ž%Bâ€œ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° Ð�ÐŸÐ¦Ð¡-%d"
+
+#: coff-arm.c:2222 elf32-arm.c:16123
+#, c-format
+msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ…, Ð´Ð¾Ðº Ð¸Ñ… â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: coff-arm.c:2225 elf32-arm.c:16127
+#, c-format
+msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ…, Ð´Ð¾Ðº Ð¸Ñ… â€ž%Bâ€œ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÑƒÑ˜Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: coff-arm.c:2239
+#, c-format
+msgid "error: %B is compiled as position independent code, whereas target %B is absolute position"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ ÐºÐ¾Ð´ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°, Ð´Ð¾Ðº Ñ˜Ðµ Ñ†Ð¸Ñ™ â€ž%Bâ€œ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¸ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜"
+
+#: coff-arm.c:2242
+#, c-format
+msgid "error: %B is compiled as absolute position code, whereas target %B is position independent"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ ÐºÐ¾Ð´ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾Ð³ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°, Ð´Ð¾Ðº Ñ˜Ðµ Ñ†Ð¸Ñ™ â€ž%Bâ€œ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ñ‚Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°"
+
+#: coff-arm.c:2270 elf32-arm.c:16192
+#, c-format
+msgid "Warning: %B supports interworking, whereas %B does not"
+msgstr "Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: â€ž%Bâ€œ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾, Ð´Ð¾Ðº Ð³Ð° â€ž%Bâ€œ Ð½Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð°"
+
+#: coff-arm.c:2273 elf32-arm.c:16198
+#, c-format
+msgid "Warning: %B does not support interworking, whereas %B does"
+msgstr "Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: â€ž%Bâ€œ Ð½Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾, Ð´Ð¾Ðº Ð³Ð° â€ž%Bâ€œ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð²Ð°"
+
+#: coff-arm.c:2297
+#, c-format
+msgid "private flags = %x:"
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ =%x:"
+
+#: coff-arm.c:2305 elf32-arm.c:12119
+#, c-format
+msgid " [floats passed in float registers]"
+msgstr " [Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÐµÐ½Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸]"
+
+#: coff-arm.c:2307
+#, c-format
+msgid " [floats passed in integer registers]"
+msgstr " [Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ�Ð»ÐµÑ’ÐµÐ½Ðµ Ñƒ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ñ†ÐµÐ»Ð¸Ñ… Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸]"
+
+#: coff-arm.c:2310 elf32-arm.c:12122
+#, c-format
+msgid " [position independent]"
+msgstr " [Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ñ‚Ð°Ð½ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°]"
+
+#: coff-arm.c:2312
+#, c-format
+msgid " [absolute position]"
+msgstr " [Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¸ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜]"
+
+#: coff-arm.c:2316
+#, c-format
+msgid " [interworking flag not initialised]"
+msgstr " [Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ð° Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð°]"
+
+#: coff-arm.c:2318
+#, c-format
+msgid " [interworking supported]"
+msgstr " [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾]"
+
+#: coff-arm.c:2320
+#, c-format
+msgid " [interworking not supported]"
+msgstr " [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾]"
+
+#: coff-arm.c:2366 elf32-arm.c:11104
+#, c-format
+msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð�Ð¸Ñ�Ð°Ð¼ Ð¿Ð¾Ð´ÐµÑ�Ð¸Ð¾ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ Ð¿Ð¾ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð²ÐµÑ› Ð½Ð°Ð²ÐµÐ´ÐµÐ½ ÐºÐ°Ð¾ Ð½ÐµÐ¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²ÐµÐ½Ð¾"
+
+#: coff-arm.c:2370 elf32-arm.c:11108
+#, c-format
+msgid "Warning: Clearing the interworking flag of %B due to outside request"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð£ÐºÐ»Ð°ÑšÐ°Ð¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ ÑƒÑ�Ð»ÐµÐ´ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ñ�Ð¿Ð¾Ñ™Ð°"
+
+#: coff-h8300.c:1096
+#, c-format
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€žR_MEM_INDIRECTâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ¼ ÐºÐ°Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ð¼ â€ž%sâ€œ Ð¸Ð·Ð»Ð°Ð·"
+
+#: coff-i860.c:147
+#, c-format
+msgid "relocation `%s' not yet implemented"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: coff-i860.c:605 coff-tic54x.c:365 coffcode.h:5209
+msgid "%B: warning: illegal symbol index %ld in relocs"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ¸Ð¼Ð°"
+
+#: coff-i960.c:124 coff-i960.c:480
+msgid "uncertain calling convention for non-COFF symbol"
+msgstr "Ð½ÐµÑ�Ð¸Ð³ÑƒÑ€Ð°Ð½ Ð´Ð¾Ð³Ð¾Ð²Ð¾Ñ€ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð·Ð° Ð½Ðµ-â€žCOFFâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: coff-m68k.c:484 elf32-bfin.c:5556 elf32-cr16.c:2853 elf32-m68k.c:4632
+msgid "unsupported reloc type"
+msgstr "Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°"
+
+#: coff-mips.c:636 elf32-mips.c:1637 elf32-score.c:431 elf32-score7.c:330
+#: elf64-mips.c:2925 elfn32-mips.c:2737
+msgid "GP relative relocation when _gp not defined"
+msgstr "Ð ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð“ÐŸ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: coff-or32.c:216
+msgid "Unrecognized reloc"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: coff-rs6000.c:2802
+#, c-format
+msgid "%s: unsupported relocation type 0x%02x"
+msgstr "%s: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%02x"
+
+#: coff-rs6000.c:2887
+#, c-format
+msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° Ð½Ð° 0x%x Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÐºÐ¾Ñ˜Ð¸ Ð½Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ð¸ÐºÐ°ÐºÐ°Ð² ÑƒÐ½Ð¾Ñ�"
+
+#: coff-rs6000.c:3638 coff64-rs6000.c:2117
+msgid "%B: symbol `%s' has unrecognized smclas %d"
+msgstr "%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ ÐºÐ»Ð°Ñ�Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%dâ€œ"
+
+#: coff-sh.c:506
+#, c-format
+msgid "SH Error: unknown reloc type %d"
+msgstr "Ð“Ñ€ÐµÑˆÐºÐ° ÑˆÐºÐ¾Ñ™ÐºÐµ: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: coff-tic4x.c:184 coff-tic54x.c:279 coff-tic80.c:440
+#, c-format
+msgid "Unrecognized reloc type 0x%x"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° 0x%x"
+
+#: coff-tic4x.c:227
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in relocs"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ¸Ð¼Ð°"
+
+#: coff-w65.c:355
+#, c-format
+msgid "ignoring reloc %s\n"
+msgstr "Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ\n"
+
+#: coffcode.h:1005
+msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žCOMDATâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð° Ñ�Ð° Ð½Ð°Ð·Ð¸Ð²Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ"
+
+#. Generate a warning message rather using the 'unhandled'
+#. variable as this will allow some .sys files generate by
+#. other toolchains to be processed.  See bugzilla issue 196.
+#: coffcode.h:1230
+msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
+msgstr "%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð—Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° â€žIMAGE_SCN_MEM_NOT_PAGEDâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ"
+
+#: coffcode.h:1297
+msgid "%B (%s): Section flag %s (0x%x) ignored"
+msgstr "%B (%s): Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ (0x%x) Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½Ð°"
+
+#: coffcode.h:2439
+#, c-format
+msgid "Unrecognized TI COFF target id '0x%x'"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¸Ð´ â€žTI COFFâ€œ Ñ†Ð¸Ñ™Ð° â€ž0x%xâ€œ"
+
+#: coffcode.h:2753
+msgid "%B: reloc against a non-existant symbol index: %ld"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›ÐµÐ³ Ð¸Ð½Ð´ÐµÐºÑ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: %ld"
+
+#: coffcode.h:3311
+msgid "%B: too many sections (%d)"
+msgstr "%B: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° (%d)"
+
+#: coffcode.h:3729
+msgid "%B: section %s: string table overflow at offset %ld"
+msgstr "%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ñ�ÐºÐ¸ Ð½Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ñƒ %ld"
+
+#: coffcode.h:4534
+msgid "%B: warning: line number table read failed"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ Ñ‡Ð¸Ñ‚Ð°ÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ"
+
+#: coffcode.h:4564
+msgid "%B: warning: illegal symbol index %ld in line numbers"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld Ñƒ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð¸Ð¼Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°"
+
+#: coffcode.h:4578
+msgid "%B: warning: duplicate line number information for `%s'"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ‚Ð°Ðº Ð¾ Ð±Ñ€Ð¾Ñ˜Ñƒ Ñ€ÐµÐ´Ð° Ð·Ð° â€ž%sâ€œ"
+
+#: coffcode.h:4978
+msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° ÐºÐ»Ð°Ñ�Ð° Ñ�Ð¼ÐµÑˆÑ‚Ð°Ñ˜Ð° â€ž%dâ€œ Ð·Ð° â€ž%sâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ"
+
+#: coffcode.h:5104
+msgid "warning: %B: local symbol `%s' has no section"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: coffcode.h:5248
+msgid "%B: illegal relocation type %d at address 0x%lx"
+msgstr "%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° %d Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð¸ 0x%lx"
+
+#: coffgen.c:179 elf.c:1030
+msgid "%B: unable to initialize compress status for section %s"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ñ�Ñ‚Ð°ÑšÐµ Ñ�Ð°Ð¶Ð¸Ð¼Ð°ÑšÐ° Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: coffgen.c:199 elf.c:1050
+msgid "%B: unable to initialize decompress status for section %s"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ñ�Ñ‚Ð°ÑšÐµ Ñ€Ð°Ñ�Ð¿Ð°ÐºÐ¸Ð²Ð°ÑšÐ° Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: coffgen.c:1685
+msgid "%B: bad string table size %lu"
+msgstr "%B: Ð»Ð¾ÑˆÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ð·Ð° %lu"
+
+#: coffgen.c:2608 elflink.c:12906 linker.c:3136
+msgid "%F%P: already_linked_table: %E\n"
+msgstr "%F%P: Ð²ÐµÑ›_Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð°_Ñ‚Ð°Ð±ÐµÐ»Ð°: %E\n"
+
+#: cofflink.c:533 elf64-ia64-vms.c:5173 elflink.c:4356
+msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ð¸Ð· â€ž%dâ€œ Ñƒ â€ž%dâ€œ Ð·Ð° â€ž%Bâ€œ"
+
+#: cofflink.c:2416
+msgid "%B: relocs in section `%A', but it has no contents"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ, Ð°Ð»Ð¸ Ð½ÐµÐ¼Ð° Ð½Ð¸ÐºÐ°ÐºÐ²Ð¾Ð³ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°"
+
+#: cofflink.c:2478 elflink.c:9711
+msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n"
+msgstr "%Xâ€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿ÑƒÑ‚Ð½Ð¾ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ: Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ñ˜Ðµ Ñƒ Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ\n"
+
+#: cofflink.c:2777 coffswap.h:826
+#, c-format
+msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
+msgstr "%s: %s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: 0x%lx > 0xffff"
+
+#: cofflink.c:2786 coffswap.h:812
+#, c-format
+msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°: 0x%lx > 0xffff"
+
+#: cpu-arm.c:190 cpu-arm.c:201
+msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° EP9312, Ð´Ð¾Ðº Ñ˜Ðµ â€ž%Bâ€œ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° XScale"
+
+#: cpu-arm.c:334
+#, c-format
+msgid "warning: unable to update contents of %s section in %s"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ñ�Ð²ÐµÐ¶Ð¸Ð¼ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ â€ž%sâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€ž%sâ€œ"
+
+#: dwarf2.c:514
+#, c-format
+msgid "Dwarf Error: Can't find %s section."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ."
+
+#: dwarf2.c:543
+#, c-format
+msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: ÐŸÐ¾Ð¼ÐµÑ€Ð°Ñ˜ (%lu) Ñ˜Ðµ >= Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ %s (%lu)."
+
+#: dwarf2.c:1071
+#, c-format
+msgid "Dwarf Error: Invalid or unhandled FORM value: %#x."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¸Ð»Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žFORMâ€œ: %#x."
+
+#: dwarf2.c:1332
+msgid "Dwarf Error: mangled line number section (bad file number)."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð‘Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¾Ð´Ñ�ÐµÑ‡ÐµÐ½ (Ð»Ð¾Ñˆ Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ)."
+
+#: dwarf2.c:1590
+#, c-format
+msgid "Dwarf Error: Unhandled .debug_line version %d."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¾Ð±Ñ€Ð°Ñ’ÐµÐ½Ð¾ â€ž.debug_lineâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %d."
+
+#: dwarf2.c:1612
+msgid "Dwarf Error: Invalid maximum operations per instruction."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð½Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ð±Ñ€Ð¾Ñ˜ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ˜Ð° Ð¿Ð¾ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð¸."
+
+#: dwarf2.c:1807
+msgid "Dwarf Error: mangled line number section."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð‘Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¾Ð´Ñ�ÐµÑ‡ÐµÐ½."
+
+#: dwarf2.c:2160
+#, c-format
+msgid "Dwarf Error: Unable to read alt ref %u."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žaltâ€œ ÑƒÐ¿ÑƒÑ‚Ñƒ %u."
+
+#: dwarf2.c:2179 dwarf2.c:2299 dwarf2.c:2595
+#, c-format
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¸ Ð±Ñ€Ð¾Ñ˜ %u."
+
+#: dwarf2.c:2551
+#, c-format
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð°Ñ’Ð¾Ñ… â€žDWARFâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ â€ž%uâ€œ, Ð¾Ð²Ð°Ñ˜ Ñ‡Ð¸Ñ‚Ð°Ñ‡ Ñ€Ð°Ð´Ð¸ Ñ�Ð°Ð¼Ð¾ Ñ�Ð° Ð¿Ð¾Ð´Ð°Ñ†Ð¸Ð¼Ð° Ð¸Ð·Ð´Ð°ÑšÐ° 2, 3 Ð¸ 4."
+
+#: dwarf2.c:2560
+#, c-format
+msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð°Ñ’Ð¾Ñ… Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�Ðµ â€ž%uâ€œ, Ð¾Ð²Ð°Ñ˜ Ñ‡Ð¸Ñ‚Ð°Ñ‡ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ€Ð°Ð´Ð¸ Ñ�Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°Ð¼Ð° Ð²ÐµÑ›Ð¸Ð¼ Ð¾Ð´ â€ž%uâ€œ."
+
+#: dwarf2.c:2586
+#, c-format
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "â€žDWARFâ€œ Ð³Ñ€ÐµÑˆÐºÐ°: Ð›Ð¾Ñˆ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¸ Ð±Ñ€Ð¾Ñ˜: %u."
+
+#: ecoff.c:1233
+#, c-format
+msgid "Unknown basic type %d"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð¾Ñ�Ð½Ð¾Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° â€ž%dâ€œ"
+
+#: ecoff.c:1490
+#, c-format
+msgid ""
+"\n"
+"      End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1497 ecoff.c:1500
+#, c-format
+msgid ""
+"\n"
+"      First symbol: %ld"
+msgstr ""
+"\n"
+"      ÐŸÑ€Ð²Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1512
+#, c-format
+msgid ""
+"\n"
+"      End+1 symbol: %-7ld   Type:  %s"
+msgstr ""
+"\n"
+"      ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %-7ld   Ð’Ñ€Ñ�Ñ‚Ð°:  %s"
+
+#: ecoff.c:1519
+#, c-format
+msgid ""
+"\n"
+"      Local symbol: %ld"
+msgstr ""
+"\n"
+"      Ð›Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1527
+#, c-format
+msgid ""
+"\n"
+"      struct; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      struct; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1532
+#, c-format
+msgid ""
+"\n"
+"      union; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      union; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1537
+#, c-format
+msgid ""
+"\n"
+"      enum; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      enum; ÐŸÐ¾Ñ�Ð»ÐµÐ´ÑšÐ¸+1 Ñ�Ð¸Ð¼Ð±Ð¾Ð»: %ld"
+
+#: ecoff.c:1543
+#, c-format
+msgid ""
+"\n"
+"      Type: %s"
+msgstr ""
+"\n"
+"      Ð’Ñ€Ñ�Ñ‚Ð°: %s"
+
+#: elf-attrs.c:573
+msgid "error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchain"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: ÐžÐ±Ñ˜ÐµÐºÐ°Ñ‚ Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¿Ñ€Ð¾Ð´Ð°Ð²Ñ†Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ ÐºÐ¾Ñ˜Ð¸ Ð¼Ð¾Ñ€Ð° Ð±Ð¸Ñ‚Ð¸ Ð¾Ð±Ñ€Ð°Ñ’ÐµÐ½ Ð°Ð»Ð°Ñ‚Ð½Ð¸Ð¼ Ð»Ð°Ð½Ñ†ÐµÐ¼ â€ž%sâ€œ"
+
+#: elf-attrs.c:582
+msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: ÐžÐ·Ð½Ð°ÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° â€ž%d, %sâ€œ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð·Ð½Ð°ÐºÐ¾Ð¼ â€ž%d, %sâ€œ"
+
+#: elf-eh-frame.c:921
+msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
+msgstr "%P: Ð³Ñ€ÐµÑˆÐºÐ° Ñƒ â€ž%B(%A)â€œ; Ð½ÐµÑ›Ðµ Ð±Ð¸Ñ‚Ð¸ Ð½Ð°Ð¿Ñ€Ð°Ð²Ñ™ÐµÐ½Ð° Ð½Ð¸Ñ˜ÐµÐ´Ð½Ð° â€ž.eh_frame_hdrâ€œ Ñ‚Ð°Ð±ÐµÐ»Ð°.\n"
+
+#: elf-eh-frame.c:1193
+msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+msgstr "%P: Ñ„Ð´Ðµ ÐºÐ¾Ð´Ð¸Ñ€Ð°ÑšÐµ Ñƒ â€ž%B(%A)â€œ Ñ�Ð¿Ñ€ÐµÑ‡Ð°Ð²Ð° Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐµ â€ž.eh_frame_hdrâ€œ Ñ‚Ð°Ð±ÐµÐ»Ðµ.\n"
+
+#: elf-eh-frame.c:1612
+msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n"
+msgstr "%P: â€žDW_EH_PE_datarelâ€œ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð²Ñƒ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ñƒ.\n"
+
+#: elf-ifunc.c:135
+msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n"
+msgstr "%F%P: Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ�Ð° Ñ˜ÐµÐ´Ð½Ð°ÐºÐ¾ÑˆÑ›Ñƒ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ñƒ â€ž%Bâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð¸Ð·Ð²Ñ€ÑˆÐ½Ðµ; Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° â€ž-fPIEâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ¶Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° â€ž-pieâ€œ\n"
+
+#: elf-m10200.c:430 elf-m10300.c:2164 elf32-avr.c:1256 elf32-bfin.c:3220
+#: elf32-cr16.c:1484 elf32-cr16c.c:780 elf32-cris.c:2016 elf32-crx.c:922
+#: elf32-d10v.c:513 elf32-epiphany.c:557 elf32-fr30.c:589 elf32-frv.c:4039
+#: elf32-h8300.c:525 elf32-i860.c:1212 elf32-ip2k.c:1468 elf32-iq2000.c:688
+#: elf32-lm32.c:1160 elf32-m32c.c:553 elf32-m32r.c:3066 elf32-m68hc1x.c:1283
+#: elf32-mep.c:535 elf32-metag.c:1992 elf32-microblaze.c:1560
+#: elf32-moxie.c:282 elf32-mt.c:395 elf32-nds32.c:4910 elf32-openrisc.c:404
+#: elf32-score.c:2729 elf32-score7.c:2537 elf32-spu.c:5041
+#: elf32-tilepro.c:3666 elf32-v850.c:2281 elf32-xstormy16.c:936
+#: elf64-mmix.c:1538 elfxx-tilegx.c:4051
+msgid "internal error: out of range error"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf-m10200.c:434 elf-m10300.c:2168 elf32-avr.c:1260 elf32-bfin.c:3224
+#: elf32-cr16.c:1488 elf32-cr16c.c:784 elf32-cris.c:2020 elf32-crx.c:926
+#: elf32-d10v.c:517 elf32-fr30.c:593 elf32-frv.c:4043 elf32-h8300.c:529
+#: elf32-i860.c:1216 elf32-iq2000.c:692 elf32-lm32.c:1164 elf32-m32c.c:557
+#: elf32-m32r.c:3070 elf32-m68hc1x.c:1287 elf32-mep.c:539 elf32-metag.c:1996
+#: elf32-microblaze.c:1564 elf32-moxie.c:286 elf32-msp430.c:1321
+#: elf32-nds32.c:4914 elf32-openrisc.c:408 elf32-score.c:2733
+#: elf32-score7.c:2541 elf32-spu.c:5045 elf32-tilepro.c:3670 elf32-v850.c:2285
+#: elf32-xstormy16.c:940 elf64-mmix.c:1542 elfxx-mips.c:9995
+#: elfxx-tilegx.c:4055
+msgid "internal error: unsupported relocation error"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: elf-m10200.c:438 elf32-cr16.c:1492 elf32-cr16c.c:788 elf32-crx.c:930
+#: elf32-d10v.c:521 elf32-h8300.c:533 elf32-lm32.c:1168 elf32-m32r.c:3074
+#: elf32-m68hc1x.c:1291 elf32-microblaze.c:1568 elf32-nds32.c:4918
+#: elf32-score.c:2737 elf32-score7.c:2545 elf32-spu.c:5049
+msgid "internal error: dangerous error"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð³Ñ€ÐµÑˆÐºÐ° Ð¾Ð¿Ð°Ñ�Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: elf-m10200.c:442 elf-m10300.c:2184 elf32-avr.c:1268 elf32-bfin.c:3232
+#: elf32-cr16.c:1496 elf32-cr16c.c:792 elf32-cris.c:2028 elf32-crx.c:934
+#: elf32-d10v.c:525 elf32-epiphany.c:572 elf32-fr30.c:601 elf32-frv.c:4051
+#: elf32-h8300.c:537 elf32-i860.c:1224 elf32-ip2k.c:1483 elf32-iq2000.c:700
+#: elf32-lm32.c:1172 elf32-m32c.c:565 elf32-m32r.c:3078 elf32-m68hc1x.c:1295
+#: elf32-mep.c:547 elf32-metag.c:2004 elf32-microblaze.c:1572
+#: elf32-moxie.c:294 elf32-msp430.c:1329 elf32-mt.c:403 elf32-nds32.c:4922
+#: elf32-openrisc.c:416 elf32-score.c:2746 elf32-score7.c:2549
+#: elf32-spu.c:5053 elf32-tilepro.c:3678 elf32-v850.c:2305
+#: elf32-xstormy16.c:948 elf64-mmix.c:1550 elfxx-tilegx.c:4063
+msgid "internal error: unknown error"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°"
+
+#: elf-m10300.c:1021
+#, c-format
+msgid "%s: Unsupported transition from %s to %s"
+msgstr "%s: ÐŸÑ€ÐµÐ»Ð°Ð·Ð°Ðº Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½"
+
+#: elf-m10300.c:1213
+msgid "%B: %s' accessed both as normal and thread local symbol"
+msgstr "%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸"
+
+#: elf-m10300.c:2108 elf32-arm.c:10632 elf32-i386.c:4363 elf32-m32r.c:2558
+#: elf32-m68k.c:4120 elf32-s390.c:3303 elf32-sh.c:4109 elf32-tilepro.c:3569
+#: elf32-xtensa.c:3063 elf64-s390.c:3229 elf64-sh64.c:1640 elf64-x86-64.c:4463
+#: elfxx-sparc.c:3904 elfxx-tilegx.c:3974
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4450
+msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%B(%A+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf-m10300.c:2173
+msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ð° Ð·Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ (Ð´Ð° Ð»Ð¸ Ñ�Ñ‚Ðµ Ð·Ð°Ð±Ð¾Ñ€Ð°Ð²Ð¸Ð»Ð¸ â€ž-fpicâ€œ?)"
+
+#: elf-m10300.c:2176
+msgid "%B: taking the address of protected function '%s' cannot be done when making a shared library"
+msgstr "%B: ÑƒÐ·Ð¸Ð¼Ð°ÑšÐµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¾Ð±Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ðµ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ"
+
+#: elf-m10300.c:2179
+msgid "internal error: suspicious relocation type used in shared library"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�ÑƒÐ¼ÑšÐ¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð° Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ñ˜ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: elf.c:343
+msgid "%B: invalid string offset %u >= %lu for section `%s'"
+msgstr "%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ñ�ÐºÐµ â€ž%u >= %luâ€œ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: elf.c:455
+msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
+msgstr "â€ž%Bâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð±Ñ€Ð¾Ñ˜ %lu ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð½ÐµÐ¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žSHT_SYMTAB_SHNDXâ€œ"
+
+#: elf.c:611
+msgid "%B: Corrupt size field in group section header: 0x%lx"
+msgstr "%B: ÐžÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ñ™Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñƒ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° Ð³Ñ€ÑƒÐ¿Ðµ: 0x%lx"
+
+#: elf.c:647
+msgid "%B: invalid SHT_GROUP entry"
+msgstr "%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ ÑƒÐ½Ð¾Ñ� â€žSHT_GROUPâ€œ"
+
+#: elf.c:717
+msgid "%B: no group info for section %A"
+msgstr "%B: Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð³Ñ€ÑƒÐ¿Ðµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elf.c:746 elf.c:3144 elflink.c:10290
+msgid "%B: warning: sh_link not set for section `%A'"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žsh_linkâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elf.c:765
+msgid "%B: sh_link [%d] in section `%A' is incorrect"
+msgstr "%B: â€žsh_link [%d]â€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾"
+
+#: elf.c:800
+msgid "%B: unknown [%d] section `%s' in group [%s]"
+msgstr "%B: [%d] Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ð³Ñ€ÑƒÐ¿Ð¸ [%s]"
+
+#: elf.c:1174
+#, c-format
+msgid ""
+"\n"
+"Program Header:\n"
+msgstr ""
+"\n"
+"Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°:\n"
+
+#: elf.c:1216
+#, c-format
+msgid ""
+"\n"
+"Dynamic Section:\n"
+msgstr ""
+"\n"
+"Ð”Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ð¾Ð´ÐµÑ™Ð°Ðº:\n"
+
+#: elf.c:1352
+#, c-format
+msgid ""
+"\n"
+"Version definitions:\n"
+msgstr ""
+"\n"
+"Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¸Ð·Ð´Ð°ÑšÐ°:\n"
+
+#: elf.c:1377
+#, c-format
+msgid ""
+"\n"
+"Version References:\n"
+msgstr ""
+"\n"
+"Ð£Ð¿ÑƒÑ‚Ð° Ð¸Ð·Ð´Ð°ÑšÐ°:\n"
+
+#: elf.c:1382
+#, c-format
+msgid "  required from %s:\n"
+msgstr "  Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð°Ð½Ð¾ Ð¸Ð· â€ž%sâ€œ:\n"
+
+#: elf.c:1807
+msgid "%B: invalid link %lu for reloc section %s (index %u)"
+msgstr "%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²ÐµÐ·Ð° â€ž%luâ€œ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ (Ð¸Ð½Ð´ÐµÐºÑ� â€ž%uâ€œ)"
+
+#: elf.c:1977
+msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]"
+msgstr "%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½, Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]"
+
+#: elf.c:1989
+msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
+msgstr "%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]"
+
+#: elf.c:2000
+msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
+msgstr "%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ñƒ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]"
+
+#: elf.c:2010
+msgid "%B: don't know how to handle section `%s' [0x%8x]"
+msgstr "%B: Ð½Ðµ Ð·Ð½Ð°Ð¼ ÐºÐ°ÐºÐ¾ Ð´Ð° Ð¾Ð±Ñ€Ð°Ð´Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ [0x%8x]"
+
+#: elf.c:2648
+#, c-format
+msgid "warning: section `%A' type changed to PROGBITS"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° â€ž%Aâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ñƒ â€žPROGBITSâ€œ"
+
+#: elf.c:3015
+msgid "%B: too many sections: %u"
+msgstr "%B: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ°: %u"
+
+#: elf.c:3101
+msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
+msgstr "%B: â€žsh_linkâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ ÑƒÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ"
+
+#: elf.c:3124
+msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
+msgstr "%B: â€žsh_linkâ€œ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ ÑƒÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° ÑƒÐºÐ»Ð¾ÑšÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¾Ð´ â€ž%Bâ€œ"
+
+#: elf.c:4126
+msgid "%B: TLS sections are not adjacent:"
+msgstr "%B: Ð¢Ð›Ð¡ Ð¾Ð´ÐµÑ™Ñ†Ð¸ Ð½Ð¸Ñ�Ñƒ Ñ�ÑƒÑ�ÐµÐ´Ð½Ð¸:"
+
+#: elf.c:4133
+#, c-format
+msgid "\t    TLS: %A"
+msgstr "\t    Ð¢Ð›Ð¡: %A"
+
+#: elf.c:4137
+#, c-format
+msgid "\tnon-TLS: %A"
+msgstr "\tÐ½Ðµ-Ð¢Ð›Ð¡: %A"
+
+#: elf.c:4596
+msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
+msgstr "%B: ÐŸÑ€Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ â€žPT_DYNAMICâ€œ Ð½Ð¸Ñ˜Ðµ â€ž.dynamicâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: elf.c:4621
+msgid "%B: Not enough room for program headers, try linking with -N"
+msgstr "%B: Ð�ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ Ð¼ÐµÑ�Ñ‚Ð° Ð·Ð° Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼, Ð¿Ñ€Ð¾Ð±Ð°Ñ˜Ñ‚Ðµ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÑ‚Ðµ Ñ�Ð° â€ž-Nâ€œ"
+
+#: elf.c:4707
+msgid "%B: section %A lma %#lx adjusted to %#lx"
+msgstr "%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%A lma %#lxâ€œ Ñ˜Ðµ Ð´Ð¾Ñ‚ÐµÑ€Ð°Ð½ Ð½Ð° %#lx"
+
+#: elf.c:4843
+msgid "%B: section `%A' can't be allocated in segment %d"
+msgstr "%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð¾Ð´ÐµÐ»Ð¸Ñ‚Ð¸ Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ %d"
+
+#: elf.c:4892
+msgid "%B: warning: allocated section `%s' not in segment"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð´Ð¾Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð´ÐµÐ¾ÐºÑƒ"
+
+#: elf.c:5473
+msgid "%B: symbol `%s' required but not present"
+msgstr "%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ð°Ð»Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�ÑƒÑ‚Ð°Ð½"
+
+#: elf.c:5811
+msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ñ˜Ðµ Ð¿Ñ€Ð°Ð·Ð°Ð½ Ð¿Ð¾Ð´ÐµÐ¾Ðº ÐºÐ¾Ñ˜Ð¸ Ñ�Ðµ Ð¼Ð¾Ð¶Ðµ ÑƒÑ‡Ð¸Ñ‚Ð°Ñ‚Ð¸, Ð´Ð° Ð»Ð¸ Ñ˜Ðµ Ñ‚Ð¾ Ð½Ð°Ð¼ÐµÑ€Ð°Ð²Ð°Ð½Ð¾ ?\n"
+
+#: elf.c:6867
+#, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ ÐµÐºÐ²Ð¸Ð²Ð°Ð»ÐµÐ½Ñ‚Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº Ð¸Ð·Ð»Ð°Ð·Ð° Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ"
+
+#: elf.c:7915
+msgid "%B: unsupported relocation type %s"
+msgstr "%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° %s Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°"
+
+#: elf32-arm.c:3722 elf32-arm.c:7051
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: Thumb call to ARM"
+msgstr ""
+"%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.\n"
+"  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žThumbâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð½Ð° â€žARMâ€œ"
+
+#: elf32-arm.c:3769
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: ARM call to Thumb"
+msgstr ""
+"%B(%s): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ð½Ð¸Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾.\n"
+"  Ð¿Ñ€Ð²Ð¾ Ð¿Ð¾Ñ˜Ð°Ð²Ñ™Ð¸Ð²Ð°ÑšÐµ: %B: â€žARMâ€œ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ð½Ð° â€žThumbâ€œ"
+
+#: elf32-arm.c:3988 elf32-arm.c:5433
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:2324
+#, c-format
+msgid "%s: cannot create stub entry %s"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ Ð¿Ñ€Ð¸Ð²Ð¸Ð´Ð½Ð¸ ÑƒÐ½Ð¾Ñ� â€ž%sâ€œ"
+
+#: elf32-arm.c:5549
+#, c-format
+msgid "unable to find THUMB glue '%s' for '%s'"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žTHUMBâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ"
+
+#: elf32-arm.c:5585
+#, c-format
+msgid "unable to find ARM glue '%s' for '%s'"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ð½Ð°Ñ’ÐµÐ¼ â€žARMâ€œ Ð»ÐµÐ¿Ð°Ðº â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ"
+
+#: elf32-arm.c:6123
+msgid "%B: BE8 images only valid in big-endian mode."
+msgstr "%B: â€žBE8â€œ Ñ�Ð»Ð¸ÐºÐµ Ñ�Ñƒ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ðµ Ñ�Ð°Ð¼Ð¾ Ñƒ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸."
+
+#. Give a warning, but do as the user requests anyway.
+#: elf32-arm.c:6353
+msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ð¾ Ñ€ÐµÑˆÐµÑšÐµ â€žVFP11â€œ Ð³Ñ€ÐµÑˆÐ°ÐºÐ° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð½Ð¾ Ð·Ð° Ñ†Ð¸Ñ™Ð½Ñƒ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ñƒ"
+
+#: elf32-arm.c:6897 elf32-arm.c:6917
+msgid "%B: unable to find VFP11 veneer `%s'"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ â€žVFP11â€œ Ð¿Ñ€ÐµÐ²Ð»Ð°ÐºÑƒ â€ž%sâ€œ"
+
+#: elf32-arm.c:6966
+#, c-format
+msgid "Invalid TARGET2 relocation type '%s'."
+msgstr "Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° â€žTARGET2â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ."
+
+#. PR ld/16017: Do not generate ARM instructions for
+#. the PLT if compiling for a thumb-only target.
+#.
+#. FIXME: We ought to be able to generate thumb PLT instructions...
+#: elf32-arm.c:7696
+msgid "%B: Warning: thumb mode PLT generation not currently supported"
+msgstr "%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žPLTâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐµ Ñƒ â€žthumbâ€œ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: elf32-arm.c:7909
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žThumbâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ñƒ â€žTLSâ€œ Ñ‚Ñ€Ð°Ð¼Ð±ÑƒÐ»Ð¸Ð½Ð¸"
+
+#: elf32-arm.c:7948
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žARMâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ñƒ â€žTLSâ€œ Ñ‚Ñ€Ð°Ð¼Ð±ÑƒÐ»Ð¸Ð½Ð¸"
+
+#: elf32-arm.c:8412
+msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
+msgstr "\\%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€žArm BLXâ€œ Ñ†Ð¸Ñ™Ð° Ð½Ð° Ð�Ñ€Ð¼ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ."
+
+#: elf32-arm.c:8831
+msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgstr "%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žThumb BLXâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ†Ð¸Ñ™Ð° Ð½Ð° â€žthumbâ€œ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ."
+
+#: elf32-arm.c:9672
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žThumbâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ð½Ð° ÐºÐ¾Ñ˜Ñƒ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žTLS_GOTDESCâ€œ"
+
+#: elf32-arm.c:9695
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° â€žARMâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° â€ž0x%xâ€œ Ð½Ð° ÐºÐ¾Ñ˜Ñƒ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žTLS_GOTDESCâ€œ"
+
+#: elf32-arm.c:9724
+msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): â€žR_ARM_TLS_LE32â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-arm.c:9937
+msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"
+msgstr "%B(%A+0x%lx): Ð”Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ðµ Ñ�Ñƒ Ñ�Ð°Ð¼Ð¾ â€žADDâ€œ Ð¸Ð»Ð¸ â€žSUBâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€žALUâ€œ Ð³Ñ€ÑƒÐ¿Ðµ"
+
+#: elf32-arm.c:9977 elf32-arm.c:10065 elf32-arm.c:10149 elf32-arm.c:10235
+msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
+msgstr "%B(%A+0x%lx): ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð·Ð° Ð²Ñ€ÐµÐ¼Ðµ Ð´ÐµÑ™ÐµÑšÐ° 0x%lx Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð³Ñ€ÑƒÐ¿Ðµ â€ž%sâ€œ"
+
+#: elf32-arm.c:10474 elf32-sh.c:3994 elf64-sh64.c:1544
+msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
+msgstr "%B(%A+0x%lx): â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSEC_MERGEâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°"
+
+#: elf32-arm.c:10585 elf32-m68k.c:4155 elf32-xtensa.c:2799
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4192
+msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
+msgstr "%B(%A+0x%lx): â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ�Ð° â€žTLSâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%sâ€œ"
+
+#: elf32-arm.c:10586 elf32-m68k.c:4156 elf32-xtensa.c:2800
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4193
+msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
+msgstr "%B(%A+0x%lx): â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ñ™ÐµÐ½Ð¾ Ñ�Ð° â€žÐ½Ðµ-TLSâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%sâ€œ"
+
+#: elf32-arm.c:10666 elf32-tic6x.c:2736
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4481
+msgid "out of range"
+msgstr "Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf32-arm.c:10670 elf32-nios2.c:3525 elf32-tic6x.c:2740
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4485
+msgid "unsupported relocation"
+msgstr "Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-arm.c:10678 elf32-nios2.c:3535 elf32-tic6x.c:2748
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4493
+msgid "unknown error"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°"
+
+#: elf32-arm.c:11153
+msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð§Ð¸Ñ�Ñ‚Ð¸Ð¼ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ñƒ Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð° Ð·Ð° â€ž%Bâ€œ Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð½ÐµÐ¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²ÐµÐ½Ð¸ ÐºÐ¾Ð´ Ñƒ â€ž%Bâ€œ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½ Ñ�Ð° ÑšÐ¸Ð¼"
+
+#: elf32-arm.c:11240
+msgid "%B: Unknown mandatory EABI object attribute %d"
+msgstr "%B: ÐžÐ±Ð°Ð²ÐµÐ·Ð°Ð½ â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: elf32-arm.c:11248
+msgid "Warning: %B: Unknown EABI object attribute %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: elf32-arm.c:11449
+msgid "error: %B: Unknown CPU architecture"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð°"
+
+#: elf32-arm.c:11487
+msgid "error: %B: Conflicting CPU architectures %d/%d"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð�Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ðµ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð° %d/%d Ñ�Ñƒ Ñƒ Ñ�ÑƒÐºÐ¾Ð±Ñƒ"
+
+#: elf32-arm.c:11576
+msgid "Error: %B has both the current and legacy Tag_MPextension_use attributes"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð¿Ð¾Ñ�ÐµÐ´ÑƒÑ˜Ðµ Ð¸ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¸ Ð¸ Ñ�Ñ‚Ð°Ñ€Ð¸ â€žTag_MPextension_useâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚"
+
+#: elf32-arm.c:11601
+msgid "error: %B uses VFP register arguments, %B does not"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ðµ â€žVFPâ€œ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°, Ð° â€ž%Bâ€œ Ð½Ðµ"
+
+#: elf32-arm.c:11747
+msgid "error: %B: unable to merge virtualization attributes with %B"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ð¿Ð¾Ñ˜Ð¸Ð¼ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚Ðµ Ð²Ð¸Ñ€Ñ‚ÑƒÐµÐ»Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ðµ Ñ�Ð° â€ž%Bâ€œ"
+
+#: elf32-arm.c:11773
+msgid "error: %B: Conflicting architecture profiles %c/%c"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð£ Ñ�ÑƒÐºÐ¾Ð±Ñƒ Ñ�Ñƒ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð¸ Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ðµ â€ž%c/%câ€œ"
+
+#: elf32-arm.c:11877
+msgid "Warning: %B: Conflicting platform configuration"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: ÐŸÐ¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ðµ Ñ˜Ðµ Ñƒ Ñ�ÑƒÐºÐ¾Ð±Ñƒ"
+
+#: elf32-arm.c:11886
+msgid "error: %B: Conflicting use of R9"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð£ Ñ�Ð¸ÐºÐ¾Ð±Ñƒ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ â€žR9â€œ"
+
+#: elf32-arm.c:11898
+msgid "error: %B: SB relative addressing conflicts with use of R9"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ â€žSBâ€œ Ð°Ð´Ñ€ÐµÑ�Ð¸Ñ€Ð°ÑšÐµ Ñ˜Ðµ Ñƒ Ñ�ÑƒÐºÐ¾Ð±Ñƒ Ñ�Ð° ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµÐ¼ â€žR9â€œ"
+
+#: elf32-arm.c:11911
+msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %u-Ð±Ð°Ñ˜Ñ‚Ð½Ð¸ â€žwchar_tâ€œ Ð¾Ð½Ð´Ð° Ñ›Ðµ Ð¸Ð·Ð»Ð°Ð· Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %u-Ð±Ð°Ñ˜Ñ‚Ð½Ð¸ â€žwchar_tâ€œ. ÐšÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ â€žwchar_tâ€œ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ ÐºÑ€Ð¾Ð· Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð½ÐµÑ›Ðµ ÑƒÑ�Ð¿ÐµÑ‚Ð¸"
+
+#: elf32-arm.c:11942
+msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %s Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ° Ð¾Ð½Ð´Ð° Ñ›Ðµ Ð¸Ð·Ð»Ð°Ð· Ð´Ð° ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ %s Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ°. ÐšÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð½Ð°Ð±Ñ€Ð°Ñ˜Ð°ÑšÐ° ÐºÑ€Ð¾Ð· Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð½ÐµÑ›Ðµ ÑƒÑ�Ð¿ÐµÑ‚Ð¸"
+
+#: elf32-arm.c:11954
+msgid "error: %B uses iWMMXt register arguments, %B does not"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ðµ â€žiWMMXtâ€œ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°, Ð° â€ž%Bâ€œ Ð½Ðµ"
+
+#: elf32-arm.c:11971
+msgid "error: fp16 format mismatch between %B and %B"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€žfp16â€œ Ð·Ð°Ð¿Ð¸Ñ� Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ñ‚Ð¸ Ð·Ð° â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ"
+
+#: elf32-arm.c:12007
+msgid "%B has has both the current and legacy Tag_MPextension_use attributes"
+msgstr "â€ž%Bâ€œ Ð¿Ð¾Ñ�ÐµÐ´ÑƒÑ˜Ðµ Ð¸ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¸ Ð¸ Ñ�Ñ‚Ð°Ñ€Ð¸ â€žTag_MPextension_useâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚"
+
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#. Ignore init flag - it may not be set, despite the flags field containing valid data.
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#: elf32-arm.c:12095 elf32-bfin.c:4949 elf32-cris.c:4139 elf32-m68hc1x.c:1427
+#: elf32-m68k.c:1195 elf32-score.c:4004 elf32-score7.c:3808 elf32-vax.c:529
+#: elf32-xgate.c:674 elfxx-mips.c:14955
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4645
+#, c-format
+msgid "private flags = %lx:"
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lx:"
+
+#: elf32-arm.c:12104
+#, c-format
+msgid " [interworking enabled]"
+msgstr " [Ð¼ÐµÑ’ÑƒÐ´ÐµÑ˜Ñ�Ñ‚Ð²Ð¾ Ñ˜Ðµ ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¾]"
+
+#: elf32-arm.c:12112
+#, c-format
+msgid " [VFP float format]"
+msgstr " [â€žVFPâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°]"
+
+#: elf32-arm.c:12114
+#, c-format
+msgid " [Maverick float format]"
+msgstr " [â€žMaverickâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°]"
+
+#: elf32-arm.c:12116
+#, c-format
+msgid " [FPA float format]"
+msgstr " [â€žFPAâ€œ Ð·Ð°Ð¿Ð¸Ñ� Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°]"
+
+#: elf32-arm.c:12125
+#, c-format
+msgid " [new ABI]"
+msgstr " [Ð½Ð¾Ð²Ð¸ â€žABIâ€œ]"
+
+#: elf32-arm.c:12128
+#, c-format
+msgid " [old ABI]"
+msgstr " [Ñ�Ñ‚Ð°Ñ€Ð¸ â€žABIâ€œ]"
+
+#: elf32-arm.c:12131
+#, c-format
+msgid " [software FP]"
+msgstr " [Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·]"
+
+#: elf32-arm.c:12140
+#, c-format
+msgid " [Version1 EABI]"
+msgstr " [Ð˜Ð·Ð´Ð°ÑšÐµ1 â€žEABIâ€œ]"
+
+#: elf32-arm.c:12143 elf32-arm.c:12154
+#, c-format
+msgid " [sorted symbol table]"
+msgstr " [Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ñ€ÐµÑ’ÐµÐ½Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°]"
+
+#: elf32-arm.c:12145 elf32-arm.c:12156
+#, c-format
+msgid " [unsorted symbol table]"
+msgstr " [Ñ‚Ð°Ð±ÐµÐ»Ð° Ð½ÐµÑ�Ñ€ÐµÑ’ÐµÐ½Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°]"
+
+#: elf32-arm.c:12151
+#, c-format
+msgid " [Version2 EABI]"
+msgstr " [Ð˜Ð·Ð´Ð°ÑšÐµ2 â€žEABIâ€œ]"
+
+#: elf32-arm.c:12159
+#, c-format
+msgid " [dynamic symbols use segment index]"
+msgstr " [Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ðµ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°]"
+
+#: elf32-arm.c:12162
+#, c-format
+msgid " [mapping symbols precede others]"
+msgstr " [Ð¼Ð°Ð¿Ð¸Ñ€Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð¸ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð°]"
+
+#: elf32-arm.c:12169
+#, c-format
+msgid " [Version3 EABI]"
+msgstr " [Ð˜Ð·Ð´Ð°ÑšÐµ3 â€žEABIâ€œ]"
+
+#: elf32-arm.c:12173
+#, c-format
+msgid " [Version4 EABI]"
+msgstr " [Ð˜Ð·Ð´Ð°ÑšÐµ4 â€žEABIâ€œ]"
+
+#: elf32-arm.c:12177
+#, c-format
+msgid " [Version5 EABI]"
+msgstr " [Ð˜Ð·Ð´Ð°ÑšÐµ5 â€žEABIâ€œ]"
+
+#: elf32-arm.c:12180
+#, c-format
+msgid " [soft-float ABI]"
+msgstr " [â€žABIâ€œ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¾Ð³ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°]"
+
+#: elf32-arm.c:12183
+#, c-format
+msgid " [hard-float ABI]"
+msgstr " [â€žABIâ€œ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¾Ð³ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°]"
+
+#: elf32-arm.c:12189
+#, c-format
+msgid " [BE8]"
+msgstr " [BE8]"
+
+#: elf32-arm.c:12192
+#, c-format
+msgid " [LE8]"
+msgstr " [LE8]"
+
+#: elf32-arm.c:12198
+#, c-format
+msgid " <EABI version unrecognised>"
+msgstr " <Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ>"
+
+#: elf32-arm.c:12205
+#, c-format
+msgid " [relocatable executable]"
+msgstr " [Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð°]"
+
+#: elf32-arm.c:12208
+#, c-format
+msgid " [has entry point]"
+msgstr " [Ð¸Ð¼Ð° Ñ‚Ð°Ñ‡ÐºÑƒ ÑƒÐ»Ð°Ð·Ð°]"
+
+#: elf32-arm.c:12213 /src/binutils-gdb/bfd/elfnn-aarch64.c:4648
+#, c-format
+msgid "<Unrecognised flag bits set>"
+msgstr "<Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ñ�ÐºÑƒÐ¿ Ð±Ð¸Ñ‚Ð¾Ð²Ð° Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ>"
+
+#: elf32-arm.c:12522 elf32-i386.c:1452 elf32-s390.c:1005 elf32-tic6x.c:2812
+#: elf32-tilepro.c:1511 elf32-xtensa.c:999 elf64-s390.c:927
+#: elf64-x86-64.c:1467 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:5038
+msgid "%B: bad symbol index: %d"
+msgstr "%B: Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: %d"
+
+#: elf32-arm.c:12674 elf32-metag.c:2283 elf64-x86-64.c:1593
+#: elf64-x86-64.c:1771 elfxx-mips.c:8482
+msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf32-arm.c:13796
+#, c-format
+msgid "Errors encountered processing file %s"
+msgstr "Ð�Ð°Ð¸Ñ’Ð¾Ñ… Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐµ Ñ‚Ð¾ÐºÐ¾Ð¼ Ð¾Ð±Ñ€Ð°Ð´Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€ž%sâ€œ"
+
+#: elf32-arm.c:14230
+#, c-format
+msgid "error: required section '%s' not found in the linker script"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñ‚Ñ€Ð°Ð¶ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: elf32-arm.c:15252
+msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: ÐžÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€ÐµÑˆÐºÐµ ÐšÐ¾Ñ€Ñ‚ÐµÐºÑ�Ð° Ð�8 Ñ˜Ðµ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½ Ð½ÐµÐ±ÐµÐ·Ð±ÐµÐ´Ð½Ð¾Ñ˜ Ð»Ð¾ÐºÐ°Ñ†Ð¸Ñ˜Ð¸"
+
+#. There's not much we can do apart from complain if this
+#. happens.
+#: elf32-arm.c:15279
+msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: ÐžÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€ÐµÑˆÐºÐµ ÐšÐ¾Ñ€Ñ‚ÐµÐºÑ�Ð° Ð�8 Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (ÑƒÐ»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ°)"
+
+#: elf32-arm.c:15373 elf32-arm.c:15395
+msgid "%B: error: VFP11 veneer out of range"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: â€žVFP11â€œ Ð¿Ñ€ÐµÐ²Ð»Ð°ÐºÐ° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf32-arm.c:16020
+msgid "error: %B is already in final BE8 format"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð²ÐµÑ› Ñƒ Ð·Ð°Ð²Ñ€ÑˆÐ½Ð¾Ð¼ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ â€žBE8â€œ"
+
+#: elf32-arm.c:16096
+msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð˜Ð·Ð²Ð¾Ñ€Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %d, Ð°Ð»Ð¸ Ñ†Ð¸Ñ™Ð½Ð¸ â€ž%Bâ€œ Ð¸Ð¼Ð° â€žEABIâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ %d"
+
+#: elf32-arm.c:16112
+msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° â€žAPCS-%dâ€œ, Ð´Ð¾Ðº Ñ†Ð¸Ñ™Ð½Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žAPCS-%dâ€œ"
+
+#: elf32-arm.c:16137
+msgid "error: %B uses VFP instructions, whereas %B does not"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žVFPâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½Ðµ"
+
+#: elf32-arm.c:16141
+msgid "error: %B uses FPA instructions, whereas %B does not"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žFPAâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½Ðµ"
+
+#: elf32-arm.c:16151
+msgid "error: %B uses Maverick instructions, whereas %B does not"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žMaverickâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð½Ðµ"
+
+#: elf32-arm.c:16155
+msgid "error: %B does not use Maverick instructions, whereas %B does"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð½Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žMaverickâ€œ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ, Ð°Ð»Ð¸ â€ž%Bâ€œ Ð´Ð°"
+
+#: elf32-arm.c:16174
+msgid "error: %B uses software FP, whereas %B uses hardware FP"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸"
+
+#: elf32-arm.c:16178
+msgid "error: %B uses hardware FP, whereas %B uses software FP"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸"
+
+#: elf32-avr.c:1264 elf32-bfin.c:3228 elf32-cris.c:2024 elf32-epiphany.c:568
+#: elf32-fr30.c:597 elf32-frv.c:4047 elf32-i860.c:1220 elf32-ip2k.c:1479
+#: elf32-iq2000.c:696 elf32-m32c.c:561 elf32-mep.c:543 elf32-metag.c:2000
+#: elf32-moxie.c:290 elf32-msp430.c:1325 elf32-mt.c:399 elf32-openrisc.c:412
+#: elf32-tilepro.c:3674 elf32-v850.c:2289 elf32-xstormy16.c:944
+#: elf64-mmix.c:1546 elfxx-tilegx.c:4059
+msgid "internal error: dangerous relocation"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-avr.c:2476 elf32-hppa.c:578 elf32-m68hc1x.c:160 elf32-metag.c:1197
+#: elf32-nios2.c:1357
+msgid "%B: cannot create stub entry %s"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ"
+
+#: elf32-bfin.c:107 elf32-bfin.c:363
+msgid "relocation should be even number"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ‚Ñ€ÐµÐ±Ð° Ð±Ð¸Ñ‚Ð¸ Ð¿Ð°Ñ€Ð°Ð½ Ð±Ñ€Ð¾Ñ˜"
+
+#: elf32-bfin.c:1601
+msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
+msgstr "%B(%A+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-bfin.c:1634 elf32-i386.c:4406 elf32-m68k.c:4197 elf32-s390.c:3364
+#: elf64-s390.c:3290 elf64-x86-64.c:4506
+msgid "%B(%A+0x%lx): reloc against `%s': error %d"
+msgstr "%B(%A+0x%lx): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d"
+
+#: elf32-bfin.c:2732
+msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° â€ž%A+0x%xâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼"
+
+#: elf32-bfin.c:2748
+msgid "relocation references symbol not defined in the module"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ Ð¼Ð¾Ð´ÑƒÐ»Ñƒ"
+
+#: elf32-bfin.c:2845
+msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
+msgstr "â€žR_BFIN_FUNCDESCâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼"
+
+#: elf32-bfin.c:2886 elf32-bfin.c:3009
+msgid "cannot emit fixups in read-only section"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ"
+
+#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-lm32.c:1095 elf32-sh.c:4913
+msgid "cannot emit dynamic relocations in read-only section"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ"
+
+#: elf32-bfin.c:2967
+msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
+msgstr "â€žR_BFIN_FUNCDESC_VALUEâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼"
+
+#: elf32-bfin.c:3132
+msgid "relocations between different segments are not supported"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð¸Ñ… Ñ�ÐµÐ³Ð¼ÐµÐ½Ð°Ñ‚Ð° Ð½Ð¸Ñ�Ñƒ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°"
+
+#: elf32-bfin.c:3133
+msgid "warning: relocation references a different segment"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð¸ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚"
+
+#: elf32-bfin.c:4907
+msgid "%B: unsupported relocation type %i"
+msgstr "%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%iâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°"
+
+#: elf32-bfin.c:4995 elf32-frv.c:6600
+#, c-format
+msgid "%s: cannot link non-fdpic object file into fdpic executable"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ð½Ðµ-â€žfdpicâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ â€žfdpicâ€œ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ñƒ"
+
+#: elf32-bfin.c:4999 elf32-frv.c:6604
+#, c-format
+msgid "%s: cannot link fdpic object file into non-fdpic executable"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ â€žfdpicâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ Ð½Ðµ-â€žfdpicâ€œ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ñƒ"
+
+#: elf32-bfin.c:5153
+#, c-format
+msgid "*** check this relocation %s"
+msgstr "*** Ð¿Ñ€Ð¾Ð²ÐµÑ€Ð°Ð²Ð° Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ"
+
+#: elf32-cris.c:1110
+msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-cris.c:1172
+msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð�ÐµÐ¼Ð° Ð½Ð¸ â€žPLTâ€œ Ð½Ð¸ â€žGOTâ€œ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-cris.c:1174
+msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð�ÐµÐ¼Ð° â€žPLTâ€œ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-cris.c:1180 elf32-cris.c:1313 elf32-cris.c:1573 elf32-cris.c:1656
+#: elf32-cris.c:1809 elf32-tic6x.c:2645
+msgid "[whose name is lost]"
+msgstr "[Ñ‡Ð¸Ñ˜Ð¸ Ð½Ð°Ð·Ð¸Ð² Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ñ™ÐµÐ½]"
+
+#: elf32-cris.c:1299 elf32-tic6x.c:2630
+msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼ %d Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elf32-cris.c:1307 elf32-cris.c:1650 elf32-cris.c:1803 elf32-tic6x.c:2638
+msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼ %d Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-cris.c:1333
+msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ð¾ Ð·Ð° Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: â€ž%sâ€œ"
+
+#: elf32-cris.c:1349
+msgid "%B, section %A: relocation %s with no GOT created"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð±ÐµÐ· Ñ�Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð¾Ð³ â€žGOTâ€œ"
+
+#. We shouldn't get here for GCC-emitted code.
+#: elf32-cris.c:1564
+msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ñƒ ÑƒÐ¿ÑƒÑ‚Ñƒ ÐºÐ° â€ž%sâ€œ, Ð¼Ð¾Ð¶Ð´Ð° Ñ˜Ðµ Ð´Ð¾ÑˆÐ»Ð¾ Ð´Ð¾ Ð¼ÐµÑˆÐ°ÑšÐ° Ð´ÐµÐºÐ»Ð°Ñ€Ð°Ñ†Ð¸Ñ˜Ðµ?"
+
+#: elf32-cris.c:1937
+msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?"
+msgstr "â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ, ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ð¸Ð·Ð²Ð°Ð½ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°, Ð¼Ð¾Ð¶Ð´Ð° Ñ˜Ðµ Ð´Ð¾ÑˆÐ»Ð¾ Ð´Ð¾ Ð¼ÐµÑˆÐ°ÑšÐ° Ð´ÐµÐºÐ»Ð°Ñ€Ð°Ñ†Ð¸Ñ˜Ðµ?"
+
+#: elf32-cris.c:1990
+msgid "(too many global variables for -fpic: recompile with -fPIC)"
+msgstr "(Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð¿ÑˆÑ‚Ð¸Ñ… Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð¸Ñ… Ð·Ð° â€ž-fpicâ€œ: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ)"
+
+#: elf32-cris.c:1997
+msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)"
+msgstr "(Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸ Ð½Ð¸Ñ‚Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸ÐºÐ¸ Ð·Ð° â€ž-fpicâ€œ Ð¸Ð»Ð¸ â€ž-msmall-tlsâ€œ: Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ Ð¸Ð»Ð¸ â€ž-mno-small-tlsâ€œ)"
+
+#: elf32-cris.c:3234
+msgid ""
+"%B, section %A:\n"
+"  v10/v32 compatible object %s must not contain a PIC relocation"
+msgstr ""
+"â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:\n"
+"  v10/v32 Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ â€ž%sâ€œ Ð½Ðµ Ñ�Ð¼Ðµ Ð´Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-cris.c:3342
+msgid ""
+"%B, section %A:\n"
+"  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC"
+msgstr ""
+"â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:\n"
+"  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ñ‚Ð¸Ð¿Ð¸Ñ‡Ð½Ð¾ Ð¼ÐµÑˆÐ°ÑšÐµ Ð¾Ð¿Ñ†Ð¸Ñ˜Ð°, Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf32-cris.c:3556
+msgid ""
+"%B, section %A:\n"
+"  relocation %s should not be used in a shared object; recompile with -fPIC"
+msgstr ""
+"â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ:\n"
+"  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ðµ Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ñ�Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf32-cris.c:3978
+msgid ""
+"%B, section `%A', to symbol `%s':\n"
+"  relocation %s should not be used in a shared object; recompile with -fPIC"
+msgstr ""
+"â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ, ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ:\n"
+"  Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ðµ Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ñ�Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf32-cris.c:4091
+msgid "Unexpected machine number"
+msgstr "Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð¼Ð°ÑˆÐ¸Ð½Ñ�ÐºÐ¸ Ð±Ñ€Ð¾Ñ˜"
+
+#: elf32-cris.c:4142
+#, c-format
+msgid " [symbols have a _ prefix]"
+msgstr " [Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ðµ Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ðµ â€ž _ â€œ]"
+
+#: elf32-cris.c:4145
+#, c-format
+msgid " [v10 and v32]"
+msgstr " [v10 Ð¸ v32]"
+
+#: elf32-cris.c:4148
+#, c-format
+msgid " [v32]"
+msgstr " [v32]"
+
+#: elf32-cris.c:4191
+msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgstr "%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ Ñ�Ð° Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð¾Ð¼ â€ž_â€œ, Ð°Ð»Ð¸ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÑ˜Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ñ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸Ð¼Ð° Ð±ÐµÐ· Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð°"
+
+#: elf32-cris.c:4192
+msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgstr "%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ Ð±ÐµÐ· Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð°, Ð°Ð»Ð¸ Ð·Ð°Ð¿Ð¸Ñ�ÑƒÑ˜Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ Ñ�Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¸Ð¼Ð° Ñ�Ð° Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ�Ð¾Ð¼ â€ž_â€œ"
+
+#: elf32-cris.c:4211
+msgid "%B contains CRIS v32 code, incompatible with previous objects"
+msgstr "â€ž%Bâ€ž Ñ�Ð°Ð´Ñ€Ð¶Ð¸ â€žCRIS v32â€œ ÐºÐ¾Ð´ ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-cris.c:4213
+msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
+msgstr "â€ž%Bâ€ž Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-â€žCRIS-v32â€œ ÐºÐ¾Ð´ ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð°Ð½ Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-dlx.c:142
+#, c-format
+msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð” Ð²ÐµÐ·Ðµ: Ð³Ñ€Ð°Ð½Ð°ÑšÐµ (PC rel16) Ñƒ Ð¾Ð´ÐµÑ™Ð°Ðº (%s) Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: elf32-dlx.c:204
+#, c-format
+msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ° Ð‘Ð¤Ð” Ð²ÐµÐ·Ðµ: ÑƒÑ�ÐºÐ°ÐºÐ°ÑšÐµ (PC rel26) Ñƒ Ð¾Ð´ÐµÑ™Ð°Ðº (%s) Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#. Only if it's not an unresolved symbol.
+#: elf32-epiphany.c:564 elf32-ip2k.c:1475
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ñ€Ð°Ð·Ð¼Ð°ÐºÐ° Ð°Ð´Ñ€ÐµÑ�Ðµ â€ždata/insnâ€œ"
+
+#: elf32-frv.c:1460 elf32-frv.c:1609
+msgid "relocation requires zero addend"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº"
+
+#: elf32-frv.c:2822
+msgid "%H: relocation to `%s+%v' may have caused the error above\n"
+msgstr "%H: â€žÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%s+%vâ€œ Ñ˜Ðµ Ð¼Ð¾Ð¶Ð´Ð° Ð¿Ñ€Ð¾ÑƒÐ·Ñ€Ð¾ÐºÐ¾Ð²Ð°Ð»Ð¾ Ð³Ð¾Ñ€ÑšÑƒ Ð³Ñ€ÐµÑˆÐºÑƒ\n"
+
+#: elf32-frv.c:2839
+msgid "%H: relocation references symbol not defined in the module\n"
+msgstr "%H: â€žÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÐºÐ¾Ñ˜Ð¸ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ Ð¼Ð¾Ð´ÑƒÐ»Ñƒ\n"
+
+#: elf32-frv.c:2915
+msgid "%H: R_FRV_GETTLSOFF not applied to a call instruction\n"
+msgstr "%H: â€žR_FRV_GETTLSOFFâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ Ð¿Ð¾Ð·Ð¸Ð²Ð°\n"
+
+#: elf32-frv.c:2956
+msgid "%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSDESC12â€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žlddiâ€œ\n"
+
+#: elf32-frv.c:3027
+msgid "%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSDESCHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ\n"
+
+#: elf32-frv.c:3064
+msgid "%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSDESCLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ\n"
+
+#: elf32-frv.c:3111
+msgid "%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction\n"
+msgstr "%H: â€žR_FRV_TLSDESC_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žlddâ€œ\n"
+
+#: elf32-frv.c:3195
+msgid "%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction\n"
+msgstr "%H: â€žR_FRV_GETTLSOFF_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žcalllâ€œ\n"
+
+#: elf32-frv.c:3249
+msgid "%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSOFF12â€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žldiâ€œ\n"
+
+#: elf32-frv.c:3279
+msgid "%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSOFFHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ\n"
+
+#: elf32-frv.c:3308
+msgid "%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: â€žR_FRV_GOTTLSOFFLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ\n"
+
+#: elf32-frv.c:3338
+msgid "%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction\n"
+msgstr "%H: â€žR_FRV_TLSOFF_RELAXâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žldâ€œ\n"
+
+#: elf32-frv.c:3383
+msgid "%H: R_FRV_TLSMOFFHI not applied to a sethi instruction\n"
+msgstr "%H: â€žR_FRV_TLSMOFFHIâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsethiâ€œ\n"
+
+#: elf32-frv.c:3410
+msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "R_FRV_TLSMOFFLOâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€žsetloâ€œ Ð¸Ð»Ð¸ â€žsetlosâ€œ\n"
+
+#: elf32-frv.c:3531
+msgid "%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend\n"
+msgstr "%H: â€žR_FRV_FUNCDESCâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼\n"
+
+#: elf32-frv.c:3572 elf32-frv.c:3694
+msgid "%H: cannot emit fixups in read-only section\n"
+msgstr "%H: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ\n"
+
+#: elf32-frv.c:3603 elf32-frv.c:3737
+msgid "%H: cannot emit dynamic relocations in read-only section\n"
+msgstr "%H: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾ÑˆÐ°Ñ™ÐµÐ¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ\n"
+
+#: elf32-frv.c:3652
+msgid "%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend\n"
+msgstr "%H: â€žR_FRV_FUNCDESC_VALUEâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼\n"
+
+#: elf32-frv.c:3908
+msgid "%H: reloc against `%s' references a different segment\n"
+msgstr "%H: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°\n"
+
+#: elf32-frv.c:4058
+msgid "%H: reloc against `%s': %s\n"
+msgstr "%H: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: %s\n"
+
+#: elf32-frv.c:6265
+msgid "%B: unsupported relocation type %i\n"
+msgstr "%B: Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%iâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°\n"
+
+#: elf32-frv.c:6514
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž%sâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ðµ Ð½Ðµ-â€žPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-frv.c:6567 elf32-iq2000.c:828 elf32-m32c.c:812
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž%sâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ Ñ�Ð° â€ž%sâ€œ"
+
+#: elf32-frv.c:6579
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)"
+
+#: elf32-frv.c:6627 elf32-iq2000.c:865 elf32-m32c.c:848 elf32-mt.c:561
+#: elf32-rl78.c:1069 elf32-rx.c:3040 elf64-ppc.c:5839
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = 0x%lx:"
+
+#: elf32-gen.c:69 elf64-gen.c:69
+msgid "%B: Relocations in generic ELF (EM: %d)"
+msgstr "%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð¿ÑˆÑ‚ÐµÐ¼ â€žELFâ€œ-Ñƒ (EM: %d)"
+
+#: elf32-hppa.c:830 elf32-hppa.c:3592
+msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+msgstr "%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ñ�Ñ‚Ð¸Ð³Ð½ÐµÐ¼ â€ž%sâ€œ, Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-ffunction-sectionsâ€œ"
+
+#: elf32-hppa.c:1268
+msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf32-hppa.c:2781
+msgid "%B: duplicate export stub %s"
+msgstr "%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡Ð¸ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð¸Ð·Ð²Ð¾Ð·Ð° â€ž%sâ€œ"
+
+#: elf32-hppa.c:3427
+msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
+msgstr "%B(%A+0x%lx): Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° â€ž%sâ€œ Ð·Ð° â€žinsn 0x%xâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ñƒ Ð½Ðµ-Ð´ÐµÑ™ÐµÐ½Ð¾Ñ˜ Ð²ÐµÐ·Ð¸"
+
+#: elf32-hppa.c:4279
+msgid "%B(%A+0x%lx): cannot handle %s for %s"
+msgstr "%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ"
+
+#: elf32-hppa.c:4598
+msgid ".got section not immediately after .plt section"
+msgstr "Ð¾Ð´ÐµÑ™Ð°Ðº â€ž.gotâ€œ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ð¼Ð°Ñ… Ð½Ð°ÐºÐ¾Ð½ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pltâ€œ"
+
+#. Unknown relocation.
+#: elf32-i386.c:380 elf32-m68k.c:353 elf32-ppc.c:2035 elf32-s390.c:345
+#: elf32-tic6x.c:2667 elf64-ppc.c:2427 elf64-s390.c:371 elf64-x86-64.c:281
+msgid "%B: invalid relocation type %d"
+msgstr "%B: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: elf32-i386.c:1394 elf64-x86-64.c:1410
+msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed"
+msgstr "%B: Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ¾ â€žTLSâ€œ Ð¿Ñ€ÐµÐ»Ð°Ð· Ñ�Ð° â€ž%sâ€œ Ð½Ð° â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð¿Ñ€Ð¸ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ"
+
+#: elf32-i386.c:1642 elf32-s390.c:1233 elf32-sh.c:6263 elf32-tilepro.c:1627
+#: elf32-xtensa.c:1176 elf64-s390.c:1166 elfxx-sparc.c:1596
+#: elfxx-tilegx.c:1836
+msgid "%B: `%s' accessed both as normal and thread local symbol"
+msgstr "%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸"
+
+#: elf32-i386.c:2500 elf64-x86-64.c:2582
+msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"
+msgstr "%P: %B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ.\n"
+
+#: elf32-i386.c:2740 elf64-x86-64.c:2820
+msgid "%P: %B: warning: relocation in readonly section `%A'.\n"
+msgstr "%P: %B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ.\n"
+
+#: elf32-i386.c:3207 elf32-tilepro.c:2873 elf64-x86-64.c:3275
+#: elfxx-tilegx.c:3172 /src/binutils-gdb/bfd/elfnn-aarch64.c:4099
+msgid "%B: unrecognized relocation (0x%x) in section `%A'"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ (0x%x) Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ"
+
+#: elf32-i386.c:3368 elf64-x86-64.c:3380 elfxx-sparc.c:3150
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:3496
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð¾Ð´Ñ€Ð°Ð´Ð¸"
+
+#: elf32-i386.c:3610 elf64-x86-64.c:3777
+msgid "hidden symbol"
+msgstr "Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: elf32-i386.c:3613 elf64-x86-64.c:3780
+msgid "internal symbol"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: elf32-i386.c:3616 elf64-x86-64.c:3783
+msgid "protected symbol"
+msgstr "Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: elf32-i386.c:3619 elf64-x86-64.c:3786
+msgid "symbol"
+msgstr "Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: elf32-i386.c:3624
+msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_386_GOTOFFâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ %s â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚"
+
+#: elf32-i386.c:3635
+msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_386_GOTOFFâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚"
+
+#: elf32-i386.c:4923 elf32-tilepro.c:3923 elf64-x86-64.c:4964
+#: elfxx-tilegx.c:4326 /src/binutils-gdb/bfd/elfnn-aarch64.c:7105
+#, c-format
+msgid "discarded output section: `%A'"
+msgstr "Ð¾Ð´Ð±Ð°Ñ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ð¸Ð·Ð»Ð°Ð·Ð°: â€ž%Aâ€œ"
+
+#: elf32-ip2k.c:857 elf32-ip2k.c:863 elf32-ip2k.c:930 elf32-ip2k.c:936
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr "Ñ€ÐµÐ»Ð°ÐºÑ�ÐµÑ€ â€žip2kâ€œ: Ð¿Ñ€ÐµÐ±Ð°Ñ†Ð¸Ð²Ð°ÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð±ÐµÐ· Ð¿Ð¾Ñ‚Ð¿ÑƒÐ½Ð¾Ð³ Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð°ÑšÐ° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ."
+
+#: elf32-ip2k.c:880 elf32-ip2k.c:963
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr "Ñ€ÐµÐ»Ð°ÐºÑ�ÐµÑ€ â€žip2kâ€œ: Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ Ñ˜Ðµ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð¿Ñ€ÐµÐ±Ð°Ñ†Ð¸Ð²Ð°Ñ‡Ð°."
+
+#: elf32-ip2k.c:1292
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ÑƒÐ²ÐµÐ·Ð¸Ð²Ð°Ñ‡ â€žip2kâ€œ: Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ Ð½Ð° 0x%08lx (Ñ†Ð¸Ñ™ = 0x%08lx)."
+
+#: elf32-ip2k.c:1308
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ÑƒÐ²ÐµÐ·Ð¸Ð²Ð°Ñ‡ â€žip2kâ€œ: Ñ�ÑƒÐ²Ð¸ÑˆÐ½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ Ð½Ð° 0x%08lx (Ñ†Ð¸Ñ™ = 0x%08lx)."
+
+#: elf32-iq2000.c:841 elf32-m32c.c:824
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)"
+
+#: elf32-lm32.c:698 elf32-nios2.c:2191
+msgid "global pointer relative relocation when _gp not defined"
+msgstr "Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: elf32-lm32.c:753 elf32-nios2.c:2623
+msgid "global pointer relative address out of range"
+msgstr "Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf32-lm32.c:1049
+msgid "internal error: addend should be zero for R_LM32_16_GOT"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ñ‚Ñ€ÐµÐ±Ð° Ð´Ð° Ð±ÑƒÐ´Ðµ Ð½ÑƒÐ»Ð° Ð·Ð° â€žR_LM32_16_GOTâ€œ"
+
+#: elf32-m32r.c:1453
+msgid "SDA relocation when _SDA_BASE_ not defined"
+msgstr "Ð¡Ð”Ð� Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÐºÐ°Ð´Ð° â€ž_SDA_BASE_â€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: elf32-m32r.c:3003
+msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
+msgstr "%B: ÐœÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%A)"
+
+#: elf32-m32r.c:3529
+msgid "%B: Instruction set mismatch with previous modules"
+msgstr "%B: Ð¡ÐºÑƒÐ¿ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°"
+
+#: elf32-m32r.c:3550 elf32-nds32.c:5636
+#, c-format
+msgid "private flags = %lx"
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lx"
+
+#: elf32-m32r.c:3555
+#, c-format
+msgid ": m32r instructions"
+msgstr ": Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32râ€œ"
+
+#: elf32-m32r.c:3556
+#, c-format
+msgid ": m32rx instructions"
+msgstr ": Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32rxâ€œ"
+
+#: elf32-m32r.c:3557
+#, c-format
+msgid ": m32r2 instructions"
+msgstr ": Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žm32r2â€œ"
+
+#: elf32-m68hc1x.c:1114
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr "Ð£Ð¿ÑƒÑ›Ð¸Ð²Ð°ÑšÐµ Ð½Ð° Ð´Ð°Ð»ÐµÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¾Ð¼ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¼Ð¾Ð¶Ðµ Ð´Ð¾Ð²ÐµÑ�Ñ‚Ð¸ Ð´Ð¾ Ð½ÐµÑ‚Ð°Ñ‡Ð½Ð¾Ð³ Ð¸Ð·Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐ°"
+
+#: elf32-m68hc1x.c:1150
+#, c-format
+msgid "XGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code."
+msgstr "Ð�Ð´Ñ€ÐµÑ�Ð° â€žXGATEâ€œ (%lx) Ð½Ð¸Ñ˜Ðµ ÑƒÐ½ÑƒÑ‚Ð°Ñ€ Ð´ÐµÑ™ÐµÐ½Ðµ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ (0xE000-0xFFFF), Ñ�Ñ‚Ð¾Ð³Ð° Ð¼Ð¾Ñ€Ð°Ñ‚Ðµ Ñ€ÑƒÑ‡Ð½Ð¾ Ð´Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð¸Ñ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ñƒ, Ð¸ Ð¿Ð¾ Ð¼Ð¾Ð³ÑƒÑ›Ñ�Ñ‚Ð²Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ñ‚Ðµ Ñ�Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ð¾Ð¼ Ñƒ Ð²Ð°ÑˆÐµÐ¼ ÐºÐ¾Ð´Ñƒ."
+
+#: elf32-m68hc1x.c:1170
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr "Ð³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° [%lx:%04lx] (%lx) Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¸Ñ�Ñ‚Ð¾Ñ˜ Ð³Ñ€ÑƒÐ¿Ð¸ ÐºÐ°Ð¾ Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð° Ð³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° [%lx:%04lx] (%lx)"
+
+#: elf32-m68hc1x.c:1190
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr "ÑƒÐ¿ÑƒÑ‚Ð° Ð½Ð° Ð³Ñ€ÑƒÐ¿Ð¸Ñ�Ð°Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�Ñƒ [%lx:%04lx] Ñƒ Ð¾Ð±Ð¸Ñ‡Ð½Ð¾Ð¼ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€Ñƒ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð½Ð° %04lx"
+
+#: elf32-m68hc1x.c:1237
+#, c-format
+msgid "S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your code"
+msgstr "Ð�Ð´Ñ€ÐµÑ�Ð° â€žS12â€œ (%lx) Ð½Ð¸Ñ˜Ðµ ÑƒÐ½ÑƒÑ‚Ð°Ñ€ Ð´ÐµÑ™ÐµÐ½Ðµ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ (0x2000-0x4000), Ñ�Ñ‚Ð¾Ð³Ð° Ð¼Ð¾Ñ€Ð°Ñ‚Ðµ Ñ€ÑƒÑ‡Ð½Ð¾ Ð´Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð¸Ñ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ñƒ Ñƒ Ð²Ð°ÑˆÐµÐ¼ ÐºÐ¾Ð´Ñƒ"
+
+#: elf32-m68hc1x.c:1370
+msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 16 Ð±Ð¸Ñ‚Ð° (-mshort) Ð° Ð´Ñ€ÑƒÐ³Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 32 Ð±Ð¸Ñ‚Ð°"
+
+#: elf32-m68hc1x.c:1377
+msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 32 Ð±Ð¸Ñ‚Ð° (-fshort-double) Ð° Ð´Ñ€ÑƒÐ³Ðµ Ð·Ð° Ñ†ÐµÐ»Ðµ Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ð¾Ð´ 64 Ð±Ð¸Ñ‚Ð°"
+
+#: elf32-m68hc1x.c:1386
+msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%B: Ñ�Ð²ÐµÐ·ÑƒÑ˜ÑƒÑ›Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ðµ Ð·Ð° â€žHCS12â€œ Ñ�Ð° Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸Ð¼ Ð·Ð° â€žHC12â€œ"
+
+#: elf32-m68hc1x.c:1402 elf32-ppc.c:4776 elf64-sparc.c:706 elfxx-mips.c:14817
+msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%B: ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð° Ð¿Ð¾Ñ™Ð° â€že_flagsâ€œ (0x%lx) Ð½ÐµÐ³Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸ Ð¼Ð¾Ð´ÑƒÐ»Ð¸ (0x%lx)"
+
+#: elf32-m68hc1x.c:1430 elf32-xgate.c:677
+#, c-format
+msgid "[abi=32-bit int, "
+msgstr "[Ð°Ð±Ð¸=32-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ†ÐµÐ¾ Ð±Ñ€Ð¾Ñ˜, "
+
+#: elf32-m68hc1x.c:1432 elf32-xgate.c:679
+#, c-format
+msgid "[abi=16-bit int, "
+msgstr "[Ð°Ð±Ð¸=16-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ†ÐµÐ¾ Ð±Ñ€Ð¾Ñ˜, "
+
+#: elf32-m68hc1x.c:1435 elf32-xgate.c:682
+#, c-format
+msgid "64-bit double, "
+msgstr "64-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¼ÐµÑˆÐ¾Ð²Ð¸Ñ‚Ð¸, "
+
+#: elf32-m68hc1x.c:1437 elf32-xgate.c:684
+#, c-format
+msgid "32-bit double, "
+msgstr "32-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¼ÐµÑˆÐ¾Ð²Ð¸Ñ‚Ð¸, "
+
+#: elf32-m68hc1x.c:1440
+#, c-format
+msgid "cpu=HC11]"
+msgstr "Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HC11]"
+
+#: elf32-m68hc1x.c:1442
+#, c-format
+msgid "cpu=HCS12]"
+msgstr "Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HCS12]"
+
+#: elf32-m68hc1x.c:1444
+#, c-format
+msgid "cpu=HC12]"
+msgstr "Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=HC12]"
+
+#: elf32-m68hc1x.c:1447
+#, c-format
+msgid " [memory=bank-model]"
+msgstr " [Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð°=Ð¼Ð¾Ð´ÐµÐ»-Ð³Ñ€ÑƒÐ¿Ðµ]"
+
+#: elf32-m68hc1x.c:1449
+#, c-format
+msgid " [memory=flat]"
+msgstr " [Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ð°=Ð¾Ð±Ð¸Ñ‡Ð½Ð¾]"
+
+#: elf32-m68hc1x.c:1452
+#, c-format
+msgid " [XGATE RAM offsetting]"
+msgstr " [XGATE RAM Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜]"
+
+#: elf32-m68k.c:1210 elf32-m68k.c:1211 vms-alpha.c:7207 vms-alpha.c:7222
+msgid "unknown"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾"
+
+#: elf32-m68k.c:1674
+msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d"
+msgstr "%B: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ â€žGOTâ€œ: Ð‘Ñ€Ð¾Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð° 8-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ÐµÐ¼ > %d"
+
+#: elf32-m68k.c:1680
+msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d"
+msgstr "%B: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ â€žGOTâ€œ: Ð‘Ñ€Ð¾Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð° 8- Ð¸Ð»Ð¸ 16-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ÐµÐ¼ > %d"
+
+#: elf32-m68k.c:3921
+msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): â€žR_68K_TLS_LE32â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-mcore.c:99 elf32-mcore.c:442
+msgid "%B: Relocation %s (%d) is not currently supported.\n"
+msgstr "%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ (%d) Ñ‚Ñ€ÐµÐ½ÑƒÑ‚Ð½Ð¾ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾.\n"
+
+#: elf32-mcore.c:428
+msgid "%B: Unknown relocation type %d\n"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ\n"
+
+#. Pacify gcc -Wall.
+#: elf32-mep.c:157
+#, c-format
+msgid "mep: no reloc for code %d"
+msgstr "mep: Ð½ÐµÐ¼Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð·Ð° ÐºÐ¾Ð´ â€ž%dâ€œ"
+
+#: elf32-mep.c:163
+#, c-format
+msgid "MeP: howto %d has type %d"
+msgstr "MeP: â€žhowtoâ€œ â€ž%dâ€œ Ð¸Ð¼Ð° Ð²Ñ€Ñ�Ñ‚Ñƒ â€ž%dâ€œ"
+
+#: elf32-mep.c:632
+msgid "%B and %B are for different cores"
+msgstr "â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ñƒ Ð·Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð°"
+
+#: elf32-mep.c:649
+msgid "%B and %B are for different configurations"
+msgstr "â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ñƒ Ð·Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð° Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐ°"
+
+#: elf32-mep.c:686
+#, c-format
+msgid "private flags = 0x%lx"
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = 0x%lx"
+
+#: elf32-metag.c:1921
+msgid "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): â€žR_METAG_TLS_LE/IENONPICâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-microblaze.c:950
+#, c-format
+msgid "%s: unknown relocation type %d"
+msgstr "%s: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: elf32-microblaze.c:1076 elf32-microblaze.c:1121
+#, c-format
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgstr "%s: ÐœÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)"
+
+#: elf32-microblaze.c:1484 elf32-tilepro.c:3320 elfxx-sparc.c:3526
+#: elfxx-tilegx.c:3729
+msgid "%B: probably compiled without -fPIC?"
+msgstr "%B: Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð±ÐµÐ· â€ž-fPICâ€œ?"
+
+#: elf32-mips.c:1670 elf64-mips.c:2990 elfn32-mips.c:2793
+msgid "literal relocation occurs for an external symbol"
+msgstr "Ð´Ð¾ÑˆÐ»Ð¾ Ñ˜Ðµ Ð´Ð¾ Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elf32-mips.c:1717 elf32-score.c:570 elf32-score7.c:469 elf64-mips.c:3033
+#: elfn32-mips.c:2834
+msgid "32bits gp relative relocation occurs for an external symbol"
+msgstr "Ð´Ð¾ÑˆÐ»Ð¾ Ñ˜Ðµ Ð´Ð¾ 32-Ð±Ð¸Ñ‚Ð½Ð¾Ð³ Ð³Ð¿ Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elf32-msp430.c:801 elf32-msp430.c:1109
+msgid "Try enabling relaxation to avoid relocation truncations"
+msgstr "ÐŸÐ¾ÐºÑƒÑˆÐ°Ñ˜Ñ‚Ðµ Ð´Ð° ÑƒÐºÑ™ÑƒÑ‡Ð¸Ñ‚Ðµ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐµ Ð´Ð° Ð±Ð¸Ñ�Ñ‚Ðµ Ð¸Ð·Ð±ÐµÐ³Ð»Ð¸ Ñ�ÐºÑ€Ð°Ñ›Ð¸Ð²Ð°ÑšÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-msp430.c:1317
+msgid "internal error: branch/jump to an odd address detected"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ñ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð³Ñ€Ð°Ð½Ð°ÑšÐµ/Ñ�ÐºÐ¾Ðº Ð½Ð° Ð½ÐµÐ¿Ð°Ñ€Ð½Ñƒ Ð°Ð´Ñ€ÐµÑ�Ñƒ"
+
+#: elf32-msp430.c:2221
+msgid "Warning: %B: Unknown MSPABI object attribute %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: %B: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žMSPABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: elf32-msp430.c:2312
+msgid "error: %B uses %s instructions but %B uses %s"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ"
+
+#: elf32-msp430.c:2324
+msgid "error: %B uses the %s code model whereas %B uses the %s code model"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ ÐºÐ¾Ð´Ð° Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ ÐºÐ¾Ð´Ð°"
+
+#: elf32-msp430.c:2336
+msgid "error: %B uses the large code model but %B uses MSP430 instructions"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð²ÐµÐ»Ð¸ÐºÐ¸ Ð¼Ð¾Ð´ÐµÐ» ÐºÐ¾Ð´Ð° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žMSP430â€œ"
+
+#: elf32-msp430.c:2346
+msgid "error: %B uses the %s data model whereas %B uses the %s data model"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð´Ð¾Ðº â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-msp430.c:2358
+msgid "error: %B uses the small code model but %B uses the %s data model"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸ Ð¼Ð¾Ð´ÐµÐ» ÐºÐ¾Ð´Ð° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-msp430.c:2369
+msgid "error: %B uses the %s data model but %B only uses MSP430 instructions"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼Ð¾Ð´ÐµÐ» â€ž%sâ€œ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð°Ð»Ð¸ â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žMSP430â€œ"
+
+#: elf32-nds32.c:2921
+msgid "error: Can't find symbol: _SDA_BASE_."
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»: _SDA_BASE_."
+
+#: elf32-nds32.c:4142
+msgid "%B: error: unknown relocation type %d."
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ."
+
+#: elf32-nds32.c:4584
+#, c-format
+msgid "%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode."
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° â€žR_NDS32_25_ABS_RELAâ€œ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ."
+
+#: elf32-nds32.c:4716
+msgid "%B: warning: unaligned access to GOT entry."
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ ÑƒÐ½Ð¾Ñ�Ñƒ â€žGOTâ€œ."
+
+#: elf32-nds32.c:4758
+msgid "%B: warning: relocate SDA_BASE failed."
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žSDA_BASEâ€œ."
+
+#: elf32-nds32.c:4779
+msgid "%B(%A): warning: unaligned small data access of type %d."
+msgstr "%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¸Ð¼ Ð¼Ð°Ð»Ð¸Ð¼ Ð¿Ð¾Ð´Ð°Ñ†Ð¸Ð¼Ð° Ð²Ñ€Ñ�Ñ‚Ðµ â€ž%dâ€œ."
+
+#: elf32-nds32.c:5446
+msgid "%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte"
+msgstr "%B: Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð²ÐµÐºÑ‚Ð¾Ñ€Ð° â€žISRâ€œ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°: Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð° %u Ð±Ð°Ñ˜Ñ‚Ð°; Ñ‚ÐµÐºÑƒÑ›Ð° %u Ð±Ð°Ñ˜Ñ‚Ð°"
+
+#: elf32-nds32.c:5489
+msgid "%B: warning: Endian mismatch with previous modules."
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐšÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°."
+
+#: elf32-nds32.c:5499
+msgid "%B: warning: Older version of object file encountered, Please recompile with current tool chain."
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð�Ð°Ð¸ÑˆÐ°Ð¾ Ñ�Ð°Ð¼ Ð½Ð° Ñ�Ñ‚Ð°Ñ€Ð¸Ñ˜Ðµ Ð¸Ð·Ð´Ð°ÑšÐµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°, Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ñ�Ð° Ñ‚ÐµÐºÑƒÑ›Ð¸Ð¼ Ð»Ð°Ð½Ñ†ÐµÐ¼ Ð°Ð»Ð°Ñ‚Ð°."
+
+#: elf32-nds32.c:5577
+msgid "%B: error: ABI mismatch with previous modules."
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ð‘Ð˜ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°."
+
+#: elf32-nds32.c:5588
+msgid "%B: error: Instruction set mismatch with previous modules."
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð¡ÐºÑƒÐ¿ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°."
+
+#: elf32-nds32.c:5612
+msgid "%B: warning: Incompatible elf-versions %s and  %s."
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: ÐµÐ»Ñ„ Ð¸Ð·Ð´Ð°ÑšÐ° %s Ð¸ %s Ð½Ð¸Ñ�Ñƒ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð°."
+
+#: elf32-nds32.c:5642
+#, c-format
+msgid ": n1 instructions"
+msgstr ": Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žn1â€œ"
+
+#: elf32-nds32.c:5645
+#, c-format
+msgid ": n1h instructions"
+msgstr ": Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žn1hâ€œ"
+
+#: elf32-nds32.c:8147
+msgid "%B: %s\n"
+msgstr "%B: %s\n"
+
+#: elf32-nds32.c:8449
+msgid "%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte."
+msgstr "%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð¿Ð¾Ñ‚Ð¸Ñ�Ð½ÑƒÑ‚Ð¾ Ð·Ð° Ð¾Ð´ÐµÑ™ÐºÐµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐ° %d-Ð±Ð°Ñ˜Ñ‚Ð° > 4-Ð±Ð°Ñ˜Ñ‚Ð°."
+
+#: elf32-nds32.c:8502
+msgid "%B: error: Cannot set _ITB_BASE_"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð´ÐµÑ�Ð¸Ð¼ â€ž_ITB_BASE_â€œ"
+
+#: elf32-nds32.c:11384
+msgid "%B: Nested OMIT_FP in %A."
+msgstr "%B: Ð£Ð³Ð½ÐµÐ¶Ñ’ÐµÐ½Ð¾ â€žOMIT_FPâ€œ Ñƒ â€ž%Aâ€œ."
+
+#: elf32-nds32.c:11401
+msgid "%B: Unmatched OMIT_FP in %A."
+msgstr "%B: Ð�ÐµÐ¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ðµ â€žOMIT_FPâ€œ Ñƒ â€ž%Aâ€œ."
+
+#: elf32-nds32.c:13357
+msgid "Linker: cannot init ex9 hash table error \n"
+msgstr "ÐŸÐ¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¾Ñ‡Ð½ÐµÐ¼ Ð³Ñ€ÐµÑˆÐºÑƒ â€žex9â€œ Ñ…ÐµÑˆ Ñ‚Ð°Ð±ÐµÐ»Ðµ \n"
+
+#: elf32-nds32.c:13790 elf32-nds32.c:13804
+msgid "Linker: error cannot fixed ex9 relocation \n"
+msgstr "ÐŸÐ¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡: Ð³Ñ€ÐµÑˆÐºÐ° Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð¿Ð¾Ð¿Ñ€Ð°Ð²Ð¸ â€žex9â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ \n"
+
+#: elf32-nds32.c:14015
+#, c-format
+msgid "%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°. Ð—Ð° ÑƒÐ½Ð¾Ñ�: {%d, %d, %d}, Ð°Ð´Ñ€ÐµÑ�Ð° = 0x%x, Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ = 0x%x."
+
+#: elf32-nds32.c:14047
+msgid "%P%F: failed creating ex9.it %s hash table: %E\n"
+msgstr "%P%F: Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð½Ð°Ð¿Ñ€Ð°Ð²Ð¸Ð¼ â€žex9.it %sâ€œ Ñ…ÐµÑˆ Ñ‚Ð°Ð±ÐµÐ»Ñƒ: %E\n"
+
+#: elf32-nios2.c:2861
+#, c-format
+msgid "global pointer relative relocation at address 0x%08x when _gp not defined\n"
+msgstr "Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð¸ 0x%08x ÐºÐ°Ð´Ð° â€ž_gpâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾\n"
+
+#: elf32-nios2.c:2878
+#, c-format
+msgid "Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.\n"
+msgstr "Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ñ�Ñ‚Ð¸Ð³Ð½ÐµÐ¼ â€ž%sâ€œ (Ð½Ð° 0x%08x) Ð¸Ð· Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° (Ð½Ð° 0x%08x) Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ (%d) Ð¸Ð·Ð²Ð°Ð½ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾Ð³ Ð¾Ð¿Ñ�ÐµÐ³Ð°, Ð¾Ð´ -32678 Ð´Ð¾ 32767.\n"
+
+#: elf32-nios2.c:3392
+msgid "%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): â€žR_NIOS2_TLS_LE16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-nios2.c:3520
+msgid "relocation out of range"
+msgstr "Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf32-nios2.c:3530 elf32-tic6x.c:2744
+msgid "dangerous relocation"
+msgstr "Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-nios2.c:4529
+#, c-format
+msgid "dynamic variable `%s' is zero size"
+msgstr "Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ™Ð¸Ð²Ð° â€ž%sâ€œ Ñ˜Ðµ Ð½ÑƒÐ»Ñ‚Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ"
+
+#: elf32-ppc.c:2100
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "Ð¾Ð¿ÑˆÑ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ€Ð°Ð´Ð¸ Ñ�Ð° â€ž%sâ€œ"
+
+#: elf32-ppc.c:2642
+msgid "corrupt %s section in %B"
+msgstr "Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ â€ž%sâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº Ñƒ â€ž%Bâ€œ"
+
+#: elf32-ppc.c:2661
+msgid "unable to read in %s section from %B"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ Ð¸Ð· â€ž%Bâ€œ"
+
+#: elf32-ppc.c:2702
+msgid "warning: unable to set size of %s section in %B"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf32-ppc.c:2752
+msgid "failed to allocate space for new APUinfo section."
+msgstr "Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€ Ð·Ð° Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ."
+
+#: elf32-ppc.c:2771
+msgid "failed to compute new APUinfo section."
+msgstr "Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ð¼ Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ."
+
+#: elf32-ppc.c:2774
+msgid "failed to install new APUinfo section."
+msgstr "Ð½Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð¸Ð½Ñ�Ñ‚Ð°Ð»Ð¸Ñ€Ð°Ð¼ Ð½Ð¾Ð²Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€žAPUinfoâ€œ."
+
+#: elf32-ppc.c:3844
+msgid "%B: relocation %s cannot be used when making a shared object"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°"
+
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:4218
+msgid "%P: %H: %s reloc against local symbol\n"
+msgstr "%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°\n"
+
+#: elf32-ppc.c:4299
+msgid "%P: %H: @local call to ifunc %s\n"
+msgstr "%P: %H: Ð¿Ð¾Ð·Ð¸Ð² â€ž@localâ€œ Ð·Ð° i-Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ\n"
+
+#: elf32-ppc.c:4588 elf32-ppc.c:4603
+msgid "Warning: %B uses hard float, %B uses soft float"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·"
+
+#: elf32-ppc.c:4591 elf32-ppc.c:4595
+msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ð´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÐºÐµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ñ˜ÐµÐ´Ð½Ðµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: elf32-ppc.c:4599
+msgid "Warning: %B uses soft float, %B uses single-precision hard float"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ�Ð¾Ñ„Ñ‚Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ñ…Ð°Ñ€Ð´Ð²ÐµÑ€Ñ�ÐºÐ¸ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ· Ñ˜ÐµÐ´Ð½Ðµ Ñ‚Ð°Ñ‡Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: elf32-ppc.c:4606 elf32-ppc.c:4610
+msgid "Warning: %B uses unknown floating point ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%dâ€œ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð°"
+
+#: elf32-ppc.c:4652 elf32-ppc.c:4656
+msgid "Warning: %B uses unknown vector ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%dâ€œ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°"
+
+#: elf32-ppc.c:4660
+msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\""
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð�Ð‘Ð˜ â€ž%sâ€œ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ"
+
+#: elf32-ppc.c:4677 elf32-ppc.c:4680
+msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€žr3/r4â€œ Ð·Ð° Ð¼Ð°Ð»Ðµ Ñ€ÐµÐ·ÑƒÐ»Ñ‚Ð°Ñ‚Ðµ Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ, â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ñƒ"
+
+#: elf32-ppc.c:4683 elf32-ppc.c:4687
+msgid "Warning: %B uses unknown small structure return convention %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ð¾Ð´Ð³Ð¾Ð²Ð¾Ñ€ Ð¼Ð°Ð»Ð¾Ð³ Ñ€ÐµÐ·ÑƒÐ»Ñ‚Ð°Ñ‚Ð° Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ â€ž%dâ€œ"
+
+#: elf32-ppc.c:4741
+msgid "%B: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ñ�Ð° â€ž-mrelocatableâ€œ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ ÑƒÐ¾Ð±Ð¸Ñ‡Ð°Ñ˜ÐµÐ½Ð¸Ð¼ Ð¿ÑƒÑ‚ÐµÐ¼"
+
+#: elf32-ppc.c:4749
+msgid "%B: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ ÑƒÐ¾Ð±Ð¸Ñ‡Ð°Ñ˜ÐµÐ½Ð¸Ð¼ Ð¿ÑƒÑ‚ÐµÐ¼ Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾ Ñ�Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° ÐºÐ¾Ñ˜Ð¸ Ñ�Ñƒ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¸ Ñ�Ð° â€ž-mrelocatableâ€œ"
+
+#: elf32-ppc.c:4872
+msgid "%P: bss-plt forced due to %B\n"
+msgstr "%P: â€žbss-pltâ€œ Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�Ð¸Ñ™ÐµÐ½Ð¾ Ð·Ð±Ð¾Ð³ â€ž%Bâ€œ\n"
+
+#: elf32-ppc.c:4875
+msgid "%P: bss-plt forced by profiling\n"
+msgstr "%P: â€žbss-pltâ€œ Ñ˜Ðµ Ð¿Ñ€Ð¸Ñ�Ð¸Ñ™ÐµÐ½Ð¾ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð¸Ñ�Ð°ÑšÐµÐ¼\n"
+
+#. Uh oh, we didn't find the expected call.  We
+#. could just mark this symbol to exclude it
+#. from tls optimization but it's safer to skip
+#. the entire optimization.
+#: elf32-ppc.c:5369 elf64-ppc.c:8371
+msgid "%H arg lost __tls_get_addr, TLS optimization disabled\n"
+msgstr "Ð�Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚ â€ž%Hâ€œ Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ð¸Ð¾ â€ž__tls_get_addrâ€œ, Ð¢Ð›Ð¡ Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�ÐºÑ™ÑƒÑ‡ÐµÐ½Ð°\n"
+
+#: elf32-ppc.c:7927
+msgid "%P: %B: unknown relocation type %d for symbol %s\n"
+msgstr "%P: %B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ\n"
+
+#: elf32-ppc.c:8191
+msgid "%P: %H: non-zero addend on %s reloc against `%s'\n"
+msgstr "%P: %H: Ð½Ðµ Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ð½Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ\n"
+
+#: elf32-ppc.c:8389
+msgid "%P: %H: relocation %s for indirect function %s unsupported\n"
+msgstr "%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾\n"
+
+#: elf32-ppc.c:8646 elf32-ppc.c:8676 elf32-ppc.c:8767
+msgid "%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)\n"
+msgstr "%P: %B: Ð¼ÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)\n"
+
+#: elf32-ppc.c:8854
+msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%B: Ð¼ÐµÑ‚Ð° (%s) Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ð¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ (%s)"
+
+#: elf32-ppc.c:8958
+msgid "%P: %B: relocation %s is not yet supported for symbol %s\n"
+msgstr "%P: %B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ\n"
+
+#: elf32-ppc.c:9038
+msgid "%P: %H: error: %s against `%s' not a multiple of %u\n"
+msgstr "%P: %H: Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ â€ž%uâ€œ\n"
+
+#: elf32-ppc.c:9067
+msgid "%P: %H: unresolvable %s relocation against symbol `%s'\n"
+msgstr "%P: %H: Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ\n"
+
+#: elf32-ppc.c:9114
+msgid "%P: %H: %s reloc against `%s': error %d\n"
+msgstr "%P: %H: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d\n"
+
+#: elf32-ppc.c:9750
+msgid "%P: %s not defined in linker created %s\n"
+msgstr "%P: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ñƒ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ñƒ Ñ�Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð¾Ð¼ â€ž%sâ€œ\n"
+
+#: elf32-rl78.c:784
+msgid "Warning: RL78_SYM reloc with an unknown symbol"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žRL78_SYMâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼"
+
+#: elf32-rl78.c:952 elf32-rx.c:1324
+msgid "%B(%A): error: call to undefined function '%s'"
+msgstr "%B(%A): Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ð¾Ð·Ð¸Ð² Ð·Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ"
+
+#: elf32-rl78.c:966 elf32-rx.c:1338
+msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
+msgstr "%B(%A): ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¸ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-rl78.c:970 elf32-rx.c:1342
+msgid "%B(%A): internal error: out of range error"
+msgstr "%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¸Ð·Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf32-rl78.c:974 elf32-rx.c:1346
+msgid "%B(%A): internal error: unsupported relocation error"
+msgstr "%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: elf32-rl78.c:978 elf32-rx.c:1350
+msgid "%B(%A): internal error: dangerous relocation"
+msgstr "%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð¿Ð°Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-rl78.c:982 elf32-rx.c:1354
+msgid "%B(%A): internal error: unknown error"
+msgstr "%B(%A): ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð³Ñ€ÐµÑˆÐºÐ°"
+
+#: elf32-rl78.c:1043
+msgid "RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"
+msgstr "â€žABI RL78/G10â€œ Ñ�ÑƒÐºÐ¾Ð±: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾ Ð“10 Ð¸ Ð½Ðµ-Ð“10 Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ"
+
+#: elf32-rl78.c:1046 elf32-rl78.c:1049
+#, c-format
+msgid "- %s is G10, %s is not"
+msgstr "â€” â€ž%sâ€œ Ñ˜Ðµ Ð“10, â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ"
+
+#: elf32-rl78.c:1072
+#, c-format
+msgid " [G10]"
+msgstr " [Ð“10]"
+
+#: elf32-rx.c:563
+msgid "%B:%A: Warning: deprecated Red Hat reloc "
+msgstr "%B:%A: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð·Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð ÐµÐ´ Ð¥ÐµÑ‚Ð° "
+
+#. Check for unsafe relocs in PID mode.  These are any relocs where
+#. an absolute address is being computed.  There are special cases
+#. for relocs against symbols that are known to be referenced in
+#. crt0.o before the PID base address register has been initialised.
+#: elf32-rx.c:581
+msgid "%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"
+msgstr "%B(%A): Ð½ÐµÑ�Ð¸Ð³ÑƒÑ€Ð½Ð¾ ÐŸÐ˜Ð” Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð° 0x%08lx (Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ñƒ â€ž%sâ€œ)"
+
+#: elf32-rx.c:1157
+msgid "Warning: RX_SYM reloc with an unknown symbol"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žRX_SYMâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼"
+
+#: elf32-s390.c:2292 elf64-s390.c:2244
+msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ð·Ð° Ð¢Ð›Ð¡ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ"
+
+#: elf32-score.c:1520 elf32-score7.c:1379 elfxx-mips.c:3642
+msgid "not enough GOT space for local GOT entries"
+msgstr "Ð½ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ â€žGOTâ€œ Ð¿Ñ€Ð¾Ñ�Ñ‚Ð¾Ñ€Ð° Ð·Ð° Ð¼ÐµÑ�Ð½Ðµ ÑƒÐ½Ð¾Ñ�Ðµ â€žGOTâ€œ"
+
+#: elf32-score.c:2742
+msgid "address not word align"
+msgstr "Ð°Ð´Ñ€ÐµÑ�Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð¿Ð¾ Ñ€ÐµÑ‡Ð¸"
+
+#: elf32-score.c:2827 elf32-score7.c:2631
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð»Ð¾ÑˆÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: elf32-score.c:2882 elf32-score7.c:2686
+msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
+msgstr "%B: â€žCALL15â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elf32-score.c:4007 elf32-score7.c:3811
+#, c-format
+msgid " [pic]"
+msgstr " [Ð¿Ð¸Ðº]"
+
+#: elf32-score.c:4011 elf32-score7.c:3815
+#, c-format
+msgid " [fix dep]"
+msgstr " [Ñ„Ð¸ÐºÑ� Ð´ÑƒÐ±]"
+
+#: elf32-score.c:4053 elf32-score7.c:3857
+msgid "%B: warning: linking PIC files with non-PIC files"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€žPICâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ð° Ð½Ðµ-â€žPICâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°"
+
+#: elf32-sh-symbian.c:130
+msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
+msgstr "%B: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° Ð£Ð’Ð•Ð—Ð˜ ÐšÐ�Ðž Ð·Ð° â€ž%sâ€œ Ð·Ð°Ñ�ÐµÑšÑƒÑ˜Ðµ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ Ð£Ð’Ð•Ð—Ð˜ ÐšÐ�Ðž"
+
+#: elf32-sh-symbian.c:383
+msgid "%B: Unrecognised .directive command: %s"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž.directiveâ€œ: %s"
+
+#: elf32-sh-symbian.c:500
+msgid "%B: Failed to add renamed symbol %s"
+msgstr "%B: Ð�Ð¸Ñ�Ð°Ð¼ ÑƒÑ�Ð¿ÐµÐ¾ Ð´Ð° Ð´Ð¾Ð´Ð°Ð¼ Ð¿Ñ€ÐµÐ¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ"
+
+#: elf32-sh.c:569
+msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ â€žR_SH_USESâ€œ"
+
+#: elf32-sh.c:581
+msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žR_SH_USESâ€œ Ð¿Ð¾ÐºÐ°Ð·ÑƒÑ˜Ðµ Ð½Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ â€žinsnâ€œ 0x%x"
+
+#: elf32-sh.c:598
+msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° â€žR_SH_USESâ€œ"
+
+#: elf32-sh.c:613
+msgid "%B: 0x%lx: warning: could not find expected reloc"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-sh.c:641
+msgid "%B: 0x%lx: warning: symbol in unexpected section"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñ˜Ðµ Ñƒ Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ"
+
+#: elf32-sh.c:767
+msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žCOUNTâ€œ"
+
+#: elf32-sh.c:776
+msgid "%B: 0x%lx: warning: bad count"
+msgstr "%B: 0x%lx: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾Ñˆ Ð±Ñ€Ð¾Ñ˜"
+
+#: elf32-sh.c:1180 elf32-sh.c:1550
+msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr "%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-sh.c:3939 elf64-sh64.c:1514
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ â€žSTO_SH5_ISA32â€œ Ð½Ð° Ð¼ÐµÑ�Ð½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð½Ð¸Ñ˜Ðµ Ð¾Ð´Ñ€Ð°Ñ’ÐµÐ½Ð¾"
+
+#: elf32-sh.c:4190
+msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgstr "%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚ Ñ†Ð¸Ñ™ Ð³Ñ€Ð°Ð½Ðµ Ð·Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¿Ð¾Ð´Ñ€ÑˆÐºÐµ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-sh.c:4223 elf32-sh.c:4238
+msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
+msgstr "%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ 0x%lx"
+
+#: elf32-sh.c:4252
+msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
+msgstr "%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: â€žR_SH_PSHAâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¾Ð¿Ñ�ÐµÐ³Ñƒ -32..32"
+
+#: elf32-sh.c:4266
+msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
+msgstr "%B: 0x%lx: ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ°: â€žR_SH_PSHLâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð¾Ð¿Ñ�ÐµÐ³Ñƒ -32..32"
+
+#: elf32-sh.c:4410 elf32-sh.c:4886
+msgid "%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"
+msgstr "%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° ÑƒÐ½ÐµÑ�ÐµÐ¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ñƒ â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ"
+
+#: elf32-sh.c:4993
+msgid "%B(%A+0x%lx): %s relocation against external symbol \"%s\""
+msgstr "%B(%A+0x%lx): â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-sh.c:5466
+#, c-format
+msgid "%X%C: relocation to \"%s\" references a different segment\n"
+msgstr "%X%C: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°\n"
+
+#: elf32-sh.c:5472
+#, c-format
+msgid "%C: warning: relocation to \"%s\" references a different segment\n"
+msgstr "%C: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ â€ž%sâ€œ Ñ�Ñ‚Ð²Ð°Ñ€Ð° ÑƒÐ¿ÑƒÑ‚Ñƒ Ð´Ñ€ÑƒÐ³Ð¾Ð³ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð°\n"
+
+#: elf32-sh.c:6254 elf32-sh.c:6337
+msgid "%B: `%s' accessed both as normal and FDPIC symbol"
+msgstr "%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€žFDPICâ€œ"
+
+#: elf32-sh.c:6259 elf32-sh.c:6341
+msgid "%B: `%s' accessed both as FDPIC and thread local symbol"
+msgstr "%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ â€žFDPICâ€œ-Ñƒ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸"
+
+#: elf32-sh.c:6289
+msgid "%B: Function descriptor relocation with non-zero addend"
+msgstr "%B: ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ð¿Ð¸Ñ�Ð½Ð¸ÐºÐ° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ñ�Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸Ð¼ Ñ�Ð°Ð±Ð¸Ñ€ÐºÐ¾Ð¼"
+
+#: elf32-sh.c:6525 elf64-alpha.c:4661
+msgid "%B: TLS local exec code cannot be linked into shared objects"
+msgstr "%B: Ð¢Ð›Ð¡ Ð¼ÐµÑ�Ð½Ð¸ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¸ ÐºÐ¾Ð´ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¸Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð°"
+
+#: elf32-sh64.c:224 elf64-sh64.c:2318
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ñ˜Ðµ ÐºÐ°Ð¾ 32-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð° â€ž%sâ€œ Ñ˜Ðµ 64-Ð±Ð¸Ñ‚Ð½Ð¸"
+
+#: elf32-sh64.c:227 elf64-sh64.c:2321
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ñ˜Ðµ ÐºÐ°Ð¾ 64-Ð±Ð¸Ñ‚Ð½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð° â€ž%sâ€œ Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸"
+
+#: elf32-sh64.c:229 elf64-sh64.c:2323
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ Ñ†Ð¸Ñ™Ð° â€ž%sâ€œ"
+
+#: elf32-sh64.c:452 elf64-sh64.c:2839
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: Ð½Ð°Ð¸ÑˆÐ°Ð¾ Ñ�Ð°Ð¼ Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð½Ð°Ñ‚Ð¿Ð¸Ñ�Ð° Ð´Ð°Ñ‚ÑƒÐ¼Ð° Ñƒ ÑƒÐ»Ð°Ð·Ñƒ"
+
+#: elf32-sh64.c:529
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "ÐŸÐ¢Ð‘ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð°Ð´Ñ€ÐµÑ�Ð° â€žSHmediaâ€œ (Ð±Ð¸Ñ‚ 0 == 1)"
+
+#: elf32-sh64.c:532
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "ÐŸÐ¢Ð� Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð°Ð´Ñ€ÐµÑ�Ð° â€žSHcompactâ€œ (Ð±Ð¸Ñ‚ 0 == 0)"
+
+#: elf32-sh64.c:550
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: Ð“Ð�Ð¡ Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ ÐŸÐ¢Ð‘ â€žinsnâ€œ Ñ�Ð° â€žR_SH_PT_16â€œ"
+
+#: elf32-sh64.c:599
+msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð½Ð° %08x Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%pâ€œ\n"
+
+#: elf32-sh64.c:675
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð´Ð¾Ð´Ð°Ñ‚Ðµ â€ž.crangesâ€œ ÑƒÐ½Ð¾Ñ�Ðµ"
+
+#: elf32-sh64.c:735
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð½Ðµ â€ž.crangesâ€œ ÑƒÐ½Ð¾Ñ�Ðµ"
+
+#: elf32-sparc.c:90
+msgid "%B: compiled for a 64 bit system and target is 32 bit"
+msgstr "%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° 64-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸"
+
+#: elf32-sparc.c:103
+msgid "%B: linking little endian files with big endian files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸ Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸"
+
+#: elf32-spu.c:716
+msgid "%X%P: overlay section %A does not start on a cache line.\n"
+msgstr "%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð½Ðµ Ð¿Ð¾Ñ‡Ð¸ÑšÐµ Ñƒ Ñ€ÐµÐ´Ñƒ Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.\n"
+
+#: elf32-spu.c:724
+msgid "%X%P: overlay section %A is larger than a cache line.\n"
+msgstr "%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ñ˜Ðµ Ð²ÐµÑ›Ð¸ Ð¾Ð´ Ñ€ÐµÐ´Ð° Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.\n"
+
+#: elf32-spu.c:744
+msgid "%X%P: overlay section %A is not in cache area.\n"
+msgstr "%X%P: Ð¾Ð´ÐµÑ™Ð°Ðº Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ñ€ÐµÐ´Ñƒ Ð¾Ñ�Ñ‚Ð°Ð²Ðµ.\n"
+
+#: elf32-spu.c:784
+msgid "%X%P: overlay sections %A and %A do not start at the same address.\n"
+msgstr "%X%P: Ð¾Ð´ÐµÑ™Ñ†Ð¸ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° â€ž%Aâ€œ Ð¸ â€ž%Aâ€œ Ð½Ðµ Ð¿Ð¾Ñ‡Ð¸ÑšÑƒ Ð½Ð° Ð¸Ñ�Ñ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸.\n"
+
+#: elf32-spu.c:1008
+msgid "warning: call to non-function symbol %s defined in %B"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð·Ð¸Ð² Ð½Ðµ-Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñ�ÐºÐ¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ñƒ â€ž%Bâ€œ"
+
+#: elf32-spu.c:1358
+msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n"
+msgstr "%A:0x%v â€žlrlive .brinfoâ€œ (%u) Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð°Ð½Ð°Ð»Ð¸Ð·Ðµ (%u)\n"
+
+#: elf32-spu.c:1877
+msgid "%B is not allowed to define %s"
+msgstr "â€ž%Bâ€œ Ð½ÐµÐ¼Ð° Ð´Ð¾Ð·Ð²Ð¾Ð»Ñƒ Ð´Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ â€ž%sâ€œ"
+
+#: elf32-spu.c:1885
+#, c-format
+msgid "you are not allowed to define %s in a script"
+msgstr "Ð²Ð¸ Ð½ÐµÐ¼Ð°Ñ‚Ðµ Ð´Ð¾Ð·Ð²Ð¾Ð»Ñƒ Ð´Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµÑ‚Ðµ â€ž%sâ€œ Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸"
+
+#: elf32-spu.c:1919
+#, c-format
+msgid "%s in overlay section"
+msgstr "â€ž%sâ€œ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°"
+
+#: elf32-spu.c:1948
+msgid "overlay stub relocation overflow"
+msgstr "Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð¿Ñ€ÐµÐºÑ€Ð¸Ð²Ð°ÑšÐ°"
+
+#: elf32-spu.c:1957
+msgid "stubs don't match calculated size"
+msgstr "Ð¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜Ñƒ Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ñ‚Ð¾Ñ˜ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸"
+
+#: elf32-spu.c:2539
+#, c-format
+msgid "warning: %s overlaps %s\n"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð° â€ž%sâ€œ\n"
+
+#: elf32-spu.c:2555
+#, c-format
+msgid "warning: %s exceeds section size\n"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¾Ð´ÐµÑ™ÐºÐ°\n"
+
+#: elf32-spu.c:2586
+msgid "%A:0x%v not found in function table\n"
+msgstr "â€ž%A:0x%vâ€œ Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñƒ Ñ‚Ð°Ð±ÐµÐ»Ð¸ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ\n"
+
+#: elf32-spu.c:2726
+msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n"
+msgstr "%B(%A+0x%v): Ð¿Ð¾Ð·Ð¸Ð² Ð½Ðµ-ÐºÐ¾Ð´Ð½Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%B(%A)â€œ, Ð°Ð½Ð°Ð»Ð¸Ð·Ð° Ñ˜Ðµ Ð½ÐµÐ¿Ð¾Ñ‚Ð¿ÑƒÐ½Ð°\n"
+
+#: elf32-spu.c:3294
+#, c-format
+msgid "Stack analysis will ignore the call from %s to %s\n"
+msgstr "Ð�Ð½Ð°Ð»Ð¸Ð·Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñ›Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€Ð¸Ñ‚Ð¸ Ð¿Ð¾Ð·Ð¸Ð² Ð¾Ð´ â€ž%sâ€œ Ð´Ð¾ â€ž%sâ€œ\n"
+
+#: elf32-spu.c:3985
+msgid "  %s: 0x%v\n"
+msgstr "  %s: 0x%v\n"
+
+#: elf32-spu.c:3986
+msgid "%s: 0x%v 0x%v\n"
+msgstr "%s: 0x%v 0x%v\n"
+
+#: elf32-spu.c:3991
+msgid "  calls:\n"
+msgstr "  Ð¿Ð¾Ð·Ð¸Ð²Ð¸:\n"
+
+#: elf32-spu.c:3999
+#, c-format
+msgid "   %s%s %s\n"
+msgstr "   %s%s %s\n"
+
+#: elf32-spu.c:4304
+#, c-format
+msgid "%s duplicated in %s\n"
+msgstr "â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¾ Ñƒ â€ž%sâ€œ\n"
+
+#: elf32-spu.c:4308
+#, c-format
+msgid "%s duplicated\n"
+msgstr "â€ž%sâ€œ Ñ˜Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¾\n"
+
+#: elf32-spu.c:4315
+msgid "sorry, no support for duplicate object files in auto-overlay script\n"
+msgstr "Ð¸Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ, Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð´Ñ€ÑˆÐºÐµ Ð·Ð° ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ñƒ Ñ�ÐºÑ€Ð¸Ð¿Ñ‚Ð¸ Ñ�Ð°Ð¼Ð¾-Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°\n"
+
+#: elf32-spu.c:4356
+msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n"
+msgstr "Ð½Ðµ-Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°Ñ˜ÑƒÑ›Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° 0x%v Ð¿Ð»ÑƒÑ� Ð½Ð°Ñ˜Ð²ÐµÑ›Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ° 0x%v Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ðµ Ð¼ÐµÑ�Ð½Ð¾ Ñ�Ð¿Ñ€ÐµÐ¼Ð¸ÑˆÑ‚Ðµ\n"
+
+#: elf32-spu.c:4511
+msgid "%B:%A%s exceeds overlay size\n"
+msgstr "â€ž%B:%A%sâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¿Ñ€ÐµÐºÐ»Ð°Ð¿Ð°ÑšÐ°\n"
+
+#: elf32-spu.c:4673
+msgid "Stack size for call graph root nodes.\n"
+msgstr "Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð·Ð° Ð¿Ð¾Ð·Ð¸Ð² Ñ‡Ð²Ð¾Ñ€Ð¾Ð²Ð° ÐºÐ¾Ñ€ÐµÐ½Ð° Ð³Ñ€Ð°Ñ„Ð¸ÐºÐ°.\n"
+
+#: elf32-spu.c:4674
+msgid ""
+"\n"
+"Stack size for functions.  Annotations: '*' max stack, 't' tail call\n"
+msgstr ""
+"\n"
+"Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð·Ð° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ.  Ð�Ð°Ð¿Ð¾Ð¼ÐµÐ½Ðµ: â€ž*â€œ Ð½Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸Ðº, â€žtâ€œ Ð¿Ð¾Ð·Ð¸Ð² Ð¾Ñ�Ñ‚Ð°Ñ‚ÐºÐ°\n"
+
+#: elf32-spu.c:4684
+msgid "Maximum stack required is 0x%v\n"
+msgstr "Ð�Ð°Ñ˜Ð²ÐµÑ›Ð¸ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°Ð½ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸Ðº Ñ˜Ðµ 0x%v\n"
+
+#: elf32-spu.c:4775
+msgid "fatal error while creating .fixup"
+msgstr "ÐºÐ¾Ð±Ð½Ð° Ð³Ñ€ÐµÑˆÐºÐ° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° â€ž.fixupâ€œ-Ð°"
+
+#: elf32-spu.c:5005
+msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%B(%s+0x%lx): Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf32-tic6x.c:1600
+msgid "warning: generating a shared library containing non-PIC code"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ ÐºÐ¾Ñ˜Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-ÐŸÐ˜Ð¦ ÐºÐ¾Ð´"
+
+#: elf32-tic6x.c:1605
+msgid "warning: generating a shared library containing non-PID code"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ ÐºÐ¾Ñ˜Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð½Ðµ-ÐŸÐ˜Ð” ÐºÐ¾Ð´"
+
+#: elf32-tic6x.c:2524
+msgid "%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ�Ðµ Ð¾Ð´Ð½Ð¾Ñ�Ð¸ Ð½Ð° â€žSBâ€œ Ð°Ð»Ð¸ â€ž__c6xabi_DSBT_BASEâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: elf32-tic6x.c:3648
+msgid "%B: error: unknown mandatory EABI object attribute %d"
+msgstr "%B: Ð³Ñ€ÐµÑˆÐºÐ°: Ð¾Ð±Ð°Ð²ÐµÐ·Ð°Ð½ â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: elf32-tic6x.c:3656
+msgid "%B: warning: unknown EABI object attribute %d"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%dâ€œ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ â€žEABIâ€œ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚"
+
+#: elf32-tic6x.c:3768 elf32-tic6x.c:3776
+msgid "error: %B requires more stack alignment than %B preserves"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð²ÐµÑ›Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ð½ÐµÐ³Ð¾ ÑˆÑ‚Ð¾ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸"
+
+#: elf32-tic6x.c:3786 elf32-tic6x.c:3795
+msgid "error: unknown Tag_ABI_array_object_alignment value in %B"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žTag_ABI_array_object_alignmentâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf32-tic6x.c:3804 elf32-tic6x.c:3813
+msgid "error: unknown Tag_ABI_array_object_align_expected value in %B"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€žTag_ABI_array_object_align_expectedâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf32-tic6x.c:3821 elf32-tic6x.c:3828
+msgid "error: %B requires more array alignment than %B preserves"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð²ÐµÑ›Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð½Ð¸Ð·Ð° Ð½ÐµÐ³Ð¾ ÑˆÑ‚Ð¾ â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸"
+
+#: elf32-tic6x.c:3850
+msgid "warning: %B and %B differ in wchar_t size"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ð¸Ð¼Ð°Ñ˜Ñƒ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ðµ â€žwchar_tâ€œ"
+
+#: elf32-tic6x.c:3868
+msgid "warning: %B and %B differ in whether code is compiled for DSBT"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ñƒ Ð¿Ð¾ Ñ‚Ð¾Ð¼Ðµ Ð´Ð° Ð»Ð¸ Ñ˜Ðµ ÐºÐ¾Ð´ Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½ Ð·Ð° â€žDSBTâ€œ"
+
+#: elf32-v850.c:157
+#, c-format
+msgid "Variable `%s' cannot occupy in multiple small data regions"
+msgstr "Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð·Ð°ÑƒÐ·Ð¼Ðµ Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:160
+#, c-format
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ñ�Ð°Ð¼Ð¾ Ñƒ Ñ˜ÐµÐ´Ð½Ð¾Ð¼ Ð¾Ð´ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸  Ð¼Ð°Ð»Ð¸Ñ…, Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:163
+#, c-format
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð¼Ð°Ð»Ð¸Ñ… Ð¸ Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:166
+#, c-format
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð¼Ð°Ð»Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:169
+#, c-format
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð±Ð¸Ñ‚Ð¸ Ð¸Ñ�Ñ‚Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¾ Ñƒ Ð¾Ð±Ð»Ð°Ñ�Ñ‚Ð¸Ð¼Ð° Ð½ÑƒÐ»Ñ‚Ð¸Ñ… Ð¸ Ð¼Ð°Ñ˜ÑƒÑˆÐ½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:467
+msgid "FAILED to find previous HI16 reloc"
+msgstr "Ð�Ð˜Ð¡Ð�Ðœ Ð£Ð¡ÐŸÐ•Ðž Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€žHI16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf32-v850.c:2293
+msgid "could not locate special linker symbol __gp"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__gpâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: elf32-v850.c:2297
+msgid "could not locate special linker symbol __ep"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__epâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: elf32-v850.c:2301
+msgid "could not locate special linker symbol __ctbp"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð½Ð°Ñ€Ð¾Ñ‡Ð¸Ñ‚ â€ž__ctbpâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: elf32-v850.c:2471 elf32-v850.c:2534
+msgid "%B: Architecture mismatch with previous modules"
+msgstr "%B: Ð�Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°"
+
+#: elf32-v850.c:2478
+msgid "%B: Alignment mismatch with previous modules"
+msgstr "%B: ÐŸÐ¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ðµ Ð¾Ð´ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ñ… Ð¼Ð¾Ð´ÑƒÐ»Ð°"
+
+#. xgettext:c-format.
+#: elf32-v850.c:2553
+#, c-format
+msgid "private flags = %lx: "
+msgstr "Ð¿Ñ€Ð¸Ð²Ð°Ñ‚Ð½Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ = %lx: "
+
+#: elf32-v850.c:2558
+#, c-format
+msgid "unknown v850 architecture"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850â€œ"
+
+#: elf32-v850.c:2560
+#, c-format
+msgid "v850 E3 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850 E3â€œ"
+
+#: elf32-v850.c:2562 elf32-v850.c:2572
+#, c-format
+msgid "v850 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850â€œ"
+
+#: elf32-v850.c:2565
+#, c-format
+msgid ", 8-byte data alignment"
+msgstr ", 8-Ð±Ð¸Ñ‚Ð½Ð¾ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf32-v850.c:2573
+#, c-format
+msgid "v850e architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850eâ€œ"
+
+#: elf32-v850.c:2574
+#, c-format
+msgid "v850e1 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e1â€œ"
+
+#: elf32-v850.c:2575
+#, c-format
+msgid "v850e2 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e2â€œ"
+
+#: elf32-v850.c:2576
+#, c-format
+msgid "v850e2v3 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e2v3â€œ"
+
+#: elf32-v850.c:2577
+#, c-format
+msgid "v850e3v5 architecture"
+msgstr "Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° â€žv850e3v5â€œ"
+
+#: elf32-vax.c:532
+#, c-format
+msgid " [nonpic]"
+msgstr " [Ð½Ðµ-Ð¿Ð¸Ñ†]"
+
+#: elf32-vax.c:535
+#, c-format
+msgid " [d-float]"
+msgstr " [d-Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·]"
+
+#: elf32-vax.c:538
+#, c-format
+msgid " [g-float]"
+msgstr " [g-Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¸ Ð·Ð°Ñ€ÐµÐ·]"
+
+#: elf32-vax.c:656
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žGOTâ€œ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº â€ž%ldâ€œ-Ð° Ð·Ð° â€ž%sâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾Ð¼ â€žGOTâ€œ Ñ�Ð°Ð±Ð¸Ñ€ÐºÑƒ â€ž%ldâ€œ-Ð°"
+
+#: elf32-vax.c:1543
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€žPLTâ€œ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº â€ž%dâ€œ-Ð° Ð·Ð° â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½"
+
+#: elf32-vax.c:1668
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ"
+
+#: elf32-vax.c:1674
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ 0x%x Ð¸Ð· Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ"
+
+#: elf32-xgate.c:686
+#, c-format
+msgid "cpu=XGATE]"
+msgstr "Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€=XGATE]"
+
+#: elf32-xgate.c:688
+#, c-format
+msgid "error reading cpu type from elf private data"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ° Ñ‡Ð¸Ñ‚Ð°ÑšÐ° Ð²Ñ€Ñ�Ñ‚Ðµ Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð° Ð¸Ð· Ð»Ð¸Ñ‡Ð½Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° ÐµÐ»Ñ„-Ð°"
+
+#: elf32-xstormy16.c:455 elf64-ia64-vms.c:2072 elf32-ia64.c:2330
+#: elf64-ia64.c:2330
+msgid "non-zero addend in @fptr reloc"
+msgstr "Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº Ñƒ â€ž@fptrâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ"
+
+#: elf32-xtensa.c:908
+msgid "%B(%A): invalid property table"
+msgstr "%B(%A): Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ð° Ð²Ð»Ð°Ñ�Ð½Ð¸ÑˆÑ‚Ð²Ð°"
+
+#: elf32-xtensa.c:2774
+msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
+msgstr "%B(%A+0x%lx): Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°=0x%x)"
+
+#: elf32-xtensa.c:2853 elf32-xtensa.c:2974
+msgid "dynamic relocation in read-only section"
+msgstr "Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ"
+
+#: elf32-xtensa.c:2950
+msgid "TLS relocation invalid without dynamic sections"
+msgstr "Ð¢Ð›Ð¡ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ˜Ðµ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð±ÐµÐ· Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸Ñ… Ð¾Ð´ÐµÑ™Ð°ÐºÐ°"
+
+#: elf32-xtensa.c:3169
+msgid "internal inconsistency in size of .got.loc section"
+msgstr "ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.got.locâ€œ"
+
+#: elf32-xtensa.c:3482
+msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
+msgstr "%B: Ð½ÐµÑ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ. Ð˜Ð·Ð»Ð°Ð· Ñ˜Ðµ 0x%x, Ð° ÑƒÐ»Ð°Ð· 0x%x"
+
+#: elf32-xtensa.c:4713 elf32-xtensa.c:4721
+msgid "Attempt to convert L32R/CALLX to CALL failed"
+msgstr "ÐŸÐ¾ÐºÑƒÑˆÐ°Ñ˜ Ð¿Ñ€ÐµÑ‚Ð²Ð°Ñ€Ð°ÑšÐ° â€žL32R/CALLXâ€œ Ñƒ â€žCALLâ€œ Ð½Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾"
+
+#: elf32-xtensa.c:6330 elf32-xtensa.c:6406 elf32-xtensa.c:7522
+msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
+msgstr "%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð¼ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ; Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾"
+
+#: elf32-xtensa.c:7262
+msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"
+msgstr "%B(%A+0x%lx): Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð¼ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ Ð·Ð° â€žXTENSA_ASM_SIMPLIFYâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ; Ð²ÐµÑ€Ð¾Ð²Ð°Ñ‚Ð½Ð¾ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾"
+
+#: elf32-xtensa.c:9022
+msgid "invalid relocation address"
+msgstr "Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-xtensa.c:9071
+msgid "overflow after relaxation"
+msgstr "Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð½Ð°ÐºÐ¾Ð½ Ð¾Ð¿ÑƒÑˆÑ‚Ð°ÑšÐ°"
+
+#: elf32-xtensa.c:10203
+msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
+msgstr "%B(%A+0x%lx): Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° Ð·Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf64-alpha.c:474
+msgid "GPDISP relocation did not find ldah and lda instructions"
+msgstr "â€žGPDISPâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð¸Ñ˜Ðµ Ð½Ð°ÑˆÐ»Ð¾ Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ðµ â€žldahâ€œ Ð¸ â€žldaâ€œ"
+
+#: elf64-alpha.c:2503
+msgid "%B: .got subsegment exceeds 64K (size %d)"
+msgstr "%B: Ð¿Ð¾Ð´-Ð¿Ð¾Ð´ÐµÐ¾Ðº â€ž.gotâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ 64K (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ˜Ðµ %d)"
+
+#: elf64-alpha.c:4396 elf64-alpha.c:4408
+msgid "%B: gp-relative relocation against dynamic symbol %s"
+msgstr "%B: â€žgpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-alpha.c:4434 elf64-alpha.c:4574
+msgid "%B: pc-relative relocation against dynamic symbol %s"
+msgstr "%B: â€žpcâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-alpha.c:4462
+msgid "%B: change in gp: BRSGP %s"
+msgstr "%B: Ð¸Ð·Ð¼ÐµÐ½Ð° Ñƒ â€žgpâ€œ-Ñƒ: BRSGP %s"
+
+#: elf64-alpha.c:4487
+msgid "<unknown>"
+msgstr "<Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾>"
+
+#: elf64-alpha.c:4492
+msgid "%B: !samegp reloc against symbol without .prologue: %s"
+msgstr "%B: â€ž!samegpâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð±ÐµÐ· â€ž.prologueâ€œ-Ð°: %s"
+
+#: elf64-alpha.c:4549
+msgid "%B: unhandled dynamic relocation against %s"
+msgstr "%B: Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ’ÐµÐ½Ð¾ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ"
+
+#: elf64-alpha.c:4581
+msgid "%B: pc-relative relocation against undefined weak symbol %s"
+msgstr "%B: â€žpcâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð»Ð°Ð±Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-alpha.c:4645
+msgid "%B: dtp-relative relocation against dynamic symbol %s"
+msgstr "%B: â€ždtpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-alpha.c:4668
+msgid "%B: tp-relative relocation against dynamic symbol %s"
+msgstr "%B: â€žtpâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-hppa.c:2084
+#, c-format
+msgid "stub entry for %s cannot load .plt, dp offset = %ld"
+msgstr "ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð·Ð° â€ž%sâ€œ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° ÑƒÑ‡Ð¸Ñ‚Ð° â€ž.pltâ€œ, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ â€ždpâ€œ = %ld"
+
+#: elf64-hppa.c:3280
+msgid "%B(%A+0x%"
+msgstr "%B(%A+0x%"
+
+#: elf64-ia64-vms.c:587 elf32-ia64.c:619 elf64-ia64.c:619
+msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð¿ÑƒÑ�Ñ‚Ð¸Ð¼ â€žbrâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ. ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ â€žbrlâ€œ Ð¸Ð»Ð¸ Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ."
+
+#: elf64-ia64-vms.c:2027 elf32-ia64.c:2278 elf64-ia64.c:2278
+msgid "@pltoff reloc against local symbol"
+msgstr "â€ž@pltoffâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð»Ð¾ÐºÐ°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elf64-ia64-vms.c:3279 elf32-ia64.c:3684 elf64-ia64.c:3684
+#, c-format
+msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
+msgstr "%s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚Ð° ÐºÑ€Ð°Ñ‚ÐºÐ¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° (0x%lx >= 0x400000)"
+
+#: elf64-ia64-vms.c:3290 elf32-ia64.c:3695 elf64-ia64.c:3695
+#, c-format
+msgid "%s: __gp does not cover short data segment"
+msgstr "%s: â€ž__gpâ€œ Ð½Ðµ Ð¿Ð¾ÐºÑ€Ð¸Ð²Ð° Ñ�ÐµÐ³Ð¼ÐµÐ½Ñ‚ ÐºÑ€Ð°Ñ‚ÐºÐ¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°"
+
+#: elf64-ia64-vms.c:3555 elf32-ia64.c:3962 elf64-ia64.c:3962
+msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
+msgstr "%B: Ð½Ðµ-Ð¿Ð¸Ðº ÐºÐ¾Ð´ Ñ�Ð° â€žimmâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµÐ¼ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-ia64-vms.c:3617 elf32-ia64.c:4029 elf64-ia64.c:4029
+msgid "%B: @gprel relocation against dynamic symbol %s"
+msgstr "%B: â€ž@gprelâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-ia64-vms.c:3676 elf32-ia64.c:4092 elf64-ia64.c:4092
+msgid "%B: linking non-pic code in a position independent executable"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð½Ðµ-Ð¿Ð¸Ðº ÐºÐ¾Ð´ Ñƒ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¾Ð¼ Ð½ÐµÐ·Ð°Ð²Ð¸Ñ�Ð½Ð¾Ð¼ Ð¾Ð´ Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜Ð°"
+
+#: elf64-ia64-vms.c:3777 elf32-ia64.c:4229 elf64-ia64.c:4229
+msgid "%B: @internal branch to dynamic symbol %s"
+msgstr "%B: â€ž@internalâ€œ Ð³Ñ€Ð°Ð½Ð° ÐºÐ° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ"
+
+#: elf64-ia64-vms.c:3779 elf32-ia64.c:4231 elf64-ia64.c:4231
+msgid "%B: speculation fixup to dynamic symbol %s"
+msgstr "%B: Ñ€Ð°Ð·Ð¼Ð°Ñ‚Ñ€Ð°Ð¼ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÑƒ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-ia64-vms.c:3781 elf32-ia64.c:4233 elf64-ia64.c:4233
+msgid "%B: @pcrel relocation against dynamic symbol %s"
+msgstr "%B: â€ž@pcrelâ€œ-Ð¾Ð´Ð½Ð¾Ñ�Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elf64-ia64-vms.c:3905 elf32-ia64.c:4430 elf64-ia64.c:4430
+msgid "unsupported reloc"
+msgstr "Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: elf64-ia64-vms.c:3942 elf32-ia64.c:4468 elf64-ia64.c:4468
+msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."
+msgstr "%B: Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ Ð¢Ð›Ð¡ Ð¾Ð´ÐµÑ™Ð°Ðº Ð·Ð° â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ."
+
+#: elf64-ia64-vms.c:3957 elf32-ia64.c:4483 elf64-ia64.c:4483
+msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð¿ÑƒÑ�Ñ‚Ð¸Ð¼ â€žbrâ€œ (%s) Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ�Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¾Ð¼ 0x%lx (> 0x1000000)."
+
+#: elf64-ia64-vms.c:4246 elf32-ia64.c:4745 elf64-ia64.c:4745
+msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð·Ð°Ñ…Ð²Ð°Ñ‚-Ð½Ð°-Ð�Ð˜Ð¨Ð¢Ð�Ð’Ð�ÐžÐˆ-Ð´ÐµÑ€ÐµÑ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ�Ð° Ð½Ðµ-Ð·Ð°Ñ…Ð²Ð°Ñ‚Ð½Ð¸Ð¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°"
+
+#: elf64-ia64-vms.c:4255 elf32-ia64.c:4754 elf64-ia64.c:4754
+msgid "%B: linking big-endian files with little-endian files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸ Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚Ð¸"
+
+#: elf64-ia64-vms.c:4264 elf32-ia64.c:4763 elf64-ia64.c:4763
+msgid "%B: linking 64-bit files with 32-bit files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ 64-Ð±Ð¸Ñ‚Ð½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ�Ð° 32-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð°"
+
+#: elf64-ia64-vms.c:4273 elf32-ia64.c:4772 elf64-ia64.c:4772
+msgid "%B: linking constant-gp files with non-constant-gp files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€žÐºÐ¾Ð½Ñ�Ñ‚Ð°Ð½Ñ‚Ð½Ð¾Ð³-Ð³Ð¿â€œ-Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° â€žÐ½Ðµ-ÐºÐ¾Ð½Ñ�Ñ‚Ð°Ð½Ñ‚Ð½Ð¾Ð³-Ð³Ð¿â€œ-Ð°"
+
+#: elf64-ia64-vms.c:4283 elf32-ia64.c:4782 elf64-ia64.c:4782
+msgid "%B: linking auto-pic files with non-auto-pic files"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€žÐ°ÑƒÑ‚Ð¾-Ð¿Ð¸Ðºâ€œ-Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° â€žÐ½Ðµ-Ð°ÑƒÑ‚Ð¾-Ð¿Ð¸Ðºâ€œ-Ð°"
+
+#: elf64-ia64-vms.c:5125 elflink.c:4299
+msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%uâ€œ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñƒ â€ž%Bâ€œ Ñ˜Ðµ Ð²ÐµÑ›Ðµ Ð¾Ð´ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐ° (%u) ÑšÐµÐ³Ð¾Ð²Ð¾Ð³ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ"
+
+#: elf64-ia64-vms.c:5131 elflink.c:4305
+msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%uâ€œ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñƒ â€ž%Bâ€œ Ñ˜Ðµ Ð¼Ð°ÑšÐµ Ð¾Ð´ â€ž%uâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf64-ia64-vms.c:5146 elflink.c:4321
+msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð° Ð¸Ð· â€ž%luâ€œ Ñƒ â€ž%Bâ€œ Ñƒ â€ž%luâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf64-mmix.c:986
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or assemble using \"-no-expand\" (for gcc, \"-Wa,-no-expand\""
+msgstr ""
+"Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ»Ð°Ð·Ð° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð´Ð°Ð²Ð°ÑšÐ° Ð½Ðµ-â€žELFâ€œ, Ð½Ðµ-â€žmmoâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¸Ð·Ð»Ð°Ð·Ð°.\n"
+" ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ â€žobjcopyâ€œ Ð´Ð° Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð¸Ð· â€žELFâ€œ-Ð° Ð¸Ð»Ð¸ â€žmmoâ€œ-Ð°,\n"
+" Ð¸Ð»Ð¸ Ñ�Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ‚Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚ÐµÑ›Ð¸ â€ž-no-expandâ€œ (Ð·Ð° Ð³Ñ†Ñ†, â€ž-Wa,-no-expandâ€œ)"
+
+#: elf64-mmix.c:1170
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or compile using the gcc-option \"-mno-base-addresses\"."
+msgstr ""
+"Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ»Ð°Ð·Ð° Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð´Ð°Ð²Ð°ÑšÐ° Ð½Ðµ-â€žELFâ€œ, Ð½Ðµ-â€žmmoâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¸Ð·Ð»Ð°Ð·Ð°.\n"
+" ÐšÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ðµ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ â€žobjcopyâ€œ Ð´Ð° Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€Ð¸Ñ‚Ðµ Ð¸Ð· â€žELFâ€œ-Ð° Ð¸Ð»Ð¸ â€žmmoâ€œ-Ð°,\n"
+" Ð¸Ð»Ð¸ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚ÐµÑ›Ð¸ Ð³Ñ†Ñ†-Ð¾Ð¿Ñ†Ð¸Ñ˜Ñƒ â€ž-mno-base-addressesâ€œ."
+
+#: elf64-mmix.c:1196
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ Ð·Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð·Ð°\n"
+" Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡ÐµÐ¼: Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾: 0x%lx%08lx != Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½Ð¾: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1618
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ Ð¿Ð»ÑƒÑ� Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: (Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾) Ñƒ â€ž%sâ€œ"
+
+#: elf64-mmix.c:1623
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ Ð¿Ð»ÑƒÑ� Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: â€ž%sâ€œ Ñƒ â€ž%sâ€œ"
+
+#: elf64-mmix.c:1667
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð½Ðµ-Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: (Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾) Ñƒ â€ž%sâ€œ"
+
+#: elf64-mmix.c:1672
+#, c-format
+msgid "%s: register relocation against non-register symbol: %s in %s"
+msgstr "%s: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð½Ðµ-Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð°: â€ž%sâ€œ Ñƒ â€ž%sâ€œ"
+
+#: elf64-mmix.c:1709
+#, c-format
+msgid "%s: directive LOCAL valid only with a register or absolute value"
+msgstr "%s: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° â€žLOCALâ€œ Ñ˜Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ�Ð°Ð¼Ð¾ Ñ�Ð° Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð¾Ð¼ Ð¸Ð»Ð¸ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾Ð¼ Ð²Ñ€ÐµÐ´Ð½Ð¾ÑˆÑ›Ñƒ"
+
+#: elf64-mmix.c:1739
+#, c-format
+msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
+msgstr "%s: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° â€žLOCALâ€œ: Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ â€ž$%ldâ€œ Ð½Ð¸Ñ˜Ðµ Ð¼ÐµÑ�Ð½Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€.  ÐŸÑ€Ð²Ð¸ Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ñ˜Ðµ â€ž$%ldâ€œ."
+
+#: elf64-mmix.c:2198
+#, c-format
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Ð“Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð·Ð° â€ž%sâ€œ; Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½ Ñƒ Ñ€Ð°Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð°Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸\n"
+
+#: elf64-mmix.c:2252
+msgid "Register section has contents\n"
+msgstr "ÐžÐ´ÐµÑ™Ð°Ðº Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜\n"
+
+#: elf64-mmix.c:2441
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Ð£Ð½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð½ÐµÐ´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚: Ð¿Ñ€ÐµÐ¾Ñ�Ñ‚Ð°Ñ˜Ðµ %u != Ð½Ð°Ñ˜Ð². %u.\n"
+"  ÐŸÑ€Ð¸Ñ˜Ð°Ð²Ð¸Ñ‚Ðµ Ð¾Ð²Ñƒ Ð³Ñ€ÐµÑˆÐºÑƒ."
+
+#: elf64-ppc.c:4463
+msgid "%P: %B: cannot create stub entry %s\n"
+msgstr "%P: %B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ�Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ ÑƒÐ½Ð¾Ñ� Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ\n"
+
+#: elf64-ppc.c:4810
+msgid "%P: symbol '%s' has invalid st_other for ABI version 1\n"
+msgstr "%P: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ â€žst_otherâ€œ Ð·Ð° Ð�Ð‘Ð˜ Ð¸Ð·Ð´Ð°ÑšÐµ 1\n"
+
+#: elf64-ppc.c:5170
+msgid "%P: .opd not allowed in ABI version %d\n"
+msgstr "%P: â€ž.opdâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð¿ÑƒÑˆÑ‚ÐµÐ½ Ñƒ Ð�Ð‘Ð˜-Ñ˜Ñƒ Ð¸Ð·Ð´Ð°ÑšÐµ %d\n"
+
+#: elf64-ppc.c:5809
+msgid "%B uses unknown e_flags 0x%lx"
+msgstr "â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ â€že_flagsâ€œ 0x%lx"
+
+#: elf64-ppc.c:5816
+msgid "%B: ABI version %ld is not compatible with ABI version %ld output"
+msgstr "%B: Ð�Ð‘Ð˜ Ð¸Ð·Ð´Ð°ÑšÐµ %ld Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð¾ Ñ�Ð° Ð�Ð‘Ð˜-Ñ˜ÐµÐ¼ Ð¸Ð·Ð´Ð°ÑšÐ° %ld"
+
+#: elf64-ppc.c:5843
+#, c-format
+msgid " [abiv%ld]"
+msgstr " [abiv%ld]"
+
+#: elf64-ppc.c:7007
+msgid "%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc\n"
+msgstr "%P: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÐ¼Ð½Ð¾Ð¶Ð°Ð²Ð°ÑšÐ° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð»ÐµÑšÐ¾ â€žpltâ€œ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµ; Ð¸Ð·Ð±ÐµÐ³Ð°Ð²Ð°Ñ˜Ñ‚Ðµ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐµ â€žLD_BIND_NOW=1â€œ Ð¸Ð»Ð¸ Ð½Ð°Ð´Ð¾Ð³Ñ€Ð°Ð´Ð¸Ñ‚Ðµ Ð³Ñ†Ñ†\n"
+
+#: elf64-ppc.c:7270
+msgid "%B: undefined symbol on R_PPC64_TOCSAVE relocation"
+msgstr "%B: Ð½ÐµÐ¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ð½Ð° â€žR_PPC64_TOCSAVEâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ"
+
+#: elf64-ppc.c:7499
+msgid "%P: dynreloc miscount for %B, section %A\n"
+msgstr "%P: Ð³Ñ€ÐµÑˆÐºÐ° Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð·Ð° â€ž%Bâ€œ, Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ\n"
+
+#: elf64-ppc.c:7583
+msgid "%B: .opd is not a regular array of opd entries"
+msgstr "%B: â€ž.opdâ€œ Ð½Ð¸Ñ˜Ðµ Ñ€ÐµÐ³ÑƒÐ»Ð°Ñ€Ð°Ð½ Ð½Ð¸Ð· ÑƒÐ½Ð¾Ñ�Ð° Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð°"
+
+#: elf64-ppc.c:7592
+msgid "%B: unexpected reloc type %u in .opd section"
+msgstr "%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%uâ€œ Ñƒ â€ž.opdâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ"
+
+#: elf64-ppc.c:7613
+msgid "%B: undefined sym `%s' in .opd section"
+msgstr "%B: Ð½ÐµÐ¾Ð´Ñ€ÐµÑ’ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž.opdâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ"
+
+#: elf64-ppc.c:8177
+msgid "%H __tls_get_addr lost arg, TLS optimization disabled\n"
+msgstr "â€ž%Hâ€œ â€ž__tls_get_addrâ€œ Ñ˜Ðµ Ð¸Ð·Ð³ÑƒÐ±Ð¸Ð¾ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚, Ð¢Ð›Ð¡ Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ˜Ðµ Ð¸Ñ�ÐºÑ™ÑƒÑ‡ÐµÐ½Ð°\n"
+
+#: elf64-ppc.c:8516 elf64-ppc.c:9139
+#, c-format
+msgid "%s defined on removed toc entry"
+msgstr "â€ž%sâ€œ Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð½Ð° ÑƒÐºÐ»Ð¾ÑšÐµÐ½Ð¾Ð¼ ÑƒÐ½Ð¾Ñ�Ñƒ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°"
+
+#: elf64-ppc.c:8868
+msgid "%P: %H: toc optimization is not supported for %s instruction.\n"
+msgstr "%P: %H: Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° Ð·Ð° Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ñƒ â€ž%sâ€œ.\n"
+
+#: elf64-ppc.c:9096
+msgid "%P: %H: %s references optimized away TOC entry\n"
+msgstr "%P: %H: â€ž%sâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð¾Ð¿Ñ‚Ð¸Ð¼Ð¸Ð·Ð°Ñ†Ð¸Ñ˜Ð¾Ð¼ Ð¾Ð´Ñ�Ñ‚Ñ€Ð°ÑšÐµÐ½Ð¸ ÑƒÐ½Ð¾Ñ� Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°\n"
+
+#: elf64-ppc.c:10394
+msgid "%P: cannot find opd entry toc for `%T'\n"
+msgstr "%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° ÑƒÐ½Ð¾Ñ�Ð° Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð° Ð·Ð° â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:10479
+msgid "%P: long branch stub `%s' offset overflow\n"
+msgstr "%P: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ð° Ð´ÑƒÐ³Ð¾Ð³ Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ\n"
+
+#: elf64-ppc.c:10538
+msgid "%P: can't find branch stub `%s'\n"
+msgstr "%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ\n"
+
+#: elf64-ppc.c:10602 elf64-ppc.c:10749 elf64-ppc.c:12416
+msgid "%P: linkage table error against `%T'\n"
+msgstr "%P: Ð³Ñ€ÐµÑˆÐºÐ° Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:10940
+msgid "%P: can't build branch stub `%s'\n"
+msgstr "%P: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¸Ð·Ð³Ñ€Ð°Ð´Ð¸Ð¼ Ð¾ÐºÑ€Ð°Ñ˜Ð°Ðº Ð³Ñ€Ð°Ð½Ðµ â€ž%sâ€œ\n"
+
+#: elf64-ppc.c:11748
+msgid "%B section %A exceeds stub group size"
+msgstr "â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð³Ñ€ÑƒÐ¿Ðµ Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ°"
+
+#: elf64-ppc.c:12662 elf64-ppc.c:12697
+msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
+msgstr "%P: â€ž%sâ€œ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ˜Ðµ Ð¿Ñ€ÐµÐ²ÐµÐ»Ð¸Ðº Ð·Ð° â€ž.eh_frame sdata4â€œ ÐºÐ¾Ð´Ð¸Ñ€Ð°ÑšÐµ"
+
+#: elf64-ppc.c:12758
+msgid "%P: stubs don't match calculated size\n"
+msgstr "%P: Ð¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°Ñ˜Ñƒ Ð¸Ð·Ñ€Ð°Ñ‡ÑƒÐ½Ð°Ñ‚Ð¾Ñ˜ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð¸\n"
+
+#: elf64-ppc.c:12770
+#, c-format
+msgid ""
+"linker stubs in %u group%s\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu\n"
+"  plt call toc %lu"
+msgstr ""
+"Ð¾ÐºÑ€Ð°Ñ˜Ñ†Ð¸ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð° Ñƒ â€ž%uâ€œ Ð³Ñ€ÑƒÐ¿Ð° â€ž%sâ€œ\n"
+"  Ð³Ñ€Ð°Ð½Ð°            %lu\n"
+"  Ñ‚Ð°Ñ� ÑƒÑ€ÐµÑ’ÐµÑšÐµ      %lu\n"
+"  Ð´ÑƒÐ³Ð° Ð±Ñ€Ð°Ð½Ð°       %lu\n"
+"  ÑƒÑ€ÐµÑ’ÐµÑšÐµ Ð´ÑƒÐ³Ðµ Ñ‚Ð°Ñ� %lu\n"
+"  Ð¿Ð»Ñ‚ Ð¿Ð¾Ð·Ð¸Ð²        %lu\n"
+"  Ð¿Ð»Ñ‚ Ð¿Ð¾Ð·Ð¸Ð²Ð° Ñ‚Ð°Ñ�   %lu"
+
+#: elf64-ppc.c:13096
+msgid "%P: %H: %s used with TLS symbol `%T'\n"
+msgstr "%P: %H: â€ž%sâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¾ Ñ�Ð° Ð¢Ð›Ð¡ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:13097
+msgid "%P: %H: %s used with non-TLS symbol `%T'\n"
+msgstr "%P: %H: â€ž%sâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¾ Ñ�Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð¾Ð¼ â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:13675
+msgid "%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC\n"
+msgstr "%P: %H: Ð¿Ð¾Ð·Ð¸Ð²Ñƒ Ð·Ð° â€ž%Tâ€œ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€žnopâ€œ, Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð²Ñ€Ð°Ñ‚Ð¸Ð¼ Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ\n"
+
+#: elf64-ppc.c:13793
+msgid "%P: %B: unknown relocation type %d for `%T'\n"
+msgstr "%P: %B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð·Ð° â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:14310
+msgid "%P: %H: %s for indirect function `%T' unsupported\n"
+msgstr "%P: %H: â€ž%sâ€œ Ð·Ð° Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ â€ž%Tâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾\n"
+
+#: elf64-ppc.c:14417
+msgid "%P: %B: %s is not supported for `%T'\n"
+msgstr "%P: %B: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:14565
+msgid "%P: %H: error: %s not a multiple of %u\n"
+msgstr "%P: %H: Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ â€ž%uâ€œ\n"
+
+#: elf64-ppc.c:14586
+msgid "%P: %H: unresolvable %s against `%T'\n"
+msgstr "%P: %H: â€ž%sâ€œ Ñ˜Ðµ Ð½ÐµÑ€ÐµÑˆÐ¸Ð²Ð¾ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ\n"
+
+#: elf64-ppc.c:14644
+msgid "%P: %H: %s against `%T': error %d\n"
+msgstr "%P: %H: â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%Tâ€œ: Ð³Ñ€ÐµÑˆÐºÐ° %d\n"
+
+#: elf64-sh64.c:1686
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: Ð³Ñ€ÐµÑˆÐºÐ°: Ð½ÐµÐ¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ Ð½Ð° %08x Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ %08x\n"
+
+#: elf64-sparc.c:446
+msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
+msgstr "%B: Ð¡Ð°Ð¼Ð¾ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð¸ â€ž%%g[2367]â€œ Ð¼Ð¾Ð³Ñƒ Ð±Ð¸Ñ‚Ð¸ Ð´ÐµÐºÐ»Ð°Ñ€Ð¸Ñ�Ð°Ð½Ð¸ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÑšÐµÐ¼ â€žSTT_REGISTERâ€œ"
+
+#: elf64-sparc.c:466
+msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
+msgstr "Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ â€ž%%g%dâ€œ Ñ˜Ðµ ÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½ Ð½ÐµÑ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð¾: â€ž%sâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€ž%sâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf64-sparc.c:489
+msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
+msgstr "Ð¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ: â€žREGISTERâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€ž%sâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf64-sparc.c:534
+msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
+msgstr "Ð¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ: â€ž%sâ€œ Ñƒ â€ž%Bâ€œ, Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾ â€žREGISTERâ€œ Ñƒ â€ž%Bâ€œ"
+
+#: elf64-sparc.c:687
+msgid "%B: linking UltraSPARC specific with HAL specific code"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ ÐºÐ¾Ð´ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð°Ð½ â€žUltraSPARCâ€œ-Ñƒ Ñ�Ð° ÐºÐ¾Ð´Ð¾Ð¼ Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð½Ð¸Ð¼ â€žHALâ€œ-Ñƒ"
+
+#: elf64-x86-64.c:1530
+msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+msgstr "%B: â€ž%sâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾ Ñƒ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ x32"
+
+#: elf64-x86-64.c:1688
+msgid "%B: '%s' accessed both as normal and thread local symbol"
+msgstr "%B: â€ž%sâ€œ Ñ�Ðµ Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿Ð¸Ð»Ð¾ Ð¸ ÐºÐ°Ð¾ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¾Ð¼ Ð¸ ÐºÐ°Ð¾ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ Ð»Ð¾ÐºÐ°Ð»Ð½Ðµ Ð½Ð¸Ñ‚Ð¸"
+
+#: elf64-x86-64.c:3405 /src/binutils-gdb/bfd/elfnn-aarch64.c:3511
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€žSTT_GNU_IFUNCâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð¸Ð¼Ð° Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº: %d"
+
+#: elf64-x86-64.c:3667
+msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€žR_X86_64_GOTOFF64â€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ðµ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ ÐºÐ°Ð´Ð° Ñ�Ðµ Ñ�Ñ‚Ð²Ð°Ñ€Ð° Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚"
+
+#: elf64-x86-64.c:3787
+msgid "; recompile with -fPIC"
+msgstr "; Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð¿Ñ€ÐµÐ²ÐµÐ´Ð¸Ñ‚Ðµ Ñ�Ð° â€ž-fPICâ€œ"
+
+#: elf64-x86-64.c:3792
+msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s"
+
+#: elf64-x86-64.c:3794
+msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ â€ž%sâ€œ â€ž%sâ€œ Ñ�Ðµ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸Ñ‚Ð¸ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ñ�Ñ‚Ð²Ð°Ñ€Ð°ÑšÐ° Ð´ÐµÑ™ÐµÐ½Ð¾Ð³ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°%s"
+
+#: elf64-x86-64.c:3900
+msgid "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº -0x%x Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elf64-x86-64.c:3908
+msgid "%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: Ñ�Ð°Ð±Ð¸Ñ€Ð°Ðº 0x%x Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ â€ž%sâ€œ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°"
+
+#: elfcode.h:760
+#, c-format
+msgid "warning: %s has a corrupt string table index - ignoring"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%sâ€œ Ð¸Ð¼Ð° Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ‚Ð°Ð±ÐµÐ»Ðµ Ð½Ð¸Ñ�ÐºÐµ â€” Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼"
+
+#: elfcode.h:1186
+#, c-format
+msgid "%s: version count (%ld) does not match symbol count (%ld)"
+msgstr "%s: Ð±Ñ€Ð¾Ñ˜ Ð¸Ð·Ð´Ð°ÑšÐ° (%ld) Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð±Ñ€Ð¾Ñ˜Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° (%ld)"
+
+#: elfcode.h:1440
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%dâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° %ld"
+
+#: elfcore.h:305
+msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu."
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ Ñ˜Ðµ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ð¾: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜ÐµÐ·Ð³Ñ€Ð° >= %lu, Ð½Ð°Ñ’Ð¾Ñ…: %lu."
+
+#: elflink.c:1143
+msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"
+msgstr "%s: Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð¸ Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elflink.c:1148
+msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
+msgstr "%s: Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ â€ž%Bâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð¸ Ñƒ â€ž%Bâ€œ"
+
+#: elflink.c:1153
+msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
+msgstr "%s: Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð¸ Ñƒ â€ž%Bâ€œ"
+
+#: elflink.c:1158
+msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
+msgstr "%s: Ð¢Ð›Ð¡ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ â€ž%Bâ€œ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð½Ðµ-Ð¢Ð›Ð¡ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð¸ Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elflink.c:1763
+msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°ÑšÐµ Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¾ Ð²ÐµÑ€Ð·Ð¸Ð¾Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: elflink.c:2066
+msgid "%B: version node not found for symbol %s"
+msgstr "%B: Ð½Ð¸Ñ�Ð°Ð¼ Ð½Ð°ÑˆÐ°Ð¾ Ñ‡Ð²Ð¾Ñ€ Ð¸Ð·Ð´Ð°ÑšÐ° Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ"
+
+#: elflink.c:2157
+msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
+msgstr "%B: Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° (0x%lx >= 0x%lx) Ð·Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ"
+
+#: elflink.c:2168
+msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table"
+msgstr "%B: Ð½Ðµ-Ð½ÑƒÐ»Ñ‚Ð¸ Ð¸Ð½Ð´ÐµÐºÑ� Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° (0x%lx) Ð·Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ ÐºÐ°Ð´Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð½ÐµÐ¼Ð° Ñ‚Ð°Ð±ÐµÐ»Ñƒ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elflink.c:2358
+msgid "%B: relocation size mismatch in %B section %A"
+msgstr "%B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ñƒ â€ž%Bâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elflink.c:2640
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²Ñ€Ñ�Ñ‚Ð° Ð¸ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½Ð¸Ñ�Ñƒ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ðµ"
+
+#: elflink.c:3403
+msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n"
+msgstr "%P: Ð½Ð°Ñ’Ð¾Ñ… Ð¸Ð·Ð¼ÐµÑšÐµÐ½Ð¸ â€žELFâ€œ Ð¼Ð°ÑˆÐ¸Ð½Ñ�ÐºÐ¸ ÐºÐ¾Ð´ (%d) Ñƒ â€ž%Bâ€œ, Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… â€ž%dâ€œ\n"
+
+#: elflink.c:4032
+msgid "%B: %s: invalid version %u (max %d)"
+msgstr "%B: %s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ %u (Ð½Ð°Ñ˜Ð². %d)"
+
+#: elflink.c:4068
+msgid "%B: %s: invalid needed version %d"
+msgstr "%B: %s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ %d"
+
+#: elflink.c:4452
+msgid "%B: undefined reference to symbol '%s'"
+msgstr "%B: Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð° ÑƒÐ¿ÑƒÑ‚Ð° ÐºÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ â€ž%sâ€œ"
+
+#: elflink.c:5523
+msgid "%B: stack size specified and %s set"
+msgstr "%B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ð° Ð¸ â€ž%sâ€œ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð°"
+
+#: elflink.c:5526
+msgid "%B: %s not absolute"
+msgstr "%B: â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ð¾"
+
+#: elflink.c:5824
+#, c-format
+msgid "%s: undefined version: %s"
+msgstr "%s: Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð¸Ð·Ð´Ð°ÑšÐµ: %s"
+
+#: elflink.c:5892
+msgid "%B: .preinit_array section is not allowed in DSO"
+msgstr "%B: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž.preinit_arrayâ€œ Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð·Ð²Ð¾Ñ™ÐµÐ½ Ñƒ â€žDSOâ€œ-Ñƒ"
+
+#: elflink.c:7657
+#, c-format
+msgid "undefined %s reference in complex symbol: %s"
+msgstr "Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð° â€ž%sâ€œ ÑƒÐ¿ÑƒÑ‚Ð° Ñƒ Ñ�Ð»Ð¾Ð¶ÐµÐ½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ: %s"
+
+#: elflink.c:7811
+#, c-format
+msgid "unknown operator '%c' in complex symbol"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð¾Ð¿ÐµÑ€Ð°Ñ‚Ð¾Ñ€ â€ž%câ€œ Ñƒ Ñ�Ð»Ð¾Ð¶ÐµÐ½Ð¾Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ñƒ"
+
+#: elflink.c:8165 elflink.c:8182 elflink.c:8219 elflink.c:8236
+msgid "%B: Unable to sort relocs - they are in more than one size"
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€” Ð¸Ð¼Ð°Ñ˜Ñƒ Ð²Ð¸ÑˆÐµ Ð¾Ð´ Ñ˜ÐµÐ´Ð½Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ"
+
+#: elflink.c:8196 elflink.c:8250
+msgid "%B: Unable to sort relocs - they are of an unknown size"
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ñ€ÐµÑ’Ð°Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€” Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ðµ Ñ�Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ"
+
+#: elflink.c:8301
+msgid "Not enough memory to sort relocations"
+msgstr "Ð�ÐµÐ¼Ð° Ð´Ð¾Ð²Ð¾Ñ™Ð½Ð¾ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ðµ Ð·Ð° Ñ€ÐµÑ’Ð°ÑšÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°"
+
+#: elflink.c:8494
+msgid "%B: Too many sections: %d (>= %d)"
+msgstr "%B: ÐŸÑ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ°: %d (>= %d)"
+
+#: elflink.c:8775
+msgid "%B: internal symbol `%s' in %B is referenced by DSO"
+msgstr "%B: Ð½Ð° ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ"
+
+#: elflink.c:8777
+msgid "%B: hidden symbol `%s' in %B is referenced by DSO"
+msgstr "%B: Ð½Ð° Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ"
+
+#: elflink.c:8779
+msgid "%B: local symbol `%s' in %B is referenced by DSO"
+msgstr "%B: Ð½Ð° Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñƒ â€ž%Bâ€œ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ â€žDSOâ€œ"
+
+#: elflink.c:8890
+msgid "%B: could not find output section %A for input section %A"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð·Ð° ÑƒÐ»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: elflink.c:9013
+msgid "%B: protected symbol `%s' isn't defined"
+msgstr "%B: Ð·Ð°ÑˆÑ‚Ð¸Ñ›ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½"
+
+#: elflink.c:9015
+msgid "%B: internal symbol `%s' isn't defined"
+msgstr "%B: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½"
+
+#: elflink.c:9017
+msgid "%B: hidden symbol `%s' isn't defined"
+msgstr "%B: Ñ�ÐºÑ€Ð¸Ð²ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½"
+
+#: elflink.c:9043
+msgid "%B: No symbol version section for versioned symbol `%s'"
+msgstr "%B: Ð�ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¸Ð·Ð´Ð°ÑšÐ° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð·Ð° Ð²ÐµÑ€Ð·Ð¸Ð¾Ð½Ð¸Ñ�Ð°Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ"
+
+#: elflink.c:9598
+msgid "error: %B: size of section %A is not multiple of address size"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: %B: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ"
+
+#: elflink.c:9645
+msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: â€ž%Bâ€œ Ñ�Ð°Ð´Ñ€Ð¶Ð¸ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ (0x%s) Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ ÐºÐ¾Ñ˜Ð¸ ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ðµ Ð½Ð° Ð½Ðµ-Ð¿Ð¾Ñ�Ñ‚Ð¾Ñ˜ÐµÑ›Ð¸ Ð¾Ð¿ÑˆÑ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð»"
+
+#: elflink.c:10369
+msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+msgstr "â€ž%Aâ€œ Ð¸Ð¼Ð° Ð¸ ÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ [â€ž%Aâ€œ Ñƒ â€ž%Bâ€œ] Ð¸ Ð½ÐµÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ [â€ž%Aâ€œ Ñƒ â€ž%Bâ€œ] Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: elflink.c:10374
+#, c-format
+msgid "%A has both ordered and unordered sections"
+msgstr "â€ž%Aâ€œ Ð¸Ð¼Ð° Ð¸ ÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ Ð¸ Ð½ÐµÑƒÑ€ÐµÑ’ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: elflink.c:10982
+msgid "%B: file class %s incompatible with %s"
+msgstr "%B: ÐºÐ»Ð°Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° â€ž%sâ€œ"
+
+#: elflink.c:11303 elflink.c:11347
+msgid "%B: could not find output section %s"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¸Ð·Ð»Ð°Ð·Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: elflink.c:11308
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð½ÑƒÐ»Ñ‚Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ"
+
+#: elflink.c:11353
+#, c-format
+msgid "warning: section '%s' is being made into a note"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñ˜Ðµ Ð¿Ñ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½ Ñƒ Ð±ÐµÐ»ÐµÑˆÐºÑƒ"
+
+#: elflink.c:11419
+msgid "%P%X: read-only segment has dynamic relocations.\n"
+msgstr "%P%X: Ð¾Ð´ÐµÑ™Ð°Ðº Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ Ð¸Ð¼Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°.\n"
+
+#: elflink.c:11422
+msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+msgstr "%P: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ�Ñ‚Ð²Ð°Ñ€Ð°Ð¼ â€žDT_TEXTRELâ€œ Ñƒ Ð´ÐµÑ™ÐµÐ½Ð¾Ð¼ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ñƒ.\n"
+
+#: elflink.c:11545
+msgid "%P%X: can not read symbols: %E\n"
+msgstr "%P%X: Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ‡Ð¸Ñ‚Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ: %E\n"
+
+#: elflink.c:11989
+msgid "Removing unused section '%s' in file '%B'"
+msgstr "Ð£ÐºÐ»Ð°ÑšÐ°Ð¼ Ð½ÐµÐºÐ¾Ñ€Ð¸ÑˆÑ›ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ â€ž%Bâ€œ"
+
+#: elflink.c:12200
+msgid "Warning: gc-sections option ignored"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¾Ð¿Ñ†Ð¸Ñ˜Ð° â€žgcâ€œ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° Ñ˜Ðµ Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÐµÐ½Ð°"
+
+#: elflink.c:12489
+#, c-format
+msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgstr "â€žINPUT_SECTION_FLAG %sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾\n"
+
+#: elfxx-mips.c:1419
+msgid "static procedure (no name)"
+msgstr "Ñ�Ñ‚Ð°Ñ‚Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿Ð°Ðº (Ð±ÐµÐ· Ð½Ð°Ð·Ð¸Ð²Ð°)"
+
+#: elfxx-mips.c:5476
+msgid "MIPS16 and microMIPS functions cannot call each other"
+msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ â€žMIPS16â€œ Ð¸ â€žmicroMIPSâ€œ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð·Ð¸Ð²Ð°Ñ˜Ñƒ Ñ˜ÐµÐ´Ð½Ð° Ð´Ñ€ÑƒÐ³Ñƒ"
+
+#: elfxx-mips.c:6087
+msgid "%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled."
+msgstr "%B: %A+0x%lx: Ð�ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ Ñ�ÐºÐ¾Ðº Ð¸Ð·Ð¼ÐµÑ’Ñƒ Ð˜Ð¡Ð� Ñ€ÐµÐ¶Ð¸Ð¼Ð°; Ñ€Ð°Ð·Ð¼Ð¾Ñ‚Ñ€Ð¸Ñ‚Ðµ Ð¿Ð¾Ð½Ð¾Ð²Ð½Ð¾ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐµ Ñ�Ð° ÑƒÐºÑ™ÑƒÑ‡ÐµÐ½Ð¸Ð¼ Ð¼ÐµÑ’ÑƒÐ¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐµÐ¼."
+
+#: elfxx-mips.c:6756 elfxx-mips.c:6979
+msgid "%B: Warning: bad `%s' option size %u smaller than its header"
+msgstr "%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð»Ð¾ÑˆÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð¿Ñ†Ð¸Ñ˜Ðµ â€ž%sâ€œ %u Ð¼Ð°ÑšÐ° Ð¾Ð´ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ð°"
+
+#: elfxx-mips.c:7734 elfxx-mips.c:7859
+msgid "%B: Warning: cannot determine the target function for stub section `%s'"
+msgstr "%B: Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ð´Ñ€ÐµÐ´Ð¸Ð¼ Ñ†Ð¸Ñ™Ð½Ñƒ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ñƒ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº Ð¾ÐºÑ€Ð°Ñ˜ÐºÐ° â€ž%sâ€œ"
+
+#: elfxx-mips.c:7990
+msgid "%B: Malformed reloc detected for section %s"
+msgstr "%B: ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½Ð¾ Ñ˜Ðµ Ð»Ð¾ÑˆÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ"
+
+#: elfxx-mips.c:8065
+msgid "%B: GOT reloc at 0x%lx not expected in executables"
+msgstr "%B: â€žGOTâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¾ Ñƒ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð¸Ð¼"
+
+#: elfxx-mips.c:8199
+msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%B: â€žCALL16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð° 0x%lx Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: elfxx-mips.c:8977
+#, c-format
+msgid "non-dynamic relocations refer to dynamic symbol %s"
+msgstr "Ð½Ðµ-Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° ÑƒÐ¿ÑƒÑ›ÑƒÑ˜Ñƒ Ð½Ð° Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ"
+
+#: elfxx-mips.c:9877
+msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ ÑƒÐ¿Ð¾Ñ€ÐµÑ’ÑƒÑ˜ÑƒÑ›Ðµ â€žLO16â€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð½Ð°Ñ�Ð¿Ñ€Ð°Ð¼ â€ž%sâ€œ Ð·Ð° â€ž%sâ€œ Ð½Ð° 0x%lx Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%Aâ€œ"
+
+#: elfxx-mips.c:10016
+msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)"
+msgstr "Ð¾Ð´ÐµÑ™Ð°Ðº Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¿Ñ€ÐµÐ²Ð°Ð·Ð¸Ð»Ð°Ð·Ð¸ 64KB; Ð´Ð¾ÑšÐ° Ð³Ñ€Ð°Ð½Ð¸Ñ†Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ð¼Ð°Ð»Ð¸Ñ… Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° (Ð²Ð¸Ð´Ð¸Ñ‚Ðµ Ð¾Ð¿Ñ†Ð¸Ñ˜Ñƒ â€ž-Gâ€œ)"
+
+#: elfxx-mips.c:10035
+msgid "JALX to a non-word-aligned address"
+msgstr "â€žJALXâ€œ Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ñƒ Ð½Ðµ-Ñ€ÐµÑ‡Ñ˜Ñƒ"
+
+#: elfxx-mips.c:10402 elfxx-mips.c:10966
+msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
+msgstr "%B: â€ž%Aâ€œ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ %ld Ð¸Ð· â€ž%Aâ€œ Ð¸Ð·Ð° Ð¾Ð¿Ñ�ÐµÐ³Ð° â€žADDIUPCâ€œ"
+
+#: elfxx-mips.c:13990
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð½Ð°Ð·Ð¸Ð² Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ"
+
+#: elfxx-mips.c:14375 elfxx-mips.c:14381 elfxx-mips.c:14387 elfxx-mips.c:14407
+#: elfxx-mips.c:14413 elfxx-mips.c:14419 elfxx-mips.c:14441 elfxx-mips.c:14460
+#: elfxx-mips.c:14467 elfxx-mips.c:14474
+msgid "Warning: %B uses %s (set by %B), %B uses %s"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ"
+
+#: elfxx-mips.c:14394 elfxx-mips.c:14426 elfxx-mips.c:14447 elfxx-mips.c:14480
+msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ"
+
+#: elfxx-mips.c:14493 elfxx-mips.c:14501 elfxx-mips.c:14509 elfxx-mips.c:14517
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ"
+
+#: elfxx-mips.c:14525
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð�Ð‘Ð˜ Ñ‚Ð°Ñ‡ÐºÑƒ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³ Ð·Ð°Ñ€ÐµÐ·Ð° â€ž%dâ€œ"
+
+#: elfxx-mips.c:14548
+msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ"
+
+#: elfxx-mips.c:14559
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ â€ž%sâ€œ"
+
+#: elfxx-mips.c:14567
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ (Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾ Ñ�Ð° â€ž%Bâ€œ), â€ž%Bâ€œ ÐºÐ¾Ñ€Ð¸Ñ�Ñ‚Ð¸ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ ÐœÐ¡Ð� Ð�Ð‘Ð˜ â€ž%dâ€œ"
+
+#: elfxx-mips.c:14599
+msgid "%B: endianness incompatible with that of the selected emulation"
+msgstr "%B: ÐºÑ€Ð°Ñ˜ÑšÐ¾Ñ�Ñ‚ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð½Ð¾Ð¼ Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ðµ ÐµÐ¼ÑƒÐ»Ð°Ñ†Ð¸Ñ˜Ðµ"
+
+#: elfxx-mips.c:14610
+msgid "%B: ABI is incompatible with that of the selected emulation"
+msgstr "%B: Ð�Ð‘Ð˜ Ð½Ð¸Ñ˜Ðµ Ñ�Ð°Ð³Ð»Ð°Ñ�Ð½Ð° Ñ�Ð° Ð¾Ð½Ð¾Ð¼ Ð¸Ð·Ð°Ð±Ñ€Ð°Ð½Ðµ ÐµÐ¼ÑƒÐ»Ð°Ñ†Ð¸Ñ˜Ðµ"
+
+#: elfxx-mips.c:14694
+msgid "%B: warning: linking abicalls files with non-abicalls files"
+msgstr "%B: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð°Ð±Ð¸Ð¿Ð¾Ð·Ð¸Ð²Ð° Ñ�Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°Ð¼Ð° Ð½Ðµ-Ð°Ð±Ð¸Ð¿Ð¾Ð·Ð¸Ð²Ð°"
+
+#: elfxx-mips.c:14711
+msgid "%B: linking 32-bit code with 64-bit code"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ 32-Ð±Ð¸Ñ‚Ð½Ð¸ ÐºÐ¾Ð´ Ñ�Ð° 64-Ð±Ð¸Ñ‚Ð½Ð¸Ð¼ ÐºÐ¾Ð´Ð¾Ð¼"
+
+#: elfxx-mips.c:14739 elfxx-mips.c:14802
+msgid "%B: linking %s module with previous %s modules"
+msgstr "%B: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°"
+
+#: elfxx-mips.c:14762
+msgid "%B: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%B: Ð�Ð‘Ð˜ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°"
+
+#: elfxx-mips.c:14786
+msgid "%B: ASE mismatch: linking %s module with previous %s modules"
+msgstr "%B: Ð�Ð¡Ð• Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°: Ð¿Ð¾Ð²ÐµÐ·ÑƒÑ˜ÐµÐ¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð° Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¸Ð¼ â€ž%sâ€œ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð°"
+
+#: elfxx-mips.c:14958
+#, c-format
+msgid " [abi=O32]"
+msgstr " [Ð°Ð±Ð¸=O32]"
+
+#: elfxx-mips.c:14960
+#, c-format
+msgid " [abi=O64]"
+msgstr " [Ð°Ð±Ð¸=O64]"
+
+#: elfxx-mips.c:14962
+#, c-format
+msgid " [abi=EABI32]"
+msgstr " [Ð°Ð±Ð¸=EABI32]"
+
+#: elfxx-mips.c:14964
+#, c-format
+msgid " [abi=EABI64]"
+msgstr " [Ð°Ð±Ð¸=EABI64]"
+
+#: elfxx-mips.c:14966
+#, c-format
+msgid " [abi unknown]"
+msgstr " [Ð°Ð±Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾]"
+
+#: elfxx-mips.c:14968
+#, c-format
+msgid " [abi=N32]"
+msgstr " [Ð°Ð±Ð¸=N32]"
+
+#: elfxx-mips.c:14970
+#, c-format
+msgid " [abi=64]"
+msgstr " [Ð°Ð±Ð¸=64]"
+
+#: elfxx-mips.c:14972
+#, c-format
+msgid " [no abi set]"
+msgstr " [Ð°Ð±Ð¸ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´ÐµÑˆÐµÐ½Ð¾]"
+
+#: elfxx-mips.c:14993
+#, c-format
+msgid " [unknown ISA]"
+msgstr " [Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð˜Ð¡Ð�]"
+
+#: elfxx-mips.c:15013
+#, c-format
+msgid " [not 32bitmode]"
+msgstr " [Ð½Ð¸Ñ˜Ðµ 32-Ð±Ð¸Ñ‚Ð½Ð¸ Ñ€ÐµÐ¶Ð¸Ð¼]"
+
+#: elfxx-sparc.c:640
+#, c-format
+msgid "invalid relocation type %d"
+msgstr "Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° â€ž%dâ€œ"
+
+#: elfxx-tilegx.c:4433
+msgid "%B: Cannot link together %s and %s objects."
+msgstr "%B: Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð²ÐµÐ¶ÐµÐ¼ Ð·Ð°Ñ˜ÐµÐ´Ð½Ð¾ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ðµ â€ž%sâ€œ Ð¸ â€ž%sâ€œ."
+
+#: i386linux.c:418 m68klinux.c:421 sparclinux.c:414
+#, c-format
+msgid "Output file requires shared library `%s'\n"
+msgstr "Ð˜Ð·Ð»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ â€ž%sâ€œ\n"
+
+#: i386linux.c:426 m68klinux.c:429 sparclinux.c:422
+#, c-format
+msgid "Output file requires shared library `%s.so.%s'\n"
+msgstr "Ð˜Ð·Ð»Ð°Ð·Ð½Ð° Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð·Ð°Ñ…Ñ‚ÐµÐ²Ð° Ð´ÐµÑ™ÐµÐ½Ñƒ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÑƒ â€ž%s.so.%sâ€œ\n"
+
+#: i386linux.c:613 i386linux.c:663 m68klinux.c:618 m68klinux.c:666
+#: sparclinux.c:609 sparclinux.c:659
+#, c-format
+msgid "Symbol %s not defined for fixups\n"
+msgstr "Ð¡Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½ Ð·Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ\n"
+
+#: i386linux.c:687 m68klinux.c:690 sparclinux.c:683
+msgid "Warning: fixup count mismatch\n"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð±Ñ€Ð¾Ñ˜ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ¸ Ð½Ðµ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð°\n"
+
+#: ieee.c:158
+#, c-format
+msgid "%s: string too long (%d chars, max 65535)"
+msgstr "%s: Ð½Ð¸Ñ�ÐºÐ° Ñ˜Ðµ Ð¿Ñ€ÐµÐ´ÑƒÐ³Ð° (%d Ð·Ð½Ð°ÐºÐ°, Ð½Ð°Ñ˜Ð². 65535)"
+
+#: ieee.c:285
+#, c-format
+msgid "%s: unrecognized symbol `%s' flags 0x%x"
+msgstr "%s: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ 0x%x"
+
+#: ieee.c:791
+msgid "%B: unimplemented ATI record %u for symbol %u"
+msgstr "%B: Ð½ÐµÐ¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¸ Ð�Ð¢Ð˜ Ð·Ð°Ð¿Ð¸Ñ� â€ž%uâ€œ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%uâ€œ"
+
+#: ieee.c:815
+msgid "%B: unexpected ATN type %d in external part"
+msgstr "%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð�Ð¢Ð� Ð²Ñ€Ñ�Ñ‚Ð° â€ž%dâ€œ Ñƒ Ñ�Ð¿Ð¾Ñ™Ð½Ð¾Ð¼ Ð´ÐµÐ»Ñƒ"
+
+#: ieee.c:837
+msgid "%B: unexpected type after ATN"
+msgstr "%B: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð½Ð°ÐºÐ¾Ð½ Ð�Ð¢Ð�-Ð°"
+
+#: ihex.c:230
+msgid "%B:%d: unexpected character `%s' in Intel Hex file"
+msgstr "%B:%d: Ð½ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð·Ð½Ð°Ðº â€ž%sâ€œ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:337
+msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
+msgstr "%B:%u: Ð»Ð¾ÑˆÐ° Ñ�ÑƒÐ¼Ð° Ð¿Ñ€Ð¾Ð²ÐµÑ€Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ (Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… %u, Ð½Ð°Ñ’Ð¾Ñ… %u)"
+
+#: ihex.c:392
+msgid "%B:%u: bad extended address record length in Intel Hex file"
+msgstr "%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:409
+msgid "%B:%u: bad extended start address length in Intel Hex file"
+msgstr "%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:426
+msgid "%B:%u: bad extended linear address record length in Intel Hex file"
+msgstr "%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð»Ð¸Ð½ÐµÐ°Ñ€Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:443
+msgid "%B:%u: bad extended linear start address length in Intel Hex file"
+msgstr "%B:%u: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð¿Ñ€Ð¾ÑˆÐ¸Ñ€ÐµÐ½Ðµ Ð»Ð¸Ð½ÐµÐ°Ñ€Ð½Ðµ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:460
+msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
+msgstr "%B:%u: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° â€žihexâ€œ Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ Ñƒ Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ð¾Ñ˜ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸"
+
+#: ihex.c:579
+msgid "%B: internal error in ihex_read_section"
+msgstr "%B: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ° Ñƒ â€žihex_Ð¾Ð´ÐµÑ™Ð°Ðº_Ñ‡Ð¸Ñ‚Ð°ÑšÐ°â€œ"
+
+#: ihex.c:613
+msgid "%B: bad section length in ihex_read_section"
+msgstr "%B: Ð»Ð¾ÑˆÐ° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€žihex_Ð¾Ð´ÐµÑ™Ð°Ðº_Ñ‡Ð¸Ñ‚Ð°ÑšÐ°â€œ"
+
+#: ihex.c:826
+#, c-format
+msgid "%s: address 0x%s out of range for Intel Hex file"
+msgstr "%s: Ð°Ð´Ñ€ÐµÑ�Ð° 0x%s Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° Ð·Ð° Ð˜Ð½Ñ‚ÐµÐ»Ð¾Ð²Ñƒ Ñ…ÐµÐºÑ�Ð°Ð´ÐµÑ†Ð¸Ð¼Ð°Ð»Ð½Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÑƒ"
+
+#: libbfd.c:863
+msgid "%B: unable to get decompressed section %A"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð±Ð°Ð²Ð¸Ð¼ Ñ€Ð°Ñ�Ð¿Ð°ÐºÐ¾Ð²Ð°Ð½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ"
+
+#: libbfd.c:1012
+msgid "%B: compiled for a big endian system and target is little endian"
+msgstr "%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð²ÐµÐ»Ð¸ÐºÐµ ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚Ð¸ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ Ð¼Ð°Ð»Ð° ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚"
+
+#: libbfd.c:1014
+msgid "%B: compiled for a little endian system and target is big endian"
+msgstr "%B: Ð¿Ñ€ÐµÐ²ÐµÐ´ÐµÐ½Ð¾ Ð·Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼ Ð¼Ð°Ð»Ðµ ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚Ð¸ Ð° Ñ†Ð¸Ñ™ Ñ˜Ðµ Ð²ÐµÐ»Ð¸ÐºÐ° ÐºÑ€Ð°Ñ˜Ð½Ð¾Ñ�Ñ‚"
+
+#: libbfd.c:1043
+#, c-format
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "Ð—Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñƒ â€ž%sâ€œ %d. Ñ€ÐµÐ´ Ñƒ â€ž%sâ€œ\n"
+
+#: libbfd.c:1046
+#, c-format
+msgid "Deprecated %s called\n"
+msgstr "Ð—Ð°Ñ�Ñ‚Ð°Ñ€ÐµÐ»Ð¾ â€ž%sâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾\n"
+
+#: linker.c:1873
+msgid "%B: indirect symbol `%s' to `%s' is a loop"
+msgstr "%B: Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ ÐºÐ° â€ž%sâ€œ Ñ˜Ðµ Ð¿ÐµÑ‚Ñ™Ð°"
+
+#: linker.c:2750
+#, c-format
+msgid "Attempt to do relocatable link with %s input and %s output"
+msgstr "ÐŸÐ¾ÐºÑƒÑˆÐ°Ð²Ð°Ð¼ Ð´Ð° Ð¾Ð´Ñ€Ð°Ð´Ð¸Ð¼ Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ñƒ Ð²ÐµÐ·Ñƒ Ñ�Ð° â€ž%sâ€œ ÑƒÐ»Ð°Ð·Ð¾Ð¼ Ð¸ â€ž%sâ€œ Ð¸Ð·Ð»Ð°Ð·Ð¾Ð¼"
+
+#: linker.c:3035
+msgid "%B: ignoring duplicate section `%A'\n"
+msgstr "%B: Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€ÑƒÑ˜ÐµÐ¼ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ\n"
+
+#: linker.c:3044 linker.c:3053
+msgid "%B: duplicate section `%A' has different size\n"
+msgstr "%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ñƒ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ\n"
+
+#: linker.c:3061 linker.c:3066
+msgid "%B: could not read contents of section `%A'\n"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%Aâ€œ\n"
+
+#: linker.c:3070
+msgid "%B: duplicate section `%A' has different contents\n"
+msgstr "%B: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%Aâ€œ Ð¸Ð¼Ð° Ð´Ñ€ÑƒÐ³Ð°Ñ‡Ð¸Ñ˜Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜\n"
+
+#: mach-o.c:648
+msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols"
+msgstr "bfd_mach_o_canonicalize_symtab: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ"
+
+#: mach-o.c:1918
+#, c-format
+msgid "mach-o: there are too many sections (%d) maximum is 255,\n"
+msgstr "mach-o: Ð¸Ð¼Ð° Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¾Ð´ÐµÑ™Ð°ÐºÐ° (%d) Ð½Ð°Ñ˜Ð²Ð¸ÑˆÐµ Ñ˜Ðµ 255,\n"
+
+#: mach-o.c:2017
+#, c-format
+msgid "unable to write unknown load command 0x%lx"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð·Ð°Ð¿Ð¸ÑˆÐµÐ¼ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð½Ð°Ñ€ÐµÐ´Ð±Ñƒ ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° 0x%lx"
+
+#: mach-o.c:2272
+msgid "sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands."
+msgstr "Ð¸Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ: â€žmodtabâ€œ, â€žtocâ€œ Ð¸ â€žextrefsymsâ€œ Ñ˜Ð¾Ñˆ Ð½Ð¸Ñ�Ñƒ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¸ Ð·Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ðµ â€ždysymtabâ€œ."
+
+#: mach-o.c:2898
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"
+msgstr "bfd_mach_o_read_symtab_symbol: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ %d Ð±Ð°Ñ˜Ñ‚Ð° Ð½Ð° %lu"
+
+#: mach-o.c:2916
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"
+msgstr "bfd_mach_o_read_symtab_symbol: Ð½Ð°Ð·Ð¸Ð² Ñ˜Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð° (%lu >= %lu)"
+
+#: mach-o.c:2997
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ¾ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%dâ€œ (Ð½Ð°Ñ˜Ð². %lu): Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð°Ð¼ Ð½Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: mach-o.c:3013
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x%x: setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ¾ Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð¾ Ð¿Ð¾Ñ™Ðµ Ð²Ñ€Ñ�Ñ‚Ðµ 0x%x: Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð°Ð¼ Ð½Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: mach-o.c:3085
+msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"
+msgstr "bfd_mach_o_read_symtab_symbols: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð¼ÐµÐ¼Ð¾Ñ€Ð¸Ñ˜Ñƒ Ð·Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ðµ"
+
+#: mach-o.c:3915
+msgid "%B: unknown load command 0x%lx"
+msgstr "%B: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ° 0x%lx"
+
+#: mach-o.c:4107
+#, c-format
+msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"
+msgstr "bfd_mach_o_scan: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° 0x%lx/0x%lx"
+
+#: mach-o.c:4204
+#, c-format
+msgid "unknown header byte-order value 0x%lx"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð¿Ð¾Ñ€ÐµÑ‚ÐºÐ° Ð±Ð°Ñ˜Ñ‚Ð° Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ð° 0x%lx"
+
+#: merge.c:832
+#, c-format
+msgid "%s: access beyond end of merged section (%ld)"
+msgstr "%s: Ð¿Ñ€Ð¸Ñ�Ñ‚ÑƒÐ¿ Ð¸Ð·Ð° ÐºÑ€Ð°Ñ˜Ð° Ñ�Ñ‚Ð¾Ð¿Ñ™ÐµÐ½Ð¾Ð³ Ð¾Ð´ÐµÑ™ÐºÐ° (%ld)"
+
+#: mmo.c:455
+#, c-format
+msgid "%s: No core to allocate section name %s\n"
+msgstr "%s: Ð�ÐµÐ¼Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð° Ð·Ð° Ð´Ð¾Ð´ÐµÑ™Ð¸Ð²Ð°ÑšÐµ Ð½Ð°Ð·Ð¸Ð²Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ\n"
+
+#: mmo.c:530
+#, c-format
+msgid "%s: No core to allocate a symbol %d bytes long\n"
+msgstr "%s: Ð�ÐµÐ¼Ð° Ñ˜ÐµÐ·Ð³Ñ€Ð° Ð·Ð° Ð´Ð¾Ð´ÐµÑ™Ð¸Ð²Ð°ÑšÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð´ÑƒÐ³Ð¾Ð³ %d Ð±Ð°Ñ˜Ñ‚Ð°\n"
+
+#: mmo.c:1189
+#, c-format
+msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚ Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð°ÑšÐ° Ð·Ð° $255 Ð½Ð¸Ñ˜Ðµ â€žMainâ€œ\n"
+
+#: mmo.c:1334
+#, c-format
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ ÑˆÐ¸Ñ€Ð¾ÐºÐ¸ Ð½Ð¸Ð· Ð·Ð½Ð°ÐºÐ° 0x%02X 0x%02X Ð½Ð°ÐºÐ¾Ð½ Ð½Ð°Ð·Ð¸Ð²Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° ÐºÐ¾Ñ˜Ð¸ Ð¿Ð¾Ñ‡Ð¸ÑšÐµ Ñ�Ð° â€ž%sâ€œ\n"
+
+#: mmo.c:1568
+#, c-format
+msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð»Ð¾Ð¿ÐºÐ¾Ð´ â€ž%dâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½\n"
+
+#: mmo.c:1578
+#, c-format
+msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… YZ = 1 Ð´Ð¾Ð±Ð¸Ñ… YZ = %d Ð·Ð° â€žlop_quoteâ€œ\n"
+
+#: mmo.c:1614
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 1 Ð¸Ð»Ð¸ z = 2, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_locâ€œ\n"
+
+#: mmo.c:1660
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 1 Ð¸Ð»Ð¸ z = 2, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_fixoâ€œ\n"
+
+#: mmo.c:1699
+#, c-format
+msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… y = 0 Ð´Ð¾Ð±Ð¸Ñ… y = %d Ð·Ð° â€žlop_fixrxâ€œ\n"
+
+#: mmo.c:1708
+#, c-format
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ñ… z = 16 Ð¸Ð»Ð¸ z = 24, Ð´Ð¾Ð±Ð¸Ñ… z = %d Ð·Ð° â€žlop_fixrxâ€œ\n"
+
+#: mmo.c:1731
+#, c-format
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð²Ð¾Ð´ÐµÑ›Ð¸ Ð±Ð°Ñ˜Ñ‚ Ñ€ÐµÑ‡Ð¸ Ð¾Ð¿ÐµÑ€Ð°Ð½Ð´Ð° Ð¼Ð¾Ñ€Ð° Ð±Ð¸Ñ‚Ð¸ 0 Ð¸Ð»Ð¸ 1, Ð´Ð¾Ð±Ð¸Ñ… %d Ð·Ð° â€žlop_fixrxâ€œ\n"
+
+#: mmo.c:1754
+#, c-format
+msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð´Ð¾Ð´ÐµÐ»Ð¸Ð¼ Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð·Ð° Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ %d, %d Ð±Ð°Ñ˜Ñ‚Ð°\n"
+
+#: mmo.c:1774
+#, c-format
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð±Ñ€Ð¾Ñ˜ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ %d â€ž%sâ€œ, Ñ˜Ðµ Ð²ÐµÑ› ÑƒÐ½ÐµÑˆÐµÐ½ ÐºÐ°Ð¾ â€ž%sâ€œ\n"
+
+#: mmo.c:1787
+#, c-format
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ð·Ð° Ð±Ñ€Ð¾Ñ˜ %d Ð½Ð¸Ñ˜Ðµ Ð½Ð°Ð²ÐµÐ´ÐµÐ½ Ð¿Ñ€Ðµ ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ðµ\n"
+
+#: mmo.c:1893
+#, c-format
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: Ð¿Ð¾Ñ™Ðµ y Ð¸ z â€žlop_stabâ€œ-Ð° Ð½Ð¸Ñ˜Ðµ Ð½ÑƒÐ»Ð°, y: %d, z: %d\n"
+
+#: mmo.c:1929
+#, c-format
+msgid "%s: invalid mmo file: lop_end not last item in file\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: â€žlop_endâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ�Ð»ÐµÐ´ÑšÐ° Ñ�Ñ‚Ð°Ð²ÐºÐ° Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸\n"
+
+#: mmo.c:1942
+#, c-format
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° â€žmmoâ€œ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: YZ â€žlop_endâ€œ-Ð° (%ld) Ð½Ð¸Ñ˜Ðµ Ñ˜ÐµÐ´Ð½Ð°ÐºÐ¾ Ñ�Ð° Ð±Ñ€Ð¾Ñ˜ÐµÐ¼ Ñ‚ÐµÑ‚Ñ€Ð°Ñ�Ð° Ð´Ð¾ Ð¿Ñ€ÐµÑ‚Ñ…Ð¾Ð´Ð½Ð¾Ð³ â€žlop_stabâ€œ-Ð° (%ld)\n"
+
+#: mmo.c:2652
+#, c-format
+msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ\n"
+
+#: mmo.c:2892
+#, c-format
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Ð›Ð¾ÑˆÐ° Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: â€žMainâ€œ Ñ˜Ðµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ Ð½Ð° â€ž%sâ€œ ÑƒÐ¼ÐµÑ�Ñ‚Ð¾ Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ â€ž%sâ€œ\n"
+
+#: mmo.c:2984
+#, c-format
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ˜Ðµ Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð²ÐµÐ»Ð¸ÐºÐ° Ð·Ð° â€žmmoâ€œ, Ð²ÐµÑ›Ð° Ð¾Ð´ 65535 32-Ð±Ð¸Ñ‚Ð½Ð¸Ñ… Ñ€ÐµÑ‡Ð¸: %d.  Ð¡Ð°Ð¼Ð¾ â€žMainâ€œ Ð±Ð¸Ñ›Ðµ Ð´Ð°Ñ‚Ð¾.\n"
+
+#: mmo.c:3029
+#, c-format
+msgid "%s: internal error, symbol table changed size from %d to %d words\n"
+msgstr "%s: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°, Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ˜Ðµ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ð»Ð° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñƒ Ð¸Ð· %d Ñƒ %d Ñ€ÐµÑ‡Ð¸\n"
+
+#: mmo.c:3081
+#, c-format
+msgid "%s: internal error, internal register section %s had contents\n"
+msgstr "%s: ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ° Ð³Ñ€ÐµÑˆÐºÐ°, ÑƒÐ½ÑƒÑ‚Ñ€Ð°ÑˆÑšÐ¸ Ð¾Ð´ÐµÑ™Ð°Ðº Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ð° â€ž%sâ€œ Ð¸Ð¼Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜\n"
+
+#: mmo.c:3132
+#, c-format
+msgid "%s: no initialized registers; section length 0\n"
+msgstr "%s: Ð½ÐµÐ¼Ð° Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð¸Ñ… Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€Ð°; Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° 0\n"
+
+#: mmo.c:3138
+#, c-format
+msgid "%s: too many initialized registers; section length %ld\n"
+msgstr "%s: Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ð¸Ñ… Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€Ð°; Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° %ld\n"
+
+#: mmo.c:3143
+#, c-format
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð·Ð° Ð¿Ð¾ÐºÑ€ÐµÐ½ÑƒÑ‚Ðµ Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ñ€Ðµ Ð´ÑƒÐ¶Ð¸Ð½Ðµ %ld: 0x%lx%08lx\n"
+
+#: oasys.c:881
+#, c-format
+msgid "%s: can not represent section `%s' in oasys"
+msgstr "%s: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€ÐµÐ´Ñ�Ñ‚Ð°Ð²Ð¸Ð¼ Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ñƒ â€žoasysâ€œ"
+
+#: osf-core.c:128
+#, c-format
+msgid "Unhandled OSF/1 core file section type %d\n"
+msgstr "Ð�Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ€Ð°Ð´Ð¸Ð¼ Ñ�Ð° Ð²Ñ€Ñ�Ñ‚Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÐ° %d Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ OSF/1 Ñ˜ÐµÐ·Ð³Ñ€Ð°\n"
+
+#: pe-mips.c:607
+msgid "%B: `ld -r' not supported with PE MIPS objects\n"
+msgstr "%B: â€žld -râ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½ Ñ�Ð° Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð¸Ð¼Ð° â€žPE MIPSâ€œ\n"
+
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to.
+#: pe-mips.c:719
+msgid "%B: unimplemented %s\n"
+msgstr "%B: Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾ â€ž%sâ€œ\n"
+
+#: pe-mips.c:745
+msgid "%B: jump too far away\n"
+msgstr "%B: Ñ�ÐºÐ¾Ðº Ñ˜Ðµ Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð´Ð°Ð»ÐµÐºÐ¾\n"
+
+#: pe-mips.c:771
+msgid "%B: bad pair/reflo after refhi\n"
+msgstr "%B: Ð»Ð¾ÑˆÐµ â€žpair/refloâ€œ Ð½Ð°ÐºÐ¾Ð½ â€žrefhiâ€œ\n"
+
+#: pef.c:522
+#, c-format
+msgid "bfd_pef_scan: unknown architecture 0x%lx"
+msgstr "bfd_pef_scan: Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ñ€Ñ…Ð¸Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð° 0x%lx"
+
+#: pei-x86_64.c:469
+#, c-format
+msgid "warning: .pdata section size (%ld) is not a multiple of %d\n"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ (%ld) Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð¾Ð´ %d\n"
+
+#: pei-x86_64.c:474 peigen.c:1626 peigen.c:1809 pepigen.c:1626 pepigen.c:1809
+#: pex64igen.c:1626 pex64igen.c:1809
+#, c-format
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+"\n"
+"Ð¢Ð°Ð±ÐµÐ»Ð° Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ)\n"
+
+#: pei-x86_64.c:476
+#, c-format
+msgid "vma:\t\t\tBeginAddress\t EndAddress\t  UnwindData\n"
+msgstr "vma:\t\t\tÐ�Ð´Ñ€ÐµÑ�Ð° Ð¿Ð¾Ñ‡ÐµÑ‚ÐºÐ°\t Ð�Ð´Ñ€ÐµÑ�Ð° ÐºÑ€Ð°Ñ˜Ð°\t  Ð˜Ð·Ð»Ð¾Ð¶ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸\n"
+
+#. XXX code yet to be written.
+#: peicode.h:758
+msgid "%B: Unhandled import type; %x"
+msgstr "%B: Ð�ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° ÑƒÐ²Ð¾Ð·Ð°; %x"
+
+#: peicode.h:763
+msgid "%B: Unrecognised import type; %x"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° ÑƒÐ²Ð¾Ð·Ð°; %x"
+
+#: peicode.h:777
+msgid "%B: Unrecognised import name type; %x"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚ Ð½Ð°Ð·Ð¸Ð² Ð²Ñ€Ñ�Ñ‚Ðµ ÑƒÐ²Ð¾Ð·Ð°; %x"
+
+#: peicode.h:1173
+msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgstr "%B: Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ (0x%x) Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ð¸ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°"
+
+#: peicode.h:1185
+msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+msgstr "%B: ÐŸÐ¾Ð·Ð½Ð°Ñ‚Ð° Ð°Ð»Ð¸ Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° Ð²Ñ€Ñ�Ñ‚Ð° Ð¼Ð°ÑˆÐ¸Ð½Ðµ (0x%x) Ñƒ Ð°Ñ€Ñ…Ð¸Ð²Ð¸ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°"
+
+#: peicode.h:1203
+msgid "%B: size field is zero in Import Library Format header"
+msgstr "%B: Ð¾Ñ™Ðµ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñ˜Ðµ Ð½ÑƒÐ»Ð° Ñƒ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ñƒ Ð·Ð°Ð¿Ð¸Ñ�Ð° Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐµ ÑƒÐ²Ð¾Ð·Ð°"
+
+#: peicode.h:1234
+msgid "%B: string not null terminated in ILF object file."
+msgstr "%B: Ð½Ð¸Ñ�ÐºÐ° Ñ�Ðµ Ð½Ðµ Ð·Ð°Ð²Ñ€ÑˆÐ°Ð²Ð° Ð½ÑƒÐ»Ð¾Ð¼ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð˜Ð›Ð¤ Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°."
+
+#: ppcboot.c:391
+#, c-format
+msgid ""
+"\n"
+"ppcboot header:\n"
+msgstr ""
+"\n"
+"Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ â€žppcbootâ€œ:\n"
+
+#: ppcboot.c:392
+#, c-format
+msgid "Entry offset        = 0x%.8lx (%ld)\n"
+msgstr "ÐŸÐ¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÐ½Ð¾Ñ�Ð°       = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:394
+#, c-format
+msgid "Length              = 0x%.8lx (%ld)\n"
+msgstr "Ð”ÑƒÐ¶Ð¸Ð½Ð°              = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:398
+#, c-format
+msgid "Flag field          = 0x%.2x\n"
+msgstr "ÐŸÐ¾Ñ™Ðµ Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ      = 0x%.2x\n"
+
+#: ppcboot.c:404
+#, c-format
+msgid "Partition name      = \"%s\"\n"
+msgstr "Ð�Ð°Ð·Ð¸Ð² Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ     = â€ž%sâ€œ\n"
+
+#: ppcboot.c:423
+#, c-format
+msgid ""
+"\n"
+"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:429
+#, c-format
+msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr "ÐšÑ€Ð°Ñ˜ Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d]   = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:435
+#, c-format
+msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
+msgstr "ÐžÐ´ÐµÑ™Ð°Ðº Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:437
+#, c-format
+msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
+msgstr "Ð”ÑƒÐ¶Ð¸Ð½Ð° Ð¿Ð°Ñ€Ñ‚Ð¸Ñ†Ð¸Ñ˜Ðµ[%d] = 0x%.8lx (%ld)\n"
+
+#: reloc.c:7371
+msgid "INPUT_SECTION_FLAGS are not supported.\n"
+msgstr "â€žINPUT_SECTION_FLAGSâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾.\n"
+
+#: reloc.c:7526
+msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+msgstr "%X%P: %B(%A): Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%Râ€œ Ð¸Ð´Ðµ Ð²Ð°Ð½ Ð¾Ð¿Ñ�ÐµÐ³Ð°\n"
+
+#: rs6000-core.c:448
+#, c-format
+msgid "%s: warning core file truncated"
+msgstr "%s: ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ Ñ�ÐºÑ€Ð°Ñ›ÐµÐ½Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ Ñ˜ÐµÐ·Ð³Ñ€Ð°"
+
+#: som.c:5471
+#, c-format
+msgid ""
+"\n"
+"Exec Auxiliary Header\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ð¼Ð¾Ñ›Ð½Ð¾ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¸Ð·Ð²Ñ€ÑˆÐ½Ðµ\n"
+
+#: som.c:5776
+msgid "som_sizeof_headers unimplemented"
+msgstr "â€žsom_sizeof_headersâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: srec.c:261
+msgid "%B:%d: Unexpected character `%s' in S-record file\n"
+msgstr "%B:%d: Ð�ÐµÐ¾Ñ‡ÐµÐºÐ¸Ð²Ð°Ð½Ð¸ Ð·Ð½Ð°Ðº â€ž%sâ€œ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð¡-Ð·Ð°Ð¿Ð¸Ñ�Ð°\n"
+
+#: srec.c:567 srec.c:600
+msgid "%B:%d: Bad checksum in S-record file\n"
+msgstr "%B:%d: Ð›Ð¾ÑˆÐ° Ñ�ÑƒÐ¼Ð° Ð¿Ñ€Ð¾Ð²ÐµÑ€Ðµ Ñƒ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÑ†Ð¸ Ð¡-Ð·Ð°Ð¿Ð¸Ñ�Ð°\n"
+
+#: stabs.c:279
+msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
+msgstr "%B(%A+0x%lx): Ð£Ð½Ð¾Ñ� Ð¾ÐºÑ€ÑšÐ°ÐºÐ° Ð¸Ð¼Ð° Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ð½Ð¸Ñ�ÐºÐµ."
+
+#: syms.c:1079
+msgid "Unsupported .stab relocation"
+msgstr "ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž.stabâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: vms-alpha.c:1294
+#, c-format
+msgid "Unknown EGSD subtype %d"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° EGSD Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð° %d"
+
+#: vms-alpha.c:1325
+#, c-format
+msgid "Stack overflow (%d) in _bfd_vms_push"
+msgstr "ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° (%d) Ñƒ â€ž_bfd_vms_pushâ€œ-Ñƒ"
+
+#: vms-alpha.c:1338
+msgid "Stack underflow in _bfd_vms_pop"
+msgstr "ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° Ñƒ â€ž_bfd_vms_popâ€œ-Ñƒ"
+
+#. These names have not yet been added to this switch statement.
+#: vms-alpha.c:1575
+#, c-format
+msgid "unknown ETIR command %d"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° â€žETIRâ€œ Ð½Ð°Ñ€ÐµÐ´Ð±Ð° %d"
+
+#: vms-alpha.c:1762
+#, c-format
+msgid "bad section index in %s"
+msgstr "Ð»Ð¾Ñˆ Ð¸Ð½Ð´ÐµÐºÑ� Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€ž%sâ€œ"
+
+#: vms-alpha.c:1775
+#, c-format
+msgid "unsupported STA cmd %s"
+msgstr "Ð½ÐµÐ¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð° â€žSTAâ€œ Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%sâ€œ"
+
+#. Insert field.
+#. Unsigned shift.
+#. Rotate.
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-alpha.c:1951 vms-alpha.c:1982 vms-alpha.c:2229
+#, c-format
+msgid "%s: not supported"
+msgstr "%s: Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾"
+
+#: vms-alpha.c:1957
+#, c-format
+msgid "%s: not implemented"
+msgstr "%s: Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:2213
+#, c-format
+msgid "invalid use of %s with contexts"
+msgstr "Ð½ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð½Ð° ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ð° â€ž%sâ€œ Ñ�Ð° ÐºÐ¾Ð½Ñ‚ÐµÐºÑ�Ñ‚Ð¾Ð¼"
+
+#: vms-alpha.c:2247
+#, c-format
+msgid "reserved cmd %d"
+msgstr "Ñ€ÐµÐ·ÐµÑ€Ð²Ð¸Ñ�Ð°Ð½Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%dâ€œ"
+
+#: vms-alpha.c:2332
+msgid "Object module NOT error-free !\n"
+msgstr "ÐœÐ¾Ð´ÑƒÐ» Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð° Ð�Ð˜ÐˆÐ• Ð±ÐµÐ· Ð³Ñ€ÐµÑˆÐ°ÐºÐ° !\n"
+
+#: vms-alpha.c:3657
+#, c-format
+msgid "SEC_RELOC with no relocs in section %s"
+msgstr "â€žSEC_RELOCâ€œ Ð½ÐµÐ¼Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ"
+
+#: vms-alpha.c:3709 vms-alpha.c:3922
+#, c-format
+msgid "Size error in section %s"
+msgstr "Ð“Ñ€ÐµÑˆÐºÐ° Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ"
+
+#: vms-alpha.c:3868
+msgid "Spurious ALPHA_R_BSR reloc"
+msgstr "ÐŸÑ€Ð¸Ð²Ð¸Ð´Ð½Ð¾ â€žALPHA_R_BSRâ€œ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ"
+
+#: vms-alpha.c:3909
+#, c-format
+msgid "Unhandled relocation %s"
+msgstr "Ð�ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ"
+
+#: vms-alpha.c:4199
+#, c-format
+msgid "unknown source command %d"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° Ð¸Ð·Ð²Ð¾Ñ€Ð° â€ž%dâ€œ"
+
+#: vms-alpha.c:4260
+msgid "DST__K_SET_LINUM_INCR not implemented"
+msgstr "â€žDST__K_SET_LINUM_INCRâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4266
+msgid "DST__K_SET_LINUM_INCR_W not implemented"
+msgstr "â€žDST__K_SET_LINUM_INCR_Wâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4272
+msgid "DST__K_RESET_LINUM_INCR not implemented"
+msgstr "â€žDST__K_RESET_LINUM_INCRâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4278
+msgid "DST__K_BEG_STMT_MODE not implemented"
+msgstr "â€žDST__K_BEG_STMT_MODEâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4284
+msgid "DST__K_END_STMT_MODE not implemented"
+msgstr "â€žDST__K_END_STMT_MODEâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4311
+msgid "DST__K_SET_PC not implemented"
+msgstr "â€žDST__K_SET_PCâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4317
+msgid "DST__K_SET_PC_W not implemented"
+msgstr "â€žDST__K_SET_PC_Wâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4323
+msgid "DST__K_SET_PC_L not implemented"
+msgstr "â€žDST__K_SET_PC_Lâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4329
+msgid "DST__K_SET_STMTNUM not implemented"
+msgstr "â€žDST__K_SET_STMTNUMâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¸Ð¼ÐµÑšÐµÐ½Ð¾"
+
+#: vms-alpha.c:4372
+#, c-format
+msgid "unknown line command %d"
+msgstr "Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð° Ñ€ÐµÐ´Ð½Ð° Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%dâ€œ"
+
+#: vms-alpha.c:4846 vms-alpha.c:4863 vms-alpha.c:4877 vms-alpha.c:4892
+#: vms-alpha.c:4904 vms-alpha.c:4915 vms-alpha.c:4927
+#, c-format
+msgid "Unknown reloc %s + %s"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%s + %sâ€œ"
+
+#: vms-alpha.c:4982
+#, c-format
+msgid "Unknown reloc %s"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%sâ€œ"
+
+#: vms-alpha.c:4995
+msgid "Invalid section index in ETIR"
+msgstr "Ð�ÐµÐ¸Ñ�Ð¿Ñ€Ð°Ð²Ð°Ð½ Ð¸Ð½Ð´ÐµÐºÑ� Ð¾Ð´ÐµÑ™ÐºÐ° Ñƒ â€žETIRâ€œ-Ñƒ"
+
+#: vms-alpha.c:5002
+msgid "Relocation for non-REL psect"
+msgstr "ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð·Ð° Ð½Ðµ-Ð Ð•Ð› Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: vms-alpha.c:5049
+#, c-format
+msgid "Unknown symbol in command %s"
+msgstr "Ð�ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¸ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñƒ Ð½Ð°Ñ€ÐµÐ´Ð±Ð¸ â€ž%sâ€œ"
+
+#: vms-alpha.c:5564
+#, c-format
+msgid "  EMH %u (len=%u): "
+msgstr "  EMH %u (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u): "
+
+#: vms-alpha.c:5573
+#, c-format
+msgid "Module header\n"
+msgstr "Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¼Ð¾Ð´ÑƒÐ»Ð°\n"
+
+#: vms-alpha.c:5574
+#, c-format
+msgid "   structure level: %u\n"
+msgstr "   Ð½Ð¸Ð²Ð¾ Ñ�Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ðµ         : %u\n"
+
+#: vms-alpha.c:5575
+#, c-format
+msgid "   max record size: %u\n"
+msgstr "   Ð½Ð°Ñ˜Ð². Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð±ÐµÐ»ÐµÐ¶ÐµÑšÐ°: %u\n"
+
+#: vms-alpha.c:5578
+#, c-format
+msgid "   module name    : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² Ð¼Ð¾Ð´ÑƒÐ»Ð°           : %.*s\n"
+
+#: vms-alpha.c:5580
+#, c-format
+msgid "   module version : %.*s\n"
+msgstr "   Ð¸Ð·Ð´Ð°ÑšÐµ Ð¼Ð¾Ð´ÑƒÐ»Ð°          : %.*s\n"
+
+#: vms-alpha.c:5582
+#, c-format
+msgid "   compile date   : %.17s\n"
+msgstr "   Ð´Ð°Ñ‚ÑƒÐ¼ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐ°        : %.17s\n"
+
+#: vms-alpha.c:5587
+#, c-format
+msgid "Language Processor Name\n"
+msgstr "Ð�Ð°Ð·Ð¸Ð² Ñ˜ÐµÐ·Ð¸ÐºÐ° Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð¾Ñ€Ð°\n"
+
+#: vms-alpha.c:5588
+#, c-format
+msgid "   language name: %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² Ñ˜ÐµÐ·Ð¸ÐºÐ°: %.*s\n"
+
+#: vms-alpha.c:5595
+#, c-format
+msgid "Source Files Header\n"
+msgstr "Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ° Ð¸Ð·Ð²Ð¾Ñ€Ð°\n"
+
+#: vms-alpha.c:5596
+#, c-format
+msgid "   file: %.*s\n"
+msgstr "   Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°: %.*s\n"
+
+#: vms-alpha.c:5603
+#, c-format
+msgid "Title Text Header\n"
+msgstr "Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ñ‚ÐµÐºÑ�Ñ‚Ð° Ð½Ð°Ñ�Ð»Ð¾Ð²Ð°\n"
+
+#: vms-alpha.c:5604
+#, c-format
+msgid "   title: %.*s\n"
+msgstr "   Ð½Ð°Ñ�Ð»Ð¾Ð²: %.*s\n"
+
+#: vms-alpha.c:5611
+#, c-format
+msgid "Copyright Header\n"
+msgstr "Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð°ÑƒÑ‚Ð¾Ñ€Ñ�ÐºÐ¸Ñ… Ð¿Ñ€Ð°Ð²Ð°\n"
+
+#: vms-alpha.c:5612
+#, c-format
+msgid "   copyright: %.*s\n"
+msgstr "   Ð°ÑƒÑ‚Ð¾Ñ€Ñ�ÐºÐ° Ð¿Ñ€Ð°Ð²Ð°: %.*s\n"
+
+#: vms-alpha.c:5618
+#, c-format
+msgid "unhandled emh subtype %u\n"
+msgstr "Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð° emh Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ\n"
+
+#: vms-alpha.c:5628
+#, c-format
+msgid "  EEOM (len=%u):\n"
+msgstr "  EEOM (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u):\n"
+
+#: vms-alpha.c:5629
+#, c-format
+msgid "   number of cond linkage pairs: %u\n"
+msgstr "   Ð±Ñ€Ð¾Ñ˜ â€žcondâ€œ Ð¿Ð°Ñ€Ð¾Ð²Ð° Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u\n"
+
+#: vms-alpha.c:5631
+#, c-format
+msgid "   completion code: %u\n"
+msgstr "   Ð´Ð¾Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐµ ÐºÐ¾Ð´Ð°: %u\n"
+
+#: vms-alpha.c:5635
+#, c-format
+msgid "   transfer addr flags: 0x%02x\n"
+msgstr "   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð°: 0x%02x\n"
+
+#: vms-alpha.c:5636
+#, c-format
+msgid "   transfer addr psect: %u\n"
+msgstr "   Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð° : %u\n"
+
+#: vms-alpha.c:5638
+#, c-format
+msgid "   transfer address   : 0x%08x\n"
+msgstr "   Ð°Ð´Ñ€ÐµÑ�Ð° Ð¿Ñ€ÐµÐ½Ð¾Ñ�Ð°          : 0x%08x\n"
+
+#: vms-alpha.c:5647
+msgid " WEAK"
+msgstr " WEAK"
+
+#: vms-alpha.c:5649
+msgid " DEF"
+msgstr " DEF"
+
+#: vms-alpha.c:5651
+msgid " UNI"
+msgstr " UNI"
+
+#: vms-alpha.c:5653 vms-alpha.c:5674
+msgid " REL"
+msgstr " REL"
+
+#: vms-alpha.c:5655
+msgid " COMM"
+msgstr " COMM"
+
+#: vms-alpha.c:5657
+msgid " VECEP"
+msgstr " VECEP"
+
+#: vms-alpha.c:5659
+msgid " NORM"
+msgstr " NORM"
+
+#: vms-alpha.c:5661
+msgid " QVAL"
+msgstr " QVAL"
+
+#: vms-alpha.c:5668
+msgid " PIC"
+msgstr " PIC"
+
+#: vms-alpha.c:5670
+msgid " LIB"
+msgstr " LIB"
+
+#: vms-alpha.c:5672
+msgid " OVR"
+msgstr " OVR"
+
+#: vms-alpha.c:5676
+msgid " GBL"
+msgstr " GBL"
+
+#: vms-alpha.c:5678
+msgid " SHR"
+msgstr " SHR"
+
+#: vms-alpha.c:5680
+msgid " EXE"
+msgstr " EXE"
+
+#: vms-alpha.c:5682
+msgid " RD"
+msgstr " RD"
+
+#: vms-alpha.c:5684
+msgid " WRT"
+msgstr " WRT"
+
+#: vms-alpha.c:5686
+msgid " VEC"
+msgstr " VEC"
+
+#: vms-alpha.c:5688
+msgid " NOMOD"
+msgstr " NOMOD"
+
+#: vms-alpha.c:5690
+msgid " COM"
+msgstr " COM"
+
+#: vms-alpha.c:5692
+msgid " 64B"
+msgstr " 64B"
+
+#: vms-alpha.c:5701
+#, c-format
+msgid "  EGSD (len=%u):\n"
+msgstr "  EGSD (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u):\n"
+
+#: vms-alpha.c:5713
+#, c-format
+msgid "  EGSD entry %2u (type: %u, len: %u): "
+msgstr "  â€žEGSDâ€œ ÑƒÐ½Ð¾Ñ� â€ž%2uâ€œ (Ð²Ñ€Ñ�Ñ‚Ð°ype: %u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u): "
+
+#: vms-alpha.c:5725
+#, c-format
+msgid "PSC - Program section definition\n"
+msgstr "PSC â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð°\n"
+
+#: vms-alpha.c:5726 vms-alpha.c:5743
+#, c-format
+msgid "   alignment  : 2**%u\n"
+msgstr "   Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°ÑšÐµ : 2**%u\n"
+
+#: vms-alpha.c:5727 vms-alpha.c:5744
+#, c-format
+msgid "   flags      : 0x%04x"
+msgstr "   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%04x"
+
+#: vms-alpha.c:5731
+#, c-format
+msgid "   alloc (len): %u (0x%08x)\n"
+msgstr "   Ð´Ð¾Ð´ÐµÐ»Ð° (Ð´ÑƒÐ¶Ð¸Ð½Ð°): %u (0x%08x)\n"
+
+#: vms-alpha.c:5732 vms-alpha.c:5789 vms-alpha.c:5838
+#, c-format
+msgid "   name       : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð²        : %.*s\n"
+
+#: vms-alpha.c:5742
+#, c-format
+msgid "SPSC - Shared Image Program section def\n"
+msgstr "SPSC â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð° Ð´ÐµÑ™ÐµÐ½Ðµ Ñ�Ð»Ð¸ÐºÐµ\n"
+
+#: vms-alpha.c:5748
+#, c-format
+msgid "   alloc (len)   : %u (0x%08x)\n"
+msgstr "   Ð´Ð¾Ð´ÐµÐ»Ð° (Ð´ÑƒÐ¶Ð¸Ð½Ð°)  : %u (0x%08x)\n"
+
+#: vms-alpha.c:5749
+#, c-format
+msgid "   image offset  : 0x%08x\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð»Ð¸ÐºÐµ: 0x%08x\n"
+
+#: vms-alpha.c:5751
+#, c-format
+msgid "   symvec offset : 0x%08x\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð¸Ð¼Ð²ÐµÐº-Ð° : 0x%08x\n"
+
+#: vms-alpha.c:5753
+#, c-format
+msgid "   name          : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð²           : %.*s\n"
+
+#: vms-alpha.c:5766
+#, c-format
+msgid "SYM - Global symbol definition\n"
+msgstr "SYM â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°\n"
+
+#: vms-alpha.c:5767 vms-alpha.c:5827 vms-alpha.c:5848 vms-alpha.c:5867
+#, c-format
+msgid "   flags: 0x%04x"
+msgstr "   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%04x"
+
+#: vms-alpha.c:5770
+#, c-format
+msgid "   psect offset: 0x%08x\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: 0x%08x\n"
+
+#: vms-alpha.c:5774
+#, c-format
+msgid "   code address: 0x%08x\n"
+msgstr "   Ð°Ð´Ñ€ÐµÑ�Ð° ÐºÐ¾Ð´Ð°: 0x%08x\n"
+
+#: vms-alpha.c:5776
+#, c-format
+msgid "   psect index for entry point : %u\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° Ð·Ð° Ñ‚Ð°Ñ‡ÐºÑƒ ÑƒÐ½Ð¾Ñ�Ð°: %u\n"
+
+#: vms-alpha.c:5779 vms-alpha.c:5855 vms-alpha.c:5874
+#, c-format
+msgid "   psect index : %u\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° : %u\n"
+
+#: vms-alpha.c:5781 vms-alpha.c:5857 vms-alpha.c:5876
+#, c-format
+msgid "   name        : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð²         : %.*s\n"
+
+#: vms-alpha.c:5788
+#, c-format
+msgid "SYM - Global symbol reference\n"
+msgstr "SYM â€” Ð£Ð¿ÑƒÑ‚Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°\n"
+
+#: vms-alpha.c:5800
+#, c-format
+msgid "IDC - Ident Consistency check\n"
+msgstr "IDC â€” ÐŸÑ€Ð¾Ð²ÐµÑ€Ð° Ð´Ð¾Ñ�Ð»ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐ°\n"
+
+#: vms-alpha.c:5801
+#, c-format
+msgid "   flags         : 0x%08x"
+msgstr "   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%08x"
+
+#: vms-alpha.c:5805
+#, c-format
+msgid "   id match      : %x\n"
+msgstr "   Ð¿Ð¾Ð´ÑƒÐ´Ð°Ñ€Ð°ÑšÐµ Ð¸Ð´-Ð° : %x\n"
+
+#: vms-alpha.c:5807
+#, c-format
+msgid "   error severity: %x\n"
+msgstr "   Ð¾Ð·Ð±Ð¸Ñ™Ð½Ð¾Ñ�Ñ‚ Ð³Ñ€ÐµÑˆÐºÐµ: %x\n"
+
+#: vms-alpha.c:5810
+#, c-format
+msgid "   entity name   : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² ÐµÐ½Ñ‚Ð¸Ñ‚ÐµÑ‚Ð°  : %.*s\n"
+
+#: vms-alpha.c:5812
+#, c-format
+msgid "   object name   : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² Ð¾Ð±Ñ˜ÐµÐºÑ‚Ð°  : %.*s\n"
+
+#: vms-alpha.c:5815
+#, c-format
+msgid "   binary ident  : 0x%08x\n"
+msgstr "   ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð±Ð¸Ð½Ð°Ñ€Ð½Ð¾Ð³ : 0x%08x\n"
+
+#: vms-alpha.c:5818
+#, c-format
+msgid "   ascii ident   : %.*s\n"
+msgstr "   Ð°Ñ�ÐºÑ€Ð¸ ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ   : %.*s\n"
+
+#: vms-alpha.c:5826
+#, c-format
+msgid "SYMG - Universal symbol definition\n"
+msgstr "SYMG â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° ÑƒÐ½Ð¸Ð²ÐµÑ€Ð·Ð°Ð»Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°\n"
+
+#: vms-alpha.c:5830
+#, c-format
+msgid "   symbol vector offset: 0x%08x\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: 0x%08x\n"
+
+#: vms-alpha.c:5832
+#, c-format
+msgid "   entry point: 0x%08x\n"
+msgstr "   Ñ‚Ð°Ñ‡ÐºÐ° ÑƒÐ½Ð¾Ñ�Ð°: 0x%08x\n"
+
+#: vms-alpha.c:5834
+#, c-format
+msgid "   proc descr : 0x%08x\n"
+msgstr "   Ð¾Ð¿Ð¸Ñ�Ð½Ð¸Ðº Ð¿Ñ€Ð¾Ñ†ÐµÑ�Ð° : 0x%08x\n"
+
+#: vms-alpha.c:5836
+#, c-format
+msgid "   psect index: %u\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: %u\n"
+
+#: vms-alpha.c:5847
+#, c-format
+msgid "SYMV - Vectored symbol definition\n"
+msgstr "SYMV â€” Ð”ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ð²ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°\n"
+
+#: vms-alpha.c:5851
+#, c-format
+msgid "   vector      : 0x%08x\n"
+msgstr "   Ð²ÐµÐºÑ‚Ð¾Ñ€     : 0x%08x\n"
+
+#: vms-alpha.c:5853 vms-alpha.c:5872
+#, c-format
+msgid "   psect offset: %u\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: %u\n"
+
+#: vms-alpha.c:5866
+#, c-format
+msgid "SYMM - Global symbol definition with version\n"
+msgstr "SYMM â€” ÐžÐ¿ÑˆÑ‚Ð° Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ˜Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ�Ð° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ð¾Ð¼\n"
+
+#: vms-alpha.c:5870
+#, c-format
+msgid "   version mask: 0x%08x\n"
+msgstr "   Ð¼Ð°Ñ�ÐºÐ° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ: 0x%08x\n"
+
+#: vms-alpha.c:5881
+#, c-format
+msgid "unhandled egsd entry type %u\n"
+msgstr "Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð² â€žegsdâ€œ ÑƒÐ½Ð¾Ñ� Ð²Ñ€Ñ�Ñ‚Ðµ %u\n"
+
+#: vms-alpha.c:5915
+#, c-format
+msgid "    linkage index: %u, replacement insn: 0x%08x\n"
+msgstr "    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¸Ð½Ñ�Ñ‚Ñ€ÑƒÐºÑ†Ð¸Ñ˜Ð° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°: 0x%08x\n"
+
+#: vms-alpha.c:5918
+#, c-format
+msgid "    psect idx 1: %u, offset 1: 0x%08x %08x\n"
+msgstr "    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 1: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 1: 0x%08x %08x\n"
+
+#: vms-alpha.c:5922
+#, c-format
+msgid "    psect idx 2: %u, offset 2: 0x%08x %08x\n"
+msgstr "    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 2: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 2: 0x%08x %08x\n"
+
+#: vms-alpha.c:5927
+#, c-format
+msgid "    psect idx 3: %u, offset 3: 0x%08x %08x\n"
+msgstr "    Ð¸Ð½Ð´ÐµÐºÑ� Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° 3: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ 3: 0x%08x %08x\n"
+
+#: vms-alpha.c:5932
+#, c-format
+msgid "    global name: %.*s\n"
+msgstr "    Ð¾Ð¿ÑˆÑ‚Ð¸ Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:5942
+#, c-format
+msgid "  %s (len=%u+%u):\n"
+msgstr "  %s (Ð´ÑƒÐ¶Ð¸Ð½Ð°=%u+%u):\n"
+
+#: vms-alpha.c:5957
+#, c-format
+msgid "   (type: %3u, size: 4+%3u): "
+msgstr "   (Ð²Ñ€Ñ�Ñ‚Ð°: %3u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 4+%3u): "
+
+#: vms-alpha.c:5961
+#, c-format
+msgid "STA_GBL (stack global) %.*s\n"
+msgstr "STA_GBL (Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) %.*s\n"
+
+#: vms-alpha.c:5965
+#, c-format
+msgid "STA_LW (stack longword) 0x%08x\n"
+msgstr "STA_LW (Ð´ÑƒÐ³Ð° Ñ€ÐµÑ‡ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) 0x%08x\n"
+
+#: vms-alpha.c:5969
+#, c-format
+msgid "STA_QW (stack quadword) 0x%08x %08x\n"
+msgstr "STA_QW (Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾Ñ€ÐµÑ‡ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°) 0x%08x %08x\n"
+
+#: vms-alpha.c:5974
+#, c-format
+msgid "STA_PQ (stack psect base + offset)\n"
+msgstr "STA_PQ (Ð¾Ñ�Ð½Ð¾Ð²Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ° + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:5975
+#, c-format
+msgid "    psect: %u, offset: 0x%08x %08x\n"
+msgstr "    Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x %08x\n"
+
+#: vms-alpha.c:5981
+#, c-format
+msgid "STA_LI (stack literal)\n"
+msgstr "STA_LI (Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚ Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°)\n"
+
+#: vms-alpha.c:5984
+#, c-format
+msgid "STA_MOD (stack module)\n"
+msgstr "STA_MOD (Ð¼Ð¾Ð´ÑƒÐ» Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ°)\n"
+
+#: vms-alpha.c:5987
+#, c-format
+msgid "STA_CKARG (compare procedure argument)\n"
+msgstr "STA_CKARG (Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ° Ð¿Ð¾Ñ€ÐµÑ’ÐµÑšÐ°)\n"
+
+#: vms-alpha.c:5991
+#, c-format
+msgid "STO_B (store byte)\n"
+msgstr "STO_B (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð±Ð°Ñ˜Ñ‚)\n"
+
+#: vms-alpha.c:5994
+#, c-format
+msgid "STO_W (store word)\n"
+msgstr "STO_W (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ€ÐµÑ‡)\n"
+
+#: vms-alpha.c:5997
+#, c-format
+msgid "STO_LW (store longword)\n"
+msgstr "STO_LW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð´ÑƒÐ³Ñƒ Ñ€ÐµÑ‡)\n"
+
+#: vms-alpha.c:6000
+#, c-format
+msgid "STO_QW (store quadword)\n"
+msgstr "STO_QW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾Ñ€ÐµÑ‡)\n"
+
+#: vms-alpha.c:6006
+#, c-format
+msgid "STO_IMMR (store immediate repeat) %u bytes\n"
+msgstr "STO_IMMR (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¼Ð¾Ð¼ÐµÐ½Ñ‚Ð°Ð»Ð½Ð¾ Ð¿Ð¾Ð½Ð°Ð²Ñ™Ð°ÑšÐµ) %u Ð±Ð°Ñ˜Ñ‚Ð°\n"
+
+#: vms-alpha.c:6013
+#, c-format
+msgid "STO_GBL (store global) %.*s\n"
+msgstr "STO_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ðµ) %.*s\n"
+
+#: vms-alpha.c:6017
+#, c-format
+msgid "STO_CA (store code address) %.*s\n"
+msgstr "STO_CA (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ ÐºÐ¾Ð´Ð°) %.*s\n"
+
+#: vms-alpha.c:6021
+#, c-format
+msgid "STO_RB (store relative branch)\n"
+msgstr "STO_RB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ñ€ÐµÐ»Ð°Ñ‚Ð¸Ð²Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ)\n"
+
+#: vms-alpha.c:6024
+#, c-format
+msgid "STO_AB (store absolute branch)\n"
+msgstr "STO_AB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð¿Ñ�Ð¾Ð»ÑƒÑ‚Ð½Ñƒ Ð³Ñ€Ð°Ð½Ñƒ)\n"
+
+#: vms-alpha.c:6027
+#, c-format
+msgid "STO_OFF (store offset to psect)\n"
+msgstr "STO_OFF (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñƒ Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº)\n"
+
+#: vms-alpha.c:6033
+#, c-format
+msgid "STO_IMM (store immediate) %u bytes\n"
+msgstr "STO_IMM (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¼Ð¾Ð¼ÐµÐ½Ñ‚Ð°Ð»Ð½Ð¾) %u Ð±Ð°Ñ˜Ñ‚Ð°\n"
+
+#: vms-alpha.c:6040
+#, c-format
+msgid "STO_GBL_LW (store global longword) %.*s\n"
+msgstr "STO_GBL_LW (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ñƒ Ð´ÑƒÐ³Ñƒ Ñ€ÐµÑ‡) %.*s\n"
+
+#: vms-alpha.c:6044
+#, c-format
+msgid "STO_OFF (store LP with procedure signature)\n"
+msgstr "STO_OFF (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð›ÐŸ Ñ�Ð° Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�Ð¾Ð¼ Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ°)\n"
+
+#: vms-alpha.c:6047
+#, c-format
+msgid "STO_BR_GBL (store branch global) *todo*\n"
+msgstr "STO_BR_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ Ð³Ñ€Ð°Ð½Ðµ) *ÑƒÑ€Ð°Ð´Ð¸Ñ‚Ð¸*\n"
+
+#: vms-alpha.c:6050
+#, c-format
+msgid "STO_BR_PS (store branch psect + offset) *todo*\n"
+msgstr "STO_BR_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð³Ñ€Ð°Ð½Ðµ) *ÑƒÑ€Ð°Ð´Ð¸Ñ‚Ð¸*\n"
+
+#: vms-alpha.c:6054
+#, c-format
+msgid "OPR_NOP (no-operation)\n"
+msgstr "OPR_NOP (Ð±ÐµÐ· Ñ€Ð°Ð´ÑšÐµ)\n"
+
+#: vms-alpha.c:6057
+#, c-format
+msgid "OPR_ADD (add)\n"
+msgstr "OPR_ADD (Ð·Ð±Ñ€Ð°Ñ˜Ð°)\n"
+
+#: vms-alpha.c:6060
+#, c-format
+msgid "OPR_SUB (substract)\n"
+msgstr "OPR_SUB (Ð¾Ð´ÑƒÐ·Ð¸Ð¼Ð°)\n"
+
+#: vms-alpha.c:6063
+#, c-format
+msgid "OPR_MUL (multiply)\n"
+msgstr "OPR_MUL (Ð¼Ð½Ð¾Ð¶Ð¸)\n"
+
+#: vms-alpha.c:6066
+#, c-format
+msgid "OPR_DIV (divide)\n"
+msgstr "OPR_DIV (Ð´ÐµÐ»Ð¸)\n"
+
+#: vms-alpha.c:6069
+#, c-format
+msgid "OPR_AND (logical and)\n"
+msgstr "OPR_AND (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ Ð˜)\n"
+
+#: vms-alpha.c:6072
+#, c-format
+msgid "OPR_IOR (logical inclusive or)\n"
+msgstr "OPR_IOR (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ ÑƒÐºÑ™ÑƒÑ‡Ð¸Ð²Ð¾ Ð˜Ð›Ð˜)\n"
+
+#: vms-alpha.c:6075
+#, c-format
+msgid "OPR_EOR (logical exclusive or)\n"
+msgstr "OPR_EOR (Ð»Ð¾Ð³Ð¸Ñ‡ÐºÐ¾ Ð¸Ñ�ÐºÑ™ÑƒÑ‡Ð¸Ð²Ð¾ Ð˜Ð›Ð˜)\n"
+
+#: vms-alpha.c:6078
+#, c-format
+msgid "OPR_NEG (negate)\n"
+msgstr "OPR_NEG (Ð½ÐµÐ³Ð°Ñ†Ð¸Ñ˜Ð°)\n"
+
+#: vms-alpha.c:6081
+#, c-format
+msgid "OPR_COM (complement)\n"
+msgstr "OPR_COM (ÐºÐ¾Ð¼Ð¿Ð»ÐµÐ¼ÐµÐ½Ñ‚)\n"
+
+#: vms-alpha.c:6084
+#, c-format
+msgid "OPR_INSV (insert field)\n"
+msgstr "OPR_INSV (ÑƒÐ¼ÐµÑ›Ðµ Ð¿Ð¾Ñ™Ðµ)\n"
+
+#: vms-alpha.c:6087
+#, c-format
+msgid "OPR_ASH (arithmetic shift)\n"
+msgstr "OPR_ASH (Ð°Ñ€Ð¸Ñ‚Ð¼ÐµÑ‚Ð¸Ñ‡ÐºÐ¸ Ð¿Ð¾Ð¼Ð°Ðº)\n"
+
+#: vms-alpha.c:6090
+#, c-format
+msgid "OPR_USH (unsigned shift)\n"
+msgstr "OPR_USH (Ð¿Ð¾Ð¼Ð°Ðº Ð±ÐµÐ· Ð·Ð½Ð°ÐºÐ°)\n"
+
+#: vms-alpha.c:6093
+#, c-format
+msgid "OPR_ROT (rotate)\n"
+msgstr "OPR_ROT (Ð¾ÐºÑ€ÐµÑ›Ðµ)\n"
+
+#: vms-alpha.c:6096
+#, c-format
+msgid "OPR_SEL (select)\n"
+msgstr "OPR_SEL (Ð±Ð¸Ñ€Ð°)\n"
+
+#: vms-alpha.c:6099
+#, c-format
+msgid "OPR_REDEF (redefine symbol to curr location)\n"
+msgstr "OPR_REDEF (Ð¿Ð¾Ð½Ð¾Ð²Ð¾ Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ñ�Ð¸Ð¼Ð±Ð¾Ð» Ñ‚ÐµÐºÑƒÑ›Ðµ Ð»Ð¾ÐºÐ°Ñ†Ð¸Ñ˜Ðµ)\n"
+
+#: vms-alpha.c:6102
+#, c-format
+msgid "OPR_REDEF (define a literal)\n"
+msgstr "OPR_REDEF (Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚)\n"
+
+#: vms-alpha.c:6106
+#, c-format
+msgid "STC_LP (store cond linkage pair)\n"
+msgstr "STC_LP (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð°Ñ€ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° ÑƒÑ�Ð»Ð¾Ð²Ð°)\n"
+
+#: vms-alpha.c:6110
+#, c-format
+msgid "STC_LP_PSB (store cond linkage pair + signature)\n"
+msgstr "STC_LP_PSB (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿Ð°Ñ€ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ° ÑƒÑ�Ð»Ð¾Ð²Ð° + Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�)\n"
+
+#: vms-alpha.c:6111
+#, c-format
+msgid "   linkage index: %u, procedure: %.*s\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿Ð°Ðº: %.*s\n"
+
+#: vms-alpha.c:6114
+#, c-format
+msgid "   signature: %.*s\n"
+msgstr "   Ð¿Ð¾Ñ‚Ð¿Ð¸Ñ�: %.*s\n"
+
+#: vms-alpha.c:6117
+#, c-format
+msgid "STC_GBL (store cond global)\n"
+msgstr "STC_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ�Ñ‚ ÑƒÑ�Ð»Ð¾Ð²Ð°)\n"
+
+#: vms-alpha.c:6118
+#, c-format
+msgid "   linkage index: %u, global: %.*s\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¾Ð¿ÑˆÑ‚Ðµ: %.*s\n"
+
+#: vms-alpha.c:6122
+#, c-format
+msgid "STC_GCA (store cond code address)\n"
+msgstr "STC_GCA (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ñƒ ÐºÐ¾Ð´Ð° ÑƒÑ�Ð»Ð¾Ð²Ð°)\n"
+
+#: vms-alpha.c:6123
+#, c-format
+msgid "   linkage index: %u, procedure name: %.*s\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð½Ð°Ð·Ð¸Ð² Ð¿Ð¾Ñ�Ñ‚ÑƒÐ¿ÐºÐ°: %.*s\n"
+
+#: vms-alpha.c:6127
+#, c-format
+msgid "STC_PS (store cond psect + offset)\n"
+msgstr "STC_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ ÑƒÑ�Ð»Ð¾Ð²Ð°)\n"
+
+#: vms-alpha.c:6129
+#, c-format
+msgid "   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"
+msgstr "   Ð¸Ð½Ð´ÐµÐºÑ� Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°: %u, Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x %08x\n"
+
+#: vms-alpha.c:6136
+#, c-format
+msgid "STC_NOP_GBL (store cond NOP at global addr)\n"
+msgstr "STC_NOP_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žNOPâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)\n"
+
+#: vms-alpha.c:6140
+#, c-format
+msgid "STC_NOP_PS (store cond NOP at psect + offset)\n"
+msgstr "STC_NOP_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žNOPâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:6144
+#, c-format
+msgid "STC_BSR_GBL (store cond BSR at global addr)\n"
+msgstr "STC_BSR_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBSRâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)\n"
+
+#: vms-alpha.c:6148
+#, c-format
+msgid "STC_BSR_PS (store cond BSR at psect + offset)\n"
+msgstr "STC_BSR_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBSRâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:6152
+#, c-format
+msgid "STC_LDA_GBL (store cond LDA at global addr)\n"
+msgstr "STC_LDA_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žLDAâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)\n"
+
+#: vms-alpha.c:6156
+#, c-format
+msgid "STC_LDA_PS (store cond LDA at psect + offset)\n"
+msgstr "STC_LDA_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žLDAâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:6160
+#, c-format
+msgid "STC_BOH_GBL (store cond BOH at global addr)\n"
+msgstr "STC_BOH_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBOHâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)\n"
+
+#: vms-alpha.c:6164
+#, c-format
+msgid "STC_BOH_PS (store cond BOH at psect + offset)\n"
+msgstr "STC_BOH_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° â€žBOHâ€œ ÑƒÑ�Ð»Ð¾Ð²Ð° Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:6169
+#, c-format
+msgid "STC_NBH_GBL (store cond or hint at global addr)\n"
+msgstr "STC_NBH_GBL (Ñ�Ð¼ÐµÑˆÑ‚Ð° ÑƒÑ�Ð»Ð¾Ð² Ð¸Ð»Ð¸ Ð½Ð°Ñ˜Ð°Ð²Ñƒ Ð½Ð° Ð¾Ð¿ÑˆÑ‚Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸)\n"
+
+#: vms-alpha.c:6173
+#, c-format
+msgid "STC_NBH_PS (store cond or hint at psect + offset)\n"
+msgstr "STC_NBH_PS (Ñ�Ð¼ÐµÑˆÑ‚Ð° ÑƒÑ�Ð»Ð¾Ð² Ð¸Ð»Ð¸ Ð½Ð°Ñ˜Ð°Ð²Ñƒ Ð½Ð° Ð¿-Ð¾Ð´ÐµÑ™ÐºÑƒ + Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜)\n"
+
+#: vms-alpha.c:6177
+#, c-format
+msgid "CTL_SETRB (set relocation base)\n"
+msgstr "CTL_SETRB (Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð° Ð¾Ñ�Ð½Ð¾Ð²Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°)\n"
+
+#: vms-alpha.c:6183
+#, c-format
+msgid "CTL_AUGRB (augment relocation base) %u\n"
+msgstr "CTL_AUGRB (Ð¿Ð¾Ð²ÐµÑ›Ð°Ð²Ð° Ð¾Ñ�Ð½Ð¾Ð²Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°) %u\n"
+
+#: vms-alpha.c:6187
+#, c-format
+msgid "CTL_DFLOC (define location)\n"
+msgstr "CTL_DFLOC (Ð´ÐµÑ„Ð¸Ð½Ð¸ÑˆÐµ Ð¼ÐµÑ�Ñ‚Ð¾)\n"
+
+#: vms-alpha.c:6190
+#, c-format
+msgid "CTL_STLOC (set location)\n"
+msgstr "CTL_STLOC (Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™Ð° Ð¼ÐµÑ�Ñ‚Ð¾)\n"
+
+#: vms-alpha.c:6193
+#, c-format
+msgid "CTL_STKDL (stack defined location)\n"
+msgstr "CTL_STKDL (Ñ�Ð¿Ñ€ÐµÐ¼Ð½Ð¸ÐºÐ¾Ð¼ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾ Ð¼ÐµÑ�Ñ‚Ð¾)\n"
+
+#: vms-alpha.c:6196 vms-alpha.c:6610
+#, c-format
+msgid "*unhandled*\n"
+msgstr "*Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð¾*\n"
+
+#: vms-alpha.c:6226 vms-alpha.c:6265
+#, c-format
+msgid "cannot read GST record length\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ Ð´ÑƒÐ¶Ð¸Ð½Ñƒ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð°\n"
+
+#. Ill-formed.
+#: vms-alpha.c:6247
+#, c-format
+msgid "cannot find EMH in first GST record\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ â€žEMHâ€œ Ñƒ Ð¿Ñ€Ð²Ð¾Ð¼ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ñƒ\n"
+
+#: vms-alpha.c:6273
+#, c-format
+msgid "cannot read GST record header\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ð¼ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�Ð°\n"
+
+#: vms-alpha.c:6286
+#, c-format
+msgid " corrupted GST\n"
+msgstr " Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¾ â€žGSTâ€œ\n"
+
+#: vms-alpha.c:6294
+#, c-format
+msgid "cannot read GST record\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ Ð·Ð°Ð¿Ð¸Ñ�\n"
+
+#: vms-alpha.c:6323
+#, c-format
+msgid " unhandled EOBJ record type %u\n"
+msgstr " Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð² â€žEOBJâ€œ ÑƒÐ½Ð¾Ñ� Ð²Ñ€Ñ�Ñ‚Ðµ %u\n"
+
+#: vms-alpha.c:6346
+#, c-format
+msgid "  bitcount: %u, base addr: 0x%08x\n"
+msgstr "  Ð±Ñ€Ð¾Ñ˜ Ð±Ð¸Ñ‚Ð°: %u, Ð¾Ñ�Ð½Ð¾Ð²Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x\n"
+
+#: vms-alpha.c:6359
+#, c-format
+msgid "   bitmap: 0x%08x (count: %u):\n"
+msgstr "   Ð¼Ð°Ð¿Ð° Ð±Ð¸Ñ‚Ð°: 0x%08x (ÑƒÐºÑƒÐ¿Ð½Ð¾: %u):\n"
+
+#: vms-alpha.c:6366
+#, c-format
+msgid " %08x"
+msgstr " %08x"
+
+#: vms-alpha.c:6391
+#, c-format
+msgid "  image %u (%u entries)\n"
+msgstr "  Ñ�Ð»Ð¸ÐºÐ° %u (%u ÑƒÐ½Ð¾Ñ�Ð°)\n"
+
+#: vms-alpha.c:6396
+#, c-format
+msgid "   offset: 0x%08x, val: 0x%08x\n"
+msgstr "   Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: 0x%08x, Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: 0x%08x\n"
+
+#: vms-alpha.c:6417
+#, c-format
+msgid "  image %u (%u entries), offsets:\n"
+msgstr "  Ñ�Ð»Ð¸ÐºÐ° %u (%u ÑƒÐ½Ð¾Ñ�Ð°), Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜:\n"
+
+#: vms-alpha.c:6424
+#, c-format
+msgid " 0x%08x"
+msgstr " 0x%08x"
+
+#. 64 bits.
+#: vms-alpha.c:6546
+#, c-format
+msgid "64 bits *unhandled*\n"
+msgstr "64 Ð±Ð¸Ñ‚Ð° *Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð¾*\n"
+
+#: vms-alpha.c:6550
+#, c-format
+msgid "class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"
+msgstr "ÐºÐ»Ð°Ñ�Ð°: %u, Ð´-Ð²Ñ€Ñ�Ñ‚Ð°: %u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡: 0x%08x\n"
+
+#: vms-alpha.c:6561
+#, c-format
+msgid "non-contiguous array of %s\n"
+msgstr "Ð½Ð¸Ð· â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð½ÐµÐ¿Ñ€ÐµÐºÐ¸Ð´Ð°Ð½\n"
+
+#: vms-alpha.c:6565
+#, c-format
+msgid "dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"
+msgstr "Ð´Ð¸Ð¼Ñ†Ñ‚: %u, Ð°-Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ñ†Ð¸Ñ„Ñ€Ðµ: %u, Ñ€Ð°Ð·Ð¼ÐµÑ€Ð°: %u\n"
+
+#: vms-alpha.c:6569
+#, c-format
+msgid "arsize: %u, a0: 0x%08x\n"
+msgstr "Ð°Ñ€-Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, a0: 0x%08x\n"
+
+#: vms-alpha.c:6573
+#, c-format
+msgid "Strides:\n"
+msgstr "ÐšÐ¾Ñ€Ð°Ñ†Ð¸:\n"
+
+#: vms-alpha.c:6578
+#, c-format
+msgid "[%u]: %u\n"
+msgstr "[%u]: %u\n"
+
+#: vms-alpha.c:6583
+#, c-format
+msgid "Bounds:\n"
+msgstr "Ð“Ñ€Ð°Ð½Ð¸Ñ†Ðµ:\n"
+
+#: vms-alpha.c:6588
+#, c-format
+msgid "[%u]: Lower: %u, upper: %u\n"
+msgstr "[%u]: Ð”Ð¾ÑšÐ°: %u, Ð³Ð¾Ñ€ÑšÐ°: %u\n"
+
+#: vms-alpha.c:6600
+#, c-format
+msgid "unaligned bit-string of %s\n"
+msgstr "Ð½Ð¸Ñ�ÐºÐ° Ð±Ð¸Ñ‚Ð° â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ñ€Ð°Ð²Ð½Ð°Ñ‚Ð°\n"
+
+#: vms-alpha.c:6604
+#, c-format
+msgid "base: %u, pos: %u\n"
+msgstr "Ð¾Ñ�Ð½Ð¾Ð²Ð°: %u, Ð¿Ð¾Ð»Ð¾Ð¶Ð°Ñ˜: %u\n"
+
+#: vms-alpha.c:6624
+#, c-format
+msgid "vflags: 0x%02x, value: 0x%08x "
+msgstr "Ð²-Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: 0x%08x "
+
+#: vms-alpha.c:6630
+#, c-format
+msgid "(no value)\n"
+msgstr "(Ð±ÐµÐ· Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸)\n"
+
+#: vms-alpha.c:6633
+#, c-format
+msgid "(not active)\n"
+msgstr "(Ð½Ð¸Ñ˜Ðµ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾)\n"
+
+#: vms-alpha.c:6636
+#, c-format
+msgid "(not allocated)\n"
+msgstr "(Ð½Ð¸Ñ˜Ðµ Ð´Ð¾Ð´ÐµÑ™ÐµÐ½Ð¾)\n"
+
+#: vms-alpha.c:6639
+#, c-format
+msgid "(descriptor)\n"
+msgstr "(Ð¾Ð¿Ð¸Ñ�Ð½Ð¸Ðº)\n"
+
+#: vms-alpha.c:6643
+#, c-format
+msgid "(trailing value)\n"
+msgstr "(Ð¿Ñ€Ð°Ñ‚ÐµÑ›Ð° Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚)\n"
+
+#: vms-alpha.c:6646
+#, c-format
+msgid "(value spec follows)\n"
+msgstr "(Ñ�Ð¿ÐµÑ†Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ˜Ð° Ñ�Ð»ÐµÐ´ÐµÑ›Ðµ Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸)\n"
+
+#: vms-alpha.c:6649
+#, c-format
+msgid "(at bit offset %u)\n"
+msgstr "(Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð±Ð¸Ñ‚Ð° %u)\n"
+
+#: vms-alpha.c:6652
+#, c-format
+msgid "(reg: %u, disp: %u, indir: %u, kind: "
+msgstr "(Ñ€ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€: %u, Ñ€Ð°Ð·Ð¼ÐµÑˆÑ‚Ð°Ñ˜: %u, Ð¸Ð½Ð´Ð¸Ñ€ÐµÐºÑ‚Ð½Ð¾: %u, Ð²Ñ€Ñ�Ñ‚Ð°: "
+
+#: vms-alpha.c:6659
+msgid "literal"
+msgstr "Ð´Ð¾Ñ�Ð»Ð¾Ð²Ð½Ð¾Ñ�Ñ‚"
+
+#: vms-alpha.c:6662
+msgid "address"
+msgstr "Ð°Ð´Ñ€ÐµÑ�Ð°"
+
+#: vms-alpha.c:6665
+msgid "desc"
+msgstr "Ð¾Ð¿Ð¸Ñ�"
+
+#: vms-alpha.c:6668
+msgid "reg"
+msgstr "Ñ€ÐµÐ³"
+
+#: vms-alpha.c:6743
+#, c-format
+msgid "Debug symbol table:\n"
+msgstr "Ð¢Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°:\n"
+
+#: vms-alpha.c:6754
+#, c-format
+msgid "cannot read DST header\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ\n"
+
+#: vms-alpha.c:6759
+#, c-format
+msgid " type: %3u, len: %3u (at 0x%08x): "
+msgstr " Ð²Ñ€Ñ�Ñ‚Ð°: %3u, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %3u (Ð¿Ñ€Ð¸ 0x%08x): "
+
+#: vms-alpha.c:6773
+#, c-format
+msgid "cannot read DST symbol\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDSTâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð»\n"
+
+#: vms-alpha.c:6816
+#, c-format
+msgid "standard data: %s\n"
+msgstr "Ñ�Ñ‚Ð°Ð½Ð´Ð°Ñ€Ð´Ð½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸: %s\n"
+
+#: vms-alpha.c:6819 vms-alpha.c:6903
+#, c-format
+msgid "    name: %.*s\n"
+msgstr "    Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6826
+#, c-format
+msgid "modbeg\n"
+msgstr "Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð¼Ð¾Ð´ÑƒÐ»Ð°\n"
+
+#: vms-alpha.c:6827
+#, c-format
+msgid "   flags: %d, language: %u, major: %u, minor: %u\n"
+msgstr "   Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %d, Ñ˜ÐµÐ·Ð¸Ðº: %u, Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u\n"
+
+#: vms-alpha.c:6833 vms-alpha.c:7099
+#, c-format
+msgid "   module name: %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² Ð¼Ð¾Ð´ÑƒÐ»Ð°           : %.*s\n"
+
+#: vms-alpha.c:6836
+#, c-format
+msgid "   compiler   : %.*s\n"
+msgstr "   Ð¿Ñ€ÐµÐ²Ð¾Ð´Ð¸Ð»Ð°Ñ†  : %.*s\n"
+
+#: vms-alpha.c:6841
+#, c-format
+msgid "modend\n"
+msgstr "ÐºÑ€Ð°Ñ˜ Ð¼Ð¾Ð´ÑƒÐ»Ð°\n"
+
+#: vms-alpha.c:6848
+msgid "rtnbeg\n"
+msgstr "Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ñ€ÑƒÑ‚Ð¸Ð½Ðµ\n"
+
+#: vms-alpha.c:6849
+#, c-format
+msgid "    flags: %u, address: 0x%08x, pd-address: 0x%08x\n"
+msgstr "    Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð¿Ð´-Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x\n"
+
+#: vms-alpha.c:6854
+#, c-format
+msgid "    routine name: %.*s\n"
+msgstr "    Ð½Ð°Ð·Ð¸Ð² Ñ€ÑƒÑ‚Ð¸Ð½Ðµ : %.*s\n"
+
+#: vms-alpha.c:6862
+#, c-format
+msgid "rtnend: size 0x%08x\n"
+msgstr "ÐºÑ€Ð°Ñ˜ Ñ€ÑƒÑ‚Ð¸Ð½Ðµ: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° 0x%08x\n"
+
+#: vms-alpha.c:6870
+#, c-format
+msgid "prolog: bkpt address 0x%08x\n"
+msgstr "Ð¿Ñ€Ð¾Ð»Ð¾Ð³: Ð±ÐºÐ¿Ñ‚ Ð°Ð´Ñ€ÐµÑ�Ð° 0x%08x\n"
+
+#: vms-alpha.c:6878
+#, c-format
+msgid "epilog: flags: %u, count: %u\n"
+msgstr "ÐµÐ¿Ð¸Ð»Ð¾Ð³: Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð±Ñ€Ð¾Ñ˜: %u\n"
+
+#: vms-alpha.c:6887
+#, c-format
+msgid "blkbeg: address: 0x%08x, name: %.*s\n"
+msgstr "Ð±Ð»Ðº Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº: Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6896
+#, c-format
+msgid "blkend: size: 0x%08x\n"
+msgstr "Ð±Ð»Ðº ÐºÑ€Ð°Ñ˜: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x\n"
+
+#: vms-alpha.c:6902
+#, c-format
+msgid "typspec (len: %u)\n"
+msgstr "Ð¾Ð´Ñ€ÐµÐ´Ð±Ð° Ð²Ñ€Ñ�Ñ‚Ðµ (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)\n"
+
+#: vms-alpha.c:6909
+#, c-format
+msgid "septyp, name: %.*s\n"
+msgstr "Ð²Ñ€Ñ�Ñ‚Ð° Ð¿Ð¾Ñ�Ñ‚Ð°Ð²ÐºÐµ, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6918
+#, c-format
+msgid "recbeg: name: %.*s\n"
+msgstr "Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð·Ð°Ð¿Ð¸Ñ�Ð°: Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6925
+#, c-format
+msgid "recend\n"
+msgstr "ÐºÑ€Ð°Ñ˜ Ð·Ð°Ð¿Ð¸Ñ�Ð°\n"
+
+#: vms-alpha.c:6928
+#, c-format
+msgid "enumbeg, len: %u, name: %.*s\n"
+msgstr "Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6932
+#, c-format
+msgid "enumelt, name: %.*s\n"
+msgstr "ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð¸ Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:6936
+#, c-format
+msgid "enumend\n"
+msgstr "ÐºÑ€Ð°Ñ˜ Ð±Ñ€Ð¾Ñ˜Ð°ÑšÐ°\n"
+
+#: vms-alpha.c:6953
+#, c-format
+msgid "discontiguous range (nbr: %u)\n"
+msgstr "Ð½ÐµÐ¿Ñ€ÐµÐºÐ¸Ð´Ð½Ð¸ Ð¾Ð¿Ñ�ÐµÐ³ (Ð±Ñ€.: %u)\n"
+
+#: vms-alpha.c:6955
+#, c-format
+msgid "    address: 0x%08x, size: %u\n"
+msgstr "    Ð°Ð´Ñ€ÐµÑ�Ð°: 0x%08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u\n"
+
+#: vms-alpha.c:6965
+#, c-format
+msgid "line num  (len: %u)\n"
+msgstr "Ð±Ñ€Ð¾Ñ˜ Ñ€ÐµÐ´Ð°  (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)\n"
+
+#: vms-alpha.c:6982
+#, c-format
+msgid "delta_pc_w %u\n"
+msgstr "delta_pc_w %u\n"
+
+#: vms-alpha.c:6989
+#, c-format
+msgid "incr_linum(b): +%u\n"
+msgstr "incr_linum(b): +%u\n"
+
+#: vms-alpha.c:6995
+#, c-format
+msgid "incr_linum_w: +%u\n"
+msgstr "incr_linum_w: +%u\n"
+
+#: vms-alpha.c:7001
+#, c-format
+msgid "incr_linum_l: +%u\n"
+msgstr "incr_linum_l: +%u\n"
+
+#: vms-alpha.c:7007
+#, c-format
+msgid "set_line_num(w) %u\n"
+msgstr "set_line_num(w) %u\n"
+
+#: vms-alpha.c:7012
+#, c-format
+msgid "set_line_num_b %u\n"
+msgstr "set_line_num_b %u\n"
+
+#: vms-alpha.c:7017
+#, c-format
+msgid "set_line_num_l %u\n"
+msgstr "set_line_num_l %u\n"
+
+#: vms-alpha.c:7022
+#, c-format
+msgid "set_abs_pc: 0x%08x\n"
+msgstr "set_abs_pc: 0x%08x\n"
+
+#: vms-alpha.c:7026
+#, c-format
+msgid "delta_pc_l: +0x%08x\n"
+msgstr "delta_pc_l: +0x%08x\n"
+
+#: vms-alpha.c:7031
+#, c-format
+msgid "term(b): 0x%02x"
+msgstr "term(b): 0x%02x"
+
+#: vms-alpha.c:7033
+#, c-format
+msgid "        pc: 0x%08x\n"
+msgstr "        pc: 0x%08x\n"
+
+#: vms-alpha.c:7038
+#, c-format
+msgid "term_w: 0x%04x"
+msgstr "term_w: 0x%04x"
+
+#: vms-alpha.c:7040
+#, c-format
+msgid "    pc: 0x%08x\n"
+msgstr "    pc: 0x%08x\n"
+
+#: vms-alpha.c:7046
+#, c-format
+msgid "delta pc +%-4d"
+msgstr "delta pc +%-4d"
+
+#: vms-alpha.c:7049
+#, c-format
+msgid "    pc: 0x%08x line: %5u\n"
+msgstr "    pc: 0x%08x Ñ€ÐµÐ´: %5u\n"
+
+#: vms-alpha.c:7054
+#, c-format
+msgid "    *unhandled* cmd %u\n"
+msgstr "    *Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%uâ€œ\n"
+
+#: vms-alpha.c:7069
+#, c-format
+msgid "source (len: %u)\n"
+msgstr "Ð¸Ð·Ð²Ð¾Ñ€ (Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u)\n"
+
+#: vms-alpha.c:7083
+#, c-format
+msgid "   declfile: len: %u, flags: %u, fileid: %u\n"
+msgstr "   declfile: Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u, Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: %u, Ð¸Ð´ Ð¿Ð¾Ñ™Ð°: %u\n"
+
+#: vms-alpha.c:7087
+#, c-format
+msgid "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
+msgstr "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
+
+#: vms-alpha.c:7096
+#, c-format
+msgid "   filename   : %.*s\n"
+msgstr "   Ð½Ð°Ð·Ð¸Ð² Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ: %.*s\n"
+
+#: vms-alpha.c:7105
+#, c-format
+msgid "   setfile %u\n"
+msgstr "   setfile %u\n"
+
+#: vms-alpha.c:7110 vms-alpha.c:7115
+#, c-format
+msgid "   setrec %u\n"
+msgstr "   setrec %u\n"
+
+#: vms-alpha.c:7120 vms-alpha.c:7125
+#, c-format
+msgid "   setlnum %u\n"
+msgstr "   setlnum %u\n"
+
+#: vms-alpha.c:7130 vms-alpha.c:7135
+#, c-format
+msgid "   deflines %u\n"
+msgstr "   deflines %u\n"
+
+#: vms-alpha.c:7139
+#, c-format
+msgid "   formfeed\n"
+msgstr "   formfeed\n"
+
+#: vms-alpha.c:7143
+#, c-format
+msgid "   *unhandled* cmd %u\n"
+msgstr "   *Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð½Ð°Ñ€ÐµÐ´Ð±Ð° â€ž%uâ€œ\n"
+
+#: vms-alpha.c:7155
+#, c-format
+msgid "*unhandled* dst type %u\n"
+msgstr "*Ð½ÐµÐ¾Ð±Ñ€Ð°Ð´Ð¸Ð²Ð°* Ð´Ñ�Ñ‚ Ð²Ñ€Ñ�Ñ‚Ð° â€ž%uâ€œ\n"
+
+#: vms-alpha.c:7187
+#, c-format
+msgid "cannot read EIHD\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHDâ€œ\n"
+
+#: vms-alpha.c:7190
+#, c-format
+msgid "EIHD: (size: %u, nbr blocks: %u)\n"
+msgstr "EIHD: (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð±Ñ€Ð¾Ñ˜ Ð±Ð»Ð¾ÐºÐ¾Ð²Ð°: %u)\n"
+
+#: vms-alpha.c:7193
+#, c-format
+msgid " majorid: %u, minorid: %u\n"
+msgstr " Ð²ÐµÑ›Ð¸ Ð¸Ð´: %u, Ð¼Ð°ÑšÐ¸ Ð¸Ð´: %u\n"
+
+#: vms-alpha.c:7201
+msgid "executable"
+msgstr "Ð¸Ð·Ð²Ñ€ÑˆÐ½Ð°"
+
+#: vms-alpha.c:7204
+msgid "linkable image"
+msgstr "Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð° Ñ�Ð»Ð¸ÐºÐ°"
+
+#: vms-alpha.c:7210
+#, c-format
+msgid " image type: %u (%s)"
+msgstr " Ð²Ñ€Ñ�Ñ‚Ð° Ñ�Ð»Ð¸ÐºÐµ: %u (%s)"
+
+#: vms-alpha.c:7216
+msgid "native"
+msgstr "Ð¸Ð·Ð²Ð¾Ñ€Ð½Ð°"
+
+#: vms-alpha.c:7219
+msgid "CLI"
+msgstr "ÐšÐ›Ð˜"
+
+#: vms-alpha.c:7225
+#, c-format
+msgid ", subtype: %u (%s)\n"
+msgstr ", Ð¿Ð¾Ð´Ð²Ñ€Ñ�Ñ‚Ð°: %u (%s)\n"
+
+#: vms-alpha.c:7231
+#, c-format
+msgid " offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u\n"
+msgstr " Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜Ð¸: Ð¸Ñ�Ð´: %u, Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾: %u, Ð¿Ñ€Ð¾Ñ‡ Ñ�Ð¸Ð¼Ð±: %u, Ð¸Ð´ Ñ�Ð»Ð¸ÐºÐµ: %u, Ð·Ð°ÐºÑ€Ð¿Ð°: %u\n"
+
+#: vms-alpha.c:7235
+#, c-format
+msgid " fixup info rva: "
+msgstr " Ð¿Ð¾Ð¿Ñ€Ð°Ð²ÐºÐ° Ð¸Ð½Ñ„Ð¾ Ñ€Ð²Ð°: "
+
+#: vms-alpha.c:7237
+#, c-format
+msgid ", symbol vector rva: "
+msgstr ", Ð²ÐµÐºÑ‚Ð¾Ñ€ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ñ€Ð²Ð°: "
+
+#: vms-alpha.c:7240
+#, c-format
+msgid ""
+"\n"
+" version array off: %u\n"
+msgstr ""
+"\n"
+" Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ð·Ð° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ: %u\n"
+
+#: vms-alpha.c:7244
+#, c-format
+msgid " img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"
+msgstr " Ð±Ñ€Ð¾Ñ˜ Ð£/Ð˜ Ñ�Ð»Ð¸ÐºÐµ: %u, Ð±Ñ€. ÐºÐ°Ð½Ð°Ð»Ð°: %u, Ñ€ÐµÐº Ð¿Ñ€Ð¸: %08x%08x\n"
+
+#: vms-alpha.c:7250
+#, c-format
+msgid " linker flags: %08x:"
+msgstr " Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°: %08x:"
+
+#: vms-alpha.c:7280
+#, c-format
+msgid " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
+msgstr " ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ: 0x%08x, Ð²ÐµÑ€Ð·Ð¸Ñ˜Ð° Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ð°: 0x%08x, Ð¿Ð¾ÐºÐ»Ð¾Ð¿Ñ™ÐµÐ½Ð¾ ÐºÑ‚Ñ€Ð»: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ñ�Ð¸Ð¼Ð²ÐµÐºÑ‚Ð¾Ñ€Ð°: %u\n"
+
+#: vms-alpha.c:7286
+#, c-format
+msgid " BPAGE: %u"
+msgstr " Ð‘Ð¡Ð¢Ð Ð�Ð�Ð˜Ð¦Ð�: %u"
+
+#: vms-alpha.c:7292
+#, c-format
+msgid ", ext fixup offset: %u, no_opt psect off: %u"
+msgstr ", Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ñ�Ð¿Ð¾Ñ™Ð½Ðµ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ° â€žno_optâ€œ-Ð°: %u"
+
+#: vms-alpha.c:7295
+#, c-format
+msgid ", alias: %u\n"
+msgstr ", Ð°Ð»Ð¸Ñ˜Ð°Ñ�: %u\n"
+
+#: vms-alpha.c:7303
+#, c-format
+msgid "system version array information:\n"
+msgstr "Ð½Ð¸Ð· Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð²ÐµÑ€Ð·Ð¸Ñ˜Ðµ Ñ�Ð¸Ñ�Ñ‚ÐµÐ¼Ð°:\n"
+
+#: vms-alpha.c:7307
+#, c-format
+msgid "cannot read EIHVN header\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHVNâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ\n"
+
+#: vms-alpha.c:7317
+#, c-format
+msgid "cannot read EIHVN version\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHVNâ€œ Ð¸Ð·Ð´Ð°ÑšÐµ\n"
+
+#: vms-alpha.c:7320
+#, c-format
+msgid "   %02u "
+msgstr "   %02u "
+
+#: vms-alpha.c:7324
+msgid "BASE_IMAGE       "
+msgstr "Ð¡Ð›Ð˜ÐšÐ�_ÐžÐ¡Ð�ÐžÐ’Ð•       "
+
+#: vms-alpha.c:7327
+msgid "MEMORY_MANAGEMENT"
+msgstr "Ð£ÐŸÐ Ð�Ð’Ð‰Ð�ÐŠÐ•_ÐœÐ•ÐœÐžÐ Ð˜ÐˆÐžÐœ"
+
+#: vms-alpha.c:7330
+msgid "IO               "
+msgstr "Ð£Ð˜               "
+
+#: vms-alpha.c:7333
+msgid "FILES_VOLUMES    "
+msgstr "Ð’ÐžÐ›Ð£ÐœÐ•Ð�Ð˜_Ð”Ð�Ð¢ÐžÐ¢Ð•ÐšÐ�    "
+
+#: vms-alpha.c:7336
+msgid "PROCESS_SCHED    "
+msgstr "Ð—Ð�ÐšÐ�Ð—Ð�Ð�Ð˜_ÐŸÐ ÐžÐ¦Ð•Ð¡Ð˜    "
+
+#: vms-alpha.c:7339
+msgid "SYSGEN           "
+msgstr "Ð¡Ð¢Ð’Ð�Ð Ð�ÐŠÐ•_Ð¡Ð˜Ð¡Ð¢Ð•ÐœÐ�           "
+
+#: vms-alpha.c:7342
+msgid "CLUSTERS_LOCKMGR "
+msgstr "ÐœÐ“Ð Ð—Ð�ÐšÐ‰Ð£Ð§Ð�Ð’Ð�ÐŠÐ•_ÐšÐ›Ð�Ð¡Ð¢Ð•Ð Ð� "
+
+#: vms-alpha.c:7345
+msgid "LOGICAL_NAMES    "
+msgstr "Ð›ÐžÐ“Ð˜Ð§ÐšÐ˜_Ð�Ð�Ð—Ð˜Ð’Ð˜    "
+
+#: vms-alpha.c:7348
+msgid "SECURITY         "
+msgstr "Ð‘Ð•Ð—Ð‘Ð•Ð”Ð�ÐžÐ¡Ð¢         "
+
+#: vms-alpha.c:7351
+msgid "IMAGE_ACTIVATOR  "
+msgstr "ÐŸÐžÐšÐ Ð•Ð¢Ð�Ð§_Ð¡Ð›Ð˜ÐšÐ•  "
+
+#: vms-alpha.c:7354
+msgid "NETWORKS         "
+msgstr "ÐœÐ Ð•Ð–Ð•         "
+
+#: vms-alpha.c:7357
+msgid "COUNTERS         "
+msgstr "Ð‘Ð ÐžÐˆÐ�Ð§Ð˜         "
+
+#: vms-alpha.c:7360
+msgid "STABLE           "
+msgstr "Ð¡Ð¢Ð�Ð‘Ð˜Ð›Ð�Ðž           "
+
+#: vms-alpha.c:7363
+msgid "MISC             "
+msgstr "Ð Ð�Ð—Ð�Ðž             "
+
+#: vms-alpha.c:7366
+msgid "CPU              "
+msgstr "Ð¦ÐŸÐ£              "
+
+#: vms-alpha.c:7369
+msgid "VOLATILE         "
+msgstr "ÐŸÐ ÐžÐœÐ•Ð�Ð‰Ð˜Ð’Ðž         "
+
+#: vms-alpha.c:7372
+msgid "SHELL            "
+msgstr "Ð¨ÐšÐžÐ‰ÐšÐ�            "
+
+#: vms-alpha.c:7375
+msgid "POSIX            "
+msgstr "ÐŸÐžÐ¡Ð˜ÐšÐ¡            "
+
+#: vms-alpha.c:7378
+msgid "MULTI_PROCESSING "
+msgstr "Ð’Ð˜Ð¨Ð•_ÐžÐ‘Ð Ð�Ð”Ð�Ðž "
+
+#: vms-alpha.c:7381
+msgid "GALAXY           "
+msgstr "Ð“Ð�Ð›Ð�ÐšÐ¡Ð˜ÐˆÐ�           "
+
+#: vms-alpha.c:7384
+msgid "*unknown*        "
+msgstr "*Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾*        "
+
+#: vms-alpha.c:7387
+#, c-format
+msgid ": %u.%u\n"
+msgstr ": %u.%u\n"
+
+#: vms-alpha.c:7400 vms-alpha.c:7659
+#, c-format
+msgid "cannot read EIHA\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHAâ€œ\n"
+
+#: vms-alpha.c:7403
+#, c-format
+msgid "Image activation:  (size=%u)\n"
+msgstr "Ð�ÐºÑ‚Ð¸Ð²Ð¸Ñ€Ð°ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ:  (Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°=%u)\n"
+
+#: vms-alpha.c:7405
+#, c-format
+msgid " First address : 0x%08x 0x%08x\n"
+msgstr " ÐŸÑ€Ð²Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x\n"
+
+#: vms-alpha.c:7408
+#, c-format
+msgid " Second address: 0x%08x 0x%08x\n"
+msgstr " Ð”Ñ€ÑƒÐ³Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x\n"
+
+#: vms-alpha.c:7411
+#, c-format
+msgid " Third address : 0x%08x 0x%08x\n"
+msgstr " Ð¢Ñ€ÐµÑ›Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x\n"
+
+#: vms-alpha.c:7414
+#, c-format
+msgid " Fourth address: 0x%08x 0x%08x\n"
+msgstr " Ð§ÐµÑ‚Ð²Ñ€Ñ‚Ð° Ð°Ð´Ñ€ÐµÑ�Ð° : 0x%08x 0x%08x\n"
+
+#: vms-alpha.c:7417
+#, c-format
+msgid " Shared image  : 0x%08x 0x%08x\n"
+msgstr " Ð”ÐµÑ™ÐµÐ½Ð° Ñ�Ð»Ð¸ÐºÐ°   : 0x%08x 0x%08x\n"
+
+#: vms-alpha.c:7428
+#, c-format
+msgid "cannot read EIHI\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHIâ€œ\n"
+
+#: vms-alpha.c:7431
+#, c-format
+msgid "Image identification: (major: %u, minor: %u)\n"
+msgstr "ÐŸÑ€ÐµÐ¿Ð¾Ð·Ð½Ð°Ð²Ð°ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ðµ: %u, Ð¼Ð°ÑšÐµ: %u)\n"
+
+#: vms-alpha.c:7434
+#, c-format
+msgid " image name       : %.*s\n"
+msgstr " Ð½Ð°Ð·Ð¸Ð² Ñ�Ð»Ð¸ÐºÐµ    : %.*s\n"
+
+#: vms-alpha.c:7436
+#, c-format
+msgid " link time        : %s\n"
+msgstr " Ð²Ñ€ÐµÐ¼Ðµ Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°  : %s\n"
+
+#: vms-alpha.c:7438
+#, c-format
+msgid " image ident      : %.*s\n"
+msgstr " ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ñ�Ð»Ð¸ÐºÐµ       : %.*s\n"
+
+#: vms-alpha.c:7440
+#, c-format
+msgid " linker ident     : %.*s\n"
+msgstr " ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°Ñ‡Ð°       : %.*s\n"
+
+#: vms-alpha.c:7442
+#, c-format
+msgid " image build ident: %.*s\n"
+msgstr " ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ Ð¸Ð·Ð³Ñ€Ð°Ð´ÑšÐµ Ñ�Ð»Ð¸ÐºÐµ: %.*s\n"
+
+#: vms-alpha.c:7452
+#, c-format
+msgid "cannot read EIHS\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEIHSâ€œ\n"
+
+#: vms-alpha.c:7455
+#, c-format
+msgid "Image symbol & debug table: (major: %u, minor: %u)\n"
+msgstr "Ð¡Ð¸Ð¼Ð±Ð¾Ð» Ñ�Ð»Ð¸ÐºÐµ Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°: (Ð²ÐµÑ›Ðµ: %u, Ð¼Ð°ÑšÐµ: %u)\n"
+
+#: vms-alpha.c:7460
+#, c-format
+msgid " debug symbol table : vbn: %u, size: %u (0x%x)\n"
+msgstr " Ñ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ° : Ð²Ð±Ð½: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u (0x%x)\n"
+
+#: vms-alpha.c:7464
+#, c-format
+msgid " global symbol table: vbn: %u, records: %u\n"
+msgstr " Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¾Ð¿ÑˆÑ‚ÐµÐ³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°: Ð²Ð±Ð½: %u, Ð·Ð°Ð¿Ð¸Ñ�Ð¸: %u\n"
+
+#: vms-alpha.c:7468
+#, c-format
+msgid " debug module table : vbn: %u, size: %u\n"
+msgstr " Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°: Ð²Ð±Ð½: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u\n"
+
+#: vms-alpha.c:7481
+#, c-format
+msgid "cannot read EISD\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žEISDâ€œ\n"
+
+#: vms-alpha.c:7491
+#, c-format
+msgid "Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)\n"
+msgstr "ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ð¾Ð´ÐµÑ™ÐºÐ° Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜: %u)\n"
+
+#: vms-alpha.c:7498
+#, c-format
+msgid " section: base: 0x%08x%08x size: 0x%08x\n"
+msgstr " Ð¾Ð´ÐµÑ™Ð°Ðº: Ð¾Ñ�Ð½Ð¾Ð²Ð°: 0x%08x%08x Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x\n"
+
+#: vms-alpha.c:7503
+#, c-format
+msgid " flags: 0x%04x"
+msgstr " Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ : 0x%04x"
+
+#: vms-alpha.c:7540
+#, c-format
+msgid " vbn: %u, pfc: %u, matchctl: %u type: %u ("
+msgstr " Ð²Ð±Ð½: %u, Ð¿Ñ„Ñ†: %u, Ð¿Ð¾Ñ€ÐµÐ´Ð¸_Ñ†Ñ‚Ð»: %u Ð²Ñ€Ñ�Ñ‚Ð°: %u ("
+
+#: vms-alpha.c:7546
+msgid "NORMAL"
+msgstr "NORMAL"
+
+#: vms-alpha.c:7549
+msgid "SHRFXD"
+msgstr "SHRFXD"
+
+#: vms-alpha.c:7552
+msgid "PRVFXD"
+msgstr "PRVFXD"
+
+#: vms-alpha.c:7555
+msgid "SHRPIC"
+msgstr "SHRPIC"
+
+#: vms-alpha.c:7558
+msgid "PRVPIC"
+msgstr "PRVPIC"
+
+#: vms-alpha.c:7561
+msgid "USRSTACK"
+msgstr "USRSTACK"
+
+#: vms-alpha.c:7567
+msgid ")\n"
+msgstr ")\n"
+
+#: vms-alpha.c:7569
+#, c-format
+msgid " ident: 0x%08x, name: %.*s\n"
+msgstr " ÑƒÐ²Ð»Ð°Ñ‡ÐµÑšÐµ: 0x%08x, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:7579
+#, c-format
+msgid "cannot read DMT\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ\n"
+
+#: vms-alpha.c:7583
+#, c-format
+msgid "Debug module table:\n"
+msgstr "Ð¢Ð°Ð±ÐµÐ»Ð° Ð¼Ð¾Ð´ÑƒÐ»Ð° Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°:\n"
+
+#: vms-alpha.c:7592
+#, c-format
+msgid "cannot read DMT header\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ Ð·Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ\n"
+
+#: vms-alpha.c:7597
+#, c-format
+msgid " module offset: 0x%08x, size: 0x%08x, (%u psects)\n"
+msgstr " Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð¼Ð¾Ð´ÑƒÐ»Ð°: 0x%08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x, (%u Ð¿-Ð¾Ð´ÐµÑ™Ð°ÐºÐ°)\n"
+
+#: vms-alpha.c:7607
+#, c-format
+msgid "cannot read DMT psect\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDMTâ€œ Ð¿-Ð¾Ð´ÐµÑ™Ð°Ðº\n"
+
+#: vms-alpha.c:7610
+#, c-format
+msgid "  psect start: 0x%08x, length: %u\n"
+msgstr "  Ð¿Ð¾Ñ‡ÐµÑ‚Ð°Ðº Ð¿-Ð¾Ð´ÐµÑ™ÐºÐ°: 0x%08x, Ð´ÑƒÐ¶Ð¸Ð½Ð°: %u\n"
+
+#: vms-alpha.c:7623
+#, c-format
+msgid "cannot read DST\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žDSTâ€œ\n"
+
+#: vms-alpha.c:7633
+#, c-format
+msgid "cannot read GST\n"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ñ‡Ð¸Ñ‚Ð°Ð¼ â€žGSTâ€œ\n"
+
+#: vms-alpha.c:7637
+#, c-format
+msgid "Global symbol table:\n"
+msgstr "Ð¢Ð°Ð±ÐµÐ»Ð° Ð¾Ð¿ÑˆÑ‚Ð¸Ñ… Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°:\n"
+
+#: vms-alpha.c:7665
+#, c-format
+msgid "Image activator fixup: (major: %u, minor: %u)\n"
+msgstr "Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ° Ð¿Ð¾ÐºÑ€ÐµÑ‚Ð°Ñ‡Ð° Ñ�Ð»Ð¸ÐºÐµ: (Ð²ÐµÑ›Ð¸: %u, Ð¼Ð°ÑšÐ¸: %u)\n"
+
+#: vms-alpha.c:7668
+#, c-format
+msgid "  iaflink : 0x%08x %08x\n"
+msgstr "  Ð¸Ð°Ñ„ Ð²ÐµÐ·Ð° : 0x%08x %08x\n"
+
+#: vms-alpha.c:7671
+#, c-format
+msgid "  fixuplnk: 0x%08x %08x\n"
+msgstr "  Ð²ÐµÐ·Ð° Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ: 0x%08x %08x\n"
+
+#: vms-alpha.c:7674
+#, c-format
+msgid "  size : %u\n"
+msgstr "  Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° : %u\n"
+
+#: vms-alpha.c:7676
+#, c-format
+msgid "  flags: 0x%08x\n"
+msgstr "  Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ  : 0x%08x\n"
+
+#: vms-alpha.c:7680
+#, c-format
+msgid "  qrelfixoff: %5u, lrelfixoff: %5u\n"
+msgstr "  qrelfixoff: %5u, lrelfixoff: %5u\n"
+
+#: vms-alpha.c:7684
+#, c-format
+msgid "  qdotadroff: %5u, ldotadroff: %5u\n"
+msgstr "  qdotadroff: %5u, ldotadroff: %5u\n"
+
+#: vms-alpha.c:7688
+#, c-format
+msgid "  codeadroff: %5u, lpfixoff  : %5u\n"
+msgstr "  codeadroff: %5u, lpfixoff  : %5u\n"
+
+#: vms-alpha.c:7691
+#, c-format
+msgid "  chgprtoff : %5u\n"
+msgstr "  chgprtoff : %5u\n"
+
+#: vms-alpha.c:7694
+#, c-format
+msgid "  shlstoff  : %5u, shrimgcnt : %5u\n"
+msgstr "  shlstoff  : %5u, shrimgcnt : %5u\n"
+
+#: vms-alpha.c:7696
+#, c-format
+msgid "  shlextra  : %5u, permctx   : %5u\n"
+msgstr "  shlextra  : %5u, permctx   : %5u\n"
+
+#: vms-alpha.c:7699
+#, c-format
+msgid "  base_va : 0x%08x\n"
+msgstr "  base_va : 0x%08x\n"
+
+#: vms-alpha.c:7701
+#, c-format
+msgid "  lppsbfixoff: %5u\n"
+msgstr "  lppsbfixoff: %5u\n"
+
+#: vms-alpha.c:7709
+#, c-format
+msgid " Shareable images:\n"
+msgstr " Ð”ÐµÑ™Ð¸Ð²Ðµ Ñ�Ð»Ð¸ÐºÐµ:\n"
+
+#: vms-alpha.c:7713
+#, c-format
+msgid "  %u: size: %u, flags: 0x%02x, name: %.*s\n"
+msgstr "  %u: Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %u, Ð·Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ: 0x%02x, Ð½Ð°Ð·Ð¸Ð²: %.*s\n"
+
+#: vms-alpha.c:7720
+#, c-format
+msgid " quad-word relocation fixups:\n"
+msgstr " Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾-Ñ€ÐµÑ‡Ð¸:\n"
+
+#: vms-alpha.c:7725
+#, c-format
+msgid " long-word relocation fixups:\n"
+msgstr " Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð´ÑƒÐ³Ðµ-Ñ€ÐµÑ‡Ð¸:\n"
+
+#: vms-alpha.c:7730
+#, c-format
+msgid " quad-word .address reference fixups:\n"
+msgstr " Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ â€ž.addressâ€œ ÑƒÐ¿ÑƒÑ‚Ðµ Ñ‡ÐµÑ‚Ð²Ð¾Ñ€Ð¾-Ñ€ÐµÑ‡Ð¸:\n"
+
+#: vms-alpha.c:7735
+#, c-format
+msgid " long-word .address reference fixups:\n"
+msgstr " Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ â€ž.addressâ€œ ÑƒÐ¿ÑƒÑ‚Ðµ Ð´ÑƒÐ³Ðµ-Ñ€ÐµÑ‡Ð¸:\n"
+
+#: vms-alpha.c:7740
+#, c-format
+msgid " Code Address Reference Fixups:\n"
+msgstr " Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ ÑƒÐ¿ÑƒÑ‚Ðµ Ð°Ð´Ñ€ÐµÑ�Ðµ ÐºÐ¾Ð´Ð°:\n"
+
+#: vms-alpha.c:7745
+#, c-format
+msgid " Linkage Pairs Reference Fixups:\n"
+msgstr " Ð˜Ñ�Ð¿Ñ€Ð°Ð²ÐºÐµ ÑƒÐ¿ÑƒÑ‚Ðµ Ð¿Ð°Ñ€Ð¾Ð²Ð° Ð¿Ð¾Ð²ÐµÐ·Ð¸Ð²Ð°ÑšÐ°:\n"
+
+#: vms-alpha.c:7754
+#, c-format
+msgid " Change Protection (%u entries):\n"
+msgstr " ÐŸÑ€Ð¾Ð¼ÐµÐ½Ð° Ð·Ð°ÑˆÑ‚Ð¸Ñ‚Ðµ (%u ÑƒÐ½Ð¾Ñ�Ð°):\n"
+
+#: vms-alpha.c:7759
+#, c-format
+msgid "  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "
+msgstr "  Ð¾Ñ�Ð½Ð¾Ð²Ð°: 0x%08x %08x, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: 0x%08x, Ð·Ð°ÑˆÑ‚Ð¸Ñ‚Ð°: 0x%08x "
+
+#. FIXME: we do not yet support relocatable link.  It is not obvious
+#. how to do it for debug infos.
+#: vms-alpha.c:8599
+msgid "%P: relocatable link is not supported\n"
+msgstr "%P: Ð¿Ñ€ÐµÐ¼ÐµÑ�Ñ‚Ð¸Ð²Ð° Ð²ÐµÐ·Ð° Ð½Ð¸Ñ˜Ðµ Ð¿Ð¾Ð´Ñ€Ð¶Ð°Ð½Ð°\n"
+
+#: vms-alpha.c:8669
+msgid "%P: multiple entry points: in modules %B and %B\n"
+msgstr "%P: Ñ‚Ð°Ñ‡ÐºÐµ Ð²Ð¸ÑˆÐµ ÑƒÐ½Ð¾Ñ�Ð°: Ñƒ Ð¼Ð¾Ð´ÑƒÐ»Ð¸Ð¼Ð° â€ž%Bâ€œ Ð¸ â€ž%Bâ€œ\n"
+
+#: vms-lib.c:1444
+#, c-format
+msgid "could not open shared image '%s' from '%s'"
+msgstr "Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¾Ñ‚Ð²Ð¾Ñ€Ð¸Ð¼ Ð´ÐµÑ™ÐµÐ½Ñƒ Ñ�Ð»Ð¸ÐºÑƒ â€ž%sâ€œ Ð¸Ð· â€ž%sâ€œ"
+
+#: vms-misc.c:360
+msgid "_bfd_vms_output_counted called with zero bytes"
+msgstr "â€ž_bfd_vms_output_countedâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñ�Ð° Ð½ÑƒÐ»Ð° Ð±Ð°Ñ˜Ñ‚Ð¾Ð²Ð°"
+
+#: vms-misc.c:365
+msgid "_bfd_vms_output_counted called with too many bytes"
+msgstr "â€ž_bfd_vms_output_countedâ€œ Ñ˜Ðµ Ð¿Ð¾Ð·Ð²Ð°Ð½Ð¾ Ñ�Ð° Ð¿Ñ€ÐµÐ²Ð¸ÑˆÐµ Ð±Ð°Ñ˜Ñ‚Ð¾Ð²Ð°"
+
+#: xcofflink.c:824
+#, c-format
+msgid "%s: XCOFF shared object when not producing XCOFF output"
+msgstr "%s: â€žXCOFFâ€œ Ð´ÐµÑ™ÐµÐ½Ð¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ ÐºÐ°Ð´Ð° Ñ�Ðµ Ð½Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ â€žXCOFFâ€œ Ð¸Ð·Ð»Ð°Ð·"
+
+#: xcofflink.c:845
+#, c-format
+msgid "%s: dynamic object with no .loader section"
+msgstr "%s: Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐºÐ¸ Ð¾Ð±Ñ˜ÐµÐºÐ°Ñ‚ Ð±ÐµÐ· â€ž.loaderâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°"
+
+#: xcofflink.c:1404
+msgid "%B: `%s' has line numbers but no enclosing section"
+msgstr "%B: â€ž%sâ€œ Ð¸Ð¼Ð° Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ðµ Ñ€ÐµÐ´Ð¾Ð²Ð° Ð°Ð»Ð¸ Ð½Ðµ Ð¸ Ð·Ð°Ñ‚Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›Ð¸ Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: xcofflink.c:1456
+msgid "%B: class %d symbol `%s' has no aux entries"
+msgstr "%B: ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ Ð½ÐµÐ¼Ð° Ð¿Ð¾Ð¼Ð¾Ñ›Ð½Ð¸Ñ… ÑƒÐ½Ð¾Ñ�Ð°"
+
+#: xcofflink.c:1478
+msgid "%B: symbol `%s' has unrecognized csect type %d"
+msgstr "%B: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ð¸Ð¼Ð° Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ñƒ Ð²Ñ€Ñ�Ñ‚Ñƒ Ñ†Ñ�ÐµÐºÑ‚Ð¾Ñ€Ð° â€ž%dâ€œ"
+
+#: xcofflink.c:1490
+msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
+msgstr "%B: Ð»Ð¾Ñˆ â€žXTY_ERâ€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ: ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ñ†Ð±Ñ€Ð¾Ñ˜ %d Ñ�Ñ†Ð½Ð´ÑƒÐ¶Ð¸Ð½Ðµ %d"
+
+#: xcofflink.c:1519
+msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
+msgstr "%B: â€žXMC_TC0â€œ Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž%sâ€œ Ñ˜Ðµ ÐºÐ»Ð°Ñ�Ð° %d Ñ�Ñ†Ð½Ð´ÑƒÐ¶Ð¸Ð½Ðµ %d"
+
+#: xcofflink.c:1665
+msgid "%B: csect `%s' not in enclosing section"
+msgstr "%B: Ñ†-Ð¾Ð´ÐµÑ™Ð°Ðº â€ž%sâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ð·Ð°Ñ‚Ð²Ð°Ñ€Ð°Ñ˜ÑƒÑ›ÐµÐ¼ Ð¾Ð´ÐµÑ™ÐºÑƒ"
+
+#: xcofflink.c:1772
+msgid "%B: misplaced XTY_LD `%s'"
+msgstr "%B: Ð»Ð¾ÑˆÐµ Ð¿Ð¾Ñ�Ñ‚Ð°Ð²Ñ™ÐµÐ½Ð¾ â€žXTY_LDâ€œ â€ž%sâ€œ"
+
+#: xcofflink.c:2091
+msgid "%B: reloc %s:%d not in csect"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ â€ž%s:%dâ€œ Ð½Ð¸Ñ˜Ðµ Ñƒ Ñ†-Ð¾Ð´ÐµÑ™ÐºÑƒ"
+
+#: xcofflink.c:3182
+#, c-format
+msgid "%s: no such symbol"
+msgstr "%s: Ð½ÐµÐ¼Ð° Ñ‚Ð°ÐºÐ²Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð°"
+
+#: xcofflink.c:3287
+#, c-format
+msgid "warning: attempt to export undefined symbol `%s'"
+msgstr "ÑƒÐ¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ: Ð¿Ð¾ÐºÑƒÑˆÐ°Ñ˜ Ð¸Ð·Ð²Ð¾Ð·Ð° Ð½ÐµÐ´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½Ð¾Ð³ Ñ�Ð¸Ð¼Ð±Ð¾Ð»Ð° â€ž%sâ€œ"
+
+#: xcofflink.c:3666
+msgid "error: undefined symbol __rtinit"
+msgstr "Ð³Ñ€ÐµÑˆÐºÐ°: Ñ�Ð¸Ð¼Ð±Ð¾Ð» â€ž__rtinitâ€œ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ�Ð°Ð½"
+
+#: xcofflink.c:4045
+msgid "%B: loader reloc in unrecognized section `%s'"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ñƒ Ð½ÐµÐ¿Ð¾Ð·Ð½Ð°Ñ‚Ð¾Ð¼ Ð¾Ð´ÐµÑ™ÐºÑƒ â€ž%sâ€œ"
+
+#: xcofflink.c:4056
+msgid "%B: `%s' in loader reloc but not loader sym"
+msgstr "%B: â€ž%sâ€œ Ñ˜Ðµ Ñƒ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÑƒ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ð°Ð»Ð¸ Ð½Ð¸Ñ˜Ðµ Ñ�Ð¸Ð¼Ð±Ð¾Ð» ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: xcofflink.c:4072
+msgid "%B: loader reloc in read-only section %A"
+msgstr "%B: Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ ÑƒÑ‚Ð¾Ð²Ð°Ñ€Ð¸Ð²Ð°Ñ‡Ð° Ñƒ Ð¾Ð´ÐµÑ™ÐºÑƒ Ñ�Ð°Ð¼Ð¾ Ð·Ð° Ñ‡Ð¸Ñ‚Ð°ÑšÐµ â€ž%Aâ€œ"
+
+#: xcofflink.c:5094
+#, c-format
+msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
+msgstr "ÐŸÑ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ñ‚Ð°Ð±ÐµÐ»Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð°: 0x%lx > 0x10000; Ð¿Ñ€Ð¾Ð±Ð°Ñ˜Ñ‚Ðµ Ñ�Ð° â€ž-mminimal-tocâ€œ Ð¿Ñ€Ð¸Ð»Ð¸ÐºÐ¾Ð¼ Ð¿Ñ€ÐµÐ²Ð¾Ñ’ÐµÑšÐ°"
+
+#: peigen.c:1009 pepigen.c:1009 pex64igen.c:1009
+#, c-format
+msgid "%s: line number overflow: 0x%lx > 0xffff"
+msgstr "%s: Ð¿Ñ€ÐµÐºÐ¾Ñ€Ð°Ñ‡ÐµÑšÐµ Ð±Ñ€Ð¾Ñ˜Ð° Ñ€ÐµÐ´Ð¾Ð²Ð°: 0x%lx > 0xffff"
+
+#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
+msgid "Export Directory [.edata (or where ever we found it)]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·Ð²Ð¾Ð·Ð° [â€ž.edataâ€œ (Ð¸Ð»Ð¸ Ñ‚Ð°Ð¼Ð¾ Ð³Ð´Ðµ Ñ�Ð¼Ð¾ Ð³Ð° Ð½Ð°ÑˆÐ»Ð¸)]"
+
+#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
+msgid "Import Directory [parts of .idata]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ ÑƒÐ²Ð¾Ð·Ð° [Ð´ÐµÐ¾ â€ž.idataâ€œ]"
+
+#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
+msgid "Resource Directory [.rsrc]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·Ð²Ð¾Ñ€Ð¸ÑˆÑ‚Ð° [.rsrc]"
+
+#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
+msgid "Exception Directory [.pdata]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¸Ð·ÑƒÐ·ÐµÑ‚Ð°ÐºÐ° [.pdata]"
+
+#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
+msgid "Security Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð±ÐµÐ·Ð±ÐµÐ´Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
+msgid "Base Relocation Directory [.reloc]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ° Ð¾Ñ�Ð½Ð¾Ð²Ðµ [.reloc]"
+
+#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
+msgid "Debug Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ñ€Ð¾Ñ‡Ð¸ÑˆÑ›Ð°Ð²Ð°ÑšÐ°"
+
+#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
+msgid "Description Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¾Ð¿Ð¸Ñ�Ð°"
+
+#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
+msgid "Special Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ð¾Ñ�ÐµÐ±Ð½Ð¾Ñ�Ñ‚Ð¸"
+
+#: peigen.c:1045 pepigen.c:1045 pex64igen.c:1045
+msgid "Thread Storage Directory [.tls]"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ñ�Ð¼ÐµÑˆÑ‚Ð°Ñ˜Ð° Ð½Ð¸Ñ‚Ð¸ [.tls]"
+
+#: peigen.c:1046 pepigen.c:1046 pex64igen.c:1046
+msgid "Load Configuration Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¿Ð¾Ð´ÐµÑˆÐ°Ð²Ð°ÑšÐ° ÑƒÑ‡Ð¸Ñ‚Ð°Ð²Ð°ÑšÐ°"
+
+#: peigen.c:1047 pepigen.c:1047 pex64igen.c:1047
+msgid "Bound Import Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ ÑƒÐ²Ð¾Ð·Ð° Ñ�Ð²ÐµÐ·Ð°"
+
+#: peigen.c:1048 pepigen.c:1048 pex64igen.c:1048
+msgid "Import Address Table Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ñ‚Ð°Ð±ÐµÐ»Ðµ ÑƒÐ²Ð¾Ð·Ð° Ð°Ð´Ñ€ÐµÑ�Ðµ"
+
+#: peigen.c:1049 pepigen.c:1049 pex64igen.c:1049
+msgid "Delay Import Directory"
+msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð·Ð°Ñ�Ñ‚Ð¾Ñ˜Ð° ÑƒÐ²Ð¾Ð·Ð°"
+
+#: peigen.c:1050 pepigen.c:1050 pex64igen.c:1050
+msgid "CLR Runtime Header"
+msgstr "Ð—Ð°Ð³Ð»Ð°Ð²Ñ™Ðµ Ð¦Ð›Ð  Ð¸Ð·Ð²Ñ€ÑˆÐ°Ð²Ð°ÑšÐ°"
+
+#: peigen.c:1051 pepigen.c:1051 pex64igen.c:1051
+msgid "Reserved"
+msgstr "Ð ÐµÐ·ÐµÑ€Ð²Ð¸Ñ�Ð°Ð½Ð¾"
+
+#: peigen.c:1111 pepigen.c:1111 pex64igen.c:1111
+#, c-format
+msgid ""
+"\n"
+"There is an import table, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° ÑƒÐ²Ð¾Ð·Ð°, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸\n"
+
+#: peigen.c:1116 pepigen.c:1116 pex64igen.c:1116
+#, c-format
+msgid ""
+"\n"
+"There is an import table in %s at 0x%lx\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° ÑƒÐ²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx\n"
+
+#: peigen.c:1158 pepigen.c:1158 pex64igen.c:1158
+#, c-format
+msgid ""
+"\n"
+"Function descriptor located at the start address: %04lx\n"
+msgstr ""
+"\n"
+"ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ñ˜Ðµ Ð¾Ñ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ð½Ð° Ð¿Ð¾Ñ‡ÐµÑ‚Ð½Ð¾Ñ˜ Ð°Ð´Ñ€ÐµÑ�Ð¸: %04lx\n"
+
+#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161
+#, c-format
+msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
+msgstr "\tÑ‚Ð°Ð±ÐµÐ»Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜Ð° %08lx ÐºÐ¾Ð´Ð½Ðµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ (ÑƒÑ‡Ð¸Ñ‚Ñ™Ð¸Ð²Ð°/Ð°ÐºÑ‚ÑƒÐµÐ»Ð½Ð°) %08lx/%08lx\n"
+
+#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169
+#, c-format
+msgid ""
+"\n"
+"No reldata section! Function descriptor not decoded.\n"
+msgstr ""
+"\n"
+"Ð�ÐµÐ¼Ð° Ð¾Ð´ÐµÑ™ÐºÐ° Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ð¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐ°! ÐžÐ¿Ð¸Ñ�Ð½Ð¸Ðº Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ðµ Ð½Ð¸Ñ˜Ðµ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð°Ð½.\n"
+
+#: peigen.c:1174 pepigen.c:1174 pex64igen.c:1174
+#, c-format
+msgid ""
+"\n"
+"The Import Tables (interpreted %s section contents)\n"
+msgstr ""
+"\n"
+"Ð¢Ð°Ð±ÐµÐ»Ðµ ÑƒÐ²Ð¾Ð·Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ)\n"
+
+#: peigen.c:1177 pepigen.c:1177 pex64igen.c:1177
+#, c-format
+msgid ""
+" vma:            Hint    Time      Forward  DLL       First\n"
+"                 Table   Stamp     Chain    Name      Thunk\n"
+msgstr ""
+" vma:            Ð�Ð°Ñ˜Ð°Ð²Ð°    Ð’Ñ€ÐµÐ¼Ðµ     Ð�Ð°Ð¿Ñ€ÐµÐ´    Ð”Ð›Ð›       ÐŸÑ€Ð²Ð¸\n"
+"                 Ð¢Ð°Ð±ÐµÐ»Ð°   ÐžÑ‚Ð¸Ñ�Ð°Ðº  Ð›Ð°Ð½Ð°Ñ†   Ð�Ð°Ð·Ð¸Ð²       ÐŸÐ¾Ñ‚Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼\n"
+
+#: peigen.c:1225 pepigen.c:1225 pex64igen.c:1225
+#, c-format
+msgid ""
+"\n"
+"\tDLL Name: %s\n"
+msgstr ""
+"\n"
+"\tÐ”Ð›Ð› Ð½Ð°Ð·Ð¸Ð²: %s\n"
+
+#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
+#, c-format
+msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma:  Ð�Ð°Ñ˜Ð°Ð²Ð°/Ð ÐµÐ´Ð½Ð¸ Ð�Ð°Ð·Ð¸Ð² Ñ‡Ð»Ð°Ð½Ð° Ð¡Ð²ÐµÐ·Ð°Ð½-Ð·Ð°\n"
+
+#: peigen.c:1261 pepigen.c:1261 pex64igen.c:1261
+#, c-format
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ð¿Ñ€Ð²Ð¸ Ð¿Ð¾Ñ‚Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ð³Ð° Ñ�Ð°Ð´Ñ€Ð¶Ð¸\n"
+
+#: peigen.c:1423 pepigen.c:1423 pex64igen.c:1423
+#, c-format
+msgid ""
+"\n"
+"There is an export table, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð°, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð½Ð°Ñ’ÐµÐ¼ Ð¾Ð´ÐµÑ™Ð°Ðº ÐºÐ¾Ñ˜Ð¸ Ñ˜Ðµ Ñ�Ð°Ð´Ñ€Ð¶Ð¸\n"
+
+#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s, but it does not fit into that section\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ, Ð°Ð»Ð¸ Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ñ�Ñ‚Ð°Ð½Ðµ Ñƒ Ñ‚Ð°Ñ˜ Ð¾Ð´ÐµÑ™Ð°Ðº\n"
+
+#: peigen.c:1438 pepigen.c:1438 pex64igen.c:1438
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s at 0x%lx\n"
+msgstr ""
+"\n"
+"ÐŸÐ¾Ñ�Ñ‚Ð¾Ñ˜Ð¸ Ñ‚Ð°Ð±ÐµÐ»Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° Ñƒ â€ž%sâ€œ Ð½Ð° 0x%lx\n"
+
+#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
+#, c-format
+msgid ""
+"\n"
+"The Export Tables (interpreted %s section contents)\n"
+"\n"
+msgstr ""
+"\n"
+"Ð¢Ð°Ð±ÐµÐ»Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ Ð¾Ð´ÐµÑ™ÐºÐ° â€ž%sâ€œ)\n"
+"\n"
+
+#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
+#, c-format
+msgid "Export Flags \t\t\t%lx\n"
+msgstr "Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° \t\t%lx\n"
+
+#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473
+#, c-format
+msgid "Time/Date stamp \t\t%lx\n"
+msgstr "ÐžÑ‚Ð¸Ñ�Ð°Ðº Ð²Ñ€ÐµÐ¼ÐµÐ½Ð°/Ð´Ð°Ñ‚ÑƒÐ¼Ð° \t\t%lx\n"
+
+#: peigen.c:1476 pepigen.c:1476 pex64igen.c:1476
+#, c-format
+msgid "Major/Minor \t\t\t%d/%d\n"
+msgstr "Ð’ÐµÑ›Ð¸/ÐœÐ°ÑšÐ¸ \t\t\t%d/%d\n"
+
+#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479
+#, c-format
+msgid "Name \t\t\t\t"
+msgstr "Ð�Ð°Ð·Ð¸Ð² \t\t\t\t"
+
+#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485
+#, c-format
+msgid "Ordinal Base \t\t\t%ld\n"
+msgstr "Ñ�ÐžÑ�Ð½Ð¾Ð²Ð° Ñ€ÐµÐ´Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°\t\t%ld\n"
+
+#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
+#, c-format
+msgid "Number in:\n"
+msgstr "Ð‘Ñ€Ð¾Ñ˜ ÑƒÐ»Ð°Ð·Ð°:\n"
+
+#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
+#, c-format
+msgid "\tExport Address Table \t\t%08lx\n"
+msgstr "\tÐ¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° \t\t%08lx\n"
+
+#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495
+#, c-format
+msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
+msgstr "\tÐ¢Ð°Ð±ÐµÐ»Ð° [Ð�Ð°Ð·Ð¸Ð² Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°/Ñ€ÐµÐ´Ð½Ð¾Ð³ Ð±Ñ€Ð¾Ñ˜Ð°]\t%08lx\n"
+
+#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
+#, c-format
+msgid "Table Addresses\n"
+msgstr "Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð°\n"
+
+#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501
+#, c-format
+msgid "\tExport Address Table \t\t"
+msgstr "\tÐ¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ð° Ð¸Ð·Ð²Ð¾Ð·Ð° \t\t"
+
+#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506
+#, c-format
+msgid "\tName Pointer Table \t\t"
+msgstr "\tÐ¢Ð°Ð±ÐµÐ»Ð° Ð½Ð°Ð·Ð¸Ð²Ð° Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð° \t\t"
+
+#: peigen.c:1511 pepigen.c:1511 pex64igen.c:1511
+#, c-format
+msgid "\tOrdinal Table \t\t\t"
+msgstr "\tÐ¢Ð°Ð±ÐµÐ»Ð° Ñ€ÐµÐ´Ð½Ð¸Ñ… Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð° \t\t\t"
+
+#: peigen.c:1525 pepigen.c:1525 pex64igen.c:1525
+#, c-format
+msgid ""
+"\n"
+"Export Address Table -- Ordinal Base %ld\n"
+msgstr ""
+"\n"
+"Ð¢Ð°Ð±ÐµÐ»Ð° Ð°Ð´Ñ€ÐµÑ�Ðµ Ð¸Ð·Ð²Ð¾Ð·Ð° â€”â€” ÐžÑ�Ð½Ð¾Ð²Ð° Ñ€ÐµÐ´Ð½Ð¸Ñ… Ð±Ñ€Ð¾Ñ˜ÐµÐ²Ð° %ld\n"
+
+#: peigen.c:1544 pepigen.c:1544 pex64igen.c:1544
+msgid "Forwarder RVA"
+msgstr "RVA Ð¿Ñ€ÐµÐ¾Ñ�Ð»ÐµÑ’Ð¸Ð²Ð°Ñ‡Ð°"
+
+#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
+msgid "Export RVA"
+msgstr "RVA Ð¸Ð·Ð²Ð¾Ð·Ð°"
+
+#: peigen.c:1562 pepigen.c:1562 pex64igen.c:1562
+#, c-format
+msgid ""
+"\n"
+"[Ordinal/Name Pointer] Table\n"
+msgstr ""
+"\n"
+"Ð¢Ð°Ð±ÐµÐ»Ð° [Ð ÐµÐ´Ð½Ð¸/Ð�Ð°Ð·Ð¸Ð² Ð¿Ð¾ÐºÐ°Ð·Ð¸Ð²Ð°Ñ‡Ð°]\n"
+
+#: peigen.c:1622 peigen.c:1805 pepigen.c:1622 pepigen.c:1805 pex64igen.c:1622
+#: pex64igen.c:1805
+#, c-format
+msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
+msgstr "Ð£Ð¿Ð¾Ð·Ð¾Ñ€ÐµÑšÐµ, Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´ÐµÑ™ÐºÐ° â€ž.pdataâ€œ (%ld) Ð½Ð¸Ñ˜Ðµ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´ Ð¾Ð´ %d\n"
+
+#: peigen.c:1629 pepigen.c:1629 pex64igen.c:1629
+#, c-format
+msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
+msgstr " vma:\t\t\tÐ�Ð´Ñ€ÐµÑ�Ð° Ð¿Ð¾Ñ‡ÐµÑ‚ÐºÐ°\t Ð�Ð´Ñ€ÐµÑ�Ð° ÐºÑ€Ð°Ñ˜Ð°\t\tÐ˜Ð·Ð»Ð¾Ð¶ÐµÐ½Ð¸ Ð¿Ð¾Ð´Ð°Ñ†Ð¸\n"
+
+#: peigen.c:1631 pepigen.c:1631 pex64igen.c:1631
+#, c-format
+msgid ""
+" vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
+"     \t\tAddress  Address  Handler  Data     Address    Mask\n"
+msgstr ""
+" vma:\t\tÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº    ÐšÑ€Ð°Ñ˜      EH       EH       ÐšÑ€Ð°Ñ˜ Ð¿Ñ€Ð¾Ð»Ð¾Ð³Ð°  Ð˜Ð·ÑƒÐ·ÐµÑ‚Ð°Ðº\n"
+"     \t\tÐ�Ð´Ñ€ÐµÑ�Ð°  Ð�Ð´Ñ€ÐµÑ�Ð°  Ð ÑƒÐºÐ¾Ð²Ð°Ð»Ð°Ñ†  ÐŸÐ¾Ð´Ð°Ñ†Ð¸     Ð�Ð´Ñ€ÐµÑ�Ð°    ÐœÐ°Ñ�ÐºÐ°\n"
+
+#: peigen.c:1705 pepigen.c:1705 pex64igen.c:1705
+#, c-format
+msgid " Register save millicode"
+msgstr " Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ñ‡ÑƒÐ²Ð° Ð¼Ð¸Ð»Ð¸ÐºÐ¾Ð´"
+
+#: peigen.c:1708 pepigen.c:1708 pex64igen.c:1708
+#, c-format
+msgid " Register restore millicode"
+msgstr " Ð ÐµÐ³Ð¸Ñ�Ñ‚Ð°Ñ€ Ð²Ñ€Ð°Ñ›Ð° Ð¼Ð¸Ð»Ð¸ÐºÐ¾Ð´"
+
+#: peigen.c:1711 pepigen.c:1711 pex64igen.c:1711
+#, c-format
+msgid " Glue code sequence"
+msgstr " Ð�Ð¸Ð· ÐºÐ¾Ð´Ð° Ð»ÐµÐ¿ÐºÐ°"
+
+#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
+#, c-format
+msgid ""
+" vma:\t\tBegin    Prolog   Function Flags    Exception EH\n"
+"     \t\tAddress  Length   Length   32b exc  Handler   Data\n"
+msgstr ""
+" vma:\t\tÐŸÐ¾Ñ‡ÐµÑ‚Ð°Ðº    ÐŸÑ€Ð¾Ð»Ð¾Ð³   Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ˜Ð° Ð—Ð°Ñ�Ñ‚Ð°Ð²Ð¸Ñ†Ðµ    Ð˜Ð·ÑƒÐ·ÐµÑ‚Ð°Ðº Ð•Ð¥\n"
+"     \t\tÐ�Ð´Ñ€ÐµÑ�Ð°  Ð”ÑƒÐ¶Ð¸Ð½Ð°   Ð”ÑƒÐ¶Ð¸Ð½Ð°   32b Ð¸Ð·Ð²Ñ€  Ð ÑƒÐºÐ¾Ð²Ð»Ð°Ñ†   ÐŸÐ¾Ð´Ð°Ñ†Ð¸\n"
+
+#: peigen.c:1937 pepigen.c:1937 pex64igen.c:1937
+#, c-format
+msgid ""
+"\n"
+"\n"
+"PE File Base Relocations (interpreted .reloc section contents)\n"
+msgstr ""
+"\n"
+"\n"
+"ÐŸÑ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ Ð¾Ñ�Ð½Ð¾Ð²Ðµ ÐŸÐ• Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐµ (Ð¿Ñ€Ð¾Ñ‚ÑƒÐ¼Ð°Ñ‡ÐµÐ½Ð¸ Ñ�Ð°Ð´Ñ€Ð¶Ð°Ñ˜ â€ž.relocâ€œ Ð¾Ð´ÐµÑ™ÐºÐ°)\n"
+
+#: peigen.c:1966 pepigen.c:1966 pex64igen.c:1966
+#, c-format
+msgid ""
+"\n"
+"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
+msgstr ""
+"\n"
+"Ð’Ð¸Ñ€Ñ‚ÑƒÐµÐ»Ð½Ð° Ð°Ð´Ñ€ÐµÑ�Ð°: %08lx Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° Ð¾Ð´Ð»Ð¾Ð¼ÐºÐ° %ld (0x%lx) Ð‘Ñ€Ð¾Ñ˜ Ð¸Ñ�Ð¿Ñ€Ð°Ð²ÐºÐ¸ %ld\n"
+
+#: peigen.c:1979 pepigen.c:1979 pex64igen.c:1979
+#, c-format
+msgid "\treloc %4d offset %4x [%4lx] %s"
+msgstr "\tÐ¿Ñ€ÐµÐ¼ÐµÑˆÑ‚Ð°ÑšÐµ %4d Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ %4x [%4lx] %s"
+
+#: peigen.c:2023 pepigen.c:2023 pex64igen.c:2023
+#, c-format
+msgid "%*.s Entry: "
+msgstr "%*.s ÑƒÐ½Ð¾Ñ�: "
+
+#: peigen.c:2043 pepigen.c:2043 pex64igen.c:2043
+#, c-format
+msgid "name: [val: %08lx len %d]: "
+msgstr "Ð½Ð°Ð·Ð¸Ð²: [Ð²Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: %08lx Ð´ÑƒÐ¶Ð¸Ð½Ð° %d]: "
+
+#: peigen.c:2054 pepigen.c:2054 pex64igen.c:2054
+#, c-format
+msgid "<corrupt string length: %#x>"
+msgstr "<Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð° Ð´ÑƒÐ¶Ð¸Ð½Ð° Ð½Ð¸Ñ�ÐºÐµ: %#x>"
+
+#: peigen.c:2057 pepigen.c:2057 pex64igen.c:2057
+#, c-format
+msgid "<corrupt string offset: %#lx>"
+msgstr "<Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½ Ð¿Ð¾Ð¼ÐµÑ€Ð°Ñ˜ Ð½Ð¸Ñ�ÐºÐµ: %#lx>"
+
+#: peigen.c:2060 pepigen.c:2060 pex64igen.c:2060
+#, c-format
+msgid "ID: %#08lx"
+msgstr "Ð˜Ð”: %#08lx"
+
+#: peigen.c:2063 pepigen.c:2063 pex64igen.c:2063
+#, c-format
+msgid ", Value: %#08lx\n"
+msgstr ", Ð’Ñ€ÐµÐ´Ð½Ð¾Ñ�Ñ‚: %#08lx\n"
+
+#: peigen.c:2074 pepigen.c:2074 pex64igen.c:2074
+#, c-format
+msgid "%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgstr "%*.s  Ð›Ð¸Ñ�Ñ‚: Ð�Ð´Ñ€ÐµÑ�Ð°: %#08lx, Ð’ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð°: %#08lx, ÐšÐ¾Ð´Ð½Ð° Ñ�Ñ‚Ñ€Ð°Ð½Ð¸Ñ†Ð°: %d\n"
+
+#: peigen.c:2116 pepigen.c:2116 pex64igen.c:2116
+#, c-format
+msgid " Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"
+msgstr " Ð¢Ð°Ð±ÐµÐ»Ð°: Ð—Ð½Ð°Ðº: %d, Ð’Ñ€ÐµÐ¼Ðµ: %08lx, Ð˜Ð·Ð´: %d/%d, Ð‘Ñ€Ð¾Ñ˜ Ð½Ð°Ð·Ð¸Ð²Ð°: %d, Ð˜Ð”-Ð¾Ð²Ð¸: %d\n"
+
+#: peigen.c:2204 pepigen.c:2204 pex64igen.c:2204
+#, c-format
+msgid "Corrupt .rsrc section detected!\n"
+msgstr "ÐžÑ‚ÐºÑ€Ð¸Ð²ÐµÐ½ Ñ˜Ðµ Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¸ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº!\n"
+
+#: peigen.c:2220 pepigen.c:2220 pex64igen.c:2220
+#, c-format
+msgid ""
+"\n"
+"WARNING: Extra data in .rsrc section - it will be ignored by Windows:\n"
+msgstr ""
+"\n"
+"Ð£ÐŸÐžÐ—ÐžÐ Ð•ÐŠÐ•: Ð’Ð¸ÑˆÐ°Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ° Ñƒ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™ÐºÑƒ â€“ Ð’Ð¸Ð½Ð´Ð¾ÑƒÐ· Ñ›Ðµ Ð¸Ñ… Ð·Ð°Ð½ÐµÐ¼Ð°Ñ€Ð¸Ñ‚Ð¸:\n"
+
+#. The MS dumpbin program reportedly ands with 0xff0f before
+#. printing the characteristics field.  Not sure why.  No reason to
+#. emulate it here.
+#: peigen.c:2243 pepigen.c:2243 pex64igen.c:2243
+#, c-format
+msgid ""
+"\n"
+"Characteristics 0x%x\n"
+msgstr ""
+"\n"
+"ÐžÑ�Ð¾Ð±ÐµÐ½Ð¾Ñ�Ñ‚Ð¸ 0x%x\n"
+
+#: peigen.c:3194 pepigen.c:3194 pex64igen.c:3194
+#, c-format
+msgid ".rsrc merge failure: duplicate string resource: %d"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¸Ð·Ð²Ð¾Ñ€Ð¸ÑˆÑ‚Ðµ ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ðµ Ð½Ð¸Ñ�ÐºÐµ: %d"
+
+#: peigen.c:3329 pepigen.c:3329 pex64igen.c:3329
+msgid ".rsrc merge failure: multiple non-default manifests"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð½ÐµÐºÐ¾Ð»Ð¸ÐºÐ¾ Ð½Ðµ-Ð¿Ð¾Ð´Ñ€Ð°Ð·ÑƒÐ¼ÐµÐ²Ð°Ð½Ð¸Ñ… Ð¸Ñ�Ð¿Ð¾Ñ™Ð°Ð²Ð°ÑšÐ°"
+
+#: peigen.c:3347 pepigen.c:3347 pex64igen.c:3347
+msgid ".rsrc merge failure: a directory matches a leaf"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼ Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ€Ð° Ð»Ð¸Ñ�Ñ‚Ñƒ"
+
+#: peigen.c:3389 pepigen.c:3389 pex64igen.c:3389
+msgid ".rsrc merge failure: duplicate leaf"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð»Ð¸Ñ�Ñ‚"
+
+#: peigen.c:3391 pepigen.c:3391 pex64igen.c:3391
+#, c-format
+msgid ".rsrc merge failure: duplicate leaf: %s"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: ÑƒÐ´Ð²Ð¾Ñ�Ñ‚Ñ€ÑƒÑ‡ÐµÐ½Ð¸ Ð»Ð¸Ñ�Ñ‚: %s"
+
+#: peigen.c:3457 pepigen.c:3457 pex64igen.c:3457
+msgid ".rsrc merge failure: dirs with differing characteristics\n"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð¸ Ñ�Ð° Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ‚Ð¸Ð¼ Ð¾Ñ�Ð¾Ð±ÐµÐ½Ð¾Ñ�Ñ‚Ð¸Ð¼Ð°\n"
+
+#: peigen.c:3464 pepigen.c:3464 pex64igen.c:3464
+msgid ".rsrc merge failure: differing directory versions\n"
+msgstr "Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¸Ð·Ð´Ð°ÑšÐ° Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° Ñ�Ðµ Ñ€Ð°Ð·Ð»Ð¸ÐºÑƒÑ˜Ñƒ\n"
+
+#. Corrupted .rsrc section - cannot merge.
+#: peigen.c:3537 pepigen.c:3537 pex64igen.c:3537
+#, c-format
+msgid "%s: .rsrc merge failure: corrupt .rsrc section"
+msgstr "%s: Ð�Ð¸Ñ˜Ðµ ÑƒÑ�Ð¿ÐµÐ»Ð¾ â€ž.rsrcâ€œ Ñ�Ñ‚Ð°Ð¿Ð°ÑšÐµ: Ð¾ÑˆÑ‚ÐµÑ›ÐµÐ½Ð¸ â€ž.rsrcâ€œ Ð¾Ð´ÐµÑ™Ð°Ðº"
+
+#: peigen.c:3673 pepigen.c:3673 pex64igen.c:3673
+msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[1] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$2â€œ"
+
+#: peigen.c:3693 pepigen.c:3693 pex64igen.c:3693
+msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[1] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$4â€œ"
+
+#: peigen.c:3714 pepigen.c:3714 pex64igen.c:3714
+msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[12] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$5â€œ"
+
+#: peigen.c:3734 pepigen.c:3734 pex64igen.c:3734
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[PE_IMPORT_ADDRESS_TABLE (12)] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$6â€œ"
+
+#: peigen.c:3776 pepigen.c:3776 pex64igen.c:3776
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[PE_IMPORT_ADDRESS_TABLE(12)] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž.idata$6â€œ"
+
+#: peigen.c:3801 pepigen.c:3801 pex64igen.c:3801
+msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
+msgstr "%B: Ð½Ðµ Ð¼Ð¾Ð³Ñƒ Ð´Ð° Ð¿Ð¾Ð¿ÑƒÐ½Ð¸Ð¼ Ñ€ÐµÑ‡Ð½Ð¸Ðº Ð¿Ð¾Ð´Ð°Ñ‚Ð°ÐºÐ°[9] Ð·Ð°Ñ‚Ð¾ ÑˆÑ‚Ð¾ Ð½ÐµÐ´Ð¾Ñ�Ñ‚Ð°Ñ˜Ðµ â€ž__tls_usedâ€œ"
+
+#~ msgid ""
+#~ "%B(%s): warning: interworking not enabled.\n"
+#~ "  first occurrence: %B: thumb call to arm"
+#~ msgstr ""
+#~ "%B(%s): attention: l'inter-rÃ©seautage n'est pas activÃ©.\n"
+#~ "  premiÃ¨re occurrence: %B: appel de repÃ¨re vers arm"
+
+#~ msgid "DIV usage mismatch between %B and %B"
+#~ msgstr "incohÃ©rence d'utilisation de DIV entre %B et %B"
+
+#~ msgid "%B: bad relocation section name `%s'"
+#~ msgstr "%B: nom de section de rÃ©adressage erronÃ© Â«Â %sÂ Â»"
+
+#~ msgid "%P: dynamic variable `%s' is zero size\n"
+#~ msgstr "%P: la variable dynamique Â«Â %sÂ Â» a une taille nulle\n"
+
+#~ msgid " [64-bit doubles]"
+#~ msgstr " [doubles de 64 bits]"
+
+#~ msgid " [dsp]"
+#~ msgstr " [dsp]"
+
+#~ msgid "%P: %H: automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc\n"
+#~ msgstr "%P: %H: TOC multiples et automatiques non supportÃ©es utilisant votre fichier crt; recompilez avec -mminimal-toc ou mettez Ã  jour gcc\n"
+
+#~ msgid "%P: %H: sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern\n"
+#~ msgstr "%P: %H: l'optimisation sÅ“urs des appels vers Â«Â %sÂ Â» n'autorise pas de TOC multiples et automatiques; recompilez avec -mminimal-toc ou -fno-optimize-sibling-calls, ou rendez Â«Â %sÂ Â» externe\n"
+
+#~ msgid "note: '%s' is defined in DSO %B so try adding it to the linker command line"
+#~ msgstr "note: Â«%sÂ» est dÃ©fini dans le DSO %B donc essayez de l'ajouter Ã  la ligne de commande du lieur"
+
+#~ msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float"
+#~ msgstr "Attention: %B utilise -msingle-float, %B utilise -mdouble-float"
+
+#~ msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64"
+#~ msgstr "Attention: %B utilise -msingle-float, %B utilise -mips32r2 -mfp64"
+
+#~ msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64"
+#~ msgstr "Attention: %B utilise -mdouble-float, %B utilise -mips32r2 -mfp64"
+
+#~ msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" is unsupported 'indirect' reference: setting to undefined"
+#~ msgstr "bfd_mach_o_read_symtab_symbol: symbole Â«Â %sÂ Â» a la rÃ©fÃ©rence non supportÃ©e Â«Â indirectÂ Â»: laissÃ© non dÃ©fini"
+
+#~ msgid "bfd_mach_o_read_dysymtab_symbol: unable to read %lu bytes at %lu"
+#~ msgstr "bfd_mach_o_read_dysymtab_symbol: impossible de lire %lu octets Ã  %lu"
+
+#~ msgid "Mach-O header:\n"
+#~ msgstr "En-tÃªte Mach-O:\n"
+
+#~ msgid " magic     : %08lx\n"
+#~ msgstr " magique    : %08lx\n"
+
+#~ msgid " cputype   : %08lx (%s)\n"
+#~ msgstr " typecpu    : %08lx (%s)\n"
+
+#~ msgid " filetype  : %08lx (%s)\n"
+#~ msgstr " typefichier: %08lx (%s)\n"
+
+#~ msgid " ncmds     : %08lx (%lu)\n"
+#~ msgstr " ncmds     : %08lx (%lu)\n"
+
+#~ msgid " sizeofcmds: %08lx\n"
+#~ msgstr " taillecmds: %08lx\n"
+
+#~ msgid " flags     : %08lx ("
+#~ msgstr " fanions   : %08lx ("
+
+#~ msgid " reserved  : %08x\n"
+#~ msgstr " rÃ©servÃ©   : %08x\n"
+
+#~ msgid "Segments and Sections:\n"
+#~ msgstr "Segments et Sections:\n"
+
+#~ msgid " #: Segment name     Section name     Address\n"
+#~ msgstr " #: Nom segment      Nom section      Adresse\n"
+
+#~ msgid "Symbol %s replaced by %s\n"
+#~ msgstr "Symbole %s remplacÃ© par %s\n"
+
+#~ msgid "%B(%A+0x%lx): cannot reach %s"
+#~ msgstr "%B(%A+0x%lx): ne peut atteindre %s"
+
+#~ msgid "%B: warning: ignoring duplicate section `%A'\n"
+#~ msgstr "%B: attention: ignore la section dupliquÃ©e Â«%AÂ»\n"
+
+#~ msgid "%B: warning: duplicate section `%A' has different size\n"
+#~ msgstr "%B: attention: section dupliquÃ©e Â«%AÂ» avec des tailles diffÃ©rentes\n"
+
+#~ msgid "relocation references a different segment"
+#~ msgstr "la relocalisation fait rÃ©fÃ©rence Ã  un segment diffÃ©rent"
+
+#~ msgid "%B: relocation type %d not implemented"
+#~ msgstr "%B: relocalisation de type %d pas implÃ©mentÃ©e"
+
+#~ msgid "warning: %B and %B differ in position-dependence of data addressing"
+#~ msgstr "attention: %B et %B divergent sur la dÃ©pendance de la position de l'adressage des donnÃ©es"
+
+#~ msgid "warning: %B and %B differ in position-dependence of code addressing"
+#~ msgstr "attention: %B et %B divergent sur la dÃ©pendance de la position de l'adressage du code"
+
+#~ msgid "Can't Make it a Short Jump"
+#~ msgstr "Impossible d'en faire un Saut Court"
+
+#~ msgid "Exceeds Long Jump Range"
+#~ msgstr "PortÃ©e dÃ©passÃ©e pour le Saut Long"
+
+#~ msgid "Absolute address Exceeds 16 bit Range"
+#~ msgstr "L'adresse absolue dÃ©borde sur 16 bits"
+
+#~ msgid "Absolute address Exceeds 8 bit Range"
+#~ msgstr "L'adresse absolue dÃ©borde sur 8 bits"
+
+#~ msgid "Unrecognized Reloc Type"
+#~ msgstr "Type de relocalisation non reconnu"
+
+#~ msgid "corrupt or empty %s section in %B"
+#~ msgstr "section %s vide ou corrompue dans %B"
+
+#~ msgid "%s: invalid DSO for symbol `%s' definition"
+#~ msgstr "%s: DSO incorrect pour la dÃ©finition du symbole Â«%sÂ»"
+
+#~ msgid "%B: %A+0x%lx: jump to stub routine which is not jal"
+#~ msgstr "%B: %A+0x%lx: saut vers la routine dans la partie de l'Ã©bauche (stub) qui n'est pas jal"
+
+#~ msgid "bfd_make_section (%s) failed"
+#~ msgstr "Ã‰chec de bfd_make_section (%s)"
+
+#~ msgid "bfd_set_section_flags (%s, %x) failed"
+#~ msgstr "bfd_set_section_flags (%s, %x) a Ã©chouÃ©"
+
+#~ msgid "Size mismatch section %s=%lx, %s=%lx"
+#~ msgstr "Taille de section ne concorde pas %s=%lx, %s=%lx"
+
+#~ msgid "failed to enter %s"
+#~ msgstr "Ã©chec d'insertion de %s"
+
+#~ msgid "No Mem !"
+#~ msgstr "MÃ©moire Ã©puisÃ©e!"
+
+#~ msgid "reserved STO cmd %d"
+#~ msgstr "commande STO %d rÃ©servÃ©e"
+
+#~ msgid "reserved OPR cmd %d"
+#~ msgstr "commande OPR %d rÃ©servÃ©e"
+
+#~ msgid "reserved CTL cmd %d"
+#~ msgstr "commande CTL %d rÃ©servÃ©e"
+
+#~ msgid "reserved STC cmd %d"
+#~ msgstr "commande STC %d rÃ©servÃ©e"
+
+#~ msgid "stack-from-image not implemented"
+#~ msgstr "pile depuis l'image non implÃ©mentÃ©e"
+
+#~ msgid "stack-entry-mask not fully implemented"
+#~ msgstr "masque de pile d'entrÃ©e pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "PASSMECH not fully implemented"
+#~ msgstr "PASSMECH pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "stack-local-symbol not fully implemented"
+#~ msgstr "symbole local de pile pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "stack-literal not fully implemented"
+#~ msgstr "litÃ©ral de pile pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "stack-local-symbol-entry-point-mask not fully implemented"
+#~ msgstr "masque du symbole local de point d'entrÃ©e de pile pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "%s: not fully implemented"
+#~ msgstr "%s: pas complÃ¨tement implÃ©mentÃ©"
+
+#~ msgid "obj code %d not found"
+#~ msgstr "code objet %d non repÃ©rÃ©"
+
+#~ msgid "Reloc size error in section %s"
+#~ msgstr "Erreur de taille de relocalisation dans la section %s"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sv.gmo ./bfd/po/sv.gmo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sv.gmo	2015-07-06 01:51:18.000000000 +0000
+++ ./bfd/po/sv.gmo	2017-03-06 01:53:32.000000000 +0000
@@ -1,34 +1,79 @@
-Þ•Q¤,% 1¡1º1Ù1ð1$23(2\2%|2¢2A²2&ô2343M3f3v3 •3¶3Ö3í3*49+46e4;œ4Ø46ê4:!55\5J’5)Ý5L6)T6L~6Ë6á6Dø6=7\74n7)£7)Í7÷78)8=8Y8r88“8¬8À8Ñ8â8	ñ8
û8
	9
-9
-"9
--989M9
-V9$a9#†9%ª9
-Ð9Û9î9$:+:I:	c:!m:�:—:¬:	»:Å:Î:	×:á:í:ö:ÿ:	;
-;
;	+;5;
-F;Q;i;ƒ;’;©;Ä;Ó;6ì;{#<xŸ<=&.='U=2}=*°=-Û=+	>55>3k>uŸ>%?A;?}?7•?6Í?*@¨/@<Ø@9A[OA6«A-âA B71B3iB!�B#¿B&ãB)
-C.4C0cC/”CFÄC>D-JD(xD¡D7¿D1÷D0)E/ZE)ŠE/´E;äE< F/]F&�FM´F3GT6G2‹G2¾G|ñG4nH(£H(ÌH[õH+QIH}I/ÆI(öI?J<_J?œJQÜJ3.K'bK<ŠK6ÇKDþKCLaL1�L%³L ÙLEúL4@M;uM?±M7ñM-)N*WN8‚N2»N+îN/O3JO0~O7¯OçO+P$3P+XP„P¢PA»PHýP>FQ+…QI±Q;ûQ7RWR)rR+œR.ÈR.÷R5&S@\S@�SIÞS=(TIfTI°T$úT9U.YU/ˆU'¸U@àU5!VWV*tV)ŸV?ÉV-	W;7W4sW/¨WØW%öW*X'GX>oXB®XñX4
YlBY@¯Y?ðYG0ZFxZJ¿ZH
-[KS[GŸ[Bç[X*\4ƒ\/¸\è\N]4V]0‹]¼](Ó].ü](+^*T^6^2¶^5é^8_WX_Z°_B`5N`=„`,Â`<ï`(,a-Uaƒa �a/¾aîabb.bBb0Tb4…b$ºb=ßbDcbc$c0¤cSÕc<)d3fdHšd1ãd5eVKeN¢eMñe-?f2mf5 f6Öf*
g28g)kg.•g*Äg(ïgJh7ch4›h)Ðh+úh&&iMi&gi+Ži,ºiçi+j1j-Gjuj,”j'ÁjBéj?,k"lk&�k[¶kGlGZlO¢lGòl9:m>tm2³m5æmDnPan=²n2ðn7#o5[o/‘o1ÁooóoFcpKªpHöp2?q3rq=¦q;äqB rAcr:¥r3àr	ss/<sls;|s¸sÈsÜsñs	t"t+;t#gt:‹tÆt.ât4u	Fu"Pusu(Šu³uÃuÚu)ðuvS0v#„v.¨v,×v+w-0wV^w1µwOçwY7xV‘x;èx)$yZNyZ©yEzAJzPŒzGÝzW%{W}{4Õ{9
-|4D|7y|7±|$é|V}e}5‚}¸}
-Í}#Ø}ü}~0~E~R~a~
~/�~+½~8é~""AId®Á$Ó6ø/€L€b€t€…€•€	¥€¯€¸€Á€
-Ø€"ã€%�,�8�X�)m�/—�Ç�.æ�,‚B‚:^‚%™‚%¿‚å‚"þ‚[!ƒ?}ƒ½ƒÜƒåƒ*„&+„R„j„$}„¢„$´„Ù„!ù„…D5…Dz…/¿…ï…?†A†R†r†J‰†7Ô†*‡7‡O‡%e‡‹‡ž‡»‡JØ‡J#ˆJnˆI¹ˆ:‰;>‰:z‰6µ‰iì‰DVŠd›ŠF‹CG‹‹‹@ª‹8ë‹7$Œ\Œ|ŒŽŒ Œ2µŒ.èŒ�d/�”�%±�×�ô�7ŽHŽ!aŽ-ƒŽ+±Ž+ÝŽ		�	�
-� (�1I�&{�¢�&µ�Ü�û��$.�"S�v�,”�BÁ�D‘*I‘Lt‘ Á‘xâ‘[’q’‡’*¦’ Ñ’ò’“&“:“O“e“y“N�“!ß“””0”D”X” l”&�” ´”#Õ”(ù”9"•\•3w•!«•$Í•0ò•#–?–V–h–7–·–Ð–â–!õ–-—0E—=v—/´—6ä—/˜K™b™™“™'«™6Ó™)
-š(4š]šAmš%¯šÕšïš›$›3›!S› u›–›«›&¿›7æ›?œ>^œ�œ2­œ<àœ2�OP�* �OË�)žOEž•ž«žCÃž"Ÿ*Ÿ5;Ÿ,qŸ,žŸËŸÝŸýŸ , D U k † œ ­ ¾ 	Ë 
Õ 
ã 
-ñ 
-ü 
-¡¡&¡/¡+<¡&h¡%�¡µ¡Â¡Ô¡&ð¡¢/¢	B¢(L¢u¢}¢“¢	£¢­¢¶¢	¿¢É¢Õ¢Þ¢ç¢	ð¢ú¢££(£>£M£ c£„£–£¯£Ì£Ù£=ó£~1¤y°¤*¥)<¥.f¥6•¥/Ì¥0ü¥0-¦5^¦1”¦„Æ¦(K§Bt§·§;Î§>
-¨-I¨©w¨9!©6[©b’©8õ©/.ª'^ªB†ª3Éª ýª#«4B«2w«0ª«3Û«D¬OT¬?¤¬9ä¬/­#N­Cr­=¶­,ô­3!®-U®3ƒ®:·®<ò®6/¯.f¯X•¯=î¯W,°3„°<¸°{õ°8q±-ª±-Ø±`²3g²Y›²8õ²1.³P`³M±³=ÿ³E=´6ƒ´(º´?ã´F#µ=jµ¨µ Äµ,åµ¶/¶8G¶/€¶F°¶L÷¶8D·/}·%­·BÓ·5¸4L¸*�¸;¬¸Bè¸<+¹$h¹9�¹-Ç¹.õ¹$$ºIº?gºD§º@ìº0-»K^»9ª»"ä»¼1"¼0T¼6…¼6¼¼=ó¼?1½Cq½Oµ½C¾QI¾O›¾'ë¾>¿1R¿1„¿-¶¿Jä¿8/ÀhÀ/‚À*²À=ÝÀ6ÁERÁ7˜Á3ÐÁÂ.#Â/RÂ#‚Â<¦ÂDãÂ(Ã=CÃj�ÃBìÃA/ÄLqÄK¾ÄN
-ÅKYÅJ¥ÅDðÅ>5Æ]tÆ:ÒÆ,
Ç!:ÇL\Ç7©Ç-áÇÈ+(È+TÈ(€È,©È3ÖÈ1
-É3<É7pÉZ¨ÉƒÊE‡Ê3ÍÊ:Ë)<Ë;fË6¢Ë1ÙË"Ì+.Ì.ZÌ‰Ì Ì¶ÌÒÌéÌ=øÌ76Í#nÍ;’Í@ÎÍ*Î2:Î6mÎ\¤ÎDÏ4FÏR{Ï3ÎÏ6Ð\9ÐR–ÐSéÐB=ÑA€Ñ5ÂÑ8øÑ.1Ò/`Ò/�Ò(ÀÒ%éÒ*ÓC:Ó5~Ó7´Ó0ìÓ2Ô*PÔ{Ô)—Ô#ÁÔ0åÔÕ,0Õ]Õ2tÕ§Õ/ÇÕ"÷ÕAÖ>\Ö&›Ö*ÂÖ[íÖLI×C–×JÚ×L%Ø:rØB­Ø:ðØ8+ÙFdÙZ«ÙDÚ2KÚ2~Ú2±Ú;äÚ0 ÛvQÛIÈÛJÜG]Ü'¥Ü3ÍÜQÝGSÝN›ÝSêÝC>Þ1‚Þ´Þ(¼Þ8åÞ#ß@Bß#ƒß§ß¼ßÒßìß'ôß:àWàFvà#½à+áà0
á>á"Náqá.Žá½áÐáðá(â/â^Câ,¢â2Ïâ0ã/3ã2cã_–ã2öãS)ä_}ä_Ýä:=å$xåX�åUöåBLæB�æPÒæ@#çRdçR·ç7
-è<Bè7èF·èFþè$EéVjéÁé1Ûé
ê
-#ê8.êgê€êœê²êÄêÔêòê;ë4Bë>wë¶ëÐëLðë=ìNì$]ì3‚ì¶ìÖì
ëìùìíí	&í0í	=íGí
bí#pí<”íÑíÙíõí+	î15î#gî1‹î/½îíî>	ï'Hï)pïšï)·ïtáï?Vð–ð
-´ð¿ð3Õð,	ñ6ñSñ/dñ”ñ*£ñ%Îñ)ôñò>9ò>xò1·òéòGùòAóQólóM…ó3Óó-ô5ôQôcô~ô“ô#±ôLÕôI"õFlõK³õ:ÿõG:ö=‚ö=ÀöbþöHa÷fª÷TøBfø$©øHÎø=ù<Uù$’ù·ùÏùçù9ú-:úhúh…ú"îú+û=û[ûJyûÄû Ûû2üû0/ü0`ü	‘ü	›ü
-¥ü °ü=Ñü0ý@ý3`ý"”ý·ýÔý"íý þ1þ(HþAqþD³þ,øþM%ÿsÿƒ‹ÿ-)K7u ­(Î÷,C[qQŠ)Ü!(C^y(”+½&é(-9>g¦8Ä1ý#/,S€›¶ÒAò4M]%n3”8ÈK;M8‰Á÷6éÇ™4,õ
¯a;ëçÚYªQ>®öe7K�1V°U$•	(½Ó
-ˆ¬Žhøn#SI�%Ú×ÀP±T‹}p‘¦5î+HBøW—S€¡‘!{F×³¢ÅXEµ#¤	‚±Æ)Œ %ÅÂ¶`ˆ.mÁg·w?(Ÿz+¸€
-À!) y|¥•Õ[úƒ½›[GDÿmç‰†YÈÝy6‹ot*tååðæßIºJ­E\ù¼AU³¼u6:ëzÔž†"¡„C¥ìnq­¶XÃ�¯o'«0Bí¹â|2�ï2J@ï5«õ:/V®
þx˜‡h/‚Lðc—?š‡O¿3ôú
²öªã“äjdD°ŽE�Ë=ùJ’š�]C}�\Î*ÏŠŠ<B‰·µ»àóK3_1v.^' ñÃM&ÿRk4ãýÑ£bÏè´9ûêìp§ÕAò!ÒL8Ô¾c˜¾TòF…Pá÷ÆÍô &ä2~vkZ1“i{Ùx$AÊL=)²M©W7íOÇÞHÖž´fé¦~–œI?0q’e›âÜ�b-9lêÌZ"7Ê”Œ$ÌG^ÄœÉý¤iÓÑàl]î¨:ó8™/9Q5sÜD`*@ËÐñÐG-©C-ÛP0NÎüRdrØ<>ujƒÒæ3ÈèOg¸¨,Þ('@�Ä
-K+%&a£	H=;N…ßÖ§8NºŸ„û¿<Û» ”,ÉM¬"r¹sþ�¢_áØF#Ý4ü;–QÍ.w>fÙÂ	Export Address Table 			Export Address Table 		%08lx
+Þ•wÔ+KŒW¸t¹tÆtßtþtu$(u3Mu�uŽu%®uÔuAäu&&vMvfvv˜v¨v Çvèvw!w8wKw*cw9Žw6Èw;ÿw;xFMx6”x:Ëx5yJ<y)‡yG±yLùy)FzLpz½zÓzDêzG/{w{–{¨{¼{Ô{3ó{'|0>|o||�|+©|+Õ|+}#-}Q}i}r}~}œ}³}Ê}ê}~ ~;~[~t~�~¥~½~,Ñ~þ~'?Ve{•1¬Þïü€.€#F€+j€&–€5½€ó€�%�;�U�n�…�$›�À�Ù�ù�‚$&‚K‚_‚t‚<�‚Ê‚Ù‚
è‚ö‚
+ƒ "ƒCƒ^ƒnƒŽƒªƒÊƒãƒüƒ„*„F„X„&j„‘„0¥„Ö„"ê„	
……#*…N…g…x…‘…"ª…Í…"á…#†#(†L†#a†#…†©†¶†¼†Ä†É†
+æ†ñ†ö†!ü† ‡?‡D‡I‡i‡‰‡Ž‡¢‡!§‡É‡Ð‡Ö‡Û‡à‡æ‡ê‡ï‡ˆ$ˆ)ˆIˆ]ˆB}ˆÀˆàˆåˆêˆñˆ÷ˆüˆ‰‰‰%‰>‰R‰c‰t‰…‰–‰§‰¿‰	Î‰
Ø‰
æ‰
+ô‰
+ÿ‰
+
+Š
+Š Š
+5Š$@Š
+eŠ#pŠ%”Š
+ºŠÅŠ×ŠêŠ$‹'‹E‹!_‹�‹–‹
+¥‹
°‹	¾‹È‹
+Ù‹ä‹ë‹ŒŒ/Œ>ŒUŒpŒŒ˜Œ§Œ®Œ(¾Œ/çŒ�)�+8�d�A€�Â�Ü�ö�Ž8%Ž^ŽvŽ‹Ž&¥ŽÌŽëŽ2�?9�&y� �(¿�"è��*+�6V�{��r	‘x|‘õ‘5’A’DN’*“’7¾’$ö’'“*C“!n“=�“AÎ“E”V”%u”D›”à”.þ”,-•*Z•%…•4«•à•>ÿ•Q>–G�–8Ø–	—J—5f—8œ—(Õ—,þ—P+˜E|˜FÂ˜F	™OP™H ™3é™<š%ZšA€šnÂšK1›7}›*µ›8à›.œ<Hœ9…œ@¿œH�BI�JŒ�B×�TžTožTÄž‰Ÿ<£ŸmàŸ[N Pª <û D8¡^}¡DÜ¡€!¢1¢¢JÔ¢I£>i£m¨£6¤aM¤¯¤·¤7Ë¤!¥#%¥8I¥)‚¥.¬¥0Û¥>¦>K¦/Š¦/º¦Fê¦>1§-p§(ž§Ç§7å§1¨0O¨/€¨)°¨/Ú¨;
+©<F©Aƒ©<Å©,ª//ª-_ª&�ª3´ª3èªO«Wl«OÄ«o¬+„¬5°¬#æ¬7
+­EB­>ˆ­2Ç­:ú­U5®2‹®(¾®+ç®¯7-¯<e¯?¢¯Qâ¯34°'h°=�°<Î°"±M.±K|±DÈ±!
²:/²7j²¢².À²ï²1³A³'^³%†³ ¬³EÍ³4´HH´?‘´<Ñ´Gµ>Vµ-•µ<Ãµ7¶18¶8j¶2£¶+Ö¶/·^2·]‘·7ï·'¸+G¸Ls¸+À¸ì¸
+¹#¹C¹+^¹5Š¹@À¹@ºIBºIŒº9Öº$»,5»'b»=Š»QÈ»D¼1_¼5‘¼Ç¼2ä¼.½?F½.†½ µ½AÖ½E¾:^¾$™¾9¾¾5ø¾&.¿&U¿4|¿1±¿$ã¿$À/-À%]À<ƒÀ*ÀÀ'ëÀ3Á&GÁnÁ4ŠÁ¿Á4ÞÁÂ.*Â(YÂ*‚Â6­Â2äÂ5Ã8MÃW†ÃZÞÃB9Ä5|Ä=²Ä<ðÄ(-Å-VÅ0„ÅµÅPÏÅ  Æ@AÆk‚Æ4îÆ;#Ç$_Ç'„Ç¬Ç2ÉÇOüÇKLÈG˜È`àÈAAÉYƒÉSÝÉ<1ÊgnÊaÖÊl8ËF¥Ë-ìË2Ì(MÌ3vÌ1ªÌ-ÜÌD
+ÍBOÍ6’Í*ÉÍ#ôÍ2Î.KÎ*zÎ(¥Î]ÎÎJ,ÏwÏ’Ï4¬ÏDáÏC&ÐCjÐE®Ð^ôÐ]SÑ)±Ñ+ÛÑ$Ò),Ò7VÒ9ŽÒ&ÈÒ&ïÒ2Ó+IÓ=uÓ,³ÓàÓ+þÓ*Ô-@Ô+nÔšÔ¹Ô*ØÔ2Õ"6Õ#YÕ"}Õ- Õ,ÎÕGûÕGCÖG‹Ö(ÓÖ@üÖD=×3‚×2¶×`é×2JØ7}Ø5µØ/ëØ*Ù1FÙ;xÙ&´ÙWÛÙ-3Ú+aÚ-�Ú»Ú)ÙÚ%Û2)Û2\Û=�Û;ÍÛB	ÜALÜ:ŽÜ2ÉÜ?üÜ<Ý›\Ý6øÝ6/ÞAfÞG¨Þ6ðÞ='ß:eß: ßDÛß8 à9YàC“à:×à7á8Já9ƒá,½á6êá!â;=â:yâ.´â/ãâã13ã%eã$‹ã9°ãOêã#:ä,^ä1‹äC½ä6å"8å2[å/Žå(¾å&çå%æ)4æ ^æHæ4Èæ'ýæ1%ç;Wç>“ç%Òç7øç(0è5Yè'�è8·è>ðè /éPé!né �é'±ébÙé)<ê=fêG¤ê%ìê*ë0=ë&në&•ë7¼ë7ôë8,ì0eì9–ì6Ðì/íC7íQ{íÍíííüíî2'î&Zî.�î°îM¿îT
ï2bï|•ï(ð[;ð+—ð/Ãð(óðRñFoñF¶ñ:ýñ68òDoò(´ò7Ýò*ó-@ó0nóAŸóHáó>*ô+iôI•ô;ßôõ;;õ;wõ.³õ.âõ=öIOö.™ö/Èö@øö*9÷)d÷;Ž÷Ê÷>è÷B'øljø@×ø?ùGXùF ùJçùH2úK{úGÇúBûXRû4«û/àûNü0_ü(�ü/¹üéüüüý0"ý=SýD‘ý0Öý5þ)=þ7gþŸþ¹þ'Øþ&ÿ['ÿGƒÿOËÿ9U>u2´5çP=n<¬/éo]‰ç
û	
#%4\Z;·ó;H	ak}•¦,³àô
+/!/Q2�9´#î'2:3m¡;±í/DYk~•²Ï	í"÷+#F,j:—Òä.	4/	?d	=¤		â	"ì	
+&
+/
+3
+F
+X
+j
+'|
+¤
+ Á
+#â
+  2S$q$–'»%ã'	1Oo"�²Â×ì
)
C
#Y
#}
-¡
8Ï
2A;'}.¥YÔ_.;Ž)Ê!ô$;HP%™¿5Ü
+'"2Ug€›°½Ì
êø/
++:8fŸ
+µÀß'ñ+.I-xG¦3î""AId%®Ôçù":L$e*Š+µáþ5FXj€’²ÌÝìþ	
+/":%]ƒ�žµÑçù2Rfx�-®Üî/O)d/Ž¾Ðâé!ð.,An:Š%Å%ëC*=nC¬=ð".[Q?­í))S\vw*î&+Rr„‹(’»'Íõ*J#b$†,«.Ø, .4 c "€ ,£ .Ð !ÿ 1!!0S!2„!,·!.ä!#"7"W"(k"/”"!Ä"æ"(##,#+P#|#,•# Â#ã#ü#$0$P$#o$-“$"Á$ä$ö$%!%:%O%a%2|%$¯%&Ô%û%	&!%&DG&DŒ&/Ñ&'/'?C'ƒ'”'´'Ë'7Þ'(J(‰j(7ô(,)*F)q)‰)¡)·)È)Þ)#û)%*E*X*u*’*J¤*Jï*J:+I…+:Ï+;
+,:F,E�,6Ç,+þ,;*-Ff-Q­-/ÿ-B/.@r.;³.Kï..;/Fj/a±/=0&Q0.x0/§0-×0/1i51DŸ1dä1.I2,x2F¥2fì2CS3—3#¶3@Ú3847T4Œ4˜¬4	E5O5k5}5�5<¤52á5.6C6K6b6z6d’6÷66
+7=A7g7bç7=J8Eˆ81Î8(9$)9N94d9'™9$Á97æ9:/:G:^:o:‡:Ÿ:±:Ã:Õ:ç:;;.;?;W;v;2•;È;-á;+<+;<*g<	’<	œ<
+¦<
+±<¼<Ñ<à<õ<=1	=;=Z='y="¡=Ä=â=÷=>,>]K>=©>(ç>Z?Zk?EÆ?A@GN@W–@Wî@9FA9€A-ºA4èA9B4WB2ŒB7¿B5÷B7-CBeCE¨CBîCC1DAuD.·D2æD E[:E@–E:×E#F=6F<tF%±FN×F-&GOTG;¤G àG>H9@H
+zH1…H&·H&ÞH!I'I,FIJsI7¾I
öIJJ+J>J7QJ6‰JÀJ$àJ"KA(KjK,ˆK2µKèK¾øK»·LsMŽM©MBÉMDN*QNL|NÉNÞNŒíNzO0‚O9³OíOPPP3P:P2VPO‰PÙP*øP #QDQbQoQ ‰QªQ¾QÓQéQýQR*RGRXRlRNtRÃR#ÇRëR6S:S ZS8{S´SÆSÖSÞSóSTT/TBTLUT ¢TDÃTPUYUkU~U3™U!ÍUïU"öUV)V8V%KV'qV$™V*¾VéV0W,6WcW�W›W£W
»W%ÉWïW'X/XIXcXzXŒX£X7ºXòXY Y2YEYYYmYƒY™Y-¸Y)æY>ZgOZx·Z-0[!^[7€[¸[!Ñ[;ó[0/\5`\<–\<Ó\2]/C].s]=¢]/à]6^,G^çt^\`i`€`�`±`'È`7ð`(a*4a)_a‰aB™a%Üabb9bRbab!�b £bÄbÜbñbc'c8@c?yc?¹cùcS	d4]d>’d3ÑdQe*WeE‚ePÈe*fPDf•f«fDÃfNg"Wgzg‹gŸg ·g3Øgh2$hWhghwh+�h+¼h+èh*i?iTi]iii…iœi³iÓiði	j$jDjZjxj�j§j,¾jëjûjk(k
8kFk[kvk4�kÄk×käk#ûkl!4l&Vl"}l9 lÚlòlmm6mOmfm |m�m&µmÜmôm#n,n@nUn<un²nÁn
ÐnÞnñn o (oIo"Yo|o™o¸oÑoêoýo/	p9pKp$]p‚p2–pÉp"Ýp	q
+q#qAqZqmq‡q* qËq"ßq#r#&rJr#^r#‚r¦r¶r¼rÄr Ér
+êrõrúrss9s>s Cs ds…sŠs�s¢sÂsÉsÏsÔsÙsßsåsêst t%tDt^tA~tÀtàtåtêtñt÷tütuu u'uBuXuiuzu‹uœu­u
Èu	Öu
àu
îu
+üu
+v
+v
+v(v<v,Iv
+vv&�v%¨vÎvÛvðvw'wGw`w+tw wµwÄwÐwçwów
+xx x!6xXxlx~x—x
´xÂxÜxëxòx/y74yly~y*�yºyAÖyz1zMzjz7~z¶zÒzéz"{ &{G{3b{G–{"Þ{ |*"|"M|p|*Œ|=·|~õ|ut}|ê}g~6y~°~O¼~/;<*x,£(Ð ùB€G]€C¥€'é€-�H?�!ˆ�5ª�,à�'
‚5‚0U‚†‚?¦‚Uæ‚N<ƒ=‹ƒ	ÉƒHÓƒ5„:R„-�„2»„Zî„JI…L”…Há…R*†O}†3Í†I‡)K‡Cu‡ƒ¹‡[=ˆ<™ˆ1ÖˆL‰1U‰<‡‰9Ä‰Aþ‰O@ŠC�ŠQÔŠF&‹Ym‹YÇ‹_!Œ–�Œ<�lU�bÂ�Z%ŽD€ŽOÅŽk�L��ˆÎ�3W�R‹�UÞ�>4‘~s‘8ò‘g+’“’›’<¯’ ì’#
“=1“0o“1 “.Ò“N”NP”>Ÿ”9Þ”R•8k•=¤•4â•#–E;–?�–-Á–0ï–* —0K—,|—?©—Gé—=1˜3o˜@£˜:ä˜-™:M™:ˆ™aÃ™p%šT–š…ëš.q›7 ›0Ø›D	œYNœO¨œBøœ=;�hy�Nâ�-1ž3_ž“ž@¯žLðž<=ŸHzŸ:ÃŸ*þŸJ) 9t &® ZÕ J0¡G{¡%Ã¡Gé¡B1¢t¢/�¢!À¢/â¢£".£Q£o£;‡£3Ã£K÷£GC¤I‹¤QÕ¤/'¥2W¥QŠ¥=Ü¥8¦=S¦8‘¦6Ê¦0§r2§s¥§@¨%Z¨;€¨e¼¨/"©&R©y©—©·©3Ó©Iª[Qª[­ªU	«T_«?´«&ô«4¬3P¬?„¬NÄ¬E­3Y­5�­Ã­3á­4®.J®+y®#¥®<É®M¯ET¯'š¯DÂ¯0°%8°)^°4ˆ°-½°4ë°) ±2J±/}±<­±8ê±##²/G²6w²®²?É²!	³@+³l³-‚³,°³)Ý³4´1<´Gn´7¶´]î´vLµHÃµ=¶8J¶?ƒ¶2Ã¶2ö¶.)·X·Xx·*Ñ·Dü·vA¸4¸¸<í¸%*¹7P¹%ˆ¹<®¹Wë¹]CºM¡ºjïºAZ»cœ»a¼Eb¼m¨¼k½r‚½`õ½CV¾:š¾*Õ¾6¿47¿1l¿Pž¿Sï¿<CÀ+€À$¬À6ÑÀ-Á*6Á4aÁj–ÁMÂOÂnÂ4ŒÂBÁÂAÃ@FÃC‡Ã\ËÃ[(Ä3„Ä5¸Ä(îÄ.Å=FÅ<„Å/ÁÅ+ñÅ9Æ$WÆG|Æ1ÄÆöÆ,Ç>Ç/UÇ-…Ç!³Ç ÕÇ6öÇ3-È&aÈ$ˆÈ&­È/ÔÈ.ÉP3ÉJ„ÉPÏÉ, ÊJMÊJ˜Ê<ãÊ2 ËaSË<µË7òË1*Ì.\Ì/‹Ì1»Ì<íÌ5*ÍP`Í4±Í.æÍ*Î'@Î3hÎ*œÎ,ÇÎ/ôÎO$Ï8tÏ8­ÏAæÏ9(Ð)bÐFŒÐÓÐ¬óÐ< Ñ>ÝÑFÒMcÒ=±ÒCïÒ?3Ó@sÓN´Ó=Ô?AÔL�Ô?ÎÔ=Õ=LÕIŠÕ7ÔÕAÖ$NÖKsÖ>¿Ö4þÖ23×"f×;‰×#Å×&é×5ØTFØ$›Ø3ÀØ6ôØN+ÙAzÙ ¼Ù8ÝÙ/Ú0FÚ.wÚ+¦Ú0ÒÚÛW!Û8yÛ+²Û:ÞÛCÜ8]Ü.–Ü:ÅÜ1Ý<2Ý/oÝ?ŸÝEßÝ'%ÞMÞ'kÞ&“Þ.ºÞyéÞ-cß<‘ßHÎß%à2=à1pà,¢à8Ïà>á6Gá?~áB¾á;â:=â9xâD²âY÷â7Qã‰ã˜ã¬ã6Äã5ûã41äfä`uä`Öä47å}lå-êåcæ5|æ;²æ3îæi"ç[Œç[èçKDèK�è@Üè(é9Fé&€é7§éEßéE%êKkêD·ê4üêR1ë:„ë"¿ë;âë;ì7Zì7’ìDÊìSí1cí1•íLÇí0î,EîFrî"¹î=ÜîFïmaïEÏïDðOZðNªðRùðMLñLšñLçñE4ò_zò;Úò1óNHó2—ó,Êó/÷ó'ô?ôVô@fô;§ôAãô9%õ6_õ3–õ8Êõö ö'@ö+höa”öFööN=÷;Œ÷È÷Gç÷;/ø9kø\¥øGù@Jù<‹ùÈù\Hú¥ú¹úÈú
+Øúãú%óúgûB�ûÄûÝûôû(÷û ü-üEüNü`üvüˆü3•üÉüÜüñü7
ý4Eý0zý;«ý'çý+þ4;þ6pþ#§þBËþÿ#$ÿHÿQÿfÿ|ÿ’ÿ¥ÿ¹ÿÒÿíÿ$
+/'8=`!ž9ÀJúE%W+}0©AÚA^"o’
+°»¿Ñãõ,4)Q"{ž¶"Êí''4*\(‡*° Û"ü"%Bh|–"±Ô*ì-+%Y39³7íK%'q2™jÌV7:Ž$É#î%	8	HS	+œ	È	2â	
+
++
+16
+h
+z
+”
+±
+È
+Ü
+ì
+>15p>¦å
+û#*<\!n.�-¿Ví9D
~
˜
H¸
,.@Q"o’¤%½/ã, @a8s¬¾Ð
æ"ô2BN`	g	q{
–#¤>È!>\u+‰µ+Îú$"</_�¡²Èä06E|Ž § ®1Ï/1?Q)‘*»æEIJL”Fá+(zTNÏ"=6`
+—¢r¸5+a,s$ Å×Þ(å& Gd}�(³$Ü/61/h6˜ Ï%ð/6F }/ž6Î=/C6s)ªÔñ'0-^})š#Ä.è(0Yy’¯Âá#þ-"%Pvˆ¦¸Ñè"÷5 +P *| %§ Í +Ô D!DE!3Š!¾!3Î!H"K"["w"‘"F¡"è"Wñ"ŸI#5é#$.5$d$€$–$©$Â$à$ü$ %;%Q%$p%•%S§%Qû%MM&R›&@î&I/'5y'Q¯'5(67(>n(J­(gø(?`)Q )Sò)EF*TŒ*,á*J+^Y+H¸+*,@,,/m,*�,,È,\õ,@R-i“-5ý-33.Yg.lÁ.F./%u/&›/NÂ/C0>U0%”0“º0	N1X1u1�1¥1D¾1;2-?2m2t2Ž2©2iÆ2039B3E|3nÂ3h14?š4GÚ4."5%Q5#w5›5G´52ü5(/6KX6¤6¸6Ò6ì67757J7_7t7‰7¥7Ã7Ø7ì7!8"'81J8|83”81È81ú86,9	c9	m9
+w9
+‚9�9¥9´9É9Ø94Þ9 :%4:.Z:.‰:¸:Ö:ë:ô:1;lF;>³;'ò;U<Xp<EÉ<K=C[=RŸ=Rò=2E>1x>6ª>0á>5?0H?3y?B­?6ð?B'@<j@G§@Bï@M2AI€A+ÊA-öA'$BdLBM±B@ÿB@CH_C=¨C'æCUD8dDG�D<åD "E;CE6E¶E@ÂE3F57F$mF$’F-·FRåF=8GvG‚GŸG³GÆG5ÙG6HFH"_H!‚H=¤HâH)úH7$I
\IÞjI×IJ!K?K(]KB†KHÉK*LJ=LˆL›L†°L7M;@M=|M%ºMàMèMðMNN<2NeoN&ÕN9üN 6O*WO‚O•O3±OåOûOP*P@PXPqP�PœP°PQ¸P
+Q*Q#9Q>]Q*œQ*ÇQ2òQ%R:RLRTRlR€R”R¨R»RUÎR)$SKNSZšSõSTT@7T4xT­T#´TØTèT÷T3
+U5>U(tU0�UÎU.íU,VIVdV}V„V
+œV+§VÓV(éVW*WAW]W zW›WBµWøWX&X6XGXYXkXX!“X,µX,âXQY~aY‘àY;rZ+®Z>ÚZ[%5[F[[>¢[=á[A\Aa\3£\5×\5
]QC]7•]9Í]4^�ÝgóAX]˜1Ð�rb:Yð
+kê4ÏrGJêæ‘(äOÒªqúçîß/ièB_Œ¾Snwx½RŽÐ	[ïÌT+‚ÿ| Ì¡†c2ºÐFÀí?\ÿJM>ŸAqÀŸ²VýIÔ^š­Ç/rÒä—Ô£HÈ®²è‡bHÔGûì¾Ãn™�®–%­ÊñIkc¶“2<Êº�¥Y´§X5“$
\7÷àã²©æEéãšz´V|ÓòˆK­˜EouÄ$VJK¡»†>Ûì¨
+èñ¢â&	¨k'¸sØv.9¤b†át ˜Ýioðõ[½ÖašŽœžÄQ8‘@ «³dÍ¬zØ8ÅêCt”idþBf–§ž*oÃìËEÞ—ôþ]ºcl0ÑÎ¹\8¼,)œ™�\PõíÁmT±ê�•¬BÇY‰;]¤0ayON£�X6³ÖSu:1r€3"‡n	ö±[rƒÓ=§^=IåMÄ$%X¶<¾”p-á:Á¬�Â@3üRÉOÅeÅµŸ¹ç{÷Œ^ñö›	¶¦¥=e´ç(UˆhD¸Üã5…27e*sôù.é4äMXW	OP_eÉQÛèjÅkLë‚Œ™©1SÅ½³6,Jœ:¿P.’Ö˜Ñ*ë¸ÝU}jt#Ùat~8<ÿ­0!¦uüVÆZ	;�Í³÷ù¬+`ø°`Ê@ÈØ¹ $µ°_Ö£G€‰lò~¯¹!ÞÙ{;…Àóq{M’ˆ¿¼URÇ(!¢C(þïv‹¿JLnIjÒskmswŠG#(?ë¥#"@q�¨Ü’÷+!„Ç‹J6ÒÎÈÚ]‡d'Ô„p¶OÂbîÂ]žÈ›Z
V�x\˜�¦·zur²Á‚Œ™GX;¼ÚˆS?&=xÕ-#©òHEoNcõgÁ¨pÞù*œ¾6«�óúF‡Æ1òdRÆ'
+ÖýeUWC·–>-ËNàÌzé›ZŽ»–K»•ƒi%`Ä¡Ã:h¤¤.k
+n KÛZ*¤w³(I&já ßí/º&A·L�+‘·�å—o4)%6žßûð"ú`‹vâû€ï9úZ}Õ‘,®vzø9+Žní…­â×š=
g)jÊtþUŒiw¿
+ƒ”‚QáW¸Ú2¡m«±!¥÷ûÚ>¢¾+°aYž’d_À€pý_Šæ„ôµ±Ÿ¯ÞÎgÔ½Ûô’gPÿ,•é?�à,Ù
‰ŸÌ§A@á�530^fÌ{¯ú<«×µ5ZRx�-hùBN)…PÒußR „å/�Amyv2€véD>ÝOøNýË8lº±´/›|$Á'D\œIÐ~ãø‹¦ï"V‹Ú;Qùf�l/Š-�Äh$Õ
pÇË—FðàfH"9hâg6ø4”ƒªª}×²Ù|S-°^9%õeØ�a<EWD<ÏÕÎ%•ÿ[puwèìÙh�ÈDyû!£Í:§†; Ym5·bß¥”}ÜÑªWÊÑ…Þöä¦¯8°qñ~]ŠAF)d«Y7M[là—Õ}4ëw�ÂKóC‰F¬ˆ„•"ë>fU3¢f3GØN*ÀÉô
`ñóÎ[îT¸ö¹b»–2FÃÉ7å|Ó.t†TÑ
+?T“Hi.M›µÓîìCEçƒLoòÐqs¢ËÆŽy&®#D™âõ‘'ý`{ðÝ0¯Âüa�x9BC½#¡‚BQÉ“ä¿&ŠªÃ×ÛLüþsLÍ¨y ãç1æ'31K´@QÏ5‡T4Ü©Ó)¶‰Wíl7ÏcH®©S_î¼Ü7æï×~ÍÏ^üåšm »“öPc=,?Æê0¼ j£	    TLS: %A	Export Address Table 			Export Address Table 		%08lx
 	Name Pointer Table 			Ordinal Table 				[Name Pointer/Ordinal] Table	%08lx
 	code-base %08lx toc (loadable/actual) %08lx/%08lx
-	reloc %4d offset %4x [%4lx] %s	vma:  Hint/Ord Member-Name Bound-To
+	non-TLS: %A	reloc %4d offset %4x [%4lx] %s	vma:  Hint/Ord Member-Name Bound-To
 
 	DLL Name: %s
 
@@ -43,10 +88,14 @@ PE File Base Relocations (interpreted .r
       enum; End+1 symbol: %ld
       struct; End+1 symbol: %ld
       union; End+1 symbol: %ld
+ version array off: %u
+
 Characteristics 0x%x
 
 Dynamic Section:
 
+Exec Auxiliary Header
+
 Export Address Table -- Ordinal Base %ld
 
 Function descriptor located at the start address: %04lx
@@ -57,6 +106,8 @@ Partition[%d] start  = { 0x%.2x, 0x%.2x,
 
 Program Header:
 
+Stack size for functions.  Annotations: '*' max stack, 't' tail call
+
 The Export Tables (interpreted %s section contents)
 
 
@@ -68,6 +119,8 @@ There is a first thunk, but the section 
 
 There is an export table in %s at 0x%lx
 
+There is an export table in %s, but it does not fit into that section
+
 There is an export table, but the section containing it could not be found
 
 There is an import table in %s at 0x%lx
@@ -80,33 +133,271 @@ Version definitions:
 
 Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld
 
+WARNING: Extra data in .rsrc section - it will be ignored by Windows:
+
 [Ordinal/Name Pointer] Table
 
 ppcboot header:
-  consider relinking with --support-old-code enabled  first occurrence: %s: arm call to thumb  first occurrence: %s: thumb call to arm  required from %s:
- <EABI version unrecognised> Glue code sequence Register restore millicode Register save millicode [32bitmode] [FPA float format] [Maverick float format] [VFP float format] [Version1 EABI] [Version2 EABI] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolute position] [cpu32] [d-float] [dynamic symbols use segment index] [floats passed in float registers] [floats passed in integer registers] [g-float] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [m68000] [mapping symbols precede others] [mdmx] [memory=bank-model] [memory=flat] [mips16] [mips1] [mips2] [mips32] [mips32r2] [mips3] [mips4] [mips5] [mips64] [new ABI] [no abi set] [nonpic] [not 32bitmode] [old ABI] [position independent] [relocatable executable] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table] vma:			Begin Address    End Address      Unwind Info
+        pc: 0x%08x
+    *unhandled* cmd %u
+    address: 0x%08x, size: %u
+    flags: %u, address: 0x%08x, pd-address: 0x%08x
+    global name: %.*s
+    linkage index: %u, replacement insn: 0x%08x
+    name: %.*s
+    pc: 0x%08x
+    pc: 0x%08x line: %5u
+    psect idx 1: %u, offset 1: 0x%08x %08x
+    psect idx 2: %u, offset 2: 0x%08x %08x
+    psect idx 3: %u, offset 3: 0x%08x %08x
+    psect: %u, offset: 0x%08x %08x
+    routine name: %.*s
+   %02u    %s%s %s
+   (type: %3u, size: 4+%3u):    *unhandled* cmd %u
+   alignment  : 2**%u
+   alloc (len)   : %u (0x%08x)
+   alloc (len): %u (0x%08x)
+   ascii ident   : %.*s
+   binary ident  : 0x%08x
+   bitmap: 0x%08x (count: %u):
+   code address: 0x%08x
+   compile date   : %.17s
+   compiler   : %.*s
+   completion code: %u
+   copyright: %.*s
+   declfile: len: %u, flags: %u, fileid: %u
+   deflines %u
+   entity name   : %.*s
+   entry point: 0x%08x
+   error severity: %x
+   file: %.*s
+   filename   : %.*s
+   flags         : 0x%08x   flags      : 0x%04x   flags: %d, language: %u, major: %u, minor: %u
+   flags: 0x%04x   formfeed
+   id match      : %x
+   image offset  : 0x%08x
+   language name: %.*s
+   linkage index: %u, global: %.*s
+   linkage index: %u, procedure name: %.*s
+   linkage index: %u, procedure: %.*s
+   linkage index: %u, psect: %u, offset: 0x%08x %08x
+   max record size: %u
+   module name    : %.*s
+   module name: %.*s
+   module version : %.*s
+   name          : %.*s
+   name        : %.*s
+   name       : %.*s
+   number of cond linkage pairs: %u
+   object name   : %.*s
+   offset: 0x%08x, val: 0x%08x
+   proc descr : 0x%08x
+   psect index : %u
+   psect index for entry point : %u
+   psect index: %u
+   psect offset: %u
+   psect offset: 0x%08x
+   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u
+   setfile %u
+   setlnum %u
+   setrec %u
+   signature: %.*s
+   structure level: %u
+   symbol vector offset: 0x%08x
+   symvec offset : 0x%08x
+   title: %.*s
+   transfer addr flags: 0x%02x
+   transfer addr psect: %u
+   transfer address   : 0x%08x
+   vector      : 0x%08x
+   version mask: 0x%08x
+  %s (len=%u+%u):
+  %s: 0x%v
+  %u: size: %u, flags: 0x%02x, name: %.*s
+  EEOM (len=%u):
+  EGSD (len=%u):
+  EGSD entry %2u (type: %u, len: %u):   EMH %u (len=%u):   base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x   base_va : 0x%08x
+  bitcount: %u, base addr: 0x%08x
+  calls:
+  chgprtoff : %5u
+  codeadroff: %5u, lpfixoff  : %5u
+  fixuplnk: 0x%08x %08x
+  flags: 0x%08x
+  iaflink : 0x%08x %08x
+  image %u (%u entries)
+  image %u (%u entries), offsets:
+  lppsbfixoff: %5u
+  psect start: 0x%08x, length: %u
+  qdotadroff: %5u, ldotadroff: %5u
+  qrelfixoff: %5u, lrelfixoff: %5u
+  required from %s:
+  shlextra  : %5u, permctx   : %5u
+  shlstoff  : %5u, shrimgcnt : %5u
+  size : %u
+ %08x 0x%08x 64B <EABI version unrecognised> BPAGE: %u COM COMM Change Protection (%u entries):
+ Code Address Reference Fixups:
+ DEF EXE First address : 0x%08x 0x%08x
+ Fourth address: 0x%08x 0x%08x
+ GBL Glue code sequence LIB Linkage Pairs Reference Fixups:
+ NOMOD NORM OVR PIC QVAL RD REL Register restore millicode Register save millicode SHR Second address: 0x%08x 0x%08x
+ Shareable images:
+ Shared image  : 0x%08x 0x%08x
+ Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d
+ Third address : 0x%08x 0x%08x
+ UNI VEC VECEP WEAK WRT [BE8] [FPA float format] [G10] [LE8] [Maverick float format] [VFP float format] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [XGATE RAM offsetting] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [abiv%ld] [absolute position] [d-float] [dynamic symbols use segment index] [fix dep] [floats passed in float registers] [floats passed in integer registers] [g-float] [hard-float ABI] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [mapping symbols precede others] [memory=bank-model] [memory=flat] [new ABI] [no abi set] [nonpic] [not 32bitmode] [old ABI] [pic] [position independent] [relocatable executable] [soft-float ABI] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table] [v10 and v32] [v32] corrupted GST
+ debug module table : vbn: %u, size: %u
+ debug symbol table : vbn: %u, size: %u (0x%x)
+ fixup info rva:  flags: 0x%04x global symbol table: vbn: %u, records: %u
+ ident: 0x%08x, name: %.*s
+ ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u
+ image build ident: %.*s
+ image ident      : %.*s
+ image name       : %.*s
+ image type: %u (%s) img I/O count: %u, nbr channels: %u, req pri: %08x%08x
+ link time        : %s
+ linker flags: %08x: linker ident     : %.*s
+ long-word .address reference fixups:
+ long-word relocation fixups:
+ majorid: %u, minorid: %u
+ module offset: 0x%08x, size: 0x%08x, (%u psects)
+ offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u
+ quad-word .address reference fixups:
+ quad-word relocation fixups:
+ section: base: 0x%08x%08x size: 0x%08x
+ type: %3u, len: %3u (at 0x%08x):  unhandled EOBJ record type %u
+ vbn: %u, pfc: %u, matchctl: %u type: %u ( vma:			Begin Address    End Address      Unwind Info
  vma:		Begin    End      EH       EH       PrologEnd  Exception
      		Address  Address  Handler  Data     Address    Mask
+ vma:		Begin    Prolog   Function Flags    Exception EH
+     		Address  Length   Length   32b exc  Handler   Data
  vma:            Hint    Time      Forward  DLL       First
                  Table   Stamp     Chain    Name      Thunk
-#<Invalid error code>%T: discarded in section `%s' from %s
-%s (%s): Section flag %s (0x%x) ignored%s(%s): relocation %d has invalid symbol index %ld%s(%s): warning: interworking not enabled.%s(%s+0x%lx): %s reloc against `%s': error %d%s(%s+0x%lx): %s reloc against local symbol%s(%s+0x%lx): %s relocation against SEC_MERGE section%s(%s+0x%lx): Stabs entry has invalid string index.%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc%s(%s+0x%lx): cannot handle %s for %s%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections%s(%s+0x%lx): fixing %s%s(%s+0x%lx): invalid instruction for TLS relocation %s%s(%s+0x%lx): non-zero addend on %s reloc against `%s'%s(%s+0x%lx): reloc against `%s': error %d%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'%s(%s+0x%lx): unresolvable relocation against symbol `%s'%s, section %s:
-  relocation %s should not be used in a shared object; recompile with -fPIC%s: !samegp reloc against symbol without .prologue: %s%s: %s symbol `%s' in %s is referenced by DSO%s: %s symbol `%s' isn't defined%s: %s' accessed both as normal and thread local symbol%s: %s+0x%lx: jump to stub routine which is not jal%s: %s: invalid needed version %d%s: %s: invalid version %u (max %d)%s: %s: reloc overflow: 0x%lx > 0xffff%s: .got subsegment exceeds 64K (size %d)%s: .opd is not a regular array of opd entries%s: .preinit_array section is not allowed in DSO%s: 0x%lx: fatal: reloc overflow while relaxing%s: 0x%lx: fatal: unaligned branch target for relax-support relocation%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%s: 0x%lx: warning: bad R_SH_USES load offset%s: 0x%lx: warning: bad R_SH_USES offset%s: 0x%lx: warning: bad count%s: 0x%lx: warning: could not find expected COUNT reloc%s: 0x%lx: warning: could not find expected reloc%s: 0x%lx: warning: symbol in unexpected section%s: @gprel relocation against dynamic symbol %s%s: @internal branch to dynamic symbol %s%s: @pcrel relocation against dynamic symbol %s%s: ABI is incompatible with that of the selected emulation%s: ABI mismatch: linking %s module with previous %s modules%s: Architecture mismatch with previous modules%s: Bad relocation record imported: %d%s: Bad symbol definition: `Main' set to %s rather than the start address %s
-%s: CALL16 reloc at 0x%lx not against global symbol%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
-%s: GAS error: unexpected PTB insn with R_SH_PT_16%s: Instruction set mismatch with previous modules%s: Internal inconsistency error for value for
+#<Invalid error code>%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d
+%*.s Entry: %A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections%A has both ordered and unordered sections%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)
+%A:0x%v not found in function table
+%B (%s): Section flag %s (0x%x) ignored%B and %B are for different configurations%B and %B are for different cores%B contains CRIS v32 code, incompatible with previous objects%B contains non-CRIS-v32 code, incompatible with previous objects%B has has both the current and legacy Tag_MPextension_use attributes%B is not allowed to define %s%B section %A exceeds stub group size%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section%B uses unknown e_flags 0x%lx%B(%A): error: call to undefined function '%s'%B(%A): internal error: dangerous relocation%B(%A): internal error: out of range error%B(%A): internal error: unknown error%B(%A): internal error: unsupported relocation error%B(%A): invalid property table%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte.%B(%A): warning: unaligned access to symbol '%s' in the small data area%B(%A): warning: unaligned small data access of type %d.%B(%A+0x%%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link%B(%A+0x%lx): %s relocation against SEC_MERGE section%B(%A+0x%lx): %s relocation against external symbol "%s"%B(%A+0x%lx): %s used with TLS symbol %s%B(%A+0x%lx): %s used with non-TLS symbol %s%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object%B(%A+0x%lx): Stabs entry has invalid string index.%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section%B(%A+0x%lx): cannot handle %s for %s%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch%B(%A+0x%lx): could not decode instruction; possible configuration mismatch%B(%A+0x%lx): invalid instruction for TLS relocation %s%B(%A+0x%lx): reloc against `%s': error %d%B(%A+0x%lx): relocation offset out of range (size=0x%x)%B(%A+0x%lx): unexpected fix for %s relocation%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'%B(%A+0x%lx): unresolvable relocation against symbol `%s'%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete
+%B(%s): warning: interworking not enabled.
+  first occurrence: %B: ARM call to Thumb%B(%s): warning: interworking not enabled.
+  first occurrence: %B: Thumb call to ARM%B(%s): warning: interworking not enabled.
+  first occurrence: %B: arm call to thumb%B(%s): warning: interworking not enabled.
+  first occurrence: %B: thumb call to arm
+  consider relinking with --support-old-code enabled%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'%B, section %A:
+  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC%B, section %A:
+  relocation %s should not be used in a shared object; recompile with -fPIC%B, section %A:
+  v10/v32 compatible object %s must not contain a PIC relocation%B, section %A: No PLT for relocation %s against symbol `%s'%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?%B, section %A: relocation %s is not allowed for global symbol: `%s'%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?%B, section %A: relocation %s with no GOT created%B, section %A: relocation %s with non-zero addend %d against local symbol%B, section %A: relocation %s with non-zero addend %d against symbol `%s'%B, section %A: unresolvable relocation %s against symbol `%s'%B, section `%A', to symbol `%s':
+  relocation %s should not be used in a shared object; recompile with -fPIC%B: !samegp reloc against symbol without .prologue: %s%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled.%B: %s
+%B: %s not absolute%B: %s' accessed both as normal and thread local symbol%B: %s: invalid needed version %d%B: %s: invalid version %u (max %d)%B: '%s' accessed both as normal and thread local symbol%B: .got subsegment exceeds 64K (size %d)%B: .opd is not a regular array of opd entries%B: .preinit_array section is not allowed in DSO%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32%B: 0x%lx: fatal: reloc overflow while relaxing%B: 0x%lx: fatal: unaligned %s relocation 0x%lx%B: 0x%lx: fatal: unaligned branch target for relax-support relocation%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%B: 0x%lx: warning: bad R_SH_USES load offset%B: 0x%lx: warning: bad R_SH_USES offset%B: 0x%lx: warning: bad count%B: 0x%lx: warning: could not find expected COUNT reloc%B: 0x%lx: warning: could not find expected reloc%B: 0x%lx: warning: symbol in unexpected section%B: @gprel relocation against dynamic symbol %s%B: @internal branch to dynamic symbol %s%B: @pcrel relocation against dynamic symbol %s%B: ABI is incompatible with that of the selected emulation%B: ABI mismatch: linking %s module with previous %s modules%B: ABI version %ld is not compatible with ABI version %ld output%B: ASE mismatch: linking %s module with previous %s modules%B: Alignment mismatch with previous modules%B: Architecture mismatch with previous modules%B: BE8 images only valid in big-endian mode.%B: Bad relocation record imported: %d%B: CALL15 reloc at 0x%lx not against global symbol%B: CALL16 reloc at 0x%lx not against global symbol%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000).%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch.%B: Cannot handle compressed Alpha binaries.
+   Use compiler flags, or objZ, to generate uncompressed binaries.%B: Cannot link together %s and %s objects.%B: Corrupt size field in group section header: 0x%lx%B: Failed to add renamed symbol %s%B: Function descriptor relocation with non-zero addend%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d%B: GOT overflow: Number of relocations with 8-bit offset > %d%B: GOT reloc at 0x%lx not expected in executables%B: IMPORT AS directive for %s conceals previous IMPORT AS%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte%B: Instruction set mismatch with previous modules%B: Invalid relocation type imported: %d%B: Malformed reloc detected for section %s%B: Nested OMIT_FP in %A.%B: No symbol version section for versioned symbol `%s'%B: Not enough room for program headers, try linking with -N%B: Only registers %%g[2367] can be declared using STT_REGISTER%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive%B: Relocation %s (%d) is not currently supported.
+%B: Relocations in generic ELF (EM: %d)%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined%B: TLS local exec code cannot be linked into shared objects%B: TLS sections are not adjacent:%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed%B: The first section in the PT_DYNAMIC segment is not the .dynamic section%B: The target (%s) of an %s relocation is in the wrong section (%A)%B: Too many sections: %d (>= %d)%B: Unable to sort relocs - they are in more than one size%B: Unable to sort relocs - they are of an unknown size%B: Unhandled import type; %x%B: Unknown mandatory EABI object attribute %d%B: Unknown relocation type %d
+%B: Unknown section type in a.out.adobe file: %x
+%B: Unmatched OMIT_FP in %A.%B: Unrecognised .directive command: %s%B: Unrecognised import name type; %x%B: Unrecognised import type; %x%B: Unrecognised machine type (0x%x) in Import Library Format archive%B: Unrecognized storage class %d for %s symbol `%s'%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s%B: Warning: Thumb BLX instruction targets thumb function '%s'.%B: Warning: bad `%s' option size %u smaller than its header%B: Warning: cannot determine the target function for stub section `%s'%B: Warning: thumb mode PLT generation not currently supported%B: XMC_TC0 symbol `%s' is class %d scnlen %d%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC%B: `%s' accessed both as FDPIC and thread local symbol%B: `%s' accessed both as normal and FDPIC symbol%B: `%s' accessed both as normal and thread local symbol%B: `%s' has line numbers but no enclosing section%B: `%s' in loader reloc but not loader sym%B: `ld -r' not supported with PE MIPS objects
+%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d%B: bad pair/reflo after refhi
+%B: bad reloc address 0x%lx in section `%A'%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'%B: bad section length in ihex_read_section%B: bad string table size %lu%B: bad symbol index: %d%B: cannot create stub entry %s%B: change in gp: BRSGP %s%B: class %d symbol `%s' has no aux entries%B: compiled for a 64 bit system and target is 32 bit%B: compiled for a big endian system and target is little endian%B: compiled for a little endian system and target is big endian%B: compiled normally and linked with modules compiled with -mrelocatable%B: compiled with -mrelocatable and linked with modules compiled normally%B: could not find output section %A for input section %A%B: could not find output section %s%B: could not read contents of section `%A'
+%B: csect `%s' not in enclosing section%B: don't know how to handle OS specific section `%s' [0x%8x]%B: don't know how to handle allocated, application specific section `%s' [0x%8x]%B: don't know how to handle processor specific section `%s' [0x%8x]%B: don't know how to handle section `%s' [0x%8x]%B: dtp-relative relocation against dynamic symbol %s%B: duplicate export stub %s%B: duplicate section `%A' has different contents
+%B: duplicate section `%A' has different size
+%B: endianness incompatible with that of the selected emulation%B: error: ABI mismatch with previous modules.%B: error: Cannot set _ITB_BASE_%B: error: Cortex-A8 erratum stub is allocated in unsafe location%B: error: Cortex-A8 erratum stub out of range (input file too large)%B: error: Instruction set mismatch with previous modules.%B: error: VFP11 veneer out of range%B: error: unaligned relocation type %d at %08x reloc %p
+%B: error: unknown mandatory EABI object attribute %d%B: error: unknown relocation type %d.%B: file class %s incompatible with %s%B: gp-relative relocation against dynamic symbol %s%B: hidden symbol `%s' in %B is referenced by DSO%B: hidden symbol `%s' isn't defined%B: ignoring duplicate section `%A'
+%B: illegal relocation type %d at address 0x%lx%B: illegal symbol index in reloc: %d%B: incompatible machine type. Output is 0x%x. Input is 0x%x%B: indirect symbol `%s' to `%s' is a loop%B: internal error in ihex_read_section%B: internal symbol `%s' in %B is referenced by DSO%B: internal symbol `%s' isn't defined%B: invalid SHT_GROUP entry%B: invalid link %lu for reloc section %s (index %u)%B: invalid relocation type %d%B: invalid string offset %u >= %lu for section `%s'%B: jump too far away
+%B: linking %s module with previous %s modules%B: linking 32-bit code with 64-bit code%B: linking 64-bit files with 32-bit files%B: linking UltraSPARC specific with HAL specific code%B: linking auto-pic files with non-auto-pic files%B: linking big-endian files with little-endian files%B: linking constant-gp files with non-constant-gp files%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double%B: linking files compiled for HCS12 with others compiled for HC12%B: linking little endian files with big endian files%B: linking non-pic code in a position independent executable%B: linking trap-on-NULL-dereference with non-trapping files%B: loader reloc in read-only section %A%B: loader reloc in unrecognized section `%s'%B: local symbol `%s' in %B is referenced by DSO%B: misplaced XTY_LD `%s'%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'.%B: no group info for section %A%B: non-pic code with imm relocation against dynamic symbol `%s'%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table%B: pc-relative relocation against dynamic symbol %s%B: pc-relative relocation against undefined weak symbol %s%B: probably compiled without -fPIC?%B: protected symbol `%s' isn't defined%B: reloc %s:%d not in csect%B: reloc against a non-existant symbol index: %ld%B: relocation %s against %s `%s' can not be used when making a shared object%s%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC%B: relocation %s against symbol `%s' isn't supported in x32 mode%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s%B: relocation %s can not be used when making a shared object; recompile with -fPIC%B: relocation %s cannot be used when making a shared object%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend%B: relocation size mismatch in %B section %A%B: relocs in section `%A', but it has no contents%B: section %A lma %#lx adjusted to %#lx%B: section %s: string table overflow at offset %ld%B: section `%A' can't be allocated in segment %d%B: sh_link [%d] in section `%A' is incorrect%B: sh_link of section `%A' points to discarded section `%A' of `%B'%B: sh_link of section `%A' points to removed section `%A' of `%B'%B: size field is zero in Import Library Format header%B: speculation fixup to dynamic symbol %s%B: stack size specified and %s set%B: string not null terminated in ILF object file.%B: symbol `%s' has unrecognized csect type %d%B: symbol `%s' has unrecognized smclas %d%B: symbol `%s' required but not present%B: taking the address of protected function '%s' cannot be done when making a shared library%B: the target (%s) of a %s relocation is in the wrong output section (%s)%B: too many sections (%d)%B: too many sections: %u%B: tp-relative relocation against dynamic symbol %s%B: unable to fill in DataDictionary[12] because .idata$5 is missing%B: unable to fill in DataDictionary[1] because .idata$2 is missing%B: unable to fill in DataDictionary[1] because .idata$4 is missing%B: unable to fill in DataDictionary[9] because __tls_used is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing%B: unable to find ARM glue '%s' for `%s'%B: unable to find THUMB glue '%s' for `%s'%B: unable to find VFP11 veneer `%s'%B: unable to get decompressed section %A%B: unable to initialize compress status for section %s%B: unable to initialize decompress status for section %s%B: undefined reference to symbol '%s'%B: undefined sym `%s' in .opd section%B: undefined symbol on R_PPC64_TOCSAVE relocation%B: unexpected ATN type %d in external part%B: unexpected redefinition of indirect versioned symbol `%s'%B: unexpected reloc type %u in .opd section%B: unexpected type after ATN%B: unhandled dynamic relocation against %s%B: unimplemented %s
+%B: unimplemented ATI record %u for symbol %u%B: unknown [%d] section `%s' in group [%s]%B: unknown load command 0x%lx%B: unknown relocation type %d%B: unknown/unsupported relocation type %d%B: unrecognized relocation (0x%x) in section `%A'%B: unsupported relocation type %i%B: unsupported relocation type %i
+%B: unsupported relocation type %s%B: unsupported relocation: ALPHA_R_GPRELHIGH%B: unsupported relocation: ALPHA_R_GPRELLOW%B: uses _-prefixed symbols, but writing file with non-prefixed symbols%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%B: uses non-prefixed symbols, but writing file with _-prefixed symbols%B: version node not found for symbol %s%B: warning: COMDAT symbol '%s' does not match section name '%s'%B: warning: Empty loadable segment detected, is this intentional ?
+%B: warning: Endian mismatch with previous modules.%B: warning: Incompatible elf-versions %s and  %s.%B: warning: Older version of object file encountered, Please recompile with current tool chain.%B: warning: allocated section `%s' not in segment%B: warning: duplicate line number information for `%s'%B: warning: illegal symbol index %ld in line numbers%B: warning: illegal symbol index %ld in relocs%B: warning: line number table read failed%B: warning: linking PIC files with non-PIC files%B: warning: linking abicalls files with non-abicalls files%B: warning: relocate SDA_BASE failed.%B: warning: selected VFP11 erratum workaround is not necessary for target architecture%B: warning: sh_link not set for section `%A'%B: warning: unaligned access to GOT entry.%B: warning: unknown EABI object attribute %d%B:%A%s exceeds overlay size
+%B:%A: Warning: deprecated Red Hat reloc %B:%d: Bad checksum in S-record file
+%B:%d: Unexpected character `%s' in S-record file
+%B:%d: unexpected character `%s' in Intel Hex file%B:%u: bad checksum in Intel Hex file (expected %u, found %u)%B:%u: bad extended address record length in Intel Hex file%B:%u: bad extended linear address record length in Intel Hex file%B:%u: bad extended linear start address length in Intel Hex file%B:%u: bad extended start address length in Intel Hex file%B:%u: unrecognized ihex type %u in Intel Hex file%C: warning: relocation to "%s" references a different segment
+%F%P: already_linked_table: %E
+%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie
+%H __tls_get_addr lost arg, TLS optimization disabled
+%H arg lost __tls_get_addr, TLS optimization disabled
+%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend
+%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend
+%H: R_FRV_GETTLSOFF not applied to a call instruction
+%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction
+%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction
+%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction
+%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction
+%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction
+%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction
+%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction
+%H: R_FRV_TLSMOFFHI not applied to a sethi instruction
+%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction
+%H: cannot emit dynamic relocations in read-only section
+%H: cannot emit fixups in read-only section
+%H: reloc against `%s' references a different segment
+%H: reloc against `%s': %s
+%H: relocation references symbol not defined in the module
+%H: relocation to `%s+%v' may have caused the error above
+%P%F: --relax and -r may not be used together
+%P%F: failed creating ex9.it %s hash table: %E
+%P%X: can not read symbols: %E
+%P%X: read-only segment has dynamic relocations.
+%P: %B: %s is not supported for `%T'
+%P: %B: cannot create stub entry %s
+%P: %B: relocation %s is not yet supported for symbol %s
+%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)
+%P: %B: unexpected relocation type
+%P: %B: unknown relocation type %d for `%T'
+%P: %B: unknown relocation type %d for symbol %s
+%P: %B: warning: relocation against `%s' in readonly section `%A'.
+%P: %B: warning: relocation in readonly section `%A'.
+%P: %H: %s against `%T': error %d
+%P: %H: %s for indirect function `%T' unsupported
+%P: %H: %s references optimized away TOC entry
+%P: %H: %s reloc against `%s': error %d
+%P: %H: %s reloc against local symbol
+%P: %H: %s used with TLS symbol `%T'
+%P: %H: %s used with non-TLS symbol `%T'
+%P: %H: @local call to ifunc %s
+%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC
+%P: %H: error: %s against `%s' not a multiple of %u
+%P: %H: error: %s not a multiple of %u
+%P: %H: non-zero addend on %s reloc against `%s'
+%P: %H: relocation %s for indirect function %s unsupported
+%P: %H: toc optimization is not supported for %s instruction.
+%P: %H: unresolvable %s against `%T'
+%P: %H: unresolvable %s relocation against symbol `%s'
+%P: %s not defined in linker created %s
+%P: %s offset too large for .eh_frame sdata4 encoding%P: .opd not allowed in ABI version %d
+%P: DW_EH_PE_datarel unspecified for this architecture.
+%P: alternate ELF machine code found (%d) in %B, expecting %d
+%P: bss-plt forced by profiling
+%P: bss-plt forced due to %B
+%P: can't build branch stub `%s'
+%P: can't find branch stub `%s'
+%P: cannot find opd entry toc for `%T'
+%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc
+%P: dynreloc miscount for %B, section %A
+%P: error in %B(%A); no .eh_frame_hdr table will be created.
+%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.
+%P: linkage table error against `%T'
+%P: long branch stub `%s' offset overflow
+%P: multiple entry points: in modules %B and %B
+%P: relocatable link is not supported
+%P: stubs don't match calculated size
+%P: symbol '%s' has invalid st_other for ABI version 1
+%P: warning: creating a DT_TEXTREL in a shared object.
+%X%C: relocation to "%s" references a different segment
+%X%P: %B(%A): relocation "%R" goes out of range
+%X%P: overlay section %A does not start on a cache line.
+%X%P: overlay section %A is larger than a cache line.
+%X%P: overlay section %A is not in cache area.
+%X%P: overlay sections %A and %A do not start at the same address.
+%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B
+%s defined on removed toc entry%s duplicated
+%s duplicated in %s
+%s in overlay section%s(%s): relocation %d has invalid symbol index %ld%s: %s: reloc overflow: 0x%lx > 0xffff%s: .rsrc merge failure: corrupt .rsrc section%s: 0x%v 0x%v
+%s: Bad symbol definition: `Main' set to %s rather than the start address %s
+%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
+%s: GAS error: unexpected PTB insn with R_SH_PT_16%s: Internal inconsistency error for value for
  linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx
-%s: Internal inconsistency; no relocation section %s%s: Invalid relocation type exported: %d%s: Invalid relocation type imported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: Malformed reloc detected for section %s%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section%s: No core to allocate a symbol %d bytes long
+%s: Invalid relocation type exported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: Malformed reloc detected for section %s%s: No core to allocate a symbol %d bytes long
 %s: No core to allocate section name %s
-%s: Not enough room for program headers (allocated %u, need %u)%s: Not enough room for program headers, try linking with -N%s: Only registers %%g[2367] can be declared using STT_REGISTER%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive%s: Relocation %s (%d) is not currently supported.
-%s: Relocations in generic ELF (EM: %d)%s: TLS local exec code cannot be linked into shared objects%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry%s: The target (%s) of an %s relocation is in the wrong section (%s)%s: Unhandled import type; %x%s: Unknown relocation type %d
-%s: Unknown section type in a.out.adobe file: %x
-%s: Unrecognised import name type; %x%s: Unrecognised import type; %x%s: Unrecognised machine type (0x%x) in Import Library Format archive%s: Unrecognized storage class %d for %s symbol `%s'%s: Warning: Arm BLX instruction targets Arm function '%s'.%s: Warning: Thumb BLX instruction targets thumb function '%s'.%s: XCOFF shared object when not producing XCOFF output%s: XMC_TC0 symbol `%s' is class %d scnlen %d%s: __gp does not cover short data segment%s: `%s' accessed both as normal and thread local symbol%s: `%s' has line numbers but no enclosing section%s: `%s' in loader reloc but not loader sym%s: `ld -r' not supported with PE MIPS objects
-%s: access beyond end of merged section (%ld + %ld)%s: address 0x%s out of range for Intel Hex file%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d%s: bad pair/reflo after refhi
-%s: bad reloc address 0x%lx in section `%s'%s: bad relocation section name `%s'%s: bad section length in ihex_read_section%s: bad string table size %lu%s: bad symbol index: %d%s: base-plus-offset relocation against register symbol: %s in %s%s: base-plus-offset relocation against register symbol: (unknown) in %s%s: can not represent section `%s' in a.out object file format%s: can not represent section `%s' in oasys%s: can not represent section for symbol `%s' in a.out object file format%s: cannot allocate file name for file number %d, %d bytes
-%s: cannot create stub entry %s%s: change in gp: BRSGP %s%s: check_relocs: unhandled reloc type %d%s: class %d symbol `%s' has no aux entries%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled for a 64 bit system and target is 32 bit%s: compiled for a big endian system and target is little endian%s: compiled for a little endian system and target is big endian%s: compiled normally and linked with modules compiled with -mrelocatable%s: compiled with %s and linked with modules compiled with %s%s: compiled with %s and linked with modules that use non-pic relocations%s: compiled with -mrelocatable and linked with modules compiled normally%s: could not find output section %s%s: could not find output section %s for input section %s%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: csect `%s' not in enclosing section%s: directive LOCAL valid only with a register or absolute value%s: dtp-relative relocation against dynamic symbol %s%s: duplicate export stub %s%s: dynamic object with no .loader section%s: encountered datalabel symbol in input%s: endianness incompatible with that of the selected emulation%s: error: relocation %s not a multiple of %d%s: error: unaligned relocation type %d at %08x reloc %08x
-%s: gp-relative relocation against dynamic symbol %s%s: illegal relocation type %d at address 0x%lx%s: illegal section name `%s'%s: illegal symbol index in reloc: %d%s: indirect symbol `%s' to `%s' is a loop%s: internal error in ihex_read_section%s: internal error, internal register section %s had contents
+%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A%s: TLS definition in %B section %A mismatches non-TLS reference in %B%s: TLS reference in %B mismatches non-TLS definition in %B section %A%s: TLS reference in %B mismatches non-TLS reference in %B%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry%s: The target (%s) of an %s relocation is in the wrong section (%s)%s: Unsupported transition from %s to %s%s: XCOFF shared object when not producing XCOFF output%s: __gp does not cover short data segment%s: access beyond end of merged section (%ld)%s: address 0x%s out of range for Intel Hex file%s: base-plus-offset relocation against register symbol: %s in %s%s: base-plus-offset relocation against register symbol: (unknown) in %s%s: can not represent section `%s' in a.out object file format%s: can not represent section `%s' in oasys%s: can not represent section for symbol `%s' in a.out object file format%s: cannot allocate file name for file number %d, %d bytes
+%s: cannot create stub entry %s%s: cannot link fdpic object file into non-fdpic executable%s: cannot link non-fdpic object file into fdpic executable%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled with %s and linked with modules compiled with %s%s: compiled with %s and linked with modules that use non-pic relocations%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: directive LOCAL valid only with a register or absolute value%s: dynamic object with no .loader section%s: encountered datalabel symbol in input%s: error: unaligned relocation type %d at %08x reloc %08x
+%s: illegal section name `%s'%s: internal error, internal register section %s had contents
 %s: internal error, symbol table changed size from %d to %d words
-%s: invalid SHT_GROUP entry%s: invalid link %lu for reloc section %s (index %u)%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)
+%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)
 %s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote
 %s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx
 %s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo
@@ -119,205 +410,803 @@ ppcboot header:
 %s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx
 %s: invalid mmo file: lop_end not last item in file
 %s: invalid mmo file: unsupported lopcode `%d'
-%s: invalid relocation type %d%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx
-%s: invalid string offset %u >= %lu for section `%s'%s: invalid symbol table: duplicate symbol `%s'
-%s: jump too far away
-%s: line number overflow: 0x%lx > 0xffff%s: linking %s module with previous %s modules%s: linking 32-bit code with 64-bit code%s: linking 64-bit files with 32-bit files%s: linking UltraSPARC specific with HAL specific code%s: linking auto-pic files with non-auto-pic files%s: linking big-endian files with little-endian files%s: linking constant-gp files with non-constant-gp files%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double%s: linking files compiled for HCS12 with others compiled for HC12%s: linking little endian files with big endian files%s: linking non-pic code in a position independent executable%s: linking non-pic code in a shared library%s: linking trap-on-NULL-dereference with non-trapping files%s: loader reloc in read-only section %s%s: loader reloc in unrecognized section `%s'%s: misplaced XTY_LD `%s'%s: no group info for section %s%s: no initialized registers; section length 0
-%s: no such symbol%s: no symbol "%s"%s: not fully implemented%s: not implemented%s: not supported%s: object size does not match that of target %s%s: pc-relative relocation against dynamic symbol %s%s: probably compiled without -fPIC?%s: register relocation against non-register symbol: %s in %s%s: register relocation against non-register symbol: (unknown) in %s%s: reloc %s:%d not in csect%s: reloc overflow 1: 0x%lx > 0xffff%s: relocatable link from %s to %s not supported%s: relocation %s can not be used when making a shared object; recompile with -fPIC%s: relocation %s cannot be used when making a shared object%s: relocation %s in section %s with no GOT created%s: relocation %s is not allowed for global symbol: `%s' from %s section%s: relocation %s is not supported for symbol %s.%s: relocation %s is not yet supported for symbol %s.%s: relocation %s should not be used when making a shared object; recompile with -fPIC%s: relocation %s with non-zero addend %d against local symbol from %s section%s: relocation %s with non-zero addend %d against symbol `%s' from %s section%s: relocation size mismatch in %s section %s%s: relocs in section `%s', but it has no contents%s: short data segment overflowed (0x%lx >= 0x400000)%s: size field is zero in Import Library Format header%s: speculation fixup to dynamic symbol %s%s: string not null terminated in ILF object file.%s: string too long (%d chars, max 65535)%s: symbol `%s' has unrecognized csect type %d%s: symbol `%s' has unrecognized smclas %d%s: symbol `%s' required but not present%s: the target (%s) of a %s relocation is in the wrong output section (%s)%s: too many initialized registers; section length %ld
-%s: tp-relative relocation against dynamic symbol %s%s: unable to find ARM glue '%s' for `%s'%s: unable to find THUMB glue '%s' for `%s'%s: undefined sym `%s' in .opd section%s: undefined version: %s%s: undefined versioned symbol name %s%s: unexpected ATN type %d in external part%s: unexpected reloc type %u in .opd section%s: unexpected type after ATN%s: unhandled dynamic relocation against %s%s: unimplemented %s
-%s: unimplemented ATI record %u for symbol %u%s: unknown relocation type %d%s: unknown relocation type %d for symbol %s%s: unrecognized symbol `%s' flags 0x%x%s: unresolvable relocation %s against symbol `%s' from %s section%s: unresolvable relocation against symbol `%s' from %s section%s: unsupported relocation type %s%s: unsupported relocation type 0x%02x%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'
-%s: uses _-prefixed symbols, but writing file with non-prefixed symbols%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses non-prefixed symbols, but writing file with _-prefixed symbols%s: version count (%ld) does not match symbol count (%ld)%s: warning: %s relocation against symbol `%s' from %s section%s: warning: %s relocation to 0x%x from %s section%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: Empty loadable segment detected, is this intentional ?
-%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld%s: warning: PLT addend of %d to `%s' from %s section ignored%s: warning: allocated section `%s' not in segment%s: warning: duplicate line number information for `%s'%s: warning: illegal symbol index %ld in line numbers%s: warning: illegal symbol index %ld in relocs%s: warning: linking PIC files with non-PIC files%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.
-%s: warning: unexpected redefinition of indirect versioned symbol `%s'%s: warning: unresolvable relocation %d against symbol `%s' from %s section%s: warning: unresolvable relocation against symbol `%s' from %s section%s:%d: Unexpected character `%s' in S-record file
-%s:%d: unexpected character `%s' in Intel Hex file
-%s:%u: bad checksum in Intel Hex file (expected %u, found %u)%s:%u: bad extended address record length in Intel Hex file%s:%u: bad extended linear address record length in Intel Hex file%s:%u: bad extended linear start address length in Intel Hex file%s:%u: bad extended start address length in Intel Hex file%s:%u: unrecognized ihex type %u in Intel Hex file
-*unknown*.glink and .plt too far apart.got section not immediately after .plt section32-bit double, 32bits gp relative relocation occurs for an external symbol64-bit double, : m32r instructions: m32rx instructions<Unrecognised flag bits set><unknown>@pltoff reloc against local symbolArchive has no index; run ranlib to add oneArchive object file in wrong formatAttempt to do relocatable link with %s input and %s outputBFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
+%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx
+%s: invalid symbol table: duplicate symbol `%s'
+%s: line number overflow: 0x%lx > 0xffff%s: no initialized registers; section length 0
+%s: no such symbol%s: not implemented%s: not supported%s: object size does not match that of target %s%s: register relocation against non-register symbol: %s in %s%s: register relocation against non-register symbol: (unknown) in %s%s: relocatable link from %s to %s not supported%s: short data segment overflowed (0x%lx >= 0x400000)%s: string too long (%d chars, max 65535)%s: too many initialized registers; section length %ld
+%s: undefined version: %s%s: unknown relocation type %d%s: unrecognized symbol `%s' flags 0x%x%s: unsupported relocation type 0x%02x%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'
+%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)%s: version count (%ld) does not match symbol count (%ld)%s: warning core file truncated%s: warning: %s relocation against symbol `%s' from %s section%s: warning: %s relocation to 0x%x from %s section%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld%s: warning: PLT addend of %d to `%s' from %s section ignored%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode.%s: warning: illegal symbol index %ld in relocs%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.
+%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x.(at bit offset %u)
+(descriptor)
+(no value)
+(not active)
+(not allocated)
+(reg: %u, disp: %u, indir: %u, kind: (thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)(too many global variables for -fpic: recompile with -fPIC)(trailing value)
+(value spec follows)
+)
+*** check this relocation %s*unhandled*
+*unhandled* dst type %u
+*unknown**unknown*        , 8-byte data alignment, Value: %#08lx
+, alias: %u
+, ext fixup offset: %u, no_opt psect off: %u, subtype: %u (%s)
+, symbol vector rva: - %s is G10, %s is not.got section not immediately after .plt section.rsrc merge failure: a directory matches a leaf.rsrc merge failure: differing directory versions
+.rsrc merge failure: dirs with differing characteristics
+.rsrc merge failure: duplicate leaf.rsrc merge failure: duplicate leaf: %s.rsrc merge failure: duplicate string resource: %d.rsrc merge failure: multiple non-default manifests32-bit double, 32bits gp relative relocation occurs for an external symbol64 bits *unhandled*
+64-bit double, : %u.%u
+: m32r instructions: m32r2 instructions: m32rx instructions: n1 instructions: n1h instructions; recompile with -fPIC<Unrecognised flag bits set><corrupt string length: %#x><corrupt string offset: %#lx><unknown>@pltoff reloc against local symbolArchive has no index; run ranlib to add oneArchive object file in wrong formatAttempt to convert L32R/CALLX to CALL failedAttempt to do relocatable link with %s input and %s outputBASE_IMAGE       BFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
 BFD %s internal error, aborting at %s line %d in %s
-Bad valueBase Relocation Directory [.reloc]Bound Import DirectoryCould not find relocation section for %sDebug DirectoryDelay Import DirectoryDeprecated %s called
+BFD Link Error: branch (PC rel16) to section (%s) not supportedBFD Link Error: jump (PC rel26) to section (%s) not supportedBad valueBase Relocation Directory [.reloc]Bound Import DirectoryBounds:
+CLICLR Runtime HeaderCLUSTERS_LOCKMGR COUNTERS         CPU              CTL_AUGRB (augment relocation base) %u
+CTL_DFLOC (define location)
+CTL_SETRB (set relocation base)
+CTL_STKDL (stack defined location)
+CTL_STLOC (set location)
+Copyright Header
+Corrupt .rsrc section detected!
+DSO missing from command lineDST__K_BEG_STMT_MODE not implementedDST__K_END_STMT_MODE not implementedDST__K_RESET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR not implementedDST__K_SET_LINUM_INCR_W not implementedDST__K_SET_PC not implementedDST__K_SET_PC_L not implementedDST__K_SET_PC_W not implementedDST__K_SET_STMTNUM not implementedDebug DirectoryDebug module table:
+Debug symbol table:
+Delay Import DirectoryDeprecated %s called
 Deprecated %s called at %s line %d in %s
-Description DirectoryDwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu).Dwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find .debug_abbrev section.Dwarf Error: Can't find .debug_line section.Dwarf Error: Can't find .debug_str section.Dwarf Error: Could not find abbrev number %u.Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu).Dwarf Error: Invalid or unhandled FORM value: %u.Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu).Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'.Dwarf Error: found dwarf version '%u', this reader only handles version 2 information.Dwarf Error: mangled line number section (bad file number).Dwarf Error: mangled line number section.ERROR: %s is compiled as absolute position code, whereas target %s is position independentERROR: %s is compiled as position independent code, whereas target %s is absolute positionERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%dERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%dERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %dERROR: %s is compiled for the EP9312, whereas %s is compiled for XScaleERROR: %s passes floats in float registers, whereas %s passes them in integer registersERROR: %s passes floats in integer registers, whereas %s passes them in float registersERROR: %s uses FPA instructions, whereas %s does notERROR: %s uses Maverick instructions, whereas %s does notERROR: %s uses VFP instructions, whereas %s does notERROR: %s uses hardware FP, whereas %s uses software FPERROR: %s uses software FP, whereas %s uses hardware FPEntry offset        = 0x%.8lx (%ld)
-Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%xException Directory [.pdata]Export Directory [.edata (or where ever we found it)]Export Flags 			%lx
-Export RVAFAILED to find previous HI16 reloc
-File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
-Forwarder RVAGP relative relocation used when GP not definedGP relative relocation when _gp not definedGPDISP relocation did not find ldah and lda instructionsImport Address Table DirectoryImport Directory [parts of .idata]Internal inconsistency: remaining %u != max %u.
-  Please report this bug.Invalid bfd targetInvalid operationLength              = 0x%.8lx (%ld)
-Linking mips16 objects into %s format is not supportedLoad Configuration DirectoryMajor/Minor 			%d/%d
-Malformed archiveMemory exhaustedMissing IHCONSTMissing IHIHALFName 				No Mem !No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsNumber in:
+Description DirectoryDwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find %s section.Dwarf Error: Could not find abbrev number %u.Dwarf Error: Invalid maximum operations per instruction.Dwarf Error: Invalid or unhandled FORM value: %#x.Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu).Dwarf Error: Unable to read alt ref %u.Dwarf Error: Unhandled .debug_line version %d.Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'.Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information.Dwarf Error: mangled line number section (bad file number).Dwarf Error: mangled line number section.EIHD: (size: %u, nbr blocks: %u)
+Entry offset        = 0x%.8lx (%ld)
+Error reading %s: %sError: %B has both the current and legacy Tag_MPextension_use attributesErrors encountered processing file %sException Directory [.pdata]Export Directory [.edata (or where ever we found it)]Export Flags 			%lx
+Export RVAFAILED to find previous HI16 relocFILES_VOLUMES    File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
+Forwarder RVAGALAXY           GP relative relocation used when GP not definedGP relative relocation when _gp not definedGPDISP relocation did not find ldah and lda instructionsGlobal symbol table:
+ID: %#08lxIDC - Ident Consistency check
+IMAGE_ACTIVATOR  INPUT_SECTION_FLAGS are not supported.
+IO               Image activation:  (size=%u)
+Image activator fixup: (major: %u, minor: %u)
+Image identification: (major: %u, minor: %u)
+Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)
+Image symbol & debug table: (major: %u, minor: %u)
+Import Address Table DirectoryImport Directory [parts of .idata]Internal inconsistency: remaining %u != max %u.
+  Please report this bug.Invalid TARGET2 relocation type '%s'.Invalid bfd targetInvalid operationInvalid section index in ETIRJALX to a non-word-aligned addressLOGICAL_NAMES    Language Processor Name
+Length              = 0x%.8lx (%ld)
+Linker: cannot init ex9 hash table error 
+Linker: error cannot fixed ex9 relocation 
+Load Configuration DirectoryMEMORY_MANAGEMENTMIPS16 and microMIPS functions cannot call each otherMISC             MULTI_PROCESSING Major/Minor 			%d/%d
+Malformed archiveMaximum stack required is 0x%v
+MeP: howto %d has type %dMemory exhaustedModule header
+NETWORKS         NORMALName 				No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsNumber in:
+OPR_ADD (add)
+OPR_AND (logical and)
+OPR_ASH (arithmetic shift)
+OPR_COM (complement)
+OPR_DIV (divide)
+OPR_EOR (logical exclusive or)
+OPR_INSV (insert field)
+OPR_IOR (logical inclusive or)
+OPR_MUL (multiply)
+OPR_NEG (negate)
+OPR_NOP (no-operation)
+OPR_REDEF (define a literal)
+OPR_REDEF (redefine symbol to curr location)
+OPR_ROT (rotate)
+OPR_SEL (select)
+OPR_SUB (substract)
+OPR_USH (unsigned shift)
 Object module NOT error-free !
 Ordinal Base 			%ld
 Output file requires shared library `%s'
 Output file requires shared library `%s.so.%s'
-PASSMECH not fully implementedPTA mismatch: a SHcompact address (bit 0 == 0)PTB mismatch: a SHmedia address (bit 0 == 1)Partition name      = "%s"
+POSIX            PROCESS_SCHED    PRVFXDPRVPICPSC - Program section definition
+PTA mismatch: a SHcompact address (bit 0 == 0)PTB mismatch: a SHmedia address (bit 0 == 1)Partition name      = "%s"
 Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
 Partition[%d] length = 0x%.8lx (%ld)
 Partition[%d] sector = 0x%.8lx (%ld)
 Please report this bug.
-Reading archive file mod timestampReference to the far symbol `%s' using a wrong relocation may result in incorrect executionRegister %%g%d used incompatibly: %s in %s, previously %s in %sRegister section has contents
-ReservedResource Directory [.rsrc]SDA relocation when _SDA_BASE_ not definedSEC_RELOC with no relocs in section %sSection has no contentsSecurity DirectorySize mismatch section %s=%lx, %s=%lxSpecial DirectoryStack overflow (%d) in _bfd_vms_pushStack underflow in _bfd_vms_popSymbol %s not defined for fixups
-Symbol %s replaced by %s
-Symbol `%s' has differing types: %s in %s, previously REGISTER in %sSymbol `%s' has differing types: REGISTER in %s, previously %s in %sSymbol needs debug section which does not existSystem call errorTOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compilingTable Addresses
+RL78/G10 ABI conflict: cannot link G10 and non-G10 objects togetherR_BFIN_FUNCDESC references dynamic symbol with nonzero addendR_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addendR_FRV_TLSMOFFLO not applied to a setlo or setlos instruction
+Reading archive file mod timestampReference to the far symbol `%s' using a wrong relocation may result in incorrect executionRegister %%g%d used incompatibly: %s in %B, previously %s in %BRegister section has contents
+Relocation for non-REL psectRemoving unused section '%s' in file '%B'ReservedResource Directory [.rsrc]S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your codeSDA relocation when _SDA_BASE_ not definedSECURITY         SEC_RELOC with no relocs in section %sSH Error: unknown reloc type %dSHELL            SHRFXDSHRPICSPSC - Shared Image Program section def
+STABLE           STA_CKARG (compare procedure argument)
+STA_GBL (stack global) %.*s
+STA_LI (stack literal)
+STA_LW (stack longword) 0x%08x
+STA_MOD (stack module)
+STA_PQ (stack psect base + offset)
+STA_QW (stack quadword) 0x%08x %08x
+STC_BOH_GBL (store cond BOH at global addr)
+STC_BOH_PS (store cond BOH at psect + offset)
+STC_BSR_GBL (store cond BSR at global addr)
+STC_BSR_PS (store cond BSR at psect + offset)
+STC_GBL (store cond global)
+STC_GCA (store cond code address)
+STC_LDA_GBL (store cond LDA at global addr)
+STC_LDA_PS (store cond LDA at psect + offset)
+STC_LP (store cond linkage pair)
+STC_LP_PSB (store cond linkage pair + signature)
+STC_NBH_GBL (store cond or hint at global addr)
+STC_NBH_PS (store cond or hint at psect + offset)
+STC_NOP_GBL (store cond NOP at global addr)
+STC_NOP_PS (store cond NOP at psect + offset)
+STC_PS (store cond psect + offset)
+STO_AB (store absolute branch)
+STO_B (store byte)
+STO_BR_GBL (store branch global) *todo*
+STO_BR_PS (store branch psect + offset) *todo*
+STO_CA (store code address) %.*s
+STO_GBL (store global) %.*s
+STO_GBL_LW (store global longword) %.*s
+STO_IMM (store immediate) %u bytes
+STO_IMMR (store immediate repeat) %u bytes
+STO_LW (store longword)
+STO_OFF (store LP with procedure signature)
+STO_OFF (store offset to psect)
+STO_QW (store quadword)
+STO_RB (store relative branch)
+STO_W (store word)
+SYM - Global symbol definition
+SYM - Global symbol reference
+SYMG - Universal symbol definition
+SYMM - Global symbol definition with version
+SYMV - Vectored symbol definition
+SYSGEN           Section has no contentsSecurity DirectorySize error in section %sSource Files Header
+Special DirectorySpurious ALPHA_R_BSR relocStack analysis will ignore the call from %s to %s
+Stack overflow (%d) in _bfd_vms_pushStack size for call graph root nodes.
+Stack underflow in _bfd_vms_popStrides:
+Symbol %s not defined for fixups
+Symbol `%s' has differing types: %s in %B, previously REGISTER in %BSymbol `%s' has differing types: REGISTER in %B, previously %s in %BSymbol needs debug section which does not existSystem call errorTLS relocation invalid without dynamic sectionsTOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compilingTable Addresses
 Thread Storage Directory [.tls]Time/Date stamp 		%lx
-Unable to find equivalent output section for symbol '%s' from section '%s'Unexpected STO_SH5_ISA32 on local symbol is not handledUnhandled OSF/1 core file section type %d
-Unhandled relocation %sUnknown basic type %dUnrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVariable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning, .pdata section size (%ld) is not a multiple of %d
-Warning: %s does not support interworking, whereas %s doesWarning: %s supports interworking, whereas %s does notWarning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with itWarning: Clearing the interworking flag of %s due to outside requestWarning: Not setting interworking flag of %s since it has already been specified as non-interworkingWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: alignment %u of symbol `%s' in %s is smaller than %u in %sWarning: fixup count mismatch
-Warning: size of symbol `%s' changed from %lu in %s to %lu in %sWarning: type of symbol `%s' changed from %d to %d in %sWarning: writing archive was slow: rewriting timestamp
-Writing updated armap timestamp[abi=16-bit int, [abi=32-bit int, [whose name is lost]_bfd_vms_output_counted called with too many bytes_bfd_vms_output_counted called with zero bytesbad section index in %sbanked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)bfd_make_section (%s) failedbfd_set_section_flags (%s, %x) failedcan't build branch stub `%s'can't find branch stub `%s'cannot handle R_MEM_INDIRECT reloc when using %s outputcorrupt %s section in %scorrupt or empty %s section in %scould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcpu=HC11]cpu=HC12]cpu=HCS12]error: undefined symbol __rtinitfailed to allocate space for new APUinfo section.failed to compute new APUinfo section.failed to enter %sfailed to install new APUinfo section.generic linker can't handle %signoring reloc %s
-internal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: unknown errorinternal error: unsupported relocation errorip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx).ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch table header corrupt.ip2k relaxer: switch table without complete matching relocation information.linkage table error against `%s'linker stubs in %u groups
+Title Text Header
+Try enabling relaxation to avoid relocation truncationsUSRSTACKUnable to find equivalent output section for symbol '%s' from section '%s'Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.
+Unexpected STO_SH5_ISA32 on local symbol is not handledUnexpected machine numberUnhandled OSF/1 core file section type %d
+Unhandled relocation %sUnknown EGSD subtype %dUnknown basic type %dUnknown reloc %sUnknown reloc %s + %sUnknown symbol in command %sUnrecognized INPUT_SECTION_FLAG %s
+Unrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVOLATILE         Variable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning, .pdata section size (%ld) is not a multiple of %d
+Warning: %B does not support interworking, whereas %B doesWarning: %B is truncated: expected core file size >= %lu, found: %lu.Warning: %B supports interworking, whereas %B does notWarning: %B uses %s (set by %B), %B uses %sWarning: %B uses %s (set by %B), %B uses unknown MSA ABI %dWarning: %B uses %s (set by %B), %B uses unknown floating point ABI %dWarning: %B uses double-precision hard float, %B uses single-precision hard floatWarning: %B uses hard float, %B uses soft floatWarning: %B uses r3/r4 for small structure returns, %B uses memoryWarning: %B uses soft float, %B uses single-precision hard floatWarning: %B uses unknown MSA ABI %d (set by %B), %B uses %sWarning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %dWarning: %B uses unknown floating point ABI %dWarning: %B uses unknown floating point ABI %d (set by %B), %B uses %sWarning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %dWarning: %B uses unknown small structure return convention %dWarning: %B uses unknown vector ABI %dWarning: %B uses vector ABI "%s", %B uses "%s"Warning: %B: Conflicting platform configurationWarning: %B: Unknown EABI object attribute %dWarning: %B: Unknown MSPABI object attribute %dWarning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with itWarning: Clearing the interworking flag of %B due to outside requestWarning: Not setting interworking flag of %B since it has already been specified as non-interworkingWarning: RL78_SYM reloc with an unknown symbolWarning: RX_SYM reloc with an unknown symbolWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %AWarning: alignment %u of symbol `%s' in %B is smaller than %u in %BWarning: fixup count mismatch
+Warning: gc-sections option ignoredWarning: size of symbol `%s' changed from %lu in %B to %lu in %BWarning: type of symbol `%s' changed from %d to %d in %BWarning: writing archive was slow: rewriting timestamp
+Writing updated armap timestampXGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code.[%u]: %u
+[%u]: Lower: %u, upper: %u
+[abi=16-bit int, [abi=32-bit int, [whose name is lost]\%B: Warning: Arm BLX instruction targets Arm function '%s'._bfd_vms_output_counted called with too many bytes_bfd_vms_output_counted called with zero bytesaddressaddress not word alignarsize: %u, a0: 0x%08x
+bad section index in %sbanked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)base: %u, pos: %u
+bfd_mach_o_canonicalize_symtab: unable to load symbolsbfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)bfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid section %d (max %lu): setting to undefinedbfd_mach_o_read_symtab_symbol: symbol "%s" specified invalid type field 0x%x: setting to undefinedbfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lubfd_mach_o_read_symtab_symbols: unable to allocate memory for symbolsbfd_mach_o_scan: unknown architecture 0x%lx/0x%lxbfd_pef_scan: unknown architecture 0x%lxblkbeg: address: 0x%08x, name: %.*s
+blkend: size: 0x%08x
+cannot emit dynamic relocations in read-only sectioncannot emit fixups in read-only sectioncannot find EMH in first GST record
+cannot handle R_MEM_INDIRECT reloc when using %s outputcannot read DMT
+cannot read DMT header
+cannot read DMT psect
+cannot read DST
+cannot read DST header
+cannot read DST symbol
+cannot read EIHA
+cannot read EIHD
+cannot read EIHI
+cannot read EIHS
+cannot read EIHVN header
+cannot read EIHVN version
+cannot read EISD
+cannot read GST
+cannot read GST record
+cannot read GST record header
+cannot read GST record length
+class: %u, dtype: %u, length: %u, pointer: 0x%08x
+corrupt %s section in %Bcould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcould not open shared image '%s' from '%s'cpu=HC11]cpu=HC12]cpu=HCS12]cpu=XGATE]dangerous relocationdelta pc +%-4ddelta_pc_l: +0x%08x
+delta_pc_w %u
+descdimct: %u, aflags: 0x%02x, digits: %u, scale: %u
+discarded output section: `%A'discontiguous range (nbr: %u)
+dynamic relocation in read-only sectiondynamic variable `%s' is zero sizeenumbeg, len: %u, name: %.*s
+enumelt, name: %.*s
+enumend
+epilog: flags: %u, count: %u
+error reading cpu type from elf private dataerror: %B contains a reloc (0x%s) for section %A that references a non-existent global symbolerror: %B does not use Maverick instructions, whereas %B doeserror: %B is already in final BE8 formaterror: %B is compiled as absolute position code, whereas target %B is position independenterror: %B is compiled as position independent code, whereas target %B is absolute positionerror: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%derror: %B is compiled for APCS-%d, whereas target %B uses APCS-%derror: %B is compiled for the EP9312, whereas %B is compiled for XScaleerror: %B passes floats in float registers, whereas %B passes them in integer registerserror: %B passes floats in integer registers, whereas %B passes them in float registerserror: %B requires more array alignment than %B preserveserror: %B requires more stack alignment than %B preserveserror: %B uses %s instructions but %B uses %serror: %B uses FPA instructions, whereas %B does noterror: %B uses Maverick instructions, whereas %B does noterror: %B uses VFP instructions, whereas %B does noterror: %B uses VFP register arguments, %B does noterror: %B uses hardware FP, whereas %B uses software FPerror: %B uses iWMMXt register arguments, %B does noterror: %B uses software FP, whereas %B uses hardware FPerror: %B uses the %s code model whereas %B uses the %s code modelerror: %B uses the %s data model but %B only uses MSP430 instructionserror: %B uses the %s data model whereas %B uses the %s data modelerror: %B uses the large code model but %B uses MSP430 instructionserror: %B uses the small code model but %B uses the %s data modelerror: %B: Conflicting CPU architectures %d/%derror: %B: Conflicting architecture profiles %c/%cerror: %B: Conflicting use of R9error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchainerror: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'error: %B: SB relative addressing conflicts with use of R9error: %B: Unknown CPU architectureerror: %B: size of section %A is not multiple of address sizeerror: %B: unable to merge virtualization attributes with %Berror: Can't find symbol: _SDA_BASE_.error: Source object %B has EABI version %d, but target %B has EABI version %derror: fp16 format mismatch between %B and %Berror: inappropriate relocation type for shared library (did you forget -fpic?)error: required section '%s' not found in the linker scripterror: undefined symbol __rtiniterror: unknown Tag_ABI_array_object_align_expected value in %Berror: unknown Tag_ABI_array_object_alignment value in %Bexecutablefailed to allocate space for new APUinfo section.failed to compute new APUinfo section.failed to install new APUinfo section.fatal error while creating .fixupgeneric linker can't handle %sglobal pointer relative address out of rangeglobal pointer relative relocation at address 0x%08x when _gp not defined
+global pointer relative relocation when _gp not definedhidden symbolignoring reloc %s
+incr_linum(b): +%u
+incr_linum_l: +%u
+incr_linum_w: +%u
+internal error: addend should be zero for R_LM32_16_GOTinternal error: branch/jump to an odd address detectedinternal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: suspicious relocation type used in shared libraryinternal error: unknown errorinternal error: unsupported relocation errorinternal inconsistency in size of .got.loc sectioninternal symbolinvalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or assemble using "-no-expand" (for gcc, "-Wa,-no-expand"invalid input relocation when producing non-ELF, non-mmo format output.
+ Please use the objcopy program to convert from ELF or mmo,
+ or compile using the gcc-option "-mno-base-addresses".invalid relocation addressinvalid relocation type %dinvalid use of %s with contextsip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx).ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx).ip2k relaxer: switch table header corrupt.ip2k relaxer: switch table without complete matching relocation information.line num  (len: %u)
+linkable imagelinker stubs in %u group%s
   branch       %lu
   toc adjust   %lu
   long branch  %lu
   long toc adj %lu
-  plt call     %lumissing IHCONST relocmissing IHIHALF relocnon-zero addend in @fptr relocnot enough GOT space for local GOT entriesnot mapping: data=%lx mapped=%d
+  plt call     %lu
+  plt call toc %luliteralliteral relocation occurs for an external symbolmach-o: there are too many sections (%d) maximum is 255,
+mep: no reloc for code %dmodbeg
+modend
+name: [val: %08lx len %d]: nativenon-contiguous array of %s
+non-dynamic relocations refer to dynamic symbol %snon-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store
+non-zero addend in @fptr relocnot enough GOT space for local GOT entriesnot mapping: data=%lx mapped=%d
 not mapping: env var not set
-obj code %d not foundprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lx:reference to a banked address [%lx:%04lx] in the normal address space at %04lxreloc against unsupported sectionreloc not properly alignedreserved CTL cmd %dreserved OPR cmd %dreserved STA cmd %dreserved STO cmd %dsom_sizeof_headers unimplementedstack-entry-mask not fully implementedstack-from-image not implementedstack-literal not fully implementedstack-local-symbol not fully implementedstack-local-symbol-entry-point-mask not fully implementedstatic procedure (no name)stub entry for %s cannot load .plt, dp offset = %ldstubs don't match calculated sizeunable to read in %s section from %suncertain calling convention for non-COFF symbolunknown gsd/egsd subtype %dunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocation between data/insn address spacesusing multiple gp valuesv850 architecturev850e architecturewarning: %s section has zero sizewarning: %s: local symbol `%s' has no sectionwarning: attempt to export undefined symbol `%s'warning: type and size of dynamic symbol `%s' are not definedwarning: unable to set size of %s section in %swarning: unable to update contents of %s section in %sProject-Id-Version: bfd 2.14rel030712
-POT-Creation-Date: 2003-07-11 13:53+0930
-PO-Revision-Date: 2003-08-14 22:40+0200
-Last-Translator: Christian Rose <menthos@menthos.com>
-Language-Team: Swedish <sv@li.org>
+out of rangeoverflow after relaxationoverlay stub relocation overflowprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lxprivate flags = 0x%lx:prolog: bkpt address 0x%08x
+protected symbolrecbeg: name: %.*s
+recend
+reference to a banked address [%lx:%04lx] in the normal address space at %04lxregrelocation `%s' not yet implementedrelocation out of rangerelocation references symbol not defined in the modulerelocation requires zero addendrelocation should be even numberrelocations between different segments are not supportedreopening %B: %s
+reserved cmd %drtnbeg
+rtnend: size 0x%08x
+septyp, name: %.*s
+set_abs_pc: 0x%08x
+set_line_num(w) %u
+set_line_num_b %u
+set_line_num_l %u
+small-data section exceeds 64KB; lower small-data size limit (see option -G)som_sizeof_headers unimplementedsorry, no support for duplicate object files in auto-overlay script
+sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands.source (len: %u)
+standard data: %s
+static procedure (no name)stub entry for %s cannot load .plt, dp offset = %ldstubs don't match calculated sizesymbolsystem version array information:
+term(b): 0x%02xterm_w: 0x%04xtypspec (len: %u)
+unable to find ARM glue '%s' for '%s'unable to find THUMB glue '%s' for '%s'unable to read in %s section from %Bunable to write unknown load command 0x%lxunaligned bit-string of %s
+uncertain calling convention for non-COFF symbolundefined %s reference in complex symbol: %sunhandled egsd entry type %u
+unhandled emh subtype %u
+unknownunknown ETIR command %dunknown errorunknown header byte-order value 0x%lxunknown line command %dunknown operator '%c' in complex symbolunknown source command %dunknown v850 architectureunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocationunsupported relocation between data/insn address spacesusing multiple gp valuesv850 E3 architecturev850 architecturev850e architecturev850e1 architecturev850e2 architecturev850e2v3 architecturev850e3v5 architecturevflags: 0x%02x, value: 0x%08x vma:			BeginAddress	 EndAddress	  UnwindData
+warning: %B and %B differ in wchar_t sizewarning: %B and %B differ in whether code is compiled for DSBTwarning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may failwarning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may failwarning: %B: local symbol `%s' has no sectionwarning: %s exceeds section size
+warning: %s has a corrupt string table index - ignoringwarning: %s overlaps %s
+warning: %s section has zero sizewarning: .pdata section size (%ld) is not a multiple of %d
+warning: attempt to export undefined symbol `%s'warning: call to non-function symbol %s defined in %Bwarning: generating a shared library containing non-PIC codewarning: generating a shared library containing non-PID codewarning: relocation references a different segmentwarning: section '%s' is being made into a notewarning: section `%A' type changed to PROGBITSwarning: type and size of dynamic symbol `%s' are not definedwarning: unable to set size of %s section in %Bwarning: unable to update contents of %s section in %syou are not allowed to define %s in a scriptProject-Id-Version: bfd-2.24.90
+Report-Msgid-Bugs-To: bug-binutils@gnu.org
+POT-Creation-Date: 2014-02-10 09:42+1030
+PO-Revision-Date: 2016-05-14 04:05+0200
+Last-Translator: Josef Andersson <josef.andersson@fripost.org>
+Language-Team: Swedish <tp-sv@listor.tp-sv.se>
+Language: sv
 MIME-Version: 1.0
-Content-Type: text/plain; charset=iso-8859-1
+Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
-	Exportadresstabell 			Exportadresstabell 		%08lx
-	Namnpekartabell 			Ordningstalstabell 				[Namnpekare/Ordningstal]-tabell	%08lx
-	kodbas %08lx toc (inläsningsbar/verklig) %08lx/%08lx
-	omlokalisering %4d avstånd %4x [%4lx] %s	vma: Tips/Ordn Medlemsnamn Bundet till
+Plural-Forms: nplurals=2; plural=(n != 1);
+X-Generator: Poedit 1.8.7.1
+X-Launchpad-Export-Date: 2016-05-06 19:08+0000
+	    TLS: %A	Exportadresstabell 			Exportadresstabell 		%08lx
+	Namnpekartabell 			Ordningstaltabell 				[Namnpekare/Ordningstal]-tabell	%08lx
+	kodbas %08lx toc (inlÃ¤sningsbar/verklig) %08lx/%08lx
+	ej-TLS: %A	omlokalisering %4d avstÃ¥nd %4x [%4lx] %s	vma:  Tips/Ordn Medlemsnamn Bundet-till
 
 	DLL-namn: %s
 
 
-PE-filbasomlokaliseringar (tolkat innehåll i .reloc-sektionen)
+PE-filbasomlokaliseringar (tolkat innehÃ¥ll i .reloc-sektionen)
 
       Symbol slut+1: %-7ld  Typ:  %s
       Symbol slut+1: %ld
-      Första symbolen: %ld
+      FÃ¶rsta symbolen: %ld
       Lokal symbol: %ld
       Typ: %s
       enum; symbol slut+1: %ld
       struct; symbol slut+1: %ld
       union; symbol slut+1: %ld
+ versionsfÃ¤lt av: %u
+
 Karakteristik 0x%x
 
 Dynamisk sektion:
 
-Exportadresstabell -- Orningsbas %ld
+KÃ¶r hjÃ¤lphuvud
 
-Funktionsidentifierare hittad på startadressen: %04lx
+Exportadresstabell -- Ordningsbas %ld
+
+Funktionsidentifierare hittad pÃ¥ startadressen: %04lx
 
 Ingen reldata-sektion! Funktionsidentifierare avkodades inte.
 
-Start på partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+Start pÃ¥ partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
 
 Programhuvud:
 
-Exporttabellerna (tolkade innehåll i %s-sektion)
+Stackstorlek fÃ¶r funktioner. Annoteringar: â€�*â€� max stack, â€�tâ€� tail-anrop
+
+Exporttabellerna (tolkade innehÃ¥ll i %s-sektion)
+
 
-Funktionstabellen (tolkade innehåll från .pdata-sektionen)
+Funktionstabellen (tolkade innehÃ¥ll frÃ¥n .pdata-sektionen)
 
-Importtabellerna (tolkade innehåll i %s-sektion)
+Importtabellerna (tolkade innehÃ¥ll i %s-sektion)
 
-Det finns en första thunk, men sektionen som innehåller den kunde inte hittas
+Det finns en fÃ¶rsta thunk, men sektionen som innehÃ¥ller den kunde inte hittas
 
 Det finns en exporttabell i %s vid 0x%lx
 
-Det finns en exporttabell, men sektionen som innehåller den kunde inte hittas
+Det finns en exporttabell i %s, men den passar inte i den sektionen
 
-Det finns en importtabell i %s på 0x%lx
+Det finns en exporttabell, men sektionen som innehÃ¥ller den kunde inte hittas
 
-Det finns en importtabell, men sektionen som innehåller den kunde inte hittas
+Det finns en importtabell i %s pÃ¥ 0x%lx
+
+Det finns en importtabell, men sektionen som innehÃ¥ller den kunde inte hittas
 
 Versionsreferenser:
 
 Versionsdefinitioner:
 
-Virtuell adress: %08lx Områdesstorlek %ld (0x%lx) Antal fixar %ld
+Virtuell adress: %08lx OmrÃ¥desstorlek %ld (0x%lx) Antal fixar %ld
+
+VARNING: Extra data i .rsrc-sektionen - det kommer att ignoreras av Windows:
 
 [Ordningstals-/Namnpekar-]tabell
 
 ppcboot-huvud:
-  överväg omlänkning med --support-old-code aktiverat  första förekomst: %s: arm-anrop till thumb  första förekomst: %s: thumb-anrop till arm  krävs från %s:
- <EABI-version känns inte igen> Klisterkodsekvens Registeråterställ millikod Registerspara millikod [32-bitarsläge] [FPA-flyttalsformat] [Maverick-flyttalsformat] [VFP-flyttalsformat] [Version1 EABI] [Version2 EABI] [okänt abi] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolut position] [cpu32] [d-flyttal] [dynamiska symboler använder segmentindex] [flyttal skickade i flyttalsregister] [flyttal skickade i heltalsregister] [g-flyttal] [har startpunkt] [samverkande är aktiverat] [samverkandeflagga är inte initierad] [samverkan stöds inte] [samverkan stöds] [m68000] [mappsymboler har företräde före andra] [mdmx] [memory=bank-modell] [memory=platt] [mips16] [mips1] [mips2] [mips32] [mips32r2] [mips3] [mips4] [mips5] [mips64] [nytt ABI] [inget abi inställt] [icke-pic] [inte 32-bitarsläge] [gammalt ABI] [positionsoberoende] [omlokaliseringsbar körbar fil] [programvaru-FP] [sorterad symboltabell] [symboler har ett _-prefix] [okänd ISA] [osorterad symboltabell] vma:			Startadress      Slutadress       Ospola information
+        pc: 0x%08x
+    *ohanterat* kmd %u
+    adress: 0x%08x, storlek: %u
+    flaggor: %u, adress: 0x%08x, pd-adress: 0x%08x
+    globalt namn: %.*s
+    lÃ¤nkningsindex: %u, ersÃ¤ttning insn: 0x%08x
+    namn: %.*s
+    pc: 0x%08x
+    pc: 0x%08x rad: %5u
+    psect-idx 1: %u, offset 1: 0x%08x %08x
+    psect-idx 2: %u, offset 2: 0x%08x %08x
+    psect-idx 3: %u, offset 3: 0x%08x %08x
+    psect: %u, fÃ¶rskjutning: 0x%08x %08x
+    rutinnamn: %.*s
+   %02u    %s%s %s
+   (typ: %3u, stl: 4+%3u):    *ohanterat* kmd %u
+   rÃ¤ttning  : 2**%u
+   allok (len)   : %u (0x%08x)
+   allok (len): %u (0x%08x)
+   ascii-ident   : %.*s
+   binÃ¤rident   : 0x%08x
+   bitmap: 0x%08x (antal: %u):
+   kodadress: 0x%08x
+   kompileringsdatum:  %.17s
+   kompilator  : %.*s
+   slutfÃ¶randekod: %u
+   upphovsrÃ¤tt: %.*s
+   dklfil: len: %u, flaggor: %u, fil-ID: %u
+   deflines %u
+   postnamn   : %.*s
+   startpunkt: 0x%08x
+   felgrad :%x
+   fil: %.*s
+   filnamn   : %.*s
+   flaggor        : 0x%08x   flaggor      : 0x%04x   flaggor: %d, sprÃ¥k: %u, stÃ¶rre: %u, mindre: %u
+   flaggor: 0x%04x   formfeed
+   id-match      : %x
+   avbildsfÃ¶rskjutning   : 0x%08x
+   sprÃ¥knamn: %.*s
+   lÃ¤nkindex: %u, globalt: %.*s
+   lÃ¤nkindex: %u, procedurnamn: %.*s
+   lÃ¤nkindex: %u, procedur: %.*s
+   lÃ¤nkindex: %u, psect: %u, fÃ¶rskjutning: 0x%08x %08x
+   max poststorlek: %u
+   modulnamn     : %.*s
+   modulnamn: %.*s
+   modulversion: %.*s
+   namn          : %.*s
+   namn        : %.*s
+   namn       : %.*s
+   antal cond-lÃ¤nkningspar: %u
+   objektnamn   : %.*s
+   fÃ¶rskjutning: 0x%08x, val: 0x%08x
+   proc-beskr : 0x%08x
+   psect-index: %u
+   psect-index fÃ¶r startpunkt: %u
+   psect-index: %u
+   psect-offset: %u
+   psect-fÃ¶rskjutning: 0x%08x
+   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u
+   setfile %u
+   setlnum %u
+   setrec %u
+   signatur: %.*s
+   strukturnivÃ¥: %u
+   symbolvektor-offset : 0x%08x
+   symvec-fÃ¶rskjutning: 0x%08x
+   titel: %.*s
+   Ã¶verfÃ¶r addr-flaggor: 0x%02x
+   Ã¶verfÃ¶r addr psect: %u
+   Ã¶verfÃ¶r adress  : 0x%08x
+   vektor      : 0x%08x
+   versionsmask: 0x%08x
+  %s (len=%u+%u):
+  %s: 0x%v
+  %u: storlek: %u, flaggor: 0x%02x, namn: %.*s
+  EEOM (len=%u):
+  EGSD (len=%u):
+  EGSD-post %2u (typ: %u, len: %u):   EMH %u (len=%u):   bas: 0x%08x %08x, storlek: 0x%08x, prot: 0x%08x   base_va : 0x%08x
+  bitantal: %u, basadress: 0x%08x
+  anrop:
+  chgprtoff : %5u
+  codeadroff: %5u, lpfixoff  : %5u
+  fixuplnk: 0x%08x %08x
+  flaggor: 0x%08x
+  iaflÃ¤nk : 0x%08x %08x
+  avbild %u (%u poster)
+  avbild %u (%u poster), fÃ¶rskjutningar:
+  lppsbfixoff: %5u
+  psect start: 0x%08x, lÃ¤ngd: %u
+  qdotadroff: %5u, ldotadroff: %5u
+  qrelfixoff: %5u, lrelfixoff: %5u
+  krÃ¤vs frÃ¥n %s:
+  shlextra  : %5u, permctx   : %5u
+  shlstoff  : %5u, shrimgcnt : %5u
+  storlek : %u
+ %08x 0x%08x 64B <EABI-version kÃ¤nns inte igen> BPAGE: %u COM KOMM Ã„ndringsskydd (%u poster):
+ Kodadressreferens-fixar:
+ DEF EXE FÃ¶rsta adress : 0x%08x 0x%08x
+ FjÃ¤rde adress : 0x%08x 0x%08x
+ GBL Klisterkodsekvens LIB LÃ¤nkning Par Referens Fixar:
+ NOMOD NORM OVR PIC QVAL LÃ„S REL RegisterÃ¥terstÃ¤ll millikod Registerspara millikod SHR Andra adress : 0x%08x 0x%08x
+ Avbilder som kan delas:
+ Delad avbild  : 0x%08x 0x%08x
+ Tabell: Char: %d, Tid: %08lx, Ver: %d/%d, Num namn: %d, IDs: %d
+ Tredje adress : 0x%08x 0x%08x
+ UNI VEK VECEP SVAG SKR [BE8] [FPA-flyttalsformat] [G10] [LE8] [Maverick-flyttalsformat] [VFP-flyttalsformat] [Version1 EABI] [Version2 EABI] [Version3 EABI] [Version4 EABI] [Version5 EABI] [XGATE RAM-fÃ¶rskjutning] [okÃ¤nt abi] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [abiv%ld] [absolut position] [d-flyttal] [dynamiska symboler anvÃ¤nder segmentindex] [fix dep] [flyttal skickade i flyttalsregister] [flyttal skickade i heltalsregister] [g-flyttal] [hÃ¥rt-flyttal ABI] [har startpunkt] [samverkande Ã¤r aktiverat] [samverkandeflagga Ã¤r inte initierad] [samverkan stÃ¶ds inte] [samverkan stÃ¶ds] [mappsymboler har fÃ¶retrÃ¤de fÃ¶re andra] [minne=bank-modell] [minne=platt] [nytt ABI] [inget abi instÃ¤llt] [icke-pic] [inte 32-bitarslÃ¤ge] [gammalt ABI] [pic] [positionsoberoende] [omlokaliseringsbar kÃ¶rbar fil] [mjuk-flyttal ABI] [programvaru-FP] [sorterad symboltabell] [symboler har ett _-prefix] [okÃ¤nd ISA] [osorterad symboltabell] [v10 och v32] [v32] fÃ¶rdÃ¤rvad GST
+ FelsÃ¶kningsmodultabell: vbn: %u, storlek: %u
+ FelsÃ¶kningssymboltabell: vbn: %u, storlek: %u (0x%x)
+ fixup info rva:  flaggor: 0x%04x Global symboltabell: vbn: %u, poster: %u
+ ident: 0x%08x, namn: %.*s
+ ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u
+ avbildsbyggident: %.*s
+ avbildsident       : %.*s
+ avbildens namn      : %.*s
+ avbildtyp: %u (%s) img I/O-antal: %u, nbr-kanaler: %u, req pri: %08x%08x
+ lÃ¤nkningstid        : %s
+ lÃ¤nkarflaggor: %08x: lÃ¤nkarident     : %.*s
+ lÃ¥ngord .address-referensfixar:
+ lÃ¥ngord omlokaliseringsfixar:
+ majorid: %u, minorid: %u
+ moduloffset: 0x%08x, storlek: 0x%08x, (%u psects)
+ fÃ¶rskjutningar: isd: %u, aktiv: %u, symdbg: %u, imgid: %u, patch: %u
+ quad-ord .address-referensfixar:
+ quad-ord omlokaliseringsfixar:
+ sektion: bas: 0x%08x%08x storlek: 0x%08x
+ typ: %3u, len: %3u (vid 0x%08x):  ohanterad EOBJ-posttyp %u
+ vbn: %u, pfc: %u, matchctl: %u type: %u ( vma:			Startadress      Slutadress       Ospola information
  vma:		Start-   Slut-    EH-       EH-    Prologsluts- Undantags-
      		adress   adress   hanterare data   adress       mask
- vma:            Tips-   Tids-     Framåt-  DLL-      Första
-                 tabell  stämpel   kedja    namn      thunk
-#<Ogiltig felkod>%T: bortkastade i sektionen "%s" från %s
-%s (%s): Sektionsflaggan %s (0x%x) ignorerades%s(%s): omlokalisering %d har ogiltigt symbolindex %ld%s(%s): varning: samverkande är inte aktiverat.%s(%s+0x%lx): %s-omlokalisering mot "%s": fel %d%s(%s+0x%lx): %s-omlokalisering mot lokal symbol%s(%s+0x%lx): %s omlokalisering mot SEC_MERGE-sektion%s(%s+0x%lx): Stabbpost har ogiltigt strängindex.%s(%s+0x%lx): flera automatiska TOC stöds inte vid användning av dina crt-filer; kompilera om med -mminimal-toc eller uppgradera gcc%s(%s+0x%lx): kan inte hantera %s för %s%s(%s+0x%lx): kan inte nå %s, kompilera om med -ffunction-sections%s(%s+0x%lx): fixar %s%s(%s+0x%lx): ogiltig instruktion för TLS-omlokalisering %s%s(%s+0x%lx): icke-tomt addendum på %s-omlokalisering mot "%s"%s(%s+0x%lx): omlokalisering mot "%s": fel %d%s(%s+0x%lx): syskonanropsoptimering till "%s" stöder inte flera automatiska TOC; kompilera om med -mminimal-toc eller -fno-optimize-sibling-calls, eller gör "%s" extern%s(%s+0x%lx): olöslig %s-omlokalisering mot symbolen "%s"%s(%s+0x%lx): olöslig omlokalisering mot symbolen "%s"%s, sektion %s:
-  omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med -fPIC%s: !samegp-omlokalisering mot symbol utan .prologue: %s%s: %s-symbolen "%s" i %s refereras till av DSO%s: %s-symbolen "%s" är inte definierad%s: "%s" anropad både som lokal normal symbol och lokal trådsymbol%s: %s+0x%lx: hoppa till stubbrutin som inte är jal%s: %s: ogiltig krävd version %d%s: %s: ogiltig version %u (max %d)%s: %s: omlokalisering ger överspill: 0x%lx > 0xffff%s: .got-subsegment överskrider 64 kB (storlek %d)%s: .opd är inte en vanlig vektor med opd-poster%s: .preinit_array-sektionen är inte tillåten i DSO%s: 0x%lx: ödesdigert: omlokalisering ger överspill vid förenklingen%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för förenklingsstöd%s: 0x%lx: varning: R_SH_USES pekar till okänd instruktion 0x%x%s: 0x%lx: varning: felaktigt R_SH_USES-inläsningsavstånd%s: 0x%lx: varning: felaktigt R_SH_USES-avstånd%s: 0x%lx: varning: felaktigt antal%s: 0x%lx: varning: kunde inte hitta förväntad COUNT-omlokalisering%s: 0x%lx: varning: kunde inte hitta förväntad omlokalisering%s: 0x%lx: varning: symbol i oväntad sektion%s: @gprel-omlokalisering mot dynamiska symbolen %s%s: @internal-gren till dynamiska symbolen %s%s: @pcrel-omlokalisering mot dynamiska symbolen %s%s: ABI är inkompatibelt med den för den valda emuleringen%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler%s: Arkitekturen passar inte ihop med tidigare moduler%s: Felaktig omlokaliseringstyp importerad: %d%s: Felaktig symboldefinition: "Main" är inställd till %s istället för startadressen %s
-%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol%s: Fel: flera definitioner av "%s"; början på %s är inställd i en tidigare länkad fil
-%s: GAS-fel: oväntad PTB-instruktion med R_SH_PT_16%s: Instruktionsuppsättning passar inte med tidigare moduler%s: Intern inkkonsistensfel för värdet för
- länkarallokerat globalt register: länkat: 0x%lx%08lx != avslappnat: 0x%lx%08lx
-%s: Intern inkonsistens; ingen omlokaliseringssektion %s%s: Ogiltig omlokaliseringstyp exporterad: %d%s: Ogiltig omlokaliseringstyp importerad: %d%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första globala registret är $%ld.%s: Felaktig omlokalisering för sektion %s upptäckt%s: Varken någon PLT eller GOT för omlokalisering %s  mot symbolen "%s" från sektionen %s%s: Ingen kärna för att allokera en %d byte lång symbol
-%s: Ingen kärna för att allokera sektionsnamn %s
-%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver %u)%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N%s: Endast register %%g[2367] kan deklareras med STT_REGISTER%s: Känd men ohanterad maskintyp (0x%x) i Import Library Format-arkiv%s: Omlokalisering %s (%d) stöds för närvarande inte.
-%s: Omlokalisering i allmän ELF (EM: %d)%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt%s: TOC-omlokalisering vid 0x%x till symbolen "%s" utan någon TOC-post%s: Målet (%s) för en %s-omlokalisering är i fel sektion (%s)%s: Ohanterad importtyp; %x%s: Okänd omlokaliseringstyp %d
-%s: Okänd sektionstyp i a.out.adobe-fil: %x
-%s: Okänd importnamnstyp; %x%s: Okänd importtyp; %x%s: Okänd maskintyp (0x%x) i Import Library Format-arkiv%s: Okänd lagringsklass %d för %s-symbolen "%s"%s: Varning: Arm BLX-instruktion använder Arm-funktionen "%s" som mål.%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen "%s" som mål.%s: XCOFF delade objekt när inte XCOFF-utdata produceras%s: XMC_TC0-symbolen "%s" är klass %d scnlen %d%s: __gp täcker inte kort datasegment%s: "%s" anropad både som lokal normal symbol och lokal trådsymbol%s: "%s" har radnummer men ingen inneslutande sektion%s: "%s" i inläsaromlokalisering men inte inläsarsym%s: "ld -r" stöds inte med PE MIPS-objekt
-%s: åtkomst bortom slut på sammanslagen sektion (%ld + %ld)%s: adressen 0x%s är utanför intervallet för hexadecimal Intel-fil%s: felaktig XTY_ER-symbol "%s": klass %d scnum %d scnlen %d%s: felaktigt par/reflo efter refhi
-%s: felaktig omlokaliseringsadress 0x%lx i sektionen "%s"%s: felaktig omlokaliseringssektionsnamn "%s"%s: felaktig sektionslängd i ihex_read_sektion%s: felaktig strängtabellstorlek %lu%s: felaktigt symbolindex: %d%s: bas-plus-avståndsomlokalisering mot registersymbol: %s i %s%s: bas-plus-avståndsomlokalisering mot registersymbol: (okänd) i %s%s: kan inte representera sektionen "%s" i a.out-objektfilformat%s: kan inte representera sektionen "%s" i oasys%s: kan inte representera sektion för symbolen "%s" i a.out-objektfilformat%s: kan inte allokera filnamn för fil nummer %d, %d byte
-%s: kan inte skapa stubbstarten %s%s: ändring i gp: BRSGP %s%s: check_relocs: ohanterad omlokaliseringstyp %d%s: klass %d-symbolen "%s" har inga yttre poster%s: kompilerat som 32-bitarsobjekt och %s är 64-bitars%s: kompilerat som 64-bitarsobjekt och %s är 32-bitars%s: kompilerat för ett 64-bitarssystem och målet är 32-bitars%s: kompilerad för big endian-system och målet är little endian%s: kompilerad för ett little endian-system och målet är big endian%s: kompilerad normalt och länkad med moduler som kompilerats med -mrelocatable%s: kompilerad med %s och länkad med moduler som kompilerats med %s%s: kompilerad med %s och länkad med moduler som använder icke-pic-omlokalisering%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats normalt%s: kunde inte hitta utdatasektionen %s%s: kunde inte hitta utdatasektionen %s för indatasektionen %s%s: kunde inte skriva ut tillagda .cranges-poster%s: kunde inte skriva ut sorterade cranges-poster%s: csect "%s" är inte i inneslutande sektion%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde%s: dtp-relativ omlokalisering mot dynamiska symbolen %s%s: dubbel exportstubb %s%s: dynamiskt objekt utan någon .loader-sektion%s: påträffade dataetikettssymbol i indata%s: endianness inkompatibel med den för den valda emuleringen%s: fel: omlokaliseringen %s är inte en multipel av %d%s: fel: ojusterad omlokaliseringstyp %d på %08x omlokalisering %08x
-%s: gp-relativ omlokalisering mot dynamiska symbolen %s%s: otillåten omlokaliseringstyp %d på adress 0x%lx%s: ogiltigt sektionsnamn "%s"%s: otillåtet symbolindex i omlokalisering: %d%s: indirekt symbol "%s" till "%s" är en slinga%s: internt fel i ihex_read_section%s: internt fel, interna registersektionen %s hade innehåll
-%s: internt fel, symboltabellen ändrade storlek från %d till %d ord
-%s: ogiltig SHT_GROUP-post%s: ogiltig länk %lu för omlokaliseringssektion %s (index %u)%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till den föregående lop_stab (%ld)
-%s: ogiltig mmo-fil: förväntade YZ = 1 fick YZ = %d för lop_quote
-%s: ogiltig mmo-fil: förväntade y = 0, fick y = %d för lop_fixrx
-%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo
-%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc
-%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för lop_fixr
-%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d
-%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning
-%s: ogiltig mmo-fil: fil nummer %d "%s", var redan angiven som "%s"
-%s: ogiltig mmo-fil: initieringsvärde för $255 är inte "Main"
-%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %d för lop_fixrx
-%s: ogiltig mmo-fil: lop_end är inte sista objektet i fil
-%s: ogiltig mmo-fil: lopkod "%d" stöds inte
-%s: ogiltig omlokaliseringstyp %d%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx
-%s: ogiltigt strängavstånd %u >= %lu för sektionen "%s"%s: ogiltig symboltabell: dublettsymbol "%s"
-%s: hopp för långt bort
-%s: radnummer ger överspill: 0x%lx > 0xffff%s: länkar %s-modul med tidigare %s-moduler%s: länkar 32-bitarskod med 64-bitarskod%s: länkar 64-bitarsfiler med 32-bitarsfiler%s: länkar UltraSPARC-specifik med HAL-specifik kod%s: länkar auto-pic-filer med icke-auto-pic-filer%s: länkar big endian-filer med little endian-filer%s: länkar konstant-gp-filer med icke-konstant-gp-filer%s: länkar filer kompilerade för 16-bitars heltal (-mshort) och andra för 32-bitars heltal%s: länkar filer kompilerade för 32-bitars dubbelprecisionsflyttal (-fshort-double) och andra för 64-bitars dubbelprecisionsflyttal%s: länkar filer kompilerade för HCS12 med andra kompilerade för HC12%s: länkar little endian-filer med big endian-filer%s: länkar icke-pic-kod i en positionsoberoende körbar fil%s: länkar icke-pic-kod i delat bibliotek%s: länkar fånga-vid-NULL-dereferens med ickefångande filer%s: inläsaromlokalisering i skrivskyddade sektionen %s%s: inläsaromlokalisering i okända sektionen "%s"%s: felaktigt placerat XTY_LD "%s"%s: ingen gruppinformation för sektionen %s%s: inga initierade register; sektionslängd 0
-%s: ingen sådan symbol%s: ingen symbol "%s"%s: inte helt implementerat%s: inte implementerad%s: stöds inte%s: objektstorleken stämmer inte överens med den hos målet %s%s: pc-relativ omlokalisering mot dynamiska symbolen %s%s: troligen kompilerad utan -fPIC?%s: registeromlokalisering mot icke-registersymbol: %s i %s%s: registeromlokalisering mot icke-registersymbol: (okänd) i %s%s: omlokaliseringen %s:%d är inte i csect%s: omlokalisering ger överspill 1: 0x%lx > 0xffff%s: omlokaliseringsbar länk från %s till %s stöds inte%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; kompilera om med -fPIC%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas%s: omlokalisering %s i sektionen %s utan GOT skapad%s: omlokaliseringen %s är inte tillåten för global symbol: "%s" från sektionen %s%s: omlokaliseringen %s stöds inte för symbolen %s.%s: omlokaliseringen %s stöds inte än för symbolen %s.%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; kompilera om med -fPIC%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från sektionen %s%s: omlokalisering %s med icke-tomt addendum %d mot symbolen "%s" från sektionen %s%s: omlokaliseringsstorleken stämmer inte överens i %s, sektion %s%s: omlokaliseringar i sektionen "%s", men den har inget innehåll%s: kort datasegment spillde över (0x%lx >= 0x400000)%s: storleksfältet är noll i Import Library Format-huvud%s: spekulationsfix till dynamiska symbolen %s%s: sträng inte nollterminerad i ILF-objektfil.%s: strängen är för lång (%d tecken, max 65535)%s: symbolen "%s" har okänd csect-typ %d%s: symbolen "%s" har okänd smclas %d%s: symbolen "%s" krävs men finns inte med%s: målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)%s: för många initierade register; sektionslängd %ld
-%s: tp-relativ omlokalisering mot dynamiska symbolen %s%s: kunde inte hitta ARM-klistret "%s" till "%s"%s: kunde inte hitta THUMB-klistret "%s" till "%s"%s: odefinierad symbol "%s" i .opd-sektion%s: odefinierad version: %s%s: odefinierat symbolnamn med version %s%s: oväntad ATN-typ %d i extern del%s: oväntad omlokaliseringstyp %u i .opd-sektion%s: oväntad typ efter ATN%s: ohanterad dynamisk omlokalisering mot %s%s: oimplementerat %s
-%s: inte implementerad ATI-post %u för symbolen %u%s: okänd omlokaliseringstyp %d%s: okänd omlokaliseringstyp %d för symbolen %s%s: okänd symbol "%s" flaggor 0x%x%s: olöslig omlokalisering %s mot symbolen "%s" från sektionen %s%s: olöslig omlokalisering mot symbolen "%s" från sektionen %s%s: omlokaliseringstypen %s stöds inte%s: omlokaliseringstypen 0x%02x stöds inte%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som börjar med "%s"
-%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)%s: använder andra okända e_flags-fält (0x%lx) än tidigare moduler (0x%lx)%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix%s: versionsantal (%ld) stämmer inte med symbolantal (%ld)%s: varning: %s-omlokalisering mot symbolen "%s" från sektionen %s%s: varning: %s-omlokalisering till 0x%x från sektionen %s%s: varning: %s: radnummer ger överspill: 0x%lx > 0xffff%s: varning: Tomt inläsningsbart segment upptäckt, är detta meningen?
-%s: varning: GOT-addendum %ld till "%s" stämmer inte överens med tidigare GOT-addendum %ld%s: varning: PLT-addendum %d till "%s" från sektionen %s ignorerades%s: varning: allokerad sektion "%s" inte i segment%s: varning: dubbel radnummersinformation för "%s"%s: varning: otillåtet symbolindex %ld i radnummer%s: varning: otillåtet symbolindex %ld i omlokaliseringarna%s: varning: länkar PIC-filer med icke-PIC-filer%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars ord: %d. Endast "Main" kommer att skickas.
-%s: varning: oväntad omdefinition av indirekt versionsangiven symbol "%s"%s: varning: olöslig omlokalisering %d mot symbolen "%s" från sektionen %s%s: varning: olöslig omlokalisering mot symbolen "%s" från sektionen %s%s:%d: Oväntat tecken "%s" i S-postfil
-%s:%d: oväntat tecken "%s" i hexadecimal Intel-fil
-%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, hittade %u)%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-fil%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal Intel-fil%s:%u: felaktig längd på utökad startadress i hexadecimal Intel-fil%s:%u: okänd ihex-typ %u i hexadecimal Intel-fil
-*okänd*.glink och .plt för långt ifrån varandra.got-sektionen följer inte omedelbart efter .plt-sektion32-bitars dubbelprecisionsflyttal, 32-bitars gp-relativ omlokalisering förekom för en extern symbol64-bitars dubbelprecisionsflyttal, : m32r-instruktioner: m32rx-instruktioner<Okända flaggbitar satta><okänd>@pltoff-omlokalisering mot lokal symbolArkivet har inget index; kör ranlib för att lägga till ettArkivobjektfil är i fel formatFörsök att göra en omlokaliseringsbar länk med %s-indata och %s-utdataBFD %s-försäkran misslyckades %s:%dInternt BFD %s-fel, avbryter vid %s rad %d
+ vma:		BÃ¶rja    Prolog   Funktionsflaggor  Undantag  EH
+     		Adress   LÃ¤ngd    LÃ¤ngd    32b exc  Handler   Data
+ vma:            Tips-   Tids-     FramÃ¥t-  DLL-      FÃ¶rsta
+                 tabell  stÃ¤mpel   kedja    namn      thunk
+#<Ogiltig felkod>%*.s  LÃ¶v: Adr: %#08lx, Storlek: %#08lx, Kodsida: %d
+%*.s Post: %A har bÃ¥de sorterade [â€�%Aâ€� i %B] och osorterade [â€�%Aâ€� i %B] sektioner%A har bÃ¥de sorterade och osorterade sektioner%A: 0x%v lrlive .brinfo (%u) skiljer sig frÃ¥n analys (%u)
+%A:0x%v hittades inte i funktionstabellen
+%B (%s): sektionsflaggan %s (0x%x) ignoreras%B och %B Ã¤r fÃ¶r olika konfigurationer%B och %B Ã¤r fÃ¶r olika kÃ¤rnor%B innehÃ¥ller CRIS v32-kod, inkompatibelt med fÃ¶regÃ¥ende objekt%B innehÃ¥ller icke-CRIS v32-kod, inkompatibelt med fÃ¶regÃ¥ende objekt%B har bÃ¥de aktuella och fÃ¶rÃ¥ldrade Tag_MPextension_use-attribut%B har inte tillstÃ¥nd att definiera %s%B-sektion %A Ã¶verstiger stubbgruppstorleken%B symbol nummer %lu refererar icke existerande SHT_SYMTAB_SHNDX sektion%B anvÃ¤nder okÃ¤nd e_flags 0x%lx%B(%A): fel: anrop till odefinierad funktion â€�%sâ€�%B(%A): internt fel: riskabel omlokalisering%B(%A): internt fel: utanfÃ¶r intervall%B(%A): internt fel: okÃ¤nt fel%B(%A): internt fel: omlokalisering saknar stÃ¶d%B(%A): ogiltig egenskapstabell%B(%A): osÃ¤ker PID-omlokalisering %s vid 0x%08lx (mot %s i %s)%B(%A): varning: relax Ã¤r undertryckt fÃ¶r sektioner med justering %d-byte > 4-byte.%B(%A): varning: ojusterad Ã¥tkomst till symbol â€�%sâ€� i mindre dataomrÃ¥det%B(%A): varning: ojusterad mindre dataÃ¥tkomst fÃ¶r typen %d.%B(%A+0x%%B(%A+0x%lx): %s-fixup fÃ¶r insn 0x%x saknar stÃ¶d i en icke-delad lÃ¤nk%B(%A+0x%lx): %s-omlokalisering mot SEC_MERGE-sektion%B(%A+0x%lx): %s-omlokalisering mot extern symbol â€�%sâ€�%B(%A+0x%lx): %s anvÃ¤nds med TLS-symbolen %s%B(%A+0x%lx): %s anvÃ¤nds med icke-TLS-symbolen %s%B(%A+0x%lx): Enbart ADD- eller SUB-instruktioner tillÃ¥ts fÃ¶r ALU-gruppsomlokaliseringar%B(%A+0x%lx): Ã–verflÃ¶de vid delning av 0x%lx fÃ¶r gruppomlokalisering %s%B(%A+0x%lx): omlokalisering R_68K_TLS_LE32 tillÃ¥ts inte i ett delat objekt%B(%A+0x%lx): R_ARM_TLS_LE32-omlokalisering tillÃ¥ts inte i delat objekt%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC-omlokalisering inte tillÃ¥tet i delat objekt%B(%A+0x%lx): R_NIOS2_TLS_LE16-omlokalisering inte tillÃ¥tet i ett delat objekt%B(%A+0x%lx): Stabs-post har ogiltigt strÃ¤ngindex.%B(%A+0x%lx): kan inte skicka fix till â€�%sâ€� i en skrivskyddad sektion%B(%A+0x%lx): kan inte hantera %s fÃ¶r %s%B(%A+0x%lx): kan inte nÃ¥ %s, kompilera om med -ffunction-sections%B(%A+0x%lx): kunde inte avkoda instruktion fÃ¶r XTENSA_ASM_SIMPLIFY-omlokalisering; kanske stÃ¤mmer instÃ¤llningarna inte Ã¶verens%B(%A+0x%lx): kunde inte avkoda instruktion; kanske stÃ¤mmer instÃ¤llningarna inte Ã¶verens%B(%A+0x%lx): ogiltig instruktion fÃ¶r TLS-omlokalisering %s%B(%A+0x%lx): omlokalisering mot â€�%sâ€�: fel %d%B(%A+0x%lx): omlokaliseringsfÃ¶rskjutning utanfÃ¶r intervall (storlek=0x%x)%B(%A+0x%lx): ovÃ¤ntad fix fÃ¶r %s-omlokalisering%B(%A+0x%lx): olÃ¶slig omplacering av %s mot symbol â€�%sâ€�%B(%A+0x%lx): olÃ¶slig omlokalisering mot symbol â€�%sâ€�%B(%A+0x%lx): ovÃ¤ntad ARM-instruktion â€�0x%xâ€� i TLS-trampolin%B(%A+0x%lx): ovÃ¤ntad ARM-instruktion â€�0x%xâ€� hÃ¤nvisad till av TLS_GOTDESC%B(%A+0x%lx): ovÃ¤ntad Thumb-instruktion â€�0x%xâ€� i TLS-trampolin%B(%A+0x%lx): ovÃ¤ntad Thumb-instruktion â€�0x%xâ€� hÃ¤nvisad till av TLS_GOTDESC%B(%A+0x%v): anrop till icke-kodsektion %B(%A), analys inte slutfÃ¶rd
+%B(%s): varning: samverkan inte aktiverat.
+  fÃ¶rsta fÃ¶rekomst: %B: ARM-anrop till Thumb%B(%s): varning: samverkan inte aktiverat.
+  fÃ¶rsta fÃ¶rekomst: %B: Thumb-anrop till ARM%B(%s): varning: vÃ¤xelverkning inte aktiverat.
+  fÃ¶rsta anvÃ¤ndning: %B: arm-anrop till thumb%B(%s): varning: vÃ¤xelverkning inte aktiverat.
+  fÃ¶rsta anvÃ¤ndning: %B: thumb-anrop till arm
+  prova att lÃ¤nka om med --support-old-code aktiverad%B(%s+0x%lx): olÃ¶slig %s-omlokalisering mot symbol â€�%sâ€�%B, sektion %A:
+  omlokalisering %s ogiltig i ett delat objekt; i regel en flaggmiss, kompilera om med -fPIC%B, sektion %A:
+  omlokalisering %s bÃ¶r inte anvÃ¤ndas i ett delat objekt; kompilera om med -fPIC%B, sektion %A:
+  v10/v32-kompatibelt objekt %s fÃ¥r inte innehÃ¥lla en PIC-omlokalisering%B, sektion %A: Ingen PLT fÃ¶r omlokalisering %s mot symbol â€�%sâ€�%B, sektion %A: Varken PLT eller GOT fÃ¶r omlokalisering %s mot symbol â€�%sâ€�%B, sektion %A: omlokalisering %s har en odefinierad referens till â€�%sâ€�, kanske en deklarationsblunder?%B, sektion %A: omlokalisering %s tillÃ¥ts inte fÃ¶r global symbol: â€�%sâ€�%B, sektion %A: omlokalisering %s tillÃ¥ts inte fÃ¶r symbol: â€�%sâ€� som definieras utanfÃ¶r programmet, kanske en deklarationsblunder?%B, sektion %A: omlokalisering %s utan GOT skapades%B, sektion %A: omlokalisering %s med addend %d som inte Ã¤r noll mot lokal symbol%B, sektion %A: omlokalisering %s med addend %d som inte Ã¤r noll mot symbol â€�%sâ€�%B, sektion %A: olÃ¤slig omlokalisering %s mot symbol â€�%sâ€�%B, sektion â€�%Aâ€�, till symbol â€�%sâ€�:
+  omlokalisering %s bÃ¶r inte anvÃ¤ndas i ett delat objekt; kompilera om med -fPIC%B: !samegp-omlokalisering mot symbol utan .prologue: %s%B: %A+0x%lx: StÃ¶der inte hopp mellan ISA-lÃ¤gen; Ã¶vervÃ¤g omkompilering med korslÃ¤nkning aktiverat.%B: %s
+%B: %s inte absolut%B: %s' hade Ã¥tkomst bÃ¥de som normal och trÃ¥dlokal symbol%B: %s: ogiltigt versionskrav %d%B: %s: ogiltig version %u (max %d)%B: â€�%sâ€� Ã¥tkommen bÃ¥de som normal och trÃ¥dlokal symbol%B: .got-delsegment Ã¶verstiger 64K (storlek %d)%B: .opd Ã¤r inte ett vanligt fÃ¤lt av opd-poster%B: .preinit_array-sektion tillÃ¥ts inte i DSO%B: 0x%lx: Ã¶desdigert: R_SH_PSHA-omlokalisering %d inte i intervallet -32..32%B: 0x%lx: Ã¶desdigert: R_SH_PSHL-omlokalisering %d inte i intervallet -32..32%B: 0x%lx: Ã¶desdigert: omlokalisering Ã¶verbelastad vid relax%B: 0x%lx: Ã¶desdigert: ojusterad %s-omlokalisering 0x%lx%B: 0x%lx: Ã¶desdigert: ojusterad grendestination fÃ¶r relax-stÃ¶dd omlokalisering%B: 0x%lx: varning: R_SH_USES pekar pÃ¥ okÃ¤nd insn 0x%x%B: 0x%lx: varning: felaktig R_SH_USES-laddningsfÃ¶rskjutning%B: 0x%lx: varning: felaktig R_SH_USES-fÃ¶rskjutning%B: 0x%lx: varning: felaktigt antal%B: 0x%lx: varning: kunde inte hitta fÃ¶rvÃ¤ntad COUNT-omlokalisering%B: 0x%lx: varning: kunde inte hitta fÃ¶rvÃ¤ntad omlokalisering%B: 0x%lx: varning: symbol i ovÃ¤ntad sektion%B: @gprel-omlokalisering mot dynamisk symbol %s%B: @internal-gren till dynamisk symbol %s%B: @pcrel-omlokalisering mot dynamisk symbol %s%B: ABI Ã¤r inkompatibelt med vald emulering%B: ABI felmatchning: lÃ¤nkar %s-modul till tidigare %s-moduler%B: ABI-versionen %ld Ã¤r inte kompatibel med ABI version %ld-utmatning%B: ASE-felmatchning: lÃ¤nkning av %s med tidigare %s moduler%B: Justering stÃ¤mde inte med fÃ¶regÃ¥ende moduler%B: Arkitekturen stÃ¤mmer inte Ã¶verens med fÃ¶regÃ¥ende moduler%B: BE8-avbilder bara giltiga i lÃ¤ge med rak byteordning.%B: DÃ¥lig omlokaliseringspost importerad: %d%B: CALL15-omlokalisering vid 0x%lx inte mot global symbol%B: CALL16-omlokalisering vid 0x%lx inte mot global symbol%B: Kan inte hitta passande LO16-omlokalisering mot â€�%sâ€� fÃ¶r %s vid 0x%lx i sektion â€�%Aâ€�%B: Kan inte gÃ¶ra relax pÃ¥ br (%s) till â€�%sâ€� pÃ¥ 0x%lx i sektion â€�%Aâ€� med storlek 0x%lx (> 0x1000000).%B: Kan inte relax br pÃ¥ 0x%lx i sektion â€�%Aâ€�. AnvÃ¤nd brl eller indirekt gren.%B: Kan inte hantera komprimerade Alpha-binÃ¤rer.
+   AnvÃ¤nd kompileringsflaggor eller objZ fÃ¶r att generera okomprimerade binÃ¤rer.%B: Kan inte lÃ¤nka samman objekten %s och %s.%B: Korrupt storleksfÃ¤lt i gruppsektionshuvudet: 0x%lx%B: Kunde inte lÃ¤gga till namnÃ¤ndrad symbol %s%B: Funktionsbeskrivningsomlokalisering med addend som inte Ã¤r noll%B: GOT Ã¶verbelastades: Antal omlokaliseringar med 8- eller 16-bitars fÃ¶rskjutning > %d%B: GOT Ã¶verbelastades: Antal omlokaliseringar med 8-bitars fÃ¶rskjutning > %d%B: GOT omlokalisering vid 0x%lx fÃ¶rvÃ¤ntas inte i kÃ¶rbara filer%B: IMPORT AS-direktiv fÃ¶r %s dÃ¶ljer fÃ¶regÃ¥ende IMPORT AS%B: ISR-vektorstorlek stÃ¤mmer inte Ã¶verens med tidigare moduler, fÃ¶regÃ¥ende %u-byte, aktuell %u-byte%B: InstruktionsuppsÃ¤ttningen stÃ¤mmer inte Ã¶verens med fÃ¶regÃ¥ende moduler%B: Ogiltig omlokaliseringstyp importerad: %d%B: Felformad omlokalisering hittad fÃ¶r sektion %s%B: NÃ¤stlade OMIT_FP i %A.%B: Ingen symbolversionssektion fÃ¶r versionerad symbol â€�%sâ€�%B: Inte tillrÃ¤ckligt med utrymme fÃ¶r programhuvud, fÃ¶rsÃ¶k lÃ¤nka med -N%B: Bara registren %%g[2367] kan deklareras med STT_REGISTER%B: KÃ¤nd men ohanterad maskintyp (0x%x) i importbiblioteksformatarkivet%B: omlokalisering %s (%d) saknar fÃ¶r nÃ¤rvarande stÃ¶d.
+%B: omlokaliseringar i vanlig ELF (EM: %d)%B: SB-relativ omlokalisering, men __c6xabi_DSBT_BASE har inte definierats%B: TLS-lokal kÃ¶rkod kan inte lÃ¤nkas till delade objekt%B: TLS-sektion Ã¤r inte nÃ¤rliggande:%B: TLS-Ã¶vergÃ¥ng frÃ¥n %s till %s mot â€�%sâ€� vid 0x%lx i sektion â€�%Aâ€� misslyckades%B: Den fÃ¶rsta sektionen i PT_DYNAMIC segment Ã¤r inte .dynamic-sektionen%B: Destinationen (%s) fÃ¶r en %s-omlokalisering Ã¤r i fel sektion (%A)%B: FÃ¶r mÃ¥nga sektioner: %d (>= %d)%B: Kunde inte sortera omlokaliseringar - de finns i mer Ã¤n en storlek%B: Kunde inte sortera omlokaliseringar - deras storlek Ã¤r okÃ¤nd%B: Ohanterad importtyp; %x%B: OkÃ¤nt obligatoriskt EABI-objektattribut %d%B: OkÃ¤nd omlokaliseringstyp %d
+%B: OkÃ¤nd sektionstyp i filen a.out.adobe: %x
+%B: Omatchade OMIT_FP i %A.%B: OkÃ¤nt .directive-kommando: %s%B: OkÃ¤nd importnamnstyp; %x%B OkÃ¤nd importtyp; %x%B: OkÃ¤nd maskintyp (0x%x) i Importbiblioteksformatarkivet%B: OkÃ¤nd lagringsklass %d fÃ¶r %s symbol â€�%sâ€�%B: Varning: Ignorerar sektionsflaggan IMAGE_SCN_MEM_NOT_PAGED i sektion %s%B: Varning: Thumb BLX-instruktion pekar mot thumb-funktionen â€�%sâ€�.%B: Varning: felaktig â€�%sâ€� alternativstorlek %u mindre Ã¤n dess huvud%B: Varning: kan inte avgÃ¶ra destinationsfunktionen fÃ¶r stubbsektionen â€�%sâ€�%B: Varning: tumlÃ¤ges PLT-generering stÃ¶ds ej%B: XMC_TC0-symbol â€�%sâ€� Ã¤r klass %d scnlen %d%B: â€�%Aâ€� fÃ¶rskjutning pÃ¥ %ld frÃ¥n â€�%Aâ€� bortom intervallet fÃ¶r ADDIUPC%B: â€�%sâ€� Ã¥tkommen bÃ¥de som FDPIC- och trÃ¥dlokal symbol%B: â€�%sâ€� Ã¥tkommen bÃ¥de som normal och FDPIC-symbol%B: â€�%sâ€� Ã¥tkommen som bÃ¥de normal och trÃ¥dlokal symbol%B: â€�%sâ€� har radnummer, men ingen omslutande sektion%B: â€�%sâ€� i laddaromlokalisering men inte laddarsym%B: â€�ld -râ€� stÃ¶ds inte fÃ¶r PE MIPS-objekt
+%B: addend -0x%x i omlokalisering %s mot symbolen â€�%sâ€� vid 0x%lx i sektionen â€�%Aâ€� Ã¤r utanfÃ¶r intervallet%B: adderade 0x%x i omlokalisering %s mot symbolen â€�%sâ€� vid 0x%lx i sektionen â€�%Aâ€� Ã¤r utanfÃ¶r intervallet%B: Felaktig XTY_ER-symbol â€�%sâ€�: klass %d scnum %d scnlen %d%B: felaktigt pair/reflo efter refhi
+%B: felaktig omlokaliseringsadress 0x%lx i sektion â€�%Aâ€�%B: felaktigt omlokaliseringssymbolindex (0x%lx >= 0x%lx) fÃ¶r fÃ¶rskjutning 0x%lx i sektion â€�%Aâ€�%B: felaktig sektionslÃ¤ngd i ihex_read_section%B: felaktig strÃ¤ngtabellsstorlek %lu%B: felaktigt symbolindex: %d%B: kan inte skapa stubbpost %s%B: Ã¤ndring i gp: BRSGP %s%B: Klass %d-symbolen â€�%sâ€� har inga extraposter%B: kompilerad fÃ¶r ett 64-bitars system medan destinationen Ã¤r 32-bitar%B: kompilerat fÃ¶r system med rak byteordning, medan destinationen Ã¤r omvÃ¤nd byteordning%B: kompilerat fÃ¶r system med omvÃ¤nd byteordning, medan destinationen Ã¤r rak byteordning%B: kompilerades normalt och lÃ¤nkades med moduler som kompilerades med -mrelocatable%B: kompilerades med -mrelocatable och lÃ¤nkades med moduler som kompilerats normalt%B: kunde inte hitta utdata-sektionen %A fÃ¶r indata-sektion %A%B: kunde inte hitta utdata-sektion %s%B: kunde inte lÃ¤sa innehÃ¥llet i sektion â€�%Aâ€�
+%B: csect â€�%sâ€� Ã¤r inte i en omslutande sektion%B: vet ej hur att hantera OS-specifik sektion â€�%sâ€� [0x%8x]%B: vet ej hur att hantera allokerad, programspecifik sektion â€�%sâ€� [0x%8x]%B: vet ej hur att hantera processorspecifik sektion â€�%sâ€� [0x%8x]%B: vet ej hur att hantera sektion â€�%sâ€� [0x%8x]%B: dtp-relativ omlokalisering mot dynamisk symbol %s%B: duplicera exportstubbe %s%B: dubblerad sektion â€�%Aâ€� har olika innehÃ¥ll
+%B: dubblerad sektion â€�%Aâ€� har en annan storlek
+%B: bitordning inkompatibel med vald emulering%B: fel: ABI-mismatch med tidigare moduler.%B: fel: Kan inte sÃ¤tta _ITB_BASE_%B: fel: Cortex-A8 felstubbe har tilldelats en osÃ¤ker plats%B: fel: Cortex-A8 felstubbe utanfÃ¶r intervallet (indatafilen Ã¤r fÃ¶r stor)%B: fel: InstruktionsuppsÃ¤ttning stÃ¤mmer inte med tidigare moduler.%B: fel: VFP11-lager utanfÃ¶r intervall%B: fel: ojusterad omlokaliseringstyp %d vid %08x omlokalisering %p
+%B: fel: okÃ¤nt tvingande EABI-objektattribut %d%B-fel: okÃ¤nd omlokaliseringstyp %d.%B: Filklassen %s Ã¤r inkompatibel med %s%B: gp-relativ omlokalisering mot dynamisk symbol %s%B: dold symbol â€�%sâ€� i %B anvÃ¤nds av DSO%B: den dolda symbolen â€�%sâ€� har inte definierats%B: ignorerar dubblerad sektion â€�%Aâ€�
+%B: ogiltig omlokaliseringstyp %d pÃ¥ adress 0x%lx%B: otillÃ¥tet symbolindex i omlokalisering: %d%B: inkompatibel maskintyp. Utdata Ã¤r 0x%x. Indata Ã¤r 0x%x%B: indirekt symbol â€�%sâ€� till â€�%sâ€� Ã¤r en slinga%B: internt fel i ihex_read_section%B: intern symbol â€�%sâ€� i %B anvÃ¤nds av DSO%B: den interna symbolen â€�%sâ€� har inte definierats%B: ogiltig SHT_GROUP post%B: ogiltig lÃ¤nk %lu fÃ¶r omlokaliseringssektion %s (index %u)%B: ogiltig omlokaliseringstyp %d%B: ogiltig strÃ¤ngfÃ¶rskjutning %u >= %lu fÃ¶r sektion â€�%sâ€�%B: hopp fÃ¶r lÃ¥ngt
+%B: lÃ¤nkar %s-modul till tidigare %s-moduler%B: lÃ¤nkar 32-bitars kod till 64-bitars kod%B: LÃ¤nkar 64 bit-filer med 32 bit-filer%B: lÃ¤nkar UltraSPARC-specifik med HAL-specifik kod%B: LÃ¤nkar auto-pic-filer med ickeauto-pic-filer%B: LÃ¤nkar filer med rak byteordning med filer med omvÃ¤nd byteordning%B: LÃ¤nkar konstant-gp-filer med ickekonstant-gp-filer%B: lÃ¤nkar filer kompilerade fÃ¶r 16-bitars heltal (-mshort) och andra fÃ¶r 32-bitars heltal%B: lÃ¤nkar filer kompilerade fÃ¶r 32-bitars dubbelprecision (-fshort-double) och andra fÃ¶r 64-bitars dubbelprecision%B: lÃ¤nkar filer kompilerade fÃ¶r HCS12 med andra kompilerade fÃ¶r HC12%B: lÃ¤nkar filer med omvÃ¤nd byteordning med rak byteordning%B: LÃ¤nkar icke-pic kod i en positionsoberoende kÃ¶rfil%B: LÃ¤nkar avbryt-vid-NOLL-dereferens med ickeavbrytande filer%B: Laddaromlokalisering i skrivskyddad sektion %A%B: Laddaromlokalisering i okÃ¤nd sektion â€�%sâ€�%B: lokal symbol â€�%sâ€� i %B anvÃ¤nds av DSO%B: Felplacerad XTY_LD â€�%sâ€�%B: Saknar TLS-sektion fÃ¶r omlokalisering %s mot â€�%sâ€� pÃ¥ 0x%lx i sektion â€�%Aâ€�.%B: ingen gruppinformation fÃ¶r sektion %A%B: Icke-pic kod med imm-omlokalisering mot dynamisk symbol â€�%sâ€�%B: symbolindex Ã¤r inte noll (0x%lx) fÃ¶r fÃ¶rskjutning 0x%lx i sektion â€�%Aâ€� nÃ¤r objektfilen saknar symboltabell%B: pc-relativ omlokalisering mot dynamisk symbol %s%B: pc-relativ omlokalisering mot odefinierad svag symbol %s%B: antagligen kompilerad utan -fPIC?%B: den skyddade symbolen â€�%sâ€� har inte definierats%B: omlokalisering %s:%d inte i csect%B: omlokalisering mot ett icke-existerande symbolindex: %ld%B: omlokalisering %s mot %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt%s skapas%B: omlokalisering %s mot STT_GNU_IFUNC-symbolen â€�%sâ€� har en addend som inte Ã¤r noll: %d%B: omlokalisering %s mot STT_GNU_IFUNC-symbolen â€�%sâ€� hanteras inte av %s%B: omlokalisering %s mot â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas; kompilera om med -fPIC%B: omlokalisering %s mot symbol â€�%sâ€� stÃ¶ds inte i x32-lÃ¤ge%B: omlokalisering %s mot odefinierad %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt%s skapas%B: omlokalisering %s kan inte anvÃ¤ndas vid skapande av ett delat objekt; kompilera om med -fPIC%B: omlokalisering %s kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas%B: omlokalisering R_386_GOTOFF mot skyddad funktion â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas%B: omlokalisering R_386_GOTOFF mot odefinierad %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas%B: omlokalisering R_X86_64_GOTOFF64 mot skyddad funktion â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas%B. omlokalisering vid â€�%A+0x%xâ€� anvÃ¤nder symbolen â€�%sâ€� med en addend som inte Ã¤r noll%B: omlokaliseringsstorlek stÃ¤mmer inte Ã¶verens i %B-sektionen %A%B: relocs i sektion â€�%Aâ€�, men den har inget innehÃ¥ll%B: sektion %A lma %#lx justerad till %#lx%B: sektion %s: strÃ¤ngtabellen flÃ¶dade Ã¶ver vid %ld%B: sektion â€�%Aâ€� kan inte allokeras i segment %d%B: sh_link [%d] i sektion â€�%Aâ€� Ã¤r inkorrekt%B: sh_link frÃ¥n sektion â€�%Aâ€� pekar pÃ¥ kastad sektion â€�%Aâ€� av â€�%Bâ€�%B: sh_link frÃ¥n sektion â€�%Aâ€� pekar pÃ¥ borttagen sektion â€�%Aâ€� av â€�%Bâ€�%B: storleksfÃ¤ltet Ã¤r noll i importbiblioteksformathuvudet%B: Spekuleringsfix till dynamisk symbol %s%B: stackstorlek angiven och %s satt%B: strÃ¤ng som inte Ã¤r nollavslutad i ILF-objektfil.%B: Symbolen â€�%sâ€� har okÃ¤nd csect-typ %d%B: symbolen â€�%sâ€� har okÃ¤nd smclas %d%B: symbol â€�%sâ€� krÃ¤vs men Ã¤r inte tillgÃ¤nglig%B: ta adressen fÃ¶r den skyddade funktionen â€�%sâ€� kan inte gÃ¶ras vid skapandet av ett delat bibliotek%B: destinationen (%s) fÃ¶r omlokaliseringen %s Ã¤r i fel utdata-sektion (%s)%B: fÃ¶r mÃ¥nga sektioner (%d)%B: fÃ¶r mÃ¥nga sektioner: %u%B: tp-relativ omlokalisering mot dynamisk symbol %s%B: Kunde inte fylla i DataDictionary[12] eftersom .idata$5 saknas%B: Kunde inte fylla i DataDictionary[1] eftersom .idata$2 saknas%B: Kunde inte fylla i DataDictionary[1] eftersom .data$4 saknas%B: Kunde inte fylla i DataDictionary[9] eftersom __tls_used saknas%B: Kunde inte fylla i DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] eftersom .idata$6 saknas%B: Kunde inte fylla i DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] eftersom .idata$6 saknas%B: kunde inte hitta ARM-lim â€�%sâ€� fÃ¶r â€�%sâ€�%B: kunde inte hitta THUMB-lim â€�%sâ€� fÃ¶r â€�%sâ€�%B: kan inte hitta VFP11-lagret â€�%sâ€�%B: kunde inte hÃ¤mta dekomprimerad sektion %A%B: kunde inte initiera kompression av status fÃ¶r sektion %s%B: kunde inte initiera uppackning av status fÃ¶r sektion %s%B: odefinierad referens till symbolen â€�%sâ€�%B: odefinierad sym â€�%sâ€� i .opd-sektion%B: odefinierad symbol vid R_PPC64_TOCSAVE-omlokalisering%B: ovÃ¤ntad ATN-typ %d i extern del%B: ovÃ¤ntad omdefiniering av indirekt versionsbestÃ¤md symbol â€�%sâ€�%B: ovÃ¤ntad omlokaliseringstyp %u i .opd-sektion%B: ovÃ¤ntad typ efter ATN%B: ohanterad dynamisk omlokalisering mot %s%B: oimplementerad %s
+%B: ej implementerad ATI-post %u fÃ¶r symbol %u%B: okÃ¤nd [%d] sektion â€�%sâ€� i grupp [%s]%B: okÃ¤nt inlÃ¤st kommando 0x%lx%B: okÃ¤nd omlokaliseringstyp %d%B: omlokaliseringstyp okÃ¤nd/stÃ¶d saknas fÃ¶r typ %d%B: okÃ¤nd omlokalisering (0x%x) i sektion â€�%Aâ€�%B: omlokaliseringstyp %i saknar stÃ¶d%B: omlokaliseringstyp stÃ¶ds ej %i
+%B: omlokaliseringstyp %s saknar stÃ¶d%B: omlokalisering stÃ¶ds ej: ALPHA_R_GPRELHIGH%B: omlokalisering stÃ¶ds ej: ALPHA_R_GPRELLOW%B: anvÃ¤nder symboler med _-prefix, men skriver en fil med symboler utan prefix%B: anvÃ¤nder andra e_flags-fÃ¤lt (0x%lx) Ã¤n fÃ¶regÃ¥ende moduler (0x%lx)%B: anvÃ¤nder symboler utan prefix, men skriver en fil med symboler med _-prefix%B: versionsnod hittades inte fÃ¶r symbol %s%B: varning: COMDAT-symbolen â€�%sâ€� matchar inte sektionsnamnet â€�%sâ€�%B: varning: Tomt laddningsbart segment detekterat, Ã¤r detta avsiktligt?
+%B: varning: byteordning stÃ¤mmer inte med tidigare moduler.%B: varning: Inkompatibla elf-versioner %s och %s.%B: varning: Ã„ldre versioner av objektfiler pÃ¥trÃ¤ffat. Kompilera om med aktuell verktygskedja.%B: varning: allokerat segment â€�%sâ€� Ã¤r inte i sektionen%B: varning: dubbla kopior av linjenummer fÃ¶r â€�%sâ€�%B: varning: ogiltigt symbolindex %ld i radnummer%B: varning: ogiltigt symbolindex %ld i relocs%B: varning: kunde inte lÃ¤sa radnummertabellen%B: varning: lÃ¤nkar PIC-filer med icke-PIC-filer%B: varning: lÃ¤nkar abicalls-filer till icke-abicalls-filer%B: varning: omlokalisering av SDA_BASE-misslyckades.%B: varning: vald problemlÃ¶sning VFP11 behÃ¶vs inte fÃ¶r destinationsarkitektur%B: varning: sh_link inte satt fÃ¶r sektion â€�%Aâ€�%B: varning: ojusterad Ã¥tkomst till GOT-post.%B: varning: okÃ¤nt EABI-objektattribut %d%B:%A%s Ã¶verstiger Ã¶verlÃ¤ggsstorlek
+%B:%A: Varning: fÃ¶rÃ¥ldrad Red Hat-omlokalisering %B:%d: Felaktig kontrollsumma i S-postfil
+%B:%d: OvÃ¤ntat tecken â€�%sâ€� i S-postfil
+%B:%d: ovÃ¤ntat tecken â€�%sâ€� i Intel Hex-fil%B:%u: felaktig kontrollsumma i Intel Hex-fil (fÃ¶rvÃ¤ntade mig %u, hittade %u)%B:%u: felaktig utÃ¶kad adresspostlÃ¤ngd i Intel Hex-fil%B:%u: felaktig linjÃ¤r adresspostlÃ¤ngd i Intel Hex-fil%B:%u: felaktig utÃ¶kad linjÃ¤r startadresslÃ¤ngd i Intel Hex-fil%B:%u: felaktig utÃ¶kad startadresslÃ¤ngd i Intel Hex-fil%B:%u: okÃ¤nd ihex-typ %u i Intel Hex-fil%C: varning: omlokalisering till â€�%sâ€� anvÃ¤nder ett annat segment
+%F%P: already_linked_table: %E
+%F%P: dynamisk STT_GNU_IFUNC-symbol â€�%sâ€� med pekarmotsvarighet i â€�%Bâ€� kan inte anvÃ¤ndas nÃ¤r en kÃ¶rfil framstÃ¤lls; kompilera om med -fPIE och lÃ¤nka om med -pie
+%H __tls_get_addr fÃ¶rlorat arg, TLS-optimering inaktiverat
+%H arg fÃ¶rsvunnet __tls_get_addr, TLS-optimering inaktiverad
+%H: R_FRV_FUNCDESC-referenser dynamisk symbol pÃ¥ ett ickenoll addend
+%H: R_FRV_FUNCDESC_VALUE hÃ¤nvisar till dynamisk symbol med icke-noll addend
+%H: R_FRV_GETTLSOFF inte tillÃ¤mpat pÃ¥ en anropsinstruktion
+%H: R_FRV_GETTLSOFF_RELAX inte tillÃ¤mpad pÃ¥ en calll-instruktion
+%H: R_FRV_GOTTLSDESC12 inte tillÃ¤mpad pÃ¥ en lddi-instruktion
+%H: R_FRV_GOTTLSDESCHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion
+%H: R_FRV_GOTTLSDESCLO inte tillÃ¤mpad pÃ¥ en setlo- eller setlos-instruktion
+%H: R_FRV_GOTTLSOFF12 inte tillÃ¤mpad pÃ¥ en ldi-instruktion
+%H: R_FRV_GOTTLSOFFHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion
+%H: R_FRV_GOTTLSOFFLO inte tillÃ¤mpad pÃ¥ en setlo eller setlos instruktion
+%H: R_FRV_TLSDESC_RELAX inte tillÃ¤mpad pÃ¥ en ldd-instruktion
+%H: R_FRV_TLSMOFFHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion
+%H: R_FRV_TLSOFF_RELAX inte tillÃ¤mpad pÃ¥ en ld-instruktion
+%H: kan inte sÃ¤nda ut dynamiska omlokaliseringar i skrivskyddad sektion
+%H: kan inte sÃ¤nda ut fixar i skrivskyddade sektioner
+%H: omlokalisering mot â€�%sâ€� hÃ¤nvisar till ett annat segment
+%H: omlokalisering mot â€�%sâ€�: %s
+%H: omlokalisering hÃ¤nvisar till en symbol som inte definierats i modulen
+%H: omlokalisering till â€�%s+%vâ€� kan ha orsakat felet ovan
+%P%F: --relax och -r kan inte anvÃ¤ndas tillsammans
+%P%F: misslyckades skapa ex9.it %s hashtabell: %E
+%P%X: kan inte lÃ¤sa symboler: %E
+%P%X: skrivskyddat segment har dynamiska omlokaliseringar.
+%P: %B: %s stÃ¶ds ej fÃ¶r â€�%Tâ€�
+%P: %B: kan inte skapa stubbposten %s
+%P: %B: omlokalisering %s stÃ¶ds ej fÃ¶r symbolen %s
+%P %B: destinationen (%s) av %s fÃ¶r omlokaliseringen Ã¤r i fel utdata-sektion (%s)
+%P: %B: ovÃ¤ntad omlokaliseringstyp
+%P: %B: okÃ¤nd omlokaliseringstyp %d fÃ¶r â€�%Tâ€�
+%P: %B: okÃ¤nd omlokaliseringstyp %d fÃ¶r symbolen %s
+%P: %B: varning: omlokalisering mot â€�%sâ€� i skrivskyddad sektion â€�%Aâ€�.
+%P: %B: varning: omlokalisering i skrivskyddad sektion â€�%Aâ€�.
+%P: %H: %s mot â€�%Tâ€�: fel %d
+%P: %H: %s fÃ¶r indirekta funktioner â€�%Tâ€� stÃ¶ds ej
+%P: %H: %s-referenser optimerade bort TOC-post
+%P: %H: %s omlokalisering till â€�%sâ€�: fel %d
+%P: %H: %s-omlokalisering mot lokala symboler
+%P: %H: %s anvÃ¤nt med TLS-symbol â€�%Tâ€�
+%P: %H: %s anvÃ¤nt med icke-TLS-symbol â€�%Tâ€�
+%P: %H: @local till ifunc %s
+%P: %H: anrop till â€�%Tâ€� saknar nop, kan inte Ã¥terstÃ¤lla toc; kompilera med -fPIC
+%P: %H: fel: %s mot â€�%sâ€� Ã¤r inte en multipel av %u
+%P: %H: fel: %s Ã¤r inte en multipel av %u
+%P: %H: ej-noll addend pÃ¥ %s omlokalisering mot â€�%sâ€�
+%P: %H: omlokalisering %s fÃ¶r indirekta funktionen %s stÃ¶ddes ej
+%P: %H: toc-optimering stÃ¶ds inte av %s-instruktionen.
+%P: %H: kunde inte lÃ¶sas med %s mot â€�%Tâ€�
+%P: %H: olÃ¶sbar %s-omlokalisering till symbolen â€�%sâ€�
+%P: %s Ã¤r inte definierat i lÃ¤nkaren skapad %s
+%P: %s-fÃ¶rskjutning fÃ¶r stor fÃ¶r .eh_frame sdata4-kodning%P: .opd Ã¤r inte tillÃ¥tet i ABI-versionen %d
+%P: DW_EH_PE_datarel ospecificerad fÃ¶r den hÃ¤r arkitekturen.
+%P: alternativ ELF-maskinkod hittades (%d) i %B, fÃ¶rvÃ¤ntade mig %d
+%P: bss-plt tvingade genom profilering
+%P: bss-plt tvingade till %B
+%P: kan inte bygga grenstubbe â€�%sâ€�
+%P: kan inte hitta grenstubb â€�%sâ€�
+%P: kan inte hitta opd-post toc fÃ¶r â€�%Tâ€�
+%P: kopiera omlokalisering mot â€�%Tâ€� krÃ¤ver lazy plt-lÃ¤nkning; undvik att sÃ¤tta LD_BIND_NOW=1 eller uppgradera gcc
+%P: dynreloc-felrÃ¤kning fÃ¶r %B, sektion %A
+%P: fel i %B(%A); ingen .eh_frame_hdr-tabell kommer skapas.
+%P: fde-kodningen i %B(%A) fÃ¶rhindrar att .eh_frame_hdr-tabell skapas.
+%P: lÃ¤nkningstabellfel mot â€�%Tâ€�
+%P: lÃ¥ng grenstubbe â€�%sâ€�-fÃ¶rskjutningsspill
+%P: Flera ingÃ¥ngspunkter: i modulerna %B och %B
+%P: LÃ¤nk som kan omlokaliseras stÃ¶ds inte
+%P: stubbe stÃ¤mmer inte Ã¶verens med berÃ¤knad storlek
+%P: symbolen â€�%sâ€� har ogiltig st_other fÃ¶r ABI version 1
+%P: varning: skapar en DT_TEXTREL i ett delat objekt.
+%X%C: omlokalisering till â€�%sâ€� anvÃ¤nder ett annat segment
+%X%P: %B(%A): omlokaliseringen â€�%Râ€� gÃ¥r utanfÃ¶r intervallet
+%X%P: Ã¶verlÃ¤ggssektion %A bÃ¶rjar inte pÃ¥ en cache-rad.
+%X%P: Ã¶verlÃ¤ggssektion %A Ã¤r stÃ¶rre Ã¤n en cache-rad.
+%X%P: Ã¶verlÃ¤ggssektion %A finns inte i cache-omrÃ¥det.
+%X%P: Ã¶verlÃ¤ggssektionen %A och %A bÃ¶rjar inte pÃ¥ samma adress.
+%Xâ€�%sâ€� anvÃ¤nds i sektionen â€�%Aâ€� i %B: definieras i kastad sektion â€�%Aâ€� i %B
+%s definierades i borttagen innehÃ¥llsfÃ¶rteckningspost%s duplicerad
+%s duplicerad i %s
+%s i Ã¶verlÃ¤ggssektion%s(%s): omlokalisering %d har ogiltigt symbolindex %ld%s: %s: omlokalisering ger Ã¶verspill: 0x%lx > 0xffff%s: .rsrc sammanfogningsfel: felaktigt .rsrc-sektion%s: 0x%v 0x%v
+%s: Felaktig symboldefinition: â€�Mainâ€� Ã¤r instÃ¤lld till %s istÃ¤llet fÃ¶r startadressen %s
+%s: Fel: flera definitioner av â€�%sâ€�; bÃ¶rjan pÃ¥ %s Ã¤r instÃ¤lld i en tidigare lÃ¤nkad fil
+%s: GAS-fel: ovÃ¤ntad PTB-instruktion med R_SH_PT_16%s: Internt inkonsistensfel fÃ¶r vÃ¤rdet fÃ¶r
+ lÃ¤nkarallokerat globalt register: lÃ¤nkat: 0x%lx%08lx != relaxed: 0x%lx%08lx
+%s: Ogiltig omlokaliseringstyp exporterad: %d%s: LOCAL-direktiv: Register $%ld Ã¤r inte ett lokalt register. FÃ¶rsta globala registret Ã¤r $%ld.%s: Felaktig omlokalisering fÃ¶r sektion %s upptÃ¤ckt%s: Ingen kÃ¤rna fÃ¶r att allokera en %d byte lÃ¥ng symbol
+%s: Ingen kÃ¤rna fÃ¶r att allokera sektionsnamn %s
+%s: TLS-definiering i %B-sektionen %A stÃ¤mmer inte Ã¶verens med icke-TLS-definieringen i %B-sektionen %A%s: TLS-definieringen i %B-sektionen %A stÃ¤mmer inte Ã¶verens med icke-TLS-referensen i %B%s: TLS-referensen i %B stÃ¤mmer inte Ã¶verens med icke-TLS-definieringen i %B-sektionen %A%s: TLS-referensen i %B stÃ¤mmer inte Ã¶verens med icke-TLS-referensen i %B%s: TOC-omlokalisering vid 0x%x till symbolen â€�%sâ€� utan nÃ¥gon TOC-post%s: MÃ¥let (%s) fÃ¶r en %s-omlokalisering Ã¤r i fel sektion (%s)%s:Ã–vergÃ¥ng frÃ¥n %s till %s stÃ¶ds ej%s: XCOFF delade objekt nÃ¤r inte XCOFF-utdata produceras%s: __gp tÃ¤cker inte kort datasegment%s: Ã¥tkomst bortom slutet av sammanfogad sektion (%ld)%s: adressen 0x%s Ã¤r utanfÃ¶r intervallet fÃ¶r hexadecimal Intel-fil%s: bas-plus-fÃ¶rskjutningsomlokalisering mot registersymbol: %s i %s%s: bas-plus-fÃ¶rskjutningsomlokalisering mot registersymbol: (okÃ¤nd) i %s%s: kan inte representera sektionen â€�%sâ€� i a.out-objektfilformat%s: kan inte representera sektionen â€�%sâ€� i oasys%s: kan inte representera sektionen fÃ¶r symbolen â€�%sâ€� i a.out-objektfilformat%s: kan inte allokera filnamn fÃ¶r fil nummer %d, %d byte
+%s: kan inte skapa stubbstarten %s%s: kan inte lÃ¤nka fdpic-objektfil till icke-fdpic-kÃ¶rfil%s: kan inte lÃ¤nka icke-fdpic-objektfil till fdpic-kÃ¶rfil%s: kompilerat som 32-bitarsobjekt och %s Ã¤r 64-bitars%s: kompilerat som 64-bitarsobjekt och %s Ã¤r 32-bitars%s: kompilerad med %s och lÃ¤nkad med moduler som kompilerats med %s%s: kompilerad med %s och lÃ¤nkad med moduler som anvÃ¤nder icke-pic-omlokalisering%s: kunde inte skriva ut tillagda .cranges-poster%s: kunde inte skriva ut sorterade cranges-poster%s: LOCAL-direktivet Ã¤r endast giltigt med ett register eller absolutvÃ¤rde%s: dynamiskt objekt utan nÃ¥gon .loader-sektion%s: pÃ¥trÃ¤ffade dataetikettssymbol i indata%s: fel: ojusterad omlokaliseringstyp %d pÃ¥ %08x omlokalisering %08x
+%s: ogiltigt sektionsnamn â€�%sâ€�%s: internt fel, interna registersektionen %s hade innehÃ¥ll
+%s: internt fel, symboltabellen Ã¤ndrade storlek frÃ¥n %d till %d ord
+%s: ogiltig mmo-fil: YZ i lop_end (%ld) Ã¤r inte lika med antalet tetra till den fÃ¶regÃ¥ende lop_stab (%ld)
+%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade YZ = 1 fick YZ = %d fÃ¶r lop_quote
+%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade y = 0, fick y = %d fÃ¶r lop_fixrx
+%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 1 eller z = 2, fick z = %d fÃ¶r lop_fixo
+%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 1 eller z = 2, fick z = %d fÃ¶r lop_loc
+%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 16 eller z = 24, fick z = %d fÃ¶r lop_fixrx
+%s: ogiltig mmo-fil: fÃ¤lten y och z i lop_stab Ã¤r icke-tomma, y: %d, z: %d
+%s: ogiltig mmo-fil: filnamnet fÃ¶r nummer %d angavs inte innan anvÃ¤ndning
+%s: ogiltig mmo-fil: fil nummer %d â€�%sâ€�, var redan angiven som â€�%sâ€�
+%s: ogiltig mmo-fil: initieringsvÃ¤rde fÃ¶r $255 Ã¤r inte â€�Mainâ€�
+%s: ogiltig mmo-fil: inledande byte i operandord mÃ¥ste vara 0 eller 1, fick %d fÃ¶r lop_fixrx
+%s: ogiltig mmo-fil: lop_end Ã¤r inte sista objektet i fil
+%s: ogiltig mmo-fil: lopkod â€�%dâ€� stÃ¶ds inte
+%s: ogiltig startadress fÃ¶r initierade register med lÃ¤ngden %ld: 0x%lx%08lx
+%s: ogiltig symboltabell: dubblettsymbol â€�%sâ€�
+%s: radnummer ger Ã¶verspill: 0x%lx > 0xffff%s: inga initierade register; sektionslÃ¤ngd 0
+%s: ingen sÃ¥dan symbol%s: inte implementerad%s: stÃ¶ds inte%s: objektstorleken stÃ¤mmer inte Ã¶verens med den hos mÃ¥let %s%s: registeromlokalisering mot icke-registersymbol: %s i %s%s: registeromlokalisering mot icke-registersymbol: (okÃ¤nd) i %s%s: omlokaliseringsbar lÃ¤nk frÃ¥n %s till %s stÃ¶ds inte%s: kort datasegment spillde Ã¶ver (0x%lx >= 0x400000)%s: strÃ¤ngen Ã¤r fÃ¶r lÃ¥ng (%d tecken, max 65535)%s: fÃ¶r mÃ¥nga initierade register; sektionslÃ¤ngd %ld
+%s: odefinierad version: %s%s: okÃ¤nd omlokaliseringstyp %d%s: okÃ¤nd symbol â€�%sâ€� flaggor 0x%x%s: omlokaliseringstypen 0x%02x stÃ¶ds inte%s: bred teckensekvens som inte stÃ¶ds 0x%02X 0x%02X efter symbolnamnet som bÃ¶rjar med â€�%sâ€�
+%s: anvÃ¤nder andra e_flags-fÃ¤lt (0x%lx) Ã¤n tidigare moduler (0x%lx)%s: anvÃ¤nder andra okÃ¤nda e_flags-fÃ¤lt (0x%lx) Ã¤n tidigare moduler (0x%lx)%s: versionsantal (%ld) stÃ¤mmer inte med symbolantal (%ld)%s: varning: kÃ¤rnfil avkortad%s: varning: %s-omlokalisering mot symbolen â€�%sâ€� frÃ¥n sektionen %s%s: varning: %s-omlokalisering till 0x%x frÃ¥n sektionen %s%s: varning: %s: radnummer ger Ã¶verspill: 0x%lx > 0xffff%s: varning: GOT-addend %ld till â€�%sâ€� stÃ¤mmer inte Ã¶verens med tidigare GOT-addend %ld%s: varning: PLT-addend %d till â€�%sâ€� frÃ¥n sektionen %s ignorerades%s: varning: kan inte hantera R_NDS32_25_ABS_RELA i delat lÃ¤ge.%s: varning: otillÃ¥tet symbolindex %ld i omlokaliseringarna%s: varning: symboltabellen Ã¤r fÃ¶r stor fÃ¶r mmo, stÃ¶rre Ã¤n 65535 32-bitars ord: %d. Endast â€�Mainâ€� kommer att skickas.
+%s: varning: ojusterad liten dataÃ¥tkomst. FÃ¶r post: {%d, %d, %d}, adr = 0x%x, just = 0x%x.(vid bitoffset %u)
+(beskrivning)
+(inget vÃ¤rde)
+(inaktiv)
+(ej allokerad)
+(reg: %u, disp: %u, indir: %u, sort: (thread-local-data fÃ¶r stor fÃ¶r -fpic eller -msmall-tls: kompilera om med -fPIC eller -mno-small-tls)(fÃ¶r mÃ¥nga globala variabler fÃ¶r -fpic: kompilera om med -fPIC)(efterhÃ¤ngande vÃ¤rde)
+(vÃ¤rdespec. fÃ¶ljer)
+)
+*** kontrollera denna omlokalisering: %s*ohanterad*
+*ohanterad* dst-typ %u
+*okÃ¤nd**unknown*        , 8-bytedatajustering, VÃ¤rde: %#08lx
+, alias: %u
+, ext fixup fÃ¶rskjutning: %u, no_opt psect off: %u, deltyp: %u (%s)
+, symbolvektor rva: - %s Ã¤r G10, %s Ã¤r det ej.got-sektion fÃ¶ljer inte omedelbart efter .plt-sektion.rsrc sammanfogningsfel: en katalog matchar ett lÃ¶v.rsrc sammanfogningsfel: olika katalogversioner
+.rsrc sammanfogningsfel: kataloger med olika karakteristik
+.rsrc sammanfogningsfel: dubblerat lÃ¶v.rsrc sammanfogningsfel: dubblerat lÃ¶v: %s.rsrc sammanfogningsfel: dubblerad strÃ¤ngresurs: %d.rsrc sammanfogningsfel: multipla ej-standard manifest32-bitars dubbelprecisionsflyttal, 32-bitars gp-relativ omlokalisering fÃ¶rekom fÃ¶r en extern symbol64 bitar *ohanterad*
+64-bitars dubbelprecisionsflyttal, : %u.%u
+: m32r-instruktioner: m32r2-instruktioner: m32rx-instruktioner: n1-instruktioner: n1h-instruktioner; kompilera om med -fPIC<OkÃ¤nda flaggbitar satta><korrupt strÃ¤nglÃ¤ngd: %#x><korrupt strÃ¤ngfÃ¶rskjutning: %#lx><okÃ¤nd>@pltoff-omlokalisering mot lokal symbolArkivet har inget index; kÃ¶r ranlib fÃ¶r att lÃ¤gga till ettArkivobjektfilen Ã¤r i fel formatFÃ¶rsÃ¶k att konvertera L32R/CALLX till CALL misslyckadesFÃ¶rsÃ¶k att gÃ¶ra en omlokaliseringsbar lÃ¤nk med %s-indata och %s-utdataBASE_IMAGE       BFD %s-fÃ¶rsÃ¤kran misslyckades %s:%dInternt BFD %s-fel, avbryter vid %s rad %d
 Internt BFD %s-fel, avbryter vid %s rad %d i %s
-Felaktigt värdeBasomlokaliseringskatalog [.reloc]Katalog över bundna importerKunde inte hitta omlokaliseringssektion för %sFelsökningskatalogKatalog över fördröjda importerFöråldrad %s anropad
-Föråldrad %s anropad vid %s rad %d i %s
-BeskrivningskatalogDwarf-fel: Förkortningsavståndet (%lu) större än eller lika med storleken .debug_abbrev (%lu).Dwarf-fel: Felaktigt förkortningsnummer: %u.Dwarf-fel: Kan inte hitta sektionen .debug_abbrev.Dwarf-fel: Kan inte hitta sektionen .debug_line.Dwarf-fel: Kan inte hitta sektionen .debug_str.Dwarf-fel: Kunde inte hitta förkortningsnumret %u.Dwarf-fel: DW_FORM_strp-avståndet (%lu) större än eller lika med storleken på .debug_str (%lu).Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %u.Dwarf-fel: Radavståndet (%lu) större än eller lika med storleken .debug_line (%lu).Dwarf-fel: hittade adresstorleken "%u", denna läsare kan inte hantera storlekar större än "%u".Dwarf-fel: hittade dwarf version "%u", denna läsare hanterar endast information från version 2.Dwarf-fel: trasig radnummerssektion (felaktigt filnummer).Dwarf-fel: trasig radnummerssektion.FEL: %s är kompilerad som kod med absolut position, medan målet %s är positionsoberoendeFEL: %s är kompilerad som positionsoberoende kod, medan målet %s har absolut positionFEL: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%dFEL: %s är kompilerad för APCS-%d, medan målet %s använder APCS-%dFEL: %s är kompilerad för EABI version %d, medan %s är kompilerad för version %dFEL: %s kompilerad för EP9312, medan %s är kompilerad för XScaleFEL: %s skickar flyttal i flyttalsregister, medan %s skickar dem i heltalsregisterFEL: %s skickar flyttal i heltalsregister, medan %s skickar dem i flyttalsregisterFEL: %s använder FPA-instruktioner, men det gör inte %sFEL: %s använder Maverick-instruktioner, men det gör inte %sFEL: %s använder VFP-instruktioner, men det gör inte %sFEL: %s använder hårdvaruflyttal, medan %s använder programvaruflyttalFEL: %s använder programvaruflyttal, medan %s använder hårdvaruflyttalStartavstånd        = 0x%.8lx (%ld)
-Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet börjar med 0x%xUndantagskatalog [.pdata]Exportkatalog [.edata (eller där vi hittade det)]Exportflaggor 			%lx
-Export-RVAMISSLYCKADES med att hitta tidigare HI16-omlokalisering
-Filformatet är tvetydigtFilformatet känns inte igenFilen är i fel formatFilen är för storFilen trunkeradFlaggfält           = 0x%.2x
-Vidarebefordrar-RVAGP-relativ omlokalisering användes då GP inte är definieradGP-relativ omlokalisering då _gp inte var definieratGPDISP-omlokalisering hittade inga ldah- och lda-instruktionerImportadresstabellkatalogImportkatalog [delar av .idata]Intern inkonsekvens: återstående %u != max %u.
-  Rapportera gärna detta fel.Ogiltigt bfd-målOgiltig åtgärdLängd               = 0x%.8lx (%ld)
-Länkning av mips16-objekt till %s-format stöds inteInläsningskonfigurationskatalogÖvre/Undre 			%d/%d
-Trasigt arkivMinnet är slutIHCONST saknasIHIHALF saknasNamn 				Inget minne!Inget felInga fler arkiverade filerInga symbolerIckerepresenterbar sektion i utdataInte tillräckligt med minne för att sortera omlokaliseringarTal i:
+BFD-lÃ¤nkningsfel: gren (PC rel16) till sektion (%s) saknar stÃ¶dBFD-lÃ¤nkningsfel: hopp (PC rel26) till sektion (%s) saknar stÃ¶dFelaktigt vÃ¤rdeBasomlokaliseringskatalog [.reloc]Katalog Ã¶ver bundna importerGrÃ¤nser:
+CLICLR kÃ¶rtidshuvudCLUSTERS_LOCKMGR COUNTERS         CPU              CTL_AUGRB (Ã¶ka bas fÃ¶r omlokalisering) %u
+CTL_DFLOC (definiera plats)
+CTL_SETRB (ange bas fÃ¶r omlokalisering)
+CTL_STKDL (stackdefinierad plats)
+CTL_STLOC (ange plats)
+UpphovsrÃ¤ttshuvud
+Felaktig .rsrc-sektion upptÃ¤ckt!
+DSO saknas frÃ¥n kommandoradenDST__K_BEG_STMT_MODE inte implementeradDST__K_END_STMT_MODE inte implementeradDST__K_RESET_LINUM_INCR inte implementeradDST__K_SET_LINUM_INCR inte implementeradDST__K_SET_LINUM_INCR_W inte implementeradDST__K_SET_PC inte implementeradDST__K_SET_PC_L inte implementeradDST__K_SET_PC_W inte implementeradDST__K_SET_STMTNUM inte implementeradFelsÃ¶kningskatalogFelsÃ¶kningsmodultabell:
+FelsÃ¶kningssymboltabell:
+Katalog Ã¶ver fÃ¶rdrÃ¶jda importerFÃ¶rÃ¥ldrad %s anropad
+FÃ¶rÃ¥ldrad %s anropad vid %s rad %d i %s
+BeskrivningskatalogDwarf-fel: Felaktigt fÃ¶rkortningsnummer: %u.Dwarf-fel: Kan inte hitta sektion %s.Dwarf-fel: Kunde inte hitta fÃ¶rkortningsnumret %u.Dwarf-fel: Ogiltigt maximala operationer per instruktion.Dwarf-fel: Ogiltigt eller ej hanterat FORM-vÃ¤rde: %#x.Dwarf-fel: Offset (%lu) Ã¤r stÃ¶rre Ã¤n eller i samma storlek som %s (%lu).Dwarf-fel: Kunde inte lÃ¤sa alt ref %u.Dwarf-fel: Ickehanterad version %d av .debug_line.Dwarf-fel: hittade adresstorleken â€�%uâ€�, denna lÃ¤sare kan inte hantera storlekar stÃ¶rre Ã¤n â€�%uâ€�.Dwarf-fel: hittade dwarf version â€�%uâ€�, lÃ¤saren hanterar bara versioner 2,3 och 4.Dwarf-fel: trasig radnummerssektion (felaktigt filnummer).Dwarf-fel: trasig radnummerssektion.EIHD: (storlek: %u, nbr-block: %u)
+StartavstÃ¥nd        = 0x%.8lx (%ld)
+Fel vid lÃ¤sning av %s: %sFel: %B har bÃ¥de aktuella och fÃ¶rÃ¥ldrade Tag_MPextension_use-attributFel intrÃ¤ffade vid bearbetning av filen %sUndantagskatalog [.pdata]Exportkatalog [.edata (eller dÃ¤r vi hittade det)]Exportflaggor 			%lx
+Export-RVAKUNDE INTE HITTA fÃ¶regÃ¥ende HI16-omlokaliseringFILES_VOLUMES    Filformatet Ã¤r tvetydigtFilformatet kÃ¤nns inte igenFilen Ã¤r i fel formatFilen Ã¤r fÃ¶r storFilen trunkeradFlaggfÃ¤lt           = 0x%.2x
+Vidarebefordrar-RVAGALAXY           GP-relativ omlokalisering anvÃ¤ndes dÃ¥ GP inte Ã¤r definieradGP-relativ omlokalisering dÃ¥ _gp inte var definieratGPDISP-omlokalisering hittade inga ldah- och lda-instruktionerGlobal symboltabell:
+ID: %#08lxIDC - Identitetskonsekvenskontroll
+IMAGE_ACTIVATOR  INPUT_SECTION_FLAGS stÃ¶ds ej.
+IO               Avbildsaktivering:  (storlek=%u)
+Avbildsaktiverarfixup: (major: %u, minor: %u)
+Avbildsidentifiering: (major: %u, minor: %u)
+Avbildens sektionsbeskrivning: (major: %u, minor: %u, storlek: %u, fÃ¶rskjutning: %u)
+Avbildens symbol & felsÃ¶ktabell: (major: %u, minor: %u)
+ImportadresstabellkatalogImportkatalog [delar av .idata]Intern inkonsekvens: Ã¥terstÃ¥ende %u != max %u.
+  Rapportera detta fel.Ogiltig TARGET2-omlokaliseringstyp â€�%sâ€�.Ogiltigt bfd-mÃ¥lOgiltig Ã¥tgÃ¤rdOgiltigt sektionsindex i ETIRJALX till en ej ordjusterad adressLOGICAL_NAMES    SprÃ¥kbehandlarens namn
+LÃ¤ngd               = 0x%.8lx (%ld)
+LÃ¤nkare: kan inte initiera ex9-hashtabellfel 
+LÃ¤nkare: kan inte fixa ex9-omlokalisering 
+InlÃ¤sningskonfigurationskatalogMEMORY_MANAGEMENTMIPS16 och microMIPS-funktioner kan inte anropa varandraMISC             MULTI_PROCESSING Ã–vre/Undre 			%d/%d
+Trasigt arkivMaximal stack som krÃ¤vs Ã¤r 0x%v
+MeP: howto %d har typen %dMinnet Ã¤r slutModulhuvud
+NETWORKS         NORMALNamn 				Inget felInga fler arkiverade filerInga symbolerIckerepresenterbar sektion i utdataInte tillrÃ¤ckligt med minne fÃ¶r att sortera omlokaliseringarTal i:
+OPR_ADD (addera)
+OPR_AND (logiskt â€�ochâ€�)
+OPR_ASH (aritmetiskt skifte)
+OPR_COM (komplementera)
+OPR_DIV (division)
+OPR_EOR (logiskt exkluderande â€�ellerâ€�)
+OPR_INSV (infoga fÃ¤lt)
+OPR_IOR (logiskt inkluderande â€�ellerâ€�)
+OPR_MUL (multiplicera)
+OPR_NEG (negera)
+OPR_NOP (no-operation)
+OPR_REDEF (definiera en litteral)
+OPR_REDEF (omdefiniera symbol till nuv. plats)
+OPR_ROT (rotera)
+OPR_SEL (vÃ¤lj)
+OPR_SUB (subtrahera)
+OPR_USH (osignerat skifte)
 Objektmodulen INTE felfri!
 Ordningsbas 			%ld
-Utdatafilen kräver delade biblioteket "%s"
-Utdatafilen kräver delade biblioteket "%s.so.%s"
-PASSMECH är inte helt implementeratPTA passar inte: en SHcompact-adress (bit 0 == 0)PTB passar inte: en SHmedia-adress (bit 0 == 1)Partitionsnamn      = "%s"
-Slut på partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
-Längd på partition[%d] = 0x%.8lx (%ld)
-Sektor för partition[%d] = 0x%.8lx (%ld)
-Rapportera gärna detta fel.
-Läser arkivfilens modifieringstidsstämpelReferens till den avlägsna symbolen "%s" med hjälp av en felaktig omlokalisering kan resultera i felaktig exekveringRegister %%g%d används inkompatibelt: %s i %s, tidigare %s i %sRegistersektion har innehåll
-ReserveradResurskatalog [.rsrc]SDA-omlokalisering då _SDA_BASE_ inte är definieratSEC_RELOC utan omlokaliseringar i sektion %sSektionen har inget innehållSäkerhetskatalogStorleken passar inte på sektion %s=%lx, %s=%lxSpecialkatalogStacken ger överspill (%d) i _bfd_vms_pushStacken ger underspill i _bfd_vms_popSymbolen %s är inte definierad för fixar
-Symbolen %s ersatt med %s
-Symbolen "%s" har olika typer: %s i %s, tidigare REGISTER i %sSymbolen "%s" har olika typer: REGISTER i %s, tidigare %s i %sSymbolen kräver felsökningssektion som inte finnsSystemanropsfelTOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompileringTabelladresser
-Trådlagringskatalog [.tls]Tid-/Datumstämpel 		%lx
-Kan inte hitta ekvivalent utdatasektion för symbolen "%s" från sektionen "%s"Oväntat STO_SH5_ISA32 på lokal symbol hanteras inteOhanterad sektionstyp %d för OSF/1-minnesfil
-Ohanterad omlokalisering %sOkänd grundtyp %dOkänt TI COFF-målid "0x%x"Okänd omlokaliseringOkänd omlokaliseringstyp 0x%x.stab-omlokalisering som inte stödsVariabel "%s" kan bara vara i ett av de små, tomma och pyttesmå dataområdenaVariabel "%s" kan inte vara i både små och pyttesmå dataområden samtidigtVariabel "%s" kan inte vara i både små och tomma dataområden samtidigtVariabel "%s" kan inte vara i både tomma och pyttesmå dataområden samtidigtVariabel "%s" kan inte befinna sig i flera små dataområdenVarning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d
-Varning: %s stöder inte samverkande, medan %s däremot gör detVarning: %s stöder samverkande, medan %s däremot inte gör detVarning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %s har länkats med detVarning: Stänger av samverkansflaggan för %s på grund av begäran utifrånVarning: Ställer inte in samverkansflaggan för %s eftersom den redan har angivits som inte samverkandeVarning: Skrivning av sektionen "%s" till enormt (dvs negativt) avlägsen byte 0x%lx.Varning: justeringen %u på symbolen "%s" i %s är mindre än %u i %sVarning: antalet fixar stämmer inte
-Varning: storleken på symbolen "%s" ändrades från %lu i %s till %lu i %sVarning: typen på symbolen "%s" ändrades från %d till %d i %sVarning: arkivskrivning var långsam: skriver om tidsstämpel
-Skriver uppdaterad armap-tidsstämpel[abi=16-bitars heltal, [abi=32-bitars heltal, [vars namn tappats bort]_bfd_vms_output_counted called anropad med för många byte_bfd_vms_output_counted anropad med noll bytefelaktigt sektionsindex i %sbankad adress [%lx:%04lx] (%lx) är inte i samma bank som den aktuella bankade adressen [%lx:%04lx] (%lx)bfd_make_section (%s) misslyckadesbfd_set_section_flags (%s, %x) misslyckadeskan inte bygga grenstubb "%s"kan inte hitta grenstubb "%s"kan inte hantera R_MEM_INDIRECT-omlokalisering vid användning av %s-utdatatrasig %s-sektion i %strasig eller tom %s-sektion i %skunde inte lokalisera speciell länkarsymbol __ctbpkunde inte lokalisera speciell länkarsymbol __epkunde inte lokalisera speciell länkarsymbol __gpcpu=HC11]cpu=HC12]cpu=HCS12]fel: odefinierad symbol __rtinitmisslyckades med att allokera utrymme för ny APUinfo-sektion.misslyckades med att beräkna ny APUinfo-sektion.misslyckades med att gå in i %smisslyckades med att installera ny APUinfo-sektion.allmän länkare kan inte hantera %signorerar omlokalisering %s
-internt fel: farligt felinternt fel: farlig omlokaliseringinternt fel: utanför intervalletinternt fel: okänt felinternt fel: omlokaliseringen stöds inteip2k-länkare: sidinstruktion saknas vid 0x%08lx (dest = 0x%08lx).ip2k-länkare: redundant sidinstruktion vid 0x%08lx (dest = 0x%08lx).ip2k-relaxerare: switchtabellshuvud trasigt.ip2k-relaxerare: switchtabell utan helt matchande omlokaliseringsinformation.länktabellsfel mot "%s"länkarstubbar i %u grupper
-  gren           %lu
-  toc-justering  %lu
-  lång gren      %lu
-  lång toc-just. %lu
-  plt-anrop      %luIHCONST-omlokalisering saknasIHIHALF-omlokalisering saknasicke-tomt addendum i @fptr-omlokaliseringinte tillräckligt med GOT-utrymme för lokala GOT-postermappar inte: data=%lx mappat=%d
-mappar inte: miljövariabel är inte satt
-objektkod %d kunde inte hittasprivata flaggor = %lxprivata flaggor = %lx:privata flaggor = %lx: privata flaggor = %x:privata flaggor = 0x%lx:referens till en bankad adress [%lx:%04lx] i det normala adressutrymmet vid %04lxomlokalisering mot sektion som inte stödsomlokalisering inte på jämn gränsreserverat CTL-kommando %dreserverat OPR-kommando %dreserverat STA-kommando %dreserverat STO-kommando %dsom_sizeof_headers är inte implementeratstack-entry-mask är inte helt implementeratstack-from-image är inte implementeratstack-literal är inte helt implementeratstack-local-symbol är inte helt implementeratstack-local-symbol-entry-point-mask är inte helt implementeratstatisk procedur (inget namn)stubbpost för %s kan inte läsa in .plt, dp-avstånd = %ldstubbar stämmer inte överens med beräknad storlekkan inte läsa in %s-sektion från %sosäker anropskonvention för icke-COFF-symbolokänd gsd/egsd-undertyp %dSTA-kommando %s stöds inteomlokaliseringen stöds inteomlokaliseringstypen stöds inteomlokalisering mellan data/-instruktionsadressutrymmen stöds inteanvänder flera gp-värdenv850-arkitekturv850e-arkitekturvarning: sektionen %s har nollstorlekvarning: %s: lokala symbolen "%s" har ingen sektionvarning: försök att exportera odefinierade symbolen "%s"varning: typen och storleken på dynamiska symbolen "%s" är inte definieradevarning: kan inte ställa in storleken för sektionen %s i %svarning: kan inte uppdatera innehållet i %s-sektion i %s
\ No newline at end of file
+Utdatafilen krÃ¤ver delade biblioteket â€�%sâ€�
+Utdatafilen krÃ¤ver delade biblioteket â€�%s.so.%sâ€�
+POSIX            PROCESS_SCHED    PRVFXDPRVPICPSC - Programsektionsdefinition
+PTA passar inte: en SHcompact-adress (bit 0 == 0)PTB passar inte: en SHmedia-adress (bit 0 == 1)Partitionsnamn      = â€�%sâ€�
+Slut pÃ¥ partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+LÃ¤ngd pÃ¥ partition[%d] = 0x%.8lx (%ld)
+Sektor fÃ¶r partition[%d] = 0x%.8lx (%ld)
+Rapportera gÃ¤rna detta fel.
+RL78/G10 ABI-konflikt: kan inte lÃ¤nka samman G10 och icke-G10 objektR_BFIN_FUNCDESC anvÃ¤nder dynamisk symbol med en addend som inte Ã¤r nollR_BFIN_FUNCDESC_VALUE anvÃ¤nder dynamisk symbol med addend som inte Ã¤r nollR_FRV_TLSMOFFLO inte tillÃ¤mpad pÃ¥ en setlo eller setlos instruktion
+LÃ¤ser arkivfilens modifieringstidsstÃ¤mpelReferens till den avlÃ¤gsna symbolen â€�%sâ€� med hjÃ¤lp av en felaktig omlokalisering kan resultera i felaktig exekveringRegistret %%g%d anvÃ¤ndes pÃ¥ ett inkompatibelt sÃ¤tt: %s i %B, fÃ¶rut %s i %BRegistersektion har innehÃ¥ll
+Omlokalisering fÃ¶r icke-REL psectTar bort oanvÃ¤nda sektionen â€�%sâ€� i filen â€�%Bâ€�ReserveradResurskatalog [.rsrc]S12-adress (%lx) Ã¤r inte inom delat RAM(0x2000-0x4000), dÃ¤rfÃ¶r mÃ¥ste du manuellt fÃ¶rskjuta adressen i din kodSDA-omlokalisering dÃ¥ _SDA_BASE_ inte Ã¤r definieratSECURITY         SEC_RELOC utan omlokaliseringar i sektion %sSH-fel: okÃ¤nd omlokaliseringstyp %dSHELL            SHRFXDSHRPICSPSC - Delad avbilds-programsektionsdef
+STABLE           STA_CKARG (jÃ¤mfÃ¶r procedurargument)
+STA_GBL (global stack) %.*s
+STA_LI (litteral stack)
+STA_LW (longword-stack) 0x%08x
+STA_MOD (modulstack)
+STA_PQ (psect-basstack + fÃ¶rskjutning)
+STA_QW (quadword-stack) 0x%08x %08x
+STC_BOH_GBL (lagra villk. BOH i global adress)
+STC_BOH_PS (lagra villk. BOH i psect + fÃ¶rskjutning)
+STC_BSR_GBL (lagra villk. BSR i global adress)
+STC_BSR_PS (lagra villk. BSR i psect + fÃ¶rskjutning)
+STC_GBL (lagra villkor globalt)
+STC_GCA (lagra villkorets kodadress)
+STC_LDA_GBL (lagra villk. LDA i global adress)
+STC_LDA_PS (lagra villk. LDA i psect + fÃ¶rskjutning)
+STC_LP (lagra villkorslÃ¤nkpar)
+STC_LP_PSB (lagra villkorslÃ¤nkpar + signatur)
+STC_NBH_GBL (lagra villk. eller hint i global adress)
+STC_NBH_PS (lagra villk. eller hint i psect + fÃ¶rskjutning)
+STC_NOP_GBL (lagra villk. NOP i global adress)
+STC_NOP_PS (lagra villk. NOP i psect + fÃ¶rskjutning)
+STC_PS (lagra villkorets psect + offset)
+STO_AB (lagra absolut gren)
+STO_B (lagra byte)
+STO_BR_GBL (lagra gren globalt) *todo*
+STO_BR_PS (lagra grenens psect + offset) *todo*
+STO_CA (lagra kodadress) %.*s
+STO_GBL (lagra global) %.*s
+STO_GBL_LW (lagra globalt lÃ¥ngord) %.*s
+STO_IMM (lagra omedelbart) %u byte
+STO_IMMR (lagra omedelbar upprepning) %u byte
+STO_LW (lagra lÃ¥ngord)
+STO_OFF (lagra LP med procedursignatur)
+STO_OFF (lagra offset i psect)
+STO_QW (lagra quad-ord)
+STO_RB (lagra relativ gren)
+STO_W (lagra ord)
+SYM - Global symboldefinition
+SYM - Global symbolreferens
+SYMG - Universell symboldefinition
+SYMM - Global symboldefinition med versioner
+SYMV - Vektoriserad symboldefinition
+SYSGEN           sektionen har inget innehÃ¥llSÃ¤kerhetskatalogStorleksfel i sektion %sKÃ¤llkodsfilers huvud
+SpecialkatalogOriktig ALPHA_R_BSR-omlokaliseringStackanalys kommer ignorera anropet frÃ¥n %s till %s
+Stacken ger Ã¶verspill (%d) i _bfd_vms_pushStackstorlek fÃ¶r anropsgrafens rotnoder.
+Stacken ger underspill i _bfd_vms_popSteg:
+Symbolen %s Ã¤r inte definierad fÃ¶r fixar
+Symbolen â€�%sâ€� har skiljande typer: %s i %B, fÃ¶rut REGISTER i %BSymbolen â€�%sâ€� har skiljande typer: REGISTER i %B, fÃ¶rut %s i %BSymbolen krÃ¤ver felsÃ¶kningssektion som inte finnsSystemanropsfelTLS-omlokalisering ogiltig utan dynamiska sektionerTOC ger Ã¶verspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompileringTabelladresser
+TrÃ¥dlagringskatalog [.tls]Tid-/DatumstÃ¤mpel 		%lx
+Titeltexthuvud
+FÃ¶rsÃ¶kte aktivera relax fÃ¶r att undvika omlokaliseringstrunkeringarUSRSTACKKan inte hitta ekvivalent utdatasektion fÃ¶r symbolen â€�%sâ€� frÃ¥n sektionen â€�%sâ€�Kunde inte nÃ¥ %s (pÃ¥ 0x%08x) frÃ¥n den globala pekaren (pÃ¥ 0x%08x) eftersom fÃ¶rskjutningen (%d) Ã¤r utanfÃ¶r det tillÃ¥tna intervallet, -32678 till 32767.
+OvÃ¤ntat STO_SH5_ISA32 pÃ¥ lokal symbol hanteras inteOvÃ¤ntat maskinnummerOhanterad sektionstyp %d fÃ¶r OSF/1-minnesfil
+Ohanterad omlokalisering %sOkÃ¤nd EGSD-deltyp %dOkÃ¤nd grundtyp %dOkÃ¤nd omlokalisering %sOkÃ¤nd omlokalisering %s + %sOkÃ¤nd symbol i kommando %sOkÃ¤nd INPUT_SECTION_FLAG %s
+OkÃ¤nt TI COFF-mÃ¥lid â€�0x%xâ€�OkÃ¤nd omlokaliseringOkÃ¤nd omlokaliseringstyp 0x%x.stab-omlokalisering som inte stÃ¶dsVOLATILE         Variabel â€�%sâ€� kan bara vara i ett av de smÃ¥, tomma och pyttesmÃ¥ dataomrÃ¥denaVariabel â€�%sâ€� kan inte vara i bÃ¥de smÃ¥ och pyttesmÃ¥ dataomrÃ¥den samtidigtVariabel â€�%sâ€� kan inte vara i bÃ¥de smÃ¥ och tomma dataomrÃ¥den samtidigtVariabel â€�%sâ€� kan inte vara i bÃ¥de tomma och pyttesmÃ¥ dataomrÃ¥den samtidigtVariabel â€�%sâ€� kan inte befinna sig i flera smÃ¥ dataomrÃ¥denVarning, storleken pÃ¥ .pdata-sektionen (%ld) Ã¤r inte en multipel av %d
+Varning: %B stÃ¶der inte samverkan, medan %B gÃ¶r detVarning: %B Ã¤r avkortad: fÃ¶rvÃ¤ntade mig kÃ¤rnfilsstorlek >= %lu, hittade: %lu.Varning: %B stÃ¶der samverkan, medan %B inte gÃ¶r detVarning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder %sVarning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder MSA-ABI %dVarning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder okÃ¤nd flyttals-ABI %dVarning: %B anvÃ¤nder hÃ¥rt flyttal med dubbelprecision, %B anvÃ¤nder hÃ¥rt flyttal med enkel precisionVarning. %B anvÃ¤nder hÃ¥rt flyttal, %B anvÃ¤nder mjukt flyttalVarning: %B anvÃ¤nder r3/r4 fÃ¶r smÃ¥ struktur-returneringar, %B anvÃ¤nder minnetVarning: %B anvÃ¤nder mjuka flyttal, %B anvÃ¤nder hÃ¥rda flyttal med enkelprecisionVarning: %B anvÃ¤nder okÃ¤nt MSA-ABI %d (satt av %B), %B anvÃ¤nder %sVarning: %B anvÃ¤nder okÃ¤nt MSA-ABI %d (satt av %B), %B anvÃ¤nder okÃ¤nd MSA-ABI %dVarning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %dVarning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %d (satt av %B), %B anvÃ¤nder %sVarning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %d (satt av %B), %B anvÃ¤nder okÃ¤nd flyttals-ABI %dVarning: %B anvÃ¤nder okÃ¤nd konvention %d fÃ¶r smÃ¥ strukturers returerVarning: %B anvÃ¤nder okÃ¤nd vektor-ABI %dVarning: %B anvÃ¤nder vektor-ABI â€�%sâ€�, %B anvÃ¤nder â€�%sâ€�Varning: %B: Motstridig plattformskonfigureringVarning: %B: OkÃ¤nt EABI-objektattribut %dVarning: %B: OkÃ¤nt MSPABI-objektattribut %dVarning: Rensar %Bs samverkandeflagga eftersom ej samverkande kod i %B har lÃ¤nkats till denVarning: Rensar samverkandeflaggan fÃ¶r %B pÃ¥ begÃ¤ran utifrÃ¥nVarning: StÃ¤ller inte in interoperationsflagga fÃ¶r %B eftersom den redan har angetts som ej samverkandeVarning: RL78_SYM-omlokalisering med en okÃ¤nd symbolVarning: RX_SYM-omlokalisering med en okÃ¤nd symbolVarning: Skrivning av sektionen â€�%sâ€� till enormt (dvs negativt) avlÃ¤gsen byte 0x%lx.Varning: rÃ¤ttning %u fÃ¶r gemensam symbol â€�%sâ€� i %B Ã¤r stÃ¶rre Ã¤n rÃ¤ttningen (%u) av dess sektion %AVarning: rÃ¤ttning %u fÃ¶r symbol â€�%sâ€� i %B Ã¤r mindre Ã¤n %u i %BVarning: antalet fixar stÃ¤mmer inte
+Varning: flaggan gc-sections ignorerasVarning: storleken fÃ¶r symbol â€�%sâ€� Ã¤ndrades frÃ¥n %lu i %B till %lu i %BVarning: type av symbol â€�%sâ€� har Ã¤ndrats frÃ¥n %d till %d i %BVarning: arkivskrivning var lÃ¥ngsam: skriver om tidsstÃ¤mpel
+Skriver uppdaterad armap-tidsstÃ¤mpelXGATE-adress (%lx) Ã¤r inte inom delat RAM(0xE000-0xFFFF), dÃ¤rfÃ¶r mÃ¥ste du manuellt fÃ¶rskjuta adressen och mÃ¶jligtvis hantera sidan i din kod.[%u]: %u
+[%u]: LÃ¤gre: %u, Ã¶vre: %u
+[abi=16-bitars heltal, [abi=32-bitars heltal, [vars namn tappats bort]\%B: Varning: Arm BLX-instruktion pekar mot Arm-funktionen â€�%sâ€�._bfd_vms_output_counted called anropad med fÃ¶r mÃ¥nga byte_bfd_vms_output_counted anropad med noll byteadressadressen inte ordjusteradarstorlek: %u, a0: 0x%08x
+felaktigt sektionsindex i %sbankad adress [%lx:%04lx] (%lx) Ã¤r inte i samma bank som den aktuella bankade adressen [%lx:%04lx] (%lx)bas: %u, pos: %u
+bfd_mach_o_canonicalize_symtab: kunde inte ladda symbolerbfd_mach_o_read_symtab_symbol: namn utanfÃ¶r intervallet (%lu >= %lu)bfd_mach_o_read_symtab_symbol: symbol â€�%sâ€� angav ogiltig sektion %d (max %lu): stÃ¤ller in som odefinieradbfd_mach_o_read_symtab_symbol: symbol â€�%sâ€� angav ogiltigt typfÃ¤lt 0x%x: stÃ¤ller in som odefinieradbfd_mach_o_read_symtab_symbol: kunde inte lÃ¤sa %d byte vid %lubfd_mach_o_read_symtab_symbols: kunde inte allokera minne fÃ¶r symbolerbfd_mach_o_scan: okÃ¤nd arkitektur 0x%lx/0x%lxbfd_pef_scan: okÃ¤nd arkitektur 0x%lxblkbeg: adress: 0x%08x, namn: %.*s
+blkend: storlek: 0x%08x
+kan inte skicka dynamiska omlokaliseringar till en skrivskyddad sektionkan inte skicka fixar till en skrivskyddad sektionKan inte hitta EMH i fÃ¶rsta GST-posten
+kan inte hantera R_MEM_INDIRECT-omlokalisering vid anvÃ¤ndning av %s-utdataKan inte lÃ¤sa DMT
+Kan inte lÃ¤sa DMT-huvud
+Kan inte lÃ¤sa DMT-psect
+kan inte lÃ¤sa DST
+Kan inte lÃ¤sa DST-huvud
+Kan inte lÃ¤sa DST-symbol
+Kan inte lÃ¤sa EIHA
+Kan inte lÃ¤sa EIHD
+Kan inte lÃ¤sa EIHI
+Kan inte lÃ¤sa EIHS
+Kan inte lÃ¤sa EIHVN-huvud
+Kan inte lÃ¤sa EIHVN-version
+Kan inte lÃ¤sa EISD
+Kan inte lÃ¤sa GST
+Kan inte lÃ¤sa GST-post
+Kan inte lÃ¤sa GST-postens huvud
+Kan inte lÃ¤sa GST-postens lÃ¤ngd
+klass: %u, dtype: %u, lÃ¤ngd: %u, pekare: 0x%08x
+korrupt %s-sektion i %Bkunde inte lokalisera speciell lÃ¤nkarsymbol __ctbpkunde inte lokalisera speciell lÃ¤nkarsymbol __epkunde inte lokalisera speciell lÃ¤nkarsymbol __gpKunde inte Ã¶ppna delad avbild â€�%sâ€� frÃ¥n â€�%sâ€�cpu=HC11]cpu=HC12]cpu=HCS12]cpu=XGATE]riskabel omlokaliseringdelta pc +%-4ddelta_pc_l: +0x%08x
+delta_pc_w %u
+beskrdimct: %u, aflaggor: 0x%02x, siffror: %u, skala: %u
+kastade utdata-sektion: â€�%Aâ€�osammanhÃ¤ngande intervall (nbr: %u)
+dynamisk omlokalisering i skrivskyddad sektiondynamisk variabel â€�%sâ€� Ã¤r av storlek nollenumbeg, len: %u, namn: %.*s
+enumelt, namn: %.*s
+enumend
+epilog: flaggor: %u, antal: %u
+fel vid lÃ¤sning av cpu-typ frÃ¥n privat elf-datafel: %B innehÃ¥ller en omlokalisering (0x%s) fÃ¶r sektion %A som anvÃ¤nder en icke-existerande global symbolfel: %B anvÃ¤nder inte Maverick-instruktioner, men det gÃ¶r %Bfel: %B Ã¤r redan i fÃ¤rdigt BE8-formatfel: %B kompilerades som absolut position-kod, medan mÃ¥let %B Ã¤r positionsoberoendefel: %B kompilerades som positionsoberoende kod, medan mÃ¥let %B Ã¤r en absolut positionfel: %B kompilerades fÃ¶r APCS-%d, medan %B kompilerades fÃ¶r APCS-%dfel: %B kompilerades fÃ¶r APCS-%d, medan destinationen %B anvÃ¤nder APCS-%dfel: %B kompilerades fÃ¶r EP9312, medan %B kompilerades fÃ¶r XScalefel: %B skickar flyttal i flyttalsregister, medan %B skickar dem i heltalsregisterfel: %B skickar flyttal i heltalsregister, medan %B skickar dem i flyttalsregisterfel: %B krÃ¤ver mer vektorjustering Ã¤n %B bevararfel: %B krÃ¤ver mer stackrÃ¤ttning Ã¤n %B bevararfel: %B anvÃ¤nder %s-instruktioner men %B anvÃ¤nder %sfel: %B anvÃ¤nder FPA-instruktioner, men inte %Bfel: %B anvÃ¤nder Maverick-instruktioner, men inte %Bfel: %B anvÃ¤nder VFP-instruktioner, men inte %Bfel: %B anvÃ¤nder VFP-registerargument, men inte %Bfel: %B anvÃ¤nder FP i hÃ¥rdvara, medan %B anvÃ¤nder FP i mjukvarafel: %B anvÃ¤nder iWMMXt-registerargument, men inte %Bfel: %B anvÃ¤nder FP i mjukvara, medan %B anvÃ¤nder FP i hÃ¥rdvarafel: %B anvÃ¤nder %s-kodmodell men %B anvÃ¤nder %s-kodmodellfel: %B anvÃ¤nder %s-datamodellen men %B anvÃ¤nder MSP430-instruktionerfel: %B anvÃ¤nder %s-datamodellen men %B anvÃ¤nder %s-datamodellenfel: %B anvÃ¤nder den stora kodmodellen men %B anvÃ¤nder MSP430-instruktionerfel: %B anvÃ¤nder den mindre kodmodellen men %B anvÃ¤nder %s-datamodellenfel: %B: Motstridiga CPU-arkitekturer %d/%dfel: %B: Motstridiga arkitekturprofiler %c/%cfel: %B: Konflikt vid anvÃ¤ndande av R9fel: %B: Objektet har leverantÃ¶rspecifikt innehÃ¥ll som mÃ¥ste behandlas av verktygskedjan â€�%sâ€�fel: %B: Objektetikett â€�%d, %sâ€� Ã¤r inkompatibel med etikett â€�%d, %sâ€�fel: %B: SB-relativ adressering kolliderar med anvÃ¤ndande av R9fel: %B: OkÃ¤nd CPU-arkitekturFel: %B: storleken pÃ¥ sektion %A Ã¤r inte en multipel av adresstorlekenfel: %B: kunde inte sammanfoga virtualiseringsattribut med %Bfel: kan inte hitta symbol: _SDA_BASE_.fel: KÃ¤llkodsobjekt %B har EABI-version %d, men destinationen %B har EABI-version %dfel: fp16-format stÃ¤mmer inte Ã¶verens mellan %B och %Bfel: olÃ¤mplig omplaceringstyp fÃ¶r delat bibliotek (glÃ¶mde du -fpic?)fel: krÃ¤vd sektion â€�%sâ€� inte funnen i lÃ¤nkarens skriptfel: odefinierad symbol __rtinitfel: okÃ¤nt Tag_ABI_array_object_align_expected-vÃ¤rde i %Bfel: okÃ¤nt Tag_ABI_array_object_alignment-vÃ¤rde i %BkÃ¶rbar filmisslyckades med att allokera utrymme fÃ¶r nytt APUinfo-sektion.misslyckades med att berÃ¤kna nytt APUinfo-sektion.misslyckades med att installera nytt APUinfo-sektion.Ã¶desdigert fel nÃ¤r .fixup skapadesallmÃ¤n lÃ¤nkare kan inte hantera %sglobal pekarrelativ adress utanfÃ¶r intervallglobal pekarrelativ omlokalisering pÃ¥ adress 0x%08x nÃ¤r _gp inte Ã¤r definierad
+global pekarrelativ omlokalisering nÃ¤r _gp inte definieradesdold symbolignorerar omlokalisering %s
+incr_linum(b): +%u
+incr_linum_l: +%u
+incr_linum_w: +%u
+internt fel: addend bÃ¶r vara noll fÃ¶r R_LM32_16_GOTinterna fel: grena/hoppa till en udda upptÃ¤ckt adressinternt fel: farligt felinternt fel: farlig omlokaliseringinternt fel: utanfÃ¶r intervalletinternt fel: suspekt omlokaliseringstyp fÃ¶r delade bibliotekinternt fel: okÃ¤nt felinternt fel: omlokaliseringen stÃ¶ds inteintern inkonsekvens i storleken fÃ¶r .got.loc-sektionenintern symbologiltig inmatningsomlokalisering vid skapande av icke-ELF, icke-mmoformatutmatning.
+ AnvÃ¤nd objcopy-programmet fÃ¶r att konvertera frÃ¥n ELF till mmo,
+ eller assemblera med â€�-no-expandâ€� (fÃ¶r gcc, â€�-Wa,-no-expandâ€�ogiltig inmatningsomlokalisering vid skapandet av icke-ELF, icke-mmoformatutmatning.
+ AnvÃ¤nd programmet objcopy till att konvertera frÃ¥n ELF eller mmo,
+ eller kompilera genom flaggan gcc â€�-mno-base-addressesâ€�.ogiltig omlokaliseringsadressogiltig omlokaliseringstyp %dogiltig anvÃ¤ndning av %s med sammanhangip2k-lÃ¤nkare: sidinstruktion saknas vid 0x%08lx (dest = 0x%08lx).ip2k-lÃ¤nkare: Ã¶verflÃ¶dig sidinstruktion vid 0x%08lx (dest = 0x%08lx).ip2k-relaxer: switch-tabellshuvud trasigt.ip2k-relaxer: switchtabell utan helt matchande omlokaliseringsinformation.radnum  (len: %u)
+lÃ¤nkningsbar avbildlÃ¤nkarstubbe i %u grupp%s
+  gren       %lu
+  toc-just   %lu
+  lÃ¥nggren  %lu
+  lÃ¥ng-toc-just %lu
+  plt-anr     %lu
+  plt-anr-toc %lulitteralbokstavstrogen omlokalisering utfÃ¶rs fÃ¶r en extern symbolmach-o: det finns fÃ¶r mÃ¥nga sektion (%d) maximalt Ã¤r 255,
+mep: ingen omlokalisering fÃ¶r kod %dmodbeg
+modend
+namn: [vÃ¤r: %08lx lÃ¤n %d]: nativosammanhÃ¤ngande fÃ¤lt av %s
+icke-dynamiska omlokaliseringar anvÃ¤nder dynamisk symbol %sicke-Ã¶verlÃ¤ggsstorlek pÃ¥ 0x%v plus stÃ¶rsta Ã¶verlÃ¤ggsstorlek pÃ¥ 0x%v Ã¶verstiger lokal lagring
+icke-tom addend i @fptr-omlokaliseringinte tillrÃ¤ckligt med GOT-utrymme fÃ¶r lokala GOT-postermappar inte: data=%lx mappat=%d
+mappar inte: miljÃ¶variabel Ã¤r inte satt
+utanfÃ¶r intervallÃ¶verbelastning efter relaxomlokalisering fÃ¶r Ã¶verlÃ¤ggsstubbe spillde Ã¶verprivata flaggor = %lxprivata flaggor = %lx:privata flaggor = %lx: privata flaggor = %x:privata flaggor = 0x%lxprivata flaggor = 0x%lx:prolog: bkpt-adress 0x%08x
+skyddad symbolrecbeg: namn: %.*s
+recend
+referens till en banked-adress [%lx:%04lx] i det normala adressutrymmet vid %04lxregomplacering â€�%sâ€� Ã¤nnu inte tillÃ¤mpadomlokalisering utanfÃ¶r intervalletomlokalisering anvÃ¤nder symbol som inte definierats i modulenomlokalisering krÃ¤ver addend som Ã¤r nollomlokalisering bÃ¶r ske med jÃ¤mna siffroromlokaliseringar mellan olika segment saknar stÃ¶dÃ¶ppnar %B igen: %s
+reserverat cmd %drtnbeg
+rtnend: storlek 0x%08x
+septyp, namn: %.*s
+set_abs_pc: 0x%08x
+set_line_num(w) %u
+set_line_num_b %u
+set_line_num_l %u
+small-data-sektion Ã¶verstiger 64Kb; minska small-data-storleksgrÃ¤ns (se flaggan -G)som_sizeof_headers Ã¤r inte implementerattyvÃ¤rr, inget stÃ¶d fÃ¶r duplicerade objektfiler i auto-Ã¶verlÃ¤ggsskript
+tyvÃ¤rr: modtab, toc och extrefsyms Ã¤r Ã¤nnu inte implementerade fÃ¶r dysymtab-kommandon.kÃ¤lla (len: %u)
+Standarddata: %s
+statisk procedur (inget namn)stubbpost fÃ¶r %s kan inte lÃ¤sa in .plt, dp-fÃ¶rskjutning = %ldstubbar stÃ¤mmer inte Ã¶verens med berÃ¤knad storleksymbolfÃ¤ltinformation om systemversion:
+term(b): 0x%02xterm_w: 0x%04xtypspec (len: %u)
+kunde inte hitta ARM-klister â€�%sâ€� fÃ¶r â€�%sâ€�kunde inte hitta THUMB-klister â€�%sâ€� fÃ¶r â€�%sâ€�kunde inte lÃ¤sa i sektionen %s frÃ¥n %Bkunde inte skriva okÃ¤nt laddningskommando 0x%lxotillrÃ¤ttad bitstrÃ¤ng av %s
+osÃ¤ker anropskonvention fÃ¶r icke-COFF-symbolodefinierad %s-referens i komplex symbol: %sohanterad egsd-posttyp %u
+ohanterad emh-deltyp %u
+okÃ¤ndokÃ¤nt ETIR-kommando %dokÃ¤nt felokÃ¤nt byte-ordningsvÃ¤rde i huvudet; 0x%lxokÃ¤nt radkommando %dOkÃ¤nd operand â€�%câ€� i komplex symbolokÃ¤nt kÃ¤llkommando %dokÃ¤nd v850-arkitekturSTA-kommando %s stÃ¶ds inteomlokaliseringen stÃ¶ds inteomlokaliseringstypen stÃ¶ds inteomlokalisering utan stÃ¶domlokalisering mellan data/-instruktionsadressutrymmen stÃ¶ds inteanvÃ¤nder flera gp-vÃ¤rdenv850 E3-arkitekturv850-arkitekturv850e-arkitekturv850e1-arkitekturv850e2-arkitekturv850e2v3-arkitekturv850e3v5-arkitekturvflaggor: 0x%02x, vÃ¤rde: 0x%08x vma:			Startadress	 Slutadress	  Unwinddata
+varning: %B och %B skiljer i wchar_t-storlekvarning: %B och %B skiljer sig ifrÃ¥ga om koden Ã¤r kompilerad fÃ¶r DSBT eller ejvarning: %B anvÃ¤nder %s enum, men utdata ska anvÃ¤nda %s enum; anvÃ¤ndning av enum-vÃ¤rden mellan objekt kanske inte fungerarvarning: %B anvÃ¤nder %u-byte wchar_t, men utdata ska anvÃ¤nda %u-byte wchar_t; anvÃ¤ndning av wchar_t-vÃ¤rden mellan objekt kanske inte fungerarvarning: %B: den lokala symbolen â€�%sâ€� har ingen sektionvarning: %s Ã¶verstiger sektionens storlek
+varning: %s har ett fÃ¶rdÃ¤rvat strÃ¤ngtabellindex - ignorerarvarning: %s Ã¶verlappar %s
+varning: sektionen %s har nollstorlekvarning: .pdata-sektionsstorlek (%ld) Ã¤r inte en multiplikator av %d
+varning: fÃ¶rsÃ¶k att exportera odefinierade symbolen â€�%sâ€�varning: anrop till icke-funktionssymbolen %s definierat i %Bvarning: generera ett delat bibliotek innehÃ¥llandes icke-PIC-kodvarning: generera ett delat bibliotek innehÃ¥llandes icke-PID-kodvarning: omlokalisering anvÃ¤nder ett annat segmentvarning: sektion â€�%sâ€� gÃ¶rs om till en anteckningvarning: sektion â€�%Aâ€� typ Ã¤ndrades till PROGBITSvarning: typen och storleken pÃ¥ dynamiska symbolen â€�%sâ€� Ã¤r inte definieradevarning: kunde inte ange storlek fÃ¶r sektionen %s i %Bvarning: kan inte uppdatera innehÃ¥llet i %s-sektion i %sdu har inte tillstÃ¥nd att definiera %s i ett skript
\ No newline at end of file
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sv.po ./bfd/po/sv.po
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/sv.po	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/sv.po	2017-03-06 01:49:05.000000000 +0000
@@ -1,522 +1,597 @@
 # Swedish messages for bfd.
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the binutils package.
+# Copyright Â© 2001 - 2016 Free Software Foundation, Inc.
 # Christian Rose <menthos@menthos.com>, 2001, 2002, 2003.
-#
+# Arve Eriksson <031299870@telia.com >, 2011.
+# Josef Andersson <josef.andersson@fripost.org>, 2016.
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.14rel030712\n"
-"POT-Creation-Date: 2003-07-11 13:53+0930\n"
-"PO-Revision-Date: 2003-08-14 22:40+0200\n"
-"Last-Translator: Christian Rose <menthos@menthos.com>\n"
-"Language-Team: Swedish <sv@li.org>\n"
+"Project-Id-Version: bfd-2.24.90\n"
+"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
+"POT-Creation-Date: 2014-02-10 09:42+1030\n"
+"PO-Revision-Date: 2016-05-14 04:05+0200\n"
+"Last-Translator: Josef Andersson <josef.andersson@fripost.org>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+"X-Launchpad-Export-Date: 2016-05-06 19:08+0000\n"
+
+#: aout-adobe.c:127
+msgid "%B: Unknown section type in a.out.adobe file: %x\n"
+msgstr "%B: OkÃ¤nd sektionstyp i filen a.out.adobe: %x\n"
 
-#: aout-adobe.c:204
-#, c-format
-msgid "%s: Unknown section type in a.out.adobe file: %x\n"
-msgstr "%s: Okänd sektionstyp i a.out.adobe-fil: %x\n"
-
-#: aout-cris.c:207
+#: aout-cris.c:200
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: Ogiltig omlokaliseringstyp exporterad: %d"
 
-#: aout-cris.c:251
-#, c-format
-msgid "%s: Invalid relocation type imported: %d"
-msgstr "%s: Ogiltig omlokaliseringstyp importerad: %d"
-
-#: aout-cris.c:262
-#, c-format
-msgid "%s: Bad relocation record imported: %d"
-msgstr "%s: Felaktig omlokaliseringstyp importerad: %d"
+#: aout-cris.c:243
+msgid "%B: Invalid relocation type imported: %d"
+msgstr "%B: Ogiltig omlokaliseringstyp importerad: %d"
+
+#: aout-cris.c:254
+msgid "%B: Bad relocation record imported: %d"
+msgstr "%B: DÃ¥lig omlokaliseringspost importerad: %d"
 
-#: aoutx.h:1295 aoutx.h:1716
+#: aoutx.h:1273 aoutx.h:1611
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr "%s: kan inte representera sektionen \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan inte representera sektionen â€�%sâ€� i a.out-objektfilformat"
 
-#: aoutx.h:1682
+#: aoutx.h:1577
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr "%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan inte representera sektionen fÃ¶r symbolen â€�%sâ€� i a.out-objektfilformat"
 
-#: aoutx.h:1684
+#: aoutx.h:1579 vms-alpha.c:7564
 msgid "*unknown*"
-msgstr "*okänd*"
+msgstr "*okÃ¤nd*"
+
+#: aoutx.h:4018 aoutx.h:4344
+msgid "%P: %B: unexpected relocation type\n"
+msgstr "%P: %B: ovÃ¤ntad omlokaliseringstyp\n"
 
-#: aoutx.h:3776
+#: aoutx.h:5375
 #, c-format
 msgid "%s: relocatable link from %s to %s not supported"
-msgstr "%s: omlokaliseringsbar länk från %s till %s stöds inte"
+msgstr "%s: omlokaliseringsbar lÃ¤nk frÃ¥n %s till %s stÃ¶ds inte"
 
-#: archive.c:1751
+#: archive.c:2249
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
-msgstr "Varning: arkivskrivning var långsam: skriver om tidsstämpel\n"
+msgstr "Varning: arkivskrivning var lÃ¥ngsam: skriver om tidsstÃ¤mpel\n"
 
-#: archive.c:2014
+#: archive.c:2549
 msgid "Reading archive file mod timestamp"
-msgstr "Läser arkivfilens modifieringstidsstämpel"
+msgstr "LÃ¤ser arkivfilens modifieringstidsstÃ¤mpel"
 
-#: archive.c:2040
+#: archive.c:2573
 msgid "Writing updated armap timestamp"
-msgstr "Skriver uppdaterad armap-tidsstämpel"
+msgstr "Skriver uppdaterad armap-tidsstÃ¤mpel"
 
-#: bfd.c:280
+#: bfd.c:411
 msgid "No error"
 msgstr "Inget fel"
 
-#: bfd.c:281
+#: bfd.c:412
 msgid "System call error"
 msgstr "Systemanropsfel"
 
-#: bfd.c:282
+#: bfd.c:413
 msgid "Invalid bfd target"
-msgstr "Ogiltigt bfd-mål"
+msgstr "Ogiltigt bfd-mÃ¥l"
 
-#: bfd.c:283
+#: bfd.c:414
 msgid "File in wrong format"
-msgstr "Filen är i fel format"
+msgstr "Filen Ã¤r i fel format"
 
-#: bfd.c:284
+#: bfd.c:415
 msgid "Archive object file in wrong format"
-msgstr "Arkivobjektfil är i fel format"
+msgstr "Arkivobjektfilen Ã¤r i fel format"
 
-#: bfd.c:285
+#: bfd.c:416
 msgid "Invalid operation"
-msgstr "Ogiltig åtgärd"
+msgstr "Ogiltig Ã¥tgÃ¤rd"
 
-#: bfd.c:286
+#: bfd.c:417
 msgid "Memory exhausted"
-msgstr "Minnet är slut"
+msgstr "Minnet Ã¤r slut"
 
-#: bfd.c:287
+#: bfd.c:418
 msgid "No symbols"
 msgstr "Inga symboler"
 
-#: bfd.c:288
+#: bfd.c:419
 msgid "Archive has no index; run ranlib to add one"
-msgstr "Arkivet har inget index; kör ranlib för att lägga till ett"
+msgstr "Arkivet har inget index; kÃ¶r ranlib fÃ¶r att lÃ¤gga till ett"
 
-#: bfd.c:289
+#: bfd.c:420
 msgid "No more archived files"
 msgstr "Inga fler arkiverade filer"
 
-#: bfd.c:290
+#: bfd.c:421
 msgid "Malformed archive"
 msgstr "Trasigt arkiv"
 
-#: bfd.c:291
+#: bfd.c:422
+msgid "DSO missing from command line"
+msgstr "DSO saknas frÃ¥n kommandoraden"
+
+#: bfd.c:423
 msgid "File format not recognized"
-msgstr "Filformatet känns inte igen"
+msgstr "Filformatet kÃ¤nns inte igen"
 
-#: bfd.c:292
+#: bfd.c:424
 msgid "File format is ambiguous"
-msgstr "Filformatet är tvetydigt"
+msgstr "Filformatet Ã¤r tvetydigt"
 
-#: bfd.c:293
+#: bfd.c:425
 msgid "Section has no contents"
-msgstr "Sektionen har inget innehåll"
+msgstr "sektionen har inget innehÃ¥ll"
 
-#: bfd.c:294
+#: bfd.c:426
 msgid "Nonrepresentable section on output"
 msgstr "Ickerepresenterbar sektion i utdata"
 
-#: bfd.c:295
+#: bfd.c:427
 msgid "Symbol needs debug section which does not exist"
-msgstr "Symbolen kräver felsökningssektion som inte finns"
+msgstr "Symbolen krÃ¤ver felsÃ¶kningssektion som inte finns"
 
-#: bfd.c:296
+#: bfd.c:428
 msgid "Bad value"
-msgstr "Felaktigt värde"
+msgstr "Felaktigt vÃ¤rde"
 
-#: bfd.c:297
+#: bfd.c:429
 msgid "File truncated"
 msgstr "Filen trunkerad"
 
-#: bfd.c:298
+#: bfd.c:430
 msgid "File too big"
-msgstr "Filen är för stor"
+msgstr "Filen Ã¤r fÃ¶r stor"
+
+#: bfd.c:431
+#, c-format
+msgid "Error reading %s: %s"
+msgstr "Fel vid lÃ¤sning av %s: %s"
 
-#: bfd.c:299
+#: bfd.c:432
 msgid "#<Invalid error code>"
 msgstr "#<Ogiltig felkod>"
 
-#: bfd.c:687
+#: bfd.c:1046
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
-msgstr "BFD %s-försäkran misslyckades %s:%d"
+msgstr "BFD %s-fÃ¶rsÃ¤kran misslyckades %s:%d"
 
-#: bfd.c:703
+#: bfd.c:1058
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "Internt BFD %s-fel, avbryter vid %s rad %d i %s\n"
 
-#: bfd.c:707
+#: bfd.c:1062
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "Internt BFD %s-fel, avbryter vid %s rad %d\n"
 
-#: bfd.c:709
+#: bfd.c:1064
 msgid "Please report this bug.\n"
-msgstr "Rapportera gärna detta fel.\n"
+msgstr "Rapportera gÃ¤rna detta fel.\n"
 
-#: bfdwin.c:202
+#: bfdwin.c:206
 #, c-format
 msgid "not mapping: data=%lx mapped=%d\n"
 msgstr "mappar inte: data=%lx mappat=%d\n"
 
-#: bfdwin.c:205
+#: bfdwin.c:209
+#, c-format
 msgid "not mapping: env var not set\n"
-msgstr "mappar inte: miljövariabel är inte satt\n"
+msgstr "mappar inte: miljÃ¶variabel Ã¤r inte satt\n"
 
-#: binary.c:306
+#: binary.c:271
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr "Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen byte 0x%lx."
+msgstr "Varning: Skrivning av sektionen â€�%sâ€� till enormt (dvs negativt) avlÃ¤gsen byte 0x%lx."
 
-# src/menus.c:341
-#: coff-a29k.c:120
-msgid "Missing IHCONST"
-msgstr "IHCONST saknas"
-
-# src/menus.c:341
-#: coff-a29k.c:181
-msgid "Missing IHIHALF"
-msgstr "IHIHALF saknas"
-
-#: coff-a29k.c:213 coff-or32.c:236
-msgid "Unrecognized reloc"
-msgstr "Okänd omlokalisering"
+#: bout.c:1146 elf-m10300.c:2665 elf32-avr.c:1706 elf32-frv.c:5641
+#: elf64-ia64-vms.c:354 elfxx-sparc.c:2869 reloc.c:7324 reloc16.c:160
+#: elf32-ia64.c:351 elf64-ia64.c:351
+msgid "%P%F: --relax and -r may not be used together\n"
+msgstr "%P%F: --relax och -r kan inte anvÃ¤ndas tillsammans\n"
+
+#: cache.c:253
+msgid "reopening %B: %s\n"
+msgstr "Ã¶ppnar %B igen: %s\n"
 
-#: coff-a29k.c:409
-msgid "missing IHCONST reloc"
-msgstr "IHCONST-omlokalisering saknas"
+#: coff-alpha.c:452
+msgid ""
+"%B: Cannot handle compressed Alpha binaries.\n"
+"   Use compiler flags, or objZ, to generate uncompressed binaries."
+msgstr ""
+"%B: Kan inte hantera komprimerade Alpha-binÃ¤rer.\n"
+"   AnvÃ¤nd kompileringsflaggor eller objZ fÃ¶r att generera okomprimerade binÃ¤rer."
 
-#: coff-a29k.c:499
-msgid "missing IHIHALF reloc"
-msgstr "IHIHALF-omlokalisering saknas"
+#: coff-alpha.c:603
+msgid "%B: unknown/unsupported relocation type %d"
+msgstr "%B: omlokaliseringstyp okÃ¤nd/stÃ¶d saknas fÃ¶r typ %d"
 
-#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
+#: coff-alpha.c:852 coff-alpha.c:889 coff-alpha.c:1973 coff-mips.c:946
 msgid "GP relative relocation used when GP not defined"
-msgstr "GP-relativ omlokalisering användes då GP inte är definierad"
+msgstr "GP-relativ omlokalisering anvÃ¤ndes dÃ¥ GP inte Ã¤r definierad"
 
-#: coff-alpha.c:1488
+#: coff-alpha.c:1450
 msgid "using multiple gp values"
-msgstr "använder flera gp-värden"
+msgstr "anvÃ¤nder flera gp-vÃ¤rden"
 
-#: coff-arm.c:1066 elf32-arm.h:294
-#, c-format
-msgid "%s: unable to find THUMB glue '%s' for `%s'"
-msgstr "%s: kunde inte hitta THUMB-klistret \"%s\" till \"%s\""
+#: coff-alpha.c:1509
+msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
+msgstr "%B: omlokalisering stÃ¶ds ej: ALPHA_R_GPRELHIGH"
 
-#: coff-arm.c:1096 elf32-arm.h:329
-#, c-format
-msgid "%s: unable to find ARM glue '%s' for `%s'"
-msgstr "%s: kunde inte hitta ARM-klistret \"%s\" till \"%s\""
+#: coff-alpha.c:1516
+msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
+msgstr "%B: omlokalisering stÃ¶ds ej: ALPHA_R_GPRELLOW"
 
-#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
-#, c-format
-msgid "%s(%s): warning: interworking not enabled."
-msgstr "%s(%s): varning: samverkande är inte aktiverat."
+#: coff-alpha.c:1523 elf32-m32r.c:2443 elf64-alpha.c:4083 elf64-alpha.c:4233
+#: elf64-ia64-vms.c:3429 elf32-ia64.c:3836 elf64-ia64.c:3836
+msgid "%B: unknown relocation type %d"
+msgstr "%B: okÃ¤nd omlokaliseringstyp %d"
 
-#: coff-arm.c:1398 elf32-arm.h:1002
+#: coff-arm.c:1034
 #, c-format
-msgid "  first occurrence: %s: arm call to thumb"
-msgstr "  första förekomst: %s: arm-anrop till thumb"
+msgid "%B: unable to find THUMB glue '%s' for `%s'"
+msgstr "%B: kunde inte hitta THUMB-lim â€�%sâ€� fÃ¶r â€�%sâ€�"
 
-#: coff-arm.c:1493 elf32-arm.h:895
+#: coff-arm.c:1063
 #, c-format
-msgid "  first occurrence: %s: thumb call to arm"
-msgstr "  första förekomst: %s: thumb-anrop till arm"
-
-#: coff-arm.c:1496
-msgid "  consider relinking with --support-old-code enabled"
-msgstr "  överväg omlänkning med --support-old-code aktiverat"
+msgid "%B: unable to find ARM glue '%s' for `%s'"
+msgstr "%B: kunde inte hitta ARM-lim â€�%sâ€� fÃ¶r â€�%sâ€�"
 
-#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
+#: coff-arm.c:1365 elf32-arm.c:7141
 #, c-format
-msgid "%s: bad reloc address 0x%lx in section `%s'"
-msgstr "%s: felaktig omlokaliseringsadress 0x%lx i sektionen \"%s\""
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: arm call to thumb"
+msgstr ""
+"%B(%s): varning: vÃ¤xelverkning inte aktiverat.\n"
+"  fÃ¶rsta anvÃ¤ndning: %B: arm-anrop till thumb"
 
-#: coff-arm.c:2132
+#: coff-arm.c:1455
 #, c-format
-msgid "%s: illegal symbol index in reloc: %d"
-msgstr "%s: otillåtet symbolindex i omlokalisering: %d"
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: thumb call to arm\n"
+"  consider relinking with --support-old-code enabled"
+msgstr ""
+"%B(%s): varning: vÃ¤xelverkning inte aktiverat.\n"
+"  fÃ¶rsta anvÃ¤ndning: %B: thumb-anrop till arm\n"
+"  prova att lÃ¤nka om med --support-old-code aktiverad"
+
+#: coff-arm.c:1750 coff-tic80.c:673 cofflink.c:3168
+msgid "%B: bad reloc address 0x%lx in section `%A'"
+msgstr "%B: felaktig omlokaliseringsadress 0x%lx i sektion â€�%Aâ€�"
+
+#: coff-arm.c:2075
+msgid "%B: illegal symbol index in reloc: %d"
+msgstr "%B: otillÃ¥tet symbolindex i omlokalisering: %d"
 
-#: coff-arm.c:2265
+#: coff-arm.c:2206
 #, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "FEL: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
+msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
+msgstr "fel: %B kompilerades fÃ¶r APCS-%d, medan %B kompilerades fÃ¶r APCS-%d"
 
-#: coff-arm.c:2280 elf32-arm.h:2328
+#: coff-arm.c:2222 elf32-arm.c:16123
 #, c-format
-msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
-msgstr "FEL: %s skickar flyttal i flyttalsregister, medan %s skickar dem i heltalsregister"
+msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers"
+msgstr "fel: %B skickar flyttal i flyttalsregister, medan %B skickar dem i heltalsregister"
 
-#: coff-arm.c:2283 elf32-arm.h:2333
+#: coff-arm.c:2225 elf32-arm.c:16127
 #, c-format
-msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
-msgstr "FEL: %s skickar flyttal i heltalsregister, medan %s skickar dem i flyttalsregister"
+msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers"
+msgstr "fel: %B skickar flyttal i heltalsregister, medan %B skickar dem i flyttalsregister"
 
-#: coff-arm.c:2298
+#: coff-arm.c:2239
 #, c-format
-msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
-msgstr "FEL: %s är kompilerad som positionsoberoende kod, medan målet %s har absolut position"
+msgid "error: %B is compiled as position independent code, whereas target %B is absolute position"
+msgstr "fel: %B kompilerades som positionsoberoende kod, medan mÃ¥let %B Ã¤r en absolut position"
 
-#: coff-arm.c:2301
+#: coff-arm.c:2242
 #, c-format
-msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
-msgstr "FEL: %s är kompilerad som kod med absolut position, medan målet %s är positionsoberoende"
+msgid "error: %B is compiled as absolute position code, whereas target %B is position independent"
+msgstr "fel: %B kompilerades som absolut position-kod, medan mÃ¥let %B Ã¤r positionsoberoende"
 
-#: coff-arm.c:2330 elf32-arm.h:2405
+#: coff-arm.c:2270 elf32-arm.c:16192
 #, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
+msgid "Warning: %B supports interworking, whereas %B does not"
+msgstr "Varning: %B stÃ¶der samverkan, medan %B inte gÃ¶r det"
 
-#: coff-arm.c:2333 elf32-arm.h:2412
+#: coff-arm.c:2273 elf32-arm.c:16198
 #, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
+msgid "Warning: %B does not support interworking, whereas %B does"
+msgstr "Varning: %B stÃ¶der inte samverkan, medan %B gÃ¶r det"
 
-#: coff-arm.c:2360
+#: coff-arm.c:2297
 #, c-format
 msgid "private flags = %x:"
 msgstr "privata flaggor = %x:"
 
-#: coff-arm.c:2368 elf32-arm.h:2467
+#: coff-arm.c:2305 elf32-arm.c:12119
+#, c-format
 msgid " [floats passed in float registers]"
 msgstr " [flyttal skickade i flyttalsregister]"
 
-#: coff-arm.c:2370
+#: coff-arm.c:2307
+#, c-format
 msgid " [floats passed in integer registers]"
 msgstr " [flyttal skickade i heltalsregister]"
 
-#: coff-arm.c:2373 elf32-arm.h:2470
+#: coff-arm.c:2310 elf32-arm.c:12122
+#, c-format
 msgid " [position independent]"
 msgstr " [positionsoberoende]"
 
-#: coff-arm.c:2375
+#: coff-arm.c:2312
+#, c-format
 msgid " [absolute position]"
 msgstr " [absolut position]"
 
-#: coff-arm.c:2379
+#: coff-arm.c:2316
+#, c-format
 msgid " [interworking flag not initialised]"
-msgstr " [samverkandeflagga är inte initierad]"
+msgstr " [samverkandeflagga Ã¤r inte initierad]"
 
-#: coff-arm.c:2381
+#: coff-arm.c:2318
+#, c-format
 msgid " [interworking supported]"
-msgstr " [samverkan stöds]"
+msgstr " [samverkan stÃ¶ds]"
 
-#: coff-arm.c:2383
+#: coff-arm.c:2320
+#, c-format
 msgid " [interworking not supported]"
-msgstr " [samverkan stöds inte]"
+msgstr " [samverkan stÃ¶ds inte]"
 
-#: coff-arm.c:2431 elf32-arm.h:2150
+#: coff-arm.c:2366 elf32-arm.c:11104
 #, c-format
-msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
-msgstr "Varning: Ställer inte in samverkansflaggan för %s eftersom den redan har angivits som inte samverkande"
+msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"
+msgstr "Varning: StÃ¤ller inte in interoperationsflagga fÃ¶r %B eftersom den redan har angetts som ej samverkande"
 
-#: coff-arm.c:2435 elf32-arm.h:2154
+#: coff-arm.c:2370 elf32-arm.c:11108
 #, c-format
-msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr "Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
+msgid "Warning: Clearing the interworking flag of %B due to outside request"
+msgstr "Varning: Rensar samverkandeflaggan fÃ¶r %B pÃ¥ begÃ¤ran utifrÃ¥n"
 
 #: coff-h8300.c:1096
 #, c-format
 msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
-msgstr "kan inte hantera R_MEM_INDIRECT-omlokalisering vid användning av %s-utdata"
+msgstr "kan inte hantera R_MEM_INDIRECT-omlokalisering vid anvÃ¤ndning av %s-utdata"
+
+#: coff-i860.c:147
+#, c-format
+msgid "relocation `%s' not yet implemented"
+msgstr "omplacering â€�%sâ€� Ã¤nnu inte tillÃ¤mpad"
+
+#: coff-i860.c:605 coff-tic54x.c:365 coffcode.h:5209
+msgid "%B: warning: illegal symbol index %ld in relocs"
+msgstr "%B: varning: ogiltigt symbolindex %ld i relocs"
 
-#: coff-i960.c:137 coff-i960.c:486
+#: coff-i960.c:124 coff-i960.c:480
 msgid "uncertain calling convention for non-COFF symbol"
-msgstr "osäker anropskonvention för icke-COFF-symbol"
+msgstr "osÃ¤ker anropskonvention fÃ¶r icke-COFF-symbol"
 
-#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
+#: coff-m68k.c:484 elf32-bfin.c:5556 elf32-cr16.c:2853 elf32-m68k.c:4632
 msgid "unsupported reloc type"
-msgstr "omlokaliseringstypen stöds inte"
+msgstr "omlokaliseringstypen stÃ¶ds inte"
 
-#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
+#: coff-mips.c:636 elf32-mips.c:1637 elf32-score.c:431 elf32-score7.c:330
+#: elf64-mips.c:2925 elfn32-mips.c:2737
 msgid "GP relative relocation when _gp not defined"
-msgstr "GP-relativ omlokalisering då _gp inte var definierat"
+msgstr "GP-relativ omlokalisering dÃ¥ _gp inte var definierat"
 
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2431
-msgid "reloc against unsupported section"
-msgstr "omlokalisering mot sektion som inte stöds"
-
-#: coff-mips.c:2439
-msgid "reloc not properly aligned"
-msgstr "omlokalisering inte på jämn gräns"
+#: coff-or32.c:216
+msgid "Unrecognized reloc"
+msgstr "OkÃ¤nd omlokalisering"
 
-#: coff-rs6000.c:2790
+#: coff-rs6000.c:2802
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
-msgstr "%s: omlokaliseringstypen 0x%02x stöds inte"
+msgstr "%s: omlokaliseringstypen 0x%02x stÃ¶ds inte"
 
-#: coff-rs6000.c:2883
+#: coff-rs6000.c:2887
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
-msgstr "%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
+msgstr "%s: TOC-omlokalisering vid 0x%x till symbolen â€�%sâ€� utan nÃ¥gon TOC-post"
+
+#: coff-rs6000.c:3638 coff64-rs6000.c:2117
+msgid "%B: symbol `%s' has unrecognized smclas %d"
+msgstr "%B: symbolen â€�%sâ€� har okÃ¤nd smclas %d"
 
-#: coff-rs6000.c:3616 coff64-rs6000.c:2109
+#: coff-sh.c:506
 #, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
-msgstr "%s: symbolen \"%s\" har okänd smclas %d"
+msgid "SH Error: unknown reloc type %d"
+msgstr "SH-fel: okÃ¤nd omlokaliseringstyp %d"
 
-#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
+#: coff-tic4x.c:184 coff-tic54x.c:279 coff-tic80.c:440
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
-msgstr "Okänd omlokaliseringstyp 0x%x"
+msgstr "OkÃ¤nd omlokaliseringstyp 0x%x"
 
-#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5045
+#: coff-tic4x.c:227
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
-msgstr "%s: varning: otillåtet symbolindex %ld i omlokaliseringarna"
+msgstr "%s: varning: otillÃ¥tet symbolindex %ld i omlokaliseringarna"
 
-#: coff-w65.c:364
+#: coff-w65.c:355
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "ignorerar omlokalisering %s\n"
 
-#: coffcode.h:1108
-#, c-format
-msgid "%s (%s): Section flag %s (0x%x) ignored"
-msgstr "%s (%s): Sektionsflaggan %s (0x%x) ignorerades"
+#: coffcode.h:1005
+msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
+msgstr "%B: varning: COMDAT-symbolen â€�%sâ€� matchar inte sektionsnamnet â€�%sâ€�"
+
+#. Generate a warning message rather using the 'unhandled'
+#. variable as this will allow some .sys files generate by
+#. other toolchains to be processed.  See bugzilla issue 196.
+#: coffcode.h:1230
+msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
+msgstr "%B: Varning: Ignorerar sektionsflaggan IMAGE_SCN_MEM_NOT_PAGED i sektion %s"
+
+#: coffcode.h:1297
+msgid "%B (%s): Section flag %s (0x%x) ignored"
+msgstr "%B (%s): sektionsflaggan %s (0x%x) ignoreras"
 
-#: coffcode.h:2214
+#: coffcode.h:2439
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
-msgstr "Okänt TI COFF-målid \"0x%x\""
+msgstr "OkÃ¤nt TI COFF-mÃ¥lid â€�0x%xâ€�"
 
-#: coffcode.h:4437
-#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
-msgstr "%s: varning: otillåtet symbolindex %ld i radnummer"
+#: coffcode.h:2753
+msgid "%B: reloc against a non-existant symbol index: %ld"
+msgstr "%B: omlokalisering mot ett icke-existerande symbolindex: %ld"
 
-#: coffcode.h:4451
-#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
-msgstr "%s: varning: dubbel radnummersinformation för \"%s\""
+#: coffcode.h:3311
+msgid "%B: too many sections (%d)"
+msgstr "%B: fÃ¶r mÃ¥nga sektioner (%d)"
 
-#: coffcode.h:4805
-#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
-msgstr "%s: Okänd lagringsklass %d för %s-symbolen \"%s\""
+#: coffcode.h:3729
+msgid "%B: section %s: string table overflow at offset %ld"
+msgstr "%B: sektion %s: strÃ¤ngtabellen flÃ¶dade Ã¶ver vid %ld"
 
-#: coffcode.h:4938
-#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
-msgstr "varning: %s: lokala symbolen \"%s\" har ingen sektion"
+#: coffcode.h:4534
+msgid "%B: warning: line number table read failed"
+msgstr "%B: varning: kunde inte lÃ¤sa radnummertabellen"
 
-#: coffcode.h:5083
-#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
-msgstr "%s: otillåten omlokaliseringstyp %d på adress 0x%lx"
+#: coffcode.h:4564
+msgid "%B: warning: illegal symbol index %ld in line numbers"
+msgstr "%B: varning: ogiltigt symbolindex %ld i radnummer"
 
-#: coffgen.c:1666
-#, c-format
-msgid "%s: bad string table size %lu"
-msgstr "%s: felaktig strängtabellstorlek %lu"
+#: coffcode.h:4578
+msgid "%B: warning: duplicate line number information for `%s'"
+msgstr "%B: varning: dubbla kopior av linjenummer fÃ¶r â€�%sâ€�"
 
-#: cofflink.c:538 elflink.h:1276
-#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
-msgstr "Varning: typen på symbolen \"%s\" ändrades från %d till %d i %s"
+#: coffcode.h:4978
+msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
+msgstr "%B: OkÃ¤nd lagringsklass %d fÃ¶r %s symbol â€�%sâ€�"
 
-#: cofflink.c:2328
-#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
-msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
+#: coffcode.h:5104
+msgid "warning: %B: local symbol `%s' has no section"
+msgstr "varning: %B: den lokala symbolen â€�%sâ€� har ingen sektion"
+
+#: coffcode.h:5248
+msgid "%B: illegal relocation type %d at address 0x%lx"
+msgstr "%B: ogiltig omlokaliseringstyp %d pÃ¥ adress 0x%lx"
+
+#: coffgen.c:179 elf.c:1030
+msgid "%B: unable to initialize compress status for section %s"
+msgstr "%B: kunde inte initiera kompression av status fÃ¶r sektion %s"
+
+#: coffgen.c:199 elf.c:1050
+msgid "%B: unable to initialize decompress status for section %s"
+msgstr "%B: kunde inte initiera uppackning av status fÃ¶r sektion %s"
 
-#: cofflink.c:2671 coffswap.h:890
+#: coffgen.c:1685
+msgid "%B: bad string table size %lu"
+msgstr "%B: felaktig strÃ¤ngtabellsstorlek %lu"
+
+#: coffgen.c:2608 elflink.c:12906 linker.c:3136
+msgid "%F%P: already_linked_table: %E\n"
+msgstr "%F%P: already_linked_table: %E\n"
+
+#: cofflink.c:533 elf64-ia64-vms.c:5173 elflink.c:4356
+msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
+msgstr "Varning: type av symbol â€�%sâ€� har Ã¤ndrats frÃ¥n %d till %d i %B"
+
+#: cofflink.c:2416
+msgid "%B: relocs in section `%A', but it has no contents"
+msgstr "%B: relocs i sektion â€�%Aâ€�, men den har inget innehÃ¥ll"
+
+#: cofflink.c:2478 elflink.c:9711
+msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n"
+msgstr "%Xâ€�%sâ€� anvÃ¤nds i sektionen â€�%Aâ€� i %B: definieras i kastad sektion â€�%Aâ€� i %B\n"
+
+#: cofflink.c:2777 coffswap.h:826
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
-msgstr "%s: %s: omlokalisering ger överspill: 0x%lx > 0xffff"
+msgstr "%s: %s: omlokalisering ger Ã¶verspill: 0x%lx > 0xffff"
 
-#: cofflink.c:2680 coffswap.h:876
+#: cofflink.c:2786 coffswap.h:812
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s: varning: %s: radnummer ger överspill: 0x%lx > 0xffff"
+msgstr "%s: varning: %s: radnummer ger Ã¶verspill: 0x%lx > 0xffff"
 
-#: cpu-arm.c:196 cpu-arm.c:206
-#, c-format
-msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
-msgstr "FEL: %s kompilerad för EP9312, medan %s är kompilerad för XScale"
+#: cpu-arm.c:190 cpu-arm.c:201
+msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale"
+msgstr "fel: %B kompilerades fÃ¶r EP9312, medan %B kompilerades fÃ¶r XScale"
 
-#: cpu-arm.c:344
+#: cpu-arm.c:334
 #, c-format
 msgid "warning: unable to update contents of %s section in %s"
-msgstr "varning: kan inte uppdatera innehållet i %s-sektion i %s"
+msgstr "varning: kan inte uppdatera innehÃ¥llet i %s-sektion i %s"
 
-#: dwarf2.c:380
-msgid "Dwarf Error: Can't find .debug_str section."
-msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_str."
-
-#: dwarf2.c:397
+#: dwarf2.c:514
 #, c-format
-msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
-msgstr "Dwarf-fel: DW_FORM_strp-avståndet (%lu) större än eller lika med storleken på .debug_str (%lu)."
-
-#: dwarf2.c:541
-msgid "Dwarf Error: Can't find .debug_abbrev section."
-msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_abbrev."
+msgid "Dwarf Error: Can't find %s section."
+msgstr "Dwarf-fel: Kan inte hitta sektion %s."
 
-#: dwarf2.c:556
+#: dwarf2.c:543
 #, c-format
-msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
-msgstr "Dwarf-fel: Förkortningsavståndet (%lu) större än eller lika med storleken .debug_abbrev (%lu)."
+msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."
+msgstr "Dwarf-fel: Offset (%lu) Ã¤r stÃ¶rre Ã¤n eller i samma storlek som %s (%lu)."
 
-#: dwarf2.c:756
+#: dwarf2.c:1071
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
-msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %u."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %#x."
+msgstr "Dwarf-fel: Ogiltigt eller ej hanterat FORM-vÃ¤rde: %#x."
 
-#: dwarf2.c:933
+#: dwarf2.c:1332
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Dwarf-fel: trasig radnummerssektion (felaktigt filnummer)."
 
-#: dwarf2.c:1032
-msgid "Dwarf Error: Can't find .debug_line section."
-msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_line."
-
-#: dwarf2.c:1049
+#: dwarf2.c:1590
 #, c-format
-msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
-msgstr "Dwarf-fel: Radavståndet (%lu) större än eller lika med storleken .debug_line (%lu)."
+msgid "Dwarf Error: Unhandled .debug_line version %d."
+msgstr "Dwarf-fel: Ickehanterad version %d av .debug_line."
+
+#: dwarf2.c:1612
+msgid "Dwarf Error: Invalid maximum operations per instruction."
+msgstr "Dwarf-fel: Ogiltigt maximala operationer per instruktion."
 
-#: dwarf2.c:1255
+#: dwarf2.c:1807
 msgid "Dwarf Error: mangled line number section."
 msgstr "Dwarf-fel: trasig radnummerssektion."
 
-#: dwarf2.c:1470 dwarf2.c:1620
+#: dwarf2.c:2160
+#, c-format
+msgid "Dwarf Error: Unable to read alt ref %u."
+msgstr "Dwarf-fel: Kunde inte lÃ¤sa alt ref %u."
+
+#: dwarf2.c:2179 dwarf2.c:2299 dwarf2.c:2595
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
-msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %u."
+msgstr "Dwarf-fel: Kunde inte hitta fÃ¶rkortningsnumret %u."
 
-#: dwarf2.c:1581
+#: dwarf2.c:2551
 #, c-format
-msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
-msgstr "Dwarf-fel: hittade dwarf version \"%u\", denna läsare hanterar endast information från version 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information."
+msgstr "Dwarf-fel: hittade dwarf version â€�%uâ€�, lÃ¤saren hanterar bara versioner 2,3 och 4."
 
-#: dwarf2.c:1588
+#: dwarf2.c:2560
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
-msgstr "Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera storlekar större än \"%u\"."
+msgstr "Dwarf-fel: hittade adresstorleken â€�%uâ€�, denna lÃ¤sare kan inte hantera storlekar stÃ¶rre Ã¤n â€�%uâ€�."
 
-#: dwarf2.c:1611
+#: dwarf2.c:2586
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
-msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %u."
+msgstr "Dwarf-fel: Felaktigt fÃ¶rkortningsnummer: %u."
 
-#: ecoff.c:1339
+#: ecoff.c:1233
 #, c-format
 msgid "Unknown basic type %d"
-msgstr "Okänd grundtyp %d"
+msgstr "OkÃ¤nd grundtyp %d"
 
-#: ecoff.c:1599
+#: ecoff.c:1490
 #, c-format
 msgid ""
 "\n"
@@ -525,16 +600,16 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %ld"
 
-#: ecoff.c:1606 ecoff.c:1609
+#: ecoff.c:1497 ecoff.c:1500
 #, c-format
 msgid ""
 "\n"
 "      First symbol: %ld"
 msgstr ""
 "\n"
-"      Första symbolen: %ld"
+"      FÃ¶rsta symbolen: %ld"
 
-#: ecoff.c:1621
+#: ecoff.c:1512
 #, c-format
 msgid ""
 "\n"
@@ -543,7 +618,7 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %-7ld  Typ:  %s"
 
-#: ecoff.c:1628
+#: ecoff.c:1519
 #, c-format
 msgid ""
 "\n"
@@ -552,7 +627,7 @@ msgstr ""
 "\n"
 "      Lokal symbol: %ld"
 
-#: ecoff.c:1636
+#: ecoff.c:1527
 #, c-format
 msgid ""
 "\n"
@@ -561,7 +636,7 @@ msgstr ""
 "\n"
 "      struct; symbol slut+1: %ld"
 
-#: ecoff.c:1641
+#: ecoff.c:1532
 #, c-format
 msgid ""
 "\n"
@@ -570,7 +645,7 @@ msgstr ""
 "\n"
 "      union; symbol slut+1: %ld"
 
-#: ecoff.c:1646
+#: ecoff.c:1537
 #, c-format
 msgid ""
 "\n"
@@ -579,7 +654,7 @@ msgstr ""
 "\n"
 "      enum; symbol slut+1: %ld"
 
-#: ecoff.c:1652
+#: ecoff.c:1543
 #, c-format
 msgid ""
 "\n"
@@ -588,58 +663,139 @@ msgstr ""
 "\n"
 "      Typ: %s"
 
-#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
-#, c-format
-msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr "%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
-
-#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
-#: elf32-cris.c:1390 elf32-d10v.c:570 elf32-fr30.c:634 elf32-frv.c:815
-#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
-#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
-#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
-#: elf64-mmix.c:1332
+#: elf-attrs.c:573
+msgid "error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchain"
+msgstr "fel: %B: Objektet har leverantÃ¶rspecifikt innehÃ¥ll som mÃ¥ste behandlas av verktygskedjan â€�%sâ€�"
+
+#: elf-attrs.c:582
+msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'"
+msgstr "fel: %B: Objektetikett â€�%d, %sâ€� Ã¤r inkompatibel med etikett â€�%d, %sâ€�"
+
+#: elf-eh-frame.c:921
+msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
+msgstr "%P: fel i %B(%A); ingen .eh_frame_hdr-tabell kommer skapas.\n"
+
+#: elf-eh-frame.c:1193
+msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+msgstr "%P: fde-kodningen i %B(%A) fÃ¶rhindrar att .eh_frame_hdr-tabell skapas.\n"
+
+#: elf-eh-frame.c:1612
+msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n"
+msgstr "%P: DW_EH_PE_datarel ospecificerad fÃ¶r den hÃ¤r arkitekturen.\n"
+
+#: elf-ifunc.c:135
+msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n"
+msgstr "%F%P: dynamisk STT_GNU_IFUNC-symbol â€�%sâ€� med pekarmotsvarighet i â€�%Bâ€� kan inte anvÃ¤ndas nÃ¤r en kÃ¶rfil framstÃ¤lls; kompilera om med -fPIE och lÃ¤nka om med -pie\n"
+
+#: elf-m10200.c:430 elf-m10300.c:2164 elf32-avr.c:1256 elf32-bfin.c:3220
+#: elf32-cr16.c:1484 elf32-cr16c.c:780 elf32-cris.c:2016 elf32-crx.c:922
+#: elf32-d10v.c:513 elf32-epiphany.c:557 elf32-fr30.c:589 elf32-frv.c:4039
+#: elf32-h8300.c:525 elf32-i860.c:1212 elf32-ip2k.c:1468 elf32-iq2000.c:688
+#: elf32-lm32.c:1160 elf32-m32c.c:553 elf32-m32r.c:3066 elf32-m68hc1x.c:1283
+#: elf32-mep.c:535 elf32-metag.c:1992 elf32-microblaze.c:1560
+#: elf32-moxie.c:282 elf32-mt.c:395 elf32-nds32.c:4910 elf32-openrisc.c:404
+#: elf32-score.c:2729 elf32-score7.c:2537 elf32-spu.c:5041
+#: elf32-tilepro.c:3666 elf32-v850.c:2281 elf32-xstormy16.c:936
+#: elf64-mmix.c:1538 elfxx-tilegx.c:4051
 msgid "internal error: out of range error"
-msgstr "internt fel: utanför intervallet"
+msgstr "internt fel: utanfÃ¶r intervallet"
 
-#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
-#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
-#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
-#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
-#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
+#: elf-m10200.c:434 elf-m10300.c:2168 elf32-avr.c:1260 elf32-bfin.c:3224
+#: elf32-cr16.c:1488 elf32-cr16c.c:784 elf32-cris.c:2020 elf32-crx.c:926
+#: elf32-d10v.c:517 elf32-fr30.c:593 elf32-frv.c:4043 elf32-h8300.c:529
+#: elf32-i860.c:1216 elf32-iq2000.c:692 elf32-lm32.c:1164 elf32-m32c.c:557
+#: elf32-m32r.c:3070 elf32-m68hc1x.c:1287 elf32-mep.c:539 elf32-metag.c:1996
+#: elf32-microblaze.c:1564 elf32-moxie.c:286 elf32-msp430.c:1321
+#: elf32-nds32.c:4914 elf32-openrisc.c:408 elf32-score.c:2733
+#: elf32-score7.c:2541 elf32-spu.c:5045 elf32-tilepro.c:3670 elf32-v850.c:2285
+#: elf32-xstormy16.c:940 elf64-mmix.c:1542 elfxx-mips.c:9995
+#: elfxx-tilegx.c:4055
 msgid "internal error: unsupported relocation error"
-msgstr "internt fel: omlokaliseringen stöds inte"
+msgstr "internt fel: omlokaliseringen stÃ¶ds inte"
 
-#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:578
-#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
+#: elf-m10200.c:438 elf32-cr16.c:1492 elf32-cr16c.c:788 elf32-crx.c:930
+#: elf32-d10v.c:521 elf32-h8300.c:533 elf32-lm32.c:1168 elf32-m32r.c:3074
+#: elf32-m68hc1x.c:1291 elf32-microblaze.c:1568 elf32-nds32.c:4918
+#: elf32-score.c:2737 elf32-score7.c:2545 elf32-spu.c:5049
 msgid "internal error: dangerous error"
 msgstr "internt fel: farligt fel"
 
-#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
-#: elf32-cris.c:1402 elf32-d10v.c:582 elf32-fr30.c:646 elf32-frv.c:827
-#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
-#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
-#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
-#: elf64-mmix.c:1344
+#: elf-m10200.c:442 elf-m10300.c:2184 elf32-avr.c:1268 elf32-bfin.c:3232
+#: elf32-cr16.c:1496 elf32-cr16c.c:792 elf32-cris.c:2028 elf32-crx.c:934
+#: elf32-d10v.c:525 elf32-epiphany.c:572 elf32-fr30.c:601 elf32-frv.c:4051
+#: elf32-h8300.c:537 elf32-i860.c:1224 elf32-ip2k.c:1483 elf32-iq2000.c:700
+#: elf32-lm32.c:1172 elf32-m32c.c:565 elf32-m32r.c:3078 elf32-m68hc1x.c:1295
+#: elf32-mep.c:547 elf32-metag.c:2004 elf32-microblaze.c:1572
+#: elf32-moxie.c:294 elf32-msp430.c:1329 elf32-mt.c:403 elf32-nds32.c:4922
+#: elf32-openrisc.c:416 elf32-score.c:2746 elf32-score7.c:2549
+#: elf32-spu.c:5053 elf32-tilepro.c:3678 elf32-v850.c:2305
+#: elf32-xstormy16.c:948 elf64-mmix.c:1550 elfxx-tilegx.c:4063
 msgid "internal error: unknown error"
-msgstr "internt fel: okänt fel"
+msgstr "internt fel: okÃ¤nt fel"
 
-#: elf.c:372
+#: elf-m10300.c:1021
 #, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
-msgstr "%s: ogiltigt strängavstånd %u >= %lu för sektionen \"%s\""
+msgid "%s: Unsupported transition from %s to %s"
+msgstr "%s:Ã–vergÃ¥ng frÃ¥n %s till %s stÃ¶ds ej"
 
-#: elf.c:624
-#, c-format
-msgid "%s: invalid SHT_GROUP entry"
-msgstr "%s: ogiltig SHT_GROUP-post"
+#: elf-m10300.c:1213
+msgid "%B: %s' accessed both as normal and thread local symbol"
+msgstr "%B: %s' hade Ã¥tkomst bÃ¥de som normal och trÃ¥dlokal symbol"
+
+#: elf-m10300.c:2108 elf32-arm.c:10632 elf32-i386.c:4363 elf32-m32r.c:2558
+#: elf32-m68k.c:4120 elf32-s390.c:3303 elf32-sh.c:4109 elf32-tilepro.c:3569
+#: elf32-xtensa.c:3063 elf64-s390.c:3229 elf64-sh64.c:1640 elf64-x86-64.c:4463
+#: elfxx-sparc.c:3904 elfxx-tilegx.c:3974
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4450
+msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%B(%A+0x%lx): olÃ¶slig omplacering av %s mot symbol â€�%sâ€�"
+
+#: elf-m10300.c:2173
+msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)"
+msgstr "fel: olÃ¤mplig omplaceringstyp fÃ¶r delat bibliotek (glÃ¶mde du -fpic?)"
+
+#: elf-m10300.c:2176
+msgid "%B: taking the address of protected function '%s' cannot be done when making a shared library"
+msgstr "%B: ta adressen fÃ¶r den skyddade funktionen â€�%sâ€� kan inte gÃ¶ras vid skapandet av ett delat bibliotek"
+
+#: elf-m10300.c:2179
+msgid "internal error: suspicious relocation type used in shared library"
+msgstr "internt fel: suspekt omlokaliseringstyp fÃ¶r delade bibliotek"
+
+#: elf.c:343
+msgid "%B: invalid string offset %u >= %lu for section `%s'"
+msgstr "%B: ogiltig strÃ¤ngfÃ¶rskjutning %u >= %lu fÃ¶r sektion â€�%sâ€�"
+
+#: elf.c:455
+msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
+msgstr "%B symbol nummer %lu refererar icke existerande SHT_SYMTAB_SHNDX sektion"
+
+#: elf.c:611
+msgid "%B: Corrupt size field in group section header: 0x%lx"
+msgstr "%B: Korrupt storleksfÃ¤lt i gruppsektionshuvudet: 0x%lx"
+
+#: elf.c:647
+msgid "%B: invalid SHT_GROUP entry"
+msgstr "%B: ogiltig SHT_GROUP post"
+
+#: elf.c:717
+msgid "%B: no group info for section %A"
+msgstr "%B: ingen gruppinformation fÃ¶r sektion %A"
+
+#: elf.c:746 elf.c:3144 elflink.c:10290
+msgid "%B: warning: sh_link not set for section `%A'"
+msgstr "%B: varning: sh_link inte satt fÃ¶r sektion â€�%Aâ€�"
+
+#: elf.c:765
+msgid "%B: sh_link [%d] in section `%A' is incorrect"
+msgstr "%B: sh_link [%d] i sektion â€�%Aâ€� Ã¤r inkorrekt"
+
+#: elf.c:800
+msgid "%B: unknown [%d] section `%s' in group [%s]"
+msgstr "%B: okÃ¤nd [%d] sektion â€�%sâ€� i grupp [%s]"
 
-#: elf.c:695
+#: elf.c:1174
 #, c-format
-msgid "%s: no group info for section %s"
-msgstr "%s: ingen gruppinformation för sektionen %s"
-
-#: elf.c:1055
 msgid ""
 "\n"
 "Program Header:\n"
@@ -647,7 +803,8 @@ msgstr ""
 "\n"
 "Programhuvud:\n"
 
-#: elf.c:1106
+#: elf.c:1216
+#, c-format
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -655,7 +812,8 @@ msgstr ""
 "\n"
 "Dynamisk sektion:\n"
 
-#: elf.c:1235
+#: elf.c:1352
+#, c-format
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -663,7 +821,8 @@ msgstr ""
 "\n"
 "Versionsdefinitioner:\n"
 
-#: elf.c:1258
+#: elf.c:1377
+#, c-format
 msgid ""
 "\n"
 "Version References:\n"
@@ -671,2102 +830,5445 @@ msgstr ""
 "\n"
 "Versionsreferenser:\n"
 
-#: elf.c:1263
+#: elf.c:1382
 #, c-format
 msgid "  required from %s:\n"
-msgstr "  krävs från %s:\n"
+msgstr "  krÃ¤vs frÃ¥n %s:\n"
 
-#: elf.c:1944
-#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
-msgstr "%s: ogiltig länk %lu för omlokaliseringssektion %s (index %u)"
+#: elf.c:1807
+msgid "%B: invalid link %lu for reloc section %s (index %u)"
+msgstr "%B: ogiltig lÃ¤nk %lu fÃ¶r omlokaliseringssektion %s (index %u)"
 
-#: elf.c:3686
-#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr "%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver %u)"
+#: elf.c:1977
+msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]"
+msgstr "%B: vet ej hur att hantera allokerad, programspecifik sektion â€�%sâ€� [0x%8x]"
 
-#: elf.c:3791
-#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr "%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
+#: elf.c:1989
+msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
+msgstr "%B: vet ej hur att hantera processorspecifik sektion â€�%sâ€� [0x%8x]"
 
-#: elf.c:3922
-#, c-format
-msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
-msgstr "Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet börjar med 0x%x"
+#: elf.c:2000
+msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
+msgstr "%B: vet ej hur att hantera OS-specifik sektion â€�%sâ€� [0x%8x]"
 
-#: elf.c:4242
-#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
-msgstr "%s: varning: allokerad sektion \"%s\" inte i segment"
+#: elf.c:2010
+msgid "%B: don't know how to handle section `%s' [0x%8x]"
+msgstr "%B: vet ej hur att hantera sektion â€�%sâ€� [0x%8x]"
 
-#: elf.c:4566
+#: elf.c:2648
 #, c-format
-msgid "%s: symbol `%s' required but not present"
-msgstr "%s: symbolen \"%s\" krävs men finns inte med"
+msgid "warning: section `%A' type changed to PROGBITS"
+msgstr "varning: sektion â€�%Aâ€� typ Ã¤ndrades till PROGBITS"
 
-#: elf.c:4854
-#, c-format
-msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
-msgstr "%s: varning: Tomt inläsningsbart segment upptäckt, är detta meningen?\n"
+#: elf.c:3015
+msgid "%B: too many sections: %u"
+msgstr "%B: fÃ¶r mÃ¥nga sektioner: %u"
 
-#: elf.c:5485
-#, c-format
-msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
-msgstr "Kan inte hitta ekvivalent utdatasektion för symbolen \"%s\" från sektionen \"%s\""
+#: elf.c:3101
+msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
+msgstr "%B: sh_link frÃ¥n sektion â€�%Aâ€� pekar pÃ¥ kastad sektion â€�%Aâ€� av â€�%Bâ€�"
 
-#: elf.c:6298
-#, c-format
-msgid "%s: unsupported relocation type %s"
-msgstr "%s: omlokaliseringstypen %s stöds inte"
+#: elf.c:3124
+msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
+msgstr "%B: sh_link frÃ¥n sektion â€�%Aâ€� pekar pÃ¥ borttagen sektion â€�%Aâ€� av â€�%Bâ€�"
 
-#: elf32-arm.h:1228
-#, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
-msgstr "%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
+#: elf.c:4126
+msgid "%B: TLS sections are not adjacent:"
+msgstr "%B: TLS-sektion Ã¤r inte nÃ¤rliggande:"
 
-#: elf32-arm.h:1424
+#: elf.c:4133
 #, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
-msgstr "%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som mål."
+msgid "\t    TLS: %A"
+msgstr "\t    TLS: %A"
 
-#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
+#: elf.c:4137
 #, c-format
-msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
-msgstr "%s(%s+0x%lx): %s omlokalisering mot SEC_MERGE-sektion"
+msgid "\tnon-TLS: %A"
+msgstr "\tej-TLS: %A"
 
-#: elf32-arm.h:2012
-#, c-format
-msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr "%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
+#: elf.c:4596
+msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
+msgstr "%B: Den fÃ¶rsta sektionen i PT_DYNAMIC segment Ã¤r inte .dynamic-sektionen"
 
-#: elf32-arm.h:2202
-#, c-format
-msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
-msgstr "Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %s har länkats med det"
+#: elf.c:4621
+msgid "%B: Not enough room for program headers, try linking with -N"
+msgstr "%B: Inte tillrÃ¤ckligt med utrymme fÃ¶r programhuvud, fÃ¶rsÃ¶k lÃ¤nka med -N"
 
-#: elf32-arm.h:2302
-#, c-format
-msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "FEL: %s är kompilerad för EABI version %d, medan %s är kompilerad för version %d"
+#: elf.c:4707
+msgid "%B: section %A lma %#lx adjusted to %#lx"
+msgstr "%B: sektion %A lma %#lx justerad till %#lx"
 
-#: elf32-arm.h:2316
-#, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
-msgstr "FEL: %s är kompilerad för APCS-%d, medan målet %s använder APCS-%d"
+#: elf.c:4843
+msgid "%B: section `%A' can't be allocated in segment %d"
+msgstr "%B: sektion â€�%Aâ€� kan inte allokeras i segment %d"
+
+#: elf.c:4892
+msgid "%B: warning: allocated section `%s' not in segment"
+msgstr "%B: varning: allokerat segment â€�%sâ€� Ã¤r inte i sektionen"
+
+#: elf.c:5473
+msgid "%B: symbol `%s' required but not present"
+msgstr "%B: symbol â€�%sâ€� krÃ¤vs men Ã¤r inte tillgÃ¤nglig"
+
+#: elf.c:5811
+msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%B: varning: Tomt laddningsbart segment detekterat, Ã¤r detta avsiktligt?\n"
 
-#: elf32-arm.h:2344
+#: elf.c:6867
 #, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s does not"
-msgstr "FEL: %s använder VFP-instruktioner, men det gör inte %s"
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "Kan inte hitta ekvivalent utdatasektion fÃ¶r symbolen â€�%sâ€� frÃ¥n sektionen â€�%sâ€�"
+
+#: elf.c:7915
+msgid "%B: unsupported relocation type %s"
+msgstr "%B: omlokaliseringstyp %s saknar stÃ¶d"
+
+#: elf32-arm.c:3722 elf32-arm.c:7051
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: Thumb call to ARM"
+msgstr ""
+"%B(%s): varning: samverkan inte aktiverat.\n"
+"  fÃ¶rsta fÃ¶rekomst: %B: Thumb-anrop till ARM"
+
+#: elf32-arm.c:3769
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: ARM call to Thumb"
+msgstr ""
+"%B(%s): varning: samverkan inte aktiverat.\n"
+"  fÃ¶rsta fÃ¶rekomst: %B: ARM-anrop till Thumb"
 
-#: elf32-arm.h:2349
+#: elf32-arm.c:3988 elf32-arm.c:5433
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:2324
 #, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s does not"
-msgstr "FEL: %s använder FPA-instruktioner, men det gör inte %s"
+msgid "%s: cannot create stub entry %s"
+msgstr "%s: kan inte skapa stubbstarten %s"
 
-#: elf32-arm.h:2360 elf32-arm.h:2365
+#: elf32-arm.c:5549
 #, c-format
-msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
-msgstr "FEL: %s använder Maverick-instruktioner, men det gör inte %s"
+msgid "unable to find THUMB glue '%s' for '%s'"
+msgstr "kunde inte hitta THUMB-klister â€�%sâ€� fÃ¶r â€�%sâ€�"
 
-#: elf32-arm.h:2385
+#: elf32-arm.c:5585
 #, c-format
-msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
-msgstr "FEL: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
+msgid "unable to find ARM glue '%s' for '%s'"
+msgstr "kunde inte hitta ARM-klister â€�%sâ€� fÃ¶r â€�%sâ€�"
+
+#: elf32-arm.c:6123
+msgid "%B: BE8 images only valid in big-endian mode."
+msgstr "%B: BE8-avbilder bara giltiga i lÃ¤ge med rak byteordning."
+
+#. Give a warning, but do as the user requests anyway.
+#: elf32-arm.c:6353
+msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture"
+msgstr "%B: varning: vald problemlÃ¶sning VFP11 behÃ¶vs inte fÃ¶r destinationsarkitektur"
 
-#: elf32-arm.h:2390
+#: elf32-arm.c:6897 elf32-arm.c:6917
+msgid "%B: unable to find VFP11 veneer `%s'"
+msgstr "%B: kan inte hitta VFP11-lagret â€�%sâ€�"
+
+#: elf32-arm.c:6966
 #, c-format
-msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
-msgstr "FEL: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
+msgid "Invalid TARGET2 relocation type '%s'."
+msgstr "Ogiltig TARGET2-omlokaliseringstyp â€�%sâ€�."
+
+#. PR ld/16017: Do not generate ARM instructions for
+#. the PLT if compiling for a thumb-only target.
+#.
+#. FIXME: We ought to be able to generate thumb PLT instructions...
+#: elf32-arm.c:7696
+msgid "%B: Warning: thumb mode PLT generation not currently supported"
+msgstr "%B: Varning: tumlÃ¤ges PLT-generering stÃ¶ds ej"
+
+#: elf32-arm.c:7909
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): ovÃ¤ntad Thumb-instruktion â€�0x%xâ€� i TLS-trampolin"
+
+#: elf32-arm.c:7948
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"
+msgstr "%B(%A+0x%lx): ovÃ¤ntad ARM-instruktion â€�0x%xâ€� i TLS-trampolin"
+
+#: elf32-arm.c:8412
+msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
+msgstr "\\%B: Varning: Arm BLX-instruktion pekar mot Arm-funktionen â€�%sâ€�."
+
+#: elf32-arm.c:8831
+msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgstr "%B: Varning: Thumb BLX-instruktion pekar mot thumb-funktionen â€�%sâ€�."
+
+#: elf32-arm.c:9672
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): ovÃ¤ntad Thumb-instruktion â€�0x%xâ€� hÃ¤nvisad till av TLS_GOTDESC"
+
+#: elf32-arm.c:9695
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
+msgstr "%B(%A+0x%lx): ovÃ¤ntad ARM-instruktion â€�0x%xâ€� hÃ¤nvisad till av TLS_GOTDESC"
+
+#: elf32-arm.c:9724
+msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): R_ARM_TLS_LE32-omlokalisering tillÃ¥ts inte i delat objekt"
+
+#: elf32-arm.c:9937
+msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"
+msgstr "%B(%A+0x%lx): Enbart ADD- eller SUB-instruktioner tillÃ¥ts fÃ¶r ALU-gruppsomlokaliseringar"
+
+#: elf32-arm.c:9977 elf32-arm.c:10065 elf32-arm.c:10149 elf32-arm.c:10235
+msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
+msgstr "%B(%A+0x%lx): Ã–verflÃ¶de vid delning av 0x%lx fÃ¶r gruppomlokalisering %s"
+
+#: elf32-arm.c:10474 elf32-sh.c:3994 elf64-sh64.c:1544
+msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
+msgstr "%B(%A+0x%lx): %s-omlokalisering mot SEC_MERGE-sektion"
+
+#: elf32-arm.c:10585 elf32-m68k.c:4155 elf32-xtensa.c:2799
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4192
+msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
+msgstr "%B(%A+0x%lx): %s anvÃ¤nds med TLS-symbolen %s"
+
+#: elf32-arm.c:10586 elf32-m68k.c:4156 elf32-xtensa.c:2800
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4193
+msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
+msgstr "%B(%A+0x%lx): %s anvÃ¤nds med icke-TLS-symbolen %s"
+
+#: elf32-arm.c:10666 elf32-tic6x.c:2736
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4481
+msgid "out of range"
+msgstr "utanfÃ¶r intervall"
+
+#: elf32-arm.c:10670 elf32-nios2.c:3525 elf32-tic6x.c:2740
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4485
+msgid "unsupported relocation"
+msgstr "omlokalisering utan stÃ¶d"
+
+#: elf32-arm.c:10678 elf32-nios2.c:3535 elf32-tic6x.c:2748
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4493
+msgid "unknown error"
+msgstr "okÃ¤nt fel"
+
+#: elf32-arm.c:11153
+msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"
+msgstr "Varning: Rensar %Bs samverkandeflagga eftersom ej samverkande kod i %B har lÃ¤nkats till den"
+
+#: elf32-arm.c:11240
+msgid "%B: Unknown mandatory EABI object attribute %d"
+msgstr "%B: OkÃ¤nt obligatoriskt EABI-objektattribut %d"
+
+#: elf32-arm.c:11248
+msgid "Warning: %B: Unknown EABI object attribute %d"
+msgstr "Varning: %B: OkÃ¤nt EABI-objektattribut %d"
+
+#: elf32-arm.c:11449
+msgid "error: %B: Unknown CPU architecture"
+msgstr "fel: %B: OkÃ¤nd CPU-arkitektur"
+
+#: elf32-arm.c:11487
+msgid "error: %B: Conflicting CPU architectures %d/%d"
+msgstr "fel: %B: Motstridiga CPU-arkitekturer %d/%d"
+
+#: elf32-arm.c:11576
+msgid "Error: %B has both the current and legacy Tag_MPextension_use attributes"
+msgstr "Fel: %B har bÃ¥de aktuella och fÃ¶rÃ¥ldrade Tag_MPextension_use-attribut"
+
+#: elf32-arm.c:11601
+msgid "error: %B uses VFP register arguments, %B does not"
+msgstr "fel: %B anvÃ¤nder VFP-registerargument, men inte %B"
+
+#: elf32-arm.c:11747
+msgid "error: %B: unable to merge virtualization attributes with %B"
+msgstr "fel: %B: kunde inte sammanfoga virtualiseringsattribut med %B"
+
+#: elf32-arm.c:11773
+msgid "error: %B: Conflicting architecture profiles %c/%c"
+msgstr "fel: %B: Motstridiga arkitekturprofiler %c/%c"
+
+#: elf32-arm.c:11877
+msgid "Warning: %B: Conflicting platform configuration"
+msgstr "Varning: %B: Motstridig plattformskonfigurering"
+
+#: elf32-arm.c:11886
+msgid "error: %B: Conflicting use of R9"
+msgstr "fel: %B: Konflikt vid anvÃ¤ndande av R9"
+
+#: elf32-arm.c:11898
+msgid "error: %B: SB relative addressing conflicts with use of R9"
+msgstr "fel: %B: SB-relativ adressering kolliderar med anvÃ¤ndande av R9"
+
+#: elf32-arm.c:11911
+msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail"
+msgstr "varning: %B anvÃ¤nder %u-byte wchar_t, men utdata ska anvÃ¤nda %u-byte wchar_t; anvÃ¤ndning av wchar_t-vÃ¤rden mellan objekt kanske inte fungerar"
+
+#: elf32-arm.c:11942
+msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail"
+msgstr "varning: %B anvÃ¤nder %s enum, men utdata ska anvÃ¤nda %s enum; anvÃ¤ndning av enum-vÃ¤rden mellan objekt kanske inte fungerar"
+
+#: elf32-arm.c:11954
+msgid "error: %B uses iWMMXt register arguments, %B does not"
+msgstr "fel: %B anvÃ¤nder iWMMXt-registerargument, men inte %B"
+
+#: elf32-arm.c:11971
+msgid "error: fp16 format mismatch between %B and %B"
+msgstr "fel: fp16-format stÃ¤mmer inte Ã¶verens mellan %B och %B"
+
+#: elf32-arm.c:12007
+msgid "%B has has both the current and legacy Tag_MPextension_use attributes"
+msgstr "%B har bÃ¥de aktuella och fÃ¶rÃ¥ldrade Tag_MPextension_use-attribut"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
-#: elf32-vax.c:546 elfxx-mips.c:9238
+#. Ignore init flag - it may not be set, despite the flags field containing valid data.
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#: elf32-arm.c:12095 elf32-bfin.c:4949 elf32-cris.c:4139 elf32-m68hc1x.c:1427
+#: elf32-m68k.c:1195 elf32-score.c:4004 elf32-score7.c:3808 elf32-vax.c:529
+#: elf32-xgate.c:674 elfxx-mips.c:14955
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4645
 #, c-format
 msgid "private flags = %lx:"
 msgstr "privata flaggor = %lx:"
 
-#: elf32-arm.h:2452
+#: elf32-arm.c:12104
+#, c-format
 msgid " [interworking enabled]"
-msgstr " [samverkande är aktiverat]"
+msgstr " [samverkande Ã¤r aktiverat]"
 
-#: elf32-arm.h:2460
+#: elf32-arm.c:12112
+#, c-format
 msgid " [VFP float format]"
 msgstr " [VFP-flyttalsformat]"
 
-#: elf32-arm.h:2462
+#: elf32-arm.c:12114
+#, c-format
 msgid " [Maverick float format]"
 msgstr " [Maverick-flyttalsformat]"
 
-#: elf32-arm.h:2464
+#: elf32-arm.c:12116
+#, c-format
 msgid " [FPA float format]"
 msgstr " [FPA-flyttalsformat]"
 
-#: elf32-arm.h:2473
+#: elf32-arm.c:12125
+#, c-format
 msgid " [new ABI]"
 msgstr " [nytt ABI]"
 
-#: elf32-arm.h:2476
+#: elf32-arm.c:12128
+#, c-format
 msgid " [old ABI]"
 msgstr " [gammalt ABI]"
 
-#: elf32-arm.h:2479
+#: elf32-arm.c:12131
+#, c-format
 msgid " [software FP]"
 msgstr " [programvaru-FP]"
 
-#: elf32-arm.h:2488
+#: elf32-arm.c:12140
+#, c-format
 msgid " [Version1 EABI]"
 msgstr " [Version1 EABI]"
 
-#: elf32-arm.h:2491 elf32-arm.h:2502
+#: elf32-arm.c:12143 elf32-arm.c:12154
+#, c-format
 msgid " [sorted symbol table]"
 msgstr " [sorterad symboltabell]"
 
-#: elf32-arm.h:2493 elf32-arm.h:2504
+#: elf32-arm.c:12145 elf32-arm.c:12156
+#, c-format
 msgid " [unsorted symbol table]"
 msgstr " [osorterad symboltabell]"
 
-#: elf32-arm.h:2499
+#: elf32-arm.c:12151
+#, c-format
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.h:2507
+#: elf32-arm.c:12159
+#, c-format
 msgid " [dynamic symbols use segment index]"
-msgstr " [dynamiska symboler använder segmentindex]"
+msgstr " [dynamiska symboler anvÃ¤nder segmentindex]"
 
-#: elf32-arm.h:2510
+#: elf32-arm.c:12162
+#, c-format
 msgid " [mapping symbols precede others]"
-msgstr " [mappsymboler har företräde före andra]"
+msgstr " [mappsymboler har fÃ¶retrÃ¤de fÃ¶re andra]"
+
+#: elf32-arm.c:12169
+#, c-format
+msgid " [Version3 EABI]"
+msgstr " [Version3 EABI]"
+
+#: elf32-arm.c:12173
+#, c-format
+msgid " [Version4 EABI]"
+msgstr " [Version4 EABI]"
+
+#: elf32-arm.c:12177
+#, c-format
+msgid " [Version5 EABI]"
+msgstr " [Version5 EABI]"
+
+#: elf32-arm.c:12180
+#, c-format
+msgid " [soft-float ABI]"
+msgstr " [mjuk-flyttal ABI]"
+
+#: elf32-arm.c:12183
+#, c-format
+msgid " [hard-float ABI]"
+msgstr " [hÃ¥rt-flyttal ABI]"
+
+#: elf32-arm.c:12189
+#, c-format
+msgid " [BE8]"
+msgstr " [BE8]"
+
+#: elf32-arm.c:12192
+#, c-format
+msgid " [LE8]"
+msgstr " [LE8]"
 
-#: elf32-arm.h:2517
+#: elf32-arm.c:12198
+#, c-format
 msgid " <EABI version unrecognised>"
-msgstr " <EABI-version känns inte igen>"
+msgstr " <EABI-version kÃ¤nns inte igen>"
 
-#: elf32-arm.h:2524
+#: elf32-arm.c:12205
+#, c-format
 msgid " [relocatable executable]"
-msgstr " [omlokaliseringsbar körbar fil]"
+msgstr " [omlokaliseringsbar kÃ¶rbar fil]"
 
-#: elf32-arm.h:2527
+#: elf32-arm.c:12208
+#, c-format
 msgid " [has entry point]"
 msgstr " [har startpunkt]"
 
-#: elf32-arm.h:2532
+#: elf32-arm.c:12213 /src/binutils-gdb/bfd/elfnn-aarch64.c:4648
+#, c-format
 msgid "<Unrecognised flag bits set>"
-msgstr "<Okända flaggbitar satta>"
+msgstr "<OkÃ¤nda flaggbitar satta>"
 
-#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
-#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
-#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
-#: elf64-mmix.c:1340
+#: elf32-arm.c:12522 elf32-i386.c:1452 elf32-s390.c:1005 elf32-tic6x.c:2812
+#: elf32-tilepro.c:1511 elf32-xtensa.c:999 elf64-s390.c:927
+#: elf64-x86-64.c:1467 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:5038
+msgid "%B: bad symbol index: %d"
+msgstr "%B: felaktigt symbolindex: %d"
+
+#: elf32-arm.c:12674 elf32-metag.c:2283 elf64-x86-64.c:1593
+#: elf64-x86-64.c:1771 elfxx-mips.c:8482
+msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"
+msgstr "%B: omlokalisering %s mot â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas; kompilera om med -fPIC"
+
+#: elf32-arm.c:13796
+#, c-format
+msgid "Errors encountered processing file %s"
+msgstr "Fel intrÃ¤ffade vid bearbetning av filen %s"
+
+#: elf32-arm.c:14230
+#, c-format
+msgid "error: required section '%s' not found in the linker script"
+msgstr "fel: krÃ¤vd sektion â€�%sâ€� inte funnen i lÃ¤nkarens skript"
+
+#: elf32-arm.c:15252
+msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location"
+msgstr "%B: fel: Cortex-A8 felstubbe har tilldelats en osÃ¤ker plats"
+
+#. There's not much we can do apart from complain if this
+#. happens.
+#: elf32-arm.c:15279
+msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)"
+msgstr "%B: fel: Cortex-A8 felstubbe utanfÃ¶r intervallet (indatafilen Ã¤r fÃ¶r stor)"
+
+#: elf32-arm.c:15373 elf32-arm.c:15395
+msgid "%B: error: VFP11 veneer out of range"
+msgstr "%B: fel: VFP11-lager utanfÃ¶r intervall"
+
+#: elf32-arm.c:16020
+msgid "error: %B is already in final BE8 format"
+msgstr "fel: %B Ã¤r redan i fÃ¤rdigt BE8-format"
+
+#: elf32-arm.c:16096
+msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d"
+msgstr "fel: KÃ¤llkodsobjekt %B har EABI-version %d, men destinationen %B har EABI-version %d"
+
+#: elf32-arm.c:16112
+msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
+msgstr "fel: %B kompilerades fÃ¶r APCS-%d, medan destinationen %B anvÃ¤nder APCS-%d"
+
+#: elf32-arm.c:16137
+msgid "error: %B uses VFP instructions, whereas %B does not"
+msgstr "fel: %B anvÃ¤nder VFP-instruktioner, men inte %B"
+
+#: elf32-arm.c:16141
+msgid "error: %B uses FPA instructions, whereas %B does not"
+msgstr "fel: %B anvÃ¤nder FPA-instruktioner, men inte %B"
+
+#: elf32-arm.c:16151
+msgid "error: %B uses Maverick instructions, whereas %B does not"
+msgstr "fel: %B anvÃ¤nder Maverick-instruktioner, men inte %B"
+
+#: elf32-arm.c:16155
+msgid "error: %B does not use Maverick instructions, whereas %B does"
+msgstr "fel: %B anvÃ¤nder inte Maverick-instruktioner, men det gÃ¶r %B"
+
+#: elf32-arm.c:16174
+msgid "error: %B uses software FP, whereas %B uses hardware FP"
+msgstr "fel: %B anvÃ¤nder FP i mjukvara, medan %B anvÃ¤nder FP i hÃ¥rdvara"
+
+#: elf32-arm.c:16178
+msgid "error: %B uses hardware FP, whereas %B uses software FP"
+msgstr "fel: %B anvÃ¤nder FP i hÃ¥rdvara, medan %B anvÃ¤nder FP i mjukvara"
+
+#: elf32-avr.c:1264 elf32-bfin.c:3228 elf32-cris.c:2024 elf32-epiphany.c:568
+#: elf32-fr30.c:597 elf32-frv.c:4047 elf32-i860.c:1220 elf32-ip2k.c:1479
+#: elf32-iq2000.c:696 elf32-m32c.c:561 elf32-mep.c:543 elf32-metag.c:2000
+#: elf32-moxie.c:290 elf32-msp430.c:1325 elf32-mt.c:399 elf32-openrisc.c:412
+#: elf32-tilepro.c:3674 elf32-v850.c:2289 elf32-xstormy16.c:944
+#: elf64-mmix.c:1546 elfxx-tilegx.c:4059
 msgid "internal error: dangerous relocation"
 msgstr "internt fel: farlig omlokalisering"
 
-#: elf32-cris.c:931
-#, c-format
-msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr "%s: olöslig omlokalisering %s mot symbolen \"%s\" från sektionen %s"
+#: elf32-avr.c:2476 elf32-hppa.c:578 elf32-m68hc1x.c:160 elf32-metag.c:1197
+#: elf32-nios2.c:1357
+msgid "%B: cannot create stub entry %s"
+msgstr "%B: kan inte skapa stubbpost %s"
 
-#: elf32-cris.c:993
-#, c-format
-msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr "%s: Varken någon PLT eller GOT för omlokalisering %s  mot symbolen \"%s\" från sektionen %s"
+#: elf32-bfin.c:107 elf32-bfin.c:363
+msgid "relocation should be even number"
+msgstr "omlokalisering bÃ¶r ske med jÃ¤mna siffror"
 
-#: elf32-cris.c:996 elf32-cris.c:1122
-msgid "[whose name is lost]"
-msgstr "[vars namn tappats bort]"
+#: elf32-bfin.c:1601
+msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
+msgstr "%B(%A+0x%lx): olÃ¶slig omlokalisering mot symbol â€�%sâ€�"
 
-#: elf32-cris.c:1111
-#, c-format
-msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
-msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från sektionen %s"
+#: elf32-bfin.c:1634 elf32-i386.c:4406 elf32-m68k.c:4197 elf32-s390.c:3364
+#: elf64-s390.c:3290 elf64-x86-64.c:4506
+msgid "%B(%A+0x%lx): reloc against `%s': error %d"
+msgstr "%B(%A+0x%lx): omlokalisering mot â€�%sâ€�: fel %d"
 
-#: elf32-cris.c:1118
-#, c-format
-msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från sektionen %s"
+#: elf32-bfin.c:2732
+msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
+msgstr "%B. omlokalisering vid â€�%A+0x%xâ€� anvÃ¤nder symbolen â€�%sâ€� med en addend som inte Ã¤r noll"
 
-#: elf32-cris.c:1143
-#, c-format
-msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr "%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från sektionen %s"
+#: elf32-bfin.c:2748
+msgid "relocation references symbol not defined in the module"
+msgstr "omlokalisering anvÃ¤nder symbol som inte definierats i modulen"
+
+#: elf32-bfin.c:2845
+msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
+msgstr "R_BFIN_FUNCDESC anvÃ¤nder dynamisk symbol med en addend som inte Ã¤r noll"
+
+#: elf32-bfin.c:2886 elf32-bfin.c:3009
+msgid "cannot emit fixups in read-only section"
+msgstr "kan inte skicka fixar till en skrivskyddad sektion"
+
+#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-lm32.c:1095 elf32-sh.c:4913
+msgid "cannot emit dynamic relocations in read-only section"
+msgstr "kan inte skicka dynamiska omlokaliseringar till en skrivskyddad sektion"
+
+#: elf32-bfin.c:2967
+msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
+msgstr "R_BFIN_FUNCDESC_VALUE anvÃ¤nder dynamisk symbol med addend som inte Ã¤r noll"
+
+#: elf32-bfin.c:3132
+msgid "relocations between different segments are not supported"
+msgstr "omlokaliseringar mellan olika segment saknar stÃ¶d"
 
-#: elf32-cris.c:1158
+#: elf32-bfin.c:3133
+msgid "warning: relocation references a different segment"
+msgstr "varning: omlokalisering anvÃ¤nder ett annat segment"
+
+#: elf32-bfin.c:4907
+msgid "%B: unsupported relocation type %i"
+msgstr "%B: omlokaliseringstyp %i saknar stÃ¶d"
+
+#: elf32-bfin.c:4995 elf32-frv.c:6600
 #, c-format
-msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: omlokalisering %s i sektionen %s utan GOT skapad"
+msgid "%s: cannot link non-fdpic object file into fdpic executable"
+msgstr "%s: kan inte lÃ¤nka icke-fdpic-objektfil till fdpic-kÃ¶rfil"
 
-#: elf32-cris.c:1277
+#: elf32-bfin.c:4999 elf32-frv.c:6604
 #, c-format
-msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr "%s: Intern inkonsistens; ingen omlokaliseringssektion %s"
+msgid "%s: cannot link fdpic object file into non-fdpic executable"
+msgstr "%s: kan inte lÃ¤nka fdpic-objektfil till icke-fdpic-kÃ¶rfil"
 
-#: elf32-cris.c:2500
+#: elf32-bfin.c:5153
 #, c-format
+msgid "*** check this relocation %s"
+msgstr "*** kontrollera denna omlokalisering: %s"
+
+#: elf32-cris.c:1110
+msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
+msgstr "%B, sektion %A: olÃ¤slig omlokalisering %s mot symbol â€�%sâ€�"
+
+#: elf32-cris.c:1172
+msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
+msgstr "%B, sektion %A: Varken PLT eller GOT fÃ¶r omlokalisering %s mot symbol â€�%sâ€�"
+
+#: elf32-cris.c:1174
+msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
+msgstr "%B, sektion %A: Ingen PLT fÃ¶r omlokalisering %s mot symbol â€�%sâ€�"
+
+#: elf32-cris.c:1180 elf32-cris.c:1313 elf32-cris.c:1573 elf32-cris.c:1656
+#: elf32-cris.c:1809 elf32-tic6x.c:2645
+msgid "[whose name is lost]"
+msgstr "[vars namn tappats bort]"
+
+#: elf32-cris.c:1299 elf32-tic6x.c:2630
+msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol"
+msgstr "%B, sektion %A: omlokalisering %s med addend %d som inte Ã¤r noll mot lokal symbol"
+
+#: elf32-cris.c:1307 elf32-cris.c:1650 elf32-cris.c:1803 elf32-tic6x.c:2638
+msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
+msgstr "%B, sektion %A: omlokalisering %s med addend %d som inte Ã¤r noll mot symbol â€�%sâ€�"
+
+#: elf32-cris.c:1333
+msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
+msgstr "%B, sektion %A: omlokalisering %s tillÃ¥ts inte fÃ¶r global symbol: â€�%sâ€�"
+
+#: elf32-cris.c:1349
+msgid "%B, section %A: relocation %s with no GOT created"
+msgstr "%B, sektion %A: omlokalisering %s utan GOT skapades"
+
+#. We shouldn't get here for GCC-emitted code.
+#: elf32-cris.c:1564
+msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?"
+msgstr "%B, sektion %A: omlokalisering %s har en odefinierad referens till â€�%sâ€�, kanske en deklarationsblunder?"
+
+#: elf32-cris.c:1937
+msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?"
+msgstr "%B, sektion %A: omlokalisering %s tillÃ¥ts inte fÃ¶r symbol: â€�%sâ€� som definieras utanfÃ¶r programmet, kanske en deklarationsblunder?"
+
+#: elf32-cris.c:1990
+msgid "(too many global variables for -fpic: recompile with -fPIC)"
+msgstr "(fÃ¶r mÃ¥nga globala variabler fÃ¶r -fpic: kompilera om med -fPIC)"
+
+#: elf32-cris.c:1997
+msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)"
+msgstr "(thread-local-data fÃ¶r stor fÃ¶r -fpic eller -msmall-tls: kompilera om med -fPIC eller -mno-small-tls)"
+
+#: elf32-cris.c:3234
+msgid ""
+"%B, section %A:\n"
+"  v10/v32 compatible object %s must not contain a PIC relocation"
+msgstr ""
+"%B, sektion %A:\n"
+"  v10/v32-kompatibelt objekt %s fÃ¥r inte innehÃ¥lla en PIC-omlokalisering"
+
+#: elf32-cris.c:3342
+msgid ""
+"%B, section %A:\n"
+"  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC"
+msgstr ""
+"%B, sektion %A:\n"
+"  omlokalisering %s ogiltig i ett delat objekt; i regel en flaggmiss, kompilera om med -fPIC"
+
+#: elf32-cris.c:3556
 msgid ""
-"%s, section %s:\n"
+"%B, section %A:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
-"%s, sektion %s:\n"
-"  omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med -fPIC"
+"%B, sektion %A:\n"
+"  omlokalisering %s bÃ¶r inte anvÃ¤ndas i ett delat objekt; kompilera om med -fPIC"
 
-#: elf32-cris.c:2978
+#: elf32-cris.c:3978
+msgid ""
+"%B, section `%A', to symbol `%s':\n"
+"  relocation %s should not be used in a shared object; recompile with -fPIC"
+msgstr ""
+"%B, sektion â€�%Aâ€�, till symbol â€�%sâ€�:\n"
+"  omlokalisering %s bÃ¶r inte anvÃ¤ndas i ett delat objekt; kompilera om med -fPIC"
+
+#: elf32-cris.c:4091
+msgid "Unexpected machine number"
+msgstr "OvÃ¤ntat maskinnummer"
+
+#: elf32-cris.c:4142
+#, c-format
 msgid " [symbols have a _ prefix]"
 msgstr " [symboler har ett _-prefix]"
 
-#: elf32-cris.c:3017
+#: elf32-cris.c:4145
 #, c-format
-msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr "%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
+msgid " [v10 and v32]"
+msgstr " [v10 och v32]"
 
-#: elf32-cris.c:3018
+#: elf32-cris.c:4148
 #, c-format
-msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr "%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
+msgid " [v32]"
+msgstr " [v32]"
 
-#: elf32-frv.c:1223
-#, c-format
-msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
-msgstr "%s: kompilerad med %s och länkad med moduler som använder icke-pic-omlokalisering"
+#: elf32-cris.c:4191
+msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgstr "%B: anvÃ¤nder symboler med _-prefix, men skriver en fil med symboler utan prefix"
 
-#: elf32-frv.c:1273 elf32-iq2000.c:895
-#, c-format
-msgid "%s: compiled with %s and linked with modules compiled with %s"
-msgstr "%s: kompilerad med %s och länkad med moduler som kompilerats med %s"
+#: elf32-cris.c:4192
+msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgstr "%B: anvÃ¤nder symboler utan prefix, men skriver en fil med symboler med _-prefix"
 
-#: elf32-frv.c:1285
-#, c-format
-msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: använder andra okända e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
+#: elf32-cris.c:4211
+msgid "%B contains CRIS v32 code, incompatible with previous objects"
+msgstr "%B innehÃ¥ller CRIS v32-kod, inkompatibelt med fÃ¶regÃ¥ende objekt"
 
-#: elf32-frv.c:1321 elf32-iq2000.c:933
-#, c-format
-msgid "private flags = 0x%lx:"
-msgstr "privata flaggor = 0x%lx:"
+#: elf32-cris.c:4213
+msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
+msgstr "%B innehÃ¥ller icke-CRIS v32-kod, inkompatibelt med fÃ¶regÃ¥ende objekt"
 
-#: elf32-gen.c:83 elf64-gen.c:82
+#: elf32-dlx.c:142
 #, c-format
-msgid "%s: Relocations in generic ELF (EM: %d)"
-msgstr "%s: Omlokalisering i allmän ELF (EM: %d)"
+msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported"
+msgstr "BFD-lÃ¤nkningsfel: gren (PC rel16) till sektion (%s) saknar stÃ¶d"
 
-#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
+#: elf32-dlx.c:204
 #, c-format
-msgid "%s: cannot create stub entry %s"
-msgstr "%s: kan inte skapa stubbstarten %s"
+msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported"
+msgstr "BFD-lÃ¤nkningsfel: hopp (PC rel26) till sektion (%s) saknar stÃ¶d"
 
-#: elf32-hppa.c:957 elf32-hppa.c:3538
-#, c-format
-msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
-msgstr "%s(%s+0x%lx): kan inte nå %s, kompilera om med -ffunction-sections"
+#. Only if it's not an unresolved symbol.
+#: elf32-epiphany.c:564 elf32-ip2k.c:1475
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "omlokalisering mellan data/-instruktionsadressutrymmen stÃ¶ds inte"
 
-#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
-#, c-format
-msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; kompilera om med -fPIC"
+#: elf32-frv.c:1460 elf32-frv.c:1609
+msgid "relocation requires zero addend"
+msgstr "omlokalisering krÃ¤ver addend som Ã¤r noll"
 
-#: elf32-hppa.c:1360
-#, c-format
-msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; kompilera om med -fPIC"
+#: elf32-frv.c:2822
+msgid "%H: relocation to `%s+%v' may have caused the error above\n"
+msgstr "%H: omlokalisering till â€�%s+%vâ€� kan ha orsakat felet ovan\n"
 
-#: elf32-hppa.c:1553
-#, c-format
-msgid "Could not find relocation section for %s"
-msgstr "Kunde inte hitta omlokaliseringssektion för %s"
+#: elf32-frv.c:2839
+msgid "%H: relocation references symbol not defined in the module\n"
+msgstr "%H: omlokalisering hÃ¤nvisar till en symbol som inte definierats i modulen\n"
 
-#: elf32-hppa.c:2828
-#, c-format
-msgid "%s: duplicate export stub %s"
-msgstr "%s: dubbel exportstubb %s"
+#: elf32-frv.c:2915
+msgid "%H: R_FRV_GETTLSOFF not applied to a call instruction\n"
+msgstr "%H: R_FRV_GETTLSOFF inte tillÃ¤mpat pÃ¥ en anropsinstruktion\n"
 
-#: elf32-hppa.c:3416
-#, c-format
-msgid "%s(%s+0x%lx): fixing %s"
-msgstr "%s(%s+0x%lx): fixar %s"
+#: elf32-frv.c:2956
+msgid "%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESC12 inte tillÃ¤mpad pÃ¥ en lddi-instruktion\n"
 
-#: elf32-hppa.c:4039
-#, c-format
-msgid "%s(%s+0x%lx): cannot handle %s for %s"
-msgstr "%s(%s+0x%lx): kan inte hantera %s för %s"
+#: elf32-frv.c:3027
+msgid "%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESCHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion\n"
 
-#: elf32-hppa.c:4357
-msgid ".got section not immediately after .plt section"
-msgstr ".got-sektionen följer inte omedelbart efter .plt-sektion"
+#: elf32-frv.c:3064
+msgid "%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: R_FRV_GOTTLSDESCLO inte tillÃ¤mpad pÃ¥ en setlo- eller setlos-instruktion\n"
 
-#: elf32-i386.c:326
-#, c-format
-msgid "%s: invalid relocation type %d"
-msgstr "%s: ogiltig omlokaliseringstyp %d"
+#: elf32-frv.c:3111
+msgid "%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction\n"
+msgstr "%H: R_FRV_TLSDESC_RELAX inte tillÃ¤mpad pÃ¥ en ldd-instruktion\n"
+
+#: elf32-frv.c:3195
+msgid "%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction\n"
+msgstr "%H: R_FRV_GETTLSOFF_RELAX inte tillÃ¤mpad pÃ¥ en calll-instruktion\n"
+
+#: elf32-frv.c:3249
+msgid "%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFF12 inte tillÃ¤mpad pÃ¥ en ldi-instruktion\n"
+
+#: elf32-frv.c:3279
+msgid "%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFFHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion\n"
+
+#: elf32-frv.c:3308
+msgid "%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "%H: R_FRV_GOTTLSOFFLO inte tillÃ¤mpad pÃ¥ en setlo eller setlos instruktion\n"
 
-#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
-#: elf64-s390.c:943 elf64-x86-64.c:650
+#: elf32-frv.c:3338
+msgid "%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction\n"
+msgstr "%H: R_FRV_TLSOFF_RELAX inte tillÃ¤mpad pÃ¥ en ld-instruktion\n"
+
+#: elf32-frv.c:3383
+msgid "%H: R_FRV_TLSMOFFHI not applied to a sethi instruction\n"
+msgstr "%H: R_FRV_TLSMOFFHI inte tillÃ¤mpad pÃ¥ en sethi-instruktion\n"
+
+#: elf32-frv.c:3410
+msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction\n"
+msgstr "R_FRV_TLSMOFFLO inte tillÃ¤mpad pÃ¥ en setlo eller setlos instruktion\n"
+
+#: elf32-frv.c:3531
+msgid "%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend\n"
+msgstr "%H: R_FRV_FUNCDESC-referenser dynamisk symbol pÃ¥ ett ickenoll addend\n"
+
+#: elf32-frv.c:3572 elf32-frv.c:3694
+msgid "%H: cannot emit fixups in read-only section\n"
+msgstr "%H: kan inte sÃ¤nda ut fixar i skrivskyddade sektioner\n"
+
+#: elf32-frv.c:3603 elf32-frv.c:3737
+msgid "%H: cannot emit dynamic relocations in read-only section\n"
+msgstr "%H: kan inte sÃ¤nda ut dynamiska omlokaliseringar i skrivskyddad sektion\n"
+
+#: elf32-frv.c:3652
+msgid "%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend\n"
+msgstr "%H: R_FRV_FUNCDESC_VALUE hÃ¤nvisar till dynamisk symbol med icke-noll addend\n"
+
+#: elf32-frv.c:3908
+msgid "%H: reloc against `%s' references a different segment\n"
+msgstr "%H: omlokalisering mot â€�%sâ€� hÃ¤nvisar till ett annat segment\n"
+
+#: elf32-frv.c:4058
+msgid "%H: reloc against `%s': %s\n"
+msgstr "%H: omlokalisering mot â€�%sâ€�: %s\n"
+
+#: elf32-frv.c:6265
+msgid "%B: unsupported relocation type %i\n"
+msgstr "%B: omlokaliseringstyp stÃ¶ds ej %i\n"
+
+#: elf32-frv.c:6514
 #, c-format
-msgid "%s: bad symbol index: %d"
-msgstr "%s: felaktigt symbolindex: %d"
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: kompilerad med %s och lÃ¤nkad med moduler som anvÃ¤nder icke-pic-omlokalisering"
 
-#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
-#: elf64-s390.c:1129
+#: elf32-frv.c:6567 elf32-iq2000.c:828 elf32-m32c.c:812
 #, c-format
-msgid "%s: `%s' accessed both as normal and thread local symbol"
-msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: kompilerad med %s och lÃ¤nkad med moduler som kompilerats med %s"
 
-#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
-#: elf64-x86-64.c:886
+#: elf32-frv.c:6579
 #, c-format
-msgid "%s: bad relocation section name `%s'"
-msgstr "%s: felaktig omlokaliseringssektionsnamn \"%s\""
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: anvÃ¤nder andra okÃ¤nda e_flags-fÃ¤lt (0x%lx) Ã¤n tidigare moduler (0x%lx)"
 
-#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
-#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
-#: elf64-x86-64.c:2452
+#: elf32-frv.c:6627 elf32-iq2000.c:865 elf32-m32c.c:848 elf32-mt.c:561
+#: elf32-rl78.c:1069 elf32-rx.c:3040 elf64-ppc.c:5839
 #, c-format
-msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
-msgstr "%s(%s+0x%lx): olöslig omlokalisering mot symbolen \"%s\""
+msgid "private flags = 0x%lx:"
+msgstr "privata flaggor = 0x%lx:"
+
+#: elf32-gen.c:69 elf64-gen.c:69
+msgid "%B: Relocations in generic ELF (EM: %d)"
+msgstr "%B: omlokaliseringar i vanlig ELF (EM: %d)"
+
+#: elf32-hppa.c:830 elf32-hppa.c:3592
+msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+msgstr "%B(%A+0x%lx): kan inte nÃ¥ %s, kompilera om med -ffunction-sections"
+
+#: elf32-hppa.c:1268
+msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%B: omlokalisering %s kan inte anvÃ¤ndas vid skapande av ett delat objekt; kompilera om med -fPIC"
+
+#: elf32-hppa.c:2781
+msgid "%B: duplicate export stub %s"
+msgstr "%B: duplicera exportstubbe %s"
+
+#: elf32-hppa.c:3427
+msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
+msgstr "%B(%A+0x%lx): %s-fixup fÃ¶r insn 0x%x saknar stÃ¶d i en icke-delad lÃ¤nk"
+
+#: elf32-hppa.c:4279
+msgid "%B(%A+0x%lx): cannot handle %s for %s"
+msgstr "%B(%A+0x%lx): kan inte hantera %s fÃ¶r %s"
 
-#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
-#: elf64-x86-64.c:2490
+#: elf32-hppa.c:4598
+msgid ".got section not immediately after .plt section"
+msgstr ".got-sektion fÃ¶ljer inte omedelbart efter .plt-sektion"
+
+#. Unknown relocation.
+#: elf32-i386.c:380 elf32-m68k.c:353 elf32-ppc.c:2035 elf32-s390.c:345
+#: elf32-tic6x.c:2667 elf64-ppc.c:2427 elf64-s390.c:371 elf64-x86-64.c:281
+msgid "%B: invalid relocation type %d"
+msgstr "%B: ogiltig omlokaliseringstyp %d"
+
+#: elf32-i386.c:1394 elf64-x86-64.c:1410
+msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed"
+msgstr "%B: TLS-Ã¶vergÃ¥ng frÃ¥n %s till %s mot â€�%sâ€� vid 0x%lx i sektion â€�%Aâ€� misslyckades"
+
+#: elf32-i386.c:1642 elf32-s390.c:1233 elf32-sh.c:6263 elf32-tilepro.c:1627
+#: elf32-xtensa.c:1176 elf64-s390.c:1166 elfxx-sparc.c:1596
+#: elfxx-tilegx.c:1836
+msgid "%B: `%s' accessed both as normal and thread local symbol"
+msgstr "%B: â€�%sâ€� Ã¥tkommen som bÃ¥de normal och trÃ¥dlokal symbol"
+
+#: elf32-i386.c:2500 elf64-x86-64.c:2582
+msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"
+msgstr "%P: %B: varning: omlokalisering mot â€�%sâ€� i skrivskyddad sektion â€�%Aâ€�.\n"
+
+#: elf32-i386.c:2740 elf64-x86-64.c:2820
+msgid "%P: %B: warning: relocation in readonly section `%A'.\n"
+msgstr "%P: %B: varning: omlokalisering i skrivskyddad sektion â€�%Aâ€�.\n"
+
+#: elf32-i386.c:3207 elf32-tilepro.c:2873 elf64-x86-64.c:3275
+#: elfxx-tilegx.c:3172 /src/binutils-gdb/bfd/elfnn-aarch64.c:4099
+msgid "%B: unrecognized relocation (0x%x) in section `%A'"
+msgstr "%B: okÃ¤nd omlokalisering (0x%x) i sektion â€�%Aâ€�"
+
+#: elf32-i386.c:3368 elf64-x86-64.c:3380 elfxx-sparc.c:3150
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:3496
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+msgstr "%B: omlokalisering %s mot STT_GNU_IFUNC-symbolen â€�%sâ€� hanteras inte av %s"
+
+#: elf32-i386.c:3610 elf64-x86-64.c:3777
+msgid "hidden symbol"
+msgstr "dold symbol"
+
+#: elf32-i386.c:3613 elf64-x86-64.c:3780
+msgid "internal symbol"
+msgstr "intern symbol"
+
+#: elf32-i386.c:3616 elf64-x86-64.c:3783
+msgid "protected symbol"
+msgstr "skyddad symbol"
+
+#: elf32-i386.c:3619 elf64-x86-64.c:3786
+msgid "symbol"
+msgstr "symbol"
+
+#: elf32-i386.c:3624
+msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object"
+msgstr "%B: omlokalisering R_386_GOTOFF mot odefinierad %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas"
+
+#: elf32-i386.c:3635
+msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"
+msgstr "%B: omlokalisering R_386_GOTOFF mot skyddad funktion â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas"
+
+#: elf32-i386.c:4923 elf32-tilepro.c:3923 elf64-x86-64.c:4964
+#: elfxx-tilegx.c:4326 /src/binutils-gdb/bfd/elfnn-aarch64.c:7105
 #, c-format
-msgid "%s(%s+0x%lx): reloc against `%s': error %d"
-msgstr "%s(%s+0x%lx): omlokalisering mot \"%s\": fel %d"
+msgid "discarded output section: `%A'"
+msgstr "kastade utdata-sektion: â€�%Aâ€�"
 
-#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+#: elf32-ip2k.c:857 elf32-ip2k.c:863 elf32-ip2k.c:930 elf32-ip2k.c:936
 msgid "ip2k relaxer: switch table without complete matching relocation information."
-msgstr "ip2k-relaxerare: switchtabell utan helt matchande omlokaliseringsinformation."
+msgstr "ip2k-relaxer: switchtabell utan helt matchande omlokaliseringsinformation."
 
-#: elf32-ip2k.c:588 elf32-ip2k.c:767
+#: elf32-ip2k.c:880 elf32-ip2k.c:963
 msgid "ip2k relaxer: switch table header corrupt."
-msgstr "ip2k-relaxerare: switchtabellshuvud trasigt."
+msgstr "ip2k-relaxer: switch-tabellshuvud trasigt."
 
-#: elf32-ip2k.c:1395
+#: elf32-ip2k.c:1292
 #, c-format
 msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
-msgstr "ip2k-länkare: sidinstruktion saknas vid 0x%08lx (dest = 0x%08lx)."
+msgstr "ip2k-lÃ¤nkare: sidinstruktion saknas vid 0x%08lx (dest = 0x%08lx)."
 
-#: elf32-ip2k.c:1409
+#: elf32-ip2k.c:1308
 #, c-format
 msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
-msgstr "ip2k-länkare: redundant sidinstruktion vid 0x%08lx (dest = 0x%08lx)."
-
-#. Only if it's not an unresolved symbol.
-#: elf32-ip2k.c:1593
-msgid "unsupported relocation between data/insn address spaces"
-msgstr "omlokalisering mellan data/-instruktionsadressutrymmen stöds inte"
+msgstr "ip2k-lÃ¤nkare: Ã¶verflÃ¶dig sidinstruktion vid 0x%08lx (dest = 0x%08lx)."
 
-#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
-#: elfxx-mips.c:9195
+#: elf32-iq2000.c:841 elf32-m32c.c:824
 #, c-format
 msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
+msgstr "%s: anvÃ¤nder andra e_flags-fÃ¤lt (0x%lx) Ã¤n tidigare moduler (0x%lx)"
 
-#: elf32-m32r.c:930
-msgid "SDA relocation when _SDA_BASE_ not defined"
-msgstr "SDA-omlokalisering då _SDA_BASE_ inte är definierat"
+#: elf32-lm32.c:698 elf32-nios2.c:2191
+msgid "global pointer relative relocation when _gp not defined"
+msgstr "global pekarrelativ omlokalisering nÃ¤r _gp inte definierades"
 
-#: elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 elf32-ia64.c:3958
-#: elf64-ia64.c:3958
-#, c-format
-msgid "%s: unknown relocation type %d"
-msgstr "%s: okänd omlokaliseringstyp %d"
+#: elf32-lm32.c:753 elf32-nios2.c:2623
+msgid "global pointer relative address out of range"
+msgstr "global pekarrelativ adress utanfÃ¶r intervall"
 
-#: elf32-m32r.c:1226
-#, c-format
-msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel sektion (%s)"
+#: elf32-lm32.c:1049
+msgid "internal error: addend should be zero for R_LM32_16_GOT"
+msgstr "internt fel: addend bÃ¶r vara noll fÃ¶r R_LM32_16_GOT"
 
-#: elf32-m32r.c:1952
-#, c-format
-msgid "%s: Instruction set mismatch with previous modules"
-msgstr "%s: Instruktionsuppsättning passar inte med tidigare moduler"
+#: elf32-m32r.c:1453
+msgid "SDA relocation when _SDA_BASE_ not defined"
+msgstr "SDA-omlokalisering dÃ¥ _SDA_BASE_ inte Ã¤r definierat"
+
+#: elf32-m32r.c:3003
+msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
+msgstr "%B: Destinationen (%s) fÃ¶r en %s-omlokalisering Ã¤r i fel sektion (%A)"
 
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:3529
+msgid "%B: Instruction set mismatch with previous modules"
+msgstr "%B: InstruktionsuppsÃ¤ttningen stÃ¤mmer inte Ã¶verens med fÃ¶regÃ¥ende moduler"
+
+#: elf32-m32r.c:3550 elf32-nds32.c:5636
 #, c-format
 msgid "private flags = %lx"
 msgstr "privata flaggor = %lx"
 
-#: elf32-m32r.c:1980
+#: elf32-m32r.c:3555
+#, c-format
 msgid ": m32r instructions"
 msgstr ": m32r-instruktioner"
 
-#: elf32-m32r.c:1981
+#: elf32-m32r.c:3556
+#, c-format
 msgid ": m32rx instructions"
 msgstr ": m32rx-instruktioner"
 
-#: elf32-m68hc1x.c:1217
+#: elf32-m32r.c:3557
+#, c-format
+msgid ": m32r2 instructions"
+msgstr ": m32r2-instruktioner"
+
+#: elf32-m68hc1x.c:1114
 #, c-format
 msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
-msgstr "Referens till den avlägsna symbolen \"%s\" med hjälp av en felaktig omlokalisering kan resultera i felaktig exekvering"
+msgstr "Referens till den avlÃ¤gsna symbolen â€�%sâ€� med hjÃ¤lp av en felaktig omlokalisering kan resultera i felaktig exekvering"
+
+#: elf32-m68hc1x.c:1150
+#, c-format
+msgid "XGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code."
+msgstr "XGATE-adress (%lx) Ã¤r inte inom delat RAM(0xE000-0xFFFF), dÃ¤rfÃ¶r mÃ¥ste du manuellt fÃ¶rskjuta adressen och mÃ¶jligtvis hantera sidan i din kod."
 
-#: elf32-m68hc1x.c:1240
+#: elf32-m68hc1x.c:1170
 #, c-format
 msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
-msgstr "bankad adress [%lx:%04lx] (%lx) är inte i samma bank som den aktuella bankade adressen [%lx:%04lx] (%lx)"
+msgstr "bankad adress [%lx:%04lx] (%lx) Ã¤r inte i samma bank som den aktuella bankade adressen [%lx:%04lx] (%lx)"
 
-#: elf32-m68hc1x.c:1259
+#: elf32-m68hc1x.c:1190
 #, c-format
 msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
-msgstr "referens till en bankad adress [%lx:%04lx] i det normala adressutrymmet vid %04lx"
+msgstr "referens till en banked-adress [%lx:%04lx] i det normala adressutrymmet vid %04lx"
 
-#: elf32-m68hc1x.c:1396
+#: elf32-m68hc1x.c:1237
 #, c-format
-msgid "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
-msgstr "%s: länkar filer kompilerade för 16-bitars heltal (-mshort) och andra för 32-bitars heltal"
+msgid "S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your code"
+msgstr "S12-adress (%lx) Ã¤r inte inom delat RAM(0x2000-0x4000), dÃ¤rfÃ¶r mÃ¥ste du manuellt fÃ¶rskjuta adressen i din kod"
 
-#: elf32-m68hc1x.c:1404
-#, c-format
-msgid "%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
-msgstr "%s: länkar filer kompilerade för 32-bitars dubbelprecisionsflyttal (-fshort-double) och andra för 64-bitars dubbelprecisionsflyttal"
+#: elf32-m68hc1x.c:1370
+msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%B: lÃ¤nkar filer kompilerade fÃ¶r 16-bitars heltal (-mshort) och andra fÃ¶r 32-bitars heltal"
 
-#: elf32-m68hc1x.c:1414
-#, c-format
-msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
-msgstr "%s: länkar filer kompilerade för HCS12 med andra kompilerade för HC12"
+#: elf32-m68hc1x.c:1377
+msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%B: lÃ¤nkar filer kompilerade fÃ¶r 32-bitars dubbelprecision (-fshort-double) och andra fÃ¶r 64-bitars dubbelprecision"
+
+#: elf32-m68hc1x.c:1386
+msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%B: lÃ¤nkar filer kompilerade fÃ¶r HCS12 med andra kompilerade fÃ¶r HC12"
 
-#: elf32-m68hc1x.c:1462
+#: elf32-m68hc1x.c:1402 elf32-ppc.c:4776 elf64-sparc.c:706 elfxx-mips.c:14817
+msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%B: anvÃ¤nder andra e_flags-fÃ¤lt (0x%lx) Ã¤n fÃ¶regÃ¥ende moduler (0x%lx)"
+
+#: elf32-m68hc1x.c:1430 elf32-xgate.c:677
+#, c-format
 msgid "[abi=32-bit int, "
 msgstr "[abi=32-bitars heltal, "
 
-#: elf32-m68hc1x.c:1464
+#: elf32-m68hc1x.c:1432 elf32-xgate.c:679
+#, c-format
 msgid "[abi=16-bit int, "
 msgstr "[abi=16-bitars heltal, "
 
-#: elf32-m68hc1x.c:1467
+#: elf32-m68hc1x.c:1435 elf32-xgate.c:682
+#, c-format
 msgid "64-bit double, "
 msgstr "64-bitars dubbelprecisionsflyttal, "
 
-#: elf32-m68hc1x.c:1469
+#: elf32-m68hc1x.c:1437 elf32-xgate.c:684
+#, c-format
 msgid "32-bit double, "
 msgstr "32-bitars dubbelprecisionsflyttal, "
 
-#: elf32-m68hc1x.c:1472
+#: elf32-m68hc1x.c:1440
+#, c-format
 msgid "cpu=HC11]"
 msgstr "cpu=HC11]"
 
-#: elf32-m68hc1x.c:1474
+#: elf32-m68hc1x.c:1442
+#, c-format
 msgid "cpu=HCS12]"
 msgstr "cpu=HCS12]"
 
-#: elf32-m68hc1x.c:1476
+#: elf32-m68hc1x.c:1444
+#, c-format
 msgid "cpu=HC12]"
 msgstr "cpu=HC12]"
 
-#: elf32-m68hc1x.c:1479
+#: elf32-m68hc1x.c:1447
+#, c-format
 msgid " [memory=bank-model]"
-msgstr " [memory=bank-modell]"
+msgstr " [minne=bank-modell]"
 
-#: elf32-m68hc1x.c:1481
+#: elf32-m68hc1x.c:1449
+#, c-format
 msgid " [memory=flat]"
-msgstr " [memory=platt]"
+msgstr " [minne=platt]"
 
-#: elf32-m68k.c:400
-msgid " [cpu32]"
-msgstr " [cpu32]"
+#: elf32-m68hc1x.c:1452
+#, c-format
+msgid " [XGATE RAM offsetting]"
+msgstr " [XGATE RAM-fÃ¶rskjutning]"
 
-#: elf32-m68k.c:403
-msgid " [m68000]"
-msgstr " [m68000]"
+#: elf32-m68k.c:1210 elf32-m68k.c:1211 vms-alpha.c:7207 vms-alpha.c:7222
+msgid "unknown"
+msgstr "okÃ¤nd"
 
-#: elf32-mcore.c:353 elf32-mcore.c:456
-#, c-format
-msgid "%s: Relocation %s (%d) is not currently supported.\n"
-msgstr "%s: Omlokalisering %s (%d) stöds för närvarande inte.\n"
+#: elf32-m68k.c:1674
+msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d"
+msgstr "%B: GOT Ã¶verbelastades: Antal omlokaliseringar med 8-bitars fÃ¶rskjutning > %d"
 
-#: elf32-mcore.c:441
-#, c-format
-msgid "%s: Unknown relocation type %d\n"
-msgstr "%s: Okänd omlokaliseringstyp %d\n"
+#: elf32-m68k.c:1680
+msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d"
+msgstr "%B: GOT Ã¶verbelastades: Antal omlokaliseringar med 8- eller 16-bitars fÃ¶rskjutning > %d"
 
-#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
-msgid "32bits gp relative relocation occurs for an external symbol"
-msgstr "32-bitars gp-relativ omlokalisering förekom för en extern symbol"
+#: elf32-m68k.c:3921
+msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): omlokalisering R_68K_TLS_LE32 tillÃ¥ts inte i ett delat objekt"
 
-#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
-#, c-format
-msgid "Linking mips16 objects into %s format is not supported"
-msgstr "Länkning av mips16-objekt till %s-format stöds inte"
+#: elf32-mcore.c:99 elf32-mcore.c:442
+msgid "%B: Relocation %s (%d) is not currently supported.\n"
+msgstr "%B: omlokalisering %s (%d) saknar fÃ¶r nÃ¤rvarande stÃ¶d.\n"
 
-#: elf32-ppc.c:2056
-#, c-format
-msgid "generic linker can't handle %s"
-msgstr "allmän länkare kan inte hantera %s"
+#: elf32-mcore.c:428
+msgid "%B: Unknown relocation type %d\n"
+msgstr "%B: OkÃ¤nd omlokaliseringstyp %d\n"
 
-#: elf32-ppc.c:2138
+#. Pacify gcc -Wall.
+#: elf32-mep.c:157
 #, c-format
-msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr "%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats normalt"
+msgid "mep: no reloc for code %d"
+msgstr "mep: ingen omlokalisering fÃ¶r kod %d"
 
-#: elf32-ppc.c:2147
+#: elf32-mep.c:163
 #, c-format
-msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr "%s: kompilerad normalt och länkad med moduler som kompilerats med -mrelocatable"
+msgid "MeP: howto %d has type %d"
+msgstr "MeP: howto %d har typen %d"
 
-#: elf32-ppc.c:3413
-#, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas"
+#: elf32-mep.c:632
+msgid "%B and %B are for different cores"
+msgstr "%B och %B Ã¤r fÃ¶r olika kÃ¤rnor"
 
-#. It does not make sense to have a procedure linkage
-#. table entry for a local symbol.
-#: elf32-ppc.c:3619
-#, c-format
-msgid "%s(%s+0x%lx): %s reloc against local symbol"
-msgstr "%s(%s+0x%lx): %s-omlokalisering mot lokal symbol"
+#: elf32-mep.c:649
+msgid "%B and %B are for different configurations"
+msgstr "%B och %B Ã¤r fÃ¶r olika konfigurationer"
 
-#: elf32-ppc.c:4862 elf64-ppc.c:7789
+#: elf32-mep.c:686
 #, c-format
-msgid "%s: unknown relocation type %d for symbol %s"
-msgstr "%s: okänd omlokaliseringstyp %d för symbolen %s"
+msgid "private flags = 0x%lx"
+msgstr "privata flaggor = 0x%lx"
 
-#: elf32-ppc.c:5113
-#, c-format
-msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
-msgstr "%s(%s+0x%lx): icke-tomt addendum på %s-omlokalisering mot \"%s\""
+#: elf32-metag.c:1921
+msgid "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC-omlokalisering inte tillÃ¥tet i delat objekt"
 
-#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
+#: elf32-microblaze.c:950
 #, c-format
-msgid "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%s: målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)"
+msgid "%s: unknown relocation type %d"
+msgstr "%s: okÃ¤nd omlokaliseringstyp %d"
 
-#: elf32-ppc.c:5539
+#: elf32-microblaze.c:1076 elf32-microblaze.c:1121
 #, c-format
-msgid "%s: relocation %s is not yet supported for symbol %s."
-msgstr "%s: omlokaliseringen %s stöds inte än för symbolen %s."
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgstr "%s: MÃ¥let (%s) fÃ¶r en %s-omlokalisering Ã¤r i fel sektion (%s)"
 
-#: elf32-ppc.c:5594 elf64-ppc.c:8461
+#: elf32-microblaze.c:1484 elf32-tilepro.c:3320 elfxx-sparc.c:3526
+#: elfxx-tilegx.c:3729
+msgid "%B: probably compiled without -fPIC?"
+msgstr "%B: antagligen kompilerad utan -fPIC?"
+
+#: elf32-mips.c:1670 elf64-mips.c:2990 elfn32-mips.c:2793
+msgid "literal relocation occurs for an external symbol"
+msgstr "bokstavstrogen omlokalisering utfÃ¶rs fÃ¶r en extern symbol"
+
+#: elf32-mips.c:1717 elf32-score.c:570 elf32-score7.c:469 elf64-mips.c:3033
+#: elfn32-mips.c:2834
+msgid "32bits gp relative relocation occurs for an external symbol"
+msgstr "32-bitars gp-relativ omlokalisering fÃ¶rekom fÃ¶r en extern symbol"
+
+#: elf32-msp430.c:801 elf32-msp430.c:1109
+msgid "Try enabling relaxation to avoid relocation truncations"
+msgstr "FÃ¶rsÃ¶kte aktivera relax fÃ¶r att undvika omlokaliseringstrunkeringar"
+
+#: elf32-msp430.c:1317
+msgid "internal error: branch/jump to an odd address detected"
+msgstr "interna fel: grena/hoppa till en udda upptÃ¤ckt adress"
+
+#: elf32-msp430.c:2221
+msgid "Warning: %B: Unknown MSPABI object attribute %d"
+msgstr "Varning: %B: OkÃ¤nt MSPABI-objektattribut %d"
+
+#: elf32-msp430.c:2312
+msgid "error: %B uses %s instructions but %B uses %s"
+msgstr "fel: %B anvÃ¤nder %s-instruktioner men %B anvÃ¤nder %s"
+
+#: elf32-msp430.c:2324
+msgid "error: %B uses the %s code model whereas %B uses the %s code model"
+msgstr "fel: %B anvÃ¤nder %s-kodmodell men %B anvÃ¤nder %s-kodmodell"
+
+#: elf32-msp430.c:2336
+msgid "error: %B uses the large code model but %B uses MSP430 instructions"
+msgstr "fel: %B anvÃ¤nder den stora kodmodellen men %B anvÃ¤nder MSP430-instruktioner"
+
+#: elf32-msp430.c:2346
+msgid "error: %B uses the %s data model whereas %B uses the %s data model"
+msgstr "fel: %B anvÃ¤nder %s-datamodellen men %B anvÃ¤nder %s-datamodellen"
+
+#: elf32-msp430.c:2358
+msgid "error: %B uses the small code model but %B uses the %s data model"
+msgstr "fel: %B anvÃ¤nder den mindre kodmodellen men %B anvÃ¤nder %s-datamodellen"
+
+#: elf32-msp430.c:2369
+msgid "error: %B uses the %s data model but %B only uses MSP430 instructions"
+msgstr "fel: %B anvÃ¤nder %s-datamodellen men %B anvÃ¤nder MSP430-instruktioner"
+
+#: elf32-nds32.c:2921
+msgid "error: Can't find symbol: _SDA_BASE_."
+msgstr "fel: kan inte hitta symbol: _SDA_BASE_."
+
+#: elf32-nds32.c:4142
+msgid "%B: error: unknown relocation type %d."
+msgstr "%B-fel: okÃ¤nd omlokaliseringstyp %d."
+
+#: elf32-nds32.c:4584
+#, c-format
+msgid "%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode."
+msgstr "%s: varning: kan inte hantera R_NDS32_25_ABS_RELA i delat lÃ¤ge."
+
+#: elf32-nds32.c:4716
+msgid "%B: warning: unaligned access to GOT entry."
+msgstr "%B: varning: ojusterad Ã¥tkomst till GOT-post."
+
+#: elf32-nds32.c:4758
+msgid "%B: warning: relocate SDA_BASE failed."
+msgstr "%B: varning: omlokalisering av SDA_BASE-misslyckades."
+
+#: elf32-nds32.c:4779
+msgid "%B(%A): warning: unaligned small data access of type %d."
+msgstr "%B(%A): varning: ojusterad mindre dataÃ¥tkomst fÃ¶r typen %d."
+
+#: elf32-nds32.c:5446
+msgid "%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte"
+msgstr "%B: ISR-vektorstorlek stÃ¤mmer inte Ã¶verens med tidigare moduler, fÃ¶regÃ¥ende %u-byte, aktuell %u-byte"
+
+#: elf32-nds32.c:5489
+msgid "%B: warning: Endian mismatch with previous modules."
+msgstr "%B: varning: byteordning stÃ¤mmer inte med tidigare moduler."
+
+#: elf32-nds32.c:5499
+msgid "%B: warning: Older version of object file encountered, Please recompile with current tool chain."
+msgstr "%B: varning: Ã„ldre versioner av objektfiler pÃ¥trÃ¤ffat. Kompilera om med aktuell verktygskedja."
+
+#: elf32-nds32.c:5577
+msgid "%B: error: ABI mismatch with previous modules."
+msgstr "%B: fel: ABI-mismatch med tidigare moduler."
+
+#: elf32-nds32.c:5588
+msgid "%B: error: Instruction set mismatch with previous modules."
+msgstr "%B: fel: InstruktionsuppsÃ¤ttning stÃ¤mmer inte med tidigare moduler."
+
+#: elf32-nds32.c:5612
+msgid "%B: warning: Incompatible elf-versions %s and  %s."
+msgstr "%B: varning: Inkompatibla elf-versioner %s och %s."
+
+#: elf32-nds32.c:5642
+#, c-format
+msgid ": n1 instructions"
+msgstr ": n1-instruktioner"
+
+#: elf32-nds32.c:5645
+#, c-format
+msgid ": n1h instructions"
+msgstr ": n1h-instruktioner"
+
+#: elf32-nds32.c:8147
+msgid "%B: %s\n"
+msgstr "%B: %s\n"
+
+#: elf32-nds32.c:8449
+msgid "%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte."
+msgstr "%B(%A): varning: relax Ã¤r undertryckt fÃ¶r sektioner med justering %d-byte > 4-byte."
+
+#: elf32-nds32.c:8502
+msgid "%B: error: Cannot set _ITB_BASE_"
+msgstr "%B: fel: Kan inte sÃ¤tta _ITB_BASE_"
+
+#: elf32-nds32.c:11384
+msgid "%B: Nested OMIT_FP in %A."
+msgstr "%B: NÃ¤stlade OMIT_FP i %A."
+
+#: elf32-nds32.c:11401
+msgid "%B: Unmatched OMIT_FP in %A."
+msgstr "%B: Omatchade OMIT_FP i %A."
+
+#: elf32-nds32.c:13357
+msgid "Linker: cannot init ex9 hash table error \n"
+msgstr "LÃ¤nkare: kan inte initiera ex9-hashtabellfel \n"
+
+#: elf32-nds32.c:13790 elf32-nds32.c:13804
+msgid "Linker: error cannot fixed ex9 relocation \n"
+msgstr "LÃ¤nkare: kan inte fixa ex9-omlokalisering \n"
+
+#: elf32-nds32.c:14015
+#, c-format
+msgid "%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."
+msgstr "%s: varning: ojusterad liten dataÃ¥tkomst. FÃ¶r post: {%d, %d, %d}, adr = 0x%x, just = 0x%x."
+
+#: elf32-nds32.c:14047
+msgid "%P%F: failed creating ex9.it %s hash table: %E\n"
+msgstr "%P%F: misslyckades skapa ex9.it %s hashtabell: %E\n"
+
+#: elf32-nios2.c:2861
+#, c-format
+msgid "global pointer relative relocation at address 0x%08x when _gp not defined\n"
+msgstr "global pekarrelativ omlokalisering pÃ¥ adress 0x%08x nÃ¤r _gp inte Ã¤r definierad\n"
+
+#: elf32-nios2.c:2878
+#, c-format
+msgid "Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.\n"
+msgstr "Kunde inte nÃ¥ %s (pÃ¥ 0x%08x) frÃ¥n den globala pekaren (pÃ¥ 0x%08x) eftersom fÃ¶rskjutningen (%d) Ã¤r utanfÃ¶r det tillÃ¥tna intervallet, -32678 till 32767.\n"
+
+#: elf32-nios2.c:3392
+msgid "%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object"
+msgstr "%B(%A+0x%lx): R_NIOS2_TLS_LE16-omlokalisering inte tillÃ¥tet i ett delat objekt"
+
+#: elf32-nios2.c:3520
+msgid "relocation out of range"
+msgstr "omlokalisering utanfÃ¶r intervallet"
+
+#: elf32-nios2.c:3530 elf32-tic6x.c:2744
+msgid "dangerous relocation"
+msgstr "riskabel omlokalisering"
+
+#: elf32-nios2.c:4529
+#, c-format
+msgid "dynamic variable `%s' is zero size"
+msgstr "dynamisk variabel â€�%sâ€� Ã¤r av storlek noll"
+
+#: elf32-ppc.c:2100
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "allmÃ¤n lÃ¤nkare kan inte hantera %s"
+
+#: elf32-ppc.c:2642
+msgid "corrupt %s section in %B"
+msgstr "korrupt %s-sektion i %B"
+
+#: elf32-ppc.c:2661
+msgid "unable to read in %s section from %B"
+msgstr "kunde inte lÃ¤sa i sektionen %s frÃ¥n %B"
+
+#: elf32-ppc.c:2702
+msgid "warning: unable to set size of %s section in %B"
+msgstr "varning: kunde inte ange storlek fÃ¶r sektionen %s i %B"
+
+#: elf32-ppc.c:2752
+msgid "failed to allocate space for new APUinfo section."
+msgstr "misslyckades med att allokera utrymme fÃ¶r nytt APUinfo-sektion."
+
+#: elf32-ppc.c:2771
+msgid "failed to compute new APUinfo section."
+msgstr "misslyckades med att berÃ¤kna nytt APUinfo-sektion."
+
+#: elf32-ppc.c:2774
+msgid "failed to install new APUinfo section."
+msgstr "misslyckades med att installera nytt APUinfo-sektion."
+
+#: elf32-ppc.c:3844
+msgid "%B: relocation %s cannot be used when making a shared object"
+msgstr "%B: omlokalisering %s kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas"
+
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:4218
+msgid "%P: %H: %s reloc against local symbol\n"
+msgstr "%P: %H: %s-omlokalisering mot lokala symboler\n"
+
+#: elf32-ppc.c:4299
+msgid "%P: %H: @local call to ifunc %s\n"
+msgstr "%P: %H: @local till ifunc %s\n"
+
+#: elf32-ppc.c:4588 elf32-ppc.c:4603
+msgid "Warning: %B uses hard float, %B uses soft float"
+msgstr "Varning. %B anvÃ¤nder hÃ¥rt flyttal, %B anvÃ¤nder mjukt flyttal"
+
+#: elf32-ppc.c:4591 elf32-ppc.c:4595
+msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float"
+msgstr "Varning: %B anvÃ¤nder hÃ¥rt flyttal med dubbelprecision, %B anvÃ¤nder hÃ¥rt flyttal med enkel precision"
+
+#: elf32-ppc.c:4599
+msgid "Warning: %B uses soft float, %B uses single-precision hard float"
+msgstr "Varning: %B anvÃ¤nder mjuka flyttal, %B anvÃ¤nder hÃ¥rda flyttal med enkelprecision"
+
+#: elf32-ppc.c:4606 elf32-ppc.c:4610
+msgid "Warning: %B uses unknown floating point ABI %d"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %d"
+
+#: elf32-ppc.c:4652 elf32-ppc.c:4656
+msgid "Warning: %B uses unknown vector ABI %d"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nd vektor-ABI %d"
+
+#: elf32-ppc.c:4660
+msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\""
+msgstr "Varning: %B anvÃ¤nder vektor-ABI â€�%sâ€�, %B anvÃ¤nder â€�%sâ€�"
+
+#: elf32-ppc.c:4677 elf32-ppc.c:4680
+msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory"
+msgstr "Varning: %B anvÃ¤nder r3/r4 fÃ¶r smÃ¥ struktur-returneringar, %B anvÃ¤nder minnet"
+
+#: elf32-ppc.c:4683 elf32-ppc.c:4687
+msgid "Warning: %B uses unknown small structure return convention %d"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nd konvention %d fÃ¶r smÃ¥ strukturers returer"
+
+#: elf32-ppc.c:4741
+msgid "%B: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%B: kompilerades med -mrelocatable och lÃ¤nkades med moduler som kompilerats normalt"
+
+#: elf32-ppc.c:4749
+msgid "%B: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%B: kompilerades normalt och lÃ¤nkades med moduler som kompilerades med -mrelocatable"
+
+#: elf32-ppc.c:4872
+msgid "%P: bss-plt forced due to %B\n"
+msgstr "%P: bss-plt tvingade till %B\n"
+
+#: elf32-ppc.c:4875
+msgid "%P: bss-plt forced by profiling\n"
+msgstr "%P: bss-plt tvingade genom profilering\n"
+
+#. Uh oh, we didn't find the expected call.  We
+#. could just mark this symbol to exclude it
+#. from tls optimization but it's safer to skip
+#. the entire optimization.
+#: elf32-ppc.c:5369 elf64-ppc.c:8371
+msgid "%H arg lost __tls_get_addr, TLS optimization disabled\n"
+msgstr "%H arg fÃ¶rsvunnet __tls_get_addr, TLS-optimering inaktiverad\n"
+
+#: elf32-ppc.c:7927
+msgid "%P: %B: unknown relocation type %d for symbol %s\n"
+msgstr "%P: %B: okÃ¤nd omlokaliseringstyp %d fÃ¶r symbolen %s\n"
+
+#: elf32-ppc.c:8191
+msgid "%P: %H: non-zero addend on %s reloc against `%s'\n"
+msgstr "%P: %H: ej-noll addend pÃ¥ %s omlokalisering mot â€�%sâ€�\n"
+
+#: elf32-ppc.c:8389
+msgid "%P: %H: relocation %s for indirect function %s unsupported\n"
+msgstr "%P: %H: omlokalisering %s fÃ¶r indirekta funktionen %s stÃ¶ddes ej\n"
+
+#: elf32-ppc.c:8646 elf32-ppc.c:8676 elf32-ppc.c:8767
+msgid "%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)\n"
+msgstr "%P %B: destinationen (%s) av %s fÃ¶r omlokaliseringen Ã¤r i fel utdata-sektion (%s)\n"
+
+#: elf32-ppc.c:8854
+msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%B: destinationen (%s) fÃ¶r omlokaliseringen %s Ã¤r i fel utdata-sektion (%s)"
+
+#: elf32-ppc.c:8958
+msgid "%P: %B: relocation %s is not yet supported for symbol %s\n"
+msgstr "%P: %B: omlokalisering %s stÃ¶ds ej fÃ¶r symbolen %s\n"
+
+#: elf32-ppc.c:9038
+msgid "%P: %H: error: %s against `%s' not a multiple of %u\n"
+msgstr "%P: %H: fel: %s mot â€�%sâ€� Ã¤r inte en multipel av %u\n"
+
+#: elf32-ppc.c:9067
+msgid "%P: %H: unresolvable %s relocation against symbol `%s'\n"
+msgstr "%P: %H: olÃ¶sbar %s-omlokalisering till symbolen â€�%sâ€�\n"
+
+#: elf32-ppc.c:9114
+msgid "%P: %H: %s reloc against `%s': error %d\n"
+msgstr "%P: %H: %s omlokalisering till â€�%sâ€�: fel %d\n"
+
+#: elf32-ppc.c:9750
+msgid "%P: %s not defined in linker created %s\n"
+msgstr "%P: %s Ã¤r inte definierat i lÃ¤nkaren skapad %s\n"
+
+#: elf32-rl78.c:784
+msgid "Warning: RL78_SYM reloc with an unknown symbol"
+msgstr "Varning: RL78_SYM-omlokalisering med en okÃ¤nd symbol"
+
+#: elf32-rl78.c:952 elf32-rx.c:1324
+msgid "%B(%A): error: call to undefined function '%s'"
+msgstr "%B(%A): fel: anrop till odefinierad funktion â€�%sâ€�"
+
+#: elf32-rl78.c:966 elf32-rx.c:1338
+msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
+msgstr "%B(%A): varning: ojusterad Ã¥tkomst till symbol â€�%sâ€� i mindre dataomrÃ¥det"
+
+#: elf32-rl78.c:970 elf32-rx.c:1342
+msgid "%B(%A): internal error: out of range error"
+msgstr "%B(%A): internt fel: utanfÃ¶r intervall"
+
+#: elf32-rl78.c:974 elf32-rx.c:1346
+msgid "%B(%A): internal error: unsupported relocation error"
+msgstr "%B(%A): internt fel: omlokalisering saknar stÃ¶d"
+
+#: elf32-rl78.c:978 elf32-rx.c:1350
+msgid "%B(%A): internal error: dangerous relocation"
+msgstr "%B(%A): internt fel: riskabel omlokalisering"
+
+#: elf32-rl78.c:982 elf32-rx.c:1354
+msgid "%B(%A): internal error: unknown error"
+msgstr "%B(%A): internt fel: okÃ¤nt fel"
+
+#: elf32-rl78.c:1043
+msgid "RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"
+msgstr "RL78/G10 ABI-konflikt: kan inte lÃ¤nka samman G10 och icke-G10 objekt"
+
+#: elf32-rl78.c:1046 elf32-rl78.c:1049
+#, c-format
+msgid "- %s is G10, %s is not"
+msgstr "- %s Ã¤r G10, %s Ã¤r det ej"
+
+#: elf32-rl78.c:1072
+#, c-format
+msgid " [G10]"
+msgstr " [G10]"
+
+#: elf32-rx.c:563
+msgid "%B:%A: Warning: deprecated Red Hat reloc "
+msgstr "%B:%A: Varning: fÃ¶rÃ¥ldrad Red Hat-omlokalisering "
+
+#. Check for unsafe relocs in PID mode.  These are any relocs where
+#. an absolute address is being computed.  There are special cases
+#. for relocs against symbols that are known to be referenced in
+#. crt0.o before the PID base address register has been initialised.
+#: elf32-rx.c:581
+msgid "%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"
+msgstr "%B(%A): osÃ¤ker PID-omlokalisering %s vid 0x%08lx (mot %s i %s)"
+
+#: elf32-rx.c:1157
+msgid "Warning: RX_SYM reloc with an unknown symbol"
+msgstr "Varning: RX_SYM-omlokalisering med en okÃ¤nd symbol"
+
+#: elf32-s390.c:2292 elf64-s390.c:2244
+msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%B(%A+0x%lx): ogiltig instruktion fÃ¶r TLS-omlokalisering %s"
+
+#: elf32-score.c:1520 elf32-score7.c:1379 elfxx-mips.c:3642
+msgid "not enough GOT space for local GOT entries"
+msgstr "inte tillrÃ¤ckligt med GOT-utrymme fÃ¶r lokala GOT-poster"
+
+#: elf32-score.c:2742
+msgid "address not word align"
+msgstr "adressen inte ordjusterad"
+
+#: elf32-score.c:2827 elf32-score7.c:2631
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: Felaktig omlokalisering fÃ¶r sektion %s upptÃ¤ckt"
+
+#: elf32-score.c:2882 elf32-score7.c:2686
+msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
+msgstr "%B: CALL15-omlokalisering vid 0x%lx inte mot global symbol"
+
+#: elf32-score.c:4007 elf32-score7.c:3811
+#, c-format
+msgid " [pic]"
+msgstr " [pic]"
+
+#: elf32-score.c:4011 elf32-score7.c:3815
+#, c-format
+msgid " [fix dep]"
+msgstr " [fix dep]"
+
+#: elf32-score.c:4053 elf32-score7.c:3857
+msgid "%B: warning: linking PIC files with non-PIC files"
+msgstr "%B: varning: lÃ¤nkar PIC-filer med icke-PIC-filer"
+
+#: elf32-sh-symbian.c:130
+msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
+msgstr "%B: IMPORT AS-direktiv fÃ¶r %s dÃ¶ljer fÃ¶regÃ¥ende IMPORT AS"
+
+#: elf32-sh-symbian.c:383
+msgid "%B: Unrecognised .directive command: %s"
+msgstr "%B: OkÃ¤nt .directive-kommando: %s"
+
+#: elf32-sh-symbian.c:500
+msgid "%B: Failed to add renamed symbol %s"
+msgstr "%B: Kunde inte lÃ¤gga till namnÃ¤ndrad symbol %s"
+
+#: elf32-sh.c:569
+msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
+msgstr "%B: 0x%lx: varning: felaktig R_SH_USES-fÃ¶rskjutning"
+
+#: elf32-sh.c:581
+msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgstr "%B: 0x%lx: varning: R_SH_USES pekar pÃ¥ okÃ¤nd insn 0x%x"
+
+#: elf32-sh.c:598
+msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
+msgstr "%B: 0x%lx: varning: felaktig R_SH_USES-laddningsfÃ¶rskjutning"
+
+#: elf32-sh.c:613
+msgid "%B: 0x%lx: warning: could not find expected reloc"
+msgstr "%B: 0x%lx: varning: kunde inte hitta fÃ¶rvÃ¤ntad omlokalisering"
+
+#: elf32-sh.c:641
+msgid "%B: 0x%lx: warning: symbol in unexpected section"
+msgstr "%B: 0x%lx: varning: symbol i ovÃ¤ntad sektion"
+
+#: elf32-sh.c:767
+msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
+msgstr "%B: 0x%lx: varning: kunde inte hitta fÃ¶rvÃ¤ntad COUNT-omlokalisering"
+
+#: elf32-sh.c:776
+msgid "%B: 0x%lx: warning: bad count"
+msgstr "%B: 0x%lx: varning: felaktigt antal"
+
+#: elf32-sh.c:1180 elf32-sh.c:1550
+msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr "%B: 0x%lx: Ã¶desdigert: omlokalisering Ã¶verbelastad vid relax"
+
+#: elf32-sh.c:3939 elf64-sh64.c:1514
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "OvÃ¤ntat STO_SH5_ISA32 pÃ¥ lokal symbol hanteras inte"
+
+#: elf32-sh.c:4190
+msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgstr "%B: 0x%lx: Ã¶desdigert: ojusterad grendestination fÃ¶r relax-stÃ¶dd omlokalisering"
+
+#: elf32-sh.c:4223 elf32-sh.c:4238
+msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
+msgstr "%B: 0x%lx: Ã¶desdigert: ojusterad %s-omlokalisering 0x%lx"
+
+#: elf32-sh.c:4252
+msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
+msgstr "%B: 0x%lx: Ã¶desdigert: R_SH_PSHA-omlokalisering %d inte i intervallet -32..32"
+
+#: elf32-sh.c:4266
+msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
+msgstr "%B: 0x%lx: Ã¶desdigert: R_SH_PSHL-omlokalisering %d inte i intervallet -32..32"
+
+#: elf32-sh.c:4410 elf32-sh.c:4886
+msgid "%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"
+msgstr "%B(%A+0x%lx): kan inte skicka fix till â€�%sâ€� i en skrivskyddad sektion"
+
+#: elf32-sh.c:4993
+msgid "%B(%A+0x%lx): %s relocation against external symbol \"%s\""
+msgstr "%B(%A+0x%lx): %s-omlokalisering mot extern symbol â€�%sâ€�"
+
+#: elf32-sh.c:5466
+#, c-format
+msgid "%X%C: relocation to \"%s\" references a different segment\n"
+msgstr "%X%C: omlokalisering till â€�%sâ€� anvÃ¤nder ett annat segment\n"
+
+#: elf32-sh.c:5472
+#, c-format
+msgid "%C: warning: relocation to \"%s\" references a different segment\n"
+msgstr "%C: varning: omlokalisering till â€�%sâ€� anvÃ¤nder ett annat segment\n"
+
+#: elf32-sh.c:6254 elf32-sh.c:6337
+msgid "%B: `%s' accessed both as normal and FDPIC symbol"
+msgstr "%B: â€�%sâ€� Ã¥tkommen bÃ¥de som normal och FDPIC-symbol"
+
+#: elf32-sh.c:6259 elf32-sh.c:6341
+msgid "%B: `%s' accessed both as FDPIC and thread local symbol"
+msgstr "%B: â€�%sâ€� Ã¥tkommen bÃ¥de som FDPIC- och trÃ¥dlokal symbol"
+
+#: elf32-sh.c:6289
+msgid "%B: Function descriptor relocation with non-zero addend"
+msgstr "%B: Funktionsbeskrivningsomlokalisering med addend som inte Ã¤r noll"
+
+#: elf32-sh.c:6525 elf64-alpha.c:4661
+msgid "%B: TLS local exec code cannot be linked into shared objects"
+msgstr "%B: TLS-lokal kÃ¶rkod kan inte lÃ¤nkas till delade objekt"
+
+#: elf32-sh64.c:224 elf64-sh64.c:2318
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: kompilerat som 32-bitarsobjekt och %s Ã¤r 64-bitars"
+
+#: elf32-sh64.c:227 elf64-sh64.c:2321
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: kompilerat som 64-bitarsobjekt och %s Ã¤r 32-bitars"
+
+#: elf32-sh64.c:229 elf64-sh64.c:2323
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: objektstorleken stÃ¤mmer inte Ã¶verens med den hos mÃ¥let %s"
+
+#: elf32-sh64.c:452 elf64-sh64.c:2839
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: pÃ¥trÃ¤ffade dataetikettssymbol i indata"
+
+#: elf32-sh64.c:529
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "PTB passar inte: en SHmedia-adress (bit 0 == 1)"
+
+#: elf32-sh64.c:532
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "PTA passar inte: en SHcompact-adress (bit 0 == 0)"
+
+#: elf32-sh64.c:550
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: GAS-fel: ovÃ¤ntad PTB-instruktion med R_SH_PT_16"
+
+#: elf32-sh64.c:599
+msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
+msgstr "%B: fel: ojusterad omlokaliseringstyp %d vid %08x omlokalisering %p\n"
+
+#: elf32-sh64.c:675
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: kunde inte skriva ut tillagda .cranges-poster"
+
+#: elf32-sh64.c:735
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: kunde inte skriva ut sorterade cranges-poster"
+
+#: elf32-sparc.c:90
+msgid "%B: compiled for a 64 bit system and target is 32 bit"
+msgstr "%B: kompilerad fÃ¶r ett 64-bitars system medan destinationen Ã¤r 32-bitar"
+
+#: elf32-sparc.c:103
+msgid "%B: linking little endian files with big endian files"
+msgstr "%B: lÃ¤nkar filer med omvÃ¤nd byteordning med rak byteordning"
+
+#: elf32-spu.c:716
+msgid "%X%P: overlay section %A does not start on a cache line.\n"
+msgstr "%X%P: Ã¶verlÃ¤ggssektion %A bÃ¶rjar inte pÃ¥ en cache-rad.\n"
+
+#: elf32-spu.c:724
+msgid "%X%P: overlay section %A is larger than a cache line.\n"
+msgstr "%X%P: Ã¶verlÃ¤ggssektion %A Ã¤r stÃ¶rre Ã¤n en cache-rad.\n"
+
+#: elf32-spu.c:744
+msgid "%X%P: overlay section %A is not in cache area.\n"
+msgstr "%X%P: Ã¶verlÃ¤ggssektion %A finns inte i cache-omrÃ¥det.\n"
+
+#: elf32-spu.c:784
+msgid "%X%P: overlay sections %A and %A do not start at the same address.\n"
+msgstr "%X%P: Ã¶verlÃ¤ggssektionen %A och %A bÃ¶rjar inte pÃ¥ samma adress.\n"
+
+#: elf32-spu.c:1008
+msgid "warning: call to non-function symbol %s defined in %B"
+msgstr "varning: anrop till icke-funktionssymbolen %s definierat i %B"
+
+#: elf32-spu.c:1358
+msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n"
+msgstr "%A: 0x%v lrlive .brinfo (%u) skiljer sig frÃ¥n analys (%u)\n"
+
+#: elf32-spu.c:1877
+msgid "%B is not allowed to define %s"
+msgstr "%B har inte tillstÃ¥nd att definiera %s"
+
+#: elf32-spu.c:1885
+#, c-format
+msgid "you are not allowed to define %s in a script"
+msgstr "du har inte tillstÃ¥nd att definiera %s i ett skript"
+
+#: elf32-spu.c:1919
+#, c-format
+msgid "%s in overlay section"
+msgstr "%s i Ã¶verlÃ¤ggssektion"
+
+#: elf32-spu.c:1948
+msgid "overlay stub relocation overflow"
+msgstr "omlokalisering fÃ¶r Ã¶verlÃ¤ggsstubbe spillde Ã¶ver"
+
+#: elf32-spu.c:1957
+msgid "stubs don't match calculated size"
+msgstr "stubbar stÃ¤mmer inte Ã¶verens med berÃ¤knad storlek"
+
+#: elf32-spu.c:2539
+#, c-format
+msgid "warning: %s overlaps %s\n"
+msgstr "varning: %s Ã¶verlappar %s\n"
+
+#: elf32-spu.c:2555
+#, c-format
+msgid "warning: %s exceeds section size\n"
+msgstr "varning: %s Ã¶verstiger sektionens storlek\n"
+
+#: elf32-spu.c:2586
+msgid "%A:0x%v not found in function table\n"
+msgstr "%A:0x%v hittades inte i funktionstabellen\n"
+
+#: elf32-spu.c:2726
+msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n"
+msgstr "%B(%A+0x%v): anrop till icke-kodsektion %B(%A), analys inte slutfÃ¶rd\n"
+
+#: elf32-spu.c:3294
+#, c-format
+msgid "Stack analysis will ignore the call from %s to %s\n"
+msgstr "Stackanalys kommer ignorera anropet frÃ¥n %s till %s\n"
+
+#: elf32-spu.c:3985
+msgid "  %s: 0x%v\n"
+msgstr "  %s: 0x%v\n"
+
+#: elf32-spu.c:3986
+msgid "%s: 0x%v 0x%v\n"
+msgstr "%s: 0x%v 0x%v\n"
+
+#: elf32-spu.c:3991
+msgid "  calls:\n"
+msgstr "  anrop:\n"
+
+#: elf32-spu.c:3999
+#, c-format
+msgid "   %s%s %s\n"
+msgstr "   %s%s %s\n"
+
+#: elf32-spu.c:4304
+#, c-format
+msgid "%s duplicated in %s\n"
+msgstr "%s duplicerad i %s\n"
+
+#: elf32-spu.c:4308
+#, c-format
+msgid "%s duplicated\n"
+msgstr "%s duplicerad\n"
+
+#: elf32-spu.c:4315
+msgid "sorry, no support for duplicate object files in auto-overlay script\n"
+msgstr "tyvÃ¤rr, inget stÃ¶d fÃ¶r duplicerade objektfiler i auto-Ã¶verlÃ¤ggsskript\n"
+
+#: elf32-spu.c:4356
+msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n"
+msgstr "icke-Ã¶verlÃ¤ggsstorlek pÃ¥ 0x%v plus stÃ¶rsta Ã¶verlÃ¤ggsstorlek pÃ¥ 0x%v Ã¶verstiger lokal lagring\n"
+
+#: elf32-spu.c:4511
+msgid "%B:%A%s exceeds overlay size\n"
+msgstr "%B:%A%s Ã¶verstiger Ã¶verlÃ¤ggsstorlek\n"
+
+#: elf32-spu.c:4673
+msgid "Stack size for call graph root nodes.\n"
+msgstr "Stackstorlek fÃ¶r anropsgrafens rotnoder.\n"
+
+#: elf32-spu.c:4674
+msgid ""
+"\n"
+"Stack size for functions.  Annotations: '*' max stack, 't' tail call\n"
+msgstr ""
+"\n"
+"Stackstorlek fÃ¶r funktioner. Annoteringar: â€�*â€� max stack, â€�tâ€� tail-anrop\n"
+
+#: elf32-spu.c:4684
+msgid "Maximum stack required is 0x%v\n"
+msgstr "Maximal stack som krÃ¤vs Ã¤r 0x%v\n"
+
+#: elf32-spu.c:4775
+msgid "fatal error while creating .fixup"
+msgstr "Ã¶desdigert fel nÃ¤r .fixup skapades"
+
+#: elf32-spu.c:5005
+msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%B(%s+0x%lx): olÃ¶slig %s-omlokalisering mot symbol â€�%sâ€�"
+
+#: elf32-tic6x.c:1600
+msgid "warning: generating a shared library containing non-PIC code"
+msgstr "varning: generera ett delat bibliotek innehÃ¥llandes icke-PIC-kod"
+
+#: elf32-tic6x.c:1605
+msgid "warning: generating a shared library containing non-PID code"
+msgstr "varning: generera ett delat bibliotek innehÃ¥llandes icke-PID-kod"
+
+#: elf32-tic6x.c:2524
+msgid "%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined"
+msgstr "%B: SB-relativ omlokalisering, men __c6xabi_DSBT_BASE har inte definierats"
+
+#: elf32-tic6x.c:3648
+msgid "%B: error: unknown mandatory EABI object attribute %d"
+msgstr "%B: fel: okÃ¤nt tvingande EABI-objektattribut %d"
+
+#: elf32-tic6x.c:3656
+msgid "%B: warning: unknown EABI object attribute %d"
+msgstr "%B: varning: okÃ¤nt EABI-objektattribut %d"
+
+#: elf32-tic6x.c:3768 elf32-tic6x.c:3776
+msgid "error: %B requires more stack alignment than %B preserves"
+msgstr "fel: %B krÃ¤ver mer stackrÃ¤ttning Ã¤n %B bevarar"
+
+#: elf32-tic6x.c:3786 elf32-tic6x.c:3795
+msgid "error: unknown Tag_ABI_array_object_alignment value in %B"
+msgstr "fel: okÃ¤nt Tag_ABI_array_object_alignment-vÃ¤rde i %B"
+
+#: elf32-tic6x.c:3804 elf32-tic6x.c:3813
+msgid "error: unknown Tag_ABI_array_object_align_expected value in %B"
+msgstr "fel: okÃ¤nt Tag_ABI_array_object_align_expected-vÃ¤rde i %B"
+
+#: elf32-tic6x.c:3821 elf32-tic6x.c:3828
+msgid "error: %B requires more array alignment than %B preserves"
+msgstr "fel: %B krÃ¤ver mer vektorjustering Ã¤n %B bevarar"
+
+#: elf32-tic6x.c:3850
+msgid "warning: %B and %B differ in wchar_t size"
+msgstr "varning: %B och %B skiljer i wchar_t-storlek"
+
+#: elf32-tic6x.c:3868
+msgid "warning: %B and %B differ in whether code is compiled for DSBT"
+msgstr "varning: %B och %B skiljer sig ifrÃ¥ga om koden Ã¤r kompilerad fÃ¶r DSBT eller ej"
+
+#: elf32-v850.c:157
+#, c-format
+msgid "Variable `%s' cannot occupy in multiple small data regions"
+msgstr "Variabel â€�%sâ€� kan inte befinna sig i flera smÃ¥ dataomrÃ¥den"
+
+#: elf32-v850.c:160
+#, c-format
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "Variabel â€�%sâ€� kan bara vara i ett av de smÃ¥, tomma och pyttesmÃ¥ dataomrÃ¥dena"
+
+#: elf32-v850.c:163
+#, c-format
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "Variabel â€�%sâ€� kan inte vara i bÃ¥de smÃ¥ och tomma dataomrÃ¥den samtidigt"
+
+#: elf32-v850.c:166
+#, c-format
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "Variabel â€�%sâ€� kan inte vara i bÃ¥de smÃ¥ och pyttesmÃ¥ dataomrÃ¥den samtidigt"
+
+#: elf32-v850.c:169
+#, c-format
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "Variabel â€�%sâ€� kan inte vara i bÃ¥de tomma och pyttesmÃ¥ dataomrÃ¥den samtidigt"
+
+#: elf32-v850.c:467
+msgid "FAILED to find previous HI16 reloc"
+msgstr "KUNDE INTE HITTA fÃ¶regÃ¥ende HI16-omlokalisering"
+
+#: elf32-v850.c:2293
+msgid "could not locate special linker symbol __gp"
+msgstr "kunde inte lokalisera speciell lÃ¤nkarsymbol __gp"
+
+#: elf32-v850.c:2297
+msgid "could not locate special linker symbol __ep"
+msgstr "kunde inte lokalisera speciell lÃ¤nkarsymbol __ep"
+
+#: elf32-v850.c:2301
+msgid "could not locate special linker symbol __ctbp"
+msgstr "kunde inte lokalisera speciell lÃ¤nkarsymbol __ctbp"
+
+#: elf32-v850.c:2471 elf32-v850.c:2534
+msgid "%B: Architecture mismatch with previous modules"
+msgstr "%B: Arkitekturen stÃ¤mmer inte Ã¶verens med fÃ¶regÃ¥ende moduler"
+
+#: elf32-v850.c:2478
+msgid "%B: Alignment mismatch with previous modules"
+msgstr "%B: Justering stÃ¤mde inte med fÃ¶regÃ¥ende moduler"
+
+#. xgettext:c-format.
+#: elf32-v850.c:2553
+#, c-format
+msgid "private flags = %lx: "
+msgstr "privata flaggor = %lx: "
+
+#: elf32-v850.c:2558
+#, c-format
+msgid "unknown v850 architecture"
+msgstr "okÃ¤nd v850-arkitektur"
+
+#: elf32-v850.c:2560
+#, c-format
+msgid "v850 E3 architecture"
+msgstr "v850 E3-arkitektur"
+
+#: elf32-v850.c:2562 elf32-v850.c:2572
+#, c-format
+msgid "v850 architecture"
+msgstr "v850-arkitektur"
+
+#: elf32-v850.c:2565
+#, c-format
+msgid ", 8-byte data alignment"
+msgstr ", 8-bytedatajustering"
+
+#: elf32-v850.c:2573
+#, c-format
+msgid "v850e architecture"
+msgstr "v850e-arkitektur"
+
+#: elf32-v850.c:2574
+#, c-format
+msgid "v850e1 architecture"
+msgstr "v850e1-arkitektur"
+
+#: elf32-v850.c:2575
+#, c-format
+msgid "v850e2 architecture"
+msgstr "v850e2-arkitektur"
+
+#: elf32-v850.c:2576
+#, c-format
+msgid "v850e2v3 architecture"
+msgstr "v850e2v3-arkitektur"
+
+#: elf32-v850.c:2577
+#, c-format
+msgid "v850e3v5 architecture"
+msgstr "v850e3v5-arkitektur"
+
+#: elf32-vax.c:532
+#, c-format
+msgid " [nonpic]"
+msgstr " [icke-pic]"
+
+#: elf32-vax.c:535
+#, c-format
+msgid " [d-float]"
+msgstr " [d-flyttal]"
+
+#: elf32-vax.c:538
+#, c-format
+msgid " [g-float]"
+msgstr " [g-flyttal]"
+
+#: elf32-vax.c:656
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: varning: GOT-addend %ld till â€�%sâ€� stÃ¤mmer inte Ã¶verens med tidigare GOT-addend %ld"
+
+#: elf32-vax.c:1543
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: varning: PLT-addend %d till â€�%sâ€� frÃ¥n sektionen %s ignorerades"
+
+#: elf32-vax.c:1668
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: varning: %s-omlokalisering mot symbolen â€�%sâ€� frÃ¥n sektionen %s"
+
+#: elf32-vax.c:1674
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: varning: %s-omlokalisering till 0x%x frÃ¥n sektionen %s"
+
+#: elf32-xgate.c:686
+#, c-format
+msgid "cpu=XGATE]"
+msgstr "cpu=XGATE]"
+
+#: elf32-xgate.c:688
+#, c-format
+msgid "error reading cpu type from elf private data"
+msgstr "fel vid lÃ¤sning av cpu-typ frÃ¥n privat elf-data"
+
+#: elf32-xstormy16.c:455 elf64-ia64-vms.c:2072 elf32-ia64.c:2330
+#: elf64-ia64.c:2330
+msgid "non-zero addend in @fptr reloc"
+msgstr "icke-tom addend i @fptr-omlokalisering"
+
+#: elf32-xtensa.c:908
+msgid "%B(%A): invalid property table"
+msgstr "%B(%A): ogiltig egenskapstabell"
+
+#: elf32-xtensa.c:2774
+msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
+msgstr "%B(%A+0x%lx): omlokaliseringsfÃ¶rskjutning utanfÃ¶r intervall (storlek=0x%x)"
+
+#: elf32-xtensa.c:2853 elf32-xtensa.c:2974
+msgid "dynamic relocation in read-only section"
+msgstr "dynamisk omlokalisering i skrivskyddad sektion"
+
+#: elf32-xtensa.c:2950
+msgid "TLS relocation invalid without dynamic sections"
+msgstr "TLS-omlokalisering ogiltig utan dynamiska sektioner"
+
+#: elf32-xtensa.c:3169
+msgid "internal inconsistency in size of .got.loc section"
+msgstr "intern inkonsekvens i storleken fÃ¶r .got.loc-sektionen"
+
+#: elf32-xtensa.c:3482
+msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
+msgstr "%B: inkompatibel maskintyp. Utdata Ã¤r 0x%x. Indata Ã¤r 0x%x"
+
+#: elf32-xtensa.c:4713 elf32-xtensa.c:4721
+msgid "Attempt to convert L32R/CALLX to CALL failed"
+msgstr "FÃ¶rsÃ¶k att konvertera L32R/CALLX till CALL misslyckades"
+
+#: elf32-xtensa.c:6330 elf32-xtensa.c:6406 elf32-xtensa.c:7522
+msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
+msgstr "%B(%A+0x%lx): kunde inte avkoda instruktion; kanske stÃ¤mmer instÃ¤llningarna inte Ã¶verens"
+
+#: elf32-xtensa.c:7262
+msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"
+msgstr "%B(%A+0x%lx): kunde inte avkoda instruktion fÃ¶r XTENSA_ASM_SIMPLIFY-omlokalisering; kanske stÃ¤mmer instÃ¤llningarna inte Ã¶verens"
+
+#: elf32-xtensa.c:9022
+msgid "invalid relocation address"
+msgstr "ogiltig omlokaliseringsadress"
+
+#: elf32-xtensa.c:9071
+msgid "overflow after relaxation"
+msgstr "Ã¶verbelastning efter relax"
+
+#: elf32-xtensa.c:10203
+msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
+msgstr "%B(%A+0x%lx): ovÃ¤ntad fix fÃ¶r %s-omlokalisering"
+
+#: elf64-alpha.c:474
+msgid "GPDISP relocation did not find ldah and lda instructions"
+msgstr "GPDISP-omlokalisering hittade inga ldah- och lda-instruktioner"
+
+#: elf64-alpha.c:2503
+msgid "%B: .got subsegment exceeds 64K (size %d)"
+msgstr "%B: .got-delsegment Ã¶verstiger 64K (storlek %d)"
+
+#: elf64-alpha.c:4396 elf64-alpha.c:4408
+msgid "%B: gp-relative relocation against dynamic symbol %s"
+msgstr "%B: gp-relativ omlokalisering mot dynamisk symbol %s"
+
+#: elf64-alpha.c:4434 elf64-alpha.c:4574
+msgid "%B: pc-relative relocation against dynamic symbol %s"
+msgstr "%B: pc-relativ omlokalisering mot dynamisk symbol %s"
+
+#: elf64-alpha.c:4462
+msgid "%B: change in gp: BRSGP %s"
+msgstr "%B: Ã¤ndring i gp: BRSGP %s"
+
+#: elf64-alpha.c:4487
+msgid "<unknown>"
+msgstr "<okÃ¤nd>"
+
+#: elf64-alpha.c:4492
+msgid "%B: !samegp reloc against symbol without .prologue: %s"
+msgstr "%B: !samegp-omlokalisering mot symbol utan .prologue: %s"
+
+#: elf64-alpha.c:4549
+msgid "%B: unhandled dynamic relocation against %s"
+msgstr "%B: ohanterad dynamisk omlokalisering mot %s"
+
+#: elf64-alpha.c:4581
+msgid "%B: pc-relative relocation against undefined weak symbol %s"
+msgstr "%B: pc-relativ omlokalisering mot odefinierad svag symbol %s"
+
+#: elf64-alpha.c:4645
+msgid "%B: dtp-relative relocation against dynamic symbol %s"
+msgstr "%B: dtp-relativ omlokalisering mot dynamisk symbol %s"
+
+#: elf64-alpha.c:4668
+msgid "%B: tp-relative relocation against dynamic symbol %s"
+msgstr "%B: tp-relativ omlokalisering mot dynamisk symbol %s"
+
+#: elf64-hppa.c:2084
+#, c-format
+msgid "stub entry for %s cannot load .plt, dp offset = %ld"
+msgstr "stubbpost fÃ¶r %s kan inte lÃ¤sa in .plt, dp-fÃ¶rskjutning = %ld"
+
+#: elf64-hppa.c:3280
+msgid "%B(%A+0x%"
+msgstr "%B(%A+0x%"
+
+#: elf64-ia64-vms.c:587 elf32-ia64.c:619 elf64-ia64.c:619
+msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."
+msgstr "%B: Kan inte relax br pÃ¥ 0x%lx i sektion â€�%Aâ€�. AnvÃ¤nd brl eller indirekt gren."
+
+#: elf64-ia64-vms.c:2027 elf32-ia64.c:2278 elf64-ia64.c:2278
+msgid "@pltoff reloc against local symbol"
+msgstr "@pltoff-omlokalisering mot lokal symbol"
+
+#: elf64-ia64-vms.c:3279 elf32-ia64.c:3684 elf64-ia64.c:3684
+#, c-format
+msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
+msgstr "%s: kort datasegment spillde Ã¶ver (0x%lx >= 0x400000)"
+
+#: elf64-ia64-vms.c:3290 elf32-ia64.c:3695 elf64-ia64.c:3695
+#, c-format
+msgid "%s: __gp does not cover short data segment"
+msgstr "%s: __gp tÃ¤cker inte kort datasegment"
+
+#: elf64-ia64-vms.c:3555 elf32-ia64.c:3962 elf64-ia64.c:3962
+msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
+msgstr "%B: Icke-pic kod med imm-omlokalisering mot dynamisk symbol â€�%sâ€�"
+
+#: elf64-ia64-vms.c:3617 elf32-ia64.c:4029 elf64-ia64.c:4029
+msgid "%B: @gprel relocation against dynamic symbol %s"
+msgstr "%B: @gprel-omlokalisering mot dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3676 elf32-ia64.c:4092 elf64-ia64.c:4092
+msgid "%B: linking non-pic code in a position independent executable"
+msgstr "%B: LÃ¤nkar icke-pic kod i en positionsoberoende kÃ¶rfil"
+
+#: elf64-ia64-vms.c:3777 elf32-ia64.c:4229 elf64-ia64.c:4229
+msgid "%B: @internal branch to dynamic symbol %s"
+msgstr "%B: @internal-gren till dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3779 elf32-ia64.c:4231 elf64-ia64.c:4231
+msgid "%B: speculation fixup to dynamic symbol %s"
+msgstr "%B: Spekuleringsfix till dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3781 elf32-ia64.c:4233 elf64-ia64.c:4233
+msgid "%B: @pcrel relocation against dynamic symbol %s"
+msgstr "%B: @pcrel-omlokalisering mot dynamisk symbol %s"
+
+#: elf64-ia64-vms.c:3905 elf32-ia64.c:4430 elf64-ia64.c:4430
+msgid "unsupported reloc"
+msgstr "omlokaliseringen stÃ¶ds inte"
+
+#: elf64-ia64-vms.c:3942 elf32-ia64.c:4468 elf64-ia64.c:4468
+msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."
+msgstr "%B: Saknar TLS-sektion fÃ¶r omlokalisering %s mot â€�%sâ€� pÃ¥ 0x%lx i sektion â€�%Aâ€�."
+
+#: elf64-ia64-vms.c:3957 elf32-ia64.c:4483 elf64-ia64.c:4483
+msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."
+msgstr "%B: Kan inte gÃ¶ra relax pÃ¥ br (%s) till â€�%sâ€� pÃ¥ 0x%lx i sektion â€�%Aâ€� med storlek 0x%lx (> 0x1000000)."
+
+#: elf64-ia64-vms.c:4246 elf32-ia64.c:4745 elf64-ia64.c:4745
+msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
+msgstr "%B: LÃ¤nkar avbryt-vid-NOLL-dereferens med ickeavbrytande filer"
+
+#: elf64-ia64-vms.c:4255 elf32-ia64.c:4754 elf64-ia64.c:4754
+msgid "%B: linking big-endian files with little-endian files"
+msgstr "%B: LÃ¤nkar filer med rak byteordning med filer med omvÃ¤nd byteordning"
+
+#: elf64-ia64-vms.c:4264 elf32-ia64.c:4763 elf64-ia64.c:4763
+msgid "%B: linking 64-bit files with 32-bit files"
+msgstr "%B: LÃ¤nkar 64 bit-filer med 32 bit-filer"
+
+#: elf64-ia64-vms.c:4273 elf32-ia64.c:4772 elf64-ia64.c:4772
+msgid "%B: linking constant-gp files with non-constant-gp files"
+msgstr "%B: LÃ¤nkar konstant-gp-filer med ickekonstant-gp-filer"
+
+#: elf64-ia64-vms.c:4283 elf32-ia64.c:4782 elf64-ia64.c:4782
+msgid "%B: linking auto-pic files with non-auto-pic files"
+msgstr "%B: LÃ¤nkar auto-pic-filer med ickeauto-pic-filer"
+
+#: elf64-ia64-vms.c:5125 elflink.c:4299
+msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A"
+msgstr "Varning: rÃ¤ttning %u fÃ¶r gemensam symbol â€�%sâ€� i %B Ã¤r stÃ¶rre Ã¤n rÃ¤ttningen (%u) av dess sektion %A"
+
+#: elf64-ia64-vms.c:5131 elflink.c:4305
+msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
+msgstr "Varning: rÃ¤ttning %u fÃ¶r symbol â€�%sâ€� i %B Ã¤r mindre Ã¤n %u i %B"
+
+#: elf64-ia64-vms.c:5146 elflink.c:4321
+msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
+msgstr "Varning: storleken fÃ¶r symbol â€�%sâ€� Ã¤ndrades frÃ¥n %lu i %B till %lu i %B"
+
+#: elf64-mmix.c:986
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or assemble using \"-no-expand\" (for gcc, \"-Wa,-no-expand\""
+msgstr ""
+"ogiltig inmatningsomlokalisering vid skapande av icke-ELF, icke-mmoformatutmatning.\n"
+" AnvÃ¤nd objcopy-programmet fÃ¶r att konvertera frÃ¥n ELF till mmo,\n"
+" eller assemblera med â€�-no-expandâ€� (fÃ¶r gcc, â€�-Wa,-no-expandâ€�"
+
+#: elf64-mmix.c:1170
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or compile using the gcc-option \"-mno-base-addresses\"."
+msgstr ""
+"ogiltig inmatningsomlokalisering vid skapandet av icke-ELF, icke-mmoformatutmatning.\n"
+" AnvÃ¤nd programmet objcopy till att konvertera frÃ¥n ELF eller mmo,\n"
+" eller kompilera genom flaggan gcc â€�-mno-base-addressesâ€�."
+
+#: elf64-mmix.c:1196
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: Internt inkonsistensfel fÃ¶r vÃ¤rdet fÃ¶r\n"
+" lÃ¤nkarallokerat globalt register: lÃ¤nkat: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1618
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: bas-plus-fÃ¶rskjutningsomlokalisering mot registersymbol: (okÃ¤nd) i %s"
+
+#: elf64-mmix.c:1623
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: bas-plus-fÃ¶rskjutningsomlokalisering mot registersymbol: %s i %s"
+
+#: elf64-mmix.c:1667
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: registeromlokalisering mot icke-registersymbol: (okÃ¤nd) i %s"
+
+#: elf64-mmix.c:1672
+#, c-format
+msgid "%s: register relocation against non-register symbol: %s in %s"
+msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
+
+#: elf64-mmix.c:1709
+#, c-format
+msgid "%s: directive LOCAL valid only with a register or absolute value"
+msgstr "%s: LOCAL-direktivet Ã¤r endast giltigt med ett register eller absolutvÃ¤rde"
+
+#: elf64-mmix.c:1739
+#, c-format
+msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
+msgstr "%s: LOCAL-direktiv: Register $%ld Ã¤r inte ett lokalt register. FÃ¶rsta globala registret Ã¤r $%ld."
+
+#: elf64-mmix.c:2198
+#, c-format
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Fel: flera definitioner av â€�%sâ€�; bÃ¶rjan pÃ¥ %s Ã¤r instÃ¤lld i en tidigare lÃ¤nkad fil\n"
+
+#: elf64-mmix.c:2252
+msgid "Register section has contents\n"
+msgstr "Registersektion har innehÃ¥ll\n"
+
+#: elf64-mmix.c:2441
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Intern inkonsekvens: Ã¥terstÃ¥ende %u != max %u.\n"
+"  Rapportera detta fel."
+
+#: elf64-ppc.c:4463
+msgid "%P: %B: cannot create stub entry %s\n"
+msgstr "%P: %B: kan inte skapa stubbposten %s\n"
+
+#: elf64-ppc.c:4810
+msgid "%P: symbol '%s' has invalid st_other for ABI version 1\n"
+msgstr "%P: symbolen â€�%sâ€� har ogiltig st_other fÃ¶r ABI version 1\n"
+
+#: elf64-ppc.c:5170
+msgid "%P: .opd not allowed in ABI version %d\n"
+msgstr "%P: .opd Ã¤r inte tillÃ¥tet i ABI-versionen %d\n"
+
+#: elf64-ppc.c:5809
+msgid "%B uses unknown e_flags 0x%lx"
+msgstr "%B anvÃ¤nder okÃ¤nd e_flags 0x%lx"
+
+#: elf64-ppc.c:5816
+msgid "%B: ABI version %ld is not compatible with ABI version %ld output"
+msgstr "%B: ABI-versionen %ld Ã¤r inte kompatibel med ABI version %ld-utmatning"
+
+#: elf64-ppc.c:5843
+#, c-format
+msgid " [abiv%ld]"
+msgstr " [abiv%ld]"
+
+#: elf64-ppc.c:7007
+msgid "%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc\n"
+msgstr "%P: kopiera omlokalisering mot â€�%Tâ€� krÃ¤ver lazy plt-lÃ¤nkning; undvik att sÃ¤tta LD_BIND_NOW=1 eller uppgradera gcc\n"
+
+#: elf64-ppc.c:7270
+msgid "%B: undefined symbol on R_PPC64_TOCSAVE relocation"
+msgstr "%B: odefinierad symbol vid R_PPC64_TOCSAVE-omlokalisering"
+
+#: elf64-ppc.c:7499
+msgid "%P: dynreloc miscount for %B, section %A\n"
+msgstr "%P: dynreloc-felrÃ¤kning fÃ¶r %B, sektion %A\n"
+
+#: elf64-ppc.c:7583
+msgid "%B: .opd is not a regular array of opd entries"
+msgstr "%B: .opd Ã¤r inte ett vanligt fÃ¤lt av opd-poster"
+
+#: elf64-ppc.c:7592
+msgid "%B: unexpected reloc type %u in .opd section"
+msgstr "%B: ovÃ¤ntad omlokaliseringstyp %u i .opd-sektion"
+
+#: elf64-ppc.c:7613
+msgid "%B: undefined sym `%s' in .opd section"
+msgstr "%B: odefinierad sym â€�%sâ€� i .opd-sektion"
+
+#: elf64-ppc.c:8177
+msgid "%H __tls_get_addr lost arg, TLS optimization disabled\n"
+msgstr "%H __tls_get_addr fÃ¶rlorat arg, TLS-optimering inaktiverat\n"
+
+#: elf64-ppc.c:8516 elf64-ppc.c:9139
+#, c-format
+msgid "%s defined on removed toc entry"
+msgstr "%s definierades i borttagen innehÃ¥llsfÃ¶rteckningspost"
+
+#: elf64-ppc.c:8868
+msgid "%P: %H: toc optimization is not supported for %s instruction.\n"
+msgstr "%P: %H: toc-optimering stÃ¶ds inte av %s-instruktionen.\n"
+
+#: elf64-ppc.c:9096
+msgid "%P: %H: %s references optimized away TOC entry\n"
+msgstr "%P: %H: %s-referenser optimerade bort TOC-post\n"
+
+#: elf64-ppc.c:10394
+msgid "%P: cannot find opd entry toc for `%T'\n"
+msgstr "%P: kan inte hitta opd-post toc fÃ¶r â€�%Tâ€�\n"
+
+#: elf64-ppc.c:10479
+msgid "%P: long branch stub `%s' offset overflow\n"
+msgstr "%P: lÃ¥ng grenstubbe â€�%sâ€�-fÃ¶rskjutningsspill\n"
+
+#: elf64-ppc.c:10538
+msgid "%P: can't find branch stub `%s'\n"
+msgstr "%P: kan inte hitta grenstubb â€�%sâ€�\n"
+
+#: elf64-ppc.c:10602 elf64-ppc.c:10749 elf64-ppc.c:12416
+msgid "%P: linkage table error against `%T'\n"
+msgstr "%P: lÃ¤nkningstabellfel mot â€�%Tâ€�\n"
+
+#: elf64-ppc.c:10940
+msgid "%P: can't build branch stub `%s'\n"
+msgstr "%P: kan inte bygga grenstubbe â€�%sâ€�\n"
+
+#: elf64-ppc.c:11748
+msgid "%B section %A exceeds stub group size"
+msgstr "%B-sektion %A Ã¶verstiger stubbgruppstorleken"
+
+#: elf64-ppc.c:12662 elf64-ppc.c:12697
+msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
+msgstr "%P: %s-fÃ¶rskjutning fÃ¶r stor fÃ¶r .eh_frame sdata4-kodning"
+
+#: elf64-ppc.c:12758
+msgid "%P: stubs don't match calculated size\n"
+msgstr "%P: stubbe stÃ¤mmer inte Ã¶verens med berÃ¤knad storlek\n"
+
+#: elf64-ppc.c:12770
+#, c-format
+msgid ""
+"linker stubs in %u group%s\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu\n"
+"  plt call toc %lu"
+msgstr ""
+"lÃ¤nkarstubbe i %u grupp%s\n"
+"  gren       %lu\n"
+"  toc-just   %lu\n"
+"  lÃ¥nggren  %lu\n"
+"  lÃ¥ng-toc-just %lu\n"
+"  plt-anr     %lu\n"
+"  plt-anr-toc %lu"
+
+#: elf64-ppc.c:13096
+msgid "%P: %H: %s used with TLS symbol `%T'\n"
+msgstr "%P: %H: %s anvÃ¤nt med TLS-symbol â€�%Tâ€�\n"
+
+#: elf64-ppc.c:13097
+msgid "%P: %H: %s used with non-TLS symbol `%T'\n"
+msgstr "%P: %H: %s anvÃ¤nt med icke-TLS-symbol â€�%Tâ€�\n"
+
+#: elf64-ppc.c:13675
+msgid "%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC\n"
+msgstr "%P: %H: anrop till â€�%Tâ€� saknar nop, kan inte Ã¥terstÃ¤lla toc; kompilera med -fPIC\n"
+
+#: elf64-ppc.c:13793
+msgid "%P: %B: unknown relocation type %d for `%T'\n"
+msgstr "%P: %B: okÃ¤nd omlokaliseringstyp %d fÃ¶r â€�%Tâ€�\n"
+
+#: elf64-ppc.c:14310
+msgid "%P: %H: %s for indirect function `%T' unsupported\n"
+msgstr "%P: %H: %s fÃ¶r indirekta funktioner â€�%Tâ€� stÃ¶ds ej\n"
+
+#: elf64-ppc.c:14417
+msgid "%P: %B: %s is not supported for `%T'\n"
+msgstr "%P: %B: %s stÃ¶ds ej fÃ¶r â€�%Tâ€�\n"
+
+#: elf64-ppc.c:14565
+msgid "%P: %H: error: %s not a multiple of %u\n"
+msgstr "%P: %H: fel: %s Ã¤r inte en multipel av %u\n"
+
+#: elf64-ppc.c:14586
+msgid "%P: %H: unresolvable %s against `%T'\n"
+msgstr "%P: %H: kunde inte lÃ¶sas med %s mot â€�%Tâ€�\n"
+
+#: elf64-ppc.c:14644
+msgid "%P: %H: %s against `%T': error %d\n"
+msgstr "%P: %H: %s mot â€�%Tâ€�: fel %d\n"
+
+#: elf64-sh64.c:1686
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: fel: ojusterad omlokaliseringstyp %d pÃ¥ %08x omlokalisering %08x\n"
+
+#: elf64-sparc.c:446
+msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
+msgstr "%B: Bara registren %%g[2367] kan deklareras med STT_REGISTER"
+
+#: elf64-sparc.c:466
+msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
+msgstr "Registret %%g%d anvÃ¤ndes pÃ¥ ett inkompatibelt sÃ¤tt: %s i %B, fÃ¶rut %s i %B"
+
+#: elf64-sparc.c:489
+msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
+msgstr "Symbolen â€�%sâ€� har skiljande typer: REGISTER i %B, fÃ¶rut %s i %B"
+
+#: elf64-sparc.c:534
+msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
+msgstr "Symbolen â€�%sâ€� har skiljande typer: %s i %B, fÃ¶rut REGISTER i %B"
+
+#: elf64-sparc.c:687
+msgid "%B: linking UltraSPARC specific with HAL specific code"
+msgstr "%B: lÃ¤nkar UltraSPARC-specifik med HAL-specifik kod"
+
+#: elf64-x86-64.c:1530
+msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+msgstr "%B: omlokalisering %s mot symbol â€�%sâ€� stÃ¶ds inte i x32-lÃ¤ge"
+
+#: elf64-x86-64.c:1688
+msgid "%B: '%s' accessed both as normal and thread local symbol"
+msgstr "%B: â€�%sâ€� Ã¥tkommen bÃ¥de som normal och trÃ¥dlokal symbol"
+
+#: elf64-x86-64.c:3405 /src/binutils-gdb/bfd/elfnn-aarch64.c:3511
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
+msgstr "%B: omlokalisering %s mot STT_GNU_IFUNC-symbolen â€�%sâ€� har en addend som inte Ã¤r noll: %d"
+
+#: elf64-x86-64.c:3667
+msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object"
+msgstr "%B: omlokalisering R_X86_64_GOTOFF64 mot skyddad funktion â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt skapas"
+
+#: elf64-x86-64.c:3787
+msgid "; recompile with -fPIC"
+msgstr "; kompilera om med -fPIC"
+
+#: elf64-x86-64.c:3792
+msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s"
+msgstr "%B: omlokalisering %s mot %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt%s skapas"
+
+#: elf64-x86-64.c:3794
+msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s"
+msgstr "%B: omlokalisering %s mot odefinierad %s â€�%sâ€� kan inte anvÃ¤ndas nÃ¤r ett delat objekt%s skapas"
+
+#: elf64-x86-64.c:3900
+msgid "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: addend -0x%x i omlokalisering %s mot symbolen â€�%sâ€� vid 0x%lx i sektionen â€�%Aâ€� Ã¤r utanfÃ¶r intervallet"
+
+#: elf64-x86-64.c:3908
+msgid "%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%B: adderade 0x%x i omlokalisering %s mot symbolen â€�%sâ€� vid 0x%lx i sektionen â€�%Aâ€� Ã¤r utanfÃ¶r intervallet"
+
+#: elfcode.h:760
+#, c-format
+msgid "warning: %s has a corrupt string table index - ignoring"
+msgstr "varning: %s har ett fÃ¶rdÃ¤rvat strÃ¤ngtabellindex - ignorerar"
+
+#: elfcode.h:1186
+#, c-format
+msgid "%s: version count (%ld) does not match symbol count (%ld)"
+msgstr "%s: versionsantal (%ld) stÃ¤mmer inte med symbolantal (%ld)"
+
+#: elfcode.h:1440
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): omlokalisering %d har ogiltigt symbolindex %ld"
+
+#: elfcore.h:305
+msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu."
+msgstr "Varning: %B Ã¤r avkortad: fÃ¶rvÃ¤ntade mig kÃ¤rnfilsstorlek >= %lu, hittade: %lu."
+
+#: elflink.c:1143
+msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"
+msgstr "%s: TLS-definiering i %B-sektionen %A stÃ¤mmer inte Ã¶verens med icke-TLS-definieringen i %B-sektionen %A"
+
+#: elflink.c:1148
+msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
+msgstr "%s: TLS-referensen i %B stÃ¤mmer inte Ã¶verens med icke-TLS-referensen i %B"
+
+#: elflink.c:1153
+msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
+msgstr "%s: TLS-definieringen i %B-sektionen %A stÃ¤mmer inte Ã¶verens med icke-TLS-referensen i %B"
+
+#: elflink.c:1158
+msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
+msgstr "%s: TLS-referensen i %B stÃ¤mmer inte Ã¶verens med icke-TLS-definieringen i %B-sektionen %A"
+
+#: elflink.c:1763
+msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%B: ovÃ¤ntad omdefiniering av indirekt versionsbestÃ¤md symbol â€�%sâ€�"
+
+#: elflink.c:2066
+msgid "%B: version node not found for symbol %s"
+msgstr "%B: versionsnod hittades inte fÃ¶r symbol %s"
+
+#: elflink.c:2157
+msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
+msgstr "%B: felaktigt omlokaliseringssymbolindex (0x%lx >= 0x%lx) fÃ¶r fÃ¶rskjutning 0x%lx i sektion â€�%Aâ€�"
+
+#: elflink.c:2168
+msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table"
+msgstr "%B: symbolindex Ã¤r inte noll (0x%lx) fÃ¶r fÃ¶rskjutning 0x%lx i sektion â€�%Aâ€� nÃ¤r objektfilen saknar symboltabell"
+
+#: elflink.c:2358
+msgid "%B: relocation size mismatch in %B section %A"
+msgstr "%B: omlokaliseringsstorlek stÃ¤mmer inte Ã¶verens i %B-sektionen %A"
+
+#: elflink.c:2640
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "varning: typen och storleken pÃ¥ dynamiska symbolen â€�%sâ€� Ã¤r inte definierade"
+
+#: elflink.c:3403
+msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n"
+msgstr "%P: alternativ ELF-maskinkod hittades (%d) i %B, fÃ¶rvÃ¤ntade mig %d\n"
+
+#: elflink.c:4032
+msgid "%B: %s: invalid version %u (max %d)"
+msgstr "%B: %s: ogiltig version %u (max %d)"
+
+#: elflink.c:4068
+msgid "%B: %s: invalid needed version %d"
+msgstr "%B: %s: ogiltigt versionskrav %d"
+
+#: elflink.c:4452
+msgid "%B: undefined reference to symbol '%s'"
+msgstr "%B: odefinierad referens till symbolen â€�%sâ€�"
+
+#: elflink.c:5523
+msgid "%B: stack size specified and %s set"
+msgstr "%B: stackstorlek angiven och %s satt"
+
+#: elflink.c:5526
+msgid "%B: %s not absolute"
+msgstr "%B: %s inte absolut"
+
+#: elflink.c:5824
+#, c-format
+msgid "%s: undefined version: %s"
+msgstr "%s: odefinierad version: %s"
+
+#: elflink.c:5892
+msgid "%B: .preinit_array section is not allowed in DSO"
+msgstr "%B: .preinit_array-sektion tillÃ¥ts inte i DSO"
+
+#: elflink.c:7657
+#, c-format
+msgid "undefined %s reference in complex symbol: %s"
+msgstr "odefinierad %s-referens i komplex symbol: %s"
+
+#: elflink.c:7811
+#, c-format
+msgid "unknown operator '%c' in complex symbol"
+msgstr "OkÃ¤nd operand â€�%câ€� i komplex symbol"
+
+#: elflink.c:8165 elflink.c:8182 elflink.c:8219 elflink.c:8236
+msgid "%B: Unable to sort relocs - they are in more than one size"
+msgstr "%B: Kunde inte sortera omlokaliseringar - de finns i mer Ã¤n en storlek"
+
+#: elflink.c:8196 elflink.c:8250
+msgid "%B: Unable to sort relocs - they are of an unknown size"
+msgstr "%B: Kunde inte sortera omlokaliseringar - deras storlek Ã¤r okÃ¤nd"
+
+#: elflink.c:8301
+msgid "Not enough memory to sort relocations"
+msgstr "Inte tillrÃ¤ckligt med minne fÃ¶r att sortera omlokaliseringar"
+
+#: elflink.c:8494
+msgid "%B: Too many sections: %d (>= %d)"
+msgstr "%B: FÃ¶r mÃ¥nga sektioner: %d (>= %d)"
+
+#: elflink.c:8775
+msgid "%B: internal symbol `%s' in %B is referenced by DSO"
+msgstr "%B: intern symbol â€�%sâ€� i %B anvÃ¤nds av DSO"
+
+#: elflink.c:8777
+msgid "%B: hidden symbol `%s' in %B is referenced by DSO"
+msgstr "%B: dold symbol â€�%sâ€� i %B anvÃ¤nds av DSO"
+
+#: elflink.c:8779
+msgid "%B: local symbol `%s' in %B is referenced by DSO"
+msgstr "%B: lokal symbol â€�%sâ€� i %B anvÃ¤nds av DSO"
+
+#: elflink.c:8890
+msgid "%B: could not find output section %A for input section %A"
+msgstr "%B: kunde inte hitta utdata-sektionen %A fÃ¶r indata-sektion %A"
+
+#: elflink.c:9013
+msgid "%B: protected symbol `%s' isn't defined"
+msgstr "%B: den skyddade symbolen â€�%sâ€� har inte definierats"
+
+#: elflink.c:9015
+msgid "%B: internal symbol `%s' isn't defined"
+msgstr "%B: den interna symbolen â€�%sâ€� har inte definierats"
+
+#: elflink.c:9017
+msgid "%B: hidden symbol `%s' isn't defined"
+msgstr "%B: den dolda symbolen â€�%sâ€� har inte definierats"
+
+#: elflink.c:9043
+msgid "%B: No symbol version section for versioned symbol `%s'"
+msgstr "%B: Ingen symbolversionssektion fÃ¶r versionerad symbol â€�%sâ€�"
+
+#: elflink.c:9598
+msgid "error: %B: size of section %A is not multiple of address size"
+msgstr "Fel: %B: storleken pÃ¥ sektion %A Ã¤r inte en multipel av adresstorleken"
+
+#: elflink.c:9645
+msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol"
+msgstr "fel: %B innehÃ¥ller en omlokalisering (0x%s) fÃ¶r sektion %A som anvÃ¤nder en icke-existerande global symbol"
+
+#: elflink.c:10369
+msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+msgstr "%A har bÃ¥de sorterade [â€�%Aâ€� i %B] och osorterade [â€�%Aâ€� i %B] sektioner"
+
+#: elflink.c:10374
+#, c-format
+msgid "%A has both ordered and unordered sections"
+msgstr "%A har bÃ¥de sorterade och osorterade sektioner"
+
+#: elflink.c:10982
+msgid "%B: file class %s incompatible with %s"
+msgstr "%B: Filklassen %s Ã¤r inkompatibel med %s"
+
+#: elflink.c:11303 elflink.c:11347
+msgid "%B: could not find output section %s"
+msgstr "%B: kunde inte hitta utdata-sektion %s"
+
+#: elflink.c:11308
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "varning: sektionen %s har nollstorlek"
+
+#: elflink.c:11353
+#, c-format
+msgid "warning: section '%s' is being made into a note"
+msgstr "varning: sektion â€�%sâ€� gÃ¶rs om till en anteckning"
+
+#: elflink.c:11419
+msgid "%P%X: read-only segment has dynamic relocations.\n"
+msgstr "%P%X: skrivskyddat segment har dynamiska omlokaliseringar.\n"
+
+#: elflink.c:11422
+msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+msgstr "%P: varning: skapar en DT_TEXTREL i ett delat objekt.\n"
+
+#: elflink.c:11545
+msgid "%P%X: can not read symbols: %E\n"
+msgstr "%P%X: kan inte lÃ¤sa symboler: %E\n"
+
+#: elflink.c:11989
+msgid "Removing unused section '%s' in file '%B'"
+msgstr "Tar bort oanvÃ¤nda sektionen â€�%sâ€� i filen â€�%Bâ€�"
+
+#: elflink.c:12200
+msgid "Warning: gc-sections option ignored"
+msgstr "Varning: flaggan gc-sections ignoreras"
+
+#: elflink.c:12489
+#, c-format
+msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgstr "OkÃ¤nd INPUT_SECTION_FLAG %s\n"
+
+#: elfxx-mips.c:1419
+msgid "static procedure (no name)"
+msgstr "statisk procedur (inget namn)"
+
+#: elfxx-mips.c:5476
+msgid "MIPS16 and microMIPS functions cannot call each other"
+msgstr "MIPS16 och microMIPS-funktioner kan inte anropa varandra"
+
+#: elfxx-mips.c:6087
+msgid "%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled."
+msgstr "%B: %A+0x%lx: StÃ¶der inte hopp mellan ISA-lÃ¤gen; Ã¶vervÃ¤g omkompilering med korslÃ¤nkning aktiverat."
+
+#: elfxx-mips.c:6756 elfxx-mips.c:6979
+msgid "%B: Warning: bad `%s' option size %u smaller than its header"
+msgstr "%B: Varning: felaktig â€�%sâ€� alternativstorlek %u mindre Ã¤n dess huvud"
+
+#: elfxx-mips.c:7734 elfxx-mips.c:7859
+msgid "%B: Warning: cannot determine the target function for stub section `%s'"
+msgstr "%B: Varning: kan inte avgÃ¶ra destinationsfunktionen fÃ¶r stubbsektionen â€�%sâ€�"
+
+#: elfxx-mips.c:7990
+msgid "%B: Malformed reloc detected for section %s"
+msgstr "%B: Felformad omlokalisering hittad fÃ¶r sektion %s"
+
+#: elfxx-mips.c:8065
+msgid "%B: GOT reloc at 0x%lx not expected in executables"
+msgstr "%B: GOT omlokalisering vid 0x%lx fÃ¶rvÃ¤ntas inte i kÃ¶rbara filer"
+
+#: elfxx-mips.c:8199
+msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%B: CALL16-omlokalisering vid 0x%lx inte mot global symbol"
+
+#: elfxx-mips.c:8977
+#, c-format
+msgid "non-dynamic relocations refer to dynamic symbol %s"
+msgstr "icke-dynamiska omlokaliseringar anvÃ¤nder dynamisk symbol %s"
+
+#: elfxx-mips.c:9877
+msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"
+msgstr "%B: Kan inte hitta passande LO16-omlokalisering mot â€�%sâ€� fÃ¶r %s vid 0x%lx i sektion â€�%Aâ€�"
+
+#: elfxx-mips.c:10016
+msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)"
+msgstr "small-data-sektion Ã¶verstiger 64Kb; minska small-data-storleksgrÃ¤ns (se flaggan -G)"
+
+#: elfxx-mips.c:10035
+msgid "JALX to a non-word-aligned address"
+msgstr "JALX till en ej ordjusterad adress"
+
+#: elfxx-mips.c:10402 elfxx-mips.c:10966
+msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
+msgstr "%B: â€�%Aâ€� fÃ¶rskjutning pÃ¥ %ld frÃ¥n â€�%Aâ€� bortom intervallet fÃ¶r ADDIUPC"
+
+#: elfxx-mips.c:13990
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: ogiltigt sektionsnamn â€�%sâ€�"
+
+#: elfxx-mips.c:14375 elfxx-mips.c:14381 elfxx-mips.c:14387 elfxx-mips.c:14407
+#: elfxx-mips.c:14413 elfxx-mips.c:14419 elfxx-mips.c:14441 elfxx-mips.c:14460
+#: elfxx-mips.c:14467 elfxx-mips.c:14474
+msgid "Warning: %B uses %s (set by %B), %B uses %s"
+msgstr "Varning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder %s"
+
+#: elfxx-mips.c:14394 elfxx-mips.c:14426 elfxx-mips.c:14447 elfxx-mips.c:14480
+msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Varning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder okÃ¤nd flyttals-ABI %d"
+
+#: elfxx-mips.c:14493 elfxx-mips.c:14501 elfxx-mips.c:14509 elfxx-mips.c:14517
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %d (satt av %B), %B anvÃ¤nder %s"
+
+#: elfxx-mips.c:14525
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %d"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nt flyttals-ABI %d (satt av %B), %B anvÃ¤nder okÃ¤nd flyttals-ABI %d"
+
+#: elfxx-mips.c:14548
+msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Varning: %B anvÃ¤nder %s (satt av %B), %B anvÃ¤nder MSA-ABI %d"
+
+#: elfxx-mips.c:14559
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nt MSA-ABI %d (satt av %B), %B anvÃ¤nder %s"
+
+#: elfxx-mips.c:14567
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
+msgstr "Varning: %B anvÃ¤nder okÃ¤nt MSA-ABI %d (satt av %B), %B anvÃ¤nder okÃ¤nd MSA-ABI %d"
+
+#: elfxx-mips.c:14599
+msgid "%B: endianness incompatible with that of the selected emulation"
+msgstr "%B: bitordning inkompatibel med vald emulering"
+
+#: elfxx-mips.c:14610
+msgid "%B: ABI is incompatible with that of the selected emulation"
+msgstr "%B: ABI Ã¤r inkompatibelt med vald emulering"
+
+#: elfxx-mips.c:14694
+msgid "%B: warning: linking abicalls files with non-abicalls files"
+msgstr "%B: varning: lÃ¤nkar abicalls-filer till icke-abicalls-filer"
+
+#: elfxx-mips.c:14711
+msgid "%B: linking 32-bit code with 64-bit code"
+msgstr "%B: lÃ¤nkar 32-bitars kod till 64-bitars kod"
+
+#: elfxx-mips.c:14739 elfxx-mips.c:14802
+msgid "%B: linking %s module with previous %s modules"
+msgstr "%B: lÃ¤nkar %s-modul till tidigare %s-moduler"
+
+#: elfxx-mips.c:14762
+msgid "%B: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%B: ABI felmatchning: lÃ¤nkar %s-modul till tidigare %s-moduler"
+
+#: elfxx-mips.c:14786
+msgid "%B: ASE mismatch: linking %s module with previous %s modules"
+msgstr "%B: ASE-felmatchning: lÃ¤nkning av %s med tidigare %s moduler"
+
+#: elfxx-mips.c:14958
+#, c-format
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:14960
+#, c-format
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:14962
+#, c-format
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:14964
+#, c-format
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:14966
+#, c-format
+msgid " [abi unknown]"
+msgstr " [okÃ¤nt abi]"
+
+#: elfxx-mips.c:14968
+#, c-format
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:14970
+#, c-format
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:14972
+#, c-format
+msgid " [no abi set]"
+msgstr " [inget abi instÃ¤llt]"
+
+#: elfxx-mips.c:14993
+#, c-format
+msgid " [unknown ISA]"
+msgstr " [okÃ¤nd ISA]"
+
+#: elfxx-mips.c:15013
+#, c-format
+msgid " [not 32bitmode]"
+msgstr " [inte 32-bitarslÃ¤ge]"
+
+#: elfxx-sparc.c:640
+#, c-format
+msgid "invalid relocation type %d"
+msgstr "ogiltig omlokaliseringstyp %d"
+
+#: elfxx-tilegx.c:4433
+msgid "%B: Cannot link together %s and %s objects."
+msgstr "%B: Kan inte lÃ¤nka samman objekten %s och %s."
+
+#: i386linux.c:418 m68klinux.c:421 sparclinux.c:414
+#, c-format
+msgid "Output file requires shared library `%s'\n"
+msgstr "Utdatafilen krÃ¤ver delade biblioteket â€�%sâ€�\n"
+
+#: i386linux.c:426 m68klinux.c:429 sparclinux.c:422
+#, c-format
+msgid "Output file requires shared library `%s.so.%s'\n"
+msgstr "Utdatafilen krÃ¤ver delade biblioteket â€�%s.so.%sâ€�\n"
+
+#: i386linux.c:613 i386linux.c:663 m68klinux.c:618 m68klinux.c:666
+#: sparclinux.c:609 sparclinux.c:659
+#, c-format
+msgid "Symbol %s not defined for fixups\n"
+msgstr "Symbolen %s Ã¤r inte definierad fÃ¶r fixar\n"
+
+#: i386linux.c:687 m68klinux.c:690 sparclinux.c:683
+msgid "Warning: fixup count mismatch\n"
+msgstr "Varning: antalet fixar stÃ¤mmer inte\n"
+
+#: ieee.c:158
+#, c-format
+msgid "%s: string too long (%d chars, max 65535)"
+msgstr "%s: strÃ¤ngen Ã¤r fÃ¶r lÃ¥ng (%d tecken, max 65535)"
+
+#: ieee.c:285
+#, c-format
+msgid "%s: unrecognized symbol `%s' flags 0x%x"
+msgstr "%s: okÃ¤nd symbol â€�%sâ€� flaggor 0x%x"
+
+#: ieee.c:791
+msgid "%B: unimplemented ATI record %u for symbol %u"
+msgstr "%B: ej implementerad ATI-post %u fÃ¶r symbol %u"
+
+#: ieee.c:815
+msgid "%B: unexpected ATN type %d in external part"
+msgstr "%B: ovÃ¤ntad ATN-typ %d i extern del"
+
+#: ieee.c:837
+msgid "%B: unexpected type after ATN"
+msgstr "%B: ovÃ¤ntad typ efter ATN"
+
+#: ihex.c:230
+msgid "%B:%d: unexpected character `%s' in Intel Hex file"
+msgstr "%B:%d: ovÃ¤ntat tecken â€�%sâ€� i Intel Hex-fil"
+
+#: ihex.c:337
+msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
+msgstr "%B:%u: felaktig kontrollsumma i Intel Hex-fil (fÃ¶rvÃ¤ntade mig %u, hittade %u)"
+
+#: ihex.c:392
+msgid "%B:%u: bad extended address record length in Intel Hex file"
+msgstr "%B:%u: felaktig utÃ¶kad adresspostlÃ¤ngd i Intel Hex-fil"
+
+#: ihex.c:409
+msgid "%B:%u: bad extended start address length in Intel Hex file"
+msgstr "%B:%u: felaktig utÃ¶kad startadresslÃ¤ngd i Intel Hex-fil"
+
+#: ihex.c:426
+msgid "%B:%u: bad extended linear address record length in Intel Hex file"
+msgstr "%B:%u: felaktig linjÃ¤r adresspostlÃ¤ngd i Intel Hex-fil"
+
+#: ihex.c:443
+msgid "%B:%u: bad extended linear start address length in Intel Hex file"
+msgstr "%B:%u: felaktig utÃ¶kad linjÃ¤r startadresslÃ¤ngd i Intel Hex-fil"
+
+#: ihex.c:460
+msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
+msgstr "%B:%u: okÃ¤nd ihex-typ %u i Intel Hex-fil"
+
+#: ihex.c:579
+msgid "%B: internal error in ihex_read_section"
+msgstr "%B: internt fel i ihex_read_section"
+
+#: ihex.c:613
+msgid "%B: bad section length in ihex_read_section"
+msgstr "%B: felaktig sektionslÃ¤ngd i ihex_read_section"
+
+#: ihex.c:826
+#, c-format
+msgid "%s: address 0x%s out of range for Intel Hex file"
+msgstr "%s: adressen 0x%s Ã¤r utanfÃ¶r intervallet fÃ¶r hexadecimal Intel-fil"
+
+#: libbfd.c:863
+msgid "%B: unable to get decompressed section %A"
+msgstr "%B: kunde inte hÃ¤mta dekomprimerad sektion %A"
+
+#: libbfd.c:1012
+msgid "%B: compiled for a big endian system and target is little endian"
+msgstr "%B: kompilerat fÃ¶r system med rak byteordning, medan destinationen Ã¤r omvÃ¤nd byteordning"
+
+#: libbfd.c:1014
+msgid "%B: compiled for a little endian system and target is big endian"
+msgstr "%B: kompilerat fÃ¶r system med omvÃ¤nd byteordning, medan destinationen Ã¤r rak byteordning"
+
+#: libbfd.c:1043
+#, c-format
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "FÃ¶rÃ¥ldrad %s anropad vid %s rad %d i %s\n"
+
+#: libbfd.c:1046
+#, c-format
+msgid "Deprecated %s called\n"
+msgstr "FÃ¶rÃ¥ldrad %s anropad\n"
+
+#: linker.c:1873
+msgid "%B: indirect symbol `%s' to `%s' is a loop"
+msgstr "%B: indirekt symbol â€�%sâ€� till â€�%sâ€� Ã¤r en slinga"
+
+#: linker.c:2750
+#, c-format
+msgid "Attempt to do relocatable link with %s input and %s output"
+msgstr "FÃ¶rsÃ¶k att gÃ¶ra en omlokaliseringsbar lÃ¤nk med %s-indata och %s-utdata"
+
+#: linker.c:3035
+msgid "%B: ignoring duplicate section `%A'\n"
+msgstr "%B: ignorerar dubblerad sektion â€�%Aâ€�\n"
+
+#: linker.c:3044 linker.c:3053
+msgid "%B: duplicate section `%A' has different size\n"
+msgstr "%B: dubblerad sektion â€�%Aâ€� har en annan storlek\n"
+
+#: linker.c:3061 linker.c:3066
+msgid "%B: could not read contents of section `%A'\n"
+msgstr "%B: kunde inte lÃ¤sa innehÃ¥llet i sektion â€�%Aâ€�\n"
+
+#: linker.c:3070
+msgid "%B: duplicate section `%A' has different contents\n"
+msgstr "%B: dubblerad sektion â€�%Aâ€� har olika innehÃ¥ll\n"
+
+#: mach-o.c:648
+msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols"
+msgstr "bfd_mach_o_canonicalize_symtab: kunde inte ladda symboler"
+
+#: mach-o.c:1918
+#, c-format
+msgid "mach-o: there are too many sections (%d) maximum is 255,\n"
+msgstr "mach-o: det finns fÃ¶r mÃ¥nga sektion (%d) maximalt Ã¤r 255,\n"
+
+#: mach-o.c:2017
+#, c-format
+msgid "unable to write unknown load command 0x%lx"
+msgstr "kunde inte skriva okÃ¤nt laddningskommando 0x%lx"
+
+#: mach-o.c:2272
+msgid "sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands."
+msgstr "tyvÃ¤rr: modtab, toc och extrefsyms Ã¤r Ã¤nnu inte implementerade fÃ¶r dysymtab-kommandon."
+
+#: mach-o.c:2898
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"
+msgstr "bfd_mach_o_read_symtab_symbol: kunde inte lÃ¤sa %d byte vid %lu"
+
+#: mach-o.c:2916
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"
+msgstr "bfd_mach_o_read_symtab_symbol: namn utanfÃ¶r intervallet (%lu >= %lu)"
+
+#: mach-o.c:2997
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: symbol â€�%sâ€� angav ogiltig sektion %d (max %lu): stÃ¤ller in som odefinierad"
+
+#: mach-o.c:3013
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x%x: setting to undefined"
+msgstr "bfd_mach_o_read_symtab_symbol: symbol â€�%sâ€� angav ogiltigt typfÃ¤lt 0x%x: stÃ¤ller in som odefinierad"
+
+#: mach-o.c:3085
+msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"
+msgstr "bfd_mach_o_read_symtab_symbols: kunde inte allokera minne fÃ¶r symboler"
+
+#: mach-o.c:3915
+msgid "%B: unknown load command 0x%lx"
+msgstr "%B: okÃ¤nt inlÃ¤st kommando 0x%lx"
+
+#: mach-o.c:4107
+#, c-format
+msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"
+msgstr "bfd_mach_o_scan: okÃ¤nd arkitektur 0x%lx/0x%lx"
+
+#: mach-o.c:4204
+#, c-format
+msgid "unknown header byte-order value 0x%lx"
+msgstr "okÃ¤nt byte-ordningsvÃ¤rde i huvudet; 0x%lx"
+
+#: merge.c:832
+#, c-format
+msgid "%s: access beyond end of merged section (%ld)"
+msgstr "%s: Ã¥tkomst bortom slutet av sammanfogad sektion (%ld)"
+
+#: mmo.c:455
+#, c-format
+msgid "%s: No core to allocate section name %s\n"
+msgstr "%s: Ingen kÃ¤rna fÃ¶r att allokera sektionsnamn %s\n"
+
+#: mmo.c:530
+#, c-format
+msgid "%s: No core to allocate a symbol %d bytes long\n"
+msgstr "%s: Ingen kÃ¤rna fÃ¶r att allokera en %d byte lÃ¥ng symbol\n"
+
+#: mmo.c:1189
+#, c-format
+msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
+msgstr "%s: ogiltig mmo-fil: initieringsvÃ¤rde fÃ¶r $255 Ã¤r inte â€�Mainâ€�\n"
+
+#: mmo.c:1334
+#, c-format
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: bred teckensekvens som inte stÃ¶ds 0x%02X 0x%02X efter symbolnamnet som bÃ¶rjar med â€�%sâ€�\n"
+
+#: mmo.c:1568
+#, c-format
+msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
+msgstr "%s: ogiltig mmo-fil: lopkod â€�%dâ€� stÃ¶ds inte\n"
+
+#: mmo.c:1578
+#, c-format
+msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade YZ = 1 fick YZ = %d fÃ¶r lop_quote\n"
+
+#: mmo.c:1614
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 1 eller z = 2, fick z = %d fÃ¶r lop_loc\n"
+
+#: mmo.c:1660
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 1 eller z = 2, fick z = %d fÃ¶r lop_fixo\n"
+
+#: mmo.c:1699
+#, c-format
+msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade y = 0, fick y = %d fÃ¶r lop_fixrx\n"
+
+#: mmo.c:1708
+#, c-format
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¶rvÃ¤ntade z = 16 eller z = 24, fick z = %d fÃ¶r lop_fixrx\n"
+
+#: mmo.c:1731
+#, c-format
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: inledande byte i operandord mÃ¥ste vara 0 eller 1, fick %d fÃ¶r lop_fixrx\n"
+
+#: mmo.c:1754
+#, c-format
+msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
+msgstr "%s: kan inte allokera filnamn fÃ¶r fil nummer %d, %d byte\n"
+
+#: mmo.c:1774
+#, c-format
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: ogiltig mmo-fil: fil nummer %d â€�%sâ€�, var redan angiven som â€�%sâ€�\n"
+
+#: mmo.c:1787
+#, c-format
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: ogiltig mmo-fil: filnamnet fÃ¶r nummer %d angavs inte innan anvÃ¤ndning\n"
+
+#: mmo.c:1893
+#, c-format
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: ogiltig mmo-fil: fÃ¤lten y och z i lop_stab Ã¤r icke-tomma, y: %d, z: %d\n"
+
+#: mmo.c:1929
+#, c-format
+msgid "%s: invalid mmo file: lop_end not last item in file\n"
+msgstr "%s: ogiltig mmo-fil: lop_end Ã¤r inte sista objektet i fil\n"
+
+#: mmo.c:1942
+#, c-format
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: ogiltig mmo-fil: YZ i lop_end (%ld) Ã¤r inte lika med antalet tetra till den fÃ¶regÃ¥ende lop_stab (%ld)\n"
+
+#: mmo.c:2652
+#, c-format
+msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
+msgstr "%s: ogiltig symboltabell: dubblettsymbol â€�%sâ€�\n"
+
+#: mmo.c:2892
+#, c-format
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Felaktig symboldefinition: â€�Mainâ€� Ã¤r instÃ¤lld till %s istÃ¤llet fÃ¶r startadressen %s\n"
+
+#: mmo.c:2984
+#, c-format
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgstr "%s: varning: symboltabellen Ã¤r fÃ¶r stor fÃ¶r mmo, stÃ¶rre Ã¤n 65535 32-bitars ord: %d. Endast â€�Mainâ€� kommer att skickas.\n"
+
+#: mmo.c:3029
+#, c-format
+msgid "%s: internal error, symbol table changed size from %d to %d words\n"
+msgstr "%s: internt fel, symboltabellen Ã¤ndrade storlek frÃ¥n %d till %d ord\n"
+
+#: mmo.c:3081
+#, c-format
+msgid "%s: internal error, internal register section %s had contents\n"
+msgstr "%s: internt fel, interna registersektionen %s hade innehÃ¥ll\n"
+
+#: mmo.c:3132
+#, c-format
+msgid "%s: no initialized registers; section length 0\n"
+msgstr "%s: inga initierade register; sektionslÃ¤ngd 0\n"
+
+#: mmo.c:3138
+#, c-format
+msgid "%s: too many initialized registers; section length %ld\n"
+msgstr "%s: fÃ¶r mÃ¥nga initierade register; sektionslÃ¤ngd %ld\n"
+
+#: mmo.c:3143
+#, c-format
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: ogiltig startadress fÃ¶r initierade register med lÃ¤ngden %ld: 0x%lx%08lx\n"
+
+#: oasys.c:881
+#, c-format
+msgid "%s: can not represent section `%s' in oasys"
+msgstr "%s: kan inte representera sektionen â€�%sâ€� i oasys"
+
+#: osf-core.c:128
+#, c-format
+msgid "Unhandled OSF/1 core file section type %d\n"
+msgstr "Ohanterad sektionstyp %d fÃ¶r OSF/1-minnesfil\n"
+
+#: pe-mips.c:607
+msgid "%B: `ld -r' not supported with PE MIPS objects\n"
+msgstr "%B: â€�ld -râ€� stÃ¶ds inte fÃ¶r PE MIPS-objekt\n"
+
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to.
+#: pe-mips.c:719
+msgid "%B: unimplemented %s\n"
+msgstr "%B: oimplementerad %s\n"
+
+#: pe-mips.c:745
+msgid "%B: jump too far away\n"
+msgstr "%B: hopp fÃ¶r lÃ¥ngt\n"
+
+#: pe-mips.c:771
+msgid "%B: bad pair/reflo after refhi\n"
+msgstr "%B: felaktigt pair/reflo efter refhi\n"
+
+#: pef.c:522
+#, c-format
+msgid "bfd_pef_scan: unknown architecture 0x%lx"
+msgstr "bfd_pef_scan: okÃ¤nd arkitektur 0x%lx"
+
+#: pei-x86_64.c:469
+#, c-format
+msgid "warning: .pdata section size (%ld) is not a multiple of %d\n"
+msgstr "varning: .pdata-sektionsstorlek (%ld) Ã¤r inte en multiplikator av %d\n"
+
+#: pei-x86_64.c:474 peigen.c:1626 peigen.c:1809 pepigen.c:1626 pepigen.c:1809
+#: pex64igen.c:1626 pex64igen.c:1809
+#, c-format
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+"\n"
+"Funktionstabellen (tolkade innehÃ¥ll frÃ¥n .pdata-sektionen)\n"
+
+#: pei-x86_64.c:476
+#, c-format
+msgid "vma:\t\t\tBeginAddress\t EndAddress\t  UnwindData\n"
+msgstr "vma:\t\t\tStartadress\t Slutadress\t  Unwinddata\n"
+
+#. XXX code yet to be written.
+#: peicode.h:758
+msgid "%B: Unhandled import type; %x"
+msgstr "%B: Ohanterad importtyp; %x"
+
+#: peicode.h:763
+msgid "%B: Unrecognised import type; %x"
+msgstr "%B OkÃ¤nd importtyp; %x"
+
+#: peicode.h:777
+msgid "%B: Unrecognised import name type; %x"
+msgstr "%B: OkÃ¤nd importnamnstyp; %x"
+
+#: peicode.h:1173
+msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgstr "%B: OkÃ¤nd maskintyp (0x%x) i Importbiblioteksformatarkivet"
+
+#: peicode.h:1185
+msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+msgstr "%B: KÃ¤nd men ohanterad maskintyp (0x%x) i importbiblioteksformatarkivet"
+
+#: peicode.h:1203
+msgid "%B: size field is zero in Import Library Format header"
+msgstr "%B: storleksfÃ¤ltet Ã¤r noll i importbiblioteksformathuvudet"
+
+#: peicode.h:1234
+msgid "%B: string not null terminated in ILF object file."
+msgstr "%B: strÃ¤ng som inte Ã¤r nollavslutad i ILF-objektfil."
+
+#: ppcboot.c:391
+#, c-format
+msgid ""
+"\n"
+"ppcboot header:\n"
+msgstr ""
+"\n"
+"ppcboot-huvud:\n"
+
+#: ppcboot.c:392
+#, c-format
+msgid "Entry offset        = 0x%.8lx (%ld)\n"
+msgstr "StartavstÃ¥nd        = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:394
+#, c-format
+msgid "Length              = 0x%.8lx (%ld)\n"
+msgstr "LÃ¤ngd               = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:398
+#, c-format
+msgid "Flag field          = 0x%.2x\n"
+msgstr "FlaggfÃ¤lt           = 0x%.2x\n"
+
+#: ppcboot.c:404
+#, c-format
+msgid "Partition name      = \"%s\"\n"
+msgstr "Partitionsnamn      = â€�%sâ€�\n"
+
+#: ppcboot.c:423
+#, c-format
+msgid ""
+"\n"
+"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+"\n"
+"Start pÃ¥ partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:429
+#, c-format
+msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr "Slut pÃ¥ partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:435
+#, c-format
+msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
+msgstr "Sektor fÃ¶r partition[%d] = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:437
+#, c-format
+msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
+msgstr "LÃ¤ngd pÃ¥ partition[%d] = 0x%.8lx (%ld)\n"
+
+#: reloc.c:7371
+msgid "INPUT_SECTION_FLAGS are not supported.\n"
+msgstr "INPUT_SECTION_FLAGS stÃ¶ds ej.\n"
+
+#: reloc.c:7526
+msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+msgstr "%X%P: %B(%A): omlokaliseringen â€�%Râ€� gÃ¥r utanfÃ¶r intervallet\n"
+
+#: rs6000-core.c:448
+#, c-format
+msgid "%s: warning core file truncated"
+msgstr "%s: varning: kÃ¤rnfil avkortad"
+
+#: som.c:5471
+#, c-format
+msgid ""
+"\n"
+"Exec Auxiliary Header\n"
+msgstr ""
+"\n"
+"KÃ¶r hjÃ¤lphuvud\n"
+
+#: som.c:5776
+msgid "som_sizeof_headers unimplemented"
+msgstr "som_sizeof_headers Ã¤r inte implementerat"
+
+#: srec.c:261
+msgid "%B:%d: Unexpected character `%s' in S-record file\n"
+msgstr "%B:%d: OvÃ¤ntat tecken â€�%sâ€� i S-postfil\n"
+
+#: srec.c:567 srec.c:600
+msgid "%B:%d: Bad checksum in S-record file\n"
+msgstr "%B:%d: Felaktig kontrollsumma i S-postfil\n"
+
+#: stabs.c:279
+msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
+msgstr "%B(%A+0x%lx): Stabs-post har ogiltigt strÃ¤ngindex."
+
+#: syms.c:1079
+msgid "Unsupported .stab relocation"
+msgstr ".stab-omlokalisering som inte stÃ¶ds"
+
+#: vms-alpha.c:1294
+#, c-format
+msgid "Unknown EGSD subtype %d"
+msgstr "OkÃ¤nd EGSD-deltyp %d"
+
+#: vms-alpha.c:1325
+#, c-format
+msgid "Stack overflow (%d) in _bfd_vms_push"
+msgstr "Stacken ger Ã¶verspill (%d) i _bfd_vms_push"
+
+#: vms-alpha.c:1338
+msgid "Stack underflow in _bfd_vms_pop"
+msgstr "Stacken ger underspill i _bfd_vms_pop"
+
+#. These names have not yet been added to this switch statement.
+#: vms-alpha.c:1575
+#, c-format
+msgid "unknown ETIR command %d"
+msgstr "okÃ¤nt ETIR-kommando %d"
+
+#: vms-alpha.c:1762
+#, c-format
+msgid "bad section index in %s"
+msgstr "felaktigt sektionsindex i %s"
+
+#: vms-alpha.c:1775
+#, c-format
+msgid "unsupported STA cmd %s"
+msgstr "STA-kommando %s stÃ¶ds inte"
+
+#. Insert field.
+#. Unsigned shift.
+#. Rotate.
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-alpha.c:1951 vms-alpha.c:1982 vms-alpha.c:2229
+#, c-format
+msgid "%s: not supported"
+msgstr "%s: stÃ¶ds inte"
+
+#: vms-alpha.c:1957
+#, c-format
+msgid "%s: not implemented"
+msgstr "%s: inte implementerad"
+
+#: vms-alpha.c:2213
+#, c-format
+msgid "invalid use of %s with contexts"
+msgstr "ogiltig anvÃ¤ndning av %s med sammanhang"
+
+#: vms-alpha.c:2247
+#, c-format
+msgid "reserved cmd %d"
+msgstr "reserverat cmd %d"
+
+#: vms-alpha.c:2332
+msgid "Object module NOT error-free !\n"
+msgstr "Objektmodulen INTE felfri!\n"
+
+#: vms-alpha.c:3657
+#, c-format
+msgid "SEC_RELOC with no relocs in section %s"
+msgstr "SEC_RELOC utan omlokaliseringar i sektion %s"
+
+#: vms-alpha.c:3709 vms-alpha.c:3922
+#, c-format
+msgid "Size error in section %s"
+msgstr "Storleksfel i sektion %s"
+
+#: vms-alpha.c:3868
+msgid "Spurious ALPHA_R_BSR reloc"
+msgstr "Oriktig ALPHA_R_BSR-omlokalisering"
+
+#: vms-alpha.c:3909
+#, c-format
+msgid "Unhandled relocation %s"
+msgstr "Ohanterad omlokalisering %s"
+
+#: vms-alpha.c:4199
 #, c-format
-msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
-msgstr "%s(%s+0x%lx): olöslig %s-omlokalisering mot symbolen \"%s\""
+msgid "unknown source command %d"
+msgstr "okÃ¤nt kÃ¤llkommando %d"
+
+#: vms-alpha.c:4260
+msgid "DST__K_SET_LINUM_INCR not implemented"
+msgstr "DST__K_SET_LINUM_INCR inte implementerad"
+
+#: vms-alpha.c:4266
+msgid "DST__K_SET_LINUM_INCR_W not implemented"
+msgstr "DST__K_SET_LINUM_INCR_W inte implementerad"
+
+#: vms-alpha.c:4272
+msgid "DST__K_RESET_LINUM_INCR not implemented"
+msgstr "DST__K_RESET_LINUM_INCR inte implementerad"
+
+#: vms-alpha.c:4278
+msgid "DST__K_BEG_STMT_MODE not implemented"
+msgstr "DST__K_BEG_STMT_MODE inte implementerad"
+
+#: vms-alpha.c:4284
+msgid "DST__K_END_STMT_MODE not implemented"
+msgstr "DST__K_END_STMT_MODE inte implementerad"
+
+#: vms-alpha.c:4311
+msgid "DST__K_SET_PC not implemented"
+msgstr "DST__K_SET_PC inte implementerad"
 
-#: elf32-ppc.c:5644 elf64-ppc.c:8507
+#: vms-alpha.c:4317
+msgid "DST__K_SET_PC_W not implemented"
+msgstr "DST__K_SET_PC_W inte implementerad"
+
+#: vms-alpha.c:4323
+msgid "DST__K_SET_PC_L not implemented"
+msgstr "DST__K_SET_PC_L inte implementerad"
+
+#: vms-alpha.c:4329
+msgid "DST__K_SET_STMTNUM not implemented"
+msgstr "DST__K_SET_STMTNUM inte implementerad"
+
+#: vms-alpha.c:4372
 #, c-format
-msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
-msgstr "%s(%s+0x%lx): %s-omlokalisering mot \"%s\": fel %d"
+msgid "unknown line command %d"
+msgstr "okÃ¤nt radkommando %d"
 
-#: elf32-ppc.c:5888
+#: vms-alpha.c:4846 vms-alpha.c:4863 vms-alpha.c:4877 vms-alpha.c:4892
+#: vms-alpha.c:4904 vms-alpha.c:4915 vms-alpha.c:4927
 #, c-format
-msgid "corrupt or empty %s section in %s"
-msgstr "trasig eller tom %s-sektion i %s"
+msgid "Unknown reloc %s + %s"
+msgstr "OkÃ¤nd omlokalisering %s + %s"
 
-#: elf32-ppc.c:5895
+#: vms-alpha.c:4982
 #, c-format
-msgid "unable to read in %s section from %s"
-msgstr "kan inte läsa in %s-sektion från %s"
+msgid "Unknown reloc %s"
+msgstr "OkÃ¤nd omlokalisering %s"
+
+#: vms-alpha.c:4995
+msgid "Invalid section index in ETIR"
+msgstr "Ogiltigt sektionsindex i ETIR"
 
-#: elf32-ppc.c:5901
+#: vms-alpha.c:5002
+msgid "Relocation for non-REL psect"
+msgstr "Omlokalisering fÃ¶r icke-REL psect"
+
+#: vms-alpha.c:5049
 #, c-format
-msgid "corrupt %s section in %s"
-msgstr "trasig %s-sektion i %s"
+msgid "Unknown symbol in command %s"
+msgstr "OkÃ¤nd symbol i kommando %s"
 
-#: elf32-ppc.c:5944
+#: vms-alpha.c:5564
 #, c-format
-msgid "warning: unable to set size of %s section in %s"
-msgstr "varning: kan inte ställa in storleken för sektionen %s i %s"
+msgid "  EMH %u (len=%u): "
+msgstr "  EMH %u (len=%u): "
 
-#: elf32-ppc.c:5994
-msgid "failed to allocate space for new APUinfo section."
-msgstr "misslyckades med att allokera utrymme för ny APUinfo-sektion."
+#: vms-alpha.c:5573
+#, c-format
+msgid "Module header\n"
+msgstr "Modulhuvud\n"
 
-#: elf32-ppc.c:6013
-msgid "failed to compute new APUinfo section."
-msgstr "misslyckades med att beräkna ny APUinfo-sektion."
+#: vms-alpha.c:5574
+#, c-format
+msgid "   structure level: %u\n"
+msgstr "   strukturnivÃ¥: %u\n"
 
-#: elf32-ppc.c:6016
-msgid "failed to install new APUinfo section."
-msgstr "misslyckades med att installera ny APUinfo-sektion."
+#: vms-alpha.c:5575
+#, c-format
+msgid "   max record size: %u\n"
+msgstr "   max poststorlek: %u\n"
 
-#: elf32-s390.c:2256 elf64-s390.c:2226
+#: vms-alpha.c:5578
 #, c-format
-msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
-msgstr "%s(%s+0x%lx): ogiltig instruktion för TLS-omlokalisering %s"
+msgid "   module name    : %.*s\n"
+msgstr "   modulnamn     : %.*s\n"
 
-#: elf32-sh.c:2103
+#: vms-alpha.c:5580
 #, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
-msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-avstånd"
+msgid "   module version : %.*s\n"
+msgstr "   modulversion: %.*s\n"
 
-#: elf32-sh.c:2115
+#: vms-alpha.c:5582
 #, c-format
-msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
-msgstr "%s: 0x%lx: varning: R_SH_USES pekar till okänd instruktion 0x%x"
+msgid "   compile date   : %.17s\n"
+msgstr "   kompileringsdatum:  %.17s\n"
 
-#: elf32-sh.c:2132
+#: vms-alpha.c:5587
 #, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
-msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-inläsningsavstånd"
+msgid "Language Processor Name\n"
+msgstr "SprÃ¥kbehandlarens namn\n"
 
-#: elf32-sh.c:2147
+#: vms-alpha.c:5588
 #, c-format
-msgid "%s: 0x%lx: warning: could not find expected reloc"
-msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad omlokalisering"
+msgid "   language name: %.*s\n"
+msgstr "   sprÃ¥knamn: %.*s\n"
 
-#: elf32-sh.c:2175
+#: vms-alpha.c:5595
 #, c-format
-msgid "%s: 0x%lx: warning: symbol in unexpected section"
-msgstr "%s: 0x%lx: varning: symbol i oväntad sektion"
+msgid "Source Files Header\n"
+msgstr "KÃ¤llkodsfilers huvud\n"
 
-#: elf32-sh.c:2300
+#: vms-alpha.c:5596
 #, c-format
-msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
-msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad COUNT-omlokalisering"
+msgid "   file: %.*s\n"
+msgstr "   fil: %.*s\n"
 
-#: elf32-sh.c:2309
+#: vms-alpha.c:5603
 #, c-format
-msgid "%s: 0x%lx: warning: bad count"
-msgstr "%s: 0x%lx: varning: felaktigt antal"
+msgid "Title Text Header\n"
+msgstr "Titeltexthuvud\n"
 
-#: elf32-sh.c:2712 elf32-sh.c:3088
+#: vms-alpha.c:5604
 #, c-format
-msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
-msgstr "%s: 0x%lx: ödesdigert: omlokalisering ger överspill vid förenklingen"
+msgid "   title: %.*s\n"
+msgstr "   titel: %.*s\n"
 
-#: elf32-sh.c:4654 elf64-sh64.c:1585
-msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
-msgstr "Oväntat STO_SH5_ISA32 på lokal symbol hanteras inte"
+#: vms-alpha.c:5611
+#, c-format
+msgid "Copyright Header\n"
+msgstr "UpphovsrÃ¤ttshuvud\n"
 
-#: elf32-sh.c:4809
+#: vms-alpha.c:5612
 #, c-format
-msgid "%s: unresolvable relocation against symbol `%s' from %s section"
-msgstr "%s: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
+msgid "   copyright: %.*s\n"
+msgstr "   upphovsrÃ¤tt: %.*s\n"
 
-#: elf32-sh.c:4881
+#: vms-alpha.c:5618
 #, c-format
-msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr "%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för förenklingsstöd"
+msgid "unhandled emh subtype %u\n"
+msgstr "ohanterad emh-deltyp %u\n"
 
-#: elf32-sh.c:6627 elf64-alpha.c:4848
+#: vms-alpha.c:5628
 #, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr "%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt"
+msgid "  EEOM (len=%u):\n"
+msgstr "  EEOM (len=%u):\n"
 
-#: elf32-sh64.c:221 elf64-sh64.c:2407
+#: vms-alpha.c:5629
 #, c-format
-msgid "%s: compiled as 32-bit object and %s is 64-bit"
-msgstr "%s: kompilerat som 32-bitarsobjekt och %s är 64-bitars"
+msgid "   number of cond linkage pairs: %u\n"
+msgstr "   antal cond-lÃ¤nkningspar: %u\n"
 
-#: elf32-sh64.c:224 elf64-sh64.c:2410
+#: vms-alpha.c:5631
 #, c-format
-msgid "%s: compiled as 64-bit object and %s is 32-bit"
-msgstr "%s: kompilerat som 64-bitarsobjekt och %s är 32-bitars"
+msgid "   completion code: %u\n"
+msgstr "   slutfÃ¶randekod: %u\n"
 
-#: elf32-sh64.c:226 elf64-sh64.c:2412
+#: vms-alpha.c:5635
 #, c-format
-msgid "%s: object size does not match that of target %s"
-msgstr "%s: objektstorleken stämmer inte överens med den hos målet %s"
+msgid "   transfer addr flags: 0x%02x\n"
+msgstr "   Ã¶verfÃ¶r addr-flaggor: 0x%02x\n"
 
-#: elf32-sh64.c:461 elf64-sh64.c:2990
+#: vms-alpha.c:5636
 #, c-format
-msgid "%s: encountered datalabel symbol in input"
-msgstr "%s: påträffade dataetikettssymbol i indata"
+msgid "   transfer addr psect: %u\n"
+msgstr "   Ã¶verfÃ¶r addr psect: %u\n"
 
-#: elf32-sh64.c:544
-msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
-msgstr "PTB passar inte: en SHmedia-adress (bit 0 == 1)"
+#: vms-alpha.c:5638
+#, c-format
+msgid "   transfer address   : 0x%08x\n"
+msgstr "   Ã¶verfÃ¶r adress  : 0x%08x\n"
 
-#: elf32-sh64.c:547
-msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
-msgstr "PTA passar inte: en SHcompact-adress (bit 0 == 0)"
+#: vms-alpha.c:5647
+msgid " WEAK"
+msgstr " SVAG"
+
+#: vms-alpha.c:5649
+msgid " DEF"
+msgstr " DEF"
+
+#: vms-alpha.c:5651
+msgid " UNI"
+msgstr " UNI"
 
-#: elf32-sh64.c:565
+#: vms-alpha.c:5653 vms-alpha.c:5674
+msgid " REL"
+msgstr " REL"
+
+#: vms-alpha.c:5655
+msgid " COMM"
+msgstr " KOMM"
+
+#: vms-alpha.c:5657
+msgid " VECEP"
+msgstr " VECEP"
+
+#: vms-alpha.c:5659
+msgid " NORM"
+msgstr " NORM"
+
+#: vms-alpha.c:5661
+msgid " QVAL"
+msgstr " QVAL"
+
+#: vms-alpha.c:5668
+msgid " PIC"
+msgstr " PIC"
+
+#: vms-alpha.c:5670
+msgid " LIB"
+msgstr " LIB"
+
+#: vms-alpha.c:5672
+msgid " OVR"
+msgstr " OVR"
+
+#: vms-alpha.c:5676
+msgid " GBL"
+msgstr " GBL"
+
+#: vms-alpha.c:5678
+msgid " SHR"
+msgstr " SHR"
+
+#: vms-alpha.c:5680
+msgid " EXE"
+msgstr " EXE"
+
+#: vms-alpha.c:5682
+msgid " RD"
+msgstr " LÃ„S"
+
+#: vms-alpha.c:5684
+msgid " WRT"
+msgstr " SKR"
+
+#: vms-alpha.c:5686
+msgid " VEC"
+msgstr " VEK"
+
+#: vms-alpha.c:5688
+msgid " NOMOD"
+msgstr " NOMOD"
+
+#: vms-alpha.c:5690
+msgid " COM"
+msgstr " COM"
+
+#: vms-alpha.c:5692
+msgid " 64B"
+msgstr " 64B"
+
+#: vms-alpha.c:5701
 #, c-format
-msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
-msgstr "%s: GAS-fel: oväntad PTB-instruktion med R_SH_PT_16"
+msgid "  EGSD (len=%u):\n"
+msgstr "  EGSD (len=%u):\n"
 
-#: elf32-sh64.c:614 elf64-sh64.c:1748
+#: vms-alpha.c:5713
 #, c-format
-msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
-msgstr "%s: fel: ojusterad omlokaliseringstyp %d på %08x omlokalisering %08x\n"
+msgid "  EGSD entry %2u (type: %u, len: %u): "
+msgstr "  EGSD-post %2u (typ: %u, len: %u): "
 
-#: elf32-sh64.c:698
+#: vms-alpha.c:5725
 #, c-format
-msgid "%s: could not write out added .cranges entries"
-msgstr "%s: kunde inte skriva ut tillagda .cranges-poster"
+msgid "PSC - Program section definition\n"
+msgstr "PSC - Programsektionsdefinition\n"
 
-#: elf32-sh64.c:760
+#: vms-alpha.c:5726 vms-alpha.c:5743
 #, c-format
-msgid "%s: could not write out sorted .cranges entries"
-msgstr "%s: kunde inte skriva ut sorterade cranges-poster"
+msgid "   alignment  : 2**%u\n"
+msgstr "   rÃ¤ttning  : 2**%u\n"
 
-#: elf32-sparc.c:2521 elf64-sparc.c:2314
+#: vms-alpha.c:5727 vms-alpha.c:5744
 #, c-format
-msgid "%s: probably compiled without -fPIC?"
-msgstr "%s: troligen kompilerad utan -fPIC?"
+msgid "   flags      : 0x%04x"
+msgstr "   flaggor      : 0x%04x"
 
-#: elf32-sparc.c:3348
+#: vms-alpha.c:5731
 #, c-format
-msgid "%s: compiled for a 64 bit system and target is 32 bit"
-msgstr "%s: kompilerat för ett 64-bitarssystem och målet är 32-bitars"
+msgid "   alloc (len): %u (0x%08x)\n"
+msgstr "   allok (len): %u (0x%08x)\n"
 
-#: elf32-sparc.c:3362
+#: vms-alpha.c:5732 vms-alpha.c:5789 vms-alpha.c:5838
 #, c-format
-msgid "%s: linking little endian files with big endian files"
-msgstr "%s: länkar little endian-filer med big endian-filer"
+msgid "   name       : %.*s\n"
+msgstr "   namn       : %.*s\n"
 
-#: elf32-v850.c:753
+#: vms-alpha.c:5742
 #, c-format
-msgid "Variable `%s' cannot occupy in multiple small data regions"
-msgstr "Variabel \"%s\" kan inte befinna sig i flera små dataområden"
+msgid "SPSC - Shared Image Program section def\n"
+msgstr "SPSC - Delad avbilds-programsektionsdef\n"
 
-#: elf32-v850.c:756
+#: vms-alpha.c:5748
 #, c-format
-msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr "Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå dataområdena"
+msgid "   alloc (len)   : %u (0x%08x)\n"
+msgstr "   allok (len)   : %u (0x%08x)\n"
 
-#: elf32-v850.c:759
+#: vms-alpha.c:5749
 #, c-format
-msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr "Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
+msgid "   image offset  : 0x%08x\n"
+msgstr "   avbildsfÃ¶rskjutning   : 0x%08x\n"
 
-#: elf32-v850.c:762
+#: vms-alpha.c:5751
 #, c-format
-msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr "Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
+msgid "   symvec offset : 0x%08x\n"
+msgstr "   symvec-fÃ¶rskjutning: 0x%08x\n"
 
-#: elf32-v850.c:765
+#: vms-alpha.c:5753
 #, c-format
-msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr "Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
+msgid "   name          : %.*s\n"
+msgstr "   namn          : %.*s\n"
 
-#: elf32-v850.c:1144
-msgid "FAILED to find previous HI16 reloc\n"
-msgstr "MISSLYCKADES med att hitta tidigare HI16-omlokalisering\n"
+#: vms-alpha.c:5766
+#, c-format
+msgid "SYM - Global symbol definition\n"
+msgstr "SYM - Global symboldefinition\n"
 
-#: elf32-v850.c:1789
-msgid "could not locate special linker symbol __gp"
-msgstr "kunde inte lokalisera speciell länkarsymbol __gp"
+#: vms-alpha.c:5767 vms-alpha.c:5827 vms-alpha.c:5848 vms-alpha.c:5867
+#, c-format
+msgid "   flags: 0x%04x"
+msgstr "   flaggor: 0x%04x"
 
-#: elf32-v850.c:1793
-msgid "could not locate special linker symbol __ep"
-msgstr "kunde inte lokalisera speciell länkarsymbol __ep"
+#: vms-alpha.c:5770
+#, c-format
+msgid "   psect offset: 0x%08x\n"
+msgstr "   psect-fÃ¶rskjutning: 0x%08x\n"
 
-#: elf32-v850.c:1797
-msgid "could not locate special linker symbol __ctbp"
-msgstr "kunde inte lokalisera speciell länkarsymbol __ctbp"
+#: vms-alpha.c:5774
+#, c-format
+msgid "   code address: 0x%08x\n"
+msgstr "   kodadress: 0x%08x\n"
 
-#: elf32-v850.c:1963
+#: vms-alpha.c:5776
 #, c-format
-msgid "%s: Architecture mismatch with previous modules"
-msgstr "%s: Arkitekturen passar inte ihop med tidigare moduler"
+msgid "   psect index for entry point : %u\n"
+msgstr "   psect-index fÃ¶r startpunkt: %u\n"
 
-#: elf32-v850.c:1983
+#: vms-alpha.c:5779 vms-alpha.c:5855 vms-alpha.c:5874
 #, c-format
-msgid "private flags = %lx: "
-msgstr "privata flaggor = %lx: "
+msgid "   psect index : %u\n"
+msgstr "   psect-index: %u\n"
 
-#: elf32-v850.c:1988
-msgid "v850 architecture"
-msgstr "v850-arkitektur"
+#: vms-alpha.c:5781 vms-alpha.c:5857 vms-alpha.c:5876
+#, c-format
+msgid "   name        : %.*s\n"
+msgstr "   namn        : %.*s\n"
 
-#: elf32-v850.c:1989
-msgid "v850e architecture"
-msgstr "v850e-arkitektur"
+#: vms-alpha.c:5788
+#, c-format
+msgid "SYM - Global symbol reference\n"
+msgstr "SYM - Global symbolreferens\n"
 
-#: elf32-vax.c:549
-msgid " [nonpic]"
-msgstr " [icke-pic]"
+#: vms-alpha.c:5800
+#, c-format
+msgid "IDC - Ident Consistency check\n"
+msgstr "IDC - Identitetskonsekvenskontroll\n"
 
-#: elf32-vax.c:552
-msgid " [d-float]"
-msgstr " [d-flyttal]"
+#: vms-alpha.c:5801
+#, c-format
+msgid "   flags         : 0x%08x"
+msgstr "   flaggor        : 0x%08x"
 
-#: elf32-vax.c:555
-msgid " [g-float]"
-msgstr " [g-flyttal]"
+#: vms-alpha.c:5805
+#, c-format
+msgid "   id match      : %x\n"
+msgstr "   id-match      : %x\n"
 
-#: elf32-vax.c:663
+#: vms-alpha.c:5807
 #, c-format
-msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
-msgstr "%s: varning: GOT-addendum %ld till \"%s\" stämmer inte överens med tidigare GOT-addendum %ld"
+msgid "   error severity: %x\n"
+msgstr "   felgrad :%x\n"
 
-#: elf32-vax.c:1667
+#: vms-alpha.c:5810
 #, c-format
-msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
-msgstr "%s: varning: PLT-addendum %d till \"%s\" från sektionen %s ignorerades"
+msgid "   entity name   : %.*s\n"
+msgstr "   postnamn   : %.*s\n"
 
-#: elf32-vax.c:1802
+#: vms-alpha.c:5812
 #, c-format
-msgid "%s: warning: %s relocation against symbol `%s' from %s section"
-msgstr "%s: varning: %s-omlokalisering mot symbolen \"%s\" från sektionen %s"
+msgid "   object name   : %.*s\n"
+msgstr "   objektnamn   : %.*s\n"
 
-#: elf32-vax.c:1808
+#: vms-alpha.c:5815
 #, c-format
-msgid "%s: warning: %s relocation to 0x%x from %s section"
-msgstr "%s: varning: %s-omlokalisering till 0x%x från sektionen %s"
+msgid "   binary ident  : 0x%08x\n"
+msgstr "   binÃ¤rident   : 0x%08x\n"
 
-#: elf32-xstormy16.c:462 elf32-ia64.c:2450 elf64-ia64.c:2450
-msgid "non-zero addend in @fptr reloc"
-msgstr "icke-tomt addendum i @fptr-omlokalisering"
+#: vms-alpha.c:5818
+#, c-format
+msgid "   ascii ident   : %.*s\n"
+msgstr "   ascii-ident   : %.*s\n"
 
-#: elf64-alpha.c:1108
-msgid "GPDISP relocation did not find ldah and lda instructions"
-msgstr "GPDISP-omlokalisering hittade inga ldah- och lda-instruktioner"
+#: vms-alpha.c:5826
+#, c-format
+msgid "SYMG - Universal symbol definition\n"
+msgstr "SYMG - Universell symboldefinition\n"
 
-#: elf64-alpha.c:3731
+#: vms-alpha.c:5830
 #, c-format
-msgid "%s: .got subsegment exceeds 64K (size %d)"
-msgstr "%s: .got-subsegment överskrider 64 kB (storlek %d)"
+msgid "   symbol vector offset: 0x%08x\n"
+msgstr "   symbolvektor-offset : 0x%08x\n"
 
-#: elf64-alpha.c:4602 elf64-alpha.c:4614
+#: vms-alpha.c:5832
 #, c-format
-msgid "%s: gp-relative relocation against dynamic symbol %s"
-msgstr "%s: gp-relativ omlokalisering mot dynamiska symbolen %s"
+msgid "   entry point: 0x%08x\n"
+msgstr "   startpunkt: 0x%08x\n"
 
-#: elf64-alpha.c:4640 elf64-alpha.c:4773
+#: vms-alpha.c:5834
 #, c-format
-msgid "%s: pc-relative relocation against dynamic symbol %s"
-msgstr "%s: pc-relativ omlokalisering mot dynamiska symbolen %s"
+msgid "   proc descr : 0x%08x\n"
+msgstr "   proc-beskr : 0x%08x\n"
 
-#: elf64-alpha.c:4668
+#: vms-alpha.c:5836
 #, c-format
-msgid "%s: change in gp: BRSGP %s"
-msgstr "%s: ändring i gp: BRSGP %s"
+msgid "   psect index: %u\n"
+msgstr "   psect-index: %u\n"
 
-#: elf64-alpha.c:4693
-msgid "<unknown>"
-msgstr "<okänd>"
+#: vms-alpha.c:5847
+#, c-format
+msgid "SYMV - Vectored symbol definition\n"
+msgstr "SYMV - Vektoriserad symboldefinition\n"
 
-#: elf64-alpha.c:4698
+#: vms-alpha.c:5851
 #, c-format
-msgid "%s: !samegp reloc against symbol without .prologue: %s"
-msgstr "%s: !samegp-omlokalisering mot symbol utan .prologue: %s"
+msgid "   vector      : 0x%08x\n"
+msgstr "   vektor      : 0x%08x\n"
 
-#: elf64-alpha.c:4749
+#: vms-alpha.c:5853 vms-alpha.c:5872
 #, c-format
-msgid "%s: unhandled dynamic relocation against %s"
-msgstr "%s: ohanterad dynamisk omlokalisering mot %s"
+msgid "   psect offset: %u\n"
+msgstr "   psect-offset: %u\n"
 
-#: elf64-alpha.c:4832
+#: vms-alpha.c:5866
 #, c-format
-msgid "%s: dtp-relative relocation against dynamic symbol %s"
-msgstr "%s: dtp-relativ omlokalisering mot dynamiska symbolen %s"
+msgid "SYMM - Global symbol definition with version\n"
+msgstr "SYMM - Global symboldefinition med versioner\n"
 
-#: elf64-alpha.c:4855
+#: vms-alpha.c:5870
 #, c-format
-msgid "%s: tp-relative relocation against dynamic symbol %s"
-msgstr "%s: tp-relativ omlokalisering mot dynamiska symbolen %s"
+msgid "   version mask: 0x%08x\n"
+msgstr "   versionsmask: 0x%08x\n"
 
-#: elf64-hppa.c:2086
+#: vms-alpha.c:5881
 #, c-format
-msgid "stub entry for %s cannot load .plt, dp offset = %ld"
-msgstr "stubbpost för %s kan inte läsa in .plt, dp-avstånd = %ld"
+msgid "unhandled egsd entry type %u\n"
+msgstr "ohanterad egsd-posttyp %u\n"
 
-#: elf64-mmix.c:1032
+#: vms-alpha.c:5915
 #, c-format
-msgid ""
-"%s: Internal inconsistency error for value for\n"
-" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
-msgstr ""
-"%s: Intern inkkonsistensfel för värdet för\n"
-" länkarallokerat globalt register: länkat: 0x%lx%08lx != avslappnat: 0x%lx%08lx\n"
+msgid "    linkage index: %u, replacement insn: 0x%08x\n"
+msgstr "    lÃ¤nkningsindex: %u, ersÃ¤ttning insn: 0x%08x\n"
 
-#: elf64-mmix.c:1416
+#: vms-alpha.c:5918
 #, c-format
-msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
-msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: (okänd) i %s"
+msgid "    psect idx 1: %u, offset 1: 0x%08x %08x\n"
+msgstr "    psect-idx 1: %u, offset 1: 0x%08x %08x\n"
 
-#: elf64-mmix.c:1421
+#: vms-alpha.c:5922
 #, c-format
-msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
-msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: %s i %s"
+msgid "    psect idx 2: %u, offset 2: 0x%08x %08x\n"
+msgstr "    psect-idx 2: %u, offset 2: 0x%08x %08x\n"
 
-#: elf64-mmix.c:1465
+#: vms-alpha.c:5927
 #, c-format
-msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr "%s: registeromlokalisering mot icke-registersymbol: (okänd) i %s"
+msgid "    psect idx 3: %u, offset 3: 0x%08x %08x\n"
+msgstr "    psect-idx 3: %u, offset 3: 0x%08x %08x\n"
 
-#: elf64-mmix.c:1470
+#: vms-alpha.c:5932
 #, c-format
-msgid "%s: register relocation against non-register symbol: %s in %s"
-msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
+msgid "    global name: %.*s\n"
+msgstr "    globalt namn: %.*s\n"
 
-#: elf64-mmix.c:1507
+#: vms-alpha.c:5942
 #, c-format
-msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr "%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
+msgid "  %s (len=%u+%u):\n"
+msgstr "  %s (len=%u+%u):\n"
 
-#: elf64-mmix.c:1535
+#: vms-alpha.c:5957
 #, c-format
-msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
-msgstr "%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första globala registret är $%ld."
+msgid "   (type: %3u, size: 4+%3u): "
+msgstr "   (typ: %3u, stl: 4+%3u): "
 
-#: elf64-mmix.c:1994
+#: vms-alpha.c:5961
 #, c-format
-msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
-msgstr "%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en tidigare länkad fil\n"
+msgid "STA_GBL (stack global) %.*s\n"
+msgstr "STA_GBL (global stack) %.*s\n"
 
-#: elf64-mmix.c:2053
-msgid "Register section has contents\n"
-msgstr "Registersektion har innehåll\n"
+#: vms-alpha.c:5965
+#, c-format
+msgid "STA_LW (stack longword) 0x%08x\n"
+msgstr "STA_LW (longword-stack) 0x%08x\n"
 
-#: elf64-mmix.c:2216
+#: vms-alpha.c:5969
 #, c-format
-msgid ""
-"Internal inconsistency: remaining %u != max %u.\n"
-"  Please report this bug."
-msgstr ""
-"Intern inkonsekvens: återstående %u != max %u.\n"
-"  Rapportera gärna detta fel."
+msgid "STA_QW (stack quadword) 0x%08x %08x\n"
+msgstr "STA_QW (quadword-stack) 0x%08x %08x\n"
 
-#: elf64-ppc.c:2388 libbfd.c:831
+#: vms-alpha.c:5974
 #, c-format
-msgid "%s: compiled for a big endian system and target is little endian"
-msgstr "%s: kompilerad för big endian-system och målet är little endian"
+msgid "STA_PQ (stack psect base + offset)\n"
+msgstr "STA_PQ (psect-basstack + fÃ¶rskjutning)\n"
 
-#: elf64-ppc.c:2391 libbfd.c:833
+#: vms-alpha.c:5975
 #, c-format
-msgid "%s: compiled for a little endian system and target is big endian"
-msgstr "%s: kompilerad för ett little endian-system och målet är big endian"
+msgid "    psect: %u, offset: 0x%08x %08x\n"
+msgstr "    psect: %u, fÃ¶rskjutning: 0x%08x %08x\n"
 
-#: elf64-ppc.c:4857
+#: vms-alpha.c:5981
 #, c-format
-msgid "%s: unexpected reloc type %u in .opd section"
-msgstr "%s: oväntad omlokaliseringstyp %u i .opd-sektion"
+msgid "STA_LI (stack literal)\n"
+msgstr "STA_LI (litteral stack)\n"
 
-#: elf64-ppc.c:4877
+#: vms-alpha.c:5984
 #, c-format
-msgid "%s: .opd is not a regular array of opd entries"
-msgstr "%s: .opd är inte en vanlig vektor med opd-poster"
+msgid "STA_MOD (stack module)\n"
+msgstr "STA_MOD (modulstack)\n"
 
-#: elf64-ppc.c:4897
+#: vms-alpha.c:5987
 #, c-format
-msgid "%s: undefined sym `%s' in .opd section"
-msgstr "%s: odefinierad symbol \"%s\" i .opd-sektion"
+msgid "STA_CKARG (compare procedure argument)\n"
+msgstr "STA_CKARG (jÃ¤mfÃ¶r procedurargument)\n"
 
-#: elf64-ppc.c:6136
+#: vms-alpha.c:5991
 #, c-format
-msgid "can't find branch stub `%s'"
-msgstr "kan inte hitta grenstubb \"%s\""
+msgid "STO_B (store byte)\n"
+msgstr "STO_B (lagra byte)\n"
 
-#: elf64-ppc.c:6175 elf64-ppc.c:6250
+#: vms-alpha.c:5994
 #, c-format
-msgid "linkage table error against `%s'"
-msgstr "länktabellsfel mot \"%s\""
+msgid "STO_W (store word)\n"
+msgstr "STO_W (lagra ord)\n"
 
-#: elf64-ppc.c:6340
+#: vms-alpha.c:5997
 #, c-format
-msgid "can't build branch stub `%s'"
-msgstr "kan inte bygga grenstubb \"%s\""
+msgid "STO_LW (store longword)\n"
+msgstr "STO_LW (lagra lÃ¥ngord)\n"
 
-#: elf64-ppc.c:7047
-msgid ".glink and .plt too far apart"
-msgstr ".glink och .plt för långt ifrån varandra"
+#: vms-alpha.c:6000
+#, c-format
+msgid "STO_QW (store quadword)\n"
+msgstr "STO_QW (lagra quad-ord)\n"
 
-#: elf64-ppc.c:7135
-msgid "stubs don't match calculated size"
-msgstr "stubbar stämmer inte överens med beräknad storlek"
+#: vms-alpha.c:6006
+#, c-format
+msgid "STO_IMMR (store immediate repeat) %u bytes\n"
+msgstr "STO_IMMR (lagra omedelbar upprepning) %u byte\n"
 
-#: elf64-ppc.c:7147
+#: vms-alpha.c:6013
 #, c-format
-msgid ""
-"linker stubs in %u groups\n"
-"  branch       %lu\n"
-"  toc adjust   %lu\n"
-"  long branch  %lu\n"
-"  long toc adj %lu\n"
-"  plt call     %lu"
-msgstr ""
-"länkarstubbar i %u grupper\n"
-"  gren           %lu\n"
-"  toc-justering  %lu\n"
-"  lång gren      %lu\n"
-"  lång toc-just. %lu\n"
-"  plt-anrop      %lu"
+msgid "STO_GBL (store global) %.*s\n"
+msgstr "STO_GBL (lagra global) %.*s\n"
 
-#: elf64-ppc.c:7723
+#: vms-alpha.c:6017
 #, c-format
-msgid "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
-msgstr "%s(%s+0x%lx): flera automatiska TOC stöds inte vid användning av dina crt-filer; kompilera om med -mminimal-toc eller uppgradera gcc"
+msgid "STO_CA (store code address) %.*s\n"
+msgstr "STO_CA (lagra kodadress) %.*s\n"
 
-#: elf64-ppc.c:7731
+#: vms-alpha.c:6021
 #, c-format
-msgid "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
-msgstr "%s(%s+0x%lx): syskonanropsoptimering till \"%s\" stöder inte flera automatiska TOC; kompilera om med -mminimal-toc eller -fno-optimize-sibling-calls, eller gör \"%s\" extern"
+msgid "STO_RB (store relative branch)\n"
+msgstr "STO_RB (lagra relativ gren)\n"
 
-#: elf64-ppc.c:8329
+#: vms-alpha.c:6024
 #, c-format
-msgid "%s: relocation %s is not supported for symbol %s."
-msgstr "%s: omlokaliseringen %s stöds inte för symbolen %s."
+msgid "STO_AB (store absolute branch)\n"
+msgstr "STO_AB (lagra absolut gren)\n"
 
-#: elf64-ppc.c:8408
+#: vms-alpha.c:6027
 #, c-format
-msgid "%s: error: relocation %s not a multiple of %d"
-msgstr "%s: fel: omlokaliseringen %s är inte en multipel av %d"
+msgid "STO_OFF (store offset to psect)\n"
+msgstr "STO_OFF (lagra offset i psect)\n"
 
-#: elf64-sparc.c:1370
+#: vms-alpha.c:6033
 #, c-format
-msgid "%s: check_relocs: unhandled reloc type %d"
-msgstr "%s: check_relocs: ohanterad omlokaliseringstyp %d"
+msgid "STO_IMM (store immediate) %u bytes\n"
+msgstr "STO_IMM (lagra omedelbart) %u byte\n"
 
-#: elf64-sparc.c:1407
+#: vms-alpha.c:6040
 #, c-format
-msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr "%s: Endast register %%g[2367] kan deklareras med STT_REGISTER"
+msgid "STO_GBL_LW (store global longword) %.*s\n"
+msgstr "STO_GBL_LW (lagra globalt lÃ¥ngord) %.*s\n"
 
-#: elf64-sparc.c:1427
+#: vms-alpha.c:6044
 #, c-format
-msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "Register %%g%d används inkompatibelt: %s i %s, tidigare %s i %s"
+msgid "STO_OFF (store LP with procedure signature)\n"
+msgstr "STO_OFF (lagra LP med procedursignatur)\n"
 
-#: elf64-sparc.c:1450
+#: vms-alpha.c:6047
 #, c-format
-msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr "Symbolen \"%s\" har olika typer: REGISTER i %s, tidigare %s i %s"
+msgid "STO_BR_GBL (store branch global) *todo*\n"
+msgstr "STO_BR_GBL (lagra gren globalt) *todo*\n"
 
-#: elf64-sparc.c:1496
+#: vms-alpha.c:6050
 #, c-format
-msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
-msgstr "Symbolen \"%s\" har olika typer: %s i %s, tidigare REGISTER i %s"
+msgid "STO_BR_PS (store branch psect + offset) *todo*\n"
+msgstr "STO_BR_PS (lagra grenens psect + offset) *todo*\n"
 
-#: elf64-sparc.c:3053
+#: vms-alpha.c:6054
 #, c-format
-msgid "%s: linking UltraSPARC specific with HAL specific code"
-msgstr "%s: länkar UltraSPARC-specifik med HAL-specifik kod"
+msgid "OPR_NOP (no-operation)\n"
+msgstr "OPR_NOP (no-operation)\n"
 
-#: elf64-x86-64.c:739
+#: vms-alpha.c:6057
 #, c-format
-msgid "%s: %s' accessed both as normal and thread local symbol"
-msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
+msgid "OPR_ADD (add)\n"
+msgstr "OPR_ADD (addera)\n"
 
-#: elfcode.h:1113
+#: vms-alpha.c:6060
 #, c-format
-msgid "%s: version count (%ld) does not match symbol count (%ld)"
-msgstr "%s: versionsantal (%ld) stämmer inte med symbolantal (%ld)"
+msgid "OPR_SUB (substract)\n"
+msgstr "OPR_SUB (subtrahera)\n"
 
-#: elfcode.h:1342
+#: vms-alpha.c:6063
 #, c-format
-msgid "%s(%s): relocation %d has invalid symbol index %ld"
-msgstr "%s(%s): omlokalisering %d har ogiltigt symbolindex %ld"
+msgid "OPR_MUL (multiply)\n"
+msgstr "OPR_MUL (multiplicera)\n"
 
-#: elflink.c:1456
+#: vms-alpha.c:6066
 #, c-format
-msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
-msgstr "%s: varning: oväntad omdefinition av indirekt versionsangiven symbol \"%s\""
+msgid "OPR_DIV (divide)\n"
+msgstr "OPR_DIV (division)\n"
 
-#: elflink.c:1807
+#: vms-alpha.c:6069
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: odefinierat symbolnamn med version %s"
+msgid "OPR_AND (logical and)\n"
+msgstr "OPR_AND (logiskt â€�ochâ€�)\n"
 
-#: elflink.c:2142
+#: vms-alpha.c:6072
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: omlokaliseringsstorleken stämmer inte överens i %s, sektion %s"
+msgid "OPR_IOR (logical inclusive or)\n"
+msgstr "OPR_IOR (logiskt inkluderande â€�ellerâ€�)\n"
 
-#: elflink.c:2434
+#: vms-alpha.c:6075
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
+msgid "OPR_EOR (logical exclusive or)\n"
+msgstr "OPR_EOR (logiskt exkluderande â€�ellerâ€�)\n"
 
-#: elflink.h:1022
+#: vms-alpha.c:6078
 #, c-format
-msgid "%s: %s: invalid version %u (max %d)"
-msgstr "%s: %s: ogiltig version %u (max %d)"
+msgid "OPR_NEG (negate)\n"
+msgstr "OPR_NEG (negera)\n"
 
-#: elflink.h:1063
+#: vms-alpha.c:6081
 #, c-format
-msgid "%s: %s: invalid needed version %d"
-msgstr "%s: %s: ogiltig krävd version %d"
+msgid "OPR_COM (complement)\n"
+msgstr "OPR_COM (komplementera)\n"
 
-#: elflink.h:1238
+#: vms-alpha.c:6084
 #, c-format
-msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
-msgstr "Varning: justeringen %u på symbolen \"%s\" i %s är mindre än %u i %s"
+msgid "OPR_INSV (insert field)\n"
+msgstr "OPR_INSV (infoga fÃ¤lt)\n"
 
-#: elflink.h:1252
+#: vms-alpha.c:6087
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
-msgstr "Varning: storleken på symbolen \"%s\" ändrades från %lu i %s till %lu i %s"
+msgid "OPR_ASH (arithmetic shift)\n"
+msgstr "OPR_ASH (aritmetiskt skifte)\n"
 
-#: elflink.h:2160
+#: vms-alpha.c:6090
 #, c-format
-msgid "%s: undefined version: %s"
-msgstr "%s: odefinierad version: %s"
+msgid "OPR_USH (unsigned shift)\n"
+msgstr "OPR_USH (osignerat skifte)\n"
 
-#: elflink.h:2226
+#: vms-alpha.c:6093
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s: .preinit_array-sektionen är inte tillåten i DSO"
+msgid "OPR_ROT (rotate)\n"
+msgstr "OPR_ROT (rotera)\n"
 
-#: elflink.h:3078
-msgid "Not enough memory to sort relocations"
-msgstr "Inte tillräckligt med minne för att sortera omlokaliseringar"
+#: vms-alpha.c:6096
+#, c-format
+msgid "OPR_SEL (select)\n"
+msgstr "OPR_SEL (vÃ¤lj)\n"
 
-#: elflink.h:3958 elflink.h:4001
+#: vms-alpha.c:6099
 #, c-format
-msgid "%s: could not find output section %s"
-msgstr "%s: kunde inte hitta utdatasektionen %s"
+msgid "OPR_REDEF (redefine symbol to curr location)\n"
+msgstr "OPR_REDEF (omdefiniera symbol till nuv. plats)\n"
 
-#: elflink.h:3964
+#: vms-alpha.c:6102
 #, c-format
-msgid "warning: %s section has zero size"
-msgstr "varning: sektionen %s har nollstorlek"
+msgid "OPR_REDEF (define a literal)\n"
+msgstr "OPR_REDEF (definiera en litteral)\n"
 
-#: elflink.h:4483
+#: vms-alpha.c:6106
 #, c-format
-msgid "%s: %s symbol `%s' in %s is referenced by DSO"
-msgstr "%s: %s-symbolen \"%s\" i %s refereras till av DSO"
+msgid "STC_LP (store cond linkage pair)\n"
+msgstr "STC_LP (lagra villkorslÃ¤nkpar)\n"
 
-#: elflink.h:4564
+#: vms-alpha.c:6110
 #, c-format
-msgid "%s: could not find output section %s for input section %s"
-msgstr "%s: kunde inte hitta utdatasektionen %s för indatasektionen %s"
+msgid "STC_LP_PSB (store cond linkage pair + signature)\n"
+msgstr "STC_LP_PSB (lagra villkorslÃ¤nkpar + signatur)\n"
 
-#: elflink.h:4666
+#: vms-alpha.c:6111
 #, c-format
-msgid "%s: %s symbol `%s' isn't defined"
-msgstr "%s: %s-symbolen \"%s\" är inte definierad"
+msgid "   linkage index: %u, procedure: %.*s\n"
+msgstr "   lÃ¤nkindex: %u, procedur: %.*s\n"
 
-#: elflink.h:5053 elflink.h:5095
-msgid "%T: discarded in section `%s' from %s\n"
-msgstr "%T: bortkastade i sektionen \"%s\" från %s\n"
+#: vms-alpha.c:6114
+#, c-format
+msgid "   signature: %.*s\n"
+msgstr "   signatur: %.*s\n"
 
-#: elfxx-mips.c:887
-msgid "static procedure (no name)"
-msgstr "statisk procedur (inget namn)"
+#: vms-alpha.c:6117
+#, c-format
+msgid "STC_GBL (store cond global)\n"
+msgstr "STC_GBL (lagra villkor globalt)\n"
 
-#: elfxx-mips.c:1897
-msgid "not enough GOT space for local GOT entries"
-msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
+#: vms-alpha.c:6118
+#, c-format
+msgid "   linkage index: %u, global: %.*s\n"
+msgstr "   lÃ¤nkindex: %u, globalt: %.*s\n"
 
-#: elfxx-mips.c:3691
+#: vms-alpha.c:6122
 #, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
+msgid "STC_GCA (store cond code address)\n"
+msgstr "STC_GCA (lagra villkorets kodadress)\n"
 
-#: elfxx-mips.c:5192
+#: vms-alpha.c:6123
 #, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
+msgid "   linkage index: %u, procedure name: %.*s\n"
+msgstr "   lÃ¤nkindex: %u, procedurnamn: %.*s\n"
 
-#: elfxx-mips.c:5266
+#: vms-alpha.c:6127
 #, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
+msgid "STC_PS (store cond psect + offset)\n"
+msgstr "STC_PS (lagra villkorets psect + offset)\n"
 
-#: elfxx-mips.c:8692
+#: vms-alpha.c:6129
 #, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: ogiltigt sektionsnamn \"%s\""
+msgid "   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"
+msgstr "   lÃ¤nkindex: %u, psect: %u, fÃ¶rskjutning: 0x%08x %08x\n"
 
-#: elfxx-mips.c:9025
+#: vms-alpha.c:6136
 #, c-format
-msgid "%s: endianness incompatible with that of the selected emulation"
-msgstr "%s: endianness inkompatibel med den för den valda emuleringen"
+msgid "STC_NOP_GBL (store cond NOP at global addr)\n"
+msgstr "STC_NOP_GBL (lagra villk. NOP i global adress)\n"
 
-#: elfxx-mips.c:9037
+#: vms-alpha.c:6140
 #, c-format
-msgid "%s: ABI is incompatible with that of the selected emulation"
-msgstr "%s: ABI är inkompatibelt med den för den valda emuleringen"
+msgid "STC_NOP_PS (store cond NOP at psect + offset)\n"
+msgstr "STC_NOP_PS (lagra villk. NOP i psect + fÃ¶rskjutning)\n"
 
-#: elfxx-mips.c:9104
+#: vms-alpha.c:6144
 #, c-format
-msgid "%s: warning: linking PIC files with non-PIC files"
-msgstr "%s: varning: länkar PIC-filer med icke-PIC-filer"
+msgid "STC_BSR_GBL (store cond BSR at global addr)\n"
+msgstr "STC_BSR_GBL (lagra villk. BSR i global adress)\n"
 
-#: elfxx-mips.c:9121
+#: vms-alpha.c:6148
 #, c-format
-msgid "%s: linking 32-bit code with 64-bit code"
-msgstr "%s: länkar 32-bitarskod med 64-bitarskod"
+msgid "STC_BSR_PS (store cond BSR at psect + offset)\n"
+msgstr "STC_BSR_PS (lagra villk. BSR i psect + fÃ¶rskjutning)\n"
 
-#: elfxx-mips.c:9149
+#: vms-alpha.c:6152
 #, c-format
-msgid "%s: linking %s module with previous %s modules"
-msgstr "%s: länkar %s-modul med tidigare %s-moduler"
+msgid "STC_LDA_GBL (store cond LDA at global addr)\n"
+msgstr "STC_LDA_GBL (lagra villk. LDA i global adress)\n"
 
-#: elfxx-mips.c:9172
+#: vms-alpha.c:6156
 #, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
+msgid "STC_LDA_PS (store cond LDA at psect + offset)\n"
+msgstr "STC_LDA_PS (lagra villk. LDA i psect + fÃ¶rskjutning)\n"
 
-#: elfxx-mips.c:9241
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
+#: vms-alpha.c:6160
+#, c-format
+msgid "STC_BOH_GBL (store cond BOH at global addr)\n"
+msgstr "STC_BOH_GBL (lagra villk. BOH i global adress)\n"
 
-#: elfxx-mips.c:9243
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
+#: vms-alpha.c:6164
+#, c-format
+msgid "STC_BOH_PS (store cond BOH at psect + offset)\n"
+msgstr "STC_BOH_PS (lagra villk. BOH i psect + fÃ¶rskjutning)\n"
 
-#: elfxx-mips.c:9245
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
+#: vms-alpha.c:6169
+#, c-format
+msgid "STC_NBH_GBL (store cond or hint at global addr)\n"
+msgstr "STC_NBH_GBL (lagra villk. eller hint i global adress)\n"
 
-#: elfxx-mips.c:9247
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
+#: vms-alpha.c:6173
+#, c-format
+msgid "STC_NBH_PS (store cond or hint at psect + offset)\n"
+msgstr "STC_NBH_PS (lagra villk. eller hint i psect + fÃ¶rskjutning)\n"
 
-#: elfxx-mips.c:9249
-msgid " [abi unknown]"
-msgstr " [okänt abi]"
+#: vms-alpha.c:6177
+#, c-format
+msgid "CTL_SETRB (set relocation base)\n"
+msgstr "CTL_SETRB (ange bas fÃ¶r omlokalisering)\n"
 
-#: elfxx-mips.c:9251
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
+#: vms-alpha.c:6183
+#, c-format
+msgid "CTL_AUGRB (augment relocation base) %u\n"
+msgstr "CTL_AUGRB (Ã¶ka bas fÃ¶r omlokalisering) %u\n"
 
-#: elfxx-mips.c:9253
-msgid " [abi=64]"
-msgstr " [abi=64]"
+#: vms-alpha.c:6187
+#, c-format
+msgid "CTL_DFLOC (define location)\n"
+msgstr "CTL_DFLOC (definiera plats)\n"
 
-#: elfxx-mips.c:9255
-msgid " [no abi set]"
-msgstr " [inget abi inställt]"
+#: vms-alpha.c:6190
+#, c-format
+msgid "CTL_STLOC (set location)\n"
+msgstr "CTL_STLOC (ange plats)\n"
 
-#: elfxx-mips.c:9258
-msgid " [mips1]"
-msgstr " [mips1]"
+#: vms-alpha.c:6193
+#, c-format
+msgid "CTL_STKDL (stack defined location)\n"
+msgstr "CTL_STKDL (stackdefinierad plats)\n"
 
-#: elfxx-mips.c:9260
-msgid " [mips2]"
-msgstr " [mips2]"
+#: vms-alpha.c:6196 vms-alpha.c:6610
+#, c-format
+msgid "*unhandled*\n"
+msgstr "*ohanterad*\n"
 
-#: elfxx-mips.c:9262
-msgid " [mips3]"
-msgstr " [mips3]"
+#: vms-alpha.c:6226 vms-alpha.c:6265
+#, c-format
+msgid "cannot read GST record length\n"
+msgstr "Kan inte lÃ¤sa GST-postens lÃ¤ngd\n"
 
-#: elfxx-mips.c:9264
-msgid " [mips4]"
-msgstr " [mips4]"
+#. Ill-formed.
+#: vms-alpha.c:6247
+#, c-format
+msgid "cannot find EMH in first GST record\n"
+msgstr "Kan inte hitta EMH i fÃ¶rsta GST-posten\n"
 
-#: elfxx-mips.c:9266
-msgid " [mips5]"
-msgstr " [mips5]"
+#: vms-alpha.c:6273
+#, c-format
+msgid "cannot read GST record header\n"
+msgstr "Kan inte lÃ¤sa GST-postens huvud\n"
 
-#: elfxx-mips.c:9268
-msgid " [mips32]"
-msgstr " [mips32]"
+#: vms-alpha.c:6286
+#, c-format
+msgid " corrupted GST\n"
+msgstr " fÃ¶rdÃ¤rvad GST\n"
 
-#: elfxx-mips.c:9270
-msgid " [mips64]"
-msgstr " [mips64]"
+#: vms-alpha.c:6294
+#, c-format
+msgid "cannot read GST record\n"
+msgstr "Kan inte lÃ¤sa GST-post\n"
 
-#: elfxx-mips.c:9272
-msgid " [mips32r2]"
-msgstr " [mips32r2]"
+#: vms-alpha.c:6323
+#, c-format
+msgid " unhandled EOBJ record type %u\n"
+msgstr " ohanterad EOBJ-posttyp %u\n"
 
-#: elfxx-mips.c:9274
-msgid " [unknown ISA]"
-msgstr " [okänd ISA]"
+#: vms-alpha.c:6346
+#, c-format
+msgid "  bitcount: %u, base addr: 0x%08x\n"
+msgstr "  bitantal: %u, basadress: 0x%08x\n"
 
-#: elfxx-mips.c:9277
-msgid " [mdmx]"
-msgstr " [mdmx]"
+#: vms-alpha.c:6359
+#, c-format
+msgid "   bitmap: 0x%08x (count: %u):\n"
+msgstr "   bitmap: 0x%08x (antal: %u):\n"
 
-#: elfxx-mips.c:9280
-msgid " [mips16]"
-msgstr " [mips16]"
+#: vms-alpha.c:6366
+#, c-format
+msgid " %08x"
+msgstr " %08x"
 
-#: elfxx-mips.c:9283
-msgid " [32bitmode]"
-msgstr " [32-bitarsläge]"
+#: vms-alpha.c:6391
+#, c-format
+msgid "  image %u (%u entries)\n"
+msgstr "  avbild %u (%u poster)\n"
 
-#: elfxx-mips.c:9285
-msgid " [not 32bitmode]"
-msgstr " [inte 32-bitarsläge]"
+#: vms-alpha.c:6396
+#, c-format
+msgid "   offset: 0x%08x, val: 0x%08x\n"
+msgstr "   fÃ¶rskjutning: 0x%08x, val: 0x%08x\n"
 
-#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
+#: vms-alpha.c:6417
 #, c-format
-msgid "Output file requires shared library `%s'\n"
-msgstr "Utdatafilen kräver delade biblioteket \"%s\"\n"
+msgid "  image %u (%u entries), offsets:\n"
+msgstr "  avbild %u (%u poster), fÃ¶rskjutningar:\n"
 
-#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
+#: vms-alpha.c:6424
 #, c-format
-msgid "Output file requires shared library `%s.so.%s'\n"
-msgstr "Utdatafilen kräver delade biblioteket \"%s.so.%s\"\n"
+msgid " 0x%08x"
+msgstr " 0x%08x"
 
-#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
-#: sparclinux.c:656 sparclinux.c:706
+#. 64 bits.
+#: vms-alpha.c:6546
 #, c-format
-msgid "Symbol %s not defined for fixups\n"
-msgstr "Symbolen %s är inte definierad för fixar\n"
+msgid "64 bits *unhandled*\n"
+msgstr "64 bitar *ohanterad*\n"
 
-#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
-msgid "Warning: fixup count mismatch\n"
-msgstr "Varning: antalet fixar stämmer inte\n"
+#: vms-alpha.c:6550
+#, c-format
+msgid "class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"
+msgstr "klass: %u, dtype: %u, lÃ¤ngd: %u, pekare: 0x%08x\n"
 
-#: ieee.c:293
+#: vms-alpha.c:6561
 #, c-format
-msgid "%s: string too long (%d chars, max 65535)"
-msgstr "%s: strängen är för lång (%d tecken, max 65535)"
+msgid "non-contiguous array of %s\n"
+msgstr "osammanhÃ¤ngande fÃ¤lt av %s\n"
 
-#: ieee.c:428
+#: vms-alpha.c:6565
 #, c-format
-msgid "%s: unrecognized symbol `%s' flags 0x%x"
-msgstr "%s: okänd symbol \"%s\" flaggor 0x%x"
+msgid "dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"
+msgstr "dimct: %u, aflaggor: 0x%02x, siffror: %u, skala: %u\n"
 
-#: ieee.c:938
+#: vms-alpha.c:6569
 #, c-format
-msgid "%s: unimplemented ATI record %u for symbol %u"
-msgstr "%s: inte implementerad ATI-post %u för symbolen %u"
+msgid "arsize: %u, a0: 0x%08x\n"
+msgstr "arstorlek: %u, a0: 0x%08x\n"
 
-#: ieee.c:963
+#: vms-alpha.c:6573
 #, c-format
-msgid "%s: unexpected ATN type %d in external part"
-msgstr "%s: oväntad ATN-typ %d i extern del"
+msgid "Strides:\n"
+msgstr "Steg:\n"
 
-#: ieee.c:985
+#: vms-alpha.c:6578
 #, c-format
-msgid "%s: unexpected type after ATN"
-msgstr "%s: oväntad typ efter ATN"
+msgid "[%u]: %u\n"
+msgstr "[%u]: %u\n"
 
-#: ihex.c:264
+#: vms-alpha.c:6583
 #, c-format
-msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
-msgstr "%s:%d: oväntat tecken \"%s\" i hexadecimal Intel-fil\n"
+msgid "Bounds:\n"
+msgstr "GrÃ¤nser:\n"
 
-#: ihex.c:372
+#: vms-alpha.c:6588
 #, c-format
-msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr "%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, hittade %u)"
+msgid "[%u]: Lower: %u, upper: %u\n"
+msgstr "[%u]: LÃ¤gre: %u, Ã¶vre: %u\n"
 
-#: ihex.c:426
+#: vms-alpha.c:6600
 #, c-format
-msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr "%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
+msgid "unaligned bit-string of %s\n"
+msgstr "otillrÃ¤ttad bitstrÃ¤ng av %s\n"
 
-#: ihex.c:443
+#: vms-alpha.c:6604
 #, c-format
-msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr "%s:%u: felaktig längd på utökad startadress i hexadecimal Intel-fil"
+msgid "base: %u, pos: %u\n"
+msgstr "bas: %u, pos: %u\n"
 
-#: ihex.c:460
+#: vms-alpha.c:6624
 #, c-format
-msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr "%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-fil"
+msgid "vflags: 0x%02x, value: 0x%08x "
+msgstr "vflaggor: 0x%02x, vÃ¤rde: 0x%08x "
 
-#: ihex.c:477
+#: vms-alpha.c:6630
 #, c-format
-msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr "%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal Intel-fil"
+msgid "(no value)\n"
+msgstr "(inget vÃ¤rde)\n"
 
-#: ihex.c:494
+#: vms-alpha.c:6633
 #, c-format
-msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
-msgstr "%s:%u: okänd ihex-typ %u i hexadecimal Intel-fil\n"
+msgid "(not active)\n"
+msgstr "(inaktiv)\n"
 
-#: ihex.c:619
+#: vms-alpha.c:6636
 #, c-format
-msgid "%s: internal error in ihex_read_section"
-msgstr "%s: internt fel i ihex_read_section"
+msgid "(not allocated)\n"
+msgstr "(ej allokerad)\n"
 
-#: ihex.c:654
+#: vms-alpha.c:6639
 #, c-format
-msgid "%s: bad section length in ihex_read_section"
-msgstr "%s: felaktig sektionslängd i ihex_read_sektion"
+msgid "(descriptor)\n"
+msgstr "(beskrivning)\n"
 
-#: ihex.c:872
+#: vms-alpha.c:6643
 #, c-format
-msgid "%s: address 0x%s out of range for Intel Hex file"
-msgstr "%s: adressen 0x%s är utanför intervallet för hexadecimal Intel-fil"
+msgid "(trailing value)\n"
+msgstr "(efterhÃ¤ngande vÃ¤rde)\n"
 
-#: libbfd.c:861
+#: vms-alpha.c:6646
 #, c-format
-msgid "Deprecated %s called at %s line %d in %s\n"
-msgstr "Föråldrad %s anropad vid %s rad %d i %s\n"
+msgid "(value spec follows)\n"
+msgstr "(vÃ¤rdespec. fÃ¶ljer)\n"
 
-#: libbfd.c:864
+#: vms-alpha.c:6649
 #, c-format
-msgid "Deprecated %s called\n"
-msgstr "Föråldrad %s anropad\n"
+msgid "(at bit offset %u)\n"
+msgstr "(vid bitoffset %u)\n"
 
-#: linker.c:1829
+#: vms-alpha.c:6652
 #, c-format
-msgid "%s: indirect symbol `%s' to `%s' is a loop"
-msgstr "%s: indirekt symbol \"%s\" till \"%s\" är en slinga"
+msgid "(reg: %u, disp: %u, indir: %u, kind: "
+msgstr "(reg: %u, disp: %u, indir: %u, sort: "
 
-#: linker.c:2697
+#: vms-alpha.c:6659
+msgid "literal"
+msgstr "litteral"
+
+#: vms-alpha.c:6662
+msgid "address"
+msgstr "adress"
+
+#: vms-alpha.c:6665
+msgid "desc"
+msgstr "beskr"
+
+#: vms-alpha.c:6668
+msgid "reg"
+msgstr "reg"
+
+#: vms-alpha.c:6743
 #, c-format
-msgid "Attempt to do relocatable link with %s input and %s output"
-msgstr "Försök att göra en omlokaliseringsbar länk med %s-indata och %s-utdata"
+msgid "Debug symbol table:\n"
+msgstr "FelsÃ¶kningssymboltabell:\n"
 
-#: merge.c:896
+#: vms-alpha.c:6754
 #, c-format
-msgid "%s: access beyond end of merged section (%ld + %ld)"
-msgstr "%s: åtkomst bortom slut på sammanslagen sektion (%ld + %ld)"
+msgid "cannot read DST header\n"
+msgstr "Kan inte lÃ¤sa DST-huvud\n"
 
-#: mmo.c:503
+#: vms-alpha.c:6759
 #, c-format
-msgid "%s: No core to allocate section name %s\n"
-msgstr "%s: Ingen kärna för att allokera sektionsnamn %s\n"
+msgid " type: %3u, len: %3u (at 0x%08x): "
+msgstr " typ: %3u, len: %3u (vid 0x%08x): "
 
-#: mmo.c:579
+#: vms-alpha.c:6773
 #, c-format
-msgid "%s: No core to allocate a symbol %d bytes long\n"
-msgstr "%s: Ingen kärna för att allokera en %d byte lång symbol\n"
+msgid "cannot read DST symbol\n"
+msgstr "Kan inte lÃ¤sa DST-symbol\n"
 
-#: mmo.c:1287
+#: vms-alpha.c:6816
 #, c-format
-msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
-msgstr "%s: ogiltig mmo-fil: initieringsvärde för $255 är inte \"Main\"\n"
+msgid "standard data: %s\n"
+msgstr "Standarddata: %s\n"
 
-#: mmo.c:1433
+#: vms-alpha.c:6819 vms-alpha.c:6903
 #, c-format
-msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
-msgstr "%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som börjar med \"%s\"\n"
+msgid "    name: %.*s\n"
+msgstr "    namn: %.*s\n"
 
-#: mmo.c:1674
+#: vms-alpha.c:6826
 #, c-format
-msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
-msgstr "%s: ogiltig mmo-fil: lopkod \"%d\" stöds inte\n"
+msgid "modbeg\n"
+msgstr "modbeg\n"
 
-#: mmo.c:1684
+#: vms-alpha.c:6827
 #, c-format
-msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
-msgstr "%s: ogiltig mmo-fil: förväntade YZ = 1 fick YZ = %d för lop_quote\n"
+msgid "   flags: %d, language: %u, major: %u, minor: %u\n"
+msgstr "   flaggor: %d, sprÃ¥k: %u, stÃ¶rre: %u, mindre: %u\n"
 
-#: mmo.c:1720
+#: vms-alpha.c:6833 vms-alpha.c:7099
 #, c-format
-msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
-msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
+msgid "   module name: %.*s\n"
+msgstr "   modulnamn: %.*s\n"
 
-#: mmo.c:1766
+#: vms-alpha.c:6836
 #, c-format
-msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
+msgid "   compiler   : %.*s\n"
+msgstr "   kompilator  : %.*s\n"
 
-#: mmo.c:1805
+#: vms-alpha.c:6841
 #, c-format
-msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
-msgstr "%s: ogiltig mmo-fil: förväntade y = 0, fick y = %d för lop_fixrx\n"
+msgid "modend\n"
+msgstr "modend\n"
 
-#: mmo.c:1814
+#: vms-alpha.c:6848
+msgid "rtnbeg\n"
+msgstr "rtnbeg\n"
+
+#: vms-alpha.c:6849
 #, c-format
-msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
-msgstr "%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för lop_fixr\n"
+msgid "    flags: %u, address: 0x%08x, pd-address: 0x%08x\n"
+msgstr "    flaggor: %u, adress: 0x%08x, pd-adress: 0x%08x\n"
 
-#: mmo.c:1837
+#: vms-alpha.c:6854
 #, c-format
-msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
-msgstr "%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %d för lop_fixrx\n"
+msgid "    routine name: %.*s\n"
+msgstr "    rutinnamn: %.*s\n"
 
-#: mmo.c:1860
+#: vms-alpha.c:6862
 #, c-format
-msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
-msgstr "%s: kan inte allokera filnamn för fil nummer %d, %d byte\n"
+msgid "rtnend: size 0x%08x\n"
+msgstr "rtnend: storlek 0x%08x\n"
+
+#: vms-alpha.c:6870
+#, c-format
+msgid "prolog: bkpt address 0x%08x\n"
+msgstr "prolog: bkpt-adress 0x%08x\n"
+
+#: vms-alpha.c:6878
+#, c-format
+msgid "epilog: flags: %u, count: %u\n"
+msgstr "epilog: flaggor: %u, antal: %u\n"
+
+#: vms-alpha.c:6887
+#, c-format
+msgid "blkbeg: address: 0x%08x, name: %.*s\n"
+msgstr "blkbeg: adress: 0x%08x, namn: %.*s\n"
+
+#: vms-alpha.c:6896
+#, c-format
+msgid "blkend: size: 0x%08x\n"
+msgstr "blkend: storlek: 0x%08x\n"
+
+#: vms-alpha.c:6902
+#, c-format
+msgid "typspec (len: %u)\n"
+msgstr "typspec (len: %u)\n"
+
+#: vms-alpha.c:6909
+#, c-format
+msgid "septyp, name: %.*s\n"
+msgstr "septyp, namn: %.*s\n"
+
+#: vms-alpha.c:6918
+#, c-format
+msgid "recbeg: name: %.*s\n"
+msgstr "recbeg: namn: %.*s\n"
+
+#: vms-alpha.c:6925
+#, c-format
+msgid "recend\n"
+msgstr "recend\n"
+
+#: vms-alpha.c:6928
+#, c-format
+msgid "enumbeg, len: %u, name: %.*s\n"
+msgstr "enumbeg, len: %u, namn: %.*s\n"
+
+#: vms-alpha.c:6932
+#, c-format
+msgid "enumelt, name: %.*s\n"
+msgstr "enumelt, namn: %.*s\n"
+
+#: vms-alpha.c:6936
+#, c-format
+msgid "enumend\n"
+msgstr "enumend\n"
+
+#: vms-alpha.c:6953
+#, c-format
+msgid "discontiguous range (nbr: %u)\n"
+msgstr "osammanhÃ¤ngande intervall (nbr: %u)\n"
+
+#: vms-alpha.c:6955
+#, c-format
+msgid "    address: 0x%08x, size: %u\n"
+msgstr "    adress: 0x%08x, storlek: %u\n"
+
+#: vms-alpha.c:6965
+#, c-format
+msgid "line num  (len: %u)\n"
+msgstr "radnum  (len: %u)\n"
+
+#: vms-alpha.c:6982
+#, c-format
+msgid "delta_pc_w %u\n"
+msgstr "delta_pc_w %u\n"
+
+#: vms-alpha.c:6989
+#, c-format
+msgid "incr_linum(b): +%u\n"
+msgstr "incr_linum(b): +%u\n"
+
+#: vms-alpha.c:6995
+#, c-format
+msgid "incr_linum_w: +%u\n"
+msgstr "incr_linum_w: +%u\n"
+
+#: vms-alpha.c:7001
+#, c-format
+msgid "incr_linum_l: +%u\n"
+msgstr "incr_linum_l: +%u\n"
+
+#: vms-alpha.c:7007
+#, c-format
+msgid "set_line_num(w) %u\n"
+msgstr "set_line_num(w) %u\n"
+
+#: vms-alpha.c:7012
+#, c-format
+msgid "set_line_num_b %u\n"
+msgstr "set_line_num_b %u\n"
+
+#: vms-alpha.c:7017
+#, c-format
+msgid "set_line_num_l %u\n"
+msgstr "set_line_num_l %u\n"
+
+#: vms-alpha.c:7022
+#, c-format
+msgid "set_abs_pc: 0x%08x\n"
+msgstr "set_abs_pc: 0x%08x\n"
+
+#: vms-alpha.c:7026
+#, c-format
+msgid "delta_pc_l: +0x%08x\n"
+msgstr "delta_pc_l: +0x%08x\n"
 
-#: mmo.c:1880
+#: vms-alpha.c:7031
 #, c-format
-msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr "%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
+msgid "term(b): 0x%02x"
+msgstr "term(b): 0x%02x"
 
-#: mmo.c:1893
+#: vms-alpha.c:7033
 #, c-format
-msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
-msgstr "%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
+msgid "        pc: 0x%08x\n"
+msgstr "        pc: 0x%08x\n"
 
-#: mmo.c:1999
+#: vms-alpha.c:7038
 #, c-format
-msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
-msgstr "%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
+msgid "term_w: 0x%04x"
+msgstr "term_w: 0x%04x"
 
-#: mmo.c:2035
+#: vms-alpha.c:7040
 #, c-format
-msgid "%s: invalid mmo file: lop_end not last item in file\n"
-msgstr "%s: ogiltig mmo-fil: lop_end är inte sista objektet i fil\n"
+msgid "    pc: 0x%08x\n"
+msgstr "    pc: 0x%08x\n"
 
-#: mmo.c:2048
+#: vms-alpha.c:7046
 #, c-format
-msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
-msgstr "%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till den föregående lop_stab (%ld)\n"
+msgid "delta pc +%-4d"
+msgstr "delta pc +%-4d"
 
-#: mmo.c:2698
+#: vms-alpha.c:7049
 #, c-format
-msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
-msgstr "%s: ogiltig symboltabell: dublettsymbol \"%s\"\n"
+msgid "    pc: 0x%08x line: %5u\n"
+msgstr "    pc: 0x%08x rad: %5u\n"
 
-#: mmo.c:2949
+#: vms-alpha.c:7054
 #, c-format
-msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
-msgstr "%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för startadressen %s\n"
+msgid "    *unhandled* cmd %u\n"
+msgstr "    *ohanterat* kmd %u\n"
 
-#: mmo.c:3039
+#: vms-alpha.c:7069
 #, c-format
-msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
-msgstr "%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars ord: %d. Endast \"Main\" kommer att skickas.\n"
+msgid "source (len: %u)\n"
+msgstr "kÃ¤lla (len: %u)\n"
 
-#: mmo.c:3084
+#: vms-alpha.c:7083
 #, c-format
-msgid "%s: internal error, symbol table changed size from %d to %d words\n"
-msgstr "%s: internt fel, symboltabellen ändrade storlek från %d till %d ord\n"
+msgid "   declfile: len: %u, flags: %u, fileid: %u\n"
+msgstr "   dklfil: len: %u, flaggor: %u, fil-ID: %u\n"
 
-#: mmo.c:3139
+#: vms-alpha.c:7087
 #, c-format
-msgid "%s: internal error, internal register section %s had contents\n"
-msgstr "%s: internt fel, interna registersektionen %s hade innehåll\n"
+msgid "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
+msgstr "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
 
-#: mmo.c:3191
+#: vms-alpha.c:7096
 #, c-format
-msgid "%s: no initialized registers; section length 0\n"
-msgstr "%s: inga initierade register; sektionslängd 0\n"
+msgid "   filename   : %.*s\n"
+msgstr "   filnamn   : %.*s\n"
 
-#: mmo.c:3197
+#: vms-alpha.c:7105
 #, c-format
-msgid "%s: too many initialized registers; section length %ld\n"
-msgstr "%s: för många initierade register; sektionslängd %ld\n"
+msgid "   setfile %u\n"
+msgstr "   setfile %u\n"
 
-#: mmo.c:3202
+#: vms-alpha.c:7110 vms-alpha.c:7115
 #, c-format
-msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
-msgstr "%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
+msgid "   setrec %u\n"
+msgstr "   setrec %u\n"
 
-#: oasys.c:1052
+#: vms-alpha.c:7120 vms-alpha.c:7125
 #, c-format
-msgid "%s: can not represent section `%s' in oasys"
-msgstr "%s: kan inte representera sektionen \"%s\" i oasys"
+msgid "   setlnum %u\n"
+msgstr "   setlnum %u\n"
 
-#: osf-core.c:137
+#: vms-alpha.c:7130 vms-alpha.c:7135
 #, c-format
-msgid "Unhandled OSF/1 core file section type %d\n"
-msgstr "Ohanterad sektionstyp %d för OSF/1-minnesfil\n"
+msgid "   deflines %u\n"
+msgstr "   deflines %u\n"
 
-#: pe-mips.c:659
+#: vms-alpha.c:7139
 #, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
-msgstr "%s: \"ld -r\" stöds inte med PE MIPS-objekt\n"
+msgid "   formfeed\n"
+msgstr "   formfeed\n"
 
-#. OK, at this point the following variables are set up:
-#. src = VMA of the memory we're fixing up
-#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:795
+#: vms-alpha.c:7143
 #, c-format
-msgid "%s: unimplemented %s\n"
-msgstr "%s: oimplementerat %s\n"
+msgid "   *unhandled* cmd %u\n"
+msgstr "   *ohanterat* kmd %u\n"
 
-#: pe-mips.c:821
+#: vms-alpha.c:7155
 #, c-format
-msgid "%s: jump too far away\n"
-msgstr "%s: hopp för långt bort\n"
+msgid "*unhandled* dst type %u\n"
+msgstr "*ohanterad* dst-typ %u\n"
 
-#: pe-mips.c:848
+#: vms-alpha.c:7187
 #, c-format
-msgid "%s: bad pair/reflo after refhi\n"
-msgstr "%s: felaktigt par/reflo efter refhi\n"
+msgid "cannot read EIHD\n"
+msgstr "Kan inte lÃ¤sa EIHD\n"
 
-#. XXX code yet to be written.
-#: peicode.h:787
+#: vms-alpha.c:7190
 #, c-format
-msgid "%s: Unhandled import type; %x"
-msgstr "%s: Ohanterad importtyp; %x"
+msgid "EIHD: (size: %u, nbr blocks: %u)\n"
+msgstr "EIHD: (storlek: %u, nbr-block: %u)\n"
 
-#: peicode.h:792
+#: vms-alpha.c:7193
 #, c-format
-msgid "%s: Unrecognised import type; %x"
-msgstr "%s: Okänd importtyp; %x"
+msgid " majorid: %u, minorid: %u\n"
+msgstr " majorid: %u, minorid: %u\n"
+
+#: vms-alpha.c:7201
+msgid "executable"
+msgstr "kÃ¶rbar fil"
 
-#: peicode.h:806
+#: vms-alpha.c:7204
+msgid "linkable image"
+msgstr "lÃ¤nkningsbar avbild"
+
+#: vms-alpha.c:7210
 #, c-format
-msgid "%s: Unrecognised import name type; %x"
-msgstr "%s: Okänd importnamnstyp; %x"
+msgid " image type: %u (%s)"
+msgstr " avbildtyp: %u (%s)"
+
+#: vms-alpha.c:7216
+msgid "native"
+msgstr "nativ"
 
-#: peicode.h:1164
+#: vms-alpha.c:7219
+msgid "CLI"
+msgstr "CLI"
+
+#: vms-alpha.c:7225
 #, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
-msgstr "%s: Okänd maskintyp (0x%x) i Import Library Format-arkiv"
+msgid ", subtype: %u (%s)\n"
+msgstr ", deltyp: %u (%s)\n"
 
-#: peicode.h:1176
+#: vms-alpha.c:7231
 #, c-format
-msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
-msgstr "%s: Känd men ohanterad maskintyp (0x%x) i Import Library Format-arkiv"
+msgid " offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u\n"
+msgstr " fÃ¶rskjutningar: isd: %u, aktiv: %u, symdbg: %u, imgid: %u, patch: %u\n"
 
-#: peicode.h:1193
+#: vms-alpha.c:7235
 #, c-format
-msgid "%s: size field is zero in Import Library Format header"
-msgstr "%s: storleksfältet är noll i Import Library Format-huvud"
+msgid " fixup info rva: "
+msgstr " fixup info rva: "
 
-#: peicode.h:1224
+#: vms-alpha.c:7237
 #, c-format
-msgid "%s: string not null terminated in ILF object file."
-msgstr "%s: sträng inte nollterminerad i ILF-objektfil."
+msgid ", symbol vector rva: "
+msgstr ", symbolvektor rva: "
 
-#: ppcboot.c:416
+#: vms-alpha.c:7240
+#, c-format
 msgid ""
 "\n"
-"ppcboot header:\n"
+" version array off: %u\n"
 msgstr ""
 "\n"
-"ppcboot-huvud:\n"
+" versionsfÃ¤lt av: %u\n"
 
-#: ppcboot.c:417
+#: vms-alpha.c:7244
 #, c-format
-msgid "Entry offset        = 0x%.8lx (%ld)\n"
-msgstr "Startavstånd        = 0x%.8lx (%ld)\n"
+msgid " img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"
+msgstr " img I/O-antal: %u, nbr-kanaler: %u, req pri: %08x%08x\n"
 
-#: ppcboot.c:418
+#: vms-alpha.c:7250
 #, c-format
-msgid "Length              = 0x%.8lx (%ld)\n"
-msgstr "Längd               = 0x%.8lx (%ld)\n"
+msgid " linker flags: %08x:"
+msgstr " lÃ¤nkarflaggor: %08x:"
 
-#: ppcboot.c:421
+#: vms-alpha.c:7280
 #, c-format
-msgid "Flag field          = 0x%.2x\n"
-msgstr "Flaggfält           = 0x%.2x\n"
+msgid " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
+msgstr " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
 
-#: ppcboot.c:427
+#: vms-alpha.c:7286
 #, c-format
-msgid "Partition name      = \"%s\"\n"
-msgstr "Partitionsnamn      = \"%s\"\n"
+msgid " BPAGE: %u"
+msgstr " BPAGE: %u"
 
-#: ppcboot.c:446
+#: vms-alpha.c:7292
 #, c-format
-msgid ""
-"\n"
-"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
-msgstr ""
-"\n"
-"Start på partition[%d]  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgid ", ext fixup offset: %u, no_opt psect off: %u"
+msgstr ", ext fixup fÃ¶rskjutning: %u, no_opt psect off: %u"
 
-#: ppcboot.c:452
+#: vms-alpha.c:7295
 #, c-format
-msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
-msgstr "Slut på partition[%d]    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgid ", alias: %u\n"
+msgstr ", alias: %u\n"
 
-#: ppcboot.c:458
+#: vms-alpha.c:7303
 #, c-format
-msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
-msgstr "Sektor för partition[%d] = 0x%.8lx (%ld)\n"
+msgid "system version array information:\n"
+msgstr "fÃ¤ltinformation om systemversion:\n"
 
-#: ppcboot.c:459
+#: vms-alpha.c:7307
 #, c-format
-msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
-msgstr "Längd på partition[%d] = 0x%.8lx (%ld)\n"
+msgid "cannot read EIHVN header\n"
+msgstr "Kan inte lÃ¤sa EIHVN-huvud\n"
 
-#: som.c:5422
-msgid "som_sizeof_headers unimplemented"
-msgstr "som_sizeof_headers är inte implementerat"
+#: vms-alpha.c:7317
+#, c-format
+msgid "cannot read EIHVN version\n"
+msgstr "Kan inte lÃ¤sa EIHVN-version\n"
 
-#: srec.c:302
+#: vms-alpha.c:7320
 #, c-format
-msgid "%s:%d: Unexpected character `%s' in S-record file\n"
-msgstr "%s:%d: Oväntat tecken \"%s\" i S-postfil\n"
+msgid "   %02u "
+msgstr "   %02u "
+
+#: vms-alpha.c:7324
+msgid "BASE_IMAGE       "
+msgstr "BASE_IMAGE       "
+
+#: vms-alpha.c:7327
+msgid "MEMORY_MANAGEMENT"
+msgstr "MEMORY_MANAGEMENT"
+
+#: vms-alpha.c:7330
+msgid "IO               "
+msgstr "IO               "
+
+#: vms-alpha.c:7333
+msgid "FILES_VOLUMES    "
+msgstr "FILES_VOLUMES    "
+
+#: vms-alpha.c:7336
+msgid "PROCESS_SCHED    "
+msgstr "PROCESS_SCHED    "
+
+#: vms-alpha.c:7339
+msgid "SYSGEN           "
+msgstr "SYSGEN           "
 
-# Vad är stabs?
-#: stabs.c:319
+#: vms-alpha.c:7342
+msgid "CLUSTERS_LOCKMGR "
+msgstr "CLUSTERS_LOCKMGR "
+
+#: vms-alpha.c:7345
+msgid "LOGICAL_NAMES    "
+msgstr "LOGICAL_NAMES    "
+
+#: vms-alpha.c:7348
+msgid "SECURITY         "
+msgstr "SECURITY         "
+
+#: vms-alpha.c:7351
+msgid "IMAGE_ACTIVATOR  "
+msgstr "IMAGE_ACTIVATOR  "
+
+#: vms-alpha.c:7354
+msgid "NETWORKS         "
+msgstr "NETWORKS         "
+
+#: vms-alpha.c:7357
+msgid "COUNTERS         "
+msgstr "COUNTERS         "
+
+#: vms-alpha.c:7360
+msgid "STABLE           "
+msgstr "STABLE           "
+
+#: vms-alpha.c:7363
+msgid "MISC             "
+msgstr "MISC             "
+
+#: vms-alpha.c:7366
+msgid "CPU              "
+msgstr "CPU              "
+
+#: vms-alpha.c:7369
+msgid "VOLATILE         "
+msgstr "VOLATILE         "
+
+#: vms-alpha.c:7372
+msgid "SHELL            "
+msgstr "SHELL            "
+
+#: vms-alpha.c:7375
+msgid "POSIX            "
+msgstr "POSIX            "
+
+#: vms-alpha.c:7378
+msgid "MULTI_PROCESSING "
+msgstr "MULTI_PROCESSING "
+
+#: vms-alpha.c:7381
+msgid "GALAXY           "
+msgstr "GALAXY           "
+
+#: vms-alpha.c:7384
+msgid "*unknown*        "
+msgstr "*unknown*        "
+
+#: vms-alpha.c:7387
 #, c-format
-msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
-msgstr "%s(%s+0x%lx): Stabbpost har ogiltigt strängindex."
+msgid ": %u.%u\n"
+msgstr ": %u.%u\n"
 
-#: syms.c:1019
-msgid "Unsupported .stab relocation"
-msgstr ".stab-omlokalisering som inte stöds"
+#: vms-alpha.c:7400 vms-alpha.c:7659
+#, c-format
+msgid "cannot read EIHA\n"
+msgstr "Kan inte lÃ¤sa EIHA\n"
 
-#: vms-gsd.c:356
+#: vms-alpha.c:7403
 #, c-format
-msgid "bfd_make_section (%s) failed"
-msgstr "bfd_make_section (%s) misslyckades"
+msgid "Image activation:  (size=%u)\n"
+msgstr "Avbildsaktivering:  (storlek=%u)\n"
 
-#: vms-gsd.c:371
+#: vms-alpha.c:7405
 #, c-format
-msgid "bfd_set_section_flags (%s, %x) failed"
-msgstr "bfd_set_section_flags (%s, %x) misslyckades"
+msgid " First address : 0x%08x 0x%08x\n"
+msgstr " FÃ¶rsta adress : 0x%08x 0x%08x\n"
 
-#: vms-gsd.c:407
+#: vms-alpha.c:7408
 #, c-format
-msgid "Size mismatch section %s=%lx, %s=%lx"
-msgstr "Storleken passar inte på sektion %s=%lx, %s=%lx"
+msgid " Second address: 0x%08x 0x%08x\n"
+msgstr " Andra adress : 0x%08x 0x%08x\n"
 
-#: vms-gsd.c:704
+#: vms-alpha.c:7411
 #, c-format
-msgid "unknown gsd/egsd subtype %d"
-msgstr "okänd gsd/egsd-undertyp %d"
+msgid " Third address : 0x%08x 0x%08x\n"
+msgstr " Tredje adress : 0x%08x 0x%08x\n"
 
-#: vms-hdr.c:408
-msgid "Object module NOT error-free !\n"
-msgstr "Objektmodulen INTE felfri!\n"
+#: vms-alpha.c:7414
+#, c-format
+msgid " Fourth address: 0x%08x 0x%08x\n"
+msgstr " FjÃ¤rde adress : 0x%08x 0x%08x\n"
 
-#: vms-misc.c:541
+#: vms-alpha.c:7417
 #, c-format
-msgid "Stack overflow (%d) in _bfd_vms_push"
-msgstr "Stacken ger överspill (%d) i _bfd_vms_push"
+msgid " Shared image  : 0x%08x 0x%08x\n"
+msgstr " Delad avbild  : 0x%08x 0x%08x\n"
 
-#: vms-misc.c:559
-msgid "Stack underflow in _bfd_vms_pop"
-msgstr "Stacken ger underspill i _bfd_vms_pop"
+#: vms-alpha.c:7428
+#, c-format
+msgid "cannot read EIHI\n"
+msgstr "Kan inte lÃ¤sa EIHI\n"
 
-#: vms-misc.c:918
-msgid "_bfd_vms_output_counted called with zero bytes"
-msgstr "_bfd_vms_output_counted anropad med noll byte"
+#: vms-alpha.c:7431
+#, c-format
+msgid "Image identification: (major: %u, minor: %u)\n"
+msgstr "Avbildsidentifiering: (major: %u, minor: %u)\n"
 
-#: vms-misc.c:923
-msgid "_bfd_vms_output_counted called with too many bytes"
-msgstr "_bfd_vms_output_counted called anropad med för många byte"
+#: vms-alpha.c:7434
+#, c-format
+msgid " image name       : %.*s\n"
+msgstr " avbildens namn      : %.*s\n"
 
-#: vms-misc.c:1054
+#: vms-alpha.c:7436
 #, c-format
-msgid "Symbol %s replaced by %s\n"
-msgstr "Symbolen %s ersatt med %s\n"
+msgid " link time        : %s\n"
+msgstr " lÃ¤nkningstid        : %s\n"
 
-#: vms-misc.c:1117
+#: vms-alpha.c:7438
 #, c-format
-msgid "failed to enter %s"
-msgstr "misslyckades med att gå in i %s"
+msgid " image ident      : %.*s\n"
+msgstr " avbildsident       : %.*s\n"
 
-#: vms-tir.c:102
-msgid "No Mem !"
-msgstr "Inget minne!"
+#: vms-alpha.c:7440
+#, c-format
+msgid " linker ident     : %.*s\n"
+msgstr " lÃ¤nkarident     : %.*s\n"
 
-#: vms-tir.c:383
+#: vms-alpha.c:7442
 #, c-format
-msgid "bad section index in %s"
-msgstr "felaktigt sektionsindex i %s"
+msgid " image build ident: %.*s\n"
+msgstr " avbildsbyggident: %.*s\n"
 
-#: vms-tir.c:396
+#: vms-alpha.c:7452
 #, c-format
-msgid "unsupported STA cmd %s"
-msgstr "STA-kommando %s stöds inte"
+msgid "cannot read EIHS\n"
+msgstr "Kan inte lÃ¤sa EIHS\n"
 
-#: vms-tir.c:401 vms-tir.c:1261
+#: vms-alpha.c:7455
 #, c-format
-msgid "reserved STA cmd %d"
-msgstr "reserverat STA-kommando %d"
+msgid "Image symbol & debug table: (major: %u, minor: %u)\n"
+msgstr "Avbildens symbol & felsÃ¶ktabell: (major: %u, minor: %u)\n"
 
-#: vms-tir.c:512 vms-tir.c:535
+#: vms-alpha.c:7460
 #, c-format
-msgid "%s: no symbol \"%s\""
-msgstr "%s: ingen symbol \"%s\""
+msgid " debug symbol table : vbn: %u, size: %u (0x%x)\n"
+msgstr " FelsÃ¶kningssymboltabell: vbn: %u, storlek: %u (0x%x)\n"
 
-#. unsigned shift
-#. rotate
-#. Redefine symbol to current location.
-#. Define a literal.
-#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
-#: vms-tir.c:859 vms-tir.c:1584
+#: vms-alpha.c:7464
 #, c-format
-msgid "%s: not supported"
-msgstr "%s: stöds inte"
+msgid " global symbol table: vbn: %u, records: %u\n"
+msgstr " Global symboltabell: vbn: %u, poster: %u\n"
 
-#: vms-tir.c:607 vms-tir.c:1439
+#: vms-alpha.c:7468
 #, c-format
-msgid "%s: not implemented"
-msgstr "%s: inte implementerad"
+msgid " debug module table : vbn: %u, size: %u\n"
+msgstr " FelsÃ¶kningsmodultabell: vbn: %u, storlek: %u\n"
+
+#: vms-alpha.c:7481
+#, c-format
+msgid "cannot read EISD\n"
+msgstr "Kan inte lÃ¤sa EISD\n"
 
-#: vms-tir.c:611 vms-tir.c:1443
+#: vms-alpha.c:7491
 #, c-format
-msgid "reserved STO cmd %d"
-msgstr "reserverat STO-kommando %d"
+msgid "Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)\n"
+msgstr "Avbildens sektionsbeskrivning: (major: %u, minor: %u, storlek: %u, fÃ¶rskjutning: %u)\n"
 
-#: vms-tir.c:729 vms-tir.c:1589
+#: vms-alpha.c:7498
 #, c-format
-msgid "reserved OPR cmd %d"
-msgstr "reserverat OPR-kommando %d"
+msgid " section: base: 0x%08x%08x size: 0x%08x\n"
+msgstr " sektion: bas: 0x%08x%08x storlek: 0x%08x\n"
 
-#: vms-tir.c:797 vms-tir.c:1653
+#: vms-alpha.c:7503
 #, c-format
-msgid "reserved CTL cmd %d"
-msgstr "reserverat CTL-kommando %d"
+msgid " flags: 0x%04x"
+msgstr " flaggor: 0x%04x"
 
-#. stack byte from image
-#. arg: none.
-#: vms-tir.c:1169
-msgid "stack-from-image not implemented"
-msgstr "stack-from-image är inte implementerat"
+#: vms-alpha.c:7540
+#, c-format
+msgid " vbn: %u, pfc: %u, matchctl: %u type: %u ("
+msgstr " vbn: %u, pfc: %u, matchctl: %u type: %u ("
 
-#: vms-tir.c:1187
-msgid "stack-entry-mask not fully implemented"
-msgstr "stack-entry-mask är inte helt implementerat"
+#: vms-alpha.c:7546
+msgid "NORMAL"
+msgstr "NORMAL"
 
-#. compare procedure argument
-#. arg: cs	symbol name
-#. by	argument index
-#. da	argument descriptor
-#.
-#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
-#. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1201
-msgid "PASSMECH not fully implemented"
-msgstr "PASSMECH är inte helt implementerat"
+#: vms-alpha.c:7549
+msgid "SHRFXD"
+msgstr "SHRFXD"
+
+#: vms-alpha.c:7552
+msgid "PRVFXD"
+msgstr "PRVFXD"
+
+#: vms-alpha.c:7555
+msgid "SHRPIC"
+msgstr "SHRPIC"
 
-#: vms-tir.c:1220
-msgid "stack-local-symbol not fully implemented"
-msgstr "stack-local-symbol är inte helt implementerat"
+#: vms-alpha.c:7558
+msgid "PRVPIC"
+msgstr "PRVPIC"
 
-#: vms-tir.c:1233
-msgid "stack-literal not fully implemented"
-msgstr "stack-literal är inte helt implementerat"
+#: vms-alpha.c:7561
+msgid "USRSTACK"
+msgstr "USRSTACK"
 
-#: vms-tir.c:1254
-msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "stack-local-symbol-entry-point-mask är inte helt implementerat"
+#: vms-alpha.c:7567
+msgid ")\n"
+msgstr ")\n"
 
-#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
-#: vms-tir.c:1640 vms-tir.c:1648
+#: vms-alpha.c:7569
 #, c-format
-msgid "%s: not fully implemented"
-msgstr "%s: inte helt implementerat"
+msgid " ident: 0x%08x, name: %.*s\n"
+msgstr " ident: 0x%08x, namn: %.*s\n"
 
-#: vms-tir.c:1705
+#: vms-alpha.c:7579
 #, c-format
-msgid "obj code %d not found"
-msgstr "objektkod %d kunde inte hittas"
+msgid "cannot read DMT\n"
+msgstr "Kan inte lÃ¤sa DMT\n"
 
-#: vms-tir.c:2043
+#: vms-alpha.c:7583
 #, c-format
-msgid "SEC_RELOC with no relocs in section %s"
-msgstr "SEC_RELOC utan omlokaliseringar i sektion %s"
+msgid "Debug module table:\n"
+msgstr "FelsÃ¶kningsmodultabell:\n"
 
-#: vms-tir.c:2331
+#: vms-alpha.c:7592
 #, c-format
-msgid "Unhandled relocation %s"
-msgstr "Ohanterad omlokalisering %s"
+msgid "cannot read DMT header\n"
+msgstr "Kan inte lÃ¤sa DMT-huvud\n"
 
-#: xcofflink.c:1244
+#: vms-alpha.c:7597
 #, c-format
-msgid "%s: `%s' has line numbers but no enclosing section"
-msgstr "%s: \"%s\" har radnummer men ingen inneslutande sektion"
+msgid " module offset: 0x%08x, size: 0x%08x, (%u psects)\n"
+msgstr " moduloffset: 0x%08x, storlek: 0x%08x, (%u psects)\n"
 
-#: xcofflink.c:1297
+#: vms-alpha.c:7607
 #, c-format
-msgid "%s: class %d symbol `%s' has no aux entries"
-msgstr "%s: klass %d-symbolen \"%s\" har inga yttre poster"
+msgid "cannot read DMT psect\n"
+msgstr "Kan inte lÃ¤sa DMT-psect\n"
 
-#: xcofflink.c:1320
+#: vms-alpha.c:7610
 #, c-format
-msgid "%s: symbol `%s' has unrecognized csect type %d"
-msgstr "%s: symbolen \"%s\" har okänd csect-typ %d"
+msgid "  psect start: 0x%08x, length: %u\n"
+msgstr "  psect start: 0x%08x, lÃ¤ngd: %u\n"
 
-#: xcofflink.c:1332
+#: vms-alpha.c:7623
 #, c-format
-msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
-msgstr "%s: felaktig XTY_ER-symbol \"%s\": klass %d scnum %d scnlen %d"
+msgid "cannot read DST\n"
+msgstr "kan inte lÃ¤sa DST\n"
 
-#: xcofflink.c:1368
+#: vms-alpha.c:7633
 #, c-format
-msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
-msgstr "%s: XMC_TC0-symbolen \"%s\" är klass %d scnlen %d"
+msgid "cannot read GST\n"
+msgstr "Kan inte lÃ¤sa GST\n"
 
-#: xcofflink.c:1520
+#: vms-alpha.c:7637
 #, c-format
-msgid "%s: csect `%s' not in enclosing section"
-msgstr "%s: csect \"%s\" är inte i inneslutande sektion"
+msgid "Global symbol table:\n"
+msgstr "Global symboltabell:\n"
 
-#: xcofflink.c:1627
+#: vms-alpha.c:7665
 #, c-format
-msgid "%s: misplaced XTY_LD `%s'"
-msgstr "%s: felaktigt placerat XTY_LD \"%s\""
+msgid "Image activator fixup: (major: %u, minor: %u)\n"
+msgstr "Avbildsaktiverarfixup: (major: %u, minor: %u)\n"
 
-#: xcofflink.c:1958
+#: vms-alpha.c:7668
 #, c-format
-msgid "%s: reloc %s:%d not in csect"
-msgstr "%s: omlokaliseringen %s:%d är inte i csect"
+msgid "  iaflink : 0x%08x %08x\n"
+msgstr "  iaflÃ¤nk : 0x%08x %08x\n"
 
-#: xcofflink.c:2095
+#: vms-alpha.c:7671
 #, c-format
-msgid "%s: XCOFF shared object when not producing XCOFF output"
-msgstr "%s: XCOFF delade objekt när inte XCOFF-utdata produceras"
+msgid "  fixuplnk: 0x%08x %08x\n"
+msgstr "  fixuplnk: 0x%08x %08x\n"
 
-#: xcofflink.c:2116
+#: vms-alpha.c:7674
 #, c-format
-msgid "%s: dynamic object with no .loader section"
-msgstr "%s: dynamiskt objekt utan någon .loader-sektion"
+msgid "  size : %u\n"
+msgstr "  storlek : %u\n"
 
-#: xcofflink.c:2761
+#: vms-alpha.c:7676
 #, c-format
-msgid "%s: no such symbol"
-msgstr "%s: ingen sådan symbol"
+msgid "  flags: 0x%08x\n"
+msgstr "  flaggor: 0x%08x\n"
 
-#: xcofflink.c:2894
-msgid "error: undefined symbol __rtinit"
-msgstr "fel: odefinierad symbol __rtinit"
+#: vms-alpha.c:7680
+#, c-format
+msgid "  qrelfixoff: %5u, lrelfixoff: %5u\n"
+msgstr "  qrelfixoff: %5u, lrelfixoff: %5u\n"
 
-#: xcofflink.c:3455
+#: vms-alpha.c:7684
 #, c-format
-msgid "warning: attempt to export undefined symbol `%s'"
-msgstr "varning: försök att exportera odefinierade symbolen \"%s\""
+msgid "  qdotadroff: %5u, ldotadroff: %5u\n"
+msgstr "  qdotadroff: %5u, ldotadroff: %5u\n"
 
-#: xcofflink.c:4448
+#: vms-alpha.c:7688
 #, c-format
-msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr "TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
+msgid "  codeadroff: %5u, lpfixoff  : %5u\n"
+msgstr "  codeadroff: %5u, lpfixoff  : %5u\n"
 
-#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
+#: vms-alpha.c:7691
 #, c-format
-msgid "%s: loader reloc in unrecognized section `%s'"
-msgstr "%s: inläsaromlokalisering i okända sektionen \"%s\""
+msgid "  chgprtoff : %5u\n"
+msgstr "  chgprtoff : %5u\n"
 
-#: xcofflink.c:5310 xcofflink.c:6130
+#: vms-alpha.c:7694
 #, c-format
-msgid "%s: `%s' in loader reloc but not loader sym"
-msgstr "%s: \"%s\" i inläsaromlokalisering men inte inläsarsym"
+msgid "  shlstoff  : %5u, shrimgcnt : %5u\n"
+msgstr "  shlstoff  : %5u, shrimgcnt : %5u\n"
 
-#: xcofflink.c:5325
+#: vms-alpha.c:7696
 #, c-format
-msgid "%s: loader reloc in read-only section %s"
-msgstr "%s: inläsaromlokalisering i skrivskyddade sektionen %s"
+msgid "  shlextra  : %5u, permctx   : %5u\n"
+msgstr "  shlextra  : %5u, permctx   : %5u\n"
 
-#: elf32-ia64.c:2392 elf64-ia64.c:2392
-msgid "@pltoff reloc against local symbol"
-msgstr "@pltoff-omlokalisering mot lokal symbol"
+#: vms-alpha.c:7699
+#, c-format
+msgid "  base_va : 0x%08x\n"
+msgstr "  base_va : 0x%08x\n"
 
-#: elf32-ia64.c:3804 elf64-ia64.c:3804
+#: vms-alpha.c:7701
 #, c-format
-msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
-msgstr "%s: kort datasegment spillde över (0x%lx >= 0x400000)"
+msgid "  lppsbfixoff: %5u\n"
+msgstr "  lppsbfixoff: %5u\n"
 
-#: elf32-ia64.c:3815 elf64-ia64.c:3815
+#: vms-alpha.c:7709
 #, c-format
-msgid "%s: __gp does not cover short data segment"
-msgstr "%s: __gp täcker inte kort datasegment"
+msgid " Shareable images:\n"
+msgstr " Avbilder som kan delas:\n"
 
-#: elf32-ia64.c:4131 elf64-ia64.c:4131
+#: vms-alpha.c:7713
 #, c-format
-msgid "%s: linking non-pic code in a shared library"
-msgstr "%s: länkar icke-pic-kod i delat bibliotek"
+msgid "  %u: size: %u, flags: 0x%02x, name: %.*s\n"
+msgstr "  %u: storlek: %u, flaggor: 0x%02x, namn: %.*s\n"
 
-#: elf32-ia64.c:4164 elf64-ia64.c:4164
+#: vms-alpha.c:7720
 #, c-format
-msgid "%s: @gprel relocation against dynamic symbol %s"
-msgstr "%s: @gprel-omlokalisering mot dynamiska symbolen %s"
+msgid " quad-word relocation fixups:\n"
+msgstr " quad-ord omlokaliseringsfixar:\n"
 
-#: elf32-ia64.c:4224 elf64-ia64.c:4224
+#: vms-alpha.c:7725
 #, c-format
-msgid "%s: linking non-pic code in a position independent executable"
-msgstr "%s: länkar icke-pic-kod i en positionsoberoende körbar fil"
+msgid " long-word relocation fixups:\n"
+msgstr " lÃ¥ngord omlokaliseringsfixar:\n"
 
-#: elf32-ia64.c:4363 elf64-ia64.c:4363
+#: vms-alpha.c:7730
 #, c-format
-msgid "%s: @internal branch to dynamic symbol %s"
-msgstr "%s: @internal-gren till dynamiska symbolen %s"
+msgid " quad-word .address reference fixups:\n"
+msgstr " quad-ord .address-referensfixar:\n"
 
-#: elf32-ia64.c:4365 elf64-ia64.c:4365
+#: vms-alpha.c:7735
 #, c-format
-msgid "%s: speculation fixup to dynamic symbol %s"
-msgstr "%s: spekulationsfix till dynamiska symbolen %s"
+msgid " long-word .address reference fixups:\n"
+msgstr " lÃ¥ngord .address-referensfixar:\n"
 
-#: elf32-ia64.c:4367 elf64-ia64.c:4367
+#: vms-alpha.c:7740
 #, c-format
-msgid "%s: @pcrel relocation against dynamic symbol %s"
-msgstr "%s: @pcrel-omlokalisering mot dynamiska symbolen %s"
+msgid " Code Address Reference Fixups:\n"
+msgstr " Kodadressreferens-fixar:\n"
 
-#: elf32-ia64.c:4579 elf64-ia64.c:4579
-msgid "unsupported reloc"
-msgstr "omlokaliseringen stöds inte"
+#: vms-alpha.c:7745
+#, c-format
+msgid " Linkage Pairs Reference Fixups:\n"
+msgstr " LÃ¤nkning Par Referens Fixar:\n"
+
+#: vms-alpha.c:7754
+#, c-format
+msgid " Change Protection (%u entries):\n"
+msgstr " Ã„ndringsskydd (%u poster):\n"
+
+#: vms-alpha.c:7759
+#, c-format
+msgid "  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "
+msgstr "  bas: 0x%08x %08x, storlek: 0x%08x, prot: 0x%08x "
+
+#. FIXME: we do not yet support relocatable link.  It is not obvious
+#. how to do it for debug infos.
+#: vms-alpha.c:8599
+msgid "%P: relocatable link is not supported\n"
+msgstr "%P: LÃ¤nk som kan omlokaliseras stÃ¶ds inte\n"
 
-#: elf32-ia64.c:4858 elf64-ia64.c:4858
+#: vms-alpha.c:8669
+msgid "%P: multiple entry points: in modules %B and %B\n"
+msgstr "%P: Flera ingÃ¥ngspunkter: i modulerna %B och %B\n"
+
+#: vms-lib.c:1444
 #, c-format
-msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr "%s: länkar fånga-vid-NULL-dereferens med ickefångande filer"
+msgid "could not open shared image '%s' from '%s'"
+msgstr "Kunde inte Ã¶ppna delad avbild â€�%sâ€� frÃ¥n â€�%sâ€�"
+
+#: vms-misc.c:360
+msgid "_bfd_vms_output_counted called with zero bytes"
+msgstr "_bfd_vms_output_counted anropad med noll byte"
 
-#: elf32-ia64.c:4867 elf64-ia64.c:4867
+#: vms-misc.c:365
+msgid "_bfd_vms_output_counted called with too many bytes"
+msgstr "_bfd_vms_output_counted called anropad med fÃ¶r mÃ¥nga byte"
+
+#: xcofflink.c:824
 #, c-format
-msgid "%s: linking big-endian files with little-endian files"
-msgstr "%s: länkar big endian-filer med little endian-filer"
+msgid "%s: XCOFF shared object when not producing XCOFF output"
+msgstr "%s: XCOFF delade objekt nÃ¤r inte XCOFF-utdata produceras"
 
-#: elf32-ia64.c:4876 elf64-ia64.c:4876
+#: xcofflink.c:845
 #, c-format
-msgid "%s: linking 64-bit files with 32-bit files"
-msgstr "%s: länkar 64-bitarsfiler med 32-bitarsfiler"
+msgid "%s: dynamic object with no .loader section"
+msgstr "%s: dynamiskt objekt utan nÃ¥gon .loader-sektion"
+
+#: xcofflink.c:1404
+msgid "%B: `%s' has line numbers but no enclosing section"
+msgstr "%B: â€�%sâ€� har radnummer, men ingen omslutande sektion"
+
+#: xcofflink.c:1456
+msgid "%B: class %d symbol `%s' has no aux entries"
+msgstr "%B: Klass %d-symbolen â€�%sâ€� har inga extraposter"
+
+#: xcofflink.c:1478
+msgid "%B: symbol `%s' has unrecognized csect type %d"
+msgstr "%B: Symbolen â€�%sâ€� har okÃ¤nd csect-typ %d"
+
+#: xcofflink.c:1490
+msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
+msgstr "%B: Felaktig XTY_ER-symbol â€�%sâ€�: klass %d scnum %d scnlen %d"
 
-#: elf32-ia64.c:4885 elf64-ia64.c:4885
+#: xcofflink.c:1519
+msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
+msgstr "%B: XMC_TC0-symbol â€�%sâ€� Ã¤r klass %d scnlen %d"
+
+#: xcofflink.c:1665
+msgid "%B: csect `%s' not in enclosing section"
+msgstr "%B: csect â€�%sâ€� Ã¤r inte i en omslutande sektion"
+
+#: xcofflink.c:1772
+msgid "%B: misplaced XTY_LD `%s'"
+msgstr "%B: Felplacerad XTY_LD â€�%sâ€�"
+
+#: xcofflink.c:2091
+msgid "%B: reloc %s:%d not in csect"
+msgstr "%B: omlokalisering %s:%d inte i csect"
+
+#: xcofflink.c:3182
 #, c-format
-msgid "%s: linking constant-gp files with non-constant-gp files"
-msgstr "%s: länkar konstant-gp-filer med icke-konstant-gp-filer"
+msgid "%s: no such symbol"
+msgstr "%s: ingen sÃ¥dan symbol"
 
-#: elf32-ia64.c:4895 elf64-ia64.c:4895
+#: xcofflink.c:3287
 #, c-format
-msgid "%s: linking auto-pic files with non-auto-pic files"
-msgstr "%s: länkar auto-pic-filer med icke-auto-pic-filer"
+msgid "warning: attempt to export undefined symbol `%s'"
+msgstr "varning: fÃ¶rsÃ¶k att exportera odefinierade symbolen â€�%sâ€�"
+
+#: xcofflink.c:3666
+msgid "error: undefined symbol __rtinit"
+msgstr "fel: odefinierad symbol __rtinit"
+
+#: xcofflink.c:4045
+msgid "%B: loader reloc in unrecognized section `%s'"
+msgstr "%B: Laddaromlokalisering i okÃ¤nd sektion â€�%sâ€�"
+
+#: xcofflink.c:4056
+msgid "%B: `%s' in loader reloc but not loader sym"
+msgstr "%B: â€�%sâ€� i laddaromlokalisering men inte laddarsym"
+
+#: xcofflink.c:4072
+msgid "%B: loader reloc in read-only section %A"
+msgstr "%B: Laddaromlokalisering i skrivskyddad sektion %A"
 
-#: peigen.c:985 pepigen.c:985
+#: xcofflink.c:5094
 #, c-format
-msgid "%s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s: radnummer ger överspill: 0x%lx > 0xffff"
+msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
+msgstr "TOC ger Ã¶verspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1009 pepigen.c:1009 pex64igen.c:1009
 #, c-format
-msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-msgstr "%s: omlokalisering ger överspill 1: 0x%lx > 0xffff"
+msgid "%s: line number overflow: 0x%lx > 0xffff"
+msgstr "%s: radnummer ger Ã¶verspill: 0x%lx > 0xffff"
 
-#: peigen.c:1016 pepigen.c:1016
+#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
 msgid "Export Directory [.edata (or where ever we found it)]"
-msgstr "Exportkatalog [.edata (eller där vi hittade det)]"
+msgstr "Exportkatalog [.edata (eller dÃ¤r vi hittade det)]"
 
-#: peigen.c:1017 pepigen.c:1017
+#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
 msgid "Import Directory [parts of .idata]"
 msgstr "Importkatalog [delar av .idata]"
 
-#: peigen.c:1018 pepigen.c:1018
+#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
 msgid "Resource Directory [.rsrc]"
 msgstr "Resurskatalog [.rsrc]"
 
-#: peigen.c:1019 pepigen.c:1019
+#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
 msgid "Exception Directory [.pdata]"
 msgstr "Undantagskatalog [.pdata]"
 
-#: peigen.c:1020 pepigen.c:1020
+#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
 msgid "Security Directory"
-msgstr "Säkerhetskatalog"
+msgstr "SÃ¤kerhetskatalog"
 
-#: peigen.c:1021 pepigen.c:1021
+#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Basomlokaliseringskatalog [.reloc]"
 
-#: peigen.c:1022 pepigen.c:1022
+#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
 msgid "Debug Directory"
-msgstr "Felsökningskatalog"
+msgstr "FelsÃ¶kningskatalog"
 
-#: peigen.c:1023 pepigen.c:1023
+#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
 msgid "Description Directory"
 msgstr "Beskrivningskatalog"
 
-#: peigen.c:1024 pepigen.c:1024
+#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
 msgid "Special Directory"
 msgstr "Specialkatalog"
 
-#: peigen.c:1025 pepigen.c:1025
+#: peigen.c:1045 pepigen.c:1045 pex64igen.c:1045
 msgid "Thread Storage Directory [.tls]"
-msgstr "Trådlagringskatalog [.tls]"
+msgstr "TrÃ¥dlagringskatalog [.tls]"
 
-#: peigen.c:1026 pepigen.c:1026
+#: peigen.c:1046 pepigen.c:1046 pex64igen.c:1046
 msgid "Load Configuration Directory"
-msgstr "Inläsningskonfigurationskatalog"
+msgstr "InlÃ¤sningskonfigurationskatalog"
 
-#: peigen.c:1027 pepigen.c:1027
+#: peigen.c:1047 pepigen.c:1047 pex64igen.c:1047
 msgid "Bound Import Directory"
-msgstr "Katalog över bundna importer"
+msgstr "Katalog Ã¶ver bundna importer"
 
-#: peigen.c:1028 pepigen.c:1028
+#: peigen.c:1048 pepigen.c:1048 pex64igen.c:1048
 msgid "Import Address Table Directory"
 msgstr "Importadresstabellkatalog"
 
-#: peigen.c:1029 pepigen.c:1029
+#: peigen.c:1049 pepigen.c:1049 pex64igen.c:1049
 msgid "Delay Import Directory"
-msgstr "Katalog över fördröjda importer"
+msgstr "Katalog Ã¶ver fÃ¶rdrÃ¶jda importer"
+
+#: peigen.c:1050 pepigen.c:1050 pex64igen.c:1050
+msgid "CLR Runtime Header"
+msgstr "CLR kÃ¶rtidshuvud"
 
-#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
+#: peigen.c:1051 pepigen.c:1051 pex64igen.c:1051
 msgid "Reserved"
 msgstr "Reserverad"
 
-#: peigen.c:1094 pepigen.c:1094
+#: peigen.c:1111 pepigen.c:1111 pex64igen.c:1111
+#, c-format
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Det finns en importtabell, men sektionen som innehåller den kunde inte hittas\n"
+"Det finns en importtabell, men sektionen som innehÃ¥ller den kunde inte hittas\n"
 
-#: peigen.c:1099 pepigen.c:1099
+#: peigen.c:1116 pepigen.c:1116 pex64igen.c:1116
 #, c-format
 msgid ""
 "\n"
 "There is an import table in %s at 0x%lx\n"
 msgstr ""
 "\n"
-"Det finns en importtabell i %s på 0x%lx\n"
+"Det finns en importtabell i %s pÃ¥ 0x%lx\n"
 
-#: peigen.c:1136 pepigen.c:1136
+#: peigen.c:1158 pepigen.c:1158 pex64igen.c:1158
 #, c-format
 msgid ""
 "\n"
 "Function descriptor located at the start address: %04lx\n"
 msgstr ""
 "\n"
-"Funktionsidentifierare hittad på startadressen: %04lx\n"
+"Funktionsidentifierare hittad pÃ¥ startadressen: %04lx\n"
 
-#: peigen.c:1139 pepigen.c:1139
+#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
-msgstr "\tkodbas %08lx toc (inläsningsbar/verklig) %08lx/%08lx\n"
+msgstr "\tkodbas %08lx toc (inlÃ¤sningsbar/verklig) %08lx/%08lx\n"
 
-#: peigen.c:1145 pepigen.c:1145
+#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169
+#, c-format
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2774,25 +6276,26 @@ msgstr ""
 "\n"
 "Ingen reldata-sektion! Funktionsidentifierare avkodades inte.\n"
 
-#: peigen.c:1150 pepigen.c:1150
+#: peigen.c:1174 pepigen.c:1174 pex64igen.c:1174
 #, c-format
 msgid ""
 "\n"
 "The Import Tables (interpreted %s section contents)\n"
 msgstr ""
 "\n"
-"Importtabellerna (tolkade innehåll i %s-sektion)\n"
+"Importtabellerna (tolkade innehÃ¥ll i %s-sektion)\n"
 
-# Vad är thunk?
-#: peigen.c:1153 pepigen.c:1153
+# Vad Ã¤r thunk?
+#: peigen.c:1177 pepigen.c:1177 pex64igen.c:1177
+#, c-format
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
 msgstr ""
-" vma:            Tips-   Tids-     Framåt-  DLL-      Första\n"
-"                 tabell  stämpel   kedja    namn      thunk\n"
+" vma:            Tips-   Tids-     FramÃ¥t-  DLL-      FÃ¶rsta\n"
+"                 tabell  stÃ¤mpel   kedja    namn      thunk\n"
 
-#: peigen.c:1204 pepigen.c:1204
+#: peigen.c:1225 pepigen.c:1225 pex64igen.c:1225
 #, c-format
 msgid ""
 "\n"
@@ -2801,27 +6304,39 @@ msgstr ""
 "\n"
 "\tDLL-namn: %s\n"
 
-#: peigen.c:1215 pepigen.c:1215
+#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
+#, c-format
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
-msgstr "\tvma: Tips/Ordn Medlemsnamn Bundet till\n"
+msgstr "\tvma:  Tips/Ordn Medlemsnamn Bundet-till\n"
 
-#: peigen.c:1240 pepigen.c:1240
+#: peigen.c:1261 pepigen.c:1261 pex64igen.c:1261
+#, c-format
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Det finns en första thunk, men sektionen som innehåller den kunde inte hittas\n"
+"Det finns en fÃ¶rsta thunk, men sektionen som innehÃ¥ller den kunde inte hittas\n"
 
-#: peigen.c:1380 pepigen.c:1380
+#: peigen.c:1423 pepigen.c:1423 pex64igen.c:1423
+#, c-format
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Det finns en exporttabell, men sektionen som innehåller den kunde inte hittas\n"
+"Det finns en exporttabell, men sektionen som innehÃ¥ller den kunde inte hittas\n"
+
+#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s, but it does not fit into that section\n"
+msgstr ""
+"\n"
+"Det finns en exporttabell i %s, men den passar inte i den sektionen\n"
 
-#: peigen.c:1385 pepigen.c:1385
+#: peigen.c:1438 pepigen.c:1438 pex64igen.c:1438
 #, c-format
 msgid ""
 "\n"
@@ -2830,7 +6345,7 @@ msgstr ""
 "\n"
 "Det finns en exporttabell i %s vid 0x%lx\n"
 
-#: peigen.c:1416 pepigen.c:1416
+#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
 #, c-format
 msgid ""
 "\n"
@@ -2838,80 +6353,88 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-"Exporttabellerna (tolkade innehåll i %s-sektion)\n"
+"Exporttabellerna (tolkade innehÃ¥ll i %s-sektion)\n"
+"\n"
 
-#: peigen.c:1420 pepigen.c:1420
+#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Exportflaggor \t\t\t%lx\n"
 
-#: peigen.c:1423 pepigen.c:1423
+#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
-msgstr "Tid-/Datumstämpel \t\t%lx\n"
+msgstr "Tid-/DatumstÃ¤mpel \t\t%lx\n"
 
-#: peigen.c:1426 pepigen.c:1426
+#: peigen.c:1476 pepigen.c:1476 pex64igen.c:1476
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
-msgstr "Övre/Undre \t\t\t%d/%d\n"
+msgstr "Ã–vre/Undre \t\t\t%d/%d\n"
 
-#: peigen.c:1429 pepigen.c:1429
+#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479
+#, c-format
 msgid "Name \t\t\t\t"
 msgstr "Namn \t\t\t\t"
 
-#: peigen.c:1435 pepigen.c:1435
+#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Ordningsbas \t\t\t%ld\n"
 
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
+#, c-format
 msgid "Number in:\n"
 msgstr "Tal i:\n"
 
-#: peigen.c:1441 pepigen.c:1441
+#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tExportadresstabell \t\t%08lx\n"
 
-#: peigen.c:1445 pepigen.c:1445
+#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\t[Namnpekare/Ordningstal]-tabell\t%08lx\n"
 
-#: peigen.c:1448 pepigen.c:1448
+#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
+#, c-format
 msgid "Table Addresses\n"
 msgstr "Tabelladresser\n"
 
-#: peigen.c:1451 pepigen.c:1451
+#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501
+#, c-format
 msgid "\tExport Address Table \t\t"
 msgstr "\tExportadresstabell \t\t"
 
-#: peigen.c:1456 pepigen.c:1456
+#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506
+#, c-format
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNamnpekartabell \t\t"
 
-#: peigen.c:1461 pepigen.c:1461
+#: peigen.c:1511 pepigen.c:1511 pex64igen.c:1511
+#, c-format
 msgid "\tOrdinal Table \t\t\t"
-msgstr "\tOrdningstalstabell \t\t\t"
+msgstr "\tOrdningstaltabell \t\t\t"
 
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1525 pepigen.c:1525 pex64igen.c:1525
 #, c-format
 msgid ""
 "\n"
 "Export Address Table -- Ordinal Base %ld\n"
 msgstr ""
 "\n"
-"Exportadresstabell -- Orningsbas %ld\n"
+"Exportadresstabell -- Ordningsbas %ld\n"
 
-#: peigen.c:1495 pepigen.c:1495
+#: peigen.c:1544 pepigen.c:1544 pex64igen.c:1544
 msgid "Forwarder RVA"
 msgstr "Vidarebefordrar-RVA"
 
-#: peigen.c:1506 pepigen.c:1506
+#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
 msgid "Export RVA"
 msgstr "Export-RVA"
 
-#: peigen.c:1513 pepigen.c:1513
+#: peigen.c:1562 pepigen.c:1562 pex64igen.c:1562
+#, c-format
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2919,24 +6442,19 @@ msgstr ""
 "\n"
 "[Ordningstals-/Namnpekar-]tabell\n"
 
-#: peigen.c:1568 pepigen.c:1568
+#: peigen.c:1622 peigen.c:1805 pepigen.c:1622 pepigen.c:1805 pex64igen.c:1622
+#: pex64igen.c:1805
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
-msgstr "Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
-
-#: peigen.c:1572 pepigen.c:1572
-msgid ""
-"\n"
-"The Function Table (interpreted .pdata section contents)\n"
-msgstr ""
-"\n"
-"Funktionstabellen (tolkade innehåll från .pdata-sektionen)\n"
+msgstr "Varning, storleken pÃ¥ .pdata-sektionen (%ld) Ã¤r inte en multipel av %d\n"
 
-#: peigen.c:1575 pepigen.c:1575
+#: peigen.c:1629 pepigen.c:1629 pex64igen.c:1629
+#, c-format
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tStartadress      Slutadress       Ospola information\n"
 
-#: peigen.c:1577 pepigen.c:1577
+#: peigen.c:1631 pepigen.c:1631 pex64igen.c:1631
+#, c-format
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
@@ -2944,19 +6462,32 @@ msgstr ""
 " vma:\t\tStart-   Slut-    EH-       EH-    Prologsluts- Undantags-\n"
 "     \t\tadress   adress   hanterare data   adress       mask\n"
 
-#: peigen.c:1647 pepigen.c:1647
+#: peigen.c:1705 pepigen.c:1705 pex64igen.c:1705
+#, c-format
 msgid " Register save millicode"
 msgstr " Registerspara millikod"
 
-#: peigen.c:1650 pepigen.c:1650
+#: peigen.c:1708 pepigen.c:1708 pex64igen.c:1708
+#, c-format
 msgid " Register restore millicode"
-msgstr " Registeråterställ millikod"
+msgstr " RegisterÃ¥terstÃ¤ll millikod"
 
-#: peigen.c:1653 pepigen.c:1653
+#: peigen.c:1711 pepigen.c:1711 pex64igen.c:1711
+#, c-format
 msgid " Glue code sequence"
 msgstr " Klisterkodsekvens"
 
-#: peigen.c:1705 pepigen.c:1705
+#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
+#, c-format
+msgid ""
+" vma:\t\tBegin    Prolog   Function Flags    Exception EH\n"
+"     \t\tAddress  Length   Length   32b exc  Handler   Data\n"
+msgstr ""
+" vma:\t\tBÃ¶rja    Prolog   Funktionsflaggor  Undantag  EH\n"
+"     \t\tAdress   LÃ¤ngd    LÃ¤ngd    32b exc  Handler   Data\n"
+
+#: peigen.c:1937 pepigen.c:1937 pex64igen.c:1937
+#, c-format
 msgid ""
 "\n"
 "\n"
@@ -2964,258 +6495,147 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-"PE-filbasomlokaliseringar (tolkat innehåll i .reloc-sektionen)\n"
+"PE-filbasomlokaliseringar (tolkat innehÃ¥ll i .reloc-sektionen)\n"
 
-#: peigen.c:1735 pepigen.c:1735
+#: peigen.c:1966 pepigen.c:1966 pex64igen.c:1966
 #, c-format
 msgid ""
 "\n"
 "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
 msgstr ""
 "\n"
-"Virtuell adress: %08lx Områdesstorlek %ld (0x%lx) Antal fixar %ld\n"
+"Virtuell adress: %08lx OmrÃ¥desstorlek %ld (0x%lx) Antal fixar %ld\n"
 
-#: peigen.c:1748 pepigen.c:1748
+#: peigen.c:1979 pepigen.c:1979 pex64igen.c:1979
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
-msgstr "\tomlokalisering %4d avstånd %4x [%4lx] %s"
+msgstr "\tomlokalisering %4d avstÃ¥nd %4x [%4lx] %s"
 
-#. The MS dumpbin program reportedly ands with 0xff0f before
-#. printing the characteristics field.  Not sure why.  No reason to
-#. emulate it here.
-#: peigen.c:1788 pepigen.c:1788
+#: peigen.c:2023 pepigen.c:2023 pex64igen.c:2023
 #, c-format
-msgid ""
-"\n"
-"Characteristics 0x%x\n"
-msgstr ""
-"\n"
-"Karakteristik 0x%x\n"
-
-#~ msgid "%s: Unknown special linker type %d"
-#~ msgstr "%s: Okänd speciallänkartyp %d"
-
-#~ msgid "v850ea architecture"
-#~ msgstr "v850ea-arkitektur"
-
-#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
-#~ msgstr "%s: Sektionen %s är för stor för att stoppa hål med %ld byte i"
-
-#~ msgid "Error: out of memory"
-#~ msgstr "Fel: slut på minne"
-
-#~ msgid "warning: relocation against removed section; zeroing"
-#~ msgstr "varning: omlokalisering mot borttagen sektion; nollställer"
+msgid "%*.s Entry: "
+msgstr "%*.s Post: "
 
-#~ msgid "warning: relocation against removed section"
-#~ msgstr "varning: omlokalisering mot borttagen sektion"
-
-#~ msgid "local symbols in discarded section %s"
-#~ msgstr "lokala symboler i bortkastade sektionen %s"
-
-#~ msgid "%s: linking abicalls files with non-abicalls files"
-#~ msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
-
-#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-#~ msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
-
-#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-#~ msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
-
-#~ msgid "%s: dynamic relocation against speculation fixup"
-#~ msgstr "%s: dynamisk omlokalisering utan spekulationsfixar"
-
-#~ msgid "%s: speculation fixup against undefined weak symbol"
-#~ msgstr "%s: spekulationsfix mot odefinierad svag symbol"
-
-#~ msgid "\tThe Import Address Table (difference found)\n"
-#~ msgstr "\tImportadresstabellen (skillnad hittad)\n"
-
-#~ msgid "\t>>> Ran out of IAT members!\n"
-#~ msgstr "\t>>> Slut på IAT-medlemmar!\n"
-
-#~ msgid "\tThe Import Address Table is identical\n"
-#~ msgstr "\tImportadresstabellen är identisk\n"
-
-# Ska vara blanksteg här tror jag
-#~ msgid "BFD %sinternal error, aborting at %s line %d\n"
-#~ msgstr "Internt BFD %s-fel, avbryter vid %s rad %d\n"
-
-#~ msgid "GP relative relocation when GP not defined"
-#~ msgstr "GP-relativ omlokalisering då GP inte är definierad"
-
-#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
-#~ msgstr "%s: FEL: skickar flyttal i flyttalsregister där målet %s istället använder heltalsregister"
-
-#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
-#~ msgstr "%s: FEL: skickar flyttal i heltalsregister där målet %s istället använder flyttalsregister"
-
-#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
-#~ msgstr "Varning: indatafilen %s stöder samverkande, medan %s däremot inte gör det."
-
-#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
-#~ msgstr "Varning: indatafilen %s stöder inte samverkande, medan %s däremot gör det."
-
-#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
-#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx radnummer %ld nästa %ld"
-
-#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
-#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, namn = %s, symbolnr = %d, flaggor = 0x%.8lx%s\n"
-
-#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
-#~ msgstr "Varning: Ställer inte in samverkandeflaggan för %s eftersom den redan har angivits som inte samverkande"
-
-#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
-#~ msgstr "Varning: Stänger av samverkandeflaggan för %s på grund av utomstående begäran"
-
-#~ msgid " [APCS-26]"
-#~ msgstr " [APCS-26]"
-
-#~ msgid " [APCS-32]"
-#~ msgstr " [APCS-32]"
-
-#~ msgid "(unknown)"
-#~ msgstr "(okänd)"
-
-# Skumt!
-#~ msgid "  previously %s in %s"
-#~ msgstr "  tidigare %s i %s"
-
-#~ msgid "Symbol `%s' has differing types: %s in %s"
-#~ msgstr "Symbolen \"%s\" har olika typer: %s i %s"
-
-# Alla dessa känns onödiga, borde rapporteras
-#~ msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
-#~ msgstr "ETIR_S_C_STO_GBL: ingen symbol \"%s\""
-
-#~ msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
-#~ msgstr "ETIR_S_C_STO_CA: ingen symbol \"%s\""
-
-#~ msgid "ETIR_S_C_STO_RB/AB: Not supported"
-#~ msgstr "ETIR_S_C_STO_RB/AB: Stöds inte"
-
-#~ msgid "ETIR_S_C_STO_LP_PSB: Not supported"
-#~ msgstr "ETIR_S_C_STO_LP_PSB: Stöds inte"
-
-#~ msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
-#~ msgstr "ETIR_S_C_STO_HINT_GBL: inte implementerat"
-
-#~ msgid "ETIR_S_C_STO_HINT_PS: not implemented"
-#~ msgstr "ETIR_S_C_STO_HINT_PS: inte implementerat"
-
-#~ msgid "ETIR_S_C_OPR_INSV: Not supported"
-#~ msgstr "ETIR_S_C_OPR_INSV: Stöds inte"
-
-#~ msgid "ETIR_S_C_OPR_USH: Not supported"
-#~ msgstr "ETIR_S_C_OPR_USH: Stöds inte"
-
-#~ msgid "ETIR_S_C_OPR_ROT: Not supported"
-#~ msgstr "ETIR_S_C_OPR_ROT: Stöds inte"
-
-#~ msgid "ETIR_S_C_OPR_REDEF: Not supported"
-#~ msgstr "ETIR_S_C_OPR_REDEF: Stöds inte"
-
-#~ msgid "ETIR_S_C_OPR_DFLIT: Not supported"
-#~ msgstr "ETIR_S_C_OPR_DFLIT: Stöds inte"
-
-#~ msgid "ETIR_S_C_STC_LP: not supported"
-#~ msgstr "ETIR_S_C_STC_LP: stöds inte"
-
-#~ msgid "ETIR_S_C_STC_GBL: not supported"
-#~ msgstr "ETIR_S_C_STC_GBL: stöds inte"
-
-#~ msgid "ETIR_S_C_STC_GCA: not supported"
-#~ msgstr "ETIR_S_C_STC_GCA: stöds inte"
+#: peigen.c:2043 pepigen.c:2043 pex64igen.c:2043
+#, c-format
+msgid "name: [val: %08lx len %d]: "
+msgstr "namn: [vÃ¤r: %08lx lÃ¤n %d]: "
 
-#~ msgid "ETIR_S_C_STC_PS: not supported"
-#~ msgstr "ETIR_S_C_STC_PS: stöds inte"
+#: peigen.c:2054 pepigen.c:2054 pex64igen.c:2054
+#, c-format
+msgid "<corrupt string length: %#x>"
+msgstr "<korrupt strÃ¤nglÃ¤ngd: %#x>"
 
-#~ msgid "Unimplemented STO cmd %d"
-#~ msgstr "Oimplementerat STO-kommando %d"
+#: peigen.c:2057 pepigen.c:2057 pex64igen.c:2057
+#, c-format
+msgid "<corrupt string offset: %#lx>"
+msgstr "<korrupt strÃ¤ngfÃ¶rskjutning: %#lx>"
 
-#~ msgid "TIR_S_C_OPR_ASH incomplete"
-#~ msgstr "TIR_S_C_OPR_ASH ofullständigt"
+#: peigen.c:2060 pepigen.c:2060 pex64igen.c:2060
+#, c-format
+msgid "ID: %#08lx"
+msgstr "ID: %#08lx"
 
-#~ msgid "TIR_S_C_OPR_USH incomplete"
-#~ msgstr "TIR_S_C_OPR_USH ofullständigt"
+#: peigen.c:2063 pepigen.c:2063 pex64igen.c:2063
+#, c-format
+msgid ", Value: %#08lx\n"
+msgstr ", VÃ¤rde: %#08lx\n"
 
-#~ msgid "TIR_S_C_OPR_ROT incomplete"
-#~ msgstr "TIR_S_C_OPR_ROT ofullständigt"
+#: peigen.c:2074 pepigen.c:2074 pex64igen.c:2074
+#, c-format
+msgid "%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgstr "%*.s  LÃ¶v: Adr: %#08lx, Storlek: %#08lx, Kodsida: %d\n"
 
-#~ msgid "TIR_S_C_OPR_REDEF not supported"
-#~ msgstr "TIR_S_C_OPR_REDEF stöds inte"
+#: peigen.c:2116 pepigen.c:2116 pex64igen.c:2116
+#, c-format
+msgid " Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"
+msgstr " Tabell: Char: %d, Tid: %08lx, Ver: %d/%d, Num namn: %d, IDs: %d\n"
 
-#~ msgid "TIR_S_C_OPR_DFLIT not supported"
-#~ msgstr "TIR_S_C_OPR_DFLIT stöds inte"
+#: peigen.c:2204 pepigen.c:2204 pex64igen.c:2204
+#, c-format
+msgid "Corrupt .rsrc section detected!\n"
+msgstr "Felaktig .rsrc-sektion upptÃ¤ckt!\n"
 
-#~ msgid "TIR_S_C_CTL_DFLOC not fully implemented"
-#~ msgstr "TIR_S_C_CTL_DFLOC är inte fullständigt implementerat"
+#: peigen.c:2220 pepigen.c:2220 pex64igen.c:2220
+#, c-format
+msgid ""
+"\n"
+"WARNING: Extra data in .rsrc section - it will be ignored by Windows:\n"
+msgstr ""
+"\n"
+"VARNING: Extra data i .rsrc-sektionen - det kommer att ignoreras av Windows:\n"
 
-#~ msgid "TIR_S_C_CTL_STLOC not fully implemented"
-#~ msgstr "TIR_S_C_CTL_STLOC är inte fullständigt implementerat"
+#. The MS dumpbin program reportedly ands with 0xff0f before
+#. printing the characteristics field.  Not sure why.  No reason to
+#. emulate it here.
+#: peigen.c:2243 pepigen.c:2243 pex64igen.c:2243
+#, c-format
+msgid ""
+"\n"
+"Characteristics 0x%x\n"
+msgstr ""
+"\n"
+"Karakteristik 0x%x\n"
 
-#~ msgid "TIR_S_C_CTL_STKDL not fully implemented"
-#~ msgstr "TIR_S_C_CTL_STKDL är inte fulständigt implementerat"
+#: peigen.c:3194 pepigen.c:3194 pex64igen.c:3194
+#, c-format
+msgid ".rsrc merge failure: duplicate string resource: %d"
+msgstr ".rsrc sammanfogningsfel: dubblerad strÃ¤ngresurs: %d"
 
-# This is broken
-#
-#  fprintf (file,
-# 	   _("\nThe Import Tables (interpreted %s section contents)\n"),
-# 	   section->name);
-#  fprintf (file,
-# 	   _(" vma:            Hint    Time      Forward  DLL       First\n"));
-#  fprintf (file,
-# 	   _("                 Table   Stamp     Chain    Name      Thunk\n"));
-#
-#~ msgid " vma:            Hint    Time      Forward  DLL       First\n"
-#~ msgstr " vma:            Tips-   Tids-     V.bef.-  DLL-      Första\n"
+#: peigen.c:3329 pepigen.c:3329 pex64igen.c:3329
+msgid ".rsrc merge failure: multiple non-default manifests"
+msgstr ".rsrc sammanfogningsfel: multipla ej-standard manifest"
 
-#~ msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
-#~ msgstr "     \t\tadress   adress   hanterare data    adress     mask\n"
+#: peigen.c:3347 pepigen.c:3347 pex64igen.c:3347
+msgid ".rsrc merge failure: a directory matches a leaf"
+msgstr ".rsrc sammanfogningsfel: en katalog matchar ett lÃ¶v"
 
-#~ msgid "integer"
-#~ msgstr "heltal"
+#: peigen.c:3389 pepigen.c:3389 pex64igen.c:3389
+msgid ".rsrc merge failure: duplicate leaf"
+msgstr ".rsrc sammanfogningsfel: dubblerat lÃ¶v"
 
-#~ msgid "float"
-#~ msgstr "flyttal"
+#: peigen.c:3391 pepigen.c:3391 pex64igen.c:3391
+#, c-format
+msgid ".rsrc merge failure: duplicate leaf: %s"
+msgstr ".rsrc sammanfogningsfel: dubblerat lÃ¶v: %s"
 
-#~ msgid "soft"
-#~ msgstr "mjuk"
+#: peigen.c:3457 pepigen.c:3457 pex64igen.c:3457
+msgid ".rsrc merge failure: dirs with differing characteristics\n"
+msgstr ".rsrc sammanfogningsfel: kataloger med olika karakteristik\n"
 
-#~ msgid "hard"
-#~ msgstr "hård"
+#: peigen.c:3464 pepigen.c:3464 pex64igen.c:3464
+msgid ".rsrc merge failure: differing directory versions\n"
+msgstr ".rsrc sammanfogningsfel: olika katalogversioner\n"
 
-#  _bfd_error_handler (_("#    Warning: %s %s interworking, whereas %s %s"),
-#    bfd_get_filename (ibfd),
-#    in_flags & EF_INTERWORK ? _("supports") : _("does not support"),
-#    bfd_get_filename (obfd),
-#    out_flags & EF_INTERWORK ? _("does not") : _("does"));
-#
-# This is broken
-#
-# Don't split a sentence like this, use multiple full messages instead
-#
-#~ msgid "Warning: %s %s interworking, whereas %s %s"
-#~ msgstr "Varning: %s %s samverkande, medan %s %s"
+#. Corrupted .rsrc section - cannot merge.
+#: peigen.c:3537 pepigen.c:3537 pex64igen.c:3537
+#, c-format
+msgid "%s: .rsrc merge failure: corrupt .rsrc section"
+msgstr "%s: .rsrc sammanfogningsfel: felaktigt .rsrc-sektion"
 
-#~ msgid "supports"
-#~ msgstr "stöder"
+#: peigen.c:3673 pepigen.c:3673 pex64igen.c:3673
+msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[1] eftersom .idata$2 saknas"
 
-#~ msgid "does not"
-#~ msgstr "inte gör det"
+#: peigen.c:3693 pepigen.c:3693 pex64igen.c:3693
+msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[1] eftersom .data$4 saknas"
 
-#~ msgid "does"
-#~ msgstr "gör det"
+#: peigen.c:3714 pepigen.c:3714 pex64igen.c:3714
+msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[12] eftersom .idata$5 saknas"
 
-#~ msgid "%s(%s+0x%lx): cannot find stub entry %s"
-#~ msgstr "%s(%s+0x%lx): kan inte hitta stubbstarten %s"
+#: peigen.c:3734 pepigen.c:3734 pex64igen.c:3734
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] eftersom .idata$6 saknas"
 
-#~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
-#~ msgstr "%s(%s+0x%lx): kan inte omlokalisera %s, kompilera om med -ffunction-sections"
+#: peigen.c:3776 pepigen.c:3776 pex64igen.c:3776
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] eftersom .idata$6 saknas"
 
-#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
-#~ msgstr "skapar sektionssymbol, namn = %s, värde = 0x%.8lx, index = %d, sektion = 0x%.8lx\n"
+#: peigen.c:3801 pepigen.c:3801 pex64igen.c:3801
+msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
+msgstr "%B: Kunde inte fylla i DataDictionary[9] eftersom __tls_used saknas"
 
-# Hmm
-#~ msgid "       whereas segment starts at 0x%x"
-#~ msgstr "       där segmentet börjar vid 0x%x"
+#~ msgid "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section â€�%Aâ€� is out of range"
+#~ msgstr "%B: adderade -0x%x i omlokalisering %s mot symbolen â€�%sâ€� vid 0x%lx i sektionen â€�%Aâ€� Ã¤r utanfÃ¶r intervallet"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/zh_CN.gmo ./bfd/po/zh_CN.gmo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/zh_CN.gmo	2015-07-06 01:51:18.000000000 +0000
+++ ./bfd/po/zh_CN.gmo	2017-03-06 01:53:32.000000000 +0000
@@ -1,28 +1,21 @@
-Þ•@
-¯ØÙò	&@Yr‹› ºÛû;J)\†œ4³è&:K\	k
u
ƒ
-‘
-œ
-§²Ç$Ð#õ%?R$j�­	ÇÑ	Ùãì	õÿ	
-$/
-@Kc}Œ£¾Íæ'ü5$ Z !r #” &¸ )ß .	!08!>i!-¨!(Ö!ÿ!7"1U"0‡"<¸"/õ"&%#TL#2¡#0Ô#:$4@$(u$(ž$[Ç$?#%<c%? %1à%5&H&f&1†&"¸&%Û& '$"'G'e'>~'I½')(.1(.`(5�(@Å(@)=G)$…)9ª).ä)/*@C*)„*,®*/Û*+%)+O+k+Š+(¡+*Ê+(õ+5,5T, Š,«,Å,Ù,0ë,1-<N-)‹-(µ-&Þ-&.,,.Y.+w.£.¹.,Ø.'/B-/"p/&“/Gº/G09J05„0Dº02ÿ07215j1/ 1,Ð1Hý13F2=z2	¸2/Â2ò233	83+B3#n3’3.®34Ý3	4(4E4U4l4#‚4.¦4,Õ4+51.5Z`5Z»5E6A\6Pž6Wï6WG7AŸ7Aá77#87[8$“8V¸895$9Z9
-o9#z9ž9·9Ò9ç9ô9:/!:8Q:Š:"©:IÌ:;);$;;6`;—;´;Æ;×;ç;	÷;<
-<
-!<",<%O<)u</Ÿ<Ï<.î<,=J=:f=%¡=%Ç=í=">?)>i>ˆ>‘>*¬>×>ï>?D?/Y?‰?›?¬?Ì?ã?û?%@7@J@g@J„@JÏ@JAIeA:¯A:êA6%BD\Bd¡BFC:MC8ˆC7ÁCùCD-1D+_D+‹D ·DØDëD$E"0ESE,qE%žEÄEÚE*ðEF/FDFZFnF!…F§FÂFÖFêF&þF %G#FG(jG9“GÍG0èGH0HBHYHrH„H—H!«H-ÍH0ûH+,I4XI=�I;ËIKK%K#5KYKpK‡KœK¬KÉKæK
-L5L
-DLOLiLvL&ƒLªLÂLÎLÞL
îL
üL
-M	M
 M
.M
-<M
-GM
-RM]MiMrMˆM¤M
ÀM
ÎMÜMòM
N	NN	"N,N5N	>NHNQNZN	cN	mNwN	†N�NœN
-¶NÁNÓN
æNôNOO*4O_OyO“O"³O!ÖO øO&P2@P,sP( PÉP,ãP%Q!6Q6XQ�Q®Q<ËQ/R%8R-^RŒR¬RÉRFæR0-S.^S3�SÁS%ßSTT'7T_T{T˜T±TÎTéT+U1,U'^U(†U(¯U(ØU$V$&V&KVrV'ˆV°V"ËV%îVW!1W.SW‚W—W¶WÐW
èWöW X 4XUXnX‰X¤X
-µX
-ÀX ËX&ìX'Y$;Y`Y{Y—Y ³YÔY ïYZ!Z)9ZcZ;�Z½ZÙZ/÷Z/'[)W[&�[)¨["Ò[õ["\$7\\\<{\+¸\;ä\ ]']E]Q]^]u]$|]¡]¶]-Í]5û]1^:^Q^Z^g^p^#�^!±^ Ó^"ô^5_5M_7ƒ_4»_=ð_?.`An`+°`+Ü`'a'0a"Xa8{a´a.Ãaòabb(b9bLbYb
-bbmb(‡b&°b×bæb1c3c
-Cc"Nc*qcœc
-©c´c½cÊc	×cácècûcdd0dJdjd&€d$§dÌd6àde6eUeeeF|eÃeÓeØe%ée
-ff#f@,fmf„f‘f™f­fÀfÒf#äfgg3g4Ig*~g*©g*Ôgÿg!h!@h*bh>�h:Ìh4i2<i#oi“i©i»iÙiõij-j@jUjljƒj˜jµjÐjäj øjk(k9kJkZkmk‚k•k¨k»kÎkìkll0?lpl ‚l£l¸lÇlÚl
ëlùlmm.m Mmnm&‹m&²m.1%·CË"îpá*/&›ûÃ95�ƒi=…ÌÜþŒ
9 ÝUº[ xÐš"M!X ^ÕO�cYAÂ@W_>Û²´
-¨jçÔ$Ò÷N×}’oKÑåœ~¥æÇIí®Ø¶Z?žª*âÙ<¿@)(q:¡=ïÖÎ-+Tµr7#ðÁ½8ÿä‚Ÿ‰	3y¼<\J2k
P+h;>bêÊHsBÈ'1g&ÉÄ¯Ú'2|GãmDÞŠ6˜©Sø{éL„•8�0]
-wì%R!FE.ÍV5üè/:	,t“ô”—ý;Åù¹�«¸43l£�zˆ)§Ï‹eõ™±–¾¦fv­³4du€¬úÀöñ‡†‘à6¢»7Ža$Óß¤Q`ë#°?ó-,òÆ(0n	Export Address Table 			Name Pointer Table 		
+Þ•×Ô%Œ
 !:Q&aˆ¡ºÓã #C;V’)¤Îäû,@Qb	q
{
‰
+—
+¢
+­¸$Í#ò%<O$gŒªÄÙ
+èó
+'APg‚‘ª&ÀTç2<(o[˜>ôI3.}.¬=Û./H@x)¹ã(*>0P)�«'Ê&ò95S/‰	¹Ã/Õ%9Nc	€+Š#¶Ú.ö4%	Zdw‰™°#Æ$ê%55k
+€‹¤¿Ôáð/8>w"–I¹  $( M j | Ž Ÿ 	¦ ° ¹ 
+Ð "Û %þ )$!/N!~!.�!,¿!ì!:"%C"%i"�""¨"Ë"ê"ó"*#9#K#c#v#/ˆ#¸#Ê#Û#û#$*$%@$f$y$–$J³$Jþ$JI%I”%:Þ%F&7`&˜&¸&Ê&Ü&ô&-'+4'+`'	Œ'	–'
+ ' «'
Ì'Ú'í'$
("2(U(,s( (*°(Û(ï()).)E)V)q)0x)©)
±)¿)Ù)ð)**0*I*^*p*ƒ*—*«*Á*!×*0ù*=*+Åh+.-B-V-)i-“-­-Ê-ä-"÷-"."=.`.9o.©. ¸.Ù.ë.ý./0/D/T/
d/	r/
|/
Š/
+˜/
+£/
+®/¹/É/'è/'080K0^0}0“0¦0»0
+Ê0Õ0
+è0ó0$1(151N1g1x1‘1*¤1VÏ1;&2+b2_Ž2;î2D*35o35¥34Û3!4-243`4)”4¾4"Û4þ4
5-5/J5 z5'›5'Ã56ë50"63S6‡6�6&¤6Ë6Û6ë6ú6	7 7:72C7v7•79±7Bë7.8;8O8a8n8�8)Ž8'¸8à8?9@9
+U9`9|9˜9«9¸9È98å90:O:"e:Aˆ:Ê:ß:$ï:;';;;K;X;_;	k;u;	‘;›;*´;$ß;*</<-A<+o<›<:²<"í<"=3=!H=j=�=ˆ=/�=Í=ß=ï=ü=!	>+>
+>>I>c>{>”>,­>Ú>#ó>?M4?>‚?>Á?>@,?@Rl@4¿@ô@A#A5ANA(aA&ŠA&±A	ØA	âA
+ìA$÷AB)BCB!bB!„B¦B*ÅBðB+ýB)C<CRChC}C•C¥C¾C-ÅCóCúCD#D>DTDpD†D�D²DÄD×DëDÿDE+E/JE8zEˆ‚L±OŒ¤S‰KIR˜Ž©ÇÒÎ_6]4Ï¨šE¼w0:9
­uva'º=eË½J� ²5Áq)Cž°— Ä¡¯«�^1´n&Æ�*’¹¶“t$\®VrD•ÅA‘i[GBÖ/8MŸx.bX¢@†sQ`g™Ô#Uyœ{HpY–W�|7×ƒ�N(	Â<§hÕ3l€‡o¬ÓÉc»,µ¾+·d"„ÃP
+fÍmT£Ê>‹-¥Šª¿}¦?Ñ%;ÀkZFz!…”2Ì~¸³›jÐÈ	Export Address Table 			Name Pointer Table 		
 	DLL Name: %s
 
       End+1 symbol: %-7ld   Type:  %s
@@ -44,88 +37,80 @@ There is an export table in %s at 0x%lx
 Version References:
 
 Version definitions:
-  consider relinking with --support-old-code enabled <EABI version unrecognised> [32bitmode] [FPA float format] [VFP float format] [Version1 EABI] [Version2 EABI] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolute position] [cpu32] [dynamic symbols use segment index] [floats passed in float registers] [floats passed in integer registers] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [m68000] [mdmx] [mips16] [mips1] [mips2] [mips32] [mips3] [mips4] [mips5] [mips64] [new ABI] [not 32bitmode] [old ABI] [position independent] [relocatable executable] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table]#<Invalid error code>%s (%s): Section flag %s (0x%x) ignored%s(%s+0x%lx): %s relocation against SEC_MERGE section%s(%s+0x%lx): fixing %s%s: %s: invalid needed version %d%s: %s: invalid version %u (max %d)%s: %s: reloc overflow: 0x%lx > 0xffff%s: .got subsegment exceeds 64K (size %d)%s: .opd is not a regular array of opd entries%s: .preinit_array section is not allowed in DSO%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x%s: 0x%lx: warning: bad R_SH_USES load offset%s: 0x%lx: warning: bad R_SH_USES offset%s: 0x%lx: warning: bad count%s: 0x%lx: warning: could not find expected COUNT reloc%s: 0x%lx: warning: could not find expected reloc%s: 0x%lx: warning: symbol in unexpected section%s: ABI mismatch: linking %s module with previous %s modules%s: Architecture mismatch with previous modules%s: Bad relocation record imported: %d%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
-%s: GAS error: unexpected PTB insn with R_SH_PT_16%s: ISA mismatch (%d) with previous modules (%d)%s: ISA mismatch (-mips%d) with previous modules (-mips%d)%s: Internal inconsistency; no relocation section %s%s: Invalid relocation type exported: %d%s: Invalid relocation type imported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: Not enough room for program headers (allocated %u, need %u)%s: Not enough room for program headers, try linking with -N%s: Only registers %%g[2367] can be declared using STT_REGISTER%s: Relocation %s is not supported for symbol %s.%s: Relocation %s is not yet supported for symbol %s.%s: Unhandled import type; %x%s: Unknown relocation type %d
-%s: Unknown section type in a.out.adobe file: %x
-%s: Unknown special linker type %d%s: Unrecognised import name type; %x%s: Unrecognised import type; %x%s: bad relocation section name `%s'%s: bad string table size %lu%s: bad symbol index: %d%s: can not represent section `%s' in a.out object file format%s: can not represent section for symbol `%s' in a.out object file format%s: check_relocs: unhandled reloc type %d%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled for a 64 bit system and target is 32 bit%s: compiled for a big endian system and target is little endian%s: compiled for a little endian system and target is big endian%s: compiled with %s and linked with modules compiled with %s%s: could not find output section %s%s: could not find output section %s for input section %s%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: directive LOCAL valid only with a register or absolute value%s: encountered datalabel symbol in input%s: error: relocation %s not a multiple of 4%s: illegal relocation type %d at address 0x%lx%s: illegal section name `%s'%s: illegal symbol index in reloc: %d%s: invalid SHT_GROUP entry%s: invalid relocation type %d%s: jump too far away
-%s: line number overflow: 0x%lx > 0xffff%s: linking 64-bit files with 32-bit files%s: linking PIC files with non-PIC files%s: linking big-endian files with little-endian files%s: linking little endian files with big endian files%s: no group info for section %s%s: not fully implemented%s: not implemented%s: not supported%s: object size does not match that of target %s%s: relocateable link from %s to %s not supported%s: relocation %s cannot be used when making a shared object%s: string too long (%d chars, max 65535)%s: symbol `%s' required but not present%s: undefined sym `%s' in .opd section%s: undefined versioned symbol name %s%s: unexpected reloc type %u in .opd section%s: unexpected type after ATN%s: unhandled dynamic relocation against %s%s: unimplemented %s
-%s: unknown relocation type %d%s: unknown relocation type %d for symbol %s%s: unrecognized symbol `%s' flags 0x%x%s: unresolvable relocation %s against symbol `%s' from %s section%s: unsupported relocation type %s%s: unsupported relocation type 0x%02x%s: uses _-prefixed symbols, but writing file with non-prefixed symbols%s: uses non-prefixed symbols, but writing file with _-prefixed symbols%s: version count (%ld) does not match symbol count (%ld)%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: Empty loadable segment detected, is this intentional ?
-%s: warning: allocated section `%s' not in segment%s: warning: duplicate line number information for `%s'%s: warning: illegal symbol index %ld in line numbers%s: warning: illegal symbol index %ld in relocs%s: warning: unexpected redefinition of `%s'%s: warning: unresolvable relocation against symbol `%s' from %s section%s:%d: unexpected character `%s' in Intel Hex file
-%s:%u: bad checksum in Intel Hex file (expected %u, found %u)*unknown*.got section not immediately after .plt section: m32r instructions: m32rx instructions<Unrecognised flag bits set><unknown>Archive has no index; run ranlib to add oneArchive object file in wrong formatBFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
+ <EABI version unrecognised> [FPA float format] [VFP float format] [Version1 EABI] [Version2 EABI] [abi unknown] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [absolute position] [dynamic symbols use segment index] [floats passed in float registers] [floats passed in integer registers] [has entry point] [interworking enabled] [interworking flag not initialised] [interworking not supported] [interworking supported] [memory=bank-model] [memory=flat] [new ABI] [not 32bitmode] [old ABI] [position independent] [relocatable executable] [software FP] [sorted symbol table] [symbols have a _ prefix] [unknown ISA] [unsorted symbol table]#<Invalid error code>%s: %s: reloc overflow: 0x%lx > 0xffff%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file
+%s: GAS error: unexpected PTB insn with R_SH_PT_16%s: Invalid relocation type exported: %d%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld.%s: can not represent section `%s' in a.out object file format%s: can not represent section for symbol `%s' in a.out object file format%s: compiled as 32-bit object and %s is 64-bit%s: compiled as 64-bit object and %s is 32-bit%s: compiled with %s and linked with modules compiled with %s%s: could not write out added .cranges entries%s: could not write out sorted .cranges entries%s: directive LOCAL valid only with a register or absolute value%s: encountered datalabel symbol in input%s: illegal section name `%s'%s: line number overflow: 0x%lx > 0xffff%s: not implemented%s: not supported%s: object size does not match that of target %s%s: string too long (%d chars, max 65535)%s: unknown relocation type %d%s: unrecognized symbol `%s' flags 0x%x%s: unsupported relocation type 0x%02x%s: version count (%ld) does not match symbol count (%ld)%s: warning: %s: line number overflow: 0x%lx > 0xffff%s: warning: illegal symbol index %ld in relocs*unknown**unknown*        .got section not immediately after .plt section32-bit double, 64-bit double, : m32r instructions: m32r2 instructions: m32rx instructions<Unrecognised flag bits set><unknown>Archive has no index; run ranlib to add oneArchive object file in wrong formatBFD %s assertion fail %s:%dBFD %s internal error, aborting at %s line %d
 BFD %s internal error, aborting at %s line %d in %s
-Bad valueCould not find relocation section for %sDebug DirectoryDelay Import DirectoryDescription DirectoryDwarf Error: Bad abbrev number: %u.Dwarf Error: Can't find .debug_abbrev section.Dwarf Error: Can't find .debug_line section.Dwarf Error: Can't find .debug_str section.Dwarf Error: Invalid or unhandled FORM value: %u.ERROR: %s is compiled as absolute position code, whereas target %s is position independentERROR: %s is compiled as position independent code, whereas target %s is absolute positionERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%dERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%dERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %dERROR: %s passes floats in float registers, whereas %s passes them in integer registersERROR: %s passes floats in integer registers, whereas %s passes them in float registersERROR: %s uses FPA instructions, whereas %s uses VFP instructionsERROR: %s uses VFP instructions, whereas %s uses FPA instructionsERROR: %s uses hardware FP, whereas %s uses software FPERROR: %s uses software FP, whereas %s uses hardware FPEntry offset        = 0x%.8lx (%ld)
-Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%xError: out of memoryExport Directory [.edata (or where ever we found it)]Export Flags 			%lx
-Export RVAFAILED to find previous HI16 reloc
-File format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
+Bad valueCLR Runtime HeaderCPU              Debug DirectoryDelay Import DirectoryDescription DirectoryDwarf Error: Bad abbrev number: %u.Entry offset        = 0x%.8lx (%ld)
+Errors encountered processing file %sExport Directory [.edata (or where ever we found it)]Export Flags 			%lx
+Export RVAFile format is ambiguousFile format not recognizedFile in wrong formatFile too bigFile truncatedFlag field          = 0x%.2x
 GP relative relocation used when GP not definedGPDISP relocation did not find ldah and lda instructionsImport Address Table DirectoryImport Directory [parts of .idata]Internal inconsistency: remaining %u != max %u.
   Please report this bug.Invalid bfd targetInvalid operationLength              = 0x%.8lx (%ld)
-Linking mips16 objects into %s format is not supportedLoad Configuration DirectoryMalformed archiveMemory exhaustedMissing IHCONSTMissing IHIHALFName 				No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsOutput file requires shared library `%s'
+Load Configuration DirectoryMISC             Malformed archiveMemory exhaustedNORMALName 				No errorNo more archived filesNo symbolsNonrepresentable section on outputNot enough memory to sort relocationsOutput file requires shared library `%s'
 Output file requires shared library `%s.so.%s'
-PASSMECH not fully implementedPTA mismatch: a SHcompact address (bit 0 == 0)PTB mismatch: a SHmedia address (bit 0 == 1)Partition name      = "%s"
+POSIX            PTA mismatch: a SHcompact address (bit 0 == 0)PTB mismatch: a SHmedia address (bit 0 == 1)Partition name      = "%s"
 Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
 Partition[%d] length = 0x%.8lx (%ld)
 Partition[%d] sector = 0x%.8lx (%ld)
 Please report this bug.
-Reading archive file mod timestampRegister %%g%d used incompatibly: %s in %s, previously %s in %sRegister section has contents
-ReservedResource Directory [.rsrc]SDA relocation when _SDA_BASE_ not definedSection has no contentsSecurity DirectorySpecial DirectorySymbol `%s' has differing types: REGISTER in %s, previously %s in %sSymbol needs debug section which does not existSystem call errorTable Addresses
+Reading archive file mod timestampRegister section has contents
+ReservedResource Directory [.rsrc]SDA relocation when _SDA_BASE_ not definedSHELL            Section has no contentsSecurity DirectorySpecial DirectorySymbol needs debug section which does not existSystem call errorTable Addresses
 Thread Storage Directory [.tls]Time/Date stamp 		%lx
-Unhandled relocation %sUnknown basic type %dUnrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVariable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning: %s does not support interworking, whereas %s doesWarning: %s supports interworking, whereas %s does notWarning: Clearing the interworking flag of %s due to outside requestWarning: Not setting interworking flag of %s since it has already been specified as non-interworkingWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: size of symbol `%s' changed from %lu to %lu in %sWarning: type of symbol `%s' changed from %d to %d in %sWarning: writing archive was slow: rewriting timestamp
-Writing updated armap timestampbad section index in %scould not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gperror: undefined symbol __rtinitignoring reloc %s
-internal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: unknown errorinternal error: unsupported relocation errorlocal symbols in discarded section %smissing IHCONST relocmissing IHIHALF relocnot enough GOT space for local GOT entriesprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lx:reloc against unsupported sectionreloc not properly alignedreserved CTL cmd %dreserved OPR cmd %dreserved STO cmd %dstack-entry-mask not fully implementedstack-from-image not implementedstack-literal not fully implementedstack-local-symbol not fully implementedstack-local-symbol-entry-point-mask not fully implementedstatic procedure (no name)uncertain calling convention for non-COFF symbolunsupported STA cmd %sunsupported relocunsupported reloc typeusing multiple gp valuesv850 architecturev850e architecturev850ea architecturewarning: %s section has zero sizewarning: %s: local symbol `%s' has no sectionwarning: attempt to export undefined symbol `%s'warning: relocation against removed sectionwarning: relocation against removed section; zeroingwarning: type and size of dynamic symbol `%s' are not definedProject-Id-Version: bfd 2.12.91
-POT-Creation-Date: 2002-07-23 15:55-0400
-PO-Revision-Date: 2003-03-11 09:46+0800
-Last-Translator: Wang Li <charles@linux.net.cn>
+Unhandled relocation %sUnknown basic type %dUnrecognized TI COFF target id '0x%x'Unrecognized relocUnrecognized reloc type 0x%xUnsupported .stab relocationVariable `%s' can only be in one of the small, zero, and tiny data regionsVariable `%s' cannot be in both small and tiny data regions simultaneouslyVariable `%s' cannot be in both small and zero data regions simultaneouslyVariable `%s' cannot be in both zero and tiny data regions simultaneouslyVariable `%s' cannot occupy in multiple small data regionsWarning: Writing section `%s' to huge (ie negative) file offset 0x%lx.Warning: writing archive was slow: rewriting timestamp
+Writing updated armap timestamp[abi=16-bit int, [abi=32-bit int, bad section index in %scannot read EIHI
+could not locate special linker symbol __ctbpcould not locate special linker symbol __epcould not locate special linker symbol __gpcpu=HC11]cpu=HC12]cpu=HCS12]error: undefined symbol __rtinithidden symbolignoring reloc %s
+internal error: dangerous errorinternal error: dangerous relocationinternal error: out of range errorinternal error: unknown errorinternal error: unsupported relocation errorinternal symbolnot enough GOT space for local GOT entriesprivate flags = %lxprivate flags = %lx:private flags = %lx: private flags = %x:private flags = 0x%lx:protected symbolstatic procedure (no name)symboluncertain calling convention for non-COFF symbolunknownunknown errorunknown v850 architectureunsupported STA cmd %sunsupported relocunsupported reloc typeunsupported relocationusing multiple gp valuesv850 E3 architecturev850 architecturev850e architecturev850e1 architecturev850e2 architecturev850e2v3 architecturev850e3v5 architecturewarning: %s section has zero sizewarning: attempt to export undefined symbol `%s'warning: type and size of dynamic symbol `%s' are not definedProject-Id-Version: bfd 2.24.90
+Report-Msgid-Bugs-To: bug-binutils@gnu.org
+POT-Creation-Date: 2014-02-10 09:42+1030
+PO-Revision-Date: 2015-11-21 03:22-0500
+Last-Translator: Mingye Wang (Arthur2e5) <arthur200126@gmail.com>
 Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>
+Language: zh_CN
 MIME-Version: 1.0
-Content-Type: text/plain; charset=gb2312
+Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
-	µ¼³öµØÖ·±í 			Ãû³ÆÖ¸Õë±í 		
-	DLL Ãû³Æ£º%s
-
-      End+1 ·ûºÅ£º%-7ld   ÀàÐÍ£º%s
-      End+1 ·ûºÅ£º%ld
-      µÚÒ»¸ö·ûºÅ£º%ld
-      ±¾µØ·ûºÅ£º%ld
-      ÀàÐÍ£º%s
-      Ã¶¾Ù£»End+1 ·ûºÅ£º%ld
-      ½á¹¹£»End+1 ·ûºÅ£º%ld
-      ÁªºÏ£»End+1 ·ûºÅ£º%ld
-¶¯Ì¬½Ú£º
-
-·ÖÇø[%d] Æðµã  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
-
-³ÌÐòÍ·£º
-
-%s ÖÐµÄµ¼³ö±íÎ»ÓÚ 0x%lx
-
-°æ±¾ÒýÓÃ£º
-
-°æ±¾¶¨Òå£º
-  ³¢ÊÔÆôÓÃ --support-old-code ÖØÐÂÁ¬½Ó <²»¿ÉÊ¶±ðµÄ EABI °æ±¾> [32Î»Ä£Ê½] [FPA ¸¡µã¸ñÊ½] [VFP ¸¡µã¸ñÊ½] [°æ±¾1 EABI] [°æ±¾2 EABI] [abi Î´Öª] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [¾ø¶ÔÎ»ÖÃ] [cpu32] [¶¯Ì¬·ûºÅÊ¹ÓÃ¶ÎË÷Òý] [ÔÚ¸¡µã¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý] [ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý] [º¬ÓÐÈë¿Úµã] [ÆôÓÃ»¥²Ù×÷] [»¥²Ù×÷±êÖ¾Î´³õÊ¼»¯] [²»Ö§³Ö»¥²Ù×÷] [Ö§³Ö»¥²Ù×÷] [m68000] [mdmx] [mips16] [mips1] [mips2] [mips32] [mips3] [mips4] [mips5] [mips64] [ÐÂ ABI] [·Ç 32Î»Ä£Ê½] [¾É ABI] [Î»ÖÃÎÞ¹Ø] [¿ÉÖØÐÂ¶¨Î»µÄ¿ÉÖ´ÐÐ³ÌÐò] [Èí¼þ FP] [ÅÅÐò¹ýµÄ·ûºÅ±í] [·ûºÅÓÐ¸ö _ Ç°×º] [Î´ÖªµÄ ISA] [Î´ÅÅÐòµÄ·ûºÅ±í]#<ÎÞÐ§µÄ´íÎóÂë>%s (%s)£ººöÂÔ½Ú±êÖ¾ %s (0x%x)%s(%s+0x%lx)£º¹ØÓÚ SEC_MERGE ½ÚµÄÖØ¶¨Î» %s%s(%s+0x%lx)£ºÕýÔÚÐÞ¸´ %s%s£º%s£ºÎÞÐ§µÄ±Ø±¸°æ±¾ %d%s£º%s£ºÎÞÐ§µÄ°æ±¾ %u (×î´ó %d)%s£º%s£ºÖØ¶¨Î»Òç³ö£º0x%lx > 0xffff%s£º.got ×Ó½Ú³¬¹ýÁË 64K (´óÐ¡ %d)%s£º.opd ²»ÊÇ opd ÌõÄ¿µÄÆÕÍ¨Êý×é%s£ºDSO ÖÐ²»ÔÊÐí³öÏÖ .preinit_array ½Ú%s£º0x%lx£º¾¯¸æ£ºR_SH_USES Ö¸ÏòÎÞ·¨Ê¶±ðµÄÖ¸Áî 0x%x%s£º0x%lx£º¾¯¸æ£º´íÎóµÄ R_SH_USES ×°ÈëÆ«ÒÆÁ¿%s£º0x%lx£º¾¯¸æ£º´íÎóµÄ R_SH_USES Æ«ÒÆÁ¿%s£º0x%lx£º¾¯¸æ£º´íÎó¼ÆÊý%s£º0x%lx£º¾¯¸æ£ºÎÞ·¨ÕÒµ½Ô¤ÆÚµÄ COUNT ÖØ¶¨Î»%s£º0x%lx£º¾¯¸æ£ºÎÞ·¨ÕÒµ½Ô¤ÆÚµÄÖØ¶¨Î»%s£º0x%lx£º¾¯¸æ£ºÒâÍâ½ÚÖÐ³öÏÖ·ûºÅ%s£ºABI ²»Æ¥Åä£ºÕýÔÚ½«Ä£¿é %s Í¬Ç°Ò»¸öÄ£¿é %s ½øÐÐÁ¬½Ó%s£ºÌåÏµ½á¹¹Í¬Ç°Ò»¸öÄ£¿é²»Æ¥Åä%s£ºµ¼Èë´íÎóµÄÖØ¶¨Î»¼ÇÂ¼£º%d%s£º´íÎó£ºÖØ¸´¶¨Òå¡°%s¡±£»%s µÄÆðµãÔÚ´ËÇ°Á¬½ÓµÄÎÄ¼þÖÐÒÑÉè¶¨
-%s£ºGAS ´íÎó£ºÒâÍâµÄ´øÓÐ R_SH_PT_16 µÄ PTB Ö¸Áî%s£ºISA (%d) Í¬Ç°ÃæµÄÄ£¿é (%d) ²»Æ¥Åä%s£ºISA (-mips%d) Í¬Ç°ÃæµÄÄ£¿é(-mips%d)²»Æ¥Åä%s£ºÄÚ²¿²»Ò»ÖÂ£»Ã»ÓÐÖØ¶¨Î»½Ú %s%s£ºµ¼³öÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ£º%d%s£ºµ¼ÈëÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ£º%d%s£ºLOCAL Ö¸Áî£º¼Ä´æÆ÷ $%ld ²»ÊÇ±¾µØ¼Ä´æÆ÷¡£ µÚÒ»¸öÈ«¾Ö¼Ä´æÆ÷ÊÇ $%ld¡£%s£ºÃ»ÓÐ×ã¹»µÄ¿Õ¼ä±£´æ³ÌÐòÍ·£¨·ÖÅä %u£¬ÐèÒª %u£©%s£ºÃ»ÓÐ×ã¹»µÄ¿Õ¼ä±£´æ³ÌÐòÍ·£¬ÊÔÓÃ -N ½øÐÐÁ¬½Ó%s£ºÖ»ÓÐ¼Ä´æÆ÷ %%g[2367] ¿ÉÒÔÓÃ STT_REGISTER À´ÉùÃ÷%s£ºÖØ¶¨Î» %s ²»Ö§³Ö·ûºÅ %s¡£%s£ºÉÐ²»Ö§³Ö¹ØÓÚ·ûºÅ %s µÄÖØ¶¨Î» %s¡£%s£ºÎ´´¦ÀíµÄµ¼ÈëÀàÐÍ£»%x%s£ºÎ´ÖªµÄÖØ¶¨Î»ÀàÐÍ %d
-%s£ºa.out.adobe ÎÄ¼þÖÐ½ÚµÄÀàÐÍÎ´Öª£º%x
-%s£ºÎ´ÖªµÄÌØ¶¨Á¬½ÓÆ÷ÀàÐÍ %d%s£ºÎ´Ê¶±ðµÄµ¼ÈëÃû×ÖÀàÐÍ£»%x%s£ºÎ´Ê¶±ðµÄµ¼ÈëÀàÐÍ£»%x%s£º´íÎóµÄÖØ¶¨Î»½ÚÃû³Æ¡°%s¡±%s£º×Ö·û´®±íµÄ´óÐ¡´íÎó %lu%s£º´íÎóµÄ·ûºÅË÷Òý£º%d%s£ºÎÞ·¨ÔÚ a.out ¶ÔÏóÎÄ¼þ¸ñÊ½ÖÐ±íÊ¾½Ú¡°%s¡±%s£ºÎÞ·¨ÔÚ a.out ¶ÔÏóÎÄ¼þ¸ñÊ½ÖÐÎª·ûºÅ¡°%s¡±±íÊ¾½Ú%s£ºcheck_relocs£ºÎ´´¦ÀíµÄÖØ¶¨Î»ÀàÐÍ %d%s£º±àÒëÎª 32-Î»Ä¿±êÎÄ¼þµ« %s ÊÇ 64-Î»µÄ%s£º±àÒëÎª 64-Î»Ä¿±êÎÄ¼þµ« %s ÊÇ 32-Î»µÄ%s£ºÎª 64 Î»ÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇ 32 Î»µÄ%s£ºÎª´ó¶ËÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇÐ¡¶ËµÄ%s£ºÎªÐ¡¶ËÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇ´ó¶ËµÄ%s£ºÒÔ %s ±àÒë²¢Í¬ÒÔ %s ±àÒëµÄÄ£¿éÁ¬½Ó%s£ºÎÞ·¨ÕÒµ½Êä³ö½Ú %s%1$s£ºÎÞ·¨ÎªÊäÈë½Ú %3$s ÕÒµ½Êä³ö½Ú %2$s%s£ºÎÞ·¨Ð´³ö .cranges ÌõÄ¿%s£ºÎÞ·¨Ð´³ö¾­ÅÅÐòµÄ .cranges ÌõÄ¿%s£ºÖ¸Áî LOCAL Ö»¶Ô¼Ä´æÆ÷»ò¾ø¶ÔÖµÓÐÐ§%s£ºÔÚÊäÈëÖÐÓöµ½Êý¾Ý±êÇ©·ûºÅ%s£º´íÎó£ºÖØ¶¨Î» %s ²»ÊÇ 4 µÄ±¶Êý%1$s£ºÎ»ÓÚµØÖ· 0x%3$lx ´¦µÄ·Ç·¨ÖØ¶¨Î»ÀàÐÍ %2$d%s£º·Ç·¨µÄ½ÚÃû¡°%s¡±%s£ºÖØ¶¨Î»ÖÐ·Ç·¨µÄ·ûºÅË÷Òý£º%d%s£ºÎÞÐ§µÄ SHT_GROUP ÌõÄ¿%s£ºÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ %d%s£ºÌø×ª¹ýÔ¶
-%s£ºÐÐºÅÒç³ö£º0x%lx > 0xffff%s£º½« 64-Î»ÎÄ¼þÍ¬ 32-Î»ÎÄ¼þÁ¬½Ó%s£º½« PIC ÎÄ¼þÍ¬·Ç-PIC ÎÄ¼þÁ¬½Ó%s£º½«´ó¶ËÎÄ¼þÍ¬Ð¡¶ËÎÄ¼þ%s£ºÁ¬½ÓÐ¡¶ËÎÄ¼þºÍ´ó¶ËÎÄ¼þ%s£ºÃ»ÓÐ¹ØÓÚ½Ú %s µÄ×éÐÅÏ¢%s£ºÉÐÎ´ÍêÈ«ÊµÏÖ%s£ºÎ´ÊµÏÖ%s£º²»Ö§³Ö%s£ºÄ¿±êÎÄ¼þ´óÐ¡ºÍÄ¿±ê %s ²»Æ¥Åä%s£º²»Ö§³Ö´Ó %s µ½ %s µÄ¿ÉÖØ¶¨Î»µÄÁ¬½Ó%s£º´´½¨¹²ÏíÄ¿±êÎÄ¼þÊ±²»ÄÜÊ¹ÓÃÖØ¶¨Î» %s%s£º×Ö·û´®¹ý³¤ (%d ×Ö·û£¬×î´ó 65535)%s£º±ØÐèµÄ·ûºÅ¡°%s¡±²»´æÔÚ%s£º.opd ½ÚÖÐÎ´¶¨ÒåµÄ¡°%s¡±%s£ºÎ´¶¨ÒåµÄÓÐ°æ±¾·ûºÅÃû %s%s£º.opd ½ÚÖÐÒâÍâµÄÖØ¶¨Î»ÀàÐÍ %u%s£ºATN Ö®ºó³öÏÖÒâÍâµÄÀàÐÍ%s£ºÎ´´¦ÀíµÄ¹ØÓÚ %s µÄ¶¯Ì¬ÖØ¶¨Î»%s£ºÎ´ÊµÏÖµÄ %s
-%s£ºÎ´ÖªµÄÖØ¶¨Î»ÀàÐÍ %d%1$s£º¹ØÓÚ·ûºÅ %3$s µÄÎ´ÖªÖØ¶¨Î»ÀàÐÍ %2$d%s£ºÎÞ·¨Ê¶±ðµÄ¡°%s¡±±êÖ¾ 0x%x%1$s£ºÀ´×Ô %4$s ½ÚµÄ¹ØÓÚ·ûºÅ¡°%3$s¡±µÄÎÞ·¨½âÎöµÄÖØ¶¨Î» %2$s%s£º²»Ö§³ÖµÄÖØ¶¨Î»µÄÀàÐÍ %s%s£º²»Ö§³ÖµÄÖØ¶¨Î»ÀàÐÍ 0x%02x%s£ºÊ¹ÓÃ´ø _ Ç°×ºµÄ·ûºÅ£¬µ«ÒÔÎÞÇ°×º·ûºÅÐ´ÈëÎÄ¼þ%s£ºÊ¹ÓÃÎÞÇ°×º·ûºÅ£¬µ«ÒÔ´ø _ Ç°×ºµÄ·ûºÅÐ´ÈëÎÄ¼þ%s£º°æ±¾¼ÆÊý (%ld) ÎÞ·¨Æ¥Åä·ûºÅ¼ÆÊý (%ld)%s£º¾¯¸æ£º%s£ºÐÐºÅÒç³ö£º0x%lx > 0xffff%s£º¾¯¸æ£º·¢ÏÖ¿ÕµÄ¿É×°Èë¶Î£¬ËüÊÇÄÚ²¿µÄ£¿
-%s£º¾¯¸æ£ºÒÑ·ÖÅäµÄ½Ú¡°%s¡±²»ÔÚ¶ÎÖÐ%s£º¾¯¸æ£ºÎª¡°%s¡±¸´ÖÆÐÐºÅÐÅÏ¢%s£º¾¯¸æ£ºÐÐºÅÖÐµÄ·Ç·¨·ûºÅË÷Òý %ld%s£º¾¯¸æ£ºÖØ¶¨Î»ÖÐ·Ç·¨µÄ·ûºÅË÷Òý %ld%s£º¾¯¸æ£ºÒâÍâµÄÖØÐÂ¶¨Òå¡°%s¡±%1$s£º¾¯¸æ£ºÀ´×Ô %3$s ½ÚµÄ¹ØÓÚ·ûºÅ¡°%2$s¡±µÄ²»¿É½âÎöµÄÖØ¶¨Î»%s£º%d£ºIntel Ê®Áù½øÖÆÎÄ¼þÖÐµÄÒâÍâ×Ö·û¡°%s
-%s£º%u£ºIntel Ê®Áù½øÖÆÎÄ¼þÖÐµÄÐ£ÑéºÍ´íÎó (Ó¦Îª %u¡¢ÊµÎª %u)*Î´Öª*.got ½Ú²»ÄÜ½ô½ÓÔÚ .plt ½ÚÖ®ºó£ºm32r Ö¸Áî£ºm32rx Ö¸Áî<ÎÞ·¨Ê¶±ðµÄ±êÖ¾Î»¼¯ºÏ><Î´Öª>¹éµµÃ»ÓÐË÷Òý£»ÔËÐÐ ranlib ÒÔÌí¼ÓÒ»¸ö¹éµµÄ¿±êÎÄ¼þ¸ñÊ½´íÎóBFD %s ¶ÏÑÔÊ§°Ü %s£º%dBFD %1$s ÄÚ²¿´íÎó£¬Òì³£ÖÐÖ¹ÓÚ %3$d ÐÐµÄ %2$s
-BFD %1$s ÄÚ²¿´íÎó£¬Òì³£ÖÐÖ¹ÓÚ %4$s µÄ %3$d ÐÐµÄ %2$s
-´íÎóµÄÖµÎÞ·¨Îª %s ÕÒµ½ÖØ¶¨Î»½Úµ÷ÊÔÄ¿Â¼ÑÓ³Ùµ¼ÈëÄ¿Â¼ÃèÊöÄ¿Â¼Ð¡´íÎó£º´íÎóµÄËõÐ´±àºÅ£º%u¡£Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_abbrev ½Ú¡£Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_line ½Ú¡£Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_str ½Ú¡£Ð¡´íÎó£ºÎÞÐ§»òÎ´´¦ÀíµÄ±íµ¥Öµ£º%u¡£´íÎó£º%s ±»±àÒëÎª¾ø¶ÔÎ»ÖÃ´úÂë£¬¶øÄ¿±ê %s ÊÇÎ»ÖÃÎÞ¹ØµÄ´íÎó£º%s ±»±àÒëÎªÎ»ÖÃÎÞ¹Ø´úÂë£¬¶øÄ¿±ê %s ²ÉÓÃ¾ø¶ÔÎ»ÖÃ´íÎó£º%s ÊÇÎª APCS-%d ±àÒëµÄ£¬¶ø %s ÊÇÎª APCS-%d ±àÒëµÄ´íÎó£º%s ÊÇÎª APCS-%d ±àÒëµÄ£¬¶øÄ¿±ê %s Ê¹ÓÃ APCS-%d´íÎó£º%s ÊÇÎª EABI °æ±¾ %d ±àÒëµÄ£¬¶ø %s ÔòÊÇÎª°æ±¾ %d ±àÒëµÄ´íÎó£º%s ÔÚ¸¡µã¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý£¬¶ø %s ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝËüÃÇ´íÎó£º%s ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý£¬¶ø %s ÔÚ¸¡µãÊý¼Ä´æÆ÷ÖÐ´«µÝËüÃÇ´íÎó£º%s Ê¹ÓÃ FPA Ö¸Áî£¬¶ø %s Ê¹ÓÃ VFP Ö¸Áî´íÎó£º%s Ê¹ÓÃ VFP Ö¸Áî£¬¶ø %s Ê¹ÓÃ FPA Ö¸Áî´íÎó£º%s Ê¹ÓÃÓ²¼þ FP£¬¶ø %s Ê¹ÓÃÈí¼þ FP´íÎó£º%s Ê¹ÓÃÈí¼þ FP£¬¶ø %s Ê¹ÓÃÓ²¼þ FPÌõÄ¿Æ«ÒÆÁ¿        = 0x%.8lx (%ld)
-´íÎó£º¶Î (%s) ÖÐµÄµÚÒ»¸ö½Ú¿ªÊ¼ÓÚ 0x%x£¬È»¶ø¶Î¿ªÊ¼ÓÚ 0x%x´íÎó£ºÃ»ÓÐÄÚ´æµ¼³öÄ¿Â¼ [.edata (»òÕßÆäËüÈÎºÎÄÜÕÒµ½ËüµÄµØ·½)]µ¼³ö±êÖ¾ 			%lx
-µ¼³ö RVAÑ°ÕÒÉÏÒ»¸ö HI16 ÖØ¶¨Î»Ê§°Ü
-¶þÒåÐÔµÄÎÄ¼þ¸ñÊ½²»¿ÉÊ¶±ðµÄÎÄ¼þ¸ñÊ½ÎÄ¼þ¸ñÊ½´íÎóÎÄ¼þ¹ý´óÎÄ¼þ±»½Ø¶Ï±êÖ¾Óò          = 0x%.2x
-ÔÚ GP Î´¶¨ÒåµÄÇé¿öÏÂÊ¹ÓÃÁË GP Ïà¶ÔÖØ¶¨Î»GPDISP ÖØ¶¨Î»ÎÞ·¨ÕÒµ½ ldah ºÍ lda Ö¸Áîµ¼ÈëµØÖ·±íÄ¿Â¼µ¼ÈëÄ¿Â¼ [.idata µÄÒ»²¿·Ö]ÄÚ²¿²»Ò»ÖÂ£ºÊ£Óà %u != ×î´ó %u¡£
-  Çë±¨¸æ¸Ã bug¡£ÎÞÐ§µÄ bfd Ä¿±êÎÞÐ§µÄ²Ù×÷³¤¶È              = 0x%.8lx (%ld)
-½« mips16 Ä¿±êÎÄ¼þÁ¬½Óµ½ %s ¸ñÊ½ÊÇ²»Ö§³ÖµÄ×°ÈëÅäÖÃÄ¿Â¼»ûÐÎµÄ¹éµµÄÚ´æºÄ¾¡ÒÅÊ§ IHCONSTÒÅÊ§ IHIHALFÃû³Æ 				ÎÞ´íÎóÃ»ÓÐ¸ü¶àµÄ¹éµµÎÄ¼þÎÞ·ûºÅÊä³ö²»¿É±íÊ¾µÄ½ÚÃ»ÓÐ×ã¹»µÄÄÚ´æ½øÐÐÖØ¶¨Î»ÅÅÐòÊä³öÎÄ¼þÐèÒª¹²Ïí¿â¡°%s¡±
-Êä³öÎÄ¼þÐèÒª¹²Ïí¿â¡°%s.so.%s¡±
-ÉÐÎ´ÍêÈ«ÊµÏÖ PASSMECHPTA ²»Æ¥Åä£ºSHcompact µØÖ· (Î» 0 == 0)PTB ²»Æ¥Åä£ºSHmedia µØÖ· (Î» 0 == 1)·ÖÇøÃû      = "%s"
-·ÖÇø[%d] ÖÕµã    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
-·ÖÇø[%d] ³¤¶È = 0x%.8lx (%ld)
-·ÖÇø[%d] ÉÈÇø = 0x%.8lx (%ld)
-Çë±¨¸æ¸Ã BUG¡£
-ÕýÔÚ¶ÁÈëÎÄ¼þÐÞ¸ÄÊ±¼ä´Á²»¼æÈÝµØÊ¹ÓÃ¼Ä´æÆ÷ %%g%1$d£ºÔÚ %3$s ÖÐÎª %2$s£¬ÔÚÇ°ÃæµÄ %5$s ÖÐÎª %4$s¼Ä´æÆ÷½ÚÓÐÄÚÈÝ
-±£Áô×ÊÔ´Ä¿Â¼ [.rsrc]ÔÚ _SDA_BASE_ Î´¶¨ÒåÊ±³öÏÖ SDA ÖØ¶¨Î»½ÚÃ»ÓÐÄÚÈÝ°²È«Ä¿Â¼ÌØÊâÄ¿Â¼·ûºÅ¡°%1$s¡±µÄÀàÐÍ²»Í¬£º%2$s ÖÐÎª¼Ä´æÆ÷£¬ÔÚÇ°ÃæµÄ %4$s ÖÐÎª %3$s·ûºÅÐèÒª²»´æÔÚµÄµ÷ÊÔ½ÚÏµÍ³µ÷ÓÃ´íÎó±íµØÖ·
-Ïß³Ì´æ´¢Ä¿Â¼ [.tls]ÈÕÆÚ/Ê±¼ä´Á 		%lx
-Î´´¦ÀíµÄÖØ¶¨Î» %sÎ´ÖªµÄ»ù±¾ÀàÐÍ %dÎÞ·¨Ê¶±ðµÄ TI COFF Ä¿±ê id ¡°0x%x¡±ÎÞ·¨Ê¶±ðµÄÖØ¶¨Î»ÎÞ·¨Ê¶±ðµÄÖØ¶¨Î»ÀàÐÍ 0x%x²»Ö§³ÖµÄ .stab ÖØ¶¨Î»±äÁ¿¡°%s¡±Ö»ÄÜ³öÏÖÔÚÐ¡Êý¾ÝÇø¡¢ÁãÊý¾ÝÇø¡¢Î¢Êý¾ÝÇøÖ®Ò»±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÐ¡Êý¾ÝÇøºÍÎ¢Êý¾ÝÇø±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÐ¡Êý¾ÝÇøºÍÁãÊý¾ÝÇø±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÁãÊý¾ÝÇøºÍÎ¢Êý¾ÝÇø±äÁ¿¡°%s¡±²»ÄÜÕ¼¾Ý¶à¸öÐ¡Êý¾ÝÇø¾¯¸æ£º%s ²»Ö§³Ö»¥²Ù×÷£¬¶ø %s Ö§³Ö¾¯¸æ£º%s Ö§³Ö»¥²Ù×÷£¬¶ø %s ²»Ö§³Ö¾¯¸æ£ºÕýÔÚ¸ù¾ÝÍâ½çÇëÇóÇå³ý %s µÄ»¥²Ù×÷±êÖ¾¾¯¸æ£ºÓÉÓÚ %s ÒÑ¾­±»Ö¸¶¨Îª²»¿É»¥²Ù×÷µÄ£¬Òò¶øÃ»ÓÐÉè¶¨»¥²Ù×÷±êÖ¾¾¯¸æ£º½«½Ú¡°%s¡±Ð´Èë¹ý´ó(ÀýÈç¸ºÊý)ÎÄ¼þÆ«ÒÆÁ¿µÄÎ»ÖÃ 0x%lx¡£¾¯¸æ£º%4$s ÖÐµÄ·ûºÅ¡°%1$s¡±µÄ´óÐ¡ÓÉ %2$lu ±äÎª %3$lu¾¯¸æ£º%4$s ÖÐµÄ·ûºÅ¡°%1$s¡±µÄÀàÐÍÓÉ %2$d ±äÎª %3$d¾¯¸æ£ºÐ´Èë¹éµµ¹ýÂý£ºÖØÐÂÐ´ÈëÊ±¼ä´Á
-ÕýÔÚ¸üÐÂ armap Ê±¼ä´Á%s ÖÐµÄ´íÎó½ÚË÷ÒýÎÞ·¨¶¨Î»ÌØÊâÁª»úÆ÷·ûºÅ __ctbpÎÞ·¨¶¨Î»ÌØÊâÁ¬½ÓÆ÷·ûºÅ __epÎÞ·¨¶¨Î»ÌØÊâÁ¬½ÓÆ÷·ûºÅ __gp´íÎó£ºÎ´¶¨ÒåµÄ·ûºÅ __rtinitÕýÔÚºöÂÔÖØ¶¨Î» %s
-ÄÚ²¿´íÎó£ºÎ£ÏÕµÄ´íÎóÄÚ²¿´íÎó£ºÎ£ÏÕµÄÖØ¶¨Î»ÄÚ²¿´íÎó£º³¬³ö·¶Î§´íÎóÄÚ²¿´íÎó£ºÎ´ÖªµÄ´íÎóÄÚ²¿´íÎó£º²»Ö§³ÖµÄÖØ¶¨Î»´íÎóÒÑ½ûÓÃµÄ½Ú %s ÖÐµÄ±¾µØ·ûºÅÒÅÊ§ IHCONST ÖØ¶¨Î»ÒÅÊ§ IHIHALF ÖØ¶¨Î»Ã»ÓÐ×ã¹»µÄ GOT ¿Õ¼äÓÃÓÚ GOT ÌõÄ¿Ë½ÓÐ±êÖ¾ = %lxË½ÓÐ±êÖ¾ = %lx£ºË½ÓÐ±êÖ¾ = %lx£ºË½ÓÐ±êÖ¾ = %x£ºË½ÓÐ±êÖ¾ = 0x%lx£º¹ØÓÚ²»Ö§³Ö½ÚµÄÖØ¶¨Î»ÖØ¶¨Î»Ã»ÓÐÕýÈ·¶ÔÆë±£ÁôµÄ CTL ÃüÁî %d±£ÁôµÄ OPR ÃüÁî %d±£ÁôµÄ STO ÃüÁî %dÉÐÎ´ÍêÈ«ÊµÏÖ stack-entry-maskÎ´ÊµÏÖ stack-from-imageÉÐÎ´ÍêÈ«ÊµÏÖ stack-literalÉÐÎ´ÍêÈ«ÊµÏÖ stack-local-symbolÉÐÎ´ÍêÈ«ÊµÏÖ stack-local-symbol-entry-point-mask¾²Ì¬¹ý³Ì (ÎÞÃû³Æ)¹ØÓÚ·Ç-COFF ·ûºÅ²»È·¶¨µÄµ÷ÓÃÔ¼¶¨²»Ö§³ÖµÄ STA ÃüÁî %s²»Ö§³ÖµÄÖØ¶¨Î»²»Ö§³ÖµÄÖØ¶¨Î»ÀàÐÍÊ¹ÓÃÁË¶à¸ö GP Öµv850 ÌåÏµ½á¹¹v850e ÌåÏµ½á¹¹v850ea ÌåÏµ½á¹¹¾¯¸æ£º%s ½ÚµÄ´óÐ¡ÎªÁã¾¯¸æ£º%s£º±¾µØ·ûºÅ¡°%s¡±Ã»ÓÐ½Ú¾¯¸æ£ºÊÔÍ¼µ¼³öÎ´¶¨ÒåµÄ·ûºÅ¡°%s¡±¾¯¸æ£º¹ØÓÚÒÑÉ¾³ýµÄ½ÚµÄÖØ¶¨Î»¾¯¸æ£º¹ØÓÚÒÑÉ¾³ýµÄ½ÚµÄÖØ¶¨Î»£»ÕýÔÚÇåÁã¾¯¸æ£º¶¯Ì¬·ûºÅ¡°%s¡±µÄÀàÐÍºÍ´óÐ¡Î´¶¨Òå
\ No newline at end of file
+X-Generator: Poedit 1.8.6
+Plural-Forms: nplurals=1; plural=0;
+	å¯¼å‡ºåœ°å�€è¡¨ 			å��ç§°æŒ‡é’ˆè¡¨ 		
+	DLL å��ç§°ï¼š%s
+
+      End+1 ç¬¦å�·ï¼š%-7ld   ç±»åž‹ï¼š%s
+      End+1 ç¬¦å�·ï¼š%ld
+      ç¬¬ä¸€ä¸ªç¬¦å�·ï¼š%ld
+      æœ¬åœ°ç¬¦å�·ï¼š%ld
+      ç±»åž‹ï¼š%s
+      æžšä¸¾ï¼›End+1 ç¬¦å�·ï¼š%ld
+      ç»“æž„ï¼›End+1 ç¬¦å�·ï¼š%ld
+      è�”å�ˆï¼›End+1 ç¬¦å�·ï¼š%ld
+åŠ¨æ€�èŠ‚ï¼š
+
+åˆ†åŒº[%d] èµ·ç‚¹  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+
+ç¨‹åº�å¤´ï¼š
+
+%s ä¸­çš„å¯¼å‡ºè¡¨ä½�äºŽ 0x%lx
+
+ç‰ˆæœ¬å¼•ç”¨ï¼š
+
+ç‰ˆæœ¬å®šä¹‰ï¼š
+ <ä¸�å�¯è¯†åˆ«çš„ EABI ç‰ˆæœ¬> [FPA æµ®ç‚¹æ ¼å¼�] [VFP æµ®ç‚¹æ ¼å¼�] [ç‰ˆæœ¬1 EABI] [ç‰ˆæœ¬2 EABI] [abi æœªçŸ¥] [abi=64] [abi=EABI32] [abi=EABI64] [abi=N32] [abi=O32] [abi=O64] [ç»�å¯¹ä½�ç½®] [åŠ¨æ€�ç¬¦å�·ä½¿ç”¨æ®µç´¢å¼•] [åœ¨æµ®ç‚¹å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°] [åœ¨æ•´æ•°å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°] [å�«æœ‰å…¥å�£ç‚¹] [å�¯ç”¨äº’æ“�ä½œ] [äº’æ“�ä½œæ ‡å¿—æœªåˆ�å§‹åŒ–] [ä¸�æ”¯æŒ�äº’æ“�ä½œ] [æ”¯æŒ�äº’æ“�ä½œ] [memory=bank-model] [memory=flat] [æ–° ABI] [é�ž 32ä½�æ¨¡å¼�] [æ—§ ABI] [ä½�ç½®æ— å…³] [å�¯é‡�æ–°å®šä½�çš„å�¯æ‰§è¡Œç¨‹åº�] [è½¯ä»¶ FP] [æŽ’åº�è¿‡çš„ç¬¦å�·è¡¨] [ç¬¦å�·æœ‰ä¸ª _ å‰�ç¼€] [æœªçŸ¥çš„ ISA] [æœªæŽ’åº�çš„ç¬¦å�·è¡¨]#<æ— æ•ˆé”™è¯¯ç �>%sï¼š%sï¼šé‡�å®šä½�æº¢å‡ºï¼š0x%lx > 0xffff%sï¼šé”™è¯¯ï¼šé‡�å¤�å®šä¹‰â€œ%sâ€�ï¼›%s çš„èµ·ç‚¹åœ¨æ­¤å‰�è¿žæŽ¥çš„æ–‡ä»¶ä¸­å·²è®¾å®š
+%sï¼šGAS é”™è¯¯ï¼šæ„�å¤–çš„å¸¦æœ‰ R_SH_PT_16 çš„ PTB æŒ‡ä»¤%sï¼šå¯¼å‡ºäº†æ— æ•ˆçš„é‡�å®šä½�ç±»åž‹ï¼š%d%sï¼šLOCAL æŒ‡ä»¤ï¼šå¯„å­˜å™¨ $%ld ä¸�æ˜¯æœ¬åœ°å¯„å­˜å™¨ã€‚ ç¬¬ä¸€ä¸ªå…¨å±€å¯„å­˜å™¨æ˜¯ $%ldã€‚%sï¼šæ— æ³•åœ¨ a.out å¯¹è±¡æ–‡ä»¶æ ¼å¼�ä¸­è¡¨ç¤ºèŠ‚â€œ%sâ€�%sï¼šæ— æ³•åœ¨ a.out å¯¹è±¡æ–‡ä»¶æ ¼å¼�ä¸­ä¸ºç¬¦å�·â€œ%sâ€�è¡¨ç¤ºèŠ‚%sï¼šç¼–è¯‘ä¸º 32-ä½�ç›®æ ‡æ–‡ä»¶ä½† %s æ˜¯ 64-ä½�çš„%sï¼šç¼–è¯‘ä¸º 64-ä½�ç›®æ ‡æ–‡ä»¶ä½† %s æ˜¯ 32-ä½�çš„%sï¼šä»¥ %s ç¼–è¯‘å¹¶å�Œä»¥ %s ç¼–è¯‘çš„æ¨¡å�—è¿žæŽ¥%sï¼šæ— æ³•å†™å‡º .cranges æ�¡ç›®%sï¼šæ— æ³•å†™å‡ºç»�æŽ’åº�çš„ .cranges æ�¡ç›®%sï¼šæŒ‡ä»¤ LOCAL å�ªå¯¹å¯„å­˜å™¨æˆ–ç»�å¯¹å€¼æœ‰æ•ˆ%sï¼šåœ¨è¾“å…¥ä¸­é�‡åˆ°æ•°æ�®æ ‡ç­¾ç¬¦å�·%sï¼šé�žæ³•çš„èŠ‚å��â€œ%sâ€�%sï¼šè¡Œå�·æº¢å‡ºï¼š0x%lx > 0xffff%sï¼šæœªå®žçŽ°%sï¼šä¸�æ”¯æŒ�%sï¼šç›®æ ‡æ–‡ä»¶å¤§å°�å’Œç›®æ ‡ %s ä¸�åŒ¹é…�%sï¼šå­—ç¬¦ä¸²è¿‡é•¿ (%d å­—ç¬¦ï¼Œæœ€å¤§ 65535)%sï¼šæœªçŸ¥çš„é‡�å®šä½�ç±»åž‹ %d%sï¼šæ— æ³•è¯†åˆ«çš„â€œ%sâ€�æ ‡å¿— 0x%x%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�ç±»åž‹ 0x%02x%sï¼šç‰ˆæœ¬è®¡æ•° (%ld) æ— æ³•åŒ¹é…�ç¬¦å�·è®¡æ•° (%ld)%sï¼šè­¦å‘Šï¼š%sï¼šè¡Œå�·æº¢å‡ºï¼š0x%lx > 0xffff%sï¼šè­¦å‘Šï¼šé‡�å®šä½�ä¸­é�žæ³•çš„ç¬¦å�·ç´¢å¼• %ld*æœªçŸ¥**æœªçŸ¥*           .got èŠ‚ä¸�èƒ½ç´§æŽ¥åœ¨ .plt èŠ‚ä¹‹å�Ž32-bit double, 64-bit double, ï¼šm32r æŒ‡ä»¤: m32r2 æŒ‡ä»¤ï¼šm32rx æŒ‡ä»¤<æ— æ³•è¯†åˆ«çš„æ ‡å¿—ä½�é›†å�ˆ><æœªçŸ¥>å½’æ¡£æ²¡æœ‰ç´¢å¼•ï¼›è¿�è¡Œ ranlib ä»¥æ·»åŠ ä¸€ä¸ªå½’æ¡£ç›®æ ‡æ–‡ä»¶æ ¼å¼�é”™è¯¯BFD %s æ–­è¨€å¤±è´¥ %sï¼š%dBFD %1$s å†…éƒ¨é”™è¯¯ï¼Œå¼‚å¸¸ä¸­æ­¢äºŽ %3$d è¡Œçš„ %2$s
+BFD %1$s å†…éƒ¨é”™è¯¯ï¼Œå¼‚å¸¸ä¸­æ­¢äºŽ %4$s çš„ %3$d è¡Œçš„ %2$s
+é”™è¯¯çš„å€¼CLR è¿�è¡Œæ—¶æ ‡å¤´CPU              è°ƒè¯•ç›®å½•å»¶è¿Ÿå¯¼å…¥ç›®å½•æ��è¿°ç›®å½•å°�é”™è¯¯ï¼šé”™è¯¯çš„ç¼©å†™ç¼–å�·ï¼š%uã€‚æ�¡ç›®å��ç§»é‡�        = 0x%.8lx (%ld)
+å¤„ç�†æ–‡ä»¶ %s æ—¶é�‡åˆ°é”™è¯¯å¯¼å‡ºç›®å½• [.edata (æˆ–è€…å…¶å®ƒä»»ä½•èƒ½æ‰¾åˆ°å®ƒçš„åœ°æ–¹)]å¯¼å‡ºæ ‡å¿— 			%lx
+å¯¼å‡º RVAå­˜æœ‰æ­§ä¹‰çš„æ–‡ä»¶æ ¼å¼�ä¸�å�¯è¯†åˆ«çš„æ–‡ä»¶æ ¼å¼�æ–‡ä»¶æ ¼å¼�é”™è¯¯æ–‡ä»¶è¿‡å¤§æ–‡ä»¶è¢«æˆªæ–­æ ‡å¿—åŸŸ          = 0x%.2x
+åœ¨ GP æœªå®šä¹‰çš„æƒ…å†µä¸‹ä½¿ç”¨äº† GP ç›¸å¯¹é‡�å®šä½�GPDISP é‡�å®šä½�æ— æ³•æ‰¾åˆ° ldah å’Œ lda æŒ‡ä»¤å¯¼å…¥åœ°å�€è¡¨ç›®å½•å¯¼å…¥ç›®å½• [.idata çš„ä¸€éƒ¨åˆ†]å†…éƒ¨ä¸�ä¸€è‡´ï¼šå‰©ä½™ %u != æœ€å¤§ %uã€‚
+  è¯·æŠ¥å‘Šè¯¥ bugã€‚æ— æ•ˆçš„ bfd ç›®æ ‡æ— æ•ˆçš„æ“�ä½œé•¿åº¦              = 0x%.8lx (%ld)
+è£…å…¥é…�ç½®ç›®å½•æ�‚é¡¹             ç•¸å½¢çš„å½’æ¡£å†…å­˜è€—å°½ä¸€èˆ¬å��ç§° 				æ— é”™è¯¯æ²¡æœ‰æ›´å¤šçš„å½’æ¡£æ–‡ä»¶æ— ç¬¦å�·è¾“å‡ºä¸�å�¯è¡¨ç¤ºçš„èŠ‚æ²¡æœ‰è¶³å¤Ÿçš„å†…å­˜è¿›è¡Œé‡�å®šä½�æŽ’åº�è¾“å‡ºæ–‡ä»¶éœ€è¦�å…±äº«åº“â€œ%sâ€�
+è¾“å‡ºæ–‡ä»¶éœ€è¦�å…±äº«åº“â€œ%s.so.%sâ€�
+POSIX            PTA ä¸�åŒ¹é…�ï¼šSHcompact åœ°å�€ (ä½� 0 == 0)PTB ä¸�åŒ¹é…�ï¼šSHmedia åœ°å�€ (ä½� 0 == 1)åˆ†åŒºå��      = "%s"
+åˆ†åŒº[%d] ç»ˆç‚¹    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }
+åˆ†åŒº[%d] é•¿åº¦ = 0x%.8lx (%ld)
+åˆ†åŒº[%d] æ‰‡åŒº = 0x%.8lx (%ld)
+è¯·æŠ¥å‘Šè¯¥ BUGã€‚
+æ­£åœ¨è¯»å…¥æ–‡ä»¶ä¿®æ”¹æ—¶é—´æˆ³å¯„å­˜å™¨èŠ‚æœ‰å†…å®¹
+ä¿�ç•™èµ„æº�ç›®å½• [.rsrc]åœ¨ _SDA_BASE_ æœªå®šä¹‰æ—¶å‡ºçŽ° SDA é‡�å®šä½�SHELL            èŠ‚ä¸�å�«å†…å®¹å®‰å…¨ç›®å½•ç‰¹æ®Šç›®å½•ç¬¦å�·éœ€è¦�ä¸�å­˜åœ¨çš„è°ƒè¯•èŠ‚ç³»ç»Ÿè°ƒç”¨é”™è¯¯è¡¨åœ°å�€
+çº¿ç¨‹å­˜å‚¨ç›®å½• [.tls]æ—¥æœŸ/æ—¶é—´æˆ³ 		%lx
+æœªå¤„ç�†çš„é‡�å®šä½� %sæœªçŸ¥çš„åŸºæœ¬ç±»åž‹ %dæ— æ³•è¯†åˆ«çš„ TI COFF ç›®æ ‡ id â€œ0x%xâ€�æ— æ³•è¯†åˆ«çš„é‡�å®šä½�æ— æ³•è¯†åˆ«çš„é‡�å®šä½�ç±»åž‹ 0x%xä¸�æ”¯æŒ�çš„ .stab é‡�å®šä½�å�˜é‡�â€œ%sâ€�å�ªèƒ½å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºã€�é›¶æ•°æ�®åŒºã€�å¾®æ•°æ�®åŒºä¹‹ä¸€å�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºå’Œå¾®æ•°æ�®åŒºå�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºå’Œé›¶æ•°æ�®åŒºå�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨é›¶æ•°æ�®åŒºå’Œå¾®æ•°æ�®åŒºå�˜é‡�â€œ%sâ€�ä¸�èƒ½å� æ�®å¤šä¸ªå°�æ•°æ�®åŒºè­¦å‘Šï¼šå°†èŠ‚â€œ%sâ€�å†™å…¥è¿‡å¤§(ä¾‹å¦‚è´Ÿæ•°)æ–‡ä»¶å��ç§»é‡�çš„ä½�ç½® 0x%lxã€‚è­¦å‘Šï¼šå†™å…¥å½’æ¡£è¿‡æ…¢ï¼šé‡�æ–°å†™å…¥æ—¶é—´æˆ³
+æ­£åœ¨æ›´æ–° armap æ—¶é—´æˆ³[abi=16-bit int, [abi=32-bit int, %s ä¸­çš„é”™è¯¯èŠ‚ç´¢å¼•æ— æ³•è¯»å…¥ EIHI
+æ— æ³•å®šä½�ç‰¹æ®Šè�”æœºå™¨ç¬¦å�· __ctbpæ— æ³•å®šä½�ç‰¹æ®Šè¿žæŽ¥å™¨ç¬¦å�· __epæ— æ³•å®šä½�ç‰¹æ®Šè¿žæŽ¥å™¨ç¬¦å�· __gpcpu=HC11]cpu=HC12]cpu=HCS12]é”™è¯¯ï¼šæœªå®šä¹‰çš„ç¬¦å�· __rtinitéš�è—�ç¬¦å�·æ­£åœ¨å¿½ç•¥é‡�å®šä½� %s
+å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é”™è¯¯å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é‡�å®šä½�å†…éƒ¨é”™è¯¯ï¼šè¶…å‡ºèŒƒå›´é”™è¯¯å†…éƒ¨é”™è¯¯ï¼šæœªçŸ¥çš„é”™è¯¯å†…éƒ¨é”™è¯¯ï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�é”™è¯¯å†…éƒ¨ç¬¦å�·æ²¡æœ‰è¶³å¤Ÿçš„ GOT ç©ºé—´ç”¨äºŽ GOT æ�¡ç›®ç§�æœ‰æ ‡å¿— = %lxç§�æœ‰æ ‡å¿— = %lxï¼šç§�æœ‰æ ‡å¿— = %lxï¼šç§�æœ‰æ ‡å¿— = %xï¼šç§�æœ‰æ ‡å¿— = 0x%lxï¼šå�—ä¿�æŠ¤ç¬¦å�·é�™æ€�è¿‡ç¨‹ (æ— å��ç§°)ç¬¦å�·å…³äºŽé�ž-COFF ç¬¦å�·ä¸�ç¡®å®šçš„è°ƒç”¨çº¦å®šæœªçŸ¥æœªçŸ¥é”™è¯¯æœªçŸ¥çš„ v850 ä½“ç³»ç»“æž„ä¸�æ”¯æŒ�çš„ STA å‘½ä»¤ %sä¸�æ”¯æŒ�çš„é‡�å®šä½�ä¸�æ”¯æŒ�çš„é‡�å®šä½�ç±»åž‹ä¸�æ”¯æŒ�çš„é‡�å®šä½�ä½¿ç”¨äº†å¤šä¸ª GP å€¼v850 e3 ä½“ç³»ç»“æž„v850 ä½“ç³»ç»“æž„v850e ä½“ç³»ç»“æž„v850e1 ä½“ç³»ç»“æž„v850e2 ä½“ç³»ç»“æž„v850e2v3 ä½“ç³»ç»“æž„v850e3v5 ä½“ç³»ç»“æž„è­¦å‘Šï¼š%s èŠ‚çš„å¤§å°�ä¸ºé›¶è­¦å‘Šï¼šè¯•å›¾å¯¼å‡ºæœªå®šä¹‰çš„ç¬¦å�·â€œ%sâ€�è­¦å‘Šï¼šåŠ¨æ€�ç¬¦å�·â€œ%sâ€�çš„ç±»åž‹å’Œå¤§å°�æœªå®šä¹‰
\ No newline at end of file
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/zh_CN.po ./bfd/po/zh_CN.po
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/po/zh_CN.po	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/po/zh_CN.po	2017-03-06 01:49:05.000000000 +0000
@@ -1,2562 +1,6578 @@
-# SOME DESCRIPTIVE TITLE.
+# bfd in zh_CN
 # Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the binutils package.
 # Wang Li <charles@linux.net.cn>, 2003.
+# Wei-Lun Chao <bluebat@member.fsf.org>, 2005, 2013.
+# Mingye Wang <arthur200126@gmail.com>, 2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2003-03-11 09:46+0800\n"
-"Last-Translator: Wang Li <charles@linux.net.cn>\n"
+"Project-Id-Version: bfd 2.24.90\n"
+"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
+"POT-Creation-Date: 2014-02-10 09:42+1030\n"
+"PO-Revision-Date: 2015-11-21 03:22-0500\n"
+"Last-Translator: Mingye Wang (Arthur2e5) <arthur200126@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=gb2312\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.6\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 
-#: aout-adobe.c:197
-#, c-format
-msgid "%s: Unknown section type in a.out.adobe file: %x\n"
-msgstr "%s£ºa.out.adobe ÎÄ¼þÖÐ½ÚµÄÀàÐÍÎ´Öª£º%x\n"
+#: aout-adobe.c:127
+#, fuzzy
+msgid "%B: Unknown section type in a.out.adobe file: %x\n"
+msgstr "%sï¼ša.out.adobe æ–‡ä»¶ä¸­èŠ‚çš„ç±»åž‹æœªçŸ¥ï¼š%x\n"
 
-#: aout-cris.c:208
+#: aout-cris.c:200
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
-msgstr "%s£ºµ¼³öÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ£º%d"
-
-#: aout-cris.c:252
-#, c-format
-msgid "%s: Invalid relocation type imported: %d"
-msgstr "%s£ºµ¼ÈëÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ£º%d"
+msgstr "%sï¼šå¯¼å‡ºäº†æ— æ•ˆçš„é‡�å®šä½�ç±»åž‹ï¼š%d"
 
-#: aout-cris.c:263
-#, c-format
-msgid "%s: Bad relocation record imported: %d"
-msgstr "%s£ºµ¼Èë´íÎóµÄÖØ¶¨Î»¼ÇÂ¼£º%d"
+#: aout-cris.c:243
+#, fuzzy
+msgid "%B: Invalid relocation type imported: %d"
+msgstr "%sï¼šå¯¼å…¥æ— æ•ˆçš„é‡�å®šä½�ç±»åž‹ï¼š%d"
+
+#: aout-cris.c:254
+#, fuzzy
+msgid "%B: Bad relocation record imported: %d"
+msgstr "%sï¼šå¯¼å…¥é”™è¯¯çš„é‡�å®šä½�è®°å½•ï¼š%d"
 
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1273 aoutx.h:1611
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr "%s£ºÎÞ·¨ÔÚ a.out ¶ÔÏóÎÄ¼þ¸ñÊ½ÖÐ±íÊ¾½Ú¡°%s¡±"
+msgstr "%sï¼šæ— æ³•åœ¨ a.out å¯¹è±¡æ–‡ä»¶æ ¼å¼�ä¸­è¡¨ç¤ºèŠ‚â€œ%sâ€�"
 
-#: aoutx.h:1669
+#: aoutx.h:1577
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr "%s£ºÎÞ·¨ÔÚ a.out ¶ÔÏóÎÄ¼þ¸ñÊ½ÖÐÎª·ûºÅ¡°%s¡±±íÊ¾½Ú"
+msgstr "%sï¼šæ— æ³•åœ¨ a.out å¯¹è±¡æ–‡ä»¶æ ¼å¼�ä¸­ä¸ºç¬¦å�·â€œ%sâ€�è¡¨ç¤ºèŠ‚"
 
-#: aoutx.h:1671
+#: aoutx.h:1579 vms-alpha.c:7564
 msgid "*unknown*"
-msgstr "*Î´Öª*"
+msgstr "*æœªçŸ¥*"
 
-#: aoutx.h:3732
-#, c-format
-msgid "%s: relocateable link from %s to %s not supported"
-msgstr "%s£º²»Ö§³Ö´Ó %s µ½ %s µÄ¿ÉÖØ¶¨Î»µÄÁ¬½Ó"
+#: aoutx.h:4018 aoutx.h:4344
+#, fuzzy
+msgid "%P: %B: unexpected relocation type\n"
+msgstr "è·³è¿‡æ„�å¤–çš„é‡�å®šä½�ç±»åž‹ %s\n"
+
+#: aoutx.h:5375
+#, fuzzy, c-format
+msgid "%s: relocatable link from %s to %s not supported"
+msgstr "ä»Ž â€œ%sâ€� åˆ° â€œ%sâ€� çš„é“¾ç»“æ— æ•ˆï¼š%s\n"
 
-#: archive.c:1826
+#: archive.c:2249
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
-msgstr "¾¯¸æ£ºÐ´Èë¹éµµ¹ýÂý£ºÖØÐÂÐ´ÈëÊ±¼ä´Á\n"
+msgstr "è­¦å‘Šï¼šå†™å…¥å½’æ¡£è¿‡æ…¢ï¼šé‡�æ–°å†™å…¥æ—¶é—´æˆ³\n"
 
-#: archive.c:2093
+#: archive.c:2549
 msgid "Reading archive file mod timestamp"
-msgstr "ÕýÔÚ¶ÁÈëÎÄ¼þÐÞ¸ÄÊ±¼ä´Á"
+msgstr "æ­£åœ¨è¯»å…¥æ–‡ä»¶ä¿®æ”¹æ—¶é—´æˆ³"
 
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2573
 msgid "Writing updated armap timestamp"
-msgstr "ÕýÔÚ¸üÐÂ armap Ê±¼ä´Á"
+msgstr "æ­£åœ¨æ›´æ–° armap æ—¶é—´æˆ³"
 
-#: bfd.c:274
+#: bfd.c:411
 msgid "No error"
-msgstr "ÎÞ´íÎó"
+msgstr "æ— é”™è¯¯"
 
-#: bfd.c:275
+#: bfd.c:412
 msgid "System call error"
-msgstr "ÏµÍ³µ÷ÓÃ´íÎó"
+msgstr "ç³»ç»Ÿè°ƒç”¨é”™è¯¯"
 
-#: bfd.c:276
+#: bfd.c:413
 msgid "Invalid bfd target"
-msgstr "ÎÞÐ§µÄ bfd Ä¿±ê"
+msgstr "æ— æ•ˆçš„ bfd ç›®æ ‡"
 
-#: bfd.c:277
+#: bfd.c:414
 msgid "File in wrong format"
-msgstr "ÎÄ¼þ¸ñÊ½´íÎó"
+msgstr "æ–‡ä»¶æ ¼å¼�é”™è¯¯"
 
-#: bfd.c:278
+#: bfd.c:415
 msgid "Archive object file in wrong format"
-msgstr "¹éµµÄ¿±êÎÄ¼þ¸ñÊ½´íÎó"
+msgstr "å½’æ¡£ç›®æ ‡æ–‡ä»¶æ ¼å¼�é”™è¯¯"
 
-#: bfd.c:279
+#: bfd.c:416
 msgid "Invalid operation"
-msgstr "ÎÞÐ§µÄ²Ù×÷"
+msgstr "æ— æ•ˆçš„æ“�ä½œ"
 
-#: bfd.c:280
+#: bfd.c:417
 msgid "Memory exhausted"
-msgstr "ÄÚ´æºÄ¾¡"
+msgstr "å†…å­˜è€—å°½"
 
-#: bfd.c:281
+#: bfd.c:418
 msgid "No symbols"
-msgstr "ÎÞ·ûºÅ"
+msgstr "æ— ç¬¦å�·"
 
-#: bfd.c:282
+#: bfd.c:419
 msgid "Archive has no index; run ranlib to add one"
-msgstr "¹éµµÃ»ÓÐË÷Òý£»ÔËÐÐ ranlib ÒÔÌí¼ÓÒ»¸ö"
+msgstr "å½’æ¡£æ²¡æœ‰ç´¢å¼•ï¼›è¿�è¡Œ ranlib ä»¥æ·»åŠ ä¸€ä¸ª"
 
-#: bfd.c:283
+#: bfd.c:420
 msgid "No more archived files"
-msgstr "Ã»ÓÐ¸ü¶àµÄ¹éµµÎÄ¼þ"
+msgstr "æ²¡æœ‰æ›´å¤šçš„å½’æ¡£æ–‡ä»¶"
 
-#: bfd.c:284
+#: bfd.c:421
 msgid "Malformed archive"
-msgstr "»ûÐÎµÄ¹éµµ"
+msgstr "ç•¸å½¢çš„å½’æ¡£"
+
+#: bfd.c:422
+#, fuzzy
+msgid "DSO missing from command line"
+msgstr ""
+"\n"
+"é”™è¯¯ï¼š From: ç¼ºå°‘åˆ—ã€‚\n"
 
-#: bfd.c:285
+#: bfd.c:423
 msgid "File format not recognized"
-msgstr "²»¿ÉÊ¶±ðµÄÎÄ¼þ¸ñÊ½"
+msgstr "ä¸�å�¯è¯†åˆ«çš„æ–‡ä»¶æ ¼å¼�"
 
-#: bfd.c:286
+#: bfd.c:424
 msgid "File format is ambiguous"
-msgstr "¶þÒåÐÔµÄÎÄ¼þ¸ñÊ½"
+msgstr "å­˜æœ‰æ­§ä¹‰çš„æ–‡ä»¶æ ¼å¼�"
 
-#: bfd.c:287
+#: bfd.c:425
 msgid "Section has no contents"
-msgstr "½ÚÃ»ÓÐÄÚÈÝ"
+msgstr "èŠ‚ä¸�å�«å†…å®¹"
 
-#: bfd.c:288
+#: bfd.c:426
 msgid "Nonrepresentable section on output"
-msgstr "Êä³ö²»¿É±íÊ¾µÄ½Ú"
+msgstr "è¾“å‡ºä¸�å�¯è¡¨ç¤ºçš„èŠ‚"
 
-#: bfd.c:289
+#: bfd.c:427
 msgid "Symbol needs debug section which does not exist"
-msgstr "·ûºÅÐèÒª²»´æÔÚµÄµ÷ÊÔ½Ú"
+msgstr "ç¬¦å�·éœ€è¦�ä¸�å­˜åœ¨çš„è°ƒè¯•èŠ‚"
 
-#: bfd.c:290
+#: bfd.c:428
 msgid "Bad value"
-msgstr "´íÎóµÄÖµ"
+msgstr "é”™è¯¯çš„å€¼"
 
-#: bfd.c:291
+#: bfd.c:429
 msgid "File truncated"
-msgstr "ÎÄ¼þ±»½Ø¶Ï"
+msgstr "æ–‡ä»¶è¢«æˆªæ–­"
 
-#: bfd.c:292
+#: bfd.c:430
 msgid "File too big"
-msgstr "ÎÄ¼þ¹ý´ó"
+msgstr "æ–‡ä»¶è¿‡å¤§"
 
-#: bfd.c:293
+#: bfd.c:431
+#, fuzzy, c-format
+msgid "Error reading %s: %s"
+msgstr "è¯»å�–%s æ—¶å‡ºé”™"
+
+#: bfd.c:432
 msgid "#<Invalid error code>"
-msgstr "#<ÎÞÐ§µÄ´íÎóÂë>"
+msgstr "#<æ— æ•ˆé”™è¯¯ç �>"
 
-#: bfd.c:700
+#: bfd.c:1046
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
-msgstr "BFD %s ¶ÏÑÔÊ§°Ü %s£º%d"
+msgstr "BFD %s æ–­è¨€å¤±è´¥ %sï¼š%d"
 
-#: bfd.c:719
+#: bfd.c:1058
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
-msgstr "BFD %1$s ÄÚ²¿´íÎó£¬Òì³£ÖÐÖ¹ÓÚ %4$s µÄ %3$d ÐÐµÄ %2$s\n"
+msgstr "BFD %1$s å†…éƒ¨é”™è¯¯ï¼Œå¼‚å¸¸ä¸­æ­¢äºŽ %4$s çš„ %3$d è¡Œçš„ %2$s\n"
 
-#: bfd.c:723
+#: bfd.c:1062
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
-msgstr "BFD %1$s ÄÚ²¿´íÎó£¬Òì³£ÖÐÖ¹ÓÚ %3$d ÐÐµÄ %2$s\n"
+msgstr "BFD %1$s å†…éƒ¨é”™è¯¯ï¼Œå¼‚å¸¸ä¸­æ­¢äºŽ %3$d è¡Œçš„ %2$s\n"
 
-#: bfd.c:725
+#: bfd.c:1064
 msgid "Please report this bug.\n"
-msgstr "Çë±¨¸æ¸Ã BUG¡£\n"
+msgstr "è¯·æŠ¥å‘Šè¯¥ BUGã€‚\n"
 
-#: binary.c:306
+#: bfdwin.c:206
 #, c-format
-msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr "¾¯¸æ£º½«½Ú¡°%s¡±Ð´Èë¹ý´ó(ÀýÈç¸ºÊý)ÎÄ¼þÆ«ÒÆÁ¿µÄÎ»ÖÃ 0x%lx¡£"
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr ""
 
-#: coff-a29k.c:119
-msgid "Missing IHCONST"
-msgstr "ÒÅÊ§ IHCONST"
+#: bfdwin.c:209
+#, c-format
+msgid "not mapping: env var not set\n"
+msgstr ""
 
-#: coff-a29k.c:180
-msgid "Missing IHIHALF"
-msgstr "ÒÅÊ§ IHIHALF"
+#: binary.c:271
+#, c-format
+msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
+msgstr "è­¦å‘Šï¼šå°†èŠ‚â€œ%sâ€�å†™å…¥è¿‡å¤§(ä¾‹å¦‚è´Ÿæ•°)æ–‡ä»¶å��ç§»é‡�çš„ä½�ç½® 0x%lxã€‚"
 
-#: coff-a29k.c:212 coff-or32.c:229
-msgid "Unrecognized reloc"
-msgstr "ÎÞ·¨Ê¶±ðµÄÖØ¶¨Î»"
+#: bout.c:1146 elf-m10300.c:2665 elf32-avr.c:1706 elf32-frv.c:5641
+#: elf64-ia64-vms.c:354 elfxx-sparc.c:2869 reloc.c:7324 reloc16.c:160
+#: elf32-ia64.c:351 elf64-ia64.c:351
+#, fuzzy
+msgid "%P%F: --relax and -r may not be used together\n"
+msgstr "%P%Fï¼š-r å’Œ -shared ä¸�èƒ½ä¸€èµ·ä½¿ç”¨\n"
+
+#: cache.c:253
+#, fuzzy
+msgid "reopening %B: %s\n"
+msgstr "é‡�çŽ°æ‰“å¼€å…±äº«å¯¹è±¡â€œ%sâ€�å¤±è´¥"
 
-#: coff-a29k.c:408
-msgid "missing IHCONST reloc"
-msgstr "ÒÅÊ§ IHCONST ÖØ¶¨Î»"
+#: coff-alpha.c:452
+msgid ""
+"%B: Cannot handle compressed Alpha binaries.\n"
+"   Use compiler flags, or objZ, to generate uncompressed binaries."
+msgstr ""
 
-#: coff-a29k.c:498
-msgid "missing IHIHALF reloc"
-msgstr "ÒÅÊ§ IHIHALF ÖØ¶¨Î»"
+#: coff-alpha.c:603
+#, fuzzy
+msgid "%B: unknown/unsupported relocation type %d"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
+#: coff-alpha.c:852 coff-alpha.c:889 coff-alpha.c:1973 coff-mips.c:946
 msgid "GP relative relocation used when GP not defined"
-msgstr "ÔÚ GP Î´¶¨ÒåµÄÇé¿öÏÂÊ¹ÓÃÁË GP Ïà¶ÔÖØ¶¨Î»"
+msgstr "åœ¨ GP æœªå®šä¹‰çš„æƒ…å†µä¸‹ä½¿ç”¨äº† GP ç›¸å¯¹é‡�å®šä½�"
 
-#: coff-alpha.c:1485
+#: coff-alpha.c:1450
 msgid "using multiple gp values"
-msgstr "Ê¹ÓÃÁË¶à¸ö GP Öµ"
+msgstr "ä½¿ç”¨äº†å¤šä¸ª GP å€¼"
 
-#: coff-arm.c:1066 elf32-arm.h:285
-#, c-format
-msgid "%s: unable to find THUMB glue '%s' for `%s'"
-msgstr ""
+#: coff-alpha.c:1509
+#, fuzzy
+msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
 
-#: coff-arm.c:1096 elf32-arm.h:320
-#, c-format
-msgid "%s: unable to find ARM glue '%s' for `%s'"
-msgstr ""
+#: coff-alpha.c:1516
+#, fuzzy
+msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
 
-#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
-#, c-format
-msgid "%s(%s): warning: interworking not enabled."
-msgstr ""
+#: coff-alpha.c:1523 elf32-m32r.c:2443 elf64-alpha.c:4083 elf64-alpha.c:4233
+#: elf64-ia64-vms.c:3429 elf32-ia64.c:3836 elf64-ia64.c:3836
+#, fuzzy
+msgid "%B: unknown relocation type %d"
+msgstr "æœªçŸ¥ (ç±»åž‹ = %dï¼Œä½� = %d)\n"
 
-#: coff-arm.c:1395 elf32-arm.h:994
+#: coff-arm.c:1034
 #, c-format
-msgid "  first occurrence: %s: arm call to thumb"
+msgid "%B: unable to find THUMB glue '%s' for `%s'"
 msgstr ""
 
-#: coff-arm.c:1490 elf32-arm.h:890
+#: coff-arm.c:1063
 #, c-format
-msgid "  first occurrence: %s: thumb call to arm"
+msgid "%B: unable to find ARM glue '%s' for `%s'"
 msgstr ""
 
-#: coff-arm.c:1493
-msgid "  consider relinking with --support-old-code enabled"
-msgstr "  ³¢ÊÔÆôÓÃ --support-old-code ÖØÐÂÁ¬½Ó"
-
-#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
+#: coff-arm.c:1365 elf32-arm.c:7141
 #, c-format
-msgid "%s: bad reloc address 0x%lx in section `%s'"
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: arm call to thumb"
 msgstr ""
 
-#: coff-arm.c:2127
+#: coff-arm.c:1455
 #, c-format
-msgid "%s: illegal symbol index in reloc: %d"
-msgstr "%s£ºÖØ¶¨Î»ÖÐ·Ç·¨µÄ·ûºÅË÷Òý£º%d"
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: thumb call to arm\n"
+"  consider relinking with --support-old-code enabled"
+msgstr ""
+
+#: coff-arm.c:1750 coff-tic80.c:673 cofflink.c:3168
+#, fuzzy
+msgid "%B: bad reloc address 0x%lx in section `%A'"
+msgstr "%sï¼šé”™è¯¯çš„é‡�å®šä½�èŠ‚å��ç§°â€œ%sâ€�"
+
+#: coff-arm.c:2075
+#, fuzzy
+msgid "%B: illegal symbol index in reloc: %d"
+msgstr "%sï¼šé‡�å®šä½�ä¸­é�žæ³•çš„ç¬¦å�·ç´¢å¼•ï¼š%d"
+
+#: coff-arm.c:2206
+#, fuzzy, c-format
+msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
+msgstr "é”™è¯¯ï¼š%s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„ï¼Œè€Œ %s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„"
+
+#: coff-arm.c:2222 elf32-arm.c:16123
+#, fuzzy, c-format
+msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers"
+msgstr "é”™è¯¯ï¼š%s åœ¨æµ®ç‚¹å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°ï¼Œè€Œ %s åœ¨æ•´æ•°å¯„å­˜å™¨ä¸­ä¼ é€’å®ƒä»¬"
+
+#: coff-arm.c:2225 elf32-arm.c:16127
+#, fuzzy, c-format
+msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers"
+msgstr "é”™è¯¯ï¼š%s åœ¨æ•´æ•°å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°ï¼Œè€Œ %s åœ¨æµ®ç‚¹æ•°å¯„å­˜å™¨ä¸­ä¼ é€’å®ƒä»¬"
+
+#: coff-arm.c:2239
+#, fuzzy, c-format
+msgid "error: %B is compiled as position independent code, whereas target %B is absolute position"
+msgstr "é”™è¯¯ï¼š%s è¢«ç¼–è¯‘ä¸ºä½�ç½®æ— å…³ä»£ç �ï¼Œè€Œç›®æ ‡ %s é‡‡ç”¨ç»�å¯¹ä½�ç½®"
+
+#: coff-arm.c:2242
+#, fuzzy, c-format
+msgid "error: %B is compiled as absolute position code, whereas target %B is position independent"
+msgstr "é”™è¯¯ï¼š%s è¢«ç¼–è¯‘ä¸ºç»�å¯¹ä½�ç½®ä»£ç �ï¼Œè€Œç›®æ ‡ %s æ˜¯ä½�ç½®æ— å…³çš„"
+
+#: coff-arm.c:2270 elf32-arm.c:16192
+#, fuzzy, c-format
+msgid "Warning: %B supports interworking, whereas %B does not"
+msgstr "è­¦å‘Šï¼š%s æ”¯æŒ�äº’æ“�ä½œï¼Œè€Œ %s ä¸�æ”¯æŒ�"
+
+#: coff-arm.c:2273 elf32-arm.c:16198
+#, fuzzy, c-format
+msgid "Warning: %B does not support interworking, whereas %B does"
+msgstr "è­¦å‘Šï¼š%s ä¸�æ”¯æŒ�äº’æ“�ä½œï¼Œè€Œ %s æ”¯æŒ�"
 
-#: coff-arm.c:2255
+#: coff-arm.c:2297
 #, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "´íÎó£º%s ÊÇÎª APCS-%d ±àÒëµÄ£¬¶ø %s ÊÇÎª APCS-%d ±àÒëµÄ"
+msgid "private flags = %x:"
+msgstr "ç§�æœ‰æ ‡å¿— = %xï¼š"
 
-#: coff-arm.c:2270 elf32-arm.h:2297
+#: coff-arm.c:2305 elf32-arm.c:12119
 #, c-format
-msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
-msgstr "´íÎó£º%s ÔÚ¸¡µã¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý£¬¶ø %s ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝËüÃÇ"
+msgid " [floats passed in float registers]"
+msgstr " [åœ¨æµ®ç‚¹å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°]"
 
-#: coff-arm.c:2273 elf32-arm.h:2302
+#: coff-arm.c:2307
 #, c-format
-msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
-msgstr "´íÎó£º%s ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý£¬¶ø %s ÔÚ¸¡µãÊý¼Ä´æÆ÷ÖÐ´«µÝËüÃÇ"
+msgid " [floats passed in integer registers]"
+msgstr " [åœ¨æ•´æ•°å¯„å­˜å™¨ä¸­ä¼ é€’æµ®ç‚¹æ•°]"
 
-#: coff-arm.c:2288
+#: coff-arm.c:2310 elf32-arm.c:12122
 #, c-format
-msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
-msgstr "´íÎó£º%s ±»±àÒëÎªÎ»ÖÃÎÞ¹Ø´úÂë£¬¶øÄ¿±ê %s ²ÉÓÃ¾ø¶ÔÎ»ÖÃ"
+msgid " [position independent]"
+msgstr " [ä½�ç½®æ— å…³]"
 
-#: coff-arm.c:2291
+#: coff-arm.c:2312
 #, c-format
-msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
-msgstr "´íÎó£º%s ±»±àÒëÎª¾ø¶ÔÎ»ÖÃ´úÂë£¬¶øÄ¿±ê %s ÊÇÎ»ÖÃÎÞ¹ØµÄ"
+msgid " [absolute position]"
+msgstr " [ç»�å¯¹ä½�ç½®]"
 
-#: coff-arm.c:2320 elf32-arm.h:2358
+#: coff-arm.c:2316
 #, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "¾¯¸æ£º%s Ö§³Ö»¥²Ù×÷£¬¶ø %s ²»Ö§³Ö"
+msgid " [interworking flag not initialised]"
+msgstr " [äº’æ“�ä½œæ ‡å¿—æœªåˆ�å§‹åŒ–]"
 
-#: coff-arm.c:2323 elf32-arm.h:2365
+#: coff-arm.c:2318
 #, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "¾¯¸æ£º%s ²»Ö§³Ö»¥²Ù×÷£¬¶ø %s Ö§³Ö"
+msgid " [interworking supported]"
+msgstr " [æ”¯æŒ�äº’æ“�ä½œ]"
 
-#: coff-arm.c:2350
+#: coff-arm.c:2320
 #, c-format
-msgid "private flags = %x:"
-msgstr "Ë½ÓÐ±êÖ¾ = %x£º"
-
-#: coff-arm.c:2358 elf32-arm.h:2418
-msgid " [floats passed in float registers]"
-msgstr " [ÔÚ¸¡µã¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý]"
-
-#: coff-arm.c:2360
-msgid " [floats passed in integer registers]"
-msgstr " [ÔÚÕûÊý¼Ä´æÆ÷ÖÐ´«µÝ¸¡µãÊý]"
-
-#: coff-arm.c:2363 elf32-arm.h:2421
-msgid " [position independent]"
-msgstr " [Î»ÖÃÎÞ¹Ø]"
-
-#: coff-arm.c:2365
-msgid " [absolute position]"
-msgstr " [¾ø¶ÔÎ»ÖÃ]"
-
-#: coff-arm.c:2369
-msgid " [interworking flag not initialised]"
-msgstr " [»¥²Ù×÷±êÖ¾Î´³õÊ¼»¯]"
+msgid " [interworking not supported]"
+msgstr " [ä¸�æ”¯æŒ�äº’æ“�ä½œ]"
 
-#: coff-arm.c:2371
-msgid " [interworking supported]"
-msgstr " [Ö§³Ö»¥²Ù×÷]"
+#: coff-arm.c:2366 elf32-arm.c:11104
+#, fuzzy, c-format
+msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"
+msgstr "è­¦å‘Šï¼šç”±äºŽ %s å·²ç»�è¢«æŒ‡å®šä¸ºä¸�å�¯äº’æ“�ä½œçš„ï¼Œå› è€Œæ²¡æœ‰è®¾å®šäº’æ“�ä½œæ ‡å¿—"
 
-#: coff-arm.c:2373
-msgid " [interworking not supported]"
-msgstr " [²»Ö§³Ö»¥²Ù×÷]"
+#: coff-arm.c:2370 elf32-arm.c:11108
+#, fuzzy, c-format
+msgid "Warning: Clearing the interworking flag of %B due to outside request"
+msgstr "è­¦å‘Šï¼šæ­£åœ¨æ ¹æ�®å¤–ç•Œè¯·æ±‚æ¸…é™¤ %s çš„äº’æ“�ä½œæ ‡å¿—"
 
-#: coff-arm.c:2421 elf32-arm.h:2124
+#: coff-h8300.c:1096
 #, c-format
-msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
-msgstr "¾¯¸æ£ºÓÉÓÚ %s ÒÑ¾­±»Ö¸¶¨Îª²»¿É»¥²Ù×÷µÄ£¬Òò¶øÃ»ÓÐÉè¶¨»¥²Ù×÷±êÖ¾"
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr ""
 
-#: coff-arm.c:2425 elf32-arm.h:2128
-#, c-format
-msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr "¾¯¸æ£ºÕýÔÚ¸ù¾ÝÍâ½çÇëÇóÇå³ý %s µÄ»¥²Ù×÷±êÖ¾"
+#: coff-i860.c:147
+#, fuzzy, c-format
+msgid "relocation `%s' not yet implemented"
+msgstr "å¿½ç•¥é€‰é¡¹ %s (å°šæœªå®žä½œ)"
 
-#: coff-i960.c:136 coff-i960.c:485
+#: coff-i860.c:605 coff-tic54x.c:365 coffcode.h:5209
+#, fuzzy
+msgid "%B: warning: illegal symbol index %ld in relocs"
+msgstr "%sï¼šè­¦å‘Šï¼šé‡�å®šä½�ä¸­é�žæ³•çš„ç¬¦å�·ç´¢å¼• %ld"
+
+#: coff-i960.c:124 coff-i960.c:480
 msgid "uncertain calling convention for non-COFF symbol"
-msgstr "¹ØÓÚ·Ç-COFF ·ûºÅ²»È·¶¨µÄµ÷ÓÃÔ¼¶¨"
+msgstr "å…³äºŽé�ž-COFF ç¬¦å�·ä¸�ç¡®å®šçš„è°ƒç”¨çº¦å®š"
 
-#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
+#: coff-m68k.c:484 elf32-bfin.c:5556 elf32-cr16.c:2853 elf32-m68k.c:4632
 msgid "unsupported reloc type"
-msgstr "²»Ö§³ÖµÄÖØ¶¨Î»ÀàÐÍ"
+msgstr "ä¸�æ”¯æŒ�çš„é‡�å®šä½�ç±»åž‹"
 
-#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
+#: coff-mips.c:636 elf32-mips.c:1637 elf32-score.c:431 elf32-score7.c:330
+#: elf64-mips.c:2925 elfn32-mips.c:2737
 msgid "GP relative relocation when _gp not defined"
 msgstr ""
 
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2466
-msgid "reloc against unsupported section"
-msgstr "¹ØÓÚ²»Ö§³Ö½ÚµÄÖØ¶¨Î»"
-
-#: coff-mips.c:2474
-msgid "reloc not properly aligned"
-msgstr "ÖØ¶¨Î»Ã»ÓÐÕýÈ·¶ÔÆë"
+#: coff-or32.c:216
+msgid "Unrecognized reloc"
+msgstr "æ— æ³•è¯†åˆ«çš„é‡�å®šä½�"
 
-#: coff-rs6000.c:2766
+#: coff-rs6000.c:2802
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
-msgstr "%s£º²»Ö§³ÖµÄÖØ¶¨Î»ÀàÐÍ 0x%02x"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�ç±»åž‹ 0x%02x"
 
-#: coff-rs6000.c:2859
+#: coff-rs6000.c:2887
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr ""
 
-#: coff-rs6000.c:3590 coff64-rs6000.c:2091
-#, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
+#: coff-rs6000.c:3638 coff64-rs6000.c:2117
+msgid "%B: symbol `%s' has unrecognized smclas %d"
 msgstr ""
 
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coff-sh.c:506
+#, fuzzy, c-format
+msgid "SH Error: unknown reloc type %d"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šæœªçŸ¥çš„æœºå™¨ç±»åž‹ï¼š%d"
+
+#: coff-tic4x.c:184 coff-tic54x.c:279 coff-tic80.c:440
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
-msgstr "ÎÞ·¨Ê¶±ðµÄÖØ¶¨Î»ÀàÐÍ 0x%x"
+msgstr "æ— æ³•è¯†åˆ«çš„é‡�å®šä½�ç±»åž‹ 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4974
+#: coff-tic4x.c:227
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
-msgstr "%s£º¾¯¸æ£ºÖØ¶¨Î»ÖÐ·Ç·¨µÄ·ûºÅË÷Òý %ld"
+msgstr "%sï¼šè­¦å‘Šï¼šé‡�å®šä½�ä¸­é�žæ³•çš„ç¬¦å�·ç´¢å¼• %ld"
 
-#: coff-w65.c:363
+#: coff-w65.c:355
 #, c-format
 msgid "ignoring reloc %s\n"
-msgstr "ÕýÔÚºöÂÔÖØ¶¨Î» %s\n"
+msgstr "æ­£åœ¨å¿½ç•¥é‡�å®šä½� %s\n"
 
-#: coffcode.h:1086
-#, c-format
-msgid "%s (%s): Section flag %s (0x%x) ignored"
-msgstr "%s (%s)£ººöÂÔ½Ú±êÖ¾ %s (0x%x)"
+#: coffcode.h:1005
+#, fuzzy
+msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
+msgstr "è­¦å‘Šï¼š%sï¼šæœ¬åœ°ç¬¦å�·â€œ%sâ€�æ²¡æœ‰èŠ‚"
+
+#. Generate a warning message rather using the 'unhandled'
+#. variable as this will allow some .sys files generate by
+#. other toolchains to be processed.  See bugzilla issue 196.
+#: coffcode.h:1230
+msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
+msgstr ""
+
+#: coffcode.h:1297
+#, fuzzy
+msgid "%B (%s): Section flag %s (0x%x) ignored"
+msgstr "%s (%s)ï¼šå¿½ç•¥èŠ‚æ ‡å¿— %s (0x%x)"
 
-#: coffcode.h:2143
+#: coffcode.h:2439
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
-msgstr "ÎÞ·¨Ê¶±ðµÄ TI COFF Ä¿±ê id ¡°0x%x¡±"
+msgstr "æ— æ³•è¯†åˆ«çš„ TI COFF ç›®æ ‡ id â€œ0x%xâ€�"
 
-#: coffcode.h:4365
-#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
-msgstr "%s£º¾¯¸æ£ºÐÐºÅÖÐµÄ·Ç·¨·ûºÅË÷Òý %ld"
+#: coffcode.h:2753
+msgid "%B: reloc against a non-existant symbol index: %ld"
+msgstr ""
 
-#: coffcode.h:4379
-#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
-msgstr "%s£º¾¯¸æ£ºÎª¡°%s¡±¸´ÖÆÐÐºÅÐÅÏ¢"
+#: coffcode.h:3311
+#, fuzzy
+msgid "%B: too many sections (%d)"
+msgstr "è§„åˆ™è¿‡å¤š (> %d)ï¼�"
 
-#: coffcode.h:4736
-#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+#: coffcode.h:3729
+msgid "%B: section %s: string table overflow at offset %ld"
 msgstr ""
 
-#: coffcode.h:4867
-#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
-msgstr "¾¯¸æ£º%s£º±¾µØ·ûºÅ¡°%s¡±Ã»ÓÐ½Ú"
+#: coffcode.h:4534
+msgid "%B: warning: line number table read failed"
+msgstr ""
 
-#: coffcode.h:5012
-#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
-msgstr "%1$s£ºÎ»ÓÚµØÖ· 0x%3$lx ´¦µÄ·Ç·¨ÖØ¶¨Î»ÀàÐÍ %2$d"
+#: coffcode.h:4564
+#, fuzzy
+msgid "%B: warning: illegal symbol index %ld in line numbers"
+msgstr "%sï¼šè­¦å‘Šï¼šè¡Œå�·ä¸­çš„é�žæ³•ç¬¦å�·ç´¢å¼• %ld"
 
-#: coffgen.c:1661
-#, c-format
-msgid "%s: bad string table size %lu"
-msgstr "%s£º×Ö·û´®±íµÄ´óÐ¡´íÎó %lu"
+#: coffcode.h:4578
+#, fuzzy
+msgid "%B: warning: duplicate line number information for `%s'"
+msgstr "%sï¼šè­¦å‘Šï¼šä¸ºâ€œ%sâ€�å¤�åˆ¶è¡Œå�·ä¿¡æ�¯"
 
-#: cofflink.c:534 elflink.h:1912
-#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
-msgstr "¾¯¸æ£º%4$s ÖÐµÄ·ûºÅ¡°%1$s¡±µÄÀàÐÍÓÉ %2$d ±äÎª %3$d"
+#: coffcode.h:4978
+#, fuzzy
+msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
+msgstr "%1$sï¼šå…³äºŽç¬¦å�· %3$s çš„æœªçŸ¥é‡�å®šä½�ç±»åž‹ %2$d"
 
-#: cofflink.c:2321
-#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
+#: coffcode.h:5104
+#, fuzzy
+msgid "warning: %B: local symbol `%s' has no section"
+msgstr "è­¦å‘Šï¼š%sï¼šæœ¬åœ°ç¬¦å�·â€œ%sâ€�æ²¡æœ‰èŠ‚"
+
+#: coffcode.h:5248
+#, fuzzy
+msgid "%B: illegal relocation type %d at address 0x%lx"
+msgstr "%1$sï¼šä½�äºŽåœ°å�€ 0x%3$lx å¤„çš„é�žæ³•é‡�å®šä½�ç±»åž‹ %2$d"
+
+#: coffgen.c:179 elf.c:1030
+msgid "%B: unable to initialize compress status for section %s"
+msgstr ""
+
+#: coffgen.c:199 elf.c:1050
+msgid "%B: unable to initialize decompress status for section %s"
+msgstr ""
+
+#: coffgen.c:1685
+#, fuzzy
+msgid "%B: bad string table size %lu"
+msgstr "%sï¼šå­—ç¬¦ä¸²è¡¨çš„å¤§å°�é”™è¯¯ %lu"
+
+#: coffgen.c:2608 elflink.c:12906 linker.c:3136
+#, fuzzy
+msgid "%F%P: already_linked_table: %E\n"
+msgstr "%P%F: æ— æ³•åˆ›å»ºå“ˆå¸Œè¡¨: %E\n"
+
+#: cofflink.c:533 elf64-ia64-vms.c:5173 elflink.c:4356
+#, fuzzy
+msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
+msgstr "è­¦å‘Šï¼š%4$s ä¸­çš„ç¬¦å�·â€œ%1$sâ€�çš„ç±»åž‹ç”± %2$d å�˜ä¸º %3$d"
+
+#: cofflink.c:2416
+#, fuzzy
+msgid "%B: relocs in section `%A', but it has no contents"
+msgstr "èŠ‚æ²¡æœ‰å†…å®¹"
+
+#: cofflink.c:2478 elflink.c:9711
+msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n"
 msgstr ""
 
-#: cofflink.c:2664 coffswap.h:877
+#: cofflink.c:2777 coffswap.h:826
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
-msgstr "%s£º%s£ºÖØ¶¨Î»Òç³ö£º0x%lx > 0xffff"
+msgstr "%sï¼š%sï¼šé‡�å®šä½�æº¢å‡ºï¼š0x%lx > 0xffff"
 
-#: cofflink.c:2673 coffswap.h:864
+#: cofflink.c:2786 coffswap.h:812
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s£º¾¯¸æ£º%s£ºÐÐºÅÒç³ö£º0x%lx > 0xffff"
+msgstr "%sï¼šè­¦å‘Šï¼š%sï¼šè¡Œå�·æº¢å‡ºï¼š0x%lx > 0xffff"
 
-#: dwarf2.c:382
-msgid "Dwarf Error: Can't find .debug_str section."
-msgstr "Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_str ½Ú¡£"
+#: cpu-arm.c:190 cpu-arm.c:201
+#, fuzzy
+msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale"
+msgstr "é”™è¯¯ï¼š%s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„ï¼Œè€Œ %s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„"
 
-#: dwarf2.c:399
+#: cpu-arm.c:334
 #, c-format
-msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgid "warning: unable to update contents of %s section in %s"
 msgstr ""
 
-#: dwarf2.c:543
-msgid "Dwarf Error: Can't find .debug_abbrev section."
-msgstr "Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_abbrev ½Ú¡£"
+#: dwarf2.c:514
+#, fuzzy, c-format
+msgid "Dwarf Error: Can't find %s section."
+msgstr "å°�é”™è¯¯ï¼šæ— æ³•æ‰¾åˆ° .debug_str èŠ‚ã€‚"
 
-#: dwarf2.c:560
+#: dwarf2.c:543
 #, c-format
-msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."
 msgstr ""
 
-#: dwarf2.c:757
-#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
-msgstr "Ð¡´íÎó£ºÎÞÐ§»òÎ´´¦ÀíµÄ±íµ¥Öµ£º%u¡£"
+#: dwarf2.c:1071
+#, fuzzy, c-format
+msgid "Dwarf Error: Invalid or unhandled FORM value: %#x."
+msgstr "å°�é”™è¯¯ï¼šæ— æ•ˆæˆ–æœªå¤„ç�†çš„è¡¨å�•å€¼ï¼š%uã€‚"
 
-#: dwarf2.c:852
+#: dwarf2.c:1332
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr ""
 
-#: dwarf2.c:938
-msgid "Dwarf Error: Can't find .debug_line section."
-msgstr "Ð¡´íÎó£ºÎÞ·¨ÕÒµ½ .debug_line ½Ú¡£"
+#: dwarf2.c:1590
+#, fuzzy, c-format
+msgid "Dwarf Error: Unhandled .debug_line version %d."
+msgstr "å°�é”™è¯¯ï¼šæ— æ³•æ‰¾åˆ° .debug_line èŠ‚ã€‚"
 
-#: dwarf2.c:961
-#, c-format
-msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+#: dwarf2.c:1612
+msgid "Dwarf Error: Invalid maximum operations per instruction."
 msgstr ""
 
-#: dwarf2.c:1159
+#: dwarf2.c:1807
 msgid "Dwarf Error: mangled line number section."
 msgstr ""
 
-#: dwarf2.c:1355 dwarf2.c:1566
+#: dwarf2.c:2160
+#, fuzzy, c-format
+msgid "Dwarf Error: Unable to read alt ref %u."
+msgstr "å°�é”™è¯¯ï¼šæ— æ•ˆæˆ–æœªå¤„ç�†çš„è¡¨å�•å€¼ï¼š%uã€‚"
+
+#: dwarf2.c:2179 dwarf2.c:2299 dwarf2.c:2595
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr ""
 
-#: dwarf2.c:1527
+#: dwarf2.c:2551
 #, c-format
-msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information."
 msgstr ""
 
-#: dwarf2.c:1534
+#: dwarf2.c:2560
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr ""
 
-#: dwarf2.c:1557
+#: dwarf2.c:2586
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
-msgstr "Ð¡´íÎó£º´íÎóµÄËõÐ´±àºÅ£º%u¡£"
+msgstr "å°�é”™è¯¯ï¼šé”™è¯¯çš„ç¼©å†™ç¼–å�·ï¼š%uã€‚"
 
-#: ecoff.c:1318
+#: ecoff.c:1233
 #, c-format
 msgid "Unknown basic type %d"
-msgstr "Î´ÖªµÄ»ù±¾ÀàÐÍ %d"
+msgstr "æœªçŸ¥çš„åŸºæœ¬ç±»åž‹ %d"
 
-#: ecoff.c:1578
+#: ecoff.c:1490
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %ld"
 msgstr ""
 "\n"
-"      End+1 ·ûºÅ£º%ld"
+"      End+1 ç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1585 ecoff.c:1588
+#: ecoff.c:1497 ecoff.c:1500
 #, c-format
 msgid ""
 "\n"
 "      First symbol: %ld"
 msgstr ""
 "\n"
-"      µÚÒ»¸ö·ûºÅ£º%ld"
+"      ç¬¬ä¸€ä¸ªç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1600
+#: ecoff.c:1512
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %-7ld   Type:  %s"
 msgstr ""
 "\n"
-"      End+1 ·ûºÅ£º%-7ld   ÀàÐÍ£º%s"
+"      End+1 ç¬¦å�·ï¼š%-7ld   ç±»åž‹ï¼š%s"
 
-#: ecoff.c:1607
+#: ecoff.c:1519
 #, c-format
 msgid ""
 "\n"
 "      Local symbol: %ld"
 msgstr ""
 "\n"
-"      ±¾µØ·ûºÅ£º%ld"
+"      æœ¬åœ°ç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1615
+#: ecoff.c:1527
 #, c-format
 msgid ""
 "\n"
 "      struct; End+1 symbol: %ld"
 msgstr ""
 "\n"
-"      ½á¹¹£»End+1 ·ûºÅ£º%ld"
+"      ç»“æž„ï¼›End+1 ç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1620
+#: ecoff.c:1532
 #, c-format
 msgid ""
 "\n"
 "      union; End+1 symbol: %ld"
 msgstr ""
 "\n"
-"      ÁªºÏ£»End+1 ·ûºÅ£º%ld"
+"      è�”å�ˆï¼›End+1 ç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1625
+#: ecoff.c:1537
 #, c-format
 msgid ""
 "\n"
 "      enum; End+1 symbol: %ld"
 msgstr ""
 "\n"
-"      Ã¶¾Ù£»End+1 ·ûºÅ£º%ld"
+"      æžšä¸¾ï¼›End+1 ç¬¦å�·ï¼š%ld"
 
-#: ecoff.c:1631
+#: ecoff.c:1543
 #, c-format
 msgid ""
 "\n"
 "      Type: %s"
 msgstr ""
 "\n"
-"      ÀàÐÍ£º%s"
+"      ç±»åž‹ï¼š%s"
 
-#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
-#: elf64-sh64.c:1659
-#, c-format
-msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr "%1$s£º¾¯¸æ£ºÀ´×Ô %3$s ½ÚµÄ¹ØÓÚ·ûºÅ¡°%2$s¡±µÄ²»¿É½âÎöµÄÖØ¶¨Î»"
+#: elf-attrs.c:573
+msgid "error: %B: Object has vendor-specific contents that must be processed by the '%s' toolchain"
+msgstr ""
+
+#: elf-attrs.c:582
+msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'"
+msgstr ""
+
+#: elf-eh-frame.c:921
+msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
+msgstr ""
 
-#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
-#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
-#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
-#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
+#: elf-eh-frame.c:1193
+msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+msgstr ""
+
+#: elf-eh-frame.c:1612
+msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n"
+msgstr ""
+
+#: elf-ifunc.c:135
+msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n"
+msgstr ""
+
+#: elf-m10200.c:430 elf-m10300.c:2164 elf32-avr.c:1256 elf32-bfin.c:3220
+#: elf32-cr16.c:1484 elf32-cr16c.c:780 elf32-cris.c:2016 elf32-crx.c:922
+#: elf32-d10v.c:513 elf32-epiphany.c:557 elf32-fr30.c:589 elf32-frv.c:4039
+#: elf32-h8300.c:525 elf32-i860.c:1212 elf32-ip2k.c:1468 elf32-iq2000.c:688
+#: elf32-lm32.c:1160 elf32-m32c.c:553 elf32-m32r.c:3066 elf32-m68hc1x.c:1283
+#: elf32-mep.c:535 elf32-metag.c:1992 elf32-microblaze.c:1560
+#: elf32-moxie.c:282 elf32-mt.c:395 elf32-nds32.c:4910 elf32-openrisc.c:404
+#: elf32-score.c:2729 elf32-score7.c:2537 elf32-spu.c:5041
+#: elf32-tilepro.c:3666 elf32-v850.c:2281 elf32-xstormy16.c:936
+#: elf64-mmix.c:1538 elfxx-tilegx.c:4051
 msgid "internal error: out of range error"
-msgstr "ÄÚ²¿´íÎó£º³¬³ö·¶Î§´íÎó"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šè¶…å‡ºèŒƒå›´é”™è¯¯"
 
-#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
-#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
-#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
-#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
+#: elf-m10200.c:434 elf-m10300.c:2168 elf32-avr.c:1260 elf32-bfin.c:3224
+#: elf32-cr16.c:1488 elf32-cr16c.c:784 elf32-cris.c:2020 elf32-crx.c:926
+#: elf32-d10v.c:517 elf32-fr30.c:593 elf32-frv.c:4043 elf32-h8300.c:529
+#: elf32-i860.c:1216 elf32-iq2000.c:692 elf32-lm32.c:1164 elf32-m32c.c:557
+#: elf32-m32r.c:3070 elf32-m68hc1x.c:1287 elf32-mep.c:539 elf32-metag.c:1996
+#: elf32-microblaze.c:1564 elf32-moxie.c:286 elf32-msp430.c:1321
+#: elf32-nds32.c:4914 elf32-openrisc.c:408 elf32-score.c:2733
+#: elf32-score7.c:2541 elf32-spu.c:5045 elf32-tilepro.c:3670 elf32-v850.c:2285
+#: elf32-xstormy16.c:940 elf64-mmix.c:1542 elfxx-mips.c:9995
+#: elfxx-tilegx.c:4055
 msgid "internal error: unsupported relocation error"
-msgstr "ÄÚ²¿´íÎó£º²»Ö§³ÖµÄÖØ¶¨Î»´íÎó"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�é”™è¯¯"
 
-#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
-#: elf32-h8300.c:556 elf32-m32r.c:1286
+#: elf-m10200.c:438 elf32-cr16.c:1492 elf32-cr16c.c:788 elf32-crx.c:930
+#: elf32-d10v.c:521 elf32-h8300.c:533 elf32-lm32.c:1168 elf32-m32r.c:3074
+#: elf32-m68hc1x.c:1291 elf32-microblaze.c:1568 elf32-nds32.c:4918
+#: elf32-score.c:2737 elf32-score7.c:2545 elf32-spu.c:5049
 msgid "internal error: dangerous error"
-msgstr "ÄÚ²¿´íÎó£ºÎ£ÏÕµÄ´íÎó"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é”™è¯¯"
 
-#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
-#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
-#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
-#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
+#: elf-m10200.c:442 elf-m10300.c:2184 elf32-avr.c:1268 elf32-bfin.c:3232
+#: elf32-cr16.c:1496 elf32-cr16c.c:792 elf32-cris.c:2028 elf32-crx.c:934
+#: elf32-d10v.c:525 elf32-epiphany.c:572 elf32-fr30.c:601 elf32-frv.c:4051
+#: elf32-h8300.c:537 elf32-i860.c:1224 elf32-ip2k.c:1483 elf32-iq2000.c:700
+#: elf32-lm32.c:1172 elf32-m32c.c:565 elf32-m32r.c:3078 elf32-m68hc1x.c:1295
+#: elf32-mep.c:547 elf32-metag.c:2004 elf32-microblaze.c:1572
+#: elf32-moxie.c:294 elf32-msp430.c:1329 elf32-mt.c:403 elf32-nds32.c:4922
+#: elf32-openrisc.c:416 elf32-score.c:2746 elf32-score7.c:2549
+#: elf32-spu.c:5053 elf32-tilepro.c:3678 elf32-v850.c:2305
+#: elf32-xstormy16.c:948 elf64-mmix.c:1550 elfxx-tilegx.c:4063
 msgid "internal error: unknown error"
-msgstr "ÄÚ²¿´íÎó£ºÎ´ÖªµÄ´íÎó"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šæœªçŸ¥çš„é”™è¯¯"
+
+#: elf-m10300.c:1021
+#, fuzzy, c-format
+msgid "%s: Unsupported transition from %s to %s"
+msgstr "ä¸�æ”¯æŒ�æ—§è¯­æ³•ï¼š%s\n"
+
+#: elf-m10300.c:1213
+msgid "%B: %s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf-m10300.c:2108 elf32-arm.c:10632 elf32-i386.c:4363 elf32-m32r.c:2558
+#: elf32-m68k.c:4120 elf32-s390.c:3303 elf32-sh.c:4109 elf32-tilepro.c:3569
+#: elf32-xtensa.c:3063 elf64-s390.c:3229 elf64-sh64.c:1640 elf64-x86-64.c:4463
+#: elfxx-sparc.c:3904 elfxx-tilegx.c:3974
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4450
+#, fuzzy
+msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf-m10300.c:2173
+msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)"
+msgstr ""
+
+#: elf-m10300.c:2176
+#, fuzzy
+msgid "%B: taking the address of protected function '%s' cannot be done when making a shared library"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf-m10300.c:2179
+#, fuzzy
+msgid "internal error: suspicious relocation type used in shared library"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�é”™è¯¯"
 
 #: elf.c:343
-#, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgid "%B: invalid string offset %u >= %lu for section `%s'"
 msgstr ""
 
-#: elf.c:589
-#, c-format
-msgid "%s: invalid SHT_GROUP entry"
-msgstr "%s£ºÎÞÐ§µÄ SHT_GROUP ÌõÄ¿"
+#: elf.c:455
+msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
+msgstr ""
 
-#: elf.c:660
-#, c-format
-msgid "%s: no group info for section %s"
-msgstr "%s£ºÃ»ÓÐ¹ØÓÚ½Ú %s µÄ×éÐÅÏ¢"
+#: elf.c:611
+msgid "%B: Corrupt size field in group section header: 0x%lx"
+msgstr ""
+
+#: elf.c:647
+#, fuzzy
+msgid "%B: invalid SHT_GROUP entry"
+msgstr "%sï¼šæ— æ•ˆçš„ SHT_GROUP æ�¡ç›®"
+
+#: elf.c:717
+#, fuzzy
+msgid "%B: no group info for section %A"
+msgstr "åœ¨ç¾¤ç»„åŒºæ®µ â€œ%sâ€� ä¸­ä¸�è‰¯çš„ sh_info\n"
+
+#: elf.c:746 elf.c:3144 elflink.c:10290
+#, fuzzy
+msgid "%B: warning: sh_link not set for section `%A'"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šæ„�å¤–èŠ‚ä¸­å‡ºçŽ°ç¬¦å�·"
+
+#: elf.c:765
+msgid "%B: sh_link [%d] in section `%A' is incorrect"
+msgstr ""
+
+#: elf.c:800
+msgid "%B: unknown [%d] section `%s' in group [%s]"
+msgstr ""
 
-#: elf.c:1023
+#: elf.c:1174
+#, c-format
 msgid ""
 "\n"
 "Program Header:\n"
 msgstr ""
 "\n"
-"³ÌÐòÍ·£º\n"
+"ç¨‹åº�å¤´ï¼š\n"
 
-#: elf.c:1073
+#: elf.c:1216
+#, c-format
 msgid ""
 "\n"
 "Dynamic Section:\n"
 msgstr ""
 "\n"
-"¶¯Ì¬½Ú£º\n"
+"åŠ¨æ€�èŠ‚ï¼š\n"
 
-#: elf.c:1202
+#: elf.c:1352
+#, c-format
 msgid ""
 "\n"
 "Version definitions:\n"
 msgstr ""
 "\n"
-"°æ±¾¶¨Òå£º\n"
+"ç‰ˆæœ¬å®šä¹‰ï¼š\n"
 
-#: elf.c:1225
+#: elf.c:1377
+#, c-format
 msgid ""
 "\n"
 "Version References:\n"
 msgstr ""
 "\n"
-"°æ±¾ÒýÓÃ£º\n"
+"ç‰ˆæœ¬å¼•ç”¨ï¼š\n"
 
-#: elf.c:1230
-#, c-format
+#: elf.c:1382
+#, fuzzy, c-format
 msgid "  required from %s:\n"
-msgstr ""
+msgstr "%<%s %T%>éœ€è¦�æ¨¡æ�¿å�‚æ•°"
 
-#: elf.c:1902
-#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
+#: elf.c:1807
+msgid "%B: invalid link %lu for reloc section %s (index %u)"
 msgstr ""
 
-#: elf.c:3603
-#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr "%s£ºÃ»ÓÐ×ã¹»µÄ¿Õ¼ä±£´æ³ÌÐòÍ·£¨·ÖÅä %u£¬ÐèÒª %u£©"
-
-#: elf.c:3708
-#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr "%s£ºÃ»ÓÐ×ã¹»µÄ¿Õ¼ä±£´æ³ÌÐòÍ·£¬ÊÔÓÃ -N ½øÐÐÁ¬½Ó"
-
-#: elf.c:3833
-#, c-format
-msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
-msgstr "´íÎó£º¶Î (%s) ÖÐµÄµÚÒ»¸ö½Ú¿ªÊ¼ÓÚ 0x%x£¬È»¶ø¶Î¿ªÊ¼ÓÚ 0x%x"
-
-#: elf.c:4148
-#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
-msgstr "%s£º¾¯¸æ£ºÒÑ·ÖÅäµÄ½Ú¡°%s¡±²»ÔÚ¶ÎÖÐ"
+#: elf.c:1977
+msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]"
+msgstr ""
 
-#: elf.c:4472
-#, c-format
-msgid "%s: symbol `%s' required but not present"
-msgstr "%s£º±ØÐèµÄ·ûºÅ¡°%s¡±²»´æÔÚ"
+#: elf.c:1989
+msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
+msgstr ""
 
-#: elf.c:4749
-#, c-format
-msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
-msgstr "%s£º¾¯¸æ£º·¢ÏÖ¿ÕµÄ¿É×°Èë¶Î£¬ËüÊÇÄÚ²¿µÄ£¿\n"
+#: elf.c:2000
+msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
+msgstr ""
 
-#: elf.c:6193
-#, c-format
-msgid "%s: unsupported relocation type %s"
-msgstr "%s£º²»Ö§³ÖµÄÖØ¶¨Î»µÄÀàÐÍ %s"
+#: elf.c:2010
+msgid "%B: don't know how to handle section `%s' [0x%8x]"
+msgstr ""
 
-#: elf32-arm.h:1221
+#: elf.c:2648
 #, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
+msgid "warning: section `%A' type changed to PROGBITS"
 msgstr ""
 
-#: elf32-arm.h:1417
-#, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+#: elf.c:3015
+msgid "%B: too many sections: %u"
 msgstr ""
 
-#: elf32-arm.h:1914 elf32-sh.c:4125
-#, c-format
-msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
-msgstr "%s(%s+0x%lx)£º¹ØÓÚ SEC_MERGE ½ÚµÄÖØ¶¨Î» %s"
+#: elf.c:3101
+msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
+msgstr ""
 
-#: elf32-arm.h:2008
-#, c-format
-msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+#: elf.c:3124
+msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
 msgstr ""
 
-#: elf32-arm.h:2176
-#, c-format
-msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+#: elf.c:4126
+msgid "%B: TLS sections are not adjacent:"
 msgstr ""
 
-#: elf32-arm.h:2271
-#, c-format
-msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "´íÎó£º%s ÊÇÎª EABI °æ±¾ %d ±àÒëµÄ£¬¶ø %s ÔòÊÇÎª°æ±¾ %d ±àÒëµÄ"
+#: elf.c:4133
+#, fuzzy, c-format
+msgid "\t    TLS: %A"
+msgstr "ä¸�å�‡å®šå¤§çš„ TLS æ®µ"
 
-#: elf32-arm.h:2285
-#, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
-msgstr "´íÎó£º%s ÊÇÎª APCS-%d ±àÒëµÄ£¬¶øÄ¿±ê %s Ê¹ÓÃ APCS-%d"
+#: elf.c:4137
+#, fuzzy, c-format
+msgid "\tnon-TLS: %A"
+msgstr "æœªçŸ¥çš„ TLS æ¨¡åž‹%qs"
 
-#: elf32-arm.h:2313
-#, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr "´íÎó£º%s Ê¹ÓÃ VFP Ö¸Áî£¬¶ø %s Ê¹ÓÃ FPA Ö¸Áî"
+#: elf.c:4596
+#, fuzzy
+msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
+msgstr ".dynamic åŒºæ®µä¸�æ˜¯åŠ¨æ€�æ•°æ�®æ®µä¸­ç¬¬ä¸€ä¸ªåŒºæ®µã€‚\n"
 
-#: elf32-arm.h:2318
-#, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr "´íÎó£º%s Ê¹ÓÃ FPA Ö¸Áî£¬¶ø %s Ê¹ÓÃ VFP Ö¸Áî"
+#: elf.c:4621
+#, fuzzy
+msgid "%B: Not enough room for program headers, try linking with -N"
+msgstr "%sï¼šæ²¡æœ‰è¶³å¤Ÿçš„ç©ºé—´ä¿�å­˜ç¨‹åº�å¤´ï¼Œè¯•ç”¨ -N è¿›è¡Œè¿žæŽ¥"
 
-#: elf32-arm.h:2338
-#, c-format
-msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
-msgstr "´íÎó£º%s Ê¹ÓÃÈí¼þ FP£¬¶ø %s Ê¹ÓÃÓ²¼þ FP"
+#: elf.c:4707
+msgid "%B: section %A lma %#lx adjusted to %#lx"
+msgstr ""
 
-#: elf32-arm.h:2343
-#, c-format
-msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
-msgstr "´íÎó£º%s Ê¹ÓÃÓ²¼þ FP£¬¶ø %s Ê¹ÓÃÈí¼þ FP"
+#: elf.c:4843
+msgid "%B: section `%A' can't be allocated in segment %d"
+msgstr ""
 
-#. Ignore init flag - it may not be set, despite the flags field
-#. containing valid data.
-#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
-#: elfxx-mips.c:7756
-#, c-format
-msgid "private flags = %lx:"
-msgstr "Ë½ÓÐ±êÖ¾ = %lx£º"
+#: elf.c:4892
+#, fuzzy
+msgid "%B: warning: allocated section `%s' not in segment"
+msgstr "%sï¼šè­¦å‘Šï¼šå·²åˆ†é…�çš„èŠ‚â€œ%sâ€�ä¸�åœ¨æ®µä¸­"
 
-#: elf32-arm.h:2405
-msgid " [interworking enabled]"
-msgstr " [ÆôÓÃ»¥²Ù×÷]"
+#: elf.c:5473
+#, fuzzy
+msgid "%B: symbol `%s' required but not present"
+msgstr "%sï¼šå¿…éœ€çš„ç¬¦å�·â€œ%sâ€�ä¸�å­˜åœ¨"
 
-#: elf32-arm.h:2413
-msgid " [VFP float format]"
-msgstr " [VFP ¸¡µã¸ñÊ½]"
+#: elf.c:5811
+#, fuzzy
+msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%sï¼šè­¦å‘Šï¼šå�‘çŽ°ç©ºçš„å�¯è£…å…¥æ®µï¼Œå®ƒæ˜¯å†…éƒ¨çš„ï¼Ÿ\n"
 
-#: elf32-arm.h:2415
-msgid " [FPA float format]"
-msgstr " [FPA ¸¡µã¸ñÊ½]"
+#: elf.c:6867
+#, fuzzy, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "%1$sï¼šæ— æ³•ä¸ºè¾“å…¥èŠ‚ %3$s æ‰¾åˆ°è¾“å‡ºèŠ‚ %2$s"
 
-#: elf32-arm.h:2424
-msgid " [new ABI]"
-msgstr " [ÐÂ ABI]"
+#: elf.c:7915
+#, fuzzy
+msgid "%B: unsupported relocation type %s"
+msgstr "è·³è¿‡æ„�å¤–çš„é‡�å®šä½�ç±»åž‹ %s\n"
 
-#: elf32-arm.h:2427
-msgid " [old ABI]"
-msgstr " [¾É ABI]"
+#: elf32-arm.c:3722 elf32-arm.c:7051
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: Thumb call to ARM"
+msgstr ""
 
-#: elf32-arm.h:2430
-msgid " [software FP]"
-msgstr " [Èí¼þ FP]"
+#: elf32-arm.c:3769
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+"  first occurrence: %B: ARM call to Thumb"
+msgstr ""
 
-#: elf32-arm.h:2438
-msgid " [Version1 EABI]"
-msgstr " [°æ±¾1 EABI]"
+#: elf32-arm.c:3988 elf32-arm.c:5433
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:2324
+#, fuzzy, c-format
+msgid "%s: cannot create stub entry %s"
+msgstr "æ— æ³•åˆ›å»ºå…ˆè¿›å…ˆå‡ºæ–‡ä»¶%s"
 
-#: elf32-arm.h:2441 elf32-arm.h:2452
-msgid " [sorted symbol table]"
-msgstr " [ÅÅÐò¹ýµÄ·ûºÅ±í]"
+#: elf32-arm.c:5549
+#, fuzzy, c-format
+msgid "unable to find THUMB glue '%s' for '%s'"
+msgstr "%P: è­¦å‘Š: æ— æ³•æ‰¾åˆ°ç¼©ç•¥å›¾å¼€å§‹ç¬¦å�· %s\n"
 
-#: elf32-arm.h:2443 elf32-arm.h:2454
-msgid " [unsorted symbol table]"
-msgstr " [Î´ÅÅÐòµÄ·ûºÅ±í]"
+#: elf32-arm.c:5585
+#, fuzzy, c-format
+msgid "unable to find ARM glue '%s' for '%s'"
+msgstr "%X%P: æ— æ³•æ‰¾åˆ°ç‰ˆæœ¬ç›¸ä¾�æ€§ %s\n"
 
-#: elf32-arm.h:2449
-msgid " [Version2 EABI]"
-msgstr " [°æ±¾2 EABI]"
+#: elf32-arm.c:6123
+msgid "%B: BE8 images only valid in big-endian mode."
+msgstr ""
 
-#: elf32-arm.h:2457
-msgid " [dynamic symbols use segment index]"
-msgstr " [¶¯Ì¬·ûºÅÊ¹ÓÃ¶ÎË÷Òý]"
+#. Give a warning, but do as the user requests anyway.
+#: elf32-arm.c:6353
+msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture"
+msgstr ""
 
-#: elf32-arm.h:2460
-msgid " [mapping symbols precede others]"
+#: elf32-arm.c:6897 elf32-arm.c:6917
+msgid "%B: unable to find VFP11 veneer `%s'"
 msgstr ""
 
-#: elf32-arm.h:2467
-msgid " <EABI version unrecognised>"
-msgstr " <²»¿ÉÊ¶±ðµÄ EABI °æ±¾>"
+#: elf32-arm.c:6966
+#, fuzzy, c-format
+msgid "Invalid TARGET2 relocation type '%s'."
+msgstr "è·³è¿‡æ„�å¤–çš„é‡�å®šä½�ç±»åž‹ %s\n"
 
-#: elf32-arm.h:2474
-msgid " [relocatable executable]"
-msgstr " [¿ÉÖØÐÂ¶¨Î»µÄ¿ÉÖ´ÐÐ³ÌÐò]"
+#. PR ld/16017: Do not generate ARM instructions for
+#. the PLT if compiling for a thumb-only target.
+#.
+#. FIXME: We ought to be able to generate thumb PLT instructions...
+#: elf32-arm.c:7696
+msgid "%B: Warning: thumb mode PLT generation not currently supported"
+msgstr ""
 
-#: elf32-arm.h:2477
-msgid " [has entry point]"
-msgstr " [º¬ÓÐÈë¿Úµã]"
+#: elf32-arm.c:7909
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"
+msgstr ""
 
-#: elf32-arm.h:2482
-msgid "<Unrecognised flag bits set>"
-msgstr "<ÎÞ·¨Ê¶±ðµÄ±êÖ¾Î»¼¯ºÏ>"
+#: elf32-arm.c:7948
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"
+msgstr ""
 
-#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
-#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
-#: elf32-xstormy16.c:941 elf64-mmix.c:1310
-msgid "internal error: dangerous relocation"
-msgstr "ÄÚ²¿´íÎó£ºÎ£ÏÕµÄÖØ¶¨Î»"
+#: elf32-arm.c:8412
+msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
+msgstr ""
 
-#: elf32-cris.c:949
-#, c-format
-msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr "%1$s£ºÀ´×Ô %4$s ½ÚµÄ¹ØÓÚ·ûºÅ¡°%3$s¡±µÄÎÞ·¨½âÎöµÄÖØ¶¨Î» %2$s"
+#: elf32-arm.c:8831
+msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgstr ""
 
-#: elf32-cris.c:1012
-#, c-format
-msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+#: elf32-arm.c:9672
+msgid "%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"
 msgstr ""
 
-#: elf32-cris.c:1015 elf32-cris.c:1141
-msgid "[whose name is lost]"
+#: elf32-arm.c:9695
+msgid "%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"
 msgstr ""
 
-#: elf32-cris.c:1130
-#, c-format
-msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
+#: elf32-arm.c:9724
+msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
 msgstr ""
 
-#: elf32-cris.c:1137
-#, c-format
-msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+#: elf32-arm.c:9937
+msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"
 msgstr ""
 
-#: elf32-cris.c:1155
-#, c-format
-msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+#: elf32-arm.c:9977 elf32-arm.c:10065 elf32-arm.c:10149 elf32-arm.c:10235
+msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
 msgstr ""
 
-#: elf32-cris.c:1170
-#, c-format
-msgid "%s: relocation %s in section %s with no GOT created"
+#: elf32-arm.c:10474 elf32-sh.c:3994 elf64-sh64.c:1544
+#, fuzzy
+msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
+msgstr "%s(%s+0x%lx)ï¼šå…³äºŽ SEC_MERGE èŠ‚çš„é‡�å®šä½� %s"
+
+#: elf32-arm.c:10585 elf32-m68k.c:4155 elf32-xtensa.c:2799
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4192
+msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
 msgstr ""
 
-#: elf32-cris.c:1288
-#, c-format
-msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr "%s£ºÄÚ²¿²»Ò»ÖÂ£»Ã»ÓÐÖØ¶¨Î»½Ú %s"
+#: elf32-arm.c:10586 elf32-m68k.c:4156 elf32-xtensa.c:2800
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4193
+msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
+msgstr ""
 
-#: elf32-cris.c:2514
-#, c-format
-msgid ""
-"%s, section %s:\n"
-"  relocation %s should not be used in a shared object; recompile with -fPIC"
+#: elf32-arm.c:10666 elf32-tic6x.c:2736
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4481
+#, fuzzy
+msgid "out of range"
+msgstr "å­—ç¬¦å€¼è¶…å‡ºå�¯æŽ¥å�—çš„èŒƒå›´ä»¥å¤–"
+
+#: elf32-arm.c:10670 elf32-nios2.c:3525 elf32-tic6x.c:2740
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4485
+msgid "unsupported relocation"
+msgstr "ä¸�æ”¯æŒ�çš„é‡�å®šä½�"
+
+#: elf32-arm.c:10678 elf32-nios2.c:3535 elf32-tic6x.c:2748
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4493
+msgid "unknown error"
+msgstr "æœªçŸ¥é”™è¯¯"
+
+#: elf32-arm.c:11153
+#, fuzzy
+msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"
+msgstr "è­¦å‘Šï¼šæ­£åœ¨æ ¹æ�®å¤–ç•Œè¯·æ±‚æ¸…é™¤ %s çš„äº’æ“�ä½œæ ‡å¿—"
+
+#: elf32-arm.c:11240
+msgid "%B: Unknown mandatory EABI object attribute %d"
 msgstr ""
 
-#: elf32-cris.c:2991
-msgid " [symbols have a _ prefix]"
-msgstr " [·ûºÅÓÐ¸ö _ Ç°×º]"
+#: elf32-arm.c:11248
+msgid "Warning: %B: Unknown EABI object attribute %d"
+msgstr ""
 
-#: elf32-cris.c:3030
-#, c-format
-msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr "%s£ºÊ¹ÓÃ´ø _ Ç°×ºµÄ·ûºÅ£¬µ«ÒÔÎÞÇ°×º·ûºÅÐ´ÈëÎÄ¼þ"
+#: elf32-arm.c:11449
+msgid "error: %B: Unknown CPU architecture"
+msgstr ""
 
-#: elf32-cris.c:3031
-#, c-format
-msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr "%s£ºÊ¹ÓÃÎÞÇ°×º·ûºÅ£¬µ«ÒÔ´ø _ Ç°×ºµÄ·ûºÅÐ´ÈëÎÄ¼þ"
+#: elf32-arm.c:11487
+msgid "error: %B: Conflicting CPU architectures %d/%d"
+msgstr ""
 
-#: elf32-frv.c:1217
-#, c-format
-msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+#: elf32-arm.c:11576
+msgid "Error: %B has both the current and legacy Tag_MPextension_use attributes"
 msgstr ""
 
-#: elf32-frv.c:1267
-#, c-format
-msgid "%s: compiled with %s and linked with modules compiled with %s"
-msgstr "%s£ºÒÔ %s ±àÒë²¢Í¬ÒÔ %s ±àÒëµÄÄ£¿éÁ¬½Ó"
+#: elf32-arm.c:11601
+msgid "error: %B uses VFP register arguments, %B does not"
+msgstr ""
 
-#: elf32-frv.c:1279
-#, c-format
-msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+#: elf32-arm.c:11747
+msgid "error: %B: unable to merge virtualization attributes with %B"
 msgstr ""
 
-#: elf32-frv.c:1315
-#, c-format
-msgid "private flags = 0x%lx:"
-msgstr "Ë½ÓÐ±êÖ¾ = 0x%lx£º"
+#: elf32-arm.c:11773
+msgid "error: %B: Conflicting architecture profiles %c/%c"
+msgstr ""
 
-#: elf32-gen.c:82 elf64-gen.c:82
-#, c-format
-msgid "%s: Relocations in generic ELF (EM: %d)"
+#: elf32-arm.c:11877
+msgid "Warning: %B: Conflicting platform configuration"
 msgstr ""
 
-#: elf32-hppa.c:671 elf64-ppc.c:2323
-#, c-format
-msgid "%s: cannot create stub entry %s"
+#: elf32-arm.c:11886
+msgid "error: %B: Conflicting use of R9"
 msgstr ""
 
-#: elf32-hppa.c:956 elf32-hppa.c:3555
-#, c-format
-msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+#: elf32-arm.c:11898
+msgid "error: %B: SB relative addressing conflicts with use of R9"
 msgstr ""
 
-#: elf32-hppa.c:1338 elf64-x86-64.c:673
-#, c-format
-msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
+#: elf32-arm.c:11911
+msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail"
 msgstr ""
 
-#: elf32-hppa.c:1358
-#, c-format
-msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
+#: elf32-arm.c:11942
+msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail"
 msgstr ""
 
-#: elf32-hppa.c:1551
-#, c-format
-msgid "Could not find relocation section for %s"
-msgstr "ÎÞ·¨Îª %s ÕÒµ½ÖØ¶¨Î»½Ú"
+#: elf32-arm.c:11954
+msgid "error: %B uses iWMMXt register arguments, %B does not"
+msgstr ""
 
-#: elf32-hppa.c:2855
-#, c-format
-msgid "%s: duplicate export stub %s"
+#: elf32-arm.c:11971
+msgid "error: fp16 format mismatch between %B and %B"
 msgstr ""
 
-#: elf32-hppa.c:3433
-#, c-format
-msgid "%s(%s+0x%lx): fixing %s"
-msgstr "%s(%s+0x%lx)£ºÕýÔÚÐÞ¸´ %s"
+#: elf32-arm.c:12007
+msgid "%B has has both the current and legacy Tag_MPextension_use attributes"
+msgstr ""
 
-#: elf32-hppa.c:4080
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#. Ignore init flag - it may not be set, despite the flags field containing valid data.
+#. Ignore init flag - it may not be set, despite the flags field
+#. containing valid data.
+#: elf32-arm.c:12095 elf32-bfin.c:4949 elf32-cris.c:4139 elf32-m68hc1x.c:1427
+#: elf32-m68k.c:1195 elf32-score.c:4004 elf32-score7.c:3808 elf32-vax.c:529
+#: elf32-xgate.c:674 elfxx-mips.c:14955
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:4645
 #, c-format
-msgid "%s(%s+0x%lx): cannot handle %s for %s"
-msgstr ""
+msgid "private flags = %lx:"
+msgstr "ç§�æœ‰æ ‡å¿— = %lxï¼š"
 
-#: elf32-hppa.c:4393
-msgid ".got section not immediately after .plt section"
-msgstr ".got ½Ú²»ÄÜ½ô½ÓÔÚ .plt ½ÚÖ®ºó"
+#: elf32-arm.c:12104
+#, c-format
+msgid " [interworking enabled]"
+msgstr " [å�¯ç”¨äº’æ“�ä½œ]"
 
-#: elf32-i386.c:379
+#: elf32-arm.c:12112
 #, c-format
-msgid "%s: invalid relocation type %d"
-msgstr "%s£ºÎÞÐ§µÄÖØ¶¨Î»ÀàÐÍ %d"
+msgid " [VFP float format]"
+msgstr " [VFP æµ®ç‚¹æ ¼å¼�]"
+
+#: elf32-arm.c:12114
+#, fuzzy, c-format
+msgid " [Maverick float format]"
+msgstr "æ ¼å¼�"
 
-#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
+#: elf32-arm.c:12116
 #, c-format
-msgid "%s: bad symbol index: %d"
-msgstr "%s£º´íÎóµÄ·ûºÅË÷Òý£º%d"
+msgid " [FPA float format]"
+msgstr " [FPA æµ®ç‚¹æ ¼å¼�]"
 
-#: elf32-i386.c:948
+#: elf32-arm.c:12125
 #, c-format
-msgid "%s: `%s' accessed both as normal and thread local symbol"
-msgstr ""
+msgid " [new ABI]"
+msgstr " [æ–° ABI]"
 
-#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
-#: elf64-x86-64.c:761
+#: elf32-arm.c:12128
 #, c-format
-msgid "%s: bad relocation section name `%s'"
-msgstr "%s£º´íÎóµÄÖØ¶¨Î»½ÚÃû³Æ¡°%s¡±"
+msgid " [old ABI]"
+msgstr " [æ—§ ABI]"
 
-#: elf32-i386.c:1159 elf64-alpha.c:4768
+#: elf32-arm.c:12131
 #, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr ""
+msgid " [software FP]"
+msgstr " [è½¯ä»¶ FP]"
 
-#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
-#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
+#: elf32-arm.c:12140
 #, c-format
-msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
-msgstr ""
+msgid " [Version1 EABI]"
+msgstr " [ç‰ˆæœ¬1 EABI]"
 
-#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
-#: elf64-x86-64.c:1986
+#: elf32-arm.c:12143 elf32-arm.c:12154
 #, c-format
-msgid "%s(%s+0x%lx): reloc against `%s': error %d"
-msgstr ""
+msgid " [sorted symbol table]"
+msgstr " [æŽ’åº�è¿‡çš„ç¬¦å�·è¡¨]"
 
-#: elf32-m32r.c:924
-msgid "SDA relocation when _SDA_BASE_ not defined"
-msgstr "ÔÚ _SDA_BASE_ Î´¶¨ÒåÊ±³öÏÖ SDA ÖØ¶¨Î»"
+#: elf32-arm.c:12145 elf32-arm.c:12156
+#, c-format
+msgid " [unsorted symbol table]"
+msgstr " [æœªæŽ’åº�çš„ç¬¦å�·è¡¨]"
 
-#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
-#: elf64-alpha.c:4313 elf64-ia64.c:3687
+#: elf32-arm.c:12151
 #, c-format
-msgid "%s: unknown relocation type %d"
-msgstr "%s£ºÎ´ÖªµÄÖØ¶¨Î»ÀàÐÍ %d"
+msgid " [Version2 EABI]"
+msgstr " [ç‰ˆæœ¬2 EABI]"
 
-#: elf32-m32r.c:1221
+#: elf32-arm.c:12159
 #, c-format
-msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr ""
+msgid " [dynamic symbols use segment index]"
+msgstr " [åŠ¨æ€�ç¬¦å�·ä½¿ç”¨æ®µç´¢å¼•]"
 
-#: elf32-m32r.c:1947
+#: elf32-arm.c:12162
 #, c-format
-msgid "%s: Instruction set mismatch with previous modules"
+msgid " [mapping symbols precede others]"
 msgstr ""
 
-#: elf32-m32r.c:1970
-#, c-format
-msgid "private flags = %lx"
-msgstr "Ë½ÓÐ±êÖ¾ = %lx"
+#: elf32-arm.c:12169
+#, fuzzy, c-format
+msgid " [Version3 EABI]"
+msgstr "é�µå¾ª EABI é“¾æŽ¥è¦�æ±‚"
 
-#: elf32-m32r.c:1975
-msgid ": m32r instructions"
-msgstr "£ºm32r Ö¸Áî"
+#: elf32-arm.c:12173
+#, fuzzy, c-format
+msgid " [Version4 EABI]"
+msgstr "é�µå¾ª EABI é“¾æŽ¥è¦�æ±‚"
 
-#: elf32-m32r.c:1976
-msgid ": m32rx instructions"
-msgstr "£ºm32rx Ö¸Áî"
+#: elf32-arm.c:12177
+#, fuzzy, c-format
+msgid " [Version5 EABI]"
+msgstr "é�µå¾ª EABI é“¾æŽ¥è¦�æ±‚"
 
-#: elf32-m68k.c:413
-msgid " [cpu32]"
-msgstr " [cpu32]"
+#: elf32-arm.c:12180
+#, fuzzy, c-format
+msgid " [soft-float ABI]"
+msgstr "è½¯æµ®ç‚¹æ•°\n"
 
-#: elf32-m68k.c:416
-msgid " [m68000]"
-msgstr " [m68000]"
+#: elf32-arm.c:12183
+#, fuzzy, c-format
+msgid " [hard-float ABI]"
+msgstr "Thumb-1 ç¡¬ä»¶æµ®ç‚¹ VFP ABI"
 
-#: elf32-mcore.c:354 elf32-mcore.c:457
+#: elf32-arm.c:12189
 #, c-format
-msgid "%s: Relocation %s (%d) is not currently supported.\n"
+msgid " [BE8]"
 msgstr ""
 
-#: elf32-mcore.c:442
+#: elf32-arm.c:12192
 #, c-format
-msgid "%s: Unknown relocation type %d\n"
-msgstr "%s£ºÎ´ÖªµÄÖØ¶¨Î»ÀàÐÍ %d\n"
-
-#: elf32-mips.c:1152 elf64-mips.c:1783
-msgid "32bits gp relative relocation occurs for an external symbol"
+msgid " [LE8]"
 msgstr ""
 
-#: elf32-mips.c:1301
+#: elf32-arm.c:12198
 #, c-format
-msgid "Linking mips16 objects into %s format is not supported"
-msgstr "½« mips16 Ä¿±êÎÄ¼þÁ¬½Óµ½ %s ¸ñÊ½ÊÇ²»Ö§³ÖµÄ"
+msgid " <EABI version unrecognised>"
+msgstr " <ä¸�å�¯è¯†åˆ«çš„ EABI ç‰ˆæœ¬>"
 
-#: elf32-ppc.c:1460
+#: elf32-arm.c:12205
 #, c-format
-msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgid " [relocatable executable]"
+msgstr " [å�¯é‡�æ–°å®šä½�çš„å�¯æ‰§è¡Œç¨‹åº�]"
+
+#: elf32-arm.c:12208
+#, c-format
+msgid " [has entry point]"
+msgstr " [å�«æœ‰å…¥å�£ç‚¹]"
+
+#: elf32-arm.c:12213 /src/binutils-gdb/bfd/elfnn-aarch64.c:4648
+#, c-format
+msgid "<Unrecognised flag bits set>"
+msgstr "<æ— æ³•è¯†åˆ«çš„æ ‡å¿—ä½�é›†å�ˆ>"
+
+#: elf32-arm.c:12522 elf32-i386.c:1452 elf32-s390.c:1005 elf32-tic6x.c:2812
+#: elf32-tilepro.c:1511 elf32-xtensa.c:999 elf64-s390.c:927
+#: elf64-x86-64.c:1467 elfxx-sparc.c:1415 elfxx-tilegx.c:1728
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:5038
+#, fuzzy
+msgid "%B: bad symbol index: %d"
+msgstr "å¸¸é‡�å€¼é”™è¯¯ï¼Œç±»åž‹ %dï¼Œç´¢å¼• %d"
+
+#: elf32-arm.c:12674 elf32-metag.c:2283 elf64-x86-64.c:1593
+#: elf64-x86-64.c:1771 elfxx-mips.c:8482
+#, fuzzy
+msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-arm.c:13796
+#, c-format
+msgid "Errors encountered processing file %s"
+msgstr "å¤„ç�†æ–‡ä»¶ %s æ—¶é�‡åˆ°é”™è¯¯"
+
+#: elf32-arm.c:14230
+#, c-format
+msgid "error: required section '%s' not found in the linker script"
+msgstr ""
+
+#: elf32-arm.c:15252
+msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location"
+msgstr ""
+
+#. There's not much we can do apart from complain if this
+#. happens.
+#: elf32-arm.c:15279
+msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)"
+msgstr ""
+
+#: elf32-arm.c:15373 elf32-arm.c:15395
+msgid "%B: error: VFP11 veneer out of range"
+msgstr ""
+
+#: elf32-arm.c:16020
+msgid "error: %B is already in final BE8 format"
+msgstr ""
+
+#: elf32-arm.c:16096
+msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d"
+msgstr ""
+
+#: elf32-arm.c:16112
+#, fuzzy
+msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
+msgstr "é”™è¯¯ï¼š%s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„ï¼Œè€Œç›®æ ‡ %s ä½¿ç”¨ APCS-%d"
+
+#: elf32-arm.c:16137
+#, fuzzy
+msgid "error: %B uses VFP instructions, whereas %B does not"
+msgstr "é”™è¯¯ï¼š%s ä½¿ç”¨ VFP æŒ‡ä»¤ï¼Œè€Œ %s ä½¿ç”¨ FPA æŒ‡ä»¤"
+
+#: elf32-arm.c:16141
+#, fuzzy
+msgid "error: %B uses FPA instructions, whereas %B does not"
+msgstr "é”™è¯¯ï¼š%s ä½¿ç”¨ FPA æŒ‡ä»¤ï¼Œè€Œ %s ä½¿ç”¨ VFP æŒ‡ä»¤"
+
+#: elf32-arm.c:16151
+#, fuzzy
+msgid "error: %B uses Maverick instructions, whereas %B does not"
+msgstr "é”™è¯¯ï¼š%s ä½¿ç”¨ VFP æŒ‡ä»¤ï¼Œè€Œ %s ä½¿ç”¨ FPA æŒ‡ä»¤"
+
+#: elf32-arm.c:16155
+#, fuzzy
+msgid "error: %B does not use Maverick instructions, whereas %B does"
+msgstr "è­¦å‘Šï¼š%s ä¸�æ”¯æŒ�äº’æ“�ä½œï¼Œè€Œ %s æ”¯æŒ�"
+
+#: elf32-arm.c:16174
+#, fuzzy
+msgid "error: %B uses software FP, whereas %B uses hardware FP"
+msgstr "é”™è¯¯ï¼š%s ä½¿ç”¨è½¯ä»¶ FPï¼Œè€Œ %s ä½¿ç”¨ç¡¬ä»¶ FP"
+
+#: elf32-arm.c:16178
+#, fuzzy
+msgid "error: %B uses hardware FP, whereas %B uses software FP"
+msgstr "é”™è¯¯ï¼š%s ä½¿ç”¨ç¡¬ä»¶ FPï¼Œè€Œ %s ä½¿ç”¨è½¯ä»¶ FP"
+
+#: elf32-avr.c:1264 elf32-bfin.c:3228 elf32-cris.c:2024 elf32-epiphany.c:568
+#: elf32-fr30.c:597 elf32-frv.c:4047 elf32-i860.c:1220 elf32-ip2k.c:1479
+#: elf32-iq2000.c:696 elf32-m32c.c:561 elf32-mep.c:543 elf32-metag.c:2000
+#: elf32-moxie.c:290 elf32-msp430.c:1325 elf32-mt.c:399 elf32-openrisc.c:412
+#: elf32-tilepro.c:3674 elf32-v850.c:2289 elf32-xstormy16.c:944
+#: elf64-mmix.c:1546 elfxx-tilegx.c:4059
+msgid "internal error: dangerous relocation"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é‡�å®šä½�"
+
+#: elf32-avr.c:2476 elf32-hppa.c:578 elf32-m68hc1x.c:160 elf32-metag.c:1197
+#: elf32-nios2.c:1357
+msgid "%B: cannot create stub entry %s"
+msgstr ""
+
+#: elf32-bfin.c:107 elf32-bfin.c:363
+msgid "relocation should be even number"
+msgstr ""
+
+#: elf32-bfin.c:1601
+#, fuzzy
+msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf32-bfin.c:1634 elf32-i386.c:4406 elf32-m68k.c:4197 elf32-s390.c:3364
+#: elf64-s390.c:3290 elf64-x86-64.c:4506
+#, fuzzy
+msgid "%B(%A+0x%lx): reloc against `%s': error %d"
+msgstr "%s(%s+0x%lx)ï¼šå…³äºŽ SEC_MERGE èŠ‚çš„é‡�å®šä½� %s"
+
+#: elf32-bfin.c:2732
+msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
+msgstr ""
+
+#: elf32-bfin.c:2748
+msgid "relocation references symbol not defined in the module"
+msgstr ""
+
+#: elf32-bfin.c:2845
+msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
+msgstr ""
+
+#: elf32-bfin.c:2886 elf32-bfin.c:3009
+msgid "cannot emit fixups in read-only section"
+msgstr ""
+
+#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-lm32.c:1095 elf32-sh.c:4913
+#, fuzzy
+msgid "cannot emit dynamic relocations in read-only section"
+msgstr "è­¦å‘Šï¼šå…³äºŽå·²åˆ é™¤çš„èŠ‚çš„é‡�å®šä½�"
+
+#: elf32-bfin.c:2967
+msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
+msgstr ""
+
+#: elf32-bfin.c:3132
+msgid "relocations between different segments are not supported"
+msgstr ""
+
+#: elf32-bfin.c:3133
+#, fuzzy
+msgid "warning: relocation references a different segment"
+msgstr "è­¦å‘Šï¼šå…³äºŽå·²åˆ é™¤çš„èŠ‚çš„é‡�å®šä½�"
+
+#: elf32-bfin.c:4907
+#, fuzzy
+msgid "%B: unsupported relocation type %i"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
+
+#: elf32-bfin.c:4995 elf32-frv.c:6600
+#, c-format
+msgid "%s: cannot link non-fdpic object file into fdpic executable"
+msgstr ""
+
+#: elf32-bfin.c:4999 elf32-frv.c:6604
+#, c-format
+msgid "%s: cannot link fdpic object file into non-fdpic executable"
+msgstr ""
+
+#: elf32-bfin.c:5153
+#, fuzzy, c-format
+msgid "*** check this relocation %s"
+msgstr "%X%H: å�±é™©çš„é‡�å¯»å�€: %s\n"
+
+#: elf32-cris.c:1110
+#, fuzzy
+msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
+msgstr "  æˆªæ–­é‡�å¯»å�€è‡³ç›¸ç¬¦: %s é’ˆå¯¹åœ¨ %B ä¸­çš„ %A åŒºæ®µä¸­çš„ç¬¦å�· %T çš„å®šä¹‰"
+
+#: elf32-cris.c:1172
+#, fuzzy
+msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf32-cris.c:1174
+#, fuzzy
+msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
+msgstr "  æˆªæ–­é‡�å¯»å�€è‡³ç›¸ç¬¦: %s é’ˆå¯¹åœ¨ %B ä¸­çš„ %A åŒºæ®µä¸­çš„ç¬¦å�· %T çš„å®šä¹‰"
+
+#: elf32-cris.c:1180 elf32-cris.c:1313 elf32-cris.c:1573 elf32-cris.c:1656
+#: elf32-cris.c:1809 elf32-tic6x.c:2645
+#, fuzzy
+msgid "[whose name is lost]"
+msgstr "èµ„æº�ä¸¢å¤±"
+
+#: elf32-cris.c:1299 elf32-tic6x.c:2630
+msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol"
+msgstr ""
+
+#: elf32-cris.c:1307 elf32-cris.c:1650 elf32-cris.c:1803 elf32-tic6x.c:2638
+msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
+msgstr ""
+
+#: elf32-cris.c:1333
+#, fuzzy
+msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
+msgstr "  æˆªæ–­é‡�å¯»å�€è‡³ç›¸ç¬¦: %s é’ˆå¯¹åœ¨ %B ä¸­çš„ %A åŒºæ®µä¸­çš„ç¬¦å�· %T çš„å®šä¹‰"
+
+#: elf32-cris.c:1349
+msgid "%B, section %A: relocation %s with no GOT created"
+msgstr ""
+
+#. We shouldn't get here for GCC-emitted code.
+#: elf32-cris.c:1564
+msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?"
+msgstr ""
+
+#: elf32-cris.c:1937
+msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?"
+msgstr ""
+
+#: elf32-cris.c:1990
+msgid "(too many global variables for -fpic: recompile with -fPIC)"
+msgstr ""
+
+#: elf32-cris.c:1997
+msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)"
+msgstr ""
+
+#: elf32-cris.c:3234
+msgid ""
+"%B, section %A:\n"
+"  v10/v32 compatible object %s must not contain a PIC relocation"
+msgstr ""
+
+#: elf32-cris.c:3342
+msgid ""
+"%B, section %A:\n"
+"  relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC"
+msgstr ""
+
+#: elf32-cris.c:3556
+#, fuzzy
+msgid ""
+"%B, section %A:\n"
+"  relocation %s should not be used in a shared object; recompile with -fPIC"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-cris.c:3978
+msgid ""
+"%B, section `%A', to symbol `%s':\n"
+"  relocation %s should not be used in a shared object; recompile with -fPIC"
+msgstr ""
+
+#: elf32-cris.c:4091
+#, fuzzy
+msgid "Unexpected machine number"
+msgstr "æ„�å¤–çš„ç¼–å�·"
+
+#: elf32-cris.c:4142
+#, c-format
+msgid " [symbols have a _ prefix]"
+msgstr " [ç¬¦å�·æœ‰ä¸ª _ å‰�ç¼€]"
+
+#: elf32-cris.c:4145
+#, c-format
+msgid " [v10 and v32]"
+msgstr ""
+
+#: elf32-cris.c:4148
+#, c-format
+msgid " [v32]"
+msgstr ""
+
+#: elf32-cris.c:4191
+#, fuzzy
+msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgstr "%sï¼šä½¿ç”¨å¸¦ _ å‰�ç¼€çš„ç¬¦å�·ï¼Œä½†ä»¥æ— å‰�ç¼€ç¬¦å�·å†™å…¥æ–‡ä»¶"
+
+#: elf32-cris.c:4192
+#, fuzzy
+msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgstr "%sï¼šä½¿ç”¨æ— å‰�ç¼€ç¬¦å�·ï¼Œä½†ä»¥å¸¦ _ å‰�ç¼€çš„ç¬¦å�·å†™å…¥æ–‡ä»¶"
+
+#: elf32-cris.c:4211
+msgid "%B contains CRIS v32 code, incompatible with previous objects"
+msgstr ""
+
+#: elf32-cris.c:4213
+msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
+msgstr ""
+
+#: elf32-dlx.c:142
+#, c-format
+msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported"
+msgstr ""
+
+#: elf32-dlx.c:204
+#, c-format
+msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported"
+msgstr ""
+
+#. Only if it's not an unresolved symbol.
+#: elf32-epiphany.c:564 elf32-ip2k.c:1475
+#, fuzzy
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
+
+#: elf32-frv.c:1460 elf32-frv.c:1609
+msgid "relocation requires zero addend"
+msgstr ""
+
+#: elf32-frv.c:2822
+msgid "%H: relocation to `%s+%v' may have caused the error above\n"
+msgstr ""
+
+#: elf32-frv.c:2839
+msgid "%H: relocation references symbol not defined in the module\n"
+msgstr ""
+
+#: elf32-frv.c:2915
+msgid "%H: R_FRV_GETTLSOFF not applied to a call instruction\n"
+msgstr ""
+
+#: elf32-frv.c:2956
+msgid "%H: R_FRV_GOTTLSDESC12 not applied to an lddi instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3027
+msgid "%H: R_FRV_GOTTLSDESCHI not applied to a sethi instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3064
+msgid "%H: R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3111
+msgid "%H: R_FRV_TLSDESC_RELAX not applied to an ldd instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3195
+msgid "%H: R_FRV_GETTLSOFF_RELAX not applied to a calll instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3249
+msgid "%H: R_FRV_GOTTLSOFF12 not applied to an ldi instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3279
+msgid "%H: R_FRV_GOTTLSOFFHI not applied to a sethi instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3308
+msgid "%H: R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3338
+msgid "%H: R_FRV_TLSOFF_RELAX not applied to an ld instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3383
+msgid "%H: R_FRV_TLSMOFFHI not applied to a sethi instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3410
+msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction\n"
+msgstr ""
+
+#: elf32-frv.c:3531
+msgid "%H: R_FRV_FUNCDESC references dynamic symbol with nonzero addend\n"
+msgstr ""
+
+#: elf32-frv.c:3572 elf32-frv.c:3694
+msgid "%H: cannot emit fixups in read-only section\n"
+msgstr ""
+
+#: elf32-frv.c:3603 elf32-frv.c:3737
+#, fuzzy
+msgid "%H: cannot emit dynamic relocations in read-only section\n"
+msgstr "%sï¼šæœªå¤„ç�†çš„å…³äºŽ %s çš„åŠ¨æ€�é‡�å®šä½�"
+
+#: elf32-frv.c:3652
+msgid "%H: R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend\n"
+msgstr ""
+
+#: elf32-frv.c:3908
+msgid "%H: reloc against `%s' references a different segment\n"
+msgstr ""
+
+#: elf32-frv.c:4058
+#, fuzzy
+msgid "%H: reloc against `%s': %s\n"
+msgstr "æ— æ³•è§£æž�çš„ä»¥ %s ä¸ºå‡†ä¹‹ PC ç›¸å¯¹é‡�å®šä½�"
+
+#: elf32-frv.c:6265
+#, fuzzy
+msgid "%B: unsupported relocation type %i\n"
+msgstr "%sï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�çš„ç±»åž‹ %s"
+
+#: elf32-frv.c:6514
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr ""
+
+#: elf32-frv.c:6567 elf32-iq2000.c:828 elf32-m32c.c:812
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%sï¼šä»¥ %s ç¼–è¯‘å¹¶å�Œä»¥ %s ç¼–è¯‘çš„æ¨¡å�—è¿žæŽ¥"
+
+#: elf32-frv.c:6579
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-frv.c:6627 elf32-iq2000.c:865 elf32-m32c.c:848 elf32-mt.c:561
+#: elf32-rl78.c:1069 elf32-rx.c:3040 elf64-ppc.c:5839
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "ç§�æœ‰æ ‡å¿— = 0x%lxï¼š"
+
+#: elf32-gen.c:69 elf64-gen.c:69
+msgid "%B: Relocations in generic ELF (EM: %d)"
+msgstr ""
+
+#: elf32-hppa.c:830 elf32-hppa.c:3592
+msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+msgstr ""
+
+#: elf32-hppa.c:1268
+#, fuzzy
+msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-hppa.c:2781
+#, fuzzy
+msgid "%B: duplicate export stub %s"
+msgstr "è­¦å‘Šï¼šé‡�å¤�çš„ EXPORTï¼š%s\n"
+
+#: elf32-hppa.c:3427
+msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
+msgstr ""
+
+#: elf32-hppa.c:4279
+msgid "%B(%A+0x%lx): cannot handle %s for %s"
+msgstr ""
+
+#: elf32-hppa.c:4598
+msgid ".got section not immediately after .plt section"
+msgstr ".got èŠ‚ä¸�èƒ½ç´§æŽ¥åœ¨ .plt èŠ‚ä¹‹å�Ž"
+
+#. Unknown relocation.
+#: elf32-i386.c:380 elf32-m68k.c:353 elf32-ppc.c:2035 elf32-s390.c:345
+#: elf32-tic6x.c:2667 elf64-ppc.c:2427 elf64-s390.c:371 elf64-x86-64.c:281
+#, fuzzy
+msgid "%B: invalid relocation type %d"
+msgstr "%q+Dçš„æŠ½è±¡ç±»åž‹æ— æ•ˆ"
+
+#: elf32-i386.c:1394 elf64-x86-64.c:1410
+msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed"
+msgstr ""
+
+#: elf32-i386.c:1642 elf32-s390.c:1233 elf32-sh.c:6263 elf32-tilepro.c:1627
+#: elf32-xtensa.c:1176 elf64-s390.c:1166 elfxx-sparc.c:1596
+#: elfxx-tilegx.c:1836
+msgid "%B: `%s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf32-i386.c:2500 elf64-x86-64.c:2582
+#, fuzzy
+msgid "%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"
+msgstr "è­¦å‘Šï¼šå…³äºŽå·²åˆ é™¤çš„èŠ‚çš„é‡�å®šä½�"
+
+#: elf32-i386.c:2740 elf64-x86-64.c:2820
+#, fuzzy
+msgid "%P: %B: warning: relocation in readonly section `%A'.\n"
+msgstr "è­¦å‘Šï¼šå…³äºŽå·²åˆ é™¤çš„èŠ‚çš„é‡�å®šä½�"
+
+#: elf32-i386.c:3207 elf32-tilepro.c:2873 elf64-x86-64.c:3275
+#: elfxx-tilegx.c:3172 /src/binutils-gdb/bfd/elfnn-aarch64.c:4099
+#, fuzzy
+msgid "%B: unrecognized relocation (0x%x) in section `%A'"
+msgstr "%sï¼šé”™è¯¯çš„é‡�å®šä½�èŠ‚å��ç§°â€œ%sâ€�"
+
+#: elf32-i386.c:3368 elf64-x86-64.c:3380 elfxx-sparc.c:3150
+#: /src/binutils-gdb/bfd/elfnn-aarch64.c:3496
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s"
+msgstr ""
+
+#: elf32-i386.c:3610 elf64-x86-64.c:3777
+msgid "hidden symbol"
+msgstr "éš�è—�ç¬¦å�·"
+
+#: elf32-i386.c:3613 elf64-x86-64.c:3780
+msgid "internal symbol"
+msgstr "å†…éƒ¨ç¬¦å�·"
+
+#: elf32-i386.c:3616 elf64-x86-64.c:3783
+msgid "protected symbol"
+msgstr "å�—ä¿�æŠ¤ç¬¦å�·"
+
+#: elf32-i386.c:3619 elf64-x86-64.c:3786
+msgid "symbol"
+msgstr "ç¬¦å�·"
+
+#: elf32-i386.c:3624
+#, fuzzy
+msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-i386.c:3635
+#, fuzzy
+msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-i386.c:4923 elf32-tilepro.c:3923 elf64-x86-64.c:4964
+#: elfxx-tilegx.c:4326 /src/binutils-gdb/bfd/elfnn-aarch64.c:7105
+#, fuzzy, c-format
+msgid "discarded output section: `%A'"
+msgstr ""
+"\n"
+"èˆ�å¼ƒçš„è¾“å…¥åŒºæ®µ\n"
+"\n"
+
+#: elf32-ip2k.c:857 elf32-ip2k.c:863 elf32-ip2k.c:930 elf32-ip2k.c:936
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr ""
+
+#: elf32-ip2k.c:880 elf32-ip2k.c:963
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr ""
+
+#: elf32-ip2k.c:1292
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr ""
+
+#: elf32-ip2k.c:1308
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr ""
+
+#: elf32-iq2000.c:841 elf32-m32c.c:824
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-lm32.c:698 elf32-nios2.c:2191
+#, fuzzy
+msgid "global pointer relative relocation when _gp not defined"
+msgstr "åœ¨ GP æœªå®šä¹‰çš„æƒ…å†µä¸‹ä½¿ç”¨äº† GP ç›¸å¯¹é‡�å®šä½�"
+
+#: elf32-lm32.c:753 elf32-nios2.c:2623
+msgid "global pointer relative address out of range"
+msgstr ""
+
+#: elf32-lm32.c:1049
+msgid "internal error: addend should be zero for R_LM32_16_GOT"
+msgstr ""
+
+#: elf32-m32r.c:1453
+msgid "SDA relocation when _SDA_BASE_ not defined"
+msgstr "åœ¨ _SDA_BASE_ æœªå®šä¹‰æ—¶å‡ºçŽ° SDA é‡�å®šä½�"
+
+#: elf32-m32r.c:3003
+msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
+msgstr ""
+
+#: elf32-m32r.c:3529
+#, fuzzy
+msgid "%B: Instruction set mismatch with previous modules"
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#: elf32-m32r.c:3550 elf32-nds32.c:5636
+#, c-format
+msgid "private flags = %lx"
+msgstr "ç§�æœ‰æ ‡å¿— = %lx"
+
+#: elf32-m32r.c:3555
+#, c-format
+msgid ": m32r instructions"
+msgstr "ï¼šm32r æŒ‡ä»¤"
+
+#: elf32-m32r.c:3556
+#, c-format
+msgid ": m32rx instructions"
+msgstr "ï¼šm32rx æŒ‡ä»¤"
+
+#: elf32-m32r.c:3557
+#, c-format
+msgid ": m32r2 instructions"
+msgstr ": m32r2 æŒ‡ä»¤"
+
+#: elf32-m68hc1x.c:1114
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr ""
+
+#: elf32-m68hc1x.c:1150
+#, c-format
+msgid "XGATE address (%lx) is not within shared RAM(0xE000-0xFFFF), therefore you must manually offset the address, and possibly manage the page, in your code."
+msgstr ""
+
+#: elf32-m68hc1x.c:1170
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr ""
+
+#: elf32-m68hc1x.c:1190
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr ""
+
+#: elf32-m68hc1x.c:1237
+#, c-format
+msgid "S12 address (%lx) is not within shared RAM(0x2000-0x4000), therefore you must manually offset the address in your code"
+msgstr ""
+
+#: elf32-m68hc1x.c:1370
+msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr ""
+
+#: elf32-m68hc1x.c:1377
+msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr ""
+
+#: elf32-m68hc1x.c:1386
+#, fuzzy
+msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "é”™è¯¯ï¼š%s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„ï¼Œè€Œ %s æ˜¯ä¸º APCS-%d ç¼–è¯‘çš„"
+
+#: elf32-m68hc1x.c:1402 elf32-ppc.c:4776 elf64-sparc.c:706 elfxx-mips.c:14817
+msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-m68hc1x.c:1430 elf32-xgate.c:677
+#, c-format
+msgid "[abi=32-bit int, "
+msgstr "[abi=32-bit int, "
+
+#: elf32-m68hc1x.c:1432 elf32-xgate.c:679
+#, c-format
+msgid "[abi=16-bit int, "
+msgstr "[abi=16-bit int, "
+
+#: elf32-m68hc1x.c:1435 elf32-xgate.c:682
+#, c-format
+msgid "64-bit double, "
+msgstr "64-bit double, "
+
+#: elf32-m68hc1x.c:1437 elf32-xgate.c:684
+#, c-format
+msgid "32-bit double, "
+msgstr "32-bit double, "
+
+#: elf32-m68hc1x.c:1440
+#, c-format
+msgid "cpu=HC11]"
+msgstr "cpu=HC11]"
+
+#: elf32-m68hc1x.c:1442
+#, c-format
+msgid "cpu=HCS12]"
+msgstr "cpu=HCS12]"
+
+#: elf32-m68hc1x.c:1444
+#, c-format
+msgid "cpu=HC12]"
+msgstr "cpu=HC12]"
+
+#: elf32-m68hc1x.c:1447
+#, c-format
+msgid " [memory=bank-model]"
+msgstr " [memory=bank-model]"
+
+#: elf32-m68hc1x.c:1449
+#, c-format
+msgid " [memory=flat]"
+msgstr " [memory=flat]"
+
+#: elf32-m68hc1x.c:1452
+#, fuzzy, c-format
+msgid " [XGATE RAM offsetting]"
+msgstr "ä½¿ç”¨ ROM è€Œä¸�æ˜¯ RAM"
+
+#: elf32-m68k.c:1210 elf32-m68k.c:1211 vms-alpha.c:7207 vms-alpha.c:7222
+msgid "unknown"
+msgstr "æœªçŸ¥"
+
+#: elf32-m68k.c:1674
+msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d"
+msgstr ""
+
+#: elf32-m68k.c:1680
+msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d"
+msgstr ""
+
+#: elf32-m68k.c:3921
+msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object"
+msgstr ""
+
+#: elf32-mcore.c:99 elf32-mcore.c:442
+#, fuzzy
+msgid "%B: Relocation %s (%d) is not currently supported.\n"
+msgstr "%sï¼šå°šä¸�æ”¯æŒ�å…³äºŽç¬¦å�· %s çš„é‡�å®šä½� %sã€‚"
+
+#: elf32-mcore.c:428
+#, fuzzy
+msgid "%B: Unknown relocation type %d\n"
+msgstr "æœªçŸ¥ (ç±»åž‹ = %dï¼Œä½� = %d)\n"
+
+#. Pacify gcc -Wall.
+#: elf32-mep.c:157
+#, fuzzy, c-format
+msgid "mep: no reloc for code %d"
+msgstr "%X é”™è¯¯: åœ¨ DLL ä¸­ %d-æ¯”ç‰¹é‡�å¯»å�€\n"
+
+#: elf32-mep.c:163
+#, fuzzy, c-format
+msgid "MeP: howto %d has type %d"
+msgstr "%q+Dç±»åž‹ä¸�å®Œå…¨"
+
+#: elf32-mep.c:632
+#, fuzzy
+msgid "%B and %B are for different cores"
+msgstr " B -  å�·ç �\t\t:"
+
+#: elf32-mep.c:649
+#, fuzzy
+msgid "%B and %B are for different configurations"
+msgstr "%F%B: æˆ�å‘˜ %B åœ¨å½’æ¡£ä¸­å¹¶é�žå¯¹è±¡\n"
+
+#: elf32-mep.c:686
+#, fuzzy, c-format
+msgid "private flags = 0x%lx"
+msgstr "  æ ‡å¿—ï¼š             0x%lx%s\n"
+
+#: elf32-metag.c:1921
+msgid "%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"
+msgstr ""
+
+#: elf32-microblaze.c:950
+#, c-format
+msgid "%s: unknown relocation type %d"
+msgstr "%sï¼šæœªçŸ¥çš„é‡�å®šä½�ç±»åž‹ %d"
+
+#: elf32-microblaze.c:1076 elf32-microblaze.c:1121
+#, fuzzy, c-format
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgstr ""
+"\n"
+" â€œ%sâ€� ä½�äºŽå��ç§»é‡� 0x%lx çš„é‡�å®šä½�åŒºæ®µå�«æœ‰ %ld ä¸ªå­—èŠ‚ï¼š\n"
+
+#: elf32-microblaze.c:1484 elf32-tilepro.c:3320 elfxx-sparc.c:3526
+#: elfxx-tilegx.c:3729
+msgid "%B: probably compiled without -fPIC?"
+msgstr ""
+
+#: elf32-mips.c:1670 elf64-mips.c:2990 elfn32-mips.c:2793
+msgid "literal relocation occurs for an external symbol"
+msgstr ""
+
+#: elf32-mips.c:1717 elf32-score.c:570 elf32-score7.c:469 elf64-mips.c:3033
+#: elfn32-mips.c:2834
+msgid "32bits gp relative relocation occurs for an external symbol"
+msgstr ""
+
+#: elf32-msp430.c:801 elf32-msp430.c:1109
+msgid "Try enabling relaxation to avoid relocation truncations"
+msgstr ""
+
+#: elf32-msp430.c:1317
+msgid "internal error: branch/jump to an odd address detected"
+msgstr ""
+
+#: elf32-msp430.c:2221
+msgid "Warning: %B: Unknown MSPABI object attribute %d"
+msgstr ""
+
+#: elf32-msp430.c:2312
+msgid "error: %B uses %s instructions but %B uses %s"
+msgstr ""
+
+#: elf32-msp430.c:2324
+msgid "error: %B uses the %s code model whereas %B uses the %s code model"
+msgstr ""
+
+#: elf32-msp430.c:2336
+msgid "error: %B uses the large code model but %B uses MSP430 instructions"
+msgstr ""
+
+#: elf32-msp430.c:2346
+msgid "error: %B uses the %s data model whereas %B uses the %s data model"
+msgstr ""
+
+#: elf32-msp430.c:2358
+msgid "error: %B uses the small code model but %B uses the %s data model"
+msgstr ""
+
+#: elf32-msp430.c:2369
+msgid "error: %B uses the %s data model but %B only uses MSP430 instructions"
+msgstr ""
+
+#: elf32-nds32.c:2921
+#, fuzzy
+msgid "error: Can't find symbol: _SDA_BASE_."
+msgstr "é”™è¯¯ï¼šæœªå®šä¹‰çš„ç¬¦å�· __rtinit"
+
+#: elf32-nds32.c:4142
+#, fuzzy
+msgid "%B: error: unknown relocation type %d."
+msgstr "å†…éƒ¨é”™è¯¯ï¼šæœªçŸ¥çš„æœºå™¨ç±»åž‹ï¼š%d"
+
+#: elf32-nds32.c:4584
+#, c-format
+msgid "%s: warning: cannot deal R_NDS32_25_ABS_RELA in shared mode."
+msgstr ""
+
+#: elf32-nds32.c:4716
+msgid "%B: warning: unaligned access to GOT entry."
+msgstr ""
+
+#: elf32-nds32.c:4758
+msgid "%B: warning: relocate SDA_BASE failed."
+msgstr ""
+
+#: elf32-nds32.c:4779
+msgid "%B(%A): warning: unaligned small data access of type %d."
+msgstr ""
+
+#: elf32-nds32.c:5446
+msgid "%B: ISR vector size mismatch with previous modules, previous %u-byte, current %u-byte"
+msgstr ""
+
+#: elf32-nds32.c:5489
+#, fuzzy
+msgid "%B: warning: Endian mismatch with previous modules."
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#: elf32-nds32.c:5499
+msgid "%B: warning: Older version of object file encountered, Please recompile with current tool chain."
+msgstr ""
+
+#: elf32-nds32.c:5577
+#, fuzzy
+msgid "%B: error: ABI mismatch with previous modules."
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#: elf32-nds32.c:5588
+#, fuzzy
+msgid "%B: error: Instruction set mismatch with previous modules."
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#: elf32-nds32.c:5612
+msgid "%B: warning: Incompatible elf-versions %s and  %s."
+msgstr ""
+
+#: elf32-nds32.c:5642
+#, fuzzy, c-format
+msgid ": n1 instructions"
+msgstr "ä½¿ç”¨ AltiVec æŒ‡ä»¤"
+
+#: elf32-nds32.c:5645
+#, fuzzy, c-format
+msgid ": n1h instructions"
+msgstr "ä½¿ç”¨ AltiVec æŒ‡ä»¤"
+
+#: elf32-nds32.c:8147
+#, fuzzy
+msgid "%B: %s\n"
+msgstr ""
+"ã€ŒBã€�ä¾�èµ–å…³ç³»éœ€è¦� epoch (å�‡è®¾ä¸Žã€ŒAã€�ä¸ºç›¸å�Œ epoch)\n"
+"\tA = ã€Œ%sã€�\tB = ã€Œ%sã€�\n"
+
+#: elf32-nds32.c:8449
+msgid "%B(%A): warning: relax is suppressed for sections of alignment %d-bytes > 4-byte."
+msgstr ""
+
+#: elf32-nds32.c:8502
+msgid "%B: error: Cannot set _ITB_BASE_"
+msgstr ""
+
+#: elf32-nds32.c:11384
+msgid "%B: Nested OMIT_FP in %A."
+msgstr ""
+
+#: elf32-nds32.c:11401
+msgid "%B: Unmatched OMIT_FP in %A."
+msgstr ""
+
+#: elf32-nds32.c:13357
+msgid "Linker: cannot init ex9 hash table error \n"
+msgstr ""
+
+#: elf32-nds32.c:13790 elf32-nds32.c:13804
+#, fuzzy
+msgid "Linker: error cannot fixed ex9 relocation \n"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�é”™è¯¯"
+
+#: elf32-nds32.c:14015
+#, c-format
+msgid "%s: warning: unaligned small data access. For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."
+msgstr ""
+
+#: elf32-nds32.c:14047
+msgid "%P%F: failed creating ex9.it %s hash table: %E\n"
+msgstr ""
+
+#: elf32-nios2.c:2861
+#, fuzzy, c-format
+msgid "global pointer relative relocation at address 0x%08x when _gp not defined\n"
+msgstr "åœ¨ GP æœªå®šä¹‰çš„æƒ…å†µä¸‹ä½¿ç”¨äº† GP ç›¸å¯¹é‡�å®šä½�"
+
+#: elf32-nios2.c:2878
+#, c-format
+msgid "Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) because the offset (%d) is out of the allowed range, -32678 to 32767.\n"
+msgstr ""
+
+#: elf32-nios2.c:3392
+msgid "%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not permitted in shared object"
+msgstr ""
+
+#: elf32-nios2.c:3520
+#, fuzzy
+msgid "relocation out of range"
+msgstr "å­—ç¬¦å€¼è¶…å‡ºå�¯æŽ¥å�—çš„èŒƒå›´ä»¥å¤–"
+
+#: elf32-nios2.c:3530 elf32-tic6x.c:2744
+#, fuzzy
+msgid "dangerous relocation"
+msgstr "%X%H: å�±é™©çš„é‡�å¯»å�€: %s\n"
+
+#: elf32-nios2.c:4529
+#, fuzzy, c-format
+msgid "dynamic variable `%s' is zero size"
+msgstr "è®¾å¤‡ %s å¤§å°�ä¸ºé›¶ã€‚\n"
+
+#: elf32-ppc.c:2100
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr ""
+
+#: elf32-ppc.c:2642
+#, fuzzy
+msgid "corrupt %s section in %B"
+msgstr "Corrupt header in the %s section.\n"
+
+#: elf32-ppc.c:2661
+#, fuzzy
+msgid "unable to read in %s section from %B"
+msgstr "æ— æ³•ä»Ž %s è¯»å�–é…¬è½½: %s\n"
+
+#: elf32-ppc.c:2702
+#, fuzzy
+msgid "warning: unable to set size of %s section in %B"
+msgstr "%1$sï¼šè­¦å‘Šï¼šæ�¥è‡ª %3$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%2$sâ€�çš„ä¸�å�¯è§£æž�çš„é‡�å®šä½�"
+
+#: elf32-ppc.c:2752
+msgid "failed to allocate space for new APUinfo section."
+msgstr ""
+
+#: elf32-ppc.c:2771
+#, fuzzy
+msgid "failed to compute new APUinfo section."
+msgstr "è®¡ç®—æ–°çš„çŽ¯å¢ƒå¤±è´¥"
+
+#: elf32-ppc.c:2774
+msgid "failed to install new APUinfo section."
+msgstr ""
+
+#: elf32-ppc.c:3844
+#, fuzzy
+msgid "%B: relocation %s cannot be used when making a shared object"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:4218
+msgid "%P: %H: %s reloc against local symbol\n"
+msgstr ""
+
+#: elf32-ppc.c:4299
+msgid "%P: %H: @local call to ifunc %s\n"
+msgstr ""
+
+#: elf32-ppc.c:4588 elf32-ppc.c:4603
+msgid "Warning: %B uses hard float, %B uses soft float"
+msgstr ""
+
+#: elf32-ppc.c:4591 elf32-ppc.c:4595
+msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float"
+msgstr ""
+
+#: elf32-ppc.c:4599
+msgid "Warning: %B uses soft float, %B uses single-precision hard float"
+msgstr ""
+
+#: elf32-ppc.c:4606 elf32-ppc.c:4610
+msgid "Warning: %B uses unknown floating point ABI %d"
+msgstr ""
+
+#: elf32-ppc.c:4652 elf32-ppc.c:4656
+msgid "Warning: %B uses unknown vector ABI %d"
+msgstr ""
+
+#: elf32-ppc.c:4660
+msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\""
+msgstr ""
+
+#: elf32-ppc.c:4677 elf32-ppc.c:4680
+msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory"
+msgstr ""
+
+#: elf32-ppc.c:4683 elf32-ppc.c:4687
+msgid "Warning: %B uses unknown small structure return convention %d"
+msgstr ""
+
+#: elf32-ppc.c:4741
+#, fuzzy
+msgid "%B: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%sï¼šä»¥ %s ç¼–è¯‘å¹¶å�Œä»¥ %s ç¼–è¯‘çš„æ¨¡å�—è¿žæŽ¥"
+
+#: elf32-ppc.c:4749
+#, fuzzy
+msgid "%B: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%sï¼šä»¥ %s ç¼–è¯‘å¹¶å�Œä»¥ %s ç¼–è¯‘çš„æ¨¡å�—è¿žæŽ¥"
+
+#: elf32-ppc.c:4872
+msgid "%P: bss-plt forced due to %B\n"
+msgstr ""
+
+#: elf32-ppc.c:4875
+msgid "%P: bss-plt forced by profiling\n"
+msgstr ""
+
+#. Uh oh, we didn't find the expected call.  We
+#. could just mark this symbol to exclude it
+#. from tls optimization but it's safer to skip
+#. the entire optimization.
+#: elf32-ppc.c:5369 elf64-ppc.c:8371
+msgid "%H arg lost __tls_get_addr, TLS optimization disabled\n"
+msgstr ""
+
+#: elf32-ppc.c:7927
+#, fuzzy
+msgid "%P: %B: unknown relocation type %d for symbol %s\n"
+msgstr "%1$sï¼šå…³äºŽç¬¦å�· %3$s çš„æœªçŸ¥é‡�å®šä½�ç±»åž‹ %2$d"
+
+#: elf32-ppc.c:8191
+msgid "%P: %H: non-zero addend on %s reloc against `%s'\n"
+msgstr ""
+
+#: elf32-ppc.c:8389
+#, fuzzy
+msgid "%P: %H: relocation %s for indirect function %s unsupported\n"
+msgstr "%sï¼šä¸�æ”¯æŒ�ä»Ž %s åˆ° %s çš„å�¯é‡�å®šä½�çš„è¿žæŽ¥"
+
+#: elf32-ppc.c:8646 elf32-ppc.c:8676 elf32-ppc.c:8767
+msgid "%P: %B: the target (%s) of a %s relocation is in the wrong output section (%s)\n"
+msgstr ""
+
+#: elf32-ppc.c:8854
+msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr ""
+
+#: elf32-ppc.c:8958
+#, fuzzy
+msgid "%P: %B: relocation %s is not yet supported for symbol %s\n"
+msgstr "%sï¼šå°šä¸�æ”¯æŒ�å…³äºŽç¬¦å�· %s çš„é‡�å®šä½� %sã€‚"
+
+#: elf32-ppc.c:9038
+#, fuzzy
+msgid "%P: %H: error: %s against `%s' not a multiple of %u\n"
+msgstr "%sï¼šé”™è¯¯ï¼šé‡�å®šä½� %s ä¸�æ˜¯ 4 çš„å€�æ•°"
+
+#: elf32-ppc.c:9067
+#, fuzzy
+msgid "%P: %H: unresolvable %s relocation against symbol `%s'\n"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf32-ppc.c:9114
+msgid "%P: %H: %s reloc against `%s': error %d\n"
+msgstr ""
+
+#: elf32-ppc.c:9750
+msgid "%P: %s not defined in linker created %s\n"
+msgstr ""
+
+#: elf32-rl78.c:784
+msgid "Warning: RL78_SYM reloc with an unknown symbol"
+msgstr ""
+
+#: elf32-rl78.c:952 elf32-rx.c:1324
+msgid "%B(%A): error: call to undefined function '%s'"
+msgstr ""
+
+#: elf32-rl78.c:966 elf32-rx.c:1338
+msgid "%B(%A): warning: unaligned access to symbol '%s' in the small data area"
+msgstr ""
+
+#: elf32-rl78.c:970 elf32-rx.c:1342
+#, fuzzy
+msgid "%B(%A): internal error: out of range error"
+msgstr "å†…éƒ¨é”™è¯¯: symidx è¶…å‡º fptr è¡¨çš„èŒƒå›´"
+
+#: elf32-rl78.c:974 elf32-rx.c:1346
+#, fuzzy
+msgid "%B(%A): internal error: unsupported relocation error"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šä¸�æ”¯æŒ�çš„é‡�å®šä½�é”™è¯¯"
+
+#: elf32-rl78.c:978 elf32-rx.c:1350
+#, fuzzy
+msgid "%B(%A): internal error: dangerous relocation"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é‡�å®šä½�"
+
+#: elf32-rl78.c:982 elf32-rx.c:1354
+#, fuzzy
+msgid "%B(%A): internal error: unknown error"
+msgstr "ç¼–è¯‘å™¨å†…éƒ¨é”™è¯¯ã€‚æœªçŸ¥çš„æ¨¡å¼�ï¼š"
+
+#: elf32-rl78.c:1043
+msgid "RL78/G10 ABI conflict: cannot link G10 and non-G10 objects together"
+msgstr ""
+
+#: elf32-rl78.c:1046 elf32-rl78.c:1049
+#, fuzzy, c-format
+msgid "- %s is G10, %s is not"
+msgstr "      åœ¨ : %s"
+
+#: elf32-rl78.c:1072
+#, c-format
+msgid " [G10]"
+msgstr ""
+
+#: elf32-rx.c:563
+#, fuzzy
+msgid "%B:%A: Warning: deprecated Red Hat reloc "
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šæ— æ³•æ‰¾åˆ°é¢„æœŸçš„é‡�å®šä½�"
+
+#. Check for unsafe relocs in PID mode.  These are any relocs where
+#. an absolute address is being computed.  There are special cases
+#. for relocs against symbols that are known to be referenced in
+#. crt0.o before the PID base address register has been initialised.
+#: elf32-rx.c:581
+msgid "%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"
+msgstr ""
+
+#: elf32-rx.c:1157
+msgid "Warning: RX_SYM reloc with an unknown symbol"
+msgstr ""
+
+#: elf32-s390.c:2292 elf64-s390.c:2244
+msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
+msgstr ""
+
+#: elf32-score.c:1520 elf32-score7.c:1379 elfxx-mips.c:3642
+msgid "not enough GOT space for local GOT entries"
+msgstr "æ²¡æœ‰è¶³å¤Ÿçš„ GOT ç©ºé—´ç”¨äºŽ GOT æ�¡ç›®"
+
+#: elf32-score.c:2742
+#, fuzzy
+msgid "address not word align"
+msgstr ""
+"\n"
+"å­—è¯�æ¨¡å¼�é€‰é¡¹ï¼š\n"
+
+#: elf32-score.c:2827 elf32-score7.c:2631
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elf32-score.c:2882 elf32-score7.c:2686
+msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elf32-score.c:4007 elf32-score7.c:3811
+#, fuzzy, c-format
+msgid " [pic]"
+msgstr "ä¸Ž library-pic åº“é“¾æŽ¥"
+
+#: elf32-score.c:4011 elf32-score7.c:3815
+#, c-format
+msgid " [fix dep]"
+msgstr ""
+
+#: elf32-score.c:4053 elf32-score7.c:3857
+#, fuzzy
+msgid "%B: warning: linking PIC files with non-PIC files"
+msgstr "%sï¼šå°† PIC æ–‡ä»¶å�Œé�ž-PIC æ–‡ä»¶è¿žæŽ¥"
+
+#: elf32-sh-symbian.c:130
+msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
+msgstr ""
+
+#: elf32-sh-symbian.c:383
+#, fuzzy
+msgid "%B: Unrecognised .directive command: %s"
+msgstr "%sï¼šæœªè¯†åˆ«çš„å¯¼å…¥ç±»åž‹ï¼›%x"
+
+#: elf32-sh-symbian.c:500
+msgid "%B: Failed to add renamed symbol %s"
+msgstr ""
+
+#: elf32-sh.c:569
+#, fuzzy
+msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šé”™è¯¯çš„ R_SH_USES å��ç§»é‡�"
+
+#: elf32-sh.c:581
+#, fuzzy
+msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šR_SH_USES æŒ‡å�‘æ— æ³•è¯†åˆ«çš„æŒ‡ä»¤ 0x%x"
+
+#: elf32-sh.c:598
+#, fuzzy
+msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šé”™è¯¯çš„ R_SH_USES è£…å…¥å��ç§»é‡�"
+
+#: elf32-sh.c:613
+#, fuzzy
+msgid "%B: 0x%lx: warning: could not find expected reloc"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šæ— æ³•æ‰¾åˆ°é¢„æœŸçš„é‡�å®šä½�"
+
+#: elf32-sh.c:641
+#, fuzzy
+msgid "%B: 0x%lx: warning: symbol in unexpected section"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šæ„�å¤–èŠ‚ä¸­å‡ºçŽ°ç¬¦å�·"
+
+#: elf32-sh.c:767
+#, fuzzy
+msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šæ— æ³•æ‰¾åˆ°é¢„æœŸçš„ COUNT é‡�å®šä½�"
+
+#: elf32-sh.c:776
+#, fuzzy
+msgid "%B: 0x%lx: warning: bad count"
+msgstr "%sï¼š0x%lxï¼šè­¦å‘Šï¼šé”™è¯¯è®¡æ•°"
+
+#: elf32-sh.c:1180 elf32-sh.c:1550
+msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr ""
+
+#: elf32-sh.c:3939 elf64-sh64.c:1514
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr ""
+
+#: elf32-sh.c:4190
+msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgstr ""
+
+#: elf32-sh.c:4223 elf32-sh.c:4238
+msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
+msgstr ""
+
+#: elf32-sh.c:4252
+msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
+msgstr ""
+
+#: elf32-sh.c:4266
+msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
+msgstr ""
+
+#: elf32-sh.c:4410 elf32-sh.c:4886
+msgid "%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"
+msgstr ""
+
+#: elf32-sh.c:4993
+#, fuzzy
+msgid "%B(%A+0x%lx): %s relocation against external symbol \"%s\""
+msgstr "%s(%s+0x%lx)ï¼šå…³äºŽ SEC_MERGE èŠ‚çš„é‡�å®šä½� %s"
+
+#: elf32-sh.c:5466
+#, c-format
+msgid "%X%C: relocation to \"%s\" references a different segment\n"
+msgstr ""
+
+#: elf32-sh.c:5472
+#, fuzzy, c-format
+msgid "%C: warning: relocation to \"%s\" references a different segment\n"
+msgstr "%sï¼šè­¦å‘Šï¼šå·²åˆ†é…�çš„èŠ‚â€œ%sâ€�ä¸�åœ¨æ®µä¸­"
+
+#: elf32-sh.c:6254 elf32-sh.c:6337
+msgid "%B: `%s' accessed both as normal and FDPIC symbol"
+msgstr ""
+
+#: elf32-sh.c:6259 elf32-sh.c:6341
+msgid "%B: `%s' accessed both as FDPIC and thread local symbol"
+msgstr ""
+
+#: elf32-sh.c:6289
+msgid "%B: Function descriptor relocation with non-zero addend"
+msgstr ""
+
+#: elf32-sh.c:6525 elf64-alpha.c:4661
+#, fuzzy
+msgid "%B: TLS local exec code cannot be linked into shared objects"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf32-sh64.c:224 elf64-sh64.c:2318
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%sï¼šç¼–è¯‘ä¸º 32-ä½�ç›®æ ‡æ–‡ä»¶ä½† %s æ˜¯ 64-ä½�çš„"
+
+#: elf32-sh64.c:227 elf64-sh64.c:2321
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%sï¼šç¼–è¯‘ä¸º 64-ä½�ç›®æ ‡æ–‡ä»¶ä½† %s æ˜¯ 32-ä½�çš„"
+
+#: elf32-sh64.c:229 elf64-sh64.c:2323
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%sï¼šç›®æ ‡æ–‡ä»¶å¤§å°�å’Œç›®æ ‡ %s ä¸�åŒ¹é…�"
+
+#: elf32-sh64.c:452 elf64-sh64.c:2839
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%sï¼šåœ¨è¾“å…¥ä¸­é�‡åˆ°æ•°æ�®æ ‡ç­¾ç¬¦å�·"
+
+#: elf32-sh64.c:529
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "PTB ä¸�åŒ¹é…�ï¼šSHmedia åœ°å�€ (ä½� 0 == 1)"
+
+#: elf32-sh64.c:532
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "PTA ä¸�åŒ¹é…�ï¼šSHcompact åœ°å�€ (ä½� 0 == 0)"
+
+#: elf32-sh64.c:550
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%sï¼šGAS é”™è¯¯ï¼šæ„�å¤–çš„å¸¦æœ‰ R_SH_PT_16 çš„ PTB æŒ‡ä»¤"
+
+#: elf32-sh64.c:599
+#, fuzzy
+msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
+msgstr "%1$sï¼šä½�äºŽåœ°å�€ 0x%3$lx å¤„çš„é�žæ³•é‡�å®šä½�ç±»åž‹ %2$d"
+
+#: elf32-sh64.c:675
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%sï¼šæ— æ³•å†™å‡º .cranges æ�¡ç›®"
+
+#: elf32-sh64.c:735
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%sï¼šæ— æ³•å†™å‡ºç»�æŽ’åº�çš„ .cranges æ�¡ç›®"
+
+#: elf32-sparc.c:90
+#, fuzzy
+msgid "%B: compiled for a 64 bit system and target is 32 bit"
+msgstr "%sï¼šä¸º 64 ä½�ç³»ç»Ÿç¼–è¯‘ä½†ç›®æ ‡å¹³å�°æ˜¯ 32 ä½�çš„"
+
+#: elf32-sparc.c:103
+#, fuzzy
+msgid "%B: linking little endian files with big endian files"
+msgstr "%sï¼šè¿žæŽ¥å°�ç«¯æ–‡ä»¶å’Œå¤§ç«¯æ–‡ä»¶"
+
+#: elf32-spu.c:716
+msgid "%X%P: overlay section %A does not start on a cache line.\n"
+msgstr ""
+
+#: elf32-spu.c:724
+msgid "%X%P: overlay section %A is larger than a cache line.\n"
+msgstr ""
+
+#: elf32-spu.c:744
+msgid "%X%P: overlay section %A is not in cache area.\n"
+msgstr ""
+
+#: elf32-spu.c:784
+msgid "%X%P: overlay sections %A and %A do not start at the same address.\n"
+msgstr ""
+
+#: elf32-spu.c:1008
+msgid "warning: call to non-function symbol %s defined in %B"
+msgstr ""
+
+#: elf32-spu.c:1358
+msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n"
+msgstr ""
+
+#: elf32-spu.c:1877
+#, fuzzy
+msgid "%B is not allowed to define %s"
+msgstr "%%define å�˜é‡� %s è¢«é‡�æ–°å®šä¹‰"
+
+#: elf32-spu.c:1885
+#, c-format
+msgid "you are not allowed to define %s in a script"
+msgstr ""
+
+#: elf32-spu.c:1919
+#, fuzzy, c-format
+msgid "%s in overlay section"
+msgstr "å†…å­˜åŒºæ®µ %s+%x"
+
+#: elf32-spu.c:1948
+#, fuzzy
+msgid "overlay stub relocation overflow"
+msgstr "ä»¥ %s ä¸ºå‡†å¯¹é½�é‡�å®šä½�æ—¶å�‘ç”Ÿæº¢å‡º"
+
+#: elf32-spu.c:1957
+msgid "stubs don't match calculated size"
+msgstr ""
+
+#: elf32-spu.c:2539
+#, fuzzy, c-format
+msgid "warning: %s overlaps %s\n"
+msgstr "è­¦å‘Šï¼š%sï¼š%s\n"
+
+#: elf32-spu.c:2555
+#, fuzzy, c-format
+msgid "warning: %s exceeds section size\n"
+msgstr "æ®µ %s å¯¹å��ç§»å’Œå°ºå¯¸è¡¨å¤ªå°�\n"
+
+#: elf32-spu.c:2586
+msgid "%A:0x%v not found in function table\n"
+msgstr ""
+
+#: elf32-spu.c:2726
+msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n"
+msgstr ""
+
+#: elf32-spu.c:3294
+#, c-format
+msgid "Stack analysis will ignore the call from %s to %s\n"
+msgstr ""
+
+#: elf32-spu.c:3985
+#, fuzzy
+msgid "  %s: 0x%v\n"
+msgstr "  åŠ è½½åœ°å�€ 0x%V"
+
+#: elf32-spu.c:3986
+#, fuzzy
+msgid "%s: 0x%v 0x%v\n"
+msgstr "  åŠ è½½åœ°å�€ 0x%V"
+
+#: elf32-spu.c:3991
+#, fuzzy
+msgid "  calls:\n"
+msgstr "æ²¡æœ‰è°ƒç”¨\n"
+
+#: elf32-spu.c:3999
+#, fuzzy, c-format
+msgid "   %s%s %s\n"
+msgstr ""
+"ç”±%sã€�%sã€�%sã€�\n"
+"%sã€�%sã€�%sã€�%s\n"
+"å’Œ%s ç¼–å†™ã€‚\n"
+
+#: elf32-spu.c:4304
+#, fuzzy, c-format
+msgid "%s duplicated in %s\n"
+msgstr "é‡�å¤�çš„ç¬¦å�·å��ç§°ç”¨äºŽ %s è¢«å¿½ç•¥"
+
+#: elf32-spu.c:4308
+#, fuzzy, c-format
+msgid "%s duplicated\n"
+msgstr "é‡�å¤�å®šä¹‰æ˜ å°„â€œ%sâ€�"
+
+#: elf32-spu.c:4315
+msgid "sorry, no support for duplicate object files in auto-overlay script\n"
+msgstr ""
+
+#: elf32-spu.c:4356
+msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n"
+msgstr ""
+
+#: elf32-spu.c:4511
+msgid "%B:%A%s exceeds overlay size\n"
+msgstr ""
+
+#: elf32-spu.c:4673
+msgid "Stack size for call graph root nodes.\n"
+msgstr ""
+
+#: elf32-spu.c:4674
+msgid ""
+"\n"
+"Stack size for functions.  Annotations: '*' max stack, 't' tail call\n"
+msgstr ""
+
+#: elf32-spu.c:4684
+msgid "Maximum stack required is 0x%v\n"
+msgstr ""
+
+#: elf32-spu.c:4775
+msgid "fatal error while creating .fixup"
+msgstr ""
+
+#: elf32-spu.c:5005
+#, fuzzy
+msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf32-tic6x.c:1600
+msgid "warning: generating a shared library containing non-PIC code"
+msgstr ""
+
+#: elf32-tic6x.c:1605
+msgid "warning: generating a shared library containing non-PID code"
+msgstr ""
+
+#: elf32-tic6x.c:2524
+#, fuzzy
+msgid "%B: SB-relative relocation but __c6xabi_DSBT_BASE not defined"
+msgstr "åœ¨ GP æœªå®šä¹‰çš„æƒ…å†µä¸‹ä½¿ç”¨äº† GP ç›¸å¯¹é‡�å®šä½�"
+
+#: elf32-tic6x.c:3648
+msgid "%B: error: unknown mandatory EABI object attribute %d"
+msgstr ""
+
+#: elf32-tic6x.c:3656
+msgid "%B: warning: unknown EABI object attribute %d"
+msgstr ""
+
+#: elf32-tic6x.c:3768 elf32-tic6x.c:3776
+msgid "error: %B requires more stack alignment than %B preserves"
+msgstr ""
+
+#: elf32-tic6x.c:3786 elf32-tic6x.c:3795
+msgid "error: unknown Tag_ABI_array_object_alignment value in %B"
+msgstr ""
+
+#: elf32-tic6x.c:3804 elf32-tic6x.c:3813
+msgid "error: unknown Tag_ABI_array_object_align_expected value in %B"
+msgstr ""
+
+#: elf32-tic6x.c:3821 elf32-tic6x.c:3828
+msgid "error: %B requires more array alignment than %B preserves"
+msgstr ""
+
+#: elf32-tic6x.c:3850
+#, fuzzy
+msgid "warning: %B and %B differ in wchar_t size"
+msgstr "è­¦å‘Šï¼š%s èŠ‚çš„å¤§å°�ä¸ºé›¶"
+
+#: elf32-tic6x.c:3868
+msgid "warning: %B and %B differ in whether code is compiled for DSBT"
+msgstr ""
+
+#: elf32-v850.c:157
+#, c-format
+msgid "Variable `%s' cannot occupy in multiple small data regions"
+msgstr "å�˜é‡�â€œ%sâ€�ä¸�èƒ½å� æ�®å¤šä¸ªå°�æ•°æ�®åŒº"
+
+#: elf32-v850.c:160
+#, c-format
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "å�˜é‡�â€œ%sâ€�å�ªèƒ½å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºã€�é›¶æ•°æ�®åŒºã€�å¾®æ•°æ�®åŒºä¹‹ä¸€"
+
+#: elf32-v850.c:163
+#, c-format
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "å�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºå’Œé›¶æ•°æ�®åŒº"
+
+#: elf32-v850.c:166
+#, c-format
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "å�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨å°�æ•°æ�®åŒºå’Œå¾®æ•°æ�®åŒº"
+
+#: elf32-v850.c:169
+#, c-format
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "å�˜é‡�â€œ%sâ€�ä¸�èƒ½å�Œæ—¶å‡ºçŽ°åœ¨é›¶æ•°æ�®åŒºå’Œå¾®æ•°æ�®åŒº"
+
+#: elf32-v850.c:467
+#, fuzzy
+msgid "FAILED to find previous HI16 reloc"
+msgstr "å¯»æ‰¾ä¸Šä¸€ä¸ª HI16 é‡�å®šä½�å¤±è´¥\n"
+
+#: elf32-v850.c:2293
+msgid "could not locate special linker symbol __gp"
+msgstr "æ— æ³•å®šä½�ç‰¹æ®Šè¿žæŽ¥å™¨ç¬¦å�· __gp"
+
+#: elf32-v850.c:2297
+msgid "could not locate special linker symbol __ep"
+msgstr "æ— æ³•å®šä½�ç‰¹æ®Šè¿žæŽ¥å™¨ç¬¦å�· __ep"
+
+#: elf32-v850.c:2301
+msgid "could not locate special linker symbol __ctbp"
+msgstr "æ— æ³•å®šä½�ç‰¹æ®Šè�”æœºå™¨ç¬¦å�· __ctbp"
+
+#: elf32-v850.c:2471 elf32-v850.c:2534
+#, fuzzy
+msgid "%B: Architecture mismatch with previous modules"
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#: elf32-v850.c:2478
+#, fuzzy
+msgid "%B: Alignment mismatch with previous modules"
+msgstr "%sï¼šä½“ç³»ç»“æž„å�Œå‰�ä¸€ä¸ªæ¨¡å�—ä¸�åŒ¹é…�"
+
+#. xgettext:c-format.
+#: elf32-v850.c:2553
+#, c-format
+msgid "private flags = %lx: "
+msgstr "ç§�æœ‰æ ‡å¿— = %lxï¼š"
+
+#: elf32-v850.c:2558
+#, c-format
+msgid "unknown v850 architecture"
+msgstr "æœªçŸ¥çš„ v850 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2560
+#, c-format
+msgid "v850 E3 architecture"
+msgstr "v850 e3 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2562 elf32-v850.c:2572
+#, c-format
+msgid "v850 architecture"
+msgstr "v850 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2565
+#, fuzzy, c-format
+msgid ", 8-byte data alignment"
+msgstr "ä¸�è°ƒæ•´å�¯å†™æ•°æ�®å¯¹é½�"
+
+#: elf32-v850.c:2573
+#, c-format
+msgid "v850e architecture"
+msgstr "v850e ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2574
+#, c-format
+msgid "v850e1 architecture"
+msgstr "v850e1 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2575
+#, c-format
+msgid "v850e2 architecture"
+msgstr "v850e2 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2576
+#, c-format
+msgid "v850e2v3 architecture"
+msgstr "v850e2v3 ä½“ç³»ç»“æž„"
+
+#: elf32-v850.c:2577
+#, c-format
+msgid "v850e3v5 architecture"
+msgstr "v850e3v5 ä½“ç³»ç»“æž„"
+
+#: elf32-vax.c:532
+#, c-format
+msgid " [nonpic]"
+msgstr ""
+
+#: elf32-vax.c:535
+#, c-format
+msgid " [d-float]"
+msgstr ""
+
+#: elf32-vax.c:538
+#, c-format
+msgid " [g-float]"
+msgstr ""
+
+#: elf32-vax.c:656
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr ""
+
+#: elf32-vax.c:1543
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr ""
+
+#: elf32-vax.c:1668
+#, fuzzy, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "  æˆªæ–­é‡�å¯»å�€è‡³ç›¸ç¬¦: %s é’ˆå¯¹åœ¨ %B ä¸­çš„ %A åŒºæ®µä¸­çš„ç¬¦å�· %T çš„å®šä¹‰"
+
+#: elf32-vax.c:1674
+#, fuzzy, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "è­¦å‘Šï¼šå°†é—´éš™å¡«å……ç”± 0x%s æˆªçŸ­åˆ° 0x%x"
+
+#: elf32-xgate.c:686
+#, fuzzy, c-format
+msgid "cpu=XGATE]"
+msgstr "ï¼Œä¸�æ˜Ž CPU"
+
+#: elf32-xgate.c:688
+#, c-format
+msgid "error reading cpu type from elf private data"
+msgstr ""
+
+#: elf32-xstormy16.c:455 elf64-ia64-vms.c:2072 elf32-ia64.c:2330
+#: elf64-ia64.c:2330
+msgid "non-zero addend in @fptr reloc"
+msgstr ""
+
+#: elf32-xtensa.c:908
+#, fuzzy
+msgid "%B(%A): invalid property table"
+msgstr ""
+"\n"
+" A - åŠ è½½è¡¨æ ¼  \tB - ä¿�å­˜è¡¨æ ¼"
+
+#: elf32-xtensa.c:2774
+msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
+msgstr ""
+
+#: elf32-xtensa.c:2853 elf32-xtensa.c:2974
+#, fuzzy
+msgid "dynamic relocation in read-only section"
+msgstr "æ— æ³•è¯»å�–åŠ¨æ€�åŒºæ®µ"
+
+#: elf32-xtensa.c:2950
+msgid "TLS relocation invalid without dynamic sections"
+msgstr ""
+
+#: elf32-xtensa.c:3169
+#, fuzzy
+msgid "internal inconsistency in size of .got.loc section"
+msgstr "%sï¼šå†…éƒ¨ä¸�ä¸€è‡´ï¼›æ²¡æœ‰é‡�å®šä½�èŠ‚ %s"
+
+#: elf32-xtensa.c:3482
+msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
+msgstr ""
+
+#: elf32-xtensa.c:4713 elf32-xtensa.c:4721
+msgid "Attempt to convert L32R/CALLX to CALL failed"
+msgstr ""
+
+#: elf32-xtensa.c:6330 elf32-xtensa.c:6406 elf32-xtensa.c:7522
+msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
+msgstr ""
+
+#: elf32-xtensa.c:7262
+msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"
+msgstr ""
+
+#: elf32-xtensa.c:9022
+#, fuzzy
+msgid "invalid relocation address"
+msgstr "æ— æ•ˆçš„åœ°å�€å¯¹é½�"
+
+#: elf32-xtensa.c:9071
+#, fuzzy
+msgid "overflow after relaxation"
+msgstr "ä½¿ç”¨æ›´çŸ­çš„åœ°å�€å¼•ç”¨ã€‚"
+
+#: elf32-xtensa.c:10203
+msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
+msgstr ""
+
+#: elf64-alpha.c:474
+msgid "GPDISP relocation did not find ldah and lda instructions"
+msgstr "GPDISP é‡�å®šä½�æ— æ³•æ‰¾åˆ° ldah å’Œ lda æŒ‡ä»¤"
+
+#: elf64-alpha.c:2503
+#, fuzzy
+msgid "%B: .got subsegment exceeds 64K (size %d)"
+msgstr "%sï¼š.got å­�èŠ‚è¶…è¿‡äº† 64K (å¤§å°� %d)"
+
+#: elf64-alpha.c:4396 elf64-alpha.c:4408
+#, fuzzy
+msgid "%B: gp-relative relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-alpha.c:4434 elf64-alpha.c:4574
+#, fuzzy
+msgid "%B: pc-relative relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-alpha.c:4462
+msgid "%B: change in gp: BRSGP %s"
+msgstr ""
+
+#: elf64-alpha.c:4487
+msgid "<unknown>"
+msgstr "<æœªçŸ¥>"
+
+#: elf64-alpha.c:4492
+msgid "%B: !samegp reloc against symbol without .prologue: %s"
+msgstr ""
+
+#: elf64-alpha.c:4549
+#, fuzzy
+msgid "%B: unhandled dynamic relocation against %s"
+msgstr "%sï¼šæœªå¤„ç�†çš„å…³äºŽ %s çš„åŠ¨æ€�é‡�å®šä½�"
+
+#: elf64-alpha.c:4581
+msgid "%B: pc-relative relocation against undefined weak symbol %s"
+msgstr ""
+
+#: elf64-alpha.c:4645
+#, fuzzy
+msgid "%B: dtp-relative relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-alpha.c:4668
+#, fuzzy
+msgid "%B: tp-relative relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-hppa.c:2084
+#, c-format
+msgid "stub entry for %s cannot load .plt, dp offset = %ld"
+msgstr ""
+
+#: elf64-hppa.c:3280
+#, fuzzy
+msgid "%B(%A+0x%"
+msgstr "  åœ°å�€ï¼š0x"
+
+#: elf64-ia64-vms.c:587 elf32-ia64.c:619 elf64-ia64.c:619
+msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."
+msgstr ""
+
+#: elf64-ia64-vms.c:2027 elf32-ia64.c:2278 elf64-ia64.c:2278
+msgid "@pltoff reloc against local symbol"
+msgstr ""
+
+#: elf64-ia64-vms.c:3279 elf32-ia64.c:3684 elf64-ia64.c:3684
+#, c-format
+msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
+msgstr ""
+
+#: elf64-ia64-vms.c:3290 elf32-ia64.c:3695 elf64-ia64.c:3695
+#, c-format
+msgid "%s: __gp does not cover short data segment"
+msgstr ""
+
+#: elf64-ia64-vms.c:3555 elf32-ia64.c:3962 elf64-ia64.c:3962
+msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
+msgstr ""
+
+#: elf64-ia64-vms.c:3617 elf32-ia64.c:4029 elf64-ia64.c:4029
+#, fuzzy
+msgid "%B: @gprel relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-ia64-vms.c:3676 elf32-ia64.c:4092 elf64-ia64.c:4092
+msgid "%B: linking non-pic code in a position independent executable"
+msgstr ""
+
+#: elf64-ia64-vms.c:3777 elf32-ia64.c:4229 elf64-ia64.c:4229
+msgid "%B: @internal branch to dynamic symbol %s"
+msgstr ""
+
+#: elf64-ia64-vms.c:3779 elf32-ia64.c:4231 elf64-ia64.c:4231
+msgid "%B: speculation fixup to dynamic symbol %s"
+msgstr ""
+
+#: elf64-ia64-vms.c:3781 elf32-ia64.c:4233 elf64-ia64.c:4233
+#, fuzzy
+msgid "%B: @pcrel relocation against dynamic symbol %s"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-ia64-vms.c:3905 elf32-ia64.c:4430 elf64-ia64.c:4430
+msgid "unsupported reloc"
+msgstr "ä¸�æ”¯æŒ�çš„é‡�å®šä½�"
+
+#: elf64-ia64-vms.c:3942 elf32-ia64.c:4468 elf64-ia64.c:4468
+#, fuzzy
+msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-ia64-vms.c:3957 elf32-ia64.c:4483 elf64-ia64.c:4483
+msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."
+msgstr ""
+
+#: elf64-ia64-vms.c:4246 elf32-ia64.c:4745 elf64-ia64.c:4745
+msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
+msgstr ""
+
+#: elf64-ia64-vms.c:4255 elf32-ia64.c:4754 elf64-ia64.c:4754
+#, fuzzy
+msgid "%B: linking big-endian files with little-endian files"
+msgstr "%sï¼šå°†å¤§ç«¯æ–‡ä»¶å�Œå°�ç«¯æ–‡ä»¶"
+
+#: elf64-ia64-vms.c:4264 elf32-ia64.c:4763 elf64-ia64.c:4763
+#, fuzzy
+msgid "%B: linking 64-bit files with 32-bit files"
+msgstr "%sï¼šå°† 64-ä½�æ–‡ä»¶å�Œ 32-ä½�æ–‡ä»¶è¿žæŽ¥"
+
+#: elf64-ia64-vms.c:4273 elf32-ia64.c:4772 elf64-ia64.c:4772
+#, fuzzy
+msgid "%B: linking constant-gp files with non-constant-gp files"
+msgstr "%sï¼šå°† PIC æ–‡ä»¶å�Œé�ž-PIC æ–‡ä»¶è¿žæŽ¥"
+
+#: elf64-ia64-vms.c:4283 elf32-ia64.c:4782 elf64-ia64.c:4782
+#, fuzzy
+msgid "%B: linking auto-pic files with non-auto-pic files"
+msgstr "%sï¼šå°† PIC æ–‡ä»¶å�Œé�ž-PIC æ–‡ä»¶è¿žæŽ¥"
+
+#: elf64-ia64-vms.c:5125 elflink.c:4299
+msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A"
+msgstr ""
+
+#: elf64-ia64-vms.c:5131 elflink.c:4305
+#, fuzzy
+msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
+msgstr "è­¦å‘Šï¼š%4$s ä¸­çš„ç¬¦å�·â€œ%1$sâ€�çš„å¤§å°�ç”± %2$lu å�˜ä¸º %3$lu"
+
+#: elf64-ia64-vms.c:5146 elflink.c:4321
+#, fuzzy
+msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
+msgstr "è­¦å‘Šï¼š%4$s ä¸­çš„ç¬¦å�·â€œ%1$sâ€�çš„å¤§å°�ç”± %2$lu å�˜ä¸º %3$lu"
+
+#: elf64-mmix.c:986
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or assemble using \"-no-expand\" (for gcc, \"-Wa,-no-expand\""
+msgstr ""
+
+#: elf64-mmix.c:1170
+msgid ""
+"invalid input relocation when producing non-ELF, non-mmo format output.\n"
+" Please use the objcopy program to convert from ELF or mmo,\n"
+" or compile using the gcc-option \"-mno-base-addresses\"."
+msgstr ""
+
+#: elf64-mmix.c:1196
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+
+#: elf64-mmix.c:1618
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr ""
+
+#: elf64-mmix.c:1623
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr ""
+
+#: elf64-mmix.c:1667
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr ""
+
+#: elf64-mmix.c:1672
+#, c-format
+msgid "%s: register relocation against non-register symbol: %s in %s"
+msgstr ""
+
+#: elf64-mmix.c:1709
+#, c-format
+msgid "%s: directive LOCAL valid only with a register or absolute value"
+msgstr "%sï¼šæŒ‡ä»¤ LOCAL å�ªå¯¹å¯„å­˜å™¨æˆ–ç»�å¯¹å€¼æœ‰æ•ˆ"
+
+#: elf64-mmix.c:1739
+#, c-format
+msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
+msgstr "%sï¼šLOCAL æŒ‡ä»¤ï¼šå¯„å­˜å™¨ $%ld ä¸�æ˜¯æœ¬åœ°å¯„å­˜å™¨ã€‚ ç¬¬ä¸€ä¸ªå…¨å±€å¯„å­˜å™¨æ˜¯ $%ldã€‚"
+
+#: elf64-mmix.c:2198
+#, c-format
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%sï¼šé”™è¯¯ï¼šé‡�å¤�å®šä¹‰â€œ%sâ€�ï¼›%s çš„èµ·ç‚¹åœ¨æ­¤å‰�è¿žæŽ¥çš„æ–‡ä»¶ä¸­å·²è®¾å®š\n"
+
+#: elf64-mmix.c:2252
+msgid "Register section has contents\n"
+msgstr "å¯„å­˜å™¨èŠ‚æœ‰å†…å®¹\n"
+
+#: elf64-mmix.c:2441
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"å†…éƒ¨ä¸�ä¸€è‡´ï¼šå‰©ä½™ %u != æœ€å¤§ %uã€‚\n"
+"  è¯·æŠ¥å‘Šè¯¥ bugã€‚"
+
+#: elf64-ppc.c:4463
+msgid "%P: %B: cannot create stub entry %s\n"
+msgstr ""
+
+#: elf64-ppc.c:4810
+msgid "%P: symbol '%s' has invalid st_other for ABI version 1\n"
+msgstr ""
+
+#: elf64-ppc.c:5170
+msgid "%P: .opd not allowed in ABI version %d\n"
+msgstr ""
+
+#: elf64-ppc.c:5809
+msgid "%B uses unknown e_flags 0x%lx"
+msgstr ""
+
+#: elf64-ppc.c:5816
+msgid "%B: ABI version %ld is not compatible with ABI version %ld output"
+msgstr ""
+
+#: elf64-ppc.c:5843
+#, fuzzy, c-format
+msgid " [abiv%ld]"
+msgstr "æ•°æ�®å¤§å°� %ld"
+
+#: elf64-ppc.c:7007
+msgid "%P: copy reloc against `%T' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc\n"
+msgstr ""
+
+#: elf64-ppc.c:7270
+#, fuzzy
+msgid "%B: undefined symbol on R_PPC64_TOCSAVE relocation"
+msgstr "é”™è¯¯ï¼šæœªå®šä¹‰çš„ç¬¦å�· __rtinit"
+
+#: elf64-ppc.c:7499
+#, fuzzy
+msgid "%P: dynreloc miscount for %B, section %A\n"
+msgstr "%sï¼šæ²¡æœ‰å…³äºŽèŠ‚ %s çš„ç»„ä¿¡æ�¯"
+
+#: elf64-ppc.c:7583
+#, fuzzy
+msgid "%B: .opd is not a regular array of opd entries"
+msgstr "%sï¼š.opd ä¸�æ˜¯ opd æ�¡ç›®çš„æ™®é€šæ•°ç»„"
+
+#: elf64-ppc.c:7592
+#, fuzzy
+msgid "%B: unexpected reloc type %u in .opd section"
+msgstr "%sï¼š.opd èŠ‚ä¸­æ„�å¤–çš„é‡�å®šä½�ç±»åž‹ %u"
+
+#: elf64-ppc.c:7613
+#, fuzzy
+msgid "%B: undefined sym `%s' in .opd section"
+msgstr "%sï¼š.opd èŠ‚ä¸­æœªå®šä¹‰çš„â€œ%sâ€�"
+
+#: elf64-ppc.c:8177
+msgid "%H __tls_get_addr lost arg, TLS optimization disabled\n"
+msgstr ""
+
+#: elf64-ppc.c:8516 elf64-ppc.c:9139
+#, c-format
+msgid "%s defined on removed toc entry"
+msgstr ""
+
+#: elf64-ppc.c:8868
+#, fuzzy
+msgid "%P: %H: toc optimization is not supported for %s instruction.\n"
+msgstr "%sï¼šé‡�å®šä½� %s ä¸�æ”¯æŒ�ç¬¦å�· %sã€‚"
+
+#: elf64-ppc.c:9096
+msgid "%P: %H: %s references optimized away TOC entry\n"
+msgstr ""
+
+#: elf64-ppc.c:10394
+msgid "%P: cannot find opd entry toc for `%T'\n"
+msgstr ""
+
+#: elf64-ppc.c:10479
+msgid "%P: long branch stub `%s' offset overflow\n"
+msgstr ""
+
+#: elf64-ppc.c:10538
+msgid "%P: can't find branch stub `%s'\n"
+msgstr ""
+
+#: elf64-ppc.c:10602 elf64-ppc.c:10749 elf64-ppc.c:12416
+msgid "%P: linkage table error against `%T'\n"
+msgstr ""
+
+#: elf64-ppc.c:10940
+msgid "%P: can't build branch stub `%s'\n"
+msgstr ""
+
+#: elf64-ppc.c:11748
+msgid "%B section %A exceeds stub group size"
+msgstr ""
+
+#: elf64-ppc.c:12662 elf64-ppc.c:12697
+msgid "%P: %s offset too large for .eh_frame sdata4 encoding"
+msgstr ""
+
+#: elf64-ppc.c:12758
+msgid "%P: stubs don't match calculated size\n"
+msgstr ""
+
+#: elf64-ppc.c:12770
+#, c-format
+msgid ""
+"linker stubs in %u group%s\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu\n"
+"  plt call toc %lu"
+msgstr ""
+
+#: elf64-ppc.c:13096
+msgid "%P: %H: %s used with TLS symbol `%T'\n"
+msgstr ""
+
+#: elf64-ppc.c:13097
+msgid "%P: %H: %s used with non-TLS symbol `%T'\n"
+msgstr ""
+
+#: elf64-ppc.c:13675
+msgid "%P: %H: call to `%T' lacks nop, can't restore toc; recompile with -fPIC\n"
+msgstr ""
+
+#: elf64-ppc.c:13793
+#, fuzzy
+msgid "%P: %B: unknown relocation type %d for `%T'\n"
+msgstr "%1$sï¼šå…³äºŽç¬¦å�· %3$s çš„æœªçŸ¥é‡�å®šä½�ç±»åž‹ %2$d"
+
+#: elf64-ppc.c:14310
+msgid "%P: %H: %s for indirect function `%T' unsupported\n"
+msgstr ""
+
+#: elf64-ppc.c:14417
+#, fuzzy
+msgid "%P: %B: %s is not supported for `%T'\n"
+msgstr "%sï¼šé‡�å®šä½� %s ä¸�æ”¯æŒ�ç¬¦å�· %sã€‚"
+
+#: elf64-ppc.c:14565
+#, fuzzy
+msgid "%P: %H: error: %s not a multiple of %u\n"
+msgstr "ä¿�å­˜è®°å½• h#%2$u è¿›å…¥ %3$s æ—¶äº§ç”Ÿé”™è¯¯(%1$d)\n"
+
+#: elf64-ppc.c:14586
+msgid "%P: %H: unresolvable %s against `%T'\n"
+msgstr ""
+
+#: elf64-ppc.c:14644
+msgid "%P: %H: %s against `%T': error %d\n"
+msgstr ""
+
+#: elf64-sh64.c:1686
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr ""
+
+#: elf64-sparc.c:446
+#, fuzzy
+msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
+msgstr "%sï¼šå�ªæœ‰å¯„å­˜å™¨ %%g[2367] å�¯ä»¥ç”¨ STT_REGISTER æ�¥å£°æ˜Ž"
+
+#: elf64-sparc.c:466
+#, fuzzy
+msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
+msgstr "ä¸�å…¼å®¹åœ°ä½¿ç”¨å¯„å­˜å™¨ %%g%1$dï¼šåœ¨ %3$s ä¸­ä¸º %2$sï¼Œåœ¨å‰�é�¢çš„ %5$s ä¸­ä¸º %4$s"
+
+#: elf64-sparc.c:489
+#, fuzzy
+msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
+msgstr "ç¬¦å�·â€œ%1$sâ€�çš„ç±»åž‹ä¸�å�Œï¼š%2$s ä¸­ä¸ºå¯„å­˜å™¨ï¼Œåœ¨å‰�é�¢çš„ %4$s ä¸­ä¸º %3$s"
+
+#: elf64-sparc.c:534
+#, fuzzy
+msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
+msgstr "ç¬¦å�·â€œ%1$sâ€�çš„ç±»åž‹ä¸�å�Œï¼š%2$s ä¸­ä¸ºå¯„å­˜å™¨ï¼Œåœ¨å‰�é�¢çš„ %4$s ä¸­ä¸º %3$s"
+
+#: elf64-sparc.c:687
+msgid "%B: linking UltraSPARC specific with HAL specific code"
+msgstr ""
+
+#: elf64-x86-64.c:1530
+#, fuzzy
+msgid "%B: relocation %s against symbol `%s' isn't supported in x32 mode"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-x86-64.c:1688
+msgid "%B: '%s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf64-x86-64.c:3405 /src/binutils-gdb/bfd/elfnn-aarch64.c:3511
+msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d"
+msgstr ""
+
+#: elf64-x86-64.c:3667
+#, fuzzy
+msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf64-x86-64.c:3787
+#, fuzzy
+msgid "; recompile with -fPIC"
+msgstr "-fPIC å’Œ -fpic åœ¨æ­¤é…�ç½®ä¸‹ä¸�å�—æ”¯æŒ�"
+
+#: elf64-x86-64.c:3792
+#, fuzzy
+msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf64-x86-64.c:3794
+#, fuzzy
+msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s"
+msgstr "%sï¼šåˆ›å»ºå…±äº«ç›®æ ‡æ–‡ä»¶æ—¶ä¸�èƒ½ä½¿ç”¨é‡�å®šä½� %s"
+
+#: elf64-x86-64.c:3900
+#, fuzzy
+msgid "%B: addend -0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elf64-x86-64.c:3908
+#, fuzzy
+msgid "%B: addend 0x%x in relocation %s against symbol `%s' at 0x%lx in section `%A' is out of range"
+msgstr "%1$sï¼šæ�¥è‡ª %4$s èŠ‚çš„å…³äºŽç¬¦å�·â€œ%3$sâ€�çš„æ— æ³•è§£æž�çš„é‡�å®šä½� %2$s"
+
+#: elfcode.h:760
+#, c-format
+msgid "warning: %s has a corrupt string table index - ignoring"
+msgstr ""
+
+#: elfcode.h:1186
+#, c-format
+msgid "%s: version count (%ld) does not match symbol count (%ld)"
+msgstr "%sï¼šç‰ˆæœ¬è®¡æ•° (%ld) æ— æ³•åŒ¹é…�ç¬¦å�·è®¡æ•° (%ld)"
+
+#: elfcode.h:1440
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr ""
+
+#: elfcore.h:305
+msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu."
+msgstr ""
+
+#: elflink.c:1143
+msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"
+msgstr ""
+
+#: elflink.c:1148
+msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
+msgstr ""
+
+#: elflink.c:1153
+msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
+msgstr ""
+
+#: elflink.c:1158
+msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
+msgstr ""
+
+#: elflink.c:1763
+#, fuzzy
+msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%sï¼šè­¦å‘Šï¼šæ„�å¤–çš„é‡�æ–°å®šä¹‰â€œ%sâ€�"
+
+#: elflink.c:2066
+#, fuzzy
+msgid "%B: version node not found for symbol %s"
+msgstr "%sï¼šé‡�å®šä½� %s ä¸�æ”¯æŒ�ç¬¦å�· %sã€‚"
+
+#: elflink.c:2157
+msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
+msgstr ""
+
+#: elflink.c:2168
+msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table"
+msgstr ""
+
+#: elflink.c:2358
+msgid "%B: relocation size mismatch in %B section %A"
+msgstr ""
+
+#: elflink.c:2640
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "è­¦å‘Šï¼šåŠ¨æ€�ç¬¦å�·â€œ%sâ€�çš„ç±»åž‹å’Œå¤§å°�æœªå®šä¹‰"
+
+#: elflink.c:3403
+msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n"
+msgstr ""
+
+#: elflink.c:4032
+#, fuzzy
+msgid "%B: %s: invalid version %u (max %d)"
+msgstr "%sï¼š%sï¼šæ— æ•ˆçš„ç‰ˆæœ¬ %u (æœ€å¤§ %d)"
+
+#: elflink.c:4068
+#, fuzzy
+msgid "%B: %s: invalid needed version %d"
+msgstr "%sï¼š%sï¼šæ— æ•ˆçš„å¿…å¤‡ç‰ˆæœ¬ %d"
+
+#: elflink.c:4452
+#, fuzzy
+msgid "%B: undefined reference to symbol '%s'"
+msgstr "ä»¥æœªå®šä¹‰çš„ç¬¦å�·å�‚è€ƒå¼€å§‹"
+
+#: elflink.c:5523
+msgid "%B: stack size specified and %s set"
+msgstr ""
+
+#: elflink.c:5526
+#, fuzzy
+msgid "%B: %s not absolute"
+msgstr "å�¯ç”¨ç»�å¯¹å·®æŒ‡ä»¤"
+
+#: elflink.c:5824
+#, fuzzy, c-format
+msgid "%s: undefined version: %s"
+msgstr "%sï¼šè§£é™¤åŸŸâ€œ%sâ€�çš„å®šä¹‰"
+
+#: elflink.c:5892
+#, fuzzy
+msgid "%B: .preinit_array section is not allowed in DSO"
+msgstr "%sï¼šDSO ä¸­ä¸�å…�è®¸å‡ºçŽ° .preinit_array èŠ‚"
+
+#: elflink.c:7657
+#, fuzzy, c-format
+msgid "undefined %s reference in complex symbol: %s"
+msgstr "èµ·å§‹ç¬¦å�· %s æœªå®šä¹‰"
+
+#: elflink.c:7811
+#, fuzzy, c-format
+msgid "unknown operator '%c' in complex symbol"
+msgstr "%Cå¤„å¤�æ•°å¸¸é‡�ä¸­éœ€è¦� PARAMETER ç¬¦å�·"
+
+#: elflink.c:8165 elflink.c:8182 elflink.c:8219 elflink.c:8236
+msgid "%B: Unable to sort relocs - they are in more than one size"
+msgstr ""
+
+#: elflink.c:8196 elflink.c:8250
+msgid "%B: Unable to sort relocs - they are of an unknown size"
+msgstr ""
+
+#: elflink.c:8301
+msgid "Not enough memory to sort relocations"
+msgstr "æ²¡æœ‰è¶³å¤Ÿçš„å†…å­˜è¿›è¡Œé‡�å®šä½�æŽ’åº�"
+
+#: elflink.c:8494
+#, fuzzy
+msgid "%B: Too many sections: %d (>= %d)"
+msgstr "è§„åˆ™è¿‡å¤š (> %d)ï¼�"
+
+#: elflink.c:8775
+msgid "%B: internal symbol `%s' in %B is referenced by DSO"
+msgstr ""
+
+#: elflink.c:8777
+msgid "%B: hidden symbol `%s' in %B is referenced by DSO"
+msgstr ""
+
+#: elflink.c:8779
+msgid "%B: local symbol `%s' in %B is referenced by DSO"
+msgstr ""
+
+#: elflink.c:8890
+#, fuzzy
+msgid "%B: could not find output section %A for input section %A"
+msgstr "%1$sï¼šæ— æ³•ä¸ºè¾“å…¥èŠ‚ %3$s æ‰¾åˆ°è¾“å‡ºèŠ‚ %2$s"
+
+#: elflink.c:9013
+msgid "%B: protected symbol `%s' isn't defined"
+msgstr ""
+
+#: elflink.c:9015
+#, fuzzy
+msgid "%B: internal symbol `%s' isn't defined"
+msgstr "%sï¼šé‡�å®šä½�ä¸­é�žæ³•çš„ç¬¦å�·ç´¢å¼•ï¼š%d"
+
+#: elflink.c:9017
+#, fuzzy
+msgid "%B: hidden symbol `%s' isn't defined"
+msgstr "%sï¼š.opd èŠ‚ä¸­æœªå®šä¹‰çš„â€œ%sâ€�"
+
+#: elflink.c:9043
+msgid "%B: No symbol version section for versioned symbol `%s'"
+msgstr ""
+
+#: elflink.c:9598
+#, fuzzy
+msgid "error: %B: size of section %A is not multiple of address size"
+msgstr "%sï¼šé”™è¯¯ï¼šé‡�å®šä½� %s ä¸�æ˜¯ 4 çš„å€�æ•°"
+
+#: elflink.c:9645
+msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol"
+msgstr ""
+
+#: elflink.c:10369
+msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+msgstr ""
+
+#: elflink.c:10374
+#, c-format
+msgid "%A has both ordered and unordered sections"
+msgstr ""
+
+#: elflink.c:10982
+msgid "%B: file class %s incompatible with %s"
+msgstr ""
+
+#: elflink.c:11303 elflink.c:11347
+#, fuzzy
+msgid "%B: could not find output section %s"
+msgstr "%sï¼šæ— æ³•æ‰¾åˆ°è¾“å‡ºèŠ‚ %s"
+
+#: elflink.c:11308
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "è­¦å‘Šï¼š%s èŠ‚çš„å¤§å°�ä¸ºé›¶"
+
+#: elflink.c:11353
+#, c-format
+msgid "warning: section '%s' is being made into a note"
+msgstr ""
+
+#: elflink.c:11419
+msgid "%P%X: read-only segment has dynamic relocations.\n"
+msgstr ""
+
+#: elflink.c:11422
+msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+msgstr ""
+
+#: elflink.c:11545
+msgid "%P%X: can not read symbols: %E\n"
+msgstr ""
+
+#: elflink.c:11989
+msgid "Removing unused section '%s' in file '%B'"
+msgstr ""
+
+#: elflink.c:12200
+#, fuzzy
+msgid "Warning: gc-sections option ignored"
+msgstr "è­¦å‘Šï¼š%s èŠ‚çš„å¤§å°�ä¸ºé›¶"
+
+#: elflink.c:12489
+#, fuzzy, c-format
+msgid "Unrecognized INPUT_SECTION_FLAG %s\n"
+msgstr "ä¸�èƒ½è¯†åˆ«çš„èŠ‚æ ‡å¿—â€œ%sâ€�"
+
+#: elfxx-mips.c:1419
+msgid "static procedure (no name)"
+msgstr "é�™æ€�è¿‡ç¨‹ (æ— å��ç§°)"
+
+#: elfxx-mips.c:5476
+msgid "MIPS16 and microMIPS functions cannot call each other"
+msgstr ""
+
+#: elfxx-mips.c:6087
+msgid "%B: %A+0x%lx: Unsupported jump between ISA modes; consider recompiling with interlinking enabled."
+msgstr ""
+
+#: elfxx-mips.c:6756 elfxx-mips.c:6979
+msgid "%B: Warning: bad `%s' option size %u smaller than its header"
+msgstr ""
+
+#: elfxx-mips.c:7734 elfxx-mips.c:7859
+msgid "%B: Warning: cannot determine the target function for stub section `%s'"
+msgstr ""
+
+#: elfxx-mips.c:7990
+#, fuzzy
+msgid "%B: Malformed reloc detected for section %s"
+msgstr "%sï¼šæ²¡æœ‰å…³äºŽèŠ‚ %s çš„ç»„ä¿¡æ�¯"
+
+#: elfxx-mips.c:8065
+msgid "%B: GOT reloc at 0x%lx not expected in executables"
+msgstr ""
+
+#: elfxx-mips.c:8199
+msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elfxx-mips.c:8977
+#, c-format
+msgid "non-dynamic relocations refer to dynamic symbol %s"
+msgstr ""
+
+#: elfxx-mips.c:9877
+msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"
+msgstr ""
+
+#: elfxx-mips.c:10016
+msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)"
+msgstr ""
+
+#: elfxx-mips.c:10035
+msgid "JALX to a non-word-aligned address"
+msgstr ""
+
+#: elfxx-mips.c:10402 elfxx-mips.c:10966
+msgid "%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"
+msgstr ""
+
+#: elfxx-mips.c:13990
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%sï¼šé�žæ³•çš„èŠ‚å��â€œ%sâ€�"
+
+#: elfxx-mips.c:14375 elfxx-mips.c:14381 elfxx-mips.c:14387 elfxx-mips.c:14407
+#: elfxx-mips.c:14413 elfxx-mips.c:14419 elfxx-mips.c:14441 elfxx-mips.c:14460
+#: elfxx-mips.c:14467 elfxx-mips.c:14474
+msgid "Warning: %B uses %s (set by %B), %B uses %s"
+msgstr ""
+
+#: elfxx-mips.c:14394 elfxx-mips.c:14426 elfxx-mips.c:14447 elfxx-mips.c:14480
+msgid "Warning: %B uses %s (set by %B), %B uses unknown floating point ABI %d"
+msgstr ""
+
+#: elfxx-mips.c:14493 elfxx-mips.c:14501 elfxx-mips.c:14509 elfxx-mips.c:14517
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses %s"
+msgstr ""
+
+#: elfxx-mips.c:14525
+msgid "Warning: %B uses unknown floating point ABI %d (set by %B), %B uses unknown floating point ABI %d"
+msgstr ""
+
+#: elfxx-mips.c:14548
+msgid "Warning: %B uses %s (set by %B), %B uses unknown MSA ABI %d"
+msgstr ""
+
+#: elfxx-mips.c:14559
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses %s"
+msgstr ""
+
+#: elfxx-mips.c:14567
+msgid "Warning: %B uses unknown MSA ABI %d (set by %B), %B uses unknown MSA ABI %d"
+msgstr ""
+
+#: elfxx-mips.c:14599
+msgid "%B: endianness incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:14610
+msgid "%B: ABI is incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:14694
+#, fuzzy
+msgid "%B: warning: linking abicalls files with non-abicalls files"
+msgstr "%sï¼šå°† 64-ä½�æ–‡ä»¶å�Œ 32-ä½�æ–‡ä»¶è¿žæŽ¥"
+
+#: elfxx-mips.c:14711
+#, fuzzy
+msgid "%B: linking 32-bit code with 64-bit code"
+msgstr "%sï¼šå°† 64-ä½�æ–‡ä»¶å�Œ 32-ä½�æ–‡ä»¶è¿žæŽ¥"
+
+#: elfxx-mips.c:14739 elfxx-mips.c:14802
+#, fuzzy
+msgid "%B: linking %s module with previous %s modules"
+msgstr "%sï¼šABI ä¸�åŒ¹é…�ï¼šæ­£åœ¨å°†æ¨¡å�— %s å�Œå‰�ä¸€ä¸ªæ¨¡å�— %s è¿›è¡Œè¿žæŽ¥"
+
+#: elfxx-mips.c:14762
+#, fuzzy
+msgid "%B: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%sï¼šABI ä¸�åŒ¹é…�ï¼šæ­£åœ¨å°†æ¨¡å�— %s å�Œå‰�ä¸€ä¸ªæ¨¡å�— %s è¿›è¡Œè¿žæŽ¥"
+
+#: elfxx-mips.c:14786
+#, fuzzy
+msgid "%B: ASE mismatch: linking %s module with previous %s modules"
+msgstr "%sï¼šABI ä¸�åŒ¹é…�ï¼šæ­£åœ¨å°†æ¨¡å�— %s å�Œå‰�ä¸€ä¸ªæ¨¡å�— %s è¿›è¡Œè¿žæŽ¥"
+
+#: elfxx-mips.c:14958
+#, c-format
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:14960
+#, c-format
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:14962
+#, c-format
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:14964
+#, c-format
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:14966
+#, c-format
+msgid " [abi unknown]"
+msgstr " [abi æœªçŸ¥]"
+
+#: elfxx-mips.c:14968
+#, c-format
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:14970
+#, c-format
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:14972
+#, fuzzy, c-format
+msgid " [no abi set]"
+msgstr "ï¼Œä¸�æ˜Ž ABI"
+
+#: elfxx-mips.c:14993
+#, c-format
+msgid " [unknown ISA]"
+msgstr " [æœªçŸ¥çš„ ISA]"
+
+#: elfxx-mips.c:15013
+#, c-format
+msgid " [not 32bitmode]"
+msgstr " [é�ž 32ä½�æ¨¡å¼�]"
+
+#: elfxx-sparc.c:640
+#, fuzzy, c-format
+msgid "invalid relocation type %d"
+msgstr "%q+Dçš„æŠ½è±¡ç±»åž‹æ— æ•ˆ"
+
+#: elfxx-tilegx.c:4433
+msgid "%B: Cannot link together %s and %s objects."
+msgstr ""
+
+#: i386linux.c:418 m68klinux.c:421 sparclinux.c:414
+#, c-format
+msgid "Output file requires shared library `%s'\n"
+msgstr "è¾“å‡ºæ–‡ä»¶éœ€è¦�å…±äº«åº“â€œ%sâ€�\n"
+
+#: i386linux.c:426 m68klinux.c:429 sparclinux.c:422
+#, c-format
+msgid "Output file requires shared library `%s.so.%s'\n"
+msgstr "è¾“å‡ºæ–‡ä»¶éœ€è¦�å…±äº«åº“â€œ%s.so.%sâ€�\n"
+
+#: i386linux.c:613 i386linux.c:663 m68klinux.c:618 m68klinux.c:666
+#: sparclinux.c:609 sparclinux.c:659
+#, fuzzy, c-format
+msgid "Symbol %s not defined for fixups\n"
+msgstr "`%.*s' å·²è¢«å®šä¹‰ä¸ºå¯¹ç…§ç¬¦å�·"
+
+#: i386linux.c:687 m68klinux.c:690 sparclinux.c:683
+msgid "Warning: fixup count mismatch\n"
+msgstr ""
+
+#: ieee.c:158
+#, c-format
+msgid "%s: string too long (%d chars, max 65535)"
+msgstr "%sï¼šå­—ç¬¦ä¸²è¿‡é•¿ (%d å­—ç¬¦ï¼Œæœ€å¤§ 65535)"
+
+#: ieee.c:285
+#, c-format
+msgid "%s: unrecognized symbol `%s' flags 0x%x"
+msgstr "%sï¼šæ— æ³•è¯†åˆ«çš„â€œ%sâ€�æ ‡å¿— 0x%x"
+
+#: ieee.c:791
+msgid "%B: unimplemented ATI record %u for symbol %u"
+msgstr ""
+
+#: ieee.c:815
+#, fuzzy
+msgid "%B: unexpected ATN type %d in external part"
+msgstr "%sï¼š.opd èŠ‚ä¸­æ„�å¤–çš„é‡�å®šä½�ç±»åž‹ %u"
+
+#: ieee.c:837
+#, fuzzy
+msgid "%B: unexpected type after ATN"
+msgstr "%sï¼šATN ä¹‹å�Žå‡ºçŽ°æ„�å¤–çš„ç±»åž‹"
+
+#: ihex.c:230
+#, fuzzy
+msgid "%B:%d: unexpected character `%s' in Intel Hex file"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: ihex.c:337
+#, fuzzy
+msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
+msgstr "%sï¼š%uï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ ¡éªŒå’Œé”™è¯¯ (åº”ä¸º %uã€�å®žä¸º %u)"
+
+#: ihex.c:392
+#, fuzzy
+msgid "%B:%u: bad extended address record length in Intel Hex file"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: ihex.c:409
+#, fuzzy
+msgid "%B:%u: bad extended start address length in Intel Hex file"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: ihex.c:426
+msgid "%B:%u: bad extended linear address record length in Intel Hex file"
+msgstr ""
+
+#: ihex.c:443
+#, fuzzy
+msgid "%B:%u: bad extended linear start address length in Intel Hex file"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: ihex.c:460
+#, fuzzy
+msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: ihex.c:579
+#, fuzzy
+msgid "%B: internal error in ihex_read_section"
+msgstr "å†…éƒ¨é”™è¯¯ï¼šå�±é™©çš„é‡�å®šä½�"
+
+#: ihex.c:613
+msgid "%B: bad section length in ihex_read_section"
+msgstr ""
+
+#: ihex.c:826
+#, c-format
+msgid "%s: address 0x%s out of range for Intel Hex file"
+msgstr ""
+
+#: libbfd.c:863
+msgid "%B: unable to get decompressed section %A"
+msgstr ""
+
+#: libbfd.c:1012
+#, fuzzy
+msgid "%B: compiled for a big endian system and target is little endian"
+msgstr "%sï¼šä¸ºå¤§ç«¯ç³»ç»Ÿç¼–è¯‘ä½†ç›®æ ‡å¹³å�°æ˜¯å°�ç«¯çš„"
+
+#: libbfd.c:1014
+#, fuzzy
+msgid "%B: compiled for a little endian system and target is big endian"
+msgstr "%sï¼šä¸ºå°�ç«¯ç³»ç»Ÿç¼–è¯‘ä½†ç›®æ ‡å¹³å�°æ˜¯å¤§ç«¯çš„"
+
+#: libbfd.c:1043
+#, fuzzy, c-format
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "ç¬¬ %d åˆ—: å¼‚å¸¸çš„æ ‡è®°ï¼š%s\n"
+
+#: libbfd.c:1046
+#, fuzzy, c-format
+msgid "Deprecated %s called\n"
+msgstr "ä¸�å»ºè®®ä½¿ç”¨%qEï¼š%s"
+
+#: linker.c:1873
+msgid "%B: indirect symbol `%s' to `%s' is a loop"
+msgstr ""
+
+#: linker.c:2750
+#, c-format
+msgid "Attempt to do relocatable link with %s input and %s output"
+msgstr ""
+
+#: linker.c:3035
+#, fuzzy
+msgid "%B: ignoring duplicate section `%A'\n"
+msgstr "å¿½ç•¥é‡�å¤�çš„ç›®å½•â€œ%sâ€�\n"
+
+#: linker.c:3044 linker.c:3053
+msgid "%B: duplicate section `%A' has different size\n"
+msgstr ""
+
+#: linker.c:3061 linker.c:3066
+#, fuzzy
+msgid "%B: could not read contents of section `%A'\n"
+msgstr "%X%P: æ— æ³•è¯»å�– .exports åŒºæ®µå†…å®¹\n"
+
+#: linker.c:3070
+#, fuzzy
+msgid "%B: duplicate section `%A' has different contents\n"
+msgstr "å¯„å­˜å™¨èŠ‚æœ‰å†…å®¹\n"
+
+#: mach-o.c:648
+msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols"
+msgstr ""
+
+#: mach-o.c:1918
+#, c-format
+msgid "mach-o: there are too many sections (%d) maximum is 255,\n"
+msgstr ""
+
+#: mach-o.c:2017
+#, c-format
+msgid "unable to write unknown load command 0x%lx"
+msgstr ""
+
+#: mach-o.c:2272
+msgid "sorry: modtab, toc and extrefsyms are not yet implemented for dysymtab commands."
+msgstr ""
+
+#: mach-o.c:2898
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"
+msgstr ""
+
+#: mach-o.c:2916
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"
+msgstr ""
+
+#: mach-o.c:2997
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"
+msgstr ""
+
+#: mach-o.c:3013
+#, c-format
+msgid "bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x%x: setting to undefined"
+msgstr ""
+
+#: mach-o.c:3085
+msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols"
+msgstr ""
+
+#: mach-o.c:3915
+#, fuzzy
+msgid "%B: unknown load command 0x%lx"
+msgstr "%sï¼šæœªçŸ¥çš„é‡�å®šä½�ç±»åž‹ %d"
+
+#: mach-o.c:4107
+#, c-format
+msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"
+msgstr ""
+
+#: mach-o.c:4204
+#, c-format
+msgid "unknown header byte-order value 0x%lx"
+msgstr ""
+
+#: merge.c:832
+#, c-format
+msgid "%s: access beyond end of merged section (%ld)"
+msgstr ""
+
+#: mmo.c:455
+#, fuzzy, c-format
+msgid "%s: No core to allocate section name %s\n"
+msgstr "%sï¼šæœªçŸ¥çš„èŠ‚å��â€œ%.*sâ€�"
+
+#: mmo.c:530
+#, c-format
+msgid "%s: No core to allocate a symbol %d bytes long\n"
+msgstr ""
+
+#: mmo.c:1189
+#, c-format
+msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
+msgstr ""
+
+#: mmo.c:1334
+#, c-format
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr ""
+
+#: mmo.c:1568
+#, c-format
+msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
+msgstr ""
+
+#: mmo.c:1578
+#, c-format
+msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
+msgstr ""
+
+#: mmo.c:1614
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
+msgstr ""
+
+#: mmo.c:1660
+#, c-format
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr ""
+
+#: mmo.c:1699
+#, c-format
+msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
+msgstr ""
+
+#: mmo.c:1708
+#, c-format
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr ""
+
+#: mmo.c:1731
+#, c-format
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr ""
+
+#: mmo.c:1754
+#, c-format
+msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
+msgstr ""
+
+#: mmo.c:1774
+#, c-format
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr ""
+
+#: mmo.c:1787
+#, c-format
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr ""
+
+#: mmo.c:1893
+#, c-format
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr ""
+
+#: mmo.c:1929
+#, c-format
+msgid "%s: invalid mmo file: lop_end not last item in file\n"
+msgstr ""
+
+#: mmo.c:1942
+#, c-format
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr ""
+
+#: mmo.c:2652
+#, fuzzy, c-format
+msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
+msgstr "  [S]          - ä¸�è¦�åˆ›å»ºç¬¦å�·è¡¨\n"
+
+#: mmo.c:2892
+#, c-format
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr ""
+
+#: mmo.c:2984
+#, c-format
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgstr ""
+
+#: mmo.c:3029
+#, c-format
+msgid "%s: internal error, symbol table changed size from %d to %d words\n"
+msgstr ""
+
+#: mmo.c:3081
+#, c-format
+msgid "%s: internal error, internal register section %s had contents\n"
+msgstr ""
+
+#: mmo.c:3132
+#, c-format
+msgid "%s: no initialized registers; section length 0\n"
+msgstr ""
+
+#: mmo.c:3138
+#, c-format
+msgid "%s: too many initialized registers; section length %ld\n"
+msgstr ""
+
+#: mmo.c:3143
+#, c-format
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr ""
+
+#: oasys.c:881
+#, c-format
+msgid "%s: can not represent section `%s' in oasys"
+msgstr ""
+
+#: osf-core.c:128
+#, c-format
+msgid "Unhandled OSF/1 core file section type %d\n"
+msgstr ""
+
+#: pe-mips.c:607
+msgid "%B: `ld -r' not supported with PE MIPS objects\n"
+msgstr ""
+
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to.
+#: pe-mips.c:719
+#, fuzzy
+msgid "%B: unimplemented %s\n"
+msgstr "å¯¹ä¸�èµ·ï¼Œå°šæœªå®žçŽ°ï¼š"
+
+#: pe-mips.c:745
+#, fuzzy
+msgid "%B: jump too far away\n"
+msgstr "%sï¼šè·³è½¬è¿‡è¿œ\n"
+
+#: pe-mips.c:771
+msgid "%B: bad pair/reflo after refhi\n"
+msgstr ""
+
+#: pef.c:522
+#, c-format
+msgid "bfd_pef_scan: unknown architecture 0x%lx"
+msgstr ""
+
+#: pei-x86_64.c:469
+#, fuzzy, c-format
+msgid "warning: .pdata section size (%ld) is not a multiple of %d\n"
+msgstr "%sï¼šé”™è¯¯ï¼šé‡�å®šä½� %s ä¸�æ˜¯ 4 çš„å€�æ•°"
+
+#: pei-x86_64.c:474 peigen.c:1626 peigen.c:1809 pepigen.c:1626 pepigen.c:1809
+#: pex64igen.c:1626 pex64igen.c:1809
+#, c-format
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+
+#: pei-x86_64.c:476
+#, c-format
+msgid "vma:\t\t\tBeginAddress\t EndAddress\t  UnwindData\n"
+msgstr ""
+
+#. XXX code yet to be written.
+#: peicode.h:758
+#, fuzzy
+msgid "%B: Unhandled import type; %x"
+msgstr "%sï¼šæœªå¤„ç�†çš„å¯¼å…¥ç±»åž‹ï¼›%x"
+
+#: peicode.h:763
+#, fuzzy
+msgid "%B: Unrecognised import type; %x"
+msgstr "%sï¼šæœªè¯†åˆ«çš„å¯¼å…¥ç±»åž‹ï¼›%x"
+
+#: peicode.h:777
+#, fuzzy
+msgid "%B: Unrecognised import name type; %x"
+msgstr "%sï¼šæœªè¯†åˆ«çš„å¯¼å…¥å��å­—ç±»åž‹ï¼›%x"
+
+#: peicode.h:1173
+msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgstr ""
+
+#: peicode.h:1185
+msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+msgstr ""
+
+#: peicode.h:1203
+msgid "%B: size field is zero in Import Library Format header"
+msgstr ""
+
+#: peicode.h:1234
+msgid "%B: string not null terminated in ILF object file."
+msgstr ""
+
+#: ppcboot.c:391
+#, fuzzy, c-format
+msgid ""
+"\n"
+"ppcboot header:\n"
+msgstr "æ ‡å¤´ "
+
+#: ppcboot.c:392
+#, c-format
+msgid "Entry offset        = 0x%.8lx (%ld)\n"
+msgstr "æ�¡ç›®å��ç§»é‡�        = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:394
+#, c-format
+msgid "Length              = 0x%.8lx (%ld)\n"
+msgstr "é•¿åº¦              = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:398
+#, c-format
+msgid "Flag field          = 0x%.2x\n"
+msgstr "æ ‡å¿—åŸŸ          = 0x%.2x\n"
+
+#: ppcboot.c:404
+#, c-format
+msgid "Partition name      = \"%s\"\n"
+msgstr "åˆ†åŒºå��      = \"%s\"\n"
+
+#: ppcboot.c:423
+#, c-format
+msgid ""
+"\n"
+"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+"\n"
+"åˆ†åŒº[%d] èµ·ç‚¹  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:429
+#, c-format
+msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr "åˆ†åŒº[%d] ç»ˆç‚¹    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+
+#: ppcboot.c:435
+#, c-format
+msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
+msgstr "åˆ†åŒº[%d] æ‰‡åŒº = 0x%.8lx (%ld)\n"
+
+#: ppcboot.c:437
+#, c-format
+msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
+msgstr "åˆ†åŒº[%d] é•¿åº¦ = 0x%.8lx (%ld)\n"
+
+#: reloc.c:7371
+#, fuzzy
+msgid "INPUT_SECTION_FLAGS are not supported.\n"
+msgstr "è®¾å®šèŠ‚æ ‡å¿—"
+
+#: reloc.c:7526
+msgid "%X%P: %B(%A): relocation \"%R\" goes out of range\n"
+msgstr ""
+
+#: rs6000-core.c:448
+#, fuzzy, c-format
+msgid "%s: warning core file truncated"
+msgstr "æ–‡ä»¶ %s å·±è¢«æˆªæ–­\n"
+
+#: som.c:5471
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Exec Auxiliary Header\n"
+msgstr "é™„åŠ åº“"
+
+#: som.c:5776
+msgid "som_sizeof_headers unimplemented"
+msgstr ""
+
+#: srec.c:261
+#, fuzzy
+msgid "%B:%d: Unexpected character `%s' in S-record file\n"
+msgstr "%sï¼š%dï¼šIntel å��å…­è¿›åˆ¶æ–‡ä»¶ä¸­çš„æ„�å¤–å­—ç¬¦â€œ%s\n"
+
+#: srec.c:567 srec.c:600
+msgid "%B:%d: Bad checksum in S-record file\n"
+msgstr ""
+
+#: stabs.c:279
+msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
+msgstr ""
+
+#: syms.c:1079
+msgid "Unsupported .stab relocation"
+msgstr "ä¸�æ”¯æŒ�çš„ .stab é‡�å®šä½�"
+
+#: vms-alpha.c:1294
+#, fuzzy, c-format
+msgid "Unknown EGSD subtype %d"
+msgstr "æœªçŸ¥é”™è¯¯=(%d)\n"
+
+#: vms-alpha.c:1325
+#, c-format
+msgid "Stack overflow (%d) in _bfd_vms_push"
+msgstr ""
+
+#: vms-alpha.c:1338
+msgid "Stack underflow in _bfd_vms_pop"
+msgstr ""
+
+#. These names have not yet been added to this switch statement.
+#: vms-alpha.c:1575
+#, fuzzy, c-format
+msgid "unknown ETIR command %d"
+msgstr "æ�¥è‡ªå‘½ä»¤çš„æœªçŸ¥çŠ¶æ€� (%d)"
+
+#: vms-alpha.c:1762
+#, c-format
+msgid "bad section index in %s"
+msgstr "%s ä¸­çš„é”™è¯¯èŠ‚ç´¢å¼•"
+
+#: vms-alpha.c:1775
+#, c-format
+msgid "unsupported STA cmd %s"
+msgstr "ä¸�æ”¯æŒ�çš„ STA å‘½ä»¤ %s"
+
+#. Insert field.
+#. Unsigned shift.
+#. Rotate.
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-alpha.c:1951 vms-alpha.c:1982 vms-alpha.c:2229
+#, c-format
+msgid "%s: not supported"
+msgstr "%sï¼šä¸�æ”¯æŒ�"
+
+#: vms-alpha.c:1957
+#, c-format
+msgid "%s: not implemented"
+msgstr "%sï¼šæœªå®žçŽ°"
+
+#: vms-alpha.c:2213
+#, fuzzy, c-format
+msgid "invalid use of %s with contexts"
+msgstr "é”™è¯¯åœ°ä½¿ç”¨äº†%<::%>"
+
+#: vms-alpha.c:2247
+#, fuzzy, c-format
+msgid "reserved cmd %d"
+msgstr "CMD"
+
+#: vms-alpha.c:2332
+#, fuzzy
+msgid "Object module NOT error-free !\n"
+msgstr "%Kè¯•å›¾ free ä¸€ä¸ªä¸�åœ¨å †ä¸Šçš„å¯¹è±¡"
+
+#: vms-alpha.c:3657
+#, c-format
+msgid "SEC_RELOC with no relocs in section %s"
+msgstr ""
+
+#: vms-alpha.c:3709 vms-alpha.c:3922
+#, fuzzy, c-format
+msgid "Size error in section %s"
+msgstr "è®¾å®šèŠ‚å¤§å°�"
+
+#: vms-alpha.c:3868
+msgid "Spurious ALPHA_R_BSR reloc"
+msgstr ""
+
+#: vms-alpha.c:3909
+#, c-format
+msgid "Unhandled relocation %s"
+msgstr "æœªå¤„ç�†çš„é‡�å®šä½� %s"
+
+#: vms-alpha.c:4199
+#, fuzzy, c-format
+msgid "unknown source command %d"
+msgstr "æ�¥è‡ªå‘½ä»¤çš„æœªçŸ¥çŠ¶æ€� (%d)"
+
+#: vms-alpha.c:4260
+msgid "DST__K_SET_LINUM_INCR not implemented"
+msgstr ""
+
+#: vms-alpha.c:4266
+msgid "DST__K_SET_LINUM_INCR_W not implemented"
+msgstr ""
+
+#: vms-alpha.c:4272
+msgid "DST__K_RESET_LINUM_INCR not implemented"
+msgstr ""
+
+#: vms-alpha.c:4278
+#, fuzzy
+msgid "DST__K_BEG_STMT_MODE not implemented"
+msgstr "å°šæœªå®Œå…¨å®žçŽ° PASSMECH"
+
+#: vms-alpha.c:4284
+#, fuzzy
+msgid "DST__K_END_STMT_MODE not implemented"
+msgstr "å°šæœªå®Œå…¨å®žçŽ° PASSMECH"
+
+#: vms-alpha.c:4311
+#, fuzzy
+msgid "DST__K_SET_PC not implemented"
+msgstr "å°šæœªå®Œå…¨å®žçŽ° PASSMECH"
+
+#: vms-alpha.c:4317
+#, fuzzy
+msgid "DST__K_SET_PC_W not implemented"
+msgstr "å°šæœªå®Œå…¨å®žçŽ° PASSMECH"
+
+#: vms-alpha.c:4323
+#, fuzzy
+msgid "DST__K_SET_PC_L not implemented"
+msgstr "å°šæœªå®Œå…¨å®žçŽ° PASSMECH"
+
+#: vms-alpha.c:4329
+#, fuzzy
+msgid "DST__K_SET_STMTNUM not implemented"
+msgstr "%sï¼šæœªå®žçŽ°"
+
+#: vms-alpha.c:4372
+#, fuzzy, c-format
+msgid "unknown line command %d"
+msgstr " å‘½ä»¤ç¬¬ %d åˆ—"
+
+#: vms-alpha.c:4846 vms-alpha.c:4863 vms-alpha.c:4877 vms-alpha.c:4892
+#: vms-alpha.c:4904 vms-alpha.c:4915 vms-alpha.c:4927
+#, fuzzy, c-format
+msgid "Unknown reloc %s + %s"
+msgstr "<æœªçŸ¥ï¼š%s>"
+
+#: vms-alpha.c:4982
+#, fuzzy, c-format
+msgid "Unknown reloc %s"
+msgstr "<æœªçŸ¥ï¼š%s>"
+
+#: vms-alpha.c:4995
+#, fuzzy
+msgid "Invalid section index in ETIR"
+msgstr "  å­—ç¬¦ä¸²è¡¨ç´¢å¼•èŠ‚å¤´ï¼š %ld"
+
+#: vms-alpha.c:5002
+msgid "Relocation for non-REL psect"
+msgstr ""
+
+#: vms-alpha.c:5049
+#, fuzzy, c-format
+msgid "Unknown symbol in command %s"
+msgstr "%s: æœªçŸ¥çš„å­—ç¬¦åœ¨å¯¹ç…§ç¬¦å�·å��ç§°ä¸­"
+
+#: vms-alpha.c:5564
+#, fuzzy, c-format
+msgid "  EMH %u (len=%u): "
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:5573
+#, fuzzy, c-format
+msgid "Module header\n"
+msgstr "MODULE"
+
+#: vms-alpha.c:5574
+#, fuzzy, c-format
+msgid "   structure level: %u\n"
+msgstr "ç»“æž„å®šä¹‰"
+
+#: vms-alpha.c:5575
+#, fuzzy, c-format
+msgid "   max record size: %u\n"
+msgstr "è®°å½• %u æ— æ³•è¯»å�–\n"
+
+#: vms-alpha.c:5578
+#, fuzzy, c-format
+msgid "   module name    : %.*s\n"
+msgstr "%Cå¤„æœŸå¾…æ¨¡å�—è¿‡ç¨‹å��"
+
+#: vms-alpha.c:5580
+#, fuzzy, c-format
+msgid "   module version : %.*s\n"
+msgstr "MODULE"
+
+#: vms-alpha.c:5582
+#, fuzzy, c-format
+msgid "   compile date   : %.17s\n"
+msgstr "ä¸º m32rx ç¼–è¯‘"
+
+#: vms-alpha.c:5587
+#, fuzzy, c-format
+msgid "Language Processor Name\n"
+msgstr "ä¸‹åˆ—é€‰é¡¹ä¸Žå…·ä½“è¯­è¨€æ— å…³"
+
+#: vms-alpha.c:5588
+#, fuzzy, c-format
+msgid "   language name: %.*s\n"
+msgstr "%sï¼šæœªå®šä¹‰çš„è¯­è¨€ç¼©å†™â€œ%sâ€�"
+
+#: vms-alpha.c:5595
+#, fuzzy, c-format
+msgid "Source Files Header\n"
+msgstr "æ�¥æº�æ–‡ä»¶æ¸…å�•"
+
+#: vms-alpha.c:5596
+#, fuzzy, c-format
+msgid "   file: %.*s\n"
+msgstr "  æ–‡ä»¶ï¼š%s"
+
+#: vms-alpha.c:5603
+#, fuzzy, c-format
+msgid "Title Text Header\n"
+msgstr "æ ‡å¤´ "
+
+#: vms-alpha.c:5604
+#, c-format
+msgid "   title: %.*s\n"
+msgstr ""
+
+#: vms-alpha.c:5611
+#, fuzzy, c-format
+msgid "Copyright Header\n"
+msgstr "ç‰ˆæ�ƒ"
+
+#: vms-alpha.c:5612
+#, fuzzy, c-format
+msgid "   copyright: %.*s\n"
+msgstr "ç‰ˆæ�ƒæ‰€æœ‰ %s 2014-2015 è‡ªç”±è½¯ä»¶åŸºé‡‘ä¼š.\n"
+
+#: vms-alpha.c:5618
+#, fuzzy, c-format
+msgid "unhandled emh subtype %u\n"
+msgstr "%sï¼šæœªå¤„ç�†çš„å¯¼å…¥ç±»åž‹ï¼›%x"
+
+#: vms-alpha.c:5628
+#, fuzzy, c-format
+msgid "  EEOM (len=%u):\n"
+msgstr "  -U                     å¦‚å�Œ -p å’Œ -u\n"
+
+#: vms-alpha.c:5629
+#, c-format
+msgid "   number of cond linkage pairs: %u\n"
+msgstr ""
+
+#: vms-alpha.c:5631
+#, fuzzy, c-format
+msgid "   completion code: %u\n"
+msgstr "%%U ä»£ç �çš„æ“�ä½œæ•°æ— æ•ˆ"
+
+#: vms-alpha.c:5635
+#, c-format
+msgid "   transfer addr flags: 0x%02x\n"
+msgstr ""
+
+#: vms-alpha.c:5636
+#, c-format
+msgid "   transfer addr psect: %u\n"
+msgstr ""
+
+#: vms-alpha.c:5638
+#, fuzzy, c-format
+msgid "   transfer address   : 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:5647
+#, fuzzy
+msgid " WEAK"
+msgstr "ä¸�æ”¯æŒ�%q+Dçš„å¼±å£°æ˜Ž"
+
+#: vms-alpha.c:5649
+#, fuzzy
+msgid " DEF"
+msgstr "   --def <deffile>        è¾“å…¥ .def æ–‡ä»¶çš„æ–‡ä»¶å��\n"
+
+#: vms-alpha.c:5651
+msgid " UNI"
+msgstr ""
+
+#: vms-alpha.c:5653 vms-alpha.c:5674
+#, fuzzy
+msgid " REL"
+msgstr "REL (å�¯é‡�å®šä½�æ–‡ä»¶)"
+
+#: vms-alpha.c:5655
+#, fuzzy
+msgid " COMM"
+msgstr " é€šä¿¡å�‚æ•°............P  åŠ å…¥æ�¢åˆ—å­—ç¬¦.......A | "
+
+#: vms-alpha.c:5657
+msgid " VECEP"
+msgstr ""
+
+#: vms-alpha.c:5659
+msgid " NORM"
+msgstr ""
+
+#: vms-alpha.c:5661
+msgid " QVAL"
+msgstr ""
+
+#: vms-alpha.c:5668
+#, fuzzy
+msgid " PIC"
+msgstr "ä¸Ž library-pic åº“é“¾æŽ¥"
+
+#: vms-alpha.c:5670
+#, fuzzy
+msgid " LIB"
+msgstr "  -print-file-name=<åº“>    æ˜¾ç¤º <åº“> çš„å®Œæ•´è·¯å¾„\n"
+
+#: vms-alpha.c:5672
+msgid " OVR"
+msgstr ""
+
+#: vms-alpha.c:5676
+msgid " GBL"
+msgstr ""
+
+#: vms-alpha.c:5678
+msgid " SHR"
+msgstr ""
+
+#: vms-alpha.c:5680
+#, fuzzy
+msgid " EXE"
+msgstr "å¼ºåˆ¶ä¸ºç”Ÿæˆ�çš„æ–‡ä»¶æ·»åŠ  .exe å�Žç¼€"
+
+#: vms-alpha.c:5682
+msgid " RD"
+msgstr ""
+
+#: vms-alpha.c:5684
+msgid " WRT"
+msgstr ""
+
+#: vms-alpha.c:5686
+#, fuzzy
+msgid " VEC"
+msgstr "æ ‘æ£€æŸ¥ï¼šè®¿é—®äº† %3$s ä¸­æœ‰ %2$d ä¸ª elt  çš„ tree_vec çš„ elt %1$dï¼ŒäºŽ %4$s:%5$d"
+
+#: vms-alpha.c:5688
+msgid " NOMOD"
 msgstr ""
 
-#: elf32-ppc.c:1468
-#, c-format
-msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
+#: vms-alpha.c:5690
+#, fuzzy
+msgid " COM"
+msgstr "%qEå·²è¿‡æ—¶ï¼šg++ çš„è™šå‡½æ•°è¡¨çŽ°åœ¨é»˜è®¤ä¸Ž COM å…¼å®¹"
+
+#: vms-alpha.c:5692
+msgid " 64B"
 msgstr ""
 
-#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
+#: vms-alpha.c:5701
+#, fuzzy, c-format
+msgid "  EGSD (len=%u):\n"
+msgstr "  -U                     å¦‚å�Œ -p å’Œ -u\n"
+
+#: vms-alpha.c:5713
 #, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgid "  EGSD entry %2u (type: %u, len: %u): "
 msgstr ""
 
-#: elf32-ppc.c:1592
-#, c-format
-msgid "%s: Unknown special linker type %d"
-msgstr "%s£ºÎ´ÖªµÄÌØ¶¨Á¬½ÓÆ÷ÀàÐÍ %d"
+#: vms-alpha.c:5725
+#, fuzzy, c-format
+msgid "PSC - Program section definition\n"
+msgstr "åŒºæ®µå®šä¹‰äºŽ %x å¤§å°� %x\n"
 
-#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
-#, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr "%s£º´´½¨¹²ÏíÄ¿±êÎÄ¼þÊ±²»ÄÜÊ¹ÓÃÖØ¶¨Î» %s"
+#: vms-alpha.c:5726 vms-alpha.c:5743
+#, fuzzy, c-format
+msgid "   alignment  : 2**%u\n"
+msgstr "å¯¹é½�"
 
-#: elf32-ppc.c:3126 elf64-ppc.c:5473
-#, c-format
-msgid "%s: unknown relocation type %d for symbol %s"
-msgstr "%1$s£º¹ØÓÚ·ûºÅ %3$s µÄÎ´ÖªÖØ¶¨Î»ÀàÐÍ %2$d"
+#: vms-alpha.c:5727 vms-alpha.c:5744
+#, fuzzy, c-format
+msgid "   flags      : 0x%04x"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
 
-#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
+#: vms-alpha.c:5731
 #, c-format
-msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgid "   alloc (len): %u (0x%08x)\n"
 msgstr ""
 
-#: elf32-ppc.c:3619
-#, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
-msgstr "%s£ºÉÐ²»Ö§³Ö¹ØÓÚ·ûºÅ %s µÄÖØ¶¨Î» %s¡£"
+#: vms-alpha.c:5732 vms-alpha.c:5789 vms-alpha.c:5838
+#, fuzzy, c-format
+msgid "   name       : %.*s\n"
+msgstr "\tå��ç§°     ï¼š%s\n"
 
-#: elf32-sh.c:1964
+#: vms-alpha.c:5742
 #, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
-msgstr "%s£º0x%lx£º¾¯¸æ£º´íÎóµÄ R_SH_USES Æ«ÒÆÁ¿"
+msgid "SPSC - Shared Image Program section def\n"
+msgstr ""
 
-#: elf32-sh.c:1976
+#: vms-alpha.c:5748
 #, c-format
-msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
-msgstr "%s£º0x%lx£º¾¯¸æ£ºR_SH_USES Ö¸ÏòÎÞ·¨Ê¶±ðµÄÖ¸Áî 0x%x"
+msgid "   alloc (len)   : %u (0x%08x)\n"
+msgstr ""
 
-#: elf32-sh.c:1993
-#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
-msgstr "%s£º0x%lx£º¾¯¸æ£º´íÎóµÄ R_SH_USES ×°ÈëÆ«ÒÆÁ¿"
+#: vms-alpha.c:5749
+#, fuzzy, c-format
+msgid "   image offset  : 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
 
-#: elf32-sh.c:2008
-#, c-format
-msgid "%s: 0x%lx: warning: could not find expected reloc"
-msgstr "%s£º0x%lx£º¾¯¸æ£ºÎÞ·¨ÕÒµ½Ô¤ÆÚµÄÖØ¶¨Î»"
+#: vms-alpha.c:5751
+#, fuzzy, c-format
+msgid "   symvec offset : 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
 
-#: elf32-sh.c:2036
-#, c-format
-msgid "%s: 0x%lx: warning: symbol in unexpected section"
-msgstr "%s£º0x%lx£º¾¯¸æ£ºÒâÍâ½ÚÖÐ³öÏÖ·ûºÅ"
+#: vms-alpha.c:5753
+#, fuzzy, c-format
+msgid "   name          : %.*s\n"
+msgstr "\tå��ç§°     ï¼š%s\n"
 
-#: elf32-sh.c:2153
-#, c-format
-msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
-msgstr "%s£º0x%lx£º¾¯¸æ£ºÎÞ·¨ÕÒµ½Ô¤ÆÚµÄ COUNT ÖØ¶¨Î»"
+#: vms-alpha.c:5766
+#, fuzzy, c-format
+msgid "SYM - Global symbol definition\n"
+msgstr "%Cå¤„ TYPE å®šä¹‰ä¸­çš„æ­§ä¹‰ç¬¦å�·"
 
-#: elf32-sh.c:2162
-#, c-format
-msgid "%s: 0x%lx: warning: bad count"
-msgstr "%s£º0x%lx£º¾¯¸æ£º´íÎó¼ÆÊý"
+#: vms-alpha.c:5767 vms-alpha.c:5827 vms-alpha.c:5848 vms-alpha.c:5867
+#, fuzzy, c-format
+msgid "   flags: 0x%04x"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
 
-#: elf32-sh.c:2550 elf32-sh.c:2926
-#, c-format
-msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
-msgstr ""
+#: vms-alpha.c:5770
+#, fuzzy, c-format
+msgid "   psect offset: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-sh.c:4073 elf64-sh64.c:1576
-msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
-msgstr ""
+#: vms-alpha.c:5774
+#, fuzzy, c-format
+msgid "   code address: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-sh.c:4284
+#: vms-alpha.c:5776
 #, c-format
-msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgid "   psect index for entry point : %u\n"
 msgstr ""
 
-#: elf32-sh64.c:203 elf64-sh64.c:2364
-#, c-format
-msgid "%s: compiled as 32-bit object and %s is 64-bit"
-msgstr "%s£º±àÒëÎª 32-Î»Ä¿±êÎÄ¼þµ« %s ÊÇ 64-Î»µÄ"
+#: vms-alpha.c:5779 vms-alpha.c:5855 vms-alpha.c:5874
+#, fuzzy, c-format
+msgid "   psect index : %u\n"
+msgstr "%s ä¸­çš„é”™è¯¯èŠ‚ç´¢å¼•"
 
-#: elf32-sh64.c:206 elf64-sh64.c:2367
-#, c-format
-msgid "%s: compiled as 64-bit object and %s is 32-bit"
-msgstr "%s£º±àÒëÎª 64-Î»Ä¿±êÎÄ¼þµ« %s ÊÇ 32-Î»µÄ"
+#: vms-alpha.c:5781 vms-alpha.c:5857 vms-alpha.c:5876
+#, fuzzy, c-format
+msgid "   name        : %.*s\n"
+msgstr "\tå��ç§°     ï¼š%s\n"
 
-#: elf32-sh64.c:208 elf64-sh64.c:2369
-#, c-format
-msgid "%s: object size does not match that of target %s"
-msgstr "%s£ºÄ¿±êÎÄ¼þ´óÐ¡ºÍÄ¿±ê %s ²»Æ¥Åä"
+#: vms-alpha.c:5788
+#, fuzzy, c-format
+msgid "SYM - Global symbol reference\n"
+msgstr "ä»¥æœªå®šä¹‰çš„ç¬¦å�·å�‚è€ƒå¼€å§‹"
 
-#: elf32-sh64.c:440 elf64-sh64.c:2941
-#, c-format
-msgid "%s: encountered datalabel symbol in input"
-msgstr "%s£ºÔÚÊäÈëÖÐÓöµ½Êý¾Ý±êÇ©·ûºÅ"
+#: vms-alpha.c:5800
+#, fuzzy, c-format
+msgid "IDC - Ident Consistency check\n"
+msgstr "epsclosure() ä¸­çš„ä¸€è‡´æ€§æ£€æŸ¥å¤±è´¥"
 
-#: elf32-sh64.c:523
-msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
-msgstr "PTB ²»Æ¥Åä£ºSHmedia µØÖ· (Î» 0 == 1)"
+#: vms-alpha.c:5801
+#, fuzzy, c-format
+msgid "   flags         : 0x%08x"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
 
-#: elf32-sh64.c:526
-msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
-msgstr "PTA ²»Æ¥Åä£ºSHcompact µØÖ· (Î» 0 == 0)"
+#: vms-alpha.c:5805
+#, fuzzy, c-format
+msgid "   id match      : %x\n"
+msgstr "æ— åŒ¹é…�"
 
-#: elf32-sh64.c:544
-#, c-format
-msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
-msgstr "%s£ºGAS ´íÎó£ºÒâÍâµÄ´øÓÐ R_SH_PT_16 µÄ PTB Ö¸Áî"
+#: vms-alpha.c:5807
+#, fuzzy, c-format
+msgid "   error severity: %x\n"
+msgstr "(é”™è¯¯ 0x%x)"
 
-#: elf32-sh64.c:593 elf64-sh64.c:1703
-#, c-format
-msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
-msgstr ""
+#: vms-alpha.c:5810
+#, fuzzy, c-format
+msgid "   entity name   : %.*s\n"
+msgstr "å��ç§° ï¼šâ€œ%sâ€�\n"
 
-#: elf32-sh64.c:677
-#, c-format
-msgid "%s: could not write out added .cranges entries"
-msgstr "%s£ºÎÞ·¨Ð´³ö .cranges ÌõÄ¿"
+#: vms-alpha.c:5812
+#, fuzzy, c-format
+msgid "   object name   : %.*s\n"
+msgstr "å¯¹è±¡å��ç§°  ï¼š%s\n"
 
-#: elf32-sh64.c:739
-#, c-format
-msgid "%s: could not write out sorted .cranges entries"
-msgstr "%s£ºÎÞ·¨Ð´³ö¾­ÅÅÐòµÄ .cranges ÌõÄ¿"
+#: vms-alpha.c:5815
+#, fuzzy, c-format
+msgid "   binary ident  : 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:5818
+#, fuzzy, c-format
+msgid "   ascii ident   : %.*s\n"
+msgstr "å¤„ç�† #ident æŒ‡ä»¤"
 
-#: elf32-sparc.c:1535 elf64-sparc.c:2224
+#: vms-alpha.c:5826
+#, fuzzy, c-format
+msgid "SYMG - Universal symbol definition\n"
+msgstr "%Cå¤„ TYPE å®šä¹‰ä¸­çš„æ­§ä¹‰ç¬¦å�·"
+
+#: vms-alpha.c:5830
 #, c-format
-msgid "%s: probably compiled without -fPIC?"
+msgid "   symbol vector offset: 0x%08x\n"
 msgstr ""
 
-#: elf32-sparc.c:2002
-#, c-format
-msgid "%s: compiled for a 64 bit system and target is 32 bit"
-msgstr "%s£ºÎª 64 Î»ÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇ 32 Î»µÄ"
+#: vms-alpha.c:5832
+#, fuzzy, c-format
+msgid "   entry point: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-sparc.c:2016
-#, c-format
-msgid "%s: linking little endian files with big endian files"
-msgstr "%s£ºÁ¬½ÓÐ¡¶ËÎÄ¼þºÍ´ó¶ËÎÄ¼þ"
+#: vms-alpha.c:5834
+#, fuzzy, c-format
+msgid "   proc descr : 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-v850.c:682
-#, c-format
-msgid "Variable `%s' cannot occupy in multiple small data regions"
-msgstr "±äÁ¿¡°%s¡±²»ÄÜÕ¼¾Ý¶à¸öÐ¡Êý¾ÝÇø"
+#: vms-alpha.c:5836
+#, fuzzy, c-format
+msgid "   psect index: %u\n"
+msgstr "%s ä¸­çš„é”™è¯¯èŠ‚ç´¢å¼•"
 
-#: elf32-v850.c:685
-#, c-format
-msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr "±äÁ¿¡°%s¡±Ö»ÄÜ³öÏÖÔÚÐ¡Êý¾ÝÇø¡¢ÁãÊý¾ÝÇø¡¢Î¢Êý¾ÝÇøÖ®Ò»"
+#: vms-alpha.c:5847
+#, fuzzy, c-format
+msgid "SYMV - Vectored symbol definition\n"
+msgstr "%Cå¤„ TYPE å®šä¹‰ä¸­çš„æ­§ä¹‰ç¬¦å�·"
 
-#: elf32-v850.c:688
-#, c-format
-msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr "±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÐ¡Êý¾ÝÇøºÍÁãÊý¾ÝÇø"
+#: vms-alpha.c:5851
+#, fuzzy, c-format
+msgid "   vector      : 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-v850.c:691
+#: vms-alpha.c:5853 vms-alpha.c:5872
 #, c-format
-msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr "±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÐ¡Êý¾ÝÇøºÍÎ¢Êý¾ÝÇø"
+msgid "   psect offset: %u\n"
+msgstr ""
 
-#: elf32-v850.c:694
+#: vms-alpha.c:5866
 #, c-format
-msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr "±äÁ¿¡°%s¡±²»ÄÜÍ¬Ê±³öÏÖÔÚÁãÊý¾ÝÇøºÍÎ¢Êý¾ÝÇø"
-
-#: elf32-v850.c:1072
-msgid "FAILED to find previous HI16 reloc\n"
-msgstr "Ñ°ÕÒÉÏÒ»¸ö HI16 ÖØ¶¨Î»Ê§°Ü\n"
+msgid "SYMM - Global symbol definition with version\n"
+msgstr ""
 
-#: elf32-v850.c:1703
-msgid "could not locate special linker symbol __gp"
-msgstr "ÎÞ·¨¶¨Î»ÌØÊâÁ¬½ÓÆ÷·ûºÅ __gp"
+#: vms-alpha.c:5870
+#, fuzzy, c-format
+msgid "   version mask: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elf32-v850.c:1707
-msgid "could not locate special linker symbol __ep"
-msgstr "ÎÞ·¨¶¨Î»ÌØÊâÁ¬½ÓÆ÷·ûºÅ __ep"
+#: vms-alpha.c:5881
+#, c-format
+msgid "unhandled egsd entry type %u\n"
+msgstr ""
 
-#: elf32-v850.c:1711
-msgid "could not locate special linker symbol __ctbp"
-msgstr "ÎÞ·¨¶¨Î»ÌØÊâÁª»úÆ÷·ûºÅ __ctbp"
+#: vms-alpha.c:5915
+#, c-format
+msgid "    linkage index: %u, replacement insn: 0x%08x\n"
+msgstr ""
 
-#: elf32-v850.c:1875
+#: vms-alpha.c:5918
 #, c-format
-msgid "%s: Architecture mismatch with previous modules"
-msgstr "%s£ºÌåÏµ½á¹¹Í¬Ç°Ò»¸öÄ£¿é²»Æ¥Åä"
+msgid "    psect idx 1: %u, offset 1: 0x%08x %08x\n"
+msgstr ""
 
-#: elf32-v850.c:1895
+#: vms-alpha.c:5922
 #, c-format
-msgid "private flags = %lx: "
-msgstr "Ë½ÓÐ±êÖ¾ = %lx£º"
+msgid "    psect idx 2: %u, offset 2: 0x%08x %08x\n"
+msgstr ""
 
-#: elf32-v850.c:1900
-msgid "v850 architecture"
-msgstr "v850 ÌåÏµ½á¹¹"
+#: vms-alpha.c:5927
+#, c-format
+msgid "    psect idx 3: %u, offset 3: 0x%08x %08x\n"
+msgstr ""
 
-#: elf32-v850.c:1901
-msgid "v850e architecture"
-msgstr "v850e ÌåÏµ½á¹¹"
+#: vms-alpha.c:5932
+#, fuzzy, c-format
+msgid "    global name: %.*s\n"
+msgstr "%2$Lå¤„çš„å��å­—â€˜%1$sâ€™å·²ç»�åœ¨%4$Lå¤„è¢«ç”¨ä½œ %3$s"
 
-#: elf32-v850.c:1902
-msgid "v850ea architecture"
-msgstr "v850ea ÌåÏµ½á¹¹"
+#: vms-alpha.c:5942
+#, fuzzy, c-format
+msgid "  %s (len=%u+%u):\n"
+msgstr "%sï¼šæœªçŸ¥å‡½æ•°â€˜%uâ€™\n"
 
-#: elf32-vax.c:546
-msgid " [nonpic]"
+#: vms-alpha.c:5957
+#, c-format
+msgid "   (type: %3u, size: 4+%3u): "
 msgstr ""
 
-#: elf32-vax.c:549
-msgid " [d-float]"
+#: vms-alpha.c:5961
+#, c-format
+msgid "STA_GBL (stack global) %.*s\n"
 msgstr ""
 
-#: elf32-vax.c:552
-msgid " [g-float]"
+#: vms-alpha.c:5965
+#, c-format
+msgid "STA_LW (stack longword) 0x%08x\n"
 msgstr ""
 
-#: elf32-vax.c:674
+#: vms-alpha.c:5969
 #, c-format
-msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgid "STA_QW (stack quadword) 0x%08x %08x\n"
 msgstr ""
 
-#: elf32-vax.c:1679
+#: vms-alpha.c:5974
 #, c-format
-msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgid "STA_PQ (stack psect base + offset)\n"
 msgstr ""
 
-#: elf32-vax.c:1814
+#: vms-alpha.c:5975
 #, c-format
-msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgid "    psect: %u, offset: 0x%08x %08x\n"
 msgstr ""
 
-#: elf32-vax.c:1820
+#: vms-alpha.c:5981
 #, c-format
-msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgid "STA_LI (stack literal)\n"
 msgstr ""
 
-#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
-msgid "non-zero addend in @fptr reloc"
+#: vms-alpha.c:5984
+#, c-format
+msgid "STA_MOD (stack module)\n"
 msgstr ""
 
-#: elf64-alpha.c:1097
-msgid "GPDISP relocation did not find ldah and lda instructions"
-msgstr "GPDISP ÖØ¶¨Î»ÎÞ·¨ÕÒµ½ ldah ºÍ lda Ö¸Áî"
-
-#: elf64-alpha.c:3675
+#: vms-alpha.c:5987
 #, c-format
-msgid "%s: .got subsegment exceeds 64K (size %d)"
-msgstr "%s£º.got ×Ó½Ú³¬¹ýÁË 64K (´óÐ¡ %d)"
+msgid "STA_CKARG (compare procedure argument)\n"
+msgstr ""
 
-#: elf64-alpha.c:4498 elf64-alpha.c:4510
+#: vms-alpha.c:5991
 #, c-format
-msgid "%s: gp-relative relocation against dynamic symbol %s"
+msgid "STO_B (store byte)\n"
 msgstr ""
 
-#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#: vms-alpha.c:5994
 #, c-format
-msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgid "STO_W (store word)\n"
 msgstr ""
 
-#: elf64-alpha.c:4564
+#: vms-alpha.c:5997
 #, c-format
-msgid "%s: change in gp: BRSGP %s"
+msgid "STO_LW (store longword)\n"
 msgstr ""
 
-#: elf64-alpha.c:4589
-msgid "<unknown>"
-msgstr "<Î´Öª>"
-
-#: elf64-alpha.c:4594
+#: vms-alpha.c:6000
 #, c-format
-msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgid "STO_QW (store quadword)\n"
 msgstr ""
 
-#: elf64-alpha.c:4639
+#: vms-alpha.c:6006
 #, c-format
-msgid "%s: unhandled dynamic relocation against %s"
-msgstr "%s£ºÎ´´¦ÀíµÄ¹ØÓÚ %s µÄ¶¯Ì¬ÖØ¶¨Î»"
+msgid "STO_IMMR (store immediate repeat) %u bytes\n"
+msgstr ""
 
-#: elf64-alpha.c:4752
+#: vms-alpha.c:6013
 #, c-format
-msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgid "STO_GBL (store global) %.*s\n"
 msgstr ""
 
-#: elf64-alpha.c:4775
+#: vms-alpha.c:6017
 #, c-format
-msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgid "STO_CA (store code address) %.*s\n"
 msgstr ""
 
-#: elf64-hppa.c:2080
+#: vms-alpha.c:6021
 #, c-format
-msgid "stub entry for %s cannot load .plt, dp offset = %ld"
+msgid "STO_RB (store relative branch)\n"
 msgstr ""
 
-#: elf64-mmix.c:1002
+#: vms-alpha.c:6024
 #, c-format
-msgid ""
-"%s: Internal inconsistency error for value for\n"
-" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgid "STO_AB (store absolute branch)\n"
 msgstr ""
 
-#: elf64-mmix.c:1386
+#: vms-alpha.c:6027
 #, c-format
-msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgid "STO_OFF (store offset to psect)\n"
 msgstr ""
 
-#: elf64-mmix.c:1391
+#: vms-alpha.c:6033
 #, c-format
-msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgid "STO_IMM (store immediate) %u bytes\n"
 msgstr ""
 
-#: elf64-mmix.c:1435
+#: vms-alpha.c:6040
 #, c-format
-msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgid "STO_GBL_LW (store global longword) %.*s\n"
 msgstr ""
 
-#: elf64-mmix.c:1440
+#: vms-alpha.c:6044
 #, c-format
-msgid "%s: register relocation against non-register symbol: %s in %s"
+msgid "STO_OFF (store LP with procedure signature)\n"
 msgstr ""
 
-#: elf64-mmix.c:1477
+#: vms-alpha.c:6047
 #, c-format
-msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr "%s£ºÖ¸Áî LOCAL Ö»¶Ô¼Ä´æÆ÷»ò¾ø¶ÔÖµÓÐÐ§"
+msgid "STO_BR_GBL (store branch global) *todo*\n"
+msgstr ""
 
-#: elf64-mmix.c:1505
+#: vms-alpha.c:6050
 #, c-format
-msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
-msgstr "%s£ºLOCAL Ö¸Áî£º¼Ä´æÆ÷ $%ld ²»ÊÇ±¾µØ¼Ä´æÆ÷¡£ µÚÒ»¸öÈ«¾Ö¼Ä´æÆ÷ÊÇ $%ld¡£"
+msgid "STO_BR_PS (store branch psect + offset) *todo*\n"
+msgstr ""
 
-#: elf64-mmix.c:1965
-#, c-format
-msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
-msgstr "%s£º´íÎó£ºÖØ¸´¶¨Òå¡°%s¡±£»%s µÄÆðµãÔÚ´ËÇ°Á¬½ÓµÄÎÄ¼þÖÐÒÑÉè¶¨\n"
+#: vms-alpha.c:6054
+#, fuzzy, c-format
+msgid "OPR_NOP (no-operation)\n"
+msgstr "ç©ºè½¬æ�¢ä¸­ç±»åž‹æ— æ•ˆ"
 
-#: elf64-mmix.c:2024
-msgid "Register section has contents\n"
-msgstr "¼Ä´æÆ÷½ÚÓÐÄÚÈÝ\n"
+#: vms-alpha.c:6057
+#, fuzzy, c-format
+msgid "OPR_ADD (add)\n"
+msgstr "åŠ å…¥"
 
-#: elf64-mmix.c:2186
-#, c-format
-msgid ""
-"Internal inconsistency: remaining %u != max %u.\n"
-"  Please report this bug."
-msgstr ""
-"ÄÚ²¿²»Ò»ÖÂ£ºÊ£Óà %u != ×î´ó %u¡£\n"
-"  Çë±¨¸æ¸Ã bug¡£"
+#: vms-alpha.c:6060
+#, fuzzy, c-format
+msgid "OPR_SUB (substract)\n"
+msgstr "ç¼©è¿›å­�ç›®å½•"
 
-#: elf64-ppc.c:1669 libbfd.c:1435
-#, c-format
-msgid "%s: compiled for a big endian system and target is little endian"
-msgstr "%s£ºÎª´ó¶ËÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇÐ¡¶ËµÄ"
+#: vms-alpha.c:6063
+#, fuzzy, c-format
+msgid "OPR_MUL (multiply)\n"
+msgstr "ä½¿ç”¨è½¯ä»¶æ¨¡æ‹Ÿä¹˜æ³•(é»˜è®¤)"
 
-#: elf64-ppc.c:1671 libbfd.c:1437
-#, c-format
-msgid "%s: compiled for a little endian system and target is big endian"
-msgstr "%s£ºÎªÐ¡¶ËÏµÍ³±àÒëµ«Ä¿±êÆ½Ì¨ÊÇ´ó¶ËµÄ"
+#: vms-alpha.c:6066
+#, fuzzy, c-format
+msgid "OPR_DIV (divide)\n"
+msgstr "(è¢«é›¶é™¤ï¼šrpn)"
 
-#: elf64-ppc.c:3610
-#, c-format
-msgid "%s: unexpected reloc type %u in .opd section"
-msgstr "%s£º.opd ½ÚÖÐÒâÍâµÄÖØ¶¨Î»ÀàÐÍ %u"
+#: vms-alpha.c:6069
+#, fuzzy, c-format
+msgid "OPR_AND (logical and)\n"
+msgstr "FTS_LOGICALï¼šé€»è¾‘é��åŽ†"
 
-#: elf64-ppc.c:3630
+#: vms-alpha.c:6072
 #, c-format
-msgid "%s: .opd is not a regular array of opd entries"
-msgstr "%s£º.opd ²»ÊÇ opd ÌõÄ¿µÄÆÕÍ¨Êý×é"
+msgid "OPR_IOR (logical inclusive or)\n"
+msgstr ""
 
-#: elf64-ppc.c:3672
-#, c-format
-msgid "%s: undefined sym `%s' in .opd section"
-msgstr "%s£º.opd ½ÚÖÐÎ´¶¨ÒåµÄ¡°%s¡±"
+#: vms-alpha.c:6075
+#, fuzzy, c-format
+msgid "OPR_EOR (logical exclusive or)\n"
+msgstr "å¯¹ä¸¤ä¸ªäº’æ–¥çš„æµ‹è¯•å�–é€»è¾‘%<and%>çš„ç»“æžœæ°¸è¿œä¸ºå�‡"
 
-#: elf64-ppc.c:4397
+#: vms-alpha.c:6078
 #, c-format
-msgid "can't find branch stub `%s'"
+msgid "OPR_NEG (negate)\n"
 msgstr ""
 
-#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#: vms-alpha.c:6081
+#, fuzzy, c-format
+msgid "OPR_COM (complement)\n"
+msgstr "æŒ‰ä½�å�–å��çš„å�‚æ•°ç±»åž‹é”™è¯¯"
+
+#: vms-alpha.c:6084
 #, c-format
-msgid "linkage table error against `%s'"
+msgid "OPR_INSV (insert field)\n"
 msgstr ""
 
-#: elf64-ppc.c:4573
+#: vms-alpha.c:6087
 #, c-format
-msgid "can't build branch stub `%s'"
+msgid "OPR_ASH (arithmetic shift)\n"
 msgstr ""
 
-#: elf64-ppc.c:5179
-msgid "stubs don't match calculated size"
+#: vms-alpha.c:6090
+#, c-format
+msgid "OPR_USH (unsigned shift)\n"
 msgstr ""
 
-#: elf64-ppc.c:5828
-#, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s£ºÖØ¶¨Î» %s ²»Ö§³Ö·ûºÅ %s¡£"
+#: vms-alpha.c:6093
+#, fuzzy, c-format
+msgid "OPR_ROT (rotate)\n"
+msgstr "å¾ªçŽ¯å·¦ç§»æ¬¡æ•°å¤§äºŽæˆ–ç­‰äºŽç±»åž‹å®½åº¦"
 
-#: elf64-ppc.c:5872
-#, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s£º´íÎó£ºÖØ¶¨Î» %s ²»ÊÇ 4 µÄ±¶Êý"
+#: vms-alpha.c:6096
+#, fuzzy, c-format
+msgid "OPR_SEL (select)\n"
+msgstr "é€‰å�–"
 
-#: elf64-sparc.c:1280
+#: vms-alpha.c:6099
 #, c-format
-msgid "%s: check_relocs: unhandled reloc type %d"
-msgstr "%s£ºcheck_relocs£ºÎ´´¦ÀíµÄÖØ¶¨Î»ÀàÐÍ %d"
+msgid "OPR_REDEF (redefine symbol to curr location)\n"
+msgstr ""
 
-#: elf64-sparc.c:1317
+#: vms-alpha.c:6102
 #, c-format
-msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr "%s£ºÖ»ÓÐ¼Ä´æÆ÷ %%g[2367] ¿ÉÒÔÓÃ STT_REGISTER À´ÉùÃ÷"
+msgid "OPR_REDEF (define a literal)\n"
+msgstr ""
 
-#: elf64-sparc.c:1337
+#: vms-alpha.c:6106
 #, c-format
-msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "²»¼æÈÝµØÊ¹ÓÃ¼Ä´æÆ÷ %%g%1$d£ºÔÚ %3$s ÖÐÎª %2$s£¬ÔÚÇ°ÃæµÄ %5$s ÖÐÎª %4$s"
+msgid "STC_LP (store cond linkage pair)\n"
+msgstr ""
 
-#: elf64-sparc.c:1360
+#: vms-alpha.c:6110
 #, c-format
-msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr "·ûºÅ¡°%1$s¡±µÄÀàÐÍ²»Í¬£º%2$s ÖÐÎª¼Ä´æÆ÷£¬ÔÚÇ°ÃæµÄ %4$s ÖÐÎª %3$s"
+msgid "STC_LP_PSB (store cond linkage pair + signature)\n"
+msgstr ""
 
-#: elf64-sparc.c:1406
+#: vms-alpha.c:6111
 #, c-format
-msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
+msgid "   linkage index: %u, procedure: %.*s\n"
 msgstr ""
 
-#: elf64-sparc.c:2970
+#: vms-alpha.c:6114
+#, fuzzy, c-format
+msgid "   signature: %.*s\n"
+msgstr "ä¸�æ ¡éªŒè½¯ä»¶åŒ…ç­¾å��"
+
+#: vms-alpha.c:6117
 #, c-format
-msgid "%s: linking UltraSPARC specific with HAL specific code"
+msgid "STC_GBL (store cond global)\n"
 msgstr ""
 
-#: elfcode.h:1198
+#: vms-alpha.c:6118
 #, c-format
-msgid "%s: version count (%ld) does not match symbol count (%ld)"
-msgstr "%s£º°æ±¾¼ÆÊý (%ld) ÎÞ·¨Æ¥Åä·ûºÅ¼ÆÊý (%ld)"
+msgid "   linkage index: %u, global: %.*s\n"
+msgstr ""
 
-#: elflink.c:440
+#: vms-alpha.c:6122
 #, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
+msgid "STC_GCA (store cond code address)\n"
 msgstr ""
 
-#: elflink.h:1090
+#: vms-alpha.c:6123
 #, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s£º¾¯¸æ£ºÒâÍâµÄÖØÐÂ¶¨Òå¡°%s¡±"
+msgid "   linkage index: %u, procedure name: %.*s\n"
+msgstr ""
 
-#: elflink.h:1727
+#: vms-alpha.c:6127
 #, c-format
-msgid "%s: %s: invalid version %u (max %d)"
-msgstr "%s£º%s£ºÎÞÐ§µÄ°æ±¾ %u (×î´ó %d)"
+msgid "STC_PS (store cond psect + offset)\n"
+msgstr ""
 
-#: elflink.h:1768
+#: vms-alpha.c:6129
 #, c-format
-msgid "%s: %s: invalid needed version %d"
-msgstr "%s£º%s£ºÎÞÐ§µÄ±Ø±¸°æ±¾ %d"
+msgid "   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"
+msgstr ""
 
-#: elflink.h:1890
+#: vms-alpha.c:6136
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "¾¯¸æ£º%4$s ÖÐµÄ·ûºÅ¡°%1$s¡±µÄ´óÐ¡ÓÉ %2$lu ±äÎª %3$lu"
+msgid "STC_NOP_GBL (store cond NOP at global addr)\n"
+msgstr ""
 
-#: elflink.h:3174
+#: vms-alpha.c:6140
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s£ºDSO ÖÐ²»ÔÊÐí³öÏÖ .preinit_array ½Ú"
+msgid "STC_NOP_PS (store cond NOP at psect + offset)\n"
+msgstr ""
 
-#: elflink.h:4030
+#: vms-alpha.c:6144
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "¾¯¸æ£º¶¯Ì¬·ûºÅ¡°%s¡±µÄÀàÐÍºÍ´óÐ¡Î´¶¨Òå"
+msgid "STC_BSR_GBL (store cond BSR at global addr)\n"
+msgstr ""
 
-#: elflink.h:4345
+#: vms-alpha.c:6148
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s£ºÎ´¶¨ÒåµÄÓÐ°æ±¾·ûºÅÃû %s"
-
-#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
-msgid "Error: out of memory"
-msgstr "´íÎó£ºÃ»ÓÐÄÚ´æ"
-
-#: elflink.h:4781
-msgid "Not enough memory to sort relocations"
-msgstr "Ã»ÓÐ×ã¹»µÄÄÚ´æ½øÐÐÖØ¶¨Î»ÅÅÐò"
+msgid "STC_BSR_PS (store cond BSR at psect + offset)\n"
+msgstr ""
 
-#: elflink.h:5682 elflink.h:5725
+#: vms-alpha.c:6152
 #, c-format
-msgid "%s: could not find output section %s"
-msgstr "%s£ºÎÞ·¨ÕÒµ½Êä³ö½Ú %s"
+msgid "STC_LDA_GBL (store cond LDA at global addr)\n"
+msgstr ""
 
-#: elflink.h:5688
+#: vms-alpha.c:6156
 #, c-format
-msgid "warning: %s section has zero size"
-msgstr "¾¯¸æ£º%s ½ÚµÄ´óÐ¡ÎªÁã"
+msgid "STC_LDA_PS (store cond LDA at psect + offset)\n"
+msgstr ""
 
-#: elflink.h:6275
+#: vms-alpha.c:6160
 #, c-format
-msgid "%s: could not find output section %s for input section %s"
-msgstr "%1$s£ºÎÞ·¨ÎªÊäÈë½Ú %3$s ÕÒµ½Êä³ö½Ú %2$s"
+msgid "STC_BOH_GBL (store cond BOH at global addr)\n"
+msgstr ""
 
-#: elflink.h:6486
+#: vms-alpha.c:6164
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
+msgid "STC_BOH_PS (store cond BOH at psect + offset)\n"
 msgstr ""
 
-#: elflink.h:6849
-msgid "warning: relocation against removed section; zeroing"
-msgstr "¾¯¸æ£º¹ØÓÚÒÑÉ¾³ýµÄ½ÚµÄÖØ¶¨Î»£»ÕýÔÚÇåÁã"
-
-#: elflink.h:6879
-msgid "warning: relocation against removed section"
-msgstr "¾¯¸æ£º¹ØÓÚÒÑÉ¾³ýµÄ½ÚµÄÖØ¶¨Î»"
-
-#: elflink.h:6892
+#: vms-alpha.c:6169
 #, c-format
-msgid "local symbols in discarded section %s"
-msgstr "ÒÑ½ûÓÃµÄ½Ú %s ÖÐµÄ±¾µØ·ûºÅ"
-
-#: elfxx-mips.c:734
-msgid "static procedure (no name)"
-msgstr "¾²Ì¬¹ý³Ì (ÎÞÃû³Æ)"
-
-#: elfxx-mips.c:1601
-msgid "not enough GOT space for local GOT entries"
-msgstr "Ã»ÓÐ×ã¹»µÄ GOT ¿Õ¼äÓÃÓÚ GOT ÌõÄ¿"
+msgid "STC_NBH_GBL (store cond or hint at global addr)\n"
+msgstr ""
 
-#: elfxx-mips.c:2750
+#: vms-alpha.c:6173
 #, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgid "STC_NBH_PS (store cond or hint at psect + offset)\n"
 msgstr ""
 
-#: elfxx-mips.c:4270
+#: vms-alpha.c:6177
 #, c-format
-msgid "%s: Malformed reloc detected for section %s"
+msgid "CTL_SETRB (set relocation base)\n"
 msgstr ""
 
-#: elfxx-mips.c:4348
+#: vms-alpha.c:6183
 #, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgid "CTL_AUGRB (augment relocation base) %u\n"
 msgstr ""
 
-#: elfxx-mips.c:7301
+#: vms-alpha.c:6187
 #, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s£º·Ç·¨µÄ½ÚÃû¡°%s¡±"
+msgid "CTL_DFLOC (define location)\n"
+msgstr ""
 
-#: elfxx-mips.c:7615
+#: vms-alpha.c:6190
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s£º½« PIC ÎÄ¼þÍ¬·Ç-PIC ÎÄ¼þÁ¬½Ó"
+msgid "CTL_STLOC (set location)\n"
+msgstr ""
 
-#: elfxx-mips.c:7625
+#: vms-alpha.c:6193
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
+msgid "CTL_STKDL (stack defined location)\n"
 msgstr ""
 
-#: elfxx-mips.c:7654
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s£ºISA (-mips%d) Í¬Ç°ÃæµÄÄ£¿é(-mips%d)²»Æ¥Åä"
+#: vms-alpha.c:6196 vms-alpha.c:6610
+#, fuzzy, c-format
+msgid "*unhandled*\n"
+msgstr "  æœªç»�å¤„ç�†çš„é­”æ•°\n"
 
-#: elfxx-mips.c:7676
+#: vms-alpha.c:6226 vms-alpha.c:6265
 #, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s£ºISA (%d) Í¬Ç°ÃæµÄÄ£¿é (%d) ²»Æ¥Åä"
+msgid "cannot read GST record length\n"
+msgstr ""
 
-#: elfxx-mips.c:7699
+#. Ill-formed.
+#: vms-alpha.c:6247
 #, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s£ºABI ²»Æ¥Åä£ºÕýÔÚ½«Ä£¿é %s Í¬Ç°Ò»¸öÄ£¿é %s ½øÐÐÁ¬½Ó"
-
-#: elfxx-mips.c:7759
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elfxx-mips.c:7761
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
+msgid "cannot find EMH in first GST record\n"
+msgstr ""
 
-#: elfxx-mips.c:7763
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
+#: vms-alpha.c:6273
+#, fuzzy, c-format
+msgid "cannot read GST record header\n"
+msgstr "æ— æ³•è¯»å�–ç¨‹åº�æ ‡å¤´"
 
-#: elfxx-mips.c:7765
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
+#: vms-alpha.c:6286
+#, fuzzy, c-format
+msgid " corrupted GST\n"
+msgstr "%sï¼šå·²æ�Ÿå��\n"
 
-#: elfxx-mips.c:7767
-msgid " [abi unknown]"
-msgstr " [abi Î´Öª]"
+#: vms-alpha.c:6294
+#, fuzzy, c-format
+msgid "cannot read GST record\n"
+msgstr "æ— æ³•åˆ†é…�å��è®°å½•"
 
-#: elfxx-mips.c:7769
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
+#: vms-alpha.c:6323
+#, fuzzy, c-format
+msgid " unhandled EOBJ record type %u\n"
+msgstr "%sï¼šæœªå¤„ç�†çš„å¯¼å…¥ç±»åž‹ï¼›%x"
 
-#: elfxx-mips.c:7771
-msgid " [abi=64]"
-msgstr " [abi=64]"
+#: vms-alpha.c:6346
+#, c-format
+msgid "  bitcount: %u, base addr: 0x%08x\n"
+msgstr ""
 
-#: elfxx-mips.c:7773
-msgid " [no abi set]"
+#: vms-alpha.c:6359
+#, c-format
+msgid "   bitmap: 0x%08x (count: %u):\n"
 msgstr ""
 
-#: elfxx-mips.c:7776
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elfxx-mips.c:7778
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elfxx-mips.c:7780
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elfxx-mips.c:7782
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elfxx-mips.c:7784
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elfxx-mips.c:7786
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elfxx-mips.c:7788
-msgid " [mips64]"
-msgstr " [mips64]"
+#: vms-alpha.c:6366
+#, fuzzy, c-format
+msgid " %08x"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elfxx-mips.c:7790
-msgid " [unknown ISA]"
-msgstr " [Î´ÖªµÄ ISA]"
+#: vms-alpha.c:6391
+#, fuzzy, c-format
+msgid "  image %u (%u entries)\n"
+msgstr "  -U                     å¦‚å�Œ -p å’Œ -u\n"
 
-#: elfxx-mips.c:7793
-msgid " [mdmx]"
-msgstr " [mdmx]"
+#: vms-alpha.c:6396
+#, fuzzy, c-format
+msgid "   offset: 0x%08x, val: 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
 
-#: elfxx-mips.c:7796
-msgid " [mips16]"
-msgstr " [mips16]"
+#: vms-alpha.c:6417
+#, fuzzy, c-format
+msgid "  image %u (%u entries), offsets:\n"
+msgstr "å†…å­˜ä¸�è¶³ä»¥å®¹çº³ %u ä¸ªæ�¡ç›®çš„é™¤é”™ä¿¡æ�¯æ•°ç»„"
 
-#: elfxx-mips.c:7799
-msgid " [32bitmode]"
-msgstr " [32Î»Ä£Ê½]"
+#: vms-alpha.c:6424
+#, fuzzy, c-format
+msgid " 0x%08x"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: elfxx-mips.c:7801
-msgid " [not 32bitmode]"
-msgstr " [·Ç 32Î»Ä£Ê½]"
+#. 64 bits.
+#: vms-alpha.c:6546
+#, fuzzy, c-format
+msgid "64 bits *unhandled*\n"
+msgstr "ä»¥ 64 ä½�å­˜å‚¨å�Œç²¾åº¦æ•°ã€‚"
 
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
+#: vms-alpha.c:6550
 #, c-format
-msgid "Output file requires shared library `%s'\n"
-msgstr "Êä³öÎÄ¼þÐèÒª¹²Ïí¿â¡°%s¡±\n"
+msgid "class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"
+msgstr ""
 
-#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
-#, c-format
-msgid "Output file requires shared library `%s.so.%s'\n"
-msgstr "Êä³öÎÄ¼þÐèÒª¹²Ïí¿â¡°%s.so.%s¡±\n"
+#: vms-alpha.c:6561
+#, fuzzy, c-format
+msgid "non-contiguous array of %s\n"
+msgstr "åœ¨é�žæ•°ç»„åˆ�å§‹å€¼è®¾å®šé¡¹ä¸­å‡ºçŽ°æ•°ç»„ç´¢å¼•"
 
-#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
-#: sparclinux.c:657 sparclinux.c:707
+#: vms-alpha.c:6565
 #, c-format
-msgid "Symbol %s not defined for fixups\n"
+msgid "dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"
 msgstr ""
 
-#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
-msgid "Warning: fixup count mismatch\n"
+#: vms-alpha.c:6569
+#, c-format
+msgid "arsize: %u, a0: 0x%08x\n"
 msgstr ""
 
-#: ieee.c:235
+#: vms-alpha.c:6573
 #, c-format
-msgid "%s: string too long (%d chars, max 65535)"
-msgstr "%s£º×Ö·û´®¹ý³¤ (%d ×Ö·û£¬×î´ó 65535)"
+msgid "Strides:\n"
+msgstr ""
 
-#: ieee.c:365
-#, c-format
-msgid "%s: unrecognized symbol `%s' flags 0x%x"
-msgstr "%s£ºÎÞ·¨Ê¶±ðµÄ¡°%s¡±±êÖ¾ 0x%x"
+#: vms-alpha.c:6578
+#, fuzzy, c-format
+msgid "[%u]: %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
 
-#: ieee.c:877
-#, c-format
-msgid "%s: unimplemented ATI record %u for symbol %u"
-msgstr ""
+#: vms-alpha.c:6583
+#, fuzzy, c-format
+msgid "Bounds:\n"
+msgstr "å½“æ•°ç»„è®¿é—®è¶Šç•Œæ—¶ç»™å‡ºè­¦å‘Š"
+
+#: vms-alpha.c:6588
+#, fuzzy, c-format
+msgid "[%u]: Lower: %u, upper: %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:6600
+#, fuzzy, c-format
+msgid "unaligned bit-string of %s\n"
+msgstr "%s æ˜¯ä¸€ä¸ª 32 ä½� ELF æ–‡ä»¶ã€‚\n"
 
-#: ieee.c:902
+#: vms-alpha.c:6604
+#, fuzzy, c-format
+msgid "base: %u, pos: %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:6624
 #, c-format
-msgid "%s: unexpected ATN type %d in external part"
+msgid "vflags: 0x%02x, value: 0x%08x "
 msgstr ""
 
-#: ieee.c:924
-#, c-format
-msgid "%s: unexpected type after ATN"
-msgstr "%s£ºATN Ö®ºó³öÏÖÒâÍâµÄÀàÐÍ"
+#: vms-alpha.c:6630
+#, fuzzy, c-format
+msgid "(no value)\n"
+msgstr "åƒ�ç´ å€¼"
 
-#: ihex.c:258
-#, c-format
-msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
-msgstr "%s£º%d£ºIntel Ê®Áù½øÖÆÎÄ¼þÖÐµÄÒâÍâ×Ö·û¡°%s\n"
+#: vms-alpha.c:6633
+#, fuzzy, c-format
+msgid "(not active)\n"
+msgstr "æœ�åŠ¡å™¨ç›®å‰�æ–‡ä»¶"
 
-#: ihex.c:366
-#, c-format
-msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr "%s£º%u£ºIntel Ê®Áù½øÖÆÎÄ¼þÖÐµÄÐ£ÑéºÍ´íÎó (Ó¦Îª %u¡¢ÊµÎª %u)"
+#: vms-alpha.c:6636
+#, fuzzy, c-format
+msgid "(not allocated)\n"
+msgstr "é�™æ€�åˆ†é…�çš„ Objective-C ç±»%qEçš„å®žä¾‹"
 
-#: ihex.c:420
-#, c-format
-msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr ""
+#: vms-alpha.c:6639
+#, fuzzy, c-format
+msgid "(descriptor)\n"
+msgstr "P æ��è¿°ç¬¦å�Žéœ€è¦�é€—å�·"
 
-#: ihex.c:437
-#, c-format
-msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr ""
+#: vms-alpha.c:6643
+#, fuzzy, c-format
+msgid "(trailing value)\n"
+msgstr "æœ«å°¾çš„å��æ–œæ� "
 
-#: ihex.c:454
-#, c-format
-msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr ""
+#: vms-alpha.c:6646
+#, fuzzy, c-format
+msgid "(value spec follows)\n"
+msgstr "<spec>"
 
-#: ihex.c:471
+#: vms-alpha.c:6649
 #, c-format
-msgid "%s:%u: bad extended linear start address length in Intel Hex file"
+msgid "(at bit offset %u)\n"
 msgstr ""
 
-#: ihex.c:488
+#: vms-alpha.c:6652
 #, c-format
-msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
+msgid "(reg: %u, disp: %u, indir: %u, kind: "
 msgstr ""
 
-#: ihex.c:607
-#, c-format
-msgid "%s: internal error in ihex_read_section"
+#: vms-alpha.c:6659
+#, fuzzy
+msgid "literal"
+msgstr "æ ¼å¼�å­—ç¬¦ä¸²ä¸�æ˜¯ä¸€ä¸ªå­—é�¢å­—ç¬¦ä¸²è€Œä¸”æ²¡æœ‰å¾…æ ¼å¼�åŒ–çš„å®žå�‚"
+
+#: vms-alpha.c:6662
+#, fuzzy
+msgid "address"
+msgstr "ADDRESS"
+
+#: vms-alpha.c:6665
+#, fuzzy
+msgid "desc"
+msgstr "<type> <desc> <info> [<dest_keyring>]"
+
+#: vms-alpha.c:6668
+#, fuzzy
+msgid "reg"
+msgstr "ç”Ÿæˆ�ä¸�ä½¿ç”¨ GP å¯„å­˜å™¨çš„ä»£ç �"
+
+#: vms-alpha.c:6743
+#, fuzzy, c-format
+msgid "Debug symbol table:\n"
 msgstr ""
+"\n"
+"ç¬¦å�·è¡¨ï¼š\n"
 
-#: ihex.c:642
+#: vms-alpha.c:6754
+#, fuzzy, c-format
+msgid "cannot read DST header\n"
+msgstr "æ— æ³•è¯»å�–ç¨‹åº�æ ‡å¤´"
+
+#: vms-alpha.c:6759
 #, c-format
-msgid "%s: bad section length in ihex_read_section"
+msgid " type: %3u, len: %3u (at 0x%08x): "
 msgstr ""
 
-#: ihex.c:860
+#: vms-alpha.c:6773
+#, fuzzy, c-format
+msgid "cannot read DST symbol\n"
+msgstr "æ— æ³•åˆ†é…�ç¬¦å�·æ•°æ�®"
+
+#: vms-alpha.c:6816
+#, fuzzy, c-format
+msgid "standard data: %s\n"
+msgstr "%sï¼šä¸�æ˜¯ä¸€ä¸ª gcov æ•°æ�®æ–‡ä»¶\n"
+
+#: vms-alpha.c:6819 vms-alpha.c:6903
+#, fuzzy, c-format
+msgid "    name: %.*s\n"
+msgstr "\tå��ç§°     ï¼š%s\n"
+
+#: vms-alpha.c:6826
 #, c-format
-msgid "%s: address 0x%s out of range for Intel Hex file"
+msgid "modbeg\n"
 msgstr ""
 
-#: libbfd.c:492
+#: vms-alpha.c:6827
 #, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
+msgid "   flags: %d, language: %u, major: %u, minor: %u\n"
 msgstr ""
 
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr ""
+#: vms-alpha.c:6833 vms-alpha.c:7099
+#, fuzzy, c-format
+msgid "   module name: %.*s\n"
+msgstr "%s è¯­å�¥å¿…é¡»å‡ºçŽ°åœ¨ MODULE ä¸­"
 
-#: libbfd.c:1466
+#: vms-alpha.c:6836
 #, c-format
-msgid "Deprecated %s called at %s line %d in %s\n"
+msgid "   compiler   : %.*s\n"
 msgstr ""
 
-#: libbfd.c:1469
+#: vms-alpha.c:6841
 #, c-format
-msgid "Deprecated %s called\n"
+msgid "modend\n"
 msgstr ""
 
-#: linker.c:1873
-#, c-format
-msgid "%s: indirect symbol `%s' to `%s' is a loop"
+#: vms-alpha.c:6848
+msgid "rtnbeg\n"
 msgstr ""
 
-#: linker.c:2776
+#: vms-alpha.c:6849
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "    flags: %u, address: 0x%08x, pd-address: 0x%08x\n"
 msgstr ""
 
-#: merge.c:892
+#: vms-alpha.c:6854
+#, fuzzy, c-format
+msgid "    routine name: %.*s\n"
+msgstr "ä¸ºè°ƒè¯•å™¨è®¾å®šä¸»è¿‡ç¨‹å��"
+
+#: vms-alpha.c:6862
+#, fuzzy, c-format
+msgid "rtnend: size 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:6870
 #, c-format
-msgid "%s: access beyond end of merged section (%ld + %ld)"
+msgid "prolog: bkpt address 0x%08x\n"
 msgstr ""
 
-#: mmo.c:460
+#: vms-alpha.c:6878
 #, c-format
-msgid "%s: No core to allocate section name %s\n"
+msgid "epilog: flags: %u, count: %u\n"
 msgstr ""
 
-#: mmo.c:536
+#: vms-alpha.c:6887
 #, c-format
-msgid "%s: No core to allocate a symbol %d bytes long\n"
+msgid "blkbeg: address: 0x%08x, name: %.*s\n"
 msgstr ""
 
-#: mmo.c:1245
+#: vms-alpha.c:6896
+#, fuzzy, c-format
+msgid "blkend: size: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:6902
+#, fuzzy, c-format
+msgid "typspec (len: %u)\n"
+msgstr "  -U                     å¦‚å�Œ -p å’Œ -u\n"
+
+#: vms-alpha.c:6909
+#, fuzzy, c-format
+msgid "septyp, name: %.*s\n"
+msgstr "   -S --as <name>            å°† <name> ç”¨ä½œæ±‡ç¼–ç¨‹åº�ã€‚\n"
+
+#: vms-alpha.c:6918
+#, fuzzy, c-format
+msgid "recbeg: name: %.*s\n"
+msgstr "   -S --as <name>            å°† <name> ç”¨ä½œæ±‡ç¼–ç¨‹åº�ã€‚\n"
+
+#: vms-alpha.c:6925
 #, c-format
-msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
+msgid "recend\n"
 msgstr ""
 
-#: mmo.c:1391
+#: vms-alpha.c:6928
 #, c-format
-msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgid "enumbeg, len: %u, name: %.*s\n"
 msgstr ""
 
-#: mmo.c:1633
+#: vms-alpha.c:6932
+#, fuzzy, c-format
+msgid "enumelt, name: %.*s\n"
+msgstr "   -S --as <name>            å°† <name> ç”¨ä½œæ±‡ç¼–ç¨‹åº�ã€‚\n"
+
+#: vms-alpha.c:6936
 #, c-format
-msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
+msgid "enumend\n"
 msgstr ""
 
-#: mmo.c:1643
+#: vms-alpha.c:6953
 #, c-format
-msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
+msgid "discontiguous range (nbr: %u)\n"
 msgstr ""
 
-#: mmo.c:1679
+#: vms-alpha.c:6955
 #, c-format
-msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
+msgid "    address: 0x%08x, size: %u\n"
 msgstr ""
 
-#: mmo.c:1725
+#: vms-alpha.c:6965
+#, fuzzy, c-format
+msgid "line num  (len: %u)\n"
+msgstr "%sï¼š%s ç¬¬ %u åˆ—ï¼šæ²¡æœ‰ä»»ä½•æ–‡ä»¶è·¯å¾„ã€‚\n"
+
+#: vms-alpha.c:6982
 #, c-format
-msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgid "delta_pc_w %u\n"
 msgstr ""
 
-#: mmo.c:1764
+#: vms-alpha.c:6989
 #, c-format
-msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
+msgid "incr_linum(b): +%u\n"
 msgstr ""
 
-#: mmo.c:1773
+#: vms-alpha.c:6995
 #, c-format
-msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgid "incr_linum_w: +%u\n"
 msgstr ""
 
-#: mmo.c:1796
+#: vms-alpha.c:7001
 #, c-format
-msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgid "incr_linum_l: +%u\n"
 msgstr ""
 
-#: mmo.c:1819
+#: vms-alpha.c:7007
 #, c-format
-msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
+msgid "set_line_num(w) %u\n"
 msgstr ""
 
-#: mmo.c:1839
+#: vms-alpha.c:7012
 #, c-format
-msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgid "set_line_num_b %u\n"
 msgstr ""
 
-#: mmo.c:1852
+#: vms-alpha.c:7017
 #, c-format
-msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgid "set_line_num_l %u\n"
 msgstr ""
 
-#: mmo.c:1958
+#: vms-alpha.c:7022
 #, c-format
-msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgid "set_abs_pc: 0x%08x\n"
 msgstr ""
 
-#: mmo.c:1994
+#: vms-alpha.c:7026
 #, c-format
-msgid "%s: invalid mmo file: lop_end not last item in file\n"
+msgid "delta_pc_l: +0x%08x\n"
 msgstr ""
 
-#: mmo.c:2007
+#: vms-alpha.c:7031
 #, c-format
-msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgid "term(b): 0x%02x"
 msgstr ""
 
-#: mmo.c:2670
+#: vms-alpha.c:7033
+#, fuzzy, c-format
+msgid "        pc: 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:7038
 #, c-format
-msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
+msgid "term_w: 0x%04x"
 msgstr ""
 
-#: mmo.c:2921
+#: vms-alpha.c:7040
+#, fuzzy, c-format
+msgid "    pc: 0x%08x\n"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
+
+#: vms-alpha.c:7046
+#, fuzzy, c-format
+msgid "delta pc +%-4d"
+msgstr "çŠ¶æ€� # %4d\t"
+
+#: vms-alpha.c:7049
 #, c-format
-msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgid "    pc: 0x%08x line: %5u\n"
 msgstr ""
 
-#: mmo.c:3011
+#: vms-alpha.c:7054
+#, fuzzy, c-format
+msgid "    *unhandled* cmd %u\n"
+msgstr "CMD"
+
+#: vms-alpha.c:7069
+#, fuzzy, c-format
+msgid "source (len: %u)\n"
+msgstr "æº�ä¸�æ˜¯ä¸€ä¸ªæŒ‡é’ˆ"
+
+#: vms-alpha.c:7083
 #, c-format
-msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgid "   declfile: len: %u, flags: %u, fileid: %u\n"
 msgstr ""
 
-#: mmo.c:3056
+#: vms-alpha.c:7087
 #, c-format
-msgid "%s: internal error, symbol table changed size from %d to %d words\n"
+msgid "   rms: cdt: 0x%08x %08x, ebk: 0x%08x, ffb: 0x%04x, rfo: %u\n"
 msgstr ""
 
-#: mmo.c:3111
+#: vms-alpha.c:7096
+#, fuzzy, c-format
+msgid "   filename   : %.*s\n"
+msgstr "%sï¼šæ–‡ä»¶å�� (%s) è¢«ä¸�æ­£ç¡®ç¼–ç �\n"
+
+#: vms-alpha.c:7105
+#, fuzzy, c-format
+msgid "   setfile %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7110 vms-alpha.c:7115
+#, fuzzy, c-format
+msgid "   setrec %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7120 vms-alpha.c:7125
+#, fuzzy, c-format
+msgid "   setlnum %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7130 vms-alpha.c:7135
+#, fuzzy, c-format
+msgid "   deflines %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7139
 #, c-format
-msgid "%s: internal error, internal register section %s had contents\n"
+msgid "   formfeed\n"
 msgstr ""
 
-#: mmo.c:3163
+#: vms-alpha.c:7143
+#, fuzzy, c-format
+msgid "   *unhandled* cmd %u\n"
+msgstr "CMD"
+
+#: vms-alpha.c:7155
+#, fuzzy, c-format
+msgid "*unhandled* dst type %u\n"
+msgstr "sigh åž‹æ€� (%u)ï¼šä¸�æ”¯æŒ�"
+
+#: vms-alpha.c:7187
+#, fuzzy, c-format
+msgid "cannot read EIHD\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
+
+#: vms-alpha.c:7190
 #, c-format
-msgid "%s: no initialized registers; section length 0\n"
+msgid "EIHD: (size: %u, nbr blocks: %u)\n"
 msgstr ""
 
-#: mmo.c:3169
-#, c-format
-msgid "%s: too many initialized registers; section length %ld\n"
+#: vms-alpha.c:7193
+#, fuzzy, c-format
+msgid " majorid: %u, minorid: %u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7201
+#, fuzzy
+msgid "executable"
+msgstr "ä¸ºå°�äºŽ 64k çš„å�¯æ‰§è¡Œæ–‡ä»¶ä½¿ç”¨ bras æŒ‡ä»¤"
+
+#: vms-alpha.c:7204
+#, fuzzy
+msgid "linkable image"
+msgstr "  --no-bind\t\t\t ä¸�è¦�ç»‘å®šè¿™ä¸ªæ˜ åƒ�\n"
+
+#: vms-alpha.c:7210
+#, fuzzy, c-format
+msgid " image type: %u (%s)"
+msgstr "%sï¼š%s æ€»å’Œæ£€æŸ¥ç �ï¼š%u\n"
+
+#: vms-alpha.c:7216
+#, fuzzy
+msgid "native"
+msgstr "å�‡å®šæœ¬åœ°å‡½æ•°ä½¿ç”¨ JNI å®žçŽ°"
+
+#: vms-alpha.c:7219
+msgid "CLI"
 msgstr ""
 
-#: mmo.c:3174
+#: vms-alpha.c:7225
+#, fuzzy, c-format
+msgid ", subtype: %u (%s)\n"
+msgstr "%sï¼šæœªçŸ¥å‡½æ•°â€˜%uâ€™\n"
+
+#: vms-alpha.c:7231
 #, c-format
-msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgid " offsets: isd: %u, activ: %u, symdbg: %u, imgid: %u, patch: %u\n"
 msgstr ""
 
-#: oasys.c:1029
+#: vms-alpha.c:7235
+#, fuzzy, c-format
+msgid " fixup info rva: "
+msgstr "æ— ä¿¡æ�¯"
+
+#: vms-alpha.c:7237
+#, fuzzy, c-format
+msgid ", symbol vector rva: "
+msgstr "ç¬¦å�·"
+
+#: vms-alpha.c:7240
+#, fuzzy, c-format
+msgid ""
+"\n"
+" version array off: %u\n"
+msgstr "å¯¼è¯­ç‰ˆæœ¬(%u)ï¼šä¸�æ”¯æŒ�"
+
+#: vms-alpha.c:7244
 #, c-format
-msgid "%s: can not represent section `%s' in oasys"
+msgid " img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"
 msgstr ""
 
-#: osf-core.c:132
+#: vms-alpha.c:7250
+#, fuzzy, c-format
+msgid " linker flags: %08x:"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
+
+#: vms-alpha.c:7280
 #, c-format
-msgid "Unhandled OSF/1 core file section type %d\n"
+msgid " ident: 0x%08x, sysver: 0x%08x, match ctrl: %u, symvect_size: %u\n"
 msgstr ""
 
-#: pe-mips.c:658
+#: vms-alpha.c:7286
+#, fuzzy, c-format
+msgid " BPAGE: %u"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
+
+#: vms-alpha.c:7292
 #, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+msgid ", ext fixup offset: %u, no_opt psect off: %u"
 msgstr ""
 
-#. OK, at this point the following variables are set up:
-#. src = VMA of the memory we're fixing up
-#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:794
-#, c-format
-msgid "%s: unimplemented %s\n"
-msgstr "%s£ºÎ´ÊµÏÖµÄ %s\n"
+#: vms-alpha.c:7295
+#, fuzzy, c-format
+msgid ", alias: %u\n"
+msgstr "  -U                     å¦‚å�Œ -p å’Œ -u\n"
 
-#: pe-mips.c:820
-#, c-format
-msgid "%s: jump too far away\n"
-msgstr "%s£ºÌø×ª¹ýÔ¶\n"
+#: vms-alpha.c:7303
+#, fuzzy, c-format
+msgid "system version array information:\n"
+msgstr "ç³»ç»Ÿä¿¡æ�¯ï¼š"
 
-#: pe-mips.c:847
+#: vms-alpha.c:7307
+#, fuzzy, c-format
+msgid "cannot read EIHVN header\n"
+msgstr "æ— æ³•è¯»å�–ç¨‹åº�æ ‡å¤´"
+
+#: vms-alpha.c:7317
+#, fuzzy, c-format
+msgid "cannot read EIHVN version\n"
+msgstr "è¯»å�–ç‰ˆæœ¬ä¿¡æ�¯è„šæœ¬"
+
+#: vms-alpha.c:7320
 #, c-format
-msgid "%s: bad pair/reflo after refhi\n"
+msgid "   %02u "
 msgstr ""
 
-#. XXX code yet to be written.
-#: peicode.h:785
-#, c-format
-msgid "%s: Unhandled import type; %x"
-msgstr "%s£ºÎ´´¦ÀíµÄµ¼ÈëÀàÐÍ£»%x"
+#: vms-alpha.c:7324
+#, fuzzy
+msgid "BASE_IMAGE       "
+msgstr "   --image-base <åŸºå�€>    æŒ‡å®šæ˜ åƒ�çš„åŸºæœ¬åœ°å�€\n"
 
-#: peicode.h:790
-#, c-format
-msgid "%s: Unrecognised import type; %x"
-msgstr "%s£ºÎ´Ê¶±ðµÄµ¼ÈëÀàÐÍ£»%x"
+#: vms-alpha.c:7327
+#, fuzzy
+msgid "MEMORY_MANAGEMENT"
+msgstr "å†…å­˜\n"
 
-#: peicode.h:804
-#, c-format
-msgid "%s: Unrecognised import name type; %x"
-msgstr "%s£ºÎ´Ê¶±ðµÄµ¼ÈëÃû×ÖÀàÐÍ£»%x"
+#: vms-alpha.c:7330
+#, fuzzy
+msgid "IO               "
+msgstr "é”™è¯¯çš„ IO åŸºç±»åž‹(%d)"
 
-#: peicode.h:1162
-#, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+#: vms-alpha.c:7333
+#, fuzzy
+msgid "FILES_VOLUMES    "
+msgstr "æ–‡ä»¶"
+
+#: vms-alpha.c:7336
+#, fuzzy
+msgid "PROCESS_SCHED    "
+msgstr "æ²¡æœ‰é‚£ä¸ªè¿›ç¨‹"
+
+#: vms-alpha.c:7339
+msgid "SYSGEN           "
 msgstr ""
 
-#: peicode.h:1174
-#, c-format
-msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+#: vms-alpha.c:7342
+msgid "CLUSTERS_LOCKMGR "
 msgstr ""
 
-#: peicode.h:1191
-#, c-format
-msgid "%s: size field is zero in Import Library Format header"
+#: vms-alpha.c:7345
+#, fuzzy
+msgid "LOGICAL_NAMES    "
+msgstr "FTS_LOGICALï¼šé€»è¾‘é��åŽ†"
+
+#: vms-alpha.c:7348
+#, fuzzy
+msgid "SECURITY         "
+msgstr "-Wformat-security æœªä¸Ž -Wformat ä¸€èµ·ä½¿ç”¨ï¼Œå·²å¿½ç•¥"
+
+#: vms-alpha.c:7351
+#, fuzzy
+msgid "IMAGE_ACTIVATOR  "
+msgstr "  --no-bind\t\t\t ä¸�è¦�ç»‘å®šè¿™ä¸ªæ˜ åƒ�\n"
+
+#: vms-alpha.c:7354
+msgid "NETWORKS         "
 msgstr ""
 
-#: peicode.h:1219
-#, c-format
-msgid "%s: string not null terminated in ILF object file."
+#: vms-alpha.c:7357
+#, fuzzy
+msgid "COUNTERS         "
+msgstr "åˆ—å‡ºæ‰€æœ‰å�¯ç”¨çš„è°ƒè¯•è®¡æ•°å™¨å�Šå…¶æž�é™�å’Œè®¡æ•°ã€‚"
+
+#: vms-alpha.c:7360
+#, fuzzy
+msgid "STABLE           "
 msgstr ""
+"  -o, --output=æ–‡ä»¶\t\tå°†ç»“æžœå†™å…¥åˆ°æ–‡ä»¶è€Œé�žæ ‡å‡†è¾“å‡º\n"
+"  -s, --stable\t\t\tç¦�ç”¨last-resort æ¯”è¾ƒä»¥ç¨³å®šæ¯”è¾ƒç®—æ³•\n"
+"  -S, --buffer-size=å¤§å°�\tæŒ‡å®šä¸»å†…å­˜ç¼“å­˜å¤§å°�\n"
 
-#: ppcboot.c:416
-msgid ""
-"\n"
-"ppcboot header:\n"
+#: vms-alpha.c:7363
+msgid "MISC             "
+msgstr "æ�‚é¡¹             "
+
+#: vms-alpha.c:7366
+msgid "CPU              "
+msgstr "CPU              "
+
+#: vms-alpha.c:7369
+#, fuzzy
+msgid "VOLATILE         "
+msgstr "é‡�å¤�çš„%<volatile%>"
+
+#: vms-alpha.c:7372
+msgid "SHELL            "
+msgstr "SHELL            "
+
+#: vms-alpha.c:7375
+msgid "POSIX            "
+msgstr "POSIX            "
+
+#: vms-alpha.c:7378
+#, fuzzy
+msgid "MULTI_PROCESSING "
+msgstr "æ”¯æŒ�ä¼ ç»Ÿå¤šçº¿ç¨‹"
+
+#: vms-alpha.c:7381
+msgid "GALAXY           "
 msgstr ""
 
-#: ppcboot.c:417
-#, c-format
-msgid "Entry offset        = 0x%.8lx (%ld)\n"
-msgstr "ÌõÄ¿Æ«ÒÆÁ¿        = 0x%.8lx (%ld)\n"
+#: vms-alpha.c:7384
+msgid "*unknown*        "
+msgstr "*æœªçŸ¥*           "
 
-#: ppcboot.c:418
-#, c-format
-msgid "Length              = 0x%.8lx (%ld)\n"
-msgstr "³¤¶È              = 0x%.8lx (%ld)\n"
+#: vms-alpha.c:7387
+#, fuzzy, c-format
+msgid ": %u.%u\n"
+msgstr "\t[%u] - [%u å­—èŠ‚] "
 
-#: ppcboot.c:421
-#, c-format
-msgid "Flag field          = 0x%.2x\n"
-msgstr "±êÖ¾Óò          = 0x%.2x\n"
+#: vms-alpha.c:7400 vms-alpha.c:7659
+#, fuzzy, c-format
+msgid "cannot read EIHA\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
+
+#: vms-alpha.c:7403
+#, fuzzy, c-format
+msgid "Image activation:  (size=%u)\n"
+msgstr "IEEE ä¸�æ”¯æŒ�çš„æ•´æ•°ç±»åž‹å¤§å°� %u\n"
+
+#: vms-alpha.c:7405
+#, fuzzy, c-format
+msgid " First address : 0x%08x 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:7408
+#, fuzzy, c-format
+msgid " Second address: 0x%08x 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:7411
+#, fuzzy, c-format
+msgid " Third address : 0x%08x 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:7414
+#, fuzzy, c-format
+msgid " Fourth address: 0x%08x 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
 
-#: ppcboot.c:427
+#: vms-alpha.c:7417
+#, fuzzy, c-format
+msgid " Shared image  : 0x%08x 0x%08x\n"
+msgstr "å›žæº¯åˆ° %-24.24s (0x%08x)\n"
+
+#: vms-alpha.c:7428
 #, c-format
-msgid "Partition name      = \"%s\"\n"
-msgstr "·ÖÇøÃû      = \"%s\"\n"
+msgid "cannot read EIHI\n"
+msgstr "æ— æ³•è¯»å…¥ EIHI\n"
 
-#: ppcboot.c:446
+#: vms-alpha.c:7431
 #, c-format
-msgid ""
-"\n"
-"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgid "Image identification: (major: %u, minor: %u)\n"
 msgstr ""
-"\n"
-"·ÖÇø[%d] Æðµã  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 
-#: ppcboot.c:452
-#, c-format
-msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
-msgstr "·ÖÇø[%d] ÖÕµã    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+#: vms-alpha.c:7434
+#, fuzzy, c-format
+msgid " image name       : %.*s\n"
+msgstr "%sï¼šä»Žæ˜ åƒ�æ¡£ '%s' ä¸­æˆªåŽ»è·¯å¾„æˆ�åˆ†ã€‚"
 
-#: ppcboot.c:458
-#, c-format
-msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
-msgstr "·ÖÇø[%d] ÉÈÇø = 0x%.8lx (%ld)\n"
+#: vms-alpha.c:7436
+#, fuzzy, c-format
+msgid " link time        : %s\n"
+msgstr "å�¯ç”¨é“¾æŽ¥æ—¶ä¼˜åŒ–ã€‚"
 
-#: ppcboot.c:459
-#, c-format
-msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
-msgstr "·ÖÇø[%d] ³¤¶È = 0x%.8lx (%ld)\n"
+#: vms-alpha.c:7438
+#, fuzzy, c-format
+msgid " image ident      : %.*s\n"
+msgstr "å¤„ç�† #ident æŒ‡ä»¤"
 
-#: som.c:5398
-msgid "som_sizeof_headers unimplemented"
-msgstr ""
+#: vms-alpha.c:7440
+#, fuzzy, c-format
+msgid " linker ident     : %.*s\n"
+msgstr "å¤„ç�† #ident æŒ‡ä»¤"
+
+#: vms-alpha.c:7442
+#, fuzzy, c-format
+msgid " image build ident: %.*s\n"
+msgstr "ç”¨æ�¥å»ºç½®ç¼“å­˜çš„ç›¸å¯¹è·¯å¾„ `%s'"
+
+#: vms-alpha.c:7452
+#, fuzzy, c-format
+msgid "cannot read EIHS\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
 
-#: srec.c:301
+#: vms-alpha.c:7455
 #, c-format
-msgid "%s:%d: Unexpected character `%s' in S-record file\n"
+msgid "Image symbol & debug table: (major: %u, minor: %u)\n"
 msgstr ""
 
-#: stabs.c:319
+#: vms-alpha.c:7460
 #, c-format
-msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgid " debug symbol table : vbn: %u, size: %u (0x%x)\n"
 msgstr ""
 
-#: syms.c:1044
-msgid "Unsupported .stab relocation"
-msgstr "²»Ö§³ÖµÄ .stab ÖØ¶¨Î»"
-
-#: vms-gsd.c:356
+#: vms-alpha.c:7464
 #, c-format
-msgid "bfd_make_section (%s) failed"
+msgid " global symbol table: vbn: %u, records: %u\n"
 msgstr ""
 
-#: vms-gsd.c:371
+#: vms-alpha.c:7468
 #, c-format
-msgid "bfd_set_section_flags (%s, %x) failed"
+msgid " debug module table : vbn: %u, size: %u\n"
 msgstr ""
 
-#: vms-gsd.c:407
+#: vms-alpha.c:7481
+#, fuzzy, c-format
+msgid "cannot read EISD\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
+
+#: vms-alpha.c:7491
 #, c-format
-msgid "Size mismatch section %s=%lx, %s=%lx"
+msgid "Image section descriptor: (major: %u, minor: %u, size: %u, offset: %u)\n"
 msgstr ""
 
-#: vms-gsd.c:702
+#: vms-alpha.c:7498
 #, c-format
-msgid "unknown gsd/egsd subtype %d"
+msgid " section: base: 0x%08x%08x size: 0x%08x\n"
 msgstr ""
 
-#: vms-hdr.c:406
-msgid "Object module NOT error-free !\n"
-msgstr ""
+#: vms-alpha.c:7503
+#, fuzzy, c-format
+msgid " flags: 0x%04x"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
 
-#: vms-misc.c:543
+#: vms-alpha.c:7540
 #, c-format
-msgid "Stack overflow (%d) in _bfd_vms_push"
+msgid " vbn: %u, pfc: %u, matchctl: %u type: %u ("
 msgstr ""
 
-#: vms-misc.c:561
-msgid "Stack underflow in _bfd_vms_pop"
+#: vms-alpha.c:7546
+msgid "NORMAL"
+msgstr "ä¸€èˆ¬"
+
+#: vms-alpha.c:7549
+msgid "SHRFXD"
 msgstr ""
 
-#: vms-misc.c:919
-msgid "_bfd_vms_output_counted called with zero bytes"
+#: vms-alpha.c:7552
+msgid "PRVFXD"
 msgstr ""
 
-#: vms-misc.c:924
-msgid "_bfd_vms_output_counted called with too many bytes"
+#: vms-alpha.c:7555
+msgid "SHRPIC"
 msgstr ""
 
-#: vms-misc.c:1055
-#, c-format
-msgid "Symbol %s replaced by %s\n"
+#: vms-alpha.c:7558
+msgid "PRVPIC"
 msgstr ""
 
-#: vms-misc.c:1117
-#, c-format
-msgid "failed to enter %s"
+#: vms-alpha.c:7561
+msgid "USRSTACK"
 msgstr ""
 
-#: vms-tir.c:81
-msgid "No Mem !"
+#: vms-alpha.c:7567
+msgid ")\n"
 msgstr ""
 
-#: vms-tir.c:362
+#: vms-alpha.c:7569
 #, c-format
-msgid "bad section index in %s"
-msgstr "%s ÖÐµÄ´íÎó½ÚË÷Òý"
+msgid " ident: 0x%08x, name: %.*s\n"
+msgstr ""
 
-#: vms-tir.c:375
-#, c-format
-msgid "unsupported STA cmd %s"
-msgstr "²»Ö§³ÖµÄ STA ÃüÁî %s"
+#: vms-alpha.c:7579
+#, fuzzy, c-format
+msgid "cannot read DMT\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
 
-#: vms-tir.c:380 vms-tir.c:1240
-#, c-format
-msgid "reserved STA cmd %d"
-msgstr ""
+#: vms-alpha.c:7583
+#, fuzzy, c-format
+msgid "Debug module table:\n"
+msgstr "å¯¹å†…åµŒçš„ SQL è™šæ‹Ÿè¡¨æ ¼è¿›è¡Œé™¤é”™"
 
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-alpha.c:7592
+#, fuzzy, c-format
+msgid "cannot read DMT header\n"
+msgstr "æ— æ³•è¯»å�–ç¨‹åº�æ ‡å¤´"
+
+#: vms-alpha.c:7597
 #, c-format
-msgid "%s: no symbol \"%s\""
+msgid " module offset: 0x%08x, size: 0x%08x, (%u psects)\n"
 msgstr ""
 
-#. unsigned shift
-#. rotate
-#. Redefine symbol to current location.
-#. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
-#, c-format
-msgid "%s: not supported"
-msgstr "%s£º²»Ö§³Ö"
+#: vms-alpha.c:7607
+#, fuzzy, c-format
+msgid "cannot read DMT psect\n"
+msgstr "æ— æ³•è¯»å�–ç»Ÿè®¡æ–‡ä»¶"
 
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-alpha.c:7610
 #, c-format
-msgid "%s: not implemented"
-msgstr "%s£ºÎ´ÊµÏÖ"
+msgid "  psect start: 0x%08x, length: %u\n"
+msgstr ""
 
-#: vms-tir.c:590 vms-tir.c:1422
-#, c-format
-msgid "reserved STO cmd %d"
-msgstr "±£ÁôµÄ STO ÃüÁî %d"
+#: vms-alpha.c:7623
+#, fuzzy, c-format
+msgid "cannot read DST\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
 
-#: vms-tir.c:708 vms-tir.c:1568
-#, c-format
-msgid "reserved OPR cmd %d"
-msgstr "±£ÁôµÄ OPR ÃüÁî %d"
+#: vms-alpha.c:7633
+#, fuzzy, c-format
+msgid "cannot read GST\n"
+msgstr "æ— æ³•è¯»å…¥å¤´"
+
+#: vms-alpha.c:7637
+#, fuzzy, c-format
+msgid "Global symbol table:\n"
+msgstr "å…¨å±€å��ç§»è¡¨æ•°æ�®"
 
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-alpha.c:7665
 #, c-format
-msgid "reserved CTL cmd %d"
-msgstr "±£ÁôµÄ CTL ÃüÁî %d"
+msgid "Image activator fixup: (major: %u, minor: %u)\n"
+msgstr ""
 
-#. stack byte from image
-#. arg: none.
-#: vms-tir.c:1148
-msgid "stack-from-image not implemented"
-msgstr "Î´ÊµÏÖ stack-from-image"
+#: vms-alpha.c:7668
+#, fuzzy, c-format
+msgid "  iaflink : 0x%08x %08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: vms-tir.c:1166
-msgid "stack-entry-mask not fully implemented"
-msgstr "ÉÐÎ´ÍêÈ«ÊµÏÖ stack-entry-mask"
+#: vms-alpha.c:7671
+#, fuzzy, c-format
+msgid "  fixuplnk: 0x%08x %08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#. compare procedure argument
-#. arg: cs	symbol name
-#. by	argument index
-#. da	argument descriptor
-#.
-#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
-#. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
-msgid "PASSMECH not fully implemented"
-msgstr "ÉÐÎ´ÍêÈ«ÊµÏÖ PASSMECH"
+#: vms-alpha.c:7674
+#, fuzzy, c-format
+msgid "  size : %u\n"
+msgstr "å¯¼è¯­å¤§å°�(%u):ä¸�å½“ï¼Œè¯»å�–(%d)ï¼Œ%s(%d)"
 
-#: vms-tir.c:1199
-msgid "stack-local-symbol not fully implemented"
-msgstr "ÉÐÎ´ÍêÈ«ÊµÏÖ stack-local-symbol"
+#: vms-alpha.c:7676
+#, fuzzy, c-format
+msgid "  flags: 0x%08x\n"
+msgstr "æ ‡å¿— 0x%08xï¼š\n"
 
-#: vms-tir.c:1212
-msgid "stack-literal not fully implemented"
-msgstr "ÉÐÎ´ÍêÈ«ÊµÏÖ stack-literal"
+#: vms-alpha.c:7680
+#, fuzzy, c-format
+msgid "  qrelfixoff: %5u, lrelfixoff: %5u\n"
+msgstr "åŒºæ®µ 0 åœ¨ç¾¤ç»„åŒºæ®µ [%5u] ä¹‹ä¸­\n"
 
-#: vms-tir.c:1233
-msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "ÉÐÎ´ÍêÈ«ÊµÏÖ stack-local-symbol-entry-point-mask"
+#: vms-alpha.c:7684
+#, fuzzy, c-format
+msgid "  qdotadroff: %5u, ldotadroff: %5u\n"
+msgstr "åŒºæ®µ 0 åœ¨ç¾¤ç»„åŒºæ®µ [%5u] ä¹‹ä¸­\n"
 
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
-#, c-format
-msgid "%s: not fully implemented"
-msgstr "%s£ºÉÐÎ´ÍêÈ«ÊµÏÖ"
+#: vms-alpha.c:7688
+#, fuzzy, c-format
+msgid "  codeadroff: %5u, lpfixoff  : %5u\n"
+msgstr "åŒºæ®µ 0 åœ¨ç¾¤ç»„åŒºæ®µ [%5u] ä¹‹ä¸­\n"
 
-#: vms-tir.c:1684
+#: vms-alpha.c:7691
 #, c-format
-msgid "obj code %d not found"
+msgid "  chgprtoff : %5u\n"
 msgstr ""
 
-#: vms-tir.c:2019
-#, c-format
-msgid "SEC_RELOC with no relocs in section %s"
-msgstr ""
+#: vms-alpha.c:7694
+#, fuzzy, c-format
+msgid "  shlstoff  : %5u, shrimgcnt : %5u\n"
+msgstr "åŒºæ®µ 0 åœ¨ç¾¤ç»„åŒºæ®µ [%5u] ä¹‹ä¸­\n"
 
-#: vms-tir.c:2307
-#, c-format
-msgid "Unhandled relocation %s"
-msgstr "Î´´¦ÀíµÄÖØ¶¨Î» %s"
+#: vms-alpha.c:7696
+#, fuzzy, c-format
+msgid "  shlextra  : %5u, permctx   : %5u\n"
+msgstr "åŒºæ®µ 0 åœ¨ç¾¤ç»„åŒºæ®µ [%5u] ä¹‹ä¸­\n"
 
-#: xcofflink.c:1243
-#, c-format
-msgid "%s: `%s' has line numbers but no enclosing section"
-msgstr ""
+#: vms-alpha.c:7699
+#, fuzzy, c-format
+msgid "  base_va : 0x%08x\n"
+msgstr "å›žæº¯ç›®çš„ï¼š %-24.24s (0x%08x)\n"
 
-#: xcofflink.c:1296
+#: vms-alpha.c:7701
 #, c-format
-msgid "%s: class %d symbol `%s' has no aux entries"
+msgid "  lppsbfixoff: %5u\n"
 msgstr ""
 
-#: xcofflink.c:1319
+#: vms-alpha.c:7709
 #, c-format
-msgid "%s: symbol `%s' has unrecognized csect type %d"
+msgid " Shareable images:\n"
 msgstr ""
 
-#: xcofflink.c:1331
+#: vms-alpha.c:7713
 #, c-format
-msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
+msgid "  %u: size: %u, flags: 0x%02x, name: %.*s\n"
 msgstr ""
 
-#: xcofflink.c:1367
+#: vms-alpha.c:7720
+#, fuzzy, c-format
+msgid " quad-word relocation fixups:\n"
+msgstr "æœªå¤„ç�†çš„é‡�å®šä½� %s"
+
+#: vms-alpha.c:7725
 #, c-format
-msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
+msgid " long-word relocation fixups:\n"
 msgstr ""
 
-#: xcofflink.c:1519
+#: vms-alpha.c:7730
 #, c-format
-msgid "%s: csect `%s' not in enclosing section"
+msgid " quad-word .address reference fixups:\n"
 msgstr ""
 
-#: xcofflink.c:1626
+#: vms-alpha.c:7735
 #, c-format
-msgid "%s: misplaced XTY_LD `%s'"
+msgid " long-word .address reference fixups:\n"
 msgstr ""
 
-#: xcofflink.c:1957
-#, c-format
-msgid "%s: reloc %s:%d not in csect"
+#: vms-alpha.c:7740
+#, fuzzy, c-format
+msgid " Code Address Reference Fixups:\n"
 msgstr ""
+"\n"
+"ç‰ˆæœ¬å¼•ç”¨ï¼š\n"
 
-#: xcofflink.c:2092
+#: vms-alpha.c:7745
 #, c-format
-msgid "%s: XCOFF shared object when not producing XCOFF output"
+msgid " Linkage Pairs Reference Fixups:\n"
 msgstr ""
 
-#: xcofflink.c:2113
+#: vms-alpha.c:7754
 #, c-format
-msgid "%s: dynamic object with no .loader section"
+msgid " Change Protection (%u entries):\n"
 msgstr ""
 
-#: xcofflink.c:2758
+#: vms-alpha.c:7759
 #, c-format
-msgid "%s: no such symbol"
+msgid "  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "
 msgstr ""
 
-#: xcofflink.c:2891
-msgid "error: undefined symbol __rtinit"
-msgstr "´íÎó£ºÎ´¶¨ÒåµÄ·ûºÅ __rtinit"
+#. FIXME: we do not yet support relocatable link.  It is not obvious
+#. how to do it for debug infos.
+#: vms-alpha.c:8599
+#, fuzzy
+msgid "%P: relocatable link is not supported\n"
+msgstr "%P%Fï¼šä¸�æ”¯æŒ� -shared\n"
 
-#: xcofflink.c:3453
-#, c-format
-msgid "warning: attempt to export undefined symbol `%s'"
-msgstr "¾¯¸æ£ºÊÔÍ¼µ¼³öÎ´¶¨ÒåµÄ·ûºÅ¡°%s¡±"
+#: vms-alpha.c:8669
+msgid "%P: multiple entry points: in modules %B and %B\n"
+msgstr ""
 
-#: xcofflink.c:4447
+#: vms-lib.c:1444
 #, c-format
-msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
+msgid "could not open shared image '%s' from '%s'"
 msgstr ""
 
-#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
-#, c-format
-msgid "%s: loader reloc in unrecognized section `%s'"
+#: vms-misc.c:360
+msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr ""
 
-#: xcofflink.c:5309 xcofflink.c:6130
-#, c-format
-msgid "%s: `%s' in loader reloc but not loader sym"
+#: vms-misc.c:365
+msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr ""
 
-#: xcofflink.c:5324
+#: xcofflink.c:824
 #, c-format
-msgid "%s: loader reloc in read-only section %s"
+msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr ""
 
-#: elf32-ia64.c:2222 elf64-ia64.c:2222
-msgid "@pltoff reloc against local symbol"
-msgstr ""
+#: xcofflink.c:845
+#, fuzzy, c-format
+msgid "%s: dynamic object with no .loader section"
+msgstr "%sï¼šä¸�æ˜¯åŠ¨æ€�å¯¹è±¡"
 
-#: elf32-ia64.c:3562 elf64-ia64.c:3562
-#, c-format
-msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
+#: xcofflink.c:1404
+msgid "%B: `%s' has line numbers but no enclosing section"
 msgstr ""
 
-#: elf32-ia64.c:3573 elf64-ia64.c:3573
-#, c-format
-msgid "%s: __gp does not cover short data segment"
-msgstr ""
+#: xcofflink.c:1456
+#, fuzzy
+msgid "%B: class %d symbol `%s' has no aux entries"
+msgstr "è­¦å‘Šï¼š%sï¼šæœ¬åœ°ç¬¦å�·â€œ%sâ€�æ²¡æœ‰èŠ‚"
 
-#: elf32-ia64.c:3858 elf64-ia64.c:3858
-#, c-format
-msgid "%s: linking non-pic code in a shared library"
+#: xcofflink.c:1478
+#, fuzzy
+msgid "%B: symbol `%s' has unrecognized csect type %d"
+msgstr "%sï¼šå¿…éœ€çš„ç¬¦å�·â€œ%sâ€�ä¸�å­˜åœ¨"
+
+#: xcofflink.c:1490
+msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr ""
 
-#: elf32-ia64.c:3891 elf64-ia64.c:3891
-#, c-format
-msgid "%s: @gprel relocation against dynamic symbol %s"
+#: xcofflink.c:1519
+msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr ""
 
-#: elf32-ia64.c:4030 elf64-ia64.c:4030
-#, c-format
-msgid "%s: dynamic relocation against speculation fixup"
+#: xcofflink.c:1665
+msgid "%B: csect `%s' not in enclosing section"
 msgstr ""
 
-#: elf32-ia64.c:4038 elf64-ia64.c:4038
-#, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
+#: xcofflink.c:1772
+msgid "%B: misplaced XTY_LD `%s'"
 msgstr ""
 
-#: elf32-ia64.c:4271 elf64-ia64.c:4271
-msgid "unsupported reloc"
-msgstr "²»Ö§³ÖµÄÖØ¶¨Î»"
+#: xcofflink.c:2091
+#, fuzzy
+msgid "%B: reloc %s:%d not in csect"
+msgstr "ç¬¬ %d åˆ—ï¼š%%patch -b éœ€è¦�å�‚æ•°ï¼š%s\n"
 
-#: elf32-ia64.c:4551 elf64-ia64.c:4551
-#, c-format
-msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr ""
+#: xcofflink.c:3182
+#, fuzzy, c-format
+msgid "%s: no such symbol"
+msgstr "%s: æ— æ³•é‡�æ–°æŽ’åˆ—åœ¨ %.*s ä¹‹å�Ž: æœªçŸ¥çš„ç¬¦å�·"
 
-#: elf32-ia64.c:4560 elf64-ia64.c:4560
+#: xcofflink.c:3287
 #, c-format
-msgid "%s: linking big-endian files with little-endian files"
-msgstr "%s£º½«´ó¶ËÎÄ¼þÍ¬Ð¡¶ËÎÄ¼þ"
+msgid "warning: attempt to export undefined symbol `%s'"
+msgstr "è­¦å‘Šï¼šè¯•å›¾å¯¼å‡ºæœªå®šä¹‰çš„ç¬¦å�·â€œ%sâ€�"
 
-#: elf32-ia64.c:4569 elf64-ia64.c:4569
-#, c-format
-msgid "%s: linking 64-bit files with 32-bit files"
-msgstr "%s£º½« 64-Î»ÎÄ¼þÍ¬ 32-Î»ÎÄ¼þÁ¬½Ó"
+#: xcofflink.c:3666
+msgid "error: undefined symbol __rtinit"
+msgstr "é”™è¯¯ï¼šæœªå®šä¹‰çš„ç¬¦å�· __rtinit"
 
-#: elf32-ia64.c:4578 elf64-ia64.c:4578
-#, c-format
-msgid "%s: linking constant-gp files with non-constant-gp files"
+#: xcofflink.c:4045
+#, fuzzy
+msgid "%B: loader reloc in unrecognized section `%s'"
+msgstr "%sï¼šé”™è¯¯çš„é‡�å®šä½�èŠ‚å��ç§°â€œ%sâ€�"
+
+#: xcofflink.c:4056
+msgid "%B: `%s' in loader reloc but not loader sym"
 msgstr ""
 
-#: elf32-ia64.c:4588 elf64-ia64.c:4588
+#: xcofflink.c:4072
+#, fuzzy
+msgid "%B: loader reloc in read-only section %A"
+msgstr "%sï¼šé”™è¯¯çš„é‡�å®šä½�èŠ‚å��ç§°â€œ%sâ€�"
+
+#: xcofflink.c:5094
 #, c-format
-msgid "%s: linking auto-pic files with non-auto-pic files"
+msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr ""
 
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:1009 pepigen.c:1009 pex64igen.c:1009
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s£ºÐÐºÅÒç³ö£º0x%lx > 0xffff"
+msgstr "%sï¼šè¡Œå�·æº¢å‡ºï¼š0x%lx > 0xffff"
 
-#: peigen.c:979 pepigen.c:979
-#, c-format
-msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-msgstr ""
-
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
 msgid "Export Directory [.edata (or where ever we found it)]"
-msgstr "µ¼³öÄ¿Â¼ [.edata (»òÕßÆäËüÈÎºÎÄÜÕÒµ½ËüµÄµØ·½)]"
+msgstr "å¯¼å‡ºç›®å½• [.edata (æˆ–è€…å…¶å®ƒä»»ä½•èƒ½æ‰¾åˆ°å®ƒçš„åœ°æ–¹)]"
 
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
 msgid "Import Directory [parts of .idata]"
-msgstr "µ¼ÈëÄ¿Â¼ [.idata µÄÒ»²¿·Ö]"
+msgstr "å¯¼å…¥ç›®å½• [.idata çš„ä¸€éƒ¨åˆ†]"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
 msgid "Resource Directory [.rsrc]"
-msgstr "×ÊÔ´Ä¿Â¼ [.rsrc]"
+msgstr "èµ„æº�ç›®å½• [.rsrc]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
+#, fuzzy
 msgid "Exception Directory [.pdata]"
-msgstr ""
+msgstr "å�¯ç”¨å¼‚å¸¸å¤„ç�†"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
 msgid "Security Directory"
-msgstr "°²È«Ä¿Â¼"
+msgstr "å®‰å…¨ç›®å½•"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041
 msgid "Base Relocation Directory [.reloc]"
 msgstr ""
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042
 msgid "Debug Directory"
-msgstr "µ÷ÊÔÄ¿Â¼"
+msgstr "è°ƒè¯•ç›®å½•"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1043 pepigen.c:1043 pex64igen.c:1043
 msgid "Description Directory"
-msgstr "ÃèÊöÄ¿Â¼"
+msgstr "æ��è¿°ç›®å½•"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1044 pepigen.c:1044 pex64igen.c:1044
 msgid "Special Directory"
-msgstr "ÌØÊâÄ¿Â¼"
+msgstr "ç‰¹æ®Šç›®å½•"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1045 pepigen.c:1045 pex64igen.c:1045
 msgid "Thread Storage Directory [.tls]"
-msgstr "Ïß³Ì´æ´¢Ä¿Â¼ [.tls]"
+msgstr "çº¿ç¨‹å­˜å‚¨ç›®å½• [.tls]"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1046 pepigen.c:1046 pex64igen.c:1046
 msgid "Load Configuration Directory"
-msgstr "×°ÈëÅäÖÃÄ¿Â¼"
+msgstr "è£…å…¥é…�ç½®ç›®å½•"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1047 pepigen.c:1047 pex64igen.c:1047
+#, fuzzy
 msgid "Bound Import Directory"
-msgstr ""
+msgstr "ä¸»ç›®å½•ï¼š "
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1048 pepigen.c:1048 pex64igen.c:1048
 msgid "Import Address Table Directory"
-msgstr "µ¼ÈëµØÖ·±íÄ¿Â¼"
+msgstr "å¯¼å…¥åœ°å�€è¡¨ç›®å½•"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1049 pepigen.c:1049 pex64igen.c:1049
 msgid "Delay Import Directory"
-msgstr "ÑÓ³Ùµ¼ÈëÄ¿Â¼"
+msgstr "å»¶è¿Ÿå¯¼å…¥ç›®å½•"
+
+#: peigen.c:1050 pepigen.c:1050 pex64igen.c:1050
+msgid "CLR Runtime Header"
+msgstr "CLR è¿�è¡Œæ—¶æ ‡å¤´"
 
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1051 pepigen.c:1051 pex64igen.c:1051
 msgid "Reserved"
-msgstr "±£Áô"
+msgstr "ä¿�ç•™"
 
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1111 pepigen.c:1111 pex64igen.c:1111
+#, c-format
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1076 pepigen.c:1076
-#, c-format
+#: peigen.c:1116 pepigen.c:1116 pex64igen.c:1116
+#, fuzzy, c-format
 msgid ""
 "\n"
 "There is an import table in %s at 0x%lx\n"
 msgstr ""
+"\n"
+" ç›®å½•è¡¨ (å��ç§» 0x%lx)ï¼š\n"
 
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1158 pepigen.c:1158 pex64igen.c:1158
 #, c-format
 msgid ""
 "\n"
 "Function descriptor located at the start address: %04lx\n"
 msgstr ""
 
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr ""
 
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169
+#, c-format
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
 msgstr ""
 
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1174 pepigen.c:1174 pex64igen.c:1174
 #, c-format
 msgid ""
 "\n"
 "The Import Tables (interpreted %s section contents)\n"
 msgstr ""
 
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1177 pepigen.c:1177 pex64igen.c:1177
+#, c-format
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
 msgstr ""
 
-#: peigen.c:1181 pepigen.c:1181
+#: peigen.c:1225 pepigen.c:1225 pex64igen.c:1225
 #, c-format
 msgid ""
 "\n"
 "\tDLL Name: %s\n"
 msgstr ""
 "\n"
-"\tDLL Ãû³Æ£º%s\n"
+"\tDLL å��ç§°ï¼š%s\n"
 
-#: peigen.c:1192 pepigen.c:1192
+#: peigen.c:1236 pepigen.c:1236 pex64igen.c:1236
+#, c-format
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr ""
 
-#: peigen.c:1217 pepigen.c:1217
+#: peigen.c:1261 pepigen.c:1261 pex64igen.c:1261
+#, c-format
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1357 pepigen.c:1357
+#: peigen.c:1423 pepigen.c:1423 pex64igen.c:1423
+#, c-format
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 
-#: peigen.c:1362 pepigen.c:1362
+#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432
+#, fuzzy, c-format
+msgid ""
+"\n"
+"There is an export table in %s, but it does not fit into that section\n"
+msgstr ""
+"\n"
+"%s ä¸­çš„å¯¼å‡ºè¡¨ä½�äºŽ 0x%lx\n"
+
+#: peigen.c:1438 pepigen.c:1438 pex64igen.c:1438
 #, c-format
 msgid ""
 "\n"
 "There is an export table in %s at 0x%lx\n"
 msgstr ""
 "\n"
-"%s ÖÐµÄµ¼³ö±íÎ»ÓÚ 0x%lx\n"
+"%s ä¸­çš„å¯¼å‡ºè¡¨ä½�äºŽ 0x%lx\n"
 
-#: peigen.c:1393 pepigen.c:1393
+#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
 #, c-format
 msgid ""
 "\n"
@@ -2564,139 +6580,272 @@ msgid ""
 "\n"
 msgstr ""
 
-#: peigen.c:1397 pepigen.c:1397
+#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
-msgstr "µ¼³ö±êÖ¾ \t\t\t%lx\n"
+msgstr "å¯¼å‡ºæ ‡å¿— \t\t\t%lx\n"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
-msgstr "ÈÕÆÚ/Ê±¼ä´Á \t\t%lx\n"
+msgstr "æ—¥æœŸ/æ—¶é—´æˆ³ \t\t%lx\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1476 pepigen.c:1476 pex64igen.c:1476
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr ""
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479
+#, c-format
 msgid "Name \t\t\t\t"
-msgstr "Ãû³Æ \t\t\t\t"
+msgstr "å��ç§° \t\t\t\t"
 
-#: peigen.c:1412 pepigen.c:1412
-#, c-format
+#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485
+#, fuzzy, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
-msgstr ""
+msgstr "  é•¿åº¦ï¼š                      %ld\n"
 
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
+#, fuzzy, c-format
 msgid "Number in:\n"
-msgstr ""
+msgstr "[=æ•°å­—]"
 
-#: peigen.c:1418 pepigen.c:1418
-#, c-format
+#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
+#, fuzzy, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr ""
+"\n"
+"åœ°å�€è¡¨ï¼š\n"
 
-#: peigen.c:1422 pepigen.c:1422
+#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr ""
 
-#: peigen.c:1425 pepigen.c:1425
+#: peigen.c:1498 pepigen.c:1498 pex64igen.c:1498
+#, c-format
 msgid "Table Addresses\n"
-msgstr "±íµØÖ·\n"
+msgstr "è¡¨åœ°å�€\n"
 
-#: peigen.c:1428 pepigen.c:1428
+#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501
+#, c-format
 msgid "\tExport Address Table \t\t"
-msgstr "\tµ¼³öµØÖ·±í \t\t"
+msgstr "\tå¯¼å‡ºåœ°å�€è¡¨ \t\t"
 
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506
+#, c-format
 msgid "\tName Pointer Table \t\t"
-msgstr "\tÃû³ÆÖ¸Õë±í \t\t"
+msgstr "\tå��ç§°æŒ‡é’ˆè¡¨ \t\t"
 
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1511 pepigen.c:1511 pex64igen.c:1511
+#, fuzzy, c-format
 msgid "\tOrdinal Table \t\t\t"
-msgstr ""
+msgstr "è¡¨\n"
 
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1525 pepigen.c:1525 pex64igen.c:1525
 #, c-format
 msgid ""
 "\n"
 "Export Address Table -- Ordinal Base %ld\n"
 msgstr ""
 
-#: peigen.c:1472 pepigen.c:1472
+#: peigen.c:1544 pepigen.c:1544 pex64igen.c:1544
 msgid "Forwarder RVA"
 msgstr ""
 
-#: peigen.c:1483 pepigen.c:1483
+#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
 msgid "Export RVA"
-msgstr "µ¼³ö RVA"
+msgstr "å¯¼å‡º RVA"
 
-#: peigen.c:1490 pepigen.c:1490
+#: peigen.c:1562 pepigen.c:1562 pex64igen.c:1562
+#, fuzzy, c-format
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
 msgstr ""
+"\n"
+" æ–‡ä»¶å��è¡¨ä¸ºç©ºã€‚\n"
 
-#: peigen.c:1545 pepigen.c:1545
+#: peigen.c:1622 peigen.c:1805 pepigen.c:1622 pepigen.c:1805 pex64igen.c:1622
+#: pex64igen.c:1805
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr ""
 
-#: peigen.c:1549 pepigen.c:1549
-msgid ""
-"\n"
-"The Function Table (interpreted .pdata section contents)\n"
-msgstr ""
-
-#: peigen.c:1552 pepigen.c:1552
+#: peigen.c:1629 pepigen.c:1629 pex64igen.c:1629
+#, c-format
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr ""
 
-#: peigen.c:1554 pepigen.c:1554
+#: peigen.c:1631 pepigen.c:1631 pex64igen.c:1631
+#, c-format
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
 msgstr ""
 
-#: peigen.c:1624 pepigen.c:1624
+#: peigen.c:1705 pepigen.c:1705 pex64igen.c:1705
+#, fuzzy, c-format
 msgid " Register save millicode"
-msgstr ""
+msgstr "ä¿�å­˜"
 
-#: peigen.c:1627 pepigen.c:1627
+#: peigen.c:1708 pepigen.c:1708 pex64igen.c:1708
+#, c-format
 msgid " Register restore millicode"
 msgstr ""
 
-#: peigen.c:1630 pepigen.c:1630
+#: peigen.c:1711 pepigen.c:1711 pex64igen.c:1711
+#, fuzzy, c-format
 msgid " Glue code sequence"
 msgstr ""
+"åº�åˆ—ç»“æ�Ÿ\n"
+"\n"
+
+#: peigen.c:1811 pepigen.c:1811 pex64igen.c:1811
+#, c-format
+msgid ""
+" vma:\t\tBegin    Prolog   Function Flags    Exception EH\n"
+"     \t\tAddress  Length   Length   32b exc  Handler   Data\n"
+msgstr ""
 
-#: peigen.c:1682 pepigen.c:1682
+#: peigen.c:1937 pepigen.c:1937 pex64igen.c:1937
+#, c-format
 msgid ""
 "\n"
 "\n"
 "PE File Base Relocations (interpreted .reloc section contents)\n"
 msgstr ""
 
-#: peigen.c:1712 pepigen.c:1712
+#: peigen.c:1966 pepigen.c:1966 pex64igen.c:1966
 #, c-format
 msgid ""
 "\n"
 "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
 msgstr ""
 
-#: peigen.c:1725 pepigen.c:1725
+#: peigen.c:1979 pepigen.c:1979 pex64igen.c:1979
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr ""
 
+#: peigen.c:2023 pepigen.c:2023 pex64igen.c:2023
+#, fuzzy, c-format
+msgid "%*.s Entry: "
+msgstr "è®¤ä¸ºä¸­ %s é¡¹ç›® â€œ%sâ€� ï¼Œé€¾æ—¶ %<PRIu64>"
+
+#: peigen.c:2043 pepigen.c:2043 pex64igen.c:2043
+#, c-format
+msgid "name: [val: %08lx len %d]: "
+msgstr ""
+
+#: peigen.c:2054 pepigen.c:2054 pex64igen.c:2054
+#, fuzzy, c-format
+msgid "<corrupt string length: %#x>"
+msgstr "<æ¯�æ�Ÿå­—ä¸²è¡¨ç´¢å¼•ï¼š%3ld>"
+
+#: peigen.c:2057 pepigen.c:2057 pex64igen.c:2057
+#, fuzzy, c-format
+msgid "<corrupt string offset: %#lx>"
+msgstr "<æ¯�æ�Ÿå­—ä¸²è¡¨ç´¢å¼•ï¼š%3ld>"
+
+#: peigen.c:2060 pepigen.c:2060 pex64igen.c:2060
+#, fuzzy, c-format
+msgid "ID: %#08lx"
+msgstr "id="
+
+#: peigen.c:2063 pepigen.c:2063 pex64igen.c:2063
+#, fuzzy, c-format
+msgid ", Value: %#08lx\n"
+msgstr "åƒ�ç´ å€¼"
+
+#: peigen.c:2074 pepigen.c:2074 pex64igen.c:2074
+#, c-format
+msgid "%*.s  Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"
+msgstr ""
+
+#: peigen.c:2116 pepigen.c:2116 pex64igen.c:2116
+#, c-format
+msgid " Table: Char: %d, Time: %08lx, Ver: %d/%d, Num Names: %d, IDs: %d\n"
+msgstr ""
+
+#: peigen.c:2204 pepigen.c:2204 pex64igen.c:2204
+#, fuzzy, c-format
+msgid "Corrupt .rsrc section detected!\n"
+msgstr "Corrupt header in the %s section.\n"
+
+#: peigen.c:2220 pepigen.c:2220 pex64igen.c:2220
+#, c-format
+msgid ""
+"\n"
+"WARNING: Extra data in .rsrc section - it will be ignored by Windows:\n"
+msgstr ""
+
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1765 pepigen.c:1765
-#, c-format
+#: peigen.c:2243 pepigen.c:2243 pex64igen.c:2243
+#, fuzzy, c-format
 msgid ""
 "\n"
 "Characteristics 0x%x\n"
+msgstr "%s stab (0x%x)æ²¡æœ‰ sclass"
+
+#: peigen.c:3194 pepigen.c:3194 pex64igen.c:3194
+#, c-format
+msgid ".rsrc merge failure: duplicate string resource: %d"
+msgstr ""
+
+#: peigen.c:3329 pepigen.c:3329 pex64igen.c:3329
+msgid ".rsrc merge failure: multiple non-default manifests"
+msgstr ""
+
+#: peigen.c:3347 pepigen.c:3347 pex64igen.c:3347
+msgid ".rsrc merge failure: a directory matches a leaf"
+msgstr ""
+
+#: peigen.c:3389 pepigen.c:3389 pex64igen.c:3389
+msgid ".rsrc merge failure: duplicate leaf"
+msgstr ""
+
+#: peigen.c:3391 pepigen.c:3391 pex64igen.c:3391
+#, c-format
+msgid ".rsrc merge failure: duplicate leaf: %s"
+msgstr ""
+
+#: peigen.c:3457 pepigen.c:3457 pex64igen.c:3457
+msgid ".rsrc merge failure: dirs with differing characteristics\n"
+msgstr ""
+
+#: peigen.c:3464 pepigen.c:3464 pex64igen.c:3464
+msgid ".rsrc merge failure: differing directory versions\n"
+msgstr ""
+
+#. Corrupted .rsrc section - cannot merge.
+#: peigen.c:3537 pepigen.c:3537 pex64igen.c:3537
+#, c-format
+msgid "%s: .rsrc merge failure: corrupt .rsrc section"
+msgstr ""
+
+#: peigen.c:3673 pepigen.c:3673 pex64igen.c:3673
+msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
+msgstr ""
+
+#: peigen.c:3693 pepigen.c:3693 pex64igen.c:3693
+msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
+msgstr ""
+
+#: peigen.c:3714 pepigen.c:3714 pex64igen.c:3714
+msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
+msgstr ""
+
+#: peigen.c:3734 pepigen.c:3734 pex64igen.c:3734
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"
+msgstr ""
+
+#: peigen.c:3776 pepigen.c:3776 pex64igen.c:3776
+msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)] because .idata$6 is missing"
+msgstr ""
+
+#: peigen.c:3801 pepigen.c:3801 pex64igen.c:3801
+msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
 msgstr ""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/PORTING ./bfd/PORTING
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/PORTING	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/PORTING	2017-03-06 01:49:05.000000000 +0000
@@ -82,7 +82,7 @@ TARGETNAME
 	The name of the target, for run-time lookups.
 	Usually "a.out-<target>"
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ppcboot.c ./bfd/ppcboot.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ppcboot.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ppcboot.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for PPCbug boot records.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -402,7 +402,7 @@ ppcboot_bfd_print_private_bfd_data (bfd 
   if (tdata->header.os_id)
     fprintf (f, "OS_ID               = 0x%.2x\n", tdata->header.os_id);
 
-  if (tdata->header.partition_name)
+  if (tdata->header.partition_name[0])
     fprintf (f, _("Partition name      = \"%s\"\n"), tdata->header.partition_name);
 
   for (i = 0; i < 4; i++)
@@ -422,20 +422,25 @@ ppcboot_bfd_print_private_bfd_data (bfd 
 	  && !sector_begin && !sector_length)
 	continue;
 
+      /* xgettext:c-format */
       fprintf (f, _("\nPartition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"), i,
 	       tdata->header.partition[i].partition_begin.ind,
 	       tdata->header.partition[i].partition_begin.head,
 	       tdata->header.partition[i].partition_begin.sector,
 	       tdata->header.partition[i].partition_begin.cylinder);
 
+      /* xgettext:c-format */
       fprintf (f, _("Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"), i,
 	       tdata->header.partition[i].partition_end.ind,
 	       tdata->header.partition[i].partition_end.head,
 	       tdata->header.partition[i].partition_end.sector,
 	       tdata->header.partition[i].partition_end.cylinder);
 
+      /* xgettext:c-format */
       fprintf (f, _("Partition[%d] sector = 0x%.8lx (%ld)\n"),
 	       i, (unsigned long) sector_begin, sector_begin);
+
+      /* xgettext:c-format */
       fprintf (f, _("Partition[%d] length = 0x%.8lx (%ld)\n"),
 	       i, (unsigned long) sector_length, sector_length);
     }
@@ -465,6 +470,7 @@ ppcboot_bfd_print_private_bfd_data (bfd 
 #define ppcboot_bfd_link_split_section _bfd_generic_link_split_section
 #define ppcboot_get_section_contents_in_window \
   _bfd_generic_get_section_contents_in_window
+#define ppcboot_bfd_link_check_relocs _bfd_generic_link_check_relocs
 
 #define ppcboot_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
 #define ppcboot_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ptrace-core.c ./bfd/ptrace-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/ptrace-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/ptrace-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for core files which use the ptrace_user structure
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    The structure of this file is based on trad-core.c written by John Gilmore
    of Cygnus Support.
    Modified to work with the ptrace_user structure by Kevin A. Buettner.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/README ./bfd/README
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/README	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/README	2017-03-06 01:49:05.000000000 +0000
@@ -48,7 +48,7 @@ gcc manual.
 Bug reports without patches will be remembered, but they may never get
 fixed until somebody volunteers to fix them.
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/reloc16.c ./bfd/reloc16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/reloc16.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/reloc16.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* 8 and 16 bit COFF relocation functions, for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -80,11 +80,9 @@ bfd_coff_reloc16_get_value (arelent *rel
 	value = 0;
       else
 	{
-	  if (!((*link_info->callbacks->undefined_symbol)
-		(link_info, bfd_asymbol_name (symbol),
-		 input_section->owner, input_section, reloc->address,
-		 TRUE)))
-	    abort ();
+	  (*link_info->callbacks->undefined_symbol)
+	    (link_info, bfd_asymbol_name (symbol),
+	     input_section->owner, input_section, reloc->address, TRUE);
 	  value = 0;
 	}
     }
@@ -153,7 +151,7 @@ bfd_coff_reloc16_relax_section (bfd *abf
   arelent **reloc_vector = NULL;
   long reloc_count;
 
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/reloc.c ./bfd/reloc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/reloc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/reloc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for handling relocation entries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -586,16 +586,6 @@ bfd_perform_relocation (bfd *abfd,
   asymbol *symbol;
 
   symbol = *(reloc_entry->sym_ptr_ptr);
-  if (bfd_is_abs_section (symbol->section)
-      && output_bfd != NULL)
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
-  /* PR 17512: file: 0f67f69d.  */
-  if (howto == NULL)
-    return bfd_reloc_undefined;
 
   /* If we are not producing relocatable output, return an error if
      the symbol is not defined.  An undefined weak symbol is
@@ -608,7 +598,7 @@ bfd_perform_relocation (bfd *abfd,
   /* If there is a function supplied to handle this relocation type,
      call it.  It'll return `bfd_reloc_continue' if further processing
      can be done.  */
-  if (howto->special_function)
+  if (howto && howto->special_function)
     {
       bfd_reloc_status_type cont;
       cont = howto->special_function (abfd, reloc_entry, symbol, data,
@@ -618,6 +608,17 @@ bfd_perform_relocation (bfd *abfd,
 	return cont;
     }
 
+  if (bfd_is_abs_section (symbol->section)
+      && output_bfd != NULL)
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+
+  /* PR 17512: file: 0f67f69d.  */
+  if (howto == NULL)
+    return bfd_reloc_undefined;
+
   /* Is the address of the relocation really within the section?
      Include the size of the reloc in the test for out of range addresses.
      PR 17512: file: c146ab8b, 46dff27f, 38e53ebf.  */
@@ -981,16 +982,11 @@ bfd_install_relocation (bfd *abfd,
   bfd_byte *data;
 
   symbol = *(reloc_entry->sym_ptr_ptr);
-  if (bfd_is_abs_section (symbol->section))
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
 
   /* If there is a function supplied to handle this relocation type,
      call it.  It'll return `bfd_reloc_continue' if further processing
      can be done.  */
-  if (howto->special_function)
+  if (howto && howto->special_function)
     {
       bfd_reloc_status_type cont;
 
@@ -1005,6 +1001,15 @@ bfd_install_relocation (bfd *abfd,
 	return cont;
     }
 
+  if (bfd_is_abs_section (symbol->section))
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+
+  /* No need to check for howto != NULL if !bfd_is_abs_section as
+     it will have been checked in `bfd_perform_relocation already'.  */
+
   /* Is the address of the relocation really within the section?  */
   octets = reloc_entry->address * bfd_octets_per_byte (abfd);
   if (octets + bfd_get_reloc_size (howto)
@@ -1375,7 +1380,8 @@ _bfd_final_link_relocate (reloc_howto_ty
     }
 
   return _bfd_relocate_contents (howto, input_bfd, relocation,
-				 contents + address);
+				 contents
+				 + address * bfd_octets_per_byte (input_bfd));
 }
 
 /* Relocate a given location using a given value and howto.  */
@@ -2304,6 +2310,11 @@ ENUMDOC
   microMIPS PC-relative relocations.
 
 ENUM
+  BFD_RELOC_MIPS16_16_PCREL_S1
+ENUMDOC
+  MIPS16 PC-relative relocation.
+
+ENUM
   BFD_RELOC_MIPS_21_PCREL_S2
 ENUMX
   BFD_RELOC_MIPS_26_PCREL_S2
@@ -2676,6 +2687,8 @@ ENUMX
   BFD_RELOC_386_TLS_DESC
 ENUMX
   BFD_RELOC_386_IRELATIVE
+ENUMX
+  BFD_RELOC_386_GOT32X
 ENUMDOC
   i386/elf relocations
 
@@ -2737,6 +2750,10 @@ ENUMX
   BFD_RELOC_X86_64_PC32_BND
 ENUMX
   BFD_RELOC_X86_64_PLT32_BND
+ENUMX
+  BFD_RELOC_X86_64_GOTPCRELX
+ENUMX
+  BFD_RELOC_X86_64_REX_GOTPCRELX
 ENUMDOC
   x86-64/elf relocations
 
@@ -2884,6 +2901,10 @@ ENUMX
 ENUMX
   BFD_RELOC_PPC_VLE_SDAREL_HA16D
 ENUMX
+  BFD_RELOC_PPC_16DX_HA
+ENUMX
+  BFD_RELOC_PPC_REL16DX_HA
+ENUMX
   BFD_RELOC_PPC64_HIGHER
 ENUMX
   BFD_RELOC_PPC64_HIGHER_S
@@ -2935,6 +2956,8 @@ ENUMX
   BFD_RELOC_PPC64_ADDR16_HIGHA
 ENUMX
   BFD_RELOC_PPC64_ADDR64_LOCAL
+ENUMX
+  BFD_RELOC_PPC64_ENTRY
 ENUMDOC
   Power(rs6000) and PowerPC relocations.
 
@@ -3262,6 +3285,17 @@ ENUMDOC
   ARM support for STT_GNU_IFUNC.
 
 ENUM
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC
+ENUMX
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC
+ENUMX
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC
+ENUMX
+  BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC
+ENUMDOC
+  Thumb1 relocations to support execute-only code.
+
+ENUM
   BFD_RELOC_ARM_IMMEDIATE
 ENUMX
   BFD_RELOC_ARM_ADRL_IMMEDIATE
@@ -3515,18 +3549,143 @@ ENUMDOC
   Renesas / SuperH SH relocs.  Not all of these appear in object files.
 
 ENUM
-  BFD_RELOC_ARC_B22_PCREL
+  BFD_RELOC_ARC_NONE
+ENUMX
+  BFD_RELOC_ARC_8
+ENUMX
+  BFD_RELOC_ARC_16
+ENUMX
+  BFD_RELOC_ARC_24
+ENUMX
+  BFD_RELOC_ARC_32
+ENUMX
+  BFD_RELOC_ARC_N8
+ENUMX
+  BFD_RELOC_ARC_N16
+ENUMX
+  BFD_RELOC_ARC_N24
+ENUMX
+  BFD_RELOC_ARC_N32
+ENUMX
+  BFD_RELOC_ARC_SDA
+ENUMX
+  BFD_RELOC_ARC_SECTOFF
+ENUMX
+  BFD_RELOC_ARC_S21H_PCREL
+ENUMX
+  BFD_RELOC_ARC_S21W_PCREL
+ENUMX
+  BFD_RELOC_ARC_S25H_PCREL
+ENUMX
+  BFD_RELOC_ARC_S25W_PCREL
+ENUMX
+  BFD_RELOC_ARC_SDA32
+ENUMX
+  BFD_RELOC_ARC_SDA_LDST
+ENUMX
+  BFD_RELOC_ARC_SDA_LDST1
+ENUMX
+  BFD_RELOC_ARC_SDA_LDST2
+ENUMX
+  BFD_RELOC_ARC_SDA16_LD
+ENUMX
+  BFD_RELOC_ARC_SDA16_LD1
+ENUMX
+  BFD_RELOC_ARC_SDA16_LD2
+ENUMX
+  BFD_RELOC_ARC_S13_PCREL
+ENUMX
+  BFD_RELOC_ARC_W
+ENUMX
+  BFD_RELOC_ARC_32_ME
+ENUMX
+  BFD_RELOC_ARC_32_ME_S
+ENUMX
+  BFD_RELOC_ARC_N32_ME
+ENUMX
+  BFD_RELOC_ARC_SECTOFF_ME
+ENUMX
+  BFD_RELOC_ARC_SDA32_ME
+ENUMX
+  BFD_RELOC_ARC_W_ME
+ENUMX
+  BFD_RELOC_AC_SECTOFF_U8
+ENUMX
+  BFD_RELOC_AC_SECTOFF_U8_1
+ENUMX
+  BFD_RELOC_AC_SECTOFF_U8_2
+ENUMX
+  BFD_RELOC_AC_SECTOFF_S9
+ENUMX
+  BFD_RELOC_AC_SECTOFF_S9_1
+ENUMX
+  BFD_RELOC_AC_SECTOFF_S9_2
+ENUMX
+  BFD_RELOC_ARC_SECTOFF_ME_1
+ENUMX
+  BFD_RELOC_ARC_SECTOFF_ME_2
+ENUMX
+  BFD_RELOC_ARC_SECTOFF_1
+ENUMX
+  BFD_RELOC_ARC_SECTOFF_2
+ENUMX
+  BFD_RELOC_ARC_SDA_12
+ENUMX
+  BFD_RELOC_ARC_SDA16_ST2
+ENUMX
+  BFD_RELOC_ARC_32_PCREL
+ENUMX
+  BFD_RELOC_ARC_PC32
+ENUMX
+  BFD_RELOC_ARC_GOT32
+ENUMX
+  BFD_RELOC_ARC_GOTPC32
+ENUMX
+  BFD_RELOC_ARC_PLT32
+ENUMX
+  BFD_RELOC_ARC_COPY
+ENUMX
+  BFD_RELOC_ARC_GLOB_DAT
+ENUMX
+  BFD_RELOC_ARC_JMP_SLOT
+ENUMX
+  BFD_RELOC_ARC_RELATIVE
+ENUMX
+  BFD_RELOC_ARC_GOTOFF
+ENUMX
+  BFD_RELOC_ARC_GOTPC
+ENUMX
+  BFD_RELOC_ARC_S21W_PCREL_PLT
+ENUMX
+  BFD_RELOC_ARC_S25H_PCREL_PLT
+ENUMX
+  BFD_RELOC_ARC_TLS_DTPMOD
+ENUMX
+  BFD_RELOC_ARC_TLS_TPOFF
+ENUMX
+  BFD_RELOC_ARC_TLS_GD_GOT
+ENUMX
+  BFD_RELOC_ARC_TLS_GD_LD
+ENUMX
+  BFD_RELOC_ARC_TLS_GD_CALL
+ENUMX
+  BFD_RELOC_ARC_TLS_IE_GOT
+ENUMX
+  BFD_RELOC_ARC_TLS_DTPOFF
+ENUMX
+  BFD_RELOC_ARC_TLS_DTPOFF_S9
+ENUMX
+  BFD_RELOC_ARC_TLS_LE_S9
+ENUMX
+  BFD_RELOC_ARC_TLS_LE_32
+ENUMX
+  BFD_RELOC_ARC_S25W_PCREL_PLT
+ENUMX
+  BFD_RELOC_ARC_S21H_PCREL_PLT
+ENUMX
+  BFD_RELOC_ARC_NPS_CMEM16
 ENUMDOC
-  ARC Cores relocs.
-  ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
-  not stored in the instruction.  The high 20 bits are installed in bits 26
-  through 7 of the instruction.
-ENUM
-  BFD_RELOC_ARC_B26
-ENUMDOC
-  ARC 26 bit absolute branch.  The lowest two bits must be zero and are not
-  stored in the instruction.  The high 24 bits are installed in bits 23
-  through 0.
+  ARC relocs.
 
 ENUM
   BFD_RELOC_BFIN_16_IMM
@@ -4890,6 +5049,104 @@ ENUM
 ENUMDOC
   This is a 5 bit reloc for the AVR that stores an I/O register
   number for the SBIC, SBIS, SBI and CBI instructions
+
+ENUM
+  BFD_RELOC_RISCV_HI20
+ENUMX
+  BFD_RELOC_RISCV_PCREL_HI20
+ENUMX
+  BFD_RELOC_RISCV_PCREL_LO12_I
+ENUMX
+  BFD_RELOC_RISCV_PCREL_LO12_S
+ENUMX
+  BFD_RELOC_RISCV_LO12_I
+ENUMX
+  BFD_RELOC_RISCV_LO12_S
+ENUMX
+  BFD_RELOC_RISCV_GPREL12_I
+ENUMX
+  BFD_RELOC_RISCV_GPREL12_S
+ENUMX
+  BFD_RELOC_RISCV_TPREL_HI20
+ENUMX
+  BFD_RELOC_RISCV_TPREL_LO12_I
+ENUMX
+  BFD_RELOC_RISCV_TPREL_LO12_S
+ENUMX
+  BFD_RELOC_RISCV_TPREL_ADD
+ENUMX
+  BFD_RELOC_RISCV_CALL
+ENUMX
+  BFD_RELOC_RISCV_CALL_PLT
+ENUMX
+  BFD_RELOC_RISCV_ADD8
+ENUMX
+  BFD_RELOC_RISCV_ADD16
+ENUMX
+  BFD_RELOC_RISCV_ADD32
+ENUMX
+  BFD_RELOC_RISCV_ADD64
+ENUMX
+  BFD_RELOC_RISCV_SUB8
+ENUMX
+  BFD_RELOC_RISCV_SUB16
+ENUMX
+  BFD_RELOC_RISCV_SUB32
+ENUMX
+  BFD_RELOC_RISCV_SUB64
+ENUMX
+  BFD_RELOC_RISCV_GOT_HI20
+ENUMX
+  BFD_RELOC_RISCV_TLS_GOT_HI20
+ENUMX
+  BFD_RELOC_RISCV_TLS_GD_HI20
+ENUMX
+  BFD_RELOC_RISCV_JMP
+ENUMX
+  BFD_RELOC_RISCV_TLS_DTPMOD32
+ENUMX
+  BFD_RELOC_RISCV_TLS_DTPREL32
+ENUMX
+  BFD_RELOC_RISCV_TLS_DTPMOD64
+ENUMX
+  BFD_RELOC_RISCV_TLS_DTPREL64
+ENUMX
+  BFD_RELOC_RISCV_TLS_TPREL32
+ENUMX
+  BFD_RELOC_RISCV_TLS_TPREL64
+ENUMX
+  BFD_RELOC_RISCV_ALIGN
+ENUMX
+  BFD_RELOC_RISCV_RVC_BRANCH
+ENUMX
+  BFD_RELOC_RISCV_RVC_JUMP
+ENUMX
+  BFD_RELOC_RISCV_RVC_LUI
+ENUMX
+  BFD_RELOC_RISCV_GPREL_I
+ENUMX
+  BFD_RELOC_RISCV_GPREL_S
+ENUMX
+  BFD_RELOC_RISCV_TPREL_I
+ENUMX
+  BFD_RELOC_RISCV_TPREL_S
+ENUMX
+  BFD_RELOC_RISCV_RELAX
+ENUMX
+  BFD_RELOC_RISCV_CFA
+ENUMX
+  BFD_RELOC_RISCV_SUB6
+ENUMX
+  BFD_RELOC_RISCV_SET6
+ENUMX
+  BFD_RELOC_RISCV_SET8
+ENUMX
+  BFD_RELOC_RISCV_SET16
+ENUMX
+  BFD_RELOC_RISCV_SET32
+ENUMDOC
+  RISC-V relocations.
+
 ENUM
   BFD_RELOC_RL78_NEG8
 ENUMX
@@ -6262,6 +6519,54 @@ ENUMDOC
   Relocations used by the Altera Nios II core.
 
 ENUM
+  BFD_RELOC_PRU_U16
+ENUMDOC
+  PRU LDI 16-bit unsigned data-memory relocation.
+ENUM
+  BFD_RELOC_PRU_U16_PMEMIMM
+ENUMDOC
+  PRU LDI 16-bit unsigned instruction-memory relocation.
+ENUM
+  BFD_RELOC_PRU_LDI32
+ENUMDOC
+  PRU relocation for two consecutive LDI load instructions that load a
+  32 bit value into a register. If the higher bits are all zero, then
+  the second instruction may be relaxed.
+ENUM
+  BFD_RELOC_PRU_S10_PCREL
+ENUMDOC
+  PRU QBBx 10-bit signed PC-relative relocation.
+ENUM
+  BFD_RELOC_PRU_U8_PCREL
+ENUMDOC
+  PRU 8-bit unsigned relocation used for the LOOP instruction.
+ENUM
+  BFD_RELOC_PRU_32_PMEM
+ENUMX
+  BFD_RELOC_PRU_16_PMEM
+ENUMDOC
+  PRU Program Memory relocations.  Used to convert from byte addressing to
+  32-bit word addressing.
+ENUM
+  BFD_RELOC_PRU_GNU_DIFF8
+ENUMX
+  BFD_RELOC_PRU_GNU_DIFF16
+ENUMX
+  BFD_RELOC_PRU_GNU_DIFF32
+ENUMX
+  BFD_RELOC_PRU_GNU_DIFF16_PMEM
+ENUMX
+  BFD_RELOC_PRU_GNU_DIFF32_PMEM
+ENUMDOC
+  PRU relocations to mark the difference of two local symbols.
+  These are only needed to support linker relaxation and can be ignored
+  when not relaxing.  The field is set to the value of the difference
+  assuming no relaxation.  The relocation encodes the position of the
+  second symbol so the linker can determine whether to adjust the field
+  value. The PMEM variants encode the word difference, instead of byte
+  difference between symbols.
+
+ENUM
   BFD_RELOC_IQ2000_OFFSET_16
 ENUMX
   BFD_RELOC_IQ2000_OFFSET_21
@@ -6461,6 +6766,14 @@ ENUM
   BFD_RELOC_MACH_O_PAIR
 ENUMDOC
   Pair of relocation.  Contains the first symbol.
+ENUM
+  BFD_RELOC_MACH_O_SUBTRACTOR32
+ENUMDOC
+  Symbol will be substracted.  Must be followed by a BFD_RELOC_32.
+ENUM
+  BFD_RELOC_MACH_O_SUBTRACTOR64
+ENUMDOC
+  Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
 
 ENUM
   BFD_RELOC_MACH_O_X86_64_BRANCH32
@@ -6479,14 +6792,6 @@ ENUMDOC
   Used when loading a GOT entry with movq.  It is specially marked so that
   the linker could optimize the movq to a leaq if possible.
 ENUM
-  BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32
-ENUMDOC
-  Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-ENUM
-  BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64
-ENUMDOC
-  Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
-ENUM
   BFD_RELOC_MACH_O_X86_64_PCREL32_1
 ENUMDOC
   Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.
@@ -6499,6 +6804,24 @@ ENUM
 ENUMDOC
   Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
 
+
+ENUM
+  BFD_RELOC_MACH_O_ARM64_ADDEND
+ENUMDOC
+  Addend for PAGE or PAGEOFF.
+ENUM
+  BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21
+ENUMDOC
+  Relative offset to page of GOT slot.
+ENUM
+  BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12
+ENUMDOC
+  Relative offset within page of GOT slot.
+ENUM
+  BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT
+ENUMDOC
+  Address of a GOT entry.
+
 ENUM
   BFD_RELOC_MICROBLAZE_32_LO
 ENUMDOC
@@ -6613,6 +6936,10 @@ ENUMDOC
   important as several tables in the AArch64 bfd backend are indexed
   by these enumerators; make sure they are all synced.
 ENUM
+  BFD_RELOC_AARCH64_NULL
+ENUMDOC
+  Deprecated AArch64 null relocation code.
+ENUM
   BFD_RELOC_AARCH64_NONE
 ENUMDOC
   AArch64 null relocation code.
@@ -6789,11 +7116,21 @@ ENUMDOC
   Unsigned 12 bit byte offset for 32 bit load/store from the page of
   the GOT entry for this symbol.  Used in conjunction with
   BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in ILP32 ABI only.
+ ENUM
+  BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
+ENUMDOC
+  Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
+  for this symbol.  Valid in LP64 ABI only.
+ENUM
+  BFD_RELOC_AARCH64_MOVW_GOTOFF_G1
+ENUMDOC
+  Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
+  for this symbol.  Valid in LP64 ABI only.
 ENUM
   BFD_RELOC_AARCH64_LD64_GOTOFF_LO15
 ENUMDOC
   Unsigned 15 bit byte offset for 64 bit load/store from the page of
-  the GOT entry for this symbol. Valid in ILP64 ABI only.
+  the GOT entry for this symbol.  Valid in LP64 ABI only.
 ENUM
   BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14
 ENUMDOC
@@ -6820,13 +7157,13 @@ ENUMDOC
   tls_index structure.  Used in conjunction with
   BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.
 ENUM
-  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
+  BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC
 ENUMDOC
-  AArch64 TLS INITIAL EXEC relocation.
+  AArch64 TLS General Dynamic relocation.
 ENUM
-  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
+  BFD_RELOC_AARCH64_TLSGD_MOVW_G1
 ENUMDOC
-  AArch64 TLS INITIAL EXEC relocation.
+  AArch64 TLS General Dynamic relocation.
 ENUM
   BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
 ENUMDOC
@@ -6844,6 +7181,97 @@ ENUM
 ENUMDOC
   AArch64 TLS INITIAL EXEC relocation.
 ENUM
+  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
+ENUMDOC
+  AArch64 TLS INITIAL EXEC relocation.
+ENUM
+  BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
+ENUMDOC
+  AArch64 TLS INITIAL EXEC relocation.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
+ENUMDOC
+  bit[23:12] of byte offset to module TLS base address.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
+ENUMDOC
+  Unsigned 12 bit byte offset to module TLS base address.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
+ENUMDOC
+  No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
+ENUMDOC
+  Unsigned 12 bit byte offset to global offset table entry for a symbols
+  tls_index structure.  Used in conjunction with
+  BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
+ENUMDOC
+  GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
+  instruction.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
+ENUMDOC
+  GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12
+ENUMDOC
+  bit[11:1] of byte offset to module TLS base address, encoded in ldst
+  instructions.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
+ENUMDOC
+  Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12
+ENUMDOC
+  bit[11:2] of byte offset to module TLS base address, encoded in ldst
+  instructions.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
+ENUMDOC
+  Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12
+ENUMDOC
+  bit[11:3] of byte offset to module TLS base address, encoded in ldst
+  instructions.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
+ENUMDOC
+  Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12
+ENUMDOC
+  bit[11:0] of byte offset to module TLS base address, encoded in ldst
+  instructions.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
+ENUMDOC
+  Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+ENUMDOC
+  bit[15:0] of byte offset to module TLS base address.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
+ENUMDOC
+  No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+ENUMDOC
+  bit[31:16] of byte offset to module TLS base address.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
+ENUMDOC
+  No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2
+ENUMDOC
+  bit[47:32] of byte offset to module TLS base address.
+ENUM
   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
 ENUMDOC
   AArch64 TLS LOCAL EXEC relocation.
@@ -6974,6 +7402,16 @@ ENUMDOC
   AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
 ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12
+ENUMDOC
+  AArch64 pseudo relocation code for TLS local dynamic mode.  It's to be
+  used internally by the AArch64 assembler and not (currently) written to
+  any object files.
+ENUM
+  BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC
+ENUMDOC
+  Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check.
+ENUM
   BFD_RELOC_AARCH64_LD_GOT_LO12_NC
 ENUMDOC
   AArch64 pseudo relocation code to be used internally by the AArch64
@@ -6988,7 +7426,6 @@ ENUM
 ENUMDOC
   AArch64 pseudo relocation code to be used internally by the AArch64
   assembler and not (currently) written to any object files.
-
 ENUM
   BFD_RELOC_TILEPRO_COPY
 ENUMX
@@ -7481,13 +7918,16 @@ bfd_default_reloc_type_lookup (bfd *abfd
 	{
 	case 64:
 	  BFD_FAIL ();
+	  break;
 	case 32:
 	  return &bfd_howto_32;
 	case 16:
 	  BFD_FAIL ();
+	  break;
 	default:
 	  BFD_FAIL ();
 	}
+      break;
     default:
       BFD_FAIL ();
     }
@@ -7536,7 +7976,7 @@ bfd_generic_relax_section (bfd *abfd ATT
 			   struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			   bfd_boolean *again)
 {
-  if (link_info->relocatable)
+  if (bfd_link_relocatable (link_info))
     (*link_info->callbacks->einfo)
       (_("%P%F: --relax and -r may not be used together\n"));
 
@@ -7585,7 +8025,7 @@ bfd_generic_lookup_section_flags (struct
 {
   if (flaginfo != NULL)
     {
-      (*_bfd_error_handler) (_("INPUT_SECTION_FLAGS are not supported.\n"));
+      _bfd_error_handler (_("INPUT_SECTION_FLAGS are not supported.\n"));
       return FALSE;
     }
   return TRUE;
@@ -7669,6 +8109,7 @@ bfd_generic_get_relocated_section_conten
   if (reloc_count > 0)
     {
       arelent **parent;
+
       for (parent = reloc_vector; *parent != NULL; parent++)
 	{
 	  char *error_message = NULL;
@@ -7676,6 +8117,17 @@ bfd_generic_get_relocated_section_conten
 	  bfd_reloc_status_type r;
 
 	  symbol = *(*parent)->sym_ptr_ptr;
+	  /* PR ld/19628: A specially crafted input file
+	     can result in a NULL symbol pointer here.  */
+	  if (symbol == NULL)
+	    {
+	      link_info->callbacks->einfo
+		/* xgettext:c-format */
+		(_("%X%P: %B(%A): error: relocation for offset %V has no value\n"),
+		 abfd, input_section, (* parent)->address);
+	      goto error_return;
+	    }
+
 	  if (symbol->section && discarded_section (symbol->section))
 	    {
 	      bfd_byte *p;
@@ -7713,26 +8165,22 @@ bfd_generic_get_relocated_section_conten
 	      switch (r)
 		{
 		case bfd_reloc_undefined:
-		  if (!((*link_info->callbacks->undefined_symbol)
-			(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 input_bfd, input_section, (*parent)->address,
-			 TRUE)))
-		    goto error_return;
+		  (*link_info->callbacks->undefined_symbol)
+		    (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     input_bfd, input_section, (*parent)->address, TRUE);
 		  break;
 		case bfd_reloc_dangerous:
 		  BFD_ASSERT (error_message != NULL);
-		  if (!((*link_info->callbacks->reloc_dangerous)
-			(link_info, error_message, input_bfd, input_section,
-			 (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_dangerous)
+		    (link_info, error_message,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_overflow:
-		  if (!((*link_info->callbacks->reloc_overflow)
-			(link_info, NULL,
-			 bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
-			 (*parent)->howto->name, (*parent)->addend,
-			 input_bfd, input_section, (*parent)->address)))
-		    goto error_return;
+		  (*link_info->callbacks->reloc_overflow)
+		    (link_info, NULL,
+		     bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+		     (*parent)->howto->name, (*parent)->addend,
+		     input_bfd, input_section, (*parent)->address);
 		  break;
 		case bfd_reloc_outofrange:
 		  /* PR ld/13730:
@@ -7740,6 +8188,7 @@ bfd_generic_get_relocated_section_conten
 		     complete binaries.  Do not abort, but issue an error
 		     message instead.  */
 		  link_info->callbacks->einfo
+		    /* xgettext:c-format */
 		    (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"),
 		     abfd, input_section, * parent);
 		  goto error_return;
@@ -7749,6 +8198,7 @@ bfd_generic_get_relocated_section_conten
 		     This error can result when processing a corrupt binary.
 		     Do not abort.  Issue an error message instead.  */
 		  link_info->callbacks->einfo
+		    /* xgettext:c-format */
 		    (_("%X%P: %B(%A): relocation \"%R\" is not supported\n"),
 		     abfd, input_section, * parent);
 		  goto error_return;
@@ -7757,6 +8207,7 @@ bfd_generic_get_relocated_section_conten
 		  /* PR 17512; file: 90c2a92e.
 		     Report unexpected results, without aborting.  */
 		  link_info->callbacks->einfo
+		    /* xgettext:c-format */
 		    (_("%X%P: %B(%A): relocation \"%R\" returns an unrecognized value %x\n"),
 		     abfd, input_section, * parent, r);
 		  break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/riscix.c ./bfd/riscix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/riscix.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/riscix.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for RISC iX (Acorn, arm) binaries.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -63,11 +63,11 @@
 /* Sl which uses another.  */
 #define SLPZMAGIC       (MF_USES_SL | SLZMAGIC)
 
-#define N_SHARED_LIB(x) ((x).a_info & MF_USES_SL)
+#define N_SHARED_LIB(x) ((x)->a_info & MF_USES_SL)
 
 /* Only a pure OMAGIC file has the minimal header.  */
 #define N_TXTOFF(x)		\
- ((x).a_info == OMAGIC		\
+ ((x)->a_info == OMAGIC		\
   ? 32				\
   : (N_MAGIC(x) == ZMAGIC	\
      ? TARGET_PAGE_SIZE		\
@@ -81,13 +81,13 @@
       up we can't know exactly what the address will be.  A reasonable guess \
       is that a_entry will be in the first page of the executable.  */	     \
    : (N_SHARED_LIB(x)							     \
-      ? ((x).a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))		     \
+      ? ((x)->a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))		     \
       : (bfd_vma) TEXT_START_ADDR))
 
 #define N_SYMOFF(x) \
-  (N_TXTOFF (x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize)
+  (N_TXTOFF (x) + (x)->a_text + (x)->a_data + (x)->a_trsize + (x)->a_drsize)
 
-#define N_STROFF(x) (N_SYMOFF (x) + (x).a_syms)
+#define N_STROFF(x) (N_SYMOFF (x) + (x)->a_syms)
 
 #define TEXT_START_ADDR   32768
 #define TARGET_PAGE_SIZE  32768
@@ -99,10 +99,10 @@
    the tokens.  */
 #define MY(OP) CONCAT2 (arm_aout_riscix_,OP)
 #define TARGETNAME "a.out-riscix"
-#define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) \
-                  && (((x).a_info & ~006000) != OMAGIC) \
-                  && ((x).a_info != NMAGIC))
-#define N_MAGIC(x) ((x).a_info & ~07200)
+#define N_BADMAG(x) ((((x)->a_info & ~007200) != ZMAGIC) \
+                  && (((x)->a_info & ~006000) != OMAGIC) \
+                  && ((x)->a_info != NMAGIC))
+#define N_MAGIC(x) ((x)->a_info & ~07200)
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -110,11 +110,8 @@
 
 #define WRITE_HEADERS(abfd, execp)					    \
   {									    \
-    bfd_size_type text_size; /* Dummy vars.  */				    \
-    file_ptr text_end;							    \
-    									    \
     if (adata (abfd).magic == undecided_magic)				    \
-      NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);   \
+      NAME (aout, adjust_sizes_and_vmas) (abfd);			    \
     									    \
     execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;	    \
     execp->a_entry = bfd_get_start_address (abfd);			    \
@@ -134,18 +131,18 @@
     if (bfd_get_outsymbols (abfd) != NULL			    	    \
 	&& bfd_get_symcount (abfd) != 0)				    \
       {									    \
-	if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (* execp)), SEEK_SET) != 0)\
+	if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)  \
 	  return FALSE;							    \
 									    \
 	if (! NAME (aout, write_syms) (abfd))				    \
           return FALSE;							    \
 									    \
-	if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (* execp)), SEEK_SET) != 0)\
+	if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0) \
 	  return FALSE;							    \
 									    \
 	if (! riscix_squirt_out_relocs (abfd, obj_textsec (abfd)))	    \
 	  return FALSE;							    \
-	if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (* execp)), SEEK_SET) != 0)\
+	if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0) \
 	  return FALSE;							    \
 									    \
 	if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))	    \
@@ -517,7 +514,7 @@ riscix_some_aout_object_p (bfd *abfd,
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC(*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
  /* Squeezed files aren't supported (yet)!  */
@@ -532,17 +529,17 @@ riscix_some_aout_object_p (bfd *abfd,
       bfd_set_error (bfd_error_wrong_format);
       return NULL;
     }
-  else if (N_MAGIC (*execp) == ZMAGIC)
+  else if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC)
     adata (abfd).magic = o_magic;
   else
     /* Should have been checked with N_BADMAG before this routine
@@ -637,11 +634,11 @@ MY (object_p) (bfd *abfd)
 
   exec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return NULL;
 
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return NULL;
 #endif
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/rs6000-core.c ./bfd/rs6000-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/rs6000-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/rs6000-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM RS/6000 "XCOFF" back-end for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
    Contributed by IBM Corporation and Cygnus Support.
@@ -55,9 +55,7 @@
 
 #undef	SCNHDR
 
-/* ------------------------------------------------------------------------ */
-/*	Support for core file stuff..					    */
-/* ------------------------------------------------------------------------ */
+/* Support for core file stuff.  */
 
 #include <sys/user.h>
 #define __LDINFO_PTRACE32__	/* for __ld_info32 */
@@ -91,8 +89,9 @@ typedef unsigned long ptr_to_uint;
 
 /* Union of 32-bit and 64-bit versions of ld_info.  */
 
-typedef union {
-#ifdef __ld_info32
+typedef union
+{
+#if defined (__ld_info32) || defined (__ld_info64)
   struct __ld_info32 l32;
   struct __ld_info64 l64;
 #else
@@ -103,33 +102,43 @@ typedef union {
 
 /* Union of old and new core dump structures.  */
 
-typedef union {
+typedef union
+{
 #ifdef AIX_CORE_DUMPX_CORE
-  struct core_dumpx new_dump;	/* new AIX 4.3+ core dump */
+  struct core_dumpx new_dump;	/* New AIX 4.3+ core dump.  */
 #else
-  struct core_dump new_dump;		/* for simpler coding */
+  struct core_dump new_dump;	/* For simpler coding.  */
+#endif
+#ifndef BFD64                   /* Use old only if gdb is 32-bit.  */
+  struct core_dump old;		/* Old AIX 4.2- core dump, still used on
+				   4.3+ with appropriate SMIT config.  */
 #endif
-  struct core_dump old;		/* old AIX 4.2- core dump, still used on
-				   4.3+ with appropriate SMIT config */
 } CoreHdr;
 
 /* Union of old and new vm_info structures.  */
 
 #ifdef CORE_VERSION_1
-typedef union {
+typedef union
+{
 #ifdef AIX_CORE_DUMPX_CORE
   struct vm_infox new_dump;
 #else
   struct vm_info new_dump;
 #endif
+#ifndef BFD64
   struct vm_info old;
+#endif
 } VmInfo;
 #endif
 
 /* Return whether CoreHdr C is in new or old format.  */
 
 #ifdef AIX_CORE_DUMPX_CORE
-# define CORE_NEW(c)	(!(c).old.c_entries)
+# ifndef BFD64
+#  define CORE_NEW(c)        (!(c).old.c_entries)
+# else
+#  define CORE_NEW(c)   (!(c).new_dump.c_entries)
+# endif
 #else
 # define CORE_NEW(c)	0
 #endif
@@ -258,9 +267,13 @@ typedef union {
 
 /* Size of the leading portion that old and new core dump structures have in
    common.  */
-#define CORE_COMMONSZ	((int) &((struct core_dump *) 0)->c_entries \
-			 + sizeof (((struct core_dump *) 0)->c_entries))
-
+#ifdef AIX_CORE_DUMPX_CORE
+#define CORE_COMMONSZ  ((long) &((struct core_dumpx *) 0)->c_entries \
+                        + sizeof (((struct core_dumpx *) 0)->c_entries))
+#else
+#define CORE_COMMONSZ   ((int) &((struct core_dump *) 0)->c_entries \
+                       + sizeof (((struct core_dump *) 0)->c_entries)
+#endif
 /* Define prototypes for certain functions, to avoid a compiler warning
    saying that they are missing.  */
 
@@ -290,8 +303,10 @@ read_hdr (bfd *abfd, CoreHdr *core)
   /* Read the trailing portion of the structure.  */
   if (CORE_NEW (*core))
     size = sizeof (core->new_dump);
+#ifndef BFD64
   else
     size = sizeof (core->old);
+#endif
   size -= CORE_COMMONSZ;
   return bfd_bread ((char *) core + CORE_COMMONSZ, size, abfd) == size;
 }
@@ -356,6 +371,7 @@ rs6000coff_core_p (bfd *abfd)
       c_stackend = CNEW_STACKORG (core.new_dump) + c_size;
       c_lsize = CNEW_LSIZE (core.new_dump);
       c_loader = CNEW_LOADER (core.new_dump);
+#ifndef BFD64
       proc64 = CNEW_PROC64 (core.new_dump);
     }
   else
@@ -366,6 +382,7 @@ rs6000coff_core_p (bfd *abfd)
       c_stackend = COLD_STACKEND;
       c_lsize = 0x7ffffff;
       c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old);
+#endif
       proc64 = 0;
     }
 
@@ -379,11 +396,13 @@ rs6000coff_core_p (bfd *abfd)
       c_regsize = sizeof (CNEW_MSTSAVE (core.new_dump));
       c_regptr = &CNEW_MSTSAVE (core.new_dump);
     }
+#ifndef BFD64
   else
     {
       c_regsize = sizeof (COLD_MSTSAVE (core.old));
       c_regptr = &COLD_MSTSAVE (core.old);
     }
+#endif
   c_regoff = (char *) c_regptr - (char *) &core;
 
   if (bfd_stat (abfd, &statbuf) < 0)
@@ -433,9 +452,15 @@ rs6000coff_core_p (bfd *abfd)
     }
 
   /* Sanity check on the c_tab field.  */
-  if (!CORE_NEW (core) && (c_loader < (file_ptr) sizeof core.old ||
-			   c_loader >= statbuf.st_size ||
-			   c_loader >= c_stack))
+  if (!CORE_NEW (core)
+      && (
+#ifndef BFD64
+	  c_loader < (file_ptr) sizeof core.old
+#else
+	  c_loader < (file_ptr) sizeof core.new_dump
+#endif
+	  || c_loader >= statbuf.st_size
+	  || c_loader >= c_stack))
     {
       bfd_set_error (bfd_error_wrong_format);
       return NULL;
@@ -443,11 +468,15 @@ rs6000coff_core_p (bfd *abfd)
 
   /* Issue warning if the core file was truncated during writing.  */
   if (c_flag & CORE_TRUNC)
-    (*_bfd_error_handler) (_("%s: warning core file truncated"),
-			   bfd_get_filename (abfd));
+    _bfd_error_handler (_("%s: warning core file truncated"),
+			bfd_get_filename (abfd));
 
   /* Allocate core file header.  */
+#ifndef BFD64
   size = CORE_NEW (core) ? sizeof (core.new_dump) : sizeof (core.old);
+#else
+  size =  sizeof (core.new_dump);
+#endif
   tmpptr = (char *) bfd_zalloc (abfd, (bfd_size_type) size);
   if (!tmpptr)
     return NULL;
@@ -528,6 +557,7 @@ rs6000coff_core_p (bfd *abfd)
     file_ptr ldi_core;
     uint ldi_next;
     bfd_vma ldi_dataorg;
+    bfd_vma core_dataorg;
 
     /* Fields from new and old core structures.  */
     bfd_size_type c_datasize, c_vmregions;
@@ -540,6 +570,7 @@ rs6000coff_core_p (bfd *abfd)
 	c_vmregions = core.new_dump.c_vmregions;
 	c_vmm = (file_ptr) core.new_dump.c_vmm;
       }
+#ifndef BFD64
     else
       {
 	c_datasize = core.old.c_datasize;
@@ -547,23 +578,32 @@ rs6000coff_core_p (bfd *abfd)
 	c_vmregions = core.old.c_vmregions;
 	c_vmm = (file_ptr) (ptr_to_uint) core.old.c_vmm;
       }
+#endif
 
     /* .data section from executable.  */
     if (c_datasize)
       {
+	/* If Large Memory Model is used, then the .data segment should start from
+	   BDATAORG which has been defined in the system header files. */
+
+        if (c_flag & CORE_BIGDATA)
+          core_dataorg = BDATAORG;
+        else
+          core_dataorg = CDATA_ADDR (c_datasize);
+
 	if (!make_bfd_asection (abfd, ".data",
 				SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
 				c_datasize,
-				(bfd_vma) CDATA_ADDR (c_datasize),
+				(bfd_vma) core_dataorg,
 				c_data))
 	  goto fail;
       }
 
     /* .data sections from loaded objects.  */
     if (proc64)
-      size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
+      size = (unsigned long) ((LdInfo *) 0)->l64.ldinfo_filename;
     else
-      size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
+      size = (unsigned long) ((LdInfo *) 0)->l32.ldinfo_filename;
 
     while (1)
       {
@@ -613,7 +653,11 @@ rs6000coff_core_p (bfd *abfd)
 	    file_ptr vminfo_offset;
 	    bfd_vma vminfo_addr;
 
+#ifndef BFD64
 	    size = CORE_NEW (core) ? sizeof (vminfo.new_dump) : sizeof (vminfo.old);
+#else
+            size = sizeof (vminfo.new_dump);
+#endif
 	    if (bfd_bread (&vminfo, size, abfd) != size)
 	      goto fail;
 
@@ -623,12 +667,14 @@ rs6000coff_core_p (bfd *abfd)
 		vminfo_size = vminfo.new_dump.vminfo_size;
 		vminfo_offset = vminfo.new_dump.vminfo_offset;
 	      }
+#ifndef BFD64
 	    else
 	      {
 		vminfo_addr = (bfd_vma) (ptr_to_uint) vminfo.old.vminfo_addr;
 		vminfo_size = vminfo.old.vminfo_size;
 		vminfo_offset = vminfo.old.vminfo_offset;
 	      }
+#endif
 
 	    if (vminfo_offset)
 	      if (!make_bfd_asection (abfd, ".vmdata",
@@ -668,8 +714,10 @@ rs6000coff_core_file_matches_executable_
 
   if (CORE_NEW (core))
     c_loader = CNEW_LOADER (core.new_dump);
+#ifndef BFD64
   else
     c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old);
+#endif
 
   if (CORE_NEW (core) && CNEW_PROC64 (core.new_dump))
     size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
@@ -732,8 +780,12 @@ char *
 rs6000coff_core_file_failing_command (bfd *abfd)
 {
   CoreHdr *core = core_hdr (abfd);
+#ifndef BFD64
   char *com = CORE_NEW (*core) ?
     CNEW_COMM (core->new_dump) : COLD_COMM (core->old);
+#else
+  char *com = CNEW_COMM (core->new_dump);
+#endif
 
   if (*com)
     return com;
@@ -745,7 +797,11 @@ int
 rs6000coff_core_file_failing_signal (bfd *abfd)
 {
   CoreHdr *core = core_hdr (abfd);
+#ifndef BFD64
   return CORE_NEW (*core) ? core->new_dump.c_signo : core->old.c_signo;
+#else
+  return  core->new_dump.c_signo;
+#endif
 }
 
 #endif /* AIX_CORE */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sco5-core.c ./bfd/sco5-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sco5-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sco5-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back end for SCO5 core files (U-area and raw sections)
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Written by Jouke Numan <jnuman@hiscom.nl>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -286,8 +286,8 @@ sco5_core_file_p (bfd *abfd)
 	  secname = NULL;	/* Ignore these */
 	  break;
 	default:
-	  (*_bfd_error_handler) ("Unhandled SCO core file section type %d\n",
-				 chead.cs_stype);
+	  _bfd_error_handler ("Unhandled SCO core file section type %d\n",
+			      chead.cs_stype);
 	  continue;
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/section.c ./bfd/section.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/section.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/section.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Object file "section" support for the BFD library.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -155,10 +155,10 @@ CODE_FRAGMENT
 .  const char *name;
 .
 .  {* A unique sequence number.  *}
-.  int id;
+.  unsigned int id;
 .
 .  {* Which section in the bfd; 0..n-1 as sections are created in a bfd.  *}
-.  int index;
+.  unsigned int index;
 .
 .  {* The next section in the list belonging to the BFD, or NULL.  *}
 .  struct bfd_section *next;
@@ -361,6 +361,9 @@ CODE_FRAGMENT
 .     when memory read flag isn't set. *}
 .#define SEC_COFF_NOREAD 0x40000000
 .
+.  {* Indicate that section has the purecode flag set.  *}
+.#define SEC_ELF_PURECODE 0x80000000
+.
 .  {*  End of section flags.  *}
 .
 .  {* Some internal packed boolean fields.  *}
@@ -427,7 +430,7 @@ CODE_FRAGMENT
 .      information.  *}
 .  bfd_vma lma;
 .
-.  {* The size of the section in octets, as it will be output.
+.  {* The size of the section in *octets*, as it will be output.
 .     Contains a value even if the section has no contents (e.g., the
 .     size of <<.bss>>).  *}
 .  bfd_size_type size;
@@ -697,9 +700,9 @@ CODE_FRAGMENT
 .#define bfd_section_removed_from_list(ABFD, S) \
 .  ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
 .
-.#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)			\
+.#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)			\
 .  {* name, id,  index, next, prev, flags, user_set_vma,            *}	\
-.  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,				\
+.  {  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,				\
 .									\
 .  {* linker_mark, linker_has_input, gc_mark, decompress_status,    *}	\
 .     0,           0,                1,       0,			\
@@ -761,7 +764,7 @@ static const asymbol global_syms[] =
 };
 
 #define STD_SECTION(NAME, IDX, FLAGS) \
-  BFD_FAKE_SECTION(_bfd_std_section[IDX], FLAGS, &global_syms[IDX], NAME, IDX)
+  BFD_FAKE_SECTION(_bfd_std_section[IDX], &global_syms[IDX], NAME, IDX, FLAGS)
 
 asection _bfd_std_section[] = {
   STD_SECTION (BFD_COM_SECTION_NAME, 0, SEC_IS_COMMON),
@@ -821,13 +824,13 @@ _bfd_generic_new_section_hook (bfd *abfd
   return TRUE;
 }
 
+static unsigned int section_id = 0x10;  /* id 0 to 3 used by STD_SECTION.  */
+
 /* Initializes a new section.  NEWSECT->NAME is already set.  */
 
 static asection *
 bfd_section_init (bfd *abfd, asection *newsect)
 {
-  static int section_id = 0x10;  /* id 0 to 3 used by STD_SECTION.  */
-
   newsect->id = section_id;
   newsect->index = abfd->section_count;
   newsect->owner = abfd;
@@ -903,16 +906,18 @@ FUNCTION
        bfd_get_next_section_by_name
 
 SYNOPSIS
-       asection *bfd_get_next_section_by_name (asection *sec);
+       asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
 
 DESCRIPTION
        Given @var{sec} is a section returned by @code{bfd_get_section_by_name},
        return the next most recently created section attached to the same
-       BFD with the same name.  Return NULL if no such section exists.
+       BFD with the same name, or if no such section exists in the same BFD and
+       IBFD is non-NULL, the next section with the same name in any input
+       BFD following IBFD.  Return NULL on finding no section.
 */
 
 asection *
-bfd_get_next_section_by_name (asection *sec)
+bfd_get_next_section_by_name (bfd *ibfd, asection *sec)
 {
   struct section_hash_entry *sh;
   const char *name;
@@ -930,6 +935,16 @@ bfd_get_next_section_by_name (asection *
        && strcmp (sh->root.string, name) == 0)
       return &sh->section;
 
+  if (ibfd != NULL)
+    {
+      while ((ibfd = ibfd->link.next) != NULL)
+	{
+	  asection *s = bfd_get_section_by_name (ibfd, name);
+	  if (s != NULL)
+	    return s;
+	}
+    }
+
   return NULL;
 }
 
@@ -951,7 +966,7 @@ bfd_get_linker_section (bfd *abfd, const
   asection *sec = bfd_get_section_by_name (abfd, name);
 
   while (sec != NULL && (sec->flags & SEC_LINKER_CREATED) == 0)
-    sec = bfd_get_next_section_by_name (sec);
+    sec = bfd_get_next_section_by_name (NULL, sec);
   return sec;
 }
 
@@ -994,14 +1009,11 @@ bfd_get_section_by_name_if (bfd *abfd, c
     return NULL;
 
   hash = sh->root.hash;
-  do
-    {
-      if ((*operation) (abfd, &sh->section, user_storage))
-	return &sh->section;
-      sh = (struct section_hash_entry *) sh->root.next;
-    }
-  while (sh != NULL && sh->root.hash == hash
-	 && strcmp (sh->root.string, name) == 0);
+  for (; sh != NULL; sh = (struct section_hash_entry *) sh->root.next)
+    if (sh->root.hash == hash
+	&& strcmp (sh->root.string, name) == 0
+	&& (*operation) (abfd, &sh->section, user_storage))
+      return &sh->section;
 
   return NULL;
 }
@@ -1278,6 +1290,23 @@ bfd_make_section (bfd *abfd, const char 
 
 /*
 FUNCTION
+	bfd_get_next_section_id
+
+SYNOPSIS
+	int bfd_get_next_section_id (void);
+
+DESCRIPTION
+	Returns the id that the next section created will have.
+*/
+
+int
+bfd_get_next_section_id (void)
+{
+  return section_id;
+}
+
+/*
+FUNCTION
 	bfd_set_section_flags
 
 SYNOPSIS
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/simple.c ./bfd/simple.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/simple.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/simple.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* simple.c -- BFD simple client routines
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by MontaVista Software, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -24,7 +24,7 @@
 #include "libbfd.h"
 #include "bfdlink.h"
 
-static bfd_boolean
+static void
 simple_dummy_warning (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 		      const char *warning ATTRIBUTE_UNUSED,
 		      const char *symbol ATTRIBUTE_UNUSED,
@@ -32,10 +32,9 @@ simple_dummy_warning (struct bfd_link_in
 		      asection *section ATTRIBUTE_UNUSED,
 		      bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			       const char *name ATTRIBUTE_UNUSED,
 			       bfd *abfd ATTRIBUTE_UNUSED,
@@ -43,10 +42,9 @@ simple_dummy_undefined_symbol (struct bf
 			       bfd_vma address ATTRIBUTE_UNUSED,
 			       bfd_boolean fatal ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			     struct bfd_link_hash_entry *entry ATTRIBUTE_UNUSED,
 			     const char *name ATTRIBUTE_UNUSED,
@@ -56,37 +54,33 @@ simple_dummy_reloc_overflow (struct bfd_
 			     asection *section ATTRIBUTE_UNUSED,
 			     bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_reloc_dangerous (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			      const char *message ATTRIBUTE_UNUSED,
 			      bfd *abfd ATTRIBUTE_UNUSED,
 			      asection *section ATTRIBUTE_UNUSED,
 			      bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_unattached_reloc (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 			       const char *name ATTRIBUTE_UNUSED,
 			       bfd *abfd ATTRIBUTE_UNUSED,
 			       asection *section ATTRIBUTE_UNUSED,
 			       bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_multiple_definition (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
 				  struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED,
 				  bfd *nbfd ATTRIBUTE_UNUSED,
 				  asection *nsec ATTRIBUTE_UNUSED,
 				  bfd_vma nval ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
 static void
@@ -102,7 +96,7 @@ struct saved_output_info
 
 struct saved_offsets
 {
-  int section_count;
+  unsigned int section_count;
   struct saved_output_info *sections;
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/som.c ./bfd/som.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/som.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/som.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfd back-end for HP PA-RISC SOM objects.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah.
@@ -24,7 +24,7 @@
 #include "sysdep.h"
 #include "alloca-conf.h"
 #include "bfd.h"
-
+#include "libiberty.h"
 #include "libbfd.h"
 #include "som.h"
 #include "safe-ctype.h"
@@ -3304,11 +3304,12 @@ som_write_space_strings (bfd *abfd,
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  char *tmp_space = alloca (tmp_space_size);
+  char *tmp_space = xmalloc (tmp_space_size);
   char *p = tmp_space;
   unsigned int strings_size = 0;
   asection *section;
   bfd_size_type amt;
+  bfd_size_type res;
 
   /* Seek to the start of the space strings in preparation for writing
      them out.  */
@@ -3355,7 +3356,7 @@ som_write_space_strings (bfd *abfd,
                 tmp_space_size = length + 5;
               else
                 tmp_space_size = 2 * tmp_space_size;
-	      tmp_space = alloca (tmp_space_size);
+	      tmp_space = xrealloc (tmp_space, tmp_space_size);
 	    }
 
 	  /* Reset to beginning of the (possibly new) buffer space.  */
@@ -3391,7 +3392,9 @@ som_write_space_strings (bfd *abfd,
   /* Done with the space/subspace strings.  Write out any information
      contained in a partial block.  */
   amt = p - tmp_space;
-  if (bfd_bwrite ((void *) &tmp_space[0], amt, abfd) != amt)
+  res = bfd_bwrite ((void *) &tmp_space[0], amt, abfd);
+  free (tmp_space);
+  if (res != amt)
     return FALSE;
   *string_sizep = strings_size;
   return TRUE;
@@ -3408,15 +3411,14 @@ som_write_symbol_strings (bfd *abfd,
 			  struct som_compilation_unit *compilation_unit)
 {
   unsigned int i;
-
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  char *tmp_space = alloca (tmp_space_size);
+  char *tmp_space = xmalloc (tmp_space_size);
   char *p = tmp_space;
-
   unsigned int strings_size = 0;
   bfd_size_type amt;
+  bfd_size_type res;
 
   /* This gets a bit gruesome because of the compilation unit.  The
      strings within the compilation unit are part of the symbol
@@ -3475,7 +3477,7 @@ som_write_symbol_strings (bfd *abfd,
                     tmp_space_size = 5 + length;
                   else
                     tmp_space_size = 2 * tmp_space_size;
-		  tmp_space = alloca (tmp_space_size);
+		  tmp_space = xrealloc (tmp_space, tmp_space_size);
 		}
 
 	      /* Reset to beginning of the (possibly new) buffer
@@ -3530,7 +3532,7 @@ som_write_symbol_strings (bfd *abfd,
                 tmp_space_size = 5 + length;
               else
                 tmp_space_size = 2 * tmp_space_size;
-	      tmp_space = alloca (tmp_space_size);
+	      tmp_space = xrealloc (tmp_space, tmp_space_size);
 	    }
 
 	  /* Reset to beginning of the (possibly new) buffer space.  */
@@ -3563,7 +3565,9 @@ som_write_symbol_strings (bfd *abfd,
 
   /* Scribble out any partial block.  */
   amt = p - tmp_space;
-  if (bfd_bwrite ((void *) &tmp_space[0], amt, abfd) != amt)
+  res = bfd_bwrite ((void *) &tmp_space[0], amt, abfd);
+  free (tmp_space);
+  if (res != amt)
     return FALSE;
 
   *string_sizep = strings_size;
@@ -5775,7 +5779,7 @@ static int
 som_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 		    struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
-  (*_bfd_error_handler) (_("som_sizeof_headers unimplemented"));
+  _bfd_error_handler (_("som_sizeof_headers unimplemented"));
   abort ();
   return 0;
 }
@@ -6754,6 +6758,7 @@ som_bfd_link_split_section (bfd *abfd AT
 #define som_bfd_copy_private_header_data	_bfd_generic_bfd_copy_private_header_data
 #define som_bfd_set_private_flags		_bfd_generic_bfd_set_private_flags
 #define som_find_inliner_info			_bfd_nosymbols_find_inliner_info
+#define som_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 const bfd_target hppa_som_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/som.h ./bfd/som.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/som.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/som.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* HP PA-RISC SOM object file format:  definitions internal to BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparclinux.c ./bfd/sparclinux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparclinux.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sparclinux.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for linux flavored sparc a.out binaries.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -66,11 +66,11 @@ sparclinux_write_object_contents (bfd *a
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_SPARC);
+  N_SET_MACHTYPE (execp, M_SPARC);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
@@ -314,7 +314,7 @@ linux_add_one_symbol (struct bfd_link_in
 
   insert = FALSE;
 
-  if (! info->relocatable
+  if (! bfd_link_relocatable (info)
       && linux_hash_table (info)->dynobj == NULL
       && strcmp (name, SHARABLE_CONFLICTS) == 0
       && (flags & BSF_CONSTRUCTOR) != 0
@@ -409,14 +409,15 @@ linux_tally_symbols (struct linux_link_h
 	alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
 
       if (p == NULL || alloc == NULL)
-	(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
-			       name);
+	_bfd_error_handler (_("Output file requires shared library `%s'\n"),
+			    name);
       else
 	{
 	  strcpy (alloc, name);
 	  p = strrchr (alloc, '_');
 	  *p++ = '\0';
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("Output file requires shared library `%s.so.%s'\n"),
 	     alloc, p);
 	  free (alloc);
@@ -603,7 +604,7 @@ linux_finish_dynamic_link (bfd *output_b
       if (f->h->root.root.type != bfd_link_hash_defined
 	  && f->h->root.root.type != bfd_link_hash_defweak)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("Symbol %s not defined for fixups\n"),
 	     f->h->root.root.root.string);
 	  continue;
@@ -653,7 +654,7 @@ linux_finish_dynamic_link (bfd *output_b
 	  if (f->h->root.root.type != bfd_link_hash_defined
 	      && f->h->root.root.type != bfd_link_hash_defweak)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
 		(_("Symbol %s not defined for fixups\n"),
 		 f->h->root.root.root.string);
 	      continue;
@@ -678,7 +679,7 @@ linux_finish_dynamic_link (bfd *output_b
 
   if (linux_hash_table (info)->fixup_count != fixups_written)
     {
-      (*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
+      _bfd_error_handler (_("Warning: fixup count mismatch\n"));
       while (linux_hash_table (info)->fixup_count > fixups_written)
 	{
 	  bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparclynx.c ./bfd/sparclynx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparclynx.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sparclynx.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD support for Sparc binaries under LynxOS.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -120,8 +120,8 @@ NAME(lynx,set_arch_mach) (bfd *abfd, uns
   bfd_set_arch_mach (abfd, arch, machine);
 }
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   choose_reloc_size(ABFD);
 
 /* Determine the size of a relocation entry, based on the architecture.  */
@@ -157,27 +157,27 @@ NAME(aout,sparclynx_write_object_content
       switch (bfd_get_mach (abfd))
 	{
 	case bfd_mach_m68010:
-	  N_SET_MACHTYPE (*execp, M_68010);
+	  N_SET_MACHTYPE (execp, M_68010);
 	  break;
 	default:
 	case bfd_mach_m68020:
-	  N_SET_MACHTYPE (*execp, M_68020);
+	  N_SET_MACHTYPE (execp, M_68020);
 	  break;
 	}
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC);
+      N_SET_MACHTYPE (execp, M_SPARC);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   choose_reloc_size (abfd);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   WRITE_HEADERS (abfd, execp);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparcnetbsd.c ./bfd/sparcnetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sparcnetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sparcnetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/sparc a.out-ish binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/srec.c ./bfd/srec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/srec.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/srec.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for s-record objects.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -129,12 +129,12 @@ static const char digs[] = "0123456789AB
 /* The number of data bytes we actually fit onto a line on output.
    This variable can be modified by objcopy's --srec-len parameter.
    For a 0x75 byte record you should set --srec-len=0x70.  */
-unsigned int Chunk = DEFAULT_CHUNK;
+unsigned int _bfd_srec_len = DEFAULT_CHUNK;
 
 /* The type of srec output (free or forced to S3).
    This variable can be modified by objcopy's --srec-forceS3
    parameter.  */
-bfd_boolean S3Forced = FALSE;
+bfd_boolean _bfd_srec_forceS3 = FALSE;
 
 /* When writing an S-record file, the S-records can not be output as
    they are seen.  This structure is used to hold them in memory.  */
@@ -249,13 +249,14 @@ 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;
 	  buf[1] = '\0';
 	}
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B:%d: Unexpected character `%s' in S-record file\n"),
 	 abfd, lineno, buf);
       bfd_set_error (bfd_error_bad_value);
@@ -483,8 +484,9 @@ srec_scan (bfd *abfd)
 	      min_bytes = 5;
 	    if (bytes < min_bytes)
 	      {
-		(*_bfd_error_handler) (_("%B:%d: byte count %d too small\n"),
-				       abfd, lineno, bytes);
+		/* xgettext:c-format */
+		_bfd_error_handler (_("%B:%d: byte count %d too small\n"),
+				    abfd, lineno, bytes);
 		bfd_set_error (bfd_error_bad_value);
 		goto error_return;
 	      }
@@ -574,7 +576,8 @@ srec_scan (bfd *abfd)
 		check_sum = 255 - (check_sum & 0xff);
 		if (check_sum != HEX (data))
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B:%d: Bad checksum in S-record file\n"),
 		       abfd, lineno);
 		    bfd_set_error (bfd_error_bad_value);
@@ -607,7 +610,8 @@ srec_scan (bfd *abfd)
 		check_sum = 255 - (check_sum & 0xff);
 		if (check_sum != HEX (data))
 		  {
-		    (*_bfd_error_handler)
+		    _bfd_error_handler
+		      /* xgettext:c-format */
 		      (_("%B:%d: Bad checksum in S-record file\n"),
 		       abfd, lineno);
 		    bfd_set_error (bfd_error_bad_value);
@@ -900,9 +904,9 @@ srec_set_section_contents (bfd *abfd,
 	return FALSE;
       memcpy ((void *) data, location, (size_t) bytes_to_do);
 
-      /* Ff S3Forced is TRUE then always select S3 records,
-	 regardless of the siez of the addresses.  */
-      if (S3Forced)
+      /* If _bfd_srec_forceS3 is TRUE then always select S3 records,
+	 regardless of the size of the addresses.  */
+      if (_bfd_srec_forceS3)
 	tdata->type = 3;
       else if ((section->lma + (offset + bytes_to_do) / opb - 1) <= 0xffff)
 	;  /* The default, S1, is OK.  */
@@ -972,10 +976,12 @@ srec_write_record (bfd *abfd,
     case 7:
       TOHEX (dst, (address >> 24), check_sum);
       dst += 2;
+      /* Fall through.  */
     case 8:
     case 2:
       TOHEX (dst, (address >> 16), check_sum);
       dst += 2;
+      /* Fall through.  */
     case 9:
     case 1:
     case 0:
@@ -1034,18 +1040,18 @@ srec_write_section (bfd *abfd,
      have three, and S3 (tdata->type == 3) records have four.
      The total length can't exceed 255, and a zero data length will
      spin for a long time.  */
-  if (Chunk == 0)
-    Chunk = 1;
-  else if (Chunk > MAXCHUNK - tdata->type - 2)
-    Chunk = MAXCHUNK - tdata->type - 2;
+  if (_bfd_srec_len == 0)
+    _bfd_srec_len = 1;
+  else if (_bfd_srec_len > MAXCHUNK - tdata->type - 2)
+    _bfd_srec_len = MAXCHUNK - tdata->type - 2;
 
   while (octets_written < list->size)
     {
       bfd_vma address;
       unsigned int octets_this_chunk = list->size - octets_written;
 
-      if (octets_this_chunk > Chunk)
-	octets_this_chunk = Chunk;
+      if (octets_this_chunk > _bfd_srec_len)
+	octets_this_chunk = _bfd_srec_len;
 
       address = list->where + octets_written / bfd_octets_per_byte (abfd);
 
@@ -1275,10 +1281,10 @@ srec_print_symbol (bfd *abfd,
 #define srec_bfd_link_hash_table_create           _bfd_generic_link_hash_table_create
 #define srec_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define srec_bfd_link_just_syms                   _bfd_generic_link_just_syms
-#define srec_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
+#define srec_bfd_copy_link_hash_symbol_type       _bfd_generic_copy_link_hash_symbol_type
 #define srec_bfd_final_link                       _bfd_generic_final_link
 #define srec_bfd_link_split_section               _bfd_generic_link_split_section
+#define srec_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 const bfd_target srec_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/stabs.c ./bfd/stabs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/stabs.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/stabs.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Stabs in sections linking support.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -274,7 +274,8 @@ _bfd_link_section_stabs (bfd *abfd,
       symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF);
       if (symstroff >= stabstrsec->size)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B(%A+0x%lx): Stabs entry has invalid string index."),
 	     abfd, stabsec, (long) (sym - stabbuf));
 	  bfd_set_error (bfd_error_bad_value);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/stab-syms.c ./bfd/stab-syms.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/stab-syms.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/stab-syms.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Table of stab names for the BFD library.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -45,8 +45,7 @@
   __define_name (N_WARNING, "WARNING")
 
 const char *
-bfd_get_stab_name (code)
-     int code;
+bfd_get_stab_name (int code)
 {
   switch (code)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sunos.c ./bfd/sunos.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sunos.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sunos.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for SunOS binaries.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -792,7 +792,7 @@ sunos_create_dynamic_sections (bfd *abfd
     }
 
   if ((needed && ! sunos_hash_table (info)->dynamic_sections_needed)
-      || info->shared)
+      || bfd_link_pic (info))
     {
       bfd *dynobj;
 
@@ -828,7 +828,7 @@ sunos_add_dynamic_symbols (bfd *abfd,
     {
       if (! sunos_create_dynamic_sections (abfd, info,
 					   ((abfd->flags & DYNAMIC) != 0
-					    && !info->relocatable)))
+					    && !bfd_link_relocatable (info))))
 	return FALSE;
     }
 
@@ -860,7 +860,7 @@ sunos_add_dynamic_symbols (bfd *abfd,
 
   /* The native linker seems to just ignore dynamic objects when -r is
      used.  */
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   /* There's no hope of using a dynamic object which does not exactly
@@ -1214,7 +1214,7 @@ bfd_sunos_record_link_assignment (bfd *o
 
   /* In a shared library, the __DYNAMIC symbol does not appear in the
      dynamic symbol table.  */
-  if (! info->shared || strcmp (name, "__DYNAMIC") != 0)
+  if (! bfd_link_pic (info) || strcmp (name, "__DYNAMIC") != 0)
     {
       h->flags |= SUNOS_DEF_REGULAR;
 
@@ -1513,7 +1513,7 @@ sunos_scan_ext_relocs (struct bfd_link_i
 	  /* If we are making a shared library, or if the symbol is
 	     defined by a dynamic object, we will need a dynamic reloc
 	     entry.  */
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      || (h != NULL
 		  && (h->flags & SUNOS_DEF_DYNAMIC) != 0
 		  && (h->flags & SUNOS_DEF_REGULAR) == 0))
@@ -1529,7 +1529,7 @@ sunos_scan_ext_relocs (struct bfd_link_i
 	{
 	  /* But, if we are creating a shared library, we need to
 	     generate an absolute reloc.  */
-	  if (info->shared)
+	  if (bfd_link_pic (info))
 	    {
 	      if (dynobj == NULL)
 		{
@@ -1559,13 +1559,13 @@ sunos_scan_ext_relocs (struct bfd_link_i
 	continue;
 
       if (r_type != RELOC_JMP_TBL
-	  && ! info->shared
+	  && ! bfd_link_pic (info)
 	  && ((h->flags & SUNOS_DEF_DYNAMIC) == 0
 	      || (h->flags & SUNOS_DEF_REGULAR) != 0))
 	continue;
 
       if (r_type == RELOC_JMP_TBL
-	  && ! info->shared
+	  && ! bfd_link_pic (info)
 	  && (h->flags & SUNOS_DEF_DYNAMIC) == 0
 	  && (h->flags & SUNOS_DEF_REGULAR) == 0)
 	{
@@ -1595,10 +1595,10 @@ sunos_scan_ext_relocs (struct bfd_link_i
 	}
 
       BFD_ASSERT (r_type == RELOC_JMP_TBL
-		  || info->shared
+		  || bfd_link_pic (info)
 		  || (h->flags & SUNOS_REF_REGULAR) != 0);
       BFD_ASSERT (r_type == RELOC_JMP_TBL
-		  || info->shared
+		  || bfd_link_pic (info)
 		  || h->plt_offset != 0
 		  || ((h->root.root.type == bfd_link_hash_defined
 		       || h->root.root.type == bfd_link_hash_defweak)
@@ -1657,13 +1657,13 @@ sunos_scan_ext_relocs (struct bfd_link_i
 	      /* We will also need a dynamic reloc entry, unless this
 		 is a JMP_TBL reloc produced by linking PIC compiled
 		 code, and we are not making a shared library.  */
-	      if (info->shared || (h->flags & SUNOS_DEF_REGULAR) == 0)
+	      if (bfd_link_pic (info) || (h->flags & SUNOS_DEF_REGULAR) == 0)
 		srel->size += RELOC_EXT_SIZE;
 	    }
 
 	  /* If we are creating a shared library, we need to copy over
 	     any reloc other than a jump table reloc.  */
-	  if (info->shared && r_type != RELOC_JMP_TBL)
+	  if (bfd_link_pic (info) && r_type != RELOC_JMP_TBL)
 	    srel->size += RELOC_EXT_SIZE;
 	}
     }
@@ -1880,7 +1880,7 @@ bfd_sunos_size_dynamic_sections (bfd *ou
   *sneedptr = NULL;
   *srulesptr = NULL;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   if (output_bfd->xvec != &MY(vec))
@@ -2119,7 +2119,7 @@ sunos_write_dynamic_symbol (bfd *output_
       switch (bfd_get_arch (output_bfd))
 	{
 	case bfd_arch_sparc:
-	  if (info->shared || (h->flags & SUNOS_DEF_REGULAR) == 0)
+	  if (bfd_link_pic (info) || (h->flags & SUNOS_DEF_REGULAR) == 0)
 	    {
 	      bfd_put_32 (output_bfd, SPARC_PLT_ENTRY_WORD0, p);
 	      bfd_put_32 (output_bfd,
@@ -2146,7 +2146,7 @@ sunos_write_dynamic_symbol (bfd *output_
 	  break;
 
 	case bfd_arch_m68k:
-	  if (! info->shared && (h->flags & SUNOS_DEF_REGULAR) != 0)
+	  if (! bfd_link_pic (info) && (h->flags & SUNOS_DEF_REGULAR) != 0)
 	    abort ();
 	  bfd_put_16 (output_bfd, M68K_PLT_ENTRY_WORD0, p);
 	  bfd_put_32 (output_bfd, (- (h->plt_offset + 2)), p + 2);
@@ -2160,7 +2160,7 @@ sunos_write_dynamic_symbol (bfd *output_
 
       /* We also need to add a jump table reloc, unless this is the
 	 result of a JMP_TBL reloc from PIC compiled code.  */
-      if (info->shared || (h->flags & SUNOS_DEF_REGULAR) == 0)
+      if (bfd_link_pic (info) || (h->flags & SUNOS_DEF_REGULAR) == 0)
 	{
 	  BFD_ASSERT (h->dynindx >= 0);
 	  BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
@@ -2343,7 +2343,7 @@ sunos_check_dynamic_reloc (struct bfd_li
 
   if (h != NULL
       && h->plt_offset != 0
-      && (info->shared
+      && (bfd_link_pic (info)
 	  || (h->flags & SUNOS_DEF_REGULAR) == 0))
     {
       asection *splt;
@@ -2451,14 +2451,14 @@ sunos_check_dynamic_reloc (struct bfd_li
       if ((*got_offsetp & 1) == 0)
 	{
 	  if (h == NULL
-	      || (! info->shared
+	      || (! bfd_link_pic (info)
 		  && ((h->flags & SUNOS_DEF_DYNAMIC) == 0
 		      || (h->flags & SUNOS_DEF_REGULAR) != 0)))
 	    PUT_WORD (dynobj, *relocationp, sgot->contents + *got_offsetp);
 	  else
 	    PUT_WORD (dynobj, 0, sgot->contents + *got_offsetp);
 
-	  if (info->shared
+	  if (bfd_link_pic (info)
 	      || (h != NULL
 		  && (h->flags & SUNOS_DEF_DYNAMIC) != 0
 		  && (h->flags & SUNOS_DEF_REGULAR) == 0))
@@ -2574,7 +2574,7 @@ sunos_check_dynamic_reloc (struct bfd_li
 
   if (! sunos_hash_table (info)->dynamic_sections_needed)
     return TRUE;
-  if (! info->shared)
+  if (! bfd_link_pic (info))
     {
       if (h == NULL
 	  || h->dynindx == -1
@@ -2726,7 +2726,7 @@ sunos_finish_dynamic_link (bfd *abfd, st
      dynamic information, unless this is a shared library.  */
   s = bfd_get_linker_section (dynobj, ".got");
   BFD_ASSERT (s != NULL);
-  if (info->shared || sdyn->size == 0)
+  if (bfd_link_pic (info) || sdyn->size == 0)
     PUT_WORD (dynobj, 0, s->contents);
   else
     PUT_WORD (dynobj, sdyn->output_section->vma + sdyn->output_offset,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/syms.c ./bfd/syms.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/syms.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/syms.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic symbol-table support for the BFD library.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -219,8 +219,7 @@ CODE_FRAGMENT
 .#define BSF_EXPORT	BSF_GLOBAL {* No real difference.  *}
 .
 .  {* A normal C symbol would be one of:
-.     <<BSF_LOCAL>>, <<BSF_COMMON>>,  <<BSF_UNDEFINED>> or
-.     <<BSF_GLOBAL>>.  *}
+.     <<BSF_LOCAL>>, <<BSF_UNDEFINED>> or <<BSF_GLOBAL>>.  *}
 .
 .  {* The symbol is a debugging record. The value has an arbitrary
 .     meaning, unless BSF_DEBUGGING_RELOC is also set.  *}
@@ -232,7 +231,9 @@ CODE_FRAGMENT
 .
 .  {* Used by the linker.  *}
 .#define BSF_KEEP		(1 << 5)
-.#define BSF_KEEP_G		(1 << 6)
+.
+.  {* An ELF common symbol.  *}
+.#define BSF_ELF_COMMON		(1 << 6)
 .
 .  {* A weak global symbol, overridable without warnings by
 .     a regular global symbol of the same name.  *}
@@ -1074,7 +1075,7 @@ _bfd_stab_section_find_nearest_line (bfd
 		  || r->howto->bitpos != 0
 		  || r->howto->dst_mask != 0xffffffff)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("Unsupported .stab relocation"));
 		  bfd_set_error (bfd_error_invalid_operation);
 		  if (reloc_vector != NULL)
@@ -1082,11 +1083,13 @@ _bfd_stab_section_find_nearest_line (bfd
 		  return FALSE;
 		}
 
-	      val = bfd_get_32 (abfd, info->stabs + r->address);
+	      val = bfd_get_32 (abfd, info->stabs
+				+ r->address * bfd_octets_per_byte (abfd));
 	      val &= r->howto->src_mask;
 	      sym = *r->sym_ptr_ptr;
 	      val += sym->value + sym->section->vma + r->addend;
-	      bfd_put_32 (abfd, (bfd_vma) val, info->stabs + r->address);
+	      bfd_put_32 (abfd, (bfd_vma) val, info->stabs
+			  + r->address * bfd_octets_per_byte (abfd));
 	    }
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sysdep.h ./bfd/sysdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/sysdep.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/sysdep.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* sysdep.h -- handle host dependencies for the BFD library
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/targets.c ./bfd/targets.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/targets.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/targets.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic target-file-type support for the BFD library.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -144,6 +144,7 @@ DESCRIPTION
 
 .enum bfd_flavour
 .{
+.  {* N.B. Update bfd_flavour_name if you change this.  *}
 .  bfd_target_unknown_flavour,
 .  bfd_target_aout_flavour,
 .  bfd_target_coff_flavour,
@@ -290,7 +291,7 @@ BFD_JUMP_TABLE macros.
 .  bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
 .  {* Called to merge BFD general private data from one object file
 .     to a common output file when linking.  *}
-.  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+.  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
 .  {* Called to initialize BFD private section data from one object file
 .     to another.  *}
 .#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
@@ -451,6 +452,7 @@ BFD_JUMP_TABLE macros.
 .  NAME##_bfd_copy_link_hash_symbol_type, \
 .  NAME##_bfd_final_link, \
 .  NAME##_bfd_link_split_section, \
+.  NAME##_bfd_link_check_relocs, \
 .  NAME##_bfd_gc_sections, \
 .  NAME##_bfd_lookup_section_flags, \
 .  NAME##_bfd_merge_sections, \
@@ -492,6 +494,9 @@ BFD_JUMP_TABLE macros.
 .  {* Should this section be split up into smaller pieces during linking.  *}
 .  bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
 .
+.  {* Check the relocations in the bfd for validity.  *}
+.  bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
+.
 .  {* Remove sections that are not referenced from the output.  *}
 .  bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 .
@@ -567,7 +572,10 @@ to find an alternative output format tha
 extern const bfd_target aarch64_elf32_be_vec;
 extern const bfd_target aarch64_elf32_le_vec;
 extern const bfd_target aarch64_elf64_be_vec;
+extern const bfd_target aarch64_elf64_be_cloudabi_vec;
 extern const bfd_target aarch64_elf64_le_vec;
+extern const bfd_target aarch64_elf64_le_cloudabi_vec;
+extern const bfd_target aarch64_mach_o_vec;
 extern const bfd_target alpha_ecoff_le_vec;
 extern const bfd_target alpha_elf64_vec;
 extern const bfd_target alpha_elf64_fbsd_vec;
@@ -595,6 +603,7 @@ extern const bfd_target arm_elf32_symbia
 extern const bfd_target arm_elf32_symbian_le_vec;
 extern const bfd_target arm_elf32_vxworks_be_vec;
 extern const bfd_target arm_elf32_vxworks_le_vec;
+extern const bfd_target arm_mach_o_vec;
 extern const bfd_target arm_pe_be_vec;
 extern const bfd_target arm_pe_le_vec;
 extern const bfd_target arm_pe_epoc_be_vec;
@@ -790,6 +799,9 @@ extern const bfd_target powerpc_pe_le_ve
 extern const bfd_target powerpc_pei_vec;
 extern const bfd_target powerpc_pei_le_vec;
 extern const bfd_target powerpc_xcoff_vec;
+extern const bfd_target pru_elf32_vec;
+extern const bfd_target riscv_elf32_vec;
+extern const bfd_target riscv_elf64_vec;
 extern const bfd_target rl78_elf32_vec;
 extern const bfd_target rs6000_xcoff64_vec;
 extern const bfd_target rs6000_xcoff64_aix_vec;
@@ -947,7 +959,10 @@ static const bfd_target * const _bfd_tar
 	&aarch64_elf32_be_vec,
 	&aarch64_elf32_le_vec,
 	&aarch64_elf64_be_vec,
+	&aarch64_elf64_be_cloudabi_vec,
 	&aarch64_elf64_le_vec,
+	&aarch64_elf64_le_cloudabi_vec,
+	&aarch64_mach_o_vec,
 #endif
 
 #ifdef BFD64
@@ -993,6 +1008,7 @@ static const bfd_target * const _bfd_tar
 	&arm_elf32_symbian_le_vec,
 	&arm_elf32_vxworks_be_vec,
 	&arm_elf32_vxworks_le_vec,
+	&arm_mach_o_vec,
 	&arm_pe_be_vec,
 	&arm_pe_le_vec,
 	&arm_pe_epoc_be_vec,
@@ -1290,6 +1306,12 @@ static const bfd_target * const _bfd_tar
 	&powerpc_xcoff_vec,
 #endif
 
+	&pru_elf32_vec,
+
+#ifdef BFD64
+	&riscv_elf32_vec,
+	&riscv_elf64_vec,
+#endif
 	&rl78_elf32_vec,
 
 #ifdef BFD64
@@ -1802,30 +1824,76 @@ bfd_target_list (void)
 
 /*
 FUNCTION
-	bfd_seach_for_target
+	bfd_iterate_over_targets
 
 SYNOPSIS
-	const bfd_target *bfd_search_for_target
-	  (int (*search_func) (const bfd_target *, void *),
-	   void *);
+	const bfd_target *bfd_iterate_over_targets
+	  (int (*func) (const bfd_target *, void *),
+	   void *data);
 
 DESCRIPTION
-	Return a pointer to the first transfer vector in the list of
-	transfer vectors maintained by BFD that produces a non-zero
-	result when passed to the function @var{search_func}.  The
-	parameter @var{data} is passed, unexamined, to the search
-	function.
+	Call @var{func} for each target in the list of BFD target
+	vectors, passing @var{data} to @var{func}.  Stop iterating if
+	@var{func} returns a non-zero result, and return that target
+	vector.  Return NULL if @var{func} always returns zero.
 */
 
 const bfd_target *
-bfd_search_for_target (int (*search_func) (const bfd_target *, void *),
-		       void *data)
+bfd_iterate_over_targets (int (*func) (const bfd_target *, void *),
+			  void *data)
 {
-  const bfd_target * const *target;
+  const bfd_target *const *target;
 
-  for (target = bfd_target_vector; *target != NULL; target ++)
-    if (search_func (*target, data))
+  for (target = bfd_target_vector; *target != NULL; ++target)
+    if (func (*target, data))
       return *target;
 
   return NULL;
 }
+
+/*
+FUNCTION
+	bfd_flavour_name
+
+SYNOPSIS
+	const char *bfd_flavour_name (enum bfd_flavour flavour);
+
+DESCRIPTION
+	Return the string form of @var{flavour}.
+*/
+
+const char *
+bfd_flavour_name (enum bfd_flavour flavour)
+{
+  switch (flavour)
+    {
+    case bfd_target_unknown_flavour: return "unknown file format";
+    case bfd_target_aout_flavour: return "a.out";
+    case bfd_target_coff_flavour: return "COFF";
+    case bfd_target_ecoff_flavour: return "ECOFF";
+    case bfd_target_xcoff_flavour: return "XCOFF";
+    case bfd_target_elf_flavour: return "ELF";
+    case bfd_target_ieee_flavour: return "IEEE";
+    case bfd_target_nlm_flavour: return "NLM";
+    case bfd_target_oasys_flavour: return "Oasys";
+    case bfd_target_tekhex_flavour: return "Tekhex";
+    case bfd_target_srec_flavour: return "Srec";
+    case bfd_target_verilog_flavour: return "Verilog";
+    case bfd_target_ihex_flavour: return "Ihex";
+    case bfd_target_som_flavour: return "SOM";
+    case bfd_target_os9k_flavour: return "OS9K";
+    case bfd_target_versados_flavour: return "Versados";
+    case bfd_target_msdos_flavour: return "MSDOS";
+    case bfd_target_ovax_flavour: return "Ovax";
+    case bfd_target_evax_flavour: return "Evax";
+    case bfd_target_mmo_flavour: return "mmo";
+    case bfd_target_mach_o_flavour: return "MACH_O";
+    case bfd_target_pef_flavour: return "PEF";
+    case bfd_target_pef_xlib_flavour: return "PEF_XLIB";
+    case bfd_target_sym_flavour: return "SYM";
+    /* There is no "default" case here so that -Wswitch (part of -Wall)
+       catches missing entries.  */
+    }
+
+  abort ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/tekhex.c ./bfd/tekhex.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/tekhex.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/tekhex.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD backend for Extended Tektronix Hex Format  objects.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -459,7 +459,8 @@ first_phase (bfd *abfd, int type, char *
 		    else
 		      {
 			if (alt_section == NULL)
-			  alt_section = bfd_get_next_section_by_name (section);
+			  alt_section
+			    = bfd_get_next_section_by_name (NULL, section);
 			if (alt_section == NULL)
 			  alt_section = bfd_make_section_anyway_with_flags
 			    (abfd, section->name,
@@ -476,7 +477,8 @@ first_phase (bfd *abfd, int type, char *
 		    else
 		      {
 			if (alt_section == NULL)
-			  alt_section = bfd_get_next_section_by_name (section);
+			  alt_section
+			    = bfd_get_next_section_by_name (NULL, section);
 			if (alt_section == NULL)
 			  alt_section = bfd_make_section_anyway_with_flags
 			    (abfd, section->name,
@@ -978,11 +980,11 @@ tekhex_print_symbol (bfd *abfd,
 #define tekhex_bfd_link_hash_table_create           _bfd_generic_link_hash_table_create
 #define tekhex_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define tekhex_bfd_link_just_syms                   _bfd_generic_link_just_syms
-#define tekhex_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
+#define tekhex_bfd_copy_link_hash_symbol_type       _bfd_generic_copy_link_hash_symbol_type
 #define tekhex_bfd_final_link                       _bfd_generic_final_link
 #define tekhex_bfd_link_split_section               _bfd_generic_link_split_section
 #define tekhex_get_section_contents_in_window       _bfd_generic_get_section_contents_in_window
+#define tekhex_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 const bfd_target tekhex_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/TODO ./bfd/TODO
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/TODO	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/TODO	2017-03-06 01:49:05.000000000 +0000
@@ -20,7 +20,7 @@ Things that still need to be done: -*- T
 
  o - upgrade the reloc handling as per Steve's suggestion.
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/trad-core.c ./bfd/trad-core.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/trad-core.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/trad-core.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vax1knetbsd.c ./bfd/vax1knetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vax1knetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vax1knetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/VAX (1K page size) a.out-ish binaries.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vaxbsd.c ./bfd/vaxbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vaxbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vaxbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for BSD and Ultrix/VAX (1K page size) a.out-ish binaries.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vaxnetbsd.c ./bfd/vaxnetbsd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vaxnetbsd.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vaxnetbsd.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/VAX (4K page size) a.out-ish binaries.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/verilog.c ./bfd/verilog.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/verilog.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/verilog.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for verilog hex memory dump files.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Written by Anthony Green <green@moxielogic.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/versados.c ./bfd/versados.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/versados.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/versados.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* BFD back-end for VERSAdos-E objects.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    Versados is a Motorola trademark.
@@ -296,6 +296,7 @@ process_esd (bfd *abfd, struct ext_esd *
 	  break;
 	case ESD_XDEF_IN_ABS:
 	  sec = bfd_abs_section_ptr;
+	  /* Fall through.  */
 	case ESD_XDEF_IN_SEC:
 	  {
 	    int snum = VDATA (abfd)->def_idx++;
@@ -381,11 +382,11 @@ process_otr (bfd *abfd, struct ext_otr *
   /* PR 17512: file: ac7da425.  */
   if (otr->esdid == 0)
     return;
-  
+
   esdid = &EDATA (abfd, otr->esdid - 1);
   contents = esdid->contents;
   dst_idx = esdid->pc;
-  
+
   for (shift = ((unsigned long) 1 << 31); shift && srcp < endp; shift >>= 1)
     {
       if (bits & shift)
@@ -873,6 +874,7 @@ versados_canonicalize_reloc (bfd *abfd,
   _bfd_generic_copy_link_hash_symbol_type
 #define versados_bfd_final_link                       _bfd_generic_final_link
 #define versados_bfd_link_split_section               _bfd_generic_link_split_section
+#define versados_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 const bfd_target m68k_versados_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/version.h ./bfd/version.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/version.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/version.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150706
+#define BFD_VERSION_DATE 20170306
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/version.m4 ./bfd/version.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/version.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/version.m4	2017-03-06 01:49:05.000000000 +0000
@@ -1 +1 @@
-m4_define([BFD_VERSION], [2.25.51])
+m4_define([BFD_VERSION], [2.28.51])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-alpha.c ./bfd/vms-alpha.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-alpha.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vms-alpha.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* vms.c -- BFD back-end for EVAX (openVMS/Alpha) files.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Initial version written by Klaus Kaempf (kkaempf@rmi.de)
    Major rewrite by Adacore.
@@ -829,7 +829,7 @@ vms_get_remaining_object_record (bfd *ab
   /* PR 17512: file: 025-1974-0.004.  */
   else if (to_read <= read_so_far)
     return 0;
-  
+
   /* Read the remaining record.  */
   to_read -= read_so_far;
 
@@ -1314,7 +1314,7 @@ _bfd_vms_slurp_egsd (bfd *abfd)
 	case EGSD__C_SYMM:
 	case EGSD__C_SYMV:
 	default:
-	  (*_bfd_error_handler) (_("Unknown EGSD subtype %d"), gsd_type);
+	  _bfd_error_handler (_("Unknown EGSD subtype %d"), gsd_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 	}
@@ -1345,7 +1345,7 @@ _bfd_vms_push (bfd *abfd, bfd_vma val, u
   if (PRIV (stackptr) >= STACKSIZE)
     {
       bfd_set_error (bfd_error_bad_value);
-      (*_bfd_error_handler) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr));
+      _bfd_error_handler (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr));
       exit (1);
     }
 }
@@ -1358,7 +1358,7 @@ _bfd_vms_pop (bfd *abfd, bfd_vma *val, u
   if (PRIV (stackptr) == 0)
     {
       bfd_set_error (bfd_error_bad_value);
-      (*_bfd_error_handler) (_("Stack underflow in _bfd_vms_pop"));
+      _bfd_error_handler (_("Stack underflow in _bfd_vms_pop"));
       exit (1);
     }
   PRIV (stackptr)--;
@@ -1595,7 +1595,7 @@ _bfd_vms_etir_name (int cmd)
 
     default:
       /* These names have not yet been added to this switch statement.  */
-      (*_bfd_error_handler) (_("unknown ETIR command %d"), cmd);
+      _bfd_error_handler (_("unknown ETIR command %d"), cmd);
     }
 
   return NULL;
@@ -1641,9 +1641,8 @@ _bfd_vms_get_value (bfd *abfd, const uns
     *vma = 0;
   else
     {
-      if (!(*info->callbacks->undefined_symbol)
-          (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE))
-        abort ();
+      (*info->callbacks->undefined_symbol)
+	(info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE);
       *vma = 0;
     }
 }
@@ -1782,8 +1781,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
             psect = bfd_getl32 (ptr);
             if ((unsigned int) psect >= PRIV (section_count))
               {
-                (*_bfd_error_handler) (_("bad section index in %s"),
-                                       _bfd_vms_etir_name (cmd));
+		_bfd_error_handler (_("bad section index in %s"),
+				    _bfd_vms_etir_name (cmd));
                 bfd_set_error (bfd_error_bad_value);
                 return FALSE;
               }
@@ -1795,8 +1794,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
         case ETIR__C_STA_LI:
         case ETIR__C_STA_MOD:
         case ETIR__C_STA_CKARG:
-          (*_bfd_error_handler) (_("unsupported STA cmd %s"),
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("unsupported STA cmd %s"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -1971,14 +1970,14 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
         case ETIR__C_STO_RB:
         case ETIR__C_STO_AB:
         case ETIR__C_STO_LP_PSB:
-          (*_bfd_error_handler) (_("%s: not supported"),
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("%s: not supported"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
         case ETIR__C_STO_HINT_GBL:
         case ETIR__C_STO_HINT_PS:
-          (*_bfd_error_handler) (_("%s: not implemented"),
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("%s: not implemented"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2002,8 +2001,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
              lw	psect index
              qw	offset.  */
         case ETIR__C_STC_PS:
-          (*_bfd_error_handler) (_("%s: not supported"),
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("%s: not supported"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2093,8 +2092,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
           /* 214 Store-conditional NOP, BSR or HINT at psect + offset
              arg: none.  */
         case ETIR__C_STC_NBH_PS:
-          (*_bfd_error_handler) ("%s: not supported",
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("%s: not supported"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2233,8 +2232,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
           if (rel1 != RELC_NONE || rel2 != RELC_NONE)
             {
             bad_context:
-              (*_bfd_error_handler) (_("invalid use of %s with contexts"),
-                                     _bfd_vms_etir_name (cmd));
+	      _bfd_error_handler (_("invalid use of %s with contexts"),
+				  _bfd_vms_etir_name (cmd));
               return FALSE;
             }
           if ((int)op2 < 0)		/* Shift right.  */
@@ -2249,8 +2248,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
         case ETIR__C_OPR_ROT:       /* Rotate.  */
         case ETIR__C_OPR_REDEF:     /* Redefine symbol to current location.  */
         case ETIR__C_OPR_DFLIT:     /* Define a literal.  */
-          (*_bfd_error_handler) (_("%s: not supported"),
-                                 _bfd_vms_etir_name (cmd));
+	  _bfd_error_handler (_("%s: not supported"),
+			      _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2267,7 +2266,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
           break;
 
         default:
-          (*_bfd_error_handler) (_("reserved cmd %d"), cmd);
+	  _bfd_error_handler (_("reserved cmd %d"), cmd);
           return FALSE;
           break;
         }
@@ -2352,7 +2351,7 @@ _bfd_vms_slurp_eeom (bfd *abfd)
   PRIV (eom_data).eom_w_comcod = bfd_getl16 (eeom->comcod);
   if (PRIV (eom_data).eom_w_comcod > 1)
     {
-      (*_bfd_error_handler) (_("Object module NOT error-free !\n"));
+      _bfd_error_handler (_("Object module NOT error-free !\n"));
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -3672,7 +3671,7 @@ _bfd_vms_write_etir (bfd * abfd, int obj
 	  unsigned int irel;
 
 	  if (section->reloc_count == 0)
-	    (*_bfd_error_handler)
+	    _bfd_error_handler
 	      (_("SEC_RELOC with no relocs in section %s"), section->name);
 
 #if VMS_DEBUG
@@ -3725,8 +3724,8 @@ _bfd_vms_write_etir (bfd * abfd, int obj
 
 		  /* Regular relocs are intertwined with binary data.  */
 	          if (curr_addr > addr)
-		    (*_bfd_error_handler) (_("Size error in section %s"),
-					   section->name);
+		    _bfd_error_handler (_("Size error in section %s"),
+					section->name);
 		  size = addr - curr_addr;
 		  sto_imm (abfd, section, size, curr_data, curr_addr);
 		  curr_data += size;
@@ -3884,7 +3883,7 @@ _bfd_vms_write_etir (bfd * abfd, int obj
 		  break;
 
 		case ALPHA_R_BSR:
-		  (*_bfd_error_handler) (_("Spurious ALPHA_R_BSR reloc"));
+		  _bfd_error_handler (_("Spurious ALPHA_R_BSR reloc"));
 		  break;
 
 		case ALPHA_R_LDA:
@@ -3925,8 +3924,8 @@ _bfd_vms_write_etir (bfd * abfd, int obj
 		  break;
 
 		default:
-		  (*_bfd_error_handler) (_("Unhandled relocation %s"),
-		  			 rptr->howto->name);
+		  _bfd_error_handler (_("Unhandled relocation %s"),
+				      rptr->howto->name);
 		  break;
 		}
 
@@ -3938,8 +3937,8 @@ _bfd_vms_write_etir (bfd * abfd, int obj
 	    {
 	      /* Output rest of section.  */
 	      if (curr_addr > section->size)
-		(*_bfd_error_handler) (_("Size error in section %s"),
-				       section->name);
+		_bfd_error_handler (_("Size error in section %s"),
+				    section->name);
 	      size = section->size - curr_addr;
 	      sto_imm (abfd, section, size, curr_data, curr_addr);
 	      curr_data += size;
@@ -4215,8 +4214,8 @@ parse_module (bfd *abfd, struct module *
 		  break;
 
 		default:
-		  (*_bfd_error_handler) (_("unknown source command %d"),
-					 cmd);
+		  _bfd_error_handler (_("unknown source command %d"),
+				      cmd);
 		  cmd_length = 2;
 		  break;
 		}
@@ -4275,31 +4274,31 @@ parse_module (bfd *abfd, struct module *
 		  break;
 
 		case DST__K_SET_LINUM_INCR:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_LINUM_INCR not implemented"));
 		  cmd_length = 2;
 		  break;
 
 		case DST__K_SET_LINUM_INCR_W:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_LINUM_INCR_W not implemented"));
 		  cmd_length = 3;
 		  break;
 
 		case DST__K_RESET_LINUM_INCR:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_RESET_LINUM_INCR not implemented"));
 		  cmd_length = 1;
 		  break;
 
 		case DST__K_BEG_STMT_MODE:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_BEG_STMT_MODE not implemented"));
 		  cmd_length = 1;
 		  break;
 
 		case DST__K_END_STMT_MODE:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_END_STMT_MODE not implemented"));
 		  cmd_length = 1;
 		  break;
@@ -4326,25 +4325,25 @@ parse_module (bfd *abfd, struct module *
 		  break;
 
 		case DST__K_SET_PC:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_PC not implemented"));
 		  cmd_length = 2;
 		  break;
 
 		case DST__K_SET_PC_W:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_PC_W not implemented"));
 		  cmd_length = 3;
 		  break;
 
 		case DST__K_SET_PC_L:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_PC_L not implemented"));
 		  cmd_length = 5;
 		  break;
 
 		case DST__K_SET_STMTNUM:
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
 		    (_("DST__K_SET_STMTNUM not implemented"));
 		  cmd_length = 2;
 		  break;
@@ -4388,8 +4387,7 @@ parse_module (bfd *abfd, struct module *
 		    }
 		  else
 		    {
-		      (*_bfd_error_handler) (_("unknown line command %d"),
-					     cmd);
+		      _bfd_error_handler (_("unknown line command %d"), cmd);
 		      cmd_length = 2;
 		    }
 		  break;
@@ -4847,7 +4845,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
             case ETIR__C_CTL_SETRB:
               if (prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
                     (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd),
                      _bfd_vms_etir_name (cmd));
                   return FALSE;
@@ -4864,7 +4863,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
                 {
                   if (prev_cmd != ETIR__C_STA_GBL)
                     {
-                      (*_bfd_error_handler)
+		      _bfd_error_handler
+			/* xgettext:c-format */
                         (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (cmd),
                          _bfd_vms_etir_name (ETIR__C_STA_LW));
                       return FALSE;
@@ -4878,7 +4878,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
 			         /* ALPHA_R_REFQUAD und_section, step 2 */
               if (prev_cmd != -1 && prev_cmd != ETIR__C_STA_GBL)
                 {
-                  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
                     (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (cmd),
                      _bfd_vms_etir_name (ETIR__C_STA_QW));
                   return FALSE;
@@ -4894,9 +4895,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
                   && prev_cmd != ETIR__C_STA_LW
                   && prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_LW));
+		  /* xgettext:c-format */
+		  _bfd_error_handler (_("Unknown reloc %s + %s"),
+				      _bfd_vms_etir_name (prev_cmd),
+				      _bfd_vms_etir_name (ETIR__C_STO_LW));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_32;
@@ -4906,9 +4908,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
 			         /* ALPHA_R_REFQUAD abs_section, step 2 */
               if (prev_cmd != ETIR__C_OPR_ADD && prev_cmd != ETIR__C_STA_QW)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_QW));
+		  /* xgettext:c-format */
+		  _bfd_error_handler (_("Unknown reloc %s + %s"),
+				      _bfd_vms_etir_name (prev_cmd),
+				      _bfd_vms_etir_name (ETIR__C_STO_QW));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_64;
@@ -4917,9 +4920,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
             case ETIR__C_STO_OFF: /* ALPHA_R_REFQUAD others, step 2 */
               if (prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_OFF));
+		  /* xgettext:c-format */
+		  _bfd_error_handler (_("Unknown reloc %s + %s"),
+				      _bfd_vms_etir_name (prev_cmd),
+				      _bfd_vms_etir_name (ETIR__C_STO_OFF));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_64;
@@ -4929,9 +4933,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
                                   /* ALPHA_R_REFQUAD und_section, step 3 */
               if (prev_cmd != ETIR__C_STA_LW && prev_cmd != ETIR__C_STA_QW)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_OPR_ADD));
+		  /* xgettext:c-format */
+		  _bfd_error_handler (_("Unknown reloc %s + %s"),
+				      _bfd_vms_etir_name (prev_cmd),
+				      _bfd_vms_etir_name (ETIR__C_OPR_ADD));
                   return FALSE;
                 }
               prev_cmd = ETIR__C_OPR_ADD;
@@ -4984,8 +4989,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
               continue;
 
             default:
-              (*_bfd_error_handler) (_("Unknown reloc %s"),
-                                     _bfd_vms_etir_name (cmd));
+	      _bfd_error_handler (_("Unknown reloc %s"),
+				  _bfd_vms_etir_name (cmd));
               return FALSE;
             }
 
@@ -4997,14 +5002,14 @@ alpha_vms_slurp_relocs (bfd *abfd)
             /* Get section to which the relocation applies.  */
             if (cur_psect < 0 || cur_psect > (int)PRIV (section_count))
               {
-                (*_bfd_error_handler) (_("Invalid section index in ETIR"));
+		_bfd_error_handler (_("Invalid section index in ETIR"));
                 return FALSE;
               }
 
             sec = PRIV (sections)[cur_psect];
             if (sec == bfd_abs_section_ptr)
               {
-                (*_bfd_error_handler) (_("Relocation for non-REL psect"));
+		_bfd_error_handler (_("Relocation for non-REL psect"));
                 return FALSE;
               }
 
@@ -5051,8 +5056,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
                     }
                 if (sym == NULL)
                   {
-                    (*_bfd_error_handler) (_("Unknown symbol in command %s"),
-                                           _bfd_vms_etir_name (cmd));
+		    _bfd_error_handler (_("Unknown symbol in command %s"),
+					_bfd_vms_etir_name (cmd));
                     reloc->sym_ptr_ptr = NULL;
                   }
                 else
@@ -5452,7 +5457,7 @@ alpha_vms_bfd_reloc_type_lookup (bfd * a
       case BFD_RELOC_ALPHA_LDA:		alpha_type = ALPHA_R_LDA;	break;
       case BFD_RELOC_ALPHA_BOH:		alpha_type = ALPHA_R_BOH;	break;
       default:
-	(*_bfd_error_handler) ("reloc (%d) is *UNKNOWN*", code);
+	_bfd_error_handler (_("reloc (%d) is *UNKNOWN*"), code);
 	return NULL;
     }
   vms_debug2 ((2, "reloc is %s\n", alpha_howto_table[alpha_type].name));
@@ -5566,6 +5571,7 @@ evax_bfd_print_emh (FILE *file, unsigned
 
   subtype = (unsigned)bfd_getl16 (emh->subtyp);
 
+  /* xgettext:c-format */
   fprintf (file, _("  EMH %u (len=%u): "), subtype, rec_len);
 
   switch (subtype)
@@ -5715,6 +5721,7 @@ evax_bfd_print_egsd (FILE *file, unsigne
       type = (unsigned)bfd_getl16 (e->gsdtyp);
       len = (unsigned)bfd_getl16 (e->gsdsiz);
 
+      /* xgettext:c-format */
       fprintf (file, _("  EGSD entry %2u (type: %u, len: %u): "),
                n, type, len);
       n++;
@@ -5917,18 +5924,22 @@ evax_bfd_print_hex (FILE *file, const ch
 static void
 evax_bfd_print_etir_stc_ir (FILE *file, const unsigned char *buf, int is_ps)
 {
+  /* xgettext:c-format */
   fprintf (file, _("    linkage index: %u, replacement insn: 0x%08x\n"),
            (unsigned)bfd_getl32 (buf),
            (unsigned)bfd_getl32 (buf + 16));
+  /* xgettext:c-format */
   fprintf (file, _("    psect idx 1: %u, offset 1: 0x%08x %08x\n"),
            (unsigned)bfd_getl32 (buf + 4),
            (unsigned)bfd_getl32 (buf + 12),
            (unsigned)bfd_getl32 (buf + 8));
+  /* xgettext:c-format */
   fprintf (file, _("    psect idx 2: %u, offset 2: 0x%08x %08x\n"),
            (unsigned)bfd_getl32 (buf + 20),
            (unsigned)bfd_getl32 (buf + 28),
            (unsigned)bfd_getl32 (buf + 24));
   if (is_ps)
+    /* xgettext:c-format */
     fprintf (file, _("    psect idx 3: %u, offset 3: 0x%08x %08x\n"),
              (unsigned)bfd_getl32 (buf + 32),
              (unsigned)bfd_getl32 (buf + 40),
@@ -5944,6 +5955,7 @@ evax_bfd_print_etir (FILE *file, const c
   unsigned int off = sizeof (struct vms_egsd);
   unsigned int sec_len = 0;
 
+  /* xgettext:c-format */
   fprintf (file, _("  %s (len=%u+%u):\n"), name,
            (unsigned)(rec_len - sizeof (struct vms_eobjrec)),
            (unsigned)sizeof (struct vms_eobjrec));
@@ -5959,6 +5971,7 @@ evax_bfd_print_etir (FILE *file, const c
       size = bfd_getl16 (etir->size);
       buf = rec + off + sizeof (struct vms_etir);
 
+      /* xgettext:c-format */
       fprintf (file, _("   (type: %3u, size: 4+%3u): "), type, size - 4);
       switch (type)
         {
@@ -5977,6 +5990,7 @@ evax_bfd_print_etir (FILE *file, const c
           break;
         case ETIR__C_STA_PQ:
           fprintf (file, _("STA_PQ (stack psect base + offset)\n"));
+	  /* xgettext:c-format */
           fprintf (file, _("    psect: %u, offset: 0x%08x %08x\n"),
                    (unsigned)bfd_getl32 (buf + 0),
                    (unsigned)bfd_getl32 (buf + 8),
@@ -6113,6 +6127,7 @@ evax_bfd_print_etir (FILE *file, const c
         case ETIR__C_STC_LP_PSB:
           fprintf (file,
                    _("STC_LP_PSB (store cond linkage pair + signature)\n"));
+	  /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, procedure: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           buf += 4 + 1 + buf[4];
@@ -6120,17 +6135,20 @@ evax_bfd_print_etir (FILE *file, const c
           break;
         case ETIR__C_STC_GBL:
           fprintf (file, _("STC_GBL (store cond global)\n"));
+	  /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, global: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           break;
         case ETIR__C_STC_GCA:
           fprintf (file, _("STC_GCA (store cond code address)\n"));
+	  /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, procedure name: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           break;
         case ETIR__C_STC_PS:
           fprintf (file, _("STC_PS (store cond psect + offset)\n"));
           fprintf (file,
+		   /* xgettext:c-format */
                    _("   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"),
                    (unsigned)bfd_getl32 (buf),
                    (unsigned)bfd_getl32 (buf + 4),
@@ -6348,6 +6366,7 @@ evax_bfd_print_relocation_records (FILE 
         break;
       base = bfd_getl32 (rel + 4);
 
+      /* xgettext:c-format */
       fprintf (file, _("  bitcount: %u, base addr: 0x%08x\n"),
                count, base);
 
@@ -6361,6 +6380,7 @@ evax_bfd_print_relocation_records (FILE 
           val = bfd_getl32 (rel);
           rel += 4;
 
+	  /* xgettext:c-format */
           fprintf (file, _("   bitmap: 0x%08x (count: %u):\n"), val, count);
 
           for (k = 0; k < 32; k++)
@@ -6393,11 +6413,13 @@ evax_bfd_print_address_fixups (FILE *fil
       count = bfd_getl32 (rel + 0);
       if (count == 0)
         return;
+      /* xgettext:c-format */
       fprintf (file, _("  image %u (%u entries)\n"),
                (unsigned)bfd_getl32 (rel + 4), count);
       rel += 8;
       for (j = 0; j < count; j++)
         {
+	  /* xgettext:c-format */
           fprintf (file, _("   offset: 0x%08x, val: 0x%08x\n"),
                    (unsigned)bfd_getl32 (rel + 0),
                    (unsigned)bfd_getl32 (rel + 4));
@@ -6419,6 +6441,7 @@ evax_bfd_print_reference_fixups (FILE *f
       count = bfd_getl32 (rel + 0);
       if (count == 0)
         break;
+      /* xgettext:c-format */
       fprintf (file, _("  image %u (%u entries), offsets:\n"),
                (unsigned)bfd_getl32 (rel + 4), count);
       rel += 8;
@@ -6552,6 +6575,7 @@ evax_bfd_print_desc (const unsigned char
     }
   else
     {
+      /* xgettext:c-format */
       fprintf (file, _("class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"),
                bclass, dtype, len, pointer);
       switch (bclass)
@@ -6567,10 +6591,12 @@ evax_bfd_print_desc (const unsigned char
                      evax_bfd_get_dsc_name (dsc->dtype));
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+		     /* xgettext:c-format */
                      _("dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"),
                      dsc->dimct, dsc->aflags, dsc->digits, dsc->scale);
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+		     /* xgettext:c-format */
                      _("arsize: %u, a0: 0x%08x\n"),
                      (unsigned)bfd_getl32 (dsc->arsize),
                      (unsigned)bfd_getl32 (dsc->a0));
@@ -6580,7 +6606,7 @@ evax_bfd_print_desc (const unsigned char
             for (i = 0; i < dsc->dimct; i++)
               {
                 evax_bfd_print_indent (indent + 2, file);
-                fprintf (file, _("[%u]: %u\n"), i + 1,
+                fprintf (file, "[%u]: %u\n", i + 1,
                          (unsigned)bfd_getl32 (b));
                 b += 4;
               }
@@ -6590,6 +6616,7 @@ evax_bfd_print_desc (const unsigned char
             for (i = 0; i < dsc->dimct; i++)
               {
                 evax_bfd_print_indent (indent + 2, file);
+		/* xgettext:c-format */
                 fprintf (file, _("[%u]: Lower: %u, upper: %u\n"), i + 1,
                          (unsigned)bfd_getl32 (b + 0),
                          (unsigned)bfd_getl32 (b + 4));
@@ -6606,6 +6633,7 @@ evax_bfd_print_desc (const unsigned char
                      evax_bfd_get_dsc_name (ubs->dtype));
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+		     /* xgettext:c-format */
                      _("base: %u, pos: %u\n"),
                      (unsigned)bfd_getl32 (ubs->base),
                      (unsigned)bfd_getl32 (ubs->pos));
@@ -6626,6 +6654,7 @@ evax_bfd_print_valspec (const unsigned c
   unsigned int len = 5;
 
   evax_bfd_print_indent (indent, file);
+  /* xgettext:c-format */
   fprintf (file, _("vflags: 0x%02x, value: 0x%08x "), vflags, value);
   buf += 5;
 
@@ -6654,6 +6683,7 @@ evax_bfd_print_valspec (const unsigned c
       fprintf (file, _("(at bit offset %u)\n"), value);
       break;
     default:
+      /* xgettext:c-format */
       fprintf (file, _("(reg: %u, disp: %u, indir: %u, kind: "),
                (vflags & DST__K_REGNUM_MASK) >> DST__K_REGNUM_SHIFT,
                vflags & DST__K_DISP ? 1 : 0,
@@ -6686,24 +6716,26 @@ evax_bfd_print_typspec (const unsigned c
   unsigned int len = (unsigned)bfd_getl16 (buf);
 
   evax_bfd_print_indent (indent, file);
-  fprintf (file, ("len: %2u, kind: %2u "), len, kind);
+  /* xgettext:c-format */
+  fprintf (file, _("len: %2u, kind: %2u "), len, kind);
   buf += 3;
   switch (kind)
     {
     case DST__K_TS_ATOM:
-      fprintf (file, ("atomic, type=0x%02x %s\n"),
+    /* xgettext:c-format */
+      fprintf (file, _("atomic, type=0x%02x %s\n"),
                buf[0], evax_bfd_get_dsc_name (buf[0]));
       break;
     case DST__K_TS_IND:
-      fprintf (file, ("indirect, defined at 0x%08x\n"),
+      fprintf (file, _("indirect, defined at 0x%08x\n"),
                (unsigned)bfd_getl32 (buf));
       break;
     case DST__K_TS_TPTR:
-      fprintf (file, ("typed pointer\n"));
+      fprintf (file, _("typed pointer\n"));
       evax_bfd_print_typspec (buf, indent + 1, file);
       break;
     case DST__K_TS_PTR:
-      fprintf (file, ("pointer\n"));
+      fprintf (file, _("pointer\n"));
       break;
     case DST__K_TS_ARRAY:
       {
@@ -6711,30 +6743,30 @@ evax_bfd_print_typspec (const unsigned c
         unsigned int vec_len;
         unsigned int i;
 
-        fprintf (file, ("array, dim: %u, bitmap: "), buf[0]);
+        fprintf (file, _("array, dim: %u, bitmap: "), buf[0]);
         vec_len = (buf[0] + 1 + 7) / 8;
         for (i = 0; i < vec_len; i++)
           fprintf (file, " %02x", buf[i + 1]);
         fputc ('\n', file);
         vs = buf + 1 + vec_len;
         evax_bfd_print_indent (indent, file);
-        fprintf (file, ("array descriptor:\n"));
+        fprintf (file, _("array descriptor:\n"));
         vs += evax_bfd_print_valspec (vs, indent + 1, file);
         for (i = 0; i < buf[0] + 1U; i++)
           if (buf[1 + i / 8] & (1 << (i % 8)))
             {
               evax_bfd_print_indent (indent, file);
               if (i == 0)
-                fprintf (file, ("type spec for element:\n"));
+                fprintf (file, _("type spec for element:\n"));
               else
-                fprintf (file, ("type spec for subscript %u:\n"), i);
+                fprintf (file, _("type spec for subscript %u:\n"), i);
               evax_bfd_print_typspec (vs, indent + 1, file);
               vs += bfd_getl16 (vs);
             }
       }
       break;
     default:
-      fprintf (file, ("*unhandled*\n"));
+      fprintf (file, _("*unhandled*\n"));
     }
 }
 
@@ -6761,6 +6793,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
         }
       len = bfd_getl16 (dsth.length);
       type = bfd_getl16 (dsth.type);
+      /* xgettext:c-format */
       fprintf (file, _(" type: %3u, len: %3u (at 0x%08x): "),
                type, len, off);
       if (len == 0)
@@ -6829,6 +6862,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
             const char *name = (const char *)buf + sizeof (*dst);
 
             fprintf (file, _("modbeg\n"));
+	    /* xgettext:c-format */
             fprintf (file, _("   flags: %d, language: %u, "
                              "major: %u, minor: %u\n"),
                      dst->flags,
@@ -6851,6 +6885,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
             const char *name = (const char *)buf + sizeof (*dst);
 
             fputs (_("rtnbeg\n"), file);
+	    /* xgettext:c-format */
             fprintf (file, _("    flags: %u, address: 0x%08x, "
                              "pd-address: 0x%08x\n"),
                      dst->flags,
@@ -6880,6 +6915,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
           {
             struct vms_dst_epilog *dst = (void *)buf;
 
+	    /* xgettext:c-format */
             fprintf (file, _("epilog: flags: %u, count: %u\n"),
                      dst->flags, (unsigned)bfd_getl32 (dst->count));
           }
@@ -6889,6 +6925,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
             struct vms_dst_blkbeg *dst = (void *)buf;
             const char *name = (const char *)buf + sizeof (*dst);
 
+	    /* xgettext:c-format */
             fprintf (file, _("blkbeg: address: 0x%08x, name: %.*s\n"),
                      (unsigned)bfd_getl32 (dst->address),
                      name[0], name + 1);
@@ -6922,7 +6959,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
 
             fprintf (file, _("recbeg: name: %.*s\n"), name[0], name + 1);
             evax_bfd_print_valspec (buf, 4, file);
-            fprintf (file, ("    len: %u bits\n"),
+            fprintf (file, _("    len: %u bits\n"),
                      (unsigned)bfd_getl32 (name + 1 + name[0]));
           }
           break;
@@ -6930,6 +6967,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
           fprintf (file, _("recend\n"));
           break;
         case DST__K_ENUMBEG:
+	  /* xgettext:c-format */
           fprintf (file, _("enumbeg, len: %u, name: %.*s\n"),
                    buf[0], buf[1], buf + 2);
           break;
@@ -6943,9 +6981,9 @@ evax_bfd_print_dst (struct bfd *abfd, un
         case DST__K_LABEL:
           {
             struct vms_dst_label *lab = (void *)buf;
-            fprintf (file, ("label, name: %.*s\n"),
+            fprintf (file, _("label, name: %.*s\n"),
                      lab->name[0], lab->name + 1);
-            fprintf (file, ("    address: 0x%08x\n"),
+            fprintf (file, _("    address: 0x%08x\n"),
                      (unsigned)bfd_getl32 (lab->value));
           }
           break;
@@ -6957,6 +6995,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
 
             fprintf (file, _("discontiguous range (nbr: %u)\n"), cnt);
             for (i = 0; i < cnt; i++, rng += 8)
+	      /* xgettext:c-format */
               fprintf (file, _("    address: 0x%08x, size: %u\n"),
                        (unsigned)bfd_getl32 (rng),
                        (unsigned)bfd_getl32 (rng + 4));
@@ -7051,6 +7090,7 @@ evax_bfd_print_dst (struct bfd *abfd, un
                         fprintf (file, _("delta pc +%-4d"), -cmd);
                         line++;  /* FIXME: curr increment.  */
                         pc += -cmd;
+			/* xgettext:c-format */
                         fprintf (file, _("    pc: 0x%08x line: %5u\n"),
                                  pc, line);
                         cmdlen = 1;
@@ -7085,10 +7125,12 @@ evax_bfd_print_dst (struct bfd *abfd, un
                       struct vms_dst_src_decl_src *src = (void *)(buf + 1);
                       const char *name;
 
+		      /* xgettext:c-format */
                       fprintf (file, _("   declfile: len: %u, flags: %u, "
                                        "fileid: %u\n"),
                                src->length, src->flags,
                                (unsigned)bfd_getl16 (src->fileid));
+		      /* xgettext:c-format */
                       fprintf (file, _("   rms: cdt: 0x%08x %08x, "
                                        "ebk: 0x%08x, ffb: 0x%04x, "
                                        "rfo: %u\n"),
@@ -7192,9 +7234,11 @@ evax_bfd_print_image (bfd *abfd, FILE *f
       fprintf (file, _("cannot read EIHD\n"));
       return;
     }
+  /* xgettext:c-format */
   fprintf (file, _("EIHD: (size: %u, nbr blocks: %u)\n"),
            (unsigned)bfd_getl32 (eihd.size),
            (unsigned)bfd_getl32 (eihd.hdrblkcnt));
+  /* xgettext:c-format */
   fprintf (file, _(" majorid: %u, minorid: %u\n"),
            (unsigned)bfd_getl32 (eihd.majorid),
            (unsigned)bfd_getl32 (eihd.minorid));
@@ -7212,6 +7256,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
       name = _("unknown");
       break;
     }
+  /* xgettext:c-format */
   fprintf (file, _(" image type: %u (%s)"), val, name);
 
   val = (unsigned)bfd_getl32 (eihd.subtype);
@@ -7227,12 +7272,14 @@ evax_bfd_print_image (bfd *abfd, FILE *f
       name = _("unknown");
       break;
     }
+  /* xgettext:c-format */
   fprintf (file, _(", subtype: %u (%s)\n"), val, name);
 
   eisd_off = bfd_getl32 (eihd.isdoff);
   eiha_off = bfd_getl32 (eihd.activoff);
   eihi_off = bfd_getl32 (eihd.imgidoff);
   eihs_off = bfd_getl32 (eihd.symdbgoff);
+  /* xgettext:c-format */
   fprintf (file, _(" offsets: isd: %u, activ: %u, symdbg: %u, "
                    "imgid: %u, patch: %u\n"),
            eisd_off, eiha_off, eihs_off, eihi_off,
@@ -7246,6 +7293,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
                    " version array off: %u\n"),
            eihvn_off);
   fprintf (file,
+	   /* xgettext:c-format */
            _(" img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"),
            (unsigned)bfd_getl32 (eihd.imgiocnt),
            (unsigned)bfd_getl32 (eihd.iochancnt),
@@ -7282,6 +7330,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
   if (val & EIHD__M_EXT_BIND_SECT)
     fprintf (file, " EXT_BIND_SECT");
   fprintf (file, "\n");
+  /* xgettext:c-format */
   fprintf (file, _(" ident: 0x%08x, sysver: 0x%08x, "
                    "match ctrl: %u, symvect_size: %u\n"),
            (unsigned)bfd_getl32 (eihd.ident),
@@ -7294,6 +7343,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
     {
       eihef_off = bfd_getl32 (eihd.ext_fixup_off);
       eihnp_off = bfd_getl32 (eihd.noopt_psect_off);
+      /* xgettext:c-format */
       fprintf (file, _(", ext fixup offset: %u, no_opt psect off: %u"),
                eihef_off, eihnp_off);
     }
@@ -7389,7 +7439,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
                 fputs (_("*unknown*        "), file);
                 break;
               }
-            fprintf (file, _(": %u.%u\n"),
+            fprintf (file, ": %u.%u\n",
                      (unsigned)bfd_getl16 (ver.major),
                      (unsigned)bfd_getl16 (ver.minor));
           }
@@ -7407,18 +7457,23 @@ evax_bfd_print_image (bfd *abfd, FILE *f
         }
       fprintf (file, _("Image activation:  (size=%u)\n"),
                (unsigned)bfd_getl32 (eiha.size));
+      /* xgettext:c-format */
       fprintf (file, _(" First address : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr1_h),
                (unsigned)bfd_getl32 (eiha.tfradr1));
+      /* xgettext:c-format */
       fprintf (file, _(" Second address: 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr2_h),
                (unsigned)bfd_getl32 (eiha.tfradr2));
+      /* xgettext:c-format */
       fprintf (file, _(" Third address : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr3_h),
                (unsigned)bfd_getl32 (eiha.tfradr3));
+      /* xgettext:c-format */
       fprintf (file, _(" Fourth address: 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr4_h),
                (unsigned)bfd_getl32 (eiha.tfradr4));
+      /* xgettext:c-format */
       fprintf (file, _(" Shared image  : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.inishr_h),
                (unsigned)bfd_getl32 (eiha.inishr));
@@ -7433,6 +7488,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
           fprintf (file, _("cannot read EIHI\n"));
           return;
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image identification: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eihi.majorid),
                (unsigned)bfd_getl32 (eihi.minorid));
@@ -7457,19 +7513,23 @@ evax_bfd_print_image (bfd *abfd, FILE *f
           fprintf (file, _("cannot read EIHS\n"));
           return;
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image symbol & debug table: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eihs.majorid),
                (unsigned)bfd_getl32 (eihs.minorid));
       dst_vbn = bfd_getl32 (eihs.dstvbn);
       dst_size = bfd_getl32 (eihs.dstsize);
+      /* xgettext:c-format */
       fprintf (file, _(" debug symbol table : vbn: %u, size: %u (0x%x)\n"),
                dst_vbn, dst_size, dst_size);
       gst_vbn = bfd_getl32 (eihs.gstvbn);
       gst_size = bfd_getl32 (eihs.gstsize);
+      /* xgettext:c-format */
       fprintf (file, _(" global symbol table: vbn: %u, records: %u\n"),
                gst_vbn, gst_size);
       dmt_vbn = bfd_getl32 (eihs.dmtvbn);
       dmt_size = bfd_getl32 (eihs.dmtsize);
+      /* xgettext:c-format */
       fprintf (file, _(" debug module table : vbn: %u, size: %u\n"),
                dmt_vbn, dmt_size);
     }
@@ -7493,6 +7553,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
           /* Next block.  */
           eisd_off = (eisd_off + VMS_BLOCK_SIZE) & ~(VMS_BLOCK_SIZE - 1);
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image section descriptor: (major: %u, minor: %u, "
                        "size: %u, offset: %u)\n"),
                (unsigned)bfd_getl32 (eisd.majorid),
@@ -7500,6 +7561,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
                len, eisd_off);
       if (len == 0)
         break;
+      /* xgettext:c-format */
       fprintf (file, _(" section: base: 0x%08x%08x size: 0x%08x\n"),
                (unsigned)bfd_getl32 (eisd.virt_addr + 4),
                (unsigned)bfd_getl32 (eisd.virt_addr + 0),
@@ -7542,6 +7604,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
           eiaf_vbn = bfd_getl32 (eisd.vbn);
           eiaf_size = bfd_getl32 (eisd.secsize);
         }
+      /* xgettext:c-format */
       fprintf (file, _(" vbn: %u, pfc: %u, matchctl: %u type: %u ("),
                (unsigned)bfd_getl32 (eisd.vbn),
                eisd.pfc, eisd.matchctl, eisd.type);
@@ -7571,6 +7634,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
         }
       fputs (_(")\n"), file);
       if (val & EISD__M_GBL)
+	/* xgettext:c-format */
         fprintf (file, _(" ident: 0x%08x, name: %.*s\n"),
                  (unsigned)bfd_getl32 (eisd.ident),
                  eisd.gblnam[0], eisd.gblnam + 1);
@@ -7599,6 +7663,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
             }
           count = bfd_getl16 (dmth.psect_count);
           fprintf (file,
+		   /* xgettext:c-format */
                    _(" module offset: 0x%08x, size: 0x%08x, (%u psects)\n"),
                    (unsigned)bfd_getl32 (dmth.modbeg),
                    (unsigned)bfd_getl32 (dmth.size), count);
@@ -7612,6 +7677,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
                   fprintf (file, _("cannot read DMT psect\n"));
                   return;
                 }
+	      /* xgettext:c-format */
               fprintf (file, _("  psect start: 0x%08x, length: %u\n"),
                        (unsigned)bfd_getl32 (dmtp.start),
                        (unsigned)bfd_getl32 (dmtp.length));
@@ -7667,12 +7733,15 @@ evax_bfd_print_image (bfd *abfd, FILE *f
         }
       eiaf = (struct vms_eiaf *)buf;
       fprintf (file,
+	       /* xgettext:c-format */
                _("Image activator fixup: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eiaf->majorid),
                (unsigned)bfd_getl32 (eiaf->minorid));
+      /* xgettext:c-format */
       fprintf (file, _("  iaflink : 0x%08x %08x\n"),
                (unsigned)bfd_getl32 (eiaf->iaflink + 0),
                (unsigned)bfd_getl32 (eiaf->iaflink + 4));
+      /* xgettext:c-format */
       fprintf (file, _("  fixuplnk: 0x%08x %08x\n"),
                (unsigned)bfd_getl32 (eiaf->fixuplnk + 0),
                (unsigned)bfd_getl32 (eiaf->fixuplnk + 4));
@@ -7682,22 +7751,27 @@ evax_bfd_print_image (bfd *abfd, FILE *f
                (unsigned)bfd_getl32 (eiaf->flags));
       qrelfixoff = bfd_getl32 (eiaf->qrelfixoff);
       lrelfixoff = bfd_getl32 (eiaf->lrelfixoff);
+      /* xgettext:c-format */
       fprintf (file, _("  qrelfixoff: %5u, lrelfixoff: %5u\n"),
                qrelfixoff, lrelfixoff);
       qdotadroff = bfd_getl32 (eiaf->qdotadroff);
       ldotadroff = bfd_getl32 (eiaf->ldotadroff);
+      /* xgettext:c-format */
       fprintf (file, _("  qdotadroff: %5u, ldotadroff: %5u\n"),
                qdotadroff, ldotadroff);
       codeadroff = bfd_getl32 (eiaf->codeadroff);
       lpfixoff = bfd_getl32 (eiaf->lpfixoff);
+      /* xgettext:c-format */
       fprintf (file, _("  codeadroff: %5u, lpfixoff  : %5u\n"),
                codeadroff, lpfixoff);
       chgprtoff = bfd_getl32 (eiaf->chgprtoff);
       fprintf (file, _("  chgprtoff : %5u\n"), chgprtoff);
       shrimgcnt = bfd_getl32 (eiaf->shrimgcnt);
       shlstoff = bfd_getl32 (eiaf->shlstoff);
+      /* xgettext:c-format */
       fprintf (file, _("  shlstoff  : %5u, shrimgcnt : %5u\n"),
                shlstoff, shrimgcnt);
+      /* xgettext:c-format */
       fprintf (file, _("  shlextra  : %5u, permctx   : %5u\n"),
                (unsigned)bfd_getl32 (eiaf->shlextra),
                (unsigned)bfd_getl32 (eiaf->permctx));
@@ -7715,6 +7789,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
           for (j = 0; j < shrimgcnt; j++, shl++)
             {
               fprintf (file,
+		       /* xgettext:c-format */
                        _("  %u: size: %u, flags: 0x%02x, name: %.*s\n"),
                        j, shl->size, shl->flags,
                        shl->imgnam[0], shl->imgnam + 1);
@@ -7761,6 +7836,7 @@ evax_bfd_print_image (bfd *abfd, FILE *f
             {
               unsigned int prot = bfd_getl32 (eicp->newprt);
               fprintf (file,
+		       /* xgettext:c-format */
                        _("  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "),
                        (unsigned)bfd_getl32 (eicp->baseva + 4),
                        (unsigned)bfd_getl32 (eicp->baseva + 0),
@@ -8202,7 +8278,7 @@ alpha_vms_link_add_archive_symbols (bfd 
 	 to include it.  We don't need to check anything.  */
       if (!(*info->callbacks
 	    ->add_archive_element) (info, element, h->root.string, &element))
-	return FALSE;
+	continue;
       if (!alpha_vms_link_add_object_symbols (element, info))
 	return FALSE;
 
@@ -8597,7 +8673,7 @@ alpha_vms_bfd_final_link (bfd *abfd, str
   asection *dst;
   asection *dmt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* FIXME: we do not yet support relocatable link.  It is not obvious
          how to do it for debug infos.  */
@@ -8671,6 +8747,7 @@ alpha_vms_bfd_final_link (bfd *abfd, str
               && !(PRIV2 (sub, eom_data).eom_b_tfrflg & EEOM__M_WKTFR))
             {
               (*info->callbacks->einfo)
+		/* xgettext:c-format */
                 (_("%P: multiple entry points: in modules %B and %B\n"),
                  startbfd, sub);
               continue;
@@ -9013,13 +9090,13 @@ vms_new_section_hook (bfd * abfd, asecti
 {
   bfd_size_type amt;
 
-  vms_debug2 ((1, "vms_new_section_hook (%p, [%d]%s)\n",
+  vms_debug2 ((1, "vms_new_section_hook (%p, [%u]%s)\n",
                abfd, section->index, section->name));
 
   if (! bfd_set_section_alignment (abfd, section, 0))
     return FALSE;
 
-  vms_debug2 ((7, "%d: %s\n", section->index, section->name));
+  vms_debug2 ((7, "%u: %s\n", section->index, section->name));
 
   amt = sizeof (struct vms_section_data_struct);
   section->used_by_bfd = bfd_zalloc (abfd, amt);
@@ -9260,6 +9337,7 @@ bfd_vms_get_data (bfd *abfd)
   _bfd_nodynamic_get_dynamic_reloc_upper_bound
 #define alpha_vms_canonicalize_dynamic_reloc \
   _bfd_nodynamic_canonicalize_dynamic_reloc
+#define alpha_vms_bfd_link_check_relocs              _bfd_generic_link_check_relocs
 
 const bfd_target alpha_vms_vec =
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms.h ./bfd/vms.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vms.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* vms.h -- Header file for VMS (Alpha and Vax) support.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Main header file.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-lib.c ./bfd/vms-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-lib.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vms-lib.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* BFD back-end for VMS archive files.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
    Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1441,8 +1441,9 @@ _bfd_vms_lib_get_imagelib_file (bfd *el)
 
   if (res == NULL)
     {
-      (*_bfd_error_handler)(_("could not open shared image '%s' from '%s'"),
-                            filename, archive->filename);
+      /* xgettext:c-format */
+      _bfd_error_handler(_("could not open shared image '%s' from '%s'"),
+			 filename, archive->filename);
       bfd_release (archive, filename);
       return NULL;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-misc.c ./bfd/vms-misc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/vms-misc.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/vms-misc.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 /* vms-misc.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
    EVAX (openVMS/Alpha) files.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    Miscellaneous functions.
 
@@ -356,12 +356,12 @@ _bfd_vms_output_counted (struct vms_rec_
   len = strlen (value);
   if (len == 0)
     {
-      (*_bfd_error_handler) (_("_bfd_vms_output_counted called with zero bytes"));
+      _bfd_error_handler (_("_bfd_vms_output_counted called with zero bytes"));
       return;
     }
   if (len > 255)
     {
-      (*_bfd_error_handler) (_("_bfd_vms_output_counted called with too many bytes"));
+      _bfd_error_handler (_("_bfd_vms_output_counted called with too many bytes"));
       return;
     }
   _bfd_vms_output_byte (recwr, (unsigned int) len & 0xff);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/warning.m4 ./bfd/warning.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/warning.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/warning.m4	2017-03-06 01:49:05.000000000 +0000
@@ -1,29 +1,69 @@
 dnl Common configure.ac fragment
 dnl
-dnl   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
 dnl
 
+# AC_EGREP_CPP_FOR_BUILD(PATTERN, PROGRAM,
+#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ------------------------------------------------------
+AC_DEFUN([AC_EGREP_CPP_FOR_BUILD],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
+AS_IF([dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+(eval "$ac_cpp_for_build conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+dnl Quote $1 to prevent m4 from eating character classes
+  $EGREP "[$1]" >/dev/null 2>&1],
+  [$3],
+  [$4])
+rm -f conftest*
+])# AC_EGREP_CPP_FOR_BUILD
+
+
 AC_DEFUN([AM_BINUTILS_WARNINGS],[
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
+# Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
 
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
+
+# Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
+WARN_WRITE_STRINGS=""
+AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
+
+# Verify CC_FOR_BUILD to be compatible with warning flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP_FOR_BUILD([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow")
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP_FOR_BUILD([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
+
 AC_ARG_ENABLE(werror,
   [  --enable-werror         treat compile warnings as errors],
   [case "${enableval}" in
@@ -37,6 +77,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
@@ -50,25 +91,32 @@ fi
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
-		   
+
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 AC_ARG_ENABLE(build-warnings,
 [  --enable-build-warnings enable build-time compiler warnings],
 [case "${enableval}" in
-  yes)	WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes)	WARN_CFLAGS="${GCC_WARN_CFLAGS}" 
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)	if test "${GCC}" = yes ; then
 	  WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w" 
 	fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac])
 
 if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
@@ -76,5 +124,7 @@ if test x"$silent" != x"yes" && test x"$
 fi
 
 AC_SUBST(WARN_CFLAGS)
+AC_SUBST(WARN_CFLAGS_FOR_BUILD)
 AC_SUBST(NO_WERROR)
+     AC_SUBST(WARN_WRITE_STRINGS)
 ])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xcofflink.c ./bfd/xcofflink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xcofflink.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/xcofflink.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* POWER/PowerPC XCOFF linker support.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -828,7 +828,7 @@ xcoff_link_add_dynamic_symbols (bfd *abf
      output file.  */
    if (info->output_bfd->xvec != abfd->xvec)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%s: XCOFF shared object when not producing XCOFF output"),
 	 bfd_get_filename (abfd));
       bfd_set_error (bfd_error_invalid_operation);
@@ -849,7 +849,7 @@ xcoff_link_add_dynamic_symbols (bfd *abf
   lsec = bfd_get_section_by_name (abfd, ".loader");
   if (lsec == NULL)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("%s: dynamic object with no .loader section"),
 	 bfd_get_filename (abfd));
       bfd_set_error (bfd_error_no_symbols);
@@ -997,7 +997,7 @@ xcoff_link_add_dynamic_symbols (bfd *abf
     return FALSE;
   n->next = NULL;
 
-  if (abfd->my_archive == NULL)
+  if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive))
     {
       if (!bfd_xcoff_split_import_path (abfd, abfd->filename,
 					&n->path, &n->file))
@@ -1050,7 +1050,7 @@ xcoff_link_create_extra_sections (bfd * 
 	 won't work if we're producing an XCOFF output file with no
 	 XCOFF input files.  FIXME.  */
 
-      if (!info->relocatable
+      if (!bfd_link_relocatable (info)
 	  && xcoff_hash_table (info)->loader_section == NULL)
 	{
 	  asection *lsec;
@@ -1408,7 +1408,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 	      enclosing = xcoff_section_data (abfd, csect)->enclosing;
 	      if (enclosing == NULL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: `%s' has line numbers but no enclosing section"),
 		     abfd, name);
 		  bfd_set_error (bfd_error_bad_value);
@@ -1460,7 +1461,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
       /* Pick up the csect auxiliary information.  */
       if (sym.n_numaux == 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: class %d symbol `%s' has no aux entries"),
 	     abfd, sym.n_sclass, name);
 	  bfd_set_error (bfd_error_bad_value);
@@ -1482,7 +1484,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
       switch (smtyp)
 	{
 	default:
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: symbol `%s' has unrecognized csect type %d"),
 	     abfd, name, smtyp);
 	  bfd_set_error (bfd_error_bad_value);
@@ -1494,7 +1497,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 	      || sym.n_scnum != N_UNDEF
 	      || aux.x_csect.x_scnlen.l != 0)
 	    {
-	      (*_bfd_error_handler)
+	      _bfd_error_handler
+		/* xgettext:c-format */
 		(_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
 		 abfd, name, sym.n_sclass, sym.n_scnum,
 		 aux.x_csect.x_scnlen.l);
@@ -1523,7 +1527,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 	      if (sym.n_sclass != C_HIDEXT
 		  || aux.x_csect.x_scnlen.l != 0)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %d"),
 		     abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
 		  bfd_set_error (bfd_error_bad_value);
@@ -1669,7 +1674,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 		    || ((bfd_vma) sym.n_value + aux.x_csect.x_scnlen.l
 			> enclosing->vma + enclosing->size)))
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: csect `%s' not in enclosing section"),
 		   abfd, name);
 		bfd_set_error (bfd_error_bad_value);
@@ -1776,7 +1782,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 	      }
 	    if (bad)
 	      {
-		(*_bfd_error_handler)
+		_bfd_error_handler
+		  /* xgettext:c-format */
 		  (_("%B: misplaced XTY_LD `%s'"),
 		   abfd, name);
 		bfd_set_error (bfd_error_bad_value);
@@ -1992,9 +1999,10 @@ xcoff_link_add_symbols (bfd *abfd, struc
 		     sure the XCOFF linker is wholly prepared to
 		     handle them, and that would only be a warning,
 		     not an error.  */
-		  if (! ((*info->callbacks->multiple_definition)
-			 (info, &(*sym_hash)->root, NULL, NULL, (bfd_vma) 0)))
-		    goto error_return;
+		  (*info->callbacks->multiple_definition) (info,
+							   &(*sym_hash)->root,
+							   NULL, NULL,
+							   (bfd_vma) 0);
 		  /* Try not to give this error too many times.  */
 		  (*sym_hash)->flags &= ~XCOFF_MULTIPLY_DEFINED;
 		}
@@ -2095,7 +2103,8 @@ xcoff_link_add_symbols (bfd *abfd, struc
 	    {
 	      if (*rel_csect == NULL)
 		{
-		  (*_bfd_error_handler)
+		  _bfd_error_handler
+		    /* xgettext:c-format */
 		    (_("%B: reloc %s:%d not in csect"),
 		     abfd, o->name, i);
 		  bfd_set_error (bfd_error_bad_value);
@@ -2291,7 +2300,7 @@ xcoff_link_check_dynamic_ar_symbols (bfd
 	{
 	  if (!(*info->callbacks
 		->add_archive_element) (info, abfd, name, subsbfd))
-	    return FALSE;
+	    continue;
 	  *pneeded = TRUE;
 	  return TRUE;
 	}
@@ -2363,7 +2372,7 @@ xcoff_link_check_ar_symbols (bfd *abfd,
 	    {
 	      if (!(*info->callbacks
 		    ->add_archive_element) (info, abfd, name, subsbfd))
-		return FALSE;
+		continue;
 	      *pneeded = TRUE;
 	      return TRUE;
 	    }
@@ -2700,7 +2709,7 @@ xcoff_mark_symbol (struct bfd_link_info 
 
   /* If we're marking an undefined symbol, try find some way of
      defining it.  */
-  if (!info->relocatable
+  if (!bfd_link_relocatable (info)
       && (h->flags & XCOFF_IMPORT) == 0
       && (h->flags & XCOFF_DEF_REGULAR) == 0
       && (h->root.type == bfd_link_hash_undefined
@@ -3117,11 +3126,8 @@ bfd_xcoff_import_symbol (bfd *output_bfd
       if (h->root.type == bfd_link_hash_defined
 	  && (! bfd_is_abs_section (h->root.u.def.section)
 	      || h->root.u.def.value != val))
-	{
-	  if (! ((*info->callbacks->multiple_definition)
-		 (info, &h->root, output_bfd, bfd_abs_section_ptr, val)))
-	    return FALSE;
-	}
+	(*info->callbacks->multiple_definition) (info, &h->root, output_bfd,
+						 bfd_abs_section_ptr, val);
 
       h->root.type = bfd_link_hash_defined;
       h->root.u.def.section = bfd_abs_section_ptr;
@@ -3189,7 +3195,7 @@ bfd_xcoff_link_count_reloc (bfd *output_
 				     FALSE));
   if (h == NULL)
     {
-      (*_bfd_error_handler) (_("%s: no such symbol"), name);
+      _bfd_error_handler (_("%s: no such symbol"), name);
       bfd_set_error (bfd_error_no_symbols);
       return FALSE;
     }
@@ -3293,7 +3299,7 @@ xcoff_build_ldsym (struct xcoff_loader_i
   if ((h->flags & XCOFF_EXPORT) != 0
       && (h->flags & XCOFF_WAS_UNDEFINED) != 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
 	(_("warning: attempt to export undefined symbol `%s'"),
 	 h->root.root.string);
       return TRUE;
@@ -3672,7 +3678,7 @@ bfd_xcoff_size_dynamic_sections (bfd *ou
 				     "__rtinit", FALSE, FALSE, TRUE);
       if (hsym == NULL)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("error: undefined symbol __rtinit"));
 	  return FALSE;
 	}
@@ -3714,7 +3720,7 @@ bfd_xcoff_size_dynamic_sections (bfd *ou
     }
 
   /* Garbage collect unused sections.  */
-  if (info->relocatable || !gc)
+  if (bfd_link_relocatable (info) || !gc)
     {
       gc = FALSE;
       xcoff_hash_table (info)->gc = FALSE;
@@ -4051,7 +4057,8 @@ xcoff_create_ldrel (bfd *output_bfd, str
 	ldrel.l_symndx = 2;
       else
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: loader reloc in unrecognized section `%s'"),
 	     reference_bfd, secname);
 	  bfd_set_error (bfd_error_nonrepresentable_section);
@@ -4062,7 +4069,8 @@ xcoff_create_ldrel (bfd *output_bfd, str
     {
       if (h->ldindx < 0)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
+	    /* xgettext:c-format */
 	    (_("%B: `%s' in loader reloc but not loader sym"),
 	     reference_bfd, h->root.root.string);
 	  bfd_set_error (bfd_error_bad_value);
@@ -4078,7 +4086,8 @@ xcoff_create_ldrel (bfd *output_bfd, str
   if (xcoff_hash_table (flinfo->info)->textro
       && strcmp (output_section->name, ".text") == 0)
     {
-      (*_bfd_error_handler)
+      _bfd_error_handler
+	/* xgettext:c-format */
 	(_("%B: loader reloc in read-only section %A"),
 	 reference_bfd, output_section);
       bfd_set_error (bfd_error_invalid_operation);
@@ -4145,7 +4154,7 @@ xcoff_link_input_bfd (struct xcoff_final
   if (! flinfo->info->keep_memory)
     copy = TRUE;
   hash = TRUE;
-  if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+  if (flinfo->info->traditional_format)
     hash = FALSE;
 
   if (! _bfd_coff_get_external_symbols (input_bfd))
@@ -4942,10 +4951,9 @@ xcoff_link_input_bfd (struct xcoff_final
                               if (name == NULL)
                                 return FALSE;
 
-                              if (!(*flinfo->info->callbacks->unattached_reloc)
-                                  (flinfo->info, name, input_bfd, o,
-                                   irel->r_vaddr))
-                                return FALSE;
+			      (*flinfo->info->callbacks->unattached_reloc)
+				(flinfo->info, name,
+				 input_bfd, o, irel->r_vaddr);
                             }
 			}
 		    }
@@ -5103,7 +5111,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct 
       /* Make sure that the start of the TOC is also within range.  */
       if (best_address > toc_start + 0x8000)
 	{
-	  (*_bfd_error_handler)
+	  _bfd_error_handler
 	    (_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc "
 	       "when compiling"),
 	     (unsigned long) (toc_end - toc_start));
@@ -5118,7 +5126,8 @@ xcoff_find_tc0 (bfd *output_bfd, struct 
   xcoff_data (output_bfd)->sntoc = section_index;
 
   /* Fill out the TC0 symbol.  */
-  if (!bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab, &irsym, "TOC"))
+  if (!bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab,
+				  &irsym, "TOC"))
     return FALSE;
   irsym.n_value = best_address;
   irsym.n_scnum = section_index;
@@ -5383,7 +5392,8 @@ xcoff_write_global_symbol (struct bfd_ha
 	 the reloc.  */
       if (flinfo->info->strip != strip_all)
 	{
-	  result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab,
+	  result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->info,
+					      flinfo->strtab,
 					      &irsym, h->root.root.string);
 	  if (!result)
 	    return FALSE;
@@ -5557,8 +5567,8 @@ xcoff_write_global_symbol (struct bfd_ha
 
   h->indx = obj_raw_syment_count (output_bfd);
 
-  result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab, &isym,
-				      h->root.root.string);
+  result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab,
+				      &isym, h->root.root.string);
   if (!result)
     return FALSE;
 
@@ -5710,9 +5720,8 @@ xcoff_reloc_link_order (bfd *output_bfd,
 				     FALSE, FALSE, TRUE));
   if (h == NULL)
     {
-      if (! ((*flinfo->info->callbacks->unattached_reloc)
-	     (flinfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0)))
-	return FALSE;
+      (*flinfo->info->callbacks->unattached_reloc)
+	(flinfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0);
       return TRUE;
     }
 
@@ -5750,13 +5759,9 @@ xcoff_reloc_link_order (bfd *output_bfd,
 	case bfd_reloc_outofrange:
 	  abort ();
 	case bfd_reloc_overflow:
-	  if (! ((*flinfo->info->callbacks->reloc_overflow)
-		 (flinfo->info, NULL, link_order->u.reloc.p->u.name,
-		  howto->name, addend, NULL, NULL, (bfd_vma) 0)))
-	    {
-	      free (buf);
-	      return FALSE;
-	    }
+	  (*flinfo->info->callbacks->reloc_overflow)
+	    (flinfo->info, NULL, link_order->u.reloc.p->u.name,
+	     howto->name, addend, NULL, NULL, (bfd_vma) 0);
 	  break;
 	}
       ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
@@ -5830,7 +5835,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, st
   file_ptr pos;
   bfd_size_type amt;
 
-  if (info->shared)
+  if (bfd_link_pic (info))
     abfd->flags |= DYNAMIC;
 
   symesz = bfd_coff_symesz (abfd);
@@ -6280,10 +6285,9 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, st
 	    {
 	      if ((*rel_hash)->indx < 0)
 		{
-		  if (! ((*info->callbacks->unattached_reloc)
-			 (info, (*rel_hash)->root.root.string,
-			  NULL, o, irel->r_vaddr)))
-		    goto error_return;
+		  (*info->callbacks->unattached_reloc)
+		    (info, (*rel_hash)->root.root.string,
+		     NULL, o, irel->r_vaddr);
 		  (*rel_hash)->indx = 0;
 		}
 	      irel->r_symndx = (*rel_hash)->indx;
@@ -6296,10 +6300,9 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, st
 	{
 	  if (toc_rel_hash->h->u.toc_indx < 0)
 	    {
-	      if (! ((*info->callbacks->unattached_reloc)
-		     (info, toc_rel_hash->h->root.root.string,
-		      NULL, o, toc_rel_hash->rel->r_vaddr)))
-		goto error_return;
+	      (*info->callbacks->unattached_reloc)
+		(info, toc_rel_hash->h->root.root.string,
+		 NULL, o, toc_rel_hash->rel->r_vaddr);
 	      toc_rel_hash->h->u.toc_indx = 0;
 	    }
 	  toc_rel_hash->rel->r_symndx = toc_rel_hash->h->u.toc_indx;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xsym.c ./bfd/xsym.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xsym.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/xsym.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* xSYM symbol-file support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -59,6 +59,7 @@
 #define bfd_sym_bfd_final_link                      _bfd_generic_final_link
 #define bfd_sym_bfd_link_split_section              _bfd_generic_link_split_section
 #define bfd_sym_get_section_contents_in_window      _bfd_generic_get_section_contents_in_window
+#define bfd_sym_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 extern const bfd_target sym_vec;
 
@@ -1804,7 +1805,7 @@ bfd_sym_print_type_information_table_ent
 
   fprintf (f, "\n            ");
 
-  buf = alloca (entry->physical_size);
+  buf = malloc (entry->physical_size);
   if (buf == NULL)
     {
       fprintf (f, "[ERROR]\n");
@@ -1813,11 +1814,13 @@ bfd_sym_print_type_information_table_ent
   if (bfd_seek (abfd, entry->offset, SEEK_SET) < 0)
     {
       fprintf (f, "[ERROR]\n");
+      free (buf);
       return;
     }
   if (bfd_bread (buf, entry->physical_size, abfd) != entry->physical_size)
     {
       fprintf (f, "[ERROR]\n");
+      free (buf);
       return;
     }
 
@@ -1837,6 +1840,7 @@ bfd_sym_print_type_information_table_ent
 
   if (offset != entry->physical_size)
     fprintf (f, "\n            [parser used %lu bytes instead of %lu]", offset, entry->physical_size);
+  free (buf);
 }
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xsym.h ./bfd/xsym.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xsym.h	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/xsym.h	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* xSYM symbol-file support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xtensa-isa.c ./bfd/xtensa-isa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xtensa-isa.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/xtensa-isa.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Configurable Xtensa ISA support.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xtensa-modules.c ./bfd/xtensa-modules.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/bfd/xtensa-modules.c	2015-07-06 01:48:28.000000000 +0000
+++ ./bfd/xtensa-modules.c	2017-03-06 01:49:05.000000000 +0000
@@ -1,5 +1,5 @@
 /* Xtensa configuration-specific ISA information.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/ChangeLog ./ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./ChangeLog	2017-03-06 01:49:05.000000000 +0000
@@ -1,3 +1,344 @@
+2017-01-23  Nick Clifton  <nickc@redhat.com>
+
+	* configure.ac: Update year in copyright notice.
+	Sync from FSF GCC mainline, bringing in the following patches.
+	* Makefile.def: Likewise.
+	* Makefile.tpl: Likewise.
+	* configure: Regenerate.
+	* Makefile.in: Regenerate.
+
+	2016-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.ac: Don't bootstrap libmpx unless --with-build-config
+	includes bootstrap-mpx.
+
+	2016-12-01  Matthias Klose  <doko@ubuntu.com>
+
+	* configure.ac: Don't use pkg-config to check for bdw-gc.
+
+	2016-11-30  Matthias Klose  <doko@ubuntu.com>
+
+	* Makefile.def: Remove reference to boehm-gc target module.
+  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
+	options and for the bdw-gc pkg-config module.
+
+	2016-11-15  Matthias Klose  <doko@ubuntu.com>
+
+	* config-ml.in: Remove references to GCJ.
+	* configure.ac: Likewise.
+
+	2016-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.ac: Add target-libffi to target_libraries.
+	Readd libgcj target disablings, modified to only target-libffi.
+	Readd target addition of go to unsupported languages.
+
+	2016-09-30  Andrew Haley  <aph@redhat.com>
+
+	* Makefile.def: Remove libjava.
+	* Makefile.tpl: Likewise.
+	* configure.ac: Likewise.
+
+	2016-09-26  Anton Kolesov  <Anton.Kolesov@synopsys.com>
+
+	* configure.ac: Disable "sim" directory for arc*-*-*.
+
+	2016-09-12  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* configure.ac: Check for the minimum in-tree MPFR version
+	handled.
+
+2016-12-31  Alan Modra  <amodra@gmail.com>
+
+	* config.sub: Import from upstream.
+
+2016-12-08  Alan Modra  <amodra@gmail.com>
+
+	* configure: Regenerate.
+
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+	* configure.ac: Add fuchsia to targets that use ELF.
+	* configure: Regenerated.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
+	* config.sub: Sync with upstream version 2016-11-03.
+	git://git.sv.gnu.org/config.git
+	* config.guess: Sync with upstream version 2016-10-02.
+
+2016-09-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* .gitignore: Add archives and make stamps.
+
+2016-07-20  Yan-Ting Lin  <currygt52@gmail.com>
+
+	* configure.ac (nds32*-*-*): Remove entry to enable gdb.
+	* configure: Regenerated.
+
+2016-06-28  Walter Lee  <walt@tilera.com>
+
+	* configure.ac (tilepro-*-*): Add gdb to noconfigdirs.
+	* configure: Regenerate.
+
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+	* Makefile.tpl (configure): Depend on m4 files included.
+	* Makefile.in: Regenerate.
+
+2016-05-27  Nick Clifton  <nickc@redhat.com>
+
+	* config.guess (Alpha OSF1): Fix typo introduced during the most
+	recent synchronization update.
+
+2016-05-23  Nick Clifton  <nickc@redhat.com>
+
+	* Import these patches from the gcc mainline:
+
+	2016-05-16  Jakub Sejdak  <jakub.sejdak@phoesys.com>
+
+	* config.guess: Import version 2016-04-02 (newest).
+	* config.sub: Import version 2016-05-10 (newest).
+
+2016-04-19  Nick Clifton  <nickc@redhat.com>
+
+	* Import this patch from the GCC mainline:
+
+	2016-04-13  Segher Boessenkool  <segher@kernel.crashing.org>
+
+	PR bootstrap/70173
+	* Makefile.tpl (local-distclean): Delete the libcc1, gnattools,
+	and gotools directories.  Delete the stage_final file.
+	* Makefile.in: Regenerate.
+
+2016-03-17  Cary Coutant  <ccoutant@gmail.com>
+
+	* configure.ac: Add mips and s390 to the gold target check.
+	* configure: Regenerate.
+
+2016-02-10  Nick Clifton  <nickc@redhat.com>
+
+	Import these patches from the GCC mainline:
+
+	2016-01-12  Andris Pavenis  <andris.pavenis@iki.fi>
+
+	* configure.ac: Enable LTO for DJGPP
+	* configure: Regenerate
+
+	2016-01-24  Mikhail Maltsev  <maltsevm@gmail.com>
+
+	PR bootstrap/69329
+	* Makefile.tpl (BASE_FLAGS_TO_PASS): Add LSAN_OPTIONS.
+	* Makefile.in: Regenerate.
+
+	2016-01-25  Aditya Kumar  <aditya.k7@samsung.com>
+	            Sebastian Pop  <s.pop@samsung.com>
+
+	* Makefile.in: Regenerate.
+	* Makefile.tpl: Export ISLVER.
+	* configure: Regenerate.
+	* config/isl.m4: Detect isl-0.15.
+
+	2016-01-29  Sebastian Pop  <s.pop@samsung.com>
+
+	* config/isl.m4: Add comments about isl-0.16.
+	* configure: Regenerate.
+
+2016-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-11-26  David Edelsohn  <dje.gcc@gmail.com>
+
+	* m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L"
+	symbols.
+
+	2016-01-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+	PR bootstrap/69134
+	* Makefile.def (mpfr): Disable assembler.
+	* Makefile.in: Regenerate.
+
+2016-01-11  Nick Clifton  <nickc@redhat.com>
+
+	Import the following changes from the GCC mainline:
+
+	2015-11-13  Tsvetkova Alexandra  <aleksandra.tsvetkova@intel.com>
+
+	* configure.ac: Enable libmpx by default.
+	* configure: Regenerated.
+
+	2015-11-19  Martin Liska  <mliska@suse.cz>
+
+	* .gitignore: Add .clang-format to ignored files.
+	* Makefile.tpl: Add clang-format.
+	* Makefile.in: Regenerate.
+
+	2015-12-01  Andreas Tobler  <andreast@gcc.gnu.org>
+
+	PR libffi/65726
+	* Makefile.def (lang_env_dependencies): Make libffi depend
+	on cxx.
+	* Makefile.in: Regenerate.
+
+	2015-12-02  Ian Lance Taylor  <iant@google.com>
+
+	PR go/66147
+	* Makefile.tpl (HOST_EXPORTS): Add XGCC_FLAGS_FOR_TARGET.
+	* Makefile.in: Regenerate.
+
+	2015-12-17  Nathan Sidwell  <nathan@acm.org>
+
+	* config/isl.m4 (ISL_CHECK_VERSION): Add gmp libs.
+	* configure: Regenerate.
+
+	2015-12-17  Sebastian Pop  <s.pop@samsung.com>
+
+	* Makefile.in: Replace ISL with isl.
+	* Makefile.tpl: Same.
+	* config/isl.m4: Same.
+	* configure.ac: Same.
+	* contrib/download_prerequisites: Same.
+	* configure: Regenerate.
+
+	2016-01-01  Ben Elliston  <bje@gnu.org>
+
+	* config.guess: Import version 2016-01-01.
+	* config.sub: Likewise.
+
+2015-11-20  Tristan Gingold  <gingold@adacore.com>
+
+	* configure.ac: Add aarch64-*-darwin* and arm-*-darwin*.
+	* configure: Regenerate.
+
+2015-10-21  Nick Clifton  <nickc@redhat.com>
+
+	PR gas/19109
+	* configure.ac: Note the 'none' is an acceptable argument to
+	--enable-compressed-debug-sections.
+	* configure: Regenerate.
+
+2015-10-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/19109
+	* configure.ac: Add
+	--enable-compressed-debug-sections={all,gas,gold,ld}.
+	* configure: Regenerated.
+
+2015-09-30  Nick Clifton  <nickc@redhat.com>
+
+	Import the following patches from the GCC mainline:
+
+	2015-08-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+	PR libfortran/54572
+	* Makefile.def: Make libgfortran depend on libbacktrace.
+	* Makefile.in: Regenerate.
+
+	2015-08-12  Tom de Vries  <tom@codesourcery.com>
+
+	PR other/67092
+	PR other/67098
+	* configure.ac: Remove --with_host_libstdcxx support.
+	* configure: Regenerate.
+
+	2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.ac (noconfigdirs): Don't add "target-libgomp" for target
+	nvptx*-*-*.
+	* configure: Regenerate.
+
+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
+	2015-07-24  Michael Darling  <darlingm@gmail.com>
+
+	PR other/66259
+	* config-ml.in: Reflects renaming of configure.in to configure.ac
+	* configure: Likewise
+	* configure.ac: Likewise
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in: Regenerated.
+
+	Sync with GCC
+	2015-05-21  Jason Merrill  <jason@redhat.com>
+
+	* Makefile.tpl: Update comments.
+
+	2015-04-22  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
+
+	* Makefile.tpl: Remove surplus whitespace throughout.
+
+	2015-03-25  Martin Liska  <mliska@suse.cz>
+		    Yury Gribov  <y.gribov@samsung.com>
+
+	* Makefile.tpl: Fix ln source location for vimrc file.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-05-16  James Bowman  <james.bowman@ftdichip.com>
+
+	* configure.ac: FT32 target added.
+	* configure: Regenerate.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-06-02  Jason Merrill  <jason@redhat.com>
+
+	PR bootstrap/66319
+	* configure.ac: Use -std=gnu++98.
+
+	2015-05-28  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.ac (--vtable-verify): Use AS_HELP_STRING for help.
+	* configure: Regenerate.
+
+	2015-05-11  Paulo Matos  <paulo@matos-sorge.com>
+
+	* configure.ac: Fix typo.
+	* configure: Regenerate.
+
+	2015-05-03  Matthias Klose  <doko@ubuntu.com>
+
+	* configure.ac: Match $host configured with triplets.
+	* configure: Regenerate.
+
+	2015-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+	PR bootstrap/62077
+	* configure.ac (--enable-stage1-checking): Default to
+	release,misc,gimple,rtlflag,tree,types if --disable-checking
+	or --enable-checking is not specified and DEV-PHASE is not
+	experimental.
+	* configure: Regenerated.
+
+	2015-03-27  Uros Bizjak  <ubizjak@gmail.com>
+
+	Install back PR target/47230 fix (Revert the revert).
+
 2015-06-30  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* configure.ac (ospace_frag): Enable for i?86*-*-elfiamcu
@@ -230,7 +571,7 @@
 2014-04-04  Eric Botcazou  <ebotcazou@adacore.com>
 
 	PR bootstrap/60620
-	* Makefile.def (dependencies): Make gnattools depend on libstdc++-v3. 
+	* Makefile.def (dependencies): Make gnattools depend on libstdc++-v3.
 	* Makefile.in: Regenerate.
 
 2014-03-28  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/acx.m4 ./config/acx.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/acx.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/acx.m4	2017-03-06 01:49:05.000000000 +0000
@@ -404,7 +404,7 @@ AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
 [AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
 [ echo abfoo >t1
   echo cdfoo >t2
-  gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+  gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
   if cmp t1 t2 2 2 > /dev/null 2>&1; then
     if cmp t1 t2 1 1 > /dev/null 2>&1; then
       :
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bitfields.m4 ./config/bitfields.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bitfields.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./config/bitfields.m4	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,25 @@
+dnl Copyright (C) 2015 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
+# alignment.
+
+AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
+[
+  AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
+  [
+    AC_TRY_COMPILE(
+      [struct foo1 { char x; char y:1; char z; };
+struct foo2 { char x; long long int y:1; char z; };
+int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
+      [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
+  ])
+  if test $gt_cv_bitfield_type_matters = yes; then
+    AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
+      [Define if the type of bitfields effects alignment.])
+  fi
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-asan.mk ./config/bootstrap-asan.mk
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-asan.mk	2015-07-06 01:48:28.000000000 +0000
+++ ./config/bootstrap-asan.mk	2017-03-06 01:49:05.000000000 +0000
@@ -1,7 +1,7 @@
 # This option enables -fsanitize=address for stage2 and stage3.
 
 # Suppress LeakSanitizer in bootstrap.
-export ASAN_OPTIONS="detect_leaks=0"
+export ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1
 
 STAGE2_CFLAGS += -fsanitize=address
 STAGE3_CFLAGS += -fsanitize=address
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-lto-noplugin.mk ./config/bootstrap-lto-noplugin.mk
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-lto-noplugin.mk	1970-01-01 00:00:00.000000000 +0000
+++ ./config/bootstrap-lto-noplugin.mk	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,6 @@
+# This option enables LTO for stage2 and stage3 on
+# hosts without linker plugin support.
+
+STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGEprofile_CFLAGS += -fno-lto
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-mpx.mk ./config/bootstrap-mpx.mk
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/bootstrap-mpx.mk	1970-01-01 00:00:00.000000000 +0000
+++ ./config/bootstrap-mpx.mk	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,9 @@
+# This option enables -fcheck-pointer-bounds -mmpx for stage2 and stage3.
+
+STAGE2_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+STAGE3_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+POSTSTAGE1_LDFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 \
+		      -static-libmpx -static-libmpxwrappers \
+		      -B$$r/prev-$(TARGET_SUBDIR)/libmpx \
+		      -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxrt/.libs \
+		      -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxwrap/.libs
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/ChangeLog ./config/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./config/ChangeLog	2017-03-06 01:49:05.000000000 +0000
@@ -1,3 +1,88 @@
+2017-01-05  Alan Modra  <amodra@gmail.com>
+
+	* picflag.m4: Import from gcc.
+
+2016-12-08  Alan Modra  <amodra@gmail.com>
+
+	* acx.m4: Import from gcc.
+	* bootstrap-asan.mk: Likewise.
+	* multi.m4: Likewise.
+
+2016-01-18  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/19481
+	* override.m4 (AC_PROG_LEX): Define.
+
+2015-10-21  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
+
+	* bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
+	LSAN_OPTIONS=detect_leaks.
+
+2015-08-24  Yaakov Selkowitz  <yselkowi@redhat.com>
+
+	* iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present.
+
+2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-07-24  Micahel Darling  <darlingm@gmail.com>
+
+	PR other/66259
+	* gettext.m4: Reflects renaming of configure.in to configure.ac
+	* po.m4: Likewise
+	* stdint.m4: Likewise
+	* tcl.m4: Likewise
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-05-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* sjlj.m4: New file.
+
+	2015-05-04  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+	* bitfields.m4: Change int to long long, and use bitfields of
+	width 1 instead of 0.
+
+	2015-05-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+	* bitfields.m4: New file.
+
+	2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bootstrap-mpx.mk: New file.
+
+	2015-03-25  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR bootstrap/65537
+	* bootstrap-lto-noplugin.mk: New build configuration.
+
+	2014-11-13  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+	* target-posix: New file.
+
+	2014-10-27  Tom Tromey  <tromey@redhat.com>
+
+	* gcc-plugin.m4: New file.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-05-27  Jason Merrill  <jason@redhat.com>
+
+	PR bootstrap/66304
+	* warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
+	(ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
+	(ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
+	(ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
+	(ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	* mh-alpha-linux: Restored.
+
 2015-06-30  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* dfp.m4 (enable_decimal_float): Also set to yes for
@@ -201,7 +286,7 @@
 2012-07-02  Richard Guenther  <rguenther@suse.de>
 
 	* isl.m4 (_ISL_CHECK_CT_PROG): Omit main function header/footer.
-	Fix version test. 
+	Fix version test.
 
 2012-07-02  Richard Guenther  <rguenther@suse.de>
 	Michael Matz  <matz@suse.de>
@@ -243,7 +328,7 @@
 
 	* config/mh-interix: Remove as unneeded.
 	* config/picflag.m4 (i[[34567]]86-*-interix3*):
-        Change triplet to i[[34567]]86-*-interix[[3-9]]*.
+	Change triplet to i[[34567]]86-*-interix[[3-9]]*.
 
 2012-01-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/gcc-plugin.m4 ./config/gcc-plugin.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/gcc-plugin.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./config/gcc-plugin.m4	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,113 @@
+# gcc-plugin.m4 -*- Autoconf -*-
+# Check whether GCC is able to be built with plugin support.
+
+dnl Copyright (C) 2014 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Check for plugin support.
+# Respects --enable-plugin.
+# Sets the shell variables enable_plugin and pluginlibs.
+AC_DEFUN([GCC_ENABLE_PLUGINS],
+  [# Check for plugin support
+   AC_ARG_ENABLE(plugin,
+   [AS_HELP_STRING([--enable-plugin], [enable plugin support])],
+   enable_plugin=$enableval,
+   enable_plugin=yes; default_plugin=yes)
+
+   pluginlibs=
+
+   case "${host}" in
+     *-*-darwin*)
+       if test x$build = x$host; then
+	 export_sym_check="nm${exeext} -g"
+       elif test x$host = x$target; then
+	 export_sym_check="$gcc_cv_nm -g"
+       else
+	 export_sym_check=
+       fi
+     ;;
+     *)
+       if test x$build = x$host; then
+	 export_sym_check="objdump${exeext} -T"
+       elif test x$host = x$target; then
+	 export_sym_check="$gcc_cv_objdump -T"
+       else
+	 export_sym_check=
+       fi
+     ;;
+   esac
+
+   if test x"$enable_plugin" = x"yes"; then
+
+     AC_MSG_CHECKING([for exported symbols])
+     if test "x$export_sym_check" != x; then
+       echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+       ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1
+       if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
+	 : # No need to use a flag
+	 AC_MSG_RESULT([yes])
+       else
+	 AC_MSG_RESULT([yes])
+	 AC_MSG_CHECKING([for -rdynamic])
+	 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1
+	 if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
+	   plugin_rdynamic=yes
+	   pluginlibs="-rdynamic"
+	 else
+	   plugin_rdynamic=no
+	   enable_plugin=no
+	 fi
+	 AC_MSG_RESULT([$plugin_rdynamic])
+       fi
+     else
+       AC_MSG_RESULT([unable to check])
+     fi
+
+     # Check -ldl
+     saved_LIBS="$LIBS"
+     AC_SEARCH_LIBS([dlopen], [dl])
+     if test x"$ac_cv_search_dlopen" = x"-ldl"; then
+       pluginlibs="$pluginlibs -ldl"
+     fi
+     LIBS="$saved_LIBS"
+
+     # Check that we can build shared objects with -fPIC -shared
+     saved_LDFLAGS="$LDFLAGS"
+     saved_CFLAGS="$CFLAGS"
+     case "${host}" in
+       *-*-darwin*)
+	 CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+	 CFLAGS="$CFLAGS -fPIC"
+	 LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+       ;;
+       *)
+	 CFLAGS="$CFLAGS -fPIC"
+	 LDFLAGS="$LDFLAGS -fPIC -shared"
+       ;;
+     esac
+     AC_MSG_CHECKING([for -fPIC -shared])
+     AC_TRY_LINK(
+       [extern int X;],[return X == 0;],
+       [AC_MSG_RESULT([yes]); have_pic_shared=yes],
+       [AC_MSG_RESULT([no]); have_pic_shared=no])
+     if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
+       pluginlibs=
+       enable_plugin=no
+     fi
+     LDFLAGS="$saved_LDFLAGS"
+     CFLAGS="$saved_CFLAGS"
+
+     # If plugin support had been requested but not available, fail.
+     if test x"$enable_plugin" = x"no" ; then
+       if test x"$default_plugin" != x"yes"; then
+	 AC_MSG_ERROR([
+   Building GCC with plugin support requires a host that supports
+   -fPIC, -shared, -ldl and -rdynamic.])
+       fi
+     fi
+   fi
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/gettext.m4 ./config/gettext.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/gettext.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/gettext.m4	2017-03-06 01:49:05.000000000 +0000
@@ -81,7 +81,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
   dnl Ideally we would do this search only after the
   dnl      if test "$USE_NLS" = "yes"; then
   dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
-  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT
   dnl the configure script would need to contain the same shell code
   dnl again, outside any 'if'. There are two solutions:
   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
@@ -303,7 +303,7 @@ return (int) gettext ("")]ifelse([$2], [
     AC_SUBST(USE_INCLUDED_LIBINTL)
     AC_SUBST(CATOBJEXT)
 
-    dnl For backward compatibility. Some configure.ins may be using this.
+    dnl For backward compatibility. Some configure.acs may be using this.
     nls_cv_header_intl=
     nls_cv_header_libgt=
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/iconv.m4 ./config/iconv.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/iconv.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/iconv.m4	2017-03-06 01:49:05.000000000 +0000
@@ -7,6 +7,7 @@ dnl that contains a configuration script
 dnl the same distribution terms as the rest of that program.
 
 dnl From Bruno Haible.
+dnl with modifications to support building with in-tree libiconv
 
 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 [
@@ -28,24 +29,51 @@ AC_DEFUN([AM_ICONV_LINK],
   dnl accordingly.
   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
-  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed libiconv and not disabled its use
-  dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
-  am_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
   AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
+    dnl Add $INCICONV to CPPFLAGS before performing the first check,
+    dnl because if the user has installed libiconv and not disabled its use
+    dnl via --without-libiconv-prefix, he wants to use it. This first
+    dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+    am_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $INCICONV"
     AC_TRY_LINK([#include <stdlib.h>
 #include <iconv.h>],
       [iconv_t cd = iconv_open("","");
        iconv(cd,NULL,NULL,NULL,NULL);
        iconv_close(cd);],
       am_cv_func_iconv=yes)
+    CPPFLAGS="$am_save_CPPFLAGS"
+
+    if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
+      for _libs in .libs _libs; do
+        am_save_CPPFLAGS="$CPPFLAGS"
+        am_save_LIBS="$LIBS"
+        CPPFLAGS="$CPPFLAGS -I../libiconv/include"
+        LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
+        AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+          [iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);],
+          INCICONV="-I../libiconv/include"
+          LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
+          LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
+          am_cv_lib_iconv=yes
+          am_cv_func_iconv=yes)
+        CPPFLAGS="$am_save_CPPFLAGS"
+        LIBS="$am_save_LIBS"
+        if test "$am_cv_func_iconv" = "yes"; then
+          break
+        fi
+      done
+    fi
+
     if test "$am_cv_func_iconv" != yes; then
+      am_save_CPPFLAGS="$CPPFLAGS"
       am_save_LIBS="$LIBS"
+      CPPFLAGS="$LIBS $INCICONV"
       LIBS="$LIBS $LIBICONV"
       AC_TRY_LINK([#include <stdlib.h>
 #include <iconv.h>],
@@ -54,6 +82,7 @@ AC_DEFUN([AM_ICONV_LINK],
          iconv_close(cd);],
         am_cv_lib_iconv=yes
         am_cv_func_iconv=yes)
+      CPPFLAGS="$am_save_CPPFLAGS"
       LIBS="$am_save_LIBS"
     fi
   ])
@@ -61,12 +90,10 @@ AC_DEFUN([AM_ICONV_LINK],
     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
   fi
   if test "$am_cv_lib_iconv" = yes; then
+    AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
     AC_MSG_CHECKING([how to link with libiconv])
     AC_MSG_RESULT([$LIBICONV])
   else
-    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-    dnl either.
-    CPPFLAGS="$am_save_CPPFLAGS"
     LIBICONV=
     LTLIBICONV=
   fi
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/isl.m4 ./config/isl.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/isl.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/isl.m4	2017-03-06 01:49:05.000000000 +0000
@@ -19,23 +19,23 @@
 
 # ISL_INIT_FLAGS ()
 # -------------------------
-# Provide configure switches for ISL support.
+# Provide configure switches for isl support.
 # Initialize isllibs/islinc according to the user input.
 AC_DEFUN([ISL_INIT_FLAGS],
 [
   AC_ARG_WITH([isl-include],
     [AS_HELP_STRING(
       [--with-isl-include=PATH],
-      [Specify directory for installed ISL include files])])
+      [Specify directory for installed isl include files])])
   AC_ARG_WITH([isl-lib],
     [AS_HELP_STRING(
       [--with-isl-lib=PATH],
-      [Specify the directory for the installed ISL library])])
+      [Specify the directory for the installed isl library])])
 
   AC_ARG_ENABLE(isl-version-check,
     [AS_HELP_STRING(
       [--disable-isl-version-check],
-      [disable check for ISL version])],
+      [disable check for isl version])],
     ENABLE_ISL_CHECK=$enableval,
     ENABLE_ISL_CHECK=yes)
   
@@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS],
   if test "x${with_isl_lib}" != x; then
     isllibs="-L$with_isl_lib"
   fi
-  dnl If no --with-isl flag was specified and there is in-tree ISL
+  dnl If no --with-isl flag was specified and there is in-tree isl
   dnl source, set up flags to use that and skip any version tests
-  dnl as we cannot run them before building ISL.
+  dnl as we cannot run them before building isl.
   if test "x${islinc}" = x && test "x${isllibs}" = x \
      && test -d ${srcdir}/isl; then
     isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
     islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
     ENABLE_ISL_CHECK=no
-    AC_MSG_WARN([using in-tree ISL, disabling version check])
+    AC_MSG_WARN([using in-tree isl, disabling version check])
   fi
 
   isllibs="${isllibs} -lisl"
@@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
 
 # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
 # ----------------------------------------------------
-# Provide actions for failed ISL detection.
+# Provide actions for failed isl detection.
 AC_DEFUN([ISL_REQUESTED],
 [
   AC_REQUIRE([ISL_INIT_FLAGS])
@@ -94,7 +94,7 @@ AC_DEFUN([ISL_REQUESTED],
 
 # ISL_CHECK_VERSION ISL_CHECK_VERSION ()
 # ----------------------------------------------------------------
-# Test that ISL contains functionality added to the minimum expected version.
+# Test whether isl contains functionality added to the minimum expected version.
 AC_DEFUN([ISL_CHECK_VERSION],
 [
   if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -103,15 +103,32 @@ AC_DEFUN([ISL_CHECK_VERSION],
     _isl_saved_LIBS=$LIBS
 
     CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
-    LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
-    LIBS="${_isl_saved_LIBS} -lisl"
+    LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
+    LIBS="${_isl_saved_LIBS} -lisl -lgmp"
 
-    AC_MSG_CHECKING([for compatible ISL])
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
-	[gcc_cv_isl=yes],
-	[gcc_cv_isl=no])
+    AC_MSG_CHECKING([for isl 0.16, 0.15, or deprecated 0.14])
+    AC_TRY_LINK([#include <isl/ctx.h>],
+                [isl_ctx_get_max_operations (isl_ctx_alloc ());],
+                [gcc_cv_isl=yes],
+                [gcc_cv_isl=no])
     AC_MSG_RESULT([$gcc_cv_isl])
 
+    if test "${gcc_cv_isl}" = no ; then
+      AC_MSG_RESULT([recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated])
+    fi
+
+    AC_MSG_CHECKING([for isl 0.16 or 0.15])
+    AC_TRY_LINK([#include <isl/schedule.h>],
+                [isl_options_set_schedule_serialize_sccs (NULL, 0);],
+                [ac_has_isl_options_set_schedule_serialize_sccs=yes],
+                [ac_has_isl_options_set_schedule_serialize_sccs=no])
+    AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
+
+    if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+      islver="0.15"
+      AC_SUBST([islver])
+    fi
+
     CFLAGS=$_isl_saved_CFLAGS
     LDFLAGS=$_isl_saved_LDFLAGS
     LIBS=$_isl_saved_LIBS
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/mh-alpha-linux ./config/mh-alpha-linux
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/mh-alpha-linux	1970-01-01 00:00:00.000000000 +0000
+++ ./config/mh-alpha-linux	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,3 @@
+# Prevent GPREL16 relocation truncation
+LDFLAGS += -Wl,--no-relax
+BOOT_LDFLAGS += -Wl,--no-relax
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/multi.m4 ./config/multi.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/multi.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/multi.m4	2017-03-06 01:49:05.000000000 +0000
@@ -64,5 +64,4 @@ multi_basedir="$multi_basedir"
 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 CC="$CC"
 CXX="$CXX"
-GFORTRAN="$GFORTRAN"
-GCJ="$GCJ"])])dnl
+GFORTRAN="$GFORTRAN"])])dnl
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/override.m4 ./config/override.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/override.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/override.m4	2017-03-06 01:49:05.000000000 +0000
@@ -101,4 +101,16 @@ m4_define([_AC_CHECK_DECLS],
 
 ])
 
+dnl If flex/lex are not found, the top level configure sets LEX to
+dnl "/path_to/missing flex".  When AC_PROG_LEX tries to find the flex
+dnl output file, it calls $LEX to do so, but the current lightweight
+dnl "missing" won't create a file.  This results in an error.
+dnl Avoid calling the bulk of AC_PROG_LEX when $LEX is "missing".
+AC_DEFUN_ONCE([AC_PROG_LEX],
+[AC_CHECK_PROGS(LEX, flex lex, :)
+case "$LEX" in
+  :|*"missing "*) ;;
+  *) _AC_PROG_LEX_YYTEXT_DECL ;;
+esac])
+
 ])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/picflag.m4 ./config/picflag.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/picflag.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/picflag.m4	2017-03-06 01:49:05.000000000 +0000
@@ -12,7 +12,7 @@ case "${$2}" in
 	  # If we are using a compiler supporting mdynamic-no-pic
 	  # and the option has been tested as safe to add, then cancel
 	  # it here, since the code generated is incompatible with shared
-	  #Â libs.
+	  # libs.
 	  *-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;;
 	  *) $1=-fno-common ;;
 	esac
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/po.m4 ./config/po.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/po.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/po.m4	2017-03-06 01:49:05.000000000 +0000
@@ -117,14 +117,14 @@ AC_DEFUN([AM_PO_SUBDIRS],
           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
             # The LINGUAS file contains the set of available languages.
             if test -n "$OBSOLETE_ALL_LINGUAS"; then
-              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
             # Hide the ALL_LINGUAS assigment from automake.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
-            # The set of available languages was given in configure.in.
+            # The set of available languages was given in configure.ac.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           case "$ac_given_srcdir" in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/sjlj.m4 ./config/sjlj.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/sjlj.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./config/sjlj.m4	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,12 @@
+dnl Check if the compiler is configured for setjmp/longjmp exceptions.
+AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS],
+  [AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp exceptions],
+    ac_cv_sjlj_exceptions,
+    [AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[#ifdef __USING_SJLJ_EXCEPTIONS__
+          this will fail
+          #endif]],
+        [[int i;]])],
+      [ac_cv_sjlj_exceptions=no],
+      [ac_cv_sjlj_exceptions=yes])])])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/stdint.m4 ./config/stdint.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/stdint.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/stdint.m4	2017-03-06 01:49:05.000000000 +0000
@@ -39,7 +39,7 @@ dnl If your installed header files requi
 dnl create an installable file mylib-int.h that all your other installable
 dnl header may include. So, for a library package named "mylib", just use
 dnl      GCC_HEADER_STDINT(mylib-int.h)
-dnl in configure.in and install that header file in Makefile.am along with
+dnl in configure.ac and install that header file in Makefile.am along with
 dnl the other headers (mylib.h).  The mylib-specific headers can simply
 dnl use "#include <mylib-int.h>" to obtain the stdint-types.
 dnl
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/target-posix ./config/target-posix
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/target-posix	1970-01-01 00:00:00.000000000 +0000
+++ ./config/target-posix	2017-03-06 01:49:05.000000000 +0000
@@ -0,0 +1,12 @@
+case "${target}" in
+  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
+      ;;
+  *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
+      ;;
+  *-*-solaris2* | *-*-hpux11*)
+      ;;
+  *-*-darwin* | *-*-aix*)
+      ;;
+  *)
+      UNSUPPORTED=1 ;;
+  esac
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/tcl.m4 ./config/tcl.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/tcl.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/tcl.m4	2017-03-06 01:49:05.000000000 +0000
@@ -2136,7 +2136,7 @@ dnl # preprocessing tests use only CPPFL
             INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
         fi
 
-dnl        Not at all clear what this was doing in Tcl's configure.in
+dnl        Not at all clear what this was doing in Tcl's configure.ac
 dnl        or why it was needed was needed. In any event, this sort of
 dnl        things needs to be done in the big loop above.
 dnl        REMOVE THIS BLOCK LATER! (mdejong)
@@ -3235,7 +3235,7 @@ AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_
 #		created. Accumulates.
 #
 #	Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
-#	of configure.in (right before AC_OUTPUT).
+#	of configure.ac (right before AC_OUTPUT).
 #
 #--------------------------------------------------------------------
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/warnings.m4 ./config/warnings.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config/warnings.m4	2015-07-06 01:48:28.000000000 +0000
+++ ./config/warnings.m4	2017-03-06 01:49:05.000000000 +0000
@@ -18,11 +18,12 @@
 #along with GCC; see the file COPYING3.  If not see
 #<http://www.gnu.org/licenses/>.
 
-# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
+# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS])
 #   Sets @VARIABLE@ to the subset of the given options which the
 #   compiler accepts.
 AC_DEFUN([ACX_PROG_CC_WARNING_OPTS],
 [AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
 m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
 AC_SUBST(acx_Var)dnl
 m4_expand_once([acx_Var=
@@ -48,6 +49,7 @@ for real_option in $1; do
 done
 CFLAGS="$save_CFLAGS"
 m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
 ])# ACX_PROG_CC_WARNING_OPTS
 
 # ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
@@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl
 #   and accepts all of those options simultaneously, otherwise to nothing.
 AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC],
 [AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
 m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
 AC_SUBST(acx_Var)dnl
 m4_expand_once([acx_Var=
@@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = y
 AS_VAR_POPDEF([acx_Pedantic])dnl
 m4_popdef([acx_Woptions])dnl
 m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
 ])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
 
 # ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
@@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl
 #   appeared on the configure command line.
 AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
 [AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
 m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
 AC_SUBST(acx_Var)dnl
 m4_expand_once([acx_Var=
@@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes]
        [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
   AS_VAR_POPDEF([acx_GCCvers])])
 m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
 ])# ACX_PROG_CC_WARNINGS_ARE_ERRORS
+
+# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CXXFLAGS])
+#   Sets @VARIABLE@ to the subset of the given options which the
+#   compiler accepts.
+AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+save_CXXFLAGS="$CXXFLAGS"
+for real_option in $1; do
+  # Do the check with the no- prefix removed since gcc silently
+  # accepts any -Wno-* option on purpose
+  case $real_option in
+    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+    *) option=$real_option ;;
+  esac
+  AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
+  AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption,
+    [CXXFLAGS="$option"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_VAR_SET(acx_Woption, yes)],
+      [AS_VAR_SET(acx_Woption, no)])
+  ])
+  AS_IF([test AS_VAR_GET(acx_Woption) = yes],
+        [acx_Var="$acx_Var${acx_Var:+ }$real_option"])
+  AS_VAR_POPDEF([acx_Woption])dnl
+done
+CXXFLAGS="$save_CXXFLAGS"
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_OPTS
+
+# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
+#   Append to VARIABLE "-pedantic" + the argument, if the compiler is G++
+#   and accepts all of those options simultaneously, otherwise to nothing.
+AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+# Do the check with the no- prefix removed from the warning options
+# since gcc silently accepts any -Wno-* option on purpose
+m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl
+AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl
+AS_IF([test "$GXX" = yes],
+[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic,
+[save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="-pedantic acx_Woptions"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+   [AS_VAR_SET(acx_Pedantic, yes)],
+   [AS_VAR_SET(acx_Pedantic, no)])
+CXXFLAGS="$save_CXXFLAGS"])
+AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
+      [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
+])
+AS_VAR_POPDEF([acx_Pedantic])dnl
+m4_popdef([acx_Woptions])dnl
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC
+
+# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
+#   sets @VARIABLE@ to "-Werror" if the compiler is G++ >=x.y.z, or if
+#   --enable-werror-always was given on the command line, otherwise
+#   to nothing.
+#   If the argument is the word "manual" instead of a version number,
+#   then @VARIABLE@ will be set to -Werror only if --enable-werror-always
+#   appeared on the configure command line.
+AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+AC_ARG_ENABLE(werror-always,
+    AS_HELP_STRING([--enable-werror-always],
+		   [enable -Werror despite compiler version]),
+[], [enable_werror_always=no])
+AS_IF([test $enable_werror_always = yes],
+      [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ m4_if($1, [manual],,
+ [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl
+  AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers,
+    [set fnord `echo $1 | tr '.' ' '`
+     shift
+     AC_PREPROC_IFELSE(
+[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \
+  < [$]1 * 10000 + [$]2 * 100 + [$]3
+#error insufficient
+#endif],
+   [AS_VAR_SET(acx_GXXvers, yes)],
+   [AS_VAR_SET(acx_GXXvers, no)])])
+ AS_IF([test AS_VAR_GET(acx_GXXvers) = yes],
+       [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+  AS_VAR_POPDEF([acx_GXXvers])])
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config.guess ./config.guess
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config.guess	2015-07-06 01:48:28.000000000 +0000
+++ ./config.guess	2017-03-06 01:49:05.000000000 +0000
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2015-03-04'
+timestamp='2016-10-02'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ timestamp='2015-03-04'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
+	# to ELF recently (or will in the future) and ABI.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -221,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 	exit ;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 	exit ;;
@@ -249,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
+    *:Sortix:*:*)
+	echo ${UNAME_MACHINE}-unknown-sortix
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -265,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
+		UNAME_MACHINE=alphaev5 ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
+		UNAME_MACHINE=alphaev56 ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
+		UNAME_MACHINE=alphapca56 ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
+		UNAME_MACHINE=alphapca57 ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
+		UNAME_MACHINE=alphaev6 ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
+		UNAME_MACHINE=alphaev67 ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
+		UNAME_MACHINE=alphaev69 ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
+		UNAME_MACHINE=alphaev7 ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
+		UNAME_MACHINE=alphaev79 ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
@@ -373,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	eval $set_cc_for_build
-	SUN_ARCH="i386"
+	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
-		SUN_ARCH="x86_64"
+		SUN_ARCH=x86_64
 	    fi
 	fi
 	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -407,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
 		echo m68k-sun-sunos${UNAME_RELEASE}
@@ -632,13 +642,13 @@ EOF
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
 			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
@@ -677,11 +687,11 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
+	if [ ${HP_ARCH} = hppa2.0w ]
 	then
 	    eval $set_cc_for_build
 
@@ -694,12 +704,12 @@ EOF
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
 		grep -q __LP64__
 	    then
-		HP_ARCH="hppa2.0w"
+		HP_ARCH=hppa2.0w
 	    else
-		HP_ARCH="hppa64"
+		HP_ARCH=hppa64
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -804,14 +814,14 @@ EOF
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -893,7 +903,7 @@ EOF
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
@@ -916,7 +926,7 @@ EOF
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
@@ -962,6 +972,9 @@ EOF
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
+    k1om:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     m32r*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -987,6 +1000,9 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    mips64el:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     openrisc*:Linux:*:*)
 	echo or1k-unknown-linux-${LIBC}
 	exit ;;
@@ -1019,6 +1035,9 @@ EOF
     ppcle:Linux:*:*)
 	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
@@ -1038,7 +1057,7 @@ EOF
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1117,7 +1136,7 @@ EOF
 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
 	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configury will decide that
+	# prints for the "djgpp" host, or else GDB configure will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
 	exit ;;
@@ -1266,6 +1285,9 @@ EOF
     SX-8R:SUPER-UX:*:*)
 	echo sx8r-nec-superux${UNAME_RELEASE}
 	exit ;;
+    SX-ACE:SUPER-UX:*:*)
+	echo sxace-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit ;;
@@ -1279,9 +1301,9 @@ EOF
 	    UNAME_PROCESSOR=powerpc
 	fi
 	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		    grep IS_64BIT_ARCH >/dev/null
 		then
 		    case $UNAME_PROCESSOR in
@@ -1303,7 +1325,7 @@ EOF
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
+	if test "$UNAME_PROCESSOR" = x86; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
@@ -1334,7 +1356,7 @@ EOF
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	if test "$cputype" = "386"; then
+	if test "$cputype" = 386; then
 	    UNAME_MACHINE=i386
 	else
 	    UNAME_MACHINE="$cputype"
@@ -1376,7 +1398,7 @@ EOF
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
 	exit ;;
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
@@ -1387,23 +1409,25 @@ EOF
     x86_64:VMkernel:*:*)
 	echo ${UNAME_MACHINE}-unknown-esx
 	exit ;;
+    amd64:Isilon\ OneFS:*:*)
+	echo x86_64-unknown-onefs
+	exit ;;
 esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config-ml.in ./config-ml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config-ml.in	2015-07-06 01:48:28.000000000 +0000
+++ ./config-ml.in	2017-03-06 01:49:05.000000000 +0000
@@ -31,7 +31,7 @@
 # user select which libraries s/he really wants.
 #
 # Subdirectories wishing to use multilib should put the following lines
-# in the "post-target" section of configure.in.
+# in the "post-target" section of configure.ac.
 #
 # if [ "${srcdir}" = "." ] ; then
 #   if [ "${with_target_subdir}" != "." ] ; then
@@ -182,8 +182,8 @@ if [ "${enable_multilib}" = yes ]; then
 # ${with_multisubdir} tells us we're in the right branch, but we could be
 # in a subdir of that.
 # ??? The previous version could void this test by separating the process into
-# two files: one that only the library's toplevel configure.in ran (to
-# configure the multilib subdirs), and another that all configure.in's ran to
+# two files: one that only the library's toplevel configure.ac ran (to
+# configure the multilib subdirs), and another that all configure.ac's ran to
 # update the Makefile.  It seemed reasonable to collapse all multilib support
 # into one file, but it does leave us with having to perform this test.
 ml_toplevel_p=no
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config.sub ./config.sub
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/config.sub	2015-07-06 01:48:28.000000000 +0000
+++ ./config.sub	2017-03-06 01:49:05.000000000 +0000
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2015-03-08'
+timestamp='2016-12-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ timestamp='2015-03-08'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2015-03-08'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patch
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -118,7 +117,7 @@ case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | \
+  kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -255,6 +254,7 @@ case $basic_machine in
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
+	| ba \
 	| be32 | be64 \
 	| bfin \
 	| c4x | c8051 | clipper \
@@ -301,11 +301,12 @@ case $basic_machine in
 	| open8 | or1k | or1knd | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pru \
 	| pyramid \
 	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -376,6 +377,7 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
@@ -427,13 +429,15 @@ case $basic_machine in
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pru-* \
 	| pyramid-* \
+	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -518,7 +522,7 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-aros
 		;;
-        asmjs)
+	asmjs)
 		basic_machine=asmjs-unknown
 		;;
 	aux)
@@ -641,6 +645,14 @@ case $basic_machine in
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
+	e500v[12])
+		basic_machine=powerpc-unknown
+		os=$os"spe"
+		;;
+	e500v[12]-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=$os"spe"
+		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -1020,7 +1032,7 @@ case $basic_machine in
 	ppc-* | ppcbe-*)
 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
+	ppcle | powerpclittle)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
@@ -1030,7 +1042,7 @@ case $basic_machine in
 		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+	ppc64le | powerpc64little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
@@ -1376,18 +1388,18 @@ case $os in
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* \
+	      | -aos* | -aros* | -cloudabi* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1396,7 +1408,8 @@ case $os in
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1528,6 +1541,8 @@ case $os in
 		;;
 	-nacl*)
 		;;
+	-ios)
+		;;
 	-none)
 		;;
 	*)
@@ -1623,6 +1638,9 @@ case $basic_machine in
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
+	pru-*)
+		os=-elf
+		;;
 	*-be)
 		os=-beos
 		;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/configure ./configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/configure	2015-07-06 01:48:28.000000000 +0000
+++ ./configure	2017-03-06 01:49:05.000000000 +0000
@@ -583,7 +583,6 @@ AS_FOR_TARGET
 AR_FOR_TARGET
 GOC_FOR_TARGET
 GFORTRAN_FOR_TARGET
-GCJ_FOR_TARGET
 GCC_FOR_TARGET
 CXX_FOR_TARGET
 CC_FOR_TARGET
@@ -616,7 +615,6 @@ LD_FOR_BUILD
 LDFLAGS_FOR_BUILD
 GOC_FOR_BUILD
 GFORTRAN_FOR_BUILD
-GCJ_FOR_BUILD
 DLLTOOL_FOR_BUILD
 CXX_FOR_BUILD
 CXXFLAGS_FOR_BUILD
@@ -650,6 +648,7 @@ extra_linker_plugin_flags
 extra_linker_plugin_configure_flags
 islinc
 isllibs
+islver
 poststage1_ldflags
 poststage1_libs
 stage1_ldflags
@@ -673,7 +672,6 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
-EXTRA_CONFIGARGS_LIBJAVA
 extra_liboffloadmic_configure_flags
 target_subdir
 host_subdir
@@ -753,13 +751,13 @@ enable_as_accelerator_for
 enable_offload_targets
 enable_gold
 enable_ld
+enable_compressed_debug_sections
 enable_libquadmath
 enable_libquadmath_support
 enable_libada
 enable_libssp
 enable_libstdcxx
 enable_liboffloadmic
-enable_static_libjava
 enable_bootstrap
 with_mpc
 with_mpc_include
@@ -772,7 +770,6 @@ with_gmp_dir
 with_gmp
 with_gmp_include
 with_gmp_lib
-with_host_libstdcxx
 with_stage1_libs
 with_stage1_ldflags
 with_boot_libs
@@ -786,6 +783,9 @@ enable_linker_plugin_configure_flags
 enable_linker_plugin_flags
 enable_stage1_languages
 enable_objc_gc
+with_target_bdw_gc
+with_target_bdw_gc_include
+with_target_bdw_gc_lib
 with_build_sysroot
 with_debug_prefix_map
 with_build_config
@@ -827,7 +827,6 @@ READELF
 CC_FOR_TARGET
 CXX_FOR_TARGET
 GCC_FOR_TARGET
-GCJ_FOR_TARGET
 GFORTRAN_FOR_TARGET
 GOC_FOR_TARGET
 AR_FOR_TARGET
@@ -1477,6 +1476,9 @@ Optional Features:
                           offload target compiler during the build
   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
   --enable-ld[=ARG]       build ld [ARG={default,yes,no}]
+  --enable-compressed-debug-sections={all,gas,gold,ld,none}
+                          Enable compressed debug sections for gas, gold or ld
+                          by default
   --disable-libquadmath   do not build libquadmath directory
   --disable-libquadmath-support
                           disable libquadmath support for Fortran
@@ -1485,11 +1487,9 @@ Optional Features:
   --disable-libstdcxx     do not build libstdc++-v3 directory
   --enable-liboffloadmic=ARG
                           build liboffloadmic [ARG={no,host,target}]
-  --enable-static-libjava[=ARG]
-                          build static libjava [default=no]
   --enable-bootstrap      enable bootstrapping [yes if native build]
   --disable-isl-version-check
-                          disable check for ISL version
+                          disable check for isl version
   --enable-lto            enable link time optimization support
   --enable-linker-plugin-configure-flags=FLAGS
                           additional flags for configuring linker plugins
@@ -1502,7 +1502,7 @@ Optional Features:
                           Mostly useful for compiler development
   --enable-objc-gc        enable use of Boehm's garbage collector with the GNU
                           Objective-C runtime
-  --enable-vtable-verify    Enable vtable verification feature
+  --enable-vtable-verify  Enable vtable verification feature
   --enable-serial-[{host,target,build}-]configure
                           force sequential configuration of sub-packages for
                           the host, target or build machine, or all
@@ -1540,20 +1540,28 @@ Optional Packages:
                           --with-gmp-lib=PATH/lib
   --with-gmp-include=PATH specify directory for installed GMP include files
   --with-gmp-lib=PATH     specify directory for the installed GMP library
-  --with-host-libstdcxx=L use linker arguments L to link with libstdc++ when
-                          linking with PPL
   --with-stage1-libs=LIBS libraries for stage1
   --with-stage1-ldflags=FLAGS
                           linker flags for stage1
   --with-boot-libs=LIBS   libraries for stage2 and later
   --with-boot-ldflags=FLAGS
                           linker flags for stage2 and later
-  --with-isl=PATH         Specify prefix directory for the installed ISL
+  --with-isl=PATH         Specify prefix directory for the installed isl
                           package. Equivalent to
                           --with-isl-include=PATH/include plus
                           --with-isl-lib=PATH/lib
-  --with-isl-include=PATH Specify directory for installed ISL include files
-  --with-isl-lib=PATH     Specify the directory for the installed ISL library
+  --with-isl-include=PATH Specify directory for installed isl include files
+  --with-isl-lib=PATH     Specify the directory for the installed isl library
+  --with-target-bdw-gc=PATHLIST
+                          specify prefix directory for installed bdw-gc
+                          package. Equivalent to
+                          --with-target-bdw-gc-include=PATH/include plus
+                          --with-target-bdw-gc-lib=PATH/lib
+  --with-target-bdw-gc-include=PATHLIST
+                          specify directories for installed bdw-gc include
+                          files
+  --with-target-bdw-gc-lib=PATHLIST
+                          specify directories for installed bdw-gc library
   --with-build-sysroot=SYSROOT
                           use sysroot as the system root during the build
   --with-debug-prefix-map='A=B C=D ...'
@@ -1598,8 +1606,6 @@ Some influential environment variables:
               CXX for the target
   GCC_FOR_TARGET
               GCC for the target
-  GCJ_FOR_TARGET
-              GCJ for the target
   GFORTRAN_FOR_TARGET
               GFORTRAN for the target
   GOC_FOR_TARGET
@@ -2734,11 +2740,6 @@ host_libs="intl libiberty opcodes bfd re
 # If --enable-gold is used, "gold" may replace "ld".
 host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
 
-# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-zlib \
-	target-libjava"
-
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
 # Note that libiberty is not a target library.
@@ -2758,8 +2759,7 @@ target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
-		${libgcj} \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -2957,7 +2957,7 @@ case "${ENABLE_GOLD}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
       | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
-      | *-*-solaris2* | *-*-nto* | *-*-nacl*)
+      | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
@@ -2971,7 +2971,7 @@ case "${ENABLE_GOLD}" in
       # Check for target supported by gold.
       case "${target}" in
         i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
-        | aarch64*-*-* | tilegx*-*-*)
+        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
 	  configdirs="$configdirs gold"
 	  if test x${ENABLE_GOLD} = xdefault; then
 	    default_ld=gold
@@ -3016,6 +3016,21 @@ case "${ENABLE_LD}" in
     ;;
 esac
 
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+# Check whether --enable-compressed_debug_sections was given.
+if test "${enable_compressed_debug_sections+set}" = set; then :
+  enableval=$enable_compressed_debug_sections;
+  if test x"$enable_compressed_debug_sections" = xyes; then
+    as_fn_error "no program with compressed debug sections specified" "$LINENO" 5
+  fi
+
+else
+  enable_compressed_debug_sections=
+fi
+
+
 # Configure extra directories which are host specific
 
 case "${host}" in
@@ -3131,46 +3146,8 @@ fi
 
 
 
-# Save it here so that, even in case of --enable-libgcj, if the Java
-# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
-case $enable_libgcj in
-yes)
-  # If we reset it here, it won't get added to noconfigdirs in the
-  # target-specific build rules, so it will be forcibly enabled
-  # (unless the Java language itself isn't enabled).
-  libgcj=
-  ;;
-no)
-  # Make sure we get it printed in the list of not supported target libs.
-  # Don't disable libffi, though, other languages use it.
-  noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
-  # Clear libgcj_saved so that even if java is enabled libffi won't be
-  # built.
-  libgcj_saved=
-  ;;
-esac
-
-# Check whether --enable-static-libjava was given.
-if test "${enable_static_libjava+set}" = set; then :
-  enableval=$enable_static_libjava; ENABLE_STATIC_LIBJAVA=$enableval
-else
-  ENABLE_STATIC_LIBJAVA=no
-fi
-
-enable_static_libjava=
-if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
-  enable_static_libjava=yes
-fi
-
-if test x$enable_static_libjava != xyes ; then
-  EXTRA_CONFIGARGS_LIBJAVA=--disable-static
-fi
-
-
-# Disable libgomp on non POSIX hosted systems.
+# Enable libgomp by default on hosted POSIX systems, and a few others.
 if test x$enable_libgomp = x ; then
-    # Enable libgomp by default on hosted POSIX systems.
     case "${target}" in
     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
 	;;
@@ -3180,6 +3157,8 @@ if test x$enable_libgomp = x ; then
 	;;
     *-*-darwin* | *-*-aix*)
 	;;
+    nvptx*-*-*)
+	;;
     *)
 	noconfigdirs="$noconfigdirs target-libgomp"
 	;;
@@ -3303,7 +3282,7 @@ fi
 
 # Enable libmpx on supported systems by request.
 if test -d ${srcdir}/libmpx; then
-    if test x$enable_libmpx = xyes; then
+    if test x$enable_libmpx = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpx support" >&5
 $as_echo_n "checking for libmpx support... " >&6; }
        if (srcdir=${srcdir}/libmpx; \
@@ -3317,8 +3296,6 @@ if test -d ${srcdir}/libmpx; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        fi
-    else
-       noconfigdirs="$noconfigdirs target-libmpx"
     fi
 fi
 
@@ -3372,6 +3349,9 @@ if test "${ENABLE_LIBSTDCXX}" = "default
     avr-*-*)
       noconfigdirs="$noconfigdirs target-libstdc++-v3"
       ;;
+    ft32-*-*)
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
   esac
 fi
 
@@ -3383,62 +3363,7 @@ case "${target}" in
     ;;
 esac
 
-# Disable Java if libffi is not supported.
-case "${target}" in
-  aarch64-*-*)
-    ;;
-  alpha*-*-*)
-    ;;
-  arm*-*-*)
-    ;;
-  cris-*-*)
-    ;;
-  frv-*-*)
-    ;;
-  hppa*-*-linux*)
-    ;;
-  hppa*-*-hpux*)
-    ;;
-  i?86-*-*)
-    ;;
-  ia64*-*-*)
-    ;;
-  m32r*-*-*)
-    ;;
-  m68k-*-*)
-    ;;
-  mips*-*-rtems*)
-    ;;
-  mips*-*-linux*)
-    ;;
-  powerpc*-*-linux*)
-    ;;
-  powerpc-*-darwin*)
-    ;;
-  powerpc-*-aix* | rs6000-*-aix*)
-    ;;
-  powerpc-*-freebsd*)
-    ;;
-  powerpc64-*-freebsd*)
-    ;;
-  powerpc*-*-rtems*)
-    ;;
-  s390-*-* | s390x-*-*)
-    ;;
-  sh-*-* | sh[34]*-*-*)
-    ;;
-  sh64-*-* | sh5*-*-*)
-    ;;
-  sparc*-*-*)
-    ;;
-  x86_64-*-*)
-    ;;
-  *-*-*)
-    unsupported_languages="$unsupported_languages java"
-    ;;
-esac
-
-# Disable Java, libgcj or related libraries for some systems.
+# Disable libffi for some systems.
 case "${target}" in
   powerpc-*-darwin*)
     ;;
@@ -3447,90 +3372,84 @@ case "${target}" in
   x86_64-*-darwin[912]*)
     ;;
   *-*-darwin*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-netware*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-rtems*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-tpf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-uclinux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-vxworks*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm*-*-freebsd*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm*-*-symbianelf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  bfin-*-*)
-    noconfigdirs="$noconfigdirs target-boehm-gc"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   cris-*-* | crisv32-*-*)
-    unsupported_languages="$unsupported_languages java"
     case "${target}" in
       *-*-linux*)
 	;;
       *) # See PR46792 regarding target-libffi.
-	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
+	noconfigdirs="$noconfigdirs target-libffi";;
     esac
     ;;
-  hppa*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    unsupported_languages="$unsupported_languages java"
-    ;;
   hppa*64*-*-hpux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   hppa*-hp-hpux11*)
     ;;
   hppa*-*-hpux*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   ia64*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   i[3456789]86-w64-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   i[3456789]86-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   x86_64-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   powerpc-*-aix*)
     # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   ft32-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-lynxos*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
 esac
 
@@ -3668,6 +3587,14 @@ esac
 case "${target}" in
   *-*-chorusos)
     ;;
+  aarch64-*-darwin*)
+    noconfigdirs="$noconfigdirs ld gas gdb gprof"
+    noconfigdirs="$noconfigdirs sim target-rda"
+    ;;
+  arm-*-darwin*)
+    noconfigdirs="$noconfigdirs ld gas gdb gprof"
+    noconfigdirs="$noconfigdirs sim target-rda"
+    ;;
   powerpc-*-darwin*)
     noconfigdirs="$noconfigdirs ld gas gdb gprof"
     noconfigdirs="$noconfigdirs sim target-rda"
@@ -3700,6 +3627,9 @@ case "${target}" in
     ;;
   *-*-netware*)
     ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libgloss"
+    ;;
   *-*-rtems*)
     noconfigdirs="$noconfigdirs target-libgloss"
     # this is not caught below because this stanza matches earlier
@@ -3731,8 +3661,8 @@ case "${target}" in
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
     ;;
-  arc-*-*|arceb-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss"
+  arc*-*-*)
+    noconfigdirs="$noconfigdirs sim"
     ;;
   arm-*-pe*)
     noconfigdirs="$noconfigdirs target-libgloss"
@@ -3740,8 +3670,6 @@ case "${target}" in
   arm-*-riscix*)
     noconfigdirs="$noconfigdirs ld target-libgloss"
     ;;
-  avr-*-rtems*)
-    ;;
   avr-*-*)
     if test x${with_avrlibc} != xno; then
       noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -3910,17 +3838,13 @@ case "${target}" in
   mips*-*-*)
     noconfigdirs="$noconfigdirs gprof"
     ;;
-  nds32*-*-*)
-    noconfigdirs="$noconfigdirs gdb"
-    ;;
   nvptx*-*-*)
-    # nvptx is just a compiler
     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
     ;;
   or1k*-*-*)
     noconfigdirs="$noconfigdirs gdb"
     ;;
-  sh-*-* | sh64-*-*)
+  sh-*-*)
     case "${target}" in
       sh*-*-elf)
          ;;
@@ -3987,6 +3911,9 @@ fi
   *-mingw*)
     host_makefile_frag="config/mh-mingw"
     ;;
+  alpha*-linux*)
+    host_makefile_frag="config/mh-alpha-linux"
+    ;;
   hppa*-hp-hpux10*)
     host_makefile_frag="config/mh-pa-hpux10"
     ;;
@@ -4013,7 +3940,6 @@ if test "${build}" != "${host}" ; then
   AS_FOR_BUILD=${AS_FOR_BUILD-as}
   CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
   CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
-  GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
   GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
   GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
   DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
@@ -4027,7 +3953,6 @@ else
   AS_FOR_BUILD="\$(AS)"
   CC_FOR_BUILD="\$(CC)"
   CXX_FOR_BUILD="\$(CXX)"
-  GCJ_FOR_BUILD="\$(GCJ)"
   GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
   GOC_FOR_BUILD="\$(GOC)"
   DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
@@ -5348,7 +5273,7 @@ if test "${gcc_cv_prog_cmp_skip+set}" = 
 else
    echo abfoo >t1
   echo cdfoo >t2
-  gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+  gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
   if cmp t1 t2 2 2 > /dev/null 2>&1; then
     if cmp t1 t2 1 1 > /dev/null 2>&1; then
       :
@@ -5419,6 +5344,12 @@ case "$have_compiler:$host:$target:$enab
     ;;
 esac
 
+# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a
+# C++98 compiler can still start the bootstrap.
+if test "$enable_bootstrap:$GXX" = "yes:yes"; then
+  CXX="$CXX -std=gnu++98"
+fi
+
 # Used for setting $lt_cv_objdir
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
@@ -5536,15 +5467,12 @@ if test "x$with_mpfr_lib" != x; then
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
+  if ! test -d ${srcdir}/mpfr/src; then
+    as_fn_error "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5
   fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
@@ -5837,20 +5765,6 @@ fi
 
 
 
-# Allow host libstdc++ to be specified for static linking with PPL.
-
-# Check whether --with-host-libstdcxx was given.
-if test "${with_host_libstdcxx+set}" = set; then :
-  withval=$with_host_libstdcxx;
-fi
-
-
-case $with_host_libstdcxx in
-  no|yes)
-    as_fn_error "-with-host-libstdcxx needs an argument" "$LINENO" 5
-    ;;
-esac
-
 # Libraries to use for stage1 or when not bootstrapping.
 
 # Check whether --with-stage1-libs was given.
@@ -5861,7 +5775,7 @@ if test "${with_stage1_libs+set}" = set;
    stage1_libs=$withval
  fi
 else
-  stage1_libs=$with_host_libstdcxx
+  stage1_libs=
 fi
 
 
@@ -5887,8 +5801,7 @@ fi
 
 
 
-# Libraries to use for stage2 and later builds.  This defaults to the
-# argument passed to --with-host-libstdcxx.
+# Libraries to use for stage2 and later builds.
 
 # Check whether --with-boot-libs was given.
 if test "${with_boot_libs+set}" = set; then :
@@ -5898,7 +5811,7 @@ if test "${with_boot_libs+set}" = set; t
    poststage1_libs=$withval
  fi
 else
-  poststage1_libs=$with_host_libstdcxx
+  poststage1_libs=
 fi
 
 
@@ -5924,7 +5837,7 @@ fi
 
 
 
-# GCC GRAPHITE dependency ISL.
+# GCC GRAPHITE dependency isl.
 # Basic setup is inlined here, actual checks are in config/isl.m4
 
 
@@ -5937,7 +5850,7 @@ fi
 # Treat --without-isl as a request to disable
 # GRAPHITE support and skip all following checks.
 if test "x$with_isl" != "xno"; then
-  # Check for ISL
+  # Check for isl
 
 
 # Check whether --with-isl-include was given.
@@ -5984,8 +5897,8 @@ fi
     isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
     islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
     ENABLE_ISL_CHECK=no
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5
-$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
+$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
   fi
 
   isllibs="${isllibs} -lisl"
@@ -5998,18 +5911,18 @@ fi
     _isl_saved_LIBS=$LIBS
 
     CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
-    LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
-    LIBS="${_isl_saved_LIBS} -lisl"
+    LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
+    LIBS="${_isl_saved_LIBS} -lisl -lgmp"
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5
-$as_echo_n "checking for compatible ISL... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16, 0.15, or deprecated 0.14" >&5
+$as_echo_n "checking for isl 0.16, 0.15, or deprecated 0.14... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <isl/val.h>
+#include <isl/ctx.h>
 int
 main ()
 {
-;
+isl_ctx_get_max_operations (isl_ctx_alloc ());
   ;
   return 0;
 }
@@ -6024,6 +5937,39 @@ rm -f core conftest.err conftest.$ac_obj
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
 $as_echo "$gcc_cv_isl" >&6; }
 
+    if test "${gcc_cv_isl}" = no ; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&5
+$as_echo "recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&6; }
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16 or 0.15" >&5
+$as_echo_n "checking for isl 0.16 or 0.15... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <isl/schedule.h>
+int
+main ()
+{
+isl_options_set_schedule_serialize_sccs (NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_has_isl_options_set_schedule_serialize_sccs=yes
+else
+  ac_has_isl_options_set_schedule_serialize_sccs=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
+$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
+
+    if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+      islver="0.15"
+
+    fi
+
     CFLAGS=$_isl_saved_CFLAGS
     LDFLAGS=$_isl_saved_LDFLAGS
     LIBS=$_isl_saved_LIBS
@@ -6055,13 +6001,13 @@ rm -f core conftest.err conftest.$ac_obj
     && test "x${isllibs}" = x \
     && test "x${islinc}" = x ; then
 
-    as_fn_error "Unable to find a usable ISL.  See config.log for details." "$LINENO" 5
+    as_fn_error "Unable to find a usable isl.  See config.log for details." "$LINENO" 5
   fi
 
 
 fi
 
-# If the ISL check failed, disable builds of in-tree variant of ISL
+# If the isl check failed, disable builds of in-tree variant of isl
 if test "x$with_isl" = xno ||
    test "x$gcc_cv_isl" = xno; then
   noconfigdirs="$noconfigdirs isl"
@@ -6103,7 +6049,7 @@ if test $target_elf = yes; then :
 else
   if test x"$default_enable_lto" = x"yes" ; then
     case $target in
-      *-apple-darwin9* | *-cygwin* | *-mingw*) ;;
+      *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
       # On other non-ELF platforms, LTO has yet to be validated.
       *) enable_lto=no ;;
     esac
@@ -6114,7 +6060,7 @@ else
   # warn during gcc/ subconfigure; unless you're bootstrapping with
   # -flto it won't be needed until after installation anyway.
     case $target in
-      *-cygwin* | *-mingw* | *-apple-darwin*) ;;
+      *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
       *) if test x"$enable_lto" = x"yes"; then
 	as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
         fi
@@ -6164,7 +6110,7 @@ if test -d ${srcdir}/gcc; then
   if test x"${enable_languages+set}" != xset; then
     if test x"${LANGUAGES+set}" = xset; then
       enable_languages="${LANGUAGES}"
-        echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+        echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
     else
       enable_languages=all
     fi
@@ -6172,7 +6118,7 @@ if test -d ${srcdir}/gcc; then
     if test x"${enable_languages}" = x ||
        test x"${enable_languages}" = xyes;
        then
-      echo configure.in: --enable-languages needs at least one language argument 1>&2
+      echo configure.ac: --enable-languages needs at least one language argument 1>&2
       exit 1
     fi
   fi
@@ -6182,7 +6128,7 @@ if test -d ${srcdir}/gcc; then
   # and make the substitution.
   case ,${enable_languages}, in
     *,f95,*)
-      echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+      echo configure.ac: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
       enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
       ;;
   esac
@@ -6458,25 +6404,44 @@ done
 # Check for Boehm's garbage collector
 # Check whether --enable-objc-gc was given.
 if test "${enable_objc_gc+set}" = set; then :
-  enableval=$enable_objc_gc; case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    as_fn_error "Boehm's garbage collector was requested yet not supported in this configuration" "$LINENO" 5
-    ;;
-esac
+  enableval=$enable_objc_gc;
 fi
 
 
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc depending on target-libjava.
-    if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
-      noconfigdirs="$noconfigdirs target-boehm-gc"
+# Check whether --with-target-bdw-gc was given.
+if test "${with_target_bdw_gc+set}" = set; then :
+  withval=$with_target_bdw_gc;
+fi
+
+
+# Check whether --with-target-bdw-gc-include was given.
+if test "${with_target_bdw_gc_include+set}" = set; then :
+  withval=$with_target_bdw_gc_include;
+fi
+
+
+# Check whether --with-target-bdw-gc-lib was given.
+if test "${with_target_bdw_gc_lib+set}" = set; then :
+  withval=$with_target_bdw_gc_lib;
+fi
+
+
+case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bdw garbage collector" >&5
+$as_echo_n "checking for bdw garbage collector... " >&6; }
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using bdw-gc in default locations" >&5
+$as_echo "using bdw-gc in default locations" >&6; }
+  else
+        if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      as_fn_error "found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing" "$LINENO" 5
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      as_fn_error "found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing" "$LINENO" 5
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-bdw-gc options" >&5
+$as_echo "using paths configured with --with-target-bdw-gc options" >&6; }
     fi
-    ;;
+  fi
 esac
 
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
@@ -6563,15 +6528,6 @@ for i in ${target_configdirs_all} ; do
   fi
 done
 
-# Exclude target-zlib if target-libjava isn't built.
-case ${target_configdirs} in
-*target-libjava*)
-  ;;
-*)
-  target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
-  ;;
-esac
-
 # libiberty-linker-plugin is special: it doesn't have its own source directory,
 # so we have to add it after the preceding checks.
 if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
@@ -6804,7 +6760,7 @@ fi
 # have requested that this magic not happen.
 #
 # The command line options always override the explicit settings in
-# configure.in, and the settings in configure.in override this magic.
+# configure.ac, and the settings in configure.ac override this magic.
 #
 # If the default for a toolchain is to use GNU as and ld, and you don't
 # want to do that, then you should use the --without-gnu-as and
@@ -7101,9 +7057,14 @@ if echo " ${target_configdirs} " | grep 
   bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
 fi
 
-# If we are building libmpx, bootstrap it.
+# If we are building libmpx and $BUILD_CONFIG contains bootstrap-mpx,
+# bootstrap it.
 if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then
-  bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+  case "$BUILD_CONFIG" in
+    *bootstrap-mpx* )
+      bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+      ;;
+  esac
 fi
 
 # Determine whether gdb needs tk/tcl or not.
@@ -7456,7 +7417,7 @@ fi
 # multilib is not explicitly enabled.
 case "$target:$have_compiler:$host:$target:$enable_multilib" in
   x86_64-*linux*:yes:$build:$build:)
-    # Make sure we have a developement environment that handles 32-bit
+    # Make sure we have a development environment that handles 32-bit
     dev64=no
     echo "int main () { return 0; }" > conftest.c
     ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
@@ -7467,7 +7428,7 @@ case "$target:$have_compiler:$host:$targ
     fi
     rm -f conftest*
     if test x${dev64} != xyes ; then
-      as_fn_error "I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib." "$LINENO" 5
+      as_fn_error "I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib." "$LINENO" 5
     fi
     ;;
 esac
@@ -7656,7 +7617,6 @@ done
 
 
 
-
 # Generate default definitions for YACC, M4, LEX and other programs that run
 # on the build machine.  These are used if the Makefile can't locate these
 # programs in objdir.
@@ -10389,167 +10349,6 @@ fi
 
 
 
-if test -n "$GCJ_FOR_TARGET"; then
-  ac_cv_prog_GCJ_FOR_TARGET=$GCJ_FOR_TARGET
-elif test -n "$ac_cv_prog_GCJ_FOR_TARGET"; then
-  GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
-fi
-
-if test -n "$ac_cv_prog_GCJ_FOR_TARGET"; then
-  for ncn_progname in gcj; do
-    # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-set dummy ${ncn_progname}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$GCJ_FOR_TARGET"; then
-  ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
-if test -n "$GCJ_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCJ_FOR_TARGET" >&5
-$as_echo "$GCJ_FOR_TARGET" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  done
-fi
-
-if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test -n "$with_build_time_tools"; then
-  for ncn_progname in gcj; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-    if test -x $with_build_time_tools/${ncn_progname}; then
-      ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      break
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-  done
-fi
-
-if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
-  for ncn_progname in gcj; do
-    if test -n "$ncn_target_tool_prefix"; then
-      # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$GCJ_FOR_TARGET"; then
-  ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
-if test -n "$GCJ_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCJ_FOR_TARGET" >&5
-$as_echo "$GCJ_FOR_TARGET" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    fi
-    if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
-      # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-set dummy ${ncn_progname}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$GCJ_FOR_TARGET"; then
-  ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
-if test -n "$GCJ_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCJ_FOR_TARGET" >&5
-$as_echo "$GCJ_FOR_TARGET" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    fi
-    test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
-  done
-fi
-
-if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
-  set dummy gcj
-  if test $build = $target ; then
-    GCJ_FOR_TARGET="$2"
-  else
-    GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
-  fi
-else
-  GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
-fi
-
-
-
 if test -n "$GFORTRAN_FOR_TARGET"; then
   ac_cv_prog_GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET
 elif test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
@@ -14178,51 +13977,6 @@ else
   fi
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gcj" >&5
-$as_echo_n "checking where to find the target gcj... " >&6; }
-if test "x${build}" != "x${host}" ; then
-  if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  else
-    # Canadian cross, just use what we found
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-else
-  ok=yes
-  case " ${configdirs} " in
-    *" gcc "*) ;;
-    *) ok=no ;;
-  esac
-  case ,${enable_languages}, in
-    *,java,*) ;;
-    *) ok=no ;;
-  esac
-  if test $ok = yes; then
-    # An in-tree tool is available and we can use it
-    GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-$as_echo "just compiled" >&6; }
-  elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  elif test "x$target" = "x$host"; then
-    # We can use an host tool
-    GCJ_FOR_TARGET='$(GCJ)'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-$as_echo "host tool" >&6; }
-  else
-    # We need a cross tool
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gfortran" >&5
 $as_echo_n "checking where to find the target gfortran... " >&6; }
 if test "x${build}" != "x${host}" ; then
@@ -14794,7 +14548,20 @@ if test "${enable_stage1_checking+set}" 
   enableval=$enable_stage1_checking; stage1_checking=--enable-checking=${enable_stage1_checking}
 else
   if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
-  stage1_checking=--enable-checking=yes,types
+  # For --disable-checking or implicit --enable-checking=release, avoid
+  # setting --enable-checking=gc in the default stage1 checking for LTO
+  # bootstraps.  See PR62077.
+  case $BUILD_CONFIG in
+    *lto*)
+      stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+    *)
+      stage1_checking=--enable-checking=yes,types;;
+  esac
+  if test "x$enable_checking" = x && \
+     test -d ${srcdir}/gcc && \
+     test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+    stage1_checking=--enable-checking=yes,types,extra
+  fi
 else
   stage1_checking=--enable-checking=$enable_checking,types
 fi
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/configure.ac ./configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/configure.ac	2015-07-06 01:51:16.000000000 +0000
+++ ./configure.ac	2017-03-06 01:53:30.000000000 +0000
@@ -1,6 +1,6 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
 #   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
-#   2014, 2015 Free Software Foundation, Inc.
+#   2014, 2015, 2016, 2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -142,11 +142,6 @@ host_libs="intl libiberty opcodes bfd re
 # If --enable-gold is used, "gold" may replace "ld".
 host_tools="flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
 
-# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-zlib \
-	target-libjava"
-
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
 # Note that libiberty is not a target library.
@@ -166,8 +161,7 @@ target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
-		${libgcj} \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -337,7 +331,7 @@ case "${ENABLE_GOLD}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
       | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
-      | *-*-solaris2* | *-*-nto* | *-*-nacl*)
+      | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
@@ -351,7 +345,7 @@ case "${ENABLE_GOLD}" in
       # Check for target supported by gold.
       case "${target}" in
         i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
-        | aarch64*-*-* | tilegx*-*-*)
+        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
 	  configdirs="$configdirs gold"
 	  if test x${ENABLE_GOLD} = xdefault; then
 	    default_ld=gold
@@ -393,6 +387,19 @@ case "${ENABLE_LD}" in
     ;;
 esac
 
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(compressed_debug_sections,
+[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld,none}],
+		[Enable compressed debug sections for gas, gold or ld by
+		 default])],
+[
+  if test x"$enable_compressed_debug_sections" = xyes; then
+    AC_MSG_ERROR([no program with compressed debug sections specified])
+  fi
+], [enable_compressed_debug_sections=])
+
 # Configure extra directories which are host specific
 
 case "${host}" in
@@ -494,44 +501,8 @@ else
 fi])
 AC_SUBST(extra_liboffloadmic_configure_flags)
 
-# Save it here so that, even in case of --enable-libgcj, if the Java
-# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
-case $enable_libgcj in
-yes)
-  # If we reset it here, it won't get added to noconfigdirs in the
-  # target-specific build rules, so it will be forcibly enabled
-  # (unless the Java language itself isn't enabled).
-  libgcj=
-  ;;
-no)
-  # Make sure we get it printed in the list of not supported target libs.
-  # Don't disable libffi, though, other languages use it.
-  noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
-  # Clear libgcj_saved so that even if java is enabled libffi won't be
-  # built.
-  libgcj_saved=
-  ;;
-esac
-
-AC_ARG_ENABLE(static-libjava,
-[AS_HELP_STRING([[--enable-static-libjava[=ARG]]],
-		[build static libjava @<:@default=no@:>@])],
-ENABLE_STATIC_LIBJAVA=$enableval,
-ENABLE_STATIC_LIBJAVA=no)
-enable_static_libjava=
-if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
-  enable_static_libjava=yes
-fi
-
-if test x$enable_static_libjava != xyes ; then
-  EXTRA_CONFIGARGS_LIBJAVA=--disable-static
-fi
-AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
-
-# Disable libgomp on non POSIX hosted systems.
+# Enable libgomp by default on hosted POSIX systems, and a few others.
 if test x$enable_libgomp = x ; then
-    # Enable libgomp by default on hosted POSIX systems.
     case "${target}" in
     *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
 	;;
@@ -541,6 +512,8 @@ if test x$enable_libgomp = x ; then
 	;;
     *-*-darwin* | *-*-aix*)
 	;;
+    nvptx*-*-*)
+	;;
     *)
 	noconfigdirs="$noconfigdirs target-libgomp"
 	;;
@@ -646,7 +619,7 @@ fi
 
 # Enable libmpx on supported systems by request.
 if test -d ${srcdir}/libmpx; then
-    if test x$enable_libmpx = xyes; then
+    if test x$enable_libmpx = x; then
        AC_MSG_CHECKING([for libmpx support])
        if (srcdir=${srcdir}/libmpx; \
                . ${srcdir}/configure.tgt; \
@@ -657,8 +630,6 @@ if test -d ${srcdir}/libmpx; then
        else
            AC_MSG_RESULT([yes])
        fi
-    else
-       noconfigdirs="$noconfigdirs target-libmpx"
     fi
 fi
 
@@ -712,6 +683,9 @@ if test "${ENABLE_LIBSTDCXX}" = "default
     avr-*-*)
       noconfigdirs="$noconfigdirs target-libstdc++-v3"
       ;;
+    ft32-*-*)
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
   esac
 fi
 
@@ -723,62 +697,7 @@ case "${target}" in
     ;;
 esac
 
-# Disable Java if libffi is not supported.
-case "${target}" in
-  aarch64-*-*)
-    ;;
-  alpha*-*-*)
-    ;;
-  arm*-*-*)
-    ;;
-  cris-*-*)
-    ;;
-  frv-*-*)
-    ;;
-  hppa*-*-linux*)
-    ;;
-  hppa*-*-hpux*)
-    ;;
-  i?86-*-*)
-    ;;
-  ia64*-*-*)
-    ;;
-  m32r*-*-*)
-    ;;
-  m68k-*-*)
-    ;;
-  mips*-*-rtems*)
-    ;;
-  mips*-*-linux*)
-    ;;
-  powerpc*-*-linux*)
-    ;;
-  powerpc-*-darwin*)
-    ;;
-  powerpc-*-aix* | rs6000-*-aix*)
-    ;;
-  powerpc-*-freebsd*)
-    ;;
-  powerpc64-*-freebsd*)
-    ;;
-  powerpc*-*-rtems*)
-    ;;
-  s390-*-* | s390x-*-*)
-    ;;
-  sh-*-* | sh[[34]]*-*-*)
-    ;;
-  sh64-*-* | sh5*-*-*)
-    ;;
-  sparc*-*-*)
-    ;;
-  x86_64-*-*)
-    ;;
-  *-*-*)
-    unsupported_languages="$unsupported_languages java"
-    ;;
-esac
-
-# Disable Java, libgcj or related libraries for some systems.
+# Disable libffi for some systems.
 case "${target}" in
   powerpc-*-darwin*)
     ;;
@@ -787,90 +706,84 @@ case "${target}" in
   x86_64-*-darwin[[912]]*)
     ;;
   *-*-darwin*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-netware*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-rtems*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-tpf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-uclinux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-vxworks*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm*-*-freebsd*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   arm*-*-symbianelf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  bfin-*-*)
-    noconfigdirs="$noconfigdirs target-boehm-gc"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   cris-*-* | crisv32-*-*)
-    unsupported_languages="$unsupported_languages java"
     case "${target}" in
       *-*-linux*)
 	;;
       *) # See PR46792 regarding target-libffi.
-	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
+	noconfigdirs="$noconfigdirs target-libffi";;
     esac
     ;;
-  hppa*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    unsupported_languages="$unsupported_languages java"
-    ;;
   hppa*64*-*-hpux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   hppa*-hp-hpux11*)
     ;;
   hppa*-*-hpux*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   ia64*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   i[[3456789]]86-w64-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   i[[3456789]]86-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   x86_64-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   powerpc-*-aix*)
     # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   ft32-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   *-*-lynxos*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
 esac
 
@@ -1008,6 +921,14 @@ esac
 case "${target}" in
   *-*-chorusos)
     ;;
+  aarch64-*-darwin*)
+    noconfigdirs="$noconfigdirs ld gas gdb gprof"
+    noconfigdirs="$noconfigdirs sim target-rda"
+    ;;
+  arm-*-darwin*)
+    noconfigdirs="$noconfigdirs ld gas gdb gprof"
+    noconfigdirs="$noconfigdirs sim target-rda"
+    ;;
   powerpc-*-darwin*)
     noconfigdirs="$noconfigdirs ld gas gdb gprof"
     noconfigdirs="$noconfigdirs sim target-rda"
@@ -1040,6 +961,9 @@ case "${target}" in
     ;;
   *-*-netware*)
     ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libgloss"
+    ;;
   *-*-rtems*)
     noconfigdirs="$noconfigdirs target-libgloss"
     # this is not caught below because this stanza matches earlier
@@ -1071,8 +995,8 @@ case "${target}" in
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
     ;;
-  arc-*-*|arceb-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss"
+  arc*-*-*)
+    noconfigdirs="$noconfigdirs sim"
     ;;
   arm-*-pe*)
     noconfigdirs="$noconfigdirs target-libgloss"
@@ -1080,8 +1004,6 @@ case "${target}" in
   arm-*-riscix*)
     noconfigdirs="$noconfigdirs ld target-libgloss"
     ;;
-  avr-*-rtems*)
-    ;;
   avr-*-*)
     if test x${with_avrlibc} != xno; then
       noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -1250,17 +1172,13 @@ case "${target}" in
   mips*-*-*)
     noconfigdirs="$noconfigdirs gprof"
     ;;
-  nds32*-*-*)
-    noconfigdirs="$noconfigdirs gdb"
-    ;;
   nvptx*-*-*)
-    # nvptx is just a compiler
     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
     ;;
   or1k*-*-*)
     noconfigdirs="$noconfigdirs gdb"
     ;;
-  sh-*-* | sh64-*-*)
+  sh-*-*)
     case "${target}" in
       sh*-*-elf)
          ;;
@@ -1308,6 +1226,9 @@ case "${host}" in
   *-mingw*)
     host_makefile_frag="config/mh-mingw"
     ;;
+  alpha*-linux*)
+    host_makefile_frag="config/mh-alpha-linux"
+    ;;
   hppa*-hp-hpux10*)
     host_makefile_frag="config/mh-pa-hpux10"
     ;;
@@ -1334,7 +1255,6 @@ if test "${build}" != "${host}" ; then
   AS_FOR_BUILD=${AS_FOR_BUILD-as}
   CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
   CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
-  GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
   GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
   GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
   DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
@@ -1348,7 +1268,6 @@ else
   AS_FOR_BUILD="\$(AS)"
   CC_FOR_BUILD="\$(CC)"
   CXX_FOR_BUILD="\$(CXX)"
-  GCJ_FOR_BUILD="\$(GCJ)"
   GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
   GOC_FOR_BUILD="\$(GOC)"
   DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
@@ -1447,6 +1366,12 @@ case "$have_compiler:$host:$target:$enab
     ;;
 esac
 
+# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a
+# C++98 compiler can still start the bootstrap.
+if test "$enable_bootstrap:$GXX" = "yes:yes"; then
+  CXX="$CXX -std=gnu++98"
+fi
+
 # Used for setting $lt_cv_objdir
 _LT_CHECK_OBJDIR
 
@@ -1520,15 +1445,13 @@ if test "x$with_mpfr_lib" != x; then
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  if ! test -d ${srcdir}/mpfr/src; then
+    AC_MSG_ERROR([dnl
+Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+.])
+  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
@@ -1685,18 +1608,6 @@ AC_SUBST(extra_mpc_gmp_configure_flags)
 AC_SUBST(extra_mpc_mpfr_configure_flags)
 AC_SUBST(extra_isl_gmp_configure_flags)
 
-# Allow host libstdc++ to be specified for static linking with PPL.
-AC_ARG_WITH(host-libstdcxx,
-[AS_HELP_STRING([--with-host-libstdcxx=L],
-		[use linker arguments L to link with libstdc++
-		 when linking with PPL])])
-
-case $with_host_libstdcxx in
-  no|yes)
-    AC_MSG_ERROR([-with-host-libstdcxx needs an argument])
-    ;;
-esac
-
 # Libraries to use for stage1 or when not bootstrapping.
 AC_ARG_WITH(stage1-libs,
 [AS_HELP_STRING([--with-stage1-libs=LIBS], [libraries for stage1])],
@@ -1705,7 +1616,7 @@ AC_ARG_WITH(stage1-libs,
  else
    stage1_libs=$withval
  fi],
-[stage1_libs=$with_host_libstdcxx])
+[stage1_libs=])
 AC_SUBST(stage1_libs)
 
 # Linker flags to use for stage1 or when not bootstrapping.
@@ -1725,8 +1636,7 @@ AC_ARG_WITH(stage1-ldflags,
  fi])
 AC_SUBST(stage1_ldflags)
 
-# Libraries to use for stage2 and later builds.  This defaults to the
-# argument passed to --with-host-libstdcxx.
+# Libraries to use for stage2 and later builds.
 AC_ARG_WITH(boot-libs,
 [AS_HELP_STRING([--with-boot-libs=LIBS], [libraries for stage2 and later])],
 [if test "$withval" = "no" -o "$withval" = "yes"; then
@@ -1734,7 +1644,7 @@ AC_ARG_WITH(boot-libs,
  else
    poststage1_libs=$withval
  fi],
-[poststage1_libs=$with_host_libstdcxx])
+[poststage1_libs=])
 AC_SUBST(poststage1_libs)
 
 # Linker flags to use for stage2 and later builds.
@@ -1755,31 +1665,31 @@ AC_ARG_WITH(boot-ldflags,
  fi])
 AC_SUBST(poststage1_ldflags)
 
-# GCC GRAPHITE dependency ISL.
+# GCC GRAPHITE dependency isl.
 # Basic setup is inlined here, actual checks are in config/isl.m4
 
 AC_ARG_WITH(isl,
   [AS_HELP_STRING(
    [--with-isl=PATH],
-   [Specify prefix directory for the installed ISL package.
+   [Specify prefix directory for the installed isl package.
     Equivalent to --with-isl-include=PATH/include
     plus --with-isl-lib=PATH/lib])])
 
 # Treat --without-isl as a request to disable
 # GRAPHITE support and skip all following checks.
 if test "x$with_isl" != "xno"; then
-  # Check for ISL
+  # Check for isl
   dnl Provide configure switches and initialize islinc & isllibs
   dnl with user input.
   ISL_INIT_FLAGS
-  dnl The versions of ISL that work for Graphite
+  dnl The versions of isl that work for Graphite
   ISL_CHECK_VERSION()
-  dnl Only execute fail-action, if ISL has been requested.
+  dnl Only execute fail-action, if isl has been requested.
   ISL_IF_FAILED([
-    AC_MSG_ERROR([Unable to find a usable ISL.  See config.log for details.])])
+    AC_MSG_ERROR([Unable to find a usable isl.  See config.log for details.])])
 fi
 
-# If the ISL check failed, disable builds of in-tree variant of ISL
+# If the isl check failed, disable builds of in-tree variant of isl
 if test "x$with_isl" = xno ||
    test "x$gcc_cv_isl" = xno; then
   noconfigdirs="$noconfigdirs isl"
@@ -1799,7 +1709,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms b
   build_lto_plugin=yes
 ],[if test x"$default_enable_lto" = x"yes" ; then
     case $target in
-      *-apple-darwin9* | *-cygwin* | *-mingw*) ;;
+      *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
       # On other non-ELF platforms, LTO has yet to be validated.
       *) enable_lto=no ;;
     esac
@@ -1810,7 +1720,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms b
   # warn during gcc/ subconfigure; unless you're bootstrapping with
   # -flto it won't be needed until after installation anyway.
     case $target in
-      *-cygwin* | *-mingw* | *-apple-darwin*) ;;
+      *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
       *) if test x"$enable_lto" = x"yes"; then
 	AC_MSG_ERROR([LTO support is not enabled for this target.])
         fi
@@ -1854,7 +1764,7 @@ if test -d ${srcdir}/gcc; then
   if test x"${enable_languages+set}" != xset; then
     if test x"${LANGUAGES+set}" = xset; then
       enable_languages="${LANGUAGES}"
-        echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+        echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
     else
       enable_languages=all
     fi
@@ -1862,7 +1772,7 @@ if test -d ${srcdir}/gcc; then
     if test x"${enable_languages}" = x ||
        test x"${enable_languages}" = xyes;
        then
-      echo configure.in: --enable-languages needs at least one language argument 1>&2
+      echo configure.ac: --enable-languages needs at least one language argument 1>&2
       exit 1
     fi
   fi
@@ -1872,7 +1782,7 @@ if test -d ${srcdir}/gcc; then
   # and make the substitution.
   case ,${enable_languages}, in
     *,f95,*)
-      echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+      echo configure.ac: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
       enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
       ;;
   esac
@@ -2149,24 +2059,34 @@ done
 AC_ARG_ENABLE(objc-gc,
 [AS_HELP_STRING([--enable-objc-gc],
 		[enable use of Boehm's garbage collector with the
-		 GNU Objective-C runtime])],
-[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
-    ;;
-esac])
-
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc depending on target-libjava.
-    if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
-      noconfigdirs="$noconfigdirs target-boehm-gc"
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-target-bdw-gc-include=PATH/include
+		 plus --with-target-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+		[specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+		[specify directories for installed bdw-gc library])])
+		  
+case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
+  AC_MSG_CHECKING([for bdw garbage collector])
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+    dnl no bdw-gw options, assume default locations
+    AC_MSG_RESULT([using bdw-gc in default locations])
+  else
+    dnl bdw-gw options, first error checking, complete checking in libobjc
+    if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
     fi
-    ;;
+  fi
 esac
 
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
@@ -2253,15 +2173,6 @@ for i in ${target_configdirs_all} ; do
   fi
 done
 
-# Exclude target-zlib if target-libjava isn't built.
-case ${target_configdirs} in
-*target-libjava*)
-  ;;
-*)
-  target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
-  ;;
-esac
-
 # libiberty-linker-plugin is special: it doesn't have its own source directory,
 # so we have to add it after the preceding checks.
 if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
@@ -2443,7 +2354,7 @@ fi
 # have requested that this magic not happen.
 # 
 # The command line options always override the explicit settings in 
-# configure.in, and the settings in configure.in override this magic.
+# configure.ac, and the settings in configure.ac override this magic.
 #
 # If the default for a toolchain is to use GNU as and ld, and you don't 
 # want to do that, then you should use the --without-gnu-as and
@@ -2694,7 +2605,8 @@ AC_SUBST(BUILD_CONFIG)
 # Use same top-level configure hooks in libgcc/libstdc++/libvtv.
 AC_MSG_CHECKING([for --enable-vtable-verify])
 AC_ARG_ENABLE(vtable-verify,
-[  --enable-vtable-verify    Enable vtable verification feature ],
+[AS_HELP_STRING([--enable-vtable-verify],
+		[Enable vtable verification feature])],
 [case "$enableval" in
  yes) enable_vtable_verify=yes ;;
  no)  enable_vtable_verify=no ;;
@@ -2731,9 +2643,14 @@ if echo " ${target_configdirs} " | grep 
   bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
 fi
 
-# If we are building libmpx, bootstrap it.
+# If we are building libmpx and $BUILD_CONFIG contains bootstrap-mpx,
+# bootstrap it.
 if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then
-  bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+  case "$BUILD_CONFIG" in
+    *bootstrap-mpx* )
+      bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+      ;;
+  esac
 fi
 
 # Determine whether gdb needs tk/tcl or not.
@@ -3089,7 +3006,7 @@ fi
 # multilib is not explicitly enabled.
 case "$target:$have_compiler:$host:$target:$enable_multilib" in
   x86_64-*linux*:yes:$build:$build:)
-    # Make sure we have a developement environment that handles 32-bit
+    # Make sure we have a development environment that handles 32-bit
     dev64=no
     echo "int main () { return 0; }" > conftest.c
     ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
@@ -3100,7 +3017,7 @@ case "$target:$have_compiler:$host:$targ
     fi 
     rm -f conftest*
     if test x${dev64} != xyes ; then
-      AC_MSG_ERROR([I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.])
+      AC_MSG_ERROR([I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.])
     fi
     ;;
 esac
@@ -3280,7 +3197,6 @@ AC_SUBST(CFLAGS_FOR_BUILD)
 AC_SUBST(CXXFLAGS_FOR_BUILD)
 AC_SUBST(CXX_FOR_BUILD)
 AC_SUBST(DLLTOOL_FOR_BUILD)
-AC_SUBST(GCJ_FOR_BUILD)
 AC_SUBST(GFORTRAN_FOR_BUILD)
 AC_SUBST(GOC_FOR_BUILD)
 AC_SUBST(LDFLAGS_FOR_BUILD)
@@ -3390,7 +3306,6 @@ AC_ARG_WITH([build-time-tools], 
 NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc)
 NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx)
 NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
-NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
 NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
 NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
 
@@ -3422,8 +3337,6 @@ GCC_TARGET_TOOL(c++ for libstdc++, RAW_C
 		c++)
 GCC_TARGET_TOOL(dlltool, DLLTOOL_FOR_TARGET, DLLTOOL, [binutils/dlltool])
 GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
-GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ,
-		[gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java)
 GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
 		[gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
 GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
@@ -3508,7 +3421,20 @@ AC_ARG_ENABLE(stage1-checking,
 		[choose additional checking for stage1 of the compiler])],
 [stage1_checking=--enable-checking=${enable_stage1_checking}],
 [if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
-  stage1_checking=--enable-checking=yes,types
+  # For --disable-checking or implicit --enable-checking=release, avoid
+  # setting --enable-checking=gc in the default stage1 checking for LTO
+  # bootstraps.  See PR62077.
+  case $BUILD_CONFIG in
+    *lto*)
+      stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+    *)
+      stage1_checking=--enable-checking=yes,types;;
+  esac
+  if test "x$enable_checking" = x && \
+     test -d ${srcdir}/gcc && \
+     test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+    stage1_checking=--enable-checking=yes,types,extra
+  fi
 else
   stage1_checking=--enable-checking=$enable_checking,types
 fi])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/ChangeLog ./cpu/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./cpu/ChangeLog	2017-03-06 01:49:05.000000000 +0000
@@ -1,3 +1,21 @@
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+	* mep.opc (expand_string): Add fall through comment.
+
+2016-03-03  Alan Modra  <amodra@gmail.com>
+
+	* fr30.cpu (f-m4): Replace bogus comment with a better guess
+	at what is really going on.
+
+2016-03-02  Alan Modra  <amodra@gmail.com>
+
+	* fr30.cpu (f-m4): Replace -1 << 4 with -16.
+
+2016-02-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* epiphany.opc (epiphany_print_insn): Set info->bytes_per_line to
+	a constant to better align disassembler output.
+
 2014-07-20  Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
 
 	* or1korbis.cpu (l-msync, l-psync, l-csync): New instructions.
@@ -261,7 +279,7 @@
 	(dst32-16-16sa-Unprefixed-*): New
 	(jsri): Fix operands.
 	(setzx): Fix encoding.
-	
+
 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
 
 	* m32r.opc: Formatting.
@@ -283,7 +301,7 @@
 	(parse_signed_bitbase8): Likewise.
 	(parse_signed_bitbase11): Likewise.
 	(parse_signed_bitbase19): Likewise.
-	
+
 2006-03-13  DJ Delorie  <dj@redhat.com>
 
 	* m32c.cpu (Bit3-S): New.
@@ -320,10 +338,10 @@
 	attribute.
 	(jsri16, jsri32): Add 1ADDR attribute.
 	(jsr32.w, jsr32.a): Add JUMP attribute.
-	
+
 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
-            Anil Paranjape   <anilp1@kpitcummins.com>
-            Shilin Shakti    <shilins@kpitcummins.com>
+	    Anil Paranjape   <anilp1@kpitcummins.com>
+	    Shilin Shakti    <shilins@kpitcummins.com>
 
 	* xc16x.cpu: New file containing complete CGEN specific XC16X CPU
 	description.
@@ -424,7 +442,7 @@
 	stzx16-imm8-imm8-abs16): Fix operand typos.
 	* m32c.opc (m32c_asm_hash): Support bnCND.
 	(parse_signed4n, print_signed4n): New.
-	
+
 2005-10-26  DJ Delorie  <dj@redhat.com>
 
 	* m32c.cpu (f-dsp-8-s24, Dsp-8-s24): New.
@@ -498,7 +516,7 @@
 	Fix compile time warnings about signedness mismatches.
 	Remove dead code.
 	(parse_lab_5_3): New parser function.
-	
+
 2005-07-16  Jim Blandy  <jimb@redhat.com>
 
 	* m32c.opc (m32c_cgen_insn_supported): Use int, not CGEN_BITSET,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/epiphany.opc ./cpu/epiphany.opc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/epiphany.opc	2015-07-06 01:48:28.000000000 +0000
+++ ./cpu/epiphany.opc	2017-03-06 01:49:05.000000000 +0000
@@ -349,15 +349,16 @@ epiphany_print_insn (CGEN_CPU_DESC cd, b
   int status;
 
   info->bytes_per_chunk = 2;
+  info->bytes_per_line = 4;
 
   /* Attempt to read the base part of the insn.  */
-  info->bytes_per_line = buflen = cd->base_insn_bitsize / 8;
+  buflen = cd->base_insn_bitsize / 8;
   status = (*info->read_memory_func) (pc, buf, buflen, info);
 
   /* Try again with the minimum part, if min < base.  */
   if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize))
     {
-      info->bytes_per_line = buflen = cd->min_insn_bitsize / 8;
+      buflen = cd->min_insn_bitsize / 8;
       status = (*info->read_memory_func) (pc, buf, buflen, info);
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/fr30.cpu ./cpu/fr30.cpu
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/fr30.cpu	2015-07-06 01:48:28.000000000 +0000
+++ ./cpu/fr30.cpu	2017-03-06 01:49:05.000000000 +0000
@@ -159,11 +159,13 @@
 (dnf f-u4c       "4 bit 0 extended"      () 12  4)
 (df  f-i4        "4 bit sign extended"   ()  8  4 INT #f #f)
 (df  f-m4        "4 bit minus extended"  ()  8  4 UINT
+     ; ??? This field takes a value in the range [-16,-1] but there
+     ; doesn't seem a way to tell CGEN that.  Use an unsigned field and
+     ; disable range checks on insertion by masking.  Restore the sign
+     ; on extraction.  CGEN generated documentation for insns that use
+     ; this field will be wrong.
      ((value pc) (and WI value (const #xf)))
-     ; ??? On a 64 bit host this doesn't get completely sign extended
-     ; if the value is recorded in a long, as it is during extraction.
-     ; Various fixes exist, pick one.
-     ((value pc) (or  WI value (sll WI (const -1) (const 4))))
+     ((value pc) (or  WI value (const -16)))
 )
 (dnf f-u8        "8 bit unsigned"        ()  8  8)
 (dnf f-i8        "8 bit unsigned"        ()  4  8)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/mep.opc ./cpu/mep.opc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/cpu/mep.opc	2015-07-06 01:48:28.000000000 +0000
+++ ./cpu/mep.opc	2017-03-06 01:49:05.000000000 +0000
@@ -790,6 +790,7 @@ expand_string (const char *in, int first
 		  break;
 		case '(':
 		  depth++;
+		  /* Fall through.  */
 		default:
 		  args[narg].len++;
 		  break;		  
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/djunpack.bat ./djunpack.bat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/djunpack.bat	2015-07-06 01:51:19.000000000 +0000
+++ ./djunpack.bat	2017-03-06 01:53:33.000000000 +0000
@@ -17,8 +17,8 @@ Rem
 Rem The following 2 lines need to be changed with each new GDB release, to
 Rem be identical to the name of the top-level directory where the GDB
 Rem distribution unpacks itself.
-set GDBVER=$package-7.9.50.20150706
-if "%GDBVER%"=="$package-7.9.50.20150706" GoTo EnvOk
+set GDBVER=$package-7.12.50.20170306
+if "%GDBVER%"=="$package-7.12.50.20170306" GoTo EnvOk
 Rem If their environment space is too small, re-exec with a larger one
 command.com /e:4096 /c %0 %1
 GoTo End
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/etc/ChangeLog ./etc/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/etc/ChangeLog	2015-07-06 01:48:28.000000000 +0000
+++ ./etc/ChangeLog	2017-03-06 01:49:05.000000000 +0000
@@ -1,3 +1,19 @@
+2017-01-04  Alan Modra  <amodra@gmail.com>
+
+	* update-copyright.py: New file.
+	* add-log.el: Update copyright year range.
+	* texi2pod.pl: Likewise.
+
+2016-06-13  Nick Clifton  <nickc@redhat.com>
+
+	* texi2pod.pl: Escape curly braces, whilst searching for keyword
+	strong.
+
+2016-03-18  Nick Clifton  <nickc@redhat.com>
+
+	* texi2pod.pl: Add TARGET to the list of recognised man page
+	sections.
+
 2014-06-27  Ludovic CourtÃ¨s  <ludo@gnu.org>
 
 	PR external/16327
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/etc/texi2pod.pl ./etc/texi2pod.pl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/etc/texi2pod.pl	2015-07-06 01:48:28.000000000 +0000
+++ ./etc/texi2pod.pl	2017-03-06 01:49:05.000000000 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 
-#   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+#   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
 # This file is part of GCC.
 
@@ -311,7 +311,7 @@ while(<$inf>) {
 	@columns = ();
 	for $column (split (/\s*\@tab\s*/, $1)) {
 	    # @strong{...} is used a @headitem work-alike
-	    $column =~ s/^\@strong{(.*)}$/$1/;
+	    $column =~ s/^\@strong\{(.*)\}$/$1/;
 	    push @columns, $column;
 	}
 	$_ = "\n=item ".join (" : ", @columns)."\n";
@@ -340,7 +340,7 @@ die "No filename or title\n" unless defi
 $sects{NAME} = "$fn \- $tl\n";
 $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
 
-for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
+for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
 	      BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
     if(exists $sects{$sect}) {
 	$head = $sect;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch32-linux-nat.c ./gdb/aarch32-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch32-linux-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/aarch32-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,111 @@
+/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+
+#include "regcache.h"
+#include "arm-tdep.h"
+#include "arm-linux-tdep.h"
+#include "arch/arm-linux.h"
+
+#include "aarch32-linux-nat.h"
+
+/* Supply GP registers contents, stored in REGS, to REGCACHE.  ARM_APCS_32
+   is true if the 32-bit mode is in use, otherwise, it is false.  */
+
+void
+aarch32_gp_regcache_supply (struct regcache *regcache, uint32_t *regs,
+			    int arm_apcs_32)
+{
+  int regno;
+
+  for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
+    regcache_raw_supply (regcache, regno, &regs[regno]);
+
+  if (arm_apcs_32)
+    {
+      /* Clear reserved bits bit 20 to bit 23.  */
+      regs[ARM_CPSR_GREGNUM] &= 0xff0fffff;
+      regcache_raw_supply (regcache, ARM_PS_REGNUM, &regs[ARM_CPSR_GREGNUM]);
+    }
+  else
+    regcache_raw_supply (regcache, ARM_PS_REGNUM, &regs[ARM_PC_REGNUM]);
+
+  regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
+			  (get_regcache_arch (regcache), regs[ARM_PC_REGNUM]);
+  regcache_raw_supply (regcache, ARM_PC_REGNUM, &regs[ARM_PC_REGNUM]);
+}
+
+/* Collect GP registers from REGCACHE to buffer REGS.  ARM_APCS_32 is
+   true if the 32-bit mode is in use, otherwise, it is false.  */
+
+void
+aarch32_gp_regcache_collect (const struct regcache *regcache, uint32_t *regs,
+			     int arm_apcs_32)
+{
+  int regno;
+
+  for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
+    {
+      if (REG_VALID == regcache_register_status (regcache, regno))
+	regcache_raw_collect (regcache, regno, &regs[regno]);
+    }
+
+  if (arm_apcs_32
+      && REG_VALID == regcache_register_status (regcache, ARM_PS_REGNUM))
+    {
+      uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
+
+      regcache_raw_collect (regcache, ARM_PS_REGNUM,
+			    &regs[ARM_CPSR_GREGNUM]);
+      /* Keep reserved bits bit 20 to bit 23.  */
+      regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
+				| (cpsr & 0x00f00000));
+    }
+}
+
+/* Supply VFP registers contents, stored in REGS, to REGCACHE.
+   VFP_REGISTER_COUNT is the number of VFP registers.  */
+
+void
+aarch32_vfp_regcache_supply (struct regcache *regcache, gdb_byte *regs,
+			     const int vfp_register_count)
+{
+  int regno;
+
+  for (regno = 0; regno < vfp_register_count; regno++)
+    regcache_raw_supply (regcache, regno + ARM_D0_REGNUM,
+			 regs + regno * 8);
+
+  regcache_raw_supply (regcache, ARM_FPSCR_REGNUM,
+		       regs + 32 * 8);
+}
+
+/* Collect VFP registers from REGCACHE to buffer REGS.
+   VFP_REGISTER_COUNT is the number VFP registers.  */
+
+void
+aarch32_vfp_regcache_collect (const struct regcache *regcache, gdb_byte *regs,
+			      const int vfp_register_count)
+{
+  int regno;
+
+  for (regno = 0; regno < vfp_register_count; regno++)
+    regcache_raw_collect (regcache, regno + ARM_D0_REGNUM, regs + regno * 8);
+
+  regcache_raw_collect (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch32-linux-nat.h ./gdb/aarch32-linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch32-linux-nat.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/aarch32-linux-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Fetch and store VFP Registers.  The kernel object has space for 32
+   64-bit registers, and the FPSCR.  This is even when on a VFPv2 or
+   VFPv3D16 target.  */
+#define VFP_REGS_SIZE (32 * 8 + 4)
+
+void aarch32_gp_regcache_supply (struct regcache *regcache, uint32_t *regs,
+				 int arm_apcs_32);
+
+void aarch32_gp_regcache_collect (const struct regcache *regcache,
+				  uint32_t *regs, int arm_apcs_32);
+
+void aarch32_vfp_regcache_supply (struct regcache *regcache, gdb_byte *regs,
+				  const int vfp_register_count);
+
+void aarch32_vfp_regcache_collect (const struct regcache *regcache,
+				   gdb_byte *regs,
+				   const int vfp_register_count);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-nat.c ./gdb/aarch64-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux AArch64.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
@@ -29,9 +29,14 @@
 #include "gdbcmd.h"
 #include "aarch64-tdep.h"
 #include "aarch64-linux-tdep.h"
+#include "aarch32-linux-nat.h"
+#include "nat/aarch64-linux.h"
+#include "nat/aarch64-linux-hw-point.h"
+
+#include "elf/external.h"
 #include "elf/common.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/utsname.h>
 #include <asm/ptrace.h>
 
@@ -44,146 +49,6 @@
 #define TRAP_HWBKPT 0x0004
 #endif
 
-/* On GNU/Linux, threads are implemented as pseudo-processes, in which
-   case we may be tracing more than one process at a time.  In that
-   case, inferior_ptid will contain the main process ID and the
-   individual thread (process) ID.  get_thread_id () is used to get
-   the thread id if it's available, and the process id otherwise.  */
-
-static int
-get_thread_id (ptid_t ptid)
-{
-  int tid = ptid_get_lwp (ptid);
-
-  if (0 == tid)
-    tid = ptid_get_pid (ptid);
-  return tid;
-}
-
-/* Macro definitions, data structures, and code for the hardware
-   breakpoint and hardware watchpoint support follow.  We use the
-   following abbreviations throughout the code:
-
-   hw - hardware
-   bp - breakpoint
-   wp - watchpoint  */
-
-/* Maximum number of hardware breakpoint and watchpoint registers.
-   Neither of these values may exceed the width of dr_changed_t
-   measured in bits.  */
-
-#define AARCH64_HBP_MAX_NUM 16
-#define AARCH64_HWP_MAX_NUM 16
-
-/* Alignment requirement in bytes for addresses written to
-   hardware breakpoint and watchpoint value registers.
-
-   A ptrace call attempting to set an address that does not meet the
-   alignment criteria will fail.  Limited support has been provided in
-   this port for unaligned watchpoints, such that from a GDB user
-   perspective, an unaligned watchpoint may be requested.
-
-   This is achieved by minimally enlarging the watched area to meet the
-   alignment requirement, and if necessary, splitting the watchpoint
-   over several hardware watchpoint registers.  */
-
-#define AARCH64_HBP_ALIGNMENT 4
-#define AARCH64_HWP_ALIGNMENT 8
-
-/* The maximum length of a memory region that can be watched by one
-   hardware watchpoint register.  */
-
-#define AARCH64_HWP_MAX_LEN_PER_REG 8
-
-/* ptrace hardware breakpoint resource info is formatted as follows:
-
-   31             24             16               8              0
-   +---------------+--------------+---------------+---------------+
-   |   RESERVED    |   RESERVED   |   DEBUG_ARCH  |  NUM_SLOTS    |
-   +---------------+--------------+---------------+---------------+  */
-
-
-/* Macros to extract fields from the hardware debug information word.  */
-#define AARCH64_DEBUG_NUM_SLOTS(x) ((x) & 0xff)
-#define AARCH64_DEBUG_ARCH(x) (((x) >> 8) & 0xff)
-
-/* Macro for the expected version of the ARMv8-A debug architecture.  */
-#define AARCH64_DEBUG_ARCH_V8 0x6
-
-/* Number of hardware breakpoints/watchpoints the target supports.
-   They are initialized with values obtained via the ptrace calls
-   with NT_ARM_HW_BREAK and NT_ARM_HW_WATCH respectively.  */
-
-static int aarch64_num_bp_regs;
-static int aarch64_num_wp_regs;
-
-/* Each bit of a variable of this type is used to indicate whether a
-   hardware breakpoint or watchpoint setting has been changed since
-   the last update.
-
-   Bit N corresponds to the Nth hardware breakpoint or watchpoint
-   setting which is managed in aarch64_debug_reg_state, where N is
-   valid between 0 and the total number of the hardware breakpoint or
-   watchpoint debug registers minus 1.
-
-   When bit N is 1, the corresponding breakpoint or watchpoint setting
-   has changed, and therefore the corresponding hardware debug
-   register needs to be updated via the ptrace interface.
-
-   In the per-thread arch-specific data area, we define two such
-   variables for per-thread hardware breakpoint and watchpoint
-   settings respectively.
-
-   This type is part of the mechanism which helps reduce the number of
-   ptrace calls to the kernel, i.e. avoid asking the kernel to write
-   to the debug registers with unchanged values.  */
-
-typedef ULONGEST dr_changed_t;
-
-/* Set each of the lower M bits of X to 1; assert X is wide enough.  */
-
-#define DR_MARK_ALL_CHANGED(x, m)					\
-  do									\
-    {									\
-      gdb_assert (sizeof ((x)) * 8 >= (m));				\
-      (x) = (((dr_changed_t)1 << (m)) - 1);				\
-    } while (0)
-
-#define DR_MARK_N_CHANGED(x, n)						\
-  do									\
-    {									\
-      (x) |= ((dr_changed_t)1 << (n));					\
-    } while (0)
-
-#define DR_CLEAR_CHANGED(x)						\
-  do									\
-    {									\
-      (x) = 0;								\
-    } while (0)
-
-#define DR_HAS_CHANGED(x) ((x) != 0)
-#define DR_N_HAS_CHANGED(x, n) ((x) & ((dr_changed_t)1 << (n)))
-
-/* Structure for managing the hardware breakpoint/watchpoint resources.
-   DR_ADDR_* stores the address, DR_CTRL_* stores the control register
-   content, and DR_REF_COUNT_* counts the numbers of references to the
-   corresponding bp/wp, by which way the limited hardware resources
-   are not wasted on duplicated bp/wp settings (though so far gdb has
-   done a good job by not sending duplicated bp/wp requests).  */
-
-struct aarch64_debug_reg_state
-{
-  /* hardware breakpoint */
-  CORE_ADDR dr_addr_bp[AARCH64_HBP_MAX_NUM];
-  unsigned int dr_ctrl_bp[AARCH64_HBP_MAX_NUM];
-  unsigned int dr_ref_count_bp[AARCH64_HBP_MAX_NUM];
-
-  /* hardware watchpoint */
-  CORE_ADDR dr_addr_wp[AARCH64_HWP_MAX_NUM];
-  unsigned int dr_ctrl_wp[AARCH64_HWP_MAX_NUM];
-  unsigned int dr_ref_count_wp[AARCH64_HWP_MAX_NUM];
-};
-
 /* Per-process data.  We don't bind this to a per-inferior registry
    because of targets like x86 GNU/Linux that need to keep track of
    processes that aren't bound to any inferior (e.g., fork children,
@@ -225,7 +90,7 @@ aarch64_add_process (pid_t pid)
 {
   struct aarch64_process_info *proc;
 
-  proc = xcalloc (1, sizeof (*proc));
+  proc = XCNEW (struct aarch64_process_info);
   proc->pid = pid;
 
   proc->next = aarch64_process_list;
@@ -277,203 +142,48 @@ aarch64_forget_process (pid_t pid)
 
 /* Get debug registers state for process PID.  */
 
-static struct aarch64_debug_reg_state *
+struct aarch64_debug_reg_state *
 aarch64_get_debug_reg_state (pid_t pid)
 {
   return &aarch64_process_info_get (pid)->state;
 }
 
-/* Per-thread arch-specific data we want to keep.  */
-
-struct arch_lwp_info
-{
-  /* When bit N is 1, it indicates the Nth hardware breakpoint or
-     watchpoint register pair needs to be updated when the thread is
-     resumed; see aarch64_linux_prepare_to_resume.  */
-  dr_changed_t dr_changed_bp;
-  dr_changed_t dr_changed_wp;
-};
-
-/* Call ptrace to set the thread TID's hardware breakpoint/watchpoint
-   registers with data from *STATE.  */
-
-static void
-aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
-			      int tid, int watchpoint)
-{
-  int i, count;
-  struct iovec iov;
-  struct user_hwdebug_state regs;
-  const CORE_ADDR *addr;
-  const unsigned int *ctrl;
-
-  memset (&regs, 0, sizeof (regs));
-  iov.iov_base = &regs;
-  count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;
-  addr = watchpoint ? state->dr_addr_wp : state->dr_addr_bp;
-  ctrl = watchpoint ? state->dr_ctrl_wp : state->dr_ctrl_bp;
-  if (count == 0)
-    return;
-  iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs[count - 1])
-		 + sizeof (regs.dbg_regs [count - 1]));
-
-  for (i = 0; i < count; i++)
-    {
-      regs.dbg_regs[i].addr = addr[i];
-      regs.dbg_regs[i].ctrl = ctrl[i];
-    }
-
-  if (ptrace (PTRACE_SETREGSET, tid,
-	      watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK,
-	      (void *) &iov))
-    error (_("Unexpected error setting hardware debug registers"));
-}
-
-struct aarch64_dr_update_callback_param
-{
-  int is_watchpoint;
-  unsigned int idx;
-};
-
-/* Callback for iterate_over_lwps.  Records the
-   information about the change of one hardware breakpoint/watchpoint
-   setting for the thread LWP.
-   The information is passed in via PTR.
-   N.B.  The actual updating of hardware debug registers is not
-   carried out until the moment the thread is resumed.  */
-
-static int
-debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
-{
-  struct aarch64_dr_update_callback_param *param_p
-    = (struct aarch64_dr_update_callback_param *) ptr;
-  int pid = get_thread_id (lwp->ptid);
-  int idx = param_p->idx;
-  int is_watchpoint = param_p->is_watchpoint;
-  struct arch_lwp_info *info = lwp->arch_private;
-  dr_changed_t *dr_changed_ptr;
-  dr_changed_t dr_changed;
-
-  if (info == NULL)
-    info = lwp->arch_private = XCNEW (struct arch_lwp_info);
-
-  if (show_debug_regs)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-			  "debug_reg_change_callback: \n\tOn entry:\n");
-      fprintf_unfiltered (gdb_stdlog,
-			  "\tpid%d, dr_changed_bp=0x%s, "
-			  "dr_changed_wp=0x%s\n",
-			  pid, phex (info->dr_changed_bp, 8),
-			  phex (info->dr_changed_wp, 8));
-    }
-
-  dr_changed_ptr = is_watchpoint ? &info->dr_changed_wp
-    : &info->dr_changed_bp;
-  dr_changed = *dr_changed_ptr;
-
-  gdb_assert (idx >= 0
-	      && (idx <= (is_watchpoint ? aarch64_num_wp_regs
-			  : aarch64_num_bp_regs)));
-
-  /* The actual update is done later just before resuming the lwp,
-     we just mark that one register pair needs updating.  */
-  DR_MARK_N_CHANGED (dr_changed, idx);
-  *dr_changed_ptr = dr_changed;
-
-  /* If the lwp isn't stopped, force it to momentarily pause, so
-     we can update its debug registers.  */
-  if (!lwp->stopped)
-    linux_stop_lwp (lwp);
-
-  if (show_debug_regs)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-			  "\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
-			  "dr_changed_wp=0x%s\n",
-			  pid, phex (info->dr_changed_bp, 8),
-			  phex (info->dr_changed_wp, 8));
-    }
-
-  /* Continue the iteration.  */
-  return 0;
-}
-
-/* Notify each thread that their IDXth breakpoint/watchpoint register
-   pair needs to be updated.  The message will be recorded in each
-   thread's arch-specific data area, the actual updating will be done
-   when the thread is resumed.  */
-
-static void
-aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state,
-				 int is_watchpoint, unsigned int idx)
-{
-  struct aarch64_dr_update_callback_param param;
-  ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
-
-  param.is_watchpoint = is_watchpoint;
-  param.idx = idx;
-
-  iterate_over_lwps (pid_ptid, debug_reg_change_callback, (void *) &param);
-}
-
-/* Print the values of the cached breakpoint/watchpoint registers.  */
-
-static void
-aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
-			      const char *func, CORE_ADDR addr,
-			      int len, int type)
-{
-  int i;
-
-  fprintf_unfiltered (gdb_stdlog, "%s", func);
-  if (addr || len)
-    fprintf_unfiltered (gdb_stdlog, " (addr=0x%08lx, len=%d, type=%s)",
-			(unsigned long) addr, len,
-			type == hw_write ? "hw-write-watchpoint"
-			: (type == hw_read ? "hw-read-watchpoint"
-			   : (type == hw_access ? "hw-access-watchpoint"
-			      : (type == hw_execute ? "hw-breakpoint"
-				 : "??unknown??"))));
-  fprintf_unfiltered (gdb_stdlog, ":\n");
-
-  fprintf_unfiltered (gdb_stdlog, "\tBREAKPOINTs:\n");
-  for (i = 0; i < aarch64_num_bp_regs; i++)
-    fprintf_unfiltered (gdb_stdlog,
-			"\tBP%d: addr=0x%08lx, ctrl=0x%08x, ref.count=%d\n",
-			i, state->dr_addr_bp[i],
-			state->dr_ctrl_bp[i], state->dr_ref_count_bp[i]);
-
-  fprintf_unfiltered (gdb_stdlog, "\tWATCHPOINTs:\n");
-  for (i = 0; i < aarch64_num_wp_regs; i++)
-    fprintf_unfiltered (gdb_stdlog,
-			"\tWP%d: addr=0x%08lx, ctrl=0x%08x, ref.count=%d\n",
-			i, state->dr_addr_wp[i],
-			state->dr_ctrl_wp[i], state->dr_ref_count_wp[i]);
-}
-
 /* Fill GDB's register array with the general-purpose register values
    from the current thread.  */
 
 static void
 fetch_gregs_from_thread (struct regcache *regcache)
 {
-  int ret, regno, tid;
+  int ret, tid;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   elf_gregset_t regs;
   struct iovec iovec;
 
-  tid = get_thread_id (inferior_ptid);
+  /* Make sure REGS can hold all registers contents on both aarch64
+     and arm.  */
+  gdb_static_assert (sizeof (regs) >= 18 * 4);
+
+  tid = ptid_get_lwp (inferior_ptid);
 
   iovec.iov_base = &regs;
-  iovec.iov_len = sizeof (regs);
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    iovec.iov_len = 18 * 4;
+  else
+    iovec.iov_len = sizeof (regs);
 
   ret = ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iovec);
   if (ret < 0)
     perror_with_name (_("Unable to fetch general registers."));
 
-  for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
-    regcache_raw_supply (regcache, regno,
-			 (char *) &regs[regno - AARCH64_X0_REGNUM]);
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    aarch32_gp_regcache_supply (regcache, (uint32_t *) regs, 1);
+  else
+    {
+      int regno;
+
+      for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
+	regcache_raw_supply (regcache, regno, &regs[regno - AARCH64_X0_REGNUM]);
+    }
 }
 
 /* Store to the current thread the valid general-purpose register
@@ -482,23 +192,37 @@ fetch_gregs_from_thread (struct regcache
 static void
 store_gregs_to_thread (const struct regcache *regcache)
 {
-  int ret, regno, tid;
+  int ret, tid;
   elf_gregset_t regs;
   struct iovec iovec;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
-  tid = get_thread_id (inferior_ptid);
+  /* Make sure REGS can hold all registers contents on both aarch64
+     and arm.  */
+  gdb_static_assert (sizeof (regs) >= 18 * 4);
+  tid = ptid_get_lwp (inferior_ptid);
 
   iovec.iov_base = &regs;
-  iovec.iov_len = sizeof (regs);
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    iovec.iov_len = 18 * 4;
+  else
+    iovec.iov_len = sizeof (regs);
 
   ret = ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iovec);
   if (ret < 0)
     perror_with_name (_("Unable to fetch general registers."));
 
-  for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
-    if (REG_VALID == regcache_register_status (regcache, regno))
-      regcache_raw_collect (regcache, regno,
-			    (char *) &regs[regno - AARCH64_X0_REGNUM]);
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    aarch32_gp_regcache_collect (regcache, (uint32_t *) regs, 1);
+  else
+    {
+      int regno;
+
+      for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
+	if (REG_VALID == regcache_register_status (regcache, regno))
+	  regcache_raw_collect (regcache, regno,
+				&regs[regno - AARCH64_X0_REGNUM]);
+    }
 
   ret = ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, &iovec);
   if (ret < 0)
@@ -511,25 +235,46 @@ store_gregs_to_thread (const struct regc
 static void
 fetch_fpregs_from_thread (struct regcache *regcache)
 {
-  int ret, regno, tid;
+  int ret, tid;
   elf_fpregset_t regs;
   struct iovec iovec;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
-  tid = get_thread_id (inferior_ptid);
+  /* Make sure REGS can hold all VFP registers contents on both aarch64
+     and arm.  */
+  gdb_static_assert (sizeof regs >= VFP_REGS_SIZE);
+
+  tid = ptid_get_lwp (inferior_ptid);
 
   iovec.iov_base = &regs;
-  iovec.iov_len = sizeof (regs);
 
-  ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec);
-  if (ret < 0)
-    perror_with_name (_("Unable to fetch FP/SIMD registers."));
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    {
+      iovec.iov_len = VFP_REGS_SIZE;
+
+      ret = ptrace (PTRACE_GETREGSET, tid, NT_ARM_VFP, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to fetch VFP registers."));
+
+      aarch32_vfp_regcache_supply (regcache, (gdb_byte *) &regs, 32);
+    }
+  else
+    {
+      int regno;
 
-  for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
-    regcache_raw_supply (regcache, regno,
-			 (char *) &regs.vregs[regno - AARCH64_V0_REGNUM]);
+      iovec.iov_len = sizeof (regs);
 
-  regcache_raw_supply (regcache, AARCH64_FPSR_REGNUM, (char *) &regs.fpsr);
-  regcache_raw_supply (regcache, AARCH64_FPCR_REGNUM, (char *) &regs.fpcr);
+      ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to fetch vFP/SIMD registers."));
+
+      for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
+	regcache_raw_supply (regcache, regno,
+			     &regs.vregs[regno - AARCH64_V0_REGNUM]);
+
+      regcache_raw_supply (regcache, AARCH64_FPSR_REGNUM, &regs.fpsr);
+      regcache_raw_supply (regcache, AARCH64_FPCR_REGNUM, &regs.fpcr);
+    }
 }
 
 /* Store to the current thread the valid fp/simd register
@@ -538,32 +283,63 @@ fetch_fpregs_from_thread (struct regcach
 static void
 store_fpregs_to_thread (const struct regcache *regcache)
 {
-  int ret, regno, tid;
+  int ret, tid;
   elf_fpregset_t regs;
   struct iovec iovec;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
-  tid = get_thread_id (inferior_ptid);
+  /* Make sure REGS can hold all VFP registers contents on both aarch64
+     and arm.  */
+  gdb_static_assert (sizeof regs >= VFP_REGS_SIZE);
+  tid = ptid_get_lwp (inferior_ptid);
 
   iovec.iov_base = &regs;
-  iovec.iov_len = sizeof (regs);
 
-  ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec);
-  if (ret < 0)
-    perror_with_name (_("Unable to fetch FP/SIMD registers."));
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    {
+      iovec.iov_len = VFP_REGS_SIZE;
 
-  for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
-    if (REG_VALID == regcache_register_status (regcache, regno))
-      regcache_raw_collect (regcache, regno,
-			    (char *) &regs.vregs[regno - AARCH64_V0_REGNUM]);
-
-  if (REG_VALID == regcache_register_status (regcache, AARCH64_FPSR_REGNUM))
-    regcache_raw_collect (regcache, AARCH64_FPSR_REGNUM, (char *) &regs.fpsr);
-  if (REG_VALID == regcache_register_status (regcache, AARCH64_FPCR_REGNUM))
-    regcache_raw_collect (regcache, AARCH64_FPCR_REGNUM, (char *) &regs.fpcr);
+      ret = ptrace (PTRACE_GETREGSET, tid, NT_ARM_VFP, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to fetch VFP registers."));
 
-  ret = ptrace (PTRACE_SETREGSET, tid, NT_FPREGSET, &iovec);
-  if (ret < 0)
-    perror_with_name (_("Unable to store FP/SIMD registers."));
+      aarch32_vfp_regcache_collect (regcache, (gdb_byte *) &regs, 32);
+    }
+  else
+    {
+      int regno;
+
+      iovec.iov_len = sizeof (regs);
+
+      ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to fetch FP/SIMD registers."));
+
+      for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
+	if (REG_VALID == regcache_register_status (regcache, regno))
+	  regcache_raw_collect (regcache, regno,
+				(char *) &regs.vregs[regno - AARCH64_V0_REGNUM]);
+
+      if (REG_VALID == regcache_register_status (regcache, AARCH64_FPSR_REGNUM))
+	regcache_raw_collect (regcache, AARCH64_FPSR_REGNUM,
+			      (char *) &regs.fpsr);
+      if (REG_VALID == regcache_register_status (regcache, AARCH64_FPCR_REGNUM))
+	regcache_raw_collect (regcache, AARCH64_FPCR_REGNUM,
+			      (char *) &regs.fpcr);
+    }
+
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
+    {
+      ret = ptrace (PTRACE_SETREGSET, tid, NT_ARM_VFP, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to store VFP registers."));
+    }
+  else
+    {
+      ret = ptrace (PTRACE_SETREGSET, tid, NT_FPREGSET, &iovec);
+      if (ret < 0)
+	perror_with_name (_("Unable to store FP/SIMD registers."));
+    }
 }
 
 /* Implement the "to_fetch_register" target_ops method.  */
@@ -650,59 +426,6 @@ supply_fpregset (struct regcache *regcac
 			  AARCH64_LINUX_SIZEOF_FPREGSET);
 }
 
-/* Called when resuming a thread.
-   The hardware debug registers are updated when there is any change.  */
-
-static void
-aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
-{
-  struct arch_lwp_info *info = lwp->arch_private;
-
-  /* NULL means this is the main thread still going through the shell,
-     or, no watchpoint has been set yet.  In that case, there's
-     nothing to do.  */
-  if (info == NULL)
-    return;
-
-  if (DR_HAS_CHANGED (info->dr_changed_bp)
-      || DR_HAS_CHANGED (info->dr_changed_wp))
-    {
-      int tid = ptid_get_lwp (lwp->ptid);
-      struct aarch64_debug_reg_state *state
-	= aarch64_get_debug_reg_state (ptid_get_pid (lwp->ptid));
-
-      if (show_debug_regs)
-	fprintf_unfiltered (gdb_stdlog, "prepare_to_resume thread %d\n", tid);
-
-      /* Watchpoints.  */
-      if (DR_HAS_CHANGED (info->dr_changed_wp))
-	{
-	  aarch64_linux_set_debug_regs (state, tid, 1);
-	  DR_CLEAR_CHANGED (info->dr_changed_wp);
-	}
-
-      /* Breakpoints.  */
-      if (DR_HAS_CHANGED (info->dr_changed_bp))
-	{
-	  aarch64_linux_set_debug_regs (state, tid, 0);
-	  DR_CLEAR_CHANGED (info->dr_changed_bp);
-	}
-    }
-}
-
-static void
-aarch64_linux_new_thread (struct lwp_info *lp)
-{
-  struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
-
-  /* Mark that all the hardware breakpoint/watchpoint register pairs
-     for this thread need to be initialized.  */
-  DR_MARK_ALL_CHANGED (info->dr_changed_bp, aarch64_num_bp_regs);
-  DR_MARK_ALL_CHANGED (info->dr_changed_wp, aarch64_num_wp_regs);
-
-  lp->arch_private = info;
-}
-
 /* linux_nat_new_fork hook.   */
 
 static void
@@ -734,81 +457,16 @@ aarch64_linux_new_fork (struct lwp_info 
    storage (or its descriptor).  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
-  struct iovec iovec;
-  uint64_t reg;
+  int is_64bit_p
+    = (gdbarch_bfd_arch_info (target_gdbarch ())->bits_per_word == 64);
 
-  iovec.iov_base = &reg;
-  iovec.iov_len = sizeof (reg);
-
-  if (ptrace (PTRACE_GETREGSET, lwpid, NT_ARM_TLS, &iovec) != 0)
-    return PS_ERR;
-
-  /* IDX is the bias from the thread pointer to the beginning of the
-     thread descriptor.  It has to be subtracted due to implementation
-     quirks in libthread_db.  */
-  *base = (void *) (reg - idx);
-
-  return PS_OK;
+  return aarch64_ps_get_thread_area (ph, lwpid, idx, base, is_64bit_p);
 }
 
 
-/* Get the hardware debug register capacity information.  */
-
-static void
-aarch64_linux_get_debug_reg_capacity (void)
-{
-  int tid;
-  struct iovec iov;
-  struct user_hwdebug_state dreg_state;
-
-  tid = get_thread_id (inferior_ptid);
-  iov.iov_base = &dreg_state;
-  iov.iov_len = sizeof (dreg_state);
-
-  /* Get hardware watchpoint register info.  */
-  if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_WATCH, &iov) == 0
-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
-    {
-      aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
-      if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
-	{
-	  warning (_("Unexpected number of hardware watchpoint registers"
-		     " reported by ptrace, got %d, expected %d."),
-		   aarch64_num_wp_regs, AARCH64_HWP_MAX_NUM);
-	  aarch64_num_wp_regs = AARCH64_HWP_MAX_NUM;
-	}
-    }
-  else
-    {
-      warning (_("Unable to determine the number of hardware watchpoints"
-		 " available."));
-      aarch64_num_wp_regs = 0;
-    }
-
-  /* Get hardware breakpoint register info.  */
-  if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_BREAK, &iov) == 0
-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
-    {
-      aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
-      if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
-	{
-	  warning (_("Unexpected number of hardware breakpoint registers"
-		     " reported by ptrace, got %d, expected %d."),
-		   aarch64_num_bp_regs, AARCH64_HBP_MAX_NUM);
-	  aarch64_num_bp_regs = AARCH64_HBP_MAX_NUM;
-	}
-    }
-  else
-    {
-      warning (_("Unable to determine the number of hardware breakpoints"
-		 " available."));
-      aarch64_num_bp_regs = 0;
-    }
-}
-
 static void (*super_post_startup_inferior) (struct target_ops *self,
 					    ptid_t ptid);
 
@@ -819,90 +477,59 @@ aarch64_linux_child_post_startup_inferio
 					   ptid_t ptid)
 {
   aarch64_forget_process (ptid_get_pid (ptid));
-  aarch64_linux_get_debug_reg_capacity ();
+  aarch64_linux_get_debug_reg_capacity (ptid_get_pid (ptid));
   super_post_startup_inferior (self, ptid);
 }
 
+extern struct target_desc *tdesc_arm_with_neon;
+
 /* Implement the "to_read_description" target_ops method.  */
 
 static const struct target_desc *
 aarch64_linux_read_description (struct target_ops *ops)
 {
-  return tdesc_aarch64;
-}
-
-/* Given the (potentially unaligned) watchpoint address in ADDR and
-   length in LEN, return the aligned address and aligned length in
-   *ALIGNED_ADDR_P and *ALIGNED_LEN_P, respectively.  The returned
-   aligned address and length will be valid values to write to the
-   hardware watchpoint value and control registers.
-
-   The given watchpoint may get truncated if more than one hardware
-   register is needed to cover the watched region.  *NEXT_ADDR_P
-   and *NEXT_LEN_P, if non-NULL, will return the address and length
-   of the remaining part of the watchpoint (which can be processed
-   by calling this routine again to generate another aligned address
-   and length pair.
+  int ret, tid;
+  gdb_byte regbuf[VFP_REGS_SIZE];
+  struct iovec iovec;
 
-   See the comment above the function of the same name in
-   gdbserver/linux-aarch64-low.c for more information.  */
+  tid = ptid_get_lwp (inferior_ptid);
 
-static void
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
-			  int *aligned_len_p, CORE_ADDR *next_addr_p,
-			  int *next_len_p)
-{
-  int aligned_len;
-  unsigned int offset;
-  CORE_ADDR aligned_addr;
-  const unsigned int alignment = AARCH64_HWP_ALIGNMENT;
-  const unsigned int max_wp_len = AARCH64_HWP_MAX_LEN_PER_REG;
+  iovec.iov_base = regbuf;
+  iovec.iov_len = VFP_REGS_SIZE;
 
-  /* As assumed by the algorithm.  */
-  gdb_assert (alignment == max_wp_len);
+  ret = ptrace (PTRACE_GETREGSET, tid, NT_ARM_VFP, &iovec);
+  if (ret == 0)
+    return tdesc_arm_with_neon;
+  else
+    return tdesc_aarch64;
+}
 
-  if (len <= 0)
-    return;
+/* Convert a native/host siginfo object, into/from the siginfo in the
+   layout of the inferiors' architecture.  Returns true if any
+   conversion was done; false otherwise.  If DIRECTION is 1, then copy
+   from INF to NATIVE.  If DIRECTION is 0, copy from NATIVE to
+   INF.  */
 
-  /* Address to be put into the hardware watchpoint value register
-     must be aligned.  */
-  offset = addr & (alignment - 1);
-  aligned_addr = addr - offset;
-
-  gdb_assert (offset >= 0 && offset < alignment);
-  gdb_assert (aligned_addr >= 0 && aligned_addr <= addr);
-  gdb_assert (offset + len > 0);
+static int
+aarch64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
+{
+  struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
 
-  if (offset + len >= max_wp_len)
-    {
-      /* Need more than one watchpoint registers; truncate it at the
-         alignment boundary.  */
-      aligned_len = max_wp_len;
-      len -= (max_wp_len - offset);
-      addr += (max_wp_len - offset);
-      gdb_assert ((addr & (alignment - 1)) == 0);
-    }
-  else
+  /* Is the inferior 32-bit?  If so, then do fixup the siginfo
+     object.  */
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
     {
-      /* Find the smallest valid length that is large enough to
-	 accommodate this watchpoint.  */
-      static const unsigned char
-	aligned_len_array[AARCH64_HWP_MAX_LEN_PER_REG] =
-	{ 1, 2, 4, 4, 8, 8, 8, 8 };
-
-      aligned_len = aligned_len_array[offset + len - 1];
-      addr += len;
-      len = 0;
+      if (direction == 0)
+	aarch64_compat_siginfo_from_siginfo ((struct compat_siginfo *) inf,
+					     native);
+      else
+	aarch64_siginfo_from_compat_siginfo (native,
+					     (struct compat_siginfo *) inf);
+
+      return 1;
     }
 
-  if (aligned_addr_p)
-    *aligned_addr_p = aligned_addr;
-  if (aligned_len_p)
-    *aligned_len_p = aligned_len;
-  if (next_addr_p)
-    *next_addr_p = addr;
-  if (next_len_p)
-    *next_len_p = len;
+  return 0;
 }
 
 /* Returns the number of hardware watchpoints of type TYPE that we can
@@ -913,271 +540,34 @@ aarch64_align_watchpoint (CORE_ADDR addr
    bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint.
    CNT is the number of such watchpoints used so far (including this
    one).  OTHERTYPE is non-zero if other types of watchpoints are
-   currently enabled.
-
-   We always return 1 here because we don't have enough information
-   about possible overlap of addresses that they want to watch.  As an
-   extreme example, consider the case where all the watchpoints watch
-   the same address and the same region length: then we can handle a
-   virtually unlimited number of watchpoints, due to debug register
-   sharing implemented via reference counts.  */
+   currently enabled.  */
 
 static int
 aarch64_linux_can_use_hw_breakpoint (struct target_ops *self,
-				     int type, int cnt, int othertype)
-{
-  return 1;
-}
-
-/* ptrace expects control registers to be formatted as follows:
-
-   31                             13          5      3      1     0
-   +--------------------------------+----------+------+------+----+
-   |         RESERVED (SBZ)         |  LENGTH  | TYPE | PRIV | EN |
-   +--------------------------------+----------+------+------+----+
-
-   The TYPE field is ignored for breakpoints.  */
-
-#define DR_CONTROL_ENABLED(ctrl)	(((ctrl) & 0x1) == 1)
-#define DR_CONTROL_LENGTH(ctrl)		(((ctrl) >> 5) & 0xff)
-
-/* Utility function that returns the length in bytes of a watchpoint
-   according to the content of a hardware debug control register CTRL.
-   Note that the kernel currently only supports the following Byte
-   Address Select (BAS) values: 0x1, 0x3, 0xf and 0xff, which means
-   that for a hardware watchpoint, its valid length can only be 1
-   byte, 2 bytes, 4 bytes or 8 bytes.  */
-
-static inline unsigned int
-aarch64_watchpoint_length (unsigned int ctrl)
-{
-  switch (DR_CONTROL_LENGTH (ctrl))
-    {
-    case 0x01:
-      return 1;
-    case 0x03:
-      return 2;
-    case 0x0f:
-      return 4;
-    case 0xff:
-      return 8;
-    default:
-      return 0;
-    }
-}
-
-/* Given the hardware breakpoint or watchpoint type TYPE and its
-   length LEN, return the expected encoding for a hardware
-   breakpoint/watchpoint control register.  */
-
-static unsigned int
-aarch64_point_encode_ctrl_reg (int type, int len)
+				     enum bptype type,
+				     int cnt, int othertype)
 {
-  unsigned int ctrl, ttype;
-
-  /* type */
-  switch (type)
-    {
-    case hw_write:
-      ttype = 2;
-      break;
-    case hw_read:
-      ttype = 1;
-      break;
-    case hw_access:
-      ttype = 3;
-      break;
-    case hw_execute:
-      ttype = 0;
-      break;
-    default:
-      perror_with_name (_("Unrecognized breakpoint/watchpoint type"));
-    }
-  ctrl = ttype << 3;
-
-  /* length bitmask */
-  ctrl |= ((1 << len) - 1) << 5;
-  /* enabled at el0 */
-  ctrl |= (2 << 1) | 1;
-
-  return ctrl;
-}
-
-/* Addresses to be written to the hardware breakpoint and watchpoint
-   value registers need to be aligned; the alignment is 4-byte and
-   8-type respectively.  Linux kernel rejects any non-aligned address
-   it receives from the related ptrace call.  Furthermore, the kernel
-   currently only supports the following Byte Address Select (BAS)
-   values: 0x1, 0x3, 0xf and 0xff, which means that for a hardware
-   watchpoint to be accepted by the kernel (via ptrace call), its
-   valid length can only be 1 byte, 2 bytes, 4 bytes or 8 bytes.
-   Despite these limitations, the unaligned watchpoint is supported in
-   this port.
-
-   Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise.  */
-
-static int
-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
-{
-  unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT
-    : AARCH64_HBP_ALIGNMENT;
-
-  if (addr & (alignment - 1))
-    return 0;
-
-  if (len != 8 && len != 4 && len != 2 && len != 1)
-    return 0;
-
-  return 1;
-}
-
-/* Record the insertion of one breakpoint/watchpoint, as represented
-   by ADDR and CTRL, in the cached debug register state area *STATE.  */
-
-static int
-aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state,
-				   int type, CORE_ADDR addr, int len)
-{
-  int i, idx, num_regs, is_watchpoint;
-  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
-  CORE_ADDR *dr_addr_p;
-
-  /* Set up state pointers.  */
-  is_watchpoint = (type != hw_execute);
-  gdb_assert (aarch64_point_is_aligned (is_watchpoint, addr, len));
-  if (is_watchpoint)
-    {
-      num_regs = aarch64_num_wp_regs;
-      dr_addr_p = state->dr_addr_wp;
-      dr_ctrl_p = state->dr_ctrl_wp;
-      dr_ref_count = state->dr_ref_count_wp;
-    }
-  else
+  if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
+      || type == bp_access_watchpoint || type == bp_watchpoint)
     {
-      num_regs = aarch64_num_bp_regs;
-      dr_addr_p = state->dr_addr_bp;
-      dr_ctrl_p = state->dr_ctrl_bp;
-      dr_ref_count = state->dr_ref_count_bp;
+      if (aarch64_num_wp_regs == 0)
+	return 0;
     }
-
-  ctrl = aarch64_point_encode_ctrl_reg (type, len);
-
-  /* Find an existing or free register in our cache.  */
-  idx = -1;
-  for (i = 0; i < num_regs; ++i)
-    {
-      if ((dr_ctrl_p[i] & 1) == 0)
-	{
-	  gdb_assert (dr_ref_count[i] == 0);
-	  idx = i;
-	  /* no break; continue hunting for an existing one.  */
-	}
-      else if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
-	{
-	  gdb_assert (dr_ref_count[i] != 0);
-	  idx = i;
-	  break;
-	}
-    }
-
-  /* No space.  */
-  if (idx == -1)
-    return -1;
-
-  /* Update our cache.  */
-  if ((dr_ctrl_p[idx] & 1) == 0)
+  else if (type == bp_hardware_breakpoint)
     {
-      /* new entry */
-      dr_addr_p[idx] = addr;
-      dr_ctrl_p[idx] = ctrl;
-      dr_ref_count[idx] = 1;
-      /* Notify the change.  */
-      aarch64_notify_debug_reg_change (state, is_watchpoint, idx);
+      if (aarch64_num_bp_regs == 0)
+	return 0;
     }
   else
-    {
-      /* existing entry */
-      dr_ref_count[idx]++;
-    }
-
-  return 0;
-}
+    gdb_assert_not_reached ("unexpected breakpoint type");
 
-/* Record the removal of one breakpoint/watchpoint, as represented by
-   ADDR and CTRL, in the cached debug register state area *STATE.  */
-
-static int
-aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state,
-				   int type, CORE_ADDR addr, int len)
-{
-  int i, num_regs, is_watchpoint;
-  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
-  CORE_ADDR *dr_addr_p;
-
-  /* Set up state pointers.  */
-  is_watchpoint = (type != hw_execute);
-  gdb_assert (aarch64_point_is_aligned (is_watchpoint, addr, len));
-  if (is_watchpoint)
-    {
-      num_regs = aarch64_num_wp_regs;
-      dr_addr_p = state->dr_addr_wp;
-      dr_ctrl_p = state->dr_ctrl_wp;
-      dr_ref_count = state->dr_ref_count_wp;
-    }
-  else
-    {
-      num_regs = aarch64_num_bp_regs;
-      dr_addr_p = state->dr_addr_bp;
-      dr_ctrl_p = state->dr_ctrl_bp;
-      dr_ref_count = state->dr_ref_count_bp;
-    }
-
-  ctrl = aarch64_point_encode_ctrl_reg (type, len);
-
-  /* Find the entry that matches the ADDR and CTRL.  */
-  for (i = 0; i < num_regs; ++i)
-    if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
-      {
-	gdb_assert (dr_ref_count[i] != 0);
-	break;
-      }
-
-  /* Not found.  */
-  if (i == num_regs)
-    return -1;
-
-  /* Clear our cache.  */
-  if (--dr_ref_count[i] == 0)
-    {
-      /* Clear the enable bit.  */
-      ctrl &= ~1;
-      dr_addr_p[i] = 0;
-      dr_ctrl_p[i] = ctrl;
-      /* Notify the change.  */
-      aarch64_notify_debug_reg_change (state, is_watchpoint, i);
-    }
-
-  return 0;
-}
-
-/* Implement insertion and removal of a single breakpoint.  */
-
-static int
-aarch64_handle_breakpoint (int type, CORE_ADDR addr, int len, int is_insert)
-{
-  struct aarch64_debug_reg_state *state;
-
-  /* The hardware breakpoint on AArch64 should always be 4-byte
-     aligned.  */
-  if (!aarch64_point_is_aligned (0 /* is_watchpoint */ , addr, len))
-    return -1;
-
-  state = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
-  if (is_insert)
-    return aarch64_dr_state_insert_one_point (state, type, addr, len);
-  else
-    return aarch64_dr_state_remove_one_point (state, type, addr, len);
+  /* We always return 1 here because we don't have enough information
+     about possible overlap of addresses that they want to watch.  As an
+     extreme example, consider the case where all the watchpoints watch
+     the same address and the same region length: then we can handle a
+     virtually unlimited number of watchpoints, due to debug register
+     sharing implemented via reference counts.  */
+  return 1;
 }
 
 /* Insert a hardware-assisted breakpoint at BP_TGT->reqstd_address.
@@ -1190,8 +580,12 @@ aarch64_linux_insert_hw_breakpoint (stru
 {
   int ret;
   CORE_ADDR addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
-  const int len = 4;
-  const int type = hw_execute;
+  int len;
+  const enum target_hw_bp_type type = hw_execute;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+
+  gdbarch_breakpoint_from_pc (gdbarch, &addr, &len);
 
   if (show_debug_regs)
     fprintf_unfiltered
@@ -1199,13 +593,10 @@ aarch64_linux_insert_hw_breakpoint (stru
        "insert_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n",
        (unsigned long) addr, len);
 
-  ret = aarch64_handle_breakpoint (type, addr, len, 1 /* is_insert */);
+  ret = aarch64_handle_breakpoint (type, addr, len, 1 /* is_insert */, state);
 
   if (show_debug_regs)
     {
-      struct aarch64_debug_reg_state *state
-	= aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
       aarch64_show_debug_reg_state (state,
 				    "insert_hw_breakpoint", addr, len, type);
     }
@@ -1223,21 +614,22 @@ aarch64_linux_remove_hw_breakpoint (stru
 {
   int ret;
   CORE_ADDR addr = bp_tgt->placed_address;
-  const int len = 4;
-  const int type = hw_execute;
+  int len = 4;
+  const enum target_hw_bp_type type = hw_execute;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+
+  gdbarch_breakpoint_from_pc (gdbarch, &addr, &len);
 
   if (show_debug_regs)
     fprintf_unfiltered
       (gdb_stdlog, "remove_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n",
        (unsigned long) addr, len);
 
-  ret = aarch64_handle_breakpoint (type, addr, len, 0 /* is_insert */);
+  ret = aarch64_handle_breakpoint (type, addr, len, 0 /* is_insert */, state);
 
   if (show_debug_regs)
     {
-      struct aarch64_debug_reg_state *state
-	= aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
       aarch64_show_debug_reg_state (state,
 				    "remove_hw_watchpoint", addr, len, type);
     }
@@ -1245,76 +637,6 @@ aarch64_linux_remove_hw_breakpoint (stru
   return ret;
 }
 
-/* This is essentially the same as aarch64_handle_breakpoint, apart
-   from that it is an aligned watchpoint to be handled.  */
-
-static int
-aarch64_handle_aligned_watchpoint (int type, CORE_ADDR addr, int len,
-				   int is_insert)
-{
-  struct aarch64_debug_reg_state *state
-    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
-  if (is_insert)
-    return aarch64_dr_state_insert_one_point (state, type, addr, len);
-  else
-    return aarch64_dr_state_remove_one_point (state, type, addr, len);
-}
-
-/* Insert/remove unaligned watchpoint by calling
-   aarch64_align_watchpoint repeatedly until the whole watched region,
-   as represented by ADDR and LEN, has been properly aligned and ready
-   to be written to one or more hardware watchpoint registers.
-   IS_INSERT indicates whether this is an insertion or a deletion.
-   Return 0 if succeed.  */
-
-static int
-aarch64_handle_unaligned_watchpoint (int type, CORE_ADDR addr, int len,
-				     int is_insert)
-{
-  struct aarch64_debug_reg_state *state
-    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
-  while (len > 0)
-    {
-      CORE_ADDR aligned_addr;
-      int aligned_len, ret;
-
-      aarch64_align_watchpoint (addr, len, &aligned_addr, &aligned_len,
-				&addr, &len);
-
-      if (is_insert)
-	ret = aarch64_dr_state_insert_one_point (state, type, aligned_addr,
-						 aligned_len);
-      else
-	ret = aarch64_dr_state_remove_one_point (state, type, aligned_addr,
-						 aligned_len);
-
-      if (show_debug_regs)
-	fprintf_unfiltered (gdb_stdlog,
-"handle_unaligned_watchpoint: is_insert: %d\n"
-"                             aligned_addr: 0x%08lx, aligned_len: %d\n"
-"                                next_addr: 0x%08lx,    next_len: %d\n",
-		 is_insert, aligned_addr, aligned_len, addr, len);
-
-      if (ret != 0)
-	return ret;
-    }
-
-  return 0;
-}
-
-/* Implements insertion and removal of a single watchpoint.  */
-
-static int
-aarch64_handle_watchpoint (int type, CORE_ADDR addr, int len, int is_insert)
-{
-  if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
-    return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert);
-  else
-    return aarch64_handle_unaligned_watchpoint (type, addr, len, is_insert);
-}
-
 /* Implement the "to_insert_watchpoint" target_ops method.
 
    Insert a watchpoint to watch a memory region which starts at
@@ -1323,10 +645,13 @@ aarch64_handle_watchpoint (int type, COR
 
 static int
 aarch64_linux_insert_watchpoint (struct target_ops *self,
-				 CORE_ADDR addr, int len, int type,
+				 CORE_ADDR addr, int len,
+				 enum target_hw_bp_type type,
 				 struct expression *cond)
 {
   int ret;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
 
   if (show_debug_regs)
     fprintf_unfiltered (gdb_stdlog,
@@ -1335,13 +660,10 @@ aarch64_linux_insert_watchpoint (struct 
 
   gdb_assert (type != hw_execute);
 
-  ret = aarch64_handle_watchpoint (type, addr, len, 1 /* is_insert */);
+  ret = aarch64_handle_watchpoint (type, addr, len, 1 /* is_insert */, state);
 
   if (show_debug_regs)
     {
-      struct aarch64_debug_reg_state *state
-	= aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
       aarch64_show_debug_reg_state (state,
 				    "insert_watchpoint", addr, len, type);
     }
@@ -1356,10 +678,13 @@ aarch64_linux_insert_watchpoint (struct 
 
 static int
 aarch64_linux_remove_watchpoint (struct target_ops *self,
-				 CORE_ADDR addr, int len, int type,
+				 CORE_ADDR addr, int len,
+				 enum target_hw_bp_type type,
 				 struct expression *cond)
 {
   int ret;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
 
   if (show_debug_regs)
     fprintf_unfiltered (gdb_stdlog,
@@ -1368,13 +693,10 @@ aarch64_linux_remove_watchpoint (struct 
 
   gdb_assert (type != hw_execute);
 
-  ret = aarch64_handle_watchpoint (type, addr, len, 0 /* is_insert */);
+  ret = aarch64_handle_watchpoint (type, addr, len, 0 /* is_insert */, state);
 
   if (show_debug_regs)
     {
-      struct aarch64_debug_reg_state *state
-	= aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
-
       aarch64_show_debug_reg_state (state,
 				    "remove_watchpoint", addr, len, type);
     }
@@ -1388,38 +710,7 @@ static int
 aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
 					   CORE_ADDR addr, int len)
 {
-  CORE_ADDR aligned_addr;
-
-  /* Can not set watchpoints for zero or negative lengths.  */
-  if (len <= 0)
-    return 0;
-
-  /* Must have hardware watchpoint debug register(s).  */
-  if (aarch64_num_wp_regs == 0)
-    return 0;
-
-  /* We support unaligned watchpoint address and arbitrary length,
-     as long as the size of the whole watched area after alignment
-     doesn't exceed size of the total area that all watchpoint debug
-     registers can watch cooperatively.
-
-     This is a very relaxed rule, but unfortunately there are
-     limitations, e.g. false-positive hits, due to limited support of
-     hardware debug registers in the kernel.  See comment above
-     aarch64_align_watchpoint for more information.  */
-
-  aligned_addr = addr & ~(AARCH64_HWP_MAX_LEN_PER_REG - 1);
-  if (aligned_addr + aarch64_num_wp_regs * AARCH64_HWP_MAX_LEN_PER_REG
-      < addr + len)
-    return 0;
-
-  /* All tests passed so we are likely to be able to set the watchpoint.
-     The reason that it is 'likely' rather than 'must' is because
-     we don't check the current usage of the watchpoint registers, and
-     there may not be enough registers available for this watchpoint.
-     Ideally we should check the cached debug register state, however
-     the checking is costly.  */
-  return 1;
+  return aarch64_linux_region_ok_for_watchpoint (addr, len);
 }
 
 /* Implement the "to_stopped_data_address" target_ops method.  */
@@ -1481,6 +772,14 @@ aarch64_linux_watchpoint_addr_within_ran
   return start <= addr && start + length - 1 >= addr;
 }
 
+/* Implement the "to_can_do_single_step" target_ops method.  */
+
+static int
+aarch64_linux_can_do_single_step (struct target_ops *target)
+{
+  return 1;
+}
+
 /* Define AArch64 maintenance commands.  */
 
 static void
@@ -1532,6 +831,7 @@ _initialize_aarch64_linux_nat (void)
   t->to_stopped_data_address = aarch64_linux_stopped_data_address;
   t->to_watchpoint_addr_within_range =
     aarch64_linux_watchpoint_addr_within_range;
+  t->to_can_do_single_step = aarch64_linux_can_do_single_step;
 
   /* Override the GNU/Linux inferior startup hook.  */
   super_post_startup_inferior = t->to_post_startup_inferior;
@@ -1543,4 +843,7 @@ _initialize_aarch64_linux_nat (void)
   linux_nat_set_new_fork (t, aarch64_linux_new_fork);
   linux_nat_set_forget_process (t, aarch64_forget_process);
   linux_nat_set_prepare_to_resume (t, aarch64_linux_prepare_to_resume);
+
+  /* Add our siginfo layout converter.  */
+  linux_nat_set_siginfo_fixup (t, aarch64_linux_siginfo_fixup);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-tdep.c ./gdb/aarch64-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux AArch64.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
@@ -21,6 +21,7 @@
 #include "defs.h"
 
 #include "gdbarch.h"
+#include "arch-utils.h"
 #include "glibc-tdep.h"
 #include "linux-tdep.h"
 #include "aarch64-tdep.h"
@@ -142,7 +143,6 @@ aarch64_linux_sigframe_init (const struc
 			     struct trad_frame_cache *this_cache,
 			     CORE_ADDR func)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
   CORE_ADDR sigcontext_addr =
     sp
@@ -279,7 +279,7 @@ aarch64_stap_parse_special_token (struct
 	return 0;
 
       len = tmp - start;
-      regname = alloca (len + 2);
+      regname = (char *) alloca (len + 2);
 
       strncpy (regname, start, len);
       regname[len] = '\0';
@@ -408,12 +408,12 @@ enum aarch64_syscall {
   aarch64_sys_ioprio_set = 30,
   aarch64_sys_ioprio_get = 31,
   aarch64_sys_flock = 32,
-  aarch64_sys_mknod = 33,
-  aarch64_sys_mkdir = 34,
-  aarch64_sys_unlink = 35,
-  aarch64_sys_symlink = 36,
-  aarch64_sys_link = 37,
-  aarch64_sys_rename = 38,
+  aarch64_sys_mknodat = 33,
+  aarch64_sys_mkdirat = 34,
+  aarch64_sys_unlinkat = 35,
+  aarch64_sys_symlinkat = 36,
+  aarch64_sys_linkat = 37,
+  aarch64_sys_renameat = 38,
   aarch64_sys_umount2 = 39,
   aarch64_sys_mount = 40,
   aarch64_sys_pivot_root = 41,
@@ -423,7 +423,7 @@ enum aarch64_syscall {
   aarch64_sys_truncate = 45,
   aarch64_sys_ftruncate = 46,
   aarch64_sys_fallocate = 47,
-  aarch64_sys_faccess = 48,
+  aarch64_sys_faccessat = 48,
   aarch64_sys_chdir = 49,
   aarch64_sys_fchdir = 50,
   aarch64_sys_chroot = 51,
@@ -431,7 +431,7 @@ enum aarch64_syscall {
   aarch64_sys_fchmodat = 53,
   aarch64_sys_fchownat = 54,
   aarch64_sys_fchown = 55,
-  aarch64_sys_open = 56,
+  aarch64_sys_openat = 56,
   aarch64_sys_close = 57,
   aarch64_sys_vhangup = 58,
   aarch64_sys_pipe2 = 59,
@@ -453,8 +453,8 @@ enum aarch64_syscall {
   aarch64_sys_vmsplice = 75,
   aarch64_sys_splice = 76,
   aarch64_sys_tee = 77,
-  aarch64_sys_readlink = 78,
-  aarch64_sys_fstatat = 79,
+  aarch64_sys_readlinkat = 78,
+  aarch64_sys_newfstatat = 79,
   aarch64_sys_fstat = 80,
   aarch64_sys_sync = 81,
   aarch64_sys_fsync = 82,
@@ -647,6 +647,9 @@ aarch64_canonicalize_syscall (enum aarch
 #define SYSCALL_MAP(SYSCALL) case aarch64_sys_##SYSCALL: \
   return gdb_sys_##SYSCALL
 
+#define UNSUPPORTED_SYSCALL_MAP(SYSCALL) case aarch64_sys_##SYSCALL: \
+  return gdb_sys_no_syscall
+
   switch (syscall_number)
     {
       SYSCALL_MAP (io_setup);
@@ -669,33 +672,45 @@ aarch64_canonicalize_syscall (enum aarch
       SYSCALL_MAP (fremovexattr);
       SYSCALL_MAP (getcwd);
       SYSCALL_MAP (lookup_dcookie);
-
-    case aarch64_sys_epoll_create1:
-      return gdb_sys_epoll_create;
-
+      SYSCALL_MAP (eventfd2);
+      SYSCALL_MAP (epoll_create1);
       SYSCALL_MAP (epoll_ctl);
       SYSCALL_MAP (epoll_pwait);
       SYSCALL_MAP (dup);
+      SYSCALL_MAP (dup3);
       SYSCALL_MAP (fcntl);
+      SYSCALL_MAP (inotify_init1);
       SYSCALL_MAP (inotify_add_watch);
       SYSCALL_MAP (inotify_rm_watch);
       SYSCALL_MAP (ioctl);
       SYSCALL_MAP (ioprio_set);
       SYSCALL_MAP (ioprio_get);
       SYSCALL_MAP (flock);
+      SYSCALL_MAP (mknodat);
+      SYSCALL_MAP (mkdirat);
+      SYSCALL_MAP (unlinkat);
+      SYSCALL_MAP (symlinkat);
+      SYSCALL_MAP (linkat);
+      SYSCALL_MAP (renameat);
+      UNSUPPORTED_SYSCALL_MAP (umount2);
       SYSCALL_MAP (mount);
+      SYSCALL_MAP (pivot_root);
       SYSCALL_MAP (nfsservctl);
       SYSCALL_MAP (statfs);
       SYSCALL_MAP (truncate);
       SYSCALL_MAP (ftruncate);
+      SYSCALL_MAP (fallocate);
+      SYSCALL_MAP (faccessat);
       SYSCALL_MAP (fchdir);
       SYSCALL_MAP (chroot);
       SYSCALL_MAP (fchmod);
       SYSCALL_MAP (fchmodat);
       SYSCALL_MAP (fchownat);
       SYSCALL_MAP (fchown);
+      SYSCALL_MAP (openat);
       SYSCALL_MAP (close);
       SYSCALL_MAP (vhangup);
+      SYSCALL_MAP (pipe2);
       SYSCALL_MAP (quotactl);
       SYSCALL_MAP (getdents64);
       SYSCALL_MAP (lseek);
@@ -705,17 +720,27 @@ aarch64_canonicalize_syscall (enum aarch
       SYSCALL_MAP (writev);
       SYSCALL_MAP (pread64);
       SYSCALL_MAP (pwrite64);
+      UNSUPPORTED_SYSCALL_MAP (preadv);
+      UNSUPPORTED_SYSCALL_MAP (pwritev);
       SYSCALL_MAP (sendfile);
       SYSCALL_MAP (pselect6);
       SYSCALL_MAP (ppoll);
+      UNSUPPORTED_SYSCALL_MAP (signalfd4);
       SYSCALL_MAP (vmsplice);
       SYSCALL_MAP (splice);
       SYSCALL_MAP (tee);
+      SYSCALL_MAP (readlinkat);
+      SYSCALL_MAP (newfstatat);
+
       SYSCALL_MAP (fstat);
       SYSCALL_MAP (sync);
       SYSCALL_MAP (fsync);
       SYSCALL_MAP (fdatasync);
       SYSCALL_MAP (sync_file_range);
+      UNSUPPORTED_SYSCALL_MAP (timerfd_create);
+      UNSUPPORTED_SYSCALL_MAP (timerfd_settime);
+      UNSUPPORTED_SYSCALL_MAP (timerfd_gettime);
+      UNSUPPORTED_SYSCALL_MAP (utimensat);
       SYSCALL_MAP (acct);
       SYSCALL_MAP (capget);
       SYSCALL_MAP (capset);
@@ -795,6 +820,7 @@ aarch64_canonicalize_syscall (enum aarch
       SYSCALL_MAP (getrusage);
       SYSCALL_MAP (umask);
       SYSCALL_MAP (prctl);
+      SYSCALL_MAP (getcpu);
       SYSCALL_MAP (gettimeofday);
       SYSCALL_MAP (settimeofday);
       SYSCALL_MAP (adjtimex);
@@ -869,9 +895,30 @@ aarch64_canonicalize_syscall (enum aarch
       SYSCALL_MAP (set_mempolicy);
       SYSCALL_MAP (migrate_pages);
       SYSCALL_MAP (move_pages);
-
+      UNSUPPORTED_SYSCALL_MAP (rt_tgsigqueueinfo);
+      UNSUPPORTED_SYSCALL_MAP (perf_event_open);
+      UNSUPPORTED_SYSCALL_MAP (accept4);
+      UNSUPPORTED_SYSCALL_MAP (recvmmsg);
+
+      SYSCALL_MAP (wait4);
+
+      UNSUPPORTED_SYSCALL_MAP (prlimit64);
+      UNSUPPORTED_SYSCALL_MAP (fanotify_init);
+      UNSUPPORTED_SYSCALL_MAP (fanotify_mark);
+      UNSUPPORTED_SYSCALL_MAP (name_to_handle_at);
+      UNSUPPORTED_SYSCALL_MAP (open_by_handle_at);
+      UNSUPPORTED_SYSCALL_MAP (clock_adjtime);
+      UNSUPPORTED_SYSCALL_MAP (syncfs);
+      UNSUPPORTED_SYSCALL_MAP (setns);
+      UNSUPPORTED_SYSCALL_MAP (sendmmsg);
+      UNSUPPORTED_SYSCALL_MAP (process_vm_readv);
+      UNSUPPORTED_SYSCALL_MAP (process_vm_writev);
+      UNSUPPORTED_SYSCALL_MAP (kcmp);
+      UNSUPPORTED_SYSCALL_MAP (finit_module);
+      UNSUPPORTED_SYSCALL_MAP (sched_setattr);
+      UNSUPPORTED_SYSCALL_MAP (sched_getattr);
   default:
-    return -1;
+    return gdb_sys_no_syscall;
   }
 }
 
@@ -901,7 +948,8 @@ aarch64_linux_syscall_record (struct reg
   int ret = 0;
   enum gdb_syscall syscall_gdb;
 
-  syscall_gdb = aarch64_canonicalize_syscall (svc_number);
+  syscall_gdb =
+    aarch64_canonicalize_syscall ((enum aarch64_syscall) svc_number);
 
   if (syscall_gdb < 0)
     {
@@ -961,6 +1009,7 @@ aarch64_linux_init_abi (struct gdbarch_i
 
   /* Shared library handling.  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
 
   tramp_frame_prepend_unwinder (gdbarch, &aarch64_linux_rt_sigframe);
 
@@ -997,8 +1046,8 @@ aarch64_linux_init_abi (struct gdbarch_i
   aarch64_linux_record_tdep.size_flock = 32;
   aarch64_linux_record_tdep.size_oldold_utsname = 45;
   aarch64_linux_record_tdep.size_ustat = 32;
-  aarch64_linux_record_tdep.size_old_sigaction = 152;
-  aarch64_linux_record_tdep.size_old_sigset_t = 128;
+  aarch64_linux_record_tdep.size_old_sigaction = 32;
+  aarch64_linux_record_tdep.size_old_sigset_t = 8;
   aarch64_linux_record_tdep.size_rlimit = 16;
   aarch64_linux_record_tdep.size_rusage = 144;
   aarch64_linux_record_tdep.size_timeval = 16;
@@ -1006,8 +1055,7 @@ aarch64_linux_init_abi (struct gdbarch_i
   aarch64_linux_record_tdep.size_old_gid_t = 2;
   aarch64_linux_record_tdep.size_old_uid_t = 2;
   aarch64_linux_record_tdep.size_fd_set = 128;
-  aarch64_linux_record_tdep.size_dirent = 280;
-  aarch64_linux_record_tdep.size_dirent64 = 280;
+  aarch64_linux_record_tdep.size_old_dirent = 280;
   aarch64_linux_record_tdep.size_statfs = 120;
   aarch64_linux_record_tdep.size_statfs64 = 120;
   aarch64_linux_record_tdep.size_sockaddr = 16;
@@ -1034,8 +1082,8 @@ aarch64_linux_init_abi (struct gdbarch_i
   aarch64_linux_record_tdep.size_NFS_FHSIZE = 32;
   aarch64_linux_record_tdep.size_knfsd_fh = 132;
   aarch64_linux_record_tdep.size_TASK_COMM_LEN = 16;
-  aarch64_linux_record_tdep.size_sigaction = 152;
-  aarch64_linux_record_tdep.size_sigset_t = 128;
+  aarch64_linux_record_tdep.size_sigaction = 32;
+  aarch64_linux_record_tdep.size_sigset_t = 8;
   aarch64_linux_record_tdep.size_siginfo_t = 128;
   aarch64_linux_record_tdep.size_cap_user_data_t = 8;
   aarch64_linux_record_tdep.size_stack_t = 24;
@@ -1051,8 +1099,7 @@ aarch64_linux_init_abi (struct gdbarch_i
   aarch64_linux_record_tdep.size_epoll_event = 12;
   aarch64_linux_record_tdep.size_itimerspec = 32;
   aarch64_linux_record_tdep.size_mq_attr = 64;
-  aarch64_linux_record_tdep.size_siginfo = 128;
-  aarch64_linux_record_tdep.size_termios = 60;
+  aarch64_linux_record_tdep.size_termios = 36;
   aarch64_linux_record_tdep.size_termios2 = 44;
   aarch64_linux_record_tdep.size_pid_t = 4;
   aarch64_linux_record_tdep.size_winsize = 8;
@@ -1061,6 +1108,7 @@ aarch64_linux_init_abi (struct gdbarch_i
   aarch64_linux_record_tdep.size_hayes_esp_config = 12;
   aarch64_linux_record_tdep.size_size_t = 8;
   aarch64_linux_record_tdep.size_iovec = 16;
+  aarch64_linux_record_tdep.size_time_t = 8;
 
   /* These values are the second argument of system call "sys_ioctl".
      They are obtained from Linux Kernel source.  */
@@ -1150,6 +1198,17 @@ aarch64_linux_init_abi (struct gdbarch_i
   /* `catch syscall' */
   set_xml_syscall_file_name (gdbarch, "syscalls/aarch64-linux.xml");
   set_gdbarch_get_syscall_number (gdbarch, aarch64_linux_get_syscall_number);
+
+  /* Displaced stepping.  */
+  set_gdbarch_max_insn_length (gdbarch, 4 * DISPLACED_MODIFIED_INSNS);
+  set_gdbarch_displaced_step_copy_insn (gdbarch,
+					aarch64_displaced_step_copy_insn);
+  set_gdbarch_displaced_step_fixup (gdbarch, aarch64_displaced_step_fixup);
+  set_gdbarch_displaced_step_free_closure (gdbarch,
+					   simple_displaced_step_free_closure);
+  set_gdbarch_displaced_step_location (gdbarch, linux_displaced_step_location);
+  set_gdbarch_displaced_step_hw_singlestep (gdbarch,
+					    aarch64_displaced_step_hw_singlestep);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-tdep.h ./gdb/aarch64-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux on AArch64 target support, prototypes.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-newlib-tdep.c ./gdb/aarch64-newlib-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-newlib-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-newlib-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Newlib AArch64.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-tdep.c ./gdb/aarch64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target dependent code for GDB on AArch64 systems.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
@@ -42,6 +42,9 @@
 #include "user-regs.h"
 #include "language.h"
 #include "infcall.h"
+#include "ax.h"
+#include "ax-gdb.h"
+#include "selftest.h"
 
 #include "aarch64-tdep.h"
 
@@ -55,9 +58,18 @@
 
 #include "features/aarch64.c"
 
+#include "arch/aarch64-insn.h"
+
+#include "opcode/aarch64.h"
+#include <algorithm>
+
+#define submask(x) ((1L << ((x) + 1)) - 1)
+#define bit(obj,st) (((obj) >> (st)) & 1)
+#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st)))
+
 /* Pseudo register base numbers.  */
 #define AARCH64_Q0_REGNUM 0
-#define AARCH64_D0_REGNUM (AARCH64_Q0_REGNUM + 32)
+#define AARCH64_D0_REGNUM (AARCH64_Q0_REGNUM + AARCH64_D_REGISTER_COUNT)
 #define AARCH64_S0_REGNUM (AARCH64_D0_REGNUM + 32)
 #define AARCH64_H0_REGNUM (AARCH64_S0_REGNUM + 32)
 #define AARCH64_B0_REGNUM (AARCH64_H0_REGNUM + 32)
@@ -148,11 +160,23 @@ static const char *const aarch64_v_regis
 /* AArch64 prologue cache structure.  */
 struct aarch64_prologue_cache
 {
+  /* The program counter at the start of the function.  It is used to
+     identify this frame as a prologue frame.  */
+  CORE_ADDR func;
+
+  /* The program counter at the time this frame was created; i.e. where
+     this function was called from.  It is used to identify this frame as a
+     stub frame.  */
+  CORE_ADDR prev_pc;
+
   /* The stack pointer at the time this frame was created; i.e. the
      caller's stack pointer when this function was called.  It is used
      to identify this frame.  */
   CORE_ADDR prev_sp;
 
+  /* Is the target available to read from?  */
+  int available_p;
+
   /* The frame base for this frame is just prev_sp - frame size.
      FRAMESIZE is the distance from the frame pointer to the
      initial stack pointer.  */
@@ -165,9 +189,6 @@ struct aarch64_prologue_cache
   struct trad_frame_saved_reg *saved_regs;
 };
 
-/* Toggle this file's internal debugging dump.  */
-static int aarch64_debug;
-
 static void
 show_aarch64_debug (struct ui_file *file, int from_tty,
                     struct cmd_list_element *c, const char *value)
@@ -175,481 +196,26 @@ show_aarch64_debug (struct ui_file *file
   fprintf_filtered (file, _("AArch64 debugging is %s.\n"), value);
 }
 
-/* Extract a signed value from a bit field within an instruction
-   encoding.
-
-   INSN is the instruction opcode.
-
-   WIDTH specifies the width of the bit field to extract (in bits).
-
-   OFFSET specifies the least significant bit of the field where bits
-   are numbered zero counting from least to most significant.  */
-
-static int32_t
-extract_signed_bitfield (uint32_t insn, unsigned width, unsigned offset)
-{
-  unsigned shift_l = sizeof (int32_t) * 8 - (offset + width);
-  unsigned shift_r = sizeof (int32_t) * 8 - width;
-
-  return ((int32_t) insn << shift_l) >> shift_r;
-}
-
-/* Determine if specified bits within an instruction opcode matches a
-   specific pattern.
+/* Abstract instruction reader.  */
 
-   INSN is the instruction opcode.
-
-   MASK specifies the bits within the opcode that are to be tested
-   agsinst for a match with PATTERN.  */
-
-static int
-decode_masked_match (uint32_t insn, uint32_t mask, uint32_t pattern)
+class abstract_instruction_reader
 {
-  return (insn & mask) == pattern;
-}
-
-/* Decode an opcode if it represents an immediate ADD or SUB instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RD receives the 'rd' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-static int
-decode_add_sub_imm (CORE_ADDR addr, uint32_t insn, unsigned *rd, unsigned *rn,
-		    int32_t *imm)
-{
-  if ((insn & 0x9f000000) == 0x91000000)
-    {
-      unsigned shift;
-      unsigned op_is_sub;
-
-      *rd = (insn >> 0) & 0x1f;
-      *rn = (insn >> 5) & 0x1f;
-      *imm = (insn >> 10) & 0xfff;
-      shift = (insn >> 22) & 0x3;
-      op_is_sub = (insn >> 30) & 0x1;
-
-      switch (shift)
-	{
-	case 0:
-	  break;
-	case 1:
-	  *imm <<= 12;
-	  break;
-	default:
-	  /* UNDEFINED */
-	  return 0;
-	}
-
-      if (op_is_sub)
-	*imm = -*imm;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x add x%u, x%u, #%d\n",
-			    core_addr_to_string_nz (addr), insn, *rd, *rn,
-			    *imm);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents an ADRP instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RD receives the 'rd' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_adrp (CORE_ADDR addr, uint32_t insn, unsigned *rd)
-{
-  if (decode_masked_match (insn, 0x9f000000, 0x90000000))
-    {
-      *rd = (insn >> 0) & 0x1f;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x adrp x%u, #?\n",
-			    core_addr_to_string_nz (addr), insn, *rd);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents an branch immediate or branch
-   and link immediate instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   LINK receives the 'link' bit from the decoded instruction.
-   OFFSET receives the immediate offset from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_b (CORE_ADDR addr, uint32_t insn, unsigned *link, int32_t *offset)
-{
-  /* b  0001 01ii iiii iiii iiii iiii iiii iiii */
-  /* bl 1001 01ii iiii iiii iiii iiii iiii iiii */
-  if (decode_masked_match (insn, 0x7c000000, 0x14000000))
-    {
-      *link = insn >> 31;
-      *offset = extract_signed_bitfield (insn, 26, 0) << 2;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x %s 0x%s\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *link ? "bl" : "b",
-			    core_addr_to_string_nz (addr + *offset));
-
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a conditional branch instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   COND receives the branch condition field from the decoded
-   instruction.
-   OFFSET receives the immediate offset from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond, int32_t *offset)
-{
-  if (decode_masked_match (insn, 0xfe000000, 0x54000000))
-    {
-      *cond = (insn >> 0) & 0xf;
-      *offset = extract_signed_bitfield (insn, 19, 5) << 2;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x b<%u> 0x%s\n",
-			    core_addr_to_string_nz (addr), insn, *cond,
-			    core_addr_to_string_nz (addr + *offset));
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a branch via register instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   LINK receives the 'link' bit from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_br (CORE_ADDR addr, uint32_t insn, unsigned *link, unsigned *rn)
-{
-  /*         8   4   0   6   2   8   4   0 */
-  /* blr  110101100011111100000000000rrrrr */
-  /* br   110101100001111100000000000rrrrr */
-  if (decode_masked_match (insn, 0xffdffc1f, 0xd61f0000))
-    {
-      *link = (insn >> 21) & 1;
-      *rn = (insn >> 5) & 0x1f;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x %s 0x%x\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *link ? "blr" : "br", *rn);
-
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a CBZ or CBNZ instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   IS64 receives the 'sf' field from the decoded instruction.
-   OP receives the 'op' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-   OFFSET receives the 'imm19' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_cb (CORE_ADDR addr,
-	   uint32_t insn, int *is64, unsigned *op, unsigned *rn,
-	   int32_t *offset)
-{
-  if (decode_masked_match (insn, 0x7e000000, 0x34000000))
-    {
-      /* cbz  T011 010o iiii iiii iiii iiii iiir rrrr */
-      /* cbnz T011 010o iiii iiii iiii iiii iiir rrrr */
-
-      *rn = (insn >> 0) & 0x1f;
-      *is64 = (insn >> 31) & 0x1;
-      *op = (insn >> 24) & 0x1;
-      *offset = extract_signed_bitfield (insn, 19, 5) << 2;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x %s 0x%s\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *op ? "cbnz" : "cbz",
-			    core_addr_to_string_nz (addr + *offset));
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a ERET instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_eret (CORE_ADDR addr, uint32_t insn)
-{
-  /* eret 1101 0110 1001 1111 0000 0011 1110 0000 */
-  if (insn == 0xd69f03e0)
-    {
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog, "decode: 0x%s 0x%x eret\n",
-			    core_addr_to_string_nz (addr), insn);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a MOVZ instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RD receives the 'rd' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_movz (CORE_ADDR addr, uint32_t insn, unsigned *rd)
-{
-  if (decode_masked_match (insn, 0xff800000, 0x52800000))
-    {
-      *rd = (insn >> 0) & 0x1f;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x movz x%u, #?\n",
-			    core_addr_to_string_nz (addr), insn, *rd);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a ORR (shifted register)
-   instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RD receives the 'rd' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-   RM receives the 'rm' field from the decoded instruction.
-   IMM receives the 'imm6' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_orr_shifted_register_x (CORE_ADDR addr,
-			       uint32_t insn, unsigned *rd, unsigned *rn,
-			       unsigned *rm, int32_t *imm)
-{
-  if (decode_masked_match (insn, 0xff200000, 0xaa000000))
-    {
-      *rd = (insn >> 0) & 0x1f;
-      *rn = (insn >> 5) & 0x1f;
-      *rm = (insn >> 16) & 0x1f;
-      *imm = (insn >> 10) & 0x3f;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x orr x%u, x%u, x%u, #%u\n",
-			    core_addr_to_string_nz (addr), insn, *rd,
-			    *rn, *rm, *imm);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a RET instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RN receives the 'rn' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_ret (CORE_ADDR addr, uint32_t insn, unsigned *rn)
-{
-  if (decode_masked_match (insn, 0xfffffc1f, 0xd65f0000))
-    {
-      *rn = (insn >> 5) & 0x1f;
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x ret x%u\n",
-			    core_addr_to_string_nz (addr), insn, *rn);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents the following instruction:
-   STP rt, rt2, [rn, #imm]
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RT1 receives the 'rt' field from the decoded instruction.
-   RT2 receives the 'rt2' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-   IMM receives the 'imm' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_stp_offset (CORE_ADDR addr,
-		   uint32_t insn,
-		   unsigned *rt1, unsigned *rt2, unsigned *rn, int32_t *imm)
-{
-  if (decode_masked_match (insn, 0xffc00000, 0xa9000000))
-    {
-      *rt1 = (insn >> 0) & 0x1f;
-      *rn = (insn >> 5) & 0x1f;
-      *rt2 = (insn >> 10) & 0x1f;
-      *imm = extract_signed_bitfield (insn, 7, 15);
-      *imm <<= 3;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x stp x%u, x%u, [x%u + #%d]\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *rt1, *rt2, *rn, *imm);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents the following instruction:
-   STP rt, rt2, [rn, #imm]!
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   RT1 receives the 'rt' field from the decoded instruction.
-   RT2 receives the 'rt2' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-   IMM receives the 'imm' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_stp_offset_wb (CORE_ADDR addr,
-		      uint32_t insn,
-		      unsigned *rt1, unsigned *rt2, unsigned *rn,
-		      int32_t *imm)
-{
-  if (decode_masked_match (insn, 0xffc00000, 0xa9800000))
-    {
-      *rt1 = (insn >> 0) & 0x1f;
-      *rn = (insn >> 5) & 0x1f;
-      *rt2 = (insn >> 10) & 0x1f;
-      *imm = extract_signed_bitfield (insn, 7, 15);
-      *imm <<= 3;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x stp x%u, x%u, [x%u + #%d]!\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *rt1, *rt2, *rn, *imm);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents the following instruction:
-   STUR rt, [rn, #imm]
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   IS64 receives size field from the decoded instruction.
-   RT receives the 'rt' field from the decoded instruction.
-   RN receives the 'rn' field from the decoded instruction.
-   IMM receives the 'imm' field from the decoded instruction.
+public:
+  /* Read in one instruction.  */
+  virtual ULONGEST read (CORE_ADDR memaddr, int len,
+			 enum bfd_endian byte_order) = 0;
+};
 
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+/* Instruction reader from real target.  */
 
-static int
-decode_stur (CORE_ADDR addr, uint32_t insn, int *is64, unsigned *rt,
-	     unsigned *rn, int32_t *imm)
+class instruction_reader : public abstract_instruction_reader
 {
-  if (decode_masked_match (insn, 0xbfe00c00, 0xb8000000))
-    {
-      *is64 = (insn >> 30) & 1;
-      *rt = (insn >> 0) & 0x1f;
-      *rn = (insn >> 5) & 0x1f;
-      *imm = extract_signed_bitfield (insn, 9, 12);
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x stur %c%u, [x%u + #%d]\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *is64 ? 'x' : 'w', *rt, *rn, *imm);
-      return 1;
-    }
-  return 0;
-}
-
-/* Decode an opcode if it represents a TB or TBNZ instruction.
-
-   ADDR specifies the address of the opcode.
-   INSN specifies the opcode to test.
-   OP receives the 'op' field from the decoded instruction.
-   BIT receives the bit position field from the decoded instruction.
-   RT receives 'rt' field from the decoded instruction.
-   IMM receives 'imm' field from the decoded instruction.
-
-   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
-
-static int
-decode_tb (CORE_ADDR addr,
-	   uint32_t insn, unsigned *op, unsigned *bit, unsigned *rt,
-	   int32_t *imm)
-{
-  if (decode_masked_match (insn, 0x7e000000, 0x36000000))
-    {
-      /* tbz  b011 0110 bbbb biii iiii iiii iiir rrrr */
-      /* tbnz B011 0111 bbbb biii iiii iiii iiir rrrr */
-
-      *rt = (insn >> 0) & 0x1f;
-      *op = insn & (1 << 24);
-      *bit = ((insn >> (31 - 4)) & 0x20) | ((insn >> 19) & 0x1f);
-      *imm = extract_signed_bitfield (insn, 14, 5) << 2;
-
-      if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "decode: 0x%s 0x%x %s x%u, #%u, 0x%s\n",
-			    core_addr_to_string_nz (addr), insn,
-			    *op ? "tbnz" : "tbz", *rt, *bit,
-			    core_addr_to_string_nz (addr + *imm));
-      return 1;
-    }
-  return 0;
-}
+ public:
+  ULONGEST read (CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
+  {
+    return read_code_unsigned_integer (memaddr, len, byte_order);
+  }
+};
 
 /* Analyze a prologue, looking for a recognizable stack frame
    and frame pointer.  Scan until we encounter a store that could
@@ -658,15 +224,17 @@ decode_tb (CORE_ADDR addr,
 static CORE_ADDR
 aarch64_analyze_prologue (struct gdbarch *gdbarch,
 			  CORE_ADDR start, CORE_ADDR limit,
-			  struct aarch64_prologue_cache *cache)
+			  struct aarch64_prologue_cache *cache,
+			  abstract_instruction_reader& reader)
 {
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   int i;
-  pv_t regs[AARCH64_X_REGISTER_COUNT];
+  /* Track X registers and D registers in prologue.  */
+  pv_t regs[AARCH64_X_REGISTER_COUNT + AARCH64_D_REGISTER_COUNT];
   struct pv_area *stack;
   struct cleanup *back_to;
 
-  for (i = 0; i < AARCH64_X_REGISTER_COUNT; i++)
+  for (i = 0; i < AARCH64_X_REGISTER_COUNT + AARCH64_D_REGISTER_COUNT; i++)
     regs[i] = pv_register (i, 0);
   stack = make_pv_area (AARCH64_SP_REGNUM, gdbarch_addr_bit (gdbarch));
   back_to = make_cleanup_free_pv_area (stack);
@@ -674,83 +242,128 @@ aarch64_analyze_prologue (struct gdbarch
   for (; start < limit; start += 4)
     {
       uint32_t insn;
-      unsigned rd;
-      unsigned rn;
-      unsigned rm;
-      unsigned rt;
-      unsigned rt1;
-      unsigned rt2;
-      int op_is_sub;
-      int32_t imm;
-      unsigned cond;
-      int is64;
-      unsigned is_link;
-      unsigned op;
-      unsigned bit;
-      int32_t offset;
-
-      insn = read_memory_unsigned_integer (start, 4, byte_order_for_code);
-
-      if (decode_add_sub_imm (start, insn, &rd, &rn, &imm))
-	regs[rd] = pv_add_constant (regs[rn], imm);
-      else if (decode_adrp (start, insn, &rd))
-	regs[rd] = pv_unknown ();
-      else if (decode_b (start, insn, &is_link, &offset))
+      aarch64_inst inst;
+
+      insn = reader.read (start, 4, byte_order_for_code);
+
+      if (aarch64_decode_insn (insn, &inst, 1) != 0)
+	break;
+
+      if (inst.opcode->iclass == addsub_imm
+	  && (inst.opcode->op == OP_ADD
+	      || strcmp ("sub", inst.opcode->name) == 0))
+	{
+	  unsigned rd = inst.operands[0].reg.regno;
+	  unsigned rn = inst.operands[1].reg.regno;
+
+	  gdb_assert (aarch64_num_of_operands (inst.opcode) == 3);
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd_SP);
+	  gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn_SP);
+	  gdb_assert (inst.operands[2].type == AARCH64_OPND_AIMM);
+
+	  if (inst.opcode->op == OP_ADD)
+	    {
+	      regs[rd] = pv_add_constant (regs[rn],
+					  inst.operands[2].imm.value);
+	    }
+	  else
+	    {
+	      regs[rd] = pv_add_constant (regs[rn],
+					  -inst.operands[2].imm.value);
+	    }
+	}
+      else if (inst.opcode->iclass == pcreladdr
+	       && inst.operands[1].type == AARCH64_OPND_ADDR_ADRP)
 	{
-	  /* Stop analysis on branch.  */
-	  break;
+	  gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
+
+	  regs[inst.operands[0].reg.regno] = pv_unknown ();
 	}
-      else if (decode_bcond (start, insn, &cond, &offset))
+      else if (inst.opcode->iclass == branch_imm)
 	{
 	  /* Stop analysis on branch.  */
 	  break;
 	}
-      else if (decode_br (start, insn, &is_link, &rn))
+      else if (inst.opcode->iclass == condbranch)
 	{
 	  /* Stop analysis on branch.  */
 	  break;
 	}
-      else if (decode_cb (start, insn, &is64, &op, &rn, &offset))
+      else if (inst.opcode->iclass == branch_reg)
 	{
 	  /* Stop analysis on branch.  */
 	  break;
 	}
-      else if (decode_eret (start, insn))
+      else if (inst.opcode->iclass == compbranch)
 	{
 	  /* Stop analysis on branch.  */
 	  break;
 	}
-      else if (decode_movz (start, insn, &rd))
-	regs[rd] = pv_unknown ();
-      else
-	if (decode_orr_shifted_register_x (start, insn, &rd, &rn, &rm, &imm))
+      else if (inst.opcode->op == OP_MOVZ)
 	{
-	  if (imm == 0 && rn == 31)
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
+	  regs[inst.operands[0].reg.regno] = pv_unknown ();
+	}
+      else if (inst.opcode->iclass == log_shift
+	       && strcmp (inst.opcode->name, "orr") == 0)
+	{
+	  unsigned rd = inst.operands[0].reg.regno;
+	  unsigned rn = inst.operands[1].reg.regno;
+	  unsigned rm = inst.operands[2].reg.regno;
+
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
+	  gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn);
+	  gdb_assert (inst.operands[2].type == AARCH64_OPND_Rm_SFT);
+
+	  if (inst.operands[2].shifter.amount == 0
+	      && rn == AARCH64_SP_REGNUM)
 	    regs[rd] = regs[rm];
 	  else
 	    {
 	      if (aarch64_debug)
-		fprintf_unfiltered
-		  (gdb_stdlog,
-		   "aarch64: prologue analysis gave up addr=0x%s "
-		   "opcode=0x%x (orr x register)\n",
-		   core_addr_to_string_nz (start),
-		   insn);
+		{
+		  debug_printf ("aarch64: prologue analysis gave up "
+				"addr=%s opcode=0x%x (orr x register)\n",
+				core_addr_to_string_nz (start), insn);
+		}
 	      break;
 	    }
 	}
-      else if (decode_ret (start, insn, &rn))
-	{
-	  /* Stop analysis on branch.  */
-	  break;
-	}
-      else if (decode_stur (start, insn, &is64, &rt, &rn, &offset))
+      else if (inst.opcode->op == OP_STUR)
 	{
-	  pv_area_store (stack, pv_add_constant (regs[rn], offset),
+	  unsigned rt = inst.operands[0].reg.regno;
+	  unsigned rn = inst.operands[1].addr.base_regno;
+	  int is64
+	    = (aarch64_get_qualifier_esize (inst.operands[0].qualifier) == 8);
+
+	  gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt);
+	  gdb_assert (inst.operands[1].type == AARCH64_OPND_ADDR_SIMM9);
+	  gdb_assert (!inst.operands[1].addr.offset.is_reg);
+
+	  pv_area_store (stack, pv_add_constant (regs[rn],
+						 inst.operands[1].addr.offset.imm),
 			 is64 ? 8 : 4, regs[rt]);
 	}
-      else if (decode_stp_offset (start, insn, &rt1, &rt2, &rn, &imm))
-	{
+      else if ((inst.opcode->iclass == ldstpair_off
+		|| (inst.opcode->iclass == ldstpair_indexed
+		    && inst.operands[2].addr.preind))
+	       && strcmp ("stp", inst.opcode->name) == 0)
+	{
+	  /* STP with addressing mode Pre-indexed and Base register.  */
+	  unsigned rt1;
+	  unsigned rt2;
+	  unsigned rn = inst.operands[2].addr.base_regno;
+	  int32_t imm = inst.operands[2].addr.offset.imm;
+
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
+		      || inst.operands[0].type == AARCH64_OPND_Ft);
+	  gdb_assert (inst.operands[1].type == AARCH64_OPND_Rt2
+		      || inst.operands[1].type == AARCH64_OPND_Ft2);
+	  gdb_assert (inst.operands[2].type == AARCH64_OPND_ADDR_SIMM7);
+	  gdb_assert (!inst.operands[2].addr.offset.is_reg);
+
 	  /* If recording this store would invalidate the store area
 	     (perhaps because rn is not known) then we should abandon
 	     further prologue analysis.  */
@@ -762,31 +375,56 @@ aarch64_analyze_prologue (struct gdbarch
 					 pv_add_constant (regs[rn], imm + 8)))
 	    break;
 
+	  rt1 = inst.operands[0].reg.regno;
+	  rt2 = inst.operands[1].reg.regno;
+	  if (inst.operands[0].type == AARCH64_OPND_Ft)
+	    {
+	      /* Only bottom 64-bit of each V register (D register) need
+		 to be preserved.  */
+	      gdb_assert (inst.operands[0].qualifier == AARCH64_OPND_QLF_S_D);
+	      rt1 += AARCH64_X_REGISTER_COUNT;
+	      rt2 += AARCH64_X_REGISTER_COUNT;
+	    }
+
 	  pv_area_store (stack, pv_add_constant (regs[rn], imm), 8,
 			 regs[rt1]);
 	  pv_area_store (stack, pv_add_constant (regs[rn], imm + 8), 8,
 			 regs[rt2]);
+
+	  if (inst.operands[2].addr.writeback)
+	    regs[rn] = pv_add_constant (regs[rn], imm);
+
 	}
-      else if (decode_stp_offset_wb (start, insn, &rt1, &rt2, &rn, &imm))
-	{
-	  /* If recording this store would invalidate the store area
-	     (perhaps because rn is not known) then we should abandon
-	     further prologue analysis.  */
-	  if (pv_area_store_would_trash (stack,
-					 pv_add_constant (regs[rn], imm)))
-	    break;
+      else if ((inst.opcode->iclass == ldst_imm9 /* Signed immediate.  */
+		|| (inst.opcode->iclass == ldst_pos /* Unsigned immediate.  */
+		    && (inst.opcode->op == OP_STR_POS
+			|| inst.opcode->op == OP_STRF_POS)))
+	       && inst.operands[1].addr.base_regno == AARCH64_SP_REGNUM
+	       && strcmp ("str", inst.opcode->name) == 0)
+	{
+	  /* STR (immediate) */
+	  unsigned int rt = inst.operands[0].reg.regno;
+	  int32_t imm = inst.operands[1].addr.offset.imm;
+	  unsigned int rn = inst.operands[1].addr.base_regno;
+	  bool is64
+	    = (aarch64_get_qualifier_esize (inst.operands[0].qualifier) == 8);
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
+		      || inst.operands[0].type == AARCH64_OPND_Ft);
 
-	  if (pv_area_store_would_trash (stack,
-					 pv_add_constant (regs[rn], imm + 8)))
-	    break;
+	  if (inst.operands[0].type == AARCH64_OPND_Ft)
+	    {
+	      /* Only bottom 64-bit of each V register (D register) need
+		 to be preserved.  */
+	      gdb_assert (inst.operands[0].qualifier == AARCH64_OPND_QLF_S_D);
+	      rt += AARCH64_X_REGISTER_COUNT;
+	    }
 
-	  pv_area_store (stack, pv_add_constant (regs[rn], imm), 8,
-			 regs[rt1]);
-	  pv_area_store (stack, pv_add_constant (regs[rn], imm + 8), 8,
-			 regs[rt2]);
-	  regs[rn] = pv_add_constant (regs[rn], imm);
+	  pv_area_store (stack, pv_add_constant (regs[rn], imm),
+			 is64 ? 8 : 4, regs[rt]);
+	  if (inst.operands[1].addr.writeback)
+	    regs[rn] = pv_add_constant (regs[rn], imm);
 	}
-      else if (decode_tb (start, insn, &op, &bit, &rn, &offset))
+      else if (inst.opcode->iclass == testbranch)
 	{
 	  /* Stop analysis on branch.  */
 	  break;
@@ -794,10 +432,11 @@ aarch64_analyze_prologue (struct gdbarch
       else
 	{
 	  if (aarch64_debug)
-	    fprintf_unfiltered (gdb_stdlog,
-				"aarch64: prologue analysis gave up addr=0x%s"
-				" opcode=0x%x\n",
-				core_addr_to_string_nz (start), insn);
+	    {
+	      debug_printf ("aarch64: prologue analysis gave up addr=%s"
+			    " opcode=0x%x\n",
+			    core_addr_to_string_nz (start), insn);
+	    }
 	  break;
 	}
     }
@@ -835,19 +474,162 @@ aarch64_analyze_prologue (struct gdbarch
 	cache->saved_regs[i].addr = offset;
     }
 
+  for (i = 0; i < AARCH64_D_REGISTER_COUNT; i++)
+    {
+      int regnum = gdbarch_num_regs (gdbarch);
+      CORE_ADDR offset;
+
+      if (pv_area_find_reg (stack, gdbarch, i + AARCH64_X_REGISTER_COUNT,
+			    &offset))
+	cache->saved_regs[i + regnum + AARCH64_D0_REGNUM].addr = offset;
+    }
+
   do_cleanups (back_to);
   return start;
 }
 
+static CORE_ADDR
+aarch64_analyze_prologue (struct gdbarch *gdbarch,
+			  CORE_ADDR start, CORE_ADDR limit,
+			  struct aarch64_prologue_cache *cache)
+{
+  instruction_reader reader;
+
+  return aarch64_analyze_prologue (gdbarch, start, limit, cache,
+				   reader);
+}
+
+#if GDB_SELF_TEST
+
+namespace selftests {
+
+/* Instruction reader from manually cooked instruction sequences.  */
+
+class instruction_reader_test : public abstract_instruction_reader
+{
+public:
+  template<size_t SIZE>
+  explicit instruction_reader_test (const uint32_t (&insns)[SIZE])
+  : m_insns (insns), m_insns_size (SIZE)
+  {}
+
+  ULONGEST read (CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
+  {
+    SELF_CHECK (len == 4);
+    SELF_CHECK (memaddr % 4 == 0);
+    SELF_CHECK (memaddr / 4 < m_insns_size);
+
+    return m_insns[memaddr / 4];
+  }
+
+private:
+  const uint32_t *m_insns;
+  size_t m_insns_size;
+};
+
+static void
+aarch64_analyze_prologue_test (void)
+{
+  struct gdbarch_info info;
+
+  gdbarch_info_init (&info);
+  info.bfd_arch_info = bfd_scan_arch ("aarch64");
+
+  struct gdbarch *gdbarch = gdbarch_find_by_info (info);
+  SELF_CHECK (gdbarch != NULL);
+
+  /* Test the simple prologue in which frame pointer is used.  */
+  {
+    struct aarch64_prologue_cache cache;
+    cache.saved_regs = trad_frame_alloc_saved_regs (gdbarch);
+
+    static const uint32_t insns[] = {
+      0xa9af7bfd, /* stp     x29, x30, [sp,#-272]! */
+      0x910003fd, /* mov     x29, sp */
+      0x97ffffe6, /* bl      0x400580 */
+    };
+    instruction_reader_test reader (insns);
+
+    CORE_ADDR end = aarch64_analyze_prologue (gdbarch, 0, 128, &cache, reader);
+    SELF_CHECK (end == 4 * 2);
+
+    SELF_CHECK (cache.framereg == AARCH64_FP_REGNUM);
+    SELF_CHECK (cache.framesize == 272);
+
+    for (int i = 0; i < AARCH64_X_REGISTER_COUNT; i++)
+      {
+	if (i == AARCH64_FP_REGNUM)
+	  SELF_CHECK (cache.saved_regs[i].addr == -272);
+	else if (i == AARCH64_LR_REGNUM)
+	  SELF_CHECK (cache.saved_regs[i].addr == -264);
+	else
+	  SELF_CHECK (cache.saved_regs[i].addr == -1);
+      }
+
+    for (int i = 0; i < AARCH64_D_REGISTER_COUNT; i++)
+      {
+	int regnum = gdbarch_num_regs (gdbarch);
+
+	SELF_CHECK (cache.saved_regs[i + regnum + AARCH64_D0_REGNUM].addr
+		    == -1);
+      }
+  }
+
+  /* Test a prologue in which STR is used and frame pointer is not
+     used.  */
+  {
+    struct aarch64_prologue_cache cache;
+    cache.saved_regs = trad_frame_alloc_saved_regs (gdbarch);
+
+    static const uint32_t insns[] = {
+      0xf81d0ff3, /* str	x19, [sp, #-48]! */
+      0xb9002fe0, /* str	w0, [sp, #44] */
+      0xf90013e1, /* str	x1, [sp, #32]*/
+      0xfd000fe0, /* str	d0, [sp, #24] */
+      0xaa0203f3, /* mov	x19, x2 */
+      0xf94013e0, /* ldr	x0, [sp, #32] */
+    };
+    instruction_reader_test reader (insns);
+
+    CORE_ADDR end = aarch64_analyze_prologue (gdbarch, 0, 128, &cache, reader);
+
+    SELF_CHECK (end == 4 * 5);
+
+    SELF_CHECK (cache.framereg == AARCH64_SP_REGNUM);
+    SELF_CHECK (cache.framesize == 48);
+
+    for (int i = 0; i < AARCH64_X_REGISTER_COUNT; i++)
+      {
+	if (i == 1)
+	  SELF_CHECK (cache.saved_regs[i].addr == -16);
+	else if (i == 19)
+	  SELF_CHECK (cache.saved_regs[i].addr == -48);
+	else
+	  SELF_CHECK (cache.saved_regs[i].addr == -1);
+      }
+
+    for (int i = 0; i < AARCH64_D_REGISTER_COUNT; i++)
+      {
+	int regnum = gdbarch_num_regs (gdbarch);
+
+	if (i == 0)
+	  SELF_CHECK (cache.saved_regs[i + regnum + AARCH64_D0_REGNUM].addr
+		      == -24);
+	else
+	  SELF_CHECK (cache.saved_regs[i + regnum + AARCH64_D0_REGNUM].addr
+		      == -1);
+      }
+  }
+}
+} // namespace selftests
+#endif /* GDB_SELF_TEST */
+
 /* Implement the "skip_prologue" gdbarch method.  */
 
 static CORE_ADDR
 aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  unsigned long inst;
-  CORE_ADDR skip_pc;
   CORE_ADDR func_addr, limit_pc;
-  struct symtab_and_line sal;
 
   /* See if we can determine the end of the prologue via the symbol
      table.  If so, then return either PC, or the PC after the
@@ -858,7 +640,7 @@ aarch64_skip_prologue (struct gdbarch *g
 	= skip_prologue_using_sal (gdbarch, func_addr);
 
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -889,6 +671,8 @@ aarch64_scan_prologue (struct frame_info
   CORE_ADDR prev_pc = get_frame_pc (this_frame);
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
 
+  cache->prev_pc = prev_pc;
+
   /* Assume we do not find a frame.  */
   cache->framereg = -1;
   cache->framesize = 0;
@@ -909,15 +693,12 @@ aarch64_scan_prologue (struct frame_info
 	  prologue_end = sal.end;
 	}
 
-      prologue_end = min (prologue_end, prev_pc);
+      prologue_end = std::min (prologue_end, prev_pc);
       aarch64_analyze_prologue (gdbarch, prologue_start, prologue_end, cache);
     }
   else
     {
       CORE_ADDR frame_loc;
-      LONGEST saved_fp;
-      LONGEST saved_lr;
-      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
       frame_loc = get_frame_register_unsigned (this_frame, AARCH64_FP_REGNUM);
       if (frame_loc == 0)
@@ -930,37 +711,91 @@ aarch64_scan_prologue (struct frame_info
     }
 }
 
-/* Allocate an aarch64_prologue_cache and fill it with information
-   about the prologue of *THIS_FRAME.  */
+/* Fill in *CACHE with information about the prologue of *THIS_FRAME.  This
+   function may throw an exception if the inferior's registers or memory is
+   not available.  */
 
-static struct aarch64_prologue_cache *
-aarch64_make_prologue_cache (struct frame_info *this_frame)
+static void
+aarch64_make_prologue_cache_1 (struct frame_info *this_frame,
+			       struct aarch64_prologue_cache *cache)
 {
-  struct aarch64_prologue_cache *cache;
   CORE_ADDR unwound_fp;
   int reg;
 
+  aarch64_scan_prologue (this_frame, cache);
+
+  if (cache->framereg == -1)
+    return;
+
+  unwound_fp = get_frame_register_unsigned (this_frame, cache->framereg);
+  if (unwound_fp == 0)
+    return;
+
+  cache->prev_sp = unwound_fp + cache->framesize;
+
+  /* Calculate actual addresses of saved registers using offsets
+     determined by aarch64_analyze_prologue.  */
+  for (reg = 0; reg < gdbarch_num_regs (get_frame_arch (this_frame)); reg++)
+    if (trad_frame_addr_p (cache->saved_regs, reg))
+      cache->saved_regs[reg].addr += cache->prev_sp;
+
+  cache->func = get_frame_func (this_frame);
+
+  cache->available_p = 1;
+}
+
+/* Allocate and fill in *THIS_CACHE with information about the prologue of
+   *THIS_FRAME.  Do not do this is if *THIS_CACHE was already allocated.
+   Return a pointer to the current aarch64_prologue_cache in
+   *THIS_CACHE.  */
+
+static struct aarch64_prologue_cache *
+aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct aarch64_prologue_cache *cache;
+
+  if (*this_cache != NULL)
+    return (struct aarch64_prologue_cache *) *this_cache;
+
   cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+  *this_cache = cache;
 
-  aarch64_scan_prologue (this_frame, cache);
+  TRY
+    {
+      aarch64_make_prologue_cache_1 (this_frame, cache);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error != NOT_AVAILABLE_ERROR)
+	throw_exception (ex);
+    }
+  END_CATCH
 
-  if (cache->framereg == -1)
-    return cache;
+  return cache;
+}
 
-  unwound_fp = get_frame_register_unsigned (this_frame, cache->framereg);
-  if (unwound_fp == 0)
-    return cache;
+/* Implement the "stop_reason" frame_unwind method.  */
 
-  cache->prev_sp = unwound_fp + cache->framesize;
+static enum unwind_stop_reason
+aarch64_prologue_frame_unwind_stop_reason (struct frame_info *this_frame,
+					   void **this_cache)
+{
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_prologue_cache (this_frame, this_cache);
 
-  /* Calculate actual addresses of saved registers using offsets
-     determined by aarch64_analyze_prologue.  */
-  for (reg = 0; reg < gdbarch_num_regs (get_frame_arch (this_frame)); reg++)
-    if (trad_frame_addr_p (cache->saved_regs, reg))
-      cache->saved_regs[reg].addr += cache->prev_sp;
+  if (!cache->available_p)
+    return UNWIND_UNAVAILABLE;
 
-  return cache;
+  /* Halt the backtrace at "_start".  */
+  if (cache->prev_pc <= gdbarch_tdep (get_frame_arch (this_frame))->lowest_pc)
+    return UNWIND_OUTERMOST;
+
+  /* We've hit a wall, stop.  */
+  if (cache->prev_sp == 0)
+    return UNWIND_OUTERMOST;
+
+  return UNWIND_NO_REASON;
 }
 
 /* Our frame ID for a normal frame is the current function's starting
@@ -970,26 +805,13 @@ static void
 aarch64_prologue_this_id (struct frame_info *this_frame,
 			  void **this_cache, struct frame_id *this_id)
 {
-  struct aarch64_prologue_cache *cache;
-  struct frame_id id;
-  CORE_ADDR pc, func;
-
-  if (*this_cache == NULL)
-    *this_cache = aarch64_make_prologue_cache (this_frame);
-  cache = *this_cache;
-
-  /* This is meant to halt the backtrace at "_start".  */
-  pc = get_frame_pc (this_frame);
-  if (pc <= gdbarch_tdep (get_frame_arch (this_frame))->lowest_pc)
-    return;
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_prologue_cache (this_frame, this_cache);
 
-  /* If we've hit a wall, stop.  */
-  if (cache->prev_sp == 0)
-    return;
-
-  func = get_frame_func (this_frame);
-  id = frame_id_build (cache->prev_sp, func);
-  *this_id = id;
+  if (!cache->available_p)
+    *this_id = frame_id_build_unavailable_stack (cache->func);
+  else
+    *this_id = frame_id_build (cache->prev_sp, cache->func);
 }
 
 /* Implement the "prev_register" frame_unwind method.  */
@@ -998,12 +820,8 @@ static struct value *
 aarch64_prologue_prev_register (struct frame_info *this_frame,
 				void **this_cache, int prev_regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct aarch64_prologue_cache *cache;
-
-  if (*this_cache == NULL)
-    *this_cache = aarch64_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_prologue_cache (this_frame, this_cache);
 
   /* If we are asked to unwind the PC, then we need to return the LR
      instead.  The prologue may save PC, but it will point into this
@@ -1043,45 +861,75 @@ aarch64_prologue_prev_register (struct f
 struct frame_unwind aarch64_prologue_unwind =
 {
   NORMAL_FRAME,
-  default_frame_unwind_stop_reason,
+  aarch64_prologue_frame_unwind_stop_reason,
   aarch64_prologue_this_id,
   aarch64_prologue_prev_register,
   NULL,
   default_frame_sniffer
 };
 
-/* Allocate an aarch64_prologue_cache and fill it with information
-   about the prologue of *THIS_FRAME.  */
+/* Allocate and fill in *THIS_CACHE with information about the prologue of
+   *THIS_FRAME.  Do not do this is if *THIS_CACHE was already allocated.
+   Return a pointer to the current aarch64_prologue_cache in
+   *THIS_CACHE.  */
 
 static struct aarch64_prologue_cache *
-aarch64_make_stub_cache (struct frame_info *this_frame)
+aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache)
 {
-  int reg;
   struct aarch64_prologue_cache *cache;
-  CORE_ADDR unwound_fp;
+
+  if (*this_cache != NULL)
+    return (struct aarch64_prologue_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+  *this_cache = cache;
 
-  cache->prev_sp
-    = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
+  TRY
+    {
+      cache->prev_sp = get_frame_register_unsigned (this_frame,
+						    AARCH64_SP_REGNUM);
+      cache->prev_pc = get_frame_pc (this_frame);
+      cache->available_p = 1;
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error != NOT_AVAILABLE_ERROR)
+	throw_exception (ex);
+    }
+  END_CATCH
 
   return cache;
 }
 
+/* Implement the "stop_reason" frame_unwind method.  */
+
+static enum unwind_stop_reason
+aarch64_stub_frame_unwind_stop_reason (struct frame_info *this_frame,
+				       void **this_cache)
+{
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_stub_cache (this_frame, this_cache);
+
+  if (!cache->available_p)
+    return UNWIND_UNAVAILABLE;
+
+  return UNWIND_NO_REASON;
+}
+
 /* Our frame ID for a stub frame is the current SP and LR.  */
 
 static void
 aarch64_stub_this_id (struct frame_info *this_frame,
 		      void **this_cache, struct frame_id *this_id)
 {
-  struct aarch64_prologue_cache *cache;
-
-  if (*this_cache == NULL)
-    *this_cache = aarch64_make_stub_cache (this_frame);
-  cache = *this_cache;
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_stub_cache (this_frame, this_cache);
 
-  *this_id = frame_id_build (cache->prev_sp, get_frame_pc (this_frame));
+  if (cache->available_p)
+    *this_id = frame_id_build (cache->prev_sp, cache->prev_pc);
+  else
+    *this_id = frame_id_build_unavailable_stack (cache->prev_pc);
 }
 
 /* Implement the "sniffer" frame_unwind method.  */
@@ -1108,7 +956,7 @@ aarch64_stub_unwind_sniffer (const struc
 struct frame_unwind aarch64_stub_unwind =
 {
   NORMAL_FRAME,
-  default_frame_unwind_stop_reason,
+  aarch64_stub_frame_unwind_stop_reason,
   aarch64_stub_this_id,
   aarch64_prologue_prev_register,
   NULL,
@@ -1120,11 +968,8 @@ struct frame_unwind aarch64_stub_unwind 
 static CORE_ADDR
 aarch64_normal_frame_base (struct frame_info *this_frame, void **this_cache)
 {
-  struct aarch64_prologue_cache *cache;
-
-  if (*this_cache == NULL)
-    *this_cache = aarch64_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  struct aarch64_prologue_cache *cache
+    = aarch64_make_prologue_cache (this_frame, this_cache);
 
   return cache->prev_sp - cache->framesize;
 }
@@ -1178,7 +1023,6 @@ static struct value *
 aarch64_dwarf2_prev_register (struct frame_info *this_frame,
 			      void **this_cache, int regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR lr;
 
   switch (regnum)
@@ -1217,8 +1061,9 @@ aarch64_dwarf2_frame_init_reg (struct gd
 
 typedef struct
 {
-  /* Value to pass on stack.  */
-  const void *data;
+  /* Value to pass on stack.  It can be NULL if this item is for stack
+     padding.  */
+  const gdb_byte *data;
 
   /* Size in bytes of value to pass on stack.  */
   int len;
@@ -1256,6 +1101,17 @@ aarch64_type_align (struct type *t)
       return TYPE_LENGTH (t);
 
     case TYPE_CODE_ARRAY:
+      if (TYPE_VECTOR (t))
+	{
+	  /* Use the natural alignment for vector types (the same for
+	     scalar type), but the maximum alignment is 128-bit.  */
+	  if (TYPE_LENGTH (t) > 16)
+	    return 16;
+	  else
+	    return TYPE_LENGTH (t);
+	}
+      else
+	return aarch64_type_align (TYPE_TARGET_TYPE (t));
     case TYPE_CODE_COMPLEX:
       return aarch64_type_align (TYPE_TARGET_TYPE (t));
 
@@ -1272,18 +1128,26 @@ aarch64_type_align (struct type *t)
     }
 }
 
-/* Return 1 if *TY is a homogeneous floating-point aggregate as
-   defined in the AAPCS64 ABI document; otherwise return 0.  */
+/* Return 1 if *TY is a homogeneous floating-point aggregate or
+   homogeneous short-vector aggregate as defined in the AAPCS64 ABI
+   document; otherwise return 0.  */
 
 static int
-is_hfa (struct type *ty)
+is_hfa_or_hva (struct type *ty)
 {
   switch (TYPE_CODE (ty))
     {
     case TYPE_CODE_ARRAY:
       {
 	struct type *target_ty = TYPE_TARGET_TYPE (ty);
-	if (TYPE_CODE (target_ty) == TYPE_CODE_FLT && TYPE_LENGTH (ty) <= 4)
+
+	if (TYPE_VECTOR (ty))
+	  return 0;
+
+	if (TYPE_LENGTH (ty) <= 4 /* HFA or HVA has at most 4 members.  */
+	    && (TYPE_CODE (target_ty) == TYPE_CODE_FLT /* HFA */
+		|| (TYPE_CODE (target_ty) == TYPE_CODE_ARRAY /* HVA */
+		    && TYPE_VECTOR (target_ty))))
 	  return 1;
 	break;
       }
@@ -1291,12 +1155,15 @@ is_hfa (struct type *ty)
     case TYPE_CODE_UNION:
     case TYPE_CODE_STRUCT:
       {
+	/* HFA or HVA has at most four members.  */
 	if (TYPE_NFIELDS (ty) > 0 && TYPE_NFIELDS (ty) <= 4)
 	  {
 	    struct type *member0_type;
 
 	    member0_type = check_typedef (TYPE_FIELD_TYPE (ty, 0));
-	    if (TYPE_CODE (member0_type) == TYPE_CODE_FLT)
+	    if (TYPE_CODE (member0_type) == TYPE_CODE_FLT
+		|| (TYPE_CODE (member0_type) == TYPE_CODE_ARRAY
+		    && TYPE_VECTOR (member0_type)))
 	      {
 		int i;
 
@@ -1351,12 +1218,13 @@ struct aarch64_call_info
 static void
 pass_in_x (struct gdbarch *gdbarch, struct regcache *regcache,
 	   struct aarch64_call_info *info, struct type *type,
-	   const bfd_byte *buf)
+	   struct value *arg)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
   enum type_code typecode = TYPE_CODE (type);
   int regnum = AARCH64_X0_REGNUM + info->ngrn;
+  const bfd_byte *buf = value_contents (arg);
 
   info->argnum++;
 
@@ -1374,10 +1242,11 @@ pass_in_x (struct gdbarch *gdbarch, stru
 	regval <<= ((X_REGISTER_SIZE - partial_len) * TARGET_CHAR_BIT);
 
       if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
-			    info->argnum,
-			    gdbarch_register_name (gdbarch, regnum),
-			    phex (regval, X_REGISTER_SIZE));
+	{
+	  debug_printf ("arg %d in %s = 0x%s\n", info->argnum,
+			gdbarch_register_name (gdbarch, regnum),
+			phex (regval, X_REGISTER_SIZE));
+	}
       regcache_cooked_write_unsigned (regcache, regnum, regval);
       len -= partial_len;
       buf += partial_len;
@@ -1394,21 +1263,27 @@ static int
 pass_in_v (struct gdbarch *gdbarch,
 	   struct regcache *regcache,
 	   struct aarch64_call_info *info,
-	   const bfd_byte *buf)
+	   int len, const bfd_byte *buf)
 {
   if (info->nsrn < 8)
     {
-      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
       int regnum = AARCH64_V0_REGNUM + info->nsrn;
+      gdb_byte reg[V_REGISTER_SIZE];
 
       info->argnum++;
       info->nsrn++;
 
-      regcache_cooked_write (regcache, regnum, buf);
+      memset (reg, 0, sizeof (reg));
+      /* PCS C.1, the argument is allocated to the least significant
+	 bits of V register.  */
+      memcpy (reg, buf, len);
+      regcache_cooked_write (regcache, regnum, reg);
+
       if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog, "arg %d in %s\n",
-			    info->argnum,
-			    gdbarch_register_name (gdbarch, regnum));
+	{
+	  debug_printf ("arg %d in %s\n", info->argnum,
+			gdbarch_register_name (gdbarch, regnum));
+	}
       return 1;
     }
   info->nsrn = 8;
@@ -1419,8 +1294,9 @@ pass_in_v (struct gdbarch *gdbarch,
 
 static void
 pass_on_stack (struct aarch64_call_info *info, struct type *type,
-	       const bfd_byte *buf)
+	       struct value *arg)
 {
+  const bfd_byte *buf = value_contents (arg);
   int len = TYPE_LENGTH (type);
   int align;
   stack_item_t item;
@@ -1438,8 +1314,10 @@ pass_on_stack (struct aarch64_call_info 
     align = 16;
 
   if (aarch64_debug)
-    fprintf_unfiltered (gdb_stdlog, "arg %d len=%d @ sp + %d\n",
-			info->argnum, len, info->nsaa);
+    {
+      debug_printf ("arg %d len=%d @ sp + %d\n", info->argnum, len,
+		    info->nsaa);
+    }
 
   item.len = len;
   item.data = buf;
@@ -1452,7 +1330,7 @@ pass_on_stack (struct aarch64_call_info 
       int pad = align - (info->nsaa & (align - 1));
 
       item.len = pad;
-      item.data = buf;
+      item.data = NULL;
 
       VEC_safe_push (stack_item_t, info->si, &item);
       info->nsaa += pad;
@@ -1466,7 +1344,7 @@ pass_on_stack (struct aarch64_call_info 
 static void
 pass_in_x_or_stack (struct gdbarch *gdbarch, struct regcache *regcache,
 		    struct aarch64_call_info *info, struct type *type,
-		    const bfd_byte *buf)
+		    struct value *arg)
 {
   int len = TYPE_LENGTH (type);
   int nregs = (len + X_REGISTER_SIZE - 1) / X_REGISTER_SIZE;
@@ -1474,13 +1352,13 @@ pass_in_x_or_stack (struct gdbarch *gdba
   /* PCS C.13 - Pass in registers if we have enough spare */
   if (info->ngrn + nregs <= 8)
     {
-      pass_in_x (gdbarch, regcache, info, type, buf);
+      pass_in_x (gdbarch, regcache, info, type, arg);
       info->ngrn += nregs;
     }
   else
     {
       info->ngrn = 8;
-      pass_on_stack (info, type, buf);
+      pass_on_stack (info, type, arg);
     }
 }
 
@@ -1492,10 +1370,11 @@ pass_in_v_or_stack (struct gdbarch *gdba
 		    struct regcache *regcache,
 		    struct aarch64_call_info *info,
 		    struct type *type,
-		    const bfd_byte *buf)
+		    struct value *arg)
 {
-  if (!pass_in_v (gdbarch, regcache, info, buf))
-    pass_on_stack (info, type, buf);
+  if (!pass_in_v (gdbarch, regcache, info, TYPE_LENGTH (type),
+		  value_contents (arg)))
+    pass_on_stack (info, type, arg);
 }
 
 /* Implement the "push_dummy_call" gdbarch method.  */
@@ -1507,10 +1386,7 @@ aarch64_push_dummy_call (struct gdbarch 
 			 struct value **args, CORE_ADDR sp, int struct_return,
 			 CORE_ADDR struct_addr)
 {
-  int nstack = 0;
   int argnum;
-  int x_argreg;
-  int v_argreg;
   struct aarch64_call_info info;
   struct type *func_type;
   struct type *return_type;
@@ -1574,11 +1450,12 @@ aarch64_push_dummy_call (struct gdbarch 
   if (struct_return || lang_struct_return)
     {
       if (aarch64_debug)
-	fprintf_unfiltered (gdb_stdlog, "struct return in %s = 0x%s\n",
-			    gdbarch_register_name
-			    (gdbarch,
-			     AARCH64_STRUCT_RETURN_REGNUM),
-			    paddress (gdbarch, struct_addr));
+	{
+	  debug_printf ("struct return in %s = 0x%s\n",
+			gdbarch_register_name (gdbarch,
+					       AARCH64_STRUCT_RETURN_REGNUM),
+			paddress (gdbarch, struct_addr));
+	}
       regcache_cooked_write_unsigned (regcache, AARCH64_STRUCT_RETURN_REGNUM,
 				      struct_addr);
     }
@@ -1608,8 +1485,7 @@ aarch64_push_dummy_call (struct gdbarch 
 		arg_type = builtin_type (gdbarch)->builtin_int32;
 	      arg = value_cast (arg_type, arg);
 	    }
-	  pass_in_x_or_stack (gdbarch, regcache, &info, arg_type,
-			      value_contents (arg));
+	  pass_in_x_or_stack (gdbarch, regcache, &info, arg_type, arg);
 	  break;
 
 	case TYPE_CODE_COMPLEX:
@@ -1619,25 +1495,26 @@ aarch64_push_dummy_call (struct gdbarch 
 	      struct type *target_type =
 		check_typedef (TYPE_TARGET_TYPE (arg_type));
 
-	      pass_in_v (gdbarch, regcache, &info, buf);
 	      pass_in_v (gdbarch, regcache, &info,
+			 TYPE_LENGTH (target_type), buf);
+	      pass_in_v (gdbarch, regcache, &info,
+			 TYPE_LENGTH (target_type),
 			 buf + TYPE_LENGTH (target_type));
 	    }
 	  else
 	    {
 	      info.nsrn = 8;
-	      pass_on_stack (&info, arg_type, value_contents (arg));
+	      pass_on_stack (&info, arg_type, arg);
 	    }
 	  break;
 	case TYPE_CODE_FLT:
-	  pass_in_v_or_stack (gdbarch, regcache, &info, arg_type,
-			      value_contents (arg));
+	  pass_in_v_or_stack (gdbarch, regcache, &info, arg_type, arg);
 	  break;
 
 	case TYPE_CODE_STRUCT:
 	case TYPE_CODE_ARRAY:
 	case TYPE_CODE_UNION:
-	  if (is_hfa (arg_type))
+	  if (is_hfa_or_hva (arg_type))
 	    {
 	      int elements = TYPE_NFIELDS (arg_type);
 
@@ -1656,16 +1533,22 @@ aarch64_push_dummy_call (struct gdbarch 
 		      struct type *field_type =
 			check_typedef (value_type (field));
 
-		      pass_in_v_or_stack (gdbarch, regcache, &info, field_type,
-					  value_contents_writeable (field));
+		      pass_in_v_or_stack (gdbarch, regcache, &info,
+					  field_type, field);
 		    }
 		}
 	      else
 		{
 		  info.nsrn = 8;
-		  pass_on_stack (&info, arg_type, value_contents (arg));
+		  pass_on_stack (&info, arg_type, arg);
 		}
 	    }
+	  else if (TYPE_CODE (arg_type) == TYPE_CODE_ARRAY
+		   && TYPE_VECTOR (arg_type) && (len == 16 || len == 8))
+	    {
+	      /* Short vector types are passed in V registers.  */
+	      pass_in_v_or_stack (gdbarch, regcache, &info, arg_type, arg);
+	    }
 	  else if (len > 16)
 	    {
 	      /* PCS B.7 Aggregates larger than 16 bytes are passed by
@@ -1680,18 +1563,15 @@ aarch64_push_dummy_call (struct gdbarch 
 	      /* Construct the indirection.  */
 	      arg_type = lookup_pointer_type (arg_type);
 	      arg = value_from_pointer (arg_type, sp);
-	      pass_in_x_or_stack (gdbarch, regcache, &info, arg_type,
-				  value_contents (arg));
+	      pass_in_x_or_stack (gdbarch, regcache, &info, arg_type, arg);
 	    }
 	  else
 	    /* PCS C.15 / C.18 multiple values pass.  */
-	    pass_in_x_or_stack (gdbarch, regcache, &info, arg_type,
-				value_contents (arg));
+	    pass_in_x_or_stack (gdbarch, regcache, &info, arg_type, arg);
 	  break;
 
 	default:
-	  pass_in_x_or_stack (gdbarch, regcache, &info, arg_type,
-			      value_contents (arg));
+	  pass_in_x_or_stack (gdbarch, regcache, &info, arg_type, arg);
 	  break;
 	}
     }
@@ -1705,7 +1585,8 @@ aarch64_push_dummy_call (struct gdbarch 
       stack_item_t *si = VEC_last (stack_item_t, info.si);
 
       sp -= si->len;
-      write_memory (sp, si->data, si->len);
+      if (si->data != NULL)
+	write_memory (sp, si->data, si->len);
       VEC_pop (stack_item_t, info.si);
     }
 
@@ -1897,19 +1778,9 @@ aarch64_gdb_print_insn (bfd_vma memaddr,
 /* AArch64 BRK software debug mode instruction.
    Note that AArch64 code is always little-endian.
    1101.0100.0010.0000.0000.0000.0000.0000 = 0xd4200000.  */
-static const gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
-
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
-
-static const gdb_byte *
-aarch64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			    int *lenptr)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+constexpr gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
 
-  *lenptr = sizeof (aarch64_default_breakpoint);
-  return aarch64_default_breakpoint;
-}
+typedef BP_MANIPULATION (aarch64_default_breakpoint) aarch64_breakpoint;
 
 /* Extract from an array REGS containing the (raw) register state a
    function return value of type TYPE, and copy that, in virtual
@@ -1970,7 +1841,7 @@ aarch64_extract_return_value (struct typ
       memcpy (valbuf, buf, len);
       valbuf += len;
     }
-  else if (is_hfa (type))
+  else if (is_hfa_or_hva (type))
     {
       int elements = TYPE_NFIELDS (type);
       struct type *member_type = check_typedef (TYPE_FIELD_TYPE (type, 0));
@@ -1980,19 +1851,29 @@ aarch64_extract_return_value (struct typ
       for (i = 0; i < elements; i++)
 	{
 	  int regno = AARCH64_V0_REGNUM + i;
-	  bfd_byte buf[X_REGISTER_SIZE];
+	  bfd_byte buf[V_REGISTER_SIZE];
 
 	  if (aarch64_debug)
-	    fprintf_unfiltered (gdb_stdlog,
-				"read HFA return value element %d from %s\n",
-				i + 1,
-				gdbarch_register_name (gdbarch, regno));
+	    {
+	      debug_printf ("read HFA or HVA return value element %d from %s\n",
+			    i + 1,
+			    gdbarch_register_name (gdbarch, regno));
+	    }
 	  regcache_cooked_read (regs, regno, buf);
 
 	  memcpy (valbuf, buf, len);
 	  valbuf += len;
 	}
     }
+  else if (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
+	   && (TYPE_LENGTH (type) == 16 || TYPE_LENGTH (type) == 8))
+    {
+      /* Short vector is returned in V register.  */
+      gdb_byte buf[V_REGISTER_SIZE];
+
+      regcache_cooked_read (regs, AARCH64_V0_REGNUM, buf);
+      memcpy (valbuf, buf, TYPE_LENGTH (type));
+    }
   else
     {
       /* For a structure or union the behaviour is as if the value had
@@ -2020,19 +1901,12 @@ aarch64_extract_return_value (struct typ
 static int
 aarch64_return_in_memory (struct gdbarch *gdbarch, struct type *type)
 {
-  int nRc;
-  enum type_code code;
+  type = check_typedef (type);
 
-  CHECK_TYPEDEF (type);
-
-  /* In the AArch64 ABI, "integer" like aggregate types are returned
-     in registers.  For an aggregate type to be integer like, its size
-     must be less than or equal to 4 * X_REGISTER_SIZE.  */
-
-  if (is_hfa (type))
+  if (is_hfa_or_hva (type))
     {
-      /* PCS B.5 If the argument is a Named HFA, then the argument is
-         used unmodified.  */
+      /* v0-v7 are used to return values and one register is allocated
+	 for one member.  However, HFA or HVA has at most four members.  */
       return 0;
     }
 
@@ -2098,7 +1972,7 @@ aarch64_store_return_value (struct type 
 	    }
 	}
     }
-  else if (is_hfa (type))
+  else if (is_hfa_or_hva (type))
     {
       int elements = TYPE_NFIELDS (type);
       struct type *member_type = check_typedef (TYPE_FIELD_TYPE (type, 0));
@@ -2111,16 +1985,26 @@ aarch64_store_return_value (struct type 
 	  bfd_byte tmpbuf[MAX_REGISTER_SIZE];
 
 	  if (aarch64_debug)
-	    fprintf_unfiltered (gdb_stdlog,
-				"write HFA return value element %d to %s\n",
-				i + 1,
-				gdbarch_register_name (gdbarch, regno));
+	    {
+	      debug_printf ("write HFA or HVA return value element %d to %s\n",
+			    i + 1,
+			    gdbarch_register_name (gdbarch, regno));
+	    }
 
 	  memcpy (tmpbuf, valbuf, len);
 	  regcache_cooked_write (regs, regno, tmpbuf);
 	  valbuf += len;
 	}
     }
+  else if (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
+	   && (TYPE_LENGTH (type) == 8 || TYPE_LENGTH (type) == 16))
+    {
+      /* Short vector.  */
+      gdb_byte buf[V_REGISTER_SIZE];
+
+      memcpy (buf, valbuf, TYPE_LENGTH (type));
+      regcache_cooked_write (regs, AARCH64_V0_REGNUM, buf);
+    }
   else
     {
       /* For a structure or union the behaviour is as if the value had
@@ -2148,7 +2032,6 @@ aarch64_return_value (struct gdbarch *gd
 		      struct type *valtype, struct regcache *regcache,
 		      gdb_byte *readbuf, const gdb_byte *writebuf)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
       || TYPE_CODE (valtype) == TYPE_CODE_UNION
@@ -2157,7 +2040,7 @@ aarch64_return_value (struct gdbarch *gd
       if (aarch64_return_in_memory (gdbarch, valtype))
 	{
 	  if (aarch64_debug)
-	    fprintf_unfiltered (gdb_stdlog, "return value in memory\n");
+	    debug_printf ("return value in memory\n");
 	  return RETURN_VALUE_STRUCT_CONVENTION;
 	}
     }
@@ -2169,7 +2052,7 @@ aarch64_return_value (struct gdbarch *gd
     aarch64_extract_return_value (valtype, regcache, readbuf);
 
   if (aarch64_debug)
-    fprintf_unfiltered (gdb_stdlog, "return value in registers\n");
+    debug_printf ("return value in registers\n");
 
   return RETURN_VALUE_REGISTER_CONVENTION;
 }
@@ -2194,6 +2077,18 @@ aarch64_get_longjmp_target (struct frame
   *pc = extract_unsigned_integer (buf, X_REGISTER_SIZE, byte_order);
   return 1;
 }
+
+/* Implement the "gen_return_address" gdbarch method.  */
+
+static void
+aarch64_gen_return_address (struct gdbarch *gdbarch,
+			    struct agent_expr *ax, struct axs_value *value,
+			    CORE_ADDR scope)
+{
+  value->type = register_type (gdbarch, AARCH64_LR_REGNUM);
+  value->kind = axs_lvalue_register;
+  value->u.reg = AARCH64_LR_REGNUM;
+}
 
 
 /* Return the pseudo register name corresponding to register regnum.  */
@@ -2389,7 +2284,11 @@ aarch64_pseudo_read_value (struct gdbarc
 
       v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_S0_REGNUM;
       status = regcache_raw_read (regcache, v_regnum, reg_buf);
-      memcpy (buf, reg_buf, S_REGISTER_SIZE);
+      if (status != REG_VALID)
+	mark_value_bytes_unavailable (result_value, 0,
+				      TYPE_LENGTH (value_type (result_value)));
+      else
+	memcpy (buf, reg_buf, S_REGISTER_SIZE);
       return result_value;
     }
 
@@ -2504,7 +2403,7 @@ aarch64_pseudo_write (struct gdbarch *gd
 static struct value *
 value_of_aarch64_user_reg (struct frame_info *frame, const void *baton)
 {
-  const int *reg_p = baton;
+  const int *reg_p = (const int *) baton;
 
   return value_of_register (*reg_p, frame);
 }
@@ -2513,15 +2412,14 @@ value_of_aarch64_user_reg (struct frame_
 /* Implement the "software_single_step" gdbarch method, needed to
    single step through atomic sequences on AArch64.  */
 
-static int
-aarch64_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+aarch64_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   const int insn_size = 4;
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
-  CORE_ADDR pc = get_frame_pc (frame);
+  CORE_ADDR pc = regcache_read_pc (regcache);
   CORE_ADDR breaks[2] = { -1, -1 };
   CORE_ADDR loc = pc;
   CORE_ADDR closing_insn = 0;
@@ -2531,35 +2429,41 @@ aarch64_software_single_step (struct fra
   int insn_count;
   int bc_insn_count = 0; /* Conditional branch instruction count.  */
   int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */
+  aarch64_inst inst;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  if (aarch64_decode_insn (insn, &inst, 1) != 0)
+    return NULL;
 
   /* Look for a Load Exclusive instruction which begins the sequence.  */
-  if (!decode_masked_match (insn, 0x3fc00000, 0x08400000))
-    return 0;
+  if (inst.opcode->iclass != ldstexcl || bit (insn, 22) == 0)
+    return NULL;
 
   for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
     {
-      int32_t offset;
-      unsigned cond;
-
       loc += insn_size;
       insn = read_memory_unsigned_integer (loc, insn_size,
 					   byte_order_for_code);
 
+      if (aarch64_decode_insn (insn, &inst, 1) != 0)
+	return NULL;
       /* Check if the instruction is a conditional branch.  */
-      if (decode_bcond (loc, insn, &cond, &offset))
+      if (inst.opcode->iclass == condbranch)
 	{
+	  gdb_assert (inst.operands[0].type == AARCH64_OPND_ADDR_PCREL19);
+
 	  if (bc_insn_count >= 1)
-	    return 0;
+	    return NULL;
 
 	  /* It is, so we'll try to set a breakpoint at the destination.  */
-	  breaks[1] = loc + offset;
+	  breaks[1] = loc + inst.operands[0].imm.value;
 
 	  bc_insn_count++;
 	  last_breakpoint++;
 	}
 
       /* Look for the Store Exclusive which closes the atomic sequence.  */
-      if (decode_masked_match (insn, 0x3fc00000, 0x08000000))
+      if (inst.opcode->iclass == ldstexcl && bit (insn, 22) == 0)
 	{
 	  closing_insn = loc;
 	  break;
@@ -2568,7 +2472,7 @@ aarch64_software_single_step (struct fra
 
   /* We didn't find a closing Store Exclusive instruction, fall back.  */
   if (!closing_insn)
-    return 0;
+    return NULL;
 
   /* Insert breakpoint after the end of the atomic sequence.  */
   breaks[0] = loc + insn_size;
@@ -2583,8 +2487,347 @@ aarch64_software_single_step (struct fra
   /* Insert the breakpoint at the end of the sequence, and one at the
      destination of the conditional branch, if it exists.  */
   for (index = 0; index <= last_breakpoint; index++)
-    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
+
+  return next_pcs;
+}
+
+struct displaced_step_closure
+{
+  /* It is true when condition instruction, such as B.CON, TBZ, etc,
+     is being displaced stepping.  */
+  int cond;
+
+  /* PC adjustment offset after displaced stepping.  */
+  int32_t pc_adjust;
+};
+
+/* Data when visiting instructions for displaced stepping.  */
+
+struct aarch64_displaced_step_data
+{
+  struct aarch64_insn_data base;
+
+  /* The address where the instruction will be executed at.  */
+  CORE_ADDR new_addr;
+  /* Buffer of instructions to be copied to NEW_ADDR to execute.  */
+  uint32_t insn_buf[DISPLACED_MODIFIED_INSNS];
+  /* Number of instructions in INSN_BUF.  */
+  unsigned insn_count;
+  /* Registers when doing displaced stepping.  */
+  struct regcache *regs;
+
+  struct displaced_step_closure *dsc;
+};
+
+/* Implementation of aarch64_insn_visitor method "b".  */
+
+static void
+aarch64_displaced_step_b (const int is_bl, const int32_t offset,
+			  struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+  int64_t new_offset = data->insn_addr - dsd->new_addr + offset;
+
+  if (can_encode_int32 (new_offset, 28))
+    {
+      /* Emit B rather than BL, because executing BL on a new address
+	 will get the wrong address into LR.  In order to avoid this,
+	 we emit B, and update LR if the instruction is BL.  */
+      emit_b (dsd->insn_buf, 0, new_offset);
+      dsd->insn_count++;
+    }
+  else
+    {
+      /* Write NOP.  */
+      emit_nop (dsd->insn_buf);
+      dsd->insn_count++;
+      dsd->dsc->pc_adjust = offset;
+    }
+
+  if (is_bl)
+    {
+      /* Update LR.  */
+      regcache_cooked_write_unsigned (dsd->regs, AARCH64_LR_REGNUM,
+				      data->insn_addr + 4);
+    }
+}
+
+/* Implementation of aarch64_insn_visitor method "b_cond".  */
+
+static void
+aarch64_displaced_step_b_cond (const unsigned cond, const int32_t offset,
+			       struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+
+  /* GDB has to fix up PC after displaced step this instruction
+     differently according to the condition is true or false.  Instead
+     of checking COND against conditional flags, we can use
+     the following instructions, and GDB can tell how to fix up PC
+     according to the PC value.
+
+     B.COND TAKEN    ; If cond is true, then jump to TAKEN.
+     INSN1     ;
+     TAKEN:
+     INSN2
+  */
+
+  emit_bcond (dsd->insn_buf, cond, 8);
+  dsd->dsc->cond = 1;
+  dsd->dsc->pc_adjust = offset;
+  dsd->insn_count = 1;
+}
+
+/* Dynamically allocate a new register.  If we know the register
+   statically, we should make it a global as above instead of using this
+   helper function.  */
+
+static struct aarch64_register
+aarch64_register (unsigned num, int is64)
+{
+  return (struct aarch64_register) { num, is64 };
+}
+
+/* Implementation of aarch64_insn_visitor method "cb".  */
+
+static void
+aarch64_displaced_step_cb (const int32_t offset, const int is_cbnz,
+			   const unsigned rn, int is64,
+			   struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+
+  /* The offset is out of range for a compare and branch
+     instruction.  We can use the following instructions instead:
+
+	 CBZ xn, TAKEN   ; xn == 0, then jump to TAKEN.
+	 INSN1     ;
+	 TAKEN:
+	 INSN2
+  */
+  emit_cb (dsd->insn_buf, is_cbnz, aarch64_register (rn, is64), 8);
+  dsd->insn_count = 1;
+  dsd->dsc->cond = 1;
+  dsd->dsc->pc_adjust = offset;
+}
+
+/* Implementation of aarch64_insn_visitor method "tb".  */
+
+static void
+aarch64_displaced_step_tb (const int32_t offset, int is_tbnz,
+			   const unsigned rt, unsigned bit,
+			   struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+
+  /* The offset is out of range for a test bit and branch
+     instruction We can use the following instructions instead:
+
+     TBZ xn, #bit, TAKEN ; xn[bit] == 0, then jump to TAKEN.
+     INSN1         ;
+     TAKEN:
+     INSN2
+
+  */
+  emit_tb (dsd->insn_buf, is_tbnz, bit, aarch64_register (rt, 1), 8);
+  dsd->insn_count = 1;
+  dsd->dsc->cond = 1;
+  dsd->dsc->pc_adjust = offset;
+}
+
+/* Implementation of aarch64_insn_visitor method "adr".  */
+
+static void
+aarch64_displaced_step_adr (const int32_t offset, const unsigned rd,
+			    const int is_adrp, struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+  /* We know exactly the address the ADR{P,} instruction will compute.
+     We can just write it to the destination register.  */
+  CORE_ADDR address = data->insn_addr + offset;
+
+  if (is_adrp)
+    {
+      /* Clear the lower 12 bits of the offset to get the 4K page.  */
+      regcache_cooked_write_unsigned (dsd->regs, AARCH64_X0_REGNUM + rd,
+				      address & ~0xfff);
+    }
+  else
+      regcache_cooked_write_unsigned (dsd->regs, AARCH64_X0_REGNUM + rd,
+				      address);
+
+  dsd->dsc->pc_adjust = 4;
+  emit_nop (dsd->insn_buf);
+  dsd->insn_count = 1;
+}
+
+/* Implementation of aarch64_insn_visitor method "ldr_literal".  */
+
+static void
+aarch64_displaced_step_ldr_literal (const int32_t offset, const int is_sw,
+				    const unsigned rt, const int is64,
+				    struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+  CORE_ADDR address = data->insn_addr + offset;
+  struct aarch64_memory_operand zero = { MEMORY_OPERAND_OFFSET, 0 };
+
+  regcache_cooked_write_unsigned (dsd->regs, AARCH64_X0_REGNUM + rt,
+				  address);
+
+  if (is_sw)
+    dsd->insn_count = emit_ldrsw (dsd->insn_buf, aarch64_register (rt, 1),
+				  aarch64_register (rt, 1), zero);
+  else
+    dsd->insn_count = emit_ldr (dsd->insn_buf, aarch64_register (rt, is64),
+				aarch64_register (rt, 1), zero);
+
+  dsd->dsc->pc_adjust = 4;
+}
+
+/* Implementation of aarch64_insn_visitor method "others".  */
+
+static void
+aarch64_displaced_step_others (const uint32_t insn,
+			       struct aarch64_insn_data *data)
+{
+  struct aarch64_displaced_step_data *dsd
+    = (struct aarch64_displaced_step_data *) data;
+
+  aarch64_emit_insn (dsd->insn_buf, insn);
+  dsd->insn_count = 1;
+
+  if ((insn & 0xfffffc1f) == 0xd65f0000)
+    {
+      /* RET */
+      dsd->dsc->pc_adjust = 0;
+    }
+  else
+    dsd->dsc->pc_adjust = 4;
+}
+
+static const struct aarch64_insn_visitor visitor =
+{
+  aarch64_displaced_step_b,
+  aarch64_displaced_step_b_cond,
+  aarch64_displaced_step_cb,
+  aarch64_displaced_step_tb,
+  aarch64_displaced_step_adr,
+  aarch64_displaced_step_ldr_literal,
+  aarch64_displaced_step_others,
+};
+
+/* Implement the "displaced_step_copy_insn" gdbarch method.  */
+
+struct displaced_step_closure *
+aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch,
+				  CORE_ADDR from, CORE_ADDR to,
+				  struct regcache *regs)
+{
+  struct displaced_step_closure *dsc = NULL;
+  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
+  uint32_t insn = read_memory_unsigned_integer (from, 4, byte_order_for_code);
+  struct aarch64_displaced_step_data dsd;
+  aarch64_inst inst;
+
+  if (aarch64_decode_insn (insn, &inst, 1) != 0)
+    return NULL;
+
+  /* Look for a Load Exclusive instruction which begins the sequence.  */
+  if (inst.opcode->iclass == ldstexcl && bit (insn, 22))
+    {
+      /* We can't displaced step atomic sequences.  */
+      return NULL;
+    }
+
+  dsc = XCNEW (struct displaced_step_closure);
+  dsd.base.insn_addr = from;
+  dsd.new_addr = to;
+  dsd.regs = regs;
+  dsd.dsc = dsc;
+  dsd.insn_count = 0;
+  aarch64_relocate_instruction (insn, &visitor,
+				(struct aarch64_insn_data *) &dsd);
+  gdb_assert (dsd.insn_count <= DISPLACED_MODIFIED_INSNS);
+
+  if (dsd.insn_count != 0)
+    {
+      int i;
+
+      /* Instruction can be relocated to scratch pad.  Copy
+	 relocated instruction(s) there.  */
+      for (i = 0; i < dsd.insn_count; i++)
+	{
+	  if (debug_displaced)
+	    {
+	      debug_printf ("displaced: writing insn ");
+	      debug_printf ("%.8x", dsd.insn_buf[i]);
+	      debug_printf (" at %s\n", paddress (gdbarch, to + i * 4));
+	    }
+	  write_memory_unsigned_integer (to + i * 4, 4, byte_order_for_code,
+					 (ULONGEST) dsd.insn_buf[i]);
+	}
+    }
+  else
+    {
+      xfree (dsc);
+      dsc = NULL;
+    }
+
+  return dsc;
+}
+
+/* Implement the "displaced_step_fixup" gdbarch method.  */
+
+void
+aarch64_displaced_step_fixup (struct gdbarch *gdbarch,
+			      struct displaced_step_closure *dsc,
+			      CORE_ADDR from, CORE_ADDR to,
+			      struct regcache *regs)
+{
+  if (dsc->cond)
+    {
+      ULONGEST pc;
+
+      regcache_cooked_read_unsigned (regs, AARCH64_PC_REGNUM, &pc);
+      if (pc - to == 8)
+	{
+	  /* Condition is true.  */
+	}
+      else if (pc - to == 4)
+	{
+	  /* Condition is false.  */
+	  dsc->pc_adjust = 4;
+	}
+      else
+	gdb_assert_not_reached ("Unexpected PC value after displaced stepping");
+    }
+
+  if (dsc->pc_adjust != 0)
+    {
+      if (debug_displaced)
+	{
+	  debug_printf ("displaced: fixup: set PC to %s:%d\n",
+			paddress (gdbarch, from), dsc->pc_adjust);
+	}
+      regcache_cooked_write_unsigned (regs, AARCH64_PC_REGNUM,
+				      from + dsc->pc_adjust);
+    }
+}
 
+/* Implement the "displaced_step_hw_singlestep" gdbarch method.  */
+
+int
+aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
+				      struct displaced_step_closure *closure)
+{
   return 1;
 }
 
@@ -2604,7 +2847,6 @@ aarch64_gdbarch_init (struct gdbarch_inf
   struct tdesc_arch_data *tdesc_data = NULL;
   const struct target_desc *tdesc = info.target_desc;
   int i;
-  int have_fpa_registers = 1;
   int valid_p = 1;
   const struct tdesc_feature *feature;
   int num_regs = 0;
@@ -2677,7 +2919,7 @@ aarch64_gdbarch_init (struct gdbarch_inf
       return best_arch->gdbarch;
     }
 
-  tdep = xcalloc (1, sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* This should be low enough for everything.  */
@@ -2700,7 +2942,10 @@ aarch64_gdbarch_init (struct gdbarch_inf
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Breakpoint manipulation.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, aarch64_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       aarch64_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       aarch64_breakpoint::bp_from_kind);
   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
   set_gdbarch_software_single_step (gdbarch, aarch64_software_single_step);
 
@@ -2763,6 +3008,8 @@ aarch64_gdbarch_init (struct gdbarch_inf
   if (tdep->jb_pc >= 0)
     set_gdbarch_get_longjmp_target (gdbarch, aarch64_get_longjmp_target);
 
+  set_gdbarch_gen_return_address (gdbarch, aarch64_gen_return_address);
+
   tdesc_use_registers (gdbarch, tdesc, tdesc_data);
 
   /* Add standard register aliases.  */
@@ -2805,14 +3052,14 @@ When on, AArch64 specific debugging is e
 			    NULL,
 			    show_aarch64_debug,
 			    &setdebuglist, &showdebuglist);
+
+#if GDB_SELF_TEST
+  register_self_test (selftests::aarch64_analyze_prologue_test);
+#endif
 }
 
 /* AArch64 process record-replay related structures, defines etc.  */
 
-#define submask(x) ((1L << ((x) + 1)) - 1)
-#define bit(obj,st) (((obj) >> (st)) & 1)
-#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st)))
-
 #define REG_ALLOC(REGS, LENGTH, RECORD_BUF) \
         do  \
           { \
@@ -2947,11 +3194,10 @@ aarch64_record_data_proc_reg (insn_decod
 static unsigned int
 aarch64_record_data_proc_imm (insn_decode_record *aarch64_insn_r)
 {
-  uint8_t reg_rd, insn_bit28, insn_bit23, insn_bits24_27, setflags;
+  uint8_t reg_rd, insn_bit23, insn_bits24_27, setflags;
   uint32_t record_buf[4];
 
   reg_rd = bits (aarch64_insn_r->aarch64_insn, 0, 4);
-  insn_bit28 = bit (aarch64_insn_r->aarch64_insn, 28);
   insn_bit23 = bit (aarch64_insn_r->aarch64_insn, 23);
   insn_bits24_27 = bits (aarch64_insn_r->aarch64_insn, 24, 27);
 
@@ -3088,10 +3334,7 @@ aarch64_record_asimd_load_store (insn_de
   regcache_raw_read_unsigned (aarch64_insn_r->regcache, reg_rn, &address);
 
   if (record_debug)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-			  "Process record: Advanced SIMD load/store\n");
-    }
+    debug_printf ("Process record: Advanced SIMD load/store\n");
 
   /* Load/store single structure.  */
   if (bit (aarch64_insn_r->aarch64_insn, 24))
@@ -3139,15 +3382,17 @@ aarch64_record_asimd_load_store (insn_de
       else
         {
           for (sindex = 0; sindex < selem; sindex++)
-            if (bit (aarch64_insn_r->aarch64_insn, 22))
-              record_buf[reg_index++] = reg_rt + AARCH64_V0_REGNUM;
-            else
-              {
-                record_buf_mem[mem_index++] = esize / 8;
-                record_buf_mem[mem_index++] = address + addr_offset;
-              }
-            addr_offset = addr_offset + (esize / 8);
-            reg_rt = (reg_rt + 1) % 32;
+	    {
+	      if (bit (aarch64_insn_r->aarch64_insn, 22))
+		record_buf[reg_index++] = reg_rt + AARCH64_V0_REGNUM;
+	      else
+		{
+		  record_buf_mem[mem_index++] = esize / 8;
+		  record_buf_mem[mem_index++] = address + addr_offset;
+		}
+	      addr_offset = addr_offset + (esize / 8);
+	      reg_rt = (reg_rt + 1) % 32;
+	    }
         }
     }
   /* Load/store multiple structure.  */
@@ -3265,10 +3510,7 @@ aarch64_record_load_store (insn_decode_r
   if (insn_bits24_27 == 0x08 && insn_bits28_29 == 0x00)
     {
       if (record_debug)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load/store exclusive\n");
-	}
+	debug_printf ("Process record: load/store exclusive\n");
 
       if (ld_flag)
 	{
@@ -3303,10 +3545,7 @@ aarch64_record_load_store (insn_decode_r
   else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x01)
     {
       if (record_debug)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load register (literal)\n");
-	}
+	debug_printf ("Process record: load register (literal)\n");
       if (vector_flag)
         record_buf[0] = reg_rt + AARCH64_V0_REGNUM;
       else
@@ -3317,10 +3556,7 @@ aarch64_record_load_store (insn_decode_r
   else if ((insn_bits24_27 & 0x0a) == 0x08 && insn_bits28_29 == 0x02)
     {
       if (record_debug)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load/store pair\n");
-	}
+	debug_printf ("Process record: load/store pair\n");
 
       if (ld_flag)
         {
@@ -3381,10 +3617,9 @@ aarch64_record_load_store (insn_decode_r
 
       if (record_debug)
 	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load/store (unsigned immediate):"
-			      " size %x V %d opc %x\n", size_bits, vector_flag,
-			      opc);
+	  debug_printf ("Process record: load/store (unsigned immediate):"
+			" size %x V %d opc %x\n", size_bits, vector_flag,
+			opc);
 	}
 
       if (!ld_flag)
@@ -3414,10 +3649,7 @@ aarch64_record_load_store (insn_decode_r
 	   && insn_bits10_11 == 0x02 && insn_bit21)
     {
       if (record_debug)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load/store (register offset)\n");
-	}
+	debug_printf ("Process record: load/store (register offset)\n");
       opc = bits (aarch64_insn_r->aarch64_insn, 22, 23);
       if (!(opc >> 1))
         if (opc & 0x01)
@@ -3432,7 +3664,8 @@ aarch64_record_load_store (insn_decode_r
 
       if (!ld_flag)
         {
-          uint64_t reg_rm_val;
+          ULONGEST reg_rm_val;
+
           regcache_raw_read_unsigned (aarch64_insn_r->regcache,
                      bits (aarch64_insn_r->aarch64_insn, 16, 20), &reg_rm_val);
           if (bit (aarch64_insn_r->aarch64_insn, 12))
@@ -3462,8 +3695,8 @@ aarch64_record_load_store (insn_decode_r
     {
       if (record_debug)
 	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "Process record: load/store (immediate and unprivileged)\n");
+	  debug_printf ("Process record: load/store "
+			"(immediate and unprivileged)\n");
 	}
       opc = bits (aarch64_insn_r->aarch64_insn, 22, 23);
       if (!(opc >> 1))
@@ -3539,10 +3772,7 @@ aarch64_record_data_proc_simd_fp (insn_d
   insn_bit21 = bit (aarch64_insn_r->aarch64_insn, 21);
 
   if (record_debug)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-			  "Process record: data processing SIMD/FP: ");
-    }
+    debug_printf ("Process record: data processing SIMD/FP: ");
 
   if ((insn_bits28_31 & 0x05) == 0x01 && insn_bits24_27 == 0x0e)
     {
@@ -3550,7 +3780,7 @@ aarch64_record_data_proc_simd_fp (insn_d
       if (!insn_bit21)
 	{
 	  if (record_debug)
-	    fprintf_unfiltered (gdb_stdlog, "FP - fixed point conversion");
+	    debug_printf ("FP - fixed point conversion");
 
 	  if ((opcode >> 1) == 0x0 && rmode == 0x03)
 	    record_buf[0] = reg_rd;
@@ -3561,7 +3791,7 @@ aarch64_record_data_proc_simd_fp (insn_d
       else if (insn_bits10_11 == 0x01)
 	{
 	  if (record_debug)
-	    fprintf_unfiltered (gdb_stdlog, "FP - conditional compare");
+	    debug_printf ("FP - conditional compare");
 
 	  record_buf[0] = AARCH64_CPSR_REGNUM;
 	}
@@ -3570,7 +3800,7 @@ aarch64_record_data_proc_simd_fp (insn_d
       else if (insn_bits10_11 == 0x02 || insn_bits10_11 == 0x03)
 	{
 	  if (record_debug)
-	    fprintf_unfiltered (gdb_stdlog, "FP - DP (2-source)");
+	    debug_printf ("FP - DP (2-source)");
 
 	  record_buf[0] = reg_rd + AARCH64_V0_REGNUM;
 	}
@@ -3581,14 +3811,14 @@ aarch64_record_data_proc_simd_fp (insn_d
 	      || (insn_bits12_15 & 0x07) == 0x04)
 	    {
 	      if (record_debug)
-		fprintf_unfiltered (gdb_stdlog, "FP - immediate");
+		debug_printf ("FP - immediate");
 	      record_buf[0] = reg_rd + AARCH64_V0_REGNUM;
 	    }
 	  /* Floating point - compare instructions.  */
 	  else if ((insn_bits12_15 & 0x03) == 0x02)
 	    {
 	      if (record_debug)
-		fprintf_unfiltered (gdb_stdlog, "FP - immediate");
+		debug_printf ("FP - immediate");
 	      record_buf[0] = AARCH64_CPSR_REGNUM;
 	    }
 	  /* Floating point - integer conversions instructions.  */
@@ -3598,7 +3828,7 @@ aarch64_record_data_proc_simd_fp (insn_d
 	      if (!(opcode >> 1) || ((opcode >> 1) == 0x02 && !rmode))
 		{
 		  if (record_debug)
-		    fprintf_unfiltered (gdb_stdlog, "float to int conversion");
+		    debug_printf ("float to int conversion");
 
 		  record_buf[0] = reg_rd + AARCH64_X0_REGNUM;
 		}
@@ -3606,7 +3836,7 @@ aarch64_record_data_proc_simd_fp (insn_d
 	      else if ((opcode >> 1) == 0x01 && !rmode)
 		{
 		  if (record_debug)
-		    fprintf_unfiltered (gdb_stdlog, "int to float conversion");
+		    debug_printf ("int to float conversion");
 
 		  record_buf[0] = reg_rd + AARCH64_V0_REGNUM;
 		}
@@ -3614,7 +3844,7 @@ aarch64_record_data_proc_simd_fp (insn_d
 	      else if ((opcode >> 1) == 0x03)
 		{
 		  if (record_debug)
-		    fprintf_unfiltered (gdb_stdlog, "move float to int");
+		    debug_printf ("move float to int");
 
 		  if (!(opcode & 0x01))
 		    record_buf[0] = reg_rd + AARCH64_X0_REGNUM;
@@ -3633,7 +3863,7 @@ aarch64_record_data_proc_simd_fp (insn_d
   else if ((insn_bits28_31 & 0x09) == 0x00 && insn_bits24_27 == 0x0e)
     {
       if (record_debug)
-	fprintf_unfiltered (gdb_stdlog, "SIMD copy");
+	debug_printf ("SIMD copy");
 
       /* Advanced SIMD copy instructions.  */
       if (!bits (aarch64_insn_r->aarch64_insn, 21, 23)
@@ -3652,13 +3882,13 @@ aarch64_record_data_proc_simd_fp (insn_d
   else
     {
       if (record_debug)
-	fprintf_unfiltered (gdb_stdlog, "all remain");
+	debug_printf ("all remain");
 
       record_buf[0] = reg_rd + AARCH64_V0_REGNUM;
     }
 
   if (record_debug)
-    fprintf_unfiltered (gdb_stdlog, "\n");
+    debug_printf ("\n");
 
   aarch64_insn_r->reg_rec_count++;
   gdb_assert (aarch64_insn_r->reg_rec_count == 1);
@@ -3722,7 +3952,6 @@ aarch64_process_record (struct gdbarch *
   uint32_t rec_no = 0;
   uint8_t insn_size = 4;
   uint32_t ret = 0;
-  ULONGEST t_bit = 0, insn_id = 0;
   gdb_byte buf[insn_size];
   insn_decode_record aarch64_record;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-tdep.h ./gdb/aarch64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aarch64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aarch64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target dependent code for GDB on AArch64 systems.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
@@ -68,6 +68,12 @@ enum aarch64_regnum
 
 /* Total number of general (X) registers.  */
 #define AARCH64_X_REGISTER_COUNT 32
+/* Total number of D registers.  */
+#define AARCH64_D_REGISTER_COUNT 32
+
+/* The maximum number of modified instructions generated for one
+   single-stepped instruction.  */
+#define DISPLACED_MODIFIED_INSNS 1
 
 /* Target-dependent structure in gdbarch.  */
 struct gdbarch_tdep
@@ -98,4 +104,17 @@ extern struct target_desc *tdesc_aarch64
 extern int aarch64_process_record (struct gdbarch *gdbarch,
                                struct regcache *regcache, CORE_ADDR addr);
 
+struct displaced_step_closure *
+  aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch,
+				    CORE_ADDR from, CORE_ADDR to,
+				    struct regcache *regs);
+
+void aarch64_displaced_step_fixup (struct gdbarch *gdbarch,
+				   struct displaced_step_closure *dsc,
+				   CORE_ADDR from, CORE_ADDR to,
+				   struct regcache *regs);
+
+int aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
+					  struct displaced_step_closure *closure);
+
 #endif /* aarch64-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/acinclude.m4 ./gdb/acinclude.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/acinclude.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/acinclude.m4	2017-03-06 01:49:07.000000000 +0000
@@ -12,6 +12,9 @@ sinclude(libmcheck.m4)
 # This gets GDB_AC_TRANSFORM.
 sinclude(transform.m4)
 
+# This gets AM_GDB_WARNINGS.
+sinclude(warning.m4)
+
 dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
 sinclude(../bfd/bfd.m4)
 
@@ -53,6 +56,8 @@ sinclude([../config/lcmessage.m4])
 dnl For AM_LANGINFO_CODESET.
 sinclude([../config/codeset.m4])
 
+sinclude([../config/iconv.m4])
+
 sinclude([../config/zlib.m4])
 
 m4_include([common/common.m4])
@@ -60,15 +65,17 @@ m4_include([common/common.m4])
 dnl For libiberty_INIT.
 m4_include(libiberty.m4)
 
-dnl For --enable-build-with-cxx and COMPILER.
-m4_include(build-with-cxx.m4)
+dnl For GDB_AC_PTRACE.
+m4_include(ptrace.m4)
+
+m4_include(ax_cxx_compile_stdcxx.m4)
 
 ## ----------------------------------------- ##
 ## ANSIfy the C compiler whenever possible.  ##
 ## From Franc,ois Pinard                     ##
 ## ----------------------------------------- ##
 
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -171,131 +178,6 @@ case "x$am_cv_prog_cc_stdc" in
 esac
 ])
 
-dnl Originally from Bruno Haible, but with some modifications
-dnl for the GDB project.
-
-AC_DEFUN([AM_ICONV],
-[
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-
-  AC_ARG_WITH([libiconv-prefix],
-    AS_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in DIR/include and DIR/lib]), [
-    for dir in `echo "$withval" | tr : ' '`; do
-      if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
-      if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
-    done
-   ])
-
-  BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
-  BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
-
-  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    am_cv_use_build_libiconv=no
-    am_cv_build_libiconv_path=
-
-    # If libiconv is part of the build tree, then try using it over
-    # any system iconv.
-    if test -d ../libiconv; then
-      for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
-        am_save_LIBS="$LIBS"
-        am_save_CPPFLAGS="$CPPFLAGS"
-        LIBS="$LIBS $lib_dir/libiconv.a"
-        CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
-        AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-          [iconv_t cd = iconv_open("","");
-           iconv(cd,NULL,NULL,NULL,NULL);
-           iconv_close(cd);],
-          am_cv_use_build_libiconv=yes
-          am_cv_build_libiconv_path=$lib_dir/libiconv.a
-          am_cv_lib_iconv=yes
-          am_cv_func_iconv=yes)
-        LIBS="$am_save_LIBS"
-        CPPFLAGS="$am_save_CPPFLAGS"
-        if test "$am_cv_use_build_libiconv" = "yes"; then
-          break
-        fi
-      done
-    fi
-
-    # Next, try to find iconv in libc.
-    if test "$am_cv_func_iconv" != yes; then
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_func_iconv=yes)
-    fi
-
-    # If iconv was not in libc, try -liconv.  In this case, arrange to
-    # look in the libiconv prefix, if it was specified by the user.
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_CPPFLAGS="$CPPFLAGS"
-      am_save_LIBS="$LIBS"
-      if test -n "$LIBICONV_INCLUDE"; then
-        CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
-        LIBS="$LIBS $LIBICONV_LIBDIR"
-      fi
-      LIBS="$LIBS -liconv"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-      CPPFLAGS="$am_save_CPPFLAGS"
-    fi
-  ])
-
-  # Set the various flags based on the cache variables.  We can't rely
-  # on the flags to remain set from the above code, due to caching.
-  LIBICONV=
-  if test "$am_cv_lib_iconv" = yes; then
-    LIBICONV="-liconv"
-  else
-    LIBICONV_LIBDIR=
-    LIBICONV_INCLUDE=
-  fi
-  if test "$am_cv_use_build_libiconv" = yes; then
-    LIBICONV="$am_cv_build_libiconv_path"
-    LIBICONV_LIBDIR=""
-    LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
-  fi
-  CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
-  LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
-
-  if test "$am_cv_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-])
-
 dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva 
 dnl Version 1.3 (2001/03/02)
 dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/acx_configure_dir.m4 ./gdb/acx_configure_dir.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/acx_configure_dir.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/acx_configure_dir.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-exp.c ./gdb/ada-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/ada-exp.c	2017-03-06 01:53:00.000000000 +0000
@@ -86,61 +86,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  These are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
-   options.  I presume we are maintaining it to accommodate systems
-   without BISON?  (PNH) */
-
-#define	yymaxdepth ada_maxdepth
-/* ada_parse calls this after initialization */
-#define	yyparse	ada_parse_internal
-#define	yylex	ada_lex
-#define	yyerror	ada_error
-#define	yylval	ada_lval
-#define	yychar	ada_char
-#define	yydebug	ada_debug
-#define	yypact	ada_pact
-#define	yyr1	ada_r1
-#define	yyr2	ada_r2
-#define	yydef	ada_def
-#define	yychk	ada_chk
-#define	yypgo	ada_pgo
-#define	yyact	ada_act
-#define	yyexca	ada_exca
-#define yyerrflag ada_errflag
-#define yynerrs	ada_nerrs
-#define	yyps	ada_ps
-#define	yypv	ada_pv
-#define	yys	ada_s
-#define	yy_yys	ada_yys
-#define	yystate	ada_state
-#define	yytmp	ada_tmp
-#define	yyv	ada_v
-#define	yy_yyv	ada_yyv
-#define	yyval	ada_val
-#define	yylloc	ada_lloc
-#define yyreds	ada_reds		/* With YYDEBUG defined */
-#define yytoks	ada_toks		/* With YYDEBUG defined */
-#define yyname	ada_name		/* With YYDEBUG defined */
-#define yyrule	ada_rule		/* With YYDEBUG defined */
-#define yyss	ada_yyss
-#define yysslim	ada_yysslim
-#define yyssp	ada_yyssp
-#define yystacksize ada_yystacksize
-#define yyvs	ada_yyvs
-#define yyvsp	ada_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG	1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX ada_
+#include "yy-remap.h"
 
 struct name_info {
   struct symbol *sym;
@@ -208,7 +157,7 @@ static struct type *type_system_address 
 
 
 /* Line 189 of yacc.c  */
-#line 212 "ada-exp.c"
+#line 161 "ada-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -339,7 +288,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 175 "ada-exp.y"
+#line 124 "ada-exp.y"
 
     LONGEST lval;
     struct {
@@ -358,7 +307,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 362 "ada-exp.c"
+#line 311 "ada-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -370,7 +319,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 374 "ada-exp.c"
+#line 323 "ada-exp.c"
 
 #ifdef short
 # undef short
@@ -710,19 +659,19 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   240,   240,   244,   245,   247,   252,   256,   261,   267,
-     286,   286,   298,   302,   304,   312,   323,   333,   337,   340,
-     343,   347,   351,   355,   359,   362,   364,   366,   368,   372,
-     385,   389,   393,   397,   401,   405,   409,   413,   417,   421,
-     424,   428,   432,   436,   438,   443,   451,   455,   461,   472,
-     476,   480,   484,   485,   486,   487,   488,   489,   493,   495,
-     500,   502,   507,   509,   514,   516,   520,   522,   534,   536,
-     543,   546,   549,   552,   554,   556,   558,   560,   562,   564,
-     568,   570,   575,   585,   587,   594,   598,   606,   614,   618,
-     624,   626,   630,   634,   636,   638,   646,   657,   659,   664,
-     673,   674,   680,   685,   691,   700,   701,   702,   706,   711,
-     726,   725,   728,   731,   730,   737,   736,   739,   742,   741,
-     749,   751,   753
+       0,   189,   189,   193,   194,   196,   201,   205,   210,   216,
+     235,   235,   247,   251,   253,   261,   272,   282,   286,   289,
+     292,   296,   300,   304,   308,   311,   313,   315,   317,   321,
+     334,   338,   342,   346,   350,   354,   358,   362,   366,   370,
+     373,   377,   381,   385,   387,   392,   400,   404,   410,   421,
+     425,   429,   433,   434,   435,   436,   437,   438,   442,   444,
+     449,   451,   456,   458,   463,   465,   469,   471,   483,   485,
+     492,   495,   498,   501,   503,   505,   507,   509,   511,   513,
+     517,   519,   524,   534,   536,   543,   547,   555,   563,   567,
+     573,   575,   579,   583,   585,   587,   595,   606,   608,   613,
+     622,   623,   629,   634,   640,   649,   650,   651,   655,   660,
+     675,   674,   677,   680,   679,   686,   685,   688,   691,   690,
+     698,   700,   702
 };
 #endif
 
@@ -1891,28 +1840,28 @@ yyreduce:
         case 4:
 
 /* Line 1455 of yacc.c  */
-#line 246 "ada-exp.y"
+#line 195 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_COMMA); }
     break;
 
   case 5:
 
 /* Line 1455 of yacc.c  */
-#line 248 "ada-exp.y"
+#line 197 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 253 "ada-exp.y"
+#line 202 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 7:
 
 /* Line 1455 of yacc.c  */
-#line 257 "ada-exp.y"
+#line 206 "ada-exp.y"
     { write_exp_op_with_string (pstate, STRUCTOP_STRUCT,
 						    (yyvsp[(2) - (2)].sval)); }
     break;
@@ -1920,7 +1869,7 @@ yyreduce:
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 262 "ada-exp.y"
+#line 211 "ada-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate, (yyvsp[(3) - (4)].lval));
@@ -1931,7 +1880,7 @@ yyreduce:
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 268 "ada-exp.y"
+#line 217 "ada-exp.y"
     {
 			  if ((yyvsp[(1) - (4)].tval) != NULL)
 			    {
@@ -1953,14 +1902,14 @@ yyreduce:
   case 10:
 
 /* Line 1455 of yacc.c  */
-#line 286 "ada-exp.y"
+#line 235 "ada-exp.y"
     { type_qualifier = (yyvsp[(1) - (3)].tval); }
     break;
 
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 288 "ada-exp.y"
+#line 237 "ada-exp.y"
     {
 			  if ((yyvsp[(1) - (7)].tval) == NULL)
 			    error (_("Type required for qualification"));
@@ -1974,21 +1923,21 @@ yyreduce:
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 298 "ada-exp.y"
+#line 247 "ada-exp.y"
     { (yyval.tval) = type_qualifier; }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 303 "ada-exp.y"
+#line 252 "ada-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_SLICE); }
     break;
 
   case 14:
 
 /* Line 1455 of yacc.c  */
-#line 305 "ada-exp.y"
+#line 254 "ada-exp.y"
     { if ((yyvsp[(1) - (6)].tval) == NULL) 
                             write_exp_elt_opcode (pstate, TERNOP_SLICE);
 			  else
@@ -1999,14 +1948,14 @@ yyreduce:
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 312 "ada-exp.y"
+#line 261 "ada-exp.y"
     { }
     break;
 
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 324 "ada-exp.y"
+#line 273 "ada-exp.y"
     { if ((yyvsp[(1) - (1)].tval) != NULL)
 			    {
 			      write_exp_elt_opcode (pstate, OP_TYPE);
@@ -2019,77 +1968,77 @@ yyreduce:
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 334 "ada-exp.y"
+#line 283 "ada-exp.y"
     { write_dollar_variable (pstate, (yyvsp[(1) - (1)].sval)); }
     break;
 
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 344 "ada-exp.y"
+#line 293 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 348 "ada-exp.y"
+#line 297 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PLUS); }
     break;
 
   case 22:
 
 /* Line 1455 of yacc.c  */
-#line 352 "ada-exp.y"
+#line 301 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 356 "ada-exp.y"
+#line 305 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ABS); }
     break;
 
   case 24:
 
 /* Line 1455 of yacc.c  */
-#line 359 "ada-exp.y"
+#line 308 "ada-exp.y"
     { (yyval.lval) = 0; }
     break;
 
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 363 "ada-exp.y"
+#line 312 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 365 "ada-exp.y"
+#line 314 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 367 "ada-exp.y"
+#line 316 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1; }
     break;
 
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 369 "ada-exp.y"
+#line 318 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(1) - (5)].lval) + 1; }
     break;
 
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 374 "ada-exp.y"
+#line 323 "ada-exp.y"
     { 
 			  if ((yyvsp[(2) - (4)].tval) == NULL)
 			    error (_("Type required within braces in coercion"));
@@ -2102,98 +2051,98 @@ yyreduce:
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 386 "ada-exp.y"
+#line 335 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EXP); }
     break;
 
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 390 "ada-exp.y"
+#line 339 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 394 "ada-exp.y"
+#line 343 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 398 "ada-exp.y"
+#line 347 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 402 "ada-exp.y"
+#line 351 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MOD); }
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 406 "ada-exp.y"
+#line 355 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 410 "ada-exp.y"
+#line 359 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 414 "ada-exp.y"
+#line 363 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_CONCAT); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 418 "ada-exp.y"
+#line 367 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 425 "ada-exp.y"
+#line 374 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 41:
 
 /* Line 1455 of yacc.c  */
-#line 429 "ada-exp.y"
+#line 378 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 433 "ada-exp.y"
+#line 382 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 437 "ada-exp.y"
+#line 386 "ada-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_IN_RANGE); }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 439 "ada-exp.y"
+#line 388 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(5) - (5)].lval));
 			  write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
@@ -2203,7 +2152,7 @@ yyreduce:
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 444 "ada-exp.y"
+#line 393 "ada-exp.y"
     { 
 			  if ((yyvsp[(3) - (3)].tval) == NULL)
 			    error (_("Right operand of 'in' must be type"));
@@ -2216,7 +2165,7 @@ yyreduce:
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 452 "ada-exp.y"
+#line 401 "ada-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_IN_RANGE);
 		          write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT);
 			}
@@ -2225,7 +2174,7 @@ yyreduce:
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 456 "ada-exp.y"
+#line 405 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(6) - (6)].lval));
 			  write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
@@ -2236,7 +2185,7 @@ yyreduce:
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 462 "ada-exp.y"
+#line 411 "ada-exp.y"
     { 
 			  if ((yyvsp[(4) - (4)].tval) == NULL)
 			    error (_("Right operand of 'in' must be type"));
@@ -2250,105 +2199,105 @@ yyreduce:
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 473 "ada-exp.y"
+#line 422 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 477 "ada-exp.y"
+#line 426 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 481 "ada-exp.y"
+#line 430 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 494 "ada-exp.y"
+#line 443 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 496 "ada-exp.y"
+#line 445 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 501 "ada-exp.y"
+#line 450 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 503 "ada-exp.y"
+#line 452 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 508 "ada-exp.y"
+#line 457 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 63:
 
 /* Line 1455 of yacc.c  */
-#line 510 "ada-exp.y"
+#line 459 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 515 "ada-exp.y"
+#line 464 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 517 "ada-exp.y"
+#line 466 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 66:
 
 /* Line 1455 of yacc.c  */
-#line 521 "ada-exp.y"
+#line 470 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 67:
 
 /* Line 1455 of yacc.c  */
-#line 523 "ada-exp.y"
+#line 472 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 535 "ada-exp.y"
+#line 484 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 69:
 
 /* Line 1455 of yacc.c  */
-#line 537 "ada-exp.y"
+#line 486 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR);
 			  write_exp_elt_opcode (pstate, UNOP_CAST);
 			  write_exp_elt_type (pstate,
@@ -2360,7 +2309,7 @@ yyreduce:
   case 70:
 
 /* Line 1455 of yacc.c  */
-#line 544 "ada-exp.y"
+#line 493 "ada-exp.y"
     { write_int (pstate, (yyvsp[(3) - (3)].lval), type_int (pstate));
 			  write_exp_elt_opcode (pstate, OP_ATR_FIRST); }
     break;
@@ -2368,7 +2317,7 @@ yyreduce:
   case 71:
 
 /* Line 1455 of yacc.c  */
-#line 547 "ada-exp.y"
+#line 496 "ada-exp.y"
     { write_int (pstate, (yyvsp[(3) - (3)].lval), type_int (pstate));
 			  write_exp_elt_opcode (pstate, OP_ATR_LAST); }
     break;
@@ -2376,7 +2325,7 @@ yyreduce:
   case 72:
 
 /* Line 1455 of yacc.c  */
-#line 550 "ada-exp.y"
+#line 499 "ada-exp.y"
     { write_int (pstate, (yyvsp[(3) - (3)].lval), type_int (pstate));
 			  write_exp_elt_opcode (pstate, OP_ATR_LENGTH); }
     break;
@@ -2384,70 +2333,70 @@ yyreduce:
   case 73:
 
 /* Line 1455 of yacc.c  */
-#line 553 "ada-exp.y"
+#line 502 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_SIZE); }
     break;
 
   case 74:
 
 /* Line 1455 of yacc.c  */
-#line 555 "ada-exp.y"
+#line 504 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_TAG); }
     break;
 
   case 75:
 
 /* Line 1455 of yacc.c  */
-#line 557 "ada-exp.y"
+#line 506 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_MIN); }
     break;
 
   case 76:
 
 /* Line 1455 of yacc.c  */
-#line 559 "ada-exp.y"
+#line 508 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_MAX); }
     break;
 
   case 77:
 
 /* Line 1455 of yacc.c  */
-#line 561 "ada-exp.y"
+#line 510 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_POS); }
     break;
 
   case 78:
 
 /* Line 1455 of yacc.c  */
-#line 563 "ada-exp.y"
+#line 512 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_VAL); }
     break;
 
   case 79:
 
 /* Line 1455 of yacc.c  */
-#line 565 "ada-exp.y"
+#line 514 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_ATR_MODULUS); }
     break;
 
   case 80:
 
 /* Line 1455 of yacc.c  */
-#line 569 "ada-exp.y"
+#line 518 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 81:
 
 /* Line 1455 of yacc.c  */
-#line 571 "ada-exp.y"
+#line 520 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(2) - (3)].typed_val).val; }
     break;
 
   case 82:
 
 /* Line 1455 of yacc.c  */
-#line 576 "ada-exp.y"
+#line 525 "ada-exp.y"
     { 
 			  if ((yyvsp[(1) - (1)].tval) == NULL)
 			    error (_("Prefix must be type"));
@@ -2459,7 +2408,7 @@ yyreduce:
   case 84:
 
 /* Line 1455 of yacc.c  */
-#line 587 "ada-exp.y"
+#line 536 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 			  write_exp_elt_type (pstate,
 					  parse_type (pstate)->builtin_void);
@@ -2469,14 +2418,14 @@ yyreduce:
   case 85:
 
 /* Line 1455 of yacc.c  */
-#line 595 "ada-exp.y"
+#line 544 "ada-exp.y"
     { write_int (pstate, (LONGEST) (yyvsp[(1) - (1)].typed_val).val, (yyvsp[(1) - (1)].typed_val).type); }
     break;
 
   case 86:
 
 /* Line 1455 of yacc.c  */
-#line 599 "ada-exp.y"
+#line 548 "ada-exp.y"
     { write_int (pstate,
 			       convert_char_literal (type_qualifier, (yyvsp[(1) - (1)].typed_val).val),
 			       (type_qualifier == NULL) 
@@ -2487,7 +2436,7 @@ yyreduce:
   case 87:
 
 /* Line 1455 of yacc.c  */
-#line 607 "ada-exp.y"
+#line 556 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
 			  write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
@@ -2498,14 +2447,14 @@ yyreduce:
   case 88:
 
 /* Line 1455 of yacc.c  */
-#line 615 "ada-exp.y"
+#line 564 "ada-exp.y"
     { write_int (pstate, 0, type_int (pstate)); }
     break;
 
   case 89:
 
 /* Line 1455 of yacc.c  */
-#line 619 "ada-exp.y"
+#line 568 "ada-exp.y"
     { 
 			  write_exp_op_with_string (pstate, OP_STRING, (yyvsp[(1) - (1)].sval));
 			}
@@ -2514,42 +2463,42 @@ yyreduce:
   case 90:
 
 /* Line 1455 of yacc.c  */
-#line 625 "ada-exp.y"
+#line 574 "ada-exp.y"
     { write_int (pstate, 1, type_boolean (pstate)); }
     break;
 
   case 91:
 
 /* Line 1455 of yacc.c  */
-#line 627 "ada-exp.y"
+#line 576 "ada-exp.y"
     { write_int (pstate, 0, type_boolean (pstate)); }
     break;
 
   case 92:
 
 /* Line 1455 of yacc.c  */
-#line 631 "ada-exp.y"
+#line 580 "ada-exp.y"
     { error (_("NEW not implemented.")); }
     break;
 
   case 93:
 
 /* Line 1455 of yacc.c  */
-#line 635 "ada-exp.y"
+#line 584 "ada-exp.y"
     { (yyval.tval) = write_var_or_type (pstate, NULL, (yyvsp[(1) - (1)].sval)); }
     break;
 
   case 94:
 
 /* Line 1455 of yacc.c  */
-#line 637 "ada-exp.y"
+#line 586 "ada-exp.y"
     { (yyval.tval) = write_var_or_type (pstate, (yyvsp[(1) - (2)].bval), (yyvsp[(2) - (2)].sval)); }
     break;
 
   case 95:
 
 /* Line 1455 of yacc.c  */
-#line 639 "ada-exp.y"
+#line 588 "ada-exp.y"
     { 
 			  (yyval.tval) = write_var_or_type (pstate, NULL, (yyvsp[(1) - (2)].sval));
 			  if ((yyval.tval) == NULL)
@@ -2562,7 +2511,7 @@ yyreduce:
   case 96:
 
 /* Line 1455 of yacc.c  */
-#line 647 "ada-exp.y"
+#line 596 "ada-exp.y"
     { 
 			  (yyval.tval) = write_var_or_type (pstate, (yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval));
 			  if ((yyval.tval) == NULL)
@@ -2575,21 +2524,21 @@ yyreduce:
   case 97:
 
 /* Line 1455 of yacc.c  */
-#line 658 "ada-exp.y"
+#line 607 "ada-exp.y"
     { (yyval.bval) = block_lookup (NULL, (yyvsp[(1) - (2)].sval).ptr); }
     break;
 
   case 98:
 
 /* Line 1455 of yacc.c  */
-#line 660 "ada-exp.y"
+#line 609 "ada-exp.y"
     { (yyval.bval) = block_lookup ((yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval).ptr); }
     break;
 
   case 99:
 
 /* Line 1455 of yacc.c  */
-#line 665 "ada-exp.y"
+#line 614 "ada-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_AGGREGATE);
 			  write_exp_elt_longcst (pstate, (yyvsp[(2) - (3)].lval));
@@ -2600,14 +2549,14 @@ yyreduce:
   case 100:
 
 /* Line 1455 of yacc.c  */
-#line 673 "ada-exp.y"
+#line 622 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(1) - (1)].lval); }
     break;
 
   case 101:
 
 /* Line 1455 of yacc.c  */
-#line 675 "ada-exp.y"
+#line 624 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_POSITIONAL);
 			  write_exp_elt_longcst (pstate, (yyvsp[(1) - (2)].lval));
 			  write_exp_elt_opcode (pstate, OP_POSITIONAL);
@@ -2618,14 +2567,14 @@ yyreduce:
   case 102:
 
 /* Line 1455 of yacc.c  */
-#line 681 "ada-exp.y"
+#line 630 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(1) - (2)].lval) + (yyvsp[(2) - (2)].lval); }
     break;
 
   case 103:
 
 /* Line 1455 of yacc.c  */
-#line 686 "ada-exp.y"
+#line 635 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_POSITIONAL);
 			  write_exp_elt_longcst (pstate, 0);
 			  write_exp_elt_opcode (pstate, OP_POSITIONAL);
@@ -2636,7 +2585,7 @@ yyreduce:
   case 104:
 
 /* Line 1455 of yacc.c  */
-#line 692 "ada-exp.y"
+#line 641 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_POSITIONAL);
 			  write_exp_elt_longcst (pstate, (yyvsp[(1) - (3)].lval));
 			  write_exp_elt_opcode (pstate, OP_POSITIONAL);
@@ -2647,35 +2596,35 @@ yyreduce:
   case 105:
 
 /* Line 1455 of yacc.c  */
-#line 700 "ada-exp.y"
+#line 649 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 106:
 
 /* Line 1455 of yacc.c  */
-#line 701 "ada-exp.y"
+#line 650 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 107:
 
 /* Line 1455 of yacc.c  */
-#line 703 "ada-exp.y"
+#line 652 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; }
     break;
 
   case 108:
 
 /* Line 1455 of yacc.c  */
-#line 707 "ada-exp.y"
+#line 656 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_OTHERS); }
     break;
 
   case 109:
 
 /* Line 1455 of yacc.c  */
-#line 712 "ada-exp.y"
+#line 661 "ada-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_CHOICES);
 			  write_exp_elt_longcst (pstate, (yyvsp[(1) - (1)].lval));
@@ -2686,28 +2635,28 @@ yyreduce:
   case 110:
 
 /* Line 1455 of yacc.c  */
-#line 726 "ada-exp.y"
+#line 675 "ada-exp.y"
     { write_name_assoc (pstate, (yyvsp[(1) - (2)].sval)); }
     break;
 
   case 111:
 
 /* Line 1455 of yacc.c  */
-#line 727 "ada-exp.y"
+#line 676 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 112:
 
 /* Line 1455 of yacc.c  */
-#line 729 "ada-exp.y"
+#line 678 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 113:
 
 /* Line 1455 of yacc.c  */
-#line 731 "ada-exp.y"
+#line 680 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_DISCRETE_RANGE);
 			  write_exp_op_with_string (pstate, OP_NAME,
 						    empty_stoken);
@@ -2717,70 +2666,70 @@ yyreduce:
   case 114:
 
 /* Line 1455 of yacc.c  */
-#line 735 "ada-exp.y"
+#line 684 "ada-exp.y"
     { (yyval.lval) = 1; }
     break;
 
   case 115:
 
 /* Line 1455 of yacc.c  */
-#line 737 "ada-exp.y"
+#line 686 "ada-exp.y"
     { write_name_assoc (pstate, (yyvsp[(1) - (2)].sval)); }
     break;
 
   case 116:
 
 /* Line 1455 of yacc.c  */
-#line 738 "ada-exp.y"
+#line 687 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(4) - (4)].lval) + 1; }
     break;
 
   case 117:
 
 /* Line 1455 of yacc.c  */
-#line 740 "ada-exp.y"
+#line 689 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; }
     break;
 
   case 118:
 
 /* Line 1455 of yacc.c  */
-#line 742 "ada-exp.y"
+#line 691 "ada-exp.y"
     { write_exp_elt_opcode (pstate, OP_DISCRETE_RANGE); }
     break;
 
   case 119:
 
 /* Line 1455 of yacc.c  */
-#line 743 "ada-exp.y"
+#line 692 "ada-exp.y"
     { (yyval.lval) = (yyvsp[(6) - (6)].lval) + 1; }
     break;
 
   case 120:
 
 /* Line 1455 of yacc.c  */
-#line 750 "ada-exp.y"
+#line 699 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 121:
 
 /* Line 1455 of yacc.c  */
-#line 752 "ada-exp.y"
+#line 701 "ada-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 122:
 
 /* Line 1455 of yacc.c  */
-#line 754 "ada-exp.y"
+#line 703 "ada-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
     break;
 
 
 
 /* Line 1455 of yacc.c  */
-#line 2785 "ada-exp.c"
+#line 2734 "ada-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2992,7 +2941,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 757 "ada-exp.y"
+#line 706 "ada-exp.y"
 
 
 /* yylex defined in ada-lex.c: Reads one token, getting characters */
@@ -3107,7 +3056,7 @@ write_object_renaming (struct parser_sta
 {
   char *name;
   enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
-  struct ada_symbol_info sym_info;
+  struct block_symbol sym_info;
 
   if (max_depth <= 0)
     error (_("Could not find renamed symbol"));
@@ -3115,11 +3064,12 @@ write_object_renaming (struct parser_sta
   if (orig_left_context == NULL)
     orig_left_context = get_selected_block (NULL);
 
-  name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len);
+  name = (char *) obstack_copy0 (&temp_parse_space, renamed_entity,
+				 renamed_entity_len);
   ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
-  if (sym_info.sym == NULL)
+  if (sym_info.symbol == NULL)
     error (_("Could not find renamed variable: %s"), ada_decode (name));
-  else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF)
+  else if (SYMBOL_CLASS (sym_info.symbol) == LOC_TYPEDEF)
     /* We have a renaming of an old-style renaming symbol.  Don't
        trust the block information.  */
     sym_info.block = orig_left_context;
@@ -3129,13 +3079,13 @@ write_object_renaming (struct parser_sta
     int inner_renamed_entity_len;
     const char *inner_renaming_expr;
 
-    switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity,
+    switch (ada_parse_renaming (sym_info.symbol, &inner_renamed_entity,
 				&inner_renamed_entity_len,
 				&inner_renaming_expr))
       {
       case ADA_NOT_RENAMING:
 	write_var_from_sym (par_state, orig_left_context, sym_info.block,
-			    sym_info.sym);
+			    sym_info.symbol);
 	break;
       case ADA_OBJECT_RENAMING:
 	write_object_renaming (par_state, sym_info.block,
@@ -3178,26 +3128,26 @@ write_object_renaming (struct parser_sta
 	  {
 	    const char *end;
 	    char *index_name;
-	    struct ada_symbol_info index_sym_info;
+	    struct block_symbol index_sym_info;
 
 	    end = strchr (renaming_expr, 'X');
 	    if (end == NULL)
 	      end = renaming_expr + strlen (renaming_expr);
 
-	    index_name =
-	      obstack_copy0 (&temp_parse_space, renaming_expr,
-			     end - renaming_expr);
+	    index_name
+	      = (char *) obstack_copy0 (&temp_parse_space, renaming_expr,
+					end - renaming_expr);
 	    renaming_expr = end;
 
 	    ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
 				       &index_sym_info);
-	    if (index_sym_info.sym == NULL)
+	    if (index_sym_info.symbol == NULL)
 	      error (_("Could not find %s"), index_name);
-	    else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF)
+	    else if (SYMBOL_CLASS (index_sym_info.symbol) == LOC_TYPEDEF)
 	      /* Index is an old-style renaming symbol.  */
 	      index_sym_info.block = orig_left_context;
 	    write_var_from_sym (par_state, NULL, index_sym_info.block,
-				index_sym_info.sym);
+				index_sym_info.symbol);
 	  }
 	if (slice_state == SIMPLE_INDEX)
 	  {
@@ -3228,7 +3178,7 @@ write_object_renaming (struct parser_sta
 	  if (end == NULL)
 	    end = renaming_expr + strlen (renaming_expr);
 	  field_name.length = end - renaming_expr;
-	  buf = xmalloc (end - renaming_expr + 1);
+	  buf = (char *) xmalloc (end - renaming_expr + 1);
 	  field_name.ptr = buf;
 	  strncpy (buf, renaming_expr, end - renaming_expr);
 	  buf[end - renaming_expr] = '\000';
@@ -3252,7 +3202,7 @@ static const struct block*
 block_lookup (const struct block *context, const char *raw_name)
 {
   const char *name;
-  struct ada_symbol_info *syms;
+  struct block_symbol *syms;
   int nsyms;
   struct symtab *symtab;
 
@@ -3266,14 +3216,14 @@ block_lookup (const struct block *contex
 
   nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms);
   if (context == NULL
-      && (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
+      && (nsyms == 0 || SYMBOL_CLASS (syms[0].symbol) != LOC_BLOCK))
     symtab = lookup_symtab (name);
   else
     symtab = NULL;
 
   if (symtab != NULL)
     return BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
-  else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
+  else if (nsyms == 0 || SYMBOL_CLASS (syms[0].symbol) != LOC_BLOCK)
     {
       if (context == NULL)
 	error (_("No file or function \"%s\"."), raw_name);
@@ -3284,12 +3234,12 @@ block_lookup (const struct block *contex
     {
       if (nsyms > 1)
 	warning (_("Function name \"%s\" ambiguous here"), raw_name);
-      return SYMBOL_BLOCK_VALUE (syms[0].sym);
+      return SYMBOL_BLOCK_VALUE (syms[0].symbol);
     }
 }
 
 static struct symbol*
-select_possible_type_sym (struct ada_symbol_info *syms, int nsyms)
+select_possible_type_sym (struct block_symbol *syms, int nsyms)
 {
   int i;
   int preferred_index;
@@ -3297,13 +3247,13 @@ select_possible_type_sym (struct ada_sym
 	  
   preferred_index = -1; preferred_type = NULL;
   for (i = 0; i < nsyms; i += 1)
-    switch (SYMBOL_CLASS (syms[i].sym))
+    switch (SYMBOL_CLASS (syms[i].symbol))
       {
       case LOC_TYPEDEF:
-	if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type))
+	if (ada_prefer_type (SYMBOL_TYPE (syms[i].symbol), preferred_type))
 	  {
 	    preferred_index = i;
-	    preferred_type = SYMBOL_TYPE (syms[i].sym);
+	    preferred_type = SYMBOL_TYPE (syms[i].symbol);
 	  }
 	break;
       case LOC_REGISTER:
@@ -3318,7 +3268,7 @@ select_possible_type_sym (struct ada_sym
       }
   if (preferred_type == NULL)
     return NULL;
-  return syms[preferred_index].sym;
+  return syms[preferred_index].symbol;
 }
 
 static struct type*
@@ -3340,7 +3290,7 @@ find_primitive_type (struct parser_state
 	(char *) alloca (strlen (name) + sizeof ("standard__"));
       strcpy (expanded_name, "standard__");
       strcat (expanded_name, name);
-      sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL);
+      sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL).symbol;
       if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
 	type = SYMBOL_TYPE (sym);
     }
@@ -3402,11 +3352,12 @@ static void
 write_ambiguous_var (struct parser_state *par_state,
 		     const struct block *block, char *name, int len)
 {
-  struct symbol *sym =
-    obstack_alloc (&temp_parse_space, sizeof (struct symbol));
+  struct symbol *sym = XOBNEW (&temp_parse_space, struct symbol);
+
   memset (sym, 0, sizeof (struct symbol));
   SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
-  SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len);
+  SYMBOL_LINKAGE_NAME (sym)
+    = (const char *) obstack_copy0 (&temp_parse_space, name, len);
   SYMBOL_LANGUAGE (sym) = language_ada;
 
   write_exp_elt_opcode (par_state, OP_VAR_VALUE);
@@ -3423,7 +3374,7 @@ static int
 ada_nget_field_index (const struct type *type, const char *field_name0,
                       int field_name_len, int maybe_missing)
 {
-  char *field_name = alloca ((field_name_len + 1) * sizeof (char));
+  char *field_name = (char *) alloca ((field_name_len + 1) * sizeof (char));
 
   strncpy (field_name, field_name0, field_name_len);
   field_name[field_name_len] = '\0';
@@ -3504,7 +3455,8 @@ write_var_or_type (struct parser_state *
 
   encoded_name = ada_encode (name0.ptr);
   name_len = strlen (encoded_name);
-  encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len);
+  encoded_name
+    = (char *) obstack_copy0 (&temp_parse_space, encoded_name, name_len);
   for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1)
     {
       int tail_index;
@@ -3513,7 +3465,7 @@ write_var_or_type (struct parser_state *
       while (tail_index > 0)
 	{
 	  int nsyms;
-	  struct ada_symbol_info *syms;
+	  struct block_symbol *syms;
 	  struct symbol *type_sym;
 	  struct symbol *renaming_sym;
 	  const char* renaming;
@@ -3533,10 +3485,10 @@ write_var_or_type (struct parser_state *
 	  if (nsyms == 1)
 	    {
 	      struct symbol *ren_sym =
-		ada_find_renaming_symbol (syms[0].sym, syms[0].block);
+		ada_find_renaming_symbol (syms[0].symbol, syms[0].block);
 
 	      if (ren_sym != NULL)
-		syms[0].sym = ren_sym;
+		syms[0].symbol = ren_sym;
 	    }
 
 	  type_sym = select_possible_type_sym (syms, nsyms);
@@ -3544,7 +3496,7 @@ write_var_or_type (struct parser_state *
 	  if (type_sym != NULL)
 	    renaming_sym = type_sym;
 	  else if (nsyms == 1)
-	    renaming_sym = syms[0].sym;
+	    renaming_sym = syms[0].symbol;
 	  else 
 	    renaming_sym = NULL;
 
@@ -3557,9 +3509,9 @@ write_var_or_type (struct parser_state *
 	    case ADA_EXCEPTION_RENAMING:
 	    case ADA_SUBPROGRAM_RENAMING:
 	      {
+	        int alloc_len = renaming_len + name_len - tail_index + 1;
 		char *new_name
-		  = obstack_alloc (&temp_parse_space,
-				   renaming_len + name_len - tail_index + 1);
+		  = (char *) obstack_alloc (&temp_parse_space, alloc_len);
 		strncpy (new_name, renaming, renaming_len);
 		strcpy (new_name + renaming_len, encoded_name + tail_index);
 		encoded_name = new_name;
@@ -3606,7 +3558,7 @@ write_var_or_type (struct parser_state *
 	  if (nsyms == 1)
 	    {
 	      write_var_from_sym (par_state, block, syms[0].block,
-				  syms[0].sym);
+				  syms[0].symbol);
 	      write_selectors (par_state, encoded_name + tail_index);
 	      return NULL;
 	    }
@@ -3672,13 +3624,14 @@ write_name_assoc (struct parser_state *p
 {
   if (strchr (name.ptr, '.') == NULL)
     {
-      struct ada_symbol_info *syms;
+      struct block_symbol *syms;
       int nsyms = ada_lookup_symbol_list (name.ptr, expression_context_block,
 					  VAR_DOMAIN, &syms);
-      if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF)
+
+      if (nsyms != 1 || SYMBOL_CLASS (syms[0].symbol) == LOC_TYPEDEF)
 	write_exp_op_with_string (par_state, OP_NAME, name);
       else
-	write_var_from_sym (par_state, NULL, syms[0].block, syms[0].sym);
+	write_var_from_sym (par_state, NULL, syms[0].block, syms[0].symbol);
     }
   else
     if (write_var_or_type (par_state, NULL, name) != NULL)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-exp.y ./gdb/ada-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* YACC parser for Ada expressions, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,61 +50,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  These are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
-   options.  I presume we are maintaining it to accommodate systems
-   without BISON?  (PNH) */
-
-#define	yymaxdepth ada_maxdepth
-/* ada_parse calls this after initialization */
-#define	yyparse	ada_parse_internal
-#define	yylex	ada_lex
-#define	yyerror	ada_error
-#define	yylval	ada_lval
-#define	yychar	ada_char
-#define	yydebug	ada_debug
-#define	yypact	ada_pact
-#define	yyr1	ada_r1
-#define	yyr2	ada_r2
-#define	yydef	ada_def
-#define	yychk	ada_chk
-#define	yypgo	ada_pgo
-#define	yyact	ada_act
-#define	yyexca	ada_exca
-#define yyerrflag ada_errflag
-#define yynerrs	ada_nerrs
-#define	yyps	ada_ps
-#define	yypv	ada_pv
-#define	yys	ada_s
-#define	yy_yys	ada_yys
-#define	yystate	ada_state
-#define	yytmp	ada_tmp
-#define	yyv	ada_v
-#define	yy_yyv	ada_yyv
-#define	yyval	ada_val
-#define	yylloc	ada_lloc
-#define yyreds	ada_reds		/* With YYDEBUG defined */
-#define yytoks	ada_toks		/* With YYDEBUG defined */
-#define yyname	ada_name		/* With YYDEBUG defined */
-#define yyrule	ada_rule		/* With YYDEBUG defined */
-#define yyss	ada_yyss
-#define yysslim	ada_yysslim
-#define yyssp	ada_yyssp
-#define yystacksize ada_yystacksize
-#define yyvs	ada_yyvs
-#define yyvsp	ada_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG	1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX ada_
+#include "yy-remap.h"
 
 struct name_info {
   struct symbol *sym;
@@ -868,7 +817,7 @@ write_object_renaming (struct parser_sta
 {
   char *name;
   enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
-  struct ada_symbol_info sym_info;
+  struct block_symbol sym_info;
 
   if (max_depth <= 0)
     error (_("Could not find renamed symbol"));
@@ -876,11 +825,12 @@ write_object_renaming (struct parser_sta
   if (orig_left_context == NULL)
     orig_left_context = get_selected_block (NULL);
 
-  name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len);
+  name = (char *) obstack_copy0 (&temp_parse_space, renamed_entity,
+				 renamed_entity_len);
   ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
-  if (sym_info.sym == NULL)
+  if (sym_info.symbol == NULL)
     error (_("Could not find renamed variable: %s"), ada_decode (name));
-  else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF)
+  else if (SYMBOL_CLASS (sym_info.symbol) == LOC_TYPEDEF)
     /* We have a renaming of an old-style renaming symbol.  Don't
        trust the block information.  */
     sym_info.block = orig_left_context;
@@ -890,13 +840,13 @@ write_object_renaming (struct parser_sta
     int inner_renamed_entity_len;
     const char *inner_renaming_expr;
 
-    switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity,
+    switch (ada_parse_renaming (sym_info.symbol, &inner_renamed_entity,
 				&inner_renamed_entity_len,
 				&inner_renaming_expr))
       {
       case ADA_NOT_RENAMING:
 	write_var_from_sym (par_state, orig_left_context, sym_info.block,
-			    sym_info.sym);
+			    sym_info.symbol);
 	break;
       case ADA_OBJECT_RENAMING:
 	write_object_renaming (par_state, sym_info.block,
@@ -939,26 +889,26 @@ write_object_renaming (struct parser_sta
 	  {
 	    const char *end;
 	    char *index_name;
-	    struct ada_symbol_info index_sym_info;
+	    struct block_symbol index_sym_info;
 
 	    end = strchr (renaming_expr, 'X');
 	    if (end == NULL)
 	      end = renaming_expr + strlen (renaming_expr);
 
-	    index_name =
-	      obstack_copy0 (&temp_parse_space, renaming_expr,
-			     end - renaming_expr);
+	    index_name
+	      = (char *) obstack_copy0 (&temp_parse_space, renaming_expr,
+					end - renaming_expr);
 	    renaming_expr = end;
 
 	    ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
 				       &index_sym_info);
-	    if (index_sym_info.sym == NULL)
+	    if (index_sym_info.symbol == NULL)
 	      error (_("Could not find %s"), index_name);
-	    else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF)
+	    else if (SYMBOL_CLASS (index_sym_info.symbol) == LOC_TYPEDEF)
 	      /* Index is an old-style renaming symbol.  */
 	      index_sym_info.block = orig_left_context;
 	    write_var_from_sym (par_state, NULL, index_sym_info.block,
-				index_sym_info.sym);
+				index_sym_info.symbol);
 	  }
 	if (slice_state == SIMPLE_INDEX)
 	  {
@@ -989,7 +939,7 @@ write_object_renaming (struct parser_sta
 	  if (end == NULL)
 	    end = renaming_expr + strlen (renaming_expr);
 	  field_name.length = end - renaming_expr;
-	  buf = malloc (end - renaming_expr + 1);
+	  buf = (char *) malloc (end - renaming_expr + 1);
 	  field_name.ptr = buf;
 	  strncpy (buf, renaming_expr, end - renaming_expr);
 	  buf[end - renaming_expr] = '\000';
@@ -1013,7 +963,7 @@ static const struct block*
 block_lookup (const struct block *context, const char *raw_name)
 {
   const char *name;
-  struct ada_symbol_info *syms;
+  struct block_symbol *syms;
   int nsyms;
   struct symtab *symtab;
 
@@ -1027,14 +977,14 @@ block_lookup (const struct block *contex
 
   nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms);
   if (context == NULL
-      && (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
+      && (nsyms == 0 || SYMBOL_CLASS (syms[0].symbol) != LOC_BLOCK))
     symtab = lookup_symtab (name);
   else
     symtab = NULL;
 
   if (symtab != NULL)
     return BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
-  else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
+  else if (nsyms == 0 || SYMBOL_CLASS (syms[0].symbol) != LOC_BLOCK)
     {
       if (context == NULL)
 	error (_("No file or function \"%s\"."), raw_name);
@@ -1045,12 +995,12 @@ block_lookup (const struct block *contex
     {
       if (nsyms > 1)
 	warning (_("Function name \"%s\" ambiguous here"), raw_name);
-      return SYMBOL_BLOCK_VALUE (syms[0].sym);
+      return SYMBOL_BLOCK_VALUE (syms[0].symbol);
     }
 }
 
 static struct symbol*
-select_possible_type_sym (struct ada_symbol_info *syms, int nsyms)
+select_possible_type_sym (struct block_symbol *syms, int nsyms)
 {
   int i;
   int preferred_index;
@@ -1058,13 +1008,13 @@ select_possible_type_sym (struct ada_sym
 	  
   preferred_index = -1; preferred_type = NULL;
   for (i = 0; i < nsyms; i += 1)
-    switch (SYMBOL_CLASS (syms[i].sym))
+    switch (SYMBOL_CLASS (syms[i].symbol))
       {
       case LOC_TYPEDEF:
-	if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type))
+	if (ada_prefer_type (SYMBOL_TYPE (syms[i].symbol), preferred_type))
 	  {
 	    preferred_index = i;
-	    preferred_type = SYMBOL_TYPE (syms[i].sym);
+	    preferred_type = SYMBOL_TYPE (syms[i].symbol);
 	  }
 	break;
       case LOC_REGISTER:
@@ -1079,7 +1029,7 @@ select_possible_type_sym (struct ada_sym
       }
   if (preferred_type == NULL)
     return NULL;
-  return syms[preferred_index].sym;
+  return syms[preferred_index].symbol;
 }
 
 static struct type*
@@ -1101,7 +1051,7 @@ find_primitive_type (struct parser_state
 	(char *) alloca (strlen (name) + sizeof ("standard__"));
       strcpy (expanded_name, "standard__");
       strcat (expanded_name, name);
-      sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL);
+      sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL).symbol;
       if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
 	type = SYMBOL_TYPE (sym);
     }
@@ -1163,11 +1113,12 @@ static void
 write_ambiguous_var (struct parser_state *par_state,
 		     const struct block *block, char *name, int len)
 {
-  struct symbol *sym =
-    obstack_alloc (&temp_parse_space, sizeof (struct symbol));
+  struct symbol *sym = XOBNEW (&temp_parse_space, struct symbol);
+
   memset (sym, 0, sizeof (struct symbol));
   SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
-  SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len);
+  SYMBOL_LINKAGE_NAME (sym)
+    = (const char *) obstack_copy0 (&temp_parse_space, name, len);
   SYMBOL_LANGUAGE (sym) = language_ada;
 
   write_exp_elt_opcode (par_state, OP_VAR_VALUE);
@@ -1184,7 +1135,7 @@ static int
 ada_nget_field_index (const struct type *type, const char *field_name0,
                       int field_name_len, int maybe_missing)
 {
-  char *field_name = alloca ((field_name_len + 1) * sizeof (char));
+  char *field_name = (char *) alloca ((field_name_len + 1) * sizeof (char));
 
   strncpy (field_name, field_name0, field_name_len);
   field_name[field_name_len] = '\0';
@@ -1265,7 +1216,8 @@ write_var_or_type (struct parser_state *
 
   encoded_name = ada_encode (name0.ptr);
   name_len = strlen (encoded_name);
-  encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len);
+  encoded_name
+    = (char *) obstack_copy0 (&temp_parse_space, encoded_name, name_len);
   for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1)
     {
       int tail_index;
@@ -1274,7 +1226,7 @@ write_var_or_type (struct parser_state *
       while (tail_index > 0)
 	{
 	  int nsyms;
-	  struct ada_symbol_info *syms;
+	  struct block_symbol *syms;
 	  struct symbol *type_sym;
 	  struct symbol *renaming_sym;
 	  const char* renaming;
@@ -1294,10 +1246,10 @@ write_var_or_type (struct parser_state *
 	  if (nsyms == 1)
 	    {
 	      struct symbol *ren_sym =
-		ada_find_renaming_symbol (syms[0].sym, syms[0].block);
+		ada_find_renaming_symbol (syms[0].symbol, syms[0].block);
 
 	      if (ren_sym != NULL)
-		syms[0].sym = ren_sym;
+		syms[0].symbol = ren_sym;
 	    }
 
 	  type_sym = select_possible_type_sym (syms, nsyms);
@@ -1305,7 +1257,7 @@ write_var_or_type (struct parser_state *
 	  if (type_sym != NULL)
 	    renaming_sym = type_sym;
 	  else if (nsyms == 1)
-	    renaming_sym = syms[0].sym;
+	    renaming_sym = syms[0].symbol;
 	  else 
 	    renaming_sym = NULL;
 
@@ -1318,9 +1270,9 @@ write_var_or_type (struct parser_state *
 	    case ADA_EXCEPTION_RENAMING:
 	    case ADA_SUBPROGRAM_RENAMING:
 	      {
+	        int alloc_len = renaming_len + name_len - tail_index + 1;
 		char *new_name
-		  = obstack_alloc (&temp_parse_space,
-				   renaming_len + name_len - tail_index + 1);
+		  = (char *) obstack_alloc (&temp_parse_space, alloc_len);
 		strncpy (new_name, renaming, renaming_len);
 		strcpy (new_name + renaming_len, encoded_name + tail_index);
 		encoded_name = new_name;
@@ -1367,7 +1319,7 @@ write_var_or_type (struct parser_state *
 	  if (nsyms == 1)
 	    {
 	      write_var_from_sym (par_state, block, syms[0].block,
-				  syms[0].sym);
+				  syms[0].symbol);
 	      write_selectors (par_state, encoded_name + tail_index);
 	      return NULL;
 	    }
@@ -1433,13 +1385,14 @@ write_name_assoc (struct parser_state *p
 {
   if (strchr (name.ptr, '.') == NULL)
     {
-      struct ada_symbol_info *syms;
+      struct block_symbol *syms;
       int nsyms = ada_lookup_symbol_list (name.ptr, expression_context_block,
 					  VAR_DOMAIN, &syms);
-      if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF)
+
+      if (nsyms != 1 || SYMBOL_CLASS (syms[0].symbol) == LOC_TYPEDEF)
 	write_exp_op_with_string (par_state, OP_NAME, name);
       else
-	write_var_from_sym (par_state, NULL, syms[0].block, syms[0].sym);
+	write_var_from_sym (par_state, NULL, syms[0].block, syms[0].symbol);
     }
   else
     if (write_var_or_type (par_state, NULL, name) != NULL)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lang.c ./gdb/ada-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ada language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,12 +53,14 @@
 #include "stack.h"
 #include "gdb_vecs.h"
 #include "typeprint.h"
+#include "namespace.h"
 
 #include "psymtab.h"
 #include "value.h"
 #include "mi/mi-common.h"
 #include "arch-utils.h"
 #include "cli/cli-utils.h"
+#include "common/function-view.h"
 
 /* Define whether or not the C operator '/' truncates towards zero for
    differently signed operands (truncation direction is undefined in C).
@@ -108,14 +110,17 @@ static void ada_add_block_symbols (struc
                                    const struct block *, const char *,
                                    domain_enum, struct objfile *, int);
 
-static int is_nonfunction (struct ada_symbol_info *, int);
+static void ada_add_all_symbols (struct obstack *, const struct block *,
+				 const char *, domain_enum, int, int *);
+
+static int is_nonfunction (struct block_symbol *, int);
 
 static void add_defn_to_vec (struct obstack *, struct symbol *,
                              const struct block *);
 
 static int num_defns_collected (struct obstack *);
 
-static struct ada_symbol_info *defns_collected (struct obstack *, int);
+static struct block_symbol *defns_collected (struct obstack *, int);
 
 static struct value *resolve_subexp (struct expression **, int *, int,
                                      struct type *);
@@ -211,7 +216,7 @@ static struct value *value_val_atr (stru
 static struct symbol *standard_lookup (const char *, const struct block *,
                                        domain_enum);
 
-static struct value *ada_search_struct_field (char *, struct value *, int,
+static struct value *ada_search_struct_field (const char *, struct value *, int,
                                               struct type *);
 
 static struct value *ada_value_primitive_field (struct value *, int, int,
@@ -223,7 +228,7 @@ static int find_struct_field (const char
 static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
                                                 struct value *);
 
-static int ada_resolve_function (struct ada_symbol_info *, int,
+static int ada_resolve_function (struct block_symbol *, int,
                                  struct value **, int, const char *,
                                  struct type *);
 
@@ -394,7 +399,7 @@ ada_inferior_data_cleanup (struct inferi
 {
   struct ada_inferior_data *data;
 
-  data = inferior_data (inf, ada_inferior_data);
+  data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
   if (data != NULL)
     xfree (data);
 }
@@ -412,7 +417,7 @@ get_ada_inferior_data (struct inferior *
 {
   struct ada_inferior_data *data;
 
-  data = inferior_data (inf, ada_inferior_data);
+  data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
   if (data == NULL)
     {
       data = XCNEW (struct ada_inferior_data);
@@ -455,7 +460,8 @@ get_ada_pspace_data (struct program_spac
 {
   struct ada_pspace_data *data;
 
-  data = program_space_data (pspace, ada_pspace_data_handle);
+  data = ((struct ada_pspace_data *)
+	  program_space_data (pspace, ada_pspace_data_handle));
   if (data == NULL)
     {
       data = XCNEW (struct ada_pspace_data);
@@ -470,7 +476,7 @@ get_ada_pspace_data (struct program_spac
 static void
 ada_pspace_data_cleanup (struct program_space *pspace, void *data)
 {
-  struct ada_pspace_data *pspace_data = data;
+  struct ada_pspace_data *pspace_data = (struct ada_pspace_data *) data;
 
   if (pspace_data->sym_cache != NULL)
     ada_free_symbol_cache (pspace_data->sym_cache);
@@ -1410,7 +1416,7 @@ ada_decode_symbol (const struct general_
 {
   struct general_symbol_info *gsymbol = (struct general_symbol_info *) arg;
   const char **resultp =
-    &gsymbol->language_specific.mangled_lang.demangled_name;
+    &gsymbol->language_specific.demangled_name;
 
   if (!gsymbol->ada_mangled)
     {
@@ -1420,7 +1426,8 @@ ada_decode_symbol (const struct general_
       gsymbol->ada_mangled = 1;
 
       if (obstack != NULL)
-	*resultp = obstack_copy0 (obstack, decoded, strlen (decoded));
+	*resultp
+	  = (const char *) obstack_copy0 (obstack, decoded, strlen (decoded));
       else
         {
 	  /* Sometimes, we can't find a corresponding objfile, in
@@ -1446,6 +1453,45 @@ ada_la_decode (const char *encoded, int 
   return xstrdup (ada_decode (encoded));
 }
 
+/* Implement la_sniff_from_mangled_name for Ada.  */
+
+static int
+ada_sniff_from_mangled_name (const char *mangled, char **out)
+{
+  const char *demangled = ada_decode (mangled);
+
+  *out = NULL;
+
+  if (demangled != mangled && demangled != NULL && demangled[0] != '<')
+    {
+      /* Set the gsymbol language to Ada, but still return 0.
+	 Two reasons for that:
+
+	 1. For Ada, we prefer computing the symbol's decoded name
+	 on the fly rather than pre-compute it, in order to save
+	 memory (Ada projects are typically very large).
+
+	 2. There are some areas in the definition of the GNAT
+	 encoding where, with a bit of bad luck, we might be able
+	 to decode a non-Ada symbol, generating an incorrect
+	 demangled name (Eg: names ending with "TB" for instance
+	 are identified as task bodies and so stripped from
+	 the decoded name returned).
+
+	 Returning 1, here, but not setting *DEMANGLED, helps us get a
+	 little bit of the best of both worlds.  Because we're last,
+	 we should not affect any of the other languages that were
+	 able to demangle the symbol before us; we get to correctly
+	 tag Ada symbols as such; and even if we incorrectly tagged a
+	 non-Ada symbol, which should be rare, any routing through the
+	 Ada language should be transparent (Ada tries to behave much
+	 like C/C++ with non-Ada symbols).  */
+      return 1;
+    }
+
+  return 0;
+}
+
 /* Returns non-zero iff SYM_NAME matches NAME, ignoring any trailing
    suffixes that encode debugging information or leading _ada_ on
    SYM_NAME (see is_name_suffix commentary for the debugging
@@ -2238,7 +2284,7 @@ decode_constrained_packed_array_type (st
       lim_warning (_("could not find bounds information on packed array"));
       return NULL;
     }
-  CHECK_TYPEDEF (shadow_type);
+  shadow_type = check_typedef (shadow_type);
 
   if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
     {
@@ -2376,144 +2422,96 @@ has_negatives (struct type *type)
     }
 }
 
+/* With SRC being a buffer containing BIT_SIZE bits of data at BIT_OFFSET,
+   unpack that data into UNPACKED.  UNPACKED_LEN is the size in bytes of
+   the unpacked buffer.
 
-/* Create a new value of type TYPE from the contents of OBJ starting
-   at byte OFFSET, and bit offset BIT_OFFSET within that byte,
-   proceeding for BIT_SIZE bits.  If OBJ is an lval in memory, then
-   assigning through the result will set the field fetched from.
-   VALADDR is ignored unless OBJ is NULL, in which case,
-   VALADDR+OFFSET must address the start of storage containing the 
-   packed value.  The value returned  in this case is never an lval.
-   Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT.  */
+   The size of the unpacked buffer (UNPACKED_LEN) is expected to be large
+   enough to contain at least BIT_OFFSET bits.  If not, an error is raised.
 
-struct value *
-ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
-				long offset, int bit_offset, int bit_size,
-                                struct type *type)
+   IS_BIG_ENDIAN is nonzero if the data is stored in big endian mode,
+   zero otherwise.
+
+   IS_SIGNED_TYPE is nonzero if the data corresponds to a signed type.
+
+   IS_SCALAR is nonzero if the data corresponds to a signed type.  */
+
+static void
+ada_unpack_from_contents (const gdb_byte *src, int bit_offset, int bit_size,
+			  gdb_byte *unpacked, int unpacked_len,
+			  int is_big_endian, int is_signed_type,
+			  int is_scalar)
 {
-  struct value *v;
-  int src,                      /* Index into the source area */
-    targ,                       /* Index into the target area */
-    srcBitsLeft,                /* Number of source bits left to move */
-    nsrc, ntarg,                /* Number of source and target bytes */
-    unusedLS,                   /* Number of bits in next significant
+  int src_len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
+  int src_idx;                  /* Index into the source area */
+  int src_bytes_left;           /* Number of source bytes left to process.  */
+  int srcBitsLeft;              /* Number of source bits left to move */
+  int unusedLS;                 /* Number of bits in next significant
                                    byte of source that are unused */
-    accumSize;                  /* Number of meaningful bits in accum */
-  unsigned char *bytes;         /* First byte containing data to unpack */
-  unsigned char *unpacked;
+
+  int unpacked_idx;             /* Index into the unpacked buffer */
+  int unpacked_bytes_left;      /* Number of bytes left to set in unpacked.  */
+
   unsigned long accum;          /* Staging area for bits being transferred */
+  int accumSize;                /* Number of meaningful bits in accum */
   unsigned char sign;
-  int len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
+
   /* Transmit bytes from least to most significant; delta is the direction
      the indices move.  */
-  int delta = gdbarch_bits_big_endian (get_type_arch (type)) ? -1 : 1;
+  int delta = is_big_endian ? -1 : 1;
 
-  type = ada_check_typedef (type);
-
-  if (obj == NULL)
-    {
-      v = allocate_value (type);
-      bytes = (unsigned char *) (valaddr + offset);
-    }
-  else if (VALUE_LVAL (obj) == lval_memory && value_lazy (obj))
-    {
-      v = value_at (type, value_address (obj) + offset);
-      type = value_type (v);
-      if (TYPE_LENGTH (type) * HOST_CHAR_BIT < bit_size)
-	{
-	  /* This can happen in the case of an array of dynamic objects,
-	     where the size of each element changes from element to element.
-	     In that case, we're initially given the array stride, but
-	     after resolving the element type, we find that its size is
-	     less than this stride.  In that case, adjust bit_size to
-	     match TYPE's length, and recompute LEN accordingly.  */
-	  bit_size = TYPE_LENGTH (type) * HOST_CHAR_BIT;
-	  len = TYPE_LENGTH (type) + (bit_offset + HOST_CHAR_BIT - 1) / 8;
-	}
-      bytes = (unsigned char *) alloca (len);
-      read_memory (value_address (v), bytes, len);
-    }
-  else
-    {
-      v = allocate_value (type);
-      bytes = (unsigned char *) value_contents (obj) + offset;
-    }
-
-  if (obj != NULL)
-    {
-      long new_offset = offset;
-
-      set_value_component_location (v, obj);
-      set_value_bitpos (v, bit_offset + value_bitpos (obj));
-      set_value_bitsize (v, bit_size);
-      if (value_bitpos (v) >= HOST_CHAR_BIT)
-        {
-	  ++new_offset;
-          set_value_bitpos (v, value_bitpos (v) - HOST_CHAR_BIT);
-        }
-      set_value_offset (v, new_offset);
-
-      /* Also set the parent value.  This is needed when trying to
-	 assign a new value (in inferior memory).  */
-      set_value_parent (v, obj);
-    }
-  else
-    set_value_bitsize (v, bit_size);
-  unpacked = (unsigned char *) value_contents (v);
+  /* Make sure that unpacked is large enough to receive the BIT_SIZE
+     bits from SRC.  .*/
+  if ((bit_size + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT > unpacked_len)
+    error (_("Cannot unpack %d bits into buffer of %d bytes"),
+	   bit_size, unpacked_len);
 
   srcBitsLeft = bit_size;
-  nsrc = len;
-  ntarg = TYPE_LENGTH (type);
+  src_bytes_left = src_len;
+  unpacked_bytes_left = unpacked_len;
   sign = 0;
-  if (bit_size == 0)
-    {
-      memset (unpacked, 0, TYPE_LENGTH (type));
-      return v;
-    }
-  else if (gdbarch_bits_big_endian (get_type_arch (type)))
+
+  if (is_big_endian)
     {
-      src = len - 1;
-      if (has_negatives (type)
-          && ((bytes[0] << bit_offset) & (1 << (HOST_CHAR_BIT - 1))))
+      src_idx = src_len - 1;
+      if (is_signed_type
+	  && ((src[0] << bit_offset) & (1 << (HOST_CHAR_BIT - 1))))
         sign = ~0;
 
       unusedLS =
         (HOST_CHAR_BIT - (bit_size + bit_offset) % HOST_CHAR_BIT)
         % HOST_CHAR_BIT;
 
-      switch (TYPE_CODE (type))
-        {
-        case TYPE_CODE_ARRAY:
-        case TYPE_CODE_UNION:
-        case TYPE_CODE_STRUCT:
+      if (is_scalar)
+	{
+          accumSize = 0;
+          unpacked_idx = unpacked_len - 1;
+	}
+      else
+	{
           /* Non-scalar values must be aligned at a byte boundary...  */
           accumSize =
             (HOST_CHAR_BIT - bit_size % HOST_CHAR_BIT) % HOST_CHAR_BIT;
           /* ... And are placed at the beginning (most-significant) bytes
              of the target.  */
-          targ = (bit_size + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT - 1;
-          ntarg = targ + 1;
-          break;
-        default:
-          accumSize = 0;
-          targ = TYPE_LENGTH (type) - 1;
-          break;
-        }
+          unpacked_idx = (bit_size + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT - 1;
+          unpacked_bytes_left = unpacked_idx + 1;
+	}
     }
   else
     {
       int sign_bit_offset = (bit_size + bit_offset - 1) % 8;
 
-      src = targ = 0;
+      src_idx = unpacked_idx = 0;
       unusedLS = bit_offset;
       accumSize = 0;
 
-      if (has_negatives (type) && (bytes[len - 1] & (1 << sign_bit_offset)))
+      if (is_signed_type && (src[src_len - 1] & (1 << sign_bit_offset)))
         sign = ~0;
     }
 
   accum = 0;
-  while (nsrc > 0)
+  while (src_bytes_left > 0)
     {
       /* Mask for removing bits of the next source byte that are not
          part of the value.  */
@@ -2524,36 +2522,154 @@ ada_value_primitive_packed_val (struct v
       unsigned int signMask = sign & ~unusedMSMask;
 
       accum |=
-        (((bytes[src] >> unusedLS) & unusedMSMask) | signMask) << accumSize;
+        (((src[src_idx] >> unusedLS) & unusedMSMask) | signMask) << accumSize;
       accumSize += HOST_CHAR_BIT - unusedLS;
       if (accumSize >= HOST_CHAR_BIT)
         {
-          unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
+          unpacked[unpacked_idx] = accum & ~(~0UL << HOST_CHAR_BIT);
           accumSize -= HOST_CHAR_BIT;
           accum >>= HOST_CHAR_BIT;
-          ntarg -= 1;
-          targ += delta;
+          unpacked_bytes_left -= 1;
+          unpacked_idx += delta;
         }
       srcBitsLeft -= HOST_CHAR_BIT - unusedLS;
       unusedLS = 0;
-      nsrc -= 1;
-      src += delta;
+      src_bytes_left -= 1;
+      src_idx += delta;
     }
-  while (ntarg > 0)
+  while (unpacked_bytes_left > 0)
     {
       accum |= sign << accumSize;
-      unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
+      unpacked[unpacked_idx] = accum & ~(~0UL << HOST_CHAR_BIT);
       accumSize -= HOST_CHAR_BIT;
       if (accumSize < 0)
 	accumSize = 0;
       accum >>= HOST_CHAR_BIT;
-      ntarg -= 1;
-      targ += delta;
+      unpacked_bytes_left -= 1;
+      unpacked_idx += delta;
+    }
+}
+
+/* Create a new value of type TYPE from the contents of OBJ starting
+   at byte OFFSET, and bit offset BIT_OFFSET within that byte,
+   proceeding for BIT_SIZE bits.  If OBJ is an lval in memory, then
+   assigning through the result will set the field fetched from.
+   VALADDR is ignored unless OBJ is NULL, in which case,
+   VALADDR+OFFSET must address the start of storage containing the 
+   packed value.  The value returned  in this case is never an lval.
+   Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT.  */
+
+struct value *
+ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
+				long offset, int bit_offset, int bit_size,
+                                struct type *type)
+{
+  struct value *v;
+  const gdb_byte *src;                /* First byte containing data to unpack */
+  gdb_byte *unpacked;
+  const int is_scalar = is_scalar_type (type);
+  const int is_big_endian = gdbarch_bits_big_endian (get_type_arch (type));
+  std::unique_ptr<gdb_byte[]> staging;
+  int staging_len = 0;
+
+  type = ada_check_typedef (type);
+
+  if (obj == NULL)
+    src = valaddr + offset;
+  else
+    src = value_contents (obj) + offset;
+
+  if (is_dynamic_type (type))
+    {
+      /* The length of TYPE might by dynamic, so we need to resolve
+	 TYPE in order to know its actual size, which we then use
+	 to create the contents buffer of the value we return.
+	 The difficulty is that the data containing our object is
+	 packed, and therefore maybe not at a byte boundary.  So, what
+	 we do, is unpack the data into a byte-aligned buffer, and then
+	 use that buffer as our object's value for resolving the type.  */
+      staging_len = (bit_size + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
+      staging.reset (new gdb_byte[staging_len]);
+
+      ada_unpack_from_contents (src, bit_offset, bit_size,
+			        staging.get (), staging_len,
+				is_big_endian, has_negatives (type),
+				is_scalar);
+      type = resolve_dynamic_type (type, staging.get (), 0);
+      if (TYPE_LENGTH (type) < (bit_size + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT)
+	{
+	  /* This happens when the length of the object is dynamic,
+	     and is actually smaller than the space reserved for it.
+	     For instance, in an array of variant records, the bit_size
+	     we're given is the array stride, which is constant and
+	     normally equal to the maximum size of its element.
+	     But, in reality, each element only actually spans a portion
+	     of that stride.  */
+	  bit_size = TYPE_LENGTH (type) * HOST_CHAR_BIT;
+	}
+    }
+
+  if (obj == NULL)
+    {
+      v = allocate_value (type);
+      src = valaddr + offset;
     }
+  else if (VALUE_LVAL (obj) == lval_memory && value_lazy (obj))
+    {
+      int src_len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
+      gdb_byte *buf;
+
+      v = value_at (type, value_address (obj) + offset);
+      buf = (gdb_byte *) alloca (src_len);
+      read_memory (value_address (v), buf, src_len);
+      src = buf;
+    }
+  else
+    {
+      v = allocate_value (type);
+      src = value_contents (obj) + offset;
+    }
+
+  if (obj != NULL)
+    {
+      long new_offset = offset;
+
+      set_value_component_location (v, obj);
+      set_value_bitpos (v, bit_offset + value_bitpos (obj));
+      set_value_bitsize (v, bit_size);
+      if (value_bitpos (v) >= HOST_CHAR_BIT)
+        {
+	  ++new_offset;
+          set_value_bitpos (v, value_bitpos (v) - HOST_CHAR_BIT);
+        }
+      set_value_offset (v, new_offset);
+
+      /* Also set the parent value.  This is needed when trying to
+	 assign a new value (in inferior memory).  */
+      set_value_parent (v, obj);
+    }
+  else
+    set_value_bitsize (v, bit_size);
+  unpacked = value_contents_writeable (v);
+
+  if (bit_size == 0)
+    {
+      memset (unpacked, 0, TYPE_LENGTH (type));
+      return v;
+    }
+
+  if (staging != NULL && staging_len == TYPE_LENGTH (type))
+    {
+      /* Small short-cut: If we've unpacked the data into a buffer
+	 of the same size as TYPE's length, then we can reuse that,
+	 instead of doing the unpacking again.  */
+      memcpy (unpacked, staging.get (), staging_len);
+    }
+  else
+    ada_unpack_from_contents (src, bit_offset, bit_size,
+			      unpacked, TYPE_LENGTH (type),
+			      is_big_endian, has_negatives (type), is_scalar);
 
-  if (is_dynamic_type (value_type (v)))
-    v = value_from_contents_and_address (value_type (v), value_contents (v),
-					 0);
   return v;
 }
 
@@ -2653,7 +2769,7 @@ ada_value_assign (struct value *toval, s
       int len = (value_bitpos (toval)
 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
       int from_size;
-      gdb_byte *buffer = alloca (len);
+      gdb_byte *buffer = (gdb_byte *) alloca (len);
       struct value *val;
       CORE_ADDR to_addr = value_address (toval);
 
@@ -2753,14 +2869,27 @@ ada_value_subscript (struct value *arr, 
 
 /* Assuming ARR is a pointer to a GDB array, the value of the element
    of *ARR at the ARITY indices given in IND.
-   Does not read the entire array into memory.  */
+   Does not read the entire array into memory.
+
+   Note: Unlike what one would expect, this function is used instead of
+   ada_value_subscript for basically all non-packed array types.  The reason
+   for this is that a side effect of doing our own pointer arithmetics instead
+   of relying on value_subscript is that there is no implicit typedef peeling.
+   This is important for arrays of array accesses, where it allows us to
+   preserve the fact that the array's element is an array access, where the
+   access part os encoded in a typedef layer.  */
 
 static struct value *
 ada_value_ptr_subscript (struct value *arr, int arity, struct value **ind)
 {
   int k;
+  struct value *array_ind = ada_value_ind (arr);
   struct type *type
-    = check_typedef (value_enclosing_type (ada_value_ind (arr)));
+    = check_typedef (value_enclosing_type (array_ind));
+
+  if (TYPE_CODE (type) == TYPE_CODE_ARRAY
+      && TYPE_FIELD_BITSIZE (type, 0) > 0)
+    return value_subscript_packed (array_ind, arity, ind);
 
   for (k = 0; k < arity; k += 1)
     {
@@ -3056,7 +3185,7 @@ ada_array_length (struct value *arr, int
       high = value_as_long (desc_one_bound (desc_bounds (arr), n, 1));
     }
 
-  CHECK_TYPEDEF (arr_type);
+  arr_type = check_typedef (arr_type);
   index_type = TYPE_INDEX_TYPE (arr_type);
   if (index_type != NULL)
     {
@@ -3296,7 +3425,7 @@ resolve_subexp (struct expression **expp
       error (_("Unexpected operator during name resolution"));
     }
 
-  argvec = (struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
+  argvec = XALLOCAVEC (struct value *, nargs + 1);
   for (i = 0; i < nargs; i += 1)
     argvec[i] = resolve_subexp (expp, pos, 1, NULL);
   argvec[i] = NULL;
@@ -3311,7 +3440,7 @@ resolve_subexp (struct expression **expp
     case OP_VAR_VALUE:
       if (SYMBOL_DOMAIN (exp->elts[pc + 2].symbol) == UNDEF_DOMAIN)
         {
-          struct ada_symbol_info *candidates;
+          struct block_symbol *candidates;
           int n_candidates;
 
           n_candidates =
@@ -3327,7 +3456,7 @@ resolve_subexp (struct expression **expp
                  out all types.  */
               int j;
               for (j = 0; j < n_candidates; j += 1)
-                switch (SYMBOL_CLASS (candidates[j].sym))
+                switch (SYMBOL_CLASS (candidates[j].symbol))
                   {
                   case LOC_REGISTER:
                   case LOC_ARG:
@@ -3345,7 +3474,7 @@ resolve_subexp (struct expression **expp
                   j = 0;
                   while (j < n_candidates)
                     {
-                      if (SYMBOL_CLASS (candidates[j].sym) == LOC_TYPEDEF)
+                      if (SYMBOL_CLASS (candidates[j].symbol) == LOC_TYPEDEF)
                         {
                           candidates[j] = candidates[n_candidates - 1];
                           n_candidates -= 1;
@@ -3381,7 +3510,7 @@ resolve_subexp (struct expression **expp
             }
 
           exp->elts[pc + 1].block = candidates[i].block;
-          exp->elts[pc + 2].symbol = candidates[i].sym;
+          exp->elts[pc + 2].symbol = candidates[i].symbol;
           if (innermost_block == NULL
               || contained_in (candidates[i].block, innermost_block))
             innermost_block = candidates[i].block;
@@ -3403,7 +3532,7 @@ resolve_subexp (struct expression **expp
         if (exp->elts[pc + 3].opcode == OP_VAR_VALUE
             && SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
           {
-            struct ada_symbol_info *candidates;
+            struct block_symbol *candidates;
             int n_candidates;
 
             n_candidates =
@@ -3426,7 +3555,7 @@ resolve_subexp (struct expression **expp
               }
 
             exp->elts[pc + 4].block = candidates[i].block;
-            exp->elts[pc + 5].symbol = candidates[i].sym;
+            exp->elts[pc + 5].symbol = candidates[i].symbol;
             if (innermost_block == NULL
                 || contained_in (candidates[i].block, innermost_block))
               innermost_block = candidates[i].block;
@@ -3456,7 +3585,7 @@ resolve_subexp (struct expression **expp
     case UNOP_ABS:
       if (possible_user_operator_p (op, argvec))
         {
-          struct ada_symbol_info *candidates;
+          struct block_symbol *candidates;
           int n_candidates;
 
           n_candidates =
@@ -3468,8 +3597,9 @@ resolve_subexp (struct expression **expp
           if (i < 0)
             break;
 
-          replace_operator_with_call (expp, pc, nargs, 1,
-                                      candidates[i].sym, candidates[i].block);
+	  replace_operator_with_call (expp, pc, nargs, 1,
+				      candidates[i].symbol,
+				      candidates[i].block);
           exp = *expp;
         }
       break;
@@ -3623,7 +3753,7 @@ return_match (struct type *func_type, st
    the process; the index returned is for the modified vector.  */
 
 static int
-ada_resolve_function (struct ada_symbol_info syms[],
+ada_resolve_function (struct block_symbol syms[],
                       int nsyms, struct value **args, int nargs,
                       const char *name, struct type *context_type)
 {
@@ -3639,9 +3769,9 @@ ada_resolve_function (struct ada_symbol_
     {
       for (k = 0; k < nsyms; k += 1)
         {
-          struct type *type = ada_check_typedef (SYMBOL_TYPE (syms[k].sym));
+          struct type *type = ada_check_typedef (SYMBOL_TYPE (syms[k].symbol));
 
-          if (ada_args_match (syms[k].sym, args, nargs)
+          if (ada_args_match (syms[k].symbol, args, nargs)
               && (fallback || return_match (type, context_type)))
             {
               syms[m] = syms[k];
@@ -3650,9 +3780,13 @@ ada_resolve_function (struct ada_symbol_
         }
     }
 
+  /* If we got multiple matches, ask the user which one to use.  Don't do this
+     interactive thing during completion, though, as the purpose of the
+     completion is providing a list of all possible matches.  Prompting the
+     user to filter it down would be completely unexpected in this case.  */
   if (m == 0)
     return -1;
-  else if (m > 1)
+  else if (m > 1 && !parse_completion)
     {
       printf_filtered (_("Multiple matches for %s\n"), name);
       user_select_syms (syms, m, 1);
@@ -3704,19 +3838,19 @@ encoded_ordered_before (const char *N0, 
    encoded names.  */
 
 static void
-sort_choices (struct ada_symbol_info syms[], int nsyms)
+sort_choices (struct block_symbol syms[], int nsyms)
 {
   int i;
 
   for (i = 1; i < nsyms; i += 1)
     {
-      struct ada_symbol_info sym = syms[i];
+      struct block_symbol sym = syms[i];
       int j;
 
       for (j = i - 1; j >= 0; j -= 1)
         {
-          if (encoded_ordered_before (SYMBOL_LINKAGE_NAME (syms[j].sym),
-                                      SYMBOL_LINKAGE_NAME (sym.sym)))
+          if (encoded_ordered_before (SYMBOL_LINKAGE_NAME (syms[j].symbol),
+                                      SYMBOL_LINKAGE_NAME (sym.symbol)))
             break;
           syms[j + 1] = syms[j];
         }
@@ -3724,6 +3858,49 @@ sort_choices (struct ada_symbol_info sym
     }
 }
 
+/* Whether GDB should display formals and return types for functions in the
+   overloads selection menu.  */
+static int print_signatures = 1;
+
+/* Print the signature for SYM on STREAM according to the FLAGS options.  For
+   all but functions, the signature is just the name of the symbol.  For
+   functions, this is the name of the function, the list of types for formals
+   and the return type (if any).  */
+
+static void
+ada_print_symbol_signature (struct ui_file *stream, struct symbol *sym,
+			    const struct type_print_options *flags)
+{
+  struct type *type = SYMBOL_TYPE (sym);
+
+  fprintf_filtered (stream, "%s", SYMBOL_PRINT_NAME (sym));
+  if (!print_signatures
+      || type == NULL
+      || TYPE_CODE (type) != TYPE_CODE_FUNC)
+    return;
+
+  if (TYPE_NFIELDS (type) > 0)
+    {
+      int i;
+
+      fprintf_filtered (stream, " (");
+      for (i = 0; i < TYPE_NFIELDS (type); ++i)
+	{
+	  if (i > 0)
+	    fprintf_filtered (stream, "; ");
+	  ada_print_type (TYPE_FIELD_TYPE (type, i), NULL, stream, -1, 0,
+			  flags);
+	}
+      fprintf_filtered (stream, ")");
+    }
+  if (TYPE_TARGET_TYPE (type) != NULL
+      && TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+    {
+      fprintf_filtered (stream, " return ");
+      ada_print_type (TYPE_TARGET_TYPE (type), NULL, stream, -1, 0, flags);
+    }
+}
+
 /* Given a list of NSYMS symbols in SYMS, select up to MAX_RESULTS>0 
    by asking the user (if necessary), returning the number selected, 
    and setting the first elements of SYMS items.  Error if no symbols
@@ -3733,10 +3910,10 @@ sort_choices (struct ada_symbol_info sym
    to be re-integrated one of these days.  */
 
 int
-user_select_syms (struct ada_symbol_info *syms, int nsyms, int max_results)
+user_select_syms (struct block_symbol *syms, int nsyms, int max_results)
 {
   int i;
-  int *chosen = (int *) alloca (sizeof (int) * nsyms);
+  int *chosen = XALLOCAVEC (int , nsyms);
   int n_chosen;
   int first_choice = (max_results == 1) ? 1 : 2;
   const char *select_mode = multiple_symbols_select_mode ();
@@ -3765,22 +3942,22 @@ See set/show multiple-symbol."));
 
   for (i = 0; i < nsyms; i += 1)
     {
-      if (syms[i].sym == NULL)
+      if (syms[i].symbol == NULL)
         continue;
 
-      if (SYMBOL_CLASS (syms[i].sym) == LOC_BLOCK)
+      if (SYMBOL_CLASS (syms[i].symbol) == LOC_BLOCK)
         {
           struct symtab_and_line sal =
-            find_function_start_sal (syms[i].sym, 1);
+            find_function_start_sal (syms[i].symbol, 1);
 
+	  printf_unfiltered ("[%d] ", i + first_choice);
+	  ada_print_symbol_signature (gdb_stdout, syms[i].symbol,
+				      &type_print_raw_options);
 	  if (sal.symtab == NULL)
-	    printf_unfiltered (_("[%d] %s at <no source file available>:%d\n"),
-			       i + first_choice,
-			       SYMBOL_PRINT_NAME (syms[i].sym),
+	    printf_unfiltered (_(" at <no source file available>:%d\n"),
 			       sal.line);
 	  else
-	    printf_unfiltered (_("[%d] %s at %s:%d\n"), i + first_choice,
-			       SYMBOL_PRINT_NAME (syms[i].sym),
+	    printf_unfiltered (_(" at %s:%d\n"),
 			       symtab_to_filename_for_display (sal.symtab),
 			       sal.line);
           continue;
@@ -3788,42 +3965,48 @@ See set/show multiple-symbol."));
       else
         {
           int is_enumeral =
-            (SYMBOL_CLASS (syms[i].sym) == LOC_CONST
-             && SYMBOL_TYPE (syms[i].sym) != NULL
-             && TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) == TYPE_CODE_ENUM);
+            (SYMBOL_CLASS (syms[i].symbol) == LOC_CONST
+             && SYMBOL_TYPE (syms[i].symbol) != NULL
+             && TYPE_CODE (SYMBOL_TYPE (syms[i].symbol)) == TYPE_CODE_ENUM);
 	  struct symtab *symtab = NULL;
 
-	  if (SYMBOL_OBJFILE_OWNED (syms[i].sym))
-	    symtab = symbol_symtab (syms[i].sym);
+	  if (SYMBOL_OBJFILE_OWNED (syms[i].symbol))
+	    symtab = symbol_symtab (syms[i].symbol);
 
-          if (SYMBOL_LINE (syms[i].sym) != 0 && symtab != NULL)
-            printf_unfiltered (_("[%d] %s at %s:%d\n"),
-                               i + first_choice,
-                               SYMBOL_PRINT_NAME (syms[i].sym),
-			       symtab_to_filename_for_display (symtab),
-			       SYMBOL_LINE (syms[i].sym));
+          if (SYMBOL_LINE (syms[i].symbol) != 0 && symtab != NULL)
+	    {
+	      printf_unfiltered ("[%d] ", i + first_choice);
+	      ada_print_symbol_signature (gdb_stdout, syms[i].symbol,
+					  &type_print_raw_options);
+	      printf_unfiltered (_(" at %s:%d\n"),
+				 symtab_to_filename_for_display (symtab),
+				 SYMBOL_LINE (syms[i].symbol));
+	    }
           else if (is_enumeral
-                   && TYPE_NAME (SYMBOL_TYPE (syms[i].sym)) != NULL)
+                   && TYPE_NAME (SYMBOL_TYPE (syms[i].symbol)) != NULL)
             {
               printf_unfiltered (("[%d] "), i + first_choice);
-              ada_print_type (SYMBOL_TYPE (syms[i].sym), NULL,
+              ada_print_type (SYMBOL_TYPE (syms[i].symbol), NULL,
                               gdb_stdout, -1, 0, &type_print_raw_options);
               printf_unfiltered (_("'(%s) (enumeral)\n"),
-                                 SYMBOL_PRINT_NAME (syms[i].sym));
+                                 SYMBOL_PRINT_NAME (syms[i].symbol));
             }
-          else if (symtab != NULL)
-            printf_unfiltered (is_enumeral
-                               ? _("[%d] %s in %s (enumeral)\n")
-                               : _("[%d] %s at %s:?\n"),
-                               i + first_choice,
-                               SYMBOL_PRINT_NAME (syms[i].sym),
-                               symtab_to_filename_for_display (symtab));
-          else
-            printf_unfiltered (is_enumeral
-                               ? _("[%d] %s (enumeral)\n")
-                               : _("[%d] %s at ?\n"),
-                               i + first_choice,
-                               SYMBOL_PRINT_NAME (syms[i].sym));
+	  else
+	    {
+	      printf_unfiltered ("[%d] ", i + first_choice);
+	      ada_print_symbol_signature (gdb_stdout, syms[i].symbol,
+					  &type_print_raw_options);
+
+	      if (symtab != NULL)
+		printf_unfiltered (is_enumeral
+				   ? _(" in %s (enumeral)\n")
+				   : _(" at %s:?\n"),
+				   symtab_to_filename_for_display (symtab));
+	      else
+		printf_unfiltered (is_enumeral
+				   ? _(" (enumeral)\n")
+				   : _(" at ?\n"));
+	    }
         }
     }
 
@@ -4268,17 +4451,10 @@ ada_read_renaming_var_value (struct symb
 			     const struct block *block)
 {
   const char *sym_name;
-  struct expression *expr;
-  struct value *value;
-  struct cleanup *old_chain = NULL;
 
   sym_name = SYMBOL_LINKAGE_NAME (renaming_sym);
-  expr = parse_exp_1 (&sym_name, 0, block, 0);
-  old_chain = make_cleanup (free_current_contents, &expr);
-  value = evaluate_expression (expr);
-
-  do_cleanups (old_chain);
-  return value;
+  expression_up expr = parse_exp_1 (&sym_name, 0, block, 0);
+  return evaluate_expression (expr.get ());
 }
 
 
@@ -4298,8 +4474,8 @@ ensure_lval (struct value *val)
       const CORE_ADDR addr =
         value_as_long (value_allocate_space_in_inferior (len));
 
-      set_value_address (val, addr);
       VALUE_LVAL (val) = lval_memory;
+      set_value_address (val, addr);
       write_memory (addr, value_contents (val), len);
     }
 
@@ -4379,7 +4555,7 @@ value_pointer (struct value *value, stru
 {
   struct gdbarch *gdbarch = get_type_arch (type);
   unsigned len = TYPE_LENGTH (type);
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
   CORE_ADDR addr;
 
   addr = value_address (value);
@@ -4574,7 +4750,8 @@ cache_symbol (const char *name, domain_e
 					    sizeof (*e));
   e->next = sym_cache->root[h];
   sym_cache->root[h] = e;
-  e->name = copy = obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
+  e->name = copy
+    = (char *) obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
   strcpy (copy, name);
   e->sym = sym;
   e->domain = domain;
@@ -4603,13 +4780,13 @@ standard_lookup (const char *name, const
                  domain_enum domain)
 {
   /* Initialize it just to avoid a GCC false warning.  */
-  struct symbol *sym = NULL;
+  struct block_symbol sym = {NULL, NULL};
 
-  if (lookup_cached_symbol (name, domain, &sym, NULL))
-    return sym;
+  if (lookup_cached_symbol (name, domain, &sym.symbol, NULL))
+    return sym.symbol;
   sym = lookup_symbol_in_language (name, block, domain, language_c, 0);
-  cache_symbol (name, domain, sym, block_found);
-  return sym;
+  cache_symbol (name, domain, sym.symbol, sym.block);
+  return sym.symbol;
 }
 
 
@@ -4617,14 +4794,14 @@ standard_lookup (const char *name, const
    in the symbol fields of SYMS[0..N-1].  We treat enumerals as functions, 
    since they contend in overloading in the same way.  */
 static int
-is_nonfunction (struct ada_symbol_info syms[], int n)
+is_nonfunction (struct block_symbol syms[], int n)
 {
   int i;
 
   for (i = 0; i < n; i += 1)
-    if (TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) != TYPE_CODE_FUNC
-        && (TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) != TYPE_CODE_ENUM
-            || SYMBOL_CLASS (syms[i].sym) != LOC_CONST))
+    if (TYPE_CODE (SYMBOL_TYPE (syms[i].symbol)) != TYPE_CODE_FUNC
+        && (TYPE_CODE (SYMBOL_TYPE (syms[i].symbol)) != TYPE_CODE_ENUM
+            || SYMBOL_CLASS (syms[i].symbol) != LOC_CONST))
       return 1;
 
   return 0;
@@ -4688,7 +4865,7 @@ lesseq_defined_than (struct symbol *sym0
     }
 }
 
-/* Append (SYM,BLOCK,SYMTAB) to the end of the array of struct ada_symbol_info
+/* Append (SYM,BLOCK,SYMTAB) to the end of the array of struct block_symbol
    records in OBSTACKP.  Do nothing if SYM is a duplicate.  */
 
 static void
@@ -4697,7 +4874,7 @@ add_defn_to_vec (struct obstack *obstack
                  const struct block *block)
 {
   int i;
-  struct ada_symbol_info *prevDefns = defns_collected (obstackp, 0);
+  struct block_symbol *prevDefns = defns_collected (obstackp, 0);
 
   /* Do not try to complete stub types, as the debugger is probably
      already scanning all symbols matching a certain name at the
@@ -4710,45 +4887,44 @@ add_defn_to_vec (struct obstack *obstack
 
   for (i = num_defns_collected (obstackp) - 1; i >= 0; i -= 1)
     {
-      if (lesseq_defined_than (sym, prevDefns[i].sym))
+      if (lesseq_defined_than (sym, prevDefns[i].symbol))
         return;
-      else if (lesseq_defined_than (prevDefns[i].sym, sym))
+      else if (lesseq_defined_than (prevDefns[i].symbol, sym))
         {
-          prevDefns[i].sym = sym;
+          prevDefns[i].symbol = sym;
           prevDefns[i].block = block;
           return;
         }
     }
 
   {
-    struct ada_symbol_info info;
+    struct block_symbol info;
 
-    info.sym = sym;
+    info.symbol = sym;
     info.block = block;
-    obstack_grow (obstackp, &info, sizeof (struct ada_symbol_info));
+    obstack_grow (obstackp, &info, sizeof (struct block_symbol));
   }
 }
 
-/* Number of ada_symbol_info structures currently collected in 
-   current vector in *OBSTACKP.  */
+/* Number of block_symbol structures currently collected in current vector in
+   OBSTACKP.  */
 
 static int
 num_defns_collected (struct obstack *obstackp)
 {
-  return obstack_object_size (obstackp) / sizeof (struct ada_symbol_info);
+  return obstack_object_size (obstackp) / sizeof (struct block_symbol);
 }
 
-/* Vector of ada_symbol_info structures currently collected in current 
-   vector in *OBSTACKP.  If FINISH, close off the vector and return
-   its final address.  */
+/* Vector of block_symbol structures currently collected in current vector in
+   OBSTACKP.  If FINISH, close off the vector and return its final address.  */
 
-static struct ada_symbol_info *
+static struct block_symbol *
 defns_collected (struct obstack *obstackp, int finish)
 {
   if (finish)
-    return obstack_finish (obstackp);
+    return (struct block_symbol *) obstack_finish (obstackp);
   else
-    return (struct ada_symbol_info *) obstack_base (obstackp);
+    return (struct block_symbol *) obstack_base (obstackp);
 }
 
 /* Return a bound minimal symbol matching NAME according to Ada
@@ -4879,7 +5055,7 @@ ada_identical_enum_types_p (struct type 
    So, for practical purposes, we consider them as the same.  */
 
 static int
-symbols_are_identical_enums (struct ada_symbol_info *syms, int nsyms)
+symbols_are_identical_enums (struct block_symbol *syms, int nsyms)
 {
   int i;
 
@@ -4892,26 +5068,26 @@ symbols_are_identical_enums (struct ada_
 
   /* Quick check: All symbols should have an enum type.  */
   for (i = 0; i < nsyms; i++)
-    if (TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) != TYPE_CODE_ENUM)
+    if (TYPE_CODE (SYMBOL_TYPE (syms[i].symbol)) != TYPE_CODE_ENUM)
       return 0;
 
   /* Quick check: They should all have the same value.  */
   for (i = 1; i < nsyms; i++)
-    if (SYMBOL_VALUE (syms[i].sym) != SYMBOL_VALUE (syms[0].sym))
+    if (SYMBOL_VALUE (syms[i].symbol) != SYMBOL_VALUE (syms[0].symbol))
       return 0;
 
   /* Quick check: They should all have the same number of enumerals.  */
   for (i = 1; i < nsyms; i++)
-    if (TYPE_NFIELDS (SYMBOL_TYPE (syms[i].sym))
-        != TYPE_NFIELDS (SYMBOL_TYPE (syms[0].sym)))
+    if (TYPE_NFIELDS (SYMBOL_TYPE (syms[i].symbol))
+        != TYPE_NFIELDS (SYMBOL_TYPE (syms[0].symbol)))
       return 0;
 
   /* All the sanity checks passed, so we might have a set of
      identical enumeration types.  Perform a more complete
      comparison of the type of each symbol.  */
   for (i = 1; i < nsyms; i++)
-    if (!ada_identical_enum_types_p (SYMBOL_TYPE (syms[i].sym),
-                                     SYMBOL_TYPE (syms[0].sym)))
+    if (!ada_identical_enum_types_p (SYMBOL_TYPE (syms[i].symbol),
+                                     SYMBOL_TYPE (syms[0].symbol)))
       return 0;
 
   return 1;
@@ -4925,7 +5101,7 @@ symbols_are_identical_enums (struct ada_
    Returns the number of items in the modified list.  */
 
 static int
-remove_extra_symbols (struct ada_symbol_info *syms, int nsyms)
+remove_extra_symbols (struct block_symbol *syms, int nsyms)
 {
   int i, j;
 
@@ -4943,16 +5119,16 @@ remove_extra_symbols (struct ada_symbol_
       /* If two symbols have the same name and one of them is a stub type,
          the get rid of the stub.  */
 
-      if (TYPE_STUB (SYMBOL_TYPE (syms[i].sym))
-          && SYMBOL_LINKAGE_NAME (syms[i].sym) != NULL)
+      if (TYPE_STUB (SYMBOL_TYPE (syms[i].symbol))
+          && SYMBOL_LINKAGE_NAME (syms[i].symbol) != NULL)
         {
           for (j = 0; j < nsyms; j++)
             {
               if (j != i
-                  && !TYPE_STUB (SYMBOL_TYPE (syms[j].sym))
-                  && SYMBOL_LINKAGE_NAME (syms[j].sym) != NULL
-                  && strcmp (SYMBOL_LINKAGE_NAME (syms[i].sym),
-                             SYMBOL_LINKAGE_NAME (syms[j].sym)) == 0)
+                  && !TYPE_STUB (SYMBOL_TYPE (syms[j].symbol))
+                  && SYMBOL_LINKAGE_NAME (syms[j].symbol) != NULL
+                  && strcmp (SYMBOL_LINKAGE_NAME (syms[i].symbol),
+                             SYMBOL_LINKAGE_NAME (syms[j].symbol)) == 0)
                 remove_p = 1;
             }
         }
@@ -4960,19 +5136,20 @@ remove_extra_symbols (struct ada_symbol_
       /* Two symbols with the same name, same class and same address
          should be identical.  */
 
-      else if (SYMBOL_LINKAGE_NAME (syms[i].sym) != NULL
-          && SYMBOL_CLASS (syms[i].sym) == LOC_STATIC
-          && is_nondebugging_type (SYMBOL_TYPE (syms[i].sym)))
+      else if (SYMBOL_LINKAGE_NAME (syms[i].symbol) != NULL
+          && SYMBOL_CLASS (syms[i].symbol) == LOC_STATIC
+          && is_nondebugging_type (SYMBOL_TYPE (syms[i].symbol)))
         {
           for (j = 0; j < nsyms; j += 1)
             {
               if (i != j
-                  && SYMBOL_LINKAGE_NAME (syms[j].sym) != NULL
-                  && strcmp (SYMBOL_LINKAGE_NAME (syms[i].sym),
-                             SYMBOL_LINKAGE_NAME (syms[j].sym)) == 0
-                  && SYMBOL_CLASS (syms[i].sym) == SYMBOL_CLASS (syms[j].sym)
-                  && SYMBOL_VALUE_ADDRESS (syms[i].sym)
-                  == SYMBOL_VALUE_ADDRESS (syms[j].sym))
+                  && SYMBOL_LINKAGE_NAME (syms[j].symbol) != NULL
+                  && strcmp (SYMBOL_LINKAGE_NAME (syms[i].symbol),
+                             SYMBOL_LINKAGE_NAME (syms[j].symbol)) == 0
+                  && SYMBOL_CLASS (syms[i].symbol)
+		       == SYMBOL_CLASS (syms[j].symbol)
+                  && SYMBOL_VALUE_ADDRESS (syms[i].symbol)
+                  == SYMBOL_VALUE_ADDRESS (syms[j].symbol))
                 remove_p = 1;
             }
         }
@@ -5019,8 +5196,8 @@ xget_renaming_scope (struct type *renami
      and then backtrack until we find the first "__".  */
 
   const char *name = type_name_no_tag (renaming_type);
-  char *suffix = strstr (name, "___XR");
-  char *last;
+  const char *suffix = strstr (name, "___XR");
+  const char *last;
   int scope_len;
   char *scope;
 
@@ -5151,7 +5328,7 @@ old_renaming_is_invisible (const struct 
         the user will be unable to print such rename entities.  */
 
 static int
-remove_irrelevant_renamings (struct ada_symbol_info *syms,
+remove_irrelevant_renamings (struct block_symbol *syms,
 			     int nsyms, const struct block *current_block)
 {
   struct symbol *current_function;
@@ -5165,7 +5342,7 @@ remove_irrelevant_renamings (struct ada_
   is_new_style_renaming = 0;
   for (i = 0; i < nsyms; i += 1)
     {
-      struct symbol *sym = syms[i].sym;
+      struct symbol *sym = syms[i].symbol;
       const struct block *block = syms[i].block;
       const char *name;
       const char *suffix;
@@ -5182,11 +5359,11 @@ remove_irrelevant_renamings (struct ada_
 
 	  is_new_style_renaming = 1;
 	  for (j = 0; j < nsyms; j += 1)
-	    if (i != j && syms[j].sym != NULL
-		&& strncmp (name, SYMBOL_LINKAGE_NAME (syms[j].sym),
+	    if (i != j && syms[j].symbol != NULL
+		&& strncmp (name, SYMBOL_LINKAGE_NAME (syms[j].symbol),
 			    name_len) == 0
 		&& block == syms[j].block)
-	      syms[j].sym = NULL;
+	      syms[j].symbol = NULL;
 	}
     }
   if (is_new_style_renaming)
@@ -5194,7 +5371,7 @@ remove_irrelevant_renamings (struct ada_
       int j, k;
 
       for (j = k = 0; j < nsyms; j += 1)
-	if (syms[j].sym != NULL)
+	if (syms[j].symbol != NULL)
 	    {
 	      syms[k] = syms[j];
 	      k += 1;
@@ -5223,9 +5400,9 @@ remove_irrelevant_renamings (struct ada_
   i = 0;
   while (i < nsyms)
     {
-      if (ada_parse_renaming (syms[i].sym, NULL, NULL, NULL)
+      if (ada_parse_renaming (syms[i].symbol, NULL, NULL, NULL)
           == ADA_OBJECT_RENAMING
-          && old_renaming_is_invisible (syms[i].sym, current_function_name))
+          && old_renaming_is_invisible (syms[i].symbol, current_function_name))
         {
           int j;
 
@@ -5288,7 +5465,7 @@ struct match_data
   int found_sym;
 };
 
-/* A callback for add_matching_symbols that adds SYM, found in BLOCK,
+/* A callback for add_nonlocal_symbols that adds SYM, found in BLOCK,
    to a list of symbols.  DATA0 is a pointer to a struct match_data *
    containing the obstack that collects the symbol list, the file that SYM
    must come from, a flag indicating whether a non-argument symbol has
@@ -5328,6 +5505,62 @@ aux_add_nonlocal_symbols (struct block *
   return 0;
 }
 
+/* Helper for add_nonlocal_symbols.  Find symbols in DOMAIN which are targetted
+   by renamings matching NAME in BLOCK.  Add these symbols to OBSTACKP.  If
+   WILD_MATCH_P is nonzero, perform the naming matching in "wild" mode (see
+   function "wild_match" for more information).  Return whether we found such
+   symbols.  */
+
+static int
+ada_add_block_renamings (struct obstack *obstackp,
+			 const struct block *block,
+			 const char *name,
+			 domain_enum domain,
+			 int wild_match_p)
+{
+  struct using_direct *renaming;
+  int defns_mark = num_defns_collected (obstackp);
+
+  for (renaming = block_using (block);
+       renaming != NULL;
+       renaming = renaming->next)
+    {
+      const char *r_name;
+      int name_match;
+
+      /* Avoid infinite recursions: skip this renaming if we are actually
+	 already traversing it.
+
+	 Currently, symbol lookup in Ada don't use the namespace machinery from
+	 C++/Fortran support: skip namespace imports that use them.  */
+      if (renaming->searched
+	  || (renaming->import_src != NULL
+	      && renaming->import_src[0] != '\0')
+	  || (renaming->import_dest != NULL
+	      && renaming->import_dest[0] != '\0'))
+	continue;
+      renaming->searched = 1;
+
+      /* TODO: here, we perform another name-based symbol lookup, which can
+	 pull its own multiple overloads.  In theory, we should be able to do
+	 better in this case since, in DWARF, DW_AT_import is a DIE reference,
+	 not a simple name.  But in order to do this, we would need to enhance
+	 the DWARF reader to associate a symbol to this renaming, instead of a
+	 name.  So, for now, we do something simpler: re-use the C++/Fortran
+	 namespace machinery.  */
+      r_name = (renaming->alias != NULL
+		? renaming->alias
+		: renaming->declaration);
+      name_match
+	= wild_match_p ? wild_match (r_name, name) : strcmp (r_name, name);
+      if (name_match == 0)
+	ada_add_all_symbols (obstackp, block, renaming->declaration, domain,
+			     1, NULL);
+      renaming->searched = 0;
+    }
+  return num_defns_collected (obstackp) != defns_mark;
+}
+
 /* Implements compare_names, but only applying the comparision using
    the given CASING.  */
 
@@ -5423,6 +5656,7 @@ add_nonlocal_symbols (struct obstack *ob
 		      int is_wild_match)
 {
   struct objfile *objfile;
+  struct compunit_symtab *cu;
   struct match_data data;
 
   memset (&data, 0, sizeof data);
@@ -5440,13 +5674,23 @@ add_nonlocal_symbols (struct obstack *ob
 	objfile->sf->qf->map_matching_symbols (objfile, name, domain, global,
 					       aux_add_nonlocal_symbols, &data,
 					       full_match, compare_names);
+
+      ALL_OBJFILE_COMPUNITS (objfile, cu)
+	{
+	  const struct block *global_block
+	    = BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cu), GLOBAL_BLOCK);
+
+	  if (ada_add_block_renamings (obstackp, global_block , name, domain,
+				       is_wild_match))
+	    data.found_sym = 1;
+	}
     }
 
   if (num_defns_collected (obstackp) == 0 && global && !is_wild_match)
     {
       ALL_OBJFILES (objfile)
         {
-	  char *name1 = alloca (strlen (name) + sizeof ("_ada_"));
+	  char *name1 = (char *) alloca (strlen (name) + sizeof ("_ada_"));
 	  strcpy (name1, "_ada_");
 	  strcpy (name1 + sizeof ("_ada_") - 1, name);
 	  data.objfile = objfile;
@@ -5459,43 +5703,35 @@ add_nonlocal_symbols (struct obstack *ob
     }      	
 }
 
-/* Find symbols in DOMAIN matching NAME0, in BLOCK0 and, if full_search is
+/* Find symbols in DOMAIN matching NAME, in BLOCK and, if FULL_SEARCH is
    non-zero, enclosing scope and in global scopes, returning the number of
-   matches.
-   Sets *RESULTS to point to a vector of (SYM,BLOCK) tuples,
-   indicating the symbols found and the blocks and symbol tables (if
-   any) in which they were found.  This vector is transient---good only to
-   the next call of ada_lookup_symbol_list.
+   matches.  Add these to OBSTACKP.
 
-   When full_search is non-zero, any non-function/non-enumeral
-   symbol match within the nest of blocks whose innermost member is BLOCK0,
+   When FULL_SEARCH is non-zero, any non-function/non-enumeral
+   symbol match within the nest of blocks whose innermost member is BLOCK,
    is the one match returned (no other matches in that or
    enclosing blocks is returned).  If there are any matches in or
-   surrounding BLOCK0, then these alone are returned.
+   surrounding BLOCK, then these alone are returned.
 
    Names prefixed with "standard__" are handled specially: "standard__"
-   is first stripped off, and only static and global symbols are searched.  */
+   is first stripped off, and only static and global symbols are searched.
 
-static int
-ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
-			       domain_enum domain,
-			       struct ada_symbol_info **results,
-			       int full_search)
+   If MADE_GLOBAL_LOOKUP_P is non-null, set it before return to whether we had
+   to lookup global symbols.  */
+
+static void
+ada_add_all_symbols (struct obstack *obstackp,
+		     const struct block *block,
+		     const char *name,
+		     domain_enum domain,
+		     int full_search,
+		     int *made_global_lookup_p)
 {
   struct symbol *sym;
-  const struct block *block;
-  const char *name;
-  const int wild_match_p = should_use_wild_match (name0);
-  int syms_from_global_search = 0;
-  int ndefns;
-
-  obstack_free (&symbol_list_obstack, NULL);
-  obstack_init (&symbol_list_obstack);
-
-  /* Search specified block and its superiors.  */
+  const int wild_match_p = should_use_wild_match (name);
 
-  name = name0;
-  block = block0;
+  if (made_global_lookup_p)
+    *made_global_lookup_p = 0;
 
   /* Special case: If the user specifies a symbol name inside package
      Standard, do a non-wild matching of the symbol name without
@@ -5504,10 +5740,10 @@ ada_lookup_symbol_list_worker (const cha
      using, for instance, Standard.Constraint_Error when Constraint_Error
      is ambiguous (due to the user defining its own Constraint_Error
      entity inside its program).  */
-  if (startswith (name0, "standard__"))
+  if (startswith (name, "standard__"))
     {
       block = NULL;
-      name = name0 + sizeof ("standard__") - 1;
+      name = name + sizeof ("standard__") - 1;
     }
 
   /* Check the non-global symbols.  If we have ANY match, then we're done.  */
@@ -5515,61 +5751,88 @@ ada_lookup_symbol_list_worker (const cha
   if (block != NULL)
     {
       if (full_search)
-	{
-	  ada_add_local_symbols (&symbol_list_obstack, name, block,
-				 domain, wild_match_p);
-	}
+	ada_add_local_symbols (obstackp, name, block, domain, wild_match_p);
       else
 	{
 	  /* In the !full_search case we're are being called by
 	     ada_iterate_over_symbols, and we don't want to search
 	     superblocks.  */
-	  ada_add_block_symbols (&symbol_list_obstack, block, name,
-				 domain, NULL, wild_match_p);
+	  ada_add_block_symbols (obstackp, block, name, domain, NULL,
+				 wild_match_p);
 	}
-      if (num_defns_collected (&symbol_list_obstack) > 0 || !full_search)
-	goto done;
+      if (num_defns_collected (obstackp) > 0 || !full_search)
+	return;
     }
 
   /* No non-global symbols found.  Check our cache to see if we have
      already performed this search before.  If we have, then return
      the same result.  */
 
-  if (lookup_cached_symbol (name0, domain, &sym, &block))
+  if (lookup_cached_symbol (name, domain, &sym, &block))
     {
       if (sym != NULL)
-        add_defn_to_vec (&symbol_list_obstack, sym, block);
-      goto done;
+        add_defn_to_vec (obstackp, sym, block);
+      return;
     }
 
-  syms_from_global_search = 1;
+  if (made_global_lookup_p)
+    *made_global_lookup_p = 1;
 
   /* Search symbols from all global blocks.  */
  
-  add_nonlocal_symbols (&symbol_list_obstack, name, domain, 1,
-			wild_match_p);
+  add_nonlocal_symbols (obstackp, name, domain, 1, wild_match_p);
 
   /* Now add symbols from all per-file blocks if we've gotten no hits
      (not strictly correct, but perhaps better than an error).  */
 
-  if (num_defns_collected (&symbol_list_obstack) == 0)
-    add_nonlocal_symbols (&symbol_list_obstack, name, domain, 0,
-			  wild_match_p);
+  if (num_defns_collected (obstackp) == 0)
+    add_nonlocal_symbols (obstackp, name, domain, 0, wild_match_p);
+}
+
+/* Find symbols in DOMAIN matching NAME, in BLOCK and, if full_search is
+   non-zero, enclosing scope and in global scopes, returning the number of
+   matches.
+   Sets *RESULTS to point to a vector of (SYM,BLOCK) tuples,
+   indicating the symbols found and the blocks and symbol tables (if
+   any) in which they were found.  This vector is transient---good only to
+   the next call of ada_lookup_symbol_list.
+
+   When full_search is non-zero, any non-function/non-enumeral
+   symbol match within the nest of blocks whose innermost member is BLOCK,
+   is the one match returned (no other matches in that or
+   enclosing blocks is returned).  If there are any matches in or
+   surrounding BLOCK, then these alone are returned.
+
+   Names prefixed with "standard__" are handled specially: "standard__"
+   is first stripped off, and only static and global symbols are searched.  */
+
+static int
+ada_lookup_symbol_list_worker (const char *name, const struct block *block,
+			       domain_enum domain,
+			       struct block_symbol **results,
+			       int full_search)
+{
+  const int wild_match_p = should_use_wild_match (name);
+  int syms_from_global_search;
+  int ndefns;
+
+  obstack_free (&symbol_list_obstack, NULL);
+  obstack_init (&symbol_list_obstack);
+  ada_add_all_symbols (&symbol_list_obstack, block, name, domain,
+		       full_search, &syms_from_global_search);
 
-done:
   ndefns = num_defns_collected (&symbol_list_obstack);
   *results = defns_collected (&symbol_list_obstack, 1);
 
   ndefns = remove_extra_symbols (*results, ndefns);
 
   if (ndefns == 0 && full_search && syms_from_global_search)
-    cache_symbol (name0, domain, NULL, NULL);
+    cache_symbol (name, domain, NULL, NULL);
 
   if (ndefns == 1 && full_search && syms_from_global_search)
-    cache_symbol (name0, domain, (*results)[0].sym, (*results)[0].block);
-
-  ndefns = remove_irrelevant_renamings (*results, ndefns, block0);
+    cache_symbol (name, domain, (*results)[0].symbol, (*results)[0].block);
 
+  ndefns = remove_irrelevant_renamings (*results, ndefns, block);
   return ndefns;
 }
 
@@ -5580,7 +5843,7 @@ done:
 
 int
 ada_lookup_symbol_list (const char *name0, const struct block *block0,
-			domain_enum domain, struct ada_symbol_info **results)
+			domain_enum domain, struct block_symbol **results)
 {
   return ada_lookup_symbol_list_worker (name0, block0, domain, results, 1);
 }
@@ -5588,45 +5851,37 @@ ada_lookup_symbol_list (const char *name
 /* Implementation of the la_iterate_over_symbols method.  */
 
 static void
-ada_iterate_over_symbols (const struct block *block,
-			  const char *name, domain_enum domain,
-			  symbol_found_callback_ftype *callback,
-			  void *data)
+ada_iterate_over_symbols
+  (const struct block *block, const char *name, domain_enum domain,
+   gdb::function_view<symbol_found_callback_ftype> callback)
 {
   int ndefs, i;
-  struct ada_symbol_info *results;
+  struct block_symbol *results;
 
   ndefs = ada_lookup_symbol_list_worker (name, block, domain, &results, 0);
   for (i = 0; i < ndefs; ++i)
     {
-      if (! (*callback) (results[i].sym, data))
+      if (!callback (results[i].symbol))
 	break;
     }
 }
 
 /* If NAME is the name of an entity, return a string that should
-   be used to look that entity up in Ada units.  This string should
-   be deallocated after use using xfree.
+   be used to look that entity up in Ada units.
 
    NAME can have any form that the "break" or "print" commands might
    recognize.  In other words, it does not have to be the "natural"
    name, or the "encoded" name.  */
 
-char *
+std::string
 ada_name_for_lookup (const char *name)
 {
-  char *canon;
   int nlen = strlen (name);
 
   if (name[0] == '<' && name[nlen - 1] == '>')
-    {
-      canon = xmalloc (nlen - 1);
-      memcpy (canon, name + 1, nlen - 2);
-      canon[nlen - 2] = '\0';
-    }
+    return std::string (name + 1, nlen - 2);
   else
-    canon = xstrdup (ada_encode (ada_fold_name (name)));
-  return canon;
+    return ada_encode (ada_fold_name (name));
 }
 
 /* The result is as for ada_lookup_symbol_list with FULL_SEARCH set
@@ -5639,20 +5894,20 @@ ada_name_for_lookup (const char *name)
 void
 ada_lookup_encoded_symbol (const char *name, const struct block *block,
 			   domain_enum domain,
-			   struct ada_symbol_info *info)
+			   struct block_symbol *info)
 {
-  struct ada_symbol_info *candidates;
+  struct block_symbol *candidates;
   int n_candidates;
 
   gdb_assert (info != NULL);
-  memset (info, 0, sizeof (struct ada_symbol_info));
+  memset (info, 0, sizeof (struct block_symbol));
 
   n_candidates = ada_lookup_symbol_list (name, block, domain, &candidates);
   if (n_candidates == 0)
     return;
 
   *info = candidates[0];
-  info->sym = fixup_symbol_section (info->sym, NULL);
+  info->symbol = fixup_symbol_section (info->symbol, NULL);
 }
 
 /* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
@@ -5661,30 +5916,30 @@ ada_lookup_encoded_symbol (const char *n
    choosing the first symbol if there are multiple choices.
    If IS_A_FIELD_OF_THIS is not NULL, it is set to zero.  */
 
-struct symbol *
+struct block_symbol
 ada_lookup_symbol (const char *name, const struct block *block0,
                    domain_enum domain, int *is_a_field_of_this)
 {
-  struct ada_symbol_info info;
+  struct block_symbol info;
 
   if (is_a_field_of_this != NULL)
     *is_a_field_of_this = 0;
 
   ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
 			     block0, domain, &info);
-  return info.sym;
+  return info;
 }
 
-static struct symbol *
+static struct block_symbol
 ada_lookup_symbol_nonlocal (const struct language_defn *langdef,
 			    const char *name,
                             const struct block *block,
                             const domain_enum domain)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   sym = ada_lookup_symbol (name, block_static_block (block), domain, NULL);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   /* If we haven't found a match at this point, try the primitive
@@ -5707,12 +5962,12 @@ ada_lookup_symbol_nonlocal (const struct
 	gdbarch = target_gdbarch ();
       else
 	gdbarch = block_gdbarch (block);
-      sym = language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
-      if (sym != NULL)
+      sym.symbol = language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
+      if (sym.symbol != NULL)
 	return sym;
     }
 
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 
@@ -6036,6 +6291,11 @@ ada_add_block_symbols (struct obstack *o
       }
     }
 
+  /* Handle renamings.  */
+
+  if (ada_add_block_renamings (obstackp, block, name, domain, wild))
+    found_sym = 1;
+
   if (!found_sym && arg_sym != NULL)
     {
       add_defn_to_vec (obstackp,
@@ -6216,19 +6476,19 @@ symbol_completion_add (VEC(char_ptr) **s
 
   if (word == orig_text)
     {
-      completion = xmalloc (strlen (match) + 5);
+      completion = (char *) xmalloc (strlen (match) + 5);
       strcpy (completion, match);
     }
   else if (word > orig_text)
     {
       /* Return some portion of sym_name.  */
-      completion = xmalloc (strlen (match) + 5);
+      completion = (char *) xmalloc (strlen (match) + 5);
       strcpy (completion, match + (word - orig_text));
     }
   else
     {
       /* Return some of ORIG_TEXT plus sym_name.  */
-      completion = xmalloc (strlen (match) + (orig_text - word) + 5);
+      completion = (char *) xmalloc (strlen (match) + (orig_text - word) + 5);
       strncpy (completion, word, orig_text - word);
       completion[orig_text - word] = '\0';
       strcat (completion, match);
@@ -6237,30 +6497,6 @@ symbol_completion_add (VEC(char_ptr) **s
   VEC_safe_push (char_ptr, *sv, completion);
 }
 
-/* An object of this type is passed as the user_data argument to the
-   expand_symtabs_matching method.  */
-struct add_partial_datum
-{
-  VEC(char_ptr) **completions;
-  const char *text;
-  int text_len;
-  const char *text0;
-  const char *word;
-  int wild_match;
-  int encoded;
-};
-
-/* A callback for expand_symtabs_matching.  */
-
-static int
-ada_complete_symbol_matcher (const char *name, void *user_data)
-{
-  struct add_partial_datum *data = user_data;
-  
-  return symbol_completion_match (name, data->text, data->text_len,
-                                  data->wild_match, data->encoded) != NULL;
-}
-
 /* Return a list of possible symbol names completing TEXT0.  WORD is
    the entire command on which completion is made.  */
 
@@ -6309,19 +6545,16 @@ ada_make_symbol_completion_list (const c
     }
 
   /* First, look at the partial symtab symbols.  */
-  {
-    struct add_partial_datum data;
-
-    data.completions = &completions;
-    data.text = text;
-    data.text_len = text_len;
-    data.text0 = text0;
-    data.word = word;
-    data.wild_match = wild_match_p;
-    data.encoded = encoded_p;
-    expand_symtabs_matching (NULL, ada_complete_symbol_matcher, NULL,
-			     ALL_DOMAIN, &data);
-  }
+  expand_symtabs_matching (NULL,
+			   [&] (const char *symname)
+			   {
+			     return symbol_completion_match (symname,
+							     text, text_len,
+							     wild_match_p,
+							     encoded_p);
+			   },
+			   NULL,
+			   ALL_DOMAIN);
 
   /* At this point scan through the misc symbol vectors and add each
      symbol you find to the list.  Eventually we want to ignore
@@ -6794,6 +7027,17 @@ ada_is_wrapper_field (struct type *type,
 {
   const char *name = TYPE_FIELD_NAME (type, field_num);
 
+  if (name != NULL && strcmp (name, "RETVAL") == 0)
+    {
+      /* This happens in functions with "out" or "in out" parameters
+	 which are passed by copy.  For such functions, GNAT describes
+	 the function's return type as being a struct where the return
+	 value is in a field called RETVAL, and where the other "out"
+	 or "in out" parameters are fields of that struct.  This is not
+	 a wrapper.  */
+      return 0;
+    }
+
   return (name != NULL
           && (startswith (name, "PARENT")
               || strcmp (name, "REP") == 0
@@ -7121,7 +7365,7 @@ num_visible_fields (struct type *type)
    Searches recursively through wrapper fields (e.g., '_parent').  */
 
 static struct value *
-ada_search_struct_field (char *name, struct value *arg, int offset,
+ada_search_struct_field (const char *name, struct value *arg, int offset,
                          struct type *type)
 {
   int i;
@@ -7326,6 +7570,18 @@ ada_value_struct_elt (struct value *arg,
 	     "a value that is not a record."));
 }
 
+/* Return a string representation of type TYPE.  */
+
+static std::string
+type_as_string (struct type *type)
+{
+  string_file tmp_stream;
+
+  type_print (type, "", &tmp_stream, -1);
+
+  return std::move (tmp_stream.string ());
+}
+
 /* Given a type TYPE, look up the type of the component of type named NAME.
    If DISPP is non-null, add its byte displacement from the beginning of a
    structure (pointed to by a value) of type TYPE to *DISPP (does not
@@ -7368,20 +7624,9 @@ ada_lookup_struct_elt_type (struct type 
     {
       if (noerr)
         return NULL;
-      else
-        {
-          target_terminal_ours ();
-          gdb_flush (gdb_stdout);
-	  if (type == NULL)
-	    error (_("Type (null) is not a structure or union type"));
-	  else
-	    {
-	      /* XXX: type_sprint */
-	      fprintf_unfiltered (gdb_stderr, _("Type "));
-	      type_print (type, "", gdb_stderr, -1);
-	      error (_(" is not a structure or union type"));
-	    }
-        }
+
+      error (_("Type %s is not a structure or union type"),
+	     type != NULL ? type_as_string (type).c_str () : _("(null)"));
     }
 
   type = to_static_fixed_type (type);
@@ -7451,22 +7696,10 @@ ada_lookup_struct_elt_type (struct type 
 BadName:
   if (!noerr)
     {
-      target_terminal_ours ();
-      gdb_flush (gdb_stdout);
-      if (name == NULL)
-        {
-	  /* XXX: type_sprint */
-	  fprintf_unfiltered (gdb_stderr, _("Type "));
-	  type_print (type, "", gdb_stderr, -1);
-	  error (_(" has no component named <null>"));
-	}
-      else
-	{
-	  /* XXX: type_sprint */
-	  fprintf_unfiltered (gdb_stderr, _("Type "));
-	  type_print (type, "", gdb_stderr, -1);
-	  error (_(" has no component named %s"), name);
-	}
+      const char *name_str = name != NULL ? name : _("<null>");
+
+      error (_("Type %s has no component named %s"),
+	     type_as_string (type).c_str (), name_str);
     }
 
   return NULL;
@@ -7841,7 +8074,7 @@ find_parallel_type_by_descriptive_type (
 	result = tmp;
       else
 	{
-	  CHECK_TYPEDEF (result);
+	  result = check_typedef (result);
 	  if (HAVE_GNAT_AUX_INFO (result))
 	    result = TYPE_DESCRIPTIVE_TYPE (result);
 	  else
@@ -8485,7 +8718,7 @@ ada_is_redundant_range_encoding (struct 
 				 struct type *encoding_type)
 {
   struct type *fixed_range_type;
-  char *bounds_str;
+  const char *bounds_str;
   int n;
   LONGEST lo, hi;
 
@@ -8756,7 +8989,8 @@ ada_to_fixed_type_1 (struct type *type, 
         else if (ada_type_name (fixed_record_type) != NULL)
           {
             const char *name = ada_type_name (fixed_record_type);
-            char *xvz_name = alloca (strlen (name) + 7 /* "___XVZ\0" */);
+            char *xvz_name
+	      = (char *) alloca (strlen (name) + 7 /* "___XVZ\0" */);
             int xvz_found = 0;
             LONGEST size;
 
@@ -8943,7 +9177,7 @@ ada_check_typedef (struct type *type)
       && is_thick_pntr (ada_typedef_target_type (type)))
     return type;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM
       || !TYPE_STUB (type)
       || TYPE_TAG_NAME (type) == NULL)
@@ -9239,7 +9473,7 @@ ada_enum_name (const char *name)
 {
   static char *result;
   static size_t result_len = 0;
-  char *tmp;
+  const char *tmp;
 
   /* First, unqualify the enumeration name:
      1. Search for the last '.' character.  If we find one, then skip
@@ -9694,7 +9928,7 @@ assign_aggregate (struct value *containe
 
   num_specs = num_component_specs (exp, *pos - 3);
   max_indices = 4 * num_specs + 4;
-  indices = alloca (max_indices * sizeof (indices[0]));
+  indices = XALLOCAVEC (LONGEST, max_indices);
   indices[0] = indices[1] = low_index - 1;
   indices[2] = indices[3] = high_index + 1;
   num_indices = 4;
@@ -10504,8 +10738,7 @@ ada_evaluate_subexp (struct type *expect
       /* Allocate arg vector, including space for the function to be
          called in argvec[0] and a terminating NULL.  */
       nargs = longest_to_int (exp->elts[pc + 1].longconst);
-      argvec =
-        (struct value **) alloca (sizeof (struct value *) * (nargs + 2));
+      argvec = XALLOCAVEC (struct value *, nargs + 2);
 
       if (exp->elts[*pos].opcode == OP_VAR_VALUE
           && SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
@@ -10530,10 +10763,17 @@ ada_evaluate_subexp (struct type *expect
 	   therefore already coerced to a simple array.  Nothing further
 	   to do.  */
         ;
-      else if (TYPE_CODE (value_type (argvec[0])) == TYPE_CODE_REF
-               || (TYPE_CODE (value_type (argvec[0])) == TYPE_CODE_ARRAY
-                   && VALUE_LVAL (argvec[0]) == lval_memory))
-        argvec[0] = value_addr (argvec[0]);
+      else if (TYPE_CODE (value_type (argvec[0])) == TYPE_CODE_REF)
+	{
+	  /* Make sure we dereference references so that all the code below
+	     feels like it's really handling the referenced value.  Wrapping
+	     types (for alignment) may be there, so make sure we strip them as
+	     well.  */
+	  argvec[0] = ada_to_fixed_value (coerce_ref (argvec[0]));
+	}
+      else if (TYPE_CODE (value_type (argvec[0])) == TYPE_CODE_ARRAY
+	       && VALUE_LVAL (argvec[0]) == lval_memory)
+	argvec[0] = value_addr (argvec[0]);
 
       type = ada_check_typedef (value_type (argvec[0]));
 
@@ -11162,9 +11402,11 @@ ada_evaluate_subexp (struct type *expect
           return value_zero (ada_aligned_type (type), lval_memory);
         }
       else
-        arg1 = ada_value_struct_elt (arg1, &exp->elts[pc + 2].string, 0);
-        arg1 = unwrap_value (arg1);
-        return ada_to_fixed_value (arg1);
+	{
+	  arg1 = ada_value_struct_elt (arg1, &exp->elts[pc + 2].string, 0);
+	  arg1 = unwrap_value (arg1);
+	  return ada_to_fixed_value (arg1);
+	}
 
     case OP_TYPE:
       /* The value is not supposed to be used.  This is here to make it
@@ -11328,30 +11570,34 @@ ada_float_to_fixed (struct type *type, D
    not alter *PX and *PNEW_K if unsuccessful.  */
 
 static int
-scan_discrim_bound (char *str, int k, struct value *dval, LONGEST * px,
+scan_discrim_bound (const char *str, int k, struct value *dval, LONGEST * px,
                     int *pnew_k)
 {
   static char *bound_buffer = NULL;
   static size_t bound_buffer_len = 0;
-  char *bound;
-  char *pend;
+  const char *pstart, *pend, *bound;
   struct value *bound_val;
 
   if (dval == NULL || str == NULL || str[k] == '\0')
     return 0;
 
-  pend = strstr (str + k, "__");
+  pstart = str + k;
+  pend = strstr (pstart, "__");
   if (pend == NULL)
     {
-      bound = str + k;
+      bound = pstart;
       k += strlen (bound);
     }
   else
     {
-      GROW_VECT (bound_buffer, bound_buffer_len, pend - (str + k) + 1);
+      int len = pend - pstart;
+
+      /* Strip __ and beyond.  */
+      GROW_VECT (bound_buffer, bound_buffer_len, len + 1);
+      strncpy (bound_buffer, pstart, len);
+      bound_buffer[len] = '\0';
+
       bound = bound_buffer;
-      strncpy (bound_buffer, str + k, pend - (str + k));
-      bound[pend - (str + k)] = '\0';
       k = pend - str;
     }
 
@@ -11372,7 +11618,7 @@ scan_discrim_bound (char *str, int k, st
 static struct value *
 get_var_value (char *name, char *err_msg)
 {
-  struct ada_symbol_info *syms;
+  struct block_symbol *syms;
   int nsyms;
 
   nsyms = ada_lookup_symbol_list (name, get_selected_block (0), VAR_DOMAIN,
@@ -11386,7 +11632,7 @@ get_var_value (char *name, char *err_msg
         error (("%s"), err_msg);
     }
 
-  return value_of_variable (syms[0].sym, syms[0].block);
+  return value_of_variable (syms[0].symbol, syms[0].block);
 }
 
 /* Value of integer variable named NAME in the current environment.  If
@@ -11427,7 +11673,7 @@ to_fixed_range_type (struct type *raw_ty
 {
   const char *name;
   struct type *base_type;
-  char *subtype_info;
+  const char *subtype_info;
 
   gdb_assert (raw_type != NULL);
   gdb_assert (TYPE_NAME (raw_type) != NULL);
@@ -11457,7 +11703,7 @@ to_fixed_range_type (struct type *raw_ty
       int prefix_len = subtype_info - name;
       LONGEST L, U;
       struct type *type;
-      char *bounds_str;
+      const char *bounds_str;
       int n;
 
       GROW_VECT (name_buf, name_len, prefix_len + 5);
@@ -11906,6 +12152,8 @@ ada_unhandled_exception_name_addr_from_r
    (of any type), return the address in inferior memory where the name
    of the exception is stored, if applicable.
 
+   Assumes the selected frame is the current frame.
+
    Return zero if the address could not be computed, or if not relevant.  */
 
 static CORE_ADDR
@@ -11990,7 +12238,7 @@ struct ada_catchpoint_location
   /* The condition that checks whether the exception that was raised
      is the specific exception the user specified on catchpoint
      creation.  */
-  struct expression *excep_cond_expr;
+  expression_up excep_cond_expr;
 };
 
 /* Implement the DTOR method in the bp_location_ops structure for all
@@ -12001,7 +12249,7 @@ ada_catchpoint_location_dtor (struct bp_
 {
   struct ada_catchpoint_location *al = (struct ada_catchpoint_location *) bl;
 
-  xfree (al->excep_cond_expr);
+  al->excep_cond_expr.reset ();
 }
 
 /* The vtable to be used in Ada catchpoint locations.  */
@@ -12053,7 +12301,7 @@ create_excep_cond_exprs (struct ada_catc
     {
       struct ada_catchpoint_location *ada_loc
 	= (struct ada_catchpoint_location *) bl;
-      struct expression *exp = NULL;
+      expression_up exp;
 
       if (!bl->shlib_disabled)
 	{
@@ -12063,25 +12311,19 @@ create_excep_cond_exprs (struct ada_catc
 	  TRY
 	    {
 	      exp = parse_exp_1 (&s, bl->address,
-				 block_for_pc (bl->address), 0);
+				 block_for_pc (bl->address),
+				 0);
 	    }
 	  CATCH (e, RETURN_MASK_ERROR)
 	    {
 	      warning (_("failed to reevaluate internal exception condition "
 			 "for catchpoint %d: %s"),
 		       c->base.number, e.message);
-	      /* There is a bug in GCC on sparc-solaris when building with
-		 optimization which causes EXP to change unexpectedly
-		 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982).
-		 The problem should be fixed starting with GCC 4.9.
-		 In the meantime, work around it by forcing EXP back
-		 to NULL.  */
-	      exp = NULL;
 	    }
 	  END_CATCH
 	}
 
-      ada_loc->excep_cond_expr = exp;
+      ada_loc->excep_cond_expr = std::move (exp);
     }
 
   do_cleanups (old_chain);
@@ -12109,7 +12351,7 @@ allocate_location_exception (enum ada_ex
 {
   struct ada_catchpoint_location *loc;
 
-  loc = XNEW (struct ada_catchpoint_location);
+  loc = new ada_catchpoint_location ();
   init_bp_location (&loc->base, &ada_catchpoint_location_ops, self);
   loc->excep_cond_expr = NULL;
   return &loc->base;
@@ -12161,7 +12403,7 @@ should_stop_exception (const struct bp_l
       struct value *mark;
 
       mark = value_mark ();
-      stop = value_true (evaluate_expression (ada_loc->excep_cond_expr));
+      stop = value_true (evaluate_expression (ada_loc->excep_cond_expr.get ()));
       value_free_to_mark (mark);
     }
   CATCH (ex, RETURN_MASK_ALL)
@@ -12194,18 +12436,24 @@ print_it_exception (enum ada_exception_c
 
   annotate_catchpoint (b->number);
 
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
+      uiout->field_string ("reason",
 			   async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
     }
 
-  ui_out_text (uiout,
-               b->disposition == disp_del ? "\nTemporary catchpoint "
-	                                  : "\nCatchpoint ");
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, ", ");
+  uiout->text (b->disposition == disp_del
+	       ? "\nTemporary catchpoint " : "\nCatchpoint ");
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (", ");
+
+  /* ada_exception_name_addr relies on the selected frame being the
+     current frame.  Need to do this here because this function may be
+     called more than once when printing a stop, and below, we'll
+     select the first frame past the Ada run-time (see
+     ada_find_printable_frame).  */
+  select_frame (get_current_frame ());
 
   switch (ex)
     {
@@ -12237,8 +12485,8 @@ print_it_exception (enum ada_exception_c
 	     hit.  We used ui_out_text to make sure that this extra
 	     info does not pollute the exception name in the MI case.  */
 	  if (ex == ada_catch_exception_unhandled)
-	    ui_out_text (uiout, "unhandled ");
-	  ui_out_field_string (uiout, "exception-name", exception_name);
+	    uiout->text ("unhandled ");
+	  uiout->field_string ("exception-name", exception_name);
 	}
 	break;
       case ada_catch_assert:
@@ -12247,10 +12495,10 @@ print_it_exception (enum ada_exception_c
 	   that his program just hit an assertion-failure catchpoint.
 	   We used ui_out_text because this info does not belong in
 	   the MI output.  */
-	ui_out_text (uiout, "failed assertion");
+	uiout->text ("failed assertion");
 	break;
     }
-  ui_out_text (uiout, " at ");
+  uiout->text (" at ");
   ada_find_printable_frame (get_current_frame ());
 
   return PRINT_SRC_AND_LOC;
@@ -12271,7 +12519,7 @@ print_one_exception (enum ada_exception_
   if (opts.addressprint)
     {
       annotate_field (4);
-      ui_out_field_core_addr (uiout, "addr", b->loc->gdbarch, b->loc->address);
+      uiout->field_core_addr ("addr", b->loc->gdbarch, b->loc->address);
     }
 
   annotate_field (5);
@@ -12283,20 +12531,20 @@ print_one_exception (enum ada_exception_
           {
             char *msg = xstrprintf (_("`%s' Ada exception"), c->excep_string);
 
-            ui_out_field_string (uiout, "what", msg);
+            uiout->field_string ("what", msg);
             xfree (msg);
           }
         else
-          ui_out_field_string (uiout, "what", "all Ada exceptions");
+          uiout->field_string ("what", "all Ada exceptions");
         
         break;
 
       case ada_catch_exception_unhandled:
-        ui_out_field_string (uiout, "what", "unhandled Ada exceptions");
+        uiout->field_string ("what", "unhandled Ada exceptions");
         break;
       
       case ada_catch_assert:
-        ui_out_field_string (uiout, "what", "failed Ada assertions");
+        uiout->field_string ("what", "failed Ada assertions");
         break;
 
       default:
@@ -12315,10 +12563,10 @@ print_mention_exception (enum ada_except
   struct ada_catchpoint *c = (struct ada_catchpoint *) b;
   struct ui_out *uiout = current_uiout;
 
-  ui_out_text (uiout, b->disposition == disp_del ? _("Temporary catchpoint ")
+  uiout->text (b->disposition == disp_del ? _("Temporary catchpoint ")
                                                  : _("Catchpoint "));
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, ": ");
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (": ");
 
   switch (ex)
     {
@@ -12328,19 +12576,19 @@ print_mention_exception (enum ada_except
 	    char *info = xstrprintf (_("`%s' Ada exception"), c->excep_string);
 	    struct cleanup *old_chain = make_cleanup (xfree, info);
 
-	    ui_out_text (uiout, info);
+	    uiout->text (info);
 	    do_cleanups (old_chain);
 	  }
         else
-          ui_out_text (uiout, _("all Ada exceptions"));
+          uiout->text (_("all Ada exceptions"));
         break;
 
       case ada_catch_exception_unhandled:
-        ui_out_text (uiout, _("unhandled Ada exceptions"));
+        uiout->text (_("unhandled Ada exceptions"));
         break;
       
       case ada_catch_assert:
-        ui_out_text (uiout, _("failed Ada assertions"));
+        uiout->text (_("failed Ada assertions"));
         break;
 
       default:
@@ -12565,7 +12813,7 @@ ada_get_next_arg (char **argsp)
 
   /* Make a copy of the current argument and return it.  */
 
-  result = xmalloc (end - args + 1);
+  result = (char *) xmalloc (end - args + 1);
   strncpy (result, args, end - args);
   result[end - args] = '\0';
   
@@ -12818,7 +13066,7 @@ create_ada_exception_catchpoint (struct 
   struct symtab_and_line sal
     = ada_exception_sal (ex_kind, excep_string, &addr_string, &ops);
 
-  c = XNEW (struct ada_catchpoint);
+  c = new ada_catchpoint ();
   init_ada_exception_breakpoint (&c->base, gdbarch, sal, addr_string,
 				 ops, tempflag, disabled, from_tty);
   c->excep_string = excep_string;
@@ -12992,30 +13240,6 @@ sort_remove_dups_ada_exceptions_list (VE
   VEC_truncate(ada_exc_info, *exceptions, skip + to_sort_len);
 }
 
-/* A function intended as the "name_matcher" callback in the struct
-   quick_symbol_functions' expand_symtabs_matching method.
-
-   SEARCH_NAME is the symbol's search name.
-
-   If USER_DATA is not NULL, it is a pointer to a regext_t object
-   used to match the symbol (by natural name).  Otherwise, when USER_DATA
-   is null, no filtering is performed, and all symbols are a positive
-   match.  */
-
-static int
-ada_exc_search_name_matches (const char *search_name, void *user_data)
-{
-  regex_t *preg = user_data;
-
-  if (preg == NULL)
-    return 1;
-
-  /* In Ada, the symbol "search name" is a linkage name, whereas
-     the regular expression used to do the matching refers to
-     the natural name.  So match against the decoded name.  */
-  return (regexec (preg, ada_decode (search_name), 0, NULL, 0) == 0);
-}
-
 /* Add all exceptions defined by the Ada standard whose name match
    a regular expression.
 
@@ -13095,6 +13319,15 @@ ada_add_exceptions_from_frame (regex_t *
     }
 }
 
+/* Return true if NAME matches PREG or if PREG is NULL.  */
+
+static bool
+name_matches_regex (const char *name, regex_t *preg)
+{
+  return (preg == NULL
+	  || regexec (preg, ada_decode (name), 0, NULL, 0) == 0);
+}
+
 /* Add all exceptions defined globally whose name name match
    a regular expression, excluding standard exceptions.
 
@@ -13120,8 +13353,17 @@ ada_add_global_exceptions (regex_t *preg
   struct objfile *objfile;
   struct compunit_symtab *s;
 
-  expand_symtabs_matching (NULL, ada_exc_search_name_matches, NULL,
-			   VARIABLES_DOMAIN, preg);
+  /* In Ada, the symbol "search name" is a linkage name, whereas the
+     regular expression used to do the matching refers to the natural
+     name.  So match against the decoded name.  */
+  expand_symtabs_matching (NULL,
+			   [&] (const char *search_name)
+			   {
+			     const char *decoded = ada_decode (search_name);
+			     return name_matches_regex (decoded, preg);
+			   },
+			   NULL,
+			   VARIABLES_DOMAIN);
 
   ALL_COMPUNITS (objfile, s)
     {
@@ -13136,9 +13378,7 @@ ada_add_global_exceptions (regex_t *preg
 
 	  ALL_BLOCK_SYMBOLS (b, iter, sym)
 	    if (ada_is_non_standard_exception_sym (sym)
-		&& (preg == NULL
-		    || regexec (preg, SYMBOL_NATURAL_NAME (sym),
-				0, NULL, 0) == 0))
+		&& name_matches_regex (SYMBOL_NATURAL_NAME (sym), preg))
 	      {
 		struct ada_exc_info info
 		  = {SYMBOL_PRINT_NAME (sym), SYMBOL_VALUE_ADDRESS (sym)};
@@ -13636,7 +13876,7 @@ static const struct op_print ada_op_prin
   {".all", UNOP_IND, PREC_SUFFIX, 1},
   {"'access", UNOP_ADDR, PREC_SUFFIX, 1},
   {"'size", OP_ATR_SIZE, PREC_SUFFIX, 1},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_SUFFIX, 0}
 };
 
 enum ada_primitive_types {
@@ -13676,19 +13916,19 @@ ada_language_arch_info (struct gdbarch *
 			 0, "short_integer");
   lai->string_char_type
     = lai->primitive_type_vector [ada_primitive_type_char]
-    = arch_integer_type (gdbarch, TARGET_CHAR_BIT, 0, "character");
+    = arch_character_type (gdbarch, TARGET_CHAR_BIT, 0, "character");
   lai->primitive_type_vector [ada_primitive_type_float]
     = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
-		       "float", NULL);
+		       "float", gdbarch_float_format (gdbarch));
   lai->primitive_type_vector [ada_primitive_type_double]
     = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
-		       "long_float", NULL);
+		       "long_float", gdbarch_double_format (gdbarch));
   lai->primitive_type_vector [ada_primitive_type_long_long]
     = arch_integer_type (gdbarch, gdbarch_long_long_bit (gdbarch),
 			 0, "long_long_integer");
   lai->primitive_type_vector [ada_primitive_type_long_double]
-    = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
-		       "long_long_float", NULL);
+    = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
+		       "long_long_float", gdbarch_long_double_format (gdbarch));
   lai->primitive_type_vector [ada_primitive_type_natural]
     = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
 			 0, "natural");
@@ -13748,7 +13988,8 @@ ada_get_symbol_name_cmp (const char *loo
 /* Implement the "la_read_var_value" language_defn method for Ada.  */
 
 static struct value *
-ada_read_var_value (struct symbol *var, struct frame_info *frame)
+ada_read_var_value (struct symbol *var, const struct block *var_block,
+		    struct frame_info *frame)
 {
   const struct block *frame_block = NULL;
   struct symbol *renaming_sym = NULL;
@@ -13764,9 +14005,14 @@ ada_read_var_value (struct symbol *var, 
 
   /* This is a typical case where we expect the default_read_var_value
      function to work.  */
-  return default_read_var_value (var, frame);
+  return default_read_var_value (var, var_block, frame);
 }
 
+static const char *ada_extensions[] =
+{
+  ".adb", ".ads", ".a", ".ada", ".dg", NULL
+};
+
 const struct language_defn ada_language_defn = {
   "ada",                        /* Language name */
   "Ada",
@@ -13776,9 +14022,10 @@ const struct language_defn ada_language_
                                    that's not quite what this means.  */
   array_row_major,
   macro_expansion_no,
+  ada_extensions,
   &ada_exp_descriptor,
   parse,
-  ada_error,
+  ada_yyerror,
   resolve,
   ada_printchar,                /* Print a character constant */
   ada_printstr,                 /* Function to print string constant */
@@ -13793,6 +14040,7 @@ const struct language_defn ada_language_
   ada_lookup_symbol_nonlocal,   /* Looking up non-local symbols.  */
   basic_lookup_transparent_type,        /* lookup_transparent_type */
   ada_la_decode,                /* Language specific symbol demangler */
+  ada_sniff_from_mangled_name,
   NULL,                         /* Language specific
 				   class_name_from_physname */
   ada_op_print_tab,             /* expression operators for printing */
@@ -13923,6 +14171,14 @@ this incurs a slight performance penalty
 this option to \"off\" unless necessary."),
                             NULL, NULL, &set_ada_list, &show_ada_list);
 
+  add_setshow_boolean_cmd ("print-signatures", class_vars,
+			   &print_signatures, _("\
+Enable or disable the output of formal and return types for functions in the \
+overloads selection menu"), _("\
+Show whether the output of formal and return types for functions in the \
+overloads selection menu is activated"),
+			   NULL, NULL, NULL, &set_ada_list, &show_ada_list);
+
   add_catch_command ("exception", _("\
 Catch Ada exceptions, when raised.\n\
 With an argument, catch only exceptions with the given name."),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lang.h ./gdb/ada-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ada language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -79,17 +79,6 @@ struct ada_opname_map
 /* Defined in ada-lang.c */
 extern const struct ada_opname_map ada_opname_table[];
 
-/* A tuple representing one instance of a symbol-lookup operation.  */
-
-struct ada_symbol_info
-{
-  /* The symbol that was found.  */
-  struct symbol *sym;
-
-  /* The block where the symbol was found.  */
-  const struct block *block;
-};
-
 /* Denotes a type of renaming symbol (see ada_parse_renaming).  */
 enum ada_renaming_category
   {
@@ -158,7 +147,7 @@ struct ada_task_info
    least M objects, updating V and S as necessary.  */
 
 #define GROW_VECT(v, s, m)                                    \
-   if ((s) < (m)) (v) = grow_vect (v, &(s), m, sizeof *(v));
+   if ((s) < (m)) (v) = (char *) grow_vect (v, &(s), m, sizeof *(v));
 
 extern void *grow_vect (void *, size_t *, size_t, int);
 
@@ -170,7 +159,7 @@ extern int ada_get_field_index (const st
 
 extern int ada_parse (struct parser_state *);    /* Defined in ada-exp.y */
 
-extern void ada_error (char *); /* Defined in ada-exp.y */
+extern void ada_yyerror (char *); /* Defined in ada-exp.y */
 
                         /* Defined in ada-typeprint.c */
 extern void ada_print_type (struct type *, const char *, struct ui_file *, int,
@@ -179,9 +168,9 @@ extern void ada_print_type (struct type 
 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
 			       struct ui_file *stream);
 
-extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+extern void ada_val_print (struct type *, int, CORE_ADDR,
 			   struct ui_file *, int,
-			   const struct value *,
+			   struct value *,
 			   const struct value_print_options *);
 
 extern void ada_value_print (struct value *, struct ui_file *,
@@ -236,22 +225,23 @@ extern const char *ada_decode (const cha
 extern enum language ada_update_initial_language (enum language);
 
 extern int ada_lookup_symbol_list (const char *, const struct block *,
-                                   domain_enum, struct ada_symbol_info**);
+                                   domain_enum, struct block_symbol**);
 
 extern char *ada_fold_name (const char *);
 
-extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
-                                         domain_enum, int *);
+extern struct block_symbol ada_lookup_symbol (const char *,
+					      const struct block *,
+					      domain_enum, int *);
 
 extern void ada_lookup_encoded_symbol
   (const char *name, const struct block *block, domain_enum domain,
-   struct ada_symbol_info *symbol_info);
+   struct block_symbol *symbol_info);
 
 extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *);
 
 extern void ada_fill_in_ada_prototype (struct symbol *);
 
-extern int user_select_syms (struct ada_symbol_info *, int, int);
+extern int user_select_syms (struct block_symbol *, int, int);
 
 extern int get_selections (int *, int, int, int, char *);
 
@@ -380,7 +370,7 @@ extern char *ada_breakpoint_rewrite (cha
 
 extern char *ada_main_name (void);
 
-extern char *ada_name_for_lookup (const char *name);
+extern std::string ada_name_for_lookup (const char *name);
 
 extern void create_ada_exception_catchpoint
   (struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lex.c ./gdb/ada-lex.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lex.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/ada-lex.c	2017-03-06 01:53:00.000000000 +0000
@@ -811,7 +811,7 @@ int yy_flex_debug = 0;
 char *yytext;
 #line 1 "ada-lex.l"
 /* FLEX lexer for Ada expressions, for GDB.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1373,7 +1373,7 @@ case 34:
 /* rule 34 can match eol */
 YY_RULE_SETUP
 #line 208 "ada-lex.l"
-{ return processAttribute (yytext+1); }
+{ BEGIN INITIAL; return processAttribute (yytext+1); }
 	YY_BREAK
 /* PUNCTUATION */
 case 35:
@@ -2669,7 +2669,7 @@ processReal (struct parser_state *par_st
 static struct stoken
 processId (const char *name0, int len)
 {
-  char *name = obstack_alloc (&temp_parse_space, len + 11);
+  char *name = (char *) obstack_alloc (&temp_parse_space, len + 11);
   int i0, i;
   struct stoken result;
 
@@ -2740,7 +2740,7 @@ processString (const char *text, int len
   const char *lim = text + len;
   struct stoken result;
 
-  q = obstack_alloc (&temp_parse_space, len);
+  q = (char *) obstack_alloc (&temp_parse_space, len);
   result.ptr = q;
   p = text;
   while (p < lim)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lex.l ./gdb/ada-lex.l
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-lex.l	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-lex.l	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* FLEX lexer for Ada expressions, for GDB.
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -205,7 +205,7 @@ false		{ return FALSEKEYWORD; }
 
         /* ATTRIBUTES */
 
-{TICK}[a-zA-Z][a-zA-Z]+ { return processAttribute (yytext+1); }
+{TICK}[a-zA-Z][a-zA-Z]+ { BEGIN INITIAL; return processAttribute (yytext+1); }
 
 	/* PUNCTUATION */
 
@@ -428,7 +428,7 @@ processReal (struct parser_state *par_st
 static struct stoken
 processId (const char *name0, int len)
 {
-  char *name = obstack_alloc (&temp_parse_space, len + 11);
+  char *name = (char *) obstack_alloc (&temp_parse_space, len + 11);
   int i0, i;
   struct stoken result;
 
@@ -499,7 +499,7 @@ processString (const char *text, int len
   const char *lim = text + len;
   struct stoken result;
 
-  q = obstack_alloc (&temp_parse_space, len);
+  q = (char *) obstack_alloc (&temp_parse_space, len);
   result.ptr = q;
   p = text;
   while (p < lim)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-operator.def ./gdb/ada-operator.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-operator.def	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-operator.def	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ada language operator definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-tasks.c ./gdb/ada-tasks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-tasks.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-tasks.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -248,7 +248,8 @@ get_ada_tasks_pspace_data (struct progra
 {
   struct ada_tasks_pspace_data *data;
 
-  data = program_space_data (pspace, ada_tasks_pspace_data_handle);
+  data = ((struct ada_tasks_pspace_data *)
+	  program_space_data (pspace, ada_tasks_pspace_data_handle));
   if (data == NULL)
     {
       data = XCNEW (struct ada_tasks_pspace_data);
@@ -275,7 +276,8 @@ get_ada_tasks_inferior_data (struct infe
 {
   struct ada_tasks_inferior_data *data;
 
-  data = inferior_data (inf, ada_tasks_inferior_data_handle);
+  data = ((struct ada_tasks_inferior_data *)
+	  inferior_data (inf, ada_tasks_inferior_data_handle));
   if (data == NULL)
     {
       data = XCNEW (struct ada_tasks_inferior_data);
@@ -471,23 +473,24 @@ get_tcb_types_info (void)
 
   struct symbol *atcb_sym =
     lookup_symbol_in_language (atcb_name, NULL, STRUCT_DOMAIN,
-			       language_c, NULL);
+			       language_c, NULL).symbol;
   const struct symbol *common_atcb_sym =
     lookup_symbol_in_language (common_atcb_name, NULL, STRUCT_DOMAIN,
-			       language_c, NULL);
+			       language_c, NULL).symbol;
   const struct symbol *private_data_sym =
     lookup_symbol_in_language (private_data_name, NULL, STRUCT_DOMAIN,
-			       language_c, NULL);
+			       language_c, NULL).symbol;
   const struct symbol *entry_call_record_sym =
     lookup_symbol_in_language (entry_call_record_name, NULL, STRUCT_DOMAIN,
-			       language_c, NULL);
+			       language_c, NULL).symbol;
 
   if (atcb_sym == NULL || atcb_sym->type == NULL)
     {
       /* In Ravenscar run-time libs, the  ATCB does not have a dynamic
          size, so the symbol name differs.  */
       atcb_sym = lookup_symbol_in_language (atcb_name_fixed, NULL,
-					    STRUCT_DOMAIN, language_c, NULL);
+					    STRUCT_DOMAIN, language_c,
+					    NULL).symbol;
 
       if (atcb_sym == NULL || atcb_sym->type == NULL)
         error (_("Cannot find Ada_Task_Control_Block type. Aborting"));
@@ -783,7 +786,7 @@ read_known_tasks_array (struct ada_tasks
 {
   const int target_ptr_byte = TYPE_LENGTH (data->known_tasks_element);
   const int known_tasks_size = target_ptr_byte * data->known_tasks_length;
-  gdb_byte *known_tasks = alloca (known_tasks_size);
+  gdb_byte *known_tasks = (gdb_byte *) alloca (known_tasks_size);
   int i;
 
   /* Build a new list by reading the ATCBs from the Known_Tasks array
@@ -809,7 +812,7 @@ static int
 read_known_tasks_list (struct ada_tasks_inferior_data *data)
 {
   const int target_ptr_byte = TYPE_LENGTH (data->known_tasks_element);
-  gdb_byte *known_tasks = alloca (target_ptr_byte);
+  gdb_byte *known_tasks = (gdb_byte *) alloca (target_ptr_byte);
   CORE_ADDR task_id;
   const struct ada_tasks_pspace_data *pspace_data
     = get_ada_tasks_pspace_data (current_program_space);
@@ -863,7 +866,7 @@ ada_tasks_inferior_data_sniffer (struct 
 
       /* Try to get pointer type and array length from the symtab.  */
       sym = lookup_symbol_in_language (KNOWN_TASKS_NAME, NULL, VAR_DOMAIN,
-				       language_c, NULL);
+				       language_c, NULL).symbol;
       if (sym != NULL)
 	{
 	  /* Validate.  */
@@ -908,7 +911,7 @@ ada_tasks_inferior_data_sniffer (struct 
       data->known_tasks_length = 1;
 
       sym = lookup_symbol_in_language (KNOWN_TASKS_LIST, NULL, VAR_DOMAIN,
-				       language_c, NULL);
+				       language_c, NULL).symbol;
       if (sym != NULL && SYMBOL_VALUE_ADDRESS (sym) != 0)
 	{
 	  /* Validate.  */
@@ -1010,15 +1013,14 @@ print_ada_task_info (struct ui_out *uiou
 
   if (ada_build_task_list () == 0)
     {
-      ui_out_message (uiout, 0,
-		      _("Your application does not use any Ada tasks.\n"));
+      uiout->message (_("Your application does not use any Ada tasks.\n"));
       return;
     }
 
   if (arg_str != NULL && arg_str[0] != '\0')
     taskno_arg = value_as_long (parse_and_eval (arg_str));
 
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     /* In GDB/MI mode, we want to provide the thread ID corresponding
        to each task.  This allows clients to quickly find the thread
        associated to any task, which is helpful for commands that
@@ -1044,25 +1046,25 @@ print_ada_task_info (struct ui_out *uiou
   else
     nb_tasks = VEC_length (ada_task_info_s, data->task_list);
 
-  nb_columns = ui_out_is_mi_like_p (uiout) ? 8 : 7;
+  nb_columns = uiout->is_mi_like_p () ? 8 : 7;
   old_chain = make_cleanup_ui_out_table_begin_end (uiout, nb_columns,
 						   nb_tasks, "tasks");
-  ui_out_table_header (uiout, 1, ui_left, "current", "");
-  ui_out_table_header (uiout, 3, ui_right, "id", "ID");
-  ui_out_table_header (uiout, 9, ui_right, "task-id", "TID");
+  uiout->table_header (1, ui_left, "current", "");
+  uiout->table_header (3, ui_right, "id", "ID");
+  uiout->table_header (9, ui_right, "task-id", "TID");
   /* The following column is provided in GDB/MI mode only because
      it is only really useful in that mode, and also because it
      allows us to keep the CLI output shorter and more compact.  */
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_table_header (uiout, 4, ui_right, "thread-id", "");
-  ui_out_table_header (uiout, 4, ui_right, "parent-id", "P-ID");
-  ui_out_table_header (uiout, 3, ui_right, "priority", "Pri");
-  ui_out_table_header (uiout, 22, ui_left, "state", "State");
+  if (uiout->is_mi_like_p ())
+    uiout->table_header (4, ui_right, "thread-id", "");
+  uiout->table_header (4, ui_right, "parent-id", "P-ID");
+  uiout->table_header (3, ui_right, "priority", "Pri");
+  uiout->table_header (22, ui_left, "state", "State");
   /* Use ui_noalign for the last column, to prevent the CLI uiout
      from printing an extra space at the end of each row.  This
      is a bit of a hack, but does get the job done.  */
-  ui_out_table_header (uiout, 1, ui_noalign, "name", "Name");
-  ui_out_table_body (uiout);
+  uiout->table_header (1, ui_noalign, "name", "Name");
+  uiout->table_body ();
 
   for (taskno = 1;
        taskno <= VEC_length (ada_task_info_s, data->task_list);
@@ -1086,61 +1088,61 @@ print_ada_task_info (struct ui_out *uiou
       /* Print a star if this task is the current task (or the task
          currently selected).  */
       if (ptid_equal (task_info->ptid, inferior_ptid))
-	ui_out_field_string (uiout, "current", "*");
+	uiout->field_string ("current", "*");
       else
-	ui_out_field_skip (uiout, "current");
+	uiout->field_skip ("current");
 
       /* Print the task number.  */
-      ui_out_field_int (uiout, "id", taskno);
+      uiout->field_int ("id", taskno);
 
       /* Print the Task ID.  */
-      ui_out_field_fmt (uiout, "task-id", "%9lx", (long) task_info->task_id);
+      uiout->field_fmt ("task-id", "%9lx", (long) task_info->task_id);
 
       /* Print the associated Thread ID.  */
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
         {
-	  const int thread_id = pid_to_thread_id (task_info->ptid);
+	  const int thread_id = ptid_to_global_thread_id (task_info->ptid);
 
 	  if (thread_id != 0)
-	    ui_out_field_int (uiout, "thread-id", thread_id);
+	    uiout->field_int ("thread-id", thread_id);
 	  else
 	    /* This should never happen unless there is a bug somewhere,
 	       but be resilient when that happens.  */
-	    ui_out_field_skip (uiout, "thread-id");
+	    uiout->field_skip ("thread-id");
 	}
 
       /* Print the ID of the parent task.  */
       parent_id = get_task_number_from_id (task_info->parent, inf);
       if (parent_id)
-        ui_out_field_int (uiout, "parent-id", parent_id);
+        uiout->field_int ("parent-id", parent_id);
       else
-        ui_out_field_skip (uiout, "parent-id");
+        uiout->field_skip ("parent-id");
 
       /* Print the base priority of the task.  */
-      ui_out_field_int (uiout, "priority", task_info->priority);
+      uiout->field_int ("priority", task_info->priority);
 
       /* Print the task current state.  */
       if (task_info->caller_task)
-	ui_out_field_fmt (uiout, "state",
+	uiout->field_fmt ("state",
 			  _("Accepting RV with %-4d"),
 			  get_task_number_from_id (task_info->caller_task,
 						   inf));
       else if (task_info->state == Entry_Caller_Sleep
 	       && task_info->called_task)
-	ui_out_field_fmt (uiout, "state",
+	uiout->field_fmt ("state",
 			  _("Waiting on RV with %-3d"),
 			  get_task_number_from_id (task_info->called_task,
 						   inf));
       else
-	ui_out_field_string (uiout, "state", task_states[task_info->state]);
+	uiout->field_string ("state", task_states[task_info->state]);
 
       /* Finally, print the task name.  */
-      ui_out_field_fmt (uiout, "name",
+      uiout->field_fmt ("name",
 			"%s",
 			task_info->name[0] != '\0' ? task_info->name
 						   : _("<no name>"));
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
       do_cleanups (chain2);
     }
 
@@ -1160,8 +1162,7 @@ info_task (struct ui_out *uiout, char *t
 
   if (ada_build_task_list () == 0)
     {
-      ui_out_message (uiout, 0,
-		      _("Your application does not use any Ada tasks.\n"));
+      uiout->message (_("Your application does not use any Ada tasks.\n"));
       return;
     }
 
@@ -1325,8 +1326,7 @@ task_command (char *taskno_str, int from
 
   if (ada_build_task_list () == 0)
     {
-      ui_out_message (uiout, 0,
-		      _("Your application does not use any Ada tasks.\n"));
+      uiout->message (_("Your application does not use any Ada tasks.\n"));
       return;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-typeprint.c ./gdb/ada-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for printing Ada types for GDB, the GNU debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,7 +64,7 @@ decoded_type_name (struct type *type)
       if (name_buffer == NULL || name_buffer_len <= strlen (raw_name))
 	{
 	  name_buffer_len = 16 + 2 * strlen (raw_name);
-	  name_buffer = xrealloc (name_buffer, name_buffer_len);
+	  name_buffer = (char *) xrealloc (name_buffer, name_buffer_len);
 	}
       strcpy (name_buffer, raw_name);
 
@@ -203,7 +203,7 @@ print_range (struct type *type, struct u
    set *N past the bound and its delimiter, if any.  */
 
 static void
-print_range_bound (struct type *type, char *bounds, int *n,
+print_range_bound (struct type *type, const char *bounds, int *n,
 		   struct ui_file *stream)
 {
   LONGEST B;
@@ -230,8 +230,8 @@ print_range_bound (struct type *type, ch
   else
     {
       int bound_len;
-      char *bound = bounds + *n;
-      char *pend;
+      const char *bound = bounds + *n;
+      const char *pend;
 
       pend = strstr (bound, "__");
       if (pend == NULL)
@@ -300,7 +300,7 @@ print_range_type (struct type *raw_type,
   else
     {
       int prefix_len = subtype_info - name;
-      char *bounds_str;
+      const char *bounds_str;
       int n;
 
       subtype_info += 5;
@@ -363,7 +363,7 @@ static void
 print_fixed_point_type (struct type *type, struct ui_file *stream)
 {
   DOUBLEST delta = ada_delta (type);
-  DOUBLEST small = ada_fixed_to_float (type, 1.0);
+  DOUBLEST small = ada_fixed_to_float (type, 1);
 
   if (delta < 0.0)
     fprintf_filtered (stream, "delta ??");
@@ -386,6 +386,7 @@ print_array_type (struct type *type, str
 {
   int bitsize;
   int n_indices;
+  struct type *elt_type = NULL;
 
   if (ada_is_constrained_packed_array_type (type))
     type = ada_coerce_to_simple_array_type (type);
@@ -448,11 +449,15 @@ print_array_type (struct type *type, str
 	fprintf_filtered (stream, "%s<>", i == i0 ? "" : ", ");
     }
 
+  elt_type = ada_array_element_type (type, n_indices);
   fprintf_filtered (stream, ") of ");
   wrap_here ("");
-  ada_print_type (ada_array_element_type (type, n_indices), "", stream,
-		  show == 0 ? 0 : show - 1, level + 1, flags);
-  if (bitsize > 0)
+  ada_print_type (elt_type, "", stream, show == 0 ? 0 : show - 1, level + 1,
+		  flags);
+  /* Arrays with variable-length elements are never bit-packed in practice but
+     compilers have to describe their stride so that we can properly fetch
+     individual elements.  Do not say the array is packed in this case.  */
+  if (bitsize > 0 && !is_dynamic_type (elt_type))
     fprintf_filtered (stream, " <packed: %d-bit elements>", bitsize);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-valprint.c ./gdb/ada-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Ada values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,7 +35,7 @@
 static int print_field_values (struct type *, const gdb_byte *,
 			       int,
 			       struct ui_file *, int,
-			       const struct value *,
+			       struct value *,
 			       const struct value_print_options *,
 			       int, struct type *, int,
 			       const struct language_defn *);
@@ -122,7 +122,7 @@ val_print_packed_array_elements (struct 
 				 int offset,
 				 int bitoffset, struct ui_file *stream,
 				 int recurse,
-				 const struct value *val,
+				 struct value *val,
 				 const struct value_print_options *options)
 {
   unsigned int i;
@@ -196,7 +196,7 @@ val_print_packed_array_elements (struct 
 	  struct value_print_options opts = *options;
 
 	  opts.deref_ref = 0;
-	  val_print (elttype, value_contents_for_printing (v0),
+	  val_print (elttype,
 		     value_embedded_offset (v0), 0, stream,
 		     recurse + 1, v0, &opts, current_language);
 	  annotate_elt_rep (i - i0);
@@ -227,7 +227,7 @@ val_print_packed_array_elements (struct 
 		  maybe_print_array_index (index_type, j + low,
 					   stream, options);
 		}
-	      val_print (elttype, value_contents_for_printing (v0),
+	      val_print (elttype,
 			 value_embedded_offset (v0), 0, stream,
 			 recurse + 1, v0, &opts, current_language);
 	      annotate_elt ();
@@ -298,51 +298,49 @@ static void
 ada_print_floating (const gdb_byte *valaddr, struct type *type,
 		    struct ui_file *stream)
 {
-  char *s, *result;
-  struct ui_file *tmp_stream = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_stream);
-
-  print_floating (valaddr, type, tmp_stream);
-  result = ui_file_xstrdup (tmp_stream, NULL);
-  make_cleanup (xfree, result);
+  string_file tmp_stream;
+
+  print_floating (valaddr, type, &tmp_stream);
+
+  std::string &s = tmp_stream.string ();
+  size_t skip_count = 0;
 
   /* Modify for Ada rules.  */
 
-  s = strstr (result, "inf");
-  if (s == NULL)
-    s = strstr (result, "Inf");
-  if (s == NULL)
-    s = strstr (result, "INF");
-  if (s != NULL)
-    strcpy (s, "Inf");
-
-  if (s == NULL)
-    {
-      s = strstr (result, "nan");
-      if (s == NULL)
-	s = strstr (result, "NaN");
-      if (s == NULL)
-	s = strstr (result, "Nan");
-      if (s != NULL)
-	{
-	  s[0] = s[2] = 'N';
-	  if (result[0] == '-')
-	    result += 1;
+  size_t pos = s.find ("inf");
+  if (pos == std::string::npos)
+    pos = s.find ("Inf");
+  if (pos == std::string::npos)
+    pos = s.find ("INF");
+  if (pos != std::string::npos)
+    s.replace (pos, 3, "Inf");
+
+  if (pos == std::string::npos)
+    {
+      pos = s.find ("nan");
+      if (pos == std::string::npos)
+	pos = s.find ("NaN");
+      if (pos == std::string::npos)
+	pos = s.find ("Nan");
+      if (pos != std::string::npos)
+	{
+	  s[pos] = s[pos + 2] = 'N';
+	  if (s[0] == '-')
+	    skip_count = 1;
 	}
     }
 
-  if (s == NULL && strchr (result, '.') == NULL)
-    {
-      s = strchr (result, 'e');
-      if (s == NULL)
-	fprintf_filtered (stream, "%s.0", result);
+  if (pos == std::string::npos
+      && s.find ('.') == std::string::npos)
+    {
+      pos = s.find ('e');
+      if (pos == std::string::npos)
+	fprintf_filtered (stream, "%s.0", s.c_str ());
       else
-	fprintf_filtered (stream, "%.*s.0%s", (int) (s-result), result, s);
+	fprintf_filtered (stream, "%.*s.0%s", (int) pos, s.c_str (), &s[pos]);
     }
   else
-    fprintf_filtered (stream, "%s", result);
-
-  do_cleanups (cleanups);
+    fprintf_filtered (stream, "%s", &s[skip_count]);
 }
 
 void
@@ -533,7 +531,7 @@ static int
 print_variant_part (struct type *type, int field_num,
 		    const gdb_byte *valaddr, int offset,
 		    struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct value *val,
 		    const struct value_print_options *options,
 		    int comma_needed,
 		    struct type *outer_type, int outer_offset,
@@ -573,7 +571,7 @@ print_variant_part (struct type *type, i
 static int
 print_field_values (struct type *type, const gdb_byte *valaddr,
 		    int offset, struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct value *val,
 		    const struct value_print_options *options,
 		    int comma_needed,
 		    struct type *outer_type, int outer_offset,
@@ -633,8 +631,6 @@ print_field_values (struct type *type, c
 
       if (TYPE_FIELD_PACKED (type, i))
 	{
-	  struct value *v;
-
 	  /* Bitfields require special handling, especially due to byte
 	     order problems.  */
 	  if (HAVE_CPLUS_STRUCT (type) && TYPE_FIELD_IGNORE (type, i))
@@ -643,6 +639,7 @@ print_field_values (struct type *type, c
 	    }
 	  else
 	    {
+	      struct value *v;
 	      int bit_pos = TYPE_FIELD_BITPOS (type, i);
 	      int bit_size = TYPE_FIELD_BITSIZE (type, i);
 	      struct value_print_options opts;
@@ -656,7 +653,6 @@ print_field_values (struct type *type, c
 	      opts = *options;
 	      opts.deref_ref = 0;
 	      val_print (TYPE_FIELD_TYPE (type, i),
-			 value_contents_for_printing (v),
 			 value_embedded_offset (v), 0,
 			 stream, recurse + 1, v,
 			 &opts, language);
@@ -667,7 +663,7 @@ print_field_values (struct type *type, c
 	  struct value_print_options opts = *options;
 
 	  opts.deref_ref = 0;
-	  val_print (TYPE_FIELD_TYPE (type, i), valaddr,
+	  val_print (TYPE_FIELD_TYPE (type, i),
 		     (offset + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT),
 		     0, stream, recurse + 1, val, &opts, language);
 	}
@@ -684,7 +680,7 @@ static void
 ada_val_print_string (struct type *type, const gdb_byte *valaddr,
 		      int offset, int offset_aligned, CORE_ADDR address,
 		      struct ui_file *stream, int recurse,
-		      const struct value *original_value,
+		      struct value *original_value,
 		      const struct value_print_options *options)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
@@ -732,7 +728,7 @@ static void
 ada_val_print_gnat_array (struct type *type, const gdb_byte *valaddr,
 			  int offset, CORE_ADDR address,
 			  struct ui_file *stream, int recurse,
-			  const struct value *original_value,
+			  struct value *original_value,
 			  const struct value_print_options *options,
 			  const struct language_defn *language)
 {
@@ -754,7 +750,7 @@ ada_val_print_gnat_array (struct type *t
       fprintf_filtered (stream, "0x0");
     }
   else
-    val_print (value_type (val), value_contents_for_printing (val),
+    val_print (value_type (val),
 	       value_embedded_offset (val), value_address (val),
 	       stream, recurse, val, options, language);
   value_free_to_mark (mark);
@@ -767,11 +763,11 @@ static void
 ada_val_print_ptr (struct type *type, const gdb_byte *valaddr,
 		   int offset, int offset_aligned, CORE_ADDR address,
 		   struct ui_file *stream, int recurse,
-		   const struct value *original_value,
+		   struct value *original_value,
 		   const struct value_print_options *options,
 		   const struct language_defn *language)
 {
-  val_print (type, valaddr, offset, address, stream, recurse,
+  val_print (type, offset, address, stream, recurse,
 	     original_value, options, language_def (language_c));
 
   if (ada_is_tag_type (type))
@@ -794,7 +790,7 @@ static void
 ada_val_print_num (struct type *type, const gdb_byte *valaddr,
 		   int offset, int offset_aligned, CORE_ADDR address,
 		   struct ui_file *stream, int recurse,
-		   const struct value *original_value,
+		   struct value *original_value,
 		   const struct value_print_options *options,
 		   const struct language_defn *language)
 {
@@ -820,12 +816,12 @@ ada_val_print_num (struct type *type, co
 	    = value_from_contents_and_address (type, valaddr + offset, 0);
 	  struct value *v = value_cast (target_type, v1);
 
-	  val_print (target_type, value_contents_for_printing (v),
+	  val_print (target_type,
 		     value_embedded_offset (v), 0, stream,
 		     recurse + 1, v, options, language);
 	}
       else
-	val_print (TYPE_TARGET_TYPE (type), valaddr, offset,
+	val_print (TYPE_TARGET_TYPE (type), offset,
 		   address, stream, recurse, original_value,
 		   options, language);
       return;
@@ -840,7 +836,7 @@ ada_val_print_num (struct type *type, co
 	  struct value_print_options opts = *options;
 
 	  opts.format = format;
-	  val_print_scalar_formatted (type, valaddr, offset_aligned,
+	  val_print_scalar_formatted (type, offset_aligned,
 				      original_value, &opts, 0, stream);
 	}
       else if (ada_is_system_address_type (type))
@@ -884,7 +880,7 @@ static void
 ada_val_print_enum (struct type *type, const gdb_byte *valaddr,
 		    int offset, int offset_aligned, CORE_ADDR address,
 		    struct ui_file *stream, int recurse,
-		    const struct value *original_value,
+		    struct value *original_value,
 		    const struct value_print_options *options,
 		    const struct language_defn *language)
 {
@@ -894,7 +890,7 @@ ada_val_print_enum (struct type *type, c
 
   if (options->format)
     {
-      val_print_scalar_formatted (type, valaddr, offset_aligned,
+      val_print_scalar_formatted (type, offset_aligned,
 				  original_value, options, 0, stream);
       return;
     }
@@ -928,13 +924,13 @@ static void
 ada_val_print_flt (struct type *type, const gdb_byte *valaddr,
 		   int offset, int offset_aligned, CORE_ADDR address,
 		   struct ui_file *stream, int recurse,
-		   const struct value *original_value,
+		   struct value *original_value,
 		   const struct value_print_options *options,
 		   const struct language_defn *language)
 {
   if (options->format)
     {
-      val_print (type, valaddr, offset, address, stream, recurse,
+      val_print (type, offset, address, stream, recurse,
 		 original_value, options, language_def (language_c));
       return;
     }
@@ -949,7 +945,7 @@ static void
 ada_val_print_struct_union
   (struct type *type, const gdb_byte *valaddr, int offset,
    int offset_aligned, CORE_ADDR address, struct ui_file *stream,
-   int recurse, const struct value *original_value,
+   int recurse, struct value *original_value,
    const struct value_print_options *options,
    const struct language_defn *language)
 {
@@ -980,7 +976,7 @@ static void
 ada_val_print_array (struct type *type, const gdb_byte *valaddr,
 		     int offset, int offset_aligned, CORE_ADDR address,
 		     struct ui_file *stream, int recurse,
-		     const struct value *original_value,
+		     struct value *original_value,
 		     const struct value_print_options *options)
 {
   /* For an array of characters, print with string syntax.  */
@@ -1000,7 +996,7 @@ ada_val_print_array (struct type *type, 
 				     0, stream, recurse,
 				     original_value, options);
   else
-    val_print_array_elements (type, valaddr, offset_aligned, address,
+    val_print_array_elements (type, offset_aligned, address,
 			      stream, recurse, original_value,
 			      options, 0);
   fprintf_filtered (stream, ")");
@@ -1013,7 +1009,7 @@ static void
 ada_val_print_ref (struct type *type, const gdb_byte *valaddr,
 		   int offset, int offset_aligned, CORE_ADDR address,
 		   struct ui_file *stream, int recurse,
-		   const struct value *original_value,
+		   struct value *original_value,
 		   const struct value_print_options *options,
 		   const struct language_defn *language)
 {
@@ -1062,8 +1058,10 @@ ada_val_print_ref (struct type *type, co
      (Eg: an array whose bounds are not set yet).  */
   ada_ensure_varsize_limit (value_type (deref_val));
 
+  if (value_lazy (deref_val))
+    value_fetch_lazy (deref_val);
+
   val_print (value_type (deref_val),
-	     value_contents_for_printing (deref_val),
 	     value_embedded_offset (deref_val),
 	     value_address (deref_val), stream, recurse + 1,
 	     deref_val, options, language);
@@ -1073,14 +1071,15 @@ ada_val_print_ref (struct type *type, co
    does not catch evaluation errors (leaving that to ada_val_print).  */
 
 static void
-ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
+ada_val_print_1 (struct type *type,
 		 int offset, CORE_ADDR address,
 		 struct ui_file *stream, int recurse,
-		 const struct value *original_value,
+		 struct value *original_value,
 		 const struct value_print_options *options,
 		 const struct language_defn *language)
 {
   int offset_aligned;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
 
   type = ada_check_typedef (type);
 
@@ -1102,7 +1101,7 @@ ada_val_print_1 (struct type *type, cons
   switch (TYPE_CODE (type))
     {
     default:
-      val_print (type, valaddr, offset, address, stream, recurse,
+      val_print (type, offset, address, stream, recurse,
 		 original_value, options, language_def (language_c));
       break;
 
@@ -1156,17 +1155,17 @@ ada_val_print_1 (struct type *type, cons
    function; they are identical.  */
 
 void
-ada_val_print (struct type *type, const gdb_byte *valaddr,
+ada_val_print (struct type *type,
 	       int embedded_offset, CORE_ADDR address,
 	       struct ui_file *stream, int recurse,
-	       const struct value *val,
+	       struct value *val,
 	       const struct value_print_options *options)
 {
 
   /* XXX: this catches QUIT/ctrl-c as well.  Isn't that busted?  */
   TRY
     {
-      ada_val_print_1 (type, valaddr, embedded_offset, address,
+      ada_val_print_1 (type, embedded_offset, address,
 		       stream, recurse, val, options,
 		       current_language);
     }
@@ -1221,7 +1220,7 @@ ada_value_print (struct value *val0, str
 
   opts = *options;
   opts.deref_ref = 1;
-  val_print (type, value_contents_for_printing (val),
+  val_print (type,
 	     value_embedded_offset (val), address,
 	     stream, 0, val, &opts, current_language);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-varobj.c ./gdb/ada-varobj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ada-varobj.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ada-varobj.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* varobj support for Ada.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,22 +74,15 @@ ada_varobj_decode_var (struct value **va
 /* Return a string containing an image of the given scalar value.
    VAL is the numeric value, while TYPE is the value's type.
    This is useful for plain integers, of course, but even more
-   so for enumerated types.
+   so for enumerated types.  */
 
-   The result should be deallocated by xfree after use.  */
-
-static char *
+static std::string
 ada_varobj_scalar_image (struct type *type, LONGEST val)
 {
-  struct ui_file *buf = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (buf);
-  char *result;
-
-  ada_print_scalar (type, val, buf);
-  result = ui_file_xstrdup (buf, NULL);
-  do_cleanups (cleanups);
+  string_file buf;
 
-  return result;
+  ada_print_scalar (type, val, &buf);
+  return std::move (buf.string ());
 }
 
 /* Assuming that the (PARENT_VALUE, PARENT_TYPE) pair designates
@@ -404,10 +397,10 @@ static void ada_varobj_describe_child (s
 				       const char *parent_name,
 				       const char *parent_path_expr,
 				       int child_index,
-				       char **child_name,
+				       std::string *child_name,
 				       struct value **child_value,
 				       struct type **child_type,
-				       char **child_path_expr);
+				       std::string *child_path_expr);
 
 /* Same as ada_varobj_describe_child, but limited to struct/union
    objects.  */
@@ -418,10 +411,10 @@ ada_varobj_describe_struct_child (struct
 				  const char *parent_name,
 				  const char *parent_path_expr,
 				  int child_index,
-				  char **child_name,
+				  std::string *child_name,
 				  struct value **child_value,
 				  struct type **child_type,
-				  char **child_path_expr)
+				  std::string *child_path_expr)
 {
   int fieldno;
   int childno = 0;
@@ -506,7 +499,7 @@ ada_varobj_describe_struct_child (struct
 	      const char *field_name = TYPE_FIELD_NAME (parent_type, fieldno);
 	      int child_name_len = ada_name_prefix_len (field_name);
 
-	      *child_name = xstrprintf ("%.*s", child_name_len, field_name);
+	      *child_name = string_printf ("%.*s", child_name_len, field_name);
 	    }
 
 	  if (child_value && parent_value)
@@ -527,8 +520,8 @@ ada_varobj_describe_struct_child (struct
 	      int child_name_len = ada_name_prefix_len (field_name);
 
 	      *child_path_expr =
-		xstrprintf ("(%s).%.*s", parent_path_expr,
-			    child_name_len, field_name);
+		string_printf ("(%s).%.*s", parent_path_expr,
+			       child_name_len, field_name);
 	    }
 
 	  return;
@@ -556,13 +549,13 @@ ada_varobj_describe_ptr_child (struct va
 			       const char *parent_name,
 			       const char *parent_path_expr,
 			       int child_index,
-			       char **child_name,
+			       std::string *child_name,
 			       struct value **child_value,
 			       struct type **child_type,
-			       char **child_path_expr)
+			       std::string *child_path_expr)
 {
   if (child_name)
-    *child_name = xstrprintf ("%s.all", parent_name);
+    *child_name = string_printf ("%s.all", parent_name);
 
   if (child_value && parent_value)
     ada_varobj_ind (parent_value, parent_type, child_value, NULL);
@@ -571,7 +564,7 @@ ada_varobj_describe_ptr_child (struct va
     ada_varobj_ind (parent_value, parent_type, NULL, child_type);
 
   if (child_path_expr)
-    *child_path_expr = xstrprintf ("(%s).all", parent_path_expr);
+    *child_path_expr = string_printf ("(%s).all", parent_path_expr);
 }
 
 /* Same as ada_varobj_describe_child, limited to simple array objects
@@ -586,10 +579,10 @@ ada_varobj_describe_simple_array_child (
 					const char *parent_name,
 					const char *parent_path_expr,
 					int child_index,
-					char **child_name,
+					std::string *child_name,
 					struct value **child_value,
 					struct type **child_type,
-					char **child_path_expr)
+					std::string *child_path_expr)
 {
   struct type *index_type;
   int real_index;
@@ -612,8 +605,7 @@ ada_varobj_describe_simple_array_child (
 
   if (child_path_expr)
     {
-      char *index_img = ada_varobj_scalar_image (index_type, real_index);
-      struct cleanup *cleanups = make_cleanup (xfree, index_img);
+      std::string index_img = ada_varobj_scalar_image (index_type, real_index);
 
       /* Enumeration litterals by themselves are potentially ambiguous.
 	 For instance, consider the following package spec:
@@ -647,13 +639,12 @@ ada_varobj_describe_simple_array_child (
 
       if (index_type_name != NULL)
 	*child_path_expr =
-	  xstrprintf ("(%s)(%.*s'(%s))", parent_path_expr,
-		      ada_name_prefix_len (index_type_name),
-		      index_type_name, index_img);
+	  string_printf ("(%s)(%.*s'(%s))", parent_path_expr,
+			 ada_name_prefix_len (index_type_name),
+			 index_type_name, index_img.c_str ());
       else
 	*child_path_expr =
-	  xstrprintf ("(%s)(%s)", parent_path_expr, index_img);
-      do_cleanups (cleanups);
+	  string_printf ("(%s)(%s)", parent_path_expr, index_img.c_str ());
     }
 }
 
@@ -665,10 +656,10 @@ ada_varobj_describe_child (struct value 
 			   const char *parent_name,
 			   const char *parent_path_expr,
 			   int child_index,
-			   char **child_name,
+			   std::string *child_name,
 			   struct value **child_value,
 			   struct type **child_type,
-			   char **child_path_expr)
+			   std::string *child_path_expr)
 {
   /* We cannot compute the child's path expression without
      the parent's path expression.  This is a pre-condition
@@ -680,13 +671,13 @@ ada_varobj_describe_child (struct value 
   ada_varobj_adjust_for_child_access (&parent_value, &parent_type);
 
   if (child_name)
-    *child_name = NULL;
+    *child_name = std::string ();
   if (child_value)
     *child_value = NULL;
   if (child_type)
     *child_type = NULL;
   if (child_path_expr)
-    *child_path_expr = NULL;
+    *child_path_expr = std::string ();
 
   if (ada_is_array_descriptor_type (parent_type)
       && TYPE_CODE (parent_type) == TYPE_CODE_TYPEDEF)
@@ -731,20 +722,18 @@ ada_varobj_describe_child (struct value 
   /* It should never happen.  But rather than crash, report dummy names
      and return a NULL child_value.  */
   if (child_name)
-    *child_name = xstrdup ("???");
+    *child_name = "???";
 }
 
 /* Return the name of the child number CHILD_INDEX of the (PARENT_VALUE,
-   PARENT_TYPE) pair.  PARENT_NAME is the name of the PARENT.
+   PARENT_TYPE) pair.  PARENT_NAME is the name of the PARENT.  */
 
-   The result should be deallocated after use with xfree.  */
-
-static char *
+static std::string
 ada_varobj_get_name_of_child (struct value *parent_value,
 			      struct type *parent_type,
 			      const char *parent_name, int child_index)
 {
-  char *child_name;
+  std::string child_name;
 
   ada_varobj_describe_child (parent_value, parent_type, parent_name,
 			     NULL, child_index, &child_name, NULL,
@@ -755,18 +744,16 @@ ada_varobj_get_name_of_child (struct val
 /* Return the path expression of the child number CHILD_INDEX of
    the (PARENT_VALUE, PARENT_TYPE) pair.  PARENT_NAME is the name
    of the parent, and PARENT_PATH_EXPR is the parent's path expression.
-   Both must be non-NULL.
-
-   The result must be deallocated after use with xfree.  */
+   Both must be non-NULL.  */
 
-static char *
+static std::string
 ada_varobj_get_path_expr_of_child (struct value *parent_value,
 				   struct type *parent_type,
 				   const char *parent_name,
 				   const char *parent_path_expr,
 				   int child_index)
 {
-  char *child_path_expr;
+  std::string child_path_expr;
 
   ada_varobj_describe_child (parent_value, parent_type, parent_name,
 			     parent_path_expr, child_index, NULL,
@@ -813,22 +800,14 @@ ada_varobj_get_type_of_child (struct val
 
    The resulting string must be deallocated after use with xfree.  */
 
-static char *
+static std::string
 ada_varobj_get_value_image (struct value *value,
 			    struct value_print_options *opts)
 {
-  char *result;
-  struct ui_file *buffer;
-  struct cleanup *old_chain;
+  string_file buffer;
 
-  buffer = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (buffer);
-
-  common_val_print (value, buffer, 0, opts, current_language);
-  result = ui_file_xstrdup (buffer, NULL);
-
-  do_cleanups (old_chain);
-  return result;
+  common_val_print (value, &buffer, 0, opts, current_language);
+  return std::move (buffer.string ());
 }
 
 /* Assuming that the (VALUE, TYPE) pair designates an array varobj,
@@ -841,7 +820,7 @@ ada_varobj_get_value_image (struct value
 
    The result should be deallocated after use using xfree.  */
 
-static char *
+static std::string
 ada_varobj_get_value_of_array_variable (struct value *value,
 					struct type *type,
 					struct value_print_options *opts)
@@ -857,50 +836,36 @@ ada_varobj_get_value_of_array_variable (
       && ada_is_string_type (type)
       && (opts->format == 0 || opts->format == 's'))
     {
-      char *str;
-      struct cleanup *old_chain;
-
-      str = ada_varobj_get_value_image (value, opts);
-      old_chain = make_cleanup (xfree, str);
-      result = xstrprintf ("[%d] %s", numchild, str);
-      do_cleanups (old_chain);
+      std::string str = ada_varobj_get_value_image (value, opts);
+      return string_printf ("[%d] %s", numchild, str.c_str ());
     }
   else
-    result = xstrprintf ("[%d]", numchild);
-
-  return result;
+    return string_printf ("[%d]", numchild);
 }
 
 /* Return a string representation of the (VALUE, TYPE) pair, using
    the given print options OPTS as our formatting options.  */
 
-static char *
+static std::string
 ada_varobj_get_value_of_variable (struct value *value,
 				  struct type *type,
 				  struct value_print_options *opts)
 {
-  char *result = NULL;
-
   ada_varobj_decode_var (&value, &type);
 
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
-      result = xstrdup ("{...}");
-      break;
+      return "{...}";
     case TYPE_CODE_ARRAY:
-      result = ada_varobj_get_value_of_array_variable (value, type, opts);
-      break;
+      return ada_varobj_get_value_of_array_variable (value, type, opts);
     default:
       if (!value)
-	result = xstrdup ("");
+	return "";
       else
-	result = ada_varobj_get_value_image (value, opts);
-      break;
+	return ada_varobj_get_value_image (value, opts);
     }
-
-  return result;
 }
 
 /* Ada specific callbacks for VAROBJs.  */
@@ -911,20 +876,20 @@ ada_number_of_children (const struct var
   return ada_varobj_get_number_of_children (var->value, var->type);
 }
 
-static char *
+static std::string
 ada_name_of_variable (const struct varobj *parent)
 {
   return c_varobj_ops.name_of_variable (parent);
 }
 
-static char *
+static std::string
 ada_name_of_child (const struct varobj *parent, int index)
 {
   return ada_varobj_get_name_of_child (parent->value, parent->type,
-				       parent->name, index);
+				       parent->name.c_str (), index);
 }
 
-static char*
+static std::string
 ada_path_expr_of_child (const struct varobj *child)
 {
   const struct varobj *parent = child->parent;
@@ -932,7 +897,7 @@ ada_path_expr_of_child (const struct var
 
   return ada_varobj_get_path_expr_of_child (parent->value,
 					    parent->type,
-					    parent->name,
+					    parent->name.c_str (),
 					    parent_path_expr,
 					    child->index);
 }
@@ -941,7 +906,7 @@ static struct value *
 ada_value_of_child (const struct varobj *parent, int index)
 {
   return ada_varobj_get_value_of_child (parent->value, parent->type,
-					parent->name, index);
+					parent->name.c_str (), index);
 }
 
 static struct type *
@@ -951,7 +916,7 @@ ada_type_of_child (const struct varobj *
 				       index);
 }
 
-static char *
+static std::string
 ada_value_of_variable (const struct varobj *var,
 		       enum varobj_display_formats format)
 {
@@ -1019,9 +984,9 @@ ada_value_has_mutated (const struct varo
 
   varobj_restrict_range (var->children, &from, &to);
   for (i = from; i < to; i++)
-    if (strcmp (ada_varobj_get_name_of_child (new_val, new_type,
-					      var->name, i),
-		VEC_index (varobj_p, var->children, i)->name) != 0)
+    if (ada_varobj_get_name_of_child (new_val, new_type,
+				      var->name.c_str (), i)
+	!= VEC_index (varobj_p, var->children, i)->name)
       return 1;
 
   return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/addrmap.c ./gdb/addrmap.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/addrmap.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/addrmap.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* addrmap.c --- implementation of address map data structure.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -244,7 +244,7 @@ struct addrmap_mutable
 static splay_tree_key
 allocate_key (struct addrmap_mutable *map, CORE_ADDR addr)
 {
-  CORE_ADDR *key = obstack_alloc (map->obstack, sizeof (*key));
+  CORE_ADDR *key = XOBNEW (map->obstack, CORE_ADDR);
 
   *key = addr;
   return (splay_tree_key) key;
@@ -427,6 +427,7 @@ addrmap_mutable_create_fixed (struct add
   struct addrmap_mutable *mutable_obj = (struct addrmap_mutable *) self;
   struct addrmap_fixed *fixed;
   size_t num_transitions;
+  size_t alloc_len;
 
   /* Count the number of transitions in the tree.  */
   num_transitions = 0;
@@ -436,10 +437,9 @@ addrmap_mutable_create_fixed (struct add
      maps have, but mutable maps do not.)  */
   num_transitions++;
 
-  fixed = obstack_alloc (obstack,
-                         (sizeof (*fixed)
-                          + (num_transitions
-                             * sizeof (fixed->transitions[0]))));
+  alloc_len = sizeof (*fixed)
+	      + (num_transitions * sizeof (fixed->transitions[0]));
+  fixed = (struct addrmap_fixed *) obstack_alloc (obstack, alloc_len);
   fixed->addrmap.funcs = &addrmap_fixed_funcs;
   fixed->num_transitions = 1;
   fixed->transitions[0].addr = 0;
@@ -479,7 +479,8 @@ struct mutable_foreach_data
 static int
 addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
 {
-  struct mutable_foreach_data *foreach_data = data;
+  struct mutable_foreach_data *foreach_data
+    = (struct mutable_foreach_data *) data;
 
   return foreach_data->fn (foreach_data->data,
 			   addrmap_node_key (node),
@@ -514,7 +515,7 @@ static const struct addrmap_funcs addrma
 static void *
 splay_obstack_alloc (int size, void *closure)
 {
-  struct addrmap_mutable *map = closure;
+  struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
   splay_tree_node n;
 
   /* We should only be asked to allocate nodes and larger things.
@@ -536,8 +537,8 @@ splay_obstack_alloc (int size, void *clo
 static void
 splay_obstack_free (void *obj, void *closure)
 {
-  struct addrmap_mutable *map = closure;
-  splay_tree_node n = obj;
+  struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
+  splay_tree_node n = (splay_tree_node) obj;
 
   /* We've asserted in the allocation function that we only allocate
      nodes or larger things, so it should be safe to put whatever
@@ -567,7 +568,7 @@ splay_compare_CORE_ADDR_ptr (splay_tree_
 struct addrmap *
 addrmap_create_mutable (struct obstack *obstack)
 {
-  struct addrmap_mutable *map = obstack_alloc (obstack, sizeof (*map));
+  struct addrmap_mutable *map = XOBNEW (obstack, struct addrmap_mutable);
 
   map->addrmap.funcs = &addrmap_mutable_funcs;
   map->obstack = obstack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/addrmap.h ./gdb/addrmap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/addrmap.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/addrmap.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* addrmap.h --- interface to address map data structure.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/agent.c ./gdb/agent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/agent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/agent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aix-thread.c ./gdb/aix-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/aix-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/aix-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level interface for debugging AIX 4.3+ pthreads.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Nick Duffek <nsd@redhat.com>.
 
    This file is part of GDB.
@@ -462,7 +462,7 @@ pdc_read_data (pthdb_user_t user, void *
       "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
       user, (long) buf, hex_string (addr), len);
 
-  status = target_read_memory (addr, buf, len);
+  status = target_read_memory (addr, (gdb_byte *) buf, len);
   ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
 
   if (debug_aix_thread)
@@ -484,7 +484,7 @@ pdc_write_data (pthdb_user_t user, void 
       "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
       user, (long) buf, hex_string (addr), len);
 
-  status = target_write_memory (addr, buf, len);
+  status = target_write_memory (addr, (gdb_byte *) buf, len);
   ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
 
   if (debug_aix_thread)
@@ -703,7 +703,7 @@ sync_threadlists (void)
 
   pcount = 0;
   psize = 1;
-  pbuf = (struct pd_thread *) xmalloc (psize * sizeof *pbuf);
+  pbuf = XNEWVEC (struct pd_thread, psize);
 
   for (cmd = PTHDB_LIST_FIRST;; cmd = PTHDB_LIST_NEXT)
     {
@@ -740,7 +740,7 @@ sync_threadlists (void)
 
   gcount = 0;
   iterate_over_threads (giter_count, &gcount);
-  g = gbuf = (struct thread_info **) xmalloc (gcount * sizeof *gbuf);
+  g = gbuf = XNEWVEC (struct thread_info *, gcount);
   iterate_over_threads (giter_accum, &g);
   qsort (gbuf, gcount, sizeof *gbuf, gcmp);
 
@@ -757,7 +757,7 @@ sync_threadlists (void)
       else if (gi == gcount)
 	{
 	  thread = add_thread (ptid_build (infpid, 0, pbuf[pi].pthid));
-	  thread->priv = xmalloc (sizeof (struct private_thread_info));
+	  thread->priv = XNEW (struct private_thread_info);
 	  thread->priv->pdtid = pbuf[pi].pdtid;
 	  thread->priv->tid = pbuf[pi].tid;
 	  pi++;
@@ -789,7 +789,7 @@ sync_threadlists (void)
 	  else
 	    {
 	      thread = add_thread (pptid);
-	      thread->priv = xmalloc (sizeof (struct private_thread_info));
+	      thread->priv = XNEW (struct private_thread_info);
 	      thread->priv->pdtid = pdtid;
 	      thread->priv->tid = tid;
 	      pi++;
@@ -1007,10 +1007,10 @@ aix_thread_resume (struct target_ops *op
 
       if (arch64)
 	ptrace64aix (PTT_CONTINUE, tid[0], (long long) 1,
-		     gdb_signal_to_host (sig), (void *) tid);
+		     gdb_signal_to_host (sig), (PTRACE_TYPE_ARG5) tid);
       else
 	ptrace32 (PTT_CONTINUE, tid[0], (addr_ptr) 1,
-		  gdb_signal_to_host (sig), (void *) tid);
+		  gdb_signal_to_host (sig), (PTRACE_TYPE_ARG5) tid);
     }
 }
 
@@ -1749,7 +1749,6 @@ static char *
 aix_thread_extra_thread_info (struct target_ops *self,
 			      struct thread_info *thread)
 {
-  struct ui_file *buf;
   int status;
   pthdb_pthread_t pdtid;
   pthdb_tid_t tid;
@@ -1762,43 +1761,42 @@ aix_thread_extra_thread_info (struct tar
   if (!PD_TID (thread->ptid))
     return NULL;
 
-  buf = mem_fileopen ();
+  string_file buf;
 
   pdtid = thread->priv->pdtid;
   tid = thread->priv->tid;
 
   if (tid != PTHDB_INVALID_TID)
     /* i18n: Like "thread-identifier %d, [state] running, suspended" */
-    fprintf_unfiltered (buf, _("tid %d"), (int)tid);
+    buf.printf (_("tid %d"), (int)tid);
 
   status = pthdb_pthread_state (pd_session, pdtid, &state);
   if (status != PTHDB_SUCCESS)
     state = PST_NOTSUP;
-  fprintf_unfiltered (buf, ", %s", state2str (state));
+  buf.printf (", %s", state2str (state));
 
   status = pthdb_pthread_suspendstate (pd_session, pdtid, 
 				       &suspendstate);
   if (status == PTHDB_SUCCESS && suspendstate == PSS_SUSPENDED)
     /* i18n: Like "Thread-Id %d, [state] running, suspended" */
-    fprintf_unfiltered (buf, _(", suspended"));
+    buf.printf (_(", suspended"));
 
   status = pthdb_pthread_detachstate (pd_session, pdtid, 
 				      &detachstate);
   if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED)
     /* i18n: Like "Thread-Id %d, [state] running, detached" */
-    fprintf_unfiltered (buf, _(", detached"));
+    buf.printf (_(", detached"));
 
   pthdb_pthread_cancelpend (pd_session, pdtid, &cancelpend);
   if (status == PTHDB_SUCCESS && cancelpend)
     /* i18n: Like "Thread-Id %d, [state] running, cancel pending" */
-    fprintf_unfiltered (buf, _(", cancel pending"));
+    buf.printf (_(", cancel pending"));
 
-  ui_file_write (buf, "", 1);
+  buf.write ("", 1);
 
   xfree (ret);			/* Free old buffer.  */
 
-  ret = ui_file_xstrdup (buf, NULL);
-  ui_file_delete (buf);
+  ret = xstrdup (buf.c_str ());
 
   return ret;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-nat.c ./gdb/alpha-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-bsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,205 @@
+/* Native-dependent code for Alpha BSD's.
+
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include "alpha-tdep.h"
+#include "alpha-bsd-tdep.h"
+#include "inf-ptrace.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#ifdef HAVE_SYS_PROCFS_H
+#include <sys/procfs.h>
+#endif
+
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T 
+typedef struct fpreg fpregset_t; 
+#endif 
+
+#include "gregset.h"
+
+/* Provide *regset() wrappers around the generic Alpha BSD register
+   supply/fill routines.  */
+
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+  alphabsd_supply_reg (regcache, (const char *) gregsetp, -1);
+}
+
+void
+fill_gregset (const struct regcache *regcache, gregset_t *gregsetp, int regno)
+{
+  alphabsd_fill_reg (regcache, (char *) gregsetp, regno);
+}
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{
+  alphabsd_supply_fpreg (regcache, (const char *) fpregsetp, -1);
+}
+
+void
+fill_fpregset (const struct regcache *regcache,
+	       fpregset_t *fpregsetp, int regno)
+{
+  alphabsd_fill_fpreg (regcache, (char *) fpregsetp, regno);
+}
+
+/* Determine if PT_GETREGS fetches this register.  */
+
+static int
+getregs_supplies (int regno)
+{
+  return ((regno >= ALPHA_V0_REGNUM && regno <= ALPHA_ZERO_REGNUM)
+	  || regno >= ALPHA_PC_REGNUM);
+}
+
+/* Fetch register REGNO from the inferior.  If REGNO is -1, do this
+   for all registers (including the floating point registers).  */
+
+static void
+alphabsd_fetch_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regno)
+{
+  if (regno == -1 || getregs_supplies (regno))
+    {
+      struct reg gregs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      alphabsd_supply_reg (regcache, (char *) &gregs, regno);
+      if (regno != -1)
+	return;
+    }
+
+  if (regno == -1
+      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      alphabsd_supply_fpreg (regcache, (char *) &fpregs, regno);
+    }
+}
+
+/* Store register REGNO back into the inferior.  If REGNO is -1, do
+   this for all registers (including the floating point registers).  */
+
+static void
+alphabsd_store_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regno)
+{
+  if (regno == -1 || getregs_supplies (regno))
+    {
+      struct reg gregs;
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      alphabsd_fill_reg (regcache, (char *) &gregs, regno);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+
+      if (regno != -1)
+	return;
+    }
+
+  if (regno == -1
+      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      alphabsd_fill_fpreg (regcache, (char *) &fpregs, regno);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/signal.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+alphabsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  int regnum;
+
+  /* The following is true for OpenBSD 3.9:
+
+     The pcb contains the register state at the context switch inside
+     cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_hw.apcb_ksp == 0)
+    return 0;
+
+  regcache_raw_supply (regcache, ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp);
+
+  for (regnum = ALPHA_S0_REGNUM; regnum < ALPHA_A0_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum,
+			 &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]);
+  regcache_raw_supply (regcache, ALPHA_RA_REGNUM, &pcb->pcb_context[7]);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphabsd_nat (void);
+
+void
+_initialize_alphabsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = alphabsd_fetch_inferior_registers;
+  t->to_store_registers = alphabsd_store_inferior_registers;
+  add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (alphabsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-nat.c ./gdb/alphabsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphabsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,205 +0,0 @@
-/* Native-dependent code for Alpha BSD's.
-
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include "alpha-tdep.h"
-#include "alphabsd-tdep.h"
-#include "inf-ptrace.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#ifdef HAVE_SYS_PROCFS_H
-#include <sys/procfs.h>
-#endif
-
-#ifndef HAVE_GREGSET_T
-typedef struct reg gregset_t;
-#endif
-
-#ifndef HAVE_FPREGSET_T 
-typedef struct fpreg fpregset_t; 
-#endif 
-
-#include "gregset.h"
-
-/* Provide *regset() wrappers around the generic Alpha BSD register
-   supply/fill routines.  */
-
-void
-supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
-{
-  alphabsd_supply_reg (regcache, (const char *) gregsetp, -1);
-}
-
-void
-fill_gregset (const struct regcache *regcache, gregset_t *gregsetp, int regno)
-{
-  alphabsd_fill_reg (regcache, (char *) gregsetp, regno);
-}
-
-void
-supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
-{
-  alphabsd_supply_fpreg (regcache, (const char *) fpregsetp, -1);
-}
-
-void
-fill_fpregset (const struct regcache *regcache,
-	       fpregset_t *fpregsetp, int regno)
-{
-  alphabsd_fill_fpreg (regcache, (char *) fpregsetp, regno);
-}
-
-/* Determine if PT_GETREGS fetches this register.  */
-
-static int
-getregs_supplies (int regno)
-{
-  return ((regno >= ALPHA_V0_REGNUM && regno <= ALPHA_ZERO_REGNUM)
-	  || regno >= ALPHA_PC_REGNUM);
-}
-
-/* Fetch register REGNO from the inferior.  If REGNO is -1, do this
-   for all registers (including the floating point registers).  */
-
-static void
-alphabsd_fetch_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regno)
-{
-  if (regno == -1 || getregs_supplies (regno))
-    {
-      struct reg gregs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      alphabsd_supply_reg (regcache, (char *) &gregs, regno);
-      if (regno != -1)
-	return;
-    }
-
-  if (regno == -1
-      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      alphabsd_supply_fpreg (regcache, (char *) &fpregs, regno);
-    }
-}
-
-/* Store register REGNO back into the inferior.  If REGNO is -1, do
-   this for all registers (including the floating point registers).  */
-
-static void
-alphabsd_store_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regno)
-{
-  if (regno == -1 || getregs_supplies (regno))
-    {
-      struct reg gregs;
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      alphabsd_fill_reg (regcache, (char *) &gregs, regno);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-
-      if (regno != -1)
-	return;
-    }
-
-  if (regno == -1
-      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      alphabsd_fill_fpreg (regcache, (char *) &fpregs, regno);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/signal.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-alphabsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  int regnum;
-
-  /* The following is true for OpenBSD 3.9:
-
-     The pcb contains the register state at the context switch inside
-     cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_hw.apcb_ksp == 0)
-    return 0;
-
-  regcache_raw_supply (regcache, ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp);
-
-  for (regnum = ALPHA_S0_REGNUM; regnum < ALPHA_A0_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum,
-			 &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]);
-  regcache_raw_supply (regcache, ALPHA_RA_REGNUM, &pcb->pcb_context[7]);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_alphabsd_nat (void);
-
-void
-_initialize_alphabsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = alphabsd_fetch_inferior_registers;
-  t->to_store_registers = alphabsd_store_inferior_registers;
-  add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (alphabsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-tdep.c ./gdb/alpha-bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-bsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+/* Common target dependent code Alpha BSD's.
+
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "regcache.h"
+
+#include "alpha-tdep.h"
+#include "alpha-bsd-tdep.h"
+
+/* Conviently, GDB uses the same register numbering as the
+   ptrace register structure used by BSD on Alpha.  */
+
+void
+alphabsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
+{
+  /* PC is at slot 32; UNIQUE not present.  */
+  alpha_supply_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
+}
+
+void
+alphabsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
+{
+  /* PC is at slot 32; UNIQUE not present.  */
+  alpha_fill_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
+}
+
+void
+alphabsd_supply_fpreg (struct regcache *regcache,
+		       const char *fpregs, int regno)
+{
+  /* FPCR is at slot 33; slot 32 unused.  */
+  alpha_supply_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
+}
+
+void
+alphabsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
+{
+  /* FPCR is at slot 33; slot 32 unused.  */
+  alpha_fill_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-tdep.c ./gdb/alphabsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphabsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,56 +0,0 @@
-/* Common target dependent code Alpha BSD's.
-
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "regcache.h"
-
-#include "alpha-tdep.h"
-#include "alphabsd-tdep.h"
-
-/* Conviently, GDB uses the same register numbering as the
-   ptrace register structure used by BSD on Alpha.  */
-
-void
-alphabsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
-{
-  /* PC is at slot 32; UNIQUE not present.  */
-  alpha_supply_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
-}
-
-void
-alphabsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
-{
-  /* PC is at slot 32; UNIQUE not present.  */
-  alpha_fill_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
-}
-
-void
-alphabsd_supply_fpreg (struct regcache *regcache,
-		       const char *fpregs, int regno)
-{
-  /* FPCR is at slot 33; slot 32 unused.  */
-  alpha_supply_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
-}
-
-void
-alphabsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
-{
-  /* FPCR is at slot 33; slot 32 unused.  */
-  alpha_fill_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-tdep.h ./gdb/alpha-bsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-bsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-bsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+/* Common target dependent code for Alpha BSD's.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef ALPHA_BSD_TDEP_H
+#define ALPHA_BSD_TDEP_H
+
+struct regcache;
+
+void alphabsd_supply_reg (struct regcache *, const char *, int);
+void alphabsd_fill_reg (const struct regcache *, char *, int);
+
+void alphabsd_supply_fpreg (struct regcache *, const char *, int);
+void alphabsd_fill_fpreg (const struct regcache *, char *, int);
+
+
+/* Functions exported from alpha-nbsd-tdep.c.  */
+
+/* Iterate over supported core file register note sections. */
+void alphanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					     iterate_over_regset_sections_cb *cb,
+					     void *cb_data,
+					     const struct regcache *regcache);
+
+#endif /* alpha-bsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-tdep.h ./gdb/alphabsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphabsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphabsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,40 +0,0 @@
-/* Common target dependent code for Alpha BSD's.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef ALPHABSD_TDEP_H
-#define ALPHABSD_TDEP_H
-
-struct regcache;
-
-void alphabsd_supply_reg (struct regcache *, const char *, int);
-void alphabsd_fill_reg (const struct regcache *, char *, int);
-
-void alphabsd_supply_fpreg (struct regcache *, const char *, int);
-void alphabsd_fill_fpreg (const struct regcache *, char *, int);
-
-
-/* Functions exported from alphanbsd-tdep.c.  */
-
-/* Iterate over supported core file register note sections. */
-void alphanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					     iterate_over_regset_sections_cb *cb,
-					     void *cb_data,
-					     const struct regcache *regcache);
-
-#endif /* alphabsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-fbsd-tdep.c ./gdb/alpha-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,132 @@
+/* Target-dependent code for FreeBSD/alpha.
+
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "value.h"
+#include "osabi.h"
+
+#include "alpha-tdep.h"
+#include "solib-svr4.h"
+
+static int
+alphafbsd_return_in_memory (struct type *type)
+{
+  enum type_code code;
+  int i;
+
+  /* All aggregate types that won't fit in a register must be returned
+     in memory.  */
+  if (TYPE_LENGTH (type) > ALPHA_REGISTER_SIZE)
+    return 1;
+
+  /* The only aggregate types that can be returned in a register are
+     structs and unions.  Arrays must be returned in memory.  */
+  code = TYPE_CODE (type);
+  if (code != TYPE_CODE_STRUCT && code != TYPE_CODE_UNION)
+    return 1;
+
+  /* We need to check if this struct/union is "integer" like.  For
+     this to be true, the offset of each adressable subfield must be
+     zero.  Note that bit fields are not addressable.  */
+  for (i = 0; i < TYPE_NFIELDS (type); i++)
+    {
+      /* If the field bitsize is non-zero, it isn't adressable.  */
+      if (TYPE_FIELD_BITPOS (type, i) != 0
+	  && TYPE_FIELD_BITSIZE (type, i) == 0)
+	return 1;
+    }
+
+  return 0;
+}
+
+
+/* Support for signal handlers.  */
+
+/* Return whether PC is in a BSD sigtramp routine.  */
+
+CORE_ADDR alphafbsd_sigtramp_start = 0x11ffff68;
+CORE_ADDR alphafbsd_sigtramp_end = 0x11ffffe0;
+
+static int
+alphafbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
+			  CORE_ADDR pc, const char *func_name)
+{
+  return (pc >= alphafbsd_sigtramp_start && pc < alphafbsd_sigtramp_end);
+}
+
+static LONGEST
+alphafbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  return pc - alphafbsd_sigtramp_start;
+}
+
+/* Assuming THIS_FRAME is the frame of a BSD sigtramp routine,
+   return the address of the associated sigcontext structure.  */
+
+static CORE_ADDR
+alphafbsd_sigcontext_addr (struct frame_info *this_frame)
+{
+  return get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM) + 24;
+}
+
+/* FreeBSD 5.0-RELEASE or later.  */
+
+static void
+alphafbsd_init_abi (struct gdbarch_info info,
+                    struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* FIXME: Should activate generic FreeBSD support here with
+     fbsd_init_abi(), but this requires a valid
+     'iterate_over_regset_sections' gdbarch method and
+     'collect_regset' functions for each regset.  */
+
+  /* Hook into the DWARF CFI frame unwinder.  */
+  alpha_dwarf2_init_abi (info, gdbarch);
+
+  /* Hook into the MDEBUG frame unwinder.  */
+  alpha_mdebug_init_abi (info, gdbarch);
+
+  /* FreeBSD/alpha has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+
+  tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
+  tdep->sigcontext_addr = alphafbsd_sigcontext_addr;
+  tdep->pc_in_sigtramp = alphafbsd_pc_in_sigtramp;
+  tdep->return_in_memory = alphafbsd_return_in_memory;
+  tdep->sc_pc_offset = 288;
+  tdep->sc_regs_offset = 24;
+  tdep->sc_fpregs_offset = 320;
+
+  tdep->jb_pc = 2;
+  tdep->jb_elt_size = 8;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphafbsd_tdep (void);
+
+void
+_initialize_alphafbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_FREEBSD,
+                          alphafbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphafbsd-tdep.c ./gdb/alphafbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphafbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphafbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,132 +0,0 @@
-/* Target-dependent code for FreeBSD/alpha.
-
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "value.h"
-#include "osabi.h"
-
-#include "alpha-tdep.h"
-#include "solib-svr4.h"
-
-static int
-alphafbsd_return_in_memory (struct type *type)
-{
-  enum type_code code;
-  int i;
-
-  /* All aggregate types that won't fit in a register must be returned
-     in memory.  */
-  if (TYPE_LENGTH (type) > ALPHA_REGISTER_SIZE)
-    return 1;
-
-  /* The only aggregate types that can be returned in a register are
-     structs and unions.  Arrays must be returned in memory.  */
-  code = TYPE_CODE (type);
-  if (code != TYPE_CODE_STRUCT && code != TYPE_CODE_UNION)
-    return 1;
-
-  /* We need to check if this struct/union is "integer" like.  For
-     this to be true, the offset of each adressable subfield must be
-     zero.  Note that bit fields are not addressable.  */
-  for (i = 0; i < TYPE_NFIELDS (type); i++)
-    {
-      /* If the field bitsize is non-zero, it isn't adressable.  */
-      if (TYPE_FIELD_BITPOS (type, i) != 0
-	  && TYPE_FIELD_BITSIZE (type, i) == 0)
-	return 1;
-    }
-
-  return 0;
-}
-
-
-/* Support for signal handlers.  */
-
-/* Return whether PC is in a BSD sigtramp routine.  */
-
-CORE_ADDR alphafbsd_sigtramp_start = 0x11ffff68;
-CORE_ADDR alphafbsd_sigtramp_end = 0x11ffffe0;
-
-static int
-alphafbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
-			  CORE_ADDR pc, const char *func_name)
-{
-  return (pc >= alphafbsd_sigtramp_start && pc < alphafbsd_sigtramp_end);
-}
-
-static LONGEST
-alphafbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  return pc - alphafbsd_sigtramp_start;
-}
-
-/* Assuming THIS_FRAME is the frame of a BSD sigtramp routine,
-   return the address of the associated sigcontext structure.  */
-
-static CORE_ADDR
-alphafbsd_sigcontext_addr (struct frame_info *this_frame)
-{
-  return get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM) + 24;
-}
-
-/* FreeBSD 5.0-RELEASE or later.  */
-
-static void
-alphafbsd_init_abi (struct gdbarch_info info,
-                    struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* FIXME: Should activate generic FreeBSD support here with
-     fbsd_init_abi(), but this requires a valid
-     'iterate_over_regset_sections' gdbarch method and
-     'collect_regset' functions for each regset.  */
-
-  /* Hook into the DWARF CFI frame unwinder.  */
-  alpha_dwarf2_init_abi (info, gdbarch);
-
-  /* Hook into the MDEBUG frame unwinder.  */
-  alpha_mdebug_init_abi (info, gdbarch);
-
-  /* FreeBSD/alpha has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-
-  tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
-  tdep->sigcontext_addr = alphafbsd_sigcontext_addr;
-  tdep->pc_in_sigtramp = alphafbsd_pc_in_sigtramp;
-  tdep->return_in_memory = alphafbsd_return_in_memory;
-  tdep->sc_pc_offset = 288;
-  tdep->sc_regs_offset = 24;
-  tdep->sc_fpregs_offset = 320;
-
-  tdep->jb_pc = 2;
-  tdep->jb_elt_size = 8;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_alphafbsd_tdep (void);
-
-void
-_initialize_alphafbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_FREEBSD_ELF,
-                          alphafbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-linux-nat.c ./gdb/alpha-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alpha-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level Alpha GNU/Linux interface, for GDB when running native.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 
 #include "alpha-tdep.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <alpha/ptrace.h>
 
 #include <sys/procfs.h>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-linux-tdep.c ./gdb/alpha-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alpha-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent code for GNU/Linux on Alpha.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -163,7 +163,7 @@ alpha_linux_supply_gregset (const struct
 			    struct regcache *regcache,
 			    int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
 
   gdb_assert (len >= 32 * 8);
   alpha_supply_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -180,7 +180,7 @@ alpha_linux_collect_gregset (const struc
 			     const struct regcache *regcache,
 			     int regnum, void *gregs, size_t len)
 {
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *) gregs;
 
   gdb_assert (len >= 32 * 8);
   alpha_fill_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -196,7 +196,7 @@ alpha_linux_supply_fpregset (const struc
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
 
   gdb_assert (len >= 32 * 8);
   alpha_supply_fp_regs (regcache, regnum, regs, regs + 31 * 8);
@@ -212,7 +212,7 @@ alpha_linux_collect_fpregset (const stru
 			      const struct regcache *regcache,
 			      int regnum, void *fpregs, size_t len)
 {
-  gdb_byte *regs = fpregs;
+  gdb_byte *regs = (gdb_byte *) fpregs;
 
   gdb_assert (len >= 32 * 8);
   alpha_fill_fp_regs (regcache, regnum, regs, regs + 31 * 8);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-mdebug-tdep.c ./gdb/alpha-mdebug-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-mdebug-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alpha-mdebug-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent mdebug code for the ALPHA architecture.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -107,7 +107,8 @@ find_proc_desc (CORE_ADDR pc)
 	   symbol reading.  */
 	sym = NULL;
       else
-	sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0);
+	sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN,
+			     0).symbol;
     }
 
   if (sym)
@@ -196,7 +197,7 @@ alpha_mdebug_frame_unwind_cache (struct 
   int ireg, returnreg;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_mdebug_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
   *this_prologue_cache = info;
@@ -401,8 +402,6 @@ alpha_mdebug_frame_base_sniffer (struct 
 void
 alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   frame_unwind_append_unwinder (gdbarch, &alpha_mdebug_frame_unwind);
   frame_base_append_sniffer (gdbarch, alpha_mdebug_frame_base_sniffer);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-nbsd-tdep.c ./gdb/alpha-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,290 @@
+/* Target-dependent code for NetBSD/alpha.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "value.h"
+
+#include "alpha-tdep.h"
+#include "alpha-bsd-tdep.h"
+#include "nbsd-tdep.h"
+#include "solib-svr4.h"
+#include "target.h"
+
+/* Core file support.  */
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define ALPHANBSD_SIZEOF_GREGS	(32 * 8)
+
+/* Sizeof `struct fpreg' in <machine/reg.h.  */
+#define ALPHANBSD_SIZEOF_FPREGS	((32 * 8) + 8)
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+alphanbsd_supply_fpregset (const struct regset *regset,
+			   struct regcache *regcache,
+			   int regnum, const void *fpregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
+  int i;
+
+  gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
+
+  for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + (i - ALPHA_FP0_REGNUM) * 8);
+    }
+
+  if (regnum == ALPHA_FPCR_REGNUM || regnum == -1)
+    regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 32 * 8);
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+alphanbsd_aout_supply_gregset (const struct regset *regset,
+			       struct regcache *regcache,
+			       int regnum, const void *gregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  /* Table to map a GDB register number to a trapframe register index.  */
+  static const int regmap[] =
+  {
+     0,   1,   2,   3,
+     4,   5,   6,   7,
+     8,   9,  10,  11,
+    12,  13,  14,  15, 
+    30,  31,  32,  16, 
+    17,  18,  19,  20,
+    21,  22,  23,  24,
+    25,  29,  26
+  };
+
+  gdb_assert (len >= ALPHANBSD_SIZEOF_GREGS);
+
+  for (i = 0; i < ARRAY_SIZE(regmap); i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + regmap[i] * 8);
+    }
+
+  if (regnum == ALPHA_PC_REGNUM || regnum == -1)
+    regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
+
+  if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
+    {
+      regs += ALPHANBSD_SIZEOF_GREGS;
+      len -= ALPHANBSD_SIZEOF_GREGS;
+      alphanbsd_supply_fpregset (regset, regcache, regnum, regs, len);
+    }
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+alphanbsd_supply_gregset (const struct regset *regset,
+			  struct regcache *regcache,
+			  int regnum, const void *gregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
+    {
+      alphanbsd_aout_supply_gregset (regset, regcache, regnum, gregs, len);
+      return;
+    }
+
+  for (i = 0; i < ALPHA_ZERO_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + i * 8);
+    }
+
+  if (regnum == ALPHA_PC_REGNUM || regnum == -1)
+    regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
+}
+
+/* NetBSD/alpha register sets.  */
+
+static const struct regset alphanbsd_gregset =
+{
+  NULL,
+  alphanbsd_supply_gregset,
+  NULL,
+  REGSET_VARIABLE_SIZE
+};
+
+static const struct regset alphanbsd_fpregset =
+{
+  NULL,
+  alphanbsd_supply_fpregset
+};
+
+/* Iterate over supported core file register note sections. */
+
+void
+alphanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					iterate_over_regset_sections_cb *cb,
+					void *cb_data,
+					const struct regcache *regcache)
+{
+  cb (".reg", ALPHANBSD_SIZEOF_GREGS, &alphanbsd_gregset, NULL, cb_data);
+  cb (".reg2", ALPHANBSD_SIZEOF_FPREGS, &alphanbsd_fpregset, NULL, cb_data);
+}
+
+
+/* Signal trampolines.  */
+
+/* Under NetBSD/alpha, signal handler invocations can be identified by the
+   designated code sequence that is used to return from a signal handler.
+   In particular, the return address of a signal handler points to the
+   following code sequence:
+
+	ldq	a0, 0(sp)
+	lda	sp, 16(sp)
+	lda	v0, 295(zero)	# __sigreturn14
+	call_pal callsys
+
+   Each instruction has a unique encoding, so we simply attempt to match
+   the instruction the PC is pointing to with any of the above instructions.
+   If there is a hit, we know the offset to the start of the designated
+   sequence and can then check whether we really are executing in the
+   signal trampoline.  If not, -1 is returned, otherwise the offset from the
+   start of the return sequence is returned.  */
+static const gdb_byte sigtramp_retcode[] =
+{
+  0x00, 0x00, 0x1e, 0xa6,	/* ldq a0, 0(sp) */
+  0x10, 0x00, 0xde, 0x23,	/* lda sp, 16(sp) */
+  0x27, 0x01, 0x1f, 0x20,	/* lda v0, 295(zero) */
+  0x83, 0x00, 0x00, 0x00,	/* call_pal callsys */
+};
+#define RETCODE_NWORDS		4
+#define RETCODE_SIZE		(RETCODE_NWORDS * 4)
+
+static LONGEST
+alphanbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  gdb_byte ret[RETCODE_SIZE], w[4];
+  LONGEST off;
+  int i;
+
+  if (target_read_memory (pc, w, 4) != 0)
+    return -1;
+
+  for (i = 0; i < RETCODE_NWORDS; i++)
+    {
+      if (memcmp (w, sigtramp_retcode + (i * 4), 4) == 0)
+	break;
+    }
+  if (i == RETCODE_NWORDS)
+    return (-1);
+
+  off = i * 4;
+  pc -= off;
+
+  if (target_read_memory (pc, ret, sizeof (ret)) != 0)
+    return -1;
+
+  if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0)
+    return off;
+
+  return -1;
+}
+
+static int
+alphanbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
+		 	  CORE_ADDR pc, const char *func_name)
+{
+  return (nbsd_pc_in_sigtramp (pc, func_name)
+	  || alphanbsd_sigtramp_offset (gdbarch, pc) >= 0);
+}
+
+static CORE_ADDR
+alphanbsd_sigcontext_addr (struct frame_info *frame)
+{
+  /* FIXME: This is not correct for all versions of NetBSD/alpha.
+     We will probably need to disassemble the trampoline to figure
+     out which trampoline frame type we have.  */
+  if (!get_next_frame (frame))
+    return 0;
+  return get_frame_base (get_next_frame (frame));
+}
+
+
+static void
+alphanbsd_init_abi (struct gdbarch_info info,
+                    struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Hook into the DWARF CFI frame unwinder.  */
+  alpha_dwarf2_init_abi (info, gdbarch);
+
+  /* Hook into the MDEBUG frame unwinder.  */
+  alpha_mdebug_init_abi (info, gdbarch);
+
+  /* NetBSD/alpha does not provide single step support via ptrace(2); we
+     must use software single-stepping.  */
+  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
+
+  /* NetBSD/alpha has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+
+  tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+  tdep->pc_in_sigtramp = alphanbsd_pc_in_sigtramp;
+  tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
+
+  tdep->jb_pc = 2;
+  tdep->jb_elt_size = 8;
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, alphanbsd_iterate_over_regset_sections);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphanbsd_tdep (void);
+
+void
+_initialize_alphanbsd_tdep (void)
+{
+  /* Even though NetBSD/alpha used ELF since day one, it used the
+     traditional a.out-style core dump format before NetBSD 1.6, but
+     we don't support those.  */
+  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_NETBSD,
+                          alphanbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphanbsd-tdep.c ./gdb/alphanbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphanbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphanbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,304 +0,0 @@
-/* Target-dependent code for NetBSD/alpha.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "value.h"
-
-#include "alpha-tdep.h"
-#include "alphabsd-tdep.h"
-#include "nbsd-tdep.h"
-#include "solib-svr4.h"
-#include "target.h"
-
-/* Core file support.  */
-
-/* Even though NetBSD/alpha used ELF since day one, it used the
-   traditional a.out-style core dump format before NetBSD 1.6.  */
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define ALPHANBSD_SIZEOF_GREGS	(32 * 8)
-
-/* Sizeof `struct fpreg' in <machine/reg.h.  */
-#define ALPHANBSD_SIZEOF_FPREGS	((32 * 8) + 8)
-
-/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-   in the floating-point register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-alphanbsd_supply_fpregset (const struct regset *regset,
-			   struct regcache *regcache,
-			   int regnum, const void *fpregs, size_t len)
-{
-  const gdb_byte *regs = fpregs;
-  int i;
-
-  gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
-
-  for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + (i - ALPHA_FP0_REGNUM) * 8);
-    }
-
-  if (regnum == ALPHA_FPCR_REGNUM || regnum == -1)
-    regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 32 * 8);
-}
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-alphanbsd_aout_supply_gregset (const struct regset *regset,
-			       struct regcache *regcache,
-			       int regnum, const void *gregs, size_t len)
-{
-  const gdb_byte *regs = gregs;
-  int i;
-
-  /* Table to map a GDB register number to a trapframe register index.  */
-  static const int regmap[] =
-  {
-     0,   1,   2,   3,
-     4,   5,   6,   7,
-     8,   9,  10,  11,
-    12,  13,  14,  15, 
-    30,  31,  32,  16, 
-    17,  18,  19,  20,
-    21,  22,  23,  24,
-    25,  29,  26
-  };
-
-  gdb_assert (len >= ALPHANBSD_SIZEOF_GREGS);
-
-  for (i = 0; i < ARRAY_SIZE(regmap); i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + regmap[i] * 8);
-    }
-
-  if (regnum == ALPHA_PC_REGNUM || regnum == -1)
-    regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
-
-  if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
-    {
-      regs += ALPHANBSD_SIZEOF_GREGS;
-      len -= ALPHANBSD_SIZEOF_GREGS;
-      alphanbsd_supply_fpregset (regset, regcache, regnum, regs, len);
-    }
-}
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-alphanbsd_supply_gregset (const struct regset *regset,
-			  struct regcache *regcache,
-			  int regnum, const void *gregs, size_t len)
-{
-  const gdb_byte *regs = gregs;
-  int i;
-
-  if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
-    {
-      alphanbsd_aout_supply_gregset (regset, regcache, regnum, gregs, len);
-      return;
-    }
-
-  for (i = 0; i < ALPHA_ZERO_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * 8);
-    }
-
-  if (regnum == ALPHA_PC_REGNUM || regnum == -1)
-    regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
-}
-
-/* NetBSD/alpha register sets.  */
-
-static const struct regset alphanbsd_gregset =
-{
-  NULL,
-  alphanbsd_supply_gregset,
-  NULL,
-  REGSET_VARIABLE_SIZE
-};
-
-static const struct regset alphanbsd_fpregset =
-{
-  NULL,
-  alphanbsd_supply_fpregset
-};
-
-/* Iterate over supported core file register note sections. */
-
-void
-alphanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					iterate_over_regset_sections_cb *cb,
-					void *cb_data,
-					const struct regcache *regcache)
-{
-  cb (".reg", ALPHANBSD_SIZEOF_GREGS, &alphanbsd_gregset, NULL, cb_data);
-  cb (".reg2", ALPHANBSD_SIZEOF_FPREGS, &alphanbsd_fpregset, NULL, cb_data);
-}
-
-
-/* Signal trampolines.  */
-
-/* Under NetBSD/alpha, signal handler invocations can be identified by the
-   designated code sequence that is used to return from a signal handler.
-   In particular, the return address of a signal handler points to the
-   following code sequence:
-
-	ldq	a0, 0(sp)
-	lda	sp, 16(sp)
-	lda	v0, 295(zero)	# __sigreturn14
-	call_pal callsys
-
-   Each instruction has a unique encoding, so we simply attempt to match
-   the instruction the PC is pointing to with any of the above instructions.
-   If there is a hit, we know the offset to the start of the designated
-   sequence and can then check whether we really are executing in the
-   signal trampoline.  If not, -1 is returned, otherwise the offset from the
-   start of the return sequence is returned.  */
-static const gdb_byte sigtramp_retcode[] =
-{
-  0x00, 0x00, 0x1e, 0xa6,	/* ldq a0, 0(sp) */
-  0x10, 0x00, 0xde, 0x23,	/* lda sp, 16(sp) */
-  0x27, 0x01, 0x1f, 0x20,	/* lda v0, 295(zero) */
-  0x83, 0x00, 0x00, 0x00,	/* call_pal callsys */
-};
-#define RETCODE_NWORDS		4
-#define RETCODE_SIZE		(RETCODE_NWORDS * 4)
-
-static LONGEST
-alphanbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  gdb_byte ret[RETCODE_SIZE], w[4];
-  LONGEST off;
-  int i;
-
-  if (target_read_memory (pc, w, 4) != 0)
-    return -1;
-
-  for (i = 0; i < RETCODE_NWORDS; i++)
-    {
-      if (memcmp (w, sigtramp_retcode + (i * 4), 4) == 0)
-	break;
-    }
-  if (i == RETCODE_NWORDS)
-    return (-1);
-
-  off = i * 4;
-  pc -= off;
-
-  if (target_read_memory (pc, ret, sizeof (ret)) != 0)
-    return -1;
-
-  if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0)
-    return off;
-
-  return -1;
-}
-
-static int
-alphanbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
-		 	  CORE_ADDR pc, const char *func_name)
-{
-  return (nbsd_pc_in_sigtramp (pc, func_name)
-	  || alphanbsd_sigtramp_offset (gdbarch, pc) >= 0);
-}
-
-static CORE_ADDR
-alphanbsd_sigcontext_addr (struct frame_info *frame)
-{
-  /* FIXME: This is not correct for all versions of NetBSD/alpha.
-     We will probably need to disassemble the trampoline to figure
-     out which trampoline frame type we have.  */
-  if (!get_next_frame (frame))
-    return 0;
-  return get_frame_base (get_next_frame (frame));
-}
-
-
-static void
-alphanbsd_init_abi (struct gdbarch_info info,
-                    struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Hook into the DWARF CFI frame unwinder.  */
-  alpha_dwarf2_init_abi (info, gdbarch);
-
-  /* Hook into the MDEBUG frame unwinder.  */
-  alpha_mdebug_init_abi (info, gdbarch);
-
-  /* NetBSD/alpha does not provide single step support via ptrace(2); we
-     must use software single-stepping.  */
-  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
-
-  /* NetBSD/alpha has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-
-  tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
-  tdep->pc_in_sigtramp = alphanbsd_pc_in_sigtramp;
-  tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
-
-  tdep->jb_pc = 2;
-  tdep->jb_elt_size = 8;
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, alphanbsd_iterate_over_regset_sections);
-}
-
-
-static enum gdb_osabi
-alphanbsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_ELF;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_alphanbsd_tdep (void);
-
-void
-_initialize_alphanbsd_tdep (void)
-{
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_alpha, bfd_target_unknown_flavour,
-                                  alphanbsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_NETBSD_ELF,
-                          alphanbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-obsd-tdep.c ./gdb/alpha-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/alpha-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,137 @@
+/* Target-dependent code for OpenBSD/alpha.
+
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "osabi.h"
+
+#include "obsd-tdep.h"
+#include "alpha-tdep.h"
+#include "alpha-bsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Signal trampolines.  */
+
+/* The OpenBSD kernel maps the signal trampoline at some random
+   location in user space, which means that the traditional BSD way of
+   detecting it won't work.
+
+   The signal trampoline will be mapped at an address that is page
+   aligned.  We recognize the signal trampoline by looking for the
+   sigreturn system call.  */
+
+static const int alphaobsd_page_size = 8192;
+
+static LONGEST
+alphaobsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  return (pc & (alphaobsd_page_size - 1));
+}
+
+static int
+alphaobsd_pc_in_sigtramp (struct gdbarch *gdbarch,
+			  CORE_ADDR pc, const char *name)
+{
+  CORE_ADDR start_pc = (pc & ~(alphaobsd_page_size - 1));
+  unsigned insn;
+
+  if (name)
+    return 0;
+
+  /* Check for "".  */
+  insn = alpha_read_insn (gdbarch, start_pc + 5 * ALPHA_INSN_SIZE);
+  if (insn != 0x201f0067)
+    return 0;
+
+  /* Check for "".  */
+  insn = alpha_read_insn (gdbarch, start_pc + 6 * ALPHA_INSN_SIZE);
+  if (insn != 0x00000083)
+    return 0;
+
+  return 1;
+}
+
+static CORE_ADDR
+alphaobsd_sigcontext_addr (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  CORE_ADDR pc = get_frame_pc (this_frame);
+
+  if (alphaobsd_sigtramp_offset (gdbarch, pc) < 3 * ALPHA_INSN_SIZE)
+    {
+      /* On entry, a pointer the `struct sigcontext' is passed in %a2.  */
+      return get_frame_register_unsigned (this_frame, ALPHA_A0_REGNUM + 2);
+    }
+  else if (alphaobsd_sigtramp_offset (gdbarch, pc) < 4 * ALPHA_INSN_SIZE)
+    {
+      /* It is stored on the stack Before calling the signal handler.  */
+      CORE_ADDR sp;
+      sp = get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM);
+      return get_frame_memory_unsigned (this_frame, sp, 8);
+    }
+  else
+    {
+      /* It is reloaded into %a0 for the sigreturn(2) call.  */
+      return get_frame_register_unsigned (this_frame, ALPHA_A0_REGNUM);
+    }
+}
+
+
+static void
+alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Hook into the DWARF CFI frame unwinder.  */
+  alpha_dwarf2_init_abi (info, gdbarch);
+
+  /* Hook into the MDEBUG frame unwinder.  */
+  alpha_mdebug_init_abi (info, gdbarch);
+
+  /* OpenBSD/alpha 3.0 and earlier does not provide single step
+     support via ptrace(2); use software single-stepping for now.  */
+  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
+
+  /* OpenBSD/alpha has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
+
+  tdep->dynamic_sigtramp_offset = alphaobsd_sigtramp_offset;
+  tdep->pc_in_sigtramp = alphaobsd_pc_in_sigtramp;
+  tdep->sigcontext_addr = alphaobsd_sigcontext_addr;
+
+  tdep->jb_pc = 2;
+  tdep->jb_elt_size = 8;
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, alphanbsd_iterate_over_regset_sections);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphaobsd_tdep (void);
+
+void
+_initialize_alphaobsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OPENBSD,
+                          alphaobsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphaobsd-tdep.c ./gdb/alphaobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alphaobsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alphaobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,137 +0,0 @@
-/* Target-dependent code for OpenBSD/alpha.
-
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "osabi.h"
-
-#include "obsd-tdep.h"
-#include "alpha-tdep.h"
-#include "alphabsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Signal trampolines.  */
-
-/* The OpenBSD kernel maps the signal trampoline at some random
-   location in user space, which means that the traditional BSD way of
-   detecting it won't work.
-
-   The signal trampoline will be mapped at an address that is page
-   aligned.  We recognize the signal trampoline by looking for the
-   sigreturn system call.  */
-
-static const int alphaobsd_page_size = 8192;
-
-static LONGEST
-alphaobsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  return (pc & (alphaobsd_page_size - 1));
-}
-
-static int
-alphaobsd_pc_in_sigtramp (struct gdbarch *gdbarch,
-			  CORE_ADDR pc, const char *name)
-{
-  CORE_ADDR start_pc = (pc & ~(alphaobsd_page_size - 1));
-  unsigned insn;
-
-  if (name)
-    return 0;
-
-  /* Check for "".  */
-  insn = alpha_read_insn (gdbarch, start_pc + 5 * ALPHA_INSN_SIZE);
-  if (insn != 0x201f0067)
-    return 0;
-
-  /* Check for "".  */
-  insn = alpha_read_insn (gdbarch, start_pc + 6 * ALPHA_INSN_SIZE);
-  if (insn != 0x00000083)
-    return 0;
-
-  return 1;
-}
-
-static CORE_ADDR
-alphaobsd_sigcontext_addr (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  CORE_ADDR pc = get_frame_pc (this_frame);
-
-  if (alphaobsd_sigtramp_offset (gdbarch, pc) < 3 * ALPHA_INSN_SIZE)
-    {
-      /* On entry, a pointer the `struct sigcontext' is passed in %a2.  */
-      return get_frame_register_unsigned (this_frame, ALPHA_A0_REGNUM + 2);
-    }
-  else if (alphaobsd_sigtramp_offset (gdbarch, pc) < 4 * ALPHA_INSN_SIZE)
-    {
-      /* It is stored on the stack Before calling the signal handler.  */
-      CORE_ADDR sp;
-      sp = get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM);
-      return get_frame_memory_unsigned (this_frame, sp, 8);
-    }
-  else
-    {
-      /* It is reloaded into %a0 for the sigreturn(2) call.  */
-      return get_frame_register_unsigned (this_frame, ALPHA_A0_REGNUM);
-    }
-}
-
-
-static void
-alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Hook into the DWARF CFI frame unwinder.  */
-  alpha_dwarf2_init_abi (info, gdbarch);
-
-  /* Hook into the MDEBUG frame unwinder.  */
-  alpha_mdebug_init_abi (info, gdbarch);
-
-  /* OpenBSD/alpha 3.0 and earlier does not provide single step
-     support via ptrace(2); use software single-stepping for now.  */
-  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
-
-  /* OpenBSD/alpha has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
-
-  tdep->dynamic_sigtramp_offset = alphaobsd_sigtramp_offset;
-  tdep->pc_in_sigtramp = alphaobsd_pc_in_sigtramp;
-  tdep->sigcontext_addr = alphaobsd_sigcontext_addr;
-
-  tdep->jb_pc = 2;
-  tdep->jb_elt_size = 8;
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, alphanbsd_iterate_over_regset_sections);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_alphaobsd_tdep (void);
-
-void
-_initialize_alphaobsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OPENBSD_ELF,
-                          alphaobsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-tdep.c ./gdb/alpha-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alpha-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,6 +43,7 @@
 #include "elf-bfd.h"
 
 #include "alpha-tdep.h"
+#include <algorithm>
 
 /* Instruction decoding.  The notations for registers, immediates and
    opcodes are the same as the one used in Compaq's Alpha architecture
@@ -185,7 +186,8 @@ static void
 alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  ULONGEST mem     = extract_unsigned_integer (in, 4, byte_order);
+  ULONGEST mem
+    = extract_unsigned_integer ((const gdb_byte *) in, 4, byte_order);
   ULONGEST frac    = (mem >>  0) & 0x7fffff;
   ULONGEST sign    = (mem >> 31) & 1;
   ULONGEST exp_msb = (mem >> 30) & 1;
@@ -205,7 +207,7 @@ alpha_lds (struct gdbarch *gdbarch, void
     }
 
   reg = (sign << 63) | (exp << 52) | (frac << 29);
-  store_unsigned_integer (out, 8, byte_order, reg);
+  store_unsigned_integer ((gdb_byte *) out, 8, byte_order, reg);
 }
 
 /* Similarly, this represents exactly the conversion performed by
@@ -217,9 +219,9 @@ alpha_sts (struct gdbarch *gdbarch, void
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   ULONGEST reg, mem;
 
-  reg = extract_unsigned_integer (in, 8, byte_order);
+  reg = extract_unsigned_integer ((const gdb_byte *) in, 8, byte_order);
   mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
-  store_unsigned_integer (out, 4, byte_order, mem);
+  store_unsigned_integer ((gdb_byte *) out, 4, byte_order, mem);
 }
 
 /* The alpha needs a conversion between register and memory format if the
@@ -305,8 +307,7 @@ alpha_push_dummy_call (struct gdbarch *g
       int len;
       int offset;
     };
-  struct alpha_arg *alpha_args
-    = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
+  struct alpha_arg *alpha_args = XALLOCAVEC (struct alpha_arg, nargs);
   struct alpha_arg *m_arg;
   gdb_byte arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
   int required_arg_regs;
@@ -644,14 +645,10 @@ alpha_return_in_memory_always (struct ty
   return 1;
 }
 
-static const gdb_byte *
-alpha_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static const gdb_byte break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */
 
-  *len = sizeof(break_insn);
-  return break_insn;
-}
+constexpr gdb_byte alpha_break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */
+
+typedef BP_MANIPULATION (alpha_break_insn) alpha_breakpoint;
 
 
 /* This returns the PC of the first insn after the prologue.
@@ -682,11 +679,11 @@ alpha_read_insn (struct gdbarch *gdbarch
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[ALPHA_INSN_SIZE];
-  int status;
+  int res;
 
-  status = target_read_memory (pc, buf, sizeof (buf));
-  if (status)
-    memory_error (status, pc);
+  res = target_read_memory (pc, buf, sizeof (buf));
+  if (res != 0)
+    memory_error (TARGET_XFER_E_IO, pc);
   return extract_unsigned_integer (buf, sizeof (buf), byte_order);
 }
 
@@ -721,7 +718,7 @@ alpha_skip_prologue (struct gdbarch *gdb
 
   post_prologue_pc = alpha_after_prologue (pc);
   if (post_prologue_pc != 0)
-    return max (pc, post_prologue_pc);
+    return std::max (pc, post_prologue_pc);
 
   /* Can't determine prologue from the symbol table, need to examine
      instructions.  */
@@ -768,12 +765,11 @@ static const int stq_c_opcode = 0x2f;
    is found, attempt to step through it.  A breakpoint is placed at the end of 
    the sequence.  */
 
-static int 
-alpha_deal_with_atomic_sequence (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+alpha_deal_with_atomic_sequence (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR pc = get_frame_pc (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  CORE_ADDR pc = regcache_read_pc (regcache);
   CORE_ADDR breaks[2] = {-1, -1};
   CORE_ADDR loc = pc;
   CORE_ADDR closing_insn; /* Instruction that closes the atomic sequence.  */
@@ -783,11 +779,12 @@ alpha_deal_with_atomic_sequence (struct 
   int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */  
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
   int bc_insn_count = 0; /* Conditional branch instruction count.  */
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
   /* Assume all atomic sequences start with a LDL_L/LDQ_L instruction.  */
   if (INSN_OPCODE (insn) != ldl_l_opcode
       && INSN_OPCODE (insn) != ldq_l_opcode)
-    return 0;
+    return NULL;
 
   /* Assume that no atomic sequence is longer than "atomic_sequence_length" 
      instructions.  */
@@ -806,8 +803,8 @@ alpha_deal_with_atomic_sequence (struct 
 	  immediate = (immediate ^ 0x400000) - 0x400000;
 
 	  if (bc_insn_count >= 1)
-	    return 0; /* More than one branch found, fallback 
-			 to the standard single-step code.  */
+	    return NULL; /* More than one branch found, fallback 
+			    to the standard single-step code.  */
 
 	  breaks[1] = loc + ALPHA_INSN_SIZE + immediate;
 
@@ -823,7 +820,7 @@ alpha_deal_with_atomic_sequence (struct 
   /* Assume that the atomic sequence ends with a STL_C/STQ_C instruction.  */
   if (INSN_OPCODE (insn) != stl_c_opcode
       && INSN_OPCODE (insn) != stq_c_opcode)
-    return 0;
+    return NULL;
 
   closing_insn = loc;
   loc += ALPHA_INSN_SIZE;
@@ -838,11 +835,10 @@ alpha_deal_with_atomic_sequence (struct 
 	  || (breaks[1] >= pc && breaks[1] <= closing_insn)))
     last_breakpoint = 0;
 
-  /* Effectively inserts the breakpoints.  */
   for (index = 0; index <= last_breakpoint; index++)
-    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
 
-  return 1;
+  return next_pcs;
 }
 
 
@@ -890,7 +886,7 @@ alpha_sigtramp_frame_unwind_cache (struc
   struct gdbarch_tdep *tdep;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_sigtramp_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
   *this_prologue_cache = info;
@@ -1240,7 +1236,7 @@ alpha_heuristic_frame_unwind_cache (stru
   int frame_reg, frame_size, return_reg, reg;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_heuristic_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
   *this_prologue_cache = info;
@@ -1499,7 +1495,7 @@ void
 alpha_supply_int_regs (struct regcache *regcache, int regno,
 		       const void *r0_r30, const void *pc, const void *unique)
 {
-  const gdb_byte *regs = r0_r30;
+  const gdb_byte *regs = (const gdb_byte *) r0_r30;
   int i;
 
   for (i = 0; i < 31; ++i)
@@ -1524,7 +1520,7 @@ void
 alpha_fill_int_regs (const struct regcache *regcache,
 		     int regno, void *r0_r30, void *pc, void *unique)
 {
-  gdb_byte *regs = r0_r30;
+  gdb_byte *regs = (gdb_byte *) r0_r30;
   int i;
 
   for (i = 0; i < 31; ++i)
@@ -1542,7 +1538,7 @@ void
 alpha_supply_fp_regs (struct regcache *regcache, int regno,
 		      const void *f0_f30, const void *fpcr)
 {
-  const gdb_byte *regs = f0_f30;
+  const gdb_byte *regs = (const gdb_byte *) f0_f30;
   int i;
 
   for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1558,7 +1554,7 @@ void
 alpha_fill_fp_regs (const struct regcache *regcache,
 		    int regno, void *f0_f30, void *fpcr)
 {
-  gdb_byte *regs = f0_f30;
+  gdb_byte *regs = (gdb_byte *) f0_f30;
   int i;
 
   for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1601,9 +1597,9 @@ fp_register_sign_bit (LONGEST reg)
    the target of the coming instruction and breakpoint it.  */
 
 static CORE_ADDR
-alpha_next_pc (struct frame_info *frame, CORE_ADDR pc)
+alpha_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   unsigned int insn;
   unsigned int op;
   int regno;
@@ -1619,7 +1615,7 @@ alpha_next_pc (struct frame_info *frame,
     {
       /* Jump format: target PC is:
 	 RB & ~3  */
-      return (get_frame_register_unsigned (frame, (insn >> 16) & 0x1f) & ~3);
+      return (regcache_raw_get_unsigned (regcache, (insn >> 16) & 0x1f) & ~3);
     }
 
   if ((op & 0x30) == 0x30)
@@ -1650,7 +1646,7 @@ alpha_next_pc (struct frame_info *frame,
             regno += gdbarch_fp0_regnum (gdbarch);
 	}
       
-      rav = get_frame_register_signed (frame, regno);
+      rav = regcache_raw_get_signed (regcache, regno);
 
       switch (op)
 	{
@@ -1721,18 +1717,17 @@ alpha_next_pc (struct frame_info *frame,
   return (pc + ALPHA_INSN_SIZE);
 }
 
-int
-alpha_software_single_step (struct frame_info *frame)
+VEC (CORE_ADDR) *
+alpha_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR pc, next_pc;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  CORE_ADDR pc;
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  pc = get_frame_pc (frame);
-  next_pc = alpha_next_pc (frame, pc);
+  pc = regcache_read_pc (regcache);
 
-  insert_single_step_breakpoint (gdbarch, aspace, next_pc);
-  return 1;
+  VEC_safe_push (CORE_ADDR, next_pcs, alpha_next_pc (regcache, pc));
+  return next_pcs;
 }
 
 
@@ -1754,7 +1749,7 @@ alpha_gdbarch_init (struct gdbarch_info 
   if (arches != NULL)
     return arches->gdbarch;
 
-  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Lowest text address.  This is used by heuristic_proc_start()
@@ -1821,7 +1816,10 @@ alpha_gdbarch_init (struct gdbarch_info 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, alpha_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       alpha_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       alpha_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, ALPHA_INSN_SIZE);
   set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
 
@@ -1857,7 +1855,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_alpha_tdep (void)
 {
-  struct cmd_list_element *c;
 
   gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, NULL);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-tdep.h ./gdb/alpha-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/alpha-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/alpha-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common target dependent code for GDB on Alpha systems.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -103,7 +103,7 @@ struct gdbarch_tdep
 };
 
 extern unsigned int alpha_read_insn (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern int alpha_software_single_step (struct frame_info *frame);
+extern VEC (CORE_ADDR) *alpha_software_single_step (struct regcache *regcache);
 extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
 
 extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-bsd-nat.c ./gdb/amd64-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-bsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,159 @@
+/* Native-dependent code for AMD64 BSD's.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+/* We include <signal.h> to make sure `struct fxsave64' is defined on
+   NetBSD, since NetBSD's <machine/reg.h> needs it.  */
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "amd64-tdep.h"
+#include "amd64-nat.h"
+#include "x86-bsd-nat.h"
+#include "inf-ptrace.h"
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers (including the floating-point registers).  */
+
+static void
+amd64bsd_fetch_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      amd64_supply_native_gregset (regcache, &regs, -1);
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum))
+    {
+      struct fpreg fpregs;
+#ifdef PT_GETXSTATE_INFO
+      void *xstateregs;
+
+      if (x86bsd_xsave_len != 0)
+	{
+	  xstateregs = alloca (x86bsd_xsave_len);
+	  if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
+	    perror_with_name (_("Couldn't get extended state status"));
+
+	  amd64_supply_xsave (regcache, -1, xstateregs);
+	  return;
+	}
+#endif
+
+      if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      amd64_supply_fxsave (regcache, -1, &fpregs);
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers (including the floating-point registers).  */
+
+static void
+amd64bsd_store_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      amd64_collect_native_gregset (regcache, &regs, regnum);
+
+      if (ptrace (PT_SETREGS, get_ptrace_pid (inferior_ptid),
+	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum))
+    {
+      struct fpreg fpregs;
+#ifdef PT_GETXSTATE_INFO
+      void *xstateregs;
+
+      if (x86bsd_xsave_len != 0)
+	{
+	  xstateregs = alloca (x86bsd_xsave_len);
+	  if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
+	    perror_with_name (_("Couldn't get extended state status"));
+
+	  amd64_collect_xsave (regcache, regnum, xstateregs, 0);
+
+	  if (ptrace (PT_SETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, x86bsd_xsave_len) == -1)
+	    perror_with_name (_("Couldn't write extended state status"));
+	  return;
+	}
+#endif
+
+      if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      amd64_collect_fxsave (regcache, regnum, &fpregs);
+
+      if (ptrace (PT_SETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+/* Create a prototype *BSD/amd64 target.  The client can override it
+   with local methods.  */
+
+struct target_ops *
+amd64bsd_target (void)
+{
+  struct target_ops *t;
+
+  t = x86bsd_target ();
+  t->to_fetch_registers = amd64bsd_fetch_inferior_registers;
+  t->to_store_registers = amd64bsd_store_inferior_registers;
+  return t;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64bsd-nat.c ./gdb/amd64bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64bsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,235 +0,0 @@
-/* Native-dependent code for AMD64 BSD's.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-/* We include <signal.h> to make sure `struct fxsave64' is defined on
-   NetBSD, since NetBSD's <machine/reg.h> needs it.  */
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "amd64-tdep.h"
-#include "amd64-nat.h"
-#include "amd64bsd-nat.h"
-#include "inf-ptrace.h"
-
-
-#ifdef PT_GETXSTATE_INFO
-size_t amd64bsd_xsave_len;
-#endif
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers (including the floating-point registers).  */
-
-static void
-amd64bsd_fetch_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      amd64_supply_native_gregset (regcache, &regs, -1);
-      if (regnum != -1)
-	return;
-    }
-
-  if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum))
-    {
-      struct fpreg fpregs;
-#ifdef PT_GETXSTATE_INFO
-      char *xstateregs;
-
-      if (amd64bsd_xsave_len != 0)
-	{
-	  xstateregs = alloca (amd64bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
-	    perror_with_name (_("Couldn't get extended state status"));
-
-	  amd64_supply_xsave (regcache, -1, xstateregs);
-	  return;
-	}
-#endif
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      amd64_supply_fxsave (regcache, -1, &fpregs);
-    }
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating-point registers).  */
-
-static void
-amd64bsd_store_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      amd64_collect_native_gregset (regcache, &regs, regnum);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-
-      if (regnum != -1)
-	return;
-    }
-
-  if (regnum == -1 || !amd64_native_gregset_supplies_p (gdbarch, regnum))
-    {
-      struct fpreg fpregs;
-#ifdef PT_GETXSTATE_INFO
-      char *xstateregs;
-
-      if (amd64bsd_xsave_len != 0)
-	{
-	  xstateregs = alloca (amd64bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
-	    perror_with_name (_("Couldn't get extended state status"));
-
-	  amd64_collect_xsave (regcache, regnum, xstateregs, 0);
-
-	  if (ptrace (PT_SETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, amd64bsd_xsave_len) == -1)
-	    perror_with_name (_("Couldn't write extended state status"));
-	  return;
-	}
-#endif
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      amd64_collect_fxsave (regcache, regnum, &fpregs);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-/* Create a prototype *BSD/amd64 target.  The client can override it
-   with local methods.  */
-
-struct target_ops *
-amd64bsd_target (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = amd64bsd_fetch_inferior_registers;
-  t->to_store_registers = amd64bsd_store_inferior_registers;
-  return t;
-}
-
-
-/* Support for debug registers.  */
-
-#ifdef HAVE_PT_GETDBREGS
-
-static unsigned long
-amd64bsd_dr_get (ptid_t ptid, int regnum)
-{
-  struct dbreg dbregs;
-
-  if (ptrace (PT_GETDBREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't read debug registers"));
-
-  return DBREG_DRX ((&dbregs), regnum);
-}
-
-static void
-amd64bsd_dr_set (int regnum, unsigned long value)
-{
-  struct dbreg dbregs;
-
-  if (ptrace (PT_GETDBREGS, ptid_get_pid (inferior_ptid),
-              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't get debug registers"));
-
-  /* For some mysterious reason, some of the reserved bits in the
-     debug control register get set.  Mask these off, otherwise the
-     ptrace call below will fail.  */
-  DBREG_DRX ((&dbregs), 7) &= ~(0xffffffff0000fc00);
-
-  DBREG_DRX ((&dbregs), regnum) = value;
-
-  if (ptrace (PT_SETDBREGS, ptid_get_pid (inferior_ptid),
-              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't write debug registers"));
-}
-
-void
-amd64bsd_dr_set_control (unsigned long control)
-{
-  amd64bsd_dr_set (7, control);
-}
-
-void
-amd64bsd_dr_set_addr (int regnum, CORE_ADDR addr)
-{
-  gdb_assert (regnum >= 0 && regnum <= 4);
-
-  amd64bsd_dr_set (regnum, addr);
-}
-
-CORE_ADDR
-amd64bsd_dr_get_addr (int regnum)
-{
-  return amd64bsd_dr_get (inferior_ptid, regnum);
-}
-
-unsigned long
-amd64bsd_dr_get_status (void)
-{
-  return amd64bsd_dr_get (inferior_ptid, 6);
-}
-
-unsigned long
-amd64bsd_dr_get_control (void)
-{
-  return amd64bsd_dr_get (inferior_ptid, 7);
-}
-
-#endif /* PT_GETDBREGS */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64bsd-nat.h ./gdb/amd64bsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64bsd-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64bsd-nat.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-/* Native-dependent code for AMD64 BSD's.
-
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef AMD64BSD_NAT_H
-#define AMD64BSD_NAT_H
-
-/* Low level amd64 XSAVE info.  */
-extern size_t amd64bsd_xsave_len;
-
-/* Low level amd64 debug register functions.  */
-
-extern void amd64bsd_dr_set_control (unsigned long control);
-
-extern void amd64bsd_dr_set_addr (int regnum, CORE_ADDR addr);
-
-extern CORE_ADDR amd64bsd_dr_get_addr (int regnum);
-
-extern unsigned long amd64bsd_dr_get_status (void);
-
-extern unsigned long amd64bsd_dr_get_control (void);
-
-#endif /* amd64bsd-nat.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-darwin-tdep.c ./gdb/amd64-darwin-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-darwin-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-darwin-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
 
@@ -26,7 +26,6 @@
 #include "floatformat.h"
 #include "symtab.h"
 #include "regcache.h"
-#include "libbfd.h"
 #include "objfiles.h"
 
 #include "i387-tdep.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-darwin-tdep.h ./gdb/amd64-darwin-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-darwin-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-darwin-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Darwin x86-64.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-dicos-tdep.c ./gdb/amd64-dicos-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-dicos-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-dicos-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for DICOS running on x86-64's, for GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,8 +25,6 @@
 static void
 amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   amd64_init_abi (info, gdbarch);
 
   dicos_init_abi (gdbarch);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-fbsd-nat.c ./gdb/amd64-fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,291 @@
+/* Native-dependent code for FreeBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+#include <machine/reg.h>
+
+#include "fbsd-nat.h"
+#include "amd64-tdep.h"
+#include "amd64-nat.h"
+#include "x86-bsd-nat.h"
+#include "x86-nat.h"
+
+
+/* Offset in `struct reg' where MEMBER is stored.  */
+#define REG_OFFSET(member) offsetof (struct reg, member)
+
+/* At amd64fbsd64_r_reg_offset[REGNUM] you'll find the offset in
+   `struct reg' location where the GDB register REGNUM is stored.
+   Unsupported registers are marked with `-1'.  */
+static int amd64fbsd64_r_reg_offset[] =
+{
+  REG_OFFSET (r_rax),
+  REG_OFFSET (r_rbx),
+  REG_OFFSET (r_rcx),
+  REG_OFFSET (r_rdx),
+  REG_OFFSET (r_rsi),
+  REG_OFFSET (r_rdi),
+  REG_OFFSET (r_rbp),
+  REG_OFFSET (r_rsp),
+  REG_OFFSET (r_r8),
+  REG_OFFSET (r_r9),
+  REG_OFFSET (r_r10),
+  REG_OFFSET (r_r11),
+  REG_OFFSET (r_r12),
+  REG_OFFSET (r_r13),
+  REG_OFFSET (r_r14),
+  REG_OFFSET (r_r15),
+  REG_OFFSET (r_rip),
+  REG_OFFSET (r_rflags),
+  REG_OFFSET (r_cs),
+  REG_OFFSET (r_ss),
+  -1,
+  -1,
+  -1,
+  -1
+};
+
+
+/* Mapping between the general-purpose registers in FreeBSD/amd64
+   `struct reg' format and GDB's register cache layout for
+   FreeBSD/i386.
+
+   Note that most FreeBSD/amd64 registers are 64-bit, while the
+   FreeBSD/i386 registers are all 32-bit, but since we're
+   little-endian we get away with that.  */
+
+/* From <machine/reg.h>.  */
+static int amd64fbsd32_r_reg_offset[I386_NUM_GREGS] =
+{
+  14 * 8, 13 * 8,		/* %eax, %ecx */
+  12 * 8, 11 * 8,		/* %edx, %ebx */
+  20 * 8, 10 * 8,		/* %esp, %ebp */
+  9 * 8, 8 * 8,			/* %esi, %edi */
+  17 * 8, 19 * 8,		/* %eip, %eflags */
+  18 * 8, 21 * 8,		/* %cs, %ss */
+  -1, -1, -1, -1		/* %ds, %es, %fs, %gs */
+};
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <machine/pcb.h>
+#include <osreldate.h>
+
+#include "bsd-kvm.h"
+
+static int
+amd64fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  /* The following is true for FreeBSD 5.2:
+
+     The pcb contains %rip, %rbx, %rsp, %rbp, %r12, %r13, %r14, %r15,
+     %ds, %es, %fs and %gs.  This accounts for all callee-saved
+     registers specified by the psABI and then some.  Here %esp
+     contains the stack pointer at the point just after the call to
+     cpu_switch().  From this information we reconstruct the register
+     state as it would like when we just returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_rsp == 0)
+    return 0;
+
+  pcb->pcb_rsp += 8;
+  regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip);
+  regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx);
+  regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+  regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+  regcache_raw_supply (regcache, 12, &pcb->pcb_r12);
+  regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
+  regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
+  regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
+#if (__FreeBSD_version < 800075) && (__FreeBSD_kernel_version < 800075)
+  /* struct pcb provides the pcb_ds/pcb_es/pcb_fs/pcb_gs fields only
+     up until __FreeBSD_version 800074: The removal of these fields
+     occurred on 2009-04-01 while the __FreeBSD_version number was
+     bumped to 800075 on 2009-04-06.  So 800075 is the closest version
+     number where we should not try to access these fields.  */
+  regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
+  regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
+  regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
+  regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
+#endif
+
+  return 1;
+}
+
+
+/* Implement the to_read_description method.  */
+
+static const struct target_desc *
+amd64fbsd_read_description (struct target_ops *ops)
+{
+#ifdef PT_GETXSTATE_INFO
+  static int xsave_probed;
+  static uint64_t xcr0;
+#endif
+  struct reg regs;
+  int is64;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+  is64 = (regs.r_cs == GSEL (GUCODE_SEL, SEL_UPL));
+#ifdef PT_GETXSTATE_INFO
+  if (!xsave_probed)
+    {
+      struct ptrace_xstate_info info;
+
+      if (ptrace (PT_GETXSTATE_INFO, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &info, sizeof (info)) == 0)
+	{
+	  x86bsd_xsave_len = info.xsave_len;
+	  xcr0 = info.xsave_mask;
+	}
+      xsave_probed = 1;
+    }
+
+  if (x86bsd_xsave_len != 0)
+    {
+      if (is64)
+	return amd64_target_description (xcr0);
+      else
+	return i386_target_description (xcr0);
+    }
+#endif
+  if (is64)
+    return tdesc_amd64;
+  else
+    return tdesc_i386;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64fbsd_nat (void);
+
+void
+_initialize_amd64fbsd_nat (void)
+{
+  struct target_ops *t;
+  int offset;
+
+  amd64_native_gregset32_reg_offset = amd64fbsd32_r_reg_offset;
+  amd64_native_gregset64_reg_offset = amd64fbsd64_r_reg_offset;
+
+  /* Add some extra features to the common *BSD/i386 target.  */
+  t = amd64bsd_target ();
+  t->to_read_description = amd64fbsd_read_description;
+
+  fbsd_nat_add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (amd64fbsd_supply_pcb);
+
+  /* To support the recognition of signal handlers, i386-bsd-tdep.c
+     hardcodes some constants.  Inclusion of this file means that we
+     are compiling a native debugger, which means that we can use the
+     system header files and sysctl(3) to get at the relevant
+     information.  */
+
+#define SC_REG_OFFSET amd64fbsd_sc_reg_offset
+
+  /* We only check the program counter, stack pointer and frame
+     pointer since these members of `struct sigcontext' are essential
+     for providing backtraces.  */
+
+#define SC_RIP_OFFSET SC_REG_OFFSET[AMD64_RIP_REGNUM]
+#define SC_RSP_OFFSET SC_REG_OFFSET[AMD64_RSP_REGNUM]
+#define SC_RBP_OFFSET SC_REG_OFFSET[AMD64_RBP_REGNUM]
+
+  /* Override the default value for the offset of the program counter
+     in the sigcontext structure.  */
+  offset = offsetof (struct sigcontext, sc_rip);
+
+  if (SC_RIP_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."),
+	       offset, SC_RIP_OFFSET);
+    }
+
+  SC_RIP_OFFSET = offset;
+
+  /* Likewise for the stack pointer.  */
+  offset = offsetof (struct sigcontext, sc_rsp);
+
+  if (SC_RSP_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_rsp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."),
+	       offset, SC_RSP_OFFSET);
+    }
+
+  SC_RSP_OFFSET = offset;
+
+  /* And the frame pointer.  */
+  offset = offsetof (struct sigcontext, sc_rbp);
+
+  if (SC_RBP_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_rbp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."),
+	       offset, SC_RBP_OFFSET);
+    }
+
+  SC_RBP_OFFSET = offset;
+
+#ifdef KERN_PROC_SIGTRAMP
+  /* Normally signal frames are detected via amd64fbsd_sigtramp_p.
+     However, FreeBSD 9.2 through 10.1 do not include the page holding
+     the signal code in core dumps.  These releases do provide a
+     kern.proc.sigtramp.<pid> sysctl that returns the location of the
+     signal trampoline for a running process.  We fetch the location
+     of the current (gdb) process and use this to identify signal
+     frames in core dumps from these releases.  Note that this only
+     works for core dumps of 64-bit (FreeBSD/amd64) processes and does
+     not handle core dumps of 32-bit (FreeBSD/i386) processes.  */
+  {
+    int mib[4];
+    struct kinfo_sigtramp kst;
+    size_t len;
+
+    mib[0] = CTL_KERN;
+    mib[1] = KERN_PROC;
+    mib[2] = KERN_PROC_SIGTRAMP;
+    mib[3] = getpid ();
+    len = sizeof (kst);
+    if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0)
+      {
+	amd64fbsd_sigtramp_start_addr = (uintptr_t) kst.ksigtramp_start;
+	amd64fbsd_sigtramp_end_addr = (uintptr_t) kst.ksigtramp_end;
+      }
+  }
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64fbsd-nat.c ./gdb/amd64fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64fbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,318 +0,0 @@
-/* Native-dependent code for FreeBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/sysctl.h>
-#include <sys/user.h>
-#include <machine/reg.h>
-
-#include "fbsd-nat.h"
-#include "amd64-tdep.h"
-#include "amd64-nat.h"
-#include "amd64bsd-nat.h"
-#include "x86-nat.h"
-
-
-/* Offset in `struct reg' where MEMBER is stored.  */
-#define REG_OFFSET(member) offsetof (struct reg, member)
-
-/* At amd64fbsd64_r_reg_offset[REGNUM] you'll find the offset in
-   `struct reg' location where the GDB register REGNUM is stored.
-   Unsupported registers are marked with `-1'.  */
-static int amd64fbsd64_r_reg_offset[] =
-{
-  REG_OFFSET (r_rax),
-  REG_OFFSET (r_rbx),
-  REG_OFFSET (r_rcx),
-  REG_OFFSET (r_rdx),
-  REG_OFFSET (r_rsi),
-  REG_OFFSET (r_rdi),
-  REG_OFFSET (r_rbp),
-  REG_OFFSET (r_rsp),
-  REG_OFFSET (r_r8),
-  REG_OFFSET (r_r9),
-  REG_OFFSET (r_r10),
-  REG_OFFSET (r_r11),
-  REG_OFFSET (r_r12),
-  REG_OFFSET (r_r13),
-  REG_OFFSET (r_r14),
-  REG_OFFSET (r_r15),
-  REG_OFFSET (r_rip),
-  REG_OFFSET (r_rflags),
-  REG_OFFSET (r_cs),
-  REG_OFFSET (r_ss),
-  -1,
-  -1,
-  -1,
-  -1
-};
-
-
-/* Mapping between the general-purpose registers in FreeBSD/amd64
-   `struct reg' format and GDB's register cache layout for
-   FreeBSD/i386.
-
-   Note that most FreeBSD/amd64 registers are 64-bit, while the
-   FreeBSD/i386 registers are all 32-bit, but since we're
-   little-endian we get away with that.  */
-
-/* From <machine/reg.h>.  */
-static int amd64fbsd32_r_reg_offset[I386_NUM_GREGS] =
-{
-  14 * 8, 13 * 8,		/* %eax, %ecx */
-  12 * 8, 11 * 8,		/* %edx, %ebx */
-  20 * 8, 10 * 8,		/* %esp, %ebp */
-  9 * 8, 8 * 8,			/* %esi, %edi */
-  17 * 8, 19 * 8,		/* %eip, %eflags */
-  18 * 8, 21 * 8,		/* %cs, %ss */
-  -1, -1, -1, -1		/* %ds, %es, %fs, %gs */
-};
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <machine/pcb.h>
-#include <osreldate.h>
-
-#include "bsd-kvm.h"
-
-static int
-amd64fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  /* The following is true for FreeBSD 5.2:
-
-     The pcb contains %rip, %rbx, %rsp, %rbp, %r12, %r13, %r14, %r15,
-     %ds, %es, %fs and %gs.  This accounts for all callee-saved
-     registers specified by the psABI and then some.  Here %esp
-     contains the stack pointer at the point just after the call to
-     cpu_switch().  From this information we reconstruct the register
-     state as it would like when we just returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_rsp == 0)
-    return 0;
-
-  pcb->pcb_rsp += 8;
-  regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip);
-  regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx);
-  regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
-  regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
-  regcache_raw_supply (regcache, 12, &pcb->pcb_r12);
-  regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
-  regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
-  regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
-#if (__FreeBSD_version < 800075) && (__FreeBSD_kernel_version < 800075)
-  /* struct pcb provides the pcb_ds/pcb_es/pcb_fs/pcb_gs fields only
-     up until __FreeBSD_version 800074: The removal of these fields
-     occurred on 2009-04-01 while the __FreeBSD_version number was
-     bumped to 800075 on 2009-04-06.  So 800075 is the closest version
-     number where we should not try to access these fields.  */
-  regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
-  regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
-  regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
-  regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
-#endif
-
-  return 1;
-}
-
-
-static void (*super_mourn_inferior) (struct target_ops *ops);
-
-static void
-amd64fbsd_mourn_inferior (struct target_ops *ops)
-{
-#ifdef HAVE_PT_GETDBREGS
-  x86_cleanup_dregs ();
-#endif
-  super_mourn_inferior (ops);
-}
-
-/* Implement the to_read_description method.  */
-
-static const struct target_desc *
-amd64fbsd_read_description (struct target_ops *ops)
-{
-#ifdef PT_GETXSTATE_INFO
-  static int xsave_probed;
-  static uint64_t xcr0;
-#endif
-  struct reg regs;
-  int is64;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-  is64 = (regs.r_cs == GSEL (GUCODE_SEL, SEL_UPL));
-#ifdef PT_GETXSTATE_INFO
-  if (!xsave_probed)
-    {
-      struct ptrace_xstate_info info;
-
-      if (ptrace (PT_GETXSTATE_INFO, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &info, sizeof (info)) == 0)
-	{
-	  amd64bsd_xsave_len = info.xsave_len;
-	  xcr0 = info.xsave_mask;
-	}
-      xsave_probed = 1;
-    }
-
-  if (amd64bsd_xsave_len != 0)
-    {
-      if (is64)
-	return amd64_target_description (xcr0);
-      else
-	return i386_target_description (xcr0);
-    }
-#endif
-  if (is64)
-    return tdesc_amd64;
-  else
-    return tdesc_i386;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64fbsd_nat (void);
-
-void
-_initialize_amd64fbsd_nat (void)
-{
-  struct target_ops *t;
-  int offset;
-
-  amd64_native_gregset32_reg_offset = amd64fbsd32_r_reg_offset;
-  amd64_native_gregset64_reg_offset = amd64fbsd64_r_reg_offset;
-
-  /* Add some extra features to the common *BSD/i386 target.  */
-  t = amd64bsd_target ();
-
-#ifdef HAVE_PT_GETDBREGS
-
-  x86_use_watchpoints (t);
-
-  x86_dr_low.set_control = amd64bsd_dr_set_control;
-  x86_dr_low.set_addr = amd64bsd_dr_set_addr;
-  x86_dr_low.get_addr = amd64bsd_dr_get_addr;
-  x86_dr_low.get_status = amd64bsd_dr_get_status;
-  x86_dr_low.get_control = amd64bsd_dr_get_control;
-  x86_set_debug_register_length (8);
-
-#endif /* HAVE_PT_GETDBREGS */
-
-  super_mourn_inferior = t->to_mourn_inferior;
-  t->to_mourn_inferior = amd64fbsd_mourn_inferior;
-  t->to_read_description = amd64fbsd_read_description;
-
-  fbsd_nat_add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (amd64fbsd_supply_pcb);
-
-  /* To support the recognition of signal handlers, i386bsd-tdep.c
-     hardcodes some constants.  Inclusion of this file means that we
-     are compiling a native debugger, which means that we can use the
-     system header files and sysctl(3) to get at the relevant
-     information.  */
-
-#define SC_REG_OFFSET amd64fbsd_sc_reg_offset
-
-  /* We only check the program counter, stack pointer and frame
-     pointer since these members of `struct sigcontext' are essential
-     for providing backtraces.  */
-
-#define SC_RIP_OFFSET SC_REG_OFFSET[AMD64_RIP_REGNUM]
-#define SC_RSP_OFFSET SC_REG_OFFSET[AMD64_RSP_REGNUM]
-#define SC_RBP_OFFSET SC_REG_OFFSET[AMD64_RBP_REGNUM]
-
-  /* Override the default value for the offset of the program counter
-     in the sigcontext structure.  */
-  offset = offsetof (struct sigcontext, sc_rip);
-
-  if (SC_RIP_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."),
-	       offset, SC_RIP_OFFSET);
-    }
-
-  SC_RIP_OFFSET = offset;
-
-  /* Likewise for the stack pointer.  */
-  offset = offsetof (struct sigcontext, sc_rsp);
-
-  if (SC_RSP_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_rsp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."),
-	       offset, SC_RSP_OFFSET);
-    }
-
-  SC_RSP_OFFSET = offset;
-
-  /* And the frame pointer.  */
-  offset = offsetof (struct sigcontext, sc_rbp);
-
-  if (SC_RBP_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_rbp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."),
-	       offset, SC_RBP_OFFSET);
-    }
-
-  SC_RBP_OFFSET = offset;
-
-#ifdef KERN_PROC_SIGTRAMP
-  /* Normally signal frames are detected via amd64fbsd_sigtramp_p.
-     However, FreeBSD 9.2 through 10.1 do not include the page holding
-     the signal code in core dumps.  These releases do provide a
-     kern.proc.sigtramp.<pid> sysctl that returns the location of the
-     signal trampoline for a running process.  We fetch the location
-     of the current (gdb) process and use this to identify signal
-     frames in core dumps from these releases.  Note that this only
-     works for core dumps of 64-bit (FreeBSD/amd64) processes and does
-     not handle core dumps of 32-bit (FreeBSD/i386) processes.  */
-  {
-    int mib[4];
-    struct kinfo_sigtramp kst;
-    size_t len;
-
-    mib[0] = CTL_KERN;
-    mib[1] = KERN_PROC;
-    mib[2] = KERN_PROC_SIGTRAMP;
-    mib[3] = getpid ();
-    len = sizeof (kst);
-    if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0)
-      {
-	amd64fbsd_sigtramp_start_addr = (uintptr_t) kst.ksigtramp_start;
-	amd64fbsd_sigtramp_end_addr = (uintptr_t) kst.ksigtramp_end;
-      }
-  }
-#endif
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-fbsd-tdep.c ./gdb/amd64-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,319 @@
+/* Target-dependent code for FreeBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "osabi.h"
+#include "regset.h"
+#include "i386-fbsd-tdep.h"
+#include "x86-xstate.h"
+
+#include "amd64-tdep.h"
+#include "bsd-uthread.h"
+#include "fbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Support for signal handlers.  */
+
+/* Return whether THIS_FRAME corresponds to a FreeBSD sigtramp
+   routine.  */
+
+static const gdb_byte amd64fbsd_sigtramp_code[] =
+{
+  0x48, 0x8d, 0x7c, 0x24, 0x10, /* lea     SIGF_UC(%rsp),%rdi */
+  0x6a, 0x00,			/* pushq   $0 */
+  0x48, 0xc7, 0xc0, 0xa1, 0x01, 0x00, 0x00,
+				/* movq    $SYS_sigreturn,%rax */
+  0x0f, 0x05                    /* syscall */
+};
+
+static int
+amd64fbsd_sigtramp_p (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  gdb_byte buf[sizeof amd64fbsd_sigtramp_code];
+
+  if (!safe_frame_unwind_memory (this_frame, pc, buf, sizeof buf))
+    return 0;
+  if (memcmp (buf, amd64fbsd_sigtramp_code, sizeof amd64fbsd_sigtramp_code)
+      != 0)
+    return 0;
+
+  return 1;
+}
+
+/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
+   address of the associated sigcontext structure.  */
+
+static CORE_ADDR
+amd64fbsd_sigcontext_addr (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp;
+  gdb_byte buf[8];
+
+  /* The `struct sigcontext' (which really is an `ucontext_t' on
+     FreeBSD/amd64) lives at a fixed offset in the signal frame.  See
+     <machine/sigframe.h>.  */
+  get_frame_register (this_frame, AMD64_RSP_REGNUM, buf);
+  sp = extract_unsigned_integer (buf, 8, byte_order);
+  return sp + 16;
+}
+
+/* FreeBSD 5.1-RELEASE or later.  */
+
+/* Mapping between the general-purpose registers in `struct reg'
+   format and GDB's register cache layout.
+
+   Note that some registers are 32-bit, but since we're little-endian
+   we get away with that.  */
+
+/* From <machine/reg.h>.  */
+static int amd64fbsd_r_reg_offset[] =
+{
+  14 * 8,			/* %rax */
+  11 * 8,			/* %rbx */
+  13 * 8,			/* %rcx */
+  12 * 8,			/* %rdx */
+  9 * 8,			/* %rsi */
+  8 * 8,			/* %rdi */
+  10 * 8,			/* %rbp */
+  20 * 8,			/* %rsp */
+  7 * 8,			/* %r8 ...  */
+  6 * 8,
+  5 * 8,
+  4 * 8,
+  3 * 8,
+  2 * 8,
+  1 * 8,
+  0 * 8,			/* ... %r15 */
+  17 * 8,			/* %rip */
+  19 * 8,			/* %eflags */
+  18 * 8,			/* %cs */
+  21 * 8,			/* %ss */
+  -1,				/* %ds */
+  -1,				/* %es */
+  -1,				/* %fs */
+  -1				/* %gs */
+};
+
+/* Location of the signal trampoline.  */
+CORE_ADDR amd64fbsd_sigtramp_start_addr;
+CORE_ADDR amd64fbsd_sigtramp_end_addr;
+
+/* From <machine/signal.h>.  */
+int amd64fbsd_sc_reg_offset[] =
+{
+  24 + 6 * 8,			/* %rax */
+  24 + 7 * 8,			/* %rbx */
+  24 + 3 * 8,			/* %rcx */
+  24 + 2 * 8,			/* %rdx */
+  24 + 1 * 8,			/* %rsi */
+  24 + 0 * 8,			/* %rdi */
+  24 + 8 * 8,			/* %rbp */
+  24 + 22 * 8,			/* %rsp */
+  24 + 4 * 8,			/* %r8 ...  */
+  24 + 5 * 8,
+  24 + 9 * 8,
+  24 + 10 * 8,
+  24 + 11 * 8,
+  24 + 12 * 8,
+  24 + 13 * 8,
+  24 + 14 * 8,			/* ... %r15 */
+  24 + 19 * 8,			/* %rip */
+  24 + 21 * 8,			/* %eflags */
+  24 + 20 * 8,			/* %cs */
+  24 + 23 * 8,			/* %ss */
+  -1,				/* %ds */
+  -1,				/* %es */
+  -1,				/* %fs */
+  -1				/* %gs */
+};
+
+/* From /usr/src/lib/libc/amd64/gen/_setjmp.S.  */
+static int amd64fbsd_jmp_buf_reg_offset[] =
+{
+  -1,				/* %rax */
+  1 * 8,			/* %rbx */
+  -1,				/* %rcx */
+  -1,				/* %rdx */
+  -1,				/* %rsi */
+  -1,				/* %rdi */
+  3 * 8,			/* %rbp */
+  2 * 8,			/* %rsp */
+  -1,				/* %r8 ...  */
+  -1,
+  -1,
+  -1,				/* ... %r11 */
+  4 * 8,			/* %r12 ...  */
+  5 * 8,
+  6 * 8,
+  7 * 8,			/* ... %r15 */
+  0 * 8				/* %rip */
+};
+
+/* Implement the core_read_description gdbarch method.  */
+
+static const struct target_desc *
+amd64fbsd_core_read_description (struct gdbarch *gdbarch,
+				 struct target_ops *target,
+				 bfd *abfd)
+{
+  return amd64_target_description (i386fbsd_core_read_xcr0 (abfd));
+}
+
+/* Similar to amd64_supply_fpregset, but use XSAVE extended state.  */
+
+static void
+amd64fbsd_supply_xstateregset (const struct regset *regset,
+			       struct regcache *regcache, int regnum,
+			       const void *xstateregs, size_t len)
+{
+  amd64_supply_xsave (regcache, regnum, xstateregs);
+}
+
+/* Similar to amd64_collect_fpregset, but use XSAVE extended state.  */
+
+static void
+amd64fbsd_collect_xstateregset (const struct regset *regset,
+				const struct regcache *regcache,
+				int regnum, void *xstateregs, size_t len)
+{
+  amd64_collect_xsave (regcache, regnum, xstateregs, 1);
+}
+
+static const struct regset amd64fbsd_xstateregset =
+  {
+    NULL,
+    amd64fbsd_supply_xstateregset,
+    amd64fbsd_collect_xstateregset
+  };
+
+/* Iterate over core file register note sections.  */
+
+static void
+amd64fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					iterate_over_regset_sections_cb *cb,
+					void *cb_data,
+					const struct regcache *regcache)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  cb (".reg", tdep->sizeof_gregset, &i386_gregset, NULL, cb_data);
+  cb (".reg2", tdep->sizeof_fpregset, &amd64_fpregset, NULL, cb_data);
+  cb (".reg-xstate", X86_XSTATE_SIZE(tdep->xcr0),
+      &amd64fbsd_xstateregset, "XSAVE extended state", cb_data);
+}
+
+static void
+amd64fbsd_supply_uthread (struct regcache *regcache,
+			  int regnum, CORE_ADDR addr)
+{
+  gdb_byte buf[8];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
+    {
+      if (amd64fbsd_jmp_buf_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  read_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
+	  regcache_raw_supply (regcache, i, buf);
+	}
+    }
+}
+
+static void
+amd64fbsd_collect_uthread (const struct regcache *regcache,
+			   int regnum, CORE_ADDR addr)
+{
+  gdb_byte buf[8];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
+    {
+      if (amd64fbsd_jmp_buf_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  regcache_raw_collect (regcache, i, buf);
+	  write_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
+	}
+    }
+}
+
+static void
+amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Generic FreeBSD support. */
+  fbsd_init_abi (info, gdbarch);
+
+  /* Obviously FreeBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+
+  tdep->gregset_reg_offset = amd64fbsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (amd64fbsd_r_reg_offset);
+  tdep->sizeof_gregset = 22 * 8;
+
+  amd64_init_abi (info, gdbarch);
+
+  tdep->sigtramp_p = amd64fbsd_sigtramp_p;
+  tdep->sigtramp_start = amd64fbsd_sigtramp_start_addr;
+  tdep->sigtramp_end = amd64fbsd_sigtramp_end_addr;
+  tdep->sigcontext_addr = amd64fbsd_sigcontext_addr;
+  tdep->sc_reg_offset = amd64fbsd_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (amd64fbsd_sc_reg_offset);
+
+  tdep->xsave_xcr0_offset = I386_FBSD_XSAVE_XCR0_OFFSET;
+
+  /* Iterate over core file register note sections.  */
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, amd64fbsd_iterate_over_regset_sections);
+
+  set_gdbarch_core_read_description (gdbarch,
+				     amd64fbsd_core_read_description);
+
+  /* FreeBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, amd64fbsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, amd64fbsd_collect_uthread);
+
+  /* FreeBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64fbsd_tdep (void);
+
+void
+_initialize_amd64fbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
+			  GDB_OSABI_FREEBSD, amd64fbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64fbsd-tdep.c ./gdb/amd64fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64fbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,319 +0,0 @@
-/* Target-dependent code for FreeBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "osabi.h"
-#include "regset.h"
-#include "i386fbsd-tdep.h"
-#include "x86-xstate.h"
-
-#include "amd64-tdep.h"
-#include "bsd-uthread.h"
-#include "fbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Support for signal handlers.  */
-
-/* Return whether THIS_FRAME corresponds to a FreeBSD sigtramp
-   routine.  */
-
-static const gdb_byte amd64fbsd_sigtramp_code[] =
-{
-  0x48, 0x8d, 0x7c, 0x24, 0x10, /* lea     SIGF_UC(%rsp),%rdi */
-  0x6a, 0x00,			/* pushq   $0 */
-  0x48, 0xc7, 0xc0, 0xa1, 0x01, 0x00, 0x00,
-				/* movq    $SYS_sigreturn,%rax */
-  0x0f, 0x05                    /* syscall */
-};
-
-static int
-amd64fbsd_sigtramp_p (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  gdb_byte buf[sizeof amd64fbsd_sigtramp_code];
-
-  if (!safe_frame_unwind_memory (this_frame, pc, buf, sizeof buf))
-    return 0;
-  if (memcmp (buf, amd64fbsd_sigtramp_code, sizeof amd64fbsd_sigtramp_code)
-      != 0)
-    return 0;
-
-  return 1;
-}
-
-/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
-   address of the associated sigcontext structure.  */
-
-static CORE_ADDR
-amd64fbsd_sigcontext_addr (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp;
-  gdb_byte buf[8];
-
-  /* The `struct sigcontext' (which really is an `ucontext_t' on
-     FreeBSD/amd64) lives at a fixed offset in the signal frame.  See
-     <machine/sigframe.h>.  */
-  get_frame_register (this_frame, AMD64_RSP_REGNUM, buf);
-  sp = extract_unsigned_integer (buf, 8, byte_order);
-  return sp + 16;
-}
-
-/* FreeBSD 5.1-RELEASE or later.  */
-
-/* Mapping between the general-purpose registers in `struct reg'
-   format and GDB's register cache layout.
-
-   Note that some registers are 32-bit, but since we're little-endian
-   we get away with that.  */
-
-/* From <machine/reg.h>.  */
-static int amd64fbsd_r_reg_offset[] =
-{
-  14 * 8,			/* %rax */
-  11 * 8,			/* %rbx */
-  13 * 8,			/* %rcx */
-  12 * 8,			/* %rdx */
-  9 * 8,			/* %rsi */
-  8 * 8,			/* %rdi */
-  10 * 8,			/* %rbp */
-  20 * 8,			/* %rsp */
-  7 * 8,			/* %r8 ...  */
-  6 * 8,
-  5 * 8,
-  4 * 8,
-  3 * 8,
-  2 * 8,
-  1 * 8,
-  0 * 8,			/* ... %r15 */
-  17 * 8,			/* %rip */
-  19 * 8,			/* %eflags */
-  18 * 8,			/* %cs */
-  21 * 8,			/* %ss */
-  -1,				/* %ds */
-  -1,				/* %es */
-  -1,				/* %fs */
-  -1				/* %gs */
-};
-
-/* Location of the signal trampoline.  */
-CORE_ADDR amd64fbsd_sigtramp_start_addr;
-CORE_ADDR amd64fbsd_sigtramp_end_addr;
-
-/* From <machine/signal.h>.  */
-int amd64fbsd_sc_reg_offset[] =
-{
-  24 + 6 * 8,			/* %rax */
-  24 + 7 * 8,			/* %rbx */
-  24 + 3 * 8,			/* %rcx */
-  24 + 2 * 8,			/* %rdx */
-  24 + 1 * 8,			/* %rsi */
-  24 + 0 * 8,			/* %rdi */
-  24 + 8 * 8,			/* %rbp */
-  24 + 22 * 8,			/* %rsp */
-  24 + 4 * 8,			/* %r8 ...  */
-  24 + 5 * 8,
-  24 + 9 * 8,
-  24 + 10 * 8,
-  24 + 11 * 8,
-  24 + 12 * 8,
-  24 + 13 * 8,
-  24 + 14 * 8,			/* ... %r15 */
-  24 + 19 * 8,			/* %rip */
-  24 + 21 * 8,			/* %eflags */
-  24 + 20 * 8,			/* %cs */
-  24 + 23 * 8,			/* %ss */
-  -1,				/* %ds */
-  -1,				/* %es */
-  -1,				/* %fs */
-  -1				/* %gs */
-};
-
-/* From /usr/src/lib/libc/amd64/gen/_setjmp.S.  */
-static int amd64fbsd_jmp_buf_reg_offset[] =
-{
-  -1,				/* %rax */
-  1 * 8,			/* %rbx */
-  -1,				/* %rcx */
-  -1,				/* %rdx */
-  -1,				/* %rsi */
-  -1,				/* %rdi */
-  3 * 8,			/* %rbp */
-  2 * 8,			/* %rsp */
-  -1,				/* %r8 ...  */
-  -1,
-  -1,
-  -1,				/* ... %r11 */
-  4 * 8,			/* %r12 ...  */
-  5 * 8,
-  6 * 8,
-  7 * 8,			/* ... %r15 */
-  0 * 8				/* %rip */
-};
-
-/* Implement the core_read_description gdbarch method.  */
-
-static const struct target_desc *
-amd64fbsd_core_read_description (struct gdbarch *gdbarch,
-				 struct target_ops *target,
-				 bfd *abfd)
-{
-  return amd64_target_description (i386fbsd_core_read_xcr0 (abfd));
-}
-
-/* Similar to amd64_supply_fpregset, but use XSAVE extended state.  */
-
-static void
-amd64fbsd_supply_xstateregset (const struct regset *regset,
-			       struct regcache *regcache, int regnum,
-			       const void *xstateregs, size_t len)
-{
-  amd64_supply_xsave (regcache, regnum, xstateregs);
-}
-
-/* Similar to amd64_collect_fpregset, but use XSAVE extended state.  */
-
-static void
-amd64fbsd_collect_xstateregset (const struct regset *regset,
-				const struct regcache *regcache,
-				int regnum, void *xstateregs, size_t len)
-{
-  amd64_collect_xsave (regcache, regnum, xstateregs, 1);
-}
-
-static const struct regset amd64fbsd_xstateregset =
-  {
-    NULL,
-    amd64fbsd_supply_xstateregset,
-    amd64fbsd_collect_xstateregset
-  };
-
-/* Iterate over core file register note sections.  */
-
-static void
-amd64fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					iterate_over_regset_sections_cb *cb,
-					void *cb_data,
-					const struct regcache *regcache)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  cb (".reg", tdep->sizeof_gregset, &i386_gregset, NULL, cb_data);
-  cb (".reg2", tdep->sizeof_fpregset, &amd64_fpregset, NULL, cb_data);
-  cb (".reg-xstate", X86_XSTATE_SIZE(tdep->xcr0),
-      &amd64fbsd_xstateregset, "XSAVE extended state", cb_data);
-}
-
-static void
-amd64fbsd_supply_uthread (struct regcache *regcache,
-			  int regnum, CORE_ADDR addr)
-{
-  gdb_byte buf[8];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
-    {
-      if (amd64fbsd_jmp_buf_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  read_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
-	  regcache_raw_supply (regcache, i, buf);
-	}
-    }
-}
-
-static void
-amd64fbsd_collect_uthread (const struct regcache *regcache,
-			   int regnum, CORE_ADDR addr)
-{
-  gdb_byte buf[8];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  for (i = 0; i < ARRAY_SIZE (amd64fbsd_jmp_buf_reg_offset); i++)
-    {
-      if (amd64fbsd_jmp_buf_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  regcache_raw_collect (regcache, i, buf);
-	  write_memory (addr + amd64fbsd_jmp_buf_reg_offset[i], buf, 8);
-	}
-    }
-}
-
-static void
-amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Generic FreeBSD support. */
-  fbsd_init_abi (info, gdbarch);
-
-  /* Obviously FreeBSD is BSD-based.  */
-  i386bsd_init_abi (info, gdbarch);
-
-  tdep->gregset_reg_offset = amd64fbsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (amd64fbsd_r_reg_offset);
-  tdep->sizeof_gregset = 22 * 8;
-
-  amd64_init_abi (info, gdbarch);
-
-  tdep->sigtramp_p = amd64fbsd_sigtramp_p;
-  tdep->sigtramp_start = amd64fbsd_sigtramp_start_addr;
-  tdep->sigtramp_end = amd64fbsd_sigtramp_end_addr;
-  tdep->sigcontext_addr = amd64fbsd_sigcontext_addr;
-  tdep->sc_reg_offset = amd64fbsd_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (amd64fbsd_sc_reg_offset);
-
-  tdep->xsave_xcr0_offset = I386_FBSD_XSAVE_XCR0_OFFSET;
-
-  /* Iterate over core file register note sections.  */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, amd64fbsd_iterate_over_regset_sections);
-
-  set_gdbarch_core_read_description (gdbarch,
-				     amd64fbsd_core_read_description);
-
-  /* FreeBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, amd64fbsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, amd64fbsd_collect_uthread);
-
-  /* FreeBSD uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64fbsd_tdep (void);
-
-void
-_initialize_amd64fbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
-			  GDB_OSABI_FREEBSD_ELF, amd64fbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-nat.c ./gdb/amd64-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86-64.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -23,7 +23,7 @@
 #include "regcache.h"
 #include "elf/common.h"
 #include <sys/uio.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/prctl.h>
 #include <sys/reg.h>
 #include "gregset.h"
@@ -38,6 +38,13 @@
 
 #include "x86-linux-nat.h"
 #include "nat/linux-ptrace.h"
+#include "nat/amd64-linux-siginfo.h"
+
+/* This definition comes from prctl.h.  Kernels older than 2.5.64
+   do not have it.  */
+#ifndef PTRACE_ARCH_PRCTL
+#define PTRACE_ARCH_PRCTL      30
+#endif
 
 /* Mapping between the general-purpose registers in GNU/Linux x86-64
    `struct user' format and GDB's register cache layout for GNU/Linux
@@ -66,6 +73,7 @@ static int amd64_linux_gregset32_reg_off
   -1, -1,			  /* MPX registers BNDCFGU, BNDSTATUS.  */
   -1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512)  */
   -1, -1, -1, -1, -1, -1, -1, -1, /* zmm0 ... zmm7 (AVX512)  */
+  -1,				  /* PKEYS register PKRU  */
   ORIG_RAX * 8			  /* "orig_eax"  */
 };
 
@@ -170,6 +178,30 @@ amd64_linux_fetch_inferior_registers (st
 
 	  amd64_supply_fxsave (regcache, -1, &fpregs);
 	}
+#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+      {
+	/* PTRACE_ARCH_PRCTL is obsolete since 2.6.25, where the
+	   fs_base and gs_base fields of user_regs_struct can be
+	   used directly.  */
+	unsigned long base;
+
+	if (regnum == -1 || regnum == AMD64_FSBASE_REGNUM)
+	  {
+	    if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_FS) < 0)
+	      perror_with_name (_("Couldn't get segment register fs_base"));
+
+	    regcache_raw_supply (regcache, AMD64_FSBASE_REGNUM, &base);
+	  }
+
+	if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM)
+	  {
+	    if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_GS) < 0)
+	      perror_with_name (_("Couldn't get segment register gs_base"));
+
+	    regcache_raw_supply (regcache, AMD64_GSBASE_REGNUM, &base);
+	  }
+      }
+#endif
     }
 }
 
@@ -236,6 +268,30 @@ amd64_linux_store_inferior_registers (st
 	  if (ptrace (PTRACE_SETFPREGS, tid, 0, (long) &fpregs) < 0)
 	    perror_with_name (_("Couldn't write floating point status"));
 	}
+
+#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+      {
+	/* PTRACE_ARCH_PRCTL is obsolete since 2.6.25, where the
+	   fs_base and gs_base fields of user_regs_struct can be
+	   used directly.  */
+	void *base;
+
+	if (regnum == -1 || regnum == AMD64_FSBASE_REGNUM)
+	  {
+	    regcache_raw_collect (regcache, AMD64_FSBASE_REGNUM, &base);
+
+	    if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_FS) < 0)
+	      perror_with_name (_("Couldn't write segment register fs_base"));
+	  }
+	if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM)
+	  {
+
+	    regcache_raw_collect (regcache, AMD64_GSBASE_REGNUM, &base);
+	    if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_GS) < 0)
+	      perror_with_name (_("Couldn't write segment register gs_base"));
+	  }
+      }
+#endif
     }
 }
 
@@ -244,7 +300,7 @@ amd64_linux_store_inferior_registers (st
    a request for a thread's local storage address.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
                     lwpid_t lwpid, int idx, void **base)
 {
   if (gdbarch_bfd_arch_info (target_gdbarch ())->bits_per_word == 32)
@@ -264,11 +320,7 @@ ps_get_thread_area (const struct ps_proc
     }
   else
     {
-      /* This definition comes from prctl.h, but some kernels may not
-         have it.  */
-#ifndef PTRACE_ARCH_PRCTL
-#define PTRACE_ARCH_PRCTL      30
-#endif
+
       /* FIXME: ezannoni-2003-07-09 see comment above about include
 	 file order.  We could be getting bogus values for these two.  */
       gdb_assert (FS < ELF_NGREG);
@@ -320,451 +372,29 @@ ps_get_thread_area (const struct ps_proc
 }
 
 
-/* When GDB is built as a 64-bit application on linux, the
-   PTRACE_GETSIGINFO data is always presented in 64-bit layout.  Since
-   debugging a 32-bit inferior with a 64-bit GDB should look the same
-   as debugging it with a 32-bit GDB, we do the 32-bit <-> 64-bit
-   conversion in-place ourselves.  */
-
-/* These types below (compat_*) define a siginfo type that is layout
-   compatible with the siginfo type exported by the 32-bit userspace
-   support.  */
-
-typedef int compat_int_t;
-typedef unsigned int compat_uptr_t;
-
-typedef int compat_time_t;
-typedef int compat_timer_t;
-typedef int compat_clock_t;
-
-struct compat_timeval
-{
-  compat_time_t tv_sec;
-  int tv_usec;
-};
-
-typedef union compat_sigval
-{
-  compat_int_t sival_int;
-  compat_uptr_t sival_ptr;
-} compat_sigval_t;
-
-typedef struct compat_siginfo
-{
-  int si_signo;
-  int si_errno;
-  int si_code;
-
-  union
-  {
-    int _pad[((128 / sizeof (int)) - 3)];
-
-    /* kill() */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-    } _kill;
-
-    /* POSIX.1b timers */
-    struct
-    {
-      compat_timer_t _tid;
-      int _overrun;
-      compat_sigval_t _sigval;
-    } _timer;
-
-    /* POSIX.1b signals */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      compat_sigval_t _sigval;
-    } _rt;
-
-    /* SIGCHLD */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      int _status;
-      compat_clock_t _utime;
-      compat_clock_t _stime;
-    } _sigchld;
-
-    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
-    struct
-    {
-      unsigned int _addr;
-    } _sigfault;
-
-    /* SIGPOLL */
-    struct
-    {
-      int _band;
-      int _fd;
-    } _sigpoll;
-  } _sifields;
-} compat_siginfo_t;
-
-/* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes.  */
-typedef struct compat_x32_clock
-{
-  int lower;
-  int upper;
-} compat_x32_clock_t;
-
-typedef struct compat_x32_siginfo
-{
-  int si_signo;
-  int si_errno;
-  int si_code;
-
-  union
-  {
-    int _pad[((128 / sizeof (int)) - 3)];
-
-    /* kill() */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-    } _kill;
-
-    /* POSIX.1b timers */
-    struct
-    {
-      compat_timer_t _tid;
-      int _overrun;
-      compat_sigval_t _sigval;
-    } _timer;
-
-    /* POSIX.1b signals */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      compat_sigval_t _sigval;
-    } _rt;
-
-    /* SIGCHLD */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      int _status;
-      compat_x32_clock_t _utime;
-      compat_x32_clock_t _stime;
-    } _sigchld;
-
-    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
-    struct
-    {
-      unsigned int _addr;
-    } _sigfault;
-
-    /* SIGPOLL */
-    struct
-    {
-      int _band;
-      int _fd;
-    } _sigpoll;
-  } _sifields;
-} compat_x32_siginfo_t;
-
-#define cpt_si_pid _sifields._kill._pid
-#define cpt_si_uid _sifields._kill._uid
-#define cpt_si_timerid _sifields._timer._tid
-#define cpt_si_overrun _sifields._timer._overrun
-#define cpt_si_status _sifields._sigchld._status
-#define cpt_si_utime _sifields._sigchld._utime
-#define cpt_si_stime _sifields._sigchld._stime
-#define cpt_si_ptr _sifields._rt._sigval.sival_ptr
-#define cpt_si_addr _sifields._sigfault._addr
-#define cpt_si_band _sifields._sigpoll._band
-#define cpt_si_fd _sifields._sigpoll._fd
-
-/* glibc at least up to 2.3.2 doesn't have si_timerid, si_overrun.
-   In their place is si_timer1,si_timer2.  */
-#ifndef si_timerid
-#define si_timerid si_timer1
-#endif
-#ifndef si_overrun
-#define si_overrun si_timer2
-#endif
-
-static void
-compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->cpt_si_timerid = from->si_timerid;
-      to->cpt_si_overrun = from->si_overrun;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_status = from->si_status;
-	  to->cpt_si_utime = from->si_utime;
-	  to->cpt_si_stime = from->si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->cpt_si_addr = (intptr_t) from->si_addr;
-	  break;
-	case SIGPOLL:
-	  to->cpt_si_band = from->si_band;
-	  to->cpt_si_fd = from->si_fd;
-	  break;
-	default:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_ptr = (intptr_t) from->si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->si_timerid = from->cpt_si_timerid;
-      to->si_overrun = from->cpt_si_overrun;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-    }
-  if (to->si_code < 0)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_status = from->cpt_si_status;
-	  to->si_utime = from->cpt_si_utime;
-	  to->si_stime = from->cpt_si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->si_addr = (void *) (intptr_t) from->cpt_si_addr;
-	  break;
-	case SIGPOLL:
-	  to->si_band = from->cpt_si_band;
-	  to->si_fd = from->cpt_si_fd;
-	  break;
-	default:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_ptr = (void* ) (intptr_t) from->cpt_si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to,
-				 siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->cpt_si_timerid = from->si_timerid;
-      to->cpt_si_overrun = from->si_overrun;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_status = from->si_status;
-	  memcpy (&to->cpt_si_utime, &from->si_utime,
-		  sizeof (to->cpt_si_utime));
-	  memcpy (&to->cpt_si_stime, &from->si_stime,
-		  sizeof (to->cpt_si_stime));
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->cpt_si_addr = (intptr_t) from->si_addr;
-	  break;
-	case SIGPOLL:
-	  to->cpt_si_band = from->si_band;
-	  to->cpt_si_fd = from->si_fd;
-	  break;
-	default:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_ptr = (intptr_t) from->si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-siginfo_from_compat_x32_siginfo (siginfo_t *to,
-				 compat_x32_siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->si_timerid = from->cpt_si_timerid;
-      to->si_overrun = from->cpt_si_overrun;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-    }
-  if (to->si_code < 0)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_status = from->cpt_si_status;
-	  memcpy (&to->si_utime, &from->cpt_si_utime,
-		  sizeof (to->si_utime));
-	  memcpy (&to->si_stime, &from->cpt_si_stime,
-		  sizeof (to->si_stime));
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->si_addr = (void *) (intptr_t) from->cpt_si_addr;
-	  break;
-	case SIGPOLL:
-	  to->si_band = from->cpt_si_band;
-	  to->si_fd = from->cpt_si_fd;
-	  break;
-	default:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_ptr = (void* ) (intptr_t) from->cpt_si_ptr;
-	  break;
-	}
-    }
-}
-
-/* Convert a native/host siginfo object, into/from the siginfo in the
+/* Convert a ptrace/host siginfo object, into/from the siginfo in the
    layout of the inferiors' architecture.  Returns true if any
    conversion was done; false otherwise.  If DIRECTION is 1, then copy
-   from INF to NATIVE.  If DIRECTION is 0, copy from NATIVE to
+   from INF to PTRACE.  If DIRECTION is 0, copy from PTRACE to
    INF.  */
 
 static int
-amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
+amd64_linux_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
 {
   struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
 
   /* Is the inferior 32-bit?  If so, then do fixup the siginfo
      object.  */
   if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
-    {
-      gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t));
-
-      if (direction == 0)
-	compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native);
-      else
-	siginfo_from_compat_siginfo (native, (struct compat_siginfo *) inf);
-
-      return 1;
-    }
+      return amd64_linux_siginfo_fixup_common (ptrace, inf, direction,
+					       FIXUP_32);
   /* No fixup for native x32 GDB.  */
   else if (gdbarch_addr_bit (gdbarch) == 32 && sizeof (void *) == 8)
-    {
-      gdb_assert (sizeof (siginfo_t) == sizeof (compat_x32_siginfo_t));
-
-      if (direction == 0)
-	compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf,
-					 native);
-      else
-	siginfo_from_compat_x32_siginfo (native,
-					 (struct compat_x32_siginfo *) inf);
-
-      return 1;
-    }
+      return amd64_linux_siginfo_fixup_common (ptrace, inf, direction,
+					       FIXUP_X32);
   else
     return 0;
 }
-
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_amd64_linux_nat (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-tdep.c ./gdb/amd64-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux x86-64.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -43,11 +43,13 @@
 #include "features/i386/amd64-linux.c"
 #include "features/i386/amd64-avx-linux.c"
 #include "features/i386/amd64-mpx-linux.c"
-#include "features/i386/amd64-avx512-linux.c"
+#include "features/i386/amd64-avx-mpx-linux.c"
+#include "features/i386/amd64-avx-avx512-linux.c"
+#include "features/i386/amd64-avx-mpx-avx512-pku-linux.c"
 
 #include "features/i386/x32-linux.c"
 #include "features/i386/x32-avx-linux.c"
-#include "features/i386/x32-avx512-linux.c"
+#include "features/i386/x32-avx-avx512-linux.c"
 
 /* The syscall's XML filename for i386.  */
 #define XML_SYSCALL_FILENAME_AMD64 "syscalls/amd64-linux.xml"
@@ -102,6 +104,10 @@ int amd64_linux_gregset_reg_offset[] =
   -1, -1, -1, -1, -1, -1, -1, -1,
   -1, -1, -1, -1, -1, -1, -1, -1,
   -1, -1, -1, -1, -1, -1, -1, -1,
+  -1,				/* PKEYS register pkru  */
+
+  /* End of hardware registers */
+  21 * 8, 22 * 8,		      /* fs_base and gs_base.  */
   15 * 8			      /* "orig_rax" */
 };
 
@@ -283,7 +289,9 @@ static int
 amd64_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 				 struct reggroup *group)
 { 
-  if (regnum == AMD64_LINUX_ORIG_RAX_REGNUM)
+  if (regnum == AMD64_LINUX_ORIG_RAX_REGNUM
+      || regnum == AMD64_FSBASE_REGNUM
+      || regnum == AMD64_GSBASE_REGNUM)
     return (group == system_reggroup
             || group == save_reggroup
             || group == restore_reggroup);
@@ -995,7 +1003,7 @@ amd64_canonicalize_syscall (enum amd64_s
 
   case amd64_sys_arch_prctl:
   case amd64_x32_sys_arch_prctl:
-    return -1;	/* Note */
+    return gdb_sys_no_syscall;	/* Note */
 
   case amd64_sys_adjtimex:
   case amd64_x32_sys_adjtimex:
@@ -1429,7 +1437,7 @@ amd64_canonicalize_syscall (enum amd64_s
     return gdb_sys_move_pages;
 
   default:
-    return -1;
+    return gdb_sys_no_syscall;
   }
 }
 
@@ -1451,7 +1459,7 @@ amd64_linux_syscall_record_common (struc
 {
   int ret;
   ULONGEST syscall_native;
-  enum gdb_syscall syscall_gdb = -1;
+  enum gdb_syscall syscall_gdb = gdb_sys_no_syscall;
 
   regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &syscall_native);
 
@@ -1486,9 +1494,10 @@ amd64_linux_syscall_record_common (struc
       break;
     }
 
-  syscall_gdb = amd64_canonicalize_syscall (syscall_native);
+  syscall_gdb
+    = amd64_canonicalize_syscall ((enum amd64_syscall) syscall_native);
 
-  if (syscall_gdb < 0)
+  if (syscall_gdb == gdb_sys_no_syscall)
     {
       printf_unfiltered (_("Process record and replay target doesn't "
                            "support syscall number %s\n"), 
@@ -1578,17 +1587,29 @@ amd64_linux_core_read_description (struc
 
   switch (xcr0 & X86_XSTATE_ALL_MASK)
     {
-    case X86_XSTATE_MPX_AVX512_MASK:
-    case X86_XSTATE_AVX512_MASK:
+    case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
       if (gdbarch_ptr_bit (gdbarch) == 32)
-	return tdesc_x32_avx512_linux;
+	  /* No MPX on x32, fallback to AVX-AVX512.  */
+	return tdesc_x32_avx_avx512_linux;
       else
-	return tdesc_amd64_avx512_linux;
+	return tdesc_amd64_avx_mpx_avx512_pku_linux;
+    case X86_XSTATE_AVX_AVX512_MASK:
+      if (gdbarch_ptr_bit (gdbarch) == 32)
+	return tdesc_x32_avx_avx512_linux;
+      else
+	return tdesc_amd64_avx_avx512_linux;
     case X86_XSTATE_MPX_MASK:
       if (gdbarch_ptr_bit (gdbarch) == 32)
-	return tdesc_x32_avx_linux;  /* No x32 MPX falling back to AVX.  */
+	  /* No MPX on x32, fallback to AVX-AVX512.  */
+	return tdesc_x32_avx_linux;
       else
 	return tdesc_amd64_mpx_linux;
+    case X86_XSTATE_AVX_MPX_MASK:
+      if (gdbarch_ptr_bit (gdbarch) == 32)
+	  /* No MPX on x32, fallback to AVX-AVX512.  */
+	return tdesc_x32_avx_linux;
+      else
+	return tdesc_amd64_avx_mpx_linux;
     case X86_XSTATE_AVX_MASK:
       if (gdbarch_ptr_bit (gdbarch) == 32)
 	return tdesc_x32_avx_linux;
@@ -1726,8 +1747,6 @@ amd64_dtrace_parse_probe_argument (struc
 				   struct parser_state *pstate,
 				   int narg)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct frame_info *this_frame = get_selected_frame (NULL);
   struct stoken str;
 
   /* DTrace probe arguments can be found on the ABI-defined places for
@@ -1757,7 +1776,6 @@ amd64_dtrace_parse_probe_argument (struc
   else
     {
       /* Additional arguments are passed on the stack.  */
-      CORE_ADDR sp;
       const char *regname = user_reg_map_regnum_to_name (gdbarch, AMD64_RSP_REGNUM);
 
       /* Displacement.  */
@@ -1837,6 +1855,10 @@ amd64_linux_init_abi_common(struct gdbar
 
   set_gdbarch_process_record (gdbarch, i386_process_record);
   set_gdbarch_process_record_signal (gdbarch, amd64_linux_record_signal);
+
+  set_gdbarch_get_siginfo_type (gdbarch, x86_linux_get_siginfo_type);
+  set_gdbarch_handle_segmentation_fault (gdbarch,
+					 i386_linux_handle_segmentation_fault);
 }
 
 static void
@@ -1844,7 +1866,8 @@ amd64_linux_init_abi (struct gdbarch_inf
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   const struct target_desc *tdesc = info.target_desc;
-  struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+  struct tdesc_arch_data *tdesc_data
+    = (struct tdesc_arch_data *) info.tdep_info;
   const struct tdesc_feature *feature;
   int valid_p;
 
@@ -1888,10 +1911,10 @@ amd64_linux_init_abi (struct gdbarch_inf
   amd64_linux_record_tdep.size_ustat = 32;
   /* ADM64 doesn't need this size because it doesn't have sys_sigaction
      but sys_rt_sigaction.  */
-  amd64_linux_record_tdep.size_old_sigaction = 152;
+  amd64_linux_record_tdep.size_old_sigaction = 32;
   /* ADM64 doesn't need this size because it doesn't have sys_sigpending
      but sys_rt_sigpending.  */
-  amd64_linux_record_tdep.size_old_sigset_t = 128;
+  amd64_linux_record_tdep.size_old_sigset_t = 8;
   amd64_linux_record_tdep.size_rlimit = 16;
   amd64_linux_record_tdep.size_rusage = 144;
   amd64_linux_record_tdep.size_timeval = 16;
@@ -1903,8 +1926,8 @@ amd64_linux_init_abi (struct gdbarch_inf
      but sys_getresuid.  */
   amd64_linux_record_tdep.size_old_uid_t = 2;
   amd64_linux_record_tdep.size_fd_set = 128;
-  amd64_linux_record_tdep.size_dirent = 280;
-  amd64_linux_record_tdep.size_dirent64 = 280;
+  /* ADM64 doesn't need this size because it doesn't have sys_readdir. */
+  amd64_linux_record_tdep.size_old_dirent = 280;
   amd64_linux_record_tdep.size_statfs = 120;
   amd64_linux_record_tdep.size_statfs64 = 120;
   amd64_linux_record_tdep.size_sockaddr = 16;
@@ -1931,8 +1954,8 @@ amd64_linux_init_abi (struct gdbarch_inf
   amd64_linux_record_tdep.size_NFS_FHSIZE = 32;
   amd64_linux_record_tdep.size_knfsd_fh = 132;
   amd64_linux_record_tdep.size_TASK_COMM_LEN = 16;
-  amd64_linux_record_tdep.size_sigaction = 152;
-  amd64_linux_record_tdep.size_sigset_t = 128;
+  amd64_linux_record_tdep.size_sigaction = 32;
+  amd64_linux_record_tdep.size_sigset_t = 8;
   amd64_linux_record_tdep.size_siginfo_t = 128;
   amd64_linux_record_tdep.size_cap_user_data_t = 8;
   amd64_linux_record_tdep.size_stack_t = 24;
@@ -1948,8 +1971,7 @@ amd64_linux_init_abi (struct gdbarch_inf
   amd64_linux_record_tdep.size_epoll_event = 12;
   amd64_linux_record_tdep.size_itimerspec = 32;
   amd64_linux_record_tdep.size_mq_attr = 64;
-  amd64_linux_record_tdep.size_siginfo = 128;
-  amd64_linux_record_tdep.size_termios = 60;
+  amd64_linux_record_tdep.size_termios = 36;
   amd64_linux_record_tdep.size_termios2 = 44;
   amd64_linux_record_tdep.size_pid_t = 4;
   amd64_linux_record_tdep.size_winsize = 8;
@@ -1958,6 +1980,7 @@ amd64_linux_init_abi (struct gdbarch_inf
   amd64_linux_record_tdep.size_hayes_esp_config = 12;
   amd64_linux_record_tdep.size_size_t = 8;
   amd64_linux_record_tdep.size_iovec = 16;
+  amd64_linux_record_tdep.size_time_t = 8;
 
   /* These values are the second argument of system call "sys_fcntl"
      and "sys_fcntl64".  They are obtained from Linux Kernel source.  */
@@ -2056,11 +2079,12 @@ amd64_linux_init_abi (struct gdbarch_inf
 }
 
 static void
-amd64_x32_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
+amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   const struct target_desc *tdesc = info.target_desc;
-  struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+  struct tdesc_arch_data *tdesc_data
+    = (struct tdesc_arch_data *) info.tdep_info;
   const struct tdesc_feature *feature;
   int valid_p;
 
@@ -2104,10 +2128,10 @@ amd64_x32_linux_init_abi(struct gdbarch_
   amd64_x32_linux_record_tdep.size_ustat = 32;
   /* ADM64 doesn't need this size because it doesn't have sys_sigaction
      but sys_rt_sigaction.  */
-  amd64_x32_linux_record_tdep.size_old_sigaction = 152;
+  amd64_x32_linux_record_tdep.size_old_sigaction = 16;
   /* ADM64 doesn't need this size because it doesn't have sys_sigpending
      but sys_rt_sigpending.  */
-  amd64_x32_linux_record_tdep.size_old_sigset_t = 128;
+  amd64_x32_linux_record_tdep.size_old_sigset_t = 4;
   amd64_x32_linux_record_tdep.size_rlimit = 16;
   amd64_x32_linux_record_tdep.size_rusage = 144;
   amd64_x32_linux_record_tdep.size_timeval = 16;
@@ -2119,8 +2143,8 @@ amd64_x32_linux_init_abi(struct gdbarch_
      but sys_getresuid.  */
   amd64_x32_linux_record_tdep.size_old_uid_t = 2;
   amd64_x32_linux_record_tdep.size_fd_set = 128;
-  amd64_x32_linux_record_tdep.size_dirent = 280;
-  amd64_x32_linux_record_tdep.size_dirent64 = 280;
+  /* ADM64 doesn't need this size because it doesn't have sys_readdir. */
+  amd64_x32_linux_record_tdep.size_old_dirent = 268;
   amd64_x32_linux_record_tdep.size_statfs = 120;
   amd64_x32_linux_record_tdep.size_statfs64 = 120;
   amd64_x32_linux_record_tdep.size_sockaddr = 16;
@@ -2130,7 +2154,7 @@ amd64_x32_linux_init_abi(struct gdbarch_
     = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
   amd64_x32_linux_record_tdep.size_ulong
     = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
-  amd64_x32_linux_record_tdep.size_msghdr = 56;
+  amd64_x32_linux_record_tdep.size_msghdr = 28;
   amd64_x32_linux_record_tdep.size_itimerval = 32;
   amd64_x32_linux_record_tdep.size_stat = 144;
   amd64_x32_linux_record_tdep.size_old_utsname = 325;
@@ -2147,11 +2171,11 @@ amd64_x32_linux_init_abi(struct gdbarch_
   amd64_x32_linux_record_tdep.size_NFS_FHSIZE = 32;
   amd64_x32_linux_record_tdep.size_knfsd_fh = 132;
   amd64_x32_linux_record_tdep.size_TASK_COMM_LEN = 16;
-  amd64_x32_linux_record_tdep.size_sigaction = 152;
-  amd64_x32_linux_record_tdep.size_sigset_t = 128;
+  amd64_x32_linux_record_tdep.size_sigaction = 20;
+  amd64_x32_linux_record_tdep.size_sigset_t = 8;
   amd64_x32_linux_record_tdep.size_siginfo_t = 128;
   amd64_x32_linux_record_tdep.size_cap_user_data_t = 8;
-  amd64_x32_linux_record_tdep.size_stack_t = 24;
+  amd64_x32_linux_record_tdep.size_stack_t = 12;
   amd64_x32_linux_record_tdep.size_off_t = 8;
   amd64_x32_linux_record_tdep.size_stat64 = 144;
   amd64_x32_linux_record_tdep.size_gid_t = 4;
@@ -2164,16 +2188,16 @@ amd64_x32_linux_init_abi(struct gdbarch_
   amd64_x32_linux_record_tdep.size_epoll_event = 12;
   amd64_x32_linux_record_tdep.size_itimerspec = 32;
   amd64_x32_linux_record_tdep.size_mq_attr = 64;
-  amd64_x32_linux_record_tdep.size_siginfo = 128;
-  amd64_x32_linux_record_tdep.size_termios = 60;
+  amd64_x32_linux_record_tdep.size_termios = 36;
   amd64_x32_linux_record_tdep.size_termios2 = 44;
   amd64_x32_linux_record_tdep.size_pid_t = 4;
   amd64_x32_linux_record_tdep.size_winsize = 8;
   amd64_x32_linux_record_tdep.size_serial_struct = 72;
   amd64_x32_linux_record_tdep.size_serial_icounter_struct = 80;
   amd64_x32_linux_record_tdep.size_hayes_esp_config = 12;
-  amd64_x32_linux_record_tdep.size_size_t = 8;
-  amd64_x32_linux_record_tdep.size_iovec = 16;
+  amd64_x32_linux_record_tdep.size_size_t = 4;
+  amd64_x32_linux_record_tdep.size_iovec = 8;
+  amd64_x32_linux_record_tdep.size_time_t = 8;
 
   /* These values are the second argument of system call "sys_fcntl"
      and "sys_fcntl64".  They are obtained from Linux Kernel source.  */
@@ -2280,9 +2304,11 @@ _initialize_amd64_linux_tdep (void)
   initialize_tdesc_amd64_linux ();
   initialize_tdesc_amd64_avx_linux ();
   initialize_tdesc_amd64_mpx_linux ();
-  initialize_tdesc_amd64_avx512_linux ();
+  initialize_tdesc_amd64_avx_mpx_linux ();
+  initialize_tdesc_amd64_avx_avx512_linux ();
+  initialize_tdesc_amd64_avx_mpx_avx512_pku_linux ();
 
   initialize_tdesc_x32_linux ();
   initialize_tdesc_x32_avx_linux ();
-  initialize_tdesc_x32_avx512_linux ();
+  initialize_tdesc_x32_avx_avx512_linux ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-tdep.h ./gdb/amd64-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux AMD64.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,7 +26,7 @@
 /* Register number for the "orig_rax" register.  If this register
    contains a value >= 0 it is interpreted as the system call number
    that the kernel is supposed to restart.  */
-#define AMD64_LINUX_ORIG_RAX_REGNUM (AMD64_ZMM31H_REGNUM + 1)
+#define AMD64_LINUX_ORIG_RAX_REGNUM (AMD64_GSBASE_REGNUM + 1)
 
 /* Total number of registers for GNU/Linux.  */
 #define AMD64_LINUX_NUM_REGS (AMD64_LINUX_ORIG_RAX_REGNUM + 1)
@@ -35,11 +35,13 @@
 extern struct target_desc *tdesc_amd64_linux;
 extern struct target_desc *tdesc_amd64_avx_linux;
 extern struct target_desc *tdesc_amd64_mpx_linux;
-extern struct target_desc *tdesc_amd64_avx512_linux;
+extern struct target_desc *tdesc_amd64_avx_mpx_linux;
+extern struct target_desc *tdesc_amd64_avx_avx512_linux;
+extern struct target_desc *tdesc_amd64_avx_mpx_avx512_pku_linux;
 
 extern struct target_desc *tdesc_x32_linux;
 extern struct target_desc *tdesc_x32_avx_linux;
-extern struct target_desc *tdesc_x32_avx512_linux;
+extern struct target_desc *tdesc_x32_avx_avx512_linux;
 
 /* Enum that defines the syscall identifiers for amd64 linux.
    Used for process record/replay, these will be translated into
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nat.c ./gdb/amd64-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for AMD64.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -65,10 +65,17 @@ amd64_native_gregset_reg_offset (struct 
   if (num_regs > gdbarch_num_regs (gdbarch))
     num_regs = gdbarch_num_regs (gdbarch);
 
-  if (regnum < num_regs && regnum < gdbarch_num_regs (gdbarch))
-    return reg_offset[regnum];
+  if (regnum >= num_regs)
+    return -1;
 
-  return -1;
+  /* Kernels that predate Linux 2.6.25 don't provide access to
+     these segment registers in user_regs_struct.   */
+#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+  if (regnum == AMD64_FSBASE_REGNUM || regnum == AMD64_GSBASE_REGNUM)
+    return -1;
+#endif
+
+  return reg_offset[regnum];
 }
 
 /* Return whether the native general-purpose register set supplies
@@ -88,7 +95,7 @@ void
 amd64_supply_native_gregset (struct regcache *regcache,
 			     const void *gregs, int regnum)
 {
-  const char *regs = gregs;
+  const char *regs = (const char *) gregs;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int num_regs = amd64_native_gregset64_num_regs;
   int i;
@@ -119,7 +126,7 @@ void
 amd64_collect_native_gregset (const struct regcache *regcache,
 			      void *gregs, int regnum)
 {
-  char *regs = gregs;
+  char *regs = (char *) gregs;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int num_regs = amd64_native_gregset64_num_regs;
   int i;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nat.h ./gdb/amd64-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for AMD64.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nbsd-nat.c ./gdb/amd64-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,73 @@
+/* Native-dependent code for NetBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "target.h"
+
+#include "nbsd-nat.h"
+#include "amd64-tdep.h"
+#include "amd64-nat.h"
+
+/* Mapping between the general-purpose registers in NetBSD/amd64
+   `struct reg' format and GDB's register cache layout for
+   NetBSD/i386.
+
+   Note that most (if not all) NetBSD/amd64 registers are 64-bit,
+   while the NetBSD/i386 registers are all 32-bit, but since we're
+   little-endian we get away with that.  */
+
+/* From <machine/reg.h>.  */
+static int amd64nbsd32_r_reg_offset[] =
+{
+  14 * 8,			/* %eax */
+  3 * 8,			/* %ecx */
+  2 * 8,			/* %edx */
+  13 * 8,			/* %ebx */
+  24 * 8,			/* %esp */
+  12 * 8,			/* %ebp */
+  1 * 8,			/* %esi */
+  0 * 8,			/* %edi */
+  21 * 8,			/* %eip */
+  23 * 8,			/* %eflags */
+  22 * 8,			/* %cs */
+  25 * 8,			/* %ss */
+  18 * 8,			/* %ds */
+  17 * 8,			/* %es */
+  16 * 8,			/* %fs */
+  15 * 8			/* %gs */
+};
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64nbsd_nat (void);
+
+void
+_initialize_amd64nbsd_nat (void)
+{
+  struct target_ops *t;
+
+  amd64_native_gregset32_reg_offset = amd64nbsd32_r_reg_offset;
+  amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64nbsd32_r_reg_offset);
+  amd64_native_gregset64_reg_offset = amd64nbsd_r_reg_offset;
+
+  /* Add some extra features to the common *BSD/amd64 target.  */
+  t = amd64bsd_target ();
+  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64nbsd-nat.c ./gdb/amd64nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64nbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,73 +0,0 @@
-/* Native-dependent code for NetBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "target.h"
-
-#include "nbsd-nat.h"
-#include "amd64-tdep.h"
-#include "amd64-nat.h"
-
-/* Mapping between the general-purpose registers in NetBSD/amd64
-   `struct reg' format and GDB's register cache layout for
-   NetBSD/i386.
-
-   Note that most (if not all) NetBSD/amd64 registers are 64-bit,
-   while the NetBSD/i386 registers are all 32-bit, but since we're
-   little-endian we get away with that.  */
-
-/* From <machine/reg.h>.  */
-static int amd64nbsd32_r_reg_offset[] =
-{
-  14 * 8,			/* %eax */
-  3 * 8,			/* %ecx */
-  2 * 8,			/* %edx */
-  13 * 8,			/* %ebx */
-  24 * 8,			/* %esp */
-  12 * 8,			/* %ebp */
-  1 * 8,			/* %esi */
-  0 * 8,			/* %edi */
-  21 * 8,			/* %eip */
-  23 * 8,			/* %eflags */
-  22 * 8,			/* %cs */
-  25 * 8,			/* %ss */
-  18 * 8,			/* %ds */
-  17 * 8,			/* %es */
-  16 * 8,			/* %fs */
-  15 * 8			/* %gs */
-};
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64nbsd_nat (void);
-
-void
-_initialize_amd64nbsd_nat (void)
-{
-  struct target_ops *t;
-
-  amd64_native_gregset32_reg_offset = amd64nbsd32_r_reg_offset;
-  amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64nbsd32_r_reg_offset);
-  amd64_native_gregset64_reg_offset = amd64nbsd_r_reg_offset;
-
-  /* Add some extra features to the common *BSD/amd64 target.  */
-  t = amd64bsd_target ();
-  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nbsd-tdep.c ./gdb/amd64-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,133 @@
+/* Target-dependent code for NetBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "symtab.h"
+
+#include "amd64-tdep.h"
+#include "nbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Support for signal handlers.  */
+
+/* Return whether THIS_FRAME corresponds to a NetBSD sigtramp
+   routine.  */
+
+static int
+amd64nbsd_sigtramp_p (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  return nbsd_pc_in_sigtramp (pc, name);
+}
+
+/* Assuming THIS_FRAME corresponds to a NetBSD sigtramp routine,
+   return the address of the associated mcontext structure.  */
+
+static CORE_ADDR
+amd64nbsd_mcontext_addr (struct frame_info *this_frame)
+{
+  CORE_ADDR addr;
+
+  /* The register %r15 points at `struct ucontext' upon entry of a
+     signal trampoline.  */
+  addr = get_frame_register_unsigned (this_frame, AMD64_R15_REGNUM);
+
+  /* The mcontext structure lives as offset 56 in `struct ucontext'.  */
+  return addr + 56;
+}
+
+/* NetBSD 2.0 or later.  */
+
+/* Mapping between the general-purpose registers in `struct reg'
+   format and GDB's register cache layout.  */
+
+/* From <machine/reg.h>.  */
+int amd64nbsd_r_reg_offset[] =
+{
+  14 * 8,			/* %rax */
+  13 * 8,			/* %rbx */
+  3 * 8,			/* %rcx */
+  2 * 8,			/* %rdx */
+  1 * 8,			/* %rsi */
+  0 * 8,			/* %rdi */
+  12 * 8,			/* %rbp */
+  24 * 8,			/* %rsp */
+  4 * 8,			/* %r8 ..  */
+  5 * 8,
+  6 * 8,
+  7 * 8,
+  8 * 8,
+  9 * 8,
+  10 * 8,
+  11 * 8,			/* ... %r15 */
+  21 * 8,			/* %rip */
+  23 * 8,			/* %eflags */
+  22 * 8,			/* %cs */
+  25 * 8,			/* %ss */
+  18 * 8,			/* %ds */
+  17 * 8,			/* %es */
+  16 * 8,			/* %fs */
+  15 * 8			/* %gs */
+};
+
+static void
+amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Initialize general-purpose register set details first.  */
+  tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
+  tdep->sizeof_gregset = 26 * 8;
+
+  amd64_init_abi (info, gdbarch);
+
+  tdep->jb_pc_offset = 7 * 8;
+
+  /* NetBSD has its own convention for signal trampolines.  */
+  tdep->sigtramp_p = amd64nbsd_sigtramp_p;
+  tdep->sigcontext_addr = amd64nbsd_mcontext_addr;
+  tdep->sc_reg_offset = amd64nbsd_r_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
+
+  /* NetBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64nbsd_tdep (void);
+
+void
+_initialize_amd64nbsd_tdep (void)
+{
+  /* The NetBSD/amd64 native dependent code makes this assumption.  */
+  gdb_assert (ARRAY_SIZE (amd64nbsd_r_reg_offset) == AMD64_NUM_GREGS);
+
+  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
+			  GDB_OSABI_NETBSD, amd64nbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64nbsd-tdep.c ./gdb/amd64nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64nbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,133 +0,0 @@
-/* Target-dependent code for NetBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "symtab.h"
-
-#include "amd64-tdep.h"
-#include "nbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Support for signal handlers.  */
-
-/* Return whether THIS_FRAME corresponds to a NetBSD sigtramp
-   routine.  */
-
-static int
-amd64nbsd_sigtramp_p (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  return nbsd_pc_in_sigtramp (pc, name);
-}
-
-/* Assuming THIS_FRAME corresponds to a NetBSD sigtramp routine,
-   return the address of the associated mcontext structure.  */
-
-static CORE_ADDR
-amd64nbsd_mcontext_addr (struct frame_info *this_frame)
-{
-  CORE_ADDR addr;
-
-  /* The register %r15 points at `struct ucontext' upon entry of a
-     signal trampoline.  */
-  addr = get_frame_register_unsigned (this_frame, AMD64_R15_REGNUM);
-
-  /* The mcontext structure lives as offset 56 in `struct ucontext'.  */
-  return addr + 56;
-}
-
-/* NetBSD 2.0 or later.  */
-
-/* Mapping between the general-purpose registers in `struct reg'
-   format and GDB's register cache layout.  */
-
-/* From <machine/reg.h>.  */
-int amd64nbsd_r_reg_offset[] =
-{
-  14 * 8,			/* %rax */
-  13 * 8,			/* %rbx */
-  3 * 8,			/* %rcx */
-  2 * 8,			/* %rdx */
-  1 * 8,			/* %rsi */
-  0 * 8,			/* %rdi */
-  12 * 8,			/* %rbp */
-  24 * 8,			/* %rsp */
-  4 * 8,			/* %r8 ..  */
-  5 * 8,
-  6 * 8,
-  7 * 8,
-  8 * 8,
-  9 * 8,
-  10 * 8,
-  11 * 8,			/* ... %r15 */
-  21 * 8,			/* %rip */
-  23 * 8,			/* %eflags */
-  22 * 8,			/* %cs */
-  25 * 8,			/* %ss */
-  18 * 8,			/* %ds */
-  17 * 8,			/* %es */
-  16 * 8,			/* %fs */
-  15 * 8			/* %gs */
-};
-
-static void
-amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Initialize general-purpose register set details first.  */
-  tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
-  tdep->sizeof_gregset = 26 * 8;
-
-  amd64_init_abi (info, gdbarch);
-
-  tdep->jb_pc_offset = 7 * 8;
-
-  /* NetBSD has its own convention for signal trampolines.  */
-  tdep->sigtramp_p = amd64nbsd_sigtramp_p;
-  tdep->sigcontext_addr = amd64nbsd_mcontext_addr;
-  tdep->sc_reg_offset = amd64nbsd_r_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
-
-  /* NetBSD uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64nbsd_tdep (void);
-
-void
-_initialize_amd64nbsd_tdep (void)
-{
-  /* The NetBSD/amd64 native dependent code makes this assumption.  */
-  gdb_assert (ARRAY_SIZE (amd64nbsd_r_reg_offset) == AMD64_NUM_GREGS);
-
-  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
-			  GDB_OSABI_NETBSD_ELF, amd64nbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-obsd-nat.c ./gdb/amd64-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,144 @@
+/* Native-dependent code for OpenBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "amd64-tdep.h"
+#include "amd64-nat.h"
+#include "obsd-nat.h"
+
+/* Mapping between the general-purpose registers in OpenBSD/amd64
+   `struct reg' format and GDB's register cache layout for
+   OpenBSD/i386.
+
+   Note that most (if not all) OpenBSD/amd64 registers are 64-bit,
+   while the OpenBSD/i386 registers are all 32-bit, but since we're
+   little-endian we get away with that.  */
+
+/* From <machine/reg.h>.  */
+static int amd64obsd32_r_reg_offset[] =
+{
+  14 * 8,			/* %eax */
+  3 * 8,			/* %ecx */
+  2 * 8,			/* %edx */
+  13 * 8,			/* %ebx */
+  15 * 8,			/* %esp */
+  12 * 8,			/* %ebp */
+  1 * 8,			/* %esi */
+  0 * 8,			/* %edi */
+  16 * 8,			/* %eip */
+  17 * 8,			/* %eflags */
+  18 * 8,			/* %cs */
+  19 * 8,			/* %ss */
+  20 * 8,			/* %ds */
+  21 * 8,			/* %es */
+  22 * 8,			/* %fs */
+  23 * 8			/* %gs */
+};
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+amd64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct switchframe sf;
+  int regnum;
+
+  /* The following is true for OpenBSD 3.5:
+
+     The pcb contains the stack pointer at the point of the context
+     switch in cpu_switch().  At that point we have a stack frame as
+     described by `struct switchframe', which for OpenBSD 3.5 has the
+     following layout:
+
+     interrupt level
+     %r15
+     %r14
+     %r13
+     %r12
+     %rbp
+     %rbx
+     return address
+
+     Together with %rsp in the pcb, this accounts for all callee-saved
+     registers specified by the psABI.  From this information we
+     reconstruct the register state as it would look when we just
+     returned from cpu_switch().
+
+     For core dumps the pcb is saved by savectx().  In that case the
+     stack frame only contains the return address, and there is no way
+     to recover the other registers.  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_rsp == 0)
+    return 0;
+
+  /* Read the stack frame, and check its validity.  */
+  read_memory (pcb->pcb_rsp, (gdb_byte *) &sf, sizeof sf);
+  if (sf.sf_rbp == pcb->pcb_rbp)
+    {
+      /* Yes, we have a frame that matches cpu_switch().  */
+      pcb->pcb_rsp += sizeof (struct switchframe);
+      regcache_raw_supply (regcache, 12, &sf.sf_r12);
+      regcache_raw_supply (regcache, 13, &sf.sf_r13);
+      regcache_raw_supply (regcache, 14, &sf.sf_r14);
+      regcache_raw_supply (regcache, 15, &sf.sf_r15);
+      regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx);
+      regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip);
+    }
+  else
+    {
+      /* No, the pcb must have been last updated by savectx().  */
+      pcb->pcb_rsp += 8;
+      regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf);
+    }
+
+  regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+  regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64obsd_nat (void);
+
+void
+_initialize_amd64obsd_nat (void)
+{
+  amd64_native_gregset32_reg_offset = amd64obsd32_r_reg_offset;
+  amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64obsd32_r_reg_offset);
+  amd64_native_gregset64_reg_offset = amd64obsd_r_reg_offset;
+
+  /* Add some extra features to the common *BSD/amd64 target.  */
+  obsd_add_target (amd64bsd_target ());
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (amd64obsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64obsd-nat.c ./gdb/amd64obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64obsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,144 +0,0 @@
-/* Native-dependent code for OpenBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "amd64-tdep.h"
-#include "amd64-nat.h"
-#include "obsd-nat.h"
-
-/* Mapping between the general-purpose registers in OpenBSD/amd64
-   `struct reg' format and GDB's register cache layout for
-   OpenBSD/i386.
-
-   Note that most (if not all) OpenBSD/amd64 registers are 64-bit,
-   while the OpenBSD/i386 registers are all 32-bit, but since we're
-   little-endian we get away with that.  */
-
-/* From <machine/reg.h>.  */
-static int amd64obsd32_r_reg_offset[] =
-{
-  14 * 8,			/* %eax */
-  3 * 8,			/* %ecx */
-  2 * 8,			/* %edx */
-  13 * 8,			/* %ebx */
-  15 * 8,			/* %esp */
-  12 * 8,			/* %ebp */
-  1 * 8,			/* %esi */
-  0 * 8,			/* %edi */
-  16 * 8,			/* %eip */
-  17 * 8,			/* %eflags */
-  18 * 8,			/* %cs */
-  19 * 8,			/* %ss */
-  20 * 8,			/* %ds */
-  21 * 8,			/* %es */
-  22 * 8,			/* %fs */
-  23 * 8			/* %gs */
-};
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-amd64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct switchframe sf;
-  int regnum;
-
-  /* The following is true for OpenBSD 3.5:
-
-     The pcb contains the stack pointer at the point of the context
-     switch in cpu_switch().  At that point we have a stack frame as
-     described by `struct switchframe', which for OpenBSD 3.5 has the
-     following layout:
-
-     interrupt level
-     %r15
-     %r14
-     %r13
-     %r12
-     %rbp
-     %rbx
-     return address
-
-     Together with %rsp in the pcb, this accounts for all callee-saved
-     registers specified by the psABI.  From this information we
-     reconstruct the register state as it would look when we just
-     returned from cpu_switch().
-
-     For core dumps the pcb is saved by savectx().  In that case the
-     stack frame only contains the return address, and there is no way
-     to recover the other registers.  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_rsp == 0)
-    return 0;
-
-  /* Read the stack frame, and check its validity.  */
-  read_memory (pcb->pcb_rsp, (gdb_byte *) &sf, sizeof sf);
-  if (sf.sf_rbp == pcb->pcb_rbp)
-    {
-      /* Yes, we have a frame that matches cpu_switch().  */
-      pcb->pcb_rsp += sizeof (struct switchframe);
-      regcache_raw_supply (regcache, 12, &sf.sf_r12);
-      regcache_raw_supply (regcache, 13, &sf.sf_r13);
-      regcache_raw_supply (regcache, 14, &sf.sf_r14);
-      regcache_raw_supply (regcache, 15, &sf.sf_r15);
-      regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx);
-      regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip);
-    }
-  else
-    {
-      /* No, the pcb must have been last updated by savectx().  */
-      pcb->pcb_rsp += 8;
-      regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf);
-    }
-
-  regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
-  regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64obsd_nat (void);
-
-void
-_initialize_amd64obsd_nat (void)
-{
-  amd64_native_gregset32_reg_offset = amd64obsd32_r_reg_offset;
-  amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64obsd32_r_reg_offset);
-  amd64_native_gregset64_reg_offset = amd64obsd_r_reg_offset;
-
-  /* Add some extra features to the common *BSD/amd64 target.  */
-  obsd_add_target (amd64bsd_target ());
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (amd64obsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-obsd-tdep.c ./gdb/amd64-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/amd64-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,461 @@
+/* Target-dependent code for OpenBSD/amd64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "target.h"
+#include "trad-frame.h"
+
+#include "obsd-tdep.h"
+#include "amd64-tdep.h"
+#include "i387-tdep.h"
+#include "solib-svr4.h"
+#include "bsd-uthread.h"
+
+/* Support for signal handlers.  */
+
+/* Default page size.  */
+static const int amd64obsd_page_size = 4096;
+
+/* Return whether THIS_FRAME corresponds to an OpenBSD sigtramp
+   routine.  */
+
+static int
+amd64obsd_sigtramp_p (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  CORE_ADDR start_pc = (pc & ~(amd64obsd_page_size - 1));
+  const gdb_byte osigreturn[] =
+  {
+    0x48, 0xc7, 0xc0,
+    0x67, 0x00, 0x00, 0x00,	/* movq $SYS_sigreturn, %rax */
+    0xcd, 0x80			/* int $0x80 */
+  };
+  const gdb_byte sigreturn[] =
+  {
+    0x48, 0xc7, 0xc0,
+    0x67, 0x00, 0x00, 0x00,	/* movq $SYS_sigreturn, %rax */
+    0x0f, 0x05			/* syscall */
+  };
+  size_t buflen = (sizeof sigreturn) + 1;
+  gdb_byte *buf;
+  const char *name;
+
+  /* If the function has a valid symbol name, it isn't a
+     trampoline.  */
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (name != NULL)
+    return 0;
+
+  /* If the function lives in a valid section (even without a starting
+     point) it isn't a trampoline.  */
+  if (find_pc_section (pc) != NULL)
+    return 0;
+
+  /* If we can't read the instructions at START_PC, return zero.  */
+  buf = (gdb_byte *) alloca ((sizeof sigreturn) + 1);
+  if (!safe_frame_unwind_memory (this_frame, start_pc + 6, buf, buflen))
+    return 0;
+
+  /* Check for sigreturn(2).  Depending on how the assembler encoded
+     the `movq %rsp, %rdi' instruction, the code starts at offset 6 or
+     7.  OpenBSD 5.0 and later use the `syscall' instruction.  Older
+     versions use `int $0x80'.  Check for both.  */
+  if (memcmp (buf, sigreturn, sizeof sigreturn)
+      && memcmp (buf + 1, sigreturn, sizeof sigreturn)
+      && memcmp (buf, osigreturn, sizeof osigreturn)
+      && memcmp (buf + 1, osigreturn, sizeof osigreturn))
+    return 0;
+
+  return 1;
+}
+
+/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
+   address of the associated sigcontext structure.  */
+
+static CORE_ADDR
+amd64obsd_sigcontext_addr (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  ULONGEST offset = (pc & (amd64obsd_page_size - 1));
+
+  /* The %rsp register points at `struct sigcontext' upon entry of a
+     signal trampoline.  The relevant part of the trampoline is
+
+        call    *%rax
+        movq    %rsp, %rdi
+        pushq   %rdi
+        movq    $SYS_sigreturn,%rax
+        int     $0x80
+
+     (see /usr/src/sys/arch/amd64/amd64/locore.S).  The `pushq'
+     instruction clobbers %rsp, but its value is saved in `%rdi'.  */
+
+  if (offset > 5)
+    return get_frame_register_unsigned (this_frame, AMD64_RDI_REGNUM);
+  else
+    return get_frame_register_unsigned (this_frame, AMD64_RSP_REGNUM);
+}
+
+/* OpenBSD 3.5 or later.  */
+
+/* Mapping between the general-purpose registers in `struct reg'
+   format and GDB's register cache layout.  */
+
+/* From <machine/reg.h>.  */
+int amd64obsd_r_reg_offset[] =
+{
+  14 * 8,			/* %rax */
+  13 * 8,			/* %rbx */
+  3 * 8,			/* %rcx */
+  2 * 8,			/* %rdx */
+  1 * 8,			/* %rsi */
+  0 * 8,			/* %rdi */
+  12 * 8,			/* %rbp */
+  15 * 8,			/* %rsp */
+  4 * 8,			/* %r8 ..  */
+  5 * 8,
+  6 * 8,
+  7 * 8,
+  8 * 8,
+  9 * 8,
+  10 * 8,
+  11 * 8,			/* ... %r15 */
+  16 * 8,			/* %rip */
+  17 * 8,			/* %eflags */
+  18 * 8,			/* %cs */
+  19 * 8,			/* %ss */
+  20 * 8,			/* %ds */
+  21 * 8,			/* %es */
+  22 * 8,			/* %fs */
+  23 * 8			/* %gs */
+};
+
+/* From <machine/signal.h>.  */
+static int amd64obsd_sc_reg_offset[] =
+{
+  14 * 8,			/* %rax */
+  13 * 8,			/* %rbx */
+  3 * 8,			/* %rcx */
+  2 * 8,			/* %rdx */
+  1 * 8,			/* %rsi */
+  0 * 8,			/* %rdi */
+  12 * 8,			/* %rbp */
+  24 * 8,			/* %rsp */
+  4 * 8,			/* %r8 ...  */
+  5 * 8,
+  6 * 8,
+  7 * 8,
+  8 * 8,
+  9 * 8,
+  10 * 8,
+  11 * 8,			/* ... %r15 */
+  21 * 8,			/* %rip */
+  23 * 8,			/* %eflags */
+  22 * 8,			/* %cs */
+  25 * 8,			/* %ss */
+  18 * 8,			/* %ds */
+  17 * 8,			/* %es */
+  16 * 8,			/* %fs */
+  15 * 8			/* %gs */
+};
+
+/* From /usr/src/lib/libpthread/arch/amd64/uthread_machdep.c.  */
+static int amd64obsd_uthread_reg_offset[] =
+{
+  19 * 8,			/* %rax */
+  16 * 8,			/* %rbx */
+  18 * 8,			/* %rcx */
+  17 * 8,			/* %rdx */
+  14 * 8,			/* %rsi */
+  13 * 8,			/* %rdi */
+  15 * 8,			/* %rbp */
+  -1,				/* %rsp */
+  12 * 8,			/* %r8 ...  */
+  11 * 8,
+  10 * 8,
+  9 * 8,
+  8 * 8,
+  7 * 8,
+  6 * 8,
+  5 * 8,			/* ... %r15 */
+  20 * 8,			/* %rip */
+  4 * 8,			/* %eflags */
+  21 * 8,			/* %cs */
+  -1,				/* %ss */
+  3 * 8,			/* %ds */
+  2 * 8,			/* %es */
+  1 * 8,			/* %fs */
+  0 * 8				/* %gs */
+};
+
+/* Offset within the thread structure where we can find the saved
+   stack pointer (%esp).  */
+#define AMD64OBSD_UTHREAD_RSP_OFFSET	400
+
+static void
+amd64obsd_supply_uthread (struct regcache *regcache,
+			  int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
+  CORE_ADDR sp = 0;
+  gdb_byte buf[8];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == -1 || regnum == AMD64_RSP_REGNUM)
+    {
+      int offset;
+
+      /* Fetch stack pointer from thread structure.  */
+      sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
+
+      /* Adjust the stack pointer such that it looks as if we just
+         returned from _thread_machdep_switch.  */
+      offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
+      store_unsigned_integer (buf, 8, byte_order, sp + offset);
+      regcache_raw_supply (regcache, AMD64_RSP_REGNUM, buf);
+    }
+
+  for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++)
+    {
+      if (amd64obsd_uthread_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  /* Fetch stack pointer from thread structure (if we didn't
+             do so already).  */
+	  if (sp == 0)
+	    sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
+
+	  /* Read the saved register from the stack frame.  */
+	  read_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
+	  regcache_raw_supply (regcache, i, buf);
+	}
+    }
+}
+
+static void
+amd64obsd_collect_uthread (const struct regcache *regcache,
+			   int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
+  CORE_ADDR sp = 0;
+  gdb_byte buf[8];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == -1 || regnum == AMD64_RSP_REGNUM)
+    {
+      int offset;
+
+      /* Calculate the stack pointer (frame pointer) that will be
+         stored into the thread structure.  */
+      offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
+      regcache_raw_collect (regcache, AMD64_RSP_REGNUM, buf);
+      sp = extract_unsigned_integer (buf, 8, byte_order) - offset;
+
+      /* Store the stack pointer.  */
+      write_memory_unsigned_integer (sp_addr, 8, byte_order, sp);
+
+      /* The stack pointer was (potentially) modified.  Make sure we
+         build a proper stack frame.  */
+      regnum = -1;
+    }
+
+  for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++)
+    {
+      if (amd64obsd_uthread_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  /* Fetch stack pointer from thread structure (if we didn't
+             calculate it already).  */
+	  if (sp == 0)
+	    sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
+
+	  /* Write the register into the stack frame.  */
+	  regcache_raw_collect (regcache, i, buf);
+	  write_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
+	}
+    }
+}
+/* Kernel debugging support.  */
+
+/* From <machine/frame.h>.  Easy since `struct trapframe' matches
+   `struct sigcontext'.  */
+#define amd64obsd_tf_reg_offset amd64obsd_sc_reg_offset
+
+static struct trad_frame_cache *
+amd64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct trad_frame_cache *cache;
+  CORE_ADDR func, sp, addr;
+  ULONGEST cs;
+  const char *name;
+  int i;
+
+  if (*this_cache)
+    return (struct trad_frame_cache *) *this_cache;
+
+  cache = trad_frame_cache_zalloc (this_frame);
+  *this_cache = cache;
+
+  func = get_frame_func (this_frame);
+  sp = get_frame_register_unsigned (this_frame, AMD64_RSP_REGNUM);
+
+  find_pc_partial_function (func, &name, NULL, NULL);
+  if (name && startswith (name, "Xintr"))
+    addr = sp + 8;		/* It's an interrupt frame.  */
+  else
+    addr = sp;
+
+  for (i = 0; i < ARRAY_SIZE (amd64obsd_tf_reg_offset); i++)
+    if (amd64obsd_tf_reg_offset[i] != -1)
+      trad_frame_set_reg_addr (cache, i, addr + amd64obsd_tf_reg_offset[i]);
+
+  /* Read %cs from trap frame.  */
+  addr += amd64obsd_tf_reg_offset[AMD64_CS_REGNUM];
+  cs = read_memory_unsigned_integer (addr, 8, byte_order);
+  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
+    {
+      /* Trap from user space; terminate backtrace.  */
+      trad_frame_set_id (cache, outer_frame_id);
+    }
+  else
+    {
+      /* Construct the frame ID using the function start.  */
+      trad_frame_set_id (cache, frame_id_build (sp + 16, func));
+    }
+
+  return cache;
+}
+
+static void
+amd64obsd_trapframe_this_id (struct frame_info *this_frame,
+			     void **this_cache, struct frame_id *this_id)
+{
+  struct trad_frame_cache *cache =
+    amd64obsd_trapframe_cache (this_frame, this_cache);
+  
+  trad_frame_get_id (cache, this_id);
+}
+
+static struct value *
+amd64obsd_trapframe_prev_register (struct frame_info *this_frame,
+				   void **this_cache, int regnum)
+{
+  struct trad_frame_cache *cache =
+    amd64obsd_trapframe_cache (this_frame, this_cache);
+
+  return trad_frame_get_register (cache, this_frame, regnum);
+}
+
+static int
+amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
+			     struct frame_info *this_frame,
+			     void **this_prologue_cache)
+{
+  ULONGEST cs;
+  const char *name;
+
+  /* Check Current Privilege Level and bail out if we're not executing
+     in kernel space.  */
+  cs = get_frame_register_unsigned (this_frame, AMD64_CS_REGNUM);
+  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
+    return 0;
+
+  find_pc_partial_function (get_frame_pc (this_frame), &name, NULL, NULL);
+  return (name && ((strcmp (name, "calltrap") == 0)
+		   || (strcmp (name, "osyscall1") == 0)
+		   || (strcmp (name, "Xsyscall") == 0)
+		   || (startswith (name, "Xintr"))));
+}
+
+static const struct frame_unwind amd64obsd_trapframe_unwind = {
+  /* FIXME: kettenis/20051219: This really is more like an interrupt
+     frame, but SIGTRAMP_FRAME would print <signal handler called>,
+     which really is not what we want here.  */
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  amd64obsd_trapframe_this_id,
+  amd64obsd_trapframe_prev_register,
+  NULL,
+  amd64obsd_trapframe_sniffer
+};
+
+
+static void
+amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  amd64_init_abi (info, gdbarch);
+  obsd_init_abi (info, gdbarch);
+
+  /* Initialize general-purpose register set details.  */
+  tdep->gregset_reg_offset = amd64obsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (amd64obsd_r_reg_offset);
+  tdep->sizeof_gregset = 24 * 8;
+
+  tdep->jb_pc_offset = 7 * 8;
+
+  tdep->sigtramp_p = amd64obsd_sigtramp_p;
+  tdep->sigcontext_addr = amd64obsd_sigcontext_addr;
+  tdep->sc_reg_offset = amd64obsd_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (amd64obsd_sc_reg_offset);
+
+  /* OpenBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, amd64obsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, amd64obsd_collect_uthread);
+
+  /* OpenBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+
+  /* Unwind kernel trap frames correctly.  */
+  frame_unwind_prepend_unwinder (gdbarch, &amd64obsd_trapframe_unwind);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_amd64obsd_tdep (void);
+
+void
+_initialize_amd64obsd_tdep (void)
+{
+  /* The OpenBSD/amd64 native dependent code makes this assumption.  */
+  gdb_assert (ARRAY_SIZE (amd64obsd_r_reg_offset) == AMD64_NUM_GREGS);
+
+  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
+			  GDB_OSABI_OPENBSD, amd64obsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64obsd-tdep.c ./gdb/amd64obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64obsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,514 +0,0 @@
-/* Target-dependent code for OpenBSD/amd64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "symtab.h"
-#include "objfiles.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "target.h"
-#include "trad-frame.h"
-
-#include "obsd-tdep.h"
-#include "amd64-tdep.h"
-#include "i387-tdep.h"
-#include "solib-svr4.h"
-#include "bsd-uthread.h"
-
-/* Support for core dumps.  */
-
-static void
-amd64obsd_supply_regset (const struct regset *regset,
-			 struct regcache *regcache, int regnum,
-			 const void *regs, size_t len)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE);
-
-  i386_supply_gregset (regset, regcache, regnum, regs, tdep->sizeof_gregset);
-  amd64_supply_fxsave (regcache, regnum,
-		       ((const gdb_byte *)regs) + tdep->sizeof_gregset);
-}
-
-static const struct regset amd64obsd_combined_regset =
-  {
-    NULL, amd64obsd_supply_regset, NULL
-  };
-
-static void
-amd64obsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					iterate_over_regset_sections_cb *cb,
-					void *cb_data,
-					const struct regcache *regcache)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* OpenBSD core dumps don't use seperate register sets for the
-     general-purpose and floating-point registers.  */
-
-  cb (".reg", tdep->sizeof_gregset + I387_SIZEOF_FXSAVE,
-      &amd64obsd_combined_regset, NULL, cb_data);
-}
-
-
-/* Support for signal handlers.  */
-
-/* Default page size.  */
-static const int amd64obsd_page_size = 4096;
-
-/* Return whether THIS_FRAME corresponds to an OpenBSD sigtramp
-   routine.  */
-
-static int
-amd64obsd_sigtramp_p (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  CORE_ADDR start_pc = (pc & ~(amd64obsd_page_size - 1));
-  const gdb_byte osigreturn[] =
-  {
-    0x48, 0xc7, 0xc0,
-    0x67, 0x00, 0x00, 0x00,	/* movq $SYS_sigreturn, %rax */
-    0xcd, 0x80			/* int $0x80 */
-  };
-  const gdb_byte sigreturn[] =
-  {
-    0x48, 0xc7, 0xc0,
-    0x67, 0x00, 0x00, 0x00,	/* movq $SYS_sigreturn, %rax */
-    0x0f, 0x05			/* syscall */
-  };
-  size_t buflen = (sizeof sigreturn) + 1;
-  gdb_byte *buf;
-  const char *name;
-
-  /* If the function has a valid symbol name, it isn't a
-     trampoline.  */
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (name != NULL)
-    return 0;
-
-  /* If the function lives in a valid section (even without a starting
-     point) it isn't a trampoline.  */
-  if (find_pc_section (pc) != NULL)
-    return 0;
-
-  /* If we can't read the instructions at START_PC, return zero.  */
-  buf = alloca ((sizeof sigreturn) + 1);
-  if (!safe_frame_unwind_memory (this_frame, start_pc + 6, buf, buflen))
-    return 0;
-
-  /* Check for sigreturn(2).  Depending on how the assembler encoded
-     the `movq %rsp, %rdi' instruction, the code starts at offset 6 or
-     7.  OpenBSD 5.0 and later use the `syscall' instruction.  Older
-     versions use `int $0x80'.  Check for both.  */
-  if (memcmp (buf, sigreturn, sizeof sigreturn)
-      && memcmp (buf + 1, sigreturn, sizeof sigreturn)
-      && memcmp (buf, osigreturn, sizeof osigreturn)
-      && memcmp (buf + 1, osigreturn, sizeof osigreturn))
-    return 0;
-
-  return 1;
-}
-
-/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
-   address of the associated sigcontext structure.  */
-
-static CORE_ADDR
-amd64obsd_sigcontext_addr (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  ULONGEST offset = (pc & (amd64obsd_page_size - 1));
-
-  /* The %rsp register points at `struct sigcontext' upon entry of a
-     signal trampoline.  The relevant part of the trampoline is
-
-        call    *%rax
-        movq    %rsp, %rdi
-        pushq   %rdi
-        movq    $SYS_sigreturn,%rax
-        int     $0x80
-
-     (see /usr/src/sys/arch/amd64/amd64/locore.S).  The `pushq'
-     instruction clobbers %rsp, but its value is saved in `%rdi'.  */
-
-  if (offset > 5)
-    return get_frame_register_unsigned (this_frame, AMD64_RDI_REGNUM);
-  else
-    return get_frame_register_unsigned (this_frame, AMD64_RSP_REGNUM);
-}
-
-/* OpenBSD 3.5 or later.  */
-
-/* Mapping between the general-purpose registers in `struct reg'
-   format and GDB's register cache layout.  */
-
-/* From <machine/reg.h>.  */
-int amd64obsd_r_reg_offset[] =
-{
-  14 * 8,			/* %rax */
-  13 * 8,			/* %rbx */
-  3 * 8,			/* %rcx */
-  2 * 8,			/* %rdx */
-  1 * 8,			/* %rsi */
-  0 * 8,			/* %rdi */
-  12 * 8,			/* %rbp */
-  15 * 8,			/* %rsp */
-  4 * 8,			/* %r8 ..  */
-  5 * 8,
-  6 * 8,
-  7 * 8,
-  8 * 8,
-  9 * 8,
-  10 * 8,
-  11 * 8,			/* ... %r15 */
-  16 * 8,			/* %rip */
-  17 * 8,			/* %eflags */
-  18 * 8,			/* %cs */
-  19 * 8,			/* %ss */
-  20 * 8,			/* %ds */
-  21 * 8,			/* %es */
-  22 * 8,			/* %fs */
-  23 * 8			/* %gs */
-};
-
-/* From <machine/signal.h>.  */
-static int amd64obsd_sc_reg_offset[] =
-{
-  14 * 8,			/* %rax */
-  13 * 8,			/* %rbx */
-  3 * 8,			/* %rcx */
-  2 * 8,			/* %rdx */
-  1 * 8,			/* %rsi */
-  0 * 8,			/* %rdi */
-  12 * 8,			/* %rbp */
-  24 * 8,			/* %rsp */
-  4 * 8,			/* %r8 ...  */
-  5 * 8,
-  6 * 8,
-  7 * 8,
-  8 * 8,
-  9 * 8,
-  10 * 8,
-  11 * 8,			/* ... %r15 */
-  21 * 8,			/* %rip */
-  23 * 8,			/* %eflags */
-  22 * 8,			/* %cs */
-  25 * 8,			/* %ss */
-  18 * 8,			/* %ds */
-  17 * 8,			/* %es */
-  16 * 8,			/* %fs */
-  15 * 8			/* %gs */
-};
-
-/* From /usr/src/lib/libpthread/arch/amd64/uthread_machdep.c.  */
-static int amd64obsd_uthread_reg_offset[] =
-{
-  19 * 8,			/* %rax */
-  16 * 8,			/* %rbx */
-  18 * 8,			/* %rcx */
-  17 * 8,			/* %rdx */
-  14 * 8,			/* %rsi */
-  13 * 8,			/* %rdi */
-  15 * 8,			/* %rbp */
-  -1,				/* %rsp */
-  12 * 8,			/* %r8 ...  */
-  11 * 8,
-  10 * 8,
-  9 * 8,
-  8 * 8,
-  7 * 8,
-  6 * 8,
-  5 * 8,			/* ... %r15 */
-  20 * 8,			/* %rip */
-  4 * 8,			/* %eflags */
-  21 * 8,			/* %cs */
-  -1,				/* %ss */
-  3 * 8,			/* %ds */
-  2 * 8,			/* %es */
-  1 * 8,			/* %fs */
-  0 * 8				/* %gs */
-};
-
-/* Offset within the thread structure where we can find the saved
-   stack pointer (%esp).  */
-#define AMD64OBSD_UTHREAD_RSP_OFFSET	400
-
-static void
-amd64obsd_supply_uthread (struct regcache *regcache,
-			  int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
-  CORE_ADDR sp = 0;
-  gdb_byte buf[8];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == -1 || regnum == AMD64_RSP_REGNUM)
-    {
-      int offset;
-
-      /* Fetch stack pointer from thread structure.  */
-      sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
-
-      /* Adjust the stack pointer such that it looks as if we just
-         returned from _thread_machdep_switch.  */
-      offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
-      store_unsigned_integer (buf, 8, byte_order, sp + offset);
-      regcache_raw_supply (regcache, AMD64_RSP_REGNUM, buf);
-    }
-
-  for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++)
-    {
-      if (amd64obsd_uthread_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  /* Fetch stack pointer from thread structure (if we didn't
-             do so already).  */
-	  if (sp == 0)
-	    sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
-
-	  /* Read the saved register from the stack frame.  */
-	  read_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
-	  regcache_raw_supply (regcache, i, buf);
-	}
-    }
-}
-
-static void
-amd64obsd_collect_uthread (const struct regcache *regcache,
-			   int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
-  CORE_ADDR sp = 0;
-  gdb_byte buf[8];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == -1 || regnum == AMD64_RSP_REGNUM)
-    {
-      int offset;
-
-      /* Calculate the stack pointer (frame pointer) that will be
-         stored into the thread structure.  */
-      offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
-      regcache_raw_collect (regcache, AMD64_RSP_REGNUM, buf);
-      sp = extract_unsigned_integer (buf, 8, byte_order) - offset;
-
-      /* Store the stack pointer.  */
-      write_memory_unsigned_integer (sp_addr, 8, byte_order, sp);
-
-      /* The stack pointer was (potentially) modified.  Make sure we
-         build a proper stack frame.  */
-      regnum = -1;
-    }
-
-  for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++)
-    {
-      if (amd64obsd_uthread_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  /* Fetch stack pointer from thread structure (if we didn't
-             calculate it already).  */
-	  if (sp == 0)
-	    sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
-
-	  /* Write the register into the stack frame.  */
-	  regcache_raw_collect (regcache, i, buf);
-	  write_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
-	}
-    }
-}
-/* Kernel debugging support.  */
-
-/* From <machine/frame.h>.  Easy since `struct trapframe' matches
-   `struct sigcontext'.  */
-#define amd64obsd_tf_reg_offset amd64obsd_sc_reg_offset
-
-static struct trad_frame_cache *
-amd64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct trad_frame_cache *cache;
-  CORE_ADDR func, sp, addr;
-  ULONGEST cs;
-  const char *name;
-  int i;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-  *this_cache = cache;
-
-  func = get_frame_func (this_frame);
-  sp = get_frame_register_unsigned (this_frame, AMD64_RSP_REGNUM);
-
-  find_pc_partial_function (func, &name, NULL, NULL);
-  if (name && startswith (name, "Xintr"))
-    addr = sp + 8;		/* It's an interrupt frame.  */
-  else
-    addr = sp;
-
-  for (i = 0; i < ARRAY_SIZE (amd64obsd_tf_reg_offset); i++)
-    if (amd64obsd_tf_reg_offset[i] != -1)
-      trad_frame_set_reg_addr (cache, i, addr + amd64obsd_tf_reg_offset[i]);
-
-  /* Read %cs from trap frame.  */
-  addr += amd64obsd_tf_reg_offset[AMD64_CS_REGNUM];
-  cs = read_memory_unsigned_integer (addr, 8, byte_order);
-  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
-    {
-      /* Trap from user space; terminate backtrace.  */
-      trad_frame_set_id (cache, outer_frame_id);
-    }
-  else
-    {
-      /* Construct the frame ID using the function start.  */
-      trad_frame_set_id (cache, frame_id_build (sp + 16, func));
-    }
-
-  return cache;
-}
-
-static void
-amd64obsd_trapframe_this_id (struct frame_info *this_frame,
-			     void **this_cache, struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    amd64obsd_trapframe_cache (this_frame, this_cache);
-  
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-amd64obsd_trapframe_prev_register (struct frame_info *this_frame,
-				   void **this_cache, int regnum)
-{
-  struct trad_frame_cache *cache =
-    amd64obsd_trapframe_cache (this_frame, this_cache);
-
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static int
-amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
-			     struct frame_info *this_frame,
-			     void **this_prologue_cache)
-{
-  ULONGEST cs;
-  const char *name;
-
-  /* Check Current Privilege Level and bail out if we're not executing
-     in kernel space.  */
-  cs = get_frame_register_unsigned (this_frame, AMD64_CS_REGNUM);
-  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
-    return 0;
-
-  find_pc_partial_function (get_frame_pc (this_frame), &name, NULL, NULL);
-  return (name && ((strcmp (name, "calltrap") == 0)
-		   || (strcmp (name, "osyscall1") == 0)
-		   || (strcmp (name, "Xsyscall") == 0)
-		   || (startswith (name, "Xintr"))));
-}
-
-static const struct frame_unwind amd64obsd_trapframe_unwind = {
-  /* FIXME: kettenis/20051219: This really is more like an interrupt
-     frame, but SIGTRAMP_FRAME would print <signal handler called>,
-     which really is not what we want here.  */
-  NORMAL_FRAME,
-  default_frame_unwind_stop_reason,
-  amd64obsd_trapframe_this_id,
-  amd64obsd_trapframe_prev_register,
-  NULL,
-  amd64obsd_trapframe_sniffer
-};
-
-
-static void
-amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  amd64_init_abi (info, gdbarch);
-  obsd_init_abi (info, gdbarch);
-
-  /* Initialize general-purpose register set details.  */
-  tdep->gregset_reg_offset = amd64obsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (amd64obsd_r_reg_offset);
-  tdep->sizeof_gregset = 24 * 8;
-
-  tdep->jb_pc_offset = 7 * 8;
-
-  tdep->sigtramp_p = amd64obsd_sigtramp_p;
-  tdep->sigcontext_addr = amd64obsd_sigcontext_addr;
-  tdep->sc_reg_offset = amd64obsd_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (amd64obsd_sc_reg_offset);
-
-  /* OpenBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, amd64obsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, amd64obsd_collect_uthread);
-
-  /* OpenBSD uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-
-  /* Unwind kernel trap frames correctly.  */
-  frame_unwind_prepend_unwinder (gdbarch, &amd64obsd_trapframe_unwind);
-}
-
-/* Traditional (a.out) NetBSD-style core dumps.  */
-
-static void
-amd64obsd_core_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  amd64obsd_init_abi (info, gdbarch);
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, amd64obsd_iterate_over_regset_sections);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_amd64obsd_tdep (void);
-
-void
-_initialize_amd64obsd_tdep (void)
-{
-  /* The OpenBSD/amd64 native dependent code makes this assumption.  */
-  gdb_assert (ARRAY_SIZE (amd64obsd_r_reg_offset) == AMD64_NUM_GREGS);
-
-  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
-			  GDB_OSABI_OPENBSD_ELF, amd64obsd_init_abi);
-
-  /* OpenBSD uses traditional (a.out) NetBSD-style core dumps.  */
-  gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
-			  GDB_OSABI_NETBSD_AOUT, amd64obsd_core_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-sol2-tdep.c ./gdb/amd64-sol2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-sol2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-sol2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for AMD64 Solaris.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Joseph Myers, CodeSourcery, LLC.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-tdep.c ./gdb/amd64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for AMD64.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Jiri Smid, SuSE Labs.
 
@@ -40,15 +40,18 @@
 #include "amd64-tdep.h"
 #include "i387-tdep.h"
 #include "x86-xstate.h"
+#include <algorithm>
 
 #include "features/i386/amd64.c"
 #include "features/i386/amd64-avx.c"
 #include "features/i386/amd64-mpx.c"
-#include "features/i386/amd64-avx512.c"
+#include "features/i386/amd64-avx-mpx.c"
+#include "features/i386/amd64-avx-avx512.c"
+#include "features/i386/amd64-avx-mpx-avx512-pku.c"
 
 #include "features/i386/x32.c"
 #include "features/i386/x32-avx.c"
-#include "features/i386/x32-avx512.c"
+#include "features/i386/x32-avx-avx512.c"
 
 #include "ax.h"
 #include "ax-gdb.h"
@@ -154,6 +157,10 @@ static const char *amd64_xmm_avx512_name
     "xmm28",  "xmm29",  "xmm30",  "xmm31"
 };
 
+static const char *amd64_pkeys_names[] = {
+    "pkru"
+};
+
 /* DWARF Register Number Mapping as defined in the System V psABI,
    section 3.6.  */
 
@@ -252,9 +259,7 @@ amd64_dwarf_reg_to_regnum (struct gdbarc
   if (reg >= 0 && reg < amd64_dwarf_regmap_len)
     regnum = amd64_dwarf_regmap[reg];
 
-  if (regnum == -1)
-    warning (_("Unmapped DWARF Register #%d encountered."), reg);
-  else if (ymm0_regnum >= 0
+  if (ymm0_regnum >= 0
 	   && i386_xmm_regnum_p (gdbarch, regnum))
     regnum += ymm0_regnum - I387_XMM0_REGNUM (tdep);
 
@@ -353,7 +358,7 @@ amd64_pseudo_register_read_value (struct
 				  struct regcache *regcache,
 				  int regnum)
 {
-  gdb_byte raw_buf[MAX_REGISTER_SIZE];
+  gdb_byte *raw_buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum register_status status;
   struct value *result_value;
@@ -414,7 +419,7 @@ amd64_pseudo_register_write (struct gdba
 			     struct regcache *regcache,
 			     int regnum, const gdb_byte *buf)
 {
-  gdb_byte raw_buf[MAX_REGISTER_SIZE];
+  gdb_byte *raw_buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   if (i386_byte_regnum_p (gdbarch, regnum))
@@ -457,6 +462,35 @@ amd64_pseudo_register_write (struct gdba
     i386_pseudo_register_write (gdbarch, regcache, regnum, buf);
 }
 
+/* Implement the 'ax_pseudo_register_collect' gdbarch method.  */
+
+static int
+amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch,
+				  struct agent_expr *ax, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (i386_byte_regnum_p (gdbarch, regnum))
+    {
+      int gpnum = regnum - tdep->al_regnum;
+
+      if (gpnum >= AMD64_NUM_LOWER_BYTE_REGS)
+	ax_reg_mask (ax, gpnum - AMD64_NUM_LOWER_BYTE_REGS);
+      else
+	ax_reg_mask (ax, gpnum);
+      return 0;
+    }
+  else if (i386_dword_regnum_p (gdbarch, regnum))
+    {
+      int gpnum = regnum - tdep->eax_regnum;
+
+      ax_reg_mask (ax, gpnum);
+      return 0;
+    }
+  else
+    return i386_ax_pseudo_register_collect (gdbarch, ax, regnum);
+}
+
 
 
 /* Register classes as defined in the psABI.  */
@@ -818,10 +852,10 @@ amd64_return_value (struct gdbarch *gdba
       gdb_assert (regnum != -1);
 
       if (readbuf)
-	regcache_raw_read_part (regcache, regnum, offset, min (len, 8),
+	regcache_raw_read_part (regcache, regnum, offset, std::min (len, 8),
 				readbuf + i * 8);
       if (writebuf)
-	regcache_raw_write_part (regcache, regnum, offset, min (len, 8),
+	regcache_raw_write_part (regcache, regnum, offset, std::min (len, 8),
 				 writebuf + i * 8);
     }
 
@@ -850,7 +884,7 @@ amd64_push_arguments (struct regcache *r
     AMD64_XMM0_REGNUM + 4, AMD64_XMM0_REGNUM + 5,
     AMD64_XMM0_REGNUM + 6, AMD64_XMM0_REGNUM + 7,
   };
-  struct value **stack_args = alloca (nargs * sizeof (struct value *));
+  struct value **stack_args = XALLOCAVEC (struct value *, nargs);
   int num_stack_args = 0;
   int num_elements = 0;
   int element = 0;
@@ -929,7 +963,7 @@ amd64_push_arguments (struct regcache *r
 
 	      gdb_assert (regnum != -1);
 	      memset (buf, 0, sizeof buf);
-	      memcpy (buf, valbuf + j * 8, min (len, 8));
+	      memcpy (buf, valbuf + j * 8, std::min (len, 8));
 	      regcache_raw_write_part (regcache, regnum, offset, 8, buf);
 	    }
 	}
@@ -1274,12 +1308,10 @@ static void
 fixup_riprel (struct gdbarch *gdbarch, struct displaced_step_closure *dsc,
 	      CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   const struct amd64_insn *insn_details = &dsc->insn_details;
   int modrm_offset = insn_details->modrm_offset;
   gdb_byte *insn = insn_details->raw_insn + modrm_offset;
   CORE_ADDR rip_base;
-  int32_t disp;
   int insn_length;
   int arch_tmp_regno, tmp_regno;
   ULONGEST orig_value;
@@ -1288,7 +1320,6 @@ fixup_riprel (struct gdbarch *gdbarch, s
   ++insn;
 
   /* Compute the rip-relative address.	*/
-  disp = extract_signed_integer (insn, sizeof (int32_t), byte_order);
   insn_length = gdb_buffered_insn_length (gdbarch, dsc->insn_buf,
 					  dsc->max_len, from);
   rip_base = from + insn_length;
@@ -1351,8 +1382,9 @@ amd64_displaced_step_copy_insn (struct g
   /* Extra space for sentinels so fixup_{riprel,displaced_copy} don't have to
      continually watch for running off the end of the buffer.  */
   int fixup_sentinel_space = len;
-  struct displaced_step_closure *dsc =
-    xmalloc (sizeof (*dsc) + len + fixup_sentinel_space);
+  struct displaced_step_closure *dsc
+    = ((struct displaced_step_closure *)
+       xmalloc (sizeof (*dsc) + len + fixup_sentinel_space));
   gdb_byte *buf = &dsc->insn_buf[0];
   struct amd64_insn *details = &dsc->insn_details;
 
@@ -1514,7 +1546,7 @@ amd64_classify_insn_at (struct gdbarch *
   int len, classification;
 
   len = gdbarch_max_insn_length (gdbarch);
-  buf = alloca (len);
+  buf = (gdb_byte *) alloca (len);
 
   read_code (addr, buf, len);
   amd64_get_insn_details (buf, &details);
@@ -1662,7 +1694,7 @@ amd64_displaced_step_fixup (struct gdbar
 
       regcache_cooked_read_unsigned (regs, AMD64_RSP_REGNUM, &rsp);
       retaddr = read_memory_unsigned_integer (rsp, retaddr_len, byte_order);
-      retaddr = (retaddr - insn_offset) & 0xffffffffUL;
+      retaddr = (retaddr - insn_offset) & 0xffffffffffffffffULL;
       write_memory_unsigned_integer (rsp, retaddr_len, byte_order, retaddr);
 
       if (debug_displaced)
@@ -1711,7 +1743,7 @@ amd64_relocate_instruction (struct gdbar
   int len = gdbarch_max_insn_length (gdbarch);
   /* Extra space for sentinels.  */
   int fixup_sentinel_space = len;
-  gdb_byte *buf = xmalloc (len + fixup_sentinel_space);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len + fixup_sentinel_space);
   struct amd64_insn insn_details;
   int offset = 0;
   LONGEST rel32, newrel;
@@ -1738,15 +1770,47 @@ amd64_relocate_instruction (struct gdbar
      the user program would return to.  */
   if (insn[0] == 0xe8)
     {
-      gdb_byte push_buf[16];
-      unsigned int ret_addr;
+      gdb_byte push_buf[32];
+      CORE_ADDR ret_addr;
+      int i = 0;
 
       /* Where "ret" in the original code will return to.  */
       ret_addr = oldloc + insn_length;
-      push_buf[0] = 0x68; /* pushq $...  */
-      store_unsigned_integer (&push_buf[1], 4, byte_order, ret_addr);
+
+      /* If pushing an address higher than or equal to 0x80000000,
+	 avoid 'pushq', as that sign extends its 32-bit operand, which
+	 would be incorrect.  */
+      if (ret_addr <= 0x7fffffff)
+	{
+	  push_buf[0] = 0x68; /* pushq $...  */
+	  store_unsigned_integer (&push_buf[1], 4, byte_order, ret_addr);
+	  i = 5;
+	}
+      else
+	{
+	  push_buf[i++] = 0x48; /* sub    $0x8,%rsp */
+	  push_buf[i++] = 0x83;
+	  push_buf[i++] = 0xec;
+	  push_buf[i++] = 0x08;
+
+	  push_buf[i++] = 0xc7; /* movl    $imm,(%rsp) */
+	  push_buf[i++] = 0x04;
+	  push_buf[i++] = 0x24;
+	  store_unsigned_integer (&push_buf[i], 4, byte_order,
+				  ret_addr & 0xffffffff);
+	  i += 4;
+
+	  push_buf[i++] = 0xc7; /* movl    $imm,4(%rsp) */
+	  push_buf[i++] = 0x44;
+	  push_buf[i++] = 0x24;
+	  push_buf[i++] = 0x04;
+	  store_unsigned_integer (&push_buf[i], 4, byte_order,
+				  ret_addr >> 32);
+	  i += 4;
+	}
+      gdb_assert (i <= sizeof (push_buf));
       /* Push the push.  */
-      append_insns (to, 5, push_buf);
+      append_insns (to, i, push_buf);
 
       /* Convert the relative call to a relative jump.  */
       insn[0] = 0xe9;
@@ -2009,7 +2073,7 @@ amd64_analyze_stack_align (CORE_ADDR pc,
   if (current_pc > pc + offset_and)
     cache->saved_sp_reg = amd64_arch_reg_to_regnum (reg);
 
-  return min (pc + offset + 2, current_pc);
+  return std::min (pc + offset + 2, current_pc);
 }
 
 /* Similar to amd64_analyze_stack_align for x32.  */
@@ -2191,7 +2255,7 @@ amd64_x32_analyze_stack_align (CORE_ADDR
   if (current_pc > pc + offset_and)
     cache->saved_sp_reg = amd64_arch_reg_to_regnum (reg);
 
-  return min (pc + offset + 2, current_pc);
+  return std::min (pc + offset + 2, current_pc);
 }
 
 /* Do a limited analysis of the prologue at PC and update CACHE
@@ -2380,7 +2444,7 @@ amd64_skip_prologue (struct gdbarch *gdb
 	  && (cust != NULL
 	      && COMPUNIT_PRODUCER (cust) != NULL
 	      && startswith (COMPUNIT_PRODUCER (cust), "clang ")))
-        return max (start_pc, post_prologue_pc);
+        return std::max (start_pc, post_prologue_pc);
     }
 
   amd64_init_frame_cache (&cache);
@@ -2470,7 +2534,7 @@ amd64_frame_cache (struct frame_info *th
   struct amd64_frame_cache *cache;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct amd64_frame_cache *) *this_cache;
 
   cache = amd64_alloc_frame_cache ();
   *this_cache = cache;
@@ -2589,7 +2653,7 @@ amd64_sigtramp_frame_cache (struct frame
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct amd64_frame_cache *) *this_cache;
 
   cache = amd64_alloc_frame_cache ();
 
@@ -2765,7 +2829,7 @@ amd64_epilogue_frame_cache (struct frame
   gdb_byte buf[8];
 
   if (*this_cache)
-    return *this_cache;
+    return (struct amd64_frame_cache *) *this_cache;
 
   cache = amd64_alloc_frame_cache ();
   *this_cache = cache;
@@ -2988,6 +3052,26 @@ amd64_init_abi (struct gdbarch_info info
       tdep->bnd0r_regnum = AMD64_BND0R_REGNUM;
     }
 
+  if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.segments") != NULL)
+    {
+      const struct tdesc_feature *feature =
+	  tdesc_find_feature (tdesc, "org.gnu.gdb.i386.segments");
+      struct tdesc_arch_data *tdesc_data_segments =
+	  (struct tdesc_arch_data *) info.tdep_info;
+
+      tdesc_numbered_register (feature, tdesc_data_segments,
+		       AMD64_FSBASE_REGNUM, "fs_base");
+      tdesc_numbered_register (feature, tdesc_data_segments,
+		       AMD64_GSBASE_REGNUM, "gs_base");
+    }
+
+  if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.pkeys") != NULL)
+    {
+      tdep->pkeys_register_names = amd64_pkeys_names;
+      tdep->pkru_regnum = AMD64_PKRU_REGNUM;
+      tdep->num_pkeys_regs = 1;
+    }
+
   tdep->num_byte_regs = 20;
   tdep->num_word_regs = 16;
   tdep->num_dword_regs = 16;
@@ -2998,6 +3082,8 @@ amd64_init_abi (struct gdbarch_info info
 					  amd64_pseudo_register_read_value);
   set_gdbarch_pseudo_register_write (gdbarch,
 				     amd64_pseudo_register_write);
+  set_gdbarch_ax_pseudo_register_collect (gdbarch,
+					  amd64_ax_pseudo_register_collect);
 
   set_tdesc_pseudo_register_name (gdbarch, amd64_pseudo_register_name);
 
@@ -3128,11 +3214,14 @@ amd64_target_description (uint64_t xcr0)
 {
   switch (xcr0 & X86_XSTATE_ALL_MASK)
     {
-    case X86_XSTATE_MPX_AVX512_MASK:
-    case X86_XSTATE_AVX512_MASK:
-      return tdesc_amd64_avx512;
+    case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+      return tdesc_amd64_avx_mpx_avx512_pku;
+    case X86_XSTATE_AVX_AVX512_MASK:
+      return tdesc_amd64_avx_avx512;
     case X86_XSTATE_MPX_MASK:
       return tdesc_amd64_mpx;
+    case X86_XSTATE_AVX_MPX_MASK:
+      return tdesc_amd64_avx_mpx;
     case X86_XSTATE_AVX_MASK:
       return tdesc_amd64_avx;
     default:
@@ -3149,11 +3238,13 @@ _initialize_amd64_tdep (void)
   initialize_tdesc_amd64 ();
   initialize_tdesc_amd64_avx ();
   initialize_tdesc_amd64_mpx ();
-  initialize_tdesc_amd64_avx512 ();
+  initialize_tdesc_amd64_avx_mpx ();
+  initialize_tdesc_amd64_avx_avx512 ();
+  initialize_tdesc_amd64_avx_mpx_avx512_pku ();
 
   initialize_tdesc_x32 ();
   initialize_tdesc_x32_avx ();
-  initialize_tdesc_x32_avx512 ();
+  initialize_tdesc_x32_avx_avx512 ();
 }
 
 
@@ -3181,7 +3272,7 @@ amd64_supply_fxsave (struct regcache *re
   if (fxsave
       && gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
     {
-      const gdb_byte *regs = fxsave;
+      const gdb_byte *regs = (const gdb_byte *) fxsave;
 
       if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
 	regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
@@ -3204,7 +3295,7 @@ amd64_supply_xsave (struct regcache *reg
   if (xsave
       && gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
     {
-      const gdb_byte *regs = xsave;
+      const gdb_byte *regs = (const gdb_byte *) xsave;
 
       if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
 	regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep),
@@ -3226,7 +3317,7 @@ amd64_collect_fxsave (const struct regca
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  gdb_byte *regs = fxsave;
+  gdb_byte *regs = (gdb_byte *) fxsave;
 
   i387_collect_fxsave (regcache, regnum, fxsave);
 
@@ -3247,7 +3338,7 @@ amd64_collect_xsave (const struct regcac
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  gdb_byte *regs = xsave;
+  gdb_byte *regs = (gdb_byte *) xsave;
 
   i387_collect_xsave (regcache, regnum, xsave, gcore);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-tdep.h ./gdb/amd64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent definitions for AMD64.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -76,13 +76,16 @@ enum amd64_regnum
   AMD64_K0_REGNUM,
   AMD64_K7_REGNUM = AMD64_K0_REGNUM + 7,
   AMD64_ZMM0H_REGNUM,
-  AMD64_ZMM31H_REGNUM = AMD64_ZMM0H_REGNUM + 31
+  AMD64_ZMM31H_REGNUM = AMD64_ZMM0H_REGNUM + 31,
+  AMD64_PKRU_REGNUM,
+  AMD64_FSBASE_REGNUM,
+  AMD64_GSBASE_REGNUM
 };
 
 /* Number of general purpose registers.  */
 #define AMD64_NUM_GREGS		24
 
-#define AMD64_NUM_REGS		(AMD64_ZMM31H_REGNUM + 1)
+#define AMD64_NUM_REGS		(AMD64_GSBASE_REGNUM + 1)
 
 extern struct target_desc *tdesc_amd64;
 
@@ -128,13 +131,13 @@ extern const struct regset amd64_fpregse
 /* Variables exported from amd64-linux-tdep.c.  */
 extern int amd64_linux_gregset_reg_offset[];
 
-/* Variables exported from amd64nbsd-tdep.c.  */
+/* Variables exported from amd64-nbsd-tdep.c.  */
 extern int amd64nbsd_r_reg_offset[];
 
-/* Variables exported from amd64obsd-tdep.c.  */
+/* Variables exported from amd64-obsd-tdep.c.  */
 extern int amd64obsd_r_reg_offset[];
 
-/* Variables exported from amd64fbsd-tdep.c.  */
+/* Variables exported from amd64-fbsd-tdep.c.  */
 extern CORE_ADDR amd64fbsd_sigtramp_start_addr;
 extern CORE_ADDR amd64fbsd_sigtramp_end_addr;
 extern int amd64fbsd_sc_reg_offset[];
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-windows-nat.c ./gdb/amd64-windows-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-windows-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-windows-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-windows-tdep.c ./gdb/amd64-windows-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/amd64-windows-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/amd64-windows-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 #include "coff/pe.h"
 #include "libcoff.h"
 #include "value.h"
+#include <algorithm>
 
 /* The registers used to pass integer arguments during a function call.  */
 static int amd64_windows_dummy_call_integer_regs[] =
@@ -141,7 +142,7 @@ amd64_windows_store_arg_in_reg (struct r
 
   gdb_assert (TYPE_LENGTH (type) <= 8);
   memset (buf, 0, sizeof buf);
-  memcpy (buf, valbuf, min (TYPE_LENGTH (type), 8));
+  memcpy (buf, valbuf, std::min (TYPE_LENGTH (type), (unsigned int) 8));
   regcache_cooked_write (regcache, regno, buf);
 }
 
@@ -158,7 +159,7 @@ amd64_windows_push_arguments (struct reg
 {
   int reg_idx = 0;
   int i;
-  struct value **stack_args = alloca (nargs * sizeof (struct value *));
+  struct value **stack_args = XALLOCAVEC (struct value *, nargs);
   int num_stack_args = 0;
   int num_elements = 0;
   int element = 0;
@@ -169,7 +170,7 @@ amd64_windows_push_arguments (struct reg
      in inferior memory.  So use a copy of the ARGS table, to avoid
      modifying the original one.  */
   {
-    struct value **args1 = alloca (nargs * sizeof (struct value *));
+    struct value **args1 = XALLOCAVEC (struct value *, nargs);
 
     memcpy (args1, args, nargs * sizeof (struct value *));
     sp = amd64_windows_adjust_args_passed_by_pointer (args1, nargs, sp);
@@ -488,6 +489,7 @@ amd64_windows_frame_decode_epilogue (str
 
 	  cache->prev_reg_addr[amd64_windows_w2gdb_regnum[reg]] = cur_sp;
 	  cur_sp += 8;
+	  pc += rex ? 2 : 1;
 	}
       else
 	break;
@@ -594,8 +596,6 @@ amd64_windows_frame_decode_epilogue (str
 	{
 	  /* rex jmp reg  */
 	  gdb_byte op1;
-	  unsigned int reg;
-	  gdb_byte buf[8];
 
 	  if (target_read_memory (pc + 2, &op1, 1) != 0)
 	    return -1;
@@ -647,7 +647,6 @@ amd64_windows_frame_decode_insns (struct
 	 address is odd (http://www.codemachine.com/article_x64deepdive.html).
       */
       struct external_pex64_runtime_function d;
-      CORE_ADDR sa, ea;
 
       if (target_read_memory (cache->image_base + (unwind_info & ~1),
 			      (gdb_byte *) &d, sizeof (d)) != 0)
@@ -670,7 +669,6 @@ amd64_windows_frame_decode_insns (struct
       gdb_byte *end_insns;
       unsigned char codes_count;
       unsigned char frame_reg;
-      unsigned char frame_off;
       CORE_ADDR start;
 
       /* Read and decode header.  */
@@ -1015,17 +1013,11 @@ amd64_windows_frame_cache (struct frame_
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct amd64_windows_frame_cache *cache;
   gdb_byte buf[8];
-  struct obj_section *sec;
-  pe_data_type *pe;
-  IMAGE_DATA_DIRECTORY *dir;
-  CORE_ADDR image_base;
   CORE_ADDR pc;
-  struct objfile *objfile;
-  unsigned long lo, hi;
   CORE_ADDR unwind_info = 0;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct amd64_windows_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct amd64_windows_frame_cache);
   *this_cache = cache;
@@ -1064,10 +1056,8 @@ amd64_windows_frame_prev_register (struc
 				   void **this_cache, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct amd64_windows_frame_cache *cache =
     amd64_windows_frame_cache (this_frame, this_cache);
-  struct value *val;
   CORE_ADDR prev;
 
   if (frame_debug)
@@ -1113,7 +1103,6 @@ static void
 amd64_windows_frame_this_id (struct frame_info *this_frame, void **this_cache,
 		   struct frame_id *this_id)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct amd64_windows_frame_cache *cache =
     amd64_windows_frame_cache (this_frame, this_cache);
 
@@ -1155,7 +1144,7 @@ amd64_windows_skip_prologue (struct gdba
       else if (target_read_memory (image_base + unwind_info,
 				   (gdb_byte *) &ex_ui, sizeof (ex_ui)) == 0
 	       && PEX64_UWI_VERSION (ex_ui.Version_Flags) == 1)
-	return max (pc, image_base + start_rva + ex_ui.SizeOfPrologue);
+	return std::max (pc, image_base + start_rva + ex_ui.SizeOfPrologue);
     }
 
   /* See if we can determine the end of the prologue via the symbol
@@ -1167,7 +1156,7 @@ amd64_windows_skip_prologue (struct gdba
 	= skip_prologue_using_sal (gdbarch, func_addr);
 
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   return pc;
@@ -1221,8 +1210,6 @@ amd64_windows_auto_wide_charset (void)
 static void
 amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   /* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
      preferred over the SEH one.  The reasons are:
      - binaries without SEH but with dwarf2 debug info are correcly handled
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/annotate.c ./gdb/annotate.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/annotate.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/annotate.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Annotation routines for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 #include "observer.h"
 #include "inferior.h"
 #include "infrun.h"
+#include "top.h"
 
 
 /* Prototypes for local functions.  */
@@ -46,16 +47,6 @@ void (*deprecated_annotate_signal_hook) 
 static int frames_invalid_emitted;
 static int breakpoints_invalid_emitted;
 
-/* True if the target can async, and a synchronous execution command
-   is not in progress.  If true, input is accepted, so don't suppress
-   annotations.  */
-
-static int
-async_background_execution_p (void)
-{
-  return (target_can_async_p () && !sync_execution);
-}
-
 static void
 print_value_flags (struct type *t)
 {
@@ -70,7 +61,7 @@ annotate_breakpoints_invalid (void)
 {
   if (annotation_level == 2
       && (!breakpoints_invalid_emitted
-	  || async_background_execution_p ()))
+	  || current_ui->prompt_state != PROMPT_BLOCKED))
     {
       /* If the inferior owns the terminal (e.g., we're resuming),
 	 make sure to leave with the inferior still owning it.  */
@@ -217,7 +208,7 @@ annotate_frames_invalid (void)
 {
   if (annotation_level == 2
       && (!frames_invalid_emitted
-	  || async_background_execution_p ()))
+	  || current_ui->prompt_state != PROMPT_BLOCKED))
     {
       /* If the inferior owns the terminal (e.g., we're resuming),
 	 make sure to leave with the inferior still owning it.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/annotate.h ./gdb/annotate.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/annotate.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/annotate.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Annotation routines for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/aarch64-insn.c ./gdb/arch/aarch64-insn.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/aarch64-insn.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/aarch64-insn.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,389 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "aarch64-insn.h"
+
+/* Toggle this file's internal debugging dump.  */
+int aarch64_debug = 0;
+
+/* Extract a signed value from a bit field within an instruction
+   encoding.
+
+   INSN is the instruction opcode.
+
+   WIDTH specifies the width of the bit field to extract (in bits).
+
+   OFFSET specifies the least significant bit of the field where bits
+   are numbered zero counting from least to most significant.  */
+
+static int32_t
+extract_signed_bitfield (uint32_t insn, unsigned width, unsigned offset)
+{
+  unsigned shift_l = sizeof (int32_t) * 8 - (offset + width);
+  unsigned shift_r = sizeof (int32_t) * 8 - width;
+
+  return ((int32_t) insn << shift_l) >> shift_r;
+}
+
+/* Determine if specified bits within an instruction opcode matches a
+   specific pattern.
+
+   INSN is the instruction opcode.
+
+   MASK specifies the bits within the opcode that are to be tested
+   agsinst for a match with PATTERN.  */
+
+static int
+decode_masked_match (uint32_t insn, uint32_t mask, uint32_t pattern)
+{
+  return (insn & mask) == pattern;
+}
+
+/* Decode an opcode if it represents an ADR or ADRP instruction.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   IS_ADRP receives the 'op' field from the decoded instruction.
+   RD receives the 'rd' field from the decoded instruction.
+   OFFSET receives the 'immhi:immlo' field from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_adr (CORE_ADDR addr, uint32_t insn, int *is_adrp,
+		    unsigned *rd, int32_t *offset)
+{
+  /* adr  0ii1 0000 iiii iiii iiii iiii iiir rrrr */
+  /* adrp 1ii1 0000 iiii iiii iiii iiii iiir rrrr */
+  if (decode_masked_match (insn, 0x1f000000, 0x10000000))
+    {
+      uint32_t immlo = (insn >> 29) & 0x3;
+      int32_t immhi = extract_signed_bitfield (insn, 19, 5) << 2;
+
+      *is_adrp = (insn >> 31) & 0x1;
+      *rd = (insn >> 0) & 0x1f;
+
+      if (*is_adrp)
+	{
+	  /* The ADRP instruction has an offset with a -/+ 4GB range,
+	     encoded as (immhi:immlo * 4096).  */
+	  *offset = (immhi | immlo) * 4096;
+	}
+      else
+	*offset = (immhi | immlo);
+
+      if (aarch64_debug)
+	{
+	  debug_printf ("decode: 0x%s 0x%x %s x%u, #?\n",
+			core_addr_to_string_nz (addr), insn,
+			*is_adrp ?  "adrp" : "adr", *rd);
+	}
+      return 1;
+    }
+  return 0;
+}
+
+/* Decode an opcode if it represents an branch immediate or branch
+   and link immediate instruction.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   IS_BL receives the 'op' bit from the decoded instruction.
+   OFFSET receives the immediate offset from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_b (CORE_ADDR addr, uint32_t insn, int *is_bl,
+		  int32_t *offset)
+{
+  /* b  0001 01ii iiii iiii iiii iiii iiii iiii */
+  /* bl 1001 01ii iiii iiii iiii iiii iiii iiii */
+  if (decode_masked_match (insn, 0x7c000000, 0x14000000))
+    {
+      *is_bl = (insn >> 31) & 0x1;
+      *offset = extract_signed_bitfield (insn, 26, 0) << 2;
+
+      if (aarch64_debug)
+	{
+	  debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
+			core_addr_to_string_nz (addr), insn,
+			*is_bl ? "bl" : "b",
+			core_addr_to_string_nz (addr + *offset));
+	}
+
+      return 1;
+    }
+  return 0;
+}
+
+/* Decode an opcode if it represents a conditional branch instruction.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   COND receives the branch condition field from the decoded
+   instruction.
+   OFFSET receives the immediate offset from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond,
+		      int32_t *offset)
+{
+  /* b.cond  0101 0100 iiii iiii iiii iiii iii0 cccc */
+  if (decode_masked_match (insn, 0xff000010, 0x54000000))
+    {
+      *cond = (insn >> 0) & 0xf;
+      *offset = extract_signed_bitfield (insn, 19, 5) << 2;
+
+      if (aarch64_debug)
+	{
+	  debug_printf ("decode: 0x%s 0x%x b<%u> 0x%s\n",
+			core_addr_to_string_nz (addr), insn, *cond,
+			core_addr_to_string_nz (addr + *offset));
+	}
+      return 1;
+    }
+  return 0;
+}
+
+/* Decode an opcode if it represents a CBZ or CBNZ instruction.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   IS64 receives the 'sf' field from the decoded instruction.
+   IS_CBNZ receives the 'op' field from the decoded instruction.
+   RN receives the 'rn' field from the decoded instruction.
+   OFFSET receives the 'imm19' field from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_cb (CORE_ADDR addr, uint32_t insn, int *is64, int *is_cbnz,
+		   unsigned *rn, int32_t *offset)
+{
+  /* cbz  T011 010o iiii iiii iiii iiii iiir rrrr */
+  /* cbnz T011 010o iiii iiii iiii iiii iiir rrrr */
+  if (decode_masked_match (insn, 0x7e000000, 0x34000000))
+    {
+      *rn = (insn >> 0) & 0x1f;
+      *is64 = (insn >> 31) & 0x1;
+      *is_cbnz = (insn >> 24) & 0x1;
+      *offset = extract_signed_bitfield (insn, 19, 5) << 2;
+
+      if (aarch64_debug)
+	{
+	  debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
+			core_addr_to_string_nz (addr), insn,
+			*is_cbnz ? "cbnz" : "cbz",
+			core_addr_to_string_nz (addr + *offset));
+	}
+      return 1;
+    }
+  return 0;
+}
+
+/* Decode an opcode if it represents a TBZ or TBNZ instruction.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   IS_TBNZ receives the 'op' field from the decoded instruction.
+   BIT receives the bit position field from the decoded instruction.
+   RT receives 'rt' field from the decoded instruction.
+   IMM receives 'imm' field from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_tb (CORE_ADDR addr, uint32_t insn, int *is_tbnz,
+		   unsigned *bit, unsigned *rt, int32_t *imm)
+{
+  /* tbz  b011 0110 bbbb biii iiii iiii iiir rrrr */
+  /* tbnz B011 0111 bbbb biii iiii iiii iiir rrrr */
+  if (decode_masked_match (insn, 0x7e000000, 0x36000000))
+    {
+      *rt = (insn >> 0) & 0x1f;
+      *is_tbnz = (insn >> 24) & 0x1;
+      *bit = ((insn >> (31 - 4)) & 0x20) | ((insn >> 19) & 0x1f);
+      *imm = extract_signed_bitfield (insn, 14, 5) << 2;
+
+      if (aarch64_debug)
+	{
+	  debug_printf ("decode: 0x%s 0x%x %s x%u, #%u, 0x%s\n",
+			core_addr_to_string_nz (addr), insn,
+			*is_tbnz ? "tbnz" : "tbz", *rt, *bit,
+			core_addr_to_string_nz (addr + *imm));
+	}
+      return 1;
+    }
+  return 0;
+}
+
+/* Decode an opcode if it represents an LDR or LDRSW instruction taking a
+   literal offset from the current PC.
+
+   ADDR specifies the address of the opcode.
+   INSN specifies the opcode to test.
+   IS_W is set if the instruction is LDRSW.
+   IS64 receives size field from the decoded instruction.
+   RT receives the 'rt' field from the decoded instruction.
+   OFFSET receives the 'imm' field from the decoded instruction.
+
+   Return 1 if the opcodes matches and is decoded, otherwise 0.  */
+
+int
+aarch64_decode_ldr_literal (CORE_ADDR addr, uint32_t insn, int *is_w,
+			    int *is64, unsigned *rt, int32_t *offset)
+{
+  /* LDR    0T01 1000 iiii iiii iiii iiii iiir rrrr */
+  /* LDRSW  1001 1000 iiii iiii iiii iiii iiir rrrr */
+  if ((insn & 0x3f000000) == 0x18000000)
+    {
+      *is_w = (insn >> 31) & 0x1;
+
+      if (*is_w)
+	{
+	  /* LDRSW always takes a 64-bit destination registers.  */
+	  *is64 = 1;
+	}
+      else
+	*is64 = (insn >> 30) & 0x1;
+
+      *rt = (insn >> 0) & 0x1f;
+      *offset = extract_signed_bitfield (insn, 19, 5) << 2;
+
+      if (aarch64_debug)
+	debug_printf ("decode: %s 0x%x %s %s%u, #?\n",
+		      core_addr_to_string_nz (addr), insn,
+		      *is_w ? "ldrsw" : "ldr",
+		      *is64 ? "x" : "w", *rt);
+
+      return 1;
+    }
+
+  return 0;
+}
+
+/* Visit an instruction INSN by VISITOR with all needed information in DATA.
+
+   PC relative instructions need to be handled specifically:
+
+   - B/BL
+   - B.COND
+   - CBZ/CBNZ
+   - TBZ/TBNZ
+   - ADR/ADRP
+   - LDR/LDRSW (literal)  */
+
+void
+aarch64_relocate_instruction (uint32_t insn,
+			      const struct aarch64_insn_visitor *visitor,
+			      struct aarch64_insn_data *data)
+{
+  int is_bl;
+  int is64;
+  int is_sw;
+  int is_cbnz;
+  int is_tbnz;
+  int is_adrp;
+  unsigned rn;
+  unsigned rt;
+  unsigned rd;
+  unsigned cond;
+  unsigned bit;
+  int32_t offset;
+
+  if (aarch64_decode_b (data->insn_addr, insn, &is_bl, &offset))
+    visitor->b (is_bl, offset, data);
+  else if (aarch64_decode_bcond (data->insn_addr, insn, &cond, &offset))
+    visitor->b_cond (cond, offset, data);
+  else if (aarch64_decode_cb (data->insn_addr, insn, &is64, &is_cbnz, &rn,
+			      &offset))
+    visitor->cb (offset, is_cbnz, rn, is64, data);
+  else if (aarch64_decode_tb (data->insn_addr, insn, &is_tbnz, &bit, &rt,
+			      &offset))
+    visitor->tb (offset, is_tbnz, rt, bit, data);
+  else if (aarch64_decode_adr (data->insn_addr, insn, &is_adrp, &rd, &offset))
+    visitor->adr (offset, rd, is_adrp, data);
+  else if (aarch64_decode_ldr_literal (data->insn_addr, insn, &is_sw, &is64,
+				       &rt, &offset))
+    visitor->ldr_literal (offset, is_sw, rt, is64, data);
+  else
+    visitor->others (insn, data);
+}
+
+/* Write a 32-bit unsigned integer INSN info *BUF.  Return the number of
+   instructions written (aka. 1).  */
+
+int
+aarch64_emit_insn (uint32_t *buf, uint32_t insn)
+{
+  *buf = insn;
+  return 1;
+}
+
+/* Helper function emitting a load or store instruction.  */
+
+int
+aarch64_emit_load_store (uint32_t *buf, uint32_t size,
+			 enum aarch64_opcodes opcode,
+			 struct aarch64_register rt,
+			 struct aarch64_register rn,
+			 struct aarch64_memory_operand operand)
+{
+  uint32_t op;
+
+  switch (operand.type)
+    {
+    case MEMORY_OPERAND_OFFSET:
+      {
+	op = ENCODE (1, 1, 24);
+
+	return aarch64_emit_insn (buf, opcode | ENCODE (size, 2, 30) | op
+				  | ENCODE (operand.index >> 3, 12, 10)
+				  | ENCODE (rn.num, 5, 5)
+				  | ENCODE (rt.num, 5, 0));
+      }
+    case MEMORY_OPERAND_POSTINDEX:
+      {
+	uint32_t post_index = ENCODE (1, 2, 10);
+
+	op = ENCODE (0, 1, 24);
+
+	return aarch64_emit_insn (buf, opcode | ENCODE (size, 2, 30) | op
+				  | post_index | ENCODE (operand.index, 9, 12)
+				  | ENCODE (rn.num, 5, 5)
+				  | ENCODE (rt.num, 5, 0));
+      }
+    case MEMORY_OPERAND_PREINDEX:
+      {
+	uint32_t pre_index = ENCODE (3, 2, 10);
+
+	op = ENCODE (0, 1, 24);
+
+	return aarch64_emit_insn (buf, opcode | ENCODE (size, 2, 30) | op
+				  | pre_index | ENCODE (operand.index, 9, 12)
+				  | ENCODE (rn.num, 5, 5)
+				  | ENCODE (rt.num, 5, 0));
+      }
+    default:
+      return 0;
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/aarch64-insn.h ./gdb/arch/aarch64-insn.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/aarch64-insn.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/aarch64-insn.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,324 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef AARCH64_INSN_H
+#define AARCH64_INSN_H 1
+
+extern int aarch64_debug;
+
+/* List of opcodes that we need for building the jump pad and relocating
+   an instruction.  */
+
+enum aarch64_opcodes
+{
+  /* B              0001 01ii iiii iiii iiii iiii iiii iiii */
+  /* BL             1001 01ii iiii iiii iiii iiii iiii iiii */
+  /* B.COND         0101 0100 iiii iiii iiii iiii iii0 cccc */
+  /* CBZ            s011 0100 iiii iiii iiii iiii iiir rrrr */
+  /* CBNZ           s011 0101 iiii iiii iiii iiii iiir rrrr */
+  /* TBZ            b011 0110 bbbb biii iiii iiii iiir rrrr */
+  /* TBNZ           b011 0111 bbbb biii iiii iiii iiir rrrr */
+  B               = 0x14000000,
+  BL              = 0x80000000 | B,
+  BCOND           = 0x40000000 | B,
+  CBZ             = 0x20000000 | B,
+  CBNZ            = 0x21000000 | B,
+  TBZ             = 0x36000000 | B,
+  TBNZ            = 0x37000000 | B,
+  /* BLR            1101 0110 0011 1111 0000 00rr rrr0 0000 */
+  BLR             = 0xd63f0000,
+  /* RET            1101 0110 0101 1111 0000 00rr rrr0 0000 */
+  RET             = 0xd65f0000,
+  /* STP            s010 100o o0ii iiii irrr rrrr rrrr rrrr */
+  /* LDP            s010 100o o1ii iiii irrr rrrr rrrr rrrr */
+  /* STP (SIMD&VFP) ss10 110o o0ii iiii irrr rrrr rrrr rrrr */
+  /* LDP (SIMD&VFP) ss10 110o o1ii iiii irrr rrrr rrrr rrrr */
+  STP             = 0x28000000,
+  LDP             = 0x28400000,
+  STP_SIMD_VFP    = 0x04000000 | STP,
+  LDP_SIMD_VFP    = 0x04000000 | LDP,
+  /* STR            ss11 100o 00xi iiii iiii xxrr rrrr rrrr */
+  /* LDR            ss11 100o 01xi iiii iiii xxrr rrrr rrrr */
+  /* LDRSW          1011 100o 10xi iiii iiii xxrr rrrr rrrr */
+  STR             = 0x38000000,
+  LDR             = 0x00400000 | STR,
+  LDRSW           = 0x80800000 | STR,
+  /* LDAXR          ss00 1000 0101 1111 1111 11rr rrrr rrrr */
+  LDAXR           = 0x085ffc00,
+  /* STXR           ss00 1000 000r rrrr 0111 11rr rrrr rrrr */
+  STXR            = 0x08007c00,
+  /* STLR           ss00 1000 1001 1111 1111 11rr rrrr rrrr */
+  STLR            = 0x089ffc00,
+  /* MOV            s101 0010 1xxi iiii iiii iiii iiir rrrr */
+  /* MOVK           s111 0010 1xxi iiii iiii iiii iiir rrrr */
+  MOV             = 0x52800000,
+  MOVK            = 0x20000000 | MOV,
+  /* ADD            s00o ooo1 xxxx xxxx xxxx xxxx xxxx xxxx */
+  /* SUB            s10o ooo1 xxxx xxxx xxxx xxxx xxxx xxxx */
+  /* SUBS           s11o ooo1 xxxx xxxx xxxx xxxx xxxx xxxx */
+  ADD             = 0x01000000,
+  SUB             = 0x40000000 | ADD,
+  SUBS            = 0x20000000 | SUB,
+  /* AND            s000 1010 xx0x xxxx xxxx xxxx xxxx xxxx */
+  /* ORR            s010 1010 xx0x xxxx xxxx xxxx xxxx xxxx */
+  /* ORN            s010 1010 xx1x xxxx xxxx xxxx xxxx xxxx */
+  /* EOR            s100 1010 xx0x xxxx xxxx xxxx xxxx xxxx */
+  AND             = 0x0a000000,
+  ORR             = 0x20000000 | AND,
+  ORN             = 0x00200000 | ORR,
+  EOR             = 0x40000000 | AND,
+  /* LSLV           s001 1010 110r rrrr 0010 00rr rrrr rrrr */
+  /* LSRV           s001 1010 110r rrrr 0010 01rr rrrr rrrr */
+  /* ASRV           s001 1010 110r rrrr 0010 10rr rrrr rrrr */
+  LSLV             = 0x1ac02000,
+  LSRV             = 0x00000400 | LSLV,
+  ASRV             = 0x00000800 | LSLV,
+  /* SBFM           s001 0011 0nii iiii iiii iirr rrrr rrrr */
+  SBFM            = 0x13000000,
+  /* UBFM           s101 0011 0nii iiii iiii iirr rrrr rrrr */
+  UBFM            = 0x40000000 | SBFM,
+  /* CSINC          s001 1010 100r rrrr cccc 01rr rrrr rrrr */
+  CSINC           = 0x9a800400,
+  /* MUL            s001 1011 000r rrrr 0111 11rr rrrr rrrr */
+  MUL             = 0x1b007c00,
+  /* MSR (register) 1101 0101 0001 oooo oooo oooo ooor rrrr */
+  /* MRS            1101 0101 0011 oooo oooo oooo ooor rrrr */
+  MSR             = 0xd5100000,
+  MRS             = 0x00200000 | MSR,
+  /* HINT           1101 0101 0000 0011 0010 oooo ooo1 1111 */
+  HINT            = 0xd503201f,
+  SEVL            = (5 << 5) | HINT,
+  WFE             = (2 << 5) | HINT,
+  NOP             = (0 << 5) | HINT,
+};
+
+/* Representation of a general purpose register of the form xN or wN.
+
+   This type is used by emitting functions that take registers as operands.  */
+
+struct aarch64_register
+{
+  unsigned num;
+  int is64;
+};
+
+enum aarch64_memory_operand_type
+{
+  MEMORY_OPERAND_OFFSET,
+  MEMORY_OPERAND_PREINDEX,
+  MEMORY_OPERAND_POSTINDEX,
+};
+
+/* Representation of a memory operand, used for load and store
+   instructions.
+
+   The types correspond to the following variants:
+
+   MEMORY_OPERAND_OFFSET:    LDR rt, [rn, #offset]
+   MEMORY_OPERAND_PREINDEX:  LDR rt, [rn, #index]!
+   MEMORY_OPERAND_POSTINDEX: LDR rt, [rn], #index  */
+
+struct aarch64_memory_operand
+{
+  /* Type of the operand.  */
+  enum aarch64_memory_operand_type type;
+
+  /* Index from the base register.  */
+  int32_t index;
+};
+
+/* Helper macro to mask and shift a value into a bitfield.  */
+
+#define ENCODE(val, size, offset) \
+  ((uint32_t) ((val & ((1ULL << size) - 1)) << offset))
+
+int aarch64_decode_adr (CORE_ADDR addr, uint32_t insn, int *is_adrp,
+			unsigned *rd, int32_t *offset);
+
+int aarch64_decode_b (CORE_ADDR addr, uint32_t insn, int *is_bl,
+		      int32_t *offset);
+
+int aarch64_decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond,
+			  int32_t *offset);
+
+int aarch64_decode_cb (CORE_ADDR addr, uint32_t insn, int *is64,
+		       int *is_cbnz, unsigned *rn, int32_t *offset);
+
+int aarch64_decode_tb (CORE_ADDR addr, uint32_t insn, int *is_tbnz,
+		       unsigned *bit, unsigned *rt, int32_t *imm);
+
+int aarch64_decode_ldr_literal (CORE_ADDR addr, uint32_t insn, int *is_w,
+				int *is64, unsigned *rt, int32_t *offset);
+
+/* Data passed to each method of aarch64_insn_visitor.  */
+
+struct aarch64_insn_data
+{
+  /* The instruction address.  */
+  CORE_ADDR insn_addr;
+};
+
+/* Visit different instructions by different methods.  */
+
+struct aarch64_insn_visitor
+{
+  /* Visit instruction B/BL OFFSET.  */
+  void (*b) (const int is_bl, const int32_t offset,
+	     struct aarch64_insn_data *data);
+
+  /* Visit instruction B.COND OFFSET.  */
+  void (*b_cond) (const unsigned cond, const int32_t offset,
+		  struct aarch64_insn_data *data);
+
+  /* Visit instruction CBZ/CBNZ Rn, OFFSET.  */
+  void (*cb) (const int32_t offset, const int is_cbnz,
+	      const unsigned rn, int is64,
+	      struct aarch64_insn_data *data);
+
+  /* Visit instruction TBZ/TBNZ Rt, #BIT, OFFSET.  */
+  void (*tb) (const int32_t offset, int is_tbnz,
+	      const unsigned rt, unsigned bit,
+	      struct aarch64_insn_data *data);
+
+  /* Visit instruction ADR/ADRP Rd, OFFSET.  */
+  void (*adr) (const int32_t offset, const unsigned rd,
+	       const int is_adrp, struct aarch64_insn_data *data);
+
+  /* Visit instruction LDR/LDRSW Rt, OFFSET.  */
+  void (*ldr_literal) (const int32_t offset, const int is_sw,
+		       const unsigned rt, const int is64,
+		       struct aarch64_insn_data *data);
+
+  /* Visit instruction INSN of other kinds.  */
+  void (*others) (const uint32_t insn, struct aarch64_insn_data *data);
+};
+
+void aarch64_relocate_instruction (uint32_t insn,
+				   const struct aarch64_insn_visitor *visitor,
+				   struct aarch64_insn_data *data);
+
+#define can_encode_int32(val, bits)			\
+  (((val) >> (bits)) == 0 || ((val) >> (bits)) == -1)
+
+/* Write a B or BL instruction into *BUF.
+
+     B  #offset
+     BL #offset
+
+   IS_BL specifies if the link register should be updated.
+   OFFSET is the immediate offset from the current PC.  It is
+   byte-addressed but should be 4 bytes aligned.  It has a limited range of
+   +/- 128MB (26 bits << 2).  */
+
+#define emit_b(buf, is_bl, offset) \
+  aarch64_emit_insn (buf, ((is_bl) ? BL : B) | (ENCODE ((offset) >> 2, 26, 0)))
+
+/* Write a BCOND instruction into *BUF.
+
+     B.COND #offset
+
+   COND specifies the condition field.
+   OFFSET is the immediate offset from the current PC.  It is
+   byte-addressed but should be 4 bytes aligned.  It has a limited range of
+   +/- 1MB (19 bits << 2).  */
+
+#define emit_bcond(buf, cond, offset)				\
+  aarch64_emit_insn (buf,					\
+		     BCOND | ENCODE ((offset) >> 2, 19, 5)	\
+		     | ENCODE ((cond), 4, 0))
+
+/* Write a CBZ or CBNZ instruction into *BUF.
+
+     CBZ  rt, #offset
+     CBNZ rt, #offset
+
+   IS_CBNZ distinguishes between CBZ and CBNZ instructions.
+   RN is the register to test.
+   OFFSET is the immediate offset from the current PC.  It is
+   byte-addressed but should be 4 bytes aligned.  It has a limited range of
+   +/- 1MB (19 bits << 2).  */
+
+#define emit_cb(buf, is_cbnz, rt, offset)			\
+  aarch64_emit_insn (buf,					\
+		     ((is_cbnz) ? CBNZ : CBZ)			\
+		     | ENCODE (rt.is64, 1, 31)  /* sf */	\
+		     | ENCODE (offset >> 2, 19, 5) /* imm19 */	\
+		     | ENCODE (rt.num, 5, 0))
+
+/* Write a LDR instruction into *BUF.
+
+     LDR rt, [rn, #offset]
+     LDR rt, [rn, #index]!
+     LDR rt, [rn], #index
+
+   RT is the register to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   0 .. 32760 range (12 bits << 3).  */
+
+#define emit_ldr(buf, rt, rn, operand) \
+  aarch64_emit_load_store (buf, rt.is64 ? 3 : 2, LDR, rt, rn, operand)
+
+/* Write a LDRSW instruction into *BUF.  The register size is 64-bit.
+
+     LDRSW xt, [rn, #offset]
+     LDRSW xt, [rn, #index]!
+     LDRSW xt, [rn], #index
+
+   RT is the register to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   0 .. 16380 range (12 bits << 2).  */
+
+#define emit_ldrsw(buf, rt, rn, operand)		\
+  aarch64_emit_load_store (buf, 3, LDRSW, rt, rn, operand)
+
+
+/* Write a TBZ or TBNZ instruction into *BUF.
+
+   TBZ  rt, #bit, #offset
+   TBNZ rt, #bit, #offset
+
+   IS_TBNZ distinguishes between TBZ and TBNZ instructions.
+   RT is the register to test.
+   BIT is the index of the bit to test in register RT.
+   OFFSET is the immediate offset from the current PC.  It is
+   byte-addressed but should be 4 bytes aligned.  It has a limited range of
+   +/- 32KB (14 bits << 2).  */
+
+#define emit_tb(buf, is_tbnz, bit, rt, offset)		       \
+  aarch64_emit_insn (buf,				       \
+		     ((is_tbnz) ? TBNZ: TBZ)		       \
+		     | ENCODE (bit >> 5, 1, 31) /* b5 */       \
+		     | ENCODE (bit, 5, 19) /* b40 */	       \
+		     | ENCODE (offset >> 2, 14, 5) /* imm14 */ \
+		     | ENCODE (rt.num, 5, 0))
+
+/* Write a NOP instruction into *BUF.  */
+
+#define emit_nop(buf) aarch64_emit_insn (buf, NOP)
+
+int aarch64_emit_insn (uint32_t *buf, uint32_t insn);
+
+int aarch64_emit_load_store (uint32_t *buf, uint32_t size,
+			     enum aarch64_opcodes opcode,
+			     struct aarch64_register rt,
+			     struct aarch64_register rn,
+			     struct aarch64_memory_operand operand);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm.c ./gdb/arch/arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,373 @@
+/* Common target dependent code for GDB on ARM systems.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "common-regcache.h"
+#include "arm.h"
+
+/* See arm.h.  */
+
+int
+thumb_insn_size (unsigned short inst1)
+{
+  if ((inst1 & 0xe000) == 0xe000 && (inst1 & 0x1800) != 0)
+    return 4;
+  else
+    return 2;
+}
+
+/* See arm.h.  */
+
+int
+bitcount (unsigned long val)
+{
+  int nbits;
+  for (nbits = 0; val != 0; nbits++)
+    val &= val - 1;		/* Delete rightmost 1-bit in val.  */
+  return nbits;
+}
+
+/* See arm.h.  */
+
+int
+condition_true (unsigned long cond, unsigned long status_reg)
+{
+  if (cond == INST_AL || cond == INST_NV)
+    return 1;
+
+  switch (cond)
+    {
+    case INST_EQ:
+      return ((status_reg & FLAG_Z) != 0);
+    case INST_NE:
+      return ((status_reg & FLAG_Z) == 0);
+    case INST_CS:
+      return ((status_reg & FLAG_C) != 0);
+    case INST_CC:
+      return ((status_reg & FLAG_C) == 0);
+    case INST_MI:
+      return ((status_reg & FLAG_N) != 0);
+    case INST_PL:
+      return ((status_reg & FLAG_N) == 0);
+    case INST_VS:
+      return ((status_reg & FLAG_V) != 0);
+    case INST_VC:
+      return ((status_reg & FLAG_V) == 0);
+    case INST_HI:
+      return ((status_reg & (FLAG_C | FLAG_Z)) == FLAG_C);
+    case INST_LS:
+      return ((status_reg & (FLAG_C | FLAG_Z)) != FLAG_C);
+    case INST_GE:
+      return (((status_reg & FLAG_N) == 0) == ((status_reg & FLAG_V) == 0));
+    case INST_LT:
+      return (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0));
+    case INST_GT:
+      return (((status_reg & FLAG_Z) == 0)
+	      && (((status_reg & FLAG_N) == 0)
+		  == ((status_reg & FLAG_V) == 0)));
+    case INST_LE:
+      return (((status_reg & FLAG_Z) != 0)
+	      || (((status_reg & FLAG_N) == 0)
+		  != ((status_reg & FLAG_V) == 0)));
+    }
+  return 1;
+}
+
+
+/* See arm.h.  */
+
+int
+thumb_advance_itstate (unsigned int itstate)
+{
+  /* Preserve IT[7:5], the first three bits of the condition.  Shift
+     the upcoming condition flags left by one bit.  */
+  itstate = (itstate & 0xe0) | ((itstate << 1) & 0x1f);
+
+  /* If we have finished the IT block, clear the state.  */
+  if ((itstate & 0x0f) == 0)
+    itstate = 0;
+
+  return itstate;
+}
+
+/* See arm.h.  */
+
+int
+arm_instruction_changes_pc (uint32_t this_instr)
+{
+  if (bits (this_instr, 28, 31) == INST_NV)
+    /* Unconditional instructions.  */
+    switch (bits (this_instr, 24, 27))
+      {
+      case 0xa:
+      case 0xb:
+	/* Branch with Link and change to Thumb.  */
+	return 1;
+      case 0xc:
+      case 0xd:
+      case 0xe:
+	/* Coprocessor register transfer.  */
+        if (bits (this_instr, 12, 15) == 15)
+	  error (_("Invalid update to pc in instruction"));
+	return 0;
+      default:
+	return 0;
+      }
+  else
+    switch (bits (this_instr, 25, 27))
+      {
+      case 0x0:
+	if (bits (this_instr, 23, 24) == 2 && bit (this_instr, 20) == 0)
+	  {
+	    /* Multiplies and extra load/stores.  */
+	    if (bit (this_instr, 4) == 1 && bit (this_instr, 7) == 1)
+	      /* Neither multiplies nor extension load/stores are allowed
+		 to modify PC.  */
+	      return 0;
+
+	    /* Otherwise, miscellaneous instructions.  */
+
+	    /* BX <reg>, BXJ <reg>, BLX <reg> */
+	    if (bits (this_instr, 4, 27) == 0x12fff1
+		|| bits (this_instr, 4, 27) == 0x12fff2
+		|| bits (this_instr, 4, 27) == 0x12fff3)
+	      return 1;
+
+	    /* Other miscellaneous instructions are unpredictable if they
+	       modify PC.  */
+	    return 0;
+	  }
+	/* Data processing instruction.  Fall through.  */
+
+      case 0x1:
+	if (bits (this_instr, 12, 15) == 15)
+	  return 1;
+	else
+	  return 0;
+
+      case 0x2:
+      case 0x3:
+	/* Media instructions and architecturally undefined instructions.  */
+	if (bits (this_instr, 25, 27) == 3 && bit (this_instr, 4) == 1)
+	  return 0;
+
+	/* Stores.  */
+	if (bit (this_instr, 20) == 0)
+	  return 0;
+
+	/* Loads.  */
+	if (bits (this_instr, 12, 15) == ARM_PC_REGNUM)
+	  return 1;
+	else
+	  return 0;
+
+      case 0x4:
+	/* Load/store multiple.  */
+	if (bit (this_instr, 20) == 1 && bit (this_instr, 15) == 1)
+	  return 1;
+	else
+	  return 0;
+
+      case 0x5:
+	/* Branch and branch with link.  */
+	return 1;
+
+      case 0x6:
+      case 0x7:
+	/* Coprocessor transfers or SWIs can not affect PC.  */
+	return 0;
+
+      default:
+	internal_error (__FILE__, __LINE__, _("bad value in switch"));
+      }
+}
+
+/* See arm.h.  */
+
+int
+thumb_instruction_changes_pc (unsigned short inst)
+{
+  if ((inst & 0xff00) == 0xbd00)	/* pop {rlist, pc} */
+    return 1;
+
+  if ((inst & 0xf000) == 0xd000)	/* conditional branch */
+    return 1;
+
+  if ((inst & 0xf800) == 0xe000)	/* unconditional branch */
+    return 1;
+
+  if ((inst & 0xff00) == 0x4700)	/* bx REG, blx REG */
+    return 1;
+
+  if ((inst & 0xff87) == 0x4687)	/* mov pc, REG */
+    return 1;
+
+  if ((inst & 0xf500) == 0xb100)	/* CBNZ or CBZ.  */
+    return 1;
+
+  return 0;
+}
+
+
+/* See arm.h.  */
+
+int
+thumb2_instruction_changes_pc (unsigned short inst1, unsigned short inst2)
+{
+  if ((inst1 & 0xf800) == 0xf000 && (inst2 & 0x8000) == 0x8000)
+    {
+      /* Branches and miscellaneous control instructions.  */
+
+      if ((inst2 & 0x1000) != 0 || (inst2 & 0xd001) == 0xc000)
+	{
+	  /* B, BL, BLX.  */
+	  return 1;
+	}
+      else if (inst1 == 0xf3de && (inst2 & 0xff00) == 0x3f00)
+	{
+	  /* SUBS PC, LR, #imm8.  */
+	  return 1;
+	}
+      else if ((inst2 & 0xd000) == 0x8000 && (inst1 & 0x0380) != 0x0380)
+	{
+	  /* Conditional branch.  */
+	  return 1;
+	}
+
+      return 0;
+    }
+
+  if ((inst1 & 0xfe50) == 0xe810)
+    {
+      /* Load multiple or RFE.  */
+
+      if (bit (inst1, 7) && !bit (inst1, 8))
+	{
+	  /* LDMIA or POP */
+	  if (bit (inst2, 15))
+	    return 1;
+	}
+      else if (!bit (inst1, 7) && bit (inst1, 8))
+	{
+	  /* LDMDB */
+	  if (bit (inst2, 15))
+	    return 1;
+	}
+      else if (bit (inst1, 7) && bit (inst1, 8))
+	{
+	  /* RFEIA */
+	  return 1;
+	}
+      else if (!bit (inst1, 7) && !bit (inst1, 8))
+	{
+	  /* RFEDB */
+	  return 1;
+	}
+
+      return 0;
+    }
+
+  if ((inst1 & 0xffef) == 0xea4f && (inst2 & 0xfff0) == 0x0f00)
+    {
+      /* MOV PC or MOVS PC.  */
+      return 1;
+    }
+
+  if ((inst1 & 0xff70) == 0xf850 && (inst2 & 0xf000) == 0xf000)
+    {
+      /* LDR PC.  */
+      if (bits (inst1, 0, 3) == 15)
+	return 1;
+      if (bit (inst1, 7))
+	return 1;
+      if (bit (inst2, 11))
+	return 1;
+      if ((inst2 & 0x0fc0) == 0x0000)
+	return 1;
+
+      return 0;
+    }
+
+  if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf000)
+    {
+      /* TBB.  */
+      return 1;
+    }
+
+  if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf010)
+    {
+      /* TBH.  */
+      return 1;
+    }
+
+  return 0;
+}
+
+/* See arm.h.  */
+
+unsigned long
+shifted_reg_val (struct regcache *regcache, unsigned long inst,
+		 int carry, unsigned long pc_val, unsigned long status_reg)
+{
+  unsigned long res, shift;
+  int rm = bits (inst, 0, 3);
+  unsigned long shifttype = bits (inst, 5, 6);
+
+  if (bit (inst, 4))
+    {
+      int rs = bits (inst, 8, 11);
+      shift = (rs == 15
+	       ? pc_val + 8
+	       : regcache_raw_get_unsigned (regcache, rs)) & 0xFF;
+    }
+  else
+    shift = bits (inst, 7, 11);
+
+  res = (rm == ARM_PC_REGNUM
+	 ? (pc_val + (bit (inst, 4) ? 12 : 8))
+	 : regcache_raw_get_unsigned (regcache, rm));
+
+  switch (shifttype)
+    {
+    case 0:			/* LSL */
+      res = shift >= 32 ? 0 : res << shift;
+      break;
+
+    case 1:			/* LSR */
+      res = shift >= 32 ? 0 : res >> shift;
+      break;
+
+    case 2:			/* ASR */
+      if (shift >= 32)
+	shift = 31;
+      res = ((res & 0x80000000L)
+	     ? ~((~res) >> shift) : res >> shift);
+      break;
+
+    case 3:			/* ROR/RRX */
+      shift &= 31;
+      if (shift == 0)
+	res = (res >> 1) | (carry ? 0x80000000L : 0);
+      else
+	res = (res >> shift) | (res << (32 - shift));
+      break;
+    }
+
+  return res & 0xffffffff;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-get-next-pcs.c ./gdb/arch/arm-get-next-pcs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-get-next-pcs.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm-get-next-pcs.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,938 @@
+/* Common code for ARM software single stepping support.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "gdb_vecs.h"
+#include "common-regcache.h"
+#include "arm.h"
+#include "arm-get-next-pcs.h"
+
+/* See arm-get-next-pcs.h.  */
+
+void
+arm_get_next_pcs_ctor (struct arm_get_next_pcs *self,
+		       struct arm_get_next_pcs_ops *ops,
+		       int byte_order,
+		       int byte_order_for_code,
+		       int has_thumb2_breakpoint,
+		       struct regcache *regcache)
+{
+  self->ops = ops;
+  self->byte_order = byte_order;
+  self->byte_order_for_code = byte_order_for_code;
+  self->has_thumb2_breakpoint = has_thumb2_breakpoint;
+  self->regcache = regcache;
+}
+
+/* Checks for an atomic sequence of instructions beginning with a LDREX{,B,H,D}
+   instruction and ending with a STREX{,B,H,D} instruction.  If such a sequence
+   is found, attempt to step through it.  The end of the sequence address is
+   added to the next_pcs list.  */
+
+static VEC (CORE_ADDR) *
+thumb_deal_with_atomic_sequence_raw (struct arm_get_next_pcs *self)
+{
+  int byte_order_for_code = self->byte_order_for_code;
+  CORE_ADDR breaks[2] = {-1, -1};
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  CORE_ADDR loc = pc;
+  unsigned short insn1, insn2;
+  int insn_count;
+  int index;
+  int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */
+  const int atomic_sequence_length = 16; /* Instruction sequence length.  */
+  ULONGEST status, itstate;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  /* We currently do not support atomic sequences within an IT block.  */
+  status = regcache_raw_get_unsigned (self->regcache, ARM_PS_REGNUM);
+  itstate = ((status >> 8) & 0xfc) | ((status >> 25) & 0x3);
+  if (itstate & 0x0f)
+    return NULL;
+
+  /* Assume all atomic sequences start with a ldrex{,b,h,d} instruction.  */
+  insn1 = self->ops->read_mem_uint (loc, 2, byte_order_for_code);
+
+  loc += 2;
+  if (thumb_insn_size (insn1) != 4)
+    return NULL;
+
+  insn2 = self->ops->read_mem_uint (loc, 2, byte_order_for_code);
+
+  loc += 2;
+  if (!((insn1 & 0xfff0) == 0xe850
+        || ((insn1 & 0xfff0) == 0xe8d0 && (insn2 & 0x00c0) == 0x0040)))
+    return NULL;
+
+  /* Assume that no atomic sequence is longer than "atomic_sequence_length"
+     instructions.  */
+  for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
+    {
+      insn1 = self->ops->read_mem_uint (loc, 2,byte_order_for_code);
+      loc += 2;
+
+      if (thumb_insn_size (insn1) != 4)
+	{
+	  /* Assume that there is at most one conditional branch in the
+	     atomic sequence.  If a conditional branch is found, put a
+	     breakpoint in its destination address.  */
+	  if ((insn1 & 0xf000) == 0xd000 && bits (insn1, 8, 11) != 0x0f)
+	    {
+	      if (last_breakpoint > 0)
+		return NULL; /* More than one conditional branch found,
+			     fallback to the standard code.  */
+
+	      breaks[1] = loc + 2 + (sbits (insn1, 0, 7) << 1);
+	      last_breakpoint++;
+	    }
+
+	  /* We do not support atomic sequences that use any *other*
+	     instructions but conditional branches to change the PC.
+	     Fall back to standard code to avoid losing control of
+	     execution.  */
+	  else if (thumb_instruction_changes_pc (insn1))
+	    return NULL;
+	}
+      else
+	{
+	  insn2 = self->ops->read_mem_uint (loc, 2, byte_order_for_code);
+
+	  loc += 2;
+
+	  /* Assume that there is at most one conditional branch in the
+	     atomic sequence.  If a conditional branch is found, put a
+	     breakpoint in its destination address.  */
+	  if ((insn1 & 0xf800) == 0xf000
+	      && (insn2 & 0xd000) == 0x8000
+	      && (insn1 & 0x0380) != 0x0380)
+	    {
+	      int sign, j1, j2, imm1, imm2;
+	      unsigned int offset;
+
+	      sign = sbits (insn1, 10, 10);
+	      imm1 = bits (insn1, 0, 5);
+	      imm2 = bits (insn2, 0, 10);
+	      j1 = bit (insn2, 13);
+	      j2 = bit (insn2, 11);
+
+	      offset = (sign << 20) + (j2 << 19) + (j1 << 18);
+	      offset += (imm1 << 12) + (imm2 << 1);
+
+	      if (last_breakpoint > 0)
+		return 0; /* More than one conditional branch found,
+			     fallback to the standard code.  */
+
+	      breaks[1] = loc + offset;
+	      last_breakpoint++;
+	    }
+
+	  /* We do not support atomic sequences that use any *other*
+	     instructions but conditional branches to change the PC.
+	     Fall back to standard code to avoid losing control of
+	     execution.  */
+	  else if (thumb2_instruction_changes_pc (insn1, insn2))
+	    return NULL;
+
+	  /* If we find a strex{,b,h,d}, we're done.  */
+	  if ((insn1 & 0xfff0) == 0xe840
+	      || ((insn1 & 0xfff0) == 0xe8c0 && (insn2 & 0x00c0) == 0x0040))
+	    break;
+	}
+    }
+
+  /* If we didn't find the strex{,b,h,d}, we cannot handle the sequence.  */
+  if (insn_count == atomic_sequence_length)
+    return NULL;
+
+  /* Insert a breakpoint right after the end of the atomic sequence.  */
+  breaks[0] = loc;
+
+  /* Check for duplicated breakpoints.  Check also for a breakpoint
+     placed (branch instruction's destination) anywhere in sequence.  */
+  if (last_breakpoint
+      && (breaks[1] == breaks[0]
+	  || (breaks[1] >= pc && breaks[1] < loc)))
+    last_breakpoint = 0;
+
+  /* Adds the breakpoints to the list to be inserted.  */
+  for (index = 0; index <= last_breakpoint; index++)
+    VEC_safe_push (CORE_ADDR, next_pcs, MAKE_THUMB_ADDR (breaks[index]));
+
+  return next_pcs;
+}
+
+/* Checks for an atomic sequence of instructions beginning with a LDREX{,B,H,D}
+   instruction and ending with a STREX{,B,H,D} instruction.  If such a sequence
+   is found, attempt to step through it.  The end of the sequence address is
+   added to the next_pcs list.  */
+
+static VEC (CORE_ADDR) *
+arm_deal_with_atomic_sequence_raw (struct arm_get_next_pcs *self)
+{
+  int byte_order_for_code = self->byte_order_for_code;
+  CORE_ADDR breaks[2] = {-1, -1};
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  CORE_ADDR loc = pc;
+  unsigned int insn;
+  int insn_count;
+  int index;
+  int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */
+  const int atomic_sequence_length = 16; /* Instruction sequence length.  */
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  /* Assume all atomic sequences start with a ldrex{,b,h,d} instruction.
+     Note that we do not currently support conditionally executed atomic
+     instructions.  */
+  insn = self->ops->read_mem_uint (loc, 4, byte_order_for_code);
+
+  loc += 4;
+  if ((insn & 0xff9000f0) != 0xe1900090)
+    return NULL;
+
+  /* Assume that no atomic sequence is longer than "atomic_sequence_length"
+     instructions.  */
+  for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
+    {
+      insn = self->ops->read_mem_uint (loc, 4, byte_order_for_code);
+
+      loc += 4;
+
+      /* Assume that there is at most one conditional branch in the atomic
+         sequence.  If a conditional branch is found, put a breakpoint in
+         its destination address.  */
+      if (bits (insn, 24, 27) == 0xa)
+	{
+          if (last_breakpoint > 0)
+            return NULL; /* More than one conditional branch found, fallback
+                         to the standard single-step code.  */
+
+	  breaks[1] = BranchDest (loc - 4, insn);
+	  last_breakpoint++;
+        }
+
+      /* We do not support atomic sequences that use any *other* instructions
+         but conditional branches to change the PC.  Fall back to standard
+	 code to avoid losing control of execution.  */
+      else if (arm_instruction_changes_pc (insn))
+	return NULL;
+
+      /* If we find a strex{,b,h,d}, we're done.  */
+      if ((insn & 0xff9000f0) == 0xe1800090)
+	break;
+    }
+
+  /* If we didn't find the strex{,b,h,d}, we cannot handle the sequence.  */
+  if (insn_count == atomic_sequence_length)
+    return NULL;
+
+  /* Insert a breakpoint right after the end of the atomic sequence.  */
+  breaks[0] = loc;
+
+  /* Check for duplicated breakpoints.  Check also for a breakpoint
+     placed (branch instruction's destination) anywhere in sequence.  */
+  if (last_breakpoint
+      && (breaks[1] == breaks[0]
+	  || (breaks[1] >= pc && breaks[1] < loc)))
+    last_breakpoint = 0;
+
+  /* Adds the breakpoints to the list to be inserted.  */
+  for (index = 0; index <= last_breakpoint; index++)
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
+
+  return next_pcs;
+}
+
+/* Find the next possible PCs for thumb mode.  */
+
+static VEC (CORE_ADDR) *
+thumb_get_next_pcs_raw (struct arm_get_next_pcs *self)
+{
+  int byte_order = self->byte_order;
+  int byte_order_for_code = self->byte_order_for_code;
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  unsigned long pc_val = ((unsigned long) pc) + 4;	/* PC after prefetch */
+  unsigned short inst1;
+  CORE_ADDR nextpc = pc + 2;		/* Default is next instruction.  */
+  unsigned long offset;
+  ULONGEST status, itstate;
+  struct regcache *regcache = self->regcache;
+  VEC (CORE_ADDR) * next_pcs = NULL;
+
+  nextpc = MAKE_THUMB_ADDR (nextpc);
+  pc_val = MAKE_THUMB_ADDR (pc_val);
+
+  inst1 = self->ops->read_mem_uint (pc, 2, byte_order_for_code);
+
+  /* Thumb-2 conditional execution support.  There are eight bits in
+     the CPSR which describe conditional execution state.  Once
+     reconstructed (they're in a funny order), the low five bits
+     describe the low bit of the condition for each instruction and
+     how many instructions remain.  The high three bits describe the
+     base condition.  One of the low four bits will be set if an IT
+     block is active.  These bits read as zero on earlier
+     processors.  */
+  status = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
+  itstate = ((status >> 8) & 0xfc) | ((status >> 25) & 0x3);
+
+  /* If-Then handling.  On GNU/Linux, where this routine is used, we
+     use an undefined instruction as a breakpoint.  Unlike BKPT, IT
+     can disable execution of the undefined instruction.  So we might
+     miss the breakpoint if we set it on a skipped conditional
+     instruction.  Because conditional instructions can change the
+     flags, affecting the execution of further instructions, we may
+     need to set two breakpoints.  */
+
+  if (self->has_thumb2_breakpoint)
+    {
+      if ((inst1 & 0xff00) == 0xbf00 && (inst1 & 0x000f) != 0)
+	{
+	  /* An IT instruction.  Because this instruction does not
+	     modify the flags, we can accurately predict the next
+	     executed instruction.  */
+	  itstate = inst1 & 0x00ff;
+	  pc += thumb_insn_size (inst1);
+
+	  while (itstate != 0 && ! condition_true (itstate >> 4, status))
+	    {
+	      inst1 = self->ops->read_mem_uint (pc, 2,byte_order_for_code);
+	      pc += thumb_insn_size (inst1);
+	      itstate = thumb_advance_itstate (itstate);
+	    }
+
+	  VEC_safe_push (CORE_ADDR, next_pcs, MAKE_THUMB_ADDR (pc));
+	  return next_pcs;
+	}
+      else if (itstate != 0)
+	{
+	  /* We are in a conditional block.  Check the condition.  */
+	  if (! condition_true (itstate >> 4, status))
+	    {
+	      /* Advance to the next executed instruction.  */
+	      pc += thumb_insn_size (inst1);
+	      itstate = thumb_advance_itstate (itstate);
+
+	      while (itstate != 0 && ! condition_true (itstate >> 4, status))
+		{
+		  inst1 = self->ops->read_mem_uint (pc, 2, byte_order_for_code);
+
+		  pc += thumb_insn_size (inst1);
+		  itstate = thumb_advance_itstate (itstate);
+		}
+
+	      VEC_safe_push (CORE_ADDR, next_pcs, MAKE_THUMB_ADDR (pc));
+	      return next_pcs;
+	    }
+	  else if ((itstate & 0x0f) == 0x08)
+	    {
+	      /* This is the last instruction of the conditional
+		 block, and it is executed.  We can handle it normally
+		 because the following instruction is not conditional,
+		 and we must handle it normally because it is
+		 permitted to branch.  Fall through.  */
+	    }
+	  else
+	    {
+	      int cond_negated;
+
+	      /* There are conditional instructions after this one.
+		 If this instruction modifies the flags, then we can
+		 not predict what the next executed instruction will
+		 be.  Fortunately, this instruction is architecturally
+		 forbidden to branch; we know it will fall through.
+		 Start by skipping past it.  */
+	      pc += thumb_insn_size (inst1);
+	      itstate = thumb_advance_itstate (itstate);
+
+	      /* Set a breakpoint on the following instruction.  */
+	      gdb_assert ((itstate & 0x0f) != 0);
+	      VEC_safe_push (CORE_ADDR, next_pcs, MAKE_THUMB_ADDR (pc));
+
+	      cond_negated = (itstate >> 4) & 1;
+
+	      /* Skip all following instructions with the same
+		 condition.  If there is a later instruction in the IT
+		 block with the opposite condition, set the other
+		 breakpoint there.  If not, then set a breakpoint on
+		 the instruction after the IT block.  */
+	      do
+		{
+		  inst1 = self->ops->read_mem_uint (pc, 2, byte_order_for_code);
+		  pc += thumb_insn_size (inst1);
+		  itstate = thumb_advance_itstate (itstate);
+		}
+	      while (itstate != 0 && ((itstate >> 4) & 1) == cond_negated);
+
+	      VEC_safe_push (CORE_ADDR, next_pcs, MAKE_THUMB_ADDR (pc));
+
+	      return next_pcs;
+	    }
+	}
+    }
+  else if (itstate & 0x0f)
+    {
+      /* We are in a conditional block.  Check the condition.  */
+      int cond = itstate >> 4;
+
+      if (! condition_true (cond, status))
+	{
+	  /* Advance to the next instruction.  All the 32-bit
+	     instructions share a common prefix.  */
+	  VEC_safe_push (CORE_ADDR, next_pcs,
+			 MAKE_THUMB_ADDR (pc + thumb_insn_size (inst1)));
+	}
+
+      return next_pcs;
+
+      /* Otherwise, handle the instruction normally.  */
+    }
+
+  if ((inst1 & 0xff00) == 0xbd00)	/* pop {rlist, pc} */
+    {
+      CORE_ADDR sp;
+
+      /* Fetch the saved PC from the stack.  It's stored above
+         all of the other registers.  */
+      offset = bitcount (bits (inst1, 0, 7)) * INT_REGISTER_SIZE;
+      sp = regcache_raw_get_unsigned (regcache, ARM_SP_REGNUM);
+      nextpc = self->ops->read_mem_uint (sp + offset, 4, byte_order);
+    }
+  else if ((inst1 & 0xf000) == 0xd000)	/* conditional branch */
+    {
+      unsigned long cond = bits (inst1, 8, 11);
+      if (cond == 0x0f)  /* 0x0f = SWI */
+	{
+	  nextpc = self->ops->syscall_next_pc (self);
+	}
+      else if (cond != 0x0f && condition_true (cond, status))
+	nextpc = pc_val + (sbits (inst1, 0, 7) << 1);
+    }
+  else if ((inst1 & 0xf800) == 0xe000)	/* unconditional branch */
+    {
+      nextpc = pc_val + (sbits (inst1, 0, 10) << 1);
+    }
+  else if (thumb_insn_size (inst1) == 4) /* 32-bit instruction */
+    {
+      unsigned short inst2;
+      inst2 = self->ops->read_mem_uint (pc + 2, 2, byte_order_for_code);
+
+      /* Default to the next instruction.  */
+      nextpc = pc + 4;
+      nextpc = MAKE_THUMB_ADDR (nextpc);
+
+      if ((inst1 & 0xf800) == 0xf000 && (inst2 & 0x8000) == 0x8000)
+	{
+	  /* Branches and miscellaneous control instructions.  */
+
+	  if ((inst2 & 0x1000) != 0 || (inst2 & 0xd001) == 0xc000)
+	    {
+	      /* B, BL, BLX.  */
+	      int j1, j2, imm1, imm2;
+
+	      imm1 = sbits (inst1, 0, 10);
+	      imm2 = bits (inst2, 0, 10);
+	      j1 = bit (inst2, 13);
+	      j2 = bit (inst2, 11);
+
+	      offset = ((imm1 << 12) + (imm2 << 1));
+	      offset ^= ((!j2) << 22) | ((!j1) << 23);
+
+	      nextpc = pc_val + offset;
+	      /* For BLX make sure to clear the low bits.  */
+	      if (bit (inst2, 12) == 0)
+		nextpc = nextpc & 0xfffffffc;
+	    }
+	  else if (inst1 == 0xf3de && (inst2 & 0xff00) == 0x3f00)
+	    {
+	      /* SUBS PC, LR, #imm8.  */
+	      nextpc = regcache_raw_get_unsigned (regcache, ARM_LR_REGNUM);
+	      nextpc -= inst2 & 0x00ff;
+	    }
+	  else if ((inst2 & 0xd000) == 0x8000 && (inst1 & 0x0380) != 0x0380)
+	    {
+	      /* Conditional branch.  */
+	      if (condition_true (bits (inst1, 6, 9), status))
+		{
+		  int sign, j1, j2, imm1, imm2;
+
+		  sign = sbits (inst1, 10, 10);
+		  imm1 = bits (inst1, 0, 5);
+		  imm2 = bits (inst2, 0, 10);
+		  j1 = bit (inst2, 13);
+		  j2 = bit (inst2, 11);
+
+		  offset = (sign << 20) + (j2 << 19) + (j1 << 18);
+		  offset += (imm1 << 12) + (imm2 << 1);
+
+		  nextpc = pc_val + offset;
+		}
+	    }
+	}
+      else if ((inst1 & 0xfe50) == 0xe810)
+	{
+	  /* Load multiple or RFE.  */
+	  int rn, offset, load_pc = 1;
+
+	  rn = bits (inst1, 0, 3);
+	  if (bit (inst1, 7) && !bit (inst1, 8))
+	    {
+	      /* LDMIA or POP */
+	      if (!bit (inst2, 15))
+		load_pc = 0;
+	      offset = bitcount (inst2) * 4 - 4;
+	    }
+	  else if (!bit (inst1, 7) && bit (inst1, 8))
+	    {
+	      /* LDMDB */
+	      if (!bit (inst2, 15))
+		load_pc = 0;
+	      offset = -4;
+	    }
+	  else if (bit (inst1, 7) && bit (inst1, 8))
+	    {
+	      /* RFEIA */
+	      offset = 0;
+	    }
+	  else if (!bit (inst1, 7) && !bit (inst1, 8))
+	    {
+	      /* RFEDB */
+	      offset = -8;
+	    }
+	  else
+	    load_pc = 0;
+
+	  if (load_pc)
+	    {
+	      CORE_ADDR addr = regcache_raw_get_unsigned (regcache, rn);
+	      nextpc = self->ops->read_mem_uint	(addr + offset, 4, byte_order);
+	    }
+	}
+      else if ((inst1 & 0xffef) == 0xea4f && (inst2 & 0xfff0) == 0x0f00)
+	{
+	  /* MOV PC or MOVS PC.  */
+	  nextpc = regcache_raw_get_unsigned (regcache, bits (inst2, 0, 3));
+	  nextpc = MAKE_THUMB_ADDR (nextpc);
+	}
+      else if ((inst1 & 0xff70) == 0xf850 && (inst2 & 0xf000) == 0xf000)
+	{
+	  /* LDR PC.  */
+	  CORE_ADDR base;
+	  int rn, load_pc = 1;
+
+	  rn = bits (inst1, 0, 3);
+	  base = regcache_raw_get_unsigned (regcache, rn);
+	  if (rn == ARM_PC_REGNUM)
+	    {
+	      base = (base + 4) & ~(CORE_ADDR) 0x3;
+	      if (bit (inst1, 7))
+		base += bits (inst2, 0, 11);
+	      else
+		base -= bits (inst2, 0, 11);
+	    }
+	  else if (bit (inst1, 7))
+	    base += bits (inst2, 0, 11);
+	  else if (bit (inst2, 11))
+	    {
+	      if (bit (inst2, 10))
+		{
+		  if (bit (inst2, 9))
+		    base += bits (inst2, 0, 7);
+		  else
+		    base -= bits (inst2, 0, 7);
+		}
+	    }
+	  else if ((inst2 & 0x0fc0) == 0x0000)
+	    {
+	      int shift = bits (inst2, 4, 5), rm = bits (inst2, 0, 3);
+	      base += regcache_raw_get_unsigned (regcache, rm) << shift;
+	    }
+	  else
+	    /* Reserved.  */
+	    load_pc = 0;
+
+	  if (load_pc)
+	    nextpc
+	      = self->ops->read_mem_uint (base, 4, byte_order);
+	}
+      else if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf000)
+	{
+	  /* TBB.  */
+	  CORE_ADDR tbl_reg, table, offset, length;
+
+	  tbl_reg = bits (inst1, 0, 3);
+	  if (tbl_reg == 0x0f)
+	    table = pc + 4;  /* Regcache copy of PC isn't right yet.  */
+	  else
+	    table = regcache_raw_get_unsigned (regcache, tbl_reg);
+
+	  offset = regcache_raw_get_unsigned (regcache, bits (inst2, 0, 3));
+	  length = 2 * self->ops->read_mem_uint (table + offset, 1, byte_order);
+	  nextpc = pc_val + length;
+	}
+      else if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf010)
+	{
+	  /* TBH.  */
+	  CORE_ADDR tbl_reg, table, offset, length;
+
+	  tbl_reg = bits (inst1, 0, 3);
+	  if (tbl_reg == 0x0f)
+	    table = pc + 4;  /* Regcache copy of PC isn't right yet.  */
+	  else
+	    table = regcache_raw_get_unsigned (regcache, tbl_reg);
+
+	  offset = 2 * regcache_raw_get_unsigned (regcache, bits (inst2, 0, 3));
+	  length = 2 * self->ops->read_mem_uint (table + offset, 2, byte_order);
+	  nextpc = pc_val + length;
+	}
+    }
+  else if ((inst1 & 0xff00) == 0x4700)	/* bx REG, blx REG */
+    {
+      if (bits (inst1, 3, 6) == 0x0f)
+	nextpc = UNMAKE_THUMB_ADDR (pc_val);
+      else
+	nextpc = regcache_raw_get_unsigned (regcache, bits (inst1, 3, 6));
+    }
+  else if ((inst1 & 0xff87) == 0x4687)	/* mov pc, REG */
+    {
+      if (bits (inst1, 3, 6) == 0x0f)
+	nextpc = pc_val;
+      else
+	nextpc = regcache_raw_get_unsigned (regcache, bits (inst1, 3, 6));
+
+      nextpc = MAKE_THUMB_ADDR (nextpc);
+    }
+  else if ((inst1 & 0xf500) == 0xb100)
+    {
+      /* CBNZ or CBZ.  */
+      int imm = (bit (inst1, 9) << 6) + (bits (inst1, 3, 7) << 1);
+      ULONGEST reg = regcache_raw_get_unsigned (regcache, bits (inst1, 0, 2));
+
+      if (bit (inst1, 11) && reg != 0)
+	nextpc = pc_val + imm;
+      else if (!bit (inst1, 11) && reg == 0)
+	nextpc = pc_val + imm;
+    }
+
+  VEC_safe_push (CORE_ADDR, next_pcs, nextpc);
+
+  return next_pcs;
+}
+
+/* Get the raw next possible addresses.  PC in next_pcs is the current program
+   counter, which is assumed to be executing in ARM mode.
+
+   The values returned have the execution state of the next instruction
+   encoded in it.  Use IS_THUMB_ADDR () to see whether the instruction is
+   in Thumb-State, and gdbarch_addr_bits_remove () to get the plain memory
+   address in GDB and arm_addr_bits_remove in GDBServer.  */
+
+static VEC (CORE_ADDR) *
+arm_get_next_pcs_raw (struct arm_get_next_pcs *self)
+{
+  int byte_order = self->byte_order;
+  int byte_order_for_code = self->byte_order_for_code;
+  unsigned long pc_val;
+  unsigned long this_instr = 0;
+  unsigned long status;
+  CORE_ADDR nextpc;
+  struct regcache *regcache = self->regcache;
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  pc_val = (unsigned long) pc;
+  this_instr = self->ops->read_mem_uint (pc, 4, byte_order_for_code);
+
+  status = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
+  nextpc = (CORE_ADDR) (pc_val + 4);	/* Default case */
+
+  if (bits (this_instr, 28, 31) == INST_NV)
+    switch (bits (this_instr, 24, 27))
+      {
+      case 0xa:
+      case 0xb:
+	{
+	  /* Branch with Link and change to Thumb.  */
+	  nextpc = BranchDest (pc, this_instr);
+	  nextpc |= bit (this_instr, 24) << 1;
+	  nextpc = MAKE_THUMB_ADDR (nextpc);
+	  break;
+	}
+      case 0xc:
+      case 0xd:
+      case 0xe:
+	/* Coprocessor register transfer.  */
+        if (bits (this_instr, 12, 15) == 15)
+	  error (_("Invalid update to pc in instruction"));
+	break;
+      }
+  else if (condition_true (bits (this_instr, 28, 31), status))
+    {
+      switch (bits (this_instr, 24, 27))
+	{
+	case 0x0:
+	case 0x1:			/* data processing */
+	case 0x2:
+	case 0x3:
+	  {
+	    unsigned long operand1, operand2, result = 0;
+	    unsigned long rn;
+	    int c;
+
+	    if (bits (this_instr, 12, 15) != 15)
+	      break;
+
+	    if (bits (this_instr, 22, 25) == 0
+		&& bits (this_instr, 4, 7) == 9)	/* multiply */
+	      error (_("Invalid update to pc in instruction"));
+
+	    /* BX <reg>, BLX <reg> */
+	    if (bits (this_instr, 4, 27) == 0x12fff1
+		|| bits (this_instr, 4, 27) == 0x12fff3)
+	      {
+		rn = bits (this_instr, 0, 3);
+		nextpc = ((rn == ARM_PC_REGNUM)
+			  ? (pc_val + 8)
+			  : regcache_raw_get_unsigned (regcache, rn));
+
+		VEC_safe_push (CORE_ADDR, next_pcs, nextpc);
+		return next_pcs;
+	      }
+
+	    /* Multiply into PC.  */
+	    c = (status & FLAG_C) ? 1 : 0;
+	    rn = bits (this_instr, 16, 19);
+	    operand1 = ((rn == ARM_PC_REGNUM)
+			? (pc_val + 8)
+			: regcache_raw_get_unsigned (regcache, rn));
+
+	    if (bit (this_instr, 25))
+	      {
+		unsigned long immval = bits (this_instr, 0, 7);
+		unsigned long rotate = 2 * bits (this_instr, 8, 11);
+		operand2 = ((immval >> rotate) | (immval << (32 - rotate)))
+		  & 0xffffffff;
+	      }
+	    else		/* operand 2 is a shifted register.  */
+	      operand2 = shifted_reg_val (regcache, this_instr, c,
+					  pc_val, status);
+
+	    switch (bits (this_instr, 21, 24))
+	      {
+	      case 0x0:	/*and */
+		result = operand1 & operand2;
+		break;
+
+	      case 0x1:	/*eor */
+		result = operand1 ^ operand2;
+		break;
+
+	      case 0x2:	/*sub */
+		result = operand1 - operand2;
+		break;
+
+	      case 0x3:	/*rsb */
+		result = operand2 - operand1;
+		break;
+
+	      case 0x4:	/*add */
+		result = operand1 + operand2;
+		break;
+
+	      case 0x5:	/*adc */
+		result = operand1 + operand2 + c;
+		break;
+
+	      case 0x6:	/*sbc */
+		result = operand1 - operand2 + c;
+		break;
+
+	      case 0x7:	/*rsc */
+		result = operand2 - operand1 + c;
+		break;
+
+	      case 0x8:
+	      case 0x9:
+	      case 0xa:
+	      case 0xb:	/* tst, teq, cmp, cmn */
+		result = (unsigned long) nextpc;
+		break;
+
+	      case 0xc:	/*orr */
+		result = operand1 | operand2;
+		break;
+
+	      case 0xd:	/*mov */
+		/* Always step into a function.  */
+		result = operand2;
+		break;
+
+	      case 0xe:	/*bic */
+		result = operand1 & ~operand2;
+		break;
+
+	      case 0xf:	/*mvn */
+		result = ~operand2;
+		break;
+	      }
+	      nextpc = self->ops->addr_bits_remove (self, result);
+	    break;
+	  }
+
+	case 0x4:
+	case 0x5:		/* data transfer */
+	case 0x6:
+	case 0x7:
+	  if (bits (this_instr, 25, 27) == 0x3 && bit (this_instr, 4) == 1)
+	    {
+	      /* Media instructions and architecturally undefined
+		 instructions.  */
+	      break;
+	    }
+
+	  if (bit (this_instr, 20))
+	    {
+	      /* load */
+	      if (bits (this_instr, 12, 15) == 15)
+		{
+		  /* rd == pc */
+		  unsigned long rn;
+		  unsigned long base;
+
+		  if (bit (this_instr, 22))
+		    error (_("Invalid update to pc in instruction"));
+
+		  /* byte write to PC */
+		  rn = bits (this_instr, 16, 19);
+		  base = ((rn == ARM_PC_REGNUM)
+			  ? (pc_val + 8)
+			  : regcache_raw_get_unsigned (regcache, rn));
+
+		  if (bit (this_instr, 24))
+		    {
+		      /* pre-indexed */
+		      int c = (status & FLAG_C) ? 1 : 0;
+		      unsigned long offset =
+		      (bit (this_instr, 25)
+		       ? shifted_reg_val (regcache, this_instr, c,
+					  pc_val, status)
+		       : bits (this_instr, 0, 11));
+
+		      if (bit (this_instr, 23))
+			base += offset;
+		      else
+			base -= offset;
+		    }
+		  nextpc
+		    = (CORE_ADDR) self->ops->read_mem_uint ((CORE_ADDR) base,
+							    4, byte_order);
+		}
+	    }
+	  break;
+
+	case 0x8:
+	case 0x9:		/* block transfer */
+	  if (bit (this_instr, 20))
+	    {
+	      /* LDM */
+	      if (bit (this_instr, 15))
+		{
+		  /* loading pc */
+		  int offset = 0;
+		  CORE_ADDR rn_val_offset = 0;
+		  unsigned long rn_val
+		    = regcache_raw_get_unsigned (regcache,
+						 bits (this_instr, 16, 19));
+
+		  if (bit (this_instr, 23))
+		    {
+		      /* up */
+		      unsigned long reglist = bits (this_instr, 0, 14);
+		      offset = bitcount (reglist) * 4;
+		      if (bit (this_instr, 24))		/* pre */
+			offset += 4;
+		    }
+		  else if (bit (this_instr, 24))
+		    offset = -4;
+
+		  rn_val_offset = rn_val + offset;
+		  nextpc = (CORE_ADDR) self->ops->read_mem_uint (rn_val_offset,
+								 4, byte_order);
+		}
+	    }
+	  break;
+
+	case 0xb:		/* branch & link */
+	case 0xa:		/* branch */
+	  {
+	    nextpc = BranchDest (pc, this_instr);
+	    break;
+	  }
+
+	case 0xc:
+	case 0xd:
+	case 0xe:		/* coproc ops */
+	  break;
+	case 0xf:		/* SWI */
+	  {
+	    nextpc = self->ops->syscall_next_pc (self);
+	  }
+	  break;
+
+	default:
+	  error (_("Bad bit-field extraction"));
+	  return next_pcs;
+	}
+    }
+
+  VEC_safe_push (CORE_ADDR, next_pcs, nextpc);
+  return next_pcs;
+}
+
+/* See arm-get-next-pcs.h.  */
+
+VEC (CORE_ADDR) *
+arm_get_next_pcs (struct arm_get_next_pcs *self)
+{
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  if (self->ops->is_thumb (self))
+    {
+      next_pcs = thumb_deal_with_atomic_sequence_raw (self);
+      if (next_pcs == NULL)
+	next_pcs = thumb_get_next_pcs_raw (self);
+    }
+  else
+    {
+      next_pcs = arm_deal_with_atomic_sequence_raw (self);
+      if (next_pcs == NULL)
+	next_pcs = arm_get_next_pcs_raw (self);
+    }
+
+  if (self->ops->fixup != NULL)
+    {
+      CORE_ADDR nextpc;
+      int i;
+
+      for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, nextpc); i++)
+	{
+	  nextpc = self->ops->fixup (self, nextpc);
+	  VEC_replace (CORE_ADDR, next_pcs, i, nextpc);
+	}
+    }
+  return next_pcs;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-get-next-pcs.h ./gdb/arch/arm-get-next-pcs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-get-next-pcs.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm-get-next-pcs.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,66 @@
+/* Common code for ARM software single stepping support.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef ARM_GET_NEXT_PCS_H
+#define ARM_GET_NEXT_PCS_H 1
+#include "gdb_vecs.h"
+
+/* Forward declaration.  */
+struct arm_get_next_pcs;
+
+/* get_next_pcs operations.  */
+struct arm_get_next_pcs_ops
+{
+  ULONGEST (*read_mem_uint) (CORE_ADDR memaddr, int len, int byte_order);
+  CORE_ADDR (*syscall_next_pc) (struct arm_get_next_pcs *self);
+  CORE_ADDR (*addr_bits_remove) (struct arm_get_next_pcs *self, CORE_ADDR val);
+  int (*is_thumb) (struct arm_get_next_pcs *self);
+
+  /* Fix up PC if needed.  */
+  CORE_ADDR (*fixup) (struct arm_get_next_pcs *self, CORE_ADDR pc);
+};
+
+/* Context for a get_next_pcs call on ARM.  */
+struct arm_get_next_pcs
+{
+  /* Operations implementations.  */
+  struct arm_get_next_pcs_ops *ops;
+  /* Byte order for data.  */
+  int byte_order;
+  /* Byte order for code.  */
+  int byte_order_for_code;
+  /* Whether the target has 32-bit thumb-2 breakpoint defined or
+     not.  */
+  int has_thumb2_breakpoint;
+  /* Registry cache.  */
+  struct regcache *regcache;
+};
+
+/* Initialize arm_get_next_pcs.  */
+void arm_get_next_pcs_ctor (struct arm_get_next_pcs *self,
+			    struct arm_get_next_pcs_ops *ops,
+			    int byte_order,
+			    int byte_order_for_code,
+			    int has_thumb2_breakpoint,
+			    struct regcache *regcache);
+
+/* Find the next possible PCs after the current instruction executes.  */
+VEC (CORE_ADDR) *arm_get_next_pcs (struct arm_get_next_pcs *self);
+
+#endif /* ARM_GET_NEXT_PCS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm.h ./gdb/arch/arm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,149 @@
+/* Common target dependent code for GDB on ARM systems.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef ARM_H
+#define ARM_H
+
+/* Register numbers of various important registers.  */
+
+enum gdb_regnum {
+  ARM_A1_REGNUM = 0,		/* first integer-like argument */
+  ARM_A4_REGNUM = 3,		/* last integer-like argument */
+  ARM_AP_REGNUM = 11,
+  ARM_IP_REGNUM = 12,
+  ARM_SP_REGNUM = 13,		/* Contains address of top of stack */
+  ARM_LR_REGNUM = 14,		/* address to return to from a function call */
+  ARM_PC_REGNUM = 15,		/* Contains program counter */
+  ARM_F0_REGNUM = 16,		/* first floating point register */
+  ARM_F3_REGNUM = 19,		/* last floating point argument register */
+  ARM_F7_REGNUM = 23, 		/* last floating point register */
+  ARM_FPS_REGNUM = 24,		/* floating point status register */
+  ARM_PS_REGNUM = 25,		/* Contains processor status */
+  ARM_WR0_REGNUM,		/* WMMX data registers.  */
+  ARM_WR15_REGNUM = ARM_WR0_REGNUM + 15,
+  ARM_WC0_REGNUM,		/* WMMX control registers.  */
+  ARM_WCSSF_REGNUM = ARM_WC0_REGNUM + 2,
+  ARM_WCASF_REGNUM = ARM_WC0_REGNUM + 3,
+  ARM_WC7_REGNUM = ARM_WC0_REGNUM + 7,
+  ARM_WCGR0_REGNUM,		/* WMMX general purpose registers.  */
+  ARM_WCGR3_REGNUM = ARM_WCGR0_REGNUM + 3,
+  ARM_WCGR7_REGNUM = ARM_WCGR0_REGNUM + 7,
+  ARM_D0_REGNUM,		/* VFP double-precision registers.  */
+  ARM_D31_REGNUM = ARM_D0_REGNUM + 31,
+  ARM_FPSCR_REGNUM,
+
+  ARM_NUM_REGS,
+
+  /* Other useful registers.  */
+  ARM_FP_REGNUM = 11,		/* Frame register in ARM code, if used.  */
+  THUMB_FP_REGNUM = 7,		/* Frame register in Thumb code, if used.  */
+  ARM_NUM_ARG_REGS = 4, 
+  ARM_LAST_ARG_REGNUM = ARM_A4_REGNUM,
+  ARM_NUM_FP_ARG_REGS = 4,
+  ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM
+};
+
+/* Enum describing the different kinds of breakpoints.  */
+enum arm_breakpoint_kinds
+{
+   ARM_BP_KIND_THUMB = 2,
+   ARM_BP_KIND_THUMB2 = 3,
+   ARM_BP_KIND_ARM = 4,
+};
+
+/* Instruction condition field values.  */
+#define INST_EQ		0x0
+#define INST_NE		0x1
+#define INST_CS		0x2
+#define INST_CC		0x3
+#define INST_MI		0x4
+#define INST_PL		0x5
+#define INST_VS		0x6
+#define INST_VC		0x7
+#define INST_HI		0x8
+#define INST_LS		0x9
+#define INST_GE		0xa
+#define INST_LT		0xb
+#define INST_GT		0xc
+#define INST_LE		0xd
+#define INST_AL		0xe
+#define INST_NV		0xf
+
+#define FLAG_N		0x80000000
+#define FLAG_Z		0x40000000
+#define FLAG_C		0x20000000
+#define FLAG_V		0x10000000
+
+#define CPSR_T		0x20
+
+#define XPSR_T		0x01000000
+
+/* Size of integer registers.  */
+#define INT_REGISTER_SIZE		4
+
+/* Addresses for calling Thumb functions have the bit 0 set.
+   Here are some macros to test, set, or clear bit 0 of addresses.  */
+#define IS_THUMB_ADDR(addr)    ((addr) & 1)
+#define MAKE_THUMB_ADDR(addr)  ((addr) | 1)
+#define UNMAKE_THUMB_ADDR(addr) ((addr) & ~1)
+
+/* Support routines for instruction parsing.  */
+#define submask(x) ((1L << ((x) + 1)) - 1)
+#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st)))
+#define bit(obj,st) (((obj) >> (st)) & 1)
+#define sbits(obj,st,fn) \
+  ((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st))))
+#define BranchDest(addr,instr) \
+  ((CORE_ADDR) (((unsigned long) (addr)) + 8 + (sbits (instr, 0, 23) << 2)))
+
+/* Forward declaration.  */
+struct regcache;
+
+/* Return the size in bytes of the complete Thumb instruction whose
+   first halfword is INST1.  */
+int thumb_insn_size (unsigned short inst1);
+
+/* Returns true if the condition evaluates to true.  */
+int condition_true (unsigned long cond, unsigned long status_reg);
+
+/* Return number of 1-bits in VAL.  */
+int bitcount (unsigned long val);
+
+/* Return 1 if THIS_INSTR might change control flow, 0 otherwise.  */
+int arm_instruction_changes_pc (uint32_t this_instr);
+
+/* Return 1 if the 16-bit Thumb instruction INST might change
+   control flow, 0 otherwise.  */
+int thumb_instruction_changes_pc (unsigned short inst);
+
+/* Return 1 if the 32-bit Thumb instruction in INST1 and INST2
+   might change control flow, 0 otherwise.  */
+int thumb2_instruction_changes_pc (unsigned short inst1, unsigned short inst2);
+
+/* Advance the state of the IT block and return that state.  */
+int thumb_advance_itstate (unsigned int itstate);
+
+/* Decode shifted register value.  */
+
+unsigned long shifted_reg_val (struct regcache *regcache,
+			       unsigned long inst,
+			       int carry,
+			       unsigned long pc_val,
+			       unsigned long status_reg);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-linux.c ./gdb/arch/arm-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,139 @@
+/* Common target dependent code for GNU/Linux on ARM systems.
+
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "common-regcache.h"
+#include "arch/arm.h"
+#include "arm-linux.h"
+#include "arch/arm-get-next-pcs.h"
+
+/* Calculate the offset from stack pointer of the pc register on the stack
+   in the case of a sigreturn or sigreturn_rt syscall.  */
+int
+arm_linux_sigreturn_next_pc_offset (unsigned long sp,
+				    unsigned long sp_data,
+				    unsigned long svc_number,
+				    int is_sigreturn)
+{
+  /* Offset of R0 register.  */
+  int r0_offset = 0;
+  /* Offset of PC register.  */
+  int pc_offset = 0;
+
+  if (is_sigreturn)
+    {
+      if (sp_data == ARM_NEW_SIGFRAME_MAGIC)
+	r0_offset = ARM_UCONTEXT_SIGCONTEXT + ARM_SIGCONTEXT_R0;
+      else
+	r0_offset = ARM_SIGCONTEXT_R0;
+    }
+  else
+    {
+      if (sp_data == sp + ARM_OLD_RT_SIGFRAME_SIGINFO)
+	r0_offset = ARM_OLD_RT_SIGFRAME_UCONTEXT;
+      else
+	r0_offset = ARM_NEW_RT_SIGFRAME_UCONTEXT;
+
+      r0_offset += ARM_UCONTEXT_SIGCONTEXT + ARM_SIGCONTEXT_R0;
+    }
+
+  pc_offset = r0_offset + INT_REGISTER_SIZE * ARM_PC_REGNUM;
+
+  return pc_offset;
+}
+
+/* Implementation of "fixup" method of struct arm_get_next_pcs_ops
+   for arm-linux.  */
+
+CORE_ADDR
+arm_linux_get_next_pcs_fixup (struct arm_get_next_pcs *self,
+			      CORE_ADDR nextpc)
+{
+  /* The Linux kernel offers some user-mode helpers in a high page.  We can
+     not read this page (as of 2.6.23), and even if we could then we
+     couldn't set breakpoints in it, and even if we could then the atomic
+     operations would fail when interrupted.  They are all (tail) called
+     as functions and return to the address in LR.  However, when GDB single
+     step this instruction, this instruction isn't executed yet, and LR
+     may not be updated yet.  In other words, GDB can get the target
+     address from LR if this instruction isn't BL or BLX.  */
+  if (nextpc > 0xffff0000)
+    {
+      int bl_blx_p = 0;
+      CORE_ADDR pc = regcache_read_pc (self->regcache);
+      int pc_incr = 0;
+
+      if (self->ops->is_thumb (self))
+	{
+	  unsigned short inst1
+	    = self->ops->read_mem_uint (pc, 2, self->byte_order_for_code);
+
+	  if (bits (inst1, 8, 15) == 0x47 && bit (inst1, 7))
+	    {
+	      /* BLX Rm */
+	      bl_blx_p = 1;
+	      pc_incr = 2;
+	    }
+	  else if (thumb_insn_size (inst1) == 4)
+	    {
+	      unsigned short inst2;
+
+	      inst2 = self->ops->read_mem_uint (pc + 2, 2,
+						self->byte_order_for_code);
+
+	      if ((inst1 & 0xf800) == 0xf000 && bits (inst2, 14, 15) == 0x3)
+		{
+		  /* BL <label> and BLX <label> */
+		  bl_blx_p = 1;
+		  pc_incr = 4;
+		}
+	    }
+
+	  pc_incr = MAKE_THUMB_ADDR (pc_incr);
+	}
+      else
+	{
+	  unsigned int insn
+	    = self->ops->read_mem_uint (pc, 4, self->byte_order_for_code);
+
+	  if (bits (insn, 28, 31) == INST_NV)
+	    {
+	      if (bits (insn, 25, 27) == 0x5) /* BLX <label> */
+		bl_blx_p = 1;
+	    }
+	  else
+	    {
+	      if (bits (insn, 24, 27) == 0xb  /* BL <label> */
+		  || bits (insn, 4, 27) == 0x12fff3 /* BLX Rm */)
+		bl_blx_p = 1;
+	    }
+
+	  pc_incr = 4;
+	}
+
+      /* If the instruction BL or BLX, the target address is the following
+	 instruction of BL or BLX, otherwise, the target address is in LR
+	 already.  */
+      if (bl_blx_p)
+	nextpc = pc + pc_incr;
+      else
+	nextpc = regcache_raw_get_unsigned (self->regcache, ARM_LR_REGNUM);
+    }
+  return nextpc;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-linux.h ./gdb/arch/arm-linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/arm-linux.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/arm-linux.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,81 @@
+/* Common target dependent code for GNU/Linux on ARM systems.
+
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef ARM_LINUX_H
+#define ARM_LINUX_H
+
+/* The index to access CSPR in user_regs defined in GLIBC.  */
+#define ARM_CPSR_GREGNUM 16
+
+/* There are a couple of different possible stack layouts that
+   we need to support.
+
+   Before version 2.6.18, the kernel used completely independent
+   layouts for non-RT and RT signals.  For non-RT signals the stack
+   began directly with a struct sigcontext.  For RT signals the stack
+   began with two redundant pointers (to the siginfo and ucontext),
+   and then the siginfo and ucontext.
+
+   As of version 2.6.18, the non-RT signal frame layout starts with
+   a ucontext and the RT signal frame starts with a siginfo and then
+   a ucontext.  Also, the ucontext now has a designated save area
+   for coprocessor registers.
+
+   For RT signals, it's easy to tell the difference: we look for
+   pinfo, the pointer to the siginfo.  If it has the expected
+   value, we have an old layout.  If it doesn't, we have the new
+   layout.
+
+   For non-RT signals, it's a bit harder.  We need something in one
+   layout or the other with a recognizable offset and value.  We can't
+   use the return trampoline, because ARM usually uses SA_RESTORER,
+   in which case the stack return trampoline is not filled in.
+   We can't use the saved stack pointer, because sigaltstack might
+   be in use.  So for now we guess the new layout...  */
+
+/* There are three words (trap_no, error_code, oldmask) in
+   struct sigcontext before r0.  */
+#define ARM_SIGCONTEXT_R0 0xc
+
+/* There are five words (uc_flags, uc_link, and three for uc_stack)
+   in the ucontext_t before the sigcontext.  */
+#define ARM_UCONTEXT_SIGCONTEXT 0x14
+
+/* There are three elements in an rt_sigframe before the ucontext:
+   pinfo, puc, and info.  The first two are pointers and the third
+   is a struct siginfo, with size 128 bytes.  We could follow puc
+   to the ucontext, but it's simpler to skip the whole thing.  */
+#define ARM_OLD_RT_SIGFRAME_SIGINFO 0x8
+#define ARM_OLD_RT_SIGFRAME_UCONTEXT 0x88
+
+#define ARM_NEW_RT_SIGFRAME_UCONTEXT 0x80
+
+#define ARM_NEW_SIGFRAME_MAGIC 0x5ac3c35a
+
+int
+arm_linux_sigreturn_next_pc_offset (unsigned long sp,
+				    unsigned long sp_data,
+				    unsigned long svc_number,
+				    int is_sigreturn);
+
+struct arm_get_next_pcs;
+
+CORE_ADDR arm_linux_get_next_pcs_fixup (struct arm_get_next_pcs *self,
+					CORE_ADDR pc);
+#endif /* ARM_LINUX_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/xtensa.h ./gdb/arch/xtensa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch/xtensa.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arch/xtensa.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+/* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef XTENSA_H
+#define XTENSA_H
+
+/* Xtensa ELF core file register set representation ('.reg' section).
+   Copied from target-side ELF header <xtensa/elf.h>.  */
+
+typedef uint32_t xtensa_elf_greg_t;
+
+typedef struct
+{
+  xtensa_elf_greg_t pc;
+  xtensa_elf_greg_t ps;
+  xtensa_elf_greg_t lbeg;
+  xtensa_elf_greg_t lend;
+  xtensa_elf_greg_t lcount;
+  xtensa_elf_greg_t sar;
+  xtensa_elf_greg_t windowstart;
+  xtensa_elf_greg_t windowbase;
+  xtensa_elf_greg_t threadptr;
+  xtensa_elf_greg_t reserved[7+48];
+  xtensa_elf_greg_t ar[64];
+} xtensa_elf_gregset_t;
+
+#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
+			  / sizeof (xtensa_elf_greg_t))
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch-utils.c ./gdb/arch-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arch-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,7 +44,7 @@ simple_displaced_step_copy_insn (struct 
                                  struct regcache *regs)
 {
   size_t len = gdbarch_max_insn_length (gdbarch);
-  gdb_byte *buf = xmalloc (len);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len);
 
   read_memory (from, buf, len);
   write_memory (to, buf, len);
@@ -132,6 +132,13 @@ generic_stack_frame_destroyed_p (struct 
   return 0;
 }
 
+int
+default_code_of_frame_writable (struct gdbarch *gdbarch,
+				struct frame_info *frame)
+{
+  return 1;
+}
+
 /* Helper functions for gdbarch_inner_than */
 
 int
@@ -234,6 +241,34 @@ legacy_virtual_frame_pointer (struct gdb
   *frame_offset = 0;
 }
 
+/* Return a floating-point format for a floating-point variable of
+   length LEN in bits.  If non-NULL, NAME is the name of its type.
+   If no suitable type is found, return NULL.  */
+
+const struct floatformat **
+default_floatformat_for_type (struct gdbarch *gdbarch,
+			      const char *name, int len)
+{
+  const struct floatformat **format = NULL;
+
+  if (len == gdbarch_half_bit (gdbarch))
+    format = gdbarch_half_format (gdbarch);
+  else if (len == gdbarch_float_bit (gdbarch))
+    format = gdbarch_float_format (gdbarch);
+  else if (len == gdbarch_double_bit (gdbarch))
+    format = gdbarch_double_format (gdbarch);
+  else if (len == gdbarch_long_double_bit (gdbarch))
+    format = gdbarch_long_double_format (gdbarch);
+  /* On i386 the 'long double' type takes 96 bits,
+     while the real number of used bits is only 80,
+     both in processor and in memory.
+     The code below accepts the real bit size.  */
+  else if (gdbarch_long_double_format (gdbarch) != NULL
+	   && len == gdbarch_long_double_format (gdbarch)[0]->totalsize)
+    format = gdbarch_long_double_format (gdbarch);
+
+  return format;
+}
 
 int
 generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
@@ -273,7 +308,7 @@ default_vsyscall_range (struct gdbarch *
 
 /* Functions to manipulate the endianness of the target.  */
 
-static int target_byte_order_user = BFD_ENDIAN_UNKNOWN;
+static enum bfd_endian target_byte_order_user = BFD_ENDIAN_UNKNOWN;
 
 static const char endian_big[] = "big";
 static const char endian_little[] = "little";
@@ -603,7 +638,7 @@ static const bfd_target *default_bfd_vec
 static const bfd_target *default_bfd_vec;
 #endif
 
-static int default_byte_order = BFD_ENDIAN_UNKNOWN;
+static enum bfd_endian default_byte_order = BFD_ENDIAN_UNKNOWN;
 
 void
 initialize_current_architecture (void)
@@ -684,7 +719,7 @@ initialize_current_architecture (void)
     /* Append ``auto''.  */
     int nr;
     for (nr = 0; arches[nr] != NULL; nr++);
-    arches = xrealloc (arches, sizeof (char*) * (nr + 2));
+    arches = XRESIZEVEC (const char *, arches, nr + 2);
     arches[nr + 0] = "auto";
     arches[nr + 1] = NULL;
     add_setshow_enum_cmd ("architecture", class_support,
@@ -795,8 +830,8 @@ default_has_shared_address_space (struct
 }
 
 int
-default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
-				  CORE_ADDR addr, int *isize, char **msg)
+default_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
+				  char **msg)
 {
   /* We don't know if maybe the target has some way to do fast
      tracepoints that doesn't need gdbarch, so always say yes.  */
@@ -805,13 +840,23 @@ default_fast_tracepoint_valid_at (struct
   return 1;
 }
 
-void
-default_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-				   int *kindptr)
+const gdb_byte *
+default_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
+			    int *lenptr)
 {
-  gdbarch_breakpoint_from_pc (gdbarch, pcptr, kindptr);
+  int kind = gdbarch_breakpoint_kind_from_pc (gdbarch, pcptr);
+
+  return gdbarch_sw_breakpoint_from_kind (gdbarch, kind, lenptr);
+}
+int
+default_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
+					    struct regcache *regcache,
+					    CORE_ADDR *pcptr)
+{
+  return gdbarch_breakpoint_kind_from_pc (gdbarch, pcptr);
 }
 
+
 void
 default_gen_return_address (struct gdbarch *gdbarch,
 			    struct agent_expr *ax, struct axs_value *value,
@@ -850,10 +895,9 @@ default_skip_permanent_breakpoint (struc
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   CORE_ADDR current_pc = regcache_read_pc (regcache);
-  const gdb_byte *bp_insn;
   int bp_len;
 
-  bp_insn = gdbarch_breakpoint_from_pc (gdbarch, &current_pc, &bp_len);
+  gdbarch_breakpoint_from_pc (gdbarch, &current_pc, &bp_len);
   current_pc += bp_len;
   regcache_write_pc (regcache, current_pc);
 }
@@ -897,6 +941,29 @@ default_addressable_memory_unit_size (st
   return 1;
 }
 
+void
+default_guess_tracepoint_registers (struct gdbarch *gdbarch,
+				    struct regcache *regcache,
+				    CORE_ADDR addr)
+{
+  int pc_regno = gdbarch_pc_regnum (gdbarch);
+  gdb_byte *regs;
+
+  /* This guessing code below only works if the PC register isn't
+     a pseudo-register.  The value of a pseudo-register isn't stored
+     in the (non-readonly) regcache -- instead it's recomputed
+     (probably from some other cached raw register) whenever the
+     register is read.  In this case, a custom method implementation
+     should be used by the architecture.  */
+  if (pc_regno < 0 || pc_regno >= gdbarch_num_regs (gdbarch))
+    return;
+
+  regs = (gdb_byte *) alloca (register_size (gdbarch, pc_regno));
+  store_unsigned_integer (regs, register_size (gdbarch, pc_regno),
+			  gdbarch_byte_order (gdbarch), addr);
+  regcache_raw_supply (regcache, pc_regno, regs);
+}
+
 /* -Wmissing-prototypes */
 extern initialize_file_ftype _initialize_gdbarch_utils;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch-utils.h ./gdb/arch-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arch-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arch-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +26,52 @@ struct minimal_symbol;
 struct type;
 struct gdbarch_info;
 
+template <size_t bp_size, const gdb_byte *break_insn>
+struct bp_manipulation
+{
+  static int
+  kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+  {
+    return bp_size;
+  }
+
+  static const gdb_byte *
+  bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+  {
+    *size = kind;
+    return break_insn;
+  }
+};
+
+template <size_t bp_size,
+	  const gdb_byte *break_insn_little,
+	  const gdb_byte *break_insn_big>
+struct bp_manipulation_endian
+{
+  static int
+  kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+  {
+    return bp_size;
+  }
+
+  static const gdb_byte *
+  bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+  {
+    *size = kind;
+    if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+      return break_insn_big;
+    else
+      return break_insn_little;
+  }
+};
+
+#define BP_MANIPULATION(BREAK_INSN) \
+  bp_manipulation<sizeof (BREAK_INSN), BREAK_INSN>
+
+#define BP_MANIPULATION_ENDIAN(BREAK_INSN_LITTLE, BREAK_INSN_BIG) \
+  bp_manipulation_endian<sizeof (BREAK_INSN_LITTLE),		  \
+  BREAK_INSN_LITTLE, BREAK_INSN_BIG>
+
 /* An implementation of gdbarch_displaced_step_copy_insn for
    processors that don't need to modify the instruction before
    single-stepping the displaced copy.
@@ -95,6 +141,11 @@ int cannot_register_not (struct gdbarch 
 
 extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
 
+/* Default implementation of gdbarch_floatformat_for_type.  */
+extern const struct floatformat **
+  default_floatformat_for_type (struct gdbarch *gdbarch,
+				const char *name, int len);
+
 extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame,
 					       CORE_ADDR pc);
 
@@ -107,6 +158,9 @@ extern int generic_in_solib_return_tramp
 extern int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch,
 					    CORE_ADDR pc);
 
+extern int default_code_of_frame_writable (struct gdbarch *gdbarch,
+					   struct frame_info *frame);
+
 /* By default, registers are not convertible.  */
 extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
 				       struct type *type);
@@ -161,11 +215,15 @@ extern struct gdbarch *get_current_arch 
 extern int default_has_shared_address_space (struct gdbarch *);
 
 extern int default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
-					     CORE_ADDR addr,
-					     int *isize, char **msg);
+					     CORE_ADDR addr, char **msg);
 
-extern void default_remote_breakpoint_from_pc (struct gdbarch *,
-					       CORE_ADDR *pcptr, int *kindptr);
+extern const gdb_byte *default_breakpoint_from_pc (struct gdbarch *gdbarch,
+						   CORE_ADDR *pcptr,
+						   int *lenptr);
+
+extern int default_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
+						       struct regcache *regcache,
+						       CORE_ADDR *pcptr);
 
 extern void default_gen_return_address (struct gdbarch *gdbarch,
 					struct agent_expr *ax,
@@ -205,4 +263,8 @@ extern char *default_gcc_target_options 
 extern const char *default_gnu_triplet_regexp (struct gdbarch *gdbarch);
 extern int default_addressable_memory_unit_size (struct gdbarch *gdbarch);
 
+extern void default_guess_tracepoint_registers (struct gdbarch *gdbarch,
+						struct regcache *regcache,
+						CORE_ADDR addr);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-newlib-tdep.c ./gdb/arc-newlib-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-newlib-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arc-newlib-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,69 @@
+/* Target-dependent code for Newlib ARC.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Contributed by Synopsys Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+
+#include "gdbarch.h"
+#include "arc-tdep.h"
+#include "osabi.h"
+
+/* Implement the 'init_osabi' method of struct gdb_osabi_handler.  */
+
+static void
+arc_newlib_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  if (arc_debug)
+    debug_printf ("arc-newlib: Initialization.\n");
+
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Offset of original PC in longjmp jump buffer (in registers).  Value of PC
+     offset can be found in newlib/libc/machine/arc/setjmp.S.  */
+  tdep->jb_pc = 18;
+}
+
+/* Recognize ARC Newlib object files.  */
+
+static enum gdb_osabi
+arc_newlib_osabi_sniffer (bfd *abfd)
+{
+  if (arc_debug)
+    debug_printf ("arc-newlib: OS/ABI sniffer.\n");
+
+  /* crt0.S in libgloss for ARC defines .ivt section for interrupt handlers.
+     If this section is not present then this is likely not a newlib - could be
+     a Linux application or some non-newlib baremetal application.  */
+  if (bfd_get_section_by_name (abfd, ".ivt") != NULL)
+    return GDB_OSABI_NEWLIB;
+  else
+    return GDB_OSABI_UNKNOWN;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_arc_newlib_tdep;
+
+void
+_initialize_arc_newlib_tdep (void)
+{
+  gdbarch_register_osabi_sniffer (bfd_arch_arc, bfd_target_elf_flavour,
+				  arc_newlib_osabi_sniffer);
+  gdbarch_register_osabi (bfd_arch_arc, 0, GDB_OSABI_NEWLIB,
+			  arc_newlib_init_osabi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-tdep.c ./gdb/arc-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arc-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,1317 @@
+/* Target dependent code for ARC arhitecture, for GDB.
+
+   Copyright 2005-2017 Free Software Foundation, Inc.
+   Contributed by Synopsys Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* GDB header files.  */
+#include "defs.h"
+#include "arch-utils.h"
+#include "disasm.h"
+#include "dwarf2-frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
+#include "objfiles.h"
+#include "trad-frame.h"
+
+/* ARC header files.  */
+#include "opcode/arc.h"
+#include "arc-tdep.h"
+
+/* Standard headers.  */
+#include <algorithm>
+
+/* Default target descriptions.  */
+#include "features/arc-v2.c"
+#include "features/arc-arcompact.c"
+
+/* The frame unwind cache for the ARC.  Current structure is a stub, because
+   it should be filled in during the prologue analysis.  */
+
+struct arc_frame_cache
+{
+  /* The stack pointer at the time this frame was created; i.e. the caller's
+     stack pointer when this function was called.  It is used to identify this
+     frame.  */
+  CORE_ADDR prev_sp;
+
+  /* Store addresses for registers saved in prologue.  */
+  struct trad_frame_saved_reg *saved_regs;
+};
+
+/* Global debug flag.  */
+
+int arc_debug;
+
+/* XML target description features.  */
+
+static const char core_v2_feature_name[] = "org.gnu.gdb.arc.core.v2";
+static const char
+  core_reduced_v2_feature_name[] = "org.gnu.gdb.arc.core-reduced.v2";
+static const char
+  core_arcompact_feature_name[] = "org.gnu.gdb.arc.core.arcompact";
+static const char aux_minimal_feature_name[] = "org.gnu.gdb.arc.aux-minimal";
+
+/* XML target description known registers.  */
+
+static const char *const core_v2_register_names[] = {
+  "r0", "r1", "r2", "r3",
+  "r4", "r5", "r6", "r7",
+  "r8", "r9", "r10", "r11",
+  "r12", "r13", "r14", "r15",
+  "r16", "r17", "r18", "r19",
+  "r20", "r21", "r22", "r23",
+  "r24", "r25", "gp", "fp",
+  "sp", "ilink", "r30", "blink",
+  "r32", "r33", "r34", "r35",
+  "r36", "r37", "r38", "r39",
+  "r40", "r41", "r42", "r43",
+  "r44", "r45", "r46", "r47",
+  "r48", "r49", "r50", "r51",
+  "r52", "r53", "r54", "r55",
+  "r56", "r57", "accl", "acch",
+  "lp_count", "pcl",
+};
+
+static const char *const aux_minimal_register_names[] = {
+  "pc", "status32",
+};
+
+static const char *const core_arcompact_register_names[] = {
+  "r0", "r1", "r2", "r3",
+  "r4", "r5", "r6", "r7",
+  "r8", "r9", "r10", "r11",
+  "r12", "r13", "r14", "r15",
+  "r16", "r17", "r18", "r19",
+  "r20", "r21", "r22", "r23",
+  "r24", "r25", "gp", "fp",
+  "sp", "ilink1", "ilink2", "blink",
+  "r32", "r33", "r34", "r35",
+  "r36", "r37", "r38", "r39",
+  "r40", "r41", "r42", "r43",
+  "r44", "r45", "r46", "r47",
+  "r48", "r49", "r50", "r51",
+  "r52", "r53", "r54", "r55",
+  "r56", "r57", "r58", "r59",
+  "lp_count", "pcl",
+};
+
+/* Implement the "write_pc" gdbarch method.
+
+   In ARC PC register is a normal register so in most cases setting PC value
+   is a straightforward process: debugger just writes PC value.  However it
+   gets trickier in case when current instruction is an instruction in delay
+   slot.  In this case CPU will execute instruction at current PC value, then
+   will set PC to the current value of BTA register; also current instruction
+   cannot be branch/jump and some of the other instruction types.  Thus if
+   debugger would try to just change PC value in this case, this instruction
+   will get executed, but then core will "jump" to the original branch target.
+
+   Whether current instruction is a delay-slot instruction or not is indicated
+   by DE bit in STATUS32 register indicates if current instruction is a delay
+   slot instruction.  This bit is writable by debug host, which allows debug
+   host to prevent core from jumping after the delay slot instruction.  It
+   also works in another direction: setting this bit will make core to treat
+   any current instructions as a delay slot instruction and to set PC to the
+   current value of BTA register.
+
+   To workaround issues with changing PC register while in delay slot
+   instruction, debugger should check for the STATUS32.DE bit and reset it if
+   it is set.  No other change is required in this function.  Most common
+   case, where this function might be required is calling inferior functions
+   from debugger.  Generic GDB logic handles this pretty well: current values
+   of registers are stored, value of PC is changed (that is the job of this
+   function), and after inferior function is executed, GDB restores all
+   registers, include BTA and STATUS32, which also means that core is returned
+   to its original state of being halted on delay slot instructions.
+
+   This method is useless for ARC 600, because it doesn't have externally
+   exposed BTA register.  In the case of ARC 600 it is impossible to restore
+   core to its state in all occasions thus core should never be halted (from
+   the perspective of debugger host) in the delay slot.  */
+
+static void
+arc_write_pc (struct regcache *regcache, CORE_ADDR new_pc)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (arc_debug)
+    debug_printf ("arc: Writing PC, new value=%s\n",
+		  paddress (gdbarch, new_pc));
+
+  regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch),
+				  new_pc);
+
+  ULONGEST status32;
+  regcache_cooked_read_unsigned (regcache, gdbarch_ps_regnum (gdbarch),
+				 &status32);
+
+  /* Mask for DE bit is 0x40.  */
+  if (status32 & 0x40)
+    {
+      if (arc_debug)
+	{
+	  debug_printf ("arc: Changing PC while in delay slot.  Will "
+			"reset STATUS32.DE bit to zero.  Value of STATUS32 "
+			"register is 0x%s\n",
+			phex (status32, ARC_REGISTER_SIZE));
+	}
+
+      /* Reset bit and write to the cache.  */
+      status32 &= ~0x40;
+      regcache_cooked_write_unsigned (regcache, gdbarch_ps_regnum (gdbarch),
+				      status32);
+    }
+}
+
+/* Implement the "virtual_frame_pointer" gdbarch method.
+
+   According to ABI the FP (r27) is used to point to the middle of the current
+   stack frame, just below the saved FP and before local variables, register
+   spill area and outgoing args.  However for optimization levels above O2 and
+   in any case in leaf functions, the frame pointer is usually not set at all.
+   The exception being when handling nested functions.
+
+   We use this function to return a "virtual" frame pointer, marking the start
+   of the current stack frame as a register-offset pair.  If the FP is not
+   being used, then it should return SP, with an offset of the frame size.
+
+   The current implementation doesn't actually know the frame size, nor
+   whether the FP is actually being used, so for now we just return SP and an
+   offset of zero.  This is no worse than other architectures, but is needed
+   to avoid assertion failures.
+
+   TODO: Can we determine the frame size to get a correct offset?
+
+   PC is a program counter where we need the virtual FP.  REG_PTR is the base
+   register used for the virtual FP.  OFFSET_PTR is the offset used for the
+   virtual FP.  */
+
+static void
+arc_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
+			   int *reg_ptr, LONGEST *offset_ptr)
+{
+  *reg_ptr = gdbarch_sp_regnum (gdbarch);
+  *offset_ptr = 0;
+}
+
+/* Implement the "dummy_id" gdbarch method.
+
+   Tear down a dummy frame created by arc_push_dummy_call ().  This data has
+   to be constructed manually from the data in our hand.  The stack pointer
+   and program counter can be obtained from the frame info.  */
+
+static struct frame_id
+arc_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
+{
+  return frame_id_build (get_frame_sp (this_frame),
+			 get_frame_pc (this_frame));
+}
+
+/* Implement the "push_dummy_call" gdbarch method.
+
+   Stack Frame Layout
+
+   This shows the layout of the stack frame for the general case of a
+   function call; a given function might not have a variable number of
+   arguments or local variables, or might not save any registers, so it would
+   not have the corresponding frame areas.  Additionally, a leaf function
+   (i.e. one which calls no other functions) does not need to save the
+   contents of the BLINK register (which holds its return address), and a
+   function might not have a frame pointer.
+
+   The stack grows downward, so SP points below FP in memory; SP always
+   points to the last used word on the stack, not the first one.
+
+                      |                       |   |
+                      |      arg word N       |   | caller's
+                      |           :           |   | frame
+                      |      arg word 10      |   |
+                      |      arg word 9       |   |
+          old SP ---> +-----------------------+ --+
+                      |                       |   |
+                      |      callee-saved     |   |
+                      |       registers       |   |
+                      |  including fp, blink  |   |
+                      |                       |   | callee's
+          new FP ---> +-----------------------+   | frame
+                      |                       |   |
+                      |         local         |   |
+                      |       variables       |   |
+                      |                       |   |
+                      |       register        |   |
+                      |      spill area       |   |
+                      |                       |   |
+                      |     outgoing args     |   |
+                      |                       |   |
+          new SP ---> +-----------------------+ --+
+                      |                       |
+                      |         unused        |
+                      |                       |
+                                  |
+                                  |
+                                  V
+                              downwards
+
+   The list of arguments to be passed to a function is considered to be a
+   sequence of _N_ words (as though all the parameters were stored in order in
+   memory with each parameter occupying an integral number of words).  Words
+   1..8 are passed in registers 0..7; if the function has more than 8 words of
+   arguments then words 9..@em N are passed on the stack in the caller's frame.
+
+   If the function has a variable number of arguments, e.g. it has a form such
+   as `function (p1, p2, ...);' and _P_ words are required to hold the values
+   of the named parameters (which are passed in registers 0..@em P -1), then
+   the remaining 8 - _P_ words passed in registers _P_..7 are spilled into the
+   top of the frame so that the anonymous parameter words occupy a continuous
+   region.
+
+   Any arguments are already in target byte order.  We just need to store
+   them!
+
+   BP_ADDR is the return address where breakpoint must be placed.  NARGS is
+   the number of arguments to the function.  ARGS is the arguments values (in
+   target byte order).  SP is the Current value of SP register.  STRUCT_RETURN
+   is TRUE if structures are returned by the function.  STRUCT_ADDR is the
+   hidden address for returning a struct.  Returns SP of a new frame.  */
+
+static CORE_ADDR
+arc_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+		     struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+		     struct value **args, CORE_ADDR sp, int struct_return,
+		     CORE_ADDR struct_addr)
+{
+  if (arc_debug)
+    debug_printf ("arc: push_dummy_call (nargs = %d)\n", nargs);
+
+  int arg_reg = ARC_FIRST_ARG_REGNUM;
+
+  /* Push the return address.  */
+  regcache_cooked_write_unsigned (regcache, ARC_BLINK_REGNUM, bp_addr);
+
+  /* Are we returning a value using a structure return instead of a normal
+     value return?  If so, struct_addr is the address of the reserved space for
+     the return structure to be written on the stack, and that address is
+     passed to that function as a hidden first argument.  */
+  if (struct_return)
+    {
+      /* Pass the return address in the first argument register.  */
+      regcache_cooked_write_unsigned (regcache, arg_reg, struct_addr);
+
+      if (arc_debug)
+	debug_printf ("arc: struct return address %s passed in R%d",
+		      print_core_address (gdbarch, struct_addr), arg_reg);
+
+      arg_reg++;
+    }
+
+  if (nargs > 0)
+    {
+      unsigned int total_space = 0;
+
+      /* How much space do the arguments occupy in total?  Must round each
+	 argument's size up to an integral number of words.  */
+      for (int i = 0; i < nargs; i++)
+	{
+	  unsigned int len = TYPE_LENGTH (value_type (args[i]));
+	  unsigned int space = align_up (len, 4);
+
+	  total_space += space;
+
+	  if (arc_debug)
+	    debug_printf ("arc: arg %d: %u bytes -> %u\n", i, len, space);
+	}
+
+      /* Allocate a buffer to hold a memory image of the arguments.  */
+      gdb_byte *memory_image = XCNEWVEC (gdb_byte, total_space);
+
+      /* Now copy all of the arguments into the buffer, correctly aligned.  */
+      gdb_byte *data = memory_image;
+      for (int i = 0; i < nargs; i++)
+	{
+	  unsigned int len = TYPE_LENGTH (value_type (args[i]));
+	  unsigned int space = align_up (len, 4);
+
+	  memcpy (data, value_contents (args[i]), (size_t) len);
+	  if (arc_debug)
+	    debug_printf ("arc: copying arg %d, val 0x%08x, len %d to mem\n",
+			  i, *((int *) value_contents (args[i])), len);
+
+	  data += space;
+	}
+
+      /* Now load as much as possible of the memory image into registers.  */
+      data = memory_image;
+      while (arg_reg <= ARC_LAST_ARG_REGNUM)
+	{
+	  if (arc_debug)
+	    debug_printf ("arc: passing 0x%02x%02x%02x%02x in register R%d\n",
+			  data[0], data[1], data[2], data[3], arg_reg);
+
+	  /* Note we don't use write_unsigned here, since that would convert
+	     the byte order, but we are already in the correct byte order.  */
+	  regcache_cooked_write (regcache, arg_reg, data);
+
+	  data += ARC_REGISTER_SIZE;
+	  total_space -= ARC_REGISTER_SIZE;
+
+	  /* All the data is now in registers.  */
+	  if (total_space == 0)
+	    break;
+
+	  arg_reg++;
+	}
+
+      /* If there is any data left, push it onto the stack (in a single write
+	 operation).  */
+      if (total_space > 0)
+	{
+	  if (arc_debug)
+	    debug_printf ("arc: passing %d bytes on stack\n", total_space);
+
+	  sp -= total_space;
+	  write_memory (sp, data, (int) total_space);
+	}
+
+      xfree (memory_image);
+    }
+
+  /* Finally, update the SP register.  */
+  regcache_cooked_write_unsigned (regcache, gdbarch_sp_regnum (gdbarch), sp);
+
+  return sp;
+}
+
+/* Implement the "push_dummy_code" gdbarch method.
+
+   We don't actually push any code.  We just identify where a breakpoint can
+   be inserted to which we are can return and the resume address where we
+   should be called.
+
+   ARC does not necessarily have an executable stack, so we can't put the
+   return breakpoint there.  Instead we put it at the entry point of the
+   function.  This means the SP is unchanged.
+
+   SP is a current stack pointer FUNADDR is an address of the function to be
+   called.  ARGS is arguments to pass.  NARGS is a number of args to pass.
+   VALUE_TYPE is a type of value returned.  REAL_PC is a resume address when
+   the function is called.  BP_ADDR is an address where breakpoint should be
+   set.  Returns the updated stack pointer.  */
+
+static CORE_ADDR
+arc_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr,
+		     struct value **args, int nargs, struct type *value_type,
+		     CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
+		     struct regcache *regcache)
+{
+  *real_pc = funaddr;
+  *bp_addr = entry_point_address ();
+  return sp;
+}
+
+/* Implement the "cannot_fetch_register" gdbarch method.  */
+
+static int
+arc_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
+{
+  /* Assume that register is readable if it is unknown.  */
+  return FALSE;
+}
+
+/* Implement the "cannot_store_register" gdbarch method.  */
+
+static int
+arc_cannot_store_register (struct gdbarch *gdbarch, int regnum)
+{
+  /* Assume that register is writable if it is unknown.  */
+  switch (regnum)
+    {
+    case ARC_PCL_REGNUM:
+      return TRUE;
+    default:
+      return FALSE;
+    }
+}
+
+/* Get the return value of a function from the registers/memory used to
+   return it, according to the convention used by the ABI - 4-bytes values are
+   in the R0, while 8-byte values are in the R0-R1.
+
+   TODO: This implementation ignores the case of "complex double", where
+   according to ABI, value is returned in the R0-R3 registers.
+
+   TYPE is a returned value's type.  VALBUF is a buffer for the returned
+   value.  */
+
+static void
+arc_extract_return_value (struct gdbarch *gdbarch, struct type *type,
+			  struct regcache *regcache, gdb_byte *valbuf)
+{
+  unsigned int len = TYPE_LENGTH (type);
+
+  if (arc_debug)
+    debug_printf ("arc: extract_return_value\n");
+
+  if (len <= ARC_REGISTER_SIZE)
+    {
+      ULONGEST val;
+
+      /* Get the return value from one register.  */
+      regcache_cooked_read_unsigned (regcache, ARC_R0_REGNUM, &val);
+      store_unsigned_integer (valbuf, (int) len,
+			      gdbarch_byte_order (gdbarch), val);
+
+      if (arc_debug)
+	debug_printf ("arc: returning 0x%s\n", phex (val, ARC_REGISTER_SIZE));
+    }
+  else if (len <= ARC_REGISTER_SIZE * 2)
+    {
+      ULONGEST low, high;
+
+      /* Get the return value from two registers.  */
+      regcache_cooked_read_unsigned (regcache, ARC_R0_REGNUM, &low);
+      regcache_cooked_read_unsigned (regcache, ARC_R1_REGNUM, &high);
+
+      store_unsigned_integer (valbuf, ARC_REGISTER_SIZE,
+			      gdbarch_byte_order (gdbarch), low);
+      store_unsigned_integer (valbuf + ARC_REGISTER_SIZE,
+			      (int) len - ARC_REGISTER_SIZE,
+			      gdbarch_byte_order (gdbarch), high);
+
+      if (arc_debug)
+	debug_printf ("arc: returning 0x%s%s\n",
+		      phex (high, ARC_REGISTER_SIZE),
+		      phex (low, ARC_REGISTER_SIZE));
+    }
+  else
+    error (_("arc: extract_return_value: type length %u too large"), len);
+}
+
+
+/* Store the return value of a function into the registers/memory used to
+   return it, according to the convention used by the ABI.
+
+   TODO: This implementation ignores the case of "complex double", where
+   according to ABI, value is returned in the R0-R3 registers.
+
+   TYPE is a returned value's type.  VALBUF is a buffer with the value to
+   return.  */
+
+static void
+arc_store_return_value (struct gdbarch *gdbarch, struct type *type,
+			struct regcache *regcache, const gdb_byte *valbuf)
+{
+  unsigned int len = TYPE_LENGTH (type);
+
+  if (arc_debug)
+    debug_printf ("arc: store_return_value\n");
+
+  if (len <= ARC_REGISTER_SIZE)
+    {
+      ULONGEST val;
+
+      /* Put the return value into one register.  */
+      val = extract_unsigned_integer (valbuf, (int) len,
+				      gdbarch_byte_order (gdbarch));
+      regcache_cooked_write_unsigned (regcache, ARC_R0_REGNUM, val);
+
+      if (arc_debug)
+	debug_printf ("arc: storing 0x%s\n", phex (val, ARC_REGISTER_SIZE));
+    }
+  else if (len <= ARC_REGISTER_SIZE * 2)
+    {
+      ULONGEST low, high;
+
+      /* Put the return value into  two registers.  */
+      low = extract_unsigned_integer (valbuf, ARC_REGISTER_SIZE,
+				      gdbarch_byte_order (gdbarch));
+      high = extract_unsigned_integer (valbuf + ARC_REGISTER_SIZE,
+				       (int) len - ARC_REGISTER_SIZE,
+				       gdbarch_byte_order (gdbarch));
+
+      regcache_cooked_write_unsigned (regcache, ARC_R0_REGNUM, low);
+      regcache_cooked_write_unsigned (regcache, ARC_R1_REGNUM, high);
+
+      if (arc_debug)
+	debug_printf ("arc: storing 0x%s%s\n",
+		      phex (high, ARC_REGISTER_SIZE),
+		      phex (low, ARC_REGISTER_SIZE));
+    }
+  else
+    error (_("arc_store_return_value: type length too large."));
+}
+
+/* Implement the "get_longjmp_target" gdbarch method.  */
+
+static int
+arc_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
+{
+  if (arc_debug)
+    debug_printf ("arc: get_longjmp_target\n");
+
+  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int pc_offset = tdep->jb_pc * ARC_REGISTER_SIZE;
+  gdb_byte buf[ARC_REGISTER_SIZE];
+  CORE_ADDR jb_addr = get_frame_register_unsigned (frame, ARC_FIRST_ARG_REGNUM);
+
+  if (target_read_memory (jb_addr + pc_offset, buf, ARC_REGISTER_SIZE))
+    return 0; /* Failed to read from memory.  */
+
+  *pc = extract_unsigned_integer (buf, ARC_REGISTER_SIZE,
+				  gdbarch_byte_order (gdbarch));
+  return 1;
+}
+
+/* Implement the "return_value" gdbarch method.  */
+
+static enum return_value_convention
+arc_return_value (struct gdbarch *gdbarch, struct value *function,
+		  struct type *valtype, struct regcache *regcache,
+		  gdb_byte *readbuf, const gdb_byte *writebuf)
+{
+  /* If the return type is a struct, or a union, or would occupy more than two
+     registers, the ABI uses the "struct return convention": the calling
+     function passes a hidden first parameter to the callee (in R0).  That
+     parameter is the address at which the value being returned should be
+     stored.  Otherwise, the result is returned in registers.  */
+  int is_struct_return = (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+			  || TYPE_CODE (valtype) == TYPE_CODE_UNION
+			  || TYPE_LENGTH (valtype) > 2 * ARC_REGISTER_SIZE);
+
+  if (arc_debug)
+    debug_printf ("arc: return_value (readbuf = %s, writebuf = %s)\n",
+		  host_address_to_string (readbuf),
+		  host_address_to_string (writebuf));
+
+  if (writebuf != NULL)
+    {
+      /* Case 1.  GDB should not ask us to set a struct return value: it
+	 should know the struct return location and write the value there
+	 itself.  */
+      gdb_assert (!is_struct_return);
+      arc_store_return_value (gdbarch, valtype, regcache, writebuf);
+    }
+  else if (readbuf != NULL)
+    {
+      /* Case 2.  GDB should not ask us to get a struct return value: it
+	 should know the struct return location and read the value from there
+	 itself.  */
+      gdb_assert (!is_struct_return);
+      arc_extract_return_value (gdbarch, valtype, regcache, readbuf);
+    }
+
+  return (is_struct_return
+	  ? RETURN_VALUE_STRUCT_CONVENTION
+	  : RETURN_VALUE_REGISTER_CONVENTION);
+}
+
+/* Return the base address of the frame.  For ARC, the base address is the
+   frame pointer.  */
+
+static CORE_ADDR
+arc_frame_base_address (struct frame_info *this_frame, void **prologue_cache)
+{
+  return (CORE_ADDR) get_frame_register_unsigned (this_frame, ARC_FP_REGNUM);
+}
+
+/* Implement the "skip_prologue" gdbarch method.
+
+   Skip the prologue for the function at PC.  This is done by checking from
+   the line information read from the DWARF, if possible; otherwise, we scan
+   the function prologue to find its end.  */
+
+static CORE_ADDR
+arc_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  if (arc_debug)
+    debug_printf ("arc: skip_prologue\n");
+
+  CORE_ADDR func_addr;
+  const char *func_name;
+
+  /* See what the symbol table says.  */
+  if (find_pc_partial_function (pc, &func_name, &func_addr, NULL))
+    {
+      /* Found a function.  */
+      CORE_ADDR postprologue_pc
+	= skip_prologue_using_sal (gdbarch, func_addr);
+
+      if (postprologue_pc != 0)
+	return std::max (pc, postprologue_pc);
+    }
+
+  /* No prologue info in symbol table, have to analyze prologue.  */
+
+  /* Find an upper limit on the function prologue using the debug
+     information.  If the debug information could not be used to provide that
+     bound, then pass 0 and arc_scan_prologue will estimate value itself.  */
+  CORE_ADDR limit_pc = skip_prologue_using_sal (gdbarch, pc);
+  /* We don't have a proper analyze_prologue function yet, but its result
+     should be returned here.  Currently GDB will just stop at the first
+     instruction of function if debug information doesn't have prologue info;
+     and if there is a debug info about prologue - this code path will not be
+     taken at all.  */
+  return (limit_pc == 0 ? pc : limit_pc);
+}
+
+/* Implement the "print_insn" gdbarch method.
+
+   arc_get_disassembler () may return different functions depending on bfd
+   type, so it is not possible to pass print_insn directly to
+   set_gdbarch_print_insn ().  Instead this wrapper function is used.  It also
+   may be used by other functions to get disassemble_info for address.  It is
+   important to note, that those print_insn from opcodes always print
+   instruction to the stream specified in the INFO.  If this is not desired,
+   then either `print_insn` function in INFO should be set to some function
+   that will not print, or `stream` should be different from standard
+   gdb_stdlog.  */
+
+static int
+arc_delayed_print_insn (bfd_vma addr, struct disassemble_info *info)
+{
+  int (*print_insn) (bfd_vma, struct disassemble_info *);
+  /* exec_bfd may be null, if GDB is run without a target BFD file.  Opcodes
+     will handle NULL value gracefully.  */
+  print_insn = arc_get_disassembler (exec_bfd);
+  gdb_assert (print_insn != NULL);
+  return print_insn (addr, info);
+}
+
+/* Baremetal breakpoint instructions.
+
+   ARC supports both big- and little-endian.  However, instructions for
+   little-endian processors are encoded in the middle-endian: half-words are
+   in big-endian, while bytes inside the half-words are in little-endian; data
+   is represented in the "normal" little-endian.  Big-endian processors treat
+   data and code identically.
+
+   Assuming the number 0x01020304, it will be presented this way:
+
+   Address            :  N   N+1  N+2  N+3
+   little-endian      : 0x04 0x03 0x02 0x01
+   big-endian         : 0x01 0x02 0x03 0x04
+   ARC middle-endian  : 0x02 0x01 0x04 0x03
+  */
+
+static const gdb_byte arc_brk_s_be[] = { 0x7f, 0xff };
+static const gdb_byte arc_brk_s_le[] = { 0xff, 0x7f };
+static const gdb_byte arc_brk_be[] = { 0x25, 0x6f, 0x00, 0x3f };
+static const gdb_byte arc_brk_le[] = { 0x6f, 0x25, 0x3f, 0x00 };
+
+/* For ARC ELF, breakpoint uses the 16-bit BRK_S instruction, which is 0x7fff
+   (little endian) or 0xff7f (big endian).  We used to insert BRK_S even
+   instead of 32-bit instructions, which works mostly ok, unless breakpoint is
+   inserted into delay slot instruction.  In this case if branch is taken
+   BLINK value will be set to address of instruction after delay slot, however
+   if we replaced 32-bit instruction in delay slot with 16-bit long BRK_S,
+   then BLINK value will have an invalid value - it will point to the address
+   after the BRK_S (which was there at the moment of branch execution) while
+   it should point to the address after the 32-bit long instruction.  To avoid
+   such issues this function disassembles instruction at target location and
+   evaluates it value.
+
+   ARC 600 supports only 16-bit BRK_S.
+
+   NB: Baremetal GDB uses BRK[_S], while user-space GDB uses TRAP_S.  BRK[_S]
+   is much better because it doesn't commit unlike TRAP_S, so it can be set in
+   delay slots; however it cannot be used in user-mode, hence usage of TRAP_S
+   in GDB for user-space.  */
+
+/* Implement the "breakpoint_kind_from_pc" gdbarch method.  */
+
+static int
+arc_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  size_t length_with_limm = gdb_insn_length (gdbarch, *pcptr);
+
+  /* Replace 16-bit instruction with BRK_S, replace 32-bit instructions with
+     BRK.  LIMM is part of instruction length, so it can be either 4 or 8
+     bytes for 32-bit instructions.  */
+  if ((length_with_limm == 4 || length_with_limm == 8)
+      && !arc_mach_is_arc600 (gdbarch))
+    return sizeof (arc_brk_le);
+  else
+    return sizeof (arc_brk_s_le);
+}
+
+/* Implement the "sw_breakpoint_from_kind" gdbarch method.  */
+
+static const gdb_byte *
+arc_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  *size = kind;
+
+  if (kind == sizeof (arc_brk_le))
+    {
+      return ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	      ? arc_brk_be
+	      : arc_brk_le);
+    }
+  else
+    {
+      return ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	      ? arc_brk_s_be
+	      : arc_brk_s_le);
+    }
+}
+
+/* Implement the "unwind_pc" gdbarch method.  */
+
+static CORE_ADDR
+arc_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  int pc_regnum = gdbarch_pc_regnum (gdbarch);
+  CORE_ADDR pc = frame_unwind_register_unsigned (next_frame, pc_regnum);
+
+  if (arc_debug)
+    debug_printf ("arc: unwind PC: %s\n", paddress (gdbarch, pc));
+
+  return pc;
+}
+
+/* Implement the "unwind_sp" gdbarch method.  */
+
+static CORE_ADDR
+arc_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  int sp_regnum = gdbarch_sp_regnum (gdbarch);
+  CORE_ADDR sp = frame_unwind_register_unsigned (next_frame, sp_regnum);
+
+  if (arc_debug)
+    debug_printf ("arc: unwind SP: %s\n", paddress (gdbarch, sp));
+
+  return sp;
+}
+
+/* Implement the "frame_align" gdbarch method.  */
+
+static CORE_ADDR
+arc_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+  return align_down (sp, 4);
+}
+
+/* Frame unwinder for normal frames.  */
+
+static struct arc_frame_cache *
+arc_make_frame_cache (struct frame_info *this_frame)
+{
+  if (arc_debug)
+    debug_printf ("arc: frame_cache\n");
+
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+
+  CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
+  CORE_ADDR prev_pc = get_frame_pc (this_frame);
+
+  CORE_ADDR entrypoint, prologue_end;
+  if (find_pc_partial_function (block_addr, NULL, &entrypoint, &prologue_end))
+    {
+      struct symtab_and_line sal = find_pc_line (entrypoint, 0);
+      if (sal.line == 0)
+	/* No line info so use current PC.  */
+	prologue_end = prev_pc;
+      else if (sal.end < prologue_end)
+	/* The next line begins after the function end.  */
+	prologue_end = sal.end;
+
+      prologue_end = std::min (prologue_end, prev_pc);
+    }
+  else
+    {
+      entrypoint = get_frame_register_unsigned (this_frame,
+						gdbarch_pc_regnum (gdbarch));
+      prologue_end = 0;
+    }
+
+  /* Allocate new frame cache instance and space for saved register info.
+   * FRAME_OBSTACK_ZALLOC will initialize fields to zeroes.  */
+  struct arc_frame_cache *cache
+    = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache);
+  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  /* Should call analyze_prologue here, when it will be implemented.  */
+
+  return cache;
+}
+
+/* Implement the "this_id" frame_unwind method.  */
+
+static void
+arc_frame_this_id (struct frame_info *this_frame, void **this_cache,
+		   struct frame_id *this_id)
+{
+  if (arc_debug)
+    debug_printf ("arc: frame_this_id\n");
+
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+
+  if (*this_cache == NULL)
+    *this_cache = arc_make_frame_cache (this_frame);
+  struct arc_frame_cache *cache = (struct arc_frame_cache *) (*this_cache);
+
+  CORE_ADDR stack_addr = cache->prev_sp;
+
+  /* There are 4 possible situation which decide how frame_id->code_addr is
+     evaluated:
+
+     1) Function is compiled with option -g.  Then frame_id will be created
+     in dwarf_* function and not in this function.  NB: even if target
+     binary is compiled with -g, some std functions like __start and _init
+     are not, so they still will follow one of the following choices.
+
+     2) Function is compiled without -g and binary hasn't been stripped in
+     any way.  In this case GDB still has enough information to evaluate
+     frame code_addr properly.  This case is covered by call to
+     get_frame_func ().
+
+     3) Binary has been striped with option -g (strip debug symbols).  In
+     this case there is still enough symbols for get_frame_func () to work
+     properly, so this case is also covered by it.
+
+     4) Binary has been striped with option -s (strip all symbols).  In this
+     case GDB cannot get function start address properly, so we return current
+     PC value instead.
+   */
+  CORE_ADDR code_addr = get_frame_func (this_frame);
+  if (code_addr == 0)
+    code_addr = get_frame_register_unsigned (this_frame,
+					     gdbarch_pc_regnum (gdbarch));
+
+  *this_id = frame_id_build (stack_addr, code_addr);
+}
+
+/* Implement the "prev_register" frame_unwind method.  */
+
+static struct value *
+arc_frame_prev_register (struct frame_info *this_frame,
+			 void **this_cache, int regnum)
+{
+  if (*this_cache == NULL)
+    *this_cache = arc_make_frame_cache (this_frame);
+  struct arc_frame_cache *cache = (struct arc_frame_cache *) (*this_cache);
+
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+
+  /* If we are asked to unwind the PC, then we need to return BLINK instead:
+     the saved value of PC points into this frame's function's prologue, not
+     the next frame's function's resume location.  */
+  if (regnum == gdbarch_pc_regnum (gdbarch))
+    regnum = ARC_BLINK_REGNUM;
+
+  /* SP is a special case - we should return prev_sp, because
+     trad_frame_get_prev_register will return _current_ SP value.
+     Alternatively we could have stored cache->prev_sp in the cache->saved
+     regs, but here we follow the lead of AArch64, ARM and Xtensa and will
+     leave that logic in this function, instead of prologue analyzers.  That I
+     think is a bit more clear as `saved_regs` should contain saved regs, not
+     computable.
+
+     Because value has been computed, "got_constant" should be used, so that
+     returned value will be a "not_lval" - immutable.  */
+
+  if (regnum == gdbarch_sp_regnum (gdbarch))
+    return frame_unwind_got_constant (this_frame, regnum, cache->prev_sp);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+/* Implement the "init_reg" dwarf2_frame method.  */
+
+static void
+arc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+			   struct dwarf2_frame_state_reg *reg,
+			   struct frame_info *info)
+{
+  if (regnum == gdbarch_pc_regnum (gdbarch))
+    /* The return address column.  */
+    reg->how = DWARF2_FRAME_REG_RA;
+  else if (regnum == gdbarch_sp_regnum (gdbarch))
+    /* The call frame address.  */
+    reg->how = DWARF2_FRAME_REG_CFA;
+}
+
+/* Structure defining the ARC ordinary frame unwind functions.  Since we are
+   the fallback unwinder, we use the default frame sniffer, which always
+   accepts the frame.  */
+
+static const struct frame_unwind arc_frame_unwind = {
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  arc_frame_this_id,
+  arc_frame_prev_register,
+  NULL,
+  default_frame_sniffer,
+  NULL,
+  NULL
+};
+
+
+static const struct frame_base arc_normal_base = {
+  &arc_frame_unwind,
+  arc_frame_base_address,
+  arc_frame_base_address,
+  arc_frame_base_address
+};
+
+/* Initialize target description for the ARC.
+
+   Returns TRUE if input tdesc was valid and in this case it will assign TDESC
+   and TDESC_DATA output parameters.  */
+
+static int
+arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc,
+		struct tdesc_arch_data **tdesc_data)
+{
+  if (arc_debug)
+    debug_printf ("arc: Target description initialization.\n");
+
+  const struct target_desc *tdesc_loc = info.target_desc;
+
+  /* Depending on whether this is ARCompact or ARCv2 we will assign
+     different default registers sets (which will differ in exactly two core
+     registers).  GDB will also refuse to accept register feature from invalid
+     ISA - v2 features can be used only with v2 ARChitecture.  We read
+     bfd_arch_info, which looks like to be a safe bet here, as it looks like it
+     is always initialized even when we don't pass any elf file to GDB at all
+     (it uses default arch in this case).  Also GDB will call this function
+     multiple times, and if XML target description file contains architecture
+     specifications, then GDB will set this architecture to info.bfd_arch_info,
+     overriding value from ELF file if they are different.  That means that,
+     where matters, this value is always our best guess on what CPU we are
+     debugging.  It has been noted that architecture specified in tdesc file
+     has higher precedence over ELF and even "set architecture" - that is,
+     using "set architecture" command will have no effect when tdesc has "arch"
+     tag.  */
+  /* Cannot use arc_mach_is_arcv2 (), because gdbarch is not created yet.  */
+  const int is_arcv2 = (info.bfd_arch_info->mach == bfd_mach_arc_arcv2);
+  int is_reduced_rf;
+  const char *const *core_regs;
+  const char *core_feature_name;
+
+  /* If target doesn't provide a description - use default one.  */
+  if (!tdesc_has_registers (tdesc_loc))
+    {
+      if (is_arcv2)
+	{
+	  tdesc_loc = tdesc_arc_v2;
+	  if (arc_debug)
+	    debug_printf ("arc: Using default register set for ARC v2.\n");
+	}
+      else
+	{
+	  tdesc_loc = tdesc_arc_arcompact;
+	  if (arc_debug)
+	    debug_printf ("arc: Using default register set for ARCompact.\n");
+	}
+    }
+  else
+    {
+      if (arc_debug)
+	debug_printf ("arc: Using provided register set.\n");
+    }
+  gdb_assert (tdesc_loc != NULL);
+
+  /* Now we can search for base registers.  Core registers can be either full
+     or reduced.  Summary:
+
+     - core.v2 + aux-minimal
+     - core-reduced.v2 + aux-minimal
+     - core.arcompact + aux-minimal
+
+     NB: It is entirely feasible to have ARCompact with reduced core regs, but
+     we ignore that because GCC doesn't support that and at the same time
+     ARCompact is considered obsolete, so there is not much reason to support
+     that.  */
+  const struct tdesc_feature *feature
+    = tdesc_find_feature (tdesc_loc, core_v2_feature_name);
+  if (feature != NULL)
+    {
+      /* Confirm that register and architecture match, to prevent accidents in
+	 some situations.  This code will trigger an error if:
+
+	 1. XML tdesc doesn't specify arch explicitly, registers are for arch
+	 X, but ELF specifies arch Y.
+
+	 2. XML tdesc specifies arch X, but contains registers for arch Y.
+
+	 It will not protect from case where XML or ELF specify arch X,
+	 registers are for the same arch X, but the real target is arch Y.  To
+	 detect this case we need to check IDENTITY register.  */
+      if (!is_arcv2)
+	{
+	  arc_print (_("Error: ARC v2 target description supplied for "
+		       "non-ARCv2 target.\n"));
+	  return FALSE;
+	}
+
+      is_reduced_rf = FALSE;
+      core_feature_name = core_v2_feature_name;
+      core_regs = core_v2_register_names;
+    }
+  else
+    {
+      feature = tdesc_find_feature (tdesc_loc, core_reduced_v2_feature_name);
+      if (feature != NULL)
+	{
+	  if (!is_arcv2)
+	    {
+	      arc_print (_("Error: ARC v2 target description supplied for "
+			   "non-ARCv2 target.\n"));
+	      return FALSE;
+	    }
+
+	  is_reduced_rf = TRUE;
+	  core_feature_name = core_reduced_v2_feature_name;
+	  core_regs = core_v2_register_names;
+	}
+      else
+	{
+	  feature = tdesc_find_feature (tdesc_loc,
+					core_arcompact_feature_name);
+	  if (feature != NULL)
+	    {
+	      if (is_arcv2)
+		{
+		  arc_print (_("Error: ARCompact target description supplied "
+			       "for non-ARCompact target.\n"));
+		  return FALSE;
+		}
+
+	      is_reduced_rf = FALSE;
+	      core_feature_name = core_arcompact_feature_name;
+	      core_regs = core_arcompact_register_names;
+	    }
+	  else
+	    {
+	      arc_print (_("Error: Couldn't find core register feature in "
+			   "supplied target description."));
+	      return FALSE;
+	    }
+	}
+    }
+
+  struct tdesc_arch_data *tdesc_data_loc = tdesc_data_alloc ();
+
+  gdb_assert (feature != NULL);
+  int valid_p = 1;
+
+  for (int i = 0; i <= ARC_LAST_CORE_REGNUM; i++)
+    {
+      /* If rf16, then skip extra registers.  */
+      if (is_reduced_rf && ((i >= ARC_R4_REGNUM && i <= ARC_R9_REGNUM)
+			    || (i >= ARC_R16_REGNUM && i <= ARC_R25_REGNUM)))
+	continue;
+
+      valid_p = tdesc_numbered_register (feature, tdesc_data_loc, i,
+					 core_regs[i]);
+
+      /* - Ignore errors in extension registers - they are optional.
+	 - Ignore missing ILINK because it doesn't make sense for Linux.
+	 - Ignore missing ILINK2 when architecture is ARCompact, because it
+	 doesn't make sense for Linux targets.
+
+	 In theory those optional registers should be in separate features, but
+	 that would create numerous but tiny features, which looks like an
+	 overengineering of a rather simple task.  */
+      if (!valid_p && (i <= ARC_SP_REGNUM || i == ARC_BLINK_REGNUM
+		       || i == ARC_LP_COUNT_REGNUM || i == ARC_PCL_REGNUM
+		       || (i == ARC_R30_REGNUM && is_arcv2)))
+	{
+	  arc_print (_("Error: Cannot find required register `%s' in "
+		       "feature `%s'.\n"), core_regs[i], core_feature_name);
+	  tdesc_data_cleanup (tdesc_data_loc);
+	  return FALSE;
+	}
+    }
+
+  /* Mandatory AUX registeres are intentionally few and are common between
+     ARCompact and ARC v2, so same code can be used for both.  */
+  feature = tdesc_find_feature (tdesc_loc, aux_minimal_feature_name);
+  if (feature == NULL)
+    {
+      arc_print (_("Error: Cannot find required feature `%s' in supplied "
+		   "target description.\n"), aux_minimal_feature_name);
+      tdesc_data_cleanup (tdesc_data_loc);
+      return FALSE;
+    }
+
+  for (int i = ARC_FIRST_AUX_REGNUM; i <= ARC_LAST_AUX_REGNUM; i++)
+    {
+      const char *name = aux_minimal_register_names[i - ARC_FIRST_AUX_REGNUM];
+      valid_p = tdesc_numbered_register (feature, tdesc_data_loc, i, name);
+      if (!valid_p)
+	{
+	  arc_print (_("Error: Cannot find required register `%s' "
+		       "in feature `%s'.\n"),
+		     name, tdesc_feature_name (feature));
+	  tdesc_data_cleanup (tdesc_data_loc);
+	  return FALSE;
+	}
+    }
+
+  *tdesc = tdesc_loc;
+  *tdesc_data = tdesc_data_loc;
+
+  return TRUE;
+}
+
+/* Implement the "init" gdbarch method.  */
+
+static struct gdbarch *
+arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  const struct target_desc *tdesc;
+  struct tdesc_arch_data *tdesc_data;
+
+  if (arc_debug)
+    debug_printf ("arc: Architecture initialization.\n");
+
+  if (!arc_tdesc_init (info, &tdesc, &tdesc_data))
+    return NULL;
+
+  /* Allocate the ARC-private target-dependent information structure, and the
+     GDB target-independent information structure.  */
+  struct gdbarch_tdep *tdep = XCNEW (struct gdbarch_tdep);
+  tdep->jb_pc = -1; /* No longjmp support by default.  */
+  struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep);
+
+  /* Data types.  */
+  set_gdbarch_short_bit (gdbarch, 16);
+  set_gdbarch_int_bit (gdbarch, 32);
+  set_gdbarch_long_bit (gdbarch, 32);
+  set_gdbarch_long_long_bit (gdbarch, 64);
+  set_gdbarch_long_long_align_bit (gdbarch, 32);
+  set_gdbarch_float_bit (gdbarch, 32);
+  set_gdbarch_float_format (gdbarch, floatformats_ieee_single);
+  set_gdbarch_double_bit (gdbarch, 64);
+  set_gdbarch_double_format (gdbarch, floatformats_ieee_double);
+  set_gdbarch_ptr_bit (gdbarch, 32);
+  set_gdbarch_addr_bit (gdbarch, 32);
+  set_gdbarch_char_signed (gdbarch, 0);
+
+  set_gdbarch_write_pc (gdbarch, arc_write_pc);
+
+  set_gdbarch_virtual_frame_pointer (gdbarch, arc_virtual_frame_pointer);
+
+  /* tdesc_use_registers expects gdbarch_num_regs to return number of registers
+     parsed by gdbarch_init, and then it will add all of the remaining
+     registers and will increase number of registers.  */
+  set_gdbarch_num_regs (gdbarch, ARC_LAST_REGNUM + 1);
+  set_gdbarch_num_pseudo_regs (gdbarch, 0);
+  set_gdbarch_sp_regnum (gdbarch, ARC_SP_REGNUM);
+  set_gdbarch_pc_regnum (gdbarch, ARC_PC_REGNUM);
+  set_gdbarch_ps_regnum (gdbarch, ARC_STATUS32_REGNUM);
+  set_gdbarch_fp0_regnum (gdbarch, -1);	/* No FPU registers.  */
+
+  set_gdbarch_dummy_id (gdbarch, arc_dummy_id);
+  set_gdbarch_push_dummy_call (gdbarch, arc_push_dummy_call);
+  set_gdbarch_push_dummy_code (gdbarch, arc_push_dummy_code);
+
+  set_gdbarch_cannot_fetch_register (gdbarch, arc_cannot_fetch_register);
+  set_gdbarch_cannot_store_register (gdbarch, arc_cannot_store_register);
+
+  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+
+  set_gdbarch_return_value (gdbarch, arc_return_value);
+
+  set_gdbarch_skip_prologue (gdbarch, arc_skip_prologue);
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, arc_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, arc_sw_breakpoint_from_kind);
+
+  /* On ARC 600 BRK_S instruction advances PC, unlike other ARC cores.  */
+  if (!arc_mach_is_arc600 (gdbarch))
+    set_gdbarch_decr_pc_after_break (gdbarch, 0);
+  else
+    set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
+  set_gdbarch_unwind_pc (gdbarch, arc_unwind_pc);
+  set_gdbarch_unwind_sp (gdbarch, arc_unwind_sp);
+
+  set_gdbarch_frame_align (gdbarch, arc_frame_align);
+
+  set_gdbarch_print_insn (gdbarch, arc_delayed_print_insn);
+
+  set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
+
+  /* "nonsteppable" watchpoint means that watchpoint triggers before
+     instruction is committed, therefore it is required to remove watchpoint
+     to step though instruction that triggers it.  ARC watchpoints trigger
+     only after instruction is committed, thus there is no need to remove
+     them.  In fact on ARC watchpoint for memory writes may trigger with more
+     significant delay, like one or two instructions, depending on type of
+     memory where write is performed (CCM or external) and next instruction
+     after the memory write.  */
+  set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 0);
+
+  /* This doesn't include possible long-immediate value.  */
+  set_gdbarch_max_insn_length (gdbarch, 4);
+
+  /* Frame unwinders and sniffers.  */
+  dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg);
+  dwarf2_append_unwinders (gdbarch);
+  frame_unwind_append_unwinder (gdbarch, &arc_frame_unwind);
+  frame_base_set_default (gdbarch, &arc_normal_base);
+
+  /* Setup stuff specific to a particular environment (baremetal or Linux).
+     It can override functions set earlier.  */
+  gdbarch_init_osabi (info, gdbarch);
+
+  if (tdep->jb_pc >= 0)
+    set_gdbarch_get_longjmp_target (gdbarch, arc_get_longjmp_target);
+
+  tdesc_use_registers (gdbarch, tdesc, tdesc_data);
+
+  return gdbarch;
+}
+
+/* Implement the "dump_tdep" gdbarch method.  */
+
+static void
+arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  fprintf_unfiltered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
+}
+
+/* Suppress warning from -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_arc_tdep;
+
+void
+_initialize_arc_tdep (void)
+{
+  gdbarch_register (bfd_arch_arc, arc_gdbarch_init, arc_dump_tdep);
+
+  initialize_tdesc_arc_v2 ();
+  initialize_tdesc_arc_arcompact ();
+
+  /* Register ARC-specific commands with gdb.  */
+
+  /* Debug internals for ARC GDB.  */
+  add_setshow_zinteger_cmd ("arc", class_maintenance,
+			    &arc_debug,
+			    _("Set ARC specific debugging."),
+			    _("Show ARC specific debugging."),
+			    _("Non-zero enables ARC specific debugging."),
+			    NULL, NULL, &setdebuglist, &showdebuglist);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-tdep.h ./gdb/arc-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arc-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arc-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,110 @@
+/* Target dependent code for ARC arhitecture, for GDB.
+
+   Copyright 2005-2017 Free Software Foundation, Inc.
+   Contributed by Synopsys Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef ARC_TDEP_H
+#define ARC_TDEP_H
+
+/* Need disassemble_info.  */
+#include "dis-asm.h"
+
+enum arc_regnum
+  {
+    /* Core registers.  */
+    ARC_R0_REGNUM = 0,
+    ARC_FIRST_CORE_REGNUM = ARC_R0_REGNUM,
+    ARC_R1_REGNUM = 1,
+    ARC_R4_REGNUM = 4,
+    ARC_R7_REGNUM = 7,
+    ARC_R9_REGNUM = 9,
+    ARC_R13_REGNUM = 13,
+    ARC_R16_REGNUM = 16,
+    ARC_R25_REGNUM = 25,
+    /* Global data pointer.  */
+    ARC_GP_REGNUM,
+    /* Frame pointer.  */
+    ARC_FP_REGNUM,
+    /* Stack pointer.  */
+    ARC_SP_REGNUM,
+    /* Return address from interrupt.  */
+    ARC_ILINK_REGNUM,
+    ARC_R30_REGNUM,
+    /* Return address from function.  */
+    ARC_BLINK_REGNUM,
+    /* Zero-delay loop counter.  */
+    ARC_LP_COUNT_REGNUM = 60,
+    /* Program counter, aligned to 4-bytes, read-only.  */
+    ARC_PCL_REGNUM,
+    ARC_LAST_CORE_REGNUM = ARC_PCL_REGNUM,
+    /* AUX registers.  */
+    /* Actual program counter.  */
+    ARC_PC_REGNUM,
+    ARC_FIRST_AUX_REGNUM = ARC_PC_REGNUM,
+    /* Status register.  */
+    ARC_STATUS32_REGNUM,
+    ARC_LAST_REGNUM = ARC_STATUS32_REGNUM,
+    ARC_LAST_AUX_REGNUM = ARC_STATUS32_REGNUM,
+
+    /* Additional ABI constants.  */
+    ARC_FIRST_ARG_REGNUM = ARC_R0_REGNUM,
+    ARC_LAST_ARG_REGNUM = ARC_R7_REGNUM,
+    ARC_FIRST_CALLEE_SAVED_REGNUM = ARC_R13_REGNUM,
+    ARC_LAST_CALLEE_SAVED_REGNUM = ARC_R25_REGNUM,
+  };
+
+/* Number of bytes in ARC register.  All ARC registers are considered 32-bit.
+   Those registers, which are actually shorter has zero-on-read for extra bits.
+   Longer registers are represented as pairs of 32-bit registers.  */
+#define ARC_REGISTER_SIZE  4
+
+#define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args)
+
+extern int arc_debug;
+
+/* Target-dependent information.  */
+
+struct gdbarch_tdep
+{
+  /* Offset to PC value in jump buffer.  If this is negative, longjmp
+     support will be disabled.  */
+  int jb_pc;
+};
+
+/* Utility functions used by other ARC-specific modules.  */
+
+static inline int
+arc_mach_is_arc600 (struct gdbarch *gdbarch)
+{
+  return (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc600
+	  || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601);
+}
+
+static inline int
+arc_mach_is_arc700 (struct gdbarch *gdbarch)
+{
+  return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc700;
+}
+
+static inline int
+arc_mach_is_arcv2 (struct gdbarch *gdbarch)
+{
+  return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arcv2;
+}
+
+#endif /* ARC_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-bsd-tdep.c ./gdb/arm-bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arm-bsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,122 @@
+/* Target-dependent code for ARM BSD's.
+
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+
+#include "arm-tdep.h"
+
+/* Core file support.  */
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define ARMBSD_SIZEOF_GREGS	(17 * 4)
+
+/* Sizeof `struct fpreg' in <machine/reg.h.  */
+#define ARMBSD_SIZEOF_FPREGS	((1 + (8 * 3)) * 4)
+
+static int
+armbsd_fpreg_offset (int regnum)
+{
+  if (regnum == ARM_FPS_REGNUM)
+    return 0;
+
+  return 4 + (regnum - ARM_F0_REGNUM) * 12;
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+armbsd_supply_fpregset (const struct regset *regset,
+			struct regcache *regcache,
+			int regnum, const void *fpregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
+  int i;
+
+  gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
+
+  for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + armbsd_fpreg_offset (i));
+    }
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+armbsd_supply_gregset (const struct regset *regset,
+		       struct regcache *regcache,
+		       int regnum, const void *gregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  gdb_assert (len >= ARMBSD_SIZEOF_GREGS);
+
+  for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + i * 4);
+    }
+
+  if (regnum == ARM_PS_REGNUM || regnum == -1)
+    regcache_raw_supply (regcache, i, regs + 16 * 4);
+
+  if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS)
+    {
+      regs += ARMBSD_SIZEOF_GREGS;
+      len -= ARMBSD_SIZEOF_GREGS;
+      armbsd_supply_fpregset (regset, regcache, regnum, regs, len);
+    }
+}
+
+/* ARM register sets.  */
+
+static const struct regset armbsd_gregset =
+{
+  NULL,
+  armbsd_supply_gregset,
+  NULL,
+  REGSET_VARIABLE_SIZE
+};
+
+static const struct regset armbsd_fpregset =
+{
+  NULL,
+  armbsd_supply_fpregset
+};
+
+/* Iterate over supported core file register note sections. */
+
+void
+armbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				     iterate_over_regset_sections_cb *cb,
+				     void *cb_data,
+				     const struct regcache *regcache)
+{
+  cb (".reg", ARMBSD_SIZEOF_GREGS, &armbsd_gregset, NULL, cb_data);
+  cb (".reg2", ARMBSD_SIZEOF_FPREGS, &armbsd_fpregset, NULL, cb_data);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armbsd-tdep.c ./gdb/armbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/armbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,122 +0,0 @@
-/* Target-dependent code for ARM BSD's.
-
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-
-#include "arm-tdep.h"
-
-/* Core file support.  */
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define ARMBSD_SIZEOF_GREGS	(17 * 4)
-
-/* Sizeof `struct fpreg' in <machine/reg.h.  */
-#define ARMBSD_SIZEOF_FPREGS	((1 + (8 * 3)) * 4)
-
-static int
-armbsd_fpreg_offset (int regnum)
-{
-  if (regnum == ARM_FPS_REGNUM)
-    return 0;
-
-  return 4 + (regnum - ARM_F0_REGNUM) * 12;
-}
-
-/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-   in the floating-point register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-armbsd_supply_fpregset (const struct regset *regset,
-			struct regcache *regcache,
-			int regnum, const void *fpregs, size_t len)
-{
-  const gdb_byte *regs = fpregs;
-  int i;
-
-  gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
-
-  for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + armbsd_fpreg_offset (i));
-    }
-}
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-armbsd_supply_gregset (const struct regset *regset,
-		       struct regcache *regcache,
-		       int regnum, const void *gregs, size_t len)
-{
-  const gdb_byte *regs = gregs;
-  int i;
-
-  gdb_assert (len >= ARMBSD_SIZEOF_GREGS);
-
-  for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * 4);
-    }
-
-  if (regnum == ARM_PS_REGNUM || regnum == -1)
-    regcache_raw_supply (regcache, i, regs + 16 * 4);
-
-  if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS)
-    {
-      regs += ARMBSD_SIZEOF_GREGS;
-      len -= ARMBSD_SIZEOF_GREGS;
-      armbsd_supply_fpregset (regset, regcache, regnum, regs, len);
-    }
-}
-
-/* ARM register sets.  */
-
-static const struct regset armbsd_gregset =
-{
-  NULL,
-  armbsd_supply_gregset,
-  NULL,
-  REGSET_VARIABLE_SIZE
-};
-
-static const struct regset armbsd_fpregset =
-{
-  NULL,
-  armbsd_supply_fpregset
-};
-
-/* Iterate over supported core file register note sections. */
-
-void
-armbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				     iterate_over_regset_sections_cb *cb,
-				     void *cb_data,
-				     const struct regcache *regcache)
-{
-  cb (".reg", ARMBSD_SIZEOF_GREGS, &armbsd_gregset, NULL, cb_data);
-  cb (".reg2", ARMBSD_SIZEOF_FPREGS, &armbsd_fpregset, NULL, cb_data);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-nat.c ./gdb/arm-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux on ARM native support.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,10 +29,11 @@
 
 #include "arm-tdep.h"
 #include "arm-linux-tdep.h"
+#include "aarch32-linux-nat.h"
 
 #include <elf/common.h>
 #include <sys/user.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/utsname.h>
 #include <sys/procfs.h>
 
@@ -65,64 +66,6 @@
 
 extern int arm_apcs_32;
 
-/* On GNU/Linux, threads are implemented as pseudo-processes, in which
-   case we may be tracing more than one process at a time.  In that
-   case, inferior_ptid will contain the main process ID and the
-   individual thread (process) ID.  get_thread_id () is used to get
-   the thread id if it's available, and the process id otherwise.  */
-
-static int
-get_thread_id (ptid_t ptid)
-{
-  int tid = ptid_get_lwp (ptid);
-  if (0 == tid)
-    tid = ptid_get_pid (ptid);
-  return tid;
-}
-
-#define GET_THREAD_ID(PTID)	get_thread_id (PTID)
-
-/* Get the value of a particular register from the floating point
-   state of the process and store it into regcache.  */
-
-static void
-fetch_fpregister (struct regcache *regcache, int regno)
-{
-  int ret, tid;
-  gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
-
-  /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
-
-  /* Read the floating point state.  */
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &fp;
-      iov.iov_len = ARM_LINUX_SIZEOF_NWFPE;
-
-      ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iov);
-    }
-  else
-    ret = ptrace (PT_GETFPREGS, tid, 0, fp);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to fetch floating point register."));
-      return;
-    }
-
-  /* Fetch fpsr.  */
-  if (ARM_FPS_REGNUM == regno)
-    regcache_raw_supply (regcache, ARM_FPS_REGNUM,
-			 fp + NWFPE_FPSR_OFFSET);
-
-  /* Fetch the floating point register.  */
-  if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
-    supply_nwfpe_register (regcache, regno, fp);
-}
-
 /* Get the whole floating point state of the process and store it
    into regcache.  */
 
@@ -133,7 +76,7 @@ fetch_fpregs (struct regcache *regcache)
   gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   /* Read the floating point state.  */
   if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -149,10 +92,7 @@ fetch_fpregs (struct regcache *regcache)
     ret = ptrace (PT_GETFPREGS, tid, 0, fp);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch the floating point registers."));
-      return;
-    }
+    perror_with_name (_("Unable to fetch the floating point registers."));
 
   /* Fetch fpsr.  */
   regcache_raw_supply (regcache, ARM_FPS_REGNUM,
@@ -163,65 +103,6 @@ fetch_fpregs (struct regcache *regcache)
     supply_nwfpe_register (regcache, regno, fp);
 }
 
-/* Save a particular register into the floating point state of the
-   process using the contents from regcache.  */
-
-static void
-store_fpregister (const struct regcache *regcache, int regno)
-{
-  int ret, tid;
-  gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
-
-  /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
-
-  /* Read the floating point state.  */
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &fp;
-      iov.iov_len = ARM_LINUX_SIZEOF_NWFPE;
-
-      ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iov);
-    }
-  else
-    ret = ptrace (PT_GETFPREGS, tid, 0, fp);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to fetch the floating point registers."));
-      return;
-    }
-
-  /* Store fpsr.  */
-  if (ARM_FPS_REGNUM == regno
-      && REG_VALID == regcache_register_status (regcache, ARM_FPS_REGNUM))
-    regcache_raw_collect (regcache, ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
-
-  /* Store the floating point register.  */
-  if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
-    collect_nwfpe_register (regcache, regno, fp);
-
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &fp;
-      iov.iov_len = ARM_LINUX_SIZEOF_NWFPE;
-
-      ret = ptrace (PTRACE_SETREGSET, tid, NT_FPREGSET, &iov);
-    }
-  else
-    ret = ptrace (PTRACE_SETFPREGS, tid, 0, fp);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to store floating point register."));
-      return;
-    }
-}
-
 /* Save the whole floating point state of the process using
    the contents from regcache.  */
 
@@ -232,7 +113,7 @@ store_fpregs (const struct regcache *reg
   gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   /* Read the floating point state.  */
   if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -249,10 +130,7 @@ store_fpregs (const struct regcache *reg
     ret = ptrace (PT_GETFPREGS, tid, 0, fp);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch the floating point registers."));
-      return;
-    }
+    perror_with_name (_("Unable to fetch the floating point registers."));
 
   /* Store fpsr.  */
   if (REG_VALID == regcache_register_status (regcache, ARM_FPS_REGNUM))
@@ -276,63 +154,7 @@ store_fpregs (const struct regcache *reg
     ret = ptrace (PTRACE_SETFPREGS, tid, 0, fp);
 
   if (ret < 0)
-    {
-      warning (_("Unable to store floating point registers."));
-      return;
-    }
-}
-
-/* Fetch a general register of the process and store into
-   regcache.  */
-
-static void
-fetch_register (struct regcache *regcache, int regno)
-{
-  int ret, tid;
-  elf_gregset_t regs;
-
-  /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
-
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &regs;
-      iov.iov_len = sizeof (regs);
-
-      ret = ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iov);
-    }
-  else
-    ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to fetch general register."));
-      return;
-    }
-
-  if (regno >= ARM_A1_REGNUM && regno < ARM_PC_REGNUM)
-    regcache_raw_supply (regcache, regno, (char *) &regs[regno]);
-
-  if (ARM_PS_REGNUM == regno)
-    {
-      if (arm_apcs_32)
-        regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			     (char *) &regs[ARM_CPSR_GREGNUM]);
-      else
-        regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			     (char *) &regs[ARM_PC_REGNUM]);
-    }
-    
-  if (ARM_PC_REGNUM == regno)
-    { 
-      regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
-			      (get_regcache_arch (regcache),
-			       regs[ARM_PC_REGNUM]);
-      regcache_raw_supply (regcache, ARM_PC_REGNUM,
-			   (char *) &regs[ARM_PC_REGNUM]);
-    }
+    perror_with_name (_("Unable to store floating point registers."));
 }
 
 /* Fetch all general registers of the process and store into
@@ -345,7 +167,7 @@ fetch_regs (struct regcache *regcache)
   elf_gregset_t regs;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   if (have_ptrace_getregset == TRIBOOL_TRUE)
     {
@@ -360,87 +182,9 @@ fetch_regs (struct regcache *regcache)
     ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch general registers."));
-      return;
-    }
-
-  for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
-    regcache_raw_supply (regcache, regno, (char *) &regs[regno]);
-
-  if (arm_apcs_32)
-    regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			 (char *) &regs[ARM_CPSR_GREGNUM]);
-  else
-    regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			 (char *) &regs[ARM_PC_REGNUM]);
+    perror_with_name (_("Unable to fetch general registers."));
 
-  regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
-			  (get_regcache_arch (regcache), regs[ARM_PC_REGNUM]);
-  regcache_raw_supply (regcache, ARM_PC_REGNUM,
-		       (char *) &regs[ARM_PC_REGNUM]);
-}
-
-/* Store all general registers of the process from the values in
-   regcache.  */
-
-static void
-store_register (const struct regcache *regcache, int regno)
-{
-  int ret, tid;
-  elf_gregset_t regs;
-  
-  if (REG_VALID != regcache_register_status (regcache, regno))
-    return;
-
-  /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
-
-  /* Get the general registers from the process.  */
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &regs;
-      iov.iov_len = sizeof (regs);
-
-      ret = ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iov);
-    }
-  else
-    ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to fetch general registers."));
-      return;
-    }
-
-  if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
-    regcache_raw_collect (regcache, regno, (char *) &regs[regno]);
-  else if (arm_apcs_32 && regno == ARM_PS_REGNUM)
-    regcache_raw_collect (regcache, regno,
-			 (char *) &regs[ARM_CPSR_GREGNUM]);
-  else if (!arm_apcs_32 && regno == ARM_PS_REGNUM)
-    regcache_raw_collect (regcache, ARM_PC_REGNUM,
-			 (char *) &regs[ARM_PC_REGNUM]);
-
-  if (have_ptrace_getregset == TRIBOOL_TRUE)
-    {
-      struct iovec iov;
-
-      iov.iov_base = &regs;
-      iov.iov_len = sizeof (regs);
-
-      ret = ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, &iov);
-    }
-  else
-    ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
-
-  if (ret < 0)
-    {
-      warning (_("Unable to store general register."));
-      return;
-    }
+  aarch32_gp_regcache_supply (regcache, (uint32_t *) regs, arm_apcs_32);
 }
 
 static void
@@ -450,7 +194,7 @@ store_regs (const struct regcache *regca
   elf_gregset_t regs;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   /* Fetch the general registers.  */
   if (have_ptrace_getregset == TRIBOOL_TRUE)
@@ -466,20 +210,9 @@ store_regs (const struct regcache *regca
     ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch general registers."));
-      return;
-    }
-
-  for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
-    {
-      if (REG_VALID == regcache_register_status (regcache, regno))
-	regcache_raw_collect (regcache, regno, (char *) &regs[regno]);
-    }
+    perror_with_name (_("Unable to fetch general registers."));
 
-  if (arm_apcs_32 && REG_VALID == regcache_register_status (regcache, ARM_PS_REGNUM))
-    regcache_raw_collect (regcache, ARM_PS_REGNUM,
-			 (char *) &regs[ARM_CPSR_GREGNUM]);
+  aarch32_gp_regcache_collect (regcache, (uint32_t *) regs, arm_apcs_32);
 
   if (have_ptrace_getregset == TRIBOOL_TRUE)
     {
@@ -494,10 +227,7 @@ store_regs (const struct regcache *regca
     ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
 
   if (ret < 0)
-    {
-      warning (_("Unable to store general registers."));
-      return;
-    }
+    perror_with_name (_("Unable to store general registers."));
 }
 
 /* Fetch all WMMX registers of the process and store into
@@ -512,14 +242,11 @@ fetch_wmmx_regs (struct regcache *regcac
   int ret, regno, tid;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf);
   if (ret < 0)
-    {
-      warning (_("Unable to fetch WMMX registers."));
-      return;
-    }
+    perror_with_name (_("Unable to fetch WMMX registers."));
 
   for (regno = 0; regno < 16; regno++)
     regcache_raw_supply (regcache, regno + ARM_WR0_REGNUM,
@@ -541,14 +268,11 @@ store_wmmx_regs (const struct regcache *
   int ret, regno, tid;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf);
   if (ret < 0)
-    {
-      warning (_("Unable to fetch WMMX registers."));
-      return;
-    }
+    perror_with_name (_("Unable to fetch WMMX registers."));
 
   for (regno = 0; regno < 16; regno++)
     if (REG_VALID == regcache_register_status (regcache,
@@ -571,27 +295,19 @@ store_wmmx_regs (const struct regcache *
   ret = ptrace (PTRACE_SETWMMXREGS, tid, 0, regbuf);
 
   if (ret < 0)
-    {
-      warning (_("Unable to store WMMX registers."));
-      return;
-    }
+    perror_with_name (_("Unable to store WMMX registers."));
 }
 
-/* Fetch and store VFP Registers.  The kernel object has space for 32
-   64-bit registers, and the FPSCR.  This is even when on a VFPv2 or
-   VFPv3D16 target.  */
-#define VFP_REGS_SIZE (32 * 8 + 4)
-
 static void
 fetch_vfp_regs (struct regcache *regcache)
 {
-  char regbuf[VFP_REGS_SIZE];
+  gdb_byte regbuf[VFP_REGS_SIZE];
   int ret, regno, tid;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   if (have_ptrace_getregset == TRIBOOL_TRUE)
     {
@@ -605,29 +321,22 @@ fetch_vfp_regs (struct regcache *regcach
     ret = ptrace (PTRACE_GETVFPREGS, tid, 0, regbuf);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch VFP registers."));
-      return;
-    }
+    perror_with_name (_("Unable to fetch VFP registers."));
 
-  for (regno = 0; regno < tdep->vfp_register_count; regno++)
-    regcache_raw_supply (regcache, regno + ARM_D0_REGNUM,
-			 (char *) regbuf + regno * 8);
-
-  regcache_raw_supply (regcache, ARM_FPSCR_REGNUM,
-		       (char *) regbuf + 32 * 8);
+  aarch32_vfp_regcache_supply (regcache, regbuf,
+			       tdep->vfp_register_count);
 }
 
 static void
 store_vfp_regs (const struct regcache *regcache)
 {
-  char regbuf[VFP_REGS_SIZE];
+  gdb_byte regbuf[VFP_REGS_SIZE];
   int ret, regno, tid;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
 
   if (have_ptrace_getregset == TRIBOOL_TRUE)
     {
@@ -641,17 +350,10 @@ store_vfp_regs (const struct regcache *r
     ret = ptrace (PTRACE_GETVFPREGS, tid, 0, regbuf);
 
   if (ret < 0)
-    {
-      warning (_("Unable to fetch VFP registers (for update)."));
-      return;
-    }
-
-  for (regno = 0; regno < tdep->vfp_register_count; regno++)
-    regcache_raw_collect (regcache, regno + ARM_D0_REGNUM,
-			  (char *) regbuf + regno * 8);
+    perror_with_name (_("Unable to fetch VFP registers (for update)."));
 
-  regcache_raw_collect (regcache, ARM_FPSCR_REGNUM,
-			(char *) regbuf + 32 * 8);
+  aarch32_vfp_regcache_collect (regcache, regbuf,
+				tdep->vfp_register_count);
 
   if (have_ptrace_getregset == TRIBOOL_TRUE)
     {
@@ -665,10 +367,7 @@ store_vfp_regs (const struct regcache *r
     ret = ptrace (PTRACE_SETVFPREGS, tid, 0, regbuf);
 
   if (ret < 0)
-    {
-      warning (_("Unable to store VFP registers."));
-      return;
-    }
+    perror_with_name (_("Unable to store VFP registers."));
 }
 
 /* Fetch registers from the child process.  Fetch all registers if
@@ -685,18 +384,19 @@ arm_linux_fetch_inferior_registers (stru
   if (-1 == regno)
     {
       fetch_regs (regcache);
-      fetch_fpregs (regcache);
       if (tdep->have_wmmx_registers)
 	fetch_wmmx_regs (regcache);
       if (tdep->vfp_register_count > 0)
 	fetch_vfp_regs (regcache);
+      if (tdep->have_fpa_registers)
+	fetch_fpregs (regcache);
     }
-  else 
+  else
     {
       if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM)
-        fetch_register (regcache, regno);
+	fetch_regs (regcache);
       else if (regno >= ARM_F0_REGNUM && regno <= ARM_FPS_REGNUM)
-        fetch_fpregister (regcache, regno);
+	fetch_fpregs (regcache);
       else if (tdep->have_wmmx_registers
 	       && regno >= ARM_WR0_REGNUM && regno <= ARM_WCGR7_REGNUM)
 	fetch_wmmx_regs (regcache);
@@ -721,18 +421,19 @@ arm_linux_store_inferior_registers (stru
   if (-1 == regno)
     {
       store_regs (regcache);
-      store_fpregs (regcache);
       if (tdep->have_wmmx_registers)
 	store_wmmx_regs (regcache);
       if (tdep->vfp_register_count > 0)
 	store_vfp_regs (regcache);
+      if (tdep->have_fpa_registers)
+	store_fpregs (regcache);
     }
   else
     {
       if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM)
-        store_register (regcache, regno);
+	store_regs (regcache);
       else if ((regno >= ARM_F0_REGNUM) && (regno <= ARM_FPS_REGNUM))
-        store_fpregister (regcache, regno);
+	store_fpregs (regcache);
       else if (tdep->have_wmmx_registers
 	       && regno >= ARM_WR0_REGNUM && regno <= ARM_WCGR7_REGNUM)
 	store_wmmx_regs (regcache);
@@ -778,7 +479,7 @@ supply_fpregset (struct regcache *regcac
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
                     lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -801,7 +502,7 @@ arm_linux_read_description (struct targe
     {
       elf_gregset_t gpregs;
       struct iovec iov;
-      int tid = GET_THREAD_ID (inferior_ptid);
+      int tid = ptid_get_lwp (inferior_ptid);
 
       iov.iov_base = &gpregs;
       iov.iov_len = sizeof (gpregs);
@@ -840,7 +541,7 @@ arm_linux_read_description (struct targe
 	 registers.  Support was added in 2.6.30.  */
       pid = ptid_get_lwp (inferior_ptid);
       errno = 0;
-      buf = alloca (VFP_REGS_SIZE);
+      buf = (char *) alloca (VFP_REGS_SIZE);
       if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
 	  && errno == EIO)
 	result = NULL;
@@ -884,7 +585,7 @@ arm_linux_get_hwbp_cap (void)
       int tid;
       unsigned int val;
 
-      tid = GET_THREAD_ID (inferior_ptid);
+      tid = ptid_get_lwp (inferior_ptid);
       if (ptrace (PTRACE_GETHBPREGS, tid, 0, &val) < 0)
 	available = 0;
       else
@@ -934,7 +635,8 @@ arm_linux_get_hw_watchpoint_count (void)
    there is not an appropriate resource available, otherwise returns 1.  */
 static int
 arm_linux_can_use_hw_breakpoint (struct target_ops *self,
-				 int type, int cnt, int ot)
+				 enum bptype type,
+				 int cnt, int ot)
 {
   if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
       || type == bp_access_watchpoint || type == bp_watchpoint)
@@ -1055,7 +757,7 @@ arm_linux_add_process (pid_t pid)
 {
   struct arm_linux_process_info *proc;
 
-  proc = xcalloc (1, sizeof (*proc));
+  proc = XCNEW (struct arm_linux_process_info);
   proc->pid = pid;
 
   proc->next = arm_linux_process_list;
@@ -1170,14 +872,14 @@ arm_linux_hw_breakpoint_initialize (stru
   p->control = arm_hwbp_control_initialize (mask, arm_hwbp_break, 1);
 }
 
-/* Get the ARM hardware breakpoint type from the RW value we're given when
-   asked to set a watchpoint.  */
+/* Get the ARM hardware breakpoint type from the TYPE value we're
+   given when asked to set a watchpoint.  */
 static arm_hwbp_type 
-arm_linux_get_hwbp_type (int rw)
+arm_linux_get_hwbp_type (enum target_hw_bp_type type)
 {
-  if (rw == hw_read)
+  if (type == hw_read)
     return arm_hwbp_load;
-  else if (rw == hw_write)
+  else if (type == hw_write)
     return arm_hwbp_store;
   else
     return arm_hwbp_access;
@@ -1186,7 +888,8 @@ arm_linux_get_hwbp_type (int rw)
 /* Initialize the hardware breakpoint structure P for a watchpoint at ADDR
    to LEN.  The type of watchpoint is given in RW.  */
 static void
-arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len, int rw,
+arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len,
+				    enum target_hw_bp_type type,
 				    struct arm_linux_hw_breakpoint *p)
 {
   const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
@@ -1199,7 +902,7 @@ arm_linux_hw_watchpoint_initialize (CORE
 
   p->address = (unsigned int) addr;
   p->control = arm_hwbp_control_initialize (mask, 
-					    arm_linux_get_hwbp_type (rw), 1);
+					    arm_linux_get_hwbp_type (type), 1);
 }
 
 /* Are two break-/watch-points equal?  */
@@ -1395,7 +1098,8 @@ arm_linux_region_ok_for_hw_watchpoint (s
 /* Insert a Hardware breakpoint.  */
 static int
 arm_linux_insert_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int rw,
+			     CORE_ADDR addr, int len,
+			     enum target_hw_bp_type rw,
 			     struct expression *cond)
 {
   struct lwp_info *lp;
@@ -1413,8 +1117,8 @@ arm_linux_insert_watchpoint (struct targ
 
 /* Remove a hardware breakpoint.  */
 static int
-arm_linux_remove_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int rw,
+arm_linux_remove_watchpoint (struct target_ops *self, CORE_ADDR addr,
+			     int len, enum target_hw_bp_type rw,
 			     struct expression *cond)
 {
   struct lwp_info *lp;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-tdep.c ./gdb/arm-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux on ARM target support.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,6 +35,9 @@
 #include "auxv.h"
 #include "xml-syscall.h"
 
+#include "arch/arm.h"
+#include "arch/arm-get-next-pcs.h"
+#include "arch/arm-linux.h"
 #include "arm-tdep.h"
 #include "arm-linux-tdep.h"
 #include "linux-tdep.h"
@@ -257,6 +260,23 @@ static const gdb_byte arm_linux_thumb2_l
 #define ARM_LDR_PC_SP_12		0xe49df00c
 #define ARM_LDR_PC_SP_4			0xe49df004
 
+/* Syscall number for sigreturn.  */
+#define ARM_SIGRETURN 119
+/* Syscall number for rt_sigreturn.  */
+#define ARM_RT_SIGRETURN 173
+
+static CORE_ADDR
+  arm_linux_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self);
+
+/* Operation function pointers for get_next_pcs.  */
+static struct arm_get_next_pcs_ops arm_linux_get_next_pcs_ops = {
+  arm_get_next_pcs_read_memory_unsigned_integer,
+  arm_linux_get_next_pcs_syscall_next_pc,
+  arm_get_next_pcs_addr_bits_remove,
+  arm_get_next_pcs_is_thumb,
+  arm_linux_get_next_pcs_fixup,
+};
+
 static void
 arm_linux_sigtramp_cache (struct frame_info *this_frame,
 			  struct trad_frame_cache *this_cache,
@@ -278,51 +298,7 @@ arm_linux_sigtramp_cache (struct frame_i
   trad_frame_set_id (this_cache, frame_id_build (sp, func));
 }
 
-/* There are a couple of different possible stack layouts that
-   we need to support.
-
-   Before version 2.6.18, the kernel used completely independent
-   layouts for non-RT and RT signals.  For non-RT signals the stack
-   began directly with a struct sigcontext.  For RT signals the stack
-   began with two redundant pointers (to the siginfo and ucontext),
-   and then the siginfo and ucontext.
-
-   As of version 2.6.18, the non-RT signal frame layout starts with
-   a ucontext and the RT signal frame starts with a siginfo and then
-   a ucontext.  Also, the ucontext now has a designated save area
-   for coprocessor registers.
-
-   For RT signals, it's easy to tell the difference: we look for
-   pinfo, the pointer to the siginfo.  If it has the expected
-   value, we have an old layout.  If it doesn't, we have the new
-   layout.
-
-   For non-RT signals, it's a bit harder.  We need something in one
-   layout or the other with a recognizable offset and value.  We can't
-   use the return trampoline, because ARM usually uses SA_RESTORER,
-   in which case the stack return trampoline is not filled in.
-   We can't use the saved stack pointer, because sigaltstack might
-   be in use.  So for now we guess the new layout...  */
-
-/* There are three words (trap_no, error_code, oldmask) in
-   struct sigcontext before r0.  */
-#define ARM_SIGCONTEXT_R0 0xc
-
-/* There are five words (uc_flags, uc_link, and three for uc_stack)
-   in the ucontext_t before the sigcontext.  */
-#define ARM_UCONTEXT_SIGCONTEXT 0x14
-
-/* There are three elements in an rt_sigframe before the ucontext:
-   pinfo, puc, and info.  The first two are pointers and the third
-   is a struct siginfo, with size 128 bytes.  We could follow puc
-   to the ucontext, but it's simpler to skip the whole thing.  */
-#define ARM_OLD_RT_SIGFRAME_SIGINFO 0x8
-#define ARM_OLD_RT_SIGFRAME_UCONTEXT 0x88
-
-#define ARM_NEW_RT_SIGFRAME_UCONTEXT 0x80
-
-#define ARM_NEW_SIGFRAME_MAGIC 0x5ac3c35a
-
+/* See arm-linux.h for stack layout details.  */
 static void
 arm_linux_sigreturn_init (const struct tramp_frame *self,
 			  struct frame_info *this_frame,
@@ -506,7 +482,7 @@ arm_linux_supply_gregset (const struct r
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  const gdb_byte *gregs = gregs_buf;
+  const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
   int regno;
   CORE_ADDR reg_pc;
   gdb_byte pc_buf[INT_REGISTER_SIZE];
@@ -542,7 +518,7 @@ arm_linux_collect_gregset (const struct 
 			   const struct regcache *regcache,
 			   int regnum, void *gregs_buf, size_t len)
 {
-  gdb_byte *gregs = gregs_buf;
+  gdb_byte *gregs = (gdb_byte *) gregs_buf;
   int regno;
 
   for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
@@ -649,7 +625,7 @@ arm_linux_supply_nwfpe (const struct reg
 			struct regcache *regcache,
 			int regnum, const void *regs_buf, size_t len)
 {
-  const gdb_byte *regs = regs_buf;
+  const gdb_byte *regs = (const gdb_byte *) regs_buf;
   int regno;
 
   if (regnum == ARM_FPS_REGNUM || regnum == -1)
@@ -666,7 +642,7 @@ arm_linux_collect_nwfpe (const struct re
 			 const struct regcache *regcache,
 			 int regnum, void *regs_buf, size_t len)
 {
-  gdb_byte *regs = regs_buf;
+  gdb_byte *regs = (gdb_byte *) regs_buf;
   int regno;
 
   for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -687,7 +663,7 @@ arm_linux_supply_vfp (const struct regse
 		      struct regcache *regcache,
 		      int regnum, const void *regs_buf, size_t len)
 {
-  const gdb_byte *regs = regs_buf;
+  const gdb_byte *regs = (const gdb_byte *) regs_buf;
   int regno;
 
   if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
@@ -704,7 +680,7 @@ arm_linux_collect_vfp (const struct regs
 			 const struct regcache *regcache,
 			 int regnum, void *regs_buf, size_t len)
 {
-  gdb_byte *regs = regs_buf;
+  gdb_byte *regs = (gdb_byte *) regs_buf;
   int regno;
 
   if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
@@ -805,6 +781,42 @@ arm_linux_sigreturn_return_addr (struct 
   return 0;
 }
 
+/* Find the value of the next PC after a sigreturn or rt_sigreturn syscall
+   based on current processor state.  In addition, set IS_THUMB depending
+   on whether we will return to ARM or Thumb code.  */
+
+static CORE_ADDR
+arm_linux_sigreturn_next_pc (struct regcache *regcache,
+			     unsigned long svc_number, int *is_thumb)
+{
+  ULONGEST sp;
+  unsigned long sp_data;
+  CORE_ADDR next_pc = 0;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  int pc_offset = 0;
+  int is_sigreturn = 0;
+  CORE_ADDR cpsr;
+
+  gdb_assert (svc_number == ARM_SIGRETURN
+	      || svc_number == ARM_RT_SIGRETURN);
+
+  is_sigreturn = (svc_number == ARM_SIGRETURN);
+  regcache_cooked_read_unsigned (regcache, ARM_SP_REGNUM, &sp);
+  sp_data = read_memory_unsigned_integer (sp, 4, byte_order);
+
+  pc_offset = arm_linux_sigreturn_next_pc_offset (sp, sp_data, svc_number,
+						  is_sigreturn);
+
+  next_pc = read_memory_unsigned_integer (sp + pc_offset, 4, byte_order);
+
+  /* Set IS_THUMB according the CPSR saved on the stack.  */
+  cpsr = read_memory_unsigned_integer (sp + pc_offset + 4, 4, byte_order);
+  *is_thumb = ((cpsr & arm_psr_thumb_bit (gdbarch)) != 0);
+
+  return next_pc;
+}
+
 /* At a ptrace syscall-stop, return the syscall number.  This either
    comes from the SWI instruction (OABI) or from r7 (EABI).
 
@@ -815,7 +827,6 @@ arm_linux_get_syscall_number (struct gdb
 			      ptid_t ptid)
 {
   struct regcache *regs = get_thread_regcache (ptid);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   ULONGEST pc;
   ULONGEST cpsr;
@@ -858,25 +869,22 @@ arm_linux_get_syscall_number (struct gdb
   return svc_number;
 }
 
-/* When FRAME is at a syscall instruction, return the PC of the next
-   instruction to be executed.  */
-
 static CORE_ADDR
-arm_linux_syscall_next_pc (struct frame_info *frame)
+arm_linux_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
 {
-  CORE_ADDR pc = get_frame_pc (frame);
-  CORE_ADDR return_addr = 0;
-  int is_thumb = arm_frame_is_thumb (frame);
+  CORE_ADDR next_pc = 0;
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  int is_thumb = arm_is_thumb (self->regcache);
   ULONGEST svc_number = 0;
 
   if (is_thumb)
     {
-      svc_number = get_frame_register_unsigned (frame, 7);
-      return_addr = pc + 2;
+      svc_number = regcache_raw_get_unsigned (self->regcache, 7);
+      next_pc = pc + 2;
     }
   else
     {
-      struct gdbarch *gdbarch = get_frame_arch (frame);
+      struct gdbarch *gdbarch = get_regcache_arch (self->regcache);
       enum bfd_endian byte_order_for_code = 
 	gdbarch_byte_order_for_code (gdbarch);
       unsigned long this_instr = 
@@ -889,47 +897,65 @@ arm_linux_syscall_next_pc (struct frame_
 	}
       else /* EABI.  */
 	{
-	  svc_number = get_frame_register_unsigned (frame, 7);
+	  svc_number = regcache_raw_get_unsigned (self->regcache, 7);
 	}
 
-      return_addr = pc + 4;
+      next_pc = pc + 4;
     }
 
-  arm_linux_sigreturn_return_addr (frame, svc_number, &return_addr, &is_thumb);
+  if (svc_number == ARM_SIGRETURN || svc_number == ARM_RT_SIGRETURN)
+    {
+      /* SIGRETURN or RT_SIGRETURN may affect the arm thumb mode, so
+	 update IS_THUMB.   */
+      next_pc = arm_linux_sigreturn_next_pc (self->regcache, svc_number,
+					     &is_thumb);
+    }
 
   /* Addresses for calling Thumb functions have the bit 0 set.  */
   if (is_thumb)
-    return_addr |= 1;
+    next_pc = MAKE_THUMB_ADDR (next_pc);
 
-  return return_addr;
+  return next_pc;
 }
 
 
 /* Insert a single step breakpoint at the next executed instruction.  */
 
-static int
-arm_linux_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+arm_linux_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR next_pc;
-
-  if (arm_deal_with_atomic_sequence (frame))
-    return 1;
-
-  next_pc = arm_get_next_pc (frame, get_frame_pc (frame));
-
-  /* The Linux kernel offers some user-mode helpers in a high page.  We can
-     not read this page (as of 2.6.23), and even if we could then we couldn't
-     set breakpoints in it, and even if we could then the atomic operations
-     would fail when interrupted.  They are all called as functions and return
-     to the address in LR, so step to there instead.  */
-  if (next_pc > 0xffff0000)
-    next_pc = get_frame_register_unsigned (frame, ARM_LR_REGNUM);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct arm_get_next_pcs next_pcs_ctx;
+  CORE_ADDR pc;
+  int i;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+  struct cleanup *old_chain;
 
-  arm_insert_single_step_breakpoint (gdbarch, aspace, next_pc);
+  /* If the target does have hardware single step, GDB doesn't have
+     to bother software single step.  */
+  if (target_can_do_single_step () == 1)
+    return NULL;
 
-  return 1;
+  old_chain = make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs);
+
+  arm_get_next_pcs_ctor (&next_pcs_ctx,
+			 &arm_linux_get_next_pcs_ops,
+			 gdbarch_byte_order (gdbarch),
+			 gdbarch_byte_order_for_code (gdbarch),
+			 1,
+			 regcache);
+
+  next_pcs = arm_get_next_pcs (&next_pcs_ctx);
+
+  for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
+    {
+      pc = gdbarch_addr_bits_remove (gdbarch, pc);
+      VEC_replace (CORE_ADDR, next_pcs, i, pc);
+    }
+
+  discard_cleanups (old_chain);
+
+  return next_pcs;
 }
 
 /* Support for displaced stepping of Linux SVC instructions.  */
@@ -1092,16 +1118,14 @@ arm_catch_kernel_helper_return (struct g
 
 /* Linux-specific displaced step instruction copying function.  Detects when
    the program has stepped into a Linux kernel helper routine (which must be
-   handled as a special case), falling back to arm_displaced_step_copy_insn()
-   if it hasn't.  */
+   handled as a special case).  */
 
 static struct displaced_step_closure *
 arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
 				    CORE_ADDR from, CORE_ADDR to,
 				    struct regcache *regs)
 {
-  struct displaced_step_closure *dsc
-    = xmalloc (sizeof (struct displaced_step_closure));
+  struct displaced_step_closure *dsc = XNEW (struct displaced_step_closure);
 
   /* Detect when we enter an (inaccessible by GDB) Linux kernel helper, and
      stop at the return location.  */
@@ -1175,7 +1199,7 @@ arm_stap_parse_special_token (struct gdb
 	return 0;
 
       len = tmp - start;
-      regname = alloca (len + 2);
+      regname = (char *) alloca (len + 2);
 
       offset = 0;
       if (isdigit (*start))
@@ -1258,16 +1282,371 @@ struct linux_record_tdep arm_linux_recor
 static enum gdb_syscall
 arm_canonicalize_syscall (int syscall)
 {
-  enum { sys_process_vm_writev = 377 };
-
-  if (syscall <= gdb_sys_sched_getaffinity)
-    return syscall;
-  else if (syscall >= 243 && syscall <= 247)
-    return syscall + 2;
-  else if (syscall >= 248 && syscall <= 253)
-    return syscall + 4;
-
-  return -1;
+  switch (syscall)
+    {
+    case 0: return gdb_sys_restart_syscall;
+    case 1: return gdb_sys_exit;
+    case 2: return gdb_sys_fork;
+    case 3: return gdb_sys_read;
+    case 4: return gdb_sys_write;
+    case 5: return gdb_sys_open;
+    case 6: return gdb_sys_close;
+    case 8: return gdb_sys_creat;
+    case 9: return gdb_sys_link;
+    case 10: return gdb_sys_unlink;
+    case 11: return gdb_sys_execve;
+    case 12: return gdb_sys_chdir;
+    case 13: return gdb_sys_time;
+    case 14: return gdb_sys_mknod;
+    case 15: return gdb_sys_chmod;
+    case 16: return gdb_sys_lchown16;
+    case 19: return gdb_sys_lseek;
+    case 20: return gdb_sys_getpid;
+    case 21: return gdb_sys_mount;
+    case 22: return gdb_sys_oldumount;
+    case 23: return gdb_sys_setuid16;
+    case 24: return gdb_sys_getuid16;
+    case 25: return gdb_sys_stime;
+    case 26: return gdb_sys_ptrace;
+    case 27: return gdb_sys_alarm;
+    case 29: return gdb_sys_pause;
+    case 30: return gdb_sys_utime;
+    case 33: return gdb_sys_access;
+    case 34: return gdb_sys_nice;
+    case 36: return gdb_sys_sync;
+    case 37: return gdb_sys_kill;
+    case 38: return gdb_sys_rename;
+    case 39: return gdb_sys_mkdir;
+    case 40: return gdb_sys_rmdir;
+    case 41: return gdb_sys_dup;
+    case 42: return gdb_sys_pipe;
+    case 43: return gdb_sys_times;
+    case 45: return gdb_sys_brk;
+    case 46: return gdb_sys_setgid16;
+    case 47: return gdb_sys_getgid16;
+    case 49: return gdb_sys_geteuid16;
+    case 50: return gdb_sys_getegid16;
+    case 51: return gdb_sys_acct;
+    case 52: return gdb_sys_umount;
+    case 54: return gdb_sys_ioctl;
+    case 55: return gdb_sys_fcntl;
+    case 57: return gdb_sys_setpgid;
+    case 60: return gdb_sys_umask;
+    case 61: return gdb_sys_chroot;
+    case 62: return gdb_sys_ustat;
+    case 63: return gdb_sys_dup2;
+    case 64: return gdb_sys_getppid;
+    case 65: return gdb_sys_getpgrp;
+    case 66: return gdb_sys_setsid;
+    case 67: return gdb_sys_sigaction;
+    case 70: return gdb_sys_setreuid16;
+    case 71: return gdb_sys_setregid16;
+    case 72: return gdb_sys_sigsuspend;
+    case 73: return gdb_sys_sigpending;
+    case 74: return gdb_sys_sethostname;
+    case 75: return gdb_sys_setrlimit;
+    case 76: return gdb_sys_getrlimit;
+    case 77: return gdb_sys_getrusage;
+    case 78: return gdb_sys_gettimeofday;
+    case 79: return gdb_sys_settimeofday;
+    case 80: return gdb_sys_getgroups16;
+    case 81: return gdb_sys_setgroups16;
+    case 82: return gdb_sys_select;
+    case 83: return gdb_sys_symlink;
+    case 85: return gdb_sys_readlink;
+    case 86: return gdb_sys_uselib;
+    case 87: return gdb_sys_swapon;
+    case 88: return gdb_sys_reboot;
+    case 89: return gdb_old_readdir;
+    case 90: return gdb_old_mmap;
+    case 91: return gdb_sys_munmap;
+    case 92: return gdb_sys_truncate;
+    case 93: return gdb_sys_ftruncate;
+    case 94: return gdb_sys_fchmod;
+    case 95: return gdb_sys_fchown16;
+    case 96: return gdb_sys_getpriority;
+    case 97: return gdb_sys_setpriority;
+    case 99: return gdb_sys_statfs;
+    case 100: return gdb_sys_fstatfs;
+    case 102: return gdb_sys_socketcall;
+    case 103: return gdb_sys_syslog;
+    case 104: return gdb_sys_setitimer;
+    case 105: return gdb_sys_getitimer;
+    case 106: return gdb_sys_stat;
+    case 107: return gdb_sys_lstat;
+    case 108: return gdb_sys_fstat;
+    case 111: return gdb_sys_vhangup;
+    case 113: /* sys_syscall */
+      return gdb_sys_no_syscall;
+    case 114: return gdb_sys_wait4;
+    case 115: return gdb_sys_swapoff;
+    case 116: return gdb_sys_sysinfo;
+    case 117: return gdb_sys_ipc;
+    case 118: return gdb_sys_fsync;
+    case 119: return gdb_sys_sigreturn;
+    case 120: return gdb_sys_clone;
+    case 121: return gdb_sys_setdomainname;
+    case 122: return gdb_sys_uname;
+    case 124: return gdb_sys_adjtimex;
+    case 125: return gdb_sys_mprotect;
+    case 126: return gdb_sys_sigprocmask;
+    case 128: return gdb_sys_init_module;
+    case 129: return gdb_sys_delete_module;
+    case 131: return gdb_sys_quotactl;
+    case 132: return gdb_sys_getpgid;
+    case 133: return gdb_sys_fchdir;
+    case 134: return gdb_sys_bdflush;
+    case 135: return gdb_sys_sysfs;
+    case 136: return gdb_sys_personality;
+    case 138: return gdb_sys_setfsuid16;
+    case 139: return gdb_sys_setfsgid16;
+    case 140: return gdb_sys_llseek;
+    case 141: return gdb_sys_getdents;
+    case 142: return gdb_sys_select;
+    case 143: return gdb_sys_flock;
+    case 144: return gdb_sys_msync;
+    case 145: return gdb_sys_readv;
+    case 146: return gdb_sys_writev;
+    case 147: return gdb_sys_getsid;
+    case 148: return gdb_sys_fdatasync;
+    case 149: return gdb_sys_sysctl;
+    case 150: return gdb_sys_mlock;
+    case 151: return gdb_sys_munlock;
+    case 152: return gdb_sys_mlockall;
+    case 153: return gdb_sys_munlockall;
+    case 154: return gdb_sys_sched_setparam;
+    case 155: return gdb_sys_sched_getparam;
+    case 156: return gdb_sys_sched_setscheduler;
+    case 157: return gdb_sys_sched_getscheduler;
+    case 158: return gdb_sys_sched_yield;
+    case 159: return gdb_sys_sched_get_priority_max;
+    case 160: return gdb_sys_sched_get_priority_min;
+    case 161: return gdb_sys_sched_rr_get_interval;
+    case 162: return gdb_sys_nanosleep;
+    case 163: return gdb_sys_mremap;
+    case 164: return gdb_sys_setresuid16;
+    case 165: return gdb_sys_getresuid16;
+    case 168: return gdb_sys_poll;
+    case 169: return gdb_sys_nfsservctl;
+    case 170: return gdb_sys_setresgid;
+    case 171: return gdb_sys_getresgid;
+    case 172: return gdb_sys_prctl;
+    case 173: return gdb_sys_rt_sigreturn;
+    case 174: return gdb_sys_rt_sigaction;
+    case 175: return gdb_sys_rt_sigprocmask;
+    case 176: return gdb_sys_rt_sigpending;
+    case 177: return gdb_sys_rt_sigtimedwait;
+    case 178: return gdb_sys_rt_sigqueueinfo;
+    case 179: return gdb_sys_rt_sigsuspend;
+    case 180: return gdb_sys_pread64;
+    case 181: return gdb_sys_pwrite64;
+    case 182: return gdb_sys_chown;
+    case 183: return gdb_sys_getcwd;
+    case 184: return gdb_sys_capget;
+    case 185: return gdb_sys_capset;
+    case 186: return gdb_sys_sigaltstack;
+    case 187: return gdb_sys_sendfile;
+    case 190: return gdb_sys_vfork;
+    case 191: return gdb_sys_getrlimit;
+    case 192: return gdb_sys_mmap2;
+    case 193: return gdb_sys_truncate64;
+    case 194: return gdb_sys_ftruncate64;
+    case 195: return gdb_sys_stat64;
+    case 196: return gdb_sys_lstat64;
+    case 197: return gdb_sys_fstat64;
+    case 198: return gdb_sys_lchown;
+    case 199: return gdb_sys_getuid;
+    case 200: return gdb_sys_getgid;
+    case 201: return gdb_sys_geteuid;
+    case 202: return gdb_sys_getegid;
+    case 203: return gdb_sys_setreuid;
+    case 204: return gdb_sys_setregid;
+    case 205: return gdb_sys_getgroups;
+    case 206: return gdb_sys_setgroups;
+    case 207: return gdb_sys_fchown;
+    case 208: return gdb_sys_setresuid;
+    case 209: return gdb_sys_getresuid;
+    case 210: return gdb_sys_setresgid;
+    case 211: return gdb_sys_getresgid;
+    case 212: return gdb_sys_chown;
+    case 213: return gdb_sys_setuid;
+    case 214: return gdb_sys_setgid;
+    case 215: return gdb_sys_setfsuid;
+    case 216: return gdb_sys_setfsgid;
+    case 217: return gdb_sys_getdents64;
+    case 218: return gdb_sys_pivot_root;
+    case 219: return gdb_sys_mincore;
+    case 220: return gdb_sys_madvise;
+    case 221: return gdb_sys_fcntl64;
+    case 224: return gdb_sys_gettid;
+    case 225: return gdb_sys_readahead;
+    case 226: return gdb_sys_setxattr;
+    case 227: return gdb_sys_lsetxattr;
+    case 228: return gdb_sys_fsetxattr;
+    case 229: return gdb_sys_getxattr;
+    case 230: return gdb_sys_lgetxattr;
+    case 231: return gdb_sys_fgetxattr;
+    case 232: return gdb_sys_listxattr;
+    case 233: return gdb_sys_llistxattr;
+    case 234: return gdb_sys_flistxattr;
+    case 235: return gdb_sys_removexattr;
+    case 236: return gdb_sys_lremovexattr;
+    case 237: return gdb_sys_fremovexattr;
+    case 238: return gdb_sys_tkill;
+    case 239: return gdb_sys_sendfile64;
+    case 240: return gdb_sys_futex;
+    case 241: return gdb_sys_sched_setaffinity;
+    case 242: return gdb_sys_sched_getaffinity;
+    case 243: return gdb_sys_io_setup;
+    case 244: return gdb_sys_io_destroy;
+    case 245: return gdb_sys_io_getevents;
+    case 246: return gdb_sys_io_submit;
+    case 247: return gdb_sys_io_cancel;
+    case 248: return gdb_sys_exit_group;
+    case 249: return gdb_sys_lookup_dcookie;
+    case 250: return gdb_sys_epoll_create;
+    case 251: return gdb_sys_epoll_ctl;
+    case 252: return gdb_sys_epoll_wait;
+    case 253: return gdb_sys_remap_file_pages;
+    case 256: return gdb_sys_set_tid_address;
+    case 257: return gdb_sys_timer_create;
+    case 258: return gdb_sys_timer_settime;
+    case 259: return gdb_sys_timer_gettime;
+    case 260: return gdb_sys_timer_getoverrun;
+    case 261: return gdb_sys_timer_delete;
+    case 262: return gdb_sys_clock_settime;
+    case 263: return gdb_sys_clock_gettime;
+    case 264: return gdb_sys_clock_getres;
+    case 265: return gdb_sys_clock_nanosleep;
+    case 266: return gdb_sys_statfs64;
+    case 267: return gdb_sys_fstatfs64;
+    case 268: return gdb_sys_tgkill;
+    case 269: return gdb_sys_utimes;
+      /*
+    case 270: return gdb_sys_arm_fadvise64_64;
+    case 271: return gdb_sys_pciconfig_iobase;
+    case 272: return gdb_sys_pciconfig_read;
+    case 273: return gdb_sys_pciconfig_write;
+      */
+    case 274: return gdb_sys_mq_open;
+    case 275: return gdb_sys_mq_unlink;
+    case 276: return gdb_sys_mq_timedsend;
+    case 277: return gdb_sys_mq_timedreceive;
+    case 278: return gdb_sys_mq_notify;
+    case 279: return gdb_sys_mq_getsetattr;
+    case 280: return gdb_sys_waitid;
+    case 281: return gdb_sys_socket;
+    case 282: return gdb_sys_bind;
+    case 283: return gdb_sys_connect;
+    case 284: return gdb_sys_listen;
+    case 285: return gdb_sys_accept;
+    case 286: return gdb_sys_getsockname;
+    case 287: return gdb_sys_getpeername;
+    case 288: return gdb_sys_socketpair;
+    case 289: /* send */ return gdb_sys_no_syscall;
+    case 290: return gdb_sys_sendto;
+    case 291: return gdb_sys_recv;
+    case 292: return gdb_sys_recvfrom;
+    case 293: return gdb_sys_shutdown;
+    case 294: return gdb_sys_setsockopt;
+    case 295: return gdb_sys_getsockopt;
+    case 296: return gdb_sys_sendmsg;
+    case 297: return gdb_sys_recvmsg;
+    case 298: return gdb_sys_semop;
+    case 299: return gdb_sys_semget;
+    case 300: return gdb_sys_semctl;
+    case 301: return gdb_sys_msgsnd;
+    case 302: return gdb_sys_msgrcv;
+    case 303: return gdb_sys_msgget;
+    case 304: return gdb_sys_msgctl;
+    case 305: return gdb_sys_shmat;
+    case 306: return gdb_sys_shmdt;
+    case 307: return gdb_sys_shmget;
+    case 308: return gdb_sys_shmctl;
+    case 309: return gdb_sys_add_key;
+    case 310: return gdb_sys_request_key;
+    case 311: return gdb_sys_keyctl;
+    case 312: return gdb_sys_semtimedop;
+    case 313: /* vserver */ return gdb_sys_no_syscall;
+    case 314: return gdb_sys_ioprio_set;
+    case 315: return gdb_sys_ioprio_get;
+    case 316: return gdb_sys_inotify_init;
+    case 317: return gdb_sys_inotify_add_watch;
+    case 318: return gdb_sys_inotify_rm_watch;
+    case 319: return gdb_sys_mbind;
+    case 320: return gdb_sys_get_mempolicy;
+    case 321: return gdb_sys_set_mempolicy;
+    case 322: return gdb_sys_openat;
+    case 323: return gdb_sys_mkdirat;
+    case 324: return gdb_sys_mknodat;
+    case 325: return gdb_sys_fchownat;
+    case 326: return gdb_sys_futimesat;
+    case 327: return gdb_sys_fstatat64;
+    case 328: return gdb_sys_unlinkat;
+    case 329: return gdb_sys_renameat;
+    case 330: return gdb_sys_linkat;
+    case 331: return gdb_sys_symlinkat;
+    case 332: return gdb_sys_readlinkat;
+    case 333: return gdb_sys_fchmodat;
+    case 334: return gdb_sys_faccessat;
+    case 335: return gdb_sys_pselect6;
+    case 336: return gdb_sys_ppoll;
+    case 337: return gdb_sys_unshare;
+    case 338: return gdb_sys_set_robust_list;
+    case 339: return gdb_sys_get_robust_list;
+    case 340: return gdb_sys_splice;
+    /*case 341: return gdb_sys_arm_sync_file_range;*/
+    case 342: return gdb_sys_tee;
+    case 343: return gdb_sys_vmsplice;
+    case 344: return gdb_sys_move_pages;
+    case 345: return gdb_sys_getcpu;
+    case 346: return gdb_sys_epoll_pwait;
+    case 347: return gdb_sys_kexec_load;
+      /*
+    case 348: return gdb_sys_utimensat;
+    case 349: return gdb_sys_signalfd;
+    case 350: return gdb_sys_timerfd_create;
+    case 351: return gdb_sys_eventfd;
+      */
+    case 352: return gdb_sys_fallocate;
+      /*
+    case 353: return gdb_sys_timerfd_settime;
+    case 354: return gdb_sys_timerfd_gettime;
+    case 355: return gdb_sys_signalfd4;
+      */
+    case 356: return gdb_sys_eventfd2;
+    case 357: return gdb_sys_epoll_create1;
+    case 358: return gdb_sys_dup3;
+    case 359: return gdb_sys_pipe2;
+    case 360: return gdb_sys_inotify_init1;
+      /*
+    case 361: return gdb_sys_preadv;
+    case 362: return gdb_sys_pwritev;
+    case 363: return gdb_sys_rt_tgsigqueueinfo;
+    case 364: return gdb_sys_perf_event_open;
+    case 365: return gdb_sys_recvmmsg;
+    case 366: return gdb_sys_accept4;
+    case 367: return gdb_sys_fanotify_init;
+    case 368: return gdb_sys_fanotify_mark;
+    case 369: return gdb_sys_prlimit64;
+    case 370: return gdb_sys_name_to_handle_at;
+    case 371: return gdb_sys_open_by_handle_at;
+    case 372: return gdb_sys_clock_adjtime;
+    case 373: return gdb_sys_syncfs;
+    case 374: return gdb_sys_sendmmsg;
+    case 375: return gdb_sys_setns;
+    case 376: return gdb_sys_process_vm_readv;
+    case 377: return gdb_sys_process_vm_writev;
+    case 378: return gdb_sys_kcmp;
+    case 379: return gdb_sys_finit_module;
+      */
+    case 983041: /* ARM_breakpoint */ return gdb_sys_no_syscall;
+    case 983042: /* ARM_cacheflush */ return gdb_sys_no_syscall;
+    case 983043: /* ARM_usr26 */ return gdb_sys_no_syscall;
+    case 983044: /* ARM_usr32 */ return gdb_sys_no_syscall;
+    case 983045: /* ARM_set_tls */ return gdb_sys_no_syscall;
+    default: return gdb_sys_no_syscall;
+    }
 }
 
 /* Record all registers but PC register for process-record.  */
@@ -1299,7 +1678,7 @@ arm_linux_syscall_record (struct regcach
 
   syscall_gdb = arm_canonicalize_syscall (svc_number);
 
-  if (syscall_gdb < 0)
+  if (syscall_gdb == gdb_sys_no_syscall)
     {
       printf_unfiltered (_("Process record and replay target doesn't "
                            "support syscall number %s\n"),
@@ -1463,8 +1842,6 @@ arm_linux_init_abi (struct gdbarch_info 
   set_gdbarch_stap_parse_special_token (gdbarch,
 					arm_stap_parse_special_token);
 
-  tdep->syscall_next_pc = arm_linux_syscall_next_pc;
-
   /* `catch syscall' */
   set_xml_syscall_file_name (gdbarch, "syscalls/arm-linux.xml");
   set_gdbarch_get_syscall_number (gdbarch, arm_linux_get_syscall_number);
@@ -1483,8 +1860,8 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.size_flock = 16;
   arm_linux_record_tdep.size_oldold_utsname = 45;
   arm_linux_record_tdep.size_ustat = 20;
-  arm_linux_record_tdep.size_old_sigaction = 140;
-  arm_linux_record_tdep.size_old_sigset_t = 128;
+  arm_linux_record_tdep.size_old_sigaction = 16;
+  arm_linux_record_tdep.size_old_sigset_t = 4;
   arm_linux_record_tdep.size_rlimit = 8;
   arm_linux_record_tdep.size_rusage = 72;
   arm_linux_record_tdep.size_timeval = 8;
@@ -1492,8 +1869,7 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.size_old_gid_t = 2;
   arm_linux_record_tdep.size_old_uid_t = 2;
   arm_linux_record_tdep.size_fd_set = 128;
-  arm_linux_record_tdep.size_dirent = 268;
-  arm_linux_record_tdep.size_dirent64 = 276;
+  arm_linux_record_tdep.size_old_dirent = 268;
   arm_linux_record_tdep.size_statfs = 64;
   arm_linux_record_tdep.size_statfs64 = 84;
   arm_linux_record_tdep.size_sockaddr = 16;
@@ -1520,15 +1896,15 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.size_NFS_FHSIZE = 32;
   arm_linux_record_tdep.size_knfsd_fh = 132;
   arm_linux_record_tdep.size_TASK_COMM_LEN = 16;
-  arm_linux_record_tdep.size_sigaction = 140;
+  arm_linux_record_tdep.size_sigaction = 20;
   arm_linux_record_tdep.size_sigset_t = 8;
   arm_linux_record_tdep.size_siginfo_t = 128;
   arm_linux_record_tdep.size_cap_user_data_t = 12;
   arm_linux_record_tdep.size_stack_t = 12;
   arm_linux_record_tdep.size_off_t = arm_linux_record_tdep.size_long;
   arm_linux_record_tdep.size_stat64 = 96;
-  arm_linux_record_tdep.size_gid_t = 2;
-  arm_linux_record_tdep.size_uid_t = 2;
+  arm_linux_record_tdep.size_gid_t = 4;
+  arm_linux_record_tdep.size_uid_t = 4;
   arm_linux_record_tdep.size_PAGE_SIZE = 4096;
   arm_linux_record_tdep.size_flock64 = 24;
   arm_linux_record_tdep.size_user_desc = 16;
@@ -1538,7 +1914,6 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.size_itimerspec
     = arm_linux_record_tdep.size_timespec * 2;
   arm_linux_record_tdep.size_mq_attr = 32;
-  arm_linux_record_tdep.size_siginfo = 128;
   arm_linux_record_tdep.size_termios = 36;
   arm_linux_record_tdep.size_termios2 = 44;
   arm_linux_record_tdep.size_pid_t = 4;
@@ -1548,6 +1923,7 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.size_hayes_esp_config = 12;
   arm_linux_record_tdep.size_size_t = 4;
   arm_linux_record_tdep.size_iovec = 8;
+  arm_linux_record_tdep.size_time_t = 4;
 
   /* These values are the second argument of system call "sys_ioctl".
      They are obtained from Linux Kernel source.  */
@@ -1624,10 +2000,13 @@ arm_linux_init_abi (struct gdbarch_info 
   arm_linux_record_tdep.fcntl_F_SETLK64 = 13;
   arm_linux_record_tdep.fcntl_F_SETLKW64 = 14;
 
-  arm_linux_record_tdep.arg1 = ARM_A1_REGNUM + 1;
-  arm_linux_record_tdep.arg2 = ARM_A1_REGNUM + 2;
-  arm_linux_record_tdep.arg3 = ARM_A1_REGNUM + 3;
+  arm_linux_record_tdep.arg1 = ARM_A1_REGNUM;
+  arm_linux_record_tdep.arg2 = ARM_A1_REGNUM + 1;
+  arm_linux_record_tdep.arg3 = ARM_A1_REGNUM + 2;
   arm_linux_record_tdep.arg4 = ARM_A1_REGNUM + 3;
+  arm_linux_record_tdep.arg5 = ARM_A1_REGNUM + 4;
+  arm_linux_record_tdep.arg6 = ARM_A1_REGNUM + 5;
+  arm_linux_record_tdep.arg7 = ARM_A1_REGNUM + 6;
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-tdep.h ./gdb/arm-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux on ARM target support, prototypes.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,9 +24,6 @@ struct regcache;
 				+ 2 * INT_REGISTER_SIZE \
 				+ 8 + INT_REGISTER_SIZE)
 
-/* The index to access CSPR in user_regs defined in GLIBC.  */
-#define ARM_CPSR_GREGNUM 16
-
 /* Support for register format used by the NWFPE FPA emulator.  Each
    register takes three words, where either the first one, two, or
    three hold a single, double, or extended precision value (depending
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-nbsd-nat.c ./gdb/arm-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arm-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,472 @@
+/* Native-dependent code for BSD Unix running on ARM's, for GDB.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+#include <machine/frame.h>
+
+#include "arm-tdep.h"
+#include "inf-ptrace.h"
+
+extern int arm_apcs_32;
+
+static void
+arm_supply_gregset (struct regcache *regcache, struct reg *gregset)
+{
+  int regno;
+  CORE_ADDR r_pc;
+
+  /* Integer registers.  */
+  for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
+    regcache_raw_supply (regcache, regno, (char *) &gregset->r[regno]);
+
+  regcache_raw_supply (regcache, ARM_SP_REGNUM,
+		       (char *) &gregset->r_sp);
+  regcache_raw_supply (regcache, ARM_LR_REGNUM,
+		       (char *) &gregset->r_lr);
+  /* This is ok: we're running native...  */
+  r_pc = gdbarch_addr_bits_remove (get_regcache_arch (regcache), gregset->r_pc);
+  regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc);
+
+  if (arm_apcs_32)
+    regcache_raw_supply (regcache, ARM_PS_REGNUM,
+			 (char *) &gregset->r_cpsr);
+  else
+    regcache_raw_supply (regcache, ARM_PS_REGNUM,
+			 (char *) &gregset->r_pc);
+}
+
+static void
+arm_supply_fparegset (struct regcache *regcache, struct fpreg *fparegset)
+{
+  int regno;
+
+  for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
+    regcache_raw_supply (regcache, regno,
+			 (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
+
+  regcache_raw_supply (regcache, ARM_FPS_REGNUM,
+		       (char *) &fparegset->fpr_fpsr);
+}
+
+static void
+fetch_register (struct regcache *regcache, int regno)
+{
+  struct reg inferior_registers;
+  int ret;
+
+  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch general register"));
+      return;
+    }
+
+  switch (regno)
+    {
+    case ARM_SP_REGNUM:
+      regcache_raw_supply (regcache, ARM_SP_REGNUM,
+			   (char *) &inferior_registers.r_sp);
+      break;
+
+    case ARM_LR_REGNUM:
+      regcache_raw_supply (regcache, ARM_LR_REGNUM,
+			   (char *) &inferior_registers.r_lr);
+      break;
+
+    case ARM_PC_REGNUM:
+      /* This is ok: we're running native...  */
+      inferior_registers.r_pc = gdbarch_addr_bits_remove
+				  (get_regcache_arch (regcache),
+				   inferior_registers.r_pc);
+      regcache_raw_supply (regcache, ARM_PC_REGNUM,
+			   (char *) &inferior_registers.r_pc);
+      break;
+
+    case ARM_PS_REGNUM:
+      if (arm_apcs_32)
+	regcache_raw_supply (regcache, ARM_PS_REGNUM,
+			     (char *) &inferior_registers.r_cpsr);
+      else
+	regcache_raw_supply (regcache, ARM_PS_REGNUM,
+			     (char *) &inferior_registers.r_pc);
+      break;
+
+    default:
+      regcache_raw_supply (regcache, regno,
+			   (char *) &inferior_registers.r[regno]);
+      break;
+    }
+}
+
+static void
+fetch_regs (struct regcache *regcache)
+{
+  struct reg inferior_registers;
+  int ret;
+  int regno;
+
+  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch general registers"));
+      return;
+    }
+
+  arm_supply_gregset (regcache, &inferior_registers);
+}
+
+static void
+fetch_fp_register (struct regcache *regcache, int regno)
+{
+  struct fpreg inferior_fp_registers;
+  int ret;
+
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch floating-point register"));
+      return;
+    }
+
+  switch (regno)
+    {
+    case ARM_FPS_REGNUM:
+      regcache_raw_supply (regcache, ARM_FPS_REGNUM,
+			   (char *) &inferior_fp_registers.fpr_fpsr);
+      break;
+
+    default:
+      regcache_raw_supply (regcache, regno,
+			   (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+      break;
+    }
+}
+
+static void
+fetch_fp_regs (struct regcache *regcache)
+{
+  struct fpreg inferior_fp_registers;
+  int ret;
+  int regno;
+
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch general registers"));
+      return;
+    }
+
+  arm_supply_fparegset (regcache, &inferior_fp_registers);
+}
+
+static void
+armnbsd_fetch_registers (struct target_ops *ops,
+			 struct regcache *regcache, int regno)
+{
+  if (regno >= 0)
+    {
+      if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM)
+	fetch_register (regcache, regno);
+      else
+	fetch_fp_register (regcache, regno);
+    }
+  else
+    {
+      fetch_regs (regcache);
+      fetch_fp_regs (regcache);
+    }
+}
+
+
+static void
+store_register (const struct regcache *regcache, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct reg inferior_registers;
+  int ret;
+
+  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch general registers"));
+      return;
+    }
+
+  switch (regno)
+    {
+    case ARM_SP_REGNUM:
+      regcache_raw_collect (regcache, ARM_SP_REGNUM,
+			    (char *) &inferior_registers.r_sp);
+      break;
+
+    case ARM_LR_REGNUM:
+      regcache_raw_collect (regcache, ARM_LR_REGNUM,
+			    (char *) &inferior_registers.r_lr);
+      break;
+
+    case ARM_PC_REGNUM:
+      if (arm_apcs_32)
+	regcache_raw_collect (regcache, ARM_PC_REGNUM,
+			      (char *) &inferior_registers.r_pc);
+      else
+	{
+	  unsigned pc_val;
+
+	  regcache_raw_collect (regcache, ARM_PC_REGNUM,
+				(char *) &pc_val);
+	  
+	  pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
+	  inferior_registers.r_pc ^= gdbarch_addr_bits_remove
+				       (gdbarch, inferior_registers.r_pc);
+	  inferior_registers.r_pc |= pc_val;
+	}
+      break;
+
+    case ARM_PS_REGNUM:
+      if (arm_apcs_32)
+	regcache_raw_collect (regcache, ARM_PS_REGNUM,
+			      (char *) &inferior_registers.r_cpsr);
+      else
+	{
+	  unsigned psr_val;
+
+	  regcache_raw_collect (regcache, ARM_PS_REGNUM,
+				(char *) &psr_val);
+
+	  psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
+	  inferior_registers.r_pc = gdbarch_addr_bits_remove
+				      (gdbarch, inferior_registers.r_pc);
+	  inferior_registers.r_pc |= psr_val;
+	}
+      break;
+
+    default:
+      regcache_raw_collect (regcache, regno,
+			    (char *) &inferior_registers.r[regno]);
+      break;
+    }
+
+  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
+
+  if (ret < 0)
+    warning (_("unable to write register %d to inferior"), regno);
+}
+
+static void
+store_regs (const struct regcache *regcache)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct reg inferior_registers;
+  int ret;
+  int regno;
+
+
+  for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
+    regcache_raw_collect (regcache, regno,
+			  (char *) &inferior_registers.r[regno]);
+
+  regcache_raw_collect (regcache, ARM_SP_REGNUM,
+			(char *) &inferior_registers.r_sp);
+  regcache_raw_collect (regcache, ARM_LR_REGNUM,
+			(char *) &inferior_registers.r_lr);
+
+  if (arm_apcs_32)
+    {
+      regcache_raw_collect (regcache, ARM_PC_REGNUM,
+			    (char *) &inferior_registers.r_pc);
+      regcache_raw_collect (regcache, ARM_PS_REGNUM,
+			    (char *) &inferior_registers.r_cpsr);
+    }
+  else
+    {
+      unsigned pc_val;
+      unsigned psr_val;
+
+      regcache_raw_collect (regcache, ARM_PC_REGNUM,
+			    (char *) &pc_val);
+      regcache_raw_collect (regcache, ARM_PS_REGNUM,
+			    (char *) &psr_val);
+	  
+      pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
+      psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
+
+      inferior_registers.r_pc = pc_val | psr_val;
+    }
+
+  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
+
+  if (ret < 0)
+    warning (_("unable to store general registers"));
+}
+
+static void
+store_fp_register (const struct regcache *regcache, int regno)
+{
+  struct fpreg inferior_fp_registers;
+  int ret;
+
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+
+  if (ret < 0)
+    {
+      warning (_("unable to fetch floating-point registers"));
+      return;
+    }
+
+  switch (regno)
+    {
+    case ARM_FPS_REGNUM:
+      regcache_raw_collect (regcache, ARM_FPS_REGNUM,
+			    (char *) &inferior_fp_registers.fpr_fpsr);
+      break;
+
+    default:
+      regcache_raw_collect (regcache, regno,
+			    (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+      break;
+    }
+
+  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+
+  if (ret < 0)
+    warning (_("unable to write register %d to inferior"), regno);
+}
+
+static void
+store_fp_regs (const struct regcache *regcache)
+{
+  struct fpreg inferior_fp_registers;
+  int ret;
+  int regno;
+
+
+  for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
+    regcache_raw_collect (regcache, regno,
+			  (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+
+  regcache_raw_collect (regcache, ARM_FPS_REGNUM,
+			(char *) &inferior_fp_registers.fpr_fpsr);
+
+  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
+
+  if (ret < 0)
+    warning (_("unable to store floating-point registers"));
+}
+
+static void
+armnbsd_store_registers (struct target_ops *ops,
+			 struct regcache *regcache, int regno)
+{
+  if (regno >= 0)
+    {
+      if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM)
+	store_register (regcache, regno);
+      else
+	store_fp_register (regcache, regno);
+    }
+  else
+    {
+      store_regs (regcache);
+      store_fp_regs (regcache);
+    }
+}
+
+static void
+fetch_elfcore_registers (struct regcache *regcache,
+			 char *core_reg_sect, unsigned core_reg_size,
+			 int which, CORE_ADDR ignore)
+{
+  struct reg gregset;
+  struct fpreg fparegset;
+
+  switch (which)
+    {
+    case 0:	/* Integer registers.  */
+      if (core_reg_size != sizeof (struct reg))
+	warning (_("wrong size of register set in core file"));
+      else
+	{
+	  /* The memcpy may be unnecessary, but we can't really be sure
+	     of the alignment of the data in the core file.  */
+	  memcpy (&gregset, core_reg_sect, sizeof (gregset));
+	  arm_supply_gregset (regcache, &gregset);
+	}
+      break;
+
+    case 2:
+      if (core_reg_size != sizeof (struct fpreg))
+	warning (_("wrong size of FPA register set in core file"));
+      else
+	{
+	  /* The memcpy may be unnecessary, but we can't really be sure
+	     of the alignment of the data in the core file.  */
+	  memcpy (&fparegset, core_reg_sect, sizeof (fparegset));
+	  arm_supply_fparegset (regcache, &fparegset);
+	}
+      break;
+
+    default:
+      /* Don't know what kind of register request this is; just ignore it.  */
+      break;
+    }
+}
+
+static struct core_fns arm_netbsd_elfcore_fns =
+{
+  bfd_target_elf_flavour,		/* core_flovour.  */
+  default_check_format,			/* check_format.  */
+  default_core_sniffer,			/* core_sniffer.  */
+  fetch_elfcore_registers,		/* core_read_registers.  */
+  NULL
+};
+
+void
+_initialize_arm_netbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = armnbsd_fetch_registers;
+  t->to_store_registers = armnbsd_store_registers;
+  add_target (t);
+
+  deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armnbsd-nat.c ./gdb/armnbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armnbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/armnbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,501 +0,0 @@
-/* Native-dependent code for BSD Unix running on ARM's, for GDB.
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-
-#include "arm-tdep.h"
-#include "inf-ptrace.h"
-
-extern int arm_apcs_32;
-
-static void
-arm_supply_gregset (struct regcache *regcache, struct reg *gregset)
-{
-  int regno;
-  CORE_ADDR r_pc;
-
-  /* Integer registers.  */
-  for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
-    regcache_raw_supply (regcache, regno, (char *) &gregset->r[regno]);
-
-  regcache_raw_supply (regcache, ARM_SP_REGNUM,
-		       (char *) &gregset->r_sp);
-  regcache_raw_supply (regcache, ARM_LR_REGNUM,
-		       (char *) &gregset->r_lr);
-  /* This is ok: we're running native...  */
-  r_pc = gdbarch_addr_bits_remove (get_regcache_arch (regcache), gregset->r_pc);
-  regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc);
-
-  if (arm_apcs_32)
-    regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			 (char *) &gregset->r_cpsr);
-  else
-    regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			 (char *) &gregset->r_pc);
-}
-
-static void
-arm_supply_fparegset (struct regcache *regcache, struct fpreg *fparegset)
-{
-  int regno;
-
-  for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
-    regcache_raw_supply (regcache, regno,
-			 (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
-
-  regcache_raw_supply (regcache, ARM_FPS_REGNUM,
-		       (char *) &fparegset->fpr_fpsr);
-}
-
-static void
-fetch_register (struct regcache *regcache, int regno)
-{
-  struct reg inferior_registers;
-  int ret;
-
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch general register"));
-      return;
-    }
-
-  switch (regno)
-    {
-    case ARM_SP_REGNUM:
-      regcache_raw_supply (regcache, ARM_SP_REGNUM,
-			   (char *) &inferior_registers.r_sp);
-      break;
-
-    case ARM_LR_REGNUM:
-      regcache_raw_supply (regcache, ARM_LR_REGNUM,
-			   (char *) &inferior_registers.r_lr);
-      break;
-
-    case ARM_PC_REGNUM:
-      /* This is ok: we're running native...  */
-      inferior_registers.r_pc = gdbarch_addr_bits_remove
-				  (get_regcache_arch (regcache),
-				   inferior_registers.r_pc);
-      regcache_raw_supply (regcache, ARM_PC_REGNUM,
-			   (char *) &inferior_registers.r_pc);
-      break;
-
-    case ARM_PS_REGNUM:
-      if (arm_apcs_32)
-	regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			     (char *) &inferior_registers.r_cpsr);
-      else
-	regcache_raw_supply (regcache, ARM_PS_REGNUM,
-			     (char *) &inferior_registers.r_pc);
-      break;
-
-    default:
-      regcache_raw_supply (regcache, regno,
-			   (char *) &inferior_registers.r[regno]);
-      break;
-    }
-}
-
-static void
-fetch_regs (struct regcache *regcache)
-{
-  struct reg inferior_registers;
-  int ret;
-  int regno;
-
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch general registers"));
-      return;
-    }
-
-  arm_supply_gregset (regcache, &inferior_registers);
-}
-
-static void
-fetch_fp_register (struct regcache *regcache, int regno)
-{
-  struct fpreg inferior_fp_registers;
-  int ret;
-
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch floating-point register"));
-      return;
-    }
-
-  switch (regno)
-    {
-    case ARM_FPS_REGNUM:
-      regcache_raw_supply (regcache, ARM_FPS_REGNUM,
-			   (char *) &inferior_fp_registers.fpr_fpsr);
-      break;
-
-    default:
-      regcache_raw_supply (regcache, regno,
-			   (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
-      break;
-    }
-}
-
-static void
-fetch_fp_regs (struct regcache *regcache)
-{
-  struct fpreg inferior_fp_registers;
-  int ret;
-  int regno;
-
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch general registers"));
-      return;
-    }
-
-  arm_supply_fparegset (regcache, &inferior_fp_registers);
-}
-
-static void
-armnbsd_fetch_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regno)
-{
-  if (regno >= 0)
-    {
-      if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM)
-	fetch_register (regcache, regno);
-      else
-	fetch_fp_register (regcache, regno);
-    }
-  else
-    {
-      fetch_regs (regcache);
-      fetch_fp_regs (regcache);
-    }
-}
-
-
-static void
-store_register (const struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct reg inferior_registers;
-  int ret;
-
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch general registers"));
-      return;
-    }
-
-  switch (regno)
-    {
-    case ARM_SP_REGNUM:
-      regcache_raw_collect (regcache, ARM_SP_REGNUM,
-			    (char *) &inferior_registers.r_sp);
-      break;
-
-    case ARM_LR_REGNUM:
-      regcache_raw_collect (regcache, ARM_LR_REGNUM,
-			    (char *) &inferior_registers.r_lr);
-      break;
-
-    case ARM_PC_REGNUM:
-      if (arm_apcs_32)
-	regcache_raw_collect (regcache, ARM_PC_REGNUM,
-			      (char *) &inferior_registers.r_pc);
-      else
-	{
-	  unsigned pc_val;
-
-	  regcache_raw_collect (regcache, ARM_PC_REGNUM,
-				(char *) &pc_val);
-	  
-	  pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
-	  inferior_registers.r_pc ^= gdbarch_addr_bits_remove
-				       (gdbarch, inferior_registers.r_pc);
-	  inferior_registers.r_pc |= pc_val;
-	}
-      break;
-
-    case ARM_PS_REGNUM:
-      if (arm_apcs_32)
-	regcache_raw_collect (regcache, ARM_PS_REGNUM,
-			      (char *) &inferior_registers.r_cpsr);
-      else
-	{
-	  unsigned psr_val;
-
-	  regcache_raw_collect (regcache, ARM_PS_REGNUM,
-				(char *) &psr_val);
-
-	  psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
-	  inferior_registers.r_pc = gdbarch_addr_bits_remove
-				      (gdbarch, inferior_registers.r_pc);
-	  inferior_registers.r_pc |= psr_val;
-	}
-      break;
-
-    default:
-      regcache_raw_collect (regcache, regno,
-			    (char *) &inferior_registers.r[regno]);
-      break;
-    }
-
-  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
-
-  if (ret < 0)
-    warning (_("unable to write register %d to inferior"), regno);
-}
-
-static void
-store_regs (const struct regcache *regcache)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct reg inferior_registers;
-  int ret;
-  int regno;
-
-
-  for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
-    regcache_raw_collect (regcache, regno,
-			  (char *) &inferior_registers.r[regno]);
-
-  regcache_raw_collect (regcache, ARM_SP_REGNUM,
-			(char *) &inferior_registers.r_sp);
-  regcache_raw_collect (regcache, ARM_LR_REGNUM,
-			(char *) &inferior_registers.r_lr);
-
-  if (arm_apcs_32)
-    {
-      regcache_raw_collect (regcache, ARM_PC_REGNUM,
-			    (char *) &inferior_registers.r_pc);
-      regcache_raw_collect (regcache, ARM_PS_REGNUM,
-			    (char *) &inferior_registers.r_cpsr);
-    }
-  else
-    {
-      unsigned pc_val;
-      unsigned psr_val;
-
-      regcache_raw_collect (regcache, ARM_PC_REGNUM,
-			    (char *) &pc_val);
-      regcache_raw_collect (regcache, ARM_PS_REGNUM,
-			    (char *) &psr_val);
-	  
-      pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
-      psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
-
-      inferior_registers.r_pc = pc_val | psr_val;
-    }
-
-  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
-
-  if (ret < 0)
-    warning (_("unable to store general registers"));
-}
-
-static void
-store_fp_register (const struct regcache *regcache, int regno)
-{
-  struct fpreg inferior_fp_registers;
-  int ret;
-
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
-
-  if (ret < 0)
-    {
-      warning (_("unable to fetch floating-point registers"));
-      return;
-    }
-
-  switch (regno)
-    {
-    case ARM_FPS_REGNUM:
-      regcache_raw_collect (regcache, ARM_FPS_REGNUM,
-			    (char *) &inferior_fp_registers.fpr_fpsr);
-      break;
-
-    default:
-      regcache_raw_collect (regcache, regno,
-			    (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
-      break;
-    }
-
-  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
-
-  if (ret < 0)
-    warning (_("unable to write register %d to inferior"), regno);
-}
-
-static void
-store_fp_regs (const struct regcache *regcache)
-{
-  struct fpreg inferior_fp_registers;
-  int ret;
-  int regno;
-
-
-  for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
-    regcache_raw_collect (regcache, regno,
-			  (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
-
-  regcache_raw_collect (regcache, ARM_FPS_REGNUM,
-			(char *) &inferior_fp_registers.fpr_fpsr);
-
-  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
-
-  if (ret < 0)
-    warning (_("unable to store floating-point registers"));
-}
-
-static void
-armnbsd_store_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regno)
-{
-  if (regno >= 0)
-    {
-      if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM)
-	store_register (regcache, regno);
-      else
-	store_fp_register (regcache, regno);
-    }
-  else
-    {
-      store_regs (regcache);
-      store_fp_regs (regcache);
-    }
-}
-
-struct md_core
-{
-  struct reg intreg;
-  struct fpreg freg;
-};
-
-static void
-fetch_core_registers (struct regcache *regcache,
-		      char *core_reg_sect, unsigned core_reg_size,
-		      int which, CORE_ADDR ignore)
-{
-  struct md_core *core_reg = (struct md_core *) core_reg_sect;
-  int regno;
-  CORE_ADDR r_pc;
-
-  arm_supply_gregset (regcache, &core_reg->intreg);
-  arm_supply_fparegset (regcache, &core_reg->freg);
-}
-
-static void
-fetch_elfcore_registers (struct regcache *regcache,
-			 char *core_reg_sect, unsigned core_reg_size,
-			 int which, CORE_ADDR ignore)
-{
-  struct reg gregset;
-  struct fpreg fparegset;
-
-  switch (which)
-    {
-    case 0:	/* Integer registers.  */
-      if (core_reg_size != sizeof (struct reg))
-	warning (_("wrong size of register set in core file"));
-      else
-	{
-	  /* The memcpy may be unnecessary, but we can't really be sure
-	     of the alignment of the data in the core file.  */
-	  memcpy (&gregset, core_reg_sect, sizeof (gregset));
-	  arm_supply_gregset (regcache, &gregset);
-	}
-      break;
-
-    case 2:
-      if (core_reg_size != sizeof (struct fpreg))
-	warning (_("wrong size of FPA register set in core file"));
-      else
-	{
-	  /* The memcpy may be unnecessary, but we can't really be sure
-	     of the alignment of the data in the core file.  */
-	  memcpy (&fparegset, core_reg_sect, sizeof (fparegset));
-	  arm_supply_fparegset (regcache, &fparegset);
-	}
-      break;
-
-    default:
-      /* Don't know what kind of register request this is; just ignore it.  */
-      break;
-    }
-}
-
-static struct core_fns arm_netbsd_core_fns =
-{
-  bfd_target_unknown_flavour,		/* core_flovour.  */
-  default_check_format,			/* check_format.  */
-  default_core_sniffer,			/* core_sniffer.  */
-  fetch_core_registers,			/* core_read_registers.  */
-  NULL
-};
-
-static struct core_fns arm_netbsd_elfcore_fns =
-{
-  bfd_target_elf_flavour,		/* core_flovour.  */
-  default_check_format,			/* check_format.  */
-  default_core_sniffer,			/* core_sniffer.  */
-  fetch_elfcore_registers,		/* core_read_registers.  */
-  NULL
-};
-
-void
-_initialize_arm_netbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = armnbsd_fetch_registers;
-  t->to_store_registers = armnbsd_store_registers;
-  add_target (t);
-
-  deprecated_add_core_fns (&arm_netbsd_core_fns);
-  deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-nbsd-tdep.c ./gdb/arm-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arm-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,96 @@
+/* Target-dependent code for NetBSD/arm.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+
+#include "arch/arm.h"
+#include "arm-tdep.h"
+#include "solib-svr4.h"
+
+/* Description of the longjmp buffer.  */
+#define ARM_NBSD_JB_PC 24
+#define ARM_NBSD_JB_ELEMENT_SIZE INT_REGISTER_SIZE
+
+/* For compatibility with previous implemenations of GDB on arm/NetBSD,
+   override the default little-endian breakpoint.  */
+static const gdb_byte arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6};
+static const gdb_byte arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11};
+static const gdb_byte arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
+static const gdb_byte arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
+
+static void
+arm_netbsd_init_abi_common (struct gdbarch_info info,
+			    struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->lowest_pc = 0x8000;
+  switch (info.byte_order)
+    {
+    case BFD_ENDIAN_LITTLE:
+      tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
+      tdep->thumb_breakpoint = arm_nbsd_thumb_le_breakpoint;
+      tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
+      tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_le_breakpoint);
+      break;
+
+    case BFD_ENDIAN_BIG:
+      tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint;
+      tdep->thumb_breakpoint = arm_nbsd_thumb_be_breakpoint;
+      tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint);
+      tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_be_breakpoint);
+      break;
+
+    default:
+      internal_error (__FILE__, __LINE__,
+		      _("arm_gdbarch_init: bad byte order for float format"));
+    }
+
+  tdep->jb_pc = ARM_NBSD_JB_PC;
+  tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;
+
+  /* Single stepping.  */
+  set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+}
+  
+static void
+arm_netbsd_elf_init_abi (struct gdbarch_info info,
+			 struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  arm_netbsd_init_abi_common (info, gdbarch);
+  if (tdep->fp_model == ARM_FLOAT_AUTO)
+    tdep->fp_model = ARM_FLOAT_SOFT_VFP;
+
+  /* NetBSD ELF uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_arm_netbsd_tdep;
+
+void
+_initialize_arm_netbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_NETBSD,
+                          arm_netbsd_elf_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armnbsd-tdep.c ./gdb/armnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armnbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/armnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,120 +0,0 @@
-/* Target-dependent code for NetBSD/arm.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-
-#include "arm-tdep.h"
-#include "solib-svr4.h"
-
-/* Description of the longjmp buffer.  */
-#define ARM_NBSD_JB_PC 24
-#define ARM_NBSD_JB_ELEMENT_SIZE INT_REGISTER_SIZE
-
-/* For compatibility with previous implemenations of GDB on arm/NetBSD,
-   override the default little-endian breakpoint.  */
-static const gdb_byte arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6};
-static const gdb_byte arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11};
-static const gdb_byte arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
-static const gdb_byte arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
-
-static void
-arm_netbsd_init_abi_common (struct gdbarch_info info,
-			    struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->lowest_pc = 0x8000;
-  switch (info.byte_order)
-    {
-    case BFD_ENDIAN_LITTLE:
-      tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
-      tdep->thumb_breakpoint = arm_nbsd_thumb_le_breakpoint;
-      tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
-      tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_le_breakpoint);
-      break;
-
-    case BFD_ENDIAN_BIG:
-      tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint;
-      tdep->thumb_breakpoint = arm_nbsd_thumb_be_breakpoint;
-      tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint);
-      tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_be_breakpoint);
-      break;
-
-    default:
-      internal_error (__FILE__, __LINE__,
-		      _("arm_gdbarch_init: bad byte order for float format"));
-    }
-
-  tdep->jb_pc = ARM_NBSD_JB_PC;
-  tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;
-
-  /* Single stepping.  */
-  set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
-}
-  
-static void
-arm_netbsd_aout_init_abi (struct gdbarch_info info, 
-			  struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  arm_netbsd_init_abi_common (info, gdbarch);
-  if (tdep->fp_model == ARM_FLOAT_AUTO)
-    tdep->fp_model = ARM_FLOAT_SOFT_FPA;
-}
-
-static void
-arm_netbsd_elf_init_abi (struct gdbarch_info info,
-			 struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  arm_netbsd_init_abi_common (info, gdbarch);
-  if (tdep->fp_model == ARM_FLOAT_AUTO)
-    tdep->fp_model = ARM_FLOAT_SOFT_VFP;
-
-  /* NetBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-static enum gdb_osabi
-arm_netbsd_aout_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "a.out-arm-netbsd") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_arm_netbsd_tdep;
-
-void
-_initialize_arm_netbsd_tdep (void)
-{
-  gdbarch_register_osabi_sniffer (bfd_arch_arm, bfd_target_aout_flavour,
-				  arm_netbsd_aout_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_NETBSD_AOUT,
-                          arm_netbsd_aout_init_abi);
-  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_NETBSD_ELF,
-                          arm_netbsd_elf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-obsd-tdep.c ./gdb/arm-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/arm-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,127 @@
+/* Target-dependent code for OpenBSD/arm.
+
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "obsd-tdep.h"
+#include "arm-tdep.h"
+#include "solib-svr4.h"
+
+/* Signal trampolines.  */
+
+static void
+armobsd_sigframe_init (const struct tramp_frame *self,
+		       struct frame_info *this_frame,
+		       struct trad_frame_cache *cache,
+		       CORE_ADDR func)
+{
+  CORE_ADDR sp, sigcontext_addr, addr;
+  int regnum;
+
+  /* We find the appropriate instance of `struct sigcontext' at a
+     fixed offset in the signal frame.  */
+  sp = get_frame_register_signed (this_frame, ARM_SP_REGNUM);
+  sigcontext_addr = sp + 16;
+
+  /* PC.  */
+  trad_frame_set_reg_addr (cache, ARM_PC_REGNUM, sigcontext_addr + 76);
+
+  /* GPRs.  */
+  for (regnum = ARM_A1_REGNUM, addr = sigcontext_addr + 12;
+       regnum <= ARM_LR_REGNUM; regnum++, addr += 4)
+    trad_frame_set_reg_addr (cache, regnum, addr);
+
+  trad_frame_set_id (cache, frame_id_build (sp, func));
+}
+
+static const struct tramp_frame armobsd_sigframe =
+{
+  SIGTRAMP_FRAME,
+  4,
+  {
+    { 0xe28d0010, -1 },		/* add     r0, sp, #16 */
+    { 0xef000067, -1 },		/* swi     SYS_sigreturn */
+    { 0xef000001, -1 },		/* swi     SYS_exit */
+    { 0xeafffffc, -1 },		/* b       . - 8 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  armobsd_sigframe_init
+};
+
+
+/* Override default thumb breakpoints.  */
+static const gdb_byte arm_obsd_thumb_le_breakpoint[] = {0xfe, 0xdf};
+static const gdb_byte arm_obsd_thumb_be_breakpoint[] = {0xdf, 0xfe};
+
+static void
+armobsd_init_abi (struct gdbarch_info info,
+		  struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->fp_model == ARM_FLOAT_AUTO)
+    tdep->fp_model = ARM_FLOAT_SOFT_VFP;
+
+  tramp_frame_prepend_unwinder (gdbarch, &armobsd_sigframe);
+
+  /* OpenBSD/arm uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
+
+  tdep->jb_pc = 24;
+  tdep->jb_elt_size = 4;
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, armbsd_iterate_over_regset_sections);
+
+  /* OpenBSD/arm uses -fpcc-struct-return by default.  */
+  tdep->struct_return = pcc_struct_return;
+
+  /* Single stepping.  */
+  set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+
+  /* Breakpoints.  */
+  switch (info.byte_order)
+    {
+    case BFD_ENDIAN_BIG:
+      tdep->thumb_breakpoint = arm_obsd_thumb_be_breakpoint;
+      tdep->thumb_breakpoint_size = sizeof (arm_obsd_thumb_be_breakpoint);
+      break;
+
+    case BFD_ENDIAN_LITTLE:
+      tdep->thumb_breakpoint = arm_obsd_thumb_le_breakpoint;
+      tdep->thumb_breakpoint_size = sizeof (arm_obsd_thumb_le_breakpoint);
+      break;
+    }
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_armobsd_tdep;
+
+void
+_initialize_armobsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_OPENBSD,
+			  armobsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armobsd-tdep.c ./gdb/armobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/armobsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/armobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,140 +0,0 @@
-/* Target-dependent code for OpenBSD/arm.
-
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-#include "trad-frame.h"
-#include "tramp-frame.h"
-
-#include "obsd-tdep.h"
-#include "arm-tdep.h"
-#include "solib-svr4.h"
-
-/* Signal trampolines.  */
-
-static void
-armobsd_sigframe_init (const struct tramp_frame *self,
-		       struct frame_info *this_frame,
-		       struct trad_frame_cache *cache,
-		       CORE_ADDR func)
-{
-  CORE_ADDR sp, sigcontext_addr, addr;
-  int regnum;
-
-  /* We find the appropriate instance of `struct sigcontext' at a
-     fixed offset in the signal frame.  */
-  sp = get_frame_register_signed (this_frame, ARM_SP_REGNUM);
-  sigcontext_addr = sp + 16;
-
-  /* PC.  */
-  trad_frame_set_reg_addr (cache, ARM_PC_REGNUM, sigcontext_addr + 76);
-
-  /* GPRs.  */
-  for (regnum = ARM_A1_REGNUM, addr = sigcontext_addr + 12;
-       regnum <= ARM_LR_REGNUM; regnum++, addr += 4)
-    trad_frame_set_reg_addr (cache, regnum, addr);
-
-  trad_frame_set_id (cache, frame_id_build (sp, func));
-}
-
-static const struct tramp_frame armobsd_sigframe =
-{
-  SIGTRAMP_FRAME,
-  4,
-  {
-    { 0xe28d0010, -1 },		/* add     r0, sp, #16 */
-    { 0xef000067, -1 },		/* swi     SYS_sigreturn */
-    { 0xef000001, -1 },		/* swi     SYS_exit */
-    { 0xeafffffc, -1 },		/* b       . - 8 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  armobsd_sigframe_init
-};
-
-
-/* Override default thumb breakpoints.  */
-static const gdb_byte arm_obsd_thumb_le_breakpoint[] = {0xfe, 0xdf};
-static const gdb_byte arm_obsd_thumb_be_breakpoint[] = {0xdf, 0xfe};
-
-static void
-armobsd_init_abi (struct gdbarch_info info,
-		  struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  if (tdep->fp_model == ARM_FLOAT_AUTO)
-    tdep->fp_model = ARM_FLOAT_SOFT_VFP;
-
-  tramp_frame_prepend_unwinder (gdbarch, &armobsd_sigframe);
-
-  /* OpenBSD/arm uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
-
-  tdep->jb_pc = 24;
-  tdep->jb_elt_size = 4;
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, armbsd_iterate_over_regset_sections);
-
-  /* OpenBSD/arm uses -fpcc-struct-return by default.  */
-  tdep->struct_return = pcc_struct_return;
-
-  /* Single stepping.  */
-  set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
-
-  /* Breakpoints.  */
-  switch (info.byte_order)
-    {
-    case BFD_ENDIAN_BIG:
-      tdep->thumb_breakpoint = arm_obsd_thumb_be_breakpoint;
-      tdep->thumb_breakpoint_size = sizeof (arm_obsd_thumb_be_breakpoint);
-      break;
-
-    case BFD_ENDIAN_LITTLE:
-      tdep->thumb_breakpoint = arm_obsd_thumb_le_breakpoint;
-      tdep->thumb_breakpoint_size = sizeof (arm_obsd_thumb_le_breakpoint);
-      break;
-    }
-}
-
-
-static enum gdb_osabi
-armobsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_OPENBSD_ELF;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_armobsd_tdep;
-
-void
-_initialize_armobsd_tdep (void)
-{
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_arm, bfd_target_unknown_flavour,
-                                  armobsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_OPENBSD_ELF,
-			  armobsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-symbian-tdep.c ./gdb/arm-symbian-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-symbian-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-symbian-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* ARM Symbian OS target support.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -63,8 +63,6 @@ static void
 arm_symbian_init_abi (struct gdbarch_info info,
 		      struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   /* Shared library handling.  */
   set_gdbarch_skip_trampoline_code (gdbarch, arm_symbian_skip_trampoline_code);
 
@@ -108,7 +106,7 @@ arm_symbian_osabi_sniffer (bfd *abfd)
   if (phdrs_size == -1)
     return GDB_OSABI_UNKNOWN;
 
-  phdrs = alloca (phdrs_size);
+  phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size);
   num_phdrs = bfd_get_elf_phdrs (abfd, phdrs);
   if (num_phdrs == -1)
     return GDB_OSABI_UNKNOWN;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-tdep.c ./gdb/arm-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target dependent code for GDB on ARM systems.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "gdbcmd.h"
 #include "gdbcore.h"
 #include "dis-asm.h"		/* For register styles.  */
+#include "disasm.h"
 #include "regcache.h"
 #include "reggroups.h"
 #include "doublest.h"
@@ -45,6 +46,8 @@
 #include "user-regs.h"
 #include "observer.h"
 
+#include "arch/arm.h"
+#include "arch/arm-get-next-pcs.h"
 #include "arm-tdep.h"
 #include "gdb/sim-arm.h"
 
@@ -56,14 +59,15 @@
 
 #include "record.h"
 #include "record-full.h"
+#include <algorithm>
 
-#include "features/arm-with-m.c"
-#include "features/arm-with-m-fpa-layout.c"
-#include "features/arm-with-m-vfp-d16.c"
-#include "features/arm-with-iwmmxt.c"
-#include "features/arm-with-vfpv2.c"
-#include "features/arm-with-vfpv3.c"
-#include "features/arm-with-neon.c"
+#include "features/arm/arm-with-m.c"
+#include "features/arm/arm-with-m-fpa-layout.c"
+#include "features/arm/arm-with-m-vfp-d16.c"
+#include "features/arm/arm-with-iwmmxt.c"
+#include "features/arm/arm-with-vfpv2.c"
+#include "features/arm/arm-with-vfpv3.c"
+#include "features/arm/arm-with-neon.c"
 
 static int arm_debug;
 
@@ -141,16 +145,6 @@ static const char *const arm_mode_string
 static const char *arm_fallback_mode_string = "auto";
 static const char *arm_force_mode_string = "auto";
 
-/* Internal override of the execution mode.  -1 means no override,
-   0 means override to ARM mode, 1 means override to Thumb mode.
-   The effect is the same as if arm_force_mode has been set by the
-   user (except the internal override has precedence over a user's
-   arm_force_mode override).  */
-static int arm_override_mode = -1;
-
-/* Number of different reg name sets (options).  */
-static int num_disassembly_options;
-
 /* The standard register names, and all the valid aliases for them.  Note
    that `fp', `sp' and `pc' are not added in this alias list, because they
    have been added as builtin user registers in
@@ -211,6 +205,9 @@ static const char *const arm_register_na
  "f4",  "f5",  "f6",  "f7",	/* 20 21 22 23 */
  "fps", "cpsr" };		/* 24 25       */
 
+/* Holds the current set of options to be passed to the disassembler.  */
+static char *arm_disassembler_options;
+
 /* Valid register name styles.  */
 static const char **valid_disassembly_styles;
 
@@ -221,7 +218,9 @@ static const char *disassembly_style;
    style.  */
 static void set_disassembly_style_sfunc(char *, int,
 					 struct cmd_list_element *);
-static void set_disassembly_style (void);
+static void show_disassembly_style_sfunc (struct ui_file *, int,
+					  struct cmd_list_element *,
+					  const char *);
 
 static void convert_from_extended (const struct floatformat *, const void *,
 				   void *, int);
@@ -235,7 +234,18 @@ static void arm_neon_quad_write (struct 
 				 struct regcache *regcache,
 				 int regnum, const gdb_byte *buf);
 
-static int thumb_insn_size (unsigned short inst1);
+static CORE_ADDR
+  arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self);
+
+
+/* get_next_pcs operations.  */
+static struct arm_get_next_pcs_ops arm_get_next_pcs_ops = {
+  arm_get_next_pcs_read_memory_unsigned_integer,
+  arm_get_next_pcs_syscall_next_pc,
+  arm_get_next_pcs_addr_bits_remove,
+  arm_get_next_pcs_is_thumb,
+  NULL,
+};
 
 struct arm_prologue_cache
 {
@@ -267,12 +277,6 @@ static CORE_ADDR arm_analyze_prologue (s
 
 #define DISPLACED_STEPPING_ARCH_VERSION		5
 
-/* Addresses for calling Thumb functions have the bit 0 set.
-   Here are some macros to test, set, or clear bit 0 of addresses.  */
-#define IS_THUMB_ADDR(addr)	((addr) & 1)
-#define MAKE_THUMB_ADDR(addr)	((addr) | 1)
-#define UNMAKE_THUMB_ADDR(addr) ((addr) & ~1)
-
 /* Set to true if the 32-bit mode is in use.  */
 
 int arm_apcs_32 = 1;
@@ -288,6 +292,19 @@ arm_psr_thumb_bit (struct gdbarch *gdbar
     return CPSR_T;
 }
 
+/* Determine if the processor is currently executing in Thumb mode.  */
+
+int
+arm_is_thumb (struct regcache *regcache)
+{
+  ULONGEST cpsr;
+  ULONGEST t_bit = arm_psr_thumb_bit (get_regcache_arch (regcache));
+
+  cpsr = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
+
+  return (cpsr & t_bit) != 0;
+}
+
 /* Determine if FRAME is executing in Thumb mode.  */
 
 int
@@ -333,7 +350,8 @@ arm_find_mapping_symbol (CORE_ADDR memad
 					    0 };
       unsigned int idx;
 
-      data = objfile_data (sec->objfile, arm_objfile_data_key);
+      data = (struct arm_per_objfile *) objfile_data (sec->objfile,
+						      arm_objfile_data_key);
       if (data != NULL)
 	{
 	  map = data->section_maps[sec->the_bfd_section->index];
@@ -401,10 +419,6 @@ arm_pc_is_thumb (struct gdbarch *gdbarch
   if (IS_THUMB_ADDR (memaddr))
     return 1;
 
-  /* Respect internal mode override if active.  */
-  if (arm_override_mode != -1)
-    return arm_override_mode;
-
   /* If the user wants to override the symbol table, let him.  */
   if (strcmp (arm_force_mode_string, "arm") == 0)
     return 0;
@@ -443,6 +457,62 @@ arm_pc_is_thumb (struct gdbarch *gdbarch
   return 0;
 }
 
+/* Determine if the address specified equals any of these magic return
+   values, called EXC_RETURN, defined by the ARM v6-M and v7-M
+   architectures.
+
+   From ARMv6-M Reference Manual B1.5.8
+   Table B1-5 Exception return behavior
+
+   EXC_RETURN    Return To        Return Stack
+   0xFFFFFFF1    Handler mode     Main
+   0xFFFFFFF9    Thread mode      Main
+   0xFFFFFFFD    Thread mode      Process
+
+   From ARMv7-M Reference Manual B1.5.8
+   Table B1-8 EXC_RETURN definition of exception return behavior, no FP
+
+   EXC_RETURN    Return To        Return Stack
+   0xFFFFFFF1    Handler mode     Main
+   0xFFFFFFF9    Thread mode      Main
+   0xFFFFFFFD    Thread mode      Process
+
+   Table B1-9 EXC_RETURN definition of exception return behavior, with
+   FP
+
+   EXC_RETURN    Return To        Return Stack    Frame Type
+   0xFFFFFFE1    Handler mode     Main            Extended
+   0xFFFFFFE9    Thread mode      Main            Extended
+   0xFFFFFFED    Thread mode      Process         Extended
+   0xFFFFFFF1    Handler mode     Main            Basic
+   0xFFFFFFF9    Thread mode      Main            Basic
+   0xFFFFFFFD    Thread mode      Process         Basic
+
+   For more details see "B1.5.8 Exception return behavior"
+   in both ARMv6-M and ARMv7-M Architecture Reference Manuals.  */
+
+static int
+arm_m_addr_is_magic (CORE_ADDR addr)
+{
+  switch (addr)
+    {
+      /* Values from Tables in B1.5.8 the EXC_RETURN definitions of
+	 the exception return behavior.  */
+      case 0xffffffe1:
+      case 0xffffffe9:
+      case 0xffffffed:
+      case 0xfffffff1:
+      case 0xfffffff9:
+      case 0xfffffffd:
+	/* Address is magic.  */
+	return 1;
+
+      default:
+	/* Address is not magic.  */
+	return 0;
+    }
+}
+
 /* Remove useless bits from addresses in a running program.  */
 static CORE_ADDR
 arm_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val)
@@ -450,7 +520,7 @@ arm_addr_bits_remove (struct gdbarch *gd
   /* On M-profile devices, do not strip the low bit from EXC_RETURN
      (the magic exception return address).  */
   if (gdbarch_tdep (gdbarch)->is_m
-      && (val & 0xfffffff0) == 0xfffffff0)
+      && arm_m_addr_is_magic (val))
     return val;
 
   if (arm_apcs_32)
@@ -503,9 +573,9 @@ skip_prologue_function (struct gdbarch *
 	 implementation (this is hand-written ARM assembler in glibc).  */
 
       if (!is_thumb
-	  && read_memory_unsigned_integer (pc, 4, byte_order_for_code)
+	  && read_code_unsigned_integer (pc, 4, byte_order_for_code)
 	     == 0xe3e00a0f /* mov r0, #0xffff0fff */
-	  && read_memory_unsigned_integer (pc + 4, 4, byte_order_for_code)
+	  && read_code_unsigned_integer (pc + 4, 4, byte_order_for_code)
 	     == 0xe240f01f) /* sub pc, r0, #31 */
 	return 1;
     }
@@ -513,15 +583,6 @@ skip_prologue_function (struct gdbarch *
   return 0;
 }
 
-/* Support routines for instruction parsing.  */
-#define submask(x) ((1L << ((x) + 1)) - 1)
-#define bit(obj,st) (((obj) >> (st)) & 1)
-#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st)))
-#define sbits(obj,st,fn) \
-  ((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st))))
-#define BranchDest(addr,instr) \
-  ((CORE_ADDR) (((unsigned long) (addr)) + 8 + (sbits (instr, 0, 23) << 2)))
-
 /* Extract the immediate from instruction movw/movt of encoding T.  INSN1 is
    the first 16-bit of instruction, and INSN2 is the second 16-bit of
    instruction.  */
@@ -561,128 +622,6 @@ thumb_expand_immediate (unsigned int imm
   return (0x80 | (imm & 0x7f)) << (32 - count);
 }
 
-/* Return 1 if the 16-bit Thumb instruction INST might change
-   control flow, 0 otherwise.  */
-
-static int
-thumb_instruction_changes_pc (unsigned short inst)
-{
-  if ((inst & 0xff00) == 0xbd00)	/* pop {rlist, pc} */
-    return 1;
-
-  if ((inst & 0xf000) == 0xd000)	/* conditional branch */
-    return 1;
-
-  if ((inst & 0xf800) == 0xe000)	/* unconditional branch */
-    return 1;
-
-  if ((inst & 0xff00) == 0x4700)	/* bx REG, blx REG */
-    return 1;
-
-  if ((inst & 0xff87) == 0x4687)	/* mov pc, REG */
-    return 1;
-
-  if ((inst & 0xf500) == 0xb100)	/* CBNZ or CBZ.  */
-    return 1;
-
-  return 0;
-}
-
-/* Return 1 if the 32-bit Thumb instruction in INST1 and INST2
-   might change control flow, 0 otherwise.  */
-
-static int
-thumb2_instruction_changes_pc (unsigned short inst1, unsigned short inst2)
-{
-  if ((inst1 & 0xf800) == 0xf000 && (inst2 & 0x8000) == 0x8000)
-    {
-      /* Branches and miscellaneous control instructions.  */
-
-      if ((inst2 & 0x1000) != 0 || (inst2 & 0xd001) == 0xc000)
-	{
-	  /* B, BL, BLX.  */
-	  return 1;
-	}
-      else if (inst1 == 0xf3de && (inst2 & 0xff00) == 0x3f00)
-	{
-	  /* SUBS PC, LR, #imm8.  */
-	  return 1;
-	}
-      else if ((inst2 & 0xd000) == 0x8000 && (inst1 & 0x0380) != 0x0380)
-	{
-	  /* Conditional branch.  */
-	  return 1;
-	}
-
-      return 0;
-    }
-
-  if ((inst1 & 0xfe50) == 0xe810)
-    {
-      /* Load multiple or RFE.  */
-
-      if (bit (inst1, 7) && !bit (inst1, 8))
-	{
-	  /* LDMIA or POP */
-	  if (bit (inst2, 15))
-	    return 1;
-	}
-      else if (!bit (inst1, 7) && bit (inst1, 8))
-	{
-	  /* LDMDB */
-	  if (bit (inst2, 15))
-	    return 1;
-	}
-      else if (bit (inst1, 7) && bit (inst1, 8))
-	{
-	  /* RFEIA */
-	  return 1;
-	}
-      else if (!bit (inst1, 7) && !bit (inst1, 8))
-	{
-	  /* RFEDB */
-	  return 1;
-	}
-
-      return 0;
-    }
-
-  if ((inst1 & 0xffef) == 0xea4f && (inst2 & 0xfff0) == 0x0f00)
-    {
-      /* MOV PC or MOVS PC.  */
-      return 1;
-    }
-
-  if ((inst1 & 0xff70) == 0xf850 && (inst2 & 0xf000) == 0xf000)
-    {
-      /* LDR PC.  */
-      if (bits (inst1, 0, 3) == 15)
-	return 1;
-      if (bit (inst1, 7))
-	return 1;
-      if (bit (inst2, 11))
-	return 1;
-      if ((inst2 & 0x0fc0) == 0x0000)
-	return 1;	
-
-      return 0;
-    }
-
-  if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf000)
-    {
-      /* TBB.  */
-      return 1;
-    }
-
-  if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf010)
-    {
-      /* TBH.  */
-      return 1;
-    }
-
-  return 0;
-}
-
 /* Return 1 if the 16-bit Thumb instruction INSN restores SP in
    epilogue, 0 otherwise.  */
 
@@ -723,7 +662,7 @@ thumb_analyze_prologue (struct gdbarch *
     {
       unsigned short insn;
 
-      insn = read_memory_unsigned_integer (start, 2, byte_order_for_code);
+      insn = read_code_unsigned_integer (start, 2, byte_order_for_code);
 
       if ((insn & 0xfe00) == 0xb400)		/* push { rlist } */
 	{
@@ -854,8 +793,8 @@ thumb_analyze_prologue (struct gdbarch *
 	{
 	  unsigned short inst2;
 
-	  inst2 = read_memory_unsigned_integer (start + 2, 2,
-						byte_order_for_code);
+	  inst2 = read_code_unsigned_integer (start + 2, 2,
+					      byte_order_for_code);
 
 	  if ((insn & 0xf800) == 0xf000 && (inst2 & 0xe800) == 0xe800)
 	    {
@@ -1198,7 +1137,7 @@ arm_analyze_load_stack_chk_guard(CORE_AD
   if (is_thumb)
     {
       unsigned short insn1
-	= read_memory_unsigned_integer (pc, 2, byte_order_for_code);
+	= read_code_unsigned_integer (pc, 2, byte_order_for_code);
 
       if ((insn1 & 0xf800) == 0x4800) /* ldr Rd, #immed */
 	{
@@ -1211,14 +1150,14 @@ arm_analyze_load_stack_chk_guard(CORE_AD
       else if ((insn1 & 0xfbf0) == 0xf240) /* movw Rd, #const */
 	{
 	  unsigned short insn2
-	    = read_memory_unsigned_integer (pc + 2, 2, byte_order_for_code);
+	    = read_code_unsigned_integer (pc + 2, 2, byte_order_for_code);
 
 	  low = EXTRACT_MOVW_MOVT_IMM_T (insn1, insn2);
 
 	  insn1
-	    = read_memory_unsigned_integer (pc + 4, 2, byte_order_for_code);
+	    = read_code_unsigned_integer (pc + 4, 2, byte_order_for_code);
 	  insn2
-	    = read_memory_unsigned_integer (pc + 6, 2, byte_order_for_code);
+	    = read_code_unsigned_integer (pc + 6, 2, byte_order_for_code);
 
 	  /* movt Rd, #const */
 	  if ((insn1 & 0xfbc0) == 0xf2c0)
@@ -1233,7 +1172,7 @@ arm_analyze_load_stack_chk_guard(CORE_AD
   else
     {
       unsigned int insn
-	= read_memory_unsigned_integer (pc, 4, byte_order_for_code);
+	= read_code_unsigned_integer (pc, 4, byte_order_for_code);
 
       if ((insn & 0x0e5f0000) == 0x041f0000) /* ldr Rd, [PC, #immed] */
 	{
@@ -1249,7 +1188,7 @@ arm_analyze_load_stack_chk_guard(CORE_AD
 	  low = EXTRACT_MOVW_MOVT_IMM_A (insn);
 
 	  insn
-	    = read_memory_unsigned_integer (pc + 4, 4, byte_order_for_code);
+	    = read_code_unsigned_integer (pc + 4, 4, byte_order_for_code);
 
 	  if ((insn & 0x0ff00000) == 0x03400000) /* movt Rd, #const */
 	    {
@@ -1321,7 +1260,7 @@ arm_skip_stack_protector(CORE_ADDR pc, s
     {
       unsigned int destreg;
       unsigned short insn
-	= read_memory_unsigned_integer (pc + offset, 2, byte_order_for_code);
+	= read_code_unsigned_integer (pc + offset, 2, byte_order_for_code);
 
       /* Step 2: ldr Rd, [Rn, #immed], encoding T1.  */
       if ((insn & 0xf800) != 0x6800)
@@ -1330,8 +1269,8 @@ arm_skip_stack_protector(CORE_ADDR pc, s
 	return pc;
       destreg = bits (insn, 0, 2);
 
-      insn = read_memory_unsigned_integer (pc + offset + 2, 2,
-					   byte_order_for_code);
+      insn = read_code_unsigned_integer (pc + offset + 2, 2,
+					 byte_order_for_code);
       /* Step 3: str Rd, [Rn, #immed], encoding T1.  */
       if ((insn & 0xf800) != 0x6000)
 	return pc;
@@ -1342,7 +1281,7 @@ arm_skip_stack_protector(CORE_ADDR pc, s
     {
       unsigned int destreg;
       unsigned int insn
-	= read_memory_unsigned_integer (pc + offset, 4, byte_order_for_code);
+	= read_code_unsigned_integer (pc + offset, 4, byte_order_for_code);
 
       /* Step 2: ldr Rd, [Rn, #immed], encoding A1.  */
       if ((insn & 0x0e500000) != 0x04100000)
@@ -1351,7 +1290,7 @@ arm_skip_stack_protector(CORE_ADDR pc, s
 	return pc;
       destreg = bits (insn, 12, 15);
       /* Step 3: str Rd, [Rn, #immed], encoding A1.  */
-      insn = read_memory_unsigned_integer (pc + offset + 4,
+      insn = read_code_unsigned_integer (pc + offset + 4,
 					   4, byte_order_for_code);
       if ((insn & 0x0e500000) != 0x04000000)
 	return pc;
@@ -1384,8 +1323,6 @@ arm_skip_stack_protector(CORE_ADDR pc, s
 static CORE_ADDR
 arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  unsigned long inst;
   CORE_ADDR func_addr, limit_pc;
 
   /* See if we can determine the end of the prologue via the symbol table.
@@ -1505,103 +1442,11 @@ thumb_scan_prologue (struct gdbarch *gdb
        function is.  */
     return;
 
-  prologue_end = min (prologue_end, prev_pc);
+  prologue_end = std::min (prologue_end, prev_pc);
 
   thumb_analyze_prologue (gdbarch, prologue_start, prologue_end, cache);
 }
 
-/* Return 1 if THIS_INSTR might change control flow, 0 otherwise.  */
-
-static int
-arm_instruction_changes_pc (uint32_t this_instr)
-{
-  if (bits (this_instr, 28, 31) == INST_NV)
-    /* Unconditional instructions.  */
-    switch (bits (this_instr, 24, 27))
-      {
-      case 0xa:
-      case 0xb:
-	/* Branch with Link and change to Thumb.  */
-	return 1;
-      case 0xc:
-      case 0xd:
-      case 0xe:
-	/* Coprocessor register transfer.  */
-        if (bits (this_instr, 12, 15) == 15)
-	  error (_("Invalid update to pc in instruction"));
-	return 0;
-      default:
-	return 0;
-      }
-  else
-    switch (bits (this_instr, 25, 27))
-      {
-      case 0x0:
-	if (bits (this_instr, 23, 24) == 2 && bit (this_instr, 20) == 0)
-	  {
-	    /* Multiplies and extra load/stores.  */
-	    if (bit (this_instr, 4) == 1 && bit (this_instr, 7) == 1)
-	      /* Neither multiplies nor extension load/stores are allowed
-		 to modify PC.  */
-	      return 0;
-
-	    /* Otherwise, miscellaneous instructions.  */
-
-	    /* BX <reg>, BXJ <reg>, BLX <reg> */
-	    if (bits (this_instr, 4, 27) == 0x12fff1
-		|| bits (this_instr, 4, 27) == 0x12fff2
-		|| bits (this_instr, 4, 27) == 0x12fff3)
-	      return 1;
-
-	    /* Other miscellaneous instructions are unpredictable if they
-	       modify PC.  */
-	    return 0;
-	  }
-	/* Data processing instruction.  Fall through.  */
-
-      case 0x1:
-	if (bits (this_instr, 12, 15) == 15)
-	  return 1;
-	else
-	  return 0;
-
-      case 0x2:
-      case 0x3:
-	/* Media instructions and architecturally undefined instructions.  */
-	if (bits (this_instr, 25, 27) == 3 && bit (this_instr, 4) == 1)
-	  return 0;
-
-	/* Stores.  */
-	if (bit (this_instr, 20) == 0)
-	  return 0;
-
-	/* Loads.  */
-	if (bits (this_instr, 12, 15) == ARM_PC_REGNUM)
-	  return 1;
-	else
-	  return 0;
-
-      case 0x4:
-	/* Load/store multiple.  */
-	if (bit (this_instr, 20) == 1 && bit (this_instr, 15) == 1)
-	  return 1;
-	else
-	  return 0;
-
-      case 0x5:
-	/* Branch and branch with link.  */
-	return 1;
-
-      case 0x6:
-      case 0x7:
-	/* Coprocessor transfers or SWIs can not affect PC.  */
-	return 0;
-
-      default:
-	internal_error (__FILE__, __LINE__, _("bad value in switch"));
-      }
-}
-
 /* Return 1 if the ARM instruction INSN restores SP in epilogue, 0
    otherwise.  */
 
@@ -1641,7 +1486,6 @@ arm_analyze_prologue (struct gdbarch *gd
 		      CORE_ADDR prologue_start, CORE_ADDR prologue_end,
 		      struct arm_prologue_cache *cache)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   int regno;
   CORE_ADDR offset, current_pc;
@@ -1670,7 +1514,7 @@ arm_analyze_prologue (struct gdbarch *gd
        current_pc += 4)
     {
       unsigned int insn
-	= read_memory_unsigned_integer (current_pc, 4, byte_order_for_code);
+	= read_code_unsigned_integer (current_pc, 4, byte_order_for_code);
 
       if (insn == 0xe1a0c00d)		/* mov ip, sp */
 	{
@@ -1901,14 +1745,9 @@ arm_scan_prologue (struct frame_info *th
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  int regno;
-  CORE_ADDR prologue_start, prologue_end, current_pc;
+  CORE_ADDR prologue_start, prologue_end;
   CORE_ADDR prev_pc = get_frame_pc (this_frame);
   CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
-  pv_t regs[ARM_FPS_REGNUM];
-  struct pv_area *stack;
-  struct cleanup *back_to;
-  CORE_ADDR offset;
 
   /* Assume there is no frame until proven otherwise.  */
   cache->framereg = ARM_SP_REGNUM;
@@ -1971,10 +1810,11 @@ arm_scan_prologue (struct frame_info *th
 	 the callee (or at the present moment if this is the innermost frame).
 	 The value stored there should be the address of the stmfd + 8.  */
       CORE_ADDR frame_loc;
-      LONGEST return_value;
+      ULONGEST return_value;
 
       frame_loc = get_frame_register_unsigned (this_frame, ARM_FP_REGNUM);
-      if (!safe_read_memory_integer (frame_loc, 4, byte_order, &return_value))
+      if (!safe_read_memory_unsigned_integer (frame_loc, 4, byte_order,
+					      &return_value))
         return;
       else
         {
@@ -2028,7 +1868,7 @@ arm_prologue_unwind_stop_reason (struct 
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* This is meant to halt the backtrace at "_start".  */
   pc = get_frame_pc (this_frame);
@@ -2056,7 +1896,7 @@ arm_prologue_this_id (struct frame_info 
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* Use function start address as part of the frame ID.  If we cannot
      identify the start address (due to missing symbol information),
@@ -2080,7 +1920,7 @@ arm_prologue_prev_register (struct frame
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* If we are asked to unwind the PC, then we need to return the LR
      instead.  The prologue may save PC, but it will point into this
@@ -2160,7 +2000,7 @@ struct arm_exidx_data
 static void
 arm_exidx_data_free (struct objfile *objfile, void *arg)
 {
-  struct arm_exidx_data *data = arg;
+  struct arm_exidx_data *data = (struct arm_exidx_data *) arg;
   unsigned int i;
 
   for (i = 0; i < objfile->obfd->section_count; i++)
@@ -2225,12 +2065,12 @@ arm_exidx_new_objfile (struct objfile *o
   cleanups = make_cleanup (null_cleanup, NULL);
 
   /* Read contents of exception table and index.  */
-  exidx = bfd_get_section_by_name (objfile->obfd, ".ARM.exidx");
+  exidx = bfd_get_section_by_name (objfile->obfd, ELF_STRING_ARM_unwind);
   if (exidx)
     {
       exidx_vma = bfd_section_vma (objfile->obfd, exidx);
       exidx_size = bfd_get_section_size (exidx);
-      exidx_data = xmalloc (exidx_size);
+      exidx_data = (gdb_byte *) xmalloc (exidx_size);
       make_cleanup (xfree, exidx_data);
 
       if (!bfd_get_section_contents (objfile->obfd, exidx,
@@ -2246,7 +2086,7 @@ arm_exidx_new_objfile (struct objfile *o
     {
       extab_vma = bfd_section_vma (objfile->obfd, extab);
       extab_size = bfd_get_section_size (extab);
-      extab_data = xmalloc (extab_size);
+      extab_data = (gdb_byte *) xmalloc (extab_size);
       make_cleanup (xfree, extab_data);
 
       if (!bfd_get_section_contents (objfile->obfd, extab,
@@ -2383,8 +2223,9 @@ arm_exidx_new_objfile (struct objfile *o
 	 extab section starting at ADDR.  */
       if (n_bytes || n_words)
 	{
-	  gdb_byte *p = entry = obstack_alloc (&objfile->objfile_obstack,
-					       n_bytes + n_words * 4 + 1);
+	  gdb_byte *p = entry
+	    = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack,
+					  n_bytes + n_words * 4 + 1);
 
 	  while (n_bytes--)
 	    *p++ = (gdb_byte) ((word >> (8 * n_bytes)) & 0xff);
@@ -2434,7 +2275,8 @@ arm_find_exidx_entry (CORE_ADDR memaddr,
       struct arm_exidx_entry map_key = { memaddr - obj_section_addr (sec), 0 };
       unsigned int idx;
 
-      data = objfile_data (sec->objfile, arm_exidx_data_key);
+      data = ((struct arm_exidx_data *)
+	      objfile_data (sec->objfile, arm_exidx_data_key));
       if (data != NULL)
 	{
 	  map = data->section_maps[sec->the_bfd_section->index];
@@ -2821,19 +2663,19 @@ arm_exidx_unwind_sniffer (const struct f
 	 ensure this, so that e.g. pthread cancellation works.  */
       if (arm_frame_is_thumb (this_frame))
 	{
-	  LONGEST insn;
+	  ULONGEST insn;
 
-	  if (safe_read_memory_integer (get_frame_pc (this_frame) - 2, 2,
-					byte_order_for_code, &insn)
+	  if (safe_read_memory_unsigned_integer (get_frame_pc (this_frame) - 2,
+						 2, byte_order_for_code, &insn)
 	      && (insn & 0xff00) == 0xdf00 /* svc */)
 	    exc_valid = 1;
 	}
       else
 	{
-	  LONGEST insn;
+	  ULONGEST insn;
 
-	  if (safe_read_memory_integer (get_frame_pc (this_frame) - 4, 4,
-					byte_order_for_code, &insn)
+	  if (safe_read_memory_unsigned_integer (get_frame_pc (this_frame) - 4,
+						 4, byte_order_for_code, &insn)
 	      && (insn & 0x0f000000) == 0x0f000000 /* svc */)
 	    exc_valid = 1;
 	}
@@ -2877,6 +2719,108 @@ struct frame_unwind arm_exidx_unwind = {
   arm_exidx_unwind_sniffer
 };
 
+static struct arm_prologue_cache *
+arm_make_epilogue_frame_cache (struct frame_info *this_frame)
+{
+  struct arm_prologue_cache *cache;
+  int reg;
+
+  cache = FRAME_OBSTACK_ZALLOC (struct arm_prologue_cache);
+  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  /* Still rely on the offset calculated from prologue.  */
+  arm_scan_prologue (this_frame, cache);
+
+  /* Since we are in epilogue, the SP has been restored.  */
+  cache->prev_sp = get_frame_register_unsigned (this_frame, ARM_SP_REGNUM);
+
+  /* Calculate actual addresses of saved registers using offsets
+     determined by arm_scan_prologue.  */
+  for (reg = 0; reg < gdbarch_num_regs (get_frame_arch (this_frame)); reg++)
+    if (trad_frame_addr_p (cache->saved_regs, reg))
+      cache->saved_regs[reg].addr += cache->prev_sp;
+
+  return cache;
+}
+
+/* Implementation of function hook 'this_id' in
+   'struct frame_uwnind' for epilogue unwinder.  */
+
+static void
+arm_epilogue_frame_this_id (struct frame_info *this_frame,
+			    void **this_cache,
+			    struct frame_id *this_id)
+{
+  struct arm_prologue_cache *cache;
+  CORE_ADDR pc, func;
+
+  if (*this_cache == NULL)
+    *this_cache = arm_make_epilogue_frame_cache (this_frame);
+  cache = (struct arm_prologue_cache *) *this_cache;
+
+  /* Use function start address as part of the frame ID.  If we cannot
+     identify the start address (due to missing symbol information),
+     fall back to just using the current PC.  */
+  pc = get_frame_pc (this_frame);
+  func = get_frame_func (this_frame);
+  if (func == 0)
+    func = pc;
+
+  (*this_id) = frame_id_build (cache->prev_sp, pc);
+}
+
+/* Implementation of function hook 'prev_register' in
+   'struct frame_uwnind' for epilogue unwinder.  */
+
+static struct value *
+arm_epilogue_frame_prev_register (struct frame_info *this_frame,
+				  void **this_cache, int regnum)
+{
+  if (*this_cache == NULL)
+    *this_cache = arm_make_epilogue_frame_cache (this_frame);
+
+  return arm_prologue_prev_register (this_frame, this_cache, regnum);
+}
+
+static int arm_stack_frame_destroyed_p_1 (struct gdbarch *gdbarch,
+					  CORE_ADDR pc);
+static int thumb_stack_frame_destroyed_p (struct gdbarch *gdbarch,
+					  CORE_ADDR pc);
+
+/* Implementation of function hook 'sniffer' in
+   'struct frame_uwnind' for epilogue unwinder.  */
+
+static int
+arm_epilogue_frame_sniffer (const struct frame_unwind *self,
+			    struct frame_info *this_frame,
+			    void **this_prologue_cache)
+{
+  if (frame_relative_level (this_frame) == 0)
+    {
+      struct gdbarch *gdbarch = get_frame_arch (this_frame);
+      CORE_ADDR pc = get_frame_pc (this_frame);
+
+      if (arm_frame_is_thumb (this_frame))
+	return thumb_stack_frame_destroyed_p (gdbarch, pc);
+      else
+	return arm_stack_frame_destroyed_p_1 (gdbarch, pc);
+    }
+  else
+    return 0;
+}
+
+/* Frame unwinder from epilogue.  */
+
+static const struct frame_unwind arm_epilogue_frame_unwind =
+{
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  arm_epilogue_frame_this_id,
+  arm_epilogue_frame_prev_register,
+  NULL,
+  arm_epilogue_frame_sniffer,
+};
+
 /* Recognize GCC's trampoline for thumb call-indirect.  If we are in a
    trampoline, return the target PC.  Otherwise return 0.
 
@@ -2959,7 +2903,7 @@ arm_stub_this_id (struct frame_info *thi
 
   if (*this_cache == NULL)
     *this_cache = arm_make_stub_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   *this_id = frame_id_build (cache->prev_sp, get_frame_pc (this_frame));
 }
@@ -3053,7 +2997,7 @@ arm_m_exception_this_id (struct frame_in
 
   if (*this_cache == NULL)
     *this_cache = arm_m_exception_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* Our frame ID for a stub frame is the current SP and LR.  */
   *this_id = frame_id_build (cache->prev_sp,
@@ -3068,12 +3012,11 @@ arm_m_exception_prev_register (struct fr
 			       void **this_cache,
 			       int prev_regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct arm_prologue_cache *cache;
 
   if (*this_cache == NULL)
     *this_cache = arm_m_exception_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* The value was already reconstructed into PREV_SP.  */
   if (prev_regnum == ARM_SP_REGNUM)
@@ -3097,14 +3040,8 @@ arm_m_exception_unwind_sniffer (const st
   /* No need to check is_m; this sniffer is only registered for
      M-profile architectures.  */
 
-  /* Exception frames return to one of these magic PCs.  Other values
-     are not defined as of v7-M.  See details in "B1.5.8 Exception
-     return behavior" in "ARMv7-M Architecture Reference Manual".  */
-  if (this_pc == 0xfffffff1 || this_pc == 0xfffffff9
-      || this_pc == 0xfffffffd)
-    return 1;
-
-  return 0;
+  /* Check if exception frame returns to a magic PC value.  */
+  return arm_m_addr_is_magic (this_pc);
 }
 
 /* Frame unwinder for M-profile exceptions.  */
@@ -3126,7 +3063,7 @@ arm_normal_frame_base (struct frame_info
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   return cache->prev_sp - cache->framesize;
 }
@@ -3333,19 +3270,14 @@ thumb_stack_frame_destroyed_p (struct gd
   return found_stack_adjust;
 }
 
-/* Implement the stack_frame_destroyed_p gdbarch method.  */
-
 static int
-arm_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+arm_stack_frame_destroyed_p_1 (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   unsigned int insn;
   int found_return;
   CORE_ADDR func_start, func_end;
 
-  if (arm_pc_is_thumb (gdbarch, pc))
-    return thumb_stack_frame_destroyed_p (gdbarch, pc);
-
   if (!find_pc_partial_function (pc, NULL, &func_start, &func_end))
     return 0;
 
@@ -3387,6 +3319,16 @@ arm_stack_frame_destroyed_p (struct gdba
   return 0;
 }
 
+/* Implement the stack_frame_destroyed_p gdbarch method.  */
+
+static int
+arm_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  if (arm_pc_is_thumb (gdbarch, pc))
+    return thumb_stack_frame_destroyed_p (gdbarch, pc);
+  else
+    return arm_stack_frame_destroyed_p_1 (gdbarch, pc);
+}
 
 /* When arguments must be pushed onto the stack, they go on in reverse
    order.  The code below implements a FILO (stack) to do this.  */
@@ -3395,15 +3337,15 @@ struct stack_item
 {
   int len;
   struct stack_item *prev;
-  void *data;
+  gdb_byte *data;
 };
 
 static struct stack_item *
-push_stack_item (struct stack_item *prev, const void *contents, int len)
+push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len)
 {
   struct stack_item *si;
-  si = xmalloc (sizeof (struct stack_item));
-  si->data = xmalloc (len);
+  si = XNEW (struct stack_item);
+  si->data = (gdb_byte *) xmalloc (len);
   si->len = len;
   si->prev = prev;
   memcpy (si->data, contents, len);
@@ -3450,8 +3392,18 @@ arm_type_align (struct type *t)
       return TYPE_LENGTH (t);
 
     case TYPE_CODE_ARRAY:
+      if (TYPE_VECTOR (t))
+	{
+	  /* Use the natural alignment for vector types (the same for
+	     scalar type), but the maximum alignment is 64-bit.  */
+	  if (TYPE_LENGTH (t) > 8)
+	    return 8;
+	  else
+	    return TYPE_LENGTH (t);
+	}
+      else
+	return arm_type_align (TYPE_TARGET_TYPE (t));
     case TYPE_CODE_COMPLEX:
-      /* TODO: What about vector types?  */
       return arm_type_align (TYPE_TARGET_TYPE (t));
 
     case TYPE_CODE_STRUCT:
@@ -3598,21 +3550,44 @@ arm_vfp_cprc_sub_candidate (struct type 
 
     case TYPE_CODE_ARRAY:
       {
-	int count;
-	unsigned unitlen;
-	count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type);
-	if (count == -1)
-	  return -1;
-	if (TYPE_LENGTH (t) == 0)
+	if (TYPE_VECTOR (t))
 	  {
-	    gdb_assert (count == 0);
-	    return 0;
+	    /* A 64-bit or 128-bit containerized vector type are VFP
+	       CPRCs.  */
+	    switch (TYPE_LENGTH (t))
+	      {
+	      case 8:
+		if (*base_type == VFP_CPRC_UNKNOWN)
+		  *base_type = VFP_CPRC_VEC64;
+		return 1;
+	      case 16:
+		if (*base_type == VFP_CPRC_UNKNOWN)
+		  *base_type = VFP_CPRC_VEC128;
+		return 1;
+	      default:
+		return -1;
+	      }
+	  }
+	else
+	  {
+	    int count;
+	    unsigned unitlen;
+
+	    count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t),
+						base_type);
+	    if (count == -1)
+	      return -1;
+	    if (TYPE_LENGTH (t) == 0)
+	      {
+		gdb_assert (count == 0);
+		return 0;
+	      }
+	    else if (count == 0)
+	      return -1;
+	    unitlen = arm_vfp_cprc_unit_length (*base_type);
+	    gdb_assert ((TYPE_LENGTH (t) % unitlen) == 0);
+	    return TYPE_LENGTH (t) / unitlen;
 	  }
-	else if (count == 0)
-	  return -1;
-	unitlen = arm_vfp_cprc_unit_length (*base_type);
-	gdb_assert ((TYPE_LENGTH (t) % unitlen) == 0);
-	return TYPE_LENGTH (t) / unitlen;
       }
       break;
 
@@ -3623,8 +3598,11 @@ arm_vfp_cprc_sub_candidate (struct type 
 	int i;
 	for (i = 0; i < TYPE_NFIELDS (t); i++)
 	  {
-	    int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
-							base_type);
+	    int sub_count = 0;
+
+	    if (!field_is_static (&TYPE_FIELD (t, i)))
+	      sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
+						      base_type);
 	    if (sub_count == -1)
 	      return -1;
 	    count += sub_count;
@@ -3883,7 +3861,7 @@ arm_push_dummy_call (struct gdbarch *gdb
 	  CORE_ADDR regval = extract_unsigned_integer (val, len, byte_order);
 	  if (arm_pc_is_thumb (gdbarch, regval))
 	    {
-	      bfd_byte *copy = alloca (len);
+	      bfd_byte *copy = (bfd_byte *) alloca (len);
 	      store_unsigned_integer (copy, len, byte_order,
 				      MAKE_THUMB_ADDR (regval));
 	      val = copy;
@@ -3896,13 +3874,13 @@ arm_push_dummy_call (struct gdbarch *gdb
       while (len > 0)
 	{
 	  int partial_len = len < INT_REGISTER_SIZE ? len : INT_REGISTER_SIZE;
+	  CORE_ADDR regval
+	    = extract_unsigned_integer (val, partial_len, byte_order);
 
 	  if (may_use_core_reg && argreg <= ARM_LAST_ARG_REGNUM)
 	    {
 	      /* The argument is being passed in a general purpose
 		 register.  */
-	      CORE_ADDR regval
-		= extract_unsigned_integer (val, partial_len, byte_order);
 	      if (byte_order == BFD_ENDIAN_BIG)
 		regval <<= (INT_REGISTER_SIZE - partial_len) * 8;
 	      if (arm_debug)
@@ -3916,11 +3894,16 @@ arm_push_dummy_call (struct gdbarch *gdb
 	    }
 	  else
 	    {
-	      /* Push the arguments onto the stack.  */
+	      gdb_byte buf[INT_REGISTER_SIZE];
+
+	      memset (buf, 0, sizeof (buf));
+	      store_unsigned_integer (buf, partial_len, byte_order, regval);
+
+	      /* Push the arguments onto the stack.  */
 	      if (arm_debug)
 		fprintf_unfiltered (gdb_stdlog, "arg %d @ sp + %d\n",
 				    argnum, nstack);
-	      si = push_stack_item (si, val, INT_REGISTER_SIZE);
+	      si = push_stack_item (si, buf, INT_REGISTER_SIZE);
 	      nstack += INT_REGISTER_SIZE;
 	    }
 	      
@@ -4100,1218 +4083,160 @@ arm_register_type (struct gdbarch *gdbar
      in this function so that we can override the types of
      double-precision registers for NEON.  */
   if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
-    {
-      struct type *t = tdesc_register_type (gdbarch, regnum);
-
-      if (regnum >= ARM_D0_REGNUM && regnum < ARM_D0_REGNUM + 32
-	  && TYPE_CODE (t) == TYPE_CODE_FLT
-	  && gdbarch_tdep (gdbarch)->have_neon)
-	return arm_neon_double_type (gdbarch);
-      else
-	return t;
-    }
-
-  if (regnum >= ARM_F0_REGNUM && regnum < ARM_F0_REGNUM + NUM_FREGS)
-    {
-      if (!gdbarch_tdep (gdbarch)->have_fpa_registers)
-	return builtin_type (gdbarch)->builtin_void;
-
-      return arm_ext_type (gdbarch);
-    }
-  else if (regnum == ARM_SP_REGNUM)
-    return builtin_type (gdbarch)->builtin_data_ptr;
-  else if (regnum == ARM_PC_REGNUM)
-    return builtin_type (gdbarch)->builtin_func_ptr;
-  else if (regnum >= ARRAY_SIZE (arm_register_names))
-    /* These registers are only supported on targets which supply
-       an XML description.  */
-    return builtin_type (gdbarch)->builtin_int0;
-  else
-    return builtin_type (gdbarch)->builtin_uint32;
-}
-
-/* Map a DWARF register REGNUM onto the appropriate GDB register
-   number.  */
-
-static int
-arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
-{
-  /* Core integer regs.  */
-  if (reg >= 0 && reg <= 15)
-    return reg;
-
-  /* Legacy FPA encoding.  These were once used in a way which
-     overlapped with VFP register numbering, so their use is
-     discouraged, but GDB doesn't support the ARM toolchain
-     which used them for VFP.  */
-  if (reg >= 16 && reg <= 23)
-    return ARM_F0_REGNUM + reg - 16;
-
-  /* New assignments for the FPA registers.  */
-  if (reg >= 96 && reg <= 103)
-    return ARM_F0_REGNUM + reg - 96;
-
-  /* WMMX register assignments.  */
-  if (reg >= 104 && reg <= 111)
-    return ARM_WCGR0_REGNUM + reg - 104;
-
-  if (reg >= 112 && reg <= 127)
-    return ARM_WR0_REGNUM + reg - 112;
-
-  if (reg >= 192 && reg <= 199)
-    return ARM_WC0_REGNUM + reg - 192;
-
-  /* VFP v2 registers.  A double precision value is actually
-     in d1 rather than s2, but the ABI only defines numbering
-     for the single precision registers.  This will "just work"
-     in GDB for little endian targets (we'll read eight bytes,
-     starting in s0 and then progressing to s1), but will be
-     reversed on big endian targets with VFP.  This won't
-     be a problem for the new Neon quad registers; you're supposed
-     to use DW_OP_piece for those.  */
-  if (reg >= 64 && reg <= 95)
-    {
-      char name_buf[4];
-
-      xsnprintf (name_buf, sizeof (name_buf), "s%d", reg - 64);
-      return user_reg_map_name_to_regnum (gdbarch, name_buf,
-					  strlen (name_buf));
-    }
-
-  /* VFP v3 / Neon registers.  This range is also used for VFP v2
-     registers, except that it now describes d0 instead of s0.  */
-  if (reg >= 256 && reg <= 287)
-    {
-      char name_buf[4];
-
-      xsnprintf (name_buf, sizeof (name_buf), "d%d", reg - 256);
-      return user_reg_map_name_to_regnum (gdbarch, name_buf,
-					  strlen (name_buf));
-    }
-
-  return -1;
-}
-
-/* Map GDB internal REGNUM onto the Arm simulator register numbers.  */
-static int
-arm_register_sim_regno (struct gdbarch *gdbarch, int regnum)
-{
-  int reg = regnum;
-  gdb_assert (reg >= 0 && reg < gdbarch_num_regs (gdbarch));
-
-  if (regnum >= ARM_WR0_REGNUM && regnum <= ARM_WR15_REGNUM)
-    return regnum - ARM_WR0_REGNUM + SIM_ARM_IWMMXT_COP0R0_REGNUM;
-
-  if (regnum >= ARM_WC0_REGNUM && regnum <= ARM_WC7_REGNUM)
-    return regnum - ARM_WC0_REGNUM + SIM_ARM_IWMMXT_COP1R0_REGNUM;
-
-  if (regnum >= ARM_WCGR0_REGNUM && regnum <= ARM_WCGR7_REGNUM)
-    return regnum - ARM_WCGR0_REGNUM + SIM_ARM_IWMMXT_COP1R8_REGNUM;
-
-  if (reg < NUM_GREGS)
-    return SIM_ARM_R0_REGNUM + reg;
-  reg -= NUM_GREGS;
-
-  if (reg < NUM_FREGS)
-    return SIM_ARM_FP0_REGNUM + reg;
-  reg -= NUM_FREGS;
-
-  if (reg < NUM_SREGS)
-    return SIM_ARM_FPS_REGNUM + reg;
-  reg -= NUM_SREGS;
-
-  internal_error (__FILE__, __LINE__, _("Bad REGNUM %d"), regnum);
-}
-
-/* NOTE: cagney/2001-08-20: Both convert_from_extended() and
-   convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
-   It is thought that this is is the floating-point register format on
-   little-endian systems.  */
-
-static void
-convert_from_extended (const struct floatformat *fmt, const void *ptr,
-		       void *dbl, int endianess)
-{
-  DOUBLEST d;
-
-  if (endianess == BFD_ENDIAN_BIG)
-    floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d);
-  else
-    floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword,
-			     ptr, &d);
-  floatformat_from_doublest (fmt, &d, dbl);
-}
-
-static void
-convert_to_extended (const struct floatformat *fmt, void *dbl, const void *ptr,
-		     int endianess)
-{
-  DOUBLEST d;
-
-  floatformat_to_doublest (fmt, ptr, &d);
-  if (endianess == BFD_ENDIAN_BIG)
-    floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl);
-  else
-    floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword,
-			       &d, dbl);
-}
-
-static int
-condition_true (unsigned long cond, unsigned long status_reg)
-{
-  if (cond == INST_AL || cond == INST_NV)
-    return 1;
-
-  switch (cond)
-    {
-    case INST_EQ:
-      return ((status_reg & FLAG_Z) != 0);
-    case INST_NE:
-      return ((status_reg & FLAG_Z) == 0);
-    case INST_CS:
-      return ((status_reg & FLAG_C) != 0);
-    case INST_CC:
-      return ((status_reg & FLAG_C) == 0);
-    case INST_MI:
-      return ((status_reg & FLAG_N) != 0);
-    case INST_PL:
-      return ((status_reg & FLAG_N) == 0);
-    case INST_VS:
-      return ((status_reg & FLAG_V) != 0);
-    case INST_VC:
-      return ((status_reg & FLAG_V) == 0);
-    case INST_HI:
-      return ((status_reg & (FLAG_C | FLAG_Z)) == FLAG_C);
-    case INST_LS:
-      return ((status_reg & (FLAG_C | FLAG_Z)) != FLAG_C);
-    case INST_GE:
-      return (((status_reg & FLAG_N) == 0) == ((status_reg & FLAG_V) == 0));
-    case INST_LT:
-      return (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0));
-    case INST_GT:
-      return (((status_reg & FLAG_Z) == 0)
-	      && (((status_reg & FLAG_N) == 0)
-		  == ((status_reg & FLAG_V) == 0)));
-    case INST_LE:
-      return (((status_reg & FLAG_Z) != 0)
-	      || (((status_reg & FLAG_N) == 0)
-		  != ((status_reg & FLAG_V) == 0)));
-    }
-  return 1;
-}
-
-static unsigned long
-shifted_reg_val (struct frame_info *frame, unsigned long inst, int carry,
-		 unsigned long pc_val, unsigned long status_reg)
-{
-  unsigned long res, shift;
-  int rm = bits (inst, 0, 3);
-  unsigned long shifttype = bits (inst, 5, 6);
-
-  if (bit (inst, 4))
-    {
-      int rs = bits (inst, 8, 11);
-      shift = (rs == 15 ? pc_val + 8
-			: get_frame_register_unsigned (frame, rs)) & 0xFF;
-    }
-  else
-    shift = bits (inst, 7, 11);
-
-  res = (rm == ARM_PC_REGNUM
-	 ? (pc_val + (bit (inst, 4) ? 12 : 8))
-	 : get_frame_register_unsigned (frame, rm));
-
-  switch (shifttype)
-    {
-    case 0:			/* LSL */
-      res = shift >= 32 ? 0 : res << shift;
-      break;
-
-    case 1:			/* LSR */
-      res = shift >= 32 ? 0 : res >> shift;
-      break;
-
-    case 2:			/* ASR */
-      if (shift >= 32)
-	shift = 31;
-      res = ((res & 0x80000000L)
-	     ? ~((~res) >> shift) : res >> shift);
-      break;
-
-    case 3:			/* ROR/RRX */
-      shift &= 31;
-      if (shift == 0)
-	res = (res >> 1) | (carry ? 0x80000000L : 0);
-      else
-	res = (res >> shift) | (res << (32 - shift));
-      break;
-    }
-
-  return res & 0xffffffff;
-}
-
-/* Return number of 1-bits in VAL.  */
-
-static int
-bitcount (unsigned long val)
-{
-  int nbits;
-  for (nbits = 0; val != 0; nbits++)
-    val &= val - 1;		/* Delete rightmost 1-bit in val.  */
-  return nbits;
-}
-
-/* Return the size in bytes of the complete Thumb instruction whose
-   first halfword is INST1.  */
-
-static int
-thumb_insn_size (unsigned short inst1)
-{
-  if ((inst1 & 0xe000) == 0xe000 && (inst1 & 0x1800) != 0)
-    return 4;
-  else
-    return 2;
-}
-
-static int
-thumb_advance_itstate (unsigned int itstate)
-{
-  /* Preserve IT[7:5], the first three bits of the condition.  Shift
-     the upcoming condition flags left by one bit.  */
-  itstate = (itstate & 0xe0) | ((itstate << 1) & 0x1f);
-
-  /* If we have finished the IT block, clear the state.  */
-  if ((itstate & 0x0f) == 0)
-    itstate = 0;
-
-  return itstate;
-}
-
-/* Find the next PC after the current instruction executes.  In some
-   cases we can not statically determine the answer (see the IT state
-   handling in this function); in that case, a breakpoint may be
-   inserted in addition to the returned PC, which will be used to set
-   another breakpoint by our caller.  */
-
-static CORE_ADDR
-thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
-{
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  unsigned long pc_val = ((unsigned long) pc) + 4;	/* PC after prefetch */
-  unsigned short inst1;
-  CORE_ADDR nextpc = pc + 2;		/* Default is next instruction.  */
-  unsigned long offset;
-  ULONGEST status, itstate;
-
-  nextpc = MAKE_THUMB_ADDR (nextpc);
-  pc_val = MAKE_THUMB_ADDR (pc_val);
-
-  inst1 = read_memory_unsigned_integer (pc, 2, byte_order_for_code);
-
-  /* Thumb-2 conditional execution support.  There are eight bits in
-     the CPSR which describe conditional execution state.  Once
-     reconstructed (they're in a funny order), the low five bits
-     describe the low bit of the condition for each instruction and
-     how many instructions remain.  The high three bits describe the
-     base condition.  One of the low four bits will be set if an IT
-     block is active.  These bits read as zero on earlier
-     processors.  */
-  status = get_frame_register_unsigned (frame, ARM_PS_REGNUM);
-  itstate = ((status >> 8) & 0xfc) | ((status >> 25) & 0x3);
-
-  /* If-Then handling.  On GNU/Linux, where this routine is used, we
-     use an undefined instruction as a breakpoint.  Unlike BKPT, IT
-     can disable execution of the undefined instruction.  So we might
-     miss the breakpoint if we set it on a skipped conditional
-     instruction.  Because conditional instructions can change the
-     flags, affecting the execution of further instructions, we may
-     need to set two breakpoints.  */
-
-  if (gdbarch_tdep (gdbarch)->thumb2_breakpoint != NULL)
-    {
-      if ((inst1 & 0xff00) == 0xbf00 && (inst1 & 0x000f) != 0)
-	{
-	  /* An IT instruction.  Because this instruction does not
-	     modify the flags, we can accurately predict the next
-	     executed instruction.  */
-	  itstate = inst1 & 0x00ff;
-	  pc += thumb_insn_size (inst1);
-
-	  while (itstate != 0 && ! condition_true (itstate >> 4, status))
-	    {
-	      inst1 = read_memory_unsigned_integer (pc, 2,
-						    byte_order_for_code);
-	      pc += thumb_insn_size (inst1);
-	      itstate = thumb_advance_itstate (itstate);
-	    }
-
-	  return MAKE_THUMB_ADDR (pc);
-	}
-      else if (itstate != 0)
-	{
-	  /* We are in a conditional block.  Check the condition.  */
-	  if (! condition_true (itstate >> 4, status))
-	    {
-	      /* Advance to the next executed instruction.  */
-	      pc += thumb_insn_size (inst1);
-	      itstate = thumb_advance_itstate (itstate);
-
-	      while (itstate != 0 && ! condition_true (itstate >> 4, status))
-		{
-		  inst1 = read_memory_unsigned_integer (pc, 2, 
-							byte_order_for_code);
-		  pc += thumb_insn_size (inst1);
-		  itstate = thumb_advance_itstate (itstate);
-		}
-
-	      return MAKE_THUMB_ADDR (pc);
-	    }
-	  else if ((itstate & 0x0f) == 0x08)
-	    {
-	      /* This is the last instruction of the conditional
-		 block, and it is executed.  We can handle it normally
-		 because the following instruction is not conditional,
-		 and we must handle it normally because it is
-		 permitted to branch.  Fall through.  */
-	    }
-	  else
-	    {
-	      int cond_negated;
-
-	      /* There are conditional instructions after this one.
-		 If this instruction modifies the flags, then we can
-		 not predict what the next executed instruction will
-		 be.  Fortunately, this instruction is architecturally
-		 forbidden to branch; we know it will fall through.
-		 Start by skipping past it.  */
-	      pc += thumb_insn_size (inst1);
-	      itstate = thumb_advance_itstate (itstate);
-
-	      /* Set a breakpoint on the following instruction.  */
-	      gdb_assert ((itstate & 0x0f) != 0);
-	      arm_insert_single_step_breakpoint (gdbarch, aspace,
-						 MAKE_THUMB_ADDR (pc));
-	      cond_negated = (itstate >> 4) & 1;
-
-	      /* Skip all following instructions with the same
-		 condition.  If there is a later instruction in the IT
-		 block with the opposite condition, set the other
-		 breakpoint there.  If not, then set a breakpoint on
-		 the instruction after the IT block.  */
-	      do
-		{
-		  inst1 = read_memory_unsigned_integer (pc, 2,
-							byte_order_for_code);
-		  pc += thumb_insn_size (inst1);
-		  itstate = thumb_advance_itstate (itstate);
-		}
-	      while (itstate != 0 && ((itstate >> 4) & 1) == cond_negated);
-
-	      return MAKE_THUMB_ADDR (pc);
-	    }
-	}
-    }
-  else if (itstate & 0x0f)
-    {
-      /* We are in a conditional block.  Check the condition.  */
-      int cond = itstate >> 4;
-
-      if (! condition_true (cond, status))
-	/* Advance to the next instruction.  All the 32-bit
-	   instructions share a common prefix.  */
-	return MAKE_THUMB_ADDR (pc + thumb_insn_size (inst1));
-
-      /* Otherwise, handle the instruction normally.  */
-    }
-
-  if ((inst1 & 0xff00) == 0xbd00)	/* pop {rlist, pc} */
-    {
-      CORE_ADDR sp;
-
-      /* Fetch the saved PC from the stack.  It's stored above
-         all of the other registers.  */
-      offset = bitcount (bits (inst1, 0, 7)) * INT_REGISTER_SIZE;
-      sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM);
-      nextpc = read_memory_unsigned_integer (sp + offset, 4, byte_order);
-    }
-  else if ((inst1 & 0xf000) == 0xd000)	/* conditional branch */
-    {
-      unsigned long cond = bits (inst1, 8, 11);
-      if (cond == 0x0f)  /* 0x0f = SWI */
-	{
-	  struct gdbarch_tdep *tdep;
-	  tdep = gdbarch_tdep (gdbarch);
-
-	  if (tdep->syscall_next_pc != NULL)
-	    nextpc = tdep->syscall_next_pc (frame);
-
-	}
-      else if (cond != 0x0f && condition_true (cond, status))
-	nextpc = pc_val + (sbits (inst1, 0, 7) << 1);
-    }
-  else if ((inst1 & 0xf800) == 0xe000)	/* unconditional branch */
-    {
-      nextpc = pc_val + (sbits (inst1, 0, 10) << 1);
-    }
-  else if (thumb_insn_size (inst1) == 4) /* 32-bit instruction */
-    {
-      unsigned short inst2;
-      inst2 = read_memory_unsigned_integer (pc + 2, 2, byte_order_for_code);
-
-      /* Default to the next instruction.  */
-      nextpc = pc + 4;
-      nextpc = MAKE_THUMB_ADDR (nextpc);
-
-      if ((inst1 & 0xf800) == 0xf000 && (inst2 & 0x8000) == 0x8000)
-	{
-	  /* Branches and miscellaneous control instructions.  */
-
-	  if ((inst2 & 0x1000) != 0 || (inst2 & 0xd001) == 0xc000)
-	    {
-	      /* B, BL, BLX.  */
-	      int j1, j2, imm1, imm2;
-
-	      imm1 = sbits (inst1, 0, 10);
-	      imm2 = bits (inst2, 0, 10);
-	      j1 = bit (inst2, 13);
-	      j2 = bit (inst2, 11);
-
-	      offset = ((imm1 << 12) + (imm2 << 1));
-	      offset ^= ((!j2) << 22) | ((!j1) << 23);
-
-	      nextpc = pc_val + offset;
-	      /* For BLX make sure to clear the low bits.  */
-	      if (bit (inst2, 12) == 0)
-		nextpc = nextpc & 0xfffffffc;
-	    }
-	  else if (inst1 == 0xf3de && (inst2 & 0xff00) == 0x3f00)
-	    {
-	      /* SUBS PC, LR, #imm8.  */
-	      nextpc = get_frame_register_unsigned (frame, ARM_LR_REGNUM);
-	      nextpc -= inst2 & 0x00ff;
-	    }
-	  else if ((inst2 & 0xd000) == 0x8000 && (inst1 & 0x0380) != 0x0380)
-	    {
-	      /* Conditional branch.  */
-	      if (condition_true (bits (inst1, 6, 9), status))
-		{
-		  int sign, j1, j2, imm1, imm2;
-
-		  sign = sbits (inst1, 10, 10);
-		  imm1 = bits (inst1, 0, 5);
-		  imm2 = bits (inst2, 0, 10);
-		  j1 = bit (inst2, 13);
-		  j2 = bit (inst2, 11);
-
-		  offset = (sign << 20) + (j2 << 19) + (j1 << 18);
-		  offset += (imm1 << 12) + (imm2 << 1);
-
-		  nextpc = pc_val + offset;
-		}
-	    }
-	}
-      else if ((inst1 & 0xfe50) == 0xe810)
-	{
-	  /* Load multiple or RFE.  */
-	  int rn, offset, load_pc = 1;
-
-	  rn = bits (inst1, 0, 3);
-	  if (bit (inst1, 7) && !bit (inst1, 8))
-	    {
-	      /* LDMIA or POP */
-	      if (!bit (inst2, 15))
-		load_pc = 0;
-	      offset = bitcount (inst2) * 4 - 4;
-	    }
-	  else if (!bit (inst1, 7) && bit (inst1, 8))
-	    {
-	      /* LDMDB */
-	      if (!bit (inst2, 15))
-		load_pc = 0;
-	      offset = -4;
-	    }
-	  else if (bit (inst1, 7) && bit (inst1, 8))
-	    {
-	      /* RFEIA */
-	      offset = 0;
-	    }
-	  else if (!bit (inst1, 7) && !bit (inst1, 8))
-	    {
-	      /* RFEDB */
-	      offset = -8;
-	    }
-	  else
-	    load_pc = 0;
-
-	  if (load_pc)
-	    {
-	      CORE_ADDR addr = get_frame_register_unsigned (frame, rn);
-	      nextpc = get_frame_memory_unsigned (frame, addr + offset, 4);
-	    }
-	}
-      else if ((inst1 & 0xffef) == 0xea4f && (inst2 & 0xfff0) == 0x0f00)
-	{
-	  /* MOV PC or MOVS PC.  */
-	  nextpc = get_frame_register_unsigned (frame, bits (inst2, 0, 3));
-	  nextpc = MAKE_THUMB_ADDR (nextpc);
-	}
-      else if ((inst1 & 0xff70) == 0xf850 && (inst2 & 0xf000) == 0xf000)
-	{
-	  /* LDR PC.  */
-	  CORE_ADDR base;
-	  int rn, load_pc = 1;
-
-	  rn = bits (inst1, 0, 3);
-	  base = get_frame_register_unsigned (frame, rn);
-	  if (rn == ARM_PC_REGNUM)
-	    {
-	      base = (base + 4) & ~(CORE_ADDR) 0x3;
-	      if (bit (inst1, 7))
-		base += bits (inst2, 0, 11);
-	      else
-		base -= bits (inst2, 0, 11);
-	    }
-	  else if (bit (inst1, 7))
-	    base += bits (inst2, 0, 11);
-	  else if (bit (inst2, 11))
-	    {
-	      if (bit (inst2, 10))
-		{
-		  if (bit (inst2, 9))
-		    base += bits (inst2, 0, 7);
-		  else
-		    base -= bits (inst2, 0, 7);
-		}
-	    }
-	  else if ((inst2 & 0x0fc0) == 0x0000)
-	    {
-	      int shift = bits (inst2, 4, 5), rm = bits (inst2, 0, 3);
-	      base += get_frame_register_unsigned (frame, rm) << shift;
-	    }
-	  else
-	    /* Reserved.  */
-	    load_pc = 0;
-
-	  if (load_pc)
-	    nextpc = get_frame_memory_unsigned (frame, base, 4);
-	}
-      else if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf000)
-	{
-	  /* TBB.  */
-	  CORE_ADDR tbl_reg, table, offset, length;
-
-	  tbl_reg = bits (inst1, 0, 3);
-	  if (tbl_reg == 0x0f)
-	    table = pc + 4;  /* Regcache copy of PC isn't right yet.  */
-	  else
-	    table = get_frame_register_unsigned (frame, tbl_reg);
-
-	  offset = get_frame_register_unsigned (frame, bits (inst2, 0, 3));
-	  length = 2 * get_frame_memory_unsigned (frame, table + offset, 1);
-	  nextpc = pc_val + length;
-	}
-      else if ((inst1 & 0xfff0) == 0xe8d0 && (inst2 & 0xfff0) == 0xf010)
-	{
-	  /* TBH.  */
-	  CORE_ADDR tbl_reg, table, offset, length;
-
-	  tbl_reg = bits (inst1, 0, 3);
-	  if (tbl_reg == 0x0f)
-	    table = pc + 4;  /* Regcache copy of PC isn't right yet.  */
-	  else
-	    table = get_frame_register_unsigned (frame, tbl_reg);
-
-	  offset = 2 * get_frame_register_unsigned (frame, bits (inst2, 0, 3));
-	  length = 2 * get_frame_memory_unsigned (frame, table + offset, 2);
-	  nextpc = pc_val + length;
-	}
-    }
-  else if ((inst1 & 0xff00) == 0x4700)	/* bx REG, blx REG */
-    {
-      if (bits (inst1, 3, 6) == 0x0f)
-	nextpc = UNMAKE_THUMB_ADDR (pc_val);
-      else
-	nextpc = get_frame_register_unsigned (frame, bits (inst1, 3, 6));
-    }
-  else if ((inst1 & 0xff87) == 0x4687)	/* mov pc, REG */
-    {
-      if (bits (inst1, 3, 6) == 0x0f)
-	nextpc = pc_val;
-      else
-	nextpc = get_frame_register_unsigned (frame, bits (inst1, 3, 6));
-
-      nextpc = MAKE_THUMB_ADDR (nextpc);
-    }
-  else if ((inst1 & 0xf500) == 0xb100)
-    {
-      /* CBNZ or CBZ.  */
-      int imm = (bit (inst1, 9) << 6) + (bits (inst1, 3, 7) << 1);
-      ULONGEST reg = get_frame_register_unsigned (frame, bits (inst1, 0, 2));
-
-      if (bit (inst1, 11) && reg != 0)
-	nextpc = pc_val + imm;
-      else if (!bit (inst1, 11) && reg == 0)
-	nextpc = pc_val + imm;
-    }
-  return nextpc;
-}
-
-/* Get the raw next address.  PC is the current program counter, in 
-   FRAME, which is assumed to be executing in ARM mode.
-
-   The value returned has the execution state of the next instruction 
-   encoded in it.  Use IS_THUMB_ADDR () to see whether the instruction is
-   in Thumb-State, and gdbarch_addr_bits_remove () to get the plain memory
-   address.  */
-
-static CORE_ADDR
-arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
-{
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  unsigned long pc_val;
-  unsigned long this_instr;
-  unsigned long status;
-  CORE_ADDR nextpc;
-
-  pc_val = (unsigned long) pc;
-  this_instr = read_memory_unsigned_integer (pc, 4, byte_order_for_code);
-
-  status = get_frame_register_unsigned (frame, ARM_PS_REGNUM);
-  nextpc = (CORE_ADDR) (pc_val + 4);	/* Default case */
-
-  if (bits (this_instr, 28, 31) == INST_NV)
-    switch (bits (this_instr, 24, 27))
-      {
-      case 0xa:
-      case 0xb:
-	{
-	  /* Branch with Link and change to Thumb.  */
-	  nextpc = BranchDest (pc, this_instr);
-	  nextpc |= bit (this_instr, 24) << 1;
-	  nextpc = MAKE_THUMB_ADDR (nextpc);
-	  break;
-	}
-      case 0xc:
-      case 0xd:
-      case 0xe:
-	/* Coprocessor register transfer.  */
-        if (bits (this_instr, 12, 15) == 15)
-	  error (_("Invalid update to pc in instruction"));
-	break;
-      }
-  else if (condition_true (bits (this_instr, 28, 31), status))
-    {
-      switch (bits (this_instr, 24, 27))
-	{
-	case 0x0:
-	case 0x1:			/* data processing */
-	case 0x2:
-	case 0x3:
-	  {
-	    unsigned long operand1, operand2, result = 0;
-	    unsigned long rn;
-	    int c;
-
-	    if (bits (this_instr, 12, 15) != 15)
-	      break;
-
-	    if (bits (this_instr, 22, 25) == 0
-		&& bits (this_instr, 4, 7) == 9)	/* multiply */
-	      error (_("Invalid update to pc in instruction"));
-
-	    /* BX <reg>, BLX <reg> */
-	    if (bits (this_instr, 4, 27) == 0x12fff1
-		|| bits (this_instr, 4, 27) == 0x12fff3)
-	      {
-		rn = bits (this_instr, 0, 3);
-		nextpc = ((rn == ARM_PC_REGNUM)
-			  ? (pc_val + 8)
-			  : get_frame_register_unsigned (frame, rn));
-
-		return nextpc;
-	      }
-
-	    /* Multiply into PC.  */
-	    c = (status & FLAG_C) ? 1 : 0;
-	    rn = bits (this_instr, 16, 19);
-	    operand1 = ((rn == ARM_PC_REGNUM)
-			? (pc_val + 8)
-			: get_frame_register_unsigned (frame, rn));
-
-	    if (bit (this_instr, 25))
-	      {
-		unsigned long immval = bits (this_instr, 0, 7);
-		unsigned long rotate = 2 * bits (this_instr, 8, 11);
-		operand2 = ((immval >> rotate) | (immval << (32 - rotate)))
-		  & 0xffffffff;
-	      }
-	    else		/* operand 2 is a shifted register.  */
-	      operand2 = shifted_reg_val (frame, this_instr, c,
-					  pc_val, status);
-
-	    switch (bits (this_instr, 21, 24))
-	      {
-	      case 0x0:	/*and */
-		result = operand1 & operand2;
-		break;
-
-	      case 0x1:	/*eor */
-		result = operand1 ^ operand2;
-		break;
-
-	      case 0x2:	/*sub */
-		result = operand1 - operand2;
-		break;
-
-	      case 0x3:	/*rsb */
-		result = operand2 - operand1;
-		break;
-
-	      case 0x4:	/*add */
-		result = operand1 + operand2;
-		break;
-
-	      case 0x5:	/*adc */
-		result = operand1 + operand2 + c;
-		break;
-
-	      case 0x6:	/*sbc */
-		result = operand1 - operand2 + c;
-		break;
-
-	      case 0x7:	/*rsc */
-		result = operand2 - operand1 + c;
-		break;
-
-	      case 0x8:
-	      case 0x9:
-	      case 0xa:
-	      case 0xb:	/* tst, teq, cmp, cmn */
-		result = (unsigned long) nextpc;
-		break;
-
-	      case 0xc:	/*orr */
-		result = operand1 | operand2;
-		break;
-
-	      case 0xd:	/*mov */
-		/* Always step into a function.  */
-		result = operand2;
-		break;
-
-	      case 0xe:	/*bic */
-		result = operand1 & ~operand2;
-		break;
-
-	      case 0xf:	/*mvn */
-		result = ~operand2;
-		break;
-	      }
-
-            /* In 26-bit APCS the bottom two bits of the result are 
-	       ignored, and we always end up in ARM state.  */
-	    if (!arm_apcs_32)
-	      nextpc = arm_addr_bits_remove (gdbarch, result);
-	    else
-	      nextpc = result;
-
-	    break;
-	  }
-
-	case 0x4:
-	case 0x5:		/* data transfer */
-	case 0x6:
-	case 0x7:
-	  if (bits (this_instr, 25, 27) == 0x3 && bit (this_instr, 4) == 1)
-	    {
-	      /* Media instructions and architecturally undefined
-		 instructions.  */
-	      break;
-	    }
-
-	  if (bit (this_instr, 20))
-	    {
-	      /* load */
-	      if (bits (this_instr, 12, 15) == 15)
-		{
-		  /* rd == pc */
-		  unsigned long rn;
-		  unsigned long base;
-
-		  if (bit (this_instr, 22))
-		    error (_("Invalid update to pc in instruction"));
-
-		  /* byte write to PC */
-		  rn = bits (this_instr, 16, 19);
-		  base = ((rn == ARM_PC_REGNUM)
-			  ? (pc_val + 8)
-			  : get_frame_register_unsigned (frame, rn));
-
-		  if (bit (this_instr, 24))
-		    {
-		      /* pre-indexed */
-		      int c = (status & FLAG_C) ? 1 : 0;
-		      unsigned long offset =
-		      (bit (this_instr, 25)
-		       ? shifted_reg_val (frame, this_instr, c, pc_val, status)
-		       : bits (this_instr, 0, 11));
-
-		      if (bit (this_instr, 23))
-			base += offset;
-		      else
-			base -= offset;
-		    }
-		  nextpc =
-		    (CORE_ADDR) read_memory_unsigned_integer ((CORE_ADDR) base,
-							      4, byte_order);
-		}
-	    }
-	  break;
-
-	case 0x8:
-	case 0x9:		/* block transfer */
-	  if (bit (this_instr, 20))
-	    {
-	      /* LDM */
-	      if (bit (this_instr, 15))
-		{
-		  /* loading pc */
-		  int offset = 0;
-		  unsigned long rn_val
-		    = get_frame_register_unsigned (frame,
-						   bits (this_instr, 16, 19));
-
-		  if (bit (this_instr, 23))
-		    {
-		      /* up */
-		      unsigned long reglist = bits (this_instr, 0, 14);
-		      offset = bitcount (reglist) * 4;
-		      if (bit (this_instr, 24))		/* pre */
-			offset += 4;
-		    }
-		  else if (bit (this_instr, 24))
-		    offset = -4;
-
-		  nextpc =
-		    (CORE_ADDR) read_memory_unsigned_integer ((CORE_ADDR)
-							      (rn_val + offset),
-							      4, byte_order);
-		}
-	    }
-	  break;
-
-	case 0xb:		/* branch & link */
-	case 0xa:		/* branch */
-	  {
-	    nextpc = BranchDest (pc, this_instr);
-	    break;
-	  }
-
-	case 0xc:
-	case 0xd:
-	case 0xe:		/* coproc ops */
-	  break;
-	case 0xf:		/* SWI */
-	  {
-	    struct gdbarch_tdep *tdep;
-	    tdep = gdbarch_tdep (gdbarch);
-
-	    if (tdep->syscall_next_pc != NULL)
-	      nextpc = tdep->syscall_next_pc (frame);
-
-	  }
-	  break;
-
-	default:
-	  fprintf_filtered (gdb_stderr, _("Bad bit-field extraction\n"));
-	  return (pc);
-	}
-    }
-
-  return nextpc;
-}
-
-/* Determine next PC after current instruction executes.  Will call either
-   arm_get_next_pc_raw or thumb_get_next_pc_raw.  Error out if infinite
-   loop is detected.  */
-
-CORE_ADDR
-arm_get_next_pc (struct frame_info *frame, CORE_ADDR pc)
-{
-  CORE_ADDR nextpc;
-
-  if (arm_frame_is_thumb (frame))
-    nextpc = thumb_get_next_pc_raw (frame, pc);
-  else
-    nextpc = arm_get_next_pc_raw (frame, pc);
-
-  return nextpc;
-}
-
-/* Like insert_single_step_breakpoint, but make sure we use a breakpoint
-   of the appropriate mode (as encoded in the PC value), even if this
-   differs from what would be expected according to the symbol tables.  */
-
-void
-arm_insert_single_step_breakpoint (struct gdbarch *gdbarch,
-				   struct address_space *aspace,
-				   CORE_ADDR pc)
-{
-  struct cleanup *old_chain
-    = make_cleanup_restore_integer (&arm_override_mode);
+    {
+      struct type *t = tdesc_register_type (gdbarch, regnum);
 
-  arm_override_mode = IS_THUMB_ADDR (pc);
-  pc = gdbarch_addr_bits_remove (gdbarch, pc);
+      if (regnum >= ARM_D0_REGNUM && regnum < ARM_D0_REGNUM + 32
+	  && TYPE_CODE (t) == TYPE_CODE_FLT
+	  && gdbarch_tdep (gdbarch)->have_neon)
+	return arm_neon_double_type (gdbarch);
+      else
+	return t;
+    }
 
-  insert_single_step_breakpoint (gdbarch, aspace, pc);
+  if (regnum >= ARM_F0_REGNUM && regnum < ARM_F0_REGNUM + NUM_FREGS)
+    {
+      if (!gdbarch_tdep (gdbarch)->have_fpa_registers)
+	return builtin_type (gdbarch)->builtin_void;
 
-  do_cleanups (old_chain);
+      return arm_ext_type (gdbarch);
+    }
+  else if (regnum == ARM_SP_REGNUM)
+    return builtin_type (gdbarch)->builtin_data_ptr;
+  else if (regnum == ARM_PC_REGNUM)
+    return builtin_type (gdbarch)->builtin_func_ptr;
+  else if (regnum >= ARRAY_SIZE (arm_register_names))
+    /* These registers are only supported on targets which supply
+       an XML description.  */
+    return builtin_type (gdbarch)->builtin_int0;
+  else
+    return builtin_type (gdbarch)->builtin_uint32;
 }
 
-/* Checks for an atomic sequence of instructions beginning with a LDREX{,B,H,D}
-   instruction and ending with a STREX{,B,H,D} instruction.  If such a sequence
-   is found, attempt to step through it.  A breakpoint is placed at the end of
-   the sequence.  */
+/* Map a DWARF register REGNUM onto the appropriate GDB register
+   number.  */
 
 static int
-thumb_deal_with_atomic_sequence_raw (struct frame_info *frame)
+arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  CORE_ADDR pc = get_frame_pc (frame);
-  CORE_ADDR breaks[2] = {-1, -1};
-  CORE_ADDR loc = pc;
-  unsigned short insn1, insn2;
-  int insn_count;
-  int index;
-  int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */
-  const int atomic_sequence_length = 16; /* Instruction sequence length.  */
-  ULONGEST status, itstate;
-
-  /* We currently do not support atomic sequences within an IT block.  */
-  status = get_frame_register_unsigned (frame, ARM_PS_REGNUM);
-  itstate = ((status >> 8) & 0xfc) | ((status >> 25) & 0x3);
-  if (itstate & 0x0f)
-    return 0;
-
-  /* Assume all atomic sequences start with a ldrex{,b,h,d} instruction.  */
-  insn1 = read_memory_unsigned_integer (loc, 2, byte_order_for_code);
-  loc += 2;
-  if (thumb_insn_size (insn1) != 4)
-    return 0;
+  /* Core integer regs.  */
+  if (reg >= 0 && reg <= 15)
+    return reg;
 
-  insn2 = read_memory_unsigned_integer (loc, 2, byte_order_for_code);
-  loc += 2;
-  if (!((insn1 & 0xfff0) == 0xe850
-        || ((insn1 & 0xfff0) == 0xe8d0 && (insn2 & 0x00c0) == 0x0040)))
-    return 0;
+  /* Legacy FPA encoding.  These were once used in a way which
+     overlapped with VFP register numbering, so their use is
+     discouraged, but GDB doesn't support the ARM toolchain
+     which used them for VFP.  */
+  if (reg >= 16 && reg <= 23)
+    return ARM_F0_REGNUM + reg - 16;
 
-  /* Assume that no atomic sequence is longer than "atomic_sequence_length"
-     instructions.  */
-  for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
-    {
-      insn1 = read_memory_unsigned_integer (loc, 2, byte_order_for_code);
-      loc += 2;
+  /* New assignments for the FPA registers.  */
+  if (reg >= 96 && reg <= 103)
+    return ARM_F0_REGNUM + reg - 96;
 
-      if (thumb_insn_size (insn1) != 4)
-	{
-	  /* Assume that there is at most one conditional branch in the
-	     atomic sequence.  If a conditional branch is found, put a
-	     breakpoint in its destination address.  */
-	  if ((insn1 & 0xf000) == 0xd000 && bits (insn1, 8, 11) != 0x0f)
-	    {
-	      if (last_breakpoint > 0)
-		return 0; /* More than one conditional branch found,
-			     fallback to the standard code.  */
+  /* WMMX register assignments.  */
+  if (reg >= 104 && reg <= 111)
+    return ARM_WCGR0_REGNUM + reg - 104;
 
-	      breaks[1] = loc + 2 + (sbits (insn1, 0, 7) << 1);
-	      last_breakpoint++;
-	    }
+  if (reg >= 112 && reg <= 127)
+    return ARM_WR0_REGNUM + reg - 112;
 
-	  /* We do not support atomic sequences that use any *other*
-	     instructions but conditional branches to change the PC.
-	     Fall back to standard code to avoid losing control of
-	     execution.  */
-	  else if (thumb_instruction_changes_pc (insn1))
-	    return 0;
-	}
-      else
-	{
-	  insn2 = read_memory_unsigned_integer (loc, 2, byte_order_for_code);
-	  loc += 2;
+  if (reg >= 192 && reg <= 199)
+    return ARM_WC0_REGNUM + reg - 192;
 
-	  /* Assume that there is at most one conditional branch in the
-	     atomic sequence.  If a conditional branch is found, put a
-	     breakpoint in its destination address.  */
-	  if ((insn1 & 0xf800) == 0xf000
-	      && (insn2 & 0xd000) == 0x8000
-	      && (insn1 & 0x0380) != 0x0380)
-	    {
-	      int sign, j1, j2, imm1, imm2;
-	      unsigned int offset;
-
-	      sign = sbits (insn1, 10, 10);
-	      imm1 = bits (insn1, 0, 5);
-	      imm2 = bits (insn2, 0, 10);
-	      j1 = bit (insn2, 13);
-	      j2 = bit (insn2, 11);
-
-	      offset = (sign << 20) + (j2 << 19) + (j1 << 18);
-	      offset += (imm1 << 12) + (imm2 << 1);
-
-	      if (last_breakpoint > 0)
-		return 0; /* More than one conditional branch found,
-			     fallback to the standard code.  */
-
-	      breaks[1] = loc + offset;
-	      last_breakpoint++;
-	    }
-
-	  /* We do not support atomic sequences that use any *other*
-	     instructions but conditional branches to change the PC.
-	     Fall back to standard code to avoid losing control of
-	     execution.  */
-	  else if (thumb2_instruction_changes_pc (insn1, insn2))
-	    return 0;
+  /* VFP v2 registers.  A double precision value is actually
+     in d1 rather than s2, but the ABI only defines numbering
+     for the single precision registers.  This will "just work"
+     in GDB for little endian targets (we'll read eight bytes,
+     starting in s0 and then progressing to s1), but will be
+     reversed on big endian targets with VFP.  This won't
+     be a problem for the new Neon quad registers; you're supposed
+     to use DW_OP_piece for those.  */
+  if (reg >= 64 && reg <= 95)
+    {
+      char name_buf[4];
 
-	  /* If we find a strex{,b,h,d}, we're done.  */
-	  if ((insn1 & 0xfff0) == 0xe840
-	      || ((insn1 & 0xfff0) == 0xe8c0 && (insn2 & 0x00c0) == 0x0040))
-	    break;
-	}
+      xsnprintf (name_buf, sizeof (name_buf), "s%d", reg - 64);
+      return user_reg_map_name_to_regnum (gdbarch, name_buf,
+					  strlen (name_buf));
     }
 
-  /* If we didn't find the strex{,b,h,d}, we cannot handle the sequence.  */
-  if (insn_count == atomic_sequence_length)
-    return 0;
-
-  /* Insert a breakpoint right after the end of the atomic sequence.  */
-  breaks[0] = loc;
+  /* VFP v3 / Neon registers.  This range is also used for VFP v2
+     registers, except that it now describes d0 instead of s0.  */
+  if (reg >= 256 && reg <= 287)
+    {
+      char name_buf[4];
 
-  /* Check for duplicated breakpoints.  Check also for a breakpoint
-     placed (branch instruction's destination) anywhere in sequence.  */
-  if (last_breakpoint
-      && (breaks[1] == breaks[0]
-	  || (breaks[1] >= pc && breaks[1] < loc)))
-    last_breakpoint = 0;
-
-  /* Effectively inserts the breakpoints.  */
-  for (index = 0; index <= last_breakpoint; index++)
-    arm_insert_single_step_breakpoint (gdbarch, aspace,
-				       MAKE_THUMB_ADDR (breaks[index]));
+      xsnprintf (name_buf, sizeof (name_buf), "d%d", reg - 256);
+      return user_reg_map_name_to_regnum (gdbarch, name_buf,
+					  strlen (name_buf));
+    }
 
-  return 1;
+  return -1;
 }
 
+/* Map GDB internal REGNUM onto the Arm simulator register numbers.  */
 static int
-arm_deal_with_atomic_sequence_raw (struct frame_info *frame)
+arm_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  CORE_ADDR pc = get_frame_pc (frame);
-  CORE_ADDR breaks[2] = {-1, -1};
-  CORE_ADDR loc = pc;
-  unsigned int insn;
-  int insn_count;
-  int index;
-  int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */
-  const int atomic_sequence_length = 16; /* Instruction sequence length.  */
-
-  /* Assume all atomic sequences start with a ldrex{,b,h,d} instruction.
-     Note that we do not currently support conditionally executed atomic
-     instructions.  */
-  insn = read_memory_unsigned_integer (loc, 4, byte_order_for_code);
-  loc += 4;
-  if ((insn & 0xff9000f0) != 0xe1900090)
-    return 0;
-
-  /* Assume that no atomic sequence is longer than "atomic_sequence_length"
-     instructions.  */
-  for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
-    {
-      insn = read_memory_unsigned_integer (loc, 4, byte_order_for_code);
-      loc += 4;
-
-      /* Assume that there is at most one conditional branch in the atomic
-         sequence.  If a conditional branch is found, put a breakpoint in
-         its destination address.  */
-      if (bits (insn, 24, 27) == 0xa)
-	{
-          if (last_breakpoint > 0)
-            return 0; /* More than one conditional branch found, fallback
-                         to the standard single-step code.  */
+  int reg = regnum;
+  gdb_assert (reg >= 0 && reg < gdbarch_num_regs (gdbarch));
 
-	  breaks[1] = BranchDest (loc - 4, insn);
-	  last_breakpoint++;
-        }
+  if (regnum >= ARM_WR0_REGNUM && regnum <= ARM_WR15_REGNUM)
+    return regnum - ARM_WR0_REGNUM + SIM_ARM_IWMMXT_COP0R0_REGNUM;
 
-      /* We do not support atomic sequences that use any *other* instructions
-         but conditional branches to change the PC.  Fall back to standard
-	 code to avoid losing control of execution.  */
-      else if (arm_instruction_changes_pc (insn))
-	return 0;
+  if (regnum >= ARM_WC0_REGNUM && regnum <= ARM_WC7_REGNUM)
+    return regnum - ARM_WC0_REGNUM + SIM_ARM_IWMMXT_COP1R0_REGNUM;
 
-      /* If we find a strex{,b,h,d}, we're done.  */
-      if ((insn & 0xff9000f0) == 0xe1800090)
-	break;
-    }
+  if (regnum >= ARM_WCGR0_REGNUM && regnum <= ARM_WCGR7_REGNUM)
+    return regnum - ARM_WCGR0_REGNUM + SIM_ARM_IWMMXT_COP1R8_REGNUM;
 
-  /* If we didn't find the strex{,b,h,d}, we cannot handle the sequence.  */
-  if (insn_count == atomic_sequence_length)
-    return 0;
+  if (reg < NUM_GREGS)
+    return SIM_ARM_R0_REGNUM + reg;
+  reg -= NUM_GREGS;
 
-  /* Insert a breakpoint right after the end of the atomic sequence.  */
-  breaks[0] = loc;
+  if (reg < NUM_FREGS)
+    return SIM_ARM_FP0_REGNUM + reg;
+  reg -= NUM_FREGS;
 
-  /* Check for duplicated breakpoints.  Check also for a breakpoint
-     placed (branch instruction's destination) anywhere in sequence.  */
-  if (last_breakpoint
-      && (breaks[1] == breaks[0]
-	  || (breaks[1] >= pc && breaks[1] < loc)))
-    last_breakpoint = 0;
-
-  /* Effectively inserts the breakpoints.  */
-  for (index = 0; index <= last_breakpoint; index++)
-    arm_insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+  if (reg < NUM_SREGS)
+    return SIM_ARM_FPS_REGNUM + reg;
+  reg -= NUM_SREGS;
 
-  return 1;
+  internal_error (__FILE__, __LINE__, _("Bad REGNUM %d"), regnum);
 }
 
-int
-arm_deal_with_atomic_sequence (struct frame_info *frame)
+/* NOTE: cagney/2001-08-20: Both convert_from_extended() and
+   convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
+   It is thought that this is is the floating-point register format on
+   little-endian systems.  */
+
+static void
+convert_from_extended (const struct floatformat *fmt, const void *ptr,
+		       void *dbl, int endianess)
 {
-  if (arm_frame_is_thumb (frame))
-    return thumb_deal_with_atomic_sequence_raw (frame);
+  DOUBLEST d;
+
+  if (endianess == BFD_ENDIAN_BIG)
+    floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d);
   else
-    return arm_deal_with_atomic_sequence_raw (frame);
+    floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword,
+			     ptr, &d);
+  floatformat_from_doublest (fmt, &d, dbl);
 }
 
-/* single_step() is called just before we want to resume the inferior,
-   if we want to single-step it but there is no hardware or kernel
-   single-step support.  We find the target of the coming instruction
-   and breakpoint it.  */
-
-int
-arm_software_single_step (struct frame_info *frame)
+static void
+convert_to_extended (const struct floatformat *fmt, void *dbl, const void *ptr,
+		     int endianess)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR next_pc;
-
-  if (arm_deal_with_atomic_sequence (frame))
-    return 1;
-
-  next_pc = arm_get_next_pc (frame, get_frame_pc (frame));
-  arm_insert_single_step_breakpoint (gdbarch, aspace, next_pc);
+  DOUBLEST d;
 
-  return 1;
+  floatformat_to_doublest (fmt, ptr, &d);
+  if (endianess == BFD_ENDIAN_BIG)
+    floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl);
+  else
+    floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword,
+			       &d, dbl);
 }
 
 /* Given BUF, which is OLD_LEN bytes ending at ENDADDR, expand
@@ -5325,10 +4250,10 @@ extend_buffer_earlier (gdb_byte *buf, CO
   gdb_byte *new_buf;
   int bytes_to_read = new_len - old_len;
 
-  new_buf = xmalloc (new_len);
+  new_buf = (gdb_byte *) xmalloc (new_len);
   memcpy (new_buf + bytes_to_read, buf, old_len);
   xfree (buf);
-  if (target_read_memory (endaddr - new_len, new_buf, bytes_to_read) != 0)
+  if (target_read_code (endaddr - new_len, new_buf, bytes_to_read) != 0)
     {
       xfree (new_buf);
       return NULL;
@@ -5386,13 +4311,13 @@ arm_adjust_breakpoint_address (struct gd
      footwork to distinguish a real IT instruction from the second
      half of a 32-bit instruction, but there is no need for that if
      there's no candidate.  */
-  buf_len = min (bpaddr - boundary, MAX_IT_BLOCK_PREFIX);
+  buf_len = std::min (bpaddr - boundary, (CORE_ADDR) MAX_IT_BLOCK_PREFIX);
   if (buf_len == 0)
     /* No room for an IT instruction.  */
     return bpaddr;
 
-  buf = xmalloc (buf_len);
-  if (target_read_memory (bpaddr - buf_len, buf, buf_len) != 0)
+  buf = (gdb_byte *) xmalloc (buf_len);
+  if (target_read_code (bpaddr - buf_len, buf, buf_len) != 0)
     return bpaddr;
   any = 0;
   for (i = 0; i < buf_len; i += 2)
@@ -5404,6 +4329,7 @@ arm_adjust_breakpoint_address (struct gd
 	  break;
 	}
     }
+
   if (any == 0)
     {
       xfree (buf);
@@ -5506,13 +4432,12 @@ arm_adjust_breakpoint_address (struct gd
    Generally ARM displaced stepping works as follows:
 
    1. When an instruction is to be single-stepped, it is first decoded by
-      arm_process_displaced_insn (called from arm_displaced_step_copy_insn).
-      Depending on the type of instruction, it is then copied to a scratch
-      location, possibly in a modified form.  The copy_* set of functions
-      performs such modification, as necessary.  A breakpoint is placed after
-      the modified instruction in the scratch space to return control to GDB.
-      Note in particular that instructions which modify the PC will no longer
-      do so after modification.
+      arm_process_displaced_insn.  Depending on the type of instruction, it is
+      then copied to a scratch location, possibly in a modified form.  The
+      copy_* set of functions performs such modification, as necessary.  A
+      breakpoint is placed after the modified instruction in the scratch space
+      to return control to GDB.  Note in particular that instructions which
+      modify the PC will no longer do so after modification.
 
    2. The instruction is single-stepped, by setting the PC to the scratch
       location address, and resuming.  Control returns to GDB when the
@@ -5768,7 +4693,7 @@ thumb_copy_unmodified_32bit (struct gdba
 /* Copy 16-bit Thumb(Thumb and 16-bit Thumb-2) instruction without any
    modification.  */
 static int
-thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, unsigned int insn,
+thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, uint16_t insn,
 			     const char *iname,
 			     struct displaced_step_closure *dsc)
 {
@@ -6166,7 +5091,7 @@ thumb2_copy_b_bl_blx (struct gdbarch *gd
 
 /* Copy B Thumb instructions.  */
 static int
-thumb_copy_b (struct gdbarch *gdbarch, unsigned short insn,
+thumb_copy_b (struct gdbarch *gdbarch, uint16_t insn,
 	      struct displaced_step_closure *dsc)
 {
   unsigned int cond = 0;
@@ -6619,7 +5544,7 @@ cleanup_store (struct gdbarch *gdbarch, 
    transfers, which have a different encoding to byte/word transfers.  */
 
 static int
-arm_copy_extra_ld_st (struct gdbarch *gdbarch, uint32_t insn, int unpriveleged,
+arm_copy_extra_ld_st (struct gdbarch *gdbarch, uint32_t insn, int unprivileged,
 		      struct regcache *regs, struct displaced_step_closure *dsc)
 {
   unsigned int op1 = bits (insn, 20, 24);
@@ -6638,7 +5563,7 @@ arm_copy_extra_ld_st (struct gdbarch *gd
 
   if (debug_displaced)
     fprintf_unfiltered (gdb_stdlog, "displaced: copying %sextra load/store "
-			"insn %.8lx\n", unpriveleged ? "unpriveleged " : "",
+			"insn %.8lx\n", unprivileged ? "unprivileged " : "",
 			(unsigned long) insn);
 
   opcode = ((op2 << 2) | (op1 & 0x1) | ((op1 & 0x4) >> 1)) - 4;
@@ -7188,8 +6113,8 @@ arm_copy_block_xfer (struct gdbarch *gdb
 	     contiguous chunk r0...rX before doing the transfer, then shuffling
 	     registers into the correct places in the cleanup routine.  */
 	  unsigned int regmask = insn & 0xffff;
-	  unsigned int num_in_list = bitcount (regmask), new_regmask, bit = 1;
-	  unsigned int to = 0, from = 0, i, new_rn;
+	  unsigned int num_in_list = bitcount (regmask), new_regmask;
+	  unsigned int i;
 
 	  for (i = 0; i < num_in_list; i++)
 	    dsc->tmp[i] = displaced_read_reg (regs, dsc, i);
@@ -7290,8 +6215,8 @@ thumb2_copy_block_xfer (struct gdbarch *
       else
 	{
 	  unsigned int regmask = dsc->u.block.regmask;
-	  unsigned int num_in_list = bitcount (regmask), new_regmask, bit = 1;
-	  unsigned int to = 0, from = 0, i, new_rn;
+	  unsigned int num_in_list = bitcount (regmask), new_regmask;
+	  unsigned int i;
 
 	  for (i = 0; i < num_in_list; i++)
 	    dsc->tmp[i] = displaced_read_reg (regs, dsc, i);
@@ -7324,6 +6249,77 @@ thumb2_copy_block_xfer (struct gdbarch *
   return 0;
 }
 
+/* Wrapper over read_memory_unsigned_integer for use in arm_get_next_pcs.
+ This is used to avoid a dependency on BFD's bfd_endian enum.  */
+
+ULONGEST
+arm_get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr, int len,
+					       int byte_order)
+{
+  return read_memory_unsigned_integer (memaddr, len,
+				       (enum bfd_endian) byte_order);
+}
+
+/* Wrapper over gdbarch_addr_bits_remove for use in arm_get_next_pcs.  */
+
+CORE_ADDR
+arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
+				   CORE_ADDR val)
+{
+  return gdbarch_addr_bits_remove (get_regcache_arch (self->regcache), val);
+}
+
+/* Wrapper over syscall_next_pc for use in get_next_pcs.  */
+
+static CORE_ADDR
+arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
+{
+  return 0;
+}
+
+/* Wrapper over arm_is_thumb for use in arm_get_next_pcs.  */
+
+int
+arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self)
+{
+  return arm_is_thumb (self->regcache);
+}
+
+/* single_step() is called just before we want to resume the inferior,
+   if we want to single-step it but there is no hardware or kernel
+   single-step support.  We find the target of the coming instructions
+   and breakpoint them.  */
+
+VEC (CORE_ADDR) *
+arm_software_single_step (struct regcache *regcache)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct arm_get_next_pcs next_pcs_ctx;
+  CORE_ADDR pc;
+  int i;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+  struct cleanup *old_chain = make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs);
+
+  arm_get_next_pcs_ctor (&next_pcs_ctx,
+			 &arm_get_next_pcs_ops,
+			 gdbarch_byte_order (gdbarch),
+			 gdbarch_byte_order_for_code (gdbarch),
+			 0,
+			 regcache);
+
+  next_pcs = arm_get_next_pcs (&next_pcs_ctx);
+
+  for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
+    {
+      pc = gdbarch_addr_bits_remove (gdbarch, pc);
+      VEC_replace (CORE_ADDR, next_pcs, i, pc);
+    }
+
+  discard_cleanups (old_chain);
+
+  return next_pcs;
+}
+
 /* Cleanup/copy SVC (SWI) instructions.  These two functions are overridden
    for Linux, where some SVC instructions must be treated specially.  */
 
@@ -7596,7 +6592,6 @@ arm_decode_miscellaneous (struct gdbarch
 {
   unsigned int op2 = bits (insn, 4, 6);
   unsigned int op = bits (insn, 21, 22);
-  unsigned int op1 = bits (insn, 16, 19);
 
   switch (op2)
     {
@@ -7677,7 +6672,7 @@ arm_decode_dp_misc (struct gdbarch *gdba
       else if ((op1 & 0x10) == 0x10 && op2 == 0x9)
 	return arm_copy_unmodified (gdbarch, insn, "synch", dsc);
       else if (op2 == 0xb || (op2 & 0xd) == 0xd)
-	/* 2nd arg means "unpriveleged".  */
+	/* 2nd arg means "unprivileged".  */
 	return arm_copy_extra_ld_st (gdbarch, insn, (op1 & 0x12) == 0x02, regs,
 				     dsc);
     }
@@ -7693,7 +6688,6 @@ arm_decode_ld_st_word_ubyte (struct gdba
 {
   int a = bit (insn, 25), b = bit (insn, 4);
   uint32_t op1 = bits (insn, 20, 24);
-  int rn_f = bits (insn, 16, 19) == 0xf;
 
   if ((!a && (op1 & 0x05) == 0x00 && (op1 & 0x17) != 0x02)
       || (a && (op1 & 0x05) == 0x00 && (op1 & 0x17) != 0x02 && !b))
@@ -7781,7 +6775,7 @@ arm_decode_media (struct gdbarch *gdbarc
 }
 
 static int
-arm_decode_b_bl_ldmstm (struct gdbarch *gdbarch, int32_t insn,
+arm_decode_b_bl_ldmstm (struct gdbarch *gdbarch, uint32_t insn,
 			struct regcache *regs,
 			struct displaced_step_closure *dsc)
 {
@@ -7882,13 +6876,12 @@ thumb2_decode_ext_reg_ld_st (struct gdba
 }
 
 static int
-arm_decode_svc_copro (struct gdbarch *gdbarch, uint32_t insn, CORE_ADDR to,
+arm_decode_svc_copro (struct gdbarch *gdbarch, uint32_t insn,
 		      struct regcache *regs, struct displaced_step_closure *dsc)
 {
   unsigned int op1 = bits (insn, 20, 25);
   int op = bit (insn, 4);
   unsigned int coproc = bits (insn, 8, 11);
-  unsigned int rn = bits (insn, 16, 19);
 
   if ((op1 & 0x20) == 0x00 && (op1 & 0x3a) != 0x00 && (coproc & 0xe) == 0xa)
     return arm_decode_ext_reg_ld_st (gdbarch, insn, regs, dsc);
@@ -7933,11 +6926,9 @@ thumb2_decode_svc_copro (struct gdbarch 
 			 struct displaced_step_closure *dsc)
 {
   unsigned int coproc = bits (insn2, 8, 11);
-  unsigned int op1 = bits (insn1, 4, 9);
   unsigned int bit_5_8 = bits (insn1, 5, 8);
   unsigned int bit_9 = bit (insn1, 9);
   unsigned int bit_4 = bit (insn1, 4);
-  unsigned int rn = bits (insn1, 0, 3);
 
   if (bit_9 == 0)
     {
@@ -8056,14 +7047,13 @@ thumb_copy_pc_relative_32bit (struct gdb
 }
 
 static int
-thumb_copy_16bit_ldr_literal (struct gdbarch *gdbarch, unsigned short insn1,
+thumb_copy_16bit_ldr_literal (struct gdbarch *gdbarch, uint16_t insn1,
 			      struct regcache *regs,
 			      struct displaced_step_closure *dsc)
 {
   unsigned int rt = bits (insn1, 8, 10);
   unsigned int pc;
   int imm8 = (bits (insn1, 0, 7) << 2);
-  CORE_ADDR from = dsc->insn_addr;
 
   /* LDR Rd, #imm8
 
@@ -8206,7 +7196,7 @@ cleanup_pop_pc_16bit_all (struct gdbarch
 }
 
 static int
-thumb_copy_pop_pc_16bit (struct gdbarch *gdbarch, unsigned short insn1,
+thumb_copy_pop_pc_16bit (struct gdbarch *gdbarch, uint16_t insn1,
 			 struct regcache *regs,
 			 struct displaced_step_closure *dsc)
 {
@@ -8252,8 +7242,8 @@ thumb_copy_pop_pc_16bit (struct gdbarch 
   else
     {
       unsigned int num_in_list = bitcount (dsc->u.block.regmask);
-      unsigned int new_regmask, bit = 1;
-      unsigned int to = 0, from = 0, i, new_rn;
+      unsigned int i;
+      unsigned int new_regmask;
 
       for (i = 0; i < num_in_list + 1; i++)
 	dsc->tmp[i] = displaced_read_reg (regs, dsc, i);
@@ -8390,7 +7380,6 @@ decode_thumb_32bit_ld_mem_hints (struct 
   int rt = bits (insn2, 12, 15);
   int rn = bits (insn1, 0, 3);
   int op1 = bits (insn1, 7, 8);
-  int err = 0;
 
   switch (bits (insn1, 5, 6))
     {
@@ -8592,7 +7581,7 @@ thumb_process_displaced_32bit_insn (stru
 
 static void
 thumb_process_displaced_insn (struct gdbarch *gdbarch, CORE_ADDR from,
-			      CORE_ADDR to, struct regcache *regs,
+			      struct regcache *regs,
 			      struct displaced_step_closure *dsc)
 {
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
@@ -8633,7 +7622,7 @@ arm_process_displaced_insn (struct gdbar
   dsc->wrote_to_pc = 0;
 
   if (!displaced_in_arm_mode (regs))
-    return thumb_process_displaced_insn (gdbarch, from, to, regs, dsc);
+    return thumb_process_displaced_insn (gdbarch, from, regs, dsc);
 
   dsc->is_thumb = 0;
   dsc->insn_size = 4;
@@ -8664,7 +7653,7 @@ arm_process_displaced_insn (struct gdbar
       break;
 
     case 0xc: case 0xd: case 0xe: case 0xf:
-      err = arm_decode_svc_copro (gdbarch, insn, to, regs, dsc);
+      err = arm_decode_svc_copro (gdbarch, insn, regs, dsc);
       break;
     }
 
@@ -8729,22 +7718,6 @@ arm_displaced_init_closure (struct gdbar
 			paddress (gdbarch, from), paddress (gdbarch, to));
 }
 
-/* Entry point for copying an instruction into scratch space for displaced
-   stepping.  */
-
-struct displaced_step_closure *
-arm_displaced_step_copy_insn (struct gdbarch *gdbarch,
-			      CORE_ADDR from, CORE_ADDR to,
-			      struct regcache *regs)
-{
-  struct displaced_step_closure *dsc
-    = xmalloc (sizeof (struct displaced_step_closure));
-  arm_process_displaced_insn (gdbarch, from, to, regs, dsc);
-  arm_displaced_init_closure (gdbarch, from, to, dsc);
-
-  return dsc;
-}
-
 /* Entry point for cleaning things up after a displaced instruction has been
    single-stepped.  */
 
@@ -8769,7 +7742,9 @@ arm_displaced_step_fixup (struct gdbarch
 static int
 gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
 {
-  struct gdbarch *gdbarch = info->application_data;
+  gdb_disassembler *di
+    = static_cast<gdb_disassembler *>(info->application_data);
+  struct gdbarch *gdbarch = di->arch ();
 
   if (arm_pc_is_thumb (gdbarch, memaddr))
     {
@@ -8847,16 +7822,10 @@ static const gdb_byte arm_default_arm_be
 static const gdb_byte arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT;
 static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
 
-/* Determine the type and size of breakpoint to insert at PCPTR.  Uses
-   the program counter value to determine whether a 16-bit or 32-bit
-   breakpoint should be used.  It returns a pointer to a string of
-   bytes that encode a breakpoint instruction, stores the length of
-   the string to *lenptr, and adjusts the program counter (if
-   necessary) to point to the actual memory location where the
-   breakpoint should be inserted.  */
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
-static const unsigned char *
-arm_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
+static int
+arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
@@ -8870,38 +7839,98 @@ arm_breakpoint_from_pc (struct gdbarch *
       if (tdep->thumb2_breakpoint != NULL)
 	{
 	  gdb_byte buf[2];
+
 	  if (target_read_memory (*pcptr, buf, 2) == 0)
 	    {
 	      unsigned short inst1;
+
 	      inst1 = extract_unsigned_integer (buf, 2, byte_order_for_code);
 	      if (thumb_insn_size (inst1) == 4)
-		{
-		  *lenptr = tdep->thumb2_breakpoint_size;
-		  return tdep->thumb2_breakpoint;
-		}
+		return ARM_BP_KIND_THUMB2;
 	    }
 	}
 
-      *lenptr = tdep->thumb_breakpoint_size;
-      return tdep->thumb_breakpoint;
+      return ARM_BP_KIND_THUMB;
     }
   else
+    return ARM_BP_KIND_ARM;
+
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  switch (kind)
     {
-      *lenptr = tdep->arm_breakpoint_size;
+    case ARM_BP_KIND_ARM:
+      *size = tdep->arm_breakpoint_size;
       return tdep->arm_breakpoint;
+    case ARM_BP_KIND_THUMB:
+      *size = tdep->thumb_breakpoint_size;
+      return tdep->thumb_breakpoint;
+    case ARM_BP_KIND_THUMB2:
+      *size = tdep->thumb2_breakpoint_size;
+      return tdep->thumb2_breakpoint;
+    default:
+      gdb_assert_not_reached ("unexpected arm breakpoint kind");
     }
 }
 
-static void
-arm_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			       int *kindptr)
+/* Implement the breakpoint_kind_from_current_state gdbarch method.  */
+
+static int
+arm_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
+					struct regcache *regcache,
+					CORE_ADDR *pcptr)
 {
-  arm_breakpoint_from_pc (gdbarch, pcptr, kindptr);
+  gdb_byte buf[4];
+
+  /* Check the memory pointed by PC is readable.  */
+  if (target_read_memory (regcache_read_pc (regcache), buf, 4) == 0)
+    {
+      struct arm_get_next_pcs next_pcs_ctx;
+      CORE_ADDR pc;
+      int i;
+      VEC (CORE_ADDR) *next_pcs = NULL;
+      struct cleanup *old_chain
+	= make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs);
+
+      arm_get_next_pcs_ctor (&next_pcs_ctx,
+			     &arm_get_next_pcs_ops,
+			     gdbarch_byte_order (gdbarch),
+			     gdbarch_byte_order_for_code (gdbarch),
+			     0,
+			     regcache);
+
+      next_pcs = arm_get_next_pcs (&next_pcs_ctx);
+
+      /* If MEMADDR is the next instruction of current pc, do the
+	 software single step computation, and get the thumb mode by
+	 the destination address.  */
+      for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
+	{
+	  if (UNMAKE_THUMB_ADDR (pc) == *pcptr)
+	    {
+	      do_cleanups (old_chain);
 
-  if (arm_pc_is_thumb (gdbarch, *pcptr) && *kindptr == 4)
-    /* The documented magic value for a 32-bit Thumb-2 breakpoint, so
-       that this is not confused with a 32-bit ARM breakpoint.  */
-    *kindptr = 3;
+	      if (IS_THUMB_ADDR (pc))
+		{
+		  *pcptr = MAKE_THUMB_ADDR (*pcptr);
+		  return arm_breakpoint_kind_from_pc (gdbarch, pcptr);
+		}
+	      else
+		return ARM_BP_KIND_ARM;
+	    }
+	}
+
+      do_cleanups (old_chain);
+    }
+
+  return arm_breakpoint_kind_from_pc (gdbarch, pcptr);
 }
 
 /* Extract from an array REGBUF containing the (raw) register state a
@@ -9005,99 +8034,113 @@ arm_extract_return_value (struct type *t
 static int
 arm_return_in_memory (struct gdbarch *gdbarch, struct type *type)
 {
-  int nRc;
   enum type_code code;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
-  /* In the ARM ABI, "integer" like aggregate types are returned in
-     registers.  For an aggregate type to be integer like, its size
-     must be less than or equal to INT_REGISTER_SIZE and the
-     offset of each addressable subfield must be zero.  Note that bit
-     fields are not addressable, and all addressable subfields of
-     unions always start at offset zero.
-
-     This function is based on the behaviour of GCC 2.95.1.
-     See: gcc/arm.c: arm_return_in_memory() for details.
-
-     Note: All versions of GCC before GCC 2.95.2 do not set up the
-     parameters correctly for a function returning the following
-     structure: struct { float f;}; This should be returned in memory,
-     not a register.  Richard Earnshaw sent me a patch, but I do not
-     know of any way to detect if a function like the above has been
-     compiled with the correct calling convention.  */
-
-  /* All aggregate types that won't fit in a register must be returned
-     in memory.  */
-  if (TYPE_LENGTH (type) > INT_REGISTER_SIZE)
+  /* Simple, non-aggregate types (ie not including vectors and
+     complex) are always returned in a register (or registers).  */
+  code = TYPE_CODE (type);
+  if (TYPE_CODE_STRUCT != code && TYPE_CODE_UNION != code
+      && TYPE_CODE_ARRAY != code && TYPE_CODE_COMPLEX != code)
+    return 0;
+
+  if (TYPE_CODE_ARRAY == code && TYPE_VECTOR (type))
     {
-      return 1;
+      /* Vector values should be returned using ARM registers if they
+	 are not over 16 bytes.  */
+      return (TYPE_LENGTH (type) > 16);
     }
 
-  /* The AAPCS says all aggregates not larger than a word are returned
-     in a register.  */
   if (gdbarch_tdep (gdbarch)->arm_abi != ARM_ABI_APCS)
-    return 0;
-
-  /* The only aggregate types that can be returned in a register are
-     structs and unions.  Arrays must be returned in memory.  */
-  code = TYPE_CODE (type);
-  if ((TYPE_CODE_STRUCT != code) && (TYPE_CODE_UNION != code))
     {
+      /* The AAPCS says all aggregates not larger than a word are returned
+	 in a register.  */
+      if (TYPE_LENGTH (type) <= INT_REGISTER_SIZE)
+	return 0;
+
       return 1;
     }
+  else
+    {
+      int nRc;
 
-  /* Assume all other aggregate types can be returned in a register.
-     Run a check for structures, unions and arrays.  */
-  nRc = 0;
+      /* All aggregate types that won't fit in a register must be returned
+	 in memory.  */
+      if (TYPE_LENGTH (type) > INT_REGISTER_SIZE)
+	return 1;
 
-  if ((TYPE_CODE_STRUCT == code) || (TYPE_CODE_UNION == code))
-    {
-      int i;
-      /* Need to check if this struct/union is "integer" like.  For
-         this to be true, its size must be less than or equal to
-         INT_REGISTER_SIZE and the offset of each addressable
-         subfield must be zero.  Note that bit fields are not
-         addressable, and unions always start at offset zero.  If any
-         of the subfields is a floating point type, the struct/union
-         cannot be an integer type.  */
-
-      /* For each field in the object, check:
-         1) Is it FP? --> yes, nRc = 1;
-         2) Is it addressable (bitpos != 0) and
-         not packed (bitsize == 0)?
-         --> yes, nRc = 1  
-       */
-
-      for (i = 0; i < TYPE_NFIELDS (type); i++)
-	{
-	  enum type_code field_type_code;
-	  field_type_code = TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type,
-								       i)));
+      /* In the ARM ABI, "integer" like aggregate types are returned in
+	 registers.  For an aggregate type to be integer like, its size
+	 must be less than or equal to INT_REGISTER_SIZE and the
+	 offset of each addressable subfield must be zero.  Note that bit
+	 fields are not addressable, and all addressable subfields of
+	 unions always start at offset zero.
+
+	 This function is based on the behaviour of GCC 2.95.1.
+	 See: gcc/arm.c: arm_return_in_memory() for details.
+
+	 Note: All versions of GCC before GCC 2.95.2 do not set up the
+	 parameters correctly for a function returning the following
+	 structure: struct { float f;}; This should be returned in memory,
+	 not a register.  Richard Earnshaw sent me a patch, but I do not
+	 know of any way to detect if a function like the above has been
+	 compiled with the correct calling convention.  */
+
+      /* Assume all other aggregate types can be returned in a register.
+	 Run a check for structures, unions and arrays.  */
+      nRc = 0;
 
-	  /* Is it a floating point type field?  */
-	  if (field_type_code == TYPE_CODE_FLT)
-	    {
-	      nRc = 1;
-	      break;
-	    }
+      if ((TYPE_CODE_STRUCT == code) || (TYPE_CODE_UNION == code))
+	{
+	  int i;
+	  /* Need to check if this struct/union is "integer" like.  For
+	     this to be true, its size must be less than or equal to
+	     INT_REGISTER_SIZE and the offset of each addressable
+	     subfield must be zero.  Note that bit fields are not
+	     addressable, and unions always start at offset zero.  If any
+	     of the subfields is a floating point type, the struct/union
+	     cannot be an integer type.  */
+
+	  /* For each field in the object, check:
+	     1) Is it FP? --> yes, nRc = 1;
+	     2) Is it addressable (bitpos != 0) and
+	     not packed (bitsize == 0)?
+	     --> yes, nRc = 1
+	  */
+
+	  for (i = 0; i < TYPE_NFIELDS (type); i++)
+	    {
+	      enum type_code field_type_code;
+
+	      field_type_code
+		= TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type,
+							     i)));
 
-	  /* If bitpos != 0, then we have to care about it.  */
-	  if (TYPE_FIELD_BITPOS (type, i) != 0)
-	    {
-	      /* Bitfields are not addressable.  If the field bitsize is 
-	         zero, then the field is not packed.  Hence it cannot be
-	         a bitfield or any other packed type.  */
-	      if (TYPE_FIELD_BITSIZE (type, i) == 0)
+	      /* Is it a floating point type field?  */
+	      if (field_type_code == TYPE_CODE_FLT)
 		{
 		  nRc = 1;
 		  break;
 		}
+
+	      /* If bitpos != 0, then we have to care about it.  */
+	      if (TYPE_FIELD_BITPOS (type, i) != 0)
+		{
+		  /* Bitfields are not addressable.  If the field bitsize is 
+		     zero, then the field is not packed.  Hence it cannot be
+		     a bitfield or any other packed type.  */
+		  if (TYPE_FIELD_BITSIZE (type, i) == 0)
+		    {
+		      nRc = 1;
+		      break;
+		    }
+		}
 	    }
 	}
-    }
 
-  return nRc;
+      return nRc;
+    }
 }
 
 /* Write into appropriate registers a function return value of type
@@ -9252,12 +8295,11 @@ arm_return_value (struct gdbarch *gdbarc
 	  || arm_return_in_memory (gdbarch, valtype))
 	return RETURN_VALUE_STRUCT_CONVENTION;
     }
-
-  /* AAPCS returns complex types longer than a register in memory.  */
-  if (tdep->arm_abi != ARM_ABI_APCS
-      && TYPE_CODE (valtype) == TYPE_CODE_COMPLEX
-      && TYPE_LENGTH (valtype) > INT_REGISTER_SIZE)
-    return RETURN_VALUE_STRUCT_CONVENTION;
+  else if (TYPE_CODE (valtype) == TYPE_CODE_COMPLEX)
+    {
+      if (arm_return_in_memory (gdbarch, valtype))
+	return RETURN_VALUE_STRUCT_CONVENTION;
+    }
 
   if (writebuf)
     arm_store_return_value (valtype, regcache, writebuf);
@@ -9353,7 +8395,7 @@ arm_skip_stub (struct frame_info *frame,
       else
 	target_len -= strlen ("_from_arm");
 
-      target_name = alloca (target_len + 1);
+      target_name = (char *) alloca (target_len + 1);
       memcpy (target_name, name + 2, target_len);
       target_name[target_len] = '\0';
 
@@ -9408,7 +8450,7 @@ set_fp_model_sfunc (char *args, int from
   for (fp_model = ARM_FLOAT_AUTO; fp_model != ARM_FLOAT_LAST; fp_model++)
     if (strcmp (current_fp_model, fp_model_strings[fp_model]) == 0)
       {
-	arm_fp_model = fp_model;
+	arm_fp_model = (enum arm_float_model) fp_model;
 	break;
       }
 
@@ -9445,7 +8487,7 @@ arm_set_abi (char *args, int from_tty,
   for (arm_abi = ARM_ABI_AUTO; arm_abi != ARM_ABI_LAST; arm_abi++)
     if (strcmp (arm_abi_string, arm_abi_strings[arm_abi]) == 0)
       {
-	arm_abi_global = arm_abi;
+	arm_abi_global = (enum arm_abi_kind) arm_abi;
 	break;
       }
 
@@ -9486,8 +8528,6 @@ static void
 arm_show_force_mode (struct ui_file *file, int from_tty,
 		     struct cmd_list_element *c, const char *value)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch ());
-
   fprintf_filtered (file,
 		    _("The current execution mode assumed "
 		      "(even when symbols are available) is \"%s\".\n"),
@@ -9501,9 +8541,32 @@ arm_show_force_mode (struct ui_file *fil
 
 static void
 set_disassembly_style_sfunc (char *args, int from_tty,
-			      struct cmd_list_element *c)
+			     struct cmd_list_element *c)
+{
+  /* Convert the short style name into the long style name (eg, reg-names-*)
+     before calling the generic set_disassembler_options() function.  */
+  std::string long_name = std::string ("reg-names-") + disassembly_style;
+  set_disassembler_options (&long_name[0]);
+}
+
+static void
+show_disassembly_style_sfunc (struct ui_file *file, int from_tty,
+			      struct cmd_list_element *c, const char *value)
 {
-  set_disassembly_style ();
+  struct gdbarch *gdbarch = get_current_arch ();
+  char *options = get_disassembler_options (gdbarch);
+  const char *style = "";
+  int len = 0;
+  char *opt;
+
+  FOR_EACH_DISASSEMBLER_OPTION (opt, options)
+    if (CONST_STRNEQ (opt, "reg-names-"))
+      {
+	style = &opt[strlen ("reg-names-")];
+	len = strcspn (style, ",");
+      }
+
+  fprintf_unfiltered (file, "The disassembly style is \"%.*s\".\n", len, style);
 }
 
 /* Return the ARM register name corresponding to register I.  */
@@ -9544,21 +8607,6 @@ arm_register_name (struct gdbarch *gdbar
   return arm_register_names[i];
 }
 
-static void
-set_disassembly_style (void)
-{
-  int current;
-
-  /* Find the style that the user wants.  */
-  for (current = 0; current < num_disassembly_options; current++)
-    if (disassembly_style == valid_disassembly_styles[current])
-      break;
-  gdb_assert (current < num_disassembly_options);
-
-  /* Synchronize the disassembler.  */
-  set_arm_regname_option (current);
-}
-
 /* Test whether the coff symbol specific value corresponds to a Thumb
    function.  */
 
@@ -9582,7 +8630,9 @@ coff_sym_is_thumb (int val)
 static void
 arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
 {
-  if (ARM_SYM_BRANCH_TYPE (&((elf_symbol_type *)sym)->internal_elf_sym)
+  elf_symbol_type *elfsym = (elf_symbol_type *) sym;
+
+  if (ARM_GET_SYM_BRANCH_TYPE (elfsym->internal_elf_sym.st_target_internal)
       == ST_BRANCH_TO_THUMB)
     MSYMBOL_SET_SPECIAL (msym);
 }
@@ -9597,7 +8647,7 @@ arm_coff_make_msymbol_special(int val, s
 static void
 arm_objfile_data_free (struct objfile *objfile, void *arg)
 {
-  struct arm_per_objfile *data = arg;
+  struct arm_per_objfile *data = (struct arm_per_objfile *) arg;
   unsigned int i;
 
   for (i = 0; i < objfile->obfd->section_count; i++)
@@ -9617,7 +8667,8 @@ arm_record_special_symbol (struct gdbarc
   if (name[1] != 'a' && name[1] != 't' && name[1] != 'd')
     return;
 
-  data = objfile_data (objfile, arm_objfile_data_key);
+  data = (struct arm_per_objfile *) objfile_data (objfile,
+						  arm_objfile_data_key);
   if (data == NULL)
     {
       data = OBSTACK_ZALLOC (&objfile->objfile_obstack,
@@ -9821,7 +8872,7 @@ arm_pseudo_write (struct gdbarch *gdbarc
 static struct value *
 value_of_arm_user_reg (struct frame_info *frame, const void *baton)
 {
-  const int *reg_p = baton;
+  const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, frame);
 }
 
@@ -9903,6 +8954,22 @@ arm_register_g_packet_guesses (struct gd
   /* Otherwise we don't have a useful guess.  */
 }
 
+/* Implement the code_of_frame_writable gdbarch method.  */
+
+static int
+arm_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+  if (gdbarch_tdep (gdbarch)->is_m
+      && get_frame_type (frame) == SIGTRAMP_FRAME)
+    {
+      /* M-profile exception frames return to some magic PCs, where
+	 isn't writable at all.  */
+      return 0;
+    }
+  else
+    return 1;
+}
+
 
 /* Initialize the current architecture based on INFO.  If possible,
    re-use an architecture from ARCHES, which is a list of
@@ -9936,11 +9003,6 @@ arm_gdbarch_init (struct gdbarch_info in
 
       switch (bfd_get_flavour (info.abfd))
 	{
-	case bfd_target_aout_flavour:
-	  /* Assume it's an old APCS-style ABI.  */
-	  arm_abi = ARM_ABI_APCS;
-	  break;
-
 	case bfd_target_coff_flavour:
 	  /* Assume it's an old APCS-style ABI.  */
 	  /* XXX WinCE?  */
@@ -10290,7 +9352,7 @@ arm_gdbarch_init (struct gdbarch_info in
       return best_arch->gdbarch;
     }
 
-  tdep = xcalloc (1, sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Record additional information about the architecture we are defining.
@@ -10353,6 +9415,9 @@ arm_gdbarch_init (struct gdbarch_info in
   set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
   set_gdbarch_frame_align (gdbarch, arm_frame_align);
 
+  if (is_m)
+    set_gdbarch_code_of_frame_writable (gdbarch, arm_code_of_frame_writable);
+
   set_gdbarch_write_pc (gdbarch, arm_write_pc);
 
   /* Frame handling.  */
@@ -10378,9 +9443,10 @@ arm_gdbarch_init (struct gdbarch_info in
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Breakpoint manipulation.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, arm_breakpoint_from_pc);
-  set_gdbarch_remote_breakpoint_from_pc (gdbarch,
-					 arm_remote_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, arm_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, arm_sw_breakpoint_from_kind);
+  set_gdbarch_breakpoint_kind_from_current_state (gdbarch,
+						  arm_breakpoint_kind_from_current_state);
 
   /* Information about registers, etc.  */
   set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
@@ -10430,6 +9496,7 @@ arm_gdbarch_init (struct gdbarch_info in
   frame_unwind_append_unwinder (gdbarch, &arm_stub_unwind);
   dwarf2_append_unwinders (gdbarch);
   frame_unwind_append_unwinder (gdbarch, &arm_exidx_unwind);
+  frame_unwind_append_unwinder (gdbarch, &arm_epilogue_frame_unwind);
   frame_unwind_append_unwinder (gdbarch, &arm_prologue_unwind);
 
   /* Now we have tuned the configuration, set a few final things,
@@ -10499,6 +9566,9 @@ arm_gdbarch_init (struct gdbarch_info in
     user_reg_add (gdbarch, arm_register_aliases[i].name,
 		  value_of_arm_user_reg, &arm_register_aliases[i].regnum);
 
+  set_gdbarch_disassembler_options (gdbarch, &arm_disassembler_options);
+  set_gdbarch_valid_disassembler_options (gdbarch, disassembler_options_arm ());
+
   return gdbarch;
 }
 
@@ -10519,14 +9589,10 @@ extern initialize_file_ftype _initialize
 void
 _initialize_arm_tdep (void)
 {
-  struct ui_file *stb;
   long length;
-  struct cmd_list_element *new_set, *new_show;
   const char *setname;
   const char *setdesc;
-  const char *const *regnames;
-  int numregs, i, j;
-  static char *helptext;
+  int i, j;
   char regdesc[1024], *rdptr = regdesc;
   size_t rest = sizeof (regdesc);
 
@@ -10554,9 +9620,6 @@ _initialize_arm_tdep (void)
   initialize_tdesc_arm_with_vfpv3 ();
   initialize_tdesc_arm_with_neon ();
 
-  /* Get the number of possible sets of register names defined in opcodes.  */
-  num_disassembly_options = get_arm_regname_num_options ();
-
   /* Add root prefix command for all "set arm"/"show arm" commands.  */
   add_prefix_cmd ("arm", no_class, set_arm_command,
 		  _("Various ARM-specific commands."),
@@ -10566,48 +9629,44 @@ _initialize_arm_tdep (void)
 		  _("Various ARM-specific commands."),
 		  &showarmcmdlist, "show arm ", 0, &showlist);
 
-  /* Sync the opcode insn printer with our register viewer.  */
-  parse_arm_disassembler_option ("reg-names-std");
 
-  /* Initialize the array that will be passed to
-     add_setshow_enum_cmd().  */
-  valid_disassembly_styles
-    = xmalloc ((num_disassembly_options + 1) * sizeof (char *));
-  for (i = 0; i < num_disassembly_options; i++)
-    {
-      numregs = get_arm_regnames (i, &setname, &setdesc, &regnames);
-      valid_disassembly_styles[i] = setname;
-      length = snprintf (rdptr, rest, "%s - %s\n", setname, setdesc);
-      rdptr += length;
-      rest -= length;
-      /* When we find the default names, tell the disassembler to use
-	 them.  */
-      if (!strcmp (setname, "std"))
-	{
-          disassembly_style = setname;
-          set_arm_regname_option (i);
-	}
-    }
+  arm_disassembler_options = xstrdup ("reg-names-std");
+  const disasm_options_t *disasm_options = disassembler_options_arm ();
+  int num_disassembly_styles = 0;
+  for (i = 0; disasm_options->name[i] != NULL; i++)
+    if (CONST_STRNEQ (disasm_options->name[i], "reg-names-"))
+      num_disassembly_styles++;
+
+  /* Initialize the array that will be passed to add_setshow_enum_cmd().  */
+  valid_disassembly_styles = XNEWVEC (const char *,
+				      num_disassembly_styles + 1);
+  for (i = j = 0; disasm_options->name[i] != NULL; i++)
+    if (CONST_STRNEQ (disasm_options->name[i], "reg-names-"))
+      {
+	size_t offset = strlen ("reg-names-");
+	const char *style = disasm_options->name[i];
+	valid_disassembly_styles[j++] = &style[offset];
+	length = snprintf (rdptr, rest, "%s - %s\n", &style[offset],
+			   disasm_options->description[i]);
+	rdptr += length;
+	rest -= length;
+      }
   /* Mark the end of valid options.  */
-  valid_disassembly_styles[num_disassembly_options] = NULL;
+  valid_disassembly_styles[num_disassembly_styles] = NULL;
 
   /* Create the help text.  */
-  stb = mem_fileopen ();
-  fprintf_unfiltered (stb, "%s%s%s",
-		      _("The valid values are:\n"),
-		      regdesc,
-		      _("The default is \"std\"."));
-  helptext = ui_file_xstrdup (stb, NULL);
-  ui_file_delete (stb);
+  std::string helptext = string_printf ("%s%s%s",
+					_("The valid values are:\n"),
+					regdesc,
+					_("The default is \"std\"."));
 
   add_setshow_enum_cmd("disassembler", no_class,
 		       valid_disassembly_styles, &disassembly_style,
 		       _("Set the disassembly style."),
 		       _("Show the disassembly style."),
-		       helptext,
+		       helptext.c_str (),
 		       set_disassembly_style_sfunc,
-		       NULL, /* FIXME: i18n: The disassembly style is
-				\"%s\".  */
+		       show_disassembly_style_sfunc,
 		       &setarmcmdlist, &showarmcmdlist);
 
   add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
@@ -10785,12 +9844,9 @@ arm_record_strx (insn_decode_record *arm
 
   uint32_t reg_src1 = 0, reg_src2 = 0;
   uint32_t immed_high = 0, immed_low = 0,offset_8 = 0, tgt_mem_addr = 0;
-  uint32_t opcode1 = 0;
 
   arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 21, 24);
   arm_insn_r->decode = bits (arm_insn_r->arm_insn, 4, 7);
-  opcode1 = bits (arm_insn_r->arm_insn, 20, 24);
-
 
   if (14 == arm_insn_r->opcode || 10 == arm_insn_r->opcode)
     {
@@ -10953,7 +10009,6 @@ arm_record_extension_space (insn_decode_
   uint32_t opcode1 = 0, opcode2 = 0, insn_op1 = 0;
   uint32_t record_buf[8], record_buf_mem[8];
   uint32_t reg_src1 = 0;
-  uint32_t immed_high = 0, immed_low = 0,offset_8 = 0, tgt_mem_addr = 0;
   struct regcache *reg_cache = arm_insn_r->regcache;
   ULONGEST u_regval = 0;
 
@@ -11039,11 +10094,6 @@ arm_record_extension_space (insn_decode_
                 {
                   /* SPSR is going to be changed.  */
                   /* We need to get SPSR value, which is yet to be done.  */
-                  printf_unfiltered (_("Process record does not support "
-                                     "instruction  0x%0x at address %s.\n"),
-                                     arm_insn_r->arm_insn,
-                                     paddress (arm_insn_r->gdbarch, 
-                                     arm_insn_r->this_addr));
                   return -1;
                 }
             }
@@ -11084,10 +10134,6 @@ arm_record_extension_space (insn_decode_
               arm_insn_r->reg_rec_count = 2;
 
               /* Save SPSR also;how?  */
-              printf_unfiltered (_("Process record does not support "
-                                  "instruction 0x%0x at address %s.\n"),
-                                  arm_insn_r->arm_insn,
-                  paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr));
               return -1;
             }
           else if(8 == bits (arm_insn_r->arm_insn, 4, 7) 
@@ -11133,11 +10179,6 @@ arm_record_extension_space (insn_decode_
             {
               /* SPSR is going to be changed.  */
               /* we need to get SPSR value, which is yet to be done  */
-              printf_unfiltered (_("Process record does not support "
-                                   "instruction 0x%0x at address %s.\n"),
-                                    arm_insn_r->arm_insn,
-                                    paddress (arm_insn_r->gdbarch, 
-                                    arm_insn_r->this_addr));
               return -1;
             }
         }
@@ -11214,10 +10255,7 @@ arm_record_extension_space (insn_decode_
 
   /* To be done for ARMv5 and later; as of now we return -1.  */
   if (-1 == ret)
-    printf_unfiltered (_("Process record does not support instruction x%0x "
-                         "at address %s.\n"),arm_insn_r->arm_insn,
-                         paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr));
-
+    return ret;
 
   REG_ALLOC (arm_insn_r->arm_regs, arm_insn_r->reg_rec_count, record_buf);
   MEM_ALLOC (arm_insn_r->arm_mems, arm_insn_r->mem_rec_count, record_buf_mem);
@@ -11234,8 +10272,7 @@ arm_record_data_proc_misc_ld_str (insn_d
   uint32_t record_buf[8], record_buf_mem[8];
   ULONGEST u_regval[2] = {0};
 
-  uint32_t reg_src1 = 0, reg_src2 = 0, reg_dest = 0;
-  uint32_t immed_high = 0, immed_low = 0, offset_8 = 0, tgt_mem_addr = 0;
+  uint32_t reg_src1 = 0, reg_dest = 0;
   uint32_t opcode1 = 0;
 
   arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 21, 24);
@@ -11304,10 +10341,6 @@ arm_record_data_proc_misc_ld_str (insn_d
         {
           /* SPSR is going to be changed.  */
           /* How to read SPSR value?  */
-          printf_unfiltered (_("Process record does not support instruction "
-                            "0x%0x at address %s.\n"),
-                            arm_insn_r->arm_insn,
-                        paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr));
           return -1;
         }
     }
@@ -11363,10 +10396,6 @@ arm_record_data_proc_misc_ld_str (insn_d
       arm_insn_r->reg_rec_count = 2;
 
       /* Save SPSR also; how?  */
-      printf_unfiltered (_("Process record does not support instruction "
-                           "0x%0x at address %s.\n"),arm_insn_r->arm_insn,
-                           paddress (arm_insn_r->gdbarch, 
-                           arm_insn_r->this_addr));
       return -1;
     }
   else if (11 == arm_insn_r->decode
@@ -11469,6 +10498,88 @@ arm_record_data_proc_imm (insn_decode_re
   return 0;
 }
 
+static int
+arm_record_media (insn_decode_record *arm_insn_r)
+{
+  uint32_t record_buf[8];
+
+  switch (bits (arm_insn_r->arm_insn, 22, 24))
+    {
+    case 0:
+      /* Parallel addition and subtraction, signed */
+    case 1:
+      /* Parallel addition and subtraction, unsigned */
+    case 2:
+    case 3:
+      /* Packing, unpacking, saturation and reversal */
+      {
+	int rd = bits (arm_insn_r->arm_insn, 12, 15);
+
+	record_buf[arm_insn_r->reg_rec_count++] = rd;
+      }
+      break;
+
+    case 4:
+    case 5:
+      /* Signed multiplies */
+      {
+	int rd = bits (arm_insn_r->arm_insn, 16, 19);
+	unsigned int op1 = bits (arm_insn_r->arm_insn, 20, 22);
+
+	record_buf[arm_insn_r->reg_rec_count++] = rd;
+	if (op1 == 0x0)
+	  record_buf[arm_insn_r->reg_rec_count++] = ARM_PS_REGNUM;
+	else if (op1 == 0x4)
+	  record_buf[arm_insn_r->reg_rec_count++]
+	    = bits (arm_insn_r->arm_insn, 12, 15);
+      }
+      break;
+
+    case 6:
+      {
+	if (bit (arm_insn_r->arm_insn, 21)
+	    && bits (arm_insn_r->arm_insn, 5, 6) == 0x2)
+	  {
+	    /* SBFX */
+	    record_buf[arm_insn_r->reg_rec_count++]
+	      = bits (arm_insn_r->arm_insn, 12, 15);
+	  }
+	else if (bits (arm_insn_r->arm_insn, 20, 21) == 0x0
+		 && bits (arm_insn_r->arm_insn, 5, 7) == 0x0)
+	  {
+	    /* USAD8 and USADA8 */
+	    record_buf[arm_insn_r->reg_rec_count++]
+	      = bits (arm_insn_r->arm_insn, 16, 19);
+	  }
+      }
+      break;
+
+    case 7:
+      {
+	if (bits (arm_insn_r->arm_insn, 20, 21) == 0x3
+	    && bits (arm_insn_r->arm_insn, 5, 7) == 0x7)
+	  {
+	    /* Permanently UNDEFINED */
+	    return -1;
+	  }
+	else
+	  {
+	    /* BFC, BFI and UBFX */
+	    record_buf[arm_insn_r->reg_rec_count++]
+	      = bits (arm_insn_r->arm_insn, 12, 15);
+	  }
+      }
+      break;
+
+    default:
+      return -1;
+    }
+
+  REG_ALLOC (arm_insn_r->arm_regs, arm_insn_r->reg_rec_count, record_buf);
+
+  return 0;
+}
+
 /* Handle ARM mode instructions with opcode 010.  */
 
 static int
@@ -11575,6 +10686,9 @@ arm_record_ld_st_reg_offset (insn_decode
   LONGEST s_word;
   ULONGEST u_regval[2];
 
+  if (bit (arm_insn_r->arm_insn, 4))
+    return arm_record_media (arm_insn_r);
+
   arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 21, 24);
   arm_insn_r->decode = bits (arm_insn_r->arm_insn, 4, 7);
 
@@ -11945,14 +11059,12 @@ arm_record_b_bl (insn_decode_record *arm
   return 0;
 }
 
-/* Handling opcode 110 insns.  */
-
 static int
 arm_record_unsupported_insn (insn_decode_record *arm_insn_r)
 {
   printf_unfiltered (_("Process record does not support instruction "
-                    "0x%0x at address %s.\n"),arm_insn_r->arm_insn,
-                    paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr));
+		       "0x%0x at address %s.\n"),arm_insn_r->arm_insn,
+		     paddress (arm_insn_r->gdbarch, arm_insn_r->this_addr));
 
   return -1;
 }
@@ -11965,7 +11077,6 @@ arm_record_vdata_transfer_insn (insn_dec
   uint32_t bits_a, bit_c, bit_l, reg_t, reg_v;
   uint32_t record_buf[4];
 
-  const int num_regs = gdbarch_num_regs (arm_insn_r->gdbarch);
   reg_t = bits (arm_insn_r->arm_insn, 12, 15);
   reg_v = bits (arm_insn_r->arm_insn, 21, 23);
   bits_a = bits (arm_insn_r->arm_insn, 21, 23);
@@ -11983,12 +11094,7 @@ arm_record_vdata_transfer_insn (insn_dec
       /* Handle VMOV instruction.  */
       if (bits_a == 0x00)
         {
-          if (bit (arm_insn_r->arm_insn, 20))
-            record_buf[0] = reg_t;
-          else
-            record_buf[0] = num_regs + (bit (arm_insn_r->arm_insn, 7) |
-                            (reg_v << 1));
-
+	  record_buf[0] = reg_t;
           arm_insn_r->reg_rec_count = 1;
         }
       /* Handle VMRS instruction.  */
@@ -12006,11 +11112,7 @@ arm_record_vdata_transfer_insn (insn_dec
       /* Handle VMOV instruction.  */
       if (bits_a == 0x00)
         {
-          if (bit (arm_insn_r->arm_insn, 20))
-            record_buf[0] = reg_t;
-          else
-            record_buf[0] = num_regs + (bit (arm_insn_r->arm_insn, 7) |
-                            (reg_v << 1));
+	  record_buf[0] = ARM_D0_REGNUM + reg_v;
 
           arm_insn_r->reg_rec_count = 1;
         }
@@ -12064,42 +11166,52 @@ arm_record_exreg_ld_st_insn (insn_decode
   ULONGEST u_regval = 0;
 
   struct regcache *reg_cache = arm_insn_r->regcache;
-  const int num_regs = gdbarch_num_regs (arm_insn_r->gdbarch);
 
   opcode = bits (arm_insn_r->arm_insn, 20, 24);
-  single_reg = bit (arm_insn_r->arm_insn, 8);
+  single_reg = !bit (arm_insn_r->arm_insn, 8);
   op_vldm_vstm = opcode & 0x1b;
 
   /* Handle VMOV instructions.  */
   if ((opcode & 0x1e) == 0x04)
     {
-      if (bit (arm_insn_r->arm_insn, 4))
-        {
-          record_buf[0] = bits (arm_insn_r->arm_insn, 12, 15);
-          record_buf[1] = bits (arm_insn_r->arm_insn, 16, 19);
-          arm_insn_r->reg_rec_count = 2;
-        }
+      if (bit (arm_insn_r->arm_insn, 20)) /* to_arm_registers bit 20? */
+	{
+	  record_buf[0] = bits (arm_insn_r->arm_insn, 12, 15);
+	  record_buf[1] = bits (arm_insn_r->arm_insn, 16, 19);
+	  arm_insn_r->reg_rec_count = 2;
+	}
       else
-        {
-          uint8_t reg_m = (bits (arm_insn_r->arm_insn, 0, 3) << 1)
-                          | bit (arm_insn_r->arm_insn, 5);
+	{
+	  uint8_t reg_m = bits (arm_insn_r->arm_insn, 0, 3);
+	  uint8_t bit_m = bit (arm_insn_r->arm_insn, 5);
 
-          if (!single_reg)
-            {
-              record_buf[0] = num_regs + reg_m;
-              record_buf[1] = num_regs + reg_m + 1;
-              arm_insn_r->reg_rec_count = 2;
-            }
-          else
-            {
-              record_buf[0] = reg_m + ARM_D0_REGNUM;
-              arm_insn_r->reg_rec_count = 1;
-            }
-        }
+	  if (single_reg)
+	    {
+	      /* The first S register number m is REG_M:M (M is bit 5),
+		 the corresponding D register number is REG_M:M / 2, which
+		 is REG_M.  */
+	      record_buf[arm_insn_r->reg_rec_count++] = ARM_D0_REGNUM + reg_m;
+	      /* The second S register number is REG_M:M + 1, the
+		 corresponding D register number is (REG_M:M + 1) / 2.
+		 IOW, if bit M is 1, the first and second S registers
+		 are mapped to different D registers, otherwise, they are
+		 in the same D register.  */
+	      if (bit_m)
+		{
+		  record_buf[arm_insn_r->reg_rec_count++]
+		    = ARM_D0_REGNUM + reg_m + 1;
+		}
+	    }
+	  else
+	    {
+	      record_buf[0] = ((bit_m << 4) + reg_m + ARM_D0_REGNUM);
+	      arm_insn_r->reg_rec_count = 1;
+	    }
+	}
     }
   /* Handle VSTM and VPUSH instructions.  */
   else if (op_vldm_vstm == 0x08 || op_vldm_vstm == 0x0a
-          || op_vldm_vstm == 0x12)
+	   || op_vldm_vstm == 0x12)
     {
       uint32_t start_address, reg_rn, imm_off32, imm_off8, memory_count;
       uint32_t memory_index = 0;
@@ -12107,102 +11219,112 @@ arm_record_exreg_ld_st_insn (insn_decode
       reg_rn = bits (arm_insn_r->arm_insn, 16, 19);
       regcache_raw_read_unsigned (reg_cache, reg_rn, &u_regval);
       imm_off8 = bits (arm_insn_r->arm_insn, 0, 7);
-      imm_off32 = imm_off8 << 24;
+      imm_off32 = imm_off8 << 2;
       memory_count = imm_off8;
 
       if (bit (arm_insn_r->arm_insn, 23))
-        start_address = u_regval;
+	start_address = u_regval;
       else
-        start_address = u_regval - imm_off32;
+	start_address = u_regval - imm_off32;
 
       if (bit (arm_insn_r->arm_insn, 21))
-        {
-          record_buf[0] = reg_rn;
-          arm_insn_r->reg_rec_count = 1;
-        }
+	{
+	  record_buf[0] = reg_rn;
+	  arm_insn_r->reg_rec_count = 1;
+	}
 
       while (memory_count > 0)
-        {
-          if (!single_reg)
-            {
-              record_buf_mem[memory_index] = start_address;
-              record_buf_mem[memory_index + 1] = 4;
-              start_address = start_address + 4;
-              memory_index = memory_index + 2;
-            }
-          else
-            {
-              record_buf_mem[memory_index] = start_address;
-              record_buf_mem[memory_index + 1] = 4;
-              record_buf_mem[memory_index + 2] = start_address + 4;
-              record_buf_mem[memory_index + 3] = 4;
-              start_address = start_address + 8;
-              memory_index = memory_index + 4;
-            }
-          memory_count--;
-        }
+	{
+	  if (single_reg)
+	    {
+	      record_buf_mem[memory_index] = 4;
+	      record_buf_mem[memory_index + 1] = start_address;
+	      start_address = start_address + 4;
+	      memory_index = memory_index + 2;
+	    }
+	  else
+	    {
+	      record_buf_mem[memory_index] = 4;
+	      record_buf_mem[memory_index + 1] = start_address;
+	      record_buf_mem[memory_index + 2] = 4;
+	      record_buf_mem[memory_index + 3] = start_address + 4;
+	      start_address = start_address + 8;
+	      memory_index = memory_index + 4;
+	    }
+	  memory_count--;
+	}
       arm_insn_r->mem_rec_count = (memory_index >> 1);
     }
   /* Handle VLDM instructions.  */
   else if (op_vldm_vstm == 0x09 || op_vldm_vstm == 0x0b
-          || op_vldm_vstm == 0x13)
+	   || op_vldm_vstm == 0x13)
     {
       uint32_t reg_count, reg_vd;
       uint32_t reg_index = 0;
+      uint32_t bit_d = bit (arm_insn_r->arm_insn, 22);
 
       reg_vd = bits (arm_insn_r->arm_insn, 12, 15);
       reg_count = bits (arm_insn_r->arm_insn, 0, 7);
 
-      if (single_reg)
-        reg_vd = reg_vd | (bit (arm_insn_r->arm_insn, 22) << 4);
-      else
-        reg_vd = (reg_vd << 1) | bit (arm_insn_r->arm_insn, 22);
+      /* REG_VD is the first D register number.  If the instruction
+	 loads memory to S registers (SINGLE_REG is TRUE), the register
+	 number is (REG_VD << 1 | bit D), so the corresponding D
+	 register number is (REG_VD << 1 | bit D) / 2 = REG_VD.  */
+      if (!single_reg)
+	reg_vd = reg_vd | (bit_d << 4);
 
-      if (bit (arm_insn_r->arm_insn, 21))
-        record_buf[reg_index++] = bits (arm_insn_r->arm_insn, 16, 19);
+      if (bit (arm_insn_r->arm_insn, 21) /* write back */)
+	record_buf[reg_index++] = bits (arm_insn_r->arm_insn, 16, 19);
 
-      while (reg_count > 0)
-        {
-          if (single_reg)
-              record_buf[reg_index++] = num_regs + reg_vd + reg_count - 1;
-          else
-              record_buf[reg_index++] = ARM_D0_REGNUM + reg_vd + reg_count - 1;
+      /* If the instruction loads memory to D register, REG_COUNT should
+	 be divided by 2, according to the ARM Architecture Reference
+	 Manual.  If the instruction loads memory to S register, divide by
+	 2 as well because two S registers are mapped to D register.  */
+      reg_count  = reg_count / 2;
+      if (single_reg && bit_d)
+	{
+	  /* Increase the register count if S register list starts from
+	     an odd number (bit d is one).  */
+	  reg_count++;
+	}
 
-          reg_count--;
-        }
+      while (reg_count > 0)
+	{
+	  record_buf[reg_index++] = ARM_D0_REGNUM + reg_vd + reg_count - 1;
+	  reg_count--;
+	}
       arm_insn_r->reg_rec_count = reg_index;
     }
   /* VSTR Vector store register.  */
   else if ((opcode & 0x13) == 0x10)
     {
-      uint32_t start_address, reg_rn, imm_off32, imm_off8, memory_count;
+      uint32_t start_address, reg_rn, imm_off32, imm_off8;
       uint32_t memory_index = 0;
 
       reg_rn = bits (arm_insn_r->arm_insn, 16, 19);
       regcache_raw_read_unsigned (reg_cache, reg_rn, &u_regval);
       imm_off8 = bits (arm_insn_r->arm_insn, 0, 7);
-      imm_off32 = imm_off8 << 24;
-      memory_count = imm_off8;
+      imm_off32 = imm_off8 << 2;
 
       if (bit (arm_insn_r->arm_insn, 23))
-        start_address = u_regval + imm_off32;
+	start_address = u_regval + imm_off32;
       else
-        start_address = u_regval - imm_off32;
+	start_address = u_regval - imm_off32;
 
       if (single_reg)
-        {
-          record_buf_mem[memory_index] = start_address;
-          record_buf_mem[memory_index + 1] = 4;
-          arm_insn_r->mem_rec_count = 1;
-        }
+	{
+	  record_buf_mem[memory_index] = 4;
+	  record_buf_mem[memory_index + 1] = start_address;
+	  arm_insn_r->mem_rec_count = 1;
+	}
       else
-        {
-          record_buf_mem[memory_index] = start_address;
-          record_buf_mem[memory_index + 1] = 4;
-          record_buf_mem[memory_index + 2] = start_address + 4;
-          record_buf_mem[memory_index + 3] = 4;
-          arm_insn_r->mem_rec_count = 2;
-        }
+	{
+	  record_buf_mem[memory_index] = 4;
+	  record_buf_mem[memory_index + 1] = start_address;
+	  record_buf_mem[memory_index + 2] = 4;
+	  record_buf_mem[memory_index + 3] = start_address + 4;
+	  arm_insn_r->mem_rec_count = 2;
+	}
     }
   /* VLDR Vector load register.  */
   else if ((opcode & 0x13) == 0x11)
@@ -12210,15 +11332,16 @@ arm_record_exreg_ld_st_insn (insn_decode
       uint32_t reg_vd = bits (arm_insn_r->arm_insn, 12, 15);
 
       if (!single_reg)
-        {
-          reg_vd = reg_vd | (bit (arm_insn_r->arm_insn, 22) << 4);
-          record_buf[0] = ARM_D0_REGNUM + reg_vd;
-        }
+	{
+	  reg_vd = reg_vd | (bit (arm_insn_r->arm_insn, 22) << 4);
+	  record_buf[0] = ARM_D0_REGNUM + reg_vd;
+	}
       else
-        {
-          reg_vd = (reg_vd << 1) | bit (arm_insn_r->arm_insn, 22);
-          record_buf[0] = num_regs + reg_vd;
-        }
+	{
+	  reg_vd = (reg_vd << 1) | bit (arm_insn_r->arm_insn, 22);
+	  /* Record register D rather than pseudo register S.  */
+	  record_buf[0] = ARM_D0_REGNUM + reg_vd / 2;
+	}
       arm_insn_r->reg_rec_count = 1;
     }
 
@@ -12443,7 +11566,7 @@ arm_record_vfp_data_proc_insn (insn_deco
 static int
 arm_record_asimd_vfp_coproc (insn_decode_record *arm_insn_r)
 {
-  uint32_t op, op1, op1_sbit, op1_ebit, coproc;
+  uint32_t op1, op1_ebit, coproc;
 
   coproc = bits (arm_insn_r->arm_insn, 8, 11);
   op1 = bits (arm_insn_r->arm_insn, 20, 25);
@@ -12500,7 +11623,6 @@ arm_record_coproc_data_proc (insn_decode
   uint32_t op, op1_sbit, op1_ebit, coproc;
   struct gdbarch_tdep *tdep = gdbarch_tdep (arm_insn_r->gdbarch);
   struct regcache *reg_cache = arm_insn_r->regcache;
-  ULONGEST u_regval = 0;
 
   arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 24, 27);
   coproc = bits (arm_insn_r->arm_insn, 8, 11);
@@ -12672,10 +11794,10 @@ thumb_record_ld_st_reg_offset (insn_deco
         }
       else
         {
-          /* Format 8; special data processing insns.  */
-          reg_src1 = bits (thumb_insn_r->arm_insn, 0, 2);
-          record_buf[0] = ARM_PS_REGNUM;
-          record_buf[1] = reg_src1;
+	  /* Format 8; special data processing insns.  */
+	  record_buf[0] = ARM_PS_REGNUM;
+	  record_buf[1] = (bit (thumb_insn_r->arm_insn, 7) << 3
+			   | bits (thumb_insn_r->arm_insn, 0, 2));
           thumb_insn_r->reg_rec_count = 2;
         }
     }
@@ -12804,7 +11926,7 @@ thumb_record_misc (insn_decode_record *t
 
   uint32_t opcode = 0, opcode1 = 0, opcode2 = 0;
   uint32_t register_bits = 0, register_count = 0;
-  uint32_t register_list[8] = {0}, index = 0, start_address = 0;
+  uint32_t index = 0, start_address = 0;
   uint32_t record_buf[24], record_buf_mem[48];
   uint32_t reg_src1;
 
@@ -12906,7 +12028,7 @@ thumb_record_ldm_stm_swi (insn_decode_re
   uint32_t ret = 0; /* function return value: -1:record failure ;  0:success  */
   uint32_t reg_src1 = 0;
   uint32_t opcode1 = 0, opcode2 = 0, register_bits = 0, register_count = 0;
-  uint32_t register_list[8] = {0}, index = 0, start_address = 0;
+  uint32_t index = 0, start_address = 0;
   uint32_t record_buf[24], record_buf_mem[48];
 
   ULONGEST u_regval = 0;
@@ -13118,7 +12240,6 @@ thumb2_record_ld_st_dual_ex_tbb (insn_de
   uint32_t address, offset_addr;
   uint32_t record_buf[8], record_buf_mem[8];
   uint32_t op1, op2, op3;
-  LONGEST s_word;
 
   ULONGEST u_regval[2];
 
@@ -13433,7 +12554,6 @@ thumb2_record_ld_mem_hints (insn_decode_
 static int
 thumb2_record_ld_word (insn_decode_record *thumb2_insn_r)
 {
-  uint32_t opcode1 = 0, opcode2 = 0;
   uint32_t record_buf[8];
 
   record_buf[0] = bits (thumb2_insn_r->arm_insn, 12, 15);
@@ -13453,7 +12573,6 @@ thumb2_record_lmul_lmla_div (insn_decode
 {
   uint32_t opcode1 = 0, opcode2 = 0;
   uint32_t record_buf[8];
-  uint32_t reg_src1 = 0;
 
   opcode1 = bits (thumb2_insn_r->arm_insn, 20, 22);
   opcode2 = bits (thumb2_insn_r->arm_insn, 4, 7);
@@ -13502,7 +12621,7 @@ thumb2_record_asimd_struct_ld_st (insn_d
   struct regcache *reg_cache = thumb2_insn_r->regcache;
   uint32_t l_bit, a_bit, b_bits;
   uint32_t record_buf[128], record_buf_mem[128];
-  uint32_t reg_rn, reg_vd, address, f_esize, f_elem;
+  uint32_t reg_rn, reg_vd, address, f_elem;
   uint32_t index_r = 0, index_e = 0, bf_regs = 0, index_m = 0, loop_t = 0;
   uint8_t f_ebytes;
 
@@ -13513,7 +12632,6 @@ thumb2_record_asimd_struct_ld_st (insn_d
   reg_vd = bits (thumb2_insn_r->arm_insn, 12, 15);
   reg_vd = (bit (thumb2_insn_r->arm_insn, 22) << 4) | reg_vd;
   f_ebytes = (1 << bits (thumb2_insn_r->arm_insn, 6, 7));
-  f_esize = 8 * f_ebytes;
   f_elem = 8 / f_ebytes;
 
   if (!l_bit)
@@ -13812,10 +12930,11 @@ typedef int (*sti_arm_hdl_fp_t) (insn_de
 
 static int
 decode_insn (insn_decode_record *arm_record, record_type_t record_type,
-                uint32_t insn_size)
+	     uint32_t insn_size)
 {
 
-  /* (Starting from numerical 0); bits 25, 26, 27 decodes type of arm instruction.  */
+  /* (Starting from numerical 0); bits 25, 26, 27 decodes type of arm
+     instruction.  */
   static const sti_arm_hdl_fp_t arm_handle_insn[8] =
   {
     arm_record_data_proc_misc_ld_str,   /* 000.  */
@@ -13828,7 +12947,8 @@ decode_insn (insn_decode_record *arm_rec
     arm_record_coproc_data_proc         /* 111.  */
   };
 
-  /* (Starting from numerical 0); bits 13,14,15 decodes type of thumb instruction.  */
+  /* (Starting from numerical 0); bits 13,14,15 decodes type of thumb
+     instruction.  */
   static const sti_arm_hdl_fp_t thumb_handle_insn[8] =
   { \
     thumb_record_shift_add_sub,        /* 000.  */
@@ -13847,24 +12967,32 @@ decode_insn (insn_decode_record *arm_rec
   if (extract_arm_insn (arm_record, insn_size))
     {
       if (record_debug)
-        {
-          printf_unfiltered (_("Process record: error reading memory at "
-                              "addr %s len = %d.\n"),
-          paddress (arm_record->gdbarch, arm_record->this_addr), insn_size);        
-        }
+	{
+	  printf_unfiltered (_("Process record: error reading memory at "
+			       "addr %s len = %d.\n"),
+			     paddress (arm_record->gdbarch,
+				       arm_record->this_addr), insn_size);
+	}
       return -1;
     }
   else if (ARM_RECORD == record_type)
     {
       arm_record->cond = bits (arm_record->arm_insn, 28, 31);
       insn_id = bits (arm_record->arm_insn, 25, 27);
-      ret = arm_record_extension_space (arm_record);
-      /* If this insn has fallen into extension space 
-         then we need not decode it anymore.  */
-      if (ret != -1 && !INSN_RECORDED(arm_record))
-        {
-          ret = arm_handle_insn[insn_id] (arm_record);
-        }
+
+      if (arm_record->cond == 0xf)
+	ret = arm_record_extension_space (arm_record);
+      else
+	{
+	  /* If this insn has fallen into extension space
+	     then we need not decode it anymore.  */
+	  ret = arm_handle_insn[insn_id] (arm_record);
+	}
+      if (ret != ARM_RECORD_SUCCESS)
+	{
+	  arm_record_unsupported_insn (arm_record);
+	  ret = -1;
+	}
     }
   else if (THUMB_RECORD == record_type)
     {
@@ -13872,6 +13000,11 @@ decode_insn (insn_decode_record *arm_rec
       arm_record->cond = -1;
       insn_id = bits (arm_record->arm_insn, 13, 15);
       ret = thumb_handle_insn[insn_id] (arm_record);
+      if (ret != ARM_RECORD_SUCCESS)
+	{
+	  arm_record_unsupported_insn (arm_record);
+	  ret = -1;
+	}
     }
   else if (THUMB2_RECORD == record_type)
     {
@@ -13880,15 +13013,15 @@ decode_insn (insn_decode_record *arm_rec
 
       /* Swap first half of 32bit thumb instruction with second half.  */
       arm_record->arm_insn
-        = (arm_record->arm_insn >> 16) | (arm_record->arm_insn << 16);
+	= (arm_record->arm_insn >> 16) | (arm_record->arm_insn << 16);
 
-      insn_id = thumb2_record_decode_insn_handler (arm_record);
+      ret = thumb2_record_decode_insn_handler (arm_record);
 
-      if (insn_id != ARM_RECORD_SUCCESS)
-        {
-          arm_record_unsupported_insn (arm_record);
-          ret = -1;
-        }
+      if (ret != ARM_RECORD_SUCCESS)
+	{
+	  arm_record_unsupported_insn (arm_record);
+	  ret = -1;
+	}
     }
   else
     {
@@ -13910,16 +13043,15 @@ deallocate_reg_mem (insn_decode_record *
 }
 
 
-/* Parse the current instruction and record the values of the registers and    
+/* Parse the current instruction and record the values of the registers and
    memory that will be changed in current instruction to record_arch_list".
    Return -1 if something is wrong.  */
 
 int
-arm_process_record (struct gdbarch *gdbarch, struct regcache *regcache, 
-                        CORE_ADDR insn_addr)
+arm_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
+		    CORE_ADDR insn_addr)
 {
 
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   uint32_t no_of_rec = 0;
   uint32_t ret = 0;  /* return value: -1:record failure ;  0:success  */
   ULONGEST t_bit = 0, insn_id = 0;
@@ -13937,19 +13069,19 @@ arm_process_record (struct gdbarch *gdba
   if (record_debug > 1)
     {
       fprintf_unfiltered (gdb_stdlog, "Process record: arm_process_record "
-                                      "addr = %s\n",
+			  "addr = %s\n",
       paddress (gdbarch, arm_record.this_addr));
     }
 
   if (extract_arm_insn (&arm_record, 2))
     {
       if (record_debug)
-        {
-          printf_unfiltered (_("Process record: error reading memory at "
-                             "addr %s len = %d.\n"),
-                             paddress (arm_record.gdbarch, 
-                             arm_record.this_addr), 2);
-        }
+	{
+	  printf_unfiltered (_("Process record: error reading memory at "
+			       "addr %s len = %d.\n"),
+			     paddress (arm_record.gdbarch,
+				       arm_record.this_addr), 2);
+	}
       return -1;
     }
 
@@ -13969,15 +13101,15 @@ arm_process_record (struct gdbarch *gdba
       insn_id = bits (arm_record.arm_insn, 11, 15);
       /* is it thumb2 insn?  */
       if ((0x1D == insn_id) || (0x1E == insn_id) || (0x1F == insn_id))
-        {
-          ret = decode_insn (&arm_record, THUMB2_RECORD, 
-                             THUMB2_INSN_SIZE_BYTES);
-        }
+	{
+	  ret = decode_insn (&arm_record, THUMB2_RECORD,
+			     THUMB2_INSN_SIZE_BYTES);
+	}
       else
-        {
-          /* We are decoding thumb insn.  */
-          ret = decode_insn (&arm_record, THUMB_RECORD, THUMB_INSN_SIZE_BYTES);
-        }
+	{
+	  /* We are decoding thumb insn.  */
+	  ret = decode_insn (&arm_record, THUMB_RECORD, THUMB_INSN_SIZE_BYTES);
+	}
     }
 
   if (0 == ret)
@@ -13985,28 +13117,28 @@ arm_process_record (struct gdbarch *gdba
       /* Record registers.  */
       record_full_arch_list_add_reg (arm_record.regcache, ARM_PC_REGNUM);
       if (arm_record.arm_regs)
-        {
-          for (no_of_rec = 0; no_of_rec < arm_record.reg_rec_count; no_of_rec++)
-            {
-              if (record_full_arch_list_add_reg
+	{
+	  for (no_of_rec = 0; no_of_rec < arm_record.reg_rec_count; no_of_rec++)
+	    {
+	      if (record_full_arch_list_add_reg
 		  (arm_record.regcache , arm_record.arm_regs[no_of_rec]))
-              ret = -1;
-            }
-        }
+		ret = -1;
+	    }
+	}
       /* Record memories.  */
       if (arm_record.arm_mems)
-        {
-          for (no_of_rec = 0; no_of_rec < arm_record.mem_rec_count; no_of_rec++)
-            {
-              if (record_full_arch_list_add_mem
-                  ((CORE_ADDR)arm_record.arm_mems[no_of_rec].addr,
+	{
+	  for (no_of_rec = 0; no_of_rec < arm_record.mem_rec_count; no_of_rec++)
+	    {
+	      if (record_full_arch_list_add_mem
+		  ((CORE_ADDR)arm_record.arm_mems[no_of_rec].addr,
 		   arm_record.arm_mems[no_of_rec].len))
-                ret = -1;
-            }
-        }
+		ret = -1;
+	    }
+	}
 
       if (record_full_arch_list_add_end ())
-        ret = -1;
+	ret = -1;
     }
 
 
@@ -14014,4 +13146,3 @@ arm_process_record (struct gdbarch *gdba
 
   return ret;
 }
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-tdep.h ./gdb/arm-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common target dependent code for GDB on ARM systems.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,48 +23,11 @@
 struct gdbarch;
 struct regset;
 struct address_space;
+struct get_next_pcs;
+struct arm_get_next_pcs;
+struct gdb_get_next_pcs;
 
-/* Register numbers of various important registers.  */
-
-enum gdb_regnum {
-  ARM_A1_REGNUM = 0,		/* first integer-like argument */
-  ARM_A4_REGNUM = 3,		/* last integer-like argument */
-  ARM_AP_REGNUM = 11,
-  ARM_IP_REGNUM = 12,
-  ARM_SP_REGNUM = 13,		/* Contains address of top of stack */
-  ARM_LR_REGNUM = 14,		/* address to return to from a function call */
-  ARM_PC_REGNUM = 15,		/* Contains program counter */
-  ARM_F0_REGNUM = 16,		/* first floating point register */
-  ARM_F3_REGNUM = 19,		/* last floating point argument register */
-  ARM_F7_REGNUM = 23, 		/* last floating point register */
-  ARM_FPS_REGNUM = 24,		/* floating point status register */
-  ARM_PS_REGNUM = 25,		/* Contains processor status */
-  ARM_WR0_REGNUM,		/* WMMX data registers.  */
-  ARM_WR15_REGNUM = ARM_WR0_REGNUM + 15,
-  ARM_WC0_REGNUM,		/* WMMX control registers.  */
-  ARM_WCSSF_REGNUM = ARM_WC0_REGNUM + 2,
-  ARM_WCASF_REGNUM = ARM_WC0_REGNUM + 3,
-  ARM_WC7_REGNUM = ARM_WC0_REGNUM + 7,
-  ARM_WCGR0_REGNUM,		/* WMMX general purpose registers.  */
-  ARM_WCGR3_REGNUM = ARM_WCGR0_REGNUM + 3,
-  ARM_WCGR7_REGNUM = ARM_WCGR0_REGNUM + 7,
-  ARM_D0_REGNUM,		/* VFP double-precision registers.  */
-  ARM_D31_REGNUM = ARM_D0_REGNUM + 31,
-  ARM_FPSCR_REGNUM,
-
-  ARM_NUM_REGS,
-
-  /* Other useful registers.  */
-  ARM_FP_REGNUM = 11,		/* Frame register in ARM code, if used.  */
-  THUMB_FP_REGNUM = 7,		/* Frame register in Thumb code, if used.  */
-  ARM_NUM_ARG_REGS = 4, 
-  ARM_LAST_ARG_REGNUM = ARM_A4_REGNUM,
-  ARM_NUM_FP_ARG_REGS = 4,
-  ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM
-};
-
-/* Size of integer registers.  */
-#define INT_REGISTER_SIZE		4
+#include "arch/arm.h"
 
 /* Say how long FP registers are.  Used for documentation purposes and
    code readability in this header.  IEEE extended doubles are 80
@@ -87,32 +50,6 @@ enum gdb_regnum {
 #define NUM_GREGS	16	/* Number of general purpose registers.  */
 
 
-/* Instruction condition field values.  */
-#define INST_EQ		0x0
-#define INST_NE		0x1
-#define INST_CS		0x2
-#define INST_CC		0x3
-#define INST_MI		0x4
-#define INST_PL		0x5
-#define INST_VS		0x6
-#define INST_VC		0x7
-#define INST_HI		0x8
-#define INST_LS		0x9
-#define INST_GE		0xa
-#define INST_LT		0xb
-#define INST_GT		0xc
-#define INST_LE		0xd
-#define INST_AL		0xe
-#define INST_NV		0xf
-
-#define FLAG_N		0x80000000
-#define FLAG_Z		0x40000000
-#define FLAG_C		0x20000000
-#define FLAG_V		0x10000000
-
-#define CPSR_T		0x20
-
-#define XPSR_T		0x01000000
 
 /* Type of floating-point code in use by inferior.  There are really 3 models
    that are traditionally supported (plus the endianness issue), but gcc can
@@ -201,10 +138,6 @@ struct gdbarch_tdep
   struct type *neon_double_type;
   struct type *neon_quad_type;
 
-  /* Return the expected next PC if FRAME is stopped at a syscall
-     instruction.  */
-  CORE_ADDR (*syscall_next_pc) (struct frame_info *frame);
-
    /* syscall record.  */
   int (*arm_syscall_record) (struct regcache *regcache, unsigned long svc_number);
 };
@@ -316,16 +249,20 @@ extern void
 		       ULONGEST val, enum pc_write_style write_pc);
 
 CORE_ADDR arm_skip_stub (struct frame_info *, CORE_ADDR);
-CORE_ADDR arm_get_next_pc (struct frame_info *, CORE_ADDR);
-void arm_insert_single_step_breakpoint (struct gdbarch *,
-					struct address_space *, CORE_ADDR);
-int arm_deal_with_atomic_sequence (struct frame_info *);
-int arm_software_single_step (struct frame_info *);
+
+ULONGEST arm_get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
+							int len,
+							int byte_order);
+
+CORE_ADDR arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
+					     CORE_ADDR val);
+
+int arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self);
+
+VEC (CORE_ADDR) *arm_software_single_step (struct regcache *);
+int arm_is_thumb (struct regcache *regcache);
 int arm_frame_is_thumb (struct frame_info *frame);
 
-extern struct displaced_step_closure *
-  arm_displaced_step_copy_insn (struct gdbarch *, CORE_ADDR, CORE_ADDR,
-				struct regcache *);
 extern void arm_displaced_step_fixup (struct gdbarch *,
 				      struct displaced_step_closure *,
 				      CORE_ADDR, CORE_ADDR, struct regcache *);
@@ -339,7 +276,7 @@ extern int arm_pc_is_thumb (struct gdbar
 
 extern int arm_process_record (struct gdbarch *gdbarch, 
                                struct regcache *regcache, CORE_ADDR addr);
-/* Functions exported from armbsd-tdep.h.  */
+/* Functions exported from arm-bsd-tdep.h.  */
 
 /* Return the appropriate register set for the core section identified
    by SECT_NAME and SECT_SIZE.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-wince-tdep.c ./gdb/arm-wince-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/arm-wince-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/arm-wince-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for Windows CE running on ARM processors,
    for GDB.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "target.h"
 #include "frame.h"
 
+#include "arch/arm.h"
 #include "arm-tdep.h"
 #include "windows-tdep.h"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auto-load.c ./gdb/auto-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auto-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/auto-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB routines for supporting auto-loaded scripts.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -408,9 +408,9 @@ filename_is_in_pattern (const char *file
 {
   char *filename_copy, *pattern_copy;
 
-  filename_copy = alloca (strlen (filename) + 1);
+  filename_copy = (char *) alloca (strlen (filename) + 1);
   strcpy (filename_copy, filename);
-  pattern_copy = alloca (strlen (pattern) + 1);
+  pattern_copy = (char *) alloca (strlen (pattern) + 1);
   strcpy (pattern_copy, pattern);
 
   return filename_is_in_pattern_1 (filename_copy, pattern_copy);
@@ -580,7 +580,7 @@ static const struct program_space_data *
 static void
 auto_load_pspace_data_cleanup (struct program_space *pspace, void *arg)
 {
-  struct auto_load_pspace_info *info = arg;
+  struct auto_load_pspace_info *info = (struct auto_load_pspace_info *) arg;
 
   if (info->loaded_script_files)
     htab_delete (info->loaded_script_files);
@@ -597,7 +597,8 @@ get_auto_load_pspace_data (struct progra
 {
   struct auto_load_pspace_info *info;
 
-  info = program_space_data (pspace, auto_load_pspace_data);
+  info = ((struct auto_load_pspace_info *)
+	  program_space_data (pspace, auto_load_pspace_data));
   if (info == NULL)
     {
       info = XCNEW (struct auto_load_pspace_info);
@@ -612,7 +613,7 @@ get_auto_load_pspace_data (struct progra
 static hashval_t
 hash_loaded_script_entry (const void *data)
 {
-  const struct loaded_script *e = data;
+  const struct loaded_script *e = (const struct loaded_script *) data;
 
   return htab_hash_string (e->name) ^ htab_hash_pointer (e->language);
 }
@@ -622,8 +623,8 @@ hash_loaded_script_entry (const void *da
 static int
 eq_loaded_script_entry (const void *a, const void *b)
 {
-  const struct loaded_script *ea = a;
-  const struct loaded_script *eb = b;
+  const struct loaded_script *ea = (const struct loaded_script *) a;
+  const struct loaded_script *eb = (const struct loaded_script *) b;
 
   return strcmp (ea->name, eb->name) == 0 && ea->language == eb->language;
 }
@@ -693,9 +694,10 @@ maybe_add_script_file (struct auto_load_
       char *p;
 
       /* Allocate all space in one chunk so it's easier to free.  */
-      *slot = xmalloc (sizeof (**slot)
-		       + strlen (name) + 1
-		       + (full_path != NULL ? (strlen (full_path) + 1) : 0));
+      *slot = ((struct loaded_script *)
+	       xmalloc (sizeof (**slot)
+			+ strlen (name) + 1
+			+ (full_path != NULL ? (strlen (full_path) + 1) : 0)));
       p = ((char*) *slot) + sizeof (**slot);
       strcpy (p, name);
       (*slot)->name = p;
@@ -740,7 +742,8 @@ maybe_add_script_text (struct auto_load_
       char *p;
 
       /* Allocate all space in one chunk so it's easier to free.  */
-      *slot = xmalloc (sizeof (**slot) + strlen (name) + 1);
+      *slot = ((struct loaded_script *)
+	       xmalloc (sizeof (**slot) + strlen (name) + 1));
       p = ((char*) *slot) + sizeof (**slot);
       strcpy (p, name);
       (*slot)->name = p;
@@ -760,7 +763,8 @@ clear_section_scripts (void)
   struct program_space *pspace = current_program_space;
   struct auto_load_pspace_info *info;
 
-  info = program_space_data (pspace, auto_load_pspace_data);
+  info = ((struct auto_load_pspace_info *)
+	  program_space_data (pspace, auto_load_pspace_data));
   if (info != NULL && info->loaded_script_files != NULL)
     {
       htab_delete (info->loaded_script_files);
@@ -787,7 +791,7 @@ auto_load_objfile_script_1 (struct objfi
   const char *suffix = ext_lang_auto_load_suffix (language);
 
   len = strlen (realname);
-  filename = xmalloc (len + strlen (suffix) + 1);
+  filename = (char *) xmalloc (len + strlen (suffix) + 1);
   memcpy (filename, realname, len);
   strcpy (filename + len, suffix);
 
@@ -818,7 +822,7 @@ auto_load_objfile_script_1 (struct objfi
 
       for (ix = 0; VEC_iterate (char_ptr, vec, ix, dir); ++ix)
 	{
-	  debugfile = xmalloc (strlen (dir) + strlen (filename) + 1);
+	  debugfile = (char *) xmalloc (strlen (dir) + strlen (filename) + 1);
 	  strcpy (debugfile, dir);
 
 	  /* FILENAME is absolute, so we don't need a "/" here.  */
@@ -1008,7 +1012,7 @@ execute_script_contents (struct auto_loa
 {
   objfile_script_executor_func *executor;
   const char *newline, *script_text;
-  char *name, *end;
+  char *name;
   int is_safe, in_hash_table;
   struct cleanup *cleanups;
 
@@ -1247,8 +1251,9 @@ struct collect_matching_scripts_data
 static int
 collect_matching_scripts (void **slot, void *info)
 {
-  struct loaded_script *script = *slot;
-  struct collect_matching_scripts_data *data = info;
+  struct loaded_script *script = (struct loaded_script *) *slot;
+  struct collect_matching_scripts_data *data
+    = (struct collect_matching_scripts_data *) info;
 
   if (script->language == data->language && re_exec (script->name))
     VEC_safe_push (loaded_script_ptr, *data->scripts_p, script);
@@ -1266,17 +1271,17 @@ print_script (struct loaded_script *scri
 
   chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-  ui_out_field_string (uiout, "loaded", script->loaded ? "Yes" : "No");
-  ui_out_field_string (uiout, "script", script->name);
-  ui_out_text (uiout, "\n");
+  uiout->field_string ("loaded", script->loaded ? "Yes" : "No");
+  uiout->field_string ("script", script->name);
+  uiout->text ("\n");
 
   /* If the name isn't the full path, print it too.  */
   if (script->full_path != NULL
       && strcmp (script->name, script->full_path) != 0)
     {
-      ui_out_text (uiout, "\tfull name: ");
-      ui_out_field_string (uiout, "full_path", script->full_path);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\tfull name: ");
+      uiout->field_string ("full_path", script->full_path);
+      uiout->text ("\n");
     }
 
   do_cleanups (chain);
@@ -1304,7 +1309,6 @@ char auto_load_info_scripts_pattern_nl[]
 static void
 print_scripts (VEC (loaded_script_ptr) *scripts)
 {
-  struct ui_out *uiout = current_uiout;
   int i;
   loaded_script_ptr script;
 
@@ -1378,15 +1382,15 @@ auto_load_info_scripts (char *pattern, i
   /* Table header shifted right by preceding "gdb-scripts:  " would not match
      its columns.  */
   if (nr_scripts > 0 && pattern == auto_load_info_scripts_pattern_nl)
-    ui_out_text (uiout, "\n");
+    uiout->text ("\n");
 
   /* Note: This creates a cleanup to output the table end marker.  */
   make_cleanup_ui_out_table_begin_end (uiout, 2, nr_scripts,
 				       "AutoLoadedScriptsTable");
 
-  ui_out_table_header (uiout, 7, ui_left, "loaded", "Loaded");
-  ui_out_table_header (uiout, 70, ui_left, "script", "Script");
-  ui_out_table_body (uiout);
+  uiout->table_header (7, ui_left, "loaded", "Loaded");
+  uiout->table_header (70, ui_left, "script", "Script");
+  uiout->table_body ();
 
   print_scripts (script_files);
   print_scripts (script_texts);
@@ -1397,10 +1401,9 @@ auto_load_info_scripts (char *pattern, i
   if (nr_scripts == 0)
     {
       if (pattern && *pattern)
-	ui_out_message (uiout, 0, "No auto-load scripts matching %s.\n",
-			pattern);
+	uiout->message ("No auto-load scripts matching %s.\n", pattern);
       else
-	ui_out_message (uiout, 0, "No auto-load scripts.\n");
+	uiout->message ("No auto-load scripts.\n");
     }
 }
 
@@ -1567,8 +1570,8 @@ info_auto_load_cmd (char *args, int from
       gdb_assert (!list->prefixlist);
       gdb_assert (list->type == not_set_cmd);
 
-      ui_out_field_string (uiout, "name", list->name);
-      ui_out_text (uiout, ":  ");
+      uiout->field_string ("name", list->name);
+      uiout->text (":  ");
       cmd_func (list, auto_load_info_scripts_pattern_nl, from_tty);
 
       /* Close the tuple.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auto-load.h ./gdb/auto-load.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auto-load.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/auto-load.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB routines for supporting auto-loaded scripts.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auxv.c ./gdb/auxv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auxv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/auxv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Auxiliary vector support for GDB, the GNU debugger.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -90,7 +90,7 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
   struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
   size_t ptr_size = TYPE_LENGTH (ptr_type);
   size_t auxv_pair_size = 2 * ptr_size;
-  gdb_byte *ptr_buf = alloca (ptr_size);
+  gdb_byte *ptr_buf = (gdb_byte *) alloca (ptr_size);
   LONGEST retval;
   size_t block;
 
@@ -320,7 +320,7 @@ auxv_inferior_data_cleanup (struct infer
 {
   struct auxv_info *info;
 
-  info = inferior_data (inf, auxv_inferior_data);
+  info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
   if (info != NULL)
     {
       xfree (info->data);
@@ -355,7 +355,7 @@ get_auxv_inferior_data (struct target_op
   struct auxv_info *info;
   struct inferior *inf = current_inferior ();
 
-  info = inferior_data (inf, auxv_inferior_data);
+  info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
   if (info == NULL)
     {
       info = XCNEW (struct auxv_info);
@@ -407,10 +407,126 @@ target_auxv_search (struct target_ops *o
 }
 
 
+/* Print the description of a single AUXV entry on the specified file.  */
+
+void
+fprint_auxv_entry (struct ui_file *file, const char *name,
+		   const char *description, enum auxv_format format,
+		   CORE_ADDR type, CORE_ADDR val)
+{
+  fprintf_filtered (file, ("%-4s %-20s %-30s "),
+		    plongest (type), name, description);
+  switch (format)
+    {
+    case AUXV_FORMAT_DEC:
+      fprintf_filtered (file, ("%s\n"), plongest (val));
+      break;
+    case AUXV_FORMAT_HEX:
+      fprintf_filtered (file, ("%s\n"), paddress (target_gdbarch (), val));
+      break;
+    case AUXV_FORMAT_STR:
+      {
+	struct value_print_options opts;
+
+	get_user_print_options (&opts);
+	if (opts.addressprint)
+	  fprintf_filtered (file, ("%s "), paddress (target_gdbarch (), val));
+	val_print_string (builtin_type (target_gdbarch ())->builtin_char,
+			  NULL, val, -1, file, &opts);
+	fprintf_filtered (file, ("\n"));
+      }
+      break;
+    }
+}
+
+/* The default implementation of gdbarch_print_auxv_entry.  */
+
+void
+default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
+			  CORE_ADDR type, CORE_ADDR val)
+{
+  const char *name = "???";
+  const char *description = "";
+  enum auxv_format format = AUXV_FORMAT_HEX;
+
+  switch (type)
+    {
+#define TAG(tag, text, kind) \
+      case tag: name = #tag; description = text; format = kind; break
+      TAG (AT_NULL, _("End of vector"), AUXV_FORMAT_HEX);
+      TAG (AT_IGNORE, _("Entry should be ignored"), AUXV_FORMAT_HEX);
+      TAG (AT_EXECFD, _("File descriptor of program"), AUXV_FORMAT_DEC);
+      TAG (AT_PHDR, _("Program headers for program"), AUXV_FORMAT_HEX);
+      TAG (AT_PHENT, _("Size of program header entry"), AUXV_FORMAT_DEC);
+      TAG (AT_PHNUM, _("Number of program headers"), AUXV_FORMAT_DEC);
+      TAG (AT_PAGESZ, _("System page size"), AUXV_FORMAT_DEC);
+      TAG (AT_BASE, _("Base address of interpreter"), AUXV_FORMAT_HEX);
+      TAG (AT_FLAGS, _("Flags"), AUXV_FORMAT_HEX);
+      TAG (AT_ENTRY, _("Entry point of program"), AUXV_FORMAT_HEX);
+      TAG (AT_NOTELF, _("Program is not ELF"), AUXV_FORMAT_DEC);
+      TAG (AT_UID, _("Real user ID"), AUXV_FORMAT_DEC);
+      TAG (AT_EUID, _("Effective user ID"), AUXV_FORMAT_DEC);
+      TAG (AT_GID, _("Real group ID"), AUXV_FORMAT_DEC);
+      TAG (AT_EGID, _("Effective group ID"), AUXV_FORMAT_DEC);
+      TAG (AT_CLKTCK, _("Frequency of times()"), AUXV_FORMAT_DEC);
+      TAG (AT_PLATFORM, _("String identifying platform"), AUXV_FORMAT_STR);
+      TAG (AT_HWCAP, _("Machine-dependent CPU capability hints"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_FPUCW, _("Used FPU control word"), AUXV_FORMAT_DEC);
+      TAG (AT_DCACHEBSIZE, _("Data cache block size"), AUXV_FORMAT_DEC);
+      TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), AUXV_FORMAT_DEC);
+      TAG (AT_UCACHEBSIZE, _("Unified cache block size"), AUXV_FORMAT_DEC);
+      TAG (AT_IGNOREPPC, _("Entry should be ignored"), AUXV_FORMAT_DEC);
+      TAG (AT_BASE_PLATFORM, _("String identifying base platform"),
+	   AUXV_FORMAT_STR);
+      TAG (AT_RANDOM, _("Address of 16 random bytes"), AUXV_FORMAT_HEX);
+      TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
+      TAG (AT_EXECFN, _("File name of executable"), AUXV_FORMAT_STR);
+      TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), AUXV_FORMAT_DEC);
+      TAG (AT_SYSINFO, _("Special system info/entry points"), AUXV_FORMAT_HEX);
+      TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_L1I_CACHESHAPE, _("L1 Instruction cache information"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_L1D_CACHESHAPE, _("L1 Data cache information"), AUXV_FORMAT_HEX);
+      TAG (AT_L2_CACHESHAPE, _("L2 cache information"), AUXV_FORMAT_HEX);
+      TAG (AT_L3_CACHESHAPE, _("L3 cache information"), AUXV_FORMAT_HEX);
+      TAG (AT_SUN_UID, _("Effective user ID"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_RUID, _("Real user ID"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_GID, _("Effective group ID"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_RGID, _("Real group ID"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_LDELF, _("Dynamic linker's ELF header"), AUXV_FORMAT_HEX);
+      TAG (AT_SUN_LDSHDR, _("Dynamic linker's section headers"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_SUN_LDNAME, _("String giving name of dynamic linker"),
+	   AUXV_FORMAT_STR);
+      TAG (AT_SUN_LPAGESZ, _("Large pagesize"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_PLATFORM, _("Platform name string"), AUXV_FORMAT_STR);
+      TAG (AT_SUN_HWCAP, _("Machine-dependent CPU capability hints"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_SUN_IFLUSH, _("Should flush icache?"), AUXV_FORMAT_DEC);
+      TAG (AT_SUN_CPU, _("CPU name string"), AUXV_FORMAT_STR);
+      TAG (AT_SUN_EMUL_ENTRY, _("COFF entry point address"), AUXV_FORMAT_HEX);
+      TAG (AT_SUN_EMUL_EXECFD, _("COFF executable file descriptor"),
+	   AUXV_FORMAT_DEC);
+      TAG (AT_SUN_EXECNAME,
+	   _("Canonicalized file name given to execve"), AUXV_FORMAT_STR);
+      TAG (AT_SUN_MMU, _("String for name of MMU module"), AUXV_FORMAT_STR);
+      TAG (AT_SUN_LDDATA, _("Dynamic linker's data segment address"),
+	   AUXV_FORMAT_HEX);
+      TAG (AT_SUN_AUXFLAGS,
+	   _("AF_SUN_ flags passed from the kernel"), AUXV_FORMAT_HEX);
+    }
+
+  fprint_auxv_entry (file, name, description, format, type, val);
+}
+
 /* Print the contents of the target's AUXV on the specified file.  */
+
 int
 fprint_target_auxv (struct ui_file *file, struct target_ops *ops)
 {
+  struct gdbarch *gdbarch = target_gdbarch ();
   CORE_ADDR type, val;
   gdb_byte *data;
   gdb_byte *ptr;
@@ -426,93 +542,7 @@ fprint_target_auxv (struct ui_file *file
 
   while (target_auxv_parse (ops, &ptr, data + info->length, &type, &val) > 0)
     {
-      const char *name = "???";
-      const char *description = "";
-      enum { dec, hex, str } flavor = hex;
-
-      switch (type)
-	{
-#define TAG(tag, text, kind) \
-	case tag: name = #tag; description = text; flavor = kind; break
-	  TAG (AT_NULL, _("End of vector"), hex);
-	  TAG (AT_IGNORE, _("Entry should be ignored"), hex);
-	  TAG (AT_EXECFD, _("File descriptor of program"), dec);
-	  TAG (AT_PHDR, _("Program headers for program"), hex);
-	  TAG (AT_PHENT, _("Size of program header entry"), dec);
-	  TAG (AT_PHNUM, _("Number of program headers"), dec);
-	  TAG (AT_PAGESZ, _("System page size"), dec);
-	  TAG (AT_BASE, _("Base address of interpreter"), hex);
-	  TAG (AT_FLAGS, _("Flags"), hex);
-	  TAG (AT_ENTRY, _("Entry point of program"), hex);
-	  TAG (AT_NOTELF, _("Program is not ELF"), dec);
-	  TAG (AT_UID, _("Real user ID"), dec);
-	  TAG (AT_EUID, _("Effective user ID"), dec);
-	  TAG (AT_GID, _("Real group ID"), dec);
-	  TAG (AT_EGID, _("Effective group ID"), dec);
-	  TAG (AT_CLKTCK, _("Frequency of times()"), dec);
-	  TAG (AT_PLATFORM, _("String identifying platform"), str);
-	  TAG (AT_HWCAP, _("Machine-dependent CPU capability hints"), hex);
-	  TAG (AT_FPUCW, _("Used FPU control word"), dec);
-	  TAG (AT_DCACHEBSIZE, _("Data cache block size"), dec);
-	  TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
-	  TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
-	  TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
-	  TAG (AT_BASE_PLATFORM, _("String identifying base platform"), str);
-	  TAG (AT_RANDOM, _("Address of 16 random bytes"), hex);
-	  TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), hex);
-	  TAG (AT_EXECFN, _("File name of executable"), str);
-	  TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
-	  TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
-	  TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
-	  TAG (AT_L1I_CACHESHAPE, _("L1 Instruction cache information"), hex);
-	  TAG (AT_L1D_CACHESHAPE, _("L1 Data cache information"), hex);
-	  TAG (AT_L2_CACHESHAPE, _("L2 cache information"), hex);
-	  TAG (AT_L3_CACHESHAPE, _("L3 cache information"), hex);
-	  TAG (AT_SUN_UID, _("Effective user ID"), dec);
-	  TAG (AT_SUN_RUID, _("Real user ID"), dec);
-	  TAG (AT_SUN_GID, _("Effective group ID"), dec);
-	  TAG (AT_SUN_RGID, _("Real group ID"), dec);
-	  TAG (AT_SUN_LDELF, _("Dynamic linker's ELF header"), hex);
-	  TAG (AT_SUN_LDSHDR, _("Dynamic linker's section headers"), hex);
-	  TAG (AT_SUN_LDNAME, _("String giving name of dynamic linker"), str);
-	  TAG (AT_SUN_LPAGESZ, _("Large pagesize"), dec);
-	  TAG (AT_SUN_PLATFORM, _("Platform name string"), str);
-	  TAG (AT_SUN_HWCAP, _("Machine-dependent CPU capability hints"), hex);
-	  TAG (AT_SUN_IFLUSH, _("Should flush icache?"), dec);
-	  TAG (AT_SUN_CPU, _("CPU name string"), str);
-	  TAG (AT_SUN_EMUL_ENTRY, _("COFF entry point address"), hex);
-	  TAG (AT_SUN_EMUL_EXECFD, _("COFF executable file descriptor"), dec);
-	  TAG (AT_SUN_EXECNAME,
-	       _("Canonicalized file name given to execve"), str);
-	  TAG (AT_SUN_MMU, _("String for name of MMU module"), str);
-	  TAG (AT_SUN_LDDATA, _("Dynamic linker's data segment address"), hex);
-	  TAG (AT_SUN_AUXFLAGS,
-	       _("AF_SUN_ flags passed from the kernel"), hex);
-	}
-
-      fprintf_filtered (file, "%-4s %-20s %-30s ",
-			plongest (type), name, description);
-      switch (flavor)
-	{
-	case dec:
-	  fprintf_filtered (file, "%s\n", plongest (val));
-	  break;
-	case hex:
-	  fprintf_filtered (file, "%s\n", paddress (target_gdbarch (), val));
-	  break;
-	case str:
-	  {
-	    struct value_print_options opts;
-
-	    get_user_print_options (&opts);
-	    if (opts.addressprint)
-	      fprintf_filtered (file, "%s ", paddress (target_gdbarch (), val));
-	    val_print_string (builtin_type (target_gdbarch ())->builtin_char,
-			      NULL, val, -1, file, &opts);
-	    fprintf_filtered (file, "\n");
-	  }
-	  break;
-	}
+      gdbarch_print_auxv_entry (gdbarch, file, type, val);
       ++ents;
       if (type == AT_NULL)
 	break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auxv.h ./gdb/auxv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/auxv.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/auxv.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Auxiliary vector support for GDB, the GNU debugger.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,6 +46,20 @@ extern int target_auxv_parse (struct tar
 extern int target_auxv_search (struct target_ops *ops,
 			       CORE_ADDR match, CORE_ADDR *valp);
 
+/* Print a description of a single AUXV entry on the specified file.  */
+enum auxv_format { AUXV_FORMAT_DEC, AUXV_FORMAT_HEX, AUXV_FORMAT_STR };
+
+extern void fprint_auxv_entry (struct ui_file *file, const char *name,
+			       const char *description,
+			       enum auxv_format format, CORE_ADDR type,
+			       CORE_ADDR val);
+
+/* The default implementation of gdbarch_print_auxv_entry.  */
+
+extern void default_print_auxv_entry (struct gdbarch *gdbarch,
+				      struct ui_file *file, CORE_ADDR type,
+				      CORE_ADDR val);
+
 /* Print the contents of the target's AUXV on the specified file.  */
 extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/avr-tdep.c ./gdb/avr-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/avr-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/avr-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Atmel AVR, for GDB.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,6 +36,7 @@
 #include "regcache.h"
 #include "dis-asm.h"
 #include "objfiles.h"
+#include <algorithm>
 
 /* AVR Background:
 
@@ -111,6 +112,7 @@ enum
 
   AVR_ARG1_REGNUM = 24,         /* Single byte argument */
   AVR_ARGN_REGNUM = 25,         /* Multi byte argments */
+  AVR_LAST_ARG_REGNUM = 8,      /* Last argument register */
 
   AVR_RET1_REGNUM = 24,         /* Single byte return value */
   AVR_RETN_REGNUM = 25,         /* Multi byte return value */
@@ -881,7 +883,7 @@ avr_skip_prologue (struct gdbarch *gdbar
 
   post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr);
   if (post_prologue_pc != 0)
-    return max (pc, post_prologue_pc);
+    return std::max (pc, post_prologue_pc);
 
   {
     CORE_ADDR prologue_end = pc;
@@ -911,14 +913,9 @@ avr_skip_prologue (struct gdbarch *gdbar
    it as a NOP.  Thus, it should be ok.  Since the avr is currently a remote
    only target, this shouldn't be a problem (I hope).  TRoth/2003-05-14  */
 
-static const unsigned char *
-avr_breakpoint_from_pc (struct gdbarch *gdbarch,
-			CORE_ADDR *pcptr, int *lenptr)
-{
-    static const unsigned char avr_break_insn [] = { 0x98, 0x95 };
-    *lenptr = sizeof (avr_break_insn);
-    return avr_break_insn;
-}
+constexpr gdb_byte avr_break_insn [] = { 0x98, 0x95 };
+
+typedef BP_MANIPULATION (avr_break_insn) avr_breakpoint;
 
 /* Determine, for architecture GDBARCH, how a return value of TYPE
    should be returned.  If it is supposed to be returned in registers,
@@ -987,7 +984,7 @@ avr_frame_unwind_cache (struct frame_inf
   int i;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct avr_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct avr_unwind_cache);
   *this_prologue_cache = info;
@@ -1106,8 +1103,6 @@ static struct value *
 avr_frame_prev_register (struct frame_info *this_frame,
 			 void **this_prologue_cache, int regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct avr_unwind_cache *info
     = avr_frame_unwind_cache (this_frame, this_prologue_cache);
 
@@ -1198,15 +1193,15 @@ struct stack_item
 {
   int len;
   struct stack_item *prev;
-  void *data;
+  gdb_byte *data;
 };
 
 static struct stack_item *
 push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len)
 {
   struct stack_item *si;
-  si = xmalloc (sizeof (struct stack_item));
-  si->data = xmalloc (len);
+  si = XNEW (struct stack_item);
+  si->data = (gdb_byte *) xmalloc (len);
   si->len = len;
   si->prev = prev;
   memcpy (si->data, contents, len);
@@ -1269,7 +1264,6 @@ avr_push_dummy_call (struct gdbarch *gdb
                      int nargs, struct value **args, CORE_ADDR sp,
                      int struct_return, CORE_ADDR struct_addr)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int i;
   gdb_byte buf[3];
   int call_length = gdbarch_tdep (gdbarch)->call_length;
@@ -1298,23 +1292,24 @@ avr_push_dummy_call (struct gdbarch *gdb
       const bfd_byte *contents = value_contents (arg);
       int len = TYPE_LENGTH (type);
 
-      /* Calculate the potential last register needed.  */
-      last_regnum = regnum - (len + (len & 1));
+      /* Calculate the potential last register needed.
+         E.g. For length 2, registers regnum and regnum-1 (say 25 and 24)
+         shall be used. So, last needed register will be regnum-1(24).  */
+      last_regnum = regnum - (len + (len & 1)) + 1;
 
       /* If there are registers available, use them.  Once we start putting
          stuff on the stack, all subsequent args go on stack.  */
-      if ((si == NULL) && (last_regnum >= 8))
+      if ((si == NULL) && (last_regnum >= AVR_LAST_ARG_REGNUM))
         {
-          ULONGEST val;
-
           /* Skip a register for odd length args.  */
           if (len & 1)
             regnum--;
 
-          val = extract_unsigned_integer (contents, len, byte_order);
+          /* Write MSB of argument into register and subsequent bytes in
+             decreasing register numbers.  */
           for (j = 0; j < len; j++)
             regcache_cooked_write_unsigned
-              (regcache, regnum--, val >> (8 * (len - j - 1)));
+              (regcache, regnum--, contents[len - j - 1]);
         }
       /* No registers available, push the args onto the stack.  */
       else
@@ -1364,9 +1359,6 @@ avr_dwarf_reg_to_regnum (struct gdbarch 
     return reg;
   if (reg == 32)
     return AVR_SP_REGNUM;
-
-  warning (_("Unmapped DWARF Register #%d encountered."), reg);
-
   return -1;
 }
 
@@ -1470,9 +1462,8 @@ avr_gdbarch_init (struct gdbarch_info in
      be defined.  */
   tdep->void_type = arch_type (gdbarch, TYPE_CODE_VOID, 1, "void");
   tdep->func_void_type = make_function_type (tdep->void_type, NULL);
-  tdep->pc_type = arch_type (gdbarch, TYPE_CODE_PTR, 4, NULL);
-  TYPE_TARGET_TYPE (tdep->pc_type) = tdep->func_void_type;
-  TYPE_UNSIGNED (tdep->pc_type) = 1;
+  tdep->pc_type = arch_pointer_type (gdbarch, 4 * TARGET_CHAR_BIT, NULL,
+				     tdep->func_void_type);
 
   set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
   set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -1518,7 +1509,8 @@ avr_gdbarch_init (struct gdbarch_info in
   set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, avr_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, avr_breakpoint::bp_from_kind);
 
   frame_unwind_append_unwinder (gdbarch, &avr_frame_unwind);
   frame_base_set_default (gdbarch, &avr_frame_base);
@@ -1635,7 +1627,6 @@ _initialize_avr_tdep (void)
   /* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr
      io_registers' to signify it is not available on other platforms.  */
 
-  add_cmd ("io_registers", class_info, avr_io_reg_read_command,
-	   _("query remote avr target for io space register values"),
-	   &infolist);
+  add_info ("io_registers", avr_io_reg_read_command,
+	    _("query remote avr target for io space register values"));
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax_cxx_compile_stdcxx.m4 ./gdb/ax_cxx_compile_stdcxx.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax_cxx_compile_stdcxx.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ax_cxx_compile_stdcxx.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,567 @@
+# Copyright (c) 2016-2017 Free Software Foundation, Inc.
+#
+# Originally based on the AX_CXX_COMPILE_STDCXX macro found at the url
+# below.
+#
+# Local GDB customizations:
+#
+# - AC_SUBST CXX_DIALECT instead of changing CXX/CXXCPP.
+#
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+#   Check for baseline language coverage in the compiler for the specified
+#   version of the C++ standard.  If necessary, add switches to CXX and
+#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
+#   or '14' (for the C++14 standard).
+#
+#   The second argument, if specified, indicates whether you insist on an
+#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+#   -std=c++11).  If neither is specified, you get whatever works, with
+#   preference for an extended mode.
+#
+#   The third argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline support for the specified C++ standard is
+#   required and that the macro should error out if no mode with that
+#   support is found.  If specified 'optional', then configuration proceeds
+#   regardless, after defining HAVE_CXX${VERSION} if and only if a
+#   supporting mode is found.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+#   Copyright (c) 2015 Paul Norman <penorman@mac.com>
+#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 4
+
+dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl  (serial version number 13).
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+  m4_if([$1], [11], [],
+        [$1], [14], [],
+        [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
+        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$2], [], [],
+        [$2], [ext], [],
+        [$2], [noext], [],
+        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+  AC_LANG_PUSH([C++])dnl
+  CXX_DIALECT=""
+  ac_success=no
+  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
+  ax_cv_cxx_compile_cxx$1,
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+    [ax_cv_cxx_compile_cxx$1=yes],
+    [ax_cv_cxx_compile_cxx$1=no])])
+  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
+    ac_success=yes
+  fi
+
+  m4_if([$2], [noext], [], [dnl
+  if test x$ac_success = xno; then
+    for switch in -std=gnu++$1 -std=gnu++0x; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+                     $cachevar,
+        [ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXX="$ac_save_CXX"])
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+
+  m4_if([$2], [ext], [], [dnl
+  if test x$ac_success = xno; then
+    dnl HP's aCC needs +std=c++11 according to:
+    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+    dnl Cray's crayCC needs "-h std=c++11"
+    for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+                     $cachevar,
+        [ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXX="$ac_save_CXX"])
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+  AC_LANG_POP([C++])
+  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+    if test x$ac_success = xno; then
+      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX$1=0
+    AC_MSG_NOTICE([No compiler with C++$1 support was found])
+  else
+    HAVE_CXX$1=1
+    AC_DEFINE(HAVE_CXX$1,1,
+              [define if the compiler supports basic C++$1 syntax])
+  fi
+  AC_SUBST(HAVE_CXX$1)
+  AC_SUBST(CXX_DIALECT)
+])
+
+
+dnl  Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl  Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+
+dnl  Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+]])
+
+
+dnl  Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_seperators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+#endif  // __cplusplus >= 201402L
+
+]])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-gdb.c ./gdb/ax-gdb.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-gdb.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ax-gdb.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB-specific functions for operating on agent expressions.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,6 +40,7 @@
 #include "arch-utils.h"
 #include "cli/cli-utils.h"
 #include "linespec.h"
+#include "location.h"
 #include "objfiles.h"
 
 #include "valprint.h"
@@ -322,7 +323,7 @@ gen_trace_static_fields (struct gdbarch 
   int i, nbases = TYPE_N_BASECLASSES (type);
   struct axs_value value;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
     {
@@ -393,26 +394,25 @@ gen_traced_pop (struct gdbarch *gdbarch,
 
       case axs_lvalue_memory:
 	{
-	  if (string_trace)
-	    ax_simple (ax, aop_dup);
-
 	  /* Initialize the TYPE_LENGTH if it is a typedef.  */
 	  check_typedef (value->type);
 
-	  /* There's no point in trying to use a trace_quick bytecode
-	     here, since "trace_quick SIZE pop" is three bytes, whereas
-	     "const8 SIZE trace" is also three bytes, does the same
-	     thing, and the simplest code which generates that will also
-	     work correctly for objects with large sizes.  */
-	  ax_const_l (ax, TYPE_LENGTH (value->type));
-	  ax_simple (ax, aop_trace);
-
 	  if (string_trace)
 	    {
-	      ax_simple (ax, aop_ref32);
+	      gen_fetch (ax, value->type);
 	      ax_const_l (ax, ax->trace_string);
 	      ax_simple (ax, aop_tracenz);
 	    }
+	  else
+	    {
+	      /* There's no point in trying to use a trace_quick bytecode
+	         here, since "trace_quick SIZE pop" is three bytes, whereas
+	         "const8 SIZE trace" is also three bytes, does the same
+	         thing, and the simplest code which generates that will also
+	         work correctly for objects with large sizes.  */
+	      ax_const_l (ax, TYPE_LENGTH (value->type));
+	      ax_simple (ax, aop_trace);
+	    }
 	}
 	break;
 
@@ -885,7 +885,7 @@ gen_conversion (struct agent_expr *ax, s
   /* If we're converting to a narrower type, then we need to clear out
      the upper bits.  */
   if (TYPE_LENGTH (to) < TYPE_LENGTH (from))
-    gen_extend (ax, from);
+    gen_extend (ax, to);
 
   /* If the two values have equal width, but different signednesses,
      then we need to extend.  */
@@ -910,7 +910,7 @@ gen_conversion (struct agent_expr *ax, s
 static int
 is_nontrivial_conversion (struct type *from, struct type *to)
 {
-  struct agent_expr *ax = new_agent_expr (NULL, 0);
+  agent_expr_up ax (new agent_expr (NULL, 0));
   int nontrivial;
 
   /* Actually generate the code, and see if anything came out.  At the
@@ -919,9 +919,8 @@ is_nontrivial_conversion (struct type *f
      floating point and the like, it may not be.  Doing things this
      way allows this function to be independent of the logic in
      gen_conversion.  */
-  gen_conversion (ax, from, to);
+  gen_conversion (ax.get (), from, to);
   nontrivial = ax->len > 0;
-  free_agent_expr (ax);
   return nontrivial;
 }
 
@@ -1438,7 +1437,7 @@ gen_struct_ref_recursive (struct express
   int i, rslt;
   int nbases = TYPE_N_BASECLASSES (type);
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
     {
@@ -1556,7 +1555,7 @@ gen_static_field (struct gdbarch *gdbarc
   else
     {
       const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
-      struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);
+      struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0).symbol;
 
       if (sym)
 	{
@@ -1647,20 +1646,20 @@ gen_maybe_namespace_elt (struct expressi
 			 const struct type *curtype, char *name)
 {
   const char *namespace_name = TYPE_TAG_NAME (curtype);
-  struct symbol *sym;
+  struct block_symbol sym;
 
   sym = cp_lookup_symbol_namespace (namespace_name, name,
 				    block_for_pc (ax->scope),
 				    VAR_DOMAIN);
 
-  if (sym == NULL)
+  if (sym.symbol == NULL)
     return 0;
 
-  gen_var_ref (exp->gdbarch, ax, value, sym);
+  gen_var_ref (exp->gdbarch, ax, value, sym.symbol);
 
   if (value->optimized_out)
     error (_("`%s' has been optimized out, cannot use"),
-	   SYMBOL_PRINT_NAME (sym));
+	   SYMBOL_PRINT_NAME (sym.symbol));
 
   return 1;
 }
@@ -2194,7 +2193,7 @@ gen_expr (struct expression *exp, union 
 	func = block_linkage_function (b);
 	lang = language_def (SYMBOL_LANGUAGE (func));
 
-	sym = lookup_language_this (lang, b);
+	sym = lookup_language_this (lang, b).symbol;
 	if (!sym)
 	  error (_("no `%s' found"), lang->la_name_of_this);
 
@@ -2391,38 +2390,28 @@ gen_expr_binop_rest (struct expression *
    variable's name, and no parsed expression; for instance, when the
    name comes from a list of local variables of a function.  */
 
-struct agent_expr *
+agent_expr_up
 gen_trace_for_var (CORE_ADDR scope, struct gdbarch *gdbarch,
 		   struct symbol *var, int trace_string)
 {
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (gdbarch, scope);
+  agent_expr_up ax (new agent_expr (gdbarch, scope));
   struct axs_value value;
 
-  old_chain = make_cleanup_free_agent_expr (ax);
-
   ax->tracing = 1;
   ax->trace_string = trace_string;
-  gen_var_ref (gdbarch, ax, &value, var);
+  gen_var_ref (gdbarch, ax.get (), &value, var);
 
   /* If there is no actual variable to trace, flag it by returning
      an empty agent expression.  */
   if (value.optimized_out)
-    {
-      do_cleanups (old_chain);
-      return NULL;
-    }
+    return agent_expr_up ();
 
   /* Make sure we record the final object, and get rid of it.  */
-  gen_traced_pop (gdbarch, ax, &value);
+  gen_traced_pop (gdbarch, ax.get (), &value);
 
   /* Oh, and terminate.  */
-  ax_simple (ax, aop_end);
+  ax_simple (ax.get (), aop_end);
 
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
   return ax;
 }
 
@@ -2433,33 +2422,27 @@ gen_trace_for_var (CORE_ADDR scope, stru
    record the value of all memory touched by the expression.  The
    caller can then use the ax_reqs function to discover which
    registers it relies upon.  */
-struct agent_expr *
+
+agent_expr_up
 gen_trace_for_expr (CORE_ADDR scope, struct expression *expr,
 		    int trace_string)
 {
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (expr->gdbarch, scope);
+  agent_expr_up ax (new agent_expr (expr->gdbarch, scope));
   union exp_element *pc;
   struct axs_value value;
 
-  old_chain = make_cleanup_free_agent_expr (ax);
-
   pc = expr->elts;
   ax->tracing = 1;
   ax->trace_string = trace_string;
   value.optimized_out = 0;
-  gen_expr (expr, &pc, ax, &value);
+  gen_expr (expr, &pc, ax.get (), &value);
 
   /* Make sure we record the final object, and get rid of it.  */
-  gen_traced_pop (expr->gdbarch, ax, &value);
+  gen_traced_pop (expr->gdbarch, ax.get (), &value);
 
   /* Oh, and terminate.  */
-  ax_simple (ax, aop_end);
+  ax_simple (ax.get (), aop_end);
 
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
   return ax;
 }
 
@@ -2470,58 +2453,44 @@ gen_trace_for_expr (CORE_ADDR scope, str
    gen_trace_for_expr does.  The generated bytecode sequence leaves
    the result of expression evaluation on the top of the stack.  */
 
-struct agent_expr *
+agent_expr_up
 gen_eval_for_expr (CORE_ADDR scope, struct expression *expr)
 {
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (expr->gdbarch, scope);
+  agent_expr_up ax (new agent_expr (expr->gdbarch, scope));
   union exp_element *pc;
   struct axs_value value;
 
-  old_chain = make_cleanup_free_agent_expr (ax);
-
   pc = expr->elts;
   ax->tracing = 0;
   value.optimized_out = 0;
-  gen_expr (expr, &pc, ax, &value);
+  gen_expr (expr, &pc, ax.get (), &value);
 
-  require_rvalue (ax, &value);
+  require_rvalue (ax.get (), &value);
 
   /* Oh, and terminate.  */
-  ax_simple (ax, aop_end);
+  ax_simple (ax.get (), aop_end);
 
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
   return ax;
 }
 
-struct agent_expr *
+agent_expr_up
 gen_trace_for_return_address (CORE_ADDR scope, struct gdbarch *gdbarch,
 			      int trace_string)
 {
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (gdbarch, scope);
+  agent_expr_up ax (new agent_expr (gdbarch, scope));
   struct axs_value value;
 
-  old_chain = make_cleanup_free_agent_expr (ax);
-
   ax->tracing = 1;
   ax->trace_string = trace_string;
 
-  gdbarch_gen_return_address (gdbarch, ax, &value, scope);
+  gdbarch_gen_return_address (gdbarch, ax.get (), &value, scope);
 
   /* Make sure we record the final object, and get rid of it.  */
-  gen_traced_pop (gdbarch, ax, &value);
+  gen_traced_pop (gdbarch, ax.get (), &value);
 
   /* Oh, and terminate.  */
-  ax_simple (ax, aop_end);
+  ax_simple (ax.get (), aop_end);
 
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
   return ax;
 }
 
@@ -2529,21 +2498,18 @@ gen_trace_for_return_address (CORE_ADDR 
    evaluate the arguments and pass everything to a special
    bytecode.  */
 
-struct agent_expr *
+agent_expr_up
 gen_printf (CORE_ADDR scope, struct gdbarch *gdbarch,
 	    CORE_ADDR function, LONGEST channel,
 	    const char *format, int fmtlen,
 	    struct format_piece *frags,
 	    int nargs, struct expression **exprs)
 {
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (gdbarch, scope);
+  agent_expr_up ax (new agent_expr (gdbarch, scope));
   union exp_element *pc;
   struct axs_value value;
   int tem;
 
-  old_chain = make_cleanup_free_agent_expr (ax);
-
   /* We're computing values, not doing side effects.  */
   ax->tracing = 0;
 
@@ -2553,26 +2519,21 @@ gen_printf (CORE_ADDR scope, struct gdba
     {
       pc = exprs[tem]->elts;
       value.optimized_out = 0;
-      gen_expr (exprs[tem], &pc, ax, &value);
-      require_rvalue (ax, &value);
+      gen_expr (exprs[tem], &pc, ax.get (), &value);
+      require_rvalue (ax.get (), &value);
     }
 
   /* Push function and channel.  */
-  ax_const_l (ax, channel);
-  ax_const_l (ax, function);
+  ax_const_l (ax.get (), channel);
+  ax_const_l (ax.get (), function);
 
   /* Issue the printf bytecode proper.  */
-  ax_simple (ax, aop_printf);
-  ax_simple (ax, nargs);
-  ax_string (ax, format, fmtlen);
+  ax_simple (ax.get (), aop_printf);
+  ax_raw_byte (ax.get (), nargs);
+  ax_string (ax.get (), format, fmtlen);
 
   /* And terminate.  */
-  ax_simple (ax, aop_end);
-
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
+  ax_simple (ax.get (), aop_end);
 
   return ax;
 }
@@ -2580,9 +2541,6 @@ gen_printf (CORE_ADDR scope, struct gdba
 static void
 agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc)
 {
-  struct cleanup *old_chain = 0;
-  struct expression *expr;
-  struct agent_expr *agent;
   const char *arg;
   int trace_string = 0;
 
@@ -2592,34 +2550,33 @@ agent_eval_command_one (const char *exp,
         exp = decode_agent_options (exp, &trace_string);
     }
 
+  agent_expr_up agent;
+
   arg = exp;
   if (!eval && strcmp (arg, "$_ret") == 0)
     {
       agent = gen_trace_for_return_address (pc, get_current_arch (),
 					    trace_string);
-      old_chain = make_cleanup_free_agent_expr (agent);
     }
   else
     {
-      expr = parse_exp_1 (&arg, pc, block_for_pc (pc), 0);
-      old_chain = make_cleanup (free_current_contents, &expr);
+      expression_up expr = parse_exp_1 (&arg, pc, block_for_pc (pc), 0);
+
       if (eval)
 	{
 	  gdb_assert (trace_string == 0);
-	  agent = gen_eval_for_expr (pc, expr);
+	  agent = gen_eval_for_expr (pc, expr.get ());
 	}
       else
-	agent = gen_trace_for_expr (pc, expr, trace_string);
-      make_cleanup_free_agent_expr (agent);
+	agent = gen_trace_for_expr (pc, expr.get (), trace_string);
     }
 
-  ax_reqs (agent);
-  ax_print (gdb_stdout, agent);
+  ax_reqs (agent.get ());
+  ax_print (gdb_stdout, agent.get ());
 
   /* It would be nice to call ax_reqs here to gather some general info
      about the expression, and then print out the result.  */
 
-  do_cleanups (old_chain);
   dont_repeat ();
 }
 
@@ -2642,13 +2599,16 @@ agent_command_1 (char *exp, int eval)
       int ix;
       struct linespec_sals *iter;
       struct cleanup *old_chain;
+      struct event_location *location;
 
       exp = skip_spaces (exp);
       init_linespec_result (&canonical);
-      decode_line_full (&exp, DECODE_LINE_FUNFIRSTLINE,
+      location = new_linespec_location (&exp);
+      old_chain = make_cleanup_delete_event_location (location);
+      decode_line_full (location, DECODE_LINE_FUNFIRSTLINE, NULL,
 			(struct symtab *) NULL, 0, &canonical,
 			NULL, NULL);
-      old_chain = make_cleanup_destroy_linespec_result (&canonical);
+      make_cleanup_destroy_linespec_result (&canonical);
       exp = skip_spaces (exp);
       if (exp[0] == ',')
         {
@@ -2693,9 +2653,7 @@ static void
 maint_agent_printf_command (char *exp, int from_tty)
 {
   struct cleanup *old_chain = 0;
-  struct expression *expr;
   struct expression *argvec[100];
-  struct agent_expr *agent;
   struct frame_info *fi = get_current_frame ();	/* need current scope */
   const char *cmdrest;
   const char *format_start, *format_end;
@@ -2745,8 +2703,8 @@ maint_agent_printf_command (char *exp, i
       const char *cmd1;
 
       cmd1 = cmdrest;
-      expr = parse_exp_1 (&cmd1, 0, (struct block *) 0, 1);
-      argvec[nargs] = expr;
+      expression_up expr = parse_exp_1 (&cmd1, 0, (struct block *) 0, 1);
+      argvec[nargs] = expr.release ();
       ++nargs;
       cmdrest = cmd1;
       if (*cmdrest == ',')
@@ -2755,12 +2713,12 @@ maint_agent_printf_command (char *exp, i
     }
 
 
-  agent = gen_printf (get_frame_pc (fi), get_current_arch (), 0, 0,
-		      format_start, format_end - format_start,
-		      fpieces, nargs, argvec);
-  make_cleanup_free_agent_expr (agent);
-  ax_reqs (agent);
-  ax_print (gdb_stdout, agent);
+  agent_expr_up agent = gen_printf (get_frame_pc (fi), get_current_arch (),
+				    0, 0,
+				    format_start, format_end - format_start,
+				    fpieces, nargs, argvec);
+  ax_reqs (agent.get ());
+  ax_print (gdb_stdout, agent.get ());
 
   /* It would be nice to call ax_reqs here to gather some general info
      about the expression, and then print out the result.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-gdb.h ./gdb/ax-gdb.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-gdb.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ax-gdb.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB-specific functions for operating on agent expressions
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,8 @@
 #ifndef AX_GDB_H
 #define AX_GDB_H
 
+#include "ax.h"  /* For agent_expr_up.  */
+
 struct expression;
 union exp_element;
 
@@ -101,17 +103,17 @@ struct axs_value
    record the value of all memory touched by the expression, and leave
    no values on the stack.  The caller can then use the ax_reqs
    function to discover which registers the expression uses.  */
-extern struct agent_expr *gen_trace_for_expr (CORE_ADDR, struct expression *,
-					      int);
+extern agent_expr_up gen_trace_for_expr (CORE_ADDR, struct expression *,
+					 int);
 
-extern struct agent_expr *gen_trace_for_var (CORE_ADDR, struct gdbarch *,
-					     struct symbol *, int);
+extern agent_expr_up gen_trace_for_var (CORE_ADDR, struct gdbarch *,
+					struct symbol *, int);
 
-extern struct agent_expr *gen_trace_for_return_address (CORE_ADDR,
-							struct gdbarch *,
-							int);
+extern agent_expr_up gen_trace_for_return_address (CORE_ADDR,
+						   struct gdbarch *,
+						   int);
 
-extern struct agent_expr *gen_eval_for_expr (CORE_ADDR, struct expression *);
+extern agent_expr_up gen_eval_for_expr (CORE_ADDR, struct expression *);
 
 extern void gen_expr (struct expression *exp, union exp_element **pc,
 		      struct agent_expr *ax, struct axs_value *value);
@@ -119,9 +121,9 @@ extern void gen_expr (struct expression 
 extern void require_rvalue (struct agent_expr *ax, struct axs_value *value);
 
 struct format_piece;
-extern struct agent_expr *gen_printf (CORE_ADDR, struct gdbarch *,
-				      CORE_ADDR, LONGEST, const char *, int,
-				      struct format_piece *,
-				      int, struct expression **);
+extern agent_expr_up gen_printf (CORE_ADDR, struct gdbarch *,
+				 CORE_ADDR, LONGEST, const char *, int,
+				 struct format_piece *,
+				 int, struct expression **);
 
 #endif /* AX_GDB_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-general.c ./gdb/ax-general.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax-general.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ax-general.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,53 +37,30 @@ static void generic_ext (struct agent_ex
 
 /* Functions for building expressions.  */
 
-/* Allocate a new, empty agent expression.  */
-struct agent_expr *
-new_agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope)
+agent_expr::agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope)
 {
-  struct agent_expr *x = xmalloc (sizeof (*x));
-
-  x->len = 0;
-  x->size = 1;			/* Change this to a larger value once
+  this->len = 0;
+  this->size = 1;		/* Change this to a larger value once
 				   reallocation code is tested.  */
-  x->buf = xmalloc (x->size);
+  this->buf = (unsigned char *) xmalloc (this->size);
 
-  x->gdbarch = gdbarch;
-  x->scope = scope;
+  this->gdbarch = gdbarch;
+  this->scope = scope;
 
   /* Bit vector for registers used.  */
-  x->reg_mask_len = 1;
-  x->reg_mask = xmalloc (x->reg_mask_len * sizeof (x->reg_mask[0]));
-  memset (x->reg_mask, 0, x->reg_mask_len * sizeof (x->reg_mask[0]));
-
-  x->tracing = 0;
-  x->trace_string = 0;
+  this->reg_mask_len = 1;
+  this->reg_mask = XCNEWVEC (unsigned char, this->reg_mask_len);
 
-  return x;
+  this->tracing = 0;
+  this->trace_string = 0;
 }
 
-/* Free a agent expression.  */
-void
-free_agent_expr (struct agent_expr *x)
+agent_expr::~agent_expr ()
 {
-  xfree (x->buf);
-  xfree (x->reg_mask);
-  xfree (x);
+  xfree (this->buf);
+  xfree (this->reg_mask);
 }
 
-static void
-do_free_agent_expr_cleanup (void *x)
-{
-  free_agent_expr (x);
-}
-
-struct cleanup *
-make_cleanup_free_agent_expr (struct agent_expr *x)
-{
-  return make_cleanup (do_free_agent_expr_cleanup, x);
-}
-
-
 /* Make sure that X has room for at least N more bytes.  This doesn't
    affect the length, just the allocated size.  */
 static void
@@ -94,7 +71,7 @@ grow_expr (struct agent_expr *x, int n)
       x->size *= 2;
       if (x->size < x->len + n)
 	x->size = x->len + n + 10;
-      x->buf = xrealloc (x->buf, x->size);
+      x->buf = (unsigned char *) xrealloc (x->buf, x->size);
     }
 }
 
@@ -134,13 +111,20 @@ read_const (struct agent_expr *x, int o,
   return accum;
 }
 
+/* See ax.h.  */
+
+void
+ax_raw_byte (struct agent_expr *x, gdb_byte byte)
+{
+  grow_expr (x, 1);
+  x->buf[x->len++] = byte;
+}
 
 /* Append a simple operator OP to EXPR.  */
 void
 ax_simple (struct agent_expr *x, enum agent_op op)
 {
-  grow_expr (x, 1);
-  x->buf[x->len++] = op;
+  ax_raw_byte (x, op);
 }
 
 /* Append a pick operator to EXPR.  DEPTH is the stack item to pick,
@@ -302,6 +286,9 @@ ax_reg (struct agent_expr *x, int reg)
     }
   else
     {
+      /* Get the remote register number.  */
+      reg = gdbarch_remote_register_number (x->gdbarch, reg);
+
       /* Make sure the register number is in range.  */
       if (reg < 0 || reg > 0xffff)
         error (_("GDB bug: ax-general.c (ax_reg): "
@@ -391,7 +378,7 @@ ax_print (struct ui_file *f, struct agen
 
   for (i = 0; i < x->len;)
     {
-      enum agent_op op = x->buf[i];
+      enum agent_op op = (enum agent_op) x->buf[i];
 
       if (op >= (sizeof (aop_map) / sizeof (aop_map[0]))
 	  || !aop_map[op].name)
@@ -450,7 +437,11 @@ ax_reg_mask (struct agent_expr *ax, int 
     }
   else
     {
-      int byte = reg / 8;
+      int byte;
+
+      /* Get the remote register number.  */
+      reg = gdbarch_remote_register_number (ax->gdbarch, reg);
+      byte = reg / 8;
 
       /* Grow the bit mask if necessary.  */
       if (byte >= ax->reg_mask_len)
@@ -458,9 +449,9 @@ ax_reg_mask (struct agent_expr *ax, int 
           /* It's not appropriate to double here.  This isn't a
 	     string buffer.  */
           int new_len = byte + 1;
-          unsigned char *new_reg_mask = xrealloc (ax->reg_mask,
-					          new_len
-					          * sizeof (ax->reg_mask[0]));
+          unsigned char *new_reg_mask
+	    = XRESIZEVEC (unsigned char, ax->reg_mask, new_len);
+
           memset (new_reg_mask + ax->reg_mask_len, 0,
 	          (new_len - ax->reg_mask_len) * sizeof (ax->reg_mask[0]));
           ax->reg_mask_len = new_len;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax.h ./gdb/ax.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ax.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ax.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Definitions for expressions designed to be executed on the agent
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -94,6 +94,11 @@ union agent_val
 /* A buffer containing a agent expression.  */
 struct agent_expr
   {
+    /* Construct an empty agent expression.  */
+    explicit agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope);
+
+    ~agent_expr ();
+
     /* The bytes of the expression.  */
     unsigned char *buf;
 
@@ -162,11 +167,8 @@ struct agent_expr
     int trace_string;
   };
 
-/* Pointer to an agent_expr structure.  */
-typedef struct agent_expr *agent_expr_p;
-
-/* Vector of pointers to agent expressions.  */
-DEF_VEC_P (agent_expr_p);
+/* An agent_expr owning pointer.  */
+typedef std::unique_ptr<agent_expr> agent_expr_up;
 
 /* The actual values of the various bytecode operations.  */
 
@@ -183,12 +185,8 @@ enum agent_op
 
 /* Functions for building expressions.  */
 
-/* Allocate a new, empty agent expression.  */
-extern struct agent_expr *new_agent_expr (struct gdbarch *, CORE_ADDR);
-
-/* Free a agent expression.  */
-extern void free_agent_expr (struct agent_expr *);
-extern struct cleanup *make_cleanup_free_agent_expr (struct agent_expr *);
+/* Append a raw byte to EXPR.  */
+extern void ax_raw_byte (struct agent_expr *expr, gdb_byte byte);
 
 /* Append a simple operator OP to EXPR.  */
 extern void ax_simple (struct agent_expr *EXPR, enum agent_op OP);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bcache.c ./gdb/bcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bcache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
    Written by Fred Fish <fnf@cygnus.com>
    Rewritten by Jim Blandy <jimb@cygnus.com>
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -265,7 +265,8 @@ bcache_full (const void *addr, int lengt
   /* The user's string isn't in the list.  Insert it after *ps.  */
   {
     struct bstring *newobj
-      = obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
+      = (struct bstring *) obstack_alloc (&bcache->cache,
+					  BSTRING_SIZE (length));
 
     memcpy (&newobj->d.data, addr, length);
     newobj->length = length;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bcache.h ./gdb/bcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
    Written by Fred Fish <fnf@cygnus.com>
    Rewritten by Jim Blandy <jimb@cygnus.com>
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfd-target.c ./gdb/bfd-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfd-target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bfd-target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Very simple "bfd" target, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ target_bfd_xfer_partial (struct target_o
     {
     case TARGET_OBJECT_MEMORY:
       {
-	struct target_bfd_data *data = ops->to_data;
+	struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
 	return section_table_xfer_memory_partial (readbuf, writebuf,
 						  offset, len, xfered_len,
 						  data->table.sections,
@@ -63,14 +63,14 @@ target_bfd_xfer_partial (struct target_o
 static struct target_section_table *
 target_bfd_get_section_table (struct target_ops *ops)
 {
-  struct target_bfd_data *data = ops->to_data;
+  struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
   return &data->table;
 }
 
 static void
 target_bfd_xclose (struct target_ops *t)
 {
-  struct target_bfd_data *data = t->to_data;
+  struct target_bfd_data *data = (struct target_bfd_data *) t->to_data;
 
   gdb_bfd_unref (data->bfd);
   xfree (data->table.sections);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfd-target.h ./gdb/bfd-target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfd-target.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bfd-target.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Very simple "bfd" target, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-linux-tdep.c ./gdb/bfin-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bfin-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Analog Devices Blackfin processor, for GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    Contributed by Analog Devices, Inc.
 
@@ -99,7 +99,6 @@ bfin_linux_sigframe_init (const struct t
 			  struct trad_frame_cache *this_cache,
 			  CORE_ADDR func)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR sp = get_frame_sp (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
   CORE_ADDR sigcontext = sp + SIGCONTEXT_OFFSET;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-tdep.c ./gdb/bfin-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bfin-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Analog Devices Blackfin processor, for GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    Contributed by Analog Devices, Inc.
 
@@ -292,7 +292,7 @@ bfin_frame_cache (struct frame_info *thi
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct bfin_frame_cache *) *this_cache;
 
   cache = bfin_alloc_frame_cache ();
   *this_cache = cache;
@@ -500,13 +500,9 @@ bfin_push_dummy_call (struct gdbarch *gd
 		      CORE_ADDR struct_addr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  gdb_byte buf[4];
   int i;
   long reg_r0, reg_r1, reg_r2;
   int total_len = 0;
-  enum bfin_abi abi = bfin_abi (gdbarch);
-  CORE_ADDR func_addr = find_function_addr (function, NULL);
 
   for (i = nargs - 1; i >= 0; i--)
     {
@@ -531,7 +527,7 @@ bfin_push_dummy_call (struct gdbarch *gd
       int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
 
       sp -= container_len;
-      write_memory (sp, value_contents_writeable (args[i]), container_len);
+      write_memory (sp, value_contents (args[i]), container_len);
     }
 
   /* Initialize R0, R1, and R2 to the first 3 words of parameters.  */
@@ -566,34 +562,38 @@ bfin_push_dummy_call (struct gdbarch *gd
 static int
 bfin_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
-  if (reg > ARRAY_SIZE (map_gcc_gdb))
-    return 0;
+  if (reg < 0 || reg >= ARRAY_SIZE (map_gcc_gdb))
+    return -1;
 
   return map_gcc_gdb[reg];
 }
 
-/* This function implements the 'breakpoint_from_pc' gdbarch method.
-   It returns a pointer to a string of bytes that encode a breakpoint
-   instruction, stores the length of the string to *lenptr, and
-   adjusts the program counter (if necessary) to point to the actual
-   memory location where the breakpoint should be inserted.  */
-
-static const unsigned char *
-bfin_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+bfin_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   unsigned short iw;
-  static unsigned char bfin_breakpoint[] = {0xa1, 0x00, 0x00, 0x00};
-  static unsigned char bfin_sim_breakpoint[] = {0x25, 0x00, 0x00, 0x00};
 
   iw = read_memory_unsigned_integer (*pcptr, 2, byte_order);
 
   if ((iw & 0xf000) >= 0xc000)
     /* 32-bit instruction.  */
-    *lenptr = 4;
+    return 4;
   else
-    *lenptr = 2;
+    return 2;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+bfin_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  static unsigned char bfin_breakpoint[] = {0xa1, 0x00, 0x00, 0x00};
+  static unsigned char bfin_sim_breakpoint[] = {0x25, 0x00, 0x00, 0x00};
+
+  *size = kind;
 
   if (strcmp (target_shortname, "sim") == 0)
     return bfin_sim_breakpoint;
@@ -794,15 +794,8 @@ bfin_gdbarch_init (struct gdbarch_info i
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
-  int elf_flags;
   enum bfin_abi abi;
 
-  /* Extract the ELF flags, if available.  */
-  if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
-    elf_flags = elf_elfheader (info.abfd)->e_flags;
-  else
-    elf_flags = 0;
-
   abi = BFIN_ABI_FLAT;
 
   /* If there is already a candidate, use it.  */
@@ -837,7 +830,8 @@ bfin_gdbarch_init (struct gdbarch_info i
   set_gdbarch_return_value (gdbarch, bfin_return_value);
   set_gdbarch_skip_prologue (gdbarch, bfin_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, bfin_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, bfin_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, bfin_sw_breakpoint_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
   set_gdbarch_frame_args_skip (gdbarch, 8);
   set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-tdep.h ./gdb/bfin-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bfin-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bfin-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Analog Devices Blackfin processor, for GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    Contributed by Analog Devices, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/block.c ./gdb/block.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/block.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/block.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Block-related functions for the GNU debugger, GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -140,7 +140,7 @@ find_block_in_blockvector (const struct 
   /* If we have an addrmap mapping code addresses to blocks, then use
      that.  */
   if (BLOCKVECTOR_MAP (bl))
-    return addrmap_find (BLOCKVECTOR_MAP (bl), pc);
+    return (struct block *) addrmap_find (BLOCKVECTOR_MAP (bl), pc);
 
   /* Otherwise, use binary search to find the last block that starts
      before PC.
@@ -239,14 +239,14 @@ call_site_for_pc (struct gdbarch *gdbarc
       /* DW_TAG_gnu_call_site will be missing just if GCC could not determine
 	 the call target.  */
       throw_error (NO_ENTRY_VALUE_ERROR,
-		   _("DW_OP_GNU_entry_value resolving cannot find "
-		     "DW_TAG_GNU_call_site %s in %s"),
+		   _("DW_OP_entry_value resolving cannot find "
+		     "DW_TAG_call_site %s in %s"),
 		   paddress (gdbarch, pc),
 		   (msym.minsym == NULL ? "???"
 		    : MSYMBOL_PRINT_NAME (msym.minsym)));
     }
 
-  return *slot;
+  return (struct call_site *) *slot;
 }
 
 /* Return the blockvector immediately containing the innermost lexical block
@@ -351,8 +351,7 @@ block_initialize_namespace (struct block
 {
   if (BLOCK_NAMESPACE (block) == NULL)
     {
-      BLOCK_NAMESPACE (block)
-	= obstack_alloc (obstack, sizeof (struct block_namespace_info));
+      BLOCK_NAMESPACE (block) = XOBNEW (obstack, struct block_namespace_info);
       BLOCK_NAMESPACE (block)->scope = NULL;
       BLOCK_NAMESPACE (block)->using_decl = NULL;
     }
@@ -428,6 +427,21 @@ set_block_compunit_symtab (struct block 
   gb->compunit_symtab = cu;
 }
 
+/* See block.h.  */
+
+struct dynamic_prop *
+block_static_link (const struct block *block)
+{
+  struct objfile *objfile = block_objfile (block);
+
+  /* Only objfile-owned blocks that materialize top function scopes can have
+     static links.  */
+  if (objfile == NULL || BLOCK_FUNCTION (block) == NULL)
+    return NULL;
+
+  return (struct dynamic_prop *) objfile_lookup_static_link (objfile, block);
+}
+
 /* Return the compunit of the global block.  */
 
 static struct compunit_symtab *
@@ -856,7 +870,7 @@ block_find_non_opaque_type (struct symbo
 int
 block_find_non_opaque_type_preferred (struct symbol *sym, void *data)
 {
-  struct symbol **best = data;
+  struct symbol **best = (struct symbol **) data;
 
   if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
     return 1;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/blockframe.c ./gdb/blockframe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/blockframe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/blockframe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Get info from stack frames; convert between frames, blocks,
    functions and pc values.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -197,7 +197,6 @@ find_pc_partial_function_gnu_ifunc (CORE
   struct bound_minimal_symbol msymbol;
   struct compunit_symtab *compunit_symtab = NULL;
   struct objfile *objfile;
-  int i;
   CORE_ADDR mapped_pc;
 
   /* To ensure that the symbol returned belongs to the correct setion
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/block.h ./gdb/block.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/block.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/block.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code dealing with blocks for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -82,21 +82,10 @@ struct block
 
   struct dictionary *dict;
 
-  /* Used for language-specific info.  */
+  /* Contains information about namespace-related info relevant to this block:
+     using directives and the current namespace scope.  */
 
-  union
-  {
-    struct
-    {
-      /* Contains information about namespace-related info relevant to
-	 this block: using directives and the current namespace
-	 scope.  */
-      
-      struct block_namespace_info *the_namespace;
-    }
-    cplus_specific;
-  }
-  language_specific;
+  struct block_namespace_info *namespace_info;
 };
 
 /* The global block is singled out so that we can provide a back-link
@@ -118,7 +107,7 @@ struct global_block
 #define BLOCK_FUNCTION(bl)	(bl)->function
 #define BLOCK_SUPERBLOCK(bl)	(bl)->superblock
 #define BLOCK_DICT(bl)		(bl)->dict
-#define BLOCK_NAMESPACE(bl)   (bl)->language_specific.cplus_specific.the_namespace
+#define BLOCK_NAMESPACE(bl)	(bl)->namespace_info
 
 struct blockvector
 {
@@ -190,6 +179,17 @@ extern struct block *allocate_global_blo
 extern void set_block_compunit_symtab (struct block *,
 				       struct compunit_symtab *);
 
+/* Return a property to evaluate the static link associated to BLOCK.
+
+   In the context of nested functions (available in Pascal, Ada and GNU C, for
+   instance), a static link (as in DWARF's DW_AT_static_link attribute) for a
+   function is a way to get the frame corresponding to the enclosing function.
+
+   Note that only objfile-owned and function-level blocks can have a static
+   link.  Return NULL if there is no such property.  */
+
+extern struct dynamic_prop *block_static_link (const struct block *block);
+
 /* A block iterator.  This structure should be treated as though it
    were opaque; it is only defined here because we want to support
    stack allocation of iterators.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-sig.c ./gdb/break-catch-sig.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-sig.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/break-catch-sig.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Everything about signal catchpoints, for GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,7 +28,8 @@
 #include "valprint.h"
 #include "cli/cli-utils.h"
 #include "completer.h"
-#include "gdb_obstack.h"
+
+#include <string>
 
 #define INTERNAL_SIGNAL(x) ((x) == GDB_SIGNAL_TRAP || (x) == GDB_SIGNAL_INT)
 
@@ -107,7 +108,7 @@ signal_catchpoint_dtor (struct breakpoin
 static int
 signal_catchpoint_insert_location (struct bp_location *bl)
 {
-  struct signal_catchpoint *c = (void *) bl->owner;
+  struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
   int i;
 
   if (c->signals_to_be_caught != NULL)
@@ -137,9 +138,10 @@ signal_catchpoint_insert_location (struc
    catchpoints.  */
 
 static int
-signal_catchpoint_remove_location (struct bp_location *bl)
+signal_catchpoint_remove_location (struct bp_location *bl,
+				   enum remove_bp_reason reason)
 {
-  struct signal_catchpoint *c = (void *) bl->owner;
+  struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
   int i;
 
   if (c->signals_to_be_caught != NULL)
@@ -180,7 +182,8 @@ signal_catchpoint_breakpoint_hit (const 
 				  CORE_ADDR bp_addr,
 				  const struct target_waitstatus *ws)
 {
-  const struct signal_catchpoint *c = (void *) bl->owner;
+  const struct signal_catchpoint *c
+    = (const struct signal_catchpoint *) bl->owner;
   gdb_signal_type signal_number;
 
   if (ws->kind != TARGET_WAITKIND_STOPPED)
@@ -219,14 +222,16 @@ signal_catchpoint_print_it (bpstat bs)
   ptid_t ptid;
   struct target_waitstatus last;
   const char *signal_name;
+  struct ui_out *uiout = current_uiout;
 
   get_last_target_status (&ptid, &last);
 
   signal_name = signal_to_name_or_int (last.value.sig);
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
 
-  printf_filtered (_("\nCatchpoint %d (signal %s), "), b->number, signal_name);
+  printf_filtered (_("Catchpoint %d (signal %s), "), b->number, signal_name);
 
   return PRINT_SRC_AND_LOC;
 }
@@ -238,7 +243,7 @@ static void
 signal_catchpoint_print_one (struct breakpoint *b,
 			     struct bp_location **last_loc)
 {
-  struct signal_catchpoint *c = (void *) b;
+  struct signal_catchpoint *c = (struct signal_catchpoint *) b;
   struct value_print_options opts;
   struct ui_out *uiout = current_uiout;
 
@@ -248,24 +253,20 @@ signal_catchpoint_print_one (struct brea
      not line up too nicely with the headers, but the effect
      is relatively readable).  */
   if (opts.addressprint)
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
 
   if (c->signals_to_be_caught
       && VEC_length (gdb_signal_type, c->signals_to_be_caught) > 1)
-    ui_out_text (uiout, "signals \"");
+    uiout->text ("signals \"");
   else
-    ui_out_text (uiout, "signal \"");
+    uiout->text ("signal \"");
 
   if (c->signals_to_be_caught)
     {
       int i;
       gdb_signal_type iter;
-      struct obstack text;
-      struct cleanup *cleanup;
-
-      obstack_init (&text);
-      cleanup = make_cleanup_obstack_free (&text);
+      std::string text;
 
       for (i = 0;
            VEC_iterate (gdb_signal_type, c->signals_to_be_caught, i, iter);
@@ -274,20 +275,18 @@ signal_catchpoint_print_one (struct brea
 	  const char *name = signal_to_name_or_int (iter);
 
 	  if (i > 0)
-	    obstack_grow (&text, " ", 1);
-	  obstack_grow (&text, name, strlen (name));
+	    text += " ";
+	  text += name;
         }
-      obstack_grow (&text, "", 1);
-      ui_out_field_string (uiout, "what", obstack_base (&text));
-      do_cleanups (cleanup);
+      uiout->field_string ("what", text.c_str ());
     }
   else
-    ui_out_field_string (uiout, "what",
+    uiout->field_string ("what",
 			 c->catch_all ? "<any signal>" : "<standard signals>");
-  ui_out_text (uiout, "\" ");
+  uiout->text ("\" ");
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type", "signal");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", "signal");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for signal
@@ -296,7 +295,7 @@ signal_catchpoint_print_one (struct brea
 static void
 signal_catchpoint_print_mention (struct breakpoint *b)
 {
-  struct signal_catchpoint *c = (void *) b;
+  struct signal_catchpoint *c = (struct signal_catchpoint *) b;
 
   if (c->signals_to_be_caught)
     {
@@ -330,7 +329,7 @@ signal_catchpoint_print_mention (struct 
 static void
 signal_catchpoint_print_recreate (struct breakpoint *b, struct ui_file *fp)
 {
-  struct signal_catchpoint *c = (void *) b;
+  struct signal_catchpoint *c = (struct signal_catchpoint *) b;
 
   fprintf_unfiltered (fp, "catch signal");
 
@@ -372,7 +371,7 @@ create_signal_catchpoint (int tempflag, 
   struct signal_catchpoint *c;
   struct gdbarch *gdbarch = get_current_arch ();
 
-  c = XNEW (struct signal_catchpoint);
+  c = new signal_catchpoint ();
   init_catchpoint (&c->base, gdbarch, tempflag, NULL, &signal_catchpoint_ops);
   c->signals_to_be_caught = filter;
   c->catch_all = catch_all;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-syscall.c ./gdb/break-catch-syscall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-syscall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/break-catch-syscall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Everything about syscall catchpoints, for GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -85,7 +85,8 @@ get_catch_syscall_inferior_data (struct 
 {
   struct catch_syscall_inferior_data *inf_data;
 
-  inf_data = inferior_data (inf, catch_syscall_inferior_data);
+  inf_data = ((struct catch_syscall_inferior_data *)
+	      inferior_data (inf, catch_syscall_inferior_data));
   if (inf_data == NULL)
     {
       inf_data = XCNEW (struct catch_syscall_inferior_data);
@@ -157,7 +158,7 @@ insert_catch_syscall (struct bp_location
    catchpoints.  */
 
 static int
-remove_catch_syscall (struct bp_location *bl)
+remove_catch_syscall (struct bp_location *bl, enum remove_bp_reason reason)
 {
   struct syscall_catchpoint *c = (struct syscall_catchpoint *) bl->owner;
   struct inferior *inf = current_inferior ();
@@ -253,32 +254,33 @@ print_it_catch_syscall (bpstat bs)
   get_syscall_by_number (gdbarch, last.value.syscall_number, &s);
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
 
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary catchpoint ");
+    uiout->text ("Temporary catchpoint ");
   else
-    ui_out_text (uiout, "\nCatchpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Catchpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
+      uiout->field_string ("reason",
 			   async_reason_lookup (last.kind == TARGET_WAITKIND_SYSCALL_ENTRY
 						? EXEC_ASYNC_SYSCALL_ENTRY
 						: EXEC_ASYNC_SYSCALL_RETURN));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
     }
-  ui_out_field_int (uiout, "bkptno", b->number);
+  uiout->field_int ("bkptno", b->number);
 
   if (last.kind == TARGET_WAITKIND_SYSCALL_ENTRY)
-    ui_out_text (uiout, " (call to syscall ");
+    uiout->text (" (call to syscall ");
   else
-    ui_out_text (uiout, " (returned from syscall ");
+    uiout->text (" (returned from syscall ");
 
-  if (s.name == NULL || ui_out_is_mi_like_p (uiout))
-    ui_out_field_int (uiout, "syscall-number", last.value.syscall_number);
+  if (s.name == NULL || uiout->is_mi_like_p ())
+    uiout->field_int ("syscall-number", last.value.syscall_number);
   if (s.name != NULL)
-    ui_out_field_string (uiout, "syscall-name", s.name);
+    uiout->field_string ("syscall-name", s.name);
 
-  ui_out_text (uiout, "), ");
+  uiout->text ("), ");
 
   return PRINT_SRC_AND_LOC;
 }
@@ -300,14 +302,14 @@ print_one_catch_syscall (struct breakpoi
      line up too nicely with the headers, but the effect is relatively
      readable).  */
   if (opts.addressprint)
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
 
   if (c->syscalls_to_be_caught
       && VEC_length (int, c->syscalls_to_be_caught) > 1)
-    ui_out_text (uiout, "syscalls \"");
+    uiout->text ("syscalls \"");
   else
-    ui_out_text (uiout, "syscall \"");
+    uiout->text ("syscall \"");
 
   if (c->syscalls_to_be_caught)
     {
@@ -334,14 +336,14 @@ print_one_catch_syscall (struct breakpoi
         }
       /* Remove the last comma.  */
       text[strlen (text) - 2] = '\0';
-      ui_out_field_string (uiout, "what", text);
+      uiout->field_string ("what", text);
     }
   else
-    ui_out_field_string (uiout, "what", "<any syscall>");
-  ui_out_text (uiout, "\" ");
+    uiout->field_string ("what", "<any syscall>");
+  uiout->text ("\" ");
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type", "syscall");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", "syscall");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for syscall
@@ -431,7 +433,7 @@ create_syscall_event_catchpoint (int tem
   struct syscall_catchpoint *c;
   struct gdbarch *gdbarch = get_current_arch ();
 
-  c = XNEW (struct syscall_catchpoint);
+  c = new syscall_catchpoint ();
   init_catchpoint (&c->base, gdbarch, tempflag, NULL, ops);
   c->syscalls_to_be_caught = filter;
 
@@ -462,10 +464,38 @@ catch_syscall_split_args (char *arg)
       cur_name[i] = '\0';
       arg += i;
 
-      /* Check if the user provided a syscall name or a number.  */
+      /* Check if the user provided a syscall name, group, or a number.  */
       syscall_number = (int) strtol (cur_name, &endptr, 0);
       if (*endptr == '\0')
-	get_syscall_by_number (gdbarch, syscall_number, &s);
+	{
+	  get_syscall_by_number (gdbarch, syscall_number, &s);
+	  VEC_safe_push (int, result, s.number);
+	}
+      else if (startswith (cur_name, "g:")
+	       || startswith (cur_name, "group:"))
+	{
+	  /* We have a syscall group.  Let's expand it into a syscall
+	     list before inserting.  */
+	  struct syscall *syscall_list;
+	  const char *group_name;
+
+	  /* Skip over "g:" and "group:" prefix strings.  */
+	  group_name = strchr (cur_name, ':') + 1;
+
+	  syscall_list = get_syscalls_by_group (gdbarch, group_name);
+
+	  if (syscall_list == NULL)
+	    error (_("Unknown syscall group '%s'."), group_name);
+
+	  for (i = 0; syscall_list[i].name != NULL; i++)
+	    {
+	      /* Insert each syscall that are part of the group.  No
+		 need to check if it is valid.  */
+	      VEC_safe_push (int, result, syscall_list[i].number);
+	    }
+
+	  xfree (syscall_list);
+	}
       else
 	{
 	  /* We have a name.  Let's check if it's valid and convert it
@@ -477,10 +507,10 @@ catch_syscall_split_args (char *arg)
 	       because GDB cannot do anything useful if there's no
 	       syscall number to be caught.  */
 	    error (_("Unknown syscall name '%s'."), cur_name);
-	}
 
-      /* Ok, it's valid.  */
-      VEC_safe_push (int, result, s.number);
+	  /* Ok, it's valid.  */
+	  VEC_safe_push (int, result, s.number);
+	}
     }
 
   discard_cleanups (cleanup);
@@ -595,11 +625,58 @@ static VEC (char_ptr) *
 catch_syscall_completer (struct cmd_list_element *cmd,
                          const char *text, const char *word)
 {
-  const char **list = get_syscall_names (get_current_arch ());
-  VEC (char_ptr) *retlist
-    = (list == NULL) ? NULL : complete_on_enum (list, word, word);
+  struct gdbarch *gdbarch = get_current_arch ();
+  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+  VEC (char_ptr) *group_retlist = NULL;
+  VEC (char_ptr) *syscall_retlist = NULL;
+  VEC (char_ptr) *retlist = NULL;
+  const char **group_list = NULL;
+  const char **syscall_list = NULL;
+  const char *prefix;
+  int i;
+
+  /* Completion considers ':' to be a word separator, so we use this to
+     verify whether the previous word was a group prefix.  If so, we
+     build the completion list using group names only.  */
+  for (prefix = word; prefix != text && prefix[-1] != ' '; prefix--)
+    ;
+
+  if (startswith (prefix, "g:") || startswith (prefix, "group:"))
+    {
+      /* Perform completion inside 'group:' namespace only.  */
+      group_list = get_syscall_group_names (gdbarch);
+      retlist = (group_list == NULL
+		 ? NULL : complete_on_enum (group_list, word, word));
+    }
+  else
+    {
+      /* Complete with both, syscall names and groups.  */
+      syscall_list = get_syscall_names (gdbarch);
+      group_list = get_syscall_group_names (gdbarch);
+
+      /* Append "group:" prefix to syscall groups.  */
+      for (i = 0; group_list[i] != NULL; i++)
+	{
+	  char *prefixed_group = xstrprintf ("group:%s", group_list[i]);
+
+	  group_list[i] = prefixed_group;
+	  make_cleanup (xfree, prefixed_group);
+	}
+
+      syscall_retlist = ((syscall_list == NULL)
+			 ? NULL : complete_on_enum (syscall_list, word, word));
+      group_retlist = ((group_list == NULL)
+		       ? NULL : complete_on_enum (group_list, word, word));
+
+      retlist = VEC_merge (char_ptr, syscall_retlist, group_retlist);
+    }
+
+  VEC_free (char_ptr, syscall_retlist);
+  VEC_free (char_ptr, group_retlist);
+  xfree (syscall_list);
+  xfree (group_list);
+  do_cleanups (cleanups);
 
-  xfree (list);
   return retlist;
 }
 
@@ -647,11 +724,11 @@ _initialize_break_catch_syscall (void)
 					   catch_syscall_inferior_data_cleanup);
 
   add_catch_command ("syscall", _("\
-Catch system calls by their names and/or numbers.\n\
-Arguments say which system calls to catch.  If no arguments\n\
-are given, every system call will be caught.\n\
-Arguments, if given, should be one or more system call names\n\
-(if your system supports that), or system call numbers."),
+Catch system calls by their names, groups and/or numbers.\n\
+Arguments say which system calls to catch.  If no arguments are given,\n\
+every system call will be caught.  Arguments, if given, should be one\n\
+or more system call names (if your system supports that), system call\n\
+groups or system call numbers."),
 		     catch_syscall_command_1,
 		     catch_syscall_completer,
 		     CATCH_PERMANENT,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-throw.c ./gdb/break-catch-throw.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/break-catch-throw.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/break-catch-throw.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Everything about catch/throw catchpoints, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,6 +35,7 @@
 #include "cp-abi.h"
 #include "gdb_regex.h"
 #include "cp-support.h"
+#include "location.h"
 
 /* Enums for exception-handling support.  */
 enum exception_event_kind
@@ -106,7 +107,6 @@ fetch_probe_arguments (struct value **ar
   struct frame_info *frame = get_selected_frame (_("No frame selected"));
   CORE_ADDR pc = get_frame_pc (frame);
   struct bound_probe pc_probe;
-  const struct sym_probe_fns *pc_probe_fns;
   unsigned n_args;
 
   pc_probe = find_probe_by_pc (pc);
@@ -162,7 +162,7 @@ check_status_exception_catchpoint (struc
 {
   struct exception_catchpoint *self
     = (struct exception_catchpoint *) bs->breakpoint_at;
-  char *type_name = NULL;
+  std::string type_name;
 
   bkpt_breakpoint_ops.check_status (bs);
   if (bs->stop == 0)
@@ -174,17 +174,14 @@ check_status_exception_catchpoint (struc
   TRY
     {
       struct value *typeinfo_arg;
-      char *canon;
+      std::string canon;
 
       fetch_probe_arguments (NULL, &typeinfo_arg);
       type_name = cplus_typename_from_type_info (typeinfo_arg);
 
-      canon = cp_canonicalize_string (type_name);
-      if (canon != NULL)
-	{
-	  xfree (type_name);
-	  type_name = canon;
-	}
+      canon = cp_canonicalize_string (type_name.c_str ());
+      if (!canon.empty ())
+	std::swap (type_name, canon);
     }
   CATCH (e, RETURN_MASK_ERROR)
     {
@@ -192,12 +189,10 @@ check_status_exception_catchpoint (struc
     }
   END_CATCH
 
-  if (type_name != NULL)
+  if (!type_name.empty ())
     {
-      if (regexec (self->pattern, type_name, 0, NULL, 0) != 0)
+      if (regexec (self->pattern, type_name.c_str (), 0, NULL, 0) != 0)
 	bs->stop = 0;
-
-      xfree (type_name);
     }
 }
 
@@ -210,25 +205,33 @@ re_set_exception_catchpoint (struct brea
   struct symtabs_and_lines sals_end = {0};
   struct cleanup *cleanup;
   enum exception_event_kind kind = classify_exception_breakpoint (self);
+  struct event_location *location;
+  struct program_space *filter_pspace = current_program_space;
 
   /* We first try to use the probe interface.  */
   TRY
     {
-      char *spec = ASTRDUP (exception_functions[kind].probe);
-
-      sals = parse_probes (&spec, NULL);
+      location
+	= new_probe_location (exception_functions[kind].probe);
+      cleanup = make_cleanup_delete_event_location (location);
+      sals = parse_probes (location, filter_pspace, NULL);
+      do_cleanups (cleanup);
     }
-
   CATCH (e, RETURN_MASK_ERROR)
     {
-
       /* Using the probe interface failed.  Let's fallback to the normal
 	 catchpoint mode.  */
       TRY
 	{
-	  char *spec = ASTRDUP (exception_functions[kind].function);
+	  struct explicit_location explicit_loc;
 
-	  self->ops->decode_linespec (self, &spec, &sals);
+	  initialize_explicit_location (&explicit_loc);
+	  explicit_loc.function_name
+	    = ASTRDUP (exception_functions[kind].function);
+	  location = new_explicit_location (&explicit_loc);
+	  cleanup = make_cleanup_delete_event_location (location);
+	  self->ops->decode_location (self, location, filter_pspace, &sals);
+	  do_cleanups (cleanup);
 	}
       CATCH (ex, RETURN_MASK_ERROR)
 	{
@@ -242,7 +245,7 @@ re_set_exception_catchpoint (struct brea
   END_CATCH
 
   cleanup = make_cleanup (xfree, sals.sals);
-  update_breakpoint_locations (self, sals, sals_end);
+  update_breakpoint_locations (self, filter_pspace, sals, sals_end);
   do_cleanups (cleanup);
 }
 
@@ -255,23 +258,22 @@ print_it_exception_catchpoint (bpstat bs
   enum exception_event_kind kind = classify_exception_breakpoint (b);
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
 
   bp_temp = b->disposition == disp_del;
-  ui_out_text (uiout, 
-	       bp_temp ? "Temporary catchpoint "
+  uiout->text (bp_temp ? "Temporary catchpoint "
 		       : "Catchpoint ");
-  if (!ui_out_is_mi_like_p (uiout))
-    ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout,
-	       (kind == EX_EVENT_THROW ? " (exception thrown), "
+  if (!uiout->is_mi_like_p ())
+    uiout->field_int ("bkptno", b->number);
+  uiout->text ((kind == EX_EVENT_THROW ? " (exception thrown), "
 		: (kind == EX_EVENT_CATCH ? " (exception caught), "
 		   : " (exception rethrown), ")));
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason", 
+      uiout->field_string ("reason",
 			   async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
-      ui_out_field_int (uiout, "bkptno", b->number);
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
+      uiout->field_int ("bkptno", b->number);
     }
   return PRINT_SRC_AND_LOC;
 }
@@ -289,9 +291,9 @@ print_one_exception_catchpoint (struct b
     {
       annotate_field (4);
       if (b->loc == NULL || b->loc->shlib_disabled)
-	ui_out_field_string (uiout, "addr", "<PENDING>");
+	uiout->field_string ("addr", "<PENDING>");
       else
-	ui_out_field_core_addr (uiout, "addr",
+	uiout->field_core_addr ("addr",
 				b->loc->gdbarch, b->loc->address);
     }
   annotate_field (5);
@@ -301,21 +303,21 @@ print_one_exception_catchpoint (struct b
   switch (kind)
     {
     case EX_EVENT_THROW:
-      ui_out_field_string (uiout, "what", "exception throw");
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "catch-type", "throw");
+      uiout->field_string ("what", "exception throw");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("catch-type", "throw");
       break;
 
     case EX_EVENT_RETHROW:
-      ui_out_field_string (uiout, "what", "exception rethrow");
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "catch-type", "rethrow");
+      uiout->field_string ("what", "exception rethrow");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("catch-type", "rethrow");
       break;
 
     case EX_EVENT_CATCH:
-      ui_out_field_string (uiout, "what", "exception catch");
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "catch-type", "catch");
+      uiout->field_string ("what", "exception catch");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("catch-type", "catch");
       break;
     }
 }
@@ -331,9 +333,9 @@ print_one_detail_exception_catchpoint (c
 
   if (cp->exception_rx != NULL)
     {
-      ui_out_text (uiout, _("\tmatching: "));
-      ui_out_field_string (uiout, "regexp", cp->exception_rx);
-      ui_out_text (uiout, "\n");
+      uiout->text (_("\tmatching: "));
+      uiout->field_string ("regexp", cp->exception_rx);
+      uiout->text ("\n");
     }
 }
 
@@ -345,10 +347,10 @@ print_mention_exception_catchpoint (stru
   enum exception_event_kind kind = classify_exception_breakpoint (b);
 
   bp_temp = b->disposition == disp_del;
-  ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ")
+  uiout->text (bp_temp ? _("Temporary catchpoint ")
 			      : _("Catchpoint "));
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, (kind == EX_EVENT_THROW ? _(" (throw)")
+  uiout->field_int ("bkptno", b->number);
+  uiout->text ((kind == EX_EVENT_THROW ? _(" (throw)")
 		       : (kind == EX_EVENT_CATCH ? _(" (catch)")
 			  : _(" (rethrow)"))));
 }
@@ -384,8 +386,6 @@ static void
 handle_gnu_v3_exceptions (int tempflag, char *except_rx, char *cond_string,
 			  enum exception_event_kind ex_event, int from_tty)
 {
-  struct exception_catchpoint *cp;
-  struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
   regex_t *pattern = NULL;
 
   if (except_rx != NULL)
@@ -397,8 +397,7 @@ handle_gnu_v3_exceptions (int tempflag, 
 			   _("invalid type-matching regexp"));
     }
 
-  cp = XCNEW (struct exception_catchpoint);
-  make_cleanup (xfree, cp);
+  std::unique_ptr<exception_catchpoint> cp (new exception_catchpoint ());
 
   init_catchpoint (&cp->base, get_current_arch (), tempflag, cond_string,
 		   &gnu_v3_exception_catchpoint_ops);
@@ -412,7 +411,7 @@ handle_gnu_v3_exceptions (int tempflag, 
   re_set_exception_catchpoint (&cp->base);
 
   install_breakpoint (0, &cp->base, 1);
-  discard_cleanups (cleanup);
+  cp.release ();
 }
 
 /* Look for an "if" token in *STRING.  The "if" token must be preceded
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/breakpoint.c ./gdb/breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/breakpoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Everything about breakpoints, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -67,6 +67,9 @@
 #include "dummy-frame.h"
 #include "interps.h"
 #include "format.h"
+#include "location.h"
+#include "thread-fsm.h"
+#include "tid-parse.h"
 
 /* readline include files */
 #include "readline/readline.h"
@@ -77,6 +80,7 @@
 
 #include "mi/mi-common.h"
 #include "extension.h"
+#include <algorithm>
 
 /* Enums for exception-handling support.  */
 enum exception_event_kind
@@ -98,8 +102,9 @@ static void disable_command (char *, int
 
 static void enable_command (char *, int);
 
-static void map_breakpoint_numbers (char *, void (*) (struct breakpoint *,
-						      void *),
+static void map_breakpoint_numbers (const char *,
+				    void (*) (struct breakpoint *,
+					      void *),
 				    void *);
 
 static void ignore_command (char *, int);
@@ -108,10 +113,10 @@ static int breakpoint_re_set_one (void *
 
 static void breakpoint_re_set_default (struct breakpoint *);
 
-static void create_sals_from_address_default (char **,
-					      struct linespec_result *,
-					      enum bptype, char *,
-					      char **);
+static void
+  create_sals_from_location_default (const struct event_location *location,
+				     struct linespec_result *canonical,
+				     enum bptype type_wanted);
 
 static void create_breakpoints_sal_default (struct gdbarch *,
 					    struct linespec_result *,
@@ -121,8 +126,10 @@ static void create_breakpoints_sal_defau
 					    const struct breakpoint_ops *,
 					    int, int, int, unsigned);
 
-static void decode_linespec_default (struct breakpoint *, char **,
-				     struct symtabs_and_lines *);
+static void decode_location_default (struct breakpoint *b,
+				     const struct event_location *location,
+				     struct program_space *search_pspace,
+				     struct symtabs_and_lines *sals);
 
 static void clear_command (char *, int);
 
@@ -170,6 +177,10 @@ static int breakpoint_location_address_m
 					      struct address_space *aspace,
 					      CORE_ADDR addr);
 
+static int breakpoint_location_address_range_overlap (struct bp_location *,
+						      struct address_space *,
+						      CORE_ADDR, int);
+
 static void breakpoints_info (char *, int);
 
 static void watchpoints_info (char *, int);
@@ -185,15 +196,8 @@ static void commands_command (char *, in
 
 static void condition_command (char *, int);
 
-typedef enum
-  {
-    mark_inserted,
-    mark_uninserted
-  }
-insertion_state_t;
-
-static int remove_breakpoint (struct bp_location *, insertion_state_t);
-static int remove_breakpoint_1 (struct bp_location *, insertion_state_t);
+static int remove_breakpoint (struct bp_location *);
+static int remove_breakpoint_1 (struct bp_location *, enum remove_bp_reason);
 
 static enum print_stop_action print_bp_stop_message (bpstat bs);
 
@@ -468,6 +472,8 @@ breakpoints_should_be_inserted_now (void
     }
   else if (target_has_execution)
     {
+      struct thread_info *tp;
+
       if (always_inserted_mode)
 	{
 	  /* The user wants breakpoints inserted even if all threads
@@ -477,6 +483,13 @@ breakpoints_should_be_inserted_now (void
 
       if (threads_are_executing ())
 	return 1;
+
+      /* Don't remove breakpoints yet if, even though all threads are
+	 stopped, we still have events to process.  */
+      ALL_NON_EXITED_THREADS (tp)
+	if (tp->resumed
+	    && tp->suspend.waitstatus_pending_p)
+	  return 1;
     }
   return 0;
 }
@@ -714,11 +727,11 @@ clear_breakpoint_hit_counts (void)
 static struct counted_command_line *
 alloc_counted_command_line (struct command_line *commands)
 {
-  struct counted_command_line *result
-    = xmalloc (sizeof (struct counted_command_line));
+  struct counted_command_line *result = XNEW (struct counted_command_line);
 
   result->refc = 1;
   result->commands = commands;
+
   return result;
 }
 
@@ -754,7 +767,7 @@ decref_counted_command_line (struct coun
 static void
 do_cleanup_counted_command_line (void *arg)
 {
-  decref_counted_command_line (arg);
+  decref_counted_command_line ((struct counted_command_line **) arg);
 }
 
 /* Create a cleanup that calls decref_counted_command_line on the
@@ -913,8 +926,8 @@ show_condition_evaluation_mode (struct u
 static int
 bp_location_compare_addrs (const void *ap, const void *bp)
 {
-  struct bp_location *a = *(void **) ap;
-  struct bp_location *b = *(void **) bp;
+  const struct bp_location *a = *(const struct bp_location **) ap;
+  const struct bp_location *b = *(const struct bp_location **) bp;
 
   if (a->address == b->address)
     return 0;
@@ -939,9 +952,10 @@ get_first_locp_gte_addr (CORE_ADDR addre
   dummy_loc.address = address;
 
   /* Find a close match to the first location at ADDRESS.  */
-  locp_found = bsearch (&dummy_locp, bp_location, bp_location_count,
-			sizeof (struct bp_location **),
-			bp_location_compare_addrs);
+  locp_found = ((struct bp_location **)
+		bsearch (&dummy_locp, bp_location, bp_location_count,
+			 sizeof (struct bp_location **),
+			 bp_location_compare_addrs));
 
   /* Nothing was found, nothing left to do.  */
   if (locp_found == NULL)
@@ -967,8 +981,7 @@ set_breakpoint_condition (struct breakpo
     {
       struct watchpoint *w = (struct watchpoint *) b;
 
-      xfree (w->cond_exp);
-      w->cond_exp = NULL;
+      w->cond_exp.reset ();
     }
   else
     {
@@ -976,8 +989,7 @@ set_breakpoint_condition (struct breakpo
 
       for (loc = b->loc; loc; loc = loc->next)
 	{
-	  xfree (loc->cond);
-	  loc->cond = NULL;
+	  loc->cond.reset ();
 
 	  /* No need to free the condition agent expression
 	     bytecode (if we have one).  We will handle this
@@ -1311,7 +1323,7 @@ breakpoint_set_task (struct breakpoint *
 void
 check_tracepoint_command (char *line, void *closure)
 {
-  struct breakpoint *b = closure;
+  struct breakpoint *b = (struct breakpoint *) closure;
 
   validate_actionline (line, b);
 }
@@ -1325,7 +1337,7 @@ struct commands_info
   int from_tty;
 
   /* The breakpoint range spec.  */
-  char *arg;
+  const char *arg;
 
   /* Non-NULL if the body of the commands are being read from this
      already-parsed command.  */
@@ -1342,7 +1354,7 @@ struct commands_info
 static void
 do_map_commands_command (struct breakpoint *b, void *data)
 {
-  struct commands_info *info = data;
+  struct commands_info *info = (struct commands_info *) data;
 
   if (info->cmd == NULL)
     {
@@ -1386,7 +1398,7 @@ do_map_commands_command (struct breakpoi
 }
 
 static void
-commands_command_1 (char *arg, int from_tty, 
+commands_command_1 (const char *arg, int from_tty,
 		    struct command_line *control)
 {
   struct cleanup *cleanups;
@@ -1399,32 +1411,22 @@ commands_command_1 (char *arg, int from_
      extra reference to the commands that we must clean up.  */
   cleanups = make_cleanup_decref_counted_command_line (&info.cmd);
 
+  std::string new_arg;
+
   if (arg == NULL || !*arg)
     {
       if (breakpoint_count - prev_breakpoint_count > 1)
-	arg = xstrprintf ("%d-%d", prev_breakpoint_count + 1, 
-			  breakpoint_count);
+	new_arg = string_printf ("%d-%d", prev_breakpoint_count + 1,
+				 breakpoint_count);
       else if (breakpoint_count > 0)
-	arg = xstrprintf ("%d", breakpoint_count);
-      else
-	{
-	  /* So that we don't try to free the incoming non-NULL
-	     argument in the cleanup below.  Mapping breakpoint
-	     numbers will fail in this case.  */
-	  arg = NULL;
-	}
+	new_arg = string_printf ("%d", breakpoint_count);
     }
   else
-    /* The command loop has some static state, so we need to preserve
-       our argument.  */
-    arg = xstrdup (arg);
+    new_arg = arg;
 
-  if (arg != NULL)
-    make_cleanup (xfree, arg);
-
-  info.arg = arg;
+  info.arg = new_arg.c_str ();
 
-  map_breakpoint_numbers (arg, do_map_commands_command, &info);
+  map_breakpoint_numbers (info.arg, do_map_commands_command, &info);
 
   if (info.cmd == NULL)
     error (_("No breakpoints specified."));
@@ -1444,7 +1446,7 @@ commands_command (char *arg, int from_tt
    This is used by cli-script.c to DTRT with breakpoint commands
    that are part of if and while bodies.  */
 enum command_control_type
-commands_from_control_command (char *arg, struct command_line *cmd)
+commands_from_control_command (const char *arg, struct command_line *cmd)
 {
   commands_command_1 (arg, 0, cmd);
   return simple_control;
@@ -1585,7 +1587,6 @@ breakpoint_xfer_memory (gdb_byte *readbu
   /* Left boundary, right boundary and median element of our binary
      search.  */
   unsigned bc_l, bc_r, bc;
-  size_t i;
 
   /* Find BC_L which is a leftmost element which may affect BUF
      content.  It is safe to report lower value but a failure to
@@ -1640,9 +1641,6 @@ breakpoint_xfer_memory (gdb_byte *readbu
   for (bc = bc_l; bc < bp_location_count; bc++)
   {
     struct bp_location *bl = bp_location[bc];
-    CORE_ADDR bp_addr = 0;
-    int bp_size = 0;
-    int bptoffset = 0;
 
     /* bp_location array has BL->OWNER always non-NULL.  */
     if (bl->owner->type == bp_none)
@@ -1758,6 +1756,36 @@ extract_bitfield_from_watchpoint_value (
   return bit_val;
 }
 
+/* Allocate a dummy location and add it to B, which must be a software
+   watchpoint.  This is required because even if a software watchpoint
+   is not watching any memory, bpstat_stop_status requires a location
+   to be able to report stops.  */
+
+static void
+software_watchpoint_add_no_memory_location (struct breakpoint *b,
+					    struct program_space *pspace)
+{
+  gdb_assert (b->type == bp_watchpoint && b->loc == NULL);
+
+  b->loc = allocate_bp_location (b);
+  b->loc->pspace = pspace;
+  b->loc->address = -1;
+  b->loc->length = -1;
+}
+
+/* Returns true if B is a software watchpoint that is not watching any
+   memory (e.g., "watch $pc").  */
+
+static int
+is_no_memory_software_watchpoint (struct breakpoint *b)
+{
+  return (b->type == bp_watchpoint
+	  && b->loc != NULL
+	  && b->loc->next == NULL
+	  && b->loc->address == -1
+	  && b->loc->length == -1);
+}
+
 /* Assuming that B is a watchpoint:
    - Reparse watchpoint expression, if REPARSE is non-zero
    - Evaluate expression and store the result in B->val
@@ -1867,11 +1895,7 @@ update_watchpoint (struct watchpoint *b,
     {
       const char *s;
 
-      if (b->exp)
-	{
-	  xfree (b->exp);
-	  b->exp = NULL;
-	}
+      b->exp.reset ();
       s = b->exp_string_reparse ? b->exp_string_reparse : b->exp_string;
       b->exp = parse_exp_1 (&s, 0, b->exp_valid_block, 0);
       /* If the meaning of expression itself changed, the old value is
@@ -1887,11 +1911,7 @@ update_watchpoint (struct watchpoint *b,
 	 locations (re)created below.  */
       if (b->base.cond_string != NULL)
 	{
-	  if (b->cond_exp != NULL)
-	    {
-	      xfree (b->cond_exp);
-	      b->cond_exp = NULL;
-	    }
+	  b->cond_exp.reset ();
 
 	  s = b->base.cond_string;
 	  b->cond_exp = parse_exp_1 (&s, 0, b->cond_exp_valid_block, 0);
@@ -1923,7 +1943,7 @@ update_watchpoint (struct watchpoint *b,
       struct value *val_chain, *v, *result, *next;
       struct program_space *frame_pspace;
 
-      fetch_subexp_value (b->exp, &pc, &v, &result, &val_chain, 0);
+      fetch_subexp_value (b->exp.get (), &pc, &v, &result, &val_chain, 0);
 
       /* Avoid setting b->val if it's already set.  The meaning of
 	 b->val is 'the last value' user saw, and we should update
@@ -1966,7 +1986,7 @@ update_watchpoint (struct watchpoint *b,
 		      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
 		{
 		  CORE_ADDR addr;
-		  int type;
+		  enum target_hw_bp_type type;
 		  struct bp_location *loc, **tmp;
 		  int bitpos = 0, bitsize = 0;
 
@@ -2121,14 +2141,7 @@ update_watchpoint (struct watchpoint *b,
 	 bpstat_stop_status requires a location to be able to report
 	 stops, so make sure there's at least a dummy one.  */
       if (b->base.type == bp_watchpoint && b->base.loc == NULL)
-	{
-	  struct breakpoint *base = &b->base;
-	  base->loc = allocate_bp_location (base);
-	  base->loc->pspace = frame_pspace;
-	  base->loc->address = -1;
-	  base->loc->length = -1;
-	  base->loc->watchpoint_type = -1;
-	}
+	software_watchpoint_add_no_memory_location (&b->base, frame_pspace);
     }
   else if (!within_current_scope)
     {
@@ -2177,11 +2190,22 @@ should_be_inserted (struct bp_location *
     return 0;
 
   /* Don't insert a breakpoint if we're trying to step past its
-     location.  */
+     location, except if the breakpoint is a single-step breakpoint,
+     and the breakpoint's thread is the thread which is stepping past
+     a breakpoint.  */
   if ((bl->loc_type == bp_loc_software_breakpoint
        || bl->loc_type == bp_loc_hardware_breakpoint)
       && stepping_past_instruction_at (bl->pspace->aspace,
-				       bl->address))
+				       bl->address)
+      /* The single-step breakpoint may be inserted at the location
+	 we're trying to step if the instruction branches to itself.
+	 However, the instruction won't be executed at all and it may
+	 break the semantics of the instruction, for example, the
+	 instruction is a conditional branch or updates some flags.
+	 We can't fix it unless GDB is able to emulate the instruction
+	 or switch to displaced stepping.  */
+      && !(bl->owner->type == bp_single_step
+	   && thread_is_stepping_over_breakpoint (bl->owner->thread)))
     {
       if (debug_infrun)
 	{
@@ -2232,14 +2256,14 @@ unduplicated_should_be_inserted (struct 
    by the bytecode interpreter.  Return NULL if there was
    any error during parsing.  */
 
-static struct agent_expr *
+static agent_expr_up
 parse_cond_to_aexpr (CORE_ADDR scope, struct expression *cond)
 {
-  struct agent_expr *aexpr = NULL;
-
-  if (!cond)
+  if (cond == NULL)
     return NULL;
 
+  agent_expr_up aexpr;
+
   /* We don't want to stop processing, so catch any errors
      that may show up.  */
   TRY
@@ -2252,7 +2276,6 @@ parse_cond_to_aexpr (CORE_ADDR scope, st
       /* If we got here, it means the condition could not be parsed to a valid
 	 bytecode expression and thus can't be evaluated on the target's side.
 	 It's no use iterating through the conditions.  */
-      return NULL;
     }
   END_CATCH
 
@@ -2275,7 +2298,7 @@ build_target_condition_list (struct bp_l
   struct bp_location *loc;
 
   /* Release conditions left over from a previous insert.  */
-  VEC_free (agent_expr_p, bl->target_info.conditions);
+  bl->target_info.conditions.clear ();
 
   /* This is only meaningful if the target is
      evaluating conditions and if the user has
@@ -2297,20 +2320,12 @@ build_target_condition_list (struct bp_l
 	{
 	  if (modified)
 	    {
-	      struct agent_expr *aexpr;
-
 	      /* Re-parse the conditions since something changed.  In that
 		 case we already freed the condition bytecodes (see
 		 force_breakpoint_reinsertion).  We just
 		 need to parse the condition to bytecodes again.  */
-	      aexpr = parse_cond_to_aexpr (bl->address, loc->cond);
-	      loc->cond_bytecode = aexpr;
-
-	      /* Check if we managed to parse the conditional expression
-		 correctly.  If not, we will not send this condition
-		 to the target.  */
-	      if (aexpr)
-		continue;
+	      loc->cond_bytecode = parse_cond_to_aexpr (bl->address,
+							loc->cond.get ());
 	    }
 
 	  /* If we have a NULL bytecode expression, it means something
@@ -2341,8 +2356,7 @@ build_target_condition_list (struct bp_l
 	      if (!loc->cond_bytecode)
 		return;
 
-	      free_agent_expr (loc->cond_bytecode);
-	      loc->cond_bytecode = NULL;
+	      loc->cond_bytecode.reset ();
 	    }
 	}
     }
@@ -2357,10 +2371,11 @@ build_target_condition_list (struct bp_l
 	  && loc->pspace->num == bl->pspace->num
 	  && loc->owner->enable_state == bp_enabled
 	  && loc->enabled)
-	/* Add the condition to the vector.  This will be used later to send the
-	   conditions to the target.  */
-	VEC_safe_push (agent_expr_p, bl->target_info.conditions,
-		       loc->cond_bytecode);
+	{
+	  /* Add the condition to the vector.  This will be used later
+	     to send the conditions to the target.  */
+	  bl->target_info.conditions.push_back (loc->cond_bytecode.get ());
+	}
     }
 
   return;
@@ -2370,19 +2385,18 @@ build_target_condition_list (struct bp_l
    bytecode suitable for evaluation by the bytecode interpreter.
    Return NULL if there was any error during parsing.  */
 
-static struct agent_expr *
+static agent_expr_up
 parse_cmd_to_aexpr (CORE_ADDR scope, char *cmd)
 {
   struct cleanup *old_cleanups = 0;
-  struct expression *expr, **argvec;
-  struct agent_expr *aexpr = NULL;
+  struct expression **argvec;
   const char *cmdrest;
   const char *format_start, *format_end;
   struct format_piece *fpieces;
   int nargs;
   struct gdbarch *gdbarch = get_current_arch ();
 
-  if (!cmd)
+  if (cmd == NULL)
     return NULL;
 
   cmdrest = cmd;
@@ -2425,13 +2439,15 @@ parse_cmd_to_aexpr (CORE_ADDR scope, cha
       const char *cmd1;
 
       cmd1 = cmdrest;
-      expr = parse_exp_1 (&cmd1, scope, block_for_pc (scope), 1);
-      argvec[nargs++] = expr;
+      expression_up expr = parse_exp_1 (&cmd1, scope, block_for_pc (scope), 1);
+      argvec[nargs++] = expr.release ();
       cmdrest = cmd1;
       if (*cmdrest == ',')
 	++cmdrest;
     }
 
+  agent_expr_up aexpr;
+
   /* We don't want to stop processing, so catch any errors
      that may show up.  */
   TRY
@@ -2445,7 +2461,6 @@ parse_cmd_to_aexpr (CORE_ADDR scope, cha
       /* If we got here, it means the command could not be parsed to a valid
 	 bytecode expression and thus can't be evaluated on the target's side.
 	 It's no use iterating through the other commands.  */
-      aexpr = NULL;
     }
   END_CATCH
 
@@ -2467,8 +2482,8 @@ build_target_command_list (struct bp_loc
   int modified = bl->needs_update;
   struct bp_location *loc;
 
-  /* Release commands left over from a previous insert.  */
-  VEC_free (agent_expr_p, bl->target_info.tcommands);
+  /* Clear commands left over from a previous insert.  */
+  bl->target_info.tcommands.clear ();
 
   if (!target_can_run_breakpoint_commands ())
     return;
@@ -2502,18 +2517,13 @@ build_target_command_list (struct bp_loc
 	{
 	  if (modified)
 	    {
-	      struct agent_expr *aexpr;
-
 	      /* Re-parse the commands since something changed.  In that
 		 case we already freed the command bytecodes (see
 		 force_breakpoint_reinsertion).  We just
 		 need to parse the command to bytecodes again.  */
-	      aexpr = parse_cmd_to_aexpr (bl->address,
-					  loc->owner->extra_string);
-	      loc->cmd_bytecode = aexpr;
-
-	      if (!aexpr)
-		continue;
+	      loc->cmd_bytecode
+		= parse_cmd_to_aexpr (bl->address,
+				      loc->owner->extra_string);
 	    }
 
 	  /* If we have a NULL bytecode expression, it means something
@@ -2541,8 +2551,7 @@ build_target_command_list (struct bp_loc
 	      if (loc->cmd_bytecode == NULL)
 		return;
 
-	      free_agent_expr (loc->cmd_bytecode);
-	      loc->cmd_bytecode = NULL;
+	      loc->cmd_bytecode.reset ();
 	    }
 	}
     }
@@ -2557,10 +2566,11 @@ build_target_command_list (struct bp_loc
 	  && loc->pspace->num == bl->pspace->num
 	  && loc->owner->enable_state == bp_enabled
 	  && loc->enabled)
-	/* Add the command to the vector.  This will be used later
-	   to send the commands to the target.  */
-	VEC_safe_push (agent_expr_p, bl->target_info.tcommands,
-		       loc->cmd_bytecode);
+	{
+	  /* Add the command to the vector.  This will be used later
+	     to send the commands to the target.  */
+	  bl->target_info.tcommands.push_back (loc->cmd_bytecode.get ());
+	}
     }
 
   bl->target_info.persist = 0;
@@ -2569,6 +2579,28 @@ build_target_command_list (struct bp_loc
     bl->target_info.persist = 1;
 }
 
+/* Return the kind of breakpoint on address *ADDR.  Get the kind
+   of breakpoint according to ADDR except single-step breakpoint.
+   Get the kind of single-step breakpoint according to the current
+   registers state.  */
+
+static int
+breakpoint_kind (struct bp_location *bl, CORE_ADDR *addr)
+{
+  if (bl->owner->type == bp_single_step)
+    {
+      struct thread_info *thr = find_thread_global_id (bl->owner->thread);
+      struct regcache *regcache;
+
+      regcache = get_thread_regcache (thr->ptid);
+
+      return gdbarch_breakpoint_kind_from_current_state (bl->gdbarch,
+							 regcache, addr);
+    }
+  else
+    return gdbarch_breakpoint_kind_from_pc (bl->gdbarch, addr);
+}
+
 /* Insert a low-level "breakpoint" of some type.  BL is the breakpoint
    location.  Any error messages are printed to TMP_ERROR_STREAM; and
    DISABLED_BREAKS, and HW_BREAKPOINT_ERROR are used to report problems.
@@ -2728,6 +2760,9 @@ insert_bp_location (struct bp_location *
 		    {
 		      int val;
 
+		      bl->overlay_target_info.kind
+			= breakpoint_kind (bl, &addr);
+		      bl->overlay_target_info.placed_address = addr;
 		      val = target_insert_breakpoint (bl->gdbarch,
 						      &bl->overlay_target_info);
 		      if (val)
@@ -3026,14 +3061,13 @@ update_inserted_breakpoint_locations (vo
   int hw_breakpoint_error = 0;
   int hw_bp_details_reported = 0;
 
-  struct ui_file *tmp_error_stream = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_error_stream);
+  string_file tmp_error_stream;
 
   /* Explicitly mark the warning -- this will only be printed if
      there was an error.  */
-  fprintf_unfiltered (tmp_error_stream, "Warning:\n");
+  tmp_error_stream.puts ("Warning:\n");
 
-  save_current_space_and_thread ();
+  struct cleanup *cleanups = save_current_space_and_thread ();
 
   ALL_BP_LOCATIONS (bl, blp_tmp)
     {
@@ -3058,7 +3092,7 @@ update_inserted_breakpoint_locations (vo
 	  && ptid_equal (inferior_ptid, null_ptid))
 	continue;
 
-      val = insert_bp_location (bl, tmp_error_stream, &disabled_breaks,
+      val = insert_bp_location (bl, &tmp_error_stream, &disabled_breaks,
 				    &hw_breakpoint_error, &hw_bp_details_reported);
       if (val)
 	error_flag = val;
@@ -3086,14 +3120,13 @@ insert_breakpoint_locations (void)
   int hw_breakpoint_error = 0;
   int hw_bp_error_explained_already = 0;
 
-  struct ui_file *tmp_error_stream = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_error_stream);
-  
+  string_file tmp_error_stream;
+
   /* Explicitly mark the warning -- this will only be printed if
      there was an error.  */
-  fprintf_unfiltered (tmp_error_stream, "Warning:\n");
+  tmp_error_stream.puts ("Warning:\n");
 
-  save_current_space_and_thread ();
+  struct cleanup *cleanups = save_current_space_and_thread ();
 
   ALL_BP_LOCATIONS (bl, blp_tmp)
     {
@@ -3104,7 +3137,7 @@ insert_breakpoint_locations (void)
 	 the thread no longer exists.  ALL_BP_LOCATIONS bp_location
 	 has BL->OWNER always non-NULL.  */
       if (bl->owner->thread != -1
-	  && !valid_thread_id (bl->owner->thread))
+	  && !valid_global_thread_id (bl->owner->thread))
 	continue;
 
       switch_to_program_space_and_thread (bl->pspace);
@@ -3117,7 +3150,7 @@ insert_breakpoint_locations (void)
 	  && ptid_equal (inferior_ptid, null_ptid))
 	continue;
 
-      val = insert_bp_location (bl, tmp_error_stream, &disabled_breaks,
+      val = insert_bp_location (bl, &tmp_error_stream, &disabled_breaks,
 				    &hw_breakpoint_error, &hw_bp_error_explained_already);
       if (val)
 	error_flag = val;
@@ -3149,12 +3182,12 @@ insert_breakpoint_locations (void)
 	{
 	  for (loc = bpt->loc; loc; loc = loc->next)
 	    if (loc->inserted)
-	      remove_breakpoint (loc, mark_uninserted);
+	      remove_breakpoint (loc);
 
 	  hw_breakpoint_error = 1;
-	  fprintf_unfiltered (tmp_error_stream,
-			      "Could not insert hardware watchpoint %d.\n", 
-			      bpt->number);
+	  tmp_error_stream.printf ("Could not insert "
+				   "hardware watchpoint %d.\n",
+				   bpt->number);
 	  error_flag = -1;
 	}
     }
@@ -3165,8 +3198,7 @@ insert_breakpoint_locations (void)
          message about possibly exhausted resources.  */
       if (hw_breakpoint_error && !hw_bp_error_explained_already)
 	{
-	  fprintf_unfiltered (tmp_error_stream, 
-			      "Could not insert hardware breakpoints:\n\
+	  tmp_error_stream.printf ("Could not insert hardware breakpoints:\n\
 You may have requested too many hardware breakpoints/watchpoints.\n");
 	}
       target_terminal_ours_for_output ();
@@ -3189,7 +3221,7 @@ remove_breakpoints (void)
   ALL_BP_LOCATIONS (bl, blp_tmp)
   {
     if (bl->inserted && !is_tracepoint (bl->owner))
-      val |= remove_breakpoint (bl, mark_uninserted);
+      val |= remove_breakpoint (bl);
   }
   return val;
 }
@@ -3204,13 +3236,13 @@ remove_threaded_breakpoints (struct thre
 
   ALL_BREAKPOINTS_SAFE (b, b_tmp)
     {
-      if (b->thread == tp->num && user_breakpoint_p (b))
+      if (b->thread == tp->global_num && user_breakpoint_p (b))
 	{
 	  b->disposition = disp_del_at_next_stop;
 
 	  printf_filtered (_("\
-Thread-specific breakpoint %d deleted - thread %d no longer in the thread list.\n"),
-			  b->number, tp->num);
+Thread-specific breakpoint %d deleted - thread %s no longer in the thread list.\n"),
+			   b->number, print_thread_id (tp));
 
 	  /* Hide it from the user.  */
 	  b->number = 0;
@@ -3234,7 +3266,7 @@ remove_breakpoints_pid (int pid)
 
     if (bl->inserted && !bl->target_info.persist)
       {
-	val = remove_breakpoint (bl, mark_uninserted);
+	val = remove_breakpoint (bl);
 	if (val != 0)
 	  return val;
       }
@@ -3248,7 +3280,6 @@ reattach_breakpoints (int pid)
   struct cleanup *old_chain;
   struct bp_location *bl, **blp_tmp;
   int val;
-  struct ui_file *tmp_error_stream;
   int dummy1 = 0, dummy2 = 0, dummy3 = 0;
   struct inferior *inf;
   struct thread_info *tp;
@@ -3262,8 +3293,7 @@ reattach_breakpoints (int pid)
 
   inferior_ptid = tp->ptid;
 
-  tmp_error_stream = mem_fileopen ();
-  make_cleanup_ui_file_delete (tmp_error_stream);
+  string_file tmp_error_stream;
 
   ALL_BP_LOCATIONS (bl, blp_tmp)
   {
@@ -3273,7 +3303,7 @@ reattach_breakpoints (int pid)
     if (bl->inserted)
       {
 	bl->inserted = 0;
-	val = insert_bp_location (bl, tmp_error_stream, &dummy1, &dummy2, &dummy3);
+	val = insert_bp_location (bl, &tmp_error_stream, &dummy1, &dummy2, &dummy3);
 	if (val != 0)
 	  {
 	    do_cleanups (old_chain);
@@ -3381,11 +3411,12 @@ get_breakpoint_objfile_data (struct objf
 {
   struct breakpoint_objfile_data *bp_objfile_data;
 
-  bp_objfile_data = objfile_data (objfile, breakpoint_objfile_key);
+  bp_objfile_data = ((struct breakpoint_objfile_data *)
+		     objfile_data (objfile, breakpoint_objfile_key));
   if (bp_objfile_data == NULL)
     {
-      bp_objfile_data = obstack_alloc (&objfile->objfile_obstack,
-				       sizeof (*bp_objfile_data));
+      bp_objfile_data =
+	XOBNEW (&objfile->objfile_obstack, struct breakpoint_objfile_data);
 
       memset (bp_objfile_data, 0, sizeof (*bp_objfile_data));
       set_objfile_data (objfile, breakpoint_objfile_key, bp_objfile_data);
@@ -3396,7 +3427,8 @@ get_breakpoint_objfile_data (struct objf
 static void
 free_breakpoint_probes (struct objfile *obj, void *data)
 {
-  struct breakpoint_objfile_data *bp_objfile_data = data;
+  struct breakpoint_objfile_data *bp_objfile_data
+    = (struct breakpoint_objfile_data *) data;
 
   VEC_free (probe_p, bp_objfile_data->longjmp_probes);
   VEC_free (probe_p, bp_objfile_data->exception_probes);
@@ -3413,6 +3445,7 @@ create_overlay_event_breakpoint (void)
       struct breakpoint *b;
       struct breakpoint_objfile_data *bp_objfile_data;
       CORE_ADDR addr;
+      struct explicit_location explicit_loc;
 
       bp_objfile_data = get_breakpoint_objfile_data (objfile);
 
@@ -3437,7 +3470,9 @@ create_overlay_event_breakpoint (void)
       b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
                                       bp_overlay_event,
 				      &internal_breakpoint_ops);
-      b->addr_string = xstrdup (func_name);
+      initialize_explicit_location (&explicit_loc);
+      explicit_loc.function_name = ASTRDUP (func_name);
+      b->location = new_explicit_location (&explicit_loc);
 
       if (overlay_debugging == ovly_auto)
         {
@@ -3450,7 +3485,6 @@ create_overlay_event_breakpoint (void)
          overlay_events_enabled = 0;
        }
     }
-  update_global_location_list (UGLL_MAY_INSERT);
 }
 
 static void
@@ -3518,7 +3552,8 @@ create_longjmp_master_breakpoint (void)
 								 objfile),
 					      bp_longjmp_master,
 					      &internal_breakpoint_ops);
-	      b->addr_string = xstrdup ("-probe-stap libc:longjmp");
+	      b->location
+		= new_probe_location ("-probe-stap libc:longjmp");
 	      b->enable_state = bp_disabled;
 	    }
 
@@ -3533,6 +3568,7 @@ create_longjmp_master_breakpoint (void)
 	  struct breakpoint *b;
 	  const char *func_name;
 	  CORE_ADDR addr;
+	  struct explicit_location explicit_loc;
 
 	  if (msym_not_found_p (bp_objfile_data->longjmp_msym[i].minsym))
 	    continue;
@@ -3555,12 +3591,13 @@ create_longjmp_master_breakpoint (void)
 	  addr = BMSYMBOL_VALUE_ADDRESS (bp_objfile_data->longjmp_msym[i]);
 	  b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master,
 					  &internal_breakpoint_ops);
-	  b->addr_string = xstrdup (func_name);
+	  initialize_explicit_location (&explicit_loc);
+	  explicit_loc.function_name = ASTRDUP (func_name);
+	  b->location = new_explicit_location (&explicit_loc);
 	  b->enable_state = bp_disabled;
 	}
     }
   }
-  update_global_location_list (UGLL_MAY_INSERT);
 
   do_cleanups (old_chain);
 }
@@ -3586,6 +3623,7 @@ create_std_terminate_master_breakpoint (
     {
       struct breakpoint *b;
       struct breakpoint_objfile_data *bp_objfile_data;
+      struct explicit_location explicit_loc;
 
       bp_objfile_data = get_breakpoint_objfile_data (objfile);
 
@@ -3611,13 +3649,13 @@ create_std_terminate_master_breakpoint (
       b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
                                       bp_std_terminate_master,
 				      &internal_breakpoint_ops);
-      b->addr_string = xstrdup (func_name);
+      initialize_explicit_location (&explicit_loc);
+      explicit_loc.function_name = ASTRDUP (func_name);
+      b->location = new_explicit_location (&explicit_loc);
       b->enable_state = bp_disabled;
     }
   }
 
-  update_global_location_list (UGLL_MAY_INSERT);
-
   do_cleanups (old_chain);
 }
 
@@ -3635,6 +3673,7 @@ create_exception_master_breakpoint (void
       struct gdbarch *gdbarch;
       struct breakpoint_objfile_data *bp_objfile_data;
       CORE_ADDR addr;
+      struct explicit_location explicit_loc;
 
       bp_objfile_data = get_breakpoint_objfile_data (objfile);
 
@@ -3681,7 +3720,8 @@ create_exception_master_breakpoint (void
 								 objfile),
 					      bp_exception_master,
 					      &internal_breakpoint_ops);
-	      b->addr_string = xstrdup ("-probe-stap libgcc:unwind");
+	      b->location
+		= new_probe_location ("-probe-stap libgcc:unwind");
 	      b->enable_state = bp_disabled;
 	    }
 
@@ -3714,11 +3754,19 @@ create_exception_master_breakpoint (void
 						 &current_target);
       b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
 				      &internal_breakpoint_ops);
-      b->addr_string = xstrdup (func_name);
+      initialize_explicit_location (&explicit_loc);
+      explicit_loc.function_name = ASTRDUP (func_name);
+      b->location = new_explicit_location (&explicit_loc);
       b->enable_state = bp_disabled;
     }
+}
 
-  update_global_location_list (UGLL_MAY_INSERT);
+/* Does B have a location spec?  */
+
+static int
+breakpoint_event_location_empty_p (const struct breakpoint *b)
+{
+  return b->location != NULL && event_location_empty_p (b->location);
 }
 
 void
@@ -3835,7 +3883,7 @@ update_breakpoints_after_exec (void)
     /* Without a symbolic address, we have little hope of the
        pre-exec() address meaning the same thing in the post-exec()
        a.out.  */
-    if (b->addr_string == NULL)
+    if (breakpoint_event_location_empty_p (b))
       {
 	delete_breakpoint (b);
 	continue;
@@ -3871,7 +3919,7 @@ detach_breakpoints (ptid_t ptid)
       continue;
 
     if (bl->inserted)
-      val |= remove_breakpoint_1 (bl, mark_inserted);
+      val |= remove_breakpoint_1 (bl, DETACH_BREAKPOINT);
   }
 
   do_cleanups (old_chain);
@@ -3885,17 +3933,13 @@ detach_breakpoints (ptid_t ptid)
    *not* look at bl->pspace->aspace here.  */
 
 static int
-remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is)
+remove_breakpoint_1 (struct bp_location *bl, enum remove_bp_reason reason)
 {
   int val;
 
   /* BL is never in moribund_locations by our callers.  */
   gdb_assert (bl->owner != NULL);
 
-  if (bl->permanent)
-    /* Permanent breakpoints cannot be inserted or removed.  */
-    return 0;
-
   /* The type of none suggests that owner is actually deleted.
      This should not ever happen.  */
   gdb_assert (bl->owner->type != bp_none);
@@ -3937,7 +3981,7 @@ remove_breakpoint_1 (struct bp_location 
 	      && !memory_validate_breakpoint (bl->gdbarch, &bl->target_info))
 	    val = 0;
 	  else
-	    val = bl->owner->ops->remove_location (bl);
+	    val = bl->owner->ops->remove_location (bl, reason);
 	}
       else
 	{
@@ -3955,7 +3999,8 @@ remove_breakpoint_1 (struct bp_location 
 					       &bl->overlay_target_info);
 		else
 		  target_remove_breakpoint (bl->gdbarch,
-					    &bl->overlay_target_info);
+					    &bl->overlay_target_info,
+					    reason);
 	      }
 	  /* Did we set a breakpoint at the VMA? 
 	     If so, we will have marked the breakpoint 'inserted'.  */
@@ -3971,7 +4016,7 @@ remove_breakpoint_1 (struct bp_location 
 		 wrong code with the saved shadow contents.  */
 	      if (bl->loc_type == bp_loc_hardware_breakpoint
 		  || section_is_mapped (bl->section))
-		val = bl->owner->ops->remove_location (bl);
+		val = bl->owner->ops->remove_location (bl, reason);
 	      else
 		val = 0;
 	    }
@@ -4001,18 +4046,18 @@ remove_breakpoint_1 (struct bp_location 
 
       if (val)
 	return val;
-      bl->inserted = (is == mark_inserted);
+      bl->inserted = (reason == DETACH_BREAKPOINT);
     }
   else if (bl->loc_type == bp_loc_hardware_watchpoint)
     {
       gdb_assert (bl->owner->ops != NULL
 		  && bl->owner->ops->remove_location != NULL);
 
-      bl->inserted = (is == mark_inserted);
-      bl->owner->ops->remove_location (bl);
+      bl->inserted = (reason == DETACH_BREAKPOINT);
+      bl->owner->ops->remove_location (bl, reason);
 
       /* Failure to remove any of the hardware watchpoints comes here.  */
-      if ((is == mark_uninserted) && (bl->inserted))
+      if (reason == REMOVE_BREAKPOINT && bl->inserted)
 	warning (_("Could not remove hardware watchpoint %d."),
 		 bl->owner->number);
     }
@@ -4023,18 +4068,18 @@ remove_breakpoint_1 (struct bp_location 
       gdb_assert (bl->owner->ops != NULL
 		  && bl->owner->ops->remove_location != NULL);
 
-      val = bl->owner->ops->remove_location (bl);
+      val = bl->owner->ops->remove_location (bl, reason);
       if (val)
 	return val;
 
-      bl->inserted = (is == mark_inserted);
+      bl->inserted = (reason == DETACH_BREAKPOINT);
     }
 
   return 0;
 }
 
 static int
-remove_breakpoint (struct bp_location *bl, insertion_state_t is)
+remove_breakpoint (struct bp_location *bl)
 {
   int ret;
   struct cleanup *old_chain;
@@ -4042,10 +4087,6 @@ remove_breakpoint (struct bp_location *b
   /* BL is never in moribund_locations by our callers.  */
   gdb_assert (bl->owner != NULL);
 
-  if (bl->permanent)
-    /* Permanent breakpoints cannot be inserted or removed.  */
-    return 0;
-
   /* The type of none suggests that owner is actually deleted.
      This should not ever happen.  */
   gdb_assert (bl->owner->type != bp_none);
@@ -4054,7 +4095,7 @@ remove_breakpoint (struct bp_location *b
 
   switch_to_program_space_and_thread (bl->pspace);
 
-  ret = remove_breakpoint_1 (bl, is);
+  ret = remove_breakpoint_1 (bl, REMOVE_BREAKPOINT);
 
   do_cleanups (old_chain);
   return ret;
@@ -4068,8 +4109,7 @@ mark_breakpoints_out (void)
   struct bp_location *bl, **blp_tmp;
 
   ALL_BP_LOCATIONS (bl, blp_tmp)
-    if (bl->pspace == current_program_space
-	&& !bl->permanent)
+    if (bl->pspace == current_program_space)
       bl->inserted = 0;
 }
 
@@ -4089,7 +4129,7 @@ void
 breakpoint_init_inferior (enum inf_context context)
 {
   struct breakpoint *b, *b_tmp;
-  struct bp_location *bl, **blp_tmp;
+  struct bp_location *bl;
   int ix;
   struct program_space *pspace = current_program_space;
 
@@ -4155,15 +4195,25 @@ breakpoint_init_inferior (enum inf_conte
 	  /* Likewise for watchpoints on local expressions.  */
 	  if (w->exp_valid_block != NULL)
 	    delete_breakpoint (b);
-	  else if (context == inf_starting)
+	  else
 	    {
-	      /* Reset val field to force reread of starting value in
-		 insert_breakpoints.  */
-	      if (w->val)
-		value_free (w->val);
-	      w->val = NULL;
-	      w->val_valid = 0;
-	  }
+	      /* Get rid of existing locations, which are no longer
+		 valid.  New ones will be created in
+		 update_watchpoint, when the inferior is restarted.
+		 The next update_global_location_list call will
+		 garbage collect them.  */
+	      b->loc = NULL;
+
+	      if (context == inf_starting)
+		{
+		  /* Reset val field to force reread of starting value in
+		     insert_breakpoints.  */
+		  if (w->val)
+		    value_free (w->val);
+		  w->val = NULL;
+		  w->val_valid = 0;
+		}
+	    }
 	}
 	break;
       default:
@@ -4220,7 +4270,41 @@ breakpoint_here_p (struct address_space 
 	}
     }
 
-  return any_breakpoint_here ? ordinary_breakpoint_here : 0;
+  return any_breakpoint_here ? ordinary_breakpoint_here : no_breakpoint_here;
+}
+
+/* See breakpoint.h.  */
+
+int
+breakpoint_in_range_p (struct address_space *aspace,
+		       CORE_ADDR addr, ULONGEST len)
+{
+  struct bp_location *bl, **blp_tmp;
+
+  ALL_BP_LOCATIONS (bl, blp_tmp)
+    {
+      if (bl->loc_type != bp_loc_software_breakpoint
+	  && bl->loc_type != bp_loc_hardware_breakpoint)
+	continue;
+
+      if ((breakpoint_enabled (bl->owner)
+	   || bl->permanent)
+	  && breakpoint_location_address_range_overlap (bl, aspace,
+							addr, len))
+	{
+	  if (overlay_debugging
+	      && section_is_overlay (bl->section)
+	      && !section_is_mapped (bl->section))
+	    {
+	      /* Unmapped overlay -- can't be a match.  */
+	      continue;
+	    }
+
+	  return 1;
+	}
+    }
+
+  return 0;
 }
 
 /* Return true if there's a moribund breakpoint at PC.  */
@@ -4265,7 +4349,6 @@ int
 breakpoint_inserted_here_p (struct address_space *aspace, CORE_ADDR pc)
 {
   struct bp_location **blp, **blp_tmp = NULL;
-  struct bp_location *bl;
 
   ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
     {
@@ -4289,7 +4372,6 @@ software_breakpoint_inserted_here_p (str
 				     CORE_ADDR pc)
 {
   struct bp_location **blp, **blp_tmp = NULL;
-  struct bp_location *bl;
 
   ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
     {
@@ -4312,7 +4394,6 @@ hardware_breakpoint_inserted_here_p (str
 				     CORE_ADDR pc)
 {
   struct bp_location **blp, **blp_tmp = NULL;
-  struct bp_location *bl;
 
   ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
     {
@@ -4351,8 +4432,8 @@ hardware_watchpoint_inserted_in_range (s
 	    CORE_ADDR l, h;
 
 	    /* Check for intersection.  */
-	    l = max (loc->address, addr);
-	    h = min (loc->address + loc->length, addr + len);
+	    l = std::max<CORE_ADDR> (loc->address, addr);
+	    h = std::min<CORE_ADDR> (loc->address + loc->length, addr + len);
 	    if (l < h)
 	      return 1;
 	  }
@@ -4599,7 +4680,7 @@ bpstat_do_actions_1 (bpstat *bsp)
   executing_breakpoint_commands = 1;
   old_chain = make_cleanup (cleanup_executing_breakpoints, 0);
 
-  prevent_dont_repeat ();
+  scoped_restore preventer = prevent_dont_repeat ();
 
   /* This pointer will iterate over the list of bpstat's.  */
   bs = *bsp;
@@ -4646,7 +4727,7 @@ bpstat_do_actions_1 (bpstat *bsp)
 
       if (breakpoint_proceeded)
 	{
-	  if (interpreter_async && target_can_async_p ())
+	  if (current_ui->async)
 	    /* If we are in async mode, then the target might be still
 	       running, not stopped at any breakpoint, so nothing for
 	       us to do here -- just return to the event loop.  */
@@ -4708,6 +4789,37 @@ watchpoint_value_print (struct value *va
     }
 }
 
+/* Print the "Thread ID hit" part of "Thread ID hit Breakpoint N" if
+   debugging multiple threads.  */
+
+void
+maybe_print_thread_hit_breakpoint (struct ui_out *uiout)
+{
+  if (uiout->is_mi_like_p ())
+    return;
+
+  uiout->text ("\n");
+
+  if (show_thread_that_caused_stop ())
+    {
+      const char *name;
+      struct thread_info *thr = inferior_thread ();
+
+      uiout->text ("Thread ");
+      uiout->field_fmt ("thread-id", "%s", print_thread_id (thr));
+
+      name = thr->name != NULL ? thr->name : target_thread_name (thr);
+      if (name != NULL)
+	{
+	  uiout->text (" \"");
+	  uiout->field_fmt ("name", "%s", name);
+	  uiout->text ("\"");
+	}
+
+      uiout->text (" hit ");
+    }
+}
+
 /* Generic routine for printing messages indicating why we
    stopped.  The behavior of this function depends on the value
    'print_it' in the bpstat structure.  Under some circumstances we
@@ -4764,17 +4876,15 @@ print_solib_event (int is_catchpoint)
   if (!is_catchpoint)
     {
       if (any_added || any_deleted)
-	ui_out_text (current_uiout,
-		     _("Stopped due to shared library event:\n"));
+	current_uiout->text (_("Stopped due to shared library event:\n"));
       else
-	ui_out_text (current_uiout,
-		     _("Stopped due to shared library event (no "
-		       "libraries added or removed)\n"));
+	current_uiout->text (_("Stopped due to shared library event (no "
+			       "libraries added or removed)\n"));
     }
 
-  if (ui_out_is_mi_like_p (current_uiout))
-    ui_out_field_string (current_uiout, "reason",
-			 async_reason_lookup (EXEC_ASYNC_SOLIB_EVENT));
+  if (current_uiout->is_mi_like_p ())
+    current_uiout->field_string ("reason",
+				 async_reason_lookup (EXEC_ASYNC_SOLIB_EVENT));
 
   if (any_deleted)
     {
@@ -4782,7 +4892,7 @@ print_solib_event (int is_catchpoint)
       char *name;
       int ix;
 
-      ui_out_text (current_uiout, _("  Inferior unloaded "));
+      current_uiout->text (_("  Inferior unloaded "));
       cleanup = make_cleanup_ui_out_list_begin_end (current_uiout,
 						    "removed");
       for (ix = 0;
@@ -4791,9 +4901,9 @@ print_solib_event (int is_catchpoint)
 	   ++ix)
 	{
 	  if (ix > 0)
-	    ui_out_text (current_uiout, "    ");
-	  ui_out_field_string (current_uiout, "library", name);
-	  ui_out_text (current_uiout, "\n");
+	    current_uiout->text ("    ");
+	  current_uiout->field_string ("library", name);
+	  current_uiout->text ("\n");
 	}
 
       do_cleanups (cleanup);
@@ -4805,7 +4915,7 @@ print_solib_event (int is_catchpoint)
       int ix;
       struct cleanup *cleanup;
 
-      ui_out_text (current_uiout, _("  Inferior loaded "));
+      current_uiout->text (_("  Inferior loaded "));
       cleanup = make_cleanup_ui_out_list_begin_end (current_uiout,
 						    "added");
       for (ix = 0;
@@ -4814,9 +4924,9 @@ print_solib_event (int is_catchpoint)
 	   ++ix)
 	{
 	  if (ix > 0)
-	    ui_out_text (current_uiout, "    ");
-	  ui_out_field_string (current_uiout, "library", iter->so_name);
-	  ui_out_text (current_uiout, "\n");
+	    current_uiout->text ("    ");
+	  current_uiout->field_string ("library", iter->so_name);
+	  current_uiout->text ("\n");
 	}
 
       do_cleanups (cleanup);
@@ -4847,7 +4957,7 @@ print_solib_event (int is_catchpoint)
 enum print_stop_action
 bpstat_print (bpstat bs, int kind)
 {
-  int val;
+  enum print_stop_action val;
 
   /* Maybe another breakpoint in the chain caused us to stop.
      (Currently all watchpoints go on the bpstat whether hit or not.
@@ -5091,7 +5201,7 @@ watchpoint_check (void *p)
 	return WP_VALUE_CHANGED;
 
       mark = value_mark ();
-      fetch_subexp_value (b->exp, &pc, &new_val, NULL, NULL, 0);
+      fetch_subexp_value (b->exp.get (), &pc, &new_val, NULL, NULL, 0);
 
       if (b->val_bitsize != 0)
 	new_val = extract_bitfield_from_watchpoint_value (b, new_val);
@@ -5122,8 +5232,6 @@ watchpoint_check (void *p)
     }
   else
     {
-      struct ui_out *uiout = current_uiout;
-
       /* This seems like the only logical thing to do because
          if we temporarily ignored the watchpoint, then when
          we reenter the block in which it is valid it contains
@@ -5137,14 +5245,19 @@ watchpoint_check (void *p)
 	 call breakpoint_ops->print_it this bp will be deleted
 	 already.  So we have no choice but print the information
 	 here.  */
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
-      ui_out_text (uiout, "\nWatchpoint ");
-      ui_out_field_int (uiout, "wpnum", b->base.number);
-      ui_out_text (uiout,
-		   " deleted because the program has left the block in\n\
-which its expression is valid.\n");     
+
+      SWITCH_THRU_ALL_UIS ()
+        {
+	  struct ui_out *uiout = current_uiout;
+
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_string
+	      ("reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
+	  uiout->text ("\nWatchpoint ");
+	  uiout->field_int ("wpnum", b->base.number);
+	  uiout->text (" deleted because the program has left the block in\n"
+		       "which its expression is valid.\n");
+	}
 
       /* Make sure the watchpoint's commands aren't executed.  */
       decref_counted_command_line (&b->base.commands);
@@ -5312,10 +5425,16 @@ bpstat_check_watchpoint (bpstat bs)
 	      /* Can't happen.  */
 	    case 0:
 	      /* Error from catch_errors.  */
-	      printf_filtered (_("Watchpoint %d deleted.\n"), b->base.number);
-	      watchpoint_del_at_next_stop (b);
-	      /* We've already printed what needs to be printed.  */
-	      bs->print_it = print_it_done;
+	      {
+		SWITCH_THRU_ALL_UIS ()
+	          {
+		    printf_filtered (_("Watchpoint %d deleted.\n"),
+				     b->base.number);
+		  }
+		watchpoint_del_at_next_stop (b);
+		/* We've already printed what needs to be printed.  */
+		bs->print_it = print_it_done;
+	      }
 	      break;
 	    }
 	}
@@ -5366,7 +5485,7 @@ bpstat_check_breakpoint_conditions (bpst
   /* If this is a thread/task-specific breakpoint, don't waste cpu
      evaluating the condition if this isn't the specified
      thread/task.  */
-  if ((b->thread != -1 && b->thread != pid_to_thread_id (ptid))
+  if ((b->thread != -1 && b->thread != ptid_to_global_thread_id (ptid))
       || (b->task != 0 && b->task != ada_get_task_number (ptid)))
 
     {
@@ -5382,10 +5501,10 @@ bpstat_check_breakpoint_conditions (bpst
     {
       struct watchpoint *w = (struct watchpoint *) b;
 
-      cond = w->cond_exp;
+      cond = w->cond_exp.get ();
     }
   else
-    cond = bl->cond;
+    cond = bl->cond.get ();
 
   if (cond && b->disposition != disp_del_at_next_stop)
     {
@@ -5678,6 +5797,9 @@ handle_jit_event (void)
   struct frame_info *frame;
   struct gdbarch *gdbarch;
 
+  if (debug_infrun)
+    fprintf_unfiltered (gdb_stdlog, "handling bp_jit_event\n");
+
   /* Switch terminal for any messages produced by
      breakpoint_re_set.  */
   target_terminal_ours_for_output ();
@@ -5698,7 +5820,6 @@ struct bpstat_what
 bpstat_what (bpstat bs_head)
 {
   struct bpstat_what retval;
-  int jit_event = 0;
   bpstat bs;
 
   retval.main_action = BPSTAT_WHAT_KEEP_CHECKING;
@@ -5761,13 +5882,23 @@ bpstat_what (bpstat bs_head)
 	case bp_longjmp:
 	case bp_longjmp_call_dummy:
 	case bp_exception:
-	  this_action = BPSTAT_WHAT_SET_LONGJMP_RESUME;
-	  retval.is_longjmp = bptype != bp_exception;
+	  if (bs->stop)
+	    {
+	      this_action = BPSTAT_WHAT_SET_LONGJMP_RESUME;
+	      retval.is_longjmp = bptype != bp_exception;
+	    }
+	  else
+	    this_action = BPSTAT_WHAT_SINGLE;
 	  break;
 	case bp_longjmp_resume:
 	case bp_exception_resume:
-	  this_action = BPSTAT_WHAT_CLEAR_LONGJMP_RESUME;
-	  retval.is_longjmp = bptype == bp_longjmp_resume;
+	  if (bs->stop)
+	    {
+	      this_action = BPSTAT_WHAT_CLEAR_LONGJMP_RESUME;
+	      retval.is_longjmp = bptype == bp_longjmp_resume;
+	    }
+	  else
+	    this_action = BPSTAT_WHAT_SINGLE;
 	  break;
 	case bp_step_resume:
 	  if (bs->stop)
@@ -5810,7 +5941,6 @@ bpstat_what (bpstat bs_head)
 	    }
 	  break;
 	case bp_jit_event:
-	  jit_event = 1;
 	  this_action = BPSTAT_WHAT_SINGLE;
 	  break;
 	case bp_call_dummy:
@@ -5856,19 +5986,16 @@ bpstat_what (bpstat bs_head)
 			  _("bpstat_what: unhandled bptype %d"), (int) bptype);
 	}
 
-      retval.main_action = max (retval.main_action, this_action);
+      retval.main_action = std::max (retval.main_action, this_action);
     }
 
-  /* These operations may affect the bs->breakpoint_at state so they are
-     delayed after MAIN_ACTION is decided above.  */
-
-  if (jit_event)
-    {
-      if (debug_infrun)
-	fprintf_unfiltered (gdb_stdlog, "bpstat_what: bp_jit_event\n");
+  return retval;
+}
 
-      handle_jit_event ();
-    }
+void
+bpstat_run_callbacks (bpstat bs_head)
+{
+  bpstat bs;
 
   for (bs = bs_head; bs != NULL; bs = bs->next)
     {
@@ -5878,6 +6005,9 @@ bpstat_what (bpstat bs_head)
 	continue;
       switch (b->type)
 	{
+	case bp_jit_event:
+	  handle_jit_event ();
+	  break;
 	case bp_gnu_ifunc_resolver:
 	  gnu_ifunc_resolver_stop (b);
 	  break;
@@ -5886,8 +6016,6 @@ bpstat_what (bpstat bs_head)
 	  break;
 	}
     }
-
-  return retval;
 }
 
 /* Nonzero if we should step constantly (e.g. watchpoints on machines
@@ -5926,10 +6054,10 @@ wrap_indent_at_field (struct ui_out *uio
 {
   static char wrap_indent[80];
   int i, total_width, width, align;
-  char *text;
+  const char *text;
 
   total_width = 0;
-  for (i = 1; ui_out_query_field (uiout, i, &width, &align, &text); i++)
+  for (i = 1; uiout->query_table_field (i, &width, &align, &text); i++)
     {
       if (strcmp (text, col_name) == 0)
 	{
@@ -6022,52 +6150,60 @@ print_breakpoint_location (struct breakp
     set_current_program_space (loc->pspace);
 
   if (b->display_canonical)
-    ui_out_field_string (uiout, "what", b->addr_string);
+    uiout->field_string ("what", event_location_to_string (b->location));
   else if (loc && loc->symtab)
     {
       struct symbol *sym 
 	= find_pc_sect_function (loc->address, loc->section);
       if (sym)
 	{
-	  ui_out_text (uiout, "in ");
-	  ui_out_field_string (uiout, "func",
-			       SYMBOL_PRINT_NAME (sym));
-	  ui_out_text (uiout, " ");
-	  ui_out_wrap_hint (uiout, wrap_indent_at_field (uiout, "what"));
-	  ui_out_text (uiout, "at ");
+	  uiout->text ("in ");
+	  uiout->field_string ("func", SYMBOL_PRINT_NAME (sym));
+	  uiout->text (" ");
+	  uiout->wrap_hint (wrap_indent_at_field (uiout, "what"));
+	  uiout->text ("at ");
 	}
-      ui_out_field_string (uiout, "file",
+      uiout->field_string ("file",
 			   symtab_to_filename_for_display (loc->symtab));
-      ui_out_text (uiout, ":");
+      uiout->text (":");
 
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "fullname",
-			     symtab_to_fullname (loc->symtab));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("fullname", symtab_to_fullname (loc->symtab));
       
-      ui_out_field_int (uiout, "line", loc->line_number);
+      uiout->field_int ("line", loc->line_number);
     }
   else if (loc)
     {
-      struct ui_file *stb = mem_fileopen ();
-      struct cleanup *stb_chain = make_cleanup_ui_file_delete (stb);
+      string_file stb;
 
-      print_address_symbolic (loc->gdbarch, loc->address, stb,
+      print_address_symbolic (loc->gdbarch, loc->address, &stb,
 			      demangle, "");
-      ui_out_field_stream (uiout, "at", stb);
-
-      do_cleanups (stb_chain);
+      uiout->field_stream ("at", stb);
     }
   else
-    ui_out_field_string (uiout, "pending", b->addr_string);
+    {
+      uiout->field_string ("pending", event_location_to_string (b->location));
+      /* If extra_string is available, it could be holding a condition
+	 or dprintf arguments.  In either case, make sure it is printed,
+	 too, but only for non-MI streams.  */
+      if (!uiout->is_mi_like_p () && b->extra_string != NULL)
+	{
+	  if (b->type == bp_dprintf)
+	    uiout->text (",");
+	  else
+	    uiout->text (" ");
+	  uiout->text (b->extra_string);
+	}
+    }
 
   if (loc && is_breakpoint (b)
       && breakpoint_condition_evaluation_mode () == condition_evaluation_target
       && bp_condition_evaluator (b) == condition_evaluation_both)
     {
-      ui_out_text (uiout, " (");
-      ui_out_field_string (uiout, "evaluated-by",
+      uiout->text (" (");
+      uiout->field_string ("evaluated-by",
 			   bp_location_condition_evaluator (loc));
-      ui_out_text (uiout, ")");
+      uiout->text (")");
     }
 
   do_cleanups (old_chain);
@@ -6138,7 +6274,7 @@ output_thread_groups (struct ui_out *uio
 		      int mi_only)
 {
   struct cleanup *back_to;
-  int is_mi = ui_out_is_mi_like_p (uiout);
+  int is_mi = uiout->is_mi_like_p ();
   int inf;
   int i;
 
@@ -6156,16 +6292,16 @@ output_thread_groups (struct ui_out *uio
 	  char mi_group[10];
 
 	  xsnprintf (mi_group, sizeof (mi_group), "i%d", inf);
-	  ui_out_field_string (uiout, NULL, mi_group);
+	  uiout->field_string (NULL, mi_group);
 	}
       else
 	{
 	  if (i == 0)
-	    ui_out_text (uiout, " inf ");
+	    uiout->text (" inf ");
 	  else
-	    ui_out_text (uiout, ", ");
+	    uiout->text (", ");
 	
-	  ui_out_text (uiout, plongest (inf));
+	  uiout->text (plongest (inf));
 	}
     }
 
@@ -6209,37 +6345,36 @@ print_one_breakpoint_location (struct br
     {
       char *formatted;
       formatted = xstrprintf ("%d.%d", b->number, loc_number);
-      ui_out_field_string (uiout, "number", formatted);
+      uiout->field_string ("number", formatted);
       xfree (formatted);
     }
   else
     {
-      ui_out_field_int (uiout, "number", b->number);
+      uiout->field_int ("number", b->number);
     }
 
   /* 2 */
   annotate_field (1);
   if (part_of_multiple)
-    ui_out_field_skip (uiout, "type");
+    uiout->field_skip ("type");
   else
-    ui_out_field_string (uiout, "type", bptype_string (b->type));
+    uiout->field_string ("type", bptype_string (b->type));
 
   /* 3 */
   annotate_field (2);
   if (part_of_multiple)
-    ui_out_field_skip (uiout, "disp");
+    uiout->field_skip ("disp");
   else
-    ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+    uiout->field_string ("disp", bpdisp_text (b->disposition));
 
 
   /* 4 */
   annotate_field (3);
   if (part_of_multiple)
-    ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
+    uiout->field_string ("enabled", loc->enabled ? "y" : "n");
   else
-    ui_out_field_fmt (uiout, "enabled", "%c", 
-		      bpenables[(int) b->enable_state]);
-  ui_out_spaces (uiout, 2);
+    uiout->field_fmt ("enabled", "%c", bpenables[(int) b->enable_state]);
+  uiout->spaces (2);
 
   
   /* 5 and 6 */
@@ -6270,9 +6405,9 @@ print_one_breakpoint_location (struct br
 	     not line up too nicely with the headers, but the effect
 	     is relatively readable).  */
 	  if (opts.addressprint)
-	    ui_out_field_skip (uiout, "addr");
+	    uiout->field_skip ("addr");
 	  annotate_field (5);
-	  ui_out_field_string (uiout, "what", w->exp_string);
+	  uiout->field_string ("what", w->exp_string);
 	}
 	break;
 
@@ -6308,11 +6443,11 @@ print_one_breakpoint_location (struct br
 	  {
 	    annotate_field (4);
 	    if (header_of_multiple)
-	      ui_out_field_string (uiout, "addr", "<MULTIPLE>");
+	      uiout->field_string ("addr", "<MULTIPLE>");
 	    else if (b->loc == NULL || loc->shlib_disabled)
-	      ui_out_field_string (uiout, "addr", "<PENDING>");
+	      uiout->field_string ("addr", "<PENDING>");
 	    else
-	      ui_out_field_core_addr (uiout, "addr",
+	      uiout->field_core_addr ("addr",
 				      loc->gdbarch, loc->address);
 	  }
 	annotate_field (5);
@@ -6356,17 +6491,17 @@ print_one_breakpoint_location (struct br
 	{
 	  /* FIXME: This seems to be redundant and lost here; see the
 	     "stop only in" line a little further down.  */
-	  ui_out_text (uiout, " thread ");
-	  ui_out_field_int (uiout, "thread", b->thread);
+	  uiout->text (" thread ");
+	  uiout->field_int ("thread", b->thread);
 	}
       else if (b->task != 0)
 	{
-	  ui_out_text (uiout, " task ");
-	  ui_out_field_int (uiout, "task", b->task);
+	  uiout->text (" task ");
+	  uiout->field_int ("task", b->task);
 	}
     }
 
-  ui_out_text (uiout, "\n");
+  uiout->text ("\n");
 
   if (!part_of_multiple)
     b->ops->print_one_detail (b, uiout);
@@ -6374,22 +6509,22 @@ print_one_breakpoint_location (struct br
   if (part_of_multiple && frame_id_p (b->frame_id))
     {
       annotate_field (6);
-      ui_out_text (uiout, "\tstop only in stack frame at ");
+      uiout->text ("\tstop only in stack frame at ");
       /* FIXME: cagney/2002-12-01: Shouldn't be poking around inside
          the frame ID.  */
-      ui_out_field_core_addr (uiout, "frame",
+      uiout->field_core_addr ("frame",
 			      b->gdbarch, b->frame_id.stack_addr);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
     }
   
   if (!part_of_multiple && b->cond_string)
     {
       annotate_field (7);
       if (is_tracepoint (b))
-	ui_out_text (uiout, "\ttrace only if ");
+	uiout->text ("\ttrace only if ");
       else
-	ui_out_text (uiout, "\tstop only if ");
-      ui_out_field_string (uiout, "cond", b->cond_string);
+	uiout->text ("\tstop only if ");
+      uiout->field_string ("cond", b->cond_string);
 
       /* Print whether the target is doing the breakpoint's condition
 	 evaluation.  If GDB is doing the evaluation, don't print anything.  */
@@ -6397,20 +6532,27 @@ print_one_breakpoint_location (struct br
 	  && breakpoint_condition_evaluation_mode ()
 	  == condition_evaluation_target)
 	{
-	  ui_out_text (uiout, " (");
-	  ui_out_field_string (uiout, "evaluated-by",
+	  uiout->text (" (");
+	  uiout->field_string ("evaluated-by",
 			       bp_condition_evaluator (b));
-	  ui_out_text (uiout, " evals)");
+	  uiout->text (" evals)");
 	}
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
     }
 
   if (!part_of_multiple && b->thread != -1)
     {
       /* FIXME should make an annotation for this.  */
-      ui_out_text (uiout, "\tstop only in thread ");
-      ui_out_field_int (uiout, "thread", b->thread);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\tstop only in thread ");
+      if (uiout->is_mi_like_p ())
+	uiout->field_int ("thread", b->thread);
+      else
+	{
+	  struct thread_info *thr = find_thread_global_id (b->thread);
+
+	  uiout->field_string ("thread", print_thread_id (thr));
+	}
+      uiout->text ("\n");
     }
   
   if (!part_of_multiple)
@@ -6419,32 +6561,32 @@ print_one_breakpoint_location (struct br
 	{
 	  /* FIXME should make an annotation for this.  */
 	  if (is_catchpoint (b))
-	    ui_out_text (uiout, "\tcatchpoint");
+	    uiout->text ("\tcatchpoint");
 	  else if (is_tracepoint (b))
-	    ui_out_text (uiout, "\ttracepoint");
+	    uiout->text ("\ttracepoint");
 	  else
-	    ui_out_text (uiout, "\tbreakpoint");
-	  ui_out_text (uiout, " already hit ");
-	  ui_out_field_int (uiout, "times", b->hit_count);
+	    uiout->text ("\tbreakpoint");
+	  uiout->text (" already hit ");
+	  uiout->field_int ("times", b->hit_count);
 	  if (b->hit_count == 1)
-	    ui_out_text (uiout, " time\n");
+	    uiout->text (" time\n");
 	  else
-	    ui_out_text (uiout, " times\n");
+	    uiout->text (" times\n");
 	}
       else
 	{
 	  /* Output the count also if it is zero, but only if this is mi.  */
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_int (uiout, "times", b->hit_count);
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_int ("times", b->hit_count);
 	}
     }
 
   if (!part_of_multiple && b->ignore_count)
     {
       annotate_field (8);
-      ui_out_text (uiout, "\tignore next ");
-      ui_out_field_int (uiout, "ignore", b->ignore_count);
-      ui_out_text (uiout, " hits\n");
+      uiout->text ("\tignore next ");
+      uiout->field_int ("ignore", b->ignore_count);
+      uiout->text (" hits\n");
     }
 
   /* Note that an enable count of 1 corresponds to "enable once"
@@ -6453,15 +6595,15 @@ print_one_breakpoint_location (struct br
   if (!part_of_multiple && b->enable_count > 1)
     {
       annotate_field (8);
-      ui_out_text (uiout, "\tdisable after ");
+      uiout->text ("\tdisable after ");
       /* Tweak the wording to clarify that ignore and enable counts
 	 are distinct, and have additive effect.  */
       if (b->ignore_count)
-	ui_out_text (uiout, "additional ");
+	uiout->text ("additional ");
       else
-	ui_out_text (uiout, "next ");
-      ui_out_field_int (uiout, "enable", b->enable_count);
-      ui_out_text (uiout, " hits\n");
+	uiout->text ("next ");
+      uiout->field_int ("enable", b->enable_count);
+      uiout->text (" hits\n");
     }
 
   if (!part_of_multiple && is_tracepoint (b))
@@ -6470,9 +6612,9 @@ print_one_breakpoint_location (struct br
 
       if (tp->traceframe_usage)
 	{
-	  ui_out_text (uiout, "\ttrace buffer usage ");
-	  ui_out_field_int (uiout, "traceframe-usage", tp->traceframe_usage);
-	  ui_out_text (uiout, " bytes\n");
+	  uiout->text ("\ttrace buffer usage ");
+	  uiout->field_int ("traceframe-usage", tp->traceframe_usage);
+	  uiout->text (" bytes\n");
 	}
     }
 
@@ -6494,9 +6636,9 @@ print_one_breakpoint_location (struct br
       if (!part_of_multiple && t->pass_count)
 	{
 	  annotate_field (10);
-	  ui_out_text (uiout, "\tpass count ");
-	  ui_out_field_int (uiout, "pass", t->pass_count);
-	  ui_out_text (uiout, " \n");
+	  uiout->text ("\tpass count ");
+	  uiout->field_int ("pass", t->pass_count);
+	  uiout->text (" \n");
 	}
 
       /* Don't display it when tracepoint or tracepoint location is
@@ -6505,30 +6647,32 @@ print_one_breakpoint_location (struct br
 	{
 	  annotate_field (11);
 
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_string (uiout, "installed",
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_string ("installed",
 				 loc->inserted ? "y" : "n");
 	  else
 	    {
 	      if (loc->inserted)
-		ui_out_text (uiout, "\t");
+		uiout->text ("\t");
 	      else
-		ui_out_text (uiout, "\tnot ");
-	      ui_out_text (uiout, "installed on target\n");
+		uiout->text ("\tnot ");
+	      uiout->text ("installed on target\n");
 	    }
 	}
     }
 
-  if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
+  if (uiout->is_mi_like_p () && !part_of_multiple)
     {
       if (is_watchpoint (b))
 	{
 	  struct watchpoint *w = (struct watchpoint *) b;
 
-	  ui_out_field_string (uiout, "original-location", w->exp_string);
+	  uiout->field_string ("original-location", w->exp_string);
 	}
-      else if (b->addr_string)
-	ui_out_field_string (uiout, "original-location", b->addr_string);
+      else if (b->location != NULL
+	       && event_location_to_string (b->location) != NULL)
+	uiout->field_string ("original-location",
+			     event_location_to_string (b->location));
     }
 }
 
@@ -6581,15 +6725,15 @@ breakpoint_address_bits (struct breakpoi
   int print_address_bits = 0;
   struct bp_location *loc;
 
+  /* Software watchpoints that aren't watching memory don't have an
+     address to print.  */
+  if (is_no_memory_software_watchpoint (b))
+    return 0;
+
   for (loc = b->loc; loc; loc = loc->next)
     {
       int addr_bit;
 
-      /* Software watchpoints that aren't watching memory don't have
-	 an address to print.  */
-      if (b->type == bp_watchpoint && loc->watchpoint_type == -1)
-	continue;
-
       addr_bit = gdbarch_addr_bit (loc->gdbarch);
       if (addr_bit > print_address_bits)
 	print_address_bits = addr_bit;
@@ -6606,7 +6750,8 @@ struct captured_breakpoint_query_args
 static int
 do_captured_breakpoint_query (struct ui_out *uiout, void *data)
 {
-  struct captured_breakpoint_query_args *args = data;
+  struct captured_breakpoint_query_args *args
+    = (struct captured_breakpoint_query_args *) data;
   struct breakpoint *b;
   struct bp_location *dummy_loc = NULL;
 
@@ -6646,6 +6791,14 @@ user_breakpoint_p (struct breakpoint *b)
   return b->number > 0;
 }
 
+/* See breakpoint.h.  */
+
+int
+pending_breakpoint_p (struct breakpoint *b)
+{
+  return b->loc == NULL;
+}
+
 /* Print information on user settable breakpoint (watchpoint, etc)
    number BNUM.  If BNUM is -1 print all user-settable breakpoints.
    If ALLFLAG is non-zero, include non-user-settable breakpoints.  If
@@ -6718,32 +6871,29 @@ breakpoint_1 (char *args, int allflag, 
     annotate_breakpoints_headers ();
   if (nr_printable_breakpoints > 0)
     annotate_field (0);
-  ui_out_table_header (uiout, 7, ui_left, "number", "Num");	/* 1 */
+  uiout->table_header (7, ui_left, "number", "Num"); /* 1 */
   if (nr_printable_breakpoints > 0)
     annotate_field (1);
-  ui_out_table_header (uiout, print_type_col_width, ui_left,
-		       "type", "Type");				/* 2 */
+  uiout->table_header (print_type_col_width, ui_left, "type", "Type"); /* 2 */
   if (nr_printable_breakpoints > 0)
     annotate_field (2);
-  ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");	/* 3 */
+  uiout->table_header (4, ui_left, "disp", "Disp"); /* 3 */
   if (nr_printable_breakpoints > 0)
     annotate_field (3);
-  ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");	/* 4 */
+  uiout->table_header (3, ui_left, "enabled", "Enb"); /* 4 */
   if (opts.addressprint)
     {
       if (nr_printable_breakpoints > 0)
 	annotate_field (4);
       if (print_address_bits <= 32)
-	ui_out_table_header (uiout, 10, ui_left, 
-			     "addr", "Address");		/* 5 */
+	uiout->table_header (10, ui_left, "addr", "Address"); /* 5 */
       else
-	ui_out_table_header (uiout, 18, ui_left, 
-			     "addr", "Address");		/* 5 */
+	uiout->table_header (18, ui_left, "addr", "Address"); /* 5 */
     }
   if (nr_printable_breakpoints > 0)
     annotate_field (5);
-  ui_out_table_header (uiout, 40, ui_noalign, "what", "What");	/* 6 */
-  ui_out_table_body (uiout);
+  uiout->table_header (40, ui_noalign, "what", "What"); /* 6 */
+  uiout->table_body ();
   if (nr_printable_breakpoints > 0)
     annotate_breakpoints_table ();
 
@@ -6785,10 +6935,9 @@ breakpoint_1 (char *args, int allflag, 
       if (!filter)
 	{
 	  if (args == NULL || *args == '\0')
-	    ui_out_message (uiout, 0, "No breakpoints or watchpoints.\n");
+	    uiout->message ("No breakpoints or watchpoints.\n");
 	  else
-	    ui_out_message (uiout, 0, 
-			    "No breakpoint or watchpoint matching '%s'.\n",
+	    uiout->message ("No breakpoint or watchpoint matching '%s'.\n",
 			    args);
 	}
     }
@@ -6821,9 +6970,9 @@ default_collect_info (void)
 
   /* The following phrase lines up nicely with per-tracepoint collect
      actions.  */
-  ui_out_text (uiout, "default collect ");
-  ui_out_field_string (uiout, "default-collect", default_collect);
-  ui_out_text (uiout, " \n");
+  uiout->text ("default collect ");
+  uiout->field_string ("default-collect", default_collect);
+  uiout->text (" \n");
 }
   
 static void
@@ -6843,9 +6992,9 @@ watchpoints_info (char *args, int from_t
   if (num_printed == 0)
     {
       if (args == NULL || *args == '\0')
-	ui_out_message (uiout, 0, "No watchpoints.\n");
+	uiout->message ("No watchpoints.\n");
       else
-	ui_out_message (uiout, 0, "No watchpoint matching '%s'.\n", args);
+	uiout->message ("No watchpoint matching '%s'.\n", args);
     }
 }
 
@@ -6920,14 +7069,14 @@ describe_other_breakpoints (struct gdbar
 
 
 /* Return true iff it is meaningful to use the address member of
-   BPT.  For some breakpoint types, the address member is irrelevant
-   and it makes no sense to attempt to compare it to other addresses
-   (or use it for any other purpose either).
+   BPT locations.  For some breakpoint types, the locations' address members
+   are irrelevant and it makes no sense to attempt to compare them to other
+   addresses (or use them for any other purpose either).
 
    More specifically, each of the following breakpoint types will
-   always have a zero valued address and we don't want to mark
+   always have a zero valued location address and we don't want to mark
    breakpoints of any of these types to be a duplicate of an actual
-   breakpoint at address zero:
+   breakpoint location at address zero:
 
       bp_watchpoint
       bp_catchpoint
@@ -6966,12 +7115,12 @@ watchpoint_locations_match (struct bp_lo
        && target_can_accel_watchpoint_condition (loc1->address, 
 						 loc1->length,
 						 loc1->watchpoint_type,
-						 w1->cond_exp))
+						 w1->cond_exp.get ()))
       || (w2->cond_exp
 	  && target_can_accel_watchpoint_condition (loc2->address, 
 						    loc2->length,
 						    loc2->watchpoint_type,
-						    w2->cond_exp)))
+						    w2->cond_exp.get ())))
     return 0;
 
   /* Note that this checks the owner's type, not the location's.  In
@@ -7030,6 +7179,28 @@ breakpoint_location_address_match (struc
 						 aspace, addr)));
 }
 
+/* Returns true if the [ADDR,ADDR+LEN) range in ASPACE overlaps
+   breakpoint BL.  BL may be a ranged breakpoint.  In most targets, a
+   match happens only if ASPACE matches the breakpoint's address
+   space.  On targets that have global breakpoints, the address space
+   doesn't really matter.  */
+
+static int
+breakpoint_location_address_range_overlap (struct bp_location *bl,
+					   struct address_space *aspace,
+					   CORE_ADDR addr, int len)
+{
+  if (gdbarch_has_global_breakpoints (target_gdbarch ())
+      || bl->pspace->aspace == aspace)
+    {
+      int bl_len = bl->length != 0 ? bl->length : 1;
+
+      if (mem_ranges_overlap (addr, len, bl->address, bl_len))
+	return 1;
+    }
+  return 0;
+}
+
 /* If LOC1 and LOC2's owners are not tracepoints, returns false directly.
    Then, if LOC1 and LOC2 represent the same tracepoint location, returns
    true, otherwise returns false.  */
@@ -7157,7 +7328,6 @@ init_bp_location (struct bp_location *lo
 
   loc->ops = ops;
   loc->owner = owner;
-  loc->cond = NULL;
   loc->cond_bytecode = NULL;
   loc->shlib_disabled = 0;
   loc->enabled = 1;
@@ -7226,7 +7396,7 @@ static void
 free_bp_location (struct bp_location *loc)
 {
   loc->ops->dtor (loc);
-  xfree (loc);
+  delete loc;
 }
 
 /* Increment reference count.  */
@@ -7298,6 +7468,7 @@ init_raw_breakpoint_without_location (st
   b->condition_not_parsed = 0;
   b->py_bp_object = NULL;
   b->related_breakpoint = b;
+  b->location = NULL;
 }
 
 /* Helper to set_raw_breakpoint below.  Creates a breakpoint
@@ -7308,7 +7479,7 @@ set_raw_breakpoint_without_location (str
 				     enum bptype bptype,
 				     const struct breakpoint_ops *ops)
 {
-  struct breakpoint *b = XNEW (struct breakpoint);
+  struct breakpoint *b = new breakpoint ();
 
   init_raw_breakpoint_without_location (b, gdbarch, bptype, ops);
   add_to_breakpoint_chain (b);
@@ -7424,7 +7595,7 @@ set_raw_breakpoint (struct gdbarch *gdba
 		    struct symtab_and_line sal, enum bptype bptype,
 		    const struct breakpoint_ops *ops)
 {
-  struct breakpoint *b = XNEW (struct breakpoint);
+  struct breakpoint *b = new breakpoint ();
 
   init_raw_breakpoint (b, gdbarch, sal, bptype, ops);
   add_to_breakpoint_chain (b);
@@ -7439,7 +7610,7 @@ void
 set_longjmp_breakpoint (struct thread_info *tp, struct frame_id frame)
 {
   struct breakpoint *b, *b_tmp;
-  int thread = tp->num;
+  int thread = tp->global_num;
 
   /* To avoid having to rescan all objfile symbols at every step,
      we maintain a list of continually-inserted but always disabled
@@ -7508,7 +7679,7 @@ set_longjmp_breakpoint_for_call_dummy (v
 	new_b = momentary_breakpoint_from_master (b, bp_longjmp_call_dummy,
 						  &momentary_breakpoint_ops,
 						  1);
-	new_b->thread = pid_to_thread_id (inferior_ptid);
+	new_b->thread = ptid_to_global_thread_id (inferior_ptid);
 
 	/* Link NEW_B into the chain of RETVAL breakpoints.  */
 
@@ -7538,7 +7709,7 @@ check_longjmp_breakpoint_for_call_dummy 
   struct breakpoint *b, *b_tmp;
 
   ALL_BREAKPOINTS_SAFE (b, b_tmp)
-    if (b->type == bp_longjmp_call_dummy && b->thread == tp->num)
+    if (b->type == bp_longjmp_call_dummy && b->thread == tp->global_num)
       {
 	struct breakpoint *dummy_b = b->related_breakpoint;
 
@@ -7624,26 +7795,14 @@ create_thread_event_breakpoint (struct g
 				  &internal_breakpoint_ops);
 
   b->enable_state = bp_enabled;
-  /* addr_string has to be used or breakpoint_re_set will delete me.  */
-  b->addr_string
-    = xstrprintf ("*%s", paddress (b->loc->gdbarch, b->loc->address));
+  /* location has to be used or breakpoint_re_set will delete me.  */
+  b->location = new_address_location (b->loc->address, NULL, 0);
 
   update_global_location_list_nothrow (UGLL_MAY_INSERT);
 
   return b;
 }
 
-void
-remove_thread_event_breakpoints (void)
-{
-  struct breakpoint *b, *b_tmp;
-
-  ALL_BREAKPOINTS_SAFE (b, b_tmp)
-    if (b->type == bp_thread_event
-	&& b->loc->pspace == current_program_space)
-      delete_breakpoint (b);
-}
-
 struct lang_and_radix
   {
     enum language lang;
@@ -7655,12 +7814,8 @@ struct lang_and_radix
 struct breakpoint *
 create_jit_event_breakpoint (struct gdbarch *gdbarch, CORE_ADDR address)
 {
-  struct breakpoint *b;
-
-  b = create_internal_breakpoint (gdbarch, address, bp_jit_event,
-				  &internal_breakpoint_ops);
-  update_global_location_list_nothrow (UGLL_MAY_INSERT);
-  return b;
+  return create_internal_breakpoint (gdbarch, address, bp_jit_event,
+				     &internal_breakpoint_ops);
 }
 
 /* Remove JIT code registration and unregistration breakpoint(s).  */
@@ -7782,14 +7937,6 @@ disable_breakpoints_in_unloaded_shlib (s
   struct bp_location *loc, **locp_tmp;
   int disabled_shlib_breaks = 0;
 
-  /* SunOS a.out shared libraries are always mapped, so do not
-     disable breakpoints; they will only be reported as unloaded
-     through clear_solib when GDB discards its shared library
-     list.  See clear_solib for more information.  */
-  if (exec_bfd != NULL
-      && bfd_get_flavour (exec_bfd) == bfd_target_aout_flavour)
-    return;
-
   ALL_BP_LOCATIONS (loc, locp_tmp)
   {
     /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL.  */
@@ -7931,7 +8078,7 @@ insert_catch_fork (struct bp_location *b
    catchpoints.  */
 
 static int
-remove_catch_fork (struct bp_location *bl)
+remove_catch_fork (struct bp_location *bl, enum remove_bp_reason reason)
 {
   return target_remove_fork_catchpoint (ptid_get_pid (inferior_ptid));
 }
@@ -7964,20 +8111,20 @@ print_it_catch_fork (bpstat bs)
   struct fork_catchpoint *c = (struct fork_catchpoint *) bs->breakpoint_at;
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary catchpoint ");
+    uiout->text ("Temporary catchpoint ");
   else
-    ui_out_text (uiout, "\nCatchpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Catchpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
-			   async_reason_lookup (EXEC_ASYNC_FORK));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
-    }
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, " (forked process ");
-  ui_out_field_int (uiout, "newpid", ptid_get_pid (c->forked_inferior_pid));
-  ui_out_text (uiout, "), ");
+      uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_FORK));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
+    }
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (" (forked process ");
+  uiout->field_int ("newpid", ptid_get_pid (c->forked_inferior_pid));
+  uiout->text ("), ");
   return PRINT_SRC_AND_LOC;
 }
 
@@ -7997,19 +8144,18 @@ print_one_catch_fork (struct breakpoint 
      line up too nicely with the headers, but the effect is relatively
      readable).  */
   if (opts.addressprint)
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
-  ui_out_text (uiout, "fork");
+  uiout->text ("fork");
   if (!ptid_equal (c->forked_inferior_pid, null_ptid))
     {
-      ui_out_text (uiout, ", process ");
-      ui_out_field_int (uiout, "what",
-                        ptid_get_pid (c->forked_inferior_pid));
-      ui_out_spaces (uiout, 1);
+      uiout->text (", process ");
+      uiout->field_int ("what", ptid_get_pid (c->forked_inferior_pid));
+      uiout->spaces (1);
     }
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type", "fork");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", "fork");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for fork
@@ -8048,7 +8194,7 @@ insert_catch_vfork (struct bp_location *
    catchpoints.  */
 
 static int
-remove_catch_vfork (struct bp_location *bl)
+remove_catch_vfork (struct bp_location *bl, enum remove_bp_reason reason)
 {
   return target_remove_vfork_catchpoint (ptid_get_pid (inferior_ptid));
 }
@@ -8081,20 +8227,20 @@ print_it_catch_vfork (bpstat bs)
   struct fork_catchpoint *c = (struct fork_catchpoint *) b;
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary catchpoint ");
+    uiout->text ("Temporary catchpoint ");
   else
-    ui_out_text (uiout, "\nCatchpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Catchpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
-			   async_reason_lookup (EXEC_ASYNC_VFORK));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
-    }
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, " (vforked process ");
-  ui_out_field_int (uiout, "newpid", ptid_get_pid (c->forked_inferior_pid));
-  ui_out_text (uiout, "), ");
+      uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_VFORK));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
+    }
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (" (vforked process ");
+  uiout->field_int ("newpid", ptid_get_pid (c->forked_inferior_pid));
+  uiout->text ("), ");
   return PRINT_SRC_AND_LOC;
 }
 
@@ -8113,19 +8259,18 @@ print_one_catch_vfork (struct breakpoint
      line up too nicely with the headers, but the effect is relatively
      readable).  */
   if (opts.addressprint)
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
-  ui_out_text (uiout, "vfork");
+  uiout->text ("vfork");
   if (!ptid_equal (c->forked_inferior_pid, null_ptid))
     {
-      ui_out_text (uiout, ", process ");
-      ui_out_field_int (uiout, "what",
-                        ptid_get_pid (c->forked_inferior_pid));
-      ui_out_spaces (uiout, 1);
+      uiout->text (", process ");
+      uiout->field_int ("what", ptid_get_pid (c->forked_inferior_pid));
+      uiout->spaces (1);
     }
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type", "vfork");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", "vfork");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for vfork
@@ -8190,7 +8335,7 @@ insert_catch_solib (struct bp_location *
 }
 
 static int
-remove_catch_solib (struct bp_location *ignore)
+remove_catch_solib (struct bp_location *ignore, enum remove_bp_reason reason)
 {
   return 0;
 }
@@ -8277,14 +8422,15 @@ print_it_catch_solib (bpstat bs)
   struct ui_out *uiout = current_uiout;
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary catchpoint ");
+    uiout->text ("Temporary catchpoint ");
   else
-    ui_out_text (uiout, "\nCatchpoint ");
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, "\n");
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+    uiout->text ("Catchpoint ");
+  uiout->field_int ("bkptno", b->number);
+  uiout->text ("\n");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("disp", bpdisp_text (b->disposition));
   print_solib_event (1);
   return PRINT_SRC_AND_LOC;
 }
@@ -8304,7 +8450,7 @@ print_one_catch_solib (struct breakpoint
   if (opts.addressprint)
     {
       annotate_field (4);
-      ui_out_field_skip (uiout, "addr");
+      uiout->field_skip ("addr");
     }
 
   annotate_field (5);
@@ -8322,12 +8468,11 @@ print_one_catch_solib (struct breakpoint
       else
 	msg = xstrdup (_("unload of library"));
     }
-  ui_out_field_string (uiout, "what", msg);
+  uiout->field_string ("what", msg);
   xfree (msg);
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type",
-			 self->is_load ? "load" : "unload");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", self->is_load ? "load" : "unload");
 }
 
 static void
@@ -8372,7 +8517,7 @@ add_solib_catchpoint (char *arg, int is_
     arg = "";
   arg = skip_spaces (arg);
 
-  c = XCNEW (struct solib_catchpoint);
+  c = new solib_catchpoint ();
   cleanup = make_cleanup (xfree, c);
 
   if (*arg != '\0')
@@ -8471,7 +8616,7 @@ create_fork_vfork_event_catchpoint (stru
 				    int tempflag, char *cond_string,
                                     const struct breakpoint_ops *ops)
 {
-  struct fork_catchpoint *c = XNEW (struct fork_catchpoint);
+  struct fork_catchpoint *c = new fork_catchpoint ();
 
   init_catchpoint (&c->base, gdbarch, tempflag, cond_string, ops);
 
@@ -8519,7 +8664,7 @@ insert_catch_exec (struct bp_location *b
 }
 
 static int
-remove_catch_exec (struct bp_location *bl)
+remove_catch_exec (struct bp_location *bl, enum remove_bp_reason reason)
 {
   return target_remove_exec_catchpoint (ptid_get_pid (inferior_ptid));
 }
@@ -8546,20 +8691,20 @@ print_it_catch_exec (bpstat bs)
   struct exec_catchpoint *c = (struct exec_catchpoint *) b;
 
   annotate_catchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary catchpoint ");
+    uiout->text ("Temporary catchpoint ");
   else
-    ui_out_text (uiout, "\nCatchpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Catchpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
-			   async_reason_lookup (EXEC_ASYNC_EXEC));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
-    }
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, " (exec'd ");
-  ui_out_field_string (uiout, "new-exec", c->exec_pathname);
-  ui_out_text (uiout, "), ");
+      uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_EXEC));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
+    }
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (" (exec'd ");
+  uiout->field_string ("new-exec", c->exec_pathname);
+  uiout->text ("), ");
 
   return PRINT_SRC_AND_LOC;
 }
@@ -8577,18 +8722,18 @@ print_one_catch_exec (struct breakpoint 
      not line up too nicely with the headers, but the effect
      is relatively readable).  */
   if (opts.addressprint)
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
-  ui_out_text (uiout, "exec");
+  uiout->text ("exec");
   if (c->exec_pathname != NULL)
     {
-      ui_out_text (uiout, ", program \"");
-      ui_out_field_string (uiout, "what", c->exec_pathname);
-      ui_out_text (uiout, "\" ");
+      uiout->text (", program \"");
+      uiout->field_string ("what", c->exec_pathname);
+      uiout->text ("\" ");
     }
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string (uiout, "catch-type", "exec");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string ("catch-type", "exec");
 }
 
 static void
@@ -8731,7 +8876,7 @@ enable_breakpoints_after_startup (void)
 static struct breakpoint *
 new_single_step_breakpoint (int thread, struct gdbarch *gdbarch)
 {
-  struct breakpoint *b = XNEW (struct breakpoint);
+  struct breakpoint *b = new breakpoint ();
 
   init_raw_breakpoint_without_location (b, gdbarch, bp_single_step,
 					&momentary_breakpoint_ops);
@@ -8770,7 +8915,7 @@ set_momentary_breakpoint (struct gdbarch
      momentary breakpoints to be active in only a single thread of
      control.  */
   if (in_thread_list (inferior_ptid))
-    b->thread = pid_to_thread_id (inferior_ptid);
+    b->thread = ptid_to_global_thread_id (inferior_ptid);
 
   update_global_location_list_nothrow (UGLL_MAY_INSERT);
 
@@ -8848,7 +8993,7 @@ static void
 mention (struct breakpoint *b)
 {
   b->ops->print_mention (b);
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     return;
   printf_filtered ("\n");
 }
@@ -8937,7 +9082,7 @@ program_breakpoint_here_p (struct gdbarc
   if (bpoint == NULL)
     return 0;
 
-  target_mem = alloca (len);
+  target_mem = (gdb_byte *) alloca (len);
 
   /* Enable the automatic memory restoration from breakpoints while
      we read the memory.  Otherwise we could say about our temporary
@@ -8964,6 +9109,13 @@ bp_loc_is_permanent (struct bp_location 
 
   gdb_assert (loc != NULL);
 
+  /* If we have a catchpoint or a watchpoint, just return 0.  We should not
+     attempt to read from the addresses the locations of these breakpoint types
+     point to.  program_breakpoint_here_p, below, will attempt to read
+     memory.  */
+  if (!breakpoint_address_is_meaningful (loc->owner))
+    return 0;
+
   cleanup = save_current_space_and_thread ();
   switch_to_program_space_and_thread (loc->pspace);
 
@@ -9031,8 +9183,7 @@ update_dprintf_command_list (struct brea
   gdb_assert (printf_line != NULL);
   /* Manufacture a printf sequence.  */
   {
-    struct command_line *printf_cmd_line
-      = xmalloc (sizeof (struct command_line));
+    struct command_line *printf_cmd_line = XNEW (struct command_line);
 
     printf_cmd_line->control_type = simple_control;
     printf_cmd_line->body_count = 0;
@@ -9060,13 +9211,15 @@ update_dprintf_commands (char *args, int
     }
 }
 
-/* Create a breakpoint with SAL as location.  Use ADDR_STRING
-   as textual description of the location, and COND_STRING
-   as condition expression.  */
+/* Create a breakpoint with SAL as location.  Use LOCATION
+   as a description of the location, and COND_STRING
+   as condition expression.  If LOCATION is NULL then create an
+   "address location" from the address in the SAL.  */
 
 static void
 init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
-		     struct symtabs_and_lines sals, char *addr_string,
+		     struct symtabs_and_lines sals,
+		     struct event_location *location,
 		     char *filter, char *cond_string,
 		     char *extra_string,
 		     enum bptype type, enum bpdisp disposition,
@@ -9132,13 +9285,13 @@ init_breakpoint_sal (struct breakpoint *
 		{
 		  /* We already know the marker exists, otherwise, we
 		     wouldn't see a sal for it.  */
-		  char *p = &addr_string[3];
-		  char *endp;
+		  const char *p = &event_location_to_string (b->location)[3];
+		  const char *endp;
 		  char *marker_str;
 
-		  p = skip_spaces (p);
+		  p = skip_spaces_const (p);
 
-		  endp = skip_to_space (p);
+		  endp = skip_to_space_const (p);
 
 		  marker_str = savestring (p, endp - p);
 		  t->static_trace_marker_id = marker_str;
@@ -9194,19 +9347,28 @@ init_breakpoint_sal (struct breakpoint *
     }
 
   b->display_canonical = display_canonical;
-  if (addr_string)
-    b->addr_string = addr_string;
+  if (location != NULL)
+    b->location = location;
   else
-    /* addr_string has to be used or breakpoint_re_set will delete
-       me.  */
-    b->addr_string
-      = xstrprintf ("*%s", paddress (b->loc->gdbarch, b->loc->address));
+    {
+      const char *addr_string = NULL;
+      int addr_string_len = 0;
+
+      if (location != NULL)
+	addr_string = event_location_to_string (location);
+      if (addr_string != NULL)
+	addr_string_len = strlen (addr_string);
+
+      b->location = new_address_location (b->loc->address,
+					  addr_string, addr_string_len);
+    }
   b->filter = filter;
 }
 
 static void
 create_breakpoint_sal (struct gdbarch *gdbarch,
-		       struct symtabs_and_lines sals, char *addr_string,
+		       struct symtabs_and_lines sals,
+		       struct event_location *location,
 		       char *filter, char *cond_string,
 		       char *extra_string,
 		       enum bptype type, enum bpdisp disposition,
@@ -9222,16 +9384,16 @@ create_breakpoint_sal (struct gdbarch *g
     {
       struct tracepoint *t;
 
-      t = XCNEW (struct tracepoint);
+      t = new tracepoint ();
       b = &t->base;
     }
   else
-    b = XNEW (struct breakpoint);
+    b = new breakpoint ();
 
   old_chain = make_cleanup (xfree, b);
 
   init_breakpoint_sal (b, gdbarch,
-		       sals, addr_string,
+		       sals, location,
 		       filter, cond_string, extra_string,
 		       type, disposition,
 		       thread, task, ignore_count,
@@ -9275,17 +9437,17 @@ create_breakpoints_sal (struct gdbarch *
 
   for (i = 0; VEC_iterate (linespec_sals, canonical->sals, i, lsal); ++i)
     {
-      /* Note that 'addr_string' can be NULL in the case of a plain
+      /* Note that 'location' can be NULL in the case of a plain
 	 'break', without arguments.  */
-      char *addr_string = (canonical->addr_string
-			   ? xstrdup (canonical->addr_string)
-			   : NULL);
+      struct event_location *location
+	= (canonical->location != NULL
+	   ? copy_event_location (canonical->location) : NULL);
       char *filter_string = lsal->canonical ? xstrdup (lsal->canonical) : NULL;
-      struct cleanup *inner = make_cleanup (xfree, addr_string);
+      struct cleanup *inner = make_cleanup_delete_event_location (location);
 
       make_cleanup (xfree, filter_string);
       create_breakpoint_sal (gdbarch, lsal->sals,
-			     addr_string,
+			     location,
 			     filter_string,
 			     cond_string, extra_string,
 			     type, disposition,
@@ -9296,83 +9458,96 @@ create_breakpoints_sal (struct gdbarch *
     }
 }
 
-/* Parse ADDRESS which is assumed to be a SAL specification possibly
+/* Parse LOCATION which is assumed to be a SAL specification possibly
    followed by conditionals.  On return, SALS contains an array of SAL
-   addresses found.  ADDR_STRING contains a vector of (canonical)
-   address strings.  ADDRESS points to the end of the SAL.
+   addresses found.  LOCATION points to the end of the SAL (for
+   linespec locations).
 
    The array and the line spec strings are allocated on the heap, it is
    the caller's responsibility to free them.  */
 
 static void
-parse_breakpoint_sals (char **address,
+parse_breakpoint_sals (const struct event_location *location,
 		       struct linespec_result *canonical)
 {
-  /* If no arg given, or if first arg is 'if ', use the default
-     breakpoint.  */
-  if ((*address) == NULL || linespec_lexer_lex_keyword (*address))
+  struct symtab_and_line cursal;
+
+  if (event_location_type (location) == LINESPEC_LOCATION)
     {
-      /* The last displayed codepoint, if it's valid, is our default breakpoint
-         address.  */
-      if (last_displayed_sal_is_valid ())
-	{
-	  struct linespec_sals lsal;
-	  struct symtab_and_line sal;
-	  CORE_ADDR pc;
-
-	  init_sal (&sal);		/* Initialize to zeroes.  */
-	  lsal.sals.sals = (struct symtab_and_line *)
-	    xmalloc (sizeof (struct symtab_and_line));
-
-	  /* Set sal's pspace, pc, symtab, and line to the values
-	     corresponding to the last call to print_frame_info.
-	     Be sure to reinitialize LINE with NOTCURRENT == 0
-	     as the breakpoint line number is inappropriate otherwise.
-	     find_pc_line would adjust PC, re-set it back.  */
-	  get_last_displayed_sal (&sal);
-	  pc = sal.pc;
-	  sal = find_pc_line (pc, 0);
-
-	  /* "break" without arguments is equivalent to "break *PC"
-	     where PC is the last displayed codepoint's address.  So
-	     make sure to set sal.explicit_pc to prevent GDB from
-	     trying to expand the list of sals to include all other
-	     instances with the same symtab and line.  */
-	  sal.pc = pc;
-	  sal.explicit_pc = 1;
-
-	  lsal.sals.sals[0] = sal;
-	  lsal.sals.nelts = 1;
-	  lsal.canonical = NULL;
-
-	  VEC_safe_push (linespec_sals, canonical->sals, &lsal);
-	}
-      else
-	error (_("No default breakpoint address now."));
+      const char *address = get_linespec_location (location);
+
+      if (address == NULL)
+	{
+	  /* The last displayed codepoint, if it's valid, is our default
+	     breakpoint address.  */
+	  if (last_displayed_sal_is_valid ())
+	    {
+	      struct linespec_sals lsal;
+	      struct symtab_and_line sal;
+	      CORE_ADDR pc;
+
+	      init_sal (&sal);		/* Initialize to zeroes.  */
+	      lsal.sals.sals = XNEW (struct symtab_and_line);
+
+	      /* Set sal's pspace, pc, symtab, and line to the values
+		 corresponding to the last call to print_frame_info.
+		 Be sure to reinitialize LINE with NOTCURRENT == 0
+		 as the breakpoint line number is inappropriate otherwise.
+		 find_pc_line would adjust PC, re-set it back.  */
+	      get_last_displayed_sal (&sal);
+	      pc = sal.pc;
+	      sal = find_pc_line (pc, 0);
+
+	      /* "break" without arguments is equivalent to "break *PC"
+		 where PC is the last displayed codepoint's address.  So
+		 make sure to set sal.explicit_pc to prevent GDB from
+		 trying to expand the list of sals to include all other
+		 instances with the same symtab and line.  */
+	      sal.pc = pc;
+	      sal.explicit_pc = 1;
+
+	      lsal.sals.sals[0] = sal;
+	      lsal.sals.nelts = 1;
+	      lsal.canonical = NULL;
+
+	      VEC_safe_push (linespec_sals, canonical->sals, &lsal);
+	      return;
+	    }
+	  else
+	    error (_("No default breakpoint address now."));
+	}
     }
-  else
+
+  /* Force almost all breakpoints to be in terms of the
+     current_source_symtab (which is decode_line_1's default).
+     This should produce the results we want almost all of the
+     time while leaving default_breakpoint_* alone.
+
+     ObjC: However, don't match an Objective-C method name which
+     may have a '+' or '-' succeeded by a '['.  */
+  cursal = get_current_source_symtab_and_line ();
+  if (last_displayed_sal_is_valid ())
     {
-      struct symtab_and_line cursal = get_current_source_symtab_and_line ();
-
-      /* Force almost all breakpoints to be in terms of the
-         current_source_symtab (which is decode_line_1's default).
-         This should produce the results we want almost all of the
-         time while leaving default_breakpoint_* alone.
-
-	 ObjC: However, don't match an Objective-C method name which
-	 may have a '+' or '-' succeeded by a '['.  */
-      if (last_displayed_sal_is_valid ()
-	  && (!cursal.symtab
-	      || ((strchr ("+-", (*address)[0]) != NULL)
-		  && ((*address)[1] != '['))))
-	decode_line_full (address, DECODE_LINE_FUNFIRSTLINE,
-			  get_last_displayed_symtab (),
-			  get_last_displayed_line (),
-			  canonical, NULL, NULL);
-      else
-	decode_line_full (address, DECODE_LINE_FUNFIRSTLINE,
-			  cursal.symtab, cursal.line, canonical, NULL, NULL);
+      const char *address = NULL;
+
+      if (event_location_type (location) == LINESPEC_LOCATION)
+	address = get_linespec_location (location);
+
+      if (!cursal.symtab
+	  || (address != NULL
+	      && strchr ("+-", address[0]) != NULL
+	      && address[1] != '['))
+	{
+	  decode_line_full (location, DECODE_LINE_FUNFIRSTLINE, NULL,
+			    get_last_displayed_symtab (),
+			    get_last_displayed_line (),
+			    canonical, NULL, NULL);
+	  return;
+	}
     }
+
+  decode_line_full (location, DECODE_LINE_FUNFIRSTLINE, NULL,
+		    cursal.symtab, cursal.line, canonical, NULL, NULL);
 }
 
 
@@ -9415,26 +9590,17 @@ check_fast_tracepoint_sals (struct gdbar
 	 associated with SAL.  */
       if (sarch == NULL)
 	sarch = gdbarch;
-      rslt = gdbarch_fast_tracepoint_valid_at (sarch, sal->pc,
-					       NULL, &msg);
+      rslt = gdbarch_fast_tracepoint_valid_at (sarch, sal->pc, &msg);
       old_chain = make_cleanup (xfree, msg);
 
       if (!rslt)
-	error (_("May not have a fast tracepoint at 0x%s%s"),
+	error (_("May not have a fast tracepoint at %s%s"),
 	       paddress (sarch, sal->pc), (msg ? msg : ""));
 
       do_cleanups (old_chain);
     }
 }
 
-/* Issue an invalid thread ID error.  */
-
-static void ATTRIBUTE_NORETURN
-invalid_thread_id_error (int id)
-{
-  error (_("Unknown thread %d."), id);
-}
-
 /* Given TOK, a string specification of condition and thread, as
    accepted by the 'break' command, extract the condition
    string and thread number and set *COND_STRING and *THREAD.
@@ -9473,24 +9639,21 @@ find_condition_and_thread (const char *t
 
       if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
 	{
-	  struct expression *expr;
-
 	  tok = cond_start = end_tok + 1;
-	  expr = parse_exp_1 (&tok, pc, block_for_pc (pc), 0);
-	  xfree (expr);
+	  parse_exp_1 (&tok, pc, block_for_pc (pc), 0);
 	  cond_end = tok;
 	  *cond_string = savestring (cond_start, cond_end - cond_start);
 	}
       else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
 	{
-	  char *tmptok;
+	  const char *tmptok;
+	  struct thread_info *thr;
 
 	  tok = end_tok + 1;
-	  *thread = strtol (tok, &tmptok, 0);
+	  thr = parse_thread_id (tok, &tmptok);
 	  if (tok == tmptok)
 	    error (_("Junk after thread keyword."));
-	  if (!valid_thread_id (*thread))
-	    invalid_thread_id_error (*thread);
+	  *thread = thr->global_num;
 	  tok = tmptok;
 	}
       else if (toklen >= 1 && strncmp (tok, "task", toklen) == 0)
@@ -9518,19 +9681,19 @@ find_condition_and_thread (const char *t
 /* Decode a static tracepoint marker spec.  */
 
 static struct symtabs_and_lines
-decode_static_tracepoint_spec (char **arg_p)
+decode_static_tracepoint_spec (const char **arg_p)
 {
   VEC(static_tracepoint_marker_p) *markers = NULL;
   struct symtabs_and_lines sals;
   struct cleanup *old_chain;
-  char *p = &(*arg_p)[3];
-  char *endp;
+  const char *p = &(*arg_p)[3];
+  const char *endp;
   char *marker_str;
   int i;
 
-  p = skip_spaces (p);
+  p = skip_spaces_const (p);
 
-  endp = skip_to_space (p);
+  endp = skip_to_space_const (p);
 
   marker_str = savestring (p, endp - p);
   old_chain = make_cleanup (xfree, marker_str);
@@ -9540,7 +9703,7 @@ decode_static_tracepoint_spec (char **ar
     error (_("No known static tracepoint marker named %s"), marker_str);
 
   sals.nelts = VEC_length(static_tracepoint_marker_p, markers);
-  sals.sals = xmalloc (sizeof *sals.sals * sals.nelts);
+  sals.sals = XNEWVEC (struct symtab_and_line, sals.nelts);
 
   for (i = 0; i < sals.nelts; i++)
     {
@@ -9562,22 +9725,13 @@ decode_static_tracepoint_spec (char **ar
   return sals;
 }
 
-/* Set a breakpoint.  This function is shared between CLI and MI
-   functions for setting a breakpoint.  This function has two major
-   modes of operations, selected by the PARSE_ARG parameter.  If
-   non-zero, the function will parse ARG, extracting location,
-   condition, thread and extra string.  Otherwise, ARG is just the
-   breakpoint's location, with condition, thread, and extra string
-   specified by the COND_STRING, THREAD and EXTRA_STRING parameters.
-   If INTERNAL is non-zero, the breakpoint number will be allocated
-   from the internal breakpoint count.  Returns true if any breakpoint
-   was created; false otherwise.  */
+/* See breakpoint.h.  */
 
 int
 create_breakpoint (struct gdbarch *gdbarch,
-		   char *arg, char *cond_string,
+		   const struct event_location *location, char *cond_string,
 		   int thread, char *extra_string,
-		   int parse_arg,
+		   int parse_extra,
 		   int tempflag, enum bptype type_wanted,
 		   int ignore_count,
 		   enum auto_boolean pending_break_support,
@@ -9585,8 +9739,6 @@ create_breakpoint (struct gdbarch *gdbar
 		   int from_tty, int enabled, int internal,
 		   unsigned flags)
 {
-  char *copy_arg = NULL;
-  char *addr_start = arg;
   struct linespec_result canonical;
   struct cleanup *old_chain;
   struct cleanup *bkpt_chain = NULL;
@@ -9596,12 +9748,15 @@ create_breakpoint (struct gdbarch *gdbar
 
   gdb_assert (ops != NULL);
 
+  /* If extra_string isn't useful, set it to NULL.  */
+  if (extra_string != NULL && *extra_string == '\0')
+    extra_string = NULL;
+
   init_linespec_result (&canonical);
 
   TRY
     {
-      ops->create_sals_from_address (&arg, &canonical, type_wanted,
-				     addr_start, &copy_arg);
+      ops->create_sals_from_location (location, &canonical, type_wanted);
     }
   CATCH (e, RETURN_MASK_ERROR)
     {
@@ -9628,24 +9783,14 @@ create_breakpoint (struct gdbarch *gdbar
 	     a pending breakpoint and selected yes, or pending
 	     breakpoint behavior is on and thus a pending breakpoint
 	     is defaulted on behalf of the user.  */
-	  {
-	    struct linespec_sals lsal;
-
-	    copy_arg = xstrdup (addr_start);
-	    lsal.canonical = xstrdup (copy_arg);
-	    lsal.sals.nelts = 1;
-	    lsal.sals.sals = XNEW (struct symtab_and_line);
-	    init_sal (&lsal.sals.sals[0]);
-	    pending = 1;
-	    VEC_safe_push (linespec_sals, canonical.sals, &lsal);
-	  }
+	  pending = 1;
 	}
       else
 	throw_exception (e);
     }
   END_CATCH
 
-  if (VEC_empty (linespec_sals, canonical.sals))
+  if (!pending && VEC_empty (linespec_sals, canonical.sals))
     return 0;
 
   /* Create a chain of things that always need to be cleaned up.  */
@@ -9683,7 +9828,7 @@ create_breakpoint (struct gdbarch *gdbar
      breakpoint.  */
   if (!pending)
     {
-      if (parse_arg)
+      if (parse_extra)
         {
 	  char *rest;
 	  struct linespec_sals *lsal;
@@ -9695,19 +9840,22 @@ create_breakpoint (struct gdbarch *gdbar
 	     sal is OK.  When setting the breakpoint we'll
 	     re-parse it in context of each sal.  */
 
-	  find_condition_and_thread (arg, lsal->sals.sals[0].pc, &cond_string,
-				     &thread, &task, &rest);
+	  find_condition_and_thread (extra_string, lsal->sals.sals[0].pc,
+				     &cond_string, &thread, &task, &rest);
 	  if (cond_string)
 	    make_cleanup (xfree, cond_string);
 	  if (rest)
 	    make_cleanup (xfree, rest);
 	  if (rest)
 	    extra_string = rest;
+	  else
+	    extra_string = NULL;
         }
       else
         {
-	  if (*arg != '\0')
-	    error (_("Garbage '%s' at end of location"), arg);
+	  if (type_wanted != bp_dprintf
+	      && extra_string != NULL && *extra_string != '\0')
+		error (_("Garbage '%s' at end of location"), extra_string);
 
 	  /* Create a private copy of condition string.  */
 	  if (cond_string)
@@ -9733,26 +9881,21 @@ create_breakpoint (struct gdbarch *gdbar
     {
       struct breakpoint *b;
 
-      make_cleanup (xfree, copy_arg);
-
       if (is_tracepoint_type (type_wanted))
 	{
 	  struct tracepoint *t;
 
-	  t = XCNEW (struct tracepoint);
+	  t = new tracepoint ();
 	  b = &t->base;
 	}
       else
-	b = XNEW (struct breakpoint);
+	b = new breakpoint ();
 
       init_raw_breakpoint_without_location (b, gdbarch, type_wanted, ops);
+      b->location = copy_event_location (location);
 
-      b->addr_string = copy_arg;
-      if (parse_arg)
-	{
-	  b->cond_string = NULL;
-	  b->extra_string = NULL;
-	}
+      if (parse_extra)
+	b->cond_string = NULL;
       else
 	{
 	  /* Create a private copy of condition string.  */
@@ -9761,16 +9904,17 @@ create_breakpoint (struct gdbarch *gdbar
 	      cond_string = xstrdup (cond_string);
 	      make_cleanup (xfree, cond_string);
 	    }
-	  /* Create a private copy of any extra string.  */
-	  if (extra_string != NULL)
-	    {
-	      extra_string = xstrdup (extra_string);
-	      make_cleanup (xfree, extra_string);
-	    }
 	  b->cond_string = cond_string;
-	  b->extra_string = extra_string;
 	  b->thread = thread;
 	}
+
+      /* Create a private copy of any extra string.  */
+      if (extra_string != NULL)
+	{
+	  extra_string = xstrdup (extra_string);
+	  make_cleanup (xfree, extra_string);
+	}
+      b->extra_string = extra_string;
       b->ignore_count = ignore_count;
       b->disposition = tempflag ? disp_del : disp_donttouch;
       b->condition_not_parsed = 1;
@@ -9816,17 +9960,22 @@ break_command_1 (char *arg, int flag, in
 			     ? bp_hardware_breakpoint
 			     : bp_breakpoint);
   struct breakpoint_ops *ops;
-  const char *arg_cp = arg;
+  struct event_location *location;
+  struct cleanup *cleanup;
+
+  location = string_to_event_location (&arg, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
 
   /* Matching breakpoints on probes.  */
-  if (arg && probe_linespec_to_ops (&arg_cp) != NULL)
+  if (location != NULL
+      && event_location_type (location) == PROBE_LOCATION)
     ops = &bkpt_probe_breakpoint_ops;
   else
     ops = &bkpt_breakpoint_ops;
 
   create_breakpoint (get_current_arch (),
-		     arg,
-		     NULL, 0, NULL, 1 /* parse arg */,
+		     location,
+		     NULL, 0, arg, 1 /* parse arg */,
 		     tempflag, type_wanted,
 		     0 /* Ignore count */,
 		     pending_break_support,
@@ -9835,6 +9984,7 @@ break_command_1 (char *arg, int flag, in
 		     1 /* enabled */,
 		     0 /* internal */,
 		     0);
+  do_cleanups (cleanup);
 }
 
 /* Helper function for break_command_1 and disassemble_command.  */
@@ -10001,9 +10151,28 @@ stopat_command (char *arg, int from_tty)
 static void
 dprintf_command (char *arg, int from_tty)
 {
+  struct event_location *location;
+  struct cleanup *cleanup;
+
+  location = string_to_event_location (&arg, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
+
+  /* If non-NULL, ARG should have been advanced past the location;
+     the next character must be ','.  */
+  if (arg != NULL)
+    {
+      if (arg[0] != ',' || arg[1] == '\0')
+	error (_("Format string required"));
+      else
+	{
+	  /* Skip the comma.  */
+	  ++arg;
+	}
+    }
+
   create_breakpoint (get_current_arch (),
-		     arg,
-		     NULL, 0, NULL, 1 /* parse arg */,
+		     location,
+		     NULL, 0, arg, 1 /* parse arg */,
 		     0, bp_dprintf,
 		     0 /* Ignore count */,
 		     pending_break_support,
@@ -10012,6 +10181,7 @@ dprintf_command (char *arg, int from_tty
 		     1 /* enabled */,
 		     0 /* internal */,
 		     0);
+  do_cleanups (cleanup);
 }
 
 static void
@@ -10062,18 +10232,21 @@ print_it_ranged_breakpoint (bpstat bs)
   gdb_assert (bl && bl->next == NULL);
 
   annotate_breakpoint (b->number);
+
+  maybe_print_thread_hit_breakpoint (uiout);
+
   if (b->disposition == disp_del)
-    ui_out_text (uiout, "\nTemporary ranged breakpoint ");
+    uiout->text ("Temporary ranged breakpoint ");
   else
-    ui_out_text (uiout, "\nRanged breakpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Ranged breakpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
+      uiout->field_string ("reason",
 		      async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
     }
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, ", ");
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (", ");
 
   return PRINT_SRC_AND_LOC;
 }
@@ -10097,7 +10270,7 @@ print_one_ranged_breakpoint (struct brea
   if (opts.addressprint)
     /* We don't print the address range here, it will be printed later
        by print_one_detail_ranged_breakpoint.  */
-    ui_out_field_skip (uiout, "addr");
+    uiout->field_skip ("addr");
   annotate_field (5);
   print_breakpoint_location (b, bl);
   *last_loc = bl;
@@ -10112,22 +10285,19 @@ print_one_detail_ranged_breakpoint (cons
 {
   CORE_ADDR address_start, address_end;
   struct bp_location *bl = b->loc;
-  struct ui_file *stb = mem_fileopen ();
-  struct cleanup *cleanup = make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
   gdb_assert (bl);
 
   address_start = bl->address;
   address_end = address_start + bl->length - 1;
 
-  ui_out_text (uiout, "\taddress range: ");
-  fprintf_unfiltered (stb, "[%s, %s]",
-		      print_core_address (bl->gdbarch, address_start),
-		      print_core_address (bl->gdbarch, address_end));
-  ui_out_field_stream (uiout, "addr", stb);
-  ui_out_text (uiout, "\n");
-
-  do_cleanups (cleanup);
+  uiout->text ("\taddress range: ");
+  stb.printf ("[%s, %s]",
+	      print_core_address (bl->gdbarch, address_start),
+	      print_core_address (bl->gdbarch, address_end));
+  uiout->field_stream ("addr", stb);
+  uiout->text ("\n");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for
@@ -10142,7 +10312,7 @@ print_mention_ranged_breakpoint (struct 
   gdb_assert (bl);
   gdb_assert (b->type == bp_hardware_breakpoint);
 
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     return;
 
   printf_filtered (_("Hardware assisted ranged breakpoint %d from %s to %s."),
@@ -10156,8 +10326,9 @@ print_mention_ranged_breakpoint (struct 
 static void
 print_recreate_ranged_breakpoint (struct breakpoint *b, struct ui_file *fp)
 {
-  fprintf_unfiltered (fp, "break-range %s, %s", b->addr_string,
-		      b->addr_string_range_end);
+  fprintf_unfiltered (fp, "break-range %s, %s",
+		      event_location_to_string (b->location),
+		      event_location_to_string (b->location_range_end));
   print_recreate_thread (b, fp);
 }
 
@@ -10200,7 +10371,7 @@ find_breakpoint_range_end (struct symtab
 static void
 break_range_command (char *arg, int from_tty)
 {
-  char *arg_start, *addr_string_start, *addr_string_end;
+  char *arg_start, *addr_string_start;
   struct linespec_result canonical_start, canonical_end;
   int bp_count, can_use_bp, length;
   CORE_ADDR end;
@@ -10208,6 +10379,7 @@ break_range_command (char *arg, int from
   struct symtab_and_line sal_start, sal_end;
   struct cleanup *cleanup_bkpt;
   struct linespec_sals *lsal_start, *lsal_end;
+  struct event_location *start_location, *end_location;
 
   /* We don't support software ranged breakpoints.  */
   if (target_ranged_break_num_registers () < 0)
@@ -10227,9 +10399,10 @@ break_range_command (char *arg, int from
   init_linespec_result (&canonical_start);
 
   arg_start = arg;
-  parse_breakpoint_sals (&arg, &canonical_start);
-
-  cleanup_bkpt = make_cleanup_destroy_linespec_result (&canonical_start);
+  start_location = string_to_event_location (&arg, current_language);
+  cleanup_bkpt = make_cleanup_delete_event_location (start_location);
+  parse_breakpoint_sals (start_location, &canonical_start);
+  make_cleanup_destroy_linespec_result (&canonical_start);
 
   if (arg[0] != ',')
     error (_("Too few arguments."));
@@ -10259,7 +10432,9 @@ break_range_command (char *arg, int from
      symtab and line as the default symtab and line for the end of the
      range.  This makes it possible to have ranges like "foo.c:27, +14",
      where +14 means 14 lines from the start location.  */
-  decode_line_full (&arg, DECODE_LINE_FUNFIRSTLINE,
+  end_location = string_to_event_location (&arg, current_language);
+  make_cleanup_delete_event_location (end_location);
+  decode_line_full (end_location, DECODE_LINE_FUNFIRSTLINE, NULL,
 		    sal_start.symtab, sal_start.line,
 		    &canonical_end, NULL, NULL);
 
@@ -10274,8 +10449,6 @@ break_range_command (char *arg, int from
     error (_("Cannot create a ranged breakpoint with multiple locations."));
 
   sal_end = lsal_end->sals.sals[0];
-  addr_string_end = savestring (arg_start, arg - arg_start);
-  make_cleanup (xfree, addr_string_end);
 
   end = find_breakpoint_range_end (sal_end);
   if (sal_start.pc > end)
@@ -10302,8 +10475,8 @@ break_range_command (char *arg, int from
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->disposition = disp_donttouch;
-  b->addr_string = xstrdup (addr_string_start);
-  b->addr_string_range_end = xstrdup (addr_string_end);
+  b->location = copy_event_location (start_location);
+  b->location_range_end = copy_event_location (end_location);
   b->loc->length = length;
 
   do_cleanups (cleanup_bkpt);
@@ -10434,8 +10607,6 @@ dtor_watchpoint (struct breakpoint *self
 {
   struct watchpoint *w = (struct watchpoint *) self;
 
-  xfree (w->cond_exp);
-  xfree (w->exp);
   xfree (w->exp_string);
   xfree (w->exp_string_reparse);
   value_free (w->val);
@@ -10487,19 +10658,19 @@ insert_watchpoint (struct bp_location *b
   int length = w->exact ? 1 : bl->length;
 
   return target_insert_watchpoint (bl->address, length, bl->watchpoint_type,
-				   w->cond_exp);
+				   w->cond_exp.get ());
 }
 
 /* Implement the "remove" breakpoint_ops method for hardware watchpoints.  */
 
 static int
-remove_watchpoint (struct bp_location *bl)
+remove_watchpoint (struct bp_location *bl, enum remove_bp_reason reason)
 {
   struct watchpoint *w = (struct watchpoint *) bl->owner;
   int length = w->exact ? 1 : bl->length;
 
   return target_remove_watchpoint (bl->address, length, bl->watchpoint_type,
-				   w->cond_exp);
+				   w->cond_exp.get ());
 }
 
 static int
@@ -10558,7 +10729,6 @@ print_it_watchpoint (bpstat bs)
 {
   struct cleanup *old_chain;
   struct breakpoint *b;
-  struct ui_file *stb;
   enum print_stop_action result;
   struct watchpoint *w;
   struct ui_out *uiout = current_uiout;
@@ -10568,73 +10738,73 @@ print_it_watchpoint (bpstat bs)
   b = bs->breakpoint_at;
   w = (struct watchpoint *) b;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  old_chain = make_cleanup (null_cleanup, NULL);
+
+  annotate_watchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
+
+  string_file stb;
 
   switch (b->type)
     {
     case bp_watchpoint:
     case bp_hardware_watchpoint:
-      annotate_watchpoint (b->number);
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason",
-	   async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
       mention (b);
       make_cleanup_ui_out_tuple_begin_end (uiout, "value");
-      ui_out_text (uiout, "\nOld value = ");
-      watchpoint_value_print (bs->old_val, stb);
-      ui_out_field_stream (uiout, "old", stb);
-      ui_out_text (uiout, "\nNew value = ");
-      watchpoint_value_print (w->val, stb);
-      ui_out_field_stream (uiout, "new", stb);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\nOld value = ");
+      watchpoint_value_print (bs->old_val, &stb);
+      uiout->field_stream ("old", stb);
+      uiout->text ("\nNew value = ");
+      watchpoint_value_print (w->val, &stb);
+      uiout->field_stream ("new", stb);
+      uiout->text ("\n");
       /* More than one watchpoint may have been triggered.  */
       result = PRINT_UNKNOWN;
       break;
 
     case bp_read_watchpoint:
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason",
-	   async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
       mention (b);
       make_cleanup_ui_out_tuple_begin_end (uiout, "value");
-      ui_out_text (uiout, "\nValue = ");
-      watchpoint_value_print (w->val, stb);
-      ui_out_field_stream (uiout, "value", stb);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\nValue = ");
+      watchpoint_value_print (w->val, &stb);
+      uiout->field_stream ("value", stb);
+      uiout->text ("\n");
       result = PRINT_UNKNOWN;
       break;
 
     case bp_access_watchpoint:
       if (bs->old_val != NULL)
 	{
-	  annotate_watchpoint (b->number);
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_string
-	      (uiout, "reason",
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_string
+	      ("reason",
 	       async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
 	  mention (b);
 	  make_cleanup_ui_out_tuple_begin_end (uiout, "value");
-	  ui_out_text (uiout, "\nOld value = ");
-	  watchpoint_value_print (bs->old_val, stb);
-	  ui_out_field_stream (uiout, "old", stb);
-	  ui_out_text (uiout, "\nNew value = ");
+	  uiout->text ("\nOld value = ");
+	  watchpoint_value_print (bs->old_val, &stb);
+	  uiout->field_stream ("old", stb);
+	  uiout->text ("\nNew value = ");
 	}
       else
 	{
 	  mention (b);
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_string
-	      (uiout, "reason",
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_string
+	      ("reason",
 	       async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
 	  make_cleanup_ui_out_tuple_begin_end (uiout, "value");
-	  ui_out_text (uiout, "\nValue = ");
+	  uiout->text ("\nValue = ");
 	}
-      watchpoint_value_print (w->val, stb);
-      ui_out_field_stream (uiout, "new", stb);
-      ui_out_text (uiout, "\n");
+      watchpoint_value_print (w->val, &stb);
+      uiout->field_stream ("new", stb);
+      uiout->text ("\n");
       result = PRINT_UNKNOWN;
       break;
     default:
@@ -10658,19 +10828,19 @@ print_mention_watchpoint (struct breakpo
   switch (b->type)
     {
     case bp_watchpoint:
-      ui_out_text (uiout, "Watchpoint ");
+      uiout->text ("Watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
       break;
     case bp_hardware_watchpoint:
-      ui_out_text (uiout, "Hardware watchpoint ");
+      uiout->text ("Hardware watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
       break;
     case bp_read_watchpoint:
-      ui_out_text (uiout, "Hardware read watchpoint ");
+      uiout->text ("Hardware read watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-rwpt");
       break;
     case bp_access_watchpoint:
-      ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
+      uiout->text ("Hardware access (read/write) watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-awpt");
       break;
     default:
@@ -10678,9 +10848,9 @@ print_mention_watchpoint (struct breakpo
 		      _("Invalid hardware watchpoint type."));
     }
 
-  ui_out_field_int (uiout, "number", b->number);
-  ui_out_text (uiout, ": ");
-  ui_out_field_string (uiout, "exp", w->exp_string);
+  uiout->field_int ("number", b->number);
+  uiout->text (": ");
+  uiout->field_string ("exp", w->exp_string);
   do_cleanups (ui_out_chain);
 }
 
@@ -10747,7 +10917,7 @@ insert_masked_watchpoint (struct bp_loca
    masked hardware watchpoints.  */
 
 static int
-remove_masked_watchpoint (struct bp_location *bl)
+remove_masked_watchpoint (struct bp_location *bl, enum remove_bp_reason reason)
 {
   struct watchpoint *w = (struct watchpoint *) bl->owner;
 
@@ -10787,27 +10957,27 @@ print_it_masked_watchpoint (bpstat bs)
   /* Masked watchpoints have only one location.  */
   gdb_assert (b->loc && b->loc->next == NULL);
 
+  annotate_watchpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
+
   switch (b->type)
     {
     case bp_hardware_watchpoint:
-      annotate_watchpoint (b->number);
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason",
-	   async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
       break;
 
     case bp_read_watchpoint:
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason",
-	   async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
       break;
 
     case bp_access_watchpoint:
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason",
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason",
 	   async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
       break;
     default:
@@ -10816,10 +10986,10 @@ print_it_masked_watchpoint (bpstat bs)
     }
 
   mention (b);
-  ui_out_text (uiout, _("\n\
+  uiout->text (_("\n\
 Check the underlying instruction at PC for the memory\n\
 address and value which triggered this watchpoint.\n"));
-  ui_out_text (uiout, "\n");
+  uiout->text ("\n");
 
   /* More than one watchpoint may have been triggered.  */
   return PRINT_UNKNOWN;
@@ -10837,9 +11007,9 @@ print_one_detail_masked_watchpoint (cons
   /* Masked watchpoints have only one location.  */
   gdb_assert (b->loc && b->loc->next == NULL);
 
-  ui_out_text (uiout, "\tmask ");
-  ui_out_field_core_addr (uiout, "mask", b->loc->gdbarch, w->hw_wp_mask);
-  ui_out_text (uiout, "\n");
+  uiout->text ("\tmask ");
+  uiout->field_core_addr ("mask", b->loc->gdbarch, w->hw_wp_mask);
+  uiout->text ("\n");
 }
 
 /* Implement the "print_mention" breakpoint_ops method for
@@ -10855,15 +11025,15 @@ print_mention_masked_watchpoint (struct 
   switch (b->type)
     {
     case bp_hardware_watchpoint:
-      ui_out_text (uiout, "Masked hardware watchpoint ");
+      uiout->text ("Masked hardware watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
       break;
     case bp_read_watchpoint:
-      ui_out_text (uiout, "Masked hardware read watchpoint ");
+      uiout->text ("Masked hardware read watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-rwpt");
       break;
     case bp_access_watchpoint:
-      ui_out_text (uiout, "Masked hardware access (read/write) watchpoint ");
+      uiout->text ("Masked hardware access (read/write) watchpoint ");
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-awpt");
       break;
     default:
@@ -10871,9 +11041,9 @@ print_mention_masked_watchpoint (struct 
 		      _("Invalid hardware watchpoint type."));
     }
 
-  ui_out_field_int (uiout, "number", b->number);
-  ui_out_text (uiout, ": ");
-  ui_out_field_string (uiout, "exp", w->exp_string);
+  uiout->field_int ("number", b->number);
+  uiout->text (": ");
+  uiout->field_string ("exp", w->exp_string);
   do_cleanups (ui_out_chain);
 }
 
@@ -10927,7 +11097,6 @@ watch_command_1 (const char *arg, int ac
 		 int just_location, int internal)
 {
   struct breakpoint *b, *scope_breakpoint = NULL;
-  struct expression *exp;
   const struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
   struct value *val, *mark, *result;
   int saved_bitpos = 0, saved_bitsize = 0;
@@ -10985,25 +11154,23 @@ watch_command_1 (const char *arg, int ac
 
 	  if (toklen == 6 && startswith (tok, "thread"))
 	    {
+	      struct thread_info *thr;
 	      /* At this point we've found a "thread" token, which means
 		 the user is trying to set a watchpoint that triggers
 		 only in a specific thread.  */
-	      char *endp;
+	      const char *endp;
 
 	      if (thread != -1)
 		error(_("You can specify only one thread."));
 
 	      /* Extract the thread ID from the next token.  */
-	      thread = strtol (value_start, &endp, 0);
+	      thr = parse_thread_id (value_start, &endp);
 
-	      /* Check if the user provided a valid numeric value for the
-		 thread ID.  */
+	      /* Check if the user provided a valid thread ID.  */
 	      if (*endp != ' ' && *endp != '\t' && *endp != '\0')
-		error (_("Invalid thread ID specification %s."), value_start);
+		invalid_thread_id_error (value_start);
 
-	      /* Check if the thread actually exists.  */
-	      if (!valid_thread_id (thread))
-		invalid_thread_id_error (thread);
+	      thread = thr->global_num;
 	    }
 	  else if (toklen == 4 && startswith (tok, "mask"))
 	    {
@@ -11041,7 +11208,7 @@ watch_command_1 (const char *arg, int ac
   expression = savestring (arg, exp_end - arg);
   back_to = make_cleanup (xfree, expression);
   exp_start = arg = expression;
-  exp = parse_exp_1 (&arg, 0, 0, 0);
+  expression_up exp = parse_exp_1 (&arg, 0, 0, 0);
   exp_end = arg;
   /* Remove trailing whitespace from the expression before saving it.
      This makes the eventual display of the expression string a bit
@@ -11050,7 +11217,7 @@ watch_command_1 (const char *arg, int ac
     --exp_end;
 
   /* Checking if the expression is not constant.  */
-  if (watchpoint_exp_is_const (exp))
+  if (watchpoint_exp_is_const (exp.get ()))
     {
       int len;
 
@@ -11062,7 +11229,7 @@ watch_command_1 (const char *arg, int ac
 
   exp_valid_block = innermost_block;
   mark = value_mark ();
-  fetch_subexp_value (exp, &pc, &val, &result, NULL, just_location);
+  fetch_subexp_value (exp.get (), &pc, &val, &result, NULL, just_location);
 
   if (val != NULL && just_location)
     {
@@ -11098,17 +11265,14 @@ watch_command_1 (const char *arg, int ac
   toklen = end_tok - tok;
   if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
     {
-      struct expression *cond;
-
       innermost_block = NULL;
       tok = cond_start = end_tok + 1;
-      cond = parse_exp_1 (&tok, 0, 0, 0);
+      parse_exp_1 (&tok, 0, 0, 0);
 
       /* The watchpoint expression may not be local, but the condition
 	 may still be.  E.g.: `watch global if local > 0'.  */
       cond_exp_valid_block = innermost_block;
 
-      xfree (cond);
       cond_end = tok;
     }
   if (*tok)
@@ -11162,7 +11326,7 @@ watch_command_1 (const char *arg, int ac
   else
     bp_type = bp_hardware_watchpoint;
 
-  w = XCNEW (struct watchpoint);
+  w = new watchpoint ();
   b = &w->base;
   if (use_mask)
     init_raw_breakpoint_without_location (b, NULL, bp_type,
@@ -11173,21 +11337,20 @@ watch_command_1 (const char *arg, int ac
   b->thread = thread;
   b->disposition = disp_donttouch;
   b->pspace = current_program_space;
-  w->exp = exp;
+  w->exp = std::move (exp);
   w->exp_valid_block = exp_valid_block;
   w->cond_exp_valid_block = cond_exp_valid_block;
   if (just_location)
     {
       struct type *t = value_type (val);
       CORE_ADDR addr = value_as_address (val);
-      char *name;
 
       t = check_typedef (TYPE_TARGET_TYPE (check_typedef (t)));
-      name = type_to_string (t);
 
-      w->exp_string_reparse = xstrprintf ("* (%s *) %s", name,
+      std::string name = type_to_string (t);
+
+      w->exp_string_reparse = xstrprintf ("* (%s *) %s", name.c_str (),
 					  core_addr_to_string (addr));
-      xfree (name);
 
       w->exp_string = xstrprintf ("-location %.*s",
 				  (int) (exp_end - exp_start), exp_start);
@@ -11394,29 +11557,112 @@ awatch_command (char *arg, int from_tty)
 }
 
 
-/* Helper routines for the until_command routine in infcmd.c.  Here
-   because it uses the mechanisms of breakpoints.  */
+/* Data for the FSM that manages the until(location)/advance commands
+   in infcmd.c.  Here because it uses the mechanisms of
+   breakpoints.  */
 
-struct until_break_command_continuation_args
+struct until_break_fsm
 {
-  struct breakpoint *breakpoint;
-  struct breakpoint *breakpoint2;
-  int thread_num;
+  /* The base class.  */
+  struct thread_fsm thread_fsm;
+
+  /* The thread that as current when the command was executed.  */
+  int thread;
+
+  /* The breakpoint set at the destination location.  */
+  struct breakpoint *location_breakpoint;
+
+  /* Breakpoint set at the return address in the caller frame.  May be
+     NULL.  */
+  struct breakpoint *caller_breakpoint;
 };
 
-/* This function is called by fetch_inferior_event via the
-   cmd_continuation pointer, to complete the until command.  It takes
-   care of cleaning up the temporary breakpoints set up by the until
-   command.  */
+static void until_break_fsm_clean_up (struct thread_fsm *self,
+				      struct thread_info *thread);
+static int until_break_fsm_should_stop (struct thread_fsm *self,
+					struct thread_info *thread);
+static enum async_reply_reason
+  until_break_fsm_async_reply_reason (struct thread_fsm *self);
+
+/* until_break_fsm's vtable.  */
+
+static struct thread_fsm_ops until_break_fsm_ops =
+{
+  NULL, /* dtor */
+  until_break_fsm_clean_up,
+  until_break_fsm_should_stop,
+  NULL, /* return_value */
+  until_break_fsm_async_reply_reason,
+};
+
+/* Allocate a new until_break_command_fsm.  */
+
+static struct until_break_fsm *
+new_until_break_fsm (struct interp *cmd_interp, int thread,
+		     struct breakpoint *location_breakpoint,
+		     struct breakpoint *caller_breakpoint)
+{
+  struct until_break_fsm *sm;
+
+  sm = XCNEW (struct until_break_fsm);
+  thread_fsm_ctor (&sm->thread_fsm, &until_break_fsm_ops, cmd_interp);
+
+  sm->thread = thread;
+  sm->location_breakpoint = location_breakpoint;
+  sm->caller_breakpoint = caller_breakpoint;
+
+  return sm;
+}
+
+/* Implementation of the 'should_stop' FSM method for the
+   until(location)/advance commands.  */
+
+static int
+until_break_fsm_should_stop (struct thread_fsm *self,
+			     struct thread_info *tp)
+{
+  struct until_break_fsm *sm = (struct until_break_fsm *) self;
+
+  if (bpstat_find_breakpoint (tp->control.stop_bpstat,
+			      sm->location_breakpoint) != NULL
+      || (sm->caller_breakpoint != NULL
+	  && bpstat_find_breakpoint (tp->control.stop_bpstat,
+				     sm->caller_breakpoint) != NULL))
+    thread_fsm_set_finished (self);
+
+  return 1;
+}
+
+/* Implementation of the 'clean_up' FSM method for the
+   until(location)/advance commands.  */
+
 static void
-until_break_command_continuation (void *arg, int err)
+until_break_fsm_clean_up (struct thread_fsm *self,
+			  struct thread_info *thread)
 {
-  struct until_break_command_continuation_args *a = arg;
+  struct until_break_fsm *sm = (struct until_break_fsm *) self;
+
+  /* Clean up our temporary breakpoints.  */
+  if (sm->location_breakpoint != NULL)
+    {
+      delete_breakpoint (sm->location_breakpoint);
+      sm->location_breakpoint = NULL;
+    }
+  if (sm->caller_breakpoint != NULL)
+    {
+      delete_breakpoint (sm->caller_breakpoint);
+      sm->caller_breakpoint = NULL;
+    }
+  delete_longjmp_breakpoint (sm->thread);
+}
 
-  delete_breakpoint (a->breakpoint);
-  if (a->breakpoint2)
-    delete_breakpoint (a->breakpoint2);
-  delete_longjmp_breakpoint (a->thread_num);
+/* Implementation of the 'async_reply_reason' FSM method for the
+   until(location)/advance commands.  */
+
+static enum async_reply_reason
+until_break_fsm_async_reply_reason (struct thread_fsm *self)
+{
+  return EXEC_ASYNC_LOCATION_REACHED;
 }
 
 void
@@ -11428,24 +11674,29 @@ until_break_command (char *arg, int from
   struct gdbarch *frame_gdbarch;
   struct frame_id stack_frame_id;
   struct frame_id caller_frame_id;
-  struct breakpoint *breakpoint;
-  struct breakpoint *breakpoint2 = NULL;
-  struct cleanup *old_chain;
+  struct breakpoint *location_breakpoint;
+  struct breakpoint *caller_breakpoint = NULL;
+  struct cleanup *old_chain, *cleanup;
   int thread;
   struct thread_info *tp;
+  struct event_location *location;
+  struct until_break_fsm *sm;
 
   clear_proceed_status (0);
 
   /* Set a breakpoint where the user wants it and at return from
      this function.  */
 
+  location = string_to_event_location (&arg, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
+
   if (last_displayed_sal_is_valid ())
-    sals = decode_line_1 (&arg, DECODE_LINE_FUNFIRSTLINE,
+    sals = decode_line_1 (location, DECODE_LINE_FUNFIRSTLINE, NULL,
 			  get_last_displayed_symtab (),
 			  get_last_displayed_line ());
   else
-    sals = decode_line_1 (&arg, DECODE_LINE_FUNFIRSTLINE,
-			  (struct symtab *) NULL, 0);
+    sals = decode_line_1 (location, DECODE_LINE_FUNFIRSTLINE,
+			  NULL, (struct symtab *) NULL, 0);
 
   if (sals.nelts != 1)
     error (_("Couldn't get information on specified line."));
@@ -11459,7 +11710,7 @@ until_break_command (char *arg, int from
   resolve_sal_pc (&sal);
 
   tp = inferior_thread ();
-  thread = tp->num;
+  thread = tp->global_num;
 
   old_chain = make_cleanup (null_cleanup, NULL);
 
@@ -11479,14 +11730,16 @@ until_break_command (char *arg, int from
   if (frame_id_p (caller_frame_id))
     {
       struct symtab_and_line sal2;
+      struct gdbarch *caller_gdbarch;
 
       sal2 = find_pc_line (frame_unwind_caller_pc (frame), 0);
       sal2.pc = frame_unwind_caller_pc (frame);
-      breakpoint2 = set_momentary_breakpoint (frame_unwind_caller_arch (frame),
-					      sal2,
-					      caller_frame_id,
-					      bp_until);
-      make_cleanup_delete_breakpoint (breakpoint2);
+      caller_gdbarch = frame_unwind_caller_arch (frame);
+      caller_breakpoint = set_momentary_breakpoint (caller_gdbarch,
+						    sal2,
+						    caller_frame_id,
+						    bp_until);
+      make_cleanup_delete_breakpoint (caller_breakpoint);
 
       set_longjmp_breakpoint (tp, caller_frame_id);
       make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
@@ -11498,38 +11751,24 @@ until_break_command (char *arg, int from
   if (anywhere)
     /* If the user told us to continue until a specified location,
        we don't specify a frame at which we need to stop.  */
-    breakpoint = set_momentary_breakpoint (frame_gdbarch, sal,
-					   null_frame_id, bp_until);
+    location_breakpoint = set_momentary_breakpoint (frame_gdbarch, sal,
+						    null_frame_id, bp_until);
   else
     /* Otherwise, specify the selected frame, because we want to stop
        only at the very same frame.  */
-    breakpoint = set_momentary_breakpoint (frame_gdbarch, sal,
-					   stack_frame_id, bp_until);
-  make_cleanup_delete_breakpoint (breakpoint);
+    location_breakpoint = set_momentary_breakpoint (frame_gdbarch, sal,
+						    stack_frame_id, bp_until);
+  make_cleanup_delete_breakpoint (location_breakpoint);
+
+  sm = new_until_break_fsm (command_interp (), tp->global_num,
+			    location_breakpoint, caller_breakpoint);
+  tp->thread_fsm = &sm->thread_fsm;
 
-  proceed (-1, GDB_SIGNAL_DEFAULT);
+  discard_cleanups (old_chain);
 
-  /* If we are running asynchronously, and proceed call above has
-     actually managed to start the target, arrange for breakpoints to
-     be deleted when the target stops.  Otherwise, we're already
-     stopped and delete breakpoints via cleanup chain.  */
-
-  if (target_can_async_p () && is_running (inferior_ptid))
-    {
-      struct until_break_command_continuation_args *args;
-      args = xmalloc (sizeof (*args));
-
-      args->breakpoint = breakpoint;
-      args->breakpoint2 = breakpoint2;
-      args->thread_num = thread;
+  proceed (-1, GDB_SIGNAL_DEFAULT);
 
-      discard_cleanups (old_chain);
-      add_continuation (inferior_thread (),
-			until_break_command_continuation, args,
-			xfree);
-    }
-  else
-    do_cleanups (old_chain);
+  do_cleanups (cleanup);
 }
 
 /* This function attempts to parse an optional "if <cond>" clause
@@ -11645,7 +11884,7 @@ catch_exec_command_1 (char *arg, int fro
   if ((*arg != '\0') && !isspace (*arg))
     error (_("Junk at end of arguments."));
 
-  c = XNEW (struct exec_catchpoint);
+  c = new exec_catchpoint ();
   init_catchpoint (&c->base, gdbarch, tempflag, cond_string,
 		   &catch_exec_breakpoint_ops);
   c->exec_pathname = NULL;
@@ -11685,7 +11924,8 @@ init_ada_exception_breakpoint (struct br
 
   b->enable_state = enabled ? bp_enabled : bp_disabled;
   b->disposition = tempflag ? disp_del : disp_donttouch;
-  b->addr_string = addr_string;
+  b->location = string_to_event_location (&addr_string,
+					  language_def (language_ada));
   b->language = language_ada;
 }
 
@@ -11707,9 +11947,9 @@ tcatch_command (char *arg, int from_tty)
 static int
 compare_breakpoints (const void *a, const void *b)
 {
-  const breakpoint_p *ba = a;
+  const breakpoint_p *ba = (const breakpoint_p *) a;
   uintptr_t ua = (uintptr_t) *ba;
-  const breakpoint_p *bb = b;
+  const breakpoint_p *bb = (const breakpoint_p *) b;
   uintptr_t ub = (uintptr_t) *bb;
 
   if ((*ba)->number < (*bb)->number)
@@ -11748,8 +11988,7 @@ clear_command (char *arg, int from_tty)
     }
   else
     {
-      sals.sals = (struct symtab_and_line *)
-	xmalloc (sizeof (struct symtab_and_line));
+      sals.sals = XNEW (struct symtab_and_line);
       make_cleanup (xfree, sals.sals);
       init_sal (&sal);		/* Initialize to zeroes.  */
 
@@ -11930,8 +12169,8 @@ breakpoint_auto_delete (bpstat bs)
 static int
 bp_location_compare (const void *ap, const void *bp)
 {
-  struct bp_location *a = *(void **) ap;
-  struct bp_location *b = *(void **) bp;
+  const struct bp_location *a = *(const struct bp_location **) ap;
+  const struct bp_location *b = *(const struct bp_location **) bp;
 
   if (a->address != b->address)
     return (a->address > b->address) - (a->address < b->address);
@@ -12002,9 +12241,7 @@ download_tracepoint_locations (void)
 {
   struct breakpoint *b;
   struct cleanup *old_chain;
-
-  if (!target_can_download_tracepoint ())
-    return;
+  enum tribool can_download_tracepoint = TRIBOOL_UNKNOWN;
 
   old_chain = save_current_space_and_thread ();
 
@@ -12019,6 +12256,17 @@ download_tracepoint_locations (void)
 	   : !may_insert_tracepoints))
 	continue;
 
+      if (can_download_tracepoint == TRIBOOL_UNKNOWN)
+	{
+	  if (target_can_download_tracepoint ())
+	    can_download_tracepoint = TRIBOOL_TRUE;
+	  else
+	    can_download_tracepoint = TRIBOOL_FALSE;
+	}
+
+      if (can_download_tracepoint == TRIBOOL_FALSE)
+	break;
+
       for (bl = b->loc; bl; bl = bl->next)
 	{
 	  /* In tracepoint, locations are _never_ duplicated, so
@@ -12114,11 +12362,7 @@ force_breakpoint_reinsertion (struct bp_
 
       /* Free the agent expression bytecode as well.  We will compute
 	 it later on.  */
-      if (loc->cond_bytecode)
-	{
-	  free_agent_expr (loc->cond_bytecode);
-	  loc->cond_bytecode = NULL;
-	}
+      loc->cond_bytecode.reset ();
     }
 }
 /* Called whether new breakpoints are created, or existing breakpoints
@@ -12166,7 +12410,7 @@ update_global_location_list (enum ugll_i
     for (loc = b->loc; loc; loc = loc->next)
       bp_location_count++;
 
-  bp_location = xmalloc (sizeof (*bp_location) * bp_location_count);
+  bp_location = XNEWVEC (struct bp_location *, bp_location_count);
   locp = bp_location;
   ALL_BREAKPOINTS (b)
     for (loc = b->loc; loc; loc = loc->next)
@@ -12301,7 +12545,7 @@ update_global_location_list (enum ugll_i
 
 	  if (!keep_in_target)
 	    {
-	      if (remove_breakpoint (old_loc, mark_uninserted))
+	      if (remove_breakpoint (old_loc))
 		{
 		  /* This is just about all we can do.  We could keep
 		     this location on the global list, and try to
@@ -12321,7 +12565,7 @@ update_global_location_list (enum ugll_i
 
       if (!found_object)
 	{
-	  if (removed && non_stop
+	  if (removed && target_is_non_stop_p ()
 	      && need_moribund_for_location_type (old_loc))
 	    {
 	      /* This location was removed from the target.  In
@@ -12523,7 +12767,7 @@ bpstat_remove_bp_location (bpstat bps, s
 static int
 bpstat_remove_breakpoint_callback (struct thread_info *th, void *data)
 {
-  struct breakpoint *bpt = data;
+  struct breakpoint *bpt = (struct breakpoint *) data;
 
   bpstat_remove_bp_location (th->control.stop_bpstat, bpt);
   return 0;
@@ -12543,7 +12787,26 @@ say_where (struct breakpoint *b)
      single string.  */
   if (b->loc == NULL)
     {
-      printf_filtered (_(" (%s) pending."), b->addr_string);
+      /* For pending locations, the output differs slightly based
+	 on b->extra_string.  If this is non-NULL, it contains either
+	 a condition or dprintf arguments.  */
+      if (b->extra_string == NULL)
+	{
+	  printf_filtered (_(" (%s) pending."),
+			   event_location_to_string (b->location));
+	}
+      else if (b->type == bp_dprintf)
+	{
+	  printf_filtered (_(" (%s,%s) pending."),
+			   event_location_to_string (b->location),
+			   b->extra_string);
+	}
+      else
+	{
+	  printf_filtered (_(" (%s %s) pending."),
+			   event_location_to_string (b->location),
+			   b->extra_string);
+	}
     }
   else
     {
@@ -12565,7 +12828,8 @@ say_where (struct breakpoint *b)
 	    /* This is not ideal, but each location may have a
 	       different file name, and this at least reflects the
 	       real situation somewhat.  */
-	    printf_filtered (": %s.", b->addr_string);
+	    printf_filtered (": %s.",
+			     event_location_to_string (b->location));
 	}
 
       if (b->loc->next)
@@ -12584,13 +12848,7 @@ say_where (struct breakpoint *b)
 static void
 bp_location_dtor (struct bp_location *self)
 {
-  xfree (self->cond);
-  if (self->cond_bytecode)
-    free_agent_expr (self->cond_bytecode);
   xfree (self->function_name);
-
-  VEC_free (agent_expr_p, self->target_info.conditions);
-  VEC_free (agent_expr_p, self->target_info.tcommands);
 }
 
 static const struct bp_location_ops bp_location_ops =
@@ -12607,9 +12865,9 @@ base_breakpoint_dtor (struct breakpoint 
   decref_counted_command_line (&self->commands);
   xfree (self->cond_string);
   xfree (self->extra_string);
-  xfree (self->addr_string);
   xfree (self->filter);
-  xfree (self->addr_string_range_end);
+  delete_event_location (self->location);
+  delete_event_location (self->location_range_end);
 }
 
 static struct bp_location *
@@ -12617,7 +12875,7 @@ base_breakpoint_allocate_location (struc
 {
   struct bp_location *loc;
 
-  loc = XNEW (struct bp_location);
+  loc = new struct bp_location ();
   init_bp_location (loc, &bp_location_ops, self);
   return loc;
 }
@@ -12638,7 +12896,8 @@ base_breakpoint_insert_location (struct 
 }
 
 static int
-base_breakpoint_remove_location (struct bp_location *bl)
+base_breakpoint_remove_location (struct bp_location *bl,
+				 enum remove_bp_reason reason)
 {
   internal_error_pure_virtual_called ();
 }
@@ -12702,11 +12961,10 @@ base_breakpoint_print_recreate (struct b
 }
 
 static void
-base_breakpoint_create_sals_from_address (char **arg,
-					  struct linespec_result *canonical,
-					  enum bptype type_wanted,
-					  char *addr_start,
-					  char **copy_arg)
+base_breakpoint_create_sals_from_location
+  (const struct event_location *location,
+   struct linespec_result *canonical,
+   enum bptype type_wanted)
 {
   internal_error_pure_virtual_called ();
 }
@@ -12728,7 +12986,9 @@ base_breakpoint_create_breakpoints_sal (
 }
 
 static void
-base_breakpoint_decode_linespec (struct breakpoint *b, char **s,
+base_breakpoint_decode_location (struct breakpoint *b,
+				 const struct event_location *location,
+				 struct program_space *search_pspace,
 				 struct symtabs_and_lines *sals)
 {
   internal_error_pure_virtual_called ();
@@ -12766,9 +13026,9 @@ struct breakpoint_ops base_breakpoint_op
   base_breakpoint_print_one_detail,
   base_breakpoint_print_mention,
   base_breakpoint_print_recreate,
-  base_breakpoint_create_sals_from_address,
+  base_breakpoint_create_sals_from_location,
   base_breakpoint_create_breakpoints_sal,
-  base_breakpoint_decode_linespec,
+  base_breakpoint_decode_location,
   base_breakpoint_explains_signal,
   base_breakpoint_after_condition_true,
 };
@@ -12779,9 +13039,9 @@ static void
 bkpt_re_set (struct breakpoint *b)
 {
   /* FIXME: is this still reachable?  */
-  if (b->addr_string == NULL)
+  if (breakpoint_event_location_empty_p (b))
     {
-      /* Anything without a string can't be re-set.  */
+      /* Anything without a location can't be re-set.  */
       delete_breakpoint (b);
       return;
     }
@@ -12792,6 +13052,11 @@ bkpt_re_set (struct breakpoint *b)
 static int
 bkpt_insert_location (struct bp_location *bl)
 {
+  CORE_ADDR addr = bl->target_info.reqstd_address;
+
+  bl->target_info.kind = breakpoint_kind (bl, &addr);
+  bl->target_info.placed_address = addr;
+
   if (bl->loc_type == bp_loc_hardware_breakpoint)
     return target_insert_hw_breakpoint (bl->gdbarch, &bl->target_info);
   else
@@ -12799,12 +13064,12 @@ bkpt_insert_location (struct bp_location
 }
 
 static int
-bkpt_remove_location (struct bp_location *bl)
+bkpt_remove_location (struct bp_location *bl, enum remove_bp_reason reason)
 {
   if (bl->loc_type == bp_loc_hardware_breakpoint)
     return target_remove_hw_breakpoint (bl->gdbarch, &bl->target_info);
   else
-    return target_remove_breakpoint (bl->gdbarch, &bl->target_info);
+    return target_remove_breakpoint (bl->gdbarch, &bl->target_info, reason);
 }
 
 static int
@@ -12872,18 +13137,20 @@ bkpt_print_it (bpstat bs)
 				   bl->address,
 				   b->number, 1);
   annotate_breakpoint (b->number);
+  maybe_print_thread_hit_breakpoint (uiout);
+
   if (bp_temp)
-    ui_out_text (uiout, "\nTemporary breakpoint ");
+    uiout->text ("Temporary breakpoint ");
   else
-    ui_out_text (uiout, "\nBreakpoint ");
-  if (ui_out_is_mi_like_p (uiout))
+    uiout->text ("Breakpoint ");
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
+      uiout->field_string ("reason",
 			   async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
-      ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+      uiout->field_string ("disp", bpdisp_text (b->disposition));
     }
-  ui_out_field_int (uiout, "bkptno", b->number);
-  ui_out_text (uiout, ", ");
+  uiout->field_int ("bkptno", b->number);
+  uiout->text (", ");
 
   return PRINT_SRC_AND_LOC;
 }
@@ -12891,7 +13158,7 @@ bkpt_print_it (bpstat bs)
 static void
 bkpt_print_mention (struct breakpoint *b)
 {
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     return;
 
   switch (b->type)
@@ -12933,18 +13200,23 @@ bkpt_print_recreate (struct breakpoint *
     internal_error (__FILE__, __LINE__,
 		    _("unhandled breakpoint type %d"), (int) tp->type);
 
-  fprintf_unfiltered (fp, " %s", tp->addr_string);
+  fprintf_unfiltered (fp, " %s",
+		      event_location_to_string (tp->location));
+
+  /* Print out extra_string if this breakpoint is pending.  It might
+     contain, for example, conditions that were set by the user.  */
+  if (tp->loc == NULL && tp->extra_string != NULL)
+    fprintf_unfiltered (fp, " %s", tp->extra_string);
+
   print_recreate_thread (tp, fp);
 }
 
 static void
-bkpt_create_sals_from_address (char **arg,
-			       struct linespec_result *canonical,
-			       enum bptype type_wanted,
-			       char *addr_start, char **copy_arg)
+bkpt_create_sals_from_location (const struct event_location *location,
+				struct linespec_result *canonical,
+				enum bptype type_wanted)
 {
-  create_sals_from_address_default (arg, canonical, type_wanted,
-				    addr_start, copy_arg);
+  create_sals_from_location_default (location, canonical, type_wanted);
 }
 
 static void
@@ -12969,10 +13241,12 @@ bkpt_create_breakpoints_sal (struct gdba
 }
 
 static void
-bkpt_decode_linespec (struct breakpoint *b, char **s,
+bkpt_decode_location (struct breakpoint *b,
+		      const struct event_location *location,
+		      struct program_space *search_pspace,
 		      struct symtabs_and_lines *sals)
 {
-  decode_linespec_default (b, s, sals);
+  decode_location_default (b, location, search_pspace, sals);
 }
 
 /* Virtual table for internal breakpoints.  */
@@ -13092,28 +13366,6 @@ momentary_bkpt_check_status (bpstat bs)
 static enum print_stop_action
 momentary_bkpt_print_it (bpstat bs)
 {
-  struct ui_out *uiout = current_uiout;
-
-  if (ui_out_is_mi_like_p (uiout))
-    {
-      struct breakpoint *b = bs->breakpoint_at;
-
-      switch (b->type)
-	{
-	case bp_finish:
-	  ui_out_field_string
-	    (uiout, "reason",
-	     async_reason_lookup (EXEC_ASYNC_FUNCTION_FINISHED));
-	  break;
-
-	case bp_until:
-	  ui_out_field_string
-	    (uiout, "reason",
-	     async_reason_lookup (EXEC_ASYNC_LOCATION_REACHED));
-	  break;
-	}
-    }
-
   return PRINT_UNKNOWN;
 }
 
@@ -13131,7 +13383,7 @@ momentary_bkpt_print_mention (struct bre
 static void
 longjmp_bkpt_dtor (struct breakpoint *self)
 {
-  struct thread_info *tp = find_thread_id (self->thread);
+  struct thread_info *tp = find_thread_global_id (self->thread);
 
   if (tp)
     tp->initiating_frame = null_frame_id;
@@ -13160,7 +13412,8 @@ bkpt_probe_insert_location (struct bp_lo
 }
 
 static int
-bkpt_probe_remove_location (struct bp_location *bl)
+bkpt_probe_remove_location (struct bp_location *bl,
+			    enum remove_bp_reason reason)
 {
   /* Let's clear the semaphore before removing the location.  */
   if (bl->probe.probe->pops->clear_semaphore != NULL)
@@ -13168,30 +13421,28 @@ bkpt_probe_remove_location (struct bp_lo
 					    bl->probe.objfile,
 					    bl->gdbarch);
 
-  return bkpt_remove_location (bl);
+  return bkpt_remove_location (bl, reason);
 }
 
 static void
-bkpt_probe_create_sals_from_address (char **arg,
-				     struct linespec_result *canonical,
-				     enum bptype type_wanted,
-				     char *addr_start, char **copy_arg)
+bkpt_probe_create_sals_from_location (const struct event_location *location,
+				      struct linespec_result *canonical,
+				      enum bptype type_wanted)
 {
   struct linespec_sals lsal;
 
-  lsal.sals = parse_probes (arg, canonical);
-
-  *copy_arg = xstrdup (canonical->addr_string);
-  lsal.canonical = xstrdup (*copy_arg);
-
+  lsal.sals = parse_probes (location, NULL, canonical);
+  lsal.canonical = xstrdup (event_location_to_string (canonical->location));
   VEC_safe_push (linespec_sals, canonical->sals, &lsal);
 }
 
 static void
-bkpt_probe_decode_linespec (struct breakpoint *b, char **s,
+bkpt_probe_decode_location (struct breakpoint *b,
+			    const struct event_location *location,
+			    struct program_space *search_pspace,
 			    struct symtabs_and_lines *sals)
 {
-  *sals = parse_probes (s, NULL);
+  *sals = parse_probes (location, search_pspace, NULL);
   if (!sals->sals)
     error (_("probe not found"));
 }
@@ -13223,17 +13474,17 @@ tracepoint_print_one_detail (const struc
     {
       gdb_assert (self->type == bp_static_tracepoint);
 
-      ui_out_text (uiout, "\tmarker id is ");
-      ui_out_field_string (uiout, "static-tracepoint-marker-string-id",
+      uiout->text ("\tmarker id is ");
+      uiout->field_string ("static-tracepoint-marker-string-id",
 			   tp->static_trace_marker_id);
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
     }
 }
 
 static void
 tracepoint_print_mention (struct breakpoint *b)
 {
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     return;
 
   switch (b->type)
@@ -13265,7 +13516,7 @@ tracepoint_print_recreate (struct breakp
 
   if (self->type == bp_fast_tracepoint)
     fprintf_unfiltered (fp, "ftrace");
-  if (self->type == bp_static_tracepoint)
+  else if (self->type == bp_static_tracepoint)
     fprintf_unfiltered (fp, "strace");
   else if (self->type == bp_tracepoint)
     fprintf_unfiltered (fp, "trace");
@@ -13273,7 +13524,8 @@ tracepoint_print_recreate (struct breakp
     internal_error (__FILE__, __LINE__,
 		    _("unhandled tracepoint type %d"), (int) self->type);
 
-  fprintf_unfiltered (fp, " %s", self->addr_string);
+  fprintf_unfiltered (fp, " %s",
+		      event_location_to_string (self->location));
   print_recreate_thread (self, fp);
 
   if (tp->pass_count)
@@ -13281,13 +13533,11 @@ tracepoint_print_recreate (struct breakp
 }
 
 static void
-tracepoint_create_sals_from_address (char **arg,
-				     struct linespec_result *canonical,
-				     enum bptype type_wanted,
-				     char *addr_start, char **copy_arg)
+tracepoint_create_sals_from_location (const struct event_location *location,
+				      struct linespec_result *canonical,
+				      enum bptype type_wanted)
 {
-  create_sals_from_address_default (arg, canonical, type_wanted,
-				    addr_start, copy_arg);
+  create_sals_from_location_default (location, canonical, type_wanted);
 }
 
 static void
@@ -13312,10 +13562,12 @@ tracepoint_create_breakpoints_sal (struc
 }
 
 static void
-tracepoint_decode_linespec (struct breakpoint *b, char **s,
+tracepoint_decode_location (struct breakpoint *b,
+			    const struct event_location *location,
+			    struct program_space *search_pspace,
 			    struct symtabs_and_lines *sals)
 {
-  decode_linespec_default (b, s, sals);
+  decode_location_default (b, location, search_pspace, sals);
 }
 
 struct breakpoint_ops tracepoint_breakpoint_ops;
@@ -13324,22 +13576,23 @@ struct breakpoint_ops tracepoint_breakpo
    static probe.  */
 
 static void
-tracepoint_probe_create_sals_from_address (char **arg,
-					   struct linespec_result *canonical,
-					   enum bptype type_wanted,
-					   char *addr_start, char **copy_arg)
+tracepoint_probe_create_sals_from_location
+  (const struct event_location *location,
+   struct linespec_result *canonical,
+   enum bptype type_wanted)
 {
   /* We use the same method for breakpoint on probes.  */
-  bkpt_probe_create_sals_from_address (arg, canonical, type_wanted,
-				       addr_start, copy_arg);
+  bkpt_probe_create_sals_from_location (location, canonical, type_wanted);
 }
 
 static void
-tracepoint_probe_decode_linespec (struct breakpoint *b, char **s,
+tracepoint_probe_decode_location (struct breakpoint *b,
+				  const struct event_location *location,
+				  struct program_space *search_pspace,
 				  struct symtabs_and_lines *sals)
 {
   /* We use the same method for breakpoint on probes.  */
-  bkpt_probe_decode_linespec (b, s, sals);
+  bkpt_probe_decode_location (b, location, search_pspace, sals);
 }
 
 static struct breakpoint_ops tracepoint_probe_breakpoint_ops;
@@ -13351,13 +13604,8 @@ dprintf_re_set (struct breakpoint *b)
 {
   breakpoint_re_set_default (b);
 
-  /* This breakpoint could have been pending, and be resolved now, and
-     if so, we should now have the extra string.  If we don't, the
-     dprintf was malformed when created, but we couldn't tell because
-     we can't extract the extra string until the location is
-     resolved.  */
-  if (b->loc != NULL && b->extra_string == NULL)
-    error (_("Format string required"));
+  /* extra_string should never be non-NULL for dprintf.  */
+  gdb_assert (b->extra_string != NULL);
 
   /* 1 - connect to target 1, that can run breakpoint commands.
      2 - create a dprintf, which resolves fine.
@@ -13378,7 +13626,8 @@ dprintf_re_set (struct breakpoint *b)
 static void
 dprintf_print_recreate (struct breakpoint *tp, struct ui_file *fp)
 {
-  fprintf_unfiltered (fp, "dprintf %s%s", tp->addr_string,
+  fprintf_unfiltered (fp, "dprintf %s,%s",
+		      event_location_to_string (tp->location),
 		      tp->extra_string);
   print_recreate_thread (tp, fp);
 }
@@ -13425,19 +13674,24 @@ dprintf_after_condition_true (struct bps
    markers (`-m').  */
 
 static void
-strace_marker_create_sals_from_address (char **arg,
-					struct linespec_result *canonical,
-					enum bptype type_wanted,
-					char *addr_start, char **copy_arg)
+strace_marker_create_sals_from_location (const struct event_location *location,
+					 struct linespec_result *canonical,
+					 enum bptype type_wanted)
 {
   struct linespec_sals lsal;
+  const char *arg_start, *arg;
+  char *str;
+  struct cleanup *cleanup;
 
-  lsal.sals = decode_static_tracepoint_spec (arg);
+  arg = arg_start = get_linespec_location (location);
+  lsal.sals = decode_static_tracepoint_spec (&arg);
 
-  *copy_arg = savestring (addr_start, *arg - addr_start);
+  str = savestring (arg_start, arg - arg_start);
+  cleanup = make_cleanup (xfree, str);
+  canonical->location = new_linespec_location (&str);
+  do_cleanups (cleanup);
 
-  canonical->addr_string = xstrdup (*copy_arg);
-  lsal.canonical = xstrdup (*copy_arg);
+  lsal.canonical = xstrdup (event_location_to_string (canonical->location));
   VEC_safe_push (linespec_sals, canonical->sals, &lsal);
 }
 
@@ -13470,17 +13724,17 @@ strace_marker_create_breakpoints_sal (st
       struct symtabs_and_lines expanded;
       struct tracepoint *tp;
       struct cleanup *old_chain;
-      char *addr_string;
+      struct event_location *location;
 
       expanded.nelts = 1;
       expanded.sals = &lsal->sals.sals[i];
 
-      addr_string = xstrdup (canonical->addr_string);
-      old_chain = make_cleanup (xfree, addr_string);
+      location = copy_event_location (canonical->location);
+      old_chain = make_cleanup_delete_event_location (location);
 
-      tp = XCNEW (struct tracepoint);
+      tp = new tracepoint ();
       init_breakpoint_sal (&tp->base, gdbarch, expanded,
-			   addr_string, NULL,
+			   location, NULL,
 			   cond_string, extra_string,
 			   type_wanted, disposition,
 			   thread, task, ignore_count, ops,
@@ -13501,12 +13755,15 @@ strace_marker_create_breakpoints_sal (st
 }
 
 static void
-strace_marker_decode_linespec (struct breakpoint *b, char **s,
+strace_marker_decode_location (struct breakpoint *b,
+			       const struct event_location *location,
+			       struct program_space *search_pspace,
 			       struct symtabs_and_lines *sals)
 {
   struct tracepoint *tp = (struct tracepoint *) b;
+  const char *s = get_linespec_location (location);
 
-  *sals = decode_static_tracepoint_spec (s);
+  *sals = decode_static_tracepoint_spec (&s);
   if (sals->nelts > tp->static_trace_marker_id_idx)
     {
       sals->sals[0] = sals->sals[tp->static_trace_marker_id_idx];
@@ -13617,13 +13874,13 @@ delete_breakpoint (struct breakpoint *bp
   /* On the chance that someone will soon try again to delete this
      same bp, we mark it as deleted before freeing its storage.  */
   bpt->type = bp_none;
-  xfree (bpt);
+  delete bpt;
 }
 
 static void
 do_delete_breakpoint_cleanup (void *b)
 {
-  delete_breakpoint (b);
+  delete_breakpoint ((struct breakpoint *) b);
 }
 
 struct cleanup *
@@ -13718,11 +13975,19 @@ delete_command (char *arg, int from_tty)
     map_breakpoint_numbers (arg, do_map_delete_breakpoint, NULL);
 }
 
+/* Return true if all locations of B bound to PSPACE are pending.  If
+   PSPACE is NULL, all locations of all program spaces are
+   considered.  */
+
 static int
-all_locations_are_pending (struct bp_location *loc)
+all_locations_are_pending (struct breakpoint *b, struct program_space *pspace)
 {
-  for (; loc; loc = loc->next)
-    if (!loc->shlib_disabled
+  struct bp_location *loc;
+
+  for (loc = b->loc; loc != NULL; loc = loc->next)
+    if ((pspace == NULL
+	 || loc->pspace == pspace)
+	&& !loc->shlib_disabled
 	&& !loc->pspace->executing_startup)
       return 0;
   return 1;
@@ -13842,6 +14107,7 @@ update_static_tracepoint (struct breakpo
 	  struct symbol *sym;
 	  struct static_tracepoint_marker *tpmarker;
 	  struct ui_out *uiout = current_uiout;
+	  struct explicit_location explicit_loc;
 
 	  tpmarker = VEC_index (static_tracepoint_marker_p, markers, 0);
 
@@ -13858,34 +14124,36 @@ update_static_tracepoint (struct breakpo
 
 	  sal2 = find_pc_line (tpmarker->address, 0);
 	  sym = find_pc_sect_function (tpmarker->address, NULL);
-	  ui_out_text (uiout, "Now in ");
+	  uiout->text ("Now in ");
 	  if (sym)
 	    {
-	      ui_out_field_string (uiout, "func",
-				   SYMBOL_PRINT_NAME (sym));
-	      ui_out_text (uiout, " at ");
+	      uiout->field_string ("func", SYMBOL_PRINT_NAME (sym));
+	      uiout->text (" at ");
 	    }
-	  ui_out_field_string (uiout, "file",
+	  uiout->field_string ("file",
 			       symtab_to_filename_for_display (sal2.symtab));
-	  ui_out_text (uiout, ":");
+	  uiout->text (":");
 
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (uiout->is_mi_like_p ())
 	    {
 	      const char *fullname = symtab_to_fullname (sal2.symtab);
 
-	      ui_out_field_string (uiout, "fullname", fullname);
+	      uiout->field_string ("fullname", fullname);
 	    }
 
-	  ui_out_field_int (uiout, "line", sal2.line);
-	  ui_out_text (uiout, "\n");
+	  uiout->field_int ("line", sal2.line);
+	  uiout->text ("\n");
 
 	  b->loc->line_number = sal2.line;
 	  b->loc->symtab = sym != NULL ? sal2.symtab : NULL;
 
-	  xfree (b->addr_string);
-	  b->addr_string = xstrprintf ("%s:%d",
-				   symtab_to_filename_for_display (sal2.symtab),
-				       b->loc->line_number);
+	  delete_event_location (b->location);
+	  initialize_explicit_location (&explicit_loc);
+	  explicit_loc.source_filename
+	    = ASTRDUP (symtab_to_filename_for_display (sal2.symtab));
+	  explicit_loc.line_offset.offset = b->loc->line_number;
+	  explicit_loc.line_offset.sign = LINE_OFFSET_NONE;
+	  b->location = new_explicit_location (&explicit_loc);
 
 	  /* Might be nice to check if function changed, and warn if
 	     so.  */
@@ -13923,24 +14191,64 @@ locations_are_equal (struct bp_location 
   return 1;
 }
 
-/* Create new breakpoint locations for B (a hardware or software breakpoint)
-   based on SALS and SALS_END.  If SALS_END.NELTS is not zero, then B is
-   a ranged breakpoint.  */
+/* Split all locations of B that are bound to PSPACE out of B's
+   location list to a separate list and return that list's head.  If
+   PSPACE is NULL, hoist out all locations of B.  */
+
+static struct bp_location *
+hoist_existing_locations (struct breakpoint *b, struct program_space *pspace)
+{
+  struct bp_location head;
+  struct bp_location *i = b->loc;
+  struct bp_location **i_link = &b->loc;
+  struct bp_location *hoisted = &head;
+
+  if (pspace == NULL)
+    {
+      i = b->loc;
+      b->loc = NULL;
+      return i;
+    }
+
+  head.next = NULL;
+
+  while (i != NULL)
+    {
+      if (i->pspace == pspace)
+	{
+	  *i_link = i->next;
+	  i->next = NULL;
+	  hoisted->next = i;
+	  hoisted = i;
+	}
+      else
+	i_link = &i->next;
+      i = *i_link;
+    }
+
+  return head.next;
+}
+
+/* Create new breakpoint locations for B (a hardware or software
+   breakpoint) based on SALS and SALS_END.  If SALS_END.NELTS is not
+   zero, then B is a ranged breakpoint.  Only recreates locations for
+   FILTER_PSPACE.  Locations of other program spaces are left
+   untouched.  */
 
 void
 update_breakpoint_locations (struct breakpoint *b,
+			     struct program_space *filter_pspace,
 			     struct symtabs_and_lines sals,
 			     struct symtabs_and_lines sals_end)
 {
   int i;
-  struct bp_location *existing_locations = b->loc;
+  struct bp_location *existing_locations;
 
   if (sals_end.nelts != 0 && (sals.nelts != 1 || sals_end.nelts != 1))
     {
       /* Ranged breakpoints have only one start location and one end
 	 location.  */
       b->enable_state = bp_disabled;
-      update_global_location_list (UGLL_MAY_INSERT);
       printf_unfiltered (_("Could not reset ranged breakpoint %d: "
 			   "multiple locations found\n"),
 			 b->number);
@@ -13953,10 +14261,10 @@ update_breakpoint_locations (struct brea
      We'd like to retain the location, so that when the library is
      loaded again, we don't loose the enabled/disabled status of the
      individual locations.  */
-  if (all_locations_are_pending (existing_locations) && sals.nelts == 0)
+  if (all_locations_are_pending (b, filter_pspace) && sals.nelts == 0)
     return;
 
-  b->loc = NULL;
+  existing_locations = hoist_existing_locations (b, filter_pspace);
 
   for (i = 0; i < sals.nelts; ++i)
     {
@@ -14038,26 +14346,23 @@ update_breakpoint_locations (struct brea
 
   if (!locations_are_equal (existing_locations, b->loc))
     observer_notify_breakpoint_modified (b);
-
-  update_global_location_list (UGLL_MAY_INSERT);
 }
 
-/* Find the SaL locations corresponding to the given ADDR_STRING.
+/* Find the SaL locations corresponding to the given LOCATION.
    On return, FOUND will be 1 if any SaL was found, zero otherwise.  */
 
 static struct symtabs_and_lines
-addr_string_to_sals (struct breakpoint *b, char *addr_string, int *found)
+location_to_sals (struct breakpoint *b, struct event_location *location,
+		  struct program_space *search_pspace, int *found)
 {
-  char *s;
   struct symtabs_and_lines sals = {0};
   struct gdb_exception exception = exception_none;
 
   gdb_assert (b->ops != NULL);
-  s = addr_string;
 
   TRY
     {
-      b->ops->decode_linespec (b, &s, &sals);
+      b->ops->decode_location (b, location, search_pspace, &sals);
     }
   CATCH (e, RETURN_MASK_ERROR)
     {
@@ -14073,7 +14378,10 @@ addr_string_to_sals (struct breakpoint *
 	 breakpoint being disabled, and don't want to see more
 	 errors.  */
       if (e.error == NOT_FOUND_ERROR
-	  && (b->condition_not_parsed 
+	  && (b->condition_not_parsed
+	      || (b->loc != NULL
+		  && search_pspace != NULL
+		  && b->loc->pspace != search_pspace)
 	      || (b->loc && b->loc->shlib_disabled)
 	      || (b->loc && b->loc->pspace->executing_startup)
 	      || b->enable_state == bp_disabled))
@@ -14099,20 +14407,24 @@ addr_string_to_sals (struct breakpoint *
 
       for (i = 0; i < sals.nelts; ++i)
 	resolve_sal_pc (&sals.sals[i]);
-      if (b->condition_not_parsed && s && s[0])
+      if (b->condition_not_parsed && b->extra_string != NULL)
 	{
 	  char *cond_string, *extra_string;
 	  int thread, task;
 
-	  find_condition_and_thread (s, sals.sals[0].pc,
+	  find_condition_and_thread (b->extra_string, sals.sals[0].pc,
 				     &cond_string, &thread, &task,
 				     &extra_string);
+	  gdb_assert (b->cond_string == NULL);
 	  if (cond_string)
 	    b->cond_string = cond_string;
 	  b->thread = thread;
 	  b->task = task;
 	  if (extra_string)
-	    b->extra_string = extra_string;
+	    {
+	      xfree (b->extra_string);
+	      b->extra_string = extra_string;
+	    }
 	  b->condition_not_parsed = 0;
 	}
 
@@ -14138,17 +14450,19 @@ breakpoint_re_set_default (struct breakp
   struct symtabs_and_lines sals, sals_end;
   struct symtabs_and_lines expanded = {0};
   struct symtabs_and_lines expanded_end = {0};
+  struct program_space *filter_pspace = current_program_space;
 
-  sals = addr_string_to_sals (b, b->addr_string, &found);
+  sals = location_to_sals (b, b->location, filter_pspace, &found);
   if (found)
     {
       make_cleanup (xfree, sals.sals);
       expanded = sals;
     }
 
-  if (b->addr_string_range_end)
+  if (b->location_range_end != NULL)
     {
-      sals_end = addr_string_to_sals (b, b->addr_string_range_end, &found);
+      sals_end = location_to_sals (b, b->location_range_end,
+				   filter_pspace, &found);
       if (found)
 	{
 	  make_cleanup (xfree, sals_end.sals);
@@ -14156,19 +14470,18 @@ breakpoint_re_set_default (struct breakp
 	}
     }
 
-  update_breakpoint_locations (b, expanded, expanded_end);
+  update_breakpoint_locations (b, filter_pspace, expanded, expanded_end);
 }
 
 /* Default method for creating SALs from an address string.  It basically
    calls parse_breakpoint_sals.  Return 1 for success, zero for failure.  */
 
 static void
-create_sals_from_address_default (char **arg,
-				  struct linespec_result *canonical,
-				  enum bptype type_wanted,
-				  char *addr_start, char **copy_arg)
+create_sals_from_location_default (const struct event_location *location,
+				   struct linespec_result *canonical,
+				   enum bptype type_wanted)
 {
-  parse_breakpoint_sals (arg, canonical);
+  parse_breakpoint_sals (location, canonical);
 }
 
 /* Call create_breakpoints_sal for the given arguments.  This is the default
@@ -14196,16 +14509,18 @@ create_breakpoints_sal_default (struct g
 }
 
 /* Decode the line represented by S by calling decode_line_full.  This is the
-   default function for the `decode_linespec' method of breakpoint_ops.  */
+   default function for the `decode_location' method of breakpoint_ops.  */
 
 static void
-decode_linespec_default (struct breakpoint *b, char **s,
+decode_location_default (struct breakpoint *b,
+			 const struct event_location *location,
+			 struct program_space *search_pspace,
 			 struct symtabs_and_lines *sals)
 {
   struct linespec_result canonical;
 
   init_linespec_result (&canonical);
-  decode_line_full (s, DECODE_LINE_FUNFIRSTLINE,
+  decode_line_full (location, DECODE_LINE_FUNFIRSTLINE, search_pspace,
 		    (struct symtab *) NULL, 0,
 		    &canonical, multiple_symbols_all,
 		    b->filter);
@@ -14232,15 +14547,10 @@ decode_linespec_default (struct breakpoi
 static struct cleanup *
 prepare_re_set_context (struct breakpoint *b)
 {
-  struct cleanup *cleanups;
-
   input_radix = b->input_radix;
-  cleanups = save_current_space_and_thread ();
-  if (b->pspace != NULL)
-    switch_to_program_space_and_thread (b->pspace);
   set_language (b->language);
 
-  return cleanups;
+  return make_cleanup (null_cleanup, NULL);
 }
 
 /* Reset a breakpoint given it's struct breakpoint * BINT.
@@ -14260,7 +14570,9 @@ breakpoint_re_set_one (void *bint)
   return 0;
 }
 
-/* Re-set all breakpoints after symbols have been re-loaded.  */
+/* Re-set breakpoint locations for the current program space.
+   Locations bound to other program spaces are left untouched.  */
+
 void
 breakpoint_re_set (void)
 {
@@ -14271,7 +14583,12 @@ breakpoint_re_set (void)
 
   save_language = current_language->la_language;
   save_input_radix = input_radix;
-  old_chain = save_current_program_space ();
+  old_chain = save_current_space_and_thread ();
+
+  /* Note: we must not try to insert locations until after all
+     breakpoints have been re-set.  Otherwise, e.g., when re-setting
+     breakpoint 1, we'd insert the locations of breakpoint 2, which
+     hadn't been re-set yet, and thus may have stale locations.  */
 
   ALL_BREAKPOINTS_SAFE (b, b_tmp)
   {
@@ -14293,6 +14610,9 @@ breakpoint_re_set (void)
   create_longjmp_master_breakpoint ();
   create_std_terminate_master_breakpoint ();
   create_exception_master_breakpoint ();
+
+  /* Now we can insert.  */
+  update_global_location_list (UGLL_MAY_INSERT);
 }
 
 /* Reset the thread number of this breakpoint:
@@ -14305,7 +14625,7 @@ breakpoint_re_set_thread (struct breakpo
   if (b->thread != -1)
     {
       if (in_thread_list (inferior_ptid))
-	b->thread = pid_to_thread_id (inferior_ptid);
+	b->thread = ptid_to_global_thread_id (inferior_ptid);
 
       /* We're being called after following a fork.  The new fork is
 	 selected as current, and unless this was a vfork will have a
@@ -14388,27 +14708,25 @@ ignore_command (char *args, int from_tty
    whose numbers are given in ARGS.  */
 
 static void
-map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *,
-						      void *),
+map_breakpoint_numbers (const char *args,
+			void (*function) (struct breakpoint *,
+					  void *),
 			void *data)
 {
   int num;
   struct breakpoint *b, *tmp;
-  int match;
-  struct get_number_or_range_state state;
 
   if (args == 0 || *args == '\0')
     error_no_arg (_("one or more breakpoint numbers"));
 
-  init_number_or_range (&state, args);
+  number_or_range_parser parser (args);
 
-  while (!state.finished)
+  while (!parser.finished ())
     {
-      const char *p = state.string;
+      const char *p = parser.cur_tok ();
+      bool match = false;
 
-      match = 0;
-
-      num = get_number_or_range (&state);
+      num = parser.get_number ();
       if (num == 0)
 	{
 	  warning (_("bad breakpoint number at or near '%s'"), p);
@@ -14418,11 +14736,11 @@ map_breakpoint_numbers (char *args, void
 	  ALL_BREAKPOINTS_SAFE (b, tmp)
 	    if (b->number == num)
 	      {
-		match = 1;
+		match = true;
 		function (b, data);
 		break;
 	      }
-	  if (match == 0)
+	  if (!match)
 	    printf_unfiltered (_("No breakpoint number %d.\n"), num);
 	}
     }
@@ -14583,7 +14901,7 @@ enable_breakpoint_disp (struct breakpoin
   if (is_watchpoint (bpt))
     {
       /* Initialize it just to avoid a GCC false warning.  */
-      enum enable_state orig_enable_state = 0;
+      enum enable_state orig_enable_state = bp_disabled;
 
       TRY
 	{
@@ -14816,7 +15134,7 @@ insert_single_step_breakpoint (struct gd
   if (tp->control.single_step_breakpoints == NULL)
     {
       tp->control.single_step_breakpoints
-	= new_single_step_breakpoint (tp->num, gdbarch);
+	= new_single_step_breakpoint (tp->global_num, gdbarch);
     }
 
   sal = find_pc_line (pc, 0);
@@ -14828,6 +15146,34 @@ insert_single_step_breakpoint (struct gd
   update_global_location_list (UGLL_INSERT);
 }
 
+/* Insert single step breakpoints according to the current state.  */
+
+int
+insert_single_step_breakpoints (struct gdbarch *gdbarch)
+{
+  struct regcache *regcache = get_current_regcache ();
+  VEC (CORE_ADDR) * next_pcs;
+
+  next_pcs = gdbarch_software_single_step (gdbarch, regcache);
+
+  if (next_pcs != NULL)
+    {
+      int i;
+      CORE_ADDR pc;
+      struct frame_info *frame = get_current_frame ();
+      struct address_space *aspace = get_frame_address_space (frame);
+
+      for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
+	insert_single_step_breakpoint (gdbarch, aspace, pc);
+
+      VEC_free (CORE_ADDR, next_pcs);
+
+      return 1;
+    }
+  else
+    return 0;
+}
+
 /* See breakpoint.h.  */
 
 int
@@ -14877,16 +15223,20 @@ static void
 trace_command (char *arg, int from_tty)
 {
   struct breakpoint_ops *ops;
-  const char *arg_cp = arg;
+  struct event_location *location;
+  struct cleanup *back_to;
 
-  if (arg && probe_linespec_to_ops (&arg_cp))
+  location = string_to_event_location (&arg, current_language);
+  back_to = make_cleanup_delete_event_location (location);
+  if (location != NULL
+      && event_location_type (location) == PROBE_LOCATION)
     ops = &tracepoint_probe_breakpoint_ops;
   else
     ops = &tracepoint_breakpoint_ops;
 
   create_breakpoint (get_current_arch (),
-		     arg,
-		     NULL, 0, NULL, 1 /* parse arg */,
+		     location,
+		     NULL, 0, arg, 1 /* parse arg */,
 		     0 /* tempflag */,
 		     bp_tracepoint /* type_wanted */,
 		     0 /* Ignore count */,
@@ -14895,14 +15245,20 @@ trace_command (char *arg, int from_tty)
 		     from_tty,
 		     1 /* enabled */,
 		     0 /* internal */, 0);
+  do_cleanups (back_to);
 }
 
 static void
 ftrace_command (char *arg, int from_tty)
 {
+  struct event_location *location;
+  struct cleanup *back_to;
+
+  location = string_to_event_location (&arg, current_language);
+  back_to = make_cleanup_delete_event_location (location);
   create_breakpoint (get_current_arch (),
-		     arg,
-		     NULL, 0, NULL, 1 /* parse arg */,
+		     location,
+		     NULL, 0, arg, 1 /* parse arg */,
 		     0 /* tempflag */,
 		     bp_fast_tracepoint /* type_wanted */,
 		     0 /* Ignore count */,
@@ -14911,6 +15267,7 @@ ftrace_command (char *arg, int from_tty)
 		     from_tty,
 		     1 /* enabled */,
 		     0 /* internal */, 0);
+  do_cleanups (back_to);
 }
 
 /* strace command implementation.  Creates a static tracepoint.  */
@@ -14919,17 +15276,26 @@ static void
 strace_command (char *arg, int from_tty)
 {
   struct breakpoint_ops *ops;
+  struct event_location *location;
+  struct cleanup *back_to;
 
   /* Decide if we are dealing with a static tracepoint marker (`-m'),
      or with a normal static tracepoint.  */
   if (arg && startswith (arg, "-m") && isspace (arg[2]))
-    ops = &strace_marker_breakpoint_ops;
+    {
+      ops = &strace_marker_breakpoint_ops;
+      location = new_linespec_location (&arg);
+    }
   else
-    ops = &tracepoint_breakpoint_ops;
+    {
+      ops = &tracepoint_breakpoint_ops;
+      location = string_to_event_location (&arg, current_language);
+    }
 
+  back_to = make_cleanup_delete_event_location (location);
   create_breakpoint (get_current_arch (),
-		     arg,
-		     NULL, 0, NULL, 1 /* parse arg */,
+		     location,
+		     NULL, 0, arg, 1 /* parse arg */,
 		     0 /* tempflag */,
 		     bp_static_tracepoint /* type_wanted */,
 		     0 /* Ignore count */,
@@ -14938,6 +15304,7 @@ strace_command (char *arg, int from_tty)
 		     from_tty,
 		     1 /* enabled */,
 		     0 /* internal */, 0);
+  do_cleanups (back_to);
 }
 
 /* Set up a fake reader function that gets command lines from a linked
@@ -14969,6 +15336,8 @@ create_tracepoint_from_upload (struct up
 {
   char *addr_str, small_buf[100];
   struct tracepoint *tp;
+  struct event_location *location;
+  struct cleanup *cleanup;
 
   if (utp->at_string)
     addr_str = utp->at_string;
@@ -14991,9 +15360,11 @@ create_tracepoint_from_upload (struct up
 	       "has no source form, ignoring it"),
 	     utp->number);
 
+  location = string_to_event_location (&addr_str, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
   if (!create_breakpoint (get_current_arch (),
-			  addr_str,
-			  utp->cond_string, -1, NULL,
+			  location,
+			  utp->cond_string, -1, addr_str,
 			  0 /* parse cond/thread */,
 			  0 /* tempflag */,
 			  utp->type /* type_wanted */,
@@ -15004,7 +15375,12 @@ create_tracepoint_from_upload (struct up
 			  utp->enabled /* enabled */,
 			  0 /* internal */,
 			  CREATE_BREAKPOINT_FLAGS_INSERTED))
-    return NULL;
+    {
+      do_cleanups (cleanup);
+      return NULL;
+    }
+
+  do_cleanups (cleanup);
 
   /* Get the tracepoint we just created.  */
   tp = get_tracepoint (tracepoint_count);
@@ -15060,9 +15436,9 @@ tracepoints_info (char *args, int from_t
   if (num_printed == 0)
     {
       if (args == NULL || *args == '\0')
-	ui_out_message (uiout, 0, "No tracepoints.\n");
+	uiout->message ("No tracepoints.\n");
       else
-	ui_out_message (uiout, 0, "No tracepoint matching '%s'.\n", args);
+	uiout->message ("No tracepoint matching '%s'.\n", args);
     }
 
   default_collect_info ();
@@ -15173,12 +15549,10 @@ trace_pass_command (char *args, int from
     }
   else
     {
-      struct get_number_or_range_state state;
-
-      init_number_or_range (&state, args);
-      while (!state.finished)
+      number_or_range_parser parser (args);
+      while (!parser.finished ())
 	{
-	  t1 = get_tracepoint_by_number (&args, &state);
+	  t1 = get_tracepoint_by_number (&args, &parser);
 	  if (t1)
 	    trace_pass_set_count (t1, count, from_tty);
 	}
@@ -15224,16 +15598,16 @@ get_tracepoint_by_number_on_target (int 
 
 struct tracepoint *
 get_tracepoint_by_number (char **arg,
-			  struct get_number_or_range_state *state)
+			  number_or_range_parser *parser)
 {
   struct breakpoint *t;
   int tpnum;
   char *instring = arg == NULL ? NULL : *arg;
 
-  if (state)
+  if (parser != NULL)
     {
-      gdb_assert (!state->finished);
-      tpnum = get_number_or_range (state);
+      gdb_assert (!parser->finished ());
+      tpnum = parser->get_number ();
     }
   else if (arg == NULL || *arg == NULL || ! **arg)
     tpnum = tracepoint_count;
@@ -15284,7 +15658,6 @@ save_breakpoints (char *filename, int fr
   struct breakpoint *tp;
   int any = 0;
   struct cleanup *cleanup;
-  struct ui_file *fp;
   int extra_trace_bits = 0;
 
   if (filename == 0 || *filename == 0)
@@ -15320,14 +15693,15 @@ save_breakpoints (char *filename, int fr
 
   filename = tilde_expand (filename);
   cleanup = make_cleanup (xfree, filename);
-  fp = gdb_fopen (filename, "w");
-  if (!fp)
+
+  stdio_file fp;
+
+  if (!fp.open (filename, "w"))
     error (_("Unable to open file '%s' for saving (%s)"),
 	   filename, safe_strerror (errno));
-  make_cleanup_ui_file_delete (fp);
 
   if (extra_trace_bits)
-    save_trace_state_variables (fp);
+    save_trace_state_variables (&fp);
 
   ALL_BREAKPOINTS (tp)
   {
@@ -15339,42 +15713,40 @@ save_breakpoints (char *filename, int fr
     if (filter && !filter (tp))
       continue;
 
-    tp->ops->print_recreate (tp, fp);
+    tp->ops->print_recreate (tp, &fp);
 
     /* Note, we can't rely on tp->number for anything, as we can't
        assume the recreated breakpoint numbers will match.  Use $bpnum
        instead.  */
 
     if (tp->cond_string)
-      fprintf_unfiltered (fp, "  condition $bpnum %s\n", tp->cond_string);
+      fp.printf ("  condition $bpnum %s\n", tp->cond_string);
 
     if (tp->ignore_count)
-      fprintf_unfiltered (fp, "  ignore $bpnum %d\n", tp->ignore_count);
+      fp.printf ("  ignore $bpnum %d\n", tp->ignore_count);
 
     if (tp->type != bp_dprintf && tp->commands)
       {
-	struct gdb_exception exception;
-
-	fprintf_unfiltered (fp, "  commands\n");
+	fp.puts ("  commands\n");
 	
-	ui_out_redirect (current_uiout, fp);
+	current_uiout->redirect (&fp);
 	TRY
 	  {
 	    print_command_lines (current_uiout, tp->commands->commands, 2);
 	  }
 	CATCH (ex, RETURN_MASK_ALL)
 	  {
-	    ui_out_redirect (current_uiout, NULL);
+	  current_uiout->redirect (NULL);
 	    throw_exception (ex);
 	  }
 	END_CATCH
 
-	ui_out_redirect (current_uiout, NULL);
-	fprintf_unfiltered (fp, "  end\n");
+	current_uiout->redirect (NULL);
+	fp.puts ("  end\n");
       }
 
     if (tp->enable_state == bp_disabled)
-      fprintf_unfiltered (fp, "disable $bpnum\n");
+      fp.puts ("disable $bpnum\n");
 
     /* If this is a multi-location breakpoint, check if the locations
        should be individually disabled.  Watchpoint locations are
@@ -15386,12 +15758,12 @@ save_breakpoints (char *filename, int fr
 
 	for (loc = tp->loc; loc != NULL; loc = loc->next, n++)
 	  if (!loc->enabled)
-	    fprintf_unfiltered (fp, "disable $bpnum.%d\n", n);
+	    fp.printf ("disable $bpnum.%d\n", n);
       }
   }
 
   if (extra_trace_bits && *default_collect)
-    fprintf_unfiltered (fp, "set default-collect %s\n", default_collect);
+    fp.printf ("set default-collect %s\n", default_collect);
 
   if (from_tty)
     printf_filtered (_("Saved to file '%s'.\n"), filename);
@@ -15431,26 +15803,46 @@ all_tracepoints (void)
 }
 
 
+/* This help string is used to consolidate all the help string for specifying
+   locations used by several commands.  */
+
+#define LOCATION_HELP_STRING \
+"Linespecs are colon-separated lists of location parameters, such as\n\
+source filename, function name, label name, and line number.\n\
+Example: To specify the start of a label named \"the_top\" in the\n\
+function \"fact\" in the file \"factorial.c\", use\n\
+\"factorial.c:fact:the_top\".\n\
+\n\
+Address locations begin with \"*\" and specify an exact address in the\n\
+program.  Example: To specify the fourth byte past the start function\n\
+\"main\", use \"*main + 4\".\n\
+\n\
+Explicit locations are similar to linespecs but use an option/argument\n\
+syntax to specify location parameters.\n\
+Example: To specify the start of the label named \"the_top\" in the\n\
+function \"fact\" in the file \"factorial.c\", use \"-source factorial.c\n\
+-function fact -label the_top\".\n"
+
 /* This help string is used for the break, hbreak, tbreak and thbreak
    commands.  It is defined as a macro to prevent duplication.
    COMMAND should be a string constant containing the name of the
    command.  */
+
 #define BREAK_ARGS_HELP(command) \
 command" [PROBE_MODIFIER] [LOCATION] [thread THREADNUM] [if CONDITION]\n\
 PROBE_MODIFIER shall be present if the command is to be placed in a\n\
 probe point.  Accepted values are `-probe' (for a generic, automatically\n\
 guessed probe type), `-probe-stap' (for a SystemTap probe) or \n\
 `-probe-dtrace' (for a DTrace probe).\n\
-LOCATION may be a line number, function name, or \"*\" and an address.\n\
-If a line number is specified, break at start of code for that line.\n\
-If a function is specified, break at start of code for that function.\n\
-If an address is specified, break at that exact address.\n\
+LOCATION may be a linespec, address, or explicit location as described\n\
+below.\n\
+\n\
 With no LOCATION, uses current execution address of the selected\n\
 stack frame.  This is useful for breaking on return to a stack frame.\n\
 \n\
 THREADNUM is the number from \"info threads\".\n\
 CONDITION is a boolean expression.\n\
-\n\
+\n" LOCATION_HELP_STRING "\n\
 Multiple breakpoints at one place are permitted, and useful if their\n\
 conditions are different.\n\
 \n\
@@ -15579,9 +15971,9 @@ initialize_breakpoint_ops (void)
   ops->insert_location = bkpt_insert_location;
   ops->remove_location = bkpt_remove_location;
   ops->breakpoint_hit = bkpt_breakpoint_hit;
-  ops->create_sals_from_address = bkpt_create_sals_from_address;
+  ops->create_sals_from_location = bkpt_create_sals_from_location;
   ops->create_breakpoints_sal = bkpt_create_breakpoints_sal;
-  ops->decode_linespec = bkpt_decode_linespec;
+  ops->decode_location = bkpt_decode_location;
 
   /* The breakpoint_ops structure to be used in regular breakpoints.  */
   ops = &bkpt_breakpoint_ops;
@@ -15629,8 +16021,8 @@ initialize_breakpoint_ops (void)
   *ops = bkpt_breakpoint_ops;
   ops->insert_location = bkpt_probe_insert_location;
   ops->remove_location = bkpt_probe_remove_location;
-  ops->create_sals_from_address = bkpt_probe_create_sals_from_address;
-  ops->decode_linespec = bkpt_probe_decode_linespec;
+  ops->create_sals_from_location = bkpt_probe_create_sals_from_location;
+  ops->decode_location = bkpt_probe_decode_location;
 
   /* Watchpoints.  */
   ops = &watchpoint_breakpoint_ops;
@@ -15668,22 +16060,22 @@ initialize_breakpoint_ops (void)
   ops->print_one_detail = tracepoint_print_one_detail;
   ops->print_mention = tracepoint_print_mention;
   ops->print_recreate = tracepoint_print_recreate;
-  ops->create_sals_from_address = tracepoint_create_sals_from_address;
+  ops->create_sals_from_location = tracepoint_create_sals_from_location;
   ops->create_breakpoints_sal = tracepoint_create_breakpoints_sal;
-  ops->decode_linespec = tracepoint_decode_linespec;
+  ops->decode_location = tracepoint_decode_location;
 
   /* Probe tracepoints.  */
   ops = &tracepoint_probe_breakpoint_ops;
   *ops = tracepoint_breakpoint_ops;
-  ops->create_sals_from_address = tracepoint_probe_create_sals_from_address;
-  ops->decode_linespec = tracepoint_probe_decode_linespec;
+  ops->create_sals_from_location = tracepoint_probe_create_sals_from_location;
+  ops->decode_location = tracepoint_probe_decode_location;
 
   /* Static tracepoints with marker (`-m').  */
   ops = &strace_marker_breakpoint_ops;
   *ops = tracepoint_breakpoint_ops;
-  ops->create_sals_from_address = strace_marker_create_sals_from_address;
+  ops->create_sals_from_location = strace_marker_create_sals_from_location;
   ops->create_breakpoints_sal = strace_marker_create_breakpoints_sal;
-  ops->decode_linespec = strace_marker_decode_linespec;
+  ops->decode_location = strace_marker_decode_location;
 
   /* Fork catchpoints.  */
   ops = &catch_fork_breakpoint_ops;
@@ -15773,8 +16165,10 @@ Set ignore-count of breakpoint number N 
 Usage is `ignore N COUNT'."));
 
   add_com ("commands", class_breakpoint, commands_command, _("\
-Set commands to be executed when a breakpoint is hit.\n\
-Give breakpoint number as argument after \"commands\".\n\
+Set commands to be executed when the given breakpoints are hit.\n\
+Give a space-separated breakpoint list as argument after \"commands\".\n\
+A list element can be a breakpoint number (e.g. `5') or a range of numbers\n\
+(e.g. `5-7').\n\
 With no argument, the targeted breakpoint is the last one set.\n\
 The commands themselves follow starting on the next line.\n\
 Type a line containing \"end\" to indicate the end of them.\n\
@@ -15897,20 +16291,17 @@ This command may be abbreviated \"delete
 	   &deletelist);
 
   add_com ("clear", class_breakpoint, clear_command, _("\
-Clear breakpoint at specified line or function.\n\
-Argument may be line number, function name, or \"*\" and an address.\n\
-If line number is specified, all breakpoints in that line are cleared.\n\
-If function is specified, breakpoints at beginning of function are cleared.\n\
-If an address is specified, breakpoints at that address are cleared.\n\
+Clear breakpoint at specified location.\n\
+Argument may be a linespec, explicit, or address location as described below.\n\
 \n\
 With no argument, clears all breakpoints in the line that the selected frame\n\
-is executing in.\n\
-\n\
+is executing in.\n"
+"\n" LOCATION_HELP_STRING "\n\
 See also the \"delete\" command which clears breakpoints by number."));
   add_com_alias ("cl", "clear", class_breakpoint, 1);
 
   c = add_com ("break", class_breakpoint, break_command, _("\
-Set breakpoint at specified line or function.\n"
+Set breakpoint at specified location.\n"
 BREAK_ARGS_HELP ("break")));
   set_cmd_completer (c, location_completer);
 
@@ -16073,7 +16464,7 @@ hardware.)"),
   /* Tracepoint manipulation commands.  */
 
   c = add_com ("trace", class_breakpoint, trace_command, _("\
-Set a tracepoint at specified line or function.\n\
+Set a tracepoint at specified location.\n\
 \n"
 BREAK_ARGS_HELP ("trace") "\n\
 Do \"help tracepoints\" for info on other tracepoint commands."));
@@ -16085,31 +16476,27 @@ Do \"help tracepoints\" for info on othe
   add_com_alias ("trac", "trace", class_alias, 1);
 
   c = add_com ("ftrace", class_breakpoint, ftrace_command, _("\
-Set a fast tracepoint at specified line or function.\n\
+Set a fast tracepoint at specified location.\n\
 \n"
 BREAK_ARGS_HELP ("ftrace") "\n\
 Do \"help tracepoints\" for info on other tracepoint commands."));
   set_cmd_completer (c, location_completer);
 
   c = add_com ("strace", class_breakpoint, strace_command, _("\
-Set a static tracepoint at specified line, function or marker.\n\
+Set a static tracepoint at location or marker.\n\
 \n\
 strace [LOCATION] [if CONDITION]\n\
-LOCATION may be a line number, function name, \"*\" and an address,\n\
-or -m MARKER_ID.\n\
-If a line number is specified, probe the marker at start of code\n\
-for that line.  If a function is specified, probe the marker at start\n\
-of code for that function.  If an address is specified, probe the marker\n\
-at that exact address.  If a marker id is specified, probe the marker\n\
-with that name.  With no LOCATION, uses current execution address of\n\
-the selected stack frame.\n\
+LOCATION may be a linespec, explicit, or address location (described below) \n\
+or -m MARKER_ID.\n\n\
+If a marker id is specified, probe the marker with that name.  With\n\
+no LOCATION, uses current execution address of the selected stack frame.\n\
 Static tracepoints accept an extra collect action -- ``collect $_sdata''.\n\
 This collects arbitrary user data passed in the probe point call to the\n\
 tracing library.  You can inspect it when analyzing the trace buffer,\n\
 by printing the $_sdata variable like any other convenience variable.\n\
 \n\
 CONDITION is a boolean expression.\n\
-\n\
+\n" LOCATION_HELP_STRING "\n\
 Multiple tracepoints at one place are permitted, and useful if their\n\
 conditions are different.\n\
 \n\
@@ -16261,11 +16648,10 @@ an instruction at any address within the
 range (including START-LOCATION and END-LOCATION)."));
 
   c = add_com ("dprintf", class_breakpoint, dprintf_command, _("\
-Set a dynamic printf at specified line or function.\n\
+Set a dynamic printf at specified location.\n\
 dprintf location,format string,arg1,arg2,...\n\
-location may be a line number, function name, or \"*\" and an address.\n\
-If a line number is specified, break at start of code for that line.\n\
-If a function is specified, break at start of code for that function."));
+location may be a linespec, explicit, or address location.\n"
+"\n" LOCATION_HELP_STRING));
   set_cmd_completer (c, location_completer);
 
   add_setshow_enum_cmd ("dprintf-style", class_support,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/breakpoint.h ./gdb/breakpoint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/breakpoint.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/breakpoint.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Data structures associated with breakpoints in GDB.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,17 +26,31 @@
 #include "command.h"
 #include "break-common.h"
 #include "probe.h"
+#include <vector>
 
 struct value;
 struct block;
 struct gdbpy_breakpoint_object;
 struct gdbscm_breakpoint_object;
-struct get_number_or_range_state;
+struct number_or_range_parser;
 struct thread_info;
 struct bpstats;
 struct bp_location;
 struct linespec_result;
 struct linespec_sals;
+struct event_location;
+
+/* Why are we removing the breakpoint from the target?  */
+
+enum remove_bp_reason
+{
+  /* A regular remove.  Remove the breakpoint and forget everything
+     about it.  */
+  REMOVE_BREAKPOINT,
+
+  /* Detach the breakpoints from a fork child.  */
+  DETACH_BREAKPOINT,
+};
 
 /* This is the maximum number of bytes a breakpoint instruction can
    take.  Feel free to increase it.  It's just used in a few places to
@@ -247,21 +261,17 @@ struct bp_target_info
   /* The length of the data cached in SHADOW_CONTENTS.  */
   int shadow_len;
 
-  /* The size of the placed breakpoint, according to
-     gdbarch_breakpoint_from_pc, when the breakpoint was inserted.
-     This is generally the same as SHADOW_LEN, unless we did not need
-     to read from the target to implement the memory breakpoint
-     (e.g. if a remote stub handled the details).  We may still need
-     the size to remove the breakpoint safely.  */
-  int placed_size;
-
-  /* Vector of conditions the target should evaluate if it supports target-side
-     breakpoint conditions.  */
-  VEC(agent_expr_p) *conditions;
-
-  /* Vector of commands the target should evaluate if it supports
-     target-side breakpoint commands.  */
-  VEC(agent_expr_p) *tcommands;
+  /* The breakpoint's kind.  It is used in 'kind' parameter in Z
+     packets.  */
+  int kind;
+
+  /* Conditions the target should evaluate if it supports target-side
+     breakpoint conditions.  These are non-owning pointers.  */
+  std::vector<agent_expr *> conditions;
+
+  /* Commands the target should evaluate if it supports target-side
+     breakpoint commands.  These are non-owning pointers.  */
+  std::vector<agent_expr *> tcommands;
 
   /* Flag that is true if the breakpoint should be left in place even
      when GDB is not connected.  */
@@ -330,12 +340,12 @@ struct bp_location
      different for different locations.  Only valid for real
      breakpoints; a watchpoint's conditional expression is stored in
      the owner breakpoint object.  */
-  struct expression *cond;
+  expression_up cond;
 
   /* Conditional expression in agent expression
      bytecode form.  This is used for stub-side breakpoint
      condition evaluation.  */
-  struct agent_expr *cond_bytecode;
+  agent_expr_up cond_bytecode;
 
   /* Signals that the condition has changed since the last time
      we updated the global location list.  This means the condition
@@ -352,7 +362,7 @@ struct bp_location
 
   enum condition_status condition_changed;
 
-  struct agent_expr *cmd_bytecode;
+  agent_expr_up cmd_bytecode;
 
   /* Signals that breakpoint conditions and/or commands need to be
      re-synched with the target.  This has no use other than
@@ -518,7 +528,7 @@ struct breakpoint_ops
      with the "insert" method above.  Return 0 for success, 1 if the
      breakpoint, watchpoint or catchpoint type is not supported,
      -1 for failure.  */
-  int (*remove_location) (struct bp_location *);
+  int (*remove_location) (struct bp_location *, enum remove_bp_reason reason);
 
   /* Return true if it the target has stopped due to hitting
      breakpoint location BL.  This function does not check if we
@@ -574,14 +584,15 @@ struct breakpoint_ops
   /* Print to FP the CLI command that recreates this breakpoint.  */
   void (*print_recreate) (struct breakpoint *, struct ui_file *fp);
 
-  /* Create SALs from address string, storing the result in linespec_result.
+  /* Create SALs from location, storing the result in linespec_result.
 
      For an explanation about the arguments, see the function
-     `create_sals_from_address_default'.
+     `create_sals_from_location_default'.
 
      This function is called inside `create_breakpoint'.  */
-  void (*create_sals_from_address) (char **, struct linespec_result *,
-				    enum bptype, char *, char **);
+  void (*create_sals_from_location) (const struct event_location *location,
+				     struct linespec_result *canonical,
+				     enum bptype type_wanted);
 
   /* This method will be responsible for creating a breakpoint given its SALs.
      Usually, it just calls `create_breakpoints_sal' (for ordinary
@@ -597,13 +608,16 @@ struct breakpoint_ops
 				  int, const struct breakpoint_ops *,
 				  int, int, int, unsigned);
 
-  /* Given the address string (second parameter), this method decodes it
-     and provides the SAL locations related to it.  For ordinary breakpoints,
-     it calls `decode_line_full'.
-
-     This function is called inside `addr_string_to_sals'.  */
-  void (*decode_linespec) (struct breakpoint *, char **,
-			   struct symtabs_and_lines *);
+  /* Given the location (second parameter), this method decodes it and
+     provides the SAL locations related to it.  For ordinary
+     breakpoints, it calls `decode_line_full'.  If SEARCH_PSPACE is
+     not NULL, symbol search is restricted to just that program space.
+
+     This function is called inside `location_to_sals'.  */
+  void (*decode_location) (struct breakpoint *b,
+			   const struct event_location *location,
+			   struct program_space *search_pspace,
+			   struct symtabs_and_lines *sals);
 
   /* Return true if this breakpoint explains a signal.  See
      bpstat_explains_signal.  */
@@ -702,17 +716,17 @@ struct breakpoint
        non-thread-specific ordinary breakpoints this is NULL.  */
     struct program_space *pspace;
 
-    /* String we used to set the breakpoint (malloc'd).  */
-    char *addr_string;
+    /* Location we used to set the breakpoint (malloc'd).  */
+    struct event_location *location;
 
     /* The filter that should be passed to decode_line_full when
        re-setting this breakpoint.  This may be NULL, but otherwise is
        allocated with xmalloc.  */
     char *filter;
 
-    /* For a ranged breakpoint, the string we used to find
+    /* For a ranged breakpoint, the location we used to find
        the end of the range (malloc'd).  */
-    char *addr_string_range_end;
+    struct event_location *location_range_end;
 
     /* Architecture we used to set the breakpoint.  */
     struct gdbarch *gdbarch;
@@ -781,12 +795,12 @@ struct watchpoint
   char *exp_string_reparse;
 
   /* The expression we are watching, or NULL if not a watchpoint.  */
-  struct expression *exp;
+  expression_up exp;
   /* The largest block within which it is valid, or NULL if it is
      valid anywhere (e.g. consists just of global symbols).  */
   const struct block *exp_valid_block;
   /* The conditional expression if any.  */
-  struct expression *cond_exp;
+  expression_up cond_exp;
   /* The largest block within which it is valid, or NULL if it is
      valid anywhere (e.g. consists just of global symbols).  */
   const struct block *cond_exp_valid_block;
@@ -1002,7 +1016,11 @@ struct bpstat_what
 
 /* Tell what to do about this bpstat.  */
 struct bpstat_what bpstat_what (bpstat);
-
+
+/* Run breakpoint event callbacks associated with the breakpoints that
+   triggered.  */
+extern void bpstat_run_callbacks (bpstat bs_head);
+
 /* Find the bpstat associated with a breakpoint.  NULL otherwise.  */
 bpstat bpstat_find_breakpoint (bpstat, struct breakpoint *);
 
@@ -1139,6 +1157,11 @@ extern int program_breakpoint_here_p (st
 extern enum breakpoint_here breakpoint_here_p (struct address_space *, 
 					       CORE_ADDR);
 
+/* Return true if an enabled breakpoint exists in the range defined by
+   ADDR and LEN, in ASPACE.  */
+extern int breakpoint_in_range_p (struct address_space *aspace,
+				  CORE_ADDR addr, ULONGEST len);
+
 extern int moribund_breakpoint_here_p (struct address_space *, CORE_ADDR);
 
 extern int breakpoint_inserted_here_p (struct address_space *, CORE_ADDR);
@@ -1188,6 +1211,7 @@ extern void init_bp_location (struct bp_
 			      struct breakpoint *owner);
 
 extern void update_breakpoint_locations (struct breakpoint *b,
+					 struct program_space *filter_pspace,
 					 struct symtabs_and_lines sals,
 					 struct symtabs_and_lines sals_end);
 
@@ -1293,10 +1317,30 @@ enum breakpoint_create_flags
     CREATE_BREAKPOINT_FLAGS_INSERTED = 1 << 0
   };
 
-extern int create_breakpoint (struct gdbarch *gdbarch, char *arg,
+/* Set a breakpoint.  This function is shared between CLI and MI functions
+   for setting a breakpoint at LOCATION.
+
+   This function has two major modes of operations, selected by the
+   PARSE_EXTRA parameter.
+
+   If PARSE_EXTRA is zero, LOCATION is just the breakpoint's location,
+   with condition, thread, and extra string specified by the COND_STRING,
+   THREAD, and EXTRA_STRING parameters.
+
+   If PARSE_EXTRA is non-zero, this function will attempt to extract
+   the condition, thread, and extra string from EXTRA_STRING, ignoring
+   the similarly named parameters.
+
+   If INTERNAL is non-zero, the breakpoint number will be allocated
+   from the internal breakpoint count.
+
+   Returns true if any breakpoint was created; false otherwise.  */
+
+extern int create_breakpoint (struct gdbarch *gdbarch,
+			      const struct event_location *location,
 			      char *cond_string, int thread,
 			      char *extra_string,
-			      int parse_arg,
+			      int parse_extra,
 			      int tempflag, enum bptype wanted_type,
 			      int ignore_count,
 			      enum auto_boolean pending_break_support,
@@ -1409,7 +1453,7 @@ extern void enable_breakpoints_after_sta
    after they've already read the commands into a struct
    command_line.  */
 extern enum command_control_type commands_from_control_command
-  (char *arg, struct command_line *cmd);
+  (const char *arg, struct command_line *cmd);
 
 extern void clear_breakpoint_hit_counts (void);
 
@@ -1466,8 +1510,6 @@ extern void remove_solib_event_breakpoin
    delete at next stop disposition.  */
 extern void remove_solib_event_breakpoints_at_next_stop (void);
 
-extern void remove_thread_event_breakpoints (void);
-
 extern void disable_breakpoints_in_shlibs (void);
 
 /* This function returns TRUE if ep is a catchpoint.  */
@@ -1489,6 +1531,12 @@ extern void delete_command (char *arg, i
 extern void insert_single_step_breakpoint (struct gdbarch *,
 					   struct address_space *, 
 					   CORE_ADDR);
+
+/* Insert all software single step breakpoints for the current frame.
+   Return true if any software single step breakpoints are inserted,
+   otherwise, return false.  */
+extern int insert_single_step_breakpoints (struct gdbarch *);
+
 /* Check if any hardware watchpoints have triggered, according to the
    target.  */
 int watchpoints_triggered (struct target_waitstatus *);
@@ -1542,8 +1590,8 @@ extern struct tracepoint *get_tracepoint
 
 /* Find a tracepoint by parsing a number in the supplied string.  */
 extern struct tracepoint *
-     get_tracepoint_by_number (char **arg, 
-			       struct get_number_or_range_state *state);
+  get_tracepoint_by_number (char **arg,
+			    number_or_range_parser *parser);
 
 /* Return a vector of all tracepoints currently defined.  The vector
    is newly allocated; the caller should free when done with it.  */
@@ -1585,6 +1633,9 @@ extern int pc_at_non_inline_function (st
 
 extern int user_breakpoint_p (struct breakpoint *);
 
+/* Return true if this breakpoint is pending, false if not.  */
+extern int pending_breakpoint_p (struct breakpoint *);
+
 /* Attempt to determine architecture of location identified by SAL.  */
 extern struct gdbarch *get_sal_arch (struct symtab_and_line sal);
 
@@ -1592,4 +1643,8 @@ extern void breakpoint_free_objfile (str
 
 extern char *ep_parse_optional_if_clause (char **arg);
 
+/* Print the "Thread ID hit" part of "Thread ID hit Breakpoint N" to
+   UIOUT iff debugging multiple threads.  */
+extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
+
 #endif /* !defined (BREAKPOINT_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-kvm.c ./gdb/bsd-kvm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-kvm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bsd-kvm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* BSD Kernel Data Access Library (libkvm) interface.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-kvm.h ./gdb/bsd-kvm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-kvm.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bsd-kvm.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* BSD Kernel Data Access Library (libkvm) interface.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-uthread.c ./gdb/bsd-uthread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-uthread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bsd-uthread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* BSD user-level threads support.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -68,7 +68,9 @@ bsd_uthread_set_supply_uthread (struct g
 				void (*supply_uthread) (struct regcache *,
 							int, CORE_ADDR))
 {
-  struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+  struct bsd_uthread_ops *ops
+    = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
   ops->supply_uthread = supply_uthread;
 }
 
@@ -80,7 +82,9 @@ bsd_uthread_set_collect_uthread (struct 
 			 void (*collect_uthread) (const struct regcache *,
 						  int, CORE_ADDR))
 {
-  struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+  struct bsd_uthread_ops *ops
+    = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
   ops->collect_uthread = collect_uthread;
 }
 
@@ -161,7 +165,8 @@ static int
 bsd_uthread_activate (struct objfile *objfile)
 {
   struct gdbarch *gdbarch = target_gdbarch ();
-  struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+  struct bsd_uthread_ops *ops
+    = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
 
   /* Skip if the thread stratum has already been activated.  */
   if (bsd_uthread_active)
@@ -283,7 +288,8 @@ bsd_uthread_fetch_registers (struct targ
 			     struct regcache *regcache, int regnum)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+  struct bsd_uthread_ops *uthread_ops
+    = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
   CORE_ADDR addr = ptid_get_tid (inferior_ptid);
   struct target_ops *beneath = find_target_beneath (ops);
   CORE_ADDR active_addr;
@@ -310,7 +316,8 @@ bsd_uthread_store_registers (struct targ
 			     struct regcache *regcache, int regnum)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+  struct bsd_uthread_ops *uthread_ops
+    = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
   struct target_ops *beneath = find_target_beneath (ops);
   CORE_ADDR addr = ptid_get_tid (inferior_ptid);
   CORE_ADDR active_addr;
@@ -394,7 +401,7 @@ bsd_uthread_thread_alive (struct target_
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   struct target_ops *beneath = find_target_beneath (ops);
-  CORE_ADDR addr = ptid_get_tid (inferior_ptid);
+  CORE_ADDR addr = ptid_get_tid (ptid);
 
   if (addr != 0)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-uthread.h ./gdb/bsd-uthread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/bsd-uthread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/bsd-uthread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* BSD user-level threads support.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/btrace.c ./gdb/btrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/btrace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/btrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Branch trace support for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -37,6 +37,7 @@
 
 #include <inttypes.h>
 #include <ctype.h>
+#include <algorithm>
 
 /* Command lists for btrace maintenance commands.  */
 static struct cmd_list_element *maint_btrace_cmdlist;
@@ -48,6 +49,10 @@ static struct cmd_list_element *maint_bt
 /* Control whether to skip PAD packets when computing the packet history.  */
 static int maint_btrace_pt_skip_pad = 1;
 
+/* A vector of function segments.  */
+typedef struct btrace_function * bfun_s;
+DEF_VEC_P (bfun_s);
+
 static void btrace_add_pc (struct thread_info *tp);
 
 /* Print a record debug message.  Use do ... while (0) to avoid ambiguities
@@ -136,6 +141,21 @@ ftrace_debug (const struct btrace_functi
 		prefix, fun, file, level, ibegin, iend);
 }
 
+/* Return the number of instructions in a given function call segment.  */
+
+static unsigned int
+ftrace_call_num_insn (const struct btrace_function* bfun)
+{
+  if (bfun == NULL)
+    return 0;
+
+  /* A gap is always counted as one instruction.  */
+  if (bfun->errcode != 0)
+    return 1;
+
+  return VEC_length (btrace_insn_s, bfun->insn);
+}
+
 /* Return non-zero if BFUN does not match MFUN and FUN,
    return zero otherwise.  */
 
@@ -193,7 +213,7 @@ ftrace_new_function (struct btrace_funct
 {
   struct btrace_function *bfun;
 
-  bfun = xzalloc (sizeof (*bfun));
+  bfun = XCNEW (struct btrace_function);
 
   bfun->msym = mfun;
   bfun->sym = fun;
@@ -211,8 +231,7 @@ ftrace_new_function (struct btrace_funct
       prev->flow.next = bfun;
 
       bfun->number = prev->number + 1;
-      bfun->insn_offset = (prev->insn_offset
-			   + VEC_length (btrace_insn_s, prev->insn));
+      bfun->insn_offset = prev->insn_offset + ftrace_call_num_insn (prev);
       bfun->level = prev->level;
     }
 
@@ -233,6 +252,7 @@ ftrace_update_caller (struct btrace_func
   bfun->flags = flags;
 
   ftrace_debug (bfun, "set caller");
+  ftrace_debug (caller, "..to");
 }
 
 /* Fix up the caller for all segments of a function.  */
@@ -295,6 +315,18 @@ ftrace_new_tailcall (struct btrace_funct
   return bfun;
 }
 
+/* Return the caller of BFUN or NULL if there is none.  This function skips
+   tail calls in the call chain.  */
+static struct btrace_function *
+ftrace_get_caller (struct btrace_function *bfun)
+{
+  for (; bfun != NULL; bfun = bfun->up)
+    if ((bfun->flags & BFUN_UP_LINKS_TO_TAILCALL) == 0)
+      return bfun->up;
+
+  return NULL;
+}
+
 /* Find the innermost caller in the back trace of BFUN with MFUN/FUN
    symbol information.  */
 
@@ -386,16 +418,12 @@ ftrace_new_return (struct btrace_functio
 	  /* There is no call in PREV's back trace.  We assume that the
 	     branch trace did not include it.  */
 
-	  /* Let's find the topmost call function - this skips tail calls.  */
+	  /* Let's find the topmost function and add a new caller for it.
+	     This should handle a series of initial tail calls.  */
 	  while (prev->up != NULL)
 	    prev = prev->up;
 
-	  /* We maintain levels for a series of returns for which we have
-	     not seen the calls.
-	     We start at the preceding function's level in case this has
-	     already been a return for which we have not seen the call.
-	     We start at level 0 otherwise, to handle tail calls correctly.  */
-	  bfun->level = min (0, prev->level) - 1;
+	  bfun->level = prev->level - 1;
 
 	  /* Fix up the call stack for PREV.  */
 	  ftrace_fixup_caller (prev, bfun, BFUN_UP_LINKS_TO_RET);
@@ -405,8 +433,16 @@ ftrace_new_return (struct btrace_functio
       else
 	{
 	  /* There is a call in PREV's back trace to which we should have
-	     returned.  Let's remain at this level.  */
-	  bfun->level = prev->level;
+	     returned but didn't.  Let's start a new, separate back trace
+	     from PREV's level.  */
+	  bfun->level = prev->level - 1;
+
+	  /* We fix up the back trace for PREV but leave other function segments
+	     on the same level as they are.
+	     This should handle things like schedule () correctly where we're
+	     switching contexts.  */
+	  prev->up = bfun;
+	  prev->flags = BFUN_UP_LINKS_TO_RET;
 
 	  ftrace_debug (bfun, "new return - unknown caller");
 	}
@@ -426,9 +462,11 @@ ftrace_new_switch (struct btrace_functio
 {
   struct btrace_function *bfun;
 
-  /* This is an unexplained function switch.  The call stack will likely
-     be wrong at this point.  */
+  /* This is an unexplained function switch.  We can't really be sure about the
+     call stack, yet the best I can think of right now is to preserve it.  */
   bfun = ftrace_new_function (prev, mfun, fun);
+  bfun->up = prev->up;
+  bfun->flags = prev->flags;
 
   ftrace_debug (bfun, "new switch");
 
@@ -528,10 +566,17 @@ ftrace_update_function (struct btrace_fu
 
 	    start = get_pc_function_start (pc);
 
+	    /* A jump to the start of a function is (typically) a tail call.  */
+	    if (start == pc)
+	      return ftrace_new_tailcall (bfun, mfun, fun);
+
 	    /* If we can't determine the function for PC, we treat a jump at
-	       the end of the block as tail call.  */
-	    if (start == 0 || start == pc)
+	       the end of the block as tail call if we're switching functions
+	       and as an intra-function branch if we don't.  */
+	    if (start == 0 && ftrace_function_switched (bfun, mfun, fun))
 	      return ftrace_new_tailcall (bfun, mfun, fun);
+
+	    break;
 	  }
 	}
     }
@@ -587,23 +632,359 @@ ftrace_classify_insn (struct gdbarch *gd
   return iclass;
 }
 
+/* Try to match the back trace at LHS to the back trace at RHS.  Returns the
+   number of matching function segments or zero if the back traces do not
+   match.  */
+
+static int
+ftrace_match_backtrace (struct btrace_function *lhs,
+			struct btrace_function *rhs)
+{
+  int matches;
+
+  for (matches = 0; lhs != NULL && rhs != NULL; ++matches)
+    {
+      if (ftrace_function_switched (lhs, rhs->msym, rhs->sym))
+	return 0;
+
+      lhs = ftrace_get_caller (lhs);
+      rhs = ftrace_get_caller (rhs);
+    }
+
+  return matches;
+}
+
+/* Add ADJUSTMENT to the level of BFUN and succeeding function segments.  */
+
+static void
+ftrace_fixup_level (struct btrace_function *bfun, int adjustment)
+{
+  if (adjustment == 0)
+    return;
+
+  DEBUG_FTRACE ("fixup level (%+d)", adjustment);
+  ftrace_debug (bfun, "..bfun");
+
+  for (; bfun != NULL; bfun = bfun->flow.next)
+    bfun->level += adjustment;
+}
+
+/* Recompute the global level offset.  Traverse the function trace and compute
+   the global level offset as the negative of the minimal function level.  */
+
+static void
+ftrace_compute_global_level_offset (struct btrace_thread_info *btinfo)
+{
+  struct btrace_function *bfun, *end;
+  int level;
+
+  if (btinfo == NULL)
+    return;
+
+  bfun = btinfo->begin;
+  if (bfun == NULL)
+    return;
+
+  /* The last function segment contains the current instruction, which is not
+     really part of the trace.  If it contains just this one instruction, we
+     stop when we reach it; otherwise, we let the below loop run to the end.  */
+  end = btinfo->end;
+  if (VEC_length (btrace_insn_s, end->insn) > 1)
+    end = NULL;
+
+  level = INT_MAX;
+  for (; bfun != end; bfun = bfun->flow.next)
+    level = std::min (level, bfun->level);
+
+  DEBUG_FTRACE ("setting global level offset: %d", -level);
+  btinfo->level = -level;
+}
+
+/* Connect the function segments PREV and NEXT in a bottom-to-top walk as in
+   ftrace_connect_backtrace.  */
+
+static void
+ftrace_connect_bfun (struct btrace_function *prev,
+		     struct btrace_function *next)
+{
+  DEBUG_FTRACE ("connecting...");
+  ftrace_debug (prev, "..prev");
+  ftrace_debug (next, "..next");
+
+  /* The function segments are not yet connected.  */
+  gdb_assert (prev->segment.next == NULL);
+  gdb_assert (next->segment.prev == NULL);
+
+  prev->segment.next = next;
+  next->segment.prev = prev;
+
+  /* We may have moved NEXT to a different function level.  */
+  ftrace_fixup_level (next, prev->level - next->level);
+
+  /* If we run out of back trace for one, let's use the other's.  */
+  if (prev->up == NULL)
+    {
+      if (next->up != NULL)
+	{
+	  DEBUG_FTRACE ("using next's callers");
+	  ftrace_fixup_caller (prev, next->up, next->flags);
+	}
+    }
+  else if (next->up == NULL)
+    {
+      if (prev->up != NULL)
+	{
+	  DEBUG_FTRACE ("using prev's callers");
+	  ftrace_fixup_caller (next, prev->up, prev->flags);
+	}
+    }
+  else
+    {
+      /* PREV may have a tailcall caller, NEXT can't.  If it does, fixup the up
+	 link to add the tail callers to NEXT's back trace.
+
+	 This removes NEXT->UP from NEXT's back trace.  It will be added back
+	 when connecting NEXT and PREV's callers - provided they exist.
+
+	 If PREV's back trace consists of a series of tail calls without an
+	 actual call, there will be no further connection and NEXT's caller will
+	 be removed for good.  To catch this case, we handle it here and connect
+	 the top of PREV's back trace to NEXT's caller.  */
+      if ((prev->flags & BFUN_UP_LINKS_TO_TAILCALL) != 0)
+	{
+	  struct btrace_function *caller;
+	  btrace_function_flags flags;
+
+	  /* We checked NEXT->UP above so CALLER can't be NULL.  */
+	  caller = next->up;
+	  flags = next->flags;
+
+	  DEBUG_FTRACE ("adding prev's tail calls to next");
+
+	  ftrace_fixup_caller (next, prev->up, prev->flags);
+
+	  for (prev = prev->up; prev != NULL; prev = prev->up)
+	    {
+	      /* At the end of PREV's back trace, continue with CALLER.  */
+	      if (prev->up == NULL)
+		{
+		  DEBUG_FTRACE ("fixing up link for tailcall chain");
+		  ftrace_debug (prev, "..top");
+		  ftrace_debug (caller, "..up");
+
+		  ftrace_fixup_caller (prev, caller, flags);
+
+		  /* If we skipped any tail calls, this may move CALLER to a
+		     different function level.
+
+		     Note that changing CALLER's level is only OK because we
+		     know that this is the last iteration of the bottom-to-top
+		     walk in ftrace_connect_backtrace.
+
+		     Otherwise we will fix up CALLER's level when we connect it
+		     to PREV's caller in the next iteration.  */
+		  ftrace_fixup_level (caller, prev->level - caller->level - 1);
+		  break;
+		}
+
+	      /* There's nothing to do if we find a real call.  */
+	      if ((prev->flags & BFUN_UP_LINKS_TO_TAILCALL) == 0)
+		{
+		  DEBUG_FTRACE ("will fix up link in next iteration");
+		  break;
+		}
+	    }
+	}
+    }
+}
+
+/* Connect function segments on the same level in the back trace at LHS and RHS.
+   The back traces at LHS and RHS are expected to match according to
+   ftrace_match_backtrace.  */
+
+static void
+ftrace_connect_backtrace (struct btrace_function *lhs,
+			  struct btrace_function *rhs)
+{
+  while (lhs != NULL && rhs != NULL)
+    {
+      struct btrace_function *prev, *next;
+
+      gdb_assert (!ftrace_function_switched (lhs, rhs->msym, rhs->sym));
+
+      /* Connecting LHS and RHS may change the up link.  */
+      prev = lhs;
+      next = rhs;
+
+      lhs = ftrace_get_caller (lhs);
+      rhs = ftrace_get_caller (rhs);
+
+      ftrace_connect_bfun (prev, next);
+    }
+}
+
+/* Bridge the gap between two function segments left and right of a gap if their
+   respective back traces match in at least MIN_MATCHES functions.
+
+   Returns non-zero if the gap could be bridged, zero otherwise.  */
+
+static int
+ftrace_bridge_gap (struct btrace_function *lhs, struct btrace_function *rhs,
+		   int min_matches)
+{
+  struct btrace_function *best_l, *best_r, *cand_l, *cand_r;
+  int best_matches;
+
+  DEBUG_FTRACE ("checking gap at insn %u (req matches: %d)",
+		rhs->insn_offset - 1, min_matches);
+
+  best_matches = 0;
+  best_l = NULL;
+  best_r = NULL;
+
+  /* We search the back traces of LHS and RHS for valid connections and connect
+     the two functon segments that give the longest combined back trace.  */
+
+  for (cand_l = lhs; cand_l != NULL; cand_l = ftrace_get_caller (cand_l))
+    for (cand_r = rhs; cand_r != NULL; cand_r = ftrace_get_caller (cand_r))
+      {
+	int matches;
+
+	matches = ftrace_match_backtrace (cand_l, cand_r);
+	if (best_matches < matches)
+	  {
+	    best_matches = matches;
+	    best_l = cand_l;
+	    best_r = cand_r;
+	  }
+      }
+
+  /* We need at least MIN_MATCHES matches.  */
+  gdb_assert (min_matches > 0);
+  if (best_matches < min_matches)
+    return 0;
+
+  DEBUG_FTRACE ("..matches: %d", best_matches);
+
+  /* We will fix up the level of BEST_R and succeeding function segments such
+     that BEST_R's level matches BEST_L's when we connect BEST_L to BEST_R.
+
+     This will ignore the level of RHS and following if BEST_R != RHS.  I.e. if
+     BEST_R is a successor of RHS in the back trace of RHS (phases 1 and 3).
+
+     To catch this, we already fix up the level here where we can start at RHS
+     instead of at BEST_R.  We will ignore the level fixup when connecting
+     BEST_L to BEST_R as they will already be on the same level.  */
+  ftrace_fixup_level (rhs, best_l->level - best_r->level);
+
+  ftrace_connect_backtrace (best_l, best_r);
+
+  return best_matches;
+}
+
+/* Try to bridge gaps due to overflow or decode errors by connecting the
+   function segments that are separated by the gap.  */
+
+static void
+btrace_bridge_gaps (struct thread_info *tp, VEC (bfun_s) **gaps)
+{
+  VEC (bfun_s) *remaining;
+  struct cleanup *old_chain;
+  int min_matches;
+
+  DEBUG ("bridge gaps");
+
+  remaining = NULL;
+  old_chain = make_cleanup (VEC_cleanup (bfun_s), &remaining);
+
+  /* We require a minimum amount of matches for bridging a gap.  The number of
+     required matches will be lowered with each iteration.
+
+     The more matches the higher our confidence that the bridging is correct.
+     For big gaps or small traces, however, it may not be feasible to require a
+     high number of matches.  */
+  for (min_matches = 5; min_matches > 0; --min_matches)
+    {
+      /* Let's try to bridge as many gaps as we can.  In some cases, we need to
+	 skip a gap and revisit it again after we closed later gaps.  */
+      while (!VEC_empty (bfun_s, *gaps))
+	{
+	  struct btrace_function *gap;
+	  unsigned int idx;
+
+	  for (idx = 0; VEC_iterate (bfun_s, *gaps, idx, gap); ++idx)
+	    {
+	      struct btrace_function *lhs, *rhs;
+	      int bridged;
+
+	      /* We may have a sequence of gaps if we run from one error into
+		 the next as we try to re-sync onto the trace stream.  Ignore
+		 all but the leftmost gap in such a sequence.
+
+		 Also ignore gaps at the beginning of the trace.  */
+	      lhs = gap->flow.prev;
+	      if (lhs == NULL || lhs->errcode != 0)
+		continue;
+
+	      /* Skip gaps to the right.  */
+	      for (rhs = gap->flow.next; rhs != NULL; rhs = rhs->flow.next)
+		if (rhs->errcode == 0)
+		  break;
+
+	      /* Ignore gaps at the end of the trace.  */
+	      if (rhs == NULL)
+		continue;
+
+	      bridged = ftrace_bridge_gap (lhs, rhs, min_matches);
+
+	      /* Keep track of gaps we were not able to bridge and try again.
+		 If we just pushed them to the end of GAPS we would risk an
+		 infinite loop in case we simply cannot bridge a gap.  */
+	      if (bridged == 0)
+		VEC_safe_push (bfun_s, remaining, gap);
+	    }
+
+	  /* Let's see if we made any progress.  */
+	  if (VEC_length (bfun_s, remaining) == VEC_length (bfun_s, *gaps))
+	    break;
+
+	  VEC_free (bfun_s, *gaps);
+
+	  *gaps = remaining;
+	  remaining = NULL;
+	}
+
+      /* We get here if either GAPS is empty or if GAPS equals REMAINING.  */
+      if (VEC_empty (bfun_s, *gaps))
+	break;
+
+      VEC_free (bfun_s, remaining);
+    }
+
+  do_cleanups (old_chain);
+
+  /* We may omit this in some cases.  Not sure it is worth the extra
+     complication, though.  */
+  ftrace_compute_global_level_offset (&tp->btrace);
+}
+
 /* Compute the function branch trace from BTS trace.  */
 
 static void
 btrace_compute_ftrace_bts (struct thread_info *tp,
-			   const struct btrace_data_bts *btrace)
+			   const struct btrace_data_bts *btrace,
+			   VEC (bfun_s) **gaps)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_function *begin, *end;
   struct gdbarch *gdbarch;
-  unsigned int blk, ngaps;
+  unsigned int blk;
   int level;
 
   gdbarch = target_gdbarch ();
   btinfo = &tp->btrace;
   begin = btinfo->begin;
   end = btinfo->end;
-  ngaps = btinfo->ngaps;
   level = begin != NULL ? -btinfo->level : INT_MAX;
   blk = VEC_length (btrace_block_s, btrace->blocks);
 
@@ -625,16 +1006,17 @@ btrace_compute_ftrace_bts (struct thread
 	  /* We should hit the end of the block.  Warn if we went too far.  */
 	  if (block->end < pc)
 	    {
-	      /* Indicate the gap in the trace - unless we're at the
-		 beginning.  */
-	      if (begin != NULL)
-		{
-		  warning (_("Recorded trace may be corrupted around %s."),
-			   core_addr_to_string_nz (pc));
+	      /* Indicate the gap in the trace.  */
+	      end = ftrace_new_gap (end, BDE_BTS_OVERFLOW);
+	      if (begin == NULL)
+		begin = end;
+
+	      VEC_safe_push (bfun_s, *gaps, end);
+
+	      warning (_("Recorded trace may be corrupted at instruction "
+			 "%u (pc = %s)."), end->insn_offset - 1,
+		       core_addr_to_string_nz (pc));
 
-		  end = ftrace_new_gap (end, BDE_BTS_OVERFLOW);
-		  ngaps += 1;
-		}
 	      break;
 	    }
 
@@ -645,7 +1027,7 @@ btrace_compute_ftrace_bts (struct thread
 	  /* Maintain the function level offset.
 	     For all but the last block, we do it here.  */
 	  if (blk != 0)
-	    level = min (level, end->level);
+	    level = std::min (level, end->level);
 
 	  size = 0;
 	  TRY
@@ -660,6 +1042,7 @@ btrace_compute_ftrace_bts (struct thread
 	  insn.pc = pc;
 	  insn.size = size;
 	  insn.iclass = ftrace_classify_insn (gdbarch, pc);
+	  insn.flags = 0;
 
 	  ftrace_update_insns (end, &insn);
 
@@ -670,13 +1053,15 @@ btrace_compute_ftrace_bts (struct thread
 	  /* We can't continue if we fail to compute the size.  */
 	  if (size <= 0)
 	    {
-	      warning (_("Recorded trace may be incomplete around %s."),
-		       core_addr_to_string_nz (pc));
-
 	      /* Indicate the gap in the trace.  We just added INSN so we're
 		 not at the beginning.  */
 	      end = ftrace_new_gap (end, BDE_BTS_INSN_SIZE);
-	      ngaps += 1;
+
+	      VEC_safe_push (bfun_s, *gaps, end);
+
+	      warning (_("Recorded trace may be incomplete at instruction %u "
+			 "(pc = %s)."), end->insn_offset - 1,
+		       core_addr_to_string_nz (pc));
 
 	      break;
 	    }
@@ -690,13 +1075,12 @@ btrace_compute_ftrace_bts (struct thread
 	     and is not really part of the execution history, it shouldn't
 	     affect the level.  */
 	  if (blk == 0)
-	    level = min (level, end->level);
+	    level = std::min (level, end->level);
 	}
     }
 
   btinfo->begin = begin;
   btinfo->end = end;
-  btinfo->ngaps = ngaps;
 
   /* LEVEL is the minimal function level of all btrace function segments.
      Define the global level offset to -LEVEL so all function levels are
@@ -725,21 +1109,33 @@ pt_reclassify_insn (enum pt_insn_class i
     }
 }
 
+/* Return the btrace instruction flags for INSN.  */
+
+static btrace_insn_flags
+pt_btrace_insn_flags (const struct pt_insn *insn)
+{
+  btrace_insn_flags flags = 0;
+
+  if (insn->speculative)
+    flags |= BTRACE_INSN_FLAG_SPECULATIVE;
+
+  return flags;
+}
+
 /* Add function branch trace using DECODER.  */
 
 static void
 ftrace_add_pt (struct pt_insn_decoder *decoder,
 	       struct btrace_function **pbegin,
 	       struct btrace_function **pend, int *plevel,
-	       unsigned int *ngaps)
+	       VEC (bfun_s) **gaps)
 {
   struct btrace_function *begin, *end, *upd;
   uint64_t offset;
-  int errcode, nerrors;
+  int errcode;
 
   begin = *pbegin;
   end = *pend;
-  nerrors = 0;
   for (;;)
     {
       struct btrace_insn btinsn;
@@ -749,7 +1145,7 @@ ftrace_add_pt (struct pt_insn_decoder *d
       if (errcode < 0)
 	{
 	  if (errcode != -pte_eos)
-	    warning (_("Failed to synchronize onto the Intel(R) Processor "
+	    warning (_("Failed to synchronize onto the Intel Processor "
 		       "Trace stream: %s."), pt_errstr (pt_errcode (errcode)));
 	  break;
 	}
@@ -770,11 +1166,33 @@ ftrace_add_pt (struct pt_insn_decoder *d
 		 flag.  The ENABLED instruction flag means that we continued
 		 from some other instruction.  Indicate this as a trace gap.  */
 	      if (insn.enabled)
-		*pend = end = ftrace_new_gap (end, BDE_PT_DISABLED);
+		{
+		  *pend = end = ftrace_new_gap (end, BDE_PT_DISABLED);
 
-	      /* Indicate trace overflows.  */
-	      if (insn.resynced)
-		*pend = end = ftrace_new_gap (end, BDE_PT_OVERFLOW);
+		  VEC_safe_push (bfun_s, *gaps, end);
+
+		  pt_insn_get_offset (decoder, &offset);
+
+		  warning (_("Non-contiguous trace at instruction %u (offset "
+			     "= 0x%" PRIx64 ", pc = 0x%" PRIx64 ")."),
+			   end->insn_offset - 1, offset, insn.ip);
+		}
+	    }
+
+	  /* Indicate trace overflows.  */
+	  if (insn.resynced)
+	    {
+	      *pend = end = ftrace_new_gap (end, BDE_PT_OVERFLOW);
+	      if (begin == NULL)
+		*pbegin = begin = end;
+
+	      VEC_safe_push (bfun_s, *gaps, end);
+
+	      pt_insn_get_offset (decoder, &offset);
+
+	      warning (_("Overflow at instruction %u (offset = 0x%" PRIx64
+			 ", pc = 0x%" PRIx64 ")."), end->insn_offset - 1,
+		       offset, insn.ip);
 	    }
 
 	  upd = ftrace_update_function (end, insn.ip);
@@ -787,11 +1205,12 @@ ftrace_add_pt (struct pt_insn_decoder *d
 	    }
 
 	  /* Maintain the function level offset.  */
-	  *plevel = min (*plevel, end->level);
+	  *plevel = std::min (*plevel, end->level);
 
 	  btinsn.pc = (CORE_ADDR) insn.ip;
 	  btinsn.size = (gdb_byte) insn.size;
 	  btinsn.iclass = pt_reclassify_insn (insn.iclass);
+	  btinsn.flags = pt_btrace_insn_flags (&insn);
 
 	  ftrace_update_insns (end, &btinsn);
 	}
@@ -799,24 +1218,19 @@ ftrace_add_pt (struct pt_insn_decoder *d
       if (errcode == -pte_eos)
 	break;
 
-      /* If the gap is at the very beginning, we ignore it - we will have
-	 less trace, but we won't have any holes in the trace.  */
+      /* Indicate the gap in the trace.  */
+      *pend = end = ftrace_new_gap (end, errcode);
       if (begin == NULL)
-	continue;
+	*pbegin = begin = end;
+
+      VEC_safe_push (bfun_s, *gaps, end);
 
       pt_insn_get_offset (decoder, &offset);
 
-      warning (_("Failed to decode Intel(R) Processor Trace near trace "
-		 "offset 0x%" PRIx64 " near recorded PC 0x%" PRIx64 ": %s."),
+      warning (_("Decode error (%d) at instruction %u (offset = 0x%" PRIx64
+		 ", pc = 0x%" PRIx64 "): %s."), errcode, end->insn_offset - 1,
 	       offset, insn.ip, pt_errstr (pt_errcode (errcode)));
-
-      /* Indicate the gap in the trace.  */
-      *pend = end = ftrace_new_gap (end, errcode);
-      *ngaps += 1;
     }
-
-  if (nerrors > 0)
-    warning (_("The recorded execution trace may have gaps."));
 }
 
 /* A callback function to allow the trace decoder to read the inferior's
@@ -824,24 +1238,25 @@ ftrace_add_pt (struct pt_insn_decoder *d
 
 static int
 btrace_pt_readmem_callback (gdb_byte *buffer, size_t size,
-			    const struct pt_asid *asid, CORE_ADDR pc,
+			    const struct pt_asid *asid, uint64_t pc,
 			    void *context)
 {
-  int errcode;
+  int result, errcode;
 
+  result = (int) size;
   TRY
     {
-      errcode = target_read_code (pc, buffer, size);
+      errcode = target_read_code ((CORE_ADDR) pc, buffer, size);
       if (errcode != 0)
-	return -pte_nomap;
+	result = -pte_nomap;
     }
   CATCH (error, RETURN_MASK_ERROR)
     {
-      return -pte_nomap;
+      result = -pte_nomap;
     }
   END_CATCH
 
-  return size;
+  return result;
 }
 
 /* Translate the vendor from one enum to another.  */
@@ -878,11 +1293,13 @@ static void btrace_finalize_ftrace_pt (s
   btrace_add_pc (tp);
 }
 
-/* Compute the function branch trace from Intel(R) Processor Trace.  */
+/* Compute the function branch trace from Intel Processor Trace
+   format.  */
 
 static void
 btrace_compute_ftrace_pt (struct thread_info *tp,
-			  const struct btrace_data_pt *btrace)
+			  const struct btrace_data_pt *btrace,
+			  VEC (bfun_s) **gaps)
 {
   struct btrace_thread_info *btinfo;
   struct pt_insn_decoder *decoder;
@@ -906,12 +1323,12 @@ btrace_compute_ftrace_pt (struct thread_
 
   errcode = pt_cpu_errata (&config.errata, &config.cpu);
   if (errcode < 0)
-    error (_("Failed to configure the Intel(R) Processor Trace decoder: %s."),
+    error (_("Failed to configure the Intel Processor Trace decoder: %s."),
 	   pt_errstr (pt_errcode (errcode)));
 
   decoder = pt_insn_alloc_decoder (&config);
   if (decoder == NULL)
-    error (_("Failed to allocate the Intel(R) Processor Trace decoder."));
+    error (_("Failed to allocate the Intel Processor Trace decoder."));
 
   TRY
     {
@@ -919,15 +1336,14 @@ btrace_compute_ftrace_pt (struct thread_
 
       image = pt_insn_get_image(decoder);
       if (image == NULL)
-	error (_("Failed to configure the Intel(R) Processor Trace decoder."));
+	error (_("Failed to configure the Intel Processor Trace decoder."));
 
       errcode = pt_image_set_callback(image, btrace_pt_readmem_callback, NULL);
       if (errcode < 0)
-	error (_("Failed to configure the Intel(R) Processor Trace decoder: "
+	error (_("Failed to configure the Intel Processor Trace decoder: "
 		 "%s."), pt_errstr (pt_errcode (errcode)));
 
-      ftrace_add_pt (decoder, &btinfo->begin, &btinfo->end, &level,
-		     &btinfo->ngaps);
+      ftrace_add_pt (decoder, &btinfo->begin, &btinfo->end, &level, gaps);
     }
   CATCH (error, RETURN_MASK_ALL)
     {
@@ -935,7 +1351,8 @@ btrace_compute_ftrace_pt (struct thread_
       if (error.reason == RETURN_QUIT && btinfo->end != NULL)
 	{
 	  btinfo->end = ftrace_new_gap (btinfo->end, BDE_PT_USER_QUIT);
-	  btinfo->ngaps++;
+
+	  VEC_safe_push (bfun_s, *gaps, btinfo->end);
 	}
 
       btrace_finalize_ftrace_pt (decoder, tp, level);
@@ -951,7 +1368,8 @@ btrace_compute_ftrace_pt (struct thread_
 
 static void
 btrace_compute_ftrace_pt (struct thread_info *tp,
-			  const struct btrace_data_pt *btrace)
+			  const struct btrace_data_pt *btrace,
+			  VEC (bfun_s) **gaps)
 {
   internal_error (__FILE__, __LINE__, _("Unexpected branch trace format."));
 }
@@ -962,7 +1380,8 @@ btrace_compute_ftrace_pt (struct thread_
    a thread given by BTINFO.  */
 
 static void
-btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace)
+btrace_compute_ftrace_1 (struct thread_info *tp, struct btrace_data *btrace,
+			 VEC (bfun_s) **gaps)
 {
   DEBUG ("compute ftrace");
 
@@ -972,17 +1391,53 @@ btrace_compute_ftrace (struct thread_inf
       return;
 
     case BTRACE_FORMAT_BTS:
-      btrace_compute_ftrace_bts (tp, &btrace->variant.bts);
+      btrace_compute_ftrace_bts (tp, &btrace->variant.bts, gaps);
       return;
 
     case BTRACE_FORMAT_PT:
-      btrace_compute_ftrace_pt (tp, &btrace->variant.pt);
+      btrace_compute_ftrace_pt (tp, &btrace->variant.pt, gaps);
       return;
     }
 
   internal_error (__FILE__, __LINE__, _("Unkown branch trace format."));
 }
 
+static void
+btrace_finalize_ftrace (struct thread_info *tp, VEC (bfun_s) **gaps)
+{
+  if (!VEC_empty (bfun_s, *gaps))
+    {
+      tp->btrace.ngaps += VEC_length (bfun_s, *gaps);
+      btrace_bridge_gaps (tp, gaps);
+    }
+}
+
+static void
+btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace)
+{
+  VEC (bfun_s) *gaps;
+  struct cleanup *old_chain;
+
+  gaps = NULL;
+  old_chain = make_cleanup (VEC_cleanup (bfun_s), &gaps);
+
+  TRY
+    {
+      btrace_compute_ftrace_1 (tp, btrace, &gaps);
+    }
+  CATCH (error, RETURN_MASK_ALL)
+    {
+      btrace_finalize_ftrace (tp, &gaps);
+
+      throw_exception (error);
+    }
+  END_CATCH
+
+  btrace_finalize_ftrace (tp, &gaps);
+
+  do_cleanups (old_chain);
+}
+
 /* Add an entry for the current PC.  */
 
 static void
@@ -1020,17 +1475,46 @@ btrace_enable (struct thread_info *tp, c
   if (tp->btrace.target != NULL)
     return;
 
+#if !defined (HAVE_LIBIPT)
+  if (conf->format == BTRACE_FORMAT_PT)
+    error (_("GDB does not support Intel Processor Trace."));
+#endif /* !defined (HAVE_LIBIPT) */
+
   if (!target_supports_btrace (conf->format))
     error (_("Target does not support branch tracing."));
 
-  DEBUG ("enable thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+  DEBUG ("enable thread %s (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid));
 
   tp->btrace.target = target_enable_btrace (tp->ptid, conf);
 
-  /* Add an entry for the current PC so we start tracing from where we
-     enabled it.  */
-  if (tp->btrace.target != NULL)
-    btrace_add_pc (tp);
+  /* We're done if we failed to enable tracing.  */
+  if (tp->btrace.target == NULL)
+    return;
+
+  /* We need to undo the enable in case of errors.  */
+  TRY
+    {
+      /* Add an entry for the current PC so we start tracing from where we
+	 enabled it.
+
+	 If we can't access TP's registers, TP is most likely running.  In this
+	 case, we can't really say where tracing was enabled so it should be
+	 safe to simply skip this step.
+
+	 This is not relevant for BTRACE_FORMAT_PT since the trace will already
+	 start at the PC at which tracing was enabled.  */
+      if (conf->format != BTRACE_FORMAT_PT
+	  && can_access_registers_ptid (tp->ptid))
+	btrace_add_pc (tp);
+    }
+  CATCH (exception, RETURN_MASK_ALL)
+    {
+      btrace_disable (tp);
+
+      throw_exception (exception);
+    }
+  END_CATCH
 }
 
 /* See btrace.h.  */
@@ -1055,7 +1539,8 @@ btrace_disable (struct thread_info *tp)
   if (btp->target == NULL)
     return;
 
-  DEBUG ("disable thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+  DEBUG ("disable thread %s (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid));
 
   target_disable_btrace (btp->target);
   btp->target = NULL;
@@ -1074,7 +1559,8 @@ btrace_teardown (struct thread_info *tp)
   if (btp->target == NULL)
     return;
 
-  DEBUG ("teardown thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+  DEBUG ("teardown thread %s (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid));
 
   target_teardown_btrace (btp->target);
   btp->target = NULL;
@@ -1239,6 +1725,55 @@ btrace_maint_clear (struct btrace_thread
 
 /* See btrace.h.  */
 
+const char *
+btrace_decode_error (enum btrace_format format, int errcode)
+{
+  switch (format)
+    {
+    case BTRACE_FORMAT_BTS:
+      switch (errcode)
+	{
+	case BDE_BTS_OVERFLOW:
+	  return _("instruction overflow");
+
+	case BDE_BTS_INSN_SIZE:
+	  return _("unknown instruction");
+
+	default:
+	  break;
+	}
+      break;
+
+#if defined (HAVE_LIBIPT)
+    case BTRACE_FORMAT_PT:
+      switch (errcode)
+	{
+	case BDE_PT_USER_QUIT:
+	  return _("trace decode cancelled");
+
+	case BDE_PT_DISABLED:
+	  return _("disabled");
+
+	case BDE_PT_OVERFLOW:
+	  return _("overflow");
+
+	default:
+	  if (errcode < 0)
+	    return pt_errstr (pt_errcode (errcode));
+	  break;
+	}
+      break;
+#endif /* defined (HAVE_LIBIPT)  */
+
+    default:
+      break;
+    }
+
+  return _("unknown");
+}
+
+/* See btrace.h.  */
+
 void
 btrace_fetch (struct thread_info *tp)
 {
@@ -1248,7 +1783,8 @@ btrace_fetch (struct thread_info *tp)
   struct cleanup *cleanup;
   int errcode;
 
-  DEBUG ("fetch thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+  DEBUG ("fetch thread %s (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid));
 
   btinfo = &tp->btrace;
   tinfo = btinfo->target;
@@ -1261,6 +1797,9 @@ btrace_fetch (struct thread_info *tp)
   if (btinfo->replay != NULL)
     return;
 
+  /* We should not be called on running or exited threads.  */
+  gdb_assert (can_access_registers_ptid (tp->ptid));
+
   btrace_data_init (&btrace);
   cleanup = make_cleanup_btrace_data (&btrace);
 
@@ -1300,13 +1839,19 @@ btrace_fetch (struct thread_info *tp)
   /* Compute the trace, provided we have any.  */
   if (!btrace_data_empty (&btrace))
     {
+      struct btrace_function *bfun;
+
       /* Store the raw trace data.  The stored data will be cleared in
 	 btrace_clear, so we always append the new trace.  */
       btrace_data_append (&btinfo->data, &btrace);
       btrace_maint_clear (btinfo);
 
+      VEC_truncate (btrace_fun_p, btinfo->functions, 0);
       btrace_clear_history (btinfo);
       btrace_compute_ftrace (tp, &btrace);
+
+      for (bfun = btinfo->begin; bfun != NULL; bfun = bfun->flow.next)
+	VEC_safe_push (btrace_fun_p, btinfo->functions, bfun);
     }
 
   do_cleanups (cleanup);
@@ -1320,7 +1865,8 @@ btrace_clear (struct thread_info *tp)
   struct btrace_thread_info *btinfo;
   struct btrace_function *it, *trash;
 
-  DEBUG ("clear thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+  DEBUG ("clear thread %s (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid));
 
   /* Make sure btrace frames that may hold a pointer into the branch
      trace data are destroyed.  */
@@ -1328,6 +1874,8 @@ btrace_clear (struct thread_info *tp)
 
   btinfo = &tp->btrace;
 
+  VEC_free (btrace_fun_p, btinfo->functions);
+
   it = btinfo->begin;
   while (it != NULL)
     {
@@ -1369,7 +1917,8 @@ check_xml_btrace_version (struct gdb_xml
 			  const struct gdb_xml_element *element,
 			  void *user_data, VEC (gdb_xml_value_s) *attributes)
 {
-  const char *version = xml_find_attribute (attributes, "version")->value;
+  const char *version
+    = (const char *) xml_find_attribute (attributes, "version")->value;
 
   if (strcmp (version, "1.0") != 0)
     gdb_xml_error (parser, _("Unsupported btrace version: \"%s\""), version);
@@ -1386,7 +1935,7 @@ parse_xml_btrace_block (struct gdb_xml_p
   struct btrace_block *block;
   ULONGEST *begin, *end;
 
-  btrace = user_data;
+  btrace = (struct btrace_data *) user_data;
 
   switch (btrace->format)
     {
@@ -1402,8 +1951,8 @@ parse_xml_btrace_block (struct gdb_xml_p
       gdb_xml_error (parser, _("Btrace format error."));
     }
 
-  begin = xml_find_attribute (attributes, "begin")->value;
-  end = xml_find_attribute (attributes, "end")->value;
+  begin = (ULONGEST *) xml_find_attribute (attributes, "begin")->value;
+  end = (ULONGEST *) xml_find_attribute (attributes, "end")->value;
 
   block = VEC_safe_push (btrace_block_s, btrace->variant.bts.blocks, NULL);
   block->begin = *begin;
@@ -1414,20 +1963,19 @@ parse_xml_btrace_block (struct gdb_xml_p
 
 static void
 parse_xml_raw (struct gdb_xml_parser *parser, const char *body_text,
-	       gdb_byte **pdata, unsigned long *psize)
+	       gdb_byte **pdata, size_t *psize)
 {
   struct cleanup *cleanup;
   gdb_byte *data, *bin;
-  unsigned long size;
-  size_t len;
+  size_t len, size;
 
   len = strlen (body_text);
-  size = len / 2;
-
-  if ((size_t) size * 2 != len)
+  if (len % 2 != 0)
     gdb_xml_error (parser, _("Bad raw data size."));
 
-  bin = data = xmalloc (size);
+  size = len / 2;
+
+  bin = data = (gdb_byte *) xmalloc (size);
   cleanup = make_cleanup (xfree, data);
 
   /* We use hex encoding - see common/rsp-low.h.  */
@@ -1463,12 +2011,12 @@ parse_xml_btrace_pt_config_cpu (struct g
   const char *vendor;
   ULONGEST *family, *model, *stepping;
 
-  vendor = xml_find_attribute (attributes, "vendor")->value;
-  family = xml_find_attribute (attributes, "family")->value;
-  model = xml_find_attribute (attributes, "model")->value;
-  stepping = xml_find_attribute (attributes, "stepping")->value;
+  vendor = (const char *) xml_find_attribute (attributes, "vendor")->value;
+  family = (ULONGEST *) xml_find_attribute (attributes, "family")->value;
+  model = (ULONGEST *) xml_find_attribute (attributes, "model")->value;
+  stepping = (ULONGEST *) xml_find_attribute (attributes, "stepping")->value;
 
-  btrace = user_data;
+  btrace = (struct btrace_data *) user_data;
 
   if (strcmp (vendor, "GenuineIntel") == 0)
     btrace->variant.pt.config.cpu.vendor = CV_INTEL;
@@ -1487,7 +2035,7 @@ parse_xml_btrace_pt_raw (struct gdb_xml_
 {
   struct btrace_data *btrace;
 
-  btrace = user_data;
+  btrace = (struct btrace_data *) user_data;
   parse_xml_raw (parser, body_text, &btrace->variant.pt.data,
 		 &btrace->variant.pt.size);
 }
@@ -1501,7 +2049,7 @@ parse_xml_btrace_pt (struct gdb_xml_pars
 {
   struct btrace_data *btrace;
 
-  btrace = user_data;
+  btrace = (struct btrace_data *) user_data;
   btrace->format = BTRACE_FORMAT_PT;
   btrace->variant.pt.config.cpu.vendor = CV_UNKNOWN;
   btrace->variant.pt.data = NULL;
@@ -1596,7 +2144,7 @@ parse_xml_btrace_conf_bts (struct gdb_xm
   struct btrace_config *conf;
   struct gdb_xml_value *size;
 
-  conf = user_data;
+  conf = (struct btrace_config *) user_data;
   conf->format = BTRACE_FORMAT_BTS;
   conf->bts.size = 0;
 
@@ -1615,7 +2163,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml
   struct btrace_config *conf;
   struct gdb_xml_value *size;
 
-  conf = user_data;
+  conf = (struct btrace_config *) user_data;
   conf->format = BTRACE_FORMAT_PT;
   conf->pt.size = 0;
 
@@ -1701,18 +2249,18 @@ btrace_insn_get (const struct btrace_ins
 
 /* See btrace.h.  */
 
-unsigned int
-btrace_insn_number (const struct btrace_insn_iterator *it)
+int
+btrace_insn_get_error (const struct btrace_insn_iterator *it)
 {
-  const struct btrace_function *bfun;
-
-  bfun = it->function;
+  return it->function->errcode;
+}
 
-  /* Return zero if the iterator points to a gap in the trace.  */
-  if (bfun->errcode != 0)
-    return 0;
+/* See btrace.h.  */
 
-  return bfun->insn_offset + it->index;
+unsigned int
+btrace_insn_number (const struct btrace_insn_iterator *it)
+{
+  return it->function->insn_offset + it->index;
 }
 
 /* See btrace.h.  */
@@ -1800,7 +2348,7 @@ btrace_insn_next (struct btrace_insn_ite
       space = end - index;
 
       /* Advance the iterator as far as possible within this segment.  */
-      adv = min (space, stride);
+      adv = std::min (space, stride);
       stride -= adv;
       index += adv;
       steps += adv;
@@ -1879,7 +2427,7 @@ btrace_insn_prev (struct btrace_insn_ite
 	}
 
       /* Advance the iterator as far as possible within this segment.  */
-      adv = min (index, stride);
+      adv = std::min (index, stride);
 
       stride -= adv;
       index -= adv;
@@ -1907,37 +2455,6 @@ btrace_insn_cmp (const struct btrace_ins
   lnum = btrace_insn_number (lhs);
   rnum = btrace_insn_number (rhs);
 
-  /* A gap has an instruction number of zero.  Things are getting more
-     complicated if gaps are involved.
-
-     We take the instruction number offset from the iterator's function.
-     This is the number of the first instruction after the gap.
-
-     This is OK as long as both lhs and rhs point to gaps.  If only one of
-     them does, we need to adjust the number based on the other's regular
-     instruction number.  Otherwise, a gap might compare equal to an
-     instruction.  */
-
-  if (lnum == 0 && rnum == 0)
-    {
-      lnum = lhs->function->insn_offset;
-      rnum = rhs->function->insn_offset;
-    }
-  else if (lnum == 0)
-    {
-      lnum = lhs->function->insn_offset;
-
-      if (lnum == rnum)
-	lnum -= 1;
-    }
-  else if (rnum == 0)
-    {
-      rnum = rhs->function->insn_offset;
-
-      if (rnum == lnum)
-	rnum -= 1;
-    }
-
   return (int) (lnum - rnum);
 }
 
@@ -1949,31 +2466,45 @@ btrace_find_insn_by_number (struct btrac
 			    unsigned int number)
 {
   const struct btrace_function *bfun;
-  unsigned int end, length;
+  unsigned int upper, lower;
 
-  for (bfun = btinfo->end; bfun != NULL; bfun = bfun->flow.prev)
-    {
-      /* Skip gaps. */
-      if (bfun->errcode != 0)
-	continue;
+  if (VEC_empty (btrace_fun_p, btinfo->functions))
+      return 0;
 
-      if (bfun->insn_offset <= number)
-	break;
-    }
+  lower = 0;
+  bfun = VEC_index (btrace_fun_p, btinfo->functions, lower);
+  if (number < bfun->insn_offset)
+    return 0;
 
-  if (bfun == NULL)
+  upper = VEC_length (btrace_fun_p, btinfo->functions) - 1;
+  bfun = VEC_index (btrace_fun_p, btinfo->functions, upper);
+  if (number >= bfun->insn_offset + ftrace_call_num_insn (bfun))
     return 0;
 
-  length = VEC_length (btrace_insn_s, bfun->insn);
-  gdb_assert (length > 0);
+  /* We assume that there are no holes in the numbering.  */
+  for (;;)
+    {
+      const unsigned int average = lower + (upper - lower) / 2;
 
-  end = bfun->insn_offset + length;
-  if (end <= number)
-    return 0;
+      bfun = VEC_index (btrace_fun_p, btinfo->functions, average);
+
+      if (number < bfun->insn_offset)
+	{
+	  upper = average - 1;
+	  continue;
+	}
+
+      if (number >= bfun->insn_offset + ftrace_call_num_insn (bfun))
+	{
+	  lower = average + 1;
+	  continue;
+	}
+
+      break;
+    }
 
   it->function = bfun;
   it->index = number - bfun->insn_offset;
-
   return 1;
 }
 
@@ -2182,7 +2713,7 @@ btrace_set_insn_history (struct btrace_t
 			 const struct btrace_insn_iterator *end)
 {
   if (btinfo->insn_history == NULL)
-    btinfo->insn_history = xzalloc (sizeof (*btinfo->insn_history));
+    btinfo->insn_history = XCNEW (struct btrace_insn_history);
 
   btinfo->insn_history->begin = *begin;
   btinfo->insn_history->end = *end;
@@ -2198,7 +2729,7 @@ btrace_set_call_history (struct btrace_t
   gdb_assert (begin->btinfo == end->btinfo);
 
   if (btinfo->call_history == NULL)
-    btinfo->call_history = xzalloc (sizeof (*btinfo->call_history));
+    btinfo->call_history = XCNEW (struct btrace_call_history);
 
   btinfo->call_history->begin = *begin;
   btinfo->call_history->end = *end;
@@ -2236,7 +2767,7 @@ btrace_is_empty (struct thread_info *tp)
 static void
 do_btrace_data_cleanup (void *arg)
 {
-  btrace_data_fini (arg);
+  btrace_data_fini ((struct btrace_data *) arg);
 }
 
 /* See btrace.h.  */
@@ -2309,7 +2840,8 @@ pt_print_packet (const struct pt_packet 
       break;
 
     case ppt_pip:
-      printf_unfiltered (("pip %" PRIx64 ""), packet->payload.pip.cr3);
+      printf_unfiltered (("pip %" PRIx64 "%s"), packet->payload.pip.cr3,
+			 packet->payload.pip.nr ? (" nr") : (""));
       break;
 
     case ppt_tsc:
@@ -2349,6 +2881,30 @@ pt_print_packet (const struct pt_packet 
       printf_unfiltered (("ovf"));
       break;
 
+    case ppt_stop:
+      printf_unfiltered (("stop"));
+      break;
+
+    case ppt_vmcs:
+      printf_unfiltered (("vmcs %" PRIx64 ""), packet->payload.vmcs.base);
+      break;
+
+    case ppt_tma:
+      printf_unfiltered (("tma %x %x"), packet->payload.tma.ctc,
+			 packet->payload.tma.fc);
+      break;
+
+    case ppt_mtc:
+      printf_unfiltered (("mtc %x"), packet->payload.mtc.ctc);
+      break;
+
+    case ppt_cyc:
+      printf_unfiltered (("cyc %" PRIx64 ""), packet->payload.cyc.value);
+      break;
+
+    case ppt_mnt:
+      printf_unfiltered (("mnt %" PRIx64 ""), packet->payload.mnt.payload);
+      break;
     }
 }
 
@@ -2397,7 +2953,7 @@ btrace_maint_decode_pt (struct btrace_ma
     }
 
   if (errcode != -pte_eos)
-    warning (_("Failed to synchronize onto the Intel(R) Processor Trace "
+    warning (_("Failed to synchronize onto the Intel Processor Trace "
 	       "stream: %s."), pt_errstr (pt_errcode (errcode)));
 }
 
@@ -2431,12 +2987,12 @@ btrace_maint_update_pt_packets (struct b
 
   errcode = pt_cpu_errata (&config.errata, &config.cpu);
   if (errcode < 0)
-    error (_("Failed to configure the Intel(R) Processor Trace decoder: %s."),
+    error (_("Failed to configure the Intel Processor Trace decoder: %s."),
 	   pt_errstr (pt_errcode (errcode)));
 
   decoder = pt_pkt_alloc_decoder (&config);
   if (decoder == NULL)
-    error (_("Failed to allocate the Intel(R) Processor Trace decoder."));
+    error (_("Failed to allocate the Intel Processor Trace decoder."));
 
   TRY
     {
@@ -2887,7 +3443,7 @@ Set branch tracing specific variables.")
                   0, &maintenance_set_cmdlist);
 
   add_prefix_cmd ("pt", class_maintenance, maint_btrace_pt_set_cmd, _("\
-Set Intel(R) Processor Trace specific variables."),
+Set Intel Processor Trace specific variables."),
                   &maint_btrace_pt_set_cmdlist, "maintenance set btrace pt ",
                   0, &maint_btrace_set_cmdlist);
 
@@ -2897,7 +3453,7 @@ Show branch tracing specific variables."
                   0, &maintenance_show_cmdlist);
 
   add_prefix_cmd ("pt", class_maintenance, maint_btrace_pt_show_cmd, _("\
-Show Intel(R) Processor Trace specific variables."),
+Show Intel Processor Trace specific variables."),
                   &maint_btrace_pt_show_cmdlist, "maintenance show btrace pt ",
                   0, &maint_btrace_show_cmdlist);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/btrace.h ./gdb/btrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/btrace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/btrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Branch trace support for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>.
 
@@ -28,6 +28,7 @@
 
 #include "btrace-common.h"
 #include "target/waitstatus.h" /* For enum target_stop_reason.  */
+#include "common/enum-flags.h"
 
 #if defined (HAVE_LIBIPT)
 #  include <intel-pt.h>
@@ -52,6 +53,14 @@ enum btrace_insn_class
   BTRACE_INSN_JUMP
 };
 
+/* Instruction flags.  */
+enum btrace_insn_flag
+{
+  /* The instruction has been executed speculatively.  */
+  BTRACE_INSN_FLAG_SPECULATIVE = (1 << 0)
+};
+DEF_ENUM_FLAGS_TYPE (enum btrace_insn_flag, btrace_insn_flags);
+
 /* A branch trace instruction.
 
    This represents a single instruction in a branch trace.  */
@@ -65,6 +74,9 @@ struct btrace_insn
 
   /* The instruction class of this instruction.  */
   enum btrace_insn_class iclass;
+
+  /* A bit vector of BTRACE_INSN_FLAGS.  */
+  btrace_insn_flags flags;
 };
 
 /* A vector of branch trace instructions.  */
@@ -90,6 +102,7 @@ enum btrace_function_flag
      if bfun_up_links_to_ret is clear.  */
   BFUN_UP_LINKS_TO_TAILCALL = (1 << 1)
 };
+DEF_ENUM_FLAGS_TYPE (enum btrace_function_flag, btrace_function_flags);
 
 /* Decode errors for the BTS recording format.  */
 enum btrace_bts_error
@@ -101,7 +114,7 @@ enum btrace_bts_error
   BDE_BTS_INSN_SIZE
 };
 
-/* Decode errors for the Intel(R) Processor Trace recording format.  */
+/* Decode errors for the Intel Processor Trace recording format.  */
 enum btrace_pt_error
 {
   /* The user cancelled trace processing.  */
@@ -171,9 +184,12 @@ struct btrace_function
   int level;
 
   /* A bit-vector of btrace_function_flag.  */
-  enum btrace_function_flag flags;
+  btrace_function_flags flags;
 };
 
+typedef struct btrace_function *btrace_fun_p;
+DEF_VEC_P (btrace_fun_p);
+
 /* A branch trace instruction iterator.  */
 struct btrace_insn_iterator
 {
@@ -230,8 +246,12 @@ enum btrace_thread_flag
   BTHR_RCONT = (1 << 3),
 
   /* The thread is to be moved.  */
-  BTHR_MOVE = (BTHR_STEP | BTHR_RSTEP | BTHR_CONT | BTHR_RCONT)
+  BTHR_MOVE = (BTHR_STEP | BTHR_RSTEP | BTHR_CONT | BTHR_RCONT),
+
+  /* The thread is to be stopped.  */
+  BTHR_STOP = (1 << 4)
 };
+DEF_ENUM_FLAGS_TYPE (enum btrace_thread_flag, btrace_thread_flags);
 
 #if defined (HAVE_LIBIPT)
 /* A packet.  */
@@ -320,6 +340,10 @@ struct btrace_thread_info
   struct btrace_function *begin;
   struct btrace_function *end;
 
+  /* Vector of pointer to decoded function segments.  These are in execution
+     order with the first element == BEGIN and the last element == END.  */
+  VEC (btrace_fun_p) *functions;
+
   /* The function level offset.  When added to each function's LEVEL,
      this normalizes the function levels such that the smallest level
      becomes zero.  */
@@ -329,7 +353,7 @@ struct btrace_thread_info
   unsigned int ngaps;
 
   /* A bit-vector of btrace_thread_flag.  */
-  enum btrace_thread_flag flags;
+  btrace_thread_flags flags;
 
   /* The instruction history iterator.  */
   struct btrace_insn_history *insn_history;
@@ -367,6 +391,11 @@ extern void btrace_disable (struct threa
    target_teardown_btrace instead of target_disable_btrace.  */
 extern void btrace_teardown (struct thread_info *);
 
+/* Return a human readable error string for the given ERRCODE in FORMAT.
+   The pointer will never be NULL and must not be freed.  */
+
+extern const char *btrace_decode_error (enum btrace_format format, int errcode);
+
 /* Fetch the branch trace for a single thread.  */
 extern void btrace_fetch (struct thread_info *);
 
@@ -388,9 +417,12 @@ extern void parse_xml_btrace_conf (struc
 extern const struct btrace_insn *
   btrace_insn_get (const struct btrace_insn_iterator *);
 
+/* Return the error code for a branch trace instruction iterator.  Returns zero
+   if there is no error, i.e. the instruction is valid.  */
+extern int btrace_insn_get_error (const struct btrace_insn_iterator *);
+
 /* Return the instruction number for a branch trace iterator.
-   Returns one past the maximum instruction number for the end iterator.
-   Returns zero if the iterator does not point to a valid instruction.  */
+   Returns one past the maximum instruction number for the end iterator.  */
 extern unsigned int btrace_insn_number (const struct btrace_insn_iterator *);
 
 /* Initialize a branch trace instruction iterator to point to the begin/end of
@@ -416,7 +448,7 @@ extern unsigned int btrace_insn_prev (st
 extern int btrace_insn_cmp (const struct btrace_insn_iterator *lhs,
 			    const struct btrace_insn_iterator *rhs);
 
-/* Find an instruction in the function branch trace by its number.
+/* Find an instruction or gap in the function branch trace by its number.
    If the instruction is found, initialize the branch trace instruction
    iterator to point to this instruction and return non-zero.
    Return zero otherwise.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-id.c ./gdb/build-id.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-id.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/build-id.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* build-id-related functions.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -67,18 +67,21 @@ build_id_verify (bfd *abfd, size_t check
 
 /* See build-id.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
 {
   char *link, *debugdir;
   VEC (char_ptr) *debugdir_vec;
   struct cleanup *back_to;
   int ix;
-  bfd *abfd = NULL;
+  gdb_bfd_ref_ptr abfd;
+  int alloc_len;
 
   /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
-  link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
-		 + 2 * build_id_len + (sizeof ".debug" - 1) + 1);
+  alloc_len = (strlen (debug_file_directory)
+	       + (sizeof "/.build-id/" - 1) + 1
+	       + 2 * build_id_len + (sizeof ".debug" - 1) + 1);
+  link = (char *) alloca (alloc_len);
 
   /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
      cause "/.build-id/..." lookups.  */
@@ -124,11 +127,10 @@ build_id_to_debug_bfd (size_t build_id_l
       if (abfd == NULL)
 	continue;
 
-      if (build_id_verify (abfd, build_id_len, build_id))
+      if (build_id_verify (abfd.get(), build_id_len, build_id))
 	break;
 
-      gdb_bfd_unref (abfd);
-      abfd = NULL;
+      abfd.release ();
     }
 
   do_cleanups (back_to);
@@ -145,25 +147,16 @@ find_separate_debug_file_by_buildid (str
   build_id = build_id_bfd_get (objfile->obfd);
   if (build_id != NULL)
     {
-      bfd *abfd;
-
-      abfd = build_id_to_debug_bfd (build_id->size, build_id->data);
+      gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
+						   build_id->data));
       /* Prevent looping on a stripped .debug file.  */
       if (abfd != NULL
-	  && filename_cmp (bfd_get_filename (abfd),
+	  && filename_cmp (bfd_get_filename (abfd.get ()),
 			   objfile_name (objfile)) == 0)
-        {
-	  warning (_("\"%s\": separate debug info file has no debug info"),
-		   bfd_get_filename (abfd));
-	  gdb_bfd_unref (abfd);
-	}
+	warning (_("\"%s\": separate debug info file has no debug info"),
+		 bfd_get_filename (abfd.get ()));
       else if (abfd != NULL)
-	{
-	  char *result = xstrdup (bfd_get_filename (abfd));
-
-	  gdb_bfd_unref (abfd);
-	  return result;
-	}
+	return xstrdup (bfd_get_filename (abfd.get ()));
     }
   return NULL;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-id.h ./gdb/build-id.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-id.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/build-id.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* build-id-related functions.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #ifndef BUILD_ID_H
 #define BUILD_ID_H
 
+#include "gdb_bfd.h"
+
 /* Locate NT_GNU_BUILD_ID from ABFD and return its content.  */
 
 extern const struct bfd_build_id *build_id_bfd_get (bfd *abfd);
@@ -35,8 +37,8 @@ extern int build_id_verify (bfd *abfd,
    return NULL.  The returned reference to the BFD must be released by
    the caller.  */
 
-extern bfd *build_id_to_debug_bfd (size_t build_id_len,
-				   const bfd_byte *build_id);
+extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
+					      const bfd_byte *build_id);
 
 /* Find the separate debug file for OBJFILE, by using the build-id
    associated with OBJFILE's BFD.  If successful, returns a malloc'd
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/buildsym.c ./gdb/buildsym.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/buildsym.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/buildsym.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support routines for building symbol tables in GDB's internal format.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -232,7 +232,7 @@ add_symbol_to_list (struct symbol *symbo
 	}
       else
 	{
-	  link = (struct pending *) xmalloc (sizeof (struct pending));
+	  link = XNEW (struct pending);
 	}
 
       link->next = *listhead;
@@ -331,8 +331,10 @@ free_pending_blocks (void)
    file).  Put the block on the list of pending blocks.  */
 
 static struct block *
-finish_block_internal (struct symbol *symbol, struct pending **listhead,
+finish_block_internal (struct symbol *symbol,
+		       struct pending **listhead,
 		       struct pending_block *old_blocks,
+		       const struct dynamic_prop *static_link,
 		       CORE_ADDR start, CORE_ADDR end,
 		       int is_global, int expandable)
 {
@@ -422,6 +424,9 @@ finish_block_internal (struct symbol *sy
       BLOCK_FUNCTION (block) = NULL;
     }
 
+  if (static_link != NULL)
+    objfile_register_static_link (objfile, block, static_link);
+
   /* Now "free" the links of the list, and empty the list.  */
 
   for (next = *listhead; next; next = next1)
@@ -503,8 +508,15 @@ finish_block_internal (struct symbol *sy
       opblock = pblock;
     }
 
-  block_set_using (block, using_directives, &objfile->objfile_obstack);
-  using_directives = NULL;
+  block_set_using (block,
+		   (is_global
+		    ? global_using_directives
+		    : local_using_directives),
+		   &objfile->objfile_obstack);
+  if (is_global)
+    global_using_directives = NULL;
+  else
+    local_using_directives = NULL;
 
   record_pending_block (objfile, block, opblock);
 
@@ -512,11 +524,13 @@ finish_block_internal (struct symbol *sy
 }
 
 struct block *
-finish_block (struct symbol *symbol, struct pending **listhead,
+finish_block (struct symbol *symbol,
+	      struct pending **listhead,
 	      struct pending_block *old_blocks,
+	      const struct dynamic_prop *static_link,
 	      CORE_ADDR start, CORE_ADDR end)
 {
-  return finish_block_internal (symbol, listhead, old_blocks,
+  return finish_block_internal (symbol, listhead, old_blocks, static_link,
 				start, end, 0, 0);
 }
 
@@ -536,8 +550,7 @@ record_pending_block (struct objfile *ob
   if (pending_blocks == NULL)
     obstack_init (&pending_block_obstack);
 
-  pblock = (struct pending_block *)
-    obstack_alloc (&pending_block_obstack, sizeof (struct pending_block));
+  pblock = XOBNEW (&pending_block_obstack, struct pending_block);
   pblock->block = block;
   if (opblock)
     {
@@ -691,7 +704,7 @@ start_subfile (const char *name)
 
   /* This subfile is not known.  Add an entry for it.  */
 
-  subfile = (struct subfile *) xmalloc (sizeof (struct subfile));
+  subfile = XNEW (struct subfile);
   memset (subfile, 0, sizeof (struct subfile));
   subfile->buildsym_compunit = buildsym_compunit;
 
@@ -759,8 +772,7 @@ start_buildsym_compunit (struct objfile 
 {
   struct buildsym_compunit *bscu;
 
-  bscu = (struct buildsym_compunit *)
-    xmalloc (sizeof (struct buildsym_compunit));
+  bscu = XNEW (struct buildsym_compunit);
   memset (bscu, 0, sizeof (struct buildsym_compunit));
 
   bscu->objfile = objfile;
@@ -852,8 +864,7 @@ patch_subfile_names (struct subfile *sub
 void
 push_subfile (void)
 {
-  struct subfile_stack *tem
-    = (struct subfile_stack *) xmalloc (sizeof (struct subfile_stack));
+  struct subfile_stack *tem = XNEW (struct subfile_stack);
 
   tem->next = subfile_stack;
   subfile_stack = tem;
@@ -1009,6 +1020,7 @@ prepare_for_building (const char *name, 
   last_source_start_addr = start_addr;
 
   local_symbols = NULL;
+  local_using_directives = NULL;
   within_function = 0;
   have_line_numbers = 0;
 
@@ -1018,6 +1030,7 @@ prepare_for_building (const char *name, 
      a symtab, or by the really_free_pendings cleanup.  */
   gdb_assert (file_symbols == NULL);
   gdb_assert (global_symbols == NULL);
+  gdb_assert (global_using_directives == NULL);
   gdb_assert (pending_macros == NULL);
   gdb_assert (pending_addrmap == NULL);
   gdb_assert (current_subfile == NULL);
@@ -1177,8 +1190,10 @@ reset_symtab_globals (void)
   set_last_source_file (NULL);
 
   local_symbols = NULL;
+  local_using_directives = NULL;
   file_symbols = NULL;
   global_symbols = NULL;
+  global_using_directives = NULL;
 
   /* We don't free pending_macros here because if the symtab was successfully
      built then ownership was transferred to the symtab.  */
@@ -1218,7 +1233,7 @@ end_symtab_get_static_block (CORE_ADDR e
       struct context_stack *cstk = pop_context ();
 
       /* Make a block for the local symbols within.  */
-      finish_block (cstk->name, &local_symbols, cstk->old_blocks,
+      finish_block (cstk->name, &local_symbols, cstk->old_blocks, NULL,
 		    cstk->start_addr, end_addr);
 
       if (context_stack_depth > 0)
@@ -1247,7 +1262,7 @@ end_symtab_get_static_block (CORE_ADDR e
       for (pb = pending_blocks; pb != NULL; pb = pb->next)
 	count++;
 
-      barray = xmalloc (sizeof (*barray) * count);
+      barray = XNEWVEC (struct block *, count);
       back_to = make_cleanup (xfree, barray);
 
       bp = barray;
@@ -1281,7 +1296,8 @@ end_symtab_get_static_block (CORE_ADDR e
       && file_symbols == NULL
       && global_symbols == NULL
       && have_line_numbers == 0
-      && pending_macros == NULL)
+      && pending_macros == NULL
+      && global_using_directives == NULL)
     {
       /* Ignore symtabs that have no functions with real debugging info.  */
       return NULL;
@@ -1289,7 +1305,7 @@ end_symtab_get_static_block (CORE_ADDR e
   else
     {
       /* Define the STATIC_BLOCK.  */
-      return finish_block_internal (NULL, &file_symbols, NULL,
+      return finish_block_internal (NULL, &file_symbols, NULL, NULL,
 				    last_source_start_addr, end_addr,
 				    0, expandable);
     }
@@ -1317,7 +1333,7 @@ end_symtab_with_blockvector (struct bloc
   end_addr = BLOCK_END (static_block);
 
   /* Create the GLOBAL_BLOCK and build the blockvector.  */
-  finish_block_internal (NULL, &global_symbols, NULL,
+  finish_block_internal (NULL, &global_symbols, NULL, NULL,
 			 last_source_start_addr, end_addr,
 			 1, expandable);
   blockvector = make_blockvector ();
@@ -1413,9 +1429,9 @@ end_symtab_with_blockvector (struct bloc
     {
       /* Reallocate the dirname on the symbol obstack.  */
       COMPUNIT_DIRNAME (cu)
-	= obstack_copy0 (&objfile->objfile_obstack,
-			 buildsym_compunit->comp_dir,
-			 strlen (buildsym_compunit->comp_dir));
+	= (const char *) obstack_copy0 (&objfile->objfile_obstack,
+					buildsym_compunit->comp_dir,
+					strlen (buildsym_compunit->comp_dir));
     }
 
   /* Save the debug format string (if any) in the symtab.  */
@@ -1637,11 +1653,11 @@ push_context (int desc, CORE_ADDR valu)
   newobj->locals = local_symbols;
   newobj->old_blocks = pending_blocks;
   newobj->start_addr = valu;
-  newobj->using_directives = using_directives;
+  newobj->local_using_directives = local_using_directives;
   newobj->name = NULL;
 
   local_symbols = NULL;
-  using_directives = NULL;
+  local_using_directives = NULL;
 
   return newobj;
 }
@@ -1740,7 +1756,6 @@ get_last_source_file (void)
 void
 buildsym_init (void)
 {
-  using_directives = NULL;
   subfile_stack = NULL;
 
   pending_addrmap_interesting = 0;
@@ -1750,8 +1765,7 @@ buildsym_init (void)
   if (context_stack == NULL)
     {
       context_stack_size = INITIAL_CONTEXT_STACK_SIZE;
-      context_stack = (struct context_stack *)
-	xmalloc (context_stack_size * sizeof (struct context_stack));
+      context_stack = XNEWVEC (struct context_stack, context_stack_size);
     }
 
   /* Ensure the really_free_pendings cleanup was called after
@@ -1760,6 +1774,7 @@ buildsym_init (void)
   gdb_assert (pending_blocks == NULL);
   gdb_assert (file_symbols == NULL);
   gdb_assert (global_symbols == NULL);
+  gdb_assert (global_using_directives == NULL);
   gdb_assert (pending_macros == NULL);
   gdb_assert (pending_addrmap == NULL);
   gdb_assert (buildsym_compunit == NULL);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/buildsym.h ./gdb/buildsym.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/buildsym.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/buildsym.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Build symbol tables in GDB's internal format.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,6 +39,8 @@ struct compunit_symtab;
 struct block;
 struct pending_block;
 
+struct dynamic_prop;
+
 #ifndef EXTERN
 #define	EXTERN extern
 #endif
@@ -118,7 +120,11 @@ EXTERN struct pending *local_symbols;
 
 /* "using" directives local to lexical context.  */
 
-EXTERN struct using_direct *using_directives;
+EXTERN struct using_direct *local_using_directives;
+
+/* global "using" directives.  */
+
+EXTERN struct using_direct *global_using_directives;
 
 /* Stack representing unclosed lexical contexts (that will become
    blocks, eventually).  */
@@ -131,7 +137,7 @@ struct context_stack
 
     /* Pending using directives at the time we entered.  */
 
-    struct using_direct *using_directives;
+    struct using_direct *local_using_directives;
 
     /* Pointer into blocklist as of entry */
 
@@ -141,6 +147,11 @@ struct context_stack
 
     struct symbol *name;
 
+    /* Expression that computes the frame base of the lexically enclosing
+       function, if any.  NULL otherwise.  */
+
+    struct dynamic_prop *static_link;
+
     /* PC where this context starts */
 
     CORE_ADDR start_addr;
@@ -192,9 +203,11 @@ extern struct symbol *find_symbol_in_lis
 					   char *name, int length);
 
 extern struct block *finish_block (struct symbol *symbol,
-                                   struct pending **listhead,
-                                   struct pending_block *old_blocks,
-                                   CORE_ADDR start, CORE_ADDR end);
+				   struct pending **listhead,
+				   struct pending_block *old_blocks,
+				   const struct dynamic_prop *static_link,
+				   CORE_ADDR start,
+				   CORE_ADDR end);
 
 extern void record_block_range (struct block *,
                                 CORE_ADDR start, CORE_ADDR end_inclusive);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-with-cxx.m4 ./gdb/build-with-cxx.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/build-with-cxx.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/build-with-cxx.m4	1970-01-01 00:00:00.000000000 +0000
@@ -1,41 +0,0 @@
-dnl Copyright (C) 2014-2015 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GDB.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-dnl GDB_AC_BUILD_WITH_CXX()
-dnl Provide an --enable-build-with-cxx/--disable-build-with-cxx set of options
-dnl allowing a user to build with a C++ compiler.
-
-AC_DEFUN([GDB_AC_BUILD_WITH_CXX],
-[
-  AC_ARG_ENABLE(build-with-cxx,
-  AS_HELP_STRING([--enable-build-with-cxx], [build with C++ compiler instead of C compiler]),
-    [case $enableval in
-      yes | no)
-	  ;;
-      *)
-	  AC_MSG_ERROR([bad value $enableval for --enable-build-with-cxx]) ;;
-    esac],
-    [enable_build_with_cxx=no])
-
-  if test "$enable_build_with_cxx" = "yes"; then
-    # We're using -fpermissive as shortcut for now.
-    COMPILER='$(CXX) -fpermissive'
-   else
-    COMPILER='$(CC)'
-  fi
-  AC_SUBST(COMPILER)
-])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-exp.c ./gdb/c-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-exp.c	2015-07-06 01:51:08.000000000 +0000
+++ ./gdb/c-exp.c	2017-03-06 01:53:00.000000000 +0000
@@ -92,65 +92,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list. */
-
-#define	yymaxdepth c_maxdepth
-#define	yyparse	c_parse_internal
-#define	yylex	c_lex
-#define	yyerror	c_error
-#define	yylval	c_lval
-#define	yychar	c_char
-#define	yydebug	c_debug
-#define	yypact	c_pact	
-#define	yyr1	c_r1			
-#define	yyr2	c_r2			
-#define	yydef	c_def		
-#define	yychk	c_chk		
-#define	yypgo	c_pgo		
-#define	yyact	c_act		
-#define	yyexca	c_exca
-#define yyerrflag c_errflag
-#define yynerrs	c_nerrs
-#define	yyps	c_ps
-#define	yypv	c_pv
-#define	yys	c_s
-#define	yy_yys	c_yys
-#define	yystate	c_state
-#define	yytmp	c_tmp
-#define	yyv	c_v
-#define	yy_yyv	c_yyv
-#define	yyval	c_val
-#define	yylloc	c_lloc
-#define yyreds	c_reds		/* With YYDEBUG defined */
-#define yytoks	c_toks		/* With YYDEBUG defined */
-#define yyname	c_name		/* With YYDEBUG defined */
-#define yyrule	c_rule		/* With YYDEBUG defined */
-#define yylhs	c_yylhs
-#define yylen	c_yylen
-#define yydefred c_yydefred
-#define yydgoto	c_yydgoto
-#define yysindex c_yysindex
-#define yyrindex c_yyrindex
-#define yygindex c_yygindex
-#define yytable	 c_yytable
-#define yycheck	 c_yycheck
-#define yyss	c_yyss
-#define yysslim	c_yysslim
-#define yyssp	c_yyssp
-#define yystacksize c_yystacksize
-#define yyvs	c_yyvs
-#define yyvsp	c_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX c_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -168,7 +113,7 @@ static int type_aggregate_p (struct type
 
 
 /* Line 189 of yacc.c  */
-#line 172 "c-exp.c"
+#line 117 "c-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -333,7 +278,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 139 "c-exp.y"
+#line 84 "c-exp.y"
 
     LONGEST lval;
     struct {
@@ -367,7 +312,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 371 "c-exp.c"
+#line 316 "c-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -378,7 +323,7 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 /* Line 264 of yacc.c  */
-#line 170 "c-exp.y"
+#line 115 "c-exp.y"
 
 /* YYSTYPE gets defined by %union */
 static int parse_number (struct parser_state *par_state,
@@ -395,7 +340,7 @@ static void c_print_token (FILE *file, i
 
 
 /* Line 264 of yacc.c  */
-#line 399 "c-exp.c"
+#line 344 "c-exp.c"
 
 #ifdef short
 # undef short
@@ -794,33 +739,33 @@ static const yytype_int16 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   288,   288,   289,   292,   296,   300,   306,   313,   314,
-     319,   323,   327,   331,   335,   339,   343,   347,   351,   355,
-     359,   363,   367,   371,   377,   384,   394,   400,   407,   415,
-     419,   425,   432,   442,   448,   455,   463,   467,   471,   481,
-     480,   504,   503,   520,   519,   528,   530,   533,   534,   537,
-     539,   541,   548,   545,   557,   556,   582,   586,   589,   593,
-     597,   615,   618,   625,   629,   633,   639,   643,   647,   651,
-     655,   659,   663,   667,   671,   675,   679,   683,   687,   691,
-     695,   699,   703,   707,   711,   715,   719,   723,   730,   737,
-     746,   759,   766,   773,   776,   782,   789,   809,   814,   818,
-     822,   829,   846,   864,   897,   906,   914,   924,   932,   938,
-     948,   963,   985,   998,  1022,  1031,  1032,  1060,  1114,  1118,
-    1119,  1122,  1125,  1126,  1130,  1131,  1136,  1135,  1139,  1138,
-    1141,  1143,  1147,  1156,  1158,  1159,  1162,  1164,  1171,  1178,
-    1184,  1191,  1193,  1195,  1197,  1201,  1203,  1215,  1219,  1221,
-    1225,  1229,  1233,  1237,  1241,  1245,  1249,  1253,  1257,  1261,
-    1265,  1269,  1273,  1277,  1281,  1285,  1289,  1293,  1297,  1301,
-    1305,  1309,  1313,  1317,  1321,  1325,  1331,  1337,  1340,  1345,
-    1351,  1354,  1359,  1365,  1368,  1373,  1379,  1382,  1387,  1393,
-    1397,  1401,  1405,  1412,  1416,  1418,  1422,  1423,  1431,  1439,
-    1450,  1452,  1461,  1467,  1474,  1475,  1482,  1486,  1487,  1490,
-    1491,  1494,  1498,  1500,  1504,  1506,  1508,  1510,  1512,  1514,
-    1516,  1518,  1520,  1522,  1524,  1526,  1528,  1530,  1532,  1534,
-    1536,  1538,  1540,  1542,  1582,  1584,  1586,  1588,  1590,  1592,
-    1594,  1596,  1598,  1600,  1602,  1604,  1606,  1608,  1610,  1612,
-    1614,  1630,  1631,  1632,  1633,  1634,  1635,  1638,  1639,  1647,
-    1659
+       0,   233,   233,   234,   237,   241,   245,   251,   258,   259,
+     264,   268,   272,   276,   280,   284,   288,   292,   296,   300,
+     304,   308,   312,   316,   322,   329,   339,   345,   352,   360,
+     364,   370,   377,   387,   393,   400,   408,   412,   416,   426,
+     425,   449,   448,   465,   464,   473,   475,   478,   479,   482,
+     484,   486,   493,   490,   502,   501,   527,   531,   534,   538,
+     542,   560,   563,   570,   574,   578,   584,   588,   592,   596,
+     600,   604,   608,   612,   616,   620,   624,   628,   632,   636,
+     640,   644,   648,   652,   656,   660,   664,   668,   675,   682,
+     691,   704,   711,   718,   721,   727,   734,   754,   759,   763,
+     767,   774,   791,   809,   842,   851,   859,   869,   877,   883,
+     894,   909,   931,   944,   968,   977,   978,  1006,  1057,  1061,
+    1062,  1065,  1068,  1069,  1073,  1074,  1079,  1078,  1082,  1081,
+    1084,  1086,  1090,  1099,  1101,  1102,  1105,  1107,  1114,  1121,
+    1127,  1134,  1136,  1138,  1140,  1144,  1146,  1158,  1162,  1164,
+    1168,  1172,  1176,  1180,  1184,  1188,  1192,  1196,  1200,  1204,
+    1208,  1212,  1216,  1220,  1224,  1228,  1232,  1236,  1240,  1244,
+    1248,  1252,  1256,  1260,  1264,  1268,  1274,  1280,  1283,  1288,
+    1294,  1297,  1302,  1308,  1311,  1316,  1322,  1325,  1330,  1336,
+    1340,  1344,  1348,  1355,  1359,  1361,  1365,  1366,  1374,  1382,
+    1393,  1395,  1404,  1410,  1417,  1418,  1425,  1429,  1430,  1433,
+    1434,  1437,  1441,  1443,  1447,  1449,  1451,  1453,  1455,  1457,
+    1459,  1461,  1463,  1465,  1467,  1469,  1471,  1473,  1475,  1477,
+    1479,  1481,  1483,  1485,  1525,  1527,  1529,  1531,  1533,  1535,
+    1537,  1539,  1541,  1543,  1545,  1547,  1549,  1551,  1553,  1555,
+    1557,  1568,  1569,  1570,  1571,  1572,  1573,  1576,  1577,  1585,
+    1597
 };
 #endif
 
@@ -2275,7 +2220,7 @@ yyreduce:
         case 4:
 
 /* Line 1455 of yacc.c  */
-#line 293 "c-exp.y"
+#line 238 "c-exp.y"
     { write_exp_elt_opcode(pstate, OP_TYPE);
 			  write_exp_elt_type(pstate, (yyvsp[(1) - (1)].tval));
 			  write_exp_elt_opcode(pstate, OP_TYPE);}
@@ -2284,7 +2229,7 @@ yyreduce:
   case 5:
 
 /* Line 1455 of yacc.c  */
-#line 297 "c-exp.y"
+#line 242 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_TYPEOF);
 			}
@@ -2293,7 +2238,7 @@ yyreduce:
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 301 "c-exp.y"
+#line 246 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_TYPE);
 			  write_exp_elt_type (pstate, (yyvsp[(3) - (4)].tval));
@@ -2304,7 +2249,7 @@ yyreduce:
   case 7:
 
 /* Line 1455 of yacc.c  */
-#line 307 "c-exp.y"
+#line 252 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_DECLTYPE);
 			}
@@ -2313,105 +2258,105 @@ yyreduce:
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 315 "c-exp.y"
+#line 260 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_COMMA); }
     break;
 
   case 10:
 
 /* Line 1455 of yacc.c  */
-#line 320 "c-exp.y"
+#line 265 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 324 "c-exp.y"
+#line 269 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 328 "c-exp.y"
+#line 273 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 332 "c-exp.y"
+#line 277 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PLUS); }
     break;
 
   case 14:
 
 /* Line 1455 of yacc.c  */
-#line 336 "c-exp.y"
+#line 281 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 340 "c-exp.y"
+#line 285 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
     break;
 
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 344 "c-exp.y"
+#line 289 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
     break;
 
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 348 "c-exp.y"
+#line 293 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
     break;
 
   case 18:
 
 /* Line 1455 of yacc.c  */
-#line 352 "c-exp.y"
+#line 297 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
     break;
 
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 356 "c-exp.y"
+#line 301 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
     break;
 
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 360 "c-exp.y"
+#line 305 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPEID); }
     break;
 
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 364 "c-exp.y"
+#line 309 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPEID); }
     break;
 
   case 22:
 
 /* Line 1455 of yacc.c  */
-#line 368 "c-exp.y"
+#line 313 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
     break;
 
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 372 "c-exp.y"
+#line 317 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
 			  write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
@@ -2420,7 +2365,7 @@ yyreduce:
   case 24:
 
 /* Line 1455 of yacc.c  */
-#line 378 "c-exp.y"
+#line 323 "c-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
 			  write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
@@ -2430,7 +2375,7 @@ yyreduce:
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 385 "c-exp.y"
+#line 330 "c-exp.y"
     { struct stoken s;
 			  mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
@@ -2443,7 +2388,7 @@ yyreduce:
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 395 "c-exp.y"
+#line 340 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
 			  write_destructor_name (pstate, (yyvsp[(4) - (4)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
@@ -2452,7 +2397,7 @@ yyreduce:
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 401 "c-exp.y"
+#line 346 "c-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
 			  write_destructor_name (pstate, (yyvsp[(4) - (5)].sval));
@@ -2462,7 +2407,7 @@ yyreduce:
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 408 "c-exp.y"
+#line 353 "c-exp.y"
     { /* exp->type::name becomes exp->*(&type::name) */
 			  /* Note: this doesn't work if name is a
 			     static member!  FIXME */
@@ -2473,14 +2418,14 @@ yyreduce:
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 416 "c-exp.y"
+#line 361 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_MPTR); }
     break;
 
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 420 "c-exp.y"
+#line 365 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
@@ -2489,7 +2434,7 @@ yyreduce:
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 426 "c-exp.y"
+#line 371 "c-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
@@ -2499,7 +2444,7 @@ yyreduce:
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 433 "c-exp.y"
+#line 378 "c-exp.y"
     { struct stoken s;
 			  mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
@@ -2512,7 +2457,7 @@ yyreduce:
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 443 "c-exp.y"
+#line 388 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_destructor_name (pstate, (yyvsp[(4) - (4)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
@@ -2521,7 +2466,7 @@ yyreduce:
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 449 "c-exp.y"
+#line 394 "c-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_destructor_name (pstate, (yyvsp[(4) - (5)].sval));
@@ -2531,7 +2476,7 @@ yyreduce:
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 456 "c-exp.y"
+#line 401 "c-exp.y"
     { /* exp.type::name becomes exp.*(&type::name) */
 			  /* Note: this doesn't work if name is a
 			     static member!  FIXME */
@@ -2542,28 +2487,28 @@ yyreduce:
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 464 "c-exp.y"
+#line 409 "c-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_MEMBER); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 468 "c-exp.y"
+#line 413 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 472 "c-exp.y"
+#line 417 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
     break;
 
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 481 "c-exp.y"
+#line 426 "c-exp.y"
     {
 			  CORE_ADDR theclass;
 
@@ -2584,7 +2529,7 @@ yyreduce:
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 497 "c-exp.y"
+#line 442 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
 			  end_msglist (pstate);
 			  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
@@ -2594,7 +2539,7 @@ yyreduce:
   case 41:
 
 /* Line 1455 of yacc.c  */
-#line 504 "c-exp.y"
+#line 449 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
@@ -2608,7 +2553,7 @@ yyreduce:
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 513 "c-exp.y"
+#line 458 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
 			  end_msglist (pstate);
 			  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
@@ -2618,14 +2563,14 @@ yyreduce:
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 520 "c-exp.y"
+#line 465 "c-exp.y"
     { start_msglist(); }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 522 "c-exp.y"
+#line 467 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
 			  end_msglist (pstate);
 			  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
@@ -2635,42 +2580,42 @@ yyreduce:
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 529 "c-exp.y"
+#line 474 "c-exp.y"
     { add_msglist(&(yyvsp[(1) - (1)].sval), 0); }
     break;
 
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 538 "c-exp.y"
+#line 483 "c-exp.y"
     { add_msglist(&(yyvsp[(1) - (3)].sval), 1); }
     break;
 
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 540 "c-exp.y"
+#line 485 "c-exp.y"
     { add_msglist(0, 1);   }
     break;
 
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 542 "c-exp.y"
+#line 487 "c-exp.y"
     { add_msglist(0, 0);   }
     break;
 
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 548 "c-exp.y"
+#line 493 "c-exp.y"
     { start_arglist (); }
     break;
 
   case 53:
 
 /* Line 1455 of yacc.c  */
-#line 550 "c-exp.y"
+#line 495 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) end_arglist ());
@@ -2680,7 +2625,7 @@ yyreduce:
   case 54:
 
 /* Line 1455 of yacc.c  */
-#line 557 "c-exp.y"
+#line 502 "c-exp.y"
     {
 			  /* This could potentially be a an argument defined
 			     lookup function (Koenig).  */
@@ -2702,7 +2647,7 @@ yyreduce:
   case 55:
 
 /* Line 1455 of yacc.c  */
-#line 574 "c-exp.y"
+#line 519 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate,
@@ -2714,28 +2659,28 @@ yyreduce:
   case 56:
 
 /* Line 1455 of yacc.c  */
-#line 583 "c-exp.y"
+#line 528 "c-exp.y"
     { start_arglist (); }
     break;
 
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 590 "c-exp.y"
+#line 535 "c-exp.y"
     { arglist_len = 1; }
     break;
 
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 594 "c-exp.y"
+#line 539 "c-exp.y"
     { arglist_len++; }
     break;
 
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 598 "c-exp.y"
+#line 543 "c-exp.y"
     { int i;
 			  VEC (type_ptr) *type_list = (yyvsp[(3) - (5)].tvec);
 			  struct type *type_elt;
@@ -2756,14 +2701,14 @@ yyreduce:
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 616 "c-exp.y"
+#line 561 "c-exp.y"
     { (yyval.lval) = end_arglist () - 1; }
     break;
 
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 619 "c-exp.y"
+#line 564 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_ARRAY);
 			  write_exp_elt_longcst (pstate, (LONGEST) 0);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(3) - (3)].lval));
@@ -2773,175 +2718,175 @@ yyreduce:
   case 63:
 
 /* Line 1455 of yacc.c  */
-#line 626 "c-exp.y"
+#line 571 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_MEMVAL_TYPE); }
     break;
 
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 630 "c-exp.y"
+#line 575 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
     break;
 
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 634 "c-exp.y"
+#line 579 "c-exp.y"
     { }
     break;
 
   case 66:
 
 /* Line 1455 of yacc.c  */
-#line 640 "c-exp.y"
+#line 585 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
     break;
 
   case 67:
 
 /* Line 1455 of yacc.c  */
-#line 644 "c-exp.y"
+#line 589 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 648 "c-exp.y"
+#line 593 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 69:
 
 /* Line 1455 of yacc.c  */
-#line 652 "c-exp.y"
+#line 597 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 70:
 
 /* Line 1455 of yacc.c  */
-#line 656 "c-exp.y"
+#line 601 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 71:
 
 /* Line 1455 of yacc.c  */
-#line 660 "c-exp.y"
+#line 605 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 72:
 
 /* Line 1455 of yacc.c  */
-#line 664 "c-exp.y"
+#line 609 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LSH); }
     break;
 
   case 73:
 
 /* Line 1455 of yacc.c  */
-#line 668 "c-exp.y"
+#line 613 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_RSH); }
     break;
 
   case 74:
 
 /* Line 1455 of yacc.c  */
-#line 672 "c-exp.y"
+#line 617 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 75:
 
 /* Line 1455 of yacc.c  */
-#line 676 "c-exp.y"
+#line 621 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 76:
 
 /* Line 1455 of yacc.c  */
-#line 680 "c-exp.y"
+#line 625 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 77:
 
 /* Line 1455 of yacc.c  */
-#line 684 "c-exp.y"
+#line 629 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 78:
 
 /* Line 1455 of yacc.c  */
-#line 688 "c-exp.y"
+#line 633 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 79:
 
 /* Line 1455 of yacc.c  */
-#line 692 "c-exp.y"
+#line 637 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 80:
 
 /* Line 1455 of yacc.c  */
-#line 696 "c-exp.y"
+#line 641 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 81:
 
 /* Line 1455 of yacc.c  */
-#line 700 "c-exp.y"
+#line 645 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 82:
 
 /* Line 1455 of yacc.c  */
-#line 704 "c-exp.y"
+#line 649 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 83:
 
 /* Line 1455 of yacc.c  */
-#line 708 "c-exp.y"
+#line 653 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 84:
 
 /* Line 1455 of yacc.c  */
-#line 712 "c-exp.y"
+#line 657 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 85:
 
 /* Line 1455 of yacc.c  */
-#line 716 "c-exp.y"
+#line 661 "c-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_COND); }
     break;
 
   case 86:
 
 /* Line 1455 of yacc.c  */
-#line 720 "c-exp.y"
+#line 665 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 87:
 
 /* Line 1455 of yacc.c  */
-#line 724 "c-exp.y"
+#line 669 "c-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 			  write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
 			  write_exp_elt_opcode (pstate,
@@ -2951,7 +2896,7 @@ yyreduce:
   case 88:
 
 /* Line 1455 of yacc.c  */
-#line 731 "c-exp.y"
+#line 676 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
 			  write_exp_elt_longcst (pstate, (LONGEST) ((yyvsp[(1) - (1)].typed_val_int).val));
@@ -2961,7 +2906,7 @@ yyreduce:
   case 89:
 
 /* Line 1455 of yacc.c  */
-#line 738 "c-exp.y"
+#line 683 "c-exp.y"
     {
 			  struct stoken_vector vec;
 			  vec.len = 1;
@@ -2973,7 +2918,7 @@ yyreduce:
   case 90:
 
 /* Line 1455 of yacc.c  */
-#line 747 "c-exp.y"
+#line 692 "c-exp.y"
     { YYSTYPE val;
 			  parse_number (pstate, (yyvsp[(1) - (1)].ssym).stoken.ptr,
 					(yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
@@ -2988,7 +2933,7 @@ yyreduce:
   case 91:
 
 /* Line 1455 of yacc.c  */
-#line 760 "c-exp.y"
+#line 705 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
 			  write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
@@ -2998,7 +2943,7 @@ yyreduce:
   case 92:
 
 /* Line 1455 of yacc.c  */
-#line 767 "c-exp.y"
+#line 712 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_DECFLOAT);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_decfloat).type);
 			  write_exp_elt_decfloatcst (pstate, (yyvsp[(1) - (1)].typed_val_decfloat).val);
@@ -3008,7 +2953,7 @@ yyreduce:
   case 94:
 
 /* Line 1455 of yacc.c  */
-#line 777 "c-exp.y"
+#line 722 "c-exp.y"
     {
 			  write_dollar_variable (pstate, (yyvsp[(1) - (1)].sval));
 			}
@@ -3017,7 +2962,7 @@ yyreduce:
   case 95:
 
 /* Line 1455 of yacc.c  */
-#line 783 "c-exp.y"
+#line 728 "c-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_OBJC_SELECTOR);
 			  write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
@@ -3027,14 +2972,14 @@ yyreduce:
   case 96:
 
 /* Line 1455 of yacc.c  */
-#line 790 "c-exp.y"
+#line 735 "c-exp.y"
     { struct type *type = (yyvsp[(3) - (4)].tval);
 			  write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate, lookup_signed_typename
 					      (parse_language (pstate),
 					       parse_gdbarch (pstate),
 					       "int"));
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 
 			    /* $5.3.3/2 of the C++ Standard (n3290 draft)
 			       says of sizeof:  "When applied to a reference
@@ -3050,7 +2995,7 @@ yyreduce:
   case 97:
 
 /* Line 1455 of yacc.c  */
-#line 810 "c-exp.y"
+#line 755 "c-exp.y"
     { write_exp_elt_opcode (pstate,
 						UNOP_REINTERPRET_CAST); }
     break;
@@ -3058,21 +3003,21 @@ yyreduce:
   case 98:
 
 /* Line 1455 of yacc.c  */
-#line 815 "c-exp.y"
+#line 760 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
     break;
 
   case 99:
 
 /* Line 1455 of yacc.c  */
-#line 819 "c-exp.y"
+#line 764 "c-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_DYNAMIC_CAST); }
     break;
 
   case 100:
 
 /* Line 1455 of yacc.c  */
-#line 823 "c-exp.y"
+#line 768 "c-exp.y"
     { /* We could do more error checking here, but
 			     it doesn't seem worthwhile.  */
 			  write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
@@ -3081,7 +3026,7 @@ yyreduce:
   case 101:
 
 /* Line 1455 of yacc.c  */
-#line 830 "c-exp.y"
+#line 775 "c-exp.y"
     {
 			  /* We copy the string here, and not in the
 			     lexer, to guarantee that we do not leak a
@@ -3094,7 +3039,7 @@ yyreduce:
 
 			  vec->type = (yyvsp[(1) - (1)].tsval).type;
 			  vec->length = (yyvsp[(1) - (1)].tsval).length;
-			  vec->ptr = xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
+			  vec->ptr = (char *) xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
 			  memcpy (vec->ptr, (yyvsp[(1) - (1)].tsval).ptr, (yyvsp[(1) - (1)].tsval).length + 1);
 			}
     break;
@@ -3102,16 +3047,16 @@ yyreduce:
   case 102:
 
 /* Line 1455 of yacc.c  */
-#line 847 "c-exp.y"
+#line 792 "c-exp.y"
     {
 			  /* Note that we NUL-terminate here, but just
 			     for convenience.  */
 			  char *p;
 			  ++(yyval.svec).len;
-			  (yyval.svec).tokens = xrealloc ((yyval.svec).tokens,
-					       (yyval.svec).len * sizeof (struct typed_stoken));
+			  (yyval.svec).tokens = XRESIZEVEC (struct typed_stoken,
+						  (yyval.svec).tokens, (yyval.svec).len);
 
-			  p = xmalloc ((yyvsp[(2) - (2)].tsval).length + 1);
+			  p = (char *) xmalloc ((yyvsp[(2) - (2)].tsval).length + 1);
 			  memcpy (p, (yyvsp[(2) - (2)].tsval).ptr, (yyvsp[(2) - (2)].tsval).length + 1);
 
 			  (yyval.svec).tokens[(yyval.svec).len - 1].type = (yyvsp[(2) - (2)].tsval).type;
@@ -3123,10 +3068,10 @@ yyreduce:
   case 103:
 
 /* Line 1455 of yacc.c  */
-#line 865 "c-exp.y"
+#line 810 "c-exp.y"
     {
 			  int i;
-			  enum c_string_type type = C_STRING;
+			  c_string_type type = C_STRING;
 
 			  for (i = 0; i < (yyvsp[(1) - (1)].svec).len; ++i)
 			    {
@@ -3140,7 +3085,7 @@ yyreduce:
 				  if (type != C_STRING
 				      && type != (yyvsp[(1) - (1)].svec).tokens[i].type)
 				    error (_("Undefined string concatenation."));
-				  type = (yyvsp[(1) - (1)].svec).tokens[i].type;
+				  type = (enum c_string_type_values) (yyvsp[(1) - (1)].svec).tokens[i].type;
 				  break;
 				default:
 				  /* internal error */
@@ -3159,7 +3104,7 @@ yyreduce:
   case 104:
 
 /* Line 1455 of yacc.c  */
-#line 900 "c-exp.y"
+#line 845 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING);
 			  write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
 			  write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING); }
@@ -3168,7 +3113,7 @@ yyreduce:
   case 105:
 
 /* Line 1455 of yacc.c  */
-#line 907 "c-exp.y"
+#line 852 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
                           write_exp_elt_type (pstate,
 					  parse_type (pstate)->builtin_bool);
@@ -3179,7 +3124,7 @@ yyreduce:
   case 106:
 
 /* Line 1455 of yacc.c  */
-#line 915 "c-exp.y"
+#line 860 "c-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
                           write_exp_elt_type (pstate,
 					  parse_type (pstate)->builtin_bool);
@@ -3190,10 +3135,10 @@ yyreduce:
   case 107:
 
 /* Line 1455 of yacc.c  */
-#line 925 "c-exp.y"
+#line 870 "c-exp.y"
     {
-			  if ((yyvsp[(1) - (1)].ssym).sym)
-			    (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym);
+			  if ((yyvsp[(1) - (1)].ssym).sym.symbol)
+			    (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym.symbol);
 			  else
 			    error (_("No file or function \"%s\"."),
 				   copy_name ((yyvsp[(1) - (1)].ssym).stoken));
@@ -3203,7 +3148,7 @@ yyreduce:
   case 108:
 
 /* Line 1455 of yacc.c  */
-#line 933 "c-exp.y"
+#line 878 "c-exp.y"
     {
 			  (yyval.bval) = (yyvsp[(1) - (1)].bval);
 			}
@@ -3212,10 +3157,11 @@ yyreduce:
   case 109:
 
 /* Line 1455 of yacc.c  */
-#line 939 "c-exp.y"
+#line 884 "c-exp.y"
     { struct symbol *tem
 			    = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
-					     VAR_DOMAIN, NULL);
+					     VAR_DOMAIN, NULL).symbol;
+
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
@@ -3225,8 +3171,8 @@ yyreduce:
   case 110:
 
 /* Line 1455 of yacc.c  */
-#line 949 "c-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (2)].ssym).sym;
+#line 895 "c-exp.y"
+    { struct symbol *sym = (yyvsp[(1) - (2)].ssym).sym.symbol;
 
 			  if (sym == NULL || !SYMBOL_IS_ARGUMENT (sym)
 			      || !symbol_read_needs_frame (sym))
@@ -3243,35 +3189,35 @@ yyreduce:
   case 111:
 
 /* Line 1455 of yacc.c  */
-#line 964 "c-exp.y"
-    { struct symbol *sym;
-			  sym = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
-					       VAR_DOMAIN, NULL);
-			  if (sym == 0)
+#line 910 "c-exp.y"
+    { struct block_symbol sym
+			    = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
+					     VAR_DOMAIN, NULL);
+
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
-			  if (symbol_read_needs_frame (sym))
+			  if (symbol_read_needs_frame (sym.symbol))
 			    {
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			    }
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
     break;
 
   case 112:
 
 /* Line 1455 of yacc.c  */
-#line 986 "c-exp.y"
+#line 932 "c-exp.y"
     {
 			  struct type *type = (yyvsp[(1) - (3)].tsym).type;
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 			  if (!type_aggregate_p (type))
 			    error (_("`%s' is not defined as an aggregate type."),
 				   TYPE_SAFE_NAME (type));
@@ -3286,17 +3232,17 @@ yyreduce:
   case 113:
 
 /* Line 1455 of yacc.c  */
-#line 999 "c-exp.y"
+#line 945 "c-exp.y"
     {
 			  struct type *type = (yyvsp[(1) - (4)].tsym).type;
 			  struct stoken tmp_token;
 			  char *buf;
 
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 			  if (!type_aggregate_p (type))
 			    error (_("`%s' is not defined as an aggregate type."),
 				   TYPE_SAFE_NAME (type));
-			  buf = alloca ((yyvsp[(4) - (4)].sval).length + 2);
+			  buf = (char *) alloca ((yyvsp[(4) - (4)].sval).length + 2);
 			  tmp_token.ptr = buf;
 			  tmp_token.length = (yyvsp[(4) - (4)].sval).length + 1;
 			  buf[0] = '~';
@@ -3315,7 +3261,7 @@ yyreduce:
   case 114:
 
 /* Line 1455 of yacc.c  */
-#line 1023 "c-exp.y"
+#line 969 "c-exp.y"
     {
 			  char *copy = copy_name ((yyvsp[(3) - (5)].sval));
 			  error (_("No type \"%s\" within class "
@@ -3327,15 +3273,15 @@ yyreduce:
   case 116:
 
 /* Line 1455 of yacc.c  */
-#line 1033 "c-exp.y"
+#line 979 "c-exp.y"
     {
 			  char *name = copy_name ((yyvsp[(2) - (2)].ssym).stoken);
 			  struct symbol *sym;
 			  struct bound_minimal_symbol msymbol;
 
-			  sym =
-			    lookup_symbol (name, (const struct block *) NULL,
-					   VAR_DOMAIN, NULL);
+			  sym
+			    = lookup_symbol (name, (const struct block *) NULL,
+					     VAR_DOMAIN, NULL).symbol;
 			  if (sym)
 			    {
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
@@ -3358,25 +3304,22 @@ yyreduce:
   case 117:
 
 /* Line 1455 of yacc.c  */
-#line 1061 "c-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
+#line 1007 "c-exp.y"
+    { struct block_symbol sym = (yyvsp[(1) - (1)].ssym).sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else if ((yyvsp[(1) - (1)].ssym).is_a_field_of_this)
@@ -3385,9 +3328,9 @@ yyreduce:
 			         not inadvertently convert from a method call
 				 to data ref.  */
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
@@ -3415,42 +3358,42 @@ yyreduce:
   case 118:
 
 /* Line 1455 of yacc.c  */
-#line 1115 "c-exp.y"
+#line 1058 "c-exp.y"
     { insert_type_address_space (pstate, copy_name ((yyvsp[(2) - (2)].ssym).stoken)); }
     break;
 
   case 126:
 
 /* Line 1455 of yacc.c  */
-#line 1136 "c-exp.y"
+#line 1079 "c-exp.y"
     { insert_type (tp_pointer); }
     break;
 
   case 128:
 
 /* Line 1455 of yacc.c  */
-#line 1139 "c-exp.y"
+#line 1082 "c-exp.y"
     { insert_type (tp_pointer); }
     break;
 
   case 130:
 
 /* Line 1455 of yacc.c  */
-#line 1142 "c-exp.y"
+#line 1085 "c-exp.y"
     { insert_type (tp_reference); }
     break;
 
   case 131:
 
 /* Line 1455 of yacc.c  */
-#line 1144 "c-exp.y"
+#line 1087 "c-exp.y"
     { insert_type (tp_reference); }
     break;
 
   case 132:
 
 /* Line 1455 of yacc.c  */
-#line 1148 "c-exp.y"
+#line 1091 "c-exp.y"
     {
 			  (yyval.type_stack) = get_type_stack ();
 			  /* This cleanup is eventually run by
@@ -3462,21 +3405,21 @@ yyreduce:
   case 133:
 
 /* Line 1455 of yacc.c  */
-#line 1157 "c-exp.y"
+#line 1100 "c-exp.y"
     { (yyval.type_stack) = append_type_stack ((yyvsp[(2) - (2)].type_stack), (yyvsp[(1) - (2)].type_stack)); }
     break;
 
   case 136:
 
 /* Line 1455 of yacc.c  */
-#line 1163 "c-exp.y"
+#line 1106 "c-exp.y"
     { (yyval.type_stack) = (yyvsp[(2) - (3)].type_stack); }
     break;
 
   case 137:
 
 /* Line 1455 of yacc.c  */
-#line 1165 "c-exp.y"
+#line 1108 "c-exp.y"
     {
 			  push_type_stack ((yyvsp[(1) - (2)].type_stack));
 			  push_type_int ((yyvsp[(2) - (2)].lval));
@@ -3488,7 +3431,7 @@ yyreduce:
   case 138:
 
 /* Line 1455 of yacc.c  */
-#line 1172 "c-exp.y"
+#line 1115 "c-exp.y"
     {
 			  push_type_int ((yyvsp[(1) - (1)].lval));
 			  push_type (tp_array);
@@ -3499,7 +3442,7 @@ yyreduce:
   case 139:
 
 /* Line 1455 of yacc.c  */
-#line 1179 "c-exp.y"
+#line 1122 "c-exp.y"
     {
 			  push_type_stack ((yyvsp[(1) - (2)].type_stack));
 			  push_typelist ((yyvsp[(2) - (2)].tvec));
@@ -3510,7 +3453,7 @@ yyreduce:
   case 140:
 
 /* Line 1455 of yacc.c  */
-#line 1185 "c-exp.y"
+#line 1128 "c-exp.y"
     {
 			  push_typelist ((yyvsp[(1) - (1)].tvec));
 			  (yyval.type_stack) = get_type_stack ();
@@ -3520,56 +3463,56 @@ yyreduce:
   case 141:
 
 /* Line 1455 of yacc.c  */
-#line 1192 "c-exp.y"
+#line 1135 "c-exp.y"
     { (yyval.lval) = -1; }
     break;
 
   case 142:
 
 /* Line 1455 of yacc.c  */
-#line 1194 "c-exp.y"
+#line 1137 "c-exp.y"
     { (yyval.lval) = -1; }
     break;
 
   case 143:
 
 /* Line 1455 of yacc.c  */
-#line 1196 "c-exp.y"
+#line 1139 "c-exp.y"
     { (yyval.lval) = (yyvsp[(2) - (3)].typed_val_int).val; }
     break;
 
   case 144:
 
 /* Line 1455 of yacc.c  */
-#line 1198 "c-exp.y"
+#line 1141 "c-exp.y"
     { (yyval.lval) = (yyvsp[(2) - (3)].typed_val_int).val; }
     break;
 
   case 145:
 
 /* Line 1455 of yacc.c  */
-#line 1202 "c-exp.y"
+#line 1145 "c-exp.y"
     { (yyval.tvec) = NULL; }
     break;
 
   case 146:
 
 /* Line 1455 of yacc.c  */
-#line 1204 "c-exp.y"
+#line 1147 "c-exp.y"
     { (yyval.tvec) = (yyvsp[(2) - (3)].tvec); }
     break;
 
   case 148:
 
 /* Line 1455 of yacc.c  */
-#line 1220 "c-exp.y"
+#line 1163 "c-exp.y"
     { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
     break;
 
   case 149:
 
 /* Line 1455 of yacc.c  */
-#line 1222 "c-exp.y"
+#line 1165 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "int"); }
@@ -3578,7 +3521,7 @@ yyreduce:
   case 150:
 
 /* Line 1455 of yacc.c  */
-#line 1226 "c-exp.y"
+#line 1169 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long"); }
@@ -3587,7 +3530,7 @@ yyreduce:
   case 151:
 
 /* Line 1455 of yacc.c  */
-#line 1230 "c-exp.y"
+#line 1173 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "short"); }
@@ -3596,7 +3539,7 @@ yyreduce:
   case 152:
 
 /* Line 1455 of yacc.c  */
-#line 1234 "c-exp.y"
+#line 1177 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long"); }
@@ -3605,7 +3548,7 @@ yyreduce:
   case 153:
 
 /* Line 1455 of yacc.c  */
-#line 1238 "c-exp.y"
+#line 1181 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long"); }
@@ -3614,7 +3557,7 @@ yyreduce:
   case 154:
 
 /* Line 1455 of yacc.c  */
-#line 1242 "c-exp.y"
+#line 1185 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long"); }
@@ -3623,7 +3566,7 @@ yyreduce:
   case 155:
 
 /* Line 1455 of yacc.c  */
-#line 1246 "c-exp.y"
+#line 1189 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long"); }
@@ -3632,7 +3575,7 @@ yyreduce:
   case 156:
 
 /* Line 1455 of yacc.c  */
-#line 1250 "c-exp.y"
+#line 1193 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long"); }
@@ -3641,7 +3584,7 @@ yyreduce:
   case 157:
 
 /* Line 1455 of yacc.c  */
-#line 1254 "c-exp.y"
+#line 1197 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long"); }
@@ -3650,7 +3593,7 @@ yyreduce:
   case 158:
 
 /* Line 1455 of yacc.c  */
-#line 1258 "c-exp.y"
+#line 1201 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long"); }
@@ -3659,7 +3602,7 @@ yyreduce:
   case 159:
 
 /* Line 1455 of yacc.c  */
-#line 1262 "c-exp.y"
+#line 1205 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3668,7 +3611,7 @@ yyreduce:
   case 160:
 
 /* Line 1455 of yacc.c  */
-#line 1266 "c-exp.y"
+#line 1209 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3677,7 +3620,7 @@ yyreduce:
   case 161:
 
 /* Line 1455 of yacc.c  */
-#line 1270 "c-exp.y"
+#line 1213 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3686,7 +3629,7 @@ yyreduce:
   case 162:
 
 /* Line 1455 of yacc.c  */
-#line 1274 "c-exp.y"
+#line 1217 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3695,7 +3638,7 @@ yyreduce:
   case 163:
 
 /* Line 1455 of yacc.c  */
-#line 1278 "c-exp.y"
+#line 1221 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3704,7 +3647,7 @@ yyreduce:
   case 164:
 
 /* Line 1455 of yacc.c  */
-#line 1282 "c-exp.y"
+#line 1225 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "long long"); }
@@ -3713,7 +3656,7 @@ yyreduce:
   case 165:
 
 /* Line 1455 of yacc.c  */
-#line 1286 "c-exp.y"
+#line 1229 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long long"); }
@@ -3722,7 +3665,7 @@ yyreduce:
   case 166:
 
 /* Line 1455 of yacc.c  */
-#line 1290 "c-exp.y"
+#line 1233 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long long"); }
@@ -3731,7 +3674,7 @@ yyreduce:
   case 167:
 
 /* Line 1455 of yacc.c  */
-#line 1294 "c-exp.y"
+#line 1237 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long long"); }
@@ -3740,7 +3683,7 @@ yyreduce:
   case 168:
 
 /* Line 1455 of yacc.c  */
-#line 1298 "c-exp.y"
+#line 1241 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "long long"); }
@@ -3749,7 +3692,7 @@ yyreduce:
   case 169:
 
 /* Line 1455 of yacc.c  */
-#line 1302 "c-exp.y"
+#line 1245 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "short"); }
@@ -3758,7 +3701,7 @@ yyreduce:
   case 170:
 
 /* Line 1455 of yacc.c  */
-#line 1306 "c-exp.y"
+#line 1249 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "short"); }
@@ -3767,7 +3710,7 @@ yyreduce:
   case 171:
 
 /* Line 1455 of yacc.c  */
-#line 1310 "c-exp.y"
+#line 1253 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "short"); }
@@ -3776,7 +3719,7 @@ yyreduce:
   case 172:
 
 /* Line 1455 of yacc.c  */
-#line 1314 "c-exp.y"
+#line 1257 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "short"); }
@@ -3785,7 +3728,7 @@ yyreduce:
   case 173:
 
 /* Line 1455 of yacc.c  */
-#line 1318 "c-exp.y"
+#line 1261 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "short"); }
@@ -3794,7 +3737,7 @@ yyreduce:
   case 174:
 
 /* Line 1455 of yacc.c  */
-#line 1322 "c-exp.y"
+#line 1265 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "short"); }
@@ -3803,7 +3746,7 @@ yyreduce:
   case 175:
 
 /* Line 1455 of yacc.c  */
-#line 1326 "c-exp.y"
+#line 1269 "c-exp.y"
     { (yyval.tval) = lookup_typename (parse_language (pstate),
 						parse_gdbarch (pstate),
 						"double",
@@ -3814,7 +3757,7 @@ yyreduce:
   case 176:
 
 /* Line 1455 of yacc.c  */
-#line 1332 "c-exp.y"
+#line 1275 "c-exp.y"
     { (yyval.tval) = lookup_typename (parse_language (pstate),
 						parse_gdbarch (pstate),
 						"long double",
@@ -3825,7 +3768,7 @@ yyreduce:
   case 177:
 
 /* Line 1455 of yacc.c  */
-#line 1338 "c-exp.y"
+#line 1281 "c-exp.y"
     { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
 					      expression_context_block); }
     break;
@@ -3833,7 +3776,7 @@ yyreduce:
   case 178:
 
 /* Line 1455 of yacc.c  */
-#line 1341 "c-exp.y"
+#line 1284 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
 			  (yyval.tval) = NULL;
@@ -3843,7 +3786,7 @@ yyreduce:
   case 179:
 
 /* Line 1455 of yacc.c  */
-#line 1346 "c-exp.y"
+#line 1289 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[(2) - (3)].sval).ptr,
 					       (yyvsp[(2) - (3)].sval).length);
@@ -3854,7 +3797,7 @@ yyreduce:
   case 180:
 
 /* Line 1455 of yacc.c  */
-#line 1352 "c-exp.y"
+#line 1295 "c-exp.y"
     { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
 					      expression_context_block); }
     break;
@@ -3862,7 +3805,7 @@ yyreduce:
   case 181:
 
 /* Line 1455 of yacc.c  */
-#line 1355 "c-exp.y"
+#line 1298 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
 			  (yyval.tval) = NULL;
@@ -3872,7 +3815,7 @@ yyreduce:
   case 182:
 
 /* Line 1455 of yacc.c  */
-#line 1360 "c-exp.y"
+#line 1303 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[(2) - (3)].sval).ptr,
 					       (yyvsp[(2) - (3)].sval).length);
@@ -3883,7 +3826,7 @@ yyreduce:
   case 183:
 
 /* Line 1455 of yacc.c  */
-#line 1366 "c-exp.y"
+#line 1309 "c-exp.y"
     { (yyval.tval) = lookup_union (copy_name ((yyvsp[(2) - (2)].sval)),
 					     expression_context_block); }
     break;
@@ -3891,7 +3834,7 @@ yyreduce:
   case 184:
 
 /* Line 1455 of yacc.c  */
-#line 1369 "c-exp.y"
+#line 1312 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_UNION, "", 0);
 			  (yyval.tval) = NULL;
@@ -3901,7 +3844,7 @@ yyreduce:
   case 185:
 
 /* Line 1455 of yacc.c  */
-#line 1374 "c-exp.y"
+#line 1317 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_UNION, (yyvsp[(2) - (3)].sval).ptr,
 					       (yyvsp[(2) - (3)].sval).length);
@@ -3912,7 +3855,7 @@ yyreduce:
   case 186:
 
 /* Line 1455 of yacc.c  */
-#line 1380 "c-exp.y"
+#line 1323 "c-exp.y"
     { (yyval.tval) = lookup_enum (copy_name ((yyvsp[(2) - (2)].sval)),
 					    expression_context_block); }
     break;
@@ -3920,7 +3863,7 @@ yyreduce:
   case 187:
 
 /* Line 1455 of yacc.c  */
-#line 1383 "c-exp.y"
+#line 1326 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_ENUM, "", 0);
 			  (yyval.tval) = NULL;
@@ -3930,7 +3873,7 @@ yyreduce:
   case 188:
 
 /* Line 1455 of yacc.c  */
-#line 1388 "c-exp.y"
+#line 1331 "c-exp.y"
     {
 			  mark_completion_tag (TYPE_CODE_ENUM, (yyvsp[(2) - (3)].sval).ptr,
 					       (yyvsp[(2) - (3)].sval).length);
@@ -3941,7 +3884,7 @@ yyreduce:
   case 189:
 
 /* Line 1455 of yacc.c  */
-#line 1394 "c-exp.y"
+#line 1337 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 TYPE_NAME((yyvsp[(2) - (2)].tsym).type)); }
@@ -3950,7 +3893,7 @@ yyreduce:
   case 190:
 
 /* Line 1455 of yacc.c  */
-#line 1398 "c-exp.y"
+#line 1341 "c-exp.y"
     { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
 							 parse_gdbarch (pstate),
 							 "int"); }
@@ -3959,7 +3902,7 @@ yyreduce:
   case 191:
 
 /* Line 1455 of yacc.c  */
-#line 1402 "c-exp.y"
+#line 1345 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       TYPE_NAME((yyvsp[(2) - (2)].tsym).type)); }
@@ -3968,7 +3911,7 @@ yyreduce:
   case 192:
 
 /* Line 1455 of yacc.c  */
-#line 1406 "c-exp.y"
+#line 1349 "c-exp.y"
     { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
 						       parse_gdbarch (pstate),
 						       "int"); }
@@ -3977,7 +3920,7 @@ yyreduce:
   case 193:
 
 /* Line 1455 of yacc.c  */
-#line 1413 "c-exp.y"
+#line 1356 "c-exp.y"
     { (yyval.tval) = lookup_template_type(copy_name((yyvsp[(2) - (5)].sval)), (yyvsp[(4) - (5)].tval),
 						    expression_context_block);
 			}
@@ -3986,21 +3929,21 @@ yyreduce:
   case 194:
 
 /* Line 1455 of yacc.c  */
-#line 1417 "c-exp.y"
+#line 1360 "c-exp.y"
     { (yyval.tval) = follow_types ((yyvsp[(2) - (2)].tval)); }
     break;
 
   case 195:
 
 /* Line 1455 of yacc.c  */
-#line 1419 "c-exp.y"
+#line 1362 "c-exp.y"
     { (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval)); }
     break;
 
   case 197:
 
 /* Line 1455 of yacc.c  */
-#line 1424 "c-exp.y"
+#line 1367 "c-exp.y"
     {
 		  (yyval.tsym).stoken.ptr = "int";
 		  (yyval.tsym).stoken.length = 3;
@@ -4013,7 +3956,7 @@ yyreduce:
   case 198:
 
 /* Line 1455 of yacc.c  */
-#line 1432 "c-exp.y"
+#line 1375 "c-exp.y"
     {
 		  (yyval.tsym).stoken.ptr = "long";
 		  (yyval.tsym).stoken.length = 4;
@@ -4026,7 +3969,7 @@ yyreduce:
   case 199:
 
 /* Line 1455 of yacc.c  */
-#line 1440 "c-exp.y"
+#line 1383 "c-exp.y"
     {
 		  (yyval.tsym).stoken.ptr = "short";
 		  (yyval.tsym).stoken.length = 5;
@@ -4039,14 +3982,14 @@ yyreduce:
   case 200:
 
 /* Line 1455 of yacc.c  */
-#line 1451 "c-exp.y"
+#line 1394 "c-exp.y"
     { check_parameter_typelist ((yyvsp[(1) - (1)].tvec)); }
     break;
 
   case 201:
 
 /* Line 1455 of yacc.c  */
-#line 1453 "c-exp.y"
+#line 1396 "c-exp.y"
     {
 			  VEC_safe_push (type_ptr, (yyvsp[(1) - (3)].tvec), NULL);
 			  check_parameter_typelist ((yyvsp[(1) - (3)].tvec));
@@ -4057,7 +4000,7 @@ yyreduce:
   case 202:
 
 /* Line 1455 of yacc.c  */
-#line 1462 "c-exp.y"
+#line 1405 "c-exp.y"
     {
 		  VEC (type_ptr) *typelist = NULL;
 		  VEC_safe_push (type_ptr, typelist, (yyvsp[(1) - (1)].tval));
@@ -4068,7 +4011,7 @@ yyreduce:
   case 203:
 
 /* Line 1455 of yacc.c  */
-#line 1468 "c-exp.y"
+#line 1411 "c-exp.y"
     {
 		  VEC_safe_push (type_ptr, (yyvsp[(1) - (3)].tvec), (yyvsp[(3) - (3)].tval));
 		  (yyval.tvec) = (yyvsp[(1) - (3)].tvec);
@@ -4078,7 +4021,7 @@ yyreduce:
   case 205:
 
 /* Line 1455 of yacc.c  */
-#line 1476 "c-exp.y"
+#line 1419 "c-exp.y"
     {
 		  push_type_stack ((yyvsp[(2) - (2)].type_stack));
 		  (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval));
@@ -4088,14 +4031,14 @@ yyreduce:
   case 206:
 
 /* Line 1455 of yacc.c  */
-#line 1483 "c-exp.y"
+#line 1426 "c-exp.y"
     { (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval)); }
     break;
 
   case 211:
 
 /* Line 1455 of yacc.c  */
-#line 1495 "c-exp.y"
+#line 1438 "c-exp.y"
     { insert_type (tp_const);
 			  insert_type (tp_volatile);
 			}
@@ -4104,154 +4047,154 @@ yyreduce:
   case 212:
 
 /* Line 1455 of yacc.c  */
-#line 1499 "c-exp.y"
+#line 1442 "c-exp.y"
     { insert_type (tp_const); }
     break;
 
   case 213:
 
 /* Line 1455 of yacc.c  */
-#line 1501 "c-exp.y"
+#line 1444 "c-exp.y"
     { insert_type (tp_volatile); }
     break;
 
   case 214:
 
 /* Line 1455 of yacc.c  */
-#line 1505 "c-exp.y"
+#line 1448 "c-exp.y"
     { (yyval.sval) = operator_stoken (" new"); }
     break;
 
   case 215:
 
 /* Line 1455 of yacc.c  */
-#line 1507 "c-exp.y"
+#line 1450 "c-exp.y"
     { (yyval.sval) = operator_stoken (" delete"); }
     break;
 
   case 216:
 
 /* Line 1455 of yacc.c  */
-#line 1509 "c-exp.y"
+#line 1452 "c-exp.y"
     { (yyval.sval) = operator_stoken (" new[]"); }
     break;
 
   case 217:
 
 /* Line 1455 of yacc.c  */
-#line 1511 "c-exp.y"
+#line 1454 "c-exp.y"
     { (yyval.sval) = operator_stoken (" delete[]"); }
     break;
 
   case 218:
 
 /* Line 1455 of yacc.c  */
-#line 1513 "c-exp.y"
+#line 1456 "c-exp.y"
     { (yyval.sval) = operator_stoken (" new[]"); }
     break;
 
   case 219:
 
 /* Line 1455 of yacc.c  */
-#line 1515 "c-exp.y"
+#line 1458 "c-exp.y"
     { (yyval.sval) = operator_stoken (" delete[]"); }
     break;
 
   case 220:
 
 /* Line 1455 of yacc.c  */
-#line 1517 "c-exp.y"
+#line 1460 "c-exp.y"
     { (yyval.sval) = operator_stoken ("+"); }
     break;
 
   case 221:
 
 /* Line 1455 of yacc.c  */
-#line 1519 "c-exp.y"
+#line 1462 "c-exp.y"
     { (yyval.sval) = operator_stoken ("-"); }
     break;
 
   case 222:
 
 /* Line 1455 of yacc.c  */
-#line 1521 "c-exp.y"
+#line 1464 "c-exp.y"
     { (yyval.sval) = operator_stoken ("*"); }
     break;
 
   case 223:
 
 /* Line 1455 of yacc.c  */
-#line 1523 "c-exp.y"
+#line 1466 "c-exp.y"
     { (yyval.sval) = operator_stoken ("/"); }
     break;
 
   case 224:
 
 /* Line 1455 of yacc.c  */
-#line 1525 "c-exp.y"
+#line 1468 "c-exp.y"
     { (yyval.sval) = operator_stoken ("%"); }
     break;
 
   case 225:
 
 /* Line 1455 of yacc.c  */
-#line 1527 "c-exp.y"
+#line 1470 "c-exp.y"
     { (yyval.sval) = operator_stoken ("^"); }
     break;
 
   case 226:
 
 /* Line 1455 of yacc.c  */
-#line 1529 "c-exp.y"
+#line 1472 "c-exp.y"
     { (yyval.sval) = operator_stoken ("&"); }
     break;
 
   case 227:
 
 /* Line 1455 of yacc.c  */
-#line 1531 "c-exp.y"
+#line 1474 "c-exp.y"
     { (yyval.sval) = operator_stoken ("|"); }
     break;
 
   case 228:
 
 /* Line 1455 of yacc.c  */
-#line 1533 "c-exp.y"
+#line 1476 "c-exp.y"
     { (yyval.sval) = operator_stoken ("~"); }
     break;
 
   case 229:
 
 /* Line 1455 of yacc.c  */
-#line 1535 "c-exp.y"
+#line 1478 "c-exp.y"
     { (yyval.sval) = operator_stoken ("!"); }
     break;
 
   case 230:
 
 /* Line 1455 of yacc.c  */
-#line 1537 "c-exp.y"
+#line 1480 "c-exp.y"
     { (yyval.sval) = operator_stoken ("="); }
     break;
 
   case 231:
 
 /* Line 1455 of yacc.c  */
-#line 1539 "c-exp.y"
+#line 1482 "c-exp.y"
     { (yyval.sval) = operator_stoken ("<"); }
     break;
 
   case 232:
 
 /* Line 1455 of yacc.c  */
-#line 1541 "c-exp.y"
+#line 1484 "c-exp.y"
     { (yyval.sval) = operator_stoken (">"); }
     break;
 
   case 233:
 
 /* Line 1455 of yacc.c  */
-#line 1543 "c-exp.y"
+#line 1486 "c-exp.y"
     { const char *op = "unknown";
 			  switch ((yyvsp[(2) - (2)].opcode))
 			    {
@@ -4296,178 +4239,173 @@ yyreduce:
   case 234:
 
 /* Line 1455 of yacc.c  */
-#line 1583 "c-exp.y"
+#line 1526 "c-exp.y"
     { (yyval.sval) = operator_stoken ("<<"); }
     break;
 
   case 235:
 
 /* Line 1455 of yacc.c  */
-#line 1585 "c-exp.y"
+#line 1528 "c-exp.y"
     { (yyval.sval) = operator_stoken (">>"); }
     break;
 
   case 236:
 
 /* Line 1455 of yacc.c  */
-#line 1587 "c-exp.y"
+#line 1530 "c-exp.y"
     { (yyval.sval) = operator_stoken ("=="); }
     break;
 
   case 237:
 
 /* Line 1455 of yacc.c  */
-#line 1589 "c-exp.y"
+#line 1532 "c-exp.y"
     { (yyval.sval) = operator_stoken ("!="); }
     break;
 
   case 238:
 
 /* Line 1455 of yacc.c  */
-#line 1591 "c-exp.y"
+#line 1534 "c-exp.y"
     { (yyval.sval) = operator_stoken ("<="); }
     break;
 
   case 239:
 
 /* Line 1455 of yacc.c  */
-#line 1593 "c-exp.y"
+#line 1536 "c-exp.y"
     { (yyval.sval) = operator_stoken (">="); }
     break;
 
   case 240:
 
 /* Line 1455 of yacc.c  */
-#line 1595 "c-exp.y"
+#line 1538 "c-exp.y"
     { (yyval.sval) = operator_stoken ("&&"); }
     break;
 
   case 241:
 
 /* Line 1455 of yacc.c  */
-#line 1597 "c-exp.y"
+#line 1540 "c-exp.y"
     { (yyval.sval) = operator_stoken ("||"); }
     break;
 
   case 242:
 
 /* Line 1455 of yacc.c  */
-#line 1599 "c-exp.y"
+#line 1542 "c-exp.y"
     { (yyval.sval) = operator_stoken ("++"); }
     break;
 
   case 243:
 
 /* Line 1455 of yacc.c  */
-#line 1601 "c-exp.y"
+#line 1544 "c-exp.y"
     { (yyval.sval) = operator_stoken ("--"); }
     break;
 
   case 244:
 
 /* Line 1455 of yacc.c  */
-#line 1603 "c-exp.y"
+#line 1546 "c-exp.y"
     { (yyval.sval) = operator_stoken (","); }
     break;
 
   case 245:
 
 /* Line 1455 of yacc.c  */
-#line 1605 "c-exp.y"
+#line 1548 "c-exp.y"
     { (yyval.sval) = operator_stoken ("->*"); }
     break;
 
   case 246:
 
 /* Line 1455 of yacc.c  */
-#line 1607 "c-exp.y"
+#line 1550 "c-exp.y"
     { (yyval.sval) = operator_stoken ("->"); }
     break;
 
   case 247:
 
 /* Line 1455 of yacc.c  */
-#line 1609 "c-exp.y"
+#line 1552 "c-exp.y"
     { (yyval.sval) = operator_stoken ("()"); }
     break;
 
   case 248:
 
 /* Line 1455 of yacc.c  */
-#line 1611 "c-exp.y"
+#line 1554 "c-exp.y"
     { (yyval.sval) = operator_stoken ("[]"); }
     break;
 
   case 249:
 
 /* Line 1455 of yacc.c  */
-#line 1613 "c-exp.y"
+#line 1556 "c-exp.y"
     { (yyval.sval) = operator_stoken ("[]"); }
     break;
 
   case 250:
 
 /* Line 1455 of yacc.c  */
-#line 1615 "c-exp.y"
-    { char *name;
-			  long length;
-			  struct ui_file *buf = mem_fileopen ();
+#line 1558 "c-exp.y"
+    { string_file buf;
 
-			  c_print_type ((yyvsp[(2) - (2)].tval), NULL, buf, -1, 0,
+			  c_print_type ((yyvsp[(2) - (2)].tval), NULL, &buf, -1, 0,
 					&type_print_raw_options);
-			  name = ui_file_xstrdup (buf, &length);
-			  ui_file_delete (buf);
-			  (yyval.sval) = operator_stoken (name);
-			  xfree (name);
+			  (yyval.sval) = operator_stoken (buf.c_str ());
 			}
     break;
 
   case 251:
 
 /* Line 1455 of yacc.c  */
-#line 1630 "c-exp.y"
+#line 1568 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 252:
 
 /* Line 1455 of yacc.c  */
-#line 1631 "c-exp.y"
+#line 1569 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 253:
 
 /* Line 1455 of yacc.c  */
-#line 1632 "c-exp.y"
+#line 1570 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].tsym).stoken; }
     break;
 
   case 254:
 
 /* Line 1455 of yacc.c  */
-#line 1633 "c-exp.y"
+#line 1571 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 255:
 
 /* Line 1455 of yacc.c  */
-#line 1634 "c-exp.y"
+#line 1572 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 256:
 
 /* Line 1455 of yacc.c  */
-#line 1635 "c-exp.y"
+#line 1573 "c-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
     break;
 
   case 259:
 
 /* Line 1455 of yacc.c  */
-#line 1648 "c-exp.y"
+#line 1586 "c-exp.y"
     {
 			  struct field_of_this_result is_a_field_of_this;
 
@@ -4484,7 +4422,7 @@ yyreduce:
 
 
 /* Line 1455 of yacc.c  */
-#line 4489 "c-exp.c"
+#line 4427 "c-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4696,7 +4634,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 1662 "c-exp.y"
+#line 1600 "c-exp.y"
 
 
 /* Like write_exp_string, but prepends a '~'.  */
@@ -4704,7 +4642,7 @@ yyreturn:
 static void
 write_destructor_name (struct parser_state *par_state, struct stoken token)
 {
-  char *copy = alloca (token.length + 1);
+  char *copy = (char *) alloca (token.length + 1);
 
   copy[0] = '~';
   memcpy (&copy[1], token.ptr, token.length);
@@ -4726,7 +4664,7 @@ operator_stoken (const char *op)
   char *buf;
 
   st.length = strlen (operator_string) + strlen (op);
-  buf = xmalloc (st.length + 1);
+  buf = (char *) xmalloc (st.length + 1);
   strcpy (buf, operator_string);
   strcat (buf, op);
   st.ptr = buf;
@@ -4811,7 +4749,7 @@ parse_number (struct parser_state *par_s
   struct type *unsigned_type;
   char *p;
 
-  p = alloca (len);
+  p = (char *) alloca (len);
   memcpy (p, buf, len);
 
   if (parsed_float)
@@ -5204,7 +5142,7 @@ parse_string_or_char (const char *tokptr
 		      struct typed_stoken *value, int *host_chars)
 {
   int quote;
-  enum c_string_type type;
+  c_string_type type;
   int is_objc = 0;
 
   /* Build the gdb internal form of the input string in tempbuf.  Note
@@ -5287,7 +5225,7 @@ parse_string_or_char (const char *tokptr
   ++tokptr;
 
   value->type = type;
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -5297,7 +5235,7 @@ parse_string_or_char (const char *tokptr
 
 /* This is used to associate some attributes with a token.  */
 
-enum token_flags
+enum token_flag
 {
   /* If this bit is set, the token is C++-only.  */
 
@@ -5309,13 +5247,14 @@ enum token_flags
 
   FLAG_SHADOW = 2
 };
+DEF_ENUM_FLAGS_TYPE (enum token_flag, token_flags);
 
 struct token
 {
   char *oper;
   int token;
   enum exp_opcode opcode;
-  enum token_flags flags;
+  token_flags flags;
 };
 
 static const struct token tokentab3[] =
@@ -5439,7 +5378,8 @@ scan_macro_expansion (char *expansion)
 
   /* Copy to the obstack, and then free the intermediate
      expansion.  */
-  copy = obstack_copy0 (&expansion_obstack, expansion, strlen (expansion));
+  copy = (char *) obstack_copy0 (&expansion_obstack, expansion,
+				 strlen (expansion));
   xfree (expansion);
 
   /* Save the old lexptr value, so we can return to it when we're done
@@ -5855,7 +5795,7 @@ lex_one_token (struct parser_state *par_
 			       VAR_DOMAIN,
 			       (parse_language (par_state)->la_language
 			        == language_cplus ? &is_a_field_of_this
-				: NULL))
+				: NULL)).symbol
 		!= NULL)
 	      {
 		/* The keyword is shadowed.  */
@@ -5876,7 +5816,8 @@ lex_one_token (struct parser_state *par_
     saw_name_at_eof = 1;
 
   yylval.ssym.stoken = yylval.sval;
-  yylval.ssym.sym = NULL;
+  yylval.ssym.sym.symbol = NULL;
+  yylval.ssym.sym.block = NULL;
   yylval.ssym.is_a_field_of_this = 0;
   return NAME;
 }
@@ -5911,7 +5852,7 @@ static int
 classify_name (struct parser_state *par_state, const struct block *block,
 	       int is_quoted_name)
 {
-  struct symbol *sym;
+  struct block_symbol bsym;
   char *copy;
   struct field_of_this_result is_a_field_of_this;
 
@@ -5921,17 +5862,17 @@ classify_name (struct parser_state *par_
      we can refer to it unconditionally below.  */
   memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
 
-  sym = lookup_symbol (copy, block, VAR_DOMAIN,
-		       parse_language (par_state)->la_name_of_this
-		       ? &is_a_field_of_this : NULL);
+  bsym = lookup_symbol (copy, block, VAR_DOMAIN,
+			parse_language (par_state)->la_name_of_this
+			? &is_a_field_of_this : NULL);
 
-  if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
+  if (bsym.symbol && SYMBOL_CLASS (bsym.symbol) == LOC_BLOCK)
     {
-      yylval.ssym.sym = sym;
+      yylval.ssym.sym = bsym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
       return BLOCKNAME;
     }
-  else if (!sym)
+  else if (!bsym.symbol)
     {
       /* If we found a field of 'this', we might have erroneously
 	 found a constructor where we wanted a type name.  Handle this
@@ -5944,11 +5885,11 @@ classify_name (struct parser_state *par_
 	{
 	  struct field_of_this_result inner_is_a_field_of_this;
 
-	  sym = lookup_symbol (copy, block, STRUCT_DOMAIN,
-			       &inner_is_a_field_of_this);
-	  if (sym != NULL)
+	  bsym = lookup_symbol (copy, block, STRUCT_DOMAIN,
+				&inner_is_a_field_of_this);
+	  if (bsym.symbol != NULL)
 	    {
-	      yylval.tsym.type = SYMBOL_TYPE (sym);
+	      yylval.tsym.type = SYMBOL_TYPE (bsym.symbol);
 	      return TYPENAME;
 	    }
 	}
@@ -5972,18 +5913,20 @@ classify_name (struct parser_state *par_
 	}
     }
 
-  if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+  if (bsym.symbol && SYMBOL_CLASS (bsym.symbol) == LOC_TYPEDEF)
     {
-      yylval.tsym.type = SYMBOL_TYPE (sym);
+      yylval.tsym.type = SYMBOL_TYPE (bsym.symbol);
       return TYPENAME;
     }
 
   /* See if it's an ObjC classname.  */
-  if (parse_language (par_state)->la_language == language_objc && !sym)
+  if (parse_language (par_state)->la_language == language_objc && !bsym.symbol)
     {
       CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
       if (Class)
 	{
+	  struct symbol *sym;
+
 	  yylval.theclass.theclass = Class;
 	  sym = lookup_struct_typedef (copy, expression_context_block, 1);
 	  if (sym)
@@ -5995,26 +5938,27 @@ classify_name (struct parser_state *par_
   /* Input names that aren't symbols but ARE valid hex numbers, when
      the input radix permits them, can be names or numbers depending
      on the parse.  Note we support radixes > 16 here.  */
-  if (!sym
+  if (!bsym.symbol
       && ((copy[0] >= 'a' && copy[0] < 'a' + input_radix - 10)
 	  || (copy[0] >= 'A' && copy[0] < 'A' + input_radix - 10)))
     {
       YYSTYPE newlval;	/* Its value is ignored.  */
       int hextype = parse_number (par_state, copy, yylval.sval.length,
 				  0, &newlval);
+
       if (hextype == INT)
 	{
-	  yylval.ssym.sym = sym;
+	  yylval.ssym.sym = bsym;
 	  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	  return NAME_OR_INT;
 	}
     }
 
   /* Any other kind of symbol */
-  yylval.ssym.sym = sym;
+  yylval.ssym.sym = bsym;
   yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 
-  if (sym == NULL
+  if (bsym.symbol == NULL
       && parse_language (par_state)->la_language == language_cplus
       && is_a_field_of_this.type == NULL
       && lookup_minimal_symbol (copy, NULL, NULL).minsym == NULL)
@@ -6048,7 +5992,7 @@ classify_inner_name (struct parser_state
   /* If no symbol was found, search for a matching base class named
      COPY.  This will allow users to enter qualified names of class members
      relative to the `this' pointer.  */
-  if (yylval.ssym.sym == NULL)
+  if (yylval.ssym.sym.symbol == NULL)
     {
       struct type *base_type = cp_find_type_baseclass_by_name (type, copy);
 
@@ -6061,7 +6005,7 @@ classify_inner_name (struct parser_state
       return ERROR;
     }
 
-  switch (SYMBOL_CLASS (yylval.ssym.sym))
+  switch (SYMBOL_CLASS (yylval.ssym.sym.symbol))
     {
     case LOC_BLOCK:
     case LOC_LABEL:
@@ -6080,7 +6024,7 @@ classify_inner_name (struct parser_state
       return ERROR;
 
     case LOC_TYPEDEF:
-      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym);
+      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym.symbol);
       return TYPENAME;
 
     default:
@@ -6207,7 +6151,7 @@ yylex (void)
 	  obstack_grow (&name_obstack, next->value.sval.ptr,
 			next->value.sval.length);
 
-	  yylval.sval.ptr = obstack_base (&name_obstack);
+	  yylval.sval.ptr = (const char *) obstack_base (&name_obstack);
 	  yylval.sval.length = obstack_object_size (&name_obstack);
 	  current.value = yylval;
 	  current.token = classification;
@@ -6232,9 +6176,10 @@ yylex (void)
      the FIFO, and delete the other constituent tokens.  */
   if (checkpoint > 0)
     {
-      current.value.sval.ptr = obstack_copy0 (&expansion_obstack,
-					      current.value.sval.ptr,
-					      current.value.sval.length);
+      current.value.sval.ptr
+	= (const char *) obstack_copy0 (&expansion_obstack,
+					current.value.sval.ptr,
+					current.value.sval.length);
 
       VEC_replace (token_and_value, token_fifo, 0, &current);
       if (checkpoint > 1)
@@ -6306,47 +6251,47 @@ c_print_token (FILE *file, int type, YYS
   switch (type)
     {
     case INT:
-      fprintf (file, "typed_val_int<%s, %s>",
-	       TYPE_SAFE_NAME (value.typed_val_int.type),
-	       pulongest (value.typed_val_int.val));
+      parser_fprintf (file, "typed_val_int<%s, %s>",
+		      TYPE_SAFE_NAME (value.typed_val_int.type),
+		      pulongest (value.typed_val_int.val));
       break;
 
     case CHAR:
     case STRING:
       {
-	char *copy = alloca (value.tsval.length + 1);
+	char *copy = (char *) alloca (value.tsval.length + 1);
 
 	memcpy (copy, value.tsval.ptr, value.tsval.length);
 	copy[value.tsval.length] = '\0';
 
-	fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
+	parser_fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
       }
       break;
 
     case NSSTRING:
     case VARIABLE:
-      fprintf (file, "sval<%s>", copy_name (value.sval));
+      parser_fprintf (file, "sval<%s>", copy_name (value.sval));
       break;
 
     case TYPENAME:
-      fprintf (file, "tsym<type=%s, name=%s>",
-	       TYPE_SAFE_NAME (value.tsym.type),
-	       copy_name (value.tsym.stoken));
+      parser_fprintf (file, "tsym<type=%s, name=%s>",
+		      TYPE_SAFE_NAME (value.tsym.type),
+		      copy_name (value.tsym.stoken));
       break;
 
     case NAME:
     case UNKNOWN_CPP_NAME:
     case NAME_OR_INT:
     case BLOCKNAME:
-      fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
-	       copy_name (value.ssym.stoken),
-	       (value.ssym.sym == NULL
-		? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym)),
-	       value.ssym.is_a_field_of_this);
+      parser_fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
+		       copy_name (value.ssym.stoken),
+		       (value.ssym.sym.symbol == NULL
+			? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym.symbol)),
+		       value.ssym.is_a_field_of_this);
       break;
 
     case FILENAME:
-      fprintf (file, "bval<%s>", host_address_to_string (value.bval));
+      parser_fprintf (file, "bval<%s>", host_address_to_string (value.bval));
       break;
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-exp.y ./gdb/c-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* YACC parser for C expressions, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -56,65 +56,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list. */
-
-#define	yymaxdepth c_maxdepth
-#define	yyparse	c_parse_internal
-#define	yylex	c_lex
-#define	yyerror	c_error
-#define	yylval	c_lval
-#define	yychar	c_char
-#define	yydebug	c_debug
-#define	yypact	c_pact	
-#define	yyr1	c_r1			
-#define	yyr2	c_r2			
-#define	yydef	c_def		
-#define	yychk	c_chk		
-#define	yypgo	c_pgo		
-#define	yyact	c_act		
-#define	yyexca	c_exca
-#define yyerrflag c_errflag
-#define yynerrs	c_nerrs
-#define	yyps	c_ps
-#define	yypv	c_pv
-#define	yys	c_s
-#define	yy_yys	c_yys
-#define	yystate	c_state
-#define	yytmp	c_tmp
-#define	yyv	c_v
-#define	yy_yyv	c_yyv
-#define	yyval	c_val
-#define	yylloc	c_lloc
-#define yyreds	c_reds		/* With YYDEBUG defined */
-#define yytoks	c_toks		/* With YYDEBUG defined */
-#define yyname	c_name		/* With YYDEBUG defined */
-#define yyrule	c_rule		/* With YYDEBUG defined */
-#define yylhs	c_yylhs
-#define yylen	c_yylen
-#define yydefred c_yydefred
-#define yydgoto	c_yydgoto
-#define yysindex c_yysindex
-#define yyrindex c_yyrindex
-#define yygindex c_yygindex
-#define yytable	 c_yytable
-#define yycheck	 c_yycheck
-#define yyss	c_yyss
-#define yysslim	c_yysslim
-#define yyssp	c_yyssp
-#define yystacksize c_yystacksize
-#define yyvs	c_yyvs
-#define yyvsp	c_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX c_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -793,7 +738,7 @@ exp	:	SIZEOF '(' type ')'	%prec UNARY
 					      (parse_language (pstate),
 					       parse_gdbarch (pstate),
 					       "int"));
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 
 			    /* $5.3.3/2 of the C++ Standard (n3290 draft)
 			       says of sizeof:  "When applied to a reference
@@ -839,7 +784,7 @@ string_exp:
 
 			  vec->type = $1.type;
 			  vec->length = $1.length;
-			  vec->ptr = malloc ($1.length + 1);
+			  vec->ptr = (char *) malloc ($1.length + 1);
 			  memcpy (vec->ptr, $1.ptr, $1.length + 1);
 			}
 
@@ -849,10 +794,10 @@ string_exp:
 			     for convenience.  */
 			  char *p;
 			  ++$$.len;
-			  $$.tokens = realloc ($$.tokens,
-					       $$.len * sizeof (struct typed_stoken));
+			  $$.tokens = XRESIZEVEC (struct typed_stoken,
+						  $$.tokens, $$.len);
 
-			  p = malloc ($2.length + 1);
+			  p = (char *) malloc ($2.length + 1);
 			  memcpy (p, $2.ptr, $2.length + 1);
 
 			  $$.tokens[$$.len - 1].type = $2.type;
@@ -864,7 +809,7 @@ string_exp:
 exp	:	string_exp
 			{
 			  int i;
-			  enum c_string_type type = C_STRING;
+			  c_string_type type = C_STRING;
 
 			  for (i = 0; i < $1.len; ++i)
 			    {
@@ -878,7 +823,7 @@ exp	:	string_exp
 				  if (type != C_STRING
 				      && type != $1.tokens[i].type)
 				    error (_("Undefined string concatenation."));
-				  type = $1.tokens[i].type;
+				  type = (enum c_string_type_values) $1.tokens[i].type;
 				  break;
 				default:
 				  /* internal error */
@@ -923,8 +868,8 @@ exp     :       FALSEKEYWORD
 
 block	:	BLOCKNAME
 			{
-			  if ($1.sym)
-			    $$ = SYMBOL_BLOCK_VALUE ($1.sym);
+			  if ($1.sym.symbol)
+			    $$ = SYMBOL_BLOCK_VALUE ($1.sym.symbol);
 			  else
 			    error (_("No file or function \"%s\"."),
 				   copy_name ($1.stoken));
@@ -938,7 +883,8 @@ block	:	BLOCKNAME
 block	:	block COLONCOLON name
 			{ struct symbol *tem
 			    = lookup_symbol (copy_name ($3), $1,
-					     VAR_DOMAIN, NULL);
+					     VAR_DOMAIN, NULL).symbol;
+
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ($3));
@@ -946,7 +892,7 @@ block	:	block COLONCOLON name
 	;
 
 variable:	name_not_typename ENTRY
-			{ struct symbol *sym = $1.sym;
+			{ struct symbol *sym = $1.sym.symbol;
 
 			  if (sym == NULL || !SYMBOL_IS_ARGUMENT (sym)
 			      || !symbol_read_needs_frame (sym))
@@ -961,31 +907,31 @@ variable:	name_not_typename ENTRY
 	;
 
 variable:	block COLONCOLON name
-			{ struct symbol *sym;
-			  sym = lookup_symbol (copy_name ($3), $1,
-					       VAR_DOMAIN, NULL);
-			  if (sym == 0)
+			{ struct block_symbol sym
+			    = lookup_symbol (copy_name ($3), $1,
+					     VAR_DOMAIN, NULL);
+
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ($3));
-			  if (symbol_read_needs_frame (sym))
+			  if (symbol_read_needs_frame (sym.symbol))
 			    {
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			    }
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
 	;
 
 qualified_name:	TYPENAME COLONCOLON name
 			{
 			  struct type *type = $1.type;
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 			  if (!type_aggregate_p (type))
 			    error (_("`%s' is not defined as an aggregate type."),
 				   TYPE_SAFE_NAME (type));
@@ -1001,11 +947,11 @@ qualified_name:	TYPENAME COLONCOLON name
 			  struct stoken tmp_token;
 			  char *buf;
 
-			  CHECK_TYPEDEF (type);
+			  type = check_typedef (type);
 			  if (!type_aggregate_p (type))
 			    error (_("`%s' is not defined as an aggregate type."),
 				   TYPE_SAFE_NAME (type));
-			  buf = alloca ($4.length + 2);
+			  buf = (char *) alloca ($4.length + 2);
 			  tmp_token.ptr = buf;
 			  tmp_token.length = $4.length + 1;
 			  buf[0] = '~';
@@ -1035,9 +981,9 @@ variable:	qualified_name
 			  struct symbol *sym;
 			  struct bound_minimal_symbol msymbol;
 
-			  sym =
-			    lookup_symbol (name, (const struct block *) NULL,
-					   VAR_DOMAIN, NULL);
+			  sym
+			    = lookup_symbol (name, (const struct block *) NULL,
+					     VAR_DOMAIN, NULL).symbol;
 			  if (sym)
 			    {
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
@@ -1058,24 +1004,21 @@ variable:	qualified_name
 	;
 
 variable:	name_not_typename
-			{ struct symbol *sym = $1.sym;
+			{ struct block_symbol sym = $1.sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else if ($1.is_a_field_of_this)
@@ -1084,9 +1027,9 @@ variable:	name_not_typename
 			         not inadvertently convert from a method call
 				 to data ref.  */
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
@@ -1612,16 +1555,11 @@ oper:	OPERATOR NEW
 	|	OPERATOR OBJC_LBRAC ']'
 			{ $$ = operator_stoken ("[]"); }
 	|	OPERATOR conversion_type_id
-			{ char *name;
-			  long length;
-			  struct ui_file *buf = mem_fileopen ();
+			{ string_file buf;
 
-			  c_print_type ($2, NULL, buf, -1, 0,
+			  c_print_type ($2, NULL, &buf, -1, 0,
 					&type_print_raw_options);
-			  name = ui_file_xstrdup (buf, &length);
-			  ui_file_delete (buf);
-			  $$ = operator_stoken (name);
-			  free (name);
+			  $$ = operator_stoken (buf.c_str ());
 			}
 	;
 
@@ -1666,7 +1604,7 @@ name_not_typename :	NAME
 static void
 write_destructor_name (struct parser_state *par_state, struct stoken token)
 {
-  char *copy = alloca (token.length + 1);
+  char *copy = (char *) alloca (token.length + 1);
 
   copy[0] = '~';
   memcpy (&copy[1], token.ptr, token.length);
@@ -1688,7 +1626,7 @@ operator_stoken (const char *op)
   char *buf;
 
   st.length = strlen (operator_string) + strlen (op);
-  buf = malloc (st.length + 1);
+  buf = (char *) malloc (st.length + 1);
   strcpy (buf, operator_string);
   strcat (buf, op);
   st.ptr = buf;
@@ -1773,7 +1711,7 @@ parse_number (struct parser_state *par_s
   struct type *unsigned_type;
   char *p;
 
-  p = alloca (len);
+  p = (char *) alloca (len);
   memcpy (p, buf, len);
 
   if (parsed_float)
@@ -2166,7 +2104,7 @@ parse_string_or_char (const char *tokptr
 		      struct typed_stoken *value, int *host_chars)
 {
   int quote;
-  enum c_string_type type;
+  c_string_type type;
   int is_objc = 0;
 
   /* Build the gdb internal form of the input string in tempbuf.  Note
@@ -2249,7 +2187,7 @@ parse_string_or_char (const char *tokptr
   ++tokptr;
 
   value->type = type;
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -2259,7 +2197,7 @@ parse_string_or_char (const char *tokptr
 
 /* This is used to associate some attributes with a token.  */
 
-enum token_flags
+enum token_flag
 {
   /* If this bit is set, the token is C++-only.  */
 
@@ -2271,13 +2209,14 @@ enum token_flags
 
   FLAG_SHADOW = 2
 };
+DEF_ENUM_FLAGS_TYPE (enum token_flag, token_flags);
 
 struct token
 {
   char *oper;
   int token;
   enum exp_opcode opcode;
-  enum token_flags flags;
+  token_flags flags;
 };
 
 static const struct token tokentab3[] =
@@ -2401,7 +2340,8 @@ scan_macro_expansion (char *expansion)
 
   /* Copy to the obstack, and then free the intermediate
      expansion.  */
-  copy = obstack_copy0 (&expansion_obstack, expansion, strlen (expansion));
+  copy = (char *) obstack_copy0 (&expansion_obstack, expansion,
+				 strlen (expansion));
   xfree (expansion);
 
   /* Save the old lexptr value, so we can return to it when we're done
@@ -2817,7 +2757,7 @@ lex_one_token (struct parser_state *par_
 			       VAR_DOMAIN,
 			       (parse_language (par_state)->la_language
 			        == language_cplus ? &is_a_field_of_this
-				: NULL))
+				: NULL)).symbol
 		!= NULL)
 	      {
 		/* The keyword is shadowed.  */
@@ -2838,7 +2778,8 @@ lex_one_token (struct parser_state *par_
     saw_name_at_eof = 1;
 
   yylval.ssym.stoken = yylval.sval;
-  yylval.ssym.sym = NULL;
+  yylval.ssym.sym.symbol = NULL;
+  yylval.ssym.sym.block = NULL;
   yylval.ssym.is_a_field_of_this = 0;
   return NAME;
 }
@@ -2873,7 +2814,7 @@ static int
 classify_name (struct parser_state *par_state, const struct block *block,
 	       int is_quoted_name)
 {
-  struct symbol *sym;
+  struct block_symbol bsym;
   char *copy;
   struct field_of_this_result is_a_field_of_this;
 
@@ -2883,17 +2824,17 @@ classify_name (struct parser_state *par_
      we can refer to it unconditionally below.  */
   memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
 
-  sym = lookup_symbol (copy, block, VAR_DOMAIN,
-		       parse_language (par_state)->la_name_of_this
-		       ? &is_a_field_of_this : NULL);
+  bsym = lookup_symbol (copy, block, VAR_DOMAIN,
+			parse_language (par_state)->la_name_of_this
+			? &is_a_field_of_this : NULL);
 
-  if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
+  if (bsym.symbol && SYMBOL_CLASS (bsym.symbol) == LOC_BLOCK)
     {
-      yylval.ssym.sym = sym;
+      yylval.ssym.sym = bsym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
       return BLOCKNAME;
     }
-  else if (!sym)
+  else if (!bsym.symbol)
     {
       /* If we found a field of 'this', we might have erroneously
 	 found a constructor where we wanted a type name.  Handle this
@@ -2906,11 +2847,11 @@ classify_name (struct parser_state *par_
 	{
 	  struct field_of_this_result inner_is_a_field_of_this;
 
-	  sym = lookup_symbol (copy, block, STRUCT_DOMAIN,
-			       &inner_is_a_field_of_this);
-	  if (sym != NULL)
+	  bsym = lookup_symbol (copy, block, STRUCT_DOMAIN,
+				&inner_is_a_field_of_this);
+	  if (bsym.symbol != NULL)
 	    {
-	      yylval.tsym.type = SYMBOL_TYPE (sym);
+	      yylval.tsym.type = SYMBOL_TYPE (bsym.symbol);
 	      return TYPENAME;
 	    }
 	}
@@ -2934,18 +2875,20 @@ classify_name (struct parser_state *par_
 	}
     }
 
-  if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+  if (bsym.symbol && SYMBOL_CLASS (bsym.symbol) == LOC_TYPEDEF)
     {
-      yylval.tsym.type = SYMBOL_TYPE (sym);
+      yylval.tsym.type = SYMBOL_TYPE (bsym.symbol);
       return TYPENAME;
     }
 
   /* See if it's an ObjC classname.  */
-  if (parse_language (par_state)->la_language == language_objc && !sym)
+  if (parse_language (par_state)->la_language == language_objc && !bsym.symbol)
     {
       CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
       if (Class)
 	{
+	  struct symbol *sym;
+
 	  yylval.theclass.theclass = Class;
 	  sym = lookup_struct_typedef (copy, expression_context_block, 1);
 	  if (sym)
@@ -2957,26 +2900,27 @@ classify_name (struct parser_state *par_
   /* Input names that aren't symbols but ARE valid hex numbers, when
      the input radix permits them, can be names or numbers depending
      on the parse.  Note we support radixes > 16 here.  */
-  if (!sym
+  if (!bsym.symbol
       && ((copy[0] >= 'a' && copy[0] < 'a' + input_radix - 10)
 	  || (copy[0] >= 'A' && copy[0] < 'A' + input_radix - 10)))
     {
       YYSTYPE newlval;	/* Its value is ignored.  */
       int hextype = parse_number (par_state, copy, yylval.sval.length,
 				  0, &newlval);
+
       if (hextype == INT)
 	{
-	  yylval.ssym.sym = sym;
+	  yylval.ssym.sym = bsym;
 	  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	  return NAME_OR_INT;
 	}
     }
 
   /* Any other kind of symbol */
-  yylval.ssym.sym = sym;
+  yylval.ssym.sym = bsym;
   yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 
-  if (sym == NULL
+  if (bsym.symbol == NULL
       && parse_language (par_state)->la_language == language_cplus
       && is_a_field_of_this.type == NULL
       && lookup_minimal_symbol (copy, NULL, NULL).minsym == NULL)
@@ -3010,7 +2954,7 @@ classify_inner_name (struct parser_state
   /* If no symbol was found, search for a matching base class named
      COPY.  This will allow users to enter qualified names of class members
      relative to the `this' pointer.  */
-  if (yylval.ssym.sym == NULL)
+  if (yylval.ssym.sym.symbol == NULL)
     {
       struct type *base_type = cp_find_type_baseclass_by_name (type, copy);
 
@@ -3023,7 +2967,7 @@ classify_inner_name (struct parser_state
       return ERROR;
     }
 
-  switch (SYMBOL_CLASS (yylval.ssym.sym))
+  switch (SYMBOL_CLASS (yylval.ssym.sym.symbol))
     {
     case LOC_BLOCK:
     case LOC_LABEL:
@@ -3042,7 +2986,7 @@ classify_inner_name (struct parser_state
       return ERROR;
 
     case LOC_TYPEDEF:
-      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym);
+      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym.symbol);
       return TYPENAME;
 
     default:
@@ -3169,7 +3113,7 @@ yylex (void)
 	  obstack_grow (&name_obstack, next->value.sval.ptr,
 			next->value.sval.length);
 
-	  yylval.sval.ptr = obstack_base (&name_obstack);
+	  yylval.sval.ptr = (const char *) obstack_base (&name_obstack);
 	  yylval.sval.length = obstack_object_size (&name_obstack);
 	  current.value = yylval;
 	  current.token = classification;
@@ -3194,9 +3138,10 @@ yylex (void)
      the FIFO, and delete the other constituent tokens.  */
   if (checkpoint > 0)
     {
-      current.value.sval.ptr = obstack_copy0 (&expansion_obstack,
-					      current.value.sval.ptr,
-					      current.value.sval.length);
+      current.value.sval.ptr
+	= (const char *) obstack_copy0 (&expansion_obstack,
+					current.value.sval.ptr,
+					current.value.sval.length);
 
       VEC_replace (token_and_value, token_fifo, 0, &current);
       if (checkpoint > 1)
@@ -3268,47 +3213,47 @@ c_print_token (FILE *file, int type, YYS
   switch (type)
     {
     case INT:
-      fprintf (file, "typed_val_int<%s, %s>",
-	       TYPE_SAFE_NAME (value.typed_val_int.type),
-	       pulongest (value.typed_val_int.val));
+      parser_fprintf (file, "typed_val_int<%s, %s>",
+		      TYPE_SAFE_NAME (value.typed_val_int.type),
+		      pulongest (value.typed_val_int.val));
       break;
 
     case CHAR:
     case STRING:
       {
-	char *copy = alloca (value.tsval.length + 1);
+	char *copy = (char *) alloca (value.tsval.length + 1);
 
 	memcpy (copy, value.tsval.ptr, value.tsval.length);
 	copy[value.tsval.length] = '\0';
 
-	fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
+	parser_fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
       }
       break;
 
     case NSSTRING:
     case VARIABLE:
-      fprintf (file, "sval<%s>", copy_name (value.sval));
+      parser_fprintf (file, "sval<%s>", copy_name (value.sval));
       break;
 
     case TYPENAME:
-      fprintf (file, "tsym<type=%s, name=%s>",
-	       TYPE_SAFE_NAME (value.tsym.type),
-	       copy_name (value.tsym.stoken));
+      parser_fprintf (file, "tsym<type=%s, name=%s>",
+		      TYPE_SAFE_NAME (value.tsym.type),
+		      copy_name (value.tsym.stoken));
       break;
 
     case NAME:
     case UNKNOWN_CPP_NAME:
     case NAME_OR_INT:
     case BLOCKNAME:
-      fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
-	       copy_name (value.ssym.stoken),
-	       (value.ssym.sym == NULL
-		? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym)),
-	       value.ssym.is_a_field_of_this);
+      parser_fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
+		       copy_name (value.ssym.stoken),
+		       (value.ssym.sym.symbol == NULL
+			? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym.symbol)),
+		       value.ssym.is_a_field_of_this);
       break;
 
     case FILENAME:
-      fprintf (file, "bval<%s>", host_address_to_string (value.bval));
+      parser_fprintf (file, "bval<%s>", host_address_to_string (value.bval));
       break;
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog ./gdb/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ChangeLog	2017-03-06 01:49:07.000000000 +0000
@@ -1,6211 +1,2133 @@
-2015-07-02  Kevin Buettner  <kevinb@redhat.com>
+2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
 
-	* rx-tdep.c (RX_USP_REGNUM, RX_BPC_REGNUM): New constants.
-	(enum rx_frame_type): New.
-	(struct rx_prologue): Add new field `frame_type'.
-	(rx_analyze_prologue): Add `frame_type' parameter. Cache this
-	parameter in the prologue struct.  Add code for recording
-	locations of PC and PSW for fast interrupt and exception frames.
-	(rx_skip_prologue): Adjust call to rx_analyze_prologue.
-	(rx_analyze_frame_prologue): Add `frame_type' parameter.
-	(rx_frame_type): New function.
-	(rx_frame_base): Fetch frame type and pass it to rx_analyze_prologue.
-	(rx_frame_this_id): Rename parameter `this_prologue_cache' to
-	`this_cache'.
-	(rx_frame_prev_register): Rename parameter `this_prologue_cache' to
-	`this_cache'.  Add cases for RX_FRAME_TYPE_EXCEPTION and 
-	RX_FRAME_TYPE_FAST_INTERRUPT.
-	(normal_frame_p, exception_frame_p, rx_frame_sniffer_common)
-	(rx_frame_sniffer, rx_exception_sniffer): New functions.
-	(rx_frame_unwind): Use rx_frame_sniffer instead of
-	default_frame_sniffer.
-	(rx_frame_unwind): New unwinder.
-	(rx_gdbarch_init): Register new unwinder.
-
-2015-07-02  Kevin Buettner  <kevinb@redhat.com>
-
-	* rx-tdep.c (RX_BPSW_REGNUM, RX_FPSW_REGNUM): New constants.
-	(struct gdbarch_tdep): Add fields rx_psw_type and rx_fpsw_type.
-	(rx_register_type): Add cases for RX_PSW_REGNUM, RX_BPSW_REGNUM,
-	and RX_FPSW_REGNUM.
-	(rx_gdbarch_init): Initialize PSW, BPSW, and FPSW flags types.
-
-2015-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix GCC false warning.
-	* s390-linux-tdep.c (s390_handle_arg): Initialize VAL.
-
-2015-07-02  Yao Qi  <yao.qi@linaro.org>
-
-	* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Fix
-	typo in the debugging message.
-
-2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c: Include gdbcmd.h, cli/cli-utils.h, and ctype.h.
-	(maint_btrace_cmdlist, maint_btrace_set_cmdlist)
-	(maint_btrace_show_cmdlist, maint_btrace_pt_set_cmdlist)
-	(maint_btrace_pt_show_cmdlist, maint_btrace_pt_skip_pad)
-	(btrace_maint_clear): New.
-	(btrace_fetch, btrace_clear): Call btrace_maint_clear.
-	(pt_print_packet, btrace_maint_decode_pt)
-	(btrace_maint_update_pt_packets, btrace_maint_update_packets)
-	(btrace_maint_print_packets, get_uint, get_context_size, no_chunk)
-	(maint_btrace_packet_history_cmd)
-	(maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
-	(maint_btrace_cmd, maint_btrace_set_cmd, maint_btrace_show_cmd)
-	(maint_btrace_pt_set_cmd, maint_btrace_pt_show_cmd)
-	(maint_info_btrace_cmd, _initialize_btrace): New.
-	* btrace.h (btrace_pt_packet, btrace_pt_packet_s)
-	(btrace_maint_packet_history, btrace_maint_info): New.
-	(btrace_thread_info) <maint>: New.
-	* NEWS: Announce it.
-
-2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (btrace_fetch): Append the new trace data.
-	(btrace_clear): Clear the stored trace data.
-	* btrace.h (btrace_thread_info) <data>: New.
-	* common/btrace-common.h (btrace_data_clear)
-	(btrace_data_append): New.
-	* common/btrace-common.c (btrace_data_clear)
-	(btrace_data_append): New.
-
-2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* nat/linux-btrace.c (linux_enable_bts): Check for
-	PERF_ATTR_SIZE_VER5.
-	Check for data_offset and data_size fields.  Use them.
-
-2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* NEWS: Announce new commands "record btrace pt" and "record pt".
-	Announce new options "set|show record btrace pt buffer-size".
-	* btrace.c: Include "rsp-low.h".
-	Include "inttypes.h".
-	(btrace_add_pc): Add forward declaration.
-	(pt_reclassify_insn, ftrace_add_pt, btrace_pt_readmem_callback)
-	(pt_translate_cpu_vendor, btrace_finalize_ftrace_pt)
-	(btrace_compute_ftrace_pt): New.
-	(btrace_compute_ftrace): Support BTRACE_FORMAT_PT.
-	(check_xml_btrace_version): Update version check.
-	(parse_xml_raw, parse_xml_btrace_pt_config_cpu)
-	(parse_xml_btrace_pt_raw, parse_xml_btrace_pt)
-	(btrace_pt_config_cpu_attributes, btrace_pt_config_children)
-	(btrace_pt_children): New.
-	(btrace_children): Add support for "pt".
-	(parse_xml_btrace_conf_pt, btrace_conf_pt_attributes): New.
-	(btrace_conf_children): Add support for "pt".
-	* btrace.h: Include "intel-pt.h".
-	(btrace_pt_error): New.
-	* common/btrace-common.c (btrace_format_string, btrace_data_fini)
-	(btrace_data_empty): Support BTRACE_FORMAT_PT.
-	* common/btrace-common.h (btrace_format): Add BTRACE_FORMAT_PT.
-	(struct btrace_config_pt): New.
-	(struct btrace_config)<pt>: New.
-	(struct btrace_data_pt_config, struct btrace_data_pt): New.
-	(struct btrace_data)<pt>: New.
-	* features/btrace-conf.dtd (btrace-conf)<pt>: New.
-	(pt): New.
-	* features/btrace.dtd (btrace)<pt>: New.
-	(pt, pt-config, cpu): New.
-	* nat/linux-btrace.c (perf_event_read, perf_event_read_all)
-	(perf_event_pt_event_type, kernel_supports_pt)
-	(linux_supports_pt): New.
-	(linux_supports_btrace): Support BTRACE_FORMAT_PT.
-	(linux_enable_bts): Free tinfo on error.
-	(linux_enable_pt): New.
-	(linux_enable_btrace): Support BTRACE_FORMAT_PT.
-	(linux_disable_pt): New.
-	(linux_disable_btrace): Support BTRACE_FORMAT_PT.
-	(linux_fill_btrace_pt_config, linux_read_pt): New.
-	(linux_read_btrace): Support BTRACE_FORMAT_PT.
-	* nat/linux-btrace.h (struct btrace_tinfo_pt): New.
-	(struct btrace_target_info)<pt>: New.
-	* record-btrace.c (set_record_btrace_pt_cmdlist)
-	(show_record_btrace_pt_cmdlist): New.
-	(record_btrace_print_pt_conf): New.
-	(record_btrace_print_conf): Support BTRACE_FORMAT_PT.
-	(btrace_ui_out_decode_error): Support BTRACE_FORMAT_PT.
-	(cmd_record_btrace_pt_start): New.
-	(cmd_record_btrace_start): Support BTRACE_FORMAT_PT.
-	(cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): New.
-	(_initialize_record_btrace): Add new commands.
-	* remote.c (PACKET_Qbtrace_pt, PACKET_Qbtrace_conf_pt_size): New.
-	(remote_protocol_features): Add "Qbtrace:pt".
-	Add "Qbtrace-conf:pt:size".
-	(remote_supports_btrace): Support BTRACE_FORMAT_PT.
-	(btrace_sync_conf): Support PACKET_Qbtrace_conf_pt_size.
-	(remote_enable_btrace): Support BTRACE_FORMAT_PT.
-	(_initialize_remote): Add new commands.
+	* remote.c (remote_add_target_side_commands): Use range-based
+	for loop.
 
-2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+2017-03-03  Yao Qi  <yao.qi@linaro.org>
 
-	* configure.ac: check for libipt
-	* configure: Regenerate.
-	* config.in: Regenerate.
-	* Makefile.in (LIBIPT): New.
-	(CLIBS): Add $LIBIPT.
-	* NEWS: document new configure options
-
-2015-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (compile_object_load): Replace debug
-	message "lookup undefined ELF symbol" by 3 more specific messages.
-
-2015-07-01  Kevin Buettner  <kevinb@redhat.com>
-
-	* rl78-tdep.c (struct gdbarch_tdep): Add new field, rl78_psw_type.
-	(rl78_register_type): Add case for RL78_PSW_REGNUM.
-	(rl78_gdbarch_init): Initialize rl78_psw_type.
-
-2015-07-01  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
-	Update commentary.  Always refresh the registers when frame
-	information has changed.
-	* tui/tui-stack.c (tui_show_frame_info): Update commentary.
-	Change return type to int.  Return 1 if frame information has
-	changed, 0 otherwise.
-	(tui_before_prompt): Update commentary.
-	* tui/tui-stack.h (tui_show_frame_info): Change return type to
-	int.
-
-2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
-
-	PR tui/13378
-	* frame.c (select_frame): Remove reference to
-	deprecated_selected_frame_level_changed_hook.
-	* frame.h (deprecated_selected_frame_level_changed_hook): Remove
-	declaration.
-	* stack.c (deprecated_selected_frame_level_changed_hook):
-	Likewise.
-	* tui/tui-hooks.c (tui_selected_frame_level_changed_hook):
-	Rename to ...
-	(tui_refresh_frame_and_register_information): ... this.  Bail
-	out if there is no stack.  Don't update register information
-	unless registers_too_p is true.
-	(tui_print_frame_info_listing_hook): Rename to ...
-	(tui_dummy_print_frame_info_listing_hook): ... this.
-	(tui_before_prompt): New function.
-	(tui_normal_stop): New function.
-	(tui_before_prompt_observer): New observer.
-	(tui_normal_stop_observer): New observer.
-	(tui_install_hooks): Set
-	deprecated_print_frame_info_listing_hook to
-	tui_dummy_print_frame_info_listing_hook.  Register
-	tui_before_prompt_observer to call tui_before_prompt and
-	tui_normal_stop_observer to call tui_normal_stop.  Remove
-	reference to deprecated_selected_frame_level_changed_hook.
-	(tui_remove_hooks): Detach and unset tui_before_prompt_observer
-	and tui_normal_stop_observer.  Remove reference to
-	deprecated_selected_frame_level_changed_hook.
-
-2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
-
-	PR tui/13378
-	* tui/tui-stack.c (tui_set_locator_info): Change prototype to
-	return an int instead of void.  Return whether the locator
-	window has changed.
-	(tui_show_frame_info): If the locator info has not changed, then
-	bail out early to avoid refreshing the windows.
-
-2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-stack.c (tui_set_locator_info): Explicitly pass
-	LOCATOR_WIN to tui_alloc_content.
-
-2015-06-30  Yao Qi  <yao.qi@linaro.org>
-
-	PR tdep/18605
-	* arm-tdep.c (arm_get_next_pc_raw): Break for media
-	instructions.
-
-2015-06-29  Kevin Buettner  <kevinb@redhat.com>
-
-	* rx-tdep.c (RX_PSW_REGNUM): New enum constant.
-	(rx_dwarf_reg_to_regnum): New function.
-	(rx_gdbarch_init): Register rx_dwarf_reg_to_regnum.  Use dwarf2
-	unwinding.
-
-2015-06-29  Pedro Alves  <palves@redhat.com>
-
-	PR threads/18127
-	* infcall.c (run_inferior_call): On infcall success, if the thread
-	was marked stopped before, reset it back to stopped.
-	* infrun.c (resume): Don't suppress the set_running calls when
-	doing an infcall.
-	(normal_stop): Only discard the finish_thread_state cleanup if the
-	infcall succeeded.
-
-2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
-
-	* MAINTAINERS (Write After Approval): Update my email address.
-
-2015-06-26  Keith Seitz  <keiths@redhat.com>
-	    Doug Evans  <dje@google.com>
-
-	PR 16253
-	* block.c (block_lookup_symbol): For non-function blocks,
-	continue to search for a symbol with an exact domain match
-	Otherwise, return any previously found "best domain" symbol.
-	(block_lookup_symbol_primary): Likewise.
-
-2015-06-26  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* NEWS: Mention the new option "history remove-duplicates".
-	* top.c (history_remove_duplicates): New static variable.
-	(show_history_remove_duplicates): New static function.
-	(gdb_add_history): Conditionally remove duplicate history
-	entries.
-	(init_main): Add "history remove-duplicates" option.
-
-2015-06-26  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-win.c (focus_completer): New static function.
-	(_initialize_tui_win): Set the completion function of the
-	"focus" command to focus_completer.
-
-2015-06-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID
-	and language_asm..
-	* symtab.c (find_function_start_sal): Likewise.
-
-2015-06-25  Gary Benson  <gbenson@redhat.com>
-
-	* solib.c (solib_find_1): Set local variable sysroot to NULL if
-	it is the empty string after trailing slashes have been stripped.
-
-2015-06-25  Gary Benson  <gbenson@redhat.com>
-
-	* exec.c (exec_file_locate_attach): Remove gdb_sysroot NULL check.
-	* infrun.c (follow_exec): Likewise.
-	* remote.c (remote_filesystem_is_local): Likewise.
-	* solib.c (solib_find_1): Likewise.
-
-2015-06-24  Keith Seitz  <keiths@redhat.com>
-
-	* build-id.c (build_id_to_debug_bfd): Add cleanup to free
-	return value from lrealpath.
-
-2015-06-24  Mike Frysinger  <vapier@gentoo.org>
-
-	* remote-sim.c (gdbsim_open): Move sysroot update to the top.
-
-2015-06-24  Mike Frysinger  <vapier@gentoo.org>
-
-	* remote-sim.c: Include gdb_bfd.h.
-	(gdbsim_open): Declare new local sysroot pointing to gdb_sysroot.
-	Skip TARGET_SYSROOT_PREFIX in gdb_sysroot when it is active.
-
-2015-06-24  Yao Qi  <yao.qi@linaro.org>
-
-	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't call
-	set_gdbarch_get_siginfo_type.
-	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
-	* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
-	* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
-	* m68klinux-tdep.c (m68k_linux_init_abi): Likewise.
-	* ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
-	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
-	* tilegx-linux-tdep.c (tilegx_linux_init_abi): Likewise.
-	* linux-tdep.c (linux_get_siginfo_type): Change it to static.
-	(linux_init_abi): Call set_gdbarch_get_siginfo_type.
-	* linux-tdep.h (linux_get_siginfo_type): Remove the declaration.
-
-2015-06-24  Gary Benson  <gbenson@redhat.com>
-
-	* common/buffer.c (stdint.h): Do not include.
-	* common/print-utils.c (stdint.h): Likewise.
-	* compile/compile-c-symbols.c (gdb_assert.h): Likewise.
-	* compile/compile-c-types.c (gdb_assert.h): Likewise.
-	* ft32-tdep.c (gdb_assert.h): Likewise.
-	* guile/scm-utils.c (stdint.h): Likewise.
-	* i386-linux-tdep.c (stdint.h): Likewise.
-	* i386-tdep.c (stdint.h): Likewise.
-	* nat/linux-btrace.c (stdint.h): Likewise.
-	* nat/linux-btrace.h (stdint.h): Likewise.
-	* nat/linux-ptrace.c (stdint.h): Likewise.
-	* nat/mips-linux-watch.h (stdint.h): Likewise.
-	* ppc-linux-nat.c (stdint.h): Likewise.
-	* python/python-internal.h (stdint.h): Likewise.
-	* stub-termcap.c (stdlib.h): Likewise.
-	* target/target.h (stdint.h): Likewise.
-	* xtensa-linux-nat.c (stdint.h): Likewise.
-
-2015-06-23  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* top.c (init_history): Look at errno after calling strtol to
-	properly map large GDBHISTSIZE values to infinity.
-
-2015-06-23  Doug Evans  <dje@google.com>
-
-	* inferior.h (struct inferior_suspend_state): Delete, unused.
-	All references deleted.
-
-2015-06-23  Mike Frysinger  <vapier@gentoo.org>
-
-	* microblaze-tdep.c (microblaze_push_dummy_code): Delete.
-	(microblaze_push_dummy_call): Likewise.
-	(microblaze_gdbarch_init): Delete calls to set_gdbarch_push_dummy_code
-	and set_gdbarch_push_dummy_call.
-
-2015-06-23  Yao Qi  <yao.qi@linaro.org>
-
-	* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
-	Check whether have_ptrace_getregset is TRIBOOL_TRUE explicitly.
-	(amd64_linux_store_inferior_registers): Likewise.
-	* arm-linux-nat.c (fetch_fpregister): Likewise.
-	(fetch_fpregs, store_fpregister): Likewise.
-	(store_fpregister, store_fpregs): Likewise.
-	(fetch_register, fetch_regs): Likewise.
-	(store_register, store_regs): Likewise.
-	(fetch_vfp_regs, store_vfp_regs): Likewise.
-	(arm_linux_read_description): Check have_ptrace_getregset is
-	TRIBOOL_UNKNOWN.  Set have_ptrace_getregset to TRIBOOL_TRUE
-	or TRIBOOL_FALSE.
-	* i386-linux-nat.c (fetch_xstateregs): Check
-	have_ptrace_getregset is not TRIBOOL_TRUE.
-	(store_xstateregs): Likewise.
-	* linux-nat.c (have_ptrace_getregset): Change its type to
-	enum tribool.
-	* linux-nat.h (tribool): New enum.
-	* x86-linux-nat.c (x86_linux_read_description): Use enum tribool.
-	Check whether have_ptrace_getregset is TRIBOOL_TRUE.
-
-2015-06-19  Doug Evans  <dje@google.com>
-
-	* NEWS: Mention Sun's version of stabs is no longer supported.
-	* elfread.c (free_elfinfo): Delete.  All uses updated.
-	(elfstab_offset_sections): Delete.  All uses updated.
-	* gdb-stabs.h (stab_section_info): Delete.  All uses updated.
-	* psympriv.h (partial_symtab) <section_offsets>: Delete.
-	All uses updated.
-	* psymtab.c (start_psymtab_common): Delete arg section_offsets.
-	All callers updated.
-
-2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* common/rsp-low.c (needs_escaping): New.
-	(remote_escape_output): Add unit_size parameter. Refactor to
-	support multi-byte addressable units.  Rename parameters.
-	* common/rsp-low.h (remote_escape_output): Add unit_size
-	parameter and rename others. Update doc.
-	* remote.c (align_for_efficient_write): New.
-	(remote_write_bytes_aux): Add unit_size parameter and use it.
-	Rename some variables.  Update doc.
-	(remote_xfer_partial): Get unit size and use it.
-	(remote_read_bytes_1): Add unit_size parameter and use it.
-	Rename some variables. Update doc.
-	(remote_write_bytes): Same.
-	(remote_xfer_live_readonly_partial): Same.
-	(remote_read_bytes): Same.
-	(remote_flash_write): Update call to remote_write_bytes_aux.
-	(remote_write_qxfer): Update call to remote_escape_output.
-	(remote_search_memory): Same.
-	(remote_hostio_pwrite): Same.
-
-2015-06-17  Luis Machado  <lgustavo@codesourcery.com>
-
-	* breakpoint.c (add_location_to_breakpoint): Don't mark permanent
-	locations as inserted.
-	Update and expand comment about permanent locations.
-	(bp_loc_is_permanent): Don't return 0 for bp_call_dummy.
-	Move comment to add_location_to_breakpoint.
-	(update_global_location_list): Don't error out if a permanent
-	breakpoint is not marked inserted.
-	Don't error out if a non-permanent breakpoint location is inserted on
-	top of a permanent breakpoint.
-
-2015-06-17  Luis Machado  <lgustavo@codesourcery.com>
-
-	* breakpoint.c (make_breakpoint_permanent): Remove unused
-	function.
-	* breakpoint.h (make_breakpoint_permanent): Remove declaration.
-
-2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
-
-	PR gdb/16999
-	* NEWS: Mention new GDBHISTSIZE behavior.
-	* top.c (init_history): For null or out-of-range GDBHISTSIZE,
-	set history size to unlimited.  Ignore non-numeric GDBHISTSIZE.
-
-2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* NEWS: Mention that GDBHISTSIZE is read instead of HISTSIZE.
-	* top.c (init_history): Read from GDBHISTSIZE instead of
-	HISTSIZE.
-	(init_main): Refer to GDBHISTSIZE instead of HISTSIZE.
-
-2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* top.c (gdb_safe_append_history): Do not call
-	history_truncate_file if the history is not stifled.
-
-2015-06-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* syscalls/s390-linux.xml: Add syscalls 344 through 354.
-	* syscalls/s390x-linux.xml: Likewise.
-
-2015-06-16  Michael Eager  <eager@eagercon.com>
-
-	* nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
-
-2015-06-16  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call
-	target_terminal_ours_for_output() before calling
-	tui_show_frame_info(), and restore the original terminal
-	settings afterwards.
-
-2015-06-16  Martin Simmons  <martin@lispworks.com>  (tiny patch)
-
-	* arm-linux-nat.c: Include nat/linux-ptrace.h.
-
-2015-06-15  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider addressable
-	memory unit size.
-	(mi_cmd_data_write_memory_bytes): Same.
-
-2015-06-15  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* corefile.c (write_memory): Update doc.
-	* gdbcore.h (write_memory): Same.
-
-2015-06-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* linux-tdep.c (enum filterflags): Make it from anonymous enum.
-	(dump_mapping_p): Use it for parameter filterflags.
-	(linux_find_memory_regions_full): Use it for variable filterflags.
-
-2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
-	    Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Merge multiple hex conversions.
-	* monitor.c: Include rsp-low.h.
-	(fromhex): Remove definition.
-
-2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
-	    Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Move utility functions to common/.
-	* cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const):
-	Move defs to common/common-utils.c.
-	* cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space)
-	(skip_to_space_const): Move decls to common/common-utils.h.
-	* common/common-defs.h: Move include of common-types.h before
-	common-utils.h.
-	* common/common-utils.c: Include host-defs.h and ctype.h.
-	(HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move
-	from utils.c.
-	(skip_spaces, skip_spaces_const, skip_to_space_const): Move from
-	cli/cli-utils.c.
-	* common/common-utils.h (strtoulst): Move decl from utils.h.
-	(skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const):
-	Move from cli/cli-utils.h.
-	* common/host-defs.h: Include limits.h.
-	(TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h.
-	(skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h.
-	* defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to
-	common/common-utils.h.
-	* utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
-	(strtoulst): Move to common/common-utils.c.
-	* utils.h (strtoulst): Moved decl to common/common-utils.h.
-
-2015-06-15  Yao Qi  <yao.qi@linaro.org>
-
-	* data-directory/Makefile.in (SYSCALLS_FILES): Add aarch64-linux.xml.
-
-2015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* build-id.c: Don't include elf-bfd.h.
-	(build_id_bfd_get): Use bfd_build_id.
-	(build_id_verify): Ditto.
-	* build-id.h: Ditto.
-	(find_separate_debug_file_by_buildid): Ditto.
-	* python/py-objfile.c: Don't include elf-bfd.h.
-	(objfpy_get_build_id) Use bfd_build_id.
-	(objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto.
-	* coffread.c: Include build-id.h.
-	(coff_symfile_read): Try find_separate_debug_file_by_buildid.
-
-2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (do_windows_fetch_inferior_registers)
-	(handle_output_debug_string): Replace __COPY_CONTEXT_SIZE
-	conditional with __CYGWIN__.
-
-2015-06-13  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* completer.c: Add arch-utils.h include.
-	(enum reg_completer_targets): New enum.
-	(reg_or_group_completer_1): New function containing old
-	reg_or_group_completer, add and use new parameter to control what
-	is completed on.  Use get_current_arch rather than architecture of
-	currently selected frame.
-	(reg_or_group_completer): Call new reg_or_group_completer_1.
-	(reggroup_completer): Call new reg_or_group_completer_1.
-	* completer.h (reggroup_completer): Add declaration.
-	* tui/tui-regs.c: Add 'completer.h' include.
-	(tui_reg_next_command): Renamed to...
-	(tui_reg_next): ...this.  Adjust parameters and return rather than
-	display new group.
-	(tui_reg_prev_command): Renamed to...
-	(tui_reg_prev): ...this.  Adjust parameters and return rather than
-	display new group.
-	(tui_reg_float_command): Delete.
-	(tui_reg_general_command): Delete.
-	(tui_reg_system_command): Delete.
-	(tui_reg_command): Rewrite to perform switching of register group.
-	Add header comment.
-	(tuireglist): Remove.
-	(tui_reggroup_completer): New function.
-	(_initialize_tui_regs): Remove 'tui reg' sub-commands, update
-	creation of 'tui reg' command.
-	* NEWS: Add comment about 'tui reg' changes.
-
-2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* target.c (target_read): Consider addressable unit size when
-	reading from a memory object.
-	(read_memory_robust): Same.
-	(read_whatever_is_readable): Same.
-	(target_write_with_progress): Consider addressable unit size
-	when writing to a memory object.
-	* target.h (target_read): Update documentation.
-	(target_write): Add documentation.
-
-2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* arch-utils.h (default_addressable_memory_unit_size): New.
-	* arch-utils.c (default_addressable_memory_unit_size): New.
-	* gdbarch.sh (addressable_memory_unit_size): New.
-	* gdbarch.h: Re-generate.
-	* gdbarch.c: Re-generate.
-
-2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* target.c (target_read): Rename variables and use
-	TARGET_XFER_E_IO.
-	(target_read_with_progress): Same.
-	(read_memory_robust): Constify parameters and rename
-	variables.
-	(read_whatever_is_readable): Constify parameters,
-	rename variables, adjust formatting.
-	* target.h (read_memory_robust): Constify parameters.
-
-2015-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short
-	synthetic (non-AltiVec) vector types.
-	(ppc64_sysv_abi_return_value): Likewise.
-
-2015-06-12  Antoine Tremblay  <antoine.tremblay@ericsson.com>
-
-	PR breakpoints/16465
-	* breakpoint.c (create_breakpoint): Save extra_string for
-	pending breakpoints.
-
-2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
-
-	* i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask
-	and bt_mask to CORE_ADDR.
-
-2015-06-11  Gary Benson <gbenson@redhat.com>
-
-	* nat/linux-namespaces.c (mnsh_send_message): Use pulongest.
-	(mnsh_recv_message): Likewise.
-
-2015-06-11  Walfred Tedeschi  <walfred.tedeschi@intel.com>
-
-	* i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
-	long long int and plongest instead of %ll.
-
-2015-06-11  Gary Benson <gbenson@redhat.com>
-
-	* nat/linux-namespaces.c (gdb_wait.h): New include.
-	(sys/wait.h): Do not include.
-
-2015-06-10  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* dwarf2read.c (dwarf_record_line): Call dwarf_record_line if
-	end_sequence is true.
-
-2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Code cleanup.
-	* solib-target.c (library_list_start_list): Use explicit NULL
-	comparison.
-
-2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* solib-target.c (library_list_start_list): Do not dereference
-	variable version in its initialization.  Make the VERSION check handle
-	NULL.
-	(library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* NEWS: Announce support for direct access of executable and
-	shared library files when attaching to inferiors in containers
-	on GNU/Linux systems.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* remote.c (struct remote_state) <fs_pid>: New field.
-	(new_remote_state): Initialize the above.
-	(PACKET_vFile_setfs): New enum value.
-	(remote_hostio_set_filesystem): New function.
-	(remote_hostio_open): Call the above.
-	(remote_hostio_unlink): Likewise.
-	(remote_hostio_readlink): Likewise.
-	(_initialize_remote): Register new "set/show remote
-	hostio-setfs-packet" command.
-	* NEWS: Announce new vFile:setfs packet.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* linux-nat.c (nat/linux-namespaces.h): New include.
-	(fileio.h): Likewise.
-	(linux_nat_filesystem_is_local): New function.
-	(linux_nat_fileio_pid_of): Likewise.
-	(linux_nat_fileio_open): Likewise.
-	(linux_nat_fileio_readlink): Likewise.
-	(linux_nat_fileio_unlink): Likewise.
-	(linux_nat_add_target): Initialize to_filesystem_is_local,
-	to_fileio_open, to_fileio_readlink and to_fileio_unlink.
-	(_initialize_linux_nat): New "set/show debug linux-namespaces"
-	commands.
-	* NEWS: Mention new "set/show debug linux-namespaces" commands.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* target.h (struct inferior): New forward declaration.
-	(struct target_ops) <to_filesystem_is_local>: Update comment.
-	(struct target_ops) <to_fileio_open>: New argument inf.
-	Update comment.  All implementations updated.
-	(struct target_ops) <to_fileio_unlink>: Likewise.
-	(struct target_ops) <to_fileio_readlink>: Likewise.
-	(target_filesystem_is_local): Update comment.
-	(target_fileio_open): New argument inf.  Update comment.
-	(target_fileio_unlink): Likewise.
-	(target_fileio_readlink): Likewise.
-	(target_fileio_read_alloc): Likewise.
-	(target_fileio_read_stralloc): Likewise.
-	* target.c (target_fileio_open): New argument inf.
-	Pass inf to implementation.  Update debug printing.
-	(target_fileio_unlink): Likewise.
-	(target_fileio_readlink): Likewise.
-	(target_fileio_read_alloc_1): New argument inf. Pass inf
-	to target_fileio_open.
-	(target_fileio_read_alloc): New argument inf. Pass inf to
-	target_fileio_read_alloc_1.
-	(target_fileio_read_stralloc): Likewise.
-	* gdb_bfd.c (inferior.h): New include.
-	(gdb_bfd_iovec_fileio_open): Replace unused "open_closure"
-	argument with new argument "inferior".  Pass inferior to
-	target_fileio_open.
-	(gdb_bfd_open): Supply inferior argument to
-	gdb_bfd_iovec_fileio_open.
-	* linux-tdep.c (linux_info_proc): Supply inf argument to
-	relevant target_fileio calls.
-	(linux_find_memory_regions_full): Likewise.
-	(linux_fill_prpsinfo): Likewise.
-	* remote.c (remote_filesystem_is_local): Supply inf
-	argument to remote_hostio_open.
-	(remote_file_put): Likewise.
-	(remote_file_get): Likewise.
-	(remote_file_delete): Supply inf argument to
-	remote_hostio_unlink.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* inf-child.c (inf_child_fileio_open): Replace comment.
-	(inf_child_fileio_pwrite): Likewise.
-	(inf_child_fileio_pread): Likewise.
-	(inf_child_fileio_fstat): Insert blank line before comment.
-	(inf_child_fileio_close): Replace comment.
-	(inf_child_fileio_unlink): Likewise.
-	(inf_child_fileio_readlink): Likewise.
-	* remote.c (remote_hostio_open): Likewise.
-	(remote_hostio_pread): Likewise.
-	(remote_hostio_pwrite): Likewise.
-	(remote_hostio_close): Likewise.
-	(remote_hostio_unlink): Likewise.
-	(remote_hostio_readlink): Likewise.
-	(remote_hostio_fstat): Likewise.
-	(remote_filesystem_is_local): Likewise.
-	* target.c (target_fileio_open): Likewise.
-	(target_fileio_pwrite): Likewise.
-	(target_fileio_pread): Likewise.
-	(target_fileio_fstat): Insert blank line before comment.
-	(target_fileio_close): Replace comment.
-	(target_fileio_unlink): Likewise.
-	(target_fileio_readlink): Likewise.
-	(target_fileio_read_alloc): Likewise.
-	(target_fileio_read_stralloc): Likewise.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* linux-thread-db.c (nat/linux-namespaces.h): New include.
-	(check_pid_namespace_match): Use linux_ns_same rather than
-	linux_proc_pid_get_ns to spot PID namespace mismatches.
-	* nat/linux-procfs.h (linux_proc_pid_get_ns): Remove.
-	* nat/linux-procfs.c (linux_proc_pid_get_ns): Likewise.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* configure.ac (AC_CHECK_FUNCS): Add setns.
-	* config.in: Regenerate.
-	* configure: Likewise.
-	* nat/linux-namespaces.h: New file.
-	* nat/linux-namespaces.c: Likewise.
-	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h.
-	(linux-namespaces.o): New rule.
-	* config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o.
-	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
-	* config/arm/linux.mh (NATDEPFILES): Likewise.
-	* config/i386/linux.mh (NATDEPFILES): Likewise.
-	* config/i386/linux64.mh (NATDEPFILES): Likewise.
-	* config/ia64/linux.mh (NATDEPFILES): Likewise.
-	* config/m32r/linux.mh (NATDEPFILES): Likewise.
-	* config/m68k/linux.mh (NATDEPFILES): Likewise.
-	* config/mips/linux.mh (NATDEPFILES): Likewise.
-	* config/pa/linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
-	* config/s390/linux.mh (NATDEPFILES): Likewise.
-	* config/sparc/linux.mh (NATDEPFILES): Likewise.
-	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
-	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
-	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
-
-2015-06-10  Gary Benson <gbenson@redhat.com>
-
-	* utils.h (make_cleanup_close): Moved to common/filestuff.h.
-	* utils.c (do_close_cleanup): Moved to common/filestuff.c.
-	(make_cleanup_close): Likewise.
-	* common/filestuff.h (make_cleanup_close): Moved from utils.h.
-	* common/filestuff.c (do_close_cleanup): Moved from utils.c.
-	(make_cleanup_close): Likewise.
-
-2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (thread_rec): Also ignore ERROR_INVALID_HANDLE
-	from SuspendThread().
-
-2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (handle_output_debug_string): Trim trailing '\n'
-	from OutputDebugString.
-
-2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
-			Mircea Gherzan  <mircea.gherzan@intel.com>
-
-	* i386-tdep.c (MPX_BASE_MASK, MPX_BD_MASK, MPX_BT_MASK, MPX_BD_MASK_32,
-	MPX_BT_MASK_32): New macros.
-	(i386_mpx_set_bounds): New function that implements
-	the command "set-mpx-bound".
-	(i386_mpx_enabled): Helper function to test MPX availability.
-	(i386_mpx_bd_base): Helper function to calculate the base directory
-	address.
-	(i386_mpx_get_bt_entry): Helper function to access a bound
-	table entry.
-	(i386_mpx_print_bounds): Effectively display bound information.
-	(_initialize_i386_tdep): Add new commands to commands "set mpx" and
-	"show mpx".
-	(_initialize_i386_tdep):
-	Add "bound" to the commands "show mpx" and "set mpx" commands.
-	(mpx_set_cmdlist and mpx_show_cmdlist): List for the new prefixed "set mpx"
-	and "show mpx" commands.
-	* NEWS: List new commands for MPX support.
-
-2015-06-09  Gary Benson <gbenson@redhat.com>
-
-	* common/fileio.h (fileio_to_host_mode): New declaration.
-	* common/fileio.c (fileio_to_host_mode): New Function.
-	* inf-child.c (inf_child_fileio_open): Process mode argument
-	with fileio_to_host_mode.
-
-2015-06-09  Gary Benson <gbenson@redhat.com>
-
-	* common/fileio.c (fileio_mode_pack): Fix preprocessor
-	conditional.
-
-2015-06-05  Gary Benson <gbenson@redhat.com>
-
-	* gdb_bfd.c (gdb_bfd_open): Move vgdb special case to...
-	* remote.c (remote_filesystem_is_local): ...here.
-
-2015-06-04  Yao Qi  <yao.qi@linaro.org>
-
-	* gdbarch.c: Regenerate it.
-
-2015-06-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* arch-utils.c (default_infcall_munmap): New.
-	* arch-utils.h (default_infcall_munmap): New declaration.
-	* compile/compile-object-load.c (struct munmap_list, munmap_list_add)
-	(munmap_list_free, munmap_listp_free_cleanup): New.
-	(struct setup_sections_data): Add field munmap_list_headp.
-	(setup_sections): Call munmap_list_add.
-	(compile_object_load): New variable munmap_list_head, initialize
-	setup_sections_data.munmap_list_headp, return munmap_list_head.
-	* compile/compile-object-load.h (struct munmap_list): New declaration.
-	(struct compile_module): Add field munmap_list_head.
-	(munmap_list_free): New declaration.
-	* compile/compile-object-run.c (struct do_module_cleanup): Add field
-	munmap_list_head.
-	(do_module_cleanup): Call munmap_list_free.
-	(compile_object_run): Pass munmap_list_head to do_module_cleanup.
+	PR gdb/21165
+	* ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
+	value is lazy.
+	* valprint.c (common_val_print): Likewise.
+
+2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* NEWS: Mention new set/show disassembler-options commands.
+	* doc/gdb.texinfo: Document new set/show disassembler-options commands.
+	* disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
+	(prospective_options): New static variable.
+	(gdb_disassembler::gdb_disassembler): Initialize
+	m_di.disassembler_options.
+	(gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
+	(get_disassembler_options): New function.
+	(set_disassembler_options): Likewise.
+	(set_disassembler_options_sfunc): Likewise.
+	(show_disassembler_options_sfunc): Likewise.
+	(disassembler_options_completer): Likewise.
+	(_initialize_disasm): Likewise.
+	* disasm.h (get_disassembler_options): New prototype.
+	(set_disassembler_options): Likewise.
+	* gdbarch.sh (gdbarch_disassembler_options): New variable.
+	(gdbarch_verify_disassembler_options): Likewise.
 	* gdbarch.c: Regenerate.
-	* gdbarch.h: Regenerate.
-	* gdbarch.sh (infcall_munmap): New.
-	* linux-tdep.c (linux_infcall_munmap): New.
-	(linux_init_abi): Install it.
-
-2015-06-02  Simon Marchi  <simon.marchi@ericsson.com>
-
-	PR gdb/15564
-	* inferior.c (detach_inferior): Call exit_inferior_1 with silent = 0.
-
-2015-06-02  Yao Qi  <yao.qi@linaro.org>
-
-	* i386-linux-nat.c: Include linux-nat.h.
-
-2015-06-01  Andreas Schwab  <schwab@linux-m68k.org>
-	    Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	PR symtab/18392
-	* dwarf2-frame-tailcall.c (pretended_chain_levels): Correct
-	assertion.
-	* dwarf2loc.c (chain_candidate): Likewise.
-
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-nat.c (fetch_vfp_regs): Use PTRACE_GETREGSET.
-	(store_vfp_regs): Use PTRACE_SETREGSET.
-
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-nat.c (fetch_fpregister): Use PTRACE_GETREGSET.
-	(fetch_fpregs): Likewise.
-	* arm-linux-nat.c (store_fpregister): Use PTRACE_SETREGSET.
-	(store_fpregs): Likewise.
-
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-nat.c (fetch_register): Use PTRACE_GETREGSET.
-	(fetch_regs): Likewise.
-	(store_regs): Use PTRACE_SETREGSET.
+	* gdbarch.h: Likewise.
+	* arm-tdep.c (num_disassembly_options): Delete.
+	(set_disassembly_style): Likewise.
+	(arm_disassembler_options): New static variable.
+	(set_disassembly_style_sfunc): Convert short style name into long
+	option name.  Call set_disassembler_options.
+	(show_disassembly_style_sfunc): New function.
+	(arm_gdbarch_init): Call set_gdbarch_disassembler_options and
+	set_gdbarch_verify_disassembler_options.
+	(_initialize_arm_tdep): Delete regnames variable and update callers.
+	(arm_disassembler_options): Initialize.
+	(disasm_options): New variable.
+	(num_disassembly_options): Rename from this...
+	(num_disassembly_styles): ...to this.  Compute by scanning through
+	disasm_options.
+	(valid_disassembly_styles): Initialize using disasm_options.
+	Remove calls to parse_arm_disassembler_option, get_arm_regnames and
+	set_arm_regname_option.
+	Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
+	* rs6000-tdep.c (powerpc_disassembler_options): New static variable.
+	(rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
+	set_gdbarch_verify_disassembler_options.
+	* s390-tdep.c (s390_disassembler_options): New static variable.
+	(s390_gdbarch_init):all set_gdbarch_disassembler_options and
+	set_gdbarch_verify_disassembler_options.
+
+2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (remote_add_target_side_condition): Remove "struct"
+	keyword from range-based for loop.
+
+2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (remote_add_target_side_condition): Use range-based
+	for loop.  Update comment.
+
+2017-02-27  Yao Qi  <yao.qi@linaro.org>
+
+	* f-typeprint.c (f_print_type): Check "varstring" is empty first.
+
+2017-02-26  Alan Hayward  <alan.hayward@arm.com>
+
+	* regcache.c (regcache_raw_update): New function.
+	(regcache_raw_read): Move code to regcache_raw_update.
+	* regcache.h (regcache_raw_update): New declaration.
+	* remote.c (remote_prepare_to_store): Call regcache_raw_update.
+
+2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (create_debug_type_hash_table): Initialize
+	header.signature and header.type_offset_in_tu.
+
+2017-02-24  Pedro Alves  <palves@redhat.com>
+
+	* symtab.c (make_file_symbol_completion_list_1): Use
+	add_symtab_completions.
+
+2017-02-24  Alan Hayward  <alan.hayward@arm.com>
+
+	* stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
+
+2017-02-24  Alan Hayward  <alan.hayward@arm.com>
+
+	* i386-tdep.c (i386_pseudo_register_read_into_value): Use
+	I386_MAX_REGISTER_SIZE.
+	(i386_pseudo_register_write): Likewise.
+	(i386_process_record): Likewise.
+	* i387-tdep.c (i387_supply_xsave): Likewise.
+	* m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
 	(store_register): Likewise.
 
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
+2017-02-23  Pedro Alves  <palves@redhat.com>
 
-	* arm-linux-nat.c (arm_linux_read_description): Check whether
-	kernel supports PTRACE_GETREGSET.
+	* ada-lang.c: Include "common/function-view.h".
+	(ada_iterate_over_symbols): Adjust to use function_view as
+	callback type.
+	(struct add_partial_datum, ada_complete_symbol_matcher): Delete.
+	(ada_make_symbol_completion_list): Use a lambda.
+	(ada_exc_search_name_matches): Delete.
+	(name_matches_regex): New.
+	(ada_add_global_exceptions): Use a lambda and name_matches_regex.
+	* compile/compile-c-support.c: Include "common/function-view.h".
+	(print_one_macro): Change prototype to accept a ui_file pointer.
+	(write_macro_definitions): Use a lambda.
+	* dwarf2read.c: Include "common/function-view.h".
+	(dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
+	(dw2_expand_symtabs_matching): Adjust to use function_view as
+	callback type.
+	* language.h: Include "common/function-view.h".
+	(struct language_defn) <la_iterate_over_symbols>: Adjust to use
+	function_view as callback type.
+	(LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
+	* linespec.c: Include "common/function-view.h".
+	(collect_info::add_symbol): New method.
+	(struct symbol_and_data_callback, iterate_inline_only, struct
+	symbol_matcher_data, iterate_name_matcher): Delete.
+	(iterate_over_all_matching_symtabs): Adjust to use function_view
+	as callback type and lambdas.
+	(iterate_over_file_blocks): Adjust to use function_view as
+	callback type.
+	(decode_compound_collector): Now a class with private fields.
+	(decode_compound_collector::release_symbols): New method.
+	(collect_one_symbol): Rename to...
+	(decode_compound_collector::operator()): ... this and adjust.
+	(lookup_prefix_sym): decode_compound_collector construction bits
+	move to decode_compound_collector ctor.  Pass the
+	decode_compound_collector object directly as callback.  Remove
+	cleanups and use decode_compound_collector::release_symbols
+	instead.
+	(symtab_collector): Now a class with private fields.
+	(symtab_collector::release_symtabs): New method.
+	(add_symtabs_to_list): Rename to...
+	(symtab_collector::operator()): ... this and adjust.
+	(collect_symtabs_from_filename): symtab_collector construction
+	bits move to symtab_collector ctor.  Pass the symtab_collector
+	object directly as callback.  Remove cleanups and use
+	symtab_collector::release_symtabs instead.
+	(collect_symbols): Delete.
+	(add_matching_symbols_to_info): Use lambdas.
+	* macrocmd.c (print_macro_callback): Delete.
+	(info_macro_command): Use a lambda.
+	(info_macros_command): Pass print_macro_definition as callable
+	directly.
+	(print_one_macro): Remove 'ignore' parameter.
+	(macro_list_command): Adjust.
+	* macrotab.c (macro_for_each_data::fn): Now a function_view.
+	(macro_for_each_data::user_data): Delete field.
+	(foreach_macro): Adjust to call the function_view.
+	(macro_for_each): Adjust to use function_view as callback type.
+	(foreach_macro_in_scope): Adjust to call the function_view.
+	(macro_for_each_in_scope): Adjust to use function_view as callback
+	type.
+	* macrotab.h: Include "common/function-view.h".
+	(macro_callback_fn): Declare a prototype instead of a pointer.
+	Remove "user_data" parameter.
+	(macro_for_each, macro_for_each_in_scope): Adjust to use
+	function_view as callback type.
+	* psymtab.c (partial_map_expand_apply)
+	(psym_map_symtabs_matching_filename, recursively_search_psymtabs):
+	Adjust to use function_view as callback type and to return bool.
+	(psym_expand_symtabs_matching): Adjust to use function_view as
+	callback types.
+	* symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
+	to use function_view as callback type and to return bool.
+	(debug_qf_expand_symtabs_matching): Adjust to use function_view as
+	callback types.
+	* symfile.c (expand_symtabs_matching): Adjust to use function_view
+	as callback types.
+	* symfile.h: Include "common/function-view.h".
+	(expand_symtabs_file_matcher_ftype)
+	(expand_symtabs_symbol_matcher_ftype)
+	(expand_symtabs_exp_notify_ftype): Remove "data" parameter and
+	return bool.
+	(quick_symbol_functions::map_symtabs_matching_filename)
+	(quick_symbol_functions::expand_symtabs_matching): Adjust to use
+	function_view as callback type and return bool.
+	(expand_symtabs_matching): Adjust to use function_view as callback
+	type.
+	(maintenance_expand_name_matcher)
+	(maintenance_expand_file_matcher): Delete.
+	(maintenance_expand_symtabs): Use lambdas.
+	* symtab.c (iterate_over_some_symtabs): Adjust to use
+	function_view as callback types and return bool.
+	(iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
+	of a cleanup.
+	(lookup_symtab_callback): Delete.
+	(lookup_symtab): Use a lambda.
+	(iterate_over_symbols): Adjust to use function_view as callback
+	type.
+	(struct search_symbols_data, search_symbols_file_matches)
+	(search_symbols_name_matches): Delete.
+	(search_symbols): Use a pair of lambdas.
+	(struct add_name_data, add_macro_name, symbol_completion_matcher)
+	(symtab_expansion_callback): Delete.
+	(default_make_symbol_completion_list_break_on_1): Use lambdas.
+	* symtab.h: Include "common/function-view.h".
+	(iterate_over_some_symtabs): Adjust to use function_view as
+	callback type and return bool.
+	(iterate_over_symtabs): Adjust to use function_view as callback
+	type.
+	(symbol_found_callback_ftype): Remove 'data' parameter and return
+	bool.
+	(iterate_over_symbols): Adjust to use function_view as callback
+	type.
+
+2017-02-23  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
+	(%.o) <unittests/%.c>: New pattern.
+	* configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
+	CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
+	* common/function-view.h: New file.
+	* unittests/function-view-selftests.c: New file.
+	* configure: Regenerate.
 
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
+2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
 
-	* x86-linux-nat.c (have_ptrace_getregset): Move it to ...
-	* linux-nat.c: ... here.
-	* x86-linux-nat.h (have_ptrace_getregset): Move the declaration
-	to ...
-	* linux-nat.h: ... here.
+	* bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
+	inferior_ptid.
+	* go32-nat.c (go32_thread_alive): Likewise.
 
-2015-06-01  Yao Qi  <yao.qi@linaro.org>
+2017-02-23  Yao Qi  <yao.qi@linaro.org>
 
-	* amd64-linux-nat.c: Include "nat/linux-ptrace.h".
-	* i386-linux-nat.c: Likewise.
-	* nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
-	* s390-linux-nat.c: Include "nat/linux-ptrace.h".
-	(PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
-	* x86-linux-nat.c: Include "nat/linux-ptrace.h".
-	* x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+	* varobj-iter.h (varobj_iter_delete): Call xfree instead of
+	delete.
 
-2015-05-30  Eli Zaretskii  <eliz@gnu.org>
+2017-02-23  Yao Qi  <yao.qi@linaro.org>
 
-	* go32-nat.c (go32_xfer_memory): Fix the return value to be
-	compatible to what read_child and write_child return.  This
-	unbreaks that DJGPP build of GDB which was broken since v7.7.
+	* varobj.c (varobj_clear_saved_item): Use delete instead of
+	xfree.
+	(update_dynamic_varobj_children): Likewise.
 
-2015-05-29  Martin Galvan  <martin.galvan@tallertechnologies.com>
+2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* MAINTAINERS (Write After Approval): Add Martin Galvan.
+	* dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
 
-2015-05-29  Roland McGrath  <mcgrathr@google.com>
+2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
 
-	PR gdb/18464
-	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
-	rather than internal_error for an unrecognized value.
+	* common/enum-flags.h (enum_flags::enum_flags): Initialize
+	m_enum_value to 0 in default constructor.
 
-2015-05-29  Max Filippov  <jcmvbkbc@gmail.com>
+2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
 
-	* xtensa-tdep.c (xtensa_pseudo_register_read)
-	(xtensa_pseudo_register_write): Don't alias last pseudo register
-	to a1.
+	* rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
+	(STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
+	(LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
+	STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
+	(IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
+	(ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
+	(ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
+	IS_STORE_CONDITIONAL_INSN.
 
-2015-05-28  Don Breazeal  <donb@codesourcery.com>
+2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* infrun.c (follow_fork_inferior): Ensure the use of
-	process-style ptids (pid,0,0) in verbose/debug "Detaching"
-	messages.
+	* dwarf2_rnglists_process: Initialize range_beginning and range_end.
 
-2015-05-28  Doug Evans  <dje@google.com>
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* dwarf2read.c (record_line_ftype): Remove, duplicate.
+	* NEWS (Changes since GDB 7.12): Add DWARF-5.
 
-2015-05-28  Yao Qi  <yao.qi@linaro.org>
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* arm-linux-nat.c (arm_linux_has_wmmx_registers): Remove.
-	(arm_linux_fetch_inferior_registers): Use
-	tdep->have_wmmx_registers instead of arm_linux_has_wmmx_registers.
-	(arm_linux_store_inferior_registers): Likewise.
-	(arm_linux_read_description): Don't set
-	arm_linux_has_wmmx_registers.
-	* arm-tdep.c (arm_gdbarch_init): Set
-	tdep->have_wmmx_registers according target descriptions.
-	* arm-tdep.h (struct gdbarch_tdep) <have_wmmx_registers>: New
-	field.
+	* dwarf2read.c (skip_one_die, read_attribute_value)
+	(dwarf2_const_value_attr, dump_die_shallow)
+	(dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
+	(skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
 
-2015-05-28  Yao Qi  <yao.qi@linaro.org>
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* arm-linux-nat.c (arm_linux_vfp_register_count): Remove.
-	(fetch_vfp_regs): Use vfp_register_count from gdbarch_tdep
-	instead of arm_linux_vfp_register_count.
-	(store_vfp_regs): Likewise.
-	(arm_linux_fetch_inferior_registers): Likewise.
-	(arm_linux_store_inferior_registers): Likewise.
-	(arm_linux_read_description): Don't set
-	arm_linux_vfp_register_count.
-	* arm-linux-tdep.c (arm_linux_iterate_over_regset_sections):
-	Adjust.
-	* arm-tdep.c (arm_gdbarch_init): Add assert on
-	vfp_register_count.
-	* arm-tdep.h (struct gdbarch_tdep) <have_vfp_registers>: Rename
-	field to vfp_register_count.  All users updated.
-
-2015-05-28  Kyle Huey  <me@kylehuey.com>  (tiny patch)
-
-	* gdb/arm-tdep.c (arm_gdbarch_init): Perform arm_abi detection on
-	ELFOSABI_GNU binaries.
-
-2015-05-27  Doug Evans  <dje@google.com>
-
-	* dwarf2read.c (lnp_state_machine): New typedef.
-	(lnp_reader_state): New typedef.
-	(dwarf_record_line_1): Renamed from dwarf_record_line.
-	All callers updated.
-	(dwarf_record_line): New function.
-	(init_lnp_state_machine): New function.
-	(check_line_address): Replace p_record_line parameter with state.
-	All callers updated.
-	(dwarf_decode_lines_1): Call dwarf_record_line, init_lnp_state_machine.
-	Update to record state in lnp_state_machine.
-
-2015-05-27  Doug Evans  <dje@google.com>
-
-	* dwarf2read.c (record_line_ftype): New typedef.
-	(check_line_address): New function.
-	(dwarf_decode_lines_1): Call it.
-
-2015-05-27  Doug Evans  <dje@google.com>
-
-	* NEWS: Mention "set debug dwarf-line".
-	* dwarf2read.c (dwarf_line_debug): New static global.
-	(add_include_dir): Add debug dwarf-line support.
-	(add_file_name, dwarf_record_line, dwarf_finish_line): Ditto.
-	(_initialize_dwarf2_read): New parameter "debug dwarf-line".
-
-2015-05-27  Doug Evans  <dje@google.com>
-
-	* cp-namespace.c (cp_lookup_nested_symbol): New arg "domain".
-	All callers updated.
-	(cp_lookup_nested_symbol_1, find_symbol_in_baseclass): Ditto.
-	* cp-support.h (cp_lookup_nested_symbol): Update.
-
-2015-05-27  Doug Evans  <dje@google.com>
-
-	PR symtab/18258
-	* block.c (block_find_symbol): New function.
-	(block_find_non_opaque_type): Ditto.
-	(block_find_non_opaque_type_preferred): Ditto.
-	* block.h (block_symbol_matcher_ftype): New typedef.
-	(block_find_symbol): Declare.
-	(block_find_non_opaque_type): Ditto.
-	(block_find_non_opaque_type_preferred): Ditto.
-	* dwarf2read.c (dw2_lookup_symbol): Call block_find_symbol.
-	* psymtab.c (psym_lookup_symbol): Ditto.
-	* symtab.c (basic_lookup_transparent_type_1): New function.
-	(basic_lookup_transparent_type): Call it.
-
-2015-05-27  Yao Qi  <yao.qi@linaro.org>
-
-	* aarch64-tdep.c (aarch64_record_data_proc_simd_fp): Return
-	AARCH64_RECORD_UNKNOWN for unknown instruction encoding.
-
-2015-05-27  Yao Qi  <yao.qi@linaro.org>
-
-	* aarch64-tdep.c (aarch64_record_branch_except_sys): Split lines
-	before operator &&.
-	(aarch64_record_load_store): Likewise.
-
-2015-05-26  Doug Evans  <dje@google.com>
-
-	PR c++/18141, c++/18417.
-	* cp-support.c (cp_lookup_rtti_type): Handle the case of NAME being
-	a typedef.
-
-2015-05-26  Doug Evans  <dje@google.com>
-
-	* NEWS: Add entries for command renamings.
-	* dwarf2read.c (dwarf_read_debug): Renamed from dwarf2_read_debug.
-	All uses updated.
-	(dwarf_die_debug): Renamed from dwarf2_die_debug.  All uses updated.
-	(dwarf_max_cache_age): Renamed from dwarf2_max_cache_age.
-	All uses updated.
-	(show_dwarf_max_cache_age): Renamed from show_dwarf2_max_cache_age.
-	All callers updated.  Fix spelling of DWARF in help text.
-	(set_dwarf_cmdlist): Renamed from set_dwarf2_cmdlist.
-	All uses updated.
-	(show_dwarf_cmdlist): Renamed from show_dwarf2_cmdlist.
-	All uses updated.
-	(set_dwarf_cmd): Renamed from set_dwarf2_cmd.  All callers updated.
-	(show_dwarf_cmd): Renamed from show_dwarf2_cmd.  All callers updated.
-	(dwarf_always_disassemble): Renamed from dwarf_always_disassemble.
-	All uses updated.
-	(show_dwarf_always_disassemble): Renamed from
-	show_dwarf2_always_disassemble.  All callers updated.
-	(_initialize_dwarf2_read): Rename "set/show dwarf2" prefix to
-	"set/show dwarf".  Rename "set/show dwarf2 max-cache-age" to
-	"set/show dwarf max-cache-age".  Rename
-	"set/show dwarf2 always-disassemble" to
-	"set/show dwarf always-disassemble".  Rename
-	"set/show debug dwarf2-read" to "set/show debug dwarf-read".  Rename
-	"set/show debug dwarf2-die" to "set/show debug dwarf-die".
-
-2015-05-26  Doug Evans  <dje@google.com>
-
-	PR python/18438
-	* python/py-lazy-string.c (stpy_convert_to_value): Use
-	gdbpy_gdb_memory_error not PyExc_MemoryError.
-	(gdbpy_create_lazy_string_object): Ditto.
-
-2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-regs.c (tui_reg_next_command): Compare against NULL.
-
-2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-regs.c (tui_reg_prev_command): New function.
-	(_initialize_tui_regs): Add 'prev' command for 'tui reg'.
-	* reggroups.c (reggroup_prev): New function.
-	* reggroups.h (reggroup_prev): Add declaration.  Update comment.
+	* dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
+	(dwarf_parse_macro_header): Accept DWARF version 5.
+	(dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
 
-2015-05-26  Omair Javaid  <omair.javaid@linaro.org>
-	    Yao Qi  <yao.qi@linaro.org>
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
-	* aarch64-linux-tdep.c: Include linux-record.h and
-	record-full.h.
-	(struct linux_record_tdep aarch64_linux_record_tdep): Declare.
-	(aarch64_syscall): New enum.
-	(aarch64_canonicalize_syscall): New function.
-	(aarch64_all_but_pc_registers_record): New function.
-	(aarch64_linux_syscall_record): New function.
-	(aarch64_linux_init_abi): Install AArch64 process record
-	handler.  Update to handle syscall recording.
-	* aarch64-tdep.c: Include record.h and record-full.h.
-	(submask, bit, bits, REG_ALLOC, MEM_ALLOC): New macros.
-	(struct aarch64_mem_r): Define.
-	(aarch64_record_result): New enum.
-	(struct insn_decode_record): Define.
-	(insn_decode_record): New typedef.
-	(aarch64_record_data_proc_reg): New function.
-	(aarch64_record_data_proc_imm): New function.
-	(aarch64_record_branch_except_sys): New function.
-	(aarch64_record_load_store): New function.
-	(aarch64_record_data_proc_simd_fp): New function.
-	(aarch64_record_asimd_load_store): New function.
-	(aarch64_record_decode_insn_handler): New function.
-	(deallocate_reg_mem): New function.
-	(aarch64_process_record): New function.
-	* aarch64-tdep.h (struct gdbarch_tdep) <aarch64_syscall_record>:
-	New field.
-	(aarch64_process_record): New extern declaration.
-	* configure.tgt: Add linux-record.o to gdb_target_obs.
-	* linux-record.h (struct linux_record_tdep) <arg7>: New field.
-
-2015-05-26  Omair Javaid  <omair.javaid@linaro.org>
-
-	* NEWS: Add a note on process record-replay support on aarch64*-linux*
-	targets.
-
-2015-05-26  Martin Galvan  <martin.galvan@tallertechnologies.com>
-
-	* amd64-tdep.c: Replace in_function_epilogue_p with
-	stack_frame_destroyed_p throughout.
-	* arch-utils.c: Ditto.
-	* arch-utils.h: Ditto.
-	* arm-tdep.c: Ditto.
-	* breakpoint.c: Ditto.
-	* gdbarch.sh: Ditto.
-	* hppa-tdep.c: Ditto.
-	* i386-tdep.c: Ditto.
-	* mips-tdep.c: Ditto.
-	* nios2-tdep.c: Ditto.
-	* rs6000-tdep.c: Ditto.
-	* s390-linux-tdep.c: Ditto.
-	* score-tdep.c: Ditto.
-	* sh-tdep.c: Ditto.
-	* sparc-tdep.c: Ditto.
-	* sparc-tdep.h: Ditto.
-	* sparc64-tdep.c: Ditto.
-	* spu-tdep.c: Ditto.
-	* tic6x-tdep.c: Ditto.
-	* tilegx-tdep.c: Ditto.
-	* xstormy16-tdep.c: Ditto.
-	* gdbarch.c, gdbarch.h: Re-generated.
-
-2015-05-22  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* NEWS: Mention 'tui enable' and 'tui disable'.
-	* tui/tui.c (tui_enable_command): New function.
-	(tui_disable_command): New function.
-	(_initialize_tui): New function.
-
-2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-regs.c (tui_reg_next_command): Use NULL not 0.
-
-2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-layout.c (tui_set_layout_for_display_command): Ensure
-	buf_ptr is freed.
-
-2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-layout.c (tui_layout_command): Move call to tui_enable
-	into ...
-	(tui_set_layout_for_display_command): ...here, before calling
-	tui_set_layout.  Only set the layout if gdb has not already
-	entered the TUI_FAILURE state.
-
-2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-layout.c (layout_completer): New function.
-	(_initialize_tui_layout): Set completer on layout command.
-
-2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* tui/tui-layout.c (tui_set_layout): Remove
-	tui_register_display_type parameter.  Remove all checking of this
-	parameter, and reindent function.  Update header comment.
-	(tui_set_layout_for_display_command): Rename to...
-	(tui_set_layout_by_name): ...this, and don't check for different
-	register class types, don't pass a tui_register_display_type to
-	tui_set_layout.  Update header comment.
-	(layout_names): Remove register set specific names.
-	* tui/tui-layout.h (tui_set_layout): Remove
-	tui_register_display_type parameter.
-	* tui/tui.c (tui_rl_change_windows): Don't pass a
-	tui_register_display_type to tui_set_layout.
-	(tui_rl_delete_other_windows): Likewise.
-	(tui_enable): Likewise.
-	* tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove.
-	(TUI_FLOAT_REGS_NAME_LOWER): Remove.
-	(TUI_GENERAL_REGS_NAME): Remove.
-	(TUI_GENERAL_REGS_NAME_LOWER): Remove.
-	(TUI_SPECIAL_REGS_NAME): Remove.
-	(TUI_SPECIAL_REGS_NAME_LOWER): Remove.
-	(TUI_GENERAL_SPECIAL_REGS_NAME): Remove.
-	(TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove.
-	(enum tui_register_display_type): Remove.
-	(struct tui_layout_def): Remove regs_display_type and
-	float_regs_display_type fields.
-	(struct tui_data_info): Remove regs_display_type field.
-	(tui_layout_command): Use new name for
-	tui_set_layout_for_display_command.
-	* tui/tui-data.c (layout_def): Don't initialise removed fields.
-	(tui_clear_win_detail): Don't initialise removed fields of
-	win_info.
-	* tui/tui-regs.c (tui_show_registers): Use new name for
-	tui_set_layout_for_display_command.
-	* tui/tui.h (tui_set_layout_for_display_command): Rename
-	declaration to...
-	(tui_set_layout_by_name): ...this.
-	* printcmd.c (display_command): Remove tui related layout call,
-	and reindent.
-
-2015-05-20  Joel Brobecker  <brobecker@adacore.com>
-
-	* infrun.c (handle_inferior_event_1): Renames handle_inferior_event.
-	(handle_inferior_event): New function.
-
-2015-05-20  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (to_fixed_array_type): Rename local variable
-	typename into type_name.
-
-2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix ASAN crash for gdb.compile/compile.exp.
-	* infcall.c (call_function_by_hand_dummy): Use xstrdup for NAME.
-
-2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-c-symbols.c (convert_symbol_sym, gcc_convert_symbol)
-	(gcc_symbol_address): Change gdb_stdout to gdb_stdlog.
-	* compile/compile-object-load.c (setup_sections, compile_object_load):
+	* block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
+	DW_AT_GNU_*.
+	* common/common-exceptions.h (enum errors): Likewise.
+	* dwarf2-frame.c (class dwarf_expr_executor): Likewise.
+	* dwarf2expr.c (dwarf_block_to_dwarf_reg)
+	(dwarf_expr_context::execute_stack_op): Likewise.
+	* dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
 	Likewise.
-	* compile/compile.c (compile_to_object): Likewise.
-
-2015-05-16  Doug Evans  <xdje42@gmail.com>
-
-	* NEWS: Mention support for unbuffered Guile memory ports.
-	* scm-ports.c (ioscm_memory_port): Update comments on end, size.
-	(ioscm_lseek_address): Improve overflow calculation.
-	(gdbscm_memory_port_fill_input): Add assert.
-	(gdbscm_memory_port_write): Handle unbuffered ports.
-	Handle large writes identical to Guile's fport_write.
-	(gdbscm_memory_port_seek): Fix seeking past end check.
-	(gdbscm_memory_port_close): Handle closing unbuffered port.
-	(ioscm_parse_mode_bits): Recognize "0" for unbuffered ports.
-	(ioscm_init_memory_port): Handle unbuffered ports.
-	(ioscm_reinit_memory_port): Ditto.
-	(ioscm_init_memory_port): Update size calculation.
-	(gdbscm_open_memory): Support zero sized ports.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (get_out_value_type): Fix uninitialized
-	variable compiler warnings.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (get_out_value_type): Fix returned type.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-	    Phil Muldoon  <pmuldoon@redhat.com>
-
-	* NEWS (Changes since GDB 7.9): Add compile print.
-	* compile/compile-c-support.c (add_code_header, add_code_footer)
-	(c_compute_program): Add COMPILE_I_PRINT_ADDRESS_SCOPE and
-	COMPILE_I_PRINT_VALUE_SCOPE.
-	* compile/compile-internal.h (COMPILE_I_PRINT_OUT_ARG_TYPE)
-	(COMPILE_I_PRINT_OUT_ARG, COMPILE_I_EXPR_VAL, COMPILE_I_EXPR_PTR_TYPE):
-	New.
-	* compile/compile-object-load.c: Include block.h.
-	(get_out_value_type): New function.
-	(compile_object_load): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
-	COMPILE_I_PRINT_VALUE_SCOPE.  Set compile_module's OUT_VALUE_ADDR and
-	OUT_VALUE_TYPE.
-	* compile/compile-object-load.h (struct compile_module): Add fields
-	out_value_addr and out_value_type.
-	* compile/compile-object-run.c: Include valprint.h and compile.h.
-	(struct do_module_cleanup): Add fields out_value_addr and
-	out_value_type.
-	(do_module_cleanup): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
-	COMPILE_I_PRINT_VALUE_SCOPE.
-	(compile_object_run): Propagate out_value_addr and out_value_type.
-	Pass OUT_VALUE_ADDR.
-	* compile/compile.c: Include valprint.h.
-	(compile_print_value, compile_print_command): New functions.
-	(eval_compile_command): Handle failed COMPILE_I_PRINT_ADDRESS_SCOPE.
-	(_initialize_compile): Update compile code help text.  Install
-	compile_print_command.
-	* compile/compile.h (compile_print_value): New prototype.
-	* defs.h (enum compile_i_scope_types): Add
-	COMPILE_I_PRINT_ADDRESS_SCOPE and COMPILE_I_PRINT_VALUE_SCOPE.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (get_regs_type): Add parameter func_sym.
-	Rely on its parameter count.
-	(compile_object_load): Replace lookup_minimal_symbol_text by
-	lookup_global_symbol_from_objfile.  Verify FUNC_SYM.  Set it in the
-	return value.
-	* compile/compile-object-load.h (struct compile_module): Replace
-	func_addr by func_sym.
-	* compile/compile-object-run.c: Include block.h.
-	(compile_object_run): Reset module variable after it is freed.  Use
-	FUNC_SYM instead of FUNC_ADDR.  Rely on it.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-c-support.c (print_one_macro): Use #ifndef.
-	(generate_register_struct): Use __gdb_uintptr for TYPE_CODE_PTR.
-	(c_compute_program): Call generate_register_struct after typedefs.
-	* compile/compile-loc2c.c (push, pushf_register_address)
-	(pushf_register): Cast to GCC_UINTPTR.
-	(do_compile_dwarf_expr_to_c): Use unused attribute.  Add space after
-	type.  Use GCC_UINTPTR instead of void *.  Remove excessive cast.
-	(compile_dwarf_expr_to_c): Use GCC_UINTPTR instead of void *.
-	* compile/compile.c (_initialize_compile): Enable warnings for
-	COMPILE_ARGS.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* cli/cli-script.c (execute_control_command): Update
-	eval_compile_command caller.
-	* compile/compile-object-load.c (compile_object_load): Add parameters
-	scope and scope_data.  Set them.
-	* compile/compile-object-load.h (struct compile_module): Add fields
-	scope and scope_data.
-	(compile_object_load): Add parameters scope and scope_data.
-	* compile/compile-object-run.c (struct do_module_cleanup): Add fields
-	scope and scope_data.
-	(compile_object_run): Propagate the fields scope and scope_data.
-	* compile/compile.c (compile_file_command, compile_code_command):
-	Update eval_compile_command callers.
-	(eval_compile_command): Add parameter scope_data.  Pass it plus scope.
-	* compile/compile.h (eval_compile_command): Add parameter scope_data.
-	* defs.h (struct command_line): Add field scope_data.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* printcmd.c (struct format_data): Move it to valprint.h.
-	(print_command_parse_format, print_value): New functions from ...
-	(print_command_1): ... here.  Call them.
-	* valprint.h (struct format_data): Move it here from printcmd.c.
-	(print_command_parse_format, print_value): New declarations.
-
-2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (compile_object_load): Add
-	COMPILE_DEBUG message.
-
-2015-05-15  Jerome Guitton  <guitton@adacore.com>
-
-	* ada-lang.c (ada_value_ptr_subscript): Use enum position of
-	index to get element instead of enum value.
-	(ada_value_slice_from_ptr, ada_value_slice): Use enum position
-	of index to compute length, but enum values to compute bounds.
-	(ada_array_length): Use enum position of index instead of enum value.
-	(pos_atr): Move position computation to...
-	(ada_evaluate_subexp): Use enum values to compute bounds.
-	* gdbtypes.c (discrete_position): ...this new function.
-	* gdbtypes.h (discrete_position): New function declaration.
-	* valprint.c (val_print_array_elements): Call discrete_position
-	to handle array indexed by non-contiguous enumeration types.
-
-2015-05-15  Jerome Guitton  <guitton@adacore.com>
-
-	* ada-lang.c (find_parallel_type_by_descriptive_type):
-	Go through typedefs during lookup.
-	(to_fixed_array_type): Add support for non-bit packed arrays
-	as variable-length fields.
-
-2015-05-15  Pedro Alves  <palves@redhat.com>
-	    Simon Marchi  <simon.marchi@ericsson.com>
-
-	* event-loop.c (gdb_notifier) <next_file_handler,
-	next_poll_fds_index>: New fields.
-	(get_next_file_handler_to_handle_and_advance): New function.
-	(delete_file_handler): If deleting the next file handler to
-	handle, advance to the next file handler.
-	(gdb_wait_for_event): Bail early if no event fired.  Poll file
-	handlers in round-robin fashion.
-
-2015-05-15  Pedro Alves  <palves@redhat.com>
-
-	* linux-tdep.c (linux_find_memory_regions_full): Rename local
-	'private' to 'priv'.
-
-2015-05-15  Pedro Alves  <palves@redhat.com>
-
-	* nat/linux-nat.h: Include "target/waitstatus.h".
-
-2015-05-15  Yuanhui Zhang  <asmwarrior@gmail.com>
-
-	* python/py-unwind.c (struct reg_info): Move out of ...
-	(struct cached_frame_info): ... this scope.
-	(pending_frame_object_type, unwind_info_object_type): Make extern.
-
-2015-05-15  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_value_primitive_packed_val): Make sure
-	accumSize is never negative.
-
-2015-05-14  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-command.c: Remove include of <ctype.h>.
-	(tui_dispatch_ctrl_char): Remove workaround for xterm terminals.
-
-2015-05-13  Martin Galvan  <martin.galvan@tallertechnologies.com>
-
-	* dwarf2read.c (die_needs_namespace): Return 1 for
-	DW_TAG_inlined_subroutine.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* regcache.c (regcache_cpy_no_passthrough): New declaration.
-	(regcache_cpy_no_passthrough): Make it static, add function comment.
-	* regcache.h (regcache_dup, regcache_cpy): Reduce/update their comment.
-	(regcache_cpy_no_passthrough): Remove declaration.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* gdbthread.h (struct thread_control_state): Update comment for
-	proceed_to_finish.
-	* infcall.c (run_inferior_call): Update comment about
-	proceed_to_finish.
-	* infcmd.c (get_return_value): Update comment about stop_registers.
-	(finish_forward): Update comment about proceed_to_finish.
-	* infrun.c (stop_registers): Remove.
-	(clear_proceed_status, normal_stop): Remove stop_registers handling.
-	* infrun.h (stop_registers): Remove.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* infcall.c (struct dummy_frame_context_saver)
-	(dummy_frame_context_saver_data_free, dummy_frame_context_saver_dtor)
-	(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
-	(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
-	New.
-	(call_function_by_hand_dummy): Move discard_cleanups of
-	inf_status_cleanup before dummy_frame_push.  Call
-	dummy_frame_context_saver_setup and prepare context_saver_cleanup.
-	Use dummy_frame_context_saver_get_regs instead of stop_registers.
-	* infcall.h (struct dummy_frame_context_saver)
-	(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
-	(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
-	New declarations.
-	* infcmd.c: Include infcall.h.
-	(get_return_value): Add parameter ctx_saver, use it instead of
-	stop_registers.
-	(print_return_value): Add parameter ctx_saver, pass it.
-	(struct finish_command_continuation_args): Add field ctx_saver.
-	(finish_command_continuation): Update print_return_value caller.
-	(finish_command_continuation_free_arg): Free also ctx_saver.
-	(finish_forward): Call dummy_frame_context_saver_setup.
-	* inferior.h (struct dummy_frame_context_saver): New declaration.
-	(get_return_value): Add parameter ctx_saver.
-	* python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Update
-	get_return_value caller.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* dummy-frame.c (struct dummy_frame_dtor_list): New.
-	(struct dummy_frame): Replace dtor and dtor_data by dtor_list.
-	(remove_dummy_frame): Process dtor_list.
-	(pop_dummy_frame): Process dtor_list.
-	(register_dummy_frame_dtor): Maintain dtor_list.
-	(find_dummy_frame_dtor): Handle dtor_list.
-	* dummy-frame.h (register_dummy_frame_dtor, find_dummy_frame_dtor):
-	Update comments.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-run.c (do_module_cleanup): Add parameter
-	registers_valid.
-	(compile_object_run): Update do_module_cleanup caller.
-	* dummy-frame.c: Include infcall.h.
-	(struct dummy_frame): Update dtor comment.
-	(remove_dummy_frame): Call dtor.
-	(pop_dummy_frame): Update dtor caller.
-	* dummy-frame.h (dummy_frame_dtor_ftype): Add parameter
-	registers_valid.
-
-2015-05-13  Joel Brobecker  <brobecker@adacore.com>
-
-	GDB 7.9.1 released.
-
-2015-05-13  Joel Brobecker  <brobecker@adacore.com>
-
-	* NEWS: Create "Changes in GDB 7.9.1" section.  Move news about
-	Xmethods now being able to specify a result type to that new
-	sectioin.
-
-2015-05-13  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-win.c (tui_async_resize_screen): Clear win_resized
-	first before resizing the window.
-	* tui/tui.c (tui_enable): Likewise.
-
-2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* dummy-frame.c (struct dummy_frame): Use proper typedef for dtor.
-	* dummy-frame.h (dummy_frame_dtor_ftype): Add its comment.
-	* infcall.c (call_function_by_hand_dummy): Use proper typedef for
-	dummy_dtor parameter.
-	* infcall.h: Include dummy-frame.h.
-	(call_function_by_hand_dummy_dtor_ftype): Remove.
-	(call_function_by_hand_dummy): Use proper typedef for dummy_dtor
-	parameter.
-
-2015-05-13  Patrick Palka  <patrick@parcs.ath.cx>
-
-	PR gdb/17820
-	* top.c (history_size_setshow_var): Change type to signed.
-	Initialize to -2.  Update documentation.
-	(set_readline_history_size): Define.
-	(set_history_size_command): Use it.  Remove logic for handling
-	out-of-range sizes.
-	(init_history): Use set_readline_history_size().  Test for a
-	value of -2 instead of 0 when determining whether to set a
-	default history size.
-	(init_main): Decode the argument of the "size" command as a
-	zuinteger_unlimited.
-
-2015-05-12  Doug Evans  <dje@google.com>
-
-	* dwarf2read.c (struct file_entry): Tweak comments.
-	(get_debug_line_section): Tweak comments.
-
-2015-05-12  Don Breazeal  <donb@codesourcery.com>
-
-	* NEWS: Announce fork support in the RSP and support
-	for fork debugging in extended mode.
-
-2015-05-12  Don Breazeal  <donb@codesourcery.com>
-
-	* remote.c (remote_insert_fork_catchpoint): New function.
-	(remote_remove_fork_catchpoint): New function.
-	(remote_insert_vfork_catchpoint): New function.
-	(remote_remove_vfork_catchpoint): New function.
-	(pending_fork_parent_callback): New function.
-	(remove_new_fork_child): New function.
-	(remote_update_thread_list): Call remote_notif_get_pending_events
-	and remove_new_fork_child.
-	(extended_remote_kill): Kill fork child when killing the
-	parent before follow_fork completes.
-	(init_extended_remote_ops): Initialize target vector with
-	new fork catchpoint functions.
-
-2015-05-12  Don Breazeal  <donb@codesourcery.com>
-
-	* remote.c (remove_vfork_event_p): New function.
-	(remote_follow_fork): Add vfork event type to event checking.
-	(remote_parse_stop_reply): New stop reasons "vfork" and
-	"vforkdone" for RSP 'T' Stop Reply Packet.
-
-2015-05-12  Don Breazeal  <donb@codesourcery.com>
-
-	* linux-nat.c (linux_nat_ptrace_options): New function.
-	(linux_init_ptrace, wait_lwp, linux_nat_filter_event):
-	Call linux_nat_ptrace_options and use different argument to
-	linux_enable_event_reporting.
-	(_initialize_linux_nat): Delete call to
-	linux_ptrace_set_additional_flags.
-	* nat/linux-ptrace.c (current_ptrace_options): Rename to
-	supported_ptrace_options.
-	(additional_flags): Delete variable.
-	(linux_check_ptrace_features): Use supported_ptrace_options.
-	(linux_test_for_tracesysgood, linux_test_for_tracefork):
-	Likewise, and remove additional_flags check.
-	(linux_enable_event_reporting): Change 'attached' argument to
-	'options'.  Use supported_ptrace_options.
-	(ptrace_supports_feature): Change comment.  Use
-	supported_ptrace_options.
-	(linux_ptrace_set_additional_flags): Delete function.
-	* nat/linux-ptrace.h (linux_ptrace_set_additional_flags):
-	Delete function prototype.
-	* remote.c (remote_fork_event_p): New function.
-	(remote_detach_pid): New function.
-	(remote_detach_1): Call remote_detach_pid, don't mourn inferior
-	if doing detach-on-fork.
-	(remote_follow_fork): New function.
-	(remote_parse_stop_reply): Handle new "T" stop reason "fork".
-	(remote_pid_to_str): Print "process" strings for pid/0/0 ptids.
-	(init_extended_remote_ops): Initialize to_follow_fork.
-
-2015-05-12  Don Breazeal  <donb@codesourcery.com>
-
-	* nat/linux-ptrace.c (linux_check_ptrace_features): Change
-	from static to extern.
-	* nat/linux-ptrace.h (linux_check_ptrace_features): Declare.
-	* remote.c (anonymous enum): <PACKET_fork_event_feature,
-	* PACKET_vfork_event_feature>: New enumeration constants.
-	(remote_protocol_features): Add table entries for new packets.
-	(remote_query_supported): Add new feature queries to qSupported
-	packet.
-
-2015-05-12  Gary Benson <gbenson@redhat.com>
-
-	* remote.c (remote_add_inferior): Call exec_file_locate_attach
-	for fake PIDs as well as real ones.
-	(remote_pid_to_exec_file): Send empty annex if PID is fake.
-
-2015-05-09  Siva Chandra Reddy  <sivachandra@google.com>
-
-	* NEWS (Python Scripting): Mention the new gdb.Value methods.
-	* python/py-value.c (valpy_reference_value): New function.
-	(valpy_const_value): Likewise.
-	(value_object_methods): Add new methods.
-	* value.c (make_cv_value): New function.
-	* value.h (make_cv_value): Declare.
-
-2015-05-08  Yao Qi  <yao@codesourcery.com>
-	    Sandra Loosemore  <sandra@codesourcery.com>
-
-	* dwarf2read.c (setup_type_unit_groups): Do NULL pointer check
-	to 'lh->include_dirs' before accessing to it.
-	(psymtab_include_file_name): Likewise.
-	(dwarf_decode_lines_1): Likewise.
-	(dwarf_decode_lines): Likewise.
-	(file_file_name): Likewise.
-
-2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
-
-	* nios2-linux-tdep.c (NIOS2_SIGRETURN_TRAMP_ADDR): Define.
-	(NIOS2_SIGRETURN_REGSAVE_OFFSET): Define.
-	(nios2_linux_rt_sigreturn_init): Adjust base address of
-	register save area.
-
-2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
-
-	* nios2-tdep.c (nios2_breakpoint_from_pc): Revert to using
-	"trap 31" as the breakpoint instruction on all targets.
-
-2015-05-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* infcmd.c (print_return_value): Remove unused declaration.
-
-2015-05-08  Joel Brobecker  <brobecker@adacore.com>
-
-	* dwarf2read.c (attr_to_dynamic_prop)
-	<DW_AT_data_member_location>: Use read_type_die isntead of
-	get_die_type.
-
-2015-05-08  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_convert_actual): Add handling of formals
-	passed inside an aligner type.
-
-2015-05-08  Joel Brobecker  <brobecker@adacore.com>
-
-	* copyright.py (NOT_FSF_LIST): Remove sim/erc32 entries.
-
-2015-05-08  Siva Chandra Reddy  <sivachandra@google.com>
-
-	PR python/18291
-	* python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
-	Print xmethod matcher status.
-
-2015-05-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-nat.c (fill_gregset): Avoid relying on the PSWA
-	register in the regcache when treating the PSWM register, and vice
-	versa.
-
-2015-05-07  Gary Benson <gbenson@redhat.com>
-
-	* linux-thread-db.c (struct thread_db_info)
-	<td_ta_map_id2thr_p>: Remove field.
-	(try_thread_db_load_1): Remove initialization for the above.
-
-2015-05-07  Gary Benson <gbenson@redhat.com>
-
-	* linux-thread-db.c (struct thread_db_info)
-	<td_thr_validate_p>: Remove field.
-	(try_thread_db_load_1): Remove initialization for the above.
-
-2015-05-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-object-load.c (compile_object_load): Support
-	mst_text_gnu_ifunc.
-
-2015-05-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile.c (compile_to_object): Make the cmd_string parameter
-	const.  Use new variables for the const compatibility.
-	(eval_compile_command): Make the cmd_string parameter const.
-	* compile/compile.h (eval_compile_command): Make the cmd_string
-	parameter const.
-
-2015-05-06  Joel Brobecker  <brobecker@adacore.com>
-
-	* defs.h (deprecated_init_ui_hook): Delete.  Remove associated
-	comment.
-	* top.c (deprecated_init_ui_hook): Delete.
-	(gdb_init): Remove handling of deprecated_init_ui_hook.
-	* interps.c (clear_interpreter_hooks): Remove handling of
-	deprecated_init_ui_hook.
-	* main.c (captured_main): Update comment.
-
-2015-05-06  Joel Brobecker  <brobecker@adacore.com>
-
-	* solib.c (_initialize_solib): Add "info dll" alias creation.
-	* windows-nat.c (set_windows_aliases): Delete.
-	(_initialize_windows_nat): Remove deprecated_init_ui_hook
-	assignment.
-	* NEWS: Add news entry about "info dll" now being available
-	on all platforms.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (value_assign_to_component): Reformat and improve
-	documentation. Remove all trailing spaces.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* inline-frame.c (inline_frame_sniffer, skip_inline_frames):
-	Stop counting inlined frames as soon as an out-of-line function
-	is found.
-
-2014-05-05  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* dwarf2read.c (inherit_abstract_dies): Skip
-	DW_TAG_GNU_call_site dies while inheriting children of an
-	abstract DIE into a scope.
-	(read_lexical_block_scope): Inherit abstract DIE's for
-	lexical scopes.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-valprint.c (val_print_packed_array_elements): Delete
-	variable "len".  Add a type-length check when comparing two
-	consecutive elements of the array.  Use the element's actual
-	length in call to value_contents_eq.
-	* ada-lang.c (ada_value_primitive_packed_val): Always return
-	a value whose type has been resolved.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_value_primitive_packed_val): Recompute
-	BIT_SIZE and LEN if the size of the resolved type is smaller
-	than BIT_SIZE * HOST_CHAR_BIT.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_value_primitive_packed_val): Use a more
-	correct address in call to value_at.  Adjust call to
-	value_address accordingly.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-valprint.c (ada_val_print_1): Resolve TYPE before trying
-	to print it.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* dwarf2loc.h (struct property_addr_info): Add "valaddr" field.
-	* dwarf2loc.c (dwarf2_evaluate_property): Add handling of
-	pinfo->valaddr.
-	* gdbtypes.h (resolve_dynamic_type): Add "valaddr" parameter.
-	* gdbtypes.c (resolve_dynamic_struct): Set pinfo.valaddr.
-	(resolve_dynamic_type_internal): Set pinfo.valaddr.
-	Add handling of addr_stack->valaddr.
-	(resolve_dynamic_type): Add "valaddr" parameter.
-	Set pinfo.valaddr field.
-	* ada-lang.c (ada_discrete_type_high_bound): Update call to
-	resolve_dynamic_type.
-	(ada_discrete_type_low_bound): Likewise.
-	* findvar.c (default_read_var_value): Likewise.
-	* value.c (value_from_contents_and_address): Likewise.
-
-2015-05-05  Joel Brobecker  <brobecker@adacore.com>
-
-	* gdbtypes.c (resolve_dynamic_array): Use
-	create_array_type_with_stride instead of create_array_type.
-
-2015-04-30  DJ Delorie  <dj@redhat.com>
-
-	* rl78-tdep.c (rl78_analyze_prologue): Pass RL78_ISA_DEFAULT to
-	rl78_decode_opcode
-
-2015-04-29  Doug Evans  <dje@google.com>
-
-	PR python/18285
-	* NEWS: Document new gdb.XMethodWorker.get_result_type method.
-	* eval.c (evaluate_subexp_standard) <OP_FUNCALL>: Handle
-	EVAL_AVOID_SIDE_EFFECTS for xmethods.
-	* extension-priv.h (struct extension_language_ops)
-	<get_xmethod_result_type>: New member.
-	* extension.c (get_xmethod_result_type): New function.
-	* extension.h (get_xmethod_result_type): Declare.
-	* python/py-xmethods.c (get_result_type_method_name): New static
-	global.
-	(py_get_result_type_method_name): Ditto.
-	(gdbpy_get_xmethod_result_type): New function.
-	(gdbpy_initialize_xmethods): Initialize py_get_result_type_method_name.
-	* python/python-internal.h (gdbpy_get_xmethod_result_type): Declare.
-	* python/python.c (python_extension_ops): Add
-	gdbpy_get_xmethod_result_type.
-	* python/lib/gdb/xmethod.py (XMethodWorker): Add get_result_type.
-	* valarith.c (value_x_binop): Handle EVAL_AVOID_SIDE_EFFECTS for
-	xmethods.
-	(value_x_unop): Ditto.
-	* value.c (result_type_of_xmethod): New function.
-	* value.h (result_type_of_xmethod): Declare.
-
-2015-04-29  Gary Benson <gbenson@redhat.com>
-
-	* solib.c (solib_find_1): Allow fd argument to be NULL.
-	(exec_file_find): Update comment.
-	(solib_find): Likewise.
-	* exec.c (exec_file_locate_attach): Use NULL as fd
-	argument to exec_file_find to avoid having to close
-	the opened file.
-	* infrun.c (follow_exec): Likewise.
-
-2015-04-28  Doug Evans  <dje@google.com>
-
-	PR python/18299
-	* python/lib/gdb/printing.py (register_pretty_printer): Handle
-	name or __name__ attributes.  Handle gdb module as first argument.
-
-2015-04-28  Doug Evans  <dje@google.com>
-
-	PR python/18089
-	* python/py-prettyprint.c (print_children): Verify result of children
-	iterator.  Provide better error message.
-	* python/python-internal..h (gdbpy_print_python_errors_p): Declare.
-	* python/python.c (gdbpy_print_python_errors_p): New function.
-
-2015-04-28  Doug Evans  <dje@google.com>
-
-	* gdbtypes.h (struct cplus_struct_type) <n_baseclasses>: Fix comment.
-
-2015-04-28  Sasha Smundak  <asmundak@google.com>
-
-	* NEWS: Mention gdb.Type.optimized_out method.
-	* python/py-type.c (typy_optimized_out):  New function.
-
-2015-04-28  John Baldwin  <jhb@FreeBSD.org>
-
-	* fbsd-nat.c: Include "gdb_wait.h" instead of <sys/wait.h>.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* utils.c (init_page_info): Set rl_catch_sigwinch to zero.
-	(initialize_utils): Move call of init_page_info() to ...
-	* top.c (gdb_init): ... here.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-win.c (tui_sigwinch_handler): Remove now-stale comment.
-	(tui_sigwinch_handler): Still update our idea of
-	the terminal's width and height even when TUI is not active.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* utils.h (set_screen_width_and_height): Declare.
-	* utils.c (set_screen_width_and_height): Define.
-	* tui/tui-win.c (tui_update_gdb_sizes): Use it.
-
-2015-04-28  Gary Benson <gbenson@redhat.com>
-
-	* infrun.c (solist.h): New include.
-	(follow_exec): Use exec_file_find to prefix execd_pathname
-	with gdb_sysroot.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-source.c (tui_set_source_content): Avoid calling
-	strcpy() when offset is 0.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	PR gdb/18155
-	* tui/tui-data.c (tui_free_window): Don't free the locator
-	window when passed an SRC_WIN or a DISASSEM_WIN.
-
-2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-data.h (struct tui_win_element): Forward-declare.
-	(tui_win_content): Move declaration.
-	(struct tui_gen_win_info): Give 'content' field the
-	type tui_win_content.
-	* tui/tui-data.c (init_content_element): Remove redundant and
-	erroneous casts.
-	(tui_add_content_elements): Remove erroneous cast.
-	* tui/tui-disasm.c (tui_set_disassem_content): Remove redundant
-	casts.
-	(tui_get_begin_asm_address): Likewise.
-	* tui/tui-regs.c (tui_show_registers): Likewise.
-	(tui_show_register_group): Likewise.
-	(tui_display_registers_from): Likewise.
-	(tui_check_register_values): Likewise.
-	* tui/tui-source.c (tui_set_source_content): Likewise.
-	(tui_set_source_content_nil): Likewise.
-	(tui_source_is_displayed): Likewise.
-	* tui/tui-stack.c (tui_show_locator_content): Likewise.
-	(tui_set_locator_fullname): Likewise.
-	(tui_set_locator_info): Likewise.
-	(tui_show_frame_info): Likewise.
-	* tui/tui-winsource.c (tui_clear_source_content): Likewise.
-	(tui_show_source_line): Likewise.
-	(tui_horizontal_source_scroll): Likewise.
-	(tui_update_breakpoint_info): Likewise.
-	(tui_set_exec_info_content): Likewise.
-	(tui_show_exec_info_content): Likewise.
-	(tui_alloc_source_buffer): Likewise.
-	(tui_line_is_displayed): Likewise.
-	(tui_addr_is_displayed): Likewise.
-
-2015-04-27  John Baldwin  <jhb@FreeBSD.org>
-
-	* fbsd-nat.c: (fbsd_wait) [PL_FLAG_EXEC]: Report TARGET_WAITKIND_EXECD
-	event if PL_FLAG_EXEC is set.
-	[PL_FLAG_EXEC] (fbsd_insert_exec_catchpoint): New function.
-	[PL_FLAG_EXEC] (fbsd_remove_exec_catchpoint): New function.
-	(fbsd_nat_add_target) [PL_FLAG_EXEC]: Set
-	"to_insert_exec_catchpoint" to "fbsd_insert_exec_catchpoint".
-	Set "to_remove_exec_catchpoint" to "fbsd_remove_exec_catchpoint".
-
-2015-04-27  John Baldwin  <jhb@FreeBSD.org>
-
-	* fbsd-nat.c: [PT_LWPINFO] New variable super_wait.
-	[TDP_RFPPWAIT] New variable fbsd_pending_children.
-	[TDP_RFPPWAIT] (fbsd_remember_child): New function.
-	[TDP_RFPPWAIT] (fbsd_is_child_pending): New function.
-	[TDP_RFPPWAIT] (fbsd_fetch_kinfo_proc): New function.
-	[PT_LWPINFO] (fbsd_wait): New function.
-	[TDP_RFPPWAIT] (fbsd_follow_fork): New function.
-	[TDP_RFPPWAIT] (fbsd_insert_fork_catchpoint): New function.
-	[TDP_RFPPWAIT] (fbsd_remove_fork_catchpoint): New function.
-	[TDP_RFPPWAIT] (fbsd_insert_vfork_catchpoint): New function.
-	[TDP_RFPPWAIT] (fbsd_remove_vfork_catchpoint): New function.
-	[TDP_RFPPWAIT] (fbsd_enable_follow_fork): New function.
-	[TDP_RFPPWAIT] (fbsd_post_startup_inferior): New function.
-	[TDP_RFPPWAIT] (fbsd_post_attach): New function.
-	(fbsd_nat_add_target) [PT_LWPINFO] Set "to_wait" to
-	"fbsd_wait".
-	[TDP_RFPPWAIT] Set "to_follow_fork" to "fbsd_follow_fork".
-	Set "to_insert_fork_catchpoint" to "fbsd_insert_fork_catchpoint".
-	Set "to_remove_fork_catchpoint" to "fbsd_remove_fork_catchpoint".
-	Set "to_insert_vfork_catchpoint" to "fbsd_insert_vfork_catchpoint".
-	Set "to_remove_vfork_catchpoint" to "fbsd_remove_vfork_catchpoint".
-	Set "to_post_startup_inferior" to "fbsd_post_startup_inferior".
-	Set "to_post_attach" to "fbsd_post_attach".
-
-2015-04-27  John Baldwin  <jhb@FreeBSD.org>
-
-	* fbsd-nat.c (fbsd_pid_to_exec_file): Mark static.
-	(fbsd_find_memory_regions): Mark static.
-	(fbsd_nat_add_target): New function.
-	* fbsd-nat.h: Export fbsd_nat_add_target and remove prototypes for
-	fbsd_pid_to_exec_file and fbsd_find_memory_regions.
-	* amd64fbsd-nat.c (_initialize_amd64fbsd_nat): Use fbsd_nat_add_target.
-	* i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise.
-	* ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Likewise.
-	* sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Likewise.
-
-2015-04-27  Gary Benson <gbenson@redhat.com>
-
-	* objfiles.c (allocate_objfile): Do not attempt to expand name
-	if name is a "target:" filename.
-	* auto-load.c (load_auto_scripts_for_objfile): Do not attempt
-	to load auto-load scripts for objfiles with "target:" filenames.
-
-2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c: Include "elf/s390.h" and "elf-bfd.h".
-	(enum s390_vector_abi_kind): New enum.
-	(struct gdbarch_tdep)<vector_abi>: New field.
-	(s390_effective_inner_type): Add parameter min_size.  Stop
-	unwrapping if the inner type is smaller than min_size.
-	(s390_function_arg_float): Adjust call to
-	s390_effective_inner_type.
-	(s390_function_arg_vector): New function.
-	(s390_function_arg_integer): Adjust comment.
-	(struct s390_arg_state)<vr>: New field.
-	(s390_handle_arg): Add parameter 'is_unnamed'.  Pass vector
-	arguments according to vector ABI when appropriate.
-	(s390_push_dummy_call): Initialize the argument state's field
-	'vr'.  Adjust calls to s390_handle_arg.
-	(s390_register_return_value): Handle vector return values.
-	(s390_return_value): Apply the "register" return value convention
-	to a vector when appropriate.
-	(s390_gdbarch_init): Initialize tdep->vector_abi.
-	* NEWS: Announce S390 vector ABI support.
-
-2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (s390_return_value_convention): Remove
-	function.  Inline its logic...
-	(s390_return_value): ...here.  Instead, move the handling of the
-	"register" return value convention...
-	(s390_register_return_value): ...here.  New function.
-
-2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c
-	(is_float_singleton): Remove function.  Move the "singleton" part
-	of the logic...
-	(s390_effective_inner_type): ...here.  New function.
-	(is_float_like): Remove function.  Inline its logic...
-	(s390_function_arg_float): ...here.
-	(is_pointer_like, is_integer_like, is_struct_like): Remove
-	functions.  Inline their logic...
-	(s390_function_arg_integer): ...here.
-	(s390_function_arg_pass_by_reference): Remove function.
-	(extend_simple_arg): Remove function.
-	(alignment_of): Remove function.
-	(struct s390_arg_state): New structure.
-	(s390_handle_arg): New function.
-	(s390_push_dummy_call): Move parameter placement logic to the new
-	function s390_handle_arg.  Call it for calculating the stack area
-	sizes first, and again for actually writing the parameters.
-
-2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (is_power_of_two): Add comment.  Return
-	  false if the argument is zero.
-
-2015-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* ada-lang.c (template_to_static_fixed_type): Return input type
-	when it is already fixed.  Cache the input type itself when not
-	creating a static fixed copy.  Make it explicit that we never
-	molestate the input type.
-	* gdbtypes.c (resolve_dynamic_struct): Reset the
-	TYPE_TARGET_TYPE field for resolved copies.
-
-2015-04-27  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_is_tagged_type): Add call to ada_check_typedef.
-	(ada_lookup_struct_elt_type): Remove calls to ada_check_typedef.
-	(template_to_static_fixed_type): Call ada_check_typedef only
-	when necessary.
-
-2015-04-24  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* cli/cli-dump.c (srec_dump_command): Add internationalization
-	mark ups.
-	(ihex_dump_command): Likewise.
-	(tekhex_dump_command): Likewise.
-	(binary_dump_command): Likewise.
-	(binary_append_command): Likewise.
-
-2015-04-24  Andrew Burgess  <andrew.burgess@embecosm.com>
-
-	* cli/cli-dump.c (verilog_cmdlist): New variable.
-	(dump_verilog_memory): New function.
-	(dump_verilog_value): New function.
-	(verilog_dump_command): New function.
-	(_initialize_cli_dump): Add new commands to support verilog dump
-	format.
-	* NEWS: Add entry for "dump verilog".
-
-2015-04-24  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* gdbtypes.c (print_gnat_stuff): Do not recurse on the
-	descriptive type when there is none.
-
-2015-04-23  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-win.c (tui_async_resize_screen): Call
-	rl_resize_terminal().
-
-2015-04-22  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (handle_output_debug_string): Don't change
-	current_event.dwThreadId.
-	(get_windows_debug_event): Use thread_id, rather than relying on
-	current_event.dwThreadId being changed.
-
-2015-04-22  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (windows_continue): Report an error if
-	ContinueDebugEvent() fails.
-
-2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (windows_resume): Fix misspelling in debug output.
-
-2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (get_windows_debug_event): Replace retval with
-	thread_id throughout.  Update stale comment.
-
-2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* windows-nat.c (get_windows_debug_event): Don't use ternary
-	conditional operator.
-
-2015-04-21  Pierre Muller  <muller@sourceware.org>
-
-	PR pascal/17815
-	p-exp.y (yylex): Reorganize code to return the matched pattern
-	for a field of this.
-
-2015-04-21  Gary Benson <gbenson@redhat.com>
-
-	* common/fileio.h (fileio_to_host_openflags): New declaration.
-	* common/fileio.c (fcntl.h): New include.
-	(fileio_to_host_openflags): New function, factored out from...
-	* inf-child.c (inf_child_fileio_open_flags_to_host): ...here.
-	Single use updated.
-
-2015-04-21  Kevin Buettner  <kevinb@redhat.com>
-
-	* rl78-tdep.c (RL78_SP_ADDR): Define.
-	(opc_reg_to_gdb_regnum): New static function.
-	(rl78_analyze_prologue): Recognize instructions forming slightly
-	more interesting prologues.
-
-2015-04-20  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	Revert:
-	2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
-	* gdbtypes.c (is_dynamic_type_internal): Remove special handling of
-	TYPE_CODE_REF types so that they are not considered as dynamic
-	depending on the referenced type.
-	(resolve_dynamic_type_internal): Likewise.
-
-2015-04-20  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	Revert:
-	2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
-	* gdbtypes.c (is_dynamic_type_internal): Remove the unused
-	"top_level" parameter.
-	(resolve_dynamic_type_internal): Remove the unused "top_level"
-	parameter.  Update call to is_dynamic_type_internal.
-	(is_dynamic_type): Update call to is_dynamic_type_internal.
-	(resolve_dynamic_range): Update call to
-	resolve_dynamic_type_internal.
-	(resolve_dynamic_union): Likewise.
-	(resolve_dynamic_struct): Likewise.
-	(resolve_dynamic_type): Likewise.
-
-2015-04-19  Gabriel Krisman Bertazi  <gabriel@krisman.be>
-
-	* breakpoint.c (update_dprintf_command_list): Remove duplicated
-	xmalloc.
-
-2015-04-20  Thomas Schwinge  <thomas@codesourcery.com>
-
-	* reply_mig_hack.awk: Robustify parsing.
-
-	* reply_mig_hack.awk: Don't bother to declare an intermediate
-	function pointer variable.
-
-2015-04-17  Doug Evans  <dje@google.com>
-
-	* solib-svr4.c (svr4_exec_displacement): Rename outer "displacement"
-	to "exec_displacement" to avoid confusion with inner use of the name.
-
-2015-04-17  Pedro Alves  <palves@redhat.com>
-
-	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Return zero
-	if HW point of TYPE isn't supported.
+	* dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
+	(dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
+	(show_entry_values_debug, call_site_to_target_addr)
+	(func_addr_to_tail_call_list, func_verify_no_selftailcall)
+	(dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
+	(entry_data_value_free_closure, value_of_dwarf_reg_entry)
+	(value_of_dwarf_block_entry, indirect_pieced_value)
+	(symbol_needs_eval_context::push_dwarf_reg_entry_value):
+	(disassemble_dwarf_expression): Likewise.
+	* dwarf2read.c (process_die, inherit_abstract_dies)
+	(read_call_site_scope): Likewise.
+	* gdbtypes.h (struct func_type, struct call_site_parameter)
+	(struct call_site): Likewise.
+	* stack.c (read_frame_arg): Likewise.
+	* std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* defs.h (read_unsigned_leb128): New declaration.
+	* dwarf2loc.c (decode_debug_loclists_addresses): New function.
+	(decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
+	(dwarf2_find_location_expression): Call also
+	decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
+	* dwarf2loc.h (dwarf2_version): New declaration.
+	* dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
+	rnglists.
+	(dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
+	.debug_rnglists.
+	(struct dwop_section_names): Add loclists_dwo.
+	(dwop_section_names): Add .debug_loclists.dwo.
+	(struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
+	(struct dwarf2_per_cu_data): Add dwarf_version.
+	(struct dwo_sections): Add loclists.
+	(struct attr_abbrev): Add implicit_const.
+	(read_indirect_line_string): New declaration.
+	(read_unsigned_leb128): Delete declaration.
+	(rcuh_kind): New definition.
+	(read_and_check_comp_unit_head): Change parameter
+	is_debug_types_section to section_kind.
+	(dwarf2_locate_sections): Handle loclists, line_str and rnglists.
+	(read_comp_unit_head): Change parameter abfd to section, add parameter
+	section_kind.  Handle DWARF-5.
+	(error_check_comp_unit_head): Accept also DWARF version 5.
+	(read_and_check_comp_unit_head): Change parameter
+	is_debug_types_section to section_kind.
+	(read_and_check_type_unit_head): Delete function.
+	(read_abbrev_offset): Handle DWARF-5.
+	(create_debug_type_hash_table): Add parameter section_kind.  Process
+	only DW_UT_type.  Use signature and type_offset_in_tu from struct
+	comp_unit_head.
+	(create_debug_types_hash_table): Update create_debug_type_hash_table
+	caller.
+	(create_all_type_units): Call create_debug_type_hash_table.
+	(read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
+	read_and_check_type_unit_head caller to read_and_check_comp_unit_head
+	caller.
+	(skip_one_die): Handle DW_FORM_implicit_const.
+	(dwarf2_rnglists_process): New function.
+	(dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
+	(abbrev_table_read_table): Handle DW_FORM_implicit_const.
+	(read_attribute_value): Handle DW_FORM_implicit_const,
+	DW_FORM_line_strp.
+	(read_attribute): Handle DW_FORM_implicit_const.
+	(read_indirect_string_at_offset_from): New function from
+	read_indirect_string_at_offset.
+	(read_indirect_string_at_offset): Call
+	read_indirect_string_at_offset_from.
+	(read_indirect_line_string_at_offset): New function.
+	(read_indirect_string): New function comment.
+	(read_indirect_line_string): New function.
+	(read_unsigned_leb128): Make it global.
+	(dwarf2_string_attr): Handle DWARF-5.
+	(add_include_dir_stub, read_formatted_entries): New functions.
+	(dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
+	Handle DWARF-5.
+	(per_cu_header_read_in): Update read_comp_unit_head caller.
+	(dwarf2_version): New function.
+	* symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
+	rnglists.
+	* xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
+	fields.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (abbrev_table_read_table): Read the data only once.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (dwarf2_ranges_process): New function from
+	dwarf2_ranges_read.
+	(dwarf2_ranges_read, dwarf2_record_block_ranges): Use
+	dwarf2_ranges_process.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (create_debug_type_hash_table): New function from
+	create_debug_types_hash_table.
+	(create_debug_types_hash_table): Call create_debug_type_hash_table.
+	(create_all_type_units, open_and_init_dwo_file): Update
+	create_debug_types_hash_table callers.
+
+2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR gdb/16188
+	* fork-child.c (trace_start_error): Fix thinko.  va_end should
+	refer to 'ap', not 'args'.
 
-2015-04-17  Yao Qi  <yao.qi@linaro.org>
+2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
 	    Pedro Alves  <palves@redhat.com>
 
-	* target.h (target_can_use_hardware_watchpoint): Update comments.
-	Remove trailing ";".
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* remote.c (remote_add_inferior): New argument try_open_exec.
-	If nonzero, attempt to open the inferior's executable file as
-	the main executable if no main executable is open already.
-	All callers updated.
-	* NEWS: Mention that GDB now supports automatic location and
-	retrieval of executable + files from remote targets.
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* target.h (TARGET_OBJECT_EXEC_FILE): New enum value.
-	* remote.c (PACKET_qXfer_exec_file): Likewise.
-	(remote_protocol_features): Register the
-	"qXfer:exec-file:read" feature.
-	(remote_xfer_partial): Handle TARGET_OBJECT_EXEC_FILE.
-	(remote_pid_to_exec_file): New function.
-	(init_remote_ops): Initialize to_pid_to_exec_file.
-	(_initialize_remote): Register new "set/show remote
-	pid-to-exec-file-packet" command.
-	* NEWS: Announce new qXfer:exec-file:read packet.
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* nat/linux-procfs.h (linux_proc_pid_to_exec_file):
-	New declaration.
-	* nat/linux-procfs.c (linux_proc_pid_to_exec_file):
-	New function, factored out from...
-	* linux-nat.c (linux_child_pid_to_exec_file): ...here.
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* exec.c (solist.h): New include.
-	(exec_file_locate_attach): Prefix absolute executable
-	paths with gdb_sysroot if set.
-	* NEWS: Mention that executable paths may be prepended
-	with sysroot.
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* solist.h (exec_file_find): New declaration.
-	* solib.c (solib_find_1): New function, factored out from...
-	(solib_find): ...here.
-	(exec_file_find): New function.
-
-2015-04-17  Gary Benson <gbenson@redhat.com>
-
-	* gdbcore.h (exec_file_locate_attach): New declaration.
-	* exec.c (exec_file_locate_attach): New function, factored
-	out from...
-	* infcmd.c (attach_command_post_wait): ...here.
-
-2015-04-17  Mike Frysinger  <vapier@gentoo.org>
-
-	* MAINTAINERS: Add myself for Blackfin/write-after-approval.
-
-2015-04-16  Yao Qi  <yao.qi@linaro.org>
-
-	* infrun.c (maybe_software_singlestep): Declare.
-	(displaced_step_fixup): Call maybe_software_singlestep.
-
-2015-04-15  Doug Evans  <dje@google.com>
-
-	* psymtab.c (psym_expand_symtabs_matching): Add QUIT call.
-
-2015-04-15  Doug Evans  <dje@google.com>
-
-	* dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
-
-2015-04-15  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* python/lib/gdb/command/unwinders.py: Add parentheses.
-
-2015-04-15  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-tdep.c (arm_linux_copy_svc): Update debug message.
-
-2015-04-15  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-tdep.c (arm_linux_copy_svc): Fix indentation.
-
-2015-04-15  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-linux-tdep.c (arm_linux_cleanup_svc): Use
-	dsc->insn_size instead of 4.
-
-2015-04-14  Gary Benson <gbenson@redhat.com>
-
-	* jit.c (mem_bfd_iovec_stat): Zero supplied buffer.
-	* minidebug.c (lzma_stat): Likewise.
-	* solib-spu.c (spu_bfd_iovec_stat): Likewise.
-	* spu-linux-nat.c (spu_bfd_iovec_stat): Likewise.
-
-2015-04-13  Stan Shebs  <stanshebs@google.com>
-
-	* MAINTAINERS: Update my email address.
-
-2015-04-13  John Baldwin  <jhb@FreeBSD.org>
-
-	* amd64-tdep.c (amd64_target_description): New function.
-	* amd64-tdep.h: Export amd64_target_description and tdesc_amd64.
-	* amd64bsd-nat.c [PT_GETXSTATE_INFO]: New variable amd64bsd_xsave_len.
-	(amd64bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
-	x86 extended save area.
-	(amd64bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
-	* amd64bsd-nat.h: Export amd64bsd_xsave_len.
-	* amd64fbsd-nat.c (amd64fbsd_read_description): New function.
-	(_initialize_amd64fbsd_nat): Set "to_read_description" to
-	"amd64fbsd_read_description".
-	* amd64fbsd-tdep.c (amd64fbsd_core_read_description): New function.
-	(amd64fbsd_supply_xstateregset): New function.
-	(amd64fbsd_collect_xstateregset): New function.
-	Add "amd64fbsd_xstateregset".
-	(amd64fbsd_iterate_over_regset_sections): New function.
-	(amd64fbsd_init_abi): Set "xsave_xcr0_offset" to
-	"I386_FBSD_XSAVE_XCR0_OFFSET".
-	Add "iterate_over_regset_sections" gdbarch method.
-	Add "core_read_description" gdbarch method.
-	* i386-tdep.c (i386_target_description): New function.
-	* i386-tdep.h: Export i386_target_description and tdesc_i386.
-	* i386bsd-nat.c [PT_GETXSTATE_INFO]: New variable i386bsd_xsave_len.
-	(i386bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
-	x86 extended save area.
-	(i386bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
-	* i386bsd-nat.h: Export i386bsd_xsave_len.
-	* i386fbsd-nat.c (i386fbsd_read_description): New function.
-	(_initialize_i386fbsd_nat): Set "to_read_description" to
-	"i386fbsd_read_description".
-	* i386fbsd-tdep.c (i386fbsd_core_read_xcr0): New function.
-	(i386fbsd_core_read_description): New function.
-	(i386fbsd_supply_xstateregset): New function.
-	(i386fbsd_collect_xstateregset): New function.
-	Add "i386fbsd_xstateregset".
-	(i386fbsd_iterate_over_regset_sections): New function.
-	(i386fbsd4_init_abi): Set "xsave_xcr0_offset" to
-	"I386_FBSD_XSAVE_XCR0_OFFSET".
-	Add "iterate_over_regset_sections" gdbarch method.
-	Add "core_read_description" gdbarch method.
-	* i386fbsd-tdep.h: New file.
-
-2015-04-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* NEWS (Changes since GDB 7.9): Add removed -xdb.
-	* breakpoint.c (command_line_is_silent): Remove xdb_commands
-	conditional.
-	(_initialize_breakpoint): Remove xdb_commands for bc, ab, sb, db, ba
-	and lb.
-	* cli/cli-cmds.c (_initialize_cli_cmds): Remove xdb_commands for v and
-	va.
-	* cli/cli-decode.c (find_command_name_length): Remove xdb_commands
-	conditional.
-	* defs.h (xdb_commands): Remove declaration.
-	* f-valprint.c (_initialize_f_valprint): Remove xdb_commands for lc.
-	* guile/scm-cmd.c (command_classes): Remove xdb from comment.
-	* infcmd.c (run_no_args_command, go_command): Remove.
-	(_initialize_infcmd): Remove xdb_commands for S, go, g, R and lr.
-	* infrun.c (xdb_handle_command): Remove.
-	(_initialize_infrun): Remove xdb_commands for lz and z.
-	* main.c (xdb_commands): Remove variable.
-	(captured_main): Remove "xdb" from long_options.
-	(print_gdb_help): Remove --xdb from help.
-	* python/py-cmd.c (gdbpy_initialize_commands): Remove xdb from comment.
-	* source.c (_initialize_source): Remove xdb_commands for D, ld, / and ?.
-	* stack.c (backtrace_full_command, args_plus_locals_info)
-	(current_frame_command): Remove.
-	(_initialize_stack): Remove xdb_commands for t, T and l.
-	* symtab.c (_initialize_symtab): Remove xdb_commands for lf and lg.
-	* thread.c (_initialize_thread): Remove xdb_commands condition.
-	* tui/tui-layout.c (tui_toggle_layout_command)
-	(tui_toggle_split_layout_command, tui_handle_xdb_layout): Remove.
-	(_initialize_tui_layout): Remove xdb_commands for td and ts.
-	* tui/tui-regs.c (tui_scroll_regs_forward_command)
-	(tui_scroll_regs_backward_command): Remove.
-	(_initialize_tui_regs): Remove xdb_commands for fr, gr, sr, +r and -r.
-	* tui/tui-win.c (tui_xdb_set_win_height_command): Remove.
-	(_initialize_tui_win): Remove xdb_commands for U and w.
-	* utils.c (pagination_on_command, pagination_off_command): Remove.
-	(initialize_utils): Remove xdb_commands for am and sm.
-
-2015-04-10  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (displaced_step_fixup): Switch to the event ptid
-	earlier.  If the thread stopped for a watchpoint and the
-	target/arch has non-continuable watchpoints, cancel the displaced
-	step.
-	(resume): Don't start a displaced step if in-line step-over info
-	is valid.
-
-2015-04-10  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (displaced_step_in_progress): New function.
-	(do_target_resume): Advise target to report all signals if
-	displaced stepping.
-
-2015-04-10  Pedro Alves  <palves@redhat.com>
-
-	PR gdb/18216
-	* infrun.c (process_event_stop_test): Don't assume a step-resume
-	is set if tp->stepped_breakpoint is true.
-
-2015-04-10  Yao Qi  <yao.qi@linaro.org>
-
-	* arm-tdep.c (install_alu_reg): Update comment.
-	(thumb_copy_alu_reg): Remove local variable rn.  Update
-	debugging message.  Use r2 instead of r1 in the modified
-	instruction.
-
-2015-04-10  Pedro Alves  <palves@redhat.com>
-
-	PR gdb/13858
-	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Install
-	linux_displaced_step_location as gdbarch_displaced_step_location
-	hook.
-	* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
-	* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
-	* linux-tdep.c (linux_displaced_step_location): New function,
-	based on ppc_linux_displaced_step_location.
-	* linux-tdep.h (linux_displaced_step_location): New declaration.
-	* ppc-linux-tdep.c (ppc_linux_entry_point_addr): Delete.
-	(ppc_linux_inferior_created, ppc_linux_displaced_step_location):
-	Delete.
-	(ppc_linux_init_abi): Install linux_displaced_step_location as
-	gdbarch_displaced_step_location hook, even without Cell/B.E..
-	(_initialize_ppc_linux_tdep): Don't install
-	ppc_linux_inferior_created as inferior_created observer.
-	* s390-linux-tdep.c (s390_gdbarch_init): Install
-	linux_displaced_step_location as gdbarch_displaced_step_location
-	hook.
-
-2015-04-09  Gary Benson <gbenson@redhat.com>
-
-	* common/common-remote-fileio.h: Rename to...
-	* common/fileio.h: ...this.  Update all references.
-	(remote_fileio_to_fio_error): Rename to...
-	(host_to_fileio_error): ...this.
-	(remote_fileio_to_be): Rename to...
-	(host_to_bigendian): ...this.  Update all callers.
-	(remote_fileio_to_fio_uint): Rename to...
-	(host_to_fileio_uint): ...this.  Update all callers.
-	(remote_fileio_to_fio_time): Rename to...
-	(host_to_fileio_time): ...this.  Update all callers.
-	(remote_fileio_to_fio_stat): Rename to...
-	(host_to_fileio_stat): ...this.
-	Update all references.
-	* common/common-remote-fileio.c: Rename to...
-	* common/fileio.c: ...this.  Update all references.
-	(remote_fileio_to_fio_error): Rename to...
-	(host_to_fileio_error): ...this.  Update all callers.
-	(remote_fileio_mode_to_target): Rename to...
-	(fileio_mode_pack): ...this.  Update all callers.
-	(remote_fileio_to_fio_mode): Rename to...
-	(host_to_fileio_mode): ...this.  Update all callers.
-	(remote_fileio_to_fio_ulong): Rename to...
-	(host_to_fileio_ulong): ...this.  Update all callers.
-	(remote_fileio_to_fio_stat): Rename to...
-	(host_to_fileio_stat): ...this.  Update all callers.
-
-2015-04-09  Andy Wingo  <wingo@igalia.com>
-
-	* guile/scm-frame.c (gdbscm_frame_read_register): New function.
-	(frame_functions): Bind gdbscm_frame_read_register to
-	frame-read-register.
-	* guile/lib/gdb.scm (frame-read-register): Export.
-
-2015-04-09  Gary Benson <gbenson@redhat.com>
-
-	* common/common-remote-fileio.h (remote_fileio_to_fio_error):
-	New declaration.
-	* common/common-remote-fileio.c (remote_fileio_to_fio_error):
-	New function, factored out the named functions below.
-	* inf-child.c (gdb/fileio.h): Remove include.
-	(common-remote-fileio.h): New include.
-	(inf_child_errno_to_fileio_error): Remove function.  Update
-	all callers to use remote_fileio_to_fio_error.
-	* remote-fileio.c (remote_fileio_errno_to_target): Likewise.
-
-2015-04-09  Andy Wingo  <wingo@igalia.com>
-
-	* MAINTAINERS (Write After Approval): Add Andy Wingo.
-
-2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* acinclude.m4: (GDB_AC_CHECK_BFD): Set ZLIBDIR with $zlibdir.
-	Replace $zlibdir with $ZLIBDIR in LDFLAGS.
-	* configure: Regenerated.
-
-2015-04-09  Pedro Alves  <palves@redhat.com>
-
-	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add strtok_r.
-	* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/strtok_r.m4.
-	* gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: Regenerate.
-	* gnulib/import/Makefile.am: Update.
-	* gnulib/import/Makefile.in: Update.
-	* gnulib/import/m4/gnulib-cache.m4: Update.
-	* gnulib/import/m4/gnulib-comp.m4: Update.
-	* gnulib/import/m4/strtok_r.m4: New file.
-	* gnulib/import/strtok_r.c: New file.
-
-2015-04-09  Pedro Alves  <palves@redhat.com>
-
-	* gnulib/update-gnulib.sh (aclocal version check): Filter out
-	"called too early to check prototype".
-
-2015-04-08  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	PR python/16699
-	* python/py-cmd.c (cmdpy_completer_helper): Adjust function to not
-	use a caching mechanism.  Adjust comments and code to reflect
-	that.  Replace 'sizeof' by 'strlen' when fetching 'wordobj'.
-	(cmdpy_completer_handle_brkchars): Adjust call to
-	cmdpy_completer_helper.  Call Py_XDECREF for 'resultobj'.
-	(cmdpy_completer): Likewise.
-
-2015-04-08  Yao Qi  <yao.qi@linaro.org>
-
-	* spu-tdep.c (spu_gdbarch_init): Don't call
-	set_gdbarch_cannot_step_breakpoint.
-
-2015-04-07  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* linux-tdep.c (decode_vmflags): Initialize 'saveptr'.
-
-2015-04-07  Pedro Alves  <palves@redhat.com>
-
-	* gdbthread.h (ALL_NON_EXITED_THREADS_SAFE): Rename to ...
-	(ALL_THREADS_SAFE): ... this, and don't skip exited threads.
-	(delete_exited_threads): New declaration.
-	* infrun.c (follow_exec): Use ALL_THREADS_SAFE.
-	* linux-nat.c (linux_nat_update_thread_list): New function.
-	(linux_nat_add_target): Install it.
-	* remote.c (remote_update_thread_list): Use ALL_THREADS_SAFE.
-	* thread.c (prune_threads): Use ALL_THREADS_SAFE.
-	(delete_exited_threads): New function.
-
-2015-04-07  Pedro Alves  <pedro@codesourcery.com>
-
-	* infrun.c (resume) <displaced stepping debug output>: Get the
-	leader thread's regcache, not resume_ptid's.
-
-2015-04-06  Doug Evans  <xdje42@gmail.com>
-
-	* symtab.c (hash_symbol_entry): Hash STRUCT_DOMAIN symbols as
-	VAR_DOMAIN.
-	(symbol_cache_lookup): Clarify use of bsc_ptr, slot_ptr parameters.
-	Include symbol domain in debugging output.
-
-2015-04-06  Pedro Alves  <palves@redhat.com>
-	    Bernd Edlinger  <bernd.edlinger@hotmail.de>
-
-	* configure.ac: Remove the mingw32-specific stub-termcap.o
-	fallback, and instead fallback to the stub termcap on all hosts.
-	* configure: Regenerate.
-	* stub-termcap.c [!__MINGW32__] (PC, BC, UP): Define as weak
-	symbols.
-
-2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* gdbtypes.c (is_dynamic_type_internal): Remove the unused
-	"top_level" parameter.
-	(resolve_dynamic_type_internal): Remove the unused "top_level"
-	parameter.  Update call to is_dynamic_type_internal.
-	(is_dynamic_type): Update call to is_dynamic_type_internal.
-	(resolve_dynamic_range): Update call to
-	resolve_dynamic_type_internal.
-	(resolve_dynamic_union): Likewise.
-	(resolve_dynamic_struct): Likewise.
-	(resolve_dynamic_type): Likewise.
-
-2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* gdbtypes.c (is_dynamic_type_internal): Remove special handling of
-	TYPE_CODE_REF types so that they are not considered as dynamic
-	depending on the referenced type.
-	(resolve_dynamic_type_internal): Likewise.
-
-2015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.in (top_srcdir): New.
-	* configure: Regenerated.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* NEWS: Announce the new default sysroot of "target:".
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* main.c (captured_main): Set gdb_sysroot to "target:"
-	if not otherwise set.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* exec.c (exec_file_attach): Support "target:" filenames.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* solib.c (solib_find): Strip "target:" prefix from sysroot
-	if accessing local files.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* symfile.c (symfile_bfd_open): Reorder to remove duplicated
-	checks and error messages.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* remote.h (REMOTE_SYSROOT_PREFIX): Remove definition.
-	(remote_filename_p): Remove declaration.
-	(remote_bfd_open): Likewise.
-	* remote.c (remote_bfd_iovec_open): Remove function.
-	(remote_bfd_iovec_close): Likewise.
-	(remote_bfd_iovec_pread): Likewise.
-	(remote_bfd_iovec_stat): Likewise.
-	(remote_filename_p): Likewise.
-	(remote_bfd_open): Likewise.
-	* symfile.h (gdb_bfd_open_maybe_remote): Remove declaration.
-	* symfile.c (separate_debug_file_exists): Use gdb_bfd_open.
-	(gdb_bfd_open_maybe_remote): Remove function.
-	(symfile_bfd_open):  Replace remote filename check with
-	target filename check.
-	(reread_symbols): Use gdb_bfd_open.
-	* build-id.c (gdbcore.h): New include.
-	(build_id_to_debug_bfd): Use gdb_bfd_open.
-	* infcmd.c (attach_command_post_wait): Remove remote filename
-	check.
-	* solib.c (solib_find): Replace remote-specific handling with
-	target-specific handling.  Update comments where necessary.
-	(solib_bfd_open): Replace remote-specific handling with
-	target-specific handling.
-	(gdb_sysroot_changed): New function.
-	(_initialize_solib): Call the above when gdb_sysroot changes.
-	* windows-tdep.c (gdbcore.h): New include.
-	(windows_xfer_shared_library): Use gdb_bfd_open.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* gdb/gdb_bfd.h (TARGET_SYSROOT_PREFIX): New definition.
-	(is_target_filename): New declaration.
-	(gdb_bfd_has_target_filename): Likewise.
-	(gdb_bfd_open): Update documentation comment.
-	* gdb_bfd.c (target.h): New include.
-	(gdb/fileio.h): Likewise.
-	(is_target_filename): New function.
-	(gdb_bfd_has_target_filename): Likewise.
-	(fileio_errno_to_host): Likewise.
-	(gdb_bfd_iovec_fileio_open): Likewise.
-	(gdb_bfd_iovec_fileio_pread): Likewise.
-	(gdb_bfd_iovec_fileio_close): Likewise.
-	(gdb_bfd_iovec_fileio_fstat): Likewise.
-	(gdb_bfd_open): Use target fileio to access paths prefixed
-	with "target:" where necessary.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
-
-	* target.h (struct target_ops) <to_filesystem_is_local>:
-	New field.
-	(target_filesystem_is_local): New macro.
+	PR gdb/16188
+	* darwin-nat.c (darwin_ptrace_me): Check if calls to system
+	calls succeeded.
+	* fork-child.c (trace_start_error): New function.
+	(trace_start_error_with_name): Likewise.
+	* gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
+	* inf-ptrace.c (inf_ptrace_me): Likewise.
+	* inferior.h (trace_start_error): New prototype.
+	(trace_start_error_with_name): Likewise.
+
+2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR gdb/21164
+	* psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
+	NULL before using it.
+	* symmisc.c (maintenance_print_symbols): Likewise.
+	(maintenance_print_msymbols): Likewise.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* NEWS: Add record Python bindings entry.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
+	py-record-full.o.
+	(SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
+	* python/py-record-btrace.c, python/py-record-btrace.h,
+	python/py-record-full.c, python/py-record-full.h: New file.
+	* python/py-record.c: Add include for py-record-btrace.h and
+	py-record-full.h.
+	(recpy_method, recpy_format, recpy_goto, recpy_replay_position,
+	recpy_instruction_history, recpy_function_call_history, recpy_begin,
+	recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
+	* python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
+	New definition.
+	(gdbpy_initialize_btrace): New export.
+	* python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
+	(SUBDIR_PYTHON_SRCS): Add python/py-record.c.
+	* python/py-record.c: New file.
+	* python/python-internal.h (gdbpy_start_recording,
+	gdbpy_current_recording, gdpy_stop_recording,
+	gdbpy_initialize_record): New export.
+	* python/python.c (_initialize_python): Add gdbpy_initialize_record.
+	(python_GdbMethods): Add gdbpy_start_recording,
+	gdbpy_current_recording and gdbpy_stop_recording.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* record-btrace.c (record_btrace_record_method): New function.
+	(init_record_btrace_ops): Initialize to_record_method.
+	* record-full.c (record_full_record_method): New function.
+	(init_record_full_ops, init_record_full_core_ops): Add
+	record_full_record_method.
+	* record.h (enum record_method): New enum.
+	* target-debug.h (target_debug_print_enum_record_method: New define.
 	* target-delegates.c: Regenerate.
-	* remote.c (remote_filesystem_is_local): New function.
-	(init_remote_ops): Initialize to_filesystem_is_local.
-
-2015-04-02  Gary Benson <gbenson@redhat.com>
+	* target.c (target_record_method): New function.
+	* target.h: Include record.h.
+	(struct target_ops) <to_record_method>: New field.
+	(target_record_method): New export.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* record.h (record_start, record_stop): New export.
+	* record.c (record_start, record_stop): New function.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* btrace.c (btrace_fetch): Copy function call segments pointer
+	into a vector.
+	(btrace_clear): Clear the vector.
+	(btrace_find_insn_by_number): Use binary search to find the correct
+	function call segment.
+	* btrace.h (brace_fun_p): New typedef.
+	(struct btrace_thread_info) <functions>: New field.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
+	* btrace.c (btrace_decode_error): ... here.  New function.
+	* btrace.h (btrace_decode_error): New export.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
+	(ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
+	btrace_find_insn_by_number): Remove special case for gaps.
+	* btrace.h (btrace_insn_get_error): New export.
+	(btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
+	* record-btrace.c (btrace_insn_history): Print number for gaps.
+	(record_btrace_info, record_btrace_goto): Handle gaps.
+
+2017-02-14  Tom Tromey  <tom@tromey.com>
+
+	PR python/13598:
+	* python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
+	event.
+	* python/py-evts.c (gdbpy_initialize_py_events): Add
+	before_prompt registry.
+	* python/py-events.h (events_object) <before_prompt>: New field.
+
+2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_new_switch): Preserve up link and flags.
+
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* symfile (_initialize_symfile): Add usage text to the load command's
+	help text.
+
+2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* utils.c (defaulted_query): Don't query on secondary UIs.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (rust_get_disr_info): Remove unused variable.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (valpy_richcompare_throw): Remove unnecessary
+	"cleanup" local.
+	* python/py-type.c (typy_legacy_template_argument): Remove
+	unnecessary "cleanup" local.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* python/python.c (do_start_initialization): New function, from
+	_initialize_python.
+	(_initialize_python): Call do_start_initialization.
+	* python/py-linetable.c (ltpy_iternext): Use explicit returns, not
+	goto.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-prettyprint.c (pretty_print_one_value): Use
+	gdbpy_ref.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
+	* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
+	gdbpy_ref.
+	* python/py-type.c (field_new): Use gdbpy_ref.
+	* python/py-symtab.c (symtab_and_line_to_sal_object): Use
+	gdbpy_ref.
+	* python/py-progspace.c (pspy_new): Use gdbpy_ref.
+	(py_free_pspace): Likewise.
+	(pspace_to_pspace_object): Likewise.
+	* python/py-objfile.c (objfpy_new): Use gdbpy_ref.
+	(py_free_objfile): Likewise.
+	(objfile_to_objfile_object): Likewise.
+	* python/py-inferior.c (delete_thread_object): Use
+	gdbpy_ref.
+	(infpy_read_memory): Likewise.
+	(py_free_inferior): Likewise.
+	* python/py-evtregistry.c (create_eventregistry_object): Use
+	gdbpy_ref.
+	* python/py-event.c (create_event_object): Use gdbpy_ref.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-ref.h (gdbpy_ref_policy): Now a template.
+	(gdbpy_ref): Now a template; allow subclasses of PyObject to be
+	used.
+	* python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
+	python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
+	python/py-exitedevent.c, python/py-finishbreakpoint.c,
+	python/py-framefilter.c, python/py-function.c,
+	python/py-inferior.c, python/py-infevents.c,
+	python/py-linetable.c, python/py-newobjfileevent.c,
+	python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
+	python/py-signalevent.c, python/py-stopevent.c,
+	python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
+	python/py-unwind.c, python/py-utils.c, python/py-value.c,
+	python/py-varobj.c, python/py-xmethods.c, python/python.c,
+	varobj.c: Change gdbpy_ref to gdbpy_ref<>.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* ui-out.h (ui_out_emit_type): New class.
+	(ui_out_emit_tuple, ui_out_emit_list): New typedefs.
+	* python/py-framefilter.c (py_print_single_arg): Use gdb::optional
+	and ui_out_emit_tuple.
+	(enumerate_locals): Likewise.
+	(py_mi_print_variables, py_print_locals, py_print_args): Use
+	ui_out_emit_list.
+	(py_print_frame): Use gdb::optional, ui_out_emit_tuple,
+	ui_out_emit_list.
+	* common/gdb_optional.h: New file.
+
+2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
+
+	* MAINTAINERS (Write After Approval): Update my e-mail address.
+
+2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
+
+	PR gdb/21122
+	* breakpoint.c (_initialize_breakpoint): Update the help description
+	of the 'commands' command to indicate that it takes a list argument.
+
+2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* interps.c (current_interp_set_logging): Remove "return".
+
+2017-02-09  Gary Benson  <gbenson@redhat.com>
+
+	* symtab.c (add_symtab_completions): Prevent NULL pointer
+	dereference.
+
+2017-02-08  Pedro Alves  <palves@redhat.com>
+
+	* interps.c (interp::interp): Remove reference to quiet_p.
+	(interp_set): Make static.  Remove dead "Switching to" output
+	code.
+	(interp_quiet_p, interp_set_quiet): Delete.
+	(interpreter_exec_cmd): Don't set the interpreter quiet.
+	* interps.h (interp_quiet_p): Make static.
+	(class interp) <quiet_p>: Remove field
+
+2017-02-08  Jerome Guitton  <guitton@adacore.com>
+
+	* cli/cli-decode.c (find_command_name_length): Make it extern.
+	* cli/cli-decode.h (find_command_name_length): Declare.
+	* cli/cli-script.c (command_name_equals, line_first_arg):
+	New functions.
+	(process_next_line): Use cli-decode to parse command names.
+	(build_command_line): Make args a constant pointer.
 
-	* target.h (struct target_ops) <to_fileio_fstat>: New field.
-	(target_fileio_fstat): New declaration.
-	* target.c (target_fileio_fstat): New function.
-	* inf-child.c (inf_child_fileio_fstat): Likewise.
-	(inf_child_target): Initialize to_fileio_fstat.
-	* remote.c (init_remote_ops): Likewise.
-
-2015-04-01  Sasha Smundak  <asmundak@google.com>
-
-	* Makefile.in (SUBDIR_PYTHON_OBJS): Add py-unwind.o.
-	(SUBDIR_PYTHON_SRCS): Add py-unwind.c.
-	(py-unwind.o): New recipe.
-	* NEWS: mention Python frame unwinding.
-	* data-directory/Makefile.in (PYTHON_FILE_LIST): Add
-	gdb/unwinder.py and gdb/command/unwinder.py
-	* python/lib/gdb/__init__.py (packages): Add frame_unwinders
-	list.
-	(execute_unwinders): New function.
-	* python/lib/gdb/command/unwinders.py: New file.
-	* python/lib/gdb/unwinder.py: New file.
-	* python/py-objfile.c (objfile_object): Add frame_unwinders field.
-	(objfpy_dealloc): Decrement frame_unwinders reference count.
-	(objfpy_initialize): Create frame_unwinders list.
-	(objfpy_get_frame_unwinders): New function.
-	(objfpy_set_frame_unwinders): Ditto.
-	(objfile_getset): Add frame_unwinders attribute to Objfile.
-	* python/py-progspace.c (pspace_object): Add frame_unwinders field.
-	(pspy_dealloc): Decrement frame_unwinders reference count.
-	(pspy_initialize): Create frame_unwinders list.
-	(pspy_get_frame_unwinders): New function.
-	(pspy_set_frame_unwinders): Ditto.
-	(pspy_getset): Add frame_unwinders attribute to gdb.Progspace.
-	* python/py-unwind.c: New file.
-	* python/python-internal.h (pspy_get_name_unwinders): New prototype.
-	(objpy_get_frame_unwinders): New prototype.
-	(gdbpy_initialize_unwind): New prototype.
-	* python/python.c (gdbpy_apply_type_printers): Call
-	gdbpy_initialize_unwind.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (resume): Check currently_stepping after clearing
-	stepped_breakpoint, not before.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (print_target_wait_results): Print all the ptid
-	elements.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (keep_going): Also discard cleanups if inserting
-	breakpoints fails.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (wait_for_inferior): Install the
-	finish_thread_state_cleanup cleanup across the whole function, not
-	just around handle_inferior_event.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (resume) <step past permanent breakpoint>: Use
-	do_target_resume.
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_handle_extended_wait): Always call set_running.
-
-2015-04-01  Pierre-Marie de Rodat  <derodat@adacore.com>
-
-	* MAINTAINERS (Write After Approval): Add "Pierre-Marie de Rodat".
-
-2015-04-01  Pedro Alves  <palves@redhat.com>
-
-	* linux-thread-db.c (record_thread): Readd the thread to gdb's
-	list if it was marked exited.
-
-2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* configure: Regenerated.
-
-2015-03-31  Sergio Durigan Junior  <sergiodj@redhat.com>
-	    Jan Kratochvil  <jan.kratochvil@redhat.com>
-	    Oleg Nesterov  <oleg@redhat.com>
-
-	PR corefiles/16092
-	* linux-tdep.c: Include 'gdbcmd.h' and 'gdb_regex.h'.
-	New enum identifying the various options of the coredump_filter
-	file.
-	(struct smaps_vmflags): New struct.
-	(use_coredump_filter): New variable.
-	(decode_vmflags): New function.
-	(mapping_is_anonymous_p): Likewise.
-	(dump_mapping_p): Likewise.
-	(linux_find_memory_regions_full): New variables
-	'coredumpfilter_name', 'coredumpfilterdata', 'pid', 'filterflags'.
-	Removed variable 'modified'.  Read /proc/<PID>/smaps file; improve
-	parsing of its information.  Implement memory mapping filtering
-	based on its contents.
-	(show_use_coredump_filter): New function.
-	(_initialize_linux_tdep): New command 'set use-coredump-filter'.
-	* NEWS: Mention the possibility of using the
-	'/proc/PID/coredump_filter' file when generating a corefile.
-	Mention new command 'set use-coredump-filter'.
-
-2015-03-31  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* solib-svr4.c (solib_svr4_r_ldsomap): Catch possible exception by
-	read_memory_unsigned_integer.
-
-2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* Makefile.in (ZLIB): New.
-	(ZLIBINC): Likewise.
-	(INTERNAL_CFLAGS_BASE): Add $(ZLIBINC).
-	(CLIBS): Add $(ZLIB).
-	* acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS.
-	Add -lz to LIBS.
-	* gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
-	* top.c (print_gdb_configuration): Remove --with-zlib and
-	--without-zlib.
-	* config.in: Regenerated.
-	* configure: Likewise.
-
-2015-03-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
-
-	* NEWS: Mention info os cpus support.
-	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
-	(struct osdata_type): Add cpus entry, reorder the entries in
-	alphabetical order.
-
-2015-03-31  Matthias Klose  <doko@ubuntu.com>
-
-	* compile/compile.c (compile_to_object): Allow triplets with or
-	without vendor set.
-
-2015-03-30  Doug Evans  <dje@google.com>
-
-	PR c++/18141
-	* cp-namespace.c (cp_search_static_and_baseclasses): Always look for
-	klass in VAR_DOMAIN.
-
-2015-03-30  Gary Benson <gbenson@redhat.com>
-
-	* remote.c (remote_mourn_1): Remove function.  Update all callers
-	to use remote_mourn.
-	(extended_remote_mourn_1): Remove function.  Update all callers
-	to use extended_remote_mourn.
-	(extended_remote_attach_1): Remove function.  Update all callers
-	to use extended_remote_attach.
-
-2015-03-28  James Bowman  <james.bowman@ftdichip.com>
-
-	* Makefile.in (ALL_TARGET_OBS): Add ft32-tdep.o.
-	(HFILES_NO_SRCDIR): Add ft32-tdep.h.
-	(ALLDEPFILES): Add ft32-tdep.c.
-	* configure.tgt: Add FT32 entry.
-	* ft32-tdep.c: New file, FT32 target-dependent code.
-	* ft32-tdep.h: New file, FT32 target-dependent code.
-
-2015-03-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Revert:
-	2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-	Code cleanup.
-	* printcmd.c (print_command_1): Move expr variable scope.
-
-2015-03-27  Joel Brobecker  <brobecker@adacore.com>
-
-	* dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL.
-
-2015-03-27  Andrzej Kaczmarek  <andrzej.kaczmarek@tieto.com>
-
-	* gdb_bfd.c (gdb_bfd_section_index): Fix off-by-one for special
-	sections.
-
-2015-03-26  Joel Brobecker  <brobecker@adacore.com>
-
-	* dtrace-probe.c (dtrace_process_dof_probe): Contain any
-	exception raised while parsing the probe arguments.
-	Force parsing to be done using the C language parser.
-	* expression.h (parse_expression_with_language): Declare.
-	* parse.c (parse_expression_with_language): New function.
-
-2015-03-26  Jon Turney  <jon.turney@dronecode.org.uk>
-
-	* MAINTAINERS (Write After Approval): Add "Jon Turney".
-
-2015-03-26  Andy Wingo  <wingo@igalia.com>
-
-	PR symtab/18148
-	* dwarf2read.c (struct partial_die_info): Add has_const_value
-	member.
-	(add_partial_symbol): Don't punt on symbols that have const_value
-	attributes.
-	(read_partial_die): Detect DW_AT_const_value.
-
-2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Code cleanup.
-	* printcmd.c (print_command_1): Move expr variable scope.
-
-2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Code cleanup.
-	* printcmd.c (validate_format): Make the parameter cmdname const.
-
-2015-03-26  Don Breazeal  <donb@codesourcery.com>
-
-	* remote.c (_initialize_remote): Update comment.
-
-2015-03-26  Pedro Alves  <palves@redhat.com>
-	    Jon TURNEY  <jon.turney@dronecode.org.uk>
-
-	* coffread.c (coff_symfile_read): When constructing the name of an
-	import stub symbol from import symbol for amd64, only skip the
-	char after _imp_ if the target is underscored (like i386) and the
-	char is indeed the target's leading char.
-
-2015-03-25  Pedro Alves  <palves@redhat.com>
-
-	* target.h <to_async>: Replace 'callback' and 'context' parameters
-	with boolean 'enable' parameter.
-	(target_async): Replace CALLBACK and CONTEXT parameters with
-	boolean ENABLE parameter.
-	* inf-loop.c (inferior_event_handler): Adjust.
-	* linux-nat.c (linux_nat_attach, linux_nat_resume)
-	(linux_nat_resume): Adjust.
-	(async_client_callback, async_client_context): Delete.
-	(handle_target_event): Call inferior_event_handler directly.
-	(linux_nat_async): Replace 'callback' and 'context' parameters
-	with boolean 'enable' parameter.  Adjust.  Remove references to
-	async_client_callback and async_client_context.
-	(linux_nat_close): Adjust.
-	* record-btrace.c (record_btrace_async): Replace 'callback' and
-	'context' parameters with boolean 'enable' parameter.  Adjust.
-	(record_btrace_resume): Adjust.
-	* record-full.c (record_full_async): Replace 'callback' and
-	'context' parameters with boolean 'enable' parameter.  Adjust.
-	(record_full_resume, record_full_core_resume): Adjust.
-	* remote.c (struct remote_state) <async_client_callback,
-	async_client_context>: Delete fields.
-	(remote_start_remote, extended_remote_attach_1, remote_resume)
-	(extended_remote_create_inferior): Adjust.
-	(remote_async_serial_handler): Call inferior_event_handler
-	directly.
-	(remote_async): Replace 'callback' and 'context' parameters with
-	boolean 'enable' parameter.  Adjust.
-	* top.c (gdb_readline_wrapper_cleanup, gdb_readline_wrapper):
+2017-02-08  Jerome Guitton  <guitton@adacore.com>
+	
+	* cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
+	Remove case-insensitive search.
+
+2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
+	at the end of the line.  Avoids an ARI warning.
+
+2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
+
+	* NEWS: Mention support for record/replay of Intel 64 rdrand and
+	rdseed instructions.
+	i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
+
+2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
+
+	PR tdep/20936
+	Provide and use sparc32 and sparc64 target description XML files.
+	* features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
+	features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
+	* features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
+	features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
+	* features/sparc/sparc32-solaris.xml: New file.
+	* features/sparc/sparc64-solaris.xml: New file.
+	* features/sparc/sparc32-solaris.c: Generated.
+	* features/sparc/sparc64-solaris.c: Generated.
+	* sparc-tdep.h: Account for differences in target descriptions.
+	* sparc-tdep.c (sparc32_register_name): Use target provided registers.
+	(sparc32_register_type): Use target provided registers.
+	(validate_tdesc_registers): New function.
+	(sparc32_gdbarch_init): Use tdesc_has_registers.
+	Set pseudoregister functions.
+	* sparc64-tdep.c (sparc64_register_name): Use target provided registers.
+	(sparc64_register_type): Use target provided registers.
+	(sparc64_init_abi): Set pseudoregister functions.
+
+2017-02-03  Tom Tromey  <tom@tromey.com>
+
+	PR rust/21097:
+	* rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
+	with a single member.
+
+2017-02-03  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (cli_interp_base::cli_interp_base)
+	(cli_interp_base::~cli_interp_base): New.
+	(cli_interp): New struct.
+	(as_cli_interp): Cast the interp itself to cli_interp.
+	(cli_interpreter_pre_command_loop): Rename to ...
+	(cli_interp_base::pre_command_loop): ... this.  Remove 'self'
+	parameter.
+	(cli_interpreter_init): Rename to ...
+	(cli_interp::init): ... this.  Remove 'self' parameter.  Use
+	boolean.  Make extern.
+	(cli_interpreter_resume): Rename to ...
+	(cli_interp::resume): ... this.  Remove 'data' parameter.  Make
+	extern.
+	(cli_interpreter_suspend): Rename to ...
+	(cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
+	extern.
+	(cli_interpreter_exec): Rename to ...
+	(cli_interp::exec): ... this.  Remove 'data' parameter.  Make
+	extern.
+	(cli_interpreter_supports_command_editing): Rename to ...
+	(cli_interp_base::supports_command_editing): ... this.  Remove
+	'interp' parameter.  Make extern.
+	(cli_ui_out): Rename to ...
+	(cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
+	Make extern.
+	(cli_set_logging): Rename to ...
+	(cli_interp_base::set_logging): ... this.  Remove 'interp'
+	parameter.  Make extern.
+	(cli_interp_procs): Delete.
+	(cli_interp_factory): Adjust to use "new".
+	* cli/cli-interp.h: Include "interps.h".
+	(struct cli_interp_base): New struct.
+	* interps.c (struct interp): Delete.  Fields moved to interps.h.
+	(interp_new): Delete.
+	(interp::interp, interp::~interp): New.
+	(interp_set): Use bool, and return void.  Assume the interpreter
+	has suspend, init and resume methods, and that the all return
+	void.
+	(set_top_level_interpreter): interp_set returns void.
+	(interp_ui_out): Adapt.
+	(current_interp_set_logging): Adapt.
+	(interp_data): Delete.
+	(interp_pre_command_loop, interp_supports_command_editing): Adapt.
+	(interp_exec): Adapt.
+	(top_level_interpreter_data): Delete.
+	* interps.h (interp_init_ftype, interp_resume_ftype)
+	(interp_suspend_ftype, interp_exec_ftype)
+	(interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
+	(class interp): New.
+	(interp_new): Delete.
+	(interp_set): Now returns void.  Use bool.
+	(interp_data, top_level_interpreter_data): Delete.
+	* mi/mi-common.h: Include interps.h.
+	(class mi_interp): Inherit from interp.  Define a ctor.  Declare
+	init, resume, suspect, exec, interp_ui_out, set_logging and
+	pre_command_loop methods.
+	* mi/mi-interp.c (as_mi_interp): Cast the interp itself.
+	(mi_interpreter_init): Rename to ...
+	(mi_interp::init): ... this.  Remove the 'interp' parameter, use
+	bool, return void and make extern.  Adjust.
+	(mi_interpreter_resume): ... Rename to ...
+	(mi_interp::resume): ... this.  Remove the 'data' parameter,
+	return void and make extern.  Adjust.
+	(mi_interpreter_suspend): ... Rename to ...
+	(mi_interp::suspend): ... this.  Remove the 'data' parameter,
+	return void and make extern.  Adjust.
+	(mi_interpreter_exec): ... Rename to ...
+	(mi_interp::exec): ... this.  Remove the 'data' parameter and make
+	extern.  Adjust.
+	(mi_interpreter_pre_command_loop): ... Rename to ...
+	(mi_interp::pre_command_loop): ... this.  Remove the 'self'
+	parameter and make extern.
+	(mi_on_normal_stop_1): Adjust.
+	(mi_ui_out): Rename to ...
+	(mi_interp::interp_ui_out): ... this.  Remove the 'interp'
+	parameter and make extern.  Adjust.
+	(mi_set_logging): Rename to ...
+	(mi_interp::set_logging): ... this.  Remove the 'interp'
+	parameter and make extern.  Adjust.
+	(mi_interp_procs): Delete.
+	(mi_interp_factory): Adjust to use 'new'.
+	* mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
+	(mi_print_exception, mi_execute_command, mi_load_progress):
 	Adjust.
-	* target-delegates.c: Regenerate.
-
-2015-03-25  Gary Benson <gbenson@redhat.com>
-	    Pedro Alves  <palves@redhat.com>
-
-	* target.c (fileio_ft_t): New typedef, define object vector.
-	(fileio_fhandles): New static variable.
-	(is_closed_fileio_fh): New macro.
-	(lowest_closed_fd): New static variable.
-	(acquire_fileio_fd): New function.
-	(release_fileio_fd): Likewise.
-	(fileio_fd_to_fh): New macro.
-	(target_fileio_open): Wrap the file descriptor on success.
-	(target_fileio_pwrite): Updated to use wrapped file descriptor.
-	(target_fileio_pread): Likewise.
-	(target_fileio_close): Likewise.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* thread.c (thread_apply_all_command): Take exited threads into
-	account.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (resume, proceed): Mention
-	switch_back_to_stepped_thread, not switch_back_to_stepping.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (user_visible_resume_ptid): Rewrite going from
-	most-locked to unlocked instead of the opposite.  Move comment ...
-	* infrun.h (user_visible_resume_ptid): ... here.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_nat_resume): Output debug logs before trying
-	to resume the event lwp.  Use the lwp's ptid instead of the passed
-	in (maybe wildcard) ptid.
-	(stop_wait_callback): Tweak debug log output.
-	(check_stopped_by_breakpoint): Tweak debug log output.  Also dump
-	TRAP_TRACE.
-	(linux_nat_filter_event): In debug output, distinguish a
-	resume_stop SIGSTOP from a delayed SIGSTOP.  Output debug logs
-	before trying to resume the lwp.
-
-2015-03-24  Joel Brobecker  <brobecker@adacore.com>
-
-	* gdbtypes.h (struct dynamic_prop_list) <prop>: Remove
-	pointer indirection.
-	* gdbtypes.c (get_dyn_prop): Adjust, following change above.
-	(add_dyn_prop, copy_dynamic_prop_list): Likewise.
-
-2015-03-24  Joel Brobecker  <brobecker@adacore.com>
-
-	* gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_DATA_LOCATION>:
-	Renames DYN_ATTR_DATA_LOCATION.
-	(TYPE_DATA_LOCATION): Use DYN_PROP_DATA_LOCATION instead of
-	DYN_ATTR_DATA_LOCATION.
-	* dwarf2read.c (set_die_type): Use DYN_PROP_DATA_LOCATION
-	instead of DYN_ATTR_DATA_LOCATION.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.c (until_break_command): Adjust call to proceed.
-	* gdbthread.h (struct thread_control_state) <stepping_command>:
-	New field.
-	* infcall.c (run_inferior_call): Adjust call to proceed.
-	* infcmd.c (run_command_1, proceed_thread_callback, continue_1):
-	Adjust calls to proceed.
-	(set_step_frame): Set the current thread's step_start_function
+	* tui/tui-interp.c (tui_interp): New class.
+	(as_tui_interp): Return a tui_interp pointer.
+	(tui_on_normal_stop, tui_on_signal_received)
+	(tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
+	(tui_on_no_history, tui_on_user_selected_context_changed): Adjust
+	to use interp::interp_ui_out.
+	(tui_init): Rename to ...
+	(tui_interp::init): ... this.  Remove the 'self' parameter, use
+	bool, return void and make extern.  Adjust.
+	(tui_resume): Rename to ...
+	(tui_interp::resume): ... this.  Remove the 'data' parameter,
+	return void and make extern.  Adjust.
+	(tui_suspend): Rename to ...
+	(tui_interp::suspend): ... this.  Remove the 'data' parameter,
+	return void and make extern.  Adjust.
+	(tui_ui_out): Rename to ...
+	(tui_interp::interp_ui_out): ... this.  Remove the 'self'
+	parameter, and make extern.  Adjust.
+	(tui_exec): Rename to ...
+	(tui_interp::exec): ... this.  Remove the 'data' parameter and
+	make extern.
+	(tui_interp_procs): Delete.
+	(tui_interp_factory): Use "new".
+
+2017-02-02  Tom Tromey  <tom@tromey.com>
+
+	* rust-exp.y (ends_raw_string, space_then_number)
+	(rust_identifier_start_p): Return bool.
+	* rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
+	(rust_tuple_struct_type_p, rust_tuple_variant_type_p)
+	(rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
+	(rust_chartype_p): Return bool.
+	(val_print_struct, rust_print_struct_def, rust_print_type):
+	Update.
+	* rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
+	Return bool.
+
+2017-02-02  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c: Reindent.
+
+2017-02-02  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.h (rust_crate_for_block): Update.
+	* rust-lang.c (rust_crate_for_block): Return std::string.
+	(rust_get_disr_info): Use std:;string, not
+	gdb::unique_xmalloc_ptr.
+	* rust-exp.y (crate_name): Update.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* disasm-selftests.c (print_one_insn_test): Move the "verbose"
+	field out of gdb_disassembler_test and make it static.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
+	mi1_interp and mi_interp fields.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (struct saved_output_files, saved_output):
+	Moved from cli/cli-logging.c.
+	(cli_set_logging): New function.
+	(cli_interp_procs): Install cli_set_logging.
+	* cli/cli-interp.h (make_logging_output, cli_set_logging):
+	Declare.
+	* cli/cli-logging.c (struct saved_output_files, saved_output):
+	Moved to cli/cli-interp.c.
+	(pop_output_files): Don't save outputs here.
+	(make_logging_output): New function.
+	(handle_redirections): Don't build tee nor save previous outputs
 	here.
-	(step_once): Adjust calls to proceed.
-	(jump_command, signal_command, until_next_command)
-	(finish_backward, finish_forward, proceed_after_attach_callback)
-	(attach_command_post_wait): Adjust calls to proceed.
-	* infrun.c (proceed_after_vfork_done): Adjust call to proceed.
-	(do_target_resume): New function, factored out from ...
-	(resume): ... here.  Remove 'step' parameter.  Instead, check
-	currently_stepping to determine whether the thread should be
-	single-stepped.
-	(proceed): Remove 'step' parameter and don't set the thread's
-	step_start_function here.  Adjust call to 'resume'.
-	(handle_inferior_event): Adjust calls to 'resume'.
-	(switch_back_to_stepped_thread): Use do_target_resume instead of
-	'resume'.
-	(keep_going): Adjust calls to 'resume'.
-	* infrun.h (proceed): Remove 'step' parameter.
-	(resume): Likewise.
-	* windows-nat.c (do_initial_windows_stuff): Adjust call to
-	'resume'.
-	* mi/mi-main.c (proceed_thread): Adjust call to 'proceed'.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* gdbthread.h (struct thread_control_state) <stepping_command>:
-	New field.
-	* infcmd.c (step_once): Pass step=1 to clear_proceed_status.  Set
-	the thread's stepping_command field.
-	* infrun.c (resume): Check the thread's stepping_command flag to
-	determine which threads should be resumed.  Rename 'entry_step'
-	local to user_step.
-	(clear_proceed_status_thread): Clear 'stepping_command'.
-	(schedlock_applies): Change parameter type to struct thread_info
-	pointer.  Adjust.
-	(find_thread_needs_step_over): Remove 'step' parameter.  Adjust.
-	(switch_back_to_stepped_thread): Adjust calls to
-	'schedlock_applies'.
-	(_initialize_infrun): Adjust "set scheduler-locking step" help.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (step_start_function): Delete and ...
-	* gdbthread.h (struct thread_control_state) <step_start_function>:
-	... now a field here.
-	* infrun.c (clear_proceed_status_thread): Clear the thread's
-	step_start_function.
-	(proceed, process_event_stop_test, print_stop_event): Adjust.
-
-2015-03-24  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (proceed): No longer handle negative step.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* nat/x86-linux.h (x86_linux_new_thread): New declaration.
-	(x86_linux_prepare_to_resume): Likewise.
-	* x86-linux-nat.c (x86_linux_new_thread):
-	Moved to nat/x86-linux.c.
-	(x86_linux_prepare_to_resume): Likewise.
-	* nat/x86-linux.c (x86_linux_new_thread): New function.
-	(x86_linux_prepare_to_resume): Likewise.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* nat/x86-linux-dregs.h: New file.
-	* nat/x86-linux-dregs.c: Likewise.
-	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux-dregs.h.
-	(x86-linux-dregs.o): New rule.
-	* config/i386/linux.mh (NATDEPFILES): Add x86-linux-dregs.o.
-	* config/i386/linux64.mh (NATDEPFILES): Likewise.
-	* x86-linux-nat.c: Include nat/x86-linux-dregs.h.
-	(u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
-	(x86_linux_dr_get): Likewise.
-	(x86_linux_dr_set): Likewise.
-	(x86_linux_dr_get_addr): Likewise.
-	(x86_linux_dr_get_control): Likewise.
-	(x86_linux_dr_get_status): Likewise.
-	(update_debug_registers_callback): Likewise.
-	(x86_linux_dr_set_control): Likewise.
-	(x86_linux_dr_set_addr): Likewise.
-	(x86_linux_update_debug_registers): Likewise.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* x86-linux-nat.c (x86_linux_update_debug_registers):
-	New function, factored out from...
-	(x86_linux_prepare_to_resume): ...this.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* x86-linux-nat.c (x86_linux_dr_get): Update comments.
-	(x86_linux_dr_set): Likewise.
-	(x86_linux_dr_get_addr): Likewise.
-	(x86_linux_dr_get_control): Likewise.
-	(x86_linux_dr_get_status): Likewise.
-	(update_debug_registers_callback): Likewise.
-	(x86_linux_dr_set_control): Likewise.
-	(x86_linux_dr_set_addr): Likewise.
-	(x86_linux_prepare_to_resume): Likewise.
-	(x86_linux_new_thread): Likewise.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* x86-linux-nat.c (x86_linux_dr_set_addr): Update assertion.
-	(x86_linux_new_thread): Rename argument.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* nat/x86-linux.h: New file.
-	* nat/x86-linux.c: Likewise.
-	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux.h.
-	(x86-linux.o): New rule.
-	* config/i386/linux.mh (NATDEPFILES): Add x86-linux.o.
-	* config/i386/linux64.mh (NATDEPFILES): Likewise.
-	* nat/linux-nat.h (struct arch_lwp_info): New forward declaration.
-	(lwp_set_arch_private_info): New declaration.
-	(lwp_arch_private_info): Likewise.
-	* linux-nat.c (lwp_set_arch_private_info): New function.
-	(lwp_arch_private_info): Likewise.
-	* x86-linux-nat.c: Include nat/x86-linux.h.
-	(arch_lwp_info): Removed structure.
-	(update_debug_registers_callback):
-	Use lwp_set_debug_registers_changed.
-	(x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
-	and lwp_set_debug_registers_changed.
-	(x86_linux_new_thread): Use lwp_set_debug_registers_changed.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* nat/linux-nat.h (ptid_of_lwp): New declaration.
-	(lwp_is_stopped): Likewise.
-	(lwp_stop_reason): Likewise.
-	* linux-nat.c (ptid_of_lwp): New function.
-	(lwp_is_stopped): Likewise.
-	(lwp_is_stopped_by_watchpoint): Likewise.
-	* x86-linux-nat.c (update_debug_registers_callback):
-	Use lwp_is_stopped.
-	(x86_linux_prepare_to_resume): Use ptid_of_lwp and
-	lwp_stop_reason.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* linux-nat.h (linux_stop_lwp): Move declaration to...
-	* nat/linux-nat.h (linux_stop_lwp): New declaration.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* linux-nat.h: Include nat/linux-nat.h.
-	(iterate_over_lwps): Move declaration to nat/linux-nat.h.
-	* nat/linux-nat.h (struct lwp_info): New forward declaration.
-	(iterate_over_lwps_ftype): New typedef.
-	(iterate_over_lwps): New declaration.
-	* linux-nat.h (iterate_over_lwps): Update comment.  Use
-	iterate_over_lwps_ftype.  Update callback return value check.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* x86-nat.h (x86_debug_reg_state): Move declaration to...
-	* nat/x86-dregs.h (x86_debug_reg_state): New declaration.
-
-2015-03-24  Gary Benson  <gbenson@redhat.com>
-
-	* nat/linux-nat.h (current_lwp_ptid): New declaration.
-	* linux-nat.c (current_lwp_ptid): New function.
-	* x86-linux-nat.c: Include nat/linux-nat.h.
-	(x86_linux_dr_get_addr): Use current_lwp_ptid.
-	(x86_linux_dr_get_control): Likewise.
-	(x86_linux_dr_get_status): Likewise.
-	(x86_linux_dr_set_control): Likewise.
-	(x86_linux_dr_set_addr): Likewise.
-
-2015-03-24  Antoine Tremblay  <antoine.tremblay@ericsson.com>
-
-	PR breakpoints/16466
-	* breakpoint.c (create_breakpoint): Set thread on breakpoint struct.
-
-2015-03-23  Joel Brobecker  <brobecker@adacore.com>
-
-	* ser-mingw.c (ser_windows_setparity): Fix indentation.
-	* ser-unix.c (hardwire_setparity): Likewise.
-
-2015-03-23  Yurij Grechishhev  <yurij.grechishhev@gmail.com>
-
-	* NEWS: Mention set/show serial parity command.
-	* monitor.c (monitor_open): Call serial_setparity.
-	* remote.c (remote_open_1): Likewise.
-	* ser-base.c (ser_base_serparity): New function.
-	* ser-base.h (ser_base_setparity): Add  declaration.
-	* ser-go32.c (dos_ops): Set "setparity" field.
-	* ser-mingw.c (ser_windows_raw): Do not set state.fParity and
-	state.Parity.
-	(ser_windows_setparity): New function.
-	(hardwire_ops): Add ser_windows_setparity.
-	(tty_ops): Add NULL for setparity field.
-	(pipe_ops): Add ser_base_setparity.
-	(tcp_ops): Likewise.
-	* ser-pipe.c (pipe_ops): Likewise.
-	* ser-tcp.c (tcp_ops): Likewise.
-	* ser-unix.c (hardwire_setparity): Add declaration.
-	(hardwire_raw): Don't reset PARENB flag.
-	(hardwire_setparity): New function.
-	(hardwire_ops): Add hardwire_setparity.
-	* serial.c (serial_setparity): New function.
-	(serial_parity): New global.
-	(parity_none, parity_odd, parity_even, parity_enums, parity):
-	New static globals.
-	(set_parity): New function.
-	(_initialize_serial): Add set/show serial parity commands.
-	* serial.h (GDBPARITY_NONE): Define.
-	(GDBPARITY_ODD): Define.
-	(GDBPARITY_EVEN): Define.
-	(serial_setparity) Add declaration.
-	(struct serial_ops): Add setparity field.
-	* target.h (serial_parity): Add declaration.
-
-2015-03-23  Keith Seitz  <keiths@redhat.com>
-
-	* linespec.c (linespec_lexer_lex_keyword): Update comment.
-
-2015-03-23  Keith Seitz  <keiths@redhat.com>
-
-	* breakpoint.c (parse_breakpoint_sals): Use
-	linespec_lexer_lex_keyword to ascertain if the user specified
-	a NULL location.
-	* linespec.c [IF_KEYWORD_INDEX]: Define.
-	(linespec_lexer_lex_keyword): Export.
-	(struct ls_parser) <keyword_ok>: Remove.
-	A keyword is only a keyword if not followed by another keyword.
-	(linespec_lexer_lex_one): Remove keyword_ok handling.
-	Add comment explaining why the parsing stream is not advanced
-	when a keyword is seen.
-	(parse_linespec): Remove parser->keyword_ok.
-	* linespec.h (linespec_lexer_lex_keyword): Add declaration.
-
-2015-03-23  Keith Seitz  <keiths@redhat.com>
-
-	PR gdb/18021
-	* dwarf2read.c (dwarf2_add_member_fn): Issue a complaint
-	if we find a static method with DW_AT_vtable_elem_location.
-
-2015-03-21  Eli Zaretskii  <eliz@gnu.org>
-
-	* tui/tui-io.c (tui_expand_tabs): Reinitialize the column counter
-	before the second loop, to avoid undefined behavior.  Reported by
-	Anton Blanchard <anton@samba.org>.
-
-2015-03-20  Keven Boell  <keven.boell@intel.com>
-
-	* gdbtypes.c (resolve_dynamic_type_internal): Adapt
-	data_location usage to linked list.
-	(resolve_dynamic_type_internal): Adapt data_location to
-	linked list.
-	(get_dyn_prop, add_dyn_prop, copy_dynamic_prop_list): New function.
-	(copy_type_recursive, copy_type): Add copy of linked list.
-	* gdbtypes.h (enum dynamic_prop_node_kind): New enum.
-	(struct dynamic_prop_list): New struct.
-	* dwarf2read.c (set_die_type): Set data_location data.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* i386-sol2-tdep.c (i386_sol2_static_transform_name): Move "p" to
-	inner block and make it const.
-	* machoread.c (get_archive_prefix_len): Make "lparen" const.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.c (set_breakpoint_condition): Make argument "exp" const.
-	* breakpoint.h (set_breakpoint_condition): Update declaration.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* tui/tui-io.c (tui_expand_tabs): Make "s1" const.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* remote-m32r-sdi.c (m32r_open): Make "port_str" const.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* nto-tdep.c (nto_find_and_open_solib): Make "endian" const.
-	(nto_init_solib_absolute_prefix): Likewise.
-
-2015-03-20  Pedro Alves  <palves@redhat.com>
-
-	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Make "p" const.
-	* spu-tdep.c (spu_gdbarch_init): Make "name" const.
-
-2015-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* config/djgpp/README: Remove gdb.hp.
-
-2015-03-20  Yao Qi  <yao.qi@linaro.org>
-
-	* aarch64-tdep.c (aarch64_gdbarch_init): Don't call
-	set_gdbarch_cannot_step_breakpoint.
-
-2015-03-19  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_resume_one_lwp): Rename to ...
-	(linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
-	instead call perror_with_name.
-	(check_ptrace_stopped_lwp_gone): New function.
-	(linux_resume_one_lwp): Reimplement as wrapper around
-	linux_resume_one_lwp_throw that swallows errors if the LWP is
-	gone.
-	(resume_stopped_resumed_lwps): Try register reads in TRY/CATCH and
-	swallows errors if the LWP is gone.  Use
-	linux_resume_one_lwp_throw instead of linux_resume_one_lwp.
-
-2015-03-19  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (status_callback): Return early if the LWP has no
-	status pending.
-
-2015-03-19  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (select_event_lwp_callback): Update comment to no
-	longer mention SIGTRAP.
-
-2015-03-18  Tristan Gingold  <gingold@adacore.com>
-
-        * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move
-        redirection code to ...
-        (amd64_windows_frame_decode_insns): ... Here.  Fix in prologue
-        checks.  Fix SAVE_NONVOL operations.  Add debug code and comments.
-
-2015-03-18  Gary Benson <gbenson@redhat.com>
-
-	(remote_protocol_features): Remove the "vFile:fstat" feature.
-	(remote_hostio_fstat): Probe for "vFile:fstat" support.
-
-2015-03-11  Yao Qi  <yao.qi@linaro.org>
-
-	PR tdep/18107
-	* aarch64-linux-tdep.c: Include xml-syscall.h
-	(aarch64_linux_get_syscall_number): New function.
-	(aarch64_linux_init_abi): Call
-	set_gdbarch_get_syscall_number.
-	* syscalls/aarch64-linux.xml: New file.
-
-2015-03-17  Yurij Grechishhev  <yurij.grechishhev@gmail.com>
-
-	* ser-base.h (ser_base_setstopbits): Change second argument name
-	from "rate" to "num".
-
-2015-03-17  Gary Benson <gbenson@redhat.com>
-	    Luke Allardyce <lukeallardyce@gmail.com>
-
-	PR gdb/18131
-	* common/common-remote-fileio.h (sys/stat.h): New include.
-	(stuct stat): Remove forward declaration.
-
-2015-03-16  John Baldwin  <jhb@FreeBSD.org>
-
-	* fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers
-	before writing core register notes.
-
-2015-03-16  Yuanhui Zhang  <asmwarrior@gmail.com>
-	    Pedro Alves  <palves@redhat.com>
-
-	* gdb_curses.h (tgetnum): Mark with EXTERN_C.
-	* stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs)
-	(tgoto): Wrap with extern "C".
+	* interps.c (current_interp_set_logging): Change prototype.
+	Assume there's always a set_logging_proc method installed.
+	* interps.h (interp_set_logging_ftype): Change prototype.
+	(current_interp_set_logging): Change prototype and adjust comment.
+	* mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
+	use make_logging_output.
+	* tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-logging.c (maybe_warn_already_logging): New factored out
+	from ...
+	(set_logging_overwrite): ... here.
+	(logging_no_redirect_file): Delete.
+	(set_logging_redirect): Don't handle redirection on the fly.
+	Instead warn that "logging off" / "logging on" is necessary.
+	(pop_output_files): Delete references to logging_no_redirect_file.
+	(show_logging_command): Always speak in terms of what will happen
+	once logging is reenabled.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* disasm.c (gdb_pretty_print_insn): Rename to ...
+	(gdb_pretty_print_disassembler::pretty_print_insn): ... this.
+	Remove gdbarch parameter.  Adapt to clear the object's buffers
+	instead of allocating new buffers, and to print using the object's
+	gdb_disassembler instead of calling gdb_print_insn.
+	(dump_insns): Use gdb_pretty_print_disassembler.
+	* disasm.h (gdb_pretty_print_insn): Delete declaration.
+	(gdb_pretty_print_disassembler): New class.
+	* record-btrace.c (btrace_insn_history): Use
+	gdb_pretty_print_disassembler.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (type_as_string): Use string_file.
+	* ada-valprint.c (ada_print_floating): Use string_file.
+	* ada-varobj.c (ada_varobj_scalar_image)
+	(ada_varobj_get_value_image): Use string_file.
+	* aix-thread.c (aix_thread_extra_thread_info): Use string_file.
+	* arm-tdep.c (_initialize_arm_tdep): Use string_printf.
+	* breakpoint.c (update_inserted_breakpoint_locations)
+	(insert_breakpoint_locations, reattach_breakpoints)
+	(print_breakpoint_location, print_one_detail_ranged_breakpoint)
+	(print_it_watchpoint): Use string_file.
+	(save_breakpoints): Use stdio_file.
+	* c-exp.y (oper): Use string_file.
+	* cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
+	tee_file.
+	(pop_output_files): Use delete.
+	(handle_redirections): Use stdio_file and tee_file.
+	* cli/cli-setshow.c (do_show_command): Use string_file.
+	* compile/compile-c-support.c (c_compute_program): Use
+	string_file.
+	* compile/compile-c-symbols.c (generate_vla_size): Take a
+	'string_file &' instead of a 'ui_file *'.
+	(generate_c_for_for_one_variable): Take a 'string_file &' instead
+	of a 'ui_file *'.  Use string_file.
+	(generate_c_for_variable_locations): Take a 'string_file &'
+	instead of a 'ui_file *'.
+	* compile/compile-internal.h (generate_c_for_for_one_variable):
+	Take a 'string_file &' instead of a 'ui_file *'.
+	* compile/compile-loc2c.c (push, pushf, unary, binary)
+	(print_label, pushf_register_address, pushf_register)
+	(do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
+	'ui_file *'.  Adjust.
+	* compile/compile.c (compile_to_object): Use string_file.
+	* compile/compile.h (compile_dwarf_expr_to_c)
+	(compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
+	'ui_file *'.
+	* cp-support.c (inspect_type): Use string_file and obstack_copy0.
+	(replace_typedefs_qualified_name): Use string_file and
+	obstack_copy0.
+	* disasm.c (gdb_pretty_print_insn): Use string_file.
+	(gdb_disassembly): Adjust reference the null_stream global.
+	(do_ui_file_delete): Delete.
+	(gdb_insn_length): Use null_stream.
+	* dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
+	* dwarf2loc.c (dwarf2_compile_property_to_c)
+	(locexpr_generate_c_location, loclist_generate_c_location): Take a
+	'string_file &' instead of a 'ui_file *'.
+	* dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
+	* dwarf2read.c (do_ui_file_peek_last): Delete.
+	(dwarf2_compute_name): Use string_file.
+	* event-top.c (gdb_setup_readline): Use stdio_file.
+	* gdbarch.sh (verify_gdbarch): Use string_file.
+	* gdbtypes.c (safe_parse_type): Use null_stream.
+	* guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
+	string_file.
+	* guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
+	'string_file *' instead of a 'ui_file *'.
+	(gdbscm_arch_disassemble): Use string_file.
+	* guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
+	* guile/scm-ports.c (class ioscm_file_port): Now a class that
+	inherits from ui_file.
+	(ioscm_file_port_delete, ioscm_file_port_rewind)
+	(ioscm_file_port_put): Delete.
+	(ioscm_file_port_write): Rename to ...
+	(ioscm_file_port::write): ... this.  Remove file_port_magic
+	checks.
+	(ioscm_file_port_new): Delete.
+	(ioscm_with_output_to_port_worker): Use ioscm_file_port and
+	ui_file_up.
+	* guile/scm-type.c (tyscm_type_name): Use string_file.
+	* guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
+	Use string_file.
+	* infcmd.c (print_return_value_1): Use string_file.
+	* infrun.c (print_target_wait_results): Use string_file.
+	* language.c (add_language): Use string_file.
+	* location.c (explicit_to_string_internal): Use string_file.
+	* main.c (captured_main_1): Use null_file.
+	* maint.c (maintenance_print_architecture): Use stdio_file.
+	* mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
+	* mi/mi-common.h (struct mi_interp) <out, err, log, targ,
+	event_channel>: Change type to mi_console_file pointer.
+	* mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
+	(mi_console_file_delete): Delete.
+	(struct mi_console_file): Delete.
+	(mi_console_file_magic): Delete.
+	(mi_console_file_new): Delete.
+	(mi_console_file::mi_console_file): New.
+	(mi_console_file_delete): Delete.
+	(mi_console_file_fputs): Delete.
+	(mi_console_file::write): New.
+	(mi_console_raw_packet): Delete.
+	(mi_console_file::flush): New.
+	(mi_console_file_flush): Delete.
+	(mi_console_set_raw): Rename to ...
+	(mi_console_file::set_raw): ... this.
+	* mi/mi-console.h (class mi_console_file): New class.
+	(mi_console_file_new, mi_console_set_raw): Delete.
+	* mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
+	(mi_set_logging): Use delete and tee_file.  Adjust.
+	* mi/mi-main.c (output_register): Use string_file.
+	(mi_cmd_data_evaluate_expression): Use string_file.
+	(mi_cmd_data_read_memory): Use string_file.
+	(mi_cmd_execute, print_variable_or_computed): Use string_file.
+	* mi/mi-out.c (mi_ui_out::main_stream): New.
+	(mi_ui_out::rewind): Use main_stream and
+	string_file.
+	(mi_ui_out::put): Use main_stream and string_file.
+	(mi_ui_out::mi_ui_out): Remove 'stream' parameter.
+	Allocate a 'string_file' instead.
+	(mi_out_new): Don't allocate a mem_fileopen stream here.
+	* mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
+	(mi_ui_out::main_stream): Declare method.
+	* printcmd.c (eval_command): Use string_file.
+	* psymtab.c (maintenance_print_psymbols): Use stdio_file.
+	* python/py-arch.c (archpy_disassemble): Use string_file.
+	* python/py-breakpoint.c (bppy_get_commands): Use string_file.
+	* python/py-frame.c (frapy_str): Use string_file.
+	* python/py-framefilter.c (py_print_type, py_print_single_arg):
+	Use string_file.
+	* python/py-type.c (typy_str): Use string_file.
+	* python/py-unwind.c (unwind_infopy_str): Use string_file.
+	* python/py-value.c (valpy_str): Use string_file.
+	* record-btrace.c (btrace_insn_history): Use string_file.
+	* regcache.c (regcache_print): Use stdio_file.
+	* reggroups.c (maintenance_print_reggroups): Use stdio_file.
+	* remote.c (escape_buffer): Use string_file.
+	* rust-lang.c (rust_get_disr_info): Use string_file.
+	* serial.c (serial_open_ops_1): Use stdio_file.
+	(do_serial_close): Use delete.
+	* stack.c (print_frame_arg): Use string_file.
+	(print_frame_args): Remove local mem_fileopen stream, not used.
+	(print_frame): Use string_file.
+	* symmisc.c (maintenance_print_symbols): Use stdio_file.
+	* symtab.h (struct symbol_computed_ops) <generate_c_location>:
+	Take a 'string_file *' instead of a 'ui_file *'.
+	* top.c (new_ui): Use stdio_file and stderr_file.
+	(free_ui): Use delete.
+	(execute_command_to_string): Use string_file.
+	(quit_confirm): Use string_file.
+	* tracepoint.c (collection_list::append_exp): Use string_file.
+	* tui/tui-disasm.c (tui_disassemble): Use string_file.
+	* tui/tui-file.c: Don't include "ui-file.h".
+	(enum streamtype, struct tui_stream): Delete.
+	(tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
+	(tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
+	(tui_file::tui_file): New method.
+	(tui_file_fputs): Delete.
+	(tui_file_get_strbuf): Delete.
+	(tui_file::puts): New method.
+	(tui_file_adjust_strbuf): Delete.
+	(tui_file_flush): Delete.
+	(tui_file::flush): New method.
+	* tui/tui-file.h: Tweak intro comment.
+	Include ui-file.h.
+	(tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
+	(tui_file_adjust_strbuf): Delete declarations.
+	(class tui_file): New class.
+	* tui/tui-io.c (tui_initialize_io): Use tui_file.
+	* tui/tui-regs.c (tui_restore_gdbout): Use delete.
+	(tui_register_format): Use string_stream.
+	* tui/tui-stack.c (tui_make_status_line): Use string_file.
+	(tui_get_function_from_frame): Use string_file.
+	* typeprint.c (type_to_string): Use string_file.
+	* ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
+	(null_stream): New global.
+	(ui_file_delete): Delete.
+	(ui_file::ui_file): New.
+	(null_file_isatty): Delete.
+	(ui_file::~ui_file): New.
+	(null_file_rewind): Delete.
+	(ui_file::printf): New.
+	(null_file_put): Delete.
+	(null_file_flush): Delete.
+	(ui_file::putstr): New.
+	(null_file_write): Delete.
+	(ui_file::putstrn): New.
+	(null_file_read): Delete.
+	(ui_file::putc): New.
+	(null_file_fputs): Delete.
+	(null_file_write_async_safe): Delete.
+	(ui_file::vprintf): New.
+	(null_file_delete): Delete.
+	(null_file::write): New.
+	(null_file_fseek): Delete.
+	(null_file::puts): New.
+	(ui_file_data): Delete.
+	(null_file::write_async_safe): New.
+	(gdb_flush, ui_file_isatty): Adjust.
+	(ui_file_put, ui_file_rewind): Delete.
+	(ui_file_write): Adjust.
+	(ui_file_write_for_put): Delete.
+	(ui_file_write_async_safe, ui_file_read): Adjust.
+	(ui_file_fseek): Delete.
+	(fputs_unfiltered): Adjust.
+	(set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
+	(set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
+	(set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
+	(set_ui_file_data): Delete.
+	(string_file::~string_file, string_file::write)
+	(struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
+	(do_ui_file_as_string, ui_file_as_string): Delete.
+	(do_ui_file_obsavestring, ui_file_obsavestring): Delete.
+	(struct mem_file): Delete.
+	(mem_file_new): Delete.
+	(stdio_file::stdio_file): New.
+	(mem_file_delete): Delete.
+	(stdio_file::stdio_file): New.
+	(mem_fileopen): Delete.
+	(stdio_file::~stdio_file): New.
+	(mem_file_rewind): Delete.
+	(stdio_file::set_stream): New.
+	(mem_file_put): Delete.
+	(stdio_file::open): New.
+	(mem_file_write): Delete.
+	(stdio_file_magic, struct stdio_file): Delete.
+	(stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
+	(stdio_file::flush): New.
+	(stdio_file_read): Rename to ...
+	(stdio_file::read): ... this.  Adjust.
+	(stdio_file_write): Rename to ...
+	(stdio_file::write): ... this.  Adjust.
+	(stdio_file_write_async_safe): Rename to ...
+	(stdio_file::write_async_safe) ... this.  Adjust.
+	(stdio_file_fputs): Rename to ...
+	(stdio_file::puts) ... this.  Adjust.
+	(stdio_file_isatty): Delete.
+	(stdio_file_fseek): Delete.
+	(stdio_file::isatty): New.
+	(stderr_file_write): Rename to ...
+	(stderr_file::write) ... this.  Adjust.
+	(stderr_file_fputs): Rename to ...
+	(stderr_file::puts) ... this.  Adjust.
+	(stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
+	(stderr_file::stderr_file): New.
+	(tee_file_magic): Delete.
+	(struct tee_file): Delete.
+	(tee_file::tee_file): New.
+	(tee_file_new): Delete.
+	(tee_file::~tee_file): New.
+	(tee_file_delete): Delete.
+	(tee_file_flush): Rename to ...
+	(tee_file::flush): ... this.  Adjust.
+	(tee_file_write): Rename to ...
+	(tee_file::write): ... this.  Adjust.
+	(tee_file::write_async_safe): New.
+	(tee_file_fputs): Rename to ...
+	(tee_file::puts): ... this.  Adjust.
+	(tee_file_isatty): Rename to ...
+	(tee_file::isatty): ... this.  Adjust.
+	* ui-file.h (struct obstack, struct ui_file): Don't
+	forward-declare.
+	(ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
+	(ui_file_write_ftype)
+	(set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
+	(ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
+	(ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
+	(set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
+	(ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
+	(ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
+	(set_ui_file_fseek): Delete.
+	(ui_file_data, ui_file_delete, ui_file_rewind)
+	(struct ui_file): New.
+	(ui_file_up): New.
+	(class null_file): New.
+	(null_stream): Declare.
+	(ui_file_write_for_put, ui_file_put): Delete.
+	(ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
+	Delete.
+	(ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
+	(gdb_fopen, tee_file_new): Delete.
+	(struct string_file): New.
+	(struct stdio_file): New.
+	(stdio_file_up): New.
+	(struct stderr_file): New.
+	(class tee_file): New.
+	* ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
+	of a 'ui_file *'.  Adjust.
+	* ui-out.h (class ui_out) <field_stream>: Likewise.
+	* utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
+	(null_stream): Delete.
+	(error_stream): Take a 'string_file &' instead of a 'ui_file *'.
+	Adjust.
+	* utils.h (struct ui_file): Delete forward declaration..
+	(make_cleanup_ui_file_delete, null_stream): Delete declarations.
+	(error_stream): Take a 'string_file &' instead of a
+	'ui_file *'.
+	* varobj.c (varobj_value_get_print_value): Use string_file.
+	* xtensa-tdep.c (xtensa_verify_config): Use string_file.
+	* gdbarch.c: Regenerate.
 
-2015-03-16  Pedro Alves  <palves@redhat.com>
-	    Yuanhui Zhang  <asmwarrior@gmail.com>
+2017-02-02  Pedro Alves  <palves@redhat.com>
 
-	* stub-termcap.c (tputs): Change prototype.
+	* disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
+	(gdb_pretty_print_insn): ... this.  Now a free function.  Add back
+	a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
+	Adjust to call gdb_print_insn instead of
+	gdb_disassembler::print_insn.
+	(dump_insns, do_mixed_source_and_assembly_deprecated)
+	(do_mixed_source_and_assembly, do_assembly_only): Add back a
+	'gdbarch' parameter.  Remove gdb_disassembler parameter.
+	(gdb_disassembly): Don't allocate a gdb_disassembler here.
+	* disasm.h (gdb_disassembler::pretty_print_insn): Delete
+	declaration.
+	(gdb_pretty_print_insn): Re-add declaration.
+	* record-btrace.c (btrace_insn_history): Don't allocate a
+	gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
+
+2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* disasm.h (gdb_disassembly): Remove file_string parameter.
+	* disasm.c (gdb_disassembly): Likewise.
+	* cli/cli-cmds.c (print_disassembly): Adapt.
+	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
+	* stack.c (do_gdb_disassembly): Likewise.
+
+2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
+	DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
+	targets.  And if the implicit value is longer than needed, extract
+	the first bytes instead of the "least significant" ones.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_enable): Do not call btrace_add_pc for
+	BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
+	(btrace_fetch): Assert can_access_registers_ptid.
+	* record-btrace.c (require_btrace_thread, record_btrace_info): Call
+	validate_registers_access.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdbthread.h (can_access_registers_ptid): New.
+	* thread.c (can_access_registers_ptid): New.
+
+2017-02-01  Pedro Alves  <palves@redhat.com>
+
+	* i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
+
+2017-01-31  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
+	Fix typos.
+
+2017-01-31  Pedro Alves  <palves@redhat.com>
+
+	* stack.c (print_frame_args): Remove local mem_fileopen stream,
+	not used.
+
+2017-01-31  Pedro Alves  <palves@redhat.com>
+
+	* varobj.c (varobj_value_get_print_value): Remove xstrdup call.
+
+2017-01-31  Pedro Alves  <palves@redhat.com>
+
+	* common/scoped_restore.h
+	(scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
+	change the value's parameter type to T2.
+	(make_scoped_restore): Likewise.
+
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+	    Richard Henderson  <rth@redhat.com>
+
+	* amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
+	(amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
+	GS_BASE for older kernels.
+	(amd64_linux_store_inferior_registers): Add case to store FS_BASE
+	GS_BASE for older kernels.
+	* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
+	and GS_BASE to the offset table.
+	(amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
+	system register group.
+	* amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
+	for older kernels.
+	* amd64-tdep.c (amd64_init_abi): Add segment registers for the
+	amd64 ABI.
+	* amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
+	AMD64_GSBASE_REGNUM.
+	(AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
+	* features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
+	(amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
+	(x32-avx-linux.dat, x32-avx512-linux.dat): Add
+	i386/64bit-segments.xml in those rules.
+	* features/i386/64bit-segments.xml: New file.
+	* features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
+	* features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
+	* features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
+	* features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
+	* features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
+	* features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
+	* features/i386/amd64-linux.xml: Add 64bit-segments.xml.
+	* features/i386/amd64-avx-linux.c: Regenerated.
+	* features/i386/amd64-avx-mpx-linux.c: Regenerated.
+	* features/i386/amd64-avx-mpx.c: Regenerated.
+	* features/i386/amd64-avx512-linux.c: Regenerated.
+	* features/i386/amd64-linux.c: Regenerated.
+	* features/i386/amd64-mpx-linux.c: Regenerated.
+	* features/i386/i386-avx-mpx-linux.c: Regenerated.
+	* features/i386/i386-avx-mpx.c: Regenerated.
+	* features/i386/x32-avx-linux.c: Regenerated.
+	* features/i386/x32-avx512-linux.c: Regenerated.
+	* regformats/i386/amd64-avx-linux.dat: Regenerated.
+	* regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
+	* regformats/i386/amd64-avx512-linux.dat: Regenerated.
+	* regformats/i386/amd64-linux.dat: Regenerated.
+	* regformats/i386/amd64-mpx-linux.dat: Regenerated.
+	* regformats/i386/x32-avx-linux.dat: Regenerated.
+	* regformats/i386/x32-avx512-linux.dat: Regenerated.
+	* regformats/i386/x32-linux.dat: Regenerated.
+
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
+	Set to AMD64_NUM_REGS.
+
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
+	that checks validity of a register number.
+
+2017-01-27  Kees Cook  <keescook@google.com>
+
+	* gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
+	fetch_fpregs if target has fpa registers.
+	(arm_linux_store_inferior_registers): Call store_fpregs if target
+	has fpa registers.
+
+2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* cris-tdep.c (cris_gdbarch_init): Remove check for
+	info.byte_order and force it to BFD_ENDIAN_LITTLE.
 
-2015-03-16  Yuanhui Zhang  <asmwarrior@gmail.com>
-	    Pedro Alves  <palves@redhat.com>
+2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
 
-	* windows-nat.c (struct thread_info_struct): Rename to ...
-	(struct windows_thread_info_struct): ... this.
-	(thread_info): Rename to ...
-	(windows_thread_info): ... this.
-	All users updated.
+	* corelow.c (get_core_register_section): Check for regset
+	existence before checking for REGSET_VARIABLE_SIZE.
 
-2015-03-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
 	    Pedro Alves  <palves@redhat.com>
 
-	* NEWS: New Removed targets and native configurations.
-
-2015-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Remove HPUX.
-	* Makefile.in (ALL_64_TARGET_OBS): Remove ia64-hpux-tdep.o.
-	(ALL_TARGET_OBS): Remove hppa-hpux-tdep.o, solib-som.o and solib-pa64.o.
-	(HFILES_NO_SRCDIR): Remove solib-som.h, inf-ttrace.h, solib-pa64.h and
-	ia64-hpux-tdep.h, solib-ia64-hpux.h.
-	(ALLDEPFILES): Remove hppa-hpux-tdep.c, hppa-hpux-nat.c,
-	ia64-hpux-nat.c, ia64-hpux-tdep.c, somread.c and solib-som.c.
-	* config/djgpp/fnchange.lst: Remove hppa-hpux-nat.c and
-	hppa-hpux-tdep.c.
-	* config/ia64/hpux.mh: Remove file.
-	* config/pa/hpux.mh: Remove file.
-	* configure: Rebuilt.
-	* configure.ac (dlgetmodinfo, somread.o): Remove.
-	* configure.host (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
-	(ia64-*-hpux*): Remove its float format exception.
-	* configure.tgt (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
-	* hppa-hpux-nat.c: Remove file.
-	* hppa-hpux-tdep.c: Remove file.
-	* hppa-tdep.c (struct hppa_unwind_info, struct hppa_objfile_private):
-	Move them here from hppa-tdep.h
-	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Make it static.
-	(hppa_frame_prev_register_helper): Remove HPPA_FLAGS_REGNUM exception.
-	* hppa-tdep.h (struct hppa_unwind_info, struct hppa_objfile_private):
-	Move them to hppa-tdep.c.
-	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Remove
-	declarations.
-	* ia64-hpux-nat.c: Remove file.
-	* ia64-hpux-tdep.c: Remove file.
-	* ia64-hpux-tdep.h: Remove file.
-	* inf-ttrace.c: Remove file.
-	* inf-ttrace.h: Remove file.
-	* solib-ia64-hpux.c: Remove file.
-	* solib-ia64-hpux.h: Remove file.
-	* solib-pa64.c: Remove file.
-	* solib-pa64.h: Remove file.
-	* solib-som.c: Remove file.
-	* solib-som.h: Remove file.
-	* somread.c: Remove file.
-
-2015-03-13  John Baldwin  <jhb@FreeBSD.org>
-
-	* configure.ac: AC_SEARCH_LIBS(kinfo_getvmmap, util).
-	* config.in: Regenerate.
-	* configure: Regenerate.
-	* fbsd-nat.c [!HAVE_KINFO_GETVMMAP] (fbsd_read_mapping): Don't
-        define.
-	(fbsd_find_memory_regions): Use kinfo_getvmmap to
-	enumerate memory regions if present.
-
-2015-03-13  John Baldwin  <jhb@FreeBSD.org>
-
-	* amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
-	* i386fbsd-tdep.c: Fix style in various gdb_static_assert
-	expressions.
-	(i386fbsd_sigtramp_p): Likewise.
-
-2015-03-12  John Baldwin  <jhb@FreeBSD.org>
-
-	* MAINTAINERS (Write After Approval): Add John Baldwin.
-
-2015-03-12  Gary Benson <gbenson@redhat.com>
-
-	* solib.c (_initialize_solib): Make "set/show sysroot" use
-	add_setshow_optional_filename_cmd so it can be restored to
-	empty after being set.
-
-2015-03-11  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* Makefile.in (SFILES): New source break-catch-syscall.c.
-	(COMMON_OBS): New object break-catch-syscall.o.
-	* break-catch-syscall.c: New file.
-	* breakpoint.c: Remove inclusion of "xml-syscall.h".
-	(syscall_catchpoint_p): Move declaration to break-catch-syscall.c
-	(struct syscall_catchpoint): Likewise.
-	(dtor_catch_syscall): Likewise.
-	(catch_syscall_inferior_data): Likewise.
-	(struct catch_syscall_inferior_data): Likewise.
-	(get_catch_syscall_inferior_data): Likewise.
-	(catch_syscall_inferior_data_cleanup): Likewise.
-	(insert_catch_syscall): Likewise.
-	(remove_catch_syscall): Likewise.
-	(breakpoint_hit_catch_syscall): Likewise.
-	(print_it_catch_syscall): Likewise.
-	(print_one_catch_syscall): Likewise.
-	(print_mention_catch_syscall): Likewise.
-	(print_recreate_catch_syscall): Likewise.
-	(catch_syscall_breakpoint_ops): Likewise.
-	(syscall_catchpoint_p): Likewise.
-	(create_syscall_event_catchpoint): Likewise.
-	(catch_syscall_split_args): Likewise.
-	(catch_syscall_command_1): Likewise.
-	(is_syscall_catchpoint_enabled): Likewise.
-	(catch_syscall_enabled): Likewise.
-	(catching_syscall_number): Likewise.
-	(catch_syscall_completer): Likewise.
-	(clear_syscall_counts): Likewise.
-	(initialize_breakpoint_ops): Move initialization of syscall
-	catchpoints to break-catch-syscall.c.
-	(_initialize_breakpoint): Move code related to syscall catchpoints
-	to break-catch-syscall.c.
-
-2015-03-11  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* breakpoint.c (breakpoint_find_if): New function.
-	* breakpoint.h (breakpoint_find_if): New prototype.
-
-2015-03-11  Gary Benson <gbenson@redhat.com>
-
-	* remote-fileio.h (remote_fileio_to_host_stat): New declaration.
-	* remote-fileio.c (remote_fileio_to_host_uint): New function.
-	(remote_fileio_to_host_ulong): Likewise.
-	(remote_fileio_to_host_mode): Likewise.
-	(remote_fileio_to_host_time): Likewise.
-	(remote_fileio_to_host_stat): Likewise.
-	* remote.c (PACKET_vFile_fstat): New enum value.
-	(remote_protocol_features): Register the "vFile:fstat" feature.
-	(remote_hostio_fstat): New function.
-	(remote_bfd_iovec_stat): Use the above.
-	(_initialize_remote): Register new "set/show remote
-	hostio-fstat-packet" command.
-	* symfile.c (separate_debug_file_exists): Update comment.
-	* NEWS: Announce new vFile:fstat packet.
-
-2015-03-11  Gary Benson <gbenson@redhat.com>
-
-	* common/common-remote-fileio.h: New file.
-	* common/common-remote-fileio.c: Likewise.
-	* Makefile.in (SFILES): Add common/common-remote-fileio.c.
-	(HFILES_NO_SRCDIR): Add common/common-remote-fileio.h.
-	(COMMON_OBS): Add common-remote-fileio.o.
-	(common-remote-fileio.o): New rule.
-	* remote-fileio.h (common-remote-fileio.h): New include.
-	* remote-fileio.c (gdb/fileio.h): Do not include.
-	(remote_fileio_to_be): Moved to common-remote-fileio.h.
-	(remote_fileio_to_fio_uint): Likewise.
-	(remote_fileio_to_fio_time): Likewise.
-	(remote_fileio_mode_to_target): Moved to common-remote-fileio.c.
-	(remote_fileio_to_fio_mode): Likewise.
-	(remote_fileio_to_fio_ulong): Likewise.
-	(remote_fileio_to_fio_stat): Likewise.
-
-2015-03-11  Andy Wingo  <wingo@igalia.com>
-
-	* guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
-	we were checking the cached type, not the cached dynamic type.
-
-2015-03-11  Andy Wingo  <wingo@igalia.com>
-
-	* guile/scm-cmd.c (cmdscm_destroyer): Don't xfree the name and
-	other strings, as these are on the GC'd heap, and will be
-	collected along with the smob.
-
-2015-03-11  Andy Wingo  <wingo@igalia.com>
-
-	* guile/scm-objfile.c (gdbscm_objfile_progspace): New function.
-	(objfile_functions): Bind gdbscm_objfile_progspace to
-	objfile-progspace.
-	* guile/lib/gdb.scm: Add objfile-progspace to exports.
-
-2015-03-11  Andy Wingo  <wingo@igalia.com>
-
-	* guile/guile.c (_initialize_guile): Disable automatic
-	finalization, if Guile offers us that possibility.
-	* guile/guile.c (call_initialize_gdb_module):
-	* guile/scm-safe-call.c (gdbscm_with_catch): Arrange to run
-	finalizers in appropriate places.
-	* configure.ac (AC_TRY_LIBGUILE): Add a check for
-	scm_set_automatic_finalization_enabled.
-	* configure: Regenerated.
-
-2015-03-11  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using
-	SAL, if possible.
-
-2015-03-11  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-nat.c (struct arch_lwp_info): New.
-	(s390_fix_watch_points): Rename to...
-	(s390_prepare_to_resume): ...this.  Skip the PER info update
-	unless the watch points have changed.
-	(s390_refresh_per_info, s390_new_thread): New functions.
-	(s390_insert_watchpoint): Call s390_refresh_per_info instead of
-	s390_fix_watch_points.
-	(s390_remove_watchpoint): Likewise.
-	(_initialize_s390_nat): Reflect renaming of s390_fix_watch_points.
-	Register s390_prepare_to_resume.
-
-2015-03-09  Pedro Alves  <palves@redhat.com>
-
-	Revert:
-	2015-03-07  Pedro Alves  <palves@redhat.com>
-	* common/gdb_socket.h: New file.
-	* ser-tcp.c: Include gdb_socket.h.  Don't include netinet/in.h nor
-	sys/socket.h.
-	(net_open): Use union gdb_sockaddr_u.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* configure.ac (build_warnings): Move -Wmissing-prototypes
-	-Wdeclaration-after-statement -Wmissing-parameter-type
-	-Wold-style-declaration -Wold-style-definition to the C-specific
-	set.
-	* configure: Regenerate.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* common/gdb_socket.h: New file.
-	* ser-tcp.c: Include gdb_socket.h.  Don't include netinet/in.h nor
-	sys/socket.h.
-	(net_open): Use union gdb_sockaddr_u.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* common/common-exceptions.c [!__cplusplus] (enum catcher_state)
-	(exceptions_state_mc_action_iter)
-	(exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
-	Don't define.
-	[__cplusplus] (try_scope_depth): New global.
-	[__cplusplus] (exception_try_scope_entry)
-	(exception_try_scope_exit, gdb_exception_sliced_copy)
-	(exception_rethrow): New functions.
-	(throw_exception): In C++ mode, throw
-	gdb_exception_RETURN_MASK_QUIT for RETURN_QUIT and
-	gdb_exception_RETURN_MASK_ERROR for RETURN_ERROR.
-	(throw_it): In C++ mode, use try_scope_depth.
-	* common/common-exceptions.h [!__cplusplus]
-	(exceptions_state_mc_action_iter)
-	(exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
-	Don't declare.
-	[__cplusplus] (exception_try_scope_entry)
-	(exception_try_scope_exit, exception_rethrow): Declare.
-	[__cplusplus] (struct exception_try_scope): New struct.
-	[__cplusplus] (TRY, CATCH, END_CATCH): Reimplement on top of real
-	C++ exceptions.
-	(struct gdb_exception_RETURN_MASK_ALL)
-	(struct gdb_exception_RETURN_MASK_ERROR)
-	(struct gdb_exception_RETURN_MASK_QUIT): New types.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* main.c (handle_command_errors): Remove volatile qualifier from
-	parameter.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.c (save_breakpoints): Adjust to avoid code between
-	TRY and CATCH.
-	* gdbtypes.c (safe_parse_type): Remove empty line.
-	(types_deeply_equal):
-	* guile/scm-frame.c (gdbscm_frame_name):
-	* linux-thread-db.c (find_new_threads_once):
-	* python/py-breakpoint.c (bppy_get_commands):
-	* record-btrace.c (record_btrace_insert_breakpoint)
-	(record_btrace_remove_breakpoint, record_btrace_start_replaying)
-	(record_btrace_start_replaying): Adjust to avoid code between TRY
-	and CATCH.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* common/common-exceptions.c (struct catcher) <exception>: No
-	longer a pointer to volatile exception.  Now an exception value.
-	<mask>: Delete field.
-	(exceptions_state_mc_init): Remove all parameters.  Adjust.
-	(exceptions_state_mc): No longer pop the catcher here.
-	(exceptions_state_mc_catch): New function.
-	(throw_exception): Adjust.
-	* common/common-exceptions.h (exceptions_state_mc_init): Remove
-	all parameters.
-	(exceptions_state_mc_catch): Declare.
-	(TRY_CATCH): Rename to ...
-	(TRY): ... this.  Remove EXCEPTION and MASK parameters.
-	(CATCH, END_CATCH): New.
-	All callers adjusted.
-
-2015-03-07  Tom Tromey  <tromey@redhat.com>
-
-	* top.c (quit_force): Inline and delete DO_TRY, DO_PRINT_EX.
-
-2015-03-07  Pedro Alves  <palves@redhat.com>
-
-	* amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
-	(amd64_epilogue_frame_cache): Normal exception handling code.
-	* break-catch-throw.c (check_status_exception_catchpoint)
-	(re_set_exception_catchpoint): Ditto.
-	* cli/cli-interp.c (safe_execute_command):
-	* cli/cli-script.c (script_from_file): Ditto.
-	* compile/compile-c-symbols.c (generate_c_for_for_one_variable):
-	Ditto.
-	* compile/compile-object-run.c (compile_object_run): Ditto.
-	* cp-abi.c (baseclass_offset): Ditto.
-	* cp-valprint.c (cp_print_value): Ditto.
-	* exceptions.c (catch_exceptions_with_msg):
-	* frame-unwind.c (frame_unwind_try_unwinder): Ditto.
-	* frame.c (get_frame_address_in_block_if_available): Ditto.
-	* i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
-	(i386_sigtramp_frame_cache): Ditto.
-	* infcmd.c (post_create_inferior): Ditto.
-	* linespec.c (parse_linespec, find_linespec_symbols):
-	* p-valprint.c (pascal_object_print_value): Ditto.
-	* parse.c (parse_expression_for_completion): Ditto.
-	* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.
-	* remote.c (remote_get_noisy_reply): Ditto.
-	* s390-linux-tdep.c (s390_frame_unwind_cache): Ditto.
-	* solib-svr4.c (solib_svr4_r_map): Ditto.
-
-2015-03-06  Gary Benson  <gbenson@redhat.com>
-
-	* common/common-utils.h (startswith): New inline function.
-	All places where this logic was used updated to use the above.
-
-2015-03-05  Pedro Alves  <palves@redhat.com>
-
-	PR gdb/18002
-	* mem-break.c (default_memory_insert_breakpoint): Set shadow_len
-	after reading the breakpoint's shadow memory.
-
-2015-03-05  Mark Kettenis  <kettenis@gnu.org>
-
-	* hppabsd-nat.c: Remove file.
-	* hppaobsd-nat.c: New file.
-	* Makefile.in (ALLDEPFILES): Remove hppabsd-nat.c.  Add
-	hppaobsd-nat.c.
-	* config/pa/obsd.mh (NATDEPFILES): Replace hppabsd-nat.o with
-	hppaobsd-nat.o.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* target.h (struct target_ops) <to_decr_pc_after_break>: Delete.
-	(target_decr_pc_after_break): Delete declaration.
-	* target.c (default_target_decr_pc_after_break)
-	(target_decr_pc_after_break): Delete.
-	* linux-nat.c (check_stopped_by_breakpoint, linux_nat_wait_1): Use
-	gdbarch_decr_pc_after_break instead of target_decr_pc_after_break.
-	* linux-thread-db.c (check_event): Likewise.
-	* infrun.c (adjust_pc_after_break): Likewise.
-	* darwin-nat.c (cancel_breakpoint): Likewise.
-	* aix-thread.c (aix_thread_wait): Likewise.
-	* target-delegates.c: Regenerate.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (save_sigtrap): Check for breakpoints before
-	checking watchpoints.
-	(status_callback) [USE_SIGTRAP_SIGINFO]: Don't check whether a
-	breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
-	(check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]: Decide whether
-	a breakpoint triggered based on the SIGTRAP's siginfo.si_code.
-	(linux_nat_stopped_by_sw_breakpoint)
-	(linux_nat_supports_stopped_by_sw_breakpoint)
-	(linux_nat_stopped_by_hw_breakpoint)
-	(linux_nat_supports_stopped_by_hw_breakpoint): New functions.
-	(linux_nat_wait_1): Don't re-increment the PC if relying on
-	SIGTRAP's siginfo->si_code.
-	(linux_nat_add_target): Install new target methods.
-	* linux-thread-db.c (check_event): Don't account for breakpoint PC
-	offset if the target already adjusted the PC.
-	* nat/linux-ptrace.h (USE_SIGTRAP_SIGINFO): New.
-	(GDB_ARCH_TRAP_BRKPT): New.
-	(TRAP_HWBKPT): Define if not already defined.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* NEWS: Mention the new "swbreak" and "hwbreak" stop reasons.
-	* remote.c (struct remote_state) <remote_stopped_by_watchpoint_p>:
-	Delete field.
-	<stop_reason>: New field.
-	(PACKET_swbreak_feature, PACKET_hwbreak_feature): New enum values.
-	(packet_set_cmd_state): New function.
-	(remote_protocol_features): Register the "swbreak" and "hwbreak"
-	features.
-	(remote_query_supported): If not disabled with the corresponding
-	"set remote foo-packet" command, report support for the swbreak
-	and hwbreak features.
-	(struct stop_reply) <remote_stopped_by_watchpoint_p>: Delete
-	field.
-	<stop_reason>: New field.
-	(remote_parse_stop_reply): Handle "swbreak" and "hwbreak".
-	(remote_wait_as): Adjust.
-	(remote_stopped_by_sw_breakpoint)
-	(remote_supports_stopped_by_sw_breakpoint)
-	(remote_stopped_by_hw_breakpoint)
-	(remote_supports_stopped_by_hw_breakpoint): New functions.
-	(remote_stopped_by_watchpoint): New function.
-	(init_remote_ops): Install them.
-	(_initialize_remote): Register new "set/show remote
-	swbreak-feature-packet" and "set/show remote
-	swbreak-feature-packet" commands.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* btrace.h: Include target/waitstatus.h.
-	(struct btrace_thread_info) <stop_reason>: New field.
-	* record-btrace.c (record_btrace_step_thread): Use
-	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
-	(record_btrace_decr_pc_after_break): Delete.
-	(record_btrace_stopped_by_sw_breakpoint)
-	(record_btrace_supports_stopped_by_sw_breakpoint)
-	(record_btrace_stopped_by_hw_breakpoint)
-	(record_btrace_supports_stopped_by_hw_breakpoint): New functions.
-	(init_record_btrace_ops): Install them.
-	* record-full.c (record_full_hw_watchpoint): Delete and replace
-	with ...
-	(record_full_stop_reason): ... this throughout.
-	(record_full_exec_insn): Adjust.
-	(record_full_wait_1): Adjust.  No longer re-increment the PC.
-	(record_full_wait_1): Adjust.  Use
-	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
-	(record_full_stopped_by_watchpoint): Adjust.
-	(record_full_stopped_by_sw_breakpoint)
-	(record_full_supports_stopped_by_sw_breakpoint)
-	(record_full_supports_stopped_by_sw_breakpoint)
-	(record_full_stopped_by_hw_breakpoint)
-	(record_full_supports_stopped_by_hw_breakpoint): New functions.
-	(init_record_full_ops, init_record_full_core_ops): Install them.
-	* record.c (record_check_stopped_by_breakpoint): New function.
-	* record.h: Include target/waitstatus.h.
-	(record_check_stopped_by_breakpoint): New declaration.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	enum lwp_stop_reason -> enum target_stop_reason
-	* linux-nat.c (linux_resume_one_lwp, check_stopped_by_watchpoint)
-	(linux_nat_stopped_by_watchpoint, status_callback)
-	(linux_nat_wait_1): Adjust.
-	* linux-nat.h (enum lwp_stop_reason): Delete.
-	(struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
-	* x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
-	* target/waitstatus.h (enum target_stop_reason): New.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.c (need_moribund_for_location_type): New function.
-	(bpstat_stop_status): Don't skipping checking moribund locations
-	of breakpoint types which the target tell caused a stop.
-	(program_breakpoint_here_p): New function, factored out from ...
-	(bp_loc_is_permanent): ... this.
-	(update_global_location_list): Don't create a moribund location if
-	the target supports reporting stops of the type of the removed
-	breakpoint.
-	* breakpoint.h (program_breakpoint_here_p): New declaration.
-	* infrun.c (adjust_pc_after_break): Return early if the target has
-	already adjusted the PC.  Add comments.
-	(handle_signal_stop): If nothing explains a signal, and the target
-	tells us the stop was caused by a software breakpoint, check if
-	there's a breakpoint instruction in the memory.  If so, adjust the
-	PC before presenting the stop to the user.  Otherwise, ignore the
-	trap.  If nothing explains a signal, and the target tells us the
-	stop was caused by a hardware breakpoint, ignore the trap.
-	* target.h (struct target_ops) <to_stopped_by_sw_breakpoint,
-	to_supports_stopped_by_sw_breakpoint, to_stopped_by_hw_breakpoint,
-	to_supports_stopped_by_hw_breakpoint>: New fields.
-	(target_stopped_by_sw_breakpoint)
-	(target_supports_stopped_by_sw_breakpoint)
-	(target_stopped_by_hw_breakpoint)
-	(target_supports_stopped_by_hw_breakpoint): Define.
-	* target-delegates.c: Regenerate.
-
-2015-03-04  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (follow_fork_inferior): Use the whole of the
-	inferior_ptid and pending_follow.related_pid ptids instead of
-	building ptids from the process components.  Adjust verbose output
-	to use target_pid_to_str.
-	* linux-nat.c (linux_child_follow_fork): Use the whole of the
-	inferior_ptid and pending_follow.related_pid ptids instead of
-	building ptids from the process components.
-
-2015-03-04  Mark Kettenis  <kettenis@gnu.org>
-
-	* inf-ptrace.c [PT_GET_PROCESS_STATE]
-	(inf_ptrace_insert_fork_catchpoint): New function.
-	(inf_ptrace_remove_fork_catchpoint): New function.
-	(inf_ptrace_target) [PT_GET_PROCESS_STATE]: Install them.
-
-2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (s390_register_name): Return empty string
-	instead of NULL for registers that shouldn't be visible.
-
-2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (s390_gdbarch_init): Use the correct syscall
-	XML file for 64-bit targets.
-
-2015-03-03  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* target.h (find_default_create_inferior): Remove declaration.
-	(find_default_attach): Likewise.
-
-2015-03-03  Pedro Alves  <palves@redhat.com>
-
-	* inf-ptrace.c (inf_ptrace_resume): Remove spurious whitespace.
-	Use ptid_get_pid to get the overall process id when resuming all
-	threads.
-
-2015-03-03  Pedro Alves  <palves@redhat.com>
-
-	* i386-linux-nat.c (i386_linux_resume): Get the ptrace PID out of
-	the lwp field of ptid.  Pass the full ptid to get_thread_regcache.
-	* inf-ptrace.c (get_ptrace_pid): New function.
-	(inf_ptrace_resume): Use it.
-	* linux-nat.c (linux_resume_one_lwp): Pass the LWP's ptid ummodified
-	to the lower layer.
-
-2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* nat/linux-btrace.c: Include sys/utsname.h.
-	(linux_determine_kernel_ptr_bits): New.
-	(linux_enable_bts): Call linux_determine_kernel_ptr_bits.
-	* x86-linux-nat.c (x86_linux_enable_btrace): Do not overwrite non-zero
-	ptr_bits.
-
-2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (ftrace_update_function): Treat return as tailcall for
-	"_dl_runtime_resolve".
-
-2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.h (btrace_function) <lbegin, lend>: Remove.
-	* btrace.c (ftrace_debug): Do not print the line range.
-	(ftrace_skip_file, ftrace_update_lines): Remove.
-	(ftrace_new_function): Remove lbegin and lend initialization.
-	(btrace_compute_ftrace_bts): Remove call to ftrace_update_lines.
-	* record-btrace.c (btrace_compute_src_line_range): New.
-	(btrace_call_history_src_line): Call btrace_compute_src_line_range.
-
-2015-03-02  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (follow_exec): Delete all threads of the process except
-	the event thread.  Extended comments.
-
-2015-03-02  Joel Brobecker  <brobecker@adacore.com>
-
-	* contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
-
-2015-03-02  Joel Brobecker  <brobecker@adacore.com>
-
-	* utils.h: Remove <stdbool.h> #include.
-	(producer_is_gcc): Change return type to "int".
-	* utils.c (producer_is_gcc): Change return type to int.
-	Return 1 instead of true, and 0 instead of false.
-	Adjust function documentation accordingly.
-
-2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-nat.c (have_regset_vxrs): New static variable.
-	(s390_linux_fetch_inferior_registers): Handle vector registers, if
-	present.
-	(s390_linux_store_inferior_registers): Likewise.
-	(s390_get_hwcap): Remove function.  Embed its logic...
-	(s390_read_description): ...here.  Yield a target description with
-	vector registers if applicable.
-	* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
-	"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
-	"features/s390x-tevx-linux64.c".
-	(struct gdbarch_tdep) <v0_full_regnum>: New field.
-	(s390_dwarf_regmap): Add vector registers.  Remove bogus entries
-	for "GNU/Linux-specific registers".
-	(s390_dwarf_reg_r0l): New enum value.
-	(s390_dwarf_reg_to_regnum): Support vector registers.
-	(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
-	of GPR lower halves.
-	(regnum_is_vxr_full): New function.
-	(s390_register_name): New function.
-	(s390_pseudo_register_name): Handle v0-v15, which are composed of
-	f0-f15 and v0l-v15l.
-	(s390_pseudo_register_type): Likewise.
-	(s390_pseudo_register_read): Likewise.
-	(s390_pseudo_register_write): Likewise.
-	(s390_value_from_register): Account for the fact that values are
-	placed left-justified in vector registers.
-	(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
-	the vector reggroup and omit them from the general reggroup.
-	(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
-	(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
-	(s390_iterate_over_regset_sections): Add iterations for the two
-	new vector regsets.
-	(s390_core_read_description): Yield a target description with
-	vector registers if applicable.
-	(s390_gdbarch_init): Handle target descriptions with vector
-	registers.  Add "register_name" gdbarch method.
-	(_initialize_s390_tdep): Call new tdesc initialization functions.
-	* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
-	(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
-	(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
-	(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
-	(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
-	(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
-	(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
-	(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
-	(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
-	(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
-	(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
-	(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
-	(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
-	(S390_NUM_REGS): Adjust value.
-	(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
-	(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
-	(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
-	* NEWS: Announce S/390 vector register support.
-
-2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* features/s390-tevx-linux64.xml: New file.
-	* features/s390-vx-linux64.xml: New file.
-	* features/s390-vx.xml: New file.
-	* features/s390x-tevx-linux64.xml: New file.
-	* features/s390x-vx-linux64.xml: New file.
-	* features/Makefile (WHICH): Add s390-vx-linux64,
-	s390x-vx-linux64, s390-tevx-linux64, and s390x-tevx-linux64.
-	(s390-vx-linux64-expedite, s390-tevx-linux64-expedite)
-	(s390x-vx-linux64-expedite, s390x-tevx-linux64-expedite): New
-	macros.
-	* features/s390-tevx-linux64.c: New generated file.
-	* features/s390-vx-linux64.c: Likewise.
-	* features/s390x-tevx-linux64.c: Likewise.
-	* features/s390x-vx-linux64.c: Likewise.
-	* regformats/s390-tevx-linux64.dat: Likewise.
-	* regformats/s390-vx-linux64.dat: Likewise.
-	* regformats/s390x-tevx-linux64.dat: Likewise.
-	* regformats/s390x-vx-linux64.dat: Likewise.
-
-2015-02-28  Doug Evans  <xdje42@gmail.com>
-
-	* symtab.h (struct symtab) <next>: Fix comment.
-
-2015-02-27  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* python/python.c (python_GdbModuleDef): Rename GdbMethods to
-	python_GdbMethods.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* dtrace-probe.c (dtrace_probe_ops): Make extern.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* common/common-exceptions.h (exception_none): Declare.
-	* common/common-exceptions.c (exception_none): Moved from
-	exceptions.c.
-	(exceptions_state_mc_init): Use exception_none.
-	* exceptions.c (exception_none): Move to
-	common/common-exceptions.c.
-	* exceptions.h (exception_none): Move to
-	common/common-exceptions.h.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* main.c (catch_command_errors, catch_command_errors_const):
-	Remove 'mask' argument.  Adjust.
-	(captured_main): Adjust callers.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* python/python-internal.h: Include "extension-priv.h".
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.h (enum print_stop_action): Move further up in the
-	file.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* gdbarch.sh: Include regcache.h.
-	* gdbarch.h: Regenerate.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* arm-tdep.c (decode_insn) <arm_handle_insn, thumb_handle_insn>:
-	Remove duplicate const.
-	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Remove
-	duplicate const.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* cp-valprint.c (vtbl_ptr_name): Use EXPORTED_CONST.
-	* guile/guile.c (extension_language_guile): Use EXPORTED_CONST.
-	* features/feature_to_c.sh: Tag the generated xml_builtin array
-	with extern const in C++ mode.
-
-2015-02-27  Tom Tromey  <tromey@redhat.com>
-
-	* minidebug.c (struct lzma_stream): Rename to ...
-	(struct gdb_lzma_stream): ... this.
-	(lzma_open, lzma_pread, lzma_close, lzma_stat): Adjust.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): New
-	function.
-	(mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
-	(mi_cmd_stack_list_variables): Use it.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* x86-linux-nat.c (u_debugreg_offset): New function.
-	(x86_linux_dr_get, x86_linux_dr_set): Use it.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* nat/x86-dregs.h (enum target_hw_bp_type): Remove forward
-	declaration.
-	Include break-common.h.
+	PR gdb/20939
+	* disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
+	call memory_error, save memaddr instead.
+	(gdb_disassembler::print_insn): If gdbarch_print_insn returns
+	negative, cal memory_error.
+	* disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
+
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* disasm-selftests.c (memory_error_test): New function.
+	(_initialize_disasm_selftests): Register memory_error_test.
+
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (SFILES): Add disasm-selftests.c and
+	selftest-arch.c.
+	(COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
+	* disasm-selftests.c: New file.
+	* selftest-arch.c: New file.
+	* selftest-arch.h: New file.
+
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* mep-tdep.c (mep_gdb_print_insn): Set info->arch
+	to bfd_arch_mep.  Don't return 0 if section is not
+	found.  Call print_insn_mep.
 
-2015-02-27  Tom Tromey  <tromey@redhat.com>
-	    Pedro Alves <palves@redhat.com>
+2017-01-26  Pedro Alves  <palves@redhat.com>
+	    Yao Qi  <yao.qi@linaro.org>
 
-	* arm-tdep.c (set_fp_model_sfunc, arm_set_abi): Use 'int' for
-	local used to iterate over enums.
-	* completer.c (signal_completer): Likewise.
-	* i386-tdep.c (i386_stap_parse_special_token): Likewise.
-	* rs6000-tdep.c (powerpc_set_vector_abi): Likewise.
-	* tui/tui-data.c (tui_next_win, tui_prev_win): Likewise.
-	* tui/tui-layout.c (next_layout, prev_layout): Likewise.
-	* tui/tui-win.c (tui_refresh_all_win, tui_rehighlight_all)
-	(tui_resize_all, tui_set_focus_command, tui_all_windows_info): Likewise.
-	* tui-wingeneral.c (tui_refresh_all):  Likewise.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* target.h: Include "infrun.h".
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* common/agent.h (IPA_SYM_EXPORTED_NAME): New.
-	(IPA_SYM): Use it.
-	* common/common-defs.h (EXTERN_C_PUSH, EXTERN_C_POP): New macros.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* cli-out.c (_rl_erase_entire_line): Move declaration out of
-	cli_mld_erase_entire_line, and make it extern "C".
-	* common/common-defs.h (EXTERN_C): New.
-	* completer.c (_rl_completion_prefix_display_length)
-	(_rl_print_completions_horizontally, QSFUNC): Move declarations
-	out of gdb_display_match_list_1.
-	(_rl_qsort_string_compare): Move declaration out of
-	gdb_display_match_list_1, and make it extern "C".
-	* defs.h (re_comp): Use EXTERN_C.
-	* maint.c (_mcleanup): Move declaration out of mcleanup_wrapper,
-	and make it extern "C".
-	(monstartup): Move declaration out of maintenance_set_profile_cmd,
-	and make it extern "C".
-	(main): Move declaration out of maintenance_set_profile_cmd.
-	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string): Use
-	EXTERN_C.
-
-2015-02-27  Pedro Alves  <palves@redhat.com>
-
-	* python/python.c (GdbMethods): Rename to ...
-	(python_GdbMethods): ... this and make extern.
-	(GdbModuleDef): Rename to ...
-	(python_GdbModuleDef): ... this and make extern.
+	* arm-tdep.c: Include "disasm.h".
+	(gdb_print_insn_arm): Update code to get gdbarch.
+	* disasm.c (dis_asm_read_memory): Change it to
+	gdb_disassembler::dis_asm_read_memory.
+	(dis_asm_memory_error): Likewise.
+	(dis_asm_print_address): Likewise.
+	(gdb_pretty_print_insn): Change it to
+	gdb_disassembler::pretty_print_insn.
+	(dump_insns): Add one argument gdb_disassemlber.  All
+	callers updated.
+	(do_mixed_source_and_assembly_deprecated): Likewise.
+	(do_mixed_source_and_assembly): Likewise.
+	(do_assembly_only): Likewise.
+	(gdb_disassembler::gdb_disassembler): New.
+	(gdb_disassembler::print_insn): New.
+	* disasm.h (class gdb_disassembler): New.
+	(gdb_pretty_print_insn): Remove declaration.
+	(gdb_disassemble_info): Likewise.
+	* guile/scm-disasm.c (class gdbscm_disassembler): New.
+	(gdbscm_disasm_read_memory_worker): Update.
+	(gdbscm_disasm_read_memory): Update.
+	(gdbscm_disasm_memory_error): Remove.
+	(gdbscm_disasm_print_address): Remove.
+	(gdbscm_disassembler::gdbscm_disassembler): New.
+	(gdbscm_print_insn_from_port): Update.
+	* mips-tdep.c: Include disasm.h.
+	(gdb_print_insn_mips): Update code to get gdbarch.
+	* record-btrace.c (btrace_insn_history): Update.
+	* spu-tdep.c: Include disasm.h.
+	(struct spu_dis_asm_data): Remove.
+	(struct spu_dis_asm_info): New.
+	(spu_dis_asm_print_address): Use spu_dis_asm_info to get
+	SPU id.
+	(gdb_print_insn_spu): Cast disassemble_info to
+	spu_dis_asm_info.
+
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* disasm.c (do_ui_file_delete): Delete.
+	(gdb_insn_length): Move code creating stream to ...
+	* utils.c (null_stream): ... here.  New function.
+	* utils.h (null_stream): Declare.
+
+2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* python/py-inferior.c (find_thread_object): Return directly
+	from the loop.  Remove "found" variable.
+
+2017-01-21  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.12.1 released.
+
+2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* python/py-function.c (fnpy_call): Reorder declarations to have
+	the gdbpy_enter object declared first.
+	* python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
+
+2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR python/21068
+	* python/python-internal.h (PyMem_RawMalloc): Define for
+	Python < 3.4.
+	* python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
+	PyMem_RawMalloc instead of PyMem_Malloc.
+
+2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
+	    Luis Machado  <lgustavo@codesourcery.com>
+
+	* NEWS (New commands): Mention flash-erase.
+	(New MI commands): Mention target-flash-erase.
+	* mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
+	command.
+	* mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
+	* mi/mi-main.c (mi_cmd_target_flash_erase): New function.
+	* target.c (flash_erase_command): New function.
+	(initialize_targets): Add new flash-erase command.
+	* target.h (flash_erase_command): New declaration.
+
+2017-01-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* nat/linux-ptrace.c: Only include <sys/procfs.h> if
+	HAVE_SYS_PROCFS_H is defined.
+
+2017-01-18  Alan Hayward  <alan.hayward@arm.com>
+
+	* remote.c (struct cached_reg): Change data into a pointer.
+	* (stop_reply_dtr): Free data pointers before deleting vector.
+	(process_stop_reply): Likewise.
+	(remote_parse_stop_reply): Allocate space for data
+
+2017-01-18  Alan Hayward  <alan.hayward@arm.com>
+
+	* amd64-tdep.c (amd64_pseudo_register_read_value): remove
+	MAX_REGISTER_SIZE.
+	(amd64_pseudo_register_read_value): Likewise.
+	* remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
+	(store_register_using_P): Likewise.
+	* regcache.c (regcache_xfer_part): Likewise.
+
+2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
+
+	Split real and pseudo registers.
+	* sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
+	(sparc32_pseudo_regnum): New enum.
+	* sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
+	* sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
+	(SPARC32_CP0_REGISTERS): New macro.
+	(sparc32_pseudo_register_name): New function.
+	(sparc32_register_name): Use sparc32_pseudo_register_name.
+	(sparc32_pseudo_register_type): New function.
+	(sparc32_register_type): Use sparc32_pseudo_register_type.
+	(sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
+	pseudo register numbers.
+	* sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
+	(SPARC64_CP0_REGISTERS): New macro.
+	(sparc64_pseudo_register_name): New function.
+	(sparc64_register_name): Use sparc64_pseudo_register_name.
+	(sparc64_pseudo_register_type): New function.
+	(sparc64_register_type): Use sparc64_pseudo_register_type.
+	(sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
+	pseudo register numbers.
+	(sparc64_store_floating_fields, sparc64_extract_floating_fields,
+	sparc64_store_arguments): Handle pseudo register numbers.
+
+2017-01-13  Yao Qi  <yao.qi@linaro.org>
+
+	* remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
+	(putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
+	output.
+	(getpkt_or_notif_sane_1): Likewise.
+
+2017-01-13  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
+	of CC.  Pass "-x c++-header" instead of "-x c".
+
+2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (remote_can_async_p): Update comment.
+
+2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-nat.c (linux_nat_can_async_p): Update comment.
+
+2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
+
+2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-type.c (typy_legacy_template_argument): Update.
+	* cp-support.h (struct demangle_parse_info) (demangle_parse_info,
+	~demangle_parse_info): Declare new members.
+	(cp_demangled_name_to_comp): Return unique_ptr.
+	(cp_demangled_name_parse_free)
+	(make_cleanup_cp_demangled_name_parse_free)
+	(cp_new_demangle_parse_info): Remove.
+	* cp-support.c (do_demangled_name_parse_free_cleanup)
+	(make_cleanup_cp_demangled_name_parse_free): Remove.
+	(inspect_type, cp_canonicalize_string_full)
+	(cp_canonicalize_string): Update.
+	(mangled_name_to_comp): Change return type.
+	(cp_class_name_from_physname, method_name_from_physname)
+	(cp_func_name, cp_remove_params): Update.
+	* cp-name-parser.y (demangle_parse_info): New constructor, from
+	cp_new_demangle_parse_info.
+	(~demangle_parse_info): New destructor, from
+	cp_demangled_name_parse_free.
+	(cp_merge_demangle_parse_infos): Update.
+	(cp_demangled_name_to_comp): Change return type.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* top.c (prevent_dont_repeat): Change return type.
+	* python/python.c (execute_gdb_command): Use std::string.
+	Update.
+	* guile/guile.c (gdbscm_execute_gdb_command): Update.
+	* command.h (prevent_dont_repeat): Change return type.
+	* breakpoint.c (bpstat_do_actions_1): Update.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* value.h (scoped_value_mark::~scoped_value_mark): Call
+	free_to_mark.
+	(scoped_value_mark::free_to_mark): New method.
+	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
+	scoped_value_mark.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (valpy_dereference, valpy_referenced_value)
+	(valpy_reference_value, valpy_const_value, valpy_get_address)
+	(valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
+	(valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
+	(valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
+	* dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
+	scoped_value_mark.
+	* dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
+	* value.h (scoped_value_mark): New class.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
+	* psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
+	* psymtab.c (discard_psymtabs_upto): Remove.
+	(make_cleanup_discard_psymtabs): Remove.
+	(struct psymtab_state): Remove.
+
+2017-01-10  Tom Tromey  <tom@tromey.com>
+
+	* record-full.c (record_full_save_cleanups): Remove.
+	(record_full_save): Use gdb::unlinker.
+	* gcore.c (do_bfd_delete_cleanup): Remove.
+	(gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
+	cleanups.
+	* dwarf2read.c (unlink_if_set): Remove.
+	(write_psymtabs_to_index): Use gdb::unlinker.
+	* common/gdb_unlinker.h: New file.
 
-2015-02-27  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* record-btrace.c (set_record_btrace_cmdlist)
-	(show_record_btrace_cmdlist): Remove redefinitions.
+	* windows-tdep.c (windows_xfer_shared_library): Update.
+	* windows-nat.c (windows_make_so): Update.
+	* utils.h (make_cleanup_bfd_unref): Remove.
+	* utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
+	* symfile.h (symfile_bfd_open)
+	(find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
+	* symfile.c (read_symbols, symbol_file_add)
+	(separate_debug_file_exists): Update.
+	(symfile_bfd_open): Return gdb_bfd_ref_ptr.
+	(generic_load, reread_symbols): Update.
+	* symfile-mem.c (symbol_file_add_from_memory): Update.
+	* spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
+	(spu_symbol_file_add_from_memory): Update.
+	* solist.h (struct target_so_ops) <bfd_open>: Return
+	gdb_bfd_ref_ptr.
+	(solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
+	* solib.c (solib_bfd_fopen, solib_bfd_open): Return
+	gdb_bfd_ref_ptr.
+	(solib_map_sections, reload_shared_libraries_1): Update.
+	* solib-svr4.c (enable_break): Update.
+	* solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
+	* solib-frv.c (enable_break2): Update.
+	* solib-dsbt.c (enable_break): Update.
+	* solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
+	gdb_bfd_ref_ptr.
+	(darwin_solib_get_all_image_info_addr_at_init): Update.
+	(darwin_bfd_open): Return gdb_bfd_ref_ptr.
+	* solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
+	* record-full.c (record_full_save): Update.
+	* python/py-objfile.c (objfpy_add_separate_debug_file): Update.
+	* procfs.c (insert_dbx_link_bpt_in_file): Update.
+	* minidebug.c (find_separate_debug_file_in_section): Return
+	gdb_bfd_ref_ptr.
+	* machoread.c (macho_add_oso_symfile): Change abfd to
+	gdb_bfd_ref_ptr.
+	(macho_symfile_read_all_oso): Update.
+	(macho_check_dsym): Return gdb_bfd_ref_ptr.
+	(macho_symfile_read): Update.
+	* jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
+	(jit_bfd_try_read_symtab): Update.
+	* gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
+	(gdb_bfd_openw, gdb_bfd_openr_iovec)
+	(gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
+	gdb_bfd_ref_ptr.
+	(gdb_bfd_ref_policy): New struct.
+	(gdb_bfd_ref_ptr): New typedef.
+	* gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
+	(gdb_bfd_openw, gdb_bfd_openr_iovec)
+	(gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
+	gdb_bfd_ref_ptr.
+	* gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
+	* gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
+	(gcore_command): Update.
+	* exec.c (exec_file_attach): Update.
+	* elfread.c (elf_symfile_read): Update.
+	* dwarf2read.c (dwarf2_get_dwz_file): Update.
+	(try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
+	(open_and_init_dwo_file): Update.
+	(open_dwp_file): Return gdb_bfd_ref_ptr.
+	(open_and_init_dwp_file): Update.
+	* corelow.c (core_open): Update.
+	* compile/compile-object-load.c (compile_object_load): Update.
+	* common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
+	* coffread.c (coff_symfile_read): Update.
+	* cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
+	gdb_bfd_ref_ptr.  Rename.
+	(dump_bfd_file, restore_command): Update.
+	* build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
+	* build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
+	(find_separate_debug_file_by_buildid): Update.
 
-2015-02-27  Tom Tromey  <tromey@redhat.com>
-	    Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* dwarf2-frame.c (enum cfa_how_kind, struct
-	dwarf2_frame_state_reg_info): Move out of struct
-	dwarf2_frame_state.
-	* dwarf2read.c (struct tu_stats): Move out of struct
-	dwarf2_per_objfile.
-	(struct file_entry): Move out of struct line_header.
-	(struct nextfield, struct nextfnfield, struct fnfieldlist, struct
-	typedef_field_list): Move out of struct field_info.
-	* gdbtypes.h (enum dynamic_prop_kind, union dynamic_prop_data):
-	Move out of struct dynamic_prop.
-	(union type_owner, union field_location, struct field, struct
-	range_bounds, union type_specific): Move out of struct main_type.
-	(struct fn_fieldlist, struct fn_field, struct typedef_field)
-	(VOFFSET_STATIC): Move out of struct cplus_struct_type.
-	(struct call_site_target, union call_site_parameter_u, struct
-	call_site_parameter): Move out of struct call_site.
-	* m32c-tdep.c (enum m32c_prologue_kind): Move out of struct
-	m32c_prologue.
-	(enum srcdest_kind): Move out of struct srcdest.
-	* main.c (enum cmdarg_kind): Move out of struct cmdarg.
-	* prologue-value.h (enum prologue_value_kind): Move out of struct
-	prologue_value.
-	* s390-linux-tdep.c (enum s390_abi_kind): Move out of struct
-	gdbarch_tdep.
-	* stabsread.c (struct nextfield, struct next_fnfieldlist): Move
-	out of struct field_info.
-	* symfile.h (struct other_sections): Move out of struct
-	section_addr_info.
-	* symtab.c (struct symbol_cache_slot): Move out struct
-	block_symbol_cache.
-	* target-descriptions.c (enum tdesc_type_kind): Move out of
-	typedef struct tdesc_type.
-	* tui/tui-data.h (enum tui_line_or_address_kind): Move out of
-	struct tui_line_or_address.
-	* value.c (enum internalvar_kind, union internalvar_data): Move
-	out of struct internalvar.
-	* xtensa-tdep.h (struct ctype_cache): Move out of struct
-	gdbarch_tdep.
+	* common/gdb_ref_ptr.h: New file.
+	* python/py-ref.h (struct gdbpy_ref_policy): New.
+	(gdbpy_ref): Now a typedef.
 
-2015-02-27  Tom Tromey  <tromey@redhat.com>
-	    Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	Rename symbols whose names are reserved C++ keywords throughout.
+	* utils.h (make_cleanup_htab_delete): Don't declare.
+	* utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
+	Remove.
+	* linespec.c (decode_compound_collector): Add constructor,
+	destructor.
+	(lookup_prefix_sym): Remove cleanup.
+	(symtab_collector): Add constructor, destructor.
+	(collect_symtabs_from_filename): Remove cleanup.
+	* disasm.c (do_mixed_source_and_assembly): Use htab_up.
+	* compile/compile-c-symbols.c (generate_c_for_variable_locations):
+	Use htab_up.
+	* gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
+	* dwarf2read.c (dw2_expand_symtabs_matching)
+	(dw2_map_symbol_filenames, dwarf_decode_macros)
+	(write_psymtabs_to_index): Use htab_up.
+	* dwarf2loc.c (func_verify_no_selftailcall)
+	(call_site_find_chain_1, func_verify_no_selftailcall)
+	(chain_candidate, call_site_find_chain_1): Use std::unordered_set,
+	std::vector, gdb::unique_xmalloc_ptr.
+	(call_sitep): Remove typedef.
+	(dwarf2_locexpr_baton_eval): Remove unused variable.
 
-2015-02-27  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* Makefile.in (COMPILER): New, get it from autoconf.
-	(COMPILE.pre, CC_LD): Use COMPILER.
-	(CXX): Get from autoconf instead.
-	(CXX_FOR_TARGET): Default to g++ instead of gcc.
-	* acinclude.m4: Include build-with-cxx.m4.
-	* build-with-cxx.m4: New file.
-	* configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
-	Disable -Werror by default if building in C++ mode.
-	(build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
-	-Wno-narrowing in C++ mode.  Only enable -Wpointer-sign in C mode.
-	Run supported-warning-flags tests with the C++ compiler.
-	Save/restore CXXFLAGS too.
-	* configure: Regenerate.
+	* python/python-internal.h (make_cleanup_py_decref)
+	(make_cleanup_py_xdecref): Don't declare.
+	* python/py-utils.c (py_decref, make_cleanup_py_decref)
+	(py_xdecref, make_cleanup_py_xdecref): Remove.
 
-2015-02-27  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* libiberty.m4: New file.
-	* acinclude.m4: Include libiberty.m4.
-	* configure.ac: Call libiberty_INIT.
-	* config.in, configure: Regenerate.
-
-2015-02-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* s390-linux-tdep.c (s390_gcc_target_options): Not just handle
-	31-bit targets, but 64-bit targets as well.
-	(s390_gnu_triplet_regexp): New function.
-	(s390_gdbarch_init): Set the gcc_target_options gdbarch method for
-	64-bit targets as well.  Set the gnu_triplet_regexp gdbarch
-	method.
-
-2015-02-27  Jon TURNEY  <jon.turney@dronecode.org.uk>  (tiny patch)
-
-	* windows-nat.c (CONTEXT_DEBUGGER): Remove.
-	(CONTEXT_DEBUGGER_DR): Add CONTEXT_SEGMENTS.  Incorporate flags
-	from CONTEXT_DEBUGGER.
-
-2015-02-26  Doug Evans  <dje@google.com>
-
-	* gdbtypes.c (internal_type_vptr_fieldno): Add missing call to
-	CHECK_TYPEDEF.
-	(set_type_vptr_fieldno): Ditto.
-	(internal_type_vptr_basetype, set_type_vptr_basetype): Ditto.
-	* gnu-v3-abi.c (gnuv3_dynamic_class): Ditto.
-
-2015-02-26  Pedro Alves  <palves@redhat.com>
-
-	* auto-load.h (file_is_auto_load_safe): Add ATTRIBUTE_PRINTF.
-	* complaints.c (vcomplaint): Pass argument FMT directly to
-	printf-like functions instead of complaint->fmt.
-	* ctf.c (ctf_save_write_metadata): Add ATTRIBUTE_PRINTF.
-	* darwin-nat.c (inferior_debug): Add ATTRIBUTE_PRINTF.
-	* compile/compile-loc2c.c (pushf, unary, binary): Add
-	ATTRIBUTE_PRINTF.
-	(do_compile_dwarf_expr_to_c): Pass string literal as format string
-	to pushf.
-	(BINARY): Pass string literal as format string to 'binary'.
-	* compile/compile-object-load.c (link_callbacks_einfo): Add
-	ATTRIBUTE_PRINTF.
-	* guile/guile-internal.h (gdbscm_printf): Add ATTRIBUTE_PRINTF.
-
-2015-02-26  Pedro Alves  <palves@redhat.com>
-
-	* windows-termcap.c: Rename to ...
-	* stub-termcap.c: ... this.  Adjust header line.
-	* Makefile.in (SFILES): Refer to stub-termcap.c instead of
-	windows-termcap.c.
-	* configure: Regenerate.
-	* configure.ac: Refer to stub-termcap.o instead of
-	windows-termcap.o.
-	* gdb_curses.h: Mention stub-termcap.c instead of
-	windows-termcap.c.
-
-2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* compile/compile-c-symbols.c (convert_one_symbol, convert_symbol_bmsym)
-	(gcc_symbol_address): Call gnu_ifunc_resolve_addr.
-
-2015-02-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
-
-	* gdb/infcmd.c (print_return_value): use type_to_string to print type.
-
-2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* elfread.c (elf_read_minimal_symbols): Use bfd_alloc for
-	bfd_canonicalize_symtab.
-
-2015-02-25  John Baldwin  <jhb@FreeBSD.org>
-
-	* amd64fbsd-nat.c: Include sys/user.h.
-	(_initialize_amd64fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
-	instead of KERN_PS_STRINGS to locate the signal trampoline.
-	* i386fbsd-nat.c: Include sys/user.h.
-	(_initialize_i386fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
-	instead of KERN_PS_STRINGS to locate the signal trampoline.
-	* amd64fbsd-tdep.c (amd64fbsd_sigtramp_code): New.
-	(amd64fbsd_sigtramp_p): New.
-	(amd64fbsd_sigtramp_start_addr, amd64fbsd_sigtramp_end_addr): No
-	longer set default values.
-	(amd64fbsd_init_abi): Set "sigtramp_p" to "amd64fbsd_sigtramp_p".
-	* i386fbsd-tdep.c (i386fbsd_sigtramp_start)
-	(i386fbsd_sigtramp_middle, i386fbsd_sigtramp_end)
-	(i386fbsd_freebsd4_sigtramp_start)
-	(i386fbsd_freebsd4_sigtramp_middle)
-	(i386fbsd_freebsd4_sigtramp_end, i386fbsd_osigtramp_start)
-	(i386fbsd_osigtramp_middle, i386fbsd_osigtramp_end): New.
-	(i386fbsd_sigtramp_p): New.
-	(i386fbsd_sigtramp_start_addr, i386fbsd_sigtramp_end_addr): No
-	longer set default values.
-	(i386fbsd_init_abi): Set "sigtramp_p" to "i386fbsd_sigtramp_p".
-
-2015-02-25  John Baldwin  <jhb@freebsd.org>
-
-	* amd64fbsd-tdep.c (amd64fbsd_sigcontext_addr): Use
-	get_frame_register instead of frame_unwind_register_unsigned.
-
-2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	PR build/18033
-	* compile/compile-c-support.c (c_compute_program): Change // comment.
-	* compile/compile-object-load.c (setup_sections): Change // comment.
-
-2015-02-26  Joel Brobecker  <brobecker@adacore.com>
-
-	PR build/18033:
-	* iq2000-tdep.c (iq2000_frame_cache): Delete C++-style comment.
-
-2015-02-23  Pedro Alves  <palves@redhat.com>
-
-	* remote.c (skip_to_semicolon): New function.
-	(remote_parse_stop_reply) <T stop reply>: Use it.  Don't
-	special case the stop reasons that look like hex numbers
-	upfront.  Instead handle real register numbers after matching
-	all the known stop reasons.
-
-2015-02-21  Doug Evans  <dje@google.com>
-
-	PR c++/17976, symtab/17821
-	* cp-namespace.c (cp_search_static_and_baseclasses): New parameter
-	is_in_anonymous.  All callers updated.
-	(find_symbol_in_baseclass): Ditto.
-	(cp_lookup_nested_symbol_1): Ditto.  Don't search all static blocks
-	for symbols in an anonymous namespace.
-	* dwarf2read.c (namespace_name): Don't call dwarf2_name, fetch
-	DW_AT_name directly.
-	(dwarf2_name): Convert missing namespace name to
-	CP_ANONYMOUS_NAMESPACE_STR.
-
-2015-02-20  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_handle_extended_wait): Call
-	thread_db_notice_clone whenever a new clone LWP is detected.
-	(linux_stop_and_wait_all_lwps, linux_unstop_all_lwps): New
-	functions.
-	* linux-nat.h (thread_db_attach_lwp): Delete declaration.
-	(thread_db_notice_clone, linux_stop_and_wait_all_lwps)
-	(linux_unstop_all_lwps): Declare.
-	* linux-thread-db.c (struct thread_get_info_inout): Delete.
-	(thread_get_info_callback): Delete.
-	(thread_from_lwp): Use td_thr_get_info and record_thread.
-	(thread_db_attach_lwp): Delete.
-	(thread_db_notice_clone): New function.
-	(try_thread_db_load_1): If /proc is mounted and shows the
-	process'es task list, walk over all LWPs and call thread_from_lwp
-	instead of relying on td_ta_thr_iter.
-	(attach_thread): Don't call check_thread_signals here.  Split the
-	tail part of the function (which adds the thread to the core GDB
-	thread list) to ...
-	(record_thread): ... this function.  Call check_thread_signals
-	here.
-	(thread_db_wait): Don't call thread_db_find_new_threads_1.  Always
-	call thread_from_lwp.
-	(thread_db_update_thread_list): Rename to ...
-	(thread_db_update_thread_list_org): ... this.
-	(thread_db_update_thread_list): New function.
-	(thread_db_find_thread_from_tid): Delete.
-	(thread_db_get_ada_task_ptid): Simplify.
-	* nat/linux-procfs.c: Include <sys/stat.h>.
-	(linux_proc_task_list_dir_exists): New function.
-	* nat/linux-procfs.h (linux_proc_task_list_dir_exists): Declare.
-
-2015-02-20  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (lin_lwp_attach_lwp): No longer special case the
-	main LWP.  Handle the case of waitpid returning 0 if we're already
-	attached to the LWP.  Don't set the LWP's last_resume_kind to
-	resume_stop if we already knew about the LWP.
-	(linux_nat_filter_event): Add debug logs.
+	* python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
+	(py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
 
-2015-02-20  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* target.h (forward_target_decr_pc_after_break): Delete
-	declaration.
+	* python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
 
-2015-02-20  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR threads/18006
-	* linux-thread-db.c (thread_get_info_callback): Return early if
-	the thread's lwp id is -1.
-
-2015-02-20  Joel Brobecker  <brobecker@adacore.com>
-
-	GDB 7.9 released.
-
-2015-02-19  Steve Ellcey  <sellcey@imgtec.com>
-
-	* dtrace-probe.c (dtrace_process_dof_probe): Initialize arg.expr.
-	(dtrace_get_probes) Change type of variable 'dof'.
-
-2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
-
-	PR breakpoints/16812
-	* linux-nat.c (linux_nat_filter_event): Report SIGTRAP,SIGILL,SIGSEGV.
-	* nat/linux-ptrace.c (linux_wstatus_maybe_breakpoint): Add.
-	* nat/linux-ptrace.h: Add linux_wstatus_maybe_breakpoint.
-
-2015-02-19  David Taylor  <dtaylor@emc.com>
-
-	* common/ax.def (setv): Fix consumed entry in setv DEFOP.
-
-2015-02-18  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-io.c (tui_handle_resize_during_io): Remove this
-	function.
-	(tui_putc): Don't call tui_handle_resize_during_io.
-	(tui_getc): Likewise.
-	(tui_mld_getc): Likewise.
-	* tui/tui-win.c: Include event-loop.h and tui/tui-io.h.
-	(tui_sigwinch_token): New static variable.
-	(tui_initialize_win): Adjust documentation.  Set
-	tui_sigwinch_token.
-	(tui_async_resize_screen): New asynchronous callback.
-	(tui_sigwinch_handler): Adjust documentation.  Asynchronously
-	invoke tui_async_resize_screen.
-
-2015-02-18  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* configure: Regenerated.
-	* configure.ac: Use GDB_AC_TRANSFORM.
-	* Makefile.in (aclocal_m4_deps): Added transform.m4.
-	* acinclude.m4: sinclude transform.m4.
-	* transform.m4: New file.
-	(GDB_AC_TRANSFORM): New macro.
-
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* NEWS: Announce the support for DTrace SDT probes.
-
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* amd64-linux-tdep.c: Include "parser-defs.h" and "user-regs.h".
-	(amd64_dtrace_parse_probe_argument): New function.
-	(amd64_dtrace_probe_is_enabled): Likewise.
-	(amd64_dtrace_enable_probe): Likewise.
-	(amd64_dtrace_disable_probe): Likewise.
-	(amd64_linux_init_abi): Register the
-	`gdbarch_dtrace_probe_argument', `gdbarch_dtrace_enable_probe',
-	`gdbarch_dtrace_disable_probe' and
-	`gdbarch_dtrace_probe_is_enabled' hooks.
-	(amd64_dtrace_disabled_probe_sequence_1): New constant.
-	(amd64_dtrace_disabled_probe_sequence_2): Likewise.
-	(amd64_dtrace_enable_probe_sequence): Likewise.
-	(amd64_dtrace_disable_probe_sequence): Likewise.
-
-2015-01-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* breakpoint.c (BREAK_ARGS_HELP): Help string updated to mention
-	the -probe-dtrace new vpossible value for PROBE_MODIFIER.
-	* configure.ac (CONFIG_OBS): dtrace-probe.o added if BFD can
-	handle ELF files.
-	* Makefile.in (SFILES): dtrace-probe.c added.
-	* configure: Regenerate.
-	* dtrace-probe.c: New file.
-	(SHT_SUNW_dof): New constant.
-	(dtrace_probe_type): New enum.
-	(dtrace_probe_arg): New struct.
-	(dtrace_probe_arg_s): New typedef.
-	(struct dtrace_probe_enabler): New struct.
-	(dtrace_probe_enabler_s): New typedef.
-	(dtrace_probe): New struct.
-	(dtrace_probe_is_linespec): New function.
-	(dtrace_dof_sect_type): New enum.
-	(dtrace_dof_dofh_ident): Likewise.
-	(dtrace_dof_encoding): Likewise.
-	(DTRACE_DOF_ENCODE_LSB): Likewise.
-	(DTRACE_DOF_ENCODE_MSB): Likewise.
-	(dtrace_dof_hdr): New struct.
-	(dtrace_dof_sect): Likewise.
-	(dtrace_dof_provider): Likewise.
-	(dtrace_dof_probe): Likewise.
-	(DOF_UINT): New macro.
-	(DTRACE_DOF_PTR): Likewise.
-	(DTRACE_DOF_SECT): Likewise.
-	(dtrace_process_dof_probe): New function.
-	(dtrace_process_dof): Likewise.
-	(dtrace_build_arg_exprs): Likewise.
-	(dtrace_get_arg): Likewise.
-	(dtrace_get_probes): Likewise.
-	(dtrace_get_probe_argument_count): Likewise.
-	(dtrace_can_evaluate_probe_arguments): Likewise.
-	(dtrace_evaluate_probe_argument): Likewise.
-	(dtrace_compile_to_ax): Likewise.
-	(dtrace_probe_destroy): Likewise.
-	(dtrace_gen_info_probes_table_header): Likewise.
-	(dtrace_gen_info_probes_table_values): Likewise.
-	(dtrace_probe_is_enabled): Likewise.
-	(dtrace_probe_ops): New variable.
-	(info_probes_dtrace_command): New function.
-	(_initialize_dtrace_probe): Likewise.
-	(dtrace_type_name): Likewise.
-
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* gdbarch.sh (dtrace_parse_probe_argument): New.
-	(dtrace_probe_is_enabled): Likewise.
-	(dtrace_enable_probe): Likewise.
-	(dtrace_disable_probe): Likewise.
-	* gdbarch.c: Regenerate.
-	* gdbarch.h: Regenerate.
+	* python/py-utils.c (unicode_to_encoded_string)
+	(python_string_to_target_string)
+	(python_string_to_target_python_string)
+	(python_string_to_host_string, gdbpy_obj_to_string)
+	(get_addr_from_python): Use gdbpy_ref.
 
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* stap-probe.c (stap_probe_ops): Add NULLs in the static
-	stap_probe_ops for `enable_probe' and `disable_probe'.
-	* probe.c (enable_probes_command): New function.
-	(disable_probes_command): Likewise.
-	(_initialize_probe): Define the cli commands `enable probe' and
-	`disable probe'.
-	(parse_probe_linespec): New function.
-	(info_probes_for_ops): Use parse_probe_linespec.
-	* probe.h (probe_ops): New hooks `enable_probe' and
-	`disable_probe'.
+	* python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
+	gdbpy_ref.
 
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* probe.c (compute_probe_arg): Moved from stap-probe.c
-	(compile_probe_arg): Likewise.
-	(probe_funcs): Likewise.
-	* stap-probe.c (compute_probe_arg): Moved to probe.c.
-	(compile_probe_arg): Likewise.
-	(probe_funcs): Likewise.
+	* python/python.c (eval_python_command, gdbpy_decode_line)
+	(gdbpy_run_events, gdbpy_start_type_printers)
+	(gdbpy_apply_type_printers): Use gdbpy_ref.
 
-2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* probe.c (print_ui_out_not_applicables): New function.
-	(exists_probe_with_pops): Likewise.
-	(info_probes_for_ops): Do not include column headers for probe
-	types for which no probe has been actually found on any object.
-	Also invoke `print_ui_out_not_applicables' in order to match the
-	column rows with the header when probes of several types are
-	listed.
-	Print the "Type" column.
-	* probe.h (probe_ops): Added a new probe operation `type_name'.
-	* stap-probe.c (stap_probe_ops): Add `stap_type_name'.
-	(stap_type_name): New function.
+	* python/py-param.c (get_doc_string, compute_enum_values): Use
+	gdbpy_ref.
 
-2015-02-17  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* tui/tui-io.c (tui_getc): Don't call key_is_command_char.
-	(key_is_command_char): Delete.
+	* python/py-inferior.c (find_thread_object, build_inferior_list):
+	Use gdbpy_ref.
 
-2015-02-17  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* tui/tui.c (tui_enable): Resize windows before anything
-	might show a window.
+	* python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
 
-2015-02-17  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR gdb/17984
-	* aarch64-linux-nat.c: Don't include features/aarch64.c anymore.
-	(aarch64_linux_read_description): Remove initialize_tdesc_aarch64
-	call.
-	* aarch64-tdep.h (tdesc_aarch64): Declare.
+	* python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
+	gdbpy_ref.
 
-2015-02-12  Mark Wielaard  <mjw@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* contrib/ari/gdb_ari.sh: Remove checks for "true" and "false".
+	* python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
+	extra incref.
+	(cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
+	Use gdbpy_ref.
 
-2015-02-13  Doug Evans  <dje@google.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* cp-namespace.c (cp_basic_lookup_symbol): Rename parameter
-	anonymous_namespace to is_in_anonymous for consistency with the rest
-	of the file.
-	(cp_lookup_bare_symbol): Fix typo in comment.
-	(cp_search_static_and_baseclasses): Ditto.
-	(search_symbol_list): Use vertical space in comment better.
-	(reset_directive_searched): Ditto. Fix typo.
-	(cp_lookup_nested_symbol_1): Clarify contents of NESTED_NAME parameter.
+	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
+	gdbpy_ref.
 
-2015-02-13  Yao Qi  <yao.qi@arm.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* MAINTAINERS: Update my email address.
+	* python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
+	decref results of PyArg_ParseTupleAndKeywords.
 
-2015-02-12  Doug Evans  <dje@google.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* symtab.c (completion_list_add_name): Fix memory leak.
+	* python/python.c (python_run_simple_file): Use
+	unique_xmalloc_ptr, gdbpy_ref.
 
-2015-02-12  Doug Evans  <dje@google.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* completer.c (complete_line): Remove incorrect comment.
+	* python/py-prettyprint.c (print_stack_unless_memory_error)
+	(print_string_repr, print_children): Use gdbpy_ref.
+	(dummy_python_frame): New class.
+	(dummy_python_frame::dummy_python_frame): Rename from
+	push_dummy_python_frame.
+	(py_restore_tstate): Remove.
 
-2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* python/py-framefilter.c (py_print_single_arg, enumerate_locals)
-	(py_print_frame): Use RETURN_MASK_ERROR.
+	* python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
 
-2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* python/py-framefilter.c (py_print_frame): Mention RETURN_QUIT in
-	function comment.  Wrap all function that can throw in cleanups.
-	(gdbpy_apply_frame_filter): Wrap all function that can throw in
-	cleanups.
+	* python/python.c (ensure_python_env, restore_python_env):
+	Remove.
+	* python/python-internal.h (ensure_python_env): Don't declare.
+	* varobj.h (varobj_ensure_python_env): Don't declare.
+	* varobj.c (varobj_ensure_python_env): Remove.
 
-2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* python/py-framefilter.c (py_print_frame): Substitute goto error.
-	Remove the error label.
+	* varobj.c (varobj_value_get_print_value): Use
+	gdbpy_enter_varobj.
 
-2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* python/py-framefilter.c (py_print_frame): Put conditional code paths
-	with goto first, indent the former else codepath left.  Put variable
-	'elided' to a new inner block.
-
-2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* python/py-framefilter.c (py_print_frame): Whitespacing fixes.
-
-2015-02-11  Pedro Alves  <palves@redhat.com>
-
-	* xcoffread.c (within_function): Delete.
-
-2015-02-11  Tom Tromey  <tromey@redhat.com>
-	    Pedro Alves <palves@redhat.com>
-
-	* breakpoint.c (base_breakpoint_ops): Delete.
-	* dwarf2loc.c (dwarf_expr_ctx_funcs): Make extern.
-	* elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms): Make extern.
-	* guile/guile.c (guile_extension_script_ops, guile_extension_ops): Make extern.
-	* ppcnbsd-tdep.c (ppcnbsd2_sigtramp): Make extern.
-	* python/py-arch.c (arch_object_type): Make extern.
-	* python/py-block.c (block_syms_iterator_object_type): Make extern.
-	* python/py-bpevent.c (breakpoint_event_object_type): Make extern.
-	* python/py-cmd.c (cmdpy_object_type): Make extern.
-	* python/py-continueevent.c (continue_event_object_type)
-	* python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove 'qual'
-	parameter.  Update all callers.
-	* python/py-evtregistry.c (eventregistry_object_type): Make extern.
-	* python/py-exitedevent.c (exited_event_object_type): Make extern.
-	* python/py-finishbreakpoint.c (finish_breakpoint_object_type): Make extern.
-	* python/py-function.c (fnpy_object_type): Make extern.
-	* python/py-inferior.c (inferior_object_type, membuf_object_type): Make extern.
-	* python/py-infevents.c (call_pre_event_object_type)
-	(inferior_call_post_event_object_type).
-	(memory_changed_event_object_type): Make extern.
-	* python/py-infthread.c (thread_object_type): Make extern.
-	* python/py-lazy-string.c (lazy_string_object_type): Make extern.
-	* python/py-linetable.c (linetable_entry_object_type)
-	(linetable_object_type, ltpy_iterator_object_type): Make extern.
-	* python/py-newobjfileevent.c (new_objfile_event_object_type)
-	(clear_objfiles_event_object_type): Make extern.
-	* python/py-objfile.c (objfile_object_type): Make extern.
-	* python/py-param.c (parmpy_object_type): Make extern.
-	* python/py-progspace.c (pspace_object_type): Make extern.
-	* python/py-signalevent.c (signal_event_object_type): Make extern.
-	* python/py-symtab.c (symtab_object_type, sal_object_type): Make extern.
-	* python/py-type.c (type_object_type, field_object_type)
-	(type_iterator_object_type): Make extern.
-	* python/python.c (python_extension_script_ops)
-	(python_extension_ops): Make extern.
-	* stap-probe.c (stap_probe_ops): Make extern.
-
-2015-02-11  Pedro Alves  <pedro@codesourcery.com>
-
-	* infrun.c (adjust_pc_after_break): Don't adjust the PC just
-	because the event thread is not the current thread.
-
-2015-02-11  Doug Evans  <xdje42@gmail.com>
-
-	* gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't
-	been initialized yet, return NULL.
-
-2015-02-11  Doug Evans  <dje@google.com>
-
-	* symfile.h (new_symfile_objfile): Delete.
-	* symfile.c (finish_new_objfile): Renamed from new_symfile_objfile.
-	All callers updated.
-
-2015-02-11  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-io.c (tui_handle_resize_during_io): Call
-	tui_update_gdb_sizes() after resizing the screen.
-	* tui/tui.c (tui_enable): Resize the terminal before
-	calling tui_update_gdb_sizes().
-
-2015-02-11  Patrick Palka  <patrick@parcs.ath.cx>
-
-	* tui/tui-io.c (tui_getc): Move cursor to the end of the command
-	line before printing a newline.
-
-2015-02-11  Mark Wielaard  <mjw@redhat.com>
-
-	* utils.c (producer_is_gcc): Return true or false.
-
-2015-02-10  Mark Wielaard  <mjw@redhat.com>
-
-	* utils.h (producer_is_gcc): Change return type to bool. Add major
-	argument.
-	* utils.c (producer_is_gcc): Likewise.
-	(producer_is_gcc_ge_4): Adjust producer_is_gcc call.
-	* dwarf2read.c (check_producer): Likewise.
-
-2015-02-10  Pedro Alves  <palves@redhat.com>
-
-	* infrun.c (displaced_step_fixup): Switch to the event thread
-	before calling gdbarch_displaced_step_fixup.
-
-2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
-
-	* MAINTAINERS (Write After Approval): Add Antoine Tremblay.
-
-2015-02-10  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* ada-varobj.c (ada_name_of_child): Constify parent.
-	(ada_path_expr_of_child): Same.
-	(ada_value_of_child): Same.
-	(ada_type_of_child): Same.
-	* c-varobj.c (c_is_path_expr_parent): Same.
-	(c_describe_child): Same.
-	(c_name_of_child): Same.
-	(c_value_of_child): Same.
-	(c_type_of_child): Same.
-	(cplus_number_of_children): Same.
-	(cplus_describe_child): Constify var.
-	(cplus_name_of_child): Constify parent.
-	(cplus_value_of_child): Same.
-	(cplus_type_of_child): Same.
-	* jv-varobj.c (java_name_of_child): Same.
-	(java_value_of_child): Same.
-	(java_type_of_child): Same.
-	* varobj.c (value_of_child): Same.
-	(varobj_default_is_path_expr_parent): Constify var, parent and return
-	value.
-	(varobj_get_path_expr): Constify var, modify path_expr through
-	mutable_var.
-	(install_new_value): Constify parent.
-	(value_of_child): Constify parent.
-	* varobj.h (struct varobj): Constify parent.
-	(struct lang_varobj_ops): Constify name_of_child, value_of_child and
-	type_of_child.
-	(varobj_get_path_expr): Constify var.
-	(varobj_get_path_expr_parent): Constify var and return value.
-
-2015-02-10  Luis Machado  <lgustavo@codesourcery.com>
-
-	* arm-tdep.c (arm_prologue_unwind_stop_reason): New function.
-	(arm_prologue_this_id): Move PC and SP limit checks to
-	arm_prologue_unwind_stop_reason.
-	(arm_prologue_unwind) <stop_reason> : Set to
-	arm_prologue_unwind_stop_reason.
-
-2015-02-09  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2read.c (set_cu_language): Recognize DW_LANG_Fortran03 and
-	DW_LANG_Fortran08 as language_fortran.
-
-2015-02-09  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	PR remote/17946
-	* gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison
-	of pointer against char.
-
-2015-02-09  Mark Wielaard  <mjw@redhat.com>
-
-	* c-typeprint.c (cp_type_print_method_args): Handle '_Atomic'.
-	(c_type_print_modifier): Likewise.
-	* dwarf2read.c (read_tag_atomic_type): New function.
-	(read_type_die_1): Handle DW_TAG_atomic_type.
-	* gdbtypes.c (make_atomic_type): New function.
-	(recursive_dump_type): Handle TYPE_ATOMIC.
-	* gdbtypes.h (enum type_flag_values): Renumber.
-	(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_ATOMIC.
-	(TYPE_ATOMIC): New macro.
-	(make_atomic_type): Declare.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (ftrace_find_call): Skip gaps.
-	(ftrace_new_function): Initialize level.
-	(ftrace_new_call, ftrace_new_tailcall, ftrace_new_return)
-	(ftrace_new_switch): Update
-	level computation.
-	(ftrace_new_gap): New.
-	(ftrace_update_function): Create new function after gap.
-	(btrace_compute_ftrace_bts): Create gap on error.
-	(btrace_stitch_bts): Update parameters.  Clear trace if it
-	becomes empty.
-	(btrace_stitch_trace): Update parameters.  Update callers.
-	(btrace_clear): Reset the number of gaps.
-	(btrace_insn_get): Return NULL if the iterator points to a gap.
-	(btrace_insn_number): Return zero if the iterator points to a gap.
-	(btrace_insn_end): Allow gaps at the end.
-	(btrace_insn_next, btrace_insn_prev, btrace_insn_cmp): Handle gaps.
-	(btrace_find_insn_by_number): Assert that the found iterator does
-	not point to a gap.
-	(btrace_call_next, btrace_call_prev): Assert that the last function
-	is not a gap.
-	* btrace.h (btrace_bts_error): New.
-	(btrace_function): Update comment.
-	(btrace_function) <insn, insn_offset, number>: Update comment.
-	(btrace_function) <errcode>: New.
-	(btrace_thread_info) <ngaps>: New.
-	(btrace_thread_info) <replay>: Update comment.
-	(btrace_insn_get): Update comment.
-	* record-btrace.c (btrace_ui_out_decode_error): New.
-	(record_btrace_info): Print number of gaps.
-	(btrace_insn_history, btrace_call_history): Call
-	btrace_ui_out_decode_error for gaps.
-	(record_btrace_step_thread, record_btrace_start_replaying): Skip gaps.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* common/btrace-common.h (btrace_cpu_vendor, btrace_cpu): New.
-	* nat/linux-btrace.c: (btrace_this_cpu): New.
-	(cpu_supports_bts): Call btrace_this_cpu.
-	(intel_supports_bts): Add cpu parameter.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.h (btrace_insn_class): New.
-	(btrace_insn) <size, iclass>: New.
-	* btrace.c (ftrace_find_call): Update parameters.  Update users.
-	Use instruction classification.
-	(ftrace_new_return): Update parameters.  Update users.
-	(ftrace_update_function): Update parameters.  Update users.  Use
-	instruction classification.
-	(ftrace_update_insns): Update parameters.  Update users.
-	(ftrace_classify_insn): New.
-	(btrace_compute_ftrace_bts): Fill in new btrace_insn fields.  Add
-	TRY_CATCH around call to gdb_insn_length.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
-	Update parameters.  Update users.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (parse_xml_btrace_conf_bts): Add size.
-	(btrace_conf_bts_attributes): New.
-	(btrace_conf_children): Add attributes.
-	* common/btrace-common.h (btrace_config_bts): New.
-	(btrace_config)<bts>: New.
-	(btrace_config): Update comment.
-	* nat/linux-btrace.c (linux_enable_btrace, linux_enable_bts):
-	Use config.
-	* features/btrace-conf.dtd: Increment version.  Add size
-	attribute to bts element.
-	* record-btrace.c (set_record_btrace_bts_cmdlist,
-	show_record_btrace_bts_cmdlist): New.
-	(record_btrace_adjust_size, record_btrace_print_bts_conf,
-	record_btrace_print_conf, cmd_set_record_btrace_bts,
-	cmd_show_record_btrace_bts): New.
-	(record_btrace_info): Call record_btrace_print_conf.
-	(_initialize_record_btrace): Add commands.
-	* remote.c: Add PACKET_Qbtrace_conf_bts_size enum.
-	(remote_protocol_features): Add Qbtrace-conf:bts:size packet.
-	(btrace_sync_conf): Synchronize bts size.
-	(_initialize_remote): Add Qbtrace-conf:bts:size packet.
-	* NEWS: Announce new commands and new packets.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* Makefile.in (XMLFILES): Add btrace-conf.dtd.
-	* x86-linux-nat.c (x86_linux_enable_btrace): Update parameters.
-	(x86_linux_btrace_conf): New.
-	(x86_linux_create_target): Initialize to_btrace_conf.
-	* nat/linux-btrace.c (linux_enable_btrace): Update parameters.
-	Check format.  Split into this and ...
-	(linux_enable_bts): ... this.
-	(linux_btrace_conf): New.
-	(perf_event_skip_record): Renamed into ...
-	(perf_event_skip_bts_record): ... this.  Updated users.
-	(linux_disable_btrace): Split into this and ...
-	(linux_disable_bts): ... this.
-	(linux_read_btrace): Check format.
-	* nat/linux-btrace.h (linux_enable_btrace): Update parameters.
-	(linux_btrace_conf): New.
-	(btrace_target_info)<ptid>: Moved.
-	(btrace_target_info)<conf>: New.
-	(btrace_target_info): Split into this and ...
-	(btrace_tinfo_bts): ... this.  Updated users.
-	* btrace.c (btrace_enable): Update parameters.
-	(btrace_conf, parse_xml_btrace_conf_bts, parse_xml_btrace_conf)
-	(btrace_conf_children, btrace_conf_attributes)
-	(btrace_conf_elements): New.
-	* btrace.h (btrace_enable): Update parameters.
-	(btrace_conf, parse_xml_btrace_conf): New.
-	* common/btrace-common.h (btrace_config): New.
-	* feature/btrace-conf.dtd: New.
-	* record-btrace.c (record_btrace_conf): New.
-	(record_btrace_cmdlist): New.
-	(record_btrace_enable_warn, record_btrace_open): Pass
-	&record_btrace_conf.
-	(record_btrace_info): Print recording format.
-	(cmd_record_btrace_bts_start): New.
-	(cmd_record_btrace_start): Call cmd_record_btrace_bts_start.
-	(_initialize_record_btrace): Add "record btrace bts" subcommand.
-	Add "record bts" alias command.
-	* remote.c (remote_state)<btrace_config>: New.
-	(remote_btrace_reset, PACKET_qXfer_btrace_conf): New.
-	(remote_protocol_features): Add qXfer:btrace-conf:read.
-	(remote_open_1): Call remote_btrace_reset.
-	(remote_xfer_partial): Handle TARGET_OBJECT_BTRACE_CONF.
-	(btrace_target_info)<conf>: New.
-	(btrace_sync_conf, btrace_read_config): New.
-	(remote_enable_btrace): Update parameters.  Call btrace_sync_conf and
-	btrace_read_conf.
-	(remote_btrace_conf): New.
-	(init_remote_ops): Initialize to_btrace_conf.
-	(_initialize_remote): Add qXfer:btrace-conf packet.
-	* target.c (target_enable_btrace): Update parameters.
-	(target_btrace_conf): New.
-	* target.h (target_enable_btrace): Update parameters.
-	(target_btrace_conf): New.
-	(target_object)<TARGET_OBJECT_BTRACE_CONF>: New.
-	(target_ops)<to_enable_btrace>: Update parameters and comment.
-	(target_ops)<to_btrace_conf>: New.
-	* target-delegates: Regenerate.
-	* target-debug.h (target_debug_print_const_struct_btrace_config_p)
-	(target_debug_print_const_struct_btrace_target_info_p): New.
-	* NEWS: Announce new command and new packet.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* nat/linux-btrace.h (perf_event_buffer): New.
-	(btrace_target_info) <buffer, size, data_head>: Replace with ...
-	<bts>: ... this.
-	* nat/linux-btrace.c (perf_event_header, perf_event_mmap_size)
-	(perf_event_buffer_size, perf_event_buffer_begin)
-	(perf_event_buffer_end, linux_btrace_has_changed): Removed.
-	Updated users.
-	(perf_event_new_data): New.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* btrace.c (btrace_enable): Pass BTRACE_FORMAT_BTS.
-	* record-btrace.c (record_btrace_open): Remove call to
-	target_supports_btrace.
-	* remote.c (remote_supports_btrace): Update parameters.
-	* target.c (target_supports_btrace): Update parameters.
-	* target.h (to_supports_btrace, target_supports_btrace): Update
-	parameters.
-	* target-delegates.c: Regenerate.
-	* target-debug.h (target_debug_print_enum_btrace_format): New.
-	* nat/linux-btrace.c
-	(kernel_supports_btrace): Rename into ...
-	(kernel_supports_bts): ... this.  Update users.  Update warning text.
-	(intel_supports_btrace): Rename into ...
-	(intel_supports_bts): ... this.  Update users.
-	(cpu_supports_btrace): Rename into ...
-	(cpu_supports_bts): ... this.  Update users.
-	(linux_supports_btrace): Update parameters.  Split into this and ...
-	(linux_supports_bts): ... this.
-	* nat/linux-btrace.h (linux_supports_btrace): Update parameters.
-
-2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
-
-	* Makefile.in (SFILES): Add common/btrace-common.c.
-	(COMMON_OBS): Add common/btrace-common.o.
-	(btrace-common.o): Add build rules.
-	* btrace.c (parse_xml_btrace): Update parameters.
-	(parse_xml_btrace_block): Set format field.
-	(btrace_add_pc, btrace_fetch): Use struct btrace_data.
-	(do_btrace_data_cleanup, make_cleanup_btrace_data): New.
-	(btrace_compute_ftrace): Split into this and...
-	(btrace_compute_ftrace_bts): ...this.
-	(btrace_stitch_trace): Split into this and...
-	(btrace_stitch_bts): ...this.
-	* btrace.h (parse_xml_btrace): Update parameters.
-	(make_cleanup_btrace_data): New.
-	* common/btrace-common.c: New.
-	* common/btrace-common.h: Include common-defs.h.
-	(btrace_block_s): Update comment.
-	(btrace_format): New.
-	(btrace_format_string): New.
-	(btrace_data_bts): New.
-	(btrace_data): New.
-	(btrace_data_init, btrace_data_fini, btrace_data_empty): New.
-	* remote.c (remote_read_btrace): Update parameters.
-	* target.c (target_read_btrace): Update parameters.
-	* target.h (target_read_btrace): Update parameters.
-	(target_ops)<to_read_btrace>: Update parameters.
-	* x86-linux-nat.c (x86_linux_read_btrace): Update parameters.
-	* target-delegates.c: Regenerate.
-	* target-debug (target_debug_print_struct_btrace_data_p): New.
-	* nat/linux-btrace.c (linux_read_btrace): Split into this and...
-	(linux_read_bts): ...this.
-	* nat/linux-btrace.h (linux_read_btrace): Update parameters.
-
-2015-02-06  Doug Evans  <dje@google.com>
+	* python/py-prettyprint.c (print_string_repr, print_children):
+	Update.
+	* python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
+	of "encoding".
+	* varobj.c (varobj_value_get_print_value): Update.
+	* python/python-internal.h (gdbpy_extract_lazy_string): Update.
 
-	* remote-m32r-sdi.c: Include symfile.h.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-06  Doug Evans  <dje@google.com>
+	* varobj.c (varobj_get_display_hint)
+	(dynamic_varobj_has_child_method, install_new_value_visualizer)
+	(varobj_set_visualizer, free_variable): Use
+	gdbpy_enter_varobj.
 
-	* symtab.h (clear_symtab_users, deduce_language_from_filename): Move
-	* symfile.h (clear_symtab_users, deduce_language_from_filename): ...
-	to here.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-06  Pedro Alves  <palves@redhat.com>
+	* python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
+	(do_finish_initialization): New function.  Use gdbpy_ref.
+	(gdbpy_finish_initialization): Use gdbpy_enter.  Call
+	do_finish_initialization.
 
-	* linux-thread-db.c (find_new_threads_callback): Add debug output.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-06  Simon Marchi  <simon.marchi@ericsson.com>
+	* python/py-param.c (get_set_value, get_show_value): Use
+	gdbpy_enter, gdbpy_ref.
 
-	PR gdb/15678
-	* breakpoint.c (map_breakpoint_numbers): Check for empty args string.
-	(enable_count_command): Check args for NULL value.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-05  Doug Evans  <xdje42@gmail.com>
+	* python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
 
-	* guile/scm-frame.c: Fix spelling errors in a comment.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	* python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
 
-	* python/python-internal.h (Py_hash_t): Define it for Python <3.2.
-	* python/py-value.c (valpy_fetch_lazy): Use it.  Remove cast to the
-	return type.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Pedro Alves  <palves@redhat.com>
+	* python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
+	Use gdbpy_enter_varobj.
 
-	* linux-nat.c (handle_extended_wait): Don't resume LWPs here.
-	(wait_lwp): Don't call wait_lwp if linux_handle_extended_wait
-	returns true.
-	(resume_stopped_resumed_lwps): Don't check whether the thread is
-	marked as executing.
-	(linux_nat_wait_1): Use resume_stopped_resumed_lwps.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	* varobj.c (gdbpy_enter_varobj): New constructor.
+	* python/python-internal.h (gdbpy_enter_varobj): New class.
+	* python/py-varobj.c (py_varobj_get_iterator): Use
+	gdbpy_enter_varobj.
 
-	* regset.h (struct regset): Add flags field.
-	(REGSET_VARIABLE_SIZE): New value for a regset's flags field.
-	* corelow.c (get_core_register_section): Add warning if the size
-	exceeds the requested size and the regset does not have the
-	REGSET_VARIABLE_SIZE flag set.
-	* alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
-	flag.
-	* armbsd-tdep.c (armbsd_gregset): Likewise.
-	* hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
-	* hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
-	* m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
-	* mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	* python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
+	gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
+	(gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
+	(gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
+	unique_xmalloc_ptr.
+	(gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
 
-	* amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections):
-	For ".reg-xstate", explicitly specify the requested section size
-	via X86_XSTATE_SIZE instead of just 0 on input and
-	X86_XSTATE_MAX_SIZE on output.
-	* i386-linux-tdep.c (i386_linux_iterate_over_regset_sections):
-	Likewise.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	* python/py-xmethods.c (invoke_match_method): Use
+	gdbpy_ref.
 
-	PR corefiles/17808:
-	* gdbarch.sh (iterate_over_regset_sections_cb): Document this
-	function type, particularly its SIZE parameter.
-	* gdbarch.h: Regenerate.
-	* amd64-tdep.c (amd64_supply_fpregset): In gdb_assert, compare
-	actual against required size using ">=" instead of "==".
-	(amd64_collect_fpregset): Likewise.
-	* i386-tdep.c (i386_supply_gregset): Likewise.
-	(i386_collect_gregset): Likewise.
-	(i386_supply_fpregset): Likewise.
-	(i386_collect_fpregset): Likewise.
-	* mips-linux-tdep.c (mips_supply_gregset_wrapper): Likewise.
-	(mips_fill_gregset_wrapper): Likewise.
-	(mips_supply_fpregset_wrapper): Likewise.
-	(mips_fill_fpregset_wrapper): Likewise.
-	(mips64_supply_gregset_wrapper): Likewise.
-	(mips64_fill_gregset_wrapper): Likewise.
-	(mips64_supply_fpregset_wrapper): Likewise.
-	(mips64_fill_fpregset_wrapper): Likewise.
-	* mn10300-linux-tdep.c (am33_supply_gregset_method): Likewise.
-	(am33_supply_fpregset_method): Likewise.
-	(am33_collect_gregset_method): Likewise.
-	(am33_collect_fpregset_method): Likewise.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-02-04  Doug Evans  <dje@google.com>
-	    Pedro Alves  <palves@redhat.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+	* python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
+	gdbpy_enter, gdbpy_ref.
 
-	PR tui/17810
-	* tui/tui-command.c (tui_refresh_cmd_win): New function.
-	* tui/tui-command.c (tui_refresh_cmd_win): Declare.
-	* tui/tui-file.c: #include tui/tui-command.h.
-	(tui_file_fputs): Refresh command window if stream is not gdb_stdout.
-	(tui_file_flush): Refresh command window if stream is gdb_stdout.
-	* tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush.
-
-2015-02-04  Pedro Alves  <palves@redhat.com>
-
-	Fix build breakage.
-	* event-loop.c (gdb_do_one_event): Add default switch case.
-
-2015-02-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Filter out inferior gcc option -fpreprocessed.
-	* compile/compile.c (filter_args): New function.
-	(get_args): Use it.
-
-2015-02-03  Pedro Alves  <palves@redhat.com>
-
-	* event-loop.c: Don't declare nor define a queue type for
-	gdb_event_p.
-	(event_queue): Delete.
-	(create_event, create_file_event, gdb_event_xfree)
-	(initialize_event_loop, process_event): Delete.
-	(gdb_do_one_event): Return as soon as one event is handled.
-	(handle_file_event): Change prototype.  Used the passed in
-	file_handler pointer and ready_mask instead of looping over all
-	file handlers.
-	(gdb_wait_for_event): Update the poll/select timeouts before
-	blocking.  Run event handlers directly instead of queueing events.
-	Return as soon as one event is handled.
-	(struct async_event_handler_data): Delete.
-	(invoke_async_event_handler): Delete.
-	(check_async_event_handlers): Change return type to int.  Run
-	event handlers directly instead of queueing events.  Return as
-	soon as one event is handled.
-	(handle_timer_event): Delete.
-	(update_wait_timeout): New function, factored out from
-	poll_timers.
-	(poll_timers): Reimplement.
-	* event-loop.h (initialize_event_loop): Delete declaration.
-	* top.c (gdb_init): Don't call initialize_event_loop.
-
-2015-02-03  Pedro Alves  <palves@redhat.com>
-
-	* event-loop.c (clear_async_event_handler): New function.
-	* event-loop.h (clear_async_event_handler): New declaration.
-	* record-btrace.c (record_btrace_async): New function.
-	(init_record_btrace_ops): Install record_btrace_async.
-	* record-full.c (record_full_async): New function.
-	(record_full_resume): Don't mark the async event source here.
-	(init_record_full_ops): Install record_full_async.
-	(record_full_core_resume): Don't mark the async event source here.
-	(init_record_full_core_ops): Install record_full_async.
-	* remote.c (remote_async): Mark and clear the async stop reply
-	queue event-loop token as appropriate.
-
-2015-02-03  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use
-	target_is_async_p instead of target_can_async.
-	(linux_nat_wait): Use target_is_async_p instead of
-	target_can_async.  Don't enable async here.
-	* remote.c (interrupt_query, remote_wait, putpkt_binary): Use
-	target_is_async_p instead of target_can_async.
-
-2015-02-02  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* varobj.h (lang_varobj_ops): Mention which return values need
-	to be freed.
-
-2015-02-02  Joel Brobecker  <brobecker@adacore.com>
-
-	* dwarf2loc.c (dwarf2_evaluate_property): Add i18n marker.
-
-2015-02-02  Joel Brobecker  <brobecker@adacore.com>
-
-	PR gdb/17856:
-	* ada-lang.c (ada_lookup_symbol_list_worker): Do not re-cache
-	results found in the cache.
-
-2015-02-02  Joel Brobecker  <brobecker@adacore.com>
-
-	PR gdb/17854:
-	* ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache
-	when allocating a new one.
-
-2015-02-01  Tom Tromey  <tom@tromey.com>
-
-	* MAINTAINERS: Remove myself.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* dwarf2read.c (process_structure_scope): Update setting of
-	TYPE_VPTR_BASETYPE, TYPE_VPTR_FIELDNO.
-	* gdbtypes.c (internal_type_vptr_fieldno): New function.
-	(set_type_vptr_fieldno): New function.
-	(internal_type_vptr_basetype): New function.
-	(set_type_vptr_basetype): New function.
-	(get_vptr_fieldno): Update setting of TYPE_VPTR_FIELDNO,
-	TYPE_VPTR_BASETYPE.
-	(allocate_cplus_struct_type): Initialize vptr_fieldno.
-	(recursive_dump_type): Printing of vptr_fieldno, vptr_basetype ...
-	(print_cplus_stuff): ... moved here.
-	(copy_type_recursive): Don't copy TYPE_VPTR_BASETYPE.
-	* gdbtypes.h (struct main_type): Members vptr_fieldno, vptr_basetype
-	moved to ...
-	(struct cplus_struct_type): ... here.  All uses updated.
-	(TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE): Rewrite.
-	(internal_type_vptr_fieldno, set_type_vptr_fieldno): Declare.
-	(internal_type_vptr_basetype, set_type_vptr_basetype): Declare.
-	* stabsread.c (read_tilde_fields): Update setting of
-	TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* cp-valprint.c (cp_find_class_member): Rename parameter domain_p
-	to self_p.
-	(cp_print_class_member): Rename local domain to self_type.
-	* dwarf2read.c (quirk_gcc_member_function_pointer): Rename local
-	domain_type to self_type.
-	(set_die_type) <need_gnat_info>: Handle
-	TYPE_CODE_METHODPTR, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD.
-	* gdb-gdb.py (StructMainTypePrettyPrinter): Handle
-	TYPE_SPECIFIC_SELF_TYPE.
-	* gdbtypes.c (internal_type_self_type): New function.
-	(set_type_self_type): New function.
-	(smash_to_memberptr_type): Rename parameter domain to self_type.
-	Update setting of TYPE_SELF_TYPE.
-	(smash_to_methodptr_type): Update setting of TYPE_SELF_TYPE.
-	(smash_to_method_type): Rename parameter domain to self_type.
-	Update setting of TYPE_SELF_TYPE.
-	(check_stub_method): Call smash_to_method_type.
-	(recursive_dump_type): Handle TYPE_SPECIFIC_SELF_TYPE.
-	(copy_type_recursive): Ditto.
-	* gdbtypes.h (enum type_specific_kind): New value
-	TYPE_SPECIFIC_SELF_TYPE.
-	(struct main_type) <type_specific>: New member self_type.
-	(struct cplus_struct_type) <fn_field.type>: Update comment.
-	(TYPE_SELF_TYPE): Rewrite.
-	(internal_type_self_type, set_type_self_type): Declare.
-	* gnu-v3-abi.c (gnuv3_print_method_ptr): Rename local domain to
-	self_type.
-	(gnuv3_method_ptr_to_value): Rename local domain_type to self_type.
-	* m2-typeprint.c (m2_range): Replace TYPE_SELF_TYPE with
-	TYPE_TARGET_TYPE.
-	* stabsread.c (read_member_functions): Mark methods with
-	TYPE_CODE_METHOD, not TYPE_CODE_FUNC.  Update setting of
-	TYPE_SELF_TYPE.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
-	All uses updated.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs
-	or unions.  Return zero if union.
-	(gnuv3_get_vtable): Call check_typedef.  Assert only passed structs.
-	(gnuv3_rtti_type): Pass already-check_typedef'd value to
-	gnuv3_get_vtable.
-	(compute_vtable_size): Assert only passed structs.
-	(gnuv3_print_vtable): Don't call gnuv3_get_vtable for non-structs.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD
-	kinds.
-
-2015-01-31  Gary Benson <gbenson@redhat.com>
-	    Doug Evans  <dje@google.com>
-
-	PR cli/9007
-	PR cli/11920
-	PR cli/15548
-	* cli/cli-cmds.c (complete_command): Notify user if max-completions
-	reached.
-	* common/common-exceptions.h (enum errors)
-	<MAX_COMPLETIONS_REACHED_ERROR>: New value.
-	* completer.h (get_max_completions_reached_message): New declaration.
-	(max_completions): Likewise.
-	(completion_tracker_t): New typedef.
-	(new_completion_tracker): New declaration.
-	(make_cleanup_free_completion_tracker): Likewise.
-	(maybe_add_completion_enum): New enum.
-	(maybe_add_completion): New declaration.
-	(throw_max_completions_reached_error): Likewise.
-	* completer.c (max_completions): New global variable.
-	(new_completion_tracker): New function.
-	(free_completion_tracker): Likewise.
-	(make_cleanup_free_completion_tracker): Likewise.
-	(maybe_add_completions): Likewise.
-	(throw_max_completions_reached_error): Likewise.
-	(complete_line): Remove duplicates and limit result to max_completions
-	entries.
-	(get_max_completions_reached_message): New function.
-	(gdb_display_match_list): Handle max_completions.
-	(_initialize_completer): New declaration and function.
-	* symtab.c: Include completer.h.
-	(completion_tracker): New static variable.
-	(completion_list_add_name): Call maybe_add_completion.
-	(default_make_symbol_completion_list_break_on_1): Renamed from
-	default_make_symbol_completion_list_break_on.  Maintain
-	completion_tracker across calls to completion_list_add_name.
-	(default_make_symbol_completion_list_break_on): New function.
-	* top.c (init_main): Set rl_completion_display_matches_hook.
-	* tui/tui-io.c: Include completer.h.
-	(tui_old_rl_display_matches_hook): New static global.
-	(tui_rl_display_match_list): Notify user if max-completions reached.
-	(tui_setup_io): Save/restore rl_completion_display_matches_hook.
-	* NEWS (New Options): Mention set/show max-completions.
-
-2015-01-31  Gary Benson  <gbenson@redhat.com>
-
-	* symtab.c (struct add_name_data) <code>: New field.
-	Updated comments.
-	(add_symtab_completions): New function.
-	(symtab_expansion_callback): Likewise.
-	(default_make_symbol_completion_list_break_on): Set datum.code.
-	Move minimal symbol scan before calling expand_symtabs_matching.
-	Scan known primary symtabs for externs and statics before calling
-	expand_symtabs_matching.  Pass symtab_expansion_callback as
-	expansion_notify argument to expand_symtabs_matching.  Do not scan
-	primary symtabs for externs and statics after calling
-	expand_symtabs_matching.
-
-2015-01-31  Gary Benson  <gbenson@redhat.com>
-
-	* symfile.h (expand_symtabs_exp_notify_ftype): New typedef.
-	(struct quick_symbol_functions) <expand_symtabs_matching>:
-	New argument expansion_notify.  All uses updated.
-	(expand_symtabs_matching): New argument expansion_notify.
-	All uses updated.
-	* symfile-debug.c (debug_qf_expand_symtabs_matching):
-	Also print expansion notify.
-	* symtab.c (expand_symtabs_matching_via_partial): Call
-	expansion_notify whenever a partial symbol table is expanded.
-	* dwarf2read.c (dw2_expand_symtabs_matching): Call
-	expansion_notify whenever a symbol table is instantiated.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* cli-out.c: #include completer.h, readline/readline.h.
-	(cli_mld_crlf, cli_mld_putch, cli_mld_puts): New functions.
-	(cli_mld_flush, cld_mld_erase_entire_line): Ditto.
-	(cli_mld_beep, cli_mld_read_key, cli_display_match_list): Ditto.
-	* cli-out.h (cli_display_match_list): Declare.
-	* completer.c (MB_INVALIDCH, MB_NULLWCH): New macros.
-	(ELLIPSIS_LEN): Ditto.
-	(gdb_get_y_or_n, gdb_display_match_list_pager): New functions.
-	(gdb_path_isdir, gdb_printable_part, gdb_fnwidth): Ditto.
-	(gdb_fnprint, gdb_print_filename): Ditto.
-	(gdb_complete_get_screenwidth, gdb_display_match_list_1): Ditto.
-	(gdb_display_match_list): Ditto.
-	* completer.h (mld_crlf_ftype, mld_putch_ftype): New typedefs.
-	(mld_puts_ftype, mld_flush_ftype, mld_erase_entire_line_ftype): Ditto.
-	(mld_beep_ftype, mld_read_key_ftype): Ditto.
-	(match_list_displayer): New struct.
-	(gdb_display_match_list): Declare.
-	* top.c (init_main): Set rl_completion_display_matches_hook.
-	* tui/tui-io.c: #include completer.h.
-	(printable_part, PUTX, print_filename, get_y_or_n): Delete.
-	(tui_mld_crlf, tui_mld_putch, tui_mld_puts): New functions.
-	(tui_mld_flush, tui_mld_erase_entire_line, tui_mld_beep): Ditto.
-	(tui_mld_getc, tui_mld_read_key): Ditto.
-	(tui_rl_display_match_list): Rewrite.
-	(tui_handle_resize_during_io): New arg for_completion.  All callers
-	updated.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	Add symbol lookup cache.
-	* NEWS: Document new options and commands.
-	* symtab.c (symbol_cache_key): New static global.
-	(DEFAULT_SYMBOL_CACHE_SIZE, MAX_SYMBOL_CACHE_SIZE): New macros.
-	(SYMBOL_LOOKUP_FAILED): New macro.
-	(symbol_cache_slot_state): New enum.
-	(block_symbol_cache): New struct.
-	(symbol_cache): New struct.
-	(new_symbol_cache_size, symbol_cache_size): New static globals.
-	(hash_symbol_entry, eq_symbol_entry): New functions.
-	(symbol_cache_byte_size, resize_symbol_cache): New functions.
-	(make_symbol_cache, free_symbol_cache): New functions.
-	(get_symbol_cache, symbol_cache_cleanup): New function.
-	(set_symbol_cache_size, set_symbol_cache_size_handler): New functions.
-	(symbol_cache_lookup, symbol_cache_clear_slot): New function.
-	(symbol_cache_mark_found, symbol_cache_mark_not_found): New functions.
-	(symbol_cache_flush, symbol_cache_dump): New functions.
-	(maintenance_print_symbol_cache): New function.
-	(maintenance_flush_symbol_cache): New function.
-	(symbol_cache_stats): New function.
-	(maintenance_print_symbol_cache_statistics): New function.
-	(symtab_new_objfile_observer): New function.
-	(symtab_free_objfile_observer): New function.
-	(lookup_static_symbol, lookup_global_symbol): Use symbol cache.
-	(_initialize_symtab): Init symbol_cache_key.  New parameter
-	maint symbol-cache-size.  New maint commands print symbol-cache,
-	print symbol-cache-statistics, flush-symbol-cache.
-	Install new_objfile, free_objfile observers.
-
-2015-01-31  Joel Brobecker  <brobecker@adacore.com>
-
-	PR symtab/17855
-	* symfile.c (clear_symtab_users): Move call to breakpoint_re_set
-	to end.
-
-2015-01-31  Doug Evans  <xdje42@gmail.com>
-
-	* NEWS: Mention inlined scripts in .debug_gdb_scripts section.
-	* auto-load.c: #include ctype.h.
-	(struct auto_load_pspace_info): Replace member loaded_scripts with
-	new members loaded_script_files, loaded_script_texts.
-	(auto_load_pspace_data_cleanup): Update.
-	(init_loaded_scripts_info): Update.
-	(get_auto_load_pspace_data_for_loading): Update.
-	(maybe_add_script_file): Renamed from maybe_add_script.  All callers
-	updated.
-	(maybe_add_script_text): New function.
-	(clear_section_scripts): Update.
-	(source_script_file, execute_script_contents): New functions.
-	(source_section_scripts): Add support for
-	SECTION_SCRIPT_ID_PYTHON_TEXT, SECTION_SCRIPT_ID_GUILE_TEXT.
-	(print_scripts): New function.
-	(auto_load_info_scripts): Also print inlined scripts.
-	(maybe_print_unsupported_script_warning): Renamed from
-	unsupported_script_warning_print.  All callers updated.
-	(maybe_print_script_not_found_warning): Renamed from
-	script_not_found_warning_print.  All callers updated.
-	* extension-priv.h (struct extension_language_script_ops): New member
-	objfile_script_executor.
-	* extension.c (ext_lang_objfile_script_executor): New function.
-	* extension.h (objfile_script_executor_func): New typedef.
-	(ext_lang_objfile_script_executor): Declare.
-	* guile/guile-internal.h (gdbscm_execute_objfile_script): Declare.
-	* guile/guile.c (guile_extension_script_ops): Update.
-	* guile/scm-objfile.c (gdbscm_execute_objfile_script): New function.
-	* python/python.c (python_extension_script_ops): Update.
-	(gdbpy_execute_objfile_script): New function.
-
-2015-01-31  Eli Zaretskii  <eliz@gnu.org>
-
-	* tui/tui-io.c (tui_expand_tabs): New function.
-	(tui_puts, tui_redisplay_readline): Expand TABs into the
-	appropriate number of spaces.
-	* tui/tui-regs.c: Include tui-io.h.
-	(tui_register_format): Call tui_expand_tabs to expand TABs into
-	the appropriate number of spaces.
-	* tui/tui-io.h: Add prototype for tui_expand_tabs.
-
-2015-01-30  Doug Evans  <dje@google.com>
-
-	* NEWS: "info source" command now display producer string if present.
-	* source.c (source_info): Print producer string if present.
-
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* varobj.c (varobj_delete): Fix comment.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+	* python/python.c (python_interactive_command): Use gdbpy_enter.
 
-	* varobj.c (create_child): Modify comment.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+	* python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
+	gdbpy_ref.
 
-	* ada-varobj.c (ada_number_of_children): Constify struct varobj *
-	parameter.
-	(ada_name_of_variable): Same.
-	(ada_path_expr_of_child): Same.
-	(ada_value_of_variable): Same.
-	(ada_value_is_changeable_p): Same.
-	(ada_value_has_mutated): Same.
-	* c-varobj.c (varobj_is_anonymous_child): Same.
-	(c_is_path_expr_parent): Same.
-	(c_number_of_children): Same.
-	(c_name_of_variable): Same.
-	(c_path_expr_of_child): Same.
-	(get_type): Same.
-	(c_value_of_variable): Same.
-	(cplus_number_of_children): Same.
-	(cplus_name_of_variable): Same.
-	(cplus_path_expr_of_child): Same.
-	(cplus_value_of_variable): Same.
-	* jv-varobj.c (java_number_of_children): Same.
-	(java_name_of_variable): Same.
-	(java_path_expr_of_child): Same.
-	(java_value_of_variable): Same.
-	* varobj.c (number_of_children): Same.
-	(name_of_variable): Same.
-	(is_root_p): Same.
-	(varobj_ensure_python_env): Same.
-	(varobj_get_objname): Same.
-	(varobj_get_expression): Same.
-	(varobj_get_display_format): Same.
-	(varobj_get_display_hint): Same.
-	(varobj_has_more): Same.
-	(varobj_get_thread_id): Same.
-	(varobj_get_frozen): Same.
-	(dynamic_varobj_has_child_method): Same.
-	(varobj_get_gdb_type): Same.
-	(is_path_expr_parent): Same.
-	(varobj_default_is_path_expr_parent): Same.
-	(varobj_get_language): Same.
-	(varobj_get_attributes): Same.
-	(varobj_is_dynamic_p): Same.
-	(varobj_get_child_range): Same.
-	(varobj_value_has_mutated): Same.
-	(varobj_get_value_type): Same.
-	(number_of_children): Same.
-	(name_of_variable): Same.
-	(check_scope): Same.
-	(varobj_editable_p): Same.
-	(varobj_value_is_changeable_p): Same.
-	(varobj_floating_p): Same.
-	(varobj_default_value_is_changeable_p): Same.
-
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* varobj.c (varobj_get_path_expr): Set var->path_expr.
-	* c-varobj.c (c_path_expr_of_child): Set local var instead of
-	child->path_expr.
-	(cplus_path_expr_of_child): Same.
-
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* mi-cmd-var.c (print_varobj): Free varobj_get_expression
-	result.
-	(mi_cmd_var_info_expression): Same.
-	* varobj.c (varobj_get_expression): Mention in the comment that
-	the result must by freed by the caller.
-
-2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
-
-	* mi/mi-cmd-var.c (mi_cmd_var_info_type): Free result of
-	varobj_get_type.
-	(varobj_update_one): Same.
-	* varobj.c (update_type_if_necessary): Free curr_type_str and
-	new_type_str.
-	(varobj_get_type): Specify in comment that the result needs to be
-	freed by the caller.
-
-2015-01-29  Doug Evans  <dje@google.com>
-
-	PR symtab/17890
-	* dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
-
-2015-01-25  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2read.c (checkproducer): Call producer_is_gcc.
-	* utils.c (producer_is_gcc_ge_4): Likewise.
-	(producer_is_gcc): New function.
-	* utils.h (producer_is_gcc): New declaration.
-
-2015-01-29  Joel Brobecker  <brobecker@adacore.com>
-
-	* gdbtypes.h (struct dynamic_prop): New PROP_ADDR_OFFSET enum
-	kind.
-	* gdbtypes.c (resolve_dynamic_type_internal): Replace "addr"
-	parameter by "addr_stack" parameter.
-	(resolve_dynamic_range): Replace "addr" parameter by
-	"stack_addr" parameter.  Update function documentation.
-	Update code accordingly.
-	(resolve_dynamic_array, resolve_dynamic_union)
-	(resolve_dynamic_struct, resolve_dynamic_type_internal): Likewise.
-	(resolve_dynamic_type): Update code, following the changes made
-	to resolve_dynamic_type_internal's interface.
-	* dwarf2loc.h (struct property_addr_info): New.
-	(dwarf2_evaluate_property): Replace "address" parameter
-	by "addr_stack" parameter.  Adjust function documentation.
-	(struct dwarf2_offset_baton): New.
-	(struct dwarf2_property_baton): Update documentation of
-	field "referenced_type" to be more general. New field
-	"offset_info" in union data field.
-	* dwarf2loc.c (dwarf2_evaluate_property): Replace "address"
-	parameter by "addr_stack" parameter.  Adjust code accordingly.
-	Add support for PROP_ADDR_OFFSET properties.
-	* dwarf2read.c (attr_to_dynamic_prop): Add support for
-	DW_AT_data_member_location attributes as well.  Use case
-	statements instead of if/else condition.
-
-2015-01-29  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-varobj.c (ada_varobj_get_array_number_of_children):
-	Return zero if PARENT_VALUE is NULL and parent_type's
-	range type is dynamic.
-
-2015-01-29  Joel Brobecker  <brobecker@adacore.com>
-
-	* gdbtypes.c (is_dynamic_type_internal) <TYPE_CODE_RANGE>: Return
-	nonzero if the type's subtype is dynamic.
-	(resolve_dynamic_range): Also resolve the range's subtype.
-
-2015-01-29  Alexander Klimov  <alserkli@inbox.ru>  (tiny patch)
-
-	Pushed by Joel Brobecker  <brobecker@adacore.com>.
-	* symfile.c (unmap_overlay_command): Initialize sec to NULL.
-
-2015-01-27  Doug Evans  <dje@google.com>
-
-	* NEWS: Mention gdb.Objfile.username.
-	* python/py-objfile.c (objfpy_get_username): New function.
-	(objfile_getset): Add "username".
-
-2015-01-24  Mark Wielaard  <mjw@redhat.com>
-
-	* stack.c (return_command): Markup warning message with _.
-
-2015-01-24  Doug Evans  <xdje42@gmail.com>
-
-	* gdbtypes.h (TYPE_TYPE_SPECIFIC): Delete.
-
-2015-01-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix 100x slowdown regression on DWZ files.
-	* dwarf2read.c (struct dwarf2_per_objfile): Add line_header_hash.
-	(struct line_header): Add offset and offset_in_dwz.
-	(dwarf_decode_lines): Add parameter decode_mapping to the declaration.
-	(free_line_header_voidp): New declaration.
-	(line_header_hash, line_header_hash_voidp, line_header_eq_voidp): New
-	functions.
-	(dwarf2_build_include_psymtabs): Update dwarf_decode_lines caller.
-	(handle_DW_AT_stmt_list): Use line_header_hash.
-	(free_line_header_voidp): New function.
-	(dwarf_decode_line_header): Initialize offset and offset_in_dwz.
-	(dwarf_decode_lines): New parameter decode_mapping, use it.
-	(dwarf2_free_objfile): Free line_header_hash.
-
-2015-01-23  Simon Marchi  <simon.marchi@ericsson.com>
-
-	PR gdb/17416
-	* valops.c (value_rtti_indirect_type): Catch exception thrown by
-	value_ind.
-
-2015-01-15  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2read.c (read_subroutine_type): Set TYPE_NO_RETURN from
-	DW_AT_noreturn.
-	* gdbtypes.h (struct func_type): Add is_noreturn field flag. Make
-	calling_convention an 8 bit bit field.
-	(TYPE_NO_RETURN): New macro.
-	* infcmd.c (finish_command): Query if function does not return
-	normally.
-	* stack.c (return_command): Likewise.
-
-2015-01-23  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_is_async_p): New macro.
-	(linux_nat_is_async_p):
-	(linux_nat_terminal_inferior): Check whether the target can async
-	instead of whether it is already async.
-	(linux_nat_terminal_ours): Don't check whether the target is
-	async.
-	(linux_async_pipe): Use linux_is_async_p.
-
-2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* NEWS (Changes since GDB 7.9): Add 'thread apply all' option
-	'-ascending'.
-	* thread.c (tp_array_compar_ascending, tp_array_compar): New.
-	(thread_apply_all_command): Parse CMD for tp_array_compar_ascending.
-	Sort tp_array using tp_array_compar.
-	(_initialize_thread): Extend thread_apply_all_command help.
-
-2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* corelow.c (core_open): Call also thread_command.
-	* gdbthread.h (thread_command): New prototype moved from ...
-	* thread.c (thread_command): ... here.
-	(thread_command): Make it global.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-22  Pedro Alves  <palves@redhat.com>
+	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
+	gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
 
-	* configure.ac [*mingw32*]: Check $curses_found instead of
-	$prefer_curses.
-	* configure: Regenerate.
-	* windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
-	HAVE_NCURSES_NCURSES_H checks.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-22  Eli Zaretskii  <eliz@gnu.org>
+	* utils.h (htab_deleter): New struct.
+	(htab_up): New typedef.
+	* python/py-framefilter.c (gdbpy_apply_frame_filter): Use
+	gdbpy_enter, gdbpy_ref, htab_up.
 
-	* tui/tui.c (tui_enable) [__MINGW32__]: If the call to 'newterm'
-	fails with the 1st arg NULL, try again with "unknown".  Don't test
-	the "cup" capability: it isn't supported by the Windows port of
-	ncurses, but the Windows console driver is still capable of
-	supporting TUI.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	* python/py-unwind.c (pending_frame_invalidate): Remove.
+	(pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
 
-	* compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-22  Eli Zaretskii  <eliz@gnu.org>
+	* python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
+	(gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
 
-	* Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
-	(ALLDEPFILES): Remove irix5-nat.c.  These two are part of the
-	reason that "make TAGS" is broken.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-22  Chen Gang  <gang.chen.5i5j@gmail.com>
+	* python/py-type.c (save_objfile_types): Use gdbpy_enter.
 
-	* hppa-tdep.c (inst_saves_gr): Fix logical working flow issues
-	and check additional store instructions.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
+	* python/python.c (gdbpy_eval_from_control_command)
+	(gdbpy_source_script, gdbpy_run_events)
+	(gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
+	(gdbpy_free_type_printers, gdbpy_finish_initialization): Use
+	gdbpy_enter.
 
-	* MAINTAINERS (Write After Approval): Add "Wei-cheng Wang".
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
+	* python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
 
-	* ppc-linux-tdep.c (ppc_skip_trampoline_code,
-	ppc_canonicalize_syscall, ppc_linux_syscall_record,
-	ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
-	* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
-	* rs6000-tdep.c (rs6000_epilogue_frame_cache,
-	rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
-	rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
-	ppc_process_record_op19, ppc_process_record_op31,
-	ppc_process_record_op59, ppc_process_record_op60,
-	ppc_process_record_op63): Likewise.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-20  Joel Brobecker  <brobecker@adacore.com>
+	* python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
 
-	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string)
-	(linux_ptrace_test_ret_to_nx): Use safe_strerror instead of
-	strerror.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-20  Wei-cheng Wang  <cole945@gmail.com>
+	* python/py-inferior.c (python_on_normal_stop, python_on_resume)
+	(python_on_inferior_call_pre, python_on_inferior_call_post)
+	(python_on_memory_change, python_on_register_change)
+	(python_inferior_exit, python_new_objfile, add_thread_object)
+	(delete_thread_object, py_free_inferior): Use gdbpy_enter.
 
-	* rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
-	ppc_process_record_op31, ppc_process_record_op59,
-	ppc_process_record_op60, ppc_process_record_op63,
-	ppc_process_record): Fix -Wformat warning.
-	* rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
-	Remove unused variables.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-20  Chen Gang  <gang.chen.5i5j@gmail.com>
+	* python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
+	(bpfinishpy_handle_exit): Use gdbpy_enter.
 
-	* MAINTAINERS (Write After Approval): Add "Chen Gang".
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-2015-01-19  Eli Zaretskii  <eliz@gnu.org>
+	* python/py-cmd.c (cmdpy_destroyer)
+	(cmdpy_completer_handle_brkchars, cmdpy_completer): Use
+	gdbpy_enter.
 
-	* configure.ac [*mingw32*]: Only add windows-termcap.o to
-	CONFIG_OBS if not building with a curses library.
-	* configure: Regenerate.
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* windows-termcap.c: Include defs.h.  Make the whole body empty if
-	either one of HAVE_CURSES_H or HAVE_NCURSES_H or
-	HAVE_NCURSES_NCURSES_H is defined.
-
-2015-01-19  Joel Brobecker  <brobecker@adacore.com>
-
-	* rs6000-tdep.c (rs6000_gdbarch_init): Move divide operator
-	from end of line to start of next line.
-
-2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
-
-	* ppc-linux-tdep.c (ppc_skip_trampoline_code):
-	Scan PLT stub backward for reverse debugging.
-	* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
-
-2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
-	    Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* configure.tgt (powerpc*-*-linux): Add linux-record.o to
-	gdb_target_obs.
-	(ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall
-	record.
-	(ppc_canonicalize_syscall, ppc_linux_syscall_record,
-	ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions.
-	(ppc_linux_init_abi): Set process_record, process_record_signal.
-	* ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and
-	ppc_linux_record_tdep to gdbarch_tdep.
-	(ppc_process_record): New declaration.
-	* rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4,
-	ppc_process_record_op19, ppc_process_record_op31,
-	ppc_process_record_op59, ppc_process_record_op60,
-	ppc_process_record_op63, ppc_process_record): New functions.
-
-2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
-
-	* rs6000-tdep.c (rs6000_in_function_epilogue_p): Rename to
-	rs6000_in_function_epilogue_frame_p and add an argument
-	for frame_info.
-	(rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id,
-	rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer):
-	New functions.
-	(rs6000_epilogue_frame_unwind): New.
-	(rs6000_gdbarch_init): Append epilogue unwinder.
+	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
+	gdbpy_enter.
+	(gdbpy_breakpoint_has_cond): Likewise.
 
-2015-01-16  Sergio Durigan Junior  <sergiodj@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* nat/linux-personality.c: Replace "#ifndef
-	HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
-	!HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
-	systems.
-
-2015-01-16  Eli Zaretskii  <eliz@gnu.org>
-
-	* tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
-	functions.
-	(_initialize_tui_win) <border-kind, border-mode>:
-	<active-border-mode>: Use tui_set_var_cmd as the "set" function.
-	(tui_set_tab_width_command): Fix the commentary.
-
-	* tui/tui-win.h: Add prototype for tui_rehighlight_all.
-
-	* tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
-	Doc fix.
-	(tui_set_tab_width_command): Delete and recreate the source and
-	the disassembly windows, to show the effect of the changed tab
-	size immediately.
-
-	* tui/tui-data.h (LINE_PREFIX): Make shorter
-	(MAX_PID_WIDTH): Enlarge from 14 to 19, to leave enough space for
-	"Thread NNNNN.XXXX" thread ID notation on Windows.
-
-2015-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix gcc-5 compilation.
-	* hppa-tdep.c (inst_saves_gr): Fix parentheses typo.
-
-2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
-	(linux-personality.o): New rule.
-	* common/common-defs.h: Include <stdint.h>.
-	* config/aarch64/linux.mh (NATDEPFILES): Include
-	linux-personality.o.
-	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
-	* config/arm/linux.mh (NATDEPFILES): Likewise.
-	* config/i386/linux64.mh (NATDEPFILES): Likewise.
-	* config/i386/linux.mh (NATDEPFILES): Likewise.
-	* config/ia64/linux.mh (NATDEPFILES): Likewise.
-	* config/m32r/linux.mh (NATDEPFILES): Likewise.
-	* config/m68k/linux.mh (NATDEPFILES): Likewise.
-	* config/mips/linux.mh (NATDEPFILES): Likewise.
-	* config/pa/linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
-	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
-	* config/s390/linux.mh (NATDEPFILES): Likewise.
-	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
-	* config/sparc/linux.mh (NATDEPFILES): Likewise.
-	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
-	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
-	* defs.h: Remove #include <stdint.h> (moved to
-	common/common-defs.h).
-	* linux-nat.c: Include nat/linux-personality.h.  Remove #include
-	<sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
-	nat/linux-personality.c).
-	(linux_nat_create_inferior): Remove code to disable address space
-	randomization (moved to nat/linux-personality.c).  Create cleanup
-	to disable address space randomization.
-	* nat/linux-personality.c: New file.
-	* nat/linux-personality.h: Likewise.
-
-2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and
-	common/posix-strerror.c.
-	(posix-strerror.o): New rule.
-	(mingw-strerror.o): Likewise.
-	* common/common-utils.h (safe_strerror): Move prototype to here,
-	from utils.h.
-	* common/common.host: New file.
-	* common/mingw-strerror.c: Likewise.
-	* common/posix-strerror.c: Likewise.
-	* configure: Regenerated.
-	* configure.ac: Source common/common.host.  Add variable
-	common_host_obs to gdb_host_obs.
-	* contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and
-	gdb/common/posix-strerror.c when warning about the use of
-	strerror.
-	* mingw-hdep.c (safe_strerror): Remove definition; move it to
-	common/mingw-strerror.c.
-	* posix-hdep.c (safe_strerror): Remove definition; move it to
-	common/posix-hdep.c.
-	* utils.h (safe_strerror): Remove prototype; move to
-	common/common-utils.h.
-
-2015-01-15  Joel Brobecker  <brobecker@adacore.com>
-
-	GDB 7.8.2 released.
-
-2015-01-15  Joel Brobecker  <brobecker@adacore.com>
-
-	* ada-lang.c (ada_array_bound_from_type): Ignore array's parallel
-	___XA type if the array has already been fixed.
-
-2015-01-14  Yao Qi  <yao@codesourcery.com>
-
-	* Makefile.in (ppc-linux.o): New rule.
-	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
-	* configure.ac: AC_CHECK_FUNCS(getauxval).
-	* config.in: Re-generated.
-	* configure: Re-generated.
-	* nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
-	Declare.
-	* nat/ppc-linux.c: New file.
-	* ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
-	Call ppc64_64bit_inferior_p.
+	* python/python.c (gdbpy_enter): New constructor.
+	(~gdbpy_enter): New destructor.
+	(restore_python_env, ensure_python_env): Rewrite.
+	* python/python-internal.h (gdbpy_enter): New class.
 
-2015-01-14  Yao Qi  <yao@codesourcery.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
-	nat/ppc-linux.h.
-	(PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
-	(PPC_FEATURE_HAS_DFP): Likewise.
-	(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
-	(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
-	(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
-	Include "nat/ppc-linux.h".
-	* nat/ppc-linux.h: New file.
-	* Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
+	* python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
 
-2015-01-14  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR gdb/17525
-	* breakpoint.c: Include "interps.h".
-	(bpstat_do_actions_1): Also check whether the interpreter is
-	async.
+	* python/py-value.c (value_has_field, get_field_flag)
+	(get_field_type, valpy_getitem, convert_value_from_python): Use
+	gdbpy_ref.
 
-2015-01-14  Pedro Alves  <palves@redhat.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR cli/17828
-	* infrun.c (reinstall_readline_callback_handler_cleanup): Don't
-	reinstall if the interpreter is sync.
+	* python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
+	gdbpy_ref.
 
-2015-01-13  Doug Evans  <dje@google.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* objfiles.c (objfile_filename): New function.
-	* objfiles.h (objfile_filename): Declare it.
-	(objfile_name): Add function comment.
-	* python/py-objfile.c (objfpy_lookup_objfile_by_name): Try both the
-	bfd file name (which may be realpath'd), and the original name.
+	* python/py-prettyprint.c (search_pp_list)
+	(find_pretty_printer_from_objfiles)
+	(find_pretty_printer_from_progspace)
+	(find_pretty_printer_from_gdb, find_pretty_printer)
+	(gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
+	gdbpy_ref.
 
-2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* NEWS: Create a new section for the next release branch.
-	Rename the section of the current branch, now that it has
-	been cut.
+	* python/py-param.c (call_doc_function): Use gdbpy_ref.
 
-2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	GDB 7.9 branch created (92fc2e6978d9a7c8324c7e851dbee59e22ec7a37):
-	* version.in: Bump version to 7.9.50.DATE-cvs.
+	* python/py-linetable.c (build_line_table_tuple_from_pcs)
+	(ltpy_get_all_source_lines): Use gdbpy_ref.
 
-2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* nat/linux-procfs.c (linux_proc_attach_tgid_threads):
-	Remove trailing new-line in argument of call to warning.
+	* python/py-framefilter.c (extract_sym, extract_value)
+	(get_py_iter_from_func, bootstrap_python_frame_filters): Use
+	gdbpy_ref.
 
-2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* linux-nat.c (attach_proc_task_lwp_callback): Remove trailing
-	new-line in argument of call to "warning".
+	* python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
 
-2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* ada-lang.c (ada_lookup_symbol_nonlocal): If name not found
-	in static block, then try searching for primitive types.
+	* python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
 
-2015-01-12  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* top.h (gdb_add_history): Declare.
-	* top.c (command_count): New variable.
-	(gdb_add_history): New function.
-	(gdb_safe_append_history): New static function.
-	(quit_force): Call it.
-	(command_line_input): Use gdb_add_history instead of
-	add_history.
-	* event-top.c (command_line_handler): Likewise.
+	* python/py-function.c (convert_values_to_python, fnpy_init): Use
+	gdbpy_ref.
 
-2015-01-12  James Clarke  <jrtc27@jrtc27.com>  (tiny patch)
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR gdb/17046
-	* darwin-nat.c: Replace <machine/setjmp.h> #include by
-	<setjmp.h> #include.
+	* python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
 
-2015-01-11  Doug Evans  <xdje42@gmail.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
+	* python/py-type.c (convert_field, make_fielditem, typy_fields)
+	(typy_range): Use gdbpy_ref.
 
-2015-01-11  Doug Evans  <xdje42@gmail.com>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	PR gdb/15830
-	* NEWS: The "maint demangle" command is renamed as "demangle".
-	* demangle.c: #include cli/cli-utils.h, language.h.
-	(demangle_command): New function.
-	(_initialize_demangle): Add new command "demangle".
-	* maint.c (maintenance_demangle): Stub out.
-	(_initialize_maint_cmds): Update help text for "maint demangle",
-	and mark as deprecated.
+	* python/py-threadevent.c (create_thread_event_object): Use
+	gdbpy_ref.
+	* python/py-stopevent.c (create_stop_event_object): Simplify.
+	(emit_stop_event): Use gdbpy_ref.
+	* python/py-signalevent.c (create_signal_event_object): Use
+	gdbpy_ref.
+	* python/py-newobjfileevent.c (create_new_objfile_event_object)
+	(emit_new_objfile_event, create_clear_objfiles_event_object)
+	(emit_clear_objfiles_event): Use gdbpy_ref.
+	* python/py-infevents.c (create_inferior_call_event_object)
+	(create_register_changed_event_object)
+	(create_memory_changed_event_object, emit_inferior_call_event)
+	(emit_memory_changed_event, emit_register_changed_event): Use
+	gdbpy_ref.
+	* python/py-exitedevent.c (create_exited_event_object)
+	(emit_exited_event): Use gdbpy_ref.
+	* python/py-event.h (evpy_emit_event): Remove
+	CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
+	* python/py-event.c (evpy_emit_event): Use gdbpy_ref.
+	* python/py-continueevent.c (emit_continue_event): Use
+	gdbpy_ref.
+	* python/py-breakpoint.c (gdbpy_breakpoint_created)
+	(gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
+	gdbpy_ref.
+	* python/py-bpevent.c (create_breakpoint_event_object): Use
+	gdbpy_ref.
 
-2015-01-11  Mark Kettenis  <kettenis@gnu.org>
+2017-01-10  Tom Tromey  <tom@tromey.com>
 
-	* inf-ptrace.c (inf_ptrace_follow_fork): Adjust now that
-	inferior_thread is a function.
+	* python/py-ref.h: New file.
 
-2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
 
-	* Makefile.in (.y.c): Don't munge yacc's #line
-	directives.
+	* cli-out.c (cli_ui_out::do_redirect): Change return type to
+	void.
+	* cli-out.h (cli_ui_out::do_redirect): Likewise.
+	* mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
+	* mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
+	* ui-out.c (ui_out::redirect): Likewise.
+	* ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
+	* cli/cli-logging.c (set_logging_redirect): Update call site of
+	ui_out::redirect.
+	(handle_redirections): Likewise.
+	* scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
+	* top.c (execute_command_to_string): Likewise.
+	* utils.c (do_ui_out_redirect_pop): Likewise.
 
-2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
 
-	* utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
-	to prompt for input.
-	* tui/tui-hooks.c (tui_query_hook): Remove.
-	(tui_install_hooks): Don't set deprecated_query_hook.
-	* tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
-	height calculation.  Always update the command window's cur_line.
+	* stack.c (_initialize_stack): Update "frame" command help message.
 
-2015-01-09  Pedro Alves  <palves@redhat.com>
+2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
 
-	* breakpoint.c (hardware_breakpoint_inserted_here_p): New
-	function.
-	* breakpoint.h (hardware_breakpoint_inserted_here_p): New
-	declaration.
-	* linux-nat.c (linux_nat_status_is_event): Move higher up in file.
-	(linux_resume_one_lwp): Store the thread's PC.  Adjust to clear
-	stop_reason.
-	(check_stopped_by_watchpoint): New function.
-	(save_sigtrap): Reimplement.
-	(linux_nat_stopped_by_watchpoint): Adjust.
-	(linux_nat_lp_status_is_event): Delete.
-	(stop_wait_callback): Only call save_sigtrap after storing the
-	pending status.
-	(status_callback): If the thread had been stopped for a breakpoint
-	that has since been removed, discard the event and resume the LWP.
-	(count_events_callback, select_event_lwp_callback): Use
-	lwp_status_pending_p instead of linux_nat_lp_status_is_event.
-	(cancel_breakpoint): Rename to ...
-	(check_stopped_by_breakpoint): ... this.  Record whether the LWP
-	stopped for a software breakpoint or hardware breakpoint.
-	(select_event_lwp): Only give preference to the stepping LWP in
-	all-stop mode.  Adjust comments.
-	(stop_and_resume_callback): Remove references to new_pending_p.
-	(linux_nat_filter_event): Likewise.  Leave exit events of the
-	leader thread pending here.  Handle signal short circuiting here.
-	Only call save_sigtrap after storing the pending waitstatus.
-	(linux_nat_wait_1): Remove 'retry' label.  Remove references to
-	new_pending.  Don't handle leaving events the caller is not
-	interested in pending here, nor handle signal short-circuiting
-	here.  Also give equal priority to all LWPs that have had events
-	in non-stop mode.  If reporting a software breakpoint event,
-	unadjust the LWP's PC.
-	* linux-nat.h (enum lwp_stop_reason): New.
-	(struct lwp_info) <stop_pc>: New field.
-	(struct lwp_info) <stopped_by_watchpoint>: Delete field.
-	(struct lwp_info) <stop_reason>: New field.
-	* x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
-
-2015-01-09  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
-	Set the LWP's 'resumed' flag.
-
-2015-01-09  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (linux_resume_one_lwp): New function.
-	(resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
-	(linux_nat_resume): Use lwp_status_pending_p and
-	linux_resume_one_lwp.
-	(linux_handle_syscall_trap): Use linux_resume_one_lwp.
-	(linux_handle_extended_wait): Use linux_resume_one_lwp.
-	(status_callback, running_callback): Use lwp_status_pending_p.
-	(lwp_status_pending_p): New function.
-	(stop_and_resume_callback): Use lwp_status_pending_p.
-	(linux_nat_filter_event): Use linux_resume_one_lwp.
-	(linux_nat_wait_1): Always use status_callback to look for an LWP
-	with a pending status.  Use linux_resume_one_lwp.
-	(resume_stopped_resumed_lwps): Use lwp_status_pending_p and
-	linux_resume_one_lwp.
-
-2015-01-09  Pedro Alves  <palves@redhat.com>
-
-	* breakpoint.c (bp_location_inserted_here_p): New function,
-	factored out from ...
-	(breakpoint_inserted_here_p): ... here.  Use
-	ALL_BP_LOCATIONS_AT_ADDR.
-	(software_breakpoint_inserted_here_p): Use
-	bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
-
-2014-01-09  Pedro Alves  <palves@redhat.com>
-
-	Skip enabling event reporting if the kernel supports
-	PTRACE_EVENT_CLONE.
-	* linux-thread-db.c: Include "nat/linux-ptrace.h".
-	(thread_db_use_events): New function.
-	(try_thread_db_load_1): Check thread_db_use_events before enabling
-	event reporting.
-	(update_thread_state): New function.
-	(attach_thread): Use it.  Check thread_db_use_events before
-	enabling event reporting.
-	(thread_db_detach): Check thread_db_use_events before disabling
-	event reporting.
-	(find_new_threads_callback): Check thread_db_use_events before
-	enabling event reporting.  Update the thread's state if not using
-	libthread_db events.
-
-2015-01-09  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
-	about to wait for is > 0.
-	* linux-thread-db.c (find_new_threads_callback): Ignore thread if
-	the kernel thread ID is -1.
-
-2015-01-09  Pedro Alves  <palves@redhat.com>
-
-	* linux-nat.c (attach_proc_task_lwp_callback): New function.
-	(linux_nat_attach): Use linux_proc_attach_tgid_threads.
-	(wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
-	ptrace option flags.
-	* linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
-	field.
-	* nat/linux-procfs.c: Include <dirent.h>.
-	(linux_proc_get_int): New parameter "warn".  Handle it.
-	(linux_proc_get_tgid): Adjust.
-	(linux_proc_get_tracerpid): Rename to ...
-	(linux_proc_get_tracerpid_nowarn): ... this.
-	(linux_proc_pid_get_state): New function, factored out from
-	(linux_proc_pid_has_state): ... this.  Add new parameter "warn"
-	and handle it.
-	(linux_proc_pid_is_gone): New function.
-	(linux_proc_pid_is_stopped): Adjust.
-	(linux_proc_pid_is_zombie_maybe_warn)
-	(linux_proc_pid_is_zombie_nowarn): New functions.
-	(linux_proc_pid_is_zombie): Use
-	linux_proc_pid_is_zombie_maybe_warn.
-	(linux_proc_attach_tgid_threads): New function.
-	* nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
-	(linux_proc_get_tracerpid): Rename to ...
-	(linux_proc_get_tracerpid_nowarn): ... this, and update comment.
-	(linux_proc_pid_is_gone): New declaration.
-	(linux_proc_pid_is_zombie): Update comment.
-	(linux_proc_pid_is_zombie_nowarn): New declaration.
-	(linux_proc_attach_lwp_func): New typedef.
-	(linux_proc_attach_tgid_threads): New declaration.
-	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
-	use nowarn functions.
-	(linux_ptrace_attach_fail_reason_string): Move here from
-	gdbserver/linux-low.c and rename.
-	(ptrace_supports_feature): If the current ptrace options are not
-	known yet, check them now, instead of asserting.
-	* nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
-	Declare.
+	* d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
 
-2015-01-09  Pedro Alves  <palves@redhat.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* linux-thread-db.c (thread_db_find_new_threads_silently)
-	(try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
-	(find_new_threads_once): Print debug output on gdb_stdlog.
+	* x86-linux-nat.h: Include gdb_proc_service.h.
 
-2015-01-09  Chen Gang  <gang.chen.5i5j@gmail.com>
-	    Pedro Alves  <palves@redhat.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* compile/compile.c: Include "gdb_wait.h".
-	(do_rmdir): Check return value, and free 'zap'.
+	* ser-base.h: Include serial.h.
 
-2015-01-08  Pedro Alves  <palves@redhat.com>
-	    Yao Qi  <yao@codesourcery.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* dwarf2loc.c (indirect_pieced_value): Don't call
-	gdb_sign_extend.  Call extract_signed_integer instead.
-	* utils.c (gdb_sign_extend): Remove.
-	* utils.h (gdb_sign_extend): Remove declaration.
+	* ppc-linux-tdep.h: Include ppc-tdep.h.
 
-2015-01-07  Pierre Muller  <muller@sourceware.org>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	PR symtab/17811
-	* stabsread.c (define_symbol): Set language for C++ special symbols.
+	* nat/amd64-linux-siginfo.h: Include signal.h.
 
-2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* inflow.c (initial_gdb_ttystate): Tweak comment.
+	* nat/aarch64-linux-hw-point.h: Include break-common.h.
 
-2015-01-07  Joel Brobecker  <brobecker@adacore.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* inflow.c (set_initial_gdb_ttystate): Add empty line after
-	comment documenting function.
+	* mi/mi-parse.h: Include mi-cmds.h.
 
-2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* terminal.h (set_initial_gdb_ttystate): Declare.
-	* inflow.c (initial_gdb_ttystate): New static variable.
-	(set_initial_gdb_ttystate): New setter.
-	(child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
-	instead of our current terminal state.
-	* top.c (gdb_init): Call set_initial_gdb_ttystate.
+	* inf-loop.c: Don't include "target.h".
+	* inf-loop.h: Include it here.
 
-2015-01-07  Joel Brobecker  <brobecker@adacore.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* guile/scm-type.c (tyscm_array_1): Add comment.
-	* python/py-type.c (typy_array_1): Add comment.
+	* dfp.h: Include "dboulest.h" and "expression.h".
 
-2015-01-06  Joel Brobecker  <brobecker@adacore.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
-	error if N2 is equal to N1 - 1.
+	* ax-gdb.h: Include "ax.h".
 
-2015-01-06  Joel Brobecker  <brobecker@adacore.com>
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
-	* python/py-type.c (typy_array_1): Do not raise negative-length
-	exception if N2 is equal to N1 - 1.
+	* Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
+	with nat/gdb_ptrace.h.
 
-2015-01-03  Doug Evans  <xdje42@gmail.com>
+2017-01-05  Yao Qi  <yao.qi@linaro.org>
 
-	* c-exp.y: Whitespace cleanup.
-	(classify_inner_name): Remove extra ;.
+	* mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
+	new line.
+	(mips64_fbsd_sigframe_init): Likewise.
 
-2015-01-02  Maciej W. Rozycki  <macro@codesourcery.com>
+2017-01-04  John Baldwin  <jhb@FreeBSD.org>
 
-	* mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
-	offset signed.
+	* mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
+	GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
 
-2015-01-02  Doug Evans  <dje@google.com>
+2017-01-04  John Baldwin  <jhb@FreeBSD.org>
 
-	* dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
+	* Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
+	* NEWS: Mention new FreeBSD/mips native configuration.
+	* config/mips/fbsd.mh: New file.
+	* configure.host: Add mips*-*-freebsd*.
+	* mips-fbsd-nat.c: New file.
 
-2015-01-02  Doug Evans  <dje@google.com>
+2017-01-04  John Baldwin  <jhb@FreeBSD.org>
 
-	* symtab.h (struct symbol): Fix typo in comment.
+	* Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
+	(ALLDEPFILES): Add mips-fbsd-tdep.c.
+	* NEWS: Mention new FreeBSD/mips target.
+	* configure.tgt: Add mips*-*-freebsd*.
+	* mips-fbsd-tdep.c: New file.
+	* mips-fbsd-tdep.h: New file.
 
-2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+2017-01-04  Yao Qi  <yao.qi@linaro.org>
 
-	Update year range in copyright notice of all files.
+	* dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
+	use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
 
-2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+2017-01-01  Joel Brobecker  <brobecker@adacore.com>
 
-	* top.c (print_gdb_version): Update copyright year to 2015.
+        Update copyright year range in all GDB files.
 
-2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+2017-01-01  Joel Brobecker  <brobecker@adacore.com>
 
-	* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
+	* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
 
-For older changes see ChangeLog-2014.
+For older changes see ChangeLog-2016.
 
 Local Variables:
 mode: change-log
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2013 ./gdb/ChangeLog-2013
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2013	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ChangeLog-2013	2017-03-06 01:49:07.000000000 +0000
@@ -548,7 +548,7 @@
 
 2013-12-03  Walfred Tedeschi  <walfred.tedeschi@intel.com>
 
-	* NEWS:  Add section for Intel(R) Architecture Instructions
+	* NEWS:  Add section for Intel Architecture Instructions
 	Extesions mentioning MPX.
 
 2013-12-03  Joel Brobecker  <brobecker@adacore.com>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2015 ./gdb/ChangeLog-2015
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2015	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ChangeLog-2015	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,14485 @@
+2015-12-22  Joel Brobecker  <brobecker@adacore.com>
+
+	* windows-nat.c (_initialize_loadable): Fix computing of
+	GetModuleFileNameEx.
+
+2015-12-21  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.c (create_array_type_with_stride): Fix indentation.
+
+2015-12-19  Joel Brobecker  <brobecker@adacore.com>
+
+	* arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Remove trailing
+	newline at end of error message.
+
+2015-12-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* event-top.c (command_handler): Don't require stdin to be a tty
+	for call to reinitialize_more_filter.
+	* top.c (command_loop): Likewise.
+
+2015-12-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* utils.c (prompt_for_continue): Call throw_quit directly on 'q'.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* arm-tdep.c (arm_get_next_pcs_read_memory_unsigned_integer): Cast
+	to enum bfd_endian)
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in (ALL_TARGET_OBS): Append arm-get-next-pcs.o,
+	arm-linux.o.
+	(ALLDEPFILES): Append arm-get-next-pcs.c, arm-linux.c
+	(arm-linux.o): New rule.
+	(arm-get-next-pcs.o): New rule.
+	* arch/arm-get-next-pcs.c: New file.
+	* arch/arm-get-next-pcs.h: New file.
+	* arch/arm-linux.h: New file.
+	* arch/arm-linux.c: New file.
+	* arm.c: Include common-regcache.c.
+	(thumb_advance_itstate): Moved from arm-tdep.c.
+	(arm_instruction_changes_pc): Likewise.
+	(thumb_instruction_changes_pc): Likewise.
+	(thumb2_instruction_changes_pc): Likewise.
+	(shifted_reg_val): Likewise.
+	* arm.h (submask): Move macro from arm-tdep.h
+	(bit): Likewise.
+	(bits): Likewise.
+	(sbits): Likewise.
+	(BranchDest): Likewise.
+	(thumb_advance_itstate): Moved declaration from arm-tdep.h
+	(arm_instruction_changes_pc): Likewise.
+	(thumb_instruction_changes_pc): Likewise.
+	(thumb2_instruction_changes_pc): Likewise.
+	(shifted_reg_val): Likewise.
+	* arm-linux-tdep.c: Include arch/arm.h, arch/arm-get-next-pcs.h
+	arch/arm-linux.h.
+	(arm_linux_get_next_pcs_ops): New struct.
+	(ARM_SIGCONTEXT_R0, ARM_UCONTEXT_SIGCONTEXT,
+	ARM_OLD_RT_SIGFRAME_SIGINFO, ARM_OLD_RT_SIGFRAME_UCONTEXT,
+	ARM_NEW_RT_SIGFRAME_UCONTEXT, ARM_NEW_SIGFRAME_MAGIC): Move stack
+	layout defines to arch/arm-linux.h.
+	(arm_linux_sigreturn_next_pc_offset): Move to arch/arm-linux.c.
+	(arm_linux_software_single_step): Adjust for arm_get_next_pcs
+	implementation.
+	* arm-tdep.c: Include arch/arm-get-next-pcs.h.
+	(arm_get_next_pcs_ops): New struct.
+	(submask): Move macro to arm.h.
+	(bit): Likewise.
+	(bits): Likewise.
+	(sbits): Likewise.
+	(BranchDest): Likewise.
+	(thumb_instruction_changes_pc): Move to arm.c
+	(thumb2_instruction_changes_pc): Likewise.
+	(arm_instruction_changes_pc): Likewise.
+	(shifted_reg_val): Likewise.
+	(thumb_advance_itstate): Likewise.
+	(thumb_get_next_pc_raw): Move to arm-get-next-pcs.c.
+	(arm_get_next_pc_raw): Likewise.
+	(arm_get_next_pc): Likewise.
+	(thumb_deal_with_atomic_sequence_raw): Likewise.
+	(arm_deal_with_atomic_sequence_raw): Likewise.
+	(arm_deal_with_atomic_sequence): Likewise.
+	(arm_get_next_pcs_read_memory_unsigned_integer): New function.
+	(arm_get_next_pcs_addr_bits_remove): Likewise.
+	(arm_get_next_pcs_syscall_next_pc): Likewise.
+	(arm_get_next_pcs_is_thumb): Likewise.
+	(arm_software_single_step): Adjust for arm_get_next_pcs
+	implementation.
+	* arm-tdep.h: (arm_get_next_pc): Remove declaration.
+	(arm_get_next_pcs_read_memory_unsigned_integer):
+	New declaration.
+	(arm_get_next_pcs_addr_bits_remove): Likewise.
+	(arm_get_next_pcs_syscall_next_pc): Likewise.
+	(arm_get_next_pcs_is_thumb): Likewise.
+	(arm_deal_with_atomic_sequence: Remove declaration.
+	* common/gdb_vecs.h: Add CORE_ADDR vector definition.
+	* configure.tgt (aarch64*-*-linux): Add arm-get-next-pcs.o,
+	arm-linux.o.
+	(arm*-wince-pe): Add arm-get-next-pcs.o.
+	(arm*-*-linux*): Add arm-get-next-pcs.o, arm-linux.o,
+	arm-get-next-pcs.o
+	(arm*-*-netbsd*,arm*-*-knetbsd*-gnu): Add arm-get-next-pcs.o.
+	(arm*-*-openbsd*): Likewise.
+	(arm*-*-symbianelf*): Likewise.
+	(arm*-*-*): Likewise.
+	* symtab.h: Move CORE_ADDR vector definition to gdb_vecs.h.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in (SFILES): Append common/common-regcache.c.
+	(COMMON_OBS): Append common/common-regcache.o.
+	(common-regcache.o): New rule.
+	* common/common-regcache.h (register_status) New enum.
+	(regcache_raw_read_unsigned): New declaration.
+	* common/common-regcache.c: New file.
+	* regcache.h (enum register_status): Move to common-regcache.h.
+	(regcache_raw_read_unsigned): Likewise.
+	(regcache_raw_get_unsigned): Likewise.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* arm-linux-tdep.c (arm_linux_sigreturn_next_pc_offset): New function.
+	(arm_linux_sigreturn_next_pc): Likewise.
+	(arm_linux_syscall_next_pc): Use regcache instead of frame.
+	(arm_linux_software_single_step): Likewise.
+	* arm-tdep.c (arm_is_thumb): New function.
+	(shifted_reg_va): Use regcache instead of frame.
+	(thumb_get_next_pc_raw): Likewise.
+	(arm_get_next_pc_raw): Likewise.
+	(arm_get_next_pc): Likewise.
+	(thumb_deal_with_atomic_sequence_raw): Likewise.
+	(arm_deal_with_atomic_sequence_raw): Likewise.
+	(arm_deal_with_atomic_sequence): Likewise.
+	(arm_software_single_step): Likewise.
+	* arm-tdep.h (struct gdbarch_tdep): Use regcache for syscall_next_pc.
+	(arm_get_next_pc): Use regcache.
+	(arm_deal_with_atomic_sequence): Likewise.
+	(arm_is_thumb): New declaration.
+	* regcache.c (regcache_raw_get_unsigned): New function.
+	* regcache.h (regcache_raw_get_unsigned): New function declaration.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* arch/arm.c (bitcount): Move from arm-tdep.c.
+	(condition_true): Likewise.
+	* arch/arm.h (Instruction Definitions): Move form arm-tdep.h.
+	(condition_true): Move defenition from arm-tdep.h.
+	(bitcount): Likewise.
+	* arm-tdep.c (condition_true): Move to arch/arm.c.
+	(bitcount): Likewise.
+	* arm-tdep.h (Instruction Definitions): Move to arch/arm.h.
+	* arm-wince-tdep.c: Include arch/arm.h.
+	* armnbsd-tdep.c: Likewise.
+
+2015-12-17  Pedro Alves  <palves@redhat.com>
+
+	PR threads/19354
+	* linux-nat.c (linux_nat_update_thread_list): Update process cores
+	each lwp was last seen running on here.
+	* linux-thread-db.c (update_thread_core): Delete.
+	(thread_db_update_thread_list_td_ta_thr_iter): Rename to ...
+	(thread_db_update_thread_list): ... this.  Skip inferiors with
+	execution.  Also call the target beneath.
+	(thread_db_update_thread_list): Delete.
+
+2015-12-17  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac: Remove tkill checks.
+	* configure, config.in: Regenerate.
+	* linux-nat.c: Remove HAVE_TKILL_SYSCALL check.  Update top level
+	comments.
+	(linux_nat_post_attach_wait): Remove 'cloned' parameter.  Use
+	__WALL.
+	(attach_proc_task_lwp_callback): Don't set the cloned flag.
+	(linux_nat_attach): Adjust.
+	(kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
+	to 'kill'.
+	(linux_handle_extended_wait): Use __WALL.  Don't set the cloned
+	flag.
+	(wait_lwp): Use __WALL.  Update comments.
+	(running_callback, stop_and_resume_callback): Delete.
+	(linux_nat_filter_event): Don't stop and resume all lwps. Don't
+	check if the event LWP has previously exited.
+	(check_zombie_leaders): Update comments.
+	(linux_nat_wait_1): Use __WALL.
+	(kill_wait_callback): Don't handle clone processes separately.
+	Use __WALL instead.
+	(linux_thread_alive): Delete.
+	(linux_nat_thread_alive): Return true as long as the LWP is in the
+	LWP list.
+	(linux_nat_update_thread_list): Assume the kernel supports
+	PTRACE_EVENT_CLONE.
+	(get_signo): Delete.
+	(lin_thread_get_thread_signals): Remove LinuxThreads references.
+	No longer check __pthread_sig_restart / __pthread_sig_cancel in
+	the inferior.
+	* linux-nat.h (struct lwp_info) <cloned>: Delete field.
+	* linux-thread-db.c: Update comments.
+	(_initialize_thread_db): Remove LinuxThreads references.
+	* nat/linux-waitpid.c (my_waitpid): No longer emulate __WALL.
+	Pass down flags unmodified.
+	* linux-waitpid.h (my_waitpid): Update documentation.
+
+2015-12-17  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (struct stack_item_t): Update comments.
+	(pass_on_stack): Set item.data to NULL.
+	(aarch64_push_dummy_call): Call write_memory if si->data
+	isn't NULL.
+
+2015-12-16  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (compiler warning flags): When testing a
+	-Wno-foo option, check whether -Wfoo works instead.
+	* configure: Regenerate.
+
+2015-12-16  Pedro Alves  <palves@redhat.com>
+
+	* common/vec.h (vec_offset): New macro.
+	(DEF_VEC_ALLOC_FUNC_I, DEF_VEC_ALLOC_FUNC_O): Use it instead of
+	offsetof.
+
+2015-12-11  Don Breazeal  <donb@codesourcery.com>
+
+	* NEWS: Announce fork and exec event support for target remote.
+
+2015-12-11  Don Breazeal  <donb@codesourcery.com>
+
+	* inferior.c (number_of_live_inferiors): New function.
+	(have_live_inferiors): Use number_of_live_inferiors in place
+	of duplicate code.
+	* inferior.h (number_of_live_inferiors): Declare new function.
+	* remote.c (set_general_process): Remove restriction on target
+	remote mode.
+	(remote_query_supported): Likewise.
+	(remote_detach_1): Exit in target remote mode only when there
+	is just one live inferior left.
+	(remote_disconnect): Unpush the target directly instead of 
+	calling remote_mourn.
+	(remote_kill): Rewrite function to handle both target remote
+	and extended-remote.  Call remote_kill_k.
+	(remote_kill_k): New function.
+	(extended_remote_kill): Delete function.
+	(remote_mourn, extended_remote_mourn): Combine functions into
+	one, remote_mourn, and enable extended functionality for target
+	remote.
+	(remote_pid_to_str): Enable "process" style ptid string for
+	target remote.
+	(remote_supports_multi_process): Remove restriction on target
+	remote mode.
+
+2015-12-14  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* i386-tdep.c (i386_mpx_info_bounds): Use TYPE_LENGTH.
+	(i386_mpx_set_bounds): Likewise.
+	* solib-darwin.c (darwin_load_image_infos): Likewise.
+	(darwin_solib_read_all_image_info_addr): Likewise.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-cmds.c (_initialize_cli_cmds): Extend help text for
+	'list' command.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-cmds.c (list_command): Add an error when trying to use
+	'-' to scan read off the start of the source file.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-cmds.c (list_command): Check that the argument string is
+	a single character, either '+' or '-'.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-cmds.c (list_command): Move all handling of +/-
+	arguments into a single if block.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-cmds.c (list_command): Use NULL instead of 0 when
+	checking pointers.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* source.c (lines_to_list): Make static.
+
+2015-12-10  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-thread-db.c (find_new_threads_callback): Use record_thread.
+
+2015-12-10  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* breakpoint.c (remove_thread_event_breakpoints): Remove.
+	* breakpoint.h (remove_thread_event_breakpoints): Remove
+	declaration.
+	* linux-nat.c (in_pid_list_p): Remove.
+	(lin_lwp_attach_lwp): Remove.
+	* linux-nat.h (lin_lwp_attach_lwp): Remove declaration.
+	* linux-thread-db.c (thread_db_use_events): Remove.
+	(struct thread_db_info) <td_create_bp_addr>: Remove.
+	<td_death_bp_addr>: Likewise.
+	<td_ta_event_addr_p>: Likewise.
+	<td_ta_set_event_p>: Likewise.
+	<td_ta_clear_event_p>: Likewise.
+	<td_ta_event_getmsg_p>: Likewise.
+	<td_thr_event_enable_p>: Likewise.
+	(attach_thread): Likewise.
+	(detach_thread): Likewise.
+	(have_threads_callback): Likewise.
+	(have_threads): Likewise.
+	(enable_thread_event): Likewise.
+	(enable_thread_event_reporting): Likewise.
+	(try_thread_db_load_1): Remove td_ta_event_addr, td_ta_set_event,
+	td_ta_clear_event, td_ta_event_getmsg, td_thr_event_enable
+	initializations.
+	(try_thread_db_load_1): Remove enable_thread_event_reporting call.
+	(disable_thread_event_reporting): Remove.
+	(record_thread): Adapt to thread_db_use_event removal.
+	(detach_thread): Remove.
+	(thread_db_detach): Adapt to thread_db_use_event removal.
+	(check_event): Remove.
+	(thread_db_wait): Adapt to thread events support removal.
+	(thread_db_mourn_inferior): Likewise.
+	(find_new_threads_callback): Likewise.
+	(find_new_threads_once): Likewise.
+	(thread_db_update_thread_list): Likewise.
+
+2015-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* dwarf2read.c (dwarf2_ranges_read): Unify and fix base address
+	reading code.
+
+2015-12-09  Kevin Buettner  <kevinb@redhat.com>
+
+	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Perform a pointer
+	to address conversion for DWARF_VALUE_MEMORY.
+
+2015-12-09  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
+	format.
+	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
+	(format_code): Add 'z' entry.
+	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
+	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
+	field.
+	* NEWS: Add new note to MI changes citing the new zero-hexadecimal
+	format for -var-set-format.
+
+2015-12-09  Ruslan Kabatsayev  <b7.10110111@gmail.com>  (tiny patch)
+
+	PR gdb/18702
+	* configure.host: Fix detection of x86_64 host when setting
+	floatformats.
+
+2015-12-08  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* NEWS: Announce this enhancement and the corresponding new
+	option.
+
+2015-12-07  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (print_signatures): New.
+	(ada_print_symbol_signature): New.
+	(user_select_syms): Add signatures to the output of candidate
+	symbols using ada_print_symbol_signature.
+	(_initialize_ada_language): Add a "set/show ada
+	print-signatures" boolean option.
+
+2015-12-07  Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+	* MAINTAINERS (Write After Approval): Add Andreas Arnez.
+
+2015-12-06  Mike Stump <mikestump@comcast.net>
+	    Joel Brobecker  <brobecker@adacore.com>
+
+	* Makefile.in (TAGS): Replace i386-nat.h by x86-nat.h.
+	* x86-nat.c: Replace remaining references to i386-nat
+	by reference to x86-nat instead.
+
+2015-12-05  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.10.1 released.
+
+2015-12-01  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* remote.c (remote_parse_stop_reply): Avoid GCC 4.1 "operation
+	may be undefined" warning.
+
+2015-12-01  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* remote.c (remote_newthread_step): Initialize item.name.
+	(remote_get_threads_with_qthreadinfo): Likewise.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	PR 14618
+	* NEWS (New remote packets): Mention the N stop reply.
+	* remote.c (remote_protocol_features): Add "no-resumed" entry.
+	(remote_query_supported): Report no-resumed+ support.
+	(remote_parse_stop_reply): Handle 'N'.
+	(process_stop_reply): Handle TARGET_WAITKIND_NO_RESUMED.
+	(remote_wait_as): Handle 'N' / TARGET_WAITKIND_NO_RESUMED.
+	(_initialize_remote): Register "set/show remote
+	no-resumed-stop-reply" commands.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	PR 14618
+	* infrun.c (handle_no_resumed): New function.
+	(handle_inferior_event_1) <TARGET_WAITKIND_NO_RESUMED>: Defer to
+	handle_no_resumed.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* NEWS (New commands): Mention "set/show remote thread-events"
+	commands.
+	(New remote packets): Mention thread created/exited stop reasons
+	and QThreadEvents packet.
+	* infrun.c (disable_thread_events): New function.
+	(stop_all_threads): Disable/enable thread create/exit events.
+	Handle TARGET_WAITKIND_THREAD_EXITED.
+	(handle_inferior_event_1): Handle TARGET_WAITKIND_THREAD_CREATED
+	and TARGET_WAITKIND_THREAD_EXITED.
+	* remote.c (remove_child_of_pending_fork): Also remove threads of
+	threads that have TARGET_WAITKIND_THREAD_EXITED events.
+	(remote_parse_stop_reply): Handle "create" magic register.  Handle
+	'w' stop reply.
+	(initialize_remote): Install remote_thread_events as
+	to_thread_events target hook.
+	(remote_thread_events): New function.
+	* target-delegates.c: Regenerate.
+	* target.c (target_thread_events): New function.
+	* target.h (struct target_ops) <to_thread_events>: New field.
+	(target_thread_events): Declare.
+	* target/waitstatus.c (target_waitstatus_to_string): Handle
+	TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
+	* target/waitstatus.h (enum target_waitkind)
+	<TARGET_WAITKIND_THREAD_CREATED, TARGET_WAITKIND_THREAD_EXITED):
+	New values.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* NEWS (New remote packets): Mention vCtrlC.
+	* remote.c (PACKET_vCtrlC): New enum value.
+	(async_remote_interrupt): Call target_interrupt instead of
+	target_stop.
+	(remote_interrupt_as): Remove 'ptid' parameter.
+	(remote_interrupt_ns): New function.
+	(remote_stop): Adjust.
+	(remote_interrupt): If the target is in non-stop mode, try
+	interrupting with vCtrlC.
+	(initialize_remote): Install set remote ctrl-c packet.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (struct remote_state) <remote_watch_data_address,
+	stop_reason>: Delete fields.
+	(struct private_thread_info) <stop_reason, watch_data_address>:
+	New fields.
+	(resume_clear_thread_private_info): New function.
+	(append_pending_thread_resumptions): Call it.
+	(remote_resume): Clear all threads' private info.
+	(process_stop_reply): Adjust.
+	(remote_wait_as): Don't reference remote_state's stop_reason
+	field.
+	(remote_stopped_by_sw_breakpoint)
+	(remote_stopped_by_hw_breakpoint, remote_stopped_by_watchpoint)
+	(remote_stopped_data_address): Adjust to refer get data from the
+	current thread.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* infcmd.c (attach_post_wait): If the target is always in non-stop
+	mode, and the UI is in all-stop mode, stop all threads and pick
+	the one with lowest number as current.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdbthread.h (switch_to_thread_no_regs): Declare.
+	* infcmd.c (setup_inferior): New function, factored out from ...
+	(attach_command_post_wait): ... this.  Rename to ...
+	(attach_post_wait): ... this.  Replace parameter async_exec with
+	attach_post_wait_mode parameter.  Adjust.
+	(enum attach_post_wait_mode): New enum.
+	(struct attach_command_continuation_args): Replace 'async_exec'
+	field with 'mode' field.
+	(attach_command_continuation): Adjust.
+	(attach_command): Add comment.  Mark the inferior as needing
+	setup.  Adjust to use enum attach_post_wait_mode.
+	(notice_new_inferior): Use switch_to_thread_no_regs.  Adjust to
+	use enum attach_post_wait_mode.
+	* inferior.h (setup_inferior): Declare.
+	(struct inferior) <needs_setup>: New field.
+	* infrun.c (set_last_target_status): Make extern.
+	(stop_all_threads): Make extern.  Setup inferior, if necessary.
+	* infrun.h (set_last_target_status, stop_all_threads): Declare.
+	* remote-notif.c (remote_async_get_pending_events_handler)
+	(handle_notification): Replace non_stop checks with
+	target_is_non_stop_p() checks.
+	* remote.c (remote_notice_new_inferior): Remove non_stop check.
+	(remote_update_thread_list): Replace non_stop check with
+	target_is_non_stop_p() check.
+	(print_one_stopped_thread): New function.
+	(process_initial_stop_replies): New 'from_tty' parameter.
+	"Notice" all new live inferiors after storing initial stops as
+	pending status in each corresponding thread.  If all-stop, stop
+	all threads, try picking a signalled thread as current, and print
+	the status of that one thread.  Record the last target status.
+	(remote_start_remote): Replace non_stop checks with
+	target_is_non_stop_p() checks.  Don't query for the remote current
+	thread of use qOffsets here.  Pass from_tty to
+	process_initial_stop_replies.
+	(extended_remote_attach): Replace non_stop checks with
+	target_is_non_stop_p() checks.
+	(extended_remote_post_attach): Send qOffsets here.
+	(remote_vcont_resume, remote_resume, remote_stop)
+	(remote_interrupt, remote_parse_stop_reply, remote_wait): Replace
+	non_stop checks with target_is_non_stop_p() checks.
+	(remote_async): If target is non-stop, mark/clear the pending
+	events token.
+	* thread.c (switch_to_thread_no_regs): New function.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-nonstop.exp: Append "set non-stop on" to GDBFLAGS
+	instead of issuing "-gdb-set non-stop 1" after starting gdb.
+	Use mi_is_target_remote instead of checking "is_remote target".
+	* lib/gdb.exp (gdb_is_target_remote): Rename to ...
+	(gdb_is_target_remote_prompt): ... this, and add 'prompt_regexp'
+	parameter.
+	(gdb_is_target_remote): Reimplement.
+	* lib/mi-support.exp (mi_is_target_remote): New procedure.
+
+2014-11-28  Pedro Alves  <palves@redhat.com>
+
+	* cp-name-parser.y (conversion_op): Use
+	DEMANGLE_COMPONENT_CONVERSION instead of DEMANGLE_COMPONENT_CAST.
+
+2015-11-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (start_thread): Add cast.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/aarch64-linux-hw-point.c (aarch64_dr_state_remove_one_point):
+	Don't assert on alignment.
+	(aarch64_handle_breakpoint): Only check alignment when IS_INSERT
+	is true.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (is_hfa): Rename to ...
+	(is_hfa_or_hva): ... this.  Handle vector type.  All callers
+	updated.
+	(aarch64_extract_return_value): Update debugging message.
+	(aarch64_store_return_value): Likewise.
+	(aarch64_return_in_memory): Update comments.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_type_align): For vector type, return
+	its length, but with the maximum of 16 bytes.
+	(is_hfa): Return zero for vector type.
+	(aarch64_push_dummy_call): Handle short vectors.
+	(aarch64_extract_return_value): Likewise.
+	(aarch64_store_return_value): Likewise.
+
+2015-11-26  Daniel Colascione  <dancol@dancol.org>
+2015-11-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-nat.c (linux_nat_thread_name): Replace implementation by call
+	to linux_proc_tid_get_name.
+	* nat/linux-procfs.c (linux_proc_tid_get_name): New function,
+	implementation inspired by linux_nat_thread_name.
+	* nat/linux-procfs.h (linux_proc_tid_get_name): New declaration.
+	* remote.c (struct private_thread_info) <name>: New field.
+	(free_private_thread_info): Free name field.
+	(remote_thread_name): New function.
+	(thread_item_t) <name>: New field.
+	(clear_threads_listing_context): Free name field.
+	(start_thread): Get name xml attribute.
+	(thread_attributes): Add "name" attribute.
+	(remote_update_thread_list): Copy name field.
+	(init_remote_ops): Assign remote_thread_name callback.
+	* target.h (target_thread_name): Update comment.
+	* NEWS: Mention remote thread name support.
+
+2015-11-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-nat.c (linux_nat_thread_name): Constify return value.
+	* target.h (struct target_ops) <to_thread_name>: Likewise.
+	(target_thread_name): Likewise.
+	* target.c (target_thread_name): Likewise.
+	* target-delegates.c (debug_thread_name): Regenerate.
+	* python/py-infthread.c (thpy_get_name): Constify local variables.
+	* thread.c (print_thread_info): Likewise.
+	(thread_find_command): Likewise.
+
+2015-11-26  Markus Metzger  <markus.t.metzger@intel.com>
+
+	PR 19297
+	* btrace.c (btrace_enable): Check whether HAVE_LIBIPT is defined.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that a few "info" commands now list the
+	corresponding items in ascending ID order.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* printcmd.c (display_command): Append new display at the end of
+	the list.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+        * printcmd.c (display_command): Append new display at the end of
+        the list.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* inferior.c (add_inferior_silent): Append the new inferior to the
+	end of the list.
+	* progspace.c (add_program_space): Append the new pspace to the
+	end of the list.
+	* thread.c (new_thread): Append the new thread to the end of the
+	list.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	* linux-tdep.c (find_stop_signal): Delete.
+	(struct linux_corefile_thread_data) <pid>: Remove field.
+	(linux_corefile_thread_callback): Rename to ...
+	(linux_corefile_thread): ... this.  Now takes a struct
+	linux_corefile_thread_data pointer rather than a void pointer.
+	Remove thread state and thread pid checks.
+	(linux_make_corefile_notes): Prefer dumping the signalled thread
+	first.  Use ALL_NON_EXITED_THREADS instead of
+	iterate_over_threads.
+
+2015-11-23  Par Olsson  <par.olsson@windriver.com>
+
+	* breakpoint.c (tracepoint_print_recreate): Fix logic error
+	if -> else if.
+
+2015-11-23  Kevin Buettner  <kevinb@redhat.com>
+
+	* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Scan backwards
+	over all zero-sized symbols.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* stack.c (print_frame_local_vars): Temporarily set the selected
+	frame to FRAME while printing the frame's local variables.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue):
+	Increment PC in while loop skipping "pop reg" instructions.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* arm-tdep.c (arm_exidx_unwind_sniffer): Do not check for a frame
+	stuck on a system call if the given frame is the innermost frame.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2read.c (read_structure_type): Set the type's length
+	to zero if it has a DW_AT_byte_size attribute which is not
+	a constant.
+
+2015-11-23  Tristan Gingold  <gingold@adacore.com>
+
+	* darwin-nat.c (darwin_ptrace): Avoid a cast.
+	(darwin_resume_thread): Ditto.  And always set or reset
+	single step.
+
+2015-11-23  Tristan Gingold  <gingold@adacore.com>
+
+	* darwin-nat.c (darwin_read_dyld_info): Write address in
+	big-endian order.
+	* solib-darwin.c (darwin_validate_exec_header): New function,
+	extracted from...
+	(darwin_read_exec_load_addr_from_dyld): ...here.
+	(darwin_read_exec_load_addr_at_init): New function.
+	(darwin_solib_read_all_image_info_addr): Adjust after
+	darwin_read_dyld_info change.
+	(darwin_solib_create_inferior_hook): Support PIE.
+
+2015-11-23  Tristan Gingold  <gingold@adacore.com>
+
+	* darwin-nat.c (darwin_ptrace): Add a cast to fix warning.
+	(darwin_resume, cancel_breakpoint, _initialize_darwin_inferior):
+	Likewise.
+	(darwin_read_write_inferior): Rewrite using mach_vm_read_overwrite.
+
+2015-11-19  Don Breazeal  <donb@codesourcery.com>
+
+	* target.c (read_memory_robust): Call read_whatever_is_readable
+	with arguments in the correct order.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (remote_query_supported): Send the "xmlRegisters="
+	feature last.
+
+2015-11-19  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* nat/aarch64-linux-hw-point.c (aarch64_linux_set_debug_regs): Change
+	form of iov_len computation.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (ERROR_ON_WARNING): Don't check whether in C++
+	mode.
+	* configure: Regenerate.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Remove -fpermissive.
+	* configure: Regenerate.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (software_watchpoint_add_no_memory_location)
+	(is_no_memory_software_watchpoint): New functions.
+	(update_watchpoint): Use
+	software_watchpoint_add_memoryless_location.
+	(breakpoint_address_bits): Use is_no_memory_software_watchpoint.
+
+2015-11-19  Simon Marchi  <simon.marchi@ericsson.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* s390-linux-tdep.c (s390_canonicalize_syscall): Add casts and
+	intermediate 'int' variable.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (try_thread_db_load_1): Add cast.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (remote_unpush_target): Use
+	pop_all_targets_at_and_above instead of pop_all_targets_above.
+	* target.c (unpush_target_and_assert): New function, factored out
+	from ...
+	(pop_all_targets_above): ... here.
+	(pop_all_targets_at_and_above): New function.
+	* target.h (pop_all_targets_at_and_above): Declare.
+
+2015-11-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valops.c (value_string): Constify 'ptr' parameter.
+	* value.h (value_string): Constify 'ptr' parameter.
+
+2015-11-18  Simon Marchi  <simon.marchi@ericsson.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* break-catch-sig.c (signal_catchpoint_print_one): Add cast.
+	* c-exp.y (parse_string_or_char, yylex): Add casts.
+	* c-lang.c (evaluate_subexp_c): Add casts.
+	* d-exp.y (parse_string_or_char, yylex): Add casts.
+	* go-exp.y (parse_string_or_char, build_packaged_name): Add casts.
+	* p-valprint.c (pascal_object_print_value_fields): Add casts.
+	* valprint.c (generic_emit_char, generic_printstr): Add casts.
+
+2015-11-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valops.c (value_cstring): Constify 'ptr' parameter.
+	* value.h (value_cstring): Constify 'ptr' parameter.
+
+2015-11-18  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (pass_in_v): Add argument len.  Add local array
+	reg.  Callers updated.
+
+2015-11-17  Yao Qi  <yao.qi@linaro.org>
+
+	* infrun.c (resume): Check control.trap_expected only
+	when deciding the set of threads to resume.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* cp-namespace.c (cp_lookup_bare_symbol)
+	(cp_search_static_and_baseclasses, cp_lookup_symbol_via_imports)
+	(cp_lookup_symbol_via_all_imports, cp_lookup_nested_symbol_1)
+	(cp_lookup_nested_symbol): Use null_block_symbol.
+	* d-namespace.c (d_lookup_symbol, d_lookup_nested_symbol)
+	(d_lookup_symbol_imports, d_lookup_symbol_module): Use
+	null_block_symbol.
+	* symtab.c (null_block_symbol): New global.
+	* symtab.h (null_block_symbol): Declare.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.h (GDB_XCPT_SJMP, GDB_XCPT_TRY)
+	(GDB_XCPT_RAW_TRY, GDB_XCPT): Define.
+	Replace __cplusplus checks with GDB_XCPT checks throughout.
+	* common/common-exceptions.c: Replace __cplusplus checks with
+	GDB_XCPT checks throughout.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h (ATTRIBUTE_PRINTF): Redefine in terms of
+	_GL_ATTRIBUTE_FORMAT_PRINTF after including ansidecl.h.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h (__STDC_CONSTANT_MACROS)
+	(__STDC_LIMIT_MACROS): Define before including stdint.h.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (handle_exception): Return 0 for first chance
+	exceptions.
+	(get_windows_debug_event): Adjust.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (xslate): Use GDB_SIGNAL_UNKNOWN instead of -1 as
+	signal number for terminator.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* ser-tcp.c (net_open) : Cast getsockopt argument to char *
+	instead of void *.  Update comment.
+	(net_read_prim): Cast recv argument to char * instead of void *.
+	(net_write_prim): Cast send argument to char *.  Add comment.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* win32-i386-low.c (update_debug_registers_callback)
+	(win32_get_current_dr): Add cast.
+	* win32-low.c (thread_rec, delete_thread_info)
+	(continue_one_thread): Add casts.
+	(strwinerror): Cast FormatMessage argument to LPTSTR instead of
+	LPVOID.
+	(win32_create_inferior, suspend_one_thread): Add casts.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (AdjustTokenPrivileges_ftype)
+	(DebugActiveProcessStop_ftype, DebugBreakProcess_ftype)
+	(DebugSetProcessKillOnExit_ftype, EnumProcessModules_ftype)
+	(GetCurrentConsoleFont_ftype, GetModuleInformation_ftype)
+	(LookupPrivilegeValueA_ftype, OpenProcessToken_ftype)
+	(GetConsoleFontSize_ftype): New typedefs.
+	(AdjustTokenPrivileges, DebugActiveProcessStop)
+	(DebugBreakProcess, DebugSetProcessKillOnExit, EnumProcessModules)
+	(GetConsoleFontSize, GetCurrentConsoleFont, GetModuleInformation)
+	(LookupPrivilegeValueA, OpenProcessToken, GetConsoleFontSize):
+	Adjust.
+	(GetModuleFileNameEx_ftype): New typedef.
+	(GetModuleFileNameEx): Use it.
+	(_initialize_loadable): Define GPA macro and use it.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
+	HMODULE.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* exec.c (exec_file_attach, symfile_bfd_open) [__GO32__ || _WIN32
+	|| __CYGWIN__]: Add casts.
+	* utils.c (gdb_filename_fnmatch): Add cast.
+	* windows-nat.c (windows_create_inferior): Add cast.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* ser-mingw.c (CancelIo_ftype): New typedef.
+	(CancelIo): Use CancelIo_ftype.
+	(ser_windows_close, ser_windows_wait_handle)
+	(ser_windows_read_prim, stop_select_thread)
+	(console_select_thread, pipe_select_thread, file_select_thread)
+	(ser_console_wait_handle, ser_console_done_wait_handle)
+	(ser_console_close, cleanup_pipe_state, pipe_windows_close)
+	(pipe_windows_write, pipe_wait_handle, pipe_done_wait_handle)
+	(net_windows_socket_check_pending, net_windows_select_thread)
+	(net_windows_wait_handle, net_windows_done_wait_handle)
+	(net_windows_close): Add casts.
+	(_initialize_ser_windows): Cast to CancelIo_ftype* instead of
+	void*.
+
+2015-11-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-exp.y (exp): Adjust, change enum c_string_type to
+	c_string_type.
+	(parse_string_or_char): Likewise.
+	* c-lang.c (charset_for_string_type): Likewise.
+	(classify_type): Likewise.
+	(c_printchar): Likewise.
+	(c_printstr): Likewise.
+	(evaluate_subexp_c): Likewise.  And change cast to enum
+	c_string_type_values.
+	* c-lang.h: Include "common/enum_flags.h".
+	(enum c_string_type): Rename to...
+	(enum c_string_type_values): ...this.
+	(c_string_type): Define new enum flags type.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* btrace.h: Include common/enum-flags.h.
+	(btrace_insn_flags): Define.
+	(struct btrace_insn) <flags>: Change type.
+	(btrace_function_flags): Define.
+	(struct btrace_function) <flags>: Change type.
+	(btrace_thread_flags): Define.
+	(struct btrace_thread_info) <flags>: Change type.
+	* c-exp.y (token_flags): Rename to ...
+	(token_flag): ... this.
+	(token_flags): Define.
+	(struct token) <flags>: Change type.
+	* common/enum-flags.h: New file.
+	* compile/compile-c-types.c (convert_qualified): Change type of
+	'quals' local.
+	* compile/compile-internal.h: Include "common/enum-flags.h".
+	(gcc_qualifiers_flags): Define.
+	* completer.c (enum reg_completer_targets): Rename to ...
+	(enum reg_completer_target): ... this.
+	(reg_completer_targets): Define.
+	(reg_or_group_completer_1): Change type of 'targets' parameter.
+	* disasm.c (do_mixed_source_and_assembly_deprecated): Change type
+	of 'psl_flags' local.
+	(do_mixed_source_and_assembly): Change type of 'psl_flags' local.
+	* infrun.c: Include "common/enum-flags.h".
+	(enum step_over_what): Rename to ...
+	(enum step_over_what_flag): ... this.
+	(step_over_what): Change type.
+	(start_step_over): Change type of 'step_what' local.
+	(thread_still_needs_step_over): Now returns a step_over_what.
+	Adjust.
+	(keep_going_pass_signal): Change type of 'step_what' local.
+	* linux-tdep.c: Include "common/enum-flags.h".
+	(enum filterflags): Rename to ...
+	(enum filter_flag): ... this.
+	(filter_flags): Define.
+	(dump_mapping_p): Change type of 'filterflags' parameter.
+	(linux_find_memory_regions_full): Change type of 'filterflags'
+	local.
+	(linux_find_memory_regions_full): Pass the address of an unsigned
+	int to sscanf instead of the address of an enum.
+	* record-btrace.c (btrace_print_lines): Change type of local
+	'psl_flags'.
+	(btrace_call_history): Replace 'flags' parameter
+	with 'int_flags' parameter.  Adjust.
+	(record_btrace_call_history, record_btrace_call_history_range)
+	(record_btrace_call_history_from): Rename 'flags' parameter to
+	'int_flags'.  Use record_print_flags.
+	* record.h: Include "common/enum-flags.h".
+	(record_print_flags): Define.
+	* source.c: Include "common/enum-flags.h".
+	(print_source_lines_base, print_source_lines): Change type of
+	flags parameter.
+	* symtab.h: Include "common/enum-flags.h".
+	(enum print_source_lines_flags): Rename to ...
+	(enum print_source_lines_flag): ... this.
+	(print_source_lines_flags): Define.
+	(print_source_lines): Change prototype.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* guile/scm-disasm.c (gdbscm_disasm_read_memory): Return -1 on
+	error instead of TARGET_XFER_E_IO.
+	(gdbscm_disasm_memory_error): Always pass TARGET_XFER_E_IO to
+	memory_error.
+
+2015-11-17  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+	* hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend)
+	(prologue_inst_adjust_sp, hppa_frame_cache): Fix left shift of negative
+	value.
+	* dwarf2read.c (read_subrange_type): Likewise.
+
+2015-11-16  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_extract_return_value):  Change array
+	buf's length to V_REGISTER_SIZE.
+
+2015-11-16  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (pass_in_x_or_stack): Change argument type
+	from bfd_byte * to value *.  Caller updated.
+	(pass_in_x): Likewise.
+	(pass_in_v_or_stack): Likewise.
+	(pass_on_stack): Likewise.
+
+2015-11-16  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_push_dummy_call): Call value_contents
+	instead of value_contents_writeable.
+	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
+
+2015-11-16  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_push_dummy_call): New array buf.  Store regval
+	to buf.  Pass buf instead of val to push_stack_item.
+
+2015-11-13  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/19051
+	* arm-tdep.c (arm_type_align): Return the right alignment
+	value for vector.
+	(arm_vfp_cprc_sub_candidate): Return true for 64-bit and
+	128-bit vector types.
+	(arm_return_in_memory): Handel vector type.
+
+2015-11-13  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_return_in_memory): Rewrite it.
+	(arm_return_value): Call arm_return_in_memory for
+	TYPE_CODE_COMPLEX.
+
+2015-11-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (push_stack_item): Change contents type to
+	const gdb_byte *.
+
+2015-11-11  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* inf-ptrace.c (inf_ptrace_fetch_register): Change long int *
+	cast to PTRACE_TYPE_RET *.
+	(inf_ptrace_store_register): Likewise.
+
+2015-11-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* avr-tdep.c (_initialize_avr_tdep): Switch to 'add_info' for creating
+	info sub-commands.
+	* gnu-nat.c (add_task_commands): Likewise.
+	* macrocmd.c (_initialize_macrocmd): Likewise.
+
+2015-11-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-decode.c (add_info): Switch to class_info.
+
+2015-11-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_is_wrapper_field): Add special handling
+	for fields called "RETVAL".
+
+2015-11-09  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_exidx_new_objfile): Use
+	ELF_STRING_ARM_unwind.
+
+2015-11-09  Yao Qi  <yao.qi@linaro.org>
+
+	* infrun.c (displaced_step_in_progress_thread): New function.
+	(handle_inferior_event_1): Call it.
+
+2015-11-05  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_displaced_step_copy_insn): Call
+	aarch64_decode_insn and decode instruction by aarch64_inst.
+
+2015-11-05  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (extract_signed_bitfield): Remove.
+	(decode_masked_match): Remove.
+	(aarch64_decode_add_sub_imm): Remove.
+	(aarch64_decode_br): Remove.
+	(aarch64_decode_eret): Remove.
+	(aarch64_decode_movz): Remove.
+	(aarch64_decode_orr_shifted_register_x): Remove.
+	(aarch64_decode_ret): Remove.
+	(aarch64_decode_stp_offset): Remove.
+	(aarch64_decode_stur): Remove.
+	(aarch64_analyze_prologue): Call aarch64_decode_insn
+	and use aarch64_inst to decode instructions.
+
+2015-11-05  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_decode_stp_offset): New argument
+	wback.
+	(aarch64_decode_stp_offset_wb): Removed.
+	(aarch64_analyze_prologue): Don't use
+	aarch64_decode_stp_offset_wb.
+
+2015-11-04  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR/18376
+	* gdb/s390-linux-tdep.c (s390_is_partial_instruction): New function.
+	(s390_software_single_step): New function.
+	(s390_displaced_step_hw_singlestep): New function.
+	(s390_gdbarch_init): Fill gdbarch slots with the above.
+
+2015-11-04  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR/18376
+	* gdb/configure.tgt: Add linux-record.o to s390*-linux.
+	* gdb/s390-linux-tdep.c: #include "linux-record.h", "record-full.h"
+	(s390_linux_record_tdep): New static global variable.
+	(s390x_linux_record_tdep): New static global variable.
+	(s390_all_but_pc_registers_record): New function.
+	(s390_canonicalize_syscall): New function.
+	(s390_linux_syscall_record): New function.
+	(s390_linux_record_signal): New function.
+	(s390_record_calc_disp_common): New function.
+	(s390_record_calc_disp): New function.
+	(s390_record_calc_disp_vsce): New function.
+	(s390_record_calc_rl): New function.
+	(s390_record_gpr_g): New function.
+	(s390_record_gpr_h): New function.
+	(s390_record_vr): New function.
+	(s390_process_record): New function.
+	(s390_init_linux_record_tdep): New function.
+	(s390_gdbarch_init): Fill record function slots.
+
+2015-11-04  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* record-full.c (record_full_exec_insn): Use xmalloc for temporary
+	memory storage.
+
+2015-11-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record.c (get_insn_history_modifiers): Set DISASSEMBLY_SOURCE
+	instead of DISASSEMBLY_SOURCE_DEPRECATED.  Also accept /s.
+	(_initialize_record): Document the /s modifier.
+	* NEWS: Announce record instruction-history's new /s modifier.
+
+2015-11-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (struct btrace_line_range): New.
+	(btrace_mk_line_range, btrace_line_range_add)
+	(btrace_line_range_is_empty, btrace_line_range_contains_range)
+	(btrace_find_line_range, btrace_print_lines): New.
+	(btrace_insn_history): Add source interleaving algorithm.
+
+2015-11-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* disasm.h (DISASSEMBLY_SPECULATION): New.
+	(struct disasm_insn): New.
+	(gdb_pretty_print_insn): New.
+	* disasm.c (gdb_pretty_print_insn): Replace parameter PC with INSN.
+	Update users.  Print instruction number and indicate speculative
+	execution, if requested.
+
+2015-11-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* disasm.c (dump_insns): Split into this and ...
+	(gdb_pretty_print_insn): ... this.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* xtensa-linux-nat.c (supply_gregset_reg): Make static.
+	(xtensa_linux_fetch_inferior_registers): Likewise.
+	(xtensa_linux_store_inferior_registers): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* arm-linux-nat.c (arm_linux_read_description): Add cast.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
+	type of rw to enum target_hw_bp_type.
+	(ppc_linux_remove_mask_watchpoint): Likewise.
+	* target.c (target_insert_mask_watchpoint): Likewise.
+	(target_remove_mask_watchpoint): Likewise.
+	* target.h (target_insert_mask_watchpoint): Likewise.
+	(target_remove_mask_watchpoint): Likewise.
+	(struct target_ops) <to_insert_mask_watchpoint>: Likewise.
+	(struct target_ops) <to_remove_mask_watchpoint>: Likewise.
+	* target-delegates.c: Regenerate.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* remote-sim.c (check_for_duplicate_sim_descriptor): Add casts.
+	(get_sim_inferior_data): Likewise.
+	(sim_inferior_data_cleanup): Likewise.
+	(gdbsim_close_inferior): Likewise.
+	(gdbsim_resume_inferior): Likewise.
+	(gdbsim_wait): Likewise.
+	(simulator_command): Likewise.
+	(sim_command_completer): Likewise.
+
+2015-11-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* MAINTAINERS (Write After Approval): Add Marcin KoÅ›cielnicki.
+
+2015-10-30  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (breakpoint_in_range_p)
+	(breakpoint_location_address_range_overlap): New functions.
+	* breakpoint.h (breakpoint_in_range_p): New declaration.
+	* infrun.c (displaced_step_prepare_throw): If there's a breakpoint
+	in the scratch pad range, don't displaced step.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* amd64-linux-tdep.c (amd64_x32_linux_init_abi): Fix size_msghdr,
+	size_stack_t, size_size_t, size_iovec.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_termios.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_termios.
+	(amd64_x32_linux_init_abi): Fix size_termios.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Fix TASK_COMM_LEN.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-record.c (record_linux_system_call): Fix old_select.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-record.c (record_linux_system_call): Fix newstatat.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-record.c (record_linux_system_call): Fix [gs]etgroups16.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Add size_time_t.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Add size_time_t.
+	(amd64_x32_linux_init_abi): Add size_time_t.
+	* arm-linux-tdep.c (arm_linux_init_abi): Add size_time_t.
+	* i386-linux-tdep.c (i386_linux_init_abi): Add size_time_t.
+	* linux-record.c (record_linux_system_call): Add time, waitpid, pipe
+	handling.
+	* linux-record.h (struct linux_record_tdep): Add size_time_t.
+	* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Add size_time_t.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-record.c (record_linux_msghdr): Fix msg_namelen handling.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove
+	size_dirent{,64}, add size_old_dirent.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_dirent{,64},
+	add size_old_dirent.
+	(amd64_x32_linux_init_abi): Remove size_dirent{,64}, add
+	size_old_dirent.
+	* arm-linux-tdep.c (arm_linux_init_abi): Remove size_dirent{,64},
+	add size_old_dirent.
+	* i386-linux-tdep.c (i386_linux_init_abi): Remove size_dirent{,64},
+	add size_old_dirent.
+	* linux-record.c (record_linux_system_call): Fix handling of readdir
+	and getdents{,64}.
+	* linux-record.h (struct linux_record_tdep): Remove size_dirent{,64},
+	add size_old_dirent.
+	* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove
+	size_dirent{,64}, add size_old_dirent.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_sigaction,
+	size_sigset_t, size_old_sigaction, size_old_sigset_t.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_sigaction,
+	size_sigset_t, size_old_sigaction, size_old_sigset_t.
+	(amd64_x32_linux_init_abi): Fix size_sigaction, size_sigset_t,
+	size_old_sigaction, size_old_sigset_t.
+	* arm-linux-tdep.c (arm_linux_init_abi): Fix size_sigaction,
+	size_old_sigaction, size_old_sigset_t.
+	* i386-linux-tdep.c (i386_linux_init_abi): Fix size_sigaction,
+	size_old_sigaction, size_old_sigset_t.
+	* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Fix size_sigaction,
+	size_sigset_t, size_old_sigaction, size_old_sigset_t.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* arm-linux-tdep.c (arm_linux_init_abi): Fix size_[ug]id.
+	* i386-linux-tdep.c (i386_linux_init_abi): Fix size_[ug]id.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove size_siginfo.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_siginfo.
+	(amd64_x32_linux_init_abi): Remove size_siginfo.
+	* arm-linux-tdep.c (arm_linux_init_abi): Remove size_siginfo.
+	* i386-linux-tdep.c (i386_linux_init_abi): Remove size_siginfo.
+	* linux-record.c (record_linux_system_call): Change size_siginfo
+	to size_siginfo_t.
+	* linux-record.h (struct linux_record_tdep): Remove size_siginfo.
+	* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove size_siginfo.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* mdebugread.c (add_data_symbol): New function, factored out from
+	...
+	(parse_symbol): ... here.  Delete 'theclass' local.
+
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* jit.c (jit_target_read_impl): Add cast.
+
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* jit.c (jit_reader_load): Add cast.
+
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* dwarf2read.c (partial_die_full_name): Add cast.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* common/vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast.
+
+2015-10-29  Eli Zaretskii  <eliz@gnu.org>
+
+	* utils.c (init_page_info): Disable paging if INSIDE_EMACS is set
+	in the environment.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* gnu-v2-abi.c (gnuv2_is_destructor_name)
+	(gnuv2_is_constructor_name): Add casts.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c (exception_none): Add cast.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* compile/compile-c-types.c (struct type_map_instance)
+	<gcc_type>: Rename to gcc_type_handle.
+	(insert_type, convert_type): Adjust.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2-frame-tailcall.c (dwarf2_tailcall_sniffer_first): Don't
+	assume that "break" breaks out of a TRY/CATCH.
+	* python/py-framefilter.c (py_print_single_arg): Don't assume
+	"continue" breaks out of a TRY/CATCH.
+	* python/py-value.c (valpy_binop_throw): New function, factored
+	out from ...
+	(valpy_binop): ... this.
+	(valpy_richcompare_throw): New function, factored
+	out from ...
+	(valpy_richcompare): ... this.
+	* solib.c (solib_read_symbols): Don't assume "break" breaks out
+	of a TRY/CATCH.
+	* common/common-exceptions.h [USE_RAW_CXX_TRY]
+	<TRY/CATCH/END_CATCH>: Define as 1-1 wrappers around try/catch.
+
+2015-10-28  Simon Dardis  <Simon.Dardis@imgtec.com>
+
+	* mips-linux-tdep.c (mips_linux_in_dynsym_stub): Recognise 'or'
+	as move along with [d]addu.
+
+2015-10-28  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_software_single_step): Pass 1 to
+	aarch64_decode_insn.
+
+2015-10-27  Pedro Alves  <palves@redhat.com>
+
+	* common/print-utils.c (host_address_to_string): Rename to ...
+	(host_address_to_string_1): ... this.
+	* common/print-utils.h (host_address_to_string): Reimplement as
+	wrapper around host_address_to_string_1.
+	* utils.c (gdb_print_host_address): Rename to ...
+	(gdb_print_host_address_1): ... this.
+	* utils.h (gdb_print_host_address): Reimplement as wrapper macro
+	around	host_address_to_string_1.
+
+2015-10-27  Pedro Alves  <palves@redhat.com>
+
+	* alpha-tdep.c (alpha_read_insn): Always pass TARGET_XFER_E_IO to
+	memory_error.  Rename local 'status' to 'res'.
+	* c-lang.c (c_get_string): Always pass TARGET_XFER_E_IO to
+	memory_error.
+	* corefile.c (read_stack, read_code, write_memory): Always pass
+	TARGET_XFER_E_IO to memory_error.
+	* disasm.c (dis_asm_memory_error): Always pass TARGET_XFER_E_IO to
+	memory_error.  Rename parameter 'status' to 'err'.
+	(dump_insns): Rename local 'status' to 'err'.
+	* mips-tdep.c (mips_fetch_instruction): Rename parameter 'statusp'
+	to 'errp'.  Rename local 'status' to 'err'.  Always pass
+	TARGET_XFER_E_IO to memory_error.
+	(mips_breakpoint_from_pc): Rename local 'status' to 'err'.
+	* target.c (target_read_memory, target_read_raw_memory)
+	(target_read_stack, target_read_code, target_write_memory)
+	(target_write_raw_memory): Return -1 on error instead of
+	TARGET_XFER_E_IO.
+	* valprint.c (val_print_string): Rename local 'errcode' to 'err'.
+	Always pass TARGET_XFER_E_IO to memory_error.  Update comment.
+
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/guile-internal.h (gdbscm_with_guile): Change return
+	types to const char *.
+	* guile/scm-safe-call.c (gdbscm_with_guile): Likewise.
+	(struct c_data) <func>: Likewise.
+	(struct c_data) <result>: Change type to const char *.
+	(scscm_eval_scheme_string): Change return type to
+	const char *.
+	(scscm_source_scheme_script): Likewise.
+	(gdbscm_safe_eval_string): Change type of result variable to
+	const char * and remove cast.
+	(gdbscm_safe_source_script): Likewise.
+	* guile/scm-disasm.c (gdbscm_disasm_read_memory_worker):
+	Change return type to const char *.
+	(gdbscm_disasm_read_memory): Change type of status to
+	const char *.
+
+2015-10-27  Pedro Alves  <palves@redhat.com>
+
+	* source.c (openp): New local 'last_errno'.  Use it to
+	save/restore errno.
+
+2015-10-27  Pedro Alves  <palves@redhat.com>
+
+	* psymtab.c (dump_psymtab_addrmap_1): Add casts.
+
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ctf.c (SET_ENUM_FIELD): New macro.
+	(ctf_read_status): Use it.
+	(ctf_read_tp): Use it.
+
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/scm-breakpoint.c (gdbscm_set_breakpoint_stop_x): Add
+	scm_t_dynwind_flags casts.
+	* guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
+	* guile/scm-ports.c (gdbscm_open_memory): Likewise.
+	* guile/scm-value.c (gdbscm_value_to_string): Likewise.
+
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ax.h (ax_raw_byte): New declaration.
+	* ax-general.c (ax_raw_byte): New function.
+	(ax_simple): Use ax_raw_byte.
+	* ax-gdb.c (gen_printf): Likewise.
+
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ada-lang.h (GROW_VECT): Add cast.
+
+2015-10-26  Doug Evans  <xdje42@gmail.com>
+
+	* symtab.h (struct general_symbol_info> <ada_mangled>: Update comment.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* target.c (memory_xfer_partial): Change type of buf to gdb_byte
+	pointer.
+	(simple_search_memory): Cast return of memmem.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* stap-probe.c (handle_stap_probe): Add (const char *) casts.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ctf.c (ctf_xfer_partial): Return TARGET_XFER_E_IO instead of
+	-1 on error.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	PR symtab/17391
+	* dwarf2-frame.c (dwarf2_restore_rule): Call dwarf_reg_to_regnum
+	instead of gdbarch_dwarf2_reg_to_regnum.
+	(dwarf2_frame_cache): Ditto.
+	(read_addr_from_reg): Call dwarf_reg_to_regnum_or_error instead of
+	gdbarch_dwarf2_reg_to_regnum.
+	(get_reg_value): Ditto.
+	(dwarf2_fetch_cfa_info): Ditto.
+	(dwarf2_frame_prev_register): Ditto.
+	* dwarf2loc.c: #include "complaints.h".
+	(dwarf_expr_read_addr_from_reg): Call dwarf_reg_to_regnum_or_error
+	instead of gdbarch_dwarf2_reg_to_regnum.
+	(dwarf_expr_get_reg_value): Ditto.
+	(read_pieced_value): Ditto.
+	(write_pieced_value): Ditto.
+	(dwarf2_evaluate_loc_desc_full): Ditto.
+	(dwarf_reg_to_regnum): New function.
+	(throw_bad_regnum_error): New function.
+	(dwarf_reg_to_regnum_or_error): Renamed from
+	dwarf2_reg_to_regnum_or_errorChange to take a ULONGEST regnum.
+	All callers updated.  Call throw_bad_regnum_error.
+	(locexpr_regname): Improve text of bad register number.
+	* dwarf2loc.h (dwarf_reg_to_regnum): Declare.
+	(dwarf_reg_to_regnum_or_error): Update prototype.
+	* dwarf2expr.c: #include "dwarf2loc.h".
+	(dwarf_block_to_sp_offset): Call dwarf_reg_to_regnum instead of
+	gdbarch_dwarf2_reg_to_regnum.
+	* gdbarch.sh (dwarf2_reg_to_regnum): Add comment.
+	* gdbarch.h: Regenerate.
+	* amd64-tdep.c (amd64_dwarf_reg_to_regnum): Remove warning for bad
+	register.
+	* avr-tdep.c (avr_dwarf_reg_to_regnum): Ditto.
+	* cris-tdep.c (cris_dwarf2_reg_to_regnum): Ditto.
+	* bfin-tdep.c (bfin_reg_to_regnum): Fix error checking.
+	* hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Improve error checking.
+	Remove warning for bad register.
+	* hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Ditto.
+	* i386-tdep.c (i386_svr4_dwarf_reg_to_regnum): Renamed from
+	i386_svr4_reg_to_regnum.  Return -1 for bad registers.
+	(i386_svr4_reg_to_regnum): New function.
+	(i386_gdbarch_init): Update call to set_gdbarch_dwarf2_reg_to_regnum.
+	* microblaze-tdep.c (microblaze_dwarf2_reg_to_regnum): Don't assert
+	on bad registers, return -1.
+	* msp430-tdep.c (msp430_dwarf2_reg_to_regnum): Improve error checking.
+	Remove warning for bad register.
+	* nios2-tdep.c: Add static assert for NIOS2_NUM_REGS.
+	(nios2_dwarf_reg_to_regnum): Fix off-by-one error.
+	Remove warning for bad register.  Return -1 for bad register.
+	* rl78-tdep.c (rl78_dwarf_reg_to_regnum): Don't flag an internal error
+	for bad register, return -1.
+	* rx-tdep.c (rx_dwarf_reg_to_regnum): Ditto.
+	* m68k-tdep.c (m68k_dwarf_reg_to_regnum): Fix error result.
+	* mep-tdep.c (mep_debug_reg_to_regnum): Ditto.
+	* mips-tdep.c (mips_stab_reg_to_regnum): Ditto.
+	(mips_dwarf_dwarf2_ecoff_reg_to_regnum): Ditto.
+	* mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Remove warning
+	for bad regs.
+	* xtensa-tdep.c (xtensa_reg_to_regnum): Remove internal error for
+	bad regs.  Fix error result.
+	* stabsread.c (stab_reg_to_regnum): Watch for negative regno.
+	(reg_value_complaint): Update complaint text.
+	* mdebugread.c (reg_value_complaint): New function.
+	(mdebug_reg_to_regnum): Rewrite to watch for bad reg numbers.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	PR python/18938
+	* cli/cli-cmds (source_script_fron_sctream): New arg file_to_open.
+	All callers updated.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* psymtab.c (struct dump_psymtab_addrmap_data): Define.
+	(dump_psymtab_addrmap_1, dump_psymtab_addrmap): New functions.
+	(maintenance_print_psymbols): Print address map.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* common/gdb_wait.h (W_STOPCODE): Define, moved here from
+	gdbserver/linux-low.c.
+	(WSETSTOP): Simplify.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* linux-thread-db.c (find_new_threads_callback): Ditto.
+	(thread_db_pid_to_str): Ditto.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/scm-ports.c (ioscm_make_gdb_stdio_port): Do not pass a
+	local char array to scm_mode_bits, use a cast instead.
+
+2015-10-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* tui/tui-data.c (tui_alloc_content): Don't check xmalloc
+	result.  Change type of element_block_ptr.  Change allocation to
+	use XNEWVEC.
+
+2015-10-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* record-full.c (record_full_message_wrapper_safe): Pass empty string to
+	catch_errors call instead of NULL.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/scm-ports.c (ioscm_make_gdb_stdio_port): Pass non-const
+	char pointer to scm_mode_bits.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* symtab.c (default_make_symbol_completion_list_break_on_1): Add
+	cast.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/scm-ports.c (gdbscm_memory_port_write): Declare new
+	"data" local variable and use it.
+
+2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* guile/scm-symbol.c (gdbscm_lookup_global_symbol): Add
+	domain_enum cast.
+	(gdbscm_lookup_symbol): Likewise.
+
+2015-10-25  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-exp.y: Remove an obsolete comment and propagate the block
+	information to the produced expression.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* tui/tui-data.c (tui_add_to_source_windows): Remove void *
+	cast.
+	(tui_add_content_elements): Likewise.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* cli/cli-setshow.c (do_set_command): Constify p.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Replace
+	(void *) cast with (gdb_byte *).
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* proc-service.c (ps_pdread): Add cast.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* sparc64-tdep.c (sparc64_store_arguments): Split assignment of
+	valbuf.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ia64-tdep.c (ia64_pseudo_register_write): Remove cast.
+	(ia64_push_dummy_call): Remove cast and change type of "to" to
+	array of gdb_byte.
+
+2015-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-btrace.c (linux_enable_pt): Add cast to mmap return.
+
+2015-10-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* observer.h (observer_${event}_notification_stub): Add cast.
+
+2015-10-23  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_displaced_step_copy_insn): Set
+	dsd.insn_count to zero.
+
+2015-10-22  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (stop_after_trap): Delete.
+	(clear_proceed_status, handle_signal_stop, struct
+	infcall_control_state, save_infcall_control_state)
+	(restore_infcall_control_state): Remove references to
+	stop_after_trap.
+
+2015-10-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* python/python.c (_initialize_python): Add cast.
+
+2015-10-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* nto-tdep.c (nto_inferior_data): Add cast.
+
+2015-10-22  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (do_initial_windows_stuff): Rewrite loop using
+	windows_wait and windows_resume directly instead of
+	wait_for_inferior and resume.
+
+2015-10-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* xtensa-tdep.h (XTREG): Add casts.
+	(XTREG_END): Likewise.
+
+2015-10-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* solib-spu.c (spu_bfd_iovec_pread): Add (gdb_byte *) cast.
+
+2015-10-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* rs6000-tdep.c (variants): Add (enum bfd_architecture) cast.
+
+2015-10-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mips-linux-tdep.c (mips64_linux_get_longjmp_target): Change type of
+	buf to gdb_byte*.
+	(supply_32bit_reg): Add cast.
+	(mips64_fill_gregset): Likewise.
+
+2015-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	PR python/18073
+	* python/py-type.c (typy_get_composite): Allow returning a
+	function type.
+
+2015-10-21  Keven Boell  <keven.boell@intel.com>
+
+	* dwarf2read.c (set_die_type): Add read of
+	DW_AT_allocated and DW_AT_associated.
+	* f-typeprint.c: New include of typeprint.h
+	(f_print_type): Add check for allocated/associated
+	status of type.
+	(f_type_print_varspec_suffix): Add check for
+	* gdbtypes.c (create_array_type_with_stride):
+	Add check for valid data location of type in
+	case allocated or associated attributes are set.
+	Length of an array should be only calculated if
+	allocated or associated is resolved as true.
+	(is_dynamic_type_internal): Add check for allocated/
+	associated.
+	(resolve_dynamic_array): Evaluate allocated/associated
+	properties.
+	* gdbtypes.h (enum dynamic_prop_node_kind): <DYN_PROP_ALLOCATED>
+	<DYN_PROP_ASSOCIATED>: New enums.
+	(TYPE_ALLOCATED_PROP, TYPE_ASSOCIATED_PROP): New macros.
+	(type_not_allocated): New function.
+	(type_not_associated): New function.
+	* valarith.c (value_subscripted_rvalue): Add check for
+	allocated/associated.
+	* valprint.c: New include of typeprint.h.
+	(valprint_check_validity): Add check for allocated/associated.
+	(value_check_printable): Add check for allocated/
+	associated.
+	* typeprint.h (val_print_not_allocated): New function.
+	(val_print_not_associated): New function.
+	* typeprint.c (val_print_not_allocated): New function.
+	(val_print_not_associated): New function.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in: Add arm.c/o.
+	* arch/arm.c: New file.
+	* arch/arm.h: (IS_THUMB_ADDR): Move macro from arm-tdep.c.
+	(MAKE_THUMB_ADDR): Likewise.
+	(UNMAKE_THUMB_ADDR): Likewise.
+	* arm-tdep.c (int thumb_insn_size): Move to arm.c.
+	(IS_THUMB_ADDR): Move to arm.h.
+	(MAKE_THUMB_ADDR): Likewise.
+	(UNMAKE_THUMB_ADDR): Likewise.
+	* configure.tgt: Add arm.o to all ARM configs.
+
+2015-10-21  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
+	Remove argument exp_vCont_s.
+	* gdb.base/range-stepping.exp: Callers updated.
+	* gdb.trace/range-stepping.exp: Likewise.
+
+2015-10-21  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* gdb/nto-tdep.c (QNX_NOTE_NAME, QNX_INFO_SECT_NAME): New defines.
+	(nto_sniff_abi_note_section): New function.
+	(nto_elf_osabi_sniffer): Use new function to recognize nto specific
+	binary.
+
+2015-10-21  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* nto-procfs.c (procfs_wait): Set stopped_flags nad stopped_pc.
+	(procfs_stopped_by_watchpoint): Use flags stored in inferior data.
+	* nto-tdep.c (nto_new_inferior_data_reg): New definition.
+	(nto_new_inferior_data, nto_inferior_data_cleanup, nto_inferior_data):
+	New functions.
+	(_initialize_nto_tdep): New forward declaration, new function.
+	* nto-tdep.h (struct nto_inferior_data): New struct.
+	(nto_inferior_data): New function declaration.
+
+2015-10-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* findvar.c (address_from_register): Check REGNUM validity.
+
+2015-10-20  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* gdb/nto-procfs.c (procfs_pid_to_exec_file): New function.
+	(init_procfs_targets): Wire new function.
+
+2015-10-20  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* nto-procfs.c (sys/auxv.h): Include.
+	(procfs_xfer_partial): Implement TARGET_OBJECT_AUXV.
+	* nto-tdep.c (nto_read_auxv_from_initial_stack): New function.
+	* nto-tdep.h (nto_read_auxv_from_initial_stack): New declaration.
+
+2015-10-20  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* nto-procfs.c (nto_procfs_path): Rename to...
+	(nodestr): ... this, and change type.
+	(nto_node): Use new variable and logic accordingly.
+	(procfs_open_1): Use new variable name. Use local buffer to construct
+	procfrs path.
+	(procfs_pidlist): Use NODESTR to construct procfs path.
+	(procfs_files_info): Use NODESTR to output meaningful text.
+	(do_attach): Construct procfs using NODESTR.
+	(procfs_create_inferior): Compare pointer to NULL.
+
+2015-10-19  Josh Stone  <jistone@redhat.com>
+
+	* linux-nat.c (linux_handle_syscall_trap): Always update entry/
+	return state, even when not actively catching syscalls at all.
+	(linux_handle_extended_wait): Mark syscall_state like an entry.
+	(wait_lwp): Set syscall_state ignored for other traps.
+	(linux_nat_filter_event): Likewise.
+
+2015-10-19  Luis Machado  <lgustavo@codesourcery.com>
+
+	* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to 0
+	when handling 'E', 'T', 'S', 'X' and 'W' packets.
+	Do not set rs->waiting_for_stop_reply back to 1.
+
+2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* nto-procfs.c (common/filestuff.h): Include.
+	(procfs_can_use_hw_breakpoint): Fix enum name.
+	(procfs_open_1): Fix compiler warning.
+	(procfs_pidlist): Make static.
+	(procfs_meminfo): Make static, fix type name, add missing argument.
+	(procfs_store_registers): Make static.
+	(procfs_thread_info): Remove unused function.
+	(_initialize_procfs): Forward declare.
+
+2015-10-16  Yao Qi  <yao.qi@arm.com>
+
+	* MAINTAINERS: Update my email address.
+
+2015-10-15  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint):
+	Call gdbarch_breakpoint_from_pc to instruction length.
+	(aarch64_linux_remove_hw_breakpoint): Likewise.
+	* common/common-regcache.h (regcache_register_size): Declare.
+	* nat/aarch64-linux-hw-point.c: Include "common-regcache.h".
+	(aarch64_point_is_aligned): Set alignment to 2 for breakpoint if
+	the process is 32bit, otherwise set alignment to 4.
+	(aarch64_handle_breakpoint): Update comments.
+	* regcache.c (regcache_register_size): New function.
+
+2015-10-15  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* gdbarch.sh (core_regset_section): Remove.
+	* gdbarch.h: Regenerate.
+
+2015-10-14  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/aarch64-insn.h (struct aarch64_memory_operand): Move enum
+	out of it.
+	(enum aarch64_memory_operand_type): New.
+
+2015-10-13  David Edelsohn  <dje.gcc@gmail.com>
+
+	* xcoffread.c (dwarf2_xcoff_names): Add .dwmac and .dwpbtyp.
+
+2015-10-13  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_enum_name): Constify local.
+	* ada-typeprint.c (print_range_bound): Constify locals.
+	* c-varobj.c (c_describe_child): Likewise.
+	* cli/cli-setshow.c (do_set_command): Likewise.
+	* gdb_vecs.c (delim_string_to_char_ptr_vec_append): Likewise.
+	* dwarf2read.c (find_file_and_directory): Likewise.
+	(anonymous_struct_prefix, dwarf2_name): Likewise.
+	* gnu-v3-abi.c (gnuv3_rtti_type): Likewise.
+	* go-lang.c (unpack_mangled_go_symbol): Likewise.
+	* jv-typeprint.c (java_type_print_base): Likewise.
+	* ser-tcp.c (net_open): Likewise.
+	* symfile.c (deduce_language_from_filename): Likewise.
+	* symtab.c (gdb_mangle_name): Likewise.
+	* tui/tui-io.c (tui_redisplay_readline): Likewise.
+
+2015-10-13  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (restore_execution_direction): New function.
+	(fetch_inferior_event): Use it instead of
+	make_cleanup_restore_integer.
+	(execution_direction): Change type to enum
+	exec_direction_kind.
+	* infrun.h (execution_direction): Likewise.
+
+2015-10-13  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Constify
+	locals.  Use value_contents_writeable.  Remove casts.
+
+2015-10-13  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Add casts to malloc
+	and alloca calls.
+
+2015-10-13  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* lm32-tdep.c (lm32_push_dummy_call): Replace call to
+	write_memory with write_memory_unsigned_integer.
+
+2015-10-13  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* solib-dsbt.c (cmp_name): Constify arguments.
+	* solib-frv.c (cmp_name): Likewise.
+	* solib-svr4.c (svr4_create_solib_event_breakpoints): Likewise.
+	* solib.c (gdb_bfd_lookup_symbol_from_symtab): Likewise.
+	(bfd_lookup_symbol_from_dyn_symtab): Likewise.
+	(gdb_bfd_lookup_symbol): Likewise.
+	* solib.h (gdb_bfd_lookup_symbol): Likewise.
+	(gdb_bfd_lookup_symbol_from_symtab): Likewise.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* stack.c (parse_frame_specification): Remove message parameter,
+	replace with fixed string in function body, update function
+	comment.
+	(frame_info): Remove message to parse_frame_specification.
+	(select_frame_command): Likewise.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* stack.c (parse_frame_specification): Delete.
+	(parse_frame_specification_1): Rename to
+	parse_frame_specification.
+	(frame_info): Use parse_frame_specification.
+	(select_frame_command): Likewise.
+	(return_command): Use select_frame and print_stack_frame rather
+	than frame_command and select_frame_command.
+	(func_command): Use get_current_frame rather than
+	parse_frame_specification.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* stack.c (func_command): Return early when there is no ARG
+	string.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* stack.c: Include safe-ctype.h not ctype.h.
+	(parse_frame_specification): Use ISSPACE not isspace.
+	(backtrace_command): Use TOLOWER not tolower.
+
+2015-10-12  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mep-tdep.c (current_me_module): Add cast.
+	(mep_gdbarch_init): Likewise.
+
+2015-10-12  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* m32c-tdep.c (m32c_move_reg_t): Replace with...
+	(m32c_write_reg_t): ...this and...
+	(m32c_read_reg_t): ...this.
+	(struct m32c_reg): Update types of read and write.
+	(m32c_raw_read): Change declaration type to m32c_read_reg_t and
+	adjust definition.
+	(m32c_banked_read): Likewise.
+	(m32c_sb_read): Likewise.
+	(m32c_part_read): Likewise.
+	(m32c_cat_read): Likewise.
+	(m32c_r3r2r1r0_read): Likewise.
+	(m32c_raw_write): Change declaration type to m32c_write_reg_t
+	and adjust definition.
+	(m32c_banked_write): Likewise.
+	(m32c_sb_write): Likewise.
+	(m32c_part_write): Likewise.
+	(m32c_cat_write): Likewise.
+	(m32c_r3r2r1r0_write): Likewise.
+
+2015-10-12  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* aarch64-linux-tdep.c (aarch64_linux_syscall_record): Add cast.
+
+2015-10-12  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Return
+	gdb_sys_no_syscall instead of -1.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* NEWS: Mention the change.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/aarch64-insn.c (emit_load_store): Rename to ...
+	(aarch64_emit_load_store): ... it.  All callers updated.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/aarch64-insn.c (emit_insn): Rename to ...
+	(aarch64_emit_insn): ... it.  All callers updated.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-tdep.c: Include arch-utils.h.
+	(aarch64_linux_init_abi): Call set_gdbarch_max_insn_length,
+	set_gdbarch_displaced_step_copy_insn,
+	set_gdbarch_displaced_step_fixup,
+	set_gdbarch_displaced_step_free_closure,
+	set_gdbarch_displaced_step_location,
+	and set_gdbarch_displaced_step_hw_singlestep.
+	* aarch64-tdep.c (struct displaced_step_closure): New.
+	(struct aarch64_displaced_step_data): New.
+	(aarch64_displaced_step_b): New function.
+	(aarch64_displaced_step_b_cond): Likewise.
+	(aarch64_register): Likewise.
+	(aarch64_displaced_step_cb): Likewise.
+	(aarch64_displaced_step_tb): Likewise.
+	(aarch64_displaced_step_adr): Likewise.
+	(aarch64_displaced_step_ldr_literal): Likewise.
+	(aarch64_displaced_step_others): Likewise.
+	(aarch64_displaced_step_copy_insn): Likewise.
+	(aarch64_displaced_step_fixup): Likewise.
+	(aarch64_displaced_step_hw_singlestep): Likewise.
+	* aarch64-tdep.h (DISPLACED_MODIFIED_INSNS): New macro.
+	(aarch64_displaced_step_copy_insn): Declare.
+	(aarch64_displaced_step_fixup): Declare.
+	(aarch64_displaced_step_hw_singlestep): Declare.
+	* arch/aarch64-insn.c (emit_insn): Moved from
+	gdbserver/linux-aarch64-low.c.
+	(emit_load_store): Likewise.
+	* arch/aarch64-insn.h (enum aarch64_opcodes): Moved from
+	gdbserver/linux-aarch64-low.c.
+	(struct aarch64_register): Likewise.
+	(struct aarch64_memory_operand): Likewise.
+	(ENCODE): Likewise.
+	(can_encode_int32): New macro.
+	(emit_b, emit_bcond, emit_cb, emit_ldr, emit_ldrsw): Likewise.
+	(emit_tb, emit_nop): Likewise.
+	(emit_insn): Declare.
+	(emit_load_store): Declare.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/aarch64-insn.c (aarch64_decode_ldr_literal): Moved from
+	gdbserver/linux-aarch64-low.c.
+	(aarch64_relocate_instruction): Likewise.
+	* arch/aarch64-insn.h (aarch64_decode_ldr_literal): Declare.
+	(struct aarch64_insn_data): Moved from
+	gdbserver/linux-aarch64-low.c.
+	(struct aarch64_insn_visitor): Likewise.
+	(aarch64_relocate_instruction): Declare.
+
+2015-10-12  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT>: If
+	EVAL_AVOID_SIDE_EFFECTS mode, forward the VALUE_LVAL attribute
+	to the returned value.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_unpack_from_contents): Add guard that unpacked
+	is large enough for BIT_SIZE.  Update function comment.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Move
+	src_len variable to local block where used.  Override
+	BIT_SIZE if bigger than size of resolved type.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.h (is_scalar_type): Add extern declaration.
+	* gdbtypes.c (is_scalar_type): Make non-static.
+	* ada-lang.c (ada_value_primitive_packed_val): Use is_scalar_type
+	to compute IS_SCALAR instead of doing it ourselves.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Rework handling
+	of case where TYPE is dynamic.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_unpack_from_contents): New function,
+	extracted from ada_value_primitive_packed_val.
+	(ada_value_primitive_packed_val): Replace extracted out code
+	by call to ada_unpack_from_contents.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Reorder local
+	variable declarations.
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Change the type
+	of local variables src and unpacked to "gdb_type *" instead of
+	"unsigned char *".
+
+2015-10-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Make the name
+	of various local variables more explicit and consistent.
+	No real code change otherwise.
+
+2015-10-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* i386-tdep.h (struct gdbarch_tdep): Change type of
+	register_reggroup_p to gdbarch_register_reggroup_p_ftype.
+
+2015-10-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cris-tdep.c (struct instruction_environment): Change type of
+	byte_order to enum bfd_endian.
+
+2015-10-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-linux-tdep.c (arm_canonicalize_syscall): Add
+	enum gdb_syscall casts.
+
+2015-10-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* aarch64-tdep.c (stack_item_t): Change type of data to gdb_byte*.
+	* arm-tdep.c (struct stack_item): Likewise.
+	(push_stack_item): Add gdb_byte* cast.
+	* avr-tdep.c (struct stack_item): Change type of data to gdb_byte*.
+	(push_stack_item): Add gdb_byte* cast.
+	* cli/cli-dump.c (dump_memory_to_file): Change type of buf to gdb_byte*
+	and add cast.
+	* cris-tdep.c (struct stack_item): Change type of data to gdb_byte*.
+	(push_stack_item): Add gdb_byte* cast.
+	* gcore.c (gcore_copy_callback): Change type of memhunk to gdb_byte* and
+	add cast.
+	* gdbtypes.h (print_scalar_formatted): Change type of first parameter to
+	gdb_byte*.
+	* h8300-tdep.c (h8300_extract_return_value): Change type of valbuf to
+	gdb_byte* and remove unnecessary cast.
+	(h8300h_extract_return_value): Likewise.
+	(h8300_store_return_value): Change type of valbuf to gdb_byte*.
+	(h8300h_store_return_value): Likewise.
+	* iq2000-tdep.c (iq2000_extract_return_value): Change type of valbuf to
+	gdb_byte* and remove unnecessary cast.
+	* jit.c (jit_reader_try_read_symtab): Change type of gdb_mem to gdb_byte*
+	and add cast.
+	* m32r-tdep.c (m32r_store_return_value): Change type of valbuf to
+	gdb_byte* and remove unnecessary cast.
+	(m32r_extract_return_value): Change type of dst to gdb_byte* and remove
+	valbuf.
+	* mep-tdep.c (mep_pseudo_cr32_read): Change type of buf to gdb_byte*.
+	(mep_pseudo_cr64_read): Likewise.
+	(mep_pseudo_csr_write): Likewise.
+	(mep_pseudo_cr32_write): Likewise.
+	(mep_pseudo_cr64_write): Likewise.
+	* mi/mi-main.c (mi_cmd_data_write_memory): Change type of buffer to
+	gdb_byte* and add cast.
+	* moxie-tdep.c (moxie_store_return_value): Change type of valbuf to
+	gdb_byte* and remove unnecessary cast.
+	(moxie_extract_return_value): Change type of dst to gdb_byte* and remove
+	valbuf.
+	* p-valprint.c (print_scalar_formatted): Change type of valaddr to
+	gdb_byte*.
+	* printcmd.c (void): Likewise.
+	* python/py-inferior.c (infpy_read_memory): Change type of buffer to
+	gdb_byte* and add cast.
+	(infpy_write_memory): Likewise.
+	(infpy_search_memory): Likewise.
+	* regcache.c (regcache_raw_write_signed): Change type of buf to gdb_byte*
+	and add cast.
+	(regcache_raw_write_unsigned): Likewise.
+	(regcache_cooked_write_signed): Likewise.
+	(regcache_cooked_write_unsigned): Likewise.
+	* sh64-tdep.c (h64_extract_return_value): Change type of valbuf to
+	gdb_byte*.
+
+2015-10-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* fbsd-tdep.c (fbsd_collect_regset_section_cb): Add cast.
+	* linux-tdep.c (linux_collect_regset_section_cb_data): Likewise.
+
+2015-10-09  Eli Zaretskii  <eliz@gnu.org>
+
+	* stack.c (print_stack_frame):
+	* utils.c (printchar): Fix typos in commentary.
+
+2015-10-08  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-exp.y: (UnaryExpression): Support `type.sizeof' expressions.
+	(PostfixExpression): Support `expr.sizeof' expressions.
+	(PrimaryExpression): Support `typeof(expr)' expressions.
+
+2015-10-08  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* MAINTAINERS: Update my email address.
+
+2015-10-08  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_resume): Fix void return.
+
+2015-10-07  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c: Include opcode/aarch64.h.
+	(submask): Move it above.
+	(bit): Likewise.
+	(bits): Likewise.
+	(aarch64_software_single_step): Call aarch64_decode_insn.
+	Decode instruction by aarch64_inst instead of using
+	aarch64_decode_bcond and decode_masked_match.
+
+2015-10-06  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
+
+	* cli/cli-dump.c (restore_command): Parse load_offset (bias) as address
+	only when the file is binary.
+
+2015-10-02  James Bowman  <james.bowman@ftdichip.com>
+
+	* ft32-tdep.c (ft32_analyze_prologue): Add function prolog
+	subroutine handling.
+
+2015-10-01  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* common/vec.h (VEC_OP (T,cleanup)): Add pointer cast.
+
+2015-09-30  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (setup_type_unit_groups): Add comment.
+
+2015-09-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_nat_always_non_stop_p): Always return 1.
+	* x86-linux-nat.c (x86_linux_always_non_stop_p): Delete.
+	(x86_linux_create_target): Don't install
+	x86_linux_always_non_stop_p.
+
+2015-09-30  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (remote_parse_stop_reply): Call strprefix instead
+	of strncmp.
+
+2015-09-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
+	* gdbarch.h: Regenerate.
+	* i386-tdep.c (i386_gdbarch_init): Remove cast to
+	struct gdbarch_tdep_info *.
+	* mips-tdep.c (mips_gdbarch_init): Likewise.
+	* ppc-linux-tdep (ppu2spu_sniffer): Likewise.
+	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
+	* spu-multiarch.c (spu_gdbarch): Likewise.
+
+2015-09-30  Kevin Buettner  <kevinb@redhat.com>
+
+	* infcmd.c (finish_command_fsm_should_stop): Don't attempt to
+	record a NULL value.
+
+2015-09-29  Kevin Buettner  <kevinb@redhat.com>
+
+	* msp430-tdep.c (msp430_push_dummy_call): Treat reference, struct,
+	and union arguments the same as pointer arguments when determining
+	size of argument.
+
+2015-09-29  James Bowman  <james.bowman@ftdichip.com>
+
+	* ft32-tdep.c: #include "opcode/ft32.h".
+	Delete local macros IS_PUSH, PUSH_REG, IS_LINK, LINK_SIZE.
+	(ft32_analyze_prologue): Use FT32_* macros.
+
+2015-09-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cli/cli-script.c (read_next_line): Fix stdout -> stdin in
+	comment.
+
+2015-09-28  Doug Evans  <dje@google.com>
+
+	* MAINTAINERS: Add Iain Buclaw as D language maintainer.
+
+2015-09-28  Doug Evans  <dje@google.com>
+
+	* common/filestuff.c (make_cleanup_close): Update comment.
+
+2015-09-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* btrace.c (parse_xml_btrace_block): Fix cast of
+	xml_find_attribute's return value.
+	* memory-map.c (memory_map_start_memory): Likewise.
+	* solib-svr4.c (library_list_start_library): Likewise.
+	* solib-target.c (library_list_start_segment): Likewise.
+	(library_list_start_section): Likewise.
+	* tracepoint.c (traceframe_info_start_memory): Likewise.
+
+2015-09-26  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-namespace.c (d_lookup_symbol): New arg langdef.
+	All callers updated.  Support looking up symbol as a primitive type.
+	(lookup_module_scope): New arg langdef.  All callers updated.
+	Call d_lookup_symbol directly for simple bare symbols.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* macrocmd.c (print_macro_callback): Add cast(s).
+	* macrotab.c (macro_bcache_str): Likewise.
+	(new_macro_definition): Likewise.
+	* main.c (captured_main): Likewise.
+	* maint.c (print_bfd_section_info): Likewise.
+	* mdebugread.c (mdebug_build_psymtabs): Likewise.
+	(basic_type): Likewise.
+	* memattr.c (mem_region_cmp): Likewise.
+	* memory-map.c (memory_map_start_memory): Likewise.
+	(memory_map_end_memory): Likewise.
+	(memory_map_start_property): Likewise.
+	(memory_map_end_property): Likewise.
+	(clear_result): Likewise.
+	* memrange.c (compare_mem_ranges): Likewise.
+	* mep-tdep.c (mep_analyze_frame_prologue): Likewise.
+	* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise.
+	* mi/mi-console.c (mi_console_file_delete): Likewise.
+	(mi_console_file_fputs): Likewise.
+	(mi_console_raw_packet): Likewise.
+	(mi_console_file_flush): Likewise.
+	(mi_console_set_raw): Likewise.
+	* mi/mi-interp.c (mi_interpreter_resume): Likewise.
+	(mi_new_thread): Likewise.
+	(mi_thread_exit): Likewise.
+	(mi_record_changed): Likewise.
+	(mi_inferior_added): Likewise.
+	(mi_inferior_appeared): Likewise.
+	(mi_inferior_exit): Likewise.
+	(mi_inferior_removed): Likewise.
+	(mi_interp_data): Likewise.
+	(mi_on_normal_stop): Likewise.
+	(mi_traceframe_changed): Likewise.
+	(mi_tsv_created): Likewise.
+	(mi_tsv_deleted): Likewise.
+	(mi_tsv_modified): Likewise.
+	(mi_breakpoint_created): Likewise.
+	(mi_breakpoint_deleted): Likewise.
+	(mi_breakpoint_modified): Likewise.
+	(mi_output_running_pid): Likewise.
+	(mi_inferior_count): Likewise.
+	(mi_solib_loaded): Likewise.
+	(mi_solib_unloaded): Likewise.
+	(mi_command_param_changed): Likewise.
+	(mi_memory_changed): Likewise.
+	(report_initial_inferior): Likewise.
+	(mi_ui_out): Likewise.
+	(mi_set_logging): Likewise.
+	* mi/mi-main.c (collect_cores): Likewise.
+	(print_one_inferior): Likewise.
+	(free_vector_of_ints): Likewise.
+	(free_splay_tree): Likewise.
+	(mi_execute_command): Likewise.
+	* mi/mi-out.c (mi_table_body): Likewise.
+	(mi_table_end): Likewise.
+	(mi_table_header): Likewise.
+	(mi_begin): Likewise.
+	(mi_end): Likewise.
+	(mi_field_int): Likewise.
+	(mi_field_string): Likewise.
+	(mi_field_fmt): Likewise.
+	(mi_flush): Likewise.
+	(mi_redirect): Likewise.
+	(field_separator): Likewise.
+	(mi_open): Likewise.
+	(mi_close): Likewise.
+	(mi_out_buffered): Likewise.
+	(mi_out_rewind): Likewise.
+	(mi_out_put): Likewise.
+	(mi_version): Likewise.
+	(mi_out_data_dtor): Likewise.
+	* mi/mi-parse.c (mi_parse_cleanup): Likewise.
+	* microblaze-tdep.c (microblaze_frame_cache): Likewise.
+	* minidebug.c (lzma_open): Likewise.
+	(lzma_pread): Likewise.
+	(lzma_close): Likewise.
+	(lzma_stat): Likewise.
+	* mips-linux-tdep.c (mips_linux_init_abi): Likewise.
+	* mips-sde-tdep.c (mips_sde_frame_cache): Likewise.
+	(mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise.
+	* mips-tdep.c (mips_insn16_frame_cache): Likewise.
+	(mips_micro_frame_cache): Likewise.
+	(mips_insn32_frame_cache): Likewise.
+	(mips_stub_frame_cache): Likewise.
+	(gdb_print_insn_mips): Likewise.
+	(value_of_mips_user_reg): Likewise.
+	(mips_gdbarch_init): Likewise.
+	* mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise.
+	* mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
+	(mipsnbsd_supply_gregset): Likewise.
+	* mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise.
+	(am33_collect_gregset_method): Likewise.
+	(am33_collect_fpregset_method): Likewise.
+	* mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise.
+	* moxie-tdep.c (moxie_frame_cache): Likewise.
+	* msp430-tdep.c (msp430_get_opcode_byte): Likewise.
+	(msp430_analyze_frame_prologue): Likewise.
+	* mt-tdep.c (mt_frame_unwind_cache): Likewise.
+	* nios2-linux-tdep.c (nios2_supply_gregset): Likewise.
+	(nios2_collect_gregset): Likewise.
+	* nios2-tdep.c (nios2_frame_unwind_cache): Likewise.
+	(nios2_stub_frame_cache): Likewise.
+	* objc-lang.c (find_methods): Likewise.
+	* objfiles.c (objfiles_pspace_data_cleanup): Likewise.
+	(get_objfile_pspace_data): Likewise.
+	(get_objfile_bfd_data): Likewise.
+	(objfile_bfd_data_free): Likewise.
+	(add_to_objfile_sections): Likewise.
+	(do_free_objfile_cleanup): Likewise.
+	(resume_section_map_updates_cleanup): Likewise.
+	* opencl-lang.c (builtin_opencl_type): Likewise.
+	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise.
+	* osdata.c (osdata_start_osdata): Likewise.
+	(osdata_start_item): Likewise.
+	(osdata_start_column): Likewise.
+	(osdata_end_column): Likewise.
+	(clear_parsing_data): Likewise.
+	(osdata_free_cleanup): Likewise.
+	* parse.c (type_stack_cleanup): Likewise.
+	(exp_uses_objfile_iter): Likewise.
+	* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
+	(ppc_linux_collect_gregset): Likewise.
+	(ppu2spu_prev_arch): Likewise.
+	(ppu2spu_this_id): Likewise.
+	(ppu2spu_prev_register): Likewise.
+	(ppu2spu_unwind_register): Likewise.
+	(ppu2spu_sniffer): Likewise.
+	(ppu2spu_dealloc_cache): Likewise.
+	(ppc_linux_init_abi): Likewise.
+	* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
+	* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
+	* progspace.c (restore_program_space): Likewise.
+	* psymtab.c (find_pc_sect_psymtab): Likewise.
+	(compare_psymbols): Likewise.
+	(psymbol_bcache_full): Likewise.
+	(allocate_psymtab): Likewise.
+	(discard_psymtabs_upto): Likewise.
+	* python/py-block.c (set_block): Likewise.
+	(del_objfile_blocks): Likewise.
+	* python/py-breakpoint.c (build_bp_list): Likewise.
+	* python/py-inferior.c (inferior_to_inferior_object): Likewise.
+	(build_inferior_list): Likewise.
+	(py_free_inferior): Likewise.
+	* python/py-objfile.c (py_free_objfile): Likewise.
+	(objfile_to_objfile_object): Likewise.
+	* python/py-prettyprint.c (py_restore_tstate): Likewise.
+	* python/py-progspace.c (py_free_pspace): Likewise.
+	(pspace_to_pspace_object): Likewise.
+	* python/py-symbol.c (set_symbol): Likewise.
+	(del_objfile_symbols): Likewise.
+	* python/py-symtab.c (set_sal): Likewise.
+	(set_symtab): Likewise.
+	(del_objfile_symtab): Likewise.
+	(del_objfile_sal): Likewise.
+	* python/py-type.c (save_objfile_types): Likewise.
+	(set_type): Likewise.
+	* python/py-unwind.c (pyuw_prev_register): Likewise.
+	(pyuw_on_new_gdbarch): Likewise.
+	* python/py-utils.c (py_decref): Likewise.
+	(py_xdecref): Likewise.
+	(gdb_py_generic_dict): Likewise.
+	* python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise.
+	(gdbpy_clone_xmethod_worker_data): Likewise.
+	(gdbpy_get_xmethod_arg_types): Likewise.
+	(gdbpy_get_xmethod_result_type): Likewise.
+	(gdbpy_invoke_xmethod): Likewise.
+	* python/python.c (gdbpy_apply_type_printers): Likewise.
+	(gdbpy_free_type_printers): Likewise.
+	* record-btrace.c (record_btrace_disable_callback): Likewise.
+	(bfcache_hash): Likewise.
+	(bfcache_eq): Likewise.
+	(btrace_get_frame_function): Likewise.
+	(record_btrace_frame_unwind_stop_reason): Likewise.
+	(record_btrace_frame_this_id): Likewise.
+	(record_btrace_frame_prev_register): Likewise.
+	(record_btrace_frame_dealloc_cache): Likewise.
+	* record-full.c (record_full_message_wrapper): Likewise.
+	(record_full_save_cleanups): Likewise.
+	* regcache.c (regcache_descr): Likewise.
+	(do_regcache_xfree): Likewise.
+	(do_regcache_invalidate): Likewise.
+	(do_cooked_read): Likewise.
+	(regcache_transfer_regset): Likewise.
+	* reggroups.c (reggroup_add): Likewise.
+	(reggroup_next): Likewise.
+	(reggroup_prev): Likewise.
+	* remote-fileio.c (do_remote_fileio_request): Likewise.
+	* remote-notif.c (remote_async_get_pending_events_handler): Likewise.
+	(do_notif_event_xfree): Likewise.
+	* remote.c (get_remote_arch_state): Likewise.
+	(remote_pspace_data_cleanup): Likewise.
+	(get_remote_exec_file): Likewise.
+	(set_pspace_remote_exec_file): Likewise.
+	(compare_pnums): Likewise.
+	(clear_threads_listing_context): Likewise.
+	(remote_newthread_step): Likewise.
+	(start_thread): Likewise.
+	(end_thread): Likewise.
+	(remove_child_of_pending_fork): Likewise.
+	(remove_stop_reply_for_inferior): Likewise.
+	(remove_stop_reply_of_remote_state): Likewise.
+	(remote_notif_remove_once_on_match): Likewise.
+	(stop_reply_match_ptid_and_ws): Likewise.
+	(kill_child_of_pending_fork): Likewise.
+	(register_remote_g_packet_guess): Likewise.
+	(remote_read_description_p): Likewise.
+	(remote_read_description): Likewise.
+	(free_actions_list_cleanup_wrapper): Likewise.
+	(remote_async_serial_handler): Likewise.
+	* rl78-tdep.c (rl78_get_opcode_byte): Likewise.
+	(rl78_analyze_frame_prologue): Likewise.
+	* rs6000-tdep.c (ppc_supply_gregset): Likewise.
+	(ppc_supply_fpregset): Likewise.
+	(ppc_supply_vsxregset): Likewise.
+	(ppc_supply_vrregset): Likewise.
+	(ppc_collect_gregset): Likewise.
+	(ppc_collect_fpregset): Likewise.
+	(ppc_collect_vsxregset): Likewise.
+	(ppc_collect_vrregset): Likewise.
+	(e500_move_ev_register): Likewise.
+	(do_regcache_raw_write): Likewise.
+	(rs6000_frame_cache): Likewise.
+	(rs6000_epilogue_frame_cache): Likewise.
+	(rs6000_gdbarch_init): Likewise.
+	* rx-tdep.c (rx_get_opcode_byte): Likewise.
+	(rx_analyze_frame_prologue): Likewise.
+	(rx_frame_type): Likewise.
+	(rx_frame_sniffer_common): Likewise.
+	* s390-linux-tdep.c (s390_check_for_saved): Likewise.
+	(s390_frame_unwind_cache): Likewise.
+	(s390_stub_frame_unwind_cache): Likewise.
+	(s390_sigtramp_frame_unwind_cache): Likewise.
+	* score-tdep.c (score_make_prologue_cache): Likewise.
+	* sentinel-frame.c (sentinel_frame_prev_register): Likewise.
+	(sentinel_frame_prev_arch): Likewise.
+	* ser-base.c (fd_event): Likewise.
+	(push_event): Likewise.
+	(ser_base_write): Likewise.
+	* ser-pipe.c (pipe_close): Likewise.
+	* serial.c (serial_write): Likewise.
+	* sh-tdep.c (sh_frame_cache): Likewise.
+	(sh_stub_this_id): Likewise.
+	* sh64-tdep.c (sh64_frame_cache): Likewise.
+	* solib-aix.c (get_solib_aix_inferior_data): Likewise.
+	(library_list_start_library): Likewise.
+	(library_list_start_list): Likewise.
+	(solib_aix_free_library_list): Likewise.
+	* solib-darwin.c (get_darwin_info): Likewise.
+	* solib-dsbt.c (get_dsbt_info): Likewise.
+	* solib-spu.c (append_ocl_sos): Likewise.
+	* solib-svr4.c (svr4_pspace_data_cleanup): Likewise.
+	(get_svr4_info): Likewise.
+	(library_list_start_library): Likewise.
+	(svr4_library_list_start_list): Likewise.
+	(hash_probe_and_action): Likewise.
+	(equal_probe_and_action): Likewise.
+	(svr4_update_solib_event_breakpoint): Likewise.
+	(set_solib_svr4_fetch_link_map_offsets): Likewise.
+	(svr4_fetch_link_map_offsets): Likewise.
+	(svr4_have_link_map_offsets): Likewise.
+	* solib-target.c (library_list_start_segment): Likewise.
+	(library_list_start_section): Likewise.
+	(library_list_start_library): Likewise.
+	(library_list_end_library): Likewise.
+	(library_list_start_list): Likewise.
+	(solib_target_free_library_list): Likewise.
+	* solib.c (solib_ops): Likewise.
+	(set_solib_ops): Likewise.
+	* sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
+	* sparc-tdep.c (sparc_frame_cache): Likewise.
+	(sparc32_frame_cache): Likewise.
+	(sparc32_supply_gregset): Likewise.
+	(sparc32_collect_gregset): Likewise.
+	(sparc32_supply_fpregset): Likewise.
+	(sparc32_collect_fpregset): Likewise.
+	* sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
+	* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
+	(sparc64_collect_gregset): Likewise.
+	(sparc64_supply_fpregset): Likewise.
+	(sparc64_collect_fpregset): Likewise.
+	* sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise.
+	* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
+	* sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
+	(sparc64obsd_trapframe_cache): Likewise.
+	* sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise.
+	* sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
+	* spu-multiarch.c (spu_gdbarch): Likewise.
+	* spu-tdep.c (spu_frame_unwind_cache): Likewise.
+	(spu2ppu_prev_arch): Likewise.
+	(spu2ppu_this_id): Likewise.
+	(spu2ppu_prev_register): Likewise.
+	(spu2ppu_dealloc_cache): Likewise.
+	(spu_dis_asm_print_address): Likewise.
+	(gdb_print_insn_spu): Likewise.
+	(spu_get_overlay_table): Likewise.
+	* stabsread.c (rs6000_builtin_type): Likewise.
+	* stack.c (do_print_variable_and_value): Likewise.
+	* stap-probe.c (get_stap_base_address_1): Likewise.
+	* symfile-debug.c (debug_qf_has_symbols): Likewise.
+	(debug_qf_find_last_source_symtab): Likewise.
+	(debug_qf_forget_cached_source_info): Likewise.
+	(debug_qf_map_symtabs_matching_filename): Likewise.
+	(debug_qf_lookup_symbol): Likewise.
+	(debug_qf_print_stats): Likewise.
+	(debug_qf_dump): Likewise.
+	(debug_qf_relocate): Likewise.
+	(debug_qf_expand_symtabs_for_function): Likewise.
+	(debug_qf_expand_all_symtabs): Likewise.
+	(debug_qf_expand_symtabs_with_fullname): Likewise.
+	(debug_qf_map_matching_symbols): Likewise.
+	(debug_qf_expand_symtabs_matching): Likewise.
+	(debug_qf_find_pc_sect_compunit_symtab): Likewise.
+	(debug_qf_map_symbol_filenames): Likewise.
+	(debug_sym_get_probes): Likewise.
+	(debug_sym_new_init): Likewise.
+	(debug_sym_init): Likewise.
+	(debug_sym_read): Likewise.
+	(debug_sym_read_psymbols): Likewise.
+	(debug_sym_finish): Likewise.
+	(debug_sym_offsets): Likewise.
+	(debug_sym_read_linetable): Likewise.
+	(debug_sym_relocate): Likewise.
+	(uninstall_symfile_debug_logging): Likewise.
+	* symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise.
+	* symfile.c (place_section): Likewise.
+	(add_section_size_callback): Likewise.
+	(load_progress): Likewise.
+	(load_section_callback): Likewise.
+	(clear_memory_write_data): Likewise.
+	(allocate_symtab): Likewise.
+	* symmisc.c (maintenance_expand_file_matcher): Likewise.
+	* symtab.c (lookup_symtab_callback): Likewise.
+	(hash_demangled_name_entry): Likewise.
+	(eq_demangled_name_entry): Likewise.
+	(get_symbol_cache): Likewise.
+	(symbol_cache_cleanup): Likewise.
+	(set_symbol_cache_size): Likewise.
+	(symbol_cache_flush): Likewise.
+	(maintenance_print_symbol_cache): Likewise.
+	(maintenance_print_symbol_cache_statistics): Likewise.
+	(delete_filename_seen_cache): Likewise.
+	(output_partial_symbol_filename): Likewise.
+	(search_symbols_file_matches): Likewise.
+	(search_symbols_name_matches): Likewise.
+	(do_free_completion_list): Likewise.
+	(maybe_add_partial_symtab_filename): Likewise.
+	(get_main_info): Likewise.
+	(main_info_cleanup): Likewise.
+	* target-dcache.c (target_dcache_cleanup): Likewise.
+	(target_dcache_init_p): Likewise.
+	(target_dcache_invalidate): Likewise.
+	(target_dcache_get): Likewise.
+	(target_dcache_get_or_init): Likewise.
+	* target-descriptions.c (target_find_description): Likewise.
+	(tdesc_find_type): Likewise.
+	(tdesc_data_cleanup): Likewise.
+	(tdesc_find_arch_register): Likewise.
+	(tdesc_register_name): Likewise.
+	(tdesc_register_type): Likewise.
+	(tdesc_register_reggroup_p): Likewise.
+	(set_tdesc_pseudo_register_name): Likewise.
+	(set_tdesc_pseudo_register_type): Likewise.
+	(set_tdesc_pseudo_register_reggroup_p): Likewise.
+	(tdesc_use_registers): Likewise.
+	(free_target_description): Likewise.
+	* target-memory.c (compare_block_starting_address): Likewise.
+	(cleanup_request_data): Likewise.
+	(cleanup_write_requests_vector): Likewise.
+	* target.c (open_target): Likewise.
+	(cleanup_restore_target_terminal): Likewise.
+	(free_memory_read_result_vector): Likewise.
+	* thread.c (disable_thread_stack_temporaries): Likewise.
+	(finish_thread_state_cleanup): Likewise.
+	(do_restore_current_thread_cleanup): Likewise.
+	(restore_current_thread_cleanup_dtor): Likewise.
+	(set_thread_refcount): Likewise.
+	(tp_array_compar): Likewise.
+	(do_captured_thread_select): Likewise.
+	* tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise.
+	(tic6x_stub_this_id): Likewise.
+	* tilegx-tdep.c (tilegx_frame_cache): Likewise.
+	* top.c (do_restore_instream_cleanup): Likewise.
+	(gdb_readline_wrapper_cleanup): Likewise.
+	(kill_or_detach): Likewise.
+	(print_inferior_quit_action): Likewise.
+	* tracefile-tfile.c (match_blocktype): Likewise.
+	(build_traceframe_info): Likewise.
+	* tracefile.c (trace_file_writer_xfree): Likewise.
+	* tracepoint.c (memrange_cmp): Likewise.
+	(do_collect_symbol): Likewise.
+	(do_clear_collection_list): Likewise.
+	(do_restore_current_traceframe_cleanup): Likewise.
+	(restore_current_traceframe_cleanup_dtor): Likewise.
+	(free_current_marker): Likewise.
+	(traceframe_info_start_memory): Likewise.
+	(traceframe_info_start_tvar): Likewise.
+	(free_result): Likewise.
+	* tramp-frame.c (tramp_frame_cache): Likewise.
+	* tui/tui-file.c (tui_file_delete): Likewise.
+	(tui_fileopen): Likewise.
+	(tui_sfileopen): Likewise.
+	(tui_file_isatty): Likewise.
+	(tui_file_rewind): Likewise.
+	(tui_file_put): Likewise.
+	(tui_file_fputs): Likewise.
+	(tui_file_get_strbuf): Likewise.
+	(tui_file_adjust_strbuf): Likewise.
+	(tui_file_flush): Likewise.
+	* tui/tui-layout.c (make_command_window): Likewise.
+	(make_data_window): Likewise.
+	(show_source_disasm_command): Likewise.
+	(show_data): Likewise.
+	(make_source_or_disasm_window): Likewise.
+	(show_source_or_disasm_and_command): Likewise.
+	* tui/tui-out.c (tui_field_int): Likewise.
+	(tui_field_string): Likewise.
+	(tui_field_fmt): Likewise.
+	(tui_text): Likewise.
+	* typeprint.c (hash_typedef_field): Likewise.
+	(eq_typedef_field): Likewise.
+	(do_free_typedef_hash): Likewise.
+	(copy_typedef_hash_element): Likewise.
+	(do_free_global_table): Likewise.
+	(find_global_typedef): Likewise.
+	(find_typedef_in_hash): Likewise.
+	* ui-file.c (ui_file_write_for_put): Likewise.
+	(do_ui_file_xstrdup): Likewise.
+	(mem_file_delete): Likewise.
+	(mem_file_rewind): Likewise.
+	(mem_file_put): Likewise.
+	(mem_file_write): Likewise.
+	(stdio_file_delete): Likewise.
+	(stdio_file_flush): Likewise.
+	(stdio_file_read): Likewise.
+	(stdio_file_write): Likewise.
+	(stdio_file_write_async_safe): Likewise.
+	(stdio_file_fputs): Likewise.
+	(stdio_file_isatty): Likewise.
+	(stdio_file_fseek): Likewise.
+	(tee_file_delete): Likewise.
+	(tee_file_flush): Likewise.
+	(tee_file_write): Likewise.
+	(tee_file_fputs): Likewise.
+	(tee_file_isatty): Likewise.
+	* ui-out.c (do_cleanup_table_end): Likewise.
+	(do_cleanup_end): Likewise.
+	* user-regs.c (user_reg_add): Likewise.
+	(user_reg_map_name_to_regnum): Likewise.
+	(usernum_to_user_reg): Likewise.
+	(maintenance_print_user_registers): Likewise.
+	* utils.c (do_bfd_close_cleanup): Likewise.
+	(do_fclose_cleanup): Likewise.
+	(do_obstack_free): Likewise.
+	(do_ui_file_delete): Likewise.
+	(do_ui_out_redirect_pop): Likewise.
+	(do_free_section_addr_info): Likewise.
+	(restore_integer): Likewise.
+	(do_unpush_target): Likewise.
+	(do_htab_delete_cleanup): Likewise.
+	(do_restore_ui_file): Likewise.
+	(do_value_free): Likewise.
+	(do_free_so): Likewise.
+	(free_current_contents): Likewise.
+	(do_regfree_cleanup): Likewise.
+	(core_addr_hash): Likewise.
+	(core_addr_eq): Likewise.
+	(do_free_char_ptr_vec): Likewise.
+	* v850-tdep.c (v850_frame_cache): Likewise.
+	* varobj.c (do_free_variable_cleanup): Likewise.
+	* vax-tdep.c (vax_supply_gregset): Likewise.
+	(vax_frame_cache): Likewise.
+	* vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise.
+	* xml-support.c (gdb_xml_body_text): Likewise.
+	(gdb_xml_values_cleanup): Likewise.
+	(gdb_xml_start_element): Likewise.
+	(gdb_xml_start_element_wrapper): Likewise.
+	(gdb_xml_end_element): Likewise.
+	(gdb_xml_end_element_wrapper): Likewise.
+	(gdb_xml_cleanup): Likewise.
+	(gdb_xml_fetch_external_entity): Likewise.
+	(gdb_xml_parse_attr_enum): Likewise.
+	(xinclude_start_include): Likewise.
+	(xinclude_end_include): Likewise.
+	(xml_xinclude_default): Likewise.
+	(xml_xinclude_start_doctype): Likewise.
+	(xml_xinclude_end_doctype): Likewise.
+	(xml_xinclude_cleanup): Likewise.
+	(xml_fetch_content_from_file): Likewise.
+	* xml-syscall.c (free_syscalls_info): Likewise.
+	(syscall_start_syscall): Likewise.
+	* xml-tdesc.c (tdesc_end_arch): Likewise.
+	(tdesc_end_osabi): Likewise.
+	(tdesc_end_compatible): Likewise.
+	(tdesc_start_target): Likewise.
+	(tdesc_start_feature): Likewise.
+	(tdesc_start_reg): Likewise.
+	(tdesc_start_union): Likewise.
+	(tdesc_start_struct): Likewise.
+	(tdesc_start_flags): Likewise.
+	(tdesc_start_field): Likewise.
+	(tdesc_start_vector): Likewise.
+	(fetch_available_features_from_target): Likewise.
+	* xstormy16-tdep.c (xstormy16_frame_cache): Likewise.
+	* xtensa-tdep.c (xtensa_supply_gregset): Likewise.
+	(xtensa_frame_cache): Likewise.
+	(xtensa_frame_prev_register): Likewise.
+	(xtensa_extract_return_value): Likewise.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* aarch64-tdep.c (aarch64_make_prologue_cache): Add cast(s).
+	(aarch64_make_stub_cache): Likewise.
+	(value_of_aarch64_user_reg): Likewise.
+	* ada-lang.c (ada_inferior_data_cleanup): Likewise.
+	(get_ada_inferior_data): Likewise.
+	(get_ada_pspace_data): Likewise.
+	(ada_pspace_data_cleanup): Likewise.
+	(ada_complete_symbol_matcher): Likewise.
+	(ada_exc_search_name_matches): Likewise.
+	* ada-tasks.c (get_ada_tasks_pspace_data): Likewise.
+	(get_ada_tasks_inferior_data): Likewise.
+	* addrmap.c (addrmap_mutable_foreach_worker): Likewise.
+	(splay_obstack_alloc): Likewise.
+	(splay_obstack_free): Likewise.
+	* alpha-linux-tdep.c (alpha_linux_supply_gregset): Likewise.
+	(alpha_linux_collect_gregset): Likewise.
+	(alpha_linux_supply_fpregset): Likewise.
+	(alpha_linux_collect_fpregset): Likewise.
+	* alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Likewise.
+	* alpha-tdep.c (alpha_lds): Likewise.
+	(alpha_sts): Likewise.
+	(alpha_sigtramp_frame_unwind_cache): Likewise.
+	(alpha_heuristic_frame_unwind_cache): Likewise.
+	(alpha_supply_int_regs): Likewise.
+	(alpha_fill_int_regs): Likewise.
+	(alpha_supply_fp_regs): Likewise.
+	(alpha_fill_fp_regs): Likewise.
+	* alphanbsd-tdep.c (alphanbsd_supply_fpregset): Likewise.
+	(alphanbsd_aout_supply_gregset): Likewise.
+	(alphanbsd_supply_gregset): Likewise.
+	* amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
+	(amd64_x32_linux_init_abi): Likewise.
+	* amd64-nat.c (amd64_supply_native_gregset): Likewise.
+	(amd64_collect_native_gregset): Likewise.
+	* amd64-tdep.c (amd64_frame_cache): Likewise.
+	(amd64_sigtramp_frame_cache): Likewise.
+	(amd64_epilogue_frame_cache): Likewise.
+	(amd64_supply_fxsave): Likewise.
+	(amd64_supply_xsave): Likewise.
+	(amd64_collect_fxsave): Likewise.
+	(amd64_collect_xsave): Likewise.
+	* amd64-windows-tdep.c (amd64_windows_frame_cache): Likewise.
+	* amd64obsd-tdep.c (amd64obsd_trapframe_cache): Likewise.
+	* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
+	(arm_linux_collect_gregset): Likewise.
+	(arm_linux_supply_nwfpe): Likewise.
+	(arm_linux_collect_nwfpe): Likewise.
+	(arm_linux_supply_vfp): Likewise.
+	(arm_linux_collect_vfp): Likewise.
+	* arm-tdep.c (arm_find_mapping_symbol): Likewise.
+	(arm_prologue_unwind_stop_reason): Likewise.
+	(arm_prologue_this_id): Likewise.
+	(arm_prologue_prev_register): Likewise.
+	(arm_exidx_data_free): Likewise.
+	(arm_find_exidx_entry): Likewise.
+	(arm_stub_this_id): Likewise.
+	(arm_m_exception_this_id): Likewise.
+	(arm_m_exception_prev_register): Likewise.
+	(arm_normal_frame_base): Likewise.
+	(gdb_print_insn_arm): Likewise.
+	(arm_objfile_data_free): Likewise.
+	(arm_record_special_symbol): Likewise.
+	(value_of_arm_user_reg): Likewise.
+	* armbsd-tdep.c (armbsd_supply_fpregset): Likewise.
+	(armbsd_supply_gregset): Likewise.
+	* auto-load.c (auto_load_pspace_data_cleanup): Likewise.
+	(get_auto_load_pspace_data): Likewise.
+	(hash_loaded_script_entry): Likewise.
+	(eq_loaded_script_entry): Likewise.
+	(clear_section_scripts): Likewise.
+	(collect_matching_scripts): Likewise.
+	* auxv.c (auxv_inferior_data_cleanup): Likewise.
+	(get_auxv_inferior_data): Likewise.
+	* avr-tdep.c (avr_frame_unwind_cache): Likewise.
+	* ax-general.c (do_free_agent_expr_cleanup): Likewise.
+	* bfd-target.c (target_bfd_xfer_partial): Likewise.
+	(target_bfd_xclose): Likewise.
+	(target_bfd_get_section_table): Likewise.
+	* bfin-tdep.c (bfin_frame_cache): Likewise.
+	* block.c (find_block_in_blockvector): Likewise.
+	(call_site_for_pc): Likewise.
+	(block_find_non_opaque_type_preferred): Likewise.
+	* break-catch-sig.c (signal_catchpoint_insert_location): Likewise.
+	(signal_catchpoint_remove_location): Likewise.
+	(signal_catchpoint_breakpoint_hit): Likewise.
+	(signal_catchpoint_print_one): Likewise.
+	(signal_catchpoint_print_mention): Likewise.
+	(signal_catchpoint_print_recreate): Likewise.
+	* break-catch-syscall.c (get_catch_syscall_inferior_data): Likewise.
+	* breakpoint.c (do_cleanup_counted_command_line): Likewise.
+	(bp_location_compare_addrs): Likewise.
+	(get_first_locp_gte_addr): Likewise.
+	(check_tracepoint_command): Likewise.
+	(do_map_commands_command): Likewise.
+	(get_breakpoint_objfile_data): Likewise.
+	(free_breakpoint_probes): Likewise.
+	(do_captured_breakpoint_query): Likewise.
+	(compare_breakpoints): Likewise.
+	(bp_location_compare): Likewise.
+	(bpstat_remove_breakpoint_callback): Likewise.
+	(do_delete_breakpoint_cleanup): Likewise.
+	* bsd-uthread.c (bsd_uthread_set_supply_uthread): Likewise.
+	(bsd_uthread_set_collect_uthread): Likewise.
+	(bsd_uthread_activate): Likewise.
+	(bsd_uthread_fetch_registers): Likewise.
+	(bsd_uthread_store_registers): Likewise.
+	* btrace.c (check_xml_btrace_version): Likewise.
+	(parse_xml_btrace_block): Likewise.
+	(parse_xml_btrace_pt_config_cpu): Likewise.
+	(parse_xml_btrace_pt_raw): Likewise.
+	(parse_xml_btrace_pt): Likewise.
+	(parse_xml_btrace_conf_bts): Likewise.
+	(parse_xml_btrace_conf_pt): Likewise.
+	(do_btrace_data_cleanup): Likewise.
+	* c-typeprint.c (find_typedef_for_canonicalize): Likewise.
+	* charset.c (cleanup_iconv): Likewise.
+	(do_cleanup_iterator): Likewise.
+	* cli-out.c (cli_uiout_dtor): Likewise.
+	(cli_table_begin): Likewise.
+	(cli_table_body): Likewise.
+	(cli_table_end): Likewise.
+	(cli_table_header): Likewise.
+	(cli_begin): Likewise.
+	(cli_end): Likewise.
+	(cli_field_int): Likewise.
+	(cli_field_skip): Likewise.
+	(cli_field_string): Likewise.
+	(cli_field_fmt): Likewise.
+	(cli_spaces): Likewise.
+	(cli_text): Likewise.
+	(cli_message): Likewise.
+	(cli_wrap_hint): Likewise.
+	(cli_flush): Likewise.
+	(cli_redirect): Likewise.
+	(out_field_fmt): Likewise.
+	(field_separator): Likewise.
+	(cli_out_set_stream): Likewise.
+	* cli/cli-cmds.c (compare_symtabs): Likewise.
+	* cli/cli-dump.c (call_dump_func): Likewise.
+	(restore_section_callback): Likewise.
+	* cli/cli-script.c (clear_hook_in_cleanup): Likewise.
+	(do_restore_user_call_depth): Likewise.
+	(do_free_command_lines_cleanup): Likewise.
+	* coff-pe-read.c (get_section_vmas): Likewise.
+	(pe_as16): Likewise.
+	(pe_as32): Likewise.
+	* coffread.c (coff_symfile_read): Likewise.
+	* common/agent.c (agent_look_up_symbols): Likewise.
+	* common/filestuff.c (do_close_cleanup): Likewise.
+	* common/format.c (free_format_pieces_cleanup): Likewise.
+	* common/vec.c (vec_o_reserve): Likewise.
+	* compile/compile-c-support.c (print_one_macro): Likewise.
+	* compile/compile-c-symbols.c (hash_symbol_error): Likewise.
+	(eq_symbol_error): Likewise.
+	(del_symbol_error): Likewise.
+	(error_symbol_once): Likewise.
+	(gcc_convert_symbol): Likewise.
+	(gcc_symbol_address): Likewise.
+	(hash_symname): Likewise.
+	(eq_symname): Likewise.
+	* compile/compile-c-types.c (hash_type_map_instance): Likewise.
+	(eq_type_map_instance): Likewise.
+	(insert_type): Likewise.
+	(convert_type): Likewise.
+	* compile/compile-object-load.c (munmap_listp_free_cleanup): Likewise.
+	(setup_sections): Likewise.
+	(link_hash_table_free): Likewise.
+	(copy_sections): Likewise.
+	* compile/compile-object-run.c (do_module_cleanup): Likewise.
+	* compile/compile.c (compile_print_value): Likewise.
+	(do_rmdir): Likewise.
+	(cleanup_compile_instance): Likewise.
+	(cleanup_unlink_file): Likewise.
+	* completer.c (free_completion_tracker): Likewise.
+	* corelow.c (add_to_spuid_list): Likewise.
+	* cp-namespace.c (reset_directive_searched): Likewise.
+	* cp-support.c (reset_directive_searched): Likewise.
+	* cris-tdep.c (cris_sigtramp_frame_unwind_cache): Likewise.
+	(cris_frame_unwind_cache): Likewise.
+	* d-lang.c (builtin_d_type): Likewise.
+	* d-namespace.c (reset_directive_searched): Likewise.
+	* dbxread.c (dbx_free_symfile_info): Likewise.
+	(do_free_bincl_list_cleanup): Likewise.
+	* disasm.c (hash_dis_line_entry): Likewise.
+	(eq_dis_line_entry): Likewise.
+	(dis_asm_print_address): Likewise.
+	(fprintf_disasm): Likewise.
+	(do_ui_file_delete): Likewise.
+	* doublest.c (convert_floatformat_to_doublest): Likewise.
+	* dummy-frame.c (pop_dummy_frame_bpt): Likewise.
+	(dummy_frame_prev_register): Likewise.
+	(dummy_frame_this_id): Likewise.
+	* dwarf2-frame-tailcall.c (cache_hash): Likewise.
+	(cache_eq): Likewise.
+	(cache_find): Likewise.
+	(tailcall_frame_this_id): Likewise.
+	(dwarf2_tailcall_prev_register_first): Likewise.
+	(tailcall_frame_prev_register): Likewise.
+	(tailcall_frame_dealloc_cache): Likewise.
+	(tailcall_frame_prev_arch): Likewise.
+	* dwarf2-frame.c (dwarf2_frame_state_free): Likewise.
+	(dwarf2_frame_set_init_reg): Likewise.
+	(dwarf2_frame_init_reg): Likewise.
+	(dwarf2_frame_set_signal_frame_p): Likewise.
+	(dwarf2_frame_signal_frame_p): Likewise.
+	(dwarf2_frame_set_adjust_regnum): Likewise.
+	(dwarf2_frame_adjust_regnum): Likewise.
+	(clear_pointer_cleanup): Likewise.
+	(dwarf2_frame_cache): Likewise.
+	(find_cie): Likewise.
+	(dwarf2_frame_find_fde): Likewise.
+	* dwarf2expr.c (dwarf_expr_address_type): Likewise.
+	(free_dwarf_expr_context_cleanup): Likewise.
+	* dwarf2loc.c (locexpr_find_frame_base_location): Likewise.
+	(locexpr_get_frame_base): Likewise.
+	(loclist_find_frame_base_location): Likewise.
+	(loclist_get_frame_base): Likewise.
+	(dwarf_expr_dwarf_call): Likewise.
+	(dwarf_expr_get_base_type): Likewise.
+	(dwarf_expr_push_dwarf_reg_entry_value): Likewise.
+	(dwarf_expr_get_obj_addr): Likewise.
+	(entry_data_value_coerce_ref): Likewise.
+	(entry_data_value_copy_closure): Likewise.
+	(entry_data_value_free_closure): Likewise.
+	(get_frame_address_in_block_wrapper): Likewise.
+	(dwarf2_evaluate_property): Likewise.
+	(dwarf2_compile_property_to_c): Likewise.
+	(needs_frame_read_addr_from_reg): Likewise.
+	(needs_frame_get_reg_value): Likewise.
+	(needs_frame_frame_base): Likewise.
+	(needs_frame_frame_cfa): Likewise.
+	(needs_frame_tls_address): Likewise.
+	(needs_frame_dwarf_call): Likewise.
+	(needs_dwarf_reg_entry_value): Likewise.
+	(get_ax_pc): Likewise.
+	(locexpr_read_variable): Likewise.
+	(locexpr_read_variable_at_entry): Likewise.
+	(locexpr_read_needs_frame): Likewise.
+	(locexpr_describe_location): Likewise.
+	(locexpr_tracepoint_var_ref): Likewise.
+	(locexpr_generate_c_location): Likewise.
+	(loclist_read_variable): Likewise.
+	(loclist_read_variable_at_entry): Likewise.
+	(loclist_describe_location): Likewise.
+	(loclist_tracepoint_var_ref): Likewise.
+	(loclist_generate_c_location): Likewise.
+	* dwarf2read.c (line_header_hash_voidp): Likewise.
+	(line_header_eq_voidp): Likewise.
+	(dwarf2_has_info): Likewise.
+	(dwarf2_get_section_info): Likewise.
+	(locate_dwz_sections): Likewise.
+	(hash_file_name_entry): Likewise.
+	(eq_file_name_entry): Likewise.
+	(delete_file_name_entry): Likewise.
+	(dw2_setup): Likewise.
+	(dw2_get_file_names_reader): Likewise.
+	(dw2_find_pc_sect_compunit_symtab): Likewise.
+	(hash_signatured_type): Likewise.
+	(eq_signatured_type): Likewise.
+	(add_signatured_type_cu_to_table): Likewise.
+	(create_debug_types_hash_table): Likewise.
+	(lookup_dwo_signatured_type): Likewise.
+	(lookup_dwp_signatured_type): Likewise.
+	(lookup_signatured_type): Likewise.
+	(hash_type_unit_group): Likewise.
+	(eq_type_unit_group): Likewise.
+	(get_type_unit_group): Likewise.
+	(process_psymtab_comp_unit_reader): Likewise.
+	(sort_tu_by_abbrev_offset): Likewise.
+	(process_skeletonless_type_unit): Likewise.
+	(psymtabs_addrmap_cleanup): Likewise.
+	(dwarf2_read_symtab): Likewise.
+	(psymtab_to_symtab_1): Likewise.
+	(die_hash): Likewise.
+	(die_eq): Likewise.
+	(load_full_comp_unit_reader): Likewise.
+	(reset_die_in_process): Likewise.
+	(free_cu_line_header): Likewise.
+	(handle_DW_AT_stmt_list): Likewise.
+	(hash_dwo_file): Likewise.
+	(eq_dwo_file): Likewise.
+	(hash_dwo_unit): Likewise.
+	(eq_dwo_unit): Likewise.
+	(create_dwo_cu_reader): Likewise.
+	(create_dwo_unit_in_dwp_v1): Likewise.
+	(create_dwo_unit_in_dwp_v2): Likewise.
+	(lookup_dwo_unit_in_dwp): Likewise.
+	(dwarf2_locate_dwo_sections): Likewise.
+	(dwarf2_locate_common_dwp_sections): Likewise.
+	(dwarf2_locate_v2_dwp_sections): Likewise.
+	(hash_dwp_loaded_cutus): Likewise.
+	(eq_dwp_loaded_cutus): Likewise.
+	(lookup_dwo_cutu): Likewise.
+	(abbrev_table_free_cleanup): Likewise.
+	(dwarf2_free_abbrev_table): Likewise.
+	(find_partial_die_in_comp_unit): Likewise.
+	(free_line_header_voidp): Likewise.
+	(follow_die_offset): Likewise.
+	(follow_die_sig_1): Likewise.
+	(free_heap_comp_unit): Likewise.
+	(free_stack_comp_unit): Likewise.
+	(dwarf2_free_objfile): Likewise.
+	(per_cu_offset_and_type_hash): Likewise.
+	(per_cu_offset_and_type_eq): Likewise.
+	(get_die_type_at_offset): Likewise.
+	(partial_die_hash): Likewise.
+	(partial_die_eq): Likewise.
+	(dwarf2_per_objfile_free): Likewise.
+	(hash_strtab_entry): Likewise.
+	(eq_strtab_entry): Likewise.
+	(add_string): Likewise.
+	(hash_symtab_entry): Likewise.
+	(eq_symtab_entry): Likewise.
+	(delete_symtab_entry): Likewise.
+	(cleanup_mapped_symtab): Likewise.
+	(add_indices_to_cpool): Likewise.
+	(hash_psymtab_cu_index): Likewise.
+	(eq_psymtab_cu_index): Likewise.
+	(add_address_entry_worker): Likewise.
+	(unlink_if_set): Likewise.
+	(write_one_signatured_type): Likewise.
+	(save_gdb_index_command): Likewise.
+	* elfread.c (elf_symtab_read): Likewise.
+	(elf_gnu_ifunc_cache_hash): Likewise.
+	(elf_gnu_ifunc_cache_eq): Likewise.
+	(elf_gnu_ifunc_record_cache): Likewise.
+	(elf_gnu_ifunc_resolve_by_cache): Likewise.
+	(elf_get_probes): Likewise.
+	(probe_key_free): Likewise.
+	* f-lang.c (builtin_f_type): Likewise.
+	* frame-base.c (frame_base_append_sniffer): Likewise.
+	(frame_base_set_default): Likewise.
+	(frame_base_find_by_frame): Likewise.
+	* frame-unwind.c (frame_unwind_prepend_unwinder): Likewise.
+	(frame_unwind_append_unwinder): Likewise.
+	(frame_unwind_find_by_frame): Likewise.
+	* frame.c (frame_addr_hash): Likewise.
+	(frame_addr_hash_eq): Likewise.
+	(frame_stash_find): Likewise.
+	(do_frame_register_read): Likewise.
+	(unwind_to_current_frame): Likewise.
+	(frame_cleanup_after_sniffer): Likewise.
+	* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
+	* frv-tdep.c (frv_frame_unwind_cache): Likewise.
+	* ft32-tdep.c (ft32_frame_cache): Likewise.
+	* gcore.c (do_bfd_delete_cleanup): Likewise.
+	(gcore_create_callback): Likewise.
+	* gdb_bfd.c (hash_bfd): Likewise.
+	(eq_bfd): Likewise.
+	(gdb_bfd_open): Likewise.
+	(free_one_bfd_section): Likewise.
+	(gdb_bfd_ref): Likewise.
+	(gdb_bfd_unref): Likewise.
+	(get_section_descriptor): Likewise.
+	(gdb_bfd_map_section): Likewise.
+	(gdb_bfd_crc): Likewise.
+	(gdb_bfd_mark_parent): Likewise.
+	(gdb_bfd_record_inclusion): Likewise.
+	(gdb_bfd_requires_relocations): Likewise.
+	(print_one_bfd): Likewise.
+	* gdbtypes.c (type_pair_hash): Likewise.
+	(type_pair_eq): Likewise.
+	(builtin_type): Likewise.
+	(objfile_type): Likewise.
+	* gnu-v3-abi.c (vtable_ptrdiff_type): Likewise.
+	(vtable_address_point_offset): Likewise.
+	(gnuv3_get_vtable): Likewise.
+	(hash_value_and_voffset): Likewise.
+	(eq_value_and_voffset): Likewise.
+	(compare_value_and_voffset): Likewise.
+	(compute_vtable_size): Likewise.
+	(gnuv3_get_typeid_type): Likewise.
+	* go-lang.c (builtin_go_type): Likewise.
+	* guile/scm-block.c (bkscm_hash_block_smob): Likewise.
+	(bkscm_eq_block_smob): Likewise.
+	(bkscm_objfile_block_map): Likewise.
+	(bkscm_del_objfile_blocks): Likewise.
+	* guile/scm-breakpoint.c (bpscm_build_bp_list): Likewise.
+	* guile/scm-disasm.c (gdbscm_disasm_read_memory_worker): Likewise.
+	(gdbscm_disasm_print_address): Likewise.
+	* guile/scm-frame.c (frscm_hash_frame_smob): Likewise.
+	(frscm_eq_frame_smob): Likewise.
+	(frscm_inferior_frame_map): Likewise.
+	(frscm_del_inferior_frames): Likewise.
+	* guile/scm-gsmob.c (gdbscm_add_objfile_ref): Likewise.
+	* guile/scm-objfile.c (ofscm_handle_objfile_deleted): Likewise.
+	(ofscm_objfile_smob_from_objfile): Likewise.
+	* guile/scm-ports.c (ioscm_write): Likewise.
+	(ioscm_file_port_delete): Likewise.
+	(ioscm_file_port_rewind): Likewise.
+	(ioscm_file_port_put): Likewise.
+	(ioscm_file_port_write): Likewise.
+	* guile/scm-progspace.c (psscm_handle_pspace_deleted): Likewise.
+	(psscm_pspace_smob_from_pspace): Likewise.
+	* guile/scm-safe-call.c (scscm_recording_pre_unwind_handler): Likewise.
+	(scscm_recording_unwind_handler): Likewise.
+	(gdbscm_with_catch): Likewise.
+	(scscm_call_0_body): Likewise.
+	(scscm_call_1_body): Likewise.
+	(scscm_call_2_body): Likewise.
+	(scscm_call_3_body): Likewise.
+	(scscm_call_4_body): Likewise.
+	(scscm_apply_1_body): Likewise.
+	(scscm_eval_scheme_string): Likewise.
+	(gdbscm_safe_eval_string): Likewise.
+	(scscm_source_scheme_script): Likewise.
+	(gdbscm_safe_source_script): Likewise.
+	* guile/scm-string.c (gdbscm_call_scm_to_stringn): Likewise.
+	(gdbscm_call_scm_from_stringn): Likewise.
+	* guile/scm-symbol.c (syscm_hash_symbol_smob): Likewise.
+	(syscm_eq_symbol_smob): Likewise.
+	(syscm_get_symbol_map): Likewise.
+	(syscm_del_objfile_symbols): Likewise.
+	* guile/scm-symtab.c (stscm_hash_symtab_smob): Likewise.
+	(stscm_eq_symtab_smob): Likewise.
+	(stscm_objfile_symtab_map): Likewise.
+	(stscm_del_objfile_symtabs): Likewise.
+	* guile/scm-type.c (tyscm_hash_type_smob): Likewise.
+	(tyscm_eq_type_smob): Likewise.
+	(tyscm_type_map): Likewise.
+	(tyscm_copy_type_recursive): Likewise.
+	(save_objfile_types): Likewise.
+	* guile/scm-utils.c (extract_arg): Likewise.
+	* h8300-tdep.c (h8300_frame_cache): Likewise.
+	* hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Likewise.
+	* hppa-tdep.c (compare_unwind_entries): Likewise.
+	(find_unwind_entry): Likewise.
+	(hppa_frame_cache): Likewise.
+	(hppa_stub_frame_unwind_cache): Likewise.
+	* hppanbsd-tdep.c (hppanbsd_supply_gregset): Likewise.
+	* hppaobsd-tdep.c (hppaobsd_supply_gregset): Likewise.
+	(hppaobsd_supply_fpregset): Likewise.
+	* i386-cygwin-tdep.c (core_process_module_section): Likewise.
+	* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
+	* i386-tdep.c (i386_frame_cache): Likewise.
+	(i386_epilogue_frame_cache): Likewise.
+	(i386_sigtramp_frame_cache): Likewise.
+	(i386_supply_gregset): Likewise.
+	(i386_collect_gregset): Likewise.
+	(i386_gdbarch_init): Likewise.
+	* i386obsd-tdep.c (i386obsd_aout_supply_regset): Likewise.
+	(i386obsd_trapframe_cache): Likewise.
+	* i387-tdep.c (i387_supply_fsave): Likewise.
+	(i387_collect_fsave): Likewise.
+	(i387_supply_fxsave): Likewise.
+	(i387_collect_fxsave): Likewise.
+	(i387_supply_xsave): Likewise.
+	(i387_collect_xsave): Likewise.
+	* ia64-tdep.c (ia64_frame_cache): Likewise.
+	(ia64_sigtramp_frame_cache): Likewise.
+	* infcmd.c (attach_command_continuation): Likewise.
+	(attach_command_continuation_free_args): Likewise.
+	* inferior.c (restore_inferior): Likewise.
+	(delete_thread_of_inferior): Likewise.
+	* inflow.c (inflow_inferior_data_cleanup): Likewise.
+	(get_inflow_inferior_data): Likewise.
+	(inflow_inferior_exit): Likewise.
+	* infrun.c (displaced_step_clear_cleanup): Likewise.
+	(restore_current_uiout_cleanup): Likewise.
+	(release_stop_context_cleanup): Likewise.
+	(do_restore_infcall_suspend_state_cleanup): Likewise.
+	(do_restore_infcall_control_state_cleanup): Likewise.
+	(restore_inferior_ptid): Likewise.
+	* inline-frame.c (block_starting_point_at): Likewise.
+	* iq2000-tdep.c (iq2000_frame_cache): Likewise.
+	* jit.c (get_jit_objfile_data): Likewise.
+	(get_jit_program_space_data): Likewise.
+	(jit_object_close_impl): Likewise.
+	(jit_find_objf_with_entry_addr): Likewise.
+	(jit_breakpoint_deleted): Likewise.
+	(jit_unwind_reg_set_impl): Likewise.
+	(jit_unwind_reg_get_impl): Likewise.
+	(jit_dealloc_cache): Likewise.
+	(jit_frame_sniffer): Likewise.
+	(jit_frame_prev_register): Likewise.
+	(jit_prepend_unwinder): Likewise.
+	(jit_inferior_exit_hook): Likewise.
+	(free_objfile_data): Likewise.
+	* jv-lang.c (jv_per_objfile_free): Likewise.
+	(get_dynamics_objfile): Likewise.
+	(get_java_class_symtab): Likewise.
+	(builtin_java_type): Likewise.
+	* language.c (language_string_char_type): Likewise.
+	(language_bool_type): Likewise.
+	(language_lookup_primitive_type): Likewise.
+	(language_lookup_primitive_type_as_symbol): Likewise.
+	* linespec.c (hash_address_entry): Likewise.
+	(eq_address_entry): Likewise.
+	(iterate_inline_only): Likewise.
+	(iterate_name_matcher): Likewise.
+	(decode_line_2_compare_items): Likewise.
+	(collect_one_symbol): Likewise.
+	(compare_symbols): Likewise.
+	(compare_msymbols): Likewise.
+	(add_symtabs_to_list): Likewise.
+	(collect_symbols): Likewise.
+	(compare_msyms): Likewise.
+	(add_minsym): Likewise.
+	(cleanup_linespec_result): Likewise.
+	* linux-fork.c (inferior_call_waitpid_cleanup): Likewise.
+	* linux-nat.c (delete_lwp_cleanup): Likewise.
+	(count_events_callback): Likewise.
+	(select_event_lwp_callback): Likewise.
+	(resume_stopped_resumed_lwps): Likewise.
+	* linux-tdep.c (get_linux_gdbarch_data): Likewise.
+	(invalidate_linux_cache_inf): Likewise.
+	(get_linux_inferior_data): Likewise.
+	(linux_find_memory_regions_thunk): Likewise.
+	(linux_make_mappings_callback): Likewise.
+	(linux_corefile_thread_callback): Likewise.
+	(find_mapping_size): Likewise.
+	* linux-thread-db.c (find_new_threads_callback): Likewise.
+	* lm32-tdep.c (lm32_frame_cache): Likewise.
+	* m2-lang.c (builtin_m2_type): Likewise.
+	* m32c-tdep.c (m32c_analyze_frame_prologue): Likewise.
+	* m32r-linux-tdep.c (m32r_linux_sigtramp_frame_cache): Likewise.
+	(m32r_linux_supply_gregset): Likewise.
+	(m32r_linux_collect_gregset): Likewise.
+	* m32r-tdep.c (m32r_frame_unwind_cache): Likewise.
+	* m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
+	* m68k-tdep.c (m68k_frame_cache): Likewise.
+	* m68kbsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
+	(m68kbsd_supply_gregset): Likewise.
+	* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
+	* m88k-tdep.c (m88k_frame_cache): Likewise.
+	(m88k_supply_gregset): Likewise.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* aarch64-linux-tdep.c (aarch64_stap_parse_special_token): Add cast
+	to allocation result assignment.
+	* ada-exp.y (write_object_renaming): Likewise.
+	(write_ambiguous_var): Likewise.
+	(ada_nget_field_index): Likewise.
+	(write_var_or_type): Likewise.
+	* ada-lang.c (ada_decode_symbol): Likewise.
+	(ada_value_assign): Likewise.
+	(value_pointer): Likewise.
+	(cache_symbol): Likewise.
+	(add_nonlocal_symbols): Likewise.
+	(ada_name_for_lookup): Likewise.
+	(symbol_completion_add): Likewise.
+	(ada_to_fixed_type_1): Likewise.
+	(ada_get_next_arg): Likewise.
+	(defns_collected): Likewise.
+	* ada-lex.l (processId): Likewise.
+	(processString): Likewise.
+	* ada-tasks.c (read_known_tasks_array): Likewise.
+	(read_known_tasks_list): Likewise.
+	* ada-typeprint.c (decoded_type_name): Likewise.
+	* addrmap.c (addrmap_mutable_create_fixed): Likewise.
+	* amd64-tdep.c (amd64_push_arguments): Likewise.
+	(amd64_displaced_step_copy_insn): Likewise.
+	(amd64_classify_insn_at): Likewise.
+	(amd64_relocate_instruction): Likewise.
+	* amd64obsd-tdep.c (amd64obsd_sigtramp_p): Likewise.
+	* arch-utils.c (simple_displaced_step_copy_insn): Likewise.
+	(initialize_current_architecture): Likewise.
+	* arm-linux-tdep.c (arm_stap_parse_special_token): Likewise.
+	* arm-symbian-tdep.c (arm_symbian_osabi_sniffer): Likewise.
+	* arm-tdep.c (arm_exidx_new_objfile): Likewise.
+	(arm_push_dummy_call): Likewise.
+	(extend_buffer_earlier): Likewise.
+	(arm_adjust_breakpoint_address): Likewise.
+	(arm_skip_stub): Likewise.
+	* auto-load.c (filename_is_in_pattern): Likewise.
+	(maybe_add_script_file): Likewise.
+	(maybe_add_script_text): Likewise.
+	(auto_load_objfile_script_1): Likewise.
+	* auxv.c (ld_so_xfer_auxv): Likewise.
+	* ax-general.c (new_agent_expr): Likewise.
+	(grow_expr): Likewise.
+	(ax_reg_mask): Likewise.
+	* bcache.c (bcache_full): Likewise.
+	* breakpoint.c (program_breakpoint_here_p): Likewise.
+	* btrace.c (parse_xml_raw): Likewise.
+	* build-id.c (build_id_to_debug_bfd): Likewise.
+	* buildsym.c (end_symtab_with_blockvector): Likewise.
+	* c-exp.y (string_exp): Likewise.
+	(qualified_name): Likewise.
+	(write_destructor_name): Likewise.
+	(operator_stoken): Likewise.
+	(parse_number): Likewise.
+	(scan_macro_expansion): Likewise.
+	(yylex): Likewise.
+	(c_print_token): Likewise.
+	* c-lang.c (c_get_string): Likewise.
+	(emit_numeric_character): Likewise.
+	* charset.c (wchar_iterate): Likewise.
+	* cli/cli-cmds.c (complete_command): Likewise.
+	(make_command): Likewise.
+	* cli/cli-dump.c (restore_section_callback): Likewise.
+	(restore_binary_file): Likewise.
+	* cli/cli-interp.c (cli_interpreter_exec): Likewise.
+	* cli/cli-script.c (execute_control_command): Likewise.
+	* cli/cli-setshow.c (do_set_command): Likewise.
+	* coff-pe-read.c (add_pe_forwarded_sym): Likewise.
+	(read_pe_exported_syms): Likewise.
+	* coffread.c (coff_read_struct_type): Likewise.
+	(coff_read_enum_type): Likewise.
+	* common/btrace-common.c (btrace_data_append): Likewise.
+	* common/buffer.c (buffer_grow): Likewise.
+	* common/filestuff.c (gdb_fopen_cloexec): Likewise.
+	* common/format.c (parse_format_string): Likewise.
+	* common/gdb_vecs.c (delim_string_to_char_ptr_vec_append): Likewise.
+	* common/xml-utils.c (xml_escape_text): Likewise.
+	* compile/compile-object-load.c (copy_sections): Likewise.
+	(compile_object_load): Likewise.
+	* compile/compile-object-run.c (compile_object_run): Likewise.
+	* completer.c (filename_completer): Likewise.
+	* corefile.c (read_memory_typed_address): Likewise.
+	(write_memory_unsigned_integer): Likewise.
+	(write_memory_signed_integer): Likewise.
+	(complete_set_gnutarget): Likewise.
+	* corelow.c (get_core_register_section): Likewise.
+	* cp-name-parser.y (d_grab): Likewise.
+	(allocate_info): Likewise.
+	(cp_new_demangle_parse_info): Likewise.
+	* cp-namespace.c (cp_scan_for_anonymous_namespaces): Likewise.
+	(cp_lookup_symbol_in_namespace): Likewise.
+	(lookup_namespace_scope): Likewise.
+	(find_symbol_in_baseclass): Likewise.
+	(cp_lookup_nested_symbol): Likewise.
+	(cp_lookup_transparent_type_loop): Likewise.
+	* cp-support.c (copy_string_to_obstack): Likewise.
+	(make_symbol_overload_list): Likewise.
+	(make_symbol_overload_list_namespace): Likewise.
+	(make_symbol_overload_list_adl_namespace): Likewise.
+	(first_component_command): Likewise.
+	* cp-valprint.c (cp_print_value): Likewise.
+	* ctf.c (ctf_xfer_partial): Likewise.
+	* d-exp.y (StringExp): Likewise.
+	* d-namespace.c (d_lookup_symbol_in_module): Likewise.
+	(lookup_module_scope): Likewise.
+	(find_symbol_in_baseclass): Likewise.
+	(d_lookup_nested_symbol): Likewise.
+	* dbxread.c (find_stab_function_addr): Likewise.
+	(read_dbx_symtab): Likewise.
+	(dbx_end_psymtab): Likewise.
+	(cp_set_block_scope): Likewise.
+	* dcache.c (dcache_alloc): Likewise.
+	* demangle.c (_initialize_demangler): Likewise.
+	* dicos-tdep.c (dicos_load_module_p): Likewise.
+	* dictionary.c (dict_create_hashed_expandable): Likewise.
+	(dict_create_linear_expandable): Likewise.
+	(expand_hashtable): Likewise.
+	(add_symbol_linear_expandable): Likewise.
+	* dwarf2-frame.c (add_cie): Likewise.
+	(add_fde): Likewise.
+	(dwarf2_build_frame_info): Likewise.
+	* dwarf2expr.c (dwarf_expr_grow_stack): Likewise.
+	(dwarf_expr_fetch_address): Likewise.
+	(add_piece): Likewise.
+	(execute_stack_op): Likewise.
+	* dwarf2loc.c (chain_candidate): Likewise.
+	(dwarf_entry_parameter_to_value): Likewise.
+	(read_pieced_value): Likewise.
+	(write_pieced_value): Likewise.
+	* dwarf2read.c (dwarf2_read_section): Likewise.
+	(add_type_unit): Likewise.
+	(read_comp_units_from_section): Likewise.
+	(fixup_go_packaging): Likewise.
+	(dwarf2_compute_name): Likewise.
+	(dwarf2_physname): Likewise.
+	(create_dwo_unit_in_dwp_v1): Likewise.
+	(create_dwo_unit_in_dwp_v2): Likewise.
+	(read_func_scope): Likewise.
+	(read_call_site_scope): Likewise.
+	(dwarf2_attach_fields_to_type): Likewise.
+	(process_structure_scope): Likewise.
+	(mark_common_block_symbol_computed): Likewise.
+	(read_common_block): Likewise.
+	(abbrev_table_read_table): Likewise.
+	(guess_partial_die_structure_name): Likewise.
+	(fixup_partial_die): Likewise.
+	(add_file_name): Likewise.
+	(dwarf2_const_value_data): Likewise.
+	(dwarf2_const_value_attr): Likewise.
+	(build_error_marker_type): Likewise.
+	(guess_full_die_structure_name): Likewise.
+	(anonymous_struct_prefix): Likewise.
+	(typename_concat): Likewise.
+	(dwarf2_canonicalize_name): Likewise.
+	(dwarf2_name): Likewise.
+	(write_constant_as_bytes): Likewise.
+	(dwarf2_fetch_constant_bytes): Likewise.
+	(copy_string): Likewise.
+	(parse_macro_definition): Likewise.
+	* elfread.c (elf_symfile_segments): Likewise.
+	(elf_rel_plt_read): Likewise.
+	(elf_gnu_ifunc_resolve_by_cache): Likewise.
+	(elf_gnu_ifunc_resolve_by_got): Likewise.
+	(elf_read_minimal_symbols): Likewise.
+	(elf_gnu_ifunc_record_cache): Likewise.
+	* event-top.c (top_level_prompt): Likewise.
+	(command_line_handler): Likewise.
+	* exec.c (resize_section_table): Likewise.
+	* expprint.c (print_subexp_standard): Likewise.
+	* fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
+	* findcmd.c (parse_find_args): Likewise.
+	* findvar.c (address_from_register): Likewise.
+	* frame.c (get_prev_frame_always): Likewise.
+	* gdb_bfd.c (gdb_bfd_ref): Likewise.
+	(get_section_descriptor): Likewise.
+	* gdb_obstack.c (obconcat): Likewise.
+	(obstack_strdup): Likewise.
+	* gdbtypes.c (lookup_function_type_with_arguments): Likewise.
+	(create_set_type): Likewise.
+	(lookup_unsigned_typename): Likewise.
+	(lookup_signed_typename): Likewise.
+	(resolve_dynamic_union): Likewise.
+	(resolve_dynamic_struct): Likewise.
+	(add_dyn_prop): Likewise.
+	(copy_dynamic_prop_list): Likewise.
+	(arch_flags_type): Likewise.
+	(append_composite_type_field_raw): Likewise.
+	* gdbtypes.h (INIT_FUNC_SPECIFIC): Likewise.
+	* gnu-v3-abi.c (gnuv3_rtti_type): Likewise.
+	* go-exp.y (string_exp): Likewise.
+	* go-lang.c (go_demangle): Likewise.
+	* guile/guile.c (compute_scheme_string): Likewise.
+	* guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
+	(gdbscm_canonicalize_command_name): Likewise.
+	* guile/scm-ports.c (ioscm_init_stdio_buffers): Likewise.
+	(ioscm_init_memory_port): Likewise.
+	(ioscm_reinit_memory_port): Likewise.
+	* guile/scm-utils.c (gdbscm_gc_xstrdup): Likewise.
+	(gdbscm_gc_dup_argv): Likewise.
+	* h8300-tdep.c (h8300_push_dummy_call): Likewise.
+	* hppa-tdep.c (internalize_unwinds): Likewise.
+	(read_unwind_info): Likewise.
+	* i386-cygwin-tdep.c (core_process_module_section): Likewise.
+	(windows_core_xfer_shared_libraries): Likewise.
+	* i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
+	(i386_stap_parse_special_token_triplet): Likewise.
+	(i386_stap_parse_special_token_three_arg_disp): Likewise.
+	* i386obsd-tdep.c (i386obsd_sigtramp_p): Likewise.
+	* inf-child.c (inf_child_fileio_readlink): Likewise.
+	* inf-ptrace.c (inf_ptrace_fetch_register): Likewise.
+	(inf_ptrace_store_register): Likewise.
+	* infrun.c (follow_exec): Likewise.
+	(displaced_step_prepare_throw): Likewise.
+	(save_stop_context): Likewise.
+	(save_infcall_suspend_state): Likewise.
+	* jit.c (jit_read_descriptor): Likewise.
+	(jit_read_code_entry): Likewise.
+	(jit_symtab_line_mapping_add_impl): Likewise.
+	(finalize_symtab): Likewise.
+	(jit_unwind_reg_get_impl): Likewise.
+	* jv-exp.y (QualifiedName): Likewise.
+	* jv-lang.c (get_java_utf8_name): Likewise.
+	(type_from_class): Likewise.
+	(java_demangle_type_signature): Likewise.
+	(java_class_name_from_physname): Likewise.
+	* jv-typeprint.c (java_type_print_base): Likewise.
+	* jv-valprint.c (java_value_print): Likewise.
+	* language.c (add_language): Likewise.
+	* linespec.c (add_sal_to_sals_basic): Likewise.
+	(add_sal_to_sals): Likewise.
+	(decode_objc): Likewise.
+	(find_linespec_symbols): Likewise.
+	* linux-fork.c (fork_save_infrun_state): Likewise.
+	* linux-nat.c (linux_nat_detach): Likewise.
+	(linux_nat_fileio_readlink): Likewise.
+	* linux-record.c (record_linux_sockaddr): Likewise.
+	(record_linux_msghdr): Likewise.
+	(Do): Likewise.
+	* linux-tdep.c (linux_core_info_proc_mappings): Likewise.
+	(linux_collect_regset_section_cb): Likewise.
+	(linux_get_siginfo_data): Likewise.
+	* linux-thread-db.c (try_thread_db_load_from_pdir_1): Likewise.
+	(try_thread_db_load_from_dir): Likewise.
+	(thread_db_load_search): Likewise.
+	(info_auto_load_libthread_db): Likewise.
+	* m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
+	(m32c_m16c_pointer_to_address): Likewise.
+	* m68hc11-tdep.c (m68hc11_pseudo_register_write): Likewise.
+	* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
+	* machoread.c (macho_check_dsym): Likewise.
+	* macroexp.c (resize_buffer): Likewise.
+	(gather_arguments): Likewise.
+	(maybe_expand): Likewise.
+	* macrotab.c (new_macro_key): Likewise.
+	(new_source_file): Likewise.
+	(new_macro_definition): Likewise.
+	* mdebugread.c (parse_symbol): Likewise.
+	(parse_type): Likewise.
+	(parse_partial_symbols): Likewise.
+	(psymtab_to_symtab_1): Likewise.
+	* mem-break.c (default_memory_insert_breakpoint): Likewise.
+	* mi/mi-cmd-break.c (mi_argv_to_format): Likewise.
+	* mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
+	(mi_cmd_data_read_memory_bytes): Likewise.
+	(mi_cmd_data_write_memory_bytes): Likewise.
+	(mi_cmd_trace_frame_collected): Likewise.
+	* mi/mi-parse.c (mi_parse_argv): Likewise.
+	(mi_parse): Likewise.
+	* minidebug.c (lzma_open): Likewise.
+	(lzma_pread): Likewise.
+	* mips-tdep.c (mips_read_fp_register_single): Likewise.
+	(mips_print_fp_register): Likewise.
+	* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Likewise.
+	* mipsread.c (read_alphacoff_dynamic_symtab): Likewise.
+	* mt-tdep.c (mt_register_name): Likewise.
+	(mt_registers_info): Likewise.
+	(mt_push_dummy_call): Likewise.
+	* namespace.c (add_using_directive): Likewise.
+	* nat/linux-btrace.c (perf_event_read): Likewise.
+	(linux_enable_bts): Likewise.
+	* nat/linux-osdata.c (linux_common_core_of_thread): Likewise.
+	* nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Likewise.
+	* nto-tdep.c (nto_find_and_open_solib): Likewise.
+	(nto_parse_redirection): Likewise.
+	* objc-lang.c (objc_demangle): Likewise.
+	(find_methods): Likewise.
+	* objfiles.c (get_objfile_bfd_data): Likewise.
+	(set_objfile_main_name): Likewise.
+	(allocate_objfile): Likewise.
+	(objfile_relocate): Likewise.
+	(update_section_map): Likewise.
+	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise.
+	* p-exp.y (exp): Likewise.
+	(yylex): Likewise.
+	* p-valprint.c (pascal_object_print_value): Likewise.
+	* parse.c (initialize_expout): Likewise.
+	(mark_completion_tag): Likewise.
+	(copy_name): Likewise.
+	(parse_float): Likewise.
+	(type_stack_reserve): Likewise.
+	* ppc-linux-tdep.c (ppc_stap_parse_special_token): Likewise.
+	(ppu2spu_prev_register): Likewise.
+	* ppc-ravenscar-thread.c (supply_register_at_address): Likewise.
+	* printcmd.c (printf_wide_c_string): Likewise.
+	(printf_pointer): Likewise.
+	* probe.c (parse_probes): Likewise.
+	* python/py-cmd.c (gdbpy_parse_command_name): Likewise.
+	(cmdpy_init): Likewise.
+	* python/py-gdb-readline.c (gdbpy_readline_wrapper): Likewise.
+	* python/py-symtab.c (set_sal): Likewise.
+	* python/py-unwind.c (pyuw_sniffer): Likewise.
+	* python/python.c (python_interactive_command): Likewise.
+	(compute_python_string): Likewise.
+	* ravenscar-thread.c (get_running_thread_id): Likewise.
+	* record-full.c (record_full_exec_insn): Likewise.
+	(record_full_core_open_1): Likewise.
+	* regcache.c (regcache_raw_read_signed): Likewise.
+	(regcache_raw_read_unsigned): Likewise.
+	(regcache_cooked_read_signed): Likewise.
+	(regcache_cooked_read_unsigned): Likewise.
+	* remote-fileio.c (remote_fileio_func_open): Likewise.
+	(remote_fileio_func_rename): Likewise.
+	(remote_fileio_func_unlink): Likewise.
+	(remote_fileio_func_stat): Likewise.
+	(remote_fileio_func_system): Likewise.
+	* remote-mips.c (mips_xfer_memory): Likewise.
+	(mips_load_srec): Likewise.
+	(pmon_end_download): Likewise.
+	* remote.c (new_remote_state): Likewise.
+	(map_regcache_remote_table): Likewise.
+	(remote_register_number_and_offset): Likewise.
+	(init_remote_state): Likewise.
+	(get_memory_packet_size): Likewise.
+	(remote_pass_signals): Likewise.
+	(remote_program_signals): Likewise.
+	(remote_start_remote): Likewise.
+	(remote_check_symbols): Likewise.
+	(remote_query_supported): Likewise.
+	(extended_remote_attach): Likewise.
+	(process_g_packet): Likewise.
+	(store_registers_using_G): Likewise.
+	(putpkt_binary): Likewise.
+	(read_frame): Likewise.
+	(compare_sections_command): Likewise.
+	(remote_hostio_pread): Likewise.
+	(remote_hostio_readlink): Likewise.
+	(remote_file_put): Likewise.
+	(remote_file_get): Likewise.
+	(remote_pid_to_exec_file): Likewise.
+	(_initialize_remote): Likewise.
+	* rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise.
+	(rs6000_aix_core_xfer_shared_libraries_aix): Likewise.
+	* rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
+	(bfd_uses_spe_extensions): Likewise.
+	* s390-linux-tdep.c (s390_displaced_step_copy_insn): Likewise.
+	* score-tdep.c (score7_malloc_and_get_memblock): Likewise.
+	* solib-dsbt.c (decode_loadmap): Likewise.
+	(fetch_loadmap): Likewise.
+	(scan_dyntag): Likewise.
+	(enable_break): Likewise.
+	(dsbt_relocate_main_executable): Likewise.
+	* solib-frv.c (fetch_loadmap): Likewise.
+	(enable_break2): Likewise.
+	(frv_relocate_main_executable): Likewise.
+	* solib-spu.c (spu_relocate_main_executable): Likewise.
+	(spu_bfd_open): Likewise.
+	* solib-svr4.c (lm_info_read): Likewise.
+	(read_program_header): Likewise.
+	(find_program_interpreter): Likewise.
+	(scan_dyntag): Likewise.
+	(elf_locate_base): Likewise.
+	(open_symbol_file_object): Likewise.
+	(read_program_headers_from_bfd): Likewise.
+	(svr4_relocate_main_executable): Likewise.
+	* solib-target.c (solib_target_relocate_section_addresses): Likewise.
+	* solib.c (solib_find_1): Likewise.
+	(exec_file_find): Likewise.
+	(solib_find): Likewise.
+	* source.c (openp): Likewise.
+	(print_source_lines_base): Likewise.
+	(forward_search_command): Likewise.
+	* sparc-ravenscar-thread.c (supply_register_at_address): Likewise.
+	* spu-tdep.c (spu2ppu_prev_register): Likewise.
+	(spu_get_overlay_table): Likewise.
+	* stabsread.c (patch_block_stabs): Likewise.
+	(define_symbol): Likewise.
+	(again:): Likewise.
+	(read_member_functions): Likewise.
+	(read_one_struct_field): Likewise.
+	(read_enum_type): Likewise.
+	(common_block_start): Likewise.
+	* stack.c (read_frame_arg): Likewise.
+	(backtrace_command): Likewise.
+	* stap-probe.c (stap_parse_register_operand): Likewise.
+	* symfile.c (syms_from_objfile_1): Likewise.
+	(find_separate_debug_file): Likewise.
+	(load_command): Likewise.
+	(load_progress): Likewise.
+	(load_section_callback): Likewise.
+	(reread_symbols): Likewise.
+	(add_filename_language): Likewise.
+	(allocate_compunit_symtab): Likewise.
+	(read_target_long_array): Likewise.
+	(simple_read_overlay_table): Likewise.
+	* symtab.c (symbol_set_names): Likewise.
+	(resize_symbol_cache): Likewise.
+	(rbreak_command): Likewise.
+	(completion_list_add_name): Likewise.
+	(completion_list_objc_symbol): Likewise.
+	(add_filename_to_list): Likewise.
+	* target-descriptions.c (maint_print_c_tdesc_cmd): Likewise.
+	* target-memory.c (target_write_memory_blocks): Likewise.
+	* target.c (target_read_string): Likewise.
+	(read_whatever_is_readable): Likewise.
+	(target_read_alloc_1): Likewise.
+	(simple_search_memory): Likewise.
+	(target_fileio_read_alloc_1): Likewise.
+	* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
+	* top.c (command_line_input): Likewise.
+	* tracefile-tfile.c (tfile_fetch_registers): Likewise.
+	* tracefile.c (tracefile_fetch_registers): Likewise.
+	* tracepoint.c (add_memrange): Likewise.
+	(init_collection_list): Likewise.
+	(add_aexpr): Likewise.
+	(trace_dump_actions): Likewise.
+	(parse_trace_status): Likewise.
+	(parse_tracepoint_definition): Likewise.
+	(parse_tsv_definition): Likewise.
+	(parse_static_tracepoint_marker_definition): Likewise.
+	* tui/tui-file.c (tui_sfileopen): Likewise.
+	(tui_file_adjust_strbuf): Likewise.
+	* tui/tui-io.c (tui_expand_tabs): Likewise.
+	* tui/tui-source.c (tui_set_source_content): Likewise.
+	* typeprint.c (find_global_typedef): Likewise.
+	* ui-file.c (do_ui_file_xstrdup): Likewise.
+	(ui_file_obsavestring): Likewise.
+	(mem_file_write): Likewise.
+	* utils.c (make_hex_string): Likewise.
+	(get_regcomp_error): Likewise.
+	(puts_filtered_tabular): Likewise.
+	(gdb_realpath_keepfile): Likewise.
+	(ldirname): Likewise.
+	(gdb_bfd_errmsg): Likewise.
+	(substitute_path_component): Likewise.
+	* valops.c (search_struct_method): Likewise.
+	(find_oload_champ_namespace_loop): Likewise.
+	* valprint.c (print_decimal_chars): Likewise.
+	(read_string): Likewise.
+	(generic_emit_char): Likewise.
+	* varobj.c (varobj_delete): Likewise.
+	(varobj_value_get_print_value): Likewise.
+	* vaxobsd-tdep.c (vaxobsd_sigtramp_sniffer): Likewise.
+	* windows-tdep.c (display_one_tib): Likewise.
+	* xcoffread.c (read_xcoff_symtab): Likewise.
+	(process_xcoff_symbol): Likewise.
+	(swap_sym): Likewise.
+	(scan_xcoff_symtab): Likewise.
+	(xcoff_initial_scan): Likewise.
+	* xml-support.c (gdb_xml_end_element): Likewise.
+	(xml_process_xincludes): Likewise.
+	(xml_fetch_content_from_file): Likewise.
+	* xml-syscall.c (xml_list_of_syscalls): Likewise.
+	* xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
+
+2015-09-23  James Bowman  <james.bowman@ftdichip.com>
+
+	* ft32-tdep.c (ft32_register_type): Return gdbarch_tdep (gdbarch)->pc_type
+	instead of builtin_func_ptr.
+	(ft32_pointer_to_address): New function.
+	(ft32_address_class_type_flags): New function.
+	(ft32_address_class_type_flags_to_name): New function.
+	(ft32_address_class_name_to_type_flags): New function.
+	(ft32_gdbarch_init): Set tdep->pc_type.  Call
+	set_gdbarch_pointer_to_address,
+	set_gdbarch_address_class_type_flags
+	set_gdbarch_address_class_name_to_type_flags,
+	and set_gdbarch_address_class_type_flags_to_name.
+	* ft32-tdep.h (struct gdbarch_tdep) <pc_type>: New field.
+
+2015-09-23  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (ada_evaluate_subexp) <OP_FUNCALL>: When the input
+	value is a reference, actually dereference it in order to get
+	the underlying value.
+
+2015-09-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* stap-probe.c (handle_stap_probe): Remove unnecessary cast.
+
+2015-09-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cli/cli-setshow.c (cmd_show_list): Constify a variable.
+	* linespec.c (linespec_lexer_lex_string): Same.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* NEWS: Mention support for fast tracepoints on aarch64-linux.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_analyze_prologue): New is_adrp
+	variable.  Call aarch64_decode_adr instead of
+	aarch64_decode_adrp.
+	* arch/aarch64-insn.h (aarch64_decode_adrp): Delete.
+	(aarch64_decode_adr): New function declaration.
+	* arch/aarch64-insn.c (aarch64_decode_adrp): Delete.
+	(aarch64_decode_adr): New function, factored out from
+	aarch64_decode_adrp to decode both adr and adrp instructions.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* Makefile.in (ALL_64_TARGET_OBS): Add aarch64-insn.o.
+	(HFILES_NO_SRCDIR): Add arch/aarch64-insn.h.
+	(aarch64-insn.o): New rule.
+	* configure.tgt (aarch64*-*-elf): Add aarch64-insn.o.
+	(aarch64*-*-linux*): Likewise.
+	* arch/aarch64-insn.c: New file.
+	* arch/aarch64-insn.h: New file.
+	* aarch64-tdep.c: Include arch/aarch64-insn.h.
+	(aarch64_debug): Move to arch/aarch64-insn.c.  Declare in
+	arch/aarch64-insn.h.
+	(decode_add_sub_imm): Rename to ...
+	(aarch64_decode_add_sub_imm): ... this.
+	(decode_adrp): Rename to ...
+	(aarch64_decode_adrp): ... this.  Move to arch/aarch64-insn.c.
+	Declare in arch/aarch64-insn.h.
+	(decode_b): Rename to ...
+	(aarch64_decode_b): ... this.  Move to arch/aarch64-insn.c.
+	Declare in arch/aarch64-insn.h.
+	(decode_bcond): Rename to ...
+	(aarch64_decode_bcond): ... this.  Move to arch/aarch64-insn.c.
+	Declare in arch/aarch64-insn.h.
+	(decode_br): Rename to ...
+	(aarch64_decode_br): ... this.
+	(decode_cb): Rename to ...
+	(aarch64_decode_cb): ... this.  Move to arch/aarch64-insn.c.
+	Declare in arch/aarch64-insn.h.
+	(decode_eret): Rename to ...
+	(aarch64_decode_eret): ... this.
+	(decode_movz): Rename to ...
+	(aarch64_decode_movz): ... this.
+	(decode_orr_shifted_register_x): Rename to ...
+	(aarch64_decode_orr_shifted_register_x): ... this.
+	(decode_ret): Rename to ...
+	(aarch64_decode_ret): ... this.
+	(decode_stp_offset): Rename to ...
+	(aarch64_decode_stp_offset): ... this.
+	(decode_stp_offset_wb): Rename to ...
+	(aarch64_decode_stp_offset_wb): ... this.
+	(decode_stur): Rename to ...
+	(aarch64_decode_stur): ... this.
+	(decode_tb): Rename to ...
+	(aarch64_decode_tb): ... this.  Move to arch/aarch64-insn.c.
+	Declare in arch/aarch64-insn.h.
+	(aarch64_analyze_prologue): Adjust calls to renamed functions.
+
+2015-09-20  Doug Evans  <xdje42@gmail.com>
+
+	* dwarf2read.c (add_partial_symbol): Remove outdated comments.
+
+2015-09-20  Doug Evans  <xdje42@gmail.com>
+
+	* dwarf2read.c (dwarf2_compute_name): Add FIXME.  Don't use a local
+	variable name that collides with a parameter.
+
+2015-09-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2loc.c (locexpr_get_frame_base): Renames
+	block_op_get_frame_base.
+	(dwarf2_block_frame_base_locexpr_funcs): Replace reference to
+	block_op_get_frame_base by reference to locexpr_get_frame_base.
+	(loclist_get_frame_base): New function, near identical copy of
+	locexpr_get_frame_base.
+	(dwarf2_block_frame_base_loclist_funcs): Replace reference to
+	block_op_get_frame_base by reference to loclist_get_frame_base.
+
+2015-09-19  Doug Evans  <xdje42@gmail.com>
+
+	* ravenscar-thread.c (ravenscar_inferior_created): Replace
+	current_inferior ()->gdbarch with its wrapper target_gdbarch.
+
+2015-09-18  Doug Evans  <xdje42@gmail.com>
+
+	* linux-thread-db.c (record_thread): Return the created thread.
+	(thread_from_lwp): Likewise.
+	(thread_db_get_thread_local_address): Update.
+
+2015-09-18  Doug Evans  <xdje42@gmail.com>
+
+	* symtab.h (general_symbol_info) <mangled_lang>: Delete struct,
+	move only member demangled_name up.  All uses updated.
+
+2015-09-18  Doug Evans  <xdje42@gmail.com>
+
+	* findvar.c (default_read_var_value) <LOC_UNRESOLVED>: Include the
+	kind of minimal symbol in the error message.
+	* objfiles.c (objfile_flavour_name): New function.
+	* objfiles.h (objfile_flavour_name): Declare.
+
+2015-09-18  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/aarch64-linux.c: Include elf/common.h,
+	nat/gdb_ptrace.h, asm/ptrace.h and sys/uio.h.
+	(aarch64_ps_get_thread_area): New function.
+	* nat/aarch64-linux.h: Include gdb_proc_service.h.
+	(aarch64_ps_get_thread_area): Declare.
+	* aarch64-linux-nat.c (ps_get_thread_area): Call
+	aarch64_ps_get_thread_area.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_resume): Honour scheduler-locking.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* NEWS: Announce new scheduler-locking mode.
+	* infrun.c (schedlock_replay): New.
+	(scheduler_enums): Add schedlock_replay.
+	(scheduler_mode): Change default to schedlock_replay.
+	(user_visible_resume_ptid): Handle schedlock_replay.
+	(clear_proceed_status_thread): Stop replaying if resumed thread is
+	not replaying.
+	(schedlock_applies): Handle schedlock_replay.
+	(_initialize_infrun): Document new scheduler-locking mode.
+	* record-btrace.c (record_btrace_resume): Remove code to stop other
+	threads when not replaying the resumed thread.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c ((record_btrace_will_replay): New.
+	(init_record_btrace_ops): Initialize to_record_will_replay.
+	* record-full.c ((record_full_will_replay): New.
+	(init_record_full_ops): Initialize to_record_will_replay.
+	* target-delegates.c: Regenerated.
+	* target.c (target_record_will_replay): New.
+	* target.h (struct target_ops) <to_record_will_replay>: New.
+	(target_record_will_replay): New.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_resume): Call
+	target_record_stop_replaying.
+	(record_btrace_stop_replaying_all): New.
+	(init_record_btrace_ops): Initialize to_record_stop_replaying.
+	* record-full.c (record_full_stop_replaying): New.
+	(init_record_full_ops ): Initialize to_record_stop_replaying.
+	* target-delegates.c: Regenerated.
+	* target.c (target_record_stop_replaying): New.
+	* target.h (struct target_ops) <to_record_stop_replaying>: New.
+	(target_record_stop_replaying): New.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_xfer_partial)
+	(record_btrace_store_registers, record_btrace_prepare_to_store):
+	Call record_btrace_is_replaying with inferior_ptid instead of
+	minus_one_ptid.
+	(record_btrace_store_registers): Change error message.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_is_replaying): Add ptid argument.
+	Update users to pass minus_one_ptid.
+	* record-full.c (record_full_is_replaying): Add ptid argument (ignored).
+	* record.c (cmd_record_delete): Pass inferior_ptid to
+	target_record_is_replaying.
+	* target-delegates.c: Regenerated.
+	* target.c (target_record_is_replaying): Add ptid argument.
+	* target.h (struct target_ops) <to_record_is_replaying>: Add ptid
+	argument.
+	(target_record_is_replaying): Add ptid argument.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_open): Remove non_stop check.
+	* NEWS: Announce that record btrace supports non-stop mode.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* infrun.c (handle_inferior_event_1): Switch to the eventing thread
+	in the TARKET_WAITKIND_NO_HISTORY case.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_maybe_mark_async_event): New.
+	(record_btrace_wait): Call record_btrace_maybe_mark_async_event.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (get_thread_current_frame): New.
+	(record_btrace_start_replaying): Call get_thread_current_frame.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_resume_thread): A move request
+	overwrites a previous move request.
+	(record_btrace_find_resume_thread): Removed.
+	(record_btrace_resume): Resume all requested threads.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c: Include vec.h.
+	(record_btrace_find_thread_to_move): Removed.
+	(btrace_step_no_resumed, btrace_step_again)
+	(record_btrace_stop_replaying_at_end): New.
+	(record_btrace_cancel_resume): Call record_btrace_stop_replaying_at_end.
+	(record_btrace_single_step_forward): Remove calls to
+	record_btrace_stop_replaying.
+	(record_btrace_step_thread): Do only one step for BTHR_CONT and
+	BTHR_RCONT.  Keep threads at the end of their history moving.
+	(record_btrace_wait): Call record_btrace_step_thread for all threads
+	until one reports an event.  Call record_btrace_stop_replaying_at_end
+	for the eventing thread.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_single_step_forward): Return
+	NO_HISTORY if a step brings us to the end of the execution history.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_step_thread): Move breakpoint check
+	to ...
+	(record_btrace_single_step_forward): ... here and
+	(record_btrace_single_step_backward): ... here.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (btrace_step_spurious)
+	(record_btrace_single_step_forward)
+	(record_btrace_single_step_backward): New.
+	(record_btrace_step_thread): Call record_btrace_single_step_forward
+	and record_btrace_single_step_backward.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_replay_at_breakpoint): New.
+	(record_btrace_step_thread): Call record_btrace_replay_at_breakpoint.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (btrace_thread_flag_to_str)
+	(record_btrace_cancel_resume): New.
+	(record_btrace_step_thread): Call btrace_thread_flag_to_str.
+	(record_btrace_resume): Print execution direction.
+	(record_btrace_resume_thread): Call btrace_thread_flag_to_str.
+	(record_btrace_wait): Call record_btrace_cancel_resume.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.h (enum btrace_thread_flag) <BTHR_STOP>: New.
+	* record-btrace (record_btrace_resume_thread): Clear BTHR_STOP.
+	(record_btrace_find_thread_to_move): Also accept threads that have
+	BTHR_STOP set.
+	(btrace_step_stopped_on_request, record_btrace_stop): New.
+	(record_btrace_step_thread): Support BTHR_STOP.
+	(record_btrace_wait): Also clear BTHR_STOP when stopping other threads.
+	(init_record_btrace_ops): Initialize to_stop.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_wait): Replace non_stop check with
+	target_is_non_stop_p ().
+
+2015-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-typeprint.c (print_array_type): Do not describe arrays as
+	packed when they embed dynamic elements.
+
+2015-09-15  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* symtab.h (address_class): Document that TLS variables
+	are handled by LOC_UNRESOLVED.
+	* findvar.c (default_read_var_value): Don't relocate TLS variables.
+	* printcmd.c (address_info): Don't relocate TLS variables.
+
+2015-09-15  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (decode_add_sub_imm): Use debug_printf.
+	(decode_adrp): Likewise.
+	(decode_b): Likewise.
+	(decode_bcond): Likewise.
+	(decode_br): Likewise.
+	(decode_cb): Likewise.
+	(decode_eret): Likewise.
+	(decode_movz): Likewise.
+	(decode_orr_shifted_register_x): Likewise.
+	(decode_ret): Likewise.
+	(decode_stp_offset): Likewise.
+	(decode_stp_offset_wb): Likewise.
+	(decode_stur): Likewise.
+	(decode_tb): Likewise.
+	(aarch64_analyze_prologue): Likewise.
+	(pass_in_x): Likewise.
+	(pass_in_v): Likewise.
+	(pass_on_stack): Likewise.
+	(aarch64_push_dummy_call): Likewise.
+	(aarch64_extract_return_value): Likewise.
+	(aarch64_store_return_value): Likewise.
+	(aarch64_return_value): Likewise.
+	(aarch64_record_asimd_load_store): Likewise.
+	(aarch64_record_load_store): Likewise.
+	(aarch64_record_data_proc_simd_fp): Likewise.
+
+2015-09-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linespec.c (minsym_found): Call gdbarch_skip_entrypoint.
+	* ppc64-tdep.c (ppc64_skip_trampoline_code): Rename to ...
+	(ppc64_skip_trampoline_code_1): ... here.
+	(ppc64_skip_trampoline_code): New wrapper function.
+	* symtab.c (find_function_start_sal): Call gdbarch_skip_entrypoint.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_can_do_single_step): New
+	function.
+	(_initialize_aarch64_linux_nat): Install it to to_can_do_single_step.
+	* arm-linux-tdep.c (arm_linux_software_single_step): Return 0
+	if target_can_do_single_step returns 1.
+	* remote.c (struct vCont_action_support) <s, S>: New fields.
+	(PACKET_vContSupported): New enum.
+	(remote_protocol_features): New element for vContSupported.
+	(remote_query_supported): Append "vContSupported+".
+	(remote_vcont_probe): Remove support_s and support_S, use
+	rs->supports_vCont.s and rs->supports_vCont.S instead.  Disable
+	vCont packet if c and C actions are not supported.
+	(remote_can_do_single_step): New function.
+	(init_remote_ops): Install it to to_can_do_single_step.
+	(_initialize_remote): Call add_packet_config_cmd.
+	* target.h (struct target_ops) <to_can_do_single_step>: New field.
+	(target_can_do_single_step): New macro.
+	* target-delegates.c: Re-generated.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_siginfo_fixup): New function.
+	(_initialize_aarch64_linux_nat): Call linux_nat_set_siginfo_fixup.
+	* nat/aarch64-linux.c (aarch64_compat_siginfo_from_siginfo):
+	New function.
+	(aarch64_siginfo_from_compat_siginfo): New function.
+	* nat/aarch64-linux.h: Include signal.h.
+	(compat_int_t, compat_uptr_t, compat_time_t): Typedef.
+	(compat_timer_t, compat_clock_t): Likewise.
+	(struct compat_timeval): New.
+	(union compat_sigval): New.
+	(struct compat_siginfo): New.
+	(cpt_si_pid, cpt_si_uid, cpt_si_timerid): New macros.
+	(cpt_si_overrun, cpt_si_status, cpt_si_utime): Likewise.
+	(cpt_si_stime, cpt_si_ptr, cpt_si_addr): Likewise.
+	(cpt_si_band, cpt_si_fd): Likewise.
+
+2015-09-14  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (current_stop_id): New global.
+	(get_stop_id, new_stop_id): New functions.
+	(fetch_inferior_event): Handle normal_stop proceeding the target.
+	(struct stop_context): New.
+	(save_stop_context, release_stop_context_cleanup)
+	(stop_context_changed): New functions.
+	(normal_stop): Return true if the hook-stop changes the stop
+	context.
+	* infrun.h (get_stop_id): Declare.
+	(normal_stop): Now returns int.  Add documentation.
+
+2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (ada_value_ptr_subscript): Update the heading
+	comment.  Handle packed arrays.
+
+2015-09-14  Pedro Alves  <palves@redhat.com>
+
+	* NEWS (Changes in GDB 7.10, New commands>: Remove duplicate
+	mention of maint set/show target-non-stop.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+
+	* NEWS: Announce new remote packets for the exec-events
+	feature and the exec-events feature and associated commands.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (remote_exec_event_p): New function.
+	(remote_insert_exec_catchpoint): New function.
+	(remote_remove_exec_catchpoint): New function.
+	(init_extended_remote_ops): Initialize extended_remote_ops
+	members to_insert_exec_catchpoint and
+	to_remove_exec_catchpoint.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+	    Luis Machado  <lgustavo@codesourcery.com>
+
+	* infrun.c (follow_exec): Use process-style ptid for
+	exec message.  Call add_inferior_with_spaces and
+	target_follow_exec.
+	* nat/linux-ptrace.c (linux_supports_traceexec): New function.
+	* nat/linux-ptrace.h (linux_supports_traceexec): Declare.
+	* remote.c (remote_pspace_data): New static variable.
+	(remote_pspace_data_cleanup): New function.
+	(get_remote_exec_file): New function.
+	(set_remote_exec_file_1): New function.
+	(set_remote_exec_file): New function.
+	(show_remote_exec_file): New function.
+	(remote_exec_file): Delete static variable.
+	(anonymous enum) <PACKET_exec_event_feature>: New
+	enumeration constant.
+	(remote_protocol_features): Add entry for exec-events feature.
+	(remote_query_supported): Add client side of qSupported query
+	for exec-events feature.
+	(remote_follow_exec): New function.
+	(remote_parse_stop_reply): Handle 'exec' stop reason.
+	(extended_remote_run, extended_remote_create_inferior): Call
+	get_remote_exec_file and set_remote_exec_file_1.
+	(init_extended_remote_ops) <to_follow_exec>: Initialize new
+	member.
+	(_initialize_remote): Call
+	register_program_space_data_with_cleanup.  Call
+	add_packet_config_cmd for remote exec-events feature.
+	Modify call to add_setshow_string_noescape_cmd for exec-file
+	to use new functions set_remote_exec_file and
+	show_remote_exec_file.
+	* target-debug.h, target-delegates.c: Regenerated.
+	* target.c (target_follow_exec): New function.
+	* target.h (struct target_ops) <to_follow_exec>: New member.
+	(target_follow_exec): Declare new function.
+
+2015-09-11  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (decode_cb): Move up comment describing the
+	encoding.
+	(decode_tb): Fix a typo in comment above the function.  Move up
+	comment describing the encoding.
+
+2015-09-11  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (decode_bcond): Fix incorrect mask.
+
+2015-09-11  Mihail-Marian Nistor  <mihail.nistor@freescale.com>
+
+	PR gdb/18947
+	* aarch64-linux-tdep.c: (aarch64_linux_init_abi): Install
+	glibc_skip_solib_resolver as gdbarch_skip_solib_resolver callback.
+
+2015-09-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ada-lang.c (scan_discrim_bound): Factor out arithmetic
+	operations.
+
+2015-09-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ada-lang.c (ada_search_struct_field): Constify parameters
+	and/or variables..
+	(xget_renaming_scope): Likewise.
+	(ada_is_redundant_range_encoding): Likewise.
+	(scan_discrim_bound): Likewise.
+	(to_fixed_range_type): Likewise.
+
+2015-09-10  Yao Qi  <yao.qi@linaro.org>
+
+	* breakpoint.c (download_tracepoint_locations): New local
+	can_download_tracepoint.  Check the result of
+	target_can_download_tracepoint and save it in
+	can_download_tracepoint if there are tracepoints to download.
+	* linux-nat.h (enum tribool): Move it to ...
+	* common/common-types.h: ... here.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* inf-loop.c (inferior_event_handler): Delete INF_TIMER case.
+	* target.h (enum inferior_event_type) <INF_TIMER>: Delete.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* continuations.c (add_continuation, restore_thread_cleanup)
+	(do_all_continuations_ptid, do_all_continuations_thread_callback)
+	(do_all_continuations_thread, do_all_continuations)
+	(discard_all_continuations_thread_callback)
+	(discard_all_continuations_thread, discard_all_continuations)
+	(add_intermediate_continuation)
+	(do_all_intermediate_continuations_thread_callback)
+	(do_all_intermediate_continuations_thread)
+	(do_all_intermediate_continuations)
+	(discard_all_intermediate_continuations_thread_callback)
+	(discard_all_intermediate_continuations_thread)
+	(discard_all_intermediate_continuations): Delete.
+	* continuations.h (add_continuation, do_all_continuations)
+	(do_all_continuations_thread, discard_all_continuations)
+	(discard_all_continuations_thread, add_intermediate_continuation)
+	(do_all_intermediate_continuations)
+	(do_all_intermediate_continuations_thread)
+	(discard_all_intermediate_continuations)
+	(discard_all_intermediate_continuations_thread): Delete
+	declarations.
+	* event-top.c (stdin_event_handler): Delete references to
+	continuations.
+	* gdbthread.h (struct thread_info): Delete continuations and
+	intermediate_continuations fields.
+	* inf-loop.c (inferior_event_handler): Remove references to
+	continuations.
+	* infrun.c (infrun_thread_stop_requested_callback): Remove
+	references to continuations.
+	* target.h (enum inferior_event_type) <INF_EXEC_CONTINUE>: Delete.
+	* thread.c: Don't include "continuations.h".
+	(clear_thread_inferior_resources): Remove references to
+	continuations.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* infcall.c (struct dummy_frame_context_saver): Delete.
+	(dummy_frame_context_saver_free, dummy_frame_context_saver_dtor)
+	(dummy_frame_context_saver_drop)
+	(dummy_frame_context_saver_cleanup)
+	(dummy_frame_context_saver_get_regs)
+	(dummy_frame_context_saver_setup): Delete.
+	* infcall.h (dummy_frame_context_saver_drop)
+	(dummy_frame_context_saver_cleanup)
+	(dummy_frame_context_saver_get_regs, dummy_frame_context_saver):
+	Delete.
+	(get_return_value): Remove 'ctx_saver' paremeter.  Adjust.
+	* inferior.h (get_return_value): Remove 'ctx_saver' paremeter.
+	* python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Adjust.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c: Include "thread-fsm.h".
+	(struct until_break_command_continuation_args): Delete.
+	(struct until_break_fsm): New.
+	(until_break_fsm_ops): New global.
+	(new_until_break_fsm, until_break_fsm_should_stop): New functions.
+	(until_break_command_continuation): Delete.
+	(until_break_fsm_clean_up): New function.
+	(until_break_fsm_async_reply_reason): New function.
+	(until_break_command): Adjust to create an until_break_fsm instead
+	of a continuation.
+	(momentary_bkpt_print_it): No longer print MI's async-stop-reason
+	here.
+	* infcmd.c (struct until_next_fsm): New.
+	(until_next_fsm_ops): New global.
+	(new_until_next_fsm, until_next_fsm_should_stop): New function.
+	(until_next_continuation): Delete.
+	(until_next_fsm_clean_up, until_next_fsm_async_reply_reason): New
+	functions.
+	(until_next_command): Adjust to create a new until_next_fsm
+	instead of a continuation.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* infcall.c: Include thread_fsm.h.
+	(struct call_return_meta_info): New.
+	(get_call_return_value): New function, factored out from
+	call_function_by_hand_dummy.
+	(struct call_thread_fsm): New.
+	(call_thread_fsm_ops): New global.
+	(new_call_thread_fsm, call_thread_fsm_should_stop)
+	(call_thread_fsm_should_notify_stop): New functions.
+	(run_inferior_call): Add 'sm' parameter.  Associate the FSM with
+	the thread.
+	(call_function_by_hand_dummy): Create a new call_thread_fsm
+	instance, associate it with the thread, and wait for the FSM to
+	finish.  If finished successfully, fetch the function's result
+	value out of the FSM.
+	* infrun.c (fetch_inferior_event): If the FSM says the stop
+	shouldn't be notified, don't call normal_stop.
+	(maybe_remove_breakpoints): New function, factored out from ...
+	(normal_stop): ... here.  Simplify.
+	* infrun.h (maybe_remove_breakpoints): Declare.
+	* thread-fsm.c (thread_fsm_should_notify_stop): New function.
+	(thread-fsm.h) <struct thread_fsm_ops>: New field.
+	(thread_fsm_should_notify_stop): Declare.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMMON_OBS): Add thread-fsm.o.
+	* breakpoint.c (handle_jit_event): Print debug output.
+	(bpstat_what): Split event callback handling to ...
+	(bpstat_run_callbacks): ... this new function.
+	(momentary_bkpt_print_it): No longer handle bp_finish here.
+	* breakpoint.h (bpstat_run_callbacks): Declare.
+	* gdbthread.h (struct thread_info) <step_multi>: Delete field.
+	<thread_fsm>: New field.
+	(thread_cancel_execution_command): Declare.
+	* infcmd.c: Include thread-fsm.h.
+	(struct step_command_fsm): New.
+	(step_command_fsm_ops): New global.
+	(new_step_command_fsm, step_command_fsm_prepare): New functions.
+	(step_1): Adjust to use step_command_fsm_prepare and
+	prepare_one_step.
+	(struct step_1_continuation_args): Delete.
+	(step_1_continuation): Delete.
+	(step_command_fsm_should_stop): New function.
+	(step_once): Delete.
+	(step_command_fsm_clean_up, step_command_fsm_async_reply_reason)
+	(prepare_one_step): New function, based on step_once.
+	(until_next_command): Remove step_multi reference.
+	(struct return_value_info): New.
+	(print_return_value): Rename to ...
+	(print_return_value_1): ... this.  New struct return_value_info
+	parameter.  Adjust.
+	(print_return_value): Reimplement as wrapper around
+	print_return_value_1.
+	(struct finish_command_fsm): New.
+	(finish_command_continuation): Delete.
+	(finish_command_fsm_ops): New global.
+	(new_finish_command_fsm, finish_command_fsm_should_stop): New
+	functions.
+	(finish_command_fsm_clean_up, finish_command_fsm_return_value):
+	New.
+	(finish_command_continuation_free_arg): Delete.
+	(finish_command_fsm_async_reply_reason): New.
+	(finish_backward, finish_forward): Change symbol parameter to a
+	finish_command_fsm.  Adjust.
+	(finish_command): Create a finish_command_fsm.  Adjust.
+	* infrun.c: Include "thread-fsm.h".
+	(clear_proceed_status_thread): Delete the thread's FSM.
+	(infrun_thread_stop_requested_callback): Cancel the thread's
+	execution command.
+	(clean_up_just_stopped_threads_fsms): New function.
+	(fetch_inferior_event): Handle the event_thread's should_stop
+	method saying the command isn't done yet.
+	(process_event_stop_test): Run breakpoint callbacks here.
+	(print_stop_event): Rename to ...
+	(print_stop_location): ... this.
+	(restore_current_uiout_cleanup): New function.
+	(print_stop_event): Reimplement.
+	(normal_stop): No longer notify the end_stepping_range observers
+	here handle "step N" nor "finish" here.  No longer call
+	print_stop_event here.
+	* infrun.h (struct return_value_info): Forward declare.
+	(print_return_value): Declare.
+	(print_stop_event): Change prototype.
+	* thread-fsm.c: New file.
+	* thread-fsm.h: New file.
+	* thread.c: Include "thread-fsm.h".
+	(thread_cancel_execution_command): New function.
+	(clear_thread_inferior_resources): Call it.
+	* cli/cli-interp.c (cli_on_normal_stop): New function.
+	(cli_interpreter_init): Install cli_on_normal_stop as normal_stop
+	observer.
+	* mi/mi-interp.c: Include "thread-fsm.h".
+	(restore_current_uiout_cleanup): Delete.
+	(mi_on_normal_stop): If the thread has an FSM associated, and it
+	finished, ask it for the async-reply-reason to print.  Always call
+	print_stop_event here, regardless of the top-level interpreter.
+	Check bpstat_what to tell whether an asynchronous breakpoint hit
+	triggered.
+	* tui/tui-interp.c (tui_on_normal_stop): New function.
+	(tui_init): Install tui_on_normal_stop as normal_stop observer.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (bpstat_do_actions_1, until_break_command): Don't
+	check whether the target can async.
+	* inf-loop.c (inferior_event_handler): Only call target_async if
+	the target can async.
+	* infcall.c: Include top.h and interps.h.
+	(run_inferior_call): For the interpreter to sync mode while
+	running the infcall.  Call wait_sync_command_done instead of
+	wait_for_inferior plus normal_stop.
+	* infcmd.c (prepare_execution_command): Don't check whether the
+	target can async when running in the foreground.
+	(step_1): Delete synchronous case handling.
+	(step_once): Always install a continuation, even in sync mode.
+	(until_next_command, finish_forward): Don't check whether the
+	target can async.
+	(attach_command_post_wait, notice_new_inferior): Always install a
+	continuation, even in sync mode.
+	* infrun.c (mark_infrun_async_event_handler): New function.
+	(proceed): In sync mode, mark infrun's event source instead of
+	waiting for events here.
+	(fetch_inferior_event): If the target can't async, do a blocking
+	wait.
+	(prepare_to_wait): In sync mode, mark infrun's event source.
+	(infrun_async_inferior_event_handler): No longer bail out if the
+	target can't async.
+	* infrun.h (mark_infrun_async_event_handler): New declaration.
+	* linux-nat.c (linux_nat_wait_1): Remove calls to
+	set_sigint_trap/clear_sigint_trap.
+	(linux_nat_terminal_inferior): No longer check whether the target
+	can async.
+	* mi/mi-interp.c (mi_on_sync_execution_done): Update and simplify
+	comment.
+	(mi_execute_command_input_handler): No longer check whether the
+	target is async.  Update and simplify comment.
+	* target.c (default_target_wait): New function.
+	* target.h (struct target_ops) <to_wait>: Now defaults to
+	default_target_wait.
+	(default_target_wait): Declare.
+	* top.c (wait_sync_command_done): New function, factored out from
+	...
+	(maybe_wait_sync_command_done): ... this.
+	* top.h (wait_sync_command_done): Declare.
+	* target-delegates.c: Regenerate.
+
+2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.h (struct btrace_target_info) <ptr_bits>: Remove.
+	* nat/linux-btrace.c: Include filestuff.h and inttypes.h.
+	Remove include of sys/utsname.h.
+	(linux_determine_kernel_ptr_bits): Remove.
+	(linux_determine_kernel_start): New.
+	(perf_event_is_kernel_addr): Remove tinfo argument.  Update users.
+	Update check.
+	(perf_event_skip_bts_record): Remove tinfo argument.  Update users.
+	(linux_enable_bts, linux_enable_pt): Remove tinfo->ptr_bits
+	initialization.
+	* x86-linux-nat.c (x86_linux_enable_btrace): Remove ptr_bits
+	assignment.
+
+2015-09-07  Pedro Alves  <palves@redhat.com>
+
+	* guile/guile-internal.h (as_a_scm_t_subr): New.
+	* guile/guile.c (misc_guile_functions): Use it.
+	* guile/scm-arch.c (arch_functions): Use it.
+	* guile/scm-block.c (block_functions, gdbscm_initialize_blocks):
+	Use it.
+	* guile/scm-breakpoint.c (breakpoint_functions): Use it.
+	* guile/scm-cmd.c (command_functions): Use it.
+	* guile/scm-disasm.c (disasm_functions): Use it.
+	* guile/scm-exception.c (exception_functions)
+	(private_exception_functions): Use it.
+	* guile/scm-frame.c (frame_functions)
+	* guile/scm-gsmob.c (gsmob_functions): Use it.
+	* guile/scm-iterator.c (iterator_functions): Use it.
+	* guile/scm-lazy-string.c (lazy_string_functions): Use it.
+	* guile/scm-math.c (math_functions): Use it.
+	* guile/scm-objfile.c (objfile_functions): Use it.
+	* guile/scm-param.c (parameter_functions): Use it.
+	* guile/scm-ports.c (port_functions, private_port_functions): Use
+	it.
+	* guile/scm-pretty-print.c (pretty_printer_functions): Use it.
+	* guile/scm-progspace.c (pspace_functions): Use it.
+	* guile/scm-string.c (string_functions): Use it.
+	* guile/scm-symbol.c (symbol_functions): Use it.
+	* guile/scm-symtab.c (symtab_functions): Use it.
+	* guile/scm-type.c (type_functions, gdbscm_initialize_types): Use
+	it.
+	* guile/scm-value.c (value_functions): Use it.
+
+2015-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-data.c (win_with_focus): Remove cast of NULL pointer.
+	(tui_next_win): Likewise.
+	(tui_prev_win): Likewise.
+	(tui_partial_win_by_name): Likewise.
+	(tui_init_generic_part): Likewise.
+	(init_content_element): Likewise.
+	(tui_del_window): Likewise.
+	(tui_free_window): Likewise.
+	(tui_del_data_windows): Likewise.
+	(tui_free_data_content): Likewise.
+	* tui/tui-layout.c (make_source_or_disasm_window): Likewise.
+	* tui/tui-regs.c (tui_show_register_group): Likewise.
+	* tui/tui-win.c (tui_resize_all): Likewise.
+	(tui_set_focus): Likewise.
+	(tui_set_win_height): Likewise.
+	(make_invisible_and_set_new_height): Likewise.
+	* tui/tui-windata.c (tui_delete_data_content_windows): Likewise.
+	* tui/tui-wingeneral.c (make_visible): Likewise.
+
+2015-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-decode.c (find_cmd): Remove cast of NULL pointer.
+
+2015-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* c-valprint.c (print_unpacked_pointer): Remove cast of NULL
+	pointer.
+	* dbxread.c (dbx_end_psymtab): Likewise.
+	* gnu-nat.c (gnu_write_inferior): Likewise.
+	* mdebugread.c (cross_ref): Likewise.
+	* p-valprint.c (pascal_val_print): Likewise.
+	* xcoffread.c (xcoff_end_psymtab): Likewise.
+
+2015-09-04  Yao Qi  <yao.qi@linaro.org>
+
+	* NEWS: Mention the aarch64 multi-arch debugging support.
+
+2015-09-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (ada_language_arch_info): Create a TYPE_CODE_CHAR
+	type instead of a TYPE_CODE_INT one for the string_char_type
+	and the ada_primitive_type_char types.
+
+2015-09-03  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_region_ok_for_hw_watchpoint):
+	Move code to aarch64_linux_region_ok_for_watchpoint.  Call
+	aarch64_linux_region_ok_for_watchpoint.
+	* nat/aarch64-linux-hw-point.c (aarch64_linux_region_ok_for_watchpoint):
+	New function.
+	* nat/aarch64-linux-hw-point.h (aarch64_linux_region_ok_for_watchpoint):
+	Declare it.
+
+2015-09-02  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb_obstack.h (obstack_strdup): Declare.
+	* gdb_obstack.c (obstack_strdup): Define.
+	* gdbarch.sh (gdbarch_obstack_strdup): Declare and define.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+	* gdbtypes.c (arch_type): Use gdbarch_obstack_strdup.
+
+2015-09-02  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdbtypes.c (copy_type_recursive): Update documentation.
+
+2015-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* solib-svr4.c (solib_event_probe_action): Initialize 'probe_argc'
+	as zero.
+
+2015-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* solib-svr4.c (svr4_handle_solib_event): Initialize 'val' as NULL
+
+2015-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* solib-svr4.c (solib_event_probe_action): Call
+	get_probe_argument_count using TRY...CATCH.
+	(svr4_handle_solib_event): Likewise, for evaluate_probe_argument.
+
+2015-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* probe.h (struct probe_ops) <get_probe_argument_count,
+	evaluate_probe_argument, enable_probe, disable_probe>: Mention in
+	the comment that the function can throw an exception.
+	(get_probe_argument_count): Likewise.
+	(evaluate_probe_argument): Likewise.
+	* stap-probe.c (stap_get_opcode): Call error instead of
+	internal_error.
+	(stap_get_expected_argument_type): Likewise.  Add argument
+	'probe'.  Improve error message by mentioning the probe's name.
+	(stap_parse_probe_arguments): Adjust call to
+	stap_get_expected_argument_type.
+	(stap_get_arg): Add comment.  Assert that 'probe->args_parsed' is
+	not zero.  Call internal_error if GDB requests an argument but the
+	probe has no arguments.
+
+2015-09-01  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (ada_resolve_function): Do not ask the user what
+	match to use when in completion mode.
+
+2015-08-31  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-data.c (tui_win_name): Make local variable const, remove
+	cast of NULL.
+
+2015-08-31  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize
+	call_abi using XSHAL_ABI macro.
+
+2015-08-29  Doug Evans  <xdje42@gmail.com>
+
+	* symtab.h (struct symbol): Tweak comment.
+
+2015-08-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdbtypes.c (alloc_type_arch): Allocate the type on the given
+	gdbarch obstack instead of on the heap.  Update commentary
+	accordingly.
+
+2015-08-28  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.10 released.
+
+2015-08-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* NEWS: Update entry about non-8-bits addressable memory.
+
+2015-08-28  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	Revert:
+	2014-11-06  Doug Evans  <xdje42@gmail.com>
+	* solib.c (solib_global_lookup): Fetch arch from objfile,
+	not target_gdbarch.
+
+2015-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* ppc-linux-tdep.c (ppc_linux_spe_context_lookup): Do not
+	attempt to relocate a TLS variable offset.
+
+2015-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* spu-multiarch.c (parse_spufs_run): Bail out if inferior is not
+	registered yet.  Set inferior_ptid while calling target_read_memory.
+
+2015-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* nat/linux-ptrace.h (GDB_ARCH_TRAP_BRKPT): Replace by ...
+	(GDB_ARCH_IS_TRAP_BRKPT): ... this.  Add __powerpc__ case.
+	* linux-nat.c (check_stopped_by_breakpoint): Use
+	GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
+
+2015-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* linux-thread-db.c (thread_db_get_thread_local_address): If the
+	thread was not yet discovered, use thread_from_lwp instead of
+	calling thread_db_find_new_threads_1.
+
+2015-08-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* m88k-tdep.c (m88k_analyze_prologue): Fix inverted allocation
+	statements.
+
+2015-08-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* NEWS: Document support for non-8-bits addressable memory.
+
+2015-08-27  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac: Remove AC_TYPE_SIGNAL call.
+	* configure, config.in: Regenerate.
+
+2015-08-27  Pedro Alves  <palves@redhat.com>
+
+	* cp-support.c (gdb_demangle): Use sighandler_t.  Remove cast.
+	* extension-priv.h: Include signal.h.
+	(struct signal_handler) <handler>: Change type to sighandler_t.
+	* extension.c (install_gdb_sigint_handler): Use sighandler_t.
+	* inflow.c (sigint_ours, sigquit_ours): Change type to
+	sighandler_t.
+	(child_terminal_inferior): Remove casts.
+	(child_terminal_ours_1, new_tty): Use sighandler_t.  Remove casts.
+	(osig): Change type to sighandler_t.
+	* nto-procfs.c (ofunc): Change type to sighandler_t.
+	(procfs_wait): Remove casts.
+	* remote-m32r-sdi.c (m32r_wait, m32r_load): Use sighandler_t.
+	* remote-sim.c (gdbsim_wait): Use sighandler_t.
+	* utils.c (wait_to_die_with_timeout): Use sighandler_t.
+
+2015-08-27  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add signal-h.
+	* gnulib/aclocal.m4: Renegerate.
+	* gnulib/config.in: Renegerate.
+	* gnulib/configure: Renegerate.
+	* gnulib/import/Makefile.am: Update.
+	* gnulib/import/Makefile.in: Regenerate.
+	* gnulib/import/m4/gnulib-cache.m4: Update.
+	* gnulib/import/m4/gnulib-comp.m4: Update.
+	* gnulib/import/m4/signal_h.m4: New file.
+	* gnulib/import/signal.in.h: New file.
+
+2015-08-27  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE)
+	(MIN_MEMORY_PACKET_SIZE): New.
+	(MAX_REMOTE_PACKET_SIZE, MIN_REMOTE_PACKET_SIZE): Delete.
+	(get_memory_packet_size): Adjust.  No longer limit the max packet
+	size.
+	(set_memory_packet_size): Adjust, and remove dead code.
+	(remote_check_symbols): Use xmalloc and a cleanup instead of
+	alloca.
+	(remote_packet_size): No longer cap the packet size.
+	(putpkt_binary): Use xmalloc and a cleanup instead of alloca.
+
+2015-08-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* compile/compile.c (compile_to_object): Mention language in
+	error message.
+
+2015-08-26  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* target.c (target_pre_inferior): Unset attach_flag.
+
+2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdbarch.sh (append_name): Fix type in XRESIZEVEC.
+	* gdbarch.c: Re-generate.
+
+2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* aarch64-linux-nat.c (aarch64_add_process): Replace xmalloc-family
+	function with the XNEW-family equivalent.
+	* aarch64-tdep.c (aarch64_gdbarch_init): Likewise.
+	* ada-exp.y (write_ambiguous_var): Likewise.
+	* ada-lang.c (resolve_subexp): Likewise.
+	(user_select_syms): Likewise.
+	(assign_aggregate): Likewise.
+	(ada_evaluate_subexp): Likewise.
+	(cache_symbol): Likewise.
+	* addrmap.c (allocate_key): Likewise.
+	(addrmap_create_mutable): Likewise.
+	* aix-thread.c (sync_threadlists): Likewise.
+	* alpha-tdep.c (alpha_push_dummy_call): Likewise.
+	(alpha_gdbarch_init): Likewise.
+	* amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
+	* arm-linux-nat.c (arm_linux_add_process): Likewise.
+	* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
+	* arm-tdep.c (push_stack_item): Likewise.
+	(arm_displaced_step_copy_insn): Likewise.
+	(arm_gdbarch_init): Likewise.
+	(_initialize_arm_tdep): Likewise.
+	* avr-tdep.c (push_stack_item): Likewise.
+	* ax-general.c (new_agent_expr): Likewise.
+	* block.c (block_initialize_namespace): Likewise.
+	* breakpoint.c (alloc_counted_command_line): Likewise.
+	(update_dprintf_command_list): Likewise.
+	(parse_breakpoint_sals): Likewise.
+	(decode_static_tracepoint_spec): Likewise.
+	(until_break_command): Likewise.
+	(clear_command): Likewise.
+	(update_global_location_list): Likewise.
+	(get_breakpoint_objfile_data) Likewise.
+	* btrace.c (ftrace_new_function): Likewise.
+	(btrace_set_insn_history): Likewise.
+	(btrace_set_call_history): Likewise.
+	* buildsym.c (add_symbol_to_list): Likewise.
+	(record_pending_block): Likewise.
+	(start_subfile): Likewise.
+	(start_buildsym_compunit): Likewise.
+	(push_subfile): Likewise.
+	(end_symtab_get_static_block): Likewise.
+	(buildsym_init): Likewise.
+	* cli/cli-cmds.c (source_command): Likewise.
+	* cli/cli-decode.c (add_cmd): Likewise.
+	* cli/cli-script.c (build_command_line): Likewise.
+	(setup_user_args): Likewise.
+	(realloc_body_list): Likewise.
+	(process_next_line): Likewise.
+	(copy_command_lines): Likewise.
+	* cli/cli-setshow.c (do_set_command): Likewise.
+	* coff-pe-read.c (read_pe_exported_syms): Likewise.
+	* coffread.c (coff_locate_sections): Likewise.
+	(coff_symtab_read): Likewise.
+	(coff_read_struct_type): Likewise.
+	* common/cleanups.c (make_my_cleanup2): Likewise.
+	* common/common-exceptions.c (throw_it): Likewise.
+	* common/filestuff.c (make_cleanup_close): Likewise.
+	* common/format.c (parse_format_string): Likewise.
+	* common/queue.h (DEFINE_QUEUE_P): Likewise.
+	* compile/compile-object-load.c (munmap_list_add): Likewise.
+	(compile_object_load): Likewise.
+	* compile/compile-object-run.c (compile_object_run): Likewise.
+	* compile/compile.c (append_args): Likewise.
+	* corefile.c (specify_exec_file_hook): Likewise.
+	* cp-support.c (make_symbol_overload_list): Likewise.
+	* cris-tdep.c (push_stack_item): Likewise.
+	(cris_gdbarch_init): Likewise.
+	* ctf.c (ctf_trace_file_writer_new): Likewise.
+	* dbxread.c (init_header_files): Likewise.
+	(add_new_header_file): Likewise.
+	(init_bincl_list): Likewise.
+	(dbx_end_psymtab): Likewise.
+	(start_psymtab): Likewise.
+	(dbx_end_psymtab): Likewise.
+	* dcache.c (dcache_init): Likewise.
+	* dictionary.c (dict_create_hashed): Likewise.
+	(dict_create_hashed_expandable): Likewise.
+	(dict_create_linear): Likewise.
+	(dict_create_linear_expandable): Likewise.
+	* dtrace-probe.c (dtrace_process_dof_probe): Likewise.
+	* dummy-frame.c (register_dummy_frame_dtor): Likewise.
+	* dwarf2-frame-tailcall.c (cache_new_ref1): Likewise.
+	* dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
+	(decode_frame_entry_1): Likewise.
+	* dwarf2expr.c (new_dwarf_expr_context): Likewise.
+	* dwarf2loc.c (dwarf2_compile_expr_to_ax): Likewise.
+	* dwarf2read.c (dwarf2_has_info): Likewise.
+	(create_signatured_type_table_from_index): Likewise.
+	(dwarf2_read_index): Likewise.
+	(dw2_get_file_names_reader): Likewise.
+	(create_all_type_units): Likewise.
+	(read_cutu_die_from_dwo): Likewise.
+	(init_tu_and_read_dwo_dies): Likewise.
+	(init_cutu_and_read_dies): Likewise.
+	(create_all_comp_units): Likewise.
+	(queue_comp_unit): Likewise.
+	(inherit_abstract_dies): Likewise.
+	(read_call_site_scope): Likewise.
+	(dwarf2_add_field): Likewise.
+	(dwarf2_add_typedef): Likewise.
+	(dwarf2_add_member_fn): Likewise.
+	(attr_to_dynamic_prop): Likewise.
+	(abbrev_table_alloc_abbrev): Likewise.
+	(abbrev_table_read_table): Likewise.
+	(add_include_dir): Likewise.
+	(add_file_name): Likewise.
+	(dwarf_decode_line_header): Likewise.
+	(dwarf2_const_value_attr): Likewise.
+	(dwarf_alloc_block): Likewise.
+	(parse_macro_definition): Likewise.
+	(set_die_type): Likewise.
+	(write_psymtabs_to_index): Likewise.
+	(create_cus_from_index): Likewise.
+	(dwarf2_create_include_psymtab): Likewise.
+	(process_psymtab_comp_unit_reader): Likewise.
+	(build_type_psymtab_dependencies): Likewise.
+	(read_comp_units_from_section): Likewise.
+	(compute_compunit_symtab_includes): Likewise.
+	(create_dwo_unit_in_dwp_v1): Likewise.
+	(create_dwo_unit_in_dwp_v2): Likewise.
+	(read_func_scope): Likewise.
+	(process_structure_scope): Likewise.
+	(mark_common_block_symbol_computed): Likewise.
+	(load_partial_dies): Likewise.
+	(dwarf2_symbol_mark_computed): Likewise.
+	* elfread.c (elf_symfile_segments): Likewise.
+	(elf_read_minimal_symbols): Likewise.
+	* environ.c (make_environ): Likewise.
+	* eval.c (evaluate_subexp_standard): Likewise.
+	* event-loop.c (create_file_handler): Likewise.
+	(create_async_signal_handler): Likewise.
+	(create_async_event_handler): Likewise.
+	(create_timer): Likewise.
+	* exec.c (build_section_table): Likewise.
+	* fbsd-nat.c (fbsd_remember_child): Likewise.
+	* fork-child.c (fork_inferior): Likewise.
+	* frv-tdep.c (new_variant): Likewise.
+	* gdbarch.sh (gdbarch_alloc): Likewise.
+	(append_name): Likewise.
+	* gdbtypes.c (rank_function): Likewise.
+	(copy_type_recursive): Likewise.
+	(add_dyn_prop): Likewise.
+	* gnu-nat.c (make_proc): Likewise.
+	(make_inf): Likewise.
+	(gnu_write_inferior): Likewise.
+	* gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
+	(build_std_type_info_type): Likewise.
+	* guile/scm-param.c (compute_enum_list): Likewise.
+	* guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
+	* guile/scm-value.c (gdbscm_value_call): Likewise.
+	* h8300-tdep.c (h8300_gdbarch_init): Likewise.
+	* hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
+	(read_unwind_info): Likewise.
+	* ia64-tdep.c (ia64_gdbarch_init): Likewise.
+	* infcall.c (dummy_frame_context_saver_setup): Likewise.
+	(call_function_by_hand_dummy): Likewise.
+	* infcmd.c (step_once): Likewise.
+	(finish_forward): Likewise.
+	(attach_command): Likewise.
+	(notice_new_inferior): Likewise.
+	* inferior.c (add_inferior_silent): Likewise.
+	* infrun.c (add_displaced_stepping_state): Likewise.
+	(save_infcall_control_state): Likewise.
+	(save_inferior_ptid): Likewise.
+	(_initialize_infrun): Likewise.
+	* jit.c (bfd_open_from_target_memory): Likewise.
+	(jit_gdbarch_data_init): Likewise.
+	* language.c (add_language): Likewise.
+	* linespec.c (decode_line_2): Likewise.
+	* linux-nat.c (add_to_pid_list): Likewise.
+	(add_initial_lwp): Likewise.
+	* linux-thread-db.c (add_thread_db_info): Likewise.
+	(record_thread): Likewise.
+	(info_auto_load_libthread_db): Likewise.
+	* m32c-tdep.c (m32c_gdbarch_init): Likewise.
+	* m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
+	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
+	* m88k-tdep.c (m88k_analyze_prologue): Likewise.
+	* macrocmd.c (macro_define_command): Likewise.
+	* macroexp.c (gather_arguments): Likewise.
+	* macroscope.c (sal_macro_scope): Likewise.
+	* macrotab.c (new_macro_table): Likewise.
+	* mdebugread.c (push_parse_stack): Likewise.
+	(parse_partial_symbols): Likewise.
+	(parse_symbol): Likewise.
+	(psymtab_to_symtab_1): Likewise.
+	(new_block): Likewise.
+	(new_psymtab): Likewise.
+	(mdebug_build_psymtabs): Likewise.
+	(add_pending): Likewise.
+	(elfmdebug_build_psymtabs): Likewise.
+	* mep-tdep.c (mep_gdbarch_init): Likewise.
+	* mi/mi-main.c (mi_execute_command): Likewise.
+	* mi/mi-parse.c (mi_parse_argv): Likewise.
+	* minidebug.c (lzma_open): Likewise.
+	* minsyms.c (terminate_minimal_symbol_table): Likewise.
+	* mips-linux-nat.c (mips_linux_insert_watchpoint): Likewise.
+	* mips-tdep.c (mips_gdbarch_init): Likewise.
+	* mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
+	* msp430-tdep.c (msp430_gdbarch_init): Likewise.
+	* mt-tdep.c (mt_registers_info): Likewise.
+	* nat/aarch64-linux.c (aarch64_linux_new_thread): Likewise.
+	* nat/linux-btrace.c (linux_enable_bts): Likewise.
+	(linux_enable_pt): Likewise.
+	* nat/linux-osdata.c (linux_xfer_osdata_processes): Likewise.
+	(linux_xfer_osdata_processgroups): Likewise.
+	* nios2-tdep.c (nios2_gdbarch_init): Likewise.
+	* nto-procfs.c (procfs_meminfo): Likewise.
+	* objc-lang.c (start_msglist): Likewise.
+	(selectors_info): Likewise.
+	(classes_info): Likewise.
+	(find_methods): Likewise.
+	* objfiles.c (allocate_objfile): Likewise.
+	(update_section_map): Likewise.
+	* osabi.c (gdbarch_register_osabi): Likewise.
+	(gdbarch_register_osabi_sniffer): Likewise.
+	* parse.c (start_arglist): Likewise.
+	* ppc-linux-nat.c (hwdebug_find_thread_points_by_tid): Likewise.
+	(hwdebug_insert_point): Likewise.
+	* printcmd.c (display_command): Likewise.
+	(ui_printf): Likewise.
+	* procfs.c (create_procinfo): Likewise.
+	(load_syscalls): Likewise.
+	(proc_get_LDT_entry): Likewise.
+	(proc_update_threads): Likewise.
+	* prologue-value.c (make_pv_area): Likewise.
+	(pv_area_store): Likewise.
+	* psymtab.c (extend_psymbol_list): Likewise.
+	(init_psymbol_list): Likewise.
+	(allocate_psymtab): Likewise.
+	* python/py-inferior.c (add_thread_object): Likewise.
+	* python/py-param.c (compute_enum_values): Likewise.
+	* python/py-value.c (valpy_call): Likewise.
+	* python/py-varobj.c (py_varobj_iter_next): Likewise.
+	* python/python.c (ensure_python_env): Likewise.
+	* record-btrace.c (record_btrace_start_replaying): Likewise.
+	* record-full.c (record_full_reg_alloc): Likewise.
+	(record_full_mem_alloc): Likewise.
+	(record_full_end_alloc): Likewise.
+	(record_full_core_xfer_partial): Likewise.
+	* regcache.c (get_thread_arch_aspace_regcache): Likewise.
+	* remote-fileio.c (remote_fileio_init_fd_map): Likewise.
+	* remote-notif.c (remote_notif_state_allocate): Likewise.
+	* remote.c (demand_private_info): Likewise.
+	(remote_notif_stop_alloc_reply): Likewise.
+	(remote_enable_btrace): Likewise.
+	* reverse.c (save_bookmark_command): Likewise.
+	* rl78-tdep.c (rl78_gdbarch_init): Likewise.
+	* rx-tdep.c (rx_gdbarch_init): Likewise.
+	* s390-linux-nat.c (s390_insert_watchpoint): Likewise.
+	* ser-go32.c (dos_get_tty_state): Likewise.
+	(dos_copy_tty_state): Likewise.
+	* ser-mingw.c (ser_windows_open): Likewise.
+	(ser_console_wait_handle): Likewise.
+	(ser_console_get_tty_state): Likewise.
+	(make_pipe_state): Likewise.
+	(net_windows_open): Likewise.
+	* ser-unix.c (hardwire_get_tty_state): Likewise.
+	(hardwire_copy_tty_state): Likewise.
+	* solib-aix.c (solib_aix_new_lm_info): Likewise.
+	* solib-dsbt.c (dsbt_current_sos): Likewise.
+	(dsbt_relocate_main_executable): Likewise.
+	* solib-frv.c (frv_current_sos): Likewise.
+	(frv_relocate_main_executable): Likewise.
+	* solib-spu.c (spu_bfd_fopen): Likewise.
+	* solib-svr4.c (lm_info_read): Likewise.
+	(svr4_copy_library_list): Likewise.
+	(svr4_default_sos): Likewise.
+	* source.c (find_source_lines): Likewise.
+	(line_info): Likewise.
+	(add_substitute_path_rule): Likewise.
+	* spu-linux-nat.c (spu_bfd_open): Likewise.
+	* spu-tdep.c (info_spu_dma_cmdlist): Likewise.
+	* stabsread.c (dbx_lookup_type): Likewise.
+	(read_type): Likewise.
+	(read_member_functions): Likewise.
+	(read_struct_fields): Likewise.
+	(read_baseclasses): Likewise.
+	(read_args): Likewise.
+	(_initialize_stabsread): Likewise.
+	* stack.c (func_command): Likewise.
+	* stap-probe.c (handle_stap_probe): Likewise.
+	* symfile.c (addrs_section_sort): Likewise.
+	(addr_info_make_relative): Likewise.
+	(load_section_callback): Likewise.
+	(add_symbol_file_command): Likewise.
+	(init_filename_language_table): Likewise.
+	* symtab.c (create_filename_seen_cache): Likewise.
+	(sort_search_symbols_remove_dups): Likewise.
+	(search_symbols): Likewise.
+	* target.c (make_cleanup_restore_target_terminal): Likewise.
+	* thread.c (new_thread): Likewise.
+	(enable_thread_stack_temporaries): Likewise.
+	(make_cleanup_restore_current_thread): Likewise.
+	(thread_apply_all_command): Likewise.
+	* tic6x-tdep.c (tic6x_gdbarch_init): Likewise.
+	* top.c (gdb_readline_wrapper): Likewise.
+	* tracefile-tfile.c (tfile_trace_file_writer_new): Likewise.
+	* tracepoint.c (trace_find_line_command): Likewise.
+	(all_tracepoint_actions_and_cleanup): Likewise.
+	(make_cleanup_restore_current_traceframe): Likewise.
+	(get_uploaded_tp): Likewise.
+	(get_uploaded_tsv): Likewise.
+	* tui/tui-data.c (tui_alloc_generic_win_info): Likewise.
+	(tui_alloc_win_info): Likewise.
+	(tui_alloc_content): Likewise.
+	(tui_add_content_elements): Likewise.
+	* tui/tui-disasm.c (tui_find_disassembly_address): Likewise.
+	(tui_set_disassem_content): Likewise.
+	* ui-file.c (ui_file_new): Likewise.
+	(stdio_file_new): Likewise.
+	(tee_file_new): Likewise.
+	* utils.c (make_cleanup_restore_integer): Likewise.
+	(add_internal_problem_command): Likewise.
+	* v850-tdep.c (v850_gdbarch_init): Likewise.
+	* valops.c (find_oload_champ): Likewise.
+	* value.c (allocate_value_lazy): Likewise.
+	(record_latest_value): Likewise.
+	(create_internalvar): Likewise.
+	* varobj.c (install_variable): Likewise.
+	(new_variable): Likewise.
+	(new_root_variable): Likewise.
+	(cppush): Likewise.
+	(_initialize_varobj): Likewise.
+	* windows-nat.c (windows_make_so): Likewise.
+	* x86-nat.c (x86_add_process): Likewise.
+	* xcoffread.c (arrange_linetable): Likewise.
+	(allocate_include_entry): Likewise.
+	(process_linenos): Likewise.
+	(SYMBOL_DUP): Likewise.
+	(xcoff_start_psymtab): Likewise.
+	(xcoff_end_psymtab): Likewise.
+	* xml-support.c (gdb_xml_parse_attr_ulongest): Likewise.
+	* xtensa-tdep.c (xtensa_register_type): Likewise.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+
+2015-08-25  Don Breazeal  <donb@codesourcery.com>
+
+	* infrun.c (follow_exec): Re-order operations for
+	handling follow-exec-mode "new".
+	(handle_inferior_event_1): Assign ecs->event_thread
+	to the current thread.
+	* remote.c (get_remote_arch_state): Add an assertion.
+
+2015-08-26  Pedro Alves  <palves@redhat.com>
+
+	* MAINTAINERS: Add Markus Metzger as btrace maintainer.
+
+2015-08-25  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18804
+	* defs.h (maybe_quit): Declare.
+	(QUIT): Now calls maybe_quit.
+	* event-loop.c (clear_async_signal_handler)
+	(async_signal_handler_is_marked): New functions.
+	* event-loop.h (async_signal_handler_is_marked)
+	(clear_async_signal_handler): New declarations.
+	* remote.c (remote_check_pending_interrupt): New function.
+	(interrupt_query): Use make_cleanup_restore_target_terminal.  No
+	longer check whether the target is async.  If waiting for a stop
+	reply, and a Ctrl-C as been sent to the target, offer to
+	disconnect, and throw TARGET_CLOSE_ERROR instead of a quit.
+	Otherwise do not disconnect and throw a quit.
+	(_initialize_remote): Install remote_check_pending_interrupt as
+	to_check_pending_interrupt.
+	* target.c (target_check_pending_interrupt): New function.
+	* target.h (struct target_ops) <to_check_pending_interrupt>: New
+	field.
+	(target_check_pending_interrupt): New declaration.
+	* utils.c (maybe_quit): New function.
+	* target-delegates.c: Regenerate.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/aarch64-linux-hw-point.c (debug_reg_change_callback):
+	Rename local variable pid to tid, and get lwpid of lwp.  Update
+	debug output.
+
+2015-08-25  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (ada_read_var_value): Add a var_block argument
+	and pass it to default_read_var_value.
+	* block.c (block_static_link): New accessor.
+	* block.h (block_static_link): Declare it.
+	* buildsym.c (finish_block_internal): Add a static_link
+	argument.  If there is a static link, associate it to the new
+	block.
+	(finish_block): Add a static link argument and pass it to
+	finish_block_internal.
+	(end_symtab_get_static_block): Update calls to finish_block and
+	to finish_block_internal.
+	(end_symtab_with_blockvector): Update call to
+	finish_block_internal.
+	* buildsym.h: Forward-declare struct dynamic_prop.
+	(struct context_stack): Add a static_link field.
+	(finish_block): Add a static link argument.
+	* c-exp.y: Remove an obsolete comment (evaluation of variables
+	already start from the selected frame, and now they climb *up*
+	the call stack) and propagate the block information to the
+	produced expression.
+	* d-exp.y: Likewise.
+	* f-exp.y: Likewise.
+	* go-exp.y: Likewise.
+	* jv-exp.y: Likewise.
+	* m2-exp.y: Likewise.
+	* p-exp.y: Likewise.
+	* coffread.c (coff_symtab_read): Update calls to finish_block.
+	* dbxread.c (process_one_symbol): Likewise.
+	* xcoffread.c (read_xcoff_symtab): Likewise.
+	* compile/compile-c-symbols.c (convert_one_symbol): Promote the
+	"sym" parameter to struct block_symbol, update its uses and pass
+	its block to calls to read_var_value.
+	(convert_symbol_sym): Update the calls to convert_one_symbol.
+	* compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update
+	call to read_var_value.
+	* dwarf2loc.c (block_op_get_frame_base): New.
+	(dwarf2_block_frame_base_locexpr_funcs): Implement the
+	get_frame_base method.
+	(dwarf2_block_frame_base_loclist_funcs): Likewise.
+	(dwarf2locexpr_baton_eval): Add a frame argument and use it
+	instead of the selected frame in order to evaluate the
+	expression.
+	(dwarf2_evaluate_property): Add a frame argument.  Update call
+	to dwarf2_locexpr_baton_eval to provide a frame in available and
+	to handle the absence of address stack.
+	* dwarf2loc.h (dwarf2_evaluate_property): Add a frame argument.
+	* dwarf2read.c (attr_to_dynamic_prop): Add a forward
+	declaration.
+	(read_func_scope): Record any available static link description.
+	Update call to finish_block.
+	(read_lexical_block_scope): Update call to finish_block.
+	* findvar.c (follow_static_link): New.
+	(get_hosting_frame): New.
+	(default_read_var_value): Add a var_block argument.  Use
+	get_hosting_frame to handle non-local references.
+	(read_var_value): Add a var_block argument and pass it to the
+	LA_READ_VAR_VALUE method.
+	* gdbtypes.c (resolve_dynamic_range): Update calls to
+	dwarf2_evaluate_property.
+	(resolve_dynamic_type_internal): Likewise.
+	* guile/scm-frame.c (gdbscm_frame_read_var): Update call to
+	read_var_value, passing it the block coming from symbol lookup.
+	* guile/scm-symbol.c (gdbscm_symbol_value): Update call to
+	read_var_value (TODO).
+	* infcmd.c (finish_command_continuation): Update call to
+	read_var_value, passing it the block coming from symbol lookup.
+	* infrun.c (insert_exception_resume_breakpoint): Likewise.
+	* language.h (struct language_defn): Add a var_block argument to
+	the LA_READ_VAR_VALUE method.
+	* objfiles.c (struct static_link_htab_entry): New.
+	(static_link_htab_entry_hash): New.
+	(static_link_htab_entry_eq): New.
+	(objfile_register_static_link): New.
+	(objfile_lookup_static_link): New.
+	(free_objfile): Free the STATIC_LINKS hashed map if needed.
+	* objfiles.h: Include hashtab.h.
+	(struct objfile): Add a static_links field.
+	(objfile_register_static_link): New.
+	(objfile_lookup_static_link): New.
+	* printcmd.c (print_variable_and_value): Update call to
+	read_var_value.
+	* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
+	* python/py-frame.c (frapy_read_var): Update call to
+	read_var_value, passing it the block coming from symbol lookup.
+	* python/py-framefilter.c (extract_sym): Add a sym_block
+	parameter and set the pointed value to NULL (TODO).
+	(enumerate_args): Update call to extract_sym.
+	(enumerate_locals): Update calls to extract_sym and to
+	read_var_value.
+	* python/py-symbol.c (sympy_value): Update call to
+	read_var_value (TODO).
+	* stack.c (read_frame_local): Update call to read_var_value.
+	(read_frame_arg): Likewise.
+	(return_command): Likewise.
+	* symtab.h (struct symbol_block_ops): Add a get_frame_base
+	method.
+	(struct symbol): Add a block field.
+	(SYMBOL_BLOCK): New accessor.
+	* valops.c (value_of_variable): Remove frame/block handling and
+	pass the block argument to read_var_value, which does this job
+	now.
+	(value_struct_elt_for_reference): Update calls to
+	read_var_value.
+	(value_of_this): Pass the block found to read_var_value.
+	* value.h (read_var_value): Add a var_block argument.
+	(default_read_var_value): Likewise.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_new_thread): Move it to ...
+	* nat/aarch64-linux.c (aarch64_linux_new_thread): ... here.
+	* nat/aarch64-linux.h (aarch64_linux_new_thread): Declare.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (aarch64-liunx.o): New rule.
+	(HFILES_NO_SRCDIR): Add aarch64-linux.h.
+	* config/aarch64/linux.mh (NAT_FILE): Add aarch64-linux.o.
+	* aarch64-linux-nat.c: Include nat/aarch64-linux.h.
+	* aarch64-linux-nat.c (aarch64_get_debug_reg_state): Make it
+	extern.
+	(aarch64_linux_prepare_to_resume): Move it nat/aarch64-linux.c.
+	* nat/aarch64-linux-hw-point.h (aarch64_debug_reg_state): Declare
+	* nat/aarch64-linux.c: New file.
+	* nat/aarch64-linux.h: New file.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_prepare_to_resume): Use
+	lwp_arch_private_info and ptid_of_lwp.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (struct arch64_dr_update_callback_param):
+	Move it to nat/aarch64-linux-hw-point.c.
+	(debug_reg_change_callback): Likewise.
+	(aarch64_notify_debug_reg_change): :Likewise.
+	* nat/aarch64-linux-hw-point.c: Include nat/linux-nat.h.
+	(aarch64_dr_update_callback_param): New.
+	(debug_reg_change_callback): New function.
+	(aarch64_notify_debug_reg_change): Likewise.
+	* nat/aarch64-linux-hw-point.h (aarch64_notify_debug_reg_change):
+	Remove the declaration.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_notify_debug_reg_change):
+	Call current_lwp_ptid.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (debug_reg_change_callback): Use
+	debug_printf.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (debug_reg_change_callback): Call
+	ptid_get_pid rather than ptid_get_lwp.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* NEWS (New commands): Mention set/show remote
+	multiprocess-extensions-packet.
+	* remote.c (remote_query_supported): Only tell the server to use
+	the multiprocess extensions if the user hasn't force-disabled them
+	with "set remote multiprocess-extensions-packet off".
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
+	1029a8112290f6eee9d7878a391c49db42c999bd.
+	* gnulib/configure, gnulib/config.in, gnulib/aclocal.m4:
+	Regenerate.
+	* gnulib/import/Makefile.am: Update.
+	* gnulib/import/Makefile.in: Update.
+	* gnulib/import/alloca.in.h: Update.
+	* gnulib/import/basename-lgpl.c: Update.
+	* gnulib/import/canonicalize-lgpl.c: Update.
+	* gnulib/import/config.charset: Update.
+	* gnulib/import/dirent.in.h: Update.
+	* gnulib/import/dirfd.c: Update.
+	* gnulib/import/dirname-lgpl.c: Update.
+	* gnulib/import/dirname.h: Update.
+	* gnulib/import/dosname.h: Update.
+	* gnulib/import/errno.in.h: Update.
+	* gnulib/import/extra/snippet/arg-nonnull.h: Update.
+	* gnulib/import/extra/snippet/c++defs.h: Update.
+	* gnulib/import/extra/snippet/warn-on-use.h: Update.
+	* gnulib/import/extra/update-copyright: Update.
+	* gnulib/import/float+.h: Update.
+	* gnulib/import/float.c: Update.
+	* gnulib/import/float.in.h: Update.
+	* gnulib/import/fnmatch.c: Update.
+	* gnulib/import/fnmatch.in.h: Update.
+	* gnulib/import/fnmatch_loop.c: Update.
+	* gnulib/import/fpucw.h: Update.
+	* gnulib/import/frexp.c: Update.
+	* gnulib/import/frexpl.c: Update.
+	* gnulib/import/gettimeofday.c: Update.
+	* gnulib/import/inttypes.in.h: Update.
+	* gnulib/import/isnan.c: Update.
+	* gnulib/import/isnand-nolibm.h: Update.
+	* gnulib/import/isnand.c: Update.
+	* gnulib/import/isnanl-nolibm.h: Update.
+	* gnulib/import/isnanl.c: Update.
+	* gnulib/import/itold.c: Update.
+	* gnulib/import/localcharset.c: Update.
+	* gnulib/import/localcharset.h: Update.
+	* gnulib/import/lstat.c: Update.
+	* gnulib/import/m4/00gnulib.m4: Update.
+	* gnulib/import/m4/absolute-header.m4: Update.
+	* gnulib/import/m4/alloca.m4: Update.
+	* gnulib/import/m4/canonicalize.m4: Update.
+	* gnulib/import/m4/codeset.m4: Update.
+	* gnulib/import/m4/configmake.m4: Update.
+	* gnulib/import/m4/dirent_h.m4: Update.
+	* gnulib/import/m4/dirfd.m4: Update.
+	* gnulib/import/m4/dirname.m4: Update.
+	* gnulib/import/m4/double-slash-root.m4: Update.
+	* gnulib/import/m4/eealloc.m4: Update.
+	* gnulib/import/m4/errno_h.m4: Update.
+	* gnulib/import/m4/exponentd.m4: Update.
+	* gnulib/import/m4/exponentl.m4: Update.
+	* gnulib/import/m4/extensions.m4: Update.
+	* gnulib/import/m4/extern-inline.m4: Update.
+	* gnulib/import/m4/fcntl-o.m4: Update.
+	* gnulib/import/m4/float_h.m4: Update.
+	* gnulib/import/m4/fnmatch.m4: Update.
+	* gnulib/import/m4/fpieee.m4: Update.
+	* gnulib/import/m4/frexp.m4: Update.
+	* gnulib/import/m4/frexpl.m4: Update.
+	* gnulib/import/m4/gettimeofday.m4: Update.
+	* gnulib/import/m4/glibc21.m4: Update.
+	* gnulib/import/m4/gnulib-cache.m4: Update.
+	* gnulib/import/m4/gnulib-common.m4: Update.
+	* gnulib/import/m4/gnulib-comp.m4: Update.
+	* gnulib/import/m4/gnulib-tool.m4: Update.
+	* gnulib/import/m4/include_next.m4: Update.
+	* gnulib/import/m4/inttypes-pri.m4: Update.
+	* gnulib/import/m4/inttypes.m4: Update.
+	* gnulib/import/m4/isnand.m4: Update.
+	* gnulib/import/m4/isnanl.m4: Update.
+	* gnulib/import/m4/largefile.m4: Update.
+	* gnulib/import/m4/localcharset.m4: Update.
+	* gnulib/import/m4/locale-fr.m4: Update.
+	* gnulib/import/m4/locale-ja.m4: Update.
+	* gnulib/import/m4/locale-zh.m4: Update.
+	* gnulib/import/m4/longlong.m4: Update.
+	* gnulib/import/m4/lstat.m4: Update.
+	* gnulib/import/m4/malloc.m4: Update.
+	* gnulib/import/m4/malloca.m4: Update.
+	* gnulib/import/m4/math_h.m4: Update.
+	* gnulib/import/m4/mbrtowc.m4: Update.
+	* gnulib/import/m4/mbsinit.m4: Update.
+	* gnulib/import/m4/mbsrtowcs.m4: Update.
+	* gnulib/import/m4/mbstate_t.m4: Update.
+	* gnulib/import/m4/memchr.m4: Update.
+	* gnulib/import/m4/memmem.m4: Update.
+	* gnulib/import/m4/mmap-anon.m4: Update.
+	* gnulib/import/m4/multiarch.m4: Update.
+	* gnulib/import/m4/nocrash.m4: Update.
+	* gnulib/import/m4/off_t.m4: Update.
+	* gnulib/import/m4/pathmax.m4: Update.
+	* gnulib/import/m4/readlink.m4: Update.
+	* gnulib/import/m4/rename.m4: Update.
+	* gnulib/import/m4/rmdir.m4: Update.
+	* gnulib/import/m4/ssize_t.m4: Update.
+	* gnulib/import/m4/stat.m4: Update.
+	* gnulib/import/m4/stdbool.m4: Update.
+	* gnulib/import/m4/stddef_h.m4: Update.
+	* gnulib/import/m4/stdint.m4: Update.
+	* gnulib/import/m4/stdio_h.m4: Update.
+	* gnulib/import/m4/stdlib_h.m4: Update.
+	* gnulib/import/m4/string_h.m4: Update.
+	* gnulib/import/m4/strstr.m4: Update.
+	* gnulib/import/m4/strtok_r.m4: Update.
+	* gnulib/import/m4/sys_socket_h.m4: Update.
+	* gnulib/import/m4/sys_stat_h.m4: Update.
+	* gnulib/import/m4/sys_time_h.m4: Update.
+	* gnulib/import/m4/sys_types_h.m4: Update.
+	* gnulib/import/m4/time_h.m4: Update.
+	* gnulib/import/m4/unistd_h.m4: Update.
+	* gnulib/import/m4/warn-on-use.m4: Update.
+	* gnulib/import/m4/wchar_h.m4: Update.
+	* gnulib/import/m4/wchar_t.m4: Update.
+	* gnulib/import/m4/wctype_h.m4: Update.
+	* gnulib/import/m4/wint_t.m4: Update.
+	* gnulib/import/malloc.c: Update.
+	* gnulib/import/malloca.c: Update.
+	* gnulib/import/malloca.h: Update.
+	* gnulib/import/math.in.h: Update.
+	* gnulib/import/mbrtowc.c: Update.
+	* gnulib/import/mbsinit.c: Update.
+	* gnulib/import/mbsrtowcs-impl.h: Update.
+	* gnulib/import/mbsrtowcs-state.c: Update.
+	* gnulib/import/mbsrtowcs.c: Update.
+	* gnulib/import/memchr.c: Update.
+	* gnulib/import/memmem.c: Update.
+	* gnulib/import/pathmax.h: Update.
+	* gnulib/import/readlink.c: Update.
+	* gnulib/import/ref-add.sin: Update.
+	* gnulib/import/ref-del.sin: Update.
+	* gnulib/import/rename.c: Update.
+	* gnulib/import/rmdir.c: Update.
+	* gnulib/import/same-inode.h: Update.
+	* gnulib/import/stat.c: Update.
+	* gnulib/import/stdbool.in.h: Update.
+	* gnulib/import/stddef.in.h: Update.
+	* gnulib/import/stdint.in.h: Update.
+	* gnulib/import/stdio.c: Update.
+	* gnulib/import/stdio.in.h: Update.
+	* gnulib/import/stdlib.in.h: Update.
+	* gnulib/import/str-two-way.h: Update.
+	* gnulib/import/streq.h: Update.
+	* gnulib/import/string.in.h: Update.
+	* gnulib/import/stripslash.c: Update.
+	* gnulib/import/strnlen1.c: Update.
+	* gnulib/import/strnlen1.h: Update.
+	* gnulib/import/strstr.c: Update.
+	* gnulib/import/strtok_r.c: Update.
+	* gnulib/import/sys_stat.in.h: Update.
+	* gnulib/import/sys_time.in.h: Update.
+	* gnulib/import/sys_types.in.h: Update.
+	* gnulib/import/time.in.h: Update.
+	* gnulib/import/unistd.in.h: Update.
+	* gnulib/import/verify.h: Update.
+	* gnulib/import/wchar.in.h: Update.
+	* gnulib/import/wctype.in.h: Update.
+	* gnulib/import/gettimeofday.c: New file.
+	* gnulib/import/m4/absolute-header.m4: New file.
+	* gnulib/import/m4/gettimeofday.m4: New file.
+	* gnulib/import/m4/sys_socket_h.m4: New file.
+	* gnulib/import/m4/sys_time_h.m4: New file.
+	* gnulib/import/stdio.c: Delete file.
+	* gnulib/import/sys_time.in.h: New file.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_sys_time.h.
+	* common/gdb_sys_time.h: New file.
+	* event-loop.c: Include gdb_sys_time.h instead of sys/time.h.
+	* gdb_select.h: Likewise.
+	* gdb_usleep.c: Likewise.
+	* maint.c: Likewise.
+	* mi/mi-main.c: Likewise.
+	* mi/mi-parse.h: Likewise.
+	* remote-fileio.c: Likewise.
+	* remote-m32r-sdi.c: Likewise.
+	* remote.c: Likewise.
+	* ser-base.c: Likewise.
+	* ser-pipe.c: Likewise.
+	* ser-tcp.c: Likewise.
+	* ser-unix.c: Likewise.
+	* symfile.c: Likewise.
+	* symfile.c: Likewise.  Rename OSIZE to SIZE throughout.
+	* target-memory.c: Include gdb_sys_time.h instead of sys/time.h.
+	* utils.c: Likewise.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention removed support for the various ROM monitors.
+	* Makefile.in (ALL_TARGET_OBS): Remove dbug-rom.o, dink32-rom.o,
+	ppcbug-rom.o, m32r-rom.o, dsrec.o and monitor.o from gdb_target_obs.
+	* configure.tgt (h8300-*-*): Remove monitor.o and m32r-rom.o from
+	gdb_target_obs.
+	(m68*-*-*): Remove monitor.o dbug-rom.o and dsrec.o from
+	gdb_target_obs.
+	(microblaze*-linux-*): Remove microblaze-rom.o, monitor.o and
+	dsrec.o from gdb_target_obs.
+	(microblaze*-*-*): Remove microblaze-rom.o, monitor.o and dsrec.o
+	from gdb_target_obs.
+	(powerpc-*-lynx*178): Remove monitor.o and dsrec.o from
+	gdb_target_obs.
+	(powerpc*-*-*): Remove monitor.o, dsrec.o, ppcbug-rom.o and
+	dink32-rom.o from gdb_target_obs.
+	(sh*-*-linux*): Remove monitor.o and dsrec.o from gdb_target_obs.
+	(sh*): Remove monitor.o and dsrec.o from gdb_target_obs.
+	* dbug-rom.c, dink32-rom.c, dsrec.c, m32r-rom.c, microblaze-rom.c,
+	monitor.c, monitor.h, ppcbug-rom.c, srec.h: Delete files.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	* frame.c (null_frame_id): Explicitly zero-initialize.
+
+2015-08-21  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2read.c (struct dwarf2_section_info): Rename field
+	'asection' to 'section'.
+	(dwarf2_has_info, get_section_bfd_owner, get_section_bfd_section)
+	(dwarf2_locate_sections, dwarf2_locate_sections)
+	(locate_dwz_sections, locate_v1_virtual_dwo_sections)
+	(dwarf2_locate_dwo_sections, dwarf2_locate_dwo_sections)
+	(dwarf2_locate_v2_dwp_sections): Adjust.
+
+2015-08-21  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.h (gdb_in_secondary_prompt_p): Declare.
+	* top.c (gdb_secondary_prompt_depth): Define.
+	(gdb_in_secondary_prompt_p): Define.
+	(gdb_readline_wrapper_cleanup): Decrement
+	gdb_secondary_prompt_depth.
+	(gdb_readline_wrapper): Increment gdb_secondary_prompt_depth.
+	* tui/tui-io.c (tui_getc): Don't clear the prompt line if we
+	are in a secondary prompt.
+
+2015-08-21  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-io.c (tui_getc): Use tui_putc instead of waddch to
+	emit the newline.
+
+2015-08-21  Gary Benson  <gbenson@redhat.com>
+
+	* gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call.
+
+2015-08-21  Gary Benson  <gbenson@redhat.com>
+
+	* target.h (struct target_ops) <to_fileio_open>: New argument
+	warn_if_slow.  Update comment.  All implementations updated.
+	(target_fileio_open_warn_if_slow): New declaration.
+	* target.c (target_fileio_open): Renamed as...
+	(target_fileio_open_1): ...this.  New argument warn_if_slow.
+	Pass warn_if_slow to implementation.  Update debug printing.
+	(target_fileio_open): New function.
+	(target_fileio_open_warn_if_slow): Likewise.
+	* gdb_bfd.c (gdb_bfd_iovec_fileio_open): Use new function
+	target_fileio_open_warn_if_slow.
+
+2015-08-21  Gary Benson  <gbenson@redhat.com>
+
+	* nat/linux-namespaces.c (linux_mntns_access_fs):
+	Do not overwrite old_chain.
+
+2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* arch/xtensa.h: New file.
+	* xtensa-linux-nat.c (gdb_proc_service.h): New #include.
+	(ps_get_thread_area): New function.
+	* xtensa-linux-tdep.c (xtensa_linux_init_abi): Add call to
+	set_gdbarch_fetch_tls_load_module_address to enable TLS support.
+	* xtensa-tdep.c (osabi.h): New #include.
+	(xtensa_gdbarch_init): Call gdbarch_init_osabi to register
+	xtensa-specific hooks.
+	* xtensa-tdep.h (struct xtensa_elf_gregset_t): Add threadptr
+	member and move the structure to arch/xtensa.h.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (struct readahead_cache): New.
+	(struct remote_state) <readahead_cache>: New field.
+	(remote_open_1): Invalidate the cache.
+	(readahead_cache_invalidate, readahead_cache_invalidate_fd): New
+	functions.
+	(remote_hostio_pwrite): Invalidate the readahead cache.
+	(remote_hostio_pread): Rename to ...
+	(remote_hostio_pread_vFile): ... this.
+	(remote_hostio_pread_from_cache): New function.
+	(remote_hostio_pread): Reimplement.
+	(remote_hostio_close): Invalidate the readahead cache.
+
+2015-08-21  Marcin CieÅ›lak <saper@saper.info>  (tiny patch)
+
+	PR build/18843
+	* procfs.c: Include "filestuff.h".
+
+2015-08-21  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-data.h (tui_command_info): Remove fields cur_line and
+	curch.
+	* tui/tui-data.c (tui_clear_win_detail) [CMD_WIN]: Don't set
+	cur_line or curch, instead call wmove().
+	(init_win_info) [CMD_WIN]: Likewise.
+	* tui/tui-io.c (tui_puts): Likewise. Don't read cur_line,
+	instead call getcury().
+	(tui_redisplay_readline): Don't set cur_line or curch.
+	(tui_mld_erase_entire_line): Don't read cur_line, instead call
+	getcury().
+	(tui_cont_sig): Remove call to wmove.
+	(tui_getc): Don't read cur_line or curch, instead call getcury()
+	or getyx().  Don't set curch.
+	* tui/tui-win.c (make_visible_with_new_height) [CMD_WIN]: Don't
+	set cur_line or curch.  Always move cursor to (0,0).
+
+2015-08-20  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (print_target_wait_results): Make extern.
+	* infrun.h (print_target_wait_results): Declare.
+	* remote.c (set_stop_requested_callback): Delete.
+	(process_initial_stop_replies): New function.
+	(remote_start_remote): Use it.
+	(stop_reply_queue_length): New function.
+
+2015-08-20  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2read.c (process_full_comp_unit): To tell whether
+	start_subfile managed to deduce a language, test for
+	language_unknown instead of language_c.
+
+2015-08-20  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lex.l: Reset the start condition to INITIAL in the rule that
+	matches attributes.
+
+2015-08-19  Kevin Buettner  <kevinb@redhat.com>
+
+	* dwarf2read.c (dwarf2_string_attr): New function.
+	(lookup_dwo_unit, process_psymtab_comp_unit_reader)
+	(dwarf2_compute_name, dwarf2_physname, find_file_and_directory)
+	(read_call_site_scope, namespace_name, guess_full_die_structure_name)
+	(anonymous_struct_prefix, prepare_one_comp_unit): Use
+	dwarf2_string_attr in place of dwarf2_attr and DW_STRING.
+
+2015-08-18  Doug Evans  <dje@google.com>
+	    Adrian Sendroiu <adrian.sendroiu@freescale.com>
+
+	PR mi/18833
+	* cli/cli-logging.c (pop_output_files): Don't restore redirection
+	if MI-like.
+	* mi/mi-out.c: #include "vec.h".
+	(ui_filep): New type.
+	(DEV_VEC_P (ui_filep)): New type.
+	(struct ui_out_data) <buffer, original_buffer>: Delete.
+	(struct ui_out_data) <streams>: New member.
+	(mi_ui_out_impl): Add data_destroy field.
+	(mi_field_string, mi_field_fmt): Update.
+	(mi_flush, mi_redirect, field_separator): Update.
+	(mi_open, mi_close): Update.
+	(mi_out_buffered, mi_out_rewind, mi_out_put): Update.
+	(mi_out_data_ctor, mi_out_data_dtor): New functions.
+	(mi_out_new): Call mi_out_data_ctor.
+
+2015-08-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* remote.c (strprefix): New.
+	(remote_parse_stop_reply): Use strprefix instead of strncmp
+	to ensure exact match of keyword.
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb_bfd.c (debug_bfd_cache): New variable.
+	(show_bfd_cache_debug): New function.
+	(gdb_bfd_open): Add debug logging.
+	(gdb_bfd_ref): Likewise.
+	(gdb_bfd_unref): Likewise.
+	(_initialize_gdb_bfd): Add new set/show command.
+	* NEWS: Mention new command.
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb_bfd.c (bfd_sharing): New variable.
+	(show_bfd_sharing): New function.
+	(gdb_bfd_open): Check bfd_sharing variable.
+	(_initialize_gdb_bfd): Add new set/show command.
+	* NEWS: Mention new command.
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb_bfd.c (struct gdb_bfd_data): Add size, inode, and device id
+	field.
+	(struct gdb_bfd_cache_search): Likewise.
+	(eq_bfd): Compare the size, inode, and device id fields.
+	(gdb_bfd_open): Initialise the size, inode, and device id fields.
+	(gdb_bfd_ref): Likewise.
+	(gdb_bfd_unref): Likewise.
+
+2015-08-18  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_nat_always_non_stop_p): If the linux_ops
+	target implements to_always_non_stop_p, call it.
+	* x86-linux-nat.c (x86_linux_always_non_stop_p): New function.
+	(x86_linux_create_target): Install it as to_always_non_stop_p
+	method.
+
+2015-08-17  Doug Evans  <dje@google.com>
+
+	* ui-out.c (default_ui_out_impl): Add comment.
+
+2015-08-17  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-exp.y (type_aggregate_p): New function.
+	(PrimaryExpression : TypeExp '.' IdentifierExp): Use it.
+	(classify_inner_name): Likewise.
+	* d-namespace.c (d_lookup_nested_symbol): Handle TYPE_CODE_ENUM.
+
+2015-08-15  Doug Evans  <xdje42@gmail.com>
+
+	* psymtab.c (add_psymbol_to_bcache): Remove "val" arg.  All callers
+	updated.
+	(add_psymbol_to_list): Ditto.
+
+2015-08-15  Doug Evans  <xdje42@gmail.com>
+
+	* dbxread.c (dbx_end_psymtab): Renamed from end_psymtab.  All callers
+	updated.  Call end_psymtab_common.
+	* dwarf2read.c (process_psymtab_comp_unit_reader): Call
+	end_psymtab_common.
+	(build_type_psymtabs_reader): Ditto.
+	* psympriv.h (sort_pst_symbols): Delete.
+	(end_psymtab_common): Declare.
+	* psymtab.c (sort_pst_symbols): Make static.
+	(end_psymtab_common): New function.
+	* xcoffread.c (xcoff_end_psymtab): Call end_psymtab_common.
+
+2015-08-15  Doug Evans  <xdje42@gmail.com>
+
+	* defs.h (LANGUAGE_BITS): Define.
+	* psympriv.h (partial_symbol) <domain>: Use SYMBOL_DOMAIN_BITS.
+	(partial_symbol) <aclass>: Use SYMBOL_ACLASS_BITS.
+	* symtab.h (general_symbol_info> <language>: Usage LANGUAGE_BITS.
+	(minimal_symbol_type): Add nr_minsym_types.
+	(MINSYM_TYPE_BITS): Define.
+	(minimal_symbol) <type>: Use MINSYM_TYPE_BITS.
+	(domain_enum_tag): Add NR_DOMAINS.
+	(SYMBOL_DOMAIN_BITS): Change from 4 to 3.
+	(SYMBOL_ACLASS_BITS): Define from 6 to 5.
+
+2015-08-15  Doug Evans  <xdje42@gmail.com>
+
+	* objfiles.h: Whitespace cleanup.
+	* psympriv.h: Whitespace cleanup.
+	* psymtab.c: Whitespace/coding convention cleanup.
+
+2015-08-15  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* inferior.c (detach_inferior_command): Don't call
+	any_thread_of_process when pid is 0.
+	(kill_inferior_command): Likewise.
+
+2015-08-14  Doug Evans  <xdje42@gmail.com>
+
+	PR gdb/11833
+	* NEWS: Document new /s modifier for the disassemble command.
+	* cli/cli-cmds.c (disassemble_command): Add support for /s.
+	(_initialize_cli_cmds): Update online docs of disassemble command.
+	* disasm.c: #include "source.h".
+	(struct deprecated_dis_line_entry): Renamed from dis_line_entry.
+	All uses updated.
+	(dis_line_entry): New struct.
+	(hash_dis_line_entry, eq_dis_line_entry): New functions.
+	(allocate_dis_line_table): New functions.
+	(maybe_add_dis_line_entry, line_has_code_p): New functions.
+	(dump_insns): New arg end_pc.  All callers updated.
+	(do_mixed_source_and_assembly_deprecated): Renamed from
+	do_mixed_source_and_assembly.  All callers updated.
+	(do_mixed_source_and_assembly): New function.
+	(gdb_disassembly): Handle /s (DISASSEMBLY_SOURCE).
+	* disasm.h (DISASSEMBLY_SOURCE_DEPRECATED): Renamed from
+	DISASSEMBLY_SOURCE.  All uses updated.
+	(DISASSEMBLY_SOURCE): New macro.
+	* mi/mi-cmd-disas.c (mi_cmd_disassemble): New modes 4,5.
+
+2015-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Rename
+	`typename' to `type_name' to avoid C++ reserved word.
+
+2015-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS)
+	(EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to
+	silence ARI errors.
+
+2015-08-14  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Use
+	xstrprintf instead of malloc and sprintf.
+	(PrimaryExpression : IdentifierExp): Avoid operator at end of line.
+	(lex_one_token): Likewise.
+
+2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* solib-svr4.c (read_program_header): Add base_addr argument to
+	report the runtime address of the segment.
+	(find_program_interpreter): Update read_program_header call to pass
+	a NULL pointer for the new argument.
+	(scan_dyntag): Add ptr_addr argument to report the runtime address
+	of the tag payload.
+	(scan_dyntag_auxv): Likewise and use thew new base_addr argument of
+	read_program_header to get the base address of the dynamic segment.
+	(elf_locate_base): Update uses of scan_dyntag, scan_dyntag_auxv and
+	read_program_header.
+	(elf_locate_base): Scan for and handle DT_MIPS_RLD_MAP_REL.
+
+2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* MAINTAINERS (Write After Approval): Add Matthew Fortune.
+
+2015-08-13  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-exp.y (%union): Add voidval.
+	(%token): Add UNKNOWN_NAME as a token to represent an unclassified
+	name in the lexing stage.
+	(PostfixExpression): Move symbol completion handling in grammar here
+	from PrimaryExpression.
+	(PrimaryExpression): Move routines to handle resolving identifier
+	tokens in the grammar here from push_expression_name.
+	(IdentifierExp): Remove the handling of alternating '.' and identifier
+	tokens.
+	(TypeExp): Allow TypeExp to be wrapped in parenthesis in the grammar.
+	(BasicType): Remove C-style typename rules.
+	(d_type_from_name, d_module_from_name, push_variable)
+	(push_fieldnames, push_type_name, push_module_name)
+	(push_expression_name): Remove.
+	(lex_one_token): Rename from yylex.  Replace pstate with par_state.
+	(token_and_value): New type.
+	(token_fifo, popping, name_obstack): New globals.
+	(classify_name): New function.
+	(classify_inner_name): Likewise.
+	(yylex): Likewise.
+	(d_parse): Initialize token_fifo, popping and name_obstack.
+
+2015-08-13  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* Makefile.in (SFILES): Add d-namespace.c.
+	(COMMON_OBS): Add d-namespace.o.
+	* d-lang.c (d_language_defn): Use d_lookup_symbol_nonlocal as the
+	la_lookup_symbol_nonlocal callback function pointer.
+	* d-lang.h (d_lookup_symbol_nonlocal): New declaration.
+	(d_lookup_nested_symbol): New declaration.
+	* d-namespace.c: New file.
+
+2015-08-13  Pedro Alves  <palves@redhat.com>
+
+	* python/py-unwind.c (pyuw_sniffer): Install the invalidate
+	cleanup after the decref cleanup, not before.
+
+2015-08-13  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c: Include namespace.h
+	(aux_add_nonlocal_symbols): Fix a function name in comment.
+	(ada_add_block_renamings): New.
+	(add_nonlocal_symbols): Add global renamings handling.
+	(ada_lookup_symbol_list_worker): Move the symbol lookup part
+	to...
+	(ada_add_all_symbols): ... this new function.
+	(ada_add_block_symbols): Try to match the input name against the
+	"using directives list", perform a recursive symbol lookup on
+	the matched declarations.
+	* block.h (struct block): Move the_namespace to top-level as
+	namespace_info. Remove the language_specific field.
+	(BLOCK_NAMESPACE): Update access to the namespace_info field.
+	* buildsym.h (using_directives): Rename into...
+	(local_using_directives): ... this.
+	(global_using_directives): New.
+	(struct context_stack): Rename the using_directives field into
+	local_using_directives.
+	* buildsym.c (finish_block_internal): Deal with the proper
+	using directives repository (local or global).
+	(prepare_for_building): Reset local_using_directives. Assert
+	that there is no pending global using directive.
+	(reset_symtab_globals): Reset global_using_directives and
+	local_using_directives.
+	(end_symtab_get_static_block): Don't ignore symtabs that have
+	only using directives.
+	(push_context): Update references to local_using_directives.
+	(buildsym_init): Do not reset using_directives.
+	* cp-support.c: Include namespace.h.
+	* cp-support.h (struct using_direct): Move to namespace.h.
+	(cp_add_using_directives): Move to namespace.h.
+	* cp-namespace.c: Include namespace.h
+	(cp_add_using_directive): Move to namespace.c, rename it to
+	add_using_directive, add a "using_directives" argument and use
+	it as the pending using directives repository.  All callers
+	updated.
+	* dwarf2read.c (using_directives): New.
+	(read_import_statement): Call using_directives.
+	(read_func_scope): Update references to local_using_directives.
+	(read_lexical_block_scope): Likewise.
+	(read_namespace): Update the heading comment, call
+	using_directives.
+	* namespace.h: New file.
+	* namespace.c: New file.
+	* Makefile.in (SFILES): Add namespace.c.
+	(COMMON_OBS): Add namespace.o
+
+2015-08-12  Joel Brobecker  <brobecker@adacore.com>
+
+	* amd64-tdep.c (amd64_displaced_step_fixup): Fix the mask used to
+	compute RETADDR.
+
+2015-08-12  Keith Seitz  <keiths@redhat.com>
+
+	* break-catch-throw.c (re_set_exception_catchpoint) Rename
+	reserved C++ keyword "explicit" to "explicit_loc".
+	* breakpoint.c (create_overlay_event_breakpoint)
+	(create_longjmp_master_breakpoint)
+	(create_std_terminate_master_breakpoint)
+	(create_exception_master_breakpoint, update_static_tracepoint):
+	Rename reserved C++ keyword "explicit" to "explicit_loc".
+	* completer.c (collect_explicit_location_matches)
+	(explicit_location_completer): Rename reserved C++ keyword
+	"explicit" to "explicit_loc".
+	* linespec.c (struct linespec) <explicit>: Rename to "explicit_loc".
+	(canonicalize_linespec, create_sals_line_offset)
+	(convert_linespec_to_sals, convert_explicit_location_to_sals)
+	(event_location_to_sals, decode_objc): Rename reserved C++ keyword
+	"explicit" to "explicit_loc".
+	* location.c (struct event_location) <explicit>: Rename to
+	"explicit_loc".
+	(initialize_explicit_location, new_explicit_location)
+	(explicit_location_to_string_internal, explicit_location_to_linespec):
+	Rename reserved C++ keyword "explicit" to "explicit_loc".
+	* location.h (explicit_location_to_string)
+	(explicit_location_to_linespec, initialize_explicit_location)
+	(new_explicit_location): Rename reserved C++ keyword "explicit"
+	to "explicit_loc".
+	* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Rename reserved C++
+	keyword "explicit" to "explicit_loc".
+
+2015-08-12  Keith Seitz  <keiths@redhat.com>
+
+	* python/python.c (gdbpy_decode_line): Initialize `location' to NULL
+	and only call decode_line_1 when it is non-NULL.
+
+2015-08-12  Luis Machado  <lgustavo@codesourcery.com>
+
+	* breakpoint.c (bp_loc_is_permanent): Return 0 when breakpoint
+	location address is not meaningful.
+	(breakpoint_address_is_meaningful): Update comment.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* NEWS: Mention explicit locations.
+	* breakpoint.c [LOCATION_HELP_STRING]: New macro.
+	[BREAK_ARGS_HELP]: Use LOCATION_HELP_STRING.
+	(_initialize_breakpoint): Update documentation for
+	"clear", "break", "trace", "strace", "ftrace", and "dprintf".
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Add support for
+	explicit locations, options "--source", "--function",
+	"--label", and "--line".
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* completer.c: Include location.h.
+	(enum match_type): New enum.
+	(location_completer): Rename to ...
+	(linespec_completer): ... this.
+	(collect_explicit_location_matches, backup_text_ptr)
+	(explicit_location_completer): New functions.
+	(location_completer): "New" function; handle linespec
+	and explicit location completions.
+	(complete_line_internal): Remove all location completer-specific
+	handling.
+	* linespec.c (linespec_lexer_lex_keyword, is_ada_operator)
+	(find_toplevel_char): Export.
+	(linespec_parse_line_offset): Export.
+	Issue error if STRING is not numerical.
+	(gdb_get_linespec_parser_quote_characters): New function.
+	* linespec.h (linespec_parse_line_offset): Declare.
+	(get_gdb_linespec_parser_quote_characters): Declare.
+	(is_ada_operator): Declare.
+	(find_toplevel_char): Declare.
+	(linespec_lexer_lex_keyword): Declare.
+	* location.c (explicit_to_event_location): New function.
+	(explicit_location_lex_one): New function.
+	(string_to_explicit_location): New function.
+	(string_to_event_location): Handle explicit locations.
+	* location.h (explicit_to_event_location): Declare.
+	(string_to_explicit_location): Declare.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* break-catch-throw.c (re_set_exception_catchpoint): Convert
+	linespec into explicit location.
+	* breakpoint.c (create_overlay_breakpoint)
+	(create_longjmp_master_breakpoint)
+	(create_std_terminate_master_breakpoint)
+	(create_exception_master_breakpoint): Convert linespec into explicit
+	location.
+	(update_static_tracepoint): Convert linespec into explicit location.
+	* linespec.c (enum offset_relative_sign, struct line_offset): Move
+	location.h.
+	(struct linespec) <expression, expr_pc, source_filename>
+	<function_name, label_name, line_offset>: Replace with ...
+	<explicit>: ... this.
+	<is_linespec>: New member.
+	(PARSER_EXPLICIT): New accessor macro.
+	(undefined_label_error): New function.
+	(source_file_not_found_error): New function.
+	(linespec_parse_basic): The parser result is now an explicit location.
+	Use PARSER_EXPLICIT to access it.
+	Use undefined_label_error.
+	(canonicalize_linespec): Convert canonical linespec into explicit
+	location.
+	Move string representation of location to explicit_location_to_linespec
+	and use it and explicit_location_to_string to save string
+	representations of the canonical location.
+	(create_sals_line_offset, convert_linespec_to_sals): `ls' contains an
+	explicit location.  Update all references.
+	(convert_explicit_location_to_sals): New function.
+	(parse_linespec): Use PARSER_EXPLICIT to access the parser
+	result's explicit location.
+	(linespec_state_constructor): Initialize is_linespec.
+	Use PARSER_EXPLICIT.
+	(linespec_parser_delete): Use PARSER_EXPLICIT to access the parser's
+	result.
+	(event_location_to_sals): For linespec locations, set is_linespec.
+	Handle explicit locations.
+	(decode_objc): 'ls' contains an explicit location now. Update all
+	references.
+	(symtabs_from_filename): Use source_file_not_found_error.
+	* location.c (struct event_location.u) <explicit>: New member.
+	(initialize_explicit_location): New function.
+	(initialize_event_location): Initialize explicit locations.
+	(new_explicit_location, get_explicit_location)
+	(get_explicit_location_const): New functions.
+	(explicit_to_string_internal): New function; most of contents moved
+	from canonicalize_linespec.
+	(explicit_location_to_string): New function.
+	(explicit_location_to_linespec): New function.
+	(copy_event_location, delete_event_location)
+	(event_location_to_string_const, event_location_empty_p): Handle
+	explicit locations.
+	* location.h (enum offset_relative_sign, struct line_offset): Move
+	here from linespec.h.
+	(enum event_location_type): Add EXPLICIT_LOCATION.
+	(struct explicit_location): New structure.
+	(explicit_location_to_string): Declare.
+	(explicit_location_to_linespec): Declare.
+	(new_explicit_location, get_explicit_locationp
+	(get_explicit_location_const, initialize_explicit_location): Declare.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* break-catch-throw.c (re_set_exception_catchpoint): Convert
+	linespec for stap probe to probe location.
+	* breakpoint.c (create_longjmp_master_breakpoint)
+	(create_exception_master_breakpoint): Likewise.
+	(break_command_1): Remove local variable `arg_cp'.
+	Check location type to set appropriate breakpoint ops methods.
+	(trace_command): Likewise.
+	* linespec.c (event_location_to_sals): Assert on probe locations.
+	* location.c (EL_PROBE): Add macro definition.
+	(new_probe_location, get_probe_location): New functions.
+	(copy_event_location, delete_event_location, event_location_to_string)
+	(string_to_event_location, event_location_empty_p): Handle probe
+	locations.
+	* location.h (enum event_location_type): Add PROBE_LOCATION.
+	(new_probe_location, get_probe_location): Declare.
+	* probe.c (parse_probes): Assert that LOCATION is a probe location.
+	Convert linespec into probe location.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* breakpoint.c (create_thread_event_breakpoint, init_breakpoint_sal):
+	Convert linespec to address location.
+	* linespec.c (canonicalize_linespec): Do not handle address
+	locations here.
+	(convert_address_location_to_sals): New function; contents moved
+	from ...
+	(convert_linespc_to_sals): ... here.
+	(parse_linespec): Remove address locations from linespec grammar.
+	Remove handling of address locations.
+	(linespec_lex_to_end): Remove handling of address linespecs.
+	(event_location_to_sals): Handle ADDRESS_LOCATION.
+	(linespec_expression_to_pc): Export.
+	* linespec.h (linespec_expression_to_pc): Add declaration.
+	* location.c (struct event_location.u) <address>: New member.
+	(new_address_location, get_address_location): New functions.
+	(copy_event_location, delete_event_location, event_location_to_string)
+	(string_to_event_location, event_location_empty_p): Handle address
+	locations.
+	* location.h (enum event_location_type): Add ADDRESS_LOCATION.
+	(new_address_location, get_address_location): Declare.
+	* python/py-finishbreakpoint.c (bpfinishpy_init): Convert linespec
+	to address location.
+	* spu-tdep.c (spu_catch_start): Likewise.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* ax-gdb.c: Include location.h.
+	(agent_command_1) Use linespec location instead of address
+	string.
+	* break-catch-throw.c: Include location.h.
+	(re_set_exception_catchpoint): Use linespec locations instead
+	of address strings.
+	* breakpoint.c: Include location.h.
+	(create_overlay_event_breakpoint, create_longjmp_master_breakpoint)
+	(create_std_terminate_master_breakpoint)
+	(create_exception_master_breakpoint, update_breakpoints_after_exec):
+	Use linespec location instead of address string.
+	(print_breakpoint_location):  Use locations and
+	event_location_to_string.
+	Print extra_string for pending locations for non-MI streams.
+	(print_one_breakpoint_location): Use locations and
+	event_location_to_string.
+	(init_raw_breakpoint_without_location): Initialize b->location.
+	(create_thread_event_breakpoint): Use linespec location instead of
+	address string.
+	(init_breakpoint_sal): Likewise.
+	Only save extra_string if it is non-NULL and not the empty string.
+	Use event_location_to_string instead of `addr_string'.
+	Constify `p' and `endp'.
+	Use skip_spaces_const/skip_space_const instead of non-const versions.
+	Copy the location into the breakpoint.
+	If LOCATION is NULL, save the breakpoint address as a linespec location
+	instead of an address string.
+	(create_breakpoint_sal): Change `addr_string' parameter to a struct
+	event_location. All uses updated.
+	(create_breakpoints_sal): Likewise for local variable `addr_string'.
+	(parse_breakpoint_sals): Use locations instead of address strings.
+	Remove check for empty linespec with conditional.
+	Refactor.
+	(decode_static_tracepoint_spec): Make argument const and update
+	function.
+	(create_breakpoint): Change `arg' to a struct event_location and
+	rename.
+	Remove `copy_arg' and `addr_start'.
+	If EXTRA_STRING is empty, set it to NULL.
+	Don't populate `canonical' for pending breakpoints.
+	Pass `extra_string' to find_condition_and_thread.
+	Clear `extra_string' if `rest' was NULL.
+	Do not error with "garbage after location" if setting a dprintf
+	breakpoint.
+	Copy the location into the breakpoint instead of an address string.
+	(break_command_1): Use string_to_event_location and pass this to
+	create_breakpoint instead of an address string.
+	Check against `arg_cp' for a probe linespec.
+	(dprintf_command): Use string_to_event_location and pass this to
+	create_breakpoint instead of an address string.
+	Throw an exception if no format string was specified.
+	(print_recreate_ranged_breakpoint): Use event_location_to_string
+	instead of address strings.
+	(break_range_command, until_break_command)
+	(init_ada_exception_breakpoint): Use locations instead
+	of address strings.
+	(say_where): Print out extra_string for pending locations.
+	(base_breakpoint_dtor): Delete `location' and `location_range_end' of
+	the breakpoint.
+	(base_breakpoint_create_sals_from_location): Use struct event_location
+	instead of address string.
+	Remove `addr_start' and `copy_arg' parameters.
+	(base_breakpoint_decode_location): Use struct event_location instead of
+	address string.
+	(bkpt_re_set): Use locations instead of address strings.
+	Use event_location_empty_p to check for unset location.
+	(bkpt_print_recreate): Use event_location_to_string instead of
+	an address string.
+	Print out extra_string for pending locations.
+	(bkpt_create_sals_from_location, bkpt_decode_location)
+	(bkpt_probe_create_sals_from_location): Use struct event_location
+	instead of address string.
+	(bkpt_probe_decode_location): Use struct event_location instead of
+	address string.
+	(tracepoint_print_recreate): Use event_location_to_string to
+	recreate the tracepoint.
+	(tracepoint_create_sals_from_location, tracepoint_decode_location)
+	(tracepoint_probe_create_sals_from_location)
+	(tracepoint_probe_decode_location): Use struct event_location
+	instead of address string.
+	(dprintf_print_recreate): Use event_location_to_string to recreate
+	the dprintf.
+	(dprintf_re_set): Remove check for valid/missing format string.
+	(strace_marker_create_sals_from_location)
+	(strace_marker_create_breakpoints_sal, strace_marker_decode_location)
+	(update_static_tracepoint): Use struct event_location instead of
+	address string.
+	(location_to_sals): Likewise.
+	Pass `extra_string' to find_condition_and_thread.
+	For newly resolved pending breakpoint locations, clear the location's
+	string representation.
+	Assert that the breakpoint's condition string is NULL when
+	condition_not_parsed.
+	(breakpoint_re_set_default, create_sals_from_location_default)
+	(decode_location_default, trace_command, ftrace_command)
+	(strace_command, create_tracepoint_from_upload): Use locations
+	instead of address strings.
+	* breakpoint.h (struct breakpoint_ops) <create_sals_from_location>:
+	Use struct event_location instead of address string.
+	Update all uses.
+	<decode_location>: Likewise.
+	(struct breakpoint) <addr_string>: Change to struct event_location
+	and rename `location'.
+	<addr_string_range_end>: Change to struct event_location and rename
+	`location_range_end'.
+	(create_breakpoint): Use struct event_location instead of address
+	string.
+	* cli/cli-cmds.c: Include location.h.
+	(edit_command, list_command): Use locations instead of address strings.
+	* elfread.c: Include location.h.
+	(elf_gnu_ifunc_resolver_return_stop): Use event_location_to_string.
+	* guile/scm-breakpoint.c: Include location.h.
+	(bpscm_print_breakpoint_smob): Use event_location_to_string.
+	(gdbscm_register_breakpoint): Use locations instead of address
+	strings.
+	* linespec.c: Include location.h.
+	(struct ls_parser) <stream>: Change to const char *.
+	(PARSER_STREAM): Update.
+	(lionespec_lexer_lex_keyword): According to find_condition_and_thread,
+	keywords must be followed by whitespace.
+	(canonicalize_linespec): Save a linespec location into `canonical'.
+	Save a canonical linespec into `canonical'.
+	(parse_linespec): Change `argptr' to const char * and rename `arg'.
+	All uses updated.
+	Update function description.
+	(linespec_parser_new): Initialize `parser'.
+	Update initialization of  parsing stream.
+	(event_location_to_sals): New function.
+	(decode_line_full): Change `argptr' to a struct event_location and
+	rename it `location'.
+	Use locations instead of address strings.
+	Call event_location_to_sals instead of parse_linespec.
+	(decode_line_1): Likewise.
+	(decode_line_with_current_source, decode_line_with_last_displayed)
+	Use locations instead of address strings.
+	(decode_objc): Likewise.
+	Change `argptr' to const char * and rename `arg'.
+	(destroy_linespec_result): Delete the linespec result's location
+	instead of freeing the address string.
+	* linespec.h (struct linespec_result) <addr_string>: Change to
+	struct event_location and rename to ...
+	<location>: ... this.
+	(decode_line_1, decode_line_full): Change `argptr' to struct
+	event_location.  All callers updated.
+	* mi/mi-cmd-break.c: Include language.h, location.h, and linespec.h.
+	(mi_cmd_break_insert_1): Use locations instead of address strings.
+	Throw an error if there was "garbage" at the end of the specified
+	linespec.
+	* probe.c: Include location.h.
+	(parse_probes): Change `argptr' to struct event_location.
+	Use event locations instead of address strings.
+	* probe.h (parse_probes): Change `argptr' to struct event_location.
+	* python/py-breakpoint.c: Include location.h.
+	(bppy_get_location): Constify local variable `str'.
+	Use event_location_to_string.
+	(bppy_init): Use locations instead of address strings.
+	* python/py-finishbreakpoint.c: Include location.h.
+	(bpfinishpy_init): Remove local variable `addr_str'.
+	Use locations instead of address strings.
+	* python/python.c: Include location.h.
+	(gdbpy_decode_line): Use locations instead of address strings.
+	* remote.c: Include location.h.
+	(remote_download_tracepoint): Use locations instead of address
+	strings.
+	* spu-tdep.c: Include location.h.
+	(spu_catch_start): Remove local variable `buf'.
+	Use locations instead of address strings.
+	* tracepoint.c: Include location.h.
+	(scope_info): Use locations instead of address strings.
+	(encode_source_string): Constify parameter `src'.
+	* tracepoint.h (encode_source_string): Likewise.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* Makefile.in (SFILES): Add location.c.
+	(HFILES_NO_SRCDIR): Add location.h.
+	(COMMON_OBS): Add location.o.
+	* linespec.c (linespec_lex_to_end): New function.
+	* linespec.h (linespec_lex_to_end): Declare.
+	* location.c: New file.
+	* location.h: New file.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* breakpoint.h (struct breakpoint_ops) <create_sals_from_address>:
+	Renamed to create_sals_from_location.
+	<decode_linespec>: Renamed to decode_location.
+	Update all callers.
+	* breakpoint.c (create_sals_from_address_default): Renamed to ...
+	(create_sals_from_location_default): ... this.
+	(addr_string_to_sals): Renamed to ...
+	(location_to_sals): ... this.
+	(decode_linespec_default): Renamed to ...
+	(decode_location_default): ... this.
+	(base_breakpoint_create_sals_from_address): Renamed to ...
+	(base_breakpoint_create_sals_from_location): ... this.
+	(bkpt_create_sals_from_address): Renamed to ...
+	(bkpt_create_sals_from_location): ... this.
+	(bkpt_decode_linespec): Renamed to ...
+	(bkpt_decode_location): ... this.
+	(bkpt_probe_create_sals_from_address): Renamed to ...
+	(bkpt_probe_create_sals_from_location): ... this.
+	(tracepoint_create_sals_from_address): Renamed to ...
+	(tracepoint_create_sals_from_location): ... this.
+	(tracepoint_decode_linespec): Renamed to ...
+	(tracepoint_decode_location): ... this.
+	(tracepoint_probe_create_sals_from_address): Renamed to ...
+	(tracepoint_probe_create_sals_from_location): ... this.
+	(tracepoint_probe_decode_linespec): Renamed to ...
+	(tracepoint_probe_decode_location): ... this.
+	(strace_marker_create_sals_from_address): Renamed to ...
+	(strace_marker_create_sals_from_location): ... this.
+	(decode_linespec_default): Renamed to ...
+	(decode_location_default): ... this.
+
+2015-08-10  Doug Evans  <dje@google.com>
+	    Keith Seitz  <keiths@redhat.com>
+
+	PR gdb/17960
+	* 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.
+
+2015-08-10  Joel Brobecker  <brobecker@adacore.com>
+
+	* infrun.c (follow_fork, displaced_step_prepare, resume): Remove
+	trailing new-line at end of warning message.
+	(proceed): Add i18n marker to error messages.
+
+2015-08-07  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_nat_always_non_stop_p): Return 1.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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".
+
+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.
+
+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.
+
+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.
+
+2015-08-07  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (currently_stepping): Extend intro comment.
+	* target.h (target_resume): Extend intro comment.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+2015-08-07  Joel Brobecker  <brobecker@adacore.com>
+
+	* 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.
+
+2015-08-07  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* 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.
+
+2015-08-07  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* 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.
+
+2015-08-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* 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.
+
+2015-08-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* configure.ac: Check for PERF_ATTR_SIZE_VER5 in linux/perf_event.h
+	* configure: Regenerate.
+
+2015-08-06  Yaakov Selkowitz  <yselkowi@redhat.com>
+
+	* Makefile.in (LIBICONV): Define.
+	(CLIBS): Add LIBICONV.
+	* acinclude.m4: Use config/iconv.m4 instead of custom AM_ICONV.
+	* configure: Regenerate.
+
+2015-08-06  Simon Marchi  <simon.marchi@ericsson.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* 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.
+
+2015-08-06  Clem Dickey  <clemd@acm.org>
+
+	PR python/17136
+	* python/lib/gdb/command/type_printers.py (InfoTypePrinter): Fix typo.
+
+2015-08-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* 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.
+
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-waitpid.c (my_waitpid): Only print *status if waitpid
+	returned > 0.
+
+2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* common/agent.c (symbol_list) <required>: Remove.
+
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+	* target/waitstatus.h (enum target_stop_reason)
+	<TARGET_STOPPED_BY_SINGLE_STEP>: New value.
+
+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.
+
+2015-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* nat/gdb_thread_db.h: Add copyright header.
+	Protect against multiple inclusion.
+
+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.
+
+2015-08-04  Ciro Santilli  <ciro.santilli@gmail.com>  (obvious patch)
+
+	* python/py-linetable.c: Fix case of Linetable to LineTable
+	in docstrings and code comments.
+	* python/py-symtab.c: Same.
+
+2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* infcmd.c (signal_command): Call do_cleanups for args_chain.
+
+2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR gdb/18767
+	* infcmd.c (attach_command): Move ARGS_CHAIN cleanup after last ARGS
+	use.
+
+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.
+
+2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* 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.
+
+2015-08-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* cp-namespace.c (cp_lookup_symbol_via_imports): Fix uninitialized
+	variable warning with some compilers.
+
+2015-08-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (arm_linux_get_hwbp_type): Capitalize "type"
+	in comment.  Replace "rw" with "type".
+	(arm_linux_remove_watchpoint): Change type of "rw" to
+	"enum target_hw_bp_type".
+
+2015-08-02  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* alpha-mdebug-tdep.c (find_proc_desc): Update call to
+	lookup_symbol.
+	* ft32-tdep.c (ft32_skip_prologue): Likewise.
+	* moxie-tdep.c (moxie_skip_prologue): Likewise.
+	* mt-tdep.c (mt_skip_prologue): Likewise.
+	* xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
+
+2015-08-01  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-exp.y (write_object_renaming): Replace struct
+	ada_symbol_info with struct block_symbol.  Update field
+	references accordingly.
+	(block_lookup, select_possible_type_sym): Likewise.
+	(find_primitive_type): Likewise.  Also update call to
+	ada_lookup_symbol to extract the symbol itself.
+	(write_var_or_type, write_name_assoc): Likewise.
+	* ada-lang.h (struct ada_symbol_info): Remove.
+	(ada_lookup_symbol_list): Replace struct ada_symbol_info with
+	struct block_symbol.
+	(ada_lookup_encoded_symbol, user_select_syms): Likewise.
+	(ada_lookup_symbol): Return struct block_symbol instead of a
+	mere symbol.
+	* ada-lang.c (defns_collected): Replace struct ada_symbol_info
+	with struct block_symbol.
+	(resolve_subexp, ada_resolve_function, sort_choices,
+	user_select_syms, is_nonfunction, add_defn_to_vec,
+	num_defns_collected, defns_collected,
+	symbols_are_identical_enums, remove_extra_symbols,
+	remove_irrelevant_renamings, add_lookup_symbol_list_worker,
+	ada_lookup_symbol_list, ada_iterate_over_symbols,
+	ada_lookup_encoded_symbol, get_var_value): Likewise.
+	(ada_lookup_symbol): Return a block_symbol instead of a mere
+	symbol.  Replace struct ada_symbol_info with struct
+	block_symbol.
+	(ada_lookup_symbol_nonlocal): Likewise.
+	(standard_lookup): Make block passing explicit through
+	lookup_symbol_in_language.
+	* ada-tasks.c (get_tcb_types_info): Update the calls to
+	lookup_symbol_in_language to extract the mere symbol out of the
+	returned value.
+	(ada_tasks_inferior_data_sniffer): Likewise.
+	* ax-gdb.c (gen_static_field): Likewise for the call to
+	lookup_symbol.
+	(gen_maybe_namespace_elt): Deal with struct block_symbol from
+	lookup functions.
+	(gen_expr): Likewise.
+	* c-exp.y: Likewise.  Remove uses of block_found.
+	(lex_one_token, classify_inner_name, c_print_token): Likewise.
+	(classify_name): Likewise.  Rename the "sym" local variable to
+	"bsym".
+	* c-valprint.c (print_unpacked_pointer): Likewise.
+	* compile/compile-c-symbols.c (convert_symbol_sym): Promote the
+	"sym" parameter from struct symbol * to struct block_symbol.
+	Use it to remove uses of block_found.  Deal with struct
+	block_symbol from lookup functions.
+	(gcc_convert_symbol): Likewise.  Update the call to
+	convert_symbol_sym.
+	* compile/compile-object-load.c (compile_object_load): Deal with
+	struct block_symbol from lookup functions.
+	* cp-namespace.c (cp_lookup_nested_symbol_1,
+	cp_lookup_nested_symbol, cp_lookup_bare_symbol,
+	cp_search_static_and_baseclasses,
+	cp_lookup_symbol_in_namespace, cp_lookup_symbol_via_imports,
+	cp_lookup_symbol_imports_or_template,
+	cp_lookup_symbol_via_all_imports, cp_lookup_symbol_namespace,
+	lookup_namespace_scope, cp_lookup_nonlocal,
+	find_symbol_in_baseclass): Return struct block_symbol instead of
+	mere symbols and deal with struct block_symbol from lookup
+	functions.
+	* cp-support.c (inspect_type, replace_typedefs,
+	cp_lookup_rtti_type): Deal with struct block_symbol from
+	lookup functions.
+	* cp-support.h (cp_lookup_symbol_nonlocal,
+	cp_lookup_symbol_from_namespace,
+	cp_lookup_symbol_imports_or_template, cp_lookup_nested_symbol):
+	Return struct block_symbol instead of mere symbols.
+	* d-exp.y (d_type_from_name, d_module_from_name, push_variable,
+	push_module_name):
+	Deal with struct block_symbol from lookup functions.  Remove
+	uses of block_found.
+	* eval.c (evaluate_subexp_standard): Update call to
+	cp_lookup_symbol_namespace.
+	* f-exp.y: Deal with struct block_symbol from lookup functions.
+	Remove uses of block_found.
+	(yylex): Likewise.
+	* gdbtypes.c (lookup_typename, lookup_struct, lookup_union,
+	lookup_enum, lookup_template_type, check_typedef): Deal with
+	struct block_symbol from lookup functions.
+	* guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
+	* guile/scm-symbol.c (gdbscm_lookup_symbol): Likewise.
+	(gdbscm_lookup_global_symbol): Likewise.
+	* gnu-v3-abi.c (gnuv3_get_typeid_type): Likewise.
+	* go-exp.y: Likewise.  Remove uses of block_found.
+	(package_name_p, classify_packaged_name, classify_name):
+	Likewise.
+	* infrun.c (insert_exception_resume_breakpoint): Likewise.
+	* jv-exp.y (push_variable): Likewise.
+	* jv-lang.c (java_lookup_class, get_java_object_type): Likewise.
+	* language.c (language_bool_type): Likewise.
+	* language.h (struct language_defn): Update
+	la_lookup_symbol_nonlocal to return a struct block_symbol rather
+	than a mere symbol.
+	* linespec.c (find_label_symbols): Deal with struct block_symbol
+	from lookup functions.
+	* m2-exp.y: Likewise.  Remove uses of block_found.
+	(yylex): Likewise.
+	* mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
+	* objc-lang.c (lookup_struct_typedef, find_imps): Likewise.
+	* p-exp.y: Likewise.  Remove uses of block_found.
+	(yylex): Likewise.
+	* p-valprint.c (pascal_val_print): Likewise.
+	* parse.c (write_dollar_variable): Likewise.  Remove uses of
+	block_found.
+	* parser-defs.h (struct symtoken): Turn the SYM field into a
+	struct block_symbol.
+	* printcmd.c (address_info): Deal with struct block_symbol from
+	lookup functions.
+	* python/py-frame.c (frapy_read_var): Likewise.
+	* python/py-symbol.c (gdbpy_lookup_symbol,
+	gdbpy_lookup_global_symbol): Likewise.
+	* skip.c (skip_function_command): Likewise.
+	* solib-darwin.c (darwin_lookup_lib_symbol): Return a struct
+	block_symbol instead of a mere symbol.
+	* solib-spu.c (spu_lookup_lib_symbol): Likewise.
+	* solib-svr4.c (elf_lookup_lib_symbol): Likewise.
+	* solib.c (solib_global_lookup): Likewise.
+	* solist.h (solib_global_lookup): Likewise.
+	(struct target_so_ops): Update lookup_lib_global_symbol to
+	return a struct block_symbol rather than a mere symbol.
+	* source.c (select_source_symtab): Deal with struct block_symbol
+	from lookup functions.
+	* stack.c (print_frame_args, iterate_over_block_arg_vars):
+	Likewise.
+	* symfile.c (set_initial_language): Likewise.
+	* symtab.c (SYMBOL_LOOKUP_FAILED): Turn into a struct
+	block_symbol.
+	(SYMBOL_LOOKUP_FAILED_P): New predicate as a macro.
+	(struct symbol_cache_slot): Turn the FOUND field into a struct
+	block_symbol.
+	(block_found): Remove.
+	(eq_symbol_entry): Update to deal with struct block_symbol in
+	cache slots.
+	(symbol_cache_lookup): Return a struct block_symbol rather than
+	a mere symbol.
+	(symbol_cache_mark_found): Add a BLOCK parameter to fill
+	appropriately the cache slots.  Update callers.
+	(symbol_cache_dump): Update cache slots handling to the type
+	change.
+	(lookup_symbol_in_language, lookup_symbol, lookup_language_this,
+	lookup_symbol_aux, lookup_local_symbol,
+	lookup_symbol_in_objfile, lookup_global_symbol_from_objfile,
+	lookup_symbol_in_objfile_symtabs,
+	lookup_symbol_in_objfile_from_linkage_name,
+	lookup_symbol_via_quick_fns, basic_lookup_symbol_nonlocal,
+	lookup_symbol_in_static_block, lookup_static_symbol,
+	lookup_global_symbol):
+	Return a struct block_symbol rather than a mere symbol.  Deal
+	with struct block_symbol from other lookup functions.  Remove
+	uses of block_found.
+	(lookup_symbol_in_block): Remove uses of block_found.
+	(struct global_sym_lookup_data): Turn the RESULT field into a
+	struct block_symbol.
+	(lookup_symbol_global_iterator_cb): Update references to the
+	RESULT field.
+	(search_symbols): Deal with struct block_symbol from lookup
+	functions.
+	* symtab.h (struct block_symbol): New structure.
+	(block_found): Remove.
+	(lookup_symbol_in_language, lookup_symbol,
+	basic_lookup_symbol_nonlocal, lookup_symbol_in_static_block,
+	lookup_static_symbol, lookup_global_symbol, lookup_language_this,
+	lookup_global_symbol_from_objfile): Return a struct block_symbol
+	rather than just a mere symbol.  Update comments to remove
+	mentions of block_found.
+	* valops.c (find_function_in_inferior,
+	value_struct_elt_for_reference, value_maybe_namespace_elt,
+	value_of_this):  Deal with struct block_symbol from lookup
+	functions.
+	* value.c (value_static_field, value_fn_field): Likewise.
+
+2015-07-31  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote-m32r-sdi.c (m32r_remove_watchpoint): Use enum type
+	instead of integer.
+
+2015-07-31  Simon Marchi  <simon.marchi@ericsson.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Use enum
+	type or value instead of integer.
+	(aarch64_linux_insert_watchpoint): Likewise.
+	(aarch64_linux_remove_watchpoint): Likewise.
+	* ada-lang.c (ada_op_print_tab): Likewise.
+	* amd64-linux-tdep.c (amd64_canonicalize_syscall): Likewise.
+	(amd64_linux_syscall_record_common): Likewise.
+	* arch-utils.c (target_byte_order_user): Likewise.
+	(default_byte_order): Likewise.
+	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Likewise.
+	(arm_linux_get_hwbp_type): Likewise.
+	(arm_linux_hw_watchpoint_initialize): Likewise.
+	(arm_linux_insert_watchpoint): Likewise.
+	* arm-linux-tdep.c (arm_canonicalize_syscall): Likewise.
+	(arm_linux_syscall_record): Likewise.
+	* breakpoint.c (update_watchpoint): Likewise.
+	(breakpoint_here_p): Likewise.
+	(bpstat_print): Likewise.
+	(enable_breakpoint_disp): Likewise.
+	* c-lang.c (c_op_print_tab): Likewise.
+	* cli/cli-decode.c (add_info_alias): Likewise.
+	* d-lang.c (d_op_print_tab): Likewise.
+	* eval.c (evaluate_subexp_standard): Likewise.
+	* f-exp.y (dot_ops): Likewise.
+	(f77_keywords): Likewise.
+	* f-lang.c (f_op_print_tab): Likewise.
+	* go-lang.c (go_op_print_tab): Likewise.
+	* guile/scm-breakpoint.c (gdbscm_make_breakpoint): Likewise.
+	* guile/scm-cmd.c (gdbscm_make_command): Likewise.
+	* guile/scm-param.c (gdbscm_make_parameter): Likewise.
+	* guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Likewise.
+	* guile/scm-string.c (struct scm_to_stringn_data): Likewise.
+	(struct scm_from_stringn_data): Likewise.
+	* i386-linux-tdep.c (i386_canonicalize_syscall): Likewise.
+	* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
+	(ia64_linux_remove_watchpoint): Likewise.
+	(ia64_linux_can_use_hw_breakpoint): Likewise.
+	* infrun.c (print_stop_event): Likewise.
+	* jv-lang.c (java_op_print_tab): Likewise.
+	* linux-nat.c (linux_proc_xfer_partial): Likewise.
+	* linux-nat.h (struct lwp_info): Likewise.
+	* linux-thread-db.c (enable_thread_event): Likewise.
+	* m2-lang.c (m2_op_print_tab): Likewise.
+	* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
+	(mi_cmd_stack_list_variables): Likewise.
+	* mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
+	* mi/mi-out.c (mi_table_begin): Likewise.
+	(mi_table_header): Likewise.
+	* mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Likewise.
+	(mips_linux_insert_watchpoint): Likewise.
+	(mips_linux_remove_watchpoint): Likewise.
+	* nat/mips-linux-watch.c (mips_linux_watch_type_to_irw): Likewise.
+	* nat/mips-linux-watch.h (struct mips_watchpoint): Likewise.
+	(mips_linux_watch_type_to_irw): Likewise.
+	* nto-procfs.c (procfs_can_use_hw_breakpoint): Likewise.
+	(procfs_insert_hw_watchpoint): Likewise.
+	(procfs_remove_hw_watchpoint): Likewise.
+	(procfs_hw_watchpoint): Likewise.
+	(procfs_can_use_hw_breakpoint): Likewise.
+	(procfs_remove_hw_watchpoint): Likewise.
+	(procfs_insert_hw_watchpoint): Likewise.
+	* p-lang.c (pascal_op_print_tab): Likewise.
+	* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Likewise.
+	* ppc-linux-tdep.c (ppu2spu_unwind_register): Likewise.
+	* ppc-sysv-tdep.c (get_decimal_float_return_value): Likewise.
+	* procfs.c (procfs_can_use_hw_breakpoint): Likewise.
+	(procfs_insert_watchpoint): Likewise.
+	(procfs_remove_watchpoint): Likewise.
+	* psymtab.c (recursively_search_psymtabs): Likewise.
+	* remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Likewise.
+	(m32r_insert_watchpoint): Likewise.
+	* remote-mips.c (mips_can_use_watchpoint): Likewise.
+	(mips_insert_watchpoint): Likewise.
+	(mips_remove_watchpoint): Likewise.
+	* remote.c (watchpoint_to_Z_packet): Likewise.
+	(remote_insert_watchpoint): Likewise.
+	(remote_remove_watchpoint): Likewise.
+	(remote_check_watch_resources): Likewise.
+	* s390-linux-nat.c (s390_insert_watchpoint): Likewise.
+	(s390_remove_watchpoint): Likewise.
+	(s390_can_use_hw_breakpoint): Likewise.
+	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
+	* spu-linux-nat.c (spu_can_use_hw_breakpoint): Likewise.
+	* target.h (struct target_ops): Likewise.
+	* tilegx-tdep.c (tilegx_analyze_prologue): Likewise.
+	* ui-out.c (struct ui_out_hdr): Likewise.
+	(append_header_to_list): Likewise.
+	(get_next_header): Likewise.
+	(verify_field): Likewise.
+	(ui_out_begin): Likewise.
+	(ui_out_field_int): Likewise.
+	(ui_out_field_fmt_int): Likewise.
+	(ui_out_field_skip): Likewise.
+	(ui_out_field_string): Likewise.
+	(ui_out_field_fmt): Likewise.
+	* varobj.c (new_variable): Likewise.
+	* x86-nat.c (x86_insert_watchpoint): Likewise.
+	(x86_remove_watchpoint): Likewise.
+	(x86_can_use_hw_breakpoint): Likewise.
+	* xtensa-tdep.h (struct gdbarch_tdep): Likewise.
+	* inflow.c (enum gdb_has_a_terminal_flag_enum): Add name to
+	previously anonymous enumeration type..
+	* linux-record.h (enum gdb_syscall): Add gdb_sys_no_syscall
+	value.
+	* target-debug.h (target_debug_print_enum_target_hw_bp_type): New.
+	(target_debug_print_enum_bptype): New.
+	* target-delegates.c: Regenerate.
+
+2015-07-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2-tdep.c (nios2_analyze_prologue): Do what the comment
+	already says and disallow non-stack memory writes in the prologue.
+
+2015-07-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2-tdep.c (nios2_analyze_prologue): Update comments to
+	reflect how current GCC emits stack overflow checks.  Match
+	both trap and break instructions for backward compatbility.
+	Disallow other trap and break instructions in the prologue.
+
+2015-07-30  Pedro Alves  <palves@redhat.com>
+
+	PR threads/18600
+	* linux-nat.c (wait_lwp): Report to the core when thread group
+	leader exits.
+
+2015-07-30  Pedro Alves  <palves@redhat.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR threads/18600
+	* linux-nat.c (linux_handle_extended_wait): On CLONE event, always
+	mark the new thread as resumed.  Remove STOPPING parameter.
+	(wait_lwp): Adjust call to linux_handle_extended_wait.
+	(linux_nat_filter_event): Adjust call to
+	linux_handle_extended_wait.
+	(resume_stopped_resumed_lwps): Add debug output.
+
+2015-07-30  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* arch-utils.c (default_fast_tracepoint_valid_at): Remove unused
+	isize argument.
+	* arch-utils.h (default_fast_tracepoint_valid_at): Likewise.
+	* breakpoint.c (check_fast_tracepoint_sals): Adjust call to
+	gdbarch_fast_tracepoint_valid_at.
+	* gdbarch.sh (fast_tracepoint_valid_at): Remove isize argument.
+	* gdbarch.h: Regenerate.
+	* gdbarch.c: Regenerate.
+	* i386-tdep.c (i386_fast_tracepoint_valid_at): Remove isize
+	argument.  Do not set it.
+	* remote.c (remote_download_tracepoint): Adjust call to
+	gdbarch_fast_tracepoint_valid_at.  Call gdb_insn_length to get
+	the instruction length.
+
+2015-07-30  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.h (enum gdb_regnum): Move it to ...
+	* arch/arm.h: ... here.  New file.
+	* Makefile.in (HFILES_NO_SRCDIR): Add arch/arm.h.
+
+2015-07-30  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (decode_b): Rename link argument to is_bl.
+	Change its type to int *.
+	(decode_br): Rename link argument to is_blr.  Change its type to
+	int *.
+	(decode_cb): Rename op argument to is_cbnz.  Change its type to
+	int *.
+	(decode_tb): Rename op argument to is_tbnz.  Change its type to
+	int *.  Set is_tbnz to either 1 or 0.
+	(aarch64_analyze_prologue): Change type of is_link to int.  Add
+	new variables is_cbnz and is_tbnz.  Adjust call to
+	aarch64_decode_cb and aarch64_decode_tb.
+
+2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mips-linux-nat.c (write_watchpoint_regs): Add NULL as ptrace's 4th
+	parameter.
+	(mips_linux_new_thread): Likewise.
+	* nat/mips-linux-watch.c (mips_linux_read_watch_registers): Likewise.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.c: Include "tui/tui.h".
+	(undo_terminal_modifications_before_exit): New static function.
+	(quit_force): Use it.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* target.c (terminal_state): Initialize to terminal_is_ours.
+
+2015-07-29  Yao Qi  <yao.qi@linaro.org>
+
+	PR record/18691
+	* dcache.c (dcache_read_memory_partial): Call
+	raw_memory_xfer_partial.
+	* target.c (raw_memory_xfer_partial): Make it non-static.
+	* target.h (raw_memory_xfer_partial): Declare.
+
+2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print_array): Consider addressable memory
+	unit size.
+	(c_val_print_ptr): Likewise.
+	(c_val_print_int): Likewise.
+	* findvar.c (read_frame_register_value): Likewise.
+	* valarith.c (find_size_for_pointer_math): Likewise.
+	(value_ptrdiff): Likewise.
+	(value_subscripted_rvalue): Likewise.
+	* valops.c (read_value_memory): Likewise (and rename variables).
+	(value_assign): Likewise.
+	(value_repeat): Likewise.
+	(value_array): Likewise.
+	(value_slice): Likewise.
+	* valprint.c (generic_val_print_ptr): Likewise.
+	(generic_val_print_enum): Likewise.
+	(generic_val_print_bool): Likewise.
+	(generic_val_print_int): Likewise.
+	(generic_val_print_char): Likewise.
+	(generic_val_print_float): Likewise.
+	(generic_val_print_decfloat): Likewise.
+	(generic_val_print_complex): Likewise.
+	(val_print_scalar_formatted): Likewise.
+	(val_print_array_elements): Likewise.
+	* value.c (set_value_parent): Likewise.
+	(value_contents_copy_raw): Likewise.
+	(set_internalvar_component): Likewise.
+	(value_primitive_field): Likewise.
+	(value_fetch_lazy): Likewise.
+	* value.h (read_value_memory): Update comment.
+
+2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* value.c (get_value_arch): New function.
+	* value.h (get_value_arch): New declaration.
+
+2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* value.c (struct value): Update comments.
+
+2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdbtypes.c (type_length_units): New function.
+	* gdbtypes.h (type_length_units): New declaration.
+	(struct type) <length>: Update comment.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out complex
+	printing code to ...
+	(generic_val_print_complex): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out decfloat
+	printing code to ...
+	(generic_val_print_decfloat): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out float
+	printing code to ...
+	(generic_val_print_float): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out char
+	printing code to ...
+	(generic_val_print_char): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out integer
+	printing code to ...
+	(generic_val_print_int): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out bool
+	printing code to ...
+	(generic_val_print_bool): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out function/method
+	printing code to ...
+	(generic_val_print_func): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out flags
+	printing code to ...
+	(generic_val_print_flags): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out enum
+	printing code to ...
+	(generic_val_print_enum): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out reference
+	printing code to ...
+	(generic_val_print_ref): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out memberptr
+	printing code to ...
+	(generic_val_print_memberptr): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out pointer
+	printing code to ...
+	(generic_val_print_ptr): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out array
+	printing code to ...
+	(generic_val_print_array): ... this new function.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valprint.c (generic_val_print): Factor out
+	print_unpacked_pointer code to ...
+	(print_unpacked_pointer): ... this new function.
+
+2015-07-27  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* event-top.c (handle_sigterm): Don't inspect
+	target_can_async_p.  Always set the quit flag and always mark
+	the async signal handler.
+
+2015-07-27  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (REMOTE_EXAMPLES): Remove it.
+
+2015-07-25  Kevin Buettner  <kevinb@redhat.com>
+
+	* remote.c (read_ptid): Return null_ptid when no thread id
+	is found.
+	(remote_current_thread): Add log warning for malformed
+	qC reply.
+	(remote_start_remote): Add log warning when current thread
+	not found.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* s390-linux-nat.c (fetch_regs, store_regs, fetch_fpregs)
+	(s390_stopped_by_watchpoint, s390_prepare_to_resume): Pass 0 as
+	forth argument to ptrace PTRACE_PEEKUSR_AREA/PTRACE_POKEUSR_AREA.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18717
+	* linux-nat.c (linux_nat_filter_event): Don't assert that the lwp
+	is resumed, and extend the debug log.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* fork-child.c (fork_inferior): Print argv[0] instead of exec_file.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of
+	sys/ptrace.h.
+	* alpha-linux-nat.c: Likewise.
+	* amd64-linux-nat.c: Likewise.
+	* arm-linux-nat.c: Likewise.
+	* hppa-linux-nat.c: Likewise.
+	* i386-linux-nat.c: Likewise.
+	* ia64-linux-nat.c: Likewise.
+	* linux-fork.c: Likewise.
+	* linux-nat.c: Likewise.
+	* m32r-linux-nat.c: Likewise.
+	* m68klinux-nat.c: Likewise.
+	* mips-linux-nat.c: Likewise.
+	* nat/linux-btrace.c: Likewise.
+	* nat/linux-ptrace.c: Likewise.
+	* nat/linux-ptrace.h
+	* nat/mips-linux-watch.c: Likewise.
+	* nat/x86-linux-dregs.c: Likewise.
+	* ppc-linux-nat.c: Likewise.
+	* s390-linux-nat.c: Likewise.
+	* spu-linux-nat.c: Likewise.
+	* tilegx-linux-nat.c: Likewise.
+	* x86-linux-nat.c: Likewise.
+	* xtensa-linux-nat.c: Likewise.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* ptrace.m4 (ptrace tests): Test in C++ mode.  Try with 'enum
+	__ptrace_request as first parameter type instead of int.
+	(PTRACE_TYPE_ARG1): Define.
+	* nat/gdb_ptrace.h [!PTRACE_TYPE_ARG5] (ptrace): Define as wrapper
+	that casts first argument to PTRACE_TYPE_ARG1.
+	* config.in: Regenerate.
+	* configure: Regenerate.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb_ptrace.h: Move ...
+	* nat/gdb_ptrace.h: ... here.
+	* inf-ptrace.c: Adjust.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* acinclude.m4: Include ptrace.m4.
+	* configure.ac: Call GDB_AC_PTRACE and move ptrace checks ...
+	* ptrace.m4: ... to this new file.
+
+2015-07-23  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (dwarf2_per_cu_data): Add comment.
+	(load_cu): Handle dummy CUs.
+	(dw2_do_instantiate_symtab, process_queuef): Ditto.
+	(dwarf2_fetch_die_loc_sect_off, dwarf2_fetch_constant_bytes): Ditto.
+
+2015-07-23  Ciro Santilli  <ciro.santilli@gmail.com>  (tiny patch)
+
+	* py-linetable.c (ltpy_get_all_source_lines): Adjust function
+	documentation to say that it returns a list rather than
+	a FrozenSet.
+	(linetable_object_methods): Update the docstring of the
+	"source_line" entry.
+
+2015-07-23  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdbtypes.c (resolve_dynamic_array): Pass the peeled element
+	type to the recursive call instead of the original (maybe
+	TYPE_CODE_TYPEDEF) type.
+
+2015-07-23  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): If
+	TYPE is watchpoint, return zero if aarch64_num_wp_regs is zero.
+	If TYPE is breakpoint, return zero if arch64_num_bp_regs is zero.
+
+2015-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity):
+	Move it to nat/aarch64-linux-hw-point.c.
+	(aarch64_linux_child_post_startup_inferior): Update.
+	* nat/aarch64-linux-hw-point.c (aarch64_linux_get_debug_reg_capacity):
+	New function.
+	* nat/aarch64-linux-hw-point.h (aarch64_linux_get_debug_reg_capacity):
+	Declare it.
+
+2015-07-21  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* common/btrace-common.c (btrace_data_append): Change case label.
+
+2015-07-20  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/aarch64-linux-hw-point.c (aarch64_handle_unaligned_watchpoint):
+	Re-indent the code.
+	* nat/aarch64-linux-hw-point.h: Use ULONGEST rather than
+	"unsigned long long".
+
+2015-07-18  Kevin Buettner  <kevinb@redhat.com>
+
+	* dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
+	to be set for SEC_ALLOC sections too.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Add
+	nat/aarch64-linux-hw-point.h.
+	(aarch64-linux-hw-point.o): New rule.
+	* nat/aarch64-linux-hw-point.h: New file.
+	* nat/aarch64-linux-hw-point.c: New file.
+	* aarch64-linux-nat.c: Include nat/aarch64-linux-hw-point.h.
+	(AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
+	(AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
+	(AARCH64_HWP_ALIGNMENT): Likewise.
+	(AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
+	(AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
+	(AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
+	(DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
+	(DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
+	(aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
+	(struct aarch64_debug_reg_state): Likewise.
+	(struct arch_lwp_info):	Likewise.
+	(aarch64_linux_set_debug_regs): Likewise.
+	(aarch64_notify_debug_reg_change): Remove static.
+	(aarch64_align_watchpoint): Likewise.
+	(DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
+	(aarch64_watchpoint_length): Likewise.
+	(aarch64_point_encode_ctrl_reg): Likewise
+	(aarch64_point_is_aligned): Likewise.
+	(aarch64_dr_state_insert_one_point): Likewise.
+	(aarch64_dr_state_remove_one_point): Likewise.
+	(aarch64_handle_breakpoint): Likewise.
+	(aarch64_handle_aligned_watchpoint): Likewise.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+	(aarch64_handle_watchpoint): Likewise.
+	* config/aarch64/linux.mh (NAT_FILE): Add
+	aarch64-linux-hw-point.o.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_handle_breakpoint): Add argument
+	state and don't call aarch64_get_debug_reg_state.  All callers
+	update.
+	(aarch64_linux_insert_hw_breakpoint): Call
+	aarch64_get_debug_reg_state earlier.
+	(aarch64_linux_remove_hw_breakpoint): Likewise.
+	(aarch64_handle_aligned_watchpoint): Add argument state and
+	don't call aarch64_get_debug_reg_state.  All callers update.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+	(aarch64_handle_watchpoint): Add argument state.
+	(aarch64_linux_insert_watchpoint): Call aarch64_get_debug_reg_state
+	earlier.
+	(aarch64_linux_remove_watchpoint): Likewise.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_show_debug_reg_state): Use
+	debug_printf.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_dr_state_insert_one_point): Change
+	argument type's type to 'enum target_hw_bp_type'.
+	(aarch64_dr_state_remove_one_point): Likewise.
+	(aarch64_handle_breakpoint): Likewise.
+	(aarch64_linux_insert_hw_breakpoint): Likewise.
+	(aarch64_linux_remove_hw_breakpoint): Likewise.
+	(aarch64_handle_aligned_watchpoint): Likewise.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Call
+	ptid_get_pid instead of get_thread_id.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* remote.c (get_current_thread): Initialise ptid to null_ptid.
+	(add_current_inferior_and_thread): Don't initialise ptid.
+
+2015-07-16  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_pseudo_read_value): Mark S register as
+	unavailable if invalid.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert the previous 6 commits:
+	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
+	Move gdb_regex* to common/
+	Prepare linux_find_memory_regions_full & co. for move
+	Move linux_find_memory_regions_full & co.
+	gdbserver build-id attribute generator
+	Validate symbol file using build-id
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Validate symbol file using build-id.
+	* NEWS (Changes since GDB 7.10): Add 'set validate-build-id'
+	and 'show validate-build-id'.  Add build-id attribute.
+	* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
+	* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
+	* solib-frv.c (_initialize_frv_solib): Ditto.
+	* solib-spu.c (set_spu_solib_ops): Ditto.
+	* solib-svr4.c: Include rsp-low.h.
+	(NOTE_GNU_BUILD_ID_NAME): New define.
+	(svr4_validate): New function.
+	(svr4_copy_library_list): Duplicate field build_id.
+	(library_list_start_library): Parse 'build-id' attribute.
+	(svr4_library_attributes): Add 'build-id' attribute.
+	(_initialize_svr4_solib): Assign validate value.
+	* solib-target.c (solib.h): Include.
+	(_initialize_solib_target): Assign validate value.
+	* solib.c (validate_build_id, show_validate_build_id): New.
+	(solib_map_sections): Use ops->validate.
+	(clear_so): Free build_id.
+	(default_solib_validate): New function.
+	(_initialize_solib): Add "validate-build-id".
+	* solib.h (default_solib_validate): New declaration.
+	* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
+	(target_so_ops): New field 'validate'.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	gdbserver build-id attribute generator.
+	* features/library-list-svr4.dtd (library-list-svr4): New
+	'build-id' attribute.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Move linux_find_memory_regions_full & co.
+	* linux-tdep.c (nat/linux-maps.h): Include.
+	(gdb_regex.h): Remove the include.
+	(enum filterflags, struct smaps_vmflags, read_mapping, decode_vmflags)
+	(mapping_is_anonymous_p, dump_mapping_p): Moved to nat/linux-maps.c.
+	(linux_find_memory_region_ftype): Moved typedef to nat/linux-maps.h.
+	(linux_find_memory_regions_full): Moved definition to nat/linux-maps.c.
+	* nat/linux-maps.c: Include ctype.h, target/target-utils.h, gdb_regex.h
+	and target/target.h.
+	(struct smaps_vmflags, read_mapping, decode_vmflags)
+	(mapping_is_anonymous_p, dump_mapping_p): Move from linux-tdep.c.
+	(linux_find_memory_regions_full): Move from linux-tdep.c.
+	* nat/linux-maps.h (read_mapping): New declaration.
+	(linux_find_memory_region_ftype, enum filterflags): Moved from
+	linux-tdep.c.
+	(linux_find_memory_regions_full): New declaration.
+	* target.c (target/target-utils.h): Include.
+	(read_alloc_pread_ftype): Moved typedef to target/target-utils.h.
+	(read_alloc, read_stralloc_func_ftype, read_stralloc): Moved
+	definitions to target/target-utils.c.
+	* target.h (target_fileio_read_stralloc): Move it to target/target.h.
+	* target/target-utils.c (read_alloc, read_stralloc): Move definitions
+	from target.c.
+	* target/target-utils.h (read_alloc_pread_ftype): New typedef.
+	(read_alloc): New declaration.
+	(read_stralloc_func_ftype): New typedef.
+	(read_stralloc): New declaration.
+	* target/target.h (target_fileio_read_stralloc): Move it from target.h.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Prepare linux_find_memory_regions_full & co. for move.
+	* linux-tdep.c (linux_find_memory_region_ftype): Comment.
+	(linux_find_memory_regions_full): Change signature and prepare
+	for moving to linux-maps.
+	(linux_find_memory_regions_data): Rename field 'obfd' to 'data'.
+	(linux_find_memory_regions_thunk): New.
+	(linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'.
+	(linux_find_memory_regions_gdb): New.
+	(linux_find_memory_regions): Rename argument 'obfd' to 'func_data'.
+	(linux_make_mappings_corefile_notes): Use
+	linux_find_memory_regions_gdb.
+	* target.c (read_alloc_pread_ftype): New typedef.
+	(target_fileio_read_alloc_1_pread): New function.
+	(read_alloc): Refactor from target_fileio_read_alloc_1.
+	(read_stralloc_func_ftype): New typedef.
+	(target_fileio_read_alloc_1): New implementation. Use read_alloc.
+	(read_stralloc): Refactored from target_fileio_read_stralloc.
+	(target_fileio_read_stralloc): New implementation, use read_stralloc.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to
+	common/gdb_regex.h.
+	(COMMON_OBS): Add gdb_regex.o.
+	(gdb_regex.o): New.
+	* common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex,
+	--without-included-regex and USE_INCLUDED_REGEX.
+	* common/gdb_regex.c: New file from utils.c functions.
+	* common/gdb_regex.h: Move it here from gdb_regex.h, update include
+	file wrapping define name.
+	* configure: Rebuilt.
+	* configure.ac (gdb_use_included_regex, --without-included-regex)
+	(USE_INCLUDED_REGEX): Move them to common/common.m4.
+	* gdb_regex.h: Move it to common/gdb_regex.h.
+	* utils.c: Remove include gdb_regex.h.
+	(do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error)
+	(compile_rx_or_error): Move them to common/gdb_regex.c.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
+	* Makefile.in (HFILES_NO_SRCDIR); Add nat/linux-maps.h,
+	common/target-utils.h.
+	(COMMON_OBS): Add target-utils.o.
+	(linux-maps.o, target-utils.o): New.
+	* target/target-utils.c: New file.
+	* target/target-utils.h: New file.
+	* config/i386/linux.mh (NATDEPFILES): Add linux-maps.o.
+	* config/i386/linux64.mh (NATDEPFILES): Ditto.
+	* nat/linux-maps.c: New file.
+	* nat/linux-maps.h: New file.
+
+2015-07-15  Markus Metzger  <markus.t.metzger@intel.com>
+	    Pedro Alves <palves@redhat.com>
+
+	* nat/linux-btrace.c (perf_event_read): Change the type of DATA_HEAD.
+	(perf_event_read_all): Change the type of SIZE and DATA_HEAD.
+	(perf_event_read_bts): Change the type of SIZE and READ.
+	(linux_enable_bts): Change the type of SIZE, PAGES, DATA_SIZE,
+	and DATA_OFFSET.  Move DATA_SIZE declaration.  Restrict the buffer size
+	to UINT_MAX.  Check for overflows when using DATA_HEAD from the perf
+	mmap page.
+	(linux_enable_pt): Change the type of PAGES and SIZE.  Restrict the
+	buffer size to UINT_MAX.
+	(linux_read_bts): Change the type of BUFFER_SIZE, SIZE, DATA_HEAD, and
+	DATA_TAIL.
+	* nat/linux-btrace.h (struct perf_event_buffer)<size, data_head>
+	<last_head>: Change type.
+	* common/btrace-common.h (struct btrace_dat_pt) <size>: Change type.
+	* common/btrace-common.c (btrace_data_append): Change the type of
+	SIZE.
+	* btrace.c (parse_xml_raw): Change the type of SIZE.  Change oddness
+	check.
+
+2015-07-14  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdbtypes.h (CHECK_TYPEDEF): Remove.
+	* aarch64-tdep.c (aarch64_return_in_memory): Replace CHECK_TYPEDEF
+	with check_typedef.
+	* ada-lang.c (decode_constrained_packed_array_type): Likewise.
+	(ada_array_length): Likewise.
+	(find_parallel_type_by_descriptive_type): Likewise.
+	(ada_check_typedef): Likewise.
+	* arm-tdep.c (arm_return_in_memory): Likewise.
+	* ax-gdb.c (gen_trace_static_fields): Likewise.
+	(gen_struct_ref_recursive): Likewise.
+	* c-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise.
+	(variable: block COLONCOLON name): Likewise.
+	(qualified_name: TYPENAME COLONCOLON name): Likewise.
+	* c-lang.c (classify_type): Likewise.
+	* c-typeprint.c (c_print_type): Likewise.
+	(c_print_typedef): Likewise.
+	(c_type_print_base): Likewise.
+	* c-valprint.c (c_val_print): Likewise.
+	* compile/compile-c-types.c (convert_type): Likewise.
+	* compile/compile-object-load.c (get_out_value_type): Likewise.
+	* completer.c (add_struct_fields): Likewise.
+	(expression_completer): Likewise.
+	* cp-namespace.c (cp_find_type_baseclass_by_name): Likewise.
+	(cp_lookup_nested_symbol_1): Likewise.
+	(cp_lookup_nested_symbol): Likewise.
+	* cp-valprint.c (cp_print_value_fields): Likewise.
+	(cp_print_static_field): Likewise.
+	* d-valprint.c (d_val_print): Likewise.
+	* eval.c (evaluate_subexp_standard): Likewise.
+	(evaluate_subexp_for_sizeof): Likewise.
+	* f-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise.
+	* f-typeprint.c (f_type_print_base): Likewise.
+	* f-valprint.c (f_val_print): Likewise.
+	* gdbtypes.c (get_discrete_bounds): Likewise.
+	(create_array_type_with_stride): Likewise.
+	(type_name_no_tag_or_error): Likewise.
+	(lookup_struct_elt_type): Likewise.
+	(get_unsigned_type_max): Likewise.
+	(internal_type_vptr_fieldno): Likewise.
+	(set_type_vptr_fieldno): Likewise.
+	(internal_type_vptr_basetype): Likewise.
+	(set_type_vptr_basetype): Likewise.
+	(get_vptr_fieldno): Likewise.
+	(is_integral_type): Likewise.
+	(is_scalar_type): Likewise.
+	(is_scalar_type_recursive): Likewise.
+	(distance_to_ancestor): Likewise.
+	(is_unique_ancestor_worker): Likewise.
+	(check_types_equal): Likewise.
+	* gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
+
+2015-07-14  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* dwarf2read.c (find_slot_in_mapped_hash): Extend language support to
+	also test for language_d.
+	(dwarf2_compute_name): Likewise.
+	(read_func_scope): Likewise.
+	(read_structure_type): Likewise.
+	(new_symbol_full): Likewise.
+	(determine_prefix): Likewise.
+	(read_import_statement): Use dot as the separator for language_d.
+	(typename_concat): Likewise, but don't prefix the D main function.
+
+2015-07-14  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* nat/linux-namespaces.c (setns): Rename from this ...
+	(do_setns): ... to this.  Support calling setns if it exists.
+	(mnsh_handle_setns): Call do_setns.
+
+2015-07-13  Yao Qi  <yao.qi@linaro.org>
+
+	* exec.c (exec_file_attach): Add period at the end of error
+	message.
+
+2015-07-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-win.c (window_name_completer): New function.
+	(focus_completer): Call window_name_completer.  All old content
+	moved into window_name_completer.
+	(winheight_completer): New function.
+	(_initialize_tui_win): Rename variable.  Add completer to
+	winheight command.  Update doc string on winheight.
+
+2015-07-12  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Register
+	all nios2 mach variants.
+
+2015-07-10  Kevin Buettner  <kevinb@redhat.com>
+
+	* rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead
+	of target_read_memory.
+
+2015-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-win.c (tui_set_win_height): Use a cleanup to free the
+	string copy.
+	(parse_scrolling_args): Likewise.
+
+2015-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-win.c (focus_completer): Don't duplicate the tui window
+	names in this function.
+
+2015-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-data.h (SRC_NAME): Convert to lower case.
+	(CMD_NAME): Likewise.
+	(DATA_NAME): Likewise.
+	(DISASSEM_NAME): Likewise.
+	* tui/tui-win.c (tui_set_focus): Window names are now lower case.
+	(tui_set_win_height): Likewise.
+	(parse_scrolling_args): Likewise.
+
+2015-07-10  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record-btrace.c (record_btrace_goto_begin)
+	(record_btrace_goto_end, record_btrace_goto): Move call to
+	print_stack_frame ...
+	(record_btrace_set_replay): ... here.  Set stop_pc.
+	* record-full.c (record_full_goto_entry): Set stop_pc.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* NEWS: Mention support for tracepoints on aarch64-linux.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* linux-aarch64-low.c (aarch64_supports_tracepoints): New
+	function.  Return 1.
+	(the_low_target): Install it.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* gdb.trace/backtrace.exp: Set registers for aarch64 target.
+	* gdb.trace/collection.exp: Likewise.
+	* gdb.trace/mi-trace-frame-collected.exp: Likewise.
+	* gdb.trace/mi-trace-unavailable.exp: Likewise.
+	* gdb.trace/report.exp: Likewise.
+	* gdb.trace/trace-break.exp: Likewise.
+	* gdb.trace/unavailable.exp: Likewise.
+	* gdb.trace/while-dyn.exp: Likewise.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c: Add ax.h and ax-gdb.h includes.
+	(aarch64_gen_return_address): New function.
+	(aarch64_gdbarch_init): Hook it.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_make_stub_cache): Set available_p and
+	swallow NOT_AVAILABLE_ERROR.
+	(aarch64_stub_this_id): Call frame_id_build_unavailable_stack if
+	available_p is not set.
+	(aarch64_stub_frame_unwind_stop_reason): New function.
+	(aarch64_stub_unwind): Install it.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_prologue_cache) <available_p>: New
+	field.
+	(aarch64_make_prologue_cache_1): New function, factored out from
+	aarch64_make_prologue_cache.  Do not allocate cache.  Set
+	available_p.
+	(aarch64_make_prologue_cache): Reimplement wrapping
+	aarch64_make_prologue_cache_1, and swallowing
+	NOT_AVAILABLE_ERROR.
+	(aarch64_prologue_frame_unwind_stop_reason): New function.
+	Return UNWIND_UNAVAILABLE if available_p is not set.
+	(aarch64_prologue_unwind): Install it.
+	(aarch64_prologue_this_id): Move prev_pc and prev_sp limit
+	checks into aarch64_prologue_frame_unwind_stop_reason.  Call
+	frame_id_build_unavailable_stack if available_p is not set.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_prologue_cache) <func, prev_pc>: New
+	fields.
+	(aarch64_scan_prologue): Set prev_pc.
+	(aarch64_make_prologue_cache): Set func.
+	(aarch64_make_stub_cache): Set prev_pc.
+	(aarch64_prologue_this_id): Remove local variables id, pc and
+	func.  Read prev_pc and func from cache.
+	(aarch64_stub_this_id): Read prev_pc from cache.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_make_stub_cache): Update comment.  New
+	argument this_cache.  Remove unused local variables reg and
+	unwound_fp.  Return early if this_cache is already set.  Set
+	this_cache.
+	(aarch64_stub_this_id): Update call to aarch64_make_stub_cache.
+
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* aarch64-tdep.c (aarch64_make_prologue_cache): Update comment.
+	New argument this_cache.  Return early if this_cache is already
+	set.  Set this_cache.
+	(aarch64_prologue_this_id): Update call to
+	aarch64_make_prologue_cache.
+	(aarch64_prologue_prev_register): Likewise.
+	(aarch64_normal_frame_base): Likewise.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Factor out memberptr printing code
+	from c_val_print to ...
+	(c_val_print_memberptr): ... this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Factor out int printing code to ...
+	(c_val_print_int): ... this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Factor out struct and union
+	printing code to ...
+	(c_val_print_struct): ... this new function ...
+	(c_val_print_union): ... and this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Factor out pointer printing code
+	to ...
+	(c_val_print_ptr): ... this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_valprint): Factor our array printing code from
+	c_val_print to ...
+	(c_val_print_array): ... this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Factor out pointer printing code
+	to ...
+	(print_unpacked_pointer): ... this new function.
+
+2015-07-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* c-valprint.c (c_val_print): Remove an assignment to i and move
+	its declaration.
+
+2015-07-09  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Add
+	argument ptid.  Update comments.  Caller update.
+
+2015-07-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (pt_print_packet): Print stop, vmcs, tma, mtc, cyc, and
+	mnt packets.
+
+2015-07-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_pt_readmem_callback): Change type of PC argument.
+
+2015-07-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* progspace.c (delete_program_space): Add missing spaces.
+
+2015-07-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* inferior.c (delete_inferior_1): Rename to ...
+	(delete_inferior): ..., remove 'silent' parameter, delete
+	program space when unused and remove call to prune_program_spaces.
+	Remove the old, unused, delete_inferior.
+	(delete_inferior_silent): Remove.
+	(prune_inferiors): Change call from delete_inferior_1 to
+	delete_inferior and remove 'silent' parameter. Remove call to
+	prune_program_spaces.
+	(remove_inferior_command): Idem.
+	* inferior.h (delete_inferior_1): Rename to...
+	(delete_inferior): ..., remove 'silent' parameter and remove the
+	original delete_inferior.
+	(delete_inferior_silent): Remove.
+	* mi/mi-main.c (mi_cmd_remove_inferior): Change call from
+	delete_inferior_1 to delete_inferior and remove 'silent'
+	parameter.
+	* progspace.c (prune_program_spaces): Remove.
+	(pspace_empty_p): Rename to...
+	(program_space_empty_p): ... and make non-static.
+	(delete_program_space): New.
+	* progspace.h (prune_program_spaces): Remove declaration.
+	(program_space_empty_p): New declaration.
+	(delete_program_space): New declaration.
+	* monitor.c (monitor_close): Replace call to
+	delete_thread_silent and delete_inferior_silent with
+	discard_all_inferiors.
+
+2015-07-08  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* defs.h (deprecated_register_changed_hook): Remove prototype.
+	* interps.c (clear_iterpreter_hooks): Remove reference to
+	deprecated_register_changed_hook.
+	* top.c (deprecated_register_changed_hook): Remove prototype.
+	* valops.c (value_assign): Remove reference to
+	deprecated_register_changed_hook.
+	* tui/tui-hooks.c (tui_register_changed): Add parameter "frame".
+	Add comment documenting the function.
+	(tui_register_changed_observer): Define.
+	(tui_install_hooks): Remove reference to
+	deprecated_register_changed_hook.  Set
+	tui_register_changed_observer.
+	(tui_remove_hooks): Remove reference to
+	deprecated_register_changed_hook.  Unset
+	tui_register_changed_observer.
+
+2015-07-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR compile/18484
+	* compile/compile-c-types.c (insert_type): Change gdb_assert to error.
+
+2015-07-08  Robert O'Callahan  <robert@ocallahan.org>
+
+	PR exp/18617
+	* ax-gdb.c (gen_conversion): Extend to 'to' bits, not 'from'.
+
+2015-07-08  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* MAINTAINERS (Write After Approval): Add Markus T. Metzger.
+
+2015-07-08  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.c (kernel_supports_bts, kernel_supports_pt):
+	Use safe_strerror() instead of strerror().
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* features/arm-with-m-fpa-layout.xml: Set architecture to arm.
+	* features/arm-with-m-fpa-layout.c: Regenerated.
+	* features/arm-with-m-vfp-d16.xml: Likewise.
+	* features/arm-with-m-vfp-d16.c: Regenerated.
+	* features/arm-with-m.xml: Likewise.
+	* features/arm-with-m.c: Regenerated.
+	* features/arm-with-neon.xml: Likewise.
+	* features/arm-with-neon.c: Regenerated.
+	* features/arm-with-vfpv2.xml: Likewise.
+	* features/arm-with-vfpv2.c: Regenerated.
+	* features/arm-with-vfpv3.xml: Likewise.
+	* features/arm-with-vfpv3.c: Regenerated.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch32-linux-nat.h (VFP_REGS_SIZE): New macro, moved from
+	arm-linux-nat.c.
+	* aarch64-linux-nat.c: Include aarch32-linux-nat.h and
+	elf/external.h.
+	(fetch_gregs_from_thread): Call aarch32_gp_regcache_supply
+	if target is 32-bit.
+	(store_gregs_to_thread): Call aarch32_gp_regcache_collect
+	if target is 32-bit.
+	(fetch_fpregs_from_thread): Call aarch32_vfp_regcache_supply
+	if target is 32-bit.
+	(store_fpregs_to_thread): Call aarch32_vfp_regcache_collect
+	if target is 32-bit.
+	(tdesc_arm_with_vfpv3, tdesc_arm_with_neon): Declare.
+	(aarch64_linux_read_description): Return the right target
+	description.
+	* arm-linux-nat.c (VFP_REGS_SIZE): Moved to aarch32-linux-nat.h.
+	* config/aarch64/linux.mh (NATDEPFILES): Add aarch32-linux-nat.o.
+	* configure.tgt (aarch64*-*-linux*): Add arm-tdep.o and
+	arm-linux-tdep.o.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch32-linux-nat.c: New file.
+	* aarch32-linux-nat.h: New file.
+	* arm-linux-nat.c: Include aarch32-linux-nat.h.
+	(fetch_regs): Move code to aarch32-linux-nat.c.  Call
+	aarch32_gp_regcache_supply.
+	(store_regs): Move code to aarch32-linux-nat.c.  Call
+	aarch32_gp_regcache_collect.
+	(fetch_vfp_regs): Move code to aarch32-linux-nat.c.  Call
+	aarch32_vfp_regcache_supply.
+	(store_vfp_regs): Move code to aarch32-linux-nat.c.  Call
+	aarch32_vfp_regcache_collect.
+	* config/arm/linux.mh (NATDEPFILES): Add aarch32-linux-nat.o.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (store_fpregister): Remove.
+	(store_register): Likewise.
+	(fetch_fpregister): Likewise.
+	(fetch_register): Likewise.
+	(arm_linux_store_inferior_registers): Call store_regs and
+	store_fpregs instead.
+	(arm_linux_fetch_inferior_registers): Call fetch_fpregs and
+	fetch_regs instead.
+
+2015-07-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* doc/gdb.texinfo (TUI): Restructure documentation on TUI layout
+	and focus commands.
+
+2015-07-06  Joel Brobecker  <brobecker@adacore.com>
+
+	* NEWS: Create a new section for the next release branch.
+	Rename the section of the current branch, now that it has
+	been cut.
+
+2015-07-06  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.10 branch created (66c4b3e8a628a207bc6aafef6af0c4128195f56e):
+	* version.in: Bump version to 7.10.50.DATE-cvs.
+
+2015-07-06  Luis Machado  <lgustavo@codesourcery.com>
+
+	* breakpoint.c (remove_breakpoint_1): Don't handle permanent
+	breakpoints in a special way.
+	(remove_breakpoint): Likewise.
+	(mark_breakpoints_out): Likewise.
+
+2015-07-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* doc/gdb.texinfo (TUI): Add comma after @xref.
+
+2015-07-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-win.c (tui_set_focus): Use structure member 'generic'
+	instead of casting the structure type.
+
+2015-07-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* valops.c (search_struct_field): Remove OFFSET parameter.
+	(value_cast_structs): Adjust calls to search_struct_field.
+	(value_struct_elt): Same.
+	(find_overload_match): Same.
+
+2015-07-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* value.c (value_fetch_lazy): Update comment, change return
+	value to void.
+	* value.h (value_fetch_lazy): Change return value to void.
+
+2015-07-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-data.c (tui_partial_win_by_name): Window name is const.
+	(tui_win_name): Make parameter and result const.
+	* tui/tui-data.h (tui_win_name): Make parameter and result const.
+
+2015-07-06  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* i386-tdep.c (i386_mpx_info_bounds): Don't call error, instead
+	use printf_unfiltered.
+	(set_mpx_cmd): Add missing trailing space to command string
+	literal.
+	(_initialize_i386_tdep): Give the "mpx" prefix command its
+	correct name.
+
+2015-07-02  Kevin Buettner  <kevinb@redhat.com>
+
+	* rx-tdep.c (RX_USP_REGNUM, RX_BPC_REGNUM): New constants.
+	(enum rx_frame_type): New.
+	(struct rx_prologue): Add new field `frame_type'.
+	(rx_analyze_prologue): Add `frame_type' parameter. Cache this
+	parameter in the prologue struct.  Add code for recording
+	locations of PC and PSW for fast interrupt and exception frames.
+	(rx_skip_prologue): Adjust call to rx_analyze_prologue.
+	(rx_analyze_frame_prologue): Add `frame_type' parameter.
+	(rx_frame_type): New function.
+	(rx_frame_base): Fetch frame type and pass it to rx_analyze_prologue.
+	(rx_frame_this_id): Rename parameter `this_prologue_cache' to
+	`this_cache'.
+	(rx_frame_prev_register): Rename parameter `this_prologue_cache' to
+	`this_cache'.  Add cases for RX_FRAME_TYPE_EXCEPTION and
+	RX_FRAME_TYPE_FAST_INTERRUPT.
+	(normal_frame_p, exception_frame_p, rx_frame_sniffer_common)
+	(rx_frame_sniffer, rx_exception_sniffer): New functions.
+	(rx_frame_unwind): Use rx_frame_sniffer instead of
+	default_frame_sniffer.
+	(rx_frame_unwind): New unwinder.
+	(rx_gdbarch_init): Register new unwinder.
+
+2015-07-02  Kevin Buettner  <kevinb@redhat.com>
+
+	* rx-tdep.c (RX_BPSW_REGNUM, RX_FPSW_REGNUM): New constants.
+	(struct gdbarch_tdep): Add fields rx_psw_type and rx_fpsw_type.
+	(rx_register_type): Add cases for RX_PSW_REGNUM, RX_BPSW_REGNUM,
+	and RX_FPSW_REGNUM.
+	(rx_gdbarch_init): Initialize PSW, BPSW, and FPSW flags types.
+
+2015-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix GCC false warning.
+	* s390-linux-tdep.c (s390_handle_arg): Initialize VAL.
+
+2015-07-02  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Fix
+	typo in the debugging message.
+
+2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c: Include gdbcmd.h, cli/cli-utils.h, and ctype.h.
+	(maint_btrace_cmdlist, maint_btrace_set_cmdlist)
+	(maint_btrace_show_cmdlist, maint_btrace_pt_set_cmdlist)
+	(maint_btrace_pt_show_cmdlist, maint_btrace_pt_skip_pad)
+	(btrace_maint_clear): New.
+	(btrace_fetch, btrace_clear): Call btrace_maint_clear.
+	(pt_print_packet, btrace_maint_decode_pt)
+	(btrace_maint_update_pt_packets, btrace_maint_update_packets)
+	(btrace_maint_print_packets, get_uint, get_context_size, no_chunk)
+	(maint_btrace_packet_history_cmd)
+	(maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
+	(maint_btrace_cmd, maint_btrace_set_cmd, maint_btrace_show_cmd)
+	(maint_btrace_pt_set_cmd, maint_btrace_pt_show_cmd)
+	(maint_info_btrace_cmd, _initialize_btrace): New.
+	* btrace.h (btrace_pt_packet, btrace_pt_packet_s)
+	(btrace_maint_packet_history, btrace_maint_info): New.
+	(btrace_thread_info) <maint>: New.
+	* NEWS: Announce it.
+
+2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_fetch): Append the new trace data.
+	(btrace_clear): Clear the stored trace data.
+	* btrace.h (btrace_thread_info) <data>: New.
+	* common/btrace-common.h (btrace_data_clear)
+	(btrace_data_append): New.
+	* common/btrace-common.c (btrace_data_clear)
+	(btrace_data_append): New.
+
+2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.c (linux_enable_bts): Check for
+	PERF_ATTR_SIZE_VER5.
+	Check for data_offset and data_size fields.  Use them.
+
+2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* NEWS: Announce new commands "record btrace pt" and "record pt".
+	Announce new options "set|show record btrace pt buffer-size".
+	* btrace.c: Include "rsp-low.h".
+	Include "inttypes.h".
+	(btrace_add_pc): Add forward declaration.
+	(pt_reclassify_insn, ftrace_add_pt, btrace_pt_readmem_callback)
+	(pt_translate_cpu_vendor, btrace_finalize_ftrace_pt)
+	(btrace_compute_ftrace_pt): New.
+	(btrace_compute_ftrace): Support BTRACE_FORMAT_PT.
+	(check_xml_btrace_version): Update version check.
+	(parse_xml_raw, parse_xml_btrace_pt_config_cpu)
+	(parse_xml_btrace_pt_raw, parse_xml_btrace_pt)
+	(btrace_pt_config_cpu_attributes, btrace_pt_config_children)
+	(btrace_pt_children): New.
+	(btrace_children): Add support for "pt".
+	(parse_xml_btrace_conf_pt, btrace_conf_pt_attributes): New.
+	(btrace_conf_children): Add support for "pt".
+	* btrace.h: Include "intel-pt.h".
+	(btrace_pt_error): New.
+	* common/btrace-common.c (btrace_format_string, btrace_data_fini)
+	(btrace_data_empty): Support BTRACE_FORMAT_PT.
+	* common/btrace-common.h (btrace_format): Add BTRACE_FORMAT_PT.
+	(struct btrace_config_pt): New.
+	(struct btrace_config)<pt>: New.
+	(struct btrace_data_pt_config, struct btrace_data_pt): New.
+	(struct btrace_data)<pt>: New.
+	* features/btrace-conf.dtd (btrace-conf)<pt>: New.
+	(pt): New.
+	* features/btrace.dtd (btrace)<pt>: New.
+	(pt, pt-config, cpu): New.
+	* nat/linux-btrace.c (perf_event_read, perf_event_read_all)
+	(perf_event_pt_event_type, kernel_supports_pt)
+	(linux_supports_pt): New.
+	(linux_supports_btrace): Support BTRACE_FORMAT_PT.
+	(linux_enable_bts): Free tinfo on error.
+	(linux_enable_pt): New.
+	(linux_enable_btrace): Support BTRACE_FORMAT_PT.
+	(linux_disable_pt): New.
+	(linux_disable_btrace): Support BTRACE_FORMAT_PT.
+	(linux_fill_btrace_pt_config, linux_read_pt): New.
+	(linux_read_btrace): Support BTRACE_FORMAT_PT.
+	* nat/linux-btrace.h (struct btrace_tinfo_pt): New.
+	(struct btrace_target_info)<pt>: New.
+	* record-btrace.c (set_record_btrace_pt_cmdlist)
+	(show_record_btrace_pt_cmdlist): New.
+	(record_btrace_print_pt_conf): New.
+	(record_btrace_print_conf): Support BTRACE_FORMAT_PT.
+	(btrace_ui_out_decode_error): Support BTRACE_FORMAT_PT.
+	(cmd_record_btrace_pt_start): New.
+	(cmd_record_btrace_start): Support BTRACE_FORMAT_PT.
+	(cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): New.
+	(_initialize_record_btrace): Add new commands.
+	* remote.c (PACKET_Qbtrace_pt, PACKET_Qbtrace_conf_pt_size): New.
+	(remote_protocol_features): Add "Qbtrace:pt".
+	Add "Qbtrace-conf:pt:size".
+	(remote_supports_btrace): Support BTRACE_FORMAT_PT.
+	(btrace_sync_conf): Support PACKET_Qbtrace_conf_pt_size.
+	(remote_enable_btrace): Support BTRACE_FORMAT_PT.
+	(_initialize_remote): Add new commands.
+
+2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* configure.ac: check for libipt
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* Makefile.in (LIBIPT): New.
+	(CLIBS): Add $LIBIPT.
+	* NEWS: document new configure options
+
+2015-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (compile_object_load): Replace debug
+	message "lookup undefined ELF symbol" by 3 more specific messages.
+
+2015-07-01  Kevin Buettner  <kevinb@redhat.com>
+
+	* rl78-tdep.c (struct gdbarch_tdep): Add new field, rl78_psw_type.
+	(rl78_register_type): Add case for RL78_PSW_REGNUM.
+	(rl78_gdbarch_init): Initialize rl78_psw_type.
+
+2015-07-01  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+	Update commentary.  Always refresh the registers when frame
+	information has changed.
+	* tui/tui-stack.c (tui_show_frame_info): Update commentary.
+	Change return type to int.  Return 1 if frame information has
+	changed, 0 otherwise.
+	(tui_before_prompt): Update commentary.
+	* tui/tui-stack.h (tui_show_frame_info): Change return type to
+	int.
+
+2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
+
+	PR tui/13378
+	* frame.c (select_frame): Remove reference to
+	deprecated_selected_frame_level_changed_hook.
+	* frame.h (deprecated_selected_frame_level_changed_hook): Remove
+	declaration.
+	* stack.c (deprecated_selected_frame_level_changed_hook):
+	Likewise.
+	* tui/tui-hooks.c (tui_selected_frame_level_changed_hook):
+	Rename to ...
+	(tui_refresh_frame_and_register_information): ... this.  Bail
+	out if there is no stack.  Don't update register information
+	unless registers_too_p is true.
+	(tui_print_frame_info_listing_hook): Rename to ...
+	(tui_dummy_print_frame_info_listing_hook): ... this.
+	(tui_before_prompt): New function.
+	(tui_normal_stop): New function.
+	(tui_before_prompt_observer): New observer.
+	(tui_normal_stop_observer): New observer.
+	(tui_install_hooks): Set
+	deprecated_print_frame_info_listing_hook to
+	tui_dummy_print_frame_info_listing_hook.  Register
+	tui_before_prompt_observer to call tui_before_prompt and
+	tui_normal_stop_observer to call tui_normal_stop.  Remove
+	reference to deprecated_selected_frame_level_changed_hook.
+	(tui_remove_hooks): Detach and unset tui_before_prompt_observer
+	and tui_normal_stop_observer.  Remove reference to
+	deprecated_selected_frame_level_changed_hook.
+
+2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
+
+	PR tui/13378
+	* tui/tui-stack.c (tui_set_locator_info): Change prototype to
+	return an int instead of void.  Return whether the locator
+	window has changed.
+	(tui_show_frame_info): If the locator info has not changed, then
+	bail out early to avoid refreshing the windows.
+
+2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-stack.c (tui_set_locator_info): Explicitly pass
+	LOCATOR_WIN to tui_alloc_content.
+
+2015-06-30  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/18605
+	* arm-tdep.c (arm_get_next_pc_raw): Break for media
+	instructions.
+
+2015-06-29  Kevin Buettner  <kevinb@redhat.com>
+
+	* rx-tdep.c (RX_PSW_REGNUM): New enum constant.
+	(rx_dwarf_reg_to_regnum): New function.
+	(rx_gdbarch_init): Register rx_dwarf_reg_to_regnum.  Use dwarf2
+	unwinding.
+
+2015-06-29  Pedro Alves  <palves@redhat.com>
+
+	PR threads/18127
+	* infcall.c (run_inferior_call): On infcall success, if the thread
+	was marked stopped before, reset it back to stopped.
+	* infrun.c (resume): Don't suppress the set_running calls when
+	doing an infcall.
+	(normal_stop): Only discard the finish_thread_state cleanup if the
+	infcall succeeded.
+
+2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* MAINTAINERS (Write After Approval): Update my email address.
+
+2015-06-26  Keith Seitz  <keiths@redhat.com>
+	    Doug Evans  <dje@google.com>
+
+	PR 16253
+	* block.c (block_lookup_symbol): For non-function blocks,
+	continue to search for a symbol with an exact domain match
+	Otherwise, return any previously found "best domain" symbol.
+	(block_lookup_symbol_primary): Likewise.
+
+2015-06-26  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* NEWS: Mention the new option "history remove-duplicates".
+	* top.c (history_remove_duplicates): New static variable.
+	(show_history_remove_duplicates): New static function.
+	(gdb_add_history): Conditionally remove duplicate history
+	entries.
+	(init_main): Add "history remove-duplicates" option.
+
+2015-06-26  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-win.c (focus_completer): New static function.
+	(_initialize_tui_win): Set the completion function of the
+	"focus" command to focus_completer.
+
+2015-06-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID
+	and language_asm..
+	* symtab.c (find_function_start_sal): Likewise.
+
+2015-06-25  Gary Benson  <gbenson@redhat.com>
+
+	* solib.c (solib_find_1): Set local variable sysroot to NULL if
+	it is the empty string after trailing slashes have been stripped.
+
+2015-06-25  Gary Benson  <gbenson@redhat.com>
+
+	* exec.c (exec_file_locate_attach): Remove gdb_sysroot NULL check.
+	* infrun.c (follow_exec): Likewise.
+	* remote.c (remote_filesystem_is_local): Likewise.
+	* solib.c (solib_find_1): Likewise.
+
+2015-06-24  Keith Seitz  <keiths@redhat.com>
+
+	* build-id.c (build_id_to_debug_bfd): Add cleanup to free
+	return value from lrealpath.
+
+2015-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+	* remote-sim.c (gdbsim_open): Move sysroot update to the top.
+
+2015-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+	* remote-sim.c: Include gdb_bfd.h.
+	(gdbsim_open): Declare new local sysroot pointing to gdb_sysroot.
+	Skip TARGET_SYSROOT_PREFIX in gdb_sysroot when it is active.
+
+2015-06-24  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't call
+	set_gdbarch_get_siginfo_type.
+	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
+	* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
+	* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
+	* m68klinux-tdep.c (m68k_linux_init_abi): Likewise.
+	* ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
+	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
+	* tilegx-linux-tdep.c (tilegx_linux_init_abi): Likewise.
+	* linux-tdep.c (linux_get_siginfo_type): Change it to static.
+	(linux_init_abi): Call set_gdbarch_get_siginfo_type.
+	* linux-tdep.h (linux_get_siginfo_type): Remove the declaration.
+
+2015-06-24  Gary Benson  <gbenson@redhat.com>
+
+	* common/buffer.c (stdint.h): Do not include.
+	* common/print-utils.c (stdint.h): Likewise.
+	* compile/compile-c-symbols.c (gdb_assert.h): Likewise.
+	* compile/compile-c-types.c (gdb_assert.h): Likewise.
+	* ft32-tdep.c (gdb_assert.h): Likewise.
+	* guile/scm-utils.c (stdint.h): Likewise.
+	* i386-linux-tdep.c (stdint.h): Likewise.
+	* i386-tdep.c (stdint.h): Likewise.
+	* nat/linux-btrace.c (stdint.h): Likewise.
+	* nat/linux-btrace.h (stdint.h): Likewise.
+	* nat/linux-ptrace.c (stdint.h): Likewise.
+	* nat/mips-linux-watch.h (stdint.h): Likewise.
+	* ppc-linux-nat.c (stdint.h): Likewise.
+	* python/python-internal.h (stdint.h): Likewise.
+	* stub-termcap.c (stdlib.h): Likewise.
+	* target/target.h (stdint.h): Likewise.
+	* xtensa-linux-nat.c (stdint.h): Likewise.
+
+2015-06-23  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.c (init_history): Look at errno after calling strtol to
+	properly map large GDBHISTSIZE values to infinity.
+
+2015-06-23  Doug Evans  <dje@google.com>
+
+	* inferior.h (struct inferior_suspend_state): Delete, unused.
+	All references deleted.
+
+2015-06-23  Mike Frysinger  <vapier@gentoo.org>
+
+	* microblaze-tdep.c (microblaze_push_dummy_code): Delete.
+	(microblaze_push_dummy_call): Likewise.
+	(microblaze_gdbarch_init): Delete calls to set_gdbarch_push_dummy_code
+	and set_gdbarch_push_dummy_call.
+
+2015-06-23  Yao Qi  <yao.qi@linaro.org>
+
+	* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
+	Check whether have_ptrace_getregset is TRIBOOL_TRUE explicitly.
+	(amd64_linux_store_inferior_registers): Likewise.
+	* arm-linux-nat.c (fetch_fpregister): Likewise.
+	(fetch_fpregs, store_fpregister): Likewise.
+	(store_fpregister, store_fpregs): Likewise.
+	(fetch_register, fetch_regs): Likewise.
+	(store_register, store_regs): Likewise.
+	(fetch_vfp_regs, store_vfp_regs): Likewise.
+	(arm_linux_read_description): Check have_ptrace_getregset is
+	TRIBOOL_UNKNOWN.  Set have_ptrace_getregset to TRIBOOL_TRUE
+	or TRIBOOL_FALSE.
+	* i386-linux-nat.c (fetch_xstateregs): Check
+	have_ptrace_getregset is not TRIBOOL_TRUE.
+	(store_xstateregs): Likewise.
+	* linux-nat.c (have_ptrace_getregset): Change its type to
+	enum tribool.
+	* linux-nat.h (tribool): New enum.
+	* x86-linux-nat.c (x86_linux_read_description): Use enum tribool.
+	Check whether have_ptrace_getregset is TRIBOOL_TRUE.
+
+2015-06-19  Doug Evans  <dje@google.com>
+
+	* NEWS: Mention Sun's version of stabs is no longer supported.
+	* elfread.c (free_elfinfo): Delete.  All uses updated.
+	(elfstab_offset_sections): Delete.  All uses updated.
+	* gdb-stabs.h (stab_section_info): Delete.  All uses updated.
+	* psympriv.h (partial_symtab) <section_offsets>: Delete.
+	All uses updated.
+	* psymtab.c (start_psymtab_common): Delete arg section_offsets.
+	All callers updated.
+
+2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* common/rsp-low.c (needs_escaping): New.
+	(remote_escape_output): Add unit_size parameter. Refactor to
+	support multi-byte addressable units.  Rename parameters.
+	* common/rsp-low.h (remote_escape_output): Add unit_size
+	parameter and rename others. Update doc.
+	* remote.c (align_for_efficient_write): New.
+	(remote_write_bytes_aux): Add unit_size parameter and use it.
+	Rename some variables.  Update doc.
+	(remote_xfer_partial): Get unit size and use it.
+	(remote_read_bytes_1): Add unit_size parameter and use it.
+	Rename some variables. Update doc.
+	(remote_write_bytes): Same.
+	(remote_xfer_live_readonly_partial): Same.
+	(remote_read_bytes): Same.
+	(remote_flash_write): Update call to remote_write_bytes_aux.
+	(remote_write_qxfer): Update call to remote_escape_output.
+	(remote_search_memory): Same.
+	(remote_hostio_pwrite): Same.
+
+2015-06-17  Luis Machado  <lgustavo@codesourcery.com>
+
+	* breakpoint.c (add_location_to_breakpoint): Don't mark permanent
+	locations as inserted.
+	Update and expand comment about permanent locations.
+	(bp_loc_is_permanent): Don't return 0 for bp_call_dummy.
+	Move comment to add_location_to_breakpoint.
+	(update_global_location_list): Don't error out if a permanent
+	breakpoint is not marked inserted.
+	Don't error out if a non-permanent breakpoint location is inserted on
+	top of a permanent breakpoint.
+
+2015-06-17  Luis Machado  <lgustavo@codesourcery.com>
+
+	* breakpoint.c (make_breakpoint_permanent): Remove unused
+	function.
+	* breakpoint.h (make_breakpoint_permanent): Remove declaration.
+
+2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
+
+	PR gdb/16999
+	* NEWS: Mention new GDBHISTSIZE behavior.
+	* top.c (init_history): For null or out-of-range GDBHISTSIZE,
+	set history size to unlimited.  Ignore non-numeric GDBHISTSIZE.
+
+2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* NEWS: Mention that GDBHISTSIZE is read instead of HISTSIZE.
+	* top.c (init_history): Read from GDBHISTSIZE instead of
+	HISTSIZE.
+	(init_main): Refer to GDBHISTSIZE instead of HISTSIZE.
+
+2015-06-17  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.c (gdb_safe_append_history): Do not call
+	history_truncate_file if the history is not stifled.
+
+2015-06-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* syscalls/s390-linux.xml: Add syscalls 344 through 354.
+	* syscalls/s390x-linux.xml: Likewise.
+
+2015-06-16  Michael Eager  <eager@eagercon.com>
+
+	* nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
+
+2015-06-16  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call
+	target_terminal_ours_for_output() before calling
+	tui_show_frame_info(), and restore the original terminal
+	settings afterwards.
+
+2015-06-16  Martin Simmons  <martin@lispworks.com>  (tiny patch)
+
+	* arm-linux-nat.c: Include nat/linux-ptrace.h.
+
+2015-06-15  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider addressable
+	memory unit size.
+	(mi_cmd_data_write_memory_bytes): Same.
+
+2015-06-15  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* corefile.c (write_memory): Update doc.
+	* gdbcore.h (write_memory): Same.
+
+2015-06-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linux-tdep.c (enum filterflags): Make it from anonymous enum.
+	(dump_mapping_p): Use it for parameter filterflags.
+	(linux_find_memory_regions_full): Use it for variable filterflags.
+
+2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Merge multiple hex conversions.
+	* monitor.c: Include rsp-low.h.
+	(fromhex): Remove definition.
+
+2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Move utility functions to common/.
+	* cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const):
+	Move defs to common/common-utils.c.
+	* cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space)
+	(skip_to_space_const): Move decls to common/common-utils.h.
+	* common/common-defs.h: Move include of common-types.h before
+	common-utils.h.
+	* common/common-utils.c: Include host-defs.h and ctype.h.
+	(HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move
+	from utils.c.
+	(skip_spaces, skip_spaces_const, skip_to_space_const): Move from
+	cli/cli-utils.c.
+	* common/common-utils.h (strtoulst): Move decl from utils.h.
+	(skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const):
+	Move from cli/cli-utils.h.
+	* common/host-defs.h: Include limits.h.
+	(TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h.
+	(skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h.
+	* defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to
+	common/common-utils.h.
+	* utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
+	(strtoulst): Move to common/common-utils.c.
+	* utils.h (strtoulst): Moved decl to common/common-utils.h.
+
+2015-06-15  Yao Qi  <yao.qi@linaro.org>
+
+	* data-directory/Makefile.in (SYSCALLS_FILES): Add aarch64-linux.xml.
+
+2015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* build-id.c: Don't include elf-bfd.h.
+	(build_id_bfd_get): Use bfd_build_id.
+	(build_id_verify): Ditto.
+	* build-id.h: Ditto.
+	(find_separate_debug_file_by_buildid): Ditto.
+	* python/py-objfile.c: Don't include elf-bfd.h.
+	(objfpy_get_build_id) Use bfd_build_id.
+	(objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto.
+	* coffread.c: Include build-id.h.
+	(coff_symfile_read): Try find_separate_debug_file_by_buildid.
+
+2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (do_windows_fetch_inferior_registers)
+	(handle_output_debug_string): Replace __COPY_CONTEXT_SIZE
+	conditional with __CYGWIN__.
+
+2015-06-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* completer.c: Add arch-utils.h include.
+	(enum reg_completer_targets): New enum.
+	(reg_or_group_completer_1): New function containing old
+	reg_or_group_completer, add and use new parameter to control what
+	is completed on.  Use get_current_arch rather than architecture of
+	currently selected frame.
+	(reg_or_group_completer): Call new reg_or_group_completer_1.
+	(reggroup_completer): Call new reg_or_group_completer_1.
+	* completer.h (reggroup_completer): Add declaration.
+	* tui/tui-regs.c: Add 'completer.h' include.
+	(tui_reg_next_command): Renamed to...
+	(tui_reg_next): ...this.  Adjust parameters and return rather than
+	display new group.
+	(tui_reg_prev_command): Renamed to...
+	(tui_reg_prev): ...this.  Adjust parameters and return rather than
+	display new group.
+	(tui_reg_float_command): Delete.
+	(tui_reg_general_command): Delete.
+	(tui_reg_system_command): Delete.
+	(tui_reg_command): Rewrite to perform switching of register group.
+	Add header comment.
+	(tuireglist): Remove.
+	(tui_reggroup_completer): New function.
+	(_initialize_tui_regs): Remove 'tui reg' sub-commands, update
+	creation of 'tui reg' command.
+	* NEWS: Add comment about 'tui reg' changes.
+
+2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* target.c (target_read): Consider addressable unit size when
+	reading from a memory object.
+	(read_memory_robust): Same.
+	(read_whatever_is_readable): Same.
+	(target_write_with_progress): Consider addressable unit size
+	when writing to a memory object.
+	* target.h (target_read): Update documentation.
+	(target_write): Add documentation.
+
+2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arch-utils.h (default_addressable_memory_unit_size): New.
+	* arch-utils.c (default_addressable_memory_unit_size): New.
+	* gdbarch.sh (addressable_memory_unit_size): New.
+	* gdbarch.h: Re-generate.
+	* gdbarch.c: Re-generate.
+
+2015-06-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* target.c (target_read): Rename variables and use
+	TARGET_XFER_E_IO.
+	(target_read_with_progress): Same.
+	(read_memory_robust): Constify parameters and rename
+	variables.
+	(read_whatever_is_readable): Constify parameters,
+	rename variables, adjust formatting.
+	* target.h (read_memory_robust): Constify parameters.
+
+2015-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short
+	synthetic (non-AltiVec) vector types.
+	(ppc64_sysv_abi_return_value): Likewise.
+
+2015-06-12  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	PR breakpoints/16465
+	* breakpoint.c (create_breakpoint): Save extra_string for
+	pending breakpoints.
+
+2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask
+	and bt_mask to CORE_ADDR.
+
+2015-06-11  Gary Benson <gbenson@redhat.com>
+
+	* nat/linux-namespaces.c (mnsh_send_message): Use pulongest.
+	(mnsh_recv_message): Likewise.
+
+2015-06-11  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
+	long long int and plongest instead of %ll.
+
+2015-06-11  Gary Benson <gbenson@redhat.com>
+
+	* nat/linux-namespaces.c (gdb_wait.h): New include.
+	(sys/wait.h): Do not include.
+
+2015-06-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* dwarf2read.c (dwarf_record_line): Call dwarf_record_line if
+	end_sequence is true.
+
+2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup.
+	* solib-target.c (library_list_start_list): Use explicit NULL
+	comparison.
+
+2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* solib-target.c (library_list_start_list): Do not dereference
+	variable version in its initialization.  Make the VERSION check handle
+	NULL.
+	(library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* NEWS: Announce support for direct access of executable and
+	shared library files when attaching to inferiors in containers
+	on GNU/Linux systems.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* remote.c (struct remote_state) <fs_pid>: New field.
+	(new_remote_state): Initialize the above.
+	(PACKET_vFile_setfs): New enum value.
+	(remote_hostio_set_filesystem): New function.
+	(remote_hostio_open): Call the above.
+	(remote_hostio_unlink): Likewise.
+	(remote_hostio_readlink): Likewise.
+	(_initialize_remote): Register new "set/show remote
+	hostio-setfs-packet" command.
+	* NEWS: Announce new vFile:setfs packet.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* linux-nat.c (nat/linux-namespaces.h): New include.
+	(fileio.h): Likewise.
+	(linux_nat_filesystem_is_local): New function.
+	(linux_nat_fileio_pid_of): Likewise.
+	(linux_nat_fileio_open): Likewise.
+	(linux_nat_fileio_readlink): Likewise.
+	(linux_nat_fileio_unlink): Likewise.
+	(linux_nat_add_target): Initialize to_filesystem_is_local,
+	to_fileio_open, to_fileio_readlink and to_fileio_unlink.
+	(_initialize_linux_nat): New "set/show debug linux-namespaces"
+	commands.
+	* NEWS: Mention new "set/show debug linux-namespaces" commands.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* target.h (struct inferior): New forward declaration.
+	(struct target_ops) <to_filesystem_is_local>: Update comment.
+	(struct target_ops) <to_fileio_open>: New argument inf.
+	Update comment.  All implementations updated.
+	(struct target_ops) <to_fileio_unlink>: Likewise.
+	(struct target_ops) <to_fileio_readlink>: Likewise.
+	(target_filesystem_is_local): Update comment.
+	(target_fileio_open): New argument inf.  Update comment.
+	(target_fileio_unlink): Likewise.
+	(target_fileio_readlink): Likewise.
+	(target_fileio_read_alloc): Likewise.
+	(target_fileio_read_stralloc): Likewise.
+	* target.c (target_fileio_open): New argument inf.
+	Pass inf to implementation.  Update debug printing.
+	(target_fileio_unlink): Likewise.
+	(target_fileio_readlink): Likewise.
+	(target_fileio_read_alloc_1): New argument inf. Pass inf
+	to target_fileio_open.
+	(target_fileio_read_alloc): New argument inf. Pass inf to
+	target_fileio_read_alloc_1.
+	(target_fileio_read_stralloc): Likewise.
+	* gdb_bfd.c (inferior.h): New include.
+	(gdb_bfd_iovec_fileio_open): Replace unused "open_closure"
+	argument with new argument "inferior".  Pass inferior to
+	target_fileio_open.
+	(gdb_bfd_open): Supply inferior argument to
+	gdb_bfd_iovec_fileio_open.
+	* linux-tdep.c (linux_info_proc): Supply inf argument to
+	relevant target_fileio calls.
+	(linux_find_memory_regions_full): Likewise.
+	(linux_fill_prpsinfo): Likewise.
+	* remote.c (remote_filesystem_is_local): Supply inf
+	argument to remote_hostio_open.
+	(remote_file_put): Likewise.
+	(remote_file_get): Likewise.
+	(remote_file_delete): Supply inf argument to
+	remote_hostio_unlink.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* inf-child.c (inf_child_fileio_open): Replace comment.
+	(inf_child_fileio_pwrite): Likewise.
+	(inf_child_fileio_pread): Likewise.
+	(inf_child_fileio_fstat): Insert blank line before comment.
+	(inf_child_fileio_close): Replace comment.
+	(inf_child_fileio_unlink): Likewise.
+	(inf_child_fileio_readlink): Likewise.
+	* remote.c (remote_hostio_open): Likewise.
+	(remote_hostio_pread): Likewise.
+	(remote_hostio_pwrite): Likewise.
+	(remote_hostio_close): Likewise.
+	(remote_hostio_unlink): Likewise.
+	(remote_hostio_readlink): Likewise.
+	(remote_hostio_fstat): Likewise.
+	(remote_filesystem_is_local): Likewise.
+	* target.c (target_fileio_open): Likewise.
+	(target_fileio_pwrite): Likewise.
+	(target_fileio_pread): Likewise.
+	(target_fileio_fstat): Insert blank line before comment.
+	(target_fileio_close): Replace comment.
+	(target_fileio_unlink): Likewise.
+	(target_fileio_readlink): Likewise.
+	(target_fileio_read_alloc): Likewise.
+	(target_fileio_read_stralloc): Likewise.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* linux-thread-db.c (nat/linux-namespaces.h): New include.
+	(check_pid_namespace_match): Use linux_ns_same rather than
+	linux_proc_pid_get_ns to spot PID namespace mismatches.
+	* nat/linux-procfs.h (linux_proc_pid_get_ns): Remove.
+	* nat/linux-procfs.c (linux_proc_pid_get_ns): Likewise.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* configure.ac (AC_CHECK_FUNCS): Add setns.
+	* config.in: Regenerate.
+	* configure: Likewise.
+	* nat/linux-namespaces.h: New file.
+	* nat/linux-namespaces.c: Likewise.
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h.
+	(linux-namespaces.o): New rule.
+	* config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o.
+	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
+	* config/arm/linux.mh (NATDEPFILES): Likewise.
+	* config/i386/linux.mh (NATDEPFILES): Likewise.
+	* config/i386/linux64.mh (NATDEPFILES): Likewise.
+	* config/ia64/linux.mh (NATDEPFILES): Likewise.
+	* config/m32r/linux.mh (NATDEPFILES): Likewise.
+	* config/m68k/linux.mh (NATDEPFILES): Likewise.
+	* config/mips/linux.mh (NATDEPFILES): Likewise.
+	* config/pa/linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
+	* config/s390/linux.mh (NATDEPFILES): Likewise.
+	* config/sparc/linux.mh (NATDEPFILES): Likewise.
+	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
+	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
+	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
+
+2015-06-10  Gary Benson <gbenson@redhat.com>
+
+	* utils.h (make_cleanup_close): Moved to common/filestuff.h.
+	* utils.c (do_close_cleanup): Moved to common/filestuff.c.
+	(make_cleanup_close): Likewise.
+	* common/filestuff.h (make_cleanup_close): Moved from utils.h.
+	* common/filestuff.c (do_close_cleanup): Moved from utils.c.
+	(make_cleanup_close): Likewise.
+
+2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (thread_rec): Also ignore ERROR_INVALID_HANDLE
+	from SuspendThread().
+
+2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (handle_output_debug_string): Trim trailing '\n'
+	from OutputDebugString.
+
+2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+			Mircea Gherzan  <mircea.gherzan@intel.com>
+
+	* i386-tdep.c (MPX_BASE_MASK, MPX_BD_MASK, MPX_BT_MASK, MPX_BD_MASK_32,
+	MPX_BT_MASK_32): New macros.
+	(i386_mpx_set_bounds): New function that implements
+	the command "set-mpx-bound".
+	(i386_mpx_enabled): Helper function to test MPX availability.
+	(i386_mpx_bd_base): Helper function to calculate the base directory
+	address.
+	(i386_mpx_get_bt_entry): Helper function to access a bound
+	table entry.
+	(i386_mpx_print_bounds): Effectively display bound information.
+	(_initialize_i386_tdep): Add new commands to commands "set mpx" and
+	"show mpx".
+	(_initialize_i386_tdep):
+	Add "bound" to the commands "show mpx" and "set mpx" commands.
+	(mpx_set_cmdlist and mpx_show_cmdlist): List for the new prefixed "set mpx"
+	and "show mpx" commands.
+	* NEWS: List new commands for MPX support.
+
+2015-06-09  Gary Benson <gbenson@redhat.com>
+
+	* common/fileio.h (fileio_to_host_mode): New declaration.
+	* common/fileio.c (fileio_to_host_mode): New Function.
+	* inf-child.c (inf_child_fileio_open): Process mode argument
+	with fileio_to_host_mode.
+
+2015-06-09  Gary Benson <gbenson@redhat.com>
+
+	* common/fileio.c (fileio_mode_pack): Fix preprocessor
+	conditional.
+
+2015-06-05  Gary Benson <gbenson@redhat.com>
+
+	* gdb_bfd.c (gdb_bfd_open): Move vgdb special case to...
+	* remote.c (remote_filesystem_is_local): ...here.
+
+2015-06-04  Yao Qi  <yao.qi@linaro.org>
+
+	* gdbarch.c: Regenerate it.
+
+2015-06-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* arch-utils.c (default_infcall_munmap): New.
+	* arch-utils.h (default_infcall_munmap): New declaration.
+	* compile/compile-object-load.c (struct munmap_list, munmap_list_add)
+	(munmap_list_free, munmap_listp_free_cleanup): New.
+	(struct setup_sections_data): Add field munmap_list_headp.
+	(setup_sections): Call munmap_list_add.
+	(compile_object_load): New variable munmap_list_head, initialize
+	setup_sections_data.munmap_list_headp, return munmap_list_head.
+	* compile/compile-object-load.h (struct munmap_list): New declaration.
+	(struct compile_module): Add field munmap_list_head.
+	(munmap_list_free): New declaration.
+	* compile/compile-object-run.c (struct do_module_cleanup): Add field
+	munmap_list_head.
+	(do_module_cleanup): Call munmap_list_free.
+	(compile_object_run): Pass munmap_list_head to do_module_cleanup.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+	* gdbarch.sh (infcall_munmap): New.
+	* linux-tdep.c (linux_infcall_munmap): New.
+	(linux_init_abi): Install it.
+
+2015-06-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/15564
+	* inferior.c (detach_inferior): Call exit_inferior_1 with silent = 0.
+
+2015-06-02  Yao Qi  <yao.qi@linaro.org>
+
+	* i386-linux-nat.c: Include linux-nat.h.
+
+2015-06-01  Andreas Schwab  <schwab@linux-m68k.org>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR symtab/18392
+	* dwarf2-frame-tailcall.c (pretended_chain_levels): Correct
+	assertion.
+	* dwarf2loc.c (chain_candidate): Likewise.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (fetch_vfp_regs): Use PTRACE_GETREGSET.
+	(store_vfp_regs): Use PTRACE_SETREGSET.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (fetch_fpregister): Use PTRACE_GETREGSET.
+	(fetch_fpregs): Likewise.
+	* arm-linux-nat.c (store_fpregister): Use PTRACE_SETREGSET.
+	(store_fpregs): Likewise.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (fetch_register): Use PTRACE_GETREGSET.
+	(fetch_regs): Likewise.
+	(store_regs): Use PTRACE_SETREGSET.
+	(store_register): Likewise.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (arm_linux_read_description): Check whether
+	kernel supports PTRACE_GETREGSET.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* x86-linux-nat.c (have_ptrace_getregset): Move it to ...
+	* linux-nat.c: ... here.
+	* x86-linux-nat.h (have_ptrace_getregset): Move the declaration
+	to ...
+	* linux-nat.h: ... here.
+
+2015-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	* amd64-linux-nat.c: Include "nat/linux-ptrace.h".
+	* i386-linux-nat.c: Likewise.
+	* nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
+	* s390-linux-nat.c: Include "nat/linux-ptrace.h".
+	(PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+	* x86-linux-nat.c: Include "nat/linux-ptrace.h".
+	* x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+
+2015-05-30  Eli Zaretskii  <eliz@gnu.org>
+
+	* go32-nat.c (go32_xfer_memory): Fix the return value to be
+	compatible to what read_child and write_child return.  This
+	unbreaks that DJGPP build of GDB which was broken since v7.7.
+
+2015-05-29  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* MAINTAINERS (Write After Approval): Add Martin Galvan.
+
+2015-05-29  Roland McGrath  <mcgrathr@google.com>
+
+	PR gdb/18464
+	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
+	rather than internal_error for an unrecognized value.
+
+2015-05-29  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* xtensa-tdep.c (xtensa_pseudo_register_read)
+	(xtensa_pseudo_register_write): Don't alias last pseudo register
+	to a1.
+
+2015-05-28  Don Breazeal  <donb@codesourcery.com>
+
+	* infrun.c (follow_fork_inferior): Ensure the use of
+	process-style ptids (pid,0,0) in verbose/debug "Detaching"
+	messages.
+
+2015-05-28  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (record_line_ftype): Remove, duplicate.
+
+2015-05-28  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (arm_linux_has_wmmx_registers): Remove.
+	(arm_linux_fetch_inferior_registers): Use
+	tdep->have_wmmx_registers instead of arm_linux_has_wmmx_registers.
+	(arm_linux_store_inferior_registers): Likewise.
+	(arm_linux_read_description): Don't set
+	arm_linux_has_wmmx_registers.
+	* arm-tdep.c (arm_gdbarch_init): Set
+	tdep->have_wmmx_registers according target descriptions.
+	* arm-tdep.h (struct gdbarch_tdep) <have_wmmx_registers>: New
+	field.
+
+2015-05-28  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (arm_linux_vfp_register_count): Remove.
+	(fetch_vfp_regs): Use vfp_register_count from gdbarch_tdep
+	instead of arm_linux_vfp_register_count.
+	(store_vfp_regs): Likewise.
+	(arm_linux_fetch_inferior_registers): Likewise.
+	(arm_linux_store_inferior_registers): Likewise.
+	(arm_linux_read_description): Don't set
+	arm_linux_vfp_register_count.
+	* arm-linux-tdep.c (arm_linux_iterate_over_regset_sections):
+	Adjust.
+	* arm-tdep.c (arm_gdbarch_init): Add assert on
+	vfp_register_count.
+	* arm-tdep.h (struct gdbarch_tdep) <have_vfp_registers>: Rename
+	field to vfp_register_count.  All users updated.
+
+2015-05-28  Kyle Huey  <me@kylehuey.com>  (tiny patch)
+
+	* gdb/arm-tdep.c (arm_gdbarch_init): Perform arm_abi detection on
+	ELFOSABI_GNU binaries.
+
+2015-05-27  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (lnp_state_machine): New typedef.
+	(lnp_reader_state): New typedef.
+	(dwarf_record_line_1): Renamed from dwarf_record_line.
+	All callers updated.
+	(dwarf_record_line): New function.
+	(init_lnp_state_machine): New function.
+	(check_line_address): Replace p_record_line parameter with state.
+	All callers updated.
+	(dwarf_decode_lines_1): Call dwarf_record_line, init_lnp_state_machine.
+	Update to record state in lnp_state_machine.
+
+2015-05-27  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (record_line_ftype): New typedef.
+	(check_line_address): New function.
+	(dwarf_decode_lines_1): Call it.
+
+2015-05-27  Doug Evans  <dje@google.com>
+
+	* NEWS: Mention "set debug dwarf-line".
+	* dwarf2read.c (dwarf_line_debug): New static global.
+	(add_include_dir): Add debug dwarf-line support.
+	(add_file_name, dwarf_record_line, dwarf_finish_line): Ditto.
+	(_initialize_dwarf2_read): New parameter "debug dwarf-line".
+
+2015-05-27  Doug Evans  <dje@google.com>
+
+	* cp-namespace.c (cp_lookup_nested_symbol): New arg "domain".
+	All callers updated.
+	(cp_lookup_nested_symbol_1, find_symbol_in_baseclass): Ditto.
+	* cp-support.h (cp_lookup_nested_symbol): Update.
+
+2015-05-27  Doug Evans  <dje@google.com>
+
+	PR symtab/18258
+	* block.c (block_find_symbol): New function.
+	(block_find_non_opaque_type): Ditto.
+	(block_find_non_opaque_type_preferred): Ditto.
+	* block.h (block_symbol_matcher_ftype): New typedef.
+	(block_find_symbol): Declare.
+	(block_find_non_opaque_type): Ditto.
+	(block_find_non_opaque_type_preferred): Ditto.
+	* dwarf2read.c (dw2_lookup_symbol): Call block_find_symbol.
+	* psymtab.c (psym_lookup_symbol): Ditto.
+	* symtab.c (basic_lookup_transparent_type_1): New function.
+	(basic_lookup_transparent_type): Call it.
+
+2015-05-27  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_record_data_proc_simd_fp): Return
+	AARCH64_RECORD_UNKNOWN for unknown instruction encoding.
+
+2015-05-27  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_record_branch_except_sys): Split lines
+	before operator &&.
+	(aarch64_record_load_store): Likewise.
+
+2015-05-26  Doug Evans  <dje@google.com>
+
+	PR c++/18141, c++/18417.
+	* cp-support.c (cp_lookup_rtti_type): Handle the case of NAME being
+	a typedef.
+
+2015-05-26  Doug Evans  <dje@google.com>
+
+	* NEWS: Add entries for command renamings.
+	* dwarf2read.c (dwarf_read_debug): Renamed from dwarf2_read_debug.
+	All uses updated.
+	(dwarf_die_debug): Renamed from dwarf2_die_debug.  All uses updated.
+	(dwarf_max_cache_age): Renamed from dwarf2_max_cache_age.
+	All uses updated.
+	(show_dwarf_max_cache_age): Renamed from show_dwarf2_max_cache_age.
+	All callers updated.  Fix spelling of DWARF in help text.
+	(set_dwarf_cmdlist): Renamed from set_dwarf2_cmdlist.
+	All uses updated.
+	(show_dwarf_cmdlist): Renamed from show_dwarf2_cmdlist.
+	All uses updated.
+	(set_dwarf_cmd): Renamed from set_dwarf2_cmd.  All callers updated.
+	(show_dwarf_cmd): Renamed from show_dwarf2_cmd.  All callers updated.
+	(dwarf_always_disassemble): Renamed from dwarf_always_disassemble.
+	All uses updated.
+	(show_dwarf_always_disassemble): Renamed from
+	show_dwarf2_always_disassemble.  All callers updated.
+	(_initialize_dwarf2_read): Rename "set/show dwarf2" prefix to
+	"set/show dwarf".  Rename "set/show dwarf2 max-cache-age" to
+	"set/show dwarf max-cache-age".  Rename
+	"set/show dwarf2 always-disassemble" to
+	"set/show dwarf always-disassemble".  Rename
+	"set/show debug dwarf2-read" to "set/show debug dwarf-read".  Rename
+	"set/show debug dwarf2-die" to "set/show debug dwarf-die".
+
+2015-05-26  Doug Evans  <dje@google.com>
+
+	PR python/18438
+	* python/py-lazy-string.c (stpy_convert_to_value): Use
+	gdbpy_gdb_memory_error not PyExc_MemoryError.
+	(gdbpy_create_lazy_string_object): Ditto.
+
+2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-regs.c (tui_reg_next_command): Compare against NULL.
+
+2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-regs.c (tui_reg_prev_command): New function.
+	(_initialize_tui_regs): Add 'prev' command for 'tui reg'.
+	* reggroups.c (reggroup_prev): New function.
+	* reggroups.h (reggroup_prev): Add declaration.  Update comment.
+
+2015-05-26  Omair Javaid  <omair.javaid@linaro.org>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-tdep.c: Include linux-record.h and
+	record-full.h.
+	(struct linux_record_tdep aarch64_linux_record_tdep): Declare.
+	(aarch64_syscall): New enum.
+	(aarch64_canonicalize_syscall): New function.
+	(aarch64_all_but_pc_registers_record): New function.
+	(aarch64_linux_syscall_record): New function.
+	(aarch64_linux_init_abi): Install AArch64 process record
+	handler.  Update to handle syscall recording.
+	* aarch64-tdep.c: Include record.h and record-full.h.
+	(submask, bit, bits, REG_ALLOC, MEM_ALLOC): New macros.
+	(struct aarch64_mem_r): Define.
+	(aarch64_record_result): New enum.
+	(struct insn_decode_record): Define.
+	(insn_decode_record): New typedef.
+	(aarch64_record_data_proc_reg): New function.
+	(aarch64_record_data_proc_imm): New function.
+	(aarch64_record_branch_except_sys): New function.
+	(aarch64_record_load_store): New function.
+	(aarch64_record_data_proc_simd_fp): New function.
+	(aarch64_record_asimd_load_store): New function.
+	(aarch64_record_decode_insn_handler): New function.
+	(deallocate_reg_mem): New function.
+	(aarch64_process_record): New function.
+	* aarch64-tdep.h (struct gdbarch_tdep) <aarch64_syscall_record>:
+	New field.
+	(aarch64_process_record): New extern declaration.
+	* configure.tgt: Add linux-record.o to gdb_target_obs.
+	* linux-record.h (struct linux_record_tdep) <arg7>: New field.
+
+2015-05-26  Omair Javaid  <omair.javaid@linaro.org>
+
+	* NEWS: Add a note on process record-replay support on aarch64*-linux*
+	targets.
+
+2015-05-26  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* amd64-tdep.c: Replace in_function_epilogue_p with
+	stack_frame_destroyed_p throughout.
+	* arch-utils.c: Ditto.
+	* arch-utils.h: Ditto.
+	* arm-tdep.c: Ditto.
+	* breakpoint.c: Ditto.
+	* gdbarch.sh: Ditto.
+	* hppa-tdep.c: Ditto.
+	* i386-tdep.c: Ditto.
+	* mips-tdep.c: Ditto.
+	* nios2-tdep.c: Ditto.
+	* rs6000-tdep.c: Ditto.
+	* s390-linux-tdep.c: Ditto.
+	* score-tdep.c: Ditto.
+	* sh-tdep.c: Ditto.
+	* sparc-tdep.c: Ditto.
+	* sparc-tdep.h: Ditto.
+	* sparc64-tdep.c: Ditto.
+	* spu-tdep.c: Ditto.
+	* tic6x-tdep.c: Ditto.
+	* tilegx-tdep.c: Ditto.
+	* xstormy16-tdep.c: Ditto.
+	* gdbarch.c, gdbarch.h: Re-generated.
+
+2015-05-22  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* NEWS: Mention 'tui enable' and 'tui disable'.
+	* tui/tui.c (tui_enable_command): New function.
+	(tui_disable_command): New function.
+	(_initialize_tui): New function.
+
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-regs.c (tui_reg_next_command): Use NULL not 0.
+
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-layout.c (tui_set_layout_for_display_command): Ensure
+	buf_ptr is freed.
+
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-layout.c (tui_layout_command): Move call to tui_enable
+	into ...
+	(tui_set_layout_for_display_command): ...here, before calling
+	tui_set_layout.  Only set the layout if gdb has not already
+	entered the TUI_FAILURE state.
+
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-layout.c (layout_completer): New function.
+	(_initialize_tui_layout): Set completer on layout command.
+
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* tui/tui-layout.c (tui_set_layout): Remove
+	tui_register_display_type parameter.  Remove all checking of this
+	parameter, and reindent function.  Update header comment.
+	(tui_set_layout_for_display_command): Rename to...
+	(tui_set_layout_by_name): ...this, and don't check for different
+	register class types, don't pass a tui_register_display_type to
+	tui_set_layout.  Update header comment.
+	(layout_names): Remove register set specific names.
+	* tui/tui-layout.h (tui_set_layout): Remove
+	tui_register_display_type parameter.
+	* tui/tui.c (tui_rl_change_windows): Don't pass a
+	tui_register_display_type to tui_set_layout.
+	(tui_rl_delete_other_windows): Likewise.
+	(tui_enable): Likewise.
+	* tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove.
+	(TUI_FLOAT_REGS_NAME_LOWER): Remove.
+	(TUI_GENERAL_REGS_NAME): Remove.
+	(TUI_GENERAL_REGS_NAME_LOWER): Remove.
+	(TUI_SPECIAL_REGS_NAME): Remove.
+	(TUI_SPECIAL_REGS_NAME_LOWER): Remove.
+	(TUI_GENERAL_SPECIAL_REGS_NAME): Remove.
+	(TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove.
+	(enum tui_register_display_type): Remove.
+	(struct tui_layout_def): Remove regs_display_type and
+	float_regs_display_type fields.
+	(struct tui_data_info): Remove regs_display_type field.
+	(tui_layout_command): Use new name for
+	tui_set_layout_for_display_command.
+	* tui/tui-data.c (layout_def): Don't initialise removed fields.
+	(tui_clear_win_detail): Don't initialise removed fields of
+	win_info.
+	* tui/tui-regs.c (tui_show_registers): Use new name for
+	tui_set_layout_for_display_command.
+	* tui/tui.h (tui_set_layout_for_display_command): Rename
+	declaration to...
+	(tui_set_layout_by_name): ...this.
+	* printcmd.c (display_command): Remove tui related layout call,
+	and reindent.
+
+2015-05-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* infrun.c (handle_inferior_event_1): Renames handle_inferior_event.
+	(handle_inferior_event): New function.
+
+2015-05-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (to_fixed_array_type): Rename local variable
+	typename into type_name.
+
+2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix ASAN crash for gdb.compile/compile.exp.
+	* infcall.c (call_function_by_hand_dummy): Use xstrdup for NAME.
+
+2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-c-symbols.c (convert_symbol_sym, gcc_convert_symbol)
+	(gcc_symbol_address): Change gdb_stdout to gdb_stdlog.
+	* compile/compile-object-load.c (setup_sections, compile_object_load):
+	Likewise.
+	* compile/compile.c (compile_to_object): Likewise.
+
+2015-05-16  Doug Evans  <xdje42@gmail.com>
+
+	* NEWS: Mention support for unbuffered Guile memory ports.
+	* scm-ports.c (ioscm_memory_port): Update comments on end, size.
+	(ioscm_lseek_address): Improve overflow calculation.
+	(gdbscm_memory_port_fill_input): Add assert.
+	(gdbscm_memory_port_write): Handle unbuffered ports.
+	Handle large writes identical to Guile's fport_write.
+	(gdbscm_memory_port_seek): Fix seeking past end check.
+	(gdbscm_memory_port_close): Handle closing unbuffered port.
+	(ioscm_parse_mode_bits): Recognize "0" for unbuffered ports.
+	(ioscm_init_memory_port): Handle unbuffered ports.
+	(ioscm_reinit_memory_port): Ditto.
+	(ioscm_init_memory_port): Update size calculation.
+	(gdbscm_open_memory): Support zero sized ports.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (get_out_value_type): Fix uninitialized
+	variable compiler warnings.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (get_out_value_type): Fix returned type.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Phil Muldoon  <pmuldoon@redhat.com>
+
+	* NEWS (Changes since GDB 7.9): Add compile print.
+	* compile/compile-c-support.c (add_code_header, add_code_footer)
+	(c_compute_program): Add COMPILE_I_PRINT_ADDRESS_SCOPE and
+	COMPILE_I_PRINT_VALUE_SCOPE.
+	* compile/compile-internal.h (COMPILE_I_PRINT_OUT_ARG_TYPE)
+	(COMPILE_I_PRINT_OUT_ARG, COMPILE_I_EXPR_VAL, COMPILE_I_EXPR_PTR_TYPE):
+	New.
+	* compile/compile-object-load.c: Include block.h.
+	(get_out_value_type): New function.
+	(compile_object_load): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
+	COMPILE_I_PRINT_VALUE_SCOPE.  Set compile_module's OUT_VALUE_ADDR and
+	OUT_VALUE_TYPE.
+	* compile/compile-object-load.h (struct compile_module): Add fields
+	out_value_addr and out_value_type.
+	* compile/compile-object-run.c: Include valprint.h and compile.h.
+	(struct do_module_cleanup): Add fields out_value_addr and
+	out_value_type.
+	(do_module_cleanup): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
+	COMPILE_I_PRINT_VALUE_SCOPE.
+	(compile_object_run): Propagate out_value_addr and out_value_type.
+	Pass OUT_VALUE_ADDR.
+	* compile/compile.c: Include valprint.h.
+	(compile_print_value, compile_print_command): New functions.
+	(eval_compile_command): Handle failed COMPILE_I_PRINT_ADDRESS_SCOPE.
+	(_initialize_compile): Update compile code help text.  Install
+	compile_print_command.
+	* compile/compile.h (compile_print_value): New prototype.
+	* defs.h (enum compile_i_scope_types): Add
+	COMPILE_I_PRINT_ADDRESS_SCOPE and COMPILE_I_PRINT_VALUE_SCOPE.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (get_regs_type): Add parameter func_sym.
+	Rely on its parameter count.
+	(compile_object_load): Replace lookup_minimal_symbol_text by
+	lookup_global_symbol_from_objfile.  Verify FUNC_SYM.  Set it in the
+	return value.
+	* compile/compile-object-load.h (struct compile_module): Replace
+	func_addr by func_sym.
+	* compile/compile-object-run.c: Include block.h.
+	(compile_object_run): Reset module variable after it is freed.  Use
+	FUNC_SYM instead of FUNC_ADDR.  Rely on it.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-c-support.c (print_one_macro): Use #ifndef.
+	(generate_register_struct): Use __gdb_uintptr for TYPE_CODE_PTR.
+	(c_compute_program): Call generate_register_struct after typedefs.
+	* compile/compile-loc2c.c (push, pushf_register_address)
+	(pushf_register): Cast to GCC_UINTPTR.
+	(do_compile_dwarf_expr_to_c): Use unused attribute.  Add space after
+	type.  Use GCC_UINTPTR instead of void *.  Remove excessive cast.
+	(compile_dwarf_expr_to_c): Use GCC_UINTPTR instead of void *.
+	* compile/compile.c (_initialize_compile): Enable warnings for
+	COMPILE_ARGS.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* cli/cli-script.c (execute_control_command): Update
+	eval_compile_command caller.
+	* compile/compile-object-load.c (compile_object_load): Add parameters
+	scope and scope_data.  Set them.
+	* compile/compile-object-load.h (struct compile_module): Add fields
+	scope and scope_data.
+	(compile_object_load): Add parameters scope and scope_data.
+	* compile/compile-object-run.c (struct do_module_cleanup): Add fields
+	scope and scope_data.
+	(compile_object_run): Propagate the fields scope and scope_data.
+	* compile/compile.c (compile_file_command, compile_code_command):
+	Update eval_compile_command callers.
+	(eval_compile_command): Add parameter scope_data.  Pass it plus scope.
+	* compile/compile.h (eval_compile_command): Add parameter scope_data.
+	* defs.h (struct command_line): Add field scope_data.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* printcmd.c (struct format_data): Move it to valprint.h.
+	(print_command_parse_format, print_value): New functions from ...
+	(print_command_1): ... here.  Call them.
+	* valprint.h (struct format_data): Move it here from printcmd.c.
+	(print_command_parse_format, print_value): New declarations.
+
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (compile_object_load): Add
+	COMPILE_DEBUG message.
+
+2015-05-15  Jerome Guitton  <guitton@adacore.com>
+
+	* ada-lang.c (ada_value_ptr_subscript): Use enum position of
+	index to get element instead of enum value.
+	(ada_value_slice_from_ptr, ada_value_slice): Use enum position
+	of index to compute length, but enum values to compute bounds.
+	(ada_array_length): Use enum position of index instead of enum value.
+	(pos_atr): Move position computation to...
+	(ada_evaluate_subexp): Use enum values to compute bounds.
+	* gdbtypes.c (discrete_position): ...this new function.
+	* gdbtypes.h (discrete_position): New function declaration.
+	* valprint.c (val_print_array_elements): Call discrete_position
+	to handle array indexed by non-contiguous enumeration types.
+
+2015-05-15  Jerome Guitton  <guitton@adacore.com>
+
+	* ada-lang.c (find_parallel_type_by_descriptive_type):
+	Go through typedefs during lookup.
+	(to_fixed_array_type): Add support for non-bit packed arrays
+	as variable-length fields.
+
+2015-05-15  Pedro Alves  <palves@redhat.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	* event-loop.c (gdb_notifier) <next_file_handler,
+	next_poll_fds_index>: New fields.
+	(get_next_file_handler_to_handle_and_advance): New function.
+	(delete_file_handler): If deleting the next file handler to
+	handle, advance to the next file handler.
+	(gdb_wait_for_event): Bail early if no event fired.  Poll file
+	handlers in round-robin fashion.
+
+2015-05-15  Pedro Alves  <palves@redhat.com>
+
+	* linux-tdep.c (linux_find_memory_regions_full): Rename local
+	'private' to 'priv'.
+
+2015-05-15  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-nat.h: Include "target/waitstatus.h".
+
+2015-05-15  Yuanhui Zhang  <asmwarrior@gmail.com>
+
+	* python/py-unwind.c (struct reg_info): Move out of ...
+	(struct cached_frame_info): ... this scope.
+	(pending_frame_object_type, unwind_info_object_type): Make extern.
+
+2015-05-15  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Make sure
+	accumSize is never negative.
+
+2015-05-14  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-command.c: Remove include of <ctype.h>.
+	(tui_dispatch_ctrl_char): Remove workaround for xterm terminals.
+
+2015-05-13  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* dwarf2read.c (die_needs_namespace): Return 1 for
+	DW_TAG_inlined_subroutine.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* regcache.c (regcache_cpy_no_passthrough): New declaration.
+	(regcache_cpy_no_passthrough): Make it static, add function comment.
+	* regcache.h (regcache_dup, regcache_cpy): Reduce/update their comment.
+	(regcache_cpy_no_passthrough): Remove declaration.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdbthread.h (struct thread_control_state): Update comment for
+	proceed_to_finish.
+	* infcall.c (run_inferior_call): Update comment about
+	proceed_to_finish.
+	* infcmd.c (get_return_value): Update comment about stop_registers.
+	(finish_forward): Update comment about proceed_to_finish.
+	* infrun.c (stop_registers): Remove.
+	(clear_proceed_status, normal_stop): Remove stop_registers handling.
+	* infrun.h (stop_registers): Remove.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* infcall.c (struct dummy_frame_context_saver)
+	(dummy_frame_context_saver_data_free, dummy_frame_context_saver_dtor)
+	(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
+	(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
+	New.
+	(call_function_by_hand_dummy): Move discard_cleanups of
+	inf_status_cleanup before dummy_frame_push.  Call
+	dummy_frame_context_saver_setup and prepare context_saver_cleanup.
+	Use dummy_frame_context_saver_get_regs instead of stop_registers.
+	* infcall.h (struct dummy_frame_context_saver)
+	(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
+	(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
+	New declarations.
+	* infcmd.c: Include infcall.h.
+	(get_return_value): Add parameter ctx_saver, use it instead of
+	stop_registers.
+	(print_return_value): Add parameter ctx_saver, pass it.
+	(struct finish_command_continuation_args): Add field ctx_saver.
+	(finish_command_continuation): Update print_return_value caller.
+	(finish_command_continuation_free_arg): Free also ctx_saver.
+	(finish_forward): Call dummy_frame_context_saver_setup.
+	* inferior.h (struct dummy_frame_context_saver): New declaration.
+	(get_return_value): Add parameter ctx_saver.
+	* python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Update
+	get_return_value caller.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dummy-frame.c (struct dummy_frame_dtor_list): New.
+	(struct dummy_frame): Replace dtor and dtor_data by dtor_list.
+	(remove_dummy_frame): Process dtor_list.
+	(pop_dummy_frame): Process dtor_list.
+	(register_dummy_frame_dtor): Maintain dtor_list.
+	(find_dummy_frame_dtor): Handle dtor_list.
+	* dummy-frame.h (register_dummy_frame_dtor, find_dummy_frame_dtor):
+	Update comments.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-run.c (do_module_cleanup): Add parameter
+	registers_valid.
+	(compile_object_run): Update do_module_cleanup caller.
+	* dummy-frame.c: Include infcall.h.
+	(struct dummy_frame): Update dtor comment.
+	(remove_dummy_frame): Call dtor.
+	(pop_dummy_frame): Update dtor caller.
+	* dummy-frame.h (dummy_frame_dtor_ftype): Add parameter
+	registers_valid.
+
+2015-05-13  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.9.1 released.
+
+2015-05-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* NEWS: Create "Changes in GDB 7.9.1" section.  Move news about
+	Xmethods now being able to specify a result type to that new
+	sectioin.
+
+2015-05-13  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-win.c (tui_async_resize_screen): Clear win_resized
+	first before resizing the window.
+	* tui/tui.c (tui_enable): Likewise.
+
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dummy-frame.c (struct dummy_frame): Use proper typedef for dtor.
+	* dummy-frame.h (dummy_frame_dtor_ftype): Add its comment.
+	* infcall.c (call_function_by_hand_dummy): Use proper typedef for
+	dummy_dtor parameter.
+	* infcall.h: Include dummy-frame.h.
+	(call_function_by_hand_dummy_dtor_ftype): Remove.
+	(call_function_by_hand_dummy): Use proper typedef for dummy_dtor
+	parameter.
+
+2015-05-13  Patrick Palka  <patrick@parcs.ath.cx>
+
+	PR gdb/17820
+	* top.c (history_size_setshow_var): Change type to signed.
+	Initialize to -2.  Update documentation.
+	(set_readline_history_size): Define.
+	(set_history_size_command): Use it.  Remove logic for handling
+	out-of-range sizes.
+	(init_history): Use set_readline_history_size().  Test for a
+	value of -2 instead of 0 when determining whether to set a
+	default history size.
+	(init_main): Decode the argument of the "size" command as a
+	zuinteger_unlimited.
+
+2015-05-12  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (struct file_entry): Tweak comments.
+	(get_debug_line_section): Tweak comments.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* NEWS: Announce fork support in the RSP and support
+	for fork debugging in extended mode.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (remote_insert_fork_catchpoint): New function.
+	(remote_remove_fork_catchpoint): New function.
+	(remote_insert_vfork_catchpoint): New function.
+	(remote_remove_vfork_catchpoint): New function.
+	(pending_fork_parent_callback): New function.
+	(remove_new_fork_child): New function.
+	(remote_update_thread_list): Call remote_notif_get_pending_events
+	and remove_new_fork_child.
+	(extended_remote_kill): Kill fork child when killing the
+	parent before follow_fork completes.
+	(init_extended_remote_ops): Initialize target vector with
+	new fork catchpoint functions.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (remove_vfork_event_p): New function.
+	(remote_follow_fork): Add vfork event type to event checking.
+	(remote_parse_stop_reply): New stop reasons "vfork" and
+	"vforkdone" for RSP 'T' Stop Reply Packet.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* linux-nat.c (linux_nat_ptrace_options): New function.
+	(linux_init_ptrace, wait_lwp, linux_nat_filter_event):
+	Call linux_nat_ptrace_options and use different argument to
+	linux_enable_event_reporting.
+	(_initialize_linux_nat): Delete call to
+	linux_ptrace_set_additional_flags.
+	* nat/linux-ptrace.c (current_ptrace_options): Rename to
+	supported_ptrace_options.
+	(additional_flags): Delete variable.
+	(linux_check_ptrace_features): Use supported_ptrace_options.
+	(linux_test_for_tracesysgood, linux_test_for_tracefork):
+	Likewise, and remove additional_flags check.
+	(linux_enable_event_reporting): Change 'attached' argument to
+	'options'.  Use supported_ptrace_options.
+	(ptrace_supports_feature): Change comment.  Use
+	supported_ptrace_options.
+	(linux_ptrace_set_additional_flags): Delete function.
+	* nat/linux-ptrace.h (linux_ptrace_set_additional_flags):
+	Delete function prototype.
+	* remote.c (remote_fork_event_p): New function.
+	(remote_detach_pid): New function.
+	(remote_detach_1): Call remote_detach_pid, don't mourn inferior
+	if doing detach-on-fork.
+	(remote_follow_fork): New function.
+	(remote_parse_stop_reply): Handle new "T" stop reason "fork".
+	(remote_pid_to_str): Print "process" strings for pid/0/0 ptids.
+	(init_extended_remote_ops): Initialize to_follow_fork.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* nat/linux-ptrace.c (linux_check_ptrace_features): Change
+	from static to extern.
+	* nat/linux-ptrace.h (linux_check_ptrace_features): Declare.
+	* remote.c (anonymous enum): <PACKET_fork_event_feature,
+	* PACKET_vfork_event_feature>: New enumeration constants.
+	(remote_protocol_features): Add table entries for new packets.
+	(remote_query_supported): Add new feature queries to qSupported
+	packet.
+
+2015-05-12  Gary Benson <gbenson@redhat.com>
+
+	* remote.c (remote_add_inferior): Call exec_file_locate_attach
+	for fake PIDs as well as real ones.
+	(remote_pid_to_exec_file): Send empty annex if PID is fake.
+
+2015-05-09  Siva Chandra Reddy  <sivachandra@google.com>
+
+	* NEWS (Python Scripting): Mention the new gdb.Value methods.
+	* python/py-value.c (valpy_reference_value): New function.
+	(valpy_const_value): Likewise.
+	(value_object_methods): Add new methods.
+	* value.c (make_cv_value): New function.
+	* value.h (make_cv_value): Declare.
+
+2015-05-08  Yao Qi  <yao@codesourcery.com>
+	    Sandra Loosemore  <sandra@codesourcery.com>
+
+	* dwarf2read.c (setup_type_unit_groups): Do NULL pointer check
+	to 'lh->include_dirs' before accessing to it.
+	(psymtab_include_file_name): Likewise.
+	(dwarf_decode_lines_1): Likewise.
+	(dwarf_decode_lines): Likewise.
+	(file_file_name): Likewise.
+
+2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2-linux-tdep.c (NIOS2_SIGRETURN_TRAMP_ADDR): Define.
+	(NIOS2_SIGRETURN_REGSAVE_OFFSET): Define.
+	(nios2_linux_rt_sigreturn_init): Adjust base address of
+	register save area.
+
+2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2-tdep.c (nios2_breakpoint_from_pc): Revert to using
+	"trap 31" as the breakpoint instruction on all targets.
+
+2015-05-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* infcmd.c (print_return_value): Remove unused declaration.
+
+2015-05-08  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2read.c (attr_to_dynamic_prop)
+	<DW_AT_data_member_location>: Use read_type_die isntead of
+	get_die_type.
+
+2015-05-08  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_convert_actual): Add handling of formals
+	passed inside an aligner type.
+
+2015-05-08  Joel Brobecker  <brobecker@adacore.com>
+
+	* copyright.py (NOT_FSF_LIST): Remove sim/erc32 entries.
+
+2015-05-08  Siva Chandra Reddy  <sivachandra@google.com>
+
+	PR python/18291
+	* python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
+	Print xmethod matcher status.
+
+2015-05-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (fill_gregset): Avoid relying on the PSWA
+	register in the regcache when treating the PSWM register, and vice
+	versa.
+
+2015-05-07  Gary Benson <gbenson@redhat.com>
+
+	* linux-thread-db.c (struct thread_db_info)
+	<td_ta_map_id2thr_p>: Remove field.
+	(try_thread_db_load_1): Remove initialization for the above.
+
+2015-05-07  Gary Benson <gbenson@redhat.com>
+
+	* linux-thread-db.c (struct thread_db_info)
+	<td_thr_validate_p>: Remove field.
+	(try_thread_db_load_1): Remove initialization for the above.
+
+2015-05-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-object-load.c (compile_object_load): Support
+	mst_text_gnu_ifunc.
+
+2015-05-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile.c (compile_to_object): Make the cmd_string parameter
+	const.  Use new variables for the const compatibility.
+	(eval_compile_command): Make the cmd_string parameter const.
+	* compile/compile.h (eval_compile_command): Make the cmd_string
+	parameter const.
+
+2015-05-06  Joel Brobecker  <brobecker@adacore.com>
+
+	* defs.h (deprecated_init_ui_hook): Delete.  Remove associated
+	comment.
+	* top.c (deprecated_init_ui_hook): Delete.
+	(gdb_init): Remove handling of deprecated_init_ui_hook.
+	* interps.c (clear_interpreter_hooks): Remove handling of
+	deprecated_init_ui_hook.
+	* main.c (captured_main): Update comment.
+
+2015-05-06  Joel Brobecker  <brobecker@adacore.com>
+
+	* solib.c (_initialize_solib): Add "info dll" alias creation.
+	* windows-nat.c (set_windows_aliases): Delete.
+	(_initialize_windows_nat): Remove deprecated_init_ui_hook
+	assignment.
+	* NEWS: Add news entry about "info dll" now being available
+	on all platforms.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (value_assign_to_component): Reformat and improve
+	documentation. Remove all trailing spaces.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* inline-frame.c (inline_frame_sniffer, skip_inline_frames):
+	Stop counting inlined frames as soon as an out-of-line function
+	is found.
+
+2014-05-05  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* dwarf2read.c (inherit_abstract_dies): Skip
+	DW_TAG_GNU_call_site dies while inheriting children of an
+	abstract DIE into a scope.
+	(read_lexical_block_scope): Inherit abstract DIE's for
+	lexical scopes.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-valprint.c (val_print_packed_array_elements): Delete
+	variable "len".  Add a type-length check when comparing two
+	consecutive elements of the array.  Use the element's actual
+	length in call to value_contents_eq.
+	* ada-lang.c (ada_value_primitive_packed_val): Always return
+	a value whose type has been resolved.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Recompute
+	BIT_SIZE and LEN if the size of the resolved type is smaller
+	than BIT_SIZE * HOST_CHAR_BIT.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Use a more
+	correct address in call to value_at.  Adjust call to
+	value_address accordingly.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-valprint.c (ada_val_print_1): Resolve TYPE before trying
+	to print it.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2loc.h (struct property_addr_info): Add "valaddr" field.
+	* dwarf2loc.c (dwarf2_evaluate_property): Add handling of
+	pinfo->valaddr.
+	* gdbtypes.h (resolve_dynamic_type): Add "valaddr" parameter.
+	* gdbtypes.c (resolve_dynamic_struct): Set pinfo.valaddr.
+	(resolve_dynamic_type_internal): Set pinfo.valaddr.
+	Add handling of addr_stack->valaddr.
+	(resolve_dynamic_type): Add "valaddr" parameter.
+	Set pinfo.valaddr field.
+	* ada-lang.c (ada_discrete_type_high_bound): Update call to
+	resolve_dynamic_type.
+	(ada_discrete_type_low_bound): Likewise.
+	* findvar.c (default_read_var_value): Likewise.
+	* value.c (value_from_contents_and_address): Likewise.
+
+2015-05-05  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.c (resolve_dynamic_array): Use
+	create_array_type_with_stride instead of create_array_type.
+
+2015-04-30  DJ Delorie  <dj@redhat.com>
+
+	* rl78-tdep.c (rl78_analyze_prologue): Pass RL78_ISA_DEFAULT to
+	rl78_decode_opcode
+
+2015-04-29  Doug Evans  <dje@google.com>
+
+	PR python/18285
+	* NEWS: Document new gdb.XMethodWorker.get_result_type method.
+	* eval.c (evaluate_subexp_standard) <OP_FUNCALL>: Handle
+	EVAL_AVOID_SIDE_EFFECTS for xmethods.
+	* extension-priv.h (struct extension_language_ops)
+	<get_xmethod_result_type>: New member.
+	* extension.c (get_xmethod_result_type): New function.
+	* extension.h (get_xmethod_result_type): Declare.
+	* python/py-xmethods.c (get_result_type_method_name): New static
+	global.
+	(py_get_result_type_method_name): Ditto.
+	(gdbpy_get_xmethod_result_type): New function.
+	(gdbpy_initialize_xmethods): Initialize py_get_result_type_method_name.
+	* python/python-internal.h (gdbpy_get_xmethod_result_type): Declare.
+	* python/python.c (python_extension_ops): Add
+	gdbpy_get_xmethod_result_type.
+	* python/lib/gdb/xmethod.py (XMethodWorker): Add get_result_type.
+	* valarith.c (value_x_binop): Handle EVAL_AVOID_SIDE_EFFECTS for
+	xmethods.
+	(value_x_unop): Ditto.
+	* value.c (result_type_of_xmethod): New function.
+	* value.h (result_type_of_xmethod): Declare.
+
+2015-04-29  Gary Benson <gbenson@redhat.com>
+
+	* solib.c (solib_find_1): Allow fd argument to be NULL.
+	(exec_file_find): Update comment.
+	(solib_find): Likewise.
+	* exec.c (exec_file_locate_attach): Use NULL as fd
+	argument to exec_file_find to avoid having to close
+	the opened file.
+	* infrun.c (follow_exec): Likewise.
+
+2015-04-28  Doug Evans  <dje@google.com>
+
+	PR python/18299
+	* python/lib/gdb/printing.py (register_pretty_printer): Handle
+	name or __name__ attributes.  Handle gdb module as first argument.
+
+2015-04-28  Doug Evans  <dje@google.com>
+
+	PR python/18089
+	* python/py-prettyprint.c (print_children): Verify result of children
+	iterator.  Provide better error message.
+	* python/python-internal..h (gdbpy_print_python_errors_p): Declare.
+	* python/python.c (gdbpy_print_python_errors_p): New function.
+
+2015-04-28  Doug Evans  <dje@google.com>
+
+	* gdbtypes.h (struct cplus_struct_type) <n_baseclasses>: Fix comment.
+
+2015-04-28  Sasha Smundak  <asmundak@google.com>
+
+	* NEWS: Mention gdb.Type.optimized_out method.
+	* python/py-type.c (typy_optimized_out):  New function.
+
+2015-04-28  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c: Include "gdb_wait.h" instead of <sys/wait.h>.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* utils.c (init_page_info): Set rl_catch_sigwinch to zero.
+	(initialize_utils): Move call of init_page_info() to ...
+	* top.c (gdb_init): ... here.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-win.c (tui_sigwinch_handler): Remove now-stale comment.
+	(tui_sigwinch_handler): Still update our idea of
+	the terminal's width and height even when TUI is not active.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* utils.h (set_screen_width_and_height): Declare.
+	* utils.c (set_screen_width_and_height): Define.
+	* tui/tui-win.c (tui_update_gdb_sizes): Use it.
+
+2015-04-28  Gary Benson <gbenson@redhat.com>
+
+	* infrun.c (solist.h): New include.
+	(follow_exec): Use exec_file_find to prefix execd_pathname
+	with gdb_sysroot.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-source.c (tui_set_source_content): Avoid calling
+	strcpy() when offset is 0.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	PR gdb/18155
+	* tui/tui-data.c (tui_free_window): Don't free the locator
+	window when passed an SRC_WIN or a DISASSEM_WIN.
+
+2015-04-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-data.h (struct tui_win_element): Forward-declare.
+	(tui_win_content): Move declaration.
+	(struct tui_gen_win_info): Give 'content' field the
+	type tui_win_content.
+	* tui/tui-data.c (init_content_element): Remove redundant and
+	erroneous casts.
+	(tui_add_content_elements): Remove erroneous cast.
+	* tui/tui-disasm.c (tui_set_disassem_content): Remove redundant
+	casts.
+	(tui_get_begin_asm_address): Likewise.
+	* tui/tui-regs.c (tui_show_registers): Likewise.
+	(tui_show_register_group): Likewise.
+	(tui_display_registers_from): Likewise.
+	(tui_check_register_values): Likewise.
+	* tui/tui-source.c (tui_set_source_content): Likewise.
+	(tui_set_source_content_nil): Likewise.
+	(tui_source_is_displayed): Likewise.
+	* tui/tui-stack.c (tui_show_locator_content): Likewise.
+	(tui_set_locator_fullname): Likewise.
+	(tui_set_locator_info): Likewise.
+	(tui_show_frame_info): Likewise.
+	* tui/tui-winsource.c (tui_clear_source_content): Likewise.
+	(tui_show_source_line): Likewise.
+	(tui_horizontal_source_scroll): Likewise.
+	(tui_update_breakpoint_info): Likewise.
+	(tui_set_exec_info_content): Likewise.
+	(tui_show_exec_info_content): Likewise.
+	(tui_alloc_source_buffer): Likewise.
+	(tui_line_is_displayed): Likewise.
+	(tui_addr_is_displayed): Likewise.
+
+2015-04-27  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c: (fbsd_wait) [PL_FLAG_EXEC]: Report TARGET_WAITKIND_EXECD
+	event if PL_FLAG_EXEC is set.
+	[PL_FLAG_EXEC] (fbsd_insert_exec_catchpoint): New function.
+	[PL_FLAG_EXEC] (fbsd_remove_exec_catchpoint): New function.
+	(fbsd_nat_add_target) [PL_FLAG_EXEC]: Set
+	"to_insert_exec_catchpoint" to "fbsd_insert_exec_catchpoint".
+	Set "to_remove_exec_catchpoint" to "fbsd_remove_exec_catchpoint".
+
+2015-04-27  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c: [PT_LWPINFO] New variable super_wait.
+	[TDP_RFPPWAIT] New variable fbsd_pending_children.
+	[TDP_RFPPWAIT] (fbsd_remember_child): New function.
+	[TDP_RFPPWAIT] (fbsd_is_child_pending): New function.
+	[TDP_RFPPWAIT] (fbsd_fetch_kinfo_proc): New function.
+	[PT_LWPINFO] (fbsd_wait): New function.
+	[TDP_RFPPWAIT] (fbsd_follow_fork): New function.
+	[TDP_RFPPWAIT] (fbsd_insert_fork_catchpoint): New function.
+	[TDP_RFPPWAIT] (fbsd_remove_fork_catchpoint): New function.
+	[TDP_RFPPWAIT] (fbsd_insert_vfork_catchpoint): New function.
+	[TDP_RFPPWAIT] (fbsd_remove_vfork_catchpoint): New function.
+	[TDP_RFPPWAIT] (fbsd_enable_follow_fork): New function.
+	[TDP_RFPPWAIT] (fbsd_post_startup_inferior): New function.
+	[TDP_RFPPWAIT] (fbsd_post_attach): New function.
+	(fbsd_nat_add_target) [PT_LWPINFO] Set "to_wait" to
+	"fbsd_wait".
+	[TDP_RFPPWAIT] Set "to_follow_fork" to "fbsd_follow_fork".
+	Set "to_insert_fork_catchpoint" to "fbsd_insert_fork_catchpoint".
+	Set "to_remove_fork_catchpoint" to "fbsd_remove_fork_catchpoint".
+	Set "to_insert_vfork_catchpoint" to "fbsd_insert_vfork_catchpoint".
+	Set "to_remove_vfork_catchpoint" to "fbsd_remove_vfork_catchpoint".
+	Set "to_post_startup_inferior" to "fbsd_post_startup_inferior".
+	Set "to_post_attach" to "fbsd_post_attach".
+
+2015-04-27  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_pid_to_exec_file): Mark static.
+	(fbsd_find_memory_regions): Mark static.
+	(fbsd_nat_add_target): New function.
+	* fbsd-nat.h: Export fbsd_nat_add_target and remove prototypes for
+	fbsd_pid_to_exec_file and fbsd_find_memory_regions.
+	* amd64fbsd-nat.c (_initialize_amd64fbsd_nat): Use fbsd_nat_add_target.
+	* i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise.
+	* ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Likewise.
+	* sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Likewise.
+
+2015-04-27  Gary Benson <gbenson@redhat.com>
+
+	* objfiles.c (allocate_objfile): Do not attempt to expand name
+	if name is a "target:" filename.
+	* auto-load.c (load_auto_scripts_for_objfile): Do not attempt
+	to load auto-load scripts for objfiles with "target:" filenames.
+
+2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c: Include "elf/s390.h" and "elf-bfd.h".
+	(enum s390_vector_abi_kind): New enum.
+	(struct gdbarch_tdep)<vector_abi>: New field.
+	(s390_effective_inner_type): Add parameter min_size.  Stop
+	unwrapping if the inner type is smaller than min_size.
+	(s390_function_arg_float): Adjust call to
+	s390_effective_inner_type.
+	(s390_function_arg_vector): New function.
+	(s390_function_arg_integer): Adjust comment.
+	(struct s390_arg_state)<vr>: New field.
+	(s390_handle_arg): Add parameter 'is_unnamed'.  Pass vector
+	arguments according to vector ABI when appropriate.
+	(s390_push_dummy_call): Initialize the argument state's field
+	'vr'.  Adjust calls to s390_handle_arg.
+	(s390_register_return_value): Handle vector return values.
+	(s390_return_value): Apply the "register" return value convention
+	to a vector when appropriate.
+	(s390_gdbarch_init): Initialize tdep->vector_abi.
+	* NEWS: Announce S390 vector ABI support.
+
+2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_return_value_convention): Remove
+	function.  Inline its logic...
+	(s390_return_value): ...here.  Instead, move the handling of the
+	"register" return value convention...
+	(s390_register_return_value): ...here.  New function.
+
+2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c
+	(is_float_singleton): Remove function.  Move the "singleton" part
+	of the logic...
+	(s390_effective_inner_type): ...here.  New function.
+	(is_float_like): Remove function.  Inline its logic...
+	(s390_function_arg_float): ...here.
+	(is_pointer_like, is_integer_like, is_struct_like): Remove
+	functions.  Inline their logic...
+	(s390_function_arg_integer): ...here.
+	(s390_function_arg_pass_by_reference): Remove function.
+	(extend_simple_arg): Remove function.
+	(alignment_of): Remove function.
+	(struct s390_arg_state): New structure.
+	(s390_handle_arg): New function.
+	(s390_push_dummy_call): Move parameter placement logic to the new
+	function s390_handle_arg.  Call it for calculating the stack area
+	sizes first, and again for actually writing the parameters.
+
+2015-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (is_power_of_two): Add comment.  Return
+	  false if the argument is zero.
+
+2015-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* ada-lang.c (template_to_static_fixed_type): Return input type
+	when it is already fixed.  Cache the input type itself when not
+	creating a static fixed copy.  Make it explicit that we never
+	molestate the input type.
+	* gdbtypes.c (resolve_dynamic_struct): Reset the
+	TYPE_TARGET_TYPE field for resolved copies.
+
+2015-04-27  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_is_tagged_type): Add call to ada_check_typedef.
+	(ada_lookup_struct_elt_type): Remove calls to ada_check_typedef.
+	(template_to_static_fixed_type): Call ada_check_typedef only
+	when necessary.
+
+2015-04-24  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-dump.c (srec_dump_command): Add internationalization
+	mark ups.
+	(ihex_dump_command): Likewise.
+	(tekhex_dump_command): Likewise.
+	(binary_dump_command): Likewise.
+	(binary_append_command): Likewise.
+
+2015-04-24  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* cli/cli-dump.c (verilog_cmdlist): New variable.
+	(dump_verilog_memory): New function.
+	(dump_verilog_value): New function.
+	(verilog_dump_command): New function.
+	(_initialize_cli_dump): Add new commands to support verilog dump
+	format.
+	* NEWS: Add entry for "dump verilog".
+
+2015-04-24  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdbtypes.c (print_gnat_stuff): Do not recurse on the
+	descriptive type when there is none.
+
+2015-04-23  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-win.c (tui_async_resize_screen): Call
+	rl_resize_terminal().
+
+2015-04-22  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (handle_output_debug_string): Don't change
+	current_event.dwThreadId.
+	(get_windows_debug_event): Use thread_id, rather than relying on
+	current_event.dwThreadId being changed.
+
+2015-04-22  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (windows_continue): Report an error if
+	ContinueDebugEvent() fails.
+
+2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (windows_resume): Fix misspelling in debug output.
+
+2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (get_windows_debug_event): Replace retval with
+	thread_id throughout.  Update stale comment.
+
+2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (get_windows_debug_event): Don't use ternary
+	conditional operator.
+
+2015-04-21  Pierre Muller  <muller@sourceware.org>
+
+	PR pascal/17815
+	p-exp.y (yylex): Reorganize code to return the matched pattern
+	for a field of this.
+
+2015-04-21  Gary Benson <gbenson@redhat.com>
+
+	* common/fileio.h (fileio_to_host_openflags): New declaration.
+	* common/fileio.c (fcntl.h): New include.
+	(fileio_to_host_openflags): New function, factored out from...
+	* inf-child.c (inf_child_fileio_open_flags_to_host): ...here.
+	Single use updated.
+
+2015-04-21  Kevin Buettner  <kevinb@redhat.com>
+
+	* rl78-tdep.c (RL78_SP_ADDR): Define.
+	(opc_reg_to_gdb_regnum): New static function.
+	(rl78_analyze_prologue): Recognize instructions forming slightly
+	more interesting prologues.
+
+2015-04-20  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	Revert:
+	2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+	* gdbtypes.c (is_dynamic_type_internal): Remove special handling of
+	TYPE_CODE_REF types so that they are not considered as dynamic
+	depending on the referenced type.
+	(resolve_dynamic_type_internal): Likewise.
+
+2015-04-20  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	Revert:
+	2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+	* gdbtypes.c (is_dynamic_type_internal): Remove the unused
+	"top_level" parameter.
+	(resolve_dynamic_type_internal): Remove the unused "top_level"
+	parameter.  Update call to is_dynamic_type_internal.
+	(is_dynamic_type): Update call to is_dynamic_type_internal.
+	(resolve_dynamic_range): Update call to
+	resolve_dynamic_type_internal.
+	(resolve_dynamic_union): Likewise.
+	(resolve_dynamic_struct): Likewise.
+	(resolve_dynamic_type): Likewise.
+
+2015-04-19  Gabriel Krisman Bertazi  <gabriel@krisman.be>
+
+	* breakpoint.c (update_dprintf_command_list): Remove duplicated
+	xmalloc.
+
+2015-04-20  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* reply_mig_hack.awk: Robustify parsing.
+
+	* reply_mig_hack.awk: Don't bother to declare an intermediate
+	function pointer variable.
+
+2015-04-17  Doug Evans  <dje@google.com>
+
+	* solib-svr4.c (svr4_exec_displacement): Rename outer "displacement"
+	to "exec_displacement" to avoid confusion with inner use of the name.
+
+2015-04-17  Pedro Alves  <palves@redhat.com>
+
+	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Return zero
+	if HW point of TYPE isn't supported.
+
+2015-04-17  Yao Qi  <yao.qi@linaro.org>
+	    Pedro Alves  <palves@redhat.com>
+
+	* target.h (target_can_use_hardware_watchpoint): Update comments.
+	Remove trailing ";".
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* remote.c (remote_add_inferior): New argument try_open_exec.
+	If nonzero, attempt to open the inferior's executable file as
+	the main executable if no main executable is open already.
+	All callers updated.
+	* NEWS: Mention that GDB now supports automatic location and
+	retrieval of executable + files from remote targets.
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* target.h (TARGET_OBJECT_EXEC_FILE): New enum value.
+	* remote.c (PACKET_qXfer_exec_file): Likewise.
+	(remote_protocol_features): Register the
+	"qXfer:exec-file:read" feature.
+	(remote_xfer_partial): Handle TARGET_OBJECT_EXEC_FILE.
+	(remote_pid_to_exec_file): New function.
+	(init_remote_ops): Initialize to_pid_to_exec_file.
+	(_initialize_remote): Register new "set/show remote
+	pid-to-exec-file-packet" command.
+	* NEWS: Announce new qXfer:exec-file:read packet.
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* nat/linux-procfs.h (linux_proc_pid_to_exec_file):
+	New declaration.
+	* nat/linux-procfs.c (linux_proc_pid_to_exec_file):
+	New function, factored out from...
+	* linux-nat.c (linux_child_pid_to_exec_file): ...here.
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* exec.c (solist.h): New include.
+	(exec_file_locate_attach): Prefix absolute executable
+	paths with gdb_sysroot if set.
+	* NEWS: Mention that executable paths may be prepended
+	with sysroot.
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* solist.h (exec_file_find): New declaration.
+	* solib.c (solib_find_1): New function, factored out from...
+	(solib_find): ...here.
+	(exec_file_find): New function.
+
+2015-04-17  Gary Benson <gbenson@redhat.com>
+
+	* gdbcore.h (exec_file_locate_attach): New declaration.
+	* exec.c (exec_file_locate_attach): New function, factored
+	out from...
+	* infcmd.c (attach_command_post_wait): ...here.
+
+2015-04-17  Mike Frysinger  <vapier@gentoo.org>
+
+	* MAINTAINERS: Add myself for Blackfin/write-after-approval.
+
+2015-04-16  Yao Qi  <yao.qi@linaro.org>
+
+	* infrun.c (maybe_software_singlestep): Declare.
+	(displaced_step_fixup): Call maybe_software_singlestep.
+
+2015-04-15  Doug Evans  <dje@google.com>
+
+	* psymtab.c (psym_expand_symtabs_matching): Add QUIT call.
+
+2015-04-15  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
+
+2015-04-15  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* python/lib/gdb/command/unwinders.py: Add parentheses.
+
+2015-04-15  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_copy_svc): Update debug message.
+
+2015-04-15  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_copy_svc): Fix indentation.
+
+2015-04-15  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_cleanup_svc): Use
+	dsc->insn_size instead of 4.
+
+2015-04-14  Gary Benson <gbenson@redhat.com>
+
+	* jit.c (mem_bfd_iovec_stat): Zero supplied buffer.
+	* minidebug.c (lzma_stat): Likewise.
+	* solib-spu.c (spu_bfd_iovec_stat): Likewise.
+	* spu-linux-nat.c (spu_bfd_iovec_stat): Likewise.
+
+2015-04-13  Stan Shebs  <stanshebs@google.com>
+
+	* MAINTAINERS: Update my email address.
+
+2015-04-13  John Baldwin  <jhb@FreeBSD.org>
+
+	* amd64-tdep.c (amd64_target_description): New function.
+	* amd64-tdep.h: Export amd64_target_description and tdesc_amd64.
+	* amd64bsd-nat.c [PT_GETXSTATE_INFO]: New variable amd64bsd_xsave_len.
+	(amd64bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
+	x86 extended save area.
+	(amd64bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
+	* amd64bsd-nat.h: Export amd64bsd_xsave_len.
+	* amd64fbsd-nat.c (amd64fbsd_read_description): New function.
+	(_initialize_amd64fbsd_nat): Set "to_read_description" to
+	"amd64fbsd_read_description".
+	* amd64fbsd-tdep.c (amd64fbsd_core_read_description): New function.
+	(amd64fbsd_supply_xstateregset): New function.
+	(amd64fbsd_collect_xstateregset): New function.
+	Add "amd64fbsd_xstateregset".
+	(amd64fbsd_iterate_over_regset_sections): New function.
+	(amd64fbsd_init_abi): Set "xsave_xcr0_offset" to
+	"I386_FBSD_XSAVE_XCR0_OFFSET".
+	Add "iterate_over_regset_sections" gdbarch method.
+	Add "core_read_description" gdbarch method.
+	* i386-tdep.c (i386_target_description): New function.
+	* i386-tdep.h: Export i386_target_description and tdesc_i386.
+	* i386bsd-nat.c [PT_GETXSTATE_INFO]: New variable i386bsd_xsave_len.
+	(i386bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
+	x86 extended save area.
+	(i386bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
+	* i386bsd-nat.h: Export i386bsd_xsave_len.
+	* i386fbsd-nat.c (i386fbsd_read_description): New function.
+	(_initialize_i386fbsd_nat): Set "to_read_description" to
+	"i386fbsd_read_description".
+	* i386fbsd-tdep.c (i386fbsd_core_read_xcr0): New function.
+	(i386fbsd_core_read_description): New function.
+	(i386fbsd_supply_xstateregset): New function.
+	(i386fbsd_collect_xstateregset): New function.
+	Add "i386fbsd_xstateregset".
+	(i386fbsd_iterate_over_regset_sections): New function.
+	(i386fbsd4_init_abi): Set "xsave_xcr0_offset" to
+	"I386_FBSD_XSAVE_XCR0_OFFSET".
+	Add "iterate_over_regset_sections" gdbarch method.
+	Add "core_read_description" gdbarch method.
+	* i386fbsd-tdep.h: New file.
+
+2015-04-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* NEWS (Changes since GDB 7.9): Add removed -xdb.
+	* breakpoint.c (command_line_is_silent): Remove xdb_commands
+	conditional.
+	(_initialize_breakpoint): Remove xdb_commands for bc, ab, sb, db, ba
+	and lb.
+	* cli/cli-cmds.c (_initialize_cli_cmds): Remove xdb_commands for v and
+	va.
+	* cli/cli-decode.c (find_command_name_length): Remove xdb_commands
+	conditional.
+	* defs.h (xdb_commands): Remove declaration.
+	* f-valprint.c (_initialize_f_valprint): Remove xdb_commands for lc.
+	* guile/scm-cmd.c (command_classes): Remove xdb from comment.
+	* infcmd.c (run_no_args_command, go_command): Remove.
+	(_initialize_infcmd): Remove xdb_commands for S, go, g, R and lr.
+	* infrun.c (xdb_handle_command): Remove.
+	(_initialize_infrun): Remove xdb_commands for lz and z.
+	* main.c (xdb_commands): Remove variable.
+	(captured_main): Remove "xdb" from long_options.
+	(print_gdb_help): Remove --xdb from help.
+	* python/py-cmd.c (gdbpy_initialize_commands): Remove xdb from comment.
+	* source.c (_initialize_source): Remove xdb_commands for D, ld, / and ?.
+	* stack.c (backtrace_full_command, args_plus_locals_info)
+	(current_frame_command): Remove.
+	(_initialize_stack): Remove xdb_commands for t, T and l.
+	* symtab.c (_initialize_symtab): Remove xdb_commands for lf and lg.
+	* thread.c (_initialize_thread): Remove xdb_commands condition.
+	* tui/tui-layout.c (tui_toggle_layout_command)
+	(tui_toggle_split_layout_command, tui_handle_xdb_layout): Remove.
+	(_initialize_tui_layout): Remove xdb_commands for td and ts.
+	* tui/tui-regs.c (tui_scroll_regs_forward_command)
+	(tui_scroll_regs_backward_command): Remove.
+	(_initialize_tui_regs): Remove xdb_commands for fr, gr, sr, +r and -r.
+	* tui/tui-win.c (tui_xdb_set_win_height_command): Remove.
+	(_initialize_tui_win): Remove xdb_commands for U and w.
+	* utils.c (pagination_on_command, pagination_off_command): Remove.
+	(initialize_utils): Remove xdb_commands for am and sm.
+
+2015-04-10  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (displaced_step_fixup): Switch to the event ptid
+	earlier.  If the thread stopped for a watchpoint and the
+	target/arch has non-continuable watchpoints, cancel the displaced
+	step.
+	(resume): Don't start a displaced step if in-line step-over info
+	is valid.
+
+2015-04-10  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (displaced_step_in_progress): New function.
+	(do_target_resume): Advise target to report all signals if
+	displaced stepping.
+
+2015-04-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18216
+	* infrun.c (process_event_stop_test): Don't assume a step-resume
+	is set if tp->stepped_breakpoint is true.
+
+2015-04-10  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (install_alu_reg): Update comment.
+	(thumb_copy_alu_reg): Remove local variable rn.  Update
+	debugging message.  Use r2 instead of r1 in the modified
+	instruction.
+
+2015-04-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/13858
+	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Install
+	linux_displaced_step_location as gdbarch_displaced_step_location
+	hook.
+	* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
+	* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
+	* linux-tdep.c (linux_displaced_step_location): New function,
+	based on ppc_linux_displaced_step_location.
+	* linux-tdep.h (linux_displaced_step_location): New declaration.
+	* ppc-linux-tdep.c (ppc_linux_entry_point_addr): Delete.
+	(ppc_linux_inferior_created, ppc_linux_displaced_step_location):
+	Delete.
+	(ppc_linux_init_abi): Install linux_displaced_step_location as
+	gdbarch_displaced_step_location hook, even without Cell/B.E..
+	(_initialize_ppc_linux_tdep): Don't install
+	ppc_linux_inferior_created as inferior_created observer.
+	* s390-linux-tdep.c (s390_gdbarch_init): Install
+	linux_displaced_step_location as gdbarch_displaced_step_location
+	hook.
+
+2015-04-09  Gary Benson <gbenson@redhat.com>
+
+	* common/common-remote-fileio.h: Rename to...
+	* common/fileio.h: ...this.  Update all references.
+	(remote_fileio_to_fio_error): Rename to...
+	(host_to_fileio_error): ...this.
+	(remote_fileio_to_be): Rename to...
+	(host_to_bigendian): ...this.  Update all callers.
+	(remote_fileio_to_fio_uint): Rename to...
+	(host_to_fileio_uint): ...this.  Update all callers.
+	(remote_fileio_to_fio_time): Rename to...
+	(host_to_fileio_time): ...this.  Update all callers.
+	(remote_fileio_to_fio_stat): Rename to...
+	(host_to_fileio_stat): ...this.
+	Update all references.
+	* common/common-remote-fileio.c: Rename to...
+	* common/fileio.c: ...this.  Update all references.
+	(remote_fileio_to_fio_error): Rename to...
+	(host_to_fileio_error): ...this.  Update all callers.
+	(remote_fileio_mode_to_target): Rename to...
+	(fileio_mode_pack): ...this.  Update all callers.
+	(remote_fileio_to_fio_mode): Rename to...
+	(host_to_fileio_mode): ...this.  Update all callers.
+	(remote_fileio_to_fio_ulong): Rename to...
+	(host_to_fileio_ulong): ...this.  Update all callers.
+	(remote_fileio_to_fio_stat): Rename to...
+	(host_to_fileio_stat): ...this.  Update all callers.
+
+2015-04-09  Andy Wingo  <wingo@igalia.com>
+
+	* guile/scm-frame.c (gdbscm_frame_read_register): New function.
+	(frame_functions): Bind gdbscm_frame_read_register to
+	frame-read-register.
+	* guile/lib/gdb.scm (frame-read-register): Export.
+
+2015-04-09  Gary Benson <gbenson@redhat.com>
+
+	* common/common-remote-fileio.h (remote_fileio_to_fio_error):
+	New declaration.
+	* common/common-remote-fileio.c (remote_fileio_to_fio_error):
+	New function, factored out the named functions below.
+	* inf-child.c (gdb/fileio.h): Remove include.
+	(common-remote-fileio.h): New include.
+	(inf_child_errno_to_fileio_error): Remove function.  Update
+	all callers to use remote_fileio_to_fio_error.
+	* remote-fileio.c (remote_fileio_errno_to_target): Likewise.
+
+2015-04-09  Andy Wingo  <wingo@igalia.com>
+
+	* MAINTAINERS (Write After Approval): Add Andy Wingo.
+
+2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* acinclude.m4: (GDB_AC_CHECK_BFD): Set ZLIBDIR with $zlibdir.
+	Replace $zlibdir with $ZLIBDIR in LDFLAGS.
+	* configure: Regenerated.
+
+2015-04-09  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add strtok_r.
+	* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/strtok_r.m4.
+	* gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: Regenerate.
+	* gnulib/import/Makefile.am: Update.
+	* gnulib/import/Makefile.in: Update.
+	* gnulib/import/m4/gnulib-cache.m4: Update.
+	* gnulib/import/m4/gnulib-comp.m4: Update.
+	* gnulib/import/m4/strtok_r.m4: New file.
+	* gnulib/import/strtok_r.c: New file.
+
+2015-04-09  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (aclocal version check): Filter out
+	"called too early to check prototype".
+
+2015-04-08  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR python/16699
+	* python/py-cmd.c (cmdpy_completer_helper): Adjust function to not
+	use a caching mechanism.  Adjust comments and code to reflect
+	that.  Replace 'sizeof' by 'strlen' when fetching 'wordobj'.
+	(cmdpy_completer_handle_brkchars): Adjust call to
+	cmdpy_completer_helper.  Call Py_XDECREF for 'resultobj'.
+	(cmdpy_completer): Likewise.
+
+2015-04-08  Yao Qi  <yao.qi@linaro.org>
+
+	* spu-tdep.c (spu_gdbarch_init): Don't call
+	set_gdbarch_cannot_step_breakpoint.
+
+2015-04-07  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* linux-tdep.c (decode_vmflags): Initialize 'saveptr'.
+
+2015-04-07  Pedro Alves  <palves@redhat.com>
+
+	* gdbthread.h (ALL_NON_EXITED_THREADS_SAFE): Rename to ...
+	(ALL_THREADS_SAFE): ... this, and don't skip exited threads.
+	(delete_exited_threads): New declaration.
+	* infrun.c (follow_exec): Use ALL_THREADS_SAFE.
+	* linux-nat.c (linux_nat_update_thread_list): New function.
+	(linux_nat_add_target): Install it.
+	* remote.c (remote_update_thread_list): Use ALL_THREADS_SAFE.
+	* thread.c (prune_threads): Use ALL_THREADS_SAFE.
+	(delete_exited_threads): New function.
+
+2015-04-07  Pedro Alves  <pedro@codesourcery.com>
+
+	* infrun.c (resume) <displaced stepping debug output>: Get the
+	leader thread's regcache, not resume_ptid's.
+
+2015-04-06  Doug Evans  <xdje42@gmail.com>
+
+	* symtab.c (hash_symbol_entry): Hash STRUCT_DOMAIN symbols as
+	VAR_DOMAIN.
+	(symbol_cache_lookup): Clarify use of bsc_ptr, slot_ptr parameters.
+	Include symbol domain in debugging output.
+
+2015-04-06  Pedro Alves  <palves@redhat.com>
+	    Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+	* configure.ac: Remove the mingw32-specific stub-termcap.o
+	fallback, and instead fallback to the stub termcap on all hosts.
+	* configure: Regenerate.
+	* stub-termcap.c [!__MINGW32__] (PC, BC, UP): Define as weak
+	symbols.
+
+2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdbtypes.c (is_dynamic_type_internal): Remove the unused
+	"top_level" parameter.
+	(resolve_dynamic_type_internal): Remove the unused "top_level"
+	parameter.  Update call to is_dynamic_type_internal.
+	(is_dynamic_type): Update call to is_dynamic_type_internal.
+	(resolve_dynamic_range): Update call to
+	resolve_dynamic_type_internal.
+	(resolve_dynamic_union): Likewise.
+	(resolve_dynamic_struct): Likewise.
+	(resolve_dynamic_type): Likewise.
+
+2015-04-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdbtypes.c (is_dynamic_type_internal): Remove special handling of
+	TYPE_CODE_REF types so that they are not considered as dynamic
+	depending on the referenced type.
+	(resolve_dynamic_type_internal): Likewise.
+
+2015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in (top_srcdir): New.
+	* configure: Regenerated.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* NEWS: Announce the new default sysroot of "target:".
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* main.c (captured_main): Set gdb_sysroot to "target:"
+	if not otherwise set.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* exec.c (exec_file_attach): Support "target:" filenames.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* solib.c (solib_find): Strip "target:" prefix from sysroot
+	if accessing local files.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* symfile.c (symfile_bfd_open): Reorder to remove duplicated
+	checks and error messages.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* remote.h (REMOTE_SYSROOT_PREFIX): Remove definition.
+	(remote_filename_p): Remove declaration.
+	(remote_bfd_open): Likewise.
+	* remote.c (remote_bfd_iovec_open): Remove function.
+	(remote_bfd_iovec_close): Likewise.
+	(remote_bfd_iovec_pread): Likewise.
+	(remote_bfd_iovec_stat): Likewise.
+	(remote_filename_p): Likewise.
+	(remote_bfd_open): Likewise.
+	* symfile.h (gdb_bfd_open_maybe_remote): Remove declaration.
+	* symfile.c (separate_debug_file_exists): Use gdb_bfd_open.
+	(gdb_bfd_open_maybe_remote): Remove function.
+	(symfile_bfd_open):  Replace remote filename check with
+	target filename check.
+	(reread_symbols): Use gdb_bfd_open.
+	* build-id.c (gdbcore.h): New include.
+	(build_id_to_debug_bfd): Use gdb_bfd_open.
+	* infcmd.c (attach_command_post_wait): Remove remote filename
+	check.
+	* solib.c (solib_find): Replace remote-specific handling with
+	target-specific handling.  Update comments where necessary.
+	(solib_bfd_open): Replace remote-specific handling with
+	target-specific handling.
+	(gdb_sysroot_changed): New function.
+	(_initialize_solib): Call the above when gdb_sysroot changes.
+	* windows-tdep.c (gdbcore.h): New include.
+	(windows_xfer_shared_library): Use gdb_bfd_open.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* gdb/gdb_bfd.h (TARGET_SYSROOT_PREFIX): New definition.
+	(is_target_filename): New declaration.
+	(gdb_bfd_has_target_filename): Likewise.
+	(gdb_bfd_open): Update documentation comment.
+	* gdb_bfd.c (target.h): New include.
+	(gdb/fileio.h): Likewise.
+	(is_target_filename): New function.
+	(gdb_bfd_has_target_filename): Likewise.
+	(fileio_errno_to_host): Likewise.
+	(gdb_bfd_iovec_fileio_open): Likewise.
+	(gdb_bfd_iovec_fileio_pread): Likewise.
+	(gdb_bfd_iovec_fileio_close): Likewise.
+	(gdb_bfd_iovec_fileio_fstat): Likewise.
+	(gdb_bfd_open): Use target fileio to access paths prefixed
+	with "target:" where necessary.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* target.h (struct target_ops) <to_filesystem_is_local>:
+	New field.
+	(target_filesystem_is_local): New macro.
+	* target-delegates.c: Regenerate.
+	* remote.c (remote_filesystem_is_local): New function.
+	(init_remote_ops): Initialize to_filesystem_is_local.
+
+2015-04-02  Gary Benson <gbenson@redhat.com>
+
+	* target.h (struct target_ops) <to_fileio_fstat>: New field.
+	(target_fileio_fstat): New declaration.
+	* target.c (target_fileio_fstat): New function.
+	* inf-child.c (inf_child_fileio_fstat): Likewise.
+	(inf_child_target): Initialize to_fileio_fstat.
+	* remote.c (init_remote_ops): Likewise.
+
+2015-04-01  Sasha Smundak  <asmundak@google.com>
+
+	* Makefile.in (SUBDIR_PYTHON_OBJS): Add py-unwind.o.
+	(SUBDIR_PYTHON_SRCS): Add py-unwind.c.
+	(py-unwind.o): New recipe.
+	* NEWS: mention Python frame unwinding.
+	* data-directory/Makefile.in (PYTHON_FILE_LIST): Add
+	gdb/unwinder.py and gdb/command/unwinder.py
+	* python/lib/gdb/__init__.py (packages): Add frame_unwinders
+	list.
+	(execute_unwinders): New function.
+	* python/lib/gdb/command/unwinders.py: New file.
+	* python/lib/gdb/unwinder.py: New file.
+	* python/py-objfile.c (objfile_object): Add frame_unwinders field.
+	(objfpy_dealloc): Decrement frame_unwinders reference count.
+	(objfpy_initialize): Create frame_unwinders list.
+	(objfpy_get_frame_unwinders): New function.
+	(objfpy_set_frame_unwinders): Ditto.
+	(objfile_getset): Add frame_unwinders attribute to Objfile.
+	* python/py-progspace.c (pspace_object): Add frame_unwinders field.
+	(pspy_dealloc): Decrement frame_unwinders reference count.
+	(pspy_initialize): Create frame_unwinders list.
+	(pspy_get_frame_unwinders): New function.
+	(pspy_set_frame_unwinders): Ditto.
+	(pspy_getset): Add frame_unwinders attribute to gdb.Progspace.
+	* python/py-unwind.c: New file.
+	* python/python-internal.h (pspy_get_name_unwinders): New prototype.
+	(objpy_get_frame_unwinders): New prototype.
+	(gdbpy_initialize_unwind): New prototype.
+	* python/python.c (gdbpy_apply_type_printers): Call
+	gdbpy_initialize_unwind.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (resume): Check currently_stepping after clearing
+	stepped_breakpoint, not before.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (print_target_wait_results): Print all the ptid
+	elements.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (keep_going): Also discard cleanups if inserting
+	breakpoints fails.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (wait_for_inferior): Install the
+	finish_thread_state_cleanup cleanup across the whole function, not
+	just around handle_inferior_event.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (resume) <step past permanent breakpoint>: Use
+	do_target_resume.
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_handle_extended_wait): Always call set_running.
+
+2015-04-01  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* MAINTAINERS (Write After Approval): Add "Pierre-Marie de Rodat".
+
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (record_thread): Readd the thread to gdb's
+	list if it was marked exited.
+
+2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* configure: Regenerated.
+
+2015-03-31  Sergio Durigan Junior  <sergiodj@redhat.com>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Oleg Nesterov  <oleg@redhat.com>
+
+	PR corefiles/16092
+	* linux-tdep.c: Include 'gdbcmd.h' and 'gdb_regex.h'.
+	New enum identifying the various options of the coredump_filter
+	file.
+	(struct smaps_vmflags): New struct.
+	(use_coredump_filter): New variable.
+	(decode_vmflags): New function.
+	(mapping_is_anonymous_p): Likewise.
+	(dump_mapping_p): Likewise.
+	(linux_find_memory_regions_full): New variables
+	'coredumpfilter_name', 'coredumpfilterdata', 'pid', 'filterflags'.
+	Removed variable 'modified'.  Read /proc/<PID>/smaps file; improve
+	parsing of its information.  Implement memory mapping filtering
+	based on its contents.
+	(show_use_coredump_filter): New function.
+	(_initialize_linux_tdep): New command 'set use-coredump-filter'.
+	* NEWS: Mention the possibility of using the
+	'/proc/PID/coredump_filter' file when generating a corefile.
+	Mention new command 'set use-coredump-filter'.
+
+2015-03-31  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* solib-svr4.c (solib_svr4_r_ldsomap): Catch possible exception by
+	read_memory_unsigned_integer.
+
+2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makefile.in (ZLIB): New.
+	(ZLIBINC): Likewise.
+	(INTERNAL_CFLAGS_BASE): Add $(ZLIBINC).
+	(CLIBS): Add $(ZLIB).
+	* acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS.
+	Add -lz to LIBS.
+	* gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
+	* top.c (print_gdb_configuration): Remove --with-zlib and
+	--without-zlib.
+	* config.in: Regenerated.
+	* configure: Likewise.
+
+2015-03-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* NEWS: Mention info os cpus support.
+	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
+	(struct osdata_type): Add cpus entry, reorder the entries in
+	alphabetical order.
+
+2015-03-31  Matthias Klose  <doko@ubuntu.com>
+
+	* compile/compile.c (compile_to_object): Allow triplets with or
+	without vendor set.
+
+2015-03-30  Doug Evans  <dje@google.com>
+
+	PR c++/18141
+	* cp-namespace.c (cp_search_static_and_baseclasses): Always look for
+	klass in VAR_DOMAIN.
+
+2015-03-30  Gary Benson <gbenson@redhat.com>
+
+	* remote.c (remote_mourn_1): Remove function.  Update all callers
+	to use remote_mourn.
+	(extended_remote_mourn_1): Remove function.  Update all callers
+	to use extended_remote_mourn.
+	(extended_remote_attach_1): Remove function.  Update all callers
+	to use extended_remote_attach.
+
+2015-03-28  James Bowman  <james.bowman@ftdichip.com>
+
+	* Makefile.in (ALL_TARGET_OBS): Add ft32-tdep.o.
+	(HFILES_NO_SRCDIR): Add ft32-tdep.h.
+	(ALLDEPFILES): Add ft32-tdep.c.
+	* configure.tgt: Add FT32 entry.
+	* ft32-tdep.c: New file, FT32 target-dependent code.
+	* ft32-tdep.h: New file, FT32 target-dependent code.
+
+2015-03-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert:
+	2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	Code cleanup.
+	* printcmd.c (print_command_1): Move expr variable scope.
+
+2015-03-27  Joel Brobecker  <brobecker@adacore.com>
+
+	* dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL.
+
+2015-03-27  Andrzej Kaczmarek  <andrzej.kaczmarek@tieto.com>
+
+	* gdb_bfd.c (gdb_bfd_section_index): Fix off-by-one for special
+	sections.
+
+2015-03-26  Joel Brobecker  <brobecker@adacore.com>
+
+	* dtrace-probe.c (dtrace_process_dof_probe): Contain any
+	exception raised while parsing the probe arguments.
+	Force parsing to be done using the C language parser.
+	* expression.h (parse_expression_with_language): Declare.
+	* parse.c (parse_expression_with_language): New function.
+
+2015-03-26  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* MAINTAINERS (Write After Approval): Add "Jon Turney".
+
+2015-03-26  Andy Wingo  <wingo@igalia.com>
+
+	PR symtab/18148
+	* dwarf2read.c (struct partial_die_info): Add has_const_value
+	member.
+	(add_partial_symbol): Don't punt on symbols that have const_value
+	attributes.
+	(read_partial_die): Detect DW_AT_const_value.
+
+2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup.
+	* printcmd.c (print_command_1): Move expr variable scope.
+
+2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup.
+	* printcmd.c (validate_format): Make the parameter cmdname const.
+
+2015-03-26  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (_initialize_remote): Update comment.
+
+2015-03-26  Pedro Alves  <palves@redhat.com>
+	    Jon TURNEY  <jon.turney@dronecode.org.uk>
+
+	* coffread.c (coff_symfile_read): When constructing the name of an
+	import stub symbol from import symbol for amd64, only skip the
+	char after _imp_ if the target is underscored (like i386) and the
+	char is indeed the target's leading char.
+
+2015-03-25  Pedro Alves  <palves@redhat.com>
+
+	* target.h <to_async>: Replace 'callback' and 'context' parameters
+	with boolean 'enable' parameter.
+	(target_async): Replace CALLBACK and CONTEXT parameters with
+	boolean ENABLE parameter.
+	* inf-loop.c (inferior_event_handler): Adjust.
+	* linux-nat.c (linux_nat_attach, linux_nat_resume)
+	(linux_nat_resume): Adjust.
+	(async_client_callback, async_client_context): Delete.
+	(handle_target_event): Call inferior_event_handler directly.
+	(linux_nat_async): Replace 'callback' and 'context' parameters
+	with boolean 'enable' parameter.  Adjust.  Remove references to
+	async_client_callback and async_client_context.
+	(linux_nat_close): Adjust.
+	* record-btrace.c (record_btrace_async): Replace 'callback' and
+	'context' parameters with boolean 'enable' parameter.  Adjust.
+	(record_btrace_resume): Adjust.
+	* record-full.c (record_full_async): Replace 'callback' and
+	'context' parameters with boolean 'enable' parameter.  Adjust.
+	(record_full_resume, record_full_core_resume): Adjust.
+	* remote.c (struct remote_state) <async_client_callback,
+	async_client_context>: Delete fields.
+	(remote_start_remote, extended_remote_attach_1, remote_resume)
+	(extended_remote_create_inferior): Adjust.
+	(remote_async_serial_handler): Call inferior_event_handler
+	directly.
+	(remote_async): Replace 'callback' and 'context' parameters with
+	boolean 'enable' parameter.  Adjust.
+	* top.c (gdb_readline_wrapper_cleanup, gdb_readline_wrapper):
+	Adjust.
+	* target-delegates.c: Regenerate.
+
+2015-03-25  Gary Benson <gbenson@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* target.c (fileio_ft_t): New typedef, define object vector.
+	(fileio_fhandles): New static variable.
+	(is_closed_fileio_fh): New macro.
+	(lowest_closed_fd): New static variable.
+	(acquire_fileio_fd): New function.
+	(release_fileio_fd): Likewise.
+	(fileio_fd_to_fh): New macro.
+	(target_fileio_open): Wrap the file descriptor on success.
+	(target_fileio_pwrite): Updated to use wrapped file descriptor.
+	(target_fileio_pread): Likewise.
+	(target_fileio_close): Likewise.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* thread.c (thread_apply_all_command): Take exited threads into
+	account.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (resume, proceed): Mention
+	switch_back_to_stepped_thread, not switch_back_to_stepping.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (user_visible_resume_ptid): Rewrite going from
+	most-locked to unlocked instead of the opposite.  Move comment ...
+	* infrun.h (user_visible_resume_ptid): ... here.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_nat_resume): Output debug logs before trying
+	to resume the event lwp.  Use the lwp's ptid instead of the passed
+	in (maybe wildcard) ptid.
+	(stop_wait_callback): Tweak debug log output.
+	(check_stopped_by_breakpoint): Tweak debug log output.  Also dump
+	TRAP_TRACE.
+	(linux_nat_filter_event): In debug output, distinguish a
+	resume_stop SIGSTOP from a delayed SIGSTOP.  Output debug logs
+	before trying to resume the lwp.
+
+2015-03-24  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.h (struct dynamic_prop_list) <prop>: Remove
+	pointer indirection.
+	* gdbtypes.c (get_dyn_prop): Adjust, following change above.
+	(add_dyn_prop, copy_dynamic_prop_list): Likewise.
+
+2015-03-24  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_DATA_LOCATION>:
+	Renames DYN_ATTR_DATA_LOCATION.
+	(TYPE_DATA_LOCATION): Use DYN_PROP_DATA_LOCATION instead of
+	DYN_ATTR_DATA_LOCATION.
+	* dwarf2read.c (set_die_type): Use DYN_PROP_DATA_LOCATION
+	instead of DYN_ATTR_DATA_LOCATION.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (until_break_command): Adjust call to proceed.
+	* gdbthread.h (struct thread_control_state) <stepping_command>:
+	New field.
+	* infcall.c (run_inferior_call): Adjust call to proceed.
+	* infcmd.c (run_command_1, proceed_thread_callback, continue_1):
+	Adjust calls to proceed.
+	(set_step_frame): Set the current thread's step_start_function
+	here.
+	(step_once): Adjust calls to proceed.
+	(jump_command, signal_command, until_next_command)
+	(finish_backward, finish_forward, proceed_after_attach_callback)
+	(attach_command_post_wait): Adjust calls to proceed.
+	* infrun.c (proceed_after_vfork_done): Adjust call to proceed.
+	(do_target_resume): New function, factored out from ...
+	(resume): ... here.  Remove 'step' parameter.  Instead, check
+	currently_stepping to determine whether the thread should be
+	single-stepped.
+	(proceed): Remove 'step' parameter and don't set the thread's
+	step_start_function here.  Adjust call to 'resume'.
+	(handle_inferior_event): Adjust calls to 'resume'.
+	(switch_back_to_stepped_thread): Use do_target_resume instead of
+	'resume'.
+	(keep_going): Adjust calls to 'resume'.
+	* infrun.h (proceed): Remove 'step' parameter.
+	(resume): Likewise.
+	* windows-nat.c (do_initial_windows_stuff): Adjust call to
+	'resume'.
+	* mi/mi-main.c (proceed_thread): Adjust call to 'proceed'.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* gdbthread.h (struct thread_control_state) <stepping_command>:
+	New field.
+	* infcmd.c (step_once): Pass step=1 to clear_proceed_status.  Set
+	the thread's stepping_command field.
+	* infrun.c (resume): Check the thread's stepping_command flag to
+	determine which threads should be resumed.  Rename 'entry_step'
+	local to user_step.
+	(clear_proceed_status_thread): Clear 'stepping_command'.
+	(schedlock_applies): Change parameter type to struct thread_info
+	pointer.  Adjust.
+	(find_thread_needs_step_over): Remove 'step' parameter.  Adjust.
+	(switch_back_to_stepped_thread): Adjust calls to
+	'schedlock_applies'.
+	(_initialize_infrun): Adjust "set scheduler-locking step" help.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (step_start_function): Delete and ...
+	* gdbthread.h (struct thread_control_state) <step_start_function>:
+	... now a field here.
+	* infrun.c (clear_proceed_status_thread): Clear the thread's
+	step_start_function.
+	(proceed, process_event_stop_test, print_stop_event): Adjust.
+
+2015-03-24  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (proceed): No longer handle negative step.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* nat/x86-linux.h (x86_linux_new_thread): New declaration.
+	(x86_linux_prepare_to_resume): Likewise.
+	* x86-linux-nat.c (x86_linux_new_thread):
+	Moved to nat/x86-linux.c.
+	(x86_linux_prepare_to_resume): Likewise.
+	* nat/x86-linux.c (x86_linux_new_thread): New function.
+	(x86_linux_prepare_to_resume): Likewise.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* nat/x86-linux-dregs.h: New file.
+	* nat/x86-linux-dregs.c: Likewise.
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux-dregs.h.
+	(x86-linux-dregs.o): New rule.
+	* config/i386/linux.mh (NATDEPFILES): Add x86-linux-dregs.o.
+	* config/i386/linux64.mh (NATDEPFILES): Likewise.
+	* x86-linux-nat.c: Include nat/x86-linux-dregs.h.
+	(u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
+	(x86_linux_dr_get): Likewise.
+	(x86_linux_dr_set): Likewise.
+	(x86_linux_dr_get_addr): Likewise.
+	(x86_linux_dr_get_control): Likewise.
+	(x86_linux_dr_get_status): Likewise.
+	(update_debug_registers_callback): Likewise.
+	(x86_linux_dr_set_control): Likewise.
+	(x86_linux_dr_set_addr): Likewise.
+	(x86_linux_update_debug_registers): Likewise.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* x86-linux-nat.c (x86_linux_update_debug_registers):
+	New function, factored out from...
+	(x86_linux_prepare_to_resume): ...this.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* x86-linux-nat.c (x86_linux_dr_get): Update comments.
+	(x86_linux_dr_set): Likewise.
+	(x86_linux_dr_get_addr): Likewise.
+	(x86_linux_dr_get_control): Likewise.
+	(x86_linux_dr_get_status): Likewise.
+	(update_debug_registers_callback): Likewise.
+	(x86_linux_dr_set_control): Likewise.
+	(x86_linux_dr_set_addr): Likewise.
+	(x86_linux_prepare_to_resume): Likewise.
+	(x86_linux_new_thread): Likewise.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* x86-linux-nat.c (x86_linux_dr_set_addr): Update assertion.
+	(x86_linux_new_thread): Rename argument.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* nat/x86-linux.h: New file.
+	* nat/x86-linux.c: Likewise.
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux.h.
+	(x86-linux.o): New rule.
+	* config/i386/linux.mh (NATDEPFILES): Add x86-linux.o.
+	* config/i386/linux64.mh (NATDEPFILES): Likewise.
+	* nat/linux-nat.h (struct arch_lwp_info): New forward declaration.
+	(lwp_set_arch_private_info): New declaration.
+	(lwp_arch_private_info): Likewise.
+	* linux-nat.c (lwp_set_arch_private_info): New function.
+	(lwp_arch_private_info): Likewise.
+	* x86-linux-nat.c: Include nat/x86-linux.h.
+	(arch_lwp_info): Removed structure.
+	(update_debug_registers_callback):
+	Use lwp_set_debug_registers_changed.
+	(x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
+	and lwp_set_debug_registers_changed.
+	(x86_linux_new_thread): Use lwp_set_debug_registers_changed.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* nat/linux-nat.h (ptid_of_lwp): New declaration.
+	(lwp_is_stopped): Likewise.
+	(lwp_stop_reason): Likewise.
+	* linux-nat.c (ptid_of_lwp): New function.
+	(lwp_is_stopped): Likewise.
+	(lwp_is_stopped_by_watchpoint): Likewise.
+	* x86-linux-nat.c (update_debug_registers_callback):
+	Use lwp_is_stopped.
+	(x86_linux_prepare_to_resume): Use ptid_of_lwp and
+	lwp_stop_reason.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* linux-nat.h (linux_stop_lwp): Move declaration to...
+	* nat/linux-nat.h (linux_stop_lwp): New declaration.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* linux-nat.h: Include nat/linux-nat.h.
+	(iterate_over_lwps): Move declaration to nat/linux-nat.h.
+	* nat/linux-nat.h (struct lwp_info): New forward declaration.
+	(iterate_over_lwps_ftype): New typedef.
+	(iterate_over_lwps): New declaration.
+	* linux-nat.h (iterate_over_lwps): Update comment.  Use
+	iterate_over_lwps_ftype.  Update callback return value check.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* x86-nat.h (x86_debug_reg_state): Move declaration to...
+	* nat/x86-dregs.h (x86_debug_reg_state): New declaration.
+
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+	* nat/linux-nat.h (current_lwp_ptid): New declaration.
+	* linux-nat.c (current_lwp_ptid): New function.
+	* x86-linux-nat.c: Include nat/linux-nat.h.
+	(x86_linux_dr_get_addr): Use current_lwp_ptid.
+	(x86_linux_dr_get_control): Likewise.
+	(x86_linux_dr_get_status): Likewise.
+	(x86_linux_dr_set_control): Likewise.
+	(x86_linux_dr_set_addr): Likewise.
+
+2015-03-24  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	PR breakpoints/16466
+	* breakpoint.c (create_breakpoint): Set thread on breakpoint struct.
+
+2015-03-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* ser-mingw.c (ser_windows_setparity): Fix indentation.
+	* ser-unix.c (hardwire_setparity): Likewise.
+
+2015-03-23  Yurij Grechishhev  <yurij.grechishhev@gmail.com>
+
+	* NEWS: Mention set/show serial parity command.
+	* monitor.c (monitor_open): Call serial_setparity.
+	* remote.c (remote_open_1): Likewise.
+	* ser-base.c (ser_base_serparity): New function.
+	* ser-base.h (ser_base_setparity): Add  declaration.
+	* ser-go32.c (dos_ops): Set "setparity" field.
+	* ser-mingw.c (ser_windows_raw): Do not set state.fParity and
+	state.Parity.
+	(ser_windows_setparity): New function.
+	(hardwire_ops): Add ser_windows_setparity.
+	(tty_ops): Add NULL for setparity field.
+	(pipe_ops): Add ser_base_setparity.
+	(tcp_ops): Likewise.
+	* ser-pipe.c (pipe_ops): Likewise.
+	* ser-tcp.c (tcp_ops): Likewise.
+	* ser-unix.c (hardwire_setparity): Add declaration.
+	(hardwire_raw): Don't reset PARENB flag.
+	(hardwire_setparity): New function.
+	(hardwire_ops): Add hardwire_setparity.
+	* serial.c (serial_setparity): New function.
+	(serial_parity): New global.
+	(parity_none, parity_odd, parity_even, parity_enums, parity):
+	New static globals.
+	(set_parity): New function.
+	(_initialize_serial): Add set/show serial parity commands.
+	* serial.h (GDBPARITY_NONE): Define.
+	(GDBPARITY_ODD): Define.
+	(GDBPARITY_EVEN): Define.
+	(serial_setparity) Add declaration.
+	(struct serial_ops): Add setparity field.
+	* target.h (serial_parity): Add declaration.
+
+2015-03-23  Keith Seitz  <keiths@redhat.com>
+
+	* linespec.c (linespec_lexer_lex_keyword): Update comment.
+
+2015-03-23  Keith Seitz  <keiths@redhat.com>
+
+	* breakpoint.c (parse_breakpoint_sals): Use
+	linespec_lexer_lex_keyword to ascertain if the user specified
+	a NULL location.
+	* linespec.c [IF_KEYWORD_INDEX]: Define.
+	(linespec_lexer_lex_keyword): Export.
+	(struct ls_parser) <keyword_ok>: Remove.
+	A keyword is only a keyword if not followed by another keyword.
+	(linespec_lexer_lex_one): Remove keyword_ok handling.
+	Add comment explaining why the parsing stream is not advanced
+	when a keyword is seen.
+	(parse_linespec): Remove parser->keyword_ok.
+	* linespec.h (linespec_lexer_lex_keyword): Add declaration.
+
+2015-03-23  Keith Seitz  <keiths@redhat.com>
+
+	PR gdb/18021
+	* dwarf2read.c (dwarf2_add_member_fn): Issue a complaint
+	if we find a static method with DW_AT_vtable_elem_location.
+
+2015-03-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* tui/tui-io.c (tui_expand_tabs): Reinitialize the column counter
+	before the second loop, to avoid undefined behavior.  Reported by
+	Anton Blanchard <anton@samba.org>.
+
+2015-03-20  Keven Boell  <keven.boell@intel.com>
+
+	* gdbtypes.c (resolve_dynamic_type_internal): Adapt
+	data_location usage to linked list.
+	(resolve_dynamic_type_internal): Adapt data_location to
+	linked list.
+	(get_dyn_prop, add_dyn_prop, copy_dynamic_prop_list): New function.
+	(copy_type_recursive, copy_type): Add copy of linked list.
+	* gdbtypes.h (enum dynamic_prop_node_kind): New enum.
+	(struct dynamic_prop_list): New struct.
+	* dwarf2read.c (set_die_type): Set data_location data.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* i386-sol2-tdep.c (i386_sol2_static_transform_name): Move "p" to
+	inner block and make it const.
+	* machoread.c (get_archive_prefix_len): Make "lparen" const.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (set_breakpoint_condition): Make argument "exp" const.
+	* breakpoint.h (set_breakpoint_condition): Update declaration.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* tui/tui-io.c (tui_expand_tabs): Make "s1" const.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* remote-m32r-sdi.c (m32r_open): Make "port_str" const.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* nto-tdep.c (nto_find_and_open_solib): Make "endian" const.
+	(nto_init_solib_absolute_prefix): Likewise.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
+	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Make "p" const.
+	* spu-tdep.c (spu_gdbarch_init): Make "name" const.
+
+2015-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* config/djgpp/README: Remove gdb.hp.
+
+2015-03-20  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_gdbarch_init): Don't call
+	set_gdbarch_cannot_step_breakpoint.
+
+2015-03-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_resume_one_lwp): Rename to ...
+	(linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
+	instead call perror_with_name.
+	(check_ptrace_stopped_lwp_gone): New function.
+	(linux_resume_one_lwp): Reimplement as wrapper around
+	linux_resume_one_lwp_throw that swallows errors if the LWP is
+	gone.
+	(resume_stopped_resumed_lwps): Try register reads in TRY/CATCH and
+	swallows errors if the LWP is gone.  Use
+	linux_resume_one_lwp_throw instead of linux_resume_one_lwp.
+
+2015-03-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (status_callback): Return early if the LWP has no
+	status pending.
+
+2015-03-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (select_event_lwp_callback): Update comment to no
+	longer mention SIGTRAP.
+
+2015-03-18  Tristan Gingold  <gingold@adacore.com>
+
+	* amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move
+	redirection code to ...
+	(amd64_windows_frame_decode_insns): ... Here.  Fix in prologue
+	checks.  Fix SAVE_NONVOL operations.  Add debug code and comments.
+
+2015-03-18  Gary Benson <gbenson@redhat.com>
+
+	(remote_protocol_features): Remove the "vFile:fstat" feature.
+	(remote_hostio_fstat): Probe for "vFile:fstat" support.
+
+2015-03-11  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/18107
+	* aarch64-linux-tdep.c: Include xml-syscall.h
+	(aarch64_linux_get_syscall_number): New function.
+	(aarch64_linux_init_abi): Call
+	set_gdbarch_get_syscall_number.
+	* syscalls/aarch64-linux.xml: New file.
+
+2015-03-17  Yurij Grechishhev  <yurij.grechishhev@gmail.com>
+
+	* ser-base.h (ser_base_setstopbits): Change second argument name
+	from "rate" to "num".
+
+2015-03-17  Gary Benson <gbenson@redhat.com>
+	    Luke Allardyce <lukeallardyce@gmail.com>
+
+	PR gdb/18131
+	* common/common-remote-fileio.h (sys/stat.h): New include.
+	(stuct stat): Remove forward declaration.
+
+2015-03-16  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers
+	before writing core register notes.
+
+2015-03-16  Yuanhui Zhang  <asmwarrior@gmail.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* gdb_curses.h (tgetnum): Mark with EXTERN_C.
+	* stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs)
+	(tgoto): Wrap with extern "C".
+
+2015-03-16  Pedro Alves  <palves@redhat.com>
+	    Yuanhui Zhang  <asmwarrior@gmail.com>
+
+	* stub-termcap.c (tputs): Change prototype.
+
+2015-03-16  Yuanhui Zhang  <asmwarrior@gmail.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (struct thread_info_struct): Rename to ...
+	(struct windows_thread_info_struct): ... this.
+	(thread_info): Rename to ...
+	(windows_thread_info): ... this.
+	All users updated.
+
+2015-03-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* NEWS: New Removed targets and native configurations.
+
+2015-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Remove HPUX.
+	* Makefile.in (ALL_64_TARGET_OBS): Remove ia64-hpux-tdep.o.
+	(ALL_TARGET_OBS): Remove hppa-hpux-tdep.o, solib-som.o and solib-pa64.o.
+	(HFILES_NO_SRCDIR): Remove solib-som.h, inf-ttrace.h, solib-pa64.h and
+	ia64-hpux-tdep.h, solib-ia64-hpux.h.
+	(ALLDEPFILES): Remove hppa-hpux-tdep.c, hppa-hpux-nat.c,
+	ia64-hpux-nat.c, ia64-hpux-tdep.c, somread.c and solib-som.c.
+	* config/djgpp/fnchange.lst: Remove hppa-hpux-nat.c and
+	hppa-hpux-tdep.c.
+	* config/ia64/hpux.mh: Remove file.
+	* config/pa/hpux.mh: Remove file.
+	* configure: Rebuilt.
+	* configure.ac (dlgetmodinfo, somread.o): Remove.
+	* configure.host (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
+	(ia64-*-hpux*): Remove its float format exception.
+	* configure.tgt (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
+	* hppa-hpux-nat.c: Remove file.
+	* hppa-hpux-tdep.c: Remove file.
+	* hppa-tdep.c (struct hppa_unwind_info, struct hppa_objfile_private):
+	Move them here from hppa-tdep.h
+	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Make it static.
+	(hppa_frame_prev_register_helper): Remove HPPA_FLAGS_REGNUM exception.
+	* hppa-tdep.h (struct hppa_unwind_info, struct hppa_objfile_private):
+	Move them to hppa-tdep.c.
+	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Remove
+	declarations.
+	* ia64-hpux-nat.c: Remove file.
+	* ia64-hpux-tdep.c: Remove file.
+	* ia64-hpux-tdep.h: Remove file.
+	* inf-ttrace.c: Remove file.
+	* inf-ttrace.h: Remove file.
+	* solib-ia64-hpux.c: Remove file.
+	* solib-ia64-hpux.h: Remove file.
+	* solib-pa64.c: Remove file.
+	* solib-pa64.h: Remove file.
+	* solib-som.c: Remove file.
+	* solib-som.h: Remove file.
+	* somread.c: Remove file.
+
+2015-03-13  John Baldwin  <jhb@FreeBSD.org>
+
+	* configure.ac: AC_SEARCH_LIBS(kinfo_getvmmap, util).
+	* config.in: Regenerate.
+	* configure: Regenerate.
+	* fbsd-nat.c [!HAVE_KINFO_GETVMMAP] (fbsd_read_mapping): Don't
+	define.
+	(fbsd_find_memory_regions): Use kinfo_getvmmap to
+	enumerate memory regions if present.
+
+2015-03-13  John Baldwin  <jhb@FreeBSD.org>
+
+	* amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
+	* i386fbsd-tdep.c: Fix style in various gdb_static_assert
+	expressions.
+	(i386fbsd_sigtramp_p): Likewise.
+
+2015-03-12  John Baldwin  <jhb@FreeBSD.org>
+
+	* MAINTAINERS (Write After Approval): Add John Baldwin.
+
+2015-03-12  Gary Benson <gbenson@redhat.com>
+
+	* solib.c (_initialize_solib): Make "set/show sysroot" use
+	add_setshow_optional_filename_cmd so it can be restored to
+	empty after being set.
+
+2015-03-11  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* Makefile.in (SFILES): New source break-catch-syscall.c.
+	(COMMON_OBS): New object break-catch-syscall.o.
+	* break-catch-syscall.c: New file.
+	* breakpoint.c: Remove inclusion of "xml-syscall.h".
+	(syscall_catchpoint_p): Move declaration to break-catch-syscall.c
+	(struct syscall_catchpoint): Likewise.
+	(dtor_catch_syscall): Likewise.
+	(catch_syscall_inferior_data): Likewise.
+	(struct catch_syscall_inferior_data): Likewise.
+	(get_catch_syscall_inferior_data): Likewise.
+	(catch_syscall_inferior_data_cleanup): Likewise.
+	(insert_catch_syscall): Likewise.
+	(remove_catch_syscall): Likewise.
+	(breakpoint_hit_catch_syscall): Likewise.
+	(print_it_catch_syscall): Likewise.
+	(print_one_catch_syscall): Likewise.
+	(print_mention_catch_syscall): Likewise.
+	(print_recreate_catch_syscall): Likewise.
+	(catch_syscall_breakpoint_ops): Likewise.
+	(syscall_catchpoint_p): Likewise.
+	(create_syscall_event_catchpoint): Likewise.
+	(catch_syscall_split_args): Likewise.
+	(catch_syscall_command_1): Likewise.
+	(is_syscall_catchpoint_enabled): Likewise.
+	(catch_syscall_enabled): Likewise.
+	(catching_syscall_number): Likewise.
+	(catch_syscall_completer): Likewise.
+	(clear_syscall_counts): Likewise.
+	(initialize_breakpoint_ops): Move initialization of syscall
+	catchpoints to break-catch-syscall.c.
+	(_initialize_breakpoint): Move code related to syscall catchpoints
+	to break-catch-syscall.c.
+
+2015-03-11  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* breakpoint.c (breakpoint_find_if): New function.
+	* breakpoint.h (breakpoint_find_if): New prototype.
+
+2015-03-11  Gary Benson <gbenson@redhat.com>
+
+	* remote-fileio.h (remote_fileio_to_host_stat): New declaration.
+	* remote-fileio.c (remote_fileio_to_host_uint): New function.
+	(remote_fileio_to_host_ulong): Likewise.
+	(remote_fileio_to_host_mode): Likewise.
+	(remote_fileio_to_host_time): Likewise.
+	(remote_fileio_to_host_stat): Likewise.
+	* remote.c (PACKET_vFile_fstat): New enum value.
+	(remote_protocol_features): Register the "vFile:fstat" feature.
+	(remote_hostio_fstat): New function.
+	(remote_bfd_iovec_stat): Use the above.
+	(_initialize_remote): Register new "set/show remote
+	hostio-fstat-packet" command.
+	* symfile.c (separate_debug_file_exists): Update comment.
+	* NEWS: Announce new vFile:fstat packet.
+
+2015-03-11  Gary Benson <gbenson@redhat.com>
+
+	* common/common-remote-fileio.h: New file.
+	* common/common-remote-fileio.c: Likewise.
+	* Makefile.in (SFILES): Add common/common-remote-fileio.c.
+	(HFILES_NO_SRCDIR): Add common/common-remote-fileio.h.
+	(COMMON_OBS): Add common-remote-fileio.o.
+	(common-remote-fileio.o): New rule.
+	* remote-fileio.h (common-remote-fileio.h): New include.
+	* remote-fileio.c (gdb/fileio.h): Do not include.
+	(remote_fileio_to_be): Moved to common-remote-fileio.h.
+	(remote_fileio_to_fio_uint): Likewise.
+	(remote_fileio_to_fio_time): Likewise.
+	(remote_fileio_mode_to_target): Moved to common-remote-fileio.c.
+	(remote_fileio_to_fio_mode): Likewise.
+	(remote_fileio_to_fio_ulong): Likewise.
+	(remote_fileio_to_fio_stat): Likewise.
+
+2015-03-11  Andy Wingo  <wingo@igalia.com>
+
+	* guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
+	we were checking the cached type, not the cached dynamic type.
+
+2015-03-11  Andy Wingo  <wingo@igalia.com>
+
+	* guile/scm-cmd.c (cmdscm_destroyer): Don't xfree the name and
+	other strings, as these are on the GC'd heap, and will be
+	collected along with the smob.
+
+2015-03-11  Andy Wingo  <wingo@igalia.com>
+
+	* guile/scm-objfile.c (gdbscm_objfile_progspace): New function.
+	(objfile_functions): Bind gdbscm_objfile_progspace to
+	objfile-progspace.
+	* guile/lib/gdb.scm: Add objfile-progspace to exports.
+
+2015-03-11  Andy Wingo  <wingo@igalia.com>
+
+	* guile/guile.c (_initialize_guile): Disable automatic
+	finalization, if Guile offers us that possibility.
+	* guile/guile.c (call_initialize_gdb_module):
+	* guile/scm-safe-call.c (gdbscm_with_catch): Arrange to run
+	finalizers in appropriate places.
+	* configure.ac (AC_TRY_LIBGUILE): Add a check for
+	scm_set_automatic_finalization_enabled.
+	* configure: Regenerated.
+
+2015-03-11  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using
+	SAL, if possible.
+
+2015-03-11  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (struct arch_lwp_info): New.
+	(s390_fix_watch_points): Rename to...
+	(s390_prepare_to_resume): ...this.  Skip the PER info update
+	unless the watch points have changed.
+	(s390_refresh_per_info, s390_new_thread): New functions.
+	(s390_insert_watchpoint): Call s390_refresh_per_info instead of
+	s390_fix_watch_points.
+	(s390_remove_watchpoint): Likewise.
+	(_initialize_s390_nat): Reflect renaming of s390_fix_watch_points.
+	Register s390_prepare_to_resume.
+
+2015-03-09  Pedro Alves  <palves@redhat.com>
+
+	Revert:
+	2015-03-07  Pedro Alves  <palves@redhat.com>
+	* common/gdb_socket.h: New file.
+	* ser-tcp.c: Include gdb_socket.h.  Don't include netinet/in.h nor
+	sys/socket.h.
+	(net_open): Use union gdb_sockaddr_u.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (build_warnings): Move -Wmissing-prototypes
+	-Wdeclaration-after-statement -Wmissing-parameter-type
+	-Wold-style-declaration -Wold-style-definition to the C-specific
+	set.
+	* configure: Regenerate.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* common/gdb_socket.h: New file.
+	* ser-tcp.c: Include gdb_socket.h.  Don't include netinet/in.h nor
+	sys/socket.h.
+	(net_open): Use union gdb_sockaddr_u.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c [!__cplusplus] (enum catcher_state)
+	(exceptions_state_mc_action_iter)
+	(exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
+	Don't define.
+	[__cplusplus] (try_scope_depth): New global.
+	[__cplusplus] (exception_try_scope_entry)
+	(exception_try_scope_exit, gdb_exception_sliced_copy)
+	(exception_rethrow): New functions.
+	(throw_exception): In C++ mode, throw
+	gdb_exception_RETURN_MASK_QUIT for RETURN_QUIT and
+	gdb_exception_RETURN_MASK_ERROR for RETURN_ERROR.
+	(throw_it): In C++ mode, use try_scope_depth.
+	* common/common-exceptions.h [!__cplusplus]
+	(exceptions_state_mc_action_iter)
+	(exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
+	Don't declare.
+	[__cplusplus] (exception_try_scope_entry)
+	(exception_try_scope_exit, exception_rethrow): Declare.
+	[__cplusplus] (struct exception_try_scope): New struct.
+	[__cplusplus] (TRY, CATCH, END_CATCH): Reimplement on top of real
+	C++ exceptions.
+	(struct gdb_exception_RETURN_MASK_ALL)
+	(struct gdb_exception_RETURN_MASK_ERROR)
+	(struct gdb_exception_RETURN_MASK_QUIT): New types.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* main.c (handle_command_errors): Remove volatile qualifier from
+	parameter.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (save_breakpoints): Adjust to avoid code between
+	TRY and CATCH.
+	* gdbtypes.c (safe_parse_type): Remove empty line.
+	(types_deeply_equal):
+	* guile/scm-frame.c (gdbscm_frame_name):
+	* linux-thread-db.c (find_new_threads_once):
+	* python/py-breakpoint.c (bppy_get_commands):
+	* record-btrace.c (record_btrace_insert_breakpoint)
+	(record_btrace_remove_breakpoint, record_btrace_start_replaying)
+	(record_btrace_start_replaying): Adjust to avoid code between TRY
+	and CATCH.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c (struct catcher) <exception>: No
+	longer a pointer to volatile exception.  Now an exception value.
+	<mask>: Delete field.
+	(exceptions_state_mc_init): Remove all parameters.  Adjust.
+	(exceptions_state_mc): No longer pop the catcher here.
+	(exceptions_state_mc_catch): New function.
+	(throw_exception): Adjust.
+	* common/common-exceptions.h (exceptions_state_mc_init): Remove
+	all parameters.
+	(exceptions_state_mc_catch): Declare.
+	(TRY_CATCH): Rename to ...
+	(TRY): ... this.  Remove EXCEPTION and MASK parameters.
+	(CATCH, END_CATCH): New.
+	All callers adjusted.
+
+2015-03-07  Tom Tromey  <tromey@redhat.com>
+
+	* top.c (quit_force): Inline and delete DO_TRY, DO_PRINT_EX.
+
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+	* amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
+	(amd64_epilogue_frame_cache): Normal exception handling code.
+	* break-catch-throw.c (check_status_exception_catchpoint)
+	(re_set_exception_catchpoint): Ditto.
+	* cli/cli-interp.c (safe_execute_command):
+	* cli/cli-script.c (script_from_file): Ditto.
+	* compile/compile-c-symbols.c (generate_c_for_for_one_variable):
+	Ditto.
+	* compile/compile-object-run.c (compile_object_run): Ditto.
+	* cp-abi.c (baseclass_offset): Ditto.
+	* cp-valprint.c (cp_print_value): Ditto.
+	* exceptions.c (catch_exceptions_with_msg):
+	* frame-unwind.c (frame_unwind_try_unwinder): Ditto.
+	* frame.c (get_frame_address_in_block_if_available): Ditto.
+	* i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
+	(i386_sigtramp_frame_cache): Ditto.
+	* infcmd.c (post_create_inferior): Ditto.
+	* linespec.c (parse_linespec, find_linespec_symbols):
+	* p-valprint.c (pascal_object_print_value): Ditto.
+	* parse.c (parse_expression_for_completion): Ditto.
+	* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.
+	* remote.c (remote_get_noisy_reply): Ditto.
+	* s390-linux-tdep.c (s390_frame_unwind_cache): Ditto.
+	* solib-svr4.c (solib_svr4_r_map): Ditto.
+
+2015-03-06  Gary Benson  <gbenson@redhat.com>
+
+	* common/common-utils.h (startswith): New inline function.
+	All places where this logic was used updated to use the above.
+
+2015-03-05  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18002
+	* mem-break.c (default_memory_insert_breakpoint): Set shadow_len
+	after reading the breakpoint's shadow memory.
+
+2015-03-05  Mark Kettenis  <kettenis@gnu.org>
+
+	* hppabsd-nat.c: Remove file.
+	* hppaobsd-nat.c: New file.
+	* Makefile.in (ALLDEPFILES): Remove hppabsd-nat.c.  Add
+	hppaobsd-nat.c.
+	* config/pa/obsd.mh (NATDEPFILES): Replace hppabsd-nat.o with
+	hppaobsd-nat.o.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* target.h (struct target_ops) <to_decr_pc_after_break>: Delete.
+	(target_decr_pc_after_break): Delete declaration.
+	* target.c (default_target_decr_pc_after_break)
+	(target_decr_pc_after_break): Delete.
+	* linux-nat.c (check_stopped_by_breakpoint, linux_nat_wait_1): Use
+	gdbarch_decr_pc_after_break instead of target_decr_pc_after_break.
+	* linux-thread-db.c (check_event): Likewise.
+	* infrun.c (adjust_pc_after_break): Likewise.
+	* darwin-nat.c (cancel_breakpoint): Likewise.
+	* aix-thread.c (aix_thread_wait): Likewise.
+	* target-delegates.c: Regenerate.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (save_sigtrap): Check for breakpoints before
+	checking watchpoints.
+	(status_callback) [USE_SIGTRAP_SIGINFO]: Don't check whether a
+	breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
+	(check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]: Decide whether
+	a breakpoint triggered based on the SIGTRAP's siginfo.si_code.
+	(linux_nat_stopped_by_sw_breakpoint)
+	(linux_nat_supports_stopped_by_sw_breakpoint)
+	(linux_nat_stopped_by_hw_breakpoint)
+	(linux_nat_supports_stopped_by_hw_breakpoint): New functions.
+	(linux_nat_wait_1): Don't re-increment the PC if relying on
+	SIGTRAP's siginfo->si_code.
+	(linux_nat_add_target): Install new target methods.
+	* linux-thread-db.c (check_event): Don't account for breakpoint PC
+	offset if the target already adjusted the PC.
+	* nat/linux-ptrace.h (USE_SIGTRAP_SIGINFO): New.
+	(GDB_ARCH_TRAP_BRKPT): New.
+	(TRAP_HWBKPT): Define if not already defined.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention the new "swbreak" and "hwbreak" stop reasons.
+	* remote.c (struct remote_state) <remote_stopped_by_watchpoint_p>:
+	Delete field.
+	<stop_reason>: New field.
+	(PACKET_swbreak_feature, PACKET_hwbreak_feature): New enum values.
+	(packet_set_cmd_state): New function.
+	(remote_protocol_features): Register the "swbreak" and "hwbreak"
+	features.
+	(remote_query_supported): If not disabled with the corresponding
+	"set remote foo-packet" command, report support for the swbreak
+	and hwbreak features.
+	(struct stop_reply) <remote_stopped_by_watchpoint_p>: Delete
+	field.
+	<stop_reason>: New field.
+	(remote_parse_stop_reply): Handle "swbreak" and "hwbreak".
+	(remote_wait_as): Adjust.
+	(remote_stopped_by_sw_breakpoint)
+	(remote_supports_stopped_by_sw_breakpoint)
+	(remote_stopped_by_hw_breakpoint)
+	(remote_supports_stopped_by_hw_breakpoint): New functions.
+	(remote_stopped_by_watchpoint): New function.
+	(init_remote_ops): Install them.
+	(_initialize_remote): Register new "set/show remote
+	swbreak-feature-packet" and "set/show remote
+	swbreak-feature-packet" commands.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* btrace.h: Include target/waitstatus.h.
+	(struct btrace_thread_info) <stop_reason>: New field.
+	* record-btrace.c (record_btrace_step_thread): Use
+	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
+	(record_btrace_decr_pc_after_break): Delete.
+	(record_btrace_stopped_by_sw_breakpoint)
+	(record_btrace_supports_stopped_by_sw_breakpoint)
+	(record_btrace_stopped_by_hw_breakpoint)
+	(record_btrace_supports_stopped_by_hw_breakpoint): New functions.
+	(init_record_btrace_ops): Install them.
+	* record-full.c (record_full_hw_watchpoint): Delete and replace
+	with ...
+	(record_full_stop_reason): ... this throughout.
+	(record_full_exec_insn): Adjust.
+	(record_full_wait_1): Adjust.  No longer re-increment the PC.
+	(record_full_wait_1): Adjust.  Use
+	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
+	(record_full_stopped_by_watchpoint): Adjust.
+	(record_full_stopped_by_sw_breakpoint)
+	(record_full_supports_stopped_by_sw_breakpoint)
+	(record_full_supports_stopped_by_sw_breakpoint)
+	(record_full_stopped_by_hw_breakpoint)
+	(record_full_supports_stopped_by_hw_breakpoint): New functions.
+	(init_record_full_ops, init_record_full_core_ops): Install them.
+	* record.c (record_check_stopped_by_breakpoint): New function.
+	* record.h: Include target/waitstatus.h.
+	(record_check_stopped_by_breakpoint): New declaration.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	enum lwp_stop_reason -> enum target_stop_reason
+	* linux-nat.c (linux_resume_one_lwp, check_stopped_by_watchpoint)
+	(linux_nat_stopped_by_watchpoint, status_callback)
+	(linux_nat_wait_1): Adjust.
+	* linux-nat.h (enum lwp_stop_reason): Delete.
+	(struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
+	* x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
+	* target/waitstatus.h (enum target_stop_reason): New.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (need_moribund_for_location_type): New function.
+	(bpstat_stop_status): Don't skipping checking moribund locations
+	of breakpoint types which the target tell caused a stop.
+	(program_breakpoint_here_p): New function, factored out from ...
+	(bp_loc_is_permanent): ... this.
+	(update_global_location_list): Don't create a moribund location if
+	the target supports reporting stops of the type of the removed
+	breakpoint.
+	* breakpoint.h (program_breakpoint_here_p): New declaration.
+	* infrun.c (adjust_pc_after_break): Return early if the target has
+	already adjusted the PC.  Add comments.
+	(handle_signal_stop): If nothing explains a signal, and the target
+	tells us the stop was caused by a software breakpoint, check if
+	there's a breakpoint instruction in the memory.  If so, adjust the
+	PC before presenting the stop to the user.  Otherwise, ignore the
+	trap.  If nothing explains a signal, and the target tells us the
+	stop was caused by a hardware breakpoint, ignore the trap.
+	* target.h (struct target_ops) <to_stopped_by_sw_breakpoint,
+	to_supports_stopped_by_sw_breakpoint, to_stopped_by_hw_breakpoint,
+	to_supports_stopped_by_hw_breakpoint>: New fields.
+	(target_stopped_by_sw_breakpoint)
+	(target_supports_stopped_by_sw_breakpoint)
+	(target_stopped_by_hw_breakpoint)
+	(target_supports_stopped_by_hw_breakpoint): Define.
+	* target-delegates.c: Regenerate.
+
+2015-03-04  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (follow_fork_inferior): Use the whole of the
+	inferior_ptid and pending_follow.related_pid ptids instead of
+	building ptids from the process components.  Adjust verbose output
+	to use target_pid_to_str.
+	* linux-nat.c (linux_child_follow_fork): Use the whole of the
+	inferior_ptid and pending_follow.related_pid ptids instead of
+	building ptids from the process components.
+
+2015-03-04  Mark Kettenis  <kettenis@gnu.org>
+
+	* inf-ptrace.c [PT_GET_PROCESS_STATE]
+	(inf_ptrace_insert_fork_catchpoint): New function.
+	(inf_ptrace_remove_fork_catchpoint): New function.
+	(inf_ptrace_target) [PT_GET_PROCESS_STATE]: Install them.
+
+2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_register_name): Return empty string
+	instead of NULL for registers that shouldn't be visible.
+
+2015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_gdbarch_init): Use the correct syscall
+	XML file for 64-bit targets.
+
+2015-03-03  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* target.h (find_default_create_inferior): Remove declaration.
+	(find_default_attach): Likewise.
+
+2015-03-03  Pedro Alves  <palves@redhat.com>
+
+	* inf-ptrace.c (inf_ptrace_resume): Remove spurious whitespace.
+	Use ptid_get_pid to get the overall process id when resuming all
+	threads.
+
+2015-03-03  Pedro Alves  <palves@redhat.com>
+
+	* i386-linux-nat.c (i386_linux_resume): Get the ptrace PID out of
+	the lwp field of ptid.  Pass the full ptid to get_thread_regcache.
+	* inf-ptrace.c (get_ptrace_pid): New function.
+	(inf_ptrace_resume): Use it.
+	* linux-nat.c (linux_resume_one_lwp): Pass the LWP's ptid ummodified
+	to the lower layer.
+
+2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.c: Include sys/utsname.h.
+	(linux_determine_kernel_ptr_bits): New.
+	(linux_enable_bts): Call linux_determine_kernel_ptr_bits.
+	* x86-linux-nat.c (x86_linux_enable_btrace): Do not overwrite non-zero
+	ptr_bits.
+
+2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_update_function): Treat return as tailcall for
+	"_dl_runtime_resolve".
+
+2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.h (btrace_function) <lbegin, lend>: Remove.
+	* btrace.c (ftrace_debug): Do not print the line range.
+	(ftrace_skip_file, ftrace_update_lines): Remove.
+	(ftrace_new_function): Remove lbegin and lend initialization.
+	(btrace_compute_ftrace_bts): Remove call to ftrace_update_lines.
+	* record-btrace.c (btrace_compute_src_line_range): New.
+	(btrace_call_history_src_line): Call btrace_compute_src_line_range.
+
+2015-03-02  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (follow_exec): Delete all threads of the process except
+	the event thread.  Extended comments.
+
+2015-03-02  Joel Brobecker  <brobecker@adacore.com>
+
+	* contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
+
+2015-03-02  Joel Brobecker  <brobecker@adacore.com>
+
+	* utils.h: Remove <stdbool.h> #include.
+	(producer_is_gcc): Change return type to "int".
+	* utils.c (producer_is_gcc): Change return type to int.
+	Return 1 instead of true, and 0 instead of false.
+	Adjust function documentation accordingly.
+
+2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (have_regset_vxrs): New static variable.
+	(s390_linux_fetch_inferior_registers): Handle vector registers, if
+	present.
+	(s390_linux_store_inferior_registers): Likewise.
+	(s390_get_hwcap): Remove function.  Embed its logic...
+	(s390_read_description): ...here.  Yield a target description with
+	vector registers if applicable.
+	* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
+	"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
+	"features/s390x-tevx-linux64.c".
+	(struct gdbarch_tdep) <v0_full_regnum>: New field.
+	(s390_dwarf_regmap): Add vector registers.  Remove bogus entries
+	for "GNU/Linux-specific registers".
+	(s390_dwarf_reg_r0l): New enum value.
+	(s390_dwarf_reg_to_regnum): Support vector registers.
+	(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
+	of GPR lower halves.
+	(regnum_is_vxr_full): New function.
+	(s390_register_name): New function.
+	(s390_pseudo_register_name): Handle v0-v15, which are composed of
+	f0-f15 and v0l-v15l.
+	(s390_pseudo_register_type): Likewise.
+	(s390_pseudo_register_read): Likewise.
+	(s390_pseudo_register_write): Likewise.
+	(s390_value_from_register): Account for the fact that values are
+	placed left-justified in vector registers.
+	(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
+	the vector reggroup and omit them from the general reggroup.
+	(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
+	(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
+	(s390_iterate_over_regset_sections): Add iterations for the two
+	new vector regsets.
+	(s390_core_read_description): Yield a target description with
+	vector registers if applicable.
+	(s390_gdbarch_init): Handle target descriptions with vector
+	registers.  Add "register_name" gdbarch method.
+	(_initialize_s390_tdep): Call new tdesc initialization functions.
+	* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
+	(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
+	(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
+	(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
+	(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
+	(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
+	(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
+	(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
+	(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
+	(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
+	(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
+	(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
+	(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
+	(S390_NUM_REGS): Adjust value.
+	(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
+	(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
+	(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
+	* NEWS: Announce S/390 vector register support.
+
+2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* features/s390-tevx-linux64.xml: New file.
+	* features/s390-vx-linux64.xml: New file.
+	* features/s390-vx.xml: New file.
+	* features/s390x-tevx-linux64.xml: New file.
+	* features/s390x-vx-linux64.xml: New file.
+	* features/Makefile (WHICH): Add s390-vx-linux64,
+	s390x-vx-linux64, s390-tevx-linux64, and s390x-tevx-linux64.
+	(s390-vx-linux64-expedite, s390-tevx-linux64-expedite)
+	(s390x-vx-linux64-expedite, s390x-tevx-linux64-expedite): New
+	macros.
+	* features/s390-tevx-linux64.c: New generated file.
+	* features/s390-vx-linux64.c: Likewise.
+	* features/s390x-tevx-linux64.c: Likewise.
+	* features/s390x-vx-linux64.c: Likewise.
+	* regformats/s390-tevx-linux64.dat: Likewise.
+	* regformats/s390-vx-linux64.dat: Likewise.
+	* regformats/s390x-tevx-linux64.dat: Likewise.
+	* regformats/s390x-vx-linux64.dat: Likewise.
+
+2015-02-28  Doug Evans  <xdje42@gmail.com>
+
+	* symtab.h (struct symtab) <next>: Fix comment.
+
+2015-02-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* python/python.c (python_GdbModuleDef): Rename GdbMethods to
+	python_GdbMethods.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* dtrace-probe.c (dtrace_probe_ops): Make extern.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.h (exception_none): Declare.
+	* common/common-exceptions.c (exception_none): Moved from
+	exceptions.c.
+	(exceptions_state_mc_init): Use exception_none.
+	* exceptions.c (exception_none): Move to
+	common/common-exceptions.c.
+	* exceptions.h (exception_none): Move to
+	common/common-exceptions.h.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* main.c (catch_command_errors, catch_command_errors_const):
+	Remove 'mask' argument.  Adjust.
+	(captured_main): Adjust callers.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* python/python-internal.h: Include "extension-priv.h".
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.h (enum print_stop_action): Move further up in the
+	file.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* gdbarch.sh: Include regcache.h.
+	* gdbarch.h: Regenerate.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* arm-tdep.c (decode_insn) <arm_handle_insn, thumb_handle_insn>:
+	Remove duplicate const.
+	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Remove
+	duplicate const.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* cp-valprint.c (vtbl_ptr_name): Use EXPORTED_CONST.
+	* guile/guile.c (extension_language_guile): Use EXPORTED_CONST.
+	* features/feature_to_c.sh: Tag the generated xml_builtin array
+	with extern const in C++ mode.
+
+2015-02-27  Tom Tromey  <tromey@redhat.com>
+
+	* minidebug.c (struct lzma_stream): Rename to ...
+	(struct gdb_lzma_stream): ... this.
+	(lzma_open, lzma_pread, lzma_close, lzma_stat): Adjust.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): New
+	function.
+	(mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
+	(mi_cmd_stack_list_variables): Use it.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* x86-linux-nat.c (u_debugreg_offset): New function.
+	(x86_linux_dr_get, x86_linux_dr_set): Use it.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* nat/x86-dregs.h (enum target_hw_bp_type): Remove forward
+	declaration.
+	Include break-common.h.
+
+2015-02-27  Tom Tromey  <tromey@redhat.com>
+	    Pedro Alves <palves@redhat.com>
+
+	* arm-tdep.c (set_fp_model_sfunc, arm_set_abi): Use 'int' for
+	local used to iterate over enums.
+	* completer.c (signal_completer): Likewise.
+	* i386-tdep.c (i386_stap_parse_special_token): Likewise.
+	* rs6000-tdep.c (powerpc_set_vector_abi): Likewise.
+	* tui/tui-data.c (tui_next_win, tui_prev_win): Likewise.
+	* tui/tui-layout.c (next_layout, prev_layout): Likewise.
+	* tui/tui-win.c (tui_refresh_all_win, tui_rehighlight_all)
+	(tui_resize_all, tui_set_focus_command, tui_all_windows_info): Likewise.
+	* tui-wingeneral.c (tui_refresh_all):  Likewise.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* target.h: Include "infrun.h".
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* common/agent.h (IPA_SYM_EXPORTED_NAME): New.
+	(IPA_SYM): Use it.
+	* common/common-defs.h (EXTERN_C_PUSH, EXTERN_C_POP): New macros.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* cli-out.c (_rl_erase_entire_line): Move declaration out of
+	cli_mld_erase_entire_line, and make it extern "C".
+	* common/common-defs.h (EXTERN_C): New.
+	* completer.c (_rl_completion_prefix_display_length)
+	(_rl_print_completions_horizontally, QSFUNC): Move declarations
+	out of gdb_display_match_list_1.
+	(_rl_qsort_string_compare): Move declaration out of
+	gdb_display_match_list_1, and make it extern "C".
+	* defs.h (re_comp): Use EXTERN_C.
+	* maint.c (_mcleanup): Move declaration out of mcleanup_wrapper,
+	and make it extern "C".
+	(monstartup): Move declaration out of maintenance_set_profile_cmd,
+	and make it extern "C".
+	(main): Move declaration out of maintenance_set_profile_cmd.
+	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string): Use
+	EXTERN_C.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* python/python.c (GdbMethods): Rename to ...
+	(python_GdbMethods): ... this and make extern.
+	(GdbModuleDef): Rename to ...
+	(python_GdbModuleDef): ... this and make extern.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* record-btrace.c (set_record_btrace_cmdlist)
+	(show_record_btrace_cmdlist): Remove redefinitions.
+
+2015-02-27  Tom Tromey  <tromey@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* dwarf2-frame.c (enum cfa_how_kind, struct
+	dwarf2_frame_state_reg_info): Move out of struct
+	dwarf2_frame_state.
+	* dwarf2read.c (struct tu_stats): Move out of struct
+	dwarf2_per_objfile.
+	(struct file_entry): Move out of struct line_header.
+	(struct nextfield, struct nextfnfield, struct fnfieldlist, struct
+	typedef_field_list): Move out of struct field_info.
+	* gdbtypes.h (enum dynamic_prop_kind, union dynamic_prop_data):
+	Move out of struct dynamic_prop.
+	(union type_owner, union field_location, struct field, struct
+	range_bounds, union type_specific): Move out of struct main_type.
+	(struct fn_fieldlist, struct fn_field, struct typedef_field)
+	(VOFFSET_STATIC): Move out of struct cplus_struct_type.
+	(struct call_site_target, union call_site_parameter_u, struct
+	call_site_parameter): Move out of struct call_site.
+	* m32c-tdep.c (enum m32c_prologue_kind): Move out of struct
+	m32c_prologue.
+	(enum srcdest_kind): Move out of struct srcdest.
+	* main.c (enum cmdarg_kind): Move out of struct cmdarg.
+	* prologue-value.h (enum prologue_value_kind): Move out of struct
+	prologue_value.
+	* s390-linux-tdep.c (enum s390_abi_kind): Move out of struct
+	gdbarch_tdep.
+	* stabsread.c (struct nextfield, struct next_fnfieldlist): Move
+	out of struct field_info.
+	* symfile.h (struct other_sections): Move out of struct
+	section_addr_info.
+	* symtab.c (struct symbol_cache_slot): Move out struct
+	block_symbol_cache.
+	* target-descriptions.c (enum tdesc_type_kind): Move out of
+	typedef struct tdesc_type.
+	* tui/tui-data.h (enum tui_line_or_address_kind): Move out of
+	struct tui_line_or_address.
+	* value.c (enum internalvar_kind, union internalvar_data): Move
+	out of struct internalvar.
+	* xtensa-tdep.h (struct ctype_cache): Move out of struct
+	gdbarch_tdep.
+
+2015-02-27  Tom Tromey  <tromey@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	Rename symbols whose names are reserved C++ keywords throughout.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMPILER): New, get it from autoconf.
+	(COMPILE.pre, CC_LD): Use COMPILER.
+	(CXX): Get from autoconf instead.
+	(CXX_FOR_TARGET): Default to g++ instead of gcc.
+	* acinclude.m4: Include build-with-cxx.m4.
+	* build-with-cxx.m4: New file.
+	* configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
+	Disable -Werror by default if building in C++ mode.
+	(build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
+	-Wno-narrowing in C++ mode.  Only enable -Wpointer-sign in C mode.
+	Run supported-warning-flags tests with the C++ compiler.
+	Save/restore CXXFLAGS too.
+	* configure: Regenerate.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
+	* libiberty.m4: New file.
+	* acinclude.m4: Include libiberty.m4.
+	* configure.ac: Call libiberty_INIT.
+	* config.in, configure: Regenerate.
+
+2015-02-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_gcc_target_options): Not just handle
+	31-bit targets, but 64-bit targets as well.
+	(s390_gnu_triplet_regexp): New function.
+	(s390_gdbarch_init): Set the gcc_target_options gdbarch method for
+	64-bit targets as well.  Set the gnu_triplet_regexp gdbarch
+	method.
+
+2015-02-27  Jon TURNEY  <jon.turney@dronecode.org.uk>  (tiny patch)
+
+	* windows-nat.c (CONTEXT_DEBUGGER): Remove.
+	(CONTEXT_DEBUGGER_DR): Add CONTEXT_SEGMENTS.  Incorporate flags
+	from CONTEXT_DEBUGGER.
+
+2015-02-26  Doug Evans  <dje@google.com>
+
+	* gdbtypes.c (internal_type_vptr_fieldno): Add missing call to
+	CHECK_TYPEDEF.
+	(set_type_vptr_fieldno): Ditto.
+	(internal_type_vptr_basetype, set_type_vptr_basetype): Ditto.
+	* gnu-v3-abi.c (gnuv3_dynamic_class): Ditto.
+
+2015-02-26  Pedro Alves  <palves@redhat.com>
+
+	* auto-load.h (file_is_auto_load_safe): Add ATTRIBUTE_PRINTF.
+	* complaints.c (vcomplaint): Pass argument FMT directly to
+	printf-like functions instead of complaint->fmt.
+	* ctf.c (ctf_save_write_metadata): Add ATTRIBUTE_PRINTF.
+	* darwin-nat.c (inferior_debug): Add ATTRIBUTE_PRINTF.
+	* compile/compile-loc2c.c (pushf, unary, binary): Add
+	ATTRIBUTE_PRINTF.
+	(do_compile_dwarf_expr_to_c): Pass string literal as format string
+	to pushf.
+	(BINARY): Pass string literal as format string to 'binary'.
+	* compile/compile-object-load.c (link_callbacks_einfo): Add
+	ATTRIBUTE_PRINTF.
+	* guile/guile-internal.h (gdbscm_printf): Add ATTRIBUTE_PRINTF.
+
+2015-02-26  Pedro Alves  <palves@redhat.com>
+
+	* windows-termcap.c: Rename to ...
+	* stub-termcap.c: ... this.  Adjust header line.
+	* Makefile.in (SFILES): Refer to stub-termcap.c instead of
+	windows-termcap.c.
+	* configure: Regenerate.
+	* configure.ac: Refer to stub-termcap.o instead of
+	windows-termcap.o.
+	* gdb_curses.h: Mention stub-termcap.c instead of
+	windows-termcap.c.
+
+2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile-c-symbols.c (convert_one_symbol, convert_symbol_bmsym)
+	(gcc_symbol_address): Call gnu_ifunc_resolve_addr.
+
+2015-02-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb/infcmd.c (print_return_value): use type_to_string to print type.
+
+2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* elfread.c (elf_read_minimal_symbols): Use bfd_alloc for
+	bfd_canonicalize_symtab.
+
+2015-02-25  John Baldwin  <jhb@FreeBSD.org>
+
+	* amd64fbsd-nat.c: Include sys/user.h.
+	(_initialize_amd64fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
+	instead of KERN_PS_STRINGS to locate the signal trampoline.
+	* i386fbsd-nat.c: Include sys/user.h.
+	(_initialize_i386fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
+	instead of KERN_PS_STRINGS to locate the signal trampoline.
+	* amd64fbsd-tdep.c (amd64fbsd_sigtramp_code): New.
+	(amd64fbsd_sigtramp_p): New.
+	(amd64fbsd_sigtramp_start_addr, amd64fbsd_sigtramp_end_addr): No
+	longer set default values.
+	(amd64fbsd_init_abi): Set "sigtramp_p" to "amd64fbsd_sigtramp_p".
+	* i386fbsd-tdep.c (i386fbsd_sigtramp_start)
+	(i386fbsd_sigtramp_middle, i386fbsd_sigtramp_end)
+	(i386fbsd_freebsd4_sigtramp_start)
+	(i386fbsd_freebsd4_sigtramp_middle)
+	(i386fbsd_freebsd4_sigtramp_end, i386fbsd_osigtramp_start)
+	(i386fbsd_osigtramp_middle, i386fbsd_osigtramp_end): New.
+	(i386fbsd_sigtramp_p): New.
+	(i386fbsd_sigtramp_start_addr, i386fbsd_sigtramp_end_addr): No
+	longer set default values.
+	(i386fbsd_init_abi): Set "sigtramp_p" to "i386fbsd_sigtramp_p".
+
+2015-02-25  John Baldwin  <jhb@freebsd.org>
+
+	* amd64fbsd-tdep.c (amd64fbsd_sigcontext_addr): Use
+	get_frame_register instead of frame_unwind_register_unsigned.
+
+2015-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR build/18033
+	* compile/compile-c-support.c (c_compute_program): Change // comment.
+	* compile/compile-object-load.c (setup_sections): Change // comment.
+
+2015-02-26  Joel Brobecker  <brobecker@adacore.com>
+
+	PR build/18033:
+	* iq2000-tdep.c (iq2000_frame_cache): Delete C++-style comment.
+
+2015-02-23  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (skip_to_semicolon): New function.
+	(remote_parse_stop_reply) <T stop reply>: Use it.  Don't
+	special case the stop reasons that look like hex numbers
+	upfront.  Instead handle real register numbers after matching
+	all the known stop reasons.
+
+2015-02-21  Doug Evans  <dje@google.com>
+
+	PR c++/17976, symtab/17821
+	* cp-namespace.c (cp_search_static_and_baseclasses): New parameter
+	is_in_anonymous.  All callers updated.
+	(find_symbol_in_baseclass): Ditto.
+	(cp_lookup_nested_symbol_1): Ditto.  Don't search all static blocks
+	for symbols in an anonymous namespace.
+	* dwarf2read.c (namespace_name): Don't call dwarf2_name, fetch
+	DW_AT_name directly.
+	(dwarf2_name): Convert missing namespace name to
+	CP_ANONYMOUS_NAMESPACE_STR.
+
+2015-02-20  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_handle_extended_wait): Call
+	thread_db_notice_clone whenever a new clone LWP is detected.
+	(linux_stop_and_wait_all_lwps, linux_unstop_all_lwps): New
+	functions.
+	* linux-nat.h (thread_db_attach_lwp): Delete declaration.
+	(thread_db_notice_clone, linux_stop_and_wait_all_lwps)
+	(linux_unstop_all_lwps): Declare.
+	* linux-thread-db.c (struct thread_get_info_inout): Delete.
+	(thread_get_info_callback): Delete.
+	(thread_from_lwp): Use td_thr_get_info and record_thread.
+	(thread_db_attach_lwp): Delete.
+	(thread_db_notice_clone): New function.
+	(try_thread_db_load_1): If /proc is mounted and shows the
+	process'es task list, walk over all LWPs and call thread_from_lwp
+	instead of relying on td_ta_thr_iter.
+	(attach_thread): Don't call check_thread_signals here.  Split the
+	tail part of the function (which adds the thread to the core GDB
+	thread list) to ...
+	(record_thread): ... this function.  Call check_thread_signals
+	here.
+	(thread_db_wait): Don't call thread_db_find_new_threads_1.  Always
+	call thread_from_lwp.
+	(thread_db_update_thread_list): Rename to ...
+	(thread_db_update_thread_list_org): ... this.
+	(thread_db_update_thread_list): New function.
+	(thread_db_find_thread_from_tid): Delete.
+	(thread_db_get_ada_task_ptid): Simplify.
+	* nat/linux-procfs.c: Include <sys/stat.h>.
+	(linux_proc_task_list_dir_exists): New function.
+	* nat/linux-procfs.h (linux_proc_task_list_dir_exists): Declare.
+
+2015-02-20  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (lin_lwp_attach_lwp): No longer special case the
+	main LWP.  Handle the case of waitpid returning 0 if we're already
+	attached to the LWP.  Don't set the LWP's last_resume_kind to
+	resume_stop if we already knew about the LWP.
+	(linux_nat_filter_event): Add debug logs.
+
+2015-02-20  Pedro Alves  <palves@redhat.com>
+
+	* target.h (forward_target_decr_pc_after_break): Delete
+	declaration.
+
+2015-02-20  Pedro Alves  <palves@redhat.com>
+
+	PR threads/18006
+	* linux-thread-db.c (thread_get_info_callback): Return early if
+	the thread's lwp id is -1.
+
+2015-02-20  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.9 released.
+
+2015-02-19  Steve Ellcey  <sellcey@imgtec.com>
+
+	* dtrace-probe.c (dtrace_process_dof_probe): Initialize arg.expr.
+	(dtrace_get_probes) Change type of variable 'dof'.
+
+2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	PR breakpoints/16812
+	* linux-nat.c (linux_nat_filter_event): Report SIGTRAP,SIGILL,SIGSEGV.
+	* nat/linux-ptrace.c (linux_wstatus_maybe_breakpoint): Add.
+	* nat/linux-ptrace.h: Add linux_wstatus_maybe_breakpoint.
+
+2015-02-19  David Taylor  <dtaylor@emc.com>
+
+	* common/ax.def (setv): Fix consumed entry in setv DEFOP.
+
+2015-02-18  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-io.c (tui_handle_resize_during_io): Remove this
+	function.
+	(tui_putc): Don't call tui_handle_resize_during_io.
+	(tui_getc): Likewise.
+	(tui_mld_getc): Likewise.
+	* tui/tui-win.c: Include event-loop.h and tui/tui-io.h.
+	(tui_sigwinch_token): New static variable.
+	(tui_initialize_win): Adjust documentation.  Set
+	tui_sigwinch_token.
+	(tui_async_resize_screen): New asynchronous callback.
+	(tui_sigwinch_handler): Adjust documentation.  Asynchronously
+	invoke tui_async_resize_screen.
+
+2015-02-18  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* configure: Regenerated.
+	* configure.ac: Use GDB_AC_TRANSFORM.
+	* Makefile.in (aclocal_m4_deps): Added transform.m4.
+	* acinclude.m4: sinclude transform.m4.
+	* transform.m4: New file.
+	(GDB_AC_TRANSFORM): New macro.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* NEWS: Announce the support for DTrace SDT probes.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* amd64-linux-tdep.c: Include "parser-defs.h" and "user-regs.h".
+	(amd64_dtrace_parse_probe_argument): New function.
+	(amd64_dtrace_probe_is_enabled): Likewise.
+	(amd64_dtrace_enable_probe): Likewise.
+	(amd64_dtrace_disable_probe): Likewise.
+	(amd64_linux_init_abi): Register the
+	`gdbarch_dtrace_probe_argument', `gdbarch_dtrace_enable_probe',
+	`gdbarch_dtrace_disable_probe' and
+	`gdbarch_dtrace_probe_is_enabled' hooks.
+	(amd64_dtrace_disabled_probe_sequence_1): New constant.
+	(amd64_dtrace_disabled_probe_sequence_2): Likewise.
+	(amd64_dtrace_enable_probe_sequence): Likewise.
+	(amd64_dtrace_disable_probe_sequence): Likewise.
+
+2015-01-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* breakpoint.c (BREAK_ARGS_HELP): Help string updated to mention
+	the -probe-dtrace new vpossible value for PROBE_MODIFIER.
+	* configure.ac (CONFIG_OBS): dtrace-probe.o added if BFD can
+	handle ELF files.
+	* Makefile.in (SFILES): dtrace-probe.c added.
+	* configure: Regenerate.
+	* dtrace-probe.c: New file.
+	(SHT_SUNW_dof): New constant.
+	(dtrace_probe_type): New enum.
+	(dtrace_probe_arg): New struct.
+	(dtrace_probe_arg_s): New typedef.
+	(struct dtrace_probe_enabler): New struct.
+	(dtrace_probe_enabler_s): New typedef.
+	(dtrace_probe): New struct.
+	(dtrace_probe_is_linespec): New function.
+	(dtrace_dof_sect_type): New enum.
+	(dtrace_dof_dofh_ident): Likewise.
+	(dtrace_dof_encoding): Likewise.
+	(DTRACE_DOF_ENCODE_LSB): Likewise.
+	(DTRACE_DOF_ENCODE_MSB): Likewise.
+	(dtrace_dof_hdr): New struct.
+	(dtrace_dof_sect): Likewise.
+	(dtrace_dof_provider): Likewise.
+	(dtrace_dof_probe): Likewise.
+	(DOF_UINT): New macro.
+	(DTRACE_DOF_PTR): Likewise.
+	(DTRACE_DOF_SECT): Likewise.
+	(dtrace_process_dof_probe): New function.
+	(dtrace_process_dof): Likewise.
+	(dtrace_build_arg_exprs): Likewise.
+	(dtrace_get_arg): Likewise.
+	(dtrace_get_probes): Likewise.
+	(dtrace_get_probe_argument_count): Likewise.
+	(dtrace_can_evaluate_probe_arguments): Likewise.
+	(dtrace_evaluate_probe_argument): Likewise.
+	(dtrace_compile_to_ax): Likewise.
+	(dtrace_probe_destroy): Likewise.
+	(dtrace_gen_info_probes_table_header): Likewise.
+	(dtrace_gen_info_probes_table_values): Likewise.
+	(dtrace_probe_is_enabled): Likewise.
+	(dtrace_probe_ops): New variable.
+	(info_probes_dtrace_command): New function.
+	(_initialize_dtrace_probe): Likewise.
+	(dtrace_type_name): Likewise.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* gdbarch.sh (dtrace_parse_probe_argument): New.
+	(dtrace_probe_is_enabled): Likewise.
+	(dtrace_enable_probe): Likewise.
+	(dtrace_disable_probe): Likewise.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* stap-probe.c (stap_probe_ops): Add NULLs in the static
+	stap_probe_ops for `enable_probe' and `disable_probe'.
+	* probe.c (enable_probes_command): New function.
+	(disable_probes_command): Likewise.
+	(_initialize_probe): Define the cli commands `enable probe' and
+	`disable probe'.
+	(parse_probe_linespec): New function.
+	(info_probes_for_ops): Use parse_probe_linespec.
+	* probe.h (probe_ops): New hooks `enable_probe' and
+	`disable_probe'.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* probe.c (compute_probe_arg): Moved from stap-probe.c
+	(compile_probe_arg): Likewise.
+	(probe_funcs): Likewise.
+	* stap-probe.c (compute_probe_arg): Moved to probe.c.
+	(compile_probe_arg): Likewise.
+	(probe_funcs): Likewise.
+
+2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* probe.c (print_ui_out_not_applicables): New function.
+	(exists_probe_with_pops): Likewise.
+	(info_probes_for_ops): Do not include column headers for probe
+	types for which no probe has been actually found on any object.
+	Also invoke `print_ui_out_not_applicables' in order to match the
+	column rows with the header when probes of several types are
+	listed.
+	Print the "Type" column.
+	* probe.h (probe_ops): Added a new probe operation `type_name'.
+	* stap-probe.c (stap_probe_ops): Add `stap_type_name'.
+	(stap_type_name): New function.
+
+2015-02-17  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-io.c (tui_getc): Don't call key_is_command_char.
+	(key_is_command_char): Delete.
+
+2015-02-17  Pedro Alves  <palves@redhat.com>
+
+	* tui/tui.c (tui_enable): Resize windows before anything
+	might show a window.
+
+2015-02-17  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+
+	PR gdb/17984
+	* aarch64-linux-nat.c: Don't include features/aarch64.c anymore.
+	(aarch64_linux_read_description): Remove initialize_tdesc_aarch64
+	call.
+	* aarch64-tdep.h (tdesc_aarch64): Declare.
+
+2015-02-12  Mark Wielaard  <mjw@redhat.com>
+
+	* contrib/ari/gdb_ari.sh: Remove checks for "true" and "false".
+
+2015-02-13  Doug Evans  <dje@google.com>
+
+	* cp-namespace.c (cp_basic_lookup_symbol): Rename parameter
+	anonymous_namespace to is_in_anonymous for consistency with the rest
+	of the file.
+	(cp_lookup_bare_symbol): Fix typo in comment.
+	(cp_search_static_and_baseclasses): Ditto.
+	(search_symbol_list): Use vertical space in comment better.
+	(reset_directive_searched): Ditto. Fix typo.
+	(cp_lookup_nested_symbol_1): Clarify contents of NESTED_NAME parameter.
+
+2015-02-13  Yao Qi  <yao.qi@arm.com>
+
+	* MAINTAINERS: Update my email address.
+
+2015-02-12  Doug Evans  <dje@google.com>
+
+	* symtab.c (completion_list_add_name): Fix memory leak.
+
+2015-02-12  Doug Evans  <dje@google.com>
+
+	* completer.c (complete_line): Remove incorrect comment.
+
+2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/py-framefilter.c (py_print_single_arg, enumerate_locals)
+	(py_print_frame): Use RETURN_MASK_ERROR.
+
+2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/py-framefilter.c (py_print_frame): Mention RETURN_QUIT in
+	function comment.  Wrap all function that can throw in cleanups.
+	(gdbpy_apply_frame_filter): Wrap all function that can throw in
+	cleanups.
+
+2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/py-framefilter.c (py_print_frame): Substitute goto error.
+	Remove the error label.
+
+2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/py-framefilter.c (py_print_frame): Put conditional code paths
+	with goto first, indent the former else codepath left.  Put variable
+	'elided' to a new inner block.
+
+2015-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/py-framefilter.c (py_print_frame): Whitespacing fixes.
+
+2015-02-11  Pedro Alves  <palves@redhat.com>
+
+	* xcoffread.c (within_function): Delete.
+
+2015-02-11  Tom Tromey  <tromey@redhat.com>
+	    Pedro Alves <palves@redhat.com>
+
+	* breakpoint.c (base_breakpoint_ops): Delete.
+	* dwarf2loc.c (dwarf_expr_ctx_funcs): Make extern.
+	* elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms): Make extern.
+	* guile/guile.c (guile_extension_script_ops, guile_extension_ops): Make extern.
+	* ppcnbsd-tdep.c (ppcnbsd2_sigtramp): Make extern.
+	* python/py-arch.c (arch_object_type): Make extern.
+	* python/py-block.c (block_syms_iterator_object_type): Make extern.
+	* python/py-bpevent.c (breakpoint_event_object_type): Make extern.
+	* python/py-cmd.c (cmdpy_object_type): Make extern.
+	* python/py-continueevent.c (continue_event_object_type)
+	* python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove 'qual'
+	parameter.  Update all callers.
+	* python/py-evtregistry.c (eventregistry_object_type): Make extern.
+	* python/py-exitedevent.c (exited_event_object_type): Make extern.
+	* python/py-finishbreakpoint.c (finish_breakpoint_object_type): Make extern.
+	* python/py-function.c (fnpy_object_type): Make extern.
+	* python/py-inferior.c (inferior_object_type, membuf_object_type): Make extern.
+	* python/py-infevents.c (call_pre_event_object_type)
+	(inferior_call_post_event_object_type).
+	(memory_changed_event_object_type): Make extern.
+	* python/py-infthread.c (thread_object_type): Make extern.
+	* python/py-lazy-string.c (lazy_string_object_type): Make extern.
+	* python/py-linetable.c (linetable_entry_object_type)
+	(linetable_object_type, ltpy_iterator_object_type): Make extern.
+	* python/py-newobjfileevent.c (new_objfile_event_object_type)
+	(clear_objfiles_event_object_type): Make extern.
+	* python/py-objfile.c (objfile_object_type): Make extern.
+	* python/py-param.c (parmpy_object_type): Make extern.
+	* python/py-progspace.c (pspace_object_type): Make extern.
+	* python/py-signalevent.c (signal_event_object_type): Make extern.
+	* python/py-symtab.c (symtab_object_type, sal_object_type): Make extern.
+	* python/py-type.c (type_object_type, field_object_type)
+	(type_iterator_object_type): Make extern.
+	* python/python.c (python_extension_script_ops)
+	(python_extension_ops): Make extern.
+	* stap-probe.c (stap_probe_ops): Make extern.
+
+2015-02-11  Pedro Alves  <pedro@codesourcery.com>
+
+	* infrun.c (adjust_pc_after_break): Don't adjust the PC just
+	because the event thread is not the current thread.
+
+2015-02-11  Doug Evans  <xdje42@gmail.com>
+
+	* gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't
+	been initialized yet, return NULL.
+
+2015-02-11  Doug Evans  <dje@google.com>
+
+	* symfile.h (new_symfile_objfile): Delete.
+	* symfile.c (finish_new_objfile): Renamed from new_symfile_objfile.
+	All callers updated.
+
+2015-02-11  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-io.c (tui_handle_resize_during_io): Call
+	tui_update_gdb_sizes() after resizing the screen.
+	* tui/tui.c (tui_enable): Resize the terminal before
+	calling tui_update_gdb_sizes().
+
+2015-02-11  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-io.c (tui_getc): Move cursor to the end of the command
+	line before printing a newline.
+
+2015-02-11  Mark Wielaard  <mjw@redhat.com>
+
+	* utils.c (producer_is_gcc): Return true or false.
+
+2015-02-10  Mark Wielaard  <mjw@redhat.com>
+
+	* utils.h (producer_is_gcc): Change return type to bool. Add major
+	argument.
+	* utils.c (producer_is_gcc): Likewise.
+	(producer_is_gcc_ge_4): Adjust producer_is_gcc call.
+	* dwarf2read.c (check_producer): Likewise.
+
+2015-02-10  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (displaced_step_fixup): Switch to the event thread
+	before calling gdbarch_displaced_step_fixup.
+
+2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
+
+	* MAINTAINERS (Write After Approval): Add Antoine Tremblay.
+
+2015-02-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ada-varobj.c (ada_name_of_child): Constify parent.
+	(ada_path_expr_of_child): Same.
+	(ada_value_of_child): Same.
+	(ada_type_of_child): Same.
+	* c-varobj.c (c_is_path_expr_parent): Same.
+	(c_describe_child): Same.
+	(c_name_of_child): Same.
+	(c_value_of_child): Same.
+	(c_type_of_child): Same.
+	(cplus_number_of_children): Same.
+	(cplus_describe_child): Constify var.
+	(cplus_name_of_child): Constify parent.
+	(cplus_value_of_child): Same.
+	(cplus_type_of_child): Same.
+	* jv-varobj.c (java_name_of_child): Same.
+	(java_value_of_child): Same.
+	(java_type_of_child): Same.
+	* varobj.c (value_of_child): Same.
+	(varobj_default_is_path_expr_parent): Constify var, parent and return
+	value.
+	(varobj_get_path_expr): Constify var, modify path_expr through
+	mutable_var.
+	(install_new_value): Constify parent.
+	(value_of_child): Constify parent.
+	* varobj.h (struct varobj): Constify parent.
+	(struct lang_varobj_ops): Constify name_of_child, value_of_child and
+	type_of_child.
+	(varobj_get_path_expr): Constify var.
+	(varobj_get_path_expr_parent): Constify var and return value.
+
+2015-02-10  Luis Machado  <lgustavo@codesourcery.com>
+
+	* arm-tdep.c (arm_prologue_unwind_stop_reason): New function.
+	(arm_prologue_this_id): Move PC and SP limit checks to
+	arm_prologue_unwind_stop_reason.
+	(arm_prologue_unwind) <stop_reason> : Set to
+	arm_prologue_unwind_stop_reason.
+
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2read.c (set_cu_language): Recognize DW_LANG_Fortran03 and
+	DW_LANG_Fortran08 as language_fortran.
+
+2015-02-09  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR remote/17946
+	* gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison
+	of pointer against char.
+
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
+	* c-typeprint.c (cp_type_print_method_args): Handle '_Atomic'.
+	(c_type_print_modifier): Likewise.
+	* dwarf2read.c (read_tag_atomic_type): New function.
+	(read_type_die_1): Handle DW_TAG_atomic_type.
+	* gdbtypes.c (make_atomic_type): New function.
+	(recursive_dump_type): Handle TYPE_ATOMIC.
+	* gdbtypes.h (enum type_flag_values): Renumber.
+	(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_ATOMIC.
+	(TYPE_ATOMIC): New macro.
+	(make_atomic_type): Declare.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_find_call): Skip gaps.
+	(ftrace_new_function): Initialize level.
+	(ftrace_new_call, ftrace_new_tailcall, ftrace_new_return)
+	(ftrace_new_switch): Update
+	level computation.
+	(ftrace_new_gap): New.
+	(ftrace_update_function): Create new function after gap.
+	(btrace_compute_ftrace_bts): Create gap on error.
+	(btrace_stitch_bts): Update parameters.  Clear trace if it
+	becomes empty.
+	(btrace_stitch_trace): Update parameters.  Update callers.
+	(btrace_clear): Reset the number of gaps.
+	(btrace_insn_get): Return NULL if the iterator points to a gap.
+	(btrace_insn_number): Return zero if the iterator points to a gap.
+	(btrace_insn_end): Allow gaps at the end.
+	(btrace_insn_next, btrace_insn_prev, btrace_insn_cmp): Handle gaps.
+	(btrace_find_insn_by_number): Assert that the found iterator does
+	not point to a gap.
+	(btrace_call_next, btrace_call_prev): Assert that the last function
+	is not a gap.
+	* btrace.h (btrace_bts_error): New.
+	(btrace_function): Update comment.
+	(btrace_function) <insn, insn_offset, number>: Update comment.
+	(btrace_function) <errcode>: New.
+	(btrace_thread_info) <ngaps>: New.
+	(btrace_thread_info) <replay>: Update comment.
+	(btrace_insn_get): Update comment.
+	* record-btrace.c (btrace_ui_out_decode_error): New.
+	(record_btrace_info): Print number of gaps.
+	(btrace_insn_history, btrace_call_history): Call
+	btrace_ui_out_decode_error for gaps.
+	(record_btrace_step_thread, record_btrace_start_replaying): Skip gaps.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* common/btrace-common.h (btrace_cpu_vendor, btrace_cpu): New.
+	* nat/linux-btrace.c: (btrace_this_cpu): New.
+	(cpu_supports_bts): Call btrace_this_cpu.
+	(intel_supports_bts): Add cpu parameter.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.h (btrace_insn_class): New.
+	(btrace_insn) <size, iclass>: New.
+	* btrace.c (ftrace_find_call): Update parameters.  Update users.
+	Use instruction classification.
+	(ftrace_new_return): Update parameters.  Update users.
+	(ftrace_update_function): Update parameters.  Update users.  Use
+	instruction classification.
+	(ftrace_update_insns): Update parameters.  Update users.
+	(ftrace_classify_insn): New.
+	(btrace_compute_ftrace_bts): Fill in new btrace_insn fields.  Add
+	TRY_CATCH around call to gdb_insn_length.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
+	Update parameters.  Update users.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (parse_xml_btrace_conf_bts): Add size.
+	(btrace_conf_bts_attributes): New.
+	(btrace_conf_children): Add attributes.
+	* common/btrace-common.h (btrace_config_bts): New.
+	(btrace_config)<bts>: New.
+	(btrace_config): Update comment.
+	* nat/linux-btrace.c (linux_enable_btrace, linux_enable_bts):
+	Use config.
+	* features/btrace-conf.dtd: Increment version.  Add size
+	attribute to bts element.
+	* record-btrace.c (set_record_btrace_bts_cmdlist,
+	show_record_btrace_bts_cmdlist): New.
+	(record_btrace_adjust_size, record_btrace_print_bts_conf,
+	record_btrace_print_conf, cmd_set_record_btrace_bts,
+	cmd_show_record_btrace_bts): New.
+	(record_btrace_info): Call record_btrace_print_conf.
+	(_initialize_record_btrace): Add commands.
+	* remote.c: Add PACKET_Qbtrace_conf_bts_size enum.
+	(remote_protocol_features): Add Qbtrace-conf:bts:size packet.
+	(btrace_sync_conf): Synchronize bts size.
+	(_initialize_remote): Add Qbtrace-conf:bts:size packet.
+	* NEWS: Announce new commands and new packets.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* Makefile.in (XMLFILES): Add btrace-conf.dtd.
+	* x86-linux-nat.c (x86_linux_enable_btrace): Update parameters.
+	(x86_linux_btrace_conf): New.
+	(x86_linux_create_target): Initialize to_btrace_conf.
+	* nat/linux-btrace.c (linux_enable_btrace): Update parameters.
+	Check format.  Split into this and ...
+	(linux_enable_bts): ... this.
+	(linux_btrace_conf): New.
+	(perf_event_skip_record): Renamed into ...
+	(perf_event_skip_bts_record): ... this.  Updated users.
+	(linux_disable_btrace): Split into this and ...
+	(linux_disable_bts): ... this.
+	(linux_read_btrace): Check format.
+	* nat/linux-btrace.h (linux_enable_btrace): Update parameters.
+	(linux_btrace_conf): New.
+	(btrace_target_info)<ptid>: Moved.
+	(btrace_target_info)<conf>: New.
+	(btrace_target_info): Split into this and ...
+	(btrace_tinfo_bts): ... this.  Updated users.
+	* btrace.c (btrace_enable): Update parameters.
+	(btrace_conf, parse_xml_btrace_conf_bts, parse_xml_btrace_conf)
+	(btrace_conf_children, btrace_conf_attributes)
+	(btrace_conf_elements): New.
+	* btrace.h (btrace_enable): Update parameters.
+	(btrace_conf, parse_xml_btrace_conf): New.
+	* common/btrace-common.h (btrace_config): New.
+	* feature/btrace-conf.dtd: New.
+	* record-btrace.c (record_btrace_conf): New.
+	(record_btrace_cmdlist): New.
+	(record_btrace_enable_warn, record_btrace_open): Pass
+	&record_btrace_conf.
+	(record_btrace_info): Print recording format.
+	(cmd_record_btrace_bts_start): New.
+	(cmd_record_btrace_start): Call cmd_record_btrace_bts_start.
+	(_initialize_record_btrace): Add "record btrace bts" subcommand.
+	Add "record bts" alias command.
+	* remote.c (remote_state)<btrace_config>: New.
+	(remote_btrace_reset, PACKET_qXfer_btrace_conf): New.
+	(remote_protocol_features): Add qXfer:btrace-conf:read.
+	(remote_open_1): Call remote_btrace_reset.
+	(remote_xfer_partial): Handle TARGET_OBJECT_BTRACE_CONF.
+	(btrace_target_info)<conf>: New.
+	(btrace_sync_conf, btrace_read_config): New.
+	(remote_enable_btrace): Update parameters.  Call btrace_sync_conf and
+	btrace_read_conf.
+	(remote_btrace_conf): New.
+	(init_remote_ops): Initialize to_btrace_conf.
+	(_initialize_remote): Add qXfer:btrace-conf packet.
+	* target.c (target_enable_btrace): Update parameters.
+	(target_btrace_conf): New.
+	* target.h (target_enable_btrace): Update parameters.
+	(target_btrace_conf): New.
+	(target_object)<TARGET_OBJECT_BTRACE_CONF>: New.
+	(target_ops)<to_enable_btrace>: Update parameters and comment.
+	(target_ops)<to_btrace_conf>: New.
+	* target-delegates: Regenerate.
+	* target-debug.h (target_debug_print_const_struct_btrace_config_p)
+	(target_debug_print_const_struct_btrace_target_info_p): New.
+	* NEWS: Announce new command and new packet.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.h (perf_event_buffer): New.
+	(btrace_target_info) <buffer, size, data_head>: Replace with ...
+	<bts>: ... this.
+	* nat/linux-btrace.c (perf_event_header, perf_event_mmap_size)
+	(perf_event_buffer_size, perf_event_buffer_begin)
+	(perf_event_buffer_end, linux_btrace_has_changed): Removed.
+	Updated users.
+	(perf_event_new_data): New.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_enable): Pass BTRACE_FORMAT_BTS.
+	* record-btrace.c (record_btrace_open): Remove call to
+	target_supports_btrace.
+	* remote.c (remote_supports_btrace): Update parameters.
+	* target.c (target_supports_btrace): Update parameters.
+	* target.h (to_supports_btrace, target_supports_btrace): Update
+	parameters.
+	* target-delegates.c: Regenerate.
+	* target-debug.h (target_debug_print_enum_btrace_format): New.
+	* nat/linux-btrace.c
+	(kernel_supports_btrace): Rename into ...
+	(kernel_supports_bts): ... this.  Update users.  Update warning text.
+	(intel_supports_btrace): Rename into ...
+	(intel_supports_bts): ... this.  Update users.
+	(cpu_supports_btrace): Rename into ...
+	(cpu_supports_bts): ... this.  Update users.
+	(linux_supports_btrace): Update parameters.  Split into this and ...
+	(linux_supports_bts): ... this.
+	* nat/linux-btrace.h (linux_supports_btrace): Update parameters.
+
+2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* Makefile.in (SFILES): Add common/btrace-common.c.
+	(COMMON_OBS): Add common/btrace-common.o.
+	(btrace-common.o): Add build rules.
+	* btrace.c (parse_xml_btrace): Update parameters.
+	(parse_xml_btrace_block): Set format field.
+	(btrace_add_pc, btrace_fetch): Use struct btrace_data.
+	(do_btrace_data_cleanup, make_cleanup_btrace_data): New.
+	(btrace_compute_ftrace): Split into this and...
+	(btrace_compute_ftrace_bts): ...this.
+	(btrace_stitch_trace): Split into this and...
+	(btrace_stitch_bts): ...this.
+	* btrace.h (parse_xml_btrace): Update parameters.
+	(make_cleanup_btrace_data): New.
+	* common/btrace-common.c: New.
+	* common/btrace-common.h: Include common-defs.h.
+	(btrace_block_s): Update comment.
+	(btrace_format): New.
+	(btrace_format_string): New.
+	(btrace_data_bts): New.
+	(btrace_data): New.
+	(btrace_data_init, btrace_data_fini, btrace_data_empty): New.
+	* remote.c (remote_read_btrace): Update parameters.
+	* target.c (target_read_btrace): Update parameters.
+	* target.h (target_read_btrace): Update parameters.
+	(target_ops)<to_read_btrace>: Update parameters.
+	* x86-linux-nat.c (x86_linux_read_btrace): Update parameters.
+	* target-delegates.c: Regenerate.
+	* target-debug (target_debug_print_struct_btrace_data_p): New.
+	* nat/linux-btrace.c (linux_read_btrace): Split into this and...
+	(linux_read_bts): ...this.
+	* nat/linux-btrace.h (linux_read_btrace): Update parameters.
+
+2015-02-06  Doug Evans  <dje@google.com>
+
+	* remote-m32r-sdi.c: Include symfile.h.
+
+2015-02-06  Doug Evans  <dje@google.com>
+
+	* symtab.h (clear_symtab_users, deduce_language_from_filename): Move
+	* symfile.h (clear_symtab_users, deduce_language_from_filename): ...
+	to here.
+
+2015-02-06  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (find_new_threads_callback): Add debug output.
+
+2015-02-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/15678
+	* breakpoint.c (map_breakpoint_numbers): Check for empty args string.
+	(enable_count_command): Check args for NULL value.
+
+2015-02-05  Doug Evans  <xdje42@gmail.com>
+
+	* guile/scm-frame.c: Fix spelling errors in a comment.
+
+2015-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* python/python-internal.h (Py_hash_t): Define it for Python <3.2.
+	* python/py-value.c (valpy_fetch_lazy): Use it.  Remove cast to the
+	return type.
+
+2015-02-04  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (handle_extended_wait): Don't resume LWPs here.
+	(wait_lwp): Don't call wait_lwp if linux_handle_extended_wait
+	returns true.
+	(resume_stopped_resumed_lwps): Don't check whether the thread is
+	marked as executing.
+	(linux_nat_wait_1): Use resume_stopped_resumed_lwps.
+
+2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* regset.h (struct regset): Add flags field.
+	(REGSET_VARIABLE_SIZE): New value for a regset's flags field.
+	* corelow.c (get_core_register_section): Add warning if the size
+	exceeds the requested size and the regset does not have the
+	REGSET_VARIABLE_SIZE flag set.
+	* alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
+	flag.
+	* armbsd-tdep.c (armbsd_gregset): Likewise.
+	* hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
+	* hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
+	* m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
+	* mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
+
+2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections):
+	For ".reg-xstate", explicitly specify the requested section size
+	via X86_XSTATE_SIZE instead of just 0 on input and
+	X86_XSTATE_MAX_SIZE on output.
+	* i386-linux-tdep.c (i386_linux_iterate_over_regset_sections):
+	Likewise.
+
+2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	PR corefiles/17808:
+	* gdbarch.sh (iterate_over_regset_sections_cb): Document this
+	function type, particularly its SIZE parameter.
+	* gdbarch.h: Regenerate.
+	* amd64-tdep.c (amd64_supply_fpregset): In gdb_assert, compare
+	actual against required size using ">=" instead of "==".
+	(amd64_collect_fpregset): Likewise.
+	* i386-tdep.c (i386_supply_gregset): Likewise.
+	(i386_collect_gregset): Likewise.
+	(i386_supply_fpregset): Likewise.
+	(i386_collect_fpregset): Likewise.
+	* mips-linux-tdep.c (mips_supply_gregset_wrapper): Likewise.
+	(mips_fill_gregset_wrapper): Likewise.
+	(mips_supply_fpregset_wrapper): Likewise.
+	(mips_fill_fpregset_wrapper): Likewise.
+	(mips64_supply_gregset_wrapper): Likewise.
+	(mips64_fill_gregset_wrapper): Likewise.
+	(mips64_supply_fpregset_wrapper): Likewise.
+	(mips64_fill_fpregset_wrapper): Likewise.
+	* mn10300-linux-tdep.c (am33_supply_gregset_method): Likewise.
+	(am33_supply_fpregset_method): Likewise.
+	(am33_collect_gregset_method): Likewise.
+	(am33_collect_fpregset_method): Likewise.
+
+2015-02-04  Doug Evans  <dje@google.com>
+	    Pedro Alves  <palves@redhat.com>
+	    Eli Zaretskii  <eliz@gnu.org>
+
+	PR tui/17810
+	* tui/tui-command.c (tui_refresh_cmd_win): New function.
+	* tui/tui-command.c (tui_refresh_cmd_win): Declare.
+	* tui/tui-file.c: #include tui/tui-command.h.
+	(tui_file_fputs): Refresh command window if stream is not gdb_stdout.
+	(tui_file_flush): Refresh command window if stream is gdb_stdout.
+	* tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush.
+
+2015-02-04  Pedro Alves  <palves@redhat.com>
+
+	Fix build breakage.
+	* event-loop.c (gdb_do_one_event): Add default switch case.
+
+2015-02-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Filter out inferior gcc option -fpreprocessed.
+	* compile/compile.c (filter_args): New function.
+	(get_args): Use it.
+
+2015-02-03  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c: Don't declare nor define a queue type for
+	gdb_event_p.
+	(event_queue): Delete.
+	(create_event, create_file_event, gdb_event_xfree)
+	(initialize_event_loop, process_event): Delete.
+	(gdb_do_one_event): Return as soon as one event is handled.
+	(handle_file_event): Change prototype.  Used the passed in
+	file_handler pointer and ready_mask instead of looping over all
+	file handlers.
+	(gdb_wait_for_event): Update the poll/select timeouts before
+	blocking.  Run event handlers directly instead of queueing events.
+	Return as soon as one event is handled.
+	(struct async_event_handler_data): Delete.
+	(invoke_async_event_handler): Delete.
+	(check_async_event_handlers): Change return type to int.  Run
+	event handlers directly instead of queueing events.  Return as
+	soon as one event is handled.
+	(handle_timer_event): Delete.
+	(update_wait_timeout): New function, factored out from
+	poll_timers.
+	(poll_timers): Reimplement.
+	* event-loop.h (initialize_event_loop): Delete declaration.
+	* top.c (gdb_init): Don't call initialize_event_loop.
+
+2015-02-03  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c (clear_async_event_handler): New function.
+	* event-loop.h (clear_async_event_handler): New declaration.
+	* record-btrace.c (record_btrace_async): New function.
+	(init_record_btrace_ops): Install record_btrace_async.
+	* record-full.c (record_full_async): New function.
+	(record_full_resume): Don't mark the async event source here.
+	(init_record_full_ops): Install record_full_async.
+	(record_full_core_resume): Don't mark the async event source here.
+	(init_record_full_core_ops): Install record_full_async.
+	* remote.c (remote_async): Mark and clear the async stop reply
+	queue event-loop token as appropriate.
+
+2015-02-03  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use
+	target_is_async_p instead of target_can_async.
+	(linux_nat_wait): Use target_is_async_p instead of
+	target_can_async.  Don't enable async here.
+	* remote.c (interrupt_query, remote_wait, putpkt_binary): Use
+	target_is_async_p instead of target_can_async.
+
+2015-02-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* varobj.h (lang_varobj_ops): Mention which return values need
+	to be freed.
+
+2015-02-02  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2loc.c (dwarf2_evaluate_property): Add i18n marker.
+
+2015-02-02  Joel Brobecker  <brobecker@adacore.com>
+
+	PR gdb/17856:
+	* ada-lang.c (ada_lookup_symbol_list_worker): Do not re-cache
+	results found in the cache.
+
+2015-02-02  Joel Brobecker  <brobecker@adacore.com>
+
+	PR gdb/17854:
+	* ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache
+	when allocating a new one.
+
+2015-02-01  Tom Tromey  <tom@tromey.com>
+
+	* MAINTAINERS: Remove myself.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* dwarf2read.c (process_structure_scope): Update setting of
+	TYPE_VPTR_BASETYPE, TYPE_VPTR_FIELDNO.
+	* gdbtypes.c (internal_type_vptr_fieldno): New function.
+	(set_type_vptr_fieldno): New function.
+	(internal_type_vptr_basetype): New function.
+	(set_type_vptr_basetype): New function.
+	(get_vptr_fieldno): Update setting of TYPE_VPTR_FIELDNO,
+	TYPE_VPTR_BASETYPE.
+	(allocate_cplus_struct_type): Initialize vptr_fieldno.
+	(recursive_dump_type): Printing of vptr_fieldno, vptr_basetype ...
+	(print_cplus_stuff): ... moved here.
+	(copy_type_recursive): Don't copy TYPE_VPTR_BASETYPE.
+	* gdbtypes.h (struct main_type): Members vptr_fieldno, vptr_basetype
+	moved to ...
+	(struct cplus_struct_type): ... here.  All uses updated.
+	(TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE): Rewrite.
+	(internal_type_vptr_fieldno, set_type_vptr_fieldno): Declare.
+	(internal_type_vptr_basetype, set_type_vptr_basetype): Declare.
+	* stabsread.c (read_tilde_fields): Update setting of
+	TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* cp-valprint.c (cp_find_class_member): Rename parameter domain_p
+	to self_p.
+	(cp_print_class_member): Rename local domain to self_type.
+	* dwarf2read.c (quirk_gcc_member_function_pointer): Rename local
+	domain_type to self_type.
+	(set_die_type) <need_gnat_info>: Handle
+	TYPE_CODE_METHODPTR, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD.
+	* gdb-gdb.py (StructMainTypePrettyPrinter): Handle
+	TYPE_SPECIFIC_SELF_TYPE.
+	* gdbtypes.c (internal_type_self_type): New function.
+	(set_type_self_type): New function.
+	(smash_to_memberptr_type): Rename parameter domain to self_type.
+	Update setting of TYPE_SELF_TYPE.
+	(smash_to_methodptr_type): Update setting of TYPE_SELF_TYPE.
+	(smash_to_method_type): Rename parameter domain to self_type.
+	Update setting of TYPE_SELF_TYPE.
+	(check_stub_method): Call smash_to_method_type.
+	(recursive_dump_type): Handle TYPE_SPECIFIC_SELF_TYPE.
+	(copy_type_recursive): Ditto.
+	* gdbtypes.h (enum type_specific_kind): New value
+	TYPE_SPECIFIC_SELF_TYPE.
+	(struct main_type) <type_specific>: New member self_type.
+	(struct cplus_struct_type) <fn_field.type>: Update comment.
+	(TYPE_SELF_TYPE): Rewrite.
+	(internal_type_self_type, set_type_self_type): Declare.
+	* gnu-v3-abi.c (gnuv3_print_method_ptr): Rename local domain to
+	self_type.
+	(gnuv3_method_ptr_to_value): Rename local domain_type to self_type.
+	* m2-typeprint.c (m2_range): Replace TYPE_SELF_TYPE with
+	TYPE_TARGET_TYPE.
+	* stabsread.c (read_member_functions): Mark methods with
+	TYPE_CODE_METHOD, not TYPE_CODE_FUNC.  Update setting of
+	TYPE_SELF_TYPE.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
+	All uses updated.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs
+	or unions.  Return zero if union.
+	(gnuv3_get_vtable): Call check_typedef.  Assert only passed structs.
+	(gnuv3_rtti_type): Pass already-check_typedef'd value to
+	gnuv3_get_vtable.
+	(compute_vtable_size): Assert only passed structs.
+	(gnuv3_print_vtable): Don't call gnuv3_get_vtable for non-structs.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD
+	kinds.
+
+2015-01-31  Gary Benson <gbenson@redhat.com>
+	    Doug Evans  <dje@google.com>
+
+	PR cli/9007
+	PR cli/11920
+	PR cli/15548
+	* cli/cli-cmds.c (complete_command): Notify user if max-completions
+	reached.
+	* common/common-exceptions.h (enum errors)
+	<MAX_COMPLETIONS_REACHED_ERROR>: New value.
+	* completer.h (get_max_completions_reached_message): New declaration.
+	(max_completions): Likewise.
+	(completion_tracker_t): New typedef.
+	(new_completion_tracker): New declaration.
+	(make_cleanup_free_completion_tracker): Likewise.
+	(maybe_add_completion_enum): New enum.
+	(maybe_add_completion): New declaration.
+	(throw_max_completions_reached_error): Likewise.
+	* completer.c (max_completions): New global variable.
+	(new_completion_tracker): New function.
+	(free_completion_tracker): Likewise.
+	(make_cleanup_free_completion_tracker): Likewise.
+	(maybe_add_completions): Likewise.
+	(throw_max_completions_reached_error): Likewise.
+	(complete_line): Remove duplicates and limit result to max_completions
+	entries.
+	(get_max_completions_reached_message): New function.
+	(gdb_display_match_list): Handle max_completions.
+	(_initialize_completer): New declaration and function.
+	* symtab.c: Include completer.h.
+	(completion_tracker): New static variable.
+	(completion_list_add_name): Call maybe_add_completion.
+	(default_make_symbol_completion_list_break_on_1): Renamed from
+	default_make_symbol_completion_list_break_on.  Maintain
+	completion_tracker across calls to completion_list_add_name.
+	(default_make_symbol_completion_list_break_on): New function.
+	* top.c (init_main): Set rl_completion_display_matches_hook.
+	* tui/tui-io.c: Include completer.h.
+	(tui_old_rl_display_matches_hook): New static global.
+	(tui_rl_display_match_list): Notify user if max-completions reached.
+	(tui_setup_io): Save/restore rl_completion_display_matches_hook.
+	* NEWS (New Options): Mention set/show max-completions.
+
+2015-01-31  Gary Benson  <gbenson@redhat.com>
+
+	* symtab.c (struct add_name_data) <code>: New field.
+	Updated comments.
+	(add_symtab_completions): New function.
+	(symtab_expansion_callback): Likewise.
+	(default_make_symbol_completion_list_break_on): Set datum.code.
+	Move minimal symbol scan before calling expand_symtabs_matching.
+	Scan known primary symtabs for externs and statics before calling
+	expand_symtabs_matching.  Pass symtab_expansion_callback as
+	expansion_notify argument to expand_symtabs_matching.  Do not scan
+	primary symtabs for externs and statics after calling
+	expand_symtabs_matching.
+
+2015-01-31  Gary Benson  <gbenson@redhat.com>
+
+	* symfile.h (expand_symtabs_exp_notify_ftype): New typedef.
+	(struct quick_symbol_functions) <expand_symtabs_matching>:
+	New argument expansion_notify.  All uses updated.
+	(expand_symtabs_matching): New argument expansion_notify.
+	All uses updated.
+	* symfile-debug.c (debug_qf_expand_symtabs_matching):
+	Also print expansion notify.
+	* symtab.c (expand_symtabs_matching_via_partial): Call
+	expansion_notify whenever a partial symbol table is expanded.
+	* dwarf2read.c (dw2_expand_symtabs_matching): Call
+	expansion_notify whenever a symbol table is instantiated.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* cli-out.c: #include completer.h, readline/readline.h.
+	(cli_mld_crlf, cli_mld_putch, cli_mld_puts): New functions.
+	(cli_mld_flush, cld_mld_erase_entire_line): Ditto.
+	(cli_mld_beep, cli_mld_read_key, cli_display_match_list): Ditto.
+	* cli-out.h (cli_display_match_list): Declare.
+	* completer.c (MB_INVALIDCH, MB_NULLWCH): New macros.
+	(ELLIPSIS_LEN): Ditto.
+	(gdb_get_y_or_n, gdb_display_match_list_pager): New functions.
+	(gdb_path_isdir, gdb_printable_part, gdb_fnwidth): Ditto.
+	(gdb_fnprint, gdb_print_filename): Ditto.
+	(gdb_complete_get_screenwidth, gdb_display_match_list_1): Ditto.
+	(gdb_display_match_list): Ditto.
+	* completer.h (mld_crlf_ftype, mld_putch_ftype): New typedefs.
+	(mld_puts_ftype, mld_flush_ftype, mld_erase_entire_line_ftype): Ditto.
+	(mld_beep_ftype, mld_read_key_ftype): Ditto.
+	(match_list_displayer): New struct.
+	(gdb_display_match_list): Declare.
+	* top.c (init_main): Set rl_completion_display_matches_hook.
+	* tui/tui-io.c: #include completer.h.
+	(printable_part, PUTX, print_filename, get_y_or_n): Delete.
+	(tui_mld_crlf, tui_mld_putch, tui_mld_puts): New functions.
+	(tui_mld_flush, tui_mld_erase_entire_line, tui_mld_beep): Ditto.
+	(tui_mld_getc, tui_mld_read_key): Ditto.
+	(tui_rl_display_match_list): Rewrite.
+	(tui_handle_resize_during_io): New arg for_completion.  All callers
+	updated.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	Add symbol lookup cache.
+	* NEWS: Document new options and commands.
+	* symtab.c (symbol_cache_key): New static global.
+	(DEFAULT_SYMBOL_CACHE_SIZE, MAX_SYMBOL_CACHE_SIZE): New macros.
+	(SYMBOL_LOOKUP_FAILED): New macro.
+	(symbol_cache_slot_state): New enum.
+	(block_symbol_cache): New struct.
+	(symbol_cache): New struct.
+	(new_symbol_cache_size, symbol_cache_size): New static globals.
+	(hash_symbol_entry, eq_symbol_entry): New functions.
+	(symbol_cache_byte_size, resize_symbol_cache): New functions.
+	(make_symbol_cache, free_symbol_cache): New functions.
+	(get_symbol_cache, symbol_cache_cleanup): New function.
+	(set_symbol_cache_size, set_symbol_cache_size_handler): New functions.
+	(symbol_cache_lookup, symbol_cache_clear_slot): New function.
+	(symbol_cache_mark_found, symbol_cache_mark_not_found): New functions.
+	(symbol_cache_flush, symbol_cache_dump): New functions.
+	(maintenance_print_symbol_cache): New function.
+	(maintenance_flush_symbol_cache): New function.
+	(symbol_cache_stats): New function.
+	(maintenance_print_symbol_cache_statistics): New function.
+	(symtab_new_objfile_observer): New function.
+	(symtab_free_objfile_observer): New function.
+	(lookup_static_symbol, lookup_global_symbol): Use symbol cache.
+	(_initialize_symtab): Init symbol_cache_key.  New parameter
+	maint symbol-cache-size.  New maint commands print symbol-cache,
+	print symbol-cache-statistics, flush-symbol-cache.
+	Install new_objfile, free_objfile observers.
+
+2015-01-31  Joel Brobecker  <brobecker@adacore.com>
+
+	PR symtab/17855
+	* symfile.c (clear_symtab_users): Move call to breakpoint_re_set
+	to end.
+
+2015-01-31  Doug Evans  <xdje42@gmail.com>
+
+	* NEWS: Mention inlined scripts in .debug_gdb_scripts section.
+	* auto-load.c: #include ctype.h.
+	(struct auto_load_pspace_info): Replace member loaded_scripts with
+	new members loaded_script_files, loaded_script_texts.
+	(auto_load_pspace_data_cleanup): Update.
+	(init_loaded_scripts_info): Update.
+	(get_auto_load_pspace_data_for_loading): Update.
+	(maybe_add_script_file): Renamed from maybe_add_script.  All callers
+	updated.
+	(maybe_add_script_text): New function.
+	(clear_section_scripts): Update.
+	(source_script_file, execute_script_contents): New functions.
+	(source_section_scripts): Add support for
+	SECTION_SCRIPT_ID_PYTHON_TEXT, SECTION_SCRIPT_ID_GUILE_TEXT.
+	(print_scripts): New function.
+	(auto_load_info_scripts): Also print inlined scripts.
+	(maybe_print_unsupported_script_warning): Renamed from
+	unsupported_script_warning_print.  All callers updated.
+	(maybe_print_script_not_found_warning): Renamed from
+	script_not_found_warning_print.  All callers updated.
+	* extension-priv.h (struct extension_language_script_ops): New member
+	objfile_script_executor.
+	* extension.c (ext_lang_objfile_script_executor): New function.
+	* extension.h (objfile_script_executor_func): New typedef.
+	(ext_lang_objfile_script_executor): Declare.
+	* guile/guile-internal.h (gdbscm_execute_objfile_script): Declare.
+	* guile/guile.c (guile_extension_script_ops): Update.
+	* guile/scm-objfile.c (gdbscm_execute_objfile_script): New function.
+	* python/python.c (python_extension_script_ops): Update.
+	(gdbpy_execute_objfile_script): New function.
+
+2015-01-31  Eli Zaretskii  <eliz@gnu.org>
+
+	* tui/tui-io.c (tui_expand_tabs): New function.
+	(tui_puts, tui_redisplay_readline): Expand TABs into the
+	appropriate number of spaces.
+	* tui/tui-regs.c: Include tui-io.h.
+	(tui_register_format): Call tui_expand_tabs to expand TABs into
+	the appropriate number of spaces.
+	* tui/tui-io.h: Add prototype for tui_expand_tabs.
+
+2015-01-30  Doug Evans  <dje@google.com>
+
+	* NEWS: "info source" command now display producer string if present.
+	* source.c (source_info): Print producer string if present.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* varobj.c (varobj_delete): Fix comment.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* varobj.c (create_child): Modify comment.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ada-varobj.c (ada_number_of_children): Constify struct varobj *
+	parameter.
+	(ada_name_of_variable): Same.
+	(ada_path_expr_of_child): Same.
+	(ada_value_of_variable): Same.
+	(ada_value_is_changeable_p): Same.
+	(ada_value_has_mutated): Same.
+	* c-varobj.c (varobj_is_anonymous_child): Same.
+	(c_is_path_expr_parent): Same.
+	(c_number_of_children): Same.
+	(c_name_of_variable): Same.
+	(c_path_expr_of_child): Same.
+	(get_type): Same.
+	(c_value_of_variable): Same.
+	(cplus_number_of_children): Same.
+	(cplus_name_of_variable): Same.
+	(cplus_path_expr_of_child): Same.
+	(cplus_value_of_variable): Same.
+	* jv-varobj.c (java_number_of_children): Same.
+	(java_name_of_variable): Same.
+	(java_path_expr_of_child): Same.
+	(java_value_of_variable): Same.
+	* varobj.c (number_of_children): Same.
+	(name_of_variable): Same.
+	(is_root_p): Same.
+	(varobj_ensure_python_env): Same.
+	(varobj_get_objname): Same.
+	(varobj_get_expression): Same.
+	(varobj_get_display_format): Same.
+	(varobj_get_display_hint): Same.
+	(varobj_has_more): Same.
+	(varobj_get_thread_id): Same.
+	(varobj_get_frozen): Same.
+	(dynamic_varobj_has_child_method): Same.
+	(varobj_get_gdb_type): Same.
+	(is_path_expr_parent): Same.
+	(varobj_default_is_path_expr_parent): Same.
+	(varobj_get_language): Same.
+	(varobj_get_attributes): Same.
+	(varobj_is_dynamic_p): Same.
+	(varobj_get_child_range): Same.
+	(varobj_value_has_mutated): Same.
+	(varobj_get_value_type): Same.
+	(number_of_children): Same.
+	(name_of_variable): Same.
+	(check_scope): Same.
+	(varobj_editable_p): Same.
+	(varobj_value_is_changeable_p): Same.
+	(varobj_floating_p): Same.
+	(varobj_default_value_is_changeable_p): Same.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* varobj.c (varobj_get_path_expr): Set var->path_expr.
+	* c-varobj.c (c_path_expr_of_child): Set local var instead of
+	child->path_expr.
+	(cplus_path_expr_of_child): Same.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi-cmd-var.c (print_varobj): Free varobj_get_expression
+	result.
+	(mi_cmd_var_info_expression): Same.
+	* varobj.c (varobj_get_expression): Mention in the comment that
+	the result must by freed by the caller.
+
+2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-cmd-var.c (mi_cmd_var_info_type): Free result of
+	varobj_get_type.
+	(varobj_update_one): Same.
+	* varobj.c (update_type_if_necessary): Free curr_type_str and
+	new_type_str.
+	(varobj_get_type): Specify in comment that the result needs to be
+	freed by the caller.
+
+2015-01-29  Doug Evans  <dje@google.com>
+
+	PR symtab/17890
+	* dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
+
+2015-01-25  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2read.c (checkproducer): Call producer_is_gcc.
+	* utils.c (producer_is_gcc_ge_4): Likewise.
+	(producer_is_gcc): New function.
+	* utils.h (producer_is_gcc): New declaration.
+
+2015-01-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.h (struct dynamic_prop): New PROP_ADDR_OFFSET enum
+	kind.
+	* gdbtypes.c (resolve_dynamic_type_internal): Replace "addr"
+	parameter by "addr_stack" parameter.
+	(resolve_dynamic_range): Replace "addr" parameter by
+	"stack_addr" parameter.  Update function documentation.
+	Update code accordingly.
+	(resolve_dynamic_array, resolve_dynamic_union)
+	(resolve_dynamic_struct, resolve_dynamic_type_internal): Likewise.
+	(resolve_dynamic_type): Update code, following the changes made
+	to resolve_dynamic_type_internal's interface.
+	* dwarf2loc.h (struct property_addr_info): New.
+	(dwarf2_evaluate_property): Replace "address" parameter
+	by "addr_stack" parameter.  Adjust function documentation.
+	(struct dwarf2_offset_baton): New.
+	(struct dwarf2_property_baton): Update documentation of
+	field "referenced_type" to be more general. New field
+	"offset_info" in union data field.
+	* dwarf2loc.c (dwarf2_evaluate_property): Replace "address"
+	parameter by "addr_stack" parameter.  Adjust code accordingly.
+	Add support for PROP_ADDR_OFFSET properties.
+	* dwarf2read.c (attr_to_dynamic_prop): Add support for
+	DW_AT_data_member_location attributes as well.  Use case
+	statements instead of if/else condition.
+
+2015-01-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-varobj.c (ada_varobj_get_array_number_of_children):
+	Return zero if PARENT_VALUE is NULL and parent_type's
+	range type is dynamic.
+
+2015-01-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbtypes.c (is_dynamic_type_internal) <TYPE_CODE_RANGE>: Return
+	nonzero if the type's subtype is dynamic.
+	(resolve_dynamic_range): Also resolve the range's subtype.
+
+2015-01-29  Alexander Klimov  <alserkli@inbox.ru>  (tiny patch)
+
+	Pushed by Joel Brobecker  <brobecker@adacore.com>.
+	* symfile.c (unmap_overlay_command): Initialize sec to NULL.
+
+2015-01-27  Doug Evans  <dje@google.com>
+
+	* NEWS: Mention gdb.Objfile.username.
+	* python/py-objfile.c (objfpy_get_username): New function.
+	(objfile_getset): Add "username".
+
+2015-01-24  Mark Wielaard  <mjw@redhat.com>
+
+	* stack.c (return_command): Markup warning message with _.
+
+2015-01-24  Doug Evans  <xdje42@gmail.com>
+
+	* gdbtypes.h (TYPE_TYPE_SPECIFIC): Delete.
+
+2015-01-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix 100x slowdown regression on DWZ files.
+	* dwarf2read.c (struct dwarf2_per_objfile): Add line_header_hash.
+	(struct line_header): Add offset and offset_in_dwz.
+	(dwarf_decode_lines): Add parameter decode_mapping to the declaration.
+	(free_line_header_voidp): New declaration.
+	(line_header_hash, line_header_hash_voidp, line_header_eq_voidp): New
+	functions.
+	(dwarf2_build_include_psymtabs): Update dwarf_decode_lines caller.
+	(handle_DW_AT_stmt_list): Use line_header_hash.
+	(free_line_header_voidp): New function.
+	(dwarf_decode_line_header): Initialize offset and offset_in_dwz.
+	(dwarf_decode_lines): New parameter decode_mapping, use it.
+	(dwarf2_free_objfile): Free line_header_hash.
+
+2015-01-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/17416
+	* valops.c (value_rtti_indirect_type): Catch exception thrown by
+	value_ind.
+
+2015-01-15  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2read.c (read_subroutine_type): Set TYPE_NO_RETURN from
+	DW_AT_noreturn.
+	* gdbtypes.h (struct func_type): Add is_noreturn field flag. Make
+	calling_convention an 8 bit bit field.
+	(TYPE_NO_RETURN): New macro.
+	* infcmd.c (finish_command): Query if function does not return
+	normally.
+	* stack.c (return_command): Likewise.
+
+2015-01-23  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_is_async_p): New macro.
+	(linux_nat_is_async_p):
+	(linux_nat_terminal_inferior): Check whether the target can async
+	instead of whether it is already async.
+	(linux_nat_terminal_ours): Don't check whether the target is
+	async.
+	(linux_async_pipe): Use linux_is_async_p.
+
+2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* NEWS (Changes since GDB 7.9): Add 'thread apply all' option
+	'-ascending'.
+	* thread.c (tp_array_compar_ascending, tp_array_compar): New.
+	(thread_apply_all_command): Parse CMD for tp_array_compar_ascending.
+	Sort tp_array using tp_array_compar.
+	(_initialize_thread): Extend thread_apply_all_command help.
+
+2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* corelow.c (core_open): Call also thread_command.
+	* gdbthread.h (thread_command): New prototype moved from ...
+	* thread.c (thread_command): ... here.
+	(thread_command): Make it global.
+
+2015-01-22  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac [*mingw32*]: Check $curses_found instead of
+	$prefer_curses.
+	* configure: Regenerate.
+	* windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
+	HAVE_NCURSES_NCURSES_H checks.
+
+2015-01-22  Eli Zaretskii  <eliz@gnu.org>
+
+	* tui/tui.c (tui_enable) [__MINGW32__]: If the call to 'newterm'
+	fails with the 1st arg NULL, try again with "unknown".  Don't test
+	the "cup" capability: it isn't supported by the Windows port of
+	ncurses, but the Windows console driver is still capable of
+	supporting TUI.
+
+2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
+
+2015-01-22  Eli Zaretskii  <eliz@gnu.org>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
+	(ALLDEPFILES): Remove irix5-nat.c.  These two are part of the
+	reason that "make TAGS" is broken.
+
+2015-01-22  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+	* hppa-tdep.c (inst_saves_gr): Fix logical working flow issues
+	and check additional store instructions.
+
+2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
+
+	* MAINTAINERS (Write After Approval): Add "Wei-cheng Wang".
+
+2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
+
+	* ppc-linux-tdep.c (ppc_skip_trampoline_code,
+	ppc_canonicalize_syscall, ppc_linux_syscall_record,
+	ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
+	* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
+	* rs6000-tdep.c (rs6000_epilogue_frame_cache,
+	rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
+	rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
+	ppc_process_record_op19, ppc_process_record_op31,
+	ppc_process_record_op59, ppc_process_record_op60,
+	ppc_process_record_op63): Likewise.
+
+2015-01-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string)
+	(linux_ptrace_test_ret_to_nx): Use safe_strerror instead of
+	strerror.
+
+2015-01-20  Wei-cheng Wang  <cole945@gmail.com>
+
+	* rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
+	ppc_process_record_op31, ppc_process_record_op59,
+	ppc_process_record_op60, ppc_process_record_op63,
+	ppc_process_record): Fix -Wformat warning.
+	* rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
+	Remove unused variables.
+
+2015-01-20  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+	* MAINTAINERS (Write After Approval): Add "Chen Gang".
+
+2015-01-19  Eli Zaretskii  <eliz@gnu.org>
+
+	* configure.ac [*mingw32*]: Only add windows-termcap.o to
+	CONFIG_OBS if not building with a curses library.
+	* configure: Regenerate.
+
+	* windows-termcap.c: Include defs.h.  Make the whole body empty if
+	either one of HAVE_CURSES_H or HAVE_NCURSES_H or
+	HAVE_NCURSES_NCURSES_H is defined.
+
+2015-01-19  Joel Brobecker  <brobecker@adacore.com>
+
+	* rs6000-tdep.c (rs6000_gdbarch_init): Move divide operator
+	from end of line to start of next line.
+
+2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
+
+	* ppc-linux-tdep.c (ppc_skip_trampoline_code):
+	Scan PLT stub backward for reverse debugging.
+	* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
+
+2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
+	    Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* configure.tgt (powerpc*-*-linux): Add linux-record.o to
+	gdb_target_obs.
+	(ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall
+	record.
+	(ppc_canonicalize_syscall, ppc_linux_syscall_record,
+	ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions.
+	(ppc_linux_init_abi): Set process_record, process_record_signal.
+	* ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and
+	ppc_linux_record_tdep to gdbarch_tdep.
+	(ppc_process_record): New declaration.
+	* rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4,
+	ppc_process_record_op19, ppc_process_record_op31,
+	ppc_process_record_op59, ppc_process_record_op60,
+	ppc_process_record_op63, ppc_process_record): New functions.
+
+2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
+
+	* rs6000-tdep.c (rs6000_in_function_epilogue_p): Rename to
+	rs6000_in_function_epilogue_frame_p and add an argument
+	for frame_info.
+	(rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id,
+	rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer):
+	New functions.
+	(rs6000_epilogue_frame_unwind): New.
+	(rs6000_gdbarch_init): Append epilogue unwinder.
+
+2015-01-16  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* nat/linux-personality.c: Replace "#ifndef
+	HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
+	!HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
+	systems.
+
+2015-01-16  Eli Zaretskii  <eliz@gnu.org>
+
+	* tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
+	functions.
+	(_initialize_tui_win) <border-kind, border-mode>:
+	<active-border-mode>: Use tui_set_var_cmd as the "set" function.
+	(tui_set_tab_width_command): Fix the commentary.
+
+	* tui/tui-win.h: Add prototype for tui_rehighlight_all.
+
+	* tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
+	Doc fix.
+	(tui_set_tab_width_command): Delete and recreate the source and
+	the disassembly windows, to show the effect of the changed tab
+	size immediately.
+
+	* tui/tui-data.h (LINE_PREFIX): Make shorter
+	(MAX_PID_WIDTH): Enlarge from 14 to 19, to leave enough space for
+	"Thread NNNNN.XXXX" thread ID notation on Windows.
+
+2015-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix gcc-5 compilation.
+	* hppa-tdep.c (inst_saves_gr): Fix parentheses typo.
+
+2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
+	(linux-personality.o): New rule.
+	* common/common-defs.h: Include <stdint.h>.
+	* config/aarch64/linux.mh (NATDEPFILES): Include
+	linux-personality.o.
+	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
+	* config/arm/linux.mh (NATDEPFILES): Likewise.
+	* config/i386/linux64.mh (NATDEPFILES): Likewise.
+	* config/i386/linux.mh (NATDEPFILES): Likewise.
+	* config/ia64/linux.mh (NATDEPFILES): Likewise.
+	* config/m32r/linux.mh (NATDEPFILES): Likewise.
+	* config/m68k/linux.mh (NATDEPFILES): Likewise.
+	* config/mips/linux.mh (NATDEPFILES): Likewise.
+	* config/pa/linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
+	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
+	* config/s390/linux.mh (NATDEPFILES): Likewise.
+	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
+	* config/sparc/linux.mh (NATDEPFILES): Likewise.
+	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
+	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
+	* defs.h: Remove #include <stdint.h> (moved to
+	common/common-defs.h).
+	* linux-nat.c: Include nat/linux-personality.h.  Remove #include
+	<sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
+	nat/linux-personality.c).
+	(linux_nat_create_inferior): Remove code to disable address space
+	randomization (moved to nat/linux-personality.c).  Create cleanup
+	to disable address space randomization.
+	* nat/linux-personality.c: New file.
+	* nat/linux-personality.h: Likewise.
+
+2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and
+	common/posix-strerror.c.
+	(posix-strerror.o): New rule.
+	(mingw-strerror.o): Likewise.
+	* common/common-utils.h (safe_strerror): Move prototype to here,
+	from utils.h.
+	* common/common.host: New file.
+	* common/mingw-strerror.c: Likewise.
+	* common/posix-strerror.c: Likewise.
+	* configure: Regenerated.
+	* configure.ac: Source common/common.host.  Add variable
+	common_host_obs to gdb_host_obs.
+	* contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and
+	gdb/common/posix-strerror.c when warning about the use of
+	strerror.
+	* mingw-hdep.c (safe_strerror): Remove definition; move it to
+	common/mingw-strerror.c.
+	* posix-hdep.c (safe_strerror): Remove definition; move it to
+	common/posix-hdep.c.
+	* utils.h (safe_strerror): Remove prototype; move to
+	common/common-utils.h.
+
+2015-01-15  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.8.2 released.
+
+2015-01-15  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_array_bound_from_type): Ignore array's parallel
+	___XA type if the array has already been fixed.
+
+2015-01-14  Yao Qi  <yao@codesourcery.com>
+
+	* Makefile.in (ppc-linux.o): New rule.
+	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
+	* configure.ac: AC_CHECK_FUNCS(getauxval).
+	* config.in: Re-generated.
+	* configure: Re-generated.
+	* nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
+	Declare.
+	* nat/ppc-linux.c: New file.
+	* ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
+	Call ppc64_64bit_inferior_p.
+
+2015-01-14  Yao Qi  <yao@codesourcery.com>
+
+	* ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
+	nat/ppc-linux.h.
+	(PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
+	(PPC_FEATURE_HAS_DFP): Likewise.
+	(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
+	(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
+	(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
+	Include "nat/ppc-linux.h".
+	* nat/ppc-linux.h: New file.
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
+
+2015-01-14  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/17525
+	* breakpoint.c: Include "interps.h".
+	(bpstat_do_actions_1): Also check whether the interpreter is
+	async.
+
+2015-01-14  Pedro Alves  <palves@redhat.com>
+
+	PR cli/17828
+	* infrun.c (reinstall_readline_callback_handler_cleanup): Don't
+	reinstall if the interpreter is sync.
+
+2015-01-13  Doug Evans  <dje@google.com>
+
+	* objfiles.c (objfile_filename): New function.
+	* objfiles.h (objfile_filename): Declare it.
+	(objfile_name): Add function comment.
+	* python/py-objfile.c (objfpy_lookup_objfile_by_name): Try both the
+	bfd file name (which may be realpath'd), and the original name.
+
+2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* NEWS: Create a new section for the next release branch.
+	Rename the section of the current branch, now that it has
+	been cut.
+
+2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.9 branch created (92fc2e6978d9a7c8324c7e851dbee59e22ec7a37):
+	* version.in: Bump version to 7.9.50.DATE-cvs.
+
+2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* nat/linux-procfs.c (linux_proc_attach_tgid_threads):
+	Remove trailing new-line in argument of call to warning.
+
+2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* linux-nat.c (attach_proc_task_lwp_callback): Remove trailing
+	new-line in argument of call to "warning".
+
+2015-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (ada_lookup_symbol_nonlocal): If name not found
+	in static block, then try searching for primitive types.
+
+2015-01-12  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.h (gdb_add_history): Declare.
+	* top.c (command_count): New variable.
+	(gdb_add_history): New function.
+	(gdb_safe_append_history): New static function.
+	(quit_force): Call it.
+	(command_line_input): Use gdb_add_history instead of
+	add_history.
+	* event-top.c (command_line_handler): Likewise.
+
+2015-01-12  James Clarke  <jrtc27@jrtc27.com>  (tiny patch)
+
+	PR gdb/17046
+	* darwin-nat.c: Replace <machine/setjmp.h> #include by
+	<setjmp.h> #include.
+
+2015-01-11  Doug Evans  <xdje42@gmail.com>
+
+	* dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
+
+2015-01-11  Doug Evans  <xdje42@gmail.com>
+
+	PR gdb/15830
+	* NEWS: The "maint demangle" command is renamed as "demangle".
+	* demangle.c: #include cli/cli-utils.h, language.h.
+	(demangle_command): New function.
+	(_initialize_demangle): Add new command "demangle".
+	* maint.c (maintenance_demangle): Stub out.
+	(_initialize_maint_cmds): Update help text for "maint demangle",
+	and mark as deprecated.
+
+2015-01-11  Mark Kettenis  <kettenis@gnu.org>
+
+	* inf-ptrace.c (inf_ptrace_follow_fork): Adjust now that
+	inferior_thread is a function.
+
+2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* Makefile.in (.y.c): Don't munge yacc's #line
+	directives.
+
+2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
+	to prompt for input.
+	* tui/tui-hooks.c (tui_query_hook): Remove.
+	(tui_install_hooks): Don't set deprecated_query_hook.
+	* tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
+	height calculation.  Always update the command window's cur_line.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (hardware_breakpoint_inserted_here_p): New
+	function.
+	* breakpoint.h (hardware_breakpoint_inserted_here_p): New
+	declaration.
+	* linux-nat.c (linux_nat_status_is_event): Move higher up in file.
+	(linux_resume_one_lwp): Store the thread's PC.  Adjust to clear
+	stop_reason.
+	(check_stopped_by_watchpoint): New function.
+	(save_sigtrap): Reimplement.
+	(linux_nat_stopped_by_watchpoint): Adjust.
+	(linux_nat_lp_status_is_event): Delete.
+	(stop_wait_callback): Only call save_sigtrap after storing the
+	pending status.
+	(status_callback): If the thread had been stopped for a breakpoint
+	that has since been removed, discard the event and resume the LWP.
+	(count_events_callback, select_event_lwp_callback): Use
+	lwp_status_pending_p instead of linux_nat_lp_status_is_event.
+	(cancel_breakpoint): Rename to ...
+	(check_stopped_by_breakpoint): ... this.  Record whether the LWP
+	stopped for a software breakpoint or hardware breakpoint.
+	(select_event_lwp): Only give preference to the stepping LWP in
+	all-stop mode.  Adjust comments.
+	(stop_and_resume_callback): Remove references to new_pending_p.
+	(linux_nat_filter_event): Likewise.  Leave exit events of the
+	leader thread pending here.  Handle signal short circuiting here.
+	Only call save_sigtrap after storing the pending waitstatus.
+	(linux_nat_wait_1): Remove 'retry' label.  Remove references to
+	new_pending.  Don't handle leaving events the caller is not
+	interested in pending here, nor handle signal short-circuiting
+	here.  Also give equal priority to all LWPs that have had events
+	in non-stop mode.  If reporting a software breakpoint event,
+	unadjust the LWP's PC.
+	* linux-nat.h (enum lwp_stop_reason): New.
+	(struct lwp_info) <stop_pc>: New field.
+	(struct lwp_info) <stopped_by_watchpoint>: Delete field.
+	(struct lwp_info) <stop_reason>: New field.
+	* x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
+	Set the LWP's 'resumed' flag.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_resume_one_lwp): New function.
+	(resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
+	(linux_nat_resume): Use lwp_status_pending_p and
+	linux_resume_one_lwp.
+	(linux_handle_syscall_trap): Use linux_resume_one_lwp.
+	(linux_handle_extended_wait): Use linux_resume_one_lwp.
+	(status_callback, running_callback): Use lwp_status_pending_p.
+	(lwp_status_pending_p): New function.
+	(stop_and_resume_callback): Use lwp_status_pending_p.
+	(linux_nat_filter_event): Use linux_resume_one_lwp.
+	(linux_nat_wait_1): Always use status_callback to look for an LWP
+	with a pending status.  Use linux_resume_one_lwp.
+	(resume_stopped_resumed_lwps): Use lwp_status_pending_p and
+	linux_resume_one_lwp.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (bp_location_inserted_here_p): New function,
+	factored out from ...
+	(breakpoint_inserted_here_p): ... here.  Use
+	ALL_BP_LOCATIONS_AT_ADDR.
+	(software_breakpoint_inserted_here_p): Use
+	bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
+
+2014-01-09  Pedro Alves  <palves@redhat.com>
+
+	Skip enabling event reporting if the kernel supports
+	PTRACE_EVENT_CLONE.
+	* linux-thread-db.c: Include "nat/linux-ptrace.h".
+	(thread_db_use_events): New function.
+	(try_thread_db_load_1): Check thread_db_use_events before enabling
+	event reporting.
+	(update_thread_state): New function.
+	(attach_thread): Use it.  Check thread_db_use_events before
+	enabling event reporting.
+	(thread_db_detach): Check thread_db_use_events before disabling
+	event reporting.
+	(find_new_threads_callback): Check thread_db_use_events before
+	enabling event reporting.  Update the thread's state if not using
+	libthread_db events.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
+	about to wait for is > 0.
+	* linux-thread-db.c (find_new_threads_callback): Ignore thread if
+	the kernel thread ID is -1.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (attach_proc_task_lwp_callback): New function.
+	(linux_nat_attach): Use linux_proc_attach_tgid_threads.
+	(wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
+	ptrace option flags.
+	* linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
+	field.
+	* nat/linux-procfs.c: Include <dirent.h>.
+	(linux_proc_get_int): New parameter "warn".  Handle it.
+	(linux_proc_get_tgid): Adjust.
+	(linux_proc_get_tracerpid): Rename to ...
+	(linux_proc_get_tracerpid_nowarn): ... this.
+	(linux_proc_pid_get_state): New function, factored out from
+	(linux_proc_pid_has_state): ... this.  Add new parameter "warn"
+	and handle it.
+	(linux_proc_pid_is_gone): New function.
+	(linux_proc_pid_is_stopped): Adjust.
+	(linux_proc_pid_is_zombie_maybe_warn)
+	(linux_proc_pid_is_zombie_nowarn): New functions.
+	(linux_proc_pid_is_zombie): Use
+	linux_proc_pid_is_zombie_maybe_warn.
+	(linux_proc_attach_tgid_threads): New function.
+	* nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
+	(linux_proc_get_tracerpid): Rename to ...
+	(linux_proc_get_tracerpid_nowarn): ... this, and update comment.
+	(linux_proc_pid_is_gone): New declaration.
+	(linux_proc_pid_is_zombie): Update comment.
+	(linux_proc_pid_is_zombie_nowarn): New declaration.
+	(linux_proc_attach_lwp_func): New typedef.
+	(linux_proc_attach_tgid_threads): New declaration.
+	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
+	use nowarn functions.
+	(linux_ptrace_attach_fail_reason_string): Move here from
+	gdbserver/linux-low.c and rename.
+	(ptrace_supports_feature): If the current ptrace options are not
+	known yet, check them now, instead of asserting.
+	* nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
+	Declare.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (thread_db_find_new_threads_silently)
+	(try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
+	(find_new_threads_once): Print debug output on gdb_stdlog.
+
+2015-01-09  Chen Gang  <gang.chen.5i5j@gmail.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* compile/compile.c: Include "gdb_wait.h".
+	(do_rmdir): Check return value, and free 'zap'.
+
+2015-01-08  Pedro Alves  <palves@redhat.com>
+	    Yao Qi  <yao@codesourcery.com>
+
+	* dwarf2loc.c (indirect_pieced_value): Don't call
+	gdb_sign_extend.  Call extract_signed_integer instead.
+	* utils.c (gdb_sign_extend): Remove.
+	* utils.h (gdb_sign_extend): Remove declaration.
+
+2015-01-07  Pierre Muller  <muller@sourceware.org>
+
+	PR symtab/17811
+	* stabsread.c (define_symbol): Set language for C++ special symbols.
+
+2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* inflow.c (initial_gdb_ttystate): Tweak comment.
+
+2015-01-07  Joel Brobecker  <brobecker@adacore.com>
+
+	* inflow.c (set_initial_gdb_ttystate): Add empty line after
+	comment documenting function.
+
+2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* terminal.h (set_initial_gdb_ttystate): Declare.
+	* inflow.c (initial_gdb_ttystate): New static variable.
+	(set_initial_gdb_ttystate): New setter.
+	(child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
+	instead of our current terminal state.
+	* top.c (gdb_init): Call set_initial_gdb_ttystate.
+
+2015-01-07  Joel Brobecker  <brobecker@adacore.com>
+
+	* guile/scm-type.c (tyscm_array_1): Add comment.
+	* python/py-type.c (typy_array_1): Add comment.
+
+2015-01-06  Joel Brobecker  <brobecker@adacore.com>
+
+	* guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
+	error if N2 is equal to N1 - 1.
+
+2015-01-06  Joel Brobecker  <brobecker@adacore.com>
+
+	* python/py-type.c (typy_array_1): Do not raise negative-length
+	exception if N2 is equal to N1 - 1.
+
+2015-01-03  Doug Evans  <xdje42@gmail.com>
+
+	* c-exp.y: Whitespace cleanup.
+	(classify_inner_name): Remove extra ;.
+
+2015-01-02  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
+	offset signed.
+
+2015-01-02  Doug Evans  <dje@google.com>
+
+	* dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
+
+2015-01-02  Doug Evans  <dje@google.com>
+
+	* symtab.h (struct symbol): Fix typo in comment.
+
+2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	Update year range in copyright notice of all files.
+
+2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* top.c (print_gdb_version): Update copyright year to 2015.
+
+2015-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
+
+For older changes see ChangeLog-2014.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+coding: utf-8
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2016 ./gdb/ChangeLog-2016
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ChangeLog-2016	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ChangeLog-2016	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,10294 @@
+2016-12-22  Doug Evans  <xdje42@gmail.com>
+
+	* infrun.c (set_step_over_info): Add comment.
+
+2016-12-22  Doug Evans  <xdje42@gmail.com>
+
+	* NEWS: Document new syntax for "mt print symbols", "mt print psymbols"
+	and "mt print msymbols" commands.
+	* psymtab.c (DEV_TTY): Delete.
+	(dump_psymtab_addrmap): Don't dump if psymtabs_addrmap is NULL.
+	(maintenance_print_psymbols): Rewrite for new syntax:
+	mt print psymbols [-objfile objfile] [-pc address] [outfile]
+	mt print psymbols [-objfile objfile] [-source source] [outfile]
+	(_initialize_psymtab): Update help text.
+	* symmisc.c (maintenance_print_symbols): Rewrite for new syntax:
+	mt print symbols [-pc address] [outfile]
+	mt print symbols [-objfile objfile] [-source source] [outfile]
+	(maintenance_print_msymbols): Rewrite for new syntax:
+	mt print msymbols [-objfile objfile] [outfile]
+	Only print symbols for the current progspace.
+	(_initialize_symmisc): Update help text.
+
+2016-12-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ui-out.h (ui_out_begin, ui_out_end, ui_out_table_header,
+	ui_out_table_body,  ui_out_field_int, ui_out_field_fmt_int,
+	ui_out_field_core_addr, ui_out_field_string, ui_out_field_stream,
+	ui_out_field_fmt, ui_out_field_skip, ui_out_spaces, ui_out_text,
+	ui_out_message, ui_out_wrap_hint, ui_out_flush, ui_out_test_flags,
+	ui_out_query_field, ui_out_is_mi_like_p, ui_out_redirect):
+	Remove, replace with a method in class ui_out.
+	(table_begin_ftype): Remove, replace with pure virtual method in
+	class ui_out.
+	(table_body_ftype): Likewise.
+	(table_end_ftype): Likewise.
+	(table_header_ftype): Likewise.
+	(ui_out_begin_ftype): Likewise.
+	(ui_out_end_ftype): Likewise.
+	(field_int_ftype): Likewise.
+	(field_skip_ftype): Likewise.
+	(field_string_ftype): Likewise.
+	(field_fmt_ftype): Likewise.
+	(spaces_ftype): Likewise.
+	(text_ftype): Likewise.
+	(message_ftype): Likewise.
+	(wrap_hint_ftype): Likewise.
+	(flush_ftype): Likewise.
+	(redirect_ftype): Likewise.
+	(data_destroy_ftype): Likewise.
+	(struct ui_out_impl): Remove, replace with class ui_out.
+	(ui_out_new): Remove.
+	(class ui_out): New class.
+	* ui-out.c (struct ui_out): Remove, replaced with class ui_out.
+	(current_level): Remove, replace with ui_out method.
+	(push_level): Likewise.
+	(pop_level): Likewise.
+	(uo_table_begin, uo_table_body, uo_table_end, uo_table_header,
+	uo_begin, uo_end, uo_field_int, uo_field_skip, uo_field_fmt,
+	uo_spaces, uo_text, uo_message, uo_wrap_hint, uo_flush,
+	uo_redirect, uo_field_string): Remove.
+	(ui_out_table_begin): Replace with ...
+	(ui_out::table_begin): ... this.
+	(ui_out_table_body): Replace with ...
+	(ui_out::table_body): ... this.
+	(ui_out_table_end): Replace with ...
+	(ui_out::table_end): ... this.
+	(ui_out_table_header): Replace with ...
+	(ui_out::table_header): ... this.
+	(ui_out_begin): Replace with ...
+	(ui_out::begin): ... this.
+	(ui_out_end): Replace with ...
+	(ui_out::end): ... this.
+	(ui_out_field_int): Replace with ...
+	(ui_out::field_int): ... this.
+	(ui_out_field_fmt_int): Replace with ...
+	(ui_out::field_fmt_int): ... this.
+	(ui_out_field_core_addr): Replace with ...
+	(ui_out::field_core_addr): ... this.
+	(ui_out_field_stream): Replace with ...
+	(ui_out::field_stream): ... this.
+	(ui_out_field_skip): Replace with ...
+	(ui_out::field_skip): ... this.
+	(ui_out_field_string): Replace with ...
+	(ui_out::field_string): ... this.
+	(ui_out_field_fmt): Replace with ...
+	(ui_out::field_fmt): ... this.
+	(ui_out_spaces): Replace with ...
+	(ui_out::spaces): ... this.
+	(ui_out_text): Replace with ...
+	(ui_out::text): ... this.
+	(ui_out_message): Replace with ...
+	(ui_out::message): ... this.
+	(ui_out_wrap_hint): Replace with ...
+	(ui_out::wrap_hint): ... this.
+	(ui_out_flush): Replace with ...
+	(ui_out::flush): ... this.
+	(ui_out_redirect): Replace with ...
+	(ui_out::redirect): ... this.
+	(ui_out_test_flags): Replace with ...
+	(ui_out::test_flags): ... this.
+	(ui_out_is_mi_like_p): Replace with ...
+	(ui_out::is_mi_like_p): ... this.
+	(verify_field): Replace with ...
+	(ui_out::verify_field): ... this.
+	(ui_out_query_field): Replace with ...
+	(ui_out::query_table_field): ... this.
+	(ui_out_data): Remove.
+	(ui_out_new): Remove, replace with ...
+	(ui_out::ui_out): ... this constructor.
+	(do_cleanup_table_end, make_cleanup_ui_out_tuple_begin_end,
+	do_cleanup_end, make_cleanup_ui_out_tuple_begin_end,
+	make_cleanup_ui_out_list_begin_end): Update fallouts of struct
+	ui_out -> class ui_out change.
+	* cli-out.c (cli_out_data): Remove.
+	(cli_uiout_dtor): Remove.
+	(cli_table_begin): Replace with ...
+	(cli_ui_out::do_table_begin): ... this new method.
+	(cli_table_body): Replace with ...
+	(cli_ui_out::do_table_body): ... this new method.
+	(cli_table_end): Replace with ...
+	(cli_ui_out::do_table_end): ... this new method.
+	(cli_table_header): Replace with ...
+	(cli_ui_out::do_table_header): ... this new method.
+	(cli_begin): Replace with ...
+	(cli_ui_out::do_begin): ... this new method.
+	(cli_end): Replace with ...
+	(cli_ui_out::do_end): ... this new method.
+	(cli_field_int): Replace with ...
+	(cli_ui_out::do_field_int): ... this new method.
+	(cli_field_skip): Replace with ...
+	(cli_ui_out::do_field_skip): ... this new method.
+	(cli_field_string): Replace with ...
+	(cli_ui_out::do_field_string): ... this new method.
+	(cli_field_fmt): Replace with ...
+	(cli_ui_out::do_field_fmt): ... this new method.
+	(cli_spaces): Replace with ...
+	(cli_ui_out::do_spaces): ... this new method.
+	(cli_text): Replace with ...
+	(cli_ui_out::do_text): ... this new method.
+	(cli_message): Replace with ...
+	(cli_ui_out::do_message): ... this new method.
+	(cli_wrap_hint): Replace with ...
+	(cli_ui_out::do_wrap_hint): ... this new method.
+	(cli_flush): Replace with ...
+	(cli_ui_out::do_flush): ... this new method.
+	(cli_redirect): Replace with ...
+	(cli_ui_out::do_redirect): ... this new method.
+	(out_field_fmt): Replace with ...
+	(cli_ui_out::out_field_fmt): ... this new method.
+	(field_separator): Replace with ...
+	(cli_ui_out::field_separator): ... this new method.
+	(cli_out_set_stream): Replace with ...
+	(cli_ui_out::set_stream): ... this new method.
+	(cli_ui_out_impl): Remove.
+	(cli_out_data_ctor): Remove.
+	(cli_ui_out_impl::cli_ui_out_impl): New constructor.
+	(cli_ui_out_impl::~cli_ui_out_impl): New destructor.
+	(cli_out_new): Change return type to cli_ui_out *, instantiate a
+	cli_ui_out.
+	* cli-out.h (cli_ui_out_data): Remove, replace with class
+	cli_ui_out.
+	(class cli_ui_out): New class.
+	(cli_ui_out_impl): Remove.
+	(cli_out_data_ctor): Remove.
+	(cli_out_new): Change return type to cli_ui_out*.
+	(cli_out_set_stream): Remove.
+	* cli/cli-interp.c (struct cli_interp) <cli_uiout>: Change type
+	to cli_ui_out*.
+	(cli_interpreter_resume): Adapt.
+	(cli_interpreter_exec): Adapt.
+	* mi/mi-out.c (mi_ui_out_data, mi_out_data): Remove.
+	(mi_ui_out_impl): Remove.
+	(mi_table_begin): Replace with ...
+	(mi_ui_out::do_table_begin): ... this.
+	(mi_table_body): Replace with ...
+	(mi_ui_out::do_table_body): ... this.
+	(mi_table_end): Replace with ...
+	(mi_ui_out::do_table_end): ... this.
+	(mi_table_header): Replace with ...
+	(mi_ui_out::do_table_header): ... this.
+	(mi_begin): Replace with ...
+	(mi_ui_out::do_begin): ... this.
+	(mi_end): Replace with ...
+	(mi_ui_out::do_end): ... this.
+	(mi_field_int): Replace with ...
+	(mi_ui_out::do_field_int): ... this.
+	(mi_field_skip): Replace with ...
+	(mi_ui_out::do_field_skip): ... this.
+	(mi_field_string): Replace with ...
+	(mi_ui_out::do_field_string): ... this.
+	(mi_field_fmt): Replace with ...
+	(mi_ui_out::do_field_fmt): ... this.
+	(mi_spaces): Replace with ...
+	(mi_ui_out::do_spaces): ... this.
+	(mi_text): Replace with ...
+	(mi_ui_out::do_text): ... this.
+	(mi_message): Replace with ...
+	(mi_ui_out::do_message): ... this.
+	(mi_wrap_hint): Replace with ...
+	(mi_ui_out::do_wrap_hint): ... this.
+	(mi_flush): Replace with ...
+	(mi_ui_out::do_flush): ... this.
+	(mi_redirect): Replace with ...
+	(mi_ui_out::do_redirect):
+	(field_separator): Replace with ...
+	(mi_ui_out::field_separator):
+	(mi_open): Replace with ...
+	(mi_ui_out::open): ... this.
+	(mi_close): Replace with ...
+	(mi_ui_out::close): ... this.
+	(mi_out_rewind): Replace with ...
+	(mi_ui_out::rewind): ... this.
+	(mi_out_put): Replace with ...
+	(mi_ui_out::put): ... this.
+	(mi_version): Replace with ...
+	(mi_ui_out::version): ... this.
+	(mi_out_data_ctor): Replace with ...
+	(mi_ui_out::mi_ui_out): ... this.
+	(mi_out_data_dtor): Replace with ...
+	(mi_ui_out::~mi_ui_out): ... this.
+	(mi_out_new): Change return type to mi_ui_out*, instantiate
+	an mi_ui_out object.
+	(as_mi_ui_out): New function.
+	(mi_version): Update fallouts of struct ui_out to class ui_out
+	transition.
+	(mi_out_put): Likewise.
+	(mi_out_rewind): Likewise.
+	* mi/mi-out.h (mi_out_new): Change return type to mi_ui_out*.
+	* tui/tui-out.c (tui_ui_out_data, tui_out_data, tui_ui_out_impl):
+	Remove.
+	(tui_field_int): Replace with ...
+	(tui_ui_out::do_field_int): ... this.
+	(tui_field_string): Replace with ...
+	(tui_ui_out::do_field_string): ... this.
+	(tui_field_fmt): Replace with ...
+	(tui_ui_out::do_field_fmt): ... this.
+	(tui_text): Replace with ...
+	(tui_ui_out::do_text): ... this.
+	(tui_out_new): Change return type to tui_ui_out*, instantiate
+	tui_ui_out object.
+	(tui_ui_out::tui_ui_out): New.
+	* tui/tui-out.h: New file.
+	* tui/tui.h (tui_out_new): Move declaration to tui/tui-out.h.
+	* tui/tui-io.c: Include tui/tui-out.h.
+	(tui_old_uiout): Change type to cli_ui_out*.
+	(tui_setup_io): Use dynamic_cast.
+	* tui/tui-io.h (tui_old_uiout): Change type to cli_ui_out*.
+	* tui/tui-interp.c (tui_resume): Adapt.
+	* ada-lang.c (print_it_exception): Update fallouts of struct
+	ui_out to class ui_out transition.
+	(print_one_exception): Likewise.
+	(print_mention_exception): Likewise.
+	* ada-tasks.c (print_ada_task_info): Likewise.
+	(info_task): Likewise.
+	(task_command): Likewise.
+	* auto-load.c (print_script): Likewise.
+	(auto_load_info_scripts): Likewise.
+	(info_auto_load_cmd): Likewise.
+	* break-catch-sig.c (signal_catchpoint_print_one): Likewise.
+	* break-catch-syscall.c (print_it_catch_syscall): Likewise.
+	(print_one_catch_syscall): Likewise.
+	* break-catch-throw.c (print_it_exception_catchpoint): Likewise.
+	(print_one_exception_catchpoint): Likewise.
+	(print_one_detail_exception_catchpoint): Likewise.
+	(print_mention_exception_catchpoint): Likewise.
+	* breakpoint.c (maybe_print_thread_hit_breakpoint): Likewise.
+	(print_solib_event): Likewise.
+	(watchpoint_check): Likewise.
+	(wrap_indent_at_field): Likewise.
+	(print_breakpoint_location): Likewise.
+	(output_thread_groups): Likewise.
+	(print_one_breakpoint_location): Likewise.
+	(breakpoint_1): Likewise.
+	(default_collect_info): Likewise.
+	(watchpoints_info): Likewise.
+	(print_it_catch_fork): Likewise.
+	(print_one_catch_fork): Likewise.
+	(print_it_catch_vfork): Likewise.
+	(print_one_catch_vfork): Likewise.
+	(print_it_catch_solib): Likewise.
+	(print_one_catch_solib): Likewise.
+	(print_it_catch_exec): Likewise.
+	(print_one_catch_exec): Likewise.
+	(mention): Likewise.
+	(print_it_ranged_breakpoint): Likewise.
+	(print_one_ranged_breakpoint): Likewise.
+	(print_one_detail_ranged_breakpoint): Likewise.
+	(print_mention_ranged_breakpoint): Likewise.
+	(print_it_watchpoint): Likewise.
+	(print_mention_watchpoint): Likewise.
+	(print_it_masked_watchpoint): Likewise.
+	(print_one_detail_masked_watchpoint): Likewise.
+	(print_mention_masked_watchpoint): Likewise.
+	(bkpt_print_it): Likewise.
+	(tracepoint_print_one_detail): Likewise.
+	(tracepoint_print_mention): Likewise.
+	(update_static_tracepoint): Likewise.
+	(tracepoints_info): Likewise.
+	(save_breakpoints): Likewise.
+	* cli/cli-cmds.c (complete_command): Likewise.
+	* cli/cli-logging.c (set_logging_redirect): Likewise.
+	(pop_output_files): Likewise.
+	(handle_redirections): Likewise.
+	* cli/cli-script.c (print_command_lines): Likewise.
+	* cli/cli-setshow.c (do_show_command): Likewise.
+	(cmd_show_list): Likewise.
+	* cp-abi.c (list_cp_abis): Likewise.
+	(show_cp_abi_cmd): Likewise.
+	* darwin-nat-info.c (darwin_debug_regions_recurse): Likewise.
+	* disasm.c (gdb_pretty_print_insn): Likewise.
+	(do_mixed_source_and_assembly_deprecated): Likewise.
+	(do_mixed_source_and_assembly): Likewise.
+	* gdb_bfd.c (print_one_bfd): Likewise.
+	(maintenance_info_bfds): Likewise.
+	* guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
+	* guile/scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
+	* i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Likewise.
+	* i386-tdep.c (i386_mpx_print_bounds): Likewise.
+	* infcmd.c (run_command_1): Likewise.
+	(print_return_value_1): Likewise.
+	* inferior.c (print_selected_inferior): Likewise.
+	(print_inferior): Likewise.
+	* infrun.c (print_end_stepping_range_reason): Likewise.
+	(print_signal_exited_reason): Likewise.
+	(print_exited_reason): Likewise.
+	(print_signal_received_reason): Likewise.
+	(print_no_history_reason): Likewise.
+	* interps.c (interp_set): Likewise.
+	* linespec.c (decode_line_full): Likewise.
+	* linux-thread-db.c (info_auto_load_libthread_db): Likewise.
+	* mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
+	(mi_cmd_env_path): Likewise.
+	(mi_cmd_env_dir): Likewise.
+	(mi_cmd_inferior_tty_show): Likewise.
+	* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Likewise.
+	(print_partial_file_name): Likewise.
+	(mi_cmd_file_list_exec_source_files): Likewise.
+	* mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Likewise.
+	(mi_cmd_info_gdb_mi_command): Likewise.
+	* mi/mi-cmd-stack.c (mi_cmd_stack_info_depth): Likewise.
+	(mi_cmd_stack_list_args): Likewise.
+	(list_arg_or_local): Likewise.
+	* mi/mi-cmd-var.c (print_varobj): Likewise.
+	(mi_cmd_var_create): Likewise.
+	(mi_cmd_var_delete): Likewise.
+	(mi_cmd_var_set_format): Likewise.
+	(mi_cmd_var_show_format): Likewise.
+	(mi_cmd_var_info_num_children): Likewise.
+	(mi_cmd_var_list_children): Likewise.
+	(mi_cmd_var_info_type): Likewise.
+	(mi_cmd_var_info_path_expression): Likewise.
+	(mi_cmd_var_info_expression): Likewise.
+	(mi_cmd_var_show_attributes): Likewise.
+	(mi_cmd_var_evaluate_expression): Likewise.
+	(mi_cmd_var_assign): Likewise.
+	(varobj_update_one): Likewise.
+	* mi/mi-interp.c (as_mi_interp): Likewise.
+	(mi_on_normal_stop_1): Likewise.
+	(mi_tsv_modified): Likewise.
+	(mi_breakpoint_created): Likewise.
+	(mi_breakpoint_modified): Likewise.
+	(mi_solib_loaded): Likewise.
+	(mi_solib_unloaded): Likewise.
+	(mi_command_param_changed): Likewise.
+	(mi_memory_changed): Likewise.
+	(mi_user_selected_context_changed): Likewise.
+	* mi/mi-main.c (print_one_inferior): Likewise.
+	(output_cores): Likewise.
+	(list_available_thread_groups): Likewise.
+	(mi_cmd_data_list_register_names): Likewise.
+	(mi_cmd_data_list_changed_registers): Likewise.
+	(output_register): Likewise.
+	(mi_cmd_data_evaluate_expression): Likewise.
+	(mi_cmd_data_read_memory): Likewise.
+	(mi_cmd_data_read_memory_bytes): Likewise.
+	(mi_cmd_list_features): Likewise.
+	(mi_cmd_list_target_features): Likewise.
+	(mi_cmd_add_inferior): Likewise.
+	(mi_execute_command): Likewise.
+	(mi_load_progress): Likewise.
+	(print_variable_or_computed): Likewise.
+	(mi_cmd_trace_frame_collected): Likewise.
+	* mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Likewise.
+	* osdata.c (info_osdata_command): Likewise.
+	* probe.c (gen_ui_out_table_header_info): Likewise.
+	(print_ui_out_not_applicables): Likewise.
+	(print_ui_out_info): Likewise.
+	(info_probes_for_ops): Likewise.
+	(enable_probes_command): Likewise.
+	(disable_probes_command): Likewise.
+	* progspace.c (print_program_space): Likewise.
+	* python/py-breakpoint.c (bppy_get_commands): Likewise.
+	* python/py-framefilter.c (py_print_type): Likewise.
+	(py_print_value): Likewise.
+	(py_print_single_arg): Likewise.
+	(enumerate_args): Likewise.
+	(enumerate_locals): Likewise.
+	(py_print_args): Likewise.
+	(py_print_frame): Likewise.
+	* record-btrace.c (btrace_ui_out_decode_error): Likewise.
+	(btrace_call_history_insn_range): Likewise.
+	(btrace_call_history_src_line): Likewise.
+	(btrace_call_history): Likewise.
+	* remote.c (show_remote_cmd): Likewise.
+	* skip.c (skip_info): Likewise.
+	* solib.c (info_sharedlibrary_command): Likewise.
+	* source.c (print_source_lines_base): Likewise.
+	* spu-tdep.c (info_spu_event_command): Likewise.
+	(info_spu_signal_command): Likewise.
+	(info_spu_mailbox_list): Likewise.
+	(info_spu_dma_cmdlist): Likewise.
+	(info_spu_dma_command): Likewise.
+	(info_spu_proxydma_command): Likewise.
+	* stack.c (print_stack_frame): Likewise.
+	(print_frame_arg): Likewise.
+	(read_frame_arg): Likewise.
+	(print_frame_args): Likewise.
+	(print_frame_info): Likewise.
+	(print_frame): Likewise.
+	* symfile.c (load_progress): Likewise.
+	(generic_load): Likewise.
+	(print_transfer_performance): Likewise.
+	* thread.c (do_captured_list_thread_ids): Likewise.
+	(print_thread_info_1): Likewise.
+	(restore_selected_frame): Likewise.
+	(do_captured_thread_select): Likewise.
+	(print_selected_thread_frame): Likewise.
+	* top.c (execute_command_to_string): Likewise.
+	* tracepoint.c (tvariables_info_1): Likewise.
+	(trace_status_mi): Likewise.
+	(tfind_1): Likewise.
+	(print_one_static_tracepoint_marker): Likewise.
+	(info_static_tracepoint_markers_command): Likewise.
+	* utils.c (do_ui_out_redirect_pop): Likewise.
+	(fputs_maybe_filtered): Likewise.
+
+2016-12-20  Pedro Alves  <palves@redhat.com>
+
+	* nto-tdep.c (nto_find_and_open_solib): Constify 'solib'
+	parameter.
+	* nto-tdep.h (nto_find_and_open_solib): Constify 'solib'
+	parameter.
+	* solib.c (solib_find_1, exec_file_find, solib_find): Constify
+	in_pathname' parameter.
+	* solist.h (struct target_so_ops) <find_and_open_solib>: Constify
+	'soname' parameter.
+	(exec_file_find, solib_find): Constify 'in_pathname' parameter.
+
+2016-12-20  Pedro Alves  <palves@redhat.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	PR gdb/20977
+	* event-top.c (gdb_rl_callback_read_char_wrapper_noexcept): New
+	noexcept function, factored out from ...
+	(gdb_rl_callback_read_char_wrapper): ... this.
+	(gdb_rl_callback_handler): Mark noexcept.
+
+2016-12-20  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* .dir-locals.el: Set c++ mode for the directory and set indent
+	properly.
+	* gdb-code-style.el: Set c-set-offset 'innamespace as a safe value
+	to be used in .dir-locals.el.
+
+2016-12-16  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* darwin-nat-info.c (info_mach_region_command): Use expression_up.
+
+2016-12-12  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/20955
+	* cris-tdep.c (cris_delayed_get_disassembler): Remove the
+	assert.
+
+2016-12-09  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (ALL_TARGET_OBS): Remove vax-obsd-tdep.o.
+	* alpha-fbsd-tdep.c (_initialize_alphafbsd_tdep): Adjust.
+	* alpha-nbsd-tdep.c: Move comment to _initialize_alphanbsd_tdep.
+	(alphanbsd_core_osabi_sniffer): Delete.
+	(_initialize_alphanbsd_tdep): No longer handle a.out.
+	* alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Adjust.
+	* amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Adjust.
+	* amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Adjust.
+	* amd64-obsd-tdep.c (amd64obsd_supply_regset)
+	(amd64obsd_combined_regset)
+	(amd64obsd_iterate_over_regset_sections, amd64obsd_core_init_abi):
+	Delete.
+	(_initialize_amd64obsd_tdep): Don't handle a.out.
+	* arm-nbsd-nat.c (struct md_core, fetch_core_registers)
+	(arm_netbsd_core_fns): Delete.
+	(_initialize_arm_netbsd_nat): Don't register arm_netbsd_core_fns.
+	* arm-nbsd-tdep.c (arm_netbsd_aout_init_abi)
+	(arm_netbsd_aout_osabi_sniffer): Delete.
+	(_initialize_arm_netbsd_tdep): Don't handle a.out.
+	* arm-obsd-tdep.c (armobsd_core_osabi_sniffer): Delete.
+	(_initialize_armobsd_tdep): Don't handle a.out.
+	* arm-tdep.c (arm_gdbarch_init): Remove bfd_target_aout_flavour
+	case.
+	* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Remove
+	SunOS a.out handling.
+	* configure.tgt (vax-*-netbsd* | vax-*-knetbsd*-gnu): Remove
+	vax-obsd-tdep.o from gdb_target_objs.
+	(vax-*-openbsd*): Likewise.
+	(*-*-freebsd*): Adjust default gdb_osabi.
+	(*-*-openbsd*): Likewise.
+	* dbxread.c (block_address_function_relative): Delete.
+	(dbx_symfile_read): Remove reference to
+	block_address_function_relative.
+	(dbx_symfile_read): Don't call read_dbx_dynamic_symtab.
+	(read_dbx_dynamic_symtab): Delete.
+	(process_one_symbol): Remove references to
+	block_address_function_relative.
+	* defs.h (GDB_OSABI_FREEBSD_AOUT, GDB_OSABI_NETBSD_AOUT): Remove.
+	(GDB_OSABI_FREEBSD_ELF): Rename to ...
+	(GDB_OSABI_FREEBSD): ... this.
+	(GDB_OSABI_NETBSD_ELF): Rename to ...
+	(GDB_OSABI_NETBSD): ... this.
+	(GDB_OSABI_OPENBSD_ELF): Rename to ...
+	(GDB_OSABI_OPENBSD): ... this.
+	(GDB_OSABI_HPUX_ELF, GDB_OSABI_HPUX_SOM): Remove.
+	* fbsd-tdep.c: Adjust comment.
+	* hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Adjust.
+	* hppa-obsd-tdep.c (GDB_OSABI_NETBSD_CORE): Delete.
+	(hppaobsd_core_osabi_sniffer): Delete.
+	(_initialize_hppabsd_tdep): Don't handle a.out.
+	* hppa-tdep.c (hppa_stub_frame_unwind_cache): Don't handle
+	GDB_OSABI_HPUX_SOM.
+	(hppa_gdbarch_init): Likewise.
+	* i386-bsd-tdep.c (i386bsd_aout_osabi_sniffer)
+	(i386bsd_core_osabi_sniffer, _initialize_i386bsd_tdep): Delete.
+	* i386-fbsd-tdep.c (i386fbsdaout_init_abi): Delete.  Merge bits
+	with ...
+	(i386fbsd_init_abi): ... this.
+	(_initialize_i386fbsd_tdep): Don't handle a.out.
+	* i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Adjust.
+	* i386-obsd-tdep.c (i386obsd_aout_supply_regset)
+	(i386obsd_aout_gregset)
+	(i386obsd_aout_iterate_over_regset_sections): Delete.
+	(i386obsd_init_abi): Merge with i386obsd_elf_init_abi.
+	(i386obsd_aout_init_abi): Delete.
+	(_initialize_i386obsd_tdep): Don't handle a.out.
+	* m68k-bsd-tdep.c (m68kobsd_sigtramp_cache_init)
+	(m68kobsd_sigtramp): Delete.
+	(m68kbsd_init_abi): Merge with ...
+	(m68kbsd_elf_init_abi): ... this, and delete it.
+	(m68kbsd_aout_init_abi): Delete.
+	(m68kbsd_aout_osabi_sniffer, m68kbsd_core_osabi_sniffer): Delete.
+	(_initialize_m68kbsd_tdep): Don't handle a.out.
+	* mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Adjust.
+	* mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Adjust.
+	* osabi.c (gdb_osabi_names): Remove "a.out" entries.  Drop "ELF"
+	suffixes.  Remove "HP-UX" entries.
+	(generic_elf_osabi_sniff_abi_tag_sections): Adjust.
+	(generic_elf_osabi_sniffer): No longer handle GDB_OSABI_HPUX_ELF.
+	Adjust.
+	(_initialize_ppcfbsd_tdep): Adjust.
+	* ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Adjust.
+	* ppc-obsd-tdep.c (GDB_OSABI_NETBSD_CORE)
+	(ppcobsd_core_osabi_sniffer): Delete.
+	(_initialize_ppcobsd_tdep): Don't handle a.out.
+	* rs6000-tdep.c (rs6000_gdbarch_init): Adjust.
+	* sh-nbsd-tdep.c (GDB_OSABI_NETBSD_CORE)
+	(shnbsd_core_osabi_sniffer): Delete.
+	(_initialize_shnbsd_tdep): Don't handle a.out.
+	* solib.c (clear_solib): Don't handle SunOS/a.out.
+	* sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Make extern.
+	(sparc32nbsd_aout_init_abi): Delete.
+	(sparc32nbsd_elf_init_abi): Merged into sparc32nbsd_init_abi.
+	(sparcnbsd_aout_osabi_sniffer): Delete.
+	(GDB_OSABI_NETBSD_CORE, sparcnbsd_core_osabi_sniffer): Delete.
+	(_initialize_sparcnbsd_tdep): No longer handle a.out.
+	* sparc-obsd-tdep.c (sparc32obsd_init_abi)
+	(_initialize_sparc32obsd_tdep): Adjust.
+	* sparc-tdep.h (sparc32nbsd_elf_init_abi): Rename to ...
+	(sparc32nbsd_init_abi): ... this.
+	* sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Adjust.
+	* sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Adjust.
+	* sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Adjust.
+	* stabsread.c: Update comment.
+	* symmisc.c (print_objfile_statistics): Don't mention "a.out" in
+	output.
+	* vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Adjust.
+	* vax-obsd-tdep.c: Delete file.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/20954
+	* rx-tdep.c (rx_psw_type): New function.
+	(rx_fpsw_type): New function.
+	(rx_register_type): Call rx_psw_type and rx_fpsw_type.
+	(rx_gdbarch_init): Move code to rx_psw_type and
+	rx_fpsw_type.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/20953
+	* rl78-tdep.c (rl78_psw_type): New function.
+	(rl78_register_type): Call rl78_psw_type.
+	(rl78_gdbarch_init): Move code to rl78_psw_type.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (instruction_reader::read): Call
+	read_code_unsigned_integer instead of
+	read_memory_unsigned_integer.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (skip_prologue_function): Call
+	read_code_unsigned_integer instead of
+	read_memory_unsigned_integer.
+	(thumb_analyze_prologue): Likewise.
+	(arm_analyze_load_stack_chk_guard): Likewise.
+	(arm_skip_stack_protector): Likewise.
+	(arm_analyze_prologue):Likewise.
+	(extend_buffer_earlier): Call target_read_code instead
+	of target_read_memory.
+	(arm_adjust_breakpoint_address): Likewise.
+
+2016-12-09  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* gnu-nat.c (gnu_create_inferior): After startup_inferior, call
+	prune_threads.
+
+	* inferior.c (print_selected_inferior): Avoid PATH_MAX usage.
+
+2016-12-08  Simon Marchi  <simon.marchi@ericsson.com>
+	    Thomas Schwinge  <thomas@codesourcery.com>
+
+	* gnu-nat.c (set_sig_thread_cmd): Use parse_thread_id instead of
+	global_thread_id_to_ptid.
+
+2016-12-08  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* config/i386/i386gnu.mh (%_S.o %_U.o): Add "-x c" to
+	"COMPILE.post".
+	* gnu-nat.c: #include Mach/Hurd headers before all others.  Wrap
+	Mach/Hurd headers and MIG stubs' prototypes in 'extern "C"'.
+	* i386-gnu-nat.c: Likewise.
+
+	* gnu-nat.c (proc_get_exception_port, proc_set_exception_port)
+	(INF_RESUME_MSGPORT_RPC, proc_get_state, _proc_get_exc_port)
+	(proc_steal_exc_port, proc_restore_exc_port, make_proc)
+	(inf_startup, inf_set_pid, inf_validate_procinfo)
+	(inf_validate_task_sc, inf_set_traced, inf_validate_procs)
+	(inf_signal, inf_continue, gnu_wait, S_exception_raise_request)
+	(do_mach_notify_dead_name, S_proc_wait_reply)
+	(S_msg_sig_post_untraced_reply, S_msg_sig_post_reply)
+	(port_msgs_queued, gnu_read_inferior, gnu_write_inferior)
+	(gnu_find_memory_regions, steal_exc_port, thread_takeover_sc_cmd)
+	(flush_inferior_icache): Instead of "error_t" use "kern_return_t".
+	* i386-gnu-nat.c (fetch_fpregs, store_fpregs, i386_gnu_dr_get)
+	(i386_gnu_dr_set): Likewise.
+
+	* gnu-nat.c (set_task_pause_cmd, set_signals_cmd)
+	(set_exceptions_cmd): Add variants taking an "int arg" instead of
+	a "char *".  Make the "char *" variants use the former.
+	(set_noninvasive_cmd): Also use the "int arg" variants.
+
+	* gnu-nat.c (gnu_create_inferior): Move nested "trace_me"
+	function...
+	(gnu_ptrace_me): ... here.
+
+	* i386-gnu-nat.c (i386_gnu_dr_set_control_one)
+	(i386_gnu_dr_set_addr_one): Explicitly cast "void *".
+
+2016-12-07  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* gnu-nat.c (set_sig_thread_cmd): Call global_thread_id_to_ptid
+	instead of thread_id_to_pid.
+
+2016-12-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* inferior.c (inferior_command): Remove duplicate
+	find_inferior_id call.
+
+2016-12-06  Yao Qi  <yao.qi@linaro.org>
+
+	* frame.c (frame_register_unwind): Set *realnump if *lvalp is
+	lval_register.
+	* value.c (deprecated_value_next_frame_id_hack): Assert
+	value->lval is lval_register.
+	(deprecated_value_regnum_hack): Likewise.
+
+2016-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.h: Include "common/enum-flags.h".
+	(enum ui_flags): Rename to ...
+	(enum ui_out_flag): ... this.
+	(ui_out_flags): Define enum flag type.
+	(ui_out_test_flags): Change type of parameter to ui_out_flags.
+	(ui_out_new): Likewise.
+	* ui-out.c (ui_out_test_flags): Likewise.
+	(ui_out_new): Likewise.
+	* cli-out.c (cli_out_new): Update variable type.
+	* mi/mi-out.c (mi_out_new): Likewise.
+	* tui/tui-out.c (tui_out_new): Likewise.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that user commands now accept an unlimited number
+	of arguments.
+	* cli/cli-script.c: Include <vector>.
+	(struct string_view): New type.
+	(MAXUSERARGS): Delete.
+	(struct user_args): Now a C++ class.
+	(user_args_stack): New.
+	(struct scoped_user_args_level): New type.
+	(execute_user_command): Use scoped_user_args_level.
+	(arg_cleanup): Delete.
+	(setup_user_args): Deleted, and refactored as ...
+	(user_args::user_args): ... this new constructor.  Limit of number
+	of arguments removed.
+	(insert_user_defined_cmd_args): Defer to user_args_stack.
+	(user_args::insert_args): New, bits based on old
+	insert_user_defined_cmd_args with limit of number of arguments
+	eliminated.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	PR cli/20559
+	* NEWS: Mention "eval" expands user-defined command arguments.
+	* cli/cli-script.c (execute_control_command): Adjust to rename.
+	(insert_args): Rename to ...
+	(insert_user_defined_cmd_args): ... this, and make extern.
+	* cli/cli-script.h (insert_user_defined_cmd_args): New
+	declaration.
+	* printcmd.c: Include "cli/cli-script.h".
+	(eval_command): Call insert_user_defined_cmd_args.
+
+2016-12-02  Tom Tromey  <tom@tromey.com>
+
+	PR symtab/16264:
+	* dwarf2read.c (struct partial_die_info) <main_subprogram>: New
+	member.
+	(add_partial_symbol): Call set_objfile_main_name.
+	(read_partial_die): Handle DW_AT_main_subprogram.
+	<DW_AT_calling_convention>: don't call set_objfile_main_name, but
+	set main_subprogram flag.
+
+2016-12-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* tracefile-tfile.c (tfile_write_status): Adjust to renames.
+	* tracefile.c (trace_save_command): Rename to...
+	(tsave_command): ...this.
+	(_initialize_tracefile): Adjust to renames.
+	* tracepoint.c (trace_actions_command): Rename to...
+	(actions_command): ...this.
+	(trace_start_command): Rename to...
+	(tstart_command): ...this, and adjust to renames..
+	(trace_stop_command): Rename to...
+	(tstop_command): ...this.
+	(trace_status_command): Rename to...
+	(tstatus_command): ...this, and adjust to renames.
+	(trace_find_command): Rename to...
+	(tfind_command): ...this.
+	(trace_find_pc_command): Rename to...
+	(tfind_pc_command): ...this.
+	(trace_find_tracepoint_command): Rename to...
+	(tfind_tracepoint_command): ...this.
+	(trace_find_line_command): Rename to...
+	(tfind_line_command): ...this.
+	(trace_find_range_command): Rename to...
+	(tfind_range_command): ...this.
+	(trace_find_outside_command): Rename to...
+	(tfind_outside_command): ...this.
+	(trace_dump_command): Rename to...
+	(tdump_command): ...this.
+	(tfind_1): Adjust to renames.
+	(trace_find_end_command): Rename to...
+	(tfind_end_command): ...this, and adjust to renames..
+	(trace_status_mi): Adjust to renames.
+	(parse_trace_status): Adjust to renames.
+	(_initialize_tracepoint): Adjust to renames.
+	* tracepoint.h (enum trace_stop_reason) <tstop_command>: Rename
+	to...
+	<trace_stop_command>: ...this.
+
+2016-12-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-out.c (mi_ui_out_data) <suppress_output>: Remove.
+	(mi_table_body): Remove suppress_output check.
+	(mi_table_end): Likewise.
+	(mi_table_header): Likewise.
+	(mi_begin): Likewise.
+	(mi_end): Likewise.
+	(mi_field_int): Likewise.
+	(mi_field_string): Likewise.
+	(mi_field_fmt): Likewise.
+	(mi_out_data_ctor): Likewise.
+
+2016-12-02  Yao Qi  <yao.qi@linaro.org>
+	    Pedro Alves  <palves@redhat.com>
+
+	* aarch64-tdep.c (aarch64_analyze_prologue): Recognize STR
+	instruction.
+	(aarch64_analyze_prologue_test): More tests.
+
+2016-12-02  Yao Qi  <yao.qi@linaro.org>
+	    Pedro Alves  <palves@redhat.com>
+
+	* aarch64-tdep.c: Include "selftest.h".
+	(abstract_instruction_reader): New class.
+	(instruction_reader): New class.
+	(aarch64_analyze_prologue): Add new parameter reader.  Call
+	reader.read instead of read_memory_unsigned_integer.
+	[GDB_SELF_TEST] (instruction_reader_test): New class.
+	(aarch64_analyze_prologue_test): New function.
+	(_initialize_aarch64_tdep) [GDB_SELF_TEST]: Register
+	selftests::aarch64_analyze_prologue_test.
+	* trad-frame.c (trad_frame_cache_zalloc):
+	(trad_frame_alloc_saved_regs): Add a new function.
+	* trad-frame.h (trad_frame_alloc_saved_regs): Declare.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (enum ui_out_table_state): Move to class
+	ui_out_table as ui_out_table::state.
+	(struct ui_out_table): Change to ...
+	(class ui_out_table): ... this.
+	<flag>: Remove.
+	<entry_level>: Rename to ...
+	<m_entry_level>: ... this.
+	<columns>: Rename to ...
+	<m_nr_cols>: ... this.
+	<id>: Rename to ...
+	<m_id>: ... this.
+	<headers>: Rename to ...
+	<m_headers>: ... this.
+	<headers_iterator>: Rename to ...
+	<m_headers_iterator>: ... this.
+	<start_body, append_header, start_row, get_next_header,
+	query_field, current_state, entry_level>: New methods.
+	(struct ui_out) <table>: Change type to unique_ptr to
+	ui_out_table.
+	(append_header_to_list, get_next_header, clear_header_list,
+	clear_table): Remove.
+	(ui_out_table_begin): Instantiate ui_out_table object.  Update
+	table check.
+	(ui_out_table_body): Update table check, replace code with call
+	to ui_out_table::start_body.
+	(ui_out_table_end): Update table check, replace manual cleanup
+	with assignment of uiout->table unique_ptr to nullptr.
+	(ui_out_table_header): Update table check, replace call to
+	append_header_to_list with call to append_header method.
+	(ui_out_begin): Remove one table state check, update another.
+	Replace code with call to start_row method.
+	(verify_field): Update table checks.
+	(ui_out_query_field): Update table check, replace code with call
+	to query_field method.
+	(ui_out_new): Remove table initialization code.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (enum ui_out_table_state): New enum.
+	(struct ui_out_table) <body_flag>: Remove field.
+	<state>: New field.
+	(ui_out_table_begin): Replace usages of body_flag with state.
+	(ui_out_table_body): Likewise.
+	(ui_out_table_end): Likewise.
+	(ui_out_table_header): Likewise.
+	(ui_out_begin): Likewise.
+	(verify_field): Likewise.
+	(ui_out_new): Likewise.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.h (ui_out_begin_ftype): Remove level parameter.
+	(ui_out_end_ftype): Likewise.
+	* ui-out.c (struct ui_out) <level>: Replace field with a method
+	that dynamically computes the result.
+	(current_level): Get vector's back item instead of using
+	uiout->level.
+	(push_level): Make return type void.
+	(pop_level): Make return type void and update access to
+	ui_out::level.
+	(uo_begin): Remove level parameter.
+	(uo_end): Likewise.
+	(ui_out_table_begin): Update access to uiout::level.
+	(ui_out_begin): Don't read return value from push_level, call
+	uiout->level() instead, update call to uo_begin.
+	(ui_out_end): Don't read return value from pop_level, update
+	call to uo_end.
+	(verify_field): Update access to uiout->level.
+	(ui_out_new): Don't initialize ui_out::level, call push_level
+	to push the initial level instead of doing it by hand.
+	* cli-out.c (cli_begin): Remove level parameter.
+	(cli_end): Likewise.
+	* mi/mi-out.c (mi_begin): Likewise.
+	(mi_end): Likewise.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (struct ui_out_level): Replace with ...
+	(class ui_out_level): ... this.
+	(current_level): Update.
+	(push_level): Update.
+	(pop_level): Update.
+	(verify_field): Update.
+	(ui_out_new): Update.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (struct ui_out_hdr): Replace with ...
+	(class ui_out_hdr): ... this.
+	(append_header_to_list): Update.
+	(get_next_header): Update.
+	(ui_out_query_field): Update.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mi/mi-out.c (mi_table_header): Change char * args to
+	std::string.
+	* cli-out.c (cli_table_header): Likewise.
+	* ui-out.h (table_header_ftype): Likewise.
+	(ui_out_table_header): Constify colhdr argument.
+	(ui_out_query_field): Constify col_name argument.
+	* ui-out.c (ui_out_hdr) <col_name, colhdr>: Change type to
+	std::string.
+	(uo_table_header): Change char * args to std::string.
+	(ui_out_table_header): Likewise.
+	(get_next_header): Constify colhdr argument and adapt.
+	(clear_header_list): Don't free col_name/colhdr fields.
+	(append_header_to_list): Change char * args to std::string and
+	adapt.
+	(verify_field): Constify variable.
+	(ui_out_query_field): Constify col_name argument and adapt.
+	* breakpoint.c (wrap_indent_at_field): Constify variable.
+
+2016-12-01  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (struct ui_out_hdr) <next>: Remove.
+	(struct ui_out_table) <header_first, header_last, header_next>: Remove.
+	<headers, headers_iterator>: New fields.
+	(ui_out_table_body): Update for the new data structure.
+	(ui_out_begin): Likewise.
+	(clear_header_list): Likewise.
+	(append_header_to_list): Likewise.
+	(get_next_header): Likewise.
+	(ui_out_query_field): Likewise.
+	(ui_out_new): Likewise.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (struct ui_out_table) <id>: Change type to
+	std::string.
+	(ui_out_table_begin): Change tblid parameter type to
+	std::string, adapt code.
+	update following type change.
+	(clear_table): Update.
+	(ui_out_new): Update.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* cli-out.h (cli_ui_out_data) <streams>: Change type to
+	std::vector.
+	* cli-out.c: Remove vec.h include.
+	(cli_uiout_dtor): Update.
+	(cli_field_fmt): Update.
+	(cli_spaces): Update.
+	(cli_text): Update.
+	(cli_message): Update.
+	(cli_flush): Update.
+	(cli_redirect): Update.
+	(out_field_fmt): Update.
+	(field_separator): Update.
+	(cli_out_data_ctor): Update.
+	(cli_out_new): Update.
+	(cli_out_set_stream): Update.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mi/mi-out.c: Remove vec.h include.
+	(mi_ui_out_data) <streams>: Change type to std::vector.
+	(mi_field_string): Update.
+	(mi_field_fmt): Update.
+	(mi_flush): Update.
+	(mi_redirect): Update.
+	(field_separator): Update.
+	(mi_open): Update.
+	(mi_close): Update.
+	(mi_out_buffered): Update.
+	(mi_out_rewind): Update.
+	(mi_out_put): Update.
+	(mi_out_data_ctor): Update.
+	(mi_out_data_dtor): Don't free streams.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (ui_out_level_p): Remove typedef.
+	(DEF_VEC_P (ui_out_level_p)): Remove definition.
+	(struct ui_out) <levels>: Change type to vector of unique_ptr of
+	ui_out_level.
+	(current_level): Update.
+	(push_level): Update.
+	(pop_level): Update, don't manually delete the ui_out_level
+	instance.
+	(ui_out_new): Update.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* cli-out.c (cli_uiout_dtor): Use delete instead of xfree.
+	(cli_out_new): Use new instead of XNEW.
+	* mi/mi-out.c (mi_out_data_dtor): Use delete instead of xfree.
+	(mi_out_new): Use new instead of XNEW.
+	* tui/tui-out.c (tui_out_new): Likewise.
+	* ui-out.c (push_level): Likewise.
+	(pop_level): Use delete instead of xfree.
+	(clear_header_list): Use delete instead of xfree.
+	(append_header_to_list): Use new instead of XNEW.
+	(ui_out_new): Likewise.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* disable-implicit-rules.mk: New file.
+	* Makefile.in: Include disable-implicit-rules.mk.
+	* data-directory/Makefile.in: Likewise.
+	* gnulib/Makefile.in: Likewise.
+
+2016-11-30  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_scan_prologue): Read memory as unsigned integer.
+	(arm_exidx_unwind_sniffer): Likewise.
+
+2016-11-28  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* record-full.c (record_full_open_1): Fix debug output.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mi/mi-out.c (mi_message): Remove verbosity argument.
+	* ada-tasks.c (print_ada_task_info, info_task, task_command):
+	Update call.
+	* auto-load.c (auto_load_info_scripts): Likewise.
+	* breakpoint.c (breakpoint_1, watchpoints_info, tracepoints_info):
+	Likewise.
+	* cli-out.c (cli_message): Remove verbosity argument.
+	* inferior.c (print_inferior): Update call.
+	* linux-thread-db.c (info_auto_load_libthread_db): Likewise.
+	* probe.c (info_probes_for_ops): Likewise.
+	* skip.c (skip_info): Likewise.
+	* solib.c (info_sharedlibrary_command): Likewise.
+	* symfile.c (load_progress): Likewise.
+	* thread.c (print_thread_info_1): Likewise.
+	* ui-out.c (uo_message, ui_out_message): Remove verbosity argument.
+	(ui_out_get_verblvl): Remove.
+	* ui-out.h (ui_out_message): Remove verbosity argument.
+	(ui_out_get_verblvl): Remove.
+	(message_ftype): Remove verbosity argument.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mi/mi-out.c (mi_wrap_hint): Constify argument.
+	* cli-out.c (cli_wrap_hint): Likewise.
+	* ui-out.c (ui_out_wrap_hint, uo_wrap_hint): Likewise.
+	* ui-out.h (ui_out_wrap_hint, wrap_hint_ftype): Likewise.
+	* utils.c (wrap_here): Likewise.
+	(wrap_indent): Constify.
+	* utils.h (wrap_here): Constify argument.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (uo_redirect): Return the return value from the
+	implementation function.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (ui_out_destroy, uo_data_destroy): Remove.
+	* ui-out.h (ui_out_destroy): Remove.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* mi/mi-out.c (ui_out_data): Rename to ...
+	(mi_ui_out_data): ... this.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (_initialize_ui_out): Remove.
+	(ui_out_set_flags): Remove.
+	(ui_out_clear_flags): Remove.
+	* ui-out.h (ui_out_begin_cleanup_end): Remove.
+	(ui_out_begin_cleanup_end): Remove.
+	(ui_out_set_flags): Remove.
+	(ui_out_clear_flags): Remove.
+	* mi/mi-out.c (_initialize_mi_out): Remove.
+	(mi_out_buffered): Remove.
+	* mi/mi-out.h (mi_out_buffered): Remove.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.h (struct ui_out_impl): Remove comment.
+	* ui-out.c (struct ui_out): Remove comment.
+
+2016-11-25  John Baldwin  <jhb@FreeBSD.org>
+
+	* contrib/ari/gdb_ari.sh (no parameter function): Remove check.
+
+2016-11-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in: Fix typo.
+
+2016-11-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* record-full.c (record_full_resume): Fix typos in comment.
+
+2016-11-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* infcmd.c (interrupt_command): Fix typo in comment.
+
+2016-11-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* ada-lang.c (create_excep_cond_exprs): Do not use 'std::move'.
+	* ax-gdb.c (agent_eval_command_one): Likewise.
+	(agent_eval_command_one): Likewise.
+	* breakpoint.c (parse_cond_to_aexpr): Likewise.
+	(parse_cmd_to_aexpr): Likewise.
+	* dtrace-probe.c (dtrace_process_dof_probe): Likewise.
+	* parse.c (parse_expression_for_completion): Likewise.
+
+2016-11-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* common/new-op.c (operator new): Mark 'noexcept'.
+	(operator new[]): Likewise.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* dwarf2loc.c (copy_bitwise): Use memcpy for the middle part, if
+	it is byte-aligned.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* dwarf2loc.c (bits_to_str, check_copy_bitwise)
+	(copy_bitwise_tests): New functions.
+	(_initialize_dwarf2loc): Register the new function
+	copy_bitwise_tests as a unit test.
+	* selftest.c (run_self_tests): Improve the failure message's
+	wording and formatting.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* dwarf2loc.c (extract_bits_primitive): Remove.
+	(extract_bits): Remove.
+	(copy_bitwise): Rewrite.  Fixes a possible corruption that may
+	occur for non-byte-aligned copies.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	PR gdb/12616
+	* dwarf2read.c (dwarf2_add_field): Handle the DWARF V4 attribute
+	DW_AT_data_bit_offset.
+
+2016-11-23  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (SFILES): Add common/run-time-clock.c.
+	(HFILES_NO_SRCDIR): Add common/run-time-clock.h.
+	(COMMON_OBS): Add run-time-clock.o.
+	* common/run-time-clock.c, common/run-time-clock.h: New files.
+	* defs.h (struct timeval, print_transfer_performance): Delete
+	declarations.
+	* event-loop.c (struct gdb_timer) <when>: Now a
+	std::chrono::steady_clock::time_point.
+	(create_timer): use std::chrono::steady_clock instead of
+	gettimeofday.  Use new instead of malloc.
+	(delete_timer): Use delete instead of xfree.
+	(duration_cast_timeval): New.
+	(update_wait_timeout): Use std::chrono::steady_clock instead of
+	gettimeofday.
+	* maint.c: Include <chrono> instead of "gdb_sys_time.h", <time.h>
+	and "timeval-utils.h".
+	(scoped_command_stats::~scoped_command_stats)
+	(scoped_command_stats::scoped_command_stats): Use
+	std::chrono::steady_clock instead of gettimeofday.  Use
+	user_cpu_time_clock instead of get_run_time.
+	* maint.h: Include "run-time-clock.h" and <chrono>.
+	(scoped_command_stats): <m_start_cpu_time>: Now a
+	user_cpu_time_clock::time_point.
+	<m_start_wall_time>: Now a std::chrono::steady_clock::time_point.
+	* mi/mi-main.c: Include "run-time-clock.h" and <chrono> instead of
+	"gdb_sys_time.h" and <sys/resource.h>.
+	(rusage): Delete.
+	(mi_execute_command): Use new instead of XNEW.
+	(mi_load_progress): Use std::chrono::steady_clock instead of
+	gettimeofday.
+	(timestamp): Rewrite in terms of std::chrono::steady_clock,
+	user_cpu_time_clock and system_cpu_time_clock.
+	(timeval_diff): Delete.
+	(print_diff): Adjust to use std::chrono::steady_clock,
+	user_cpu_time_clock and system_cpu_time_clock.
+	* mi/mi-parse.h: Include "run-time-clock.h" and <chrono> instead
+	of "gdb_sys_time.h".
+	(struct mi_timestamp): Change fields types to
+	std::chrono::steady_clock::time_point, user_cpu_time_clock::time
+	and system_cpu_time_clock::time_point, instead of struct timeval.
+	* symfile.c: Include <chrono> instead of <time.h> and
+	"gdb_sys_time.h".
+	(struct time_range): New.
+	(generic_load): Use std::chrono::steady_clock instead of
+	gettimeofday.
+	(print_transfer_performance): Replace timeval parameters with a
+	std::chrono::steady_clock::duration parameter.  Adjust.
+	* utils.c: Include <chrono> instead of "timeval-utils.h",
+	"gdb_sys_time.h", and <time.h>.
+	(prompt_for_continue_wait_time): Now a
+	std::chrono::steady_clock::duration.
+	(defaulted_query, prompt_for_continue): Use
+	std::chrono::steady_clock instead of
+	gettimeofday/timeval_sub/timeval_add.
+	(reset_prompt_for_continue_wait_time): Use
+	std::chrono::steady_clock::duration instead of struct timeval.
+	(get_prompt_for_continue_wait_time): Return a
+	std::chrono::steady_clock::duration instead of struct timeval.
+	(vfprintf_unfiltered): Use std::chrono::steady_clock instead of
+	gettimeofday.  Use std::string.  Use '.' instead of ':'.
+	* utils.h: Include <chrono>.
+	(get_prompt_for_continue_wait_time): Return a
+	std::chrono::steady_clock::duration instead of struct timeval.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Fix whitespace formatting.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS,
+	HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
+	* alphabsd-nat.c: Rename to ...
+	* alpha-bsd-nat.c: ... this, adjust include.
+	* alphabsd-tdep.c: Rename to ...
+	* alpha-bsd-tdep.c: ... this, adjust include.
+	* alphabsd-tdep.h: Rename to ...
+	* alpha-bsd-tdep.h: ... this, adjust include barrier and comment.
+	* alphafbsd-tdep.c: Rename to ...
+	* alpha-fbsd-tdep.c: ... this.
+	* alphanbsd-tdep.c: Rename to ...
+	* alpha-nbsd-tdep.c: ... this, adjust include.
+	* alphaobsd-tdep.c: Rename to ...
+	* alpha-obsd-tdep.c: ... this, adjust include.
+	* amd64bsd-nat.c: Rename to ...
+	* amd64-bsd-nat.c: ... this, adjust include.
+	* amd64fbsd-nat.c: Rename to ...
+	* amd64-fbsd-nat.c: ... this, adjust include.
+	* amd64fbsd-tdep.c: Rename to ...
+	* amd64-fbsd-tdep.c: ... this, adjust include.
+	* amd64nbsd-nat.c: Rename to ...
+	* amd64-nbsd-nat.c: ... this.
+	* amd64nbsd-tdep.c: Rename to ...
+	* amd64-nbsd-tdep.c: ... this.
+	* amd64obsd-nat.c: Rename to ...
+	* amd64-obsd-nat.c: ... this.
+	* amd64obsd-tdep.c: Rename to ...
+	* amd64-obsd-tdep.c: ... this.
+	* amd64-tdep.h: Update comments.
+	* armbsd-tdep.c: Rename to ...
+	* arm-bsd-tdep.c: ... this.
+	* armnbsd-nat.c: Rename to ...
+	* arm-nbsd-nat.c: ... this.
+	* armnbsd-tdep.c: Rename to ...
+	* arm-nbsd-tdep.c: ... this.
+	* armobsd-tdep.c: Rename to ...
+	* arm-obsd-tdep.c: ... this.
+	* arm-tdep.h: Update comments.
+	* hppabsd-tdep.c: Rename to ...
+	* hppa-bsd-tdep.c: ... this, adjust include.
+	* hppabsd-tdep.h: Rename to ...
+	* hppa-bsd-tdep.h: ... this, adjust include barrier and comment.
+	* hppanbsd-nat.c: Rename to ...
+	* hppa-nbsd-nat.c: ... this.
+	* hppanbsd-tdep.c: Rename to ...
+	* hppa-nbsd-tdep.c: ... this, adjust include.
+	* hppaobsd-nat.c: Rename to ...
+	* hppa-obsd-nat.c: ... this.
+	* hppaobsd-tdep.c: Rename to ...
+	* hppa-obsd-tdep.c: ... this, adjust include.
+	* i386bsd-nat.c: Rename to ...
+	* i386-bsd-nat.c: ... this, adjust include.
+	* i386bsd-nat.h: Rename to ...
+	* i386-bsd-nat.h: ... this, adjust include barrier and comment.
+	* i386bsd-tdep.c: Rename to ...
+	* i386-bsd-tdep.c: ... this.
+	* i386fbsd-nat.c: Rename to ...
+	* i386-fbsd-nat.c: ... this, adjust include.
+	* i386fbsd-tdep.c: Rename to ...
+	* i386-fbsd-tdep.c: ... this, adjust include.
+	* i386fbsd-tdep.h: Rename to ...
+	* i386-fbsd-tdep.h: ... this, adjust include barrier and comment.
+	* i386gnu-nat.c: Rename to ...
+	* i386-gnu-nat.c: ... this.
+	* i386gnu-tdep.c: Rename to ...
+	* i386-gnu-tdep.c: ... this.
+	* i386nbsd-nat.c: Rename to ...
+	* i386-nbsd-nat.c: ... this, adjust include.
+	* i386nbsd-tdep.c: Rename to ...
+	* i386-nbsd-tdep.c: ... this.
+	* i386obsd-nat.c: Rename to ...
+	* i386-obsd-nat.c: ... this, adjust include.
+	* i386obsd-tdep.c: Rename to ...
+	* i386-obsd-tdep.c: ... this.
+	* i386v4-nat.c: Rename to ...
+	* i386-v4-nat.c: ... this.
+	* i386-tdep.h: Update comments.
+	* m68k-tdep.h: Update comments.
+	* m68kbsd-nat.c: Rename to ...
+	* m68k-bsd-nat.c: ... this.
+	* m68kbsd-tdep.c: Rename to ...
+	* m68k-bsd-tdep.c: ... this.
+	* m68klinux-nat.c: Rename to ...
+	* m68k-linux-nat.c: ... this.
+	* m68klinux-tdep.c: Rename to ...
+	* m68k-linux-tdep.c: ... this.
+	* m88kbsd-nat.c: Rename to ...
+	* m88k-bsd-nat.c: ... this.
+	* mipsnbsd-nat.c: Rename to ...
+	* mips-nbsd-nat.c: ... this, adjust include.
+	* mipsnbsd-tdep.c: Rename to ...
+	* mips-nbsd-tdep.c: ... this, adjust include.
+	* mipsnbsd-tdep.h: Rename to ...
+	* mips-nbsd-tdep.h: ... this, adjust include barrier and comment.
+	* mips64obsd-nat.c: Rename to ...
+	* mips64-obsd-nat.c: ... this.
+	* mips64obsd-tdep.c: Rename to ...
+	* mips64-obsd-tdep.c: ... this.
+	* ppcfbsd-nat.c: Rename to ...
+	* ppc-fbsd-nat.c: ... this, adjust include.
+	* ppcfbsd-tdep.c: Rename to ...
+	* ppc-fbsd-tdep.c: ... this, adjust include.
+	* ppcfbsd-tdep.h: Rename to ...
+	* ppc-fbsd-tdep.h: ... this, adjust include barrier and comment.
+	* ppcnbsd-nat.c: Rename to ...
+	* ppc-nbsd-nat.c: ... this, adjust include.
+	* ppcnbsd-tdep.c: Rename to ...
+	* ppc-nbsd-tdep.c: ... this, adjust include.
+	* ppcnbsd-tdep.h: Rename to ...
+	* ppc-nbsd-tdep.h: ... this, adjust include barrier and comment.
+	* ppcobsd-nat.c: Rename to ...
+	* ppc-obsd-nat.c: ... this, adjust include.
+	* ppcobsd-tdep.c: Rename to ...
+	* ppc-obsd-tdep.c: ... this, adjust include.
+	* ppcobsd-tdep.h: Rename to ...
+	* ppc-obsd-tdep.h: ... this, adjust include barrier and comment.
+	* shnbsd-nat.c: Rename to ...
+	* sh-nbsd-nat.c: ... this.
+	* shnbsd-tdep.c: Rename to ...
+	* sh-nbsd-tdep.c: ... this.
+	* sparcnbsd-nat.c: Rename to ...
+	* sparc-nbsd-nat.c: ... this.
+	* sparcnbsd-tdep.c: Rename to ...
+	* sparc-nbsd-tdep.c: ... this.
+	* sparcobsd-tdep.c: Rename to ...
+	* sparc-obsd-tdep.c: ... this.
+	* sparc64fbsd-nat.c: Rename to ...
+	* sparc64-fbsd-nat.c: ... this.
+	* sparc64fbsd-tdep.c: Rename to ...
+	* sparc64-fbsd-tdep.c: ... this.
+	* sparc64nbsd-nat.c: Rename to ...
+	* sparc64-nbsd-nat.c: ... this.
+	* sparc64nbsd-tdep.c: Rename to ...
+	* sparc64-nbsd-tdep.c: ... this.
+	* sparc64obsd-nat.c: Rename to ...
+	* sparc64-obsd-nat.c: ... this.
+	* sparc64obsd-tdep.c: Rename to ...
+	* sparc64-obsd-tdep.c: ... this.
+	* sparc64-tdep.h: Update comments.
+	* vaxbsd-nat.c: Rename to ...
+	* vax-bsd-nat.c: ... this.
+	* vaxnbsd-tdep.c: Rename to ...
+	* vax-nbsd-tdep.c: ... this.
+	* vaxobsd-tdep.c: Rename to ...
+	* vax-obsd-tdep.c: ... this.
+	* x86bsd-nat.h: Rename to ...
+	* x86-bsd-nat.h: ... this, adjust include barrier and comment.
+	* x86bsd-nat.c: Rename to ...
+	* x86-bsd-nat.c: ... this, adjust include.
+	* configure.tgt: Update renamed files.
+	* config/alpha/fbsd.mh: Update renamed files.
+	* config/alpha/nbsd.mh: Update renamed files.
+	* config/arm/nbsdelf.mh: Update renamed files.
+	* config/djgpp/fnchange.lst: Update renamed files.
+	* config/i386/fbsd.mh: Update renamed files.
+	* config/i386/fbsd64.mh: Update renamed files.
+	* config/i386/i386gnu.mh: Update renamed files.
+	* config/i386/i386sol2.mh: Update renamed files.
+	* config/i386/nbsd64.mh: Update renamed files.
+	* config/i386/nbsdelf.mh: Update renamed files.
+	* config/i386/obsd.mh: Update renamed files.
+	* config/i386/obsd64.mh: Update renamed files.
+	* config/i386/sol2-64.mh: Update renamed files.
+	* config/m68k/linux.mh: Update renamed files.
+	* config/m68k/nbsdelf.mh: Update renamed files.
+	* config/m68k/obsd.mh: Update renamed files.
+	* config/m88k/obsd.mh: Update renamed files.
+	* config/mips/nbsd.mh: Update renamed files.
+	* config/mips/obsd64.mh: Update renamed files.
+	* config/pa/nbsd.mh: Update renamed files.
+	* config/pa/obsd.mh: Update renamed files.
+	* config/powerpc/fbsd.mh: Update renamed files.
+	* config/powerpc/nbsd.mh: Update renamed files.
+	* config/powerpc/obsd.mh: Update renamed files.
+	* config/sh/nbsd.mh: Update renamed files.
+	* config/sparc/fbsd.mh: Update renamed files.
+	* config/sparc/nbsd64.mh: Update renamed files.
+	* config/sparc/nbsdelf.mh: Update renamed files.
+	* config/sparc/obsd64.mh: Update renamed files.
+	* config/vax/nbsdelf.mh: Update renamed files.
+	* config/vax/obsd.mh: Update renamed files.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Add comment about file lists ordering.
+	(SUBDIR_CLI_OBS, SUBDIR_CLI_SRCS, SUBDIR_MI_OBS, SUBDIR_MI_SRCS,
+	SUBDIR_TUI_OBS, SUBDIR_TUI_SRCS, SUBDIR_GCC_COMPILE_OBS,
+	SUBDIR_GCC_COMPILE_SRCS, SUBDIR_GUILE_OBS, SUBDIR_GUILE_SRCS,
+	SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS, SUBDIR_GDBTK_OBS,
+	SUBDIR_GDBTK_SRCS, XMLFILES, REMOTE_OBS, ALL_64_TARGET_OBS,
+	ALL_TARGET_OBS, SFILES, HFILES_NO_SRCDIR, HFILES_WITH_SRCDIR,
+	COMMON_OBS, YYFILES, YYOBJ, generated_files, ALLDEPFILES):
+	Flatten list and order alphabetically.
+	* data-directory/Makefile.in: Add comment about file lists
+	ordering.
+	(GEN_SYSCALLS_FILES, PYTHON_FILE_LIST): Flatten list and order
+	alphabetically.
+
+2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+        * contrib/expect-read1.sh: Fix spelling in comments.
+        * gdb_buildall.sh: Fix spelling in comments.
+        * gdb_mbuild.sh: Fix spelling in comments.
+
+2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+        * configure.ac: Fix spelling in comments.
+        * configure: Regenerate.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdbarch.sh (software_single_step): Change parameter from frame_info
+	to regcache.
+	* gdbarch.c, gdbarch.h: Regenerated.
+	* aarch64-tdep.c (aarch64_software_single_step): Change parameter
+	from frame_info to regcache.  Don't call get_current_regcache.
+	* alpha-tdep.c (alpha_deal_with_atomic_sequence): Likewise.
+	(alpha_software_single_step): Likewise.
+	* alpha-tdep.h (alpha_software_single_step): Update declaration.
+	* arm-linux-tdep.c (arm_linux_software_single_step): Likewise.
+	* arm-tdep.c (arm_software_single_step): Likewise.
+	* arm-tdep.h (arm_software_single_step): Likewise.
+	* breakpoint.c (insert_single_step_breakpoint): Pass regcache to
+	gdbarch_software_single_step.
+	* cris-tdep.c (cris_software_single_step): Change parameter from
+	frame_info to regcache.  Don't call get_current_regcache.
+	* mips-tdep.c (mips_software_single_step): Likewise.
+	* mips-tdep.h (mips_software_single_step): Update declaration.
+	* moxie-tdep.c (moxie_software_single_step): Likewise.
+	* nios2-tdep.c (nios2_software_single_step): Likewise.
+	* ppc-tdep.h (ppc_deal_with_atomic_sequence): Update declaration.
+	* rs6000-aix-tdep.c (rs6000_software_single_step): Likewise.
+	* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
+	* s390-linux-tdep.c (s390_software_single_step): Likewise.
+	* sparc-tdep.c (sparc_software_single_step): Likewise.
+	* spu-tdep.c (spu_software_single_step): Likewise.
+	* tic6x-tdep.c (tic6x_software_single_step): Likewise.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* spu-tdep.c (spu_software_single_step): Call get_regcache_arch
+	instead of get_frame_arch.  Call regcache_read_pc instead of
+	get_frame_pc.  Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* tic6x-tdep.c (tic6x_condition_true): Replace frame with
+	regcache.  Call regcache_raw_get_signed instead of
+	get_frame_register_signed.
+	(tic6x_get_next_pc): Likewise.  Caller updated.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* rs6000-aix-tdep.c (branch_dest): Replace parameter frame with
+	regcache.  Call get_regcache_arch instead of get_frame_arch.
+	Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+	(rs6000_software_single_step): Likewise.
+	* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Call
+	get_regcache_arch instead of get_frame_arch.  Call
+	regcache_read_pc instead of get_frame_pc.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* s390-linux-tdep.c (s390_software_single_step): Call
+	get_regcache_arch instead of get_frame_arch.  Call
+	regcache_read_pc instead of get_frame_pc.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* sparc-tdep.c (sparc_analyze_control_transfer): Replace parameter
+	frame with regcache.  Call get_current_frame.
+	(sparc_software_single_step): Call get_regcache_arch instead of
+	get_frame_arch.  Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* nios2-tdep.c (nios2_get_next_pc): Replace parameter frame
+	with regcache.  Call regcache_raw_get_signed instead of
+	get_frame_register_unsigned.
+	(nios2_software_single_step): Call get_regcache_arch
+	instead of get_frame_arch.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* moxie-tdep.c (moxie_software_single_step): Call
+	get_regcache_arch instead of get_frame_arch.  Call
+	regcache_read_pc instead of get_frame_pc.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* mips-tdep.c (mips32_bc1_pc): Replace parameter frame with
+	regcache.  Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+	(mips32_next_pc): Likewise.
+	(micromips_bc1_pc): Likewise.
+	(micromips_next_pc): Likewise.
+	(extended_mips16_next_pc): Likewise.
+	(mips16_next_pc): Likewise.
+	(mips_next_pc): Likewise.
+	(mips_software_single_step): Call get_regcache_arch instead
+	of get_frame_arch.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* cris-tdep.c (find_step_target): Replace parameter frame
+	with regcache.  Call get_regcache_arch instead of
+	get_frame_arch.  Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+	(cris_software_single_step): Call get_regcache_arch instead
+	of get_frame_arch.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* alpha-tdep.c (alpha_deal_with_atomic_sequence): Call
+	get_regcache_arch instead of get_frame_arch.  Call
+	regcache_read_pc instead of get_frame_pc.
+	(alpha_next_pc): Replace parameter frame with regcache.
+	Call regcache_raw_get_unsigned instead of
+	get_frame_register_unsigned.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_software_single_step): Call
+	get_regcache_arch instead of get_frame_arch.  Call
+	regcache_read_pc instead of get_frame_pc.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* regcache.c (regcache_raw_get_signed): New function.
+	* regcache.h (regcache_raw_get_signed): Declare.
+
+2016-11-22  Yao Qi  <yao.qi@linaro.org>
+
+	* value.c (value_from_component): Use VALUE_NEXT_FRAME_ID
+	instead of VALUE_FROM_ID.
+
+2016-11-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (%o: $(srcdir)/mi/%.c): Add missing POSTCOMPILE
+	step.
+
+2016-11-21  Yao Qi  <yao.qi@linaro.org>
+
+	* guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
+	Don't call value_from_contents_and_address and
+	set_value_address.  Call value_from_component.
+	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer):
+	Likewise.
+	* value.c (value_from_component): New function.
+	* value.h (value_from_component): Likewise.
+	* valarith.c (value_subscripted_rvalue): Call
+	value_from_component.
+
+2016-11-19  Joel Brobecker  <brobecker@adacore.com>
+
+	* contrib/ari/gdb_ari.sh: Add detection of printf_vma and
+	sprintf_vma.
+
+2016-11-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in (%.o: $(srcdir)/gdbtk/generic/%.c): Fix typo.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	(PYTHON_CFLAGS): Move up.
+	(%.o: $(srcdir)/arch/%.c): New rule.
+	(%.o: $(srcdir)/cli/%.c): New rule.
+	(%.o: $(srcdir)/common/%.c): New rule.
+	(%.o: $(srcdir)/compile/%.c): New rule.
+	(%.o: $(srcdir)/gdbtk/generic/%.c): New rule.
+	(%.o: $(srcdir)/guile/%.c): New rule.
+	(%.o: $(srcdir)/mi/%.c): New rule.
+	(%.o: $(srcdir)/nat/%.c): New rule.
+	(%.o: $(srcdir)/python/%.c): New rule.
+	(%.o: $(srcdir)/target/%.c): New rule.
+	(%.o: $(srcdir)/tui/%.c): New rule.
+	(cli-cmds.o): Remove.
+	(cli-decode.o): Likewise.
+	(cli-dump.o): Likewise.
+	(cli-interp.o): Likewise.
+	(cli-logging.o): Likewise.
+	(cli-script.o): Likewise.
+	(cli-setshow.o): Likewise.
+	(cli-utils.o): Likewise.
+	(compile.o): Likewise.
+	(compile-c-types.o): Likewise.
+	(compile-c-symbols.o): Likewise.
+	(compile-object-load.o): Likewise.
+	(compile-object-run.o): Likewise.
+	(compile-loc2c.o): Likewise.
+	(compile-c-support.o): Likewise.
+	(gdbtk.o): Likewise.
+	(gdbtk-bp.o): Likewise.
+	(gdbtk-cmds.o): Likewise.
+	(gdbtk-hooks.o): Likewise.
+	(gdbtk-interp.o): Likewise.
+	(gdbtk-main.o): Likewise.
+	(gdbtk-register.o): Likewise.
+	(gdbtk-stack.o): Likewise.
+	(gdbtk-varobj.o): Likewise.
+	(gdbtk-wrapper.o): Likewise.
+	(mi-cmd-break.o): Likewise.
+	(mi-cmd-catch.o): Likewise.
+	(mi-cmd-disas.o): Likewise.
+	(mi-cmd-env.o): Likewise.
+	(mi-cmd-file.o): Likewise.
+	(mi-cmd-info.o): Likewise.
+	(mi-cmds.o): Likewise.
+	(mi-cmd-stack.o): Likewise.
+	(mi-cmd-target.o): Likewise.
+	(mi-cmd-var.o): Likewise.
+	(mi-console.o): Likewise.
+	(mi-getopt.o): Likewise.
+	(mi-interp.o): Likewise.
+	(mi-main.o): Likewise.
+	(mi-out.o): Likewise.
+	(mi-parse.o): Likewise.
+	(mi-symbol-cmds.o): Likewise.
+	(mi-common.o): Likewise.
+	(signals.o): Likewise.
+	(common-utils.o): Likewise.
+	(gdb_vecs.o): Likewise.
+	(xml-utils.o): Likewise.
+	(ptid.o): Likewise.
+	(buffer.o): Likewise.
+	(filestuff.o): Likewise.
+	(format.o): Likewise.
+	(vec.o): Likewise.
+	(print-utils.o): Likewise.
+	(rsp-low.o): Likewise.
+	(errors.o): Likewise.
+	(common-debug.o): Likewise.
+	(cleanups.o): Likewise.
+	(common-exceptions.o
+	(posix-strerror.o): Likewise.
+	(mingw-strerror.o): Likewise.
+	(btrace-common.o): Likewise.
+	(fileio.o): Likewise.
+	(common-regcache.o): Likewise.
+	(signals-state-save-restore.o): Likewise.
+	(new-op.o): Likewise.
+	(waitstatus.o): Likewise.
+	(arm.o): Likewise.
+	(arm-linux.o): Likewise.
+	(arm-get-next-pcs.o): Likewise.
+	(x86-dregs.o): Likewise.
+	(linux-btrace.o): Likewise.
+	(linux-osdata.o): Likewise.
+	(linux-procfs.o): Likewise.
+	(linux-ptrace.o): Likewise.
+	(linux-waitpid.o): Likewise.
+	(mips-linux-watch.o): Likewise.
+	(ppc-linux.o): Likewise.
+	(linux-personality.o): Likewise.
+	(x86-linux.o): Likewise.
+	(x86-linux-dregs.o): Likewise.
+	(amd64-linux-siginfo.o): Likewise.
+	(linux-namespaces.o): Likewise.
+	(aarch64-linux-hw-point.o): Likewise.
+	(aarch64-linux.o): Likewise.
+	(aarch64-insn.o): Likewise.
+	(tui.o): Likewise.
+	(tui-command.o): Likewise.
+	(tui-data.o): Likewise.
+	(tui-disasm.o): Likewise.
+	(tui-file.o): Likewise.
+	(tui-hooks.o): Likewise.
+	(tui-interp.o): Likewise.
+	(tui-io.o): Likewise.
+	(tui-layout.o): Likewise.
+	(tui-out.o): Likewise.
+	(tui-regs.o): Likewise.
+	(tui-source.o): Likewise.
+	(tui-stack.o): Likewise.
+	(tui-win.o): Likewise.
+	(tui-windata.o): Likewise.
+	(tui-wingeneral.o): Likewise.
+	(tui-winsource.o): Likewise.
+	(guile.o): Likewise.
+	(scm-arch.o): Likewise.
+	(scm-auto-load.o): Likewise.
+	(scm-block.o): Likewise.
+	(scm-breakpoint.o): Likewise.
+	(scm-cmd.o): Likewise.
+	(scm-disasm.o): Likewise.
+	(scm-exception.o): Likewise.
+	(scm-frame.o): Likewise.
+	(scm-gsmob.o): Likewise.
+	(scm-iterator.o): Likewise.
+	(scm-lazy-string.o): Likewise.
+	(scm-math.o): Likewise.
+	(scm-objfile.o): Likewise.
+	(scm-param.o): Likewise.
+	(scm-ports.o): Likewise.
+	(scm-pretty-print.o): Likewise.
+	(scm-progspace.o): Likewise.
+	(scm-safe-call.o): Likewise.
+	(scm-string.o): Likewise.
+	(scm-symbol.o): Likewise.
+	(scm-symtab.o): Likewise.
+	(scm-type.o): Likewise.
+	(scm-utils.o): Likewise.
+	(scm-value.o): Likewise.
+	(python.o): Likewise.
+	(py-arch.o): Likewise.
+	(py-auto-load.o): Likewise.
+	(py-block.o): Likewise.
+	(py-bpevent.o): Likewise.
+	(py-breakpoint.o): Likewise.
+	(py-cmd.o): Likewise.
+	(py-continueevent.o): Likewise.
+	(py-xmethods.o): Likewise.
+	(py-event.o): Likewise.
+	(py-evtregistry.o): Likewise.
+	(py-evts.o): Likewise.
+	(py-exitedevent.o): Likewise.
+	(py-finishbreakpoint.o): Likewise.
+	(py-frame.o): Likewise.
+	(py-framefilter.o): Likewise.
+	(py-function.o): Likewise.
+	(py-gdb-readline.o): Likewise.
+	(py-inferior.o): Likewise.
+	(py-infevents.o): Likewise.
+	(py-infthread.o): Likewise.
+	(py-lazy-string.o): Likewise.
+	(py-linetable.o): Likewise.
+	(py-newobjfileevent.o): Likewise.
+	(py-objfile.o): Likewise.
+	(py-param.o): Likewise.
+	(py-prettyprint.o): Likewise.
+	(py-progspace.o): Likewise.
+	(py-signalevent.o): Likewise.
+	(py-stopevent.o): Likewise.
+	(py-symbol.o): Likewise.
+	(py-symtab.o): Likewise.
+	(py-threadevent.o): Likewise.
+	(py-type.o): Likewise.
+	(py-unwind.o): Likewise.
+	(py-utils.o): Likewise.
+	(py-value.o): Likewise.
+	(py-varobj.o): Likewise.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in (.c.o): Replace rule with ...
+	(%.o: %.c): ... this one.
+	(.po.gmo): Replace rule with ...
+	(%.gmo: %.po): ... this one.
+	(.po.pox): Replace rule with ...
+	(%.pox: %.po): ... this one.
+	(.y.c): Replace rule with ...
+	(%.c: %.y): ... this one.
+	(.l.c): Replace rule with ...
+	(%.c: %.l): ... this one.
+	(.SUFFIXES): Remove all instances.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
+	prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
+	make.
+	* configure.ac: Remove checks for the make program.
+	* configure: Re-generate.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* NEWS: Mention requirement of GNU make.
+
+2016-11-17  Pedro Alves  <palves@redhat.com>
+
+	* c-exp.y (c_print_token): Use parser_fprintf instead of fprintf.
+
+2016-11-17  Pedro Alves  <palves@redhat.com>
+
+	* ctf.c [USE_WIN32API] (mkdir): Delete.
+
+2016-11-16  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_value_primitive_packed_val): Use unique_ptr and
+	new gdb_byte[] instead of malloc and cleanups.
+
+2016-11-17  Pedro Alves  <palves@redhat.com>
+
+	* tracepoint.c (collection_list::add_memrange): Add gdbarch
+	parameter.  Use paddress instead of printf_vma.  Adjust recursive
+	calls.
+	(collection_list::stringify): Use paddress and phex_nz instead of
+	sprintf_vma.  Adjust add_memrange call.
+	* tracepoint.h (collection_list::add_memrange): Add gdbarch
+	parameter.
+
+2016-11-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* frame.c (get_prev_frame): Stash frame id for current frame
+	prior to computing frame id for previous frame.
+
+2016-11-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* python/py-unwind.c (pending_framepy_read_register): Use
+	value_of_register() instead of get_frame_register_value().
+
+2016-11-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* value.h (VALUE_FRAME_ID): Rename to VALUE_NEXT_FRAME_ID. Update
+	comment.  Create new VALUE_FRAME_ID which is defined in terms of
+	VALUE_NEXT_FRAME_ID.
+	(deprecated_value_frame_id_hack): Rename to
+	deprecated_value_next_frame_id_hack.
+	* dwarf2loc.c, findvar.c, frame-unwind.c, sentinel-frame.c,
+	valarith.c, valops.c, value.c: Adjust nearly all occurences of
+	VALUE_FRAME_ID to VALUE_NEXT_FRAME_ID.	Add comments for those
+	which did not change.
+	* value.c (struct value): Rename frame_id field to next_frame_id.
+	Update comment.
+	(deprecated_value_frame_id_hack): Rename to
+	deprecated_value_next_frame_id_hack.
+	(value_fetch_lazy): Call frame_unwind_register_value()
+	instead of get_frame_register_value().
+	* frame.c (get_prev_frame_id_by_id): New function.
+	* frame.h (get_prev_frame_id_by_id): Declare.
+	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Make
+	VALUE_NEXT_FRAME_ID refer to the next frame.
+	* findvar.c (value_of_register_lazy): Likewise.
+	(default_value_from_register): Likewise.
+	(value_from_register): Likewise.
+	* frame_unwind.c (frame_unwind_got_optimized): Likewise.
+	* sentinel-frame.c (sentinel_frame_prev_register): Likewise.
+	* value.h (VALUE_FRAME_ID): Update comment describing this macro.
+
+2016-11-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* frame.h (enum frame_id_stack_status): Add FID_STACK_SENTINEL.
+	(struct frame_id): Increase number of bits required for storing
+	stack status to 3 from 2.
+	(sentinel_frame_id): New declaration.
+	(get_next_frame_sentinel_okay): Declare.
+	(frame_find_by_id_sentinel_okay): Declare.
+	* frame.c (current_frame): Rename this static global to...
+	(sentinel_frame): ...this static global, which has also been
+	moved an earlier location in the file.
+	(fprint_frame_id): Add case for sentinel frame id.
+	(get_frame_id): Return early for sentinel frame.
+	(sentinel_frame_id): Define.
+	(frame_find_by_id): Add case for sentinel_frame_id.
+	(create_sentinel_frame): Use sentinel_frame_id for this_id.value
+	instead of null_frame_id.
+	(get_current_frame): Add local declaration for `current_frame'.
+	Remove local declaration for `sentinel_frame.'
+	(get_next_frame_sentinel_okay): New function.
+	(reinit_frame_cache): Use `sentinel_frame' in place of
+	`current_frame'.
+
+2016-11-15  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
+	38237baf99386101934cd93278023aa4ae523ec0.
+	* gnulib/configure, gnulib/config.in: Regenerate.
+	* gnulib/import/Makefile.am: Regenerate.
+	* gnulib/import/Makefile.in: Regenerate.
+	* gnulib/import/canonicalize-lgpl.c: Update.
+	* gnulib/import/extra/snippet/c++defs.h: Update.
+	* gnulib/import/m4/stdint.m4: Update.
+	* gnulib/import/m4/stdlib_h.m4: Update.
+	* gnulib/import/math.in.h: Update.
+	* gnulib/import/stdlib.in.h: Update.
+	* gnulib/import/sys_time.in.h: Update.
+
+2016-11-15  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h: Update comment.
+	* common/gdb_unique_ptr.h: Update header comment and copyright
+	year.
+	(gdb::unique_ptr, gdb::move): Delete.
+
+2016-11-15  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (create_excep_cond_exprs): Use std::move instead of
+	gdb::move.
+	* break-catch-throw.c (handle_gnu_v3_exceptions): Use
+	std::unique_ptr instead of gdb::unique_ptr.
+	* breakpoint.c (watch_command_1): Use std::move instead of
+	gdb::move.
+	* cli/cli-dump.c (dump_memory_to_file, restore_binary_file): Use
+	std::unique_ptr instead of gdb::unique_ptr.
+	* dtrace-probe.c (dtrace_process_dof_probe): Use std::move instead
+	of gdb::move.
+	* elfread.c (elf_read_minimal_symbols): Use std::unique_ptr
+	instead of gdb::unique_ptr.
+	* mi/mi-main.c (mi_cmd_data_read_memory): Use std::unique_ptr
+	instead of gdb::unique_ptr.
+	* parse.c (parse_expression_for_completion): Use std::move instead
+	of gdb::move.
+	* printcmd.c (display_command): std::move instead of gdb::move.
+
+2016-11-14  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.c (perf_event_read): Allow data_head < size.
+	* nat/linux-btrace.c (perf_event_read_all): Do not adjust size.
+
+2016-11-12  Tom Tromey  <tom@tromey.com>
+
+	* rust-exp.y (super_name): Use std::vector.
+	(lex_number): Use std::string.
+	(convert_params_to_types): Return std::vector.
+	(convert_ast_to_type, convert_name): Update.
+	* rust-lang.c (rust_get_disr_info): Use unique_xmalloc_ptr.
+
+2016-11-12  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (rust_get_disr_info): Use std::string in one more
+	spot.
+
+2016-11-11  Yao Qi  <yao.qi@linaro.org>
+
+	* spu-tdep.c (spu_software_single_step): Don't call
+	get_frame_register_bytes, call get_frame_register_unsigned
+	instead.
+
+2016-11-11  Yao Qi  <yao.qi@linaro.org>
+
+	* cp-valprint.c (cp_print_value): Remove local base_valaddr.
+	* extension-priv.h (struct extension_language_ops)
+	<apply_val_pretty_printer>: Remove the second parameter.
+	Remove const from "struct value *".  Callers updated.
+	* extension.c (apply_ext_lang_val_pretty_printer): Update
+	comments.  Remove parameter valaddr.  Remove const from
+	"struct value *".
+	* extension.h (apply_ext_lang_val_pretty_printer): Update
+	declaration.
+	* guile/guile-internal.h (gdbscm_apply_val_pretty_printer):
+	Update declaration.
+	* guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
+	Remove parameter valaddr.  Remove const from "struct value *".
+	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer):
+	Likewise.
+	* python/python-internal.h (gdbpy_apply_val_pretty_printer):
+	Update declaration.
+
+2016-11-11  Yao Qi  <yao.qi@linaro.org>
+
+	* c-lang.h (cp_print_value_fields): Update declaration.
+	* cp-valprint.c (cp_print_value): Update declaration.
+	(cp_print_value_fields): Remove parameter valaddr.  Callers
+	updated.
+	(cp_print_value): Likewise.
+
+2016-11-09  Tom Tromey  <tom@tromey.com>
+
+	* varobj.h (varobj_get_display_hint): Change return type.
+	* varobj.c (varobj_get_display_hint): Return unique_xmalloc_ptr.
+	(varobj_value_get_print_value): Update.
+	* python/python.c (gdbpy_before_prompt_hook, gdbpy_print_stack)
+	(gdbpy_apply_type_printers): Update.
+	* python/python-internal.h (unicode_to_target_string)
+	(python_string_to_target_string, python_string_to_host_string)
+	(gdbpy_obj_to_string, gdbpy_exception_to_string)
+	(gdbpy_get_display_hint): Change return types.
+	* python/py-varobj.c (py_varobj_iter_next): Update.
+	* python/py-value.c (valpy_getitem, convert_value_from_python):
+	Update.
+	* python/py-utils.c (unicode_to_encoded_string)
+	(unicode_to_target_string, python_string_to_target_string)
+	(python_string_to_host_string, gdbpy_obj_to_string)
+	(gdbpy_exception_to_string): Return unique_xmalloc_ptr.
+	* python/py-unwind.c (pyuw_parse_register_id): Update.
+	* python/py-type.c (typy_getitem): Update.
+	* python/py-prettyprint.c (gdbpy_get_display_hint)
+	(print_stack_unless_memory_error, print_children)
+	(gdbpy_apply_val_pretty_printer): Update.
+	* python/py-param.c (set_parameter_value): Update.
+	(get_doc_string, call_doc_function): Return unique_xmalloc_ptr.
+	(get_set_value, get_show_value, compute_enum_values, parmpy_init):
+	Update.
+	* python/py-infthread.c (thpy_set_name): Update.
+	* python/py-function.c (fnpy_call, fnpy_init): Update.
+	* python/py-framefilter.c (extract_sym): Change "name" to
+	unique_xmalloc_ptr.
+	(enumerate_args, enumerate_locals): Update.
+	(py_print_frame): Use unique_xmalloc_ptr.
+	* python/py-frame.c (frapy_read_var): Update.  Remove cleanup.
+	* python/py-cmd.c (cmdpy_function, cmdpy_completer, cmdpy_init):
+	Update.
+	* python/py-breakpoint.c (bppy_set_condition): Use
+	unique_xmalloc_ptr.
+	(bppy_init): Likewise.  Remove cleanup.
+	(local_setattro): Update.
+	* mi/mi-cmd-var.c (print_varobj, mi_cmd_var_list_children)
+	(varobj_update_one): Update.
+
+2016-11-09  Pedro Alves  <palves@redhat.com>
+
+	* ax-gdb.c (agent_eval_command_one): Use std::move instead of
+	gdb::move.
+	* ax.h (agent_expr_up): Use std::unique_ptr instead of
+	gdb::unique_ptr.
+	* breakpoint.c (parse_cond_to_aexpr): Use std::move instead of
+	gdb::move.
+	* tracepoint.c (collection_list::collect_symbol): Likewise.
+	(collection_list::~collection_list): Delete.
+	(encode_actions_1): Use std::move instead of gdb::move.
+	(collection_list::add_aexpr): Use std::move instead of
+	unique_ptr::release.
+	* tracepoint.h (collection_list) <~collection_list>: Delete
+	declaration.
+	<m_aexprs>: Now a vector of agent_ptr_up.
+
+2016-11-09  Pedro Alves  <palves@redhat.com>
+
+	* main.c (struct cmdarg): Add constructor.
+	(captured_main_1): Use vector::emplace_back.
+	* tracepoint.c (collection_list::add_memrange): Likewise.
+
+2016-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* tui/tui-winsource.c (tui_alloc_source_buffer): Remove
+	failed-xmalloc handling.
+
+2016-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* tui/tui-winsource.c (tui_alloc_source_buffer): Subtract
+	highlight box's overhead when calculating the content height.
+
+2016-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* tui/tui-disasm.c (tui_set_disassem_content): Fix calculation of
+	the longest disassembly line's length.
+
+2016-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* tui/tui-disasm.c (tui_set_disassem_content): Fix line buffer
+	overrun due to unchecked strcpy.
+
+2016-11-09  Tristan Gingold  <gingold@adacore.com>
+
+	* darwin-nat.c (find_inferior_task_it): Fix indentation.
+	(find_inferior_notify_it): Remove.
+	(find_inferior_pid_it): New function.
+	(darwin_find_inferior_by_notify): Remove.
+	(darwin_find_inferior_by_pid): New function.
+	(darwin_find_new_inferior): New function.
+	(darwin_check_message_ndr): New function from
+	darwin_decode_exception_message.
+	(darwin_decode_exception_message): Call darwin_check_message_ndr.
+	Handle SIGTRAP addressed to an unknown task (when a task spawned).
+	(darwin_decode_notify_message): New function.
+	(darwin_decode_message): Handle unknown task.
+	(darwin_deallocate_threads): New function from darwin_mourn_inferior.
+	(darwin_mourn_inferior): Use darwin_deallocate_threads and
+	darwin_deallocate_exception_ports.
+	(darwin_deallocate_exception_ports): New function from
+	darwin_mourn_inferior.
+	(darwin_setup_exceptions): New function from darwin_attach_pid.
+	(darwin_setup_request_notification): Likewise.
+	(darwin_attach_pid): Call darwin_setup_request_notification and
+	darwin_setup_request_notification.
+
+2016-11-08  Tom Tromey  <tom@tromey.com>
+
+	* python/py-framefilter.c (py_print_frame): Use
+	get_addr_from_python.  Check for errors when getting line number.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* ada-lang.h (ada_val_print): Remove second parameter.  Remove
+	const from "struct value *".
+	* ada-valprint.c (print_field_values): Remove const from
+	"struct value *".
+	(val_print_packed_array_elements): Likewise.
+	(print_variant_part): Likewise.
+	(ada_val_print_string): Likewise.
+	(ada_val_print_gnat_array): Likewise.
+	(ada_val_print_ptr): Likewise.
+	(ada_val_print_num): Likewise.
+	(ada_val_print_enum): Likewise.
+	(ada_val_print_flt): Likewise.
+	(ada_val_print_union): Likewise.
+	(ada_val_print_struct_union): Likewise.
+	(ada_val_print_ref): Likewise.
+	(ada_val_print_1): Remove second parameter.  Remove const from
+	"struct value *".
+	(ada_val_print): Likewise.
+	* c-lang.h (c_val_print): Likewise.
+	* c-valprint.c (c_val_print_array): Remove const from
+	"struct value *".
+	(c_val_print_ptr): Likewise.
+	(c_val_print_struct): Likewise.
+	(c_val_print_union): Likewise.
+	(c_val_print_int): Likewise.
+	(c_val_print_memberptr): Likewise.
+	(c_val_print): Remove second parameter.  Remove const from
+	"struct value *".  All callers updated.
+	* cp-valprint.c (cp_print_value): Remove const from
+	"struct value *".
+	(cp_print_value_fields): Likewise.
+	(c_val_print_value): Likewise.
+	* d-lang.h (d_val_print): Remove second parameter.  Remove const
+	from "struct value *".
+	* d-valprint.c (dynamic_array_type): Likewise.
+	(d_val_print): Likewise.
+	* f-lang.h (f_val_print): Likewise.
+	* f-valprint.c (f_val_print): Likewise.
+	* go-lang.h (go_val_print): Likewise.
+	* go-valprint.c (print_go_string): Likewise.
+	(go_val_print): Likewise.
+	* language.c (unk_lang_val_print): Likewise.
+	* language.h (struct language_defn) <la_val_print>: Likewise.
+	Update comments.
+	(LA_VAL_PRINT): Remove.
+	* m2-lang.h (m2_val_print): Remove const from
+	"struct value *".
+	* m2-valprint.c (m2_print_array_contents): Likewise.
+	(m2_val_print): Likewise.
+	* p-lang.h (pascal_val_print): Remove second parameter.  Remove
+	const from "struct value *".
+	(pascal_object_print_value_fields): Likewise.
+	* p-valprint.c (pascal_val_print): Likewise.
+	(pascal_object_print_value_fields): Likewise.
+	(pascal_object_print_value): Likewise.
+	* rust-lang.c (rust_get_disr_info): Likewise.
+	(val_print_struct): Likewise.
+	(rust_val_print): Likewise.
+	* valprint.c (generic_val_print_array): Likewise.
+	(generic_val_print_ptr): Likewise.
+	(generic_val_print_memberptr): Likewise.
+	(generic_val_print_ref): Likewise.
+	(generic_val_print_enum): Likewise.
+	(generic_val_print_flags): Likewise.
+	(generic_val_print_func): Likewise.
+	(generic_val_print_bool): Likewise.
+	(generic_val_print_int): Likewise.
+	(generic_val_print_char): Likewise.
+	(generic_val_print_float): Likewise.
+	(generic_val_print_decfloat): Likewise.
+	(generic_val_print_complex): Likewise.
+	(generic_val_print): Likewise.
+	(val_print): Likewise.
+	(common_val_print): Likewise.
+	(val_print_type_code_flags): Likewise.
+	(val_print_scalar_formatted): Likewise.
+	(val_print_array_elements): Likewise.
+	* valprint.h (val_print_array_elements): Update declaration.
+	(val_print_scalar_formatted): Likewise.
+	(generic_val_print): Likewise.
+	* value.h (val_print): Likewise.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* mt-tdep.c (mt_registers_info): Call
+	get_frame_register_value instead of
+	deprecated_frame_register_read.
+	* sh64-tdep.c (sh64_do_register): Likewise.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ax.h (agent_expr_p): Delete.
+	(DEF_VEC_P (agent_expr_p)): Delete.
+	* breakpoint.c (build_target_condition_list)
+	(build_target_command_list): Adjust to use of std::vector.
+	(bp_location_dtor): Remove now unnecessary VEC_free calls.
+	* breakpoint.h: Include <vector>.
+	(struct bp_target_info) <conditions, tcommands>: Now
+	std::vector's.
+	* remote.c (remote_add_target_side_condition): bp_tgt->conditions
+	is now a std::vector; adjust.
+	(remote_add_target_side_commands, remote_insert_breakpoint):
+	bp_tgt->tcommands is now a std::vector; adjust.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ax-gdb.c (is_nontrivial_conversion): Use agent_expr_up.
+	(gen_trace_for_var, gen_trace_for_expr, gen_eval_for_expr)
+	(gen_trace_for_return_address, gen_printf): Use and return an
+	agent_expr_up.  Don't use make_cleanup_free_agent_expr.
+	(agent_eval_command_one, maint_agent_printf_command): Use
+	agent_expr_up.  Don't use make_cleanup_free_agent_expr.
+	* ax-gdb.h (gen_trace_for_expr, gen_trace_for_var)
+	(gen_trace_for_return_address, gen_eval_for_expr, gen_printf): Use
+	agent_expr_up.
+	* ax-general.c (new_agent_expr): Rename to ...
+	(agent_expr::agent_expr): ... this, and now a constructor.
+	(free_agent_expr): Rename to ...
+	(agent_expr::~agent_exp): ... this, and now a destructor.
+	(do_free_agent_expr_cleanup, make_cleanup_free_agent_expr):
+	Delete.
+	* ax.h (struct agent_expr): Add ctor/dtor.
+	(agent_expr_up): New typedef.
+	(new_agent_expr, free_agent_expr, make_cleanup_free_agent_expr):
+	Delete declarations.
+	* breakpoint.c (parse_cond_to_aexpr): Use and return an
+	agent_expr_up.  Don't use make_cleanup_free_agent_expr.
+	(build_target_condition_list): Adjust to use agent_expr_up.
+	(parse_cmd_to_aexpr): Use and return an agent_expr_up.  Don't use
+	make_cleanup_free_agent_expr.
+	(build_target_command_list): Adjust to use agent_expr_up.
+	(force_breakpoint_reinsertion): Adjust to use agent_expr_up.
+	(bp_location_dtor): Remove unnecessary free_agent_expr and xfree
+	calls.
+	* breakpoint.h (struct bp_target_info) <cond_bytecode,
+	cmd_bytecode>: Now agent_expr_up's.
+	* remote.c (remote_download_tracepoint): Adjust to use
+	agent_expr_up and remove use of make_cleanup_free_agent_expr.
+	* tracepoint.c (validate_actionline, collect_symbol): Adjust to
+	use agent_expr_up and remove uses of make_cleanup_free_agent_expr.
+	(collection_list::~collection_list): Call delete instead of
+	free_agent_expr.
+	(encode_actions_1): Adjust to use agent_expr_up and remove uses of
+	make_cleanup_free_agent_expr.
+	(add_aexpr): Change parameter type to agent_expr_up; Return a raw
+	agent_expr pointer.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_name_for_lookup, type_as_string): Use and return
+	std::string.
+	(type_as_string_and_cleanup): Delete.
+	(ada_lookup_struct_elt_type): Use type_as_string.
+	* ada-lang.h (ada_name_for_lookup): Now returns std::string.
+	* ada-varobj.c (ada_varobj_scalar_image): Return a std::string.
+	(ada_varobj_describe_child): Make 'child_name' and
+	'child_path_expr' parameters std::string pointers.
+	(ada_varobj_describe_struct_child, ada_varobj_describe_ptr_child):
+	Likewise, and use string_printf.
+	(ada_varobj_describe_simple_array_child)
+	(ada_varobj_describe_child): Likewise.
+	(ada_varobj_get_name_of_child, ada_varobj_get_path_expr_of_child)
+	(ada_varobj_get_value_image)
+	(ada_varobj_get_value_of_array_variable)
+	(ada_varobj_get_value_of_variable, ada_name_of_variable)
+	(ada_name_of_child, ada_path_expr_of_child)
+	(ada_value_of_variable): Now returns std::string.  Use
+	string_printf.
+	(ada_value_of_child): Adjust.
+	* break-catch-throw.c (check_status_exception_catchpoint): Adjust
+	to use std::string.
+	* breakpoint.c (watch_command_1): Adjust to use std::string.
+	* c-lang.c (c_get_string): Adjust to use std::string.
+	* c-typeprint.c (print_name_maybe_canonical): Use std::string.
+	* c-varobj.c (varobj_is_anonymous_child): Use ==/!= std::string
+	operators.
+	(c_name_of_variable): Now returns a std::string.
+	(c_describe_child): The 'cname' and 'cfull_expression' output
+	parameters are now std::string pointers.  Adjust.
+	(c_name_of_child, c_path_expr_of_child, c_value_of_variable)
+	(cplus_number_of_children): Adjust to use std::string and
+	string_printf.
+	(cplus_name_of_variable): Now returns a std::string.
+	(cplus_describe_child): The 'cname' and 'cfull_expression' output
+	parameters are now std::string pointers.  Adjust.
+	(cplus_name_of_child, cplus_path_expr_of_child)
+	(cplus_value_of_variable): Now returns a std::string.
+	* cp-abi.c (cplus_typename_from_type_info): Return std::string.
+	* cp-abi.h (cplus_typename_from_type_info): Return std::string.
+	(struct cp_abi_ops) <get_typename_from_type_info>: Return
+	std::string.
+	* cp-support.c (inspect_type): Use std::string.
+	(cp_canonicalize_string_full, cp_canonicalize_string_no_typedefs)
+	(cp_canonicalize_string): Return std::string and adjust.
+	* cp-support.h (cp_canonicalize_string)
+	(cp_canonicalize_string_no_typedefs, cp_canonicalize_string_full):
+	Return std::string.
+	* dbxread.c (read_dbx_symtab): Use std::string.
+	* dwarf2read.c (dwarf2_canonicalize_name): Adjust to use std::string.
+	* gdbcmd.h (lookup_struct_elt_type): Adjust to use std::string.
+	* gnu-v3-abi.c (gnuv3_get_typeid): Use std::string.
+	(gnuv3_get_typename_from_type_info): Return a std::string and
+	adjust.
+	(gnuv3_get_type_from_type_info): Adjust to use std::string.
+	* guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
+	std::string.
+	* infcmd.c (print_return_value_1): Adjust to use std::string.
+	* linespec.c (find_linespec_symbols): Adjust to
+	demangle_for_lookup API change.  Use std::string.
+	* mi/mi-cmd-var.c (print_varobj, mi_cmd_var_set_format)
+	(mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
+	(mi_cmd_var_info_expression, mi_cmd_var_evaluate_expression)
+	(mi_cmd_var_assign, varobj_update_one): Adjust to use std::string.
+	* minsyms.c (lookup_minimal_symbol): Use std::string.
+	* python/py-varobj.c (py_varobj_iter_next): Use new instead of
+	XNEW.  vitem->name is a std::string now, adjust.
+	* rust-exp.y (convert_ast_to_type, convert_name): Adjust to use
+	std::string.
+	* stabsread.c (define_symbol): Adjust to use std::string.
+	* symtab.c (demangle_for_lookup): Now returns 'const char *'.  Add
+	a demangle_result_storage parameter.  Use it for storage.
+	(lookup_symbol_in_language)
+	(lookup_symbol_in_objfile_from_linkage_name): Adjust to new
+	demangle_for_lookup API.
+	* symtab.h (struct demangle_result_storage): New type.
+	(demangle_for_lookup): Now returns 'const char *'.  Add a
+	demangle_result_storage parameter.
+	* typeprint.c (type_to_string): Return std::string and use
+	ui_file_as_string.
+	* value.h (type_to_string): Change return type to std::string.
+	* varobj-iter.h (struct varobj_item) <name>: Now a std::string.
+	(varobj_iter_delete): Use delete instead of xfree.
+	* varobj.c (create_child): Return std::string instead of char * in
+	output parameter.
+	(name_of_variable, name_of_child, my_value_of_variable): Return
+	std::string instead of char *.
+	(varobj_create, varobj_get_handle): Constify 'objname' parameter.
+	Adjust to std::string fields.
+	(varobj_get_objname): Return a const char * instead of a char *.
+	(varobj_get_expression): Return a std::string.
+	(varobj_list_children): Adjust to use std::string.
+	(varobj_get_type): Return a std::string.
+	(varobj_get_path_expr): Return a const char * instead of a char *.
+	Adjust to std::string fields.
+	(varobj_get_formatted_value, varobj_get_value): Return a
+	std::string.
+	(varobj_set_value): Change type of 'expression' parameter to
+	std::string.  Use std::string.
+	(install_new_value): Use std::string.
+	(delete_variable_1): Adjust to use std::string.
+	(create_child): Change the 'name' parameter to a std::string
+	reference.  Swap it into the new item's name.
+	(create_child_with_value): Swap item's name into the new child's
+	name.  Use string_printf.
+	(new_variable): Use new instead of XNEW.
+	(free_variable): Don't xfree fields that are now std::string.
+	(name_of_variable, name_of_child): Now returns std::string.
+	(value_of_root): Adjust to use std::string.
+	(my_value_of_variable, varobj_value_get_print_value): Return
+	and use std::string.
+	(varobj_value_get_print_value): Adjust to use ui_file_as_string
+	and std::string.
+	* varobj.h (struct varobj) <name, path_expr, obj_name,
+	print_value>: Now std::string's.
+	<name_of_variable, name_of_child, path_expr_of_child,
+	value_of_variable>: Return std::string.
+	(varobj_create, varobj_get_handle): Constify 'objname' parameter.
+	(varobj_get_objname): Return a const char * instead of a char *.
+	(varobj_get_expression, varobj_get_type): Return a std::string.
+	(varobj_get_path_expr): Return a const char * instead of a char *.
+	(varobj_get_formatted_value, varobj_get_value): Return a
+	std::string.
+	(varobj_set_value): Constify 'expression' parameter.
+	(varobj_value_get_print_value): Return a std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* language.c (add_language): Use ui_file_as_string and adjust to
+	use std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+	    Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (struct disr_info) <name>: Now a std::string.
+	(rust_get_disr_info): Use ui_file_as_string and adjust to use
+	std::string.
+	(rust_val_print): Adjust to use std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* infrun.c (print_target_wait_results): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (type_as_string): Use ui_file_as_string and return
+	std::string.
+	(type_as_string_and_cleanup): Delete.
+	(ada_lookup_struct_elt_type): Use type_as_string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* gdbarch.sh (verify_gdbarch): Use ui_file_as_string and
+	std::string.
+	* gdbarch.c: Regenerate.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* c-exp.y (OPERATOR NEW): Adjust to use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* c-lang.h (c_compute_program): Now returns std::string.
+	* compile/compile-internal.h (class compile_file_names): New
+	class.
+	* compile/compile-object-load.c (compile_object_load): Replace
+	object_file and source_file parameters with a compile_file_names
+	parameter.  Adjust.
+	* compile-object-load.h: Include "compile-internal.h".
+	(compile_object_load): Replace object_file and source_file
+	parameters with a compile_file_names parameter.
+	* compile/compile-c-support.c (c_compute_program): Now returns a
+	std::string.  Use ui_file_as_string.
+	* compile/compile.c (get_new_file_names): Remove parameters and
+	return a compile_file_names instead.
+	(compile_to_object): Now returns a compile_file_names.  Use
+	ui_file_as_string.
+	(eval_compile_command): Use compile_file_names.
+	* language.h (struct language_defn) <la_compute_program>: Now
+	returns std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-setshow.c (do_show_command): Adjust to use
+	ui_file_as_string and std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (escape_buffer): Use ui_file_as_string and return
+	std::string.
+	(putpkt_binary, read_frame): Adjust to use std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* python/py-arch.c (archpy_disassemble): Use ui_file_as_string and
+	std::string.
+	* python/py-breakpoint.c (bppy_get_commands): Use
+	ui_file_as_string and std::string.
+	* python/py-frame.c (frapy_str): Likewise.
+	* python/py-type.c (typy_str): Likewise.
+	* python/py-unwind.c (unwind_infopy_str): Likewise.
+	* python/py-value.c (valpy_str): Likewise.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* printcmd.c (eval_command): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* top.c (quit_confirm): Use ui_file_as_string and std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* gdbcmd.h (execute_command_to_string): Now returns std::string.
+	(lookup_struct_elt_type): Adjust to use std::string.
+	* top.c (execute_command_to_string): Use ui_file_as_string and
+	return std::string.
+	* guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
+	std::string.
+	* python/python.c (execute_gdb_command): Adjust to use
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
+	ui_file_as_string and adjust to use std::string.
+	* guile/scm-disasm.c (gdbscm_arch_disassemble): Likewise.
+	* guile/scm-frame.c (frscm_print_frame_smob): Likewise.
+	* guile/scm-type.c (tyscm_type_name): Use ui_file_as_string and
+	adjust to use std::string.  Throw exception directly instead of
+	returning it in EXCP output parameter.
+	(tyscm_print_type_smob, gdbscm_type_print_name): Adjust to
+	tyscm_type_name interface change.
+	* guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
+	Use ui_file_as_string and std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* utils.c (error_stream): Use ui_file_as_string and std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ui-out.c (ui_out_field_stream): Use ui_file_as_string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ada-valprint.c (ada_print_floating): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* xtensa-tdep.c (xtensa_verify_config): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2read.c (dwarf2_compute_name): Use ui_file_as_string and
+	std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-main.c (print_variable_or_computed): Constify 'expression'
+	parameter.
+	(mi_cmd_trace_frame_collected): Call encode_actions instead of
+	encode_actions_and_make_cleanup.  Adjust to use std::vector.
+	* tracepoint.c (memrange_cmp): Delete.
+	(memrange_comp): New.
+	(memrange_sortmerge): Take a memrange vector as parameter instead
+	of a collection_list.  Use std::sort instead of qsort.
+	(add_register): Now a method of collection_list.  Adjust to m_
+	prefix of data fields.
+	(add_memrange): Now a method of collection_list.  Adjust to m_
+	prefix of data fields.  Adjust to use std::vector.
+	(collect_symbol): Now a method of collection_list.  Adjust to m_
+	prefix of data fields.
+	(do_collect_symbol): Adjust.  Call add_wholly_collected instead of
+	accessing the vector directly.
+	(collection_list::add_wholly_collected): New.
+	(add_local_symbols): Now a method of collection_list.
+	(add_static_trace_data): Now a method of collection_list.  Adjust
+	to use bool.
+	(clear_collection_list, do_clear_collection_list): Delete.
+	(init_collection_list): Delete.
+	(collection_list::collection_list): New.
+	(collection_list::~collection_list): New.
+	(stringify_collection_list): Rename to ...
+	(collection_list::stringify): ... this and adjust to being a
+	method of collection_list.  Adjust to use of std::vector.
+	(append_exp): Now a method of collection_list.  Use
+	ui_file_as_string.  Adjust to std::vector.
+	(collection_list::finish): New.
+	(encode_actions_1): Adjust.
+	(encode_actions_and_make_cleanup): Rename to ...
+	(encode_actions)... this.  No longer returns a cleanup.  No longer
+	call init_collection_list nor install do_clear_collection_list
+	cleanups.  Call collection_list::finish instead of
+	memrange_sortmerge directly.
+	(encode_actions_rsp): Adjust to call encode_actions instead of
+	encode_actions_and_make_cleanup.  Adjust to method renames.
+	(add_aexpr): Now a method of collection_list.
+	* tracepoint.h: Include <vector> and <string>.
+	(struct memrange): Add constructors.
+	(struct collection_list): Now a class.
+	(class collection_list) <collection_list, ~collection_list,
+	add_wholly_collected, append_exp, add_aexpr, add_register,
+	add_memrange, collect_symbol, add_local_symbols,
+	add_static_trace_data, finish, stringify, wholly_collected, and
+	computed>: New methods.
+	<regs_mask>: Rename to ...
+	<m_regs_mask>: ... this.
+	<listsize, next_memrange, list>: Delete fields.
+	<m_memranges>: New field.
+	<aexpr_listsize, next_aexpr_elt, aexpr_list>: Delete fields.
+	<m_aexprs>: New field.
+	<strace_data>: Rename to ...
+	<m_strace_data>: ... this.  Now a bool.
+	<wholly_collected>: Rename to ...
+	<m_wholly_collected>: ... this.  Now a std::vector<std::string>.
+	<computed>: Rename to ...
+	<m_computed>: ... this.  Now a std::vector<std::string>.
+	(encode_actions_and_make_cleanup): Delete declaration.
+	(encode_actions): New declaration.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ui-file.c (do_ui_file_as_string, ui_file_as_string): New
+	functions.
+	* ui-file.h: Include <string>.
+	(ui_file_as_string): New declaration.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_read_renaming_var_value): Use expression_up.
+	(struct ada_catchpoint_location) <excep_cond_expr>: Now an
+	expression_up.
+	(ada_catchpoint_location_dtor): Reset excep_cond_expr instead of
+	using xfree.
+	(create_excep_cond_exprs): Use expression_up and gdb::move.
+	(allocate_location_exception): Use new instead of XNEW.
+	(should_stop_exception): Likewise.  Adjust to use expression_up.
+	(create_ada_exception_catchpoint): Use new instead of XNEW.
+	* ax-gdb.c (agent_eval_command_one): Use expression_up instead of
+	cleanups.
+	(maint_agent_printf_command): Use expression_up.
+	* break-catch-sig.c (create_signal_catchpoint): Use new instead of
+	XNEW.
+	* break-catch-syscall.c (create_syscall_event_catchpoint):
+	Likewise.
+	* break-catch-throw.c (handle_gnu_v3_exceptions): Use new instead
+	of XCNEW.  Use gdb::unique_ptr instead of cleanups.
+	* breakpoint.c (set_breakpoint_condition, update_watchpoint)
+	(parse_cmd_to_aexpr, watchpoint_check)
+	(bpstat_check_breakpoint_conditions, watchpoint_locations_match):
+	Adjust to use expression_up.
+	(init_bp_location): Adjust.
+	(free_bp_location): Use delete instead of xfree.
+	(set_raw_breakpoint_without_location, set_raw_breakpoint)
+	(add_solib_catchpoint, create_fork_vfork_event_catchpoint)
+	(new_single_step_breakpoint, create_breakpoint_sal): Use new
+	instead of XNEW.
+	(find_condition_and_thread): Adjust to use expression_up.
+	(create_breakpoint): Use new instead of XNEW.
+	(dtor_watchpoint): Don't xfree expression pointers, they're
+	unique_ptr's now.
+	(insert_watchpoint, remove_watchpoint): Adjust.
+	(watch_command_1): Use expression_up.  Use new instead of XCNEW.
+	(catch_exec_command_1): Use new instead of XNEW.
+	(bp_location_dtor): Don't xfree expression pointers, they're
+	unique_ptr's now.
+	(base_breakpoint_allocate_location)
+	(strace_marker_create_breakpoints_sal): Use new instead of XNEW.
+	(delete_breakpoint): Use delete instead of xfree.
+	* breakpoint.h (struct bp_location) <cond>: Now an
+	unique_ptr<expression> instead of a raw pointer.
+	(struct watchpoint) <exp, cond_exp>: Likewise.
+	* cli/cli-script.c (execute_control_command): Use expression_up
+	instead of cleanups.
+	* dtrace-probe.c (dtrace_process_dof_probe): Use expression_up.
+	* eval.c (parse_and_eval_address, parse_and_eval_long)
+	(parse_and_eval, parse_to_comma_and_eval, parse_and_eval_type):
+	Use expression_up instead of cleanups.
+	* expression.h (expression_up): New typedef.
+	(parse_expression, parse_expression_with_language, parse_exp_1):
+	Change return type to expression_up.
+	* mi/mi-main.c (mi_cmd_data_evaluate_expression)
+	(print_variable_or_computed): Use expression_up.
+	* objc-lang.c (print_object_command): Use expression_up instead of
+	cleanups.
+	* parse.c (parse_exp_1, parse_exp_in_context)
+	(parse_exp_in_context_1, parse_expression)
+	(parse_expression_with_language): Return an expression_up instead
+	of a raw pointer.
+	(parse_expression_for_completion): Use expression_up.
+	* printcmd.c (struct display) <exp>: Now an expression_up instead
+	of a raw pointer.
+	(print_command_1, output_command_const, set_command, x_command):
+	Use expression_up instead of cleanups.
+	(display_command): Likewise.  Use new instead of XNEW.
+	(free_display): Use delete instead of xfree.
+	(do_one_display): Adjust to use expression_up.
+	* remote.c (remote_download_tracepoint): Likewise.
+	* stack.c (return_command): Likewise.
+	* tracepoint.c (validate_actionline, encode_actions_1): Use
+	expression_up instead of cleanups.
+	* typeprint.c (whatis_exp, maintenance_print_type): Likewise.
+	* value.c (init_if_undefined_command): Likewise.
+	* varobj.c (struct varobj_root) <exp>: Now an expression_up
+	instead of a raw pointer.
+	(varobj_create): Adjust.
+	(varobj_set_value): Use an expression_up instead of cleanups.
+	(new_root_variable): Use new instead of XNEW.
+	(free_variable): Use delete instead of xfree.
+	(value_of_root_1): Use std::swap.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-script.c (execute_control_command): Use std::string
+	instead of cleanups.
+	(locate_arg): Constify return type.
+	(insert_args): Constify paremeter.  Simplify using std::string.
+	Return a std::string.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (struct commands_info) <arg>: Constify.
+	(commands_command_1): Constify 'arg' parameter.  Use std::string
+	and string_printf.
+	(commands_from_control_command): Constify 'arg' parameter.
+	(map_breakpoint_numbers): Constify 'args' parameter.
+	* breakpoint.h (commands_from_control_command): Constify 'arg'
+	parameter.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-script.c (execute_control_command): Assume insert_args
+	never returns NULL.
+	(insert_args): Assume xmalloc never returns NULL.
+
+2016-11-08  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMMON_OBS): Add utils-selftests.o.
+	* common/common-utils.c (string_printf): New function.
+	* common/common-utils.h: Include <string>.
+	(string_printf): Declare.
+	* utils-selftests.c: New file.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_software_single_step): Return
+	VEC (CORE_ADDR) *.  Return NULL instead of 0.  Don't call
+	insert_single_step_breakpoint.
+	* alpha-tdep.c (alpha_deal_with_atomic_sequence): Likewise.
+	(alpha_software_single_step): Likewise.
+	* alpha-tdep.h (alpha_software_single_step): Update declaration.
+	* arm-linux-tdep.c (arm_linux_software_single_step): Return
+	VEC (CORE_ADDR) *.  Return NULL instead of 0.
+	* arm-tdep.c (arm_software_single_step): Return NULL instead of	0.
+	* arm-tdep.h (arm_software_single_step): Update declaration.
+	* breakpoint.c (insert_single_step_breakpoints): New function.
+	* breakpoint.h (insert_single_step_breakpoints): Declare.
+	* cris-tdep.c (cris_software_single_step): Return
+	VEC (CORE_ADDR) *.  Don't call insert_single_step_breakpoint.
+	* gdbarch.sh (software_single_step): Change it to return
+	VEC (CORE_ADDR) *.
+	* gdbarch.c, gdbarch.h: Regenerated.
+	* infrun.c (maybe_software_singlestep): Adjust.
+	* mips-tdep.c (mips_deal_with_atomic_sequence): Return
+	VEC (CORE_ADDR) *.  Don't call insert_single_step_breakpoint.
+	(micromips_deal_with_atomic_sequence): Likewise.
+	(deal_with_atomic_sequence): Likewise.
+	(mips_software_single_step): Likewise.
+	* mips-tdep.h (mips_software_single_step): Update declaration.
+	* moxie-tdep.c (moxie_software_single_step): Likewise.
+	* nios2-tdep.c (nios2_software_single_step): Likewise.
+	* ppc-tdep.h (ppc_deal_with_atomic_sequence): Update
+	declaration.
+	* record-full.c (record_full_resume): Adjust.
+	(record_full_wait_1): Likewise.
+	* rs6000-aix-tdep.c (rs6000_software_single_step): Return
+	VEC (CORE_ADDR) *.  Don't call insert_single_step_breakpoint.
+	* rs6000-tdep.c	(ppc_deal_with_atomic_sequence): Return
+	VEC (CORE_ADDR) *.  Don't call insert_single_step_breakpoint.
+	* s390-linux-tdep.c (s390_software_single_step): Likewise.
+	* sparc-tdep.c (sparc_software_single_step): Likewise.
+	* spu-tdep.c (spu_software_single_step): Likewise.
+	* tic6x-tdep.c (tic6x_software_single_step): Likewise.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_software_single_step): Write
+	adjusted address back to vector.  Call insert_single_step_breakpoint
+	in a new loop.
+	* arm-tdep.c (arm_software_single_step): Likewise.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_software_single_step): Don't
+	call arm_insert_single_step_breakpoint, call
+	insert_single_step_breakpoint instead.
+	* arm-tdep.c (arm_insert_single_step_breakpoint): Remove.
+	(arm_software_single_step): Don't call
+	arm_insert_single_step_breakpoint, call
+	insert_single_step_breakpoint instead.
+	* arm-tdep.h (arm_insert_single_step_breakpoint): Remove
+	declaration.
+
+2016-11-08  Cordian A. Daniluk  <th3c0r1uk@gmail.com>
+
+	PR breakpoints/20739
+	* breakpoint.c (check_fast_tracepoint_sals): Don't print duplicate
+	0x prefix.
+
+2016-11-08  Yao Qi  <yao.qi@linaro.org>
+
+	* rust-lang.c (val_print_struct): Fix indentation.
+
+2016-11-08  Lionel Flandrin  <lionel@svkt.org>
+
+	* remote.c (process_g_packet): Detect truncated registers in 'g'
+	packets and raise an error.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
+	* guile/scm-value.c (gdbscm_value_field): Fix call to value_struct_elt.
+	* python/py-value.c (valpy_getitem): Ditto.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
+	* i386-tdep.c (i386_gdbarch_init): Add comments.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
+	* python/py-unwind.c (unwind_infopy_str): Fix use of VEC_iterate.
+
+2016-11-07  Doug Evans  <dje@google.com>
+
+	* configure.tgt (x86_64-*-elf*): Remove i386bsd-tdep.o.
+
+2016-11-04  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* maint.c (scoped_command_stats::scoped_command_stats): Fix typo.
+	* ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Likewise.
+	* ppcobsd-tdep.c (_initialize_ppcobsd_tdep): Likewise.
+	* ui-out.c (ui_out_new): Likewise.
+	* utils.c (init_page_info): Likewise.
+	(reset_prompt_for_continue_wait_time): Likewise.
+	* windows-nat.c (windows_init_thread_list): Likewise.
+	* xtensa-tdep.c (call0_analyze_prologue): Likewise.
+
+2016-10-29  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-exp.y: Parse `sizeof(exp)` as `UNOP_SIZEOF`.
+
+2016-10-28  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_union_is_untagged): Add function to check if a
+	union is an untagged union.
+	(rust_val_print): Handle printing of untagged union values.
+	(rust_print_type): Handle printing of untagged union types.
+	(rust_evaluate_subexp): Handle evaluating field access on untagged
+	unions.
+
+2016-10-27  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_get_disr_info): Treat univariant enums without
+	discriminants as encoded enums with a real field.
+	* rust-lang.c (rust_evaluate_subexp): Handle field access on
+	encoded struct-like enums.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (.y.c): Replace YY_NULL with YY_NULLPTR.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+	    Pedro Alves <palves@redhat.com>
+
+	* aarch64-tdep.c (aarch64_default_breakpoint): Change it to
+	constexpr.  Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(aarch64_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* alpha-tdep.c (break_insn): Rename to alpha_break_insn.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(alpha_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* arc-tdep.c (arc_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Remove.
+	(struct bp_manipulation): New.
+	(SET_GDBARCH_BREAKPOINT_MANIPULATION): Remove.
+	(struct bp_manipulation_endian): New.
+	(BP_MANIPULATION): New.
+	(BP_MANIPULATION_ENDIAN): New.
+	* arm-tdep.c (arm_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* avr-tdep.c (avr_break_insn): Change it constexpr.
+	(avr_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* bfin-tdep.c (bfin_gdbarch_init): Likewise.
+	* cris-tdep.c (cris_gdbarch_init): Likewise.
+	* frv-tdep.c (breakpoint): Rename it to frv_break_insn, and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(frv_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* ft32-tdep.c (breakpoint): Rename it to ft32_break_insn and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(ft32_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* h8300-tdep.c (breakpoint): Rename it to h8300_break_insn.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(h8300_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* hppa-tdep.c (breakpoint): Rename it to h8300_break_insn.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(hppa_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* i386-tdep.c (break_insn): Rename it to i386_break_insn.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(i386_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* iq2000-tdep.c (iq2000_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* lm32-tdep.c (breakpoint): Rename it to lm32_break_insn and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(lm32_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* m32c-tdep.c (break_insn): Rename it to m32c_break_insn and change
+	its type to constexpr.  Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(m32c_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* m32r-tdep.c (m32r_gdbarch_init): Likewise.
+	* m68hc11-tdep.c (breakpoint): Rename it to m68hc11_break_insn and
+	change its type to constexpr.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(m68hc11_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* m68k-tdep.c (break_insn): Rename it to m68k_break_insn and change
+	its type to constexpr.  Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(m68k_gdbarch_init):  Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* m88k-tdep.c (break_insn): Rename it to m88k_break_insn and change
+	its type to constexpr.  Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(m88k_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* mep-tdep.c (breakpoint): Rename it to mep_break_insn and change
+	its type to constexpr.  Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(mep_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* microblaze-tdep.c (break_insn): Rename it to
+	microblaze_break_insn and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(microblaze_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* mips-tdep.c (mips_gdbarch_init): Likewise.
+	* mn10300-tdep.c (breakpoint): Rename it to mn10300_break_insn and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(mn10300_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* moxie-tdep.c (breakpoint): Rename it to moxie_break_insn and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(moxie_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* msp430-tdep.c (breakpoint): Rename it to msp430_break_insn
+	and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(msp430_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* mt-tdep.c (mt_gdbarch_init): Likewise.
+	* nds32-tdep.c (break_insn): Rename it to nds32_break_insn
+	and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(nds32_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* nios2-tdep.c (nios2_gdbarch_init): Likewise.
+	* rl78-tdep.c (breakpoint): Rename it to rl78_break_ins
+	and change its type to rl78_break_insn.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(rl78_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* rs6000-tdep.c (big_breakpoint): Change its type to
+	constexpr.
+	(little_breakpoint): Likewise.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN.
+	(rs6000_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* rx-tdep.c (breakpoint): Rename it to rx_break_insn and
+	change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(rx_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* s390-linux-tdep.c (breakpoint): Rename it to s390_break_insn
+	and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION
+	(s390_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* score-tdep.c (score_gdbarch_init): Likewise.
+	* sh-tdep.c (sh_gdbarch_init): Likewise.
+	* sh64-tdep.c (sh64_gdbarch_init): Likewise.
+	* sparc-tdep.c (break_insn): Rename it to sparc_break_insn
+	and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(sparc32_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* spu-tdep.c (breakpoint): Rename it to spu_break_insn and change
+	its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(spu_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* tic6x-tdep.c (tic6x_gdbarch_init): Likewise.
+	* tilegx-tdep.c (breakpoint): Rename it to tilegx_break_insn
+	and change its type to constexpr.  Don't use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(tilegx_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* v850-tdep.c (v850_gdbarch_init): Likewise.
+	* vax-tdep.c (break_insn): Rename it to vax_break_insn and
+	change its type to constexpr.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(vax_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* xstormy16-tdep.c (breakpoint): Rename it to
+	xstormy16_break_insn and change its type to constexpr.
+	Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+	(xstormy16_gdbarch_init): Don't use
+	SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_override_mode): Remove.
+	(arm_pc_is_thumb): Update.
+	(arm_insert_single_step_breakpoint): Update.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.c (default_breakpoint_kind_from_current_state):
+	New function.
+	* arch-utils.h (default_breakpoint_kind_from_current_state):
+	Declare.
+	* arm-tdep.c (arm_breakpoint_kind_from_current_state): New
+	function.
+	(arm_gdbarch_init): Call
+	set_gdbarch_breakpoint_kind_from_current_state.
+	* breakpoint.c (breakpoint_kind): Call
+	gdbarch_breakpoint_kind_from_current_state for single step
+	breakpoint.  Update comments.
+	* gdbarch.sh (breakpoint_kind_from_current_state): New.
+	* gdbarch.c, gdbarch.h: Regenerate.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.c (default_breakpoint_from_pc): New function.
+	* arch-utils.h (GDBARCH_BREAKPOINT_FROM_PC): Remove.
+	(GDBARCH_BREAKPOINT_MANIPULATION): Don't use
+	GDBARCH_BREAKPOINT_FROM_PC.
+	(SET_GDBARCH_BREAKPOINT_MANIPULATION): Don't call
+	set_gdbarch_breakpoint_from_pc.
+	(default_breakpoint_from_pc): Remove declaration.
+	* gdbarch.sh (breakpoint_from_pc): Add its default implementation.
+	* gdbarch.c, gdbarch.h: Regenerate.
+	* arm-tdep.c: Don't use GDBARCH_BREAKPOINT_FROM_PC.
+	* arc-tdep.c, bfin-tdep.c, cris-tdep.c, iq2000-tdep.c: Likewise.
+	* m32r-tdep.c, mips-tdep.c, mt-tdep.c: Likewise.
+	* nios2-tdep.c, score-tdep.c, sh-tdep.c: Likewise.
+	* sh64-tdep.c, tic6x-tdep.c, v850-tdep.c, xtensa-tdep.c: Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.c (default_remote_breakpoint_from_pc): Remove.
+	* arch-utils.h (default_remote_breakpoint_from_pc): Remove.
+	* arm-tdep.c (arm_remote_breakpoint_from_pc): Remove.
+	(arm_gdbarch_init): Don't call
+	set_gdbarch_remote_breakpoint_from_pc.
+	* gdbarch.sh (remote_breakpoint_from_pc): Remove.
+	* gdbarch.c, gdbarch.h: Regenerate.
+	* mips-tdep.c (mips_remote_breakpoint_from_pc): Remove.
+	(mips_gdbarch_init): Don't call
+	set_gdbarch_remote_breakpoint_from_pc.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* breakpoint.h (struct bp_target_info) <placed_size>: Remove.
+	<kind>: New field.
+	Update all users.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Define
+	breakpoint_kind_from_pc and sw_breakpoint_from_kind.
+	(GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN): Likewise.
+	(SET_GDBARCH_BREAKPOINT_MANIPULATION): Call
+	set_gdbarch_breakpoint_kind_from_pc and
+	set_gdbarch_sw_breakpoint_from_kind.
+	* arm-tdep.c: Add comments.
+	* bfin-tdep.c: Likewise.
+	* breakpoint.c (breakpoint_kind): New function.
+	(insert_bp_location): Set target_info.placed_size and
+	target_info.placed_address.
+	(bkpt_insert_location): Likewise.
+	* cris-tdep.c: Add comments.
+	* gdbarch.sh (breakpoint_kind_from_pc): New.
+	(sw_breakpoint_from_kind): New.
+	* gdbarch.c, gdbarch.h: Regenerated.
+	* ia64-tdep.c (ia64_memory_insert_breakpoint): Don't set
+	bp_tgt->placed_size.
+	(ia64_memory_remove_breakpoint): Don't assert
+	bp_tgt->placed_size.
+	(ia64_breakpoint_kind_from_pc): New function.
+	(ia64_gdbarch_init): Install ia64_breakpoint_kind_from_pc.
+	* m32r-tdep.c (m32r_memory_insert_breakpoint): Don't set
+	bp_tgt->placed_size.
+	* mem-break.c (default_memory_insert_breakpoint): Don't set
+	bp_tgt->placed_size.  Call gdbarch_sw_breakpoint_from_kind.
+	(default_memory_remove_breakpoint): Call
+	gdbarch_sw_breakpoint_from_kind.
+	(memory_validate_breakpoint): Don't check bp_tgt->placed_size.
+	* mips-tdep.c: Add comments.
+	* mt-tdep.c: Likewise.
+	* nios2-tdep.c: Likewise.
+	* record-full.c (record_full_insert_breakpoint): Don't call
+	gdbarch_breakpoint_from_pc.  Don't set bp_tgt->placed_address
+	and bp_tgt->placed_size.
+	* remote.c (remote_insert_breakpoint): Don't call
+	gdbarch_remote_breakpoint_from_pc.  Use bp_tgt->placed_size.
+	Don't set bp_tgt->placed_address and bp_tgt->placed_size.
+	(remote_insert_hw_breakpoint): Likewise.
+	* score-tdep.c: Likewise.
+	* sh-tdep.c: Likewise.
+	* tic6x-tdep.c: Likewise.
+	* v850-tdep.c: Likewise.
+	* xtensa-tdep.c: Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.h (GDBARCH_BREAKPOINT_FROM_PC): New macro.
+	(GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN): New macro.
+	* arm-tdep.c (arm_breakpoint_from_pc): Remove.
+	(arm_breakpoint_kind_from_pc): New function.
+	(arm_sw_breakpoint_from_kind): New function.
+	(arm_breakpoint_from_pc): Call arm_breakpoint_kind_from_pc
+	and arm_sw_breakpoint_from_kind.
+	Use GDBARCH_BREAKPOINT_FROM_PC.
+	(arm_remote_breakpoint_from_pc): Call
+	arm_breakpoint_kind_from_pc.
+	(arm_gdbarch_init): Replace set_gdbarch_breakpoint_from_pc
+	with SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* arc-tdep.c: Likewise.
+	* bfin-tdep.c: Likewise.
+	* cris-tdep.c: Likewise.
+	* iq2000-tdep.c: Likewise.
+	* m32r-tdep.c: Likewise.
+	* mips-tdep.c: Likewise.
+	* mt-tdep.c: Likewise.
+	* nios2-tdep.c: Likewise.
+	* rs6000-tdep.c: Likewise.
+	* score-tdep.c: Likewise.
+	* sh-tdep.c: Likewise.
+	* sh64-tdep.c: Likewise.
+	* tic6x-tdep.c: Likewise.
+	* v850-tdep.c: Likewise.
+	* xtensa-tdep.c: Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* mips-tdep.c (mips_breakpoint_kind): New enum.
+	(mips_breakpoint_from_pc): Use it.
+	(mips_remote_breakpoint_from_pc): Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): New macro.
+	(SET_GDBARCH_BREAKPOINT_MANIPULATION): New macro.
+	aarch64-tdep.c (aarch64_breakpoint_from_pc): Remove.  Use
+	GDBARCH_BREAKPOINT_MANIPULATION.
+	(aarch64_gdbarch_init): Replace set_gdbarch_breakpoint_from_pc
+	with SET_GDBARCH_BREAKPOINT_MANIPULATION.
+	* alpha-tdep.c: Likewise.
+	* avr-tdep.c: Likewise.
+	* frv-tdep.c: Likewise.
+	* ft32-tdep.c: Likewise.
+	* h8300-tdep.c: Likewise.
+	* hppa-tdep.c: Likewise.
+	* i386-tdep.c: Likewise.
+	* lm32-tdep.c: Likewise.
+	* m32c-tdep.c: Likewise.
+	* m68hc11-tdep.c: Likewise.
+	* m68k-tdep.c: Likewise.
+	* m88k-tdep.c: Likewise.
+	* mep-tdep.c: Likewise.
+	* microblaze-tdep.c: Likewise.
+	* mn10300-tdep.c: Likewise.
+	* moxie-tdep.c: Likewise.
+	* msp430-tdep.c: Likewise.
+	* rl78-tdep.c: Likewise.
+	* rx-tdep.c: Likewise.
+	* s390-linux-tdep.c: Likewise.
+	* sparc-tdep.c: Likewise.
+	* spu-tdep.c: Likewise.
+	* tilegx-tdep.c: Likewise.
+	* vax-tdep.c: Likewise.
+	* xstormy16-tdep.c: Likewise.
+
+2016-11-03  Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (default_memory_insert_breakpoint): Don't check
+	'bp' against NULL.
+	* microblaze-linux-tdep.c (microblaze_linux_memory_remove_breakpoint):
+	Likewise.
+	* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
+
+2016-11-02  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type): Rename
+	from impl_get_base_type.  Rewrite.
+	(struct dwarf_expr_baton): Remove.
+	(dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value): Save and
+	restore more fields.
+	(symbol_needs_eval_context::get_frame_pc): New method.
+	* dwarf2expr.h (dwarf_expr_context::get_base_type): Now public,
+	virtual.
+	(dwarf_expr_context::impl_get_base_type): Remove.
+	* dwarf2expr.c (dwarf_expr_context::get_base_type): Remove.
+
+2016-10-31  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* configure.ac <mips-sgi-irix5*>: Remove <sys/proc.h> _KMEMUSER
+	workaround.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+
+2016-10-31  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_r3041_reg_names): Remove.
+	(mips_breakpoint_from_pc): Remove IDT and PMON breakpoint
+	encodings.
+
+2016-10-31  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* defs.h (gdb_osabi): Remove GDB_OSABI_IRIX enum value.
+	* osabi.c (gdb_osabi_names): Remove "Irix" entry.
+	* mips-tdep.c (mips_irix_reg_names): Remove.
+	(mips_register_type): Remove GDB_OSABI_IRIX code.
+	(mips_pseudo_register_type): Likewise.
+	(mips_breakpoint_from_pc): Likewise.
+	(mips_gdbarch_init): Likewise.
+
+2016-10-29  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Clarify C++ requirement.
+
+2016-10-29  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Adjust to mention C++11 requirement.
+
+2016-10-29  Eli Zaretskii  <eliz@gnu.org>
+
+	* NEWS: Mention support for redirection on MS-Windows.
+
+	* windows-nat.c (redir_open, redir_set_redirection)
+	(redirect_inferior_handles) [!__CYGWIN__]: New functions.
+	(windows_create_inferior) [!__CYGWIN__]: Use
+	'redirect_inferior_handles' to redirect standard handles of the
+	debuggee if the command line requests that.
+
+2016-10-28  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (CXX_DIALECT): Get from configure.
+	(COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
+	(FLAGS_TO_PASS): Pass CXX_DIALECT.
+	* acinclude.m4: Include ax_cxx_compile_stdcxx.m4.
+	* ax_cxx_compile_stdcxx.m4: Add FSF copyright header.  Set and
+	AC_SUBST CXX_DIALECT instead of changing CXX/CXXCPP.
+	* configure.ac: Call AX_CXX_COMPILE_STDCXX.
+	* config.in: Regenerate.
+	* configure: Regenerate.
+
+2016-10-28  Pedro Alves  <palves@redhat.com>
+
+	* ax_cxx_compile_stdcxx.m4: New file.
+
+2016-10-28  Pedro Alves  <palves@redhat.com>
+
+	* maint.c (scoped_command_stats::scoped_command_stats): Clear
+	m_space_enabled, m_time_enabled and m_symtab_enabled.
+
+2016-10-28  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (bfun_s): New typedef.
+	(ftrace_update_caller): Print caller in debug dump.
+	(ftrace_get_caller, ftrace_match_backtrace, ftrace_fixup_level)
+	(ftrace_compute_global_level_offset, ftrace_connect_bfun)
+	(ftrace_connect_backtrace, ftrace_bridge_gap, btrace_bridge_gaps): New.
+	(btrace_compute_ftrace_bts): Pass vector of gaps.  Collect gaps.
+	(btrace_compute_ftrace_pt): Likewise.
+	(btrace_compute_ftrace): Split into this, ...
+	(btrace_compute_ftrace_1): ... this, and ...
+	(btrace_finalize_ftrace): ... this.  Call btrace_bridge_gaps.
+
+2016-10-28  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_new_return): Start from the previous function's
+	level if we can't find a matching call for a return.
+
+2016-10-28  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_update_function): Update tail call heuristic.
+
+2016-10-28  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_compute_ftrace_bts, ftrace_add_pt): Allow
+	leading gaps.
+	* record-btrace.c (record_btrace_single_step_forward)
+	(record_btrace_single_step_backward): Jump back to last
+	instruction if step ends at a gap.
+	(record_btrace_goto_begin): Skip gaps.
+
+2016-10-28  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (ftrace_add_pt): Fix gap indication.  Add warning for non-
+	contiguous trace and overflow.  Rephrase trace decode warning and print
+	instruction number.  Remove dead gaps warning.
+	(btrace_compute_ftrace_bts): Rephrase warnings and print instruction
+	number.
+
+2016-10-25  Sandra Loosemore  <sandra@codesourcery.com>
+	    Luis Machado  <lgustavo@codesourcery.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20569
+	* exceptions.c (exception_print_same): Moved here from exec.c.
+	* exceptions.h (exception_print_same): Declare.
+	* exec.h: Include "symfile-add-flags.h".
+	(try_open_exec_file): New declaration.
+	* exec.c (exception_print_same): Moved to exceptions.c.
+	(try_open_exec_file): New function.
+	(exec_file_locate_attach): Rename exec_file and full_exec_path
+	variables to avoid confusion between target and host pathnames.
+	Move pathname processing logic to exec_file_find.  Do not return
+	early if pathname lookup fails; Call try_open_exec_file.
+	* infrun.c (follow_exec): Split and rename execd_pathname variable
+	to avoid confusion between target and host pathnames.  Warn if
+	pathname lookup fails.  Pass target pathname to
+	target_follow_exec, not hostpathname.  Call try_open_exec_file.
+	* main.c (symbol_file_add_main_adapter): New function.
+	(captured_main_1): Use it.
+	* solib-svr4.c (open_symbol_file_object): Adjust to pass
+	symfile_add_flags to symbol_file_add_main.
+	* solib.c (exec_file_find): Incorporate fallback logic for relative
+	pathnames formerly in exec_file_locate_attach.
+	* symfile.c (symbol_file_add_main, symbol_file_add_main_1):
+	Replace 'from_tty' parameter with a symfile_add_file.
+	(symbol_file_command): Adjust to pass symfile_add_flags to
+	symbol_file_add_main.
+	* symfile.h (symbol_file_add_main): Replace 'from_tty' parameter
+	with a symfile_add_file.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* coffread.c (coff_symfile_read): Use symfile_add_flags.
+	* dbxread.c (dbx_symfile_read): Ditto.
+	* elfread.c (elf_symfile_read): Ditto.
+	* inferior.h: Include symfile-add-flags.h.
+	(struct inferior) <symfile_flags>: Now symfile_add_flags.
+	* machoread.c (macho_add_oso_symfile, macho_symfile_read_all_oso)
+	(macho_symfile_read, mipscoff_symfile_read): Use
+	symfile_add_flags.
+	* objfile-flags.h: New file.
+	* objfiles.c (allocate_objfile): Use objfile_flags.
+	* objfiles.h: Include objfile-flags.h.
+	(struct objfile) <flags>: Now an objfile_flags.
+	(OBJF_REORDERED, OBJF_SHARED, OBJF_READNOW, OBJF_USERLOADED)
+	(OBJF_PSYMTABS_READ, OBJF_MAINLINE, OBJF_NOT_FILENAME): Delete.
+	Converted to an enum-flags in objfile-flags.h.
+	(allocate_objfile): Use objfile_flags.
+	* python/py-objfile.c (objfpy_add_separate_debug_file): Remove
+	unnecessary local.
+	* solib.c (solib_read_symbols, solib_add)
+	(reload_shared_libraries_1): Use symfile_add_flags.
+	* solib.h: Include "symfile-add-flags.h".
+	(solib_read_symbols): Use symfile_add_flags.
+	* symfile-add-flags.h: New file.
+	* symfile-debug.c (debug_sym_read): Use symfile_add_flags.
+	* symfile-mem.c (symbol_file_add_from_memory): Use
+	symfile_add_flags.
+	* symfile.c (read_symbols, syms_from_objfile_1)
+	(syms_from_objfile, finish_new_objfile): Use symfile_add_flags.
+	(symbol_file_add_with_addrs): Use symfile_add_flags and
+	objfile_flags.
+	(symbol_file_add_separate): Use symfile_add_flags.
+	(symbol_file_add_from_bfd, symbol_file_add): Use symfile_add_flags
+	and objfile_flags.
+	(symbol_file_add_main_1): : Use objfile_flags.  Fix add_flags vs
+	flags confusion.
+	(symbol_file_command): Use objfile_flags.
+	(add_symbol_file_command): Use symfile_add_flags and
+	objfile_flags.
+	(clear_symtab_users): Use symfile_add_flags.
+	* symfile.h: Include "symfile-add-flags.h" and "objfile-flags.h".
+	(struct sym_fns) <sym_read>: Use symfile_add_flags.
+	(clear_symtab_users): Use symfile_add_flags.
+	(enum symfile_add_flags): Delete, moved to symfile-add-flags.h and
+	converted to enum-flags.
+	(symbol_file_add, symbol_file_add_from_bfd)
+	(symbol_file_add_separate): Use symfile_add_flags.
+	* xcoffread.c (xcoff_initial_scan): Use symfile_add_flags.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* inferior.h (ALL_NON_EXITED_INFERIORS): New macro.
+	* infrun.c (do_target_resume): Call target_commit_resume.
+	(proceed): Defer target_commit_resume while looping over threads,
+	resuming them.  Call target_commit_resume at the end.
+	* record-btrace.c (record_btrace_commit_resume): New function.
+	(init_record_btrace_ops): Install it as to_commit_resume method.
+	* record-full.c (record_full_commit_resume): New function.
+	(record_full_wait_1): Call the beneath target's to_commit_resume
+	method.
+	(init_record_full_ops): Install record_full_commit_resume as
+	to_commit_resume method.
+	* remote.c (struct private_thread_info) <last_resume_step,
+	last_resume_sig, vcont_resumed>: New fields.
+	(remote_add_thread): Set the new thread's vcont_resumed flag.
+	(demand_private_info): Delete.
+	(get_private_info_thread, get_private_info_ptid): New functions.
+	(remote_update_thread_list): Adjust.
+	(process_initial_stop_replies): Clear the thread's vcont_resumed
+	flag.
+	(remote_resume): If connected in non-stop mode, record the resume
+	request and return early.
+	(struct private_inferior): New.
+	(struct vcont_builder): New.
+	(vcont_builder_restart, vcont_builder_flush)
+	(vcont_builder_push_action): New functions.
+	(MAX_ACTION_SIZE): New macro.
+	(remote_commit_resume): New function.
+	(thread_pending_fork_status, is_pending_fork_parent_thread): New
+	functions.
+	(check_pending_event_prevents_wildcard_vcont_callback)
+	(check_pending_events_prevent_wildcard_vcont): New functions.
+	(process_stop_reply): Adjust.  Clear the thread's vcont_resumed
+	flag.
+	(init_remote_ops): Install remote_commit_resume.
+	* target-delegates.c: Regenerate.
+	* target.c (defer_target_commit_resume): New global.
+	(target_commit_resume, make_cleanup_defer_target_commit_resume):
+	New functions.
+	* target.h (struct target_ops) <to_commit_resume>: New field.
+	(target_resume): Update comments.
+	(target_commit_resume): New declaration.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* inferior.c (exit_inferior_1): Free 'priv'.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (remote_resume_with_hc): New function, factored out
+	from ...
+	(remote_resume): ... this.  Always try vCont first.
+	(remote_vcont_resume): Rename to ...
+	(remote_resume_with_vcont): ... this.  Bail out if execution
+	direction is reverse.
+
+2016-10-25  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2expr.h (struct dwarf_expr_context) <~dwarf_expr_context>:
+	Make virtual.
+
+2016-10-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR build/20712
+	* defs.h: Remove obsolete comment
+	(atof): Remove.
+	* procfs.c (do_destroy_procinfo_cleanup): Add cast.
+	(sysset_t_alloc): Likewise.
+	(proc_set_traced_sysentry): Likewise.
+	(proc_set_traced_sysexit): Likewise.
+	[!PIOCLSTATUS && NEW_PROC_API] (do_closedir_cleanup): Likewise.
+	(proc_get_LDT_entry): Initiate cleanups before returns.
+	(procfs_wait): Use GDB_SIGNAL_0.
+	(procfs_corefile_thread_callback): Add cast.
+	* sol-thread.c (td_log_ftype, td_ta_new_ftype, td_ta_delete_ftype)
+	(td_init_ftype, td_ta_get_ph_ftype, td_ta_get_nthreads_ftype)
+	(td_ta_tsd_iter_ftype, td_ta_thr_iter_ftype)
+	(td_thr_validate_ftype, td_thr_tsd_ftype, td_thr_get_info_ftype)
+	(td_thr_getfpregs_ftype, td_thr_getxregsize_ftype)
+	(td_thr_getxregs_ftype, td_thr_sigsetmask_ftype)
+	(td_thr_setprio_ftype, td_thr_setsigpending_ftype)
+	(td_thr_setfpregs_ftype, td_thr_setxregs_ftype)
+	(td_ta_map_id2thr_ftype, td_ta_map_lwp2thr_ftype)
+	(td_thr_getgregs_ftype, td_thr_setgregs_ftype): New typedefs.
+	(p_td_log, p_td_ta_new, p_td_ta_delete, p_td_init, p_td_ta_get_ph)
+	(p_td_ta_get_nthreads, p_td_ta_tsd_iter, p_td_ta_thr_iter)
+	(p_td_thr_validate, p_td_thr_tsd, p_td_thr_get_info)
+	(p_td_thr_getfpregs, p_td_thr_getxregsize, p_td_thr_getxregs)
+	(p_td_thr_sigsetmask, p_td_thr_setprio, p_td_thr_setsigpending)
+	(p_td_thr_setfpregs, p_td_thr_setxregs, p_td_ta_map_id2thr)
+	(p_td_ta_map_lwp2thr, p_td_thr_getgregs, p_td_thr_setgregs): Use them.
+	(ps_pdread): Add cast.
+	(ps_ptread): Likewise.
+	(resolve): Likewise.
+	* top.c (gdb_safe_append_history): Print pid_t as long.
+
+2016-10-25  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h (__STDC_FORMAT_MACROS): Define.
+
+2016-10-25  Pedro Alves  <palves@redhat.com>
+
+	* common/new-op.c: Add comment about -fsanitize=address.
+
+2016-10-25  Pedro Alves  <palves@redhat.com>
+
+       * common/common-defs.h (__STDC_CONSTANT_MACROS)
+       (__STDC_LIMIT_MACROS): Define.
+
+2016-10-25  Yao Qi  <yao.qi@linaro.org>
+
+	PR gdb/20716
+	* common/new-op.c (__has_feature): New macro.
+	Don't override operator new if asan is used.
+
+2016-10-24  Luis Machado  <lgustavo@codesourcery.com>
+
+	* exec.c (exec_file_locate_attach): Prevent NULL pointer dereference
+	when duplicating a string.
+
+2016-10-24  Luis Machado  <lgustavo@codesourcery.com>
+
+	* exec.c (exception_print_same): Fix string comparison to use
+	statically-allocated ones.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2expr.h (class dwarf_expr_context)
+	<get_frame_base, get_frame_cfa, get_tls_address, dwarf_call,
+	push_dwarf_block_entry_value, get_addr_index, get_object_address>:
+	Now pure virtual.
+	* dwarf2-frame.c (class dwarf_expr_executor)
+	<get_frame_base, get_frame_cfa, get_tls_address, dwarf_call,
+	push_dwarf_block_entry_value, get_addr_index, get_object_address>:
+	New methods.
+	<invalid>: New method.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* minsyms.h (minimal_symbol_reader::record_full): "copy_name" now
+	a bool.
+	(record, record_with_info): Update.
+	* minsyms.c (record): Fix indentation.
+	(record_full): Fix indentation.  Update for type change.
+	* elfread.c (record_minimal_symbol): "copy_name" now a bool.
+	(elf_symtab_read): "copy_names" now a bool.
+	(elf_rel_plt_read, elf_read_minimal_symbols): Update.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* main.c: Include <vector>.
+	(cmdarg_s): Remove typedef.  Don't define VEC.
+	(captured_main_1): Use vector, not VEC.  Remove cleanups.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2loc.c (struct dwarf_expr_context_funcs): Don't declare.
+	(dwarf_expr_read_addr_from_reg, dwarf_expr_get_reg_value)
+	(dwarf_expr_read_mem, dwarf_expr_frame_base): Rename; turn into
+	methods.
+	(get_frame_pc_for_per_cu_dwarf_call): New function.
+	(dwarf_expr_frame_cfa, dwarf_expr_frame_pc)
+	(dwarf_expr_tls_address): Rename; turn into methods.
+	(per_cu_dwarf_call): Remove arguments.  Use
+	get_frame_pc_for_per_cu_dwarf_call.
+	(dwarf_evaluate_loc_desc): New class.
+	(dwarf_expr_dwarf_call, dwarf_expr_context)
+	(dwarf_expr_push_dwarf_reg_entry_value)
+	(dwarf_expr_get_addr_index, dwarf_expr_get_obj_addr): Rename; turn
+	into methods.
+	(dwarf_expr_ctx_funcs): Remove.
+	(dwarf2_evaluate_loc_desc_full): Update.
+	(dwarf2_locexpr_baton_eval): Update.
+	(symbol_needs_eval_context): New class.
+	(symbol_needs_read_addr_from_reg, symbol_needs_get_reg_value)
+	(symbol_needs_read_mem, symbol_needs_frame_base)
+	(symbol_needs_frame_cfa, symbol_needs_tls_address)
+	(symbol_needs_dwarf_call, needs_dwarf_reg_entry_value): Rename;
+	turn into methods.
+	(needs_get_addr_index, needs_get_obj_addr): Remove; turn into
+	methods.
+	(symbol_needs_ctx_funcs): Remove.
+	(dwarf2_loc_desc_get_symbol_read_needs): Update.
+	* dwarf2expr.h (struct dwarf_expr_context_funcs): Remove; turn
+	contents into methods.
+	(struct dwarf_expr_context) <baton, funcs>: Remove.
+	<read_addr_from_reg, get_reg_value, read_mem, get_frame_base,
+	get_frame_cfa, get_frame_pc, get_tls_address, dwarf_call,
+	impl_get_base_type, push_dwarf_block_entry_value, get_addr_index,
+	get_object_address>: Declare new methods.
+	(ctx_no_get_frame_base, ctx_no_get_frame_cfa)
+	(ctx_no_get_frame_pc, ctx_no_get_tls_address, ctx_no_dwarf_call)
+	(ctx_no_get_base_type, ctx_no_push_dwarf_reg_entry_value)
+	(ctx_no_get_addr_index): Don't declare.
+	* dwarf2expr.c (get_base_type): Use impl_get_base_type.
+	(execute_stack_op): Update.
+	(ctx_no_get_frame_base, ctx_no_get_frame_cfa)
+	(ctx_no_get_frame_pc, ctx_no_get_tls_address, ctx_no_dwarf_call)
+	(ctx_no_get_base_type, ctx_no_push_dwarf_reg_entry_value)
+	(ctx_no_get_addr_index): Remove; now methods on
+	dwarf_expr_context.
+	* dwarf2-frame.c (read_addr_from_reg): Take a frame_info, not a
+	baton.
+	(class dwarf_expr_executor): New class.
+	(get_reg_value, read_mem): Rename, turn into methods.
+	(execute_stack_op): Use dwarf_expr_executor.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2loc.c (per_cu_dwarf_call)
+	(dwarf_expr_push_dwarf_reg_entry_value)
+	(dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
+	(needs_dwarf_reg_entry_value)
+	(dwarf2_loc_desc_get_symbol_read_needs): Update.
+	* dwarf2expr.h (dwarf_expr_context) <push_address, eval, fetch,
+	fetch_address, fetch_in_stack_memory, address_type, grow_stack,
+	push, stack_empty_p, add_piece, get_base_type, execute_stack_op,
+	pop>: New method declarations.
+	(dwarf_expr_push_address, dwarf_expr_eval, dwarf_expr_fetch)
+	(dwarf_expr_fetch_address, dwarf_expr_fetch_in_stack_memory):
+	Don't declare.
+	* dwarf2expr.c (address_type, grow_stack, push, push_address)
+	(pop, fetch, fetch_address, fetch_in_stack_memory)
+	(stack_empty_p, add_piece, eval, get_base_type)
+	(execute_stack_op): Rename.  Turn into methods.
+	* dwarf2-frame.c (execute_stack_op): Update.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Stack-allocate
+	dwarf_expr_context.  Remove cleanups.
+	(dwarf2_locexpr_baton_eval)
+	(dwarf2_loc_desc_get_symbol_read_needs):  Likewise.
+	* dwarf2expr.h (dwarf_expr_context, ~dwarf_expr_context): Add
+	constructors and destructors.
+	(new_dwarf_expr_context, free_dwarf_expr_context)
+	(make_cleanup_free_dwarf_expr_context): Don't declare.
+	* dwarf2-frame.c (execute_stack_op): Stack-allocate
+	dwarf_expr_context.  Remove cleanups.
+	(dwarf_expr_context): Rename from new_dwarf_expr_context.  Turn
+	into constructor.
+	(free_dwarf_expr_context, free_dwarf_expr_context_cleanup):
+	Remove.
+	(~dwarf_expr_context): Rename from
+	make_cleanup_free_dwarf_expr_context.  Turn into destructor.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2loc.c: Include <vector>.
+	(read_pieced_value, write_pieced_value)
+	(dwarf2_compile_expr_to_ax): Use std::vector.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* stack.c (print_stack_frame_to_uiout): Use scoped_restore.
+	* ui-out.c (make_cleanup_restore_current_uiout)
+	(restore_current_uiout_cleanup): Remove.
+	* infrun.c (print_stop_event): Use scoped_restore.
+	* ui-out.h (make_cleanup_restore_current_uiout): Don't declare.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* elfread.c (elf_read_minimal_symbols): Use gdb::unique_ptr.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* cli/cli-dump.c (dump_memory_to_file): Use gdb::unique_ptr.
+	(restore_binary_file): Likewise.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* maint.h (scoped_command_stats): New class.
+	(make_command_stats_cleanup): Don't declare.
+	* maint.c (struct cmd_stats): Remove.
+	(~scoped_command_stats): Rename from report_command_stats.  Now a
+	destructor.
+	(scoped_command_stats): Rename from make_command_stats_cleanup.
+	Now a constructor.
+	* main.c (captured_main_1): New function.  Use
+	scoped_command_stats.
+	(captured_main): Call captured_main_1.
+	* event-top.c (command_handler): Use scoped_command_stats.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* mi/mi-main.c (mi_cmd_data_read_memory): Use gdb::unique_ptr.
+	Remove some cleanups.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-interp.c (tui_on_normal_stop, tui_on_signal_received)
+	(tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
+	(tui_on_no_history, tui_on_user_selected_context_changed):
+	Update.
+	* top.h (switch_thru_all_uis): New class.
+	(SWITCH_THRU_ALL_UIS): Rewrite.
+	(make_cleanup_restore_current_ui, switch_thru_all_uis_init)
+	(switch_thru_all_uis_cond, switch_thru_all_uis_next): Don't
+	declare.
+	* mi/mi-interp.c (mi_new_thread, mi_thread_exit)
+	(mi_record_changed, mi_inferior_added, mi_inferior_appeared)
+	(mi_inferior_exit, mi_inferior_removed, mi_on_signal_received)
+	(mi_on_end_stepping_range, mi_on_signal_exited, mi_on_exited)
+	(mi_on_no_history, mi_on_normal_stop, mi_traceframe_changed)
+	(mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
+	(mi_breakpoint_created, mi_breakpoint_deleted)
+	(mi_breakpoint_modified, mi_output_running_pid, mi_on_resume)
+	(mi_solib_loaded, mi_solib_unloaded, mi_command_param_changed)
+	(mi_memory_changed, mi_user_selected_context_changed): Update.
+	* infrun.c (all_uis_check_sync_execution_done)
+	(all_uis_on_sync_execution_starting, normal_stop): Update.
+	* event-top.c (restore_ui_cleanup)
+	(make_cleanup_restore_current_ui, switch_thru_all_uis_init)
+	(switch_thru_all_uis_cond, switch_thru_all_uis_next): Remove.
+	* cli/cli-interp.c (cli_on_normal_stop, cli_on_signal_received)
+	(cli_on_end_stepping_range, cli_on_signal_exited, cli_on_exited)
+	(cli_on_no_history, cli_on_user_selected_context_changed):
+	Update.
+	* breakpoint.c (watchpoint_check): Update.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* xcoffread.c (record_minimal_symbol, scan_xcoff_symtab): Add
+	"reader" argument.  Update.
+	(xcoff_initial_scan): Update.
+	* symfile.h (mdebug_build_psymtabs): Add "reader" argument.
+	* mipsread.c (mipscoff_symfile_read): Update.
+	(read_alphacoff_dynamic_symtab): Add "reader" argument.  Update.
+	* minsyms.h (minimal_symbol_reader) <record, record_full>:
+	Declare.
+	<m_msym_bunch, m_msym_bunch_index, m_msym_count>: New members.
+	<record_with_info>: New function, renamed from
+	prim_record_minimal_symbol_and_info.
+	* minsyms.c (msym_bunch, msym_bunch_index, msym_count): Remove
+	globals.
+	(minimal_symbol_reader): Initialize new members.
+	(minimal_symbol_reader::record): Renamed from
+	prim_record_minimal_symbol.
+	(minimal_symbol_reader::record_full): Renamed from
+	prim_record_minimal_symbol_full.
+	(prim_record_minimal_symbol_and_info): Move to minsyms.h; rename.
+	* mdebugread.c (mdebug_build_psymtabs, parse_partial_symbols)
+	(record_minimal_symbol): Add "reader" argument.  Update.
+	(elfmdebug_build_psymtabs): Update.
+	* machoread.c (macho_symtab_add_minsym, macho_symtab_read): Add
+	"reader" argument.  Update.
+	(macho_symfile_read): Update.
+	* elfread.c (record_minimal_symbol, elf_symtab_read)
+	(elf_rel_plt_read): Add "reader" argument.  Update.
+	(elf_read_minimal_symbols): Update.
+	* dbxread.c (record_minimal_symbol, read_dbx_dynamic_symtab)
+	(read_dbx_symtab): Add "reader" argument.  Update.
+	(dbx_symfile_read): Update.
+	* coffread.c (record_minimal_symbol, coff_symtab_read): Add
+	"reader" argument.  Update.
+	(coff_symfile_read): Update.
+	* coff-pe-read.h (read_pe_exported_syms): Add "reader" argument.
+	* coff-pe-read.c (add_pe_exported_sym, add_pe_forwarded_sym)
+	(read_pe_exported_syms): Add "reader" argument.  Update.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* xcoffread.c (xcoff_initial_scan): Update.
+	* mipsread.c (mipscoff_symfile_read): Update.
+	* minsyms.c (minimal_symbol_reader): Add obj argument.
+	Initialize member.
+	(install): Remove objfile argument.  Update.
+	* mdebugread.c (elfmdebug_build_psymtabs): Update.
+	* machoread.c (macho_symfile_read): Update.
+	* elfread.c (elf_read_minimal_symbols): Update.
+	* dbxread.c (dbx_symfile_read): Update.
+	* coffread.c (coff_symfile_read): Update.
+	* minsyms.h (minimal_symbol_reader): Add m_objfile member.
+	(constructor): Add objfile argument.
+	(minimal_symbol_reader::install): Remove objfile argument.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* xcoffread.c (xcoff_initial_scan): Use
+	minimal_symbol_reader.
+	* mipsread.c (mipscoff_symfile_read): Use
+	minimal_symbol_reader.
+	* minsyms.h (minimal_symbol_reader): New class.
+	(init_minimal_symbol_collection)
+	(make_cleanup_discard_minimal_symbols, install_minimal_symbols):
+	Don't declare.
+	* minsyms.c (minimal_symbol_reader): Renamed from
+	init_minimal_symbol_collection, turned into constructor.
+	(~minimal_symbol_reader): Renamed from
+	do_discard_minimal_symbols_cleanup, turned into destructor.
+	(make_cleanup_discard_minimal_symbols): Remove.
+	(minimal_symbol_reader::install): Rename form
+	install_minimal_symbols.
+	* mdebugread.c (elfmdebug_build_psymtabs): Use
+	minimal_symbol_reader.
+	* machoread.c (macho_symfile_read): Use
+	minimal_symbol_reader.
+	* elfread.c (elf_read_minimal_symbols): Use
+	minimal_symbol_reader.
+	* dbxread.c (dbx_symfile_read): Use minimal_symbol_reader.
+	* coffread.c (coff_symfile_read): Use
+	minimal_symbol_reader.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* top.c (new_ui_command, wait_sync_command_done)
+	(gdb_readline_wrapper): Use scoped_restore.
+	* infrun.c (fetch_inferior_event): Use scoped_restore.
+	* infcall.c (call_thread_fsm_should_stop): Use scoped_restore.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* utils.c (make_cleanup_restore_ui_file, do_restore_ui_file)
+	(struct restore_ui_file_closure): Remove.
+	* utils.h (make_cleanup_restore_ui_file): Don't declare.
+	* guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
+	scoped_restore.
+	* top.c (execute_command_to_string): Use scoped_restore.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* common/scoped_restore.h: New file.
+	* utils.h: Include scoped_restore.h.
+	* top.c (execute_command_to_string): Use scoped_restore.
+	* python/python.c (python_interactive_command): Use
+	scoped_restore.
+	(python_command, execute_gdb_command): Likewise.
+	* printcmd.c (do_one_display): Use scoped_restore.
+	* mi/mi-main.c (exec_continue): Use scoped_restore.
+	* mi/mi-cmd-var.c (mi_cmd_var_assign): Use scoped_restore.
+	* linux-fork.c (checkpoint_command): Use scoped_restore.
+	* infrun.c (restore_execution_direction): Remove.
+	(fetch_inferior_event): Use scoped_restore.
+	* compile/compile.c (compile_file_command): Use
+	scoped_restore.
+	(compile_code_command, compile_print_command): Likewise.
+	* cli/cli-script.c (execute_user_command): Use
+	scoped_restore.
+	(while_command, if_command, script_from_file): Likewise.
+	* arm-tdep.c (arm_insert_single_step_breakpoint): Use
+	scoped_restore.
+
+2016-10-21  Tom Tromey  <tom@tromey.com>
+
+	* xcoffread.c (read_xcoff_symtab): Make "filestring" const.
+
+2016-10-21  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
+	    Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* xcoffread.c (read_xcoff_symtab): Make name of current file as
+	pst->filename instead of _start_ in AIX.
+
+2016-10-21  Philipp Rudo  <prudo@linux.vnet.ibm.com>
+
+	* solist.h (struct target_so_ops): Delete special_symbol_handling
+	hook.
+	* solib.c (solib_add, reload_shared_libraries): Adjust.
+	* solib-aix.c (solib_aix_special_symbol_handling): Delete
+	(_initialize_solib_aix): Adjust
+	* solib-darwin.c (darwin_special_symbol_handling): Delete
+	(_initialize_darwin_solib): Adjust
+	* solib-dsbt.c (dsbt_special_symbol_handling): Delete
+	(_initialize_dsbt_solib): Adjust
+	* solib-frv.c (frv_special_symbol_handling): Delete
+	(_initialize_frv_solib): Adjust
+	* solib-svr4.c (svr4_special_symbol_handling): Delete
+	(_initialize_svr4_solib): Adjust
+	* solib-target.c (solib_target_special_symbol_handling): Delete
+	(_initialize_solib_target): Adjust
+
+2016-10-20  Yao Qi  <yao.qi@linaro.org>
+
+	* configure.tgt: Don't configure if target is *-*-vxworks*.
+
+2016-10-19  Pedro Alves  <palves@redhat.com>
+
+	* config.in: Regenerate.
+
+2016-10-18  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h (__STDC_CONSTANT_MACROS)
+	(__STDC_LIMIT_MACROS): Delete.
+
+2016-10-18  Pedro Alves  <palves@redhat.com>
+
+	* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
+	2692e23a48e21f6daa029e8af9f1a143b7532f47.
+	* gnulib/configure, gnulib/config.in, gnulib/aclocal.m4:
+	Regenerate.
+	* gnulib/import/Makefile: Update.
+	* gnulib/import/alloca: Update.
+	* gnulib/import/basename-lgpl: Update.
+	* gnulib/import/canonicalize-lgpl: Update.
+	* gnulib/import/config: Update.
+	* gnulib/import/dirent: Update.
+	* gnulib/import/dirfd: Update.
+	* gnulib/import/dirname-lgpl: Update.
+	* gnulib/import/dirname.h: Update.
+	* gnulib/import/dosname.h: Update.
+	* gnulib/import/errno: Update.
+	* gnulib/import/extra/snippet/arg-nonnull.h: Update.
+	* gnulib/import/extra/snippet/c++defs.h: Update.
+	* gnulib/import/extra/snippet/warn-on-use.h: Update.
+	* gnulib/import/extra/update-copyright: Update.
+	* gnulib/import/flexmember.h: Update.
+	* gnulib/import/float+.h: Update.
+	* gnulib/import/float: Update.
+	* gnulib/import/float: Update.
+	* gnulib/import/fnmatch: Update.
+	* gnulib/import/fnmatch: Update.
+	* gnulib/import/fnmatch_loop: Update.
+	* gnulib/import/fpucw.h: Update.
+	* gnulib/import/frexp: Update.
+	* gnulib/import/frexpl: Update.
+	* gnulib/import/gettimeofday: Update.
+	* gnulib/import/hard-locale: Update.
+	* gnulib/import/hard-locale.h: Update.
+	* gnulib/import/inttypes: Update.
+	* gnulib/import/isnan: Update.
+	* gnulib/import/isnand-nolibm.h: Update.
+	* gnulib/import/isnand: Update.
+	* gnulib/import/isnanl-nolibm.h: Update.
+	* gnulib/import/isnanl: Update.
+	* gnulib/import/itold: Update.
+	* gnulib/import/limits: Update.
+	* gnulib/import/localcharset: Update.
+	* gnulib/import/localcharset.h: Update.
+	* gnulib/import/lstat: Update.
+	* gnulib/import/m4/00gnulib: Update.
+	* gnulib/import/m4/absolute-header: Update.
+	* gnulib/import/m4/alloca: Update.
+	* gnulib/import/m4/canonicalize: Update.
+	* gnulib/import/m4/codeset: Update.
+	* gnulib/import/m4/configmake: Update.
+	* gnulib/import/m4/dirent_h: Update.
+	* gnulib/import/m4/dirfd: Update.
+	* gnulib/import/m4/dirname: Update.
+	* gnulib/import/m4/double-slash-root: Update.
+	* gnulib/import/m4/eealloc: Update.
+	* gnulib/import/m4/errno_h: Update.
+	* gnulib/import/m4/exponentd: Update.
+	* gnulib/import/m4/exponentl: Update.
+	* gnulib/import/m4/extensions: Update.
+	* gnulib/import/m4/extern-inline: Update.
+	* gnulib/import/m4/fcntl-o: Update.
+	* gnulib/import/m4/flexmember: Update.
+	* gnulib/import/m4/float_h: Update.
+	* gnulib/import/m4/fnmatch: Update.
+	* gnulib/import/m4/fpieee: Update.
+	* gnulib/import/m4/frexp: Update.
+	* gnulib/import/m4/frexpl: Update.
+	* gnulib/import/m4/gettimeofday: Update.
+	* gnulib/import/m4/glibc21: Update.
+	* gnulib/import/m4/gnulib-cache: Update.
+	* gnulib/import/m4/gnulib-common: Update.
+	* gnulib/import/m4/gnulib-comp: Update.
+	* gnulib/import/m4/gnulib-tool: Update.
+	* gnulib/import/m4/hard-locale: Update.
+	* gnulib/import/m4/include_next: Update.
+	* gnulib/import/m4/inttypes-pri: Update.
+	* gnulib/import/m4/inttypes: Update.
+	* gnulib/import/m4/isnand: Update.
+	* gnulib/import/m4/isnanl: Update.
+	* gnulib/import/m4/largefile: Update.
+	* gnulib/import/m4/limits-h: Update.
+	* gnulib/import/m4/localcharset: Update.
+	* gnulib/import/m4/locale-fr: Update.
+	* gnulib/import/m4/locale-ja: Update.
+	* gnulib/import/m4/locale-zh: Update.
+	* gnulib/import/m4/longlong: Update.
+	* gnulib/import/m4/lstat: Update.
+	* gnulib/import/m4/malloc: Update.
+	* gnulib/import/m4/malloca: Update.
+	* gnulib/import/m4/math_h: Update.
+	* gnulib/import/m4/mbrtowc: Update.
+	* gnulib/import/m4/mbsinit: Update.
+	* gnulib/import/m4/mbsrtowcs: Update.
+	* gnulib/import/m4/mbstate_t: Update.
+	* gnulib/import/m4/memchr: Update.
+	* gnulib/import/m4/memmem: Update.
+	* gnulib/import/m4/mmap-anon: Update.
+	* gnulib/import/m4/multiarch: Update.
+	* gnulib/import/m4/nocrash: Update.
+	* gnulib/import/m4/off_t: Update.
+	* gnulib/import/m4/pathmax: Update.
+	* gnulib/import/m4/rawmemchr: Update.
+	* gnulib/import/m4/readlink: Update.
+	* gnulib/import/m4/rename: Update.
+	* gnulib/import/m4/rmdir: Update.
+	* gnulib/import/m4/signal_h: Update.
+	* gnulib/import/m4/ssize_t: Update.
+	* gnulib/import/m4/stat: Update.
+	* gnulib/import/m4/stdbool: Update.
+	* gnulib/import/m4/stddef_h: Update.
+	* gnulib/import/m4/stdint: Update.
+	* gnulib/import/m4/stdio_h: Update.
+	* gnulib/import/m4/stdlib_h: Update.
+	* gnulib/import/m4/strchrnul: Update.
+	* gnulib/import/m4/string_h: Update.
+	* gnulib/import/m4/strstr: Update.
+	* gnulib/import/m4/strtok_r: Update.
+	* gnulib/import/m4/sys_socket_h: Update.
+	* gnulib/import/m4/sys_stat_h: Update.
+	* gnulib/import/m4/sys_time_h: Update.
+	* gnulib/import/m4/sys_types_h: Update.
+	* gnulib/import/m4/time_h: Update.
+	* gnulib/import/m4/unistd_h: Update.
+	* gnulib/import/m4/warn-on-use: Update.
+	* gnulib/import/m4/wchar_h: Update.
+	* gnulib/import/m4/wchar_t: Update.
+	* gnulib/import/m4/wctype_h: Update.
+	* gnulib/import/m4/wint_t: Update.
+	* gnulib/import/malloc: Update.
+	* gnulib/import/malloca: Update.
+	* gnulib/import/malloca.h: Update.
+	* gnulib/import/math: Update.
+	* gnulib/import/math: Update.
+	* gnulib/import/mbrtowc: Update.
+	* gnulib/import/mbsinit: Update.
+	* gnulib/import/mbsrtowcs-impl.h: Update.
+	* gnulib/import/mbsrtowcs-state: Update.
+	* gnulib/import/mbsrtowcs: Update.
+	* gnulib/import/memchr: Update.
+	* gnulib/import/memmem: Update.
+	* gnulib/import/pathmax.h: Update.
+	* gnulib/import/rawmemchr: Update.
+	* gnulib/import/readlink: Update.
+	* gnulib/import/ref-add.sin: Update.
+	* gnulib/import/ref-del.sin: Update.
+	* gnulib/import/rename: Update.
+	* gnulib/import/rmdir: Update.
+	* gnulib/import/same-inode.h: Update.
+	* gnulib/import/signal: Update.
+	* gnulib/import/stat: Update.
+	* gnulib/import/stdbool: Update.
+	* gnulib/import/stddef: Update.
+	* gnulib/import/stdint: Update.
+	* gnulib/import/stdio: Update.
+	* gnulib/import/stdlib: Update.
+	* gnulib/import/str-two-way.h: Update.
+	* gnulib/import/strchrnul: Update.
+	* gnulib/import/streq.h: Update.
+	* gnulib/import/string: Update.
+	* gnulib/import/stripslash: Update.
+	* gnulib/import/strnlen1: Update.
+	* gnulib/import/strnlen1.h: Update.
+	* gnulib/import/strstr: Update.
+	* gnulib/import/strtok_r: Update.
+	* gnulib/import/sys_stat: Update.
+	* gnulib/import/sys_time: Update.
+	* gnulib/import/sys_types: Update.
+	* gnulib/import/time: Update.
+	* gnulib/import/unistd: Update.
+	* gnulib/import/unistd: Update.
+	* gnulib/import/verify.h: Update.
+	* gnulib/import/wchar: Update.
+	* gnulib/import/wctype: Update.
+	* gnulib/import/flexmember.h: New file.
+	* gnulib/import/hard-locale.c: New file.
+	* gnulib/import/hard-locale.h: New file.
+	* gnulib/import/limits.in.h: New file.
+	* gnulib/import/m4/flexmember.m4: New file.
+	* gnulib/import/m4/hard-locale.m4: New file.
+	* gnulib/import/m4/limits-h.m4: New file.
+
+2016-10-18  Pedro Alves  <palves@redhat.com>
+
+	* common/common-defs.h: Include "gdb_unique_ptr.h".
+	* common/gdb_unique_ptr.h: New.
+
+2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* i386-tdep.c (i386_mpx_info_bounds): Make sure the architecture
+	is `bfd_arch_i386' before proceeding.
+	(i386_mpx_set_bounds): Likewise.
+
+2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* tilegx-tdep.c (tilegx_analyze_prologue): Use the `long long'
+	type for `operands'.
+
+2016-10-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-main.c (mi_cmd_trace_save): Check if argument is present
+	before using it.
+
+2016-10-17  Pedro Alves  <palves@redhat.com>
+
+	* charset.h (class wchar_iterator) [PHONY_ICONV] <m_desc>: Use
+	'int' as type.
+
+2016-10-14  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
+	    Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* solib-aix.c (solib_aix_bfd_open): Call solib_find so that sysroot
+	path is set properly if program has a dependency on .a archive and
+	sysroot is set via set sysroot command.
+
+2016-10-14  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* nat/linux-btrace.c: Remove leftover comment.
+
+2016-10-14  Eli Zaretskii  <eliz@gnu.org>
+
+	* common/common-defs.h [HAVE_STRINGS_H]: Include strings.h if
+	available, to get prototypes of 'strcasecmp' and 'strncasecmp'.
+
+2016-10-13  Pedro Alves  <palves@redhat.com>
+
+	* contrib/ari/gdb_ari.sh (boolean): Suggest bool instead.
+	(false, true): Remove checks.
+
+2016-10-12  Tom Tromey  <tom@tromey.com>
+
+	* machoread.c (macho_symfile_read_all_oso): Use std::string.
+
+2016-10-12  Tom Tromey  <tom@tromey.com>
+
+	* tracepoint.c (trace_dump_command): Remove unnecessary
+	null_cleanup.
+
+2016-10-12  Tom Tromey  <tom@tromey.com>
+
+	* valprint.c (generic_emit_char, count_next_character)
+	(generic_printstr): Update.
+	* charset.c (struct wchar_iterator): Move to charset.h.
+	(wchar_iterator::wchar_iterator): Rename from
+	make_wchar_iterator, turn into a constructor.
+	(wchar_iterator::~wchar_iterator): Rename from
+	do_cleanup_iterator, turn into a destructor.
+	(make_cleanup_wchar_iterator): Remove.
+	(wchar_iterator::iterate): Rename from wchar_iterate.  Remove
+	"iter" argument.  Update.
+	* charset.h: Include <vector>.
+	(class wchar_iterator): New class, from old struct
+	wchar_iterator.
+	(make_wchar_iterator, make_cleanup_wchar_iterator): Don't
+	declare.
+
+2016-10-12  Tom Tromey  <tom@tromey.com>
+
+	* selftest.c: Include <vector>, not "vec.h".
+	(self_test_function_ptr): Remove.
+	(tests): Now a std::vector.
+	(register_self_test, run_self_tests): Update.
+
+2016-10-13  Pedro Alves  <palves@redhat.com>
+	    Tom Tromey  <tom@tromey.com>
+
+	* tid-parse.h (tid_range_parser): New class.
+	(enum tid_range_state): Move into tid_range_parser's scope.
+	Remove TID_RANGE_ prefix from all values.
+	(tid_range_parser_get_tid, tid_range_parser_get_tid_range)
+	(tid_range_parser_star_range, tid_range_parser_finished)
+	(tid_range_parser_skip, tid_range_parser_qualified): Don't
+	declare.
+	(tid_is_in_list): Update comment.
+	* tid-parse.c (tid_range_parser::tid_range_parser): New.
+	(init, finished, get_string, skip, tid_is_qualified)
+	(get_tid_or_range, get_tid_range, get_tid, star_range): Rename;
+	turn into methods.
+	(tid_is_in_list): Adjust.
+	* cli/cli-utils.h (number_or_range_parser): New class.
+	(init_number_or_range, get_number_or_range)
+	(number_range_setup_range): Don't declare.
+	* cli/cli-utils.c
+	(number_or_range_parser::number_or_range_parser): New.
+	(init_number_or_range, get_number_or_range)
+	(number_range_setup_range): Rename; turn into methods.
+	(number_is_in_list): Adjust.
+	* breakpoint.c (map_breakpoint_numbers): Adjust.  Use bool.
+	(trace_pass_command, get_tracepoint_by_number): Adjust.
+	* breakpoint.h (get_tracepoint_by_number): Adjust.
+	* inferior.c (detach_inferior_command, kill_inferior_command)
+	(remove_inferior_command): Adjust.
+	* linespec.c (decode_line_2): Adjust.
+	* memattr.c (mem_enable_command, mem_disable_command)
+	(mem_delete_command): Adjust.
+	* printcmd.c (map_display_numbers): Adjust.
+	* reverse.c (delete_bookmark_command, bookmarks_info): Adjust.
+	* thread.c (thread_apply_command): Adjust.
+
+2016-10-12  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* arc-newlib-tdep.c: New file.
+	* configure.tgt: Add newlib support for ARC.
+
+2016-10-12  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* arc-tdep.h (struct gdbarch_tdep) <jb_pc>: New field.
+	* arc-tdep.c (arc_get_longjmp_target): New function.
+	(arc_gdbarch_init): Set get_longjmp_target if jb_pc is non-negative.
+	(arc_dump_tdep): Print jb_pc.
+
+2016-10-12  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* arc-tdep.h (struct gdbarch_tdep): New.
+	* arc-tdep.c (arc_gdbarch_init): Allocate gdbarch_tdep.
+
+2016-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/20682
+	* aarch64-tdep.c: Replace 32 with AARCH64_D_REGISTER_COUNT.
+	(aarch64_analyze_prologue): Extend array 'regs' for D registers.
+	Assert that operand 0 and 1 can be X or D registers.  Update
+	register number for D registers.  Update registers in frame
+	cache.
+	* aarch64-tdep.h (AARCH64_D_REGISTER_COUNT): New macro.
+
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm.h (enum arm_breakpoint_kinds): New.
+	* arm-tdep.c (arm_remote_breakpoint_from_pc): Use
+	ARM_BP_KIND_THUMB2.
+
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+	* m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by
+	'gdbarch'.
+
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+	* v850-tdep.c (v850_breakpoint_from_pc): Use the right
+	breakpoint instruction.
+	(v850_dbtrap_breakpoint_from_pc): Remove.
+	(v850_gdbarch_init): Update.
+
+2016-10-08  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* ui-out.c (push_level): Remove "id" parameter.
+	(ui_out_begin): Update call.
+
+2016-10-07  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.12 released.
+
+2016-10-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* python/python.c (gdbpy_decode_line): Call
+	string_to_event_location_basic instead of new_linespec_location.
+
+2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* target.c (target_supports_multi_process): New function, moved
+	from...
+	* target.h (target_supports_multi_process): ... here.  Remove
+	macro.
+	* target/target.h (target_supports_multi_process): New prototype.
+
+2016-10-06  Pedro Alves  <palves@redhat.com>
+
+	* cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of
+	EXPORTED_CONST.
+	* stub-termcap.c: Remove __cplusplus checks.
+	* common/common-defs.h [!__cplusplus] (EXTERN_C, EXTERN_C_PUSH,
+	EXTERN_C_POP): Delete.
+	* common/common-exceptions.h (GDB_XCPT_SJMP): Update comments.
+	(GDB_XCPT) [!__cplusplus]: Delete.
+	(throw_exception, throw_exception_sjlj): Update comments.
+	* guile/guile-internal.h (as_a_scm_t_subr) [!__cplusplus]: Delete.
+	* guile/guile.c (extension_language_guile): Write "extern const"
+	instead of EXPORTED_CONST.
+	* features/feature_to_c.sh: Don't emit !__cplusplus code.  Write
+	"extern const" instead of EXPORTED_CONST.
+
+2016-10-06  Doug Evans  <dje@google.com>
+
+	* python/py-value.c (valpy_long): Handle unsigned values.
+
+2016-10-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* frame.h: Forward-declare struct ui_out.
+
+2016-10-06  Tom Tromey  <tom@tromey.com>
+
+	* MAINTAINERS: Remove Java test maintainer.
+	* varobj.h (java_varobj_ops): Don't declare.
+	* valprint.h (struct value_print_options)
+	<pascal_static_field_print>: Update comment.
+	* utils.c (producer_is_gcc): Remove java reference.
+	* symtab.h (struct general_symbol_info): Remove java references.
+	(SYMBOL_SEARCH_NAME): Likewise.
+	* objfiles.c (allocate_objfile): Update comment.
+	* linespec.c (find_linespec_symbols): Remove java references.
+	* gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_baseclass_offset): Remove
+	java references.
+	* gdbtypes.h (struct cplus_struct_type) <is_java>: Remove.
+	(TYPE_CPLUS_REALLY_JAVA): Remove.
+	* c-varobj.c (enum vsections): Update comment.
+	* symtab.c (symbol_set_language, symbol_set_names)
+	(symbol_natural_name, symbol_demangled_name)
+	(demangle_for_lookup, symbol_matches_domain)
+	(default_make_symbol_completion_list_break_on_1): Remove java
+	references.
+	(JAVA_PREFIX, JAVA_PREFIX_LEN): Remove.
+	* psymtab.c (match_partial_symbol, psymtab_search_name)
+	(lookup_partial_symbol): Remove java references.
+	* dwarf2read.c (find_slot_in_mapped_hash): Remove java references.
+	(add_partial_symbol, dwarf2_compute_name, dwarf2_physname)
+	(dwarf2_add_member_fn, is_vtable_name, read_structure_type)
+	(process_structure_scope, read_subroutine_type)
+	(read_subrange_type, load_partial_dies)
+	(new_symbol_full, determine_prefix, typename_concat)
+	(dwarf2_name): Remove java references.
+	(set_cu_language): Treat Java as C++.
+	* c-typeprint.c (c_type_print_args): Remove java reference.
+	* defs.h (enum language) <language_java>: Remove.
+	* Makefile.in (SFILES, HFILES_NO_SRCDIR, COMMON_OBS, YYFILES)
+	(YYOBJ, local-maintainer-clean): Don't mention java files.
+	* jv-exp.y, jv-lang.c, jv-lang.h, jv-typeprint.c, jv-valprint.c,
+	jv-varobj.c: Remove.
+
+2016-10-06  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_pseudo_register_type): Make FCRs always
+	32-bit.
+
+2016-10-06  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_pseudo_register_type): Rearrange comments
+	throughout.
+
+2016-10-06  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* stack.c (frame_info): Call val_print_not_saved instead of
+	val_print_unavailable if frame_id check fails.
+
+2016-10-06  Pedro Alves  <palves@redhat.com>
+
+	* jit.c (free_objfile_data): Delete the JIT breakpoint and clear
+	the cached code address.
+
+2016-10-06  Doug Evans  <dje@google.com>
+
+	* features/aarch64-core.xml (cpsr_flags): Elide "type" and specify
+	"end" in all fields.
+	* features/aarch64.c: Regenerate.
+	* features/i386/32bit-mpx.xml (_bndcfgu): Specify type of "preserved"
+	and "enabled" fields. Correct size of "enabled" field.
+	* features/i386/64bit-mpx.xml (_bndcfgu): Specify type of "preserved"
+	and "enabled" fields.
+	* features/i386/i386-avx-mpx-linux.c: Regenerate.
+	* features/i386/i386-avx-mpx.c: Regenerate.
+	* features/i386/i386-avx512-linux.c: Regenerate.
+	* features/i386/i386-avx512.c: Regenerate.
+	* features/i386/i386-mpx-linux.c: Regenerate.
+	* features/i386/i386-mpx.c: Regenerate.
+	* features/arc-arcompact.c: Regenerate.
+	* features/arc-v2.c: Regenerate.
+	* xml-tdesc.c (tdesc_start_field): Require "end" spec.  Single bit
+	fields default to "bool" type.
+
+	Revert 2016-03-15  Doug Evans  <dje@google.com>
+	* features/i386/32bit-core.xml (i386_eflags): Remove "end" spec.
+	* features/i386/32bit-sse.xml (i386_eflags): Ditto.
+	* features/i386/64bit-core.xml (i386_eflags): Ditto.
+	* features/i386/64bit-sse.xml (i386_eflags): Ditto.
+	* features/i386/x32-core.xml (i386_eflags): Ditto.
+
+2016-10-05  Tom Tromey  <tom@tromey.com>
+
+	PR breakpoints/20653:
+	* location.c (string_to_explicit_location): Use NULL, not '\0'.
+
+2016-10-05  Tom Tromey  <tom@tromey.com>
+
+	PR symtab/20652:
+	* psymtab.c (psymbol_compare): Correctly compare "ginfo.value"
+	fields.
+
+2016-10-05  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* dwarf2expr.c (dwarf_expr_require_composition): Allow
+	DW_OP_GNU_uninit.
+	(execute_stack_op): Use dwarf_expr_require_composition instead of
+	copying its logic.
+
+2016-10-05  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* arc-tdep.c (arc_frame_prev_register): Remove annoying log message.
+
+2016-10-05  Yao Qi  <yao.qi@linaro.org>
+
+	* features/Makefile (WHICH): Add
+	rs6000/powerpc-isa205-32l, rs6000/powerpc-isa205-64l,
+	rs6000/powerpc-isa205-altivec32l, rs6000/powerpc-isa205-altivec64l,
+	rs6000/powerpc-isa205-vsx32l and rs6000/powerpc-isa205-vsx64l.
+	* regformats/rs6000/powerpc-isa205-32l.dat: Regenerated.
+	* regformats/rs6000/powerpc-isa205-64l.dat: Likewise.
+	* regformats/rs6000/powerpc-isa205-altivec32l.dat: Likewise.
+	* regformats/rs6000/powerpc-isa205-altivec64l.dat: Likewise.
+	* regformats/rs6000/powerpc-isa205-vsx32l.dat: Likewise.
+	* regformats/rs6000/powerpc-isa205-vsx64l.dat: Likewise.
+
+2016-10-05  Yao Qi  <yao.qi@linaro.org>
+
+	* features/Makefile (XMLTOC): Add s390-tevx-linux64.xml,
+	s390-vx-linux64.xml, s390x-tevx-linux64.xml and
+	s390x-vx-linux64.xml.
+
+2016-10-05  Yao Qi  <yao.qi@linaro.org>
+
+	* features/Makefile: Remove i386/*-expedite. Add i386-expedite,
+	amd64-expedite, and x32-expedite.
+
+2016-10-05  Terry Guo  <terry.guo@arm.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c: Adjust includes.
+	* features/Makefile (WHICH): Add "arm/" directory to arm
+	target descriptions.
+	(XMLTOC): Likewise.
+	(arm/arm-with-iwmmxt.dat): Adjust the path for
+	dependencies.
+	* features/arm-core.xml: Moved to ...
+	* features/arm/arm-core.xml: ... it.
+	* features/arm-fpa.xml: Moved to ...
+	* features/arm/arm-fpa.xml: ... it.
+	* features/arm-m-profile.xml: Moved to ...
+	* features/arm/arm-m-profile.xm: ... it.
+	* features/arm-vfpv2.xml: Moved to ...
+	* features/arm/arm-vfpv2.xm: ... it.
+	* features/arm-vfpv3.xml: Moved to ...
+	* features/arm/arm-vfpv3.xml: ... it.
+	* features/arm-with-iwmmxt.c: Moved to ...
+	* features/arm/arm-with-iwmmxt.c: ... it.
+	* features/arm-with-iwmmxt.xml: Moved to ...
+	* features/arm/arm-with-iwmmxt.xml: ... it.
+	* features/arm-with-m-fpa-layout.c: Moved to ...
+	* features/arm/arm-with-m-fpa-layout.c: ... it.
+	* features/arm-with-m-fpa-layout.xml: Moved to ...
+	* features/arm/arm-with-m-fpa-layout.xml: ... it.
+	* features/arm-with-m-vfp-d16.c: Moved to ...
+	* features/arm/arm-with-m-vfp-d16.c: ... it.
+	* features/arm-with-m-vfp-d16.xml: Moved to ...
+	* features/arm/arm-with-m-vfp-d16.xml: ... it.
+	* features/arm-with-m.c: Moved to ...
+	* features/arm/arm-with-m.c: ... it.
+	* features/arm-with-m.xml: Moved to ...
+	* features/arm/arm-with-m.xm: ... it.
+	* features/arm-with-neon.c: Moved to ...
+	* features/arm/arm-with-neon.c: ... it.
+	* features/arm-with-neon.xml: Moved to ...
+	* features/arm/arm-with-neon.xml: ... it.
+	* features/arm-with-vfpv2.c: Moved to ...
+	* features/arm/arm-with-vfpv2.c: ... it.
+	* features/arm-with-vfpv2.xml: Moved to ...
+	* features/arm/arm-with-vfpv2.xml: ... it.
+	* features/arm-with-vfpv3.c: Moved to ...
+	* features/arm/arm-with-vfpv3.c: ... it.
+	* features/arm-with-vfpv3.xml: Moved to ...
+	* features/arm/arm-with-vfpv3.xml: ... it.
+	* features/xscale-iwmmxt.xml: Moved to ...
+	* features/arm/xscale-iwmmxt.xml: ... it.
+
+2016-10-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+2016-10-03  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20487
+	* NEWS: Mention new frame field of =thread-selected event.
+	* cli/cli-decode.c (add_cmd): Initialize c->suppress_notification.
+	(add_com_suppress_notification): New function definition.
+	(cmd_func): Set and restore the suppress_notification flag.
+	* cli/cli-deicode.h (struct cmd_list_element)
+	<suppress_notification>: New field.
+	* cli/cli-interp.c (cli_suppress_notification): New global variable.
+	(cli_on_user_selected_context_changed): New function.
+	(_initialize_cli_interp): Attach to user_selected_context_changed
+	observer.
+	* command.h (struct cli_suppress_notification): New structure.
+	(cli_suppress_notification): New global variable declaration.
+	(add_com_suppress_notification): New function declaration.
+	* defs.h (enum user_selected_what_flag): New enum.
+	(user_selected_what): New enum flag type.
+	* frame.h (print_stack_frame_to_uiout): New function declaration.
+	* gdbthread.h (print_selected_thread_frame): New function declaration.
+	* inferior.c (print_selected_inferior): New function definition.
+	(inferior_command): Remove printing of inferior/thread/frame switch
+	notifications, notify user_selected_context_changed observer.
+	* inferior.h (print_selected_inferior): New function declaration.
+	* mi/mi-cmds.c (struct mi_cmd): Add user_selected_context
+	suppression to stack-select-frame and thread-select commands.
+	* mi/mi-interp.c (struct mi_suppress_notification)
+	<user_selected_context>: Initialize.
+	(mi_user_selected_context_changed): New function definition.
+	(_initialize_mi_interp): Attach to user_selected_context_changed.
+	* mi/mi-main.c (mi_cmd_thread_select): Print thread selection reply.
+	(mi_execute_command): Handle notification suppression.  Notify
+	user_selected_context_changed observer on thread change instead of printing
+	event directly.  Don't send it if command already sends the notification.
+	(command_notifies_uscc_observer): New function.
+	(mi_cmd_execute): Don't handle notification suppression.
+	* mi/mi-main.h (struct mi_suppress_notification)
+	<user_selected_context>: New field.
+	* stack.c (print_stack_frame_to_uiout): New function definition.
+	(select_frame_command): Notify user_selected_context_changed
+	observer.
+	(frame_command): Call print_selected_thread_frame if there's no frame
+	change or notify user_selected_context_changed observer if there is.
+	(up_command): Notify user_selected_context_changed observer.
+	(down_command): Likewise.
+	(_initialize_stack): Suppress user_selected_context notification for
+	command select-frame.
+	* thread.c (thread_command): Notify
+	user_selected_context_changed if the thread has changed, print
+	thread info directly if it hasn't.
+	(do_captured_thread_select): Do not print thread switch event.
+	(print_selected_thread_frame): New function definition.
+	* tui/tui-interp.c (tui_on_user_selected_context_changed):
+	New function definition.
+	(_initialize_tui_interp): Attach to user_selected_context_changed
+	observer.
+
+2016-09-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR gdb/20609 - attach of JIT-debug-enabled inf 7.11.1 regression
+	* exec.c (exec_file_locate_attach): Add parameter defer_bp_reset.
+	Use it.
+	* gdbcore.h (exec_file_locate_attach): Add parameter defer_bp_reset.
+	* infcmd.c (setup_inferior): Update caller.
+	* remote.c (remote_add_inferior): Likewise.
+
+2016-09-28  Pedro Alves  <palves@redhat.com>
+
+	* infcall.c (run_inferior_call): Remove input from the event
+	loop while running the infcall.
+
+2016-09-27  Fredrik Hederstierna  <fredrik.hederstierna@verisure.com>
+
+	* arm-tdep.c (arm_m_addr_is_magic): New function.
+	(arm_addr_bits_remove): Call arm_m_addr_is_magic.
+	(arm_m_exception_unwind_sniffer): Likewise.
+
+2016-09-23  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (windows_delete_thread): Adjusting call to
+	target_mourn_inferior to include ptid_t argument.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* utils.h (make_cleanup_dyn_string_delete): Remove declaration.
+	* utils.c: Don't include dyn-string.h.
+	(do_dyn_string_delete, make_cleanup_dyn_string_delete): Remove.
+	* cli/cli-cmds.c: Include <string>.  Don't include dyn-string.h.
+	(argv_to_string): Rename.  Change return type to std::string.
+	(alias_command): Use std::string.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* objfiles.c: Include <vector>.
+	(objfile_relocate): Use std::vector.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c: Include <string> and <vector>.
+	(rust_evaluate_funcall): Use std::vector, std::string.
+	(rust_evaluate_subexp): Use std::string.
+	(rust_lookup_symbol_nonlocal): Use std::string.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* cp-namespace.c: Include <string>.
+	(cp_search_static_and_baseclasses)
+	(cp_lookup_symbol_imports_or_template, find_symbol_in_baseclass):
+	Use std::string.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* break-catch-sig.c: Include <string>.
+	(signal_catchpoint_print_one): Use std::string.
+
+2016-09-23  Tom Tromey  <tom@tromey.com>
+
+	* utils.c (struct restore_ui_out_closure): Remove.
+	* objfiles.h (terminate_minimal_symbol_table): Don't declare.
+
+2016-09-23  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/linux-osdata.c (linux_xfer_osdata_threads): Replace
+	sprintf with xsnprintf.
+	(linux_xfer_osdata_fds): Likewise.
+
+2016-09-23  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (SFILES): Add common/new-op.c.
+	(COMMON_OBS): Add common/new-op.o.
+	(new-op.o): New rule.
+	* common/common-exceptions.h: Include <new>.
+	(struct gdb_quit_bad_alloc): New type.
+	* common/new-op.c: New file.
+
+2016-09-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* rs6000-tdep.c (ppc_process_record_op31): Fix
+	regcache_raw_read_unsigned call using the correct parameter type.
+
+2016-09-22  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* arc-tdep.c: Fix ARI warning for printf(%p).
+
+2016-09-21  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* MAINTAINERS (Write After Approval): Add Anton Kolesov.
+
+2016-09-21  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* Makefile.in (ALL_TARGET_OBS): Add arc-tdep.o.
+	(HFILES_NO_SRCDIR): Add arc-tdep.h.
+	(ALLDEPFILES): Add arc-tdep.c.
+	* NEWS: Mention new ARC port.
+	* configure.tgt: Add ARC.
+	* arc-tdep.c: New file.
+	* arc-tdep.h: New file.
+	* features/Makefile (XMLTOC): Add arc-v2.xml and arc-arcompact.xml.
+	* features/arc-v2.xml: New file.
+	* features/arc-v2.c: New file (generated).
+	* features/arc-arcompact.xml: New file.
+	* features/arc-arcompact.c: New file (generated).
+
+2016-09-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* rs6000-tdep.c (ppc_process_record_op63): Fix return of instruction
+	handlers.
+
+2016-09-21  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/20604:
+	* top.h (quit_force): Update.
+	* top.c (quit_force): Changed type of first argument.  Don't
+	evaluate expression.  Pass NULL to kill_or_detach.
+	* cli/cli-cmds.c (quit_command): Evaluate "args".
+
+2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* .gitignore: Ignore more files.
+	* data-directory/.gitignore: Likewise.
+
+2016-09-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* rs6000-tdep.c (PPC_DQ): New macro.
+	(ppc_process_record_op4): Add Power ISA 3.0 instructions.
+	(ppc_process_record_op19): Likewise.
+	(ppc_process_record_op31): Likewise.
+	(ppc_process_record_op59): Likewise.
+	(ppc_process_record_op60): Likewise.
+	(ppc_process_record_op63): Likewise.
+	(ppc_process_record): Likewise.
+	(ppc_process_record_op61): New function.
+
+2016-09-21  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch32-linux-nat.c (aarch32_gp_regcache_collect): Keep
+	bits 20 to 23.
+
+2016-09-20  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (convert_value_from_python): Make PyInt_Check
+	conditional on Python 2.
+	* python/py-arch.c (archpy_disassemble): Make PyInt_Check
+	conditional on Python 2.
+
+2016-09-20  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String
+	Word instructions.
+
+2016-09-20  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of
+	'resume_ptid' to 'target_mourn_inferior'.  Fix regression
+	introduced by my last commit.
+
+2016-09-19  Pedro Alves  <palves@redhat.com>
+
+	* common/gdb_locale.h [!ENABLE_NLS] (gettext, dgettext, dcgettext,
+	textdomain, bindtextdomain): Delete macros.
+	* main.c (captured_main) [!ENABLE_NLS]: Skip bintextdomain and
+	textdomain calls.
+
+2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* darwin-nat.c (darwin_kill_inferior): Adjusting call to
+	target_mourn_inferior to include ptid_t argument.
+	* fork-child.c (startup_inferior): Likewise.
+	* gnu-nat.c (gnu_kill_inferior): Likewise.
+	* inf-ptrace.c (inf_ptrace_kill): Likewise.
+	* infrun.c (handle_inferior_event_1): Likewise.
+	* linux-nat.c (linux_nat_attach): Likewise.
+	(linux_nat_kill): Likewise.
+	* nto-procfs.c (interrupt_query): Likewise.
+	(procfs_interrupt): Likewise.
+	(procfs_kill_inferior): Likewise.
+	* procfs.c (procfs_kill_inferior): Likewise.
+	* record.c (record_mourn_inferior): Likewise.
+	* remote-sim.c (gdbsim_kill): Likewise.
+	* remote.c (remote_detach_1): Likewise.
+	(remote_kill): Likewise.
+	* target.c (target_mourn_inferior): Change declaration to accept
+	new ptid_t argument; use gdb_assert on it.
+	* target.h (target_mourn_inferior): Move function prototype from
+	here...
+	* target/target.h (target_mourn_inferior): ... to here.  Adjust it
+	to accept new ptid_t argument.
+	* windows-nat.c (get_windows_debug_event): Adjusting call to
+	target_mourn_inferior to include ptid_t argument.
+
+2016-09-18  Pedro Alves  <palves@redhat.com>
+
+	* s390-linux-nat.c: Include <algorithm>.
+
+2016-09-18  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (hardware_watchpoint_inserted_in_range): Explicitly
+	specify the std:min/std::max specialization.
+	* exec.c (section_table_read_available_memory): Likewise.
+	* remote.c (remote_read_qxfer): Likewise.
+	* target.c (simple_verify_memory): Likewise.
+
+2016-09-16  Simon Marchi  <simark@simark.ca>
+
+	* infrun.c (restore_current_uiout_cleanup): Move to ui-out.c.
+	(print_stop_event): Use make_cleanup_restore_current_uiout.
+	* python/python.c (execute_gdb_command): Likewise.
+	* ui-out.c (restore_current_uiout_cleanup): Move from infrun.c.
+	(make_cleanup_restore_current_uiout): New function definition.
+	* ui-out.h (make_cleanup_restore_current_uiout): New function
+	declaration.
+	* utils.c (do_restore_ui_out): Remove.
+	(make_cleanup_restore_ui_out): Remove.
+	* utils.h (make_cleanup_restore_ui_out): Remove.
+
+2016-09-16  Pedro Alves  <palves@redhat.com>
+
+	* defs.h (min, max): Delete.
+	* aarch64-tdep.c: Include <algorithm> and use std::min and
+	std::max throughout.
+	* aarch64-tdep.c: Likewise.
+	* alpha-tdep.c: Likewise.
+	* amd64-tdep.c: Likewise.
+	* amd64-windows-tdep.c: Likewise.
+	* arm-tdep.c: Likewise.
+	* avr-tdep.c: Likewise.
+	* breakpoint.c: Likewise.
+	* btrace.c: Likewise.
+	* ctf.c: Likewise.
+	* disasm.c: Likewise.
+	* doublest.c: Likewise.
+	* dwarf2loc.c: Likewise.
+	* dwarf2read.c: Likewise.
+	* environ.c: Likewise.
+	* exec.c: Likewise.
+	* f-exp.y: Likewise.
+	* findcmd.c: Likewise.
+	* ft32-tdep.c: Likewise.
+	* gcore.c: Likewise.
+	* hppa-tdep.c: Likewise.
+	* i386-darwin-tdep.c: Likewise.
+	* i386-tdep.c: Likewise.
+	* linux-thread-db.c: Likewise.
+	* lm32-tdep.c: Likewise.
+	* m32r-tdep.c: Likewise.
+	* m88k-tdep.c: Likewise.
+	* memrange.c: Likewise.
+	* minidebug.c: Likewise.
+	* mips-tdep.c: Likewise.
+	* moxie-tdep.c: Likewise.
+	* nds32-tdep.c: Likewise.
+	* nios2-tdep.c: Likewise.
+	* nto-procfs.c: Likewise.
+	* parse.c: Likewise.
+	* ppc-sysv-tdep.c: Likewise.
+	* probe.c: Likewise.
+	* record-btrace.c: Likewise.
+	* remote.c: Likewise.
+	* rs6000-tdep.c: Likewise.
+	* rx-tdep.c: Likewise.
+	* s390-linux-nat.c: Likewise.
+	* s390-linux-tdep.c: Likewise.
+	* ser-tcp.c: Likewise.
+	* sh-tdep.c: Likewise.
+	* sh64-tdep.c: Likewise.
+	* source.c: Likewise.
+	* sparc-tdep.c: Likewise.
+	* symfile.c: Likewise.
+	* target-memory.c: Likewise.
+	* target.c: Likewise.
+	* tic6x-tdep.c: Likewise.
+	* tilegx-tdep.c: Likewise.
+	* tracefile-tfile.c: Likewise.
+	* tracepoint.c: Likewise.
+	* valprint.c: Likewise.
+	* value.c: Likewise.
+	* xtensa-tdep.c: Likewise.
+	* cli/cli-cmds.c: Likewise.
+	* compile/compile-object-load.c: Likewise.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (PER_BIT, PER_EVENT_BRANCH, PER_EVENT_IFETCH)
+	(PER_EVENT_STORE, PER_EVENT_NULLIFICATION)
+	(PER_CONTROL_BRANCH_ADDRESS, PER_CONTROL_SUSPENSION)
+	(PER_CONTROL_ALTERATION): New macros.
+	(struct s390_debug_reg_state) <break_areas>: New member.
+	(s390_forget_process): Free break_areas as well.
+	(s390_linux_new_fork): Copy break_areas as well.
+	(s390_prepare_to_resume): Install hardware breakpoints.
+	(s390_can_use_hw_breakpoint): Indicate support for hardware
+	breakpoints.
+	(s390_insert_hw_breakpoint, s390_remove_hw_breakpoint): New
+	linux_nat target methods.
+	(_initialize_s390_nat): Register them.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* nat/linux-nat.h (lwp_is_stepping): New declaration.
+	* linux-nat.c (lwp_is_stepping): New function.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (gdbcmd.h): New include.
+	(s390_show_debug_regs): New function.
+	(s390_stopped_by_watchpoint): Call it, if show_debug_regs is set.
+	(s390_prepare_to_resume): Likewise.
+	(_initialize_s390_nat): Register the command "maint set
+	show-debug-regs".
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (watch_areas): Remove variable.  Replace by a
+	member of...
+	(struct s390_debug_reg_state): ...this.  New struct.
+	(struct s390_process_info): New struct.
+	(s390_process_list): New variable.
+	(s390_find_process_pid, s390_add_process, s390_process_info_get)
+	(s390_get_debug_reg_state): New functions.
+	(s390_stopped_by_watchpoint): Now access the watch_areas VEC via
+	s390_get_debug_reg_state.
+	(s390_prepare_to_resume): Likewise.
+	(s390_insert_watchpoint): Likewise.
+	(s390_remove_watchpoint): Likewise.
+	(s390_forget_process, s390_linux_new_fork): New linux_nat target
+	methods.
+	(_initialize_s390_nat): Register them.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (s390_watch_area): New typedef.  Define a VEC.
+	(watch_base): Remove variable.
+	(watch_areas): New variable.
+	(s390_stopped_by_watchpoint): Transform operations on the
+	watch_base list to equivalent operations on the watch_areas VEC.
+	(s390_prepare_to_resume): Likewise.
+	(s390_insert_watchpoint): Likewise.
+	(s390_remove_watchpoint): Likewise.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-nat.c (s390_prepare_to_resume): Use advertised lwp
+	functions instead of accessing lwp_info structure members.
+	(s390_mark_per_info_changed): New function.
+	(s390_new_thread): Use it.
+	(s390_refresh_per_info_cb): New function.
+	(s390_refresh_per_info): Remove parameter.  Refresh all lwps of
+	the current process.
+	(s390_insert_watchpoint): Adjust call to s390_refresh_per_info.
+	(s390_remove_watchpoint): Likewise.
+
+2016-09-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* elfread.c (auxv.h): New include.
+	(elf_gnu_ifunc_resolve_addr): Pass HWCAP to ifunc resolver.
+
+2016-09-08  Tom Tromey  <tom@tromey.com>
+
+	* remote.c (remote_notif_stop_ack, remote_wait_as)
+	(show_remote_cmd): Remove unneeded casts.
+
+2016-09-06  Pedro Alves  <palves@redhat.com>
+
+	* top.c (wait_sync_command_done): Don't assume current_ui doesn't
+	change across events.  Restore the current UI before returning.
+	(gdb_readline_wrapper): Restore the current UI before returning.
+
+2016-09-06  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (restore_ui_cleanup): Now static.
+	(make_cleanup_restore_current_ui): New function.
+	(switch_thru_all_uis_init): Use it.
+	* infcall.c (call_thread_fsm_should_stop): Use it.
+	* infrun.c (fetch_inferior_event): Use it.
+	* top.c (new_ui_command): Use it.
+	* top.h (restore_ui_cleanup): Delete declaration.
+	(make_cleanup_restore_current_ui): New declaration.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* i386-tdep.c (i386_floatformat_for_type): New function.
+	(i386_gdbarch_init): Install it.
+	* ppc-linux-tdep.c (ppc_floatformat_for_type): New function.
+	(ppc_linux_init_abi): Install it.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbarch.sh (floatformat_for_type): New gdbarch callback.
+	* gdbarch.h, gdbarch.c: Re-generate.
+	* arch-utils.h (default_floatformat_for_type): New prototype.
+	* arch-utils.c (default_floatformat_for_type): New function.
+
+	* doublest.c (floatformat_from_length): Remove.
+	(floatformat_from_type): Assume TYPE_FLOATFORMAT is non-NULL.
+	* gdbtypes.c (verify_floatformat): Require non-NULL format.
+
+	* dwarf2read.c (dwarf2_init_float_type): New function.
+	(read_base_type): Use it.
+	* stabsread.c (dbx_init_float_type): New function.
+	(read_sun_floating_type): Use it.
+	(read_range_type): Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* ada-lang.c (ada_language_arch_info): Use gdbarch-provided
+	platform ABI floating-point formats for built-in types.
+	* d-lang.c (build_d_types): Likewise.
+	* f-lang.c (build_fortran_types): Likewise.
+	* m2-lang.c (build_m2_types): Likewise.
+	* mdebugread.c (basic_type): Likewise.
+
+	* go-lang.c (build_go_types): Use IEEE floating-point formats
+	for language built-in types as mandanted by the language.
+	* jv-lang.c (build_java_types): Likewise.
+	* rust-lang.c (rust_language_arch_info): Likewise.
+	* stabsread.c (rs6000_builtin_type): Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbtypes.c (init_type): Remove "char" special case.
+	(arch_integer_type): Likewise.
+	(gdbtypes_post_init): Set TYPE_NOSIGN for "char" type.
+	(objfile_type): Likewise.
+	* mdebugread.c (basic_type): Likewise.
+	* stabsread.c (rs6000_builtin_type): Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbtypes.h (enum type_flag_value): Remove.
+	Remove references to TYPE_FLAG_... in comments throughout.
+	* gdbtypes.c (recursive_dump_type): Do not print TYPE_FLAG_... 
+	flags, print the corresponding TYPE_... access macro names.
+	Remove references to TYPE_FLAG_... in comments throughout.
+	* infcall.c: Remove references to TYPE_FLAG_... in comments.
+	* valprint.c: Likewise.
+	* gdb-gdb.py (class TypeFlag): No longer consider TYPE_FLAG_...
+	values, only TYPE_INSTANCE_FLAG_... values.
+	(class TypeFlagsPrinter): Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbtypes.h (init_type): Remove FLAGS argument.  Move OBJFILE
+	argument to first position.
+	(init_integer_type): New prototype.
+	(init_character_type): Likewise.
+	(init_boolean_type): Likewise.
+	(init_float_type): Likewise.
+	(init_decfloat_type): Likewise.
+	(init_complex_type): Likewise.
+	(init_pointer_type): Likewise.
+	* gdbtypes.c (verify_floatflormat): New function.
+	(init_type): Remove FLAGS argument and processing.  Move OBJFILE
+	argument to first position.
+	(init_integer_type): New function.
+	(init_character_type): Likewise.
+	(init_boolean_type): Likewise.
+	(init_float_type): Likewise.
+	(init_decfloat_type): Likewise.
+	(init_complex_type): Likewise.
+	(init_pointer_type): Likewise.
+	(arch_float_type): Use verify_floatflormat.
+	(objfile_type): Use init_..._type helpers instead of calling
+	init_type directly.
+	* dwarf2read.c (fixup_go_packaging): Update to changed init_type
+	prototype.
+	(read_namespace_type): Likewise.
+	(read_module_type): Likewise.
+	(read_typedef): Likewise.
+	(read_unspecified_type): Likewise.
+	(build_error_marker_type): Likewise.
+	(read_base_type): Use init_..._type helpers.
+	* mdebugread.c (basic_type): Use init_..._type helpers.
+	(parse_type): Update to changed init_type prototype.
+	(cross_ref): Likewise.
+	* stabsread.c (rs6000_builtin_type): Use init_..._type helpers.
+	(read_sun_builtin_type): Likewise.
+	(read_sun_floating_type): Likewise.
+	(read_range_type): Likewise.  Also update to changed init_type
+	prototype.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbtypes.h (arch_decfloat_type): New prototype.
+	(arch_pointer_type): Likewise.
+	* gdbtypes.c (arch_decfloat_type): New function.
+	(arch_pointer_type): Likewise.
+	(gdbtypes_post_init): Use arch_decfloat_type.
+	* avr-tdep.c (avr_gdbarch_init): Use arch_pointer_type.
+	* ft32-tdep.c (ft32_gdbarch_init): Likewise.
+	* m32c-tdep.c (make_types): Likewise.
+	* rl78-tdep.c (rl78_gdbarch_init): Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdbtypes.c (set_type_code): New function.
+	(init_type, arch_type): Use it.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* ada-lang.c (ada_language_arch_info): Use gdbarch_long_double_bit
+	instead of gdbarch_double_bit for "long_long_float".
+
+2016-09-05  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that a C++ compiler is now required.
+	* Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
+	(COMPILE.pre, CC_LD): Use CXX directly.
+	(INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
+	* acinclude.m4: Don't include build-with-cxx.m4.
+	* build-with-cxx.m4: Delete file.
+	* configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
+	* warning.m4: Assume $enable_build_with_cxx is yes.
+	* configure: Regenerate.
+
+2016-09-05  Pedro Alves  <palves@redhat.com>
+
+	PR backtrace/19927
+	* frame.c (get_frame_id): Compute the frame id if not computed
+	yet.
+	(unwind_to_current_frame): Delete.
+	(get_current_frame): Use get_prev_frame_always_1 to get the
+	current frame and assert that that always succeeds.
+	(get_prev_frame_if_no_cycle): Skip cycle detection if returning
+	the current frame.
+
+2016-09-02  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/11616:
+	* dwarf2read.c (decode_locdesc): Handle DW_OP_form_tls_address.
+	* dwarf2loc.c (dwarf2_compile_expr_to_ax): Handle
+	DW_OP_form_tls_address.
+	(locexpr_describe_location_piece): Likewise.
+	* dwarf2expr.h (struct dwarf_expr_context_funcs): Update comment.
+	* dwarf2expr.c (execute_stack_op): Handle DW_OP_form_tls_address.
+	(ctx_no_get_tls_address): Mention DW_OP_form_tls_address.
+	* compile/compile-loc2c.c (struct insn_info): Update comment.
+	(compute_stack_depth_worker): Handle DW_OP_form_tls_address.
+
+2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* target.c (target_wait): Mention that the function's prototype
+	can be found at target/target.h.
+	* target.h (target_wait): Move prototype from here...
+	* target/target.h (target_wait): ... to here.
+
+2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* fork-child.c (startup_inferior): Replace calls to target_resume
+	by target_continue{,_no_signal}, depending on the case.
+	* linux-nat.c (cleanup_target_stop): Call
+	target_continue_no_signal instead of target_resume.
+	* procfs.c (procfs_wait): Likewise.
+	* target.c (target_continue): New function.
+	* target/target.h (target_continue): New prototype.
+
+2016-08-31  Yao Qi  <yao.qi@linaro.org>
+
+	* record-full.c (record_full_insert_breakpoint): Fix typo.
+
+2016-08-30  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* thread.c (tp_array_compar): Insert missing parentheses.
+
+2016-08-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Replace
+	designated initializer list by plain initializer list, for C++
+	compliance.
+
+2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* aarch64-linux-nat.c (ps_get_thread_area): Remove const from
+	struct ps_prochandle.
+	* amd64-linux-nat.c (ps_get_thread_area): Likewise.
+	* arm-linux-nat.c (ps_get_thread_area): Likewise.
+	* gdb_proc_service.h (ps_get_thread_area): Likewise.
+	* i386-linux-nat.c (ps_get_thread_area): Likewise.
+	* m68klinux-nat.c (ps_get_thread_area): Likewise.
+	* mips-linux-nat.c (ps_get_thread_area): Likewise.
+	* nat/aarch64-linux.c (aarch64_ps_get_thread_area): Likewise.
+	* nat/aarch64-linux.h (aarch64_ps_get_thread_area): Likewise.
+	* xtensa-linux-nat.c (ps_get_thread_area): Likewise.
+
+2016-08-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* infcmd.c (set_inferior_io_terminal): Set inferior terminal to
+	NULL if terminal_name is an empty string.
+	(_initialize_infcmd): Make the argument of "set inferior-tty"
+	optional, mention it in the help doc.
+
+2016-08-24  Carl Love  <cel@us.ibm.com>
+
+	* rs6000-tdep.c (rs6000_gdbarch_init): Remove call
+	set_gdbarch_deprecated_fp_regnum() architecture
+	initialization function.
+
+2016-08-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* stack.c (parse_frame_specification): Fix typo in comment.
+
+2016-08-23  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20494
+	* inflow.c (our_terminal_info, initial_gdb_ttystate): Update
+	comments.
+	(enum gdb_has_a_terminal_flag_enum, gdb_has_a_terminal_flag):
+	Delete.
+	(set_initial_gdb_ttystate): Record our_terminal_info here too,
+	instead of ...
+	(gdb_has_a_terminal): ... here.  Reimplement in terms of
+	initial_gdb_ttystate.  Make static.
+	* terminal.h (gdb_has_a_terminal): Delete declaration.
+	(set_initial_gdb_ttystate): Add comment.
+	* top.c (show_interactive_mode): Use input_interactive_p instead
+	of gdb_has_a_terminal.
+
+2016-08-22  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20505
+	* linux-tdep.c (linux_vsyscall_range_raw): For core inferiors,
+	find the vDSO's start address with AT_SYSINFO_EHDR too, and
+	determine the vDSO's size by finding the PT_LOAD segment that
+	matches AT_SYSINFO_EHDR.
+
+2016-08-19  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_analyze_prologue): Handle register
+	based STP instruction.
+
+2016-08-19  Yao Qi  <yao.qi@linaro.org>
+
+	* completer.c (linespec_location_completer): Make file_to_match
+	null-terminated.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	* amd64-tdep.c (amd64_relocate_instruction) <callq>: Handle return
+	addresses over 0x7fffffff.
+
+2016-08-18  Carl Love  <cel@us.ibm.com>
+
+	* MAINTANERS Write After Approval): Add "Carl Love".
+
+2016-08-18  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions.
+
+2016-08-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* inferior.c (remove_inferior_command): Fix error message.
+
+2016-08-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* inferior.c (exit_inferior_1): Remove comment.
+
+2016-08-15  Matthew Wahab  <matthew.wahab@arm.com>
+
+	PR gdb/20457
+	* gdb_proc_service.h: Add an include of gregset.h
+        [!HAVE_PROC_SERVICE_H]: Remove the include of gregset.h.
+
+2016-08-15  Yao Qi  <yao.qi@linaro.org>
+
+	* location.c (explicit_location_lex_one): Compare the return
+	value of strncmp with zero.  Don't check (*inp)[9].  Increment
+	*inp by 8.
+
+2016-08-11  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20413
+	* nat/linux-ptrace.c: Include <sys/procfs.h> instead of
+	"gregset.h".
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19187
+	* record-full.c (record_full_remove_breakpoint): Don't remove the
+	breakpoint from the record_full_breakpoints VEC if we're detaching
+	the breakpoint from a fork child.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19187
+	* break-catch-sig.c (signal_catchpoint_remove_location): Adjust
+	interface.
+	* break-catch-syscall.c (remove_catch_syscall):
+	* breakpoint.c (enum remove_bp_reason): Moved to breakpoint.h.
+	(remove_breakpoint_1): Pass 'reason' down.
+	(remove_catch_fork, remove_catch_vfork, remove_catch_solib)
+	(remove_catch_exec, remove_watchpoint, remove_masked_watchpoint)
+	(base_breakpoint_remove_location, bkpt_remove_location)
+	(bkpt_probe_remove_location, bkpt_probe_remove_location): Adjust
+	interface.
+	* breakpoint.h (enum remove_bp_reason): Moved here from
+	breakpoint.c.
+	(struct breakpoint_ops) <remove_location>: Add 'reason' parameter.
+	* corelow.c (core_remove_breakpoint): New function.
+	(init_core_ops): Install it as to_remove_breakpoint method.
+	* exec.c (exec_remove_breakpoint): New function.
+	(init_exec_ops): Install it as to_remove_breakpoint method.
+	* mem-break.c (memory_remove_breakpoint): Adjust interface.
+	* record-btrace.c (record_btrace_remove_breakpoint): Adjust
+	interface.
+	* record-full.c (record_full_remove_breakpoint)
+	(record_full_core_remove_breakpoint): Adjust interface.
+	* remote.c (remote_remove_breakpoint): Adjust interface.
+	* target-debug.h (target_debug_print_enum_remove_bp_reason): New
+	macro.
+	* target-delegates.c: Regenerate.
+	* target.c (target_remove_breakpoint): Add 'reason' parameter.
+	* target.h (struct target_ops) <to_remove_breakpoint>: Add
+	'reason' parameter.
+	(target_remove_breakpoint, memory_remove_breakpoint): Add 'reason'
+	parameter.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19187
+	* breakpoint.c (insertion_state_t): Delete.
+	(enum remove_bp_reason): New.
+	(detach_breakpoints, remove_breakpoint_1, remove_breakpoint):
+	Adjust to use enum remove_bp_reason instead of insertion_state_t.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19187
+	* breakpoint.c (remove_breakpoint): Remove 'is' parameter and
+	always pass mark_uninserted to remove_breakpoint_1.
+	(insert_breakpoint_locations, remove_breakpoints)
+	(remove_breakpoints_pid, update_global_location_list): Update
+	callers.
+
+2016-08-10  Ð ÑƒÑ�Ð»Ð°Ð½ Ð˜Ð¶Ð±ÑƒÐ»Ð°Ñ‚Ð¾Ð²  <lrn1986@gmail.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (MS_VC_EXCEPTION): New define.
+	(handle_exception_result): New enum.
+	(windows_delete_thread): Free the thread's name.
+	(handle_exception): Handle MS_VC_EXCEPTION.
+	(get_windows_debug_event): Handle HANDLE_EXCEPTION_IGNORED.
+	(windows_thread_name): New function.
+	(windows_target): Install it as to_thread_name method.
+	* NEWS: Mention the thread naming support on MS-Windows.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	* common/signals-state-save-restore.c
+	(save_original_signals_state, restore_original_signals_state):
+	Wrap perror_with_name arguments with '()'.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20418
+	* event-top.c (ui_register_input_event_handler)
+	(ui_unregister_input_event_handler): New functions.
+	(async_enable_stdin): Register input in the event loop.
+	(async_disable_stdin): Unregister input from the event loop.
+	(gdb_setup_readline): Register input in the event loop.
+	* infrun.c (check_curr_ui_sync_execution_done): Register input in
+	the event loop.
+	* target.c (target_terminal_inferior): Don't unregister input from
+	the event loop.
+	(target_terminal_ours): Don't register input in the event loop.
+	* target.h (target_terminal_inferior)
+	(target_terminal_ours_for_output, target_terminal_ours): Update
+	comments.
+	* top.h (ui_register_input_event_handler)
+	(ui_unregister_input_event_handler): New declarations.
+	* utils.c (ui_unregister_input_event_handler_cleanup)
+	(prepare_to_handle_input): New functions.
+	(defaulted_query, prompt_for_continue): Use
+	prepare_to_handle_input.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR mi/20431
+	* mi/mi-main.c (mi_execute_command): Enable input and set prompt
+	state to PROMPT_NEEDED.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18653
+	* Makefile.in (SFILES): Add
+	common/signals-state-save-restore.c.
+	(HFILES_NO_SRCDIR): Add common/signals-state-save-restore.h.
+	(COMMON_OBS): Add signals-state-save-restore.o.
+	(signals-state-save-restore.o): New rule.
+	* configure: Regenerate.
+	* fork-child.c: Include "signals-state-save-restore.h".
+	(fork_inferior): Call restore_original_signals_state.
+	* main.c: Include "signals-state-save-restore.h".
+	(captured_main): Call save_original_signals_state.
+	* common/common.m4: Add sigaction to AC_CHECK_FUNCS checks.
+	* common/signals-state-save-restore.c: New file.
+	* common/signals-state-save-restore.h: New file.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	* value.c (unpack_value_bitfield): Skip unpacking if the parent
+	has no contents buffer to begin with.
+
+2016-08-08  Pedro Alves  <palves@redhat.com>
+
+	* features/i386/amd64-avx-mpx-linux.c: Regenerate.
+	* features/i386/amd64-avx-mpx.c: Regenerate.
+	* features/i386/i386-avx-mpx-linux.c: Regenerate.
+	* features/i386/i386-avx-mpx.c: Regenerate.
+
+2016-08-05  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* event-top.h (cli_command_loop): Remove.
+
+2016-08-05  Pedro Alves  <palves@redhat.com>
+
+	PR remote/20398
+	* remote-fileio.c (remote_fileio_quit_handler): Check the quit
+	flag before calling quit.
+
+2016-08-05  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that GDB and GDBserver build with a C++ compiler
+	by default.
+
+2016-08-05  Pedro Alves  <palves@redhat.com>
+
+	* build-with-cxx.m4: Change help string to be in terms of
+	--disable-build-with-cxx.
+	* configure: Regenerate.
+
+2016-08-04  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-nat.c (tdesc_arm_with_vfpv3): Remove the
+	declaration.
+	(aarch64_linux_read_description): Remove code on getting
+	auxv and select target description on it.  Select target
+	description by the result of NT_ARM_VFP ptrace request.
+
+2016-08-03  Tom Tromey  <tom@tromey.com>
+
+	PR python/18565:
+	* python/py-frame.c (frapy_function): Use find_frame_funname.
+
+2016-08-03  Tom Tromey  <tom@tromey.com>
+
+	* stack.c (find_frame_funname): Avoid any possible leak in case
+	cp_remove_params can throw.
+
+2016-08-03  Tom Tromey  <tom@tromey.com>
+
+	* NEWS: Mention new Python breakpoint events.
+
+2016-08-02  Tom Tromey  <tom@tromey.com>
+
+	* MAINTAINERS (Core): Add self as Rust maintainer.
+
+2016-08-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* NEWS: Create a new section for the next release branch.
+	Rename the section of the current branch, now that it has
+	been cut.
+
+2016-08-01  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.12 branch created (41bfcd638a4e0e48b96ce4de2845372dea481322):
+	* version.in: Bump version to 7.12.50.DATE-git.
+
+2016-07-27  Alan Modra  <amodra@gmail.com>
+
+	* amd64-darwin-tdep.c: Don't include libbfd.h.
+	* i386-darwin-tdep.c: Likewise.
+	* rs6000-nat.c: Likewise.
+	* rs6000-tdep.c: Likewise.
+
+2016-07-26  Tom Tromey  <tom@tromey.com>
+
+	* symtab.c (register_symbol_computed_impl): Update.
+	PR python/20190:
+	* value.h (symbol_read_needs): Declare.
+	(symbol_read_needs_frame): Add comment.
+	* symtab.h (struct symbol_computed_ops) <read_variable>: Update
+	comment.
+	<get_symbol_read_needs>: Rename.  Change return type.
+	* findvar.c (symbol_read_needs): New function.
+	(symbol_read_needs_frame): Rewrite.
+	(default_read_var_value): Use symbol_read_needs.
+	* dwarf2loc.c (struct symbol_needs_baton): Rename.
+	<needs>: Renamed from needs_frame.  Changed type.
+	(needs_frame_read_addr_from_reg, symbol_needs_get_reg_value)
+	(symbol_needs_read_mem, symbol_needs_frame_base)
+	(symbol_needs_frame_cfa, symbol_needs_tls_address)
+	(symbol_needs_dwarf_call): Rename.
+	(needs_dwarf_reg_entry_value): Update.
+	(symbol_needs_ctx_funcs, dwarf2_loc_desc_get_symbol_read_needs):
+	Rename and update.
+	(locexpr_get_symbol_read_needs, loclist_symbol_needs): Likewise.
+	(dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Update.
+	* defs.h (enum symbol_needs_kind): New.
+
+2016-07-26  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-ptrace.c: Include "gregset.h".
+	(linux_ptrace_test_ret_to_nx): Use PTRACE_GETREGS instead of
+	PTRACE_PEEKUSER.
+
+2016-07-26  Pedro Alves  <palves@redhat.com>
+
+	* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Rename 'native'
+	parameter to 'ptrace'.
+	* nat/amd64-linux-siginfo.c (GDB_SI_SIZE): New define.
+	(nat_uptr_t): New an unsigned long.
+	(nat_clock_t): Remove attribute __aligned__.
+	(struct nat_timeval): Delete.
+	(nat_siginfo_t): Remove attribute __aligned__.
+	(ptrace_siginfo_t): Define.
+	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
+	(compat_x32_siginfo_from_siginfo)
+	(siginfo_from_compat_x32_siginfo): Make 'from' parameter const.
+	Convert through a ptrace_siginfo_t instead of a nat_siginfo_t.
+	Remove casts.
+	(amd64_linux_siginfo_fixup_common): Rename 'native' parameter to
+	'ptrace'.  Remove static assertions.
+	(top level): New static assertions.
+
+2016-07-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* top.h (make_delete_ui_cleanup): New declaration.
+	* top.c (delete_ui_cleanup): New function.
+	(make_delete_ui_cleanup): New function.
+	(new_ui_command): Create restore_ui cleanup earlier, create a
+	delete_ui cleanup and discard it on success.
+
+2016-07-25  Pedro Alves  <palves@redhat.com>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* nat/linux-procfs.c (parse_proc_status_state): Handle lowercase
+	't'.
+
+2016-07-25  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-procfs.c (enum proc_state): New enum.
+	(parse_proc_status_state): New function.
+	(linux_proc_pid_get_state): Replace output string buffer parameter
+	with an output proc_state parameter.  Use parse_proc_status_state.
+	(linux_proc_pid_is_gone): Adjust to use proc_state values.
+	(linux_proc_pid_has_state): Change type of 'state' parameter; now
+	an enum proc_state.  Adjust to linux_proc_pid_get_state interface
+	change.
+	(linux_proc_pid_is_stopped)
+	(linux_proc_pid_is_trace_stopped_nowarn)
+	(linux_proc_pid_is_zombie_maybe_warn): Adjust to
+	linux_proc_pid_get_state interface change.
+
+2016-07-25  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* MAINTAINERS (Write After Approval): Add Tim Wiederhake
+
+2016-07-25  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* NEWS: Resume btrace on reconnect.
+	* record-btrace.c: Added record-btrace.h include.
+	(record_btrace_open): Split into this and ...
+	(record_btrace_push_target): ... this.
+	(record_btrace_disconnect): New function.
+	(init_record_btrace_ops): Use record_btrace_disconnect.
+	* record-btrace.h: New file.
+	* remote.c: Added record-btrace.h include.
+	(remote_start_remote): Check recording status.
+	(remote_btrace_maybe_reopen): New function.
+
+2016-07-23  Gabriel Krisman Bertazi  <gabriel@krisman.be>
+
+	* xml-syscall.c (get_syscalls_by_group): New.
+	(get_syscall_group_names): New.
+	(struct syscall_group_desc): New structure to store group data.
+	(struct syscalls_info): Include field to store the group list.
+	(sysinfo_free_syscall_group_desc): New.
+	(free_syscalls_info): Free group list.
+	(syscall_group_create_syscall_group_desc): New.
+	(syscall_group_add_syscall): New.
+	(syscall_create_syscall_desc): Add syscall to its groups.
+	(syscall_start_syscall): Load group attribute.
+	(syscall_group_get_group_by_name): New.
+	(xml_list_syscalls_by_group): New.
+	(xml_list_of_groups): New.
+	* xml-syscall.h (get_syscalls_by_group): Export function
+	to retrieve a list of syscalls filtered by the group name.
+	(get_syscall_group_names): Export function to retrieve the list
+	of syscall groups.
+	* break-catch-syscall.c (catch_syscall_split_args): Verify if
+	argument is a syscall group and expand it to a list of syscalls
+	when creating catchpoints.
+	(catch_syscall_completer): Add word completion for system call
+	groups.
+	* configure.ac: Include dependency for xsltproc when building
+	in maintainer-mode.
+	* break-catch-syscall.c (_initialize_breakpoint): Update catch
+	syscall command documentation.
+	* NEWS: Include section about catching groups of syscalls.
+	* configure: Regenerate.
+	* data-directory/Makefile.in: Generate syscall xml when building
+	in maintainer mode.
+	* syscalls/gdb-syscalls.dtd: Include group attribute to the
+	syscall element.
+	* syscalls/apply-defaults.xsl: New.
+	* syscalls/linux-defaults.xml.in: New.
+	* syscalls/aarch64-linux.xml: Rename to aarch64-linux.xml.in.
+	* syscalls/amd64-linux.xml: Rename to amd64-linux.xml.in.
+	* syscalls/arm-linux.xml: Rename to arm-linux.xml.in.
+	* syscalls/bfin-linux.xml: Rename to bfin-linux.xml.in.
+	* syscalls/i386-linux.xml: Rename to i386-linux.xml.in.
+	* syscalls/mips-n32-linux.xml: Rename to mips-n32-linux.xml.in.
+	* syscalls/mips-n64-linux.xml: Rename to mips-n64-linux.xml.in.
+	* syscalls/mips-o32-linux.xml: Rename to mips-o32-linux.xml.in.
+	* syscalls/ppc-linux.xml: Rename to ppc-linux.xml.in.
+	* syscalls/ppc64-linux.xml: Rename to ppc64-linux.xml.in.
+	* syscalls/s390-linux.xml: Rename to s390-linux.xml.in.
+	* syscalls/s390x-linux.xml: Rename to s390x-linux.xml.in.
+	* syscalls/sparc-linux.xml: Rename to sparc-linux.xml.in.
+	* syscalls/sparc64-linux.xml: Rename to sparc64-linux.xml.in.
+	* syscalls/aarch64-linux.xml: Regenerate.
+	* syscalls/amd64-linux.xml: Regenerate.
+	* syscalls/arm-linux.xml: Regenerate.
+	* syscalls/i386-linux.xml: Regenerate.
+	* syscalls/mips-n32-linux.xml: Regenerate.
+	* syscalls/mips-n64-linux.xml: Regenerate.
+	* syscalls/mips-o32-linux.xml: Regenerate.
+	* syscalls/ppc-linux.xml: Regenerate.
+	* syscalls/ppc64-linux.xml: Regenerate.
+	* syscalls/s390-linux.xml: Regenerate.
+	* syscalls/s390x-linux.xml: Regenerate.
+	* syscalls/sparc-linux.xml: Regenerate.
+	* syscalls/sparc64-linux.xml: Regenerate.
+
+2016-07-23  Andrew Pinski  <apinski@cavium.com>
+
+	* nat/aarch64-linux-hw-point.c
+	(aarch64_linux_get_debug_reg_capacity): Handle
+	ARMv8.1 and ARMv8.2 debug versions.
+	* nat/aarch64-linux-hw-point.h
+	(AARCH64_DEBUG_ARCH_V8_1): New define.
+	(AARCH64_DEBUG_ARCH_V8_2): New define.
+
+2016-06-30  Ð ÑƒÑ�Ð»Ð°Ð½ Ð˜Ð¶Ð±ÑƒÐ»Ð°Ñ‚Ð¾Ð²  <lrn1986@gmail.com>
+
+	PR gdb/14529
+	* windows-nat.c (signal_event_command): New command 'signal-event'
+	for W32 JIT debug support.
+	* NEWS: Add an entry about the new 'signal-event' command.
+
+2016-07-22  Tom Tromey  <tom@tromey.com>
+
+	PR rust/20162:
+	* dwarf2read.c (scan_partial_symbols) <DW_TAG_structure_type>:
+	Call scan_partial_symbols for children when reading a Rust CU.
+	(dwarf2_physname): Ignore invalid DW_AT_linkage_name generated by
+	rustc.
+	(process_structure_scope) <DW_TAG_subprogram>: Call
+	read_func_scope for Rust.
+
+2016-07-22  Yao Qi  <yao.qi@linaro.org>
+
+	* ctf.c (ctf_traceframe_info): Call bt_ctf_get_uint64 rather than
+	bt_ctf_get_int64.
+
+2016-07-21  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (rust_tuple_struct_type_p): Return false for empty
+	structs.
+	* rust-exp.y (struct_expr_list): Allow empty elements.
+
+2016-07-21  Tom Tromey  <tom@tromey.com>
+
+	* configure: Rebuild.
+	* warning.m4 (AM_GDB_WARNINGS) <build_warnings>: Add
+	-Wunused-but-set-parameter, -Wunused-but-set-variable.
+
+2016-07-21  Pedro Alves  <palves@redhat.com>
+
+	* go32-nat.c (go32_create_inferior): Add cast.
+	* ser-go32.c (dos_noop): Delete.
+	(dos_flush_output, dos_setparity, dos_drain_output): New
+	functions.
+	(dos_write): Add cast.
+	(dos_ops): Use dos_flush_output, dos_setparity and
+	dos_drain_output.
+	* top.c (do_chdir_cleanup): Add cast.
+
+2016-07-21  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c (handle_exception): Remove "th".
+
+2016-07-21  Pedro Alves  <palves@redhat.com>
+
+	* varobj.c (varobj_value_get_print_value): Move "gdbarch" to block
+	scope that uses it.
+
+2016-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_enable_proc_events): Enable "PTRACE_VFORK"
+	events.
+	(fbsd_pending_vfork_done): Only define if "PTRACE_VFORK" is not
+	defined.
+	(fbsd_add_vfork_done): Likewise.
+	(fbsd_is_vfork_done_pending): Likewise.
+	(fbsd_next_vfork_done): Likewise.
+	(fbsd_resume): Only ignore pending vfork done events if
+	"PTRACE_VFORK" is not defined.
+	(fbsd_wait): Only look for pending vfork done events if
+	"PTRACE_VFORK" is not defined.
+	[PTRACE_VFORK]: Handle "PL_FLAG_VFORKED" and "PL_FLAG_VFORK_DONE"
+	events.
+	(fbsd_follow_fork): Only fake a vfork done event if "PTRACE_VFORK"
+	is not defined.
+
+2016-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_wait): Use "fbsd_enable_proc_events" on
+	new child processes.
+
+2016-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_enable_lwp_events): Remove function.
+	(fbsd_enable_proc_events): New function.
+	(fbsd_enable_follow_fork): Remove function.
+	(fbsd_post_startup_inferior): Use "fbsd_enable_proc_events".
+	(fbsd_post_attach): Likewise.
+
+2016-07-15  John Baldwin  <jhb@FreeBSD.org>
+
+	* common/signals.c (gdb_signal_from_host): Handle SIGLIBRT.
+	(do_gdb_signal_to_host): Likewise.
+	* infrun.c (_initialize_infrun): Pass GDB_SIGNAL_LIBRT through to
+	programs.
+	* proc-events.c (signal_table): Add entry for SIGLIBRT.
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Add missing
+	newline.
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* mips-tdep.c (micromips_scan_prologue): Remove "frame_addr".
+	(mips_o32_push_dummy_call): Remove "stack_used_p".
+	* aarch64-tdep.c (aarch64_record_data_proc_imm): Remove
+	"insn_bit28".
+	* rust-lang.c (rust_print_type): Remove "len".
+	* rust-exp.y (super_name): Remove "current_len".
+	* python/py-framefilter.c (py_print_type): Remove "type".
+	* mdebugread.c (parse_partial_symbols): Remove
+	"past_first_source_file".
+	<N_SO>: Remove "valu", "first_so_symnum", "prev_textlow_not_set".
+	* m2-valprint.c (m2_print_unbounded_array): Remove
+	"content_type".
+	(m2_val_print): Remove "i".
+	* linespec.c (unexpected_linespec_error): Remove "cleanup".
+	* f-valprint.c (f_val_print): Remove "i".
+	* elfread.c (elf_symtab_read): Remove "offset".
+	* dwarf2-frame.c (dwarf2_fetch_cfa_info): Remove "addr_size".
+	* jit.c (jit_dealloc_cache): Remove "i" and "frame_arch".
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* arch-utils.c (default_skip_permanent_breakpoint): Remove
+	"bp_insn".
+	* disasm.c (do_assembly_only): Remove "num_displayed".
+	* dwarf2read.c (read_abbrev_offset): Remove "length".
+	(dwarf_decode_macro_bytes) <DW_MACINFO_vendor_ext>: Remove
+	"constant".
+	* m32c-tdep.c (make_regs): Remove "r2hl", "r3hl", and "intbhl".
+	* microblaze-tdep.c (microblaze_frame_cache): Remove "func".
+	* tracefile.c (trace_save): Remove "status".
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* symfile.c (simple_overlay_update_1): Remove initialization
+	of "size", and commented-out code.
+	(simple_overlay_update): Likewise.
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-winsource.c (tui_show_source_line): Use getcurx.
+	* tui/tui-io.c (tui_puts): Use getcurx.
+	(tui_redisplay_readline): Likewise.
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* inflow.c (child_terminal_ours_1): Use ATTRIBUTE_UNUSED.
+
+2016-07-14  Tom Tromey  <tom@tromey.com>
+
+	* corefile.c (reopen_exec_file): Only examine st.st_mtime if stat
+	succeeded.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/15620, PR python/18620:
+	* python/py-evts.c (gdbpy_initialize_py_events): Call
+	add_new_registry for new events.
+	* python/py-events.h (events_object) <breakpoint_created,
+	breakpoint_deleted, breakpoint_modified>: New fields.
+	* python/py-breakpoint.c (gdbpy_breakpoint_created): Emit the
+	breakpoint changed event.
+	(gdbpy_breakpoint_deleted): Emit the breakpoint deleted event.
+	(gdbpy_breakpoint_modified): New function.
+	(gdbpy_initialize_breakpoints): Attach to the breakpoint modified
+	observer.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/17698:
+	* NEWS: Update.
+	* python/py-breakpoint.c (bppy_get_pending): New function.
+	(breakpoint_object_getset): Add entry for "pending".
+	* breakpoint.h (pending_breakpoint_p): Declare.
+	* breakpoint.c (pending_breakpoint_p): New function.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	* python/py-breakpoint.c (bppy_get_visibility)
+	(gdbpy_breakpoint_created): Use user_breakpoint_p.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR cli/18053:
+	* jit.c (jit_reader_load_command): Use tilde_expand.
+	(_initialize_jit): Fix help for jit-reader-unload.  Set completer
+	for new commands.
+
+2016-07-12  Tom Tromey  <tom@tromey.com>
+
+	PR python/19293:
+	* python/lib/gdb/command/unwinders.py (do_enable_unwinder): Call
+	gdb.invalidate_cached_frames.
+	* python/lib/gdb/unwinder.py (register_unwinder): Call
+	gdb.invalidate_cached_frames.
+	* python/python.c (gdbpy_invalidate_cached_frames): New function.
+	(python_GdbMethods): Add entry for invalidate_cached_frames.
+
+2016-07-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* cp-namespace.c (cp_lookup_bare_symbol): Initialize 
+	lang_this.symbol.
+
+2016-07-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* cp-namespace.c (cp_lookup_bare_symbol): Use language passed as
+	parameter to look for the symbol "this".
+
+
+2016-07-06  John Baldwin  <jhb@FreeBSD.org>
+
+	* h8300-tdep.c (h8300_print_register): Remove extraneous parentheses.
+
+2016-07-06  John Baldwin  <jhb@FreeBSD.org>
+
+	* ada-lang.c (ada_unpack_from_contents): Use unsigned constants with
+	left shifts.
+
+2016-07-06  John Baldwin  <jhb@FreeBSD.org>
+
+	* sh64-tdep.c (sh64_analyze_prologue): Set "uses_fp" when setting
+	the MEDIA_FP_REGNUM register.
+
+2016-07-06  John Baldwin  <jhb@FreeBSD.org>
+
+	* score-tdep.c (score7_malloc_and_get_memblock): Remove check for
+	negative size.
+
+2016-07-06  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_is_vfork_done_pending): Fix return type.
+
+2016-07-06  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_vfp_cprc_sub_candidate): Don't call
+	arm_vfp_cprc_sub_candidate for static field.
+
+2016-07-06  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_subscript): Allow subscripting pointers.
+
+2016-07-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* configure: Regenerate.
+	* configure.ac (HAVE_LIBBABELTRACE): Fix pos variable dereference.
+
+2016-07-01  Don Breazeal  <donb@codesourcery.com>
+
+	* remote.c (remote_get_memory_xfer_limit): New function.
+	* target-delegates.c: Regenerate.
+	* target.c (memory_xfer_partial): Call
+	target_ops.to_get_memory_xfer_limit.
+	* target.h (struct target_ops) <to_get_memory_xfer_limit>: New
+	member.
+
+2016-07-01  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (struct fbsd_fork_child_info): Rename to ...
+	(struct fbsd_fork_info): ... this.
+	(struct fbsd_fork_info) <child>: Rename to ...
+	(struct fbsd_fork_info) <ptid>: ... this.
+	(fbsd_pending_children): Update type.
+	(fbsd_remember_child): Update type and field name.
+	(fbsd_is_child_pending): Likewise.
+	(fbsd_pending_vfork_done): New variable.
+	(fbsd_is_vfork_done_pending): New function.
+	(fbsd_next_vfork_done): New function.
+	(fbsd_resume): Don't resume processes with a pending vfork done
+	event.
+	(fbsd_wait): Report pending vfork done events.
+	(fbsd_follow_fork): Delay and record a pending vfork done event
+	for a vfork parent when detaching the child.
+
+2016-07-01  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (super_resume): Move earlier next to "super_wait".
+	(resume_one_thread_cb): Move below fork following helper code.
+	(resume_all_threads_cb): Likewise.
+	(fbsd_resume): Likewise.
+
+2016-07-01  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_follow_fork): Only detach child if
+	"detach_fork" is true.
+
+2016-07-01  John Baldwin  <jhb@FreeBSD.org>
+
+	* x86bsd-nat.c: Include 'gdbthread.h'.
+	(x86bsd_dr_set): Set debug registers on all threads belonging to
+	the current inferior.
+
+2016-07-01  John Baldwin  <jhb@FreeBSD.org>
+
+	* Makefile.in [HFILES_NO_SRCDIR]: Replace 'amd64bsd-nat.h' with
+	'x86bsd-nat.h'.
+	* amd64bsd-nat.c: Include 'x86bsd-nat.h' instead of
+	'amd64bsd-nat.h'.
+	(amd64bsd_xsave_len): Rename and move to x86bsd-nat.c.
+	(amd64bsd_fetch_inferior_registers): Replace 'amd64bsd_xsave_len'
+	with 'x86bsd_xsave_len'.
+	(amd64bsd_store_inferior_registers): Likewise.
+	(amd64bsd_target): Inherit from x86bsd_target.
+	(amd64bsd_dr_get): Rename and move to x86bsd-nat.c.
+	(amd64bsd_dr_set): Likewise.
+	(amd64bsd_dr_set_control): Likewise.
+	(amd64bsd_dr_set_addr): Likewise.
+	(amd64bsd_dr_get_addr): Likewise.
+	(amd64bsd_dr_get_status): Likewise.
+	(amd64bsd_dr_get_control): Likewise.
+	* amd64fbsd-nat.c: Include 'x86bsd-nat.h' instead of
+	'amd64bsd-nat.h'.
+	(super_mourn_inferior): Move to x86bsd-nat.c.
+	(amd64fbsd_mourn_inferior): Rename and move to x86bsd-nat.c.
+	(amd64fbsd_read_description): Replace 'amd64bsd_xsave_len' with
+	'x86bsd_xsave_len'.
+	(_initialize_amd64fbsd_nat): Remove x86 watchpoint setup and
+	mourn_inferior' target op.
+	* config/i386/fbsd.mh (NATDEPFILES): Add x86bsd-nat.o.
+	* config/i386/fbsd64.mh: Likewise.
+	* config/i386/nbsd64.mh: Likewise.
+	* config/i386/nbsdelf.mh: Likewise.
+	* config/i386/obsd.mh: Likewise.
+	* config/i386/obsd64.mh: Likewise.
+	* i386bsd-nat.c: Include 'x86bsd-nat.h'.
+	(i386bsd_xsave_len): Rename and move to x86bsd-nat.c.
+	(i386bsd_fetch_inferior_registers): Replace 'i386bsd_xsave_len'
+	with 'x86bsd_xsave_len'.
+	(i386bsd_store_inferior_registers): Likewise.
+	(i386bsd_target): Inherit from x86bsd_target.
+	(i386bsd_dr_get): Rename and move to x86bsd-nat.c.
+	(i386bsd_dr_set): Likewise.
+	(i386bsd_dr_set_control): Likewise.
+	(i386bsd_dr_set_addr): Likewise.
+	(i386bsd_dr_get_addr): Likewise.
+	(i386bsd_dr_get_status): Likewise.
+	(i386bsd_dr_get_control): Likewise.
+	* i386bsd-nat.h (i386bsd_xsave_len): Remove.
+	(i386bsd_dr_set_control): Remove.
+	(i386bsd_dr_set_addr): Remove.
+	(i386bsd_dr_get_addr): Remove.
+	(i386bsd_dr_get_status): Remove.
+	(i386bsd_dr_get_control): Remove.
+	* i386fbsd-nat.c: Include 'x86bsd-nat.h'.
+	(i386fbsd_read_description): Replace 'i386bsd_xsave_len' with
+	'x86bsd_xsave_len'.
+	(_initialize_i386fbsd_nat): Remove x86 watchpoint setup and
+	mourn_inferior' target op.
+	* x86bsd-nat.c: New file.
+	* x86bsd-nat.h: New file.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+	    Tom Tromey  <tom@tromey.com>
+
+	* jit.c (jit_reader_load_command): Call reinit_frame_cache and
+	jit_inferior_created_hook.
+	(jit_reader_unload_command): Call reinit_frame_cache and
+	jit_inferior_exit_hook.
+	* jit.c (struct jit_unwind_private) <registers>: Delete field.
+	<regcache>: New field.
+	(jit_unwind_reg_set_impl): Set the register's value in the
+	regcache.  Free the passed-in gdb_reg_value.
+	(jit_dealloc_cache): Adjust to free the regcache.
+	(jit_frame_sniffer): Allocate a regcache instead of an array of
+	gdb_reg_value pointers.
+	(jit_frame_this_id): Adjust.
+	(jit_frame_prev_register): Read raw registers off of the regcache
+	instead of from the gdb_reg_value pointer array.  Use
+	gdbarch_pseudo_register_read_value to read pseudo registers.
+	* regcache.c (regcache_raw_set_cached_value): New function,
+	factored out from ...
+	(regcache_raw_write): ... here.
+	* regcache.h (regcache_raw_set_cached_value): Declare.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+	    Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* inf-ptrace.c (inf_ptrace_detach_success): New function, factored
+	out from ...
+	(inf_ptrace_detach): ... here.
+	* inf-ptrace.h (inf_ptrace_detach_success): New declaration.
+	* linux-nat.c (get_pending_status): Rename to ...
+	(get_detach_signal): ... this, and return a host signal instead of
+	filling in a wait status.
+	(detach_one_lwp): New function, factored out from detach_callback
+	and adjusted to handle detaching from a zombie thread.
+	(detach_callback): Skip the leader thread.
+	(linux_nat_detach): No longer defer to inf_ptrace_detach to detach
+	the leader thread, nor build a signal string to pass down.
+	Instead, use target_announce_detach, detach_one_lwp and
+	inf_ptrace_detach_success.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (breakpoint_init_inferior): Discard watchpoint
+	locations.
+	* infcmd.c (detach_command): Call breakpoint_init_inferior.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+
+	* darwin-nat.c (darwin_detach): Use target_announce_detach.
+	* inf-ptrace.c (inf_ptrace_detach): Likewise.
+	* nto-procfs.c (procfs_detach): Likewise.
+	* remote.c (remote_detach_1): Likewise.
+	* target.c (target_announce_detach): New function.
+	* target.h (target_announce_detach): New declaration.
+
+2016-06-29  Tom Tromey  <tom@tromey.com>
+
+	PR python/20129:
+	* python/lib/gdb/command/frame_filters.py (_do_enable_frame_filter)
+	(SetFrameFilterPriority._set_filter_priority): Use "frame_filter",
+	not "name".
+
+2016-06-29  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/17210:
+	* target.c (free_memory_read_result_vector): Take a pointer to the
+	VEC as an argument.
+	(read_memory_robust): Install a cleanup for "result".
+	* mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.
+
+2016-06-29  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_get_disr_info): Initialize saveptr to NULL.
+
+2016-06-29  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_get_disr_info): Use strtok_r instead of strsep.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_displaced_step_b): Use int64_t for
+	variable new_offset.
+
+2016-06-27  Manish Goregaokar  <manish@mozilla.com>
+
+	* rust-lang.c (rust_print_type, rust_decorations): Print unit
+	types as "()".
+	(rust_print_type): Omit return type for functions returning unit.
+
+2016-06-25  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* python/py-breakpoint.c (bppy_init): Clear bppy_pending_object
+	when there is an error during the breakpoint creation.
+
+2016-06-25  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (rust_get_disr_info, rust_print_type): Fix
+	formatting.
+
+2016-06-25  Manish Goregaokar  <manish@mozilla.com>
+
+	PR gdb/20239
+	* rust-lang.c (rust_get_disr_info): Correctly interpret
+	NonZero-optimized enums of arbitrary depth.
+	(rust_print_type): Correctly print NonZero-optimized
+	enums.
+
+2016-06-24  David Taylor  <dtaylor@emc.com>
+
+	PR gdb/17520 Structure offset wrong when 1/4 GB or greater.
+	* c-lang.h: Change all parameters, variables, and struct or union
+	members used as struct or union fie3ld offsets from int to
+	LONGEST.
+	* c-valprint.c: Likewise.
+	* cp-abi.c: Likewise.
+	* cp-abi.h: Likewise.
+	* cp-valprint.c: Likewise.
+	* d-valprint.c: Likewise.
+	* dwarf2loc.c: Likewise.
+	* eval.c: Likewise.
+	* extension-priv.h: Likewise.
+	* extension.c: Likewise.
+	* extension.h: Likewise.
+	* findvar.c: Likewise.
+	* gdbtypes.h: Likewise.
+	* gnu-v2-abi.c: Likewise.
+	* gnu-v3-abi.c: Likewise.
+	* go-valprint.c: Likewise.
+	* guile/guile-internal.h: Likewise.
+	* guile/scm-pretty-print.c: Likewise.
+	* jv-valprint.c Likewise.
+	* opencl-lang.c: Likewise.
+	* p-lang.h: Likewise.
+	* python/py-prettyprint.c: Likewise.
+	* python/python-internal.h: Likewise.
+	* spu-tdep.c: Likewise.
+	* typeprint.c: Likewise.
+	* valarith.c: Likewise.
+	* valops.c: Likewise.
+	* valprint.c: Likewise.
+	* valprint.h: Likewise.
+	* value.c: Likewise.
+	* value.h: Likewise.
+	* p-valprint.c: Likewise.
+	* c-typeprint.c (c_type_print_base): When printing offset, use
+	plongest, not %d.
+	* gdbtypes.c (recursive_dump_type): Ditto.
+
+2016-06-24  David Taylor  <david.taylor@emc.com>
+
+	* MAINTAINERS (Write After Approval): Add David Taylor.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* configure.ac: Check for support for system call LWP fields on
+	FreeBSD.
+	* config.in, configure: Rebuild.
+	* data-directory/Makefile.in (SYSCALLS_FILES): Add freebsd.xml.
+	* fbsd-nat.c (fbsd_wait) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
+	Report system call events.
+	[HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]
+	(fbsd_set_syscall_catchpoint): New function.
+	(fbsd_nat_add_target) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
+	Set "to_set_syscall_catchpoint" to "fbsd_set_syscall_catchpoint".
+	* fbsd-tdep.c: Include xml-syscall.h
+	(fbsd_get_syscall_number): New function.
+	(fbsd_init_abi): Set XML system call file name.
+	Add "get_syscall_number" gdbarch method.
+	* syscalls/freebsd.xml: New file.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c: Include "auxv.h".
+	(fbsd_print_auxv_entry): New function.
+	(fbsd_init_abi): Install gdbarch "print_auxv_entry" method.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* auxv.c (fprint_auxv_entry): New function.
+	(default_print_auxv_entry): New function.
+	(fprint_target_auxv): Use gdbarch_print_auxv_entry.
+	* auxv.h (enum auxv_format): New enum.
+	(fprint_auxv_entry): Declare.
+	(default_print_auxv_entry): Declare.
+	* gdbarch.sh (print_auxv_entry): New.
+	* gdbarch.c, gdbarch.h: Re-generated.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c [KERN_PROC_AUXV] New variable super_xfer_partial.
+	(fbsd_xfer_partial): New function.
+	(fbsd_nat_add_target) [KERN_PROC_AUXV] Set "to_xfer_partial" to
+	"fbsd_xfer_partial".
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	* symtab.c (symbol_find_demangled_name): Loop over languages and
+	use language_sniff_from_mangled_name.
+	* rust-lang.c (rust_sniff_from_mangled_name): New function.
+	(rust_language_defn): Update.
+	* p-lang.c (pascal_language_defn): Update.
+	* opencl-lang.c (opencl_language_defn): Update.
+	* objc-lang.c (objc_sniff_from_mangled_name): New function.
+	(objc_language_defn): Update.
+	* m2-lang.c (m2_language_defn): Update.
+	* language.h (struct language_defn) <la_sniff_from_mangled_name>: New
+	field.
+	(language_sniff_from_mangled_name): Declare.
+	* language.c (language_sniff_from_mangled_name): New function.
+	(unknown_language_defn, auto_language_defn, local_language_defn):
+	Update.
+	* jv-lang.c (java_sniff_from_mangled_name): New function.
+	(java_language_defn): Use it.
+	* go-lang.c (go_sniff_from_mangled_name): New function.
+	(go_language_defn): Use it.
+	* f-lang.c (f_language_defn): Update.
+	* defs.h (enum language): Reorder.
+	* d-lang.c (d_sniff_from_mangled_name): New function.
+	(d_language_defn): Use it.
+	* cp-support.h (gdb_sniff_from_mangled_name): Declare.
+	* cp-support.c (gdb_sniff_from_mangled_name): New function.
+	* c-lang.c (c_language_defn, cplus_language_defn)
+	(asm_language_defn, minimal_language_defn): Update.
+	* ada-lang.c (ada_sniff_from_mangled_name): New function.
+	(ada_language_defn): Use it.
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	* ada-lang.c (ada_extensions): New array.
+	(ada_language_defn): Use it.
+	* c-lang.c (c_extensions): New array.
+	(c_language_defn): Use it.
+	(cplus_extensions): New array.
+	(cplus_language_defn): Use it.
+	(asm_extensions): New array.
+	(asm_language_defn): Use it.
+	(minimal_language_defn): Update.
+	* d-lang.c (d_extensions): New array.
+	(d_language_defn): Use it.
+	* f-lang.c (f_extensions): New array.
+	(f_language_defn): Use it.
+	* go-lang.c (go_language_defn): Update.
+	* jv-lang.c (java_extensions): New array.
+	(java_language_defn): Use it.
+	* language.c (add_language): Call add_filename_language.
+	(unknown_language_defn, auto_language_defn, local_language_defn):
+	Update.
+	* language.h (struct language_defn) <la_filename_extensions>: New
+	field.
+	* m2-lang.c (m2_language_defn): Update.
+	* objc-lang.c (objc_extensions): New array.
+	(objc_language_defn): Use it.
+	* opencl-lang.c (opencl_language_defn): Update.
+	* p-lang.c (p_extensions): New array.
+	(pascal_language_defn): Use it.
+	* rust-lang.c (rust_extensions): New array.
+	(rust_language_defn): Use it.
+	* symfile.c (add_filename_language): No longer static.  Make "ext"
+	const.
+	(init_filename_language_table): Remove.
+	(_initialize_symfile): Update.
+	* symfile.h (add_filename_language): Declare.
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	* symfile.c (filename_language_table): Now a VEC.
+	(fl_table_size, fl_table_next): Remove.
+	(add_filename_language): Use VEC_safe_push.
+	(set_ext_lang_command, info_ext_lang_command)
+	(deduce_language_from_filename): Use VEC_iterate.
+	(init_filename_language_table): Use VEC_empty.
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	* python/python.c (gdbpy_parameter): Now static.
+	* python/python-internal.h (gdbpy_parameter): Don't declare.
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/16483:
+	* python/lib/gdb/command/frame_filters.py
+	(InfoFrameFilter.list_frame_filters): Rename to print_list.  Print
+	nothing if no filters found.  Return value indicating whether
+	filters were printed.
+	(InfoFrameFilter.print_list): Remove.
+	(InfoFrameFilter.invoke): Print message if no frame filters
+	found.
+
+2016-06-21  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* f-valprint.c (f_val_print): Add field names for printing
+	derived types fields.
+
+2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_iterate_over_regset_sections): Fix typo
+	in name of last-break regset.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* fork-child.c (fork_inferior): Switch the child to the main UI
+	right after vfork.  Save/restore the current UI in the parent.
+	Flush outputs of the main UI instead of the current UI.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
+	to all UIs.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention support for running interpreters on separate
+	UIs and the new new-ui command.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* interps.c (set_top_level_interpreter): New function, factored
+	out from captured_main.
+	(interpreter_completer): Make extern.
+	* interps.h (set_top_level_interpreter, interpreter_completer):
+	New declarations.
+	(captured_main): Use set_top_level_interpreter.
+	* top.c [!O_NOCTTY] (O_NOCTTY): Define as 0.
+	(open_terminal_stream, new_ui_command): New functions.
+	(init_main): Install the "new-ui" command.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-script.c (read_next_line): Adjust to per-UI stdin.
+	(read_command_lines): Use input_interactive_p instead of
+	input_from_terminal_p.
+	* defs.h (struct ui): Forward declare.
+	(input_from_terminal_p): Rename to ...
+	(input_interactive_p): ... this.
+	* event-top.c (stdin_event_handler): Pass 0 as from_tty argument
+	to quit_command.
+	(command_handler): Adjust to per-UI stdin.
+	(handle_line_of_input): Adjust to per-UI stdin and use
+	input_interactive_p instead of ISATTY and input_from_terminal_p.
+	(gdb_readline_no_editing_callback): Adjust to per-UI stdin.
+	(command_line_handler): Always pass true as "from_tty" parameter
+	of handle_line_of_input and execute_command.
+	(async_sigterm_handler): Pass 0 as from_tty argument to
+	quit_command.
+	* inflow.c (interactive_mode, show_interactive_mode): Moved to ...
+	(gdb_has_a_terminal): Don't check interactive_mode here.
+	(_initialize_inflow): Don't install "set interactive-mode" here.
+	* main.c (captured_command_loop): Adjust to per-UI stdin.
+	* mi/mi-interp.c (mi_execute_command_wrapper): Adjust to per-UI
+	stdin.
+	* top.c (new_ui): Save the stdin stream and whether it's a tty.
+	(dont_repeat): Adjust to per-UI stdin.
+	(command_line_input): Adjust to per-UI stdin and to use
+	input_interactive_p.
+	(quit_force): Write history if any UI supports interactive input.
+	(interactive_mode, show_interactive_mode): Move here, from
+	inflow.c.
+	(input_from_terminal_p): Rename to ...
+	(input_interactive_p): ... this, and check the "interactive_mode"
+	global instead of calling gdb_has_a_terminal.
+	(_initialize_top): Install "set interactive-mode" here.
+	* top.h (struct ui) <stdin_stream, input_interactive_p>: New
+	fields.
+	* utils.c (quit): Pass 0 as from_tty argument to quit_force.
+	(defaulted_query): Adjust to per-UI stdin and to use
+	input_interactive_p.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (stdin_event_handler): Don't quit gdb if it was a
+	secondary UI's input stream that closed.  Instead, just delete the
+	UI.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (main_ui_): Delete.
+	(main_ui, current_ui, ui_list): No longer initialize here.
+	* main.c (captured_main): UI initialization code factored out to
+	new new_ui function.
+	(gdb_main): Wrap captured_main with TRY/CATCH instead of
+	catch_errors.
+	* top.c (highest_ui_num): New global.
+	(new_ui): New function.
+	* top.h (struct ui) <num>: New field.
+	(new_ui): New declaration.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (cli_on_normal_stop): Bail out early if there's
+	nothing to print.  Use should_print_stop_to_console.
+	* tui/tui-interp.c (tui_on_normal_stop): Likewise.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (new_until_break_fsm): Add 'cmd_interp' parameter.
+	(until_break_fsm_should_stop, until_break_fsm_clean_up): Add
+	thread parameter.
+	(until_break_command): Pass command interpreter to thread fsm
+	ctor.
+	* cli/cli-interp.c (should_print_stop_to_console): Adjust.
+	* gdbthread.h (struct thread_control_state) <command_interp>:
+	Delete field.
+	* infcall.c (new_call_thread_fsm): Add 'cmd_interp' parameter.
+	Pass it down.
+	(call_thread_fsm_should_stop): Add thread parameter.
+	(call_function_by_hand_dummy): Pass command interpreter to thread
+	fsm ctor.  Pass thread pointer to fsm clean up method.
+	* infcmd.c: Include interps.h.
+	(struct step_command_fsm) <thread>: Delete field.
+	(new_step_command_fsm): Add 'cmd_interp' parameter.  Pass it down.
+	(step_command_fsm_prepare): Remove references to fsm's thread
+	field.
+	(step_1): Pass command interpreter to thread
+	fsm ctor.  Pass thread pointer to fsm clean up method.
+	(step_command_fsm_should_stop, step_command_fsm_clean_up): Add
+	thread parameter and use it.
+	(new_until_next_fsm): Add 'cmd_interp' parameter.  Pass it down.
+	(until_next_fsm_should_stop, until_next_fsm_clean_up): Add thread
+	parameter and use it.
+	(until_next_command): Pass command interpreter to thread fsm ctor.
+	(struct finish_command_fsm) <thread>: Delete field.
+	(finish_command_fsm_ops): Add NULL slot for should_notify_stop.
+	(new_finish_command_fsm): Add 'cmd_interp' parameter and pass it
+	down.  Remove thread parameter and adjust.
+	(finish_command_fsm_should_stop, finish_command_fsm_clean_up): Add
+	thread parameter and use it.
+	(finish_command): Pass command interpreter to thread fsm ctor.
+	Don't pass thread.
+	* infrun.c (follow_fork): Move thread fsm to child fork instead of
+	command interpreter, only.
+	(clear_proceed_status_thread): Remove reference to command_interp.
+	(proceed): Don't record the thread's command interpreter.
+	(clean_up_just_stopped_threads_fsms): Pass thread to fsm clean_up
+	method.
+	(fetch_inferior_event): Pass thread to fsm should_stop method.
+	* thread-fsm.c (thread_fsm_ctor): Add 'cmd_interp' parameter.
+	Store it.
+	(thread_fsm_clean_up, thread_fsm_should_stop): Add thread
+	parameter and pass it down.
+	* thread-fsm.h (struct thread_fsm) <command_interp>: New field.
+	(struct thread_fsm_ops) <clean_up, should_stop>: Add thread
+	parameter.
+	(thread_fsm_ctor): Add 'cmd_interp' parameter.
+	(thread_fsm_clean_up, thread_fsm_should_stop): Add thread
+	parameter.
+	* thread.c (thread_cancel_execution_command): Pass thread to
+	thread fsm clean_up method.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c: Include gdbthread.h and thread-fsm.h.
+	(should_print_stop_to_console): New function, factored out from
+	mi_on_normal_stop_1.
+	* cli/cli-interp.h (should_print_stop_to_console): Declare.
+	* mi/mi-interp.c (mi_on_normal_stop_1): Use
+	should_print_stop_to_console.  Pass it the current UI's console
+	interpreter.
+	* mi/mi-main.c (captured_mi_execute_command): Use the
+	INTERP_CONSOLE symbol rather than explicit "console".
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* infcmd.c (prepare_execution_command): Use
+	all_uis_on_sync_execution_starting.
+	* infrun.c (all_uis_on_sync_execution_starting): New function.
+	* infrun.h (all_uis_on_sync_execution_starting): Declare.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* annotate.c: Include top.h.
+	(async_background_execution_p): Delete.
+	(print_value_flags): Check the UI's prompt state rather then
+	async_background_execution_p.
+	* event-loop.c (start_event_loop): Set the prompt state to
+	PROMPT_NEEDED.
+	* event-top.c (display_gdb_prompt, async_enable_stdin)
+	(async_disable_stdin): Check the current UI's prompt state instead
+	of the sync_execution global.
+	(command_line_handler): Set the prompt state to PROMPT_NEEDED
+	before running a command, and display the prompt if still needed
+	afterwards.
+	* infcall.c (struct call_thread_fsm) <waiting_ui>: New field.
+	(new_call_thread_fsm): New parameter 'waiting_ui'.  Store it.
+	(call_thread_fsm_should_stop): Set the prompt state to
+	PROMPT_NEEDED.
+	(run_inferior_call): Adjust to temporarily set the prompt state to
+	PROMPT_BLOCKED instead of using the sync_execution global.
+	(call_function_by_hand_dummy): Pass the current UI to
+	new_call_thread_fsm.
+	* infcmd.c: Include top.h.
+	(continue_1): Check the current UI's prompt state instead of the
+	sync_execution global.
+	(continue_command): Validate global execution state before calling
+	prepare_execution_command.
+	(step_1): Call all_uis_check_sync_execution_done.
+	(attach_post_wait): Don't call async_enable_stdin here.  Remove
+	reference to sync_execution.
+	* infrun.c (sync_execution): Delete global.
+	(follow_fork_inferior)
+	(reinstall_readline_callback_handler_cleanup): Check the current
+	UI's prompt state instead of the sync_execution global.
+	(check_curr_ui_sync_execution_done)
+	(all_uis_check_sync_execution_done): New functions.
+	(fetch_inferior_event): Call all_uis_check_sync_execution_done
+	instead of trying to determine whether the global sync execution
+	changed.
+	(handle_no_resumed): Check the prompt state of all UIs.
+	(normal_stop): Emit the no unwait-for even to all PROMPT_BLOCKED
+	UIs.  Emit the "Switching to" notification to all UIs.  Enable
+	stdin in all UIs.
+	* infrun.h (sync_execution): Delete.
+	(all_uis_check_sync_execution_done): Declare.
+	* main.c (captured_command_loop): Don't call
+	interp_pre_command_loop if the prompt is blocked.
+	(catch_command_errors, catch_command_errors_const): Adjust.
+	(captured_main): Set the initial prompt state to PROMPT_NEEDED.
+	* mi/mi-interp.c (display_mi_prompt): Set the prompt state to
+	PROMPTED.
+	(mi_interpreter_resume): Don't clear sync_execution.  Remove hack
+	comment.
+	(mi_execute_command_input_handler): Set the prompt state to
+	PROMPT_NEEDED before executing the command, and only display the
+	prompt if the prompt state is PROMPT_NEEDED afterwards.
+	(mi_on_resume_1): Adjust to check the prompt state.
+	* target.c (target_terminal_inferior): Adjust to check the prompt
+	state.
+	* top.c (wait_sync_command_done, maybe_wait_sync_command_done)
+	(execute_command): Check the current UI's prompt state instead of
+	sync_execution.
+	* top.h (enum prompt_state): New.
+	(struct ui) <prompt_state>: New field.
+	(ALL_UIS): New macro.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* top.c (gdb_secondary_prompt_depth): Delete.
+	(gdb_in_secondary_prompt_p): Add ui parameter.  Use it.
+	(gdb_readline_wrapper_cleanup, gdb_readline_wrapper): Adjust to
+	per-UI gdb_secondary_prompt_depth.
+	* top.h (struct ui) <secondary_prompt_depth>: New field.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (cli_interpreter_pre_command_loop): New
+	function.
+	(cli_interp_procs): Install it instead of cli_command_loop.
+	* cli/cli-interp.h (cli_interpreter_pre_command_loop): Declare.
+	* event-top.c (cli_command_loop): Delete.
+	* interps.c (interp_new): Remove reference to command_loop_proc.
+	(current_interp_command_loop): Delete.
+	(interp_pre_command_loop): New function.
+	(interp_command_loop_ftype): Delete.
+	* interps.h (interp_pre_command_loop_ftype): New typedef.
+	(struct interp_procs) <command_loop_proc>: Delele field.
+	<pre_command_loop_proc>: New field.
+	(current_interp_command_loop): Delete declaration.
+	(interp_pre_command_loop): New declaration.
+	* main.c (captured_command_loop): Call interp_pre_command_loop
+	instead of current_interp_command_loop and start an event loop.
+	* mi/mi-interp.c (mi_command_loop): Delete.
+	(mi_interpreter_pre_command_loop): New.
+	(mi_interp_procs): Update.
+	* tui/tui-interp.c (tui_interp_procs): Install
+	cli_interpreter_pre_command_loop instead of cli_command_loop.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* interps.c (current_interpreter): New function.
+	* interps.h (current_interpreter): New declaration.
+	* mi/mi-cmds.h (raw_stdout): Delete declaration.
+	* mi/mi-common.h (struct mi_interp) <raw_stdout,
+	saved_raw_stdout>: New field.
+	* mi/mi-interp.c (display_mi_prompt): New parameter 'mi'.  Adjust
+	to per-UI raw_stdout.
+	(mi_interpreter_init): Adjust to per-UI raw_stdout.
+	(mi_on_sync_execution_done, mi_execute_command_input_handler)
+	(mi_command_loop): Pass MI instance to display_mi_prompt.
+	(mi_on_normal_stop_1, mi_output_running_pid, mi_on_resume_1)
+	(mi_on_resume): Adjust to per-UI raw_stdout.
+	(saved_raw_stdout): Delete.
+	(mi_set_logging): Adjust to per-UI raw_stdout and
+	saved_raw_stdout.
+	* mi/mi-main.c (raw_stdout): Delete.
+	(mi_cmd_gdb_exit, captured_mi_execute_command)
+	(mi_print_exception, mi_load_progress): Adjust to per-UI
+	raw_stdout.
+	(print_diff_now, mi_print_timing_maybe): New ui_file parameter.
+	Pass it along.
+	(print_diff): New ui_file parameter.  Send output there instead of
+	raw_stdout.
+	* mi/mi-main.h (struct ui_file): Forward declare.
+	(mi_print_timing_maybe): Add ui_file parameter.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-interp.c (display_mi_prompt): New function.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* target.c (target_terminal_inferior): Bail out after
+	unregistering input_fd if not on the main UI.
+	(target_terminal_ours): Bail out after registering input_fd if not
+	on the main UI.
+	(target_terminal_ours_for_output): Bail out if not on the main UI.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (restore_ui_cleanup): Make extern.
+	* infrun.c (fetch_inferior_event): Always switch to the main UI.
+	* top.h (restore_ui_cleanup): Declare.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	PR mi/20034
+	* cli/cli-interp.c: Include cli-interp.h and event-top.h.
+	(cli_interpreter_resume): Pass 1 to gdb_setup_readline.  Set the
+	UI's input_handler here.
+	(cli_interpreter_supports_command_editing): New function.
+	(cli_interp_procs): Install it.
+	* cli/cli-interp.h: New file.
+	* event-top.c (async_command_editing_p): Rename to ...
+	(set_editing_cmd_var): ... this.
+	(change_line_handler): Add parameter 'editing', and use it.  Bail
+	early if the interpreter doesn't support editing.  Don't touch
+	readline state if editing is off.
+	(gdb_rl_callback_handler_remove, gdb_rl_callback_handler_install)
+	(gdb_rl_callback_handler_reinstall): Assert the current UI is the
+	main UI.
+	(display_gdb_prompt): Don't call gdb_rl_callback_handler_remove if
+	not using readline.  Check whether the current UI is using command
+	editing instead of checking the async_command_editing_p global.
+	(set_async_editing_command): Delete.
+	(gdb_setup_readline): Add 'editing' parameter.  Only allow editing
+	on the main UI.  Don't touch readline state if editing is off.
+	(gdb_disable_readline): Don't touch readline state if editing is
+	off.
+	* event-top.h (gdb_setup_readline): Add 'int' parameter.
+	(set_async_editing_command): Delete declaration.
+	(change_line_handler, command_line_handler): Declare.
+	(async_command_editing_p): Rename to ...
+	(set_editing_cmd_var): ... this.
+	* infrun.c (reinstall_readline_callback_handler_cleanup): Check
+	whether the current UI has editing enabled rather than checking
+	the async_command_editing_p global.
+	* interps.c (interp_supports_command_editing): New function.
+	* interps.h (interp_supports_command_editing_ftype): New typedef.
+	(struct interp_procs) <supports_command_editing_proc>: New field.
+	(interp_supports_command_editing): Declare.
+	* mi/mi-interp.c (mi_interpreter_resume): Pass 0 to
+	gdb_setup_readline.  Don't clear the async_command_editing_p
+	global.  Update comments.
+	* top.c (gdb_readline_wrapper_line, gdb_readline_wrapper): Check
+	whether the current UI has editing enabled rather than checking
+	the async_command_editing_p global.  Don't touch readline state if
+	editing is off.
+	(undo_terminal_modifications_before_exit): Switch to the main UI.
+	Unconditionally call gdb_disable_readline.
+	(set_editing): New function.
+	(show_async_command_editing_p): Rename to ...
+	(show_editing): ... this.  Show the state of the current UI.
+	(_initialize_top): Adjust.
+	* top.h (struct ui) <command_editing>: New field.
+	* tui/tui-interp.c: Include cli/cli-interp.h.
+	(tui_resume): Pass 1 to gdb_setup_readline.  Set the UI's
+	input_handler.
+	(tui_interp_procs): Install
+	cli_interpreter_supports_command_editing.
+	* tui/tui-io.c (tui_getc): Check whether the current UI has
+	editing enabled rather than checking the async_command_editing_p
+	global.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* top.c: Call gen_ret_current_ui_field_ptr for current_uiout.
+	* top.h (struct ui) <m_current_uiout>: New field.
+	* ui-out.c (current_uiout): Delete.
+	* ui-out.h (current_uiout): Delete.
+	(current_ui_current_uiout_ptr): New declaration.
+	(current_uiout): Reimplement as wrapper around
+	current_ui_current_uiout_ptr.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* ui-out.c (default_ui_out_impl): Delete.
+	(def_uiout): Delete.
+	(current_uiout): Set to NULL.
+	(default_table_begin, default_table_body, default_table_end)
+	(default_table_header, default_begin, default_end)
+	(default_field_int, default_field_skip, default_field_string)
+	(default_field_fmt, default_spaces, default_text, default_message)
+	(default_wrap_hint, default_flush, default_data_destroy): Delete.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (gdb_setup_readline): Pass the UI's outstream and
+	errstream to stdout_fileopen and stderr_fileopen.
+	* exceptions.c: Include top.h.
+	(print_flush): Open the current UI's outstream file descriptor,
+	instead of hardcoding file descriptor 1.
+	* main.c (captured_main): Save the main UI's out and error
+	streams.  Adjust stderr_fileopen call.
+	* top.h (struct ui) <outstream, errstream>: New fields.
+	* ui-file.c (stderr_fileopen): Add stream parameter.  Use it
+	instead of stderr.
+	* ui-file.h (stderr_fileopen): Add stream parameter and update
+	comment.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (input_fd): Delete.
+	(stdin_event_handler): Switch to the UI whose input descriptor got
+	the event.  Adjust to per-UI input_fd.
+	(gdb_setup_readline): Don't set the input_fd global.  Adjust to
+	per-UI input_fd.
+	(gdb_disable_readline): Adjust to per-UI input_fd.
+	* event-top.h (input_fd): Delete declaration.
+	* linux-nat.c (linux_nat_terminal_inferior): Don't remove input_fd
+	from the event-loop here.
+	(linux_nat_terminal_ours): Don't register input_fd in the
+	event-loop here.
+	* main.c (captured_main): Adjust to per-UI input_fd.
+	* remote.c (remote_terminal_inferior): Don't remove input_fd from
+	the event-loop here.
+	(remote_terminal_ours): Don't register input_fd in the event-loop
+	here.
+	* target.c: Include top.h and event-top.h.
+	(target_terminal_inferior): Remove input_fd from the event-loop
+	here.
+	(target_terminal_ours): Register input_fd in the event-loop.
+	* top.h (struct ui) <input_fd>: New field.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-script.c (execute_user_command, read_next_line)
+	(read_next_line): Adjust to per-UI instream.
+	* event-top.c (stdin_event_handler, command_handler)
+	(handle_line_of_input, command_line_handler)
+	(gdb_readline_no_editing_callback, async_sigterm_handler)
+	(gdb_setup_readline): Likewise.
+	* inflow.c: Include top.h.
+	(gdb_has_a_terminal, child_terminal_init_with_pgrp)
+	(gdb_save_tty_state, child_terminal_inferior)
+	(child_terminal_ours_1, copy_terminal_info): Use the main UI.
+	(initialize_stdin_serial): Adjust to per-UI instream.
+	* main.c (captured_command_loop, captured_main): Adjust to per-UI
+	instream.
+	* mi/mi-interp.c (mi_execute_command_wrapper): Likewise.
+	* python/python.c (python_interactive_command): Likewise.
+	* terminal.h (struct ui): Forward declare.
+	(initialize_stdin_serial): Add struct ui parameter.
+	* top.c (instream): Delete.
+	(do_restore_instream_cleanup, read_command_file, dont_repeat)
+	(gdb_readline_no_editing, command_line_input)
+	(input_from_terminal_p, gdb_init): Adjust to per-UI instream.
+	* top.h (struct ui) <instream>: New field.
+	(instream): Delete declaration.
+	(quit): Adjust to per-UI instream.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c: Include top.h.
+	(invoke_async_signal_handlers): Switch to the main UI.
+	* event-top.c (main_ui_): Update comment.
+	(main_ui): New global.
+	* top.h (main_ui): Declare.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (cli_interp): Delete.
+	(as_cli_interp): New function.
+	(cli_on_normal_stop, cli_on_signal_received)
+	(cli_on_end_stepping_range, cli_on_signal_exited, cli_on_exited)
+	(cli_on_no_history): Send output to all CLI UIs.
+	(cli_on_sync_execution_done, cli_on_command_error): Skip output if
+	the top level interpreter is not a CLI.
+	(cli_interpreter_init): Don't set cli_interp or install observers
+	here.
+	(_initialize_cli_interp): Install observers here.
+	* event-top.c (main_ui_, ui_list): New globals.
+	(current_ui): Point to main_ui_.
+	(restore_ui_cleanup, switch_thru_all_uis_init)
+	(switch_thru_all_uis_cond, switch_thru_all_uis_next): New
+	functions.
+	* mi/mi-interp.c (as_mi_interp): New function.
+	(mi_interpreter_init): Don't install observers here.
+	(mi_on_sync_execution_done): Skip output if the top level
+	interpreter is not a MI.
+	(mi_new_thread, mi_thread_exit, mi_record_changed)
+	(mi_inferior_added, mi_inferior_appeared, mi_inferior_exit)
+	(mi_inferior_removed): Send output to all MI UIs.
+	(find_mi_interpreter, mi_interp_data): Delete.
+	(find_mi_interp): New function.
+	(mi_on_signal_received, mi_on_end_stepping_range)
+	(mi_on_signal_exited, mi_on_exited, mi_on_no_history): Send output
+	to all MI UIs.
+	(mi_on_normal_stop): Rename to ...
+	(mi_on_normal_stop_1): ... this.
+	(mi_on_normal_stop): Reimplement, sending output to all MI UIs.
+	(mi_traceframe_changed, mi_tsv_created, mi_tsv_deleted)
+	(mi_tsv_modified, mi_breakpoint_created, mi_breakpoint_deleted)
+	(mi_breakpoint_modified, mi_output_running_pid): Send output to
+	all MI UIs.
+	(mi_on_resume): Rename to ...
+	(mi_on_resume_1): ... this.  Don't handle infcalls here.
+	(mi_on_resume): Reimplement, sending output to all MI UIs.
+	(mi_solib_loaded, mi_solib_unloaded, mi_command_param_changed)
+	(mi_memory_changed): Send output to all MI UIs.
+	(report_initial_inferior): Install observers here.
+	* top.h (struct ui) <next>: New field.
+	(ui_list): Declare.
+	(struct switch_thru_all_uis): New.
+	(switch_thru_all_uis_init, switch_thru_all_uis_cond)
+	(switch_thru_all_uis_next): Declare.
+	(SWITCH_THRU_ALL_UIS): New macro.
+	* tui/tui-interp.c (tui_interp): Delete global.
+	(as_tui_interp): New function.
+	(tui_on_normal_stop, tui_on_signal_received)
+	(tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
+	(tui_on_no_history): Send output to all TUI UIs.
+	(tui_on_sync_execution_done, tui_on_command_error): Skip output if
+	the top level interpreter is not a TUI.
+	(tui_init): Don't set tui_interp or install observers here.
+	(_initialize_tui_interp): Install observers here.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-interp.c (cli_uiout): Delete, moved into ...
+	(struct cli_interp): ... this new structure.
+	(cli_on_normal_stop, cli_on_signal_received)
+	(cli_on_end_stepping_range, cli_on_signal_exited, cli_on_exited)
+	(cli_on_no_history): Use interp_ui_out.
+	(cli_interpreter_init): If top level, set the cli_interp global.
+	(cli_interpreter_init): Return the interp's data instead of NULL.
+	(cli_interpreter_resume, cli_interpreter_exec, cli_ui_out): Adjust
+	to cli_uiout being in the interpreter's data.
+	(cli_interp_procs): New, factored out from _initialize_cli_interp.
+	(cli_interp_factory): New function.
+	(_initialize_cli_interp): Call interp_factory_register.
+	* interps.c (get_interp_info): New, factored out from ...
+	(get_current_interp_info): ... this.
+	(interp_new): Add parameter 'data'.  Store it.
+	(struct interp_factory): New function.
+	(interp_factory_p): New typedef.  Define a VEC_P.
+	(interpreter_factories): New global.
+	(interp_factory_register): New function.
+	(interp_add): Add 'ui' parameter.  Use get_interp_info and
+	interp_lookup_existing.
+	(interp_lookup): Rename to ...
+	(interp_lookup_existing): ... this.  Add 'ui' parameter.  Don't
+	check for NULL or empty name here.
+	(interp_lookup): Add 'ui' parameter and reimplement.
+	(interp_set_temp, interpreter_exec_cmd): Adjust.
+	(interpreter_completer): Complete on registered interpreter
+	factories instead of interpreters.
+	* interps.h (interp_factory_func): New typedef.
+	(interp_factory_register): Declare.
+	(interp_new, interp_add): Adjust.
+	(interp_lookup): Declare.
+	* main.c (captured_main): Adjust.
+	* mi/mi-interp.c (mi_cmd_interpreter_exec): Adjust.
+	(mi_interp_procs): New, factored out from
+	_initialize_mi_interp.
+	(mi_interp_factory): New function.
+	* python/python.c (execute_gdb_command): Adjust.
+	* tui/tui-interp.c (tui_init): If top level, set the tui_interp
+	global.
+	(tui_interp_procs): New.
+	(tui_interp_factory): New function.
+	(_initialize_tui_interp): Call interp_factory_register.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (bpstat_do_actions_1): Access the current UI's
+	async field instead of the interpreter_async global.
+	* cli/cli-script.c (execute_user_command, while_command)
+	(if_command, script_from_file): Likewise.
+	* compile/compile.c: Include top.h instead of interps.h.
+	(compile_file_command, compile_code_command)
+	(compile_print_command): Access the current UI's async field
+	instead of the interpreter_async global.
+	* guile/guile.c: Include top.h instead of interps.h.
+	(guile_repl_command, guile_command, gdbscm_execute_gdb_command):
+	Access the current UI's async field instead of the
+	interpreter_async global.
+	* guile/scm-ports.c: Include top.h instead of interps.h.
+	(ioscm_with_output_to_port_worker): Access the current UI's async
+	field instead of the interpreter_async global.
+	* inf-loop.c (inferior_event_handler): Likewise.
+	* infcall.c (run_inferior_call): Likewise.
+	* infrun.c (reinstall_readline_callback_handler_cleanup)
+	(fetch_inferior_event): Likewise.
+	* interps.c (interpreter_async): Delete.
+	(struct ui_interp_info): New.
+	(get_current_interp_info): New function.
+	(interp_list, current_interpreter, top_level_interpreter_ptr):
+	Delete.
+	(interp_add, interp_set, interp_lookup, interp_ui_out)
+	(current_interp_set_logging, interp_set_temp)
+	(current_interp_named_p): Adjust to per-UI interpreters.
+	(command_interpreter): Delete.
+	(command_interp, current_interp_command_loop, interp_quiet_p)
+	(interp_exec, interpreter_exec_cmd, interpreter_completer)
+	(top_level_interpreter, top_level_interpreter_data): Adjust to
+	per-UI interpreters.
+	* interps.h (interpreter_async): Delete.
+	* main.c (captured_command_loop): Access the current UI's async
+	field instead of the interpreter_async global.
+	* python/python.c (python_interactive_command, python_command)
+	(execute_gdb_command): Likewise.
+	* top.c (maybe_wait_sync_command_done, execute_command_to_string):
+	Access the current UI's async field instead of the
+	interpreter_async global.
+	* top.h (struct tl_interp_info): Forward declare.
+	(struct ui) <interp_info, async>: New fields.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* main.c (gdb_stdout, gdb_stderr, gdb_stdlog, gdb_stdin): Delete
+	globals.
+	(gen_ret_current_ui_field_ptr): New macro.  Use it to generate
+	wrappers for gdb_stdout, gdb_stderr, gdb_stdlog and gdb_stdin.
+	* top.h (struct ui) <m_gdb_stdout, m_gdb_stdin, m_gdb_stderr,
+	m_gdb_stdlog>: New fields.
+	(current_ui_gdb_stdout_ptr, current_ui_gdb_stdin_ptr)
+	(current_ui_gdb_stderr_ptr, current_ui_gdb_stdlog_ptr): Declare.
+	(gdb_stdout, gdb_stdin, gdb_stderr, gdb_stdlog): Reimplement as
+	macros.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c: Update readline-related comments.
+	(input_handler, call_readline): Delete globals.
+	(gdb_rl_callback_handler): Call the current UI's input_handler
+	method.
+	(change_line_handler): Adjust to set current UI's properties
+	instead of globals.
+	(current_ui_, current_ui): New globals.
+	(get_command_line_buffer): Rewrite to refer to the current UI.
+	(stdin_event_handler): Adjust to call the call_readline method of
+	the current UI.
+	(gdb_readline_no_editing_callback): Adjust to call the current UI's
+	input_handler method.
+	(gdb_setup_readline): Adjust to set current UI's properties
+	instead of globals.
+	* event-top.h (call_readline, input_handler): Delete declarations.
+	* mi/mi-interp.c (mi_interpreter_resume): Adjust to set current
+	UI's properties instead of globals.
+	* top.c (gdb_readline_wrapper_cleanup): Adjust to set current UI's
+	properties instead of globals.
+	(gdb_readline_wrapper): Adjust to call and set current UI's
+	methods instead of globals.
+	* top.h: Include buffer.h and event-loop.h.
+	(struct ui): New struct.
+	(current_ui): New declaration.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_exception_name_addr_1): Add comment.
+	(print_it_exception): Select the current frame.
+
+2016-06-17  Yan-Ting Lin  <currygt52@gmail.com>
+
+	* Makefile.in (ALL_TARGET_OBS): Add nds32-tdep.o.
+	(HFILES_NO_SRCDIR): Add nds32-tdep.h.
+	(ALLDEPFILES): Add nds32-tdep.c.
+	* NEWS: Mention new NDS32 port.
+	* configure.tgt: Add NDS32.
+	* nds32-tdep.c: New file.
+	* nds32-tdep.h: New file.
+	* features/Makefile (XMLTOC): Add nds32.xml.
+	* features/nds32-core.xml: New file.
+	* features/nds32-fpu.xml: New file.
+	* features/nds32-system.xml: New file.
+	* features/nds32.c: New file (generated).
+	* features/nds32.xml: New file.
+
+2016-06-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* v850-tdep.c (v850_use_struct_convention): Trim type length checks.
+
+2016-06-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* tui/tui-stack.c (tui_show_frame_info): Fix type mismatch.
+
+2016-06-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* rs6000-tdep.c (ppc_process_record_op31): Initialize ra.
+
+2016-06-13  Nick Clifton  <nickc@redhat.com>
+
+	* gdbtypes.c (replace_type): Fix assertion.
+
+2016-06-10  Tom Tromey  <tom@tromey.com>
+
+	* gdbtypes.c (arch_type, arch_integer_type, arch_character_type)
+	(arch_boolean_type, arch_float_type, arch_complex_type)
+	(arch_flags_type, append_flags_type_field)
+	(append_flags_type_flag, arch_composite_type)
+	(append_composite_type_field_raw)
+	(append_composite_type_field_aligned)
+	(append_composite_type_field): Make "name" parameter const.
+	* gdbtypes.h (arch_type, arch_integer_type, arch_character_type)
+	(arch_boolean_type, arch_float_type, arch_complex_type)
+	(append_composite_type_field, append_composite_type_field_aligned)
+	(append_composite_type_field_raw, arch_flags_type)
+	(append_flags_type_field, append_flags_type_flag): Constify.
+
+2016-06-10  Tom Tromey  <tom@tromey.com>
+
+	PR rust/20110:
+	* rust-exp.y (lex_number): Don't truncate large numbers to i32.
+
+2016-06-10  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (COMMON_OBS): Remove rust-exp.o.
+	(YYFILES): Add rust-exp.c.
+	(YYOBJ): Add rust-exp.o.
+	(local-maintainer-clean): Remove rust-exp.c.
+
+2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
+
+	* NEWS: Mention that GDB now supports a negative repeat count in
+	the 'x' command.
+	* printcmd.c (decode_format): Allow '-' in the parameter
+	"string_ptr" to accept a negative repeat count.
+	(find_instruction_backward): New function.
+	(read_memory_backward): New function.
+	(integer_is_zero): New function.
+	(find_string_backward): New function.
+	(do_examine): Use new functions to examine memory backward.
+	(_initialize_printcmd): Mention that 'x' command supports a negative
+	repeat count.
+
+2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
+
+	* MAINTAINERS (Write After Approval): Add Toshihito Kikuchi.
+
+2016-06-09  Tom Tromey  <tom@tromey.com>
+
+	PR python/19819:
+	* python/py-xmethods.c (invoke_method_name)
+	(py_get_result_type_method_name, py_invoke_method_name): Remove.
+	(gdbpy_initialize_xmethods): Don't initialize
+	py_invoke_method_name, py_get_result_type_method_name.
+
+2016-06-07  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-interp.c (mi_record_changed): Add missing braces.
+
+2016-06-07  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* findvar.c (follow_static_link): Check for valid pointer.
+
+2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* NEWS: Mention the new fields in =record-started.
+	* common/btrace-common.h (btrace_format_short_string): New function
+	declaration.
+	* common/btrace-common.c (btrace_format_short_string): New
+	function.
+	* mi/mi-interp.c (mi_record_changed): Output method and format
+	fields in the =record-started record.
+	* record-btrace.c (record_btrace_open): Adapt record_changed
+	notification.
+	* record-full.c (record_full_open): Likewise.
+	* record.c (cmd_record_stop): Likewise.
+
+2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (handle_output_debug_string): Return type of
+	gdb_signal_from_host() is gdb_signal, not an int.
+	(windows_get_exec_module_filename): Add pointer casts for C++.
+
+2016-06-02  Tom Tromey  <tom@tromey.com>
+
+	PR python/18984:
+	* python/python.c (gdbpy_solib_name): Use GDB_PY_LLU_ARG.
+
+2016-06-01  Pedro Alves  <palves@redhat.com>
+
+	* remote-fileio.c (remote_fio_ctrl_c_flag, remote_fio_sa)
+	(remote_fio_osa)
+	(remote_fio_ofunc, remote_fileio_sig_init, remote_fileio_sig_set)
+	(remote_fileio_sig_exit, remote_fileio_ctrl_c_signal_handler):
+	Delete.
+	(remote_fileio_o_quit_handler): New global.
+	(remote_fileio_quit_handler): New function.
+	(remote_fileio_reply): Check the quit flag instead of the custom
+	'remote_fio_ctrl_c_flag' flag.  Restore the quit handler instead
+	of changing the SIGINT handler.
+	(do_remote_fileio_request): Override the quit handler instead of
+	changing the SIGINT handler.
+
+2016-06-01  Nick Clifton  <nickc@redhat.com>
+
+	* common/common-utils.c (xmalloc_failed): New function.  Provided
+	so that the version in libiberty is not linked in.
+
+2016-06-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* infcmd.c (skip_finish_frames): New.
+	(finish_command): Call skip_finish_frames.
+
+2016-06-01  Yao Qi  <yao.qi@linaro.org>
+
+	PR remote/19998
+	* remote-fileio.c (remote_fileio_ctrl_c_signal_handler): Call
+	quit_serial_event_set.
+
+2016-06-01  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.11.1 released.
+
+2016-05-31  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	PR c++/19893
+	* dwarf2loc.c (coerce_pieced_ref, indirect_synthetic_pointer,
+	fetch_const_value_from_synthetic_pointer): New functions.
+	(indirect_pieced_value): Move lower half to indirect_synthetic_pointer.
+	(pieced_value_funcs): Implement coerce_ref.
+	* valops.c (value_addr): Call coerce_ref for synthetic references.
+	* valprint.c (valprint_check_validity): Return true for synthetic
+	references.  Also, don't show "<synthetic pointer>" if they reference
+	addressable values.
+	(generic_val_print_ref): Handle synthetic references.  Also move some
+	code to print_ref_address.
+	(print_ref_address, get_value_addr_contents): New functions.
+
+2016-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR c++/15231
+	* dwarf2read.c (enum pc_bounds_kind): Add PC_BOUNDS_INVALID.
+	(process_psymtab_comp_unit_reader, read_func_scope): Adjust callers.
+	(read_lexical_block_scope): Import DIEs from bare DW_TAG_lexical_block.
+	(read_call_site_scope): Adjust callers.
+	(dwarf2_get_pc_bounds): Implement pc_bounds_invalid.
+	(dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
+
+2016-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
+	* dwarf2read.c (enum pc_bounds_kind) New.
+	(dwarf2_get_pc_bounds): Use it in the declaration.
+	(process_psymtab_comp_unit_reader): Adjust caller.  Rename has_pc_info
+	to cu_bounds_kind.
+	(read_func_scope, read_lexical_block_scope, read_call_site_scope):
+	Adjust callers.
+	(dwarf2_get_pc_bounds): Use enum pc_bounds_kind in the definition.
+	(dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
+
+2016-05-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* NEWS (QCatchSyscalls): Remove the parameter.  Include ...
+	(QCatchSyscalls:1 in qSupported) ... this separate entry which got
+	deleted.
+
+2016-05-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* NEWS (N stop reply): Remove empty line.
+
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+	* compile/compile-object-load.c (link_callbacks_multiple_definition,
+	link_callbacks_warning, link_callbacks_undefined_symbol,
+	link_callbacks_undefined_symbol, link_callbacks_reloc_overflow,
+	link_callbacks_reloc_dangerous,
+	link_callbacks_unattached_reloc): Return void.
+
+2016-05-27  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opencl-lang.c (evaluate_subexp_opencl): If
+	EVAL_AVOID_SIDE_EFFECTS mode, forward the VALUE_LVAL attribute to
+	the returned value in the STRUCTOP_STRUCT case.
+
+2016-05-27  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* eval.c (evaluate_subexp_standard): If EVAL_AVOID_SIDE_EFFECTS
+	mode, forward the VALUE_LVAL attribute to the returned value in
+	the STRUCTOP_PTR case.
+
+2016-05-25  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (value_object_as_number): Use correct spelling
+	of HAVE_LIBPYTHON2_4.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* f-typeprint.c (f_type_print_base): Replace 0 by show.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* f-typeprint.c (f_type_print_base): Decrease show by one.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* f-typeprint.c (f_type_print_base): Don't print fields when show < 0.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* f-typeprint.c (f_type_print_base): Take print level into account.
+
+2016-05-24  Tom Tromey  <tom@tromey.com>
+
+	PR python/17386:
+	* python/py-value.c (value_object_as_number): Add
+	nb_inplace_floor_divide, nb_inplace_true_divide, nb_index.
+
+2016-05-24  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (value_object_as_number): Add
+	nb_inplace_divide for Python 2.
+
+2016-05-23  Tom Tromey  <tom@tromey.com>
+
+	PR python/17981:
+	* python/py-breakpoint.c (gdbpy_breakpoints): Return a new tuple
+	when there are no breakpoints.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (attach_proc_task_lwp_callback): Mark the lwp
+	resumed, and add the thread to GDB's thread list.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (get_pending_status): If the thread reported the
+	event to the core and it's pending, use the pending status signal
+	number.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (lwp_lwpid_htab): New htab.
+	(lwp_info_hash, lwp_lwpid_htab_eq, lwp_lwpid_htab_create)
+	(lwp_lwpid_htab_add_lwp): New functions.
+	(lwp_list): Tweak comment.
+	(lwp_list_add, lwp_list_remove, lwp_lwpid_htab_remove_pid): New
+	functions.
+	(purge_lwp_list): Rewrite, using htab_traverse_noresize.
+	(add_initial_lwp): Add lwp to htab too.  Use lwp_list_add.
+	(delete_lwp): Use lwp_list_remove.  Remove htab too.
+	(find_lwp_pid): Search in htab.
+	(_initialize_linux_nat): Call lwp_lwpid_htab_create.
+	* linux-nat.h (struct lwp_info) <prev>: New field.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (lwp_lwpid_htab): New htab.
+	(lwp_info_hash, lwp_lwpid_htab_eq, lwp_lwpid_htab_create)
+	(lwp_lwpid_htab_add_lwp): New functions.
+	(lwp_list): Tweak comment.
+	(lwp_list_add, lwp_list_remove, lwp_lwpid_htab_remove_pid): New
+	functions.
+	(purge_lwp_list): Rewrite, using htab_traverse_noresize.
+	(add_initial_lwp): Add lwp to htab too.  Use lwp_list_add.
+	(delete_lwp): Use lwp_list_remove.  Remove htab too.
+	(find_lwp_pid): Search in htab.
+	(_initialize_linux_nat): Call lwp_lwpid_htab_create.
+	* linux-nat.h (struct lwp_info) <prev>: New field.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (linux_resume_one_lwp_throw): Clear the LWP's core
+	field.
+	(linux_nat_update_thread_list): Don't fetch the core if already
+	known.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-tdep.c (find_mapping_size): Delete.
+	(linux_vsyscall_range_raw): Rewrite reading from
+	/proc/PID/task/PID/maps directly instead of using
+	gdbarch_find_memory_regions.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* linux-nat.c (report_thread_events): New global.
+	(linux_handle_extended_wait): Report
+	TARGET_WAITKIND_THREAD_CREATED if thread event reporting is
+	enabled.
+	(wait_lwp, linux_nat_filter_event): Report all thread exits if
+	thread event reporting is enabled.  Remove comment.
+	(filter_exit_event): New function.
+	(linux_nat_wait_1): Use it.
+	(linux_nat_thread_events): New function.
+	(linux_nat_add_target): Install it as target_thread_events method.
+
+2016-05-24  Yan-Ting Lin  <currygt52@gmail.com>
+
+	* MAINTAINERS (Write After Approval): Add "Yan-Ting Lin".
+
+2016-05-23  Yao Qi  <yao.qi@arm.com>
+
+	* arch-utils.c (default_code_of_frame_writable): New function.
+	* arch-utils.h (default_code_of_frame_writable): Declare.
+	* arm-tdep.c (arm_code_of_frame_writable): New function.
+	(arm_gdbarch_init): Install gdbarch method
+	code_of_frame_writable if the target is M-profile.
+	* frame.c (skip_unwritable_frames): New function.
+	* frame.h (skip_unwritable_frames): Declare.
+	* gdbarch.sh (code_of_frame_writable): New.
+	* gdbarch.c, gdbarch.h: Re-generated.
+	* infcmd.c (finish_command): Call skip_unwritable_frames.
+
+2016-05-23  Tom Tromey  <tom@tromey.com>
+
+	PR python/19438, PR python/18393:
+	* python/py-objfile.c (objfpy_initialize): Initialize self->dict.
+	* python/py-progspace.c (pspy_initialize): Initialize self->dict.
+
+2016-05-23  Gary Benson  <gbenson@redhat.com>
+
+	* nat/gdb_thread_db.h (td_thr_validate_ftype): Remove typedef.
+	* linux-thread-db.c (struct thread_db_info) <td_thr_validate_p>:
+	Remove field.
+	(try_thread_db_load_1): Remove td_thr_validate initialization.
+
+2016-05-23  Jon Boden  <jon@ubuntubsd.org>  (tiny change)
+
+	* configure.ac: Search for libutil-freebsd as alternative to libutil.
+	* configure: Re-generated.
+
+2016-05-19  Andreas Schwab  <schwab@suse.de>
+
+	* ia64-libunwind-tdep.c (libunwind_descr): Add cast from void *.
+	(libunwind_frame_set_descr): Likewise.
+	(libunwind_frame_cache): Likewise.
+	(libunwind_frame_dealloc_cache): Likewise.
+	(libunwind_frame_sniffer): Likewise.
+	(libunwind_search_unwind_table): Likewise.
+	(libunwind_sigtramp_frame_sniffer): Likewise.
+	(libunwind_get_reg_special): Likewise.
+	(libunwind_load): Likewise.
+	* ia64-linux-nat.c (ia64_linux_fetch_register): Likewise.
+	(ia64_linux_store_register): Likewise.
+	(ia64_linux_xfer_partial): Likewise.
+	* ia64-tdep.c (ia64_access_reg): Likewise.
+	(ia64_access_fpreg): Likewise.
+	(ia64_access_rse_reg): Likewise.
+	(ia64_access_rse_fpreg): Likewise.
+
+2016-05-18  Tom Tromey  <tom@tromey.com>
+
+	* rust-lang.c (rust_subscript): Initialize "high".
+
+2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20045
+	* mi/mi-main.c (mi_on_resume): Call target_can_async_p instead
+	of target_is_async_p.
+
+2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/18077
+	* mi/mi-main.c (run_one_inferior): Use run target to determine
+	whether to run async or not.
+	(mi_cmd_exec_run): Likewise.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* std-operator.def (OP_RANGE): Rename from OP_F90_RANGE.
+	* rust-lang.c: Don't include f-lang.h.
+	(rust_range, rust_compute_range, rust_subscript)
+	(rust_evaluate_subexp): Update.
+	* rust-exp.y: Don't include f-lang.h.
+	(ast_range, convert_ast_to_expression): Update.
+	* parse.c (operator_length_standard): Update.
+	* f-lang.h (enum f90_range_type): Move to expression.h.
+	* f-exp.y: Use OP_RANGE.
+	* expression.h (enum range_type): New enum; renamed from
+	f90_range_type.
+	* expprint.c: Don't include f-lang.h.
+	(print_subexp_standard, dump_subexp_body_standard): Use OP_RANGE.
+	* eval.c (value_f90_subarray, evaluate_subexp_standard): Update.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* NEWS: Add Rust item.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+	    Manish Goregaokar <manishsmail@gmail.com>
+
+	* symtab.c (symbol_find_demangled_name): Handle Rust.
+	* symfile.c (init_filename_language_table): Treat ".rs" as Rust.
+	* std-operator.def (STRUCTOP_ANONYMOUS, OP_RUST_ARRAY): New
+	constants.
+	* rust-lang.h: New file.
+	* rust-lang.c: New file.
+	* rust-exp.y: New file.
+	* dwarf2read.c (read_file_scope): Add Rust producer sniffing.
+	(dwarf2_compute_name, read_func_scope, read_structure_type)
+	(read_base_type, read_subrange_type, set_cu_language)
+	(new_symbol_full, determine_prefix): Handle Rust.
+	* defs.h (enum language) <language_rust>: New constant.
+	* Makefile.in (SFILES): Add rust-exp.y, rust-lang.c.
+	(COMMON_OBS): Add rust-exp.o, rust-lang.o.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* valprint.h (struct generic_val_print_array) <array_start,
+	array_end>: New fields.
+	* valprint.c (generic_val_print_array): Add "decorations"
+	parameter.  Use "array_start", "array_end".
+	(generic_val_print) <TYPE_CODE_ARRAY>: Update.
+	* p-valprint.c (p_decorations): Update.
+	* m2-valprint.c (m2_decorations): Update.
+	* f-valprint.c (f_decorations): Update.
+	* c-valprint.c (c_decorations): Update.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* NEWS: Add "maint selftest" entry.
+	* selftest.h: New file.
+	* selftest.c: New file.
+	* maint.c: Include selftest.h.
+	(maintenance_selftest): New function.
+	(_initialize_maint_cmds): Add "maint selftest" command.
+	* configure.ac (GDB_SELF_TEST): Maybe define.
+	* config.in, configure: Rebuild.
+	* Makefile.in (SFILES): Add selftest.c.
+	(COMMON_OBS): Add selftest.o.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* expprint.c: Include f-lang.h.
+	(print_subexp_standard, dump_subexp_body_standard): Handle
+	OP_F90_RANGE.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (init.c): Search .y files for initialization
+	functions.
+
+2016-05-12  Doug Evans  <dje@google.com>
+
+	PR symtab/19999
+	* dwarf2loc.c (dwarf2_find_location_expression): For DWO files still
+	add base_offset.
+
+2016-05-10  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* iq2000-tdep.c (iq2000_scan_prologue): Remove if that shouldn't guard
+	anything.
+	* linespec.c (add_sal_to_sals): Restore call to symtab_to_fullname.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm-tdep.c (arm_elf_make_msymbol_special): Use
+	ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.
+
+2016-05-07  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Remove unused
+	variables.
+	* aarch64-tdep.c (aarch64_skip_prologue): Likewise.
+	(aarch64_scan_prologue): Likewise.
+	(aarch64_prologue_prev_register): Likewise.
+	(aarch64_dwarf2_prev_register): Likewise.
+	(pass_in_v): Likewise.
+	(aarch64_push_dummy_call): Likewise.
+	(aarch64_breakpoint_from_pc): Likewise.
+	(aarch64_return_in_memory): Likewise.
+	(aarch64_return_value): Likewise.
+	(aarch64_displaced_step_b_cond): Likewise.
+	(aarch64_displaced_step_cb): Likewise.
+	(aarch64_displaced_step_tb): Likewise.
+	(aarch64_gdbarch_init): Likewise.
+	(aarch64_process_record): Likewise.
+	* alpha-mdebug-tdep.c (alpha_mdebug_init_abi): Likewise.
+	* alpha-tdep.c (_initialize_alpha_tdep): Likewise.
+	* amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
+	* amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Likewise.
+	* amd64-tdep.c (fixup_riprel): Likewise.
+	* amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue): Likewise.
+	(amd64_windows_frame_decode_insns): Likewise.
+	(amd64_windows_frame_cache): Likewise.
+	(amd64_windows_frame_prev_register): Likewise.
+	(amd64_windows_frame_this_id): Likewise.
+	(amd64_windows_init_abi): Likewise.
+	* arm-linux-tdep.c (arm_linux_get_syscall_number): Likewise.
+	(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
+	* arm-symbian-tdep.c (arm_symbian_init_abi): Likewise.
+	* arm-tdep.c (arm_make_epilogue_frame_cache): Likewise.
+	(arm_epilogue_frame_prev_register): Likewise.
+	(arm_record_vdata_transfer_insn): Likewise.
+	(arm_record_exreg_ld_st_insn): Likewise.
+	* auto-load.c (execute_script_contents): Likewise.
+	(print_scripts): Likewise.
+	* avr-tdep.c (avr_frame_prev_register): Likewise.
+	(avr_push_dummy_call): Likewise.
+	* bfin-linux-tdep.c (bfin_linux_sigframe_init): Likewise.
+	* bfin-tdep.c (bfin_gdbarch_init): Likewise.
+	* blockframe.c (find_pc_partial_function_gnu_ifunc): Likewise.
+	* break-catch-throw.c (fetch_probe_arguments): Likewise.
+	* breakpoint.c (breakpoint_xfer_memory): Likewise.
+	(breakpoint_init_inferior): Likewise.
+	(breakpoint_inserted_here_p): Likewise.
+	(software_breakpoint_inserted_here_p): Likewise.
+	(hardware_breakpoint_inserted_here_p): Likewise.
+	(bpstat_what): Likewise.
+	(break_range_command): Likewise.
+	(save_breakpoints): Likewise.
+	* coffread.c (coff_symfile_read): Likewise.
+	* cris-tdep.c (cris_push_dummy_call): Likewise.
+	(cris_scan_prologue): Likewise.
+	(cris_register_size): Likewise.
+	(_initialize_cris_tdep): Likewise.
+	* d-exp.y: Likewise.
+	* dbxread.c (dbx_read_symtab): Likewise.
+	(process_one_symbol): Likewise.
+	(coffstab_build_psymtabs): Likewise.
+	(elfstab_build_psymtabs): Likewise.
+	* dicos-tdep.c (dicos_init_abi): Likewise.
+	* disasm.c (do_mixed_source_and_assembly): Likewise.
+	(gdb_disassembly): Likewise.
+	* dtrace-probe.c (dtrace_process_dof): Likewise.
+	* dwarf2read.c (error_check_comp_unit_head): Likewise.
+	(build_type_psymtabs_1): Likewise.
+	(skip_one_die): Likewise.
+	(process_imported_unit_die): Likewise.
+	(dwarf2_physname): Likewise.
+	(read_file_scope): Likewise.
+	(setup_type_unit_groups): Likewise.
+	(create_dwo_cu_reader): Likewise.
+	(create_dwo_cu): Likewise.
+	(create_dwo_unit_in_dwp_v1): Likewise.
+	(create_dwo_unit_in_dwp_v2): Likewise.
+	(lookup_dwo_unit_in_dwp): Likewise.
+	(free_dwo_file): Likewise.
+	(check_producer): Likewise.
+	(dwarf2_add_typedef): Likewise.
+	(dwarf2_add_member_fn): Likewise.
+	(read_unsigned_leb128): Likewise.
+	(read_signed_leb128): Likewise.
+	(dwarf2_const_value): Likewise.
+	(follow_die_sig_1): Likewise.
+	(dwarf_decode_macro_bytes): Likewise.
+	* extension.c (restore_active_ext_lang): Likewise.
+	* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
+	* ft32-tdep.c (ft32_analyze_prologue): Likewise.
+	* gdbtypes.c (lookup_typename): Likewise.
+	(resolve_dynamic_range): Likewise.
+	(check_typedef): Likewise.
+	* h8300-tdep.c (h8300_is_argument_spill): Likewise.
+	(h8300_gdbarch_init): Likewise.
+	* hppa-tdep.c (hppa32_push_dummy_call): Likewise.
+	(hppa_frame_this_id): Likewise.
+	(_initialize_hppa_tdep): Likewise.
+	* hppanbsd-tdep.c (hppanbsd_sigtramp_cache_init): Likewise.
+	* hppaobsd-tdep.c (hppaobsd_supply_fpregset): Likewise.
+	* i386-dicos-tdep.c (i386_dicos_init_abi): Likewise.
+	* i386-tdep.c (i386_bnd_type): Likewise.
+	(i386_gdbarch_init): Likewise.
+	(i386_mpx_bd_base): Likewise.
+	* i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Likewise.
+	* i386obsd-tdep.c (i386obsd_elf_init_abi): Likewise.
+	* ia64-tdep.c (examine_prologue): Likewise.
+	(ia64_frame_cache): Likewise.
+	(ia64_push_dummy_call): Likewise.
+	* infcmd.c (finish_command_fsm_async_reply_reason): Likewise.
+	(default_print_one_register_info): Likewise.
+	* infrun.c (infrun_thread_ptid_changed): Likewise.
+	(thread_still_needs_step_over): Likewise.
+	(stop_all_threads): Likewise.
+	(restart_threads): Likewise.
+	(keep_going_stepped_thread): Likewise.
+	* iq2000-tdep.c (iq2000_scan_prologue): Likewise.
+	* language.c (language_init_primitive_type_symbols): Likewise.
+	* linespec.c (add_sal_to_sals): Likewise.
+	* linux-nat.c (status_callback): Likewise.
+	(kill_unfollowed_fork_children): Likewise.
+	(linux_nat_kill): Likewise.
+	* linux-tdep.c (linux_fill_prpsinfo): Likewise.
+	* linux-thread-db.c (thread_db_notice_clone): Likewise.
+	(record_thread): Likewise.
+	* location.c (string_to_event_location_basic): Likewise.
+	* m32c-tdep.c (m32c_prev_register): Likewise.
+	* m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
+	* m32r-tdep.c (decode_prologue): Likewise.
+	* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
+	* machoread.c (macho_symtab_read): Likewise.
+	(macho_symfile_read): Likewise.
+	(macho_symfile_offsets): Likewise.
+	* maint.c (set_per_command_cmd): Likewise.
+	* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
+	(mi_cmd_stack_list_variables): Likewise.
+	* mi/mi-main.c (mi_cmd_exec_run): Likewise.
+	(output_register): Likewise.
+	(mi_cmd_execute): Likewise.
+	(mi_cmd_trace_define_variable): Likewise.
+	(print_variable_or_computed): Likewise.
+	* minsyms.c (prim_record_minimal_symbol_full): Likewise.
+	* mn10300-tdep.c (mn10300_frame_prev_register): Likewise.
+	* msp430-tdep.c (msp430_pseudo_register_write): Likewise.
+	* mt-tdep.c (mt_registers_info): Likewise.
+	* nios2-tdep.c (nios2_analyze_prologue): Likewise.
+	(nios2_push_dummy_call): Likewise.
+	(nios2_frame_unwind_cache): Likewise.
+	(nios2_stub_frame_cache): Likewise.
+	(nios2_stub_frame_sniffer): Likewise.
+	(nios2_gdbarch_init): Likewise.
+	* ppc-ravenscar-thread.c: Likewise.
+	* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
+	* python/py-evts.c (add_new_registry): Likewise.
+	* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
+	(bpfinishpy_detect_out_scope_cb): Likewise.
+	* python/py-framefilter.c (py_print_value): Likewise.
+	* python/py-inferior.c (infpy_write_memory): Likewise.
+	* python/py-infevents.c (create_inferior_call_event_object): Likewise.
+	* python/py-infthread.c (thpy_get_ptid): Likewise.
+	* python/py-linetable.c (ltpy_get_pcs_for_line): Likewise.
+	(ltpy_get_all_source_lines): Likewise.
+	(ltpy_is_valid): Likewise.
+	(ltpy_iternext): Likewise.
+	* python/py-symtab.c (symtab_and_line_to_sal_object): Likewise.
+	* python/py-unwind.c (pyuw_object_attribute_to_pointer): Likewise.
+	(unwind_infopy_str): Likewise.
+	* python/py-varobj.c (py_varobj_get_iterator): Likewise.
+	* ravenscar-thread.c (ravenscar_inferior_created): Likewise.
+	* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
+	* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
+	* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
+	* s390-linux-tdep.c (s390_supply_tdb_regset): Likewise.
+	(s390_frame_prev_register): Likewise.
+	(s390_dwarf2_frame_init_reg): Likewise.
+	(s390_record_vr): Likewise.
+	(s390_process_record): Likewise.
+	* score-tdep.c (score_push_dummy_call): Likewise.
+	(score3_analyze_prologue): Likewise.
+	* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
+	* sh64-tdep.c (sh64_analyze_prologue): Likewise.
+	(sh64_push_dummy_call): Likewise.
+	(sh64_extract_return_value): Likewise.
+	(sh64_do_fp_register): Likewise.
+	* solib-aix.c (solib_aix_get_section_offsets): Likewise.
+	* solib-darwin.c (darwin_read_exec_load_addr_from_dyld): Likewise.
+	(darwin_solib_read_all_image_info_addr): Likewise.
+	* solib-dsbt.c (enable_break): Likewise.
+	* solib-frv.c (enable_break2): Likewise.
+	(frv_fdpic_find_canonical_descriptor): Likewise.
+	* solib-svr4.c (svr4_handle_solib_event): Likewise.
+	* sparc-tdep.c (sparc_skip_stack_check): Likewise.
+	* sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): Likewise.
+	* sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
+	* spu-tdep.c (info_spu_dma_cmdlist): Likewise.
+	* stack.c (read_frame_local): Likewise.
+	* symfile.c (symbol_file_add_separate): Likewise.
+	(remove_symbol_file_command): Likewise.
+	* symmisc.c (maintenance_print_one_line_table): Likewise.
+	* symtab.c (symbol_cache_flush): Likewise.
+	(basic_lookup_transparent_type): Likewise.
+	(sort_search_symbols_remove_dups): Likewise.
+	* target.c (target_memory_map): Likewise.
+	(target_detach): Likewise.
+	(target_resume): Likewise.
+	(acquire_fileio_fd): Likewise.
+	(target_store_registers): Likewise.
+	* thread.c (print_thread_info_1): Likewise.
+	* tic6x-tdep.c (tic6x_analyze_prologue): Likewise.
+	* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Likewise.
+	* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
+	(tilegx_analyze_prologue): Likewise.
+	(tilegx_stack_frame_destroyed_p): Likewise.
+	(tilegx_frame_cache): Likewise.
+	* tracefile.c (trace_save): Likewise.
+	* tracepoint.c (encode_actions_and_make_cleanup): Likewise.
+	(start_tracing): Likewise.
+	(print_one_static_tracepoint_marker): Likewise.
+	* tui/tui.c (tui_enable): Likewise.
+	* valops.c (value_struct_elt_bitpos): Likewise.
+	(find_overload_match): Likewise.
+	(find_oload_champ): Likewise.
+	* value.c (value_contents_copy_raw): Likewise.
+	* windows-tdep.c (windows_get_tlb_type): Likewise.
+	* x86-linux-nat.c (x86_linux_enable_btrace): Likewise.
+	* xcoffread.c (record_minimal_symbol): Likewise.
+	(scan_xcoff_symtab): Likewise.
+	* xtensa-tdep.c (execute_code): Likewise.
+	(xtensa_gdbarch_init): Likewise.
+	(_initialize_xtensa_tdep): Likewise.
+
+2016-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* spu-linux-nat.c (spu_bfd_iovec_pread): Add pointer cast for C++.
+	(spu_bfd_open): Likewise.
+
+2016-05-04  Yao Qi  <yao.qi@linaro.org>
+
+	PR gdb/19947
+	* corefile.c (read_memory): Rename it to ...
+	(read_memory_object): ... it.  Add parameter object.
+	(read_memory): Call read_memory_object.
+	(read_stack): Likewise.
+	(read_code): Likewise.
+
+2016-05-03  Yunlian Jiang <yunlian@google.com>
+	    Doug Evans  <dje@google.com>
+
+	PR symtab/19914
+	* dwarf2read.c (open_and_init_dwp_file): Look at backlink if objfile
+	is separate debug file.
+
+2016-05-03  Don Breazeal <donb@codesourcery.com>
+
+	* serial.h (gdb_pipe): Fix argument names in comment.
+
+2016-05-03  Pedro Alves <palves@redhat.com>
+
+	PR python/20037
+	* python/python.c (_initialize_python) [IS_PY3K]: xstrdup/xfree
+	oldloc.
+
+2016-05-03  Pedro Alves <palves@redhat.com>
+
+	* python/python.c (_initialize_python) [IS_PY3K]: Remove dead
+	code.
+
+2016-05-03  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic".
+	* configure: Regenerate.
+
+2016-05-03  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (checking for the dynamic export flag): Add
+	$PYTHON_CPPFLAGS to CPPFLAGS.
+	* configure: Regenerate.
+
+2016-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	* symfile.c (find_pc_overlay): Add braces to avoid -Wparentheses
+	warning.
+	(find_pc_mapped_section): Likewise.
+	(list_overlays_command): Likewise.
+
+2016-05-02  Eli Zaretskii  <eliz@gnu.org>
+
+	* windows-nat.c (_initialize_check_for_gdb_ini): Fix off-by-one
+	error in allocation of space for "$HOME/.gdbinit" string.  This
+	caused GDB to abort on startup whenever a '~/gdb.ini' file was
+	actually found, because xsnprintf would hit an assertion
+	violation.
+
+2016-04-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cli/cli-decode.c (help_cmd_list): Do not list commands that
+	are deprecated.
+
+2016-04-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* remote.c (remote_start_remote): Detect PACKET_vFile_setfs.support.
+
+2016-04-27  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* c-valprint.c (c_value_print): Always convert val back to reference
+	type if we converted it to a pointer type.
+
+2016-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* configure.ac: Enhance configure check for babeltrace to reject
+	non-C++-enabled versions.
+	* configure: Regenerate.
+
+2016-04-26  Sanimir Agovic  <sanimir.agovic@intel.com>
+	    Keven Boell  <keven.boell@intel.com>
+	    Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* f-valprint.c (f77_create_arrayprint_offset_tbl): Remove
+	function.
+	(F77_DIM_SIZE, F77_DIM_OFFSET): Remove macro.
+	(f77_print_array_1): Use value_subscript to subscript a
+	value array.
+	(f77_print_array): Remove call to f77_create_arrayprint_offset_tbl.
+	(f_val_print): Use value_field to construct a field value.
+
+2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* valarith.c (value_address): Resolve dynamic types.
+
+2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
+	    Keven Boell  <kevel.boell@intel.com>
+
+	* NEWS: Add new supported features for fortran.
+	* gdbtypes.c (remove_dyn_prop): New.
+	(resolve_dynamic_struct): Keep type length for fortran structs.
+	* gdbtypes.h: Forward declaration of new function.
+	* value.c (value_address): Return dynamic resolved location of a value.
+	(set_value_component_location): Adjust the value address
+	for single value prints.
+	(value_primitive_field): Support value types with a dynamic location.
+	(set_internalvar): Remove dynamic location property of
+	internal variables.
+
+2016-04-25  Pedro Alves  <palves@redhat.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (set_raw_breakpoint_at): Create a raw breakpoint
+	object.  Insert it if it is not inserted yet.  Increase the
+	refcount and link it into the proc's raw breakpoint list.
+
+2016-04-25  Yao Qi  <yao.qi@linaro.org>
+
+	* breakpoint.c (should_be_inserted): Return 0 if the location's
+	owner is not single step breakpoint or single step breakpoint's
+	thread isn't the thread which is stepping past a breakpoint.
+	* gdbarch.sh (software_single_step): Update comments.
+	* gdbarch.h: Regenerated.
+	* infrun.c (struct step_over_info) <thread>: New field.
+	(set_step_over_info): New argument 'thread'.  Callers updated.
+	(clear_step_over_info): Set field thread to -1.
+	(thread_is_stepping_over_breakpoint): New function.
+	* infrun.h (thread_is_stepping_over_breakpoint): Declaration.
+
+2016-04-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* ppc-linux-nat.c (ppc_linux_read_description): Use PPC_FEATURE_HAS_VSX
+	and PPC_FEATURE_HAS_ALTIVEC to check if such features are available.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* valops.c (read_value_memory): New local variable 'stack'.
+	Set it to either TARGET_OBJECT_STACK_MEMORY or
+	TARGET_OBJECT_MEMORY.
+
+2016-04-22  Pedro Alves  <palves@redhat.com>
+
+	* ada-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* ada-lang.c (ada_language_defn): Adjust.
+	* ada-lang.h (ada_error): Rename to ...
+	(ada_yyerror): ... this.
+	* c-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* c-lang.c (c_language_defn, cplus_language_defn)
+	(asm_language_defn, minimal_language_defn): Adjust.
+	* c-lang.h (c_error): Rename to ...
+	(c_yyerror): ... this.
+	* d-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* d-lang.c (d_language_defn): Adjust.
+	* d-lang.h (d_error): Rename to ...
+	(d_yyerror): ... this.
+	* f-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* f-lang.c (f_language_defn): Adjust.
+	* f-lang.h (f_error): Rename to ...
+	(f_yyerror): ... this.
+	* go-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* go-lang.c (go_language_defn): Adjust.
+	* go-lang.h (go_error): Rename to ...
+	(go_yyerror): ... this.
+	* jv-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* jv-lang.c (java_language_defn): Adjust.
+	* jv-lang.h (java_error): Rename to ...
+	(java_yyerror): ... this.
+	* m2-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* m2-lang.c (m2_language_defn): Adjust.
+	* m2-lang.h (m2_error): Rename to ...
+	(m2_yyerror): ... this.
+	* objc-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* objc-lang.c (objc_language_defn): Adjust.
+	* opencl-lang.c (opencl_language_defn): Adjust.
+	* p-exp.y: Remove all yy symbol remappings.
+	(GDB_YY_REMAP_PREFIX): Define.
+	Include "yy-remap.h".
+	* p-lang.c (pascal_language_defn): Adjust.
+	* p-lang.h (pascal_error): Rename to ...
+	(pascal_yyerror): ... this.
+	* yy-remap.h: New file.
+
+2016-04-22  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.h (GDB_XCPT_TRY): Remove mention of
+	the foreign frames issue.
+	[__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
+
+2016-04-22  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c (enum catcher_state, struct catcher)
+	(current_catcher): Define in C++ mode too.
+	(exceptions_state_mc_catch): Call throw_exception_sjlj instead of
+	throw_exception.
+	(throw_exception_sjlj, throw_exception_cxx): New functions,
+	factored out from throw_exception.
+	(throw_exception): Reimplement.
+	* common/common-exceptions.h (exceptions_state_mc_init)
+	(exceptions_state_mc_action_iter)
+	(exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
+	Declare in C++ mode too.
+	(TRY): Rename to ...
+	(TRY_SJLJ): ... this.
+	(CATCH): Rename to ...
+	(CATCH_SJLJ): ... this.
+	(END_CATCH): Rename to ...
+	(END_CATCH_SJLJ): ... this.
+	[GDB_XCPT == GDB_XCPT_SJMP] (TRY, CATCH, END_CATCH): Map to SJLJ
+	equivalents.
+	(throw_exception): Update comments.
+	(throw_exception_sjlj): Declare.
+	* event-top.c (gdb_rl_callback_read_char_wrapper): Extend intro
+	comment.  Wrap body in TRY_SJLJ/CATCH_SJLJ and rethrow any
+	intercepted exception.
+	(gdb_rl_callback_handler): New function.
+	(gdb_rl_callback_handler_install): Always install
+	gdb_rl_callback_handler as readline callback.
+
+2016-04-22  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (rl_callback_read_char_wrapper): Rename to ...
+	(gdb_rl_callback_read_char_wrapper): ... this.
+	(change_line_handler, gdb_setup_readline): Adjust.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch32-linux-nat.c (aarch32_gp_regcache_supply): Clear CPSR
+	bits 20 to 23.
+
+2016-04-22  Joel Brobecker  <brobecker@adacore.com>
+
+	* MAINTAINER: Remove myself as AIX Maintainer.
+
+2016-04-22  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_gdbarch_init): For GDB_OSABI_LINUX set
+	`num_regs' to 90 rather than 79.  Where a target description is
+	present adjust the setting appropriately.
+
+2016-04-21  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.h (GDB_XCPT_TRY): Add comment.
+	(GDB_XCPT): Always define as GDB_XCPT_SJMP.
+
+2016-04-21  Pedro Alves  <palves@redhat.com>
+
+	* aix-thread.c (pdc_read_data, pdc_write_data): Add cast.
+	(aix_thread_resume): Use PTRACE_TYPE_ARG5.
+	* rs6000-nat.c (rs6000_ptrace64): Use PTRACE_TYPE_ARG5.
+	(rs6000_ptrace_ldinfo): Change type of 'ldi' local to void
+	pointer, and cast return to gdb_byte pointer.
+
+2016-04-21  Pedro Alves  <palves@redhat.com>
+
+	* s390-linux-nat.c (fetch_regset, store_regset, check_regset): Use
+	void * instead of gdb_byte *.
+
+2016-04-21  Pedro Alves  <palves@redhat.com>
+
+	* dwarf2read.c (try_open_dwop_file, open_dwo_file)
+	(file_file_name, file_full_name): Add char * cast to sentinel in
+	concat/reconcat calls.
+	* event-top.c (top_level_prompt): Likewise.
+	* guile/guile.c (initialize_scheme_side): Likewise.
+	* linux-tdep.c (linux_fill_prpsinfo): Likewise.
+	* macrotab.c (macro_source_fullname): Likewise.
+	* main.c (get_init_files, captured_main): Likewise.
+	* psymtab.c (psymtab_to_fullname): Likewise.
+	* python/python.c (_initialize_python)
+	(gdbpy_finish_initialization): Likewise.
+	* source.c (symtab_to_fullname): Likewise.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
+	* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Default to yes.
+	* configure: Renegerate.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
+	* darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
+	* aarch64-tdep.c (aarch64_record_load_store): Change type of
+	'reg_rm_val' local to ULONGEST.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
+	* darwin-nat.c (darwin_resume_thread): Add uintptr_t cast.
+
+2016-04-20  Doug Evans  <xdje42@gmail.com>
+
+	* symmisc.c (dump_symtab_1): Print owning compunit for identical
+	blockvectors.
+
+2016-04-20  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch32-linux-nat.c: Include "arch/arm-linux.h".
+
+2016-04-20  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.h (ARM_CPSR_GREGNUM): Move it to ...
+	* arch/arm-linux.h: ... here.
+
+2016-04-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
+	to void *.
+	(amd64bsd_store_inferior_registers): Likewise.
+	* fbsd-nat.c (resume_one_thread_cb): Explicitly cast data to ptid_t *.
+	(resume_all_threads_cb): Likewise.
+	* i386bsd-nat.c (i386bsd_supply_gregset): Cast gregs to char *.
+	(i386bsd_collect_gregset): Likewise.
+	(i386bsd_fetch_inferior_registers): Change xstateregs to void *.
+	(i386bsd_store_inferior_registers): Likewise.
+
+2016-04-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* main.c (setup_alternate_signal_stack): Cast to char *.
+
+2016-04-19  Doug Evans  <xdje42@gmail.com>
+
+	* symmisc.c (dump_symtab_1, dump_symtab): Delete arg objfile.
+	All callers updated.
+
+2016-04-19  Doug Evans  <xdje42@gmail.com>
+
+	PR gdb/17911
+	* source.c (is_regular_file): New arg errno_ptr.
+	All callers updated.
+
+2016-04-19  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-record.c (record_linux_system_call): Merge handling for
+	readlink/recv/read and pipe/pipe2.
+
+2016-04-14  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* features/i386/amd64-mpx-linux.xml: Remove AVX feature.
+	* features/i386/amd64-mpx.xml: Remove AVX feature.
+	* features/i386/i386-mpx-linux.xml: Remove AVX feature.
+	* features/i386/i386-mpx.xml: Remove AVX feature.
+	* features/i386/amd64-mpx-linux.c: Regenerate.
+	* features/i386/amd64-mpx.c: Regenerate.
+	* features/i386/i386-mpx-linux.c: Regenerate.
+	* features/i386/i386-mpx.c: Regenerate.
+	* regformats/i386/amd64-mpx-linux.dat: Regenerate.
+	* regformats/i386/amd64-mpx.dat: Regenerate.
+	* regformats/i386/i386-mpx-linux.dat: Regenerate.
+	* regformats/i386/i386-mpx.dat: Regenerate.
+
+2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
+	New include.
+	(amd64_linux_core_read_description): Add case for
+	 X86_XSTATE_AVX_MPX_MASK.
+	(_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
+	* amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
+	* amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
+	(amd64_target_description): Add case for  X86_XSTATE_AVX_MPX_MASK.
+	(_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
+	* common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
+	(X86_XSTATE_AVX_MPX_MASK): New case.
+	* features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
+	(i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
+	(i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
+	(i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
+	New expedites.
+	* i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
+	include.
+	(i386_linux_core_read_description): Add case
+	X86_XSTATE_AVX_MPX_MASK.
+	(_initialize_i386_linux_tdep): Call
+	initialize_tdesc_i386_avx_mpx_linux.
+	* i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
+	* i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
+	(i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
+	* x86-linux-nat.c (x86_linux_read_description): Add case for
+	X86_XSTATE_AVX_MPX_MASK.
+	* features/i386/amd64-avx-mpx-linux.xml: New file.
+	* features/i386/i386-avx-mpx-linux.xml: New file.
+	* features/i386/i386-avx-mpx.xml: New file.
+	* features/i386/amd64-avx-mpx.xml: New file.
+	* features/i386/amd64-avx-mpx-linux.c: Generated.
+	* features/i386/amd64-avx-mpx.c: Generated.
+	* features/i386/i386-avx-mpx-linux.c: Generated.
+	* features/i386/i386-avx-mpx.c: Generated.
+	* regformats/i386/amd64-avx-mpx-linux.dat: Generated.
+	* regformats/i386/amd64-avx-mpx.dat: Generated.
+	* regformats/i386/i386-avx-mpx-linux.dat: Generated.
+	* regformats/i386/i386-avx-mpx.dat: Generated.
+
+2016-04-18  Pedro Alves  <palves@redhat.com>
+
+	* ptrace.m4 (GDB_AC_PTRACE): Don't run tests in C++ mode.
+	* configure: Regenerate.
+
+2016-04-18  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* valops.c (value_addr): For C++ references, set the copied value's
+	enclosing_type as well.
+
+2016-04-18  Yao Qi  <yao.qi@linaro.org>
+
+	Revert:
+	2016-04-15  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
+	PC is far from the end of function.
+
+2016-04-16  Pedro Alves  <palves@redhat.com>
+
+	* ada-exp.y (yydefred): Define as ada_yydefred.
+
+2016-04-15  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (ada_lookup_struct_elt_type): Constify 'type_str' and
+	'name_str' locals.
+
+2016-04-15  Pedro Alves  <palves@redhat.com>
+
+	* btrace.c (pt_btrace_insn_flags): Change return type to
+	btrace_insn_flags.  Use btrace_insn_flags for local.
+
+2016-04-15  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also
+	accept TRAP_BRKPT.
+	 [__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
+
+2016-04-15  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
+	PC is far from the end of function.
+
+2016-04-14  Pedro Alves  <palves@redhat.com>
+
+	* cli/cli-cmds.c (alias_usage_error): New function.
+	(alias_command): Use it.
+	* ctf.c (ctf_save_metadata_header): Inline metadata_fmt local in
+	ctf_save_write_metadata call.
+
+2016-04-14  Pedro Alves  <palves@redhat.com>
+
+	* ada-typeprint.c (print_fixed_point_type): Don't pass float as
+	argument to function expecting LONGEST.
+	* value.c (unpack_long): Add casts to LONGEST.
+
+2016-04-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* exec.c (exec_file_locate_attach): Guard a couple functions
+	that can throw errors.
+	(exception_print_same): New helper function.
+
+2016-04-13  Pedro Alves  <palves@redhat.com>
+
+	PR remote/19840
+	* remote.c (struct remote_state) <last_resume_exec_dir>: New
+	field.
+	(new_remote_state): Default last_resume_exec_dir to EXEC_FORWARD.
+	(remote_open_1): Reset last_resume_exec_dir to EXEC_FORWARD.
+	(remote_resume): Store the last execution direction.
+	(remote_execution_direction): New function.
+	(init_remote_ops): Install it as to_execution_direction target_ops
+	method.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.h (GDB_XCPT_TRY): Update comment.
+	[__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c (struct catcher) <buf>: Now a
+	'jmp_buf' instead of SIGJMP_BUF.
+	(exceptions_state_mc_init): Change return type to 'jmp_buf'.
+	(throw_exception): Use longjmp instead of SIGLONGJMP.
+	* common/common-exceptions.h: Include <setjmp.h> instead of
+	"gdb_setjmp.h".
+	(exceptions_state_mc_init): Change return type to 'jmp_buf'.
+	[GDB_XCPT == GDB_XCPT_SJMP] (TRY): Use setjmp instead of
+	SIGSETJMP.
+	* cp-support.c: Include "gdb_setjmp.h".
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* common/common-exceptions.c (exception_rethrow): Remove
+	prepare_to_throw_exception call.
+	* common/common-exceptions.h (prepare_to_throw_exception): Delete
+	declaration.
+	* exceptions.c (prepare_to_throw_exception): Delete.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* target.c (target_check_pending_interrupt): Delete.
+	* target.h (struct target_ops) <to_check_pending_interrupt>:
+	Remove method.
+	(target_check_pending_interrupt): Remove declaration.
+	* target-delegates.c: Regenerate.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* defs.h: Update comments on SIGINT handling.
+	(immediate_quit): Delete declaration.
+	* event-loop.c (call_async_signal_handler): Delete.
+	* event-loop.h (call_async_signal_handler): Delete declaration.
+	(mark_async_signal_handler): Update comments.
+	(gdb_call_async_signal_handler): Delete declaration.
+	* event-top.c (handle_sigint): Call mark_async_signal_handler
+	instead of gdb_call_async_signal_handler.
+	* exceptions.c (prepare_to_throw_exception): Remove reference to
+	immediate_quit.
+	(exception_fprintf): Remove comments about immediate_quit.
+	* mingw-hdep.c (sigint_event, sigint_handler): Delete.
+	(gdb_select): Don't wait on sigint_event.
+	(gdb_call_async_signal_handler): Delete.
+	(_initialize_mingw_hdep): Delete.
+	* posix-hdep.c (gdb_call_async_signal_handler): Delete.
+	* utils.c (immediate_quit): Delete.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* defs.h (quit_handler_ftype, quit_handler)
+	(make_cleanup_override_quit_handler, default_quit_handler): New.
+	(QUIT): Adjust comments.
+	* event-top.c (default_quit_handler): New function.
+	(quit_handler): New global.
+	(struct quit_handler_cleanup_data): New.
+	(restore_quit_handler, restore_quit_handler_dtor)
+	(make_cleanup_override_quit_handler): New.
+	(async_request_quit): Call QUIT.
+	* remote.c (struct remote_state) <got_ctrlc_during_io>: New field.
+	(async_sigint_remote_twice_token, async_sigint_remote_token):
+	Delete.
+	(remote_close): Update comments.
+	(remote_start_remote): Don't set immediate_quit.  Set starting_up
+	earlier.
+	(remote_serial_quit_handler, remote_unpush_and_throw): New
+	functions.
+	(remote_open_1): Clear got_ctrlc_during_io.  Set
+	remote_async_terminal_ours_p unconditionally.
+	(async_initialize_sigint_signal_handler)
+	(async_handle_remote_sigint, async_handle_remote_sigint_twice)
+	(remote_check_pending_interrupt, async_remote_interrupt)
+	(async_remote_interrupt_twice)
+	(async_cleanup_sigint_signal_handler, ofunc)
+	(sync_remote_interrupt, sync_remote_interrupt_twice): Delete.
+	(remote_terminal_inferior, remote_terminal_ours): Remove async
+	checks.
+	(remote_wait_as): Don't install a SIGINT handler in sync mode.
+	(readchar, remote_serial_write): Override the quit handler with
+	remote_serial_quit_handler.
+	(getpkt_or_notif_sane_1): Don't call QUIT.
+	(initialize_remote_ops): Don't install
+	remote_check_pending_interrupt.
+	(_initialize_remote): Don't create async_sigint_remote_token and
+	async_sigint_remote_twice_token.
+	* ser-base.c (ser_base_wait_for): Call QUIT and use
+	interruptible_select.
+	(ser_base_write): Call QUIT.
+	* ser-go32.c (dos_readchar, dos_write): Call QUIT.
+	* ser-unix.c (wait_for): Don't use VTIME.  Always take the
+	gdb_select path, but call QUIT and interruptible_select.
+	* utils.c (maybe_quit): Call the current quit handler.  Don't call
+	target_check_pending_interrupt.
+	(defaulted_query, prompt_for_continue): Override the quit handler
+	with the default quit handler.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* tui/tui-hooks.c (tui_target_has_run): Delete.
+	(tui_about_to_proceed): Delete.
+	(tui_about_to_proceed_observer): Delete.
+	(tui_install_hooks, tui_remove_hooks): Don't install/remove an
+	about_to_proceed observer.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* mi/mi-interp.c (mi_new_thread): Put
+	target_terminal_ours_for_output in effect while outputting.
+	(mi_thread_exit): Use target_terminal_ours_for_output instead of
+	target_terminal_ours.
+	(mi_record_changed, mi_inferior_added, mi_inferior_appeared)
+	(mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
+	(mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
+	(mi_breakpoint_created, mi_breakpoint_deleted)
+	(mi_breakpoint_modified, mi_solib_loaded, mi_solib_unloaded)
+	(mi_command_param_changed, mi_memory_changed)
+	(report_initial_inferior): Use target_terminal_ours_for_output
+	instead of target_terminal_ours.  Restore terminal settings.
+	* mi/mi-main.c (mi_execute_command): Use
+	target_terminal_ours_for_output instead of target_terminal_ours.
+	Restore terminal settings.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* gnu-nat.c (inf_validate_task_sc): Don't call
+	target_terminal_ours / target_terminal_inferior around query.
+	* i386-tdep.c (i386_record_lea_modrm, i386_process_record): Don't
+	call target_terminal_ours / target_terminal_inferior around
+	yquery.
+	* linux-record.c (record_linux_system_call): Don't call
+	target_terminal_ours / target_terminal_inferior around yquery.
+	* nto-procfs.c (interrupt_query): Don't call target_terminal_ours
+	/ target_terminal_inferior around query.
+	* record-full.c (record_full_check_insn_num): Remove
+	'set_terminal' parameter.  Don't call target_terminal_ours /
+	target_terminal_inferior around query.
+	(record_full_message, record_full_registers_change)
+	(record_full_xfer_partial): Adjust.
+	* remote.c (interrupt_query): Don't call target_terminal_ours /
+	target_terminal_inferior around query.
+	* utils.c (defaulted_query): Install cleanup to restore target
+	terminal.  Put target_terminal_ours_for_output in effect while
+	defaulted producing, and target_terminal_ours in in effect while
+	handling input.
+	(prompt_for_continue): Install cleanup to restore target terminal.
+	Put target_terminal_ours in in effect while handling input.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* utils.c (defaulted_query, prompt_for_continue): Free temporary
+	strings with cleanups, instead of xfree.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* utils.c (vwarning, internal_vproblem): Use
+	make_cleanup_restore_target_terminal and
+	target_terminal_ours_for_output.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* infcmd.c (post_create_inferior, prepare_one_step): Use
+	target_terminal_ours_for_output instead of target_terminal_ours.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* exceptions.c (print_flush): Use target_terminal_ours_for_output
+	instead of target_terminal_ours, and restore target terminal with
+	a cleanup.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* cp-support.c (gdb_demangle): Use target_terminal_ours_for_output
+	instead of target_terminal_ours, and restore target terminal with
+	a cleanup.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* ada-lang.c (type_as_string, type_as_string_and_cleanup): New
+	functions.
+	(ada_lookup_struct_elt_type): Use type_as_string_and_cleanup.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* ser-base.c (fd_event): Retry read_prim on EINTR.
+	(do_ser_base_readchar): Retry read_prim on EINTR.
+	(ser_base_write): Retry write_prim on EINTR.
+	* ser-unix.c (ser_unix_read_prim): Don't retry on EINTR here.
+	(ser_unix_write_prim): Remove comment.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* remote.c (remote_pass_ctrlc): New function.
+	(init_remote_ops): Install it.
+	* target.c (target_terminal_inferior): Pass pending Ctrl-C to the
+	target.
+	(target_pass_ctrlc, default_target_pass_ctrlc): New functions.
+	* target.h (struct target_ops) <to_pass_ctrlc>: New method.
+	(target_pass_ctrlc, default_target_pass_ctrlc): New declarations.
+	* target-delegates.c: Regenerate.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* infcmd.c (interrupt_target_1): Call target_stop is in non-stop
+	mode.
+	* linux-nat.c (linux_nat_interrupt): Delete.
+	(linux_nat_add_target): Don't install linux_nat_interrupt.
+	* remote.c (remote_interrupt_ns): Change return type to void.
+	Throw error if interrupting the target is not supported.
+	(remote_interrupt): Don't call the remote_stop_ns/remote_stop_as.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* defs.h (clear_quit_flag): Remove declaration.
+	* extension-priv.h (struct extension_language_ops)
+	<clear_quit_flag>: Remove field and update comments.
+	* extension.c (clear_quit_flag): Delete.
+	* guile/guile.c (guile_extension_ops): Adjust.
+	* python/python.c (python_extension_ops): Adjust.
+	(gdbpy_clear_quit_flag): Delete.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* main.c (captured_main): Don't clear the quit flag.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* exceptions.c (prepare_to_throw_exception): Don't clear the quit
+	flag.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (command_handler): Don't call clear_quit_flag.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag.
+	* remote.c (remote_wait_as): Don't call clear_quit_flag.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* python/python.c: Include "ser-event.h".
+	(gdbpy_event_fds): Delete.
+	(gdbpy_serial_event): New.
+	(gdbpy_run_events): Change prototype.  Use serial_event_clear
+	instead of serial_readchar.
+	(gdbpy_post_event): Use serial_event_set instead of serial_write.
+	(gdbpy_initialize_events): Use make_serial_event instead of
+	serial_pipe.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* defs.h: Extend QUIT-related comments to mention
+	interruptible_select.
+	(quit_serial_event_set, quit_serial_event_clear): Declare.
+	* event-top.c: Include "ser-event.h" and "gdb_select.h".
+	(quit_serial_event): New global.
+	(async_init_signals): Make quit_serial_event.
+	(quit_serial_event_set, quit_serial_event_clear)
+	(quit_serial_event_fd, interruptible_select): New functions.
+	* extension.c (set_quit_flag): Set the quit serial event.
+	(check_quit_flag): Clear the quit serial event.
+	* gdb_select.h (interruptible_select): New declaration.
+	* guile/scm-ports.c (ioscm_input_waiting): Use
+	interruptible_select instead of gdb_select.
+	* top.c (gdb_readline_no_editing): Likewise.
+	* ui-file.c (stdio_file_read): Likewise.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c: Include "ser-event.h".
+	(async_signal_handlers_serial_event): New global.
+	(async_signals_handler, initialize_async_signal_handlers): New
+	functions.
+	(mark_async_signal_handler): Set
+	async_signal_handlers_serial_event.
+	(invoke_async_signal_handlers): Clear
+	async_signal_handlers_serial_event.
+	* event-top.c (async_init_signals): Call
+	initialize_async_signal_handlers.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (SFILES): Add ser-event.c.
+	(HFILES_NO_SRCDIR): Add ser-event.h.
+	(COMMON_OBS): Add ser-event.o.
+	* ser-event.c, ser-event.h: New files.
+	* serial.c (new_serial): New function, factored out from
+	(serial_fdopen_ops): ... this.
+	(serial_open_ops_1): New function, factored out from
+	(serial_open): ... this.
+	(serial_open_ops): New function.
+	* serial.h (struct serial): Forware declare.
+	(serial_open_ops): New declaration.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* serial.c (serial_open, serial_fdopen_ops, do_serial_close):
+	Remove references to name.
+	* serial.h (struct serial) <name>: Delete.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* remote-fileio.c (sigint_fileio_token, remote_fio_no_longjmp):
+	Delete.
+	(async_remote_fileio_interrupt): Delete.
+	(remote_fileio_ctrl_c_signal_handler): Don't call the async signal
+	handler.  Instead just always set the ctrl_c flag.
+	(remote_fileio_reply): Clear remote_fio_ctrl_c_flag before
+	re-enabling the SIGINT handler.
+	(remote_fileio_func_open, remote_fileio_func_close)
+	(remote_fileio_func_read, remote_fileio_func_write)
+	(remote_fileio_func_lseek, remote_fileio_func_rename)
+	(remote_fileio_func_unlink, remote_fileio_func_stat)
+	(remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
+	(remote_fileio_func_isatty, remote_fileio_func_system)
+	(remote_fileio_request): Remove references to
+	remote_fio_no_longjmp.
+	(initialize_remote_fileio): Don't create an async signal handler.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (stdin_event_handler): Call QUIT;
+	(prompt_for_continue): Don't run with immediate_quit set.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* tui/tui-io.c (tui_redisplay_readline): Check
+	gdb_in_secondary_prompt_p instead of immediate_quit.
+	* tui/tui.c: Include top.h.
+	(tui_rl_startup_hook): Check gdb_in_secondary_prompt_p instead of
+	immediate_quit.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* top.c (read_command_file): Inline command_loop here.
+	(command_loop): Delete.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* top.c: Include "gdb_select.h".
+	(gdb_readline_no_editing): Wait for input with gdb_select instead
+	of blocking in fgetc.
+	(command_line_input): Don't set immediate_quit.
+
+2016-04-08  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* value.c (value_next): Make pass-by-reference parameters const-correct.
+	(value_parent): Likewise.
+	(value_enclosing_type): Likewise.
+	(value_lazy): Likewise.
+	(value_stack): Likewise.
+	(value_embedded_offset): Likewise.
+	(value_pointed_to_offset): Likewise.
+	(value_raw_address): Likewise.
+	(deprecated_value_modifiable): Likewise.
+	(value_free_to_mark): Likewise.
+	(value_release_to_mark): Likewise.
+	(internalvar_name): Likewise.
+	(readjust_indirect_value_type): Likewise.
+	(value_initialized): Likewise.
+	* value.h (value_next): Likewise.
+	(value_parent): Likewise.
+	(value_enclosing_type): Likewise.
+	(value_lazy): Likewise.
+	(value_stack): Likewise.
+	(value_embedded_offset): Likewise.
+	(value_pointed_to_offset): Likewise.
+	(value_raw_address): Likewise.
+	(deprecated_value_modifiable): Likewise.
+	(value_free_to_mark): Likewise.
+	(value_release_to_mark): Likewise.
+	(internalvar_name): Likewise.
+	(readjust_indirect_value_type): Likewise.
+	(value_initialized): Likewise.
+
+2016-04-07  Yao Qi  <yao.qi@linaro.org>
+
+	* record-full.c (record_full_insert_breakpoint): Return
+	early if entry on the address is found in
+	record_full_breakpoints.
+
+2016-04-07  Yao Qi  <yao.qi@linaro.org>
+
+	* record-full.c (record_full_insert_breakpoint): Set
+	bp_tgt->reqstd_address and bp_tgt->placed_size.
+
+2016-04-06  Don Breazeal  <donb@codesourcery.com>
+
+	* value.c (value_actual_type): Don't try to get rtti type
+	of the value if it has been optimized out.
+	(value_optimized_out): If a memory access error occurs,
+	just check vaue->optimized_out.
+
+2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert the previous commit adding unknown_v_replies_ok.
+
+2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* remote.c (struct remote_state): New field unknown_v_replies_ok.
+	(packet_config_support): Read it.
+	(remote_start_remote): Set it.
+
+2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* remote.c: Revert check-in by a mistake in the previous commit.
+
+2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* exec.c (exec_file_locate_attach): Print warning for unsupported
+	target_pid_to_exec_file.
+	* symfile-mem.c (add_vsyscall_page): Remove the "file" command
+	message part.
+
+2016-04-04  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* cli/cli-decode.c (help_cmd_list): Fix function doc and remove
+	trailing spaces.
+
+2016-04-01  Artemiy Volkov  <artemiyv@acm.org>
+
+	PR gdb/19820
+	* eval.c (evaluate_subexp_standard): Allow TYPE_CODE_ENUM to be
+        the type of BINOP_REPEAT's second operand.
+
+2016-03-31  Yichao Yu  <yyc1992@gmail.com>
+
+	PR gdb/19858
+	* jit.c (jit_breakpoint_re_set_internal): Return 0 if we already
+	got the breakpoint at the right address.
+	(jit_inferior_created): New function.
+	(_initialize_jit): Install jit_inferior_created as
+	inferior_created observer.
+
+2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* NEWS: Mention support for tracepoints on powerpc*-linux.
+
+2016-03-31  Catalin Udma  <catalin.udma@freescale.com>
+
+	PR python/19743
+	* python/python.c (execute_gdb_command): Use console uiout
+	when executing gdb command.
+	* utils.c (restore_ui_out_closure): New structure.
+	(do_restore_ui_out): New function.
+	(make_cleanup_restore_ui_out): Likewise.
+	* utils.h (make_cleanup_restore_ui_out): Declare.
+
+2016-03-31  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that support for "target m32rsdi", "target mips",
+	"target pmon", "target ddb", "target rockhopper", and "target lsi"
+	was removed.
+	* Makefile.in (ALL_TARGET_OBS): Remove remote-m32r-sdi.o and
+	remote-mips.o.
+	(ALLDEPFILES): Remove remote-m32r-sdi.c and remote-mips.c.
+	* configure.tgt: Remove all references to remote-m32r-sdi.o and
+	remote-mips.o.
+	* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Delete
+	function.
+	* mips-tdep.h (deprecated_mips_set_processor_regs_hack): Delete
+	declaration.
+	* remote-m32r-sdi.c, remote-mips.c: Delete files.
+	* symfile.c (generic_load, generic_load): Remove comments.
+
+2016-03-30  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
+	0 rather than NULL.
+
+2016-03-30  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
+	(arm_epilogue_frame_this_id): New function.
+	(arm_epilogue_frame_prev_register): New function.
+	(arm_epilogue_frame_sniffer): New function.
+	(arm_epilogue_frame_unwind): New.
+	(arm_gdbarch_init): Append unwinder arm_epilogue_frame_unwind.
+
+2016-03-30  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_stack_frame_destroyed_p): Rename it ...
+	(arm_stack_frame_destroyed_p_1): ... here.  Don't call
+	arm_pc_is_thumb.
+	(arm_stack_frame_destroyed_p): Call
+	thumb_stack_frame_destroyed_p and
+	arm_stack_frame_destroyed_p_1.
+
+2016-03-30  Doug Evans  <dje@google.com>
+
+	* python/py-utils.c (host_string_to_python_string): New function.
+	* python/python-internal.h (host_string_to_python_string): Declare it.
+	* python/py-*.c (*): Update all calls to
+	PyString_Decode (str, strlen (str), host_charset (), NULL);
+	to use host_string_to_python_string instead.
+
+2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* remote.c (remote_check_symbols): Allocate own buffer for reply.
+
+2016-03-29  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* xtensa-tdep.c (xtensa_frame_cache): Change op1 type to LONGEST.
+	Use safe_read_memory_integer instead of read_memory_integer.
+
+2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* NEWS: Mention support for tracepoints on s390*-linux.
+
+2016-03-29  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb/value.c (value_actual_type): Fix formatting issue.
+
+2016-03-23  Yao Qi  <yao.qi@linaro.org>
+
+	* gdbarch.sh (software_single_step): Remove comments.
+	* gdbarch.h: Regenerated.
+
+2016-03-21  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_record_media): New.
+	(arm_record_ld_st_reg_offset): Call arm_record_media.
+
+2016-03-21  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_canonicalize_syscall): Canonicalize
+	more syscalls.
+
+2016-03-18  Yao Qi  <yao.qi@linaro.org>
+
+	* sparc-tdep.c (sparc_software_single_step): Make it static.
+	* sparc-tdep.h (sparc_software_single_step): Remove declaration.
+
+2016-03-18  Yao Qi  <yao.qi@linaro.org>
+
+	* spu-tdep.c (spu_software_single_step): Throw error when
+	target_read_memory fails.
+
+2016-03-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linux-thread-db.c (check_pid_namespace_match): Extend the message.
+
+2016-03-17  Pedro Alves  <palves@redhat.com>
+	    Don Breazeal  <donb@codesourcery.com>
+
+	PR remote/19496
+	* infcmd.c (notice_new_inferior): Use the 'leave_running' argument
+	instead of checking the 'non_stop' global.
+	* remote.c (remote_add_thread): New parameter 'executing'.  Use it
+	to set the new thread's executing state.
+	(remote_notice_new_inferior): Rename parameter 'running' to
+	'executing'.  Always set the thread state to THREAD_RUNNING in
+	non-stop mode, and to THREAD_STOPPED in all-stop mode.  Pass
+	EXECUTING to remote_add_thread and notice_new_inferior.
+	(remote_update_thread_list): Update to pass executing state, not
+	running state.
+
+2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* syscalls/s390-linux.xml: Add NUMA syscalls and new syscalls up
+	to 374.
+	* syscalls/s390x-linux.xml: Likewise.
+
+2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-record.c (record_mem_at_reg): New helper function.
+	(record_linux_system_call): Exploit new helper function where
+	applicable.
+
+2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-record.c: Fix whitespace issues; tabify, remove trailing
+	spaces.
+
+2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-record.c (record_linux_system_call): Add missing return
+	statements to handling of pipe and pipe2 syscalls.
+
+2016-03-16  Doug Evans  <dje@google.com>
+
+	* xml-tdesc.c (tdesc_start_enum): Fix c++ build.
+
+2016-03-16  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_init_abi): Fix
+	arm_linux_record_tdep.arg1, arm_linux_record_tdep.arg2 and
+	arm_linux_record_tdep.arg3.  Set arm_linux_record_tdep.arg4,
+	arm_linux_record_tdep.arg5, arm_linux_record_tdep.arg6, and
+	arm_linux_record_tdep.arg7.
+
+2016-03-15  Keith Seitz  <keiths@redhat.com>
+
+	PR breakpoints/18303
+	* cp-namespace.c (cp_lookup_bare_symbol): Change assertion to
+	look for "::" instead of simply ":".
+	(cp_search_static_and_baseclasses): Return null_block_symbol for
+	malformed input.
+	Remove assertions.
+	* cp-support.c (cp_find_first_component_aux): Do not return
+	a prefix length for ':' unless the next character is also ':'.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* features/aarch64-core.xml (cpsr_flags): New flags type.
+	(cpsr): Use it.
+	* features/aarch64.c: Regenerate.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* features/i386/32bit-core.xml (i386_eflags): Remove "end" spec.
+	* features/i386/32bit-sse.xml (i386_eflags): Ditto.
+	* features/i386/64bit-core.xml (i386_eflags): Ditto.
+	* features/i386/64bit-sse.xml (i386_eflags): Ditto.
+	* features/i386/x32-core.xml (i386_eflags): Ditto.
+
+2016-03-15  Doug Evans  <dje@google.com>
+	    Wei-cheng Wang  <cole945@gmail.com>
+
+	Extend flags to support multibit and enum bitfields.
+	* NEWS: Document new features.
+	* c-typeprint.c (c_type_print_varspec_prefix): Handle TYPE_CODE_FLAGS.
+	(c_type_print_varspec_suffix, c_type_print_base): Ditto.
+	* gdbtypes.c (arch_flags_type): Don't assume all fields are one bit.
+	(append_flags_type_field): New function.
+	(append_flags_type_flag): Call it.
+	* gdbtypes.h (append_flags_type_field): Declare.
+	* target-descriptions.c (struct tdesc_type_flag): Delete.
+	(enum tdesc_type_kind) <TDESC_TYPE_BOOL>: New enum value.
+	(enum tdesc_type_kind) <TDESC_TYPE_ENUM>: Ditto.
+	(struct tdesc_type) <u.f>: Delete.
+	(tdesc_predefined_types): Add "bool".
+	(tdesc_predefined_type): New function.
+	(tdesc_gdb_type): Handle TDESC_TYPE_BOOL, TDESC_TYPE_ENUM.
+	Update TDESC_TYPE_FLAGS support.
+	(tdesc_free_type): Handle TDESC_TYPE_ENUM.  Update TDESC_TYPE_FLAGS.
+	(tdesc_create_flags): Update.
+	(tdesc_create_enum): New function.
+	(tdesc_add_field): Initialize start,end to -1.
+	(tdesc_add_typed_bitfield): New function.
+	(tdesc_add_bitfield): Call it.
+	(tdesc_add_flag): Allow TDESC_TYPE_STRUCT.  Update.
+	(tdesc_add_enum_value): New function.
+	(maint_print_c_tdesc_cmd): Fold TDESC_TYPE_FLAGS support into
+	TDESC_TYPE_STRUCT.  Handle TDESC_TYPE_ENUM.
+	* target-descriptions.h (tdesc_create_enum): Declare.
+	(tdesc_add_typed_bitfield, tdesc_add_enum_value): Declare.
+	* valprint.c (generic_val_print_enum_1): New function.
+	(generic_val_print_enum): Call it.
+	(val_print_type_code_flags): Make static.  Handle multibit bitfields
+	and enum bitfields.
+	* valprint.h (val_print_type_code_flags): Delete.
+	* xml-tdesc.c (struct tdesc_parsing_data) <current_type_is_flags>:
+	Delete.  All uses removed.
+	(tdesc_start_enum): New function.
+	(tdesc_start_field): Handle multibit and enum bitfields.
+	(tdesc_start_enum_value): New function.
+	(enum_value_attributes, enum_children, enum_attributes): New static
+	globals.
+	(feature_children): Add "enum".
+	* features/gdb-target.dtd (enum, evalue): New elements.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* target-descriptions.c (struct tdesc_type) <u.u.size>: Change type
+	from LONGEST to int.
+	(struct tdesc_type) <u.f.size>: Ditto.
+	(tdesc_set_struct_size): Change type of "size" arg from LONGEST
+	to int.  Add assertion size > 0.
+	(tdesc_create_flags): Ditto.
+	* target-descriptions.h (tdesc_set_struct_size): Update.
+	(tdesc_create_flags): Update.
+	* xml-tdesc.c (MAX_FIELD_SIZE, MAX_FIELD_BITSIZE): New macros.
+	(MAX_VECTOR_SIZE): New macro.
+	(tdesc_start_struct): Catch conversion errors from LONGEST to int.
+	(tdesc_start_flags, tdesc_start_field, tdesc_start_vector): Ditto.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* target-descriptions.c (maint_print_c_tdesc_cmd): Use "type" for
+	TYPE_CODE_FLAGS instead of "field_type", for consistency.
+	* features/i386/amd64-avx-linux.c: Regenerate.
+	* features/i386/amd64-avx.c: Regenerate.
+	* features/i386/amd64-avx512-linux.c: Regenerate.
+	* features/i386/amd64-avx512.c: Regenerate.
+	* features/i386/amd64-linux.c: Regenerate.
+	* features/i386/amd64-mpx-linux.c: Regenerate.
+	* features/i386/amd64-mpx.c: Regenerate.
+	* features/i386/amd64.c: Regenerate.
+	* features/i386/i386-avx-linux.c: Regenerate.
+	* features/i386/i386-avx.c: Regenerate.
+	* features/i386/i386-avx512-linux.c: Regenerate.
+	* features/i386/i386-avx512.c: Regenerate.
+	* features/i386/i386-linux.c: Regenerate.
+	* features/i386/i386-mmx-linux.c: Regenerate.
+	* features/i386/i386-mmx.c: Regenerate.
+	* features/i386/i386-mpx-linux.c: Regenerate.
+	* features/i386/i386-mpx.c: Regenerate.
+	* features/i386/i386.c: Regenerate.
+	* features/i386/x32-avx-linux.c: Regenerate.
+	* features/i386/x32-avx.c: Regenerate.
+	* features/i386/x32-avx512-linux.c: Regenerate.
+	* features/i386/x32-avx512.c: Regenerate.
+	* features/i386/x32-linux.c: Regenerate.
+	* features/i386/x32.c: Regenerate.
+
+2016-03-15  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19676
+	* linux-thread-db.c (try_thread_db_load_1): Leave
+	info->td_ta_thr_iter_p NULL iff debugging a live process and we
+	have /proc access.
+	(find_new_threads_once): Assert that we have a non-NULL
+	info->td_ta_thr_iter_p instead of checking whether the target has
+	execution.
+
+2016-03-15  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19676
+	* infrun.c (displaced_step_prepare): Also disable displaced
+	stepping on NOT_SUPPORTED_ERROR.
+	* linux-tdep.c (linux_displaced_step_location): If reading auxv
+	fails, throw NOT_SUPPORTED_ERROR instead of generic error.
+
+2016-03-13  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* s390-linux-tdep.c (s390_gen_return_address): New function.
+	(s390_gdbarch_init): Fill gen_return_address hook.
+
+2016-03-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* symmisc.c (maintenance_info_line_tables): New function.
+	(maintenance_print_one_line_table): New function.
+	(_initialize_symmisc): Register 'maint info line-table' command.
+	* NEWS: Mention new command.
+
+2016-03-11  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* s390-linux-tdep.c (s390_ax_pseudo_register_collect): New function.
+	(s390_ax_pseudo_register_push_stack): New function.
+	(s390_gdbarch_init): Fill ax_pseudo_register_collect and
+	ax_pseudo_register_push_stack hooks.
+
+2016-03-10  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* data-directory/Makefile.in (PYTHON_FILE_LIST): Install
+	gdb/function/as_string.py.
+	* python/lib/gdb/function/as_string.py: New file.
+	* NEWS: Mention the new $_as_string function.
+
+2016-03-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* target.h: Fix doc string of target_can_use_hardware_watchpoint.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (more_to_come): Delete.
+	(struct readline_input_state): Delete.
+	(readline_input_state): Delete.
+	(get_command_line_buffer): New function.
+	(command_handler): Update comments.  Don't handle NULL commands
+	here.  Do not execute commented lines.
+	(command_line_append_input_line): New function.
+	(handle_line_of_input): New function, partly based on
+	command_line_handler and command_line_input.
+	(command_line_handler): Rewrite.
+	* event-top.h (command_handler): New declaration.
+	(command_loop): Defer command execution to command_handler.
+	(command_line_input): Update comments.  Simplify, using struct
+	buffer and handle_line_of_input.
+	* top.h (struct buffer): New forward declaration.
+	(handle_line_of_input): New declaration.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (command_line_handler): Use xfree + xstrdup instead
+	of xrealloc + strcpy.
+	* main.c (captured_main): Use xstrdup instead of xmalloc plus
+	manual clear.
+	* top.c (saved_command_line): Rewrite comment.
+	(saved_command_line_size): Delete.
+	(command_line_input): Use xfree + xstrdup instead of xrealloc +
+	strcpy.
+	* top.h (saved_command_line_size): Delete declaration.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c: Include buffer.h.
+	(gdb_readline_no_editing_callback): Use struct buffer instead
+	of xrealloc.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* common/buffer.h (buffer_grow_char): New function.
+	* top.c: Include buffer.h.
+	(gdb_readline_no_editing): Rename 'prompt_arg' parameter to
+	'prompt'.  Use struct buffer instead of xrealloc.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* defs.h (gdb_readline): Delete declaration.
+	* top.c (gdb_readline): Rename to ...
+	(gdb_readline_no_editing): ... this, and make static.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* utils.c (prompt_for_continue): Update comments.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (async_annotation_suffix): Delete.
+	(top_level_prompt, command_line_handler): Don't use
+	'async_annotation_suffix' and simplify.
+	* event-top.h (async_annotation_suffix): Delete declaration.
+	(init_main): Remove reference to 'async_annotation_suffix'.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* event-top.c (gdb_readline2): Rename to ...
+	(gdb_readline_no_editing_callback): ... this.
+	(change_line_handler, stdin_event_handler)
+	(gdb_setup_readline): Adjust.
+	* event-top.h (gdb_readline2): Rename to ...
+	(gdb_readline_no_editing_callback): ... this, and move closer to
+	other readline-related declarations.
+	* mi/mi-interp.c (mi_interpreter_resume): Adjust.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* top.c (window_hook): Delete.
+	(command_loop): Remove references to window_hook.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* corefile.c (safe_read_memory_unsigned_integer): New function.
+	* gdbcore.h (safe_read_memory_unsigned_integer): New prototype.
+	* rs6000-tdep.c (rs6000_frame_cache): Read backchain as unsigned.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* rs6000-tdep.c: Add "ax.h" and "ax-gdb.h" includes.
+	(rs6000_gen_return_address): New function.
+	(rs6000_gdbarch_init): Wire in the above.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* rs6000-tdep.c (rs6000_ax_pseudo_register_collect): New function.
+	(rs6000_gdbarch_init): Wire in the above.
+
+2016-03-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_analyze_prologue): Ignore BRC and BRCL
+	instructions that do nothing or are conditional traps.
+
+2016-03-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_prologue_frame_unwind_cache): Store
+	frame func's PC in info->func before any other failure can occur.
+	(s390_frame_this_id): Use frame_id_build_unavailable_stack if
+	info->func has been filled out.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* osabi.c (gdb_osabi_names): Avoid spaces in osabi names.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* frv-tdep.c (frv_gdbarch_init): Handle bfd_mach_fr300.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* cris-tdep.c (cris_gdbarch_init): Return 0 if the info's byte
+	order is BFD_ENDIAN_BIG or if the cris version is unsupported.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* doublest.c: Extend comments.
+	(floatformat_to_doublest, floatformat_from_doublest): Copy the
+	floatformat's total size, not the host type's size.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* doublest.c (floatformat_totalsize_bytes): New function.
+	(floatformat_from_type): Assert that the type's length is at least
+	as long as the floatformat's totalsize.
+	* doublest.h (floatformat_totalsize_bytes): New declaration.
+	* gdbtypes.c (arch_float_type): Assert that the type's length is
+	at least as long as the floatformat's totalsize.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* hppa-linux-tdep.c (hppa_linux_init_abi): Set the long double
+	format to floatformats_ieee_double.
+
+2016-03-07  Pedro Alves  <palves@redhat.com>
+
+	* mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL
+	before calling bfd_get_flavour.
+
+2016-03-05  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
+
+	* avr-tdep.c (AVR_LAST_ARG_REGNUM): Define.
+	(avr_push_dummy_call): Correct last needed argument register.
+	Write MSB of argument into register and subsequent bytes into
+	other registers in decreasing order.
+
+2016-03-04  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_record_vdata_transfer_insn): Simplify the
+	condition check.  Record the right D register number.
+
+2016-03-04  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_record_extension_space): Remove code
+	printing "Process record does not support".
+	(arm_record_data_proc_misc_ld_str): Likewise.
+	(decode_insn): Call arm_record_extension_space if condition
+	is 0xf.  Call arm_record_unsupported_insn if ret isn't
+	ARM_RECORD_SUCCESS.  Use 'ret' instead of 'insn_id' to hold
+	the value of thumb2_record_decode_insn_handler.
+
+2016-03-04  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* features/feature_to_c.sh: Print the help when passing no
+	argument.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* MAINTAINERS (Write After Approval): Add Bernhard Heckel.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.
+
+2016-03-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* s390-linux-tdep.c (s390_backchain_frame_unwind_cache): Avoid
+	exception when attempting to access the inferior's backchain.
+
+2016-02-29  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Support
+	eventfd2, eventfd2, dup3, inotify_init1, fallocate and pipe2.
+	Return gdb_sys_epoll_create1 instead of gdb_sys_epoll_create
+	for aarch64_sys_epoll_create1.
+
+2016-02-29  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-record.h (enum gdb_syscall) <gdb_sys_fallocate>: New.
+	<gdb_sys_eventfd2, gdb_sys_epoll_create1, gdb_sys_dup3>: New.
+	<gdb_sys_pipe2, gdb_sys_inotify_init1>: New.
+	* linux-record.c (record_linux_system_call): Handle them.
+
+2016-02-28  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from
+	cyclic imports.
+
+2016-02-26  Keith Seitz  <keiths@redhat.com>
+
+	* rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result
+	to avoid invalid conversion from void *.
+
+2016-02-26  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (arm_record_exreg_ld_st_insn): Set 'single_reg'
+	per bit 8.  Check bit 20 instead of bit 4 for VMOV
+	instruction.  Record D registers for instructions changing
+	S registers.  Change of the order of length and address
+	in record_buf_mem array.
+
+2016-02-26  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c (thumb_record_ld_st_reg_offset): Fix the register
+	number of Rd.
+
+2016-02-25  Doug Evans  <dje@google.com>
+
+	* remote-m32r-sdi.c (recv_char_data): Initialize val to avoid
+	compiler warning.
+	(recv_long_data): Ditto.
+
+2016-02-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* i386-linux-tdep.c (i386_linux_handle_segmentation_fault):
+	Initialize variables.
+
+2016-02-25  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* ax-general.c (ax_reg): Call gdbarch_remote_register_number.
+	(ax_reg_mask): Likewise.
+
+2016-02-24  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (save_sigtrap) Delete.
+	(stop_wait_callback): Call save_stop_reason instead of
+	save_sigtrap.
+	(check_stopped_by_breakpoint): Rename to ...
+	(save_stop_reason): ... this.  Bits of save_sigtrap folded here.
+	Use GDB_ARCH_IS_TRAP_HWBKPT and handle ambiguous
+	GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.  Factor out
+	common code between the USE_SIGTRAP_SIGINFO and
+	!USE_SIGTRAP_SIGINFO blocks.
+	(linux_nat_filter_event): Call save_stop_reason instead of
+	save_sigtrap.
+	* nat/linux-ptrace.h: Check for both SI_KERNEL and TRAP_BRKPT
+	si_code for MIPS.
+	* nat/linux-ptrace.h: Fix "TRAP_HWBPT" typo in x86 table.  Add
+	comments on MIPS behavior.
+	(GDB_ARCH_IS_TRAP_HWBKPT): Define for all archs.
+
+2016-02-24  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0
+	to avoid spurious warnings.
+
+2016-02-24  Gary Benson  <gbenson@redhat.com>
+
+	* exec.c (exec_file_locate_attach): Do not attempt to
+	locate main executable locally if not found in sysroot.
+
+2016-02-24  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.11 released.
+
+2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
+
+	* rs6000-tdep.c (rs6000_frame_cache, rs6000_frame_this_id): Handle
+	unavailable PC/SP to build unavailable frame.
+
+2016-02-23  Doug Evans  <dje@google.com>
+
+	Extend "skip" command to support -file, -gfile, -function, -rfunction.
+	* NEWS: Document new features.
+	* skip.c: #include "fnmatch.h", "gdb_regex.h".
+	(skiplist_entry) <file>: Renamed from filename.
+	<function>: Renamed from function_name.
+	<file_is_glob, function_is_regexp>: New members.
+	<compiled_function_regexp, compiled_function_regexp_is_valid>:
+	New members.
+	(make_skip_entry): New function.
+	(free_skiplist_entry, free_skiplist_entry_cleanup): New functions.
+	(make_free_skiplist_entry_cleanup): New function.
+	(skip_file_command): Update.
+	(skip_function, skip_function_command): Update.
+	(compile_skip_regexp): New functions.
+	(skip_command): Add support for new options.
+	(skip_info): Update.
+	(skip_file_p, skip_gfile_p): New functions.
+	(skip_function_p, skip_rfunction_p): New functions.
+	(function_name_is_marked_for_skip): Update and simplify.
+	(_initialize_step_skip): Update.
+	* symtab.c: #include "fnmatch.h".
+	(compare_glob_filenames_for_search): New function.
+	* symtab.h (compare_glob_filenames_for_search): Declare.
+	* utils.c (count_path_elements): New function.
+	(strip_leading_path_elements): New function.
+	* utils.h (count_path_elements): Declare.
+	(strip_leading_path_elements): Declare.
+
+2016-02-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-tdep.c (arm_decode_svc_copro): Remove "to" parameter.
+	(thumb_process_displaced_insn): Likewise.
+	(arm_process_displaced_insn): Adjust calls.
+
+2016-02-23  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-linux-tdep.c (enum aarch64_syscall) <aarch64_sys_mknod>:
+	Remove.
+	<aarch64_sys_mkdir, aarch64_sys_unlink, aarch64_sys_symlink>: Remove.
+	<aarch64_sys_link, aarch64_sys_rename, aarch64_sys_faccess>: Remove.
+	<aarch64_sys_mknodat, aarch64_sys_mkdirat>: New.
+	<aarch64_sys_unlinkat, aarch64_sys_symlinkat>: New.
+	<aarch64_sys_linkat, aarch64_sys_renameat>: New.
+	<aarch64_sys_faccessat>: New.
+	<aarch64_sys_open, aarch64_sys_readlink, aarch64_sys_fstatat>: Remove.
+	<aarch64_sys_openat, aarch64_sys_readlinkat>: New.
+	<aarch64_sys_newfstatat>: New.
+	(UNSUPPORTED_SYSCALL_MAP): New macro.
+	(aarch64_canonicalize_syscall): Add missing syscalls.
+
+2016-02-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
+
+2016-02-22  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-tdep.c: Fix code format issues.
+
+2016-02-21  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* d-namespace.c (d_lookup_symbol_imports): Remove argument
+	'search_parents'.  All callers updated.
+
+2016-02-18  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* s390-linux-tdep.c (s390_guess_tracepoint_registers): New function.
+	(s390_gdbarch_init): Fill guess_tracepoint_registers hook.
+
+2016-02-18  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* NEWS: Add entry for bound violation.
+	* amd64-linux-tdep.c (amd64_linux_init_abi_common):
+	Add handler for segmentation fault.
+	* gdbarch.sh (handle_segmentation_fault): New.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+	* i386-linux-tdep.c (i386_linux_handle_segmentation_fault): New.
+	(SIG_CODE_BONDARY_FAULT): New define.
+	(i386_linux_init_abi): Use i386_mpx_bound_violation_handler.
+	* i386-linux-tdep.h (i386_linux_handle_segmentation_fault) New.
+	* i386-tdep.c (i386_mpx_enabled): Add as external.
+	* i386-tdep.c (i386_mpx_enabled): Add as external.
+	* infrun.c (handle_segmentation_fault): New function.
+	(print_signal_received_reason): Use handle_segmentation_fault.
+
+2016-02-18  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* arch-utils.c (default_guess_tracepoint_registers): New function.
+	* arch-utils.h (default_guess_tracepoint_registers): New prototype.
+	* gdbarch.c: Regenerate.
+	* gdbarch.h: Regenerate.
+	* gdbarch.sh: Add guess_tracepoint_registers hook.
+	* tracefile.c (tracefile_fetch_registers): Use the new gdbarch hook.
+
+2016-02-17  Gary Benson  <gbenson@redhat.com>
+
+	* exec.c (exec_file_locate_attach): Add missing cleanup.
+
+2016-02-16  Don Breazeal  <donb@codesourcery.com>
+
+	PR remote/19496
+	* remote.c (remove_new_fork_children): Check for pending
+	fork status in thread_info.suspend.
+
+2016-02-16  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_software_single_step): Assign
+	'old_chain' later.
+
+2016-02-16  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.h (struct arm_get_next_pcs_ops)
+	<syscall_next_pc>: Remove argument PC.  Callers updated.
+	* arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
+	Remove argument PC.  Get pc from regcache_read_pc.
+	* arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Remove
+	argument PC.
+
+2016-02-15  Yao Qi  <yao.qi@linaro.org>
+
+	* aarch64-tdep.c (aarch64_analyze_prologue): Remove "0x".
+
+2016-02-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-linux.c (arm_linux_get_next_pcs_fixup): Calculate
+	nextpc according to instruction.
+
+2016-02-12  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.c (arm_get_next_pcs): Call
+	self->ops->fixup if it isn't NULL.
+	* arch/arm-get-next-pcs.h: Include gdb_vecs.h.
+	(struct arm_get_next_pcs_ops) <fixup>: New field.
+	* arch/arm-linux.c: Include common-regcache.h and
+	arch/arm-get-next-pcs.h.
+	(arm_linux_get_next_pcs_fixup): New function.
+	* arch/arm-linux.h (arm_linux_get_next_pcs_fixup): Declare.
+	* arm-linux-tdep.c (arm_linux_get_next_pcs_ops): Initialize
+	it with arm_linux_get_next_pcs_fixup.
+	(arm_linux_software_single_step): Move code to
+	arm_linux_get_next_pcs_fixup.
+	* arm-tdep.c (arm_get_next_pcs_ops): Initialize it.
+
+2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* xml-tdesc.c (target_fetch_description_xml) [!HAVE_LIBEXPAT]: Warn
+	and return NULL.
+
+2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* frame.h (skip_tailcall_frames): Update comment.
+	* frame.c (skip_artificial_frames, skip_tailcall_frames): Return NULL
+	if only artificial frames are found.  Update comment.
+	(frame_unwind_caller_id): Handle NULL return.
+	(frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that
+	skip_artificial_frames does not return NULL.
+	(frame_pop): Add an error if only tailcall frames are found.
+	* infcmd.c (finish_command): Move skip_tailcall_frames call into
+	forward-execution case.  Add an error if only tailcall frames are
+	found.
+
+2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* stack.c (frame_info): Check frame_unwind_caller_id.
+
+2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* frame.h (skip_tailcall_frames): New.
+	* frame.c (skip_tailcall_frames): New.
+	(frame_pop): Call skip_tailcall_frames.
+	* infcmd.c (finish_command): Call skip_tailcall_frames.
+
+2016-02-11  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (check-parallel): New rule.
+
+2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-tdep.c (arm_skip_prologue): Remove unused variables.
+	(arm_analyze_prologue): Likewise.
+	(arm_scan_prologue): Likewise.
+	(arm_m_exception_prev_register): Likewise.
+	(arm_copy_block_xfer): Likewise.
+	(thumb2_copy_block_xfer): Likewise.
+	(arm_decode_miscellaneous): Likewise.
+	(arm_decode_ld_st_word_ubyte): Likewise.
+	(arm_decode_svc_copro): Likewise.
+	(thumb2_decode_svc_copro): Likewise.
+	(thumb_copy_16bit_ldr_literal): Likewise.
+	(thumb_copy_pop_pc_16bit): Likewise.
+	(decode_thumb_32bit_ld_mem_hints): Likewise.
+	(arm_show_force_mode): Likewise.
+	(_initialize_arm_tdep): Likewise.
+	(arm_record_strx): Likewise.
+	(arm_record_extension_space): Likewise.
+	(arm_record_data_proc_misc_ld_str): Likewise.
+	(arm_record_exreg_ld_st_insn): Likewise.
+	(arm_record_vfp_data_proc_insn): Likewise.
+	(arm_record_coproc_data_proc): Likewise.
+	(thumb_record_misc): Likewise.
+	(thumb_record_ldm_stm_swi): Likewise.
+	(thumb2_record_ld_st_dual_ex_tbb): Likewise.
+	(thumb2_record_ld_mem_hints): Likewise.
+	(thumb2_record_lmul_lmla_div): Likewise.
+	(thumb2_record_asimd_struct_ld_st): Likewise.
+	(arm_process_record): Likewise.
+
+2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-tdep.c (arm_displaced_step_copy_insn): Remove.
+	(ARM displaced stepping support): Remove reference to
+	arm_displaced_step_copy_insn in comment.
+	* arm-tdep.h (arm_displaced_step_copy_insn): Remove.
+	* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
+	reference to arm_displaced_step_copy_insn in comment.
+
+2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.
+	(thumb_copy_b): Likewise.
+	(arm_decode_b_bl_ldmstm): Likewise.
+	(thumb_copy_16bit_ldr_literal): Likewise.
+	(thumb_copy_pop_pc_16bit): Likewise.
+
+2016-02-11  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* tracepoint.c (encode_actions_1): Use target_gdbarch () rather
+	than loc->gdbarch.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracefile-tfile.c (trace_tdesc): New static variable.
+	(tfile_open): Clear trace_tdesc, call target_find_description.
+	(tfile_interp_line): Recognize tdesc lines.
+	(tfile_close): Clear trace_tdesc.
+	(tfile_xfer_partial_features): New function.
+	(tfile_xfer_partial): Call tfile_xfer_partial_features.
+	(tfile_append_tdesc_line): New function.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* ctf.c (ctf_write_tdesc): New function.
+	(ctf_write_ops): Wire in ctf_write_tdesc.
+	* tracefile-tfile.c (tfile_write_tdesc): New function.
+	(tfile_write_ops): Wire in tfile_write_tdesc.
+	* tracefile.c (trace_save): Call write_tdesc method.
+	* tracefile.h (struct trace_file_write_ops): Add write_tdesc method.
+	* xml-tdesc.c (target_fetch_description_xml): New function.
+	* xml-tdesc.h: Add target_fetch_description_xml prototype.
+
+2016-02-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* arm-tdep.c (arm_copy_extra_ld_st): Fix "unpriveleged" typo.
+	(arm_decode_dp_misc): Likewise.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* amd64-tdep.c (amd64_ax_pseudo_register_collect): New function.
+	(amd64_init_abi): Fill ax_pseudo_register_collect hook.
+	* gdb/i386-tdep.c (i386_pseudo_register_read_into_value): Remove
+	misleading comment.
+	(i386_pseudo_register_write): Ditto.
+	(i386_ax_pseudo_register_collect): New function.
+	(i386_gdbarch_init): Fill ax_pseudo_register_collect hook.
+	* i386-tdep.h: Add i386_ax_pseudo_register_collect prototype.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracefile-tfile.c (tfile_fetch_registers): Use g packet order
+	instead of gdb order.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracefile-tfile.c (tfile_fetch_registers): Fix off-by-one in bounds
+	check.
+
+2016-02-10  Joel Brobecker  <brobecker@adacore.com>
+
+	* NEWS: Create a new section for the next release branch.
+	Rename the section of the current branch, now that it has
+	been cut.
+
+2016-02-10  Joel Brobecker  <brobecker@adacore.com>
+
+	GDB 7.11 branch created (9ef9e6a6a0dd8f948708cb67c9afcfd0be40cb0a):
+	* version.in: Bump version to 7.11.50.DATE-git.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	PR breakpoints/19546
+	* breakpoint.c (breakpoint_event_location_empty_p): New function.
+	(update_breakpoints_after_exec, bkpt_re_set): Use this new function
+	instead of event_location_empty_p.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Use
+	string_to_event_location_basic instead of string_to_event_location.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	* guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
+	leading whitespace and use string_to_event_location_basic instead
+	of new_linespec_location.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	PR python/19506
+	* python/py-breakpoint.c (bppy_init): Use
+	string_to_event_location_basic instead of new_linespec_location.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	* location.c (string_to_explicit_location): Note that "-p" is
+	reserved for probe locations and return NULL for any input
+	that starts with that.
+	(string_to_event_location): Move "legacy" linespec code to ...
+	(string_to_event_location_basic): ... here.
+	* location.h (string_to_event_location): Update comment.
+	(string_to_event_location_basic): New function.
+
+2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
+	to AC_OUTPUT.  Remove "exit 0" at the end.
+	* configure: Regenerate.
+
+2016-02-09  Pedro Alves  <palves@redhat.com>
+
+	PR breakpoints/19548
+	* breakpoint.c (create_overlay_event_breakpoint): Don't update
+	global location list here.
+	(create_longjmp_master_breakpoint)
+	(create_std_terminate_master_breakpoint)
+	(create_exception_master_breakpoint, create_jit_event_breakpoint)
+	(update_breakpoint_locations):
+	(breakpoint_re_set): Update global location list after all
+	breakpoints are re-set.
+
+2016-02-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (remote_register_number_and_offset): Remove unused
+	variable(s).
+	(remote_thread_always_alive): Likewise.
+	(remote_update_thread_list): Likewise.
+	(process_initial_stop_replies): Likewise.
+	(remote_start_remote): Likewise.
+	(remote_check_symbols): Likewise.
+	(discard_pending_stop_replies): Likewise.
+	(process_stop_reply): Likewise.
+	(putpkt_binary): Likewise.
+	(getpkt): Likewise.
+	(remote_add_target_side_condition): Likewise.
+	(remote_insert_breakpoint): Likewise.
+	(remote_supports_stopped_by_sw_breakpoint): Likewise.
+	(remote_supports_stopped_by_hw_breakpoint): Likewise.
+	(remote_xfer_partial): Likewise.
+	(remote_read_btrace): Likewise.
+	(remote_async_serial_handler): Likewise.
+	(remote_thread_events): Likewise.
+	(_initialize_remote): Likewise.
+
+2016-02-07  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* varobj.h (varobj_delete): Remove dellist parameter, update and
+	move documentation here.
+	* varobj.c (struct cpstack, cppush, cppop): Remove.
+	(delete_variable): Remove resultp (first) parameter.
+	(delete_variable_1): Likewise.
+	(varobj_delete): Remove dellist parameter and unused code.
+	(update_dynamic_varobj_children): Adjust varobj_delete call.
+	(update_type_if_necessary): Likewise.
+	(varobj_set_visualizer): Likewise.
+	(varobj_update): Likewise.
+	(value_of_root): Likewise.
+	(varobj_invalidate_iter): Likewise.
+	* mi/mi-cmd-var.c (mi_cmd_var_delete): Likewise.
+
+2016-02-04  Yao Qi  <yao.qi@linaro.org>
+
+	* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
+	0 before handling 'F' and set it back afterwards.
+
+2016-02-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ui-out.c (MAX_UI_OUT_LEVELS): Remove.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* amd64-linux-siginfo.c (nat_siginfo_t, nat_sigval_t, nat_timeval):
+	New types.
+	(compat_siginfo): New bound fields added.
+	(compat_x32_siginfo): New field added.
+	(cpt_si_addr_lsb): New define.
+	(compat_siginfo_from_siginfo): Use nat_siginfo.
+	(siginfo_from_compat_siginfo): Use nat_siginfo.
+	(compat_x32_siginfo_from_siginfo): Likewise.
+	(siginfo_from_compat_x32_siginfo): Likewise.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* linux-tdep.c (linux_get_siginfo_type): Add the _addr_bnd
+	structure to the siginfo if extra_fields contains
+	LINUX_SIGINFO_FIELD_ADDR_BND.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* linux-tdep.h (linux_get_siginfo_type_with_fields): Make extern.
+	* linux-tdep.c (linux_get_siginfo_type_with_fields): Make extern.
+	* i386-linux-tdep.h (x86_linux_get_siginfo_type): New
+	function.
+	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Add
+	x86_linux_get_siginfo_type for the amd64 abi.
+	* i386-linux-tdep.c (x86_linux_get_siginfo_type): New
+	function.
+	(i386_linux_init_abi): Add new function at the i386 ABI
+	initialization.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* linux-tdep.h (linux_siginfo_extra_field_values): New enum values.
+	(linux_siginfo_extra_fields): New enum type.
+	* linux-tdep.c (linux_get_siginfo_type_with_fields): New function.
+	(linux_get_siginfo_type): Use new function.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* nat/amd64-linux-siginfo.c: New file.
+	* nat/amd64-linux-siginfo.h: New file.
+	* Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
+	(amd64-linux-siginfo.o): New rule.
+	* config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
+	* amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
+	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
+	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
+	(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
+	(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
+	(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
+	(cpt_si_fd, si_timerid, si_overrun): Move to nat/amd64-linux-siginfo.c.
+
+2016-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* value.c (max_value_size): New variable.
+	(MIN_VALUE_FOR_MAX_VALUE_SIZE): New define.
+	(set_max_value_size): New function.
+	(show_max_value_size): New function.
+	(check_type_length_before_alloc): New function.
+	(allocate_value_contents): Call check_type_length_before_alloc.
+	(set_value_enclosing_type): Likewise.
+	(_initialize_values): Add set/show handler for max-value-size.
+	* NEWS: Mention new set/show command.
+
+2016-01-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* varobj.h (struct varobj): Fix typos in comments.
+	(struct lang_varobj_ops): Likewise.
+	* varobj.c (VAROBJ_TABLE_SIZE): Likewise.
+	(varobj_create): Move misplaced comment.
+
+2016-01-29  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* aarch64-tdep.c (aarch64_record_asimd_load_store): Add braces
+	to for include additional lines.
+	* xcoffread.c (scan_xcoff_symtab): Remove unnecessary braces.
+
+2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gnulib/import/Makefile.am: Regenerate.
+	* gnulib/import/Makefile.in: Regenerate.
+	* gnulib/import/m4/gnulib-cache.m4: Regenerate.
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add rawmemchr.
+
+2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* remote.c (skip_to_semicolon): Remove.
+	(remote_parse_stop_reply): Use strchrnul instead of
+	skip_to_semicolon.
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
+	strchrnul.
+	* gnulib/aclocal.m4: Regenerate.
+	* gnulib/config.in: Regenerate.
+	* gnulib/configure: Regenerate.
+	* gnulib/import/Makefile.am: Regenerate.
+	* gnulib/import/Makefile.in: Regenerate.
+	* gnulib/import/m4/gnulib-cache.m4: Regenerate.
+	* gnulib/import/m4/gnulib-comp.m4: Regenerate.
+	* gnulib/import/m4/rawmemchr.m4: New file.
+	* gnulib/import/m4/strchrnul.m4: New file.
+	* gnulib/import/rawmemchr.c: New file.
+	* gnulib/import/rawmemchr.valgrind: New file.
+	* gnulib/import/strchrnul.c: New file.
+	* gnulib/import/strchrnul.valgrind: New file.
+
+2016-01-28  Yao Qi  <yao.qi@linaro.org>
+
+	* breakpoint.c (build_target_command_list): Don't call continue
+	if aexpr is NULL.
+	(build_target_condition_list): Likewise.
+
+2016-01-27  Kevin Buettner  <kevinb@redhat.com>
+
+	* rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
+	bytes as aggregates.
+
+2016-01-27  Joel Brobecker  <brobecker@adacore.com>
+
+	* MAINTAINERS (Responsible Maintainers): Add Keith Seitz as
+	Linespec Maintainers.
+
+2016-01-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* common/common-utils.c (skip_spaces): Fix comment.
+	(skip_to_space_const): Likewise.
+
+2016-01-25  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
+	Remove argument pc.  Get pc by regcache_read_pc.  Callers updated.
+	(arm_deal_with_atomic_sequence_raw): Likewise.
+	(thumb_get_next_pcs_raw): Likewise.
+	(arm_get_next_pcs_raw): Likewise.
+	(arm_get_next_pcs): Remove argument pc.  Callers updated.
+	* arch/arm-get-next-pcs.h (arm_get_next_pcs): Update declaration.
+
+2016-01-25  Mark Wielaard  <mjw@redhat.com>
+
+	* ada-lang.c (ada_evaluate_subexp): Add proper else block.
+	* c-typeprint.c (c_type_print_base): Fix misleading indentation of
+	if statement.
+	* inflow.c (child_terminal_ours_1): Fix misleading indentation of
+	statement block by introducing an else.
+	* linux-record.c (record_linux_sockaddr): Fix misleading indentation
+	of return statements.
+	(record_linux_msghdr): Likewise.
+
+2016-01-25  Pedro Alves  <palves@redhat.com>
+
+	PR threads/19461
+	* infrun.c (handle_inferior_event_1) <fork/vfork>: Update
+	parent/child running states.
+
+2016-01-25  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19494
+	* linux-nat.c (kill_one_lwp): New, factored out from ...
+	(kill_callback): ... this.
+	(kill_wait_callback): New, factored out from ...
+	(kill_wait_one_lwp): ... this.
+	(kill_unfollowed_fork_children): New function.
+	(linux_nat_kill): Use it.
+
+2016-01-22  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_pid_to_str): Adjust string format.
+
+2016-01-22  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-nat.c (fetch_fpregs): Call perror_with_name
+	instead of warning.
+	(store_fpregs, fetch_regs, store_regs): Likewise.
+	(fetch_wmmx_regs, store_wmmx_regs): Likewise.
+	(fetch_vfp_regs, store_vfp_regs): Likewise.
+
+2016-01-21  Doug Evans  <dje@google.com>
+
+	* breakpoint.c (init_breakpoint_sal): Add comment.
+
+2016-01-21  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* ax-gdb.c (gen_traced_pop): Use gen_fetch for string collection.
+
+2016-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* disasm.c (maybe_add_dis_line_entry): Rename to...
+	(add_dis_line_entry): ...this, and update header comment.
+	(do_mixed_source_and_assembly): Now use add_dis_line_entry.
+
+2016-01-21  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMPILER_CFLAGS): New.
+	(CXXFLAGS): Get it from configure.
+	(INTERNAL_CFLAGS_BASE, INTERNAL_LDFLAGS): Use COMPILER_CFLAGS
+	instead of CFLAGS.
+	* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Set and AC_SUBST
+	COMPILER_CFLAGS.
+	* configure: Regenerate.
+
+2016-01-21  Joel Brobecker  <brobecker@adacore.com>
+
+	* location.h (new_address_location): Add new parameters
+	"addr_string" and "addr_string_len".
+	(get_address_string_location): Add declaration.
+	* location.c (new_address_location): Add new parameters
+	"addr_string" and "addr_string_len".  If not NULL, store
+	a copy of the addr_string in the new location as well.
+	(get_address_string_location): New function.
+	(string_to_event_location): Update call to new_address_location.
+	* linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
+	Save the event location in the parser's state before
+	passing it to convert_address_location_to_sals.
+	* breakpoint.c (create_thread_event_breakpoint): Update call
+	to new_address_location.
+	(init_breakpoint_sal): Get the event location's string, if any,
+	and use it to update call to new_address_location.
+	* python/py-finishbreakpoint.c (bpfinishpy_init):
+	Update call to new_address_location.
+	* spu-tdep.c (spu_catch_start): Likewise.
+
+	* config/djgpp/fnchange.lst: Add entries for
+	gdb/testsuite/gdb.base/break-fun-addr1.c and
+	gdb/testsuite/gdb.base/break-fun-addr2.c.
+
+2016-01-21  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_sigreturn_next_pc): Add parameter
+	is_thumb and set it according to CPSR saved on the stack.
+	(arm_linux_get_next_pcs_syscall_next_pc): Pass is_thumb to
+	arm_linux_sigreturn_next_pc.
+
+2016-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* python/lib/gdb/printing.py (FlagEnumerationPrinter.__call__):
+	Fix enumerators sort key function.
+
+2016-01-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* printcmd.c (print_scalar_formatted): Move binary operator from
+	end of line to beginning of next line.  Adjust formatting
+	accordingly.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c (fbsd_pid_to_exec_file): Use new "buflen" instead of
+	"len" with sysctl.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (find_stop_signal): Remove.
+	(struct fbsd_collect_regset_section_cb) <lwp>: New field.
+	<stop_signal>: New field.
+	<abort_iteration>: New field.
+	(fbsd_collect_regset_section_cb): Use new fields.
+	(fbsd_collect_thread_registers): New function.
+	(struct fbsd_corefile_thread_data): New structure.
+	(fbsd_corefile_thread): New function.
+	(fbsd_make_corefile_notes): Use new function to dump notes for each
+	non-exited thread in a process.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* configure.ac: Check for support for LWP names on FreeBSD.
+	* fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
+	[TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
+	(fbsd_fetch_kinfo_proc): Move function earlier.
+	[PT_LWPINFO] (fbsd_thread_alive): New function.
+	[PT_LWPINFO] (fbsd_pid_to_str): New function.
+	[HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
+	[PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
+	[PT_LWPINFO] (fbsd_add_threads): New function.
+	[PT_LWPINFO] (fbsd_update_thread_list): New function.
+	[PT_LWPINFO] New variable super_resume.
+	[PT_LWPINFO] (resume_one_thread_cb): New function.
+	[PT_LWPINFO] (resume_all_threads_cb): New function.
+	[PT_LWPINFO] (fbsd_resume): New function.
+	(fbsd_remember_child): Save full ptid instead of plain pid.
+	(fbsd_is_child_pending): Return ptid of saved child process.
+	(fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
+	first stop.
+	[PT_LWP_EVENTS] Handle LWP events.
+	[TDP_RFPPWAIT] Include LWP in child ptid.
+	(fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
+	(fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
+	Add threads for existing processes.
+	(fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
+	"fbsd_thread_alive".
+	Set "to_pid_to_str" to "fbsd_pid_to_str".
+	[HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
+	"fbsd_thread_name".
+	[PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
+	Set "to_has_thread_control" to "tc_schedlock".
+	Set "to_resume" to "fbsd_resume".
+	(_initialize_fbsd_nat): New function.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
+	get_ptrace_pid.
+	(amd64bsd_store_inferior_registers): Use get_ptrace_pid.
+	(amd64bsd_dr_get): Use get_ptrace_pid.
+	(amd64bsd_dr_set): Use get_ptrace_pid.
+	* i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
+	(i386bsd_store_inferior_registers): Use get_ptrace_pid.
+	(i386bsd_dr_get): Use get_ptrace_pid.
+	(i386bsd_dr_set): Use get_ptrace_pid.
+	* inf-ptrace.c (get_ptrace_pid): Export.
+	* inf-ptrace.h (get_ptrace_pid): Declare.
+	* ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
+	(ppcfbsd_store_inferior_registers): Use lwp id.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd_tdep.c (fbsd_core_pid_to_str): New function.
+	(fbsd_core_thread_name): New function.
+	(fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
+	Add "core_thread_name" gdbarch method.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* corelow.c (core_thread_name): New function.
+	(init_core_ops): Use "core_thread_name" for the "to_thread_name"
+	target op.
+	* gdbarch.sh (core_thread_name): New gdbarch callback.
+	* gdbarch.h: Re-generate.
+	* gdbarch.c: Re-generate.
+
+2016-01-19  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
+	convert gdb.Value to integer type using int().
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* configure.ac: Include <sys/types.h when checking for "r_fs" in
+	"struct reg".
+	* configure: Regenerate.
+
+2016-01-19  Pedro Alves  <palves@redhat.com>
+
+	* ax-gdb.c (agent_command_1): Adjust call to decode_line_full.
+	* break-catch-throw.c (re_set_exception_catchpoint): Pass the
+	current program space down to linespec decoding and breakpoint
+	location updating.
+	* breakpoint.c (parse_breakpoint_sals): Adjust calls to
+	decode_line_full.
+	(until_break_command): Adjust calls to decode_line_1.
+	(base_breakpoint_decode_location, bkpt_decode_location): Add
+	'search_pspace' parameter.  Pass it along.
+	(bkpt_probe_create_sals_from_location): Adjust calls to
+	parse_probes.
+	(tracepoint_decode_location, tracepoint_probe_decode_location)
+	(strace_marker_decode_location): Add 'search_pspace' parameter.
+	Pass it along.
+	(all_locations_are_pending): Rewrite to take a breakpoint and
+	program space as arguments instead.
+	(hoist_existing_locations): New function.
+	(update_breakpoint_locations): Add 'filter_pspace' parameter.  Use
+	hoist_existing_locations instead of always removing all locations,
+	and adjust to all_locations_are_pending change.
+	(location_to_sals): Add 'search_pspace' parameter.  Pass it along.
+	Don't disable the breakpoint if there are other locations in
+	another program space.
+	(breakpoint_re_set_default): Adjust to pass down the current
+	program space as filter program space.
+	(decode_location_default): Add 'search_pspace' parameter and pass
+	it along.
+	(prepare_re_set_context): Don't switch program space here.
+	(breakpoint_re_set): Use save_current_space_and_thread instead of
+	save_current_program_space.
+	* breakpoint.h (struct breakpoint_ops) <decode_location>: Add
+	'search_pspace' parameter.
+	(update_breakpoint_locations): Add 'filter_pspace' parameter.
+	* cli/cli-cmds.c (edit_command, list_command): Adjust calls to
+	decode_line_1.
+	* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the current
+	program space as filter program space.
+	* linespec.c (struct linespec_state) <search_pspace>: New field.
+	(create_sals_line_offset, convert_explicit_location_to_sals)
+	(parse_linespec): Pass the search program space down.
+	(linespec_state_constructor): Add 'search_pspace' parameter.
+	Store it.
+	(linespec_parser_new): Add 'search_pspace' parameter and pass it
+	along.
+	(linespec_lex_to_end): Adjust.
+	(decode_line_full, decode_line_1): Add 'search_pspace' parameter
+	and pass it along.
+	(decode_line_with_last_displayed): Adjust.
+	(collect_symtabs_from_filename, symtabs_from_filename): New
+	'search_pspace' parameter.  Use it.
+	(find_function_symbols): Pass the search program space down.
+	* linespec.h (decode_line_1, decode_line_full): Add
+	'search_pspace' parameter.
+	* probe.c (parse_probes_in_pspace): New function, factored out
+	from ...
+	(parse_probes): ... this.  Add 'search_pspace' parameter and use
+	it.
+	* probe.h (parse_probes): Add pspace' parameter.
+	* python/python.c (gdbpy_decode_line): Adjust.
+	* tracepoint.c (scope_info): Adjust.
+
+2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
+	instruction support.
+	(micromips_next_pc): Likewise.
+	(micromips_scan_prologue): Likewise.
+	(micromips_deal_with_atomic_sequence): Likewise.
+	(micromips_stack_frame_destroyed_p): Likewise.
+	(mips_breakpoint_from_pc): Likewise.
+
+2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
+	unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
+
+2016-01-18  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that GDB now displays the ID and name of the
+	thread that hit a breakpoint or received a signal.
+	* break-catch-sig.c (signal_catchpoint_print_it): Use
+	maybe_print_thread_hit_breakpoint.
+	* break-catch-syscall.c (print_it_catch_syscall): Likewise.
+	* break-catch-throw.c (print_it_exception_catchpoint): Likewise.
+	* breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
+	(print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
+	(print_it_catch_exec, print_it_ranged_breakpoint)
+	(print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
+	Use maybe_print_thread_hit_breakpoint.
+	* breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
+	* gdbthread.h (show_thread_that_caused_stop): Declare.
+	* infrun.c (print_signal_received_reason): Print which thread
+	received signal.
+	* thread.c (show_thread_that_caused_stop): New function.
+
+2016-01-18  Gary Benson  <gbenson@redhat.com>
+
+	* nat/linux-namespaces.c (do_fork): New function.
+	(linux_mntns_get_helper): Use the above.
+
+2016-01-17  Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>  (tiny change)
+
+	Pushed by Joel Brobecker  <brobecker@adacore.com>.
+	PR gdb/19208
+	* dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
+	if the function has no name.
+
+2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
+	Conditionalize for Windows host.
+	(GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
+	(GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
+	(phony_iconv_open): Handle both UTF-32 endiannesses.
+	(phony_iconv): Likewise.  Check for output overflow and clean up
+	out-of-input cases.  Correct adjustment to input buffer pointer.
+	(set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
+	phony_iconv_open.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention star wildcard ranges.
+	* cli/cli-utils.c (get_number_or_range): Check state->in_range first.
+	(number_range_setup_range): New function.
+	* cli/cli-utils.h (number_range_setup_range): New declaration.
+	* thread.c (thread_apply_command): Support star TID ranges.
+	* tid-parse.c (tid_range_parser_finished)
+	(tid_range_parser_string, tid_range_parser_skip)
+	(get_tid_or_range, get_tid_or_range): Handle
+	TID_RANGE_STATE_STAR_RANGE.
+	(tid_range_parser_star_range): New function.
+	* tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
+	New value.
+	(tid_range_parser_star_range): New declaration.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+	* thread.c (thread_apply_command): Use the tid range parser to
+	advance past the thread ID list.
+	* tid-parse.c (get_positive_number_trailer): New function.
+	(parse_thread_id): Use it.
+	(get_tid_or_range): Use it.  Return 0 instead of throwing invalid
+	thread ID error.
+	(get_tid_or_range): Detect negative values.  Return 0 instead of
+	throwing invalid thread ID error.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+	* arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
+	Declare.
+	(arm_linux_get_next_pcs_ops): Install
+	arm_linux_get_next_pcs_syscall_next_pc.
+	(arm_linux_syscall_next_pc): Change to ...
+	(arm_linux_get_next_pcs_syscall_next_pc): ... it.
+	(arm_linux_init_abi): Don't set tdep->syscall_next_pc.
+	* arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
+	(arm_get_next_pcs_syscall_next_pc): Make it static.  Don't
+	call tdep->syscall_next_pc.
+	* arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
+	(arm_get_next_pcs_syscall_next_pc): Remove.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+	* remote.c (remote_set_syscall_catchpoint): Cast to char *.
+	* thread.c (do_captured_thread_select): Cast to const char *.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
+	argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
+	(thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
+	instead.
+	* arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
+	<arm_thumb2_breakpoint>: Remove.
+	<has_thumb2_breakpoint>: New field.
+	(arm_get_next_pcs_ctor): Update declaration.
+	* arm-linux-tdep.c (arm_linux_software_single_step): Pass
+	1 to arm_get_next_pcs_ctor.
+	* arm-tdep.c (arm_software_single_step): Pass 0 to
+	arm_get_next_pcs_ctor.
+
+2016-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
+
+2016-01-13  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
+	byte_order_for_code to read instruction.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention $_gthread.
+	* gdbthread.h (struct thread_info) <global_num>: Mention
+	$_gthread.
+	* thread.c (thread_num_make_value_helper): New function.
+	(thread_id_make_value): Delete.
+	(thread_id_per_inf_num_make_value, global_thread_id_make_value):
+	New.
+	(thread_funcs): Adjust.
+	(gthread_funcs): New.
+	(_initialize_thread): Register $_gthread variable.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention "info threads -gid".
+	* gdbthread.h (struct thread_info) <global_num>: Mention "info
+	threads -gid".
+	* thread.c (info_threads_command): Handle "-gid".
+	(_initialize_thread): Adjust "info threads" help string to mention
+	-gid.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention InferiorThread.global_num.
+	* python/py-infthread.c (thpy_get_global_num): New function.
+	(thread_object_getset): Register "global_num".
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention that thread IDs are now per inferior and global
+	thread IDs.
+	* Makefile.in (SFILES): Add tid-parse.c.
+	(COMMON_OBS): Add tid-parse.o.
+	(HFILES_NO_SRCDIR): Add tid-parse.h.
+	* ada-tasks.c: Adjust to use ptid_to_global_thread_id.
+	* breakpoint.c (insert_breakpoint_locations)
+	(remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
+	(print_one_breakpoint_location, set_longjmp_breakpoint)
+	(check_longjmp_breakpoint_for_call_dummy)
+	(set_momentary_breakpoint): Adjust to use global IDs.
+	(find_condition_and_thread, watch_command_1): Use parse_thread_id.
+	(until_break_command, longjmp_bkpt_dtor)
+	(breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
+	to use global IDs.
+	* dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
+	ptid_to_global_thread_id.
+	* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
+	* gdbthread.h (struct thread_info): Rename field 'num' to
+	'global_num.  Add new fields 'per_inf_num' and 'inf'.
+	(thread_id_to_pid): Rename thread_id_to_pid to
+	global_thread_id_to_ptid.
+	(pid_to_thread_id): Rename to ...
+	(ptid_to_global_thread_id): ... this.
+	(valid_thread_id): Rename to ...
+	(valid_global_thread_id): ... this.
+	(find_thread_id): Rename to ...
+	(find_thread_global_id): ... this.
+	(ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
+	(print_thread_info): Add comment.
+	* tid-parse.h: New file.
+	* tid-parse.c: New file.
+	* infcmd.c (step_command_fsm_prepare)
+	(step_command_fsm_should_stop): Adjust to use the global thread
+	ID.
+	(until_next_command, until_next_command)
+	(finish_command_fsm_should_stop): Adjust to use the global thread
+	ID.
+	(attach_post_wait): Adjust to check the inferior number too.
+	* inferior.h (struct inferior) <highest_thread_num>: New field.
+	* infrun.c (handle_signal_stop)
+	(insert_exception_resume_breakpoint)
+	(insert_exception_resume_from_probe): Adjust to use the global
+	thread ID.
+	* record-btrace.c (record_btrace_open): Use global thread IDs.
+	* remote.c (process_initial_stop_replies): Also consider the
+	inferior number.
+	* target.c (target_pre_inferior): Clear the inferior's highest
+	thread num.
+	* thread.c (clear_thread_inferior_resources): Adjust to use the
+	global thread ID.
+	(new_thread): New inferior parameter.  Adjust to use it.  Set both
+	the thread's global ID and the thread's per-inferior ID.
+	(add_thread_silent): Adjust.
+	(find_thread_global_id): New.
+	(find_thread_id): Make static.  Adjust to rename.
+	(valid_thread_id): Rename to ...
+	(valid_global_thread_id): ... this.
+	(pid_to_thread_id): Rename to ...
+	(ptid_to_global_thread_id): ... this.
+	(thread_id_to_pid): Rename to ...
+	(global_thread_id_to_ptid): ... this.  Adjust.
+	(first_thread_of_process): Adjust.
+	(do_captured_list_thread_ids): Adjust to use global thread IDs.
+	(should_print_thread): New function.
+	(print_thread_info): Rename to ...
+	(print_thread_info_1): ... this, and add new show_global_ids
+	parameter.  Handle it.  Iterate over inferiors.
+	(print_thread_info): Reimplement as wrapper around
+	print_thread_info_1.
+	(show_inferior_qualified_tids): New function.
+	(print_thread_id): Use it.
+	(tp_array_compar): Compare inferior numbers too.
+	(thread_apply_command): Use tid_range_parser.
+	(do_captured_thread_select): Use parse_thread_id.
+	(thread_id_make_value): Adjust.
+	(_initialize_thread): Adjust "info threads" help string.
+	* varobj.c (struct varobj_root): Update comment.
+	(varobj_create): Adjust to use global thread IDs.
+	(value_of_root_1): Adjust to use global_thread_id_to_ptid.
+	* windows-tdep.c (display_tib): No longer accept an argument.
+	* cli/cli-utils.c (get_number_trailer): Make extern.
+	* cli/cli-utils.h (get_number_trailer): Declare.
+	(get_number_const): Adjust documentation.
+	* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
+	thread IDs.
+	* mi/mi-interp.c (mi_new_thread, mi_thread_exit)
+	(mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
+	* mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
+	* guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
+	Likewise.
+	* python/py-breakpoint.c (bppy_set_thread): Likewise.
+	* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
+	* python/py-infthread.c (thpy_get_num): Add comment and return the
+	per-inferior thread ID.
+	(thread_object_getset): Update comment of "num".
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (remove_threaded_breakpoints)
+	(print_one_breakpoint_location): Use print_thread_id.
+	* btrace.c (btrace_enable, btrace_disable, btrace_teardown)
+	(btrace_fetch, btrace_clear): Use print_thread_id.
+	* common/print-utils.c (CELLSIZE): Delete.
+	(get_cell): Rename to ...
+	(get_print_cell): ... this and made extern.  Adjust call callers.
+	Adjust to use PRINT_CELL_SIZE.
+	* common/print-utils.h (get_print_cell): Declare.
+	(PRINT_CELL_SIZE): New.
+	* gdbthread.h (print_thread_id): Declare.
+	* infcmd.c (signal_command): Use print_thread_id.
+	* inferior.c (print_inferior): Use print_thread_id.
+	* infrun.c (handle_signal_stop)
+	(insert_exception_resume_breakpoint)
+	(insert_exception_resume_from_probe)
+	(print_signal_received_reason): Use print_thread_id.
+	* record-btrace.c (record_btrace_info)
+	(record_btrace_resume_thread, record_btrace_cancel_resume)
+	(record_btrace_step_thread, record_btrace_wait): Use
+	print_thread_id.
+	* thread.c (thread_apply_all_command): Use print_thread_id.
+	(print_thread_id): New function.
+	(thread_apply_command): Use print_thread_id.
+	(thread_command, thread_find_command, do_captured_thread_select):
+	Use print_thread_id.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention InferiorThread.inferior.
+	* python/py-infthread.c (thpy_get_inferior): New.
+	(thread_object_getset): Register "inferior".
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* NEWS: Mention $_inferior.
+	* inferior.c (inferior_id_make_value): New.
+	(inferior_funcs): New.
+	(_initialize_inferior): Create $_inferior variable.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	PR breakpoints/19388
+	* frame.c (get_current_frame): Use validate_registers_access.
+	* gdbthread.h (validate_registers_access): Declare.
+	* infrun.c (validate_siginfo_access): Delete.
+	(siginfo_value_read, siginfo_value_write): Use
+	validate_registers_access.
+	* thread.c (validate_registers_access): New function.
+
+2016-01-12  Josh Stone  <jistone@redhat.com>
+	    Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
+	syscall_entry and syscall_return stop reasons.  Mention GDB
+	support for remote catch syscall.
+	* remote.c (PACKET_QCatchSyscalls): New enum.
+	(remote_set_syscall_catchpoint): New function.
+	(remote_protocol_features): New element for QCatchSyscalls.
+	(remote_parse_stop_reply): Parse syscall_entry/return stops.
+	(init_remote_ops): Install remote_set_syscall_catchpoint.
+	(_initialize_remote): Config QCatchSyscalls.
+	* linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
+
+2016-01-12  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/linux-ptrace.c (linux_child_function): Cast child_stack
+	to gdb_byte * and pass to linux_fork_to_function.
+
+2016-01-12  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/linux-ptrace.c (linux_fork_to_function): Change type
+	of argument 'function'.
+	(linux_grandchild_function): Change return type to 'int'.
+	Change child_stack's type to 'void *'.
+	(linux_child_function): Likewise.
+
+2016-01-12  Pedro Alves  <palves@redhat.com>
+
+	Remove use of the registered trademark symbol throughout.
+
+2016-01-12  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* reply_mig_hack.awk: Rewrite one regular expression.
+
+2016-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+	* acinclude.m4: Include new warning.m4 file.
+	* configure: Regenerated.
+	* configure.ac: Move all warning logic ...
+	* warning.m4: ... here.
+
+2016-01-08  Yao Qi  <yao.qi@linaro.org>
+
+	* extension.c: Include target.h.
+	(set_active_ext_lang): Only call install_gdb_sigint_handler,
+	check_quit_flag, and set_quit_flag if target_terminal_is_ours
+	returns false.
+	(restore_active_ext_lang): Likewise.
+	* target.c (target_terminal_is_ours): New function.
+	* target.h (target_terminal_is_ours): Declare.
+
+2016-01-07  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
+	to `err' in the little-endian leg.
+
+2016-01-06  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
+	lines below.
+	(thumb_get_next_pcs_raw): Make it static.
+	(arm_get_next_pcs_raw): Likewise.
+	* arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
+	declaration.
+	(arm_get_next_pcs_raw): Likewise.
+
+2016-01-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* version.in: Change cvs to git.
+
+2016-01-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.tgt (score-*-*): Delete gdb_sim assignment.
+
+2016-01-05  Pedro Alves  <palves@redhat.com>
+
+	PR sim/13418
+	* configure.ac: Define WITH_PPC_SIM when linking in the sim and
+	the target is powerpc*.
+	* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
+	of WITH_SIM.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+
+2016-01-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
+
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.tgt (powerpc*-*-*): Delete test call and
+	always assign gdb_sim.
+
+2016-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	Update year range in copyright notice of all files.
+
+2016-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* top.c (print_gdb_version): Change copyright year in version
+	message.
+
+2016-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
+
+For older changes see ChangeLog-2015.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+coding: utf-8
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset.c ./gdb/charset.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/charset.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Character set conversion support for GDB.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -77,9 +77,13 @@
    arrange for there to be a single available character set.  */
 
 #undef GDB_DEFAULT_HOST_CHARSET
-#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
-#define GDB_DEFAULT_TARGET_CHARSET "ISO-8859-1"
-#define GDB_DEFAULT_TARGET_WIDE_CHARSET "ISO-8859-1"
+#ifdef USE_WIN32API
+# define GDB_DEFAULT_HOST_CHARSET "CP1252"
+#else
+# define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
+#endif
+#define GDB_DEFAULT_TARGET_CHARSET GDB_DEFAULT_HOST_CHARSET 
+#define GDB_DEFAULT_TARGET_WIDE_CHARSET "UTF-32"
 #undef DEFAULT_CHARSET_NAMES
 #define DEFAULT_CHARSET_NAMES GDB_DEFAULT_HOST_CHARSET ,
 
@@ -95,20 +99,27 @@
 #undef ICONV_CONST
 #define ICONV_CONST const
 
+/* We allow conversions from UTF-32, wchar_t, and the host charset.
+   We allow conversions to wchar_t and the host charset.
+   Return 1 if we are converting from UTF-32BE, 2 if from UTF32-LE,
+   0 otherwise.  This is used as a flag in calls to iconv.  */
+
 static iconv_t
 phony_iconv_open (const char *to, const char *from)
 {
-  /* We allow conversions from UTF-32BE, wchar_t, and the host charset.
-     We allow conversions to wchar_t and the host charset.  */
-  if (strcmp (from, "UTF-32BE") && strcmp (from, "wchar_t")
-      && strcmp (from, GDB_DEFAULT_HOST_CHARSET))
-    return -1;
   if (strcmp (to, "wchar_t") && strcmp (to, GDB_DEFAULT_HOST_CHARSET))
     return -1;
 
-  /* Return 1 if we are converting from UTF-32BE, 0 otherwise.  This is
-     used as a flag in calls to iconv.  */
-  return !strcmp (from, "UTF-32BE");
+  if (!strcmp (from, "UTF-32BE") || !strcmp (from, "UTF-32"))
+    return 1;
+
+  if (!strcmp (from, "UTF-32LE"))
+    return 2;
+
+  if (strcmp (from, "wchar_t") && strcmp (from, GDB_DEFAULT_HOST_CHARSET))
+    return -1;
+
+  return 0;
 }
 
 static int
@@ -123,31 +134,33 @@ phony_iconv (iconv_t utf_flag, const cha
 {
   if (utf_flag)
     {
+      enum bfd_endian endian
+	= utf_flag == 1 ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
       while (*inbytesleft >= 4)
 	{
-	  size_t j;
-	  unsigned long c = 0;
-
-	  for (j = 0; j < 4; ++j)
-	    {
-	      c <<= 8;
-	      c += (*inbuf)[j] & 0xff;
-	    }
+	  unsigned long c
+	    = extract_unsigned_integer ((const gdb_byte *)*inbuf, 4, endian);
 
 	  if (c >= 256)
 	    {
 	      errno = EILSEQ;
 	      return -1;
 	    }
+	  if (*outbytesleft < 1)
+	    {
+	      errno = E2BIG;
+	      return -1;
+	    }
 	  **outbuf = c & 0xff;
 	  ++*outbuf;
 	  --*outbytesleft;
 
-	  ++*inbuf;
+	  *inbuf += 4;
 	  *inbytesleft -= 4;
 	}
-      if (*inbytesleft < 4)
+      if (*inbytesleft)
 	{
+	  /* Partial sequence on input.  */
 	  errno = EINVAL;
 	  return -1;
 	}
@@ -165,12 +178,11 @@ phony_iconv (iconv_t utf_flag, const cha
       *outbuf += amt;
       *inbytesleft -= amt;
       *outbytesleft -= amt;
-    }
-
-  if (*inbytesleft)
-    {
-      errno = E2BIG;
-      return -1;
+      if (*inbytesleft)
+	{
+	  errno = E2BIG;
+	  return -1;
+	}
     }
 
   /* The number of non-reversible conversions -- but they were all
@@ -290,6 +302,11 @@ set_be_le_names (struct gdbarch *gdbarch
     return;
   be_le_arch = gdbarch;
 
+#ifdef PHONY_ICONV
+  /* Match the wide charset names recognized by phony_iconv_open.  */
+  target_wide_charset_le_name = "UTF-32LE";
+  target_wide_charset_be_name = "UTF-32BE";
+#else
   target_wide_charset_le_name = NULL;
   target_wide_charset_be_name = NULL;
 
@@ -313,6 +330,7 @@ set_be_le_names (struct gdbarch *gdbarch
 	    target_wide_charset_le_name = charset_enum[i];
 	}
     }
+# endif  /* PHONY_ICONV */
 }
 
 /* 'Set charset', 'set host-charset', 'set target-charset', 'set
@@ -468,7 +486,7 @@ host_hex_value (char c)
 static void
 cleanup_iconv (void *p)
 {
-  iconv_t *descp = p;
+  iconv_t *descp = (iconv_t *) p;
   iconv_close (*descp);
 }
 
@@ -571,71 +589,30 @@ convert_between_encodings (const char *f
 
 
 
-/* An iterator that returns host wchar_t's from a target string.  */
-struct wchar_iterator
-{
-  /* The underlying iconv descriptor.  */
-  iconv_t desc;
-
-  /* The input string.  This is updated as convert characters.  */
-  const gdb_byte *input;
-  /* The number of bytes remaining in the input.  */
-  size_t bytes;
-
-  /* The width of an input character.  */
-  size_t width;
-
-  /* The output buffer and its size.  */
-  gdb_wchar_t *out;
-  size_t out_size;
-};
-
 /* Create a new iterator.  */
-struct wchar_iterator *
-make_wchar_iterator (const gdb_byte *input, size_t bytes, 
-		     const char *charset, size_t width)
+wchar_iterator::wchar_iterator (const gdb_byte *input, size_t bytes, 
+				const char *charset, size_t width)
+: m_input (input),
+  m_bytes (bytes),
+  m_width (width),
+  m_out (1)
 {
-  struct wchar_iterator *result;
-  iconv_t desc;
-
-  desc = iconv_open (INTERMEDIATE_ENCODING, charset);
-  if (desc == (iconv_t) -1)
+  m_desc = iconv_open (INTERMEDIATE_ENCODING, charset);
+  if (m_desc == (iconv_t) -1)
     perror_with_name (_("Converting character sets"));
-
-  result = XNEW (struct wchar_iterator);
-  result->desc = desc;
-  result->input = input;
-  result->bytes = bytes;
-  result->width = width;
-
-  result->out = XNEW (gdb_wchar_t);
-  result->out_size = 1;
-
-  return result;
-}
-
-static void
-do_cleanup_iterator (void *p)
-{
-  struct wchar_iterator *iter = p;
-
-  iconv_close (iter->desc);
-  xfree (iter->out);
-  xfree (iter);
 }
 
-struct cleanup *
-make_cleanup_wchar_iterator (struct wchar_iterator *iter)
+wchar_iterator::~wchar_iterator ()
 {
-  return make_cleanup (do_cleanup_iterator, iter);
+  if (m_desc != (iconv_t) -1)
+    iconv_close (m_desc);
 }
 
 int
-wchar_iterate (struct wchar_iterator *iter,
-	       enum wchar_iterate_result *out_result,
-	       gdb_wchar_t **out_chars,
-	       const gdb_byte **ptr,
-	       size_t *len)
+wchar_iterator::iterate (enum wchar_iterate_result *out_result,
+			 gdb_wchar_t **out_chars,
+			 const gdb_byte **ptr,
+			 size_t *len)
 {
   size_t out_request;
 
@@ -645,17 +622,17 @@ wchar_iterate (struct wchar_iterator *it
      invalid input sequence -- but we want to reliably report this to
      our caller so it can emit an escape sequence.  */
   out_request = 1;
-  while (iter->bytes > 0)
+  while (m_bytes > 0)
     {
-      ICONV_CONST char *inptr = (ICONV_CONST char *) iter->input;
-      char *outptr = (char *) &iter->out[0];
-      const gdb_byte *orig_inptr = iter->input;
-      size_t orig_in = iter->bytes;
+      ICONV_CONST char *inptr = (ICONV_CONST char *) m_input;
+      char *outptr = (char *) m_out.data ();
+      const gdb_byte *orig_inptr = m_input;
+      size_t orig_in = m_bytes;
       size_t out_avail = out_request * sizeof (gdb_wchar_t);
       size_t num;
-      size_t r = iconv (iter->desc, &inptr, &iter->bytes, &outptr, &out_avail);
+      size_t r = iconv (m_desc, &inptr, &m_bytes, &outptr, &out_avail);
 
-      iter->input = (gdb_byte *) inptr;
+      m_input = (gdb_byte *) inptr;
 
       if (r == (size_t) -1)
 	{
@@ -670,10 +647,10 @@ wchar_iterate (struct wchar_iterator *it
 	      /* Otherwise skip the first invalid character, and let
 		 the caller know about it.  */
 	      *out_result = wchar_iterate_invalid;
-	      *ptr = iter->input;
-	      *len = iter->width;
-	      iter->input += iter->width;
-	      iter->bytes -= iter->width;
+	      *ptr = m_input;
+	      *len = m_width;
+	      m_input += m_width;
+	      m_bytes -= m_width;
 	      return 0;
 
 	    case E2BIG:
@@ -684,21 +661,17 @@ wchar_iterate (struct wchar_iterator *it
 		break;
 
 	      ++out_request;
-	      if (out_request > iter->out_size)
-		{
-		  iter->out_size = out_request;
-		  iter->out = xrealloc (iter->out,
-					out_request * sizeof (gdb_wchar_t));
-		}
+	      if (out_request > m_out.size ())
+		m_out.reserve (out_request);
 	      continue;
 
 	    case EINVAL:
 	      /* Incomplete input sequence.  Let the caller know, and
 		 arrange for future calls to see EOF.  */
 	      *out_result = wchar_iterate_incomplete;
-	      *ptr = iter->input;
-	      *len = iter->bytes;
-	      iter->bytes = 0;
+	      *ptr = m_input;
+	      *len = m_bytes;
+	      m_bytes = 0;
 	      return 0;
 
 	    default:
@@ -710,9 +683,9 @@ wchar_iterate (struct wchar_iterator *it
       /* We converted something.  */
       num = out_request - out_avail / sizeof (gdb_wchar_t);
       *out_result = wchar_iterate_ok;
-      *out_chars = iter->out;
+      *out_chars = m_out.data ();
       *ptr = orig_inptr;
-      *len = orig_in - iter->bytes;
+      *len = orig_in - m_bytes;
       return num;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset.h ./gdb/charset.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/charset.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Character set conversion support for GDB.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,8 @@
 #ifndef CHARSET_H
 #define CHARSET_H
 
+#include <vector>
+
 /* If the target program uses a different character set than the host,
    GDB has some support for translating between the two; GDB converts
    characters and strings to the host character set before displaying
@@ -81,54 +83,71 @@ enum wchar_iterate_result
     wchar_iterate_eof
   };
 
-/* Declaration of the opaque wchar iterator type.  */
-struct wchar_iterator;
-
-/* Create a new character iterator which returns wchar_t's.  INPUT is
-   the input buffer.  BYTES is the number of bytes in the input
-   buffer.  CHARSET is the name of the character set in which INPUT is
-   encoded.  WIDTH is the number of bytes in a base character of
-   CHARSET.
+/* An iterator that returns host wchar_t's from a target string.  */
+class wchar_iterator
+{
+ public:
+
+  /* Create a new character iterator which returns wchar_t's.  INPUT is
+     the input buffer.  BYTES is the number of bytes in the input
+     buffer.  CHARSET is the name of the character set in which INPUT is
+     encoded.  WIDTH is the number of bytes in a base character of
+     CHARSET.
    
-   This function either returns a new character set iterator, or calls
-   error.  The result can be freed using a cleanup; see
-   make_cleanup_wchar_iterator.  */
-struct wchar_iterator *make_wchar_iterator (const gdb_byte *input,
-					    size_t bytes,
-					    const char *charset,
-					    size_t width);
-
-/* Return a new cleanup suitable for destroying the wchar iterator
-   ITER.  */
-struct cleanup *make_cleanup_wchar_iterator (struct wchar_iterator *iter);
+     This function either returns a new character set iterator, or calls
+     error.  The result can be freed using a cleanup; see
+     make_cleanup_wchar_iterator.  */
+  wchar_iterator (const gdb_byte *input, size_t bytes, const char *charset,
+		  size_t width);
+
+  ~wchar_iterator ();
 
-/* Perform a single iteration of a wchar_t iterator.
+  /* Perform a single iteration of a wchar_t iterator.
    
-   Returns the number of characters converted.  A negative result
-   means that EOF has been reached.  A positive result indicates the
-   number of valid wchar_ts in the result; *OUT_CHARS is updated to
-   point to the first valid character.
-
-   In all cases aside from EOF, *PTR is set to point to the first
-   converted target byte.  *LEN is set to the number of bytes
-   converted.
-
-   A zero result means one of several unusual results.  *OUT_RESULT is
-   set to indicate the type of un-ordinary return.
-
-   wchar_iterate_invalid means that an invalid input character was
-   seen.  The iterator is advanced by WIDTH (the argument to
-   make_wchar_iterator) bytes.
+     Returns the number of characters converted.  A negative result
+     means that EOF has been reached.  A positive result indicates the
+     number of valid wchar_ts in the result; *OUT_CHARS is updated to
+     point to the first valid character.
+
+     In all cases aside from EOF, *PTR is set to point to the first
+     converted target byte.  *LEN is set to the number of bytes
+     converted.
+
+     A zero result means one of several unusual results.  *OUT_RESULT is
+     set to indicate the type of un-ordinary return.
+
+     wchar_iterate_invalid means that an invalid input character was
+     seen.  The iterator is advanced by WIDTH (the argument to
+     the wchar_iterator constructor) bytes.
 
-   wchar_iterate_incomplete means that an incomplete character was
-   seen at the end of the input sequence.
+     wchar_iterate_incomplete means that an incomplete character was
+     seen at the end of the input sequence.
    
-   wchar_iterate_eof means that all bytes were successfully
-   converted.  The other output arguments are not set.  */
-int wchar_iterate (struct wchar_iterator *iter,
-		   enum wchar_iterate_result *out_result,
-		   gdb_wchar_t **out_chars,
-		   const gdb_byte **ptr, size_t *len);
+     wchar_iterate_eof means that all bytes were successfully
+     converted.  The other output arguments are not set.  */
+  int iterate (enum wchar_iterate_result *out_result, gdb_wchar_t **out_chars,
+	       const gdb_byte **ptr, size_t *len);
+
+ private:
+
+  /* The underlying iconv descriptor.  */
+#ifdef PHONY_ICONV
+  int m_desc;
+#else
+  iconv_t m_desc;
+#endif
+
+  /* The input string.  This is updated as we convert characters.  */
+  const gdb_byte *m_input;
+  /* The number of bytes remaining in the input.  */
+  size_t m_bytes;
+
+  /* The width of an input character.  */
+  size_t m_width;
+
+  /* The output buffer.  */
+  std::vector<gdb_wchar_t> m_out;
+};
 
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset-list.h ./gdb/charset-list.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/charset-list.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/charset-list.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* List of character set names for GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-lang.c ./gdb/c-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* C language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -41,8 +41,7 @@ extern void _initialize_c_language (void
    character set name.  */
 
 static const char *
-charset_for_string_type (enum c_string_type str_type,
-			 struct gdbarch *gdbarch)
+charset_for_string_type (c_string_type str_type, struct gdbarch *gdbarch)
 {
   switch (str_type & ~C_CHAR)
     {
@@ -72,11 +71,11 @@ charset_for_string_type (enum c_string_t
    characters of this type in target BYTE_ORDER to the host character
    set.  */
 
-static enum c_string_type
+static c_string_type
 classify_type (struct type *elttype, struct gdbarch *gdbarch,
 	       const char **encoding)
 {
-  enum c_string_type result;
+  c_string_type result;
 
   /* We loop because ELTTYPE may be a typedef, and we want to
      successively peel each typedef until we reach a type we
@@ -124,7 +123,7 @@ classify_type (struct type *elttype, str
 	  /* Perhaps check_typedef did not update the target type.  In
 	     this case, force the lookup again and hope it works out.
 	     It never will for C, but it might for C++.  */
-	  CHECK_TYPEDEF (elttype);
+	  elttype = check_typedef (elttype);
 	}
     }
 
@@ -155,7 +154,7 @@ c_emit_char (int c, struct type *type,
 void
 c_printchar (int c, struct type *type, struct ui_file *stream)
 {
-  enum c_string_type str_type;
+  c_string_type str_type;
 
   str_type = classify_type (type, get_type_arch (type), NULL);
   switch (str_type)
@@ -191,7 +190,7 @@ c_printstr (struct ui_file *stream, stru
 	    const char *user_encoding, int force_ellipses,
 	    const struct value_print_options *options)
 {
-  enum c_string_type str_type;
+  c_string_type str_type;
   const char *type_encoding;
   const char *encoding;
 
@@ -302,7 +301,7 @@ c_get_string (struct value *value, gdb_b
       /* I is now either a user-defined length, the number of non-null
  	 characters, or FETCHLIMIT.  */
       *length = i * width;
-      *buffer = xmalloc (*length);
+      *buffer = (gdb_byte *) xmalloc (*length);
       memcpy (*buffer, contents, *length);
       err = 0;
     }
@@ -327,10 +326,10 @@ c_get_string (struct value *value, gdb_b
 
       err = read_string (addr, *length, width, fetchlimit,
 			 byte_order, buffer, length);
-      if (err)
+      if (err != 0)
 	{
 	  xfree (*buffer);
-	  memory_error (err, addr);
+	  memory_error (TARGET_XFER_E_IO, addr);
 	}
     }
 
@@ -357,14 +356,11 @@ c_get_string (struct value *value, gdb_b
 
  error:
   {
-    char *type_str;
-
-    type_str = type_to_string (type);
-    if (type_str)
+    std::string type_str = type_to_string (type);
+    if (!type_str.empty ())
       {
-	make_cleanup (xfree, type_str);
 	error (_("Trying to read string with inappropriate type `%s'."),
-	       type_str);
+	       type_str.c_str ());
       }
     else
       error (_("Trying to read string with inappropriate type."));
@@ -412,7 +408,7 @@ emit_numeric_character (struct type *typ
 {
   gdb_byte *buffer;
 
-  buffer = alloca (TYPE_LENGTH (type));
+  buffer = (gdb_byte *) alloca (TYPE_LENGTH (type));
   pack_long (buffer, type, value);
   obstack_grow (output, buffer, TYPE_LENGTH (type));
 }
@@ -577,7 +573,7 @@ evaluate_subexp_c (struct type *expect_t
 	struct obstack output;
 	struct cleanup *cleanup;
 	struct value *result;
-	enum c_string_type dest_type;
+	c_string_type dest_type;
 	const char *dest_charset;
 	int satisfy_expected = 0;
 
@@ -589,8 +585,8 @@ evaluate_subexp_c (struct type *expect_t
 
 	++*pos;
 	limit = *pos + BYTES_TO_EXP_ELEM (oplen + 1);
-	dest_type
-	  = (enum c_string_type) longest_to_int (exp->elts[*pos].longconst);
+	dest_type = ((enum c_string_type_values)
+		     longest_to_int (exp->elts[*pos].longconst));
 	switch (dest_type & ~C_CHAR)
 	  {
 	  case C_STRING:
@@ -702,7 +698,7 @@ evaluate_subexp_c (struct type *expect_t
 			obstack_object_size (&output));
 	      }
 	    else
-	      result = value_cstring (obstack_base (&output),
+	      result = value_cstring ((const char *) obstack_base (&output),
 				      obstack_object_size (&output),
 				      type);
 	  }
@@ -754,7 +750,7 @@ const struct op_print c_op_print_tab[] =
   {"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
   {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
   {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_PREFIX, 0}
 };
 
 enum c_primitive_types {
@@ -825,6 +821,11 @@ const struct exp_descriptor exp_descript
   evaluate_subexp_c
 };
 
+static const char *c_extensions[] =
+{
+  ".c", NULL
+};
+
 const struct language_defn c_language_defn =
 {
   "c",				/* Language name */
@@ -834,9 +835,10 @@ const struct language_defn c_language_de
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  c_extensions,
   &exp_descriptor_c,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant */
   c_printstr,			/* Function to print string constant */
@@ -851,6 +853,7 @@ const struct language_defn c_language_de
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   c_op_print_tab,		/* expression operators for printing */
@@ -952,6 +955,11 @@ cplus_language_arch_info (struct gdbarch
   lai->bool_type_default = builtin->builtin_bool;
 }
 
+static const char *cplus_extensions[] =
+{
+  ".C", ".cc", ".cp", ".cpp", ".cxx", ".c++", NULL
+};
+
 const struct language_defn cplus_language_defn =
 {
   "c++",			/* Language name */
@@ -961,9 +969,10 @@ const struct language_defn cplus_languag
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  cplus_extensions,
   &exp_descriptor_c,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant */
   c_printstr,			/* Function to print string constant */
@@ -978,6 +987,7 @@ const struct language_defn cplus_languag
   cp_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   cp_lookup_transparent_type,   /* lookup_transparent_type */
   gdb_demangle,			/* Language specific symbol demangler */
+  gdb_sniff_from_mangled_name,
   cp_class_name_from_physname,  /* Language specific
 				   class_name_from_physname */
   c_op_print_tab,		/* expression operators for printing */
@@ -997,6 +1007,11 @@ const struct language_defn cplus_languag
   LANG_MAGIC
 };
 
+static const char *asm_extensions[] =
+{
+  ".s", ".sx", ".S", NULL
+};
+
 const struct language_defn asm_language_defn =
 {
   "asm",			/* Language name */
@@ -1006,9 +1021,10 @@ const struct language_defn asm_language_
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  asm_extensions,
   &exp_descriptor_c,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant */
   c_printstr,			/* Function to print string constant */
@@ -1023,6 +1039,7 @@ const struct language_defn asm_language_
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   c_op_print_tab,		/* expression operators for printing */
@@ -1056,9 +1073,10 @@ const struct language_defn minimal_langu
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  NULL,
   &exp_descriptor_c,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant */
   c_printstr,			/* Function to print string constant */
@@ -1073,6 +1091,7 @@ const struct language_defn minimal_langu
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   c_op_print_tab,		/* expression operators for printing */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-lang.h ./gdb/c-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* C language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,12 +29,13 @@ struct parser_state;
 #include "value.h"
 #include "macroexp.h"
 #include "parser-defs.h"
+#include "common/enum-flags.h"
 
 
 /* The various kinds of C string and character.  Note that these
    values are chosen so that they may be or'd together in certain
    ways.  */
-enum c_string_type
+enum c_string_type_values
   {
     /* An ordinary string: "value".  */
     C_STRING = 0,
@@ -56,11 +57,13 @@ enum c_string_type
     C_CHAR_32 = 7
   };
 
+DEF_ENUM_FLAGS_TYPE (enum c_string_type_values, c_string_type);
+
 /* Defined in c-exp.y.  */
 
 extern int c_parse (struct parser_state *);
 
-extern void c_error (char *);
+extern void c_yyerror (char *);
 
 extern int c_parse_escape (const char **, struct obstack *);
 
@@ -73,10 +76,10 @@ extern void c_print_typedef (struct type
 			     struct symbol *,
 			     struct ui_file *);
 
-extern void c_val_print (struct type *, const gdb_byte *,
+extern void c_val_print (struct type *,
 			 int, CORE_ADDR,
 			 struct ui_file *, int,
-			 const struct value *,
+			 struct value *,
 			 const struct value_print_options *);
 
 extern void c_value_print (struct value *, struct ui_file *,
@@ -120,16 +123,16 @@ extern void cp_print_class_member (const
 				   struct ui_file *, char *);
 
 extern void cp_print_value_fields (struct type *, struct type *,
-				   const gdb_byte *, int, CORE_ADDR,
+				   LONGEST, CORE_ADDR,
 				   struct ui_file *, int,
-				   const struct value *,
+				   struct value *,
 				   const struct value_print_options *,
 				   struct type **, int);
 
 extern void cp_print_value_fields_rtti (struct type *,
-					const gdb_byte *, int, CORE_ADDR,
+					const gdb_byte *, LONGEST, CORE_ADDR,
 					struct ui_file *, int,
-					const struct value *,
+					struct value *,
 					const struct value_print_options *,
 					struct type **, int);
 
@@ -149,16 +152,16 @@ extern int c_textual_element_type (struc
 
 extern struct compile_instance *c_get_compile_context (void);
 
-/* This takes the user-supplied text and returns a newly malloc'd bit
-   of code to compile.
+/* This takes the user-supplied text and returns a new bit of code to
+   compile.
 
    This is used as the la_compute_program language method; see that
    for a description of the arguments.  */
 
-extern char *c_compute_program (struct compile_instance *inst,
-				const char *input,
-				struct gdbarch *gdbarch,
-				const struct block *expr_block,
-				CORE_ADDR expr_pc);
+extern std::string c_compute_program (struct compile_instance *inst,
+				      const char *input,
+				      struct gdbarch *gdbarch,
+				      const struct block *expr_block,
+				      CORE_ADDR expr_pc);
 
 #endif /* !defined (C_LANG_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-cmds.c ./gdb/cli/cli-cmds.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-cmds.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-cmds.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB CLI commands.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "dyn-string.h"
 #include "readline/readline.h"
 #include "readline/tilde.h"
 #include "completer.h"
@@ -38,6 +37,7 @@
 #include "disasm.h"
 #include "tracepoint.h"
 #include "filestuff.h"
+#include "location.h"
 
 #include "ui-out.h"
 
@@ -55,6 +55,8 @@
 #endif
 
 #include <fcntl.h>
+#include <algorithm>
+#include <string>
 
 /* Prototypes for local command functions */
 
@@ -252,7 +254,7 @@ complete_command (char *arg, int from_tt
     {
       /* Only print this for non-mi frontends.  An MI frontend may not
 	 be able to handle this.  */
-      if (!ui_out_is_mi_like_p (current_uiout))
+      if (!current_uiout->is_mi_like_p ())
 	{
 	  printf_unfiltered (_("max-completions is zero,"
 			       " completion is disabled.\n"));
@@ -276,7 +278,7 @@ complete_command (char *arg, int from_tt
       point--;
     }
 
-  arg_prefix = alloca (point - arg + 1);
+  arg_prefix = (char *) alloca (point - arg + 1);
   memcpy (arg_prefix, arg, point - arg);
   arg_prefix[point - arg] = 0;
 
@@ -342,12 +344,23 @@ show_configuration (char *args, int from
 void
 quit_command (char *args, int from_tty)
 {
+  int exit_code = 0;
+
+  /* An optional expression may be used to cause gdb to terminate with
+     the value of that expression.  */
+  if (args)
+    {
+      struct value *val = parse_and_eval (args);
+
+      exit_code = (int) value_as_long (val);
+    }
+
   if (!quit_confirm ())
     error (_("Not confirmed."));
 
   query_if_trace_running (from_tty);
 
-  quit_force (args, from_tty);
+  quit_force (args ? &exit_code : NULL, from_tty);
 }
 
 static void
@@ -537,10 +550,16 @@ find_and_open_script (const char *script
   return 1;
 }
 
-/* Load script FILE, which has already been opened as STREAM.  */
+/* Load script FILE, which has already been opened as STREAM.
+   FILE_TO_OPEN is the form of FILE to use if one needs to open the file.
+   This is provided as FILE may have been found via the source search path.
+   An important thing to note here is that FILE may be a symlink to a file
+   with a different or non-existing suffix, and thus one cannot infer the
+   extension language from FILE_TO_OPEN.  */
 
 static void
-source_script_from_stream (FILE *stream, const char *file)
+source_script_from_stream (FILE *stream, const char *file,
+			   const char *file_to_open)
 {
   if (script_ext_mode != script_ext_off)
     {
@@ -555,7 +574,7 @@ source_script_from_stream (FILE *stream,
 		= ext_lang_script_sourcer (extlang);
 
 	      gdb_assert (sourcer != NULL);
-	      sourcer (extlang, stream, file);
+	      sourcer (extlang, stream, file_to_open);
 	      return;
 	    }
 	  else if (script_ext_mode == script_ext_soft)
@@ -608,7 +627,7 @@ source_script_with_search (const char *f
      anyway so that error messages show the actual file used.  But only do
      this if we (may have) used search_path, as printing the full path in
      errors for the non-search case can be more noise than signal.  */
-  source_script_from_stream (stream, search_path ? full_path : file);
+  source_script_from_stream (stream, file, search_path ? full_path : file);
   do_cleanups (old_cleanups);
 }
 
@@ -635,7 +654,7 @@ source_command (char *args, int from_tty
 {
   struct cleanup *old_cleanups;
   char *file = args;
-  int *old_source_verbose = xmalloc (sizeof(int));
+  int *old_source_verbose = XNEW (int);
   int search_path = 0;
 
   *old_source_verbose = source_verbose;
@@ -782,7 +801,6 @@ edit_command (char *arg, int from_tty)
   struct symtabs_and_lines sals;
   struct symtab_and_line sal;
   struct symbol *sym;
-  char *arg1;
   char *editor;
   char *p;
   const char *fn;
@@ -804,21 +822,28 @@ edit_command (char *arg, int from_tty)
     }
   else
     {
-      /* Now should only be one argument -- decode it in SAL.  */
+      struct cleanup *cleanup;
+      struct event_location *location;
+      char *arg1;
 
+      /* Now should only be one argument -- decode it in SAL.  */
       arg1 = arg;
-      sals = decode_line_1 (&arg1, DECODE_LINE_LIST_MODE, 0, 0);
+      location = string_to_event_location (&arg1, current_language);
+      cleanup = make_cleanup_delete_event_location (location);
+      sals = decode_line_1 (location, DECODE_LINE_LIST_MODE, NULL, NULL, 0);
 
       filter_sals (&sals);
       if (! sals.nelts)
 	{
 	  /*  C++  */
+	  do_cleanups (cleanup);
 	  return;
 	}
       if (sals.nelts > 1)
 	{
 	  ambiguous_line_spec (&sals);
 	  xfree (sals.sals);
+	  do_cleanups (cleanup);
 	  return;
 	}
 
@@ -860,6 +885,7 @@ edit_command (char *arg, int from_tty)
 
       if (sal.symtab == 0)
         error (_("No line number known for %s."), arg);
+      do_cleanups (cleanup);
     }
 
   if ((editor = (char *) getenv ("EDITOR")) == NULL)
@@ -888,9 +914,12 @@ list_command (char *arg, int from_tty)
   int dummy_beg = 0;
   int linenum_beg = 0;
   char *p;
+  struct cleanup *cleanup;
+
+  cleanup = make_cleanup (null_cleanup, NULL);
 
   /* Pull in the current default source line if necessary.  */
-  if (arg == 0 || arg[0] == '+' || arg[0] == '-')
+  if (arg == NULL || ((arg[0] == '+' || arg[0] == '-') && arg[1] == '\0'))
     {
       set_default_source_symtab_and_line ();
       cursal = get_current_source_symtab_and_line ();
@@ -901,7 +930,7 @@ list_command (char *arg, int from_tty)
 	{
 	  int first;
 
-	  first = max (cursal.line - get_lines_to_list () / 2, 1);
+	  first = std::max (cursal.line - get_lines_to_list () / 2, 1);
 
 	  /* A small special case --- if listing backwards, and we
 	     should list only one line, list the preceding line,
@@ -913,27 +942,26 @@ list_command (char *arg, int from_tty)
 
 	  print_source_lines (cursal.symtab, first,
 			      first + get_lines_to_list (), 0);
-	  return;
 	}
-    }
-
-  /* "l" or "l +" lists next ten lines.  */
 
-  if (arg == 0 || strcmp (arg, "+") == 0)
-    {
-      print_source_lines (cursal.symtab, cursal.line,
-			  cursal.line + get_lines_to_list (), 0);
-      return;
-    }
+      /* "l" or "l +" lists next ten lines.  */
+      else if (arg == NULL || arg[0] == '+')
+	print_source_lines (cursal.symtab, cursal.line,
+			    cursal.line + get_lines_to_list (), 0);
+
+      /* "l -" lists previous ten lines, the ones before the ten just
+	 listed.  */
+      else if (arg[0] == '-')
+	{
+	  if (get_first_line_listed () == 1)
+	    error (_("Already at the start of %s."),
+		   symtab_to_filename_for_display (cursal.symtab));
+	  print_source_lines (cursal.symtab,
+			      std::max (get_first_line_listed ()
+					- get_lines_to_list (), 1),
+			      get_first_line_listed (), 0);
+	}
 
-  /* "l -" lists previous ten lines, the ones before the ten just
-     listed.  */
-  if (strcmp (arg, "-") == 0)
-    {
-      print_source_lines (cursal.symtab,
-			  max (get_first_line_listed () 
-			       - get_lines_to_list (), 1),
-			  get_first_line_listed (), 0);
       return;
     }
 
@@ -951,15 +979,24 @@ list_command (char *arg, int from_tty)
     dummy_beg = 1;
   else
     {
-      sals = decode_line_1 (&arg1, DECODE_LINE_LIST_MODE, 0, 0);
+      struct event_location *location;
+
+      location = string_to_event_location (&arg1, current_language);
+      make_cleanup_delete_event_location (location);
+      sals = decode_line_1 (location, DECODE_LINE_LIST_MODE, NULL, NULL, 0);
 
       filter_sals (&sals);
       if (!sals.nelts)
-	return;			/*  C++  */
+	{
+	  /*  C++  */
+	  do_cleanups (cleanup);
+	  return;
+	}
       if (sals.nelts > 1)
 	{
 	  ambiguous_line_spec (&sals);
 	  xfree (sals.sals);
+	  do_cleanups (cleanup);
 	  return;
 	}
 
@@ -984,18 +1021,28 @@ list_command (char *arg, int from_tty)
 	dummy_end = 1;
       else
 	{
+	  struct event_location *location;
+
+	  location = string_to_event_location (&arg1, current_language);
+	  make_cleanup_delete_event_location (location);
 	  if (dummy_beg)
-	    sals_end = decode_line_1 (&arg1, DECODE_LINE_LIST_MODE, 0, 0);
+	    sals_end = decode_line_1 (location,
+				      DECODE_LINE_LIST_MODE, NULL, NULL, 0);
 	  else
-	    sals_end = decode_line_1 (&arg1, DECODE_LINE_LIST_MODE,
-				      sal.symtab, sal.line);
+	    sals_end = decode_line_1 (location, DECODE_LINE_LIST_MODE,
+				      NULL, sal.symtab, sal.line);
+
 	  filter_sals (&sals_end);
 	  if (sals_end.nelts == 0)
-	    return;
+	    {
+	      do_cleanups (cleanup);
+	      return;
+	    }
 	  if (sals_end.nelts > 1)
 	    {
 	      ambiguous_line_spec (&sals_end);
 	      xfree (sals_end.sals);
+	      do_cleanups (cleanup);
 	      return;
 	    }
 	  sal_end = sals_end.sals[0];
@@ -1055,7 +1102,7 @@ list_command (char *arg, int from_tty)
     error (_("No default source file yet.  Do \"help list\"."));
   if (dummy_beg)
     print_source_lines (sal_end.symtab,
-			max (sal_end.line - (get_lines_to_list () - 1), 1),
+			std::max (sal_end.line - (get_lines_to_list () - 1), 1),
 			sal_end.line + 1, 0);
   else if (sal.symtab == 0)
     error (_("No default source file yet.  Do \"help list\"."));
@@ -1076,6 +1123,7 @@ list_command (char *arg, int from_tty)
 			 ? sal.line + get_lines_to_list ()
 			 : sal_end.line + 1),
 			0);
+  do_cleanups (cleanup);
 }
 
 /* Subroutine of disassemble_command to simplify it.
@@ -1100,7 +1148,7 @@ print_disassembly (struct gdbarch *gdbar
 			 paddress (gdbarch, low), paddress (gdbarch, high));
 
       /* Dump the specified range.  */
-      gdb_disassembly (gdbarch, current_uiout, 0, flags, -1, low, high);
+      gdb_disassembly (gdbarch, current_uiout, flags, -1, low, high);
 
       printf_filtered ("End of assembler dump.\n");
       gdb_flush (gdb_stdout);
@@ -1144,16 +1192,26 @@ disassemble_current_function (int flags)
 /* Dump a specified section of assembly code.
 
    Usage:
-     disassemble [/mr]
+     disassemble [/mrs]
        - dump the assembly code for the function of the current pc
-     disassemble [/mr] addr
+     disassemble [/mrs] addr
        - dump the assembly code for the function at ADDR
-     disassemble [/mr] low,high
-     disassemble [/mr] low,+length
+     disassemble [/mrs] low,high
+     disassemble [/mrs] low,+length
        - dump the assembly code in the range [LOW,HIGH), or [LOW,LOW+length)
 
-   A /m modifier will include source code with the assembly.
-   A /r modifier will include raw instructions in hex with the assembly.  */
+   A /m modifier will include source code with the assembly in a
+   "source centric" view.  This view lists only the file of the first insn,
+   even if other source files are involved (e.g., inlined functions), and
+   the output is in source order, even with optimized code.  This view is
+   considered deprecated as it hasn't been useful in practice.
+
+   A /r modifier will include raw instructions in hex with the assembly.
+
+   A /s modifier will include source code with the assembly, like /m, with
+   two important differences:
+   1) The output is still in pc address order.
+   2) File names and contents for all relevant source files are displayed.  */
 
 static void
 disassemble_command (char *arg, int from_tty)
@@ -1181,11 +1239,14 @@ disassemble_command (char *arg, int from
 	  switch (*p++)
 	    {
 	    case 'm':
-	      flags |= DISASSEMBLY_SOURCE;
+	      flags |= DISASSEMBLY_SOURCE_DEPRECATED;
 	      break;
 	    case 'r':
 	      flags |= DISASSEMBLY_RAW_INSN;
 	      break;
+	    case 's':
+	      flags |= DISASSEMBLY_SOURCE;
+	      break;
 	    default:
 	      error (_("Invalid disassembly modifier."));
 	    }
@@ -1194,6 +1255,10 @@ disassemble_command (char *arg, int from
       p = skip_spaces_const (p);
     }
 
+  if ((flags & (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
+      == (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
+    error (_("Cannot specify both /m and /s."));
+
   if (! p || ! *p)
     {
       flags |= DISASSEMBLY_OMIT_FNAME;
@@ -1247,7 +1312,7 @@ make_command (char *arg, int from_tty)
     p = "make";
   else
     {
-      p = xmalloc (sizeof ("make ") + strlen (arg));
+      p = (char *) xmalloc (sizeof ("make ") + strlen (arg));
       strcpy (p, "make ");
       strcpy (p + sizeof ("make ") - 1, arg);
     }
@@ -1317,11 +1382,11 @@ apropos_command (char *searchstr, int fr
    This does not take care of quoting elements in case they contain spaces
    on purpose.  */
 
-static dyn_string_t
-argv_to_dyn_string (char **argv, int n)
+static std::string
+argv_to_string (char **argv, int n)
 {
   int i;
-  dyn_string_t result = dyn_string_new (10);
+  std::string result;
 
   gdb_assert (argv != NULL);
   gdb_assert (n >= 0 && n <= countargv (argv));
@@ -1329,8 +1394,8 @@ argv_to_dyn_string (char **argv, int n)
   for (i = 0; i < n; ++i)
     {
       if (i > 0)
-	dyn_string_append_char (result, ' ');
-      dyn_string_append_cstr (result, argv[i]);
+	result += " ";
+      result += argv[i];
     }
 
   return result;
@@ -1357,6 +1422,14 @@ valid_command_p (const char *command)
   return *command == '\0';
 }
 
+/* Called when "alias" was incorrectly used.  */
+
+static void
+alias_usage_error (void)
+{
+  error (_("Usage: alias [-a] [--] ALIAS = COMMAND"));
+}
+
 /* Make an alias of an existing command.  */
 
 static void
@@ -1364,14 +1437,13 @@ alias_command (char *args, int from_tty)
 {
   int i, alias_argc, command_argc;
   int abbrev_flag = 0;
-  char *args2, *equals, *alias, *command;
+  char *args2, *equals;
+  const char *alias, *command;
   char **alias_argv, **command_argv;
-  dyn_string_t alias_dyn_string, command_dyn_string;
   struct cleanup *cleanup;
-  static const char usage[] = N_("Usage: alias [-a] [--] ALIAS = COMMAND");
 
   if (args == NULL || strchr (args, '=') == NULL)
-    error (_(usage));
+    alias_usage_error ();
 
   args2 = xstrdup (args);
   cleanup = make_cleanup (xfree, args2);
@@ -1400,7 +1472,7 @@ alias_command (char *args, int from_tty)
 
   if (alias_argv[0] == NULL || command_argv[0] == NULL
       || *alias_argv[0] == '\0' || *command_argv[0] == '\0')
-    error (_(usage));
+    alias_usage_error ();
 
   for (i = 0; alias_argv[i] != NULL; ++i)
     {
@@ -1419,16 +1491,14 @@ alias_command (char *args, int from_tty)
   /* COMMAND must exist.
      Reconstruct the command to remove any extraneous spaces,
      for better error messages.  */
-  command_dyn_string = argv_to_dyn_string (command_argv, command_argc);
-  make_cleanup_dyn_string_delete (command_dyn_string);
-  command = dyn_string_buf (command_dyn_string);
+  std::string command_string (argv_to_string (command_argv, command_argc));
+  command = command_string.c_str ();
   if (! valid_command_p (command))
     error (_("Invalid command to alias to: %s"), command);
 
   /* ALIAS must not exist.  */
-  alias_dyn_string = argv_to_dyn_string (alias_argv, alias_argc);
-  make_cleanup_dyn_string_delete (alias_dyn_string);
-  alias = dyn_string_buf (alias_dyn_string);
+  std::string alias_string (argv_to_string (alias_argv, alias_argc));
+  alias = alias_string.c_str ();
   if (valid_command_p (alias))
     error (_("Alias already exists: %s"), alias);
 
@@ -1449,7 +1519,6 @@ alias_command (char *args, int from_tty)
     }
   else
     {
-      dyn_string_t alias_prefix_dyn_string, command_prefix_dyn_string;
       const char *alias_prefix, *command_prefix;
       struct cmd_list_element *c_alias, *c_command;
 
@@ -1458,14 +1527,12 @@ alias_command (char *args, int from_tty)
 
       /* Create copies of ALIAS and COMMAND without the last word,
 	 and use that to verify the leading elements match.  */
-      alias_prefix_dyn_string =
-	argv_to_dyn_string (alias_argv, alias_argc - 1);
-      make_cleanup_dyn_string_delete (alias_prefix_dyn_string);
-      command_prefix_dyn_string =
-	argv_to_dyn_string (alias_argv, command_argc - 1);
-      make_cleanup_dyn_string_delete (command_prefix_dyn_string);
-      alias_prefix = dyn_string_buf (alias_prefix_dyn_string);
-      command_prefix = dyn_string_buf (command_prefix_dyn_string);
+      std::string alias_prefix_string (argv_to_string (alias_argv,
+						       alias_argc - 1));
+      std::string command_prefix_string (argv_to_string (alias_argv,
+							 command_argc - 1));
+      alias_prefix = alias_prefix_string.c_str ();
+      command_prefix = command_prefix_string.c_str ();
 
       c_command = lookup_cmd_1 (& command_prefix, cmdlist, NULL, 1);
       /* We've already tried to look up COMMAND.  */
@@ -1506,8 +1573,8 @@ ambiguous_line_spec (struct symtabs_and_
 static int
 compare_symtabs (const void *a, const void *b)
 {
-  const struct symtab_and_line *sala = a;
-  const struct symtab_and_line *salb = b;
+  const struct symtab_and_line *sala = (const struct symtab_and_line *) a;
+  const struct symtab_and_line *salb = (const struct symtab_and_line *) b;
   const char *dira = SYMTAB_DIRNAME (sala->symtab);
   const char *dirb = SYMTAB_DIRNAME (salb->symtab);
   int r;
@@ -1843,8 +1910,12 @@ Lines can be specified in these ways:\n\
   FUNCTION, to list around beginning of that function,\n\
   FILE:FUNCTION, to distinguish among like-named static functions.\n\
   *ADDRESS, to list around the line containing that address.\n\
-With two args if one is empty it stands for ten lines away from \
-the other arg."));
+With two args, if one is empty, it stands for ten lines away from\n\
+the other arg.\n\
+\n\
+By default, when a single location is given, display ten lines.\n\
+This can be changed using \"set listsize\", and the current value\n\
+can be shown using \"show listsize\"."));
 
   add_com_alias ("l", "list", class_files, 1);
 
@@ -1854,8 +1925,21 @@ the other arg."));
   c = add_com ("disassemble", class_vars, disassemble_command, _("\
 Disassemble a specified section of memory.\n\
 Default is the function surrounding the pc of the selected frame.\n\
+\n\
 With a /m modifier, source lines are included (if available).\n\
+This view is \"source centric\": the output is in source line order,\n\
+regardless of any optimization that is present.  Only the main source file\n\
+is displayed, not those of, e.g., any inlined functions.\n\
+This modifier hasn't proved useful in practice and is deprecated\n\
+in favor of /s.\n\
+\n\
+With a /s modifier, source lines are included (if available).\n\
+This differs from /m in two important respects:\n\
+- the output is still in pc address order, and\n\
+- file names and contents for all relevant source files are displayed.\n\
+\n\
 With a /r modifier, raw instructions in hex are included.\n\
+\n\
 With a single argument, the function surrounding that address is dumped.\n\
 Two arguments (separated by a comma) are taken as a range of memory to dump,\n\
   in the form of \"start,end\", or \"start,+length\".\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-cmds.h ./gdb/cli/cli-cmds.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-cmds.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-cmds.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file for GDB CLI command implementation library.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-decode.c ./gdb/cli/cli-decode.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-decode.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-decode.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle lists of commands, their decoding and documentation, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -192,8 +192,7 @@ struct cmd_list_element *
 add_cmd (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
 	 const char *doc, struct cmd_list_element **list)
 {
-  struct cmd_list_element *c
-    = (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
+  struct cmd_list_element *c = XNEW (struct cmd_list_element);
   struct cmd_list_element *p, *iter;
 
   /* Turn each alias of the old command into an alias of the new
@@ -254,6 +253,7 @@ add_cmd (const char *name, enum command_
   c->user_commands = NULL;
   c->cmd_pointer = NULL;
   c->alias_chain = NULL;
+  c->suppress_notification = NULL;
 
   return c;
 }
@@ -856,7 +856,7 @@ delete_cmd (const char *name, struct cmd
 struct cmd_list_element *
 add_info (const char *name, cmd_cfunc_ftype *fun, const char *doc)
 {
-  return add_cmd (name, no_class, fun, doc, &infolist);
+  return add_cmd (name, class_info, fun, doc, &infolist);
 }
 
 /* Add an alias to the list of info subcommands.  */
@@ -864,7 +864,7 @@ add_info (const char *name, cmd_cfunc_ft
 struct cmd_list_element *
 add_info_alias (const char *name, const char *oldname, int abbrev_flag)
 {
-  return add_alias_cmd (name, oldname, 0, abbrev_flag, &infolist);
+  return add_alias_cmd (name, oldname, class_run, abbrev_flag, &infolist);
 }
 
 /* Add an element to the list of commands.  */
@@ -884,7 +884,22 @@ add_com_alias (const char *name, const c
 {
   return add_alias_cmd (name, oldname, theclass, abbrev_flag, &cmdlist);
 }
-
+
+/* Add an element with a suppress notification to the list of commands.  */
+
+struct cmd_list_element *
+add_com_suppress_notification (const char *name, enum command_class theclass,
+			       cmd_cfunc_ftype *fun, const char *doc,
+			       int *suppress_notification)
+{
+  struct cmd_list_element *element;
+
+  element = add_cmd (name, theclass, fun, doc, &cmdlist);
+  element->suppress_notification = suppress_notification;
+
+  return element;
+}
+
 /* Recursively walk the commandlist structures, and print out the
    documentation of commands that match our regex in either their
    name, or their documentation.
@@ -1176,7 +1191,7 @@ print_help_for_command (struct cmd_list_
  * all sublists of LIST.
  * PREFIX is the prefix to print before each command name.
  * STREAM is the stream upon which the output should be written.
- * CLASS should be:
+ * THECLASS should be:
  *      A non-negative class number to list only commands in that
  * class.
  *      ALL_COMMANDS to list all commands in list.
@@ -1193,15 +1208,18 @@ help_cmd_list (struct cmd_list_element *
   struct cmd_list_element *c;
 
   for (c = list; c; c = c->next)
-    {      
+    {
       if (c->abbrev_flag == 0
+	  && !c->cmd_deprecated
 	  && (theclass == all_commands
 	      || (theclass == all_classes && c->func == NULL)
 	      || (theclass == c->theclass && c->func != NULL)))
 	{
 	  print_help_for_command (c, prefix, recurse, stream);
 	}
-      else if (c->abbrev_flag == 0 && recurse
+      else if (c->abbrev_flag == 0
+	       && recurse
+	       && !c->cmd_deprecated
 	       && theclass == class_user && c->prefixlist != NULL)
 	/* User-defined commands may be subcommands.  */
 	help_cmd_list (*c->prefixlist, theclass, c->prefixname,
@@ -1220,7 +1238,7 @@ find_cmd (const char *command, int len, 
 {
   struct cmd_list_element *found, *c;
 
-  found = (struct cmd_list_element *) NULL;
+  found = NULL;
   *nfound = 0;
   for (c = clist; c; c = c->next)
     if (!strncmp (command, c->name, len)
@@ -1237,7 +1255,9 @@ find_cmd (const char *command, int len, 
   return found;
 }
 
-static int
+/* Return the length of command name in TEXT.  */
+
+int
 find_command_name_length (const char *text)
 {
   const char *p = text;
@@ -1313,7 +1333,7 @@ valid_user_defined_cmd_name_p (const cha
    if no prefix command was ever found.  For example, in the case of "info a",
    "info" matches without ambiguity, but "a" could be "args" or "address", so
    *RESULT_LIST is set to the cmd_list_element for "info".  So in this case
-   RESULT_LIST should not be interpeted as a pointer to the beginning of a
+   RESULT_LIST should not be interpreted as a pointer to the beginning of a
    list; it simply points to a specific command.  In the case of an ambiguous
    return *TEXT is advanced past the last non-ambiguous prefix (e.g.
    "info t" can be "info types" or "info target"; upon return *TEXT has been
@@ -1360,19 +1380,6 @@ lookup_cmd_1 (const char **text, struct 
   nfound = 0;
   found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
 
-  /* We didn't find the command in the entered case, so lower case it
-     and search again.  */
-  if (!found || nfound == 0)
-    {
-      for (tmp = 0; tmp < len; tmp++)
-	{
-	  char x = command[tmp];
-
-	  command[tmp] = isupper (x) ? tolower (x) : x;
-	}
-      found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
-    }
-
   /* If nothing matches, we have a simple failure.  */
   if (nfound == 0)
     return 0;
@@ -1713,20 +1720,6 @@ lookup_cmd_composition (const char *text
       nfound = 0;
       *cmd = find_cmd (command, len, cur_list, 1, &nfound);
       
-      /* We didn't find the command in the entered case, so lower case
-	 it and search again.
-      */
-      if (!*cmd || nfound == 0)
-	{
-	  for (tmp = 0; tmp < len; tmp++)
-	    {
-	      char x = command[tmp];
-
-	      command[tmp] = isupper (x) ? tolower (x) : x;
-	    }
-	  *cmd = find_cmd (command, len, cur_list, 1, &nfound);
-	}
-      
       if (*cmd == CMD_LIST_AMBIGUOUS)
 	{
 	  return 0;              /* ambiguous */
@@ -1883,7 +1876,19 @@ void
 cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
 {
   if (cmd_func_p (cmd))
-    (*cmd->func) (cmd, args, from_tty);
+    {
+      struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+
+      if (cmd->suppress_notification != NULL)
+	{
+	  make_cleanup_restore_integer (cmd->suppress_notification);
+	  *cmd->suppress_notification = 1;
+	}
+
+      (*cmd->func) (cmd, args, from_tty);
+
+      do_cleanups (cleanups);
+    }
   else
     error (_("Invalid command"));
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-decode.h ./gdb/cli/cli-decode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-decode.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-decode.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Header file for GDB command decoding library.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -218,6 +218,12 @@ struct cmd_list_element
 
     /* Link pointer for aliases on an alias list.  */
     struct cmd_list_element *alias_chain;
+
+    /* If non-null, the pointer to a field in 'struct
+       cli_suppress_notification', which will be set to true in cmd_func
+       when this command is being executed.  It will be set back to false
+       when the command has been executed.  */
+    int *suppress_notification;
   };
 
 extern void help_cmd_list (struct cmd_list_element *, enum command_class,
@@ -247,4 +253,6 @@ extern const char * const auto_boolean_e
 
 extern int cli_user_command_p (struct cmd_list_element *);
 
+extern int find_command_name_length (const char *);
+
 #endif /* !defined (CLI_DECODE_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-dump.c ./gdb/cli/cli-dump.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-dump.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-dump.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Dump-to-file commands, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -103,45 +103,40 @@ fopen_with_cleanup (const char *filename
   return file;
 }
 
-static bfd *
-bfd_openr_with_cleanup (const char *filename, const char *target)
+static gdb_bfd_ref_ptr
+bfd_openr_or_error (const char *filename, const char *target)
 {
-  bfd *ibfd;
-
-  ibfd = gdb_bfd_openr (filename, target);
+  gdb_bfd_ref_ptr ibfd (gdb_bfd_openr (filename, target));
   if (ibfd == NULL)
-    error (_("Failed to open %s: %s."), filename, 
+    error (_("Failed to open %s: %s."), filename,
 	   bfd_errmsg (bfd_get_error ()));
 
-  make_cleanup_bfd_unref (ibfd);
-  if (!bfd_check_format (ibfd, bfd_object))
+  if (!bfd_check_format (ibfd.get (), bfd_object))
     error (_("'%s' is not a recognized file format."), filename);
 
   return ibfd;
 }
 
-static bfd *
-bfd_openw_with_cleanup (const char *filename, const char *target,
-			const char *mode)
+static gdb_bfd_ref_ptr
+bfd_openw_or_error (const char *filename, const char *target, const char *mode)
 {
-  bfd *obfd;
+  gdb_bfd_ref_ptr obfd;
 
   if (*mode == 'w')	/* Write: create new file */
     {
       obfd = gdb_bfd_openw (filename, target);
       if (obfd == NULL)
-	error (_("Failed to open %s: %s."), filename, 
+	error (_("Failed to open %s: %s."), filename,
 	       bfd_errmsg (bfd_get_error ()));
-      make_cleanup_bfd_unref (obfd);
-      if (!bfd_set_format (obfd, bfd_object))
-	error (_("bfd_openw_with_cleanup: %s."), bfd_errmsg (bfd_get_error ()));
+      if (!bfd_set_format (obfd.get (), bfd_object))
+	error (_("bfd_openw_or_error: %s."), bfd_errmsg (bfd_get_error ()));
     }
   else if (*mode == 'a')	/* Append to existing file.  */
     {	/* FIXME -- doesn't work...  */
       error (_("bfd_openw does not work with append."));
     }
   else
-    error (_("bfd_openw_with_cleanup: unknown mode %s."), mode);
+    error (_("bfd_openw_or_error: unknown mode %s."), mode);
 
   return obfd;
 }
@@ -187,20 +182,19 @@ dump_bfd_file (const char *filename, con
 	       const char *target, CORE_ADDR vaddr, 
 	       const bfd_byte *buf, ULONGEST len)
 {
-  bfd *obfd;
   asection *osection;
 
-  obfd = bfd_openw_with_cleanup (filename, target, mode);
-  osection = bfd_make_section_anyway (obfd, ".newsec");
-  bfd_set_section_size (obfd, osection, len);
-  bfd_set_section_vma (obfd, osection, vaddr);
-  bfd_set_section_alignment (obfd, osection, 0);
-  bfd_set_section_flags (obfd, osection, (SEC_HAS_CONTENTS
-					  | SEC_ALLOC
-					  | SEC_LOAD));
+  gdb_bfd_ref_ptr obfd (bfd_openw_or_error (filename, target, mode));
+  osection = bfd_make_section_anyway (obfd.get (), ".newsec");
+  bfd_set_section_size (obfd.get (), osection, len);
+  bfd_set_section_vma (obfd.get (), osection, vaddr);
+  bfd_set_section_alignment (obfd.get (), osection, 0);
+  bfd_set_section_flags (obfd.get (), osection, (SEC_HAS_CONTENTS
+						 | SEC_ALLOC
+						 | SEC_LOAD));
   osection->entsize = 0;
-  if (!bfd_set_section_contents (obfd, osection, buf, 0, len))
-    warning (_("writing dump file '%s' (%s)"), filename, 
+  if (!bfd_set_section_contents (obfd.get (), osection, buf, 0, len))
+    warning (_("writing dump file '%s' (%s)"), filename,
 	     bfd_errmsg (bfd_get_error ()));
 }
 
@@ -212,7 +206,6 @@ dump_memory_to_file (const char *cmd, co
   CORE_ADDR hi;
   ULONGEST count;
   const char *filename;
-  void *buf;
   const char *lo_exp;
   const char *hi_exp;
 
@@ -237,18 +230,17 @@ dump_memory_to_file (const char *cmd, co
 
   /* FIXME: Should use read_memory_partial() and a magic blocking
      value.  */
-  buf = xmalloc (count);
-  make_cleanup (xfree, buf);
-  read_memory (lo, buf, count);
+  std::unique_ptr<gdb_byte[]> buf (new gdb_byte[count]);
+  read_memory (lo, buf.get (), count);
   
   /* Have everything.  Open/write the data.  */
   if (file_format == NULL || strcmp (file_format, "binary") == 0)
     {
-      dump_binary_file (filename, mode, buf, count);
+      dump_binary_file (filename, mode, buf.get (), count);
     }
   else
     {
-      dump_bfd_file (filename, mode, file_format, lo, buf, count);
+      dump_bfd_file (filename, mode, file_format, lo, buf.get (), count);
     }
 
   do_cleanups (old_cleanups);
@@ -392,7 +384,7 @@ struct dump_context
 static void
 call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
 {
-  struct dump_context *d = get_cmd_context (c);
+  struct dump_context *d = (struct dump_context *) get_cmd_context (c);
 
   d->func (args, d->mode);
 }
@@ -447,7 +439,7 @@ struct callback_data {
 static void
 restore_section_callback (bfd *ibfd, asection *isec, void *args)
 {
-  struct callback_data *data = args;
+  struct callback_data *data = (struct callback_data *) args;
   bfd_vma sec_start  = bfd_section_vma (ibfd, isec);
   bfd_size_type size = bfd_section_size (ibfd, isec);
   bfd_vma sec_end    = sec_start + size;
@@ -482,7 +474,7 @@ restore_section_callback (bfd *ibfd, ase
     sec_load_count -= sec_end - data->load_end;
 
   /* Get the data.  */
-  buf = xmalloc (size);
+  buf = (gdb_byte *) xmalloc (size);
   old_chain = make_cleanup (xfree, buf);
   if (!bfd_get_section_contents (ibfd, isec, buf, 0, size))
     error (_("Failed to read bfd file %s: '%s'."), bfd_get_filename (ibfd), 
@@ -518,7 +510,6 @@ restore_binary_file (const char *filenam
 {
   struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
   FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
-  gdb_byte *buf;
   long len;
 
   /* Get the file size for reading.  */
@@ -553,13 +544,13 @@ restore_binary_file (const char *filenam
     perror_with_name (filename);
 
   /* Now allocate a buffer and read the file contents.  */
-  buf = xmalloc (len);
-  make_cleanup (xfree, buf);
-  if (fread (buf, 1, len, file) != len)
+  std::unique_ptr<gdb_byte[]> buf (new gdb_byte[len]);
+  if (fread (buf.get (), 1, len, file) != len)
     perror_with_name (filename);
 
   /* Now write the buffer into target memory.  */
-  len = target_write_memory (data->load_start + data->load_offset, buf, len);
+  len = target_write_memory (data->load_start + data->load_offset,
+			     buf.get (), len);
   if (len != 0)
     warning (_("restore: memory write failed (%s)."), safe_strerror (len));
   do_cleanups (cleanup);
@@ -596,8 +587,9 @@ restore_command (char *args_in, int from
 	}
       /* Parse offset (optional).  */
       if (args != NULL && *args != '\0')
-      data.load_offset = 
-	parse_and_eval_address (scan_expression_with_cleanup (&args, NULL));
+	data.load_offset = binary_flag ?
+	  parse_and_eval_address (scan_expression_with_cleanup (&args, NULL)) :
+	  parse_and_eval_long (scan_expression_with_cleanup (&args, NULL));
       if (args != NULL && *args != '\0')
 	{
 	  /* Parse start address (optional).  */
@@ -626,12 +618,11 @@ restore_command (char *args_in, int from
   else
     {
       /* Open the file for loading.  */
-      ibfd = bfd_openr_with_cleanup (filename, NULL);
+      gdb_bfd_ref_ptr ibfd (bfd_openr_or_error (filename, NULL));
 
       /* Process the sections.  */
-      bfd_map_over_sections (ibfd, restore_section_callback, &data);
+      bfd_map_over_sections (ibfd.get (), restore_section_callback, &data);
     }
-  return;
 }
 
 static void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-interp.c ./gdb/cli/cli-interp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-interp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-interp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* CLI Definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,35 +18,143 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "cli-interp.h"
 #include "interps.h"
 #include "event-top.h"
 #include "ui-out.h"
 #include "cli-out.h"
 #include "top.h"		/* for "execute_command" */
+#include "event-top.h"
 #include "infrun.h"
 #include "observer.h"
+#include "gdbthread.h"
+#include "thread-fsm.h"
+
+cli_interp_base::cli_interp_base (const char *name)
+  : interp (name)
+{}
+
+cli_interp_base::~cli_interp_base ()
+{}
+
+/* The console interpreter.  */
+
+class cli_interp final : public cli_interp_base
+{
+ public:
+  explicit cli_interp (const char *name);
+
+  void init (bool top_level) override;
+  void resume () override;
+  void suspend () override;
+  gdb_exception exec (const char *command_str) override;
+  ui_out *interp_ui_out () override;
+
+  /* The ui_out for the console interpreter.  */
+  cli_ui_out *cli_uiout;
+};
+
+cli_interp::cli_interp (const char *name)
+  : cli_interp_base (name)
+{
+  /* Create a default uiout builder for the CLI.  */
+  this->cli_uiout = cli_out_new (gdb_stdout);
+}
+
+/* Suppress notification struct.  */
+struct cli_suppress_notification cli_suppress_notification =
+  {
+    0   /* user_selected_context_changed */
+  };
+
+/* Returns the INTERP's data cast as cli_interp if INTERP is a CLI,
+   and returns NULL otherwise.  */
 
-/* These are the ui_out and the interpreter for the console
-   interpreter.  */
-struct ui_out *cli_uiout;
-static struct interp *cli_interp;
+static struct cli_interp *
+as_cli_interp (struct interp *interp)
+{
+  if (strcmp (interp_name (interp), INTERP_CONSOLE) == 0)
+    return (struct cli_interp *) interp;
+  return NULL;
+}
 
 /* Longjmp-safe wrapper for "execute_command".  */
 static struct gdb_exception safe_execute_command (struct ui_out *uiout,
 						  char *command, 
 						  int from_tty);
 
+/* See cli-interp.h.
+
+   Breakpoint hits should always be mirrored to a console.  Deciding
+   what to mirror to a console wrt to breakpoints and random stops
+   gets messy real fast.  E.g., say "s" trips on a breakpoint.  We'd
+   clearly want to mirror the event to the console in this case.  But
+   what about more complicated cases like "s&; thread n; s&", and one
+   of those steps spawning a new thread, and that thread hitting a
+   breakpoint?  It's impossible in general to track whether the thread
+   had any relation to the commands that had been executed.  So we
+   just simplify and always mirror breakpoints and random events to
+   all consoles.
+
+   OTOH, we should print the source line to the console when stepping
+   or other similar commands, iff the step was started by that console
+   (or in MI's case, by a console command), but not if it was started
+   with MI's -exec-step or similar.  */
+
+int
+should_print_stop_to_console (struct interp *console_interp,
+			      struct thread_info *tp)
+{
+  if ((bpstat_what (tp->control.stop_bpstat).main_action
+       == BPSTAT_WHAT_STOP_NOISY)
+      || tp->thread_fsm == NULL
+      || tp->thread_fsm->command_interp == console_interp
+      || !thread_fsm_finished_p (tp->thread_fsm))
+    return 1;
+  return 0;
+}
+
 /* Observers for several run control events.  If the interpreter is
    quiet (i.e., another interpreter is being run with
    interpreter-exec), print nothing.  */
 
+/* Observer for the normal_stop notification.  */
+
+static void
+cli_on_normal_stop (struct bpstats *bs, int print_frame)
+{
+  if (!print_frame)
+    return;
+
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *interp = top_level_interpreter ();
+      struct cli_interp *cli = as_cli_interp (interp);
+      struct thread_info *thread;
+
+      if (cli == NULL)
+	continue;
+
+      thread = inferior_thread ();
+      if (should_print_stop_to_console (interp, thread))
+	print_stop_event (cli->cli_uiout);
+    }
+}
+
 /* Observer for the signal_received notification.  */
 
 static void
 cli_on_signal_received (enum gdb_signal siggnal)
 {
-  if (!interp_quiet_p (cli_interp))
-    print_signal_received_reason (cli_uiout, siggnal);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      print_signal_received_reason (cli->cli_uiout, siggnal);
+    }
 }
 
 /* Observer for the end_stepping_range notification.  */
@@ -54,8 +162,15 @@ cli_on_signal_received (enum gdb_signal 
 static void
 cli_on_end_stepping_range (void)
 {
-  if (!interp_quiet_p (cli_interp))
-    print_end_stepping_range_reason (cli_uiout);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      print_end_stepping_range_reason (cli->cli_uiout);
+    }
 }
 
 /* Observer for the signalled notification.  */
@@ -63,8 +178,15 @@ cli_on_end_stepping_range (void)
 static void
 cli_on_signal_exited (enum gdb_signal siggnal)
 {
-  if (!interp_quiet_p (cli_interp))
-    print_signal_exited_reason (cli_uiout, siggnal);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      print_signal_exited_reason (cli->cli_uiout, siggnal);
+    }
 }
 
 /* Observer for the exited notification.  */
@@ -72,8 +194,15 @@ cli_on_signal_exited (enum gdb_signal si
 static void
 cli_on_exited (int exitstatus)
 {
-  if (!interp_quiet_p (cli_interp))
-    print_exited_reason (cli_uiout, exitstatus);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      print_exited_reason (cli->cli_uiout, exitstatus);
+    }
 }
 
 /* Observer for the no_history notification.  */
@@ -81,8 +210,15 @@ cli_on_exited (int exitstatus)
 static void
 cli_on_no_history (void)
 {
-  if (!interp_quiet_p (cli_interp))
-    print_no_history_reason (cli_uiout);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      print_no_history_reason (cli->cli_uiout);
+    }
 }
 
 /* Observer for the sync_execution_done notification.  */
@@ -90,8 +226,12 @@ cli_on_no_history (void)
 static void
 cli_on_sync_execution_done (void)
 {
-  if (!interp_quiet_p (cli_interp))
-    display_gdb_prompt (NULL);
+  struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+  if (cli == NULL)
+    return;
+
+  display_gdb_prompt (NULL);
 }
 
 /* Observer for the command_error notification.  */
@@ -99,30 +239,63 @@ cli_on_sync_execution_done (void)
 static void
 cli_on_command_error (void)
 {
-  if (!interp_quiet_p (cli_interp))
-    display_gdb_prompt (NULL);
+  struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+  if (cli == NULL)
+    return;
+
+  display_gdb_prompt (NULL);
 }
 
-/* These implement the cli out interpreter: */
+/* Observer for the user_selected_context_changed notification.  */
 
-static void *
-cli_interpreter_init (struct interp *self, int top_level)
+static void
+cli_on_user_selected_context_changed (user_selected_what selection)
 {
-  /* If changing this, remember to update tui-interp.c as well.  */
-  observer_attach_end_stepping_range (cli_on_end_stepping_range);
-  observer_attach_signal_received (cli_on_signal_received);
-  observer_attach_signal_exited (cli_on_signal_exited);
-  observer_attach_exited (cli_on_exited);
-  observer_attach_no_history (cli_on_no_history);
-  observer_attach_sync_execution_done (cli_on_sync_execution_done);
-  observer_attach_command_error (cli_on_command_error);
+  struct thread_info *tp;
 
-  return NULL;
+  /* This event is suppressed.  */
+  if (cli_suppress_notification.user_selected_context)
+    return;
+
+  tp = find_thread_ptid (inferior_ptid);
+
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
+
+      if (cli == NULL)
+	continue;
+
+      if (selection & USER_SELECTED_INFERIOR)
+	print_selected_inferior (cli->cli_uiout);
+
+      if (tp != NULL
+	  && ((selection & (USER_SELECTED_THREAD | USER_SELECTED_FRAME))))
+	print_selected_thread_frame (cli->cli_uiout, selection);
+    }
 }
 
-static int
-cli_interpreter_resume (void *data)
+/* pre_command_loop implementation.  */
+
+void
+cli_interp_base::pre_command_loop ()
 {
+  display_gdb_prompt (0);
+}
+
+/* These implement the cli out interpreter: */
+
+void
+cli_interp::init (bool top_level)
+{
+}
+
+void
+cli_interp::resume ()
+{
+  struct ui *ui = current_ui;
+  struct cli_interp *cli = this;
   struct ui_file *stream;
 
   /*sync_execution = 1; */
@@ -131,37 +304,38 @@ cli_interpreter_resume (void *data)
      previously writing to gdb_stdout, then set it to the new
      gdb_stdout afterwards.  */
 
-  stream = cli_out_set_stream (cli_uiout, gdb_stdout);
+  stream = cli->cli_uiout->set_stream (gdb_stdout);
   if (stream != gdb_stdout)
     {
-      cli_out_set_stream (cli_uiout, stream);
+      cli->cli_uiout->set_stream (stream);
       stream = NULL;
     }
 
-  gdb_setup_readline ();
+  gdb_setup_readline (1);
 
-  if (stream != NULL)
-    cli_out_set_stream (cli_uiout, gdb_stdout);
+  ui->input_handler = command_line_handler;
 
-  return 1;
+  if (stream != NULL)
+    cli->cli_uiout->set_stream (gdb_stdout);
 }
 
-static int
-cli_interpreter_suspend (void *data)
+void
+cli_interp::suspend ()
 {
   gdb_disable_readline ();
-  return 1;
 }
 
-static struct gdb_exception
-cli_interpreter_exec (void *data, const char *command_str)
+gdb_exception
+cli_interp::exec (const char *command_str)
 {
+  struct cli_interp *cli = this;
   struct ui_file *old_stream;
   struct gdb_exception result;
 
   /* FIXME: cagney/2003-02-01: Need to const char *propogate
      safe_execute_command.  */
-  char *str = strcpy (alloca (strlen (command_str) + 1), command_str);
+  char *str = (char *) alloca (strlen (command_str) + 1);
+  strcpy (str, command_str);
 
   /* gdb_stdout could change between the time cli_uiout was
      initialized and now.  Since we're probably using a different
@@ -170,12 +344,18 @@ cli_interpreter_exec (void *data, const 
 
      It is important that it gets reset everytime, since the user
      could set gdb to use a different interpreter.  */
-  old_stream = cli_out_set_stream (cli_uiout, gdb_stdout);
-  result = safe_execute_command (cli_uiout, str, 1);
-  cli_out_set_stream (cli_uiout, old_stream);
+  old_stream = cli->cli_uiout->set_stream (gdb_stdout);
+  result = safe_execute_command (cli->cli_uiout, str, 1);
+  cli->cli_uiout->set_stream (old_stream);
   return result;
 }
 
+bool
+cli_interp_base::supports_command_editing ()
+{
+  return true;
+}
+
 static struct gdb_exception
 safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
 {
@@ -205,10 +385,76 @@ safe_execute_command (struct ui_out *com
   return e;
 }
 
-static struct ui_out *
-cli_ui_out (struct interp *self)
+ui_out *
+cli_interp::interp_ui_out ()
 {
-  return cli_uiout;
+  struct cli_interp *cli = (struct cli_interp *) this;
+
+  return cli->cli_uiout;
+}
+
+/* These hold the pushed copies of the gdb output files.
+   If NULL then nothing has yet been pushed.  */
+struct saved_output_files
+{
+  ui_file *out;
+  ui_file *err;
+  ui_file *log;
+  ui_file *targ;
+  ui_file *targerr;
+};
+static saved_output_files saved_output;
+
+/* See cli-interp.h.  */
+
+void
+cli_interp_base::set_logging (ui_file_up logfile, bool logging_redirect)
+{
+  if (logfile != NULL)
+    {
+      saved_output.out = gdb_stdout;
+      saved_output.err = gdb_stderr;
+      saved_output.log = gdb_stdlog;
+      saved_output.targ = gdb_stdtarg;
+      saved_output.targerr = gdb_stdtargerr;
+
+      /* A raw pointer since ownership is transferred to
+	 gdb_stdout.  */
+      ui_file *output = make_logging_output (gdb_stdout,
+					     std::move (logfile),
+					     logging_redirect);
+      gdb_stdout = output;
+      gdb_stdlog = output;
+      gdb_stderr = output;
+      gdb_stdtarg = output;
+      gdb_stdtargerr = output;
+    }
+  else
+    {
+      /* Only delete one of the files -- they are all set to the same
+	 value.  */
+      delete gdb_stdout;
+
+      gdb_stdout = saved_output.out;
+      gdb_stderr = saved_output.err;
+      gdb_stdlog = saved_output.log;
+      gdb_stdtarg = saved_output.targ;
+      gdb_stdtargerr = saved_output.targerr;
+
+      saved_output.out = NULL;
+      saved_output.err = NULL;
+      saved_output.log = NULL;
+      saved_output.targ = NULL;
+      saved_output.targerr = NULL;
+    }
+}
+
+/* Factory for CLI interpreters.  */
+
+static struct interp *
+cli_interp_factory (const char *name)
+{
+  return new cli_interp (name);
 }
 
 /* Standard gdb initialization hook.  */
@@ -217,19 +463,17 @@ extern initialize_file_ftype _initialize
 void
 _initialize_cli_interp (void)
 {
-  static const struct interp_procs procs = {
-    cli_interpreter_init,	/* init_proc */
-    cli_interpreter_resume,	/* resume_proc */
-    cli_interpreter_suspend,	/* suspend_proc */
-    cli_interpreter_exec,	/* exec_proc */
-    cli_ui_out,			/* ui_out_proc */
-    NULL,                       /* set_logging_proc */
-    cli_command_loop            /* command_loop_proc */
-  };
+  interp_factory_register (INTERP_CONSOLE, cli_interp_factory);
 
-  /* Create a default uiout builder for the CLI.  */
-  cli_uiout = cli_out_new (gdb_stdout);
-  cli_interp = interp_new (INTERP_CONSOLE, &procs);
-
-  interp_add (cli_interp);
+  /* If changing this, remember to update tui-interp.c as well.  */
+  observer_attach_normal_stop (cli_on_normal_stop);
+  observer_attach_end_stepping_range (cli_on_end_stepping_range);
+  observer_attach_signal_received (cli_on_signal_received);
+  observer_attach_signal_exited (cli_on_signal_exited);
+  observer_attach_exited (cli_on_exited);
+  observer_attach_no_history (cli_on_no_history);
+  observer_attach_sync_execution_done (cli_on_sync_execution_done);
+  observer_attach_command_error (cli_on_command_error);
+  observer_attach_user_selected_context_changed
+    (cli_on_user_selected_context_changed);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-interp.h ./gdb/cli/cli-interp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-interp.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/cli/cli-interp.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,63 @@
+/* CLI Definitions for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef CLI_INTERP_H
+#define CLI_INTERP_H 1
+
+#include "interps.h"
+
+/* A console-like interpreter.  Implements functionality common to the
+   CLI and the TUI.  */
+class cli_interp_base : public interp
+{
+public:
+  explicit cli_interp_base (const char *name);
+  virtual ~cli_interp_base () = 0;
+
+  void set_logging (ui_file_up logfile, bool logging_redirect) override;
+  void pre_command_loop () override;
+  bool supports_command_editing () override;
+};
+
+/* Make the output ui_file to use when logging is enabled.
+   CURR_OUTPUT is the stream where output is currently being sent to
+   (e.g., gdb_stdout for the CLI, raw output stream for the MI).
+   LOGFILE is the log file already opened by the caller.
+   LOGGING_REDIRECT is the value of the "set logging redirect"
+   setting.  If true, the resulting output is the logfile.  If false,
+   the output stream is a tee, with the log file as one of the
+   outputs.  Ownership of LOGFILE is transferred to the returned
+   output file, which is an owning pointer.  */
+extern ui_file *make_logging_output (ui_file *curr_output,
+				     ui_file_up logfile,
+				     bool logging_redirect);
+
+/* The CLI interpreter's set_logging_proc method.  Exported so other
+   interpreters can reuse it.  */
+extern void cli_set_logging (struct interp *interp,
+			     ui_file_up logfile, bool logging_redirect);
+
+extern int cli_interpreter_supports_command_editing (struct interp *interp);
+
+extern void cli_interpreter_pre_command_loop (struct interp *self);
+
+/* Returns true if the current stop should be printed to
+   CONSOLE_INTERP.  */
+extern int should_print_stop_to_console (struct interp *interp,
+					 struct thread_info *tp);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-logging.c ./gdb/cli/cli-logging.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-logging.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-logging.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Command-line output logging for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,17 +22,6 @@
 #include "ui-out.h"
 #include "interps.h"
 
-/* These hold the pushed copies of the gdb output files.
-   If NULL then nothing has yet been pushed.  */
-struct saved_output_files
-{
-  struct ui_file *out;
-  struct ui_file *err;
-  struct ui_file *log;
-  struct ui_file *targ;
-  struct ui_file *targerr;
-};
-static struct saved_output_files saved_output;
 static char *saved_filename;
 
 static char *logging_filename;
@@ -47,7 +36,7 @@ show_logging_filename (struct ui_file *f
 static int logging_overwrite;
 
 static void
-set_logging_overwrite (char *args, int from_tty, struct cmd_list_element *c)
+maybe_warn_already_logging ()
 {
   if (saved_filename)
     warning (_("Currently logging to %s.  Turn the logging off and on to "
@@ -55,6 +44,12 @@ set_logging_overwrite (char *args, int f
 }
 
 static void
+set_logging_overwrite (char *args, int from_tty, struct cmd_list_element *c)
+{
+  maybe_warn_already_logging ();
+}
+
+static void
 show_logging_overwrite (struct ui_file *file, int from_tty,
 			struct cmd_list_element *c, const char *value)
 {
@@ -67,78 +62,10 @@ show_logging_overwrite (struct ui_file *
 /* Value as configured by the user.  */
 static int logging_redirect;
 
-/* The on-disk file in use if logging is currently active together
-   with redirection turned off (and therefore using tee_file_new).
-   For active logging with redirection the on-disk file is directly in
-   GDB_STDOUT and this variable is NULL.  */
-static struct ui_file *logging_no_redirect_file;
-
 static void
 set_logging_redirect (char *args, int from_tty, struct cmd_list_element *c)
 {
-  struct cleanup *cleanups;
-  struct ui_file *output, *new_logging_no_redirect_file;
-  struct ui_out *uiout = current_uiout;
-
-  if (saved_filename == NULL
-      || (logging_redirect != 0 && logging_no_redirect_file == NULL)
-      || (logging_redirect == 0 && logging_no_redirect_file != NULL))
-    return;
-
-  cleanups = make_cleanup (null_cleanup, NULL);
-
-  if (logging_redirect != 0)
-    {
-      gdb_assert (logging_no_redirect_file != NULL);
-
-      /* ui_out_redirect still has not been called for next
-	 gdb_stdout.  */
-      make_cleanup_ui_file_delete (gdb_stdout);
-
-      output = logging_no_redirect_file;
-      new_logging_no_redirect_file = NULL;
-
-      if (from_tty)
-	fprintf_unfiltered (saved_output.out, "Redirecting output to %s.\n",
-			    logging_filename);
-    }
-  else
-    {
-      gdb_assert (logging_no_redirect_file == NULL);
-      output = tee_file_new (saved_output.out, 0, gdb_stdout, 0);
-      if (output == NULL)
-	perror_with_name (_("set logging"));
-      new_logging_no_redirect_file = gdb_stdout;
-
-      if (from_tty)
-	fprintf_unfiltered (saved_output.out, "Copying output to %s.\n",
-			    logging_filename);
-    }
-
-  /* Give the current interpreter a chance to do anything special that
-     it might need for logging, such as updating other channels.  */
-  if (current_interp_set_logging (1, output, NULL) == 0)
-    {
-      gdb_stdout = output;
-      gdb_stdlog = output;
-      gdb_stderr = output;
-      gdb_stdtarg = output;
-      gdb_stdtargerr = output;
-    }
-
-  logging_no_redirect_file = new_logging_no_redirect_file;
-
-  /* There is a former output pushed on the ui_out_redirect stack.  We
-     want to replace it by OUTPUT so we must pop the former value
-     first.  We should either do both the pop and push or to do
-     neither of it.  At least do not try to push OUTPUT if the pop
-     already failed.  */
-
-  if (ui_out_redirect (uiout, NULL) < 0
-      || ui_out_redirect (uiout, output) < 0)
-    warning (_("Current output protocol does not support redirection"));
-
-  do_cleanups (cleanups);
+  maybe_warn_already_logging ();
 }
 
 static void
@@ -152,42 +79,35 @@ show_logging_redirect (struct ui_file *f
 static void
 pop_output_files (void)
 {
-  if (logging_no_redirect_file)
-    {
-      ui_file_delete (logging_no_redirect_file);
-      logging_no_redirect_file = NULL;
-    }
+  current_interp_set_logging (NULL, false);
 
-  if (current_interp_set_logging (0, NULL, NULL) == 0)
-    {
-      /* Only delete one of the files -- they are all set to the same
-	 value.  */
-      ui_file_delete (gdb_stdout);
-
-      gdb_stdout = saved_output.out;
-      gdb_stderr = saved_output.err;
-      gdb_stdlog = saved_output.log;
-      gdb_stdtarg = saved_output.targ;
-      gdb_stdtargerr = saved_output.targerr;
-    }
+  /* Stay consistent with handle_redirections.  */
+  if (!current_uiout->is_mi_like_p ())
+    current_uiout->redirect (NULL);
+}
 
-  saved_output.out = NULL;
-  saved_output.err = NULL;
-  saved_output.log = NULL;
-  saved_output.targ = NULL;
-  saved_output.targerr = NULL;
+/* See cli-interp.h.  */
 
-  ui_out_redirect (current_uiout, NULL);
+ui_file *
+make_logging_output (ui_file *curr_output, ui_file_up logfile,
+		     bool logging_redirect)
+{
+  if (logging_redirect)
+    return logfile.release ();
+  else
+    {
+      /* Note that the "tee" takes ownership of the log file.  */
+      ui_file *out = new tee_file (curr_output, false,
+				   logfile.get (), true);
+      logfile.release ();
+      return out;
+    }
 }
 
 /* This is a helper for the `set logging' command.  */
 static void
 handle_redirections (int from_tty)
 {
-  struct cleanup *cleanups;
-  struct ui_file *output;
-  struct ui_file *no_redirect_file = NULL;
-
   if (saved_filename != NULL)
     {
       fprintf_unfiltered (gdb_stdout, "Already logging to %s.\n",
@@ -195,59 +115,34 @@ handle_redirections (int from_tty)
       return;
     }
 
-  output = gdb_fopen (logging_filename, logging_overwrite ? "w" : "a");
-  if (output == NULL)
+  stdio_file_up log (new stdio_file ());
+  if (!log->open (logging_filename, logging_overwrite ? "w" : "a"))
     perror_with_name (_("set logging"));
-  cleanups = make_cleanup_ui_file_delete (output);
 
   /* Redirects everything to gdb_stdout while this is running.  */
-  if (!logging_redirect)
+  if (from_tty)
     {
-      no_redirect_file = output;
-
-      output = tee_file_new (gdb_stdout, 0, no_redirect_file, 0);
-      if (output == NULL)
-	perror_with_name (_("set logging"));
-      make_cleanup_ui_file_delete (output);
-      if (from_tty)
+      if (!logging_redirect)
 	fprintf_unfiltered (gdb_stdout, "Copying output to %s.\n",
 			    logging_filename);
-      logging_no_redirect_file = no_redirect_file;
-    }
-  else
-    {
-      gdb_assert (logging_no_redirect_file == NULL);
-
-      if (from_tty)
+      else
 	fprintf_unfiltered (gdb_stdout, "Redirecting output to %s.\n",
 			    logging_filename);
     }
 
-  discard_cleanups (cleanups);
-
   saved_filename = xstrdup (logging_filename);
-  saved_output.out = gdb_stdout;
-  saved_output.err = gdb_stderr;
-  saved_output.log = gdb_stdlog;
-  saved_output.targ = gdb_stdtarg;
-  saved_output.targerr = gdb_stdtargerr;
 
   /* Let the interpreter do anything it needs.  */
-  if (current_interp_set_logging (1, output, no_redirect_file) == 0)
-    {
-      gdb_stdout = output;
-      gdb_stdlog = output;
-      gdb_stderr = output;
-      gdb_stdtarg = output;
-      gdb_stdtargerr = output;
-    }
+  current_interp_set_logging (std::move (log), logging_redirect);
 
-  /* Don't do the redirect for MI, it confuses MI's ui-out scheme.  */
-  if (!ui_out_is_mi_like_p (current_uiout))
-    {
-      if (ui_out_redirect (current_uiout, output) < 0)
-	warning (_("Current output protocol does not support redirection"));
-    }
+  /* Redirect the current ui-out object's output to the log.  Use
+     gdb_stdout, not log, since the interpreter may have created a tee
+     that wraps the log.  Don't do the redirect for MI, it confuses
+     MI's ui-out scheme.  Note that we may get here with MI as current
+     interpreter, but with the current ui_out as a CLI ui_out, with
+     '-interpreter-exec console "set logging on"'.  */
+  if (!current_uiout->is_mi_like_p ())
+    current_uiout->redirect (gdb_stdout);
 }
 
 static void
@@ -302,20 +197,10 @@ show_logging_command (char *args, int fr
   else
     printf_unfiltered (_("Logs will be appended to the log file.\n"));
 
-  if (saved_filename)
-    {
-      if (logging_redirect)
-	printf_unfiltered (_("Output is being sent only to the log file.\n"));
-      else
-	printf_unfiltered (_("Output is being logged and displayed.\n"));
-    }
+  if (logging_redirect)
+    printf_unfiltered (_("Output will be sent only to the log file.\n"));
   else
-    {
-      if (logging_redirect)
-	printf_unfiltered (_("Output will be sent only to the log file.\n"));
-      else
-	printf_unfiltered (_("Output will be logged and displayed.\n"));
-    }
+    printf_unfiltered (_("Output will be logged and displayed.\n"));
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-script.c ./gdb/cli/cli-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-script.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-script.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB CLI command scripting.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,6 +33,8 @@
 #include "interps.h"
 #include "compile/compile.h"
 
+#include <vector>
+
 /* Prototypes for local functions.  */
 
 static enum command_control_type
@@ -41,10 +43,6 @@ recurse_read_control_structure (char * (
 				void (*validator)(char *, void *),
 				void *closure);
 
-static char *insert_args (char *line);
-
-static struct cleanup * setup_user_args (char *p);
-
 static char *read_next_line (void);
 
 /* Level of control structure when reading.  */
@@ -56,24 +54,68 @@ static int command_nest_depth = 1;
 /* This is to prevent certain commands being printed twice.  */
 static int suppress_next_print_command_trace = 0;
 
+/* A non-owning slice of a string.  */
+
+struct string_view
+{
+  string_view (const char *str_, size_t len_)
+    : str (str_), len (len_)
+  {}
+
+  const char *str;
+  size_t len;
+};
+
 /* Structure for arguments to user defined functions.  */
-#define MAXUSERARGS 10
-struct user_args
+
+class user_args
+{
+public:
+  /* Save the command line and store the locations of arguments passed
+     to the user defined function.  */
+  explicit user_args (const char *line);
+
+  /* Insert the stored user defined arguments into the $arg arguments
+     found in LINE.  */
+  std::string insert_args (const char *line) const;
+
+private:
+  /* Disable copy/assignment.  (Since the elements of A point inside
+     COMMAND, copying would need to reconstruct the A vector in the
+     new copy.)  */
+  user_args (const user_args &) =delete;
+  user_args &operator= (const user_args &) =delete;
+
+  /* It is necessary to store a copy of the command line to ensure
+     that the arguments are not overwritten before they are used.  */
+  std::string m_command_line;
+
+  /* The arguments.  Each element points inside M_COMMAND_LINE.  */
+  std::vector<string_view> m_args;
+};
+
+/* The stack of arguments passed to user defined functions.  We need a
+   stack because user-defined functions can call other user-defined
+   functions.  */
+static std::vector<std::unique_ptr<user_args>> user_args_stack;
+
+/* An RAII-base class used to push/pop args on the user args
+   stack.  */
+struct scoped_user_args_level
+{
+  /* Parse the command line and push the arguments in the user args
+     stack.  */
+  explicit scoped_user_args_level (const char *line)
   {
-    struct user_args *next;
-    /* It is necessary to store a malloced copy of the command line to
-       ensure that the arguments are not overwritten before they are
-       used.  */
-    char *command;
-    struct
-      {
-	char *arg;
-	int len;
-      }
-    a[MAXUSERARGS];
-    int count;
+    user_args_stack.emplace_back (new user_args (line));
   }
- *user_args;
+
+  /* Pop the current user arguments from the stack.  */
+  ~scoped_user_args_level ()
+  {
+    user_args_stack.pop_back ();
+  }
+};
 
 
 /* Return non-zero if TYPE is a multi-line command (i.e., is terminated
@@ -101,7 +143,7 @@ multi_line_command_p (enum command_contr
    control commands (if/while).  */
 
 static struct command_line *
-build_command_line (enum command_control_type type, char *args)
+build_command_line (enum command_control_type type, const char *args)
 {
   struct command_line *cmd;
 
@@ -109,15 +151,12 @@ build_command_line (enum command_control
     error (_("if/while commands require arguments."));
   gdb_assert (args != NULL);
 
-  cmd = (struct command_line *) xmalloc (sizeof (struct command_line));
+  cmd = XNEW (struct command_line);
   cmd->next = NULL;
   cmd->control_type = type;
 
   cmd->body_count = 1;
-  cmd->body_list
-    = (struct command_line **) xmalloc (sizeof (struct command_line *)
-					* cmd->body_count);
-  memset (cmd->body_list, 0, sizeof (struct command_line *) * cmd->body_count);
+  cmd->body_list = XCNEWVEC (struct command_line *, cmd->body_count);
   cmd->line = xstrdup (args);
 
   return cmd;
@@ -162,13 +201,13 @@ print_command_lines (struct ui_out *uiou
   while (list)
     {
       if (depth)
-	ui_out_spaces (uiout, 2 * depth);
+	uiout->spaces (2 * depth);
 
       /* A simple command, print it and continue.  */
       if (list->control_type == simple_control)
 	{
-	  ui_out_field_string (uiout, NULL, list->line);
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, list->line);
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -177,8 +216,8 @@ print_command_lines (struct ui_out *uiou
          and continue. */
       if (list->control_type == continue_control)
 	{
-	  ui_out_field_string (uiout, NULL, "loop_continue");
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, "loop_continue");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -187,8 +226,8 @@ print_command_lines (struct ui_out *uiou
 	 continue.  */
       if (list->control_type == break_control)
 	{
-	  ui_out_field_string (uiout, NULL, "loop_break");
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, "loop_break");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -202,15 +241,15 @@ print_command_lines (struct ui_out *uiou
 	     token.  See comment in process_next_line for explanation.
 	     Here, take care not print 'while-stepping' twice.  */
 	  if (list->control_type == while_control)
-	    ui_out_field_fmt (uiout, NULL, "while %s", list->line);
+	    uiout->field_fmt (NULL, "while %s", list->line);
 	  else
-	    ui_out_field_string (uiout, NULL, list->line);
-	  ui_out_text (uiout, "\n");
+	    uiout->field_string (NULL, list->line);
+	  uiout->text ("\n");
 	  print_command_lines (uiout, *list->body_list, depth + 1);
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -219,8 +258,8 @@ print_command_lines (struct ui_out *uiou
 	 continueing.  */
       if (list->control_type == if_control)
 	{
-	  ui_out_field_fmt (uiout, NULL, "if %s", list->line);
-	  ui_out_text (uiout, "\n");
+	  uiout->field_fmt (NULL, "if %s", list->line);
+	  uiout->text ("\n");
 	  /* The true arm.  */
 	  print_command_lines (uiout, list->body_list[0], depth + 1);
 
@@ -228,16 +267,16 @@ print_command_lines (struct ui_out *uiou
 	  if (list->body_count == 2)
 	    {
 	      if (depth)
-		ui_out_spaces (uiout, 2 * depth);
-	      ui_out_field_string (uiout, NULL, "else");
-	      ui_out_text (uiout, "\n");
+		uiout->spaces (2 * depth);
+	      uiout->field_string (NULL, "else");
+	      uiout->text ("\n");
 	      print_command_lines (uiout, list->body_list[1], depth + 1);
 	    }
 
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -247,55 +286,55 @@ print_command_lines (struct ui_out *uiou
       if (list->control_type == commands_control)
 	{
 	  if (*(list->line))
-	    ui_out_field_fmt (uiout, NULL, "commands %s", list->line);
+	    uiout->field_fmt (NULL, "commands %s", list->line);
 	  else
-	    ui_out_field_string (uiout, NULL, "commands");
-	  ui_out_text (uiout, "\n");
+	    uiout->field_string (NULL, "commands");
+	  uiout->text ("\n");
 	  print_command_lines (uiout, *list->body_list, depth + 1);
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
 
       if (list->control_type == python_control)
 	{
-	  ui_out_field_string (uiout, NULL, "python");
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, "python");
+	  uiout->text ("\n");
 	  /* Don't indent python code at all.  */
 	  print_command_lines (uiout, *list->body_list, 0);
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
 
       if (list->control_type == compile_control)
 	{
-	  ui_out_field_string (uiout, NULL, "compile expression");
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, "compile expression");
+	  uiout->text ("\n");
 	  print_command_lines (uiout, *list->body_list, 0);
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
 
       if (list->control_type == guile_control)
 	{
-	  ui_out_field_string (uiout, NULL, "guile");
-	  ui_out_text (uiout, "\n");
+	  uiout->field_string (NULL, "guile");
+	  uiout->text ("\n");
 	  print_command_lines (uiout, *list->body_list, depth + 1);
 	  if (depth)
-	    ui_out_spaces (uiout, 2 * depth);
-	  ui_out_field_string (uiout, NULL, "end");
-	  ui_out_text (uiout, "\n");
+	    uiout->spaces (2 * depth);
+	  uiout->field_string (NULL, "end");
+	  uiout->text ("\n");
 	  list = list->next;
 	  continue;
 	}
@@ -310,7 +349,7 @@ print_command_lines (struct ui_out *uiou
 static void
 clear_hook_in_cleanup (void *data)
 {
-  struct cmd_list_element *c = data;
+  struct cmd_list_element *c = (struct cmd_list_element *) data;
 
   c->hook_in = 0; /* Allow hook to work again once it is complete.  */
 }
@@ -344,7 +383,7 @@ execute_cmd_post_hook (struct cmd_list_e
 static void
 do_restore_user_call_depth (void * call_depth)
 {	
-  int *depth = call_depth;
+  int *depth = (int *) call_depth;
 
   (*depth)--;
   if ((*depth) == 0)
@@ -355,6 +394,7 @@ do_restore_user_call_depth (void * call_
 void
 execute_user_command (struct cmd_list_element *c, char *args)
 {
+  struct ui *ui = current_ui;
   struct command_line *cmdlines;
   struct cleanup *old_chain;
   enum command_control_type ret;
@@ -366,24 +406,23 @@ execute_user_command (struct cmd_list_el
     /* Null command */
     return;
 
-  old_chain = setup_user_args (args);
+  scoped_user_args_level push_user_args (args);
 
   if (++user_call_depth > max_user_call_depth)
     error (_("Max user call depth exceeded -- command aborted."));
 
-  make_cleanup (do_restore_user_call_depth, &user_call_depth);
+  old_chain = make_cleanup (do_restore_user_call_depth, &user_call_depth);
 
   /* Set the instream to 0, indicating execution of a
      user-defined function.  */
-  make_cleanup (do_restore_instream_cleanup, instream);
-  instream = (FILE *) 0;
+  make_cleanup (do_restore_instream_cleanup, ui->instream);
+  ui->instream = NULL;
 
   /* Also set the global in_user_command, so that NULL instream is
      not confused with Insight.  */
   in_user_command = 1;
 
-  make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   command_nest_depth++;
   while (cmdlines)
@@ -443,14 +482,11 @@ print_command_trace (const char *cmd)
 enum command_control_type
 execute_control_command (struct command_line *cmd)
 {
-  struct expression *expr;
   struct command_line *current;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
   struct value *val;
   struct value *val_mark;
   int loop;
   enum command_control_type ret;
-  char *new_line;
 
   /* Start by assuming failure, if a problem is detected, the code
      below will simply "break" out of the switch.  */
@@ -459,14 +495,13 @@ execute_control_command (struct command_
   switch (cmd->control_type)
     {
     case simple_control:
-      /* A simple command, execute it and return.  */
-      new_line = insert_args (cmd->line);
-      if (!new_line)
+      {
+	/* A simple command, execute it and return.  */
+	std::string new_line = insert_user_defined_cmd_args (cmd->line);
+	execute_command (&new_line[0], 0);
+	ret = cmd->control_type;
 	break;
-      make_cleanup (free_current_contents, &new_line);
-      execute_command (new_line, 0);
-      ret = cmd->control_type;
-      break;
+      }
 
     case continue_control:
       print_command_trace ("loop_continue");
@@ -487,18 +522,14 @@ execute_control_command (struct command_
     case while_control:
       {
 	int len = strlen (cmd->line) + 7;
-	char *buffer = alloca (len);
+	char *buffer = (char *) alloca (len);
 
 	xsnprintf (buffer, len, "while %s", cmd->line);
 	print_command_trace (buffer);
 
 	/* Parse the loop control expression for the while statement.  */
-	new_line = insert_args (cmd->line);
-	if (!new_line)
-	  break;
-	make_cleanup (free_current_contents, &new_line);
-	expr = parse_expression (new_line);
-	make_cleanup (free_current_contents, &expr);
+	std::string new_line = insert_user_defined_cmd_args (cmd->line);
+	expression_up expr = parse_expression (new_line.c_str ());
 
 	ret = simple_control;
 	loop = 1;
@@ -512,7 +543,7 @@ execute_control_command (struct command_
 
 	    /* Evaluate the expression.  */
 	    val_mark = value_mark ();
-	    val = evaluate_expression (expr);
+	    val = evaluate_expression (expr.get ());
 	    cond_result = value_true (val);
 	    value_free_to_mark (val_mark);
 
@@ -556,25 +587,21 @@ execute_control_command (struct command_
     case if_control:
       {
 	int len = strlen (cmd->line) + 4;
-	char *buffer = alloca (len);
+	char *buffer = (char *) alloca (len);
 
 	xsnprintf (buffer, len, "if %s", cmd->line);
 	print_command_trace (buffer);
 
-	new_line = insert_args (cmd->line);
-	if (!new_line)
-	  break;
-	make_cleanup (free_current_contents, &new_line);
 	/* Parse the conditional for the if statement.  */
-	expr = parse_expression (new_line);
-	make_cleanup (free_current_contents, &expr);
+	std::string new_line = insert_user_defined_cmd_args (cmd->line);
+	expression_up expr = parse_expression (new_line.c_str ());
 
 	current = NULL;
 	ret = simple_control;
 
 	/* Evaluate the conditional.  */
 	val_mark = value_mark ();
-	val = evaluate_expression (expr);
+	val = evaluate_expression (expr.get ());
 
 	/* Choose which arm to take commands from based on the value
 	   of the conditional expression.  */
@@ -606,11 +633,8 @@ execute_control_command (struct command_
       {
 	/* Breakpoint commands list, record the commands in the
 	   breakpoint's command list and return.  */
-	new_line = insert_args (cmd->line);
-	if (!new_line)
-	  break;
-	make_cleanup (free_current_contents, &new_line);
-	ret = commands_from_control_command (new_line, cmd);
+	std::string new_line = insert_user_defined_cmd_args (cmd->line);
+	ret = commands_from_control_command (new_line.c_str (), cmd);
 	break;
       }
 
@@ -633,8 +657,6 @@ execute_control_command (struct command_
       break;
     }
 
-  do_cleanups (old_chain);
-
   return ret;
 }
 
@@ -656,7 +678,6 @@ static void
 while_command (char *arg, int from_tty)
 {
   struct command_line *command = NULL;
-  struct cleanup *old_chain;
 
   control_level = 1;
   command = get_command_line (while_control, arg);
@@ -664,13 +685,10 @@ while_command (char *arg, int from_tty)
   if (command == NULL)
     return;
 
-  old_chain = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   execute_control_command_untraced (command);
   free_command_lines (&command);
-
-  do_cleanups (old_chain);
 }
 
 /* "if" command support.  Execute either the true or false arm depending
@@ -688,71 +706,38 @@ if_command (char *arg, int from_tty)
   if (command == NULL)
     return;
 
-  old_chain = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   execute_control_command_untraced (command);
   free_command_lines (&command);
-
-  do_cleanups (old_chain);
 }
 
-/* Cleanup */
-static void
-arg_cleanup (void *ignore)
-{
-  struct user_args *oargs = user_args;
-
-  if (!user_args)
-    internal_error (__FILE__, __LINE__,
-		    _("arg_cleanup called with no user args.\n"));
-
-  user_args = user_args->next;
-  xfree (oargs->command);
-  xfree (oargs);
-}
-
-/* Bind the incomming arguments for a user defined command to
-   $arg0, $arg1 ... $argMAXUSERARGS.  */
+/* Bind the incoming arguments for a user defined command to $arg0,
+   $arg1 ... $argN.  */
 
-static struct cleanup *
-setup_user_args (char *p)
+user_args::user_args (const char *command_line)
 {
-  struct user_args *args;
-  struct cleanup *old_chain;
-  unsigned int arg_count = 0;
-
-  args = (struct user_args *) xmalloc (sizeof (struct user_args));
-  memset (args, 0, sizeof (struct user_args));
-
-  args->next = user_args;
-  user_args = args;
+  const char *p;
 
-  old_chain = make_cleanup (arg_cleanup, 0/*ignored*/);
-
-  if (p == NULL)
-    return old_chain;
+  if (command_line == NULL)
+    return;
 
-  user_args->command = p = xstrdup (p);
+  m_command_line = command_line;
+  p = m_command_line.c_str ();
 
   while (*p)
     {
-      char *start_arg;
+      const char *start_arg;
       int squote = 0;
       int dquote = 0;
       int bsquote = 0;
 
-      if (arg_count >= MAXUSERARGS)
-	error (_("user defined function may only have %d arguments."),
-	       MAXUSERARGS);
-
       /* Strip whitespace.  */
       while (*p == ' ' || *p == '\t')
 	p++;
 
       /* P now points to an argument.  */
       start_arg = p;
-      user_args->a[arg_count].arg = p;
 
       /* Get to the end of this argument.  */
       while (*p)
@@ -786,18 +771,15 @@ setup_user_args (char *p)
 	    }
 	}
 
-      user_args->a[arg_count].len = p - start_arg;
-      arg_count++;
-      user_args->count++;
+      m_args.emplace_back (start_arg, p - start_arg);
     }
-  return old_chain;
 }
 
 /* Given character string P, return a point to the first argument
    ($arg), or NULL if P contains no arguments.  */
 
-static char *
-locate_arg (char *p)
+static const char *
+locate_arg (const char *p)
 {
   while ((p = strchr (p, '$')))
     {
@@ -809,96 +791,60 @@ locate_arg (char *p)
   return NULL;
 }
 
-/* Insert the user defined arguments stored in user_arg into the $arg
-   arguments found in line, with the updated copy being placed into
-   nline.  */
+/* See cli-script.h.  */
 
-static char *
-insert_args (char *line)
+std::string
+insert_user_defined_cmd_args (const char *line)
 {
-  char *p, *save_line, *new_line;
-  unsigned len, i;
-
-  /* If we are not in a user-defined function, treat $argc, $arg0, et
+  /* If we are not in a user-defined command, treat $argc, $arg0, et
      cetera as normal convenience variables.  */
-  if (user_args == NULL)
-    return xstrdup (line);
-
-  /* First we need to know how much memory to allocate for the new
-     line.  */
-  save_line = line;
-  len = 0;
-  while ((p = locate_arg (line)))
-    {
-      len += p - line;
-      i = p[4] - '0';
-
-      if (p[4] == 'c')
-	{
-	  /* $argc.  Number will be <=10.  */
-	  len += user_args->count == 10 ? 2 : 1;
-	}
-      else if (i >= user_args->count)
-	{
-	  error (_("Missing argument %d in user function."), i);
-	  return NULL;
-	}
-      else
-	{
-	  len += user_args->a[i].len;
-	}
-      line = p + 5;
-    }
-
-  /* Don't forget the tail.  */
-  len += strlen (line);
+  if (user_args_stack.empty ())
+    return line;
 
-  /* Allocate space for the new line and fill it in.  */
-  new_line = (char *) xmalloc (len + 1);
-  if (new_line == NULL)
-    return NULL;
+  const std::unique_ptr<user_args> &args = user_args_stack.back ();
+  return args->insert_args (line);
+}
 
-  /* Restore pointer to beginning of old line.  */
-  line = save_line;
+/* Insert the user defined arguments stored in user_args into the $arg
+   arguments found in line.  */
 
-  /* Save pointer to beginning of new line.  */
-  save_line = new_line;
+std::string
+user_args::insert_args (const char *line) const
+{
+  std::string new_line;
+  const char *p;
 
   while ((p = locate_arg (line)))
     {
-      int i, len;
-
-      memcpy (new_line, line, p - line);
-      new_line += p - line;
+      new_line.append (line, p - line);
 
       if (p[4] == 'c')
 	{
-	  gdb_assert (user_args->count >= 0 && user_args->count <= 10);
-	  if (user_args->count == 10)
-	    {
-	      *(new_line++) = '1';
-	      *(new_line++) = '0';
-	    }
-	  else
-	    *(new_line++) = user_args->count + '0';
+	  new_line += std::to_string (m_args.size ());
+	  line = p + 5;
 	}
       else
 	{
-	  i = p[4] - '0';
-	  len = user_args->a[i].len;
-	  if (len)
+	  char *tmp;
+	  unsigned long i;
+
+	  errno = 0;
+	  i = strtoul (p + 4, &tmp, 10);
+	  if ((i == 0 && tmp == p + 4) || errno != 0)
+	    line = p + 4;
+	  else if (i >= m_args.size ())
+	    error (_("Missing argument %ld in user function."), i);
+	  else
 	    {
-	      memcpy (new_line, user_args->a[i].arg, len);
-	      new_line += len;
+	      new_line.append (m_args[i].str, m_args[i].len);
+	      line = tmp;
 	    }
 	}
-      line = p + 5;
     }
   /* Don't forget the tail.  */
-  strcpy (new_line, line);
+  new_line.append (line);
 
-  /* Return a pointer to the beginning of the new line.  */
-  return save_line;
+  return new_line;
 }
 
 
@@ -918,32 +864,33 @@ realloc_body_list (struct command_line *
   if (new_length <= n)
     return;
 
-  body_list = (struct command_line **)
-    xmalloc (sizeof (struct command_line *) * new_length);
+  body_list = XCNEWVEC (struct command_line *, new_length);
 
   memcpy (body_list, command->body_list, sizeof (struct command_line *) * n);
-  memset (body_list + n, 0, sizeof (struct command_line *) * (new_length - n));
 
   xfree (command->body_list);
   command->body_list = body_list;
   command->body_count = new_length;
 }
 
-/* Read next line from stdout.  Passed to read_command_line_1 and
+/* Read next line from stdin.  Passed to read_command_line_1 and
    recurse_read_control_structure whenever we need to read commands
-   from stdout.  */
+   from stdin.  */
 
 static char *
 read_next_line (void)
 {
+  struct ui *ui = current_ui;
   char *prompt_ptr, control_prompt[256];
   int i = 0;
+  int from_tty = ui->instream == ui->stdin_stream;
 
   if (control_level >= 254)
     error (_("Control nesting too deep!"));
 
   /* Set a prompt based on the nesting of the control commands.  */
-  if (instream == stdin || (instream == 0 && deprecated_readline_hook != NULL))
+  if (from_tty
+      || (ui->instream == 0 && deprecated_readline_hook != NULL))
     {
       for (i = 0; i < control_level; i++)
 	control_prompt[i] = ' ';
@@ -954,7 +901,28 @@ read_next_line (void)
   else
     prompt_ptr = NULL;
 
-  return command_line_input (prompt_ptr, instream == stdin, "commands");
+  return command_line_input (prompt_ptr, from_tty, "commands");
+}
+
+/* Return true if CMD's name is NAME.  */
+
+static bool
+command_name_equals (struct cmd_list_element *cmd, const char *name)
+{
+  return (cmd != NULL
+	  && cmd != CMD_LIST_AMBIGUOUS
+	  && strcmp (cmd->name, name) == 0);
+}
+
+/* Given an input line P, skip the command and return a pointer to the
+   first argument.  */
+
+static const char *
+line_first_arg (const char *p)
+{
+  const char *first_arg = p + find_command_name_length (p);
+
+  return skip_spaces_const (first_arg); 
 }
 
 /* Process one input line.  If the command is an "end", return such an
@@ -991,9 +959,14 @@ process_next_line (char *p, struct comma
      We also permit whitespace before end and after.  */
   if (p_end - p_start == 3 && startswith (p_start, "end"))
     return end_command;
-  
+
   if (parse_commands)
     {
+      /* Resolve command abbreviations (e.g. 'ws' for 'while-stepping').  */
+      const char *cmd_name = p;
+      struct cmd_list_element *cmd
+	= lookup_cmd_1 (&cmd_name, cmdlist, NULL, 1);
+
       /* If commands are parsed, we skip initial spaces.  Otherwise,
 	 which is the case for Python commands and documentation
 	 (see the 'document' command), spaces are preserved.  */
@@ -1011,9 +984,7 @@ process_next_line (char *p, struct comma
 
       /* Check for while, if, break, continue, etc and build a new
 	 command line structure for them.  */
-      if ((p_end - p >= 14 && startswith (p, "while-stepping"))
-	  || (p_end - p >= 8 && startswith (p, "stepping"))
-	  || (p_end - p >= 2 && startswith (p, "ws")))
+      if (command_name_equals (cmd, "while-stepping"))
 	{
 	  /* Because validate_actionline and encode_action lookup
 	     command's line as command, we need the line to
@@ -1028,40 +999,25 @@ process_next_line (char *p, struct comma
 	     not.  */
 	  *command = build_command_line (while_stepping_control, p);
 	}
-      else if (p_end - p > 5 && startswith (p, "while"))
+      else if (command_name_equals (cmd, "while"))
 	{
-	  char *first_arg;
-
-	  first_arg = p + 5;
-	  while (first_arg < p_end && isspace (*first_arg))
-	    first_arg++;
-	  *command = build_command_line (while_control, first_arg);
+	  *command = build_command_line (while_control, line_first_arg (p));
 	}
-      else if (p_end - p > 2 && startswith (p, "if"))
+      else if (command_name_equals (cmd, "if"))
 	{
-	  char *first_arg;
-
-	  first_arg = p + 2;
-	  while (first_arg < p_end && isspace (*first_arg))
-	    first_arg++;
-	  *command = build_command_line (if_control, first_arg);
+	  *command = build_command_line (if_control, line_first_arg (p));
 	}
-      else if (p_end - p >= 8 && startswith (p, "commands"))
+      else if (command_name_equals (cmd, "commands"))
 	{
-	  char *first_arg;
-
-	  first_arg = p + 8;
-	  while (first_arg < p_end && isspace (*first_arg))
-	    first_arg++;
-	  *command = build_command_line (commands_control, first_arg);
+	  *command = build_command_line (commands_control, line_first_arg (p));
 	}
-      else if (p_end - p == 6 && startswith (p, "python"))
+      else if (command_name_equals (cmd, "python"))
 	{
 	  /* Note that we ignore the inline "python command" form
 	     here.  */
 	  *command = build_command_line (python_control, "");
 	}
-      else if (p_end - p == 6 && startswith (p, "compile"))
+      else if (command_name_equals (cmd, "compile"))
 	{
 	  /* Note that we ignore the inline "compile command" form
 	     here.  */
@@ -1069,15 +1025,14 @@ process_next_line (char *p, struct comma
 	  (*command)->control_u.compile.scope = COMPILE_I_INVALID_SCOPE;
 	}
 
-      else if (p_end - p == 5 && startswith (p, "guile"))
+      else if (command_name_equals (cmd, "guile"))
 	{
 	  /* Note that we ignore the inline "guile command" form here.  */
 	  *command = build_command_line (guile_control, "");
 	}
       else if (p_end - p == 10 && startswith (p, "loop_break"))
 	{
-	  *command = (struct command_line *)
-	    xmalloc (sizeof (struct command_line));
+	  *command = XNEW (struct command_line);
 	  (*command)->next = NULL;
 	  (*command)->line = NULL;
 	  (*command)->control_type = break_control;
@@ -1086,8 +1041,7 @@ process_next_line (char *p, struct comma
 	}
       else if (p_end - p == 13 && startswith (p, "loop_continue"))
 	{
-	  *command = (struct command_line *)
-	    xmalloc (sizeof (struct command_line));
+	  *command = XNEW (struct command_line);
 	  (*command)->next = NULL;
 	  (*command)->line = NULL;
 	  (*command)->control_type = continue_control;
@@ -1101,8 +1055,7 @@ process_next_line (char *p, struct comma
   if (!parse_commands || not_handled)
     {
       /* A normal command.  */
-      *command = (struct command_line *)
-	xmalloc (sizeof (struct command_line));
+      *command = XNEW (struct command_line);
       (*command)->next = NULL;
       (*command)->line = savestring (p, p_end - p);
       (*command)->control_type = simple_control;
@@ -1261,7 +1214,7 @@ read_command_lines (char *prompt_arg, in
 {
   struct command_line *head;
 
-  if (from_tty && input_from_terminal_p ())
+  if (from_tty && input_interactive_p (current_ui))
     {
       if (deprecated_readline_begin_hook)
 	{
@@ -1292,7 +1245,8 @@ read_command_lines (char *prompt_arg, in
       do_cleanups (old_chain);
     }
 
-  if (deprecated_readline_end_hook && from_tty && input_from_terminal_p ())
+  if (from_tty && input_interactive_p (current_ui)
+      && deprecated_readline_end_hook)
     {
       (*deprecated_readline_end_hook) ();
     }
@@ -1398,7 +1352,7 @@ free_command_lines (struct command_line 
 static void
 do_free_command_lines_cleanup (void *arg)
 {
-  free_command_lines (arg);
+  free_command_lines ((struct command_line **) arg);
 }
 
 struct cleanup *
@@ -1414,7 +1368,7 @@ copy_command_lines (struct command_line 
 
   if (cmds)
     {
-      result = (struct command_line *) xmalloc (sizeof (struct command_line));
+      result = XNEW (struct command_line);
 
       result->next = copy_command_lines (cmds->next);
       result->line = xstrdup (cmds->line);
@@ -1424,8 +1378,7 @@ copy_command_lines (struct command_line 
         {
           int i;
 
-          result->body_list = (struct command_line **)
-            xmalloc (sizeof (struct command_line *) * cmds->body_count);
+          result->body_list = XNEWVEC (struct command_line *, cmds->body_count);
 
           for (i = 0; i < cmds->body_count; i++)
             result->body_list[i] = copy_command_lines (cmds->body_list[i]);
@@ -1697,10 +1650,8 @@ script_from_file (FILE *stream, const ch
   source_line_number = 0;
   source_file_name = file;
 
-  make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
-
   {
+    scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
     TRY
       {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-script.h ./gdb/cli/cli-script.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-script.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-script.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file for GDB CLI command implementation library.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,6 +53,12 @@ extern struct cleanup *
 
 extern void execute_user_command (struct cmd_list_element *c, char *args);
 
+/* If we're in a user-defined command, replace any $argc/$argN
+   reference found in LINE with the arguments that were passed to the
+   command.  Otherwise, treat $argc/$argN as normal convenience
+   variables.  */
+extern std::string insert_user_defined_cmd_args (const char *line);
+
 /* Exported to top.c */
 
 extern void print_command_trace (const char *cmd);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-setshow.c ./gdb/cli/cli-setshow.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-setshow.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-setshow.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle set and show GDB commands.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -361,7 +361,7 @@ do_set_command (const char *arg, int fro
 	int len;
 	int nmatches;
 	const char *match = NULL;
-	char *p;
+	const char *p;
 
 	/* If no argument was supplied, print an informative error
 	   message.  */
@@ -373,7 +373,7 @@ do_set_command (const char *arg, int fro
 	    for (i = 0; c->enums[i]; i++)
 	      msg_len += strlen (c->enums[i]) + 2;
 
-	    msg = xmalloc (msg_len);
+	    msg = (char *) xmalloc (msg_len);
 	    *msg = '\0';
 	    make_cleanup (xfree, msg);
 
@@ -475,8 +475,8 @@ do_set_command (const char *arg, int fro
 
 	  p = p->prefix;
 	}
-      cp = name = xmalloc (length);
-      cmds = xmalloc (sizeof (struct cmd_list_element *) * i);
+      cp = name = (char *) xmalloc (length);
+      cmds = XNEWVEC (struct cmd_list_element *, i);
 
       /* Track back through filed 'prefix' and cache them in CMDS.  */
       for (i = 0, p = c; p != NULL; i++)
@@ -523,7 +523,7 @@ do_set_command (const char *arg, int fro
 	  break;
 	case var_boolean:
 	  {
-	    char *opt = *(int *) c->var ? "on" : "off";
+	    const char *opt = *(int *) c->var ? "on" : "off";
 
 	    observer_notify_command_param_changed (name, opt);
 	  }
@@ -568,13 +568,10 @@ void
 do_show_command (const char *arg, int from_tty, struct cmd_list_element *c)
 {
   struct ui_out *uiout = current_uiout;
-  struct cleanup *old_chain;
-  struct ui_file *stb;
 
   gdb_assert (c->type == show_cmd);
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
   /* Possibly call the pre hook.  */
   if (c->pre_show_hook)
@@ -584,29 +581,29 @@ do_show_command (const char *arg, int fr
     {
     case var_string:
       if (*(char **) c->var)
-	fputstr_filtered (*(char **) c->var, '"', stb);
+	stb.putstr (*(char **) c->var, '"');
       break;
     case var_string_noescape:
     case var_optional_filename:
     case var_filename:
     case var_enum:
       if (*(char **) c->var)
-	fputs_filtered (*(char **) c->var, stb);
+	stb.puts (*(char **) c->var);
       break;
     case var_boolean:
-      fputs_filtered (*(int *) c->var ? "on" : "off", stb);
+      stb.puts (*(int *) c->var ? "on" : "off");
       break;
     case var_auto_boolean:
       switch (*(enum auto_boolean*) c->var)
 	{
 	case AUTO_BOOLEAN_TRUE:
-	  fputs_filtered ("on", stb);
+	  stb.puts ("on");
 	  break;
 	case AUTO_BOOLEAN_FALSE:
-	  fputs_filtered ("off", stb);
+	  stb.puts ("off");
 	  break;
 	case AUTO_BOOLEAN_AUTO:
-	  fputs_filtered ("auto", stb);
+	  stb.puts ("auto");
 	  break;
 	default:
 	  internal_error (__FILE__, __LINE__,
@@ -619,24 +616,24 @@ do_show_command (const char *arg, int fr
     case var_zuinteger:
       if (c->var_type == var_uinteger
 	  && *(unsigned int *) c->var == UINT_MAX)
-	fputs_filtered ("unlimited", stb);
+	stb.puts ("unlimited");
       else
-	fprintf_filtered (stb, "%u", *(unsigned int *) c->var);
+	stb.printf ("%u", *(unsigned int *) c->var);
       break;
     case var_integer:
     case var_zinteger:
       if (c->var_type == var_integer
 	  && *(int *) c->var == INT_MAX)
-	fputs_filtered ("unlimited", stb);
+	stb.puts ("unlimited");
       else
-	fprintf_filtered (stb, "%d", *(int *) c->var);
+	stb.printf ("%d", *(int *) c->var);
       break;
     case var_zuinteger_unlimited:
       {
 	if (*(int *) c->var == -1)
-	  fputs_filtered ("unlimited", stb);
+	  stb.puts ("unlimited");
 	else
-	  fprintf_filtered (stb, "%d", *(int *) c->var);
+	  stb.printf ("%d", *(int *) c->var);
       }
       break;
     default:
@@ -649,19 +646,15 @@ do_show_command (const char *arg, int fr
      code to print the value out.  For the latter there should be
      MI and CLI specific versions.  */
 
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_stream (uiout, "value", stb);
+  if (uiout->is_mi_like_p ())
+    uiout->field_stream ("value", stb);
   else
     {
-      char *value = ui_file_xstrdup (stb, NULL);
-
-      make_cleanup (xfree, value);
       if (c->show_value_func != NULL)
-	c->show_value_func (gdb_stdout, from_tty, c, value);
+	c->show_value_func (gdb_stdout, from_tty, c, stb.c_str ());
       else
-	deprecated_show_value_hack (gdb_stdout, from_tty, c, value);
+	deprecated_show_value_hack (gdb_stdout, from_tty, c, stb.c_str ());
     }
-  do_cleanups (old_chain);
 
   c->func (c, NULL, from_tty);
 }
@@ -683,10 +676,10 @@ cmd_show_list (struct cmd_list_element *
 	{
 	  struct cleanup *optionlist_chain
 	    = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
-	  char *new_prefix = strstr (list->prefixname, "show ") + 5;
+	  const char *new_prefix = strstr (list->prefixname, "show ") + 5;
 
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_string (uiout, "prefix", new_prefix);
+	  if (uiout->is_mi_like_p ())
+	    uiout->field_string ("prefix", new_prefix);
 	  cmd_show_list (*list->prefixlist, from_tty, new_prefix);
 	  /* Close the tuple.  */
 	  do_cleanups (optionlist_chain);
@@ -698,9 +691,9 @@ cmd_show_list (struct cmd_list_element *
 	      struct cleanup *option_chain
 		= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
 
-	      ui_out_text (uiout, prefix);
-	      ui_out_field_string (uiout, "name", list->name);
-	      ui_out_text (uiout, ":  ");
+	      uiout->text (prefix);
+	      uiout->field_string ("name", list->name);
+	      uiout->text (":  ");
 	      if (list->type == show_cmd)
 		do_show_command ((char *) NULL, from_tty, list);
 	      else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-setshow.h ./gdb/cli/cli-setshow.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-setshow.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-setshow.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file for GDB CLI set and show commands implementation.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-utils.c ./gdb/cli/cli-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* CLI utilities.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,16 +23,9 @@
 
 #include <ctype.h>
 
-/* *PP is a string denoting a number.  Get the number of the.  Advance
-   *PP after the string and any trailing whitespace.
-
-   Currently the string can either be a number, or "$" followed by the
-   name of a convenience variable, or ("$" or "$$") followed by digits.
-
-   TRAILER is a character which can be found after the number; most
-   commonly this is `-'.  If you don't want a trailer, use \0.  */
+/* See documentation in cli-utils.h.  */
 
-static int
+int
 get_number_trailer (const char **pp, int trailer)
 {
   int retval = 0;	/* default */
@@ -128,25 +121,49 @@ get_number (char **pp)
 
 /* See documentation in cli-utils.h.  */
 
+number_or_range_parser::number_or_range_parser (const char *string)
+{
+  init (string);
+}
+
+/* See documentation in cli-utils.h.  */
+
 void
-init_number_or_range (struct get_number_or_range_state *state,
-		      const char *string)
+number_or_range_parser::init (const char *string)
 {
-  memset (state, 0, sizeof (*state));
-  state->string = string;
+  m_finished = false;
+  m_cur_tok = string;
+  m_last_retval = 0;
+  m_end_value = 0;
+  m_end_ptr = NULL;
+  m_in_range = false;
 }
 
 /* See documentation in cli-utils.h.  */
 
 int
-get_number_or_range (struct get_number_or_range_state *state)
+number_or_range_parser::get_number ()
 {
-  if (*state->string != '-')
+  if (m_in_range)
+    {
+      /* All number-parsing has already been done.  Return the next
+	 integer value (one greater than the saved previous value).
+	 Do not advance the token pointer until the end of range is
+	 reached.  */
+
+      if (++m_last_retval == m_end_value)
+	{
+	  /* End of range reached; advance token pointer.  */
+	  m_cur_tok = m_end_ptr;
+	  m_in_range = false;
+	}
+    }
+  else if (*m_cur_tok != '-')
     {
-      /* Default case: state->string is pointing either to a solo
+      /* Default case: state->m_cur_tok is pointing either to a solo
 	 number, or to the first number of a range.  */
-      state->last_retval = get_number_trailer (&state->string, '-');
-      if (*state->string == '-')
+      m_last_retval = get_number_trailer (&m_cur_tok, '-');
+      if (*m_cur_tok == '-')
 	{
 	  const char **temp;
 
@@ -154,43 +171,42 @@ get_number_or_range (struct get_number_o
 	     Skip the '-', parse and remember the second number,
 	     and also remember the end of the final token.  */
 
-	  temp = &state->end_ptr; 
-	  state->end_ptr = skip_spaces_const (state->string + 1);
-	  state->end_value = get_number_const (temp);
-	  if (state->end_value < state->last_retval) 
+	  temp = &m_end_ptr;
+	  m_end_ptr = skip_spaces_const (m_cur_tok + 1);
+	  m_end_value = get_number_const (temp);
+	  if (m_end_value < m_last_retval)
 	    {
 	      error (_("inverted range"));
 	    }
-	  else if (state->end_value == state->last_retval)
+	  else if (m_end_value == m_last_retval)
 	    {
 	      /* Degenerate range (number1 == number2).  Advance the
 		 token pointer so that the range will be treated as a
-		 single number.  */ 
-	      state->string = state->end_ptr;
+		 single number.  */
+	      m_cur_tok = m_end_ptr;
 	    }
 	  else
-	    state->in_range = 1;
+	    m_in_range = true;
 	}
     }
-  else if (! state->in_range)
-    error (_("negative value"));
   else
-    {
-      /* state->string points to the '-' that betokens a range.  All
-	 number-parsing has already been done.  Return the next
-	 integer value (one greater than the saved previous value).
-	 Do not advance the token pointer until the end of range
-	 is reached.  */
+    error (_("negative value"));
+  m_finished = *m_cur_tok == '\0';
+  return m_last_retval;
+}
 
-      if (++state->last_retval == state->end_value)
-	{
-	  /* End of range reached; advance token pointer.  */
-	  state->string = state->end_ptr;
-	  state->in_range = 0;
-	}
-    }
-  state->finished = *state->string == '\0';
-  return state->last_retval;
+/* See documentation in cli-utils.h.  */
+
+void
+number_or_range_parser::setup_range (int start_value, int end_value,
+				     const char *end_ptr)
+{
+  gdb_assert (start_value > 0);
+
+  m_in_range = true;
+  m_end_ptr = end_ptr;
+  m_last_retval = start_value - 1;
+  m_end_value = end_value;
 }
 
 /* Accept a number and a string-form list of numbers such as is 
@@ -204,15 +220,13 @@ get_number_or_range (struct get_number_o
 int
 number_is_in_list (const char *list, int number)
 {
-  struct get_number_or_range_state state;
-
   if (list == NULL || *list == '\0')
     return 1;
 
-  init_number_or_range (&state, list);
-  while (!state.finished)
+  number_or_range_parser parser (list);
+  while (!parser.finished ())
     {
-      int gotnum = get_number_or_range (&state);
+      int gotnum = parser.get_number ();
 
       if (gotnum == 0)
 	error (_("Args must be numbers or '$' variables."));
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-utils.h ./gdb/cli/cli-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli/cli-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli/cli-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* CLI utilities.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,11 +20,18 @@
 #ifndef CLI_UTILS_H
 #define CLI_UTILS_H
 
-/* *PP is a string denoting a number.  Get the number of the.  Advance
-   *PP after the string and any trailing whitespace.
+/* *PP is a string denoting a number.  Get the number.  Advance *PP
+   after the string and any trailing whitespace.
 
-   Currently the string can either be a number,  or "$" followed by the
-   name of a convenience variable, or ("$" or "$$") followed by digits.  */
+   The string can either be a number, or "$" followed by the name of a
+   convenience variable, or ("$" or "$$") followed by digits.
+
+   TRAILER is a character which can be found after the number; most
+   commonly this is `-'.  If you don't want a trailer, use \0.  */
+
+extern int get_number_trailer (const char **pp, int trailer);
+
+/* Convenience.  Like get_number_trailer, but with no TRAILER.  */
 
 extern int get_number_const (const char **);
 
@@ -32,57 +39,91 @@ extern int get_number_const (const char 
 
 extern int get_number (char **);
 
-/* An object of this type is passed to get_number_or_range.  It must
-   be initialized by calling init_number_or_range.  This type is
-   defined here so that it can be stack-allocated, but all members
-   other than `finished' and `string' should be treated as opaque.  */
+/* Parse a number or a range.
+   A number will be of the form handled by get_number.
+   A range will be of the form <number1> - <number2>, and
+   will represent all the integers between number1 and number2,
+   inclusive.  */
 
-struct get_number_or_range_state
+class number_or_range_parser
 {
-  /* Non-zero if parsing has completed.  */
-  int finished;
+public:
+  /* Default construction.  Must call init before calling
+     get_next.  */
+  number_or_range_parser () {}
+
+  /* Calls init automatically.  */
+  number_or_range_parser (const char *string);
+
+  /* STRING is the string to be parsed.  */
+  void init (const char *string);
+
+  /* While processing a range, this fuction is called iteratively; At
+     each call it will return the next value in the range.
+
+     At the beginning of parsing a range, the char pointer
+     STATE->m_cur_tok will be advanced past <number1> and left
+     pointing at the '-' token.  Subsequent calls will not advance the
+     pointer until the range is completed.  The call that completes
+     the range will advance the pointer past <number2>.  */
+  int get_number ();
+
+  /* Setup internal state such that get_next() returns numbers in the
+     START_VALUE to END_VALUE range.  END_PTR is where the string is
+     advanced to when get_next() returns END_VALUE.  */
+  void setup_range (int start_value, int end_value,
+		    const char *end_ptr);
+
+  /* Returns true if parsing has completed.  */
+  bool finished () const
+  { return m_finished; }
+
+  /* Return the string being parsed.  When parsing has finished, this
+     points past the last parsed token.  */
+  const char *cur_tok () const
+  { return m_cur_tok; }
+
+  /* True when parsing a range.  */
+  bool in_range () const
+  { return m_in_range; }
+
+  /* When parsing a range, the final value in the range.  */
+  int end_value () const
+  { return m_end_value; }
+
+  /* When parsing a range, skip past the final token in the range.  */
+  void skip_range ()
+  {
+    gdb_assert (m_in_range);
+    m_cur_tok = m_end_ptr;
+  }
+
+private:
+  /* No need for these.  They are intentionally not defined anywhere.  */
+  number_or_range_parser (const number_or_range_parser &);
+  number_or_range_parser &operator= (const number_or_range_parser &);
+
+  /* True if parsing has completed.  */
+  bool m_finished;
 
   /* The string being parsed.  When parsing has finished, this points
      past the last parsed token.  */
-  const char *string;
+  const char *m_cur_tok;
 
   /* Last value returned.  */
-  int last_retval;
+  int m_last_retval;
 
   /* When parsing a range, the final value in the range.  */
-  int end_value;
+  int m_end_value;
 
   /* When parsing a range, a pointer past the final token in the
      range.  */
-  const char *end_ptr;
+  const char *m_end_ptr;
 
-  /* Non-zero when parsing a range.  */
-  int in_range;
+  /* True when parsing a range.  */
+  bool m_in_range;
 };
 
-/* Initialize a get_number_or_range_state for use with
-   get_number_or_range_state.  STRING is the string to be parsed.  */
-
-extern void init_number_or_range (struct get_number_or_range_state *state,
-				  const char *string);
-
-/* Parse a number or a range.
-   A number will be of the form handled by get_number.
-   A range will be of the form <number1> - <number2>, and 
-   will represent all the integers between number1 and number2,
-   inclusive.
-
-   While processing a range, this fuction is called iteratively;
-   At each call it will return the next value in the range.
-
-   At the beginning of parsing a range, the char pointer STATE->string will
-   be advanced past <number1> and left pointing at the '-' token.
-   Subsequent calls will not advance the pointer until the range
-   is completed.  The call that completes the range will advance
-   the pointer past <number2>.  */
-
-extern int get_number_or_range (struct get_number_or_range_state *state);
-
 /* Accept a number and a string-form list of numbers such as is 
    accepted by get_number_or_range.  Return TRUE if the number is
    in the list.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli-out.c ./gdb/cli-out.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli-out.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli-out.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Output generating routines for GDB CLI.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
    Written by Fernando Nasser for Cygnus.
@@ -24,170 +24,109 @@
 #include "ui-out.h"
 #include "cli-out.h"
 #include "completer.h"
-#include "vec.h"
 #include "readline/readline.h"
 
-typedef struct cli_ui_out_data cli_out_data;
-
-/* Prototypes for local functions */
-
-static void cli_text (struct ui_out *uiout, const char *string);
-
-static void field_separator (void);
-
-static void out_field_fmt (struct ui_out *uiout, int fldno,
-			   const char *fldname,
-			   const char *format,...) ATTRIBUTE_PRINTF (4, 5);
-
-/* The destructor.  */
-
-static void
-cli_uiout_dtor (struct ui_out *ui_out)
-{
-  cli_out_data *data = ui_out_data (ui_out);
-
-  VEC_free (ui_filep, data->streams);
-  xfree (data);
-}
-
 /* These are the CLI output functions */
 
 /* Mark beginning of a table */
 
-static void
-cli_table_begin (struct ui_out *uiout, int nbrofcols,
-		 int nr_rows,
-		 const char *tblid)
+void
+cli_ui_out::do_table_begin (int nbrofcols, int nr_rows, const char *tblid)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
   if (nr_rows == 0)
-    data->suppress_output = 1;
+    m_suppress_output = true;
   else
     /* Only the table suppresses the output and, fortunately, a table
        is not a recursive data structure.  */
-    gdb_assert (data->suppress_output == 0);
+    gdb_assert (!m_suppress_output);
 }
 
 /* Mark beginning of a table body */
 
-static void
-cli_table_body (struct ui_out *uiout)
+void
+cli_ui_out::do_table_body ()
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
+
   /* first, close the table header line */
-  cli_text (uiout, "\n");
+  text ("\n");
 }
 
 /* Mark end of a table */
 
-static void
-cli_table_end (struct ui_out *uiout)
+void
+cli_ui_out::do_table_end ()
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  data->suppress_output = 0;
+  m_suppress_output = false;
 }
 
 /* Specify table header */
 
-static void
-cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		  const char *col_name,
-		  const char *colhdr)
+void
+cli_ui_out::do_table_header (int width, ui_align alignment,
+			     const std::string &col_name,
+			     const std::string &col_hdr)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  /* Always go through the function pointer (virtual function call).
-     We may have been extended.  */
-  uo_field_string (uiout, 0, width, alignment, 0, colhdr);
+  do_field_string (0, width, alignment, 0, col_hdr.c_str ());
 }
 
 /* Mark beginning of a list */
 
-static void
-cli_begin (struct ui_out *uiout,
-	   enum ui_out_type type,
-	   int level,
-	   const char *id)
+void
+cli_ui_out::do_begin (ui_out_type type, const char *id)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
 }
 
 /* Mark end of a list */
 
-static void
-cli_end (struct ui_out *uiout,
-	 enum ui_out_type type,
-	 int level)
+void
+cli_ui_out::do_end (ui_out_type type)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
 }
 
 /* output an int field */
 
-static void
-cli_field_int (struct ui_out *uiout, int fldno, int width,
-	       enum ui_align alignment,
-	       const char *fldname, int value)
+void
+cli_ui_out::do_field_int (int fldno, int width, ui_align alignment,
+			  const char *fldname, int value)
 {
   char buffer[20];	/* FIXME: how many chars long a %d can become? */
-  cli_out_data *data = ui_out_data (uiout);
 
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
+
   xsnprintf (buffer, sizeof (buffer), "%d", value);
 
-  /* Always go through the function pointer (virtual function call).
-     We may have been extended.  */
-  uo_field_string (uiout, fldno, width, alignment, fldname, buffer);
+  do_field_string (fldno, width, alignment, fldname, buffer);
 }
 
-/* used to ommit a field */
+/* used to omit a field */
 
-static void
-cli_field_skip (struct ui_out *uiout, int fldno, int width,
-		enum ui_align alignment,
-		const char *fldname)
+void
+cli_ui_out::do_field_skip (int fldno, int width, ui_align alignment,
+			   const char *fldname)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  /* Always go through the function pointer (virtual function call).
-     We may have been extended.  */
-  uo_field_string (uiout, fldno, width, alignment, fldname, "");
+  do_field_string (fldno, width, alignment, fldname, "");
 }
 
 /* other specific cli_field_* end up here so alignment and field
    separators are both handled by cli_field_string */
 
-static void
-cli_field_string (struct ui_out *uiout,
-		  int fldno,
-		  int width,
-		  enum ui_align align,
-		  const char *fldname,
-		  const char *string)
+void
+cli_ui_out::do_field_string (int fldno, int width, ui_align align,
+			     const char *fldname, const char *string)
 {
   int before = 0;
   int after = 0;
-  cli_out_data *data = ui_out_data (uiout);
 
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
   if ((align != ui_noalign) && string)
@@ -214,11 +153,13 @@ cli_field_string (struct ui_out *uiout,
     }
 
   if (before)
-    ui_out_spaces (uiout, before);
+    spaces (before);
+
   if (string)
-    out_field_fmt (uiout, fldno, fldname, "%s", string);
+    out_field_fmt (fldno, fldname, "%s", string);
+
   if (after)
-    ui_out_spaces (uiout, after);
+    spaces (after);
 
   if (align != ui_noalign)
     field_separator ();
@@ -226,198 +167,133 @@ cli_field_string (struct ui_out *uiout,
 
 /* This is the only field function that does not align.  */
 
-static void ATTRIBUTE_PRINTF (6, 0)
-cli_field_fmt (struct ui_out *uiout, int fldno,
-	       int width, enum ui_align align,
-	       const char *fldname,
-	       const char *format,
-	       va_list args)
+void
+cli_ui_out::do_field_fmt (int fldno, int width, ui_align align,
+			  const char *fldname, const char *format,
+			  va_list args)
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *stream;
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  stream = VEC_last (ui_filep, data->streams);
-  vfprintf_filtered (stream, format, args);
+  vfprintf_filtered (m_streams.back (), format, args);
 
   if (align != ui_noalign)
     field_separator ();
 }
 
-static void
-cli_spaces (struct ui_out *uiout, int numspaces)
+void
+cli_ui_out::do_spaces (int numspaces)
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *stream;
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  stream = VEC_last (ui_filep, data->streams);
-  print_spaces_filtered (numspaces, stream);
+  print_spaces_filtered (numspaces, m_streams.back ());
 }
 
-static void
-cli_text (struct ui_out *uiout, const char *string)
+void
+cli_ui_out::do_text (const char *string)
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *stream;
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  stream = VEC_last (ui_filep, data->streams);
-  fputs_filtered (string, stream);
+  fputs_filtered (string, m_streams.back ());
 }
 
-static void ATTRIBUTE_PRINTF (3, 0)
-cli_message (struct ui_out *uiout, int verbosity,
-	     const char *format, va_list args)
+void
+cli_ui_out::do_message (const char *format, va_list args)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
 
-  if (ui_out_get_verblvl (uiout) >= verbosity)
-    {
-      struct ui_file *stream = VEC_last (ui_filep, data->streams);
-
-      vfprintf_unfiltered (stream, format, args);
-    }
+  vfprintf_unfiltered (m_streams.back (), format, args);
 }
 
-static void
-cli_wrap_hint (struct ui_out *uiout, char *identstring)
+void
+cli_ui_out::do_wrap_hint (const char *identstring)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
+  if (m_suppress_output)
     return;
+
   wrap_here (identstring);
 }
 
-static void
-cli_flush (struct ui_out *uiout)
+void
+cli_ui_out::do_flush ()
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *stream = VEC_last (ui_filep, data->streams);
-
-  gdb_flush (stream);
+  gdb_flush (m_streams.back ());
 }
 
 /* OUTSTREAM as non-NULL will push OUTSTREAM on the stack of output streams
    and make it therefore active.  OUTSTREAM as NULL will pop the last pushed
    output stream; it is an internal error if it does not exist.  */
 
-static int
-cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
+void
+cli_ui_out::do_redirect (ui_file *outstream)
 {
-  cli_out_data *data = ui_out_data (uiout);
-
   if (outstream != NULL)
-    VEC_safe_push (ui_filep, data->streams, outstream);
+    m_streams.push_back (outstream);
   else
-    VEC_pop (ui_filep, data->streams);
-
-  return 0;
+    m_streams.pop_back ();
 }
 
 /* local functions */
 
-/* Like cli_field_fmt, but takes a variable number of args
+/* Like cli_ui_out::do_field_fmt, but takes a variable number of args
    and makes a va_list and does not insert a separator.  */
 
 /* VARARGS */
-static void
-out_field_fmt (struct ui_out *uiout, int fldno,
-	       const char *fldname,
-	       const char *format,...)
+void
+cli_ui_out::out_field_fmt (int fldno, const char *fldname,
+			   const char *format, ...)
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *stream = VEC_last (ui_filep, data->streams);
   va_list args;
 
   va_start (args, format);
-  vfprintf_filtered (stream, format, args);
+  vfprintf_filtered (m_streams.back (), format, args);
 
   va_end (args);
 }
 
-/* Access to ui_out format private members.  */
-
-static void
-field_separator (void)
+void
+cli_ui_out::field_separator ()
 {
-  cli_out_data *data = ui_out_data (current_uiout);
-  struct ui_file *stream = VEC_last (ui_filep, data->streams);
-
-  fputc_filtered (' ', stream);
+  fputc_filtered (' ', m_streams.back ());
 }
 
-/* This is the CLI ui-out implementation functions vector */
-
-const struct ui_out_impl cli_ui_out_impl =
-{
-  cli_table_begin,
-  cli_table_body,
-  cli_table_end,
-  cli_table_header,
-  cli_begin,
-  cli_end,
-  cli_field_int,
-  cli_field_skip,
-  cli_field_string,
-  cli_field_fmt,
-  cli_spaces,
-  cli_text,
-  cli_message,
-  cli_wrap_hint,
-  cli_flush,
-  cli_redirect,
-  cli_uiout_dtor,
-  0, /* Does not need MI hacks (i.e. needs CLI hacks).  */
-};
-
-/* Constructor for a `cli_out_data' object.  */
+/* Constructor for cli_ui_out.  */
 
-void
-cli_out_data_ctor (cli_out_data *self, struct ui_file *stream)
+cli_ui_out::cli_ui_out (ui_file *stream, ui_out_flags flags)
+: ui_out (flags),
+  m_suppress_output (false)
 {
   gdb_assert (stream != NULL);
 
-  self->streams = NULL;
-  VEC_safe_push (ui_filep, self->streams, stream);
+  m_streams.push_back (stream);
+}
 
-  self->suppress_output = 0;
+cli_ui_out::~cli_ui_out ()
+{
 }
 
 /* Initialize private members at startup.  */
 
-struct ui_out *
+cli_ui_out *
 cli_out_new (struct ui_file *stream)
 {
-  int flags = ui_source_list;
-  cli_out_data *data = XNEW (cli_out_data);
-
-  cli_out_data_ctor (data, stream);
-  return ui_out_new (&cli_ui_out_impl, data, flags);
+  return new cli_ui_out (stream, ui_source_list);
 }
 
-struct ui_file *
-cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
+ui_file *
+cli_ui_out::set_stream (struct ui_file *stream)
 {
-  cli_out_data *data = ui_out_data (uiout);
-  struct ui_file *old;
-  
-  old = VEC_pop (ui_filep, data->streams);
-  VEC_quick_push (ui_filep, data->streams, stream);
+  ui_file *old;
+
+  old = m_streams.back ();
+  m_streams.back () = stream;
 
   return old;
 }
-
+
 /* CLI interface to display tab-completion matches.  */
 
 /* CLI version of displayer.crlf.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli-out.h ./gdb/cli-out.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cli-out.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cli-out.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Output generating routines for GDB CLI.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
    This file is part of GDB.
@@ -21,32 +21,61 @@
 #define CLI_OUT_H
 
 #include "ui-out.h"
-#include "vec.h"
+#include <vector>
 
-/* Used for cli_ui_out_data->streams.  */
+class cli_ui_out : public ui_out
+{
+public:
+
+  explicit cli_ui_out (ui_file *stream, ui_out_flags flags);
+  virtual ~cli_ui_out ();
+
+  ui_file *set_stream (ui_file *stream);
+
+protected:
+
+  virtual void do_table_begin (int nbrofcols, int nr_rows,
+				  const char *tblid) override;
+  virtual void do_table_body () override;
+  virtual void do_table_end () override;
+  virtual void do_table_header (int width, ui_align align,
+			     const std::string &col_name,
+			     const std::string &col_hdr) override;
+  /* Note: level 0 is the top-level so LEVEL is always greater than
+     zero.  */
+  virtual void do_begin (ui_out_type type, const char *id) override;
+  virtual void do_end (ui_out_type type) override;
+  virtual void do_field_int (int fldno, int width, ui_align align,
+			  const char *fldname, int value) override;
+  virtual void do_field_skip (int fldno, int width, ui_align align,
+			   const char *fldname) override;
+  virtual void do_field_string (int fldno, int width, ui_align align,
+			     const char *fldname, const char *string) override;
+  virtual void do_field_fmt (int fldno, int width, ui_align align,
+			  const char *fldname, const char *format, va_list args)
+    override ATTRIBUTE_PRINTF (6,0);
+  virtual void do_spaces (int numspaces) override;
+  virtual void do_text (const char *string) override;
+  virtual void do_message (const char *format, va_list args) override
+    ATTRIBUTE_PRINTF (2,0);
+  virtual void do_wrap_hint (const char *identstring) override;
+  virtual void do_flush () override;
+  virtual void do_redirect (struct ui_file *outstream) override;
+
+  bool suppress_output ()
+  { return m_suppress_output; }
+
+private:
+
+  void field_separator ();
+  void out_field_fmt (int fldno, const char *fldname, const char *format, ...)
+    ATTRIBUTE_PRINTF (4, 5);
+
+  std::vector<ui_file *> m_streams;
+  bool m_suppress_output;
+};
 
-typedef struct ui_file *ui_filep;
-DEF_VEC_P (ui_filep);
-
-/* These are exported so that they can be extended by other `ui_out'
-   implementations, like TUI's.  */
-
-struct cli_ui_out_data
-  {
-    VEC (ui_filep) *streams;
-    int suppress_output;
-  };
-
-extern const struct ui_out_impl cli_ui_out_impl;
-
-
-extern struct ui_out *cli_out_new (struct ui_file *stream);
-
-extern void cli_out_data_ctor (struct cli_ui_out_data *data,
-			       struct ui_file *stream);
-
-extern struct ui_file *cli_out_set_stream (struct ui_out *uiout,
-					   struct ui_file *stream);
+extern cli_ui_out *cli_out_new (struct ui_file *stream);
 
 extern void cli_display_match_list (char **matches, int len, int max);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coff-pe-read.c ./gdb/coff-pe-read.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coff-pe-read.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/coff-pe-read.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
    convert to internal format, for GDB. Used as a last resort if no
    debugging symbols recognized.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -125,7 +125,7 @@ struct pe_sections_info
 static void
 get_section_vmas (bfd *abfd, asection *sectp, void *context)
 {
-  struct pe_sections_info *data = context;
+  struct pe_sections_info *data = (struct pe_sections_info *) context;
   struct read_pe_section_data *sections = data->sections;
   int sectix = get_pe_section_index (sectp->name, sections,
 				     data->nb_sections);
@@ -150,7 +150,8 @@ get_section_vmas (bfd *abfd, asection *s
    OBJFILE is the objfile struct of DLL_NAME.  */
 
 static void
-add_pe_exported_sym (const char *sym_name,
+add_pe_exported_sym (minimal_symbol_reader &reader,
+		     const char *sym_name,
 		     unsigned long func_rva,
 		     int ordinal,
 		     const struct read_pe_section_data *section_data,
@@ -176,13 +177,12 @@ add_pe_exported_sym (const char *sym_nam
 			" for entry \"%s\" in dll \"%s\"\n"),
 			section_data->section_name, sym_name, dll_name);
 
-  prim_record_minimal_symbol_and_info (qualified_name, vma,
-				       section_data->ms_type,
-				       section_data->index, objfile);
+  reader.record_with_info (qualified_name, vma, section_data->ms_type,
+			   section_data->index);
 
   /* Enter the plain name as well, which might not be unique.  */
-  prim_record_minimal_symbol_and_info (bare_name, vma, section_data->ms_type,
-				       section_data->index, objfile);
+  reader.record_with_info (bare_name, vma, section_data->ms_type,
+			   section_data->index);
   if (debug_coff_pe_read > 1)
     fprintf_unfiltered (gdb_stdlog, _("Adding exported symbol \"%s\""
 			" in dll \"%s\"\n"), sym_name, dll_name);
@@ -200,7 +200,8 @@ add_pe_exported_sym (const char *sym_nam
    OBJFILE is the objfile struct of DLL_NAME.  */
 
 static int
-add_pe_forwarded_sym (const char *sym_name, const char *forward_dll_name,
+add_pe_forwarded_sym (minimal_symbol_reader &reader,
+		      const char *sym_name, const char *forward_dll_name,
 		      const char *forward_func_name, int ordinal,
 		      const char *dll_name, struct objfile *objfile)
 {
@@ -211,7 +212,7 @@ add_pe_forwarded_sym (const char *sym_na
   int forward_dll_name_len = strlen (forward_dll_name);
   int forward_func_name_len = strlen (forward_func_name);
   int forward_len = forward_dll_name_len + forward_func_name_len + 2;
-  char *forward_qualified_name = alloca (forward_len);
+  char *forward_qualified_name = (char *) alloca (forward_len);
   short section;
 
   xsnprintf (forward_qualified_name, forward_len, "%s!%s", forward_dll_name,
@@ -266,12 +267,10 @@ add_pe_forwarded_sym (const char *sym_na
      code.  */
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
-  prim_record_minimal_symbol_and_info (qualified_name, vma - baseaddr,
-				       msymtype, section, objfile);
+  reader.record_with_info (qualified_name, vma - baseaddr, msymtype, section);
 
   /* Enter the plain name as well, which might not be unique.  */
-  prim_record_minimal_symbol_and_info (bare_name, vma - baseaddr, msymtype,
-				       section, objfile);
+  reader.record_with_info (bare_name, vma - baseaddr, msymtype, section);
   xfree (qualified_name);
   xfree (bare_name);
 
@@ -313,7 +312,7 @@ pe_get32 (bfd *abfd, int where)
 static unsigned int
 pe_as16 (void *ptr)
 {
-  unsigned char *b = ptr;
+  unsigned char *b = (unsigned char *) ptr;
 
   return b[0] + (b[1] << 8);
 }
@@ -321,7 +320,7 @@ pe_as16 (void *ptr)
 static unsigned int
 pe_as32 (void *ptr)
 {
-  unsigned char *b = ptr;
+  unsigned char *b = (unsigned char *) ptr;
 
   return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
 }
@@ -331,7 +330,8 @@ pe_as32 (void *ptr)
    pe_implied_import_dll in pe-dll.c.  */
 
 void
-read_pe_exported_syms (struct objfile *objfile)
+read_pe_exported_syms (minimal_symbol_reader &reader,
+		       struct objfile *objfile)
 {
   bfd *dll = objfile->obfd;
   unsigned long nbnormal, nbforward;
@@ -356,8 +356,7 @@ read_pe_exported_syms (struct objfile *o
 
   char const *target = bfd_get_target (objfile->obfd);
 
-  section_data = xzalloc (PE_SECTION_TABLE_SIZE
-			 * sizeof (struct read_pe_section_data));
+  section_data = XCNEWVEC (struct read_pe_section_data, PE_SECTION_TABLE_SIZE);
 
   make_cleanup (free_current_contents, &section_data);
 
@@ -493,8 +492,8 @@ read_pe_exported_syms (struct objfile *o
 	{
 	  char *name;
 
-	  section_data = xrealloc (section_data, (otherix + 1)
-				   * sizeof (struct read_pe_section_data));
+	  section_data = XRESIZEVEC (struct read_pe_section_data, section_data,
+				     otherix + 1);
 	  name = xstrdup (sec_name);
 	  section_data[otherix].section_name = name;
 	  make_cleanup (xfree, name);
@@ -576,12 +575,12 @@ read_pe_exported_syms (struct objfile *o
 	    {
 	      int len = (int) (sep - forward_name);
 
-	      forward_dll_name = alloca (len + 1);
+	      forward_dll_name = (char *) alloca (len + 1);
 	      strncpy (forward_dll_name, forward_name, len);
 	      forward_dll_name[len] = '\0';
 	      forward_func_name = ++sep;
 	    }
-	  if (add_pe_forwarded_sym (funcname, forward_dll_name,
+	  if (add_pe_forwarded_sym (reader, funcname, forward_dll_name,
 				    forward_func_name, ordinal,
 				    dll_name, objfile) != 0)
 	    ++nbforward;
@@ -596,7 +595,7 @@ read_pe_exported_syms (struct objfile *o
 	      char *sym_name = (char *) (erva + name_rva);
 
 	      section_found = 1;
-	      add_pe_exported_sym (sym_name, func_rva, ordinal,
+	      add_pe_exported_sym (reader, sym_name, func_rva, ordinal,
 				   section_data + sectix, dll_name, objfile);
 	      ++nbnormal;
 	      break;
@@ -608,7 +607,7 @@ read_pe_exported_syms (struct objfile *o
 
 	  if (name_rva == 0)
 	    {
-	      add_pe_exported_sym (NULL, func_rva, ordinal,
+	      add_pe_exported_sym (reader, NULL, func_rva, ordinal,
 				   section_data, dll_name, objfile);
 	      ++nbnormal;
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coff-pe-read.h ./gdb/coff-pe-read.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coff-pe-read.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/coff-pe-read.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface to coff-pe-read.c (portable-executable-specific symbol reader).
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,8 @@ struct bfd;
 
 /* Read the export table and convert it to minimal symbol table
    entries */
-extern void read_pe_exported_syms (struct objfile *objfile);
+extern void read_pe_exported_syms (minimal_symbol_reader &reader,
+				   struct objfile *objfile);
 
 /* Extract from ABFD the offset of the .text section.
    Returns default value 0x1000 if information is not found.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coffread.c ./gdb/coffread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/coffread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/coffread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Read coff symbol tables and convert to internal format, for GDB.
-   Copyright (C) 1987-2015 Free Software Foundation, Inc.
+   Copyright (C) 1987-2017 Free Software Foundation, Inc.
    Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
 
    This file is part of GDB.
@@ -207,7 +207,8 @@ static void read_one_sym (struct coff_sy
 			  struct internal_syment *,
 			  union internal_auxent *);
 
-static void coff_symtab_read (long, unsigned int, struct objfile *);
+static void coff_symtab_read (minimal_symbol_reader &,
+			      long, unsigned int, struct objfile *);
 
 /* We are called once per section from coff_symfile_read.  We
    need to examine each section we are passed, check to see
@@ -253,8 +254,7 @@ coff_locate_sections (bfd *abfd, asectio
 	{
 	  struct stab_section_list *n, **pn;
 
-	  n = ((struct stab_section_list *)
-	       xmalloc (sizeof (struct stab_section_list)));
+	  n = XNEW (struct stab_section_list);
 	  n->section = sectp;
 	  n->next = NULL;
 	  for (pn = &csi->stabsects; *pn != NULL; pn = &(*pn)->next)
@@ -462,7 +462,8 @@ is_import_fixup_symbol (struct coff_symb
 }
 
 static struct minimal_symbol *
-record_minimal_symbol (struct coff_symbol *cs, CORE_ADDR address,
+record_minimal_symbol (minimal_symbol_reader &reader,
+		       struct coff_symbol *cs, CORE_ADDR address,
 		       enum minimal_symbol_type type, int section, 
 		       struct objfile *objfile)
 {
@@ -480,8 +481,7 @@ record_minimal_symbol (struct coff_symbo
       return NULL;
     }
 
-  return prim_record_minimal_symbol_and_info (cs->c_name, address,
-					      type, section, objfile);
+  return reader.record_with_info (cs->c_name, address, type, section);
 }
 
 /* coff_symfile_init ()
@@ -559,10 +559,9 @@ static bfd *symfile_bfd;
 /* Read a symbol file, after initialization by coff_symfile_init.  */
 
 static void
-coff_symfile_read (struct objfile *objfile, int symfile_flags)
+coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   struct coff_symfile_info *info;
-  struct dbx_symfile_info *dbxinfo;
   bfd *abfd = objfile->obfd;
   coff_data_type *cdata = coff_data (abfd);
   char *name = bfd_get_filename (abfd);
@@ -570,11 +569,11 @@ coff_symfile_read (struct objfile *objfi
   unsigned int num_symbols;
   int symtab_offset;
   int stringtab_offset;
-  struct cleanup *back_to, *cleanup_minimal_symbols;
+  struct cleanup *back_to;
   int stabstrsize;
   
-  info = objfile_data (objfile, coff_objfile_data_key);
-  dbxinfo = DBX_SYMFILE_INFO (objfile);
+  info = (struct coff_symfile_info *) objfile_data (objfile,
+						    coff_objfile_data_key);
   symfile_bfd = abfd;		/* Kludge for swap routines.  */
 
 /* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
@@ -647,18 +646,17 @@ coff_symfile_read (struct objfile *objfi
   if (val < 0)
     error (_("\"%s\": can't get string table"), name);
 
-  init_minimal_symbol_collection ();
-  cleanup_minimal_symbols = make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   /* Now that the executable file is positioned at symbol table,
      process it and define symbols accordingly.  */
 
-  coff_symtab_read ((long) symtab_offset, num_symbols, objfile);
+  coff_symtab_read (reader, (long) symtab_offset, num_symbols, objfile);
 
   /* Install any minimal symbols that have been collected as the
      current minimal symbols for this objfile.  */
 
-  install_minimal_symbols (objfile);
+  reader.install ();
 
   if (pe_file)
     {
@@ -701,9 +699,6 @@ coff_symfile_read (struct objfile *objfi
 	}
     }
 
-  /* Free the installed minimal symbol data.  */
-  do_cleanups (cleanup_minimal_symbols);
-
   bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
 
   if (info->stabsects)
@@ -747,10 +742,10 @@ coff_symfile_read (struct objfile *objfi
 
       if (debugfile)
 	{
-	  bfd *abfd = symfile_bfd_open (debugfile);
+	  gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile));
 
-	  make_cleanup_bfd_unref (abfd);
-	  symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
+	  symbol_file_add_separate (abfd.get (), debugfile, symfile_flags,
+				    objfile);
 	}
     }
 
@@ -784,7 +779,8 @@ coff_symfile_finish (struct objfile *obj
    We read them one at a time using read_one_sym ().  */
 
 static void
-coff_symtab_read (long symtab_offset, unsigned int nsyms,
+coff_symtab_read (minimal_symbol_reader &reader,
+		  long symtab_offset, unsigned int nsyms,
 		  struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -841,9 +837,7 @@ coff_symtab_read (long symtab_offset, un
   if (type_vector)		/* Get rid of previous one.  */
     xfree (type_vector);
   type_vector_length = INITIAL_TYPE_VECTOR_LENGTH;
-  type_vector = (struct type **)
-    xmalloc (type_vector_length * sizeof (struct type *));
-  memset (type_vector, 0, type_vector_length * sizeof (struct type *));
+  type_vector = XCNEWVEC (struct type *, type_vector_length);
 
   coff_start_symtab (objfile, "");
 
@@ -884,7 +878,7 @@ coff_symtab_read (long symtab_offset, un
 	  int section = cs_to_section (cs, objfile);
 
 	  tmpaddr = cs->c_value;
-	  record_minimal_symbol (cs, tmpaddr, mst_text,
+	  record_minimal_symbol (reader, cs, tmpaddr, mst_text,
 				 section, objfile);
 
 	  fcn_line_ptr = main_aux.x_sym.x_fcnary.x_fcn.x_lnnoptr;
@@ -1044,7 +1038,7 @@ coff_symtab_read (long symtab_offset, un
 		  ms_type = mst_unknown;
 	      }
 
-	    msym = record_minimal_symbol (cs, tmpaddr, ms_type,
+	    msym = record_minimal_symbol (reader, cs, tmpaddr, ms_type,
 					  sec, objfile);
 	    if (msym)
 	      gdbarch_coff_make_msymbol_special (gdbarch,
@@ -1144,8 +1138,8 @@ coff_symtab_read (long symtab_offset, un
 		enter_linenos (fcn_line_ptr, fcn_first_line,
 			       fcn_last_line, objfile);
 
-	      finish_block (newobj->name, &local_symbols,
-			    newobj->old_blocks, newobj->start_addr,
+	      finish_block (newobj->name, &local_symbols, newobj->old_blocks,
+			    NULL, newobj->start_addr,
 			    fcn_cs_saved.c_value
 			    + fcn_aux_saved.x_sym.x_misc.x_fsize
 			    + ANOFFSET (objfile->section_offsets,
@@ -1188,7 +1182,7 @@ coff_symtab_read (long symtab_offset, un
 		    cs->c_value + ANOFFSET (objfile->section_offsets,
 					    SECT_OFF_TEXT (objfile));
 		  /* Make a block for the local symbols within.  */
-		  finish_block (0, &local_symbols, newobj->old_blocks,
+		  finish_block (0, &local_symbols, newobj->old_blocks, NULL,
 				newobj->start_addr, tmpaddr);
 		}
 	      /* Now pop locals of block just finished.  */
@@ -1206,7 +1200,7 @@ coff_symtab_read (long symtab_offset, un
     {
       /* We've got no debugging symbols, but it's a portable
 	 executable, so try to read the export table.  */
-      read_pe_exported_syms (objfile);
+      read_pe_exported_syms (reader, objfile);
     }
 
   if (get_last_source_file ())
@@ -2102,12 +2096,13 @@ coff_read_struct_type (int index, int le
 	case C_MOU:
 
 	  /* Get space to record the next field's data.  */
-	  newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
+	  newobj = XALLOCA (struct nextfield);
 	  newobj->next = list;
 	  list = newobj;
 
 	  /* Save the data.  */
-	  list->field.name = obstack_copy0 (&objfile->objfile_obstack,
+	  list->field.name
+	    = (const char *) obstack_copy0 (&objfile->objfile_obstack,
 					    name, strlen (name));
 	  FIELD_TYPE (list->field) = decode_type (ms, ms->c_type,
 						  &sub_aux, objfile);
@@ -2119,12 +2114,13 @@ coff_read_struct_type (int index, int le
 	case C_FIELD:
 
 	  /* Get space to record the next field's data.  */
-	  newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
+	  newobj = XALLOCA (struct nextfield);
 	  newobj->next = list;
 	  list = newobj;
 
 	  /* Save the data.  */
-	  list->field.name = obstack_copy0 (&objfile->objfile_obstack,
+	  list->field.name
+	    = (const char *) obstack_copy0 (&objfile->objfile_obstack,
 					    name, strlen (name));
 	  FIELD_TYPE (list->field) = decode_type (ms, ms->c_type,
 						  &sub_aux, objfile);
@@ -2195,9 +2191,9 @@ coff_read_enum_type (int index, int leng
 	case C_MOE:
 	  sym = allocate_symbol (objfile);
 
-	  SYMBOL_SET_LINKAGE_NAME (sym,
-				   obstack_copy0 (&objfile->objfile_obstack,
-						  name, strlen (name)));
+	  name = (char *) obstack_copy0 (&objfile->objfile_obstack, name,
+					 strlen (name));
+	  SYMBOL_SET_LINKAGE_NAME (sym, name);
 	  SYMBOL_ACLASS_INDEX (sym) = LOC_CONST;
 	  SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
 	  SYMBOL_VALUE (sym) = ms->c_value;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/command.h ./gdb/command.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/command.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/command.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Header file for command creation.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -115,6 +115,17 @@ struct cmd_list_element;
 
 typedef void cmd_cfunc_ftype (char *args, int from_tty);
 
+/* This structure specifies notifications to be suppressed by a cli
+   command interpreter.  */
+
+struct cli_suppress_notification
+{
+  /* Inferior, thread, frame selected notification suppressed?  */
+  int user_selected_context;
+};
+
+extern struct cli_suppress_notification cli_suppress_notification;
+
 /* Forward-declarations of the entry-points of cli/cli-decode.c.  */
 
 /* API to the manipulation of command lists.  */
@@ -218,6 +229,11 @@ extern struct cmd_list_element *add_com 
 extern struct cmd_list_element *add_com_alias (const char *, const char *,
 					       enum command_class, int);
 
+extern struct cmd_list_element *add_com_suppress_notification
+		       (const char *name, enum command_class theclass,
+			cmd_cfunc_ftype *fun, const char *doc,
+			int *supress_notification);
+
 extern struct cmd_list_element *add_info (const char *,
 					  cmd_cfunc_ftype *fun,
 					  const char *);
@@ -392,7 +408,7 @@ extern void error_no_arg (const char *) 
 
 extern void dont_repeat (void);
 
-extern struct cleanup *prevent_dont_repeat (void);
+extern scoped_restore_tmpl<int> prevent_dont_repeat (void);
 
 /* Used to mark commands that don't do anything.  If we just leave the
    function field NULL, the command is interpreted as a help topic, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/agent.c ./gdb/common/agent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/agent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/agent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared utility routines for GDB to interact with agent.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -63,7 +63,6 @@ static struct
 {
   const char *name;
   int offset;
-  int required;
 } symbol_list[] = {
   IPA_SYM(helper_thread_id),
   IPA_SYM(cmd_buf),
@@ -94,9 +93,10 @@ agent_look_up_symbols (void *arg)
     {
       CORE_ADDR *addrp =
 	(CORE_ADDR *) ((char *) &ipa_sym_addrs + symbol_list[i].offset);
+      struct objfile *objfile = (struct objfile *) arg;
 
       if (find_minimal_symbol_address (symbol_list[i].name, addrp,
-				       arg) != 0)
+				       objfile) != 0)
 	{
 	  DEBUG_AGENT ("symbol `%s' not found\n", symbol_list[i].name);
 	  return -1;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/agent.h ./gdb/common/agent.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/agent.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/agent.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared utility routines for GDB to interact with agent.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ax.def ./gdb/common/ax.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ax.def	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/ax.def	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Definition of agent opcode values.   -*- c -*-
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/break-common.h ./gdb/common/break-common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/break-common.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/break-common.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Data structures associated with breakpoints shared in both GDB and
    GDBserver.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/btrace-common.c ./gdb/common/btrace-common.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/btrace-common.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/btrace-common.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -35,7 +35,27 @@ btrace_format_string (enum btrace_format
       return _("Branch Trace Store");
 
     case BTRACE_FORMAT_PT:
-      return _("Intel(R) Processor Trace");
+      return _("Intel Processor Trace");
+    }
+
+  internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
+}
+
+/* See btrace-common.h.  */
+
+const char *
+btrace_format_short_string (enum btrace_format format)
+{
+  switch (format)
+    {
+    case BTRACE_FORMAT_NONE:
+      return "unknown";
+
+    case BTRACE_FORMAT_BTS:
+      return "bts";
+
+    case BTRACE_FORMAT_PT:
+      return "pt";
     }
 
   internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
@@ -155,13 +175,13 @@ btrace_data_append (struct btrace_data *
 	  dst->variant.pt.size = 0;
 
 	  /* fall-through.  */
-	case BTRACE_FORMAT_BTS:
+	case BTRACE_FORMAT_PT:
 	  {
 	    gdb_byte *data;
-	    unsigned long size;
+	    size_t size;
 
 	    size = src->variant.pt.size + dst->variant.pt.size;
-	    data = xmalloc (size);
+	    data = (gdb_byte *) xmalloc (size);
 
 	    memcpy (data, dst->variant.pt.data, dst->variant.pt.size);
 	    memcpy (data + dst->variant.pt.size, src->variant.pt.data,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/btrace-common.h ./gdb/common/btrace-common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/btrace-common.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/btrace-common.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Branch trace support for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>.
 
@@ -60,7 +60,7 @@ enum btrace_format
      Actually, the format is a sequence of blocks derived from BTS.  */
   BTRACE_FORMAT_BTS,
 
-  /* Branch trace is in Intel(R) Processor Trace format.  */
+  /* Branch trace is in Intel Processor Trace format.  */
   BTRACE_FORMAT_PT
 };
 
@@ -96,15 +96,21 @@ struct btrace_cpu
 
 struct btrace_config_bts
 {
-  /* The size of the branch trace buffer in bytes.  */
+  /* The size of the branch trace buffer in bytes.
+
+     This is unsigned int and not size_t since it is registered as
+     control variable for "set record btrace bts buffer-size".  */
   unsigned int size;
 };
 
-/* An Intel(R) Processor Trace configuration.  */
+/* An Intel Processor Trace configuration.  */
 
 struct btrace_config_pt
 {
-  /* The size of the branch trace buffer in bytes.  */
+  /* The size of the branch trace buffer in bytes.
+
+     This is unsigned int and not size_t since it is registered as
+     control variable for "set record btrace pt buffer-size".  */
   unsigned int size;
 };
 
@@ -123,7 +129,7 @@ struct btrace_config
   /* The BTS format configuration.  */
   struct btrace_config_bts bts;
 
-  /* The Intel(R) Processor Trace format configuration.  */
+  /* The Intel Processor Trace format configuration.  */
   struct btrace_config_pt pt;
 };
 
@@ -142,7 +148,7 @@ struct btrace_data_pt_config
   struct btrace_cpu cpu;
 };
 
-/* Branch trace in Intel(R) Processor Trace format.  */
+/* Branch trace in Intel Processor Trace format.  */
 struct btrace_data_pt
 {
   /* Some configuration information to go with the data.  */
@@ -152,7 +158,7 @@ struct btrace_data_pt
   gdb_byte *data;
 
   /* The size of DATA in bytes.  */
-  unsigned long size;
+  size_t size;
 };
 
 /* The branch trace data.  */
@@ -208,6 +214,9 @@ enum btrace_error
 /* Return a string representation of FORMAT.  */
 extern const char *btrace_format_string (enum btrace_format format);
 
+/* Return an abbreviation string representation of FORMAT.  */
+extern const char *btrace_format_short_string (enum btrace_format format);
+
 /* Initialize DATA.  */
 extern void btrace_data_init (struct btrace_data *data);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/buffer.c ./gdb/common/buffer.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/buffer.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/buffer.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A simple growing buffer for GDB.
   
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,7 +37,7 @@ buffer_grow (struct buffer *buffer, cons
 
   while (buffer->used_size + size > new_buffer_size)
     new_buffer_size *= 2;
-  new_buffer = xrealloc (buffer->buffer, new_buffer_size);
+  new_buffer = (char *) xrealloc (buffer->buffer, new_buffer_size);
   memcpy (new_buffer + buffer->used_size, data, size);
   buffer->buffer = new_buffer;
   buffer->buffer_size = new_buffer_size;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/buffer.h ./gdb/common/buffer.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/buffer.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/buffer.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A simple growing buffer for GDB.
   
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,15 @@ struct buffer
    accommodate the new data.  */
 void buffer_grow (struct buffer *buffer, const char *data, size_t size);
 
+/* Append C to the end of BUFFER.  Grows the buffer to accommodate the
+   new data.  */
+
+static inline void
+buffer_grow_char (struct buffer *buffer, char c)
+{
+  buffer_grow (buffer, &c, 1);
+}
+
 /* Release any memory held by BUFFER.  */
 void buffer_free (struct buffer *buffer);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/cleanups.c ./gdb/common/cleanups.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/cleanups.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/cleanups.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cleanup routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -79,8 +79,7 @@ static struct cleanup *
 make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function,
 		  void *arg,  void (*free_arg) (void *))
 {
-  struct cleanup *newobj
-    = (struct cleanup *) xmalloc (sizeof (struct cleanup));
+  struct cleanup *newobj = XNEW (struct cleanup);
   struct cleanup *old_chain = *pmy_chain;
 
   newobj->next = *pmy_chain;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/cleanups.h ./gdb/common/cleanups.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/cleanups.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/cleanups.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Cleanups.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-debug.c ./gdb/common/common-debug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-debug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-debug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Debug printing functions.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-debug.h ./gdb/common/common-debug.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-debug.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-debug.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations for debug printing functions.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-defs.h ./gdb/common/common-defs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-defs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-defs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common definitions.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,15 +27,48 @@
 #include "build-gnulib/config.h"
 #endif
 
+/* From:
+    https://www.gnu.org/software/gnulib/manual/html_node/stdint_002eh.html
+
+   "On some hosts that predate C++11, when using C++ one must define
+   __STDC_CONSTANT_MACROS to make visible the definitions of constant
+   macros such as INTMAX_C, and one must define __STDC_LIMIT_MACROS to
+   make visible the definitions of limit macros such as INTMAX_MAX.".
+
+   And:
+    https://www.gnu.org/software/gnulib/manual/html_node/inttypes_002eh.html
+
+   "On some hosts that predate C++11, when using C++ one must define
+   __STDC_FORMAT_MACROS to make visible the declarations of format
+   macros such as PRIdMAX."
+
+   Must do this before including any system header, since other system
+   headers may include stdint.h/inttypes.h.  */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
+#define __STDC_FORMAT_MACROS 1
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>	/* for strcasecmp and strncasecmp */
+#endif
 #include <errno.h>
 #include <alloca.h>
+
 #include "ansidecl.h"
+/* This is defined by ansidecl.h, but we prefer gnulib's version.  On
+   MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
+   require use of attribute gnu_printf instead of printf.  gnulib
+   checks that at configure time.  Since _GL_ATTRIBUTE_FORMAT_PRINTF
+   is compatible with ATTRIBUTE_PRINTF, simply use it.  */
+#undef ATTRIBUTE_PRINTF
+#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
+
 #include "libiberty.h"
 #include "pathmax.h"
 #include "gdb/signals.h"
@@ -50,14 +83,11 @@
 #include "cleanups.h"
 #include "common-exceptions.h"
 
-#ifdef __cplusplus
-# define EXTERN_C extern "C"
-# define EXTERN_C_PUSH extern "C" {
-# define EXTERN_C_POP }
-#else
-# define EXTERN_C extern
-# define EXTERN_C_PUSH
-# define EXTERN_C_POP
-#endif
+#define EXTERN_C extern "C"
+#define EXTERN_C_PUSH extern "C" {
+#define EXTERN_C_POP }
+
+/* Pull in gdb::unique_xmalloc_ptr.  */
+#include "common/gdb_unique_ptr.h"
 
 #endif /* COMMON_DEFS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-exceptions.c ./gdb/common/common-exceptions.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-exceptions.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-exceptions.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Exception (throw catch) mechanism, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,9 +20,7 @@
 #include "common-defs.h"
 #include "common-exceptions.h"
 
-const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL };
-
-#ifndef __cplusplus
+const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL };
 
 /* Possible catcher states.  */
 enum catcher_state {
@@ -46,7 +44,7 @@ struct catcher
 {
   enum catcher_state state;
   /* Jump buffer pointing back at the exception handler.  */
-  SIGJMP_BUF buf;
+  jmp_buf buf;
   /* Status buffer belonging to the exception handler.  */
   struct gdb_exception exception;
   struct cleanup *saved_cleanup_chain;
@@ -57,6 +55,8 @@ struct catcher
 /* Where to go for throw_exception().  */
 static struct catcher *current_catcher;
 
+#if GDB_XCPT == GDB_XCPT_SJMP
+
 /* Return length of current_catcher list.  */
 
 static int
@@ -73,7 +73,9 @@ catcher_list_size (void)
   return size;
 }
 
-SIGJMP_BUF *
+#endif
+
+jmp_buf *
 exceptions_state_mc_init (void)
 {
   struct catcher *new_catcher = XCNEW (struct catcher);
@@ -193,8 +195,8 @@ exceptions_state_mc_catch (struct gdb_ex
 	}
 
       /* The caller didn't request that the event be caught, relay the
-	 event to the next exception_catch/CATCH.  */
-      throw_exception (*exception);
+	 event to the next exception_catch/CATCH_SJLJ.  */
+      throw_exception_sjlj (*exception);
     }
 
   /* No exception was thrown.  */
@@ -213,7 +215,7 @@ exceptions_state_mc_action_iter_1 (void)
   return exceptions_state_mc (CATCH_ITER_1);
 }
 
-#else /* !__cplusplus */
+#if GDB_XCPT != GDB_XCPT_SJMP
 
 /* How many nested TRY blocks we have.  See exception_messages and
    throw_it.  */
@@ -248,7 +250,6 @@ exception_rethrow (void)
 {
   /* Run this scope's cleanups before re-throwing to the next
      outermost scope.  */
-  prepare_to_throw_exception ();
   do_cleanups (all_cleanups ());
   throw;
 }
@@ -261,25 +262,32 @@ gdb_exception_sliced_copy (struct gdb_ex
   *to = *from;
 }
 
-#endif /* !__cplusplus */
+#endif /* !GDB_XCPT_SJMP */
 
 /* Return EXCEPTION to the nearest containing catch_errors().  */
 
 void
-throw_exception (struct gdb_exception exception)
+throw_exception_sjlj (struct gdb_exception exception)
 {
-  prepare_to_throw_exception ();
-
   do_cleanups (all_cleanups ());
 
-#ifndef __cplusplus
   /* Jump to the containing catch_errors() call, communicating REASON
      to that call via setjmp's return value.  Note that REASON can't
      be zero, by definition in defs.h.  */
   exceptions_state_mc (CATCH_THROWING);
   current_catcher->exception = exception;
-  SIGLONGJMP (current_catcher->buf, exception.reason);
-#else
+  longjmp (current_catcher->buf, exception.reason);
+}
+
+#if GDB_XCPT != GDB_XCPT_SJMP
+
+/* Implementation of throw_exception that uses C++ try/catch.  */
+
+static ATTRIBUTE_NORETURN void
+throw_exception_cxx (struct gdb_exception exception)
+{
+  do_cleanups (all_cleanups ());
+
   if (exception.reason == RETURN_QUIT)
     {
       gdb_exception_RETURN_MASK_QUIT ex;
@@ -296,6 +304,17 @@ throw_exception (struct gdb_exception ex
     }
   else
     gdb_assert_not_reached ("invalid return reason");
+}
+
+#endif
+
+void
+throw_exception (struct gdb_exception exception)
+{
+#if GDB_XCPT == GDB_XCPT_SJMP
+  throw_exception_sjlj (exception);
+#else
+  throw_exception_cxx (exception);
 #endif
 }
 
@@ -320,7 +339,7 @@ throw_it (enum return_reason reason, enu
 {
   struct gdb_exception e;
   char *new_message;
-#ifndef __cplusplus
+#if GDB_XCPT == GDB_XCPT_SJMP
   int depth = catcher_list_size ();
 #else
   int depth = try_scope_depth;
@@ -336,9 +355,8 @@ throw_it (enum return_reason reason, enu
       int old_size = exception_messages_size;
 
       exception_messages_size = depth + 10;
-      exception_messages = (char **) xrealloc (exception_messages,
-					       exception_messages_size
-					       * sizeof (char *));
+      exception_messages = XRESIZEVEC (char *, exception_messages,
+				       exception_messages_size);
       memset (exception_messages + old_size, 0,
 	      (exception_messages_size - old_size) * sizeof (char *));
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-exceptions.h ./gdb/common/common-exceptions.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-exceptions.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-exceptions.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Exception (throw catch) mechanism, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,8 @@
 #ifndef COMMON_EXCEPTIONS_H
 #define COMMON_EXCEPTIONS_H
 
-#include "gdb_setjmp.h"
+#include <setjmp.h>
+#include <new>
 
 /* Reasons for calling throw_exceptions().  NOTE: all reason values
    must be less than zero.  enum value 0 is reserved for internal use
@@ -86,7 +87,7 @@ enum errors {
      means the register was not saved in the frame.  */
   OPTIMIZED_OUT_ERROR,
 
-  /* DW_OP_GNU_entry_value resolving failed.  */
+  /* DW_OP_entry_value resolving failed.  */
   NO_ENTRY_VALUE_ERROR,
 
   /* Target throwing an error has been closed.  Current command should be
@@ -116,17 +117,35 @@ struct gdb_exception
   const char *message;
 };
 
-/* Functions to drive the exceptions state machine.  Though declared
-   here by necessity, these functions should be considered internal to
-   the exceptions subsystem and not used other than via the TRY/CATCH
-   macros defined below.  */
+/* The different exception mechanisms that TRY/CATCH can map to.  */
 
-#ifndef __cplusplus
-extern SIGJMP_BUF *exceptions_state_mc_init (void);
+/* Make GDB exceptions use setjmp/longjmp behind the scenes.  */
+#define GDB_XCPT_SJMP 1
+
+/* Make GDB exceptions use try/catch behind the scenes.  */
+#define GDB_XCPT_TRY 2
+
+/* Specify this mode to build with TRY/CATCH mapped directly to raw
+   try/catch.  GDB won't work correctly, but building that way catches
+   code tryin to break/continue out of the try block, along with
+   spurious code between the TRY and the CATCH block.  */
+#define GDB_XCPT_RAW_TRY 3
+
+#define GDB_XCPT GDB_XCPT_TRY
+
+/* Functions to drive the sjlj-based exceptions state machine.  Though
+   declared here by necessity, these functions should be considered
+   internal to the exceptions subsystem and not used other than via
+   the TRY/CATCH (or TRY_SJLJ/CATCH_SJLJ) macros defined below.  */
+
+extern jmp_buf *exceptions_state_mc_init (void);
 extern int exceptions_state_mc_action_iter (void);
 extern int exceptions_state_mc_action_iter_1 (void);
 extern int exceptions_state_mc_catch (struct gdb_exception *, int);
-#else
+
+/* Same, but for the C++ try/catch-based TRY/CATCH mechanism.  */
+
+#if GDB_XCPT != GDB_XCPT_SJMP
 extern void *exception_try_scope_entry (void);
 extern void exception_try_scope_exit (void *saved_state);
 extern void exception_rethrow (void);
@@ -155,28 +174,42 @@ extern void exception_rethrow (void);
      }
    END_CATCH
 
-  */
-
-#ifndef __cplusplus
+  Note that the SJLJ version of the macros are actually named
+  TRY_SJLJ/CATCH_SJLJ in order to make it possible to call them even
+  when TRY/CATCH are mapped to C++ try/catch.  The SJLJ variants are
+  needed in some cases where gdb exceptions need to cross third-party
+  library code compiled without exceptions support (e.g.,
+  readline).  */
 
-#define TRY \
+#define TRY_SJLJ \
      { \
-       SIGJMP_BUF *buf = \
+       jmp_buf *buf = \
 	 exceptions_state_mc_init (); \
-       SIGSETJMP (*buf); \
+       setjmp (*buf); \
      } \
      while (exceptions_state_mc_action_iter ()) \
        while (exceptions_state_mc_action_iter_1 ())
 
-#define CATCH(EXCEPTION, MASK)				\
+#define CATCH_SJLJ(EXCEPTION, MASK)				\
   {							\
     struct gdb_exception EXCEPTION;				\
     if (exceptions_state_mc_catch (&(EXCEPTION), MASK))
 
-#define END_CATCH				\
+#define END_CATCH_SJLJ				\
   }
 
-#else
+#if GDB_XCPT == GDB_XCPT_SJMP
+
+/* If using SJLJ-based exceptions for all exceptions, then provide
+   standard aliases.  */
+
+#define TRY TRY_SJLJ
+#define CATCH CATCH_SJLJ
+#define END_CATCH END_CATCH_SJLJ
+
+#endif /* GDB_XCPT_SJMP */
+
+#if GDB_XCPT == GDB_XCPT_TRY || GDB_XCPT == GDB_XCPT_RAW_TRY
 
 /* Prevent error/quit during TRY from calling cleanups established
    prior to here.  This pops out the scope in either case of normal
@@ -195,6 +228,8 @@ struct exception_try_scope
   void *saved_state;
 };
 
+#if GDB_XCPT == GDB_XCPT_TRY
+
 /* We still need to wrap TRY/CATCH in C++ so that cleanups and C++
    exceptions can coexist.  The TRY blocked is wrapped in a
    do/while(0) so that break/continue within the block works the same
@@ -217,6 +252,15 @@ struct exception_try_scope
     exception_rethrow ();			\
   }
 
+#else
+
+#define TRY try
+#define CATCH(EXCEPTION, MASK) \
+  catch (struct gdb_exception ## _ ## MASK &EXCEPTION)
+#define END_CATCH
+
+#endif
+
 /* The exception types client code may catch.  They're just shims
    around gdb_exception that add nothing but type info.  Which is used
    is selected depending on the MASK argument passed to CATCH.  */
@@ -233,29 +277,44 @@ struct gdb_exception_RETURN_MASK_QUIT : 
 {
 };
 
-#endif
+#endif /* GDB_XCPT_TRY || GDB_XCPT_RAW_TRY */
 
-/* *INDENT-ON* */
+/* An exception type that inherits from both std::bad_alloc and a gdb
+   exception.  This is necessary because operator new can only throw
+   std::bad_alloc, and OTOH, we want exceptions thrown due to memory
+   allocation error to be caught by all the CATCH/RETURN_MASK_ALL
+   spread around the codebase.  */
+
+struct gdb_quit_bad_alloc
+  : public gdb_exception_RETURN_MASK_QUIT,
+    public std::bad_alloc
+{
+  explicit gdb_quit_bad_alloc (gdb_exception ex)
+    : std::bad_alloc ()
+  {
+    gdb_exception *self = this;
+
+    *self = ex;
+  }
+};
 
-/* Hook to allow client-specific actions to be performed prior to
-   throwing an exception.  This function must be provided by the
-   client, and will be called before any cleanups are run.  */
-
-extern void prepare_to_throw_exception (void);
-
-/* Throw an exception (as described by "struct gdb_exception").  Will
-   execute a LONG JUMP to the inner most containing exception handler
-   established using catch_exceptions() (or similar).
-
-   Code normally throws an exception using error() et.al.  For various
-   reaons, GDB also contains code that throws an exception directly.
-   For instance, the remote*.c targets contain CNTRL-C signal handlers
-   that propogate the QUIT event up the exception chain.  ``This could
-   be a good thing or a dangerous thing.'' -- the Existential
-   Wombat.  */
+/* *INDENT-ON* */
 
+/* Throw an exception (as described by "struct gdb_exception"),
+   landing in the inner most containing exception handler established
+   using TRY/CATCH.  */
 extern void throw_exception (struct gdb_exception exception)
      ATTRIBUTE_NORETURN;
+
+/* Throw an exception by executing a LONG JUMP to the inner most
+   containing exception handler established using TRY_SJLJ.  Necessary
+   in some cases where we need to throw GDB exceptions across
+   third-party library code (e.g., readline).  */
+extern void throw_exception_sjlj (struct gdb_exception exception)
+     ATTRIBUTE_NORETURN;
+
+/* Convenience wrappers around throw_exception that throw GDB
+   errors.  */
 extern void throw_verror (enum errors, const char *fmt, va_list ap)
      ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 0);
 extern void throw_vquit (const char *fmt, va_list ap)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common.host ./gdb/common/common.host
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common.host	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common.host	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Common object files to include for each host.
 #
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common.m4 ./gdb/common/common.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 dnl Autoconf configure snippets for common.
-dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl 
@@ -30,7 +30,7 @@ AC_DEFUN([GDB_AC_COMMON], [
 		   sys/un.h sys/wait.h dnl
 		   thread_db.h wait.h)
 
-  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair])
+  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair sigaction])
 
   AC_CHECK_DECLS([strerror, strstr])
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-regcache.c ./gdb/common/common-regcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-regcache.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/common-regcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,36 @@
+/* Cache and manage the values of registers for GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "common-regcache.h"
+
+/* Return the register's value or throw if it's not available.  */
+
+ULONGEST
+regcache_raw_get_unsigned (struct regcache *regcache, int regnum)
+{
+  ULONGEST value;
+  enum register_status status;
+
+  status = regcache_raw_read_unsigned (regcache, regnum, &value);
+  if (status == REG_UNAVAILABLE)
+    throw_error (NOT_AVAILABLE_ERROR,
+		 _("Register %d is not available"), regnum);
+  return value;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-regcache.h ./gdb/common/common-regcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-regcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-regcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cache and manage the values of registers
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,15 +22,44 @@
 
 /* This header is a stopgap until we have an independent regcache.  */
 
+enum register_status
+  {
+    /* The register value is not in the cache, and we don't know yet
+       whether it's available in the target (or traceframe).  */
+    REG_UNKNOWN = 0,
+
+    /* The register value is valid and cached.  */
+    REG_VALID = 1,
+
+    /* The register value is unavailable.  E.g., we're inspecting a
+       traceframe, and this register wasn't collected.  Note that this
+       is different a different "unavailable" from saying the register
+       does not exist in the target's architecture --- in that case,
+       the target should have given us a target description that does
+       not include the register in the first place.  */
+    REG_UNAVAILABLE = -1
+  };
+
 /* Return a pointer to the register cache associated with the
    thread specified by PTID.  This function must be provided by
    the client.  */
 
 extern struct regcache *get_thread_regcache_for_ptid (ptid_t ptid);
 
+/* Return the size of register numbered N in REGCACHE.  This function
+   must be provided by the client.  */
+
+extern int regcache_register_size (const struct regcache *regcache, int n);
+
 /* Read the PC register.  This function must be provided by the
    client.  */
 
 extern CORE_ADDR regcache_read_pc (struct regcache *regcache);
 
+/* Read a raw register into a unsigned integer.  */
+extern enum register_status regcache_raw_read_unsigned
+  (struct regcache *regcache, int regnum, ULONGEST *val);
+
+ULONGEST regcache_raw_get_unsigned (struct regcache *regcache, int regnum);
+
 #endif /* COMMON_REGCACHE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-types.h ./gdb/common/common-types.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-types.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-types.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations for common types.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,4 +58,6 @@ typedef unsigned long long ULONGEST;
 /* * The largest CORE_ADDR value.  */
 #define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
 
+enum tribool { TRIBOOL_UNKNOWN = -1, TRIBOOL_FALSE = 0, TRIBOOL_TRUE = 1 };
+
 #endif /* COMMON_TYPES_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-utils.c ./gdb/common/common-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared general utility routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -100,6 +100,12 @@ xfree (void *ptr)
     free (ptr);		/* ARI: free */
 }
 
+void
+xmalloc_failed (size_t size)
+{
+  malloc_failure (size);
+}
+
 /* Like asprintf/vasprintf but get an internal_error if the call
    fails. */
 
@@ -144,6 +150,29 @@ xsnprintf (char *str, size_t size, const
   return ret;
 }
 
+/* See documentation in common-utils.h.  */
+
+std::string
+string_printf (const char* fmt, ...)
+{
+  va_list vp;
+  int size;
+
+  va_start (vp, fmt);
+  size = vsnprintf (NULL, 0, fmt, vp);
+  va_end (vp);
+
+  std::string str (size, '\0');
+
+  /* C++11 and later guarantee std::string uses contiguous memory and
+     always includes the terminating '\0'.  */
+  va_start (vp, fmt);
+  vsprintf (&str[0], fmt, vp);
+  va_end (vp);
+
+  return str;
+}
+
 char *
 savestring (const char *ptr, size_t len)
 {
@@ -253,7 +282,7 @@ strtoulst (const char *num, const char *
     return result;
 }
 
-/* See documentation in cli-utils.h.  */
+/* See documentation in common-utils.h.  */
 
 char *
 skip_spaces (char *chp)
@@ -277,7 +306,7 @@ skip_spaces_const (const char *chp)
   return chp;
 }
 
-/* See documentation in cli-utils.h.  */
+/* See documentation in common-utils.h.  */
 
 const char *
 skip_to_space_const (const char *chp)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-utils.h ./gdb/common/common-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/common-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/common-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared general utility routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #ifndef COMMON_UTILS_H
 #define COMMON_UTILS_H
 
+#include <string>
+
 /* If possible, define FUNCTION_NAME, a macro containing the name of
    the function being defined.  Since this macro may not always be
    defined, all uses must be protected by appropriate macro definition
@@ -56,6 +58,10 @@ char *xstrvprintf (const char *format, v
 int xsnprintf (char *str, size_t size, const char *format, ...)
      ATTRIBUTE_PRINTF (3, 4);
 
+/* Returns a std::string built from a printf-style format string.  */
+std::string string_printf (const char* fmt, ...)
+  ATTRIBUTE_PRINTF (1, 2);
+
 /* Make a copy of the string at PTR with LEN characters
    (and add a null character at the end in the copy).
    Uses malloc to get the space.  Returns the address of the copy.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/create-version.sh ./gdb/common/create-version.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/create-version.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/create-version.sh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 1989-2015 Free Software Foundation, Inc.
+# Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/enum-flags.h ./gdb/common/enum-flags.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/enum-flags.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/enum-flags.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,225 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef COMMON_ENUM_FLAGS_H
+#define COMMON_ENUM_FLAGS_H
+
+/* Type-safe wrapper for enum flags.  enum flags are enums where the
+   values are bits that are meant to be ORed together.
+
+   This allows writing code like the below, while with raw enums this
+   would fail to compile without casts to enum type at the assignments
+   to 'f':
+
+    enum some_flag
+    {
+       flag_val1 = 1 << 1,
+       flag_val2 = 1 << 2,
+       flag_val3 = 1 << 3,
+       flag_val4 = 1 << 4,
+    };
+    DEF_ENUM_FLAGS_TYPE(enum some_flag, some_flags)
+
+    some_flags f = flag_val1 | flag_val2;
+    f |= flag_val3;
+
+   It's also possible to assign literal zero to an enum flags variable
+   (meaning, no flags), dispensing adding an awkward explicit "no
+   value" value to the enumeration.  For example:
+
+    some_flags f = 0;
+    f |= flag_val3 | flag_val4;
+
+   Note that literal integers other than zero fail to compile:
+
+    some_flags f = 1; // error
+*/
+
+#ifdef __cplusplus
+
+/* Traits type used to prevent the global operator overloads from
+   instantiating for non-flag enums.  */
+template<typename T> struct enum_flags_type {};
+
+/* Use this to mark an enum as flags enum.  It defines FLAGS as
+   enum_flags wrapper class for ENUM, and enables the global operator
+   overloads for ENUM.  */
+#define DEF_ENUM_FLAGS_TYPE(enum_type, flags_type)	\
+  typedef enum_flags<enum_type> flags_type;		\
+  template<>						\
+  struct enum_flags_type<enum_type>			\
+  {							\
+    typedef enum_flags<enum_type> type;			\
+  }
+
+/* Until we can rely on std::underlying type being universally
+   available (C++11), roll our own for enums.  */
+template<int size, bool sign> class integer_for_size { typedef void type; };
+template<> struct integer_for_size<1, 0> { typedef uint8_t type; };
+template<> struct integer_for_size<2, 0> { typedef uint16_t type; };
+template<> struct integer_for_size<4, 0> { typedef uint32_t type; };
+template<> struct integer_for_size<8, 0> { typedef uint64_t type; };
+template<> struct integer_for_size<1, 1> { typedef int8_t type; };
+template<> struct integer_for_size<2, 1> { typedef int16_t type; };
+template<> struct integer_for_size<4, 1> { typedef int32_t type; };
+template<> struct integer_for_size<8, 1> { typedef int64_t type; };
+
+template<typename T>
+struct enum_underlying_type
+{
+  typedef typename
+    integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
+    type;
+};
+
+template <typename E>
+class enum_flags
+{
+public:
+  typedef E enum_type;
+  typedef typename enum_underlying_type<enum_type>::type underlying_type;
+
+private:
+  /* Private type used to support initializing flag types with zero:
+
+       foo_flags f = 0;
+
+     but not other integers:
+
+       foo_flags f = 1;
+
+     The way this works is that we define an implicit constructor that
+     takes a pointer to this private type.  Since nothing can
+     instantiate an object of this type, the only possible pointer to
+     pass to the constructor is the NULL pointer, or, zero.  */
+  struct zero_type;
+
+  underlying_type
+  underlying_value () const
+  {
+    return m_enum_value;
+  }
+
+public:
+  /* Allow default construction.  */
+  enum_flags ()
+    : m_enum_value ((enum_type) 0)
+  {}
+
+  enum_flags (const enum_flags &other)
+    : m_enum_value (other.m_enum_value)
+  {}
+
+  enum_flags &operator= (const enum_flags &other)
+  {
+    m_enum_value = other.m_enum_value;
+    return *this;
+  }
+
+  /* If you get an error saying these two overloads are ambiguous,
+     then you tried to mix values of different enum types.  */
+  enum_flags (enum_type e)
+    : m_enum_value (e)
+  {}
+  enum_flags (struct enum_flags::zero_type *zero)
+    : m_enum_value ((enum_type) 0)
+  {}
+
+  enum_flags &operator&= (enum_type e)
+  {
+    m_enum_value = (enum_type) (underlying_value () & e);
+    return *this;
+  }
+  enum_flags &operator|= (enum_type e)
+  {
+    m_enum_value = (enum_type) (underlying_value () | e);
+    return *this;
+  }
+  enum_flags &operator^= (enum_type e)
+  {
+    m_enum_value = (enum_type) (underlying_value () ^ e);
+    return *this;
+  }
+
+  operator enum_type () const
+  {
+    return m_enum_value;
+  }
+
+  enum_flags operator& (enum_type e) const
+  {
+    return (enum_type) (underlying_value () & e);
+  }
+  enum_flags operator| (enum_type e) const
+  {
+    return (enum_type) (underlying_value () | e);
+  }
+  enum_flags operator^ (enum_type e) const
+  {
+    return (enum_type) (underlying_value () ^ e);
+  }
+  enum_flags operator~ () const
+  {
+    return (enum_type) ~underlying_value ();
+  }
+
+private:
+  /* Stored as enum_type because GDB knows to print the bit flags
+     neatly if the enum values look like bit flags.  */
+  enum_type m_enum_value;
+};
+
+/* Global operator overloads.  */
+
+template <typename enum_type>
+typename enum_flags_type<enum_type>::type
+operator& (enum_type e1, enum_type e2)
+{
+  return enum_flags<enum_type> (e1) & e2;
+}
+
+template <typename enum_type>
+typename enum_flags_type<enum_type>::type
+operator| (enum_type e1, enum_type e2)
+{
+  return enum_flags<enum_type> (e1) | e2;
+}
+
+template <typename enum_type>
+typename enum_flags_type<enum_type>::type
+operator^ (enum_type e1, enum_type e2)
+{
+  return enum_flags<enum_type> (e1) ^ e2;
+}
+
+template <typename enum_type>
+typename enum_flags_type<enum_type>::type
+operator~ (enum_type e)
+{
+  return ~enum_flags<enum_type> (e);
+}
+
+#else /* __cplusplus */
+
+/* In C, the flags type is just a typedef for the enum type.  */
+
+#define DEF_ENUM_FLAGS_TYPE(enum_type, flags_type) \
+  typedef enum_type flags_type
+
+#endif /* __cplusplus */
+
+#endif /* COMMON_ENUM_FLAGS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/errors.c ./gdb/common/errors.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/errors.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/errors.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Error reporting facilities.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/errors.h ./gdb/common/errors.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/errors.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/errors.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations for error-reporting facilities.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/fileio.c ./gdb/common/fileio.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/fileio.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/fileio.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* File-I/O functions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/fileio.h ./gdb/common/fileio.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/fileio.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/fileio.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* File-I/O functions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/filestuff.c ./gdb/common/filestuff.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/filestuff.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/filestuff.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low-level file-handling.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -316,7 +316,7 @@ gdb_fopen_cloexec (const char *filename,
     {
       char *copy;
 
-      copy = alloca (strlen (opentype) + 2);
+      copy = (char *) alloca (strlen (opentype) + 2);
       strcpy (copy, opentype);
       /* This is a glibc extension but we try it unconditionally on
 	 this path.  */
@@ -410,17 +410,17 @@ gdb_pipe_cloexec (int filedes[2])
 static void
 do_close_cleanup (void *arg)
 {
-  int *fd = arg;
+  int *fd = (int *) arg;
 
   close (*fd);
 }
 
-/* See cleanup-utils.h.  */
+/* See filestuff.h.  */
 
 struct cleanup *
 make_cleanup_close (int fd)
 {
-  int *saved_fd = xmalloc (sizeof (fd));
+  int *saved_fd = XNEW (int);
 
   *saved_fd = fd;
   return make_cleanup_dtor (do_close_cleanup, saved_fd, xfree);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/filestuff.h ./gdb/common/filestuff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/filestuff.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/filestuff.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low-level file-handling.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/format.c ./gdb/common/format.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/format.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/format.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Parse a printf-style format string.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -99,12 +99,11 @@ parse_format_string (const char **arg)
 
   /* Need extra space for the '\0's.  Doubling the size is sufficient.  */
 
-  current_substring = xmalloc (strlen (string) * 2 + 1000);
+  current_substring = (char *) xmalloc (strlen (string) * 2 + 1000);
 
   max_pieces = strlen (string) + 2;
 
-  pieces = (struct format_piece *)
-    xmalloc (max_pieces * sizeof (struct format_piece));
+  pieces = XNEWVEC (struct format_piece, max_pieces);
 
   next_frag = 0;
 
@@ -382,7 +381,7 @@ free_format_pieces (struct format_piece 
 void
 free_format_pieces_cleanup (void *ptr)
 {
-  void **location = ptr;
+  struct format_piece **location = (struct format_piece **) ptr;
 
   if (location == NULL)
     return;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/format.h ./gdb/common/format.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/format.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/format.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Parse a printf-style format string.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/function-view.h ./gdb/common/function-view.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/function-view.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/function-view.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,355 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef COMMON_FUNCTION_VIEW_H
+#define COMMON_FUNCTION_VIEW_H
+
+/* function_view is a polymorphic type-erasing wrapper class that
+   encapsulates a non-owning reference to arbitrary callable objects.
+
+   A way to put it is that function_view is to std::function like
+   std::string_view is to std::string.  While std::function stores a
+   type-erased callable object internally, function_view holds a
+   type-erased reference to an external callable object.
+
+   This is meant to be used as callback type of a function that:
+
+     #1 - Takes a callback as parameter.
+
+     #2 - Wants to support arbitrary callable objects as callback type
+	  (e.g., stateful function objects, lambda closures, free
+	  functions).
+
+     #3 - Does not store the callback anywhere; instead the function
+	  just calls the callback directly or forwards it to some
+	  other function that calls it.
+
+     #4 - Can't be, or we don't want it to be, a template function
+	  with the callable type as template parameter.  For example,
+	  when the callback is a parameter of a virtual member
+	  function, or when putting the function template in a header
+	  would expose too much implementation detail.
+
+   Note that the C-style "function pointer" + "void *data" callback
+   parameter idiom fails requirement #2 above.  Please don't add new
+   uses of that idiom.  I.e., something like this wouldn't work;
+
+    typedef bool (iterate_over_foos_cb) (foo *f, void *user_data),
+    void iterate_over_foos (iterate_over_foos_cb *callback, void *user_data);
+
+    foo *find_foo_by_type (int type)
+    {
+      foo *found = nullptr;
+
+      iterate_over_foos ([&] (foo *f, void *data)
+	{
+	  if (foo->type == type)
+	    {
+	      found = foo;
+	      return true; // stop iterating
+	    }
+	  return false; // continue iterating
+	}, NULL);
+
+      return found;
+    }
+
+   The above wouldn't compile, because lambdas with captures can't be
+   implicitly converted to a function pointer (because a capture means
+   some context data must be passed to the lambda somehow).
+
+   C++11 gave us std::function as type-erased wrapper around arbitrary
+   callables, however, std::function is not an ideal fit for transient
+   callbacks such as the use case above.  For this use case, which is
+   quite pervasive, a function_view is a better choice, because while
+   function_view is light and does not require any heap allocation,
+   std::function is a heavy-weight object with value semantics that
+   generally requires a heap allocation on construction/assignment of
+   the target callable.  In addition, while it is possible to use
+   std::function in such a way that avoids most of the overhead by
+   making sure to only construct it with callables of types that fit
+   std::function's small object optimization, such as function
+   pointers and std::reference_wrapper callables, that is quite
+   inconvenient in practice, because restricting to free-function
+   callables would imply no state/capture/closure, which we need in
+   most cases, and std::reference_wrapper implies remembering to use
+   std::ref/std::cref where the callable is constructed, with the
+   added inconvenience that std::ref/std::cref have deleted rvalue-ref
+   overloads, meaning you can't use unnamed/temporary lambdas with
+   them.
+
+   Note that because function_view is a non-owning view of a callable,
+   care must be taken to ensure that the callable outlives the
+   function_view that calls it.  This is not really a problem for the
+   use case function_view is intended for, such as passing a temporary
+   function object / lambda to a function that accepts a callback,
+   because in those cases, the temporary is guaranteed to be live
+   until the called function returns.
+
+   Calling a function_view with no associated target is undefined,
+   unlike with std::function, which throws std::bad_function_call.
+   This is by design, to avoid the otherwise necessary NULL check in
+   function_view::operator().
+
+   Since function_view objects are small (a pair of pointers), they
+   should generally be passed around by value.
+
+   Usage:
+
+   Given this function that accepts a callback:
+
+    void
+    iterate_over_foos (gdb::function_view<void (foo *)> callback)
+    {
+       for (auto &foo : foos)
+	 callback (&foo);
+    }
+
+   you can call it like this, passing a lambda as callback:
+
+    iterate_over_foos ([&] (foo *f)
+      {
+	process_one_foo (f);
+      });
+
+   or like this, passing a function object as callback:
+
+    struct function_object
+    {
+      void operator() (foo *f)
+      {
+	if (s->check ())
+	  process_one_foo (f);
+      }
+
+      // some state
+      state *s;
+    };
+
+    state mystate;
+    function_object matcher {&mystate};
+    iterate_over_foos (matcher);
+
+  or like this, passing a function pointer as callback:
+
+    iterate_over_foos (process_one_foo);
+
+  You can find unit tests covering the whole API in
+  unittests/function-view-selftests.c.  */
+
+namespace gdb {
+
+namespace traits {
+  /* A few trait helpers.  */
+  template<typename Predicate>
+  struct Not : public std::integral_constant<bool, !Predicate::value>
+  {};
+
+  template<typename...>
+  struct Or;
+
+  template<>
+  struct Or<> : public std::false_type
+  {};
+
+  template<typename B1>
+  struct Or<B1> : public B1
+  {};
+
+  template<typename B1, typename B2>
+  struct Or<B1, B2>
+    : public std::conditional<B1::value, B1, B2>::type
+  {};
+
+  template<typename B1,typename B2,typename B3, typename... Bn>
+  struct Or<B1, B2, B3, Bn...>
+    : public std::conditional<B1::value, B1, Or<B2, B3, Bn...>>::type
+  {};
+} /* namespace traits */
+
+namespace fv_detail {
+/* Bits shared by all function_view instantiations that do not depend
+   on the template parameters.  */
+
+/* Storage for the erased callable.  This is a union in order to be
+   able to save both a function object (data) pointer or a function
+   pointer without triggering undefined behavior.  */
+union erased_callable
+{
+  /* For function objects.  */
+  void *data;
+
+    /* For function pointers.  */
+  void (*fn) ();
+};
+
+} /* namespace fv_detail */
+
+/* Use partial specialization to get access to the callable's
+   signature. */
+template<class Signature>
+struct function_view;
+
+template<typename Res, typename... Args>
+class function_view<Res (Args...)>
+{
+  template<typename From, typename To>
+  using CompatibleReturnType
+    = traits::Or<std::is_void<To>,
+		 std::is_same<From, To>,
+		 std::is_convertible<From, To>>;
+
+  /* True if Func can be called with Args, and either the result is
+     Res, convertible to Res or Res is void.  */
+  template<typename Callable,
+	   typename Res2 = typename std::result_of<Callable &(Args...)>::type>
+  struct IsCompatibleCallable : CompatibleReturnType<Res2, Res>
+  {};
+
+  /* True if Callable is a function_view.  Used to avoid hijacking the
+     copy ctor.  */
+  template <typename Callable>
+  struct IsFunctionView
+    : std::is_same<function_view, typename std::decay<Callable>::type>
+  {};
+
+  /* Helper to make SFINAE logic easier to read.  */
+  template<typename Condition>
+  using Requires = typename std::enable_if<Condition::value, void>::type;
+
+ public:
+
+  /* NULL by default.  */
+  constexpr function_view () noexcept
+    : m_erased_callable {},
+      m_invoker {}
+  {}
+
+  /* Default copy/assignment is fine.  */
+  function_view (const function_view &) = default;
+  function_view &operator= (const function_view &) = default;
+
+  /* This is the main entry point.  Use SFINAE to avoid hijacking the
+     copy constructor and to ensure that the target type is
+     compatible.  */
+  template
+    <typename Callable,
+     typename = Requires<traits::Not<IsFunctionView<Callable>>>,
+     typename = Requires<IsCompatibleCallable<Callable>>>
+  function_view (Callable &&callable) noexcept
+  {
+    bind (callable);
+  }
+
+  /* Construct a NULL function_view.  */
+  constexpr function_view (std::nullptr_t) noexcept
+    : m_erased_callable {},
+      m_invoker {}
+  {}
+
+  /* Clear a function_view.  */
+  function_view &operator= (std::nullptr_t) noexcept
+  {
+    m_invoker = nullptr;
+    return *this;
+  }
+
+  /* Return true if the wrapper has a target, false otherwise.  Note
+     we check M_INVOKER instead of M_ERASED_CALLABLE because we don't
+     know which member of the union is active right now.  */
+  constexpr explicit operator bool () const noexcept
+  { return m_invoker != nullptr; }
+
+  /* Call the callable.  */
+  Res operator () (Args... args) const
+  { return m_invoker (m_erased_callable, std::forward<Args> (args)...); }
+
+ private:
+
+  /* Bind this function_view to a compatible function object
+     reference.  */
+  template <typename Callable>
+  void bind (Callable &callable) noexcept
+  {
+    m_erased_callable.data = (void *) std::addressof (callable);
+    m_invoker = [] (fv_detail::erased_callable ecall, Args... args)
+      noexcept (noexcept (callable (std::forward<Args> (args)...))) -> Res
+      {
+	auto &restored_callable = *static_cast<Callable *> (ecall.data);
+	/* The explicit cast to Res avoids a compile error when Res is
+	   void and the callable returns non-void.  */
+	return (Res) restored_callable (std::forward<Args> (args)...);
+      };
+  }
+
+  /* Bind this function_view to a compatible function pointer.
+
+     Making this a separate function allows avoiding one indirection,
+     by storing the function pointer directly in the storage, instead
+     of a pointer to pointer.  erased_callable is then a union in
+     order to avoid storing a function pointer as a data pointer here,
+     which would be undefined.  */
+  template<class Res2, typename... Args2>
+  void bind (Res2 (*fn) (Args2...)) noexcept
+  {
+    m_erased_callable.fn = reinterpret_cast<void (*) ()> (fn);
+    m_invoker = [] (fv_detail::erased_callable ecall, Args... args)
+      noexcept (noexcept (fn (std::forward<Args> (args)...))) -> Res
+      {
+	auto restored_fn = reinterpret_cast<Res2 (*) (Args2...)> (ecall.fn);
+	/* The explicit cast to Res avoids a compile error when Res is
+	   void and the callable returns non-void.  */
+	return (Res) restored_fn (std::forward<Args> (args)...);
+      };
+  }
+
+  /* Storage for the erased callable.  */
+  fv_detail::erased_callable m_erased_callable;
+
+  /* The invoker.  This is set to a capture-less lambda by one of the
+     'bind' overloads.  The lambda restores the right type of the
+     callable (which is passed as first argument), and forwards the
+     args.  */
+  Res (*m_invoker) (fv_detail::erased_callable, Args...);
+};
+
+/* Allow comparison with NULL.  Defer the work to the in-class
+   operator bool implementation.  */
+
+template<typename Res, typename... Args>
+constexpr inline bool
+operator== (const function_view<Res (Args...)> &f, std::nullptr_t) noexcept
+{ return !static_cast<bool> (f); }
+
+template<typename Res, typename... Args>
+constexpr inline bool
+operator== (std::nullptr_t, const function_view<Res (Args...)> &f) noexcept
+{ return !static_cast<bool> (f); }
+
+template<typename Res, typename... Args>
+constexpr inline bool
+operator!= (const function_view<Res (Args...)> &f, std::nullptr_t) noexcept
+{ return static_cast<bool> (f); }
+
+template<typename Res, typename... Args>
+constexpr inline bool
+operator!= (std::nullptr_t, const function_view<Res (Args...)> &f) noexcept
+{ return static_cast<bool> (f); }
+
+} /* namespace gdb */
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_assert.h ./gdb/common/gdb_assert.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_assert.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_assert.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB-friendly replacement for <assert.h>.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_locale.h ./gdb/common/gdb_locale.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_locale.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_locale.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB-friendly replacement for <locale.h>.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,11 +32,6 @@
 #  define N_(String) (String)
 # endif
 #else
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) while (0) /* nothing */
-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
 # define _(String) (String)
 # define N_(String) (String)
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_optional.h ./gdb/common/gdb_optional.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_optional.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/gdb_optional.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,87 @@
+/* An optional object.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_OPTIONAL_H
+#define GDB_OPTIONAL_H
+
+namespace gdb
+{
+
+/* This class attempts to be a compatible subset of std::optional,
+   which is slated to be available in C++17.  This class optionally
+   holds an object of some type -- by default it is constructed not
+   holding an object, but later the object can be "emplaced".  This is
+   similar to using std::unique_ptr, but in-object allocation is
+   guaranteed.  */
+template<typename T>
+class optional
+{
+public:
+
+  optional ()
+    : m_instantiated (false)
+  {
+  }
+
+  ~optional ()
+  {
+    if (m_instantiated)
+      destroy ();
+  }
+
+  /* These aren't deleted in std::optional, but it was simpler to
+     delete them here, because currently the users of this class don't
+     need them, and making them depend on the definition of T is
+     somewhat complicated.  */
+  optional (const optional &other) = delete;
+  optional<T> &operator= (const optional &other) = delete;
+
+  template<typename... Args>
+  void emplace (Args &&... args)
+  {
+    if (m_instantiated)
+      destroy ();
+    new (&m_item) T (std::forward<Args>(args)...);
+    m_instantiated = true;
+  }
+
+private:
+
+  /* Destroy the object.  */
+  void destroy ()
+  {
+    gdb_assert (m_instantiated);
+    m_instantiated = false;
+    m_item.~T ();
+  }
+
+  /* The object.  */
+  union
+  {
+    struct { } m_dummy;
+    T m_item;
+  };
+
+  /* True if the object was ever emplaced.  */
+  bool m_instantiated;
+};
+
+}
+
+#endif /* GDB_OPTIONAL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_ref_ptr.h ./gdb/common/gdb_ref_ptr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_ref_ptr.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/gdb_ref_ptr.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,221 @@
+/* Reference-counted smart pointer class
+
+   Copyright (C) 2016 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_REF_PTR_H
+#define GDB_REF_PTR_H
+
+#include <cstddef>
+
+namespace gdb
+{
+
+/* An instance of this class either holds a reference to a
+   reference-counted object or is "NULL".  Reference counting is
+   handled externally by a policy class.  If the object holds a
+   reference, then when the object is destroyed, the reference is
+   decref'd.
+
+   Normally an instance is constructed using a pointer.  This sort of
+   initialization lets this class manage the lifetime of that
+   reference.
+
+   Assignment and copy construction will make a new reference as
+   appropriate.  Assignment from a plain pointer is disallowed to
+   avoid confusion about whether this acquires a new reference;
+   instead use the "reset" method -- which, like the pointer
+   constructor, transfers ownership.
+
+   The policy class must provide two static methods:
+   void incref (T *);
+   void decref (T *);
+*/
+template<typename T, typename Policy>
+class ref_ptr
+{
+ public:
+
+  /* Create a new NULL instance.  */
+  ref_ptr ()
+    : m_obj (NULL)
+  {
+  }
+
+  /* Create a new NULL instance.  Note that this is not explicit.  */
+  ref_ptr (const std::nullptr_t)
+    : m_obj (NULL)
+  {
+  }
+
+  /* Create a new instance.  OBJ is a reference, management of which
+     is now transferred to this class.  */
+  explicit ref_ptr (T *obj)
+    : m_obj (obj)
+  {
+  }
+
+  /* Copy another instance.  */
+  ref_ptr (const ref_ptr &other)
+    : m_obj (other.m_obj)
+  {
+    if (m_obj != NULL)
+      Policy::incref (m_obj);
+  }
+
+  /* Transfer ownership from OTHER.  */
+  ref_ptr (ref_ptr &&other)
+    : m_obj (other.m_obj)
+  {
+    other.m_obj = NULL;
+  }
+
+  /* Destroy this instance.  */
+  ~ref_ptr ()
+  {
+    if (m_obj != NULL)
+      Policy::decref (m_obj);
+  }
+
+  /* Copy another instance.  */
+  ref_ptr &operator= (const ref_ptr &other)
+  {
+    /* Do nothing on self-assignment.  */
+    if (this != &other)
+      {
+	reset (other.m_obj);
+	if (m_obj != NULL)
+	  Policy::incref (m_obj);
+      }
+    return *this;
+  }
+
+  /* Transfer ownership from OTHER.  */
+  ref_ptr &operator= (ref_ptr &&other)
+  {
+    /* Do nothing on self-assignment.  */
+    if (this != &other)
+      {
+	reset (other.m_obj);
+	other.m_obj = NULL;
+      }
+    return *this;
+  }
+
+  /* Change this instance's referent.  OBJ is a reference, management
+     of which is now transferred to this class.  */
+  void reset (T *obj)
+  {
+    if (m_obj != NULL)
+      Policy::decref (m_obj);
+    m_obj = obj;
+  }
+
+  /* Return this instance's referent without changing the state of
+     this class.  */
+  T *get () const
+  {
+    return m_obj;
+  }
+
+  /* Return this instance's referent, and stop managing this
+     reference.  The caller is now responsible for the ownership of
+     the reference.  */
+  T *release ()
+  {
+    T *result = m_obj;
+
+    m_obj = NULL;
+    return result;
+  }
+
+  /* Let users refer to members of the underlying pointer.  */
+  T *operator-> () const
+  {
+    return m_obj;
+  }
+
+ private:
+
+  T *m_obj;
+};
+
+template<typename T, typename Policy>
+inline bool operator== (const ref_ptr<T, Policy> &lhs,
+			const ref_ptr<T, Policy> &rhs)
+{
+  return lhs.get () == rhs.get ();
+}
+
+template<typename T, typename Policy>
+inline bool operator== (const ref_ptr<T, Policy> &lhs, const T *rhs)
+{
+  return lhs.get () == rhs;
+}
+
+template<typename T, typename Policy>
+inline bool operator== (const ref_ptr<T, Policy> &lhs, const std::nullptr_t)
+{
+  return lhs.get () == nullptr;
+}
+
+template<typename T, typename Policy>
+inline bool operator== (const T *lhs, const ref_ptr<T, Policy> &rhs)
+{
+  return lhs == rhs.get ();
+}
+
+template<typename T, typename Policy>
+inline bool operator== (const std::nullptr_t, const ref_ptr<T, Policy> &rhs)
+{
+  return nullptr == rhs.get ();
+}
+
+template<typename T, typename Policy>
+inline bool operator!= (const ref_ptr<T, Policy> &lhs,
+			const ref_ptr<T, Policy> &rhs)
+{
+  return lhs.get () != rhs.get ();
+}
+
+template<typename T, typename Policy>
+inline bool operator!= (const ref_ptr<T, Policy> &lhs, const T *rhs)
+{
+  return lhs.get () != rhs;
+}
+
+template<typename T, typename Policy>
+inline bool operator!= (const ref_ptr<T, Policy> &lhs, const std::nullptr_t)
+{
+  return lhs.get () != nullptr;
+}
+
+template<typename T, typename Policy>
+inline bool operator!= (const T *lhs, const ref_ptr<T, Policy> &rhs)
+{
+  return lhs != rhs.get ();
+}
+
+template<typename T, typename Policy>
+inline bool operator!= (const std::nullptr_t, const ref_ptr<T, Policy> &rhs)
+{
+  return nullptr != rhs.get ();
+}
+
+}
+
+#endif /* GDB_REF_PTR_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_setjmp.h ./gdb/common/gdb_setjmp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_setjmp.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_setjmp.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Portability wrappers for setjmp and longjmp.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_signals.h ./gdb/common/gdb_signals.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_signals.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_signals.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target signal translation functions for GDB.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_sys_time.h ./gdb/common/gdb_sys_time.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_sys_time.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/gdb_sys_time.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,38 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_SYS_TIME_H
+#define GDB_SYS_TIME_H
+
+#include <sys/time.h>
+
+/* On MinGW-w64, gnulib's sys/time.h replaces 'struct timeval' and
+   gettimeofday with versions that support 64-bit time_t, for POSIX
+   compliance.  However, the gettimeofday replacement does not ever
+   return time_t values larger than 31-bit, as it simply returns the
+   system's gettimeofday's (signed) 32-bit result as (signed) 64-bit.
+   Because we don't really need the POSIX compliance, and it ends up
+   causing conflicts with other libraries we use that don't use gnulib
+   and thus work with the native struct timeval, such as Winsock2's
+   native 'select' and libiberty, simply undefine away gnulib's
+   replacements.  */
+#if GNULIB_defined_struct_timeval
+# undef timeval
+# undef gettimeofday
+#endif
+
+#endif /* #ifndef GDB_SYS_TIME_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_unique_ptr.h ./gdb/common/gdb_unique_ptr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_unique_ptr.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/gdb_unique_ptr.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,45 @@
+/* std::unique_ptr specializations for GDB.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_UNIQUE_PTR_H
+#define GDB_UNIQUE_PTR_H 1
+
+#include <memory>
+
+namespace gdb
+{
+/* Define gdb::unique_xmalloc_ptr, a std::unique_ptr that manages
+   xmalloc'ed memory.  */
+
+/* The deleter for std::unique_xmalloc_ptr.  Uses xfree.  */
+template <typename T>
+struct xfree_deleter
+{
+  void operator() (T *ptr) const { xfree (ptr); }
+};
+
+/* Import the standard unique_ptr to our namespace with a custom
+   deleter.  */
+
+template<typename T> using unique_xmalloc_ptr
+  = std::unique_ptr<T, xfree_deleter<T>>;
+
+} /* namespace gdb */
+
+#endif /* GDB_UNIQUE_PTR_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_unlinker.h ./gdb/common/gdb_unlinker.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_unlinker.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/gdb_unlinker.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,60 @@
+/* Unlinking class
+
+   Copyright (C) 2016 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_UNLINKER_H
+#define GDB_UNLINKER_H
+
+namespace gdb
+{
+
+/* An object of this class holds a filename and, when the object goes
+   of scope, the file is removed using unlink.
+
+   A user of this class can request that the file be preserved using
+   the "keep" method.  */
+class unlinker
+{
+ public:
+
+  unlinker (const char *filename) ATTRIBUTE_NONNULL (1)
+    : m_filename (filename)
+  {
+    gdb_assert (filename != NULL);
+  }
+
+  ~unlinker ()
+  {
+    if (m_filename != NULL)
+      unlink (m_filename);
+  }
+
+  /* Keep the file, rather than unlink it.  */
+  void keep ()
+  {
+    m_filename = NULL;
+  }
+
+ private:
+
+  const char *m_filename;
+};
+
+}
+
+#endif /* GDB_UNLINKER_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_vecs.c ./gdb/common/gdb_vecs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_vecs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_vecs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Some commonly-used VEC types.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,7 +49,8 @@ delim_string_to_char_ptr_vec_append (VEC
   do
     {
       size_t this_len;
-      char *next_field, *this_field;
+      const char *next_field;
+      char *this_field;
 
       next_field = strchr (str, delimiter);
       if (next_field == NULL)
@@ -60,7 +61,7 @@ delim_string_to_char_ptr_vec_append (VEC
 	  next_field++;
 	}
 
-      this_field = xmalloc (this_len + 1);
+      this_field = (char *) xmalloc (this_len + 1);
       memcpy (this_field, str, this_len);
       this_field[this_len] = '\0';
       VEC_safe_push (char_ptr, *vecp, this_field);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_vecs.h ./gdb/common/gdb_vecs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_vecs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_vecs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Some commonly-used VEC types.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,8 @@ DEF_VEC_P (const_char_ptr);
 
 DEF_VEC_I (int);
 
+DEF_VEC_I (CORE_ADDR);
+
 extern void free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
 
 extern struct cleanup *
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_wait.h ./gdb/common/gdb_wait.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/gdb_wait.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/gdb_wait.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Standard wait macros.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -85,12 +85,12 @@
 # endif
 #endif
 
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
 #ifndef	WSETSTOP
-# ifdef	W_STOPCODE
 #define	WSETSTOP(w,sig)    ((w) = W_STOPCODE(sig))
-# else
-#define WSETSTOP(w,sig)	   ((w) = (0177 | ((sig) << 8)))
-# endif
 #endif
 
 /* For native GNU/Linux we may use waitpid and the __WCLONE option.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/host-defs.h ./gdb/common/host-defs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/host-defs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/host-defs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Basic host-specific definitions for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/mingw-strerror.c ./gdb/common/mingw-strerror.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/mingw-strerror.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/mingw-strerror.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Safe version of strerror for MinGW, for GDB, the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/new-op.c ./gdb/common/new-op.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/new-op.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/new-op.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,98 @@
+/* Replace operator new/new[], for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* GCC does not understand __has_feature.  */
+#if !defined(__has_feature)
+# define __has_feature(x) 0
+#endif
+
+#if !__has_feature(address_sanitizer) && !defined(__SANITIZE_ADDRESS__)
+#include "common-defs.h"
+#include "host-defs.h"
+#include <new>
+
+/* Override operator new / operator new[], in order to internal_error
+   on allocation failure and thus query the user for abort/core
+   dump/continue, just like xmalloc does.  We don't do this from a
+   new-handler function instead (std::set_new_handler) because we want
+   to catch allocation errors from within global constructors too.
+
+   Skip overriding if building with -fsanitize=address though.
+   Address sanitizer wants to override operator new/delete too in
+   order to detect malloc+delete and new+free mismatches.  Our
+   versions would mask out ASan's, with the result of losing that
+   useful mismatch detection.
+
+   Note that C++ implementations could either have their throw
+   versions call the nothrow versions (libstdc++), or the other way
+   around (clang/libc++).  For that reason, we replace both throw and
+   nothrow variants and call malloc directly.  */
+
+void *
+operator new (std::size_t sz)
+{
+  /* malloc (0) is unpredictable; avoid it.  */
+  if (sz == 0)
+    sz = 1;
+
+  void *p = malloc (sz);	/* ARI: malloc */
+  if (p == NULL)
+    {
+      /* If the user decides to continue debugging, throw a
+	 gdb_quit_bad_alloc exception instead of a regular QUIT
+	 gdb_exception.  The former extends both std::bad_alloc and a
+	 QUIT gdb_exception.  This is necessary because operator new
+	 can only ever throw std::bad_alloc, or something that extends
+	 it.  */
+      TRY
+	{
+	  malloc_failure (sz);
+	}
+      CATCH (ex, RETURN_MASK_ALL)
+	{
+	  do_cleanups (all_cleanups ());
+
+	  throw gdb_quit_bad_alloc (ex);
+	}
+      END_CATCH
+    }
+  return p;
+}
+
+void *
+operator new (std::size_t sz, const std::nothrow_t&) noexcept
+{
+  /* malloc (0) is unpredictable; avoid it.  */
+  if (sz == 0)
+    sz = 1;
+  return malloc (sz);		/* ARI: malloc */
+}
+
+void *
+operator new[] (std::size_t sz)
+{
+   return ::operator new (sz);
+}
+
+void*
+operator new[] (std::size_t sz, const std::nothrow_t&) noexcept
+{
+  return ::operator new (sz, std::nothrow);
+}
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/posix-strerror.c ./gdb/common/posix-strerror.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/posix-strerror.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/posix-strerror.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Safe version of strerror for POSIX systems for GDB, the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/print-utils.c ./gdb/common/print-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/print-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/print-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cell-based print utility routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,15 +21,15 @@
 #include "print-utils.h"
 /* Temporary storage using circular buffer.  */
 
+/* Number of cells in the circular buffer.  */
 #define NUMCELLS 16
-#define CELLSIZE 50
 
 /* Return the next entry in the circular buffer.  */
 
-static char *
-get_cell (void)
+char *
+get_print_cell (void)
 {
-  static char buf[NUMCELLS][CELLSIZE];
+  static char buf[NUMCELLS][PRINT_CELL_SIZE];
   static int cell = 0;
 
   if (++cell >= NUMCELLS)
@@ -43,7 +43,7 @@ decimal2str (char *sign, ULONGEST addr, 
   /* Steal code from valprint.c:print_decimal().  Should this worry
      about the real size of addr as the above does?  */
   unsigned long temp[3];
-  char *str = get_cell ();
+  char *str = get_print_cell ();
   int i = 0;
 
   do
@@ -62,14 +62,14 @@ decimal2str (char *sign, ULONGEST addr, 
   switch (i)
     {
     case 1:
-      xsnprintf (str, CELLSIZE, "%s%0*lu", sign, width, temp[0]);
+      xsnprintf (str, PRINT_CELL_SIZE, "%s%0*lu", sign, width, temp[0]);
       break;
     case 2:
-      xsnprintf (str, CELLSIZE, "%s%0*lu%09lu", sign, width,
+      xsnprintf (str, PRINT_CELL_SIZE, "%s%0*lu%09lu", sign, width,
 		 temp[1], temp[0]);
       break;
     case 3:
-      xsnprintf (str, CELLSIZE, "%s%0*lu%09lu%09lu", sign, width,
+      xsnprintf (str, PRINT_CELL_SIZE, "%s%0*lu%09lu%09lu", sign, width,
 		 temp[2], temp[1], temp[0]);
       break;
     default:
@@ -84,7 +84,7 @@ static char *
 octal2str (ULONGEST addr, int width)
 {
   unsigned long temp[3];
-  char *str = get_cell ();
+  char *str = get_print_cell ();
   int i = 0;
 
   do
@@ -104,15 +104,15 @@ octal2str (ULONGEST addr, int width)
     {
     case 1:
       if (temp[0] == 0)
-	xsnprintf (str, CELLSIZE, "%*o", width, 0);
+	xsnprintf (str, PRINT_CELL_SIZE, "%*o", width, 0);
       else
-	xsnprintf (str, CELLSIZE, "0%0*lo", width, temp[0]);
+	xsnprintf (str, PRINT_CELL_SIZE, "0%0*lo", width, temp[0]);
       break;
     case 2:
-      xsnprintf (str, CELLSIZE, "0%0*lo%010lo", width, temp[1], temp[0]);
+      xsnprintf (str, PRINT_CELL_SIZE, "0%0*lo%010lo", width, temp[1], temp[0]);
       break;
     case 3:
-      xsnprintf (str, CELLSIZE, "0%0*lo%010lo%010lo", width,
+      xsnprintf (str, PRINT_CELL_SIZE, "0%0*lo%010lo%010lo", width,
 		 temp[2], temp[1], temp[0]);
       break;
     default:
@@ -155,18 +155,18 @@ phex (ULONGEST l, int sizeof_l)
   switch (sizeof_l)
     {
     case 8:
-      str = get_cell ();
-      xsnprintf (str, CELLSIZE, "%08lx%08lx",
+      str = get_print_cell ();
+      xsnprintf (str, PRINT_CELL_SIZE, "%08lx%08lx",
 		 (unsigned long) (l >> thirty_two),
 		 (unsigned long) (l & 0xffffffff));
       break;
     case 4:
-      str = get_cell ();
-      xsnprintf (str, CELLSIZE, "%08lx", (unsigned long) l);
+      str = get_print_cell ();
+      xsnprintf (str, PRINT_CELL_SIZE, "%08lx", (unsigned long) l);
       break;
     case 2:
-      str = get_cell ();
-      xsnprintf (str, CELLSIZE, "%04x", (unsigned short) (l & 0xffff));
+      str = get_print_cell ();
+      xsnprintf (str, PRINT_CELL_SIZE, "%04x", (unsigned short) (l & 0xffff));
       break;
     default:
       str = phex (l, sizeof (l));
@@ -189,22 +189,22 @@ phex_nz (ULONGEST l, int sizeof_l)
       {
 	unsigned long high = (unsigned long) (l >> thirty_two);
 
-	str = get_cell ();
+	str = get_print_cell ();
 	if (high == 0)
-	  xsnprintf (str, CELLSIZE, "%lx",
+	  xsnprintf (str, PRINT_CELL_SIZE, "%lx",
 		     (unsigned long) (l & 0xffffffff));
 	else
-	  xsnprintf (str, CELLSIZE, "%lx%08lx", high,
+	  xsnprintf (str, PRINT_CELL_SIZE, "%lx%08lx", high,
 		     (unsigned long) (l & 0xffffffff));
 	break;
       }
     case 4:
-      str = get_cell ();
-      xsnprintf (str, CELLSIZE, "%lx", (unsigned long) l);
+      str = get_print_cell ();
+      xsnprintf (str, PRINT_CELL_SIZE, "%lx", (unsigned long) l);
       break;
     case 2:
-      str = get_cell ();
-      xsnprintf (str, CELLSIZE, "%x", (unsigned short) (l & 0xffff));
+      str = get_print_cell ();
+      xsnprintf (str, PRINT_CELL_SIZE, "%x", (unsigned short) (l & 0xffff));
       break;
     default:
       str = phex_nz (l, sizeof (l));
@@ -219,9 +219,9 @@ phex_nz (ULONGEST l, int sizeof_l)
 char *
 hex_string (LONGEST num)
 {
-  char *result = get_cell ();
+  char *result = get_print_cell ();
 
-  xsnprintf (result, CELLSIZE, "0x%s", phex_nz (num, sizeof (num)));
+  xsnprintf (result, PRINT_CELL_SIZE, "0x%s", phex_nz (num, sizeof (num)));
   return result;
 }
 
@@ -230,14 +230,14 @@ hex_string (LONGEST num)
 char *
 hex_string_custom (LONGEST num, int width)
 {
-  char *result = get_cell ();
-  char *result_end = result + CELLSIZE - 1;
+  char *result = get_print_cell ();
+  char *result_end = result + PRINT_CELL_SIZE - 1;
   const char *hex = phex_nz (num, sizeof (num));
   int hex_len = strlen (hex);
 
   if (hex_len > width)
     width = hex_len;
-  if (width + 2 >= CELLSIZE)
+  if (width + 2 >= PRINT_CELL_SIZE)
     internal_error (__FILE__, __LINE__, _("\
 hex_string_custom: insufficient space to store result"));
 
@@ -294,7 +294,7 @@ int_string (LONGEST val, int radix, int 
 const char *
 core_addr_to_string (const CORE_ADDR addr)
 {
-  char *str = get_cell ();
+  char *str = get_print_cell ();
 
   strcpy (str, "0x");
   strcat (str, phex (addr, sizeof (addr)));
@@ -306,7 +306,7 @@ core_addr_to_string (const CORE_ADDR add
 const char *
 core_addr_to_string_nz (const CORE_ADDR addr)
 {
-  char *str = get_cell ();
+  char *str = get_print_cell ();
 
   strcpy (str, "0x");
   strcat (str, phex_nz (addr, sizeof (addr)));
@@ -316,10 +316,11 @@ core_addr_to_string_nz (const CORE_ADDR 
 /* See print-utils.h.  */
 
 const char *
-host_address_to_string (const void *addr)
+host_address_to_string_1 (const void *addr)
 {
-  char *str = get_cell ();
+  char *str = get_print_cell ();
 
-  xsnprintf (str, CELLSIZE, "0x%s", phex_nz ((uintptr_t) addr, sizeof (addr)));
+  xsnprintf (str, PRINT_CELL_SIZE, "0x%s",
+	     phex_nz ((uintptr_t) addr, sizeof (addr)));
   return str;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/print-utils.h ./gdb/common/print-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/print-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/print-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cell-based print utility routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,10 @@
 #ifndef COMMON_CELLS_H
 #define COMMON_CELLS_H
 
+/* How many characters (including the terminating null byte) fit in a
+   cell.  */
+#define PRINT_CELL_SIZE 50
+
 /* %d for LONGEST.  The result is stored in a circular static buffer,
    NUMCELLS deep.  */
 
@@ -65,6 +69,14 @@ extern const char *core_addr_to_string (
 
 extern const char *core_addr_to_string_nz (const CORE_ADDR addr);
 
-extern const char *host_address_to_string (const void *addr);
+extern const char *host_address_to_string_1 (const void *addr);
+
+/* Wrapper that avoids adding a pointless cast to all callers.  */
+#define host_address_to_string(ADDR) \
+  host_address_to_string_1 ((const void *) (ADDR))
+
+/* Return the next entry in the circular print buffer.  */
+
+extern char *get_print_cell (void);
 
 #endif /* COMMON_CELLS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ptid.c ./gdb/common/ptid.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ptid.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/ptid.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* The ptid_t type and common functions operating on it.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
    
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ptid.h ./gdb/common/ptid.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/ptid.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/ptid.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* The ptid_t type and common functions operating on it.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/queue.h ./gdb/common/queue.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/queue.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/queue.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General queue data structure for GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -125,8 +125,7 @@ QUEUE(TYPE)					\
 void									\
 queue_ ## TYPE ## _enque (QUEUE (TYPE) *q, TYPE v)			\
 {									\
-  QUEUE_ELEM (TYPE) *p							\
-    = xmalloc (sizeof (QUEUE_ELEM (TYPE)));				\
+  QUEUE_ELEM (TYPE) *p = XNEW (QUEUE_ELEM (TYPE));			\
 									\
   gdb_assert (q != NULL);						\
   p->data = v;								\
@@ -229,9 +228,8 @@ queue_ ## TYPE ## _iterate (QUEUE (TYPE)
 QUEUE (TYPE) *								\
 queue_ ## TYPE ## _alloc (void (*free_func) (TYPE))			\
 {									\
-  QUEUE (TYPE) *q;							\
+  QUEUE (TYPE) *q = XNEW (QUEUE (TYPE));				\
 									\
-  q = (QUEUE (TYPE) *) xmalloc (sizeof (QUEUE (TYPE)));		\
   q->head = NULL;							\
   q->tail = NULL;							\
   q->free_func = free_func;						\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/rsp-low.c ./gdb/common/rsp-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/rsp-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/rsp-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level RSP routines for GDB, the GNU debugger.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/rsp-low.h ./gdb/common/rsp-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/rsp-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/rsp-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level RSP routines for GDB, the GNU debugger.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/run-time-clock.c ./gdb/common/run-time-clock.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/run-time-clock.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/run-time-clock.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,58 @@
+/* User/system CPU time clocks that follow the std::chrono interface.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "run-time-clock.h"
+#if defined HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+using namespace std::chrono;
+
+run_time_clock::time_point
+run_time_clock::now () noexcept
+{
+  return time_point (microseconds (get_run_time ()));
+}
+
+#ifdef HAVE_GETRUSAGE
+static std::chrono::microseconds
+timeval_to_microseconds (struct timeval *tv)
+{
+  return (seconds (tv->tv_sec) + microseconds (tv->tv_usec));
+}
+#endif
+
+void
+run_time_clock::now (user_cpu_time_clock::time_point &user,
+		     system_cpu_time_clock::time_point &system) noexcept
+{
+#ifdef HAVE_GETRUSAGE
+  struct rusage rusage;
+
+  getrusage (RUSAGE_SELF, &rusage);
+
+  microseconds utime = timeval_to_microseconds (&rusage.ru_utime);
+  microseconds stime = timeval_to_microseconds (&rusage.ru_stime);
+  user = user_cpu_time_clock::time_point (utime);
+  system = system_cpu_time_clock::time_point (stime);
+#else
+  user = user_cpu_time_clock::time_point (microseconds (get_run_time ()));
+  system = system_cpu_time_clock::time_point (microseconds::zero ());
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/run-time-clock.h ./gdb/common/run-time-clock.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/run-time-clock.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/run-time-clock.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,75 @@
+/* User/system CPU time clocks that follow the std::chrono interface.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef RUN_TIME_CLOCK_H
+#define RUN_TIME_CLOCK_H
+
+#include <chrono>
+
+/* Count the total amount of time spent executing in user mode.  */
+
+struct user_cpu_time_clock
+{
+  using duration = std::chrono::microseconds;
+  using rep = duration::rep;
+  using period = duration::period;
+  using time_point = std::chrono::time_point<user_cpu_time_clock>;
+
+  static constexpr bool is_steady = true;
+
+  /* Use run_time_clock::now instead.  */
+  static time_point now () noexcept = delete;
+};
+
+/* Count the total amount of time spent executing in kernel mode.  */
+
+struct system_cpu_time_clock
+{
+  using duration = std::chrono::microseconds;
+  using rep = duration::rep;
+  using period = duration::period;
+  using time_point = std::chrono::time_point<system_cpu_time_clock>;
+
+  static constexpr bool is_steady = true;
+
+  /* Use run_time_clock::now instead.  */
+  static time_point now () noexcept = delete;
+};
+
+/* Count the total amount of time spent executing in userspace+kernel
+   mode.  */
+
+struct run_time_clock
+{
+  using duration = std::chrono::microseconds;
+  using rep = duration::rep;
+  using period = duration::period;
+  using time_point = std::chrono::time_point<run_time_clock>;
+
+  static constexpr bool is_steady = true;
+
+  static time_point now () noexcept;
+
+  /* Return the user/system time as separate time points, if
+     supported.  If not supported, then the combined user+kernel time
+     is returned in USER and SYSTEM is set to zero.  */
+  static void now (user_cpu_time_clock::time_point &user,
+		   system_cpu_time_clock::time_point &system) noexcept;
+};
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/scoped_restore.h ./gdb/common/scoped_restore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/scoped_restore.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/scoped_restore.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+/* scoped_restore, a simple class for saving and restoring a value
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef SCOPED_RESTORE_H
+#define SCOPED_RESTORE_H
+
+/* Base class for scoped_restore_tmpl.  */
+struct scoped_restore_base
+{
+};
+
+/* A convenience typedef.  Users of make_scoped_restore declare the
+   local RAII object as having this type.  */
+typedef const scoped_restore_base &scoped_restore;
+
+/* An RAII-based object that saves a variable's value, and then
+   restores it again when this object is destroyed. */
+template<typename T>
+class scoped_restore_tmpl : public scoped_restore_base
+{
+ public:
+
+  /* Create a new scoped_restore object that saves the current value
+     of *VAR.  *VAR will be restored when this scoped_restore object
+     is destroyed.  */
+  scoped_restore_tmpl (T *var)
+    : m_saved_var (var),
+      m_saved_value (*var)
+  {
+  }
+
+  /* Create a new scoped_restore object that saves the current value
+     of *VAR, and sets *VAR to VALUE.  *VAR will be restored when this
+     scoped_restore object is destroyed.  This is templated on T2 to
+     allow passing VALUEs of types convertible to T.
+     E.g.: T='base'; T2='derived'.  */
+  template <typename T2>
+  scoped_restore_tmpl (T *var, T2 value)
+    : m_saved_var (var),
+      m_saved_value (*var)
+  {
+    *var = value;
+  }
+
+  scoped_restore_tmpl (const scoped_restore_tmpl<T> &other)
+    : m_saved_var (other.m_saved_var),
+      m_saved_value (other.m_saved_value)
+  {
+    other.m_saved_var = NULL;
+  }
+
+  ~scoped_restore_tmpl ()
+  {
+    if (m_saved_var != NULL)
+      *m_saved_var = m_saved_value;
+  }
+
+ private:
+
+  /* No need for this.  It is intentionally not defined anywhere.  */
+  scoped_restore_tmpl &operator= (const scoped_restore_tmpl &);
+
+  /* The saved variable.  */
+  mutable T *m_saved_var;
+
+  /* The saved value.  */
+  const T m_saved_value;
+};
+
+/* Make a scoped_restore.  This is useful because it lets template
+   argument deduction work.  */
+template<typename T>
+scoped_restore_tmpl<T> make_scoped_restore (T *var)
+{
+  return scoped_restore_tmpl<T> (var);
+}
+
+/* Make a scoped_restore.  This is useful because it lets template
+   argument deduction work.  */
+template<typename T, typename T2>
+scoped_restore_tmpl<T> make_scoped_restore (T *var, T2 value)
+{
+  return scoped_restore_tmpl<T> (var, value);
+}
+
+#endif /* SCOPED_RESTORE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals.c ./gdb/common/signals.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/signals.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target signal translation functions for GDB.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
@@ -331,6 +331,10 @@ gdb_signal_from_host (int hostsig)
   if (hostsig == SIGINFO)
     return GDB_SIGNAL_INFO;
 #endif
+#if defined (SIGLIBRT)
+  if (hostsig == SIGLIBRT)
+    return GDB_SIGNAL_LIBRT;
+#endif
 
 #if defined (REALTIME_LO)
   if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
@@ -584,6 +588,10 @@ do_gdb_signal_to_host (enum gdb_signal o
     case GDB_SIGNAL_INFO:
       return SIGINFO;
 #endif
+#if defined (SIGLIBRT)
+    case GDB_SIGNAL_LIBRT:
+      return SIGLIBRT;
+#endif
 
     default:
 #if defined (REALTIME_LO)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals-state-save-restore.c ./gdb/common/signals-state-save-restore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals-state-save-restore.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/signals-state-save-restore.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,94 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "signals-state-save-restore.h"
+
+#include <signal.h>
+
+/* The original signal actions and mask.  */
+
+#ifdef HAVE_SIGACTION
+static struct sigaction original_signal_actions[NSIG];
+
+/* Note that we use sigprocmask without worrying about threads because
+   the save/restore functions are called either from main, or after a
+   fork.  In both cases, we know the calling process is single
+   threaded.  */
+static sigset_t original_signal_mask;
+#endif
+
+/* See signals-state-save-restore.h.   */
+
+void
+save_original_signals_state (void)
+{
+#ifdef HAVE_SIGACTION
+  int i;
+  int res;
+
+  res = sigprocmask (0,  NULL, &original_signal_mask);
+  if (res == -1)
+    perror_with_name (("sigprocmask"));
+
+  for (i = 1; i < NSIG; i++)
+    {
+      struct sigaction *oldact = &original_signal_actions[i];
+
+      res = sigaction (i, NULL, oldact);
+      if (res == -1 && errno == EINVAL)
+	{
+	  /* Some signal numbers in the range are invalid.  */
+	  continue;
+	}
+      else if (res == -1)
+	perror_with_name (("sigaction"));
+
+      /* If we find a custom signal handler already installed, then
+	 this function was called too late.  */
+      if (oldact->sa_handler != SIG_DFL && oldact->sa_handler != SIG_IGN)
+	internal_error (__FILE__, __LINE__, _("unexpected signal handler"));
+    }
+#endif
+}
+
+/* See signals-state-save-restore.h.   */
+
+void
+restore_original_signals_state (void)
+{
+#ifdef HAVE_SIGACTION
+  int i;
+  int res;
+
+  for (i = 1; i < NSIG; i++)
+    {
+      res = sigaction (i, &original_signal_actions[i], NULL);
+      if (res == -1 && errno == EINVAL)
+	{
+	  /* Some signal numbers in the range are invalid.  */
+	  continue;
+	}
+      else if (res == -1)
+	perror_with_name (("sigaction"));
+    }
+
+  res = sigprocmask (SIG_SETMASK,  &original_signal_mask, NULL);
+  if (res == -1)
+    perror_with_name (("sigprocmask"));
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals-state-save-restore.h ./gdb/common/signals-state-save-restore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/signals-state-save-restore.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/common/signals-state-save-restore.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef COMMON_SIGNALS_STATE_SAVE_RESTORE_H
+#define COMMON_SIGNALS_STATE_SAVE_RESTORE_H
+
+/* Save/restore the signal actions of all signals, and the signal
+   mask.
+
+   Since the exec family of functions does not reset the signal
+   disposition of signals set to SIG_IGN, nor does it reset the signal
+   mask, in order to be transparent, when spawning new child processes
+   to debug (with "run", etc.), we must reset signal actions and mask
+   back to what was originally inherited from gdb/gdbserver's parent,
+   just before execing the target program to debug.  */
+
+/* Save the signal state of all signals.  */
+
+extern void save_original_signals_state (void);
+
+/* Restore the signal state of all signals.  */
+
+extern void restore_original_signals_state (void);
+
+#endif /* COMMON_SIGNALS_STATE_SAVE_RESTORE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/symbol.h ./gdb/common/symbol.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/symbol.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/symbol.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations of common symbol functions.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/vec.c ./gdb/common/vec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/vec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/vec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Vector API for GDB.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
    Contributed by Nathan Sidwell <nathan@codesourcery.com>
 
    This file is part of GDB.
@@ -90,7 +90,7 @@ vec_p_reserve (void *vec, int reserve)
 void *
 vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)
 {
-  struct vec_prefix *pfx = vec;
+  struct vec_prefix *pfx = (struct vec_prefix *) vec;
   unsigned alloc = calculate_allocation (pfx, reserve);
 
   if (!alloc)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/vec.h ./gdb/common/vec.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/vec.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/vec.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Vector API for GDB.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
    Contributed by Nathan Sidwell <nathan@codesourcery.com>
 
    This file is part of GDB.
@@ -437,13 +437,23 @@ DEF_VEC_FUNC_O(T)							  \
 DEF_VEC_ALLOC_FUNC_O(T)							  \
 struct vec_swallow_trailing_semi
 
+/* Avoid offsetof (or its usual C implementation) as it triggers
+   -Winvalid-offsetof warnings with enum_flags types with G++ <= 4.4,
+   even though those types are memcpyable.  This requires allocating a
+   dummy local VEC in all routines that use this, but that has the
+   advantage that it only works if T is default constructible, which
+   is exactly a check we want, to keep C compatibility.  */
+#define vec_offset(T, VPTR) ((size_t) ((char *) &(VPTR)->vec - (char *) VPTR))
+
 #define DEF_VEC_ALLOC_FUNC_I(T)						  \
 static inline VEC(T) *VEC_OP (T,alloc)					  \
      (int alloc_)							  \
 {									  \
+  VEC(T) dummy;							  	  \
+									  \
   /* We must request exact size allocation, hence the negation.  */	  \
   return (VEC(T) *) vec_o_reserve (NULL, -alloc_,			  \
-                                   offsetof (VEC(T),vec), sizeof (T));	  \
+                                   vec_offset (T, &dummy), sizeof (T));	  \
 }									  \
 									  \
 static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_)			  \
@@ -453,9 +463,11 @@ static inline VEC(T) *VEC_OP (T,copy) (V
 									  \
   if (len_)								  \
     {									  \
+      VEC(T) dummy;							  \
+									  \
       /* We must request exact size allocation, hence the negation.  */	  \
       new_vec_ = (VEC (T) *)						  \
-	vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T));	  \
+	vec_o_reserve (NULL, -len_, vec_offset (T, &dummy), sizeof (T));	\
 									  \
       new_vec_->num = len_;						  \
       memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_);		  \
@@ -467,12 +479,13 @@ static inline VEC(T) *VEC_OP (T,merge) (
 {									  \
   if (vec1_ && vec2_)							  \
     {									  \
+      VEC(T) dummy;							  \
       size_t len_ = vec1_->num + vec2_->num;				  \
       VEC (T) *new_vec_ = NULL;						  \
 									  \
       /* We must request exact size allocation, hence the negation.  */	  \
       new_vec_ = (VEC (T) *)						  \
-	vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T));	  \
+	vec_o_reserve (NULL, -len_, vec_offset (T, &dummy), sizeof (T));	  \
 									  \
       new_vec_->num = len_;						  \
       memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num);	  \
@@ -496,7 +509,7 @@ static inline void VEC_OP (T,free)					 
 static inline void VEC_OP (T,cleanup)					  \
      (void *arg_)							  \
 {									  \
-  VEC(T) **vec_ = arg_;							  \
+  VEC(T) **vec_ = (VEC(T) **) arg_;					  \
   if (*vec_)								  \
     vec_free_ (*vec_);							  \
   *vec_ = NULL;								  \
@@ -505,12 +518,13 @@ static inline void VEC_OP (T,cleanup)			
 static inline int VEC_OP (T,reserve)					  \
      (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL)			  \
 {									  \
+  VEC(T) dummy;								  \
   int extend = !VEC_OP (T,space)					  \
 	(*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS);		  \
 									  \
   if (extend)								  \
     *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_,			  \
-				      offsetof (VEC(T),vec), sizeof (T)); \
+				      vec_offset (T, &dummy), sizeof (T)); \
 									  \
   return extend;							  \
 }									  \
@@ -573,7 +587,7 @@ static inline int VEC_OP (T,iterate)				
     }									  \
   else									  \
     {									  \
-      *ptr = 0;								  \
+      *ptr = (T) 0;							  \
       return 0;								  \
     }									  \
 }									  \
@@ -581,7 +595,9 @@ static inline int VEC_OP (T,iterate)				
 static inline size_t VEC_OP (T,embedded_size)				  \
      (int alloc_)							  \
 {									  \
-  return offsetof (VEC(T),vec) + alloc_ * sizeof(T);			  \
+  VEC(T) dummy;								  \
+									  \
+  return vec_offset (T, &dummy) + alloc_ * sizeof(T);			  \
 }									  \
 									  \
 static inline void VEC_OP (T,embedded_init)				  \
@@ -743,7 +759,7 @@ static inline void VEC_OP (T,free)					 
 static inline void VEC_OP (T,cleanup)					  \
      (void *arg_)							  \
 {									  \
-  VEC(T) **vec_ = arg_;							  \
+  VEC(T) **vec_ = (VEC(T) **) arg_;					  \
   if (*vec_)								  \
     vec_free_ (*vec_);							  \
   *vec_ = NULL;								  \
@@ -863,7 +879,9 @@ static inline int VEC_OP (T,iterate)				
 static inline size_t VEC_OP (T,embedded_size)				  \
      (int alloc_)							  \
 {									  \
-  return offsetof (VEC(T),vec) + alloc_ * sizeof(T);			  \
+  VEC(T) dummy;								  \
+									  \
+  return vec_offset (T, &dummy) + alloc_ * sizeof(T);			  \
 }									  \
 									  \
 static inline void VEC_OP (T,embedded_init)				  \
@@ -998,9 +1016,11 @@ static inline unsigned VEC_OP (T,lower_b
 static inline VEC(T) *VEC_OP (T,alloc)					  \
      (int alloc_)							  \
 {									  \
+  VEC(T) dummy;								  \
+									  \
   /* We must request exact size allocation, hence the negation.  */	  \
   return (VEC(T) *) vec_o_reserve (NULL, -alloc_,			  \
-                                   offsetof (VEC(T),vec), sizeof (T));	  \
+                                   vec_offset (T, &dummy), sizeof (T));	  \
 }									  \
 									  \
 static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_)			  \
@@ -1010,9 +1030,11 @@ static inline VEC(T) *VEC_OP (T,copy) (V
 									  \
   if (len_)								  \
     {									  \
+      VEC(T) dummy;							  \
+									  \
       /* We must request exact size allocation, hence the negation.  */	  \
       new_vec_ = (VEC (T) *)						  \
-	vec_o_reserve  (NULL, -len_, offsetof (VEC(T),vec), sizeof (T));  \
+	vec_o_reserve  (NULL, -len_, vec_offset (T, &dummy), sizeof (T)); \
 									  \
       new_vec_->num = len_;						  \
       memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_);		  \
@@ -1024,12 +1046,13 @@ static inline VEC(T) *VEC_OP (T,merge) (
 {									  \
   if (vec1_ && vec2_)							  \
     {									  \
+      VEC(T) dummy;							  \
       size_t len_ = vec1_->num + vec2_->num;				  \
       VEC (T) *new_vec_ = NULL;						  \
 									  \
       /* We must request exact size allocation, hence the negation.  */	  \
       new_vec_ = (VEC (T) *)						  \
-	vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T));	  \
+	vec_o_reserve (NULL, -len_, vec_offset (T, &dummy), sizeof (T));  \
 									  \
       new_vec_->num = len_;						  \
       memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num);	  \
@@ -1053,7 +1076,7 @@ static inline void VEC_OP (T,free)					 
 static inline void VEC_OP (T,cleanup)					  \
      (void *arg_)							  \
 {									  \
-  VEC(T) **vec_ = arg_;							  \
+  VEC(T) **vec_ = (VEC(T) **) arg_;					  \
   if (*vec_)								  \
     vec_free_ (*vec_);							  \
   *vec_ = NULL;								  \
@@ -1062,12 +1085,13 @@ static inline void VEC_OP (T,cleanup)			
 static inline int VEC_OP (T,reserve)					  \
      (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL)			  \
 {									  \
+  VEC(T) dummy;								  \
   int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_	  \
 				  VEC_ASSERT_PASS);			  \
 									  \
   if (extend)								  \
     *vec_ = (VEC(T) *)							  \
-	vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); \
+      vec_o_reserve (*vec_, alloc_, vec_offset (T, &dummy), sizeof (T));  \
 									  \
   return extend;							  \
 }									  \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/version.h ./gdb/common/version.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/version.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/version.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Version information for GDB.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/x86-xstate.h ./gdb/common/x86-xstate.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/x86-xstate.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/x86-xstate.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common code for x86 XSAVE extended state.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,33 +35,41 @@
 #define X86_XSTATE_AVX512	(X86_XSTATE_K | X86_XSTATE_ZMM_H \
 				 | X86_XSTATE_ZMM)
 
+#define X86_XSTATE_PKRU		(1ULL << 9)
+
 /* Supported mask and size of the extended state.  */
 #define X86_XSTATE_X87_MASK	X86_XSTATE_X87
 #define X86_XSTATE_SSE_MASK	(X86_XSTATE_X87 | X86_XSTATE_SSE)
 #define X86_XSTATE_AVX_MASK	(X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
-#define X86_XSTATE_MPX_MASK	(X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
-#define X86_XSTATE_AVX512_MASK	(X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
-#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512)
+#define X86_XSTATE_MPX_MASK	(X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
+#define X86_XSTATE_AVX_MPX_MASK	(X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
+#define X86_XSTATE_AVX_AVX512_MASK	(X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
+#define X86_XSTATE_AVX_MPX_AVX512_PKU_MASK 	(X86_XSTATE_AVX_MPX_MASK\
+					| X86_XSTATE_AVX512 | X86_XSTATE_PKRU)
+
+#define X86_XSTATE_ALL_MASK		(X86_XSTATE_AVX_MPX_AVX512_PKU_MASK)
 
-#define X86_XSTATE_ALL_MASK	(X86_XSTATE_MPX_AVX512_MASK)
 
 #define X86_XSTATE_SSE_SIZE	576
 #define X86_XSTATE_AVX_SIZE	832
 #define X86_XSTATE_BNDREGS_SIZE	1024
 #define X86_XSTATE_BNDCFG_SIZE	1088
 #define X86_XSTATE_AVX512_SIZE	2688
-#define X86_XSTATE_MAX_SIZE	2688
+#define X86_XSTATE_PKRU_SIZE	2696
+#define X86_XSTATE_MAX_SIZE	2696
 
 
 /* In case one of the MPX XCR0 bits is set we consider we have MPX.  */
 #define HAS_MPX(XCR0) (((XCR0) & X86_XSTATE_MPX) != 0)
 #define HAS_AVX(XCR0) (((XCR0) & X86_XSTATE_AVX) != 0)
 #define HAS_AVX512(XCR0) (((XCR0) & X86_XSTATE_AVX512) != 0)
+#define HAS_PKRU(XCR0) (((XCR0) & X86_XSTATE_PKRU) != 0)
 
 /* Get I386 XSAVE extended state size.  */
 #define X86_XSTATE_SIZE(XCR0) \
-    (HAS_AVX512 (XCR0) ? X86_XSTATE_AVX512_SIZE : \
-     (HAS_MPX (XCR0) ? X86_XSTATE_BNDCFG_SIZE : \
-      (HAS_AVX (XCR0) ? X86_XSTATE_AVX_SIZE : X86_XSTATE_SSE_SIZE)))
+    (HAS_PKRU (XCR0) ? X86_XSTATE_PKRU_SIZE : \
+     (HAS_AVX512 (XCR0) ? X86_XSTATE_AVX512_SIZE : \
+      (HAS_MPX (XCR0) ? X86_XSTATE_BNDCFG_SIZE : \
+       (HAS_AVX (XCR0) ? X86_XSTATE_AVX_SIZE : X86_XSTATE_SSE_SIZE))))
 
 #endif /* X86_XSTATE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/xml-utils.c ./gdb/common/xml-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/xml-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/xml-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared helper routines for manipulating XML.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,7 +49,7 @@ xml_escape_text (const char *text)
       }
 
   /* Expand the result.  */
-  result = xmalloc (i + special + 1);
+  result = (char *) xmalloc (i + special + 1);
   for (i = 0, special = 0; text[i] != '\0'; i++)
     switch (text[i])
       {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/xml-utils.h ./gdb/common/xml-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/common/xml-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/common/xml-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared helper routines for manipulating XML.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile.c ./gdb/compile/compile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General Compile and inject code
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "interps.h"
+#include "top.h"
 #include "ui-out.h"
 #include "command.h"
 #include "cli/cli-script.h"
@@ -91,8 +91,7 @@ compile_file_command (char *arg, int fro
   char *buffer;
   struct cleanup *cleanup;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   /* Check the user did not just <enter> after command.  */
   if (arg == NULL)
@@ -115,7 +114,7 @@ compile_file_command (char *arg, int fro
 
   arg = skip_spaces (arg);
   arg = gdb_abspath (arg);
-  make_cleanup (xfree, arg);
+  cleanup = make_cleanup (xfree, arg);
   buffer = xstrprintf ("#include \"%s\"\n", arg);
   make_cleanup (xfree, buffer);
   eval_compile_command (NULL, buffer, scope, NULL);
@@ -130,11 +129,9 @@ compile_file_command (char *arg, int fro
 static void
 compile_code_command (char *arg, int from_tty)
 {
-  struct cleanup *cleanup;
   enum compile_i_scope_types scope = COMPILE_I_SIMPLE_SCOPE;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   if (arg != NULL && check_raw_argument (&arg))
     {
@@ -155,13 +152,12 @@ compile_code_command (char *arg, int fro
   else
     {
       struct command_line *l = get_command_line (compile_control, "");
+      struct cleanup *cleanup = make_cleanup_free_command_lines (&l);
 
-      make_cleanup_free_command_lines (&l);
       l->control_u.compile.scope = scope;
       execute_control_command_untraced (l);
+      do_cleanups (cleanup);
     }
-
-  do_cleanups (cleanup);
 }
 
 /* Callback for compile_print_command.  */
@@ -169,7 +165,7 @@ compile_code_command (char *arg, int fro
 void
 compile_print_value (struct value *val, void *data_voidp)
 {
-  const struct format_data *fmtp = data_voidp;
+  const struct format_data *fmtp = (const struct format_data *) data_voidp;
 
   print_value (val, fmtp);
 }
@@ -183,12 +179,10 @@ static void
 compile_print_command (char *arg_param, int from_tty)
 {
   const char *arg = arg_param;
-  struct cleanup *cleanup;
   enum compile_i_scope_types scope = COMPILE_I_PRINT_ADDRESS_SCOPE;
   struct format_data fmt;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   /* Passing &FMT as SCOPE_DATA is safe as do_module_cleanup will not
      touch the stale pointer if compile_object_run has already quit.  */
@@ -199,14 +193,13 @@ compile_print_command (char *arg_param, 
   else
     {
       struct command_line *l = get_command_line (compile_control, "");
+      struct cleanup *cleanup = make_cleanup_free_command_lines (&l);
 
-      make_cleanup_free_command_lines (&l);
       l->control_u.compile.scope = scope;
       l->control_u.compile.scope_data = &fmt;
       execute_control_command_untraced (l);
+      do_cleanups (cleanup);
     }
-
-  do_cleanups (cleanup);
 }
 
 /* A cleanup function to remove a directory and all its contents.  */
@@ -214,7 +207,7 @@ compile_print_command (char *arg_param, 
 static void
 do_rmdir (void *arg)
 {
-  const char *dir = arg;
+  const char *dir = (const char *) arg;
   char *zap;
   int wstat;
 
@@ -255,18 +248,20 @@ get_compile_file_tempdir (void)
   return tempdir_name;
 }
 
-/* Compute the names of source and object files to use.  The names are
-   allocated by malloc and should be freed by the caller.  */
+/* Compute the names of source and object files to use.  */
 
-static void
-get_new_file_names (char **source_file, char **object_file)
+static compile_file_names
+get_new_file_names ()
 {
   static int seq;
   const char *dir = get_compile_file_tempdir ();
 
   ++seq;
-  *source_file = xstrprintf ("%s%sout%d.c", dir, SLASH_STRING, seq);
-  *object_file = xstrprintf ("%s%sout%d.o", dir, SLASH_STRING, seq);
+
+  return compile_file_names (string_printf ("%s%sout%d.c",
+					    dir, SLASH_STRING, seq),
+			     string_printf ("%s%sout%d.o",
+					    dir, SLASH_STRING, seq));
 }
 
 /* Get the block and PC at which to evaluate an expression.  */
@@ -338,7 +333,7 @@ append_args (int *argcp, char ***argvp, 
 {
   int argi;
 
-  *argvp = xrealloc (*argvp, (*argcp + argc + 1) * sizeof (**argvp));
+  *argvp = XRESIZEVEC (char *, *argvp, (*argcp + argc + 1));
 
   for (argi = 0; argi < argc; argi++)
     (*argvp)[(*argcp)++] = xstrdup (argv[argi]);
@@ -431,7 +426,7 @@ get_args (const struct compile_instance 
 static void
 cleanup_compile_instance (void *arg)
 {
-  struct compile_instance *inst = arg;
+  struct compile_instance *inst = (struct compile_instance *) arg;
 
   inst->destroy (inst);
 }
@@ -441,7 +436,7 @@ cleanup_compile_instance (void *arg)
 static void
 cleanup_unlink_file (void *arg)
 {
-  const char *filename = arg;
+  const char *filename = (const char *) arg;
 
   unlink (filename);
 }
@@ -456,18 +451,13 @@ print_callback (void *ignore, const char
 }
 
 /* Process the compilation request.  On success it returns the object
-   file name and *SOURCE_FILEP is set to source file name.  On an
-   error condition, error () is called.  The caller is responsible for
-   freeing both strings.  */
+   and source file names.  On an error condition, error () is
+   called.  */
 
-static char *
+static compile_file_names
 compile_to_object (struct command_line *cmd, const char *cmd_string,
-		   enum compile_i_scope_types scope,
-		   char **source_filep)
+		   enum compile_i_scope_types scope)
 {
-  char *code;
-  const char *input;
-  char *source_file, *object_file;
   struct compile_instance *compiler;
   struct cleanup *cleanup, *inner_cleanup;
   const struct block *expr_block;
@@ -491,7 +481,8 @@ compile_to_object (struct command_line *
 
   /* Set up instance and context for the compiler.  */
   if (current_language->la_get_compile_instance == NULL)
-    error (_("No compiler support for this language."));
+    error (_("No compiler support for language %s."),
+	   current_language->la_name);
   compiler = current_language->la_get_compile_instance ();
   cleanup = make_cleanup (cleanup_compile_instance, compiler);
 
@@ -502,33 +493,32 @@ compile_to_object (struct command_line *
 
   /* From the provided expression, build a scope to pass to the
      compiler.  */
+
+  string_file input_buf;
+  const char *input;
+
   if (cmd != NULL)
     {
-      struct ui_file *stream = mem_fileopen ();
       struct command_line *iter;
-      char *stream_buf;
 
-      make_cleanup_ui_file_delete (stream);
       for (iter = cmd->body_list[0]; iter; iter = iter->next)
 	{
-	  fputs_unfiltered (iter->line, stream);
-	  fputs_unfiltered ("\n", stream);
+	  input_buf.puts (iter->line);
+	  input_buf.puts ("\n");
 	}
 
-      stream_buf = ui_file_xstrdup (stream, NULL);
-      make_cleanup (xfree, stream_buf);
-      input = stream_buf;
+      input = input_buf.c_str ();
     }
   else if (cmd_string != NULL)
     input = cmd_string;
   else
     error (_("Neither a simple expression, or a multi-line specified."));
 
-  code = current_language->la_compute_program (compiler, input, gdbarch,
-					       expr_block, expr_pc);
-  make_cleanup (xfree, code);
+  std::string code
+    = current_language->la_compute_program (compiler, input, gdbarch,
+					    expr_block, expr_pc);
   if (compile_debug)
-    fprintf_unfiltered (gdb_stdlog, "debug output:\n\n%s", code);
+    fprintf_unfiltered (gdb_stdlog, "debug output:\n\n%s", code.c_str ());
 
   os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch));
   arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
@@ -559,37 +549,36 @@ compile_to_object (struct command_line *
 			    argi, argv[argi]);
     }
 
-  get_new_file_names (&source_file, &object_file);
-  inner_cleanup = make_cleanup (xfree, source_file);
-  make_cleanup (xfree, object_file);
+  compile_file_names fnames = get_new_file_names ();
 
-  src = gdb_fopen_cloexec (source_file, "w");
+  src = gdb_fopen_cloexec (fnames.source_file (), "w");
   if (src == NULL)
     perror_with_name (_("Could not open source file for writing"));
-  make_cleanup (cleanup_unlink_file, source_file);
-  if (fputs (code, src) == EOF)
+  inner_cleanup = make_cleanup (cleanup_unlink_file,
+				(void *) fnames.source_file ());
+  if (fputs (code.c_str (), src) == EOF)
     perror_with_name (_("Could not write to source file"));
   fclose (src);
 
   if (compile_debug)
     fprintf_unfiltered (gdb_stdlog, "source file produced: %s\n\n",
-			source_file);
+			fnames.source_file ());
 
   /* Call the compiler and start the compilation process.  */
-  compiler->fe->ops->set_source_file (compiler->fe, source_file);
+  compiler->fe->ops->set_source_file (compiler->fe, fnames.source_file ());
 
-  if (!compiler->fe->ops->compile (compiler->fe, object_file,
+  if (!compiler->fe->ops->compile (compiler->fe, fnames.object_file (),
 				   compile_debug))
     error (_("Compilation failed."));
 
   if (compile_debug)
     fprintf_unfiltered (gdb_stdlog, "object file produced: %s\n\n",
-			object_file);
+			fnames.object_file ());
 
   discard_cleanups (inner_cleanup);
   do_cleanups (cleanup);
-  *source_filep = source_file;
-  return object_file;
+
+  return fnames;
 }
 
 /* The "compile" prefix command.  */
@@ -608,32 +597,24 @@ void
 eval_compile_command (struct command_line *cmd, const char *cmd_string,
 		      enum compile_i_scope_types scope, void *scope_data)
 {
-  char *object_file, *source_file;
+  struct cleanup *cleanup_unlink;
+  struct compile_module *compile_module;
 
-  object_file = compile_to_object (cmd, cmd_string, scope, &source_file);
-  if (object_file != NULL)
-    {
-      struct cleanup *cleanup_xfree, *cleanup_unlink;
-      struct compile_module *compile_module;
+  compile_file_names fnames = compile_to_object (cmd, cmd_string, scope);
 
-      cleanup_xfree = make_cleanup (xfree, object_file);
-      make_cleanup (xfree, source_file);
-      cleanup_unlink = make_cleanup (cleanup_unlink_file, object_file);
-      make_cleanup (cleanup_unlink_file, source_file);
-      compile_module = compile_object_load (object_file, source_file,
-					    scope, scope_data);
-      if (compile_module == NULL)
-	{
-	  gdb_assert (scope == COMPILE_I_PRINT_ADDRESS_SCOPE);
-	  do_cleanups (cleanup_xfree);
-	  eval_compile_command (cmd, cmd_string,
-				COMPILE_I_PRINT_VALUE_SCOPE, scope_data);
-	  return;
-	}
-      discard_cleanups (cleanup_unlink);
-      do_cleanups (cleanup_xfree);
-      compile_object_run (compile_module);
+  cleanup_unlink = make_cleanup (cleanup_unlink_file,
+				 (void *) fnames.object_file ());
+  make_cleanup (cleanup_unlink_file, (void *) fnames.source_file ());
+  compile_module = compile_object_load (fnames, scope, scope_data);
+  if (compile_module == NULL)
+    {
+      gdb_assert (scope == COMPILE_I_PRINT_ADDRESS_SCOPE);
+      eval_compile_command (cmd, cmd_string,
+			    COMPILE_I_PRINT_VALUE_SCOPE, scope_data);
+      return;
     }
+  discard_cleanups (cleanup_unlink);
+  compile_object_run (compile_module);
 }
 
 /* See compile/compile-internal.h.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-support.c ./gdb/compile/compile-c-support.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-support.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-c-support.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* C language support for compilation.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 #include "macrotab.h"
 #include "macroscope.h"
 #include "regcache.h"
+#include "common/function-view.h"
 
 /* See compile-internal.h.  */
 
@@ -122,10 +123,8 @@ c_get_compile_context (void)
 static void
 print_one_macro (const char *name, const struct macro_definition *macro,
 		 struct macro_source_file *source, int line,
-		 void *user_data)
+		 ui_file *file)
 {
-  struct ui_file *file = user_data;
-
   /* Don't print command-line defines.  They will be supplied another
      way.  */
   if (line == 0)
@@ -168,7 +167,16 @@ write_macro_definitions (const struct bl
     scope = user_macro_scope ();
 
   if (scope != NULL && scope->file != NULL && scope->file->table != NULL)
-    macro_for_each_in_scope (scope->file, scope->line, print_one_macro, file);
+    {
+      macro_for_each_in_scope (scope->file, scope->line,
+			       [&] (const char *name,
+				    const macro_definition *macro,
+				    macro_source_file *source,
+				    int line)
+	{
+	  print_one_macro (name, macro, source, line, file);
+	});
+    }
 }
 
 /* Helper function to construct a header scope for a block of code.
@@ -326,22 +334,19 @@ generate_register_struct (struct ui_file
    to the inferior when the expression was created, and EXPR_PC
    indicates the value of $PC.  */
 
-char *
+std::string
 c_compute_program (struct compile_instance *inst,
 		   const char *input,
 		   struct gdbarch *gdbarch,
 		   const struct block *expr_block,
 		   CORE_ADDR expr_pc)
 {
-  struct ui_file *buf, *var_stream = NULL;
-  char *code;
-  struct cleanup *cleanup;
   struct compile_c_instance *context = (struct compile_c_instance *) inst;
 
-  buf = mem_fileopen ();
-  cleanup = make_cleanup_ui_file_delete (buf);
+  string_file buf;
+  string_file var_stream;
 
-  write_macro_definitions (expr_block, expr_pc, buf);
+  write_macro_definitions (expr_block, expr_pc, &buf);
 
   /* Do not generate local variable information for "raw"
      compilations.  In this case we aren't emitting our own function
@@ -355,21 +360,17 @@ c_compute_program (struct compile_instan
 	 before generating the function header, so we can define the
 	 register struct before the function body.  This requires a
 	 temporary stream.  */
-      var_stream = mem_fileopen ();
-      make_cleanup_ui_file_delete (var_stream);
       registers_used = generate_c_for_variable_locations (context,
 							  var_stream, gdbarch,
 							  expr_block, expr_pc);
       make_cleanup (xfree, registers_used);
 
-      fputs_unfiltered ("typedef unsigned int"
-			" __attribute__ ((__mode__(__pointer__)))"
-			" __gdb_uintptr;\n",
-			buf);
-      fputs_unfiltered ("typedef int"
-			" __attribute__ ((__mode__(__pointer__)))"
-			" __gdb_intptr;\n",
-			buf);
+      buf.puts ("typedef unsigned int"
+		" __attribute__ ((__mode__(__pointer__)))"
+		" __gdb_uintptr;\n");
+      buf.puts ("typedef int"
+		" __attribute__ ((__mode__(__pointer__)))"
+		" __gdb_intptr;\n");
 
       /* Iterate all log2 sizes in bytes supported by c_get_mode_for_size.  */
       for (i = 0; i < 4; ++i)
@@ -377,24 +378,23 @@ c_compute_program (struct compile_instan
 	  const char *mode = c_get_mode_for_size (1 << i);
 
 	  gdb_assert (mode != NULL);
-	  fprintf_unfiltered (buf,
-			      "typedef int"
-			      " __attribute__ ((__mode__(__%s__)))"
-			      " __gdb_int_%s;\n",
-			      mode, mode);
+	  buf.printf ("typedef int"
+		      " __attribute__ ((__mode__(__%s__)))"
+		      " __gdb_int_%s;\n",
+		      mode, mode);
 	}
 
-      generate_register_struct (buf, gdbarch, registers_used);
+      generate_register_struct (&buf, gdbarch, registers_used);
     }
 
-  add_code_header (inst->scope, buf);
+  add_code_header (inst->scope, &buf);
 
   if (inst->scope == COMPILE_I_SIMPLE_SCOPE
       || inst->scope == COMPILE_I_PRINT_ADDRESS_SCOPE
       || inst->scope == COMPILE_I_PRINT_VALUE_SCOPE)
     {
-      ui_file_put (var_stream, ui_file_write_for_put, buf);
-      fputs_unfiltered ("#pragma GCC user_expression\n", buf);
+      buf.write (var_stream.c_str (), var_stream.size ());
+      buf.puts ("#pragma GCC user_expression\n");
     }
 
   /* The user expression has to be in its own scope, so that "extern"
@@ -402,15 +402,15 @@ c_compute_program (struct compile_instan
      declaration is in the same scope as the declaration provided by
      gdb.  */
   if (inst->scope != COMPILE_I_RAW_SCOPE)
-    fputs_unfiltered ("{\n", buf);
+    buf.puts ("{\n");
 
-  fputs_unfiltered ("#line 1 \"gdb command line\"\n", buf);
+  buf.puts ("#line 1 \"gdb command line\"\n");
 
   switch (inst->scope)
     {
     case COMPILE_I_PRINT_ADDRESS_SCOPE:
     case COMPILE_I_PRINT_VALUE_SCOPE:
-      fprintf_unfiltered (buf,
+      buf.printf (
 "__auto_type " COMPILE_I_EXPR_VAL " = %s;\n"
 "typeof (%s) *" COMPILE_I_EXPR_PTR_TYPE ";\n"
 "memcpy (" COMPILE_I_PRINT_OUT_ARG ", %s" COMPILE_I_EXPR_VAL ",\n"
@@ -420,22 +420,20 @@ c_compute_program (struct compile_instan
 			   ? "&" : ""));
       break;
     default:
-      fputs_unfiltered (input, buf);
+      buf.puts (input);
       break;
     }
 
-  fputs_unfiltered ("\n", buf);
+  buf.puts ("\n");
 
   /* For larger user expressions the automatic semicolons may be
      confusing.  */
   if (strchr (input, '\n') == NULL)
-    fputs_unfiltered (";\n", buf);
+    buf.puts (";\n");
 
   if (inst->scope != COMPILE_I_RAW_SCOPE)
-    fputs_unfiltered ("}\n", buf);
+    buf.puts ("}\n");
 
-  add_code_footer (inst->scope, buf);
-  code = ui_file_xstrdup (buf, NULL);
-  do_cleanups (cleanup);
-  return code;
+  add_code_footer (inst->scope, &buf);
+  return std::move (buf.string ());
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-symbols.c ./gdb/compile/compile-c-symbols.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-symbols.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-c-symbols.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Convert symbols from GDB to GCC
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -51,7 +51,7 @@ struct symbol_error
 static hashval_t
 hash_symbol_error (const void *a)
 {
-  const struct symbol_error *se = a;
+  const struct symbol_error *se = (const struct symbol_error *) a;
 
   return htab_hash_pointer (se->sym);
 }
@@ -61,8 +61,8 @@ hash_symbol_error (const void *a)
 static int
 eq_symbol_error (const void *a, const void *b)
 {
-  const struct symbol_error *sea = a;
-  const struct symbol_error *seb = b;
+  const struct symbol_error *sea = (const struct symbol_error *) a;
+  const struct symbol_error *seb = (const struct symbol_error *) b;
 
   return sea->sym == seb->sym;
 }
@@ -72,7 +72,7 @@ eq_symbol_error (const void *a, const vo
 static void
 del_symbol_error (void *a)
 {
-  struct symbol_error *se = a;
+  struct symbol_error *se = (struct symbol_error *) a;
 
   xfree (se->message);
   xfree (se);
@@ -113,7 +113,7 @@ error_symbol_once (struct compile_c_inst
     return;
 
   search.sym = sym;
-  err = htab_find (context->symbol_err_map, &search);
+  err = (struct symbol_error *) htab_find (context->symbol_err_map, &search);
   if (err == NULL || err->message == NULL)
     return;
 
@@ -143,26 +143,26 @@ symbol_substitution_name (struct symbol 
 
 static void
 convert_one_symbol (struct compile_c_instance *context,
-		    struct symbol *sym,
+		    struct block_symbol sym,
 		    int is_global,
 		    int is_local)
 {
   gcc_type sym_type;
-  const char *filename = symbol_symtab (sym)->filename;
-  unsigned short line = SYMBOL_LINE (sym);
+  const char *filename = symbol_symtab (sym.symbol)->filename;
+  unsigned short line = SYMBOL_LINE (sym.symbol);
 
-  error_symbol_once (context, sym);
+  error_symbol_once (context, sym.symbol);
 
-  if (SYMBOL_CLASS (sym) == LOC_LABEL)
+  if (SYMBOL_CLASS (sym.symbol) == LOC_LABEL)
     sym_type = 0;
   else
-    sym_type = convert_type (context, SYMBOL_TYPE (sym));
+    sym_type = convert_type (context, SYMBOL_TYPE (sym.symbol));
 
-  if (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)
+  if (SYMBOL_DOMAIN (sym.symbol) == STRUCT_DOMAIN)
     {
       /* Binding a tag, so we don't need to build a decl.  */
       C_CTX (context)->c_ops->tagbind (C_CTX (context),
-				       SYMBOL_NATURAL_NAME (sym),
+				       SYMBOL_NATURAL_NAME (sym.symbol),
 				       sym_type, filename, line);
     }
   else
@@ -172,7 +172,7 @@ convert_one_symbol (struct compile_c_ins
       CORE_ADDR addr = 0;
       char *symbol_name = NULL;
 
-      switch (SYMBOL_CLASS (sym))
+      switch (SYMBOL_CLASS (sym.symbol))
 	{
 	case LOC_TYPEDEF:
 	  kind = GCC_C_SYMBOL_TYPEDEF;
@@ -180,45 +180,46 @@ convert_one_symbol (struct compile_c_ins
 
 	case LOC_LABEL:
 	  kind = GCC_C_SYMBOL_LABEL;
-	  addr = SYMBOL_VALUE_ADDRESS (sym);
+	  addr = SYMBOL_VALUE_ADDRESS (sym.symbol);
 	  break;
 
 	case LOC_BLOCK:
 	  kind = GCC_C_SYMBOL_FUNCTION;
-	  addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
-	  if (is_global && TYPE_GNU_IFUNC (SYMBOL_TYPE (sym)))
+	  addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol));
+	  if (is_global && TYPE_GNU_IFUNC (SYMBOL_TYPE (sym.symbol)))
 	    addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
 	  break;
 
 	case LOC_CONST:
-	  if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_ENUM)
+	  if (TYPE_CODE (SYMBOL_TYPE (sym.symbol)) == TYPE_CODE_ENUM)
 	    {
 	      /* Already handled by convert_enum.  */
 	      return;
 	    }
-	  C_CTX (context)->c_ops->build_constant (C_CTX (context), sym_type,
-						  SYMBOL_NATURAL_NAME (sym),
-						  SYMBOL_VALUE (sym),
-						  filename, line);
+	  C_CTX (context)->c_ops->build_constant
+	    (C_CTX (context),
+	     sym_type, SYMBOL_NATURAL_NAME (sym.symbol),
+	     SYMBOL_VALUE (sym.symbol),
+	     filename, line);
 	  return;
 
 	case LOC_CONST_BYTES:
 	  error (_("Unsupported LOC_CONST_BYTES for symbol \"%s\"."),
-		 SYMBOL_PRINT_NAME (sym));
+		 SYMBOL_PRINT_NAME (sym.symbol));
 
 	case LOC_UNDEF:
 	  internal_error (__FILE__, __LINE__, _("LOC_UNDEF found for \"%s\"."),
-			  SYMBOL_PRINT_NAME (sym));
+			  SYMBOL_PRINT_NAME (sym.symbol));
 
 	case LOC_COMMON_BLOCK:
 	  error (_("Fortran common block is unsupported for compilation "
 		   "evaluaton of symbol \"%s\"."),
-		 SYMBOL_PRINT_NAME (sym));
+		 SYMBOL_PRINT_NAME (sym.symbol));
 
 	case LOC_OPTIMIZED_OUT:
 	  error (_("Symbol \"%s\" cannot be used for compilation evaluation "
 		   "as it is optimized out."),
-		 SYMBOL_PRINT_NAME (sym));
+		 SYMBOL_PRINT_NAME (sym.symbol));
 
 	case LOC_COMPUTED:
 	  if (is_local)
@@ -227,7 +228,7 @@ convert_one_symbol (struct compile_c_ins
 	  warning (_("Symbol \"%s\" is thread-local and currently can only "
 		     "be referenced from the current thread in "
 		     "compiled code."),
-		   SYMBOL_PRINT_NAME (sym));
+		   SYMBOL_PRINT_NAME (sym.symbol));
 	  /* FALLTHROUGH */
 	case LOC_UNRESOLVED:
 	  /* 'symbol_name' cannot be used here as that one is used only for
@@ -238,20 +239,20 @@ convert_one_symbol (struct compile_c_ins
 	    struct value *val;
 	    struct frame_info *frame = NULL;
 
-	    if (symbol_read_needs_frame (sym))
+	    if (symbol_read_needs_frame (sym.symbol))
 	      {
 		frame = get_selected_frame (NULL);
 		if (frame == NULL)
 		  error (_("Symbol \"%s\" cannot be used because "
 			   "there is no selected frame"),
-			 SYMBOL_PRINT_NAME (sym));
+			 SYMBOL_PRINT_NAME (sym.symbol));
 	      }
 
-	    val = read_var_value (sym, frame);
+	    val = read_var_value (sym.symbol, sym.block, frame);
 	    if (VALUE_LVAL (val) != lval_memory)
 	      error (_("Symbol \"%s\" cannot be used for compilation "
 		       "evaluation as its address has not been found."),
-		     SYMBOL_PRINT_NAME (sym));
+		     SYMBOL_PRINT_NAME (sym.symbol));
 
 	    kind = GCC_C_SYMBOL_VARIABLE;
 	    addr = value_address (val);
@@ -266,12 +267,12 @@ convert_one_symbol (struct compile_c_ins
 	case LOC_LOCAL:
 	substitution:
 	  kind = GCC_C_SYMBOL_VARIABLE;
-	  symbol_name = symbol_substitution_name (sym);
+	  symbol_name = symbol_substitution_name (sym.symbol);
 	  break;
 
 	case LOC_STATIC:
 	  kind = GCC_C_SYMBOL_VARIABLE;
-	  addr = SYMBOL_VALUE_ADDRESS (sym);
+	  addr = SYMBOL_VALUE_ADDRESS (sym.symbol);
 	  break;
 
 	case LOC_FINAL_VALUE:
@@ -284,12 +285,13 @@ convert_one_symbol (struct compile_c_ins
       if (context->base.scope != COMPILE_I_RAW_SCOPE
 	  || symbol_name == NULL)
 	{
-	  decl = C_CTX (context)->c_ops->build_decl (C_CTX (context),
-						     SYMBOL_NATURAL_NAME (sym),
-						     kind,
-						     sym_type,
-						     symbol_name, addr,
-						     filename, line);
+	  decl = C_CTX (context)->c_ops->build_decl
+	    (C_CTX (context),
+	     SYMBOL_NATURAL_NAME (sym.symbol),
+	     kind,
+	     sym_type,
+	     symbol_name, addr,
+	     filename, line);
 
 	  C_CTX (context)->c_ops->bind (C_CTX (context), decl, is_global);
 	}
@@ -304,13 +306,11 @@ convert_one_symbol (struct compile_c_ins
 
 static void
 convert_symbol_sym (struct compile_c_instance *context, const char *identifier,
-		    struct symbol *sym, domain_enum domain)
+		    struct block_symbol sym, domain_enum domain)
 {
-  const struct block *static_block, *found_block;
+  const struct block *static_block;
   int is_local_symbol;
 
-  found_block = block_found;
-
   /* If we found a symbol and it is not in the  static or global
      scope, then we should first convert any static or global scope
      symbol of the same name.  This lets this unusual case work:
@@ -323,18 +323,18 @@ convert_symbol_sym (struct compile_c_ins
      }
   */
 
-  static_block = block_static_block (found_block);
+  static_block = block_static_block (sym.block);
   /* STATIC_BLOCK is NULL if FOUND_BLOCK is the global block.  */
-  is_local_symbol = (found_block != static_block && static_block != NULL);
+  is_local_symbol = (sym.block != static_block && static_block != NULL);
   if (is_local_symbol)
     {
-      struct symbol *global_sym;
+      struct block_symbol global_sym;
 
       global_sym = lookup_symbol (identifier, NULL, domain, NULL);
       /* If the outer symbol is in the static block, we ignore it, as
 	 it cannot be referenced.  */
-      if (global_sym != NULL
-	  && block_found != block_static_block (block_found))
+      if (global_sym.symbol != NULL
+	  && global_sym.block != block_static_block (global_sym.block))
 	{
 	  if (compile_debug)
 	    fprintf_unfiltered (gdb_stdlog,
@@ -421,7 +421,7 @@ gcc_convert_symbol (void *datum,
 		    enum gcc_c_oracle_request request,
 		    const char *identifier)
 {
-  struct compile_c_instance *context = datum;
+  struct compile_c_instance *context = (struct compile_c_instance *) datum;
   domain_enum domain;
   int found = 0;
 
@@ -444,10 +444,10 @@ gcc_convert_symbol (void *datum,
      is to simply emit a gcc error.  */
   TRY
     {
-      struct symbol *sym;
+      struct block_symbol sym;
 
       sym = lookup_symbol (identifier, context->base.block, domain, NULL);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	{
 	  convert_symbol_sym (context, identifier, sym, domain);
 	  found = 1;
@@ -484,7 +484,7 @@ gcc_address
 gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
 		    const char *identifier)
 {
-  struct compile_c_instance *context = datum;
+  struct compile_c_instance *context = (struct compile_c_instance *) datum;
   gcc_address result = 0;
   int found = 0;
 
@@ -495,7 +495,7 @@ gcc_symbol_address (void *datum, struct 
       struct symbol *sym;
 
       /* We only need global functions here.  */
-      sym = lookup_symbol (identifier, NULL, VAR_DOMAIN, NULL);
+      sym = lookup_symbol (identifier, NULL, VAR_DOMAIN, NULL).symbol;
       if (sym != NULL && SYMBOL_CLASS (sym) == LOC_BLOCK)
 	{
 	  if (compile_debug)
@@ -547,7 +547,7 @@ gcc_symbol_address (void *datum, struct 
 static hashval_t
 hash_symname (const void *a)
 {
-  const struct symbol *sym = a;
+  const struct symbol *sym = (const struct symbol *) a;
 
   return htab_hash_string (SYMBOL_NATURAL_NAME (sym));
 }
@@ -558,8 +558,8 @@ hash_symname (const void *a)
 static int
 eq_symname (const void *a, const void *b)
 {
-  const struct symbol *syma = a;
-  const struct symbol *symb = b;
+  const struct symbol *syma = (const struct symbol *) a;
+  const struct symbol *symb = (const struct symbol *) b;
 
   return strcmp (SYMBOL_NATURAL_NAME (syma), SYMBOL_NATURAL_NAME (symb)) == 0;
 }
@@ -584,7 +584,7 @@ symbol_seen (htab_t hashtab, struct symb
 
 static void
 generate_vla_size (struct compile_c_instance *compiler,
-		   struct ui_file *stream,
+		   string_file &stream,
 		   struct gdbarch *gdbarch,
 		   unsigned char *registers_used,
 		   CORE_ADDR pc,
@@ -640,7 +640,7 @@ generate_vla_size (struct compile_c_inst
 
 static void
 generate_c_for_for_one_variable (struct compile_c_instance *compiler,
-				 struct ui_file *stream,
+				 string_file &stream,
 				 struct gdbarch *gdbarch,
 				 unsigned char *registers_used,
 				 CORE_ADDR pc,
@@ -651,14 +651,14 @@ generate_c_for_for_one_variable (struct 
     {
       if (is_dynamic_type (SYMBOL_TYPE (sym)))
 	{
-	  struct ui_file *size_file = mem_fileopen ();
-	  struct cleanup *cleanup = make_cleanup_ui_file_delete (size_file);
+	  /* We need to emit to a temporary buffer in case an error
+	     occurs in the middle.  */
+	  string_file local_file;
 
-	  generate_vla_size (compiler, size_file, gdbarch, registers_used, pc,
+	  generate_vla_size (compiler, local_file, gdbarch, registers_used, pc,
 			     SYMBOL_TYPE (sym), sym);
-	  ui_file_put (size_file, ui_file_write_for_put, stream);
 
-	  do_cleanups (cleanup);
+	  stream.write (local_file.c_str (), local_file.size ());
 	}
 
       if (SYMBOL_COMPUTED_OPS (sym) != NULL)
@@ -667,14 +667,13 @@ generate_c_for_for_one_variable (struct 
 	  struct cleanup *cleanup = make_cleanup (xfree, generated_name);
 	  /* We need to emit to a temporary buffer in case an error
 	     occurs in the middle.  */
-	  struct ui_file *local_file = mem_fileopen ();
+	  string_file local_file;
 
-	  make_cleanup_ui_file_delete (local_file);
 	  SYMBOL_COMPUTED_OPS (sym)->generate_c_location (sym, local_file,
 							  gdbarch,
 							  registers_used,
 							  pc, generated_name);
-	  ui_file_put (local_file, ui_file_write_for_put, stream);
+	  stream.write (local_file.c_str (), local_file.size ());
 
 	  do_cleanups (cleanup);
 	}
@@ -719,13 +718,12 @@ generate_c_for_for_one_variable (struct 
 
 unsigned char *
 generate_c_for_variable_locations (struct compile_c_instance *compiler,
-				   struct ui_file *stream,
+				   string_file &stream,
 				   struct gdbarch *gdbarch,
 				   const struct block *block,
 				   CORE_ADDR pc)
 {
-  struct cleanup *cleanup, *outer;
-  htab_t symhash;
+  struct cleanup *outer;
   const struct block *static_block = block_static_block (block);
   unsigned char *registers_used;
 
@@ -739,9 +737,8 @@ generate_c_for_variable_locations (struc
 
   /* Ensure that a given name is only entered once.  This reflects the
      reality of shadowing.  */
-  symhash = htab_create_alloc (1, hash_symname, eq_symname, NULL,
-			       xcalloc, xfree);
-  cleanup = make_cleanup_htab_delete (symhash);
+  htab_up symhash (htab_create_alloc (1, hash_symname, eq_symname, NULL,
+				      xcalloc, xfree));
 
   while (1)
     {
@@ -754,7 +751,7 @@ generate_c_for_variable_locations (struc
 	   sym != NULL;
 	   sym = block_iterator_next (&iter))
 	{
-	  if (!symbol_seen (symhash, sym))
+	  if (!symbol_seen (symhash.get (), sym))
 	    generate_c_for_for_one_variable (compiler, stream, gdbarch,
 					     registers_used, pc, sym);
 	}
@@ -766,7 +763,6 @@ generate_c_for_variable_locations (struc
       block = BLOCK_SUPERBLOCK (block);
     }
 
-  do_cleanups (cleanup);
   discard_cleanups (outer);
   return registers_used;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-types.c ./gdb/compile/compile-c-types.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-c-types.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-c-types.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Convert types from GDB to GCC
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,7 @@ struct type_map_instance
 
   /* The corresponding gcc type handle.  */
 
-  gcc_type gcc_type;
+  gcc_type gcc_type_handle;
 };
 
 /* Hash a type_map_instance.  */
@@ -39,7 +39,7 @@ struct type_map_instance
 static hashval_t
 hash_type_map_instance (const void *p)
 {
-  const struct type_map_instance *inst = p;
+  const struct type_map_instance *inst = (const struct type_map_instance *) p;
 
   return htab_hash_pointer (inst->type);
 }
@@ -49,8 +49,8 @@ hash_type_map_instance (const void *p)
 static int
 eq_type_map_instance (const void *a, const void *b)
 {
-  const struct type_map_instance *insta = a;
-  const struct type_map_instance *instb = b;
+  const struct type_map_instance *insta = (const struct type_map_instance *) a;
+  const struct type_map_instance *instb = (const struct type_map_instance *) b;
 
   return insta->type == instb->type;
 }
@@ -72,13 +72,14 @@ insert_type (struct compile_c_instance *
   void **slot;
 
   inst.type = type;
-  inst.gcc_type = gcc_type;
+  inst.gcc_type_handle = gcc_type;
   slot = htab_find_slot (context->type_map, &inst, INSERT);
 
-  add = *slot;
+  add = (struct type_map_instance *) *slot;
   /* The type might have already been inserted in order to handle
      recursive types.  */
-  gdb_assert (add == NULL || add->gcc_type == gcc_type);
+  if (add != NULL && add->gcc_type_handle != gcc_type)
+    error (_("Unexpected type id from GCC, check you use recent enough GCC."));
 
   if (add == NULL)
     {
@@ -292,7 +293,7 @@ convert_qualified (struct compile_c_inst
 {
   struct type *unqual = make_unqualified_type (type);
   gcc_type unqual_converted;
-  int quals = 0;
+  gcc_qualifiers_flags quals = 0;
 
   unqual_converted = convert_type (context, unqual);
 
@@ -382,12 +383,12 @@ convert_type (struct compile_c_instance 
 
   /* We don't ever have to deal with typedefs in this code, because
      those are only needed as symbols by the C compiler.  */
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   inst.type = type;
-  found = htab_find (context->type_map, &inst);
+  found = (struct type_map_instance *) htab_find (context->type_map, &inst);
   if (found != NULL)
-    return found->gcc_type;
+    return found->gcc_type_handle;
 
   result = convert_type_basic (context, type);
   insert_type (context, type, result);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile.h ./gdb/compile/compile.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Header file for Compile and inject module.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ extern void eval_compile_command (struct
    PER_CU is the per-CU object used for looking up various other
    things.  */
 
-extern void compile_dwarf_expr_to_c (struct ui_file *stream,
+extern void compile_dwarf_expr_to_c (string_file &stream,
 				     const char *result_name,
 				     struct symbol *sym,
 				     CORE_ADDR pc,
@@ -90,7 +90,7 @@ extern void compile_dwarf_expr_to_c (str
    PER_CU is the per-CU object used for looking up various other
    things.  */
 
-extern void compile_dwarf_bounds_to_c (struct ui_file *stream,
+extern void compile_dwarf_bounds_to_c (string_file &stream,
 				       const char *result_name,
 				       const struct dynamic_prop *prop,
 				       struct symbol *sym, CORE_ADDR pc,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-internal.h ./gdb/compile/compile-internal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-internal.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-internal.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file for GDB compile command and supporting functions.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,6 +19,10 @@
 
 #include "hashtab.h"
 #include "gcc-c-interface.h"
+#include "common/enum-flags.h"
+
+/* enum-flags wrapper.  */
+DEF_ENUM_FLAGS_TYPE (enum gcc_qualifiers, gcc_qualifiers_flags);
 
 /* Debugging flag for the "compile" family of commands.  */
 
@@ -131,7 +135,7 @@ extern struct compile_instance *new_comp
 
 extern unsigned char *generate_c_for_variable_locations
      (struct compile_c_instance *compiler,
-      struct ui_file *stream,
+      string_file &stream,
       struct gdbarch *gdbarch,
       const struct block *block,
       CORE_ADDR pc);
@@ -148,4 +152,29 @@ extern const char *c_get_mode_for_size (
 struct dynamic_prop;
 extern char *c_get_range_decl_name (const struct dynamic_prop *prop);
 
+/* Type used to hold and pass around the source and object file names
+   to use for compilation.  */
+class compile_file_names
+{
+public:
+  compile_file_names (std::string source_file, std::string object_file)
+    : m_source_file (source_file), m_object_file (object_file)
+  {}
+
+  /* Provide read-only views only.  Return 'const char *' instead of
+     std::string to avoid having to use c_str() everywhere in client
+     code.  */
+
+  const char *source_file () const
+  { return m_source_file.c_str (); }
+
+  const char *object_file () const
+  { return m_object_file.c_str (); }
+
+private:
+  /* Storage for the file names.  */
+  std::string m_source_file;
+  std::string m_object_file;
+};
+
 #endif /* GDB_COMPILE_INTERNAL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-loc2c.c ./gdb/compile/compile-loc2c.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-loc2c.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-loc2c.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Convert a DWARF location expression to C
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,9 +48,9 @@ struct insn_info
 
   unsigned int label : 1;
 
-  /* Whether this instruction is DW_OP_GNU_push_tls_address.  This is
-     a hack until we can add a feature to glibc to let us properly
-     generate code for TLS.  */
+  /* Whether this instruction is DW_OP_GNU_push_tls_address or
+     DW_OP_form_tls_address.  This is a hack until we can add a
+     feature to glibc to let us properly generate code for TLS.  */
 
   unsigned int is_tls : 1;
 };
@@ -85,7 +85,7 @@ compute_stack_depth_worker (int start, i
 
   while (op_ptr < op_end)
     {
-      enum dwarf_location_atom op = *op_ptr;
+      enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr;
       uint64_t reg;
       int64_t offset;
       int ndx = op_ptr - base;
@@ -323,6 +323,7 @@ compute_stack_depth_worker (int start, i
 	  break;
 
 	case DW_OP_GNU_push_tls_address:
+	case DW_OP_form_tls_address:
 	  info[ndx].is_tls = 1;
 	  break;
 
@@ -434,9 +435,9 @@ compute_stack_depth (enum bfd_endian byt
 /* Emit code to push a constant.  */
 
 static void
-push (int indent, struct ui_file *stream, ULONGEST l)
+push (int indent, string_file &stream, ULONGEST l)
 {
-  fprintfi_filtered (indent, stream,
+  fprintfi_filtered (indent, &stream,
 		     "__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR ") %s;\n",
 		     hex_string (l));
 }
@@ -444,57 +445,57 @@ push (int indent, struct ui_file *stream
 /* Emit code to push an arbitrary expression.  This works like
    printf.  */
 
-static void pushf (int indent, struct ui_file *stream, const char *format, ...)
+static void pushf (int indent, string_file &stream, const char *format, ...)
   ATTRIBUTE_PRINTF (3, 4);
 
 static void
-pushf (int indent, struct ui_file *stream, const char *format, ...)
+pushf (int indent, string_file &stream, const char *format, ...)
 {
   va_list args;
 
-  fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos + 1] = ");
+  fprintfi_filtered (indent, &stream, "__gdb_stack[__gdb_tos + 1] = ");
   va_start (args, format);
-  vfprintf_filtered (stream, format, args);
+  stream.vprintf (format, args);
   va_end (args);
-  fprintf_filtered (stream, ";\n");
+  stream.puts (";\n");
 
-  fprintfi_filtered (indent, stream, "++__gdb_tos;\n");
+  fprintfi_filtered (indent, &stream, "++__gdb_tos;\n");
 }
 
 /* Emit code for a unary expression -- one which operates in-place on
    the top-of-stack.  This works like printf.  */
 
-static void unary (int indent, struct ui_file *stream, const char *format, ...)
+static void unary (int indent, string_file &stream, const char *format, ...)
   ATTRIBUTE_PRINTF (3, 4);
 
 static void
-unary (int indent, struct ui_file *stream, const char *format, ...)
+unary (int indent, string_file &stream, const char *format, ...)
 {
   va_list args;
 
-  fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos] = ");
+  fprintfi_filtered (indent, &stream, "__gdb_stack[__gdb_tos] = ");
   va_start (args, format);
-  vfprintf_filtered (stream, format, args);
+  stream.vprintf (format, args);
   va_end (args);
-  fprintf_filtered (stream, ";\n");
+  stream.puts (";\n");
 }
 
 /* Emit code for a unary expression -- one which uses the top two
    stack items, popping the topmost one.  This works like printf.  */
-static void binary (int indent, struct ui_file *stream, const char *format, ...)
+static void binary (int indent, string_file &stream, const char *format, ...)
   ATTRIBUTE_PRINTF (3, 4);
 
 static void
-binary (int indent, struct ui_file *stream, const char *format, ...)
+binary (int indent, string_file &stream, const char *format, ...)
 {
   va_list args;
 
-  fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos - 1] = ");
+  fprintfi_filtered (indent, &stream, "__gdb_stack[__gdb_tos - 1] = ");
   va_start (args, format);
-  vfprintf_filtered (stream, format, args);
+  stream.vprintf (format, args);
   va_end (args);
-  fprintf_filtered (stream, ";\n");
-  fprintfi_filtered (indent, stream, "--__gdb_tos;\n");
+  stream.puts (";\n");
+  fprintfi_filtered (indent, &stream, "--__gdb_tos;\n");
 }
 
 /* Print the name of a label given its "SCOPE", an arbitrary integer
@@ -502,10 +503,9 @@ binary (int indent, struct ui_file *stre
    corresponding to the label's point of definition.  */
 
 static void
-print_label (struct ui_file *stream, unsigned int scope, int target)
+print_label (string_file &stream, unsigned int scope, int target)
 {
-  fprintf_filtered (stream, "__label_%u_%s",
-		    scope, pulongest (target));
+  stream.printf ("__label_%u_%s", scope, pulongest (target));
 }
 
 /* Emit code that pushes a register's address on the stack.
@@ -513,7 +513,7 @@ print_label (struct ui_file *stream, uns
    register was needed by this expression.  */
 
 static void
-pushf_register_address (int indent, struct ui_file *stream,
+pushf_register_address (int indent, string_file &stream,
 			unsigned char *registers_used,
 			struct gdbarch *gdbarch, int regnum)
 {
@@ -534,7 +534,7 @@ pushf_register_address (int indent, stru
    register's value before it is pushed.  */
 
 static void
-pushf_register (int indent, struct ui_file *stream,
+pushf_register (int indent, string_file &stream,
 		unsigned char *registers_used,
 		struct gdbarch *gdbarch, int regnum, uint64_t offset)
 {
@@ -583,7 +583,7 @@ pushf_register (int indent, struct ui_fi
    things.  */
 
 static void
-do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
+do_compile_dwarf_expr_to_c (int indent, string_file &stream,
 			    const char *type_name,
 			    const char *result_name,
 			    struct symbol *sym, CORE_ADDR pc,
@@ -608,9 +608,9 @@ do_compile_dwarf_expr_to_c (int indent, 
 
   ++scope;
 
-  fprintfi_filtered (indent, stream, "__attribute__ ((unused)) %s %s;\n",
+  fprintfi_filtered (indent, &stream, "__attribute__ ((unused)) %s %s;\n",
 		     type_name, result_name);
-  fprintfi_filtered (indent, stream, "{\n");
+  fprintfi_filtered (indent, &stream, "{\n");
   indent += 2;
 
   stack_depth = compute_stack_depth (byte_order, addr_size,
@@ -636,7 +636,7 @@ do_compile_dwarf_expr_to_c (int indent, 
 		 "there is no selected frame"),
 	       SYMBOL_PRINT_NAME (sym));
 
-      val = read_var_value (sym, frame);
+      val = read_var_value (sym, NULL, frame);
       if (VALUE_LVAL (val) != lval_memory)
 	error (_("Symbol \"%s\" cannot be used for compilation evaluation "
 		 "as its address has not been found."),
@@ -647,37 +647,37 @@ do_compile_dwarf_expr_to_c (int indent, 
 		 "compiled code."),
 	       SYMBOL_PRINT_NAME (sym));
 
-      fprintfi_filtered (indent, stream, "%s = %s;\n",
+      fprintfi_filtered (indent, &stream, "%s = %s;\n",
 			 result_name,
 			 core_addr_to_string (value_address (val)));
-      fprintfi_filtered (indent - 2, stream, "}\n");
+      fprintfi_filtered (indent - 2, &stream, "}\n");
       do_cleanups (cleanup);
       return;
     }
 
-  fprintfi_filtered (indent, stream, GCC_UINTPTR " __gdb_stack[%d];\n",
+  fprintfi_filtered (indent, &stream, GCC_UINTPTR " __gdb_stack[%d];\n",
 		     stack_depth);
 
   if (need_tempvar)
-    fprintfi_filtered (indent, stream, GCC_UINTPTR " __gdb_tmp;\n");
-  fprintfi_filtered (indent, stream, "int __gdb_tos = -1;\n");
+    fprintfi_filtered (indent, &stream, GCC_UINTPTR " __gdb_tmp;\n");
+  fprintfi_filtered (indent, &stream, "int __gdb_tos = -1;\n");
 
   if (initial != NULL)
     pushf (indent, stream, "%s", core_addr_to_string (*initial));
 
   while (op_ptr < op_end)
     {
-      enum dwarf_location_atom op = *op_ptr;
+      enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr;
       uint64_t uoffset, reg;
       int64_t offset;
 
-      print_spaces (indent - 2, stream);
+      print_spaces (indent - 2, &stream);
       if (info[op_ptr - base].label)
 	{
 	  print_label (stream, scope, op_ptr - base);
-	  fprintf_filtered (stream, ":;");
+	  stream.puts (":;");
 	}
-      fprintf_filtered (stream, "/* %s */\n", get_DW_OP_name (op));
+      stream.printf ("/* %s */\n", get_DW_OP_name (op));
 
       /* This is handy for debugging the generated code:
       fprintf_filtered (stream, "if (__gdb_tos != %d) abort ();\n",
@@ -817,15 +817,15 @@ do_compile_dwarf_expr_to_c (int indent, 
 	case DW_OP_reg31:
 	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_regx");
 	  pushf_register_address (indent, stream, registers_used, arch,
-				  dwarf2_reg_to_regnum_or_error (arch,
-							      op - DW_OP_reg0));
+				  dwarf_reg_to_regnum_or_error
+				    (arch, op - DW_OP_reg0));
 	  break;
 
 	case DW_OP_regx:
 	  op_ptr = safe_read_uleb128 (op_ptr, op_end, &reg);
 	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_regx");
 	  pushf_register_address (indent, stream, registers_used, arch,
-				  dwarf2_reg_to_regnum_or_error (arch, reg));
+				  dwarf_reg_to_regnum_or_error (arch, reg));
 	  break;
 
 	case DW_OP_breg0:
@@ -862,8 +862,8 @@ do_compile_dwarf_expr_to_c (int indent, 
 	case DW_OP_breg31:
 	  op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
 	  pushf_register (indent, stream, registers_used, arch,
-			  dwarf2_reg_to_regnum_or_error (arch,
-							 op - DW_OP_breg0),
+			  dwarf_reg_to_regnum_or_error (arch,
+							op - DW_OP_breg0),
 			  offset);
 	  break;
 	case DW_OP_bregx:
@@ -871,7 +871,7 @@ do_compile_dwarf_expr_to_c (int indent, 
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &reg);
 	    op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
 	    pushf_register (indent, stream, registers_used, arch,
-			    dwarf2_reg_to_regnum_or_error (arch, reg), offset);
+			    dwarf_reg_to_regnum_or_error (arch, reg), offset);
 	  }
 	  break;
 	case DW_OP_fbreg:
@@ -918,7 +918,7 @@ do_compile_dwarf_expr_to_c (int indent, 
 	  break;
 
 	case DW_OP_drop:
-	  fprintfi_filtered (indent, stream, "--__gdb_tos;\n");
+	  fprintfi_filtered (indent, &stream, "--__gdb_tos;\n");
 	  break;
 
 	case DW_OP_pick:
@@ -928,13 +928,13 @@ do_compile_dwarf_expr_to_c (int indent, 
 	  break;
 
 	case DW_OP_swap:
-	  fprintfi_filtered (indent, stream,
+	  fprintfi_filtered (indent, &stream,
 			     "__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n");
-	  fprintfi_filtered (indent, stream,
+	  fprintfi_filtered (indent, &stream,
 			     "__gdb_stack[__gdb_tos - 1] = "
 			     "__gdb_stack[__gdb_tos];\n");
-	  fprintfi_filtered (indent, stream, ("__gdb_stack[__gdb_tos] = "
-					      "__gdb_tmp;\n"));
+	  fprintfi_filtered (indent, &stream, ("__gdb_stack[__gdb_tos] = "
+					       "__gdb_tmp;\n"));
 	  break;
 
 	case DW_OP_over:
@@ -942,15 +942,15 @@ do_compile_dwarf_expr_to_c (int indent, 
 	  break;
 
 	case DW_OP_rot:
-	  fprintfi_filtered (indent, stream, ("__gdb_tmp = "
-					      "__gdb_stack[__gdb_tos];\n"));
-	  fprintfi_filtered (indent, stream,
+	  fprintfi_filtered (indent, &stream, ("__gdb_tmp = "
+					       "__gdb_stack[__gdb_tos];\n"));
+	  fprintfi_filtered (indent, &stream,
 			     "__gdb_stack[__gdb_tos] = "
 			     "__gdb_stack[__gdb_tos - 1];\n");
-	  fprintfi_filtered (indent, stream,
+	  fprintfi_filtered (indent, &stream,
 			     "__gdb_stack[__gdb_tos - 1] = "
 			     "__gdb_stack[__gdb_tos -2];\n");
-	  fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos - 2] = "
+	  fprintfi_filtered (indent, &stream, "__gdb_stack[__gdb_tos - 2] = "
 			     "__gdb_tmp;\n");
 	  break;
 
@@ -972,7 +972,7 @@ do_compile_dwarf_expr_to_c (int indent, 
 
 	    /* Cast to a pointer of the desired type, then
 	       dereference.  */
-	    fprintfi_filtered (indent, stream,
+	    fprintfi_filtered (indent, &stream,
 			       "__gdb_stack[__gdb_tos] = "
 			       "*((__gdb_int_%s *) "
 			       "__gdb_stack[__gdb_tos]);\n",
@@ -1098,19 +1098,19 @@ do_compile_dwarf_expr_to_c (int indent, 
 	case DW_OP_skip:
 	  offset = extract_signed_integer (op_ptr, 2, byte_order);
 	  op_ptr += 2;
-	  fprintfi_filtered (indent, stream, "goto ");
+	  fprintfi_filtered (indent, &stream, "goto ");
 	  print_label (stream, scope, op_ptr + offset - base);
-	  fprintf_filtered (stream, ";\n");
+	  stream.puts (";\n");
 	  break;
 
 	case DW_OP_bra:
 	  offset = extract_signed_integer (op_ptr, 2, byte_order);
 	  op_ptr += 2;
-	  fprintfi_filtered (indent, stream,
+	  fprintfi_filtered (indent, &stream,
 			     "if ((( " GCC_INTPTR
 			     ") __gdb_stack[__gdb_tos--]) != 0) goto ");
 	  print_label (stream, scope, op_ptr + offset - base);
-	  fprintf_filtered (stream, ";\n");
+	  stream.puts (";\n");
 	  break;
 
 	case DW_OP_nop:
@@ -1121,9 +1121,9 @@ do_compile_dwarf_expr_to_c (int indent, 
 	}
     }
 
-  fprintfi_filtered (indent, stream, "%s = __gdb_stack[__gdb_tos];\n",
+  fprintfi_filtered (indent, &stream, "%s = __gdb_stack[__gdb_tos];\n",
 		     result_name);
-  fprintfi_filtered (indent - 2, stream, "}\n");
+  fprintfi_filtered (indent - 2, &stream, "}\n");
 
   do_cleanups (cleanup);
 }
@@ -1131,7 +1131,7 @@ do_compile_dwarf_expr_to_c (int indent, 
 /* See compile.h.  */
 
 void
-compile_dwarf_expr_to_c (struct ui_file *stream, const char *result_name,
+compile_dwarf_expr_to_c (string_file &stream, const char *result_name,
 			 struct symbol *sym, CORE_ADDR pc,
 			 struct gdbarch *arch, unsigned char *registers_used,
 			 unsigned int addr_size,
@@ -1146,7 +1146,7 @@ compile_dwarf_expr_to_c (struct ui_file 
 /* See compile.h.  */
 
 void
-compile_dwarf_bounds_to_c (struct ui_file *stream,
+compile_dwarf_bounds_to_c (string_file &stream,
 			   const char *result_name,
 			   const struct dynamic_prop *prop,
 			   struct symbol *sym, CORE_ADDR pc,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-load.c ./gdb/compile/compile-object-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-object-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Load module for 'compile' command.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,7 @@
 #include "compile.h"
 #include "block.h"
 #include "arch-utils.h"
+#include <algorithm>
 
 /* Track inferior memory reserved by inferior mmap.  */
 
@@ -46,7 +47,7 @@ struct munmap_list
 static void
 munmap_list_add (struct munmap_list **headp, CORE_ADDR addr, CORE_ADDR size)
 {
-  struct munmap_list *head_new = xmalloc (sizeof (*head_new));
+  struct munmap_list *head_new = XNEW (struct munmap_list);
 
   head_new->next = *headp;
   *headp = head_new;
@@ -79,7 +80,7 @@ munmap_list_free (struct munmap_list *he
 static void
 munmap_listp_free_cleanup (void *headp_voidp)
 {
-  struct munmap_list **headp = headp_voidp;
+  struct munmap_list **headp = (struct munmap_list **) headp_voidp;
 
   munmap_list_free (*headp);
 }
@@ -111,7 +112,7 @@ struct setup_sections_data
 static void
 setup_sections (bfd *abfd, asection *sect, void *data_voidp)
 {
-  struct setup_sections_data *data = data_voidp;
+  struct setup_sections_data *data = (struct setup_sections_data *) data_voidp;
   CORE_ADDR alignment;
   unsigned prot;
 
@@ -186,7 +187,7 @@ setup_sections (bfd *abfd, asection *sec
     return;
 
   alignment = ((CORE_ADDR) 1) << bfd_get_section_alignment (abfd, sect);
-  data->last_max_alignment = max (data->last_max_alignment, alignment);
+  data->last_max_alignment = std::max (data->last_max_alignment, alignment);
 
   data->last_size = (data->last_size + alignment - 1) & -alignment;
 
@@ -198,7 +199,7 @@ setup_sections (bfd *abfd, asection *sec
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_multiple_definition (struct bfd_link_info *link_info,
 				    struct bfd_link_hash_entry *h, bfd *nbfd,
 				    asection *nsec, bfd_vma nval)
@@ -206,15 +207,14 @@ link_callbacks_multiple_definition (stru
   bfd *abfd = link_info->input_bfds;
 
   if (link_info->allow_multiple_definition)
-    return TRUE;
+    return;
   warning (_("Compiled module \"%s\": multiple symbol definitions: %s"),
 	   bfd_get_filename (abfd), h->root.string);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_warning (struct bfd_link_info *link_info, const char *xwarning,
                         const char *symbol, bfd *abfd, asection *section,
 			bfd_vma address)
@@ -222,13 +222,11 @@ link_callbacks_warning (struct bfd_link_
   warning (_("Compiled module \"%s\" section \"%s\": warning: %s"),
 	   bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
 	   xwarning);
-  /* Maybe permit running as a module?  */
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_undefined_symbol (struct bfd_link_info *link_info,
 				 const char *name, bfd *abfd, asection *section,
 				 bfd_vma address, bfd_boolean is_fatal)
@@ -236,25 +234,22 @@ link_callbacks_undefined_symbol (struct 
   warning (_("Cannot resolve relocation to \"%s\" "
 	     "from compiled module \"%s\" section \"%s\"."),
 	   name, bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_reloc_overflow (struct bfd_link_info *link_info,
 			       struct bfd_link_hash_entry *entry,
 			       const char *name, const char *reloc_name,
 			       bfd_vma addend, bfd *abfd, asection *section,
 			       bfd_vma address)
 {
-  /* TRUE is required for intra-module relocations.  */
-  return TRUE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_reloc_dangerous (struct bfd_link_info *link_info,
 				const char *message, bfd *abfd,
 				asection *section, bfd_vma address)
@@ -263,12 +258,11 @@ link_callbacks_reloc_dangerous (struct b
 	     "relocation: %s\n"),
 	   bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
 	   message);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_unattached_reloc (struct bfd_link_info *link_info,
 				 const char *name, bfd *abfd, asection *section,
 				 bfd_vma address)
@@ -277,7 +271,6 @@ link_callbacks_unattached_reloc (struct 
 	     "relocation: %s\n"),
 	   bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
 	   name);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
@@ -336,7 +329,8 @@ struct link_hash_table_cleanup_data
 static void
 link_hash_table_free (void *d)
 {
-  struct link_hash_table_cleanup_data *data = d;
+  struct link_hash_table_cleanup_data *data
+    = (struct link_hash_table_cleanup_data *) d;
 
   if (data->abfd->is_linker_output)
     (*data->abfd->link.hash->hash_table_free) (data->abfd);
@@ -348,7 +342,7 @@ link_hash_table_free (void *d)
 static void
 copy_sections (bfd *abfd, asection *sect, void *data)
 {
-  asymbol **symbol_table = data;
+  asymbol **symbol_table = (asymbol **) data;
   bfd_byte *sect_data, *sect_data_got;
   struct cleanup *cleanups;
   struct bfd_link_info link_info;
@@ -386,7 +380,7 @@ copy_sections (bfd *abfd, asection *sect
   link_order.size = bfd_get_section_size (sect);
   link_order.u.indirect.section = sect;
 
-  sect_data = xmalloc (bfd_get_section_size (sect));
+  sect_data = (bfd_byte *) xmalloc (bfd_get_section_size (sect));
   make_cleanup (xfree, sect_data);
 
   sect_data_got = bfd_get_relocated_section_contents (abfd, &link_info,
@@ -474,14 +468,14 @@ get_out_value_type (struct symbol *func_
     error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
 
   gdb_type = SYMBOL_TYPE (gdb_val_sym);
-  CHECK_TYPEDEF (gdb_type);
+  gdb_type = check_typedef (gdb_type);
 
   gdb_ptr_type_sym = block_lookup_symbol (block, COMPILE_I_EXPR_PTR_TYPE,
 					  VAR_DOMAIN);
   if (gdb_ptr_type_sym == NULL)
     error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
   gdb_ptr_type = SYMBOL_TYPE (gdb_ptr_type_sym);
-  CHECK_TYPEDEF (gdb_ptr_type);
+  gdb_ptr_type = check_typedef (gdb_ptr_type);
   if (TYPE_CODE (gdb_ptr_type) != TYPE_CODE_PTR)
     error (_("Type of \"%s\" is not a pointer"), COMPILE_I_EXPR_PTR_TYPE);
   gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_ptr_type);
@@ -607,20 +601,17 @@ store_regs (struct type *regs_type, CORE
     }
 }
 
-/* Load OBJECT_FILE into inferior memory.  Throw an error otherwise.
-   Caller must fully dispose the return value by calling compile_object_run.
-   SOURCE_FILE's copy is stored into the returned object.
-   Caller should free both OBJECT_FILE and SOURCE_FILE immediatelly after this
-   function returns.
-   Function returns NULL only for COMPILE_I_PRINT_ADDRESS_SCOPE when
-   COMPILE_I_PRINT_VALUE_SCOPE should have been used instead.  */
+/* Load the object file specified in FILE_NAMES into inferior memory.
+   Throw an error otherwise.  Caller must fully dispose the return
+   value by calling compile_object_run.  Returns NULL only for
+   COMPILE_I_PRINT_ADDRESS_SCOPE when COMPILE_I_PRINT_VALUE_SCOPE
+   should have been used instead.  */
 
 struct compile_module *
-compile_object_load (const char *object_file, const char *source_file,
+compile_object_load (const compile_file_names &file_names,
 		     enum compile_i_scope_types scope, void *scope_data)
 {
   struct cleanup *cleanups, *cleanups_free_objfile;
-  bfd *abfd;
   struct setup_sections_data setup_sections_data;
   CORE_ADDR addr, regs_addr, out_value_addr = 0;
   struct symbol *func_sym;
@@ -639,20 +630,19 @@ compile_object_load (const char *object_
   struct type *expect_return_type;
   struct munmap_list *munmap_list_head = NULL;
 
-  filename = tilde_expand (object_file);
+  filename = tilde_expand (file_names.object_file ());
   cleanups = make_cleanup (xfree, filename);
 
-  abfd = gdb_bfd_open (filename, gnutarget, -1);
+  gdb_bfd_ref_ptr abfd (gdb_bfd_open (filename, gnutarget, -1));
   if (abfd == NULL)
     error (_("\"%s\": could not open as compiled module: %s"),
           filename, bfd_errmsg (bfd_get_error ()));
-  make_cleanup_bfd_unref (abfd);
 
-  if (!bfd_check_format_matches (abfd, bfd_object, &matching))
+  if (!bfd_check_format_matches (abfd.get (), bfd_object, &matching))
     error (_("\"%s\": not in loadable format: %s"),
           filename, gdb_bfd_errmsg (bfd_get_error (), matching));
 
-  if ((bfd_get_file_flags (abfd) & (EXEC_P | DYNAMIC)) != 0)
+  if ((bfd_get_file_flags (abfd.get ()) & (EXEC_P | DYNAMIC)) != 0)
     error (_("\"%s\": not in object format."), filename);
 
   setup_sections_data.last_size = 0;
@@ -661,22 +651,22 @@ compile_object_load (const char *object_
   setup_sections_data.last_max_alignment = 1;
   setup_sections_data.munmap_list_headp = &munmap_list_head;
   make_cleanup (munmap_listp_free_cleanup, &munmap_list_head);
-  bfd_map_over_sections (abfd, setup_sections, &setup_sections_data);
-  setup_sections (abfd, NULL, &setup_sections_data);
+  bfd_map_over_sections (abfd.get (), setup_sections, &setup_sections_data);
+  setup_sections (abfd.get (), NULL, &setup_sections_data);
 
-  storage_needed = bfd_get_symtab_upper_bound (abfd);
+  storage_needed = bfd_get_symtab_upper_bound (abfd.get ());
   if (storage_needed < 0)
     error (_("Cannot read symbols of compiled module \"%s\": %s"),
           filename, bfd_errmsg (bfd_get_error ()));
 
   /* SYMFILE_VERBOSE is not passed even if FROM_TTY, user is not interested in
      "Reading symbols from ..." message for automatically generated file.  */
-  objfile = symbol_file_add_from_bfd (abfd, filename, 0, NULL, 0, NULL);
+  objfile = symbol_file_add_from_bfd (abfd.get (), filename, 0, NULL, 0, NULL);
   cleanups_free_objfile = make_cleanup_free_objfile (objfile);
 
   func_sym = lookup_global_symbol_from_objfile (objfile,
 						GCC_FE_WRAPPER_FUNCTION,
-						VAR_DOMAIN);
+						VAR_DOMAIN).symbol;
   if (func_sym == NULL)
     error (_("Cannot find function \"%s\" in compiled module \"%s\"."),
 	   GCC_FE_WRAPPER_FUNCTION, objfile_name (objfile));
@@ -718,8 +708,9 @@ compile_object_load (const char *object_
   /* The memory may be later needed
      by bfd_generic_get_relocated_section_contents
      called from default_symfile_relocate.  */
-  symbol_table = obstack_alloc (&objfile->objfile_obstack, storage_needed);
-  number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
+  symbol_table = (asymbol **) obstack_alloc (&objfile->objfile_obstack,
+					     storage_needed);
+  number_of_symbols = bfd_canonicalize_symtab (abfd.get (), symbol_table);
   if (number_of_symbols < 0)
     error (_("Cannot parse symbols of compiled module \"%s\": %s"),
           filename, bfd_errmsg (bfd_get_error ()));
@@ -778,7 +769,7 @@ compile_object_load (const char *object_
   if (missing_symbols)
     error (_("%ld symbols were missing, cannot continue."), missing_symbols);
 
-  bfd_map_over_sections (abfd, copy_sections, symbol_table);
+  bfd_map_over_sections (abfd.get (), copy_sections, symbol_table);
 
   regs_type = get_regs_type (func_sym, objfile);
   if (regs_type == NULL)
@@ -827,9 +818,9 @@ compile_object_load (const char *object_
 
   discard_cleanups (cleanups_free_objfile);
 
-  retval = xmalloc (sizeof (*retval));
+  retval = XNEW (struct compile_module);
   retval->objfile = objfile;
-  retval->source_file = xstrdup (source_file);
+  retval->source_file = xstrdup (file_names.source_file ());
   retval->func_sym = func_sym;
   retval->regs_addr = regs_addr;
   retval->scope = scope;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-load.h ./gdb/compile/compile-object-load.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-load.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-object-load.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file to load module for 'compile' command.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
 #ifndef GDB_COMPILE_OBJECT_LOAD_H
 #define GDB_COMPILE_OBJECT_LOAD_H
 
+#include "compile-internal.h"
+
 struct munmap_list;
 
 struct compile_module
@@ -53,7 +55,7 @@ struct compile_module
 };
 
 extern struct compile_module *compile_object_load
-  (const char *object_file, const char *source_file,
+  (const compile_file_names &fnames,
    enum compile_i_scope_types scope, void *scope_data);
 extern void munmap_list_free (struct munmap_list *head);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-run.c ./gdb/compile/compile-object-run.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-run.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-object-run.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Call module for 'compile' command.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -61,7 +61,7 @@ static dummy_frame_dtor_ftype do_module_
 static void
 do_module_cleanup (void *arg, int registers_valid)
 {
-  struct do_module_cleanup *data = arg;
+  struct do_module_cleanup *data = (struct do_module_cleanup *) arg;
   struct objfile *objfile;
 
   if (data->executedp != NULL)
@@ -125,7 +125,8 @@ compile_object_run (struct compile_modul
   CORE_ADDR regs_addr = module->regs_addr;
   struct objfile *objfile = module->objfile;
 
-  data = xmalloc (sizeof (*data) + strlen (objfile_name_s));
+  data = (struct do_module_cleanup *) xmalloc (sizeof (*data)
+					       + strlen (objfile_name_s));
   data->executedp = &executed;
   data->source_file = xstrdup (module->source_file);
   strcpy (data->objfile_name_string, objfile_name_s);
@@ -155,7 +156,7 @@ compile_object_run (struct compile_modul
       func_val = value_from_pointer (lookup_pointer_type (func_type),
 				   BLOCK_START (SYMBOL_BLOCK_VALUE (func_sym)));
 
-      vargs = alloca (sizeof (*vargs) * TYPE_NFIELDS (func_type));
+      vargs = XALLOCAVEC (struct value *, TYPE_NFIELDS (func_type));
       if (TYPE_NFIELDS (func_type) >= 1)
 	{
 	  gdb_assert (regs_addr != 0);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-run.h ./gdb/compile/compile-object-run.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/compile/compile-object-run.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/compile/compile-object-run.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file to call module for 'compile' command.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/complaints.c ./gdb/complaints.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/complaints.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/complaints.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for complaint handling during symbol reading in GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,18 +27,17 @@ extern void _initialize_complaints (void
 /* Should each complaint message be self explanatory, or should we
    assume that a series of complaints is being produced?  */
 
-/* case 1: First message of a series that must
-   start off with explanation.  case 2: Subsequent message of a series
-   that needs no explanation (the user already knows we have a problem
-   so we can just state our piece).  */
 enum complaint_series {
   /* Isolated self explanatory message.  */
   ISOLATED_MESSAGE,
+
   /* First message of a series, includes an explanation.  */
   FIRST_MESSAGE,
+
   /* First message of a series, but does not need to include any sort
      of explanation.  */
   SHORT_FIRST_MESSAGE,
+
   /* Subsequent message of a series that needs no explanation (the
      user already knows we have a problem so we can just state our
      piece).  */
@@ -69,13 +68,7 @@ struct complaints
 {
   struct complain *root;
 
-  /* Should each complaint be self explanatory, or should we assume
-     that a series of complaints is being produced?  case 0: Isolated
-     self explanatory message.  case 1: First message of a series that
-     must start off with explanation.  case 2: Subsequent message of a
-     series that needs no explanation (the user already knows we have
-     a problem so we can just state our piece).  */
-  int series;
+  enum complaint_series series;
 
   /* The explanatory messages that should accompany the complaint.
      NOTE: cagney/2002-08-14: In a desperate attempt at being vaguely
@@ -99,7 +92,7 @@ static struct explanation symfile_explan
 
 static struct complaints symfile_complaint_book = {
   &complaint_sentinel,
-  0,
+  ISOLATED_MESSAGE,
   symfile_explanations
 };
 struct complaints *symfile_complaints = &symfile_complaint_book;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/complaints.h ./gdb/complaints.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/complaints.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/complaints.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for complaint handling during symbol reading in GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/completer.c ./gdb/completer.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/completer.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/completer.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Line completion stuff for GDB, the GNU debugger.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "reggroups.h"
 #include "user-regs.h"
 #include "arch-utils.h"
+#include "location.h"
 
 #include "cli/cli-decode.h"
 
@@ -43,6 +44,21 @@
 
 #include "completer.h"
 
+/* An enumeration of the various things a user might
+   attempt to complete for a location.  */
+
+enum explicit_location_match_type
+{
+    /* The filename of a source file.  */
+    MATCH_SOURCE,
+
+    /* The name of a function or method.  */
+    MATCH_FUNCTION,
+
+    /* The name of a label.  */
+    MATCH_LABEL
+};
+
 /* Prototypes for local functions.  */
 static
 char *line_completion_function (const char *text, int matches, 
@@ -149,14 +165,14 @@ filename_completer (struct cmd_list_elem
       else if (word > text)
 	{
 	  /* Return some portion of p.  */
-	  q = xmalloc (strlen (p) + 5);
+	  q = (char *) xmalloc (strlen (p) + 5);
 	  strcpy (q, p + (word - text));
 	  xfree (p);
 	}
       else
 	{
 	  /* Return some of TEXT plus p.  */
-	  q = xmalloc (strlen (p) + (text - word) + 5);
+	  q = (char *) xmalloc (strlen (p) + (text - word) + 5);
 	  strncpy (q, word, text - word);
 	  q[text - word] = '\0';
 	  strcat (q, p);
@@ -175,7 +191,7 @@ filename_completer (struct cmd_list_elem
   return return_val;
 }
 
-/* Complete on locations, which might be of two possible forms:
+/* Complete on linespecs, which might be of two possible forms:
 
        file:line
    or
@@ -184,9 +200,9 @@ filename_completer (struct cmd_list_elem
    This is intended to be used in commands that set breakpoints
    etc.  */
 
-VEC (char_ptr) *
-location_completer (struct cmd_list_element *ignore, 
-		    const char *text, const char *word)
+static VEC (char_ptr) *
+linespec_location_completer (struct cmd_list_element *ignore,
+			     const char *text, const char *word)
 {
   int n_syms, n_files, ix;
   VEC (char_ptr) *fn_list = NULL;
@@ -248,7 +264,8 @@ location_completer (struct cmd_list_elem
       char *s;
 
       file_to_match = (char *) xmalloc (colon - text + 1);
-      strncpy (file_to_match, text, colon - text + 1);
+      strncpy (file_to_match, text, colon - text);
+      file_to_match[colon - text] = '\0';
       /* Remove trailing colons and quotes from the file name.  */
       for (s = file_to_match + (colon - text);
 	   s > file_to_match;
@@ -333,6 +350,184 @@ location_completer (struct cmd_list_elem
   return list;
 }
 
+/* A helper function to collect explicit location matches for the given
+   LOCATION, which is attempting to match on WORD.  */
+
+static VEC (char_ptr) *
+collect_explicit_location_matches (struct event_location *location,
+				   enum explicit_location_match_type what,
+				   const char *word)
+{
+  VEC (char_ptr) *matches = NULL;
+  const struct explicit_location *explicit_loc
+    = get_explicit_location (location);
+
+  switch (what)
+    {
+    case MATCH_SOURCE:
+      {
+	const char *text = (explicit_loc->source_filename == NULL
+			    ? "" : explicit_loc->source_filename);
+
+	matches = make_source_files_completion_list (text, word);
+      }
+      break;
+
+    case MATCH_FUNCTION:
+      {
+	const char *text = (explicit_loc->function_name == NULL
+			    ? "" : explicit_loc->function_name);
+
+	if (explicit_loc->source_filename != NULL)
+	  {
+	    const char *filename = explicit_loc->source_filename;
+
+	    matches = make_file_symbol_completion_list (text, word, filename);
+	  }
+	else
+	  matches = make_symbol_completion_list (text, word);
+      }
+      break;
+
+    case MATCH_LABEL:
+      /* Not supported.  */
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled explicit_location_match_type");
+    }
+
+  return matches;
+}
+
+/* A convenience macro to (safely) back up P to the previous word.  */
+
+static const char *
+backup_text_ptr (const char *p, const char *text)
+{
+  while (p > text && isspace (*p))
+    --p;
+  for (; p > text && !isspace (p[-1]); --p)
+    ;
+
+  return p;
+}
+
+/* A completer function for explicit locations.  This function
+   completes both options ("-source", "-line", etc) and values.  */
+
+static VEC (char_ptr) *
+explicit_location_completer (struct cmd_list_element *ignore,
+			     struct event_location *location,
+			     const char *text, const char *word)
+{
+  const char *p;
+  VEC (char_ptr) *matches = NULL;
+
+  /* Find the beginning of the word.  This is necessary because
+     we need to know if we are completing an option name or value.  We
+     don't get the leading '-' from the completer.  */
+  p = backup_text_ptr (word, text);
+
+  if (*p == '-')
+    {
+      /* Completing on option name.  */
+      static const char *const keywords[] =
+	{
+	  "source",
+	  "function",
+	  "line",
+	  "label",
+	  NULL
+	};
+
+      /* Skip over the '-'.  */
+      ++p;
+
+      return complete_on_enum (keywords, p, p);
+    }
+  else
+    {
+      /* Completing on value (or unknown).  Get the previous word to see what
+	 the user is completing on.  */
+      size_t len, offset;
+      const char *new_word, *end;
+      enum explicit_location_match_type what;
+      struct explicit_location *explicit_loc
+	= get_explicit_location (location);
+
+      /* Backup P to the previous word, which should be the option
+	 the user is attempting to complete.  */
+      offset = word - p;
+      end = --p;
+      p = backup_text_ptr (p, text);
+      len = end - p;
+
+      if (strncmp (p, "-source", len) == 0)
+	{
+	  what = MATCH_SOURCE;
+	  new_word = explicit_loc->source_filename + offset;
+	}
+      else if (strncmp (p, "-function", len) == 0)
+	{
+	  what = MATCH_FUNCTION;
+	  new_word = explicit_loc->function_name + offset;
+	}
+      else if (strncmp (p, "-label", len) == 0)
+	{
+	  what = MATCH_LABEL;
+	  new_word = explicit_loc->label_name + offset;
+	}
+      else
+	{
+	  /* The user isn't completing on any valid option name,
+	     e.g., "break -source foo.c [tab]".  */
+	  return NULL;
+	}
+
+      /* If the user hasn't entered a search expression, e.g.,
+	 "break -function <TAB><TAB>", new_word will be NULL, but
+	 search routines require non-NULL search words.  */
+      if (new_word == NULL)
+	new_word = "";
+
+      /* Now gather matches  */
+      matches = collect_explicit_location_matches (location, what, new_word);
+    }
+
+  return matches;
+}
+
+/* A completer for locations.  */
+
+VEC (char_ptr) *
+location_completer (struct cmd_list_element *ignore,
+		    const char *text, const char *word)
+{
+  VEC (char_ptr) *matches = NULL;
+  const char *copy = text;
+  struct event_location *location;
+
+  location = string_to_explicit_location (&copy, current_language, 1);
+  if (location != NULL)
+    {
+      struct cleanup *cleanup;
+
+      cleanup = make_cleanup_delete_event_location (location);
+      matches = explicit_location_completer (ignore, location, text, word);
+      do_cleanups (cleanup);
+    }
+  else
+    {
+      /* This is an address or linespec location.
+	 Right now both of these are handled by the (old) linespec
+	 completer.  */
+      matches = linespec_location_completer (ignore, text, word);
+    }
+
+  return matches;
+}
+
 /* Helper for expression_completer which recursively adds field and
    method names from TYPE, a struct or union type, to the array
    OUTPUT.  */
@@ -344,7 +539,7 @@ add_struct_fields (struct type *type, VE
   int computed_type_name = 0;
   const char *type_name = NULL;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   for (i = 0; i < TYPE_NFIELDS (type); ++i)
     {
       if (i < TYPE_N_BASECLASSES (type))
@@ -415,7 +610,7 @@ expression_completer (struct cmd_list_el
     {
       for (;;)
 	{
-	  CHECK_TYPEDEF (type);
+	  type = check_typedef (type);
 	  if (TYPE_CODE (type) != TYPE_CODE_PTR
 	      && TYPE_CODE (type) != TYPE_CODE_REF)
 	    break;
@@ -688,16 +883,6 @@ complete_line_internal (const char *text
 		      rl_completer_word_break_characters =
 			gdb_completer_file_name_break_characters;
 		    }
-		  else if (c->completer == location_completer)
-		    {
-		      /* Commands which complete on locations want to
-			 see the entire argument.  */
-		      for (p = word;
-			   p > tmp_command
-			     && p[-1] != ' ' && p[-1] != '\t';
-			   p--)
-			;
-		    }
 		  if (reason == handle_brkchars
 		      && c->completer_handle_brkchars != NULL)
 		    (*c->completer_handle_brkchars) (c, p, word);
@@ -766,14 +951,6 @@ complete_line_internal (const char *text
 		  rl_completer_word_break_characters =
 		    gdb_completer_file_name_break_characters;
 		}
-	      else if (c->completer == location_completer)
-		{
-		  for (p = word;
-		       p > tmp_command
-			 && p[-1] != ' ' && p[-1] != '\t';
-		       p--)
-		    ;
-		}
 	      if (reason == handle_brkchars
 		  && c->completer_handle_brkchars != NULL)
 		(*c->completer_handle_brkchars) (c, p, word);
@@ -809,7 +986,7 @@ new_completion_tracker (void)
 static void
 free_completion_tracker (void *p)
 {
-  completion_tracker_t *tracker_ptr = p;
+  completion_tracker_t *tracker_ptr = (completion_tracker_t *) p;
 
   htab_delete (*tracker_ptr);
   *tracker_ptr = NULL;
@@ -973,11 +1150,12 @@ signal_completer (struct cmd_list_elemen
 /* Bit-flags for selecting what the register and/or register-group
    completer should complete on.  */
 
-enum reg_completer_targets
+enum reg_completer_target
   {
     complete_register_names = 0x1,
     complete_reggroup_names = 0x2
   };
+DEF_ENUM_FLAGS_TYPE (enum reg_completer_target, reg_completer_targets);
 
 /* Complete register names and/or reggroup names based on the value passed
    in TARGETS.  At least one bit in TARGETS must be set.  */
@@ -985,7 +1163,7 @@ enum reg_completer_targets
 static VEC (char_ptr) *
 reg_or_group_completer_1 (struct cmd_list_element *ignore,
 			  const char *text, const char *word,
-			  enum reg_completer_targets targets)
+			  reg_completer_targets targets)
 {
   VEC (char_ptr) *result = NULL;
   size_t len = strlen (word);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/completer.h ./gdb/completer.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/completer.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/completer.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header for GDB line completion.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/aarch64/linux.mh ./gdb/config/aarch64/linux.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/aarch64/linux.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/aarch64/linux.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #  Host: AArch64 based machine running GNU/Linux
 #
-#  Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#  Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #  Contributed by ARM Ltd.
 #
 #  This file is part of GDB.
@@ -19,10 +19,11 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o aarch64-linux-nat.o \
+NATDEPFILES= inf-ptrace.o fork-child.o aarch64-linux-nat.o aarch32-linux-nat.o \
 	proc-service.o linux-thread-db.o linux-nat.o linux-fork.o \
 	linux-procfs.o linux-ptrace.o linux-osdata.o linux-waitpid.o \
-	linux-personality.o linux-namespaces.o
+	linux-personality.o linux-namespaces.o aarch64-linux-hw-point.o \
+	aarch64-linux.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 LOADLIBES= -ldl $(RDYNAMIC)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/alpha/fbsd.mh ./gdb/config/alpha/fbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/alpha/fbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/alpha/fbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Host: FreeBSD/alpha
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	fbsd-nat.o alphabsd-nat.o bsd-kvm.o \
+	fbsd-nat.o alpha-bsd-nat.o bsd-kvm.o \
 	core-regset.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/alpha/nbsd.mh ./gdb/config/alpha/nbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/alpha/nbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/alpha/nbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: NetBSD/alpha
-NATDEPFILES= fork-child.o inf-ptrace.o alphabsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o alpha-bsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/arm/linux.mh ./gdb/config/arm/linux.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/arm/linux.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/arm/linux.mh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= inf-ptrace.o fork-child.o arm-linux-nat.o \
-	proc-service.o linux-thread-db.o \
+	aarch32-linux-nat.o proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \
 	linux-waitpid.o linux-personality.o linux-namespaces.o
 NAT_CDEPS = $(srcdir)/proc-service.list
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/arm/nbsdelf.mh ./gdb/config/arm/nbsdelf.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/arm/nbsdelf.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/arm/nbsdelf.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o armnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o arm-nbsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/djcheck.sh ./gdb/config/djgpp/djcheck.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/djcheck.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/djgpp/djcheck.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # A shell script to run the test suite on the DJGPP version of GDB.
 
-#  Copyright (C) 2000-2015 Free Software Foundation, Inc.
+#  Copyright (C) 2000-2017 Free Software Foundation, Inc.
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/djconfig.sh ./gdb/config/djgpp/djconfig.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/djconfig.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/djgpp/djconfig.sh	2017-03-06 01:49:07.000000000 +0000
@@ -5,7 +5,7 @@
 # configuring other GNU programs for DJGPP.
 #
 #=====================================================================
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # Originally written by Robert Hoehne, revised by Eli Zaretskii.
 # This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/fnchange.lst ./gdb/config/djgpp/fnchange.lst
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/fnchange.lst	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/djgpp/fnchange.lst	2017-03-06 01:49:07.000000000 +0000
@@ -113,25 +113,27 @@
 @V@/gdb/ChangeLog-2012 @V@/gdb/ChangeLog.012
 @V@/gdb/ChangeLog-2013 @V@/gdb/ChangeLog.013
 @V@/gdb/ChangeLog-2014 @V@/gdb/ChangeLog.014
+@V@/gdb/ChangeLog-2015 @V@/gdb/ChangeLog.015
+@V@/gdb/ChangeLog-2016 @V@/gdb/ChangeLog.016
 @V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
 @V@/gdb/ada-exp.tab.c @V@/gdb/ada-exp_tab.c
 @V@/gdb/amd64-windows-nat.c @V@/gdb/a64w-nat.c
 @V@/gdb/amd64-windows-tdep.c @V@/gdb/a64w-tdep.c
-@V@/gdb/amd64fbsd-nat.c @V@/gdb/a64fb-nat.c
-@V@/gdb/amd64fbsd-tdep.c @V@/gdb/a64fb-tdep.c
-@V@/gdb/amd64nbsd-nat.c @V@/gdb/a64nb-nat.c
-@V@/gdb/amd64nbsd-tdep.c @V@/gdb/a64nb-tdep.c
-@V@/gdb/amd64obsd-nat.c @V@/gdb/a64ob-nat.c
-@V@/gdb/amd64obsd-tdep.c @V@/gdb/a64ob-tdep.c
-@V@/gdb/alphabsd-nat.c @V@/gdb/alphb-nat.c
-@V@/gdb/alphabsd-tdep.c @V@/gdb/alphb-tdep.c
-@V@/gdb/alphanbsd-tdep.c @V@/gdb/alphnb-tdep.c
+@V@/gdb/amd64-fbsd-nat.c @V@/gdb/a64fb-nat.c
+@V@/gdb/amd64-fbsd-tdep.c @V@/gdb/a64fb-tdep.c
+@V@/gdb/amd64-nbsd-nat.c @V@/gdb/a64nb-nat.c
+@V@/gdb/amd64-nbsd-tdep.c @V@/gdb/a64nb-tdep.c
+@V@/gdb/amd64-obsd-nat.c @V@/gdb/a64ob-nat.c
+@V@/gdb/amd64-obsd-tdep.c @V@/gdb/a64ob-tdep.c
+@V@/gdb/alpha-bsd-nat.c @V@/gdb/alphb-nat.c
+@V@/gdb/alpha-bsd-tdep.c @V@/gdb/alphb-tdep.c
+@V@/gdb/alpha-nbsd-tdep.c @V@/gdb/alphnb-tdep.c
 @V@/gdb/alpha-linux-nat.c @V@/gdb/alphl-nat.c
 @V@/gdb/alpha-linux-tdep.c @V@/gdb/alphl-tdep.c
 @V@/gdb/arm-linux-nat.c @V@/gdb/armlin-nat.c
 @V@/gdb/arm-linux-tdep.c @V@/gdb/armlin-tdep.c
-@V@/gdb/armnbsd-nat.c @V@/gdb/armnbd-nat.c
-@V@/gdb/armnbsd-tdep.c @V@/gdb/armnbd-tdep.c
+@V@/gdb/arm-nbsd-nat.c @V@/gdb/armnbd-nat.c
+@V@/gdb/arm-nbsd-tdep.c @V@/gdb/armnbd-tdep.c
 @V@/gdb/c-exp.tab.c @V@/gdb/c-exp_tab.c
 @V@/gdb/config/alpha/tm-alphalinux.h @V@/gdb/config/alpha/tm-alplinux.h
 @V@/gdb/config/i386/nm-cygwin64.h @V@/gdb/config/i386/nm-cyg64.h
@@ -275,23 +277,23 @@
 @V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
 @V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in @V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.t-in
 @V@/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in @V@/gdb/gdbtk/plugins/rhabout/rhabout.t-in
-@V@/gdb/hppabsd-nat.c @V@/gdb/hppab-nat.c
-@V@/gdb/hppabsd-tdep.c @V@/gdb/hppab-tdep.c
-@V@/gdb/hppnbsd-nat.c @V@/gdb/hppnb-nat.c
-@V@/gdb/hppnbsd-tdep.c @V@/gdb/hppnb-tdep.c
+@V@/gdb/hppa-bsd-nat.c @V@/gdb/hppab-nat.c
+@V@/gdb/hppa-bsd-tdep.c @V@/gdb/hppab-tdep.c
+@V@/gdb/hpp-nbsd-nat.c @V@/gdb/hppnb-nat.c
+@V@/gdb/hpp-nbsd-tdep.c @V@/gdb/hppnb-tdep.c
 @V@/gdb/i386-darwin-nat.c @V@/gdb/i386dw-nat.c
 @V@/gdb/i386-darwin-tdep.c @V@/gdb/i386dw-tdep.c
 @V@/gdb/i386-linux-tdep.c @V@/gdb/i386lx-tdep.c
 @V@/gdb/i386-linux-nat.c @V@/gdb/i386lx-nat.c
-@V@/gdb/i386bsd-nat.c @V@/gdb/i3bsd-nat.c
-@V@/gdb/i386bsd-tdep.c @V@/gdb/i3bsd-tdep.c
-@V@/gdb/i386fbsd-nat.c @V@/gdb/i3fbsd-nat.c
-@V@/gdb/i386fbsd-tdep.c @V@/gdb/i3fbsd-tdep.c
-@V@/gdb/i386gnu-nat.c @V@/gdb/i3gnu-nat.c
-@V@/gdb/i386gnu-tdep.c @V@/gdb/i3gnu-tdep.c
-@V@/gdb/i386nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
-@V@/gdb/i386obsd-nat.c @V@/gdb/i3obsd-nat.c
-@V@/gdb/i386obsd-tdep.c @V@/gdb/i3obsd-tdep.c
+@V@/gdb/i386-bsd-nat.c @V@/gdb/i3bsd-nat.c
+@V@/gdb/i386-bsd-tdep.c @V@/gdb/i3bsd-tdep.c
+@V@/gdb/i386-fbsd-nat.c @V@/gdb/i3fbsd-nat.c
+@V@/gdb/i386-fbsd-tdep.c @V@/gdb/i3fbsd-tdep.c
+@V@/gdb/i386-gnu-nat.c @V@/gdb/i3gnu-nat.c
+@V@/gdb/i386-gnu-tdep.c @V@/gdb/i3gnu-tdep.c
+@V@/gdb/i386-nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
+@V@/gdb/i386-obsd-nat.c @V@/gdb/i3obsd-nat.c
+@V@/gdb/i386-obsd-tdep.c @V@/gdb/i3obsd-tdep.c
 @V@/gdb/i386-sol2-nat.c @V@/gdb/i3sol2-nat.c
 @V@/gdb/i386-sol2-tdep.c @V@/gdb/i3sol2-tdep.c
 @V@/gdb/ia64-aix-nat.c @V@/gdb/ia64ax-nat.c
@@ -302,33 +304,33 @@
 @V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
 @V@/gdb/m32r-linux-nat.c @V@/gdb/m32rlnxnat.c
 @V@/gdb/m32r-linux-tdep.c @V@/gdb/m32rlnxtdep.c
-@V@/gdb/m68klinux-nat.c @V@/gdb/m68kl-nat.c
-@V@/gdb/m68klinux-tdep.c @V@/gdb/m68kl-tdep.c
-@V@/gdb/m68kbsd-nat.c @V@/gdb/m68bsd-nat.c
-@V@/gdb/m68kbsd-tdep.c @V@/gdb/m68bsd-tdep.c
-@V@/gdb/m68knbsd-nat.c @V@/gdb/m6nbsd-nat.c
-@V@/gdb/m68knbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
+@V@/gdb/m68k-linux-nat.c @V@/gdb/m68kl-nat.c
+@V@/gdb/m68k-linux-tdep.c @V@/gdb/m68kl-tdep.c
+@V@/gdb/m68k-bsd-nat.c @V@/gdb/m68bsd-nat.c
+@V@/gdb/m68k-bsd-tdep.c @V@/gdb/m68bsd-tdep.c
+@V@/gdb/m68k-nbsd-nat.c @V@/gdb/m6nbsd-nat.c
+@V@/gdb/m68k-nbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
 @V@/gdb/microblaze-rom.c @V@/gdb/mb-rom.c
 @V@/gdb/microblaze-linux-tdep.c @V@/gdb/mbl-tdep.c
 @V@/gdb/microblaze-tdep.h @V@/gdb/mb-tdep.h
 @V@/gdb/microblaze-tdep.c @V@/gdb/mb-tdep.c
 @V@/gdb/mips-linux-nat.c @V@/gdb/mipslnxnat.c
 @V@/gdb/mips-linux-tdep.c @V@/gdb/mipslnxtdep.c
-@V@/gdb/mipsnbsd-nat.c @V@/gdb/mipsnbnat.c
-@V@/gdb/mipsnbsd-tdep.c @V@/gdb/mipsnbtdep.c
-@V@/gdb/mips64obsd-nat.c @V@/gdb/mipsobnat.c
-@V@/gdb/mips64obsd-tdep.c @V@/gdb/mipsobtdep.c
+@V@/gdb/mips-nbsd-nat.c @V@/gdb/mipsnbnat.c
+@V@/gdb/mips-nbsd-tdep.c @V@/gdb/mipsnbtdep.c
+@V@/gdb/mips64-obsd-nat.c @V@/gdb/mipsobnat.c
+@V@/gdb/mips64-obsd-tdep.c @V@/gdb/mipsobtdep.c
 @V@/gdb/mn10300-linux-tdep.c @V@/gdb/mn10300linux-tdep.c
-@V@/gdb/ns32knbsd-nat.c @V@/gdb/ns32nb-nat.c
-@V@/gdb/ns32knbsd-tdep.c @V@/gdb/ns32nb-tdep.c
+@V@/gdb/ns32k-nbsd-nat.c @V@/gdb/ns32nb-nat.c
+@V@/gdb/ns32k-nbsd-tdep.c @V@/gdb/ns32nb-tdep.c
 @V@/gdb/objc-exp.tab.c @V@/gdb/objc-exp_tab.c
 @V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
 @V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-lx-tdep.c
 @V@/gdb/ppc-linux-nat.c @V@/gdb/ppc-lx-nat.c
-@V@/gdb/ppcnbsd-nat.c @V@/gdb/ppcnb-nat.c
-@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-tdep.c
-@V@/gdb/ppcobsd-nat.c @V@/gdb/ppcob-nat.c
-@V@/gdb/ppcobsd-tdep.c @V@/gdb/ppcob-tdep.c
+@V@/gdb/ppc-nbsd-nat.c @V@/gdb/ppcnb-nat.c
+@V@/gdb/ppc-nbsd-tdep.c @V@/gdb/ppcnb-tdep.c
+@V@/gdb/ppc-obsd-nat.c @V@/gdb/ppcob-nat.c
+@V@/gdb/ppc-obsd-tdep.c @V@/gdb/ppcob-tdep.c
 @V@/gdb/regformats/arm-with-vfpv2.dat @V@/gdb/regformats/arm-wv2.dat
 @V@/gdb/regformats/arm-with-vfpv3.dat @V@/gdb/regformats/arm-wv3.dat
 @V@/gdb/regformats/arm-with-iwmmxt.dat @V@/gdb/regformats/arm-iwmmxt.dat
@@ -372,17 +374,17 @@
 @V@/gdb/remote-vx68.c @V@/gdb/rmt-vx68.c
 @V@/gdb/remote-vxmips.c @V@/gdb/rmt-vxmips.c
 @V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
-@V@/gdb/sparc64fbsd-nat.c @V@/gdb/sp64fb-nat.c
-@V@/gdb/sparc64fbsd-tdep.c @V@/gdb/sp64fb-tdep.c
-@V@/gdb/sparc64nbsd-nat.c @V@/gdb/sp64nb-nat.c
-@V@/gdb/sparc64nbsd-tdep.c @V@/gdb/sp64nb-tdep.c
+@V@/gdb/sparc64-fbsd-nat.c @V@/gdb/sp64fb-nat.c
+@V@/gdb/sparc64-fbsd-tdep.c @V@/gdb/sp64fb-tdep.c
+@V@/gdb/sparc64-nbsd-nat.c @V@/gdb/sp64nb-nat.c
+@V@/gdb/sparc64-nbsd-tdep.c @V@/gdb/sp64nb-tdep.c
 @V@/gdb/sparc64-linux-nat.c @V@/gdb/sp64lx-nat.c
 @V@/gdb/sparc64-linux-tdep.c @V@/gdb/sp64lx-tdep.c
 @V@/gdb/sparc64-nat.c @V@/gdb/sp64-nat.c
 @V@/gdb/sparc64-tdep.c @V@/gdb/sp64-tdep.c
 @V@/gdb/sparc64-sol2-tdep.c @V@/gdb/sp64s2-tdep.c
-@V@/gdb/sparcnbsd-nat.c @V@/gdb/spnb-nat.c
-@V@/gdb/sparcnbsd-tdep.c @V@/gdb/spnb-tdep.c
+@V@/gdb/sparc-nbsd-nat.c @V@/gdb/spnb-nat.c
+@V@/gdb/sparc-nbsd-tdep.c @V@/gdb/spnb-tdep.c
 @V@/gdb/sparc-linux-nat.c @V@/gdb/splx-nat.c
 @V@/gdb/sparc-linux-tdep.c @V@/gdb/splx-tdep.c
 @V@/gdb/sparc-sol2-nat.c @V@/gdb/spsol2-nat.c
@@ -406,6 +408,8 @@
 @V@/gdb/testsuite/gdb.base/bitfields2.c @V@/gdb/testsuite/gdb.base/bitfiel2.c
 @V@/gdb/testsuite/gdb.base/bitfields2.exp @V@/gdb/testsuite/gdb.base/bitfiel2.exp
 @V@/gdb/testsuite/gdb.base/break-entry.exp @V@/gdb/testsuite/gdb.base/brkentry.exp
+@V@/gdb/testsuite/gdb.base/break-fun-addr1.c @V@/gdb/testsuite/gdb.base/b-f-a1.c
+@V@/gdb/testsuite/gdb.base/break-fun-addr2.c @V@/gdb/testsuite/gdb.base/b-f-a2.c
 @V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
 @V@/gdb/testsuite/gdb.base/hashline1.exp @V@/gdb/testsuite/gdb.base/hash1line.exp
 @V@/gdb/testsuite/gdb.base/hashline2.exp @V@/gdb/testsuite/gdb.base/hash2line.exp
@@ -510,8 +514,8 @@
 @V@/gdb/amd64-linux-nat.c @V@/gdb/amd64-lnat.c
 @V@/gdb/hppa-linux-tdep.c @V@/gdb/palnxtdep.c
 @V@/gdb/hppa-linux-nat.c @V@/gdb/palnxnat.c
-@V@/gdb/hppanbsd-nat.c @V@/gdb/panbsd-nat.c
-@V@/gdb/hppanbsd-tdep.c @V@/gdb/panbsd-tdep.c
+@V@/gdb/hppa-nbsd-nat.c @V@/gdb/panbsd-nat.c
+@V@/gdb/hppa-nbsd-tdep.c @V@/gdb/panbsd-tdep.c
 @V@/gdb/amd64-windows-nat.c @V@/gdb/amd64-wnat.c
 @V@/gdb/amd64-windows-tdep.c @V@/gdb/amd64-wtdep.c
 @V@/gdb/i386-windows-nat.c @V@/gdb/i386-wnat.c
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/langinfo.h ./gdb/config/djgpp/langinfo.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/langinfo.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/djgpp/langinfo.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* langinfo.h file for DJGPP.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Written by Eli Zaretskii.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/nl_types.h ./gdb/config/djgpp/nl_types.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/djgpp/nl_types.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/djgpp/nl_types.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* nl_types.h for DJGPP.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Written by Eli Zaretskii.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/cygwin64.mh ./gdb/config/i386/cygwin64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/cygwin64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/cygwin64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #  Native config information for GDB on PowerPC systems running FreeBSD.
 #
-#  Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#  Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #
 #  This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/fbsd64.mh ./gdb/config/i386/fbsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/fbsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/fbsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 # Host: FreeBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	fbsd-nat.o amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o \
-	bsd-kvm.o x86-nat.o x86-dregs.o
+	fbsd-nat.o amd64-nat.o amd64-bsd-nat.o amd64-fbsd-nat.o \
+	bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o
 HAVE_NATIVE_GCORE_HOST = 1
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/fbsd.mh ./gdb/config/i386/fbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/fbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/fbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 # Host: FreeBSD/i386
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	fbsd-nat.o x86-nat.o x86-dregs.o i386bsd-nat.o i386fbsd-nat.o \
-	bsd-kvm.o
+	fbsd-nat.o x86-nat.o x86-dregs.o x86-bsd-nat.o i386-bsd-nat.o \
+	i386-fbsd-nat.o bsd-kvm.o
 NAT_FILE= nm-fbsd.h
 HAVE_NATIVE_GCORE_HOST = 1
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/i386gnu.mh ./gdb/config/i386/i386gnu.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/i386gnu.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/i386gnu.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: Intel 386 running the GNU Hurd
-NATDEPFILES= i386gnu-nat.o gnu-nat.o \
+NATDEPFILES= i386-gnu-nat.o gnu-nat.o \
 	     x86-nat.o x86-dregs.o fork-child.o \
 	     notify_S.o process_reply_S.o msg_reply_S.o \
 	     msg_U.o exc_request_U.o exc_request_S.o
@@ -32,6 +32,9 @@ MIGCOM = $(MIG) -cc cat - /dev/null
 	$(CPP) $(CPPFLAGS) $($*-MIGUFLAGS) -x c $< \
 	| $(MIGCOM) -sheader /dev/null -server /dev/null -user $*_U.c -header $*_U.h
 
+# MIG stubs are not yet ready for C++ compilation.
+%_S.o %_U.o : COMPILE.post += -x c
+
 NAT_GENERATED_FILES = notify_S.h notify_S.c \
 	process_reply_S.h process_reply_S.c \
 	msg_reply_S.h msg_reply_S.c msg_U.h msg_U.c \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/i386sol2.mh ./gdb/config/i386/i386sol2.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/i386sol2.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/i386sol2.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: Solaris x86
-NATDEPFILES= fork-child.o i386v4-nat.o i386-sol2-nat.o \
+NATDEPFILES= fork-child.o i386-v4-nat.o i386-sol2-nat.o \
 	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
 HAVE_NATIVE_GCORE_HOST = 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/linux64.mh ./gdb/config/i386/linux64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/linux64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/linux64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -6,7 +6,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
 	proc-service.o linux-thread-db.o linux-fork.o \
 	linux-procfs.o linux-ptrace.o linux-btrace.o \
 	linux-waitpid.o linux-personality.o x86-linux.o \
-	x86-linux-dregs.o linux-namespaces.o
+	x86-linux-dregs.o amd64-linux-siginfo.o linux-namespaces.o
 NAT_FILE= config/nm-linux.h
 NAT_CDEPS = $(srcdir)/proc-service.list
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nbsd64.mh ./gdb/config/i386/nbsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nbsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/nbsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,3 @@
 # Host: NetBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	nbsd-nat.o amd64-nat.o amd64bsd-nat.o amd64nbsd-nat.o
+	nbsd-nat.o amd64-nat.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nbsdelf.mh ./gdb/config/i386/nbsdelf.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nbsdelf.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/nbsdelf.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: NetBSD/i386 ELF
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	nbsd-nat.o i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o
+	nbsd-nat.o x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nm-fbsd.h ./gdb/config/i386/nm-fbsd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nm-fbsd.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/nm-fbsd.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent definitions for FreeBSD/i386.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nm-i386gnu.h ./gdb/config/i386/nm-i386gnu.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/nm-i386gnu.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/nm-i386gnu.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Native-dependent definitions for Intel 386 running the GNU Hurd
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/obsd64.mh ./gdb/config/i386/obsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/obsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/obsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: OpenBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o \
-	amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o bsd-kvm.o
+	amd64-nat.o x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/obsd.mh ./gdb/config/i386/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: OpenBSD/i386 ELF
 NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o \
-	i386bsd-nat.o i386obsd-nat.o bsd-kvm.o
+	x86-bsd-nat.o i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/sol2-64.mh ./gdb/config/i386/sol2-64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/i386/sol2-64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/i386/sol2-64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: Solaris x86_64
-NATDEPFILES= fork-child.o amd64-nat.o i386v4-nat.o i386-sol2-nat.o \
+NATDEPFILES= fork-child.o amd64-nat.o i386-v4-nat.o i386-sol2-nat.o \
 	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
 HAVE_NATIVE_GCORE_HOST = 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/linux.mh ./gdb/config/m68k/linux.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/linux.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/m68k/linux.mh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= inf-ptrace.o fork-child.o \
-	m68klinux-nat.o \
+	m68k-linux-nat.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \
 	linux-personality.o \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/nbsdelf.mh ./gdb/config/m68k/nbsdelf.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/nbsdelf.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/m68k/nbsdelf.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: NetBSD/m68k ELF
-NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
+NATDEPFILES= m68k-bsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/obsd.mh ./gdb/config/m68k/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m68k/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/m68k/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: OpenBSD/m68k
-NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
+NATDEPFILES= m68k-bsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m88k/obsd.mh ./gdb/config/m88k/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/m88k/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/m88k/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: OpenBSD/m88k
-NATDEPFILES= fork-child.o inf-ptrace.o m88kbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o m88k-bsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/fbsd.mh ./gdb/config/mips/fbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/fbsd.mh	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/config/mips/fbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,3 @@
+# Host: FreeBSD/mips
+NATDEPFILES= fork-child.o inf-ptrace.o fbsd-nat.o mips-fbsd-nat.o
+HAVE_NATIVE_GCORE_HOST = 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/nbsd.mh ./gdb/config/mips/nbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/nbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/mips/nbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: NetBSD/mips
-NATDEPFILES= fork-child.o inf-ptrace.o mipsnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o mips-nbsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/obsd64.mh ./gdb/config/mips/obsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/mips/obsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/mips/obsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: OpenBSD/mips64
-NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o mips64obsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o mips64-obsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/nm-linux.h ./gdb/config/nm-linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/nm-linux.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/nm-linux.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native support for GNU/Linux.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/nm-nto.h ./gdb/config/nm-nto.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/nm-nto.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/nm-nto.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native support for QNX Neutrino version 6.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This code was donated by QNX Software Systems Ltd.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/pa/nbsd.mh ./gdb/config/pa/nbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/pa/nbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/pa/nbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: NetBSD/hppa
-NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o hppanbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o hppa-nbsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/pa/obsd.mh ./gdb/config/pa/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/pa/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/pa/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: OpenBSD/hppa
-NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o hppaobsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o hppa-obsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/fbsd.mh ./gdb/config/powerpc/fbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/fbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/powerpc/fbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #  Native config information for GDB on PowerPC systems running FreeBSD.
 #
-#  Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#  Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #
 #  This file is part of GDB.
 #
@@ -17,7 +17,7 @@
 #  You should have received a copy of the GNU General Public License
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-NATDEPFILES= fbsd-nat.o fork-child.o inf-ptrace.o ppcfbsd-nat.o bsd-kvm.o
+NATDEPFILES= fbsd-nat.o fork-child.o inf-ptrace.o ppc-fbsd-nat.o bsd-kvm.o
 HAVE_NATIVE_GCORE_HOST = 1
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/nbsd.mh ./gdb/config/powerpc/nbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/nbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/powerpc/nbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: NetBSD/powerpc
-NATDEPFILES= fork-child.o inf-ptrace.o ppcnbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o ppc-nbsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/obsd.mh ./gdb/config/powerpc/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/powerpc/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/powerpc/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
 # Host: OpenBSD/powerpc
-NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o ppcobsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o ppc-obsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sh/nbsd.mh ./gdb/config/sh/nbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sh/nbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sh/nbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,2 +1,2 @@
 # Host: NetBSD/sh
-NATDEPFILES= fork-child.o inf-ptrace.o shnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o sh-nbsd-nat.o
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/fbsd.mh ./gdb/config/sparc/fbsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/fbsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sparc/fbsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Host: FreeBSD/sparc64
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	fbsd-nat.o sparc-nat.o sparc64-nat.o sparc64fbsd-nat.o \
+	fbsd-nat.o sparc-nat.o sparc64-nat.o sparc64-fbsd-nat.o \
 	bsd-kvm.o
 HAVE_NATIVE_GCORE_HOST = 1
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nbsd64.mh ./gdb/config/sparc/nbsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nbsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sparc/nbsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: NetBSD/sparc64
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	sparc64nbsd-nat.o sparc-nat.o bsd-kvm.o
+	sparc64-nbsd-nat.o sparc-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nbsdelf.mh ./gdb/config/sparc/nbsdelf.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nbsdelf.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sparc/nbsdelf.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: NetBSD/sparc ELF
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	sparc-nat.o sparcnbsd-nat.o bsd-kvm.o
+	sparc-nat.o sparc-nbsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nm-sol2.h ./gdb/config/sparc/nm-sol2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/nm-sol2.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sparc/nm-sol2.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent definitions for Solaris SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/obsd64.mh ./gdb/config/sparc/obsd64.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/sparc/obsd64.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/sparc/obsd64.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: OpenBSD/sparc64
 NATDEPFILES= fork-child.o inf-ptrace.o obsd-nat.o \
-	sparc64obsd-nat.o sparc-nat.o bsd-kvm.o
+	sparc64-obsd-nat.o sparc-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/vax/nbsdelf.mh ./gdb/config/vax/nbsdelf.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/vax/nbsdelf.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/vax/nbsdelf.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: NetBSD/vax ELF
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	vaxbsd-nat.o bsd-kvm.o
+	vax-bsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/vax/obsd.mh ./gdb/config/vax/obsd.mh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config/vax/obsd.mh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config/vax/obsd.mh	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Host: OpenBSD/vax
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	vaxbsd-nat.o bsd-kvm.o
+	vax-bsd-nat.o bsd-kvm.o
 
 LOADLIBES= -lkvm
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config.in ./gdb/config.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/config.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/config.in	2017-03-06 01:49:07.000000000 +0000
@@ -65,6 +65,9 @@
 /* Define to the default OS ABI for this configuration. */
 #undef GDB_OSABI_DEFAULT
 
+/* Define if self-testing features should be enabled */
+#undef GDB_SELF_TEST
+
 /* Define to 1 if you have `alloca', as a function or macro. */
 #undef HAVE_ALLOCA
 
@@ -81,6 +84,9 @@
 /* Define to 1 if you have the <curses.h> header file. */
 #undef HAVE_CURSES_H
 
+/* define if the compiler supports basic C++11 syntax */
+#undef HAVE_CXX11
+
 /* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
    you don't. */
 #undef HAVE_DECL_ADDR_NO_RANDOMIZE
@@ -450,6 +456,12 @@
 /* Define to 1 if your system has struct lwp. */
 #undef HAVE_STRUCT_LWP
 
+/* Define to 1 if `struct ptrace_lwpinfo' is a member of `pl_syscall_code'. */
+#undef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
+
+/* Define to 1 if `struct ptrace_lwpinfo' is a member of `pl_tdname'. */
+#undef HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME
+
 /* Define to 1 if your system has struct reg in <machine/reg.h>. */
 #undef HAVE_STRUCT_REG
 
@@ -549,9 +561,6 @@
 /* Define if using Solaris thread debugging. */
 #undef HAVE_THREAD_DB_LIB
 
-/* Define if you support the tkill syscall. */
-#undef HAVE_TKILL_SYSCALL
-
 /* Define to 1 if you have the `ttrace' function. */
 #undef HAVE_TTRACE
 
@@ -653,6 +662,9 @@
    assorted other type changes. */
 #undef PROC_SERVICE_IS_OLD
 
+/* Define to the type of arg 1 for ptrace. */
+#undef PTRACE_TYPE_ARG1
+
 /* Define to the type of arg 3 for ptrace. */
 #undef PTRACE_TYPE_ARG3
 
@@ -674,9 +686,6 @@
 /* Bug reporting address */
 #undef REPORT_BUGS_TO
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
 /* Define to 1 if the "%Lg" format works to scan long doubles. */
 #undef SCANF_HAS_LONG_DOUBLE
 
@@ -761,6 +770,9 @@
    when building for Cygwin. */
 #undef USE_WIN32API
 
+/* Define if the PPC simulator is being linked in. */
+#undef WITH_PPC_SIM
+
 /* Define if --with-python provides a path, either directly or via
    python-config.py --exec-prefix. */
 #undef WITH_PYTHON_PATH
@@ -783,10 +795,6 @@
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
-/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works around a
-   <sys/proc.h> problem on IRIX 5. */
-#undef _KMEMUSER
-
 /* Define for large files, on AIX-style hosts. */
 #undef _LARGE_FILES
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure ./gdb/configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/configure	2017-03-06 01:49:07.000000000 +0000
@@ -593,6 +593,7 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 GCORE_TRANSFORM_NAME
 GDB_TRANSFORM_NAME
+XSLTPROC
 GDB_NM_FILE
 LTLIBBABELTRACE
 LIBBABELTRACE
@@ -683,6 +684,8 @@ READLINE_TEXI_INCFLAG
 READLINE_CFLAGS
 READLINE_DEPS
 READLINE
+LTLIBICONV
+LIBICONV
 zlibinc
 zlibdir
 MIG
@@ -722,14 +725,11 @@ INCINTL
 LIBINTL_DEP
 LIBINTL
 USE_NLS
-SET_MAKE
-GMAKE_FALSE
-GMAKE_TRUE
-MAKE
 CCDEPMODE
 DEPDIR
 am__leading_dot
-COMPILER
+CXX_DIALECT
+HAVE_CXX11
 INSTALL_STRIP_PROGRAM
 STRIP
 install_sh
@@ -805,7 +805,6 @@ enable_option_checking
 enable_maintainer_mode
 enable_plugins
 enable_largefile
-enable_build_with_cxx
 with_separate_debug_dir
 with_gdb_datadir
 with_relocated_sources
@@ -823,13 +822,13 @@ enable_profiling
 with_pkgversion
 with_bugurl
 with_system_zlib
+with_gnu_ld
+enable_rpath
 with_libiconv_prefix
 with_iconv_bin
 with_system_readline
 with_jit_reader_dir
 with_expat
-with_gnu_ld
-enable_rpath
 with_libexpat_prefix
 with_python
 with_guile
@@ -1499,7 +1498,6 @@ Optional Features:
 			  (and sometimes confusing) to the casual installer
   --enable-plugins        Enable support for plugins
   --disable-largefile     omit support for large files
-  --enable-build-with-cxx build with C++ compiler instead of C compiler
   --enable-targets=TARGETS
                           alternative target configurations
   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
@@ -1544,21 +1542,21 @@ Optional Packages:
   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
   --with-bugurl=URL       Direct users to URL to report a bug
   --with-system-zlib      use installed libz
-  --with-libiconv-prefix=DIR
-                          search for libiconv in DIR/include and DIR/lib
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-iconv-bin=PATH   specify where to find the iconv program
   --with-system-readline  use installed readline library
   --with-jit-reader-dir=PATH
                           directory to load the JIT readers from
   --with-expat            include expat support (auto/yes/no)
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
   --with-python[=PYTHON]  include python support
                           (auto/yes/no/<python-program>)
   --with-guile[=GUILE]    include guile support
                           (auto/yes/no/<guile-version>/<pkg-config-program>)
-  --with-intel-pt         include Intel(R) Processor Trace support (auto/yes/no)
+  --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
   --without-libipt-prefix     don't search for libipt in includedir and libdir
   --without-included-regex
@@ -4951,2175 +4949,3570 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 
-# See if we are building with C++, and substitute COMPILER.
+# We require a C++11 compiler.  Check if one is available, and if
+# necessary, set CXX_DIALECT to some -std=xxx switch.
 
-  # Check whether --enable-build-with-cxx was given.
-if test "${enable_build_with_cxx+set}" = set; then :
-  enableval=$enable_build_with_cxx; case $enableval in
-      yes | no)
-	  ;;
-      *)
-	  as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
-    esac
+      ax_cxx_compile_cxx11_required=true
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  CXX_DIALECT=""
+  ac_success=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
+if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  enable_build_with_cxx=no
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-  if test "$enable_build_with_cxx" = "yes"; then
-    # We're using -fpermissive as shortcut for now.
-    COMPILER='$(CXX) -fpermissive'
-   else
-    COMPILER='$(CC)'
-  fi
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
 
+#ifndef __cplusplus
 
+#error "This is not a C++ compiler"
 
-# Dependency checking.
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
+#elif __cplusplus < 201103L
 
-DEPDIR="${am__leading_dot}deps"
+#error "This is not a C++11 compiler"
 
-ac_config_commands="$ac_config_commands depdir"
+#else
 
+namespace cxx11
+{
 
-depcc="$CC"   am_compiler_list=
+  namespace test_static_assert
+  {
 
-am_depcomp=$ac_aux_dir/depcomp
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    if test $depmode = none; then break; fi
+  }
 
-    $as_echo "$as_me:$LINENO: trying $depmode" >&5
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "include sub/conftest.Po" > confmf
+  namespace test_final_override
+  {
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    depcmd="depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
-    echo "| $depcmd" | sed -e 's/  */ /g' >&5
-    if env $depcmd > conftest.err 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
-       ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-	$as_echo "$as_me:$LINENO: success" >&5
-        break
-      fi
-    fi
-    $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
-    sed -e 's/^/| /' < conftest.err >&5
-  done
+    struct Base
+    {
+      virtual void f() {}
+    };
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
-then as_fn_error "no usable dependency style found" "$LINENO" 5
-else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+  }
 
-fi
+  namespace test_double_right_angle_brackets
+  {
 
+    template < typename T >
+    struct check {};
 
-# Check for the 'make' the user wants to use.
-for ac_prog in make
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MAKE"; then
-  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_MAKE="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
-fi
-fi
-MAKE=$ac_cv_prog_MAKE
-if test -n "$MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-$as_echo "$MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  }
 
+  namespace test_decltype
+  {
 
-  test -n "$MAKE" && break
-done
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
- if test "$MAKE_IS_GNU" = yes; then
-  GMAKE_TRUE=
-  GMAKE_FALSE='#'
-else
-  GMAKE_TRUE='#'
-  GMAKE_FALSE=
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
+  }
 
+  namespace test_type_deduction
+  {
 
-gnulib_extra_configure_args=
-# If large-file support is disabled, make sure gnulib does the same.
-if test "$enable_largefile" = no; then
-gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
-fi
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
-# Configure gnulib.  We need to build gnulib under some other
-# directory not "gnulib", to avoid the problem of both GDB and
-# GDBserver wanting to build it in the same directory, when building
-# in the source dir.
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
-  in_src="gnulib"
-  in_build="build-gnulib"
-  in_extra_args="$gnulib_extra_configure_args"
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
-  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
-  # so they do not pile up.
-  ac_sub_configure_args=
-  ac_prev=
-  eval "set x $ac_configure_args"
-  shift
-  for ac_arg
-  do
-    if test -n "$ac_prev"; then
-      ac_prev=
-      continue
-    fi
-    case $ac_arg in
-    -cache-file | --cache-file | --cache-fil | --cache-fi \
-    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-      ac_prev=cache_file ;;
-    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
-    | --c=*)
-      ;;
-    --config-cache | -C)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      ac_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-      ac_prev=prefix ;;
-    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-      ;;
-    --disable-option-checking)
-      ;;
-    *)
-      case $ac_arg in
-      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-      esac
-      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
-    esac
-  done
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
 
-  # Always prepend --prefix to ensure using the same prefix
-  # in subdir configurations.
-  ac_arg="--prefix=$prefix"
-  case $ac_arg in
-  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+  }
 
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
+  namespace test_noexcept
+  {
 
-  # Always prepend --disable-option-checking to silence warnings, since
-  # different subdirs can have different --enable and --with options.
-  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+    int f() { return 0; }
+    int g() noexcept { return 0; }
 
-  ac_popdir=`pwd`
-  ac_dir=$in_build
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
 
-  ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-  $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
-  $as_echo "$ac_msg" >&6
-  as_dir="$ac_dir"; as_fn_mkdir_p
+  }
 
-  case $srcdir in
-  [\\/]* | ?:[\\/]* )
-    ac_srcdir=$srcdir/$in_src ;;
-  *) # Relative name.
-    ac_srcdir=../$srcdir/$in_src ;;
-  esac
+  namespace test_constexpr
+  {
 
-  cd "$ac_dir"
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
 
-  ac_sub_configure=$ac_srcdir/configure
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
 
-  # Make the cache file name correct relative to the subdirectory.
-  case $cache_file in
-  [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-  *) # Relative name.
-    ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-  esac
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
 
-  if test -n "$in_extra_args"; then
-    # Add the extra args at the end.
-    ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
-  fi
+  }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
-  # The eval makes quoting arguments work.
-  eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-       --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-    as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+  namespace test_rvalue_references
+  {
 
-  cd "$ac_popdir"
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
 
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
 
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
 
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
+  }
 
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
+  namespace test_uniform_initialization
+  {
 
-# If we haven't got the data from the intl directory,
-# assume NLS is disabled.
-USE_NLS=no
-LIBINTL=
-LIBINTL_DEP=
-INCINTL=
-XGETTEXT=
-GMSGFMT=
-POSUB=
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
 
-if test -f  ../intl/config.intl; then
-  .  ../intl/config.intl
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
-$as_echo_n "checking whether NLS is requested... " >&6; }
-if test x"$USE_NLS" != xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
 
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+  }
 
+  namespace test_lambdas
+  {
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-  # Look for .po and .gmo files in the source directory.
-  CATALOGS=
-  XLINGUAS=
-  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
-    # If there aren't any .gmo files the shell will give us the
-    # literal string "../path/to/srcdir/po/*.gmo" which has to be
-    # weeded out.
-    case "$cat" in *\**)
-      continue;;
-    esac
-    # The quadruple backslash is collapsed to a double backslash
-    # by the backticks, then collapsed again by the double quotes,
-    # leaving us with one backslash in the sed expression (right
-    # before the dot that mustn't act as a wildcard).
-    cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
-    lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
-    # The user is allowed to set LINGUAS to a list of languages to
-    # install catalogs for.  If it's empty that means "all of them."
-    if test "x$LINGUAS" = x; then
-      CATALOGS="$CATALOGS $cat"
-      XLINGUAS="$XLINGUAS $lang"
-    else
-      case "$LINGUAS" in *$lang*)
-        CATALOGS="$CATALOGS $cat"
-        XLINGUAS="$XLINGUAS $lang"
-        ;;
-      esac
-    fi
-  done
-  LINGUAS="$XLINGUAS"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
 
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
 
-    DATADIRNAME=share
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
 
-  INSTOBJEXT=.mo
+  }
 
-  GENCAT=gencat
+  namespace test_variadic_templates
+  {
 
-  CATOBJEXT=.gmo
+    template <int...>
+    struct sum;
 
-fi
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
 
-localedir='${datadir}/locale'
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
 
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
 
-if test x"$USE_NLS" = xyes; then
-   CONFIG_ALL="$CONFIG_ALL all-po"
-   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
-   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
-   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
-fi
+  }
 
-GNULIB=build-gnulib/import
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
 
-# For Makefile dependencies.
-GNULIB_STDINT_H=
-if test x"$STDINT_H" != x; then
-  GNULIB_STDINT_H=$GNULIB/$STDINT_H
-fi
+    struct foo {};
 
+    template<typename T>
+    using member = typename T::member_type;
 
-PACKAGE=gdb
+    template<typename T>
+    void func(...) {}
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+    template<typename T>
+    void func(member<T>*) {}
 
+    void test();
 
+    void test() { func<foo>(0); }
 
-# We never need to detect it in this sub-configure.
-# But preserve it for config.status --recheck.
+  }
 
+}  // namespace cxx11
 
+#endif  // __cplusplus >= 201103L
 
-MAKEINFO_EXTRA_FLAGS=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
-$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
-if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx11=yes
 else
-  echo '@clicksequence{a @click{} b}' >conftest.texinfo
-  if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
-    gdb_cv_have_makeinfo_click=yes
-  else
-    gdb_cv_have_makeinfo_click=no
-  fi
+  ax_cv_cxx_compile_cxx11=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
-$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
-if test x"$gdb_cv_have_makeinfo_click" = xyes; then
-  MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
 
+    if test x$ac_success = xno; then
+    for switch in -std=gnu++11 -std=gnu++0x; do
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
 
-# Check whether --with-separate-debug-dir was given.
-if test "${with_separate_debug_dir+set}" = set; then :
-  withval=$with_separate_debug_dir;
-    DEBUGDIR=$withval
-else
-  DEBUGDIR=${libdir}/debug
-fi
+#ifndef __cplusplus
 
+#error "This is not a C++ compiler"
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $DEBUGDIR`
-  ac_define_dir=`eval echo $ac_define_dir`
+#elif __cplusplus < 201103L
 
-cat >>confdefs.h <<_ACEOF
-#define DEBUGDIR "$ac_define_dir"
-_ACEOF
+#error "This is not a C++11 compiler"
 
+#else
 
+namespace cxx11
+{
 
+  namespace test_static_assert
+  {
 
-  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-     if test "x$prefix" = xNONE; then
-     	test_prefix=/usr/local
-     else
-	test_prefix=$prefix
-     fi
-  else
-     test_prefix=$exec_prefix
-  fi
-  value=0
-  case ${ac_define_dir} in
-     "${test_prefix}"|"${test_prefix}/"*|\
-	'${exec_prefix}'|'${exec_prefix}/'*)
-     value=1
-     ;;
-  esac
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-cat >>confdefs.h <<_ACEOF
-#define DEBUGDIR_RELOCATABLE $value
-_ACEOF
+  }
 
+  namespace test_final_override
+  {
 
+    struct Base
+    {
+      virtual void f() {}
+    };
 
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
-# We can't pass paths as command line arguments.
-# Mingw32 tries to be clever and will convert the paths for us.
-# For example -DBINDIR="/usr/local/bin" passed on the command line may get
-# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
-# This breaks GDB's relocatable path conversions since paths passed in
-# config.h would not get so translated, the path prefixes no longer match.
+  }
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $bindir`
-  ac_define_dir=`eval echo $ac_define_dir`
+  namespace test_double_right_angle_brackets
+  {
 
-cat >>confdefs.h <<_ACEOF
-#define BINDIR "$ac_define_dir"
-_ACEOF
+    template < typename T >
+    struct check {};
 
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
+  }
 
-# GDB's datadir relocation
+  namespace test_decltype
+  {
 
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
+  }
 
-# Check whether --with-gdb-datadir was given.
-if test "${with_gdb_datadir+set}" = set; then :
-  withval=$with_gdb_datadir;
-    GDB_DATADIR=$withval
-else
-  GDB_DATADIR=${datadir}/gdb
-fi
+  namespace test_type_deduction
+  {
 
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $GDB_DATADIR`
-  ac_define_dir=`eval echo $ac_define_dir`
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR "$ac_define_dir"
-_ACEOF
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
 
+  }
 
+  namespace test_noexcept
+  {
 
-  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-     if test "x$prefix" = xNONE; then
-     	test_prefix=/usr/local
-     else
-	test_prefix=$prefix
-     fi
-  else
-     test_prefix=$exec_prefix
-  fi
-  value=0
-  case ${ac_define_dir} in
-     "${test_prefix}"|"${test_prefix}/"*|\
-	'${exec_prefix}'|'${exec_prefix}/'*)
-     value=1
-     ;;
-  esac
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR_RELOCATABLE $value
-_ACEOF
-
+    int f() { return 0; }
+    int g() noexcept { return 0; }
 
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
 
+  }
 
+  namespace test_constexpr
+  {
 
-# Check whether --with-relocated-sources was given.
-if test "${with_relocated_sources+set}" = set; then :
-  withval=$with_relocated_sources; reloc_srcdir="${withval}"
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $reloc_srcdir`
-  ac_define_dir=`eval echo $ac_define_dir`
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
 
-cat >>confdefs.h <<_ACEOF
-#define RELOC_SRCDIR "$ac_define_dir"
-_ACEOF
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
 
+  }
 
+  namespace test_rvalue_references
+  {
 
-fi
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
 
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
-$as_echo_n "checking for default auto-load directory... " >&6; }
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
 
-# Check whether --with-auto-load-dir was given.
-if test "${with_auto_load_dir+set}" = set; then :
-  withval=$with_auto_load_dir;
-else
-  with_auto_load_dir='$debugdir:$datadir/auto-load'
-fi
+  }
 
-escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
+  namespace test_uniform_initialization
+  {
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $escape_dir`
-  ac_define_dir=`eval echo $ac_define_dir`
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
 
-cat >>confdefs.h <<_ACEOF
-#define AUTO_LOAD_DIR "$ac_define_dir"
-_ACEOF
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
 
+  }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
-$as_echo "$with_auto_load_dir" >&6; }
+  namespace test_lambdas
+  {
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
-$as_echo_n "checking for default auto-load safe-path... " >&6; }
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
 
-# Check whether --with-auto-load-safe-path was given.
-if test "${with_auto_load_safe_path+set}" = set; then :
-  withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
-     with_auto_load_safe_path="/"
-     fi
-else
-  with_auto_load_safe_path="$with_auto_load_dir"
-fi
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
 
-escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
 
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $escape_dir`
-  ac_define_dir=`eval echo $ac_define_dir`
+  }
 
-cat >>confdefs.h <<_ACEOF
-#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
-_ACEOF
+  namespace test_variadic_templates
+  {
 
+    template <int...>
+    struct sum;
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
-$as_echo "$with_auto_load_safe_path" >&6; }
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
 
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
 
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
 
-subdirs="$subdirs testsuite"
+  }
 
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
 
-# Check whether to support alternative target configurations
-# Check whether --enable-targets was given.
-if test "${enable_targets+set}" = set; then :
-  enableval=$enable_targets; case "${enableval}" in
-  yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
-            ;;
-  no)       enable_targets= ;;
-  *)        enable_targets=$enableval ;;
-esac
-fi
+    struct foo {};
 
+    template<typename T>
+    using member = typename T::member_type;
 
-# Check whether to enable 64-bit support on 32-bit hosts
-# Check whether --enable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then :
-  enableval=$enable_64_bit_bfd; case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
-esac
-else
-  want64=false
-fi
+    template<typename T>
+    void func(...) {}
 
-# Provide defaults for some variables set by the per-host and per-target
-# configuration.
-gdb_host_obs=posix-hdep.o
+    template<typename T>
+    void func(member<T>*) {}
 
-if test "${target}" = "${host}"; then
-  gdb_native=yes
-else
-  gdb_native=no
-fi
+    void test();
 
-. $srcdir/configure.host
+    void test() { func<foo>(0); }
 
-# Add in the common host objects.
-. $srcdir/common/common.host
-gdb_host_obs="$gdb_host_obs $common_host_obs"
+  }
 
-# Accumulate some settings from configure.tgt over all enabled targets
+}  // namespace cxx11
 
-TARGET_OBS=
-all_targets=
-HAVE_NATIVE_GCORE_TARGET=
+#endif  // __cplusplus >= 201103L
 
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
-do
-  if test "$targ_alias" = "all"; then
-    all_targets=true
-  else
-    # Canonicalize the secondary target names.
-    result=`$ac_config_sub $targ_alias 2>/dev/null`
-    if test -n "$result"; then
-        targ=$result
-    else
-        targ=$targ_alias
-    fi
 
-    . ${srcdir}/configure.tgt
 
-    if test -z "${gdb_target_obs}"; then :
-  as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
 fi
-
-    # Target-specific object files
-    for i in ${gdb_target_obs}; do
-        case " $TARGET_OBS " in
-        *" ${i} "*) ;;
-        *)
-          TARGET_OBS="$TARGET_OBS ${i}"
-          ;;
-        esac
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
     done
-
-    # Check whether this target needs 64-bit CORE_ADDR
-    if test x${want64} = xfalse; then
-      . ${srcdir}/../bfd/config.bfd
-    fi
-
-    # Check whether this target is native and supports gcore.
-    if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
-       && $gdb_have_gcore; then
-      HAVE_NATIVE_GCORE_TARGET=1
-    fi
   fi
-done
-
-if test x${all_targets} = xtrue; then
-
-  # We want all 64-bit targets if we either:
-  #  - run on a 64-bit host  or
-  #  - already require 64-bit support for some other target  or
-  #  - the --enable-64-bit-bfd option was supplied
-  # Otherwise we only support all 32-bit targets.
-  #
-  # NOTE: This test must be in sync with the corresponding
-  #       tests in BFD!
 
-  if test x${want64} = xfalse; then
-    # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+    if test x$ac_success = xno; then
+                for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
 
+#ifndef __cplusplus
 
+#error "This is not a C++ compiler"
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+#elif __cplusplus < 201103L
 
+#error "This is not a C++11 compiler"
 
-    if test "x${ac_cv_sizeof_long}" = "x8"; then
-      want64=true
-    fi
-  fi
-  if test x${want64} = xtrue; then
-    TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
-  else
-    TARGET_OBS='$(ALL_TARGET_OBS)'
-  fi
-fi
+#else
 
+namespace cxx11
+{
 
+  namespace test_static_assert
+  {
 
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-# For other settings, only the main target counts.
-gdb_sim=
-gdb_osabi=
-build_gdbserver=
-targ=$target; . ${srcdir}/configure.tgt
+  }
 
-# Fetch the default architecture and default target vector from BFD.
-targ=$target; . $srcdir/../bfd/config.bfd
+  namespace test_final_override
+  {
 
-# We only want the first architecture, so strip off the others if
-# there is more than one.
-targ_archs=`echo $targ_archs | sed 's/ .*//'`
+    struct Base
+    {
+      virtual void f() {}
+    };
 
-if test "x$targ_archs" != x; then
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_BFD_ARCH $targ_archs
-_ACEOF
+  }
 
-fi
-if test "x$targ_defvec" != x; then
+  namespace test_double_right_angle_brackets
+  {
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_BFD_VEC $targ_defvec
-_ACEOF
+    template < typename T >
+    struct check {};
 
-fi
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
-# The CLI cannot be disabled yet, but may be in the future.
+  }
 
-# Enable CLI.
-# Check whether --enable-gdbcli was given.
-if test "${enable_gdbcli+set}" = set; then :
-  enableval=$enable_gdbcli; case $enableval in
-    yes)
-      ;;
-    no)
-      as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
-    *)
-      as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
-  esac
-else
-  enable_gdbcli=yes
-fi
+  namespace test_decltype
+  {
 
-if test x"$enable_gdbcli" = xyes; then
-  if test -d $srcdir/cli; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
-  fi
-fi
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
-# Enable MI.
-# Check whether --enable-gdbmi was given.
-if test "${enable_gdbmi+set}" = set; then :
-  enableval=$enable_gdbmi; case $enableval in
-    yes | no)
-      ;;
-    *)
-      as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
-  esac
-else
-  enable_gdbmi=yes
-fi
+  }
 
-if test x"$enable_gdbmi" = xyes; then
-  if test -d $srcdir/mi; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
-  fi
-fi
+  namespace test_type_deduction
+  {
 
-# Enable TUI.
-# Check whether --enable-tui was given.
-if test "${enable_tui+set}" = set; then :
-  enableval=$enable_tui; case $enableval in
-    yes | no | auto)
-      ;;
-    *)
-      as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
-  esac
-else
-  enable_tui=auto
-fi
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
-# Enable gdbtk.
-# Check whether --enable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then :
-  enableval=$enable_gdbtk; case $enableval in
-    yes | no)
-      ;;
-    *)
-      as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
-  esac
-else
-  if test -d $srcdir/gdbtk; then
-    enable_gdbtk=yes
-  else
-    enable_gdbtk=no
-  fi
-fi
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
-# We unconditionally disable gdbtk tests on selected platforms.
-case $host_os in
-  go32* | windows*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
-$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
-    enable_gdbtk=no ;;
-esac
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
 
-# Libunwind support for ia64.
+  }
 
+  namespace test_noexcept
+  {
 
-# Check whether --with-libunwind-ia64 was given.
-if test "${with_libunwind_ia64+set}" = set; then :
-  withval=$with_libunwind_ia64;
-else
-  with_libunwind_ia64=auto
-fi
+    int f() { return 0; }
+    int g() noexcept { return 0; }
 
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
 
-# Backward compatibility option.
-if test "${with_libunwind+set}" = set; then
-  if test x"$with_libunwind_ia64" != xauto; then
-    as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
-$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
-  with_libunwind_ia64="$with_libunwind"
-fi
+  }
 
-case "$with_libunwind_ia64" in
-  yes | no)
-    ;;
-  auto)
-    for ac_header in libunwind-ia64.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
-if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUNWIND_IA64_H 1
-_ACEOF
+  namespace test_constexpr
+  {
 
-fi
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
 
-done
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
 
-    with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
-    ;;
-  *)
-    as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
-    ;;
-esac
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
 
-if test x"$with_libunwind_ia64" = xyes; then
-  for ac_header in libunwind-ia64.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
-if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUNWIND_IA64_H 1
-_ACEOF
+  }
 
-fi
+  namespace test_rvalue_references
+  {
 
-done
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
 
-  if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
-    as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
-  fi
-  CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
-  CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
-  CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
-fi
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
 
-opt_curses=no
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
 
-# Check whether --with-curses was given.
-if test "${with_curses+set}" = set; then :
-  withval=$with_curses; opt_curses=$withval
-fi
+  }
 
+  namespace test_uniform_initialization
+  {
 
-prefer_curses=no
-if test "$opt_curses" = "yes"; then
-  prefer_curses=yes
-fi
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
 
-# Profiling support.
-# Check whether --enable-profiling was given.
-if test "${enable_profiling+set}" = set; then :
-  enableval=$enable_profiling; case $enableval in
-    yes | no)
-      ;;
-    *)
-      as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
-  esac
-else
-  enable_profiling=no
-fi
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
 
+  }
 
-for ac_func in monstartup _mcleanup
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+  namespace test_lambdas
+  {
 
-fi
-done
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
-$as_echo_n "checking for _etext... " >&6; }
-if test "${ac_cv_var__etext+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-extern char _etext;
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
 
-int
-main ()
-{
-free (&_etext);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_var__etext=yes
-else
-  ac_cv_var__etext=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
-$as_echo "$ac_cv_var__etext" >&6; }
-if test $ac_cv_var__etext = yes; then
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
 
-$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
+  }
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
-$as_echo_n "checking for etext... " >&6; }
-if test "${ac_cv_var_etext+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-extern char etext;
+  namespace test_variadic_templates
+  {
 
-int
-main ()
-{
-free (&etext);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_var_etext=yes
-else
-  ac_cv_var_etext=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
-$as_echo "$ac_cv_var_etext" >&6; }
-if test $ac_cv_var_etext = yes; then
+    template <int...>
+    struct sum;
 
-$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
 
-fi
-if test "$enable_profiling" = yes ; then
-  if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
-    as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
-  fi
-  PROFILE_CFLAGS=-pg
-  OLD_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
-$as_echo_n "checking whether $CC supports -pg... " >&6; }
-if test "${ac_cv_cc_supports_pg+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
 
-int
-main ()
-{
-int x;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_cc_supports_pg=yes
-else
-  ac_cv_cc_supports_pg=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
-$as_echo "$ac_cv_cc_supports_pg" >&6; }
+  }
 
-  if test $ac_cv_cc_supports_pg = no; then
-    as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
-  fi
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
 
-  CFLAGS="$OLD_CFLAGS"
-fi
+    struct foo {};
 
+    template<typename T>
+    using member = typename T::member_type;
 
+    template<typename T>
+    void func(...) {}
 
-# Check whether --with-pkgversion was given.
-if test "${with_pkgversion+set}" = set; then :
-  withval=$with_pkgversion; case "$withval" in
-      yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
-      no)  PKGVERSION= ;;
-      *)   PKGVERSION="($withval) " ;;
-     esac
-else
-  PKGVERSION="(GDB) "
+    template<typename T>
+    void func(member<T>*) {}
 
-fi
+    void test();
 
+    void test() { func<foo>(0); }
 
+  }
 
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
 
 
-# Check whether --with-bugurl was given.
-if test "${with_bugurl+set}" = set; then :
-  withval=$with_bugurl; case "$withval" in
-      yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
-      no)  BUGURL=
-	   ;;
-      *)   BUGURL="$withval"
-	   ;;
-     esac
-else
-  BUGURL="http://www.gnu.org/software/gdb/bugs/"
 
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
 fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-  case ${BUGURL} in
-  "")
-    REPORT_BUGS_TO=
-    REPORT_BUGS_TEXI=
-    ;;
-  *)
-    REPORT_BUGS_TO="<$BUGURL>"
-    REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
-    ;;
-  esac;
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX11=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
+  else
+    HAVE_CXX11=1
 
+$as_echo "#define HAVE_CXX11 1" >>confdefs.h
 
+  fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define PKGVERSION "$PKGVERSION"
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
-_ACEOF
+# Dependency checking.
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
 
+DEPDIR="${am__leading_dot}deps"
 
-# --------------------- #
-# Checks for programs.  #
-# --------------------- #
+ac_config_commands="$ac_config_commands depdir"
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+
+depcc="$CC"   am_compiler_list=
+
+am_depcomp=$ac_aux_dir/depcomp
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  if test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
-done
+  for depmode in $am_compiler_list; do
+    if test $depmode = none; then break; fi
+
+    $as_echo "$as_me:$LINENO: trying $depmode" >&5
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "include sub/conftest.Po" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    depcmd="depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
+    echo "| $depcmd" | sed -e 's/  */ /g' >&5
+    if env $depcmd > conftest.err 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
+       ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+	$as_echo "$as_me:$LINENO: success" >&5
+        break
+      fi
+    fi
+    $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
+    sed -e 's/^/| /' < conftest.err >&5
   done
-IFS=$as_save_IFS
 
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
 fi
+
 fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
+then as_fn_error "no usable dependency style found" "$LINENO" 5
+else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
 fi
 
 
-  test -n "$AWK" && break
-done
+gnulib_extra_configure_args=
+# If large-file support is disabled, make sure gnulib does the same.
+if test "$enable_largefile" = no; then
+gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
+fi
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
+# Configure gnulib.  We need to build gnulib under some other
+# directory not "gnulib", to avoid the problem of both GDB and
+# GDBserver wanting to build it in the same directory, when building
+# in the source dir.
 
+  in_src="gnulib"
+  in_build="build-gnulib"
+  in_extra_args="$gnulib_extra_configure_args"
+
+  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+  # so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case $ac_arg in
+    -cache-file | --cache-file | --cache-fil | --cache-fi \
+    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+      ac_prev=cache_file ;;
+    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+    | --c=*)
+      ;;
+    --config-cache | -C)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    --disable-option-checking)
+      ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+    esac
   done
-IFS=$as_save_IFS
 
-rm -rf conftest.one conftest.two conftest.dir
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
 
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+  # Always prepend --disable-option-checking to silence warnings, since
+  # different subdirs can have different --enable and --with options.
+  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+  ac_popdir=`pwd`
+  ac_dir=$in_build
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+  ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+  $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+  $as_echo "$ac_msg" >&6
+  as_dir="$ac_dir"; as_fn_mkdir_p
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
+  case $srcdir in
+  [\\/]* | ?:[\\/]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  cd "$ac_dir"
+
+  ac_sub_configure=$ac_srcdir/configure
+
+  # Make the cache file name correct relative to the subdirectory.
+  case $cache_file in
+  [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+  *) # Relative name.
+    ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+  esac
+
+  if test -n "$in_extra_args"; then
+    # Add the extra args at the end.
+    ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
   fi
-done
-  done
-IFS=$as_save_IFS
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+  # The eval makes quoting arguments work.
+  eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+       --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+    as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+
+  cd "$ac_popdir"
+
+
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f  ../intl/config.intl; then
+  .  ../intl/config.intl
 fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+if test x"$USE_NLS" != xyes; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
 
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+  # Look for .po and .gmo files in the source directory.
+  CATALOGS=
+  XLINGUAS=
+  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+    # If there aren't any .gmo files the shell will give us the
+    # literal string "../path/to/srcdir/po/*.gmo" which has to be
+    # weeded out.
+    case "$cat" in *\**)
+      continue;;
+    esac
+    # The quadruple backslash is collapsed to a double backslash
+    # by the backticks, then collapsed again by the double quotes,
+    # leaving us with one backslash in the sed expression (right
+    # before the dot that mustn't act as a wildcard).
+    cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+    lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+    # The user is allowed to set LINGUAS to a list of languages to
+    # install catalogs for.  If it's empty that means "all of them."
+    if test "x$LINGUAS" = x; then
+      CATALOGS="$CATALOGS $cat"
+      XLINGUAS="$XLINGUAS $lang"
+    else
+      case "$LINGUAS" in *$lang*)
+        CATALOGS="$CATALOGS $cat"
+        XLINGUAS="$XLINGUAS $lang"
+        ;;
+      esac
+    fi
+  done
+  LINGUAS="$XLINGUAS"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
 
-for ac_prog in 'bison -y' byacc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_YACC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+    DATADIRNAME=share
+
+  INSTOBJEXT=.mo
+
+  GENCAT=gencat
+
+  CATOBJEXT=.gmo
 
 fi
+
+localedir='${datadir}/locale'
+
+
+if test x"$USE_NLS" = xyes; then
+   CONFIG_ALL="$CONFIG_ALL all-po"
+   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
+   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
 fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
+GNULIB=build-gnulib/import
+
+# For Makefile dependencies.
+GNULIB_STDINT_H=
+if test x"$STDINT_H" != x; then
+  GNULIB_STDINT_H=$GNULIB/$STDINT_H
 fi
 
 
-  test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
+PACKAGE=gdb
 
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
+# We never need to detect it in this sub-configure.
+# But preserve it for config.status --recheck.
 
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+
+
+MAKEINFO_EXTRA_FLAGS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
+$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
+if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  echo '@clicksequence{a @click{} b}' >conftest.texinfo
+  if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
+    gdb_cv_have_makeinfo_click=yes
+  else
+    gdb_cv_have_makeinfo_click=no
   fi
-done
-  done
-IFS=$as_save_IFS
-
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
+$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
+if test x"$gdb_cv_have_makeinfo_click" = xyes; then
+  MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+
+
+
+
+# Check whether --with-separate-debug-dir was given.
+if test "${with_separate_debug_dir+set}" = set; then :
+  withval=$with_separate_debug_dir;
+    DEBUGDIR=$withval
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  DEBUGDIR=${libdir}/debug
 fi
 
-  if test "x$ac_ct_AR" = x; then
-    AR=""
+
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $DEBUGDIR`
+  ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define DEBUGDIR "$ac_define_dir"
+_ACEOF
+
+
+
+
+  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+     if test "x$prefix" = xNONE; then
+     	test_prefix=/usr/local
+     else
+	test_prefix=$prefix
+     fi
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
+     test_prefix=$exec_prefix
   fi
-else
-  AR="$ac_cv_prog_AR"
-fi
+  value=0
+  case ${ac_define_dir} in
+     "${test_prefix}"|"${test_prefix}/"*|\
+	'${exec_prefix}'|'${exec_prefix}/'*)
+     value=1
+     ;;
+  esac
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DLLTOOL"; then
-  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+cat >>confdefs.h <<_ACEOF
+#define DEBUGDIR_RELOCATABLE $value
+_ACEOF
 
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
-  ac_ct_DLLTOOL=$DLLTOOL
-  # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DLLTOOL"; then
-  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+# We can't pass paths as command line arguments.
+# Mingw32 tries to be clever and will convert the paths for us.
+# For example -DBINDIR="/usr/local/bin" passed on the command line may get
+# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
+# This breaks GDB's relocatable path conversions since paths passed in
+# config.h would not get so translated, the path prefixes no longer match.
 
-  if test "x$ac_ct_DLLTOOL" = x; then
-    DLLTOOL=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DLLTOOL=$ac_ct_DLLTOOL
-  fi
-else
-  DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $bindir`
+  ac_define_dir=`eval echo $ac_define_dir`
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINDRES+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+cat >>confdefs.h <<_ACEOF
+#define BINDIR "$ac_define_dir"
+_ACEOF
 
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
-$as_echo "$WINDRES" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
-  ac_ct_WINDRES=$WINDRES
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_WINDRES"; then
-  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_WINDRES="windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+# GDB's datadir relocation
 
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
-$as_echo "$ac_ct_WINDRES" >&6; }
+
+
+# Check whether --with-gdb-datadir was given.
+if test "${with_gdb_datadir+set}" = set; then :
+  withval=$with_gdb_datadir;
+    GDB_DATADIR=$withval
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  GDB_DATADIR=${datadir}/gdb
 fi
 
-  if test "x$ac_ct_WINDRES" = x; then
-    WINDRES=""
+
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $GDB_DATADIR`
+  ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_DATADIR "$ac_define_dir"
+_ACEOF
+
+
+
+
+  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+     if test "x$prefix" = xNONE; then
+     	test_prefix=/usr/local
+     else
+	test_prefix=$prefix
+     fi
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    WINDRES=$ac_ct_WINDRES
+     test_prefix=$exec_prefix
   fi
-else
-  WINDRES="$ac_cv_prog_WINDRES"
-fi
+  value=0
+  case ${ac_define_dir} in
+     "${test_prefix}"|"${test_prefix}/"*|\
+	'${exec_prefix}'|'${exec_prefix}/'*)
+     value=1
+     ;;
+  esac
 
+cat >>confdefs.h <<_ACEOF
+#define GDB_DATADIR_RELOCATABLE $value
+_ACEOF
 
-case $host_os in
-  gnu*)
-    # Needed for GNU Hurd hosts.
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
-set dummy ${ac_tool_prefix}mig; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MIG"; then
-  ac_cv_prog_MIG="$MIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_MIG="${ac_tool_prefix}mig"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-MIG=$ac_cv_prog_MIG
-if test -n "$MIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
-$as_echo "$MIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_MIG"; then
-  ac_ct_MIG=$MIG
-  # Extract the first word of "mig", so it can be a program name with args.
-set dummy mig; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_MIG"; then
-  ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_MIG="mig"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
-if test -n "$ac_ct_MIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
-$as_echo "$ac_ct_MIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+# Check whether --with-relocated-sources was given.
+if test "${with_relocated_sources+set}" = set; then :
+  withval=$with_relocated_sources; reloc_srcdir="${withval}"
 
-  if test "x$ac_ct_MIG" = x; then
-    MIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    MIG=$ac_ct_MIG
-  fi
-else
-  MIG="$ac_cv_prog_MIG"
-fi
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $reloc_srcdir`
+  ac_define_dir=`eval echo $ac_define_dir`
 
-    if test x"$MIG" = x; then
-      as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
-    fi
-    ;;
-esac
+cat >>confdefs.h <<_ACEOF
+#define RELOC_SRCDIR "$ac_define_dir"
+_ACEOF
 
-# ---------------------- #
-# Checks for libraries.  #
-# ---------------------- #
 
-# We might need to link with -lm; most simulators need it.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
-$as_echo_n "checking for main in -lm... " >&6; }
-if test "${ac_cv_lib_m_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+
+fi
 
 
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_main=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
+$as_echo_n "checking for default auto-load directory... " >&6; }
+
+# Check whether --with-auto-load-dir was given.
+if test "${with_auto_load_dir+set}" = set; then :
+  withval=$with_auto_load_dir;
 else
-  ac_cv_lib_m_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  with_auto_load_dir='$debugdir:$datadir/auto-load'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
-$as_echo "$ac_cv_lib_m_main" >&6; }
-if test "x$ac_cv_lib_m_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
 
-  LIBS="-lm $LIBS"
+escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
 
-fi
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $escape_dir`
+  ac_define_dir=`eval echo $ac_define_dir`
 
+cat >>confdefs.h <<_ACEOF
+#define AUTO_LOAD_DIR "$ac_define_dir"
+_ACEOF
 
-# We need to link with -lw to get `wctype' on Solaris before Solaris
-# 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
-# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
-# is known to have this problem).  Therefore we avoid libw if we can.
-ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
-if test "x$ac_cv_func_wctype" = x""yes; then :
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
-$as_echo_n "checking for wctype in -lw... " >&6; }
-if test "${ac_cv_lib_w_wctype+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lw  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
+$as_echo "$with_auto_load_dir" >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char wctype ();
-int
-main ()
-{
-return wctype ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_w_wctype=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
+$as_echo_n "checking for default auto-load safe-path... " >&6; }
+
+# Check whether --with-auto-load-safe-path was given.
+if test "${with_auto_load_safe_path+set}" = set; then :
+  withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
+     with_auto_load_safe_path="/"
+     fi
 else
-  ac_cv_lib_w_wctype=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  with_auto_load_safe_path="$with_auto_load_dir"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
-$as_echo "$ac_cv_lib_w_wctype" >&6; }
-if test "x$ac_cv_lib_w_wctype" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBW 1
-_ACEOF
 
-  LIBS="-lw $LIBS"
+escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
 
-fi
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $escape_dir`
+  ac_define_dir=`eval echo $ac_define_dir`
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
+_ACEOF
 
 
-# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if test "${ac_cv_search_gethostbyname+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
+$as_echo "$with_auto_load_safe_path" >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_gethostbyname=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_gethostbyname+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_gethostbyname+set}" = set; then :
 
-else
-  ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+subdirs="$subdirs testsuite"
+
+
+# Check whether to support alternative target configurations
+# Check whether --enable-targets was given.
+if test "${enable_targets+set}" = set; then :
+  enableval=$enable_targets; case "${enableval}" in
+  yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
+            ;;
+  no)       enable_targets= ;;
+  *)        enable_targets=$enableval ;;
+esac
 fi
 
 
-# Some systems (e.g. Solaris) have `socketpair' in libsocket.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
-$as_echo_n "checking for library containing socketpair... " >&6; }
-if test "${ac_cv_search_socketpair+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+# Check whether to enable 64-bit support on 32-bit hosts
+# Check whether --enable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then :
+  enableval=$enable_64_bit_bfd; case "${enableval}" in
+  yes)  want64=true  ;;
+  no)   want64=false ;;
+  *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
+esac
 else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socketpair ();
-int
-main ()
-{
-return socketpair ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_socketpair=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_socketpair+set}" = set; then :
-  break
+  want64=false
 fi
-done
-if test "${ac_cv_search_socketpair+set}" = set; then :
 
+# Provide defaults for some variables set by the per-host and per-target
+# configuration.
+gdb_host_obs=posix-hdep.o
+
+if test "${target}" = "${host}"; then
+  gdb_native=yes
 else
-  ac_cv_search_socketpair=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  gdb_native=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
-$as_echo "$ac_cv_search_socketpair" >&6; }
-ac_res=$ac_cv_search_socketpair
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-fi
+. $srcdir/configure.host
+
+# Add in the common host objects.
+. $srcdir/common/common.host
+gdb_host_obs="$gdb_host_obs $common_host_obs"
 
+# Accumulate some settings from configure.tgt over all enabled targets
 
-# Link in zlib if we can.  This allows us to read compressed debug sections.
+TARGET_OBS=
+all_targets=
+HAVE_NATIVE_GCORE_TARGET=
 
-  # Use the system's zlib library.
-  zlibdir="-L\$(top_builddir)/../zlib"
-  zlibinc="-I\$(top_srcdir)/../zlib"
+for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
+do
+  if test "$targ_alias" = "all"; then
+    all_targets=true
+  else
+    # Canonicalize the secondary target names.
+    result=`$ac_config_sub $targ_alias 2>/dev/null`
+    if test -n "$result"; then
+        targ=$result
+    else
+        targ=$targ_alias
+    fi
 
-# Check whether --with-system-zlib was given.
-if test "${with_system_zlib+set}" = set; then :
-  withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
-    zlibdir=
-    zlibinc=
-  fi
+    . ${srcdir}/configure.tgt
 
+    if test -z "${gdb_target_obs}"; then :
+  as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
 fi
 
+    # Target-specific object files
+    for i in ${gdb_target_obs}; do
+        case " $TARGET_OBS " in
+        *" ${i} "*) ;;
+        *)
+          TARGET_OBS="$TARGET_OBS ${i}"
+          ;;
+        esac
+    done
 
+    # Check whether this target needs 64-bit CORE_ADDR
+    if test x${want64} = xfalse; then
+      . ${srcdir}/../bfd/config.bfd
+    fi
 
+    # Check whether this target is native and supports gcore.
+    if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
+       && $gdb_have_gcore; then
+      HAVE_NATIVE_GCORE_TARGET=1
+    fi
+  fi
+done
 
+if test x${all_targets} = xtrue; then
 
-# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
-$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
-if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
+  # We want all 64-bit targets if we either:
+  #  - run on a 64-bit host  or
+  #  - already require 64-bit support for some other target  or
+  #  - the --enable-64-bit-bfd option was supplied
+  # Otherwise we only support all 32-bit targets.
+  #
+  # NOTE: This test must be in sync with the corresponding
+  #       tests in BFD!
+
+  if test x${want64} = xfalse; then
+    # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char kinfo_getvmmap ();
-int
-main ()
-{
-return kinfo_getvmmap ();
-  ;
-  return 0;
-}
+else
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (long)
+See \`config.log' for more details." "$LINENO" 5; }; }
+   else
+     ac_cv_sizeof_long=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
 _ACEOF
-for ac_lib in '' util; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
+
+
+    if test "x${ac_cv_sizeof_long}" = "x8"; then
+      want64=true
+    fi
+  fi
+  if test x${want64} = xtrue; then
+    TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
   else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    TARGET_OBS='$(ALL_TARGET_OBS)'
   fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_kinfo_getvmmap=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
-  break
 fi
-done
-if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
 
-else
-  ac_cv_search_kinfo_getvmmap=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+
+
+
+# For other settings, only the main target counts.
+gdb_sim=
+gdb_osabi=
+build_gdbserver=
+targ=$target; . ${srcdir}/configure.tgt
+
+# Fetch the default architecture and default target vector from BFD.
+targ=$target; . $srcdir/../bfd/config.bfd
+
+# We only want the first architecture, so strip off the others if
+# there is more than one.
+targ_archs=`echo $targ_archs | sed 's/ .*//'`
+
+if test "x$targ_archs" != x; then
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_BFD_ARCH $targ_archs
+_ACEOF
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
-$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
-ac_res=$ac_cv_search_kinfo_getvmmap
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+if test "x$targ_defvec" != x; then
 
-$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_BFD_VEC $targ_defvec
+_ACEOF
 
 fi
 
+# The CLI cannot be disabled yet, but may be in the future.
+
+# Enable CLI.
+# Check whether --enable-gdbcli was given.
+if test "${enable_gdbcli+set}" = set; then :
+  enableval=$enable_gdbcli; case $enableval in
+    yes)
+      ;;
+    no)
+      as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
+    *)
+      as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
+  esac
+else
+  enable_gdbcli=yes
+fi
 
+if test x"$enable_gdbcli" = xyes; then
+  if test -d $srcdir/cli; then
+    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
+    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
+    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
+    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
+  fi
+fi
+
+# Enable MI.
+# Check whether --enable-gdbmi was given.
+if test "${enable_gdbmi+set}" = set; then :
+  enableval=$enable_gdbmi; case $enableval in
+    yes | no)
+      ;;
+    *)
+      as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
+  esac
+else
+  enable_gdbmi=yes
+fi
+
+if test x"$enable_gdbmi" = xyes; then
+  if test -d $srcdir/mi; then
+    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
+    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
+    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
+    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
+  fi
+fi
+
+# Enable TUI.
+# Check whether --enable-tui was given.
+if test "${enable_tui+set}" = set; then :
+  enableval=$enable_tui; case $enableval in
+    yes | no | auto)
+      ;;
+    *)
+      as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
+  esac
+else
+  enable_tui=auto
+fi
+
+
+# Enable gdbtk.
+# Check whether --enable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then :
+  enableval=$enable_gdbtk; case $enableval in
+    yes | no)
+      ;;
+    *)
+      as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
+  esac
+else
+  if test -d $srcdir/gdbtk; then
+    enable_gdbtk=yes
+  else
+    enable_gdbtk=no
+  fi
+fi
+
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+  go32* | windows*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
+$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
+    enable_gdbtk=no ;;
+esac
+
+# Libunwind support for ia64.
+
+
+# Check whether --with-libunwind-ia64 was given.
+if test "${with_libunwind_ia64+set}" = set; then :
+  withval=$with_libunwind_ia64;
+else
+  with_libunwind_ia64=auto
+fi
+
+
+# Backward compatibility option.
+if test "${with_libunwind+set}" = set; then
+  if test x"$with_libunwind_ia64" != xauto; then
+    as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
+$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
+  with_libunwind_ia64="$with_libunwind"
+fi
+
+case "$with_libunwind_ia64" in
+  yes | no)
+    ;;
+  auto)
+    for ac_header in libunwind-ia64.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
+if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUNWIND_IA64_H 1
+_ACEOF
+
+fi
+
+done
+
+    with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
+    ;;
+  *)
+    as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
+    ;;
+esac
+
+if test x"$with_libunwind_ia64" = xyes; then
+  for ac_header in libunwind-ia64.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
+if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUNWIND_IA64_H 1
+_ACEOF
+
+fi
+
+done
+
+  if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
+    as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
+  fi
+  CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
+  CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
+  CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
+fi
+
+opt_curses=no
+
+# Check whether --with-curses was given.
+if test "${with_curses+set}" = set; then :
+  withval=$with_curses; opt_curses=$withval
+fi
+
+
+prefer_curses=no
+if test "$opt_curses" = "yes"; then
+  prefer_curses=yes
+fi
+
+# Profiling support.
+# Check whether --enable-profiling was given.
+if test "${enable_profiling+set}" = set; then :
+  enableval=$enable_profiling; case $enableval in
+    yes | no)
+      ;;
+    *)
+      as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
+  esac
+else
+  enable_profiling=no
+fi
+
+
+for ac_func in monstartup _mcleanup
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
+$as_echo_n "checking for _etext... " >&6; }
+if test "${ac_cv_var__etext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+extern char _etext;
+
+int
+main ()
+{
+free (&_etext);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_var__etext=yes
+else
+  ac_cv_var__etext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
+$as_echo "$ac_cv_var__etext" >&6; }
+if test $ac_cv_var__etext = yes; then
+
+$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
+$as_echo_n "checking for etext... " >&6; }
+if test "${ac_cv_var_etext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+extern char etext;
+
+int
+main ()
+{
+free (&etext);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_var_etext=yes
+else
+  ac_cv_var_etext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
+$as_echo "$ac_cv_var_etext" >&6; }
+if test $ac_cv_var_etext = yes; then
+
+$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
+
+fi
+if test "$enable_profiling" = yes ; then
+  if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
+    as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
+  fi
+  PROFILE_CFLAGS=-pg
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
+$as_echo_n "checking whether $CC supports -pg... " >&6; }
+if test "${ac_cv_cc_supports_pg+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_cc_supports_pg=yes
+else
+  ac_cv_cc_supports_pg=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
+$as_echo "$ac_cv_cc_supports_pg" >&6; }
+
+  if test $ac_cv_cc_supports_pg = no; then
+    as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
+  fi
+
+  CFLAGS="$OLD_CFLAGS"
+fi
+
+
+
+# Check whether --with-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then :
+  withval=$with_pkgversion; case "$withval" in
+      yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
+      no)  PKGVERSION= ;;
+      *)   PKGVERSION="($withval) " ;;
+     esac
+else
+  PKGVERSION="(GDB) "
+
+fi
+
+
+
+
+
+# Check whether --with-bugurl was given.
+if test "${with_bugurl+set}" = set; then :
+  withval=$with_bugurl; case "$withval" in
+      yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
+      no)  BUGURL=
+	   ;;
+      *)   BUGURL="$withval"
+	   ;;
+     esac
+else
+  BUGURL="http://www.gnu.org/software/gdb/bugs/"
+
+fi
+
+  case ${BUGURL} in
+  "")
+    REPORT_BUGS_TO=
+    REPORT_BUGS_TEXI=
+    ;;
+  *)
+    REPORT_BUGS_TO="<$BUGURL>"
+    REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+    ;;
+  esac;
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PKGVERSION "$PKGVERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
+_ACEOF
+
+
+# --------------------- #
+# Checks for programs.  #
+# --------------------- #
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_YACC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_YACC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_WINDRES+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_WINDRES"; then
+  ac_ct_WINDRES=$WINDRES
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_WINDRES"; then
+  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_WINDRES="windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
+if test -n "$ac_ct_WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
+$as_echo "$ac_ct_WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_WINDRES" = x; then
+    WINDRES=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    WINDRES=$ac_ct_WINDRES
+  fi
+else
+  WINDRES="$ac_cv_prog_WINDRES"
+fi
+
+
+case $host_os in
+  gnu*)
+    # Needed for GNU Hurd hosts.
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mig; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_MIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MIG"; then
+  ac_cv_prog_MIG="$MIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MIG="${ac_tool_prefix}mig"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MIG=$ac_cv_prog_MIG
+if test -n "$MIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
+$as_echo "$MIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MIG"; then
+  ac_ct_MIG=$MIG
+  # Extract the first word of "mig", so it can be a program name with args.
+set dummy mig; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MIG"; then
+  ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_MIG="mig"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
+if test -n "$ac_ct_MIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
+$as_echo "$ac_ct_MIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MIG" = x; then
+    MIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MIG=$ac_ct_MIG
+  fi
+else
+  MIG="$ac_cv_prog_MIG"
+fi
+
+    if test x"$MIG" = x; then
+      as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
+    fi
+    ;;
+esac
+
+# ---------------------- #
+# Checks for libraries.  #
+# ---------------------- #
+
+# We might need to link with -lm; most simulators need it.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
+$as_echo_n "checking for main in -lm... " >&6; }
+if test "${ac_cv_lib_m_main+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_main=yes
+else
+  ac_cv_lib_m_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
+$as_echo "$ac_cv_lib_m_main" >&6; }
+if test "x$ac_cv_lib_m_main" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+# We need to link with -lw to get `wctype' on Solaris before Solaris
+# 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
+# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
+# is known to have this problem).  Therefore we avoid libw if we can.
+ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
+if test "x$ac_cv_func_wctype" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
+$as_echo_n "checking for wctype in -lw... " >&6; }
+if test "${ac_cv_lib_w_wctype+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lw  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wctype ();
+int
+main ()
+{
+return wctype ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_w_wctype=yes
+else
+  ac_cv_lib_w_wctype=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
+$as_echo "$ac_cv_lib_w_wctype" >&6; }
+if test "x$ac_cv_lib_w_wctype" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBW 1
+_ACEOF
+
+  LIBS="-lw $LIBS"
+
+fi
+
+fi
+
+
+# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+$as_echo_n "checking for library containing gethostbyname... " >&6; }
+if test "${ac_cv_search_gethostbyname+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_gethostbyname=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_gethostbyname+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_gethostbyname+set}" = set; then :
+
+else
+  ac_cv_search_gethostbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+$as_echo "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
+$as_echo_n "checking for library containing socketpair... " >&6; }
+if test "${ac_cv_search_socketpair+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' socket; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_socketpair=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_socketpair+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_socketpair+set}" = set; then :
+
+else
+  ac_cv_search_socketpair=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
+$as_echo "$ac_cv_search_socketpair" >&6; }
+ac_res=$ac_cv_search_socketpair
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+# Link in zlib if we can.  This allows us to read compressed debug sections.
+
+  # Use the system's zlib library.
+  zlibdir="-L\$(top_builddir)/../zlib"
+  zlibinc="-I\$(top_srcdir)/../zlib"
+
+# Check whether --with-system-zlib was given.
+if test "${with_system_zlib+set}" = set; then :
+  withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
+    zlibdir=
+    zlibinc=
+  fi
+
+fi
+
+
+
+
+
+# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
+# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
+$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
+if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char kinfo_getvmmap ();
+int
+main ()
+{
+return kinfo_getvmmap ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' util util-freebsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_kinfo_getvmmap=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
+
+else
+  ac_cv_search_kinfo_getvmmap=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
+$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
+ac_res=$ac_cv_search_kinfo_getvmmap
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
+
+fi
+
+
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  acl_cv_prog_gnu_ld=yes
+else
+  acl_cv_prog_gnu_ld=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux*) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
 
 
 
-# Check whether --with-libiconv-prefix was given.
-if test "${with_libiconv_prefix+set}" = set; then :
-  withval=$with_libiconv_prefix;
-    for dir in `echo "$withval" | tr : ' '`; do
-      if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
-      if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
-    done
 
-fi
 
 
-  BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
-  BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
 $as_echo_n "checking for iconv... " >&6; }
@@ -7129,18 +8522,9 @@ else
 
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
-    am_cv_use_build_libiconv=no
-    am_cv_build_libiconv_path=
-
-    # If libiconv is part of the build tree, then try using it over
-    # any system iconv.
-    if test -d ../libiconv; then
-      for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
-        am_save_LIBS="$LIBS"
-        am_save_CPPFLAGS="$CPPFLAGS"
-        LIBS="$LIBS $lib_dir/libiconv.a"
-        CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                    am_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $INCICONV"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <iconv.h>
@@ -7148,31 +8532,26 @@ int
 main ()
 {
 iconv_t cd = iconv_open("","");
-           iconv(cd,NULL,NULL,NULL,NULL);
-           iconv_close(cd);
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_use_build_libiconv=yes
-          am_cv_build_libiconv_path=$lib_dir/libiconv.a
-          am_cv_lib_iconv=yes
-          am_cv_func_iconv=yes
+  am_cv_func_iconv=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LIBS="$am_save_LIBS"
-        CPPFLAGS="$am_save_CPPFLAGS"
-        if test "$am_cv_use_build_libiconv" = "yes"; then
-          break
-        fi
-      done
-    fi
+    CPPFLAGS="$am_save_CPPFLAGS"
 
-    # Next, try to find iconv in libc.
-    if test "$am_cv_func_iconv" != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
+      for _libs in .libs _libs; do
+        am_save_CPPFLAGS="$CPPFLAGS"
+        am_save_LIBS="$LIBS"
+        CPPFLAGS="$CPPFLAGS -I../libiconv/include"
+        LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <iconv.h>
@@ -7180,29 +8559,34 @@ int
 main ()
 {
 iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_func_iconv=yes
+  INCICONV="-I../libiconv/include"
+          LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
+          LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
+          am_cv_lib_iconv=yes
+          am_cv_func_iconv=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+        CPPFLAGS="$am_save_CPPFLAGS"
+        LIBS="$am_save_LIBS"
+        if test "$am_cv_func_iconv" = "yes"; then
+          break
+        fi
+      done
     fi
 
-    # If iconv was not in libc, try -liconv.  In this case, arrange to
-    # look in the libiconv prefix, if it was specified by the user.
     if test "$am_cv_func_iconv" != yes; then
       am_save_CPPFLAGS="$CPPFLAGS"
       am_save_LIBS="$LIBS"
-      if test -n "$LIBICONV_INCLUDE"; then
-        CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
-        LIBS="$LIBS $LIBICONV_LIBDIR"
-      fi
-      LIBS="$LIBS -liconv"
+      CPPFLAGS="$LIBS $INCICONV"
+      LIBS="$LIBS $LIBICONV"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
@@ -7223,35 +8607,54 @@ if ac_fn_c_try_link "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-      LIBS="$am_save_LIBS"
       CPPFLAGS="$am_save_CPPFLAGS"
+      LIBS="$am_save_LIBS"
     fi
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
 $as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
 
-  # Set the various flags based on the cache variables.  We can't rely
-  # on the flags to remain set from the above code, due to caching.
-  LIBICONV=
+  fi
   if test "$am_cv_lib_iconv" = yes; then
-    LIBICONV="-liconv"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
   else
-    LIBICONV_LIBDIR=
-    LIBICONV_INCLUDE=
+    LIBICONV=
+    LTLIBICONV=
   fi
-  if test "$am_cv_use_build_libiconv" = yes; then
-    LIBICONV="$am_cv_build_libiconv_path"
-    LIBICONV_LIBDIR=""
-    LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
-  fi
-  CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
-  LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
 
-  if test "$am_cv_func_iconv" = yes; then
 
-$as_echo "#define HAVE_ICONV 1" >>confdefs.h
 
+  if test "$am_cv_func_iconv" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
 $as_echo_n "checking for iconv declaration... " >&6; }
     if test "${am_cv_proto_iconv+set}" = set; then :
@@ -7452,7 +8855,7 @@ fi
 
 # Since GDB uses Readline, we need termcap functionality.  In many
 # cases this will be provided by the curses library, but some systems
-# have a seperate termcap library, or no curses library at all.
+# have a separate termcap library, or no curses library at all.
 
 case $host_os in
   cygwin*)
@@ -7752,206 +9155,48 @@ _ACEOF
 
 
 
-  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-     if test "x$prefix" = xNONE; then
-     	test_prefix=/usr/local
-     else
-	test_prefix=$prefix
-     fi
-  else
-     test_prefix=$exec_prefix
-  fi
-  value=0
-  case ${ac_define_dir} in
-     "${test_prefix}"|"${test_prefix}/"*|\
-	'${exec_prefix}'|'${exec_prefix}/'*)
-     value=1
-     ;;
-  esac
-
-cat >>confdefs.h <<_ACEOF
-#define JIT_READER_DIR_RELOCATABLE $value
-_ACEOF
-
-
-
-
-
-# Check whether --with-expat was given.
-if test "${with_expat+set}" = set; then :
-  withval=$with_expat;
-else
-  with_expat=auto
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
-$as_echo_n "checking whether to use expat... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
-$as_echo "$with_expat" >&6; }
-
-if test "${with_expat}" = no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
-$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
-  HAVE_LIBEXPAT=no
-else
-
-      if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | [A-Za-z]:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${acl_cv_path_LD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${acl_cv_prog_gnu_ld+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  acl_cv_prog_gnu_ld=yes
-else
-  acl_cv_prog_gnu_ld=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-$as_echo "$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
-
-
-
-                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if test "${acl_cv_rpath+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+     if test "x$prefix" = xNONE; then
+     	test_prefix=/usr/local
+     else
+	test_prefix=$prefix
+     fi
+  else
+     test_prefix=$exec_prefix
+  fi
+  value=0
+  case ${ac_define_dir} in
+     "${test_prefix}"|"${test_prefix}/"*|\
+	'${exec_prefix}'|'${exec_prefix}/'*)
+     value=1
+     ;;
+  esac
 
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
+cat >>confdefs.h <<_ACEOF
+#define JIT_READER_DIR_RELOCATABLE $value
+_ACEOF
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-    # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
-  enableval=$enable_rpath; :
+
+
+
+
+# Check whether --with-expat was given.
+if test "${with_expat+set}" = set; then :
+  withval=$with_expat;
 else
-  enable_rpath=yes
+  with_expat=auto
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
+$as_echo_n "checking whether to use expat... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
+$as_echo "$with_expat" >&6; }
 
+if test "${with_expat}" = no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
+$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
+  HAVE_LIBEXPAT=no
+else
 
 
 
@@ -9027,6 +10272,14 @@ else
   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
 fi
 
+# Work around Python http://bugs.python.org/issue10112.  See also
+# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
+# no effect.  Note that the only test after this that uses Python is
+# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
+# run without -export-dynamic too.
+PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
+
+
 
 
  if test "${have_libpython}" != no; then
@@ -9683,10 +10936,34 @@ fi
 $as_echo "$with_intel_pt" >&6; }
 
 if test "${with_intel_pt}" = no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&5
-$as_echo "$as_me: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
+$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
   HAVE_LIBIPT=no
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <linux/perf_event.h>
+#ifndef PERF_ATTR_SIZE_VER5
+# error
+#endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  perf_event=yes
+else
+  perf_event=no
+fi
+rm -f conftest.err conftest.$ac_ext
+  if test "$perf_event" != yes; then
+    if test "$with_intel_pt" = yes; then
+      as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
+$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
+    fi
+  fi
+
 
 
 
@@ -10641,39 +11918,6 @@ fi
 # Checks for types.  #
 # ------------------ #
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
-else
-  ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
 #include <sys/socket.h>
 
@@ -11856,7 +13100,7 @@ fi
 done
 
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair
+  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -11926,8 +13170,24 @@ if test $gdb_cv_func_sigsetjmp = yes; th
 fi
 
 
-# Check the return and argument types of ptrace.  No canned test for
-# this, so roll our own.
+# Check the return and argument types of ptrace.
+
+
+for ac_header in sys/ptrace.h ptrace.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
 gdb_ptrace_headers='
 #include <sys/types.h>
 #if HAVE_SYS_PTRACE_H
@@ -12025,7 +13285,7 @@ extern long ptrace (enum __ptrace_reques
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gdb_cv_func_ptrace_args='int,int,long,long'
+  gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
 else
 
 for gdb_arg1 in 'int' 'long'; do
@@ -12091,6 +13351,11 @@ IFS=$ac_save_IFS
 shift
 
 cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
 #define PTRACE_TYPE_ARG3 $3
 _ACEOF
 
@@ -12107,6 +13372,7 @@ _ACEOF
 
 fi
 
+
 if test "$cross_compiling" = no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
@@ -12321,7 +13587,8 @@ fi
 
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
-ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
+ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
+#include <machine/reg.h>
 "
 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
 
@@ -12331,7 +13598,8 @@ _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
+ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
+#include <machine/reg.h>
 "
 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
 
@@ -12502,6 +13770,36 @@ if test $gdb_cv_have_pt_getxmmregs = yes
 
 fi
 
+# See if <sys/ptrace.h> supports LWP names on FreeBSD
+# Older FreeBSD versions don't have the pl_tdname member of
+# `struct ptrace_lwpinfo'.
+ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
+"
+if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
+_ACEOF
+
+
+fi
+
+
+# See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
+# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
+# FreeBSD 10.3.
+ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
+"
+if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
+_ACEOF
+
+
+fi
+
+
 # Detect which type of /proc is in use, such as for Solaris.
 
 if test "${target}" = "${host}"; then
@@ -12516,12 +13814,6 @@ if test "${target}" = "${host}"; then
 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
 
       ;;
-  mips-sgi-irix5*)
-      # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
-
-$as_echo "#define _KMEMUSER 1" >>confdefs.h
-
-      ;;
   esac
 fi
 
@@ -13288,16 +14580,24 @@ rm -f core conftest.err conftest.$ac_obj
      # libpythonX.Y.a would get its symbols required for
      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
      # Problem does not happen for the recommended libpythonX.Y.so linkage.
+
+     # Note the workaround for Python
+     # http://bugs.python.org/issue10112 earlier has removed
+     # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
+     # here too, as otherwise it'd make this -Wl,--dynamic-list test
+     # always pass.
      old_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
      old_LIBS="$LIBS"
      LIBS="$LIBS $PYTHON_LIBS"
+     old_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
      if test "$cross_compiling" = yes; then :
   true
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include "${have_libpython}/Python.h"
+#include "Python.h"
 int
 main ()
 {
@@ -13319,6 +14619,7 @@ fi
 
      LIBS="$old_LIBS"
      CFLAGS="$old_CFLAGS"
+     CPPFLAGS="$old_CPPFLAGS"
    fi
    LDFLAGS="$old_LDFLAGS"
 fi
@@ -13595,46 +14896,6 @@ if test "x$gdb_cv_thread_db_h_has_td_not
 
 fi
 
-if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
-$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
-if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/syscall.h>
-int
-main ()
-{
-int i = __NR_tkill;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gdb_cv_sys_syscall_h_has_tkill=yes
-else
-  gdb_cv_sys_syscall_h_has_tkill=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
-$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
-fi
-if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
-  ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
-if test "x$ac_cv_func_syscall" = x""yes; then :
-
-$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
-
-
-fi
-
-fi
-
 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
 "
 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
@@ -13821,6 +15082,7 @@ _ACEOF
 
 
 
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -13831,11 +15093,8 @@ if test "${enable_werror+set}" = set; th
 fi
 
 
-# Enable -Werror by default when using gcc in C mode.  Leave it off
-# for C++ until we're warning clean.  Turn it off for releases.
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
-   && test x"$enable_build_with_cxx" != x"yes" \
-   && $development; then
+# Enable -Werror by default when using gcc.  Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
     ERROR_ON_WARNING=yes
 fi
 
@@ -13844,21 +15103,12 @@ if test "${ERROR_ON_WARNING}" = yes ; th
     WERROR_CFLAGS="-Werror"
 fi
 
-# These options work in either C or C++ modes.
+# The options we'll try to enable.
 build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
--Wempty-body"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
-   build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
-   build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
--Wdeclaration-after-statement -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-fi
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
+-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
@@ -13900,14 +15150,12 @@ fi
 
 # The set of warnings supported by a C++ compiler is not the same as
 # of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
-    ac_ext=cpp
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
 
 WARN_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -13917,16 +15165,24 @@ then
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
+	# GCC does not complain about -Wno-unknown-warning.  Invert
+	# and test -Wunknown-warning instead.
+	case $w in
+	-Wno-*)
+		wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+	*)
+		wtest=$w ;;
+	esac
+
 	case $w in
 	-Werr*) WERROR_CFLAGS=-Werror ;;
 	*)
 	    # Check whether GCC accepts it.
 	    saved_CFLAGS="$CFLAGS"
-	    CFLAGS="$CFLAGS $w"
+	    CFLAGS="$CFLAGS $wtest"
 	    saved_CXXFLAGS="$CXXFLAGS"
-	    CXXFLAGS="$CXXFLAGS $w"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	    CXXFLAGS="$CXXFLAGS $wtest"
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -13951,14 +15207,13 @@ fi
 
 
 
-if test "$enable_build_with_cxx" = "yes"; then
-   ac_ext=c
+ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
+
 
 # In the Cygwin environment, we need some additional flags.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
@@ -15419,6 +16674,16 @@ if test "${ignore_sim}" = "false"; then
 
 $as_echo "#define WITH_SIM 1" >>confdefs.h
 
+
+    # Some tdep code should only be compiled in when the ppc sim is
+    # built.  PR sim/13418.
+    case $target in
+      powerpc*-*-*)
+
+$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
+
+	;;
+    esac
   fi
 fi
 
@@ -15995,6 +17260,7 @@ struct bt_iter_pos *pos = bt_iter_get_po
 			struct bt_ctf_event *event = NULL;
 			const struct bt_definition *scope;
 
+			pos->type = BT_SEEK_BEGIN;
 			bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
 			scope = bt_ctf_get_top_level_scope (event,
 			      				   BT_STREAM_EVENT_HEADER);
@@ -16071,6 +17337,59 @@ _ACEOF
 fi
 
 
+for ac_prog in xsltproc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XSLTPROC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XSLTPROC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XSLTPROC=$ac_cv_path_XSLTPROC
+if test -n "$XSLTPROC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$XSLTPROC" && break
+done
+test -n "$XSLTPROC" || XSLTPROC="missing"
+
+if test "x$USE_MAINTAINER_MODE" = xyes; then
+  if test "${XSLTPROC}" = missing; then
+    as_fn_error "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
+  fi
+fi
+
+
 ac_sources="$files"
 ac_dests="$links"
 while test -n "$ac_sources"; do
@@ -16087,6 +17406,14 @@ ac_config_links="$ac_config_links $ac_co
 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
 
 
+if $development; then
+
+$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
+
+  CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
+  CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
+fi
+
 
   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
@@ -16105,10 +17432,8 @@ ac_config_links="$ac_config_links $ac_co
 
 ac_config_files="$ac_config_files gcore"
 
-
 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
 
-ac_config_commands="$ac_config_commands default"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -16211,10 +17536,6 @@ if test -z "${MAINTAINER_MODE_TRUE}" && 
   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
-  as_fn_error "conditional \"GMAKE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16829,7 +18150,6 @@ do
     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
-    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -17447,7 +18767,25 @@ which seems to be undefined.  Please mak
   case $ac_file$ac_mode in
     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
     "gcore":F) chmod +x gcore ;;
-    "default":C)
+    "Makefile":F)
+case x$CONFIG_HEADERS in
+xconfig.h:config.in)
+echo > stamp-h ;;
+esac
+ ;;
+    "gdb-gdb.gdb":F)
+case x$CONFIG_HEADERS in
+xconfig.h:config.in)
+echo > stamp-h ;;
+esac
+ ;;
+    "doc/Makefile":F)
+case x$CONFIG_HEADERS in
+xconfig.h:config.in)
+echo > stamp-h ;;
+esac
+ ;;
+    "data-directory/Makefile":F)
 case x$CONFIG_HEADERS in
 xconfig.h:config.in)
 echo > stamp-h ;;
@@ -17636,5 +18974,3 @@ if test -n "$ac_unrecognized_opts" && te
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
-
-exit 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.ac ./gdb/configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.ac	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/configure.ac	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
@@ -38,24 +38,14 @@ AC_CONFIG_AUX_DIR(..)
 AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 
-# See if we are building with C++, and substitute COMPILER.
-GDB_AC_BUILD_WITH_CXX
+# We require a C++11 compiler.  Check if one is available, and if
+# necessary, set CXX_DIALECT to some -std=xxx switch.
+AX_CXX_COMPILE_STDCXX(11, , mandatory)
 
 # Dependency checking.
 ZW_CREATE_DEPDIR
 ZW_PROG_COMPILER_DEPENDENCIES([CC])
 
-# Check for the 'make' the user wants to use.
-AC_CHECK_PROGS(MAKE, make)
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
-AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
-AC_PROG_MAKE_SET
-
 gnulib_extra_configure_args=
 # If large-file support is disabled, make sure gnulib does the same.
 if test "$enable_largefile" = no; then
@@ -535,7 +525,8 @@ AC_SEARCH_LIBS(socketpair, socket)
 AM_ZLIB
 
 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
-AC_SEARCH_LIBS(kinfo_getvmmap, util,
+# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
+AC_SEARCH_LIBS(kinfo_getvmmap, util util-freebsd,
   [AC_DEFINE(HAVE_KINFO_GETVMMAP, 1,
             [Define to 1 if your system has the kinfo_getvmmap function. ])])
 
@@ -606,7 +597,7 @@ fi
 
 # Since GDB uses Readline, we need termcap functionality.  In many
 # cases this will be provided by the curses library, but some systems
-# have a seperate termcap library, or no curses library at all.
+# have a separate termcap library, or no curses library at all.
 
 case $host_os in
   cygwin*)
@@ -1024,6 +1015,14 @@ else
   CONFIG_OBS="$CONFIG_OBS python.o"
   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
 fi
+
+# Work around Python http://bugs.python.org/issue10112.  See also
+# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
+# no effect.  Note that the only test after this that uses Python is
+# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
+# run without -export-dynamic too.
+PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
+
 AC_SUBST(PYTHON_CFLAGS)
 AC_SUBST(PYTHON_CPPFLAGS)
 AC_SUBST(PYTHON_LIBS)
@@ -1243,15 +1242,29 @@ if test "$ENABLE_LIBMCHECK" = "yes" \
 fi
 
 AC_ARG_WITH(intel_pt,
-  AS_HELP_STRING([--with-intel-pt], [include Intel(R) Processor Trace support (auto/yes/no)]),
+  AS_HELP_STRING([--with-intel-pt], [include Intel Processor Trace support (auto/yes/no)]),
   [], [with_intel_pt=auto])
 AC_MSG_CHECKING([whether to use intel pt])
 AC_MSG_RESULT([$with_intel_pt])
 
 if test "${with_intel_pt}" = no; then
-  AC_MSG_WARN([Intel(R) Processor Trace support disabled; some features may be unavailable.])
+  AC_MSG_WARN([Intel Processor Trace support disabled; some features may be unavailable.])
   HAVE_LIBIPT=no
 else
+  AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
+#include <linux/perf_event.h>
+#ifndef PERF_ATTR_SIZE_VER5
+# error
+#endif
+  ]]), [perf_event=yes], [perf_event=no])
+  if test "$perf_event" != yes; then
+    if test "$with_intel_pt" = yes; then
+      AC_MSG_ERROR([linux/perf_event.h missing or too old])
+    else
+      AC_MSG_WARN([linux/perf_event.h missing or too old; some features may be unavailable.])
+    fi
+  fi
+
   AC_LIB_HAVE_LINKFLAGS([ipt], [], [#include "intel-pt.h"], [pt_insn_alloc_decoder (0);])
   if test "$HAVE_LIBIPT" != yes; then
     if test "$with_intel_pt" = yes; then
@@ -1325,7 +1338,6 @@ AC_CHECK_MEMBERS([struct stat.st_blocks,
 # Checks for types.  #
 # ------------------ #
 
-AC_TYPE_SIGNAL
 AC_CHECK_TYPES(socklen_t, [], [],
 [#include <sys/types.h>
 #include <sys/socket.h>
@@ -1355,75 +1367,8 @@ AC_CHECK_FUNCS([getauxval getrusage getu
 AM_LANGINFO_CODESET
 GDB_AC_COMMON
 
-# Check the return and argument types of ptrace.  No canned test for
-# this, so roll our own.
-gdb_ptrace_headers='
-#include <sys/types.h>
-#if HAVE_SYS_PTRACE_H
-# include <sys/ptrace.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-'
-# There is no point in checking if we don't have a prototype.
-AC_CHECK_DECLS(ptrace, [], [
-  : ${gdb_cv_func_ptrace_ret='int'}
-  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
-], $gdb_ptrace_headers)
-# Check return type.  Varargs (used on GNU/Linux) conflict with the
-# empty argument list, so check for that explicitly.
-AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
-  AC_TRY_COMPILE($gdb_ptrace_headers,
-    [extern long ptrace (enum __ptrace_request, ...);],
-    gdb_cv_func_ptrace_ret='long',
-    AC_TRY_COMPILE($gdb_ptrace_headers,
-      [extern int ptrace ();],
-      gdb_cv_func_ptrace_ret='int',
-      gdb_cv_func_ptrace_ret='long')))
-AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
-  [Define as the return type of ptrace.])
-# Check argument types.
-AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
-  AC_TRY_COMPILE($gdb_ptrace_headers,
-    [extern long ptrace (enum __ptrace_request, ...);],
-    [gdb_cv_func_ptrace_args='int,int,long,long'],[
-for gdb_arg1 in 'int' 'long'; do
- for gdb_arg2 in 'pid_t' 'int' 'long'; do
-  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
-   for gdb_arg4 in 'int' 'long' 'void *'; do
-     AC_TRY_COMPILE($gdb_ptrace_headers, [
-extern $gdb_cv_func_ptrace_ret
-  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
-], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
-    break 4;])
-    for gdb_arg5 in 'int *' 'int' 'long'; do
-     AC_TRY_COMPILE($gdb_ptrace_headers, [
-extern $gdb_cv_func_ptrace_ret
-  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
-], [
-gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
-    break 5;])
-    done
-   done
-  done
- done
-done
-# Provide a safe default value.
-: ${gdb_cv_func_ptrace_args='int,int,long,long'}
-])])
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
-AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3],
-  [Define to the type of arg 3 for ptrace.])
-AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG4, $[4],
-  [Define to the type of arg 4 for ptrace.])
-if test -n "$[5]"; then
-  AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5],
-    [Define to the type of arg 5 for ptrace.])
-fi
+# Check the return and argument types of ptrace.
+GDB_AC_PTRACE
 
 dnl AC_FUNC_SETPGRP does not work when cross compiling
 dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
@@ -1502,7 +1447,8 @@ fi
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
-                 [#include <machine/reg.h>])
+                 [#include <sys/types.h>
+#include <machine/reg.h>])
 
 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
 # Older amd64 Linux's don't have the fs_base and gs_base members of
@@ -1564,6 +1510,18 @@ if test $gdb_cv_have_pt_getxmmregs = yes
   [Define if sys/ptrace.h defines the PT_GETXMMREGS request.])
 fi
 
+# See if <sys/ptrace.h> supports LWP names on FreeBSD
+# Older FreeBSD versions don't have the pl_tdname member of
+# `struct ptrace_lwpinfo'.
+AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_tdname], [], [],
+                 [#include <sys/ptrace.h>])
+
+# See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
+# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
+# FreeBSD 10.3.
+AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_syscall_code], [], [],
+                 [#include <sys/ptrace.h>])
+
 # Detect which type of /proc is in use, such as for Solaris.
 
 if test "${target}" = "${host}"; then
@@ -1576,12 +1534,6 @@ if test "${target}" = "${host}"; then
       AC_DEFINE(NEW_PROC_API, 1,
       [Define if you want to use new multi-fd /proc interface.])
       ;;
-  mips-sgi-irix5*)
-      # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
-      AC_DEFINE([_KMEMUSER], 1,
-      [Define to 1 so <sys/proc.h> gets a definition of anon_hdl.  Works
-       around a <sys/proc.h> problem on IRIX 5.])
-      ;;
   esac
 fi
 
@@ -1764,13 +1716,21 @@ if test "${gdb_native}" = yes; then
      # libpythonX.Y.a would get its symbols required for
      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
      # Problem does not happen for the recommended libpythonX.Y.so linkage.
+
+     # Note the workaround for Python
+     # http://bugs.python.org/issue10112 earlier has removed
+     # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
+     # here too, as otherwise it'd make this -Wl,--dynamic-list test
+     # always pass.
      old_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
      old_LIBS="$LIBS"
      LIBS="$LIBS $PYTHON_LIBS"
+     old_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
      AC_RUN_IFELSE(
        AC_LANG_PROGRAM(
-         [#include "]${have_libpython}[/Python.h"],
+         [#include "Python.h"],
          [int err;
           Py_Initialize ();
           err = PyRun_SimpleString ("import itertools\n");
@@ -1779,6 +1739,7 @@ if test "${gdb_native}" = yes; then
        [dynamic_list=true], [], [true])
      LIBS="$old_LIBS"
      CFLAGS="$old_CFLAGS"
+     CPPFLAGS="$old_CPPFLAGS"
    fi
    LDFLAGS="$old_LDFLAGS"
 fi
@@ -1904,25 +1865,6 @@ if test "x$gdb_cv_thread_db_h_has_td_not
             [Define if <thread_db.h> has the TD_NOTLS error code.])
 fi
 
-dnl See if we have a sys/syscall header file that has __NR_tkill.
-if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
-   AC_CACHE_CHECK([whether <sys/syscall.h> has __NR_tkill],
-                  gdb_cv_sys_syscall_h_has_tkill,
-     AC_TRY_COMPILE(
-       [#include <sys/syscall.h>],
-       [int i = __NR_tkill;],
-       gdb_cv_sys_syscall_h_has_tkill=yes,
-       gdb_cv_sys_syscall_h_has_tkill=no
-     )
-   )
-fi
-dnl See if we can issue tkill syscall.
-if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
-  AC_CHECK_FUNC(syscall,
-    AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.])
-  )
-fi
-
 dnl Check if we can disable the virtual address space randomization.
 dnl The functionality of setarch -R.
 AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
@@ -1978,113 +1920,7 @@ GDB_AC_WITH_DIR(SYSTEM_GDBINIT, system-g
     [automatically load a system-wide gdbinit file],
     [])
 
-AC_ARG_ENABLE(werror,
-  AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
-  [case "${enableval}" in
-     yes | y) ERROR_ON_WARNING="yes" ;;
-     no | n)  ERROR_ON_WARNING="no" ;;
-     *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
-   esac])
-
-# Enable -Werror by default when using gcc in C mode.  Leave it off
-# for C++ until we're warning clean.  Turn it off for releases.
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
-   && test x"$enable_build_with_cxx" != x"yes" \
-   && $development; then
-    ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-    WERROR_CFLAGS="-Werror"
-fi
-
-# These options work in either C or C++ modes.
-build_warnings="-Wall -Wpointer-arith \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts \
--Wempty-body"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
-   build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
-   build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
--Wdeclaration-after-statement -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-fi
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
-  *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
-  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-AC_ARG_ENABLE(build-warnings,
-AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings if gcc is used]),
-[case "${enableval}" in
-  yes)	;;
-  no)	build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi])dnl
-AC_ARG_ENABLE(gdb-build-warnings,
-AS_HELP_STRING([--enable-gdb-build-warnings], [enable GDB specific build-time compiler warnings if gcc is used]),
-[case "${enableval}" in
-  yes)	;;
-  no)	build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi])dnl
-
-# The set of warnings supported by a C++ compiler is not the same as
-# of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
-    AC_LANG_PUSH([C++])
-fi
-
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
-    AC_MSG_CHECKING(compiler warning flags)
-    # Separate out the -Werror flag as some files just cannot be
-    # compiled with it enabled.
-    for w in ${build_warnings}; do
-	case $w in
-	-Werr*) WERROR_CFLAGS=-Werror ;;
-	*)
-	    # Check whether GCC accepts it.
-	    saved_CFLAGS="$CFLAGS"
-	    CFLAGS="$CFLAGS $w"
-	    saved_CXXFLAGS="$CXXFLAGS"
-	    CXXFLAGS="$CXXFLAGS $w"
-	    AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
-	    CFLAGS="$saved_CFLAGS"
-	    CXXFLAGS="$saved_CXXFLAGS"
-	esac
-    done
-    AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS})
-fi
-AC_SUBST(WARN_CFLAGS)
-AC_SUBST(WERROR_CFLAGS)
-
-if test "$enable_build_with_cxx" = "yes"; then
-   AC_LANG_POP([C++])
-fi
+AM_GDB_WARNINGS
 
 # In the Cygwin environment, we need some additional flags.
 AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
@@ -2327,6 +2163,14 @@ if test "${ignore_sim}" = "false"; then
     SIM="${gdb_sim}"
     SIM_OBS="remote-sim.o"
     AC_DEFINE(WITH_SIM, 1, [Define if the simulator is being linked in.])
+
+    # Some tdep code should only be compiled in when the ppc sim is
+    # built.  PR sim/13418.
+    case $target in
+      powerpc*-*-*)
+	AC_DEFINE(WITH_PPC_SIM, 1, [Define if the PPC simulator is being linked in.])
+	;;
+    esac
   fi
 fi
 AC_SUBST(SIM)
@@ -2449,6 +2293,7 @@ else
 			struct bt_ctf_event *event = NULL;
 			const struct bt_definition *scope;
 
+			pos->type = BT_SEEK_BEGIN;
 			bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
 			scope = bt_ctf_get_top_level_scope (event,
 			      				   BT_STREAM_EVENT_HEADER);
@@ -2483,6 +2328,15 @@ if test "${nativefile}" != ""; then
 fi
 AC_SUBST(GDB_NM_FILE)
 
+dnl Add dependency for xsltproc if building with maintainer-mode enabled.
+AC_PATH_PROGS(XSLTPROC, xsltproc, missing)
+if test "x$USE_MAINTAINER_MODE" = xyes; then
+  if test "${XSLTPROC}" = missing; then
+    AC_ERROR(unable to find xsltproc.  maintainer-mode requires xsltproc.)
+  fi
+fi
+AC_SUBST(XSLTPROC)
+
 AC_LINK_FILES($files, $links)
 
 dnl Check for exe extension set on certain hosts (e.g. Win32)
@@ -2493,11 +2347,17 @@ dnl  At the moment, we just assume it's 
 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
           [Define to be a string naming the default host character set.])
 
+if $development; then
+  AC_DEFINE(GDB_SELF_TEST, 1,
+            [Define if self-testing features should be enabled])
+  CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
+  CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
+fi
+
 GDB_AC_TRANSFORM([gdb], [GDB_TRANSFORM_NAME])
 GDB_AC_TRANSFORM([gcore], [GCORE_TRANSFORM_NAME])
 AC_CONFIG_FILES([gcore], [chmod +x gcore])
-
-AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile,
+AC_CONFIG_FILES([Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile],
 [
 case x$CONFIG_HEADERS in
 xconfig.h:config.in)
@@ -2505,4 +2365,4 @@ echo > stamp-h ;;
 esac
 ])
 
-exit 0
+AC_OUTPUT
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.host ./gdb/configure.host
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.host	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/configure.host	2017-03-06 01:49:07.000000000 +0000
@@ -129,6 +129,7 @@ m88*-*-openbsd*)	gdb_host=obsd ;;
 mips*-*-linux*)		gdb_host=linux ;;
 mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
 			gdb_host=nbsd ;;
+mips*-*-freebsd*)	gdb_host=fbsd ;;
 mips64*-*-openbsd*)	gdb_host=obsd64 ;;
 
 powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*)
@@ -195,7 +196,7 @@ esac
 # "double" and "long double" types.
 
 case "${host}" in
-i[34567]86-*-*)
+i[34567]86-*-*|x86_64-*-*)
 	gdb_host_float_format="&floatformat_ieee_single_little"
 	gdb_host_double_format="&floatformat_ieee_double_little"
 	gdb_host_long_double_format="&floatformat_i387_ext"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.tgt ./gdb/configure.tgt
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/configure.tgt	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/configure.tgt	2017-03-06 01:49:07.000000000 +0000
@@ -26,6 +26,7 @@ case $targ in
  sh*-*-pe | \
  hppa*-*-hpux* | \
  ia64-*-hpux* | \
+ *-*-vxworks* | \
  null)
     echo "*** Configuration $targ is obsolete." >&2
     echo "*** Support has been REMOVED." >&2
@@ -36,14 +37,16 @@ esac
 # map target info into gdb names.
 
 case "${targ}" in
-aarch64*-*-elf)
+aarch64*-*-elf | aarch64*-*-rtems*)
 	# Target: AArch64 embedded system
-	gdb_target_obs="aarch64-tdep.o aarch64-newlib-tdep.o"
+	gdb_target_obs="aarch64-tdep.o aarch64-newlib-tdep.o aarch64-insn.o"
 	;;
 
 aarch64*-*-linux*)
 	# Target: AArch64 linux
-	gdb_target_obs="aarch64-tdep.o aarch64-linux-tdep.o \
+	gdb_target_obs="aarch64-tdep.o aarch64-linux-tdep.o aarch64-insn.o \
+			arm.o arm-linux.o arm-get-next-pcs.o arm-tdep.o \
+			arm-linux-tdep.o \
 			glibc-tdep.o linux-tdep.o solib-svr4.o \
 			symfile-mem.o linux-record.o"
 	build_gdbserver=yes
@@ -56,18 +59,18 @@ alpha*-*-linux*)
 	;;
 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
 	# Target: FreeBSD/alpha
-	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
-			alphafbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \
+			alpha-fbsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
 	# Target: NetBSD/alpha
-	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
-			alphanbsd-tdep.o nbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \
+			alpha-nbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-openbsd*)
 	# Target: OpenBSD/alpha
-	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
-			alphanbsd-tdep.o alphaobsd-tdep.o nbsd-tdep.o \
+	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \
+			alpha-nbsd-tdep.o alpha-obsd-tdep.o nbsd-tdep.o \
 			obsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-*)
@@ -81,33 +84,46 @@ am33_2.0*-*-linux*)
 			solib-svr4.o"
 	;;
 
+arc*-*-elf32)
+	# Target: baremetal ARC elf32 (newlib) target
+	gdb_target_obs="arc-newlib-tdep.o arc-tdep.o"
+	;;
+
+arc*-*-*)
+	# Target: Unidentified ARC target
+	gdb_target_obs="arc-tdep.o"
+	;;
+
 arm*-wince-pe | arm*-*-mingw32ce*)
 	# Target: ARM based machine running Windows CE (win32)
-	gdb_target_obs="arm-tdep.o arm-wince-tdep.o windows-tdep.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o \
+			arm-wince-tdep.o windows-tdep.o"
 	build_gdbserver=yes
 	;;
 arm*-*-linux*)
 	# Target: ARM based machine running GNU/Linux
-	gdb_target_obs="arm-tdep.o arm-linux-tdep.o glibc-tdep.o \
+	gdb_target_obs="arm.o arm-linux.o arm-get-next-pcs.o arm-tdep.o \
+                        arm-linux-tdep.o glibc-tdep.o \
 			solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o"
 	build_gdbserver=yes
 	;;
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
 	# Target: NetBSD/arm
-	gdb_target_obs="arm-tdep.o armnbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-nbsd-tdep.o \
+			solib-svr4.o"
 	;;
 arm*-*-openbsd*)
 	# Target: OpenBSD/arm
-	gdb_target_obs="arm-tdep.o armbsd-tdep.o armobsd-tdep.o obsd-tdep.o \
-			solib-svr4.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-bsd-tdep.o \
+			arm-obsd-tdep.o obsd-tdep.o solib-svr4.o"
 	;;
 arm*-*-symbianelf*)
 	# Target: SymbianOS/arm
-	gdb_target_obs="arm-tdep.o arm-symbian-tdep.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-symbian-tdep.o"
 	;;
 arm*-*-*)
 	# Target: ARM embedded system
-	gdb_target_obs="arm-tdep.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o"
 	gdb_sim=../sim/arm/libsim.a
 	;;
 
@@ -146,8 +162,8 @@ moxie-*-elf | moxie-*-moxiebox | moxie-*
 	;;
 
 h8300-*-*)
-	# Target: H8300 with HMS monitor and H8 simulator
-	gdb_target_obs="h8300-tdep.o monitor.o dsrec.o"
+	# Target: H8300 processor
+	gdb_target_obs="h8300-tdep.o"
 	gdb_sim=../sim/h8300/libsim.a
 	;;
 
@@ -158,11 +174,11 @@ hppa*-*-linux*)
 	;;
 hppa*-*-netbsd*)
 	# Target: NetBSD/hppa
-	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppanbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="hppa-tdep.o hppa-bsd-tdep.o hppa-nbsd-tdep.o solib-svr4.o"
 	;;
 hppa*-*-openbsd*)
 	# Target: OpenBSD/hppa
-	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppaobsd-tdep.o solib-svr4.o"
+	gdb_target_obs="hppa-tdep.o hppa-bsd-tdep.o hppa-obsd-tdep.o solib-svr4.o"
 	;;
 hppa*-*-*)
 	# Target: HP PA-RISC
@@ -184,17 +200,17 @@ i[34567]86-*-dicos*)
 	;;
 i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
 	# Target: FreeBSD/i386
-	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
+	gdb_target_obs="i386-tdep.o i387-tdep.o i386-bsd-tdep.o i386-fbsd-tdep.o \
 			bsd-uthread.o fbsd-tdep.o solib-svr4.o"
 	;;
 i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
 	# Target: NetBSD/i386
-	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o \
+	gdb_target_obs="i386-tdep.o i387-tdep.o i386-bsd-tdep.o i386-nbsd-tdep.o \
 			nbsd-tdep.o solib-svr4.o"
 	;;
 i[34567]86-*-openbsd*)
 	# Target: OpenBSD/i386
-	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
+	gdb_target_obs="i386-tdep.o i387-tdep.o i386-bsd-tdep.o i386-obsd-tdep.o \
 			obsd-tdep.o bsd-uthread.o solib-svr4.o"
 	;;
 i[34567]86-*-nto*)
@@ -226,7 +242,7 @@ i[34567]86-*-linux*)
 	;;
 i[34567]86-*-gnu*)
 	# Target: Intel 386 running the GNU Hurd
-	gdb_target_obs="i386-tdep.o i387-tdep.o i386gnu-tdep.o solib-svr4.o"
+	gdb_target_obs="i386-tdep.o i387-tdep.o i386-gnu-tdep.o solib-svr4.o"
 	;;
 i[34567]86-*-cygwin*)
 	# Target: Intel 386 running win32
@@ -280,7 +296,7 @@ m32c-*-*)
 
 m32r*-*-linux*)
 	# Target: Renesas M32R running GNU/Linux
-	gdb_target_obs="m32r-tdep.o m32r-linux-tdep.o remote-m32r-sdi.o \
+	gdb_target_obs="m32r-tdep.o m32r-linux-tdep.o \
 			glibc-tdep.o solib-svr4.o symfile-mem.o \
 			linux-tdep.o"
 	gdb_sim=../sim/m32r/libsim.a
@@ -288,8 +304,7 @@ m32r*-*-linux*)
 	;;
 m32r*-*-*)
 	# Target: Renesas m32r processor
-	gdb_target_obs="m32r-tdep.o monitor.o m32r-rom.o dsrec.o \
-			remote-m32r-sdi.o"
+	gdb_target_obs="m32r-tdep.o"
 	gdb_sim=../sim/m32r/libsim.a
 	;;
 
@@ -301,22 +316,22 @@ m68hc11*-*-*|m6811*-*-*)
 
 m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | m68*-*-uclinux* | \
 fido-*-elf*)
-	# Target: Motorola m68k embedded (e.g. bug monitors)
-	gdb_target_obs="m68k-tdep.o monitor.o dbug-rom.o dsrec.o"
+	# Target: Motorola m68k embedded
+	gdb_target_obs="m68k-tdep.o"
 	;;
 m68*-*-linux*)
 	# Target: Motorola m68k with a.out and ELF
-	gdb_target_obs="m68k-tdep.o m68klinux-tdep.o solib-svr4.o \
+	gdb_target_obs="m68k-tdep.o m68k-linux-tdep.o solib-svr4.o \
 			linux-tdep.o glibc-tdep.o symfile-mem.o"
 	build_gdbserver=yes
 	;;
 m68*-*-netbsd* | m68*-*-knetbsd*-gnu)
 	# Target: NetBSD/m68k
-	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="m68k-tdep.o m68k-bsd-tdep.o solib-svr4.o"
 	;;
 m68*-*-openbsd*)
 	# Target: OpenBSD/m68k
-	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="m68k-tdep.o m68k-bsd-tdep.o solib-svr4.o"
 	;;
 
 m88*-*-openbsd*)
@@ -332,13 +347,13 @@ mep-*-*)
 
 microblaze*-linux-*|microblaze*-*-linux*)
 	# Target: Xilinx MicroBlaze running Linux
-	gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o microblaze-rom.o \
-			monitor.o dsrec.o solib-svr4.o symfile-mem.o linux-tdep.o"
+	gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o solib-svr4.o \
+			symfile-mem.o linux-tdep.o"
 	gdb_sim=../sim/microblaze/libsim.a
 	;;
 microblaze*-*-*)
 	# Target: Xilinx MicroBlaze running standalone
-	gdb_target_obs="microblaze-tdep.o microblaze-rom.o monitor.o dsrec.o"
+	gdb_target_obs="microblaze-tdep.o"
 	gdb_sim=../sim/microblaze/libsim.a
 	;;
 
@@ -351,21 +366,26 @@ mips*-*-linux*)
 	;;
 mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
 	# Target: MIPS running NetBSD
-	gdb_target_obs="mips-tdep.o mipsnbsd-tdep.o solib-svr4.o nbsd-tdep.o"
+	gdb_target_obs="mips-tdep.o mips-nbsd-tdep.o solib-svr4.o nbsd-tdep.o"
+	gdb_sim=../sim/mips/libsim.a
+	;;
+mips*-*-freebsd*)
+	# Target: MIPS running FreeBSD
+	gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o solib-svr4.o fbsd-tdep.o"
 	gdb_sim=../sim/mips/libsim.a
 	;;
 mips64*-*-openbsd*)
 	# Target: OpenBSD/mips64
-	gdb_target_obs="mips-tdep.o mips64obsd-tdep.o obsd-tdep.o solib-svr4.o"
+	gdb_target_obs="mips-tdep.o mips64-obsd-tdep.o obsd-tdep.o solib-svr4.o"
 	;;
 mips*-sde*-elf*)
 	# Target: MIPS SDE
-	gdb_target_obs="mips-tdep.o mips-sde-tdep.o remote-mips.o"
+	gdb_target_obs="mips-tdep.o mips-sde-tdep.o"
 	gdb_sim=../sim/mips/libsim.a
 	;;
 mips*-*-elf)
 	# Target: MIPS ELF
-	gdb_target_obs="mips-tdep.o remote-mips.o"
+	gdb_target_obs="mips-tdep.o"
 	gdb_sim=../sim/mips/libsim.a
 	;;
 mips*-*-*)
@@ -390,6 +410,11 @@ mt-*-*)
 	gdb_target_obs="mt-tdep.o"
 	;;
 
+nds32*-*-elf)
+	# Target: AndesTech NDS32 core
+	gdb_target_obs="nds32-tdep.o"
+	;;
+
 nios2*-*-linux*)
 	# Target: Altera Nios II running Linux
 	gdb_target_obs="nios2-tdep.o nios2-linux-tdep.o solib-svr4.o \
@@ -404,20 +429,20 @@ nios2*-*-*)
 powerpc*-*-freebsd*)
 	# Target: FreeBSD/powerpc
 	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \
-		        ppcfbsd-tdep.o fbsd-tdep.o solib-svr4.o \
+		        ppc-fbsd-tdep.o fbsd-tdep.o solib-svr4.o \
 			ravenscar-thread.o ppc-ravenscar-thread.o"
 	;;
 
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
 	# Target: NetBSD/powerpc
-	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppcnbsd-tdep.o \
+	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc-nbsd-tdep.o \
 			solib-svr4.o \
 			ravenscar-thread.o ppc-ravenscar-thread.o"
 	gdb_sim=../sim/ppc/libsim.a
 	;;
 powerpc-*-openbsd*)
 	# Target: OpenBSD/powerpc
-	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppcobsd-tdep.o \
+	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc-obsd-tdep.o \
 			solib-svr4.o \
 			ravenscar-thread.o ppc-ravenscar-thread.o"
 	;;
@@ -441,22 +466,20 @@ powerpc*-*-linux*)
 powerpc-*-lynx*178)
 	# Target: PowerPC running Lynx178.
 	gdb_target_obs="rs6000-tdep.o rs6000-lynx178-tdep.o \
-			xcoffread.o monitor.o dsrec.o ppc-sysv-tdep.o \
+			xcoffread.o ppc-sysv-tdep.o \
 			ravenscar-thread.o ppc-ravenscar-thread.o"
 	;;
 powerpc*-*-*)
 	# Target: PowerPC running eabi
-	gdb_target_obs="rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o \
-			dink32-rom.o ppc-sysv-tdep.o solib-svr4.o \
+	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o solib-svr4.o \
 			ravenscar-thread.o ppc-ravenscar-thread.o"
-	if test -f ../sim/ppc/Makefile; then
-	  gdb_sim=../sim/ppc/libsim.a
-	fi
+	gdb_sim=../sim/ppc/libsim.a
 	;;
 
 s390*-*-linux*)
 	# Target: S390 running Linux
-	gdb_target_obs="s390-linux-tdep.o solib-svr4.o linux-tdep.o"
+	gdb_target_obs="s390-linux-tdep.o solib-svr4.o linux-tdep.o \
+			linux-record.o"
 	build_gdbserver=yes
 	;;
 
@@ -475,28 +498,25 @@ rx-*-elf)
 score-*-*)
 	# Target: S+core embedded system
 	gdb_target_obs="score-tdep.o"
-	if test -f ../sim/score/Makefile; then
-	  gdb_sim=../sim/score/libsim.a
-	fi
 	build_gdbserver=yes
 	;;
 
 sh*-*-linux*)
 	# Target: GNU/Linux Super-H
-	gdb_target_obs="sh-tdep.o sh64-tdep.o sh-linux-tdep.o monitor.o \
-			dsrec.o solib-svr4.o symfile-mem.o \
+	gdb_target_obs="sh-tdep.o sh64-tdep.o sh-linux-tdep.o \
+			solib-svr4.o symfile-mem.o \
 			glibc-tdep.o linux-tdep.o"
 	gdb_sim=../sim/sh/libsim.a
 	build_gdbserver=yes
 	;;
 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
 	# Target: NetBSD/sh
-	gdb_target_obs="sh-tdep.o shnbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="sh-tdep.o sh-nbsd-tdep.o solib-svr4.o"
 	gdb_sim=../sim/sh/libsim.a
 	;;
 sh*-*-openbsd*)
 	# Target: OpenBSD/sh
-	gdb_target_obs="sh-tdep.o sh64-tdep.o shnbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="sh-tdep.o sh64-tdep.o sh-nbsd-tdep.o solib-svr4.o"
 	;;
 sh64-*-elf*)
 	# Target: Renesas/Super-H 64 bit with simulator
@@ -504,8 +524,8 @@ sh64-*-elf*)
 	gdb_sim=../sim/sh64/libsim.a
 	;;
 sh*)
-	# Target: Embedded Renesas Super-H with ICE and simulator
-	gdb_target_obs="sh-tdep.o sh64-tdep.o monitor.o dsrec.o"
+	# Target: Embedded Renesas Super-H processor
+	gdb_target_obs="sh-tdep.o sh64-tdep.o"
 	gdb_sim=../sim/sh/libsim.a
 	;;
 
@@ -532,32 +552,32 @@ sparc64-*-linux*)
 	;;
 sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
 	# Target: FreeBSD/sparc64
-	gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64fbsd-tdep.o \
+	gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \
 			fbsd-tdep.o solib-svr4.o \
 			ravenscar-thread.o sparc-ravenscar-thread.o"
 	;;
 sparc-*-netbsd* | sparc-*-knetbsd*-gnu)
 	# Target: NetBSD/sparc
-	gdb_target_obs="sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
+	gdb_target_obs="sparc-tdep.o sparc-nbsd-tdep.o nbsd-tdep.o \
 			solib-svr4.o \
 			ravenscar-thread.o sparc-ravenscar-thread.o"
 	;;
 sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
 	# Target: NetBSD/sparc64
-	gdb_target_obs="sparc64-tdep.o sparc64nbsd-tdep.o sparc-tdep.o \
-			sparcnbsd-tdep.o nbsd-tdep.o solib-svr4.o \
+	gdb_target_obs="sparc64-tdep.o sparc64-nbsd-tdep.o sparc-tdep.o \
+			sparc-nbsd-tdep.o nbsd-tdep.o solib-svr4.o \
 			ravenscar-thread.o sparc-ravenscar-thread.o"
 	;;
 sparc-*-openbsd*)
 	# Target: OpenBSD/sparc
-	gdb_target_obs="sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
+	gdb_target_obs="sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \
 			nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o \
 			ravenscar-thread.o sparc-ravenscar-thread.o"
 	;;
 sparc64-*-openbsd*)
 	# Target: OpenBSD/sparc64
-	gdb_target_obs="sparc64-tdep.o sparc64nbsd-tdep.o sparc64obsd-tdep.o \
-			sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
+	gdb_target_obs="sparc64-tdep.o sparc64-nbsd-tdep.o sparc64-obsd-tdep.o \
+			sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \
 			nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o \
 			ravenscar-thread.o sparc-ravenscar-thread.o"
 	;;
@@ -628,11 +648,11 @@ v850*-*-elf | v850*-*-rtems*)
 
 vax-*-netbsd* | vax-*-knetbsd*-gnu)
 	# Target: NetBSD/vax
-	gdb_target_obs="vax-tdep.o vaxnbsd-tdep.o solib-svr4.o"
+	gdb_target_obs="vax-tdep.o solib-svr4.o"
 	;;
 vax-*-openbsd*)
 	# Target: OpenBSD/vax
-	gdb_target_obs="vax-tdep.o vaxobsd-tdep.o"
+	gdb_target_obs="vax-tdep.o"
 	;;
 vax-*-*)
 	# Target: VAX
@@ -651,6 +671,9 @@ x86_64-*-dicos*)
 	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
 			dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o"
 	;;
+x86_64-*-elf*)
+	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o"
+	;;
 x86_64-*-linux*)
 	# Target: GNU/Linux x86-64
 	gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o i386-tdep.o \
@@ -660,8 +683,8 @@ x86_64-*-linux*)
 	;;
 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
 	# Target: FreeBSD/amd64
-	gdb_target_obs="amd64-tdep.o amd64fbsd-tdep.o i386-tdep.o \
-			i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
+	gdb_target_obs="amd64-tdep.o amd64-fbsd-tdep.o i386-tdep.o \
+			i387-tdep.o i386-bsd-tdep.o i386-fbsd-tdep.o \
 			bsd-uthread.o fbsd-tdep.o solib-svr4.o"
 	;;
 x86_64-*-mingw* | x86_64-*-cygwin*)
@@ -673,15 +696,18 @@ x86_64-*-mingw* | x86_64-*-cygwin*)
         ;;
 x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
 	# Target: NetBSD/amd64
-	gdb_target_obs="amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
+	gdb_target_obs="amd64-tdep.o amd64-nbsd-tdep.o i386-tdep.o i387-tdep.o \
 			nbsd-tdep.o solib-svr4.o"
 	;;
 x86_64-*-openbsd*)
 	# Target: OpenBSD/amd64
-	gdb_target_obs="amd64-tdep.o amd64obsd-tdep.o i386-tdep.o \
-			i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
+	gdb_target_obs="amd64-tdep.o amd64-obsd-tdep.o i386-tdep.o \
+			i387-tdep.o i386-bsd-tdep.o i386-obsd-tdep.o \
 			obsd-tdep.o bsd-uthread.o solib-svr4.o"
 	;;
+x86_64-*-rtems*)
+	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o i386-bsd-tdep.o"
+	;;
 xtensa*-*-linux*)	gdb_target=linux
 	# Target: GNU/Linux Xtensa
 	gdb_target_obs="xtensa-tdep.o xtensa-config.o xtensa-linux-tdep.o \
@@ -699,12 +725,12 @@ esac
 
 case "${targ}" in
 *-*-freebsd* | *-*-kfreebsd*-gnu)
-		gdb_osabi=GDB_OSABI_FREEBSD_ELF ;;
+		gdb_osabi=GDB_OSABI_FREEBSD ;;
 *-*-linux* | *-*-uclinux*)
 		gdb_osabi=GDB_OSABI_LINUX ;;
 *-*-nto*)	gdb_osabi=GDB_OSABI_QNXNTO ;;
 m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;;
-*-*-openbsd*)	gdb_osabi=GDB_OSABI_OPENBSD_ELF ;;
+*-*-openbsd*)	gdb_osabi=GDB_OSABI_OPENBSD ;;
 *-*-solaris*)	gdb_osabi=GDB_OSABI_SOLARIS ;;
 *-*-*-gnu*)	;; # prevent non-GNU kernels to match the Hurd rule below
 *-*-gnu*)	gdb_osabi=GDB_OSABI_HURD ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/continuations.c ./gdb/continuations.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/continuations.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/continuations.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Continuations for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -132,193 +132,3 @@ discard_all_inferior_continuations (stru
 {
   discard_my_continuations (&inf->continuations);
 }
-
-/* Add a continuation to the continuation list of THREAD.  The new
-   continuation will be added at the front.  */
-
-void
-add_continuation (struct thread_info *thread,
-		  continuation_ftype *hook, void *args,
-		  continuation_free_arg_ftype *free_arg)
-{
-  make_continuation (&thread->continuations, hook, args, free_arg);
-}
-
-static void
-restore_thread_cleanup (void *arg)
-{
-  ptid_t *ptid_p = arg;
-
-  switch_to_thread (*ptid_p);
-}
-
-/* Walk down the continuation list of PTID, and execute all the
-   continuations.  There is a problem though.  In some cases new
-   continuations may be added while we are in the middle of this loop.
-   If this happens they will be added in the front, and done before we
-   have a chance of exhausting those that were already there.  We need
-   to then save the beginning of the list in a pointer and do the
-   continuations from there on, instead of using the global beginning
-   of list as our iteration pointer.  */
-
-static void
-do_all_continuations_ptid (ptid_t ptid,
-			   struct continuation **continuations_p,
-			   int err)
-{
-  struct cleanup *old_chain;
-  ptid_t current_thread;
-
-  if (*continuations_p == NULL)
-    return;
-
-  current_thread = inferior_ptid;
-
-  /* Restore selected thread on exit.  Don't try to restore the frame
-     as well, because:
-
-     - When running continuations, the selected frame is always #0.
-
-     - The continuations may trigger symbol file loads, which may
-     change the frame layout (frame ids change), which would trigger
-     a warning if we used make_cleanup_restore_current_thread.  */
-
-  old_chain = make_cleanup (restore_thread_cleanup, &current_thread);
-
-  /* Let the continuation see this thread as selected.  */
-  switch_to_thread (ptid);
-
-  do_my_continuations (continuations_p, err);
-
-  do_cleanups (old_chain);
-}
-
-/* Callback for iterate over threads.  */
-
-static int
-do_all_continuations_thread_callback (struct thread_info *thread, void *data)
-{
-  int err = * (int *) data;
-  do_all_continuations_ptid (thread->ptid, &thread->continuations, err);
-  return 0;
-}
-
-/* Do all continuations of thread THREAD.  */
-
-void
-do_all_continuations_thread (struct thread_info *thread, int err)
-{
-  do_all_continuations_thread_callback (thread, &err);
-}
-
-/* Do all continuations of all threads.  */
-
-void
-do_all_continuations (int err)
-{
-  iterate_over_threads (do_all_continuations_thread_callback, &err);
-}
-
-/* Callback for iterate over threads.  */
-
-static int
-discard_all_continuations_thread_callback (struct thread_info *thread,
-					   void *data)
-{
-  discard_my_continuations (&thread->continuations);
-  return 0;
-}
-
-/* Get rid of all the continuations of THREAD.  */
-
-void
-discard_all_continuations_thread (struct thread_info *thread)
-{
-  discard_all_continuations_thread_callback (thread, NULL);
-}
-
-/* Get rid of all the continuations of all threads.  */
-
-void
-discard_all_continuations (void)
-{
-  iterate_over_threads (discard_all_continuations_thread_callback, NULL);
-}
-
-
-/* Add a continuation to the intermediate continuation list of THREAD.
-   The new continuation will be added at the front.  */
-
-void
-add_intermediate_continuation (struct thread_info *thread,
-			       continuation_ftype *hook,
-			       void *args,
-			       continuation_free_arg_ftype *free_arg)
-{
-  make_continuation (&thread->intermediate_continuations, hook,
-		     args, free_arg);
-}
-
-/* Walk down the cmd_continuation list, and execute all the
-   continuations.  There is a problem though.  In some cases new
-   continuations may be added while we are in the middle of this
-   loop.  If this happens they will be added in the front, and done
-   before we have a chance of exhausting those that were already
-   there.  We need to then save the beginning of the list in a pointer
-   and do the continuations from there on, instead of using the
-   global beginning of list as our iteration pointer.  */
-
-static int
-do_all_intermediate_continuations_thread_callback (struct thread_info *thread,
-						   void *data)
-{
-  int err = * (int *) data;
-
-  do_all_continuations_ptid (thread->ptid,
-			     &thread->intermediate_continuations, err);
-  return 0;
-}
-
-/* Do all intermediate continuations of thread THREAD.  */
-
-void
-do_all_intermediate_continuations_thread (struct thread_info *thread, int err)
-{
-  do_all_intermediate_continuations_thread_callback (thread, &err);
-}
-
-/* Do all intermediate continuations of all threads.  */
-
-void
-do_all_intermediate_continuations (int err)
-{
-  iterate_over_threads (do_all_intermediate_continuations_thread_callback,
-			&err);
-}
-
-/* Callback for iterate over threads.  */
-
-static int
-discard_all_intermediate_continuations_thread_callback (struct thread_info *thread,
-							void *data)
-{
-  discard_my_continuations (&thread->intermediate_continuations);
-  return 0;
-}
-
-/* Get rid of all the intermediate continuations of THREAD.  */
-
-void
-discard_all_intermediate_continuations_thread (struct thread_info *thread)
-{
-  discard_all_intermediate_continuations_thread_callback (thread, NULL);
-}
-
-/* Get rid of all the intermediate continuations of all threads.  */
-
-void
-discard_all_intermediate_continuations (void)
-{
-  iterate_over_threads (discard_all_intermediate_continuations_thread_callback,
-			NULL);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/continuations.h ./gdb/continuations.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/continuations.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/continuations.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Continuations for GDB, the GNU debugger.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,6 @@
 #ifndef CONTINUATIONS_H
 #define CONTINUATIONS_H
 
-struct thread_info;
 struct inferior;
 
 /* To continue the execution commands when running gdb asynchronously.
@@ -45,24 +44,6 @@ typedef void (continuation_ftype) (void 
    continuation is called, or discarded.  */
 typedef void (continuation_free_arg_ftype) (void *);
 
-/* Thread specific continuations.  */
-
-extern void add_continuation (struct thread_info *,
-			      continuation_ftype *, void *,
-			      continuation_free_arg_ftype *);
-extern void do_all_continuations (int err);
-extern void do_all_continuations_thread (struct thread_info *, int err);
-extern void discard_all_continuations (void);
-extern void discard_all_continuations_thread (struct thread_info *);
-
-extern void add_intermediate_continuation (struct thread_info *,
-					   continuation_ftype *, void *,
-					   continuation_free_arg_ftype *);
-extern void do_all_intermediate_continuations (int err);
-extern void do_all_intermediate_continuations_thread (struct thread_info *, int err);
-extern void discard_all_intermediate_continuations (void);
-extern void discard_all_intermediate_continuations_thread (struct thread_info *);
-
 /* Inferior specific (any thread) continuations.  */
 
 extern void add_inferior_continuation (continuation_ftype *,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/create-web-ari-in-src.sh ./gdb/contrib/ari/create-web-ari-in-src.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/create-web-ari-in-src.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/ari/create-web-ari-in-src.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # GDB script to create web ARI page directly from within gdb/ari directory.
 #
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/gdb_ari.sh ./gdb/contrib/ari/gdb_ari.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/gdb_ari.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/ari/gdb_ari.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # GDB script to list of problems using awk.
 #
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -567,16 +567,6 @@ Function name in first column should be 
 }
 
 
-# Functions without any parameter should have (void)
-# after their name not simply ().
-BEGIN { doc["no parameter function"] = "\
-Function having no parameter should be declared with funcname (void)."
-    category["no parameter function"] = ari_code
-}
-/^[a-zA-Z][a-z0-9A-Z_]*[[:space:]]*\(\)/ {
-    fail("no parameter function")
-}
-
 BEGIN { doc["hash"] = "\
 Do not use ` #...'\'', instead use `#...'\''(some compilers only correctly \
 parse a C preprocessor directive when `#'\'' is the first character on \
@@ -1097,6 +1087,22 @@ Do not use vasprintf(), instead use xstr
     fail("vasprintf")
 }
 
+BEGIN { doc["printf_vma"] = "\
+Do not use printf_vma, instead use paddress or phex_nz"
+    category["printf_vma"] = ari_code
+}
+/(^|[^_[:alnum:]])printf_vma[[:space:]]*\(/ {
+    fail("printf_vma")
+}
+
+BEGIN { doc["sprintf_vma"] = "\
+Do not use sprintf_vma, instead use paddress or phex_nz"
+    category["sprintf_vma"] = ari_code
+}
+/(^|[^_[:alnum:]])sprintf_vma[[:space:]]*\(/ {
+    fail("sprintf_vma")
+}
+
 # More generic memory operations
 
 BEGIN { doc["bzero"] = "\
@@ -1136,7 +1142,7 @@ Do not use strnicmp(), instead use strnc
 # Boolean expressions and conditionals
 
 BEGIN { doc["boolean"] = "\
-Do not use `boolean'\'',  use `int'\'' instead"
+Do not use `boolean'\'',  use `bool'\'' instead"
     category["boolean"] = ari_regression
 }
 /(^|[^_[:alnum:]])boolean([^_[:alnum:]]|$)/ {
@@ -1145,26 +1151,6 @@ Do not use `boolean'\'',  use `int'\'' i
     }
 }
 
-BEGIN { doc["false"] = "\
-Definitely do not use `false'\'' in boolean expressions"
-    category["false"] = ari_regression
-}
-/(^|[^_[:alnum:]])false([^_[:alnum:]]|$)/ {
-    if (is_yacc_or_lex == 0) {
-       fail("false")
-    }
-}
-
-BEGIN { doc["true"] = "\
-Do not try to use `true'\'' in boolean expressions"
-    category["true"] = ari_regression
-}
-/(^|[^_[:alnum:]])true([^_[:alnum:]]|$)/ {
-    if (is_yacc_or_lex == 0) {
-       fail("true")
-    }
-}
-
 # Typedefs that are either redundant or can be reduced to `struct
 # type *''.
 # Must be placed before if assignment otherwise ARI exceptions
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/gdb_find.sh ./gdb/contrib/ari/gdb_find.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/gdb_find.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/ari/gdb_find.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # GDB script to create list of files to check using gdb_ari.sh.
 #
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/update-web-ari.sh ./gdb/contrib/ari/update-web-ari.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/ari/update-web-ari.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/ari/update-web-ari.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # GDB script to create GDB ARI web page.
 #
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/cc-with-tweaks.sh ./gdb/contrib/cc-with-tweaks.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/cc-with-tweaks.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/cc-with-tweaks.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 # Wrapper around gcc to tweak the output in various ways when running
 # the testsuite.
 
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/cleanup_check.py ./gdb/contrib/cleanup_check.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/cleanup_check.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/cleanup_check.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2013-2015 Free Software Foundation, Inc.
+#   Copyright 2013-2017 Free Software Foundation, Inc.
 #
 #   This is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/excheck.py ./gdb/contrib/excheck.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/excheck.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/excheck.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 #
 #   This is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/expect-read1.c ./gdb/contrib/expect-read1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/expect-read1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/expect-read1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/expect-read1.sh ./gdb/contrib/expect-read1.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/expect-read1.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/expect-read1.sh	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # runtest wrapper to reliably reproduce racy incomplete reads in the testsuite.
 
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# This tool excercise any incomplete reads handling in the testsuite by
+# This tool exercises any incomplete reads handling in the testsuite by
 # simulating read always returns just 1 character.
 # Testsuite incompatibilities are tracked as GDB PR testsuite/12649.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/exsummary.py ./gdb/contrib/exsummary.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/exsummary.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/exsummary.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 #
 #   This is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/gcc-with-excheck ./gdb/contrib/gcc-with-excheck
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/gcc-with-excheck	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/gcc-with-excheck	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 #
 #   This is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/gdb-add-index.sh ./gdb/contrib/gdb-add-index.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/gdb-add-index.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/gdb-add-index.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # Add a .gdb_index section to a file.
 
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/test_pubnames_and_indexes.py ./gdb/contrib/test_pubnames_and_indexes.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/contrib/test_pubnames_and_indexes.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/contrib/test_pubnames_and_indexes.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/copyright.py ./gdb/copyright.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/copyright.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/copyright.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/corefile.c ./gdb/corefile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/corefile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/corefile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Core dump and executable file functions above target vector, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -107,8 +107,7 @@ specify_exec_file_hook (void (*hook) (co
 	{
 	  /* If this is the first extra hook, initialize the hook
 	     array.  */
-	  exec_file_extra_hooks = (hook_type *)
-	    xmalloc (sizeof (hook_type));
+	  exec_file_extra_hooks = XNEW (hook_type);
 	  exec_file_extra_hooks[0] = deprecated_exec_file_display_hook;
 	  deprecated_exec_file_display_hook = call_extra_exec_file_hooks;
 	  exec_file_hook_count = 1;
@@ -145,7 +144,7 @@ reopen_exec_file (void)
   cleanups = make_cleanup (xfree, filename);
   res = stat (filename, &st);
 
-  if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
+  if (res == 0 && exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
     exec_file_attach (filename, 0);
   else
     /* If we accessed the file since last opening it, close it now;
@@ -238,10 +237,11 @@ memory_error (enum target_xfer_status er
   throw_error (exception, ("%s"), str);
 }
 
-/* Same as target_read_memory, but report an error if can't read.  */
+/* Helper function.  */
 
-void
-read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
+static void
+read_memory_object (enum target_object object, CORE_ADDR memaddr,
+		    gdb_byte *myaddr, ssize_t len)
 {
   ULONGEST xfered = 0;
 
@@ -251,7 +251,7 @@ read_memory (CORE_ADDR memaddr, gdb_byte
       ULONGEST xfered_len;
 
       status = target_xfer_partial (current_target.beneath,
-				    TARGET_OBJECT_MEMORY, NULL,
+				    object, NULL,
 				    myaddr + xfered, NULL,
 				    memaddr + xfered, len - xfered,
 				    &xfered_len);
@@ -265,16 +265,20 @@ read_memory (CORE_ADDR memaddr, gdb_byte
     }
 }
 
+/* Same as target_read_memory, but report an error if can't read.  */
+
+void
+read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
+{
+  read_memory_object (TARGET_OBJECT_MEMORY, memaddr, myaddr, len);
+}
+
 /* Same as target_read_stack, but report an error if can't read.  */
 
 void
 read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
 {
-  int status;
-
-  status = target_read_stack (memaddr, myaddr, len);
-  if (status != 0)
-    memory_error (status, memaddr);
+  read_memory_object (TARGET_OBJECT_STACK_MEMORY, memaddr, myaddr, len);
 }
 
 /* Same as target_read_code, but report an error if can't read.  */
@@ -282,11 +286,7 @@ read_stack (CORE_ADDR memaddr, gdb_byte 
 void
 read_code (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
 {
-  int status;
-
-  status = target_read_code (memaddr, myaddr, len);
-  if (status != 0)
-    memory_error (status, memaddr);
+  read_memory_object (TARGET_OBJECT_CODE_MEMORY, memaddr, myaddr, len);
 }
 
 /* Read memory at MEMADDR of length LEN and put the contents in
@@ -307,6 +307,24 @@ safe_read_memory_integer (CORE_ADDR mema
   return 1;
 }
 
+/* Read memory at MEMADDR of length LEN and put the contents in
+   RETURN_VALUE.  Return 0 if MEMADDR couldn't be read and non-zero
+   if successful.  */
+
+int
+safe_read_memory_unsigned_integer (CORE_ADDR memaddr, int len,
+				   enum bfd_endian byte_order,
+				   ULONGEST *return_value)
+{
+  gdb_byte buf[sizeof (ULONGEST)];
+
+  if (target_read_memory (memaddr, buf, len))
+    return 0;
+
+  *return_value = extract_unsigned_integer (buf, len, byte_order);
+  return 1;
+}
+
 LONGEST
 read_memory_integer (CORE_ADDR memaddr, int len,
 		     enum bfd_endian byte_order)
@@ -377,7 +395,7 @@ read_memory_string (CORE_ADDR memaddr, c
 CORE_ADDR
 read_memory_typed_address (CORE_ADDR addr, struct type *type)
 {
-  gdb_byte *buf = alloca (TYPE_LENGTH (type));
+  gdb_byte *buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
 
   read_memory (addr, buf, TYPE_LENGTH (type));
   return extract_typed_address (buf, type);
@@ -393,7 +411,7 @@ write_memory (CORE_ADDR memaddr, 
 
   status = target_write_memory (memaddr, myaddr, len);
   if (status != 0)
-    memory_error (status, memaddr);
+    memory_error (TARGET_XFER_E_IO, memaddr);
 }
 
 /* Same as write_memory, but notify 'memory_changed' observers.  */
@@ -413,7 +431,7 @@ write_memory_unsigned_integer (CORE_ADDR
 			       enum bfd_endian byte_order,
 			       ULONGEST value)
 {
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
 
   store_unsigned_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
@@ -426,7 +444,7 @@ write_memory_signed_integer (CORE_ADDR a
 			     enum bfd_endian byte_order,
 			     LONGEST value)
 {
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
 
   store_signed_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
@@ -481,7 +499,7 @@ complete_set_gnutarget (struct cmd_list_
       for (last = 0; bfd_targets[last] != NULL; ++last)
 	;
 
-      bfd_targets = xrealloc (bfd_targets, (last + 2) * sizeof (const char **));
+      bfd_targets = XRESIZEVEC (const char *, bfd_targets, last + 2);
       bfd_targets[last] = "auto";
       bfd_targets[last + 1] = NULL;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/corelow.c ./gdb/corelow.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/corelow.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/corelow.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Core dump and executable file functions below target vector, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -275,7 +275,6 @@ core_open (const char *arg, int from_tty
   int siggy;
   struct cleanup *old_chain;
   char *temp;
-  bfd *temp_bfd;
   int scratch_chan;
   int flags;
   char *filename;
@@ -310,20 +309,19 @@ core_open (const char *arg, int from_tty
   if (scratch_chan < 0)
     perror_with_name (filename);
 
-  temp_bfd = gdb_bfd_fopen (filename, gnutarget, 
-			    write_files ? FOPEN_RUB : FOPEN_RB,
-			    scratch_chan);
+  gdb_bfd_ref_ptr temp_bfd (gdb_bfd_fopen (filename, gnutarget,
+					   write_files ? FOPEN_RUB : FOPEN_RB,
+					   scratch_chan));
   if (temp_bfd == NULL)
     perror_with_name (filename);
 
-  if (!bfd_check_format (temp_bfd, bfd_core)
-      && !gdb_check_format (temp_bfd))
+  if (!bfd_check_format (temp_bfd.get (), bfd_core)
+      && !gdb_check_format (temp_bfd.get ()))
     {
       /* Do it after the err msg */
       /* FIXME: should be checking for errors from bfd_close (for one
          thing, on error it does not free all the storage associated
          with the bfd).  */
-      make_cleanup_bfd_unref (temp_bfd);
       error (_("\"%s\" is not a core dump: %s"),
 	     filename, bfd_errmsg (bfd_get_error ()));
     }
@@ -333,7 +331,7 @@ core_open (const char *arg, int from_tty
 
   do_cleanups (old_chain);
   unpush_target (&core_ops);
-  core_bfd = temp_bfd;
+  core_bfd = temp_bfd.release ();
   old_chain = make_cleanup (core_close_cleanup, 0 /*ignore*/);
 
   core_gdbarch = gdbarch_from_bfd (core_bfd);
@@ -517,6 +515,8 @@ get_core_register_section (struct regcac
   struct bfd_section *section;
   bfd_size_type size;
   char *contents;
+  bool variable_size_section = (regset != NULL
+				&& regset->flags & REGSET_VARIABLE_SIZE);
 
   xfree (section_name);
 
@@ -541,13 +541,13 @@ get_core_register_section (struct regcac
       warning (_("Section `%s' in core file too small."), section_name);
       return;
     }
-  if (size != min_size && !(regset->flags & REGSET_VARIABLE_SIZE))
+  if (size != min_size && !variable_size_section)
     {
       warning (_("Unexpected size of section `%s' in core file."),
 	       section_name);
     }
 
-  contents = alloca (size);
+  contents = (char *) alloca (size);
   if (! bfd_get_section_contents (core_bfd, section, contents,
 				  (file_ptr) 0, size))
     {
@@ -656,7 +656,7 @@ struct spuid_list
 static void
 add_to_spuid_list (bfd *abfd, asection *asect, void *list_p)
 {
-  struct spuid_list *list = list_p;
+  struct spuid_list *list = (struct spuid_list *) list_p;
   enum bfd_endian byte_order
     = bfd_big_endian (abfd) ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
   int fd, pos = 0;
@@ -920,6 +920,16 @@ ignore (struct target_ops *ops, struct g
   return 0;
 }
 
+/* Implement the to_remove_breakpoint method.  */
+
+static int
+core_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
+			struct bp_target_info *bp_tgt,
+			enum remove_bp_reason reason)
+{
+  return 0;
+}
+
 
 /* Okay, let's be honest: threads gleaned from a core file aren't
    exactly lively, are they?  On the other hand, if we don't claim
@@ -986,6 +996,15 @@ core_pid_to_str (struct target_ops *ops,
   return buf;
 }
 
+static const char *
+core_thread_name (struct target_ops *self, struct thread_info *thr)
+{
+  if (core_gdbarch
+      && gdbarch_core_thread_name_p (core_gdbarch))
+    return gdbarch_core_thread_name (core_gdbarch, thr);
+  return NULL;
+}
+
 static int
 core_has_memory (struct target_ops *ops)
 {
@@ -1034,10 +1053,11 @@ init_core_ops (void)
   core_ops.to_xfer_partial = core_xfer_partial;
   core_ops.to_files_info = core_files_info;
   core_ops.to_insert_breakpoint = ignore;
-  core_ops.to_remove_breakpoint = ignore;
+  core_ops.to_remove_breakpoint = core_remove_breakpoint;
   core_ops.to_thread_alive = core_thread_alive;
   core_ops.to_read_description = core_read_description;
   core_ops.to_pid_to_str = core_pid_to_str;
+  core_ops.to_thread_name = core_thread_name;
   core_ops.to_stratum = process_stratum;
   core_ops.to_has_memory = core_has_memory;
   core_ops.to_has_stack = core_has_stack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/core-regset.c ./gdb/core-regset.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/core-regset.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/core-regset.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine independent GDB support for core files on systems using "regsets".
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-abi.c ./gdb/cp-abi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-abi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-abi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic code for supporting multiple C++ ABI's
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -66,7 +66,7 @@ is_operator_name (const char *name)
 
 int
 baseclass_offset (struct type *type, int index, const gdb_byte *valaddr,
-		  int embedded_offset, CORE_ADDR address,
+		  LONGEST embedded_offset, CORE_ADDR address,
 		  const struct value *val)
 {
   int res = 0;
@@ -106,7 +106,7 @@ value_virtual_fn_field (struct value **a
 
 struct type *
 value_rtti_type (struct value *v, int *full,
-		 int *top, int *using_enc)
+		 LONGEST *top, int *using_enc)
 {
   struct type *ret = NULL;
 
@@ -212,7 +212,7 @@ cplus_type_from_type_info (struct value 
 
 /* See cp-abi.h.  */
 
-char *
+std::string
 cplus_typename_from_type_info (struct value *value)
 {
   if (current_cp_abi.get_typename_from_type_info == NULL)
@@ -317,7 +317,7 @@ list_cp_abis (int from_tty)
   struct cleanup *cleanup_chain;
   int i;
 
-  ui_out_text (uiout, "The available C++ ABIs are:\n");
+  uiout->text ("The available C++ ABIs are:\n");
   cleanup_chain = make_cleanup_ui_out_tuple_begin_end (uiout,
 						       "cp-abi-list");
   for (i = 0; i < num_cp_abis; i++)
@@ -325,17 +325,17 @@ list_cp_abis (int from_tty)
       char pad[14];
       int padcount;
 
-      ui_out_text (uiout, "  ");
-      ui_out_field_string (uiout, "cp-abi", cp_abis[i]->shortname);
+      uiout->text ("  ");
+      uiout->field_string ("cp-abi", cp_abis[i]->shortname);
 
       padcount = 16 - 2 - strlen (cp_abis[i]->shortname);
       pad[padcount] = 0;
       while (padcount > 0)
 	pad[--padcount] = ' ';
-      ui_out_text (uiout, pad);
+      uiout->text (pad);
 
-      ui_out_field_string (uiout, "doc", cp_abis[i]->doc);
-      ui_out_text (uiout, "\n");
+      uiout->field_string ("doc", cp_abis[i]->doc);
+      uiout->text ("\n");
     }
   do_cleanups (cleanup_chain);
 }
@@ -384,12 +384,12 @@ show_cp_abi_cmd (char *args, int from_tt
 {
   struct ui_out *uiout = current_uiout;
 
-  ui_out_text (uiout, "The currently selected C++ ABI is \"");
+  uiout->text ("The currently selected C++ ABI is \"");
 
-  ui_out_field_string (uiout, "cp-abi", current_cp_abi.shortname);
-  ui_out_text (uiout, "\" (");
-  ui_out_field_string (uiout, "longname", current_cp_abi.longname);
-  ui_out_text (uiout, ").\n");
+  uiout->field_string ("cp-abi", current_cp_abi.shortname);
+  uiout->text ("\" (");
+  uiout->field_string ("longname", current_cp_abi.longname);
+  uiout->text (").\n");
 }
 
 extern initialize_file_ftype _initialize_cp_abi; /* -Wmissing-prototypes */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-abi.h ./gdb/cp-abi.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-abi.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-abi.h	2017-03-06 01:49:07.000000000 +0000
@@ -3,7 +3,7 @@
 
    Contributed by Daniel Berlin <dberlin@redhat.com>
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -135,7 +135,7 @@ extern struct value *value_virtual_fn_fi
    FULL, TOP, and USING_ENC can each be zero, in which case we don't
    provide the corresponding piece of information.  */
 extern struct type *value_rtti_type (struct value *value,
-                                     int *full, int *top,
+                                     int *full, LONGEST *top,
 				     int *using_enc);
 
 /* Compute the offset of the baseclass which is the INDEXth baseclass
@@ -146,7 +146,7 @@ extern struct type *value_rtti_type (str
 
 extern int baseclass_offset (struct type *type,
 			     int index, const gdb_byte *valaddr,
-			     int embedded_offset,
+			     LONGEST embedded_offset,
 			     CORE_ADDR address,
 			     const struct value *val);
 
@@ -196,10 +196,9 @@ extern struct type *cplus_type_from_type
 
 /* Given a value which holds a pointer to a std::type_info, return the
    name of the type which that type_info represents.  Throw an
-   exception if the type name cannot be found.  The result is
-   xmalloc'd and must be freed by the caller.  */
+   exception if the type name cannot be found.  */
 
-extern char *cplus_typename_from_type_info (struct value *value);
+extern std::string cplus_typename_from_type_info (struct value *value);
 
 /* Determine if we are currently in a C++ thunk.  If so, get the
    address of the routine we are thunking to and continue to there
@@ -229,9 +228,9 @@ struct cp_abi_ops
 				     int j, struct type * type,
 				     int offset);
   struct type *(*rtti_type) (struct value *v, int *full,
-			     int *top, int *using_enc);
+			     LONGEST *top, int *using_enc);
   int (*baseclass_offset) (struct type *type, int index,
-			   const bfd_byte *valaddr, int embedded_offset,
+			   const bfd_byte *valaddr, LONGEST embedded_offset,
 			   CORE_ADDR address, const struct value *val);
   void (*print_method_ptr) (const gdb_byte *contents,
 			    struct type *type,
@@ -245,7 +244,7 @@ struct cp_abi_ops
   struct value *(*get_typeid) (struct value *value);
   struct type *(*get_typeid_type) (struct gdbarch *gdbarch);
   struct type *(*get_type_from_type_info) (struct value *value);
-  char *(*get_typename_from_type_info) (struct value *value);
+  std::string (*get_typename_from_type_info) (struct value *value);
   CORE_ADDR (*skip_trampoline) (struct frame_info *, CORE_ADDR);
   int (*pass_by_reference) (struct type *type);
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-name-parser.c ./gdb/cp-name-parser.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-name-parser.c	2015-07-06 01:51:08.000000000 +0000
+++ ./gdb/cp-name-parser.c	2017-03-06 01:53:00.000000000 +0000
@@ -111,7 +111,7 @@ d_grab (void)
     {
       if (demangle_info->next == NULL)
 	{
-	  more = xmalloc (sizeof (struct demangle_info));
+	  more = XNEW (struct demangle_info);
 	  more->next = NULL;
 	  demangle_info->next = more;
 	}
@@ -2213,7 +2213,7 @@ yyreduce:
 
 /* Line 1455 of yacc.c  */
 #line 435 "cp-name-parser.y"
-    { (yyval.comp) = make_empty ((yyvsp[(1) - (2)].lval));
+    { (yyval.comp) = make_empty ((enum demangle_component_type) (yyvsp[(1) - (2)].lval));
 			  d_left ((yyval.comp)) = (yyvsp[(2) - (2)].comp);
 			  d_right ((yyval.comp)) = NULL; }
     break;
@@ -2476,7 +2476,7 @@ yyreduce:
 
 /* Line 1455 of yacc.c  */
 #line 531 "cp-name-parser.y"
-    { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[(2) - (2)].comp), NULL); }
+    { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_CONVERSION, (yyvsp[(2) - (2)].comp), NULL); }
     break;
 
   case 49:
@@ -4521,7 +4521,7 @@ yyerror (char *msg)
 static struct demangle_info *
 allocate_info (void)
 {
-  struct demangle_info *info = xmalloc (sizeof (struct demangle_info));
+  struct demangle_info *info = XNEW (struct demangle_info);
 
   info->next = NULL;
   info->used = 0;
@@ -4543,29 +4543,19 @@ cp_comp_to_string (struct demangle_compo
 			       &err);
 }
 
-/* A convenience function to allocate and initialize a new struct
-   demangled_parse_info.  */
+/* Constructor for demangle_parse_info.  */
 
-struct demangle_parse_info *
-cp_new_demangle_parse_info (void)
+demangle_parse_info::demangle_parse_info ()
+: info (NULL),
+  tree (NULL)
 {
-  struct demangle_parse_info *info;
-
-  info = xmalloc (sizeof (struct demangle_parse_info));
-  info->info = NULL;
-  info->tree = NULL;
-  obstack_init (&info->obstack);
-
-  return info;
+  obstack_init (&obstack);
 }
 
-/* Free any memory associated with the given PARSE_INFO.  */
+/* Destructor for demangle_parse_info.  */
 
-void
-cp_demangled_name_parse_free (struct demangle_parse_info *parse_info)
+demangle_parse_info::~demangle_parse_info ()
 {
-  struct demangle_info *info = parse_info->info;
-
   /* Free any allocated chunks of memory for the parse.  */
   while (info != NULL)
     {
@@ -4576,15 +4566,11 @@ cp_demangled_name_parse_free (struct dem
     }
 
   /* Free any memory allocated during typedef replacement.  */
-  obstack_free (&parse_info->obstack, NULL);
-
-  /* Free the parser info.  */
-  xfree (parse_info);
+  obstack_free (&obstack, NULL);
 }
 
 /* Merge the two parse trees given by DEST and SRC.  The parse tree
    in SRC is attached to DEST at the node represented by TARGET.
-   SRC is then freed.
 
    NOTE 1: Since there is no API to merge obstacks, this function does
    even attempt to try it.  Fortunately, we do not (yet?) need this ability.
@@ -4611,9 +4597,6 @@ cp_merge_demangle_parse_infos (struct de
   /* Clear the (pointer to) SRC's parse data so that it is not freed when
      cp_demangled_parse_info_free is called.  */
   src->info = NULL;
-
-  /* Free SRC.  */
-  cp_demangled_name_parse_free (src);
 }
 
 /* Convert a demangled name to a demangle_component tree.  On success,
@@ -4622,11 +4605,10 @@ cp_merge_demangle_parse_infos (struct de
    returned, and an error message will be set in *ERRMSG (which does
    not need to be freed).  */
 
-struct demangle_parse_info *
+struct std::unique_ptr<demangle_parse_info>
 cp_demangled_name_to_comp (const char *demangled_name, const char **errmsg)
 {
   static char errbuf[60];
-  struct demangle_parse_info *result;
 
   prev_lexptr = lexptr = demangled_name;
   error_lexptr = NULL;
@@ -4634,7 +4616,7 @@ cp_demangled_name_to_comp (const char *d
 
   demangle_info = allocate_info ();
 
-  result = cp_new_demangle_parse_info ();
+  std::unique_ptr<demangle_parse_info> result (new demangle_parse_info);
   result->info = demangle_info;
 
   if (yyparse ())
@@ -4646,7 +4628,6 @@ cp_demangled_name_to_comp (const char *d
 	  strcat (errbuf, "'");
 	  *errmsg = errbuf;
 	}
-      cp_demangled_name_parse_free (result);
       return NULL;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-name-parser.y ./gdb/cp-name-parser.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-name-parser.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-name-parser.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* YACC parser for C++ names, for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Parts of the lexer are based on c-exp.y from GDB.
 
@@ -69,7 +69,7 @@ d_grab (void)
     {
       if (demangle_info->next == NULL)
 	{
-	  more = malloc (sizeof (struct demangle_info));
+	  more = XNEW (struct demangle_info);
 	  more->next = NULL;
 	  demangle_info->next = more;
 	}
@@ -432,7 +432,7 @@ function
 
 demangler_special
 		:	DEMANGLER_SPECIAL start
-			{ $$ = make_empty ($1);
+			{ $$ = make_empty ((enum demangle_component_type) $1);
 			  d_left ($$) = $2;
 			  d_right ($$) = NULL; }
 		|	CONSTRUCTION_VTABLE start CONSTRUCTION_IN start
@@ -528,7 +528,7 @@ oper	:	OPERATOR NEW
 		   since it's not clear that it's parseable.  */
 conversion_op
 		:	OPERATOR typespec_2
-			{ $$ = fill_comp (DEMANGLE_COMPONENT_CAST, $2, NULL); }
+			{ $$ = fill_comp (DEMANGLE_COMPONENT_CONVERSION, $2, NULL); }
 		;
 
 conversion_op_name
@@ -1977,7 +1977,7 @@ yyerror (char *msg)
 static struct demangle_info *
 allocate_info (void)
 {
-  struct demangle_info *info = malloc (sizeof (struct demangle_info));
+  struct demangle_info *info = XNEW (struct demangle_info);
 
   info->next = NULL;
   info->used = 0;
@@ -1999,29 +1999,19 @@ cp_comp_to_string (struct demangle_compo
 			       &err);
 }
 
-/* A convenience function to allocate and initialize a new struct
-   demangled_parse_info.  */
+/* Constructor for demangle_parse_info.  */
 
-struct demangle_parse_info *
-cp_new_demangle_parse_info (void)
+demangle_parse_info::demangle_parse_info ()
+: info (NULL),
+  tree (NULL)
 {
-  struct demangle_parse_info *info;
-
-  info = malloc (sizeof (struct demangle_parse_info));
-  info->info = NULL;
-  info->tree = NULL;
-  obstack_init (&info->obstack);
-
-  return info;
+  obstack_init (&obstack);
 }
 
-/* Free any memory associated with the given PARSE_INFO.  */
+/* Destructor for demangle_parse_info.  */
 
-void
-cp_demangled_name_parse_free (struct demangle_parse_info *parse_info)
+demangle_parse_info::~demangle_parse_info ()
 {
-  struct demangle_info *info = parse_info->info;
-
   /* Free any allocated chunks of memory for the parse.  */
   while (info != NULL)
     {
@@ -2032,15 +2022,11 @@ cp_demangled_name_parse_free (struct dem
     }
 
   /* Free any memory allocated during typedef replacement.  */
-  obstack_free (&parse_info->obstack, NULL);
-
-  /* Free the parser info.  */
-  free (parse_info);
+  obstack_free (&obstack, NULL);
 }
 
 /* Merge the two parse trees given by DEST and SRC.  The parse tree
    in SRC is attached to DEST at the node represented by TARGET.
-   SRC is then freed.
 
    NOTE 1: Since there is no API to merge obstacks, this function does
    even attempt to try it.  Fortunately, we do not (yet?) need this ability.
@@ -2067,9 +2053,6 @@ cp_merge_demangle_parse_infos (struct de
   /* Clear the (pointer to) SRC's parse data so that it is not freed when
      cp_demangled_parse_info_free is called.  */
   src->info = NULL;
-
-  /* Free SRC.  */
-  cp_demangled_name_parse_free (src);
 }
 
 /* Convert a demangled name to a demangle_component tree.  On success,
@@ -2078,11 +2061,10 @@ cp_merge_demangle_parse_infos (struct de
    returned, and an error message will be set in *ERRMSG (which does
    not need to be freed).  */
 
-struct demangle_parse_info *
+struct std::unique_ptr<demangle_parse_info>
 cp_demangled_name_to_comp (const char *demangled_name, const char **errmsg)
 {
   static char errbuf[60];
-  struct demangle_parse_info *result;
 
   prev_lexptr = lexptr = demangled_name;
   error_lexptr = NULL;
@@ -2090,7 +2072,7 @@ cp_demangled_name_to_comp (const char *d
 
   demangle_info = allocate_info ();
 
-  result = cp_new_demangle_parse_info ();
+  std::unique_ptr<demangle_parse_info> result (new demangle_parse_info);
   result->info = demangle_info;
 
   if (yyparse ())
@@ -2102,7 +2084,6 @@ cp_demangled_name_to_comp (const char *d
 	  strcat (errbuf, "'");
 	  *errmsg = errbuf;
 	}
-      cp_demangled_name_parse_free (result);
       return NULL;
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-namespace.c ./gdb/cp-namespace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-namespace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-namespace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Helper routines for C++ support in GDB.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton and by Kealia, Inc.
 
@@ -31,8 +31,10 @@
 #include "frame.h"
 #include "buildsym.h"
 #include "language.h"
+#include "namespace.h"
+#include <string>
 
-static struct symbol *
+static struct block_symbol
   cp_lookup_nested_symbol_1 (struct type *container_type,
 			     const char *nested_name,
 			     const char *concatenated_name,
@@ -78,8 +80,8 @@ cp_scan_for_anonymous_namespaces (const 
 			      ? 0 : previous_component - 2);
 	      int src_len = next_component;
 
-	      char *dest = alloca (dest_len + 1);
-	      char *src = alloca (src_len + 1);
+	      char *dest = (char *) alloca (dest_len + 1);
+	      char *src = (char *) alloca (src_len + 1);
 
 	      memcpy (dest, name, dest_len);
 	      memcpy (src, name, src_len);
@@ -91,8 +93,9 @@ cp_scan_for_anonymous_namespaces (const 
 		 anonymous namespace.  So add symbols in it to the
 		 namespace given by the previous component if there is
 		 one, or to the global namespace if there isn't.  */
-	      cp_add_using_directive (dest, src, NULL, NULL, NULL, 1,
-	                              &objfile->objfile_obstack);
+	      add_using_directive (&local_using_directives,
+				   dest, src, NULL, NULL, NULL, 1,
+				   &objfile->objfile_obstack);
 	    }
 	  /* The "+ 2" is for the "::".  */
 	  previous_component = next_component + 2;
@@ -103,102 +106,6 @@ cp_scan_for_anonymous_namespaces (const 
     }
 }
 
-/* Add a using directive to using_directives.  If the using directive
-   in question has already been added, don't add it twice.
-
-   Create a new struct using_direct which imports the namespace SRC
-   into the scope DEST.  ALIAS is the name of the imported namespace
-   in the current scope.  If ALIAS is NULL then the namespace is known
-   by its original name.  DECLARATION is the name if the imported
-   varable if this is a declaration import (Eg. using A::x), otherwise
-   it is NULL.  EXCLUDES is a list of names not to import from an
-   imported module or NULL.  If COPY_NAMES is non-zero, then the
-   arguments are copied into newly allocated memory so they can be
-   temporaries.  For EXCLUDES the VEC pointers are copied but the
-   pointed to characters are not copied.  */
-
-void
-cp_add_using_directive (const char *dest,
-			const char *src,
-			const char *alias,
-			const char *declaration,
-			VEC (const_char_ptr) *excludes,
-			int copy_names,
-                        struct obstack *obstack)
-{
-  struct using_direct *current;
-  struct using_direct *newobj;
-
-  /* Has it already been added?  */
-
-  for (current = using_directives; current != NULL; current = current->next)
-    {
-      int ix;
-      const char *param;
-
-      if (strcmp (current->import_src, src) != 0)
-	continue;
-      if (strcmp (current->import_dest, dest) != 0)
-	continue;
-      if ((alias == NULL && current->alias != NULL)
-	  || (alias != NULL && current->alias == NULL)
-	  || (alias != NULL && current->alias != NULL
-	      && strcmp (alias, current->alias) != 0))
-	continue;
-      if ((declaration == NULL && current->declaration != NULL)
-	  || (declaration != NULL && current->declaration == NULL)
-	  || (declaration != NULL && current->declaration != NULL
-	      && strcmp (declaration, current->declaration) != 0))
-	continue;
-
-      /* Compare the contents of EXCLUDES.  */
-      for (ix = 0; VEC_iterate (const_char_ptr, excludes, ix, param); ix++)
-	if (current->excludes[ix] == NULL
-	    || strcmp (param, current->excludes[ix]) != 0)
-	  break;
-      if (ix < VEC_length (const_char_ptr, excludes)
-	  || current->excludes[ix] != NULL)
-	continue;
-
-      /* Parameters exactly match CURRENT.  */
-      return;
-    }
-
-  newobj = obstack_alloc (obstack, (sizeof (*newobj)
-				 + (VEC_length (const_char_ptr, excludes)
-				    * sizeof (*newobj->excludes))));
-  memset (newobj, 0, sizeof (*newobj));
-
-  if (copy_names)
-    {
-      newobj->import_src = obstack_copy0 (obstack, src, strlen (src));
-      newobj->import_dest = obstack_copy0 (obstack, dest, strlen (dest));
-    }
-  else
-    {
-      newobj->import_src = src;
-      newobj->import_dest = dest;
-    }
-
-  if (alias != NULL && copy_names)
-    newobj->alias = obstack_copy0 (obstack, alias, strlen (alias));
-  else
-    newobj->alias = alias;
-
-  if (declaration != NULL && copy_names)
-    newobj->declaration = obstack_copy0 (obstack,
-				      declaration, strlen (declaration));
-  else
-    newobj->declaration = declaration;
-
-  memcpy (newobj->excludes, VEC_address (const_char_ptr, excludes),
-	  VEC_length (const_char_ptr, excludes) * sizeof (*newobj->excludes));
-  newobj->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
-
-  newobj->next = using_directives;
-  using_directives = newobj;
-}
-
 /* Test whether or not NAMESPACE looks like it mentions an anonymous
    namespace; return nonzero if so.  */
 
@@ -213,14 +120,14 @@ cp_is_in_anonymous (const char *symbol_n
    If IS_IN_ANONYMOUS is nonzero, the symbol in question is located
    within an anonymous namespace.  */
 
-static struct symbol *
+static struct block_symbol
 cp_basic_lookup_symbol (const char *name, const struct block *block,
 			const domain_enum domain, int is_in_anonymous)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   sym = lookup_symbol_in_static_block (name, block, domain);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   if (is_in_anonymous)
@@ -232,12 +139,13 @@ cp_basic_lookup_symbol (const char *name
       const struct block *global_block = block_global_block (block);
 
       if (global_block != NULL)
-	sym = lookup_symbol_in_block (name, global_block, domain);
+	{
+	  sym.symbol = lookup_symbol_in_block (name, global_block, domain);
+	  sym.block = global_block;
+	}
     }
   else
-    {
-      sym = lookup_global_symbol (name, block, domain);
-    }
+    sym = lookup_global_symbol (name, block, domain);
 
   return sym;
 }
@@ -252,21 +160,21 @@ cp_basic_lookup_symbol (const char *name
    If SEARCH is non-zero then see if we can determine "this" from BLOCK, and
    if so then also search for NAME in that class.  */
 
-static struct symbol *
+static struct block_symbol
 cp_lookup_bare_symbol (const struct language_defn *langdef,
 		       const char *name, const struct block *block,
 		       const domain_enum domain, int search)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   /* Note: We can't do a simple assert for ':' not being in NAME because
      ':' may be in the args of a template spec.  This isn't intended to be
      a complete test, just cheap and documentary.  */
   if (strchr (name, '<') == NULL && strchr (name, '(') == NULL)
-    gdb_assert (strchr (name, ':') == NULL);
+    gdb_assert (strstr (name, "::") == NULL);
 
   sym = lookup_symbol_in_static_block (name, block, domain);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   /* If we didn't find a definition for a builtin type in the static block,
@@ -283,30 +191,37 @@ cp_lookup_bare_symbol (const struct lang
 	gdbarch = target_gdbarch ();
       else
 	gdbarch = block_gdbarch (block);
-      sym = language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
-      if (sym != NULL)
+      sym.symbol
+	= language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
+      sym.block = NULL;
+      if (sym.symbol != NULL)
 	return sym;
     }
 
   sym = lookup_global_symbol (name, block, domain);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   if (search)
     {
-      struct symbol *lang_this;
+      struct block_symbol lang_this;
       struct type *type;
 
-      lang_this = lookup_language_this (language_def (language_cplus), block);
-      if (lang_this == NULL)
-	return NULL;
+      lang_this.symbol = NULL;
 
-      type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this)));
+      if (langdef != NULL)
+	lang_this = lookup_language_this (langdef, block);
+
+      if (lang_this.symbol == NULL)
+	return null_block_symbol;
+
+
+      type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this.symbol)));
       /* If TYPE_NAME is NULL, abandon trying to find this symbol.
 	 This can happen for lambda functions compiled with clang++,
 	 which outputs no name for the container class.  */
       if (TYPE_NAME (type) == NULL)
-	return NULL;
+	return null_block_symbol;
 
       /* Look for symbol NAME in this class.  */
       sym = cp_lookup_nested_symbol (type, name, block, domain);
@@ -324,57 +239,46 @@ cp_lookup_bare_symbol (const struct lang
    Note: At least in the case of Fortran, which also uses this code, there
    may be no text after the last "::".  */
 
-static struct symbol *
+static struct block_symbol
 cp_search_static_and_baseclasses (const char *name,
 				  const struct block *block,
 				  const domain_enum domain,
 				  unsigned int prefix_len,
 				  int is_in_anonymous)
 {
-  struct symbol *sym;
-  char *klass, *nested;
-  struct cleanup *cleanup;
-  struct symbol *klass_sym;
+  struct block_symbol sym;
+  struct block_symbol klass_sym;
   struct type *klass_type;
 
-  /* The test here uses <= instead of < because Fortran also uses this,
-     and the module.exp testcase will pass "modmany::" for NAME here.  */
-  gdb_assert (prefix_len + 2 <= strlen (name));
-  gdb_assert (name[prefix_len + 1] == ':');
+  /* Check for malformed input.  */
+  if (prefix_len + 2 > strlen (name) || name[prefix_len + 1] != ':')
+    return null_block_symbol;
 
   /* Find the name of the class and the name of the method, variable, etc.  */
 
   /* The class name is everything up to and including PREFIX_LEN.  */
-  klass = savestring (name, prefix_len);
+  std::string klass (name, prefix_len);
 
   /* The rest of the name is everything else past the initial scope
      operator.  */
-  nested = xstrdup (name + prefix_len + 2);
-
-  /* Add cleanups to free memory for these strings.  */
-  cleanup = make_cleanup (xfree, klass);
-  make_cleanup (xfree, nested);
+  std::string nested (name + prefix_len + 2);
 
   /* Lookup a class named KLASS.  If none is found, there is nothing
      more that can be done.  KLASS could be a namespace, so always look
      in VAR_DOMAIN.  This works for classes too because of
      symbol_matches_domain (which should be replaced with something else,
      but it's what we have today).  */
-  klass_sym = lookup_global_symbol (klass, block, VAR_DOMAIN);
-  if (klass_sym == NULL)
-    {
-      do_cleanups (cleanup);
-      return NULL;
-    }
-  klass_type = SYMBOL_TYPE (klass_sym);
+  klass_sym = lookup_global_symbol (klass.c_str (), block, VAR_DOMAIN);
+  if (klass_sym.symbol == NULL)
+    return null_block_symbol;
+  klass_type = SYMBOL_TYPE (klass_sym.symbol);
 
   /* Look for a symbol named NESTED in this class.
      The caller is assumed to have already have done a basic lookup of NAME.
      So we pass zero for BASIC_LOOKUP to cp_lookup_nested_symbol_1 here.  */
-  sym = cp_lookup_nested_symbol_1 (klass_type, nested, name, block, domain,
-				   0, is_in_anonymous);
+  sym = cp_lookup_nested_symbol_1 (klass_type, nested.c_str (), name,
+				   block, domain, 0, is_in_anonymous);
 
-  do_cleanups (cleanup);
   return sym;
 }
 
@@ -387,7 +291,7 @@ cp_search_static_and_baseclasses (const 
    there is no scoping in which case we also try looking in the class of
    "this" if we can compute it.  */
 
-static struct symbol *
+static struct block_symbol
 cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name,
 			       const struct block *block,
 			       const domain_enum domain, int search)
@@ -395,12 +299,12 @@ cp_lookup_symbol_in_namespace (const cha
   char *concatenated_name = NULL;
   int is_in_anonymous;
   unsigned int prefix_len;
-  struct symbol *sym;
+  struct block_symbol sym;
 
   if (the_namespace[0] != '\0')
     {
-      concatenated_name = alloca (strlen (the_namespace) + 2
-				  + strlen (name) + 1);
+      concatenated_name
+	= (char *) alloca (strlen (the_namespace) + 2 + strlen (name) + 1);
       strcpy (concatenated_name, the_namespace);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, name);
@@ -419,7 +323,7 @@ cp_lookup_symbol_in_namespace (const cha
   is_in_anonymous
     = the_namespace[0] != '\0' && cp_is_in_anonymous (the_namespace);
   sym = cp_basic_lookup_symbol (name, block, domain, is_in_anonymous);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   if (search)
@@ -434,7 +338,7 @@ cp_lookup_symbol_in_namespace (const cha
 static void
 reset_directive_searched (void *data)
 {
-  struct using_direct *direct = data;
+  struct using_direct *direct = (struct using_direct *) data;
   direct->searched = 0;
 }
 
@@ -466,7 +370,7 @@ reset_directive_searched (void *data)
    SEARCH_SCOPE_FIRST is an internal implementation detail: Callers must
    pass 0 for it.  Internally we pass 1 when recursing.  */
 
-static struct symbol *
+static struct block_symbol
 cp_lookup_symbol_via_imports (const char *scope,
 			      const char *name,
 			      const struct block *block,
@@ -476,17 +380,20 @@ cp_lookup_symbol_via_imports (const char
 			      const int search_parents)
 {
   struct using_direct *current;
-  struct symbol *sym = NULL;
+  struct block_symbol sym;
   int len;
   int directive_match;
   struct cleanup *searched_cleanup;
 
+  sym.symbol = NULL;
+  sym.block = NULL;
+
   /* First, try to find the symbol in the given namespace if requested.  */
   if (search_scope_first)
     sym = cp_lookup_symbol_in_namespace (scope, name,
 					 block, domain, 1);
 
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   /* Go through the using directives.  If any of them add new names to
@@ -532,12 +439,12 @@ cp_lookup_symbol_via_imports (const char
 	  /* If this is a DECLARATION_ONLY search or a symbol was found
 	     or this import statement was an import declaration, the
 	     search of this import is complete.  */
-	  if (declaration_only || sym != NULL || current->declaration)
+	  if (declaration_only || sym.symbol != NULL || current->declaration)
 	    {
 	      current->searched = 0;
 	      discard_cleanups (searched_cleanup);
 
-	      if (sym != NULL)
+	      if (sym.symbol != NULL)
 		return sym;
 
 	      continue;
@@ -575,12 +482,12 @@ cp_lookup_symbol_via_imports (const char
 	  current->searched = 0;
 	  discard_cleanups (searched_cleanup);
 
-	  if (sym != NULL)
+	  if (sym.symbol != NULL)
 	    return sym;
 	}
     }
 
-  return NULL;
+  return null_block_symbol;
 }
 
 /* Helper function that searches an array of symbols for one named NAME.  */
@@ -604,14 +511,14 @@ search_symbol_list (const char *name, in
    searches through the template parameters of the function and the
    function's type.  */
 
-struct symbol *
+struct block_symbol
 cp_lookup_symbol_imports_or_template (const char *scope,
 				      const char *name,
 				      const struct block *block,
 				      const domain_enum domain)
 {
   struct symbol *function = BLOCK_FUNCTION (block);
-  struct symbol *result;
+  struct block_symbol result;
 
   if (symbol_lookup_debug)
     {
@@ -629,20 +536,20 @@ cp_lookup_symbol_imports_or_template (co
 	{
 	  struct template_symbol *templ
 	    = (struct template_symbol *) function;
+	  struct symbol *sym = search_symbol_list (name,
+						   templ->n_template_arguments,
+						   templ->template_arguments);
 
-	  result = search_symbol_list (name,
-				       templ->n_template_arguments,
-				       templ->template_arguments);
-	  if (result != NULL)
+	  if (sym != NULL)
 	    {
 	      if (symbol_lookup_debug)
 		{
 		  fprintf_unfiltered (gdb_stdlog,
 				      "cp_lookup_symbol_imports_or_template"
 				      " (...) = %s\n",
-				      host_address_to_string (result));
+				      host_address_to_string (sym));
 		}
-	      return result;
+	      return (struct block_symbol) {sym, block};
 	    }
 	}
 
@@ -651,48 +558,46 @@ cp_lookup_symbol_imports_or_template (co
       if (SYMBOL_NATURAL_NAME (function))
 	{
 	  struct type *context;
-	  char *name_copy = xstrdup (SYMBOL_NATURAL_NAME (function));
-	  struct cleanup *cleanups = make_cleanup (xfree, name_copy);
+	  std::string name_copy (SYMBOL_NATURAL_NAME (function));
 	  const struct language_defn *lang = language_def (language_cplus);
 	  struct gdbarch *arch = symbol_arch (function);
 	  const struct block *parent = BLOCK_SUPERBLOCK (block);
+	  struct symbol *sym;
 
 	  while (1)
 	    {
-	      unsigned int prefix_len = cp_entire_prefix_len (name_copy);
+	      unsigned int prefix_len
+		= cp_entire_prefix_len (name_copy.c_str ());
 
 	      if (prefix_len == 0)
 		context = NULL;
 	      else
 		{
-		  name_copy[prefix_len] = '\0';
+		  name_copy.erase (prefix_len);
 		  context = lookup_typename (lang, arch,
-					     name_copy,
+					     name_copy.c_str (),
 					     parent, 1);
 		}
 
 	      if (context == NULL)
 		break;
 
-	      result
+	      sym
 		= search_symbol_list (name,
 				      TYPE_N_TEMPLATE_ARGUMENTS (context),
 				      TYPE_TEMPLATE_ARGUMENTS (context));
-	      if (result != NULL)
+	      if (sym != NULL)
 		{
-		  do_cleanups (cleanups);
 		  if (symbol_lookup_debug)
 		    {
-		      fprintf_unfiltered (gdb_stdlog,
-					  "cp_lookup_symbol_imports_or_template"
-					  " (...) = %s\n",
-					  host_address_to_string (result));
+		      fprintf_unfiltered
+			(gdb_stdlog,
+			 "cp_lookup_symbol_imports_or_template (...) = %s\n",
+			 host_address_to_string (sym));
 		    }
-		  return result;
+		  return (struct block_symbol) {sym, parent};
 		}
 	    }
-
-	  do_cleanups (cleanups);
 	}
     }
 
@@ -701,8 +606,8 @@ cp_lookup_symbol_imports_or_template (co
     {
       fprintf_unfiltered (gdb_stdlog,
 			  "cp_lookup_symbol_imports_or_template (...) = %s\n",
-			  result != NULL
-			  ? host_address_to_string (result) : "NULL");
+			  result.symbol != NULL
+			  ? host_address_to_string (result.symbol) : "NULL");
     }
   return result;
 }
@@ -711,23 +616,23 @@ cp_lookup_symbol_imports_or_template (co
    and its parents.  SCOPE is the namespace scope of the context in which the
    search is being evaluated.  */
 
-static struct symbol *
+static struct block_symbol
 cp_lookup_symbol_via_all_imports (const char *scope, const char *name,
 				  const struct block *block,
 				  const domain_enum domain)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   while (block != NULL)
     {
       sym = cp_lookup_symbol_via_imports (scope, name, block, domain, 0, 0, 1);
-      if (sym)
+      if (sym.symbol)
 	return sym;
 
       block = BLOCK_SUPERBLOCK (block);
     }
 
-  return NULL;
+  return null_block_symbol;
 }
 
 /* Searches for NAME in the current namespace, and by applying
@@ -735,13 +640,13 @@ cp_lookup_symbol_via_all_imports (const 
    SCOPE is the namespace scope of the context in which the search is
    being evaluated.  */
 
-struct symbol *
+struct block_symbol
 cp_lookup_symbol_namespace (const char *scope,
                             const char *name,
                             const struct block *block,
                             const domain_enum domain)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   if (symbol_lookup_debug)
     {
@@ -755,14 +660,15 @@ cp_lookup_symbol_namespace (const char *
   sym = cp_lookup_symbol_in_namespace (scope, name, block, domain, 1);
 
   /* Search for name in namespaces imported to this and parent blocks.  */
-  if (sym == NULL)
+  if (sym.symbol == NULL)
     sym = cp_lookup_symbol_via_all_imports (scope, name, block, domain);
 
   if (symbol_lookup_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
 			  "cp_lookup_symbol_namespace (...) = %s\n",
-			  sym != NULL ? host_address_to_string (sym) : "NULL");
+			  sym.symbol != NULL
+			    ? host_address_to_string (sym.symbol) : "NULL");
     }
   return sym;
 }
@@ -782,7 +688,7 @@ cp_lookup_symbol_namespace (const char *
    "A::x", and if that call fails, then the first call looks for
    "x".  */
 
-static struct symbol *
+static struct block_symbol
 lookup_namespace_scope (const struct language_defn *langdef,
 			const char *name,
 			const struct block *block,
@@ -796,7 +702,7 @@ lookup_namespace_scope (const struct lan
     {
       /* Recursively search for names in child namespaces first.  */
 
-      struct symbol *sym;
+      struct block_symbol sym;
       int new_scope_len = scope_len;
 
       /* If the current scope is followed by "::", skip past that.  */
@@ -808,7 +714,7 @@ lookup_namespace_scope (const struct lan
       new_scope_len += cp_find_first_component (scope + new_scope_len);
       sym = lookup_namespace_scope (langdef, name, block, domain,
 				    scope, new_scope_len);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	return sym;
     }
 
@@ -826,7 +732,7 @@ lookup_namespace_scope (const struct lan
   if (scope_len == 0 && strchr (name, ':') == NULL)
     return cp_lookup_bare_symbol (langdef, name, block, domain, 1);
 
-  the_namespace = alloca (scope_len + 1);
+  the_namespace = (char *) alloca (scope_len + 1);
   strncpy (the_namespace, scope, scope_len);
   the_namespace[scope_len] = '\0';
   return cp_lookup_symbol_in_namespace (the_namespace, name,
@@ -839,13 +745,13 @@ lookup_namespace_scope (const struct lan
    we're looking for, BLOCK is the block that we're searching within,
    DOMAIN says what kind of symbols we're looking for.  */
 
-struct symbol *
+struct block_symbol
 cp_lookup_symbol_nonlocal (const struct language_defn *langdef,
 			   const char *name,
 			   const struct block *block,
 			   const domain_enum domain)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
   const char *scope = block_scope (block);
 
   if (symbol_lookup_debug)
@@ -862,14 +768,16 @@ cp_lookup_symbol_nonlocal (const struct 
   sym = lookup_namespace_scope (langdef, name, block, domain, scope, 0);
 
   /* Search for name in namespaces imported to this and parent blocks.  */
-  if (sym == NULL)
+  if (sym.symbol == NULL)
     sym = cp_lookup_symbol_via_all_imports (scope, name, block, domain);
 
   if (symbol_lookup_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
 			  "cp_lookup_symbol_nonlocal (...) = %s\n",
-			  sym != NULL ? host_address_to_string (sym) : "NULL");
+			  (sym.symbol != NULL
+			   ? host_address_to_string (sym.symbol)
+			   : "NULL"));
     }
   return sym;
 }
@@ -882,7 +790,7 @@ cp_find_type_baseclass_by_name (struct t
 {
   int i;
 
-  CHECK_TYPEDEF (parent_type);
+  parent_type = check_typedef (parent_type);
   for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
     {
       struct type *type = check_typedef (TYPE_BASECLASS (parent_type, i));
@@ -905,40 +813,34 @@ cp_find_type_baseclass_by_name (struct t
 /* Search through the base classes of PARENT_TYPE for a symbol named
    NAME in block BLOCK.  */
 
-static struct symbol *
+static struct block_symbol
 find_symbol_in_baseclass (struct type *parent_type, const char *name,
 			  const struct block *block, const domain_enum domain,
 			  int is_in_anonymous)
 {
   int i;
-  struct symbol *sym;
-  struct cleanup *cleanup;
-  char *concatenated_name;
-
-  sym = NULL;
-  concatenated_name = NULL;
-  cleanup = make_cleanup (free_current_contents, &concatenated_name);
+  struct block_symbol sym;
+
+  sym.symbol = NULL;
+  sym.block = NULL;
 
   for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
     {
-      size_t len;
       struct type *base_type = TYPE_BASECLASS (parent_type, i);
       const char *base_name = TYPE_BASECLASS_NAME (parent_type, i);
 
       if (base_name == NULL)
 	continue;
 
-      len = strlen (base_name) + 2 + strlen (name) + 1;
-      concatenated_name = xrealloc (concatenated_name, len);
-      xsnprintf (concatenated_name, len, "%s::%s", base_name, name);
+      std::string concatenated_name = std::string (base_name) + "::" + name;
 
-      sym = cp_lookup_nested_symbol_1 (base_type, name, concatenated_name,
+      sym = cp_lookup_nested_symbol_1 (base_type, name,
+				       concatenated_name.c_str (),
 				       block, domain, 1, is_in_anonymous);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	break;
     }
 
-  do_cleanups (cleanup);
   return sym;
 }
 
@@ -954,7 +856,7 @@ find_symbol_in_baseclass (struct type *p
    If IS_IN_ANONYMOUS is non-zero then CONCATENATED_NAME is in an anonymous
    namespace.  */
 
-static struct symbol *
+static struct block_symbol
 cp_lookup_nested_symbol_1 (struct type *container_type,
 			   const char *nested_name,
 			   const char *concatenated_name,
@@ -962,7 +864,7 @@ cp_lookup_nested_symbol_1 (struct type *
 			   const domain_enum domain,
 			   int basic_lookup, int is_in_anonymous)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   /* NOTE: carlton/2003-11-10: We don't treat C++ class members
      of classes like, say, data or function members.  Instead,
@@ -975,7 +877,7 @@ cp_lookup_nested_symbol_1 (struct type *
     {
       sym = cp_basic_lookup_symbol (concatenated_name, block, domain,
 				    is_in_anonymous);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	return sym;
     }
 
@@ -986,7 +888,7 @@ cp_lookup_nested_symbol_1 (struct type *
 
   /* First search in this symtab, what we want is possibly there.  */
   sym = lookup_symbol_in_static_block (concatenated_name, block, domain);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     return sym;
 
   /* Nope.  We now have to search all static blocks in all objfiles,
@@ -997,21 +899,21 @@ cp_lookup_nested_symbol_1 (struct type *
   if (!is_in_anonymous)
     {
       sym = lookup_static_symbol (concatenated_name, domain);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	return sym;
     }
 
   /* If this is a class with baseclasses, search them next.  */
-  CHECK_TYPEDEF (container_type);
+  container_type = check_typedef (container_type);
   if (TYPE_N_BASECLASSES (container_type) > 0)
     {
       sym = find_symbol_in_baseclass (container_type, nested_name, block,
 				      domain, is_in_anonymous);
-      if (sym != NULL)
+      if (sym.symbol != NULL)
 	return sym;
     }
 
-  return NULL;
+  return null_block_symbol;
 }
 
 /* Look up a symbol named NESTED_NAME that is nested inside the C++
@@ -1019,7 +921,7 @@ cp_lookup_nested_symbol_1 (struct type *
    given by BLOCK, and in DOMAIN.
    Return NULL if there is no such nested symbol.  */
 
-struct symbol *
+struct block_symbol
 cp_lookup_nested_symbol (struct type *parent_type,
 			 const char *nested_name,
 			 const struct block *block,
@@ -1029,7 +931,7 @@ cp_lookup_nested_symbol (struct type *pa
      original type.  */
   struct type *saved_parent_type = parent_type;
 
-  CHECK_TYPEDEF (parent_type);
+  parent_type = check_typedef (parent_type);
 
   if (symbol_lookup_debug)
     {
@@ -1055,12 +957,12 @@ cp_lookup_nested_symbol (struct type *pa
       {
 	int size;
 	const char *parent_name = type_name_no_tag_or_error (saved_parent_type);
-	struct symbol *sym;
+	struct block_symbol sym;
 	char *concatenated_name;
 	int is_in_anonymous;
 
 	size = strlen (parent_name) + 2 + strlen (nested_name) + 1;
-	concatenated_name = alloca (size);
+	concatenated_name = (char *) alloca (size);
 	xsnprintf (concatenated_name, size, "%s::%s",
 		   parent_name, nested_name);
 	is_in_anonymous = cp_is_in_anonymous (concatenated_name);
@@ -1073,8 +975,9 @@ cp_lookup_nested_symbol (struct type *pa
 	  {
 	    fprintf_unfiltered (gdb_stdlog,
 				"cp_lookup_nested_symbol (...) = %s\n",
-				sym != NULL
-				? host_address_to_string (sym) : "NULL");
+				(sym.symbol != NULL
+				 ? host_address_to_string (sym.symbol)
+				 : "NULL"));
 	  }
 	return sym;
       }
@@ -1087,7 +990,7 @@ cp_lookup_nested_symbol (struct type *pa
 			      "cp_lookup_nested_symbol (...) = NULL"
 			      " (func/method)\n");
 	}
-      return NULL;
+      return null_block_symbol;
 
     default:
       internal_error (__FILE__, __LINE__,
@@ -1158,7 +1061,7 @@ cp_lookup_transparent_type_loop (const c
 	return retval;
     }
 
-  full_name = alloca (scope_length + 2 + strlen (name) + 1);
+  full_name = (char *) alloca (scope_length + 2 + strlen (name) + 1);
   strncpy (full_name, scope, scope_length);
   strncpy (full_name + scope_length, "::", 2);
   strcpy (full_name + scope_length + 2, name);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-support.c ./gdb/cp-support.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-support.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-support.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Helper routines for C++ support in GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -32,8 +32,9 @@
 #include "expression.h"
 #include "value.h"
 #include "cp-abi.h"
+#include "namespace.h"
 #include <signal.h>
-
+#include "gdb_setjmp.h"
 #include "safe-ctype.h"
 
 #define d_left(dc) (dc)->u.s_binary.left
@@ -91,25 +92,7 @@ copy_string_to_obstack (struct obstack *
 			long *len)
 {
   *len = strlen (string);
-  return obstack_copy (obstack, string, *len);
-}
-
-/* A cleanup wrapper for cp_demangled_name_parse_free.  */
-
-static void
-do_demangled_name_parse_free_cleanup (void *data)
-{
-  struct demangle_parse_info *info = (struct demangle_parse_info *) data;
-
-  cp_demangled_name_parse_free (info);
-}
-
-/* Create a cleanup for C++ name parsing.  */
-
-struct cleanup *
-make_cleanup_cp_demangled_name_parse_free (struct demangle_parse_info *info)
-{
-  return make_cleanup (do_demangled_name_parse_free_cleanup, info);
+  return (char *) obstack_copy (obstack, string, *len);
 }
 
 /* Return 1 if STRING is clearly already in canonical form.  This
@@ -175,7 +158,7 @@ inspect_type (struct demangle_parse_info
 
   TRY
     {
-      sym = lookup_symbol (name, 0, VAR_DOMAIN, 0);
+      sym = lookup_symbol (name, 0, VAR_DOMAIN, 0).symbol;
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -208,8 +191,7 @@ inspect_type (struct demangle_parse_info
 	  long len;
 	  int is_anon;
 	  struct type *type;
-	  struct demangle_parse_info *i;
-	  struct ui_file *buf;
+	  std::unique_ptr<demangle_parse_info> i;
 
 	  /* Get the real type of the typedef.  */
 	  type = check_typedef (otype);
@@ -245,23 +227,21 @@ inspect_type (struct demangle_parse_info
 		type = last;
 	    }
 
-	  buf = mem_fileopen ();
+	  string_file buf;
 	  TRY
-	  {
-	    type_print (type, "", buf, -1);
-	  }
-
+	    {
+	      type_print (type, "", &buf, -1);
+	    }
 	  /* If type_print threw an exception, there is little point
 	     in continuing, so just bow out gracefully.  */
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
-	      ui_file_delete (buf);
 	      return 0;
 	    }
 	  END_CATCH
 
-	  name = ui_file_obsavestring (buf, &info->obstack, &len);
-	  ui_file_delete (buf);
+	  len = buf.size ();
+	  name = (char *) obstack_copy0 (&info->obstack, buf.c_str (), len);
 
 	  /* Turn the result into a new tree.  Note that this
 	     tree will contain pointers into NAME, so NAME cannot
@@ -271,7 +251,7 @@ inspect_type (struct demangle_parse_info
 	  if (i != NULL)
 	    {
 	      /* Merge the two trees.  */
-	      cp_merge_demangle_parse_infos (info, ret_comp, i);
+	      cp_merge_demangle_parse_infos (info, ret_comp, i.get ());
 
 	      /* Replace any newly introduced typedefs -- but not
 		 if the type is anonymous (that would lead to infinite
@@ -287,14 +267,12 @@ inspect_type (struct demangle_parse_info
 
 		 Canonicalize the name again, and store it in the
 		 current node (RET_COMP).  */
-	      char *canon = cp_canonicalize_string_no_typedefs (name);
+	      std::string canon = cp_canonicalize_string_no_typedefs (name);
 
-	      if (canon != NULL)
+	      if (!canon.empty ())
 		{
-		  /* Copy the canonicalization into the obstack and
-		     free CANON.  */
-		  name = copy_string_to_obstack (&info->obstack, canon, &len);
-		  xfree (canon);
+		  /* Copy the canonicalization into the obstack.  */
+		  name = copy_string_to_obstack (&info->obstack, canon.c_str (), &len);
 		}
 
 	      ret_comp->u.s_name.s = name;
@@ -320,7 +298,7 @@ replace_typedefs_qualified_name (struct 
 {
   long len;
   char *name;
-  struct ui_file *buf = mem_fileopen ();
+  string_file buf;
   struct demangle_component *comp = ret_comp;
 
   /* Walk each node of the qualified name, reconstructing the name of
@@ -334,9 +312,9 @@ replace_typedefs_qualified_name (struct 
 	{
 	  struct demangle_component newobj;
 
-	  ui_file_write (buf, d_left (comp)->u.s_name.s,
-			 d_left (comp)->u.s_name.len);
-	  name = ui_file_obsavestring (buf, &info->obstack, &len);
+	  buf.write (d_left (comp)->u.s_name.s, d_left (comp)->u.s_name.len);
+	  len = buf.size ();
+	  name = (char *) obstack_copy0 (&info->obstack, buf.c_str (), len);
 	  newobj.type = DEMANGLE_COMPONENT_NAME;
 	  newobj.u.s_name.s = name;
 	  newobj.u.s_name.len = len;
@@ -349,12 +327,11 @@ replace_typedefs_qualified_name (struct 
 		 string and replace the top DEMANGLE_COMPONENT_QUAL_NAME
 		 node.  */
 
-	      ui_file_rewind (buf);
+	      buf.clear ();
 	      n = cp_comp_to_string (&newobj, 100);
 	      if (n == NULL)
 		{
 		  /* If something went astray, abort typedef substitutions.  */
-		  ui_file_delete (buf);
 		  return;
 		}
 
@@ -379,14 +356,13 @@ replace_typedefs_qualified_name (struct 
 	  if (name == NULL)
 	    {
 	      /* If something went astray, abort typedef substitutions.  */
-	      ui_file_delete (buf);
 	      return;
 	    }
-	  fputs_unfiltered (name, buf);
+	  buf.puts (name);
 	  xfree (name);
 	}
 
-      ui_file_write (buf, "::", 2);
+      buf.write ("::", 2);
       comp = d_right (comp);
     }
 
@@ -396,8 +372,9 @@ replace_typedefs_qualified_name (struct 
 
   if (comp->type == DEMANGLE_COMPONENT_NAME)
     {
-      ui_file_write (buf, comp->u.s_name.s, comp->u.s_name.len);
-      name = ui_file_obsavestring (buf, &info->obstack, &len);
+      buf.write (comp->u.s_name.s, comp->u.s_name.len);
+      len = buf.size ();
+      name = (char *) obstack_copy0 (&info->obstack, buf.c_str (), len);
 
       /* Replace the top (DEMANGLE_COMPONENT_QUAL_NAME) node
 	 with a DEMANGLE_COMPONENT_NAME node containing the whole
@@ -409,8 +386,6 @@ replace_typedefs_qualified_name (struct 
     }
   else
     replace_typedefs (info, comp, finder, data);
-
-  ui_file_delete (buf);
 }
 
 
@@ -457,7 +432,7 @@ replace_typedefs (struct demangle_parse_
 	      sym = NULL;
 	      TRY
 		{
-		  sym = lookup_symbol (local_name, 0, VAR_DOMAIN, 0);
+		  sym = lookup_symbol (local_name, 0, VAR_DOMAIN, 0).symbol;
 		}
 	      CATCH (except, RETURN_MASK_ALL)
 		{
@@ -528,43 +503,36 @@ replace_typedefs (struct demangle_parse_
     }
 }
 
-/* Parse STRING and convert it to canonical form, resolving any typedefs.
-   If parsing fails, or if STRING is already canonical, return NULL.
-   Otherwise return the canonical form.  The return value is allocated via
-   xmalloc.  If FINDER is not NULL, then type components are passed to
-   FINDER to be looked up.  DATA is passed verbatim to FINDER.  */
+/* Parse STRING and convert it to canonical form, resolving any
+   typedefs.  If parsing fails, or if STRING is already canonical,
+   return the empty string.  Otherwise return the canonical form.  If
+   FINDER is not NULL, then type components are passed to FINDER to be
+   looked up.  DATA is passed verbatim to FINDER.  */
 
-char *
+std::string
 cp_canonicalize_string_full (const char *string,
 			     canonicalization_ftype *finder,
 			     void *data)
 {
-  char *ret;
+  std::string ret;
   unsigned int estimated_len;
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
 
-  ret = NULL;
   estimated_len = strlen (string) * 2;
   info = cp_demangled_name_to_comp (string, NULL);
   if (info != NULL)
     {
       /* Replace all the typedefs in the tree.  */
-      replace_typedefs (info, info->tree, finder, data);
+      replace_typedefs (info.get (), info->tree, finder, data);
 
       /* Convert the tree back into a string.  */
       ret = cp_comp_to_string (info->tree, estimated_len);
-      gdb_assert (ret != NULL);
-
-      /* Free the parse information.  */
-      cp_demangled_name_parse_free (info);
+      gdb_assert (!ret.empty ());
 
       /* Finally, compare the original string with the computed
 	 name, returning NULL if they are the same.  */
-      if (strcmp (string, ret) == 0)
-	{
-	  xfree (ret);
-	  return NULL;
-	}
+      if (ret == string)
+	return std::string ();
     }
 
   return ret;
@@ -573,46 +541,41 @@ cp_canonicalize_string_full (const char 
 /* Like cp_canonicalize_string_full, but always passes NULL for
    FINDER.  */
 
-char *
+std::string
 cp_canonicalize_string_no_typedefs (const char *string)
 {
   return cp_canonicalize_string_full (string, NULL, NULL);
 }
 
 /* Parse STRING and convert it to canonical form.  If parsing fails,
-   or if STRING is already canonical, return NULL.  Otherwise return
-   the canonical form.  The return value is allocated via xmalloc.  */
+   or if STRING is already canonical, return the empty string.
+   Otherwise return the canonical form.  */
 
-char *
+std::string
 cp_canonicalize_string (const char *string)
 {
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
   unsigned int estimated_len;
-  char *ret;
 
   if (cp_already_canonical (string))
-    return NULL;
+    return std::string ();
 
   info = cp_demangled_name_to_comp (string, NULL);
   if (info == NULL)
-    return NULL;
+    return std::string ();
 
   estimated_len = strlen (string) * 2;
-  ret = cp_comp_to_string (info->tree, estimated_len);
-  cp_demangled_name_parse_free (info);
+  std::string ret = cp_comp_to_string (info->tree, estimated_len);
 
-  if (ret == NULL)
+  if (ret.empty ())
     {
       warning (_("internal error: string \"%s\" failed to be canonicalized"),
 	       string);
-      return NULL;
+      return std::string ();
     }
 
-  if (strcmp (string, ret) == 0)
-    {
-      xfree (ret);
-      return NULL;
-    }
+  if (ret == string)
+    return std::string ();
 
   return ret;
 }
@@ -623,12 +586,11 @@ cp_canonicalize_string (const char *stri
    freed when finished with the tree, or NULL if none was needed.
    OPTIONS will be passed to the demangler.  */
 
-static struct demangle_parse_info *
+static std::unique_ptr<demangle_parse_info>
 mangled_name_to_comp (const char *mangled_name, int options,
 		      void **memory, char **demangled_p)
 {
   char *demangled_name;
-  struct demangle_parse_info *info;
 
   /* If it looks like a v3 mangled name, then try to go directly
      to trees.  */
@@ -640,7 +602,7 @@ mangled_name_to_comp (const char *mangle
 					  options, memory);
       if (ret)
 	{
-	  info = cp_new_demangle_parse_info ();
+	  std::unique_ptr<demangle_parse_info> info (new demangle_parse_info);
 	  info->tree = ret;
 	  *demangled_p = NULL;
 	  return info;
@@ -655,7 +617,8 @@ mangled_name_to_comp (const char *mangle
   
   /* If we could demangle the name, parse it to build the component
      tree.  */
-  info = cp_demangled_name_to_comp (demangled_name, NULL);
+  std::unique_ptr<demangle_parse_info> info
+    = cp_demangled_name_to_comp (demangled_name, NULL);
 
   if (info == NULL)
     {
@@ -675,7 +638,7 @@ cp_class_name_from_physname (const char 
   void *storage = NULL;
   char *demangled_name = NULL, *ret;
   struct demangle_component *ret_comp, *prev_comp, *cur_comp;
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
   int done;
 
   info = mangled_name_to_comp (physname, DMGL_ANSI,
@@ -754,7 +717,6 @@ cp_class_name_from_physname (const char 
 
   xfree (storage);
   xfree (demangled_name);
-  cp_demangled_name_parse_free (info);
   return ret;
 }
 
@@ -824,7 +786,7 @@ method_name_from_physname (const char *p
   void *storage = NULL;
   char *demangled_name = NULL, *ret;
   struct demangle_component *ret_comp;
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
 
   info = mangled_name_to_comp (physname, DMGL_ANSI,
 			       &storage, &demangled_name);
@@ -841,7 +803,6 @@ method_name_from_physname (const char *p
 
   xfree (storage);
   xfree (demangled_name);
-  cp_demangled_name_parse_free (info);
   return ret;
 }
 
@@ -856,7 +817,7 @@ cp_func_name (const char *full_name)
 {
   char *ret;
   struct demangle_component *ret_comp;
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
 
   info = cp_demangled_name_to_comp (full_name, NULL);
   if (!info)
@@ -868,7 +829,6 @@ cp_func_name (const char *full_name)
   if (ret_comp != NULL)
     ret = cp_comp_to_string (ret_comp, 10);
 
-  cp_demangled_name_parse_free (info);
   return ret;
 }
 
@@ -881,7 +841,7 @@ cp_remove_params (const char *demangled_
 {
   int done = 0;
   struct demangle_component *ret_comp;
-  struct demangle_parse_info *info;
+  std::unique_ptr<demangle_parse_info> info;
   char *ret = NULL;
 
   if (demangled_name == NULL)
@@ -914,7 +874,6 @@ cp_remove_params (const char *demangled_
   if (ret_comp->type == DEMANGLE_COMPONENT_TYPED_NAME)
     ret = cp_comp_to_string (d_left (ret_comp), 10);
 
-  cp_demangled_name_parse_free (info);
   return ret;
 }
 
@@ -1036,8 +995,13 @@ cp_find_first_component_aux (const char 
 	      return strlen (name);
 	    }
 	case '\0':
-	case ':':
 	  return index;
+	case ':':
+	  /* ':' marks a component iff the next character is also a ':'.
+	     Otherwise it is probably malformed input.  */
+	  if (name[index + 1] == ':')
+	    return index;
+	  break;
 	case 'o':
 	  /* Operator names can screw up the recursion.  */
 	  if (operator_possible
@@ -1191,8 +1155,7 @@ make_symbol_overload_list (const char *f
 
   sym_return_val_size = 100;
   sym_return_val_index = 0;
-  sym_return_val = xmalloc ((sym_return_val_size + 1) *
-			    sizeof (struct symbol *));
+  sym_return_val = XNEWVEC (struct symbol *, sym_return_val_size + 1);
   sym_return_val[0] = NULL;
 
   old_cleanups = make_cleanup (xfree, sym_return_val);
@@ -1204,7 +1167,7 @@ make_symbol_overload_list (const char *f
   else
     {
       char *concatenated_name
-	= alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
+	= (char *) alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
       strcpy (concatenated_name, the_namespace);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, func_name);
@@ -1246,7 +1209,7 @@ make_symbol_overload_list_namespace (con
   else
     {
       char *concatenated_name
-	= alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
+	= (char *) alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
 
       strcpy (concatenated_name, the_namespace);
       strcat (concatenated_name, "::");
@@ -1297,7 +1260,7 @@ make_symbol_overload_list_adl_namespace 
 
   if (prefix_len != 0)
     {
-      the_namespace = alloca (prefix_len + 1);
+      the_namespace = (char *) alloca (prefix_len + 1);
       strncpy (the_namespace, type_name, prefix_len);
       the_namespace[prefix_len] = '\0';
 
@@ -1339,7 +1302,7 @@ make_symbol_overload_list_adl (struct ty
 static void
 reset_directive_searched (void *data)
 {
-  struct using_direct *direct = data;
+  struct using_direct *direct = (struct using_direct *) data;
   direct->searched = 0;
 }
 
@@ -1455,7 +1418,7 @@ cp_lookup_rtti_type (const char *name, s
 
   /* Use VAR_DOMAIN here as NAME may be a typedef.  PR 18141, 18417.
      Classes "live" in both STRUCT_DOMAIN and VAR_DOMAIN.  */
-  rtti_sym = lookup_symbol (name, block, VAR_DOMAIN, NULL);
+  rtti_sym = lookup_symbol (name, block, VAR_DOMAIN, NULL).symbol;
 
   if (rtti_sym == NULL)
     {
@@ -1535,7 +1498,7 @@ gdb_demangle (const char *name, int opti
 #if defined (HAVE_SIGACTION) && defined (SA_RESTART)
   struct sigaction sa, old_sa;
 #else
-  void (*ofunc) ();
+  sighandler_t ofunc;
 #endif
   static int core_dump_allowed = -1;
 
@@ -1559,7 +1522,7 @@ gdb_demangle (const char *name, int opti
 #endif
       sigaction (SIGSEGV, &sa, &old_sa);
 #else
-      ofunc = (void (*)()) signal (SIGSEGV, gdb_demangle_signal_handler);
+      ofunc = signal (SIGSEGV, gdb_demangle_signal_handler);
 #endif
 
       crash_signal = SIGSETJMP (gdb_demangle_jmp_buf);
@@ -1596,7 +1559,9 @@ gdb_demangle (const char *name, int opti
 				    "demangler-warning", short_msg);
 	      make_cleanup (xfree, long_msg);
 
-	      target_terminal_ours ();
+	      make_cleanup_restore_target_terminal ();
+	      target_terminal_ours_for_output ();
+
 	      begin_line ();
 	      if (core_dump_allowed)
 		fprintf_unfiltered (gdb_stderr,
@@ -1620,6 +1585,15 @@ gdb_demangle (const char *name, int opti
   return result;
 }
 
+/* See cp-support.h.  */
+
+int
+gdb_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = gdb_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
+  return *demangled != NULL;
+}
+
 /* Don't allow just "maintenance cplus".  */
 
 static  void
@@ -1646,7 +1620,7 @@ first_component_command (char *arg, int 
     return;
 
   len = cp_find_first_component (arg);
-  prefix = alloca (len + 1);
+  prefix = (char *) alloca (len + 1);
 
   memcpy (prefix, arg, len);
   prefix[len] = '\0';
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-support.h ./gdb/cp-support.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-support.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-support.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Helper routines for C++ support in GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
    Namespace support contributed by David Carlton.
@@ -36,6 +36,7 @@ struct block;
 struct objfile;
 struct type;
 struct demangle_component;
+struct using_direct;
 
 /* A string representing the name of the anonymous namespace used in GDB.  */
 
@@ -49,6 +50,10 @@ struct demangle_component;
 
 struct demangle_parse_info
 {
+  demangle_parse_info ();
+
+  ~demangle_parse_info ();
+
   /* The memory used during the parse.  */
   struct demangle_info *info;
 
@@ -59,101 +64,18 @@ struct demangle_parse_info
   struct obstack obstack;
 };
 
-/* This struct is designed to store data from using directives.  It
-   says that names from namespace IMPORT_SRC should be visible within
-   namespace IMPORT_DEST.  These form a linked list; NEXT is the next
-   element of the list.  If the imported namespace or declaration has
-   been aliased within the IMPORT_DEST namespace, ALIAS is set to a
-   string representing the alias.  Otherwise, ALIAS is NULL.
-   DECLARATION is the name of the imported declaration, if this import
-   statement represents one.  Otherwise DECLARATION is NULL and this
-   import statement represents a namespace.
-
-   C++:      using namespace A;
-   Fortran:  use A
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = NULL
-   declaration = NULL
-   excludes = NULL
-
-   C++:      using A::x;
-   Fortran:  use A, only: x
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = NULL
-   declaration = "x"
-   excludes = NULL
-   The declaration will get imported as import_dest::x.
-
-   C++ has no way to import all names except those listed ones.
-   Fortran:  use A, localname => x
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = "localname"
-   declaration = "x"
-   excludes = NULL
-   +
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = NULL
-   declaration = NULL
-   excludes = ["x"]
-   All the entries of A get imported except of "x".  "x" gets imported as
-   "localname".  "x" is not defined as a local name by this statement.
-
-   C++:      namespace LOCALNS = A;
-   Fortran has no way to address non-local namespace/module.
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = "LOCALNS"
-   declaration = NULL
-   excludes = NULL
-   The namespace will get imported as the import_dest::LOCALNS
-   namespace.
-
-   C++ cannot express it, it would be something like: using localname
-   = A::x;
-   Fortran:  use A, only localname => x
-   import_src = "A"
-   import_dest = local scope of the import statement even such as ""
-   alias = "localname"
-   declaration = "x"
-   excludes = NULL
-   The declaration will get imported as localname or
-   `import_dest`localname.  */
-
-struct using_direct
-{
-  const char *import_src;
-  const char *import_dest;
-
-  const char *alias;
-  const char *declaration;
-
-  struct using_direct *next;
-
-  /* Used during import search to temporarily mark this node as
-     searched.  */
-  int searched;
-
-  /* USING_DIRECT has variable allocation size according to the number of
-     EXCLUDES entries, the last entry is NULL.  */
-  const char *excludes[1];
-};
-
 
 /* Functions from cp-support.c.  */
 
-extern char *cp_canonicalize_string (const char *string);
+extern std::string cp_canonicalize_string (const char *string);
 
-extern char *cp_canonicalize_string_no_typedefs (const char *string);
+extern std::string cp_canonicalize_string_no_typedefs (const char *string);
 
 typedef const char *(canonicalization_ftype) (struct type *, void *);
 
-extern char *cp_canonicalize_string_full (const char *string,
-					  canonicalization_ftype *finder,
-					  void *data);
+extern std::string cp_canonicalize_string_full (const char *string,
+						canonicalization_ftype *finder,
+						void *data);
 
 extern char *cp_class_name_from_physname (const char *physname);
 
@@ -181,38 +103,32 @@ extern struct type *cp_lookup_rtti_type 
 
 extern int cp_is_in_anonymous (const char *symbol_name);
 
-extern void cp_add_using_directive (const char *dest,
-                                    const char *src,
-                                    const char *alias,
-				    const char *declaration,
-				    VEC (const_char_ptr) *excludes,
-				    int copy_names,
-                                    struct obstack *obstack);
-
 extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol,
 					      struct objfile *objfile);
 
-extern struct symbol *cp_lookup_symbol_nonlocal
+extern struct block_symbol cp_lookup_symbol_nonlocal
      (const struct language_defn *langdef,
       const char *name,
       const struct block *block,
       const domain_enum domain);
 
-extern struct symbol *cp_lookup_symbol_namespace (const char *the_namespace,
-						  const char *name,
-						  const struct block *block,
-						  const domain_enum domain);
+extern struct block_symbol
+  cp_lookup_symbol_namespace (const char *the_namespace,
+			      const char *name,
+			      const struct block *block,
+			      const domain_enum domain);
 
-extern struct symbol *cp_lookup_symbol_imports_or_template
+extern struct block_symbol cp_lookup_symbol_imports_or_template
      (const char *scope,
       const char *name,
       const struct block *block,
       const domain_enum domain);
 
-extern struct symbol *cp_lookup_nested_symbol (struct type *parent_type,
-					       const char *nested_name,
-					       const struct block *block,
-					       const domain_enum domain);
+extern struct block_symbol
+  cp_lookup_nested_symbol (struct type *parent_type,
+			   const char *nested_name,
+			   const struct block *block,
+			   const domain_enum domain);
 
 struct type *cp_lookup_transparent_type (const char *name);
 
@@ -223,21 +139,16 @@ struct type *cp_find_type_baseclass_by_n
 
 /* Functions from cp-name-parser.y.  */
 
-extern struct demangle_parse_info *cp_demangled_name_to_comp
+extern std::unique_ptr<demangle_parse_info> cp_demangled_name_to_comp
      (const char *demangled_name, const char **errmsg);
 
 extern char *cp_comp_to_string (struct demangle_component *result,
 				int estimated_len);
 
-extern void cp_demangled_name_parse_free (struct demangle_parse_info *);
-extern struct cleanup *make_cleanup_cp_demangled_name_parse_free
-     (struct demangle_parse_info *);
 extern void cp_merge_demangle_parse_infos (struct demangle_parse_info *,
 					   struct demangle_component *,
 					   struct demangle_parse_info *);
 
-extern struct demangle_parse_info *cp_new_demangle_parse_info (void);
-
 /* The list of "maint cplus" commands.  */
 
 extern struct cmd_list_element *maint_cplus_cmd_list;
@@ -246,4 +157,8 @@ extern struct cmd_list_element *maint_cp
 
 char *gdb_demangle (const char *name, int options);
 
+/* Like gdb_demangle, but suitable for use as la_sniff_from_mangled_name.  */
+
+int gdb_sniff_from_mangled_name (const char *mangled, char **demangled);
+
 #endif /* CP_SUPPORT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-valprint.c ./gdb/cp-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cp-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cp-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -80,15 +80,15 @@ static void cp_print_static_field (struc
 				   const struct value_print_options *);
 
 static void cp_print_value (struct type *, struct type *,
-			    const gdb_byte *, int,
+			    LONGEST,
 			    CORE_ADDR, struct ui_file *,
-			    int, const struct value *,
+			    int, struct value *,
 			    const struct value_print_options *,
 			    struct type **);
 
 
 /* GCC versions after 2.4.5 use this.  */
-EXPORTED_CONST char vtbl_ptr_name[] = "__vtbl_ptr_type";
+extern const char vtbl_ptr_name[] = "__vtbl_ptr_type";
 
 /* Return truth value for assertion that TYPE is of the type
    "pointer to virtual function".  */
@@ -154,9 +154,9 @@ cp_is_vtbl_member (struct type *type)
 
 void
 cp_print_value_fields (struct type *type, struct type *real_type,
-		       const gdb_byte *valaddr, int offset,
+		       LONGEST offset,
 		       CORE_ADDR address, struct ui_file *stream,
-		       int recurse, const struct value *val,
+		       int recurse, struct value *val,
 		       const struct value_print_options *options,
 		       struct type **dont_print_vb,
 		       int dont_print_statmem)
@@ -165,7 +165,7 @@ cp_print_value_fields (struct type *type
   int fields_seen = 0;
   static int last_set_recurse = -1;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   
   if (recurse == 0)
     {
@@ -194,7 +194,7 @@ cp_print_value_fields (struct type *type
      duplicates of virtual baseclasses.  */
 
   if (n_baseclasses > 0)
-    cp_print_value (type, real_type, valaddr, 
+    cp_print_value (type, real_type,
 		    offset, address, stream,
 		    recurse + 1, val, options,
 		    dont_print_vb);
@@ -228,6 +228,8 @@ cp_print_value_fields (struct type *type
       vptr_fieldno = get_vptr_fieldno (type, &vptr_basetype);
       for (i = n_baseclasses; i < len; i++)
 	{
+	  const gdb_byte *valaddr = value_contents_for_printing (val);
+
 	  /* If requested, skip printing of static fields.  */
 	  if (!options->static_field_print
 	      && field_is_static (&TYPE_FIELD (type, i)))
@@ -353,7 +355,6 @@ cp_print_value_fields (struct type *type
 
 		  opts.deref_ref = 0;
 		  val_print (TYPE_FIELD_TYPE (type, i),
-			     valaddr, 
 			     offset + TYPE_FIELD_BITPOS (type, i) / 8,
 			     address,
 			     stream, recurse + 1, val, &opts,
@@ -417,10 +418,10 @@ cp_print_value_fields (struct type *type
 
 void
 cp_print_value_fields_rtti (struct type *type,
-			    const gdb_byte *valaddr, int offset,
+			    const gdb_byte *valaddr, LONGEST offset,
 			    CORE_ADDR address,
 			    struct ui_file *stream, int recurse,
-			    const struct value *val,
+			    struct value *val,
 			    const struct value_print_options *options,
 			    struct type **dont_print_vb, 
 			    int dont_print_statmem)
@@ -434,7 +435,8 @@ cp_print_value_fields_rtti (struct type 
 				     TARGET_CHAR_BIT * TYPE_LENGTH (type)))
     {
       struct value *value;
-      int full, top, using_enc;
+      int full, using_enc;
+      LONGEST top;
 
       /* Ugh, we have to convert back to a value here.  */
       value = value_from_contents_and_address (type, valaddr + offset,
@@ -449,7 +451,7 @@ cp_print_value_fields_rtti (struct type 
   if (!real_type)
     real_type = type;
 
-  cp_print_value_fields (type, real_type, valaddr, offset,
+  cp_print_value_fields (type, real_type, offset,
 			 address, stream, recurse, val, options,
 			 dont_print_vb, dont_print_statmem);
 }
@@ -459,9 +461,9 @@ cp_print_value_fields_rtti (struct type 
 
 static void
 cp_print_value (struct type *type, struct type *real_type,
-		const gdb_byte *valaddr, int offset,
+		LONGEST offset,
 		CORE_ADDR address, struct ui_file *stream,
-		int recurse, const struct value *val,
+		int recurse, struct value *val,
 		const struct value_print_options *options,
 		struct type **dont_print_vb)
 {
@@ -469,8 +471,9 @@ cp_print_value (struct type *type, struc
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
   struct obstack tmp_obstack = dont_print_vb_obstack;
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
-  int thisoffset;
+  LONGEST thisoffset;
   struct type *thistype;
+  const gdb_byte *valaddr = value_contents_for_printing (val);
 
   if (dont_print_vb == 0)
     {
@@ -483,12 +486,11 @@ cp_print_value (struct type *type, struc
 
   for (i = 0; i < n_baseclasses; i++)
     {
-      int boffset = 0;
+      LONGEST boffset = 0;
       int skip = 0;
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
       const char *basename = TYPE_NAME (baseclass);
-      const gdb_byte *base_valaddr = NULL;
-      const struct value *base_val = NULL;
+      struct value *base_val = NULL;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
 	{
@@ -535,7 +537,7 @@ cp_print_value (struct type *type, struc
 		  gdb_byte *buf;
 		  struct cleanup *back_to;
 
-		  buf = xmalloc (TYPE_LENGTH (baseclass));
+		  buf = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass));
 		  back_to = make_cleanup (xfree, buf);
 
 		  if (target_read_memory (address + boffset, buf,
@@ -548,18 +550,15 @@ cp_print_value (struct type *type, struc
 		  thisoffset = 0;
 		  boffset = 0;
 		  thistype = baseclass;
-		  base_valaddr = value_contents_for_printing_const (base_val);
 		  do_cleanups (back_to);
 		}
 	      else
 		{
-		  base_valaddr = valaddr;
 		  base_val = val;
 		}
 	    }
 	  else
 	    {
-	      base_valaddr = valaddr;
 	      base_val = val;
 	    }
 	}
@@ -588,7 +587,7 @@ cp_print_value (struct type *type, struc
 	     baseclass if possible.  */
 	  if (!options->raw)
 	    result
-	      = apply_ext_lang_val_pretty_printer (baseclass, base_valaddr,
+	      = apply_ext_lang_val_pretty_printer (baseclass,
 						   thisoffset + boffset,
 						   value_address (base_val),
 						   stream, recurse,
@@ -596,7 +595,7 @@ cp_print_value (struct type *type, struc
 						   current_language);
 
 	  if (!result)
-	    cp_print_value_fields (baseclass, thistype, base_valaddr,
+	    cp_print_value_fields (baseclass, thistype,
 				   thisoffset + boffset,
 				   value_address (base_val),
 				   stream, recurse, base_val, options,
@@ -669,9 +668,8 @@ cp_print_static_field (struct type *type
       addr = value_address (val);
       obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
 		    sizeof (CORE_ADDR));
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
       cp_print_value_fields (type, value_enclosing_type (val),
-			     value_contents_for_printing (val),
 			     value_embedded_offset (val), addr,
 			     stream, recurse, val,
 			     options, NULL, 1);
@@ -707,7 +705,7 @@ cp_print_static_field (struct type *type
 
   opts = *options;
   opts.deref_ref = 0;
-  val_print (type, value_contents_for_printing (val), 
+  val_print (type,
 	     value_embedded_offset (val),
 	     value_address (val),
 	     stream, recurse, val,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-linux-tdep.c ./gdb/cris-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cris-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux on CRIS processors, for GDB.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB.
    Written by Hendrik Ruijter, Stefan Andersson, Orjan Friberg,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-tdep.c ./gdb/cris-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cris-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target dependent code for CRIS, for GDB, the GNU debugger.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB.
    Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
@@ -320,7 +320,7 @@ cris_sigtramp_frame_unwind_cache (struct
   int i;
 
   if ((*this_cache))
-    return (*this_cache);
+    return (struct cris_unwind_cache *) (*this_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
   (*this_cache) = info;
@@ -485,7 +485,7 @@ struct instruction_environment
   int   delay_slot_pc_active;
   int   xflag_found;
   int   disable_interrupt;
-  int   byte_order;
+  enum bfd_endian byte_order;
 } inst_env_type;
 
 /* Machine-dependencies in CRIS for opcodes.  */
@@ -665,15 +665,14 @@ struct stack_item
 {
   int len;
   struct stack_item *prev;
-  void *data;
+  gdb_byte *data;
 };
 
 static struct stack_item *
 push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len)
 {
-  struct stack_item *si;
-  si = xmalloc (sizeof (struct stack_item));
-  si->data = xmalloc (len);
+  struct stack_item *si = XNEW (struct stack_item);
+  si->data = (gdb_byte *) xmalloc (len);
   si->len = len;
   si->prev = prev;
   memcpy (si->data, contents, len);
@@ -705,7 +704,7 @@ cris_frame_unwind_cache (struct frame_in
   struct cris_unwind_cache *info;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct cris_unwind_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
   (*this_prologue_cache) = info;
@@ -812,16 +811,9 @@ cris_push_dummy_call (struct gdbarch *gd
 		      int struct_return, CORE_ADDR struct_addr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  int stack_offset;
   int argreg;
   int argnum;
 
-  /* The function's arguments and memory allocated by gdb for the arguments to
-     point at reside in separate areas on the stack.
-     Both frame pointers grow toward higher addresses.  */
-  CORE_ADDR fp_arg;
-  CORE_ADDR fp_mem;
-
   struct stack_item *si = NULL;
 
   /* Push the return address.  */
@@ -838,7 +830,6 @@ cris_push_dummy_call (struct gdbarch *gd
   /* Now load as many as possible of the first arguments into registers,
      and push the rest onto the stack.  */
   argreg = ARG1_REGNUM;
-  stack_offset = 0;
 
   for (argnum = 0; argnum < nargs; argnum++)
     {
@@ -1042,9 +1033,6 @@ cris_scan_prologue (CORE_ADDR pc, struct
   unsigned short insn_next; 
   int regno;
 
-  /* Is there a push fp?  */
-  int have_fp; 
-
   /* Number of byte on stack used for local variables and movem.  */
   int val; 
 
@@ -1403,20 +1391,24 @@ cris_unwind_sp (struct gdbarch *gdbarch,
   return sp;
 }
 
-/* Use the program counter to determine the contents and size of a breakpoint
-   instruction.  It returns a pointer to a string of bytes that encode a
-   breakpoint instruction, stores the length of the string to *lenptr, and
-   adjusts pcptr (if necessary) to point to the actual memory location where
-   the breakpoint should be inserted.  */
-
-static const unsigned char *
-cris_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+cris_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  return 2;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+cris_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   static unsigned char break8_insn[] = {0x38, 0xe9};
   static unsigned char break15_insn[] = {0x3f, 0xe9};
-  *lenptr = 2;
+
+  *size = kind;
 
   if (tdep->cris_mode == cris_mode_guru)
     return break15_insn;
@@ -1473,7 +1465,6 @@ cris_spec_reg_applicable (struct gdbarch
 static int
 cris_register_size (struct gdbarch *gdbarch, int regno)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int i;
   int spec_regno;
   
@@ -1791,9 +1782,6 @@ cris_dwarf2_reg_to_regnum (struct gdbarc
   if (reg >= 0 && reg < ARRAY_SIZE (cris_dwarf_regmap))
     regnum = cris_dwarf_regmap[reg];
 
-  if (regnum == -1)
-    warning (_("Unmapped DWARF Register #%d encountered."), reg);
-
   return regnum;
 }
 
@@ -2001,25 +1989,25 @@ find_cris_op (unsigned short insn, inst_
    actually an internal error.  */
 
 static int
-find_step_target (struct frame_info *frame, inst_env_type *inst_env)
+find_step_target (struct regcache *regcache, inst_env_type *inst_env)
 {
   int i;
   int offset;
   unsigned short insn;
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
   /* Create a local register image and set the initial state.  */
   for (i = 0; i < NUM_GENREGS; i++)
     {
       inst_env->reg[i] = 
-	(unsigned long) get_frame_register_unsigned (frame, i);
+	(unsigned long) regcache_raw_get_unsigned (regcache, i);
     }
   offset = NUM_GENREGS;
   for (i = 0; i < NUM_SPECREGS; i++)
     {
       inst_env->preg[i] = 
-	(unsigned long) get_frame_register_unsigned (frame, offset + i);
+	(unsigned long) regcache_raw_get_unsigned (regcache, offset + i);
     }
   inst_env->branch_found = 0;
   inst_env->slot_needed = 0;
@@ -2072,16 +2060,16 @@ find_step_target (struct frame_info *fra
    digs through the opcodes in order to find all possible targets.
    Either one ordinary target or two targets for branches may be found.  */
 
-static int
-cris_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+cris_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   inst_env_type inst_env;
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
   /* Analyse the present instruction environment and insert 
      breakpoints.  */
-  int status = find_step_target (frame, &inst_env);
+  int status = find_step_target (regcache, &inst_env);
   if (status == -1)
     {
       /* Could not find a target.  Things are likely to go downhill 
@@ -2094,18 +2082,19 @@ cris_software_single_step (struct frame_
          and possibly another one for a branch, jump, etc.  */
       CORE_ADDR next_pc
 	= (CORE_ADDR) inst_env.reg[gdbarch_pc_regnum (gdbarch)];
-      insert_single_step_breakpoint (gdbarch, aspace, next_pc);
+
+      VEC_safe_push (CORE_ADDR, next_pcs, next_pc);
       if (inst_env.branch_found 
 	  && (CORE_ADDR) inst_env.branch_break_address != next_pc)
 	{
 	  CORE_ADDR branch_target_address
 		= (CORE_ADDR) inst_env.branch_break_address;
-	  insert_single_step_breakpoint (gdbarch,
-					 aspace, branch_target_address);
+
+	  VEC_safe_push (CORE_ADDR, next_pcs, branch_target_address);
 	}
     }
 
-  return 1;
+  return next_pcs;
 }
 
 /* Calculates the prefix value for quick offset addressing mode.  */
@@ -3803,10 +3792,7 @@ static int
 cris_delayed_get_disassembler (bfd_vma addr, struct disassemble_info *info)
 {
   int (*print_insn) (bfd_vma addr, struct disassemble_info *info);
-  /* FIXME: cagney/2003-08-27: It should be possible to select a CRIS
-     disassembler, even when there is no BFD.  Does something like
-     "gdb; target remote; disassmeble *0x123" work?  */
-  gdb_assert (exec_bfd != NULL);
+
   print_insn = cris_get_disassembler (exec_bfd);
   gdb_assert (print_insn != NULL);
   return print_insn (addr, info);
@@ -3898,8 +3884,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_cris_tdep (void)
 {
-  struct cmd_list_element *c;
-
   gdbarch_register (bfd_arch_cris, cris_gdbarch_init, cris_dump_tdep);
   
   /* CRIS-specific user-commands.  */
@@ -4037,32 +4021,15 @@ cris_gdbarch_init (struct gdbarch_info i
     }
 
   /* No matching architecture was found.  Create a new one.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
+  info.byte_order = BFD_ENDIAN_LITTLE;
   gdbarch = gdbarch_alloc (&info, tdep);
 
   tdep->cris_version = usr_cmd_cris_version;
   tdep->cris_mode = usr_cmd_cris_mode;
   tdep->cris_dwarf2_cfi = usr_cmd_cris_dwarf2_cfi;
 
-  /* INIT shall ensure that the INFO.BYTE_ORDER is non-zero.  */
-  switch (info.byte_order)
-    {
-    case BFD_ENDIAN_LITTLE:
-      /* Ok.  */
-      break;
-
-    case BFD_ENDIAN_BIG:
-      internal_error (__FILE__, __LINE__,
-		      _("cris_gdbarch_init: big endian byte order in info"));
-      break;
-    
-    default:
-      internal_error (__FILE__, __LINE__,
-		      _("cris_gdbarch_init: unknown byte order in info"));
-    }
-
   set_gdbarch_return_value (gdbarch, cris_return_value);
-
   set_gdbarch_sp_regnum (gdbarch, 14);
   
   /* Length of ordinary registers used in push_word and a few other
@@ -4087,9 +4054,7 @@ cris_gdbarch_init (struct gdbarch_info i
     case 8:
     case 9:
       /* Old versions; not supported.  */
-      internal_error (__FILE__, __LINE__, 
-		      _("cris_gdbarch_init: unsupported CRIS version"));
-      break;
+      return 0;
 
     case 10:
     case 11: 
@@ -4129,8 +4094,8 @@ cris_gdbarch_init (struct gdbarch_info i
       break;
 
     default:
-      internal_error (__FILE__, __LINE__, 
-		      _("cris_gdbarch_init: unknown CRIS version"));
+      /* Unknown version.  */
+      return 0;
     }
 
   /* Dummy frame functions (shared between CRISv10 and CRISv32 since they
@@ -4143,7 +4108,8 @@ cris_gdbarch_init (struct gdbarch_info i
   /* The stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, cris_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, cris_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, cris_sw_breakpoint_from_kind);
   
   set_gdbarch_unwind_pc (gdbarch, cris_unwind_pc);
   set_gdbarch_unwind_sp (gdbarch, cris_unwind_sp);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-tdep.h ./gdb/cris-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/cris-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/cris-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target dependent code for CRIS, for GDB, the GNU debugger.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB.
    Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ctf.c ./gdb/ctf.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ctf.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ctf.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* CTF format support.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Hui Zhu <hui_zhu@mentor.com>
    Contributed by Yao Qi <yao@codesourcery.com>
 
@@ -29,8 +29,8 @@
 #include "inferior.h"
 #include "gdbthread.h"
 #include "tracefile.h"
-
 #include <ctype.h>
+#include <algorithm>
 
 /* GDB saves trace buffers and other information (such as trace
    status) got from the remote target into Common Trace Format (CTF).
@@ -202,27 +202,6 @@ ctf_save_next_packet (struct trace_write
 static void
 ctf_save_metadata_header (struct trace_write_handler *handler)
 {
-  const char metadata_fmt[] =
-  "\ntrace {\n"
-  "	major = %u;\n"
-  "	minor = %u;\n"
-  "	byte_order = %s;\n"		/* be or le */
-  "	packet.header := struct {\n"
-  "		uint32_t magic;\n"
-  "	};\n"
-  "};\n"
-  "\n"
-  "stream {\n"
-  "	packet.context := struct {\n"
-  "		uint32_t content_size;\n"
-  "		uint32_t packet_size;\n"
-  "		uint16_t tpnum;\n"
-  "	};\n"
-  "	event.header := struct {\n"
-  "		uint32_t id;\n"
-  "	};\n"
-  "};\n";
-
   ctf_save_write_metadata (handler, "/* CTF %d.%d */\n",
 			   CTF_SAVE_MAJOR, CTF_SAVE_MINOR);
   ctf_save_write_metadata (handler,
@@ -262,7 +241,26 @@ ctf_save_metadata_header (struct trace_w
 #define HOST_ENDIANNESS "le"
 #endif
 
-  ctf_save_write_metadata (handler, metadata_fmt,
+  ctf_save_write_metadata (handler,
+			   "\ntrace {\n"
+			   "	major = %u;\n"
+			   "	minor = %u;\n"
+			   "	byte_order = %s;\n"
+			   "	packet.header := struct {\n"
+			   "		uint32_t magic;\n"
+			   "	};\n"
+			   "};\n"
+			   "\n"
+			   "stream {\n"
+			   "	packet.context := struct {\n"
+			   "		uint32_t content_size;\n"
+			   "		uint32_t packet_size;\n"
+			   "		uint16_t tpnum;\n"
+			   "	};\n"
+			   "	event.header := struct {\n"
+			   "		uint32_t id;\n"
+			   "	};\n"
+			   "};\n",
 			   CTF_SAVE_MAJOR, CTF_SAVE_MINOR,
 			   HOST_ENDIANNESS);
   ctf_save_write_metadata (handler, "\n");
@@ -306,11 +304,6 @@ ctf_target_save (struct trace_file_write
   return 0;
 }
 
-#ifdef USE_WIN32API
-#undef mkdir
-#define mkdir(pathname, mode) mkdir (pathname)
-#endif
-
 /* This is the implementation of trace_file_write_ops method
    start.  It creates the directory DIRNAME, metadata and datastream
    in the directory.  */
@@ -617,6 +610,15 @@ ctf_write_uploaded_tp (struct trace_file
 }
 
 /* This is the implementation of trace_file_write_ops method
+   write_tdesc.  */
+
+static void
+ctf_write_tdesc (struct trace_file_writer *self)
+{
+  /* Nothing so far. */
+}
+
+/* This is the implementation of trace_file_write_ops method
    write_definition_end.  */
 
 static void
@@ -799,6 +801,7 @@ static const struct trace_file_write_ops
   ctf_write_status,
   ctf_write_uploaded_tsv,
   ctf_write_uploaded_tp,
+  ctf_write_tdesc,
   ctf_write_definition_end,
   NULL,
   &ctf_write_frame_ops,
@@ -810,8 +813,7 @@ static const struct trace_file_write_ops
 struct trace_file_writer *
 ctf_trace_file_writer_new (void)
 {
-  struct ctf_trace_file_writer *writer
-    = xmalloc (sizeof (struct ctf_trace_file_writer));
+  struct ctf_trace_file_writer *writer = XNEW (struct ctf_trace_file_writer);
 
   writer->base.ops = &ctf_write_ops;
 
@@ -915,6 +917,12 @@ ctf_open_dir (const char *dirname)
 							   (SCOPE),	\
 							   #FIELD))
 
+#define SET_ENUM_FIELD(EVENT, SCOPE, VAR, TYPE, FIELD)			\
+  (VAR)->FIELD = (TYPE) bt_ctf_get_int64 (bt_ctf_get_field ((EVENT),	\
+							    (SCOPE),	\
+							    #FIELD))
+
+
 /* EVENT is the "status" event and TS is filled in.  */
 
 static void
@@ -923,7 +931,7 @@ ctf_read_status (struct bt_ctf_event *ev
   const struct bt_definition *scope
     = bt_ctf_get_top_level_scope (event, BT_EVENT_FIELDS);
 
-  SET_INT32_FIELD (event, scope, ts, stop_reason);
+  SET_ENUM_FIELD (event, scope, ts, enum trace_stop_reason, stop_reason);
   SET_INT32_FIELD (event, scope, ts, stopping_tracepoint);
   SET_INT32_FIELD (event, scope, ts, traceframe_count);
   SET_INT32_FIELD (event, scope, ts, traceframes_created);
@@ -1059,7 +1067,7 @@ ctf_read_tp (struct uploaded_tp **upload
       SET_INT32_FIELD (event, scope, utp, step);
       SET_INT32_FIELD (event, scope, utp, pass);
       SET_INT32_FIELD (event, scope, utp, hit_count);
-      SET_INT32_FIELD (event, scope, utp, type);
+      SET_ENUM_FIELD (event, scope, utp, enum bptype, type);
 
       /* Read 'cmd_strings'.  */
       SET_ARRAY_FIELD (event, scope, utp, cmd_num, cmd_strings);
@@ -1274,7 +1282,7 @@ ctf_xfer_partial (struct target_ops *ops
 {
   /* We're only doing regular memory for now.  */
   if (object != TARGET_OBJECT_MEMORY)
-    return -1;
+    return TARGET_XFER_E_IO;
 
   if (readbuf == NULL)
     error (_("ctf_xfer_partial: trace file is read-only"));
@@ -1339,7 +1347,7 @@ ctf_xfer_partial (struct target_ops *ops
 	      gdb_byte *contents;
 	      int k;
 
-	      contents = xmalloc (mlen);
+	      contents = (gdb_byte *) xmalloc (mlen);
 
 	      for (k = 0; k < mlen; k++)
 		{
@@ -1384,7 +1392,7 @@ ctf_xfer_partial (struct target_ops *ops
 	 and this address falls within a read-only section, fallback
 	 to reading from executable, up to LOW_ADDR_AVAILABLE  */
       if (offset < low_addr_available)
-	len = min (len, low_addr_available - offset);
+	len = std::min (len, low_addr_available - offset);
       res = exec_read_partial_read_only (readbuf, offset, len, xfered_len);
 
       if (res == TARGET_XFER_OK)
@@ -1679,7 +1687,7 @@ ctf_traceframe_info (struct target_ops *
 	  const struct bt_definition *def;
 
 	  def = bt_ctf_get_field (event, scope, "num");
-	  vnum = (int) bt_ctf_get_int64 (def);
+	  vnum = (int) bt_ctf_get_uint64 (def);
 	  VEC_safe_push (int, info->tvars, vnum);
 	}
       else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ctf.h ./gdb/ctf.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ctf.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ctf.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* CTF format support.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-typeprint.c ./gdb/c-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for printing C and C++ types for GDB, the GNU debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +30,6 @@
 #include "c-lang.h"
 #include "typeprint.h"
 #include "cp-abi.h"
-#include "jv-lang.h"
 #include "cp-support.h"
 
 static void c_type_print_varspec_prefix (struct type *,
@@ -50,7 +49,7 @@ static void c_type_print_modifier (struc
 static const char *
 find_typedef_for_canonicalize (struct type *t, void *data)
 {
-  return find_typedef_in_hash (data, t);
+  return find_typedef_in_hash ((const struct type_print_options *) data, t);
 }
 
 /* Print NAME on STREAM.  If the 'raw' field of FLAGS is not set,
@@ -61,15 +60,14 @@ print_name_maybe_canonical (const char *
 			    const struct type_print_options *flags,
 			    struct ui_file *stream)
 {
-  char *s = NULL;
+  std::string s;
 
   if (!flags->raw)
     s = cp_canonicalize_string_full (name,
 				     find_typedef_for_canonicalize,
 				     (void *) flags);
 
-  fputs_filtered (s ? s : name, stream);
-  xfree (s);
+  fputs_filtered (!s.empty () ? s.c_str () : name, stream);
 }
 
 
@@ -89,7 +87,7 @@ c_print_type (struct type *type,
   const char *local_name;
 
   if (show > 0)
-    CHECK_TYPEDEF (type);
+    type = check_typedef (type);
 
   local_name = find_typedef_in_hash (flags, type);
   if (local_name != NULL)
@@ -144,7 +142,7 @@ c_print_typedef (struct type *type,
 		 struct symbol *new_symbol,
 		 struct ui_file *stream)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   fprintf_filtered (stream, "typedef ");
   type_print (type, "", stream, 0);
   if (TYPE_NAME ((SYMBOL_TYPE (new_symbol))) == 0
@@ -371,6 +369,7 @@ c_type_print_varspec_prefix (struct type
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
     case TYPE_CODE_ENUM:
+    case TYPE_CODE_FLAGS:
     case TYPE_CODE_INT:
     case TYPE_CODE_FLT:
     case TYPE_CODE_VOID:
@@ -464,7 +463,7 @@ c_type_print_modifier (struct type *type
    parameter types get removed their possible const and volatile qualifiers to
    match demangled linkage name parameters part of such function type.
    LANGUAGE is the language in which TYPE was defined.  This is a necessary
-   evil since this code is used by the C, C++, and Java backends.  */
+   evil since this code is used by the C and C++.  */
 
 void
 c_type_print_args (struct type *type, struct ui_file *stream,
@@ -503,10 +502,7 @@ c_type_print_args (struct type *type, st
 	  param_type = make_cv_type (0, 0, param_type, NULL);
 	}
 
-      if (language == language_java)
-	java_print_type (param_type, "", stream, -1, 0, flags);
-      else
-	c_print_type (param_type, "", stream, -1, 0, flags);
+      c_print_type (param_type, "", stream, -1, 0, flags);
       printed_any = 1;
     }
 
@@ -523,8 +519,7 @@ c_type_print_args (struct type *type, st
 	}
     }
   else if (!printed_any
-	   && ((TYPE_PROTOTYPED (type) && language != language_java)
-	       || language == language_cplus))
+	   && (TYPE_PROTOTYPED (type) || language == language_cplus))
     fprintf_filtered (stream, "void");
 
   fprintf_filtered (stream, ")");
@@ -748,6 +743,7 @@ c_type_print_varspec_suffix (struct type
     case TYPE_CODE_UNDEF:
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
+    case TYPE_CODE_FLAGS:
     case TYPE_CODE_ENUM:
     case TYPE_CODE_INT:
     case TYPE_CODE_FLT:
@@ -876,7 +872,7 @@ c_type_print_base (struct type *type, st
       return;
     }
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -1305,27 +1301,27 @@ c_type_print_base (struct type *type, st
 	      if (TYPE_NFIELDS (type) != 0 || TYPE_NFN_FIELDS (type) != 0)
 		fprintf_filtered (stream, "\n");
 
-		for (i = 0; i < TYPE_TYPEDEF_FIELD_COUNT (type); i++)
-		  {
-		    struct type *target = TYPE_TYPEDEF_FIELD_TYPE (type, i);
+	      for (i = 0; i < TYPE_TYPEDEF_FIELD_COUNT (type); i++)
+		{
+		  struct type *target = TYPE_TYPEDEF_FIELD_TYPE (type, i);
 
-		    /* Dereference the typedef declaration itself.  */
-		    gdb_assert (TYPE_CODE (target) == TYPE_CODE_TYPEDEF);
-		    target = TYPE_TARGET_TYPE (target);
-
-		    print_spaces_filtered (level + 4, stream);
-		    fprintf_filtered (stream, "typedef ");
-
-		    /* We want to print typedefs with substitutions
-		       from the template parameters or globally-known
-		       typedefs but not local typedefs.  */
-		    c_print_type (target,
-				  TYPE_TYPEDEF_FIELD_NAME (type, i),
-				  stream, show - 1, level + 4,
-				  &semi_local_flags);
-		    fprintf_filtered (stream, ";\n");
-		  }
-	      }
+		  /* Dereference the typedef declaration itself.  */
+		  gdb_assert (TYPE_CODE (target) == TYPE_CODE_TYPEDEF);
+		  target = TYPE_TARGET_TYPE (target);
+
+		  print_spaces_filtered (level + 4, stream);
+		  fprintf_filtered (stream, "typedef ");
+
+		  /* We want to print typedefs with substitutions
+		     from the template parameters or globally-known
+		     typedefs but not local typedefs.  */
+		  c_print_type (target,
+				TYPE_TYPEDEF_FIELD_NAME (type, i),
+				stream, show - 1, level + 4,
+				&semi_local_flags);
+		  fprintf_filtered (stream, ";\n");
+		}
+	    }
 
 	    fprintfi_filtered (level, stream, "}");
 	  }
@@ -1402,6 +1398,55 @@ c_type_print_base (struct type *type, st
 	}
       break;
 
+    case TYPE_CODE_FLAGS:
+      {
+	struct type_print_options local_flags = *flags;
+
+	local_flags.local_typedefs = NULL;
+
+	c_type_print_modifier (type, stream, 0, 1);
+	fprintf_filtered (stream, "flag ");
+	print_name_maybe_canonical (TYPE_NAME (type), flags, stream);
+	if (show > 0)
+	  {
+	    fputs_filtered (" ", stream);
+	    fprintf_filtered (stream, "{\n");
+	    if (TYPE_NFIELDS (type) == 0)
+	      {
+		if (TYPE_STUB (type))
+		  fprintfi_filtered (level + 4, stream,
+				     _("<incomplete type>\n"));
+		else
+		  fprintfi_filtered (level + 4, stream,
+				     _("<no data fields>\n"));
+	      }
+	    len = TYPE_NFIELDS (type);
+	    for (i = 0; i < len; i++)
+	      {
+		QUIT;
+		print_spaces_filtered (level + 4, stream);
+		/* We pass "show" here and not "show - 1" to get enum types
+		   printed.  There's no other way to see them.  */
+		c_print_type (TYPE_FIELD_TYPE (type, i),
+			      TYPE_FIELD_NAME (type, i),
+			      stream, show, level + 4,
+			      &local_flags);
+		fprintf_filtered (stream, " @%s",
+				  plongest (TYPE_FIELD_BITPOS (type, i)));
+		if (TYPE_FIELD_BITSIZE (type, i) > 1)
+		  {
+		    fprintf_filtered (stream, "-%s",
+				      plongest (TYPE_FIELD_BITPOS (type, i)
+						+ TYPE_FIELD_BITSIZE (type, i)
+						- 1));
+		  }
+		fprintf_filtered (stream, ";\n");
+	      }
+	    fprintfi_filtered (level, stream, "}");
+	  }
+      }
+      break;
+
     case TYPE_CODE_VOID:
       fprintf_filtered (stream, "void");
       break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-valprint.c ./gdb/c-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing C values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -124,313 +124,421 @@ static const struct generic_val_print_de
   " * I",
   "true",
   "false",
-  "void"
+  "void",
+  "{",
+  "}"
 };
 
-/* See val_print for a description of the various parameters of this
-   function; they are identical.  */
+/* Print a pointer based on the type of its target.
 
-void
-c_val_print (struct type *type, const gdb_byte *valaddr,
-	     int embedded_offset, CORE_ADDR address,
-	     struct ui_file *stream, int recurse,
-	     const struct value *original_value,
-	     const struct value_print_options *options)
+   Arguments to this functions are roughly the same as those in c_val_print.
+   A difference is that ADDRESS is the address to print, with embedded_offset
+   already added.  UNRESOLVED_ELTTYPE and ELTTYPE represent the pointed type,
+   respectively before and after check_typedef.  */
+
+static void
+print_unpacked_pointer (struct type *type, struct type *elttype,
+			struct type *unresolved_elttype,
+			const gdb_byte *valaddr, int embedded_offset,
+			CORE_ADDR address, struct ui_file *stream, int recurse,
+			const struct value_print_options *options)
 {
+  int want_space = 0;
   struct gdbarch *gdbarch = get_type_arch (type);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  unsigned int i = 0;	/* Number of characters printed.  */
-  unsigned len;
-  struct type *elttype, *unresolved_elttype;
-  struct type *unresolved_type = type;
-  unsigned eltlen;
-  CORE_ADDR addr;
 
-  CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type))
+  if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
     {
-    case TYPE_CODE_ARRAY:
-      unresolved_elttype = TYPE_TARGET_TYPE (type);
-      elttype = check_typedef (unresolved_elttype);
-      if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0)
-	{
-          LONGEST low_bound, high_bound;
-
-          if (!get_array_bounds (type, &low_bound, &high_bound))
-            error (_("Could not determine the array high bound"));
-
-	  eltlen = TYPE_LENGTH (elttype);
-	  len = high_bound - low_bound + 1;
-	  if (options->prettyformat_arrays)
+      /* Try to print what function it points to.  */
+      print_function_pointer_address (options, gdbarch, address, stream);
+      return;
+    }
+
+  if (options->symbol_print)
+    want_space = print_address_demangle (options, gdbarch, address, stream,
+					 demangle);
+  else if (options->addressprint)
+    {
+      fputs_filtered (paddress (gdbarch, address), stream);
+      want_space = 1;
+    }
+
+  /* For a pointer to a textual type, also print the string
+     pointed to, unless pointer is null.  */
+
+  if (c_textual_element_type (unresolved_elttype, options->format)
+      && address != 0)
+    {
+      if (want_space)
+	fputs_filtered (" ", stream);
+      val_print_string (unresolved_elttype, NULL, address, -1, stream, options);
+    }
+  else if (cp_is_vtbl_member (type))
+    {
+      /* Print vtbl's nicely.  */
+      CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
+      struct bound_minimal_symbol msymbol =
+	lookup_minimal_symbol_by_pc (vt_address);
+
+      /* If 'symbol_print' is set, we did the work above.  */
+      if (!options->symbol_print
+	  && (msymbol.minsym != NULL)
+	  && (vt_address == BMSYMBOL_VALUE_ADDRESS (msymbol)))
+	{
+	  if (want_space)
+	    fputs_filtered (" ", stream);
+	  fputs_filtered (" <", stream);
+	  fputs_filtered (MSYMBOL_PRINT_NAME (msymbol.minsym), stream);
+	  fputs_filtered (">", stream);
+	  want_space = 1;
+	}
+
+      if (vt_address && options->vtblprint)
+	{
+	  struct value *vt_val;
+	  struct symbol *wsym = NULL;
+	  struct type *wtype;
+	  struct block *block = NULL;
+	  struct field_of_this_result is_this_fld;
+
+	  if (want_space)
+	    fputs_filtered (" ", stream);
+
+	  if (msymbol.minsym != NULL)
+	    wsym = lookup_symbol (MSYMBOL_LINKAGE_NAME(msymbol.minsym), block,
+				  VAR_DOMAIN, &is_this_fld).symbol;
+
+	  if (wsym)
+	    {
+	      wtype = SYMBOL_TYPE (wsym);
+	    }
+	  else
 	    {
+	      wtype = unresolved_elttype;
+	    }
+	  vt_val = value_at (wtype, vt_address);
+	  common_val_print (vt_val, stream, recurse + 1, options,
+			    current_language);
+	  if (options->prettyformat)
+	    {
+	      fprintf_filtered (stream, "\n");
 	      print_spaces_filtered (2 + 2 * recurse, stream);
 	    }
+	}
+    }
+}
 
-	  /* Print arrays of textual chars with a string syntax, as
-	     long as the entire array is valid.  */
-          if (c_textual_element_type (unresolved_elttype,
-				      options->format)
-	      && value_bytes_available (original_value, embedded_offset,
-					TYPE_LENGTH (type))
-	      && !value_bits_any_optimized_out (original_value,
-						TARGET_CHAR_BIT * embedded_offset,
-						TARGET_CHAR_BIT * TYPE_LENGTH (type)))
-	    {
-	      int force_ellipses = 0;
+/* c_val_print helper for TYPE_CODE_ARRAY.  */
 
-	      /* If requested, look for the first null char and only
-	         print elements up to it.  */
-	      if (options->stop_print_at_null)
-		{
-		  unsigned int temp_len;
+static void
+c_val_print_array (struct type *type, const gdb_byte *valaddr,
+		   int embedded_offset, CORE_ADDR address,
+		   struct ui_file *stream, int recurse,
+		   struct value *original_value,
+		   const struct value_print_options *options)
+{
+  struct type *unresolved_elttype = TYPE_TARGET_TYPE (type);
+  struct type *elttype = check_typedef (unresolved_elttype);
+  struct gdbarch *arch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
 
-		  for (temp_len = 0;
-		       (temp_len < len
-			&& temp_len < options->print_max
-			&& extract_unsigned_integer (valaddr + embedded_offset
-						     + temp_len * eltlen,
-						     eltlen, byte_order) != 0);
-		       ++temp_len)
-		    ;
-
-		  /* Force LA_PRINT_STRING to print ellipses if
-		     we've printed the maximum characters and
-		     the next character is not \000.  */
-		  if (temp_len == options->print_max && temp_len < len)
-		    {
-		      ULONGEST val
-			= extract_unsigned_integer (valaddr + embedded_offset
-						    + temp_len * eltlen,
-						    eltlen, byte_order);
-		      if (val != 0)
-			force_ellipses = 1;
-		    }
+  if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0)
+    {
+      LONGEST low_bound, high_bound;
+      int eltlen, len;
+      struct gdbarch *gdbarch = get_type_arch (type);
+      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+      unsigned int i = 0;	/* Number of characters printed.  */
+
+      if (!get_array_bounds (type, &low_bound, &high_bound))
+	error (_("Could not determine the array high bound"));
+
+      eltlen = TYPE_LENGTH (elttype);
+      len = high_bound - low_bound + 1;
+      if (options->prettyformat_arrays)
+	{
+	  print_spaces_filtered (2 + 2 * recurse, stream);
+	}
+
+      /* Print arrays of textual chars with a string syntax, as
+	 long as the entire array is valid.  */
+      if (c_textual_element_type (unresolved_elttype,
+				  options->format)
+	  && value_bytes_available (original_value, embedded_offset,
+				    TYPE_LENGTH (type))
+	  && !value_bits_any_optimized_out (original_value,
+					    TARGET_CHAR_BIT * embedded_offset,
+					    TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+	{
+	  int force_ellipses = 0;
+
+	  /* If requested, look for the first null char and only
+	     print elements up to it.  */
+	  if (options->stop_print_at_null)
+	    {
+	      unsigned int temp_len;
 
-		  len = temp_len;
+	      for (temp_len = 0;
+		   (temp_len < len
+		    && temp_len < options->print_max
+		    && extract_unsigned_integer (valaddr
+						 + embedded_offset * unit_size
+						 + temp_len * eltlen,
+						 eltlen, byte_order) != 0);
+		   ++temp_len)
+		;
+
+	      /* Force LA_PRINT_STRING to print ellipses if
+		 we've printed the maximum characters and
+		 the next character is not \000.  */
+	      if (temp_len == options->print_max && temp_len < len)
+		{
+		  ULONGEST val
+		    = extract_unsigned_integer (valaddr
+						+ embedded_offset * unit_size
+						+ temp_len * eltlen,
+						eltlen, byte_order);
+		  if (val != 0)
+		    force_ellipses = 1;
 		}
 
-	      LA_PRINT_STRING (stream, unresolved_elttype,
-			       valaddr + embedded_offset, len,
-			       NULL, force_ellipses, options);
-	      i = len;
+	      len = temp_len;
+	    }
+
+	  LA_PRINT_STRING (stream, unresolved_elttype,
+			   valaddr + embedded_offset * unit_size, len,
+			   NULL, force_ellipses, options);
+	  i = len;
+	}
+      else
+	{
+	  fprintf_filtered (stream, "{");
+	  /* If this is a virtual function table, print the 0th
+	     entry specially, and the rest of the members
+	     normally.  */
+	  if (cp_is_vtbl_ptr_type (elttype))
+	    {
+	      i = 1;
+	      fprintf_filtered (stream, _("%d vtable entries"),
+				len - 1);
 	    }
 	  else
 	    {
-	      fprintf_filtered (stream, "{");
-	      /* If this is a virtual function table, print the 0th
-	         entry specially, and the rest of the members
-	         normally.  */
-	      if (cp_is_vtbl_ptr_type (elttype))
-		{
-		  i = 1;
-		  fprintf_filtered (stream, _("%d vtable entries"),
-				    len - 1);
-		}
-	      else
-		{
-		  i = 0;
-		}
-	      val_print_array_elements (type, valaddr, embedded_offset,
-					address, stream,
-					recurse, original_value, options, i);
-	      fprintf_filtered (stream, "}");
+	      i = 0;
 	    }
-	  break;
+	  val_print_array_elements (type, embedded_offset,
+				    address, stream,
+				    recurse, original_value, options, i);
+	  fprintf_filtered (stream, "}");
 	}
-      /* Array of unspecified length: treat like pointer to first
-	 elt.  */
-      addr = address + embedded_offset;
-      goto print_unpacked_pointer;
+    }
+  else
+    {
+      /* Array of unspecified length: treat like pointer to first elt.  */
+      print_unpacked_pointer (type, elttype, unresolved_elttype, valaddr,
+			      embedded_offset, address + embedded_offset,
+			      stream, recurse, options);
+    }
+}
 
-    case TYPE_CODE_METHODPTR:
-      cplus_print_method_ptr (valaddr + embedded_offset, type, stream);
-      break;
+/* c_val_print helper for TYPE_CODE_PTR.  */
 
-    case TYPE_CODE_PTR:
-      if (options->format && options->format != 's')
-	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, options, 0, stream);
-	  break;
-	}
-      if (options->vtblprint && cp_is_vtbl_ptr_type (type))
-	{
-	  /* Print the unmangled name if desired.  */
-	  /* Print vtable entry - we only get here if we ARE using
-	     -fvtable_thunks.  (Otherwise, look under
-	     TYPE_CODE_STRUCT.)  */
-	  CORE_ADDR addr
-	    = extract_typed_address (valaddr + embedded_offset, type);
+static void
+c_val_print_ptr (struct type *type, const gdb_byte *valaddr,
+		 int embedded_offset, struct ui_file *stream, int recurse,
+		 struct value *original_value,
+		 const struct value_print_options *options)
+{
+  struct gdbarch *arch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
 
-	  print_function_pointer_address (options, gdbarch, addr, stream);
-	  break;
-	}
-      unresolved_elttype = TYPE_TARGET_TYPE (type);
-      elttype = check_typedef (unresolved_elttype);
-	{
-	  int want_space;
+  if (options->format && options->format != 's')
+    {
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, options, 0, stream);
+    }
+  else if (options->vtblprint && cp_is_vtbl_ptr_type (type))
+    {
+      /* Print the unmangled name if desired.  */
+      /* Print vtable entry - we only get here if we ARE using
+	 -fvtable_thunks.  (Otherwise, look under
+	 TYPE_CODE_STRUCT.)  */
+      CORE_ADDR addr
+	= extract_typed_address (valaddr + embedded_offset, type);
+      struct gdbarch *gdbarch = get_type_arch (type);
 
-	  addr = unpack_pointer (type, valaddr + embedded_offset);
-	print_unpacked_pointer:
+      print_function_pointer_address (options, gdbarch, addr, stream);
+    }
+  else
+    {
+      struct type *unresolved_elttype = TYPE_TARGET_TYPE (type);
+      struct type *elttype = check_typedef (unresolved_elttype);
+      CORE_ADDR addr = unpack_pointer (type,
+				       valaddr + embedded_offset * unit_size);
 
-	  want_space = 0;
+      print_unpacked_pointer (type, elttype, unresolved_elttype, valaddr,
+			      embedded_offset, addr, stream, recurse, options);
+    }
+}
 
-	  if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
-	    {
-	      /* Try to print what function it points to.  */
-	      print_function_pointer_address (options, gdbarch, addr, stream);
-	      return;
-	    }
+/* c_val_print helper for TYPE_CODE_STRUCT.  */
 
-	  if (options->symbol_print)
-	    want_space = print_address_demangle (options, gdbarch, addr,
-						 stream, demangle);
-	  else if (options->addressprint)
-	    {
-	      fputs_filtered (paddress (gdbarch, addr), stream);
-	      want_space = 1;
-	    }
+static void
+c_val_print_struct (struct type *type, const gdb_byte *valaddr,
+		    int embedded_offset, CORE_ADDR address,
+		    struct ui_file *stream, int recurse,
+		    struct value *original_value,
+		    const struct value_print_options *options)
+{
+  if (options->vtblprint && cp_is_vtbl_ptr_type (type))
+    {
+      /* Print the unmangled name if desired.  */
+      /* Print vtable entry - we only get here if NOT using
+	 -fvtable_thunks.  (Otherwise, look under
+	 TYPE_CODE_PTR.)  */
+      struct gdbarch *gdbarch = get_type_arch (type);
+      int offset = (embedded_offset
+		    + TYPE_FIELD_BITPOS (type,
+					 VTBL_FNADDR_OFFSET) / 8);
+      struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET);
+      CORE_ADDR addr = extract_typed_address (valaddr + offset, field_type);
 
-	  /* For a pointer to a textual type, also print the string
-	     pointed to, unless pointer is null.  */
+      print_function_pointer_address (options, gdbarch, addr, stream);
+    }
+  else
+    cp_print_value_fields_rtti (type, valaddr,
+				embedded_offset, address,
+				stream, recurse,
+				original_value, options,
+				NULL, 0);
+}
 
-	  if (c_textual_element_type (unresolved_elttype,
-				      options->format)
-	      && addr != 0)
-	    {
-	      if (want_space)
-		fputs_filtered (" ", stream);
-	      i = val_print_string (unresolved_elttype, NULL,
-				    addr, -1,
-				    stream, options);
-	    }
-	  else if (cp_is_vtbl_member (type))
-	    {
-	      /* Print vtbl's nicely.  */
-	      CORE_ADDR vt_address = unpack_pointer (type,
-						     valaddr
-						     + embedded_offset);
-	      struct bound_minimal_symbol msymbol =
-		lookup_minimal_symbol_by_pc (vt_address);
-
-	      /* If 'symbol_print' is set, we did the work above.  */
-	      if (!options->symbol_print
-		  && (msymbol.minsym != NULL)
-		  && (vt_address == BMSYMBOL_VALUE_ADDRESS (msymbol)))
-		{
-		  if (want_space)
-		    fputs_filtered (" ", stream);
-		  fputs_filtered (" <", stream);
-		  fputs_filtered (MSYMBOL_PRINT_NAME (msymbol.minsym), stream);
-		  fputs_filtered (">", stream);
-		  want_space = 1;
-		}
+/* c_val_print helper for TYPE_CODE_UNION.  */
 
-	      if (vt_address && options->vtblprint)
-		{
-		  struct value *vt_val;
-		  struct symbol *wsym = (struct symbol *) NULL;
-		  struct type *wtype;
-		  struct block *block = (struct block *) NULL;
-		  struct field_of_this_result is_this_fld;
-
-		  if (want_space)
-		    fputs_filtered (" ", stream);
-
-		  if (msymbol.minsym != NULL)
-		    wsym = lookup_symbol (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
-					  block, VAR_DOMAIN,
-					  &is_this_fld);
-
-		  if (wsym)
-		    {
-		      wtype = SYMBOL_TYPE (wsym);
-		    }
-		  else
-		    {
-		      wtype = unresolved_elttype;
-		    }
-		  vt_val = value_at (wtype, vt_address);
-		  common_val_print (vt_val, stream, recurse + 1,
-				    options, current_language);
-		  if (options->prettyformat)
-		    {
-		      fprintf_filtered (stream, "\n");
-		      print_spaces_filtered (2 + 2 * recurse, stream);
-		    }
-		}
-	    }
-	  return;
+static void
+c_val_print_union (struct type *type, const gdb_byte *valaddr,
+		   int embedded_offset, CORE_ADDR address,
+		   struct ui_file *stream, int recurse,
+		   struct value *original_value,
+		   const struct value_print_options *options)
+{
+  if (recurse && !options->unionprint)
+    {
+      fprintf_filtered (stream, "{...}");
+     }
+  else
+    {
+      c_val_print_struct (type, valaddr, embedded_offset, address, stream,
+			  recurse, original_value, options);
+    }
+}
+
+/* c_val_print helper for TYPE_CODE_INT.  */
+
+static void
+c_val_print_int (struct type *type, struct type *unresolved_type,
+		 const gdb_byte *valaddr, int embedded_offset,
+		 struct ui_file *stream, struct value *original_value,
+		 const struct value_print_options *options)
+{
+  struct gdbarch *arch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+
+  if (options->format || options->output_format)
+    {
+      struct value_print_options opts = *options;
+
+      opts.format = (options->format ? options->format
+		     : options->output_format);
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, &opts, 0, stream);
+    }
+  else
+    {
+      val_print_type_code_int (type, valaddr + embedded_offset * unit_size,
+			       stream);
+      /* C and C++ has no single byte int type, char is used
+	 instead.  Since we don't know whether the value is really
+	 intended to be used as an integer or a character, print
+	 the character equivalent as well.  */
+      if (c_textual_element_type (unresolved_type, options->format))
+	{
+	  fputs_filtered (" ", stream);
+	  LA_PRINT_CHAR (unpack_long (type,
+				      valaddr + embedded_offset * unit_size),
+			 unresolved_type, stream);
 	}
+    }
+}
+
+/* c_val_print helper for TYPE_CODE_MEMBERPTR.  */
+
+static void
+c_val_print_memberptr (struct type *type, const gdb_byte *valaddr,
+		       int embedded_offset, CORE_ADDR address,
+		       struct ui_file *stream, int recurse,
+		       struct value *original_value,
+		       const struct value_print_options *options)
+{
+  if (!options->format)
+    {
+      cp_print_class_member (valaddr + embedded_offset, type, stream, "&");
+    }
+  else
+    {
+      generic_val_print (type, embedded_offset, address, stream,
+			 recurse, original_value, options, &c_decorations);
+    }
+}
+
+/* See val_print for a description of the various parameters of this
+   function; they are identical.  */
+
+void
+c_val_print (struct type *type,
+	     int embedded_offset, CORE_ADDR address,
+	     struct ui_file *stream, int recurse,
+	     struct value *original_value,
+	     const struct value_print_options *options)
+{
+  struct type *unresolved_type = type;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+  type = check_typedef (type);
+  switch (TYPE_CODE (type))
+    {
+    case TYPE_CODE_ARRAY:
+      c_val_print_array (type, valaddr, embedded_offset, address, stream,
+			 recurse, original_value, options);
+      break;
+
+    case TYPE_CODE_METHODPTR:
+      cplus_print_method_ptr (valaddr + embedded_offset, type, stream);
+      break;
+
+    case TYPE_CODE_PTR:
+      c_val_print_ptr (type, valaddr, embedded_offset, stream, recurse,
+		       original_value, options);
       break;
 
     case TYPE_CODE_UNION:
-      if (recurse && !options->unionprint)
-	{
-	  fprintf_filtered (stream, "{...}");
-	  break;
-	}
-      /* Fall through.  */
-    case TYPE_CODE_STRUCT:
-      /*FIXME: Abstract this away.  */
-      if (options->vtblprint && cp_is_vtbl_ptr_type (type))
-	{
-	  /* Print the unmangled name if desired.  */
-	  /* Print vtable entry - we only get here if NOT using
-	     -fvtable_thunks.  (Otherwise, look under
-	     TYPE_CODE_PTR.)  */
-	  int offset = (embedded_offset
-			+ TYPE_FIELD_BITPOS (type,
-					     VTBL_FNADDR_OFFSET) / 8);
-	  struct type *field_type = TYPE_FIELD_TYPE (type,
-						     VTBL_FNADDR_OFFSET);
-	  CORE_ADDR addr
-	    = extract_typed_address (valaddr + offset, field_type);
+      c_val_print_union (type, valaddr, embedded_offset, address, stream,
+			 recurse, original_value, options);
+      break;
 
-	  print_function_pointer_address (options, gdbarch, addr, stream);
-	}
-      else
-	cp_print_value_fields_rtti (type, valaddr,
-				    embedded_offset, address,
-				    stream, recurse,
-				    original_value, options,
-				    NULL, 0);
+    case TYPE_CODE_STRUCT:
+      c_val_print_struct (type, valaddr, embedded_offset, address, stream,
+			  recurse, original_value, options);
       break;
 
     case TYPE_CODE_INT:
-      if (options->format || options->output_format)
-	{
-	  struct value_print_options opts = *options;
-
-	  opts.format = (options->format ? options->format
-			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, &opts, 0, stream);
-	}
-      else
-	{
-	  val_print_type_code_int (type, valaddr + embedded_offset,
-				   stream);
-	  /* C and C++ has no single byte int type, char is used
-	     instead.  Since we don't know whether the value is really
-	     intended to be used as an integer or a character, print
-	     the character equivalent as well.  */
-	  if (c_textual_element_type (unresolved_type, options->format))
-	    {
-	      fputs_filtered (" ", stream);
-	      LA_PRINT_CHAR (unpack_long (type, valaddr + embedded_offset),
-			     unresolved_type, stream);
-	    }
-	}
+      c_val_print_int (type, unresolved_type, valaddr, embedded_offset, stream,
+		       original_value, options);
       break;
 
     case TYPE_CODE_MEMBERPTR:
-      if (!options->format)
-	{
-	  cp_print_class_member (valaddr + embedded_offset, type, stream, "&");
-	  break;
-	}
-      /* FALLTHROUGH */
+      c_val_print_memberptr (type, valaddr, embedded_offset, address, stream,
+			     recurse, original_value, options);
+      break;
 
     case TYPE_CODE_REF:
     case TYPE_CODE_ENUM:
@@ -447,7 +555,7 @@ c_val_print (struct type *type, const gd
     case TYPE_CODE_COMPLEX:
     case TYPE_CODE_CHAR:
     default:
-      generic_val_print (type, valaddr, embedded_offset, address,
+      generic_val_print (type, embedded_offset, address,
 			 stream, recurse, original_value, options,
 			 &c_decorations);
       break;
@@ -460,7 +568,8 @@ c_value_print (struct value *val, struct
 	       const struct value_print_options *options)
 {
   struct type *type, *real_type, *val_type;
-  int full, top, using_enc;
+  int full, using_enc;
+  LONGEST top;
   struct value_print_options opts = *options;
 
   opts.deref_ref = 1;
@@ -506,7 +615,7 @@ c_value_print (struct value *val, struct
 	  fprintf_filtered (stream, "(");
 
 	  if (value_entirely_available (val))
- 	    {
+	    {
 	      real_type = value_rtti_indirect_type (val, &full, &top,
 						    &using_enc);
 	      if (real_type)
@@ -518,18 +627,19 @@ c_value_print (struct value *val, struct
 		  val = value_from_pointer (real_type,
 					    value_as_address (val) - top);
 
-		  if (is_ref)
-		    {
-		      val = value_ref (value_ind (val));
-		      type = value_type (val);
-		    }
-
 		  /* Note: When we look up RTTI entries, we don't get
 		     any information on const or volatile
 		     attributes.  */
 		}
 	    }
-          type_print (type, "", stream, -1);
+
+	  if (is_ref)
+	    {
+	      val = value_ref (value_ind (val));
+	      type = value_type (val);
+	    }
+
+	  type_print (type, "", stream, -1);
 	  fprintf_filtered (stream, ") ");
 	  val_type = type;
 	}
@@ -560,7 +670,7 @@ c_value_print (struct value *val, struct
 	  /* Print out object: enclosing type is same as real_type if
 	     full.  */
 	  val_print (value_enclosing_type (val),
-		     value_contents_for_printing (val), 0,
+		     0,
 		     value_address (val), stream, 0,
 		     val, &opts, current_language);
 	  return;
@@ -573,7 +683,7 @@ c_value_print (struct value *val, struct
 	  fprintf_filtered (stream, "(%s ?) ",
 			    TYPE_NAME (value_enclosing_type (val)));
 	  val_print (value_enclosing_type (val),
-		     value_contents_for_printing (val), 0,
+		     0,
 		     value_address (val), stream, 0,
 		     val, &opts, current_language);
 	  return;
@@ -581,7 +691,7 @@ c_value_print (struct value *val, struct
       /* Otherwise, we end up at the return outside this "if".  */
     }
 
-  val_print (val_type, value_contents_for_printing (val),
+  val_print (val_type,
 	     value_embedded_offset (val),
 	     value_address (val),
 	     stream, 0,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-varobj.c ./gdb/c-varobj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/c-varobj.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/c-varobj.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* varobj support for C and C++.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -37,8 +37,8 @@ static void cplus_class_num_children (st
 int
 varobj_is_anonymous_child (const struct varobj *child)
 {
-  return (strcmp (child->name, ANONYMOUS_STRUCT_NAME) == 0
-	  || strcmp (child->name, ANONYMOUS_UNION_NAME) == 0);
+  return (child->name == ANONYMOUS_STRUCT_NAME
+	  || child->name == ANONYMOUS_UNION_NAME);
 }
 
 /* Given the value and the type of a variable object,
@@ -231,10 +231,10 @@ c_number_of_children (const struct varob
   return children;
 }
 
-static char *
+static std::string
 c_name_of_variable (const struct varobj *parent)
 {
-  return xstrdup (parent->name);
+  return parent->name;
 }
 
 /* Return the value of element TYPE_INDEX of a structure
@@ -279,40 +279,39 @@ value_struct_element_index (struct value
 
    If any of CNAME, CVALUE, or CTYPE is not null, but the corresponding
    information cannot be determined, set *CNAME, *CVALUE, or *CTYPE
-   to NULL.  */
+   to empty.  */
 
 static void 
 c_describe_child (const struct varobj *parent, int index,
-		  char **cname, struct value **cvalue, struct type **ctype,
-		  char **cfull_expression)
+		  std::string *cname, struct value **cvalue,
+		  struct type **ctype, std::string *cfull_expression)
 {
   struct value *value = parent->value;
   struct type *type = varobj_get_value_type (parent);
-  char *parent_expression = NULL;
+  std::string parent_expression;
   int was_ptr;
 
   if (cname)
-    *cname = NULL;
+    *cname = std::string ();
   if (cvalue)
     *cvalue = NULL;
   if (ctype)
     *ctype = NULL;
   if (cfull_expression)
     {
-      *cfull_expression = NULL;
+      *cfull_expression = std::string ();
       parent_expression
 	= varobj_get_path_expr (varobj_get_path_expr_parent (parent));
     }
   adjust_value_for_child_access (&value, &type, &was_ptr, 0);
-      
+
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_ARRAY:
       if (cname)
-	*cname
-	  = xstrdup (int_string (index 
-				 + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
-				 10, 1, 0, 0));
+	*cname = int_string (index
+			     + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
+			     10, 1, 0, 0);
 
       if (cvalue && value)
 	{
@@ -333,10 +332,10 @@ c_describe_child (const struct varobj *p
 
       if (cfull_expression)
 	*cfull_expression = 
-	  xstrprintf ("(%s)[%s]", parent_expression, 
-		      int_string (index
-				  + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
-				  10, 1, 0, 0));
+	  string_printf ("(%s)[%s]", parent_expression.c_str (),
+			 int_string (index
+				     + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
+				     10, 1, 0, 0));
 
 
       break;
@@ -355,25 +354,26 @@ c_describe_child (const struct varobj *p
 	      {
 		if (TYPE_CODE (TYPE_FIELD_TYPE (type, index))
 		    == TYPE_CODE_STRUCT)
-		  *cname = xstrdup (ANONYMOUS_STRUCT_NAME);
+		  *cname = ANONYMOUS_STRUCT_NAME;
 		else
-		  *cname = xstrdup (ANONYMOUS_UNION_NAME);
+		  *cname = ANONYMOUS_UNION_NAME;
 	      }
 
 	    if (cfull_expression)
-	      *cfull_expression = xstrdup ("");
+	      *cfull_expression = "";
 	  }
 	else
 	  {
 	    if (cname)
-	      *cname = xstrdup (field_name);
+	      *cname = field_name;
 
 	    if (cfull_expression)
 	      {
-		char *join = was_ptr ? "->" : ".";
+		const char *join = was_ptr ? "->" : ".";
 
-		*cfull_expression = xstrprintf ("(%s)%s%s", parent_expression,
-						join, field_name);
+		*cfull_expression = string_printf ("(%s)%s%s",
+						   parent_expression.c_str (),
+						   join, field_name);
 	      }
 	  }
 
@@ -390,7 +390,7 @@ c_describe_child (const struct varobj *p
 
     case TYPE_CODE_PTR:
       if (cname)
-	*cname = xstrprintf ("*%s", parent->name);
+	*cname = string_printf ("*%s", parent->name.c_str ());
 
       if (cvalue && value)
 	{
@@ -413,33 +413,32 @@ c_describe_child (const struct varobj *p
 	*ctype = TYPE_TARGET_TYPE (type);
 
       if (cfull_expression)
-	*cfull_expression = xstrprintf ("*(%s)", parent_expression);
-      
+	*cfull_expression = string_printf ("*(%s)", parent_expression.c_str ());
       break;
 
     default:
       /* This should not happen.  */
       if (cname)
-	*cname = xstrdup ("???");
+	*cname = "???";
       if (cfull_expression)
-	*cfull_expression = xstrdup ("???");
+	*cfull_expression = "???";
       /* Don't set value and type, we don't know then.  */
     }
 }
 
-static char *
+static std::string
 c_name_of_child (const struct varobj *parent, int index)
 {
-  char *name;
+  std::string name;
 
   c_describe_child (parent, index, &name, NULL, NULL, NULL);
   return name;
 }
 
-static char *
+static std::string
 c_path_expr_of_child (const struct varobj *child)
 {
-  char *path_expr;
+  std::string path_expr;
 
   c_describe_child (child->parent, child->index, NULL, NULL, NULL, 
 		    &path_expr);
@@ -479,7 +478,7 @@ get_type (const struct varobj *var)
   return type;
 }
 
-static char *
+static std::string
 c_value_of_variable (const struct varobj *var,
 		     enum varobj_display_formats format)
 {
@@ -496,16 +495,11 @@ c_value_of_variable (const struct varobj
     {
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
-      return xstrdup ("{...}");
+      return "{...}";
       /* break; */
 
     case TYPE_CODE_ARRAY:
-      {
-	char *number;
-
-	number = xstrprintf ("[%d]", var->num_children);
-	return (number);
-      }
+      return string_printf ("[%d]", var->num_children);
       /* break; */
 
     default:
@@ -515,7 +509,7 @@ c_value_of_variable (const struct varobj
 	    /* This can happen if we attempt to get the value of a struct
 	       member when the parent is an invalid pointer.  This is an
 	       error condition, so we should tell the caller.  */
-	    return NULL;
+	    return std::string ();
 	  }
 	else
 	  {
@@ -523,7 +517,7 @@ c_value_of_variable (const struct varobj
 	      /* Frozen variable and no value yet.  We don't
 		 implicitly fetch the value.  MI response will
 		 use empty string for the value, which is OK.  */
-	      return NULL;
+	      return std::string ();
 
 	    gdb_assert (varobj_value_is_changeable_p (var));
 	    gdb_assert (!value_lazy (var->value));
@@ -531,7 +525,7 @@ c_value_of_variable (const struct varobj
 	    /* If the specified format is the current one,
 	       we can reuse print_value.  */
 	    if (format == var->format)
-	      return xstrdup (var->print_value);
+	      return var->print_value;
 	    else
 	      return varobj_value_get_print_value (var->value, format, var);
 	  }
@@ -556,7 +550,7 @@ const struct lang_varobj_ops c_varobj_op
    c_is_path_expr_parent  /* is_path_expr_parent */
 };
 
-/* A little convenience enum for dealing with C++/Java.  */
+/* A little convenience enum for dealing with C++.  */
 enum vsections
 {
   v_public = 0, v_private, v_protected
@@ -629,9 +623,9 @@ cplus_number_of_children (const struct v
       adjust_value_for_child_access (&value, &type, NULL, lookup_actual_type);
 
       cplus_class_num_children (type, kids);
-      if (strcmp (var->name, "public") == 0)
+      if (var->name == "public")
 	children = kids[v_public];
-      else if (strcmp (var->name, "private") == 0)
+      else if (var->name == "private")
 	children = kids[v_private];
       else
 	children = kids[v_protected];
@@ -677,7 +671,7 @@ cplus_class_num_children (struct type *t
     }
 }
 
-static char *
+static std::string
 cplus_name_of_variable (const struct varobj *parent)
 {
   return c_name_of_variable (parent);
@@ -704,25 +698,25 @@ match_accessibility (struct type *type, 
 
 static void
 cplus_describe_child (const struct varobj *parent, int index,
-		      char **cname, struct value **cvalue, struct type **ctype,
-		      char **cfull_expression)
+		      std::string *cname, struct value **cvalue, struct type **ctype,
+		      std::string *cfull_expression)
 {
   struct value *value;
   struct type *type;
   int was_ptr;
   int lookup_actual_type = 0;
-  char *parent_expression = NULL;
+  const char *parent_expression = NULL;
   const struct varobj *var;
   struct value_print_options opts;
 
   if (cname)
-    *cname = NULL;
+    *cname = std::string ();
   if (cvalue)
     *cvalue = NULL;
   if (ctype)
     *ctype = NULL;
   if (cfull_expression)
-    *cfull_expression = NULL;
+    *cfull_expression = std::string ();
 
   get_user_print_options (&opts);
 
@@ -741,7 +735,7 @@ cplus_describe_child (const struct varob
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT
       || TYPE_CODE (type) == TYPE_CODE_UNION)
     {
-      char *join = was_ptr ? "->" : ".";
+      const char *join = was_ptr ? "->" : ".";
 
       if (CPLUS_FAKE_CHILD (parent))
 	{
@@ -758,9 +752,9 @@ cplus_describe_child (const struct varob
 	  const char *field_name;
 
 	  vptr_fieldno = get_vptr_fieldno (type, &basetype);
-	  if (strcmp (parent->name, "private") == 0)
+	  if (parent->name == "private")
 	    acc = private_field;
-	  else if (strcmp (parent->name, "protected") == 0)
+	  else if (parent->name == "protected")
 	    acc = protected_field;
 
 	  while (index >= 0)
@@ -783,24 +777,24 @@ cplus_describe_child (const struct varob
 		{
 		  if (TYPE_CODE (TYPE_FIELD_TYPE (type, type_index))
 		      == TYPE_CODE_STRUCT)
-		    *cname = xstrdup (ANONYMOUS_STRUCT_NAME);
+		    *cname = ANONYMOUS_STRUCT_NAME;
 		  else if (TYPE_CODE (TYPE_FIELD_TYPE (type, type_index))
 			   == TYPE_CODE_UNION)
-		    *cname = xstrdup (ANONYMOUS_UNION_NAME);
+		    *cname = ANONYMOUS_UNION_NAME;
 		}
 
 	      if (cfull_expression)
-		*cfull_expression = xstrdup ("");
+		*cfull_expression = std::string ();
 	    }
 	  else
 	    {
 	      if (cname)
-		*cname = xstrdup (TYPE_FIELD_NAME (type, type_index));
+		*cname = TYPE_FIELD_NAME (type, type_index);
 
 	      if (cfull_expression)
 		*cfull_expression
-		  = xstrprintf ("((%s)%s%s)", parent_expression, join,
-				field_name);
+		  = string_printf ("((%s)%s%s)", parent_expression, join,
+				   field_name);
 	    }
 
 	  if (cvalue && value)
@@ -813,7 +807,7 @@ cplus_describe_child (const struct varob
 	{
 	  /* This is a baseclass.  */
 	  if (cname)
-	    *cname = xstrdup (TYPE_FIELD_NAME (type, index));
+	    *cname = TYPE_FIELD_NAME (type, index);
 
 	  if (cvalue && value)
 	    *cvalue = value_cast (TYPE_FIELD_TYPE (type, index), value);
@@ -825,7 +819,7 @@ cplus_describe_child (const struct varob
 
 	  if (cfull_expression)
 	    {
-	      char *ptr = was_ptr ? "*" : "";
+	      const char *ptr = was_ptr ? "*" : "";
 
 	      /* Cast the parent to the base' type.  Note that in gdb,
 		 expression like 
@@ -840,11 +834,11 @@ cplus_describe_child (const struct varob
 		 as a constructor, if it exists.  Therefore, we must
 		 indicate that the name is a class name by using the
 		 'class' keyword.  See PR mi/11912  */
-	      *cfull_expression = xstrprintf ("(%s(class %s%s) %s)", 
-					      ptr, 
-					      TYPE_FIELD_NAME (type, index),
-					      ptr,
-					      parent_expression);
+	      *cfull_expression = string_printf ("(%s(class %s%s) %s)",
+						 ptr,
+						 TYPE_FIELD_NAME (type, index),
+						 ptr,
+						 parent_expression);
 	    }
 	}
       else
@@ -892,7 +886,7 @@ cplus_describe_child (const struct varob
 
 	  gdb_assert (access);
 	  if (cname)
-	    *cname = xstrdup (access);
+	    *cname = access;
 
 	  /* Value and type and full expression are null here.  */
 	}
@@ -903,19 +897,19 @@ cplus_describe_child (const struct varob
     }  
 }
 
-static char *
+static std::string
 cplus_name_of_child (const struct varobj *parent, int index)
 {
-  char *name = NULL;
+  std::string name;
 
   cplus_describe_child (parent, index, &name, NULL, NULL, NULL);
   return name;
 }
 
-static char *
+static std::string
 cplus_path_expr_of_child (const struct varobj *child)
 {
-  char *path_expr;
+  std::string path_expr;
 
   cplus_describe_child (child->parent, child->index, NULL, NULL, NULL, 
 			&path_expr);
@@ -940,7 +934,7 @@ cplus_type_of_child (const struct varobj
   return type;
 }
 
-static char *
+static std::string
 cplus_value_of_variable (const struct varobj *var,
 			 enum varobj_display_formats format)
 {
@@ -948,7 +942,7 @@ cplus_value_of_variable (const struct va
   /* If we have one of our special types, don't print out
      any value.  */
   if (CPLUS_FAKE_CHILD (var))
-    return xstrdup ("");
+    return std::string ();
 
   return c_value_of_variable (var, format);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat.c ./gdb/darwin-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/darwin-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    Contributed by AdaCore.
 
@@ -83,7 +83,7 @@
 #define PTRACE(CMD, PID, ADDR, SIG) \
  darwin_ptrace(#CMD, CMD, (PID), (ADDR), (SIG))
 
-static void darwin_stop (struct target_ops *self, ptid_t);
+static void darwin_interrupt (struct target_ops *self, ptid_t);
 
 static void darwin_resume_to (struct target_ops *ops, ptid_t ptid, int step,
                               enum gdb_signal signal);
@@ -114,6 +114,11 @@ static int darwin_thread_alive (struct t
 static void darwin_encode_reply (mig_reply_error_t *reply,
 				 mach_msg_header_t *hdr, integer_t code);
 
+static void darwin_setup_request_notification (struct inferior *inf);
+static void darwin_deallocate_exception_ports (darwin_inferior *inf);
+static void darwin_setup_exceptions (struct inferior *inf);
+static void darwin_deallocate_threads (struct inferior *inf);
+
 /* Target operations for Darwin.  */
 static struct target_ops *darwin_ops;
 
@@ -245,17 +250,17 @@ unparse_exception_type (unsigned int i)
 
 static int
 darwin_ptrace (const char *name,
-	       int request, int pid, PTRACE_TYPE_ARG3 arg3, int arg4)
+	       int request, int pid, caddr_t arg3, int arg4)
 {
   int ret;
 
   errno = 0;
-  ret = ptrace (request, pid, (caddr_t) arg3, arg4);
+  ret = ptrace (request, pid, arg3, arg4);
   if (ret == -1 && errno == 0)
     ret = 0;
 
-  inferior_debug (4, _("ptrace (%s, %d, 0x%x, %d): %d (%s)\n"),
-                  name, pid, arg3, arg4, ret,
+  inferior_debug (4, _("ptrace (%s, %d, 0x%lx, %d): %d (%s)\n"),
+                  name, pid, (unsigned long) arg3, arg4, ret,
                   (ret != 0) ? safe_strerror (errno) : _("no error"));
   return ret;
 }
@@ -320,6 +325,7 @@ darwin_check_new_threads (struct inferio
 	}
     }
 
+  /* Full handling: detect new threads, remove dead threads.  */
   thread_vec = VEC_alloc (darwin_thread_t, new_nbr);
 
   for (new_ix = 0, old_ix = 0; new_ix < new_nbr || old_ix < old_nbr;)
@@ -365,15 +371,22 @@ darwin_check_new_threads (struct inferio
 	  pti->gdb_port = new_id;
 	  pti->msg_state = DARWIN_RUNNING;
 
-	  /* Add a new thread unless this is the first one ever met.  */
-	  if (!(old_nbr == 0 && new_ix == 0))
-	    tp = add_thread_with_info (ptid_build (inf->pid, 0, new_id), pti);
-	  else
+	  if (old_nbr == 0 && new_ix == 0)
 	    {
+	      /* A ptid is create when the inferior is started (see
+		 fork-child.c) with lwp=tid=0.  This ptid will be renamed
+		 later by darwin_init_thread_list ().  */
 	      tp = find_thread_ptid (ptid_build (inf->pid, 0, 0));
 	      gdb_assert (tp);
+	      gdb_assert (tp->priv == NULL);
 	      tp->priv = pti;
 	    }
+	  else
+	    {
+	      /* Add the new thread.  */
+	      tp = add_thread_with_info
+		(ptid_build (inf->pid, 0, new_id), pti);
+	    }
 	  VEC_safe_push (darwin_thread_t, thread_vec, pti);
 	  new_ix++;
 	  continue;
@@ -403,13 +416,13 @@ darwin_check_new_threads (struct inferio
 static int
 find_inferior_task_it (struct inferior *inf, void *port_ptr)
 {
-  return inf->priv->task == *(task_t*)port_ptr;
+  return inf->priv->task == *(task_t *)port_ptr;
 }
 
 static int
-find_inferior_notify_it (struct inferior *inf, void *port_ptr)
+find_inferior_pid_it (struct inferior *inf, void *pid_ptr)
 {
-  return inf->priv->notify_port == *(task_t*)port_ptr;
+  return inf->pid == *(int *)pid_ptr;
 }
 
 /* Return an inferior by task port.  */
@@ -419,11 +432,11 @@ darwin_find_inferior_by_task (task_t por
   return iterate_over_inferiors (&find_inferior_task_it, &port);
 }
 
-/* Return an inferior by notification port.  */
+/* Return an inferior by pid port.  */
 static struct inferior *
-darwin_find_inferior_by_notify (mach_port_t port)
+darwin_find_inferior_by_pid (int pid)
 {
-  return iterate_over_inferiors (&find_inferior_notify_it, &port);
+  return iterate_over_inferiors (&find_inferior_pid_it, &pid);
 }
 
 /* Return a thread by port.  */
@@ -557,6 +570,69 @@ darwin_dump_message (mach_msg_header_t *
     }
 }
 
+/* Adjust inferior data when a new task was created.  */
+
+static struct inferior *
+darwin_find_new_inferior (task_t task_port, thread_t thread_port)
+{
+  int task_pid;
+  struct inferior *inf;
+  kern_return_t kret;
+  mach_port_t prev;
+
+  /* Find the corresponding pid.  */
+  kret = pid_for_task (task_port, &task_pid);
+  if (kret != KERN_SUCCESS)
+    {
+      MACH_CHECK_ERROR (kret);
+      return NULL;
+    }
+
+  /* Find the inferior for this pid.  */
+  inf = darwin_find_inferior_by_pid (task_pid);
+  if (inf == NULL)
+    return NULL;
+
+  /* Deallocate saved exception ports.  */
+  darwin_deallocate_exception_ports (inf->priv);
+
+  /* No need to remove dead_name notification, but still...  */
+  kret = mach_port_request_notification (gdb_task, inf->priv->task,
+					 MACH_NOTIFY_DEAD_NAME, 0,
+					 MACH_PORT_NULL,
+					 MACH_MSG_TYPE_MAKE_SEND_ONCE,
+					 &prev);
+  if (kret != KERN_INVALID_ARGUMENT)
+    MACH_CHECK_ERROR (kret);
+
+  /* Replace old task port.  */
+  kret = mach_port_deallocate (gdb_task, inf->priv->task);
+  MACH_CHECK_ERROR (kret);
+  inf->priv->task = task_port;
+
+  darwin_setup_request_notification (inf);
+  darwin_setup_exceptions (inf);
+
+  return inf;
+}
+
+/* Check data representation.  */
+
+static int
+darwin_check_message_ndr (NDR_record_t *ndr)
+{
+  if (ndr->mig_vers != NDR_PROTOCOL_2_0
+      || ndr->if_vers != NDR_PROTOCOL_2_0
+      || ndr->mig_encoding != NDR_record.mig_encoding
+      || ndr->int_rep != NDR_record.int_rep
+      || ndr->char_rep != NDR_record.char_rep
+      || ndr->float_rep != NDR_record.float_rep)
+    return -1;
+  return 0;
+}
+
+/* Decode an exception message.  */
+
 static int
 darwin_decode_exception_message (mach_msg_header_t *hdr,
 				 struct inferior **pinf,
@@ -593,12 +669,7 @@ darwin_decode_exception_message (mach_ms
 
   /* Check data representation.  */
   ndr = (NDR_record_t *)(desc + 2);
-  if (ndr->mig_vers != NDR_PROTOCOL_2_0
-      || ndr->if_vers != NDR_PROTOCOL_2_0
-      || ndr->mig_encoding != NDR_record.mig_encoding
-      || ndr->int_rep != NDR_record.int_rep
-      || ndr->char_rep != NDR_record.char_rep
-      || ndr->float_rep != NDR_record.float_rep)
+  if (darwin_check_message_ndr (ndr) != 0)
     return -1;
 
   /* Ok, the hard work.  */
@@ -607,14 +678,33 @@ darwin_decode_exception_message (mach_ms
   task_port = desc[1].name;
   thread_port = desc[0].name;
 
-  /* We got new rights to the task, get rid of it.  Do not get rid of thread
-     right, as we will need it to find the thread.  */
-  kret = mach_port_deallocate (mach_task_self (), task_port);
-  MACH_CHECK_ERROR (kret);
-
   /* Find process by port.  */
   inf = darwin_find_inferior_by_task (task_port);
   *pinf = inf;
+
+  if (inf == NULL && data[0] == EXC_SOFTWARE && data[1] == 2
+      && data[2] == EXC_SOFT_SIGNAL && data[3] == SIGTRAP)
+    {
+      /* Not a known inferior, but a sigtrap.  This happens on darwin 16.1.0,
+	 as a new Mach task is created when a process exec.  */
+      inf = darwin_find_new_inferior (task_port, thread_port);
+      *pinf = inf;
+
+      if (inf == NULL)
+	{
+	  /* Deallocate task_port, unless it was saved.  */
+	  kret = mach_port_deallocate (mach_task_self (), task_port);
+	  MACH_CHECK_ERROR (kret);
+	}
+    }
+  else
+    {
+      /* We got new rights to the task, get rid of it.  Do not get rid of
+	 thread right, as we will need it to find the thread.  */
+      kret = mach_port_deallocate (mach_task_self (), task_port);
+      MACH_CHECK_ERROR (kret);
+    }
+
   if (inf == NULL)
     {
       /* Not a known inferior.  This could happen if the child fork, as
@@ -623,6 +713,10 @@ darwin_decode_exception_message (mach_ms
       kern_return_t kret;
       mig_reply_error_t reply;
 
+      inferior_debug
+	(4, _("darwin_decode_exception_message: unknown task 0x%x\n"),
+	 task_port);
+
       /* Free thread port (we don't know it).  */
       kret = mach_port_deallocate (mach_task_self (), thread_port);
       MACH_CHECK_ERROR (kret);
@@ -676,6 +770,45 @@ darwin_decode_exception_message (mach_ms
   return 0;
 }
 
+/* Decode dead_name notify message.  */
+
+static int
+darwin_decode_notify_message (mach_msg_header_t *hdr, struct inferior **pinf)
+{
+  NDR_record_t *ndr = (NDR_record_t *)(hdr + 1);
+  integer_t *data = (integer_t *)(ndr + 1);
+  struct inferior *inf;
+  darwin_thread_t *thread;
+  task_t task_port;
+  thread_t thread_port;
+  kern_return_t kret;
+  int i;
+
+  /* Check message header.  */
+  if (hdr->msgh_bits & MACH_MSGH_BITS_COMPLEX)
+    return -1;
+
+  /* Check descriptors.  */
+  if (hdr->msgh_size < (sizeof (*hdr) + sizeof (*ndr) + sizeof (integer_t)))
+    return -2;
+
+  /* Check data representation.  */
+  if (darwin_check_message_ndr (ndr) != 0)
+    return -3;
+
+  task_port = data[0];
+
+  /* Find process by port.  */
+  inf = darwin_find_inferior_by_task (task_port);
+  *pinf = inf;
+
+  /* Check message destination.  */
+  if (inf != NULL && hdr->msgh_local_port != inf->priv->notify_port)
+    return -4;
+
+  return 0;
+}
+
 static void
 darwin_encode_reply (mig_reply_error_t *reply, mach_msg_header_t *hdr,
 		     integer_t code)
@@ -728,7 +861,7 @@ darwin_resume_thread (struct inferior *i
 	{
 	  /* Either deliver a new signal or cancel the signal received.  */
 	  res = PTRACE (PT_THUPDATE, inf->pid,
-			(void *)(uintptr_t)thread->gdb_port, nsignal);
+			(caddr_t) (uintptr_t) thread->gdb_port, nsignal);
 	  if (res < 0)
 	    inferior_debug (1, _("ptrace THUP: res=%d\n"), res);
 	}
@@ -743,13 +876,10 @@ darwin_resume_thread (struct inferior *i
 	}
 
       /* Set or reset single step.  */
-      if (step != thread->single_step)
-	{
-	  inferior_debug (4, _("darwin_set_sstep (thread=0x%x, enable=%d)\n"),
-			  thread->gdb_port, step);
-	  darwin_set_sstep (thread->gdb_port, step);
-	  thread->single_step = step;
-	}
+      inferior_debug (4, _("darwin_set_sstep (thread=0x%x, enable=%d)\n"),
+		      thread->gdb_port, step);
+      darwin_set_sstep (thread->gdb_port, step);
+      thread->single_step = step;
 
       darwin_send_reply (inf, thread);
       thread->msg_state = DARWIN_RUNNING;
@@ -835,7 +965,7 @@ darwin_resume (ptid_t ptid, int step, en
   struct inferior *inf;
 
   inferior_debug
-    (2, _("darwin_resume: pid=%d, tid=0x%x, step=%d, signal=%d\n"),
+    (2, _("darwin_resume: pid=%d, tid=0x%lx, step=%d, signal=%d\n"),
      ptid_get_pid (ptid), ptid_get_tid (ptid), step, signal);
 
   if (signal == GDB_SIGNAL_0)
@@ -989,10 +1119,27 @@ darwin_decode_message (mach_msg_header_t
   else if (hdr->msgh_id == 0x48)
     {
       /* MACH_NOTIFY_DEAD_NAME: notification for exit.  */
+      int res;
+
+      res = darwin_decode_notify_message (hdr, &inf);
+
+      if (res < 0)
+	{
+	  /* Should not happen...  */
+	  printf_unfiltered
+	    (_("darwin_wait: ill-formatted message (id=0x%x, res=%d)\n"),
+	     hdr->msgh_id, res);
+	}
+
       *pinf = NULL;
       *pthread = NULL;
 
-      inf = darwin_find_inferior_by_notify (hdr->msgh_local_port);
+      if (res < 0 || inf == NULL)
+	{
+	  status->kind = TARGET_WAITKIND_IGNORE;
+	  return minus_one_ptid;
+	}
+
       if (inf != NULL)
 	{
 	  if (!inf->priv->no_ptrace)
@@ -1016,7 +1163,7 @@ darwin_decode_message (mach_msg_header_t
 	      else
 		{
 		  status->kind = TARGET_WAITKIND_SIGNALLED;
-		  status->value.sig = WTERMSIG (wstatus);
+		  status->value.sig = gdb_signal_from_host (WTERMSIG (wstatus));
 		}
 
 	      inferior_debug (4, _("darwin_wait: pid=%d exit, status=0x%x\n"),
@@ -1025,7 +1172,8 @@ darwin_decode_message (mach_msg_header_t
 	      /* Looks necessary on Leopard and harmless...  */
 	      wait4 (inf->pid, &wstatus, 0, NULL);
 
-	      return ptid_build (inf->pid, 0, 0);
+	      inferior_ptid = ptid_build (inf->pid, 0, 0);
+	      return inferior_ptid;
 	    }
 	  else
 	    {
@@ -1061,8 +1209,8 @@ cancel_breakpoint (ptid_t ptid)
   pc = regcache_read_pc (regcache) - gdbarch_decr_pc_after_break (gdbarch);
   if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
     {
-      inferior_debug (4, "cancel_breakpoint for thread 0x%x\n",
-		      ptid_get_tid (ptid));
+      inferior_debug (4, "cancel_breakpoint for thread 0x%lx\n",
+		      (unsigned long) ptid_get_tid (ptid));
 
       /* Back up the PC if necessary.  */
       if (gdbarch_decr_pc_after_break (gdbarch))
@@ -1198,7 +1346,7 @@ darwin_wait_to (struct target_ops *ops,
 }
 
 static void
-darwin_stop (struct target_ops *self, ptid_t t)
+darwin_interrupt (struct target_ops *self, ptid_t t)
 {
   struct inferior *inf = current_inferior ();
 
@@ -1207,17 +1355,14 @@ darwin_stop (struct target_ops *self, pt
   kill (inf->pid, SIGINT);
 }
 
+/* Deallocate threads port and vector.  */
+
 static void
-darwin_mourn_inferior (struct target_ops *ops)
+darwin_deallocate_threads (struct inferior *inf)
 {
-  struct inferior *inf = current_inferior ();
-  kern_return_t kret;
-  mach_port_t prev;
-  int i;
-
-  /* Deallocate threads.  */
   if (inf->priv->threads)
     {
+      kern_return_t kret;
       int k;
       darwin_thread_t *t;
       for (k = 0;
@@ -1230,11 +1375,25 @@ darwin_mourn_inferior (struct target_ops
       VEC_free (darwin_thread_t, inf->priv->threads);
       inf->priv->threads = NULL;
     }
+}
 
+static void
+darwin_mourn_inferior (struct target_ops *ops)
+{
+  struct inferior *inf = current_inferior ();
+  kern_return_t kret;
+  mach_port_t prev;
+  int i;
+
+  /* Deallocate threads.  */
+  darwin_deallocate_threads (inf);
+
+  /* Remove notify_port from darwin_port_set.  */
   kret = mach_port_move_member (gdb_task,
 				inf->priv->notify_port, MACH_PORT_NULL);
   MACH_CHECK_ERROR (kret);
 
+  /* Remove task port dead_name notification.  */
   kret = mach_port_request_notification (gdb_task, inf->priv->task,
 					 MACH_NOTIFY_DEAD_NAME, 0,
 					 MACH_PORT_NULL,
@@ -1250,19 +1409,14 @@ darwin_mourn_inferior (struct target_ops
       MACH_CHECK_ERROR (kret);
     }
 
+  /* Destroy notify_port.  */
   kret = mach_port_destroy (gdb_task, inf->priv->notify_port);
   MACH_CHECK_ERROR (kret);
 
-
   /* Deallocate saved exception ports.  */
-  for (i = 0; i < inf->priv->exception_info.count; i++)
-    {
-      kret = mach_port_deallocate
-	(gdb_task, inf->priv->exception_info.ports[i]);
-      MACH_CHECK_ERROR (kret);
-    }
-  inf->priv->exception_info.count = 0;
+  darwin_deallocate_exception_ports (inf->priv);
 
+  /* Deallocate task port.  */
   kret = mach_port_deallocate (gdb_task, inf->priv->task);
   MACH_CHECK_ERROR (kret);
 
@@ -1352,6 +1506,48 @@ darwin_restore_exception_ports (darwin_i
   return KERN_SUCCESS;
 }
 
+/* Deallocate saved exception ports.  */
+
+static void
+darwin_deallocate_exception_ports (darwin_inferior *inf)
+{
+  int i;
+  kern_return_t kret;
+
+  for (i = 0; i < inf->exception_info.count; i++)
+    {
+      kret = mach_port_deallocate (gdb_task, inf->exception_info.ports[i]);
+      MACH_CHECK_ERROR (kret);
+    }
+  inf->exception_info.count = 0;
+}
+
+static void
+darwin_setup_exceptions (struct inferior *inf)
+{
+  kern_return_t kret;
+  int traps_expected;
+  exception_mask_t mask;
+
+  kret = darwin_save_exception_ports (inf->priv);
+  if (kret != KERN_SUCCESS)
+    error (_("Unable to save exception ports, task_get_exception_ports"
+	     "returned: %d"),
+	   kret);
+
+  /* Set exception port.  */
+  if (enable_mach_exceptions)
+    mask = EXC_MASK_ALL;
+  else
+    mask = EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;
+  kret = task_set_exception_ports (inf->priv->task, mask, darwin_ex_port,
+				   EXCEPTION_DEFAULT, THREAD_STATE_NONE);
+  if (kret != KERN_SUCCESS)
+    error (_("Unable to set exception ports, task_set_exception_ports"
+	     "returned: %d"),
+	   kret);
+}
+
 static void
 darwin_kill_inferior (struct target_ops *ops)
 {
@@ -1384,7 +1580,35 @@ darwin_kill_inferior (struct target_ops 
     warning (_("Failed to kill inferior: kill (%d, 9) returned [%s]"),
 	     inf->pid, safe_strerror (errno));
 
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
+}
+
+static void
+darwin_setup_request_notification (struct inferior *inf)
+{
+  kern_return_t kret;
+  mach_port_t prev_not;
+
+  kret = mach_port_request_notification (gdb_task, inf->priv->task,
+					 MACH_NOTIFY_DEAD_NAME, 0,
+					 inf->priv->notify_port,
+					 MACH_MSG_TYPE_MAKE_SEND_ONCE,
+					 &prev_not);
+  if (kret != KERN_SUCCESS)
+    error (_("Termination notification request failed, "
+	     "mach_port_request_notification\n"
+	     "returned: %d"),
+	   kret);
+  if (prev_not != MACH_PORT_NULL)
+    {
+      /* This is unexpected, as there should not be any previously
+	 registered notification request.  But this is not a fatal
+	 issue, so just emit a warning.  */
+      warning (_("\
+A task termination request was registered before the debugger registered\n\
+its own.  This is unexpected, but should otherwise not have any actual\n\
+impact on the debugging session."));
+    }
 }
 
 static void
@@ -1466,44 +1690,9 @@ darwin_attach_pid (struct inferior *inf)
 	     "returned: %d"),
 	   kret);
 
-  kret = mach_port_request_notification (gdb_task, inf->priv->task,
-					 MACH_NOTIFY_DEAD_NAME, 0,
-					 inf->priv->notify_port,
-					 MACH_MSG_TYPE_MAKE_SEND_ONCE,
-					 &prev_not);
-  if (kret != KERN_SUCCESS)
-    error (_("Termination notification request failed, "
-	     "mach_port_request_notification\n"
-	     "returned: %d"),
-	   kret);
-  if (prev_not != MACH_PORT_NULL)
-    {
-      /* This is unexpected, as there should not be any previously
-	 registered notification request.  But this is not a fatal
-	 issue, so just emit a warning.  */
-      warning (_("\
-A task termination request was registered before the debugger registered\n\
-its own.  This is unexpected, but should otherwise not have any actual\n\
-impact on the debugging session."));
-    }
+  darwin_setup_request_notification (inf);
 
-  kret = darwin_save_exception_ports (inf->priv);
-  if (kret != KERN_SUCCESS)
-    error (_("Unable to save exception ports, task_get_exception_ports"
-	     "returned: %d"),
-	   kret);
-
-  /* Set exception port.  */
-  if (enable_mach_exceptions)
-    mask = EXC_MASK_ALL;
-  else
-    mask = EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;
-  kret = task_set_exception_ports (inf->priv->task, mask, darwin_ex_port,
-				   EXCEPTION_DEFAULT, THREAD_STATE_NONE);
-  if (kret != KERN_SUCCESS)
-    error (_("Unable to set exception ports, task_set_exception_ports"
-	     "returned: %d"),
-	   kret);
+  darwin_setup_exceptions (inf);
 
   if (!target_is_pushed (darwin_ops))
     push_target (darwin_ops);
@@ -1540,22 +1729,28 @@ darwin_ptrace_me (void)
   char c;
 
   /* Close write end point.  */
-  close (ptrace_fds[1]);
+  if (close (ptrace_fds[1]) < 0)
+    trace_start_error_with_name ("close");
 
   /* Wait until gdb is ready.  */
   res = read (ptrace_fds[0], &c, 1);
   if (res != 0)
-    error (_("unable to read from pipe, read returned: %d"), res);
-  close (ptrace_fds[0]);
+    trace_start_error (_("unable to read from pipe, read returned: %d"), res);
+
+  if (close (ptrace_fds[0]) < 0)
+    trace_start_error_with_name ("close");
 
   /* Get rid of privileges.  */
-  setegid (getgid ());
+  if (setegid (getgid ()) < 0)
+    trace_start_error_with_name ("setegid");
 
   /* Set TRACEME.  */
-  PTRACE (PT_TRACE_ME, 0, 0, 0);
+  if (PTRACE (PT_TRACE_ME, 0, 0, 0) < 0)
+    trace_start_error_with_name ("PTRACE");
 
   /* Redirect signals to exception port.  */
-  PTRACE (PT_SIGEXC, 0, 0, 0);
+  if (PTRACE (PT_SIGEXC, 0, 0, 0) < 0)
+    trace_start_error_with_name ("PTRACE");
 }
 
 /* Dummy function to be sure fork_inferior uses fork(2) and not vfork(2).  */
@@ -1742,15 +1937,7 @@ darwin_detach (struct target_ops *ops, c
   int res;
 
   /* Display message.  */
-  if (from_tty)
-    {
-      char *exec_file = get_exec_file (0);
-      if (exec_file == 0)
-	exec_file = "";
-      printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
-			 target_pid_to_str (pid_to_ptid (pid)));
-      gdb_flush (gdb_stdout);
-    }
+  target_announce_detach (from_tty);
 
   /* If ptrace() is in use, stop the process.  */
   if (!inf->priv->no_ptrace)
@@ -1810,15 +1997,14 @@ darwin_thread_alive (struct target_ops *
    If WRADDR is not NULL, write gdb's LEN bytes from WRADDR and copy it
    to ADDR in inferior task's address space.
    Return 0 on failure; number of bytes read / writen otherwise.  */
+
 static int
 darwin_read_write_inferior (task_t task, CORE_ADDR addr,
 			    gdb_byte *rdaddr, const gdb_byte *wraddr,
 			    ULONGEST length)
 {
   kern_return_t kret;
-  mach_vm_address_t offset = addr & (mach_page_size - 1);
-  mach_vm_address_t low_address = (mach_vm_address_t) (addr - offset);
-  mach_vm_size_t aligned_length = (mach_vm_size_t) PAGE_ROUND (offset + length);
+  mach_vm_size_t res_length = 0;
   pointer_t copied;
   mach_msg_type_number_t copy_count;
   mach_vm_size_t remaining_length;
@@ -1828,38 +2014,44 @@ darwin_read_write_inferior (task_t task,
   inferior_debug (8, _("darwin_read_write_inferior(task=0x%x, %s, len=%s)\n"),
 		  task, core_addr_to_string (addr), pulongest (length));
 
-  /* Get memory from inferior with page aligned addresses.  */
-  kret = mach_vm_read (task, low_address, aligned_length,
-		      &copied, &copy_count);
-  if (kret != KERN_SUCCESS)
+  /* First read.  */
+  if (rdaddr != NULL)
     {
-      inferior_debug
-	(1, _("darwin_read_write_inferior: mach_vm_read failed at %s: %s"),
-	 core_addr_to_string (addr), mach_error_string (kret));
-      return 0;
-    }
+      mach_vm_size_t count;
 
-  if (rdaddr != NULL)
-    memcpy (rdaddr, (char *)copied + offset, length);
+      /* According to target.h(to_xfer_partial), one and only one may be
+	 non-null.  */
+      gdb_assert (wraddr == NULL);
 
-  if (wraddr == NULL)
-    goto out;
+      kret = mach_vm_read_overwrite (task, addr, length,
+				     (mach_vm_address_t) rdaddr, &count);
+      if (kret != KERN_SUCCESS)
+	{
+	  inferior_debug
+	    (1, _("darwin_read_write_inferior: mach_vm_read failed at %s: %s"),
+	     core_addr_to_string (addr), mach_error_string (kret));
+	  return 0;
+	}
+      return count;
+    }
 
-  memcpy ((char *)copied + offset, wraddr, length);
+  /* See above.  */
+  gdb_assert (wraddr != NULL);
 
-  /* Do writes atomically.
-     First check for holes and unwritable memory.  */
-  for (region_address = low_address, remaining_length = aligned_length;
-       region_address < low_address + aligned_length;
-       region_address += region_length, remaining_length -= region_length)
+  while (length != 0)
     {
+      mach_vm_address_t offset = addr & (mach_page_size - 1);
+      mach_vm_address_t region_address = (mach_vm_address_t) (addr - offset);
+      mach_vm_size_t aligned_length =
+	(mach_vm_size_t) PAGE_ROUND (offset + length);
       vm_region_submap_short_info_data_64_t info;
+      mach_msg_type_number_t count = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64;
+      natural_t region_depth = 1000;
       mach_vm_address_t region_start = region_address;
-      mach_msg_type_number_t count;
-      natural_t region_depth;
+      mach_vm_size_t region_length;
+      mach_vm_size_t write_length;
 
-      region_depth = 100000;
-      count = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64;
+      /* Read page protection.  */
       kret = mach_vm_region_recurse
 	(task, &region_start, &region_length, &region_depth,
 	 (vm_region_recurse_info_t) &info, &count);
@@ -1870,7 +2062,7 @@ darwin_read_write_inferior (task_t task,
 			       "mach_vm_region_recurse failed at %s: %s\n"),
 			  core_addr_to_string (region_address),
 			  mach_error_string (kret));
-	  goto out;
+	  return res_length;
 	}
 
       inferior_debug
@@ -1887,60 +2079,80 @@ darwin_read_write_inferior (task_t task,
 		   core_addr_to_string (region_address),
 		   core_addr_to_string (region_start),
 		   (unsigned)region_length);
-	  length = 0;
-	  goto out;
+	  return res_length;
 	}
 
       /* Adjust the length.  */
       region_length -= (region_address - region_start);
+      if (region_length > aligned_length)
+	region_length = aligned_length;
 
-      if (!(info.max_protection & VM_PROT_WRITE))
+      /* Make the pages RW.  */
+      if (!(info.protection & VM_PROT_WRITE))
 	{
-	  kret = mach_vm_protect
-	    (task, region_address, region_length,
-	     TRUE, info.max_protection | VM_PROT_WRITE | VM_PROT_COPY);
+	  vm_prot_t prot = VM_PROT_READ | VM_PROT_WRITE;
+
+	  kret = mach_vm_protect (task, region_address, region_length,
+				  FALSE, prot);
+	  if (kret != KERN_SUCCESS)
+	    {
+	      prot |= VM_PROT_COPY;
+	      kret = mach_vm_protect (task, region_address, region_length,
+				      FALSE, prot);
+	    }
 	  if (kret != KERN_SUCCESS)
 	    {
-	      warning (_("darwin_read_write_inf: "
-			 "mach_vm_protect max failed at %s: %s"),
+	      warning (_("darwin_read_write_inferior: "
+			 "mach_vm_protect failed at %s "
+			 "(len=0x%lx, prot=0x%x): %s"),
 		       core_addr_to_string (region_address),
+		       (unsigned long) region_length, (unsigned) prot,
 		       mach_error_string (kret));
-	      length = 0;
-	      goto out;
+	      return res_length;
 	    }
 	}
 
+      if (offset + length > region_length)
+	write_length = region_length - offset;
+      else
+	write_length = length;
+
+      /* Write.  */
+      kret = mach_vm_write (task, addr, (vm_offset_t) wraddr, write_length);
+      if (kret != KERN_SUCCESS)
+	{
+	  warning (_("darwin_read_write_inferior: mach_vm_write failed: %s"),
+		   mach_error_string (kret));
+	  return res_length;
+	}
+
+      /* Restore page rights.  */
       if (!(info.protection & VM_PROT_WRITE))
 	{
 	  kret = mach_vm_protect (task, region_address, region_length,
-				 FALSE, info.protection | VM_PROT_WRITE);
+				  FALSE, info.protection);
 	  if (kret != KERN_SUCCESS)
 	    {
-	      warning (_("darwin_read_write_inf: "
-			 "mach_vm_protect failed at %s (len=0x%lx): %s"),
+	      warning (_("darwin_read_write_inferior: "
+			 "mach_vm_protect restore failed at %s "
+			 "(len=0x%lx): %s"),
 		       core_addr_to_string (region_address),
-		       (unsigned long)region_length, mach_error_string (kret));
-	      length = 0;
-	      goto out;
+		       (unsigned long) region_length,
+		       mach_error_string (kret));
 	    }
 	}
-    }
 
-  kret = mach_vm_write (task, low_address, copied, aligned_length);
+      addr += write_length;
+      wraddr += write_length;
+      res_length += write_length;
+      length -= write_length;
+    }
 
-  if (kret != KERN_SUCCESS)
-    {
-      warning (_("darwin_read_write_inferior: mach_vm_write failed: %s"),
-	       mach_error_string (kret));
-      length = 0;
-    }
-out:
-  mach_vm_deallocate (mach_task_self (), copied, copy_count);
-  return length;
+  return res_length;
 }
 
 /* Read LENGTH bytes at offset ADDR of task_dyld_info for TASK, and copy them
-   to RDADDR.
+   to RDADDR (in big endian).
    Return 0 on failure; number of bytes read / written otherwise.  */
 
 #ifdef TASK_DYLD_INFO_COUNT
@@ -1954,17 +2166,17 @@ darwin_read_dyld_info (task_t task, CORE
   int sz = TASK_DYLD_INFO_COUNT * sizeof (natural_t);
   kern_return_t kret;
 
-  if (addr >= sz)
+  if (addr != 0 || length > sizeof (mach_vm_address_t))
     return TARGET_XFER_EOF;
 
-  kret = task_info (task, TASK_DYLD_INFO, (task_info_t) &task_dyld_info, &count);
+  kret = task_info (task, TASK_DYLD_INFO,
+		    (task_info_t) &task_dyld_info, &count);
   MACH_CHECK_ERROR (kret);
   if (kret != KERN_SUCCESS)
     return TARGET_XFER_E_IO;
-  /* Truncate.  */
-  if (addr + length > sz)
-    length = sz - addr;
-  memcpy (rdaddr, (char *)&task_dyld_info + addr, length);
+
+  store_unsigned_integer (rdaddr, length, BFD_ENDIAN_BIG,
+			  task_dyld_info.all_image_info_addr);
   *xfered_len = (ULONGEST) length;
   return TARGET_XFER_OK;
 }
@@ -2156,7 +2368,7 @@ _initialize_darwin_inferior (void)
   darwin_ops->to_wait = darwin_wait_to;
   darwin_ops->to_mourn_inferior = darwin_mourn_inferior;
   darwin_ops->to_kill = darwin_kill_inferior;
-  darwin_ops->to_stop = darwin_stop;
+  darwin_ops->to_interrupt = darwin_interrupt;
   darwin_ops->to_resume = darwin_resume_to;
   darwin_ops->to_thread_alive = darwin_thread_alive;
   darwin_ops->to_pid_to_str = darwin_pid_to_str;
@@ -2170,8 +2382,8 @@ _initialize_darwin_inferior (void)
 
   add_target (darwin_ops);
 
-  inferior_debug (2, _("GDB task: 0x%lx, pid: %d\n"), mach_task_self (),
-                  getpid ());
+  inferior_debug (2, _("GDB task: 0x%lx, pid: %d\n"),
+		  (unsigned long) mach_task_self (), getpid ());
 
   add_setshow_zuinteger_cmd ("darwin", class_obscure,
 			     &darwin_debug_flag, _("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat.h ./gdb/darwin-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/darwin-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common things used by the various darwin files
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat-info.c ./gdb/darwin-nat-info.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/darwin-nat-info.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/darwin-nat-info.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
 
@@ -624,23 +624,23 @@ darwin_debug_regions_recurse (task_t tas
 
   if (gdbarch_addr_bit (target_gdbarch ()) <= 32)
     {
-      ui_out_table_header (uiout, 10, ui_left, "start", "Start");
-      ui_out_table_header (uiout, 10, ui_left, "end", "End");
+      uiout->table_header (10, ui_left, "start", "Start");
+      uiout->table_header (10, ui_left, "end", "End");
     }
   else
     {
-      ui_out_table_header (uiout, 18, ui_left, "start", "Start");
-      ui_out_table_header (uiout, 18, ui_left, "end", "End");
+      uiout->table_header (18, ui_left, "start", "Start");
+      uiout->table_header (18, ui_left, "end", "End");
     }
-  ui_out_table_header (uiout, 3, ui_left, "min-prot", "Min");
-  ui_out_table_header (uiout, 3, ui_left, "max-prot", "Max");
-  ui_out_table_header (uiout, 5, ui_left, "inheritence", "Inh");
-  ui_out_table_header (uiout, 9, ui_left, "share-mode", "Shr");
-  ui_out_table_header (uiout, 1, ui_left, "depth", "D");
-  ui_out_table_header (uiout, 3, ui_left, "submap", "Sm");
-  ui_out_table_header (uiout, 0, ui_noalign, "tag", "Tag");
+  uiout->table_header (3, ui_left, "min-prot", "Min");
+  uiout->table_header (3, ui_left, "max-prot", "Max");
+  uiout->table_header (5, ui_left, "inheritence", "Inh");
+  uiout->table_header (9, ui_left, "share-mode", "Shr");
+  uiout->table_header (1, ui_left, "depth", "D");
+  uiout->table_header (3, ui_left, "submap", "Sm");
+  uiout->table_header (0, ui_noalign, "tag", "Tag");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
 
   r_start = 0;
   r_depth = 0;
@@ -658,29 +658,29 @@ darwin_debug_regions_recurse (task_t tas
 	break;
       row_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "regions-row");
 
-      ui_out_field_core_addr (uiout, "start", target_gdbarch (), r_start);
-      ui_out_field_core_addr (uiout, "end", target_gdbarch (), r_start + r_size);
-      ui_out_field_string (uiout, "min-prot", 
+      uiout->field_core_addr ("start", target_gdbarch (), r_start);
+      uiout->field_core_addr ("end", target_gdbarch (), r_start + r_size);
+      uiout->field_string ("min-prot",
 			   unparse_protection (r_info.protection));
-      ui_out_field_string (uiout, "max-prot", 
+      uiout->field_string ("max-prot",
 			   unparse_protection (r_info.max_protection));
-      ui_out_field_string (uiout, "inheritence",
+      uiout->field_string ("inheritence",
 			   unparse_inheritance (r_info.inheritance));
-      ui_out_field_string (uiout, "share-mode",
+      uiout->field_string ("share-mode",
 			   unparse_share_mode (r_info.share_mode));
-      ui_out_field_int (uiout, "depth", r_depth);
-      ui_out_field_string (uiout, "submap",
+      uiout->field_int ("depth", r_depth);
+      uiout->field_string ("submap",
 			   r_info.is_submap ? _("sm ") : _("obj"));
       tag = unparse_user_tag (r_info.user_tag);
       if (tag)
-	ui_out_field_string (uiout, "tag", tag);
+	uiout->field_string ("tag", tag);
       else
-	ui_out_field_int (uiout, "tag", r_info.user_tag);
+	uiout->field_int ("tag", r_info.user_tag);
 
       do_cleanups (row_chain);
 
-      if (!ui_out_is_mi_like_p (uiout))
-	ui_out_text (uiout, "\n");
+      if (!uiout->is_mi_like_p ())
+	uiout->text ("\n");
 
       if (r_info.is_submap)
 	r_depth++;
@@ -725,13 +725,12 @@ info_mach_regions_recurse_command (char 
 static void
 info_mach_region_command (char *exp, int from_tty)
 {
-  struct expression *expr;
   struct value *val;
   mach_vm_address_t address;
   struct inferior *inf;
 
-  expr = parse_expression (exp);
-  val = evaluate_expression (expr);
+  expression_up expr = parse_expression (exp);
+  val = evaluate_expression (expr.get ());
   if (TYPE_CODE (value_type (val)) == TYPE_CODE_REF)
     {
       val = value_ind (val);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/data-directory/.gitignore ./gdb/data-directory/.gitignore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/data-directory/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/data-directory/.gitignore	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,5 @@
+/Makefile
+/guile
+/python
+/syscalls
+/system-gdbinit
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/data-directory/Makefile.in ./gdb/data-directory/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/data-directory/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/data-directory/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # Makefile for building a staged copy of the data-directory.
 # This file is part of GDB.
@@ -16,12 +16,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Please keep lists in this file sorted alphabetically, with one item per line.
+# See gdb/Makefile.in for guidelines on ordering files and directories.
+
 srcdir = @srcdir@
 SYSCALLS_SRCDIR = $(srcdir)/../syscalls
 PYTHON_SRCDIR = $(srcdir)/../python/lib
 GUILE_SRCDIR = $(srcdir)/../guile/lib
 SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
 VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
+XSLTPROC = @XSLTPROC@
 
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
@@ -44,36 +48,45 @@ GDB_DATADIR = @GDB_DATADIR@
 
 SYSCALLS_DIR = syscalls
 SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
-SYSCALLS_FILES = \
-	gdb-syscalls.dtd \
-	arm-linux.xml aarch64-linux.xml \
-	ppc-linux.xml ppc64-linux.xml \
-	i386-linux.xml amd64-linux.xml \
-	sparc-linux.xml sparc64-linux.xml \
-	mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml \
-	s390-linux.xml s390x-linux.xml
+GEN_SYSCALLS_FILES = \
+	aarch64-linux.xml \
+	amd64-linux.xml \
+	arm-linux.xml \
+	i386-linux.xml \
+	mips-n32-linux.xml \
+	mips-n64-linux.xml \
+	mips-o32-linux.xml \
+	ppc-linux.xml \
+	ppc64-linux.xml \
+	s390-linux.xml \
+	s390x-linux.xml \
+	sparc-linux.xml \
+	sparc64-linux.xml
+
+SYSCALLS_FILES = gdb-syscalls.dtd freebsd.xml $(GEN_SYSCALLS_FILES)
 
 PYTHON_DIR = python
 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
 PYTHON_FILE_LIST = \
 	gdb/__init__.py \
-	gdb/frames.py \
-	gdb/FrameIterator.py \
 	gdb/FrameDecorator.py \
-	gdb/types.py \
+	gdb/FrameIterator.py \
+	gdb/frames.py \
 	gdb/printing.py \
-	gdb/unwinder.py \
 	gdb/prompt.py \
+	gdb/types.py \
+	gdb/unwinder.py \
 	gdb/xmethod.py \
 	gdb/command/__init__.py \
-	gdb/command/xmethods.py \
+	gdb/command/explore.py \
 	gdb/command/frame_filters.py \
-	gdb/command/unwinders.py \
-	gdb/command/type_printers.py \
 	gdb/command/pretty_printers.py \
 	gdb/command/prompt.py \
-	gdb/command/explore.py \
+	gdb/command/type_printers.py \
+	gdb/command/unwinders.py \
+	gdb/command/xmethods.py \
 	gdb/function/__init__.py \
+	gdb/function/as_string.py \
 	gdb/function/caller_is.py \
 	gdb/function/strfns.py \
 	gdb/printer/__init__.py \
@@ -161,6 +174,21 @@ FLAGS_TO_PASS = \
 .PHONY: all
 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
 
+%.xml: @MAINTAINER_MODE_TRUE@ %.xml.in apply-defaults.xsl linux-defaults.xml.in
+	$(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl\
+		$(SYSCALLS_SRCDIR)/$@.in
+
+.PHONY: syscall-xml
+syscall-xml: $(GEN_SYSCALLS_FILES)
+
+.PHONY: clean-syscall-xml
+# Only clean files generated XML files.
+clean-syscall-xml:
+	files='$(GEN_SYSCALLS_FILES)' ; \
+	for file in $$files; do \
+		rm -f "$(SYSCALLS_SRCDIR)/$$file"; \
+	done
+
 # For portability's sake, we need to handle systems that don't have
 # symbolic links.
 stamp-syscalls: Makefile $(SYSCALLS_FILES)
@@ -384,3 +412,6 @@ MAKEOVERRIDES=
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	cd $(top_builddir) && $(MAKE) data-directory/Makefile
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dbug-rom.c ./gdb/dbug-rom.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dbug-rom.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dbug-rom.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,176 +0,0 @@
-/* Remote debugging interface to dBUG ROM monitor for GDB, the GNU debugger.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
-
-   Written by Stan Shebs of Cygnus Support.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* dBUG is a monitor supplied on various Motorola boards, including
-   m68k, ColdFire, and PowerPC-based designs.  The code here assumes
-   the ColdFire, and (as of 9/25/96) has only been tested with a
-   ColdFire IDP board.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-#include "m68k-tdep.h"
-
-static void
-dbug_supply_register (struct regcache *regcache, char *regname,
-		      int regnamelen, char *val, int vallen)
-{
-  int regno;
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  if (regnamelen != 2)
-    return;
-
-  switch (regname[0])
-    {
-    case 'S':
-      if (regname[1] != 'R')
-	return;
-      regno = gdbarch_ps_regnum (gdbarch);
-      break;
-    case 'P':
-      if (regname[1] != 'C')
-	return;
-      regno = gdbarch_pc_regnum (gdbarch);
-      break;
-    case 'D':
-      if (regname[1] < '0' || regname[1] > '7')
-	return;
-      regno = regname[1] - '0' + M68K_D0_REGNUM;
-      break;
-    case 'A':
-      if (regname[1] < '0' || regname[1] > '7')
-	return;
-      regno = regname[1] - '0' + M68K_A0_REGNUM;
-      break;
-    default:
-      return;
-    }
-
-  monitor_supply_register (regcache, regno, val);
-}
-
-/* This array of registers needs to match the indexes used by GDB.
-   The whole reason this exists is because the various ROM monitors
-   use different names than GDB does, and don't support all the
-   registers either.  So, typing "info reg sp" becomes an "A7".  */
-
-static const char *
-dbug_regname (int index)
-{
-  static char *regnames[] =
-  {
-    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
-    "SR", "PC"
-    /* no float registers */
-  };
-
-  if (index >= ARRAY_SIZE (regnames) || index < 0)
-    return NULL;
-  else
-    return regnames[index];
-
-}
-
-static struct target_ops dbug_ops;
-static struct monitor_ops dbug_cmds;
-
-static char *dbug_inits[] =
-{"\r", NULL};
-
-
-static void
-init_dbug_cmds (void)
-{
-  dbug_cmds.flags = MO_CLR_BREAK_USES_ADDR
-    | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR;
-  dbug_cmds.init = dbug_inits;	/* Init strings */
-  dbug_cmds.cont = "go\r";	/* continue command */
-  dbug_cmds.step = "trace\r";	/* single step */
-  dbug_cmds.stop = NULL;	/* interrupt command */
-  dbug_cmds.set_break = "br %x\r";	/* set a breakpoint */
-  dbug_cmds.clr_break = "br -r %x\r";	/* clear a breakpoint */
-  dbug_cmds.clr_all_break = "br -r\r";	/* clear all breakpoints */
-  dbug_cmds.fill = "bf.b %x %x %x\r";	/* fill (start end val) */
-  dbug_cmds.setmem.cmdb = "mm.b %x %x\r";	/* setmem.cmdb (addr, value) */
-  dbug_cmds.setmem.cmdw = "mm.w %x %x\r";	/* setmem.cmdw (addr, value) */
-  dbug_cmds.setmem.cmdl = "mm.l %x %x\r";	/* setmem.cmdl (addr, value) */
-  dbug_cmds.setmem.cmdll = NULL;	/* setmem.cmdll (addr, value) */
-  dbug_cmds.setmem.resp_delim = NULL;	/* setmem.resp_delim */
-  dbug_cmds.setmem.term = NULL;	/* setmem.term */
-  dbug_cmds.setmem.term_cmd = NULL;	/* setmem.term_cmd */
-  dbug_cmds.getmem.cmdb = "md.b %x %x\r";	/* getmem.cmdb (addr, addr2) */
-  dbug_cmds.getmem.cmdw = "md.w %x %x\r";	/* getmem.cmdw (addr, addr2) */
-  dbug_cmds.getmem.cmdl = "md.l %x %x\r";	/* getmem.cmdl (addr, addr2) */
-  dbug_cmds.getmem.cmdll = NULL;	/* getmem.cmdll (addr, addr2) */
-  dbug_cmds.getmem.resp_delim = ":";	/* getmem.resp_delim */
-  dbug_cmds.getmem.term = NULL;	/* getmem.term */
-  dbug_cmds.getmem.term_cmd = NULL;	/* getmem.term_cmd */
-  dbug_cmds.setreg.cmd = "rm %s %x\r";	/* setreg.cmd (name, value) */
-  dbug_cmds.setreg.resp_delim = NULL;	/* setreg.resp_delim */
-  dbug_cmds.setreg.term = NULL;	/* setreg.term */
-  dbug_cmds.setreg.term_cmd = NULL;	/* setreg.term_cmd */
-  dbug_cmds.getreg.cmd = "rd %s\r";	/* getreg.cmd (name) */
-  dbug_cmds.getreg.resp_delim = ":";	/* getreg.resp_delim */
-  dbug_cmds.getreg.term = NULL;	/* getreg.term */
-  dbug_cmds.getreg.term_cmd = NULL;	/* getreg.term_cmd */
-  dbug_cmds.dump_registers = "rd\r";	/* dump_registers */
-					/* register_pattern */
-  dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)";
-  dbug_cmds.supply_register = dbug_supply_register;
-  dbug_cmds.load = "dl\r";	/* download command */
-  dbug_cmds.loadresp = "\n";	/* load response */
-  dbug_cmds.prompt = "dBUG>";	/* monitor command prompt */
-  dbug_cmds.line_term = "\r";	/* end-of-line terminator */
-  dbug_cmds.cmd_end = NULL;	/* optional command terminator */
-  dbug_cmds.target = &dbug_ops;	/* target operations */
-  dbug_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  dbug_cmds.regnames = NULL;	/* registers names */
-  dbug_cmds.regname = dbug_regname;
-  dbug_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
-}				/* init_debug_ops */
-
-static void
-dbug_open (const char *args, int from_tty)
-{
-  monitor_open (args, &dbug_cmds, from_tty);
-}
-
-extern initialize_file_ftype _initialize_dbug_rom; /* -Wmissing-prototypes */
-
-void
-_initialize_dbug_rom (void)
-{
-  init_dbug_cmds ();
-  init_monitor_ops (&dbug_ops);
-
-  dbug_ops.to_shortname = "dbug";
-  dbug_ops.to_longname = "dBUG monitor";
-  dbug_ops.to_doc = "Debug via the dBUG monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  dbug_ops.to_open = dbug_open;
-
-  add_target (&dbug_ops);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dbxread.c ./gdb/dbxread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dbxread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dbxread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Read dbx symbol tables and convert to internal format, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -144,10 +144,6 @@ static unsigned int next_file_string_tab
 
 static int symfile_relocatable = 0;
 
-/* If this is nonzero, N_LBRAC, N_RBRAC, and N_SLINE entries are
-   relative to the function start address.  */
-
-static int block_address_function_relative = 0;
 
 /* The lowest text address we have yet encountered.  This is needed
    because in an a.out file, there is no header field which tells us
@@ -158,7 +154,7 @@ static int block_address_function_relati
 static CORE_ADDR lowest_text_address;
 
 /* Non-zero if there is any line number info in the objfile.  Prevents
-   end_psymtab from discarding an otherwise empty psymtab.  */
+   dbx_end_psymtab from discarding an otherwise empty psymtab.  */
 
 static int has_line_numbers;
 
@@ -262,9 +258,7 @@ static void dbx_read_symtab (struct part
 
 static void dbx_psymtab_to_symtab_1 (struct objfile *, struct partial_symtab *);
 
-static void read_dbx_dynamic_symtab (struct objfile *objfile);
-
-static void read_dbx_symtab (struct objfile *);
+static void read_dbx_symtab (minimal_symbol_reader &, struct objfile *);
 
 static void free_bincl_list (struct objfile *);
 
@@ -282,11 +276,12 @@ static void dbx_symfile_init (struct obj
 
 static void dbx_new_init (struct objfile *);
 
-static void dbx_symfile_read (struct objfile *, int);
+static void dbx_symfile_read (struct objfile *, symfile_add_flags);
 
 static void dbx_symfile_finish (struct objfile *);
 
-static void record_minimal_symbol (const char *, CORE_ADDR, int,
+static void record_minimal_symbol (minimal_symbol_reader &,
+				   const char *, CORE_ADDR, int,
 				   struct objfile *);
 
 static void add_new_header_file (char *, int);
@@ -319,7 +314,7 @@ void
 init_header_files (void)
 {
   n_allocated_this_object_header_files = 10;
-  this_object_header_files = (int *) xmalloc (10 * sizeof (int));
+  this_object_header_files = XNEWVEC (int, 10);
 }
 
 /* Add header file number I for this object file
@@ -405,9 +400,7 @@ add_new_header_file (char *name, int ins
   hfile->name = xstrdup (name);
   hfile->instance = instance;
   hfile->length = 10;
-  hfile->vector
-    = (struct type **) xmalloc (10 * sizeof (struct type *));
-  memset (hfile->vector, 0, 10 * sizeof (struct type *));
+  hfile->vector = XCNEWVEC (struct type *, 10);
 
   add_this_object_header_file (i);
 }
@@ -431,7 +424,8 @@ explicit_lookup_type (int real_filenum, 
 #endif
 
 static void
-record_minimal_symbol (const char *name, CORE_ADDR address, int type,
+record_minimal_symbol (minimal_symbol_reader &reader,
+		       const char *name, CORE_ADDR address, int type,
 		       struct objfile *objfile)
 {
   enum minimal_symbol_type ms_type;
@@ -510,8 +504,7 @@ record_minimal_symbol (const char *name,
       && address < lowest_text_address)
     lowest_text_address = address;
 
-  prim_record_minimal_symbol_and_info
-    (name, address, ms_type, section, objfile);
+  reader.record_with_info (name, address, ms_type, section);
 }
 
 /* Scan and build partial symbols for a symbol file.
@@ -520,7 +513,7 @@ record_minimal_symbol (const char *name,
    hung off the objfile structure.  */
 
 static void
-dbx_symfile_read (struct objfile *objfile, int symfile_flags)
+dbx_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *sym_bfd;
   int val;
@@ -534,18 +527,6 @@ dbx_symfile_read (struct objfile *objfil
 
   symfile_relocatable = bfd_get_file_flags (sym_bfd) & HAS_RELOC;
 
-  /* This is true for Solaris (and all other systems which put stabs
-     in sections, hopefully, since it would be silly to do things
-     differently from Solaris), and false for SunOS4 and other a.out
-     file formats.  */
-  block_address_function_relative =
-    ((startswith (bfd_get_target (sym_bfd), "elf"))
-     || (startswith (bfd_get_target (sym_bfd), "som"))
-     || (startswith (bfd_get_target (sym_bfd), "coff"))
-     || (startswith (bfd_get_target (sym_bfd), "pe"))
-     || (startswith (bfd_get_target (sym_bfd), "epoc-pe"))
-     || (startswith (bfd_get_target (sym_bfd), "nlm")));
-
   val = bfd_seek (sym_bfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET);
   if (val < 0)
     perror_with_name (objfile_name (objfile));
@@ -560,21 +541,16 @@ dbx_symfile_read (struct objfile *objfil
   free_pending_blocks ();
   back_to = make_cleanup (really_free_pendings, 0);
 
-  init_minimal_symbol_collection ();
-  make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   /* Read stabs data from executable file and define symbols.  */
 
-  read_dbx_symtab (objfile);
-
-  /* Add the dynamic symbols.  */
-
-  read_dbx_dynamic_symtab (objfile);
+  read_dbx_symtab (reader, objfile);
 
   /* Install any minimal symbols that have been collected as the current
      minimal symbols for this objfile.  */
 
-  install_minimal_symbols (objfile);
+  reader.install ();
 
   do_cleanups (back_to);
 }
@@ -731,7 +707,7 @@ dbx_symfile_finish (struct objfile *objf
 static void
 dbx_free_symfile_info (struct objfile *objfile, void *arg)
 {
-  struct dbx_symfile_info *dbx = arg;
+  struct dbx_symfile_info *dbx = (struct dbx_symfile_info *) arg;
 
   if (dbx->header_files != NULL)
     {
@@ -890,8 +866,8 @@ static void
 init_bincl_list (int number, struct objfile *objfile)
 {
   bincls_allocated = number;
-  next_bincl = bincl_list = (struct header_file_location *)
-    xmalloc (bincls_allocated * sizeof (struct header_file_location));
+  next_bincl = bincl_list = XNEWVEC (struct header_file_location,
+				     bincls_allocated);
 }
 
 /* Add a bincl to the list.  */
@@ -944,7 +920,7 @@ free_bincl_list (struct objfile *objfile
 static void
 do_free_bincl_list_cleanup (void *objfile)
 {
-  free_bincl_list (objfile);
+  free_bincl_list ((struct objfile *) objfile);
 }
 
 static struct cleanup *
@@ -977,144 +953,6 @@ set_namestring (struct objfile *objfile,
   return namestring;
 }
 
-/* Scan a SunOs dynamic symbol table for symbols of interest and
-   add them to the minimal symbol table.  */
-
-static void
-read_dbx_dynamic_symtab (struct objfile *objfile)
-{
-  bfd *abfd = objfile->obfd;
-  struct cleanup *back_to;
-  int counter;
-  long dynsym_size;
-  long dynsym_count;
-  asymbol **dynsyms;
-  asymbol **symptr;
-  arelent **relptr;
-  long dynrel_size;
-  long dynrel_count;
-  arelent **dynrels;
-  CORE_ADDR sym_value;
-  const char *name;
-
-  /* Check that the symbol file has dynamic symbols that we know about.
-     bfd_arch_unknown can happen if we are reading a sun3 symbol file
-     on a sun4 host (and vice versa) and bfd is not configured
-     --with-target=all.  This would trigger an assertion in bfd/sunos.c,
-     so we ignore the dynamic symbols in this case.  */
-  if (bfd_get_flavour (abfd) != bfd_target_aout_flavour
-      || (bfd_get_file_flags (abfd) & DYNAMIC) == 0
-      || bfd_get_arch (abfd) == bfd_arch_unknown)
-    return;
-
-  dynsym_size = bfd_get_dynamic_symtab_upper_bound (abfd);
-  if (dynsym_size < 0)
-    return;
-
-  dynsyms = (asymbol **) xmalloc (dynsym_size);
-  back_to = make_cleanup (xfree, dynsyms);
-
-  dynsym_count = bfd_canonicalize_dynamic_symtab (abfd, dynsyms);
-  if (dynsym_count < 0)
-    {
-      do_cleanups (back_to);
-      return;
-    }
-
-  /* Enter dynamic symbols into the minimal symbol table
-     if this is a stripped executable.  */
-  if (bfd_get_symcount (abfd) <= 0)
-    {
-      symptr = dynsyms;
-      for (counter = 0; counter < dynsym_count; counter++, symptr++)
-	{
-	  asymbol *sym = *symptr;
-	  asection *sec;
-	  int type;
-
-	  sec = bfd_get_section (sym);
-
-	  /* BFD symbols are section relative.  */
-	  sym_value = sym->value + sec->vma;
-
-	  if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
-	    {
-	      type = N_TEXT;
-	    }
-	  else if (bfd_get_section_flags (abfd, sec) & SEC_DATA)
-	    {
-	      type = N_DATA;
-	    }
-	  else if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
-	    {
-	      type = N_BSS;
-	    }
-	  else
-	    continue;
-
-	  if (sym->flags & BSF_GLOBAL)
-	    type |= N_EXT;
-
-	  record_minimal_symbol (bfd_asymbol_name (sym), sym_value,
-				 type, objfile);
-	}
-    }
-
-  /* Symbols from shared libraries have a dynamic relocation entry
-     that points to the associated slot in the procedure linkage table.
-     We make a mininal symbol table entry with type mst_solib_trampoline
-     at the address in the procedure linkage table.  */
-  dynrel_size = bfd_get_dynamic_reloc_upper_bound (abfd);
-  if (dynrel_size < 0)
-    {
-      do_cleanups (back_to);
-      return;
-    }
-
-  dynrels = (arelent **) xmalloc (dynrel_size);
-  make_cleanup (xfree, dynrels);
-
-  dynrel_count = bfd_canonicalize_dynamic_reloc (abfd, dynrels, dynsyms);
-  if (dynrel_count < 0)
-    {
-      do_cleanups (back_to);
-      return;
-    }
-
-  for (counter = 0, relptr = dynrels;
-       counter < dynrel_count;
-       counter++, relptr++)
-    {
-      arelent *rel = *relptr;
-      CORE_ADDR address = rel->address;
-
-      switch (bfd_get_arch (abfd))
-	{
-	case bfd_arch_sparc:
-	  if (rel->howto->type != RELOC_JMP_SLOT)
-	    continue;
-	  break;
-	case bfd_arch_m68k:
-	  /* `16' is the type BFD produces for a jump table relocation.  */
-	  if (rel->howto->type != 16)
-	    continue;
-
-	  /* Adjust address in the jump table to point to
-	     the start of the bsr instruction.  */
-	  address -= 2;
-	  break;
-	default:
-	  continue;
-	}
-
-      name = bfd_asymbol_name (*rel->sym_ptr_ptr);
-      prim_record_minimal_symbol (name, address, mst_solib_trampoline,
-				  objfile);
-    }
-
-  do_cleanups (back_to);
-}
-
 static CORE_ADDR
 find_stab_function_addr (char *namestring, const char *filename,
 			 struct objfile *objfile)
@@ -1127,7 +965,7 @@ find_stab_function_addr (char *namestrin
   if (p == NULL)
     p = namestring;
   n = p - namestring;
-  p = alloca (n + 2);
+  p = (char *) alloca (n + 2);
   strncpy (p, namestring, n);
   p[n] = 0;
 
@@ -1172,7 +1010,7 @@ function_outside_compilation_unit_compla
    debugging information is available.  */
 
 static void
-read_dbx_symtab (struct objfile *objfile)
+read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct external_nlist *bufp = 0;	/* =0 avoids gcc -Wall glitch.  */
@@ -1328,7 +1166,7 @@ read_dbx_symtab (struct objfile *objfile
 	  record_it:
 	  namestring = set_namestring (objfile, &nlist);
 
-	  record_minimal_symbol (namestring, nlist.n_value,
+	  record_minimal_symbol (reader, namestring, nlist.n_value,
 				 nlist.n_type, objfile);	/* Always */
 	  continue;
 
@@ -1358,12 +1196,12 @@ read_dbx_symtab (struct objfile *objfile
 		     which are not the address.  */
 		  && nlist.n_value >= pst->textlow)
 		{
-		  end_psymtab (objfile, pst, psymtab_include_list,
-			       includes_used, symnum * symbol_size,
-			       nlist.n_value > pst->texthigh
-			       ? nlist.n_value : pst->texthigh,
-			       dependency_list, dependencies_used,
-			       textlow_not_set);
+		  dbx_end_psymtab (objfile, pst, psymtab_include_list,
+				   includes_used, symnum * symbol_size,
+				   nlist.n_value > pst->texthigh
+				   ? nlist.n_value : pst->texthigh,
+				   dependency_list, dependencies_used,
+				   textlow_not_set);
 		  pst = (struct partial_symtab *) 0;
 		  includes_used = 0;
 		  dependencies_used = 0;
@@ -1454,7 +1292,7 @@ read_dbx_symtab (struct objfile *objfile
 	    prev_textlow_not_set = textlow_not_set;
 
 	    /* A zero value is probably an indication for the SunPRO 3.0
-	       compiler.  end_psymtab explicitly tests for zero, so
+	       compiler.  dbx_end_psymtab explicitly tests for zero, so
 	       don't relocate it.  */
 
 	    if (nlist.n_value == 0
@@ -1474,11 +1312,12 @@ read_dbx_symtab (struct objfile *objfile
 
 		if (pst)
 		  {
-		    end_psymtab (objfile, pst, psymtab_include_list,
-				 includes_used, symnum * symbol_size,
-				 valu > pst->texthigh ? valu : pst->texthigh,
-				 dependency_list, dependencies_used,
-				 prev_textlow_not_set);
+		    dbx_end_psymtab (objfile, pst, psymtab_include_list,
+				     includes_used, symnum * symbol_size,
+				     valu > pst->texthigh
+				     ? valu : pst->texthigh,
+				     dependency_list, dependencies_used,
+				     prev_textlow_not_set);
 		    pst = (struct partial_symtab *) 0;
 		    includes_used = 0;
 		    dependencies_used = 0;
@@ -1664,20 +1503,16 @@ read_dbx_symtab (struct objfile *objfile
 	  sym_name = NULL;	/* pacify "gcc -Werror" */
  	  if (psymtab_language == language_cplus)
  	    {
- 	      char *new_name, *name = xmalloc (p - namestring + 1);
- 	      memcpy (name, namestring, p - namestring);
-
- 	      name[p - namestring] = '\0';
- 	      new_name = cp_canonicalize_string (name);
- 	      if (new_name != NULL)
- 		{
- 		  sym_len = strlen (new_name);
- 		  sym_name = obstack_copy0 (&objfile->objfile_obstack,
-					    new_name, sym_len);
- 		  xfree (new_name);
- 		}
-              xfree (name);
- 	    }
+	      std::string name (namestring, p - namestring);
+	      std::string new_name = cp_canonicalize_string (name.c_str ());
+	      if (!new_name.empty ())
+		{
+		  sym_len = new_name.length ();
+		  sym_name = (char *) obstack_copy0 (&objfile->objfile_obstack,
+						     new_name.c_str (),
+						     sym_len);
+		}
+	    }
 
  	  if (sym_len == 0)
  	    {
@@ -1704,8 +1539,7 @@ read_dbx_symtab (struct objfile *objfile
 	      add_psymbol_to_list (sym_name, sym_len, 1,
 				   VAR_DOMAIN, LOC_STATIC,
 				   &objfile->static_psymbols,
-				   0, nlist.n_value,
-				   psymtab_language, objfile);
+				   nlist.n_value, psymtab_language, objfile);
 	      continue;
 
 	    case 'G':
@@ -1716,8 +1550,7 @@ read_dbx_symtab (struct objfile *objfile
 	      add_psymbol_to_list (sym_name, sym_len, 1,
 				   VAR_DOMAIN, LOC_STATIC,
 				   &objfile->global_psymbols,
-				   0, nlist.n_value,
-				   psymtab_language, objfile);
+				   nlist.n_value, psymtab_language, objfile);
 	      continue;
 
 	    case 'T':
@@ -1734,16 +1567,14 @@ read_dbx_symtab (struct objfile *objfile
 		  add_psymbol_to_list (sym_name, sym_len, 1,
 				       STRUCT_DOMAIN, LOC_TYPEDEF,
 				       &objfile->static_psymbols,
-				       nlist.n_value, 0,
-				       psymtab_language, objfile);
+				       0, psymtab_language, objfile);
 		  if (p[2] == 't')
 		    {
 		      /* Also a typedef with the same name.  */
 		      add_psymbol_to_list (sym_name, sym_len, 1,
 					   VAR_DOMAIN, LOC_TYPEDEF,
 					   &objfile->static_psymbols,
-					   nlist.n_value, 0,
-					   psymtab_language, objfile);
+					   0, psymtab_language, objfile);
 		      p += 1;
 		    }
 		}
@@ -1755,8 +1586,7 @@ read_dbx_symtab (struct objfile *objfile
 		  add_psymbol_to_list (sym_name, sym_len, 1,
 				       VAR_DOMAIN, LOC_TYPEDEF,
 				       &objfile->static_psymbols,
-				       nlist.n_value, 0,
-				       psymtab_language, objfile);
+				       0, psymtab_language, objfile);
 		}
 	    check_enum:
 	      /* If this is an enumerated type, we need to
@@ -1817,7 +1647,7 @@ read_dbx_symtab (struct objfile *objfile
 		      add_psymbol_to_list (p, q - p, 1,
 					   VAR_DOMAIN, LOC_CONST,
 					   &objfile->static_psymbols, 0,
-					   0, psymtab_language, objfile);
+					   psymtab_language, objfile);
 		      /* Point past the name.  */
 		      p = q;
 		      /* Skip over the value.  */
@@ -1834,15 +1664,15 @@ read_dbx_symtab (struct objfile *objfile
 	      /* Constant, e.g. from "const" in Pascal.  */
 	      add_psymbol_to_list (sym_name, sym_len, 1,
 				   VAR_DOMAIN, LOC_CONST,
-				   &objfile->static_psymbols, nlist.n_value,
-				   0, psymtab_language, objfile);
+				   &objfile->static_psymbols, 0,
+				   psymtab_language, objfile);
 	      continue;
 
 	    case 'f':
 	      if (! pst)
 		{
 		  int name_len = p - namestring;
-		  char *name = xmalloc (name_len + 1);
+		  char *name = (char *) xmalloc (name_len + 1);
 
 		  memcpy (name, namestring, name_len);
 		  name[name_len] = '\0';
@@ -1901,8 +1731,7 @@ read_dbx_symtab (struct objfile *objfile
 	      add_psymbol_to_list (sym_name, sym_len, 1,
 				   VAR_DOMAIN, LOC_BLOCK,
 				   &objfile->static_psymbols,
-				   0, nlist.n_value,
-				   psymtab_language, objfile);
+				   nlist.n_value, psymtab_language, objfile);
 	      continue;
 
 	      /* Global functions were ignored here, but now they
@@ -1912,7 +1741,7 @@ read_dbx_symtab (struct objfile *objfile
 	      if (! pst)
 		{
 		  int name_len = p - namestring;
-		  char *name = xmalloc (name_len + 1);
+		  char *name = (char *) xmalloc (name_len + 1);
 
 		  memcpy (name, namestring, name_len);
 		  name[name_len] = '\0';
@@ -1971,8 +1800,7 @@ read_dbx_symtab (struct objfile *objfile
 	      add_psymbol_to_list (sym_name, sym_len, 1,
 				   VAR_DOMAIN, LOC_BLOCK,
 				   &objfile->global_psymbols,
-				   0, nlist.n_value,
-				   psymtab_language, objfile);
+				   nlist.n_value, psymtab_language, objfile);
 	      continue;
 
 	      /* Two things show up here (hopefully); static symbols of
@@ -2080,15 +1908,16 @@ read_dbx_symtab (struct objfile *objfile
 
 	case N_ENDM:
 	  /* Solaris 2 end of module, finish current partial symbol table.
-	     end_psymtab will set pst->texthigh to the proper value, which
+	     dbx_end_psymtab will set pst->texthigh to the proper value, which
 	     is necessary if a module compiled without debugging info
 	     follows this module.  */
 	  if (pst && gdbarch_sofun_address_maybe_missing (gdbarch))
 	    {
-	      end_psymtab (objfile, pst, psymtab_include_list, includes_used,
-			   symnum * symbol_size,
-			   (CORE_ADDR) 0, dependency_list,
-			   dependencies_used, textlow_not_set);
+	      dbx_end_psymtab (objfile, pst,
+			       psymtab_include_list, includes_used,
+			       symnum * symbol_size,
+			       (CORE_ADDR) 0, dependency_list,
+			       dependencies_used, textlow_not_set);
 	      pst = (struct partial_symtab *) 0;
 	      includes_used = 0;
 	      dependencies_used = 0;
@@ -2150,10 +1979,10 @@ read_dbx_symtab (struct objfile *objfile
 	 : lowest_text_address)
 	+ text_size;
 
-      end_psymtab (objfile, pst, psymtab_include_list, includes_used,
-		   symnum * symbol_size,
-		   text_end > pst->texthigh ? text_end : pst->texthigh,
-		   dependency_list, dependencies_used, textlow_not_set);
+      dbx_end_psymtab (objfile, pst, psymtab_include_list, includes_used,
+		       symnum * symbol_size,
+		       text_end > pst->texthigh ? text_end : pst->texthigh,
+		       dependency_list, dependencies_used, textlow_not_set);
     }
 
   do_cleanups (back_to);
@@ -2175,8 +2004,8 @@ start_psymtab (struct objfile *objfile, 
     start_psymtab_common (objfile, filename, textlow,
 			  global_syms, static_syms);
 
-  result->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
-					       sizeof (struct symloc));
+  result->read_symtab_private =
+    XOBNEW (&objfile->objfile_obstack, struct symloc);
   LDSYMOFF (result) = ldsymoff;
   result->read_symtab = dbx_read_symtab;
   SYMBOL_SIZE (result) = symbol_size;
@@ -2196,11 +2025,12 @@ start_psymtab (struct objfile *objfile, 
    FIXME:  List variables and peculiarities of same.  */
 
 struct partial_symtab *
-end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
-	     const char **include_list, int num_includes,
-	     int capping_symbol_offset, CORE_ADDR capping_text,
-	     struct partial_symtab **dependency_list, int number_dependencies,
-	     int textlow_not_set)
+dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
+		 const char **include_list, int num_includes,
+		 int capping_symbol_offset, CORE_ADDR capping_text,
+		 struct partial_symtab **dependency_list,
+		 int number_dependencies,
+		 int textlow_not_set)
 {
   int i;
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -2235,7 +2065,7 @@ end_psymtab (struct objfile *objfile, st
       if (p == NULL)
 	p = last_function_name;
       n = p - last_function_name;
-      p = alloca (n + 2);
+      p = (char *) alloca (n + 2);
       strncpy (p, last_function_name, n);
       p[n] = 0;
 
@@ -2287,19 +2117,14 @@ end_psymtab (struct objfile *objfile, st
 
   /* End of kludge for patching Solaris textlow and texthigh.  */
 
-  pst->n_global_syms =
-    objfile->global_psymbols.next - (objfile->global_psymbols.list
-				     + pst->globals_offset);
-  pst->n_static_syms =
-    objfile->static_psymbols.next - (objfile->static_psymbols.list
-				     + pst->statics_offset);
+  end_psymtab_common (objfile, pst);
 
   pst->number_of_dependencies = number_dependencies;
   if (number_dependencies)
     {
-      pst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->objfile_obstack,
-		       number_dependencies * sizeof (struct partial_symtab *));
+      pst->dependencies = XOBNEWVEC (&objfile->objfile_obstack,
+				     struct partial_symtab *,
+				     number_dependencies);
       memcpy (pst->dependencies, dependency_list,
 	      number_dependencies * sizeof (struct partial_symtab *));
     }
@@ -2312,7 +2137,7 @@ end_psymtab (struct objfile *objfile, st
 	allocate_psymtab (include_list[i], objfile);
 
       subpst->read_symtab_private =
-	obstack_alloc (&objfile->objfile_obstack, sizeof (struct symloc));
+	XOBNEW (&objfile->objfile_obstack, struct symloc);
       LDSYMOFF (subpst) =
 	LDSYMLEN (subpst) =
 	subpst->textlow =
@@ -2320,9 +2145,8 @@ end_psymtab (struct objfile *objfile, st
 
       /* We could save slight bits of space by only making one of these,
          shared by the entire set of include files.  FIXME-someday.  */
-      subpst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->objfile_obstack,
-		       sizeof (struct partial_symtab *));
+      subpst->dependencies =
+	XOBNEW (&objfile->objfile_obstack, struct partial_symtab *);
       subpst->dependencies[0] = pst;
       subpst->number_of_dependencies = 1;
 
@@ -2336,8 +2160,6 @@ end_psymtab (struct objfile *objfile, st
       subpst->read_symtab = pst->read_symtab;
     }
 
-  sort_pst_symbols (objfile, pst);
-
   if (num_includes == 0
       && number_dependencies == 0
       && pst->n_global_syms == 0
@@ -2355,7 +2177,7 @@ end_psymtab (struct objfile *objfile, st
       discard_psymtab (objfile, pst);
 
       /* Indicate that psymtab was thrown away.  */
-      pst = (struct partial_symtab *) NULL;
+      pst = NULL;
     }
   return pst;
 }
@@ -2417,8 +2239,6 @@ dbx_psymtab_to_symtab_1 (struct objfile 
 static void
 dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
 {
-  bfd *sym_bfd;
-
   if (self->readin)
     {
       fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in.  "
@@ -2439,8 +2259,6 @@ dbx_read_symtab (struct partial_symtab *
 	  gdb_flush (gdb_stdout);
 	}
 
-      sym_bfd = objfile->obfd;
-
       next_symbol_text_func = dbx_next_symbol_text;
 
       back_to = make_cleanup (null_cleanup, NULL);
@@ -2660,7 +2478,7 @@ cp_set_block_scope (const struct symbol 
       unsigned int prefix_len = cp_entire_prefix_len (name);
 
       block_set_scope (block,
-		       obstack_copy0 (obstack, name, prefix_len),
+		       (const char *) obstack_copy0 (obstack, name, prefix_len),
 		       obstack);
     }
 }
@@ -2709,18 +2527,6 @@ process_one_symbol (int type, int desc, 
      source file.  Used to detect the SunPRO solaris compiler.  */
   static int n_opt_found;
 
-  /* The stab type used for the definition of the last function.
-     N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers.  */
-  static int function_stab_type = 0;
-
-  if (!block_address_function_relative)
-    {
-      /* N_LBRAC, N_RBRAC and N_SLINE entries are not relative to the
-	 function start address, so just use the text offset.  */
-      function_start_offset =
-	ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-    }
-
   /* Something is wrong if we see real data before seeing a source
      file name.  */
 
@@ -2767,7 +2573,7 @@ process_one_symbol (int type, int desc, 
 
 	  /* Make a block for the local symbols within.  */
 	  block = finish_block (newobj->name, &local_symbols,
-				newobj->old_blocks,
+				newobj->old_blocks, NULL,
 				newobj->start_addr, newobj->start_addr + valu);
 
 	  /* For C++, set the block's scope.  */
@@ -2776,8 +2582,7 @@ process_one_symbol (int type, int desc, 
 
 	  /* May be switching to an assembler file which may not be using
 	     block relative stabs, so reset the offset.  */
-	  if (block_address_function_relative)
-	    function_start_offset = 0;
+	  function_start_offset = 0;
 
 	  break;
 	}
@@ -2799,13 +2604,7 @@ process_one_symbol (int type, int desc, 
       if (n_opt_found && desc == 1)
 	break;
 
-      if (block_address_function_relative)
-	/* Relocate for Sun ELF acc fn-relative syms.  */
-	valu += function_start_offset;
-      else
-	/* On most machines, the block addresses are relative to the
-	   N_SO, the linker did not relocate them (sigh).  */
-	valu += last_source_start_addr;
+      valu += function_start_offset;
 
       push_context (desc, valu);
       break;
@@ -2818,13 +2617,7 @@ process_one_symbol (int type, int desc, 
       if (n_opt_found && desc == 1)
 	break;
 
-      if (block_address_function_relative)
-	/* Relocate for Sun ELF acc fn-relative syms.  */
-	valu += function_start_offset;
-      else
-	/* On most machines, the block addresses are relative to the
-	   N_SO, the linker did not relocate them (sigh).  */
-	valu += last_source_start_addr;
+      valu += function_start_offset;
 
       if (context_stack_depth <= 0)
 	{
@@ -2868,7 +2661,7 @@ process_one_symbol (int type, int desc, 
 		  newobj->start_addr = valu;
 		}
 	      /* Make a block for the local symbols within.  */
-	      finish_block (0, &local_symbols, newobj->old_blocks,
+	      finish_block (0, &local_symbols, newobj->old_blocks, NULL,
 			    newobj->start_addr, valu);
 	    }
 	}
@@ -2919,8 +2712,7 @@ process_one_symbol (int type, int desc, 
       if (*name == '\000')
 	break;
 
-      if (block_address_function_relative)
-	function_start_offset = 0;
+      function_start_offset = 0;
 
       start_stabs ();
       start_symtab (objfile, name, NULL, valu);
@@ -3117,8 +2909,6 @@ process_one_symbol (int type, int desc, 
 	    {
 	    case 'f':
 	    case 'F':
-	      function_stab_type = type;
-
 	      /* Deal with the SunPRO 3.0 compiler which omits the
 	         address from N_FUN symbols.  */
 	      if (type == N_FUN
@@ -3140,14 +2930,8 @@ process_one_symbol (int type, int desc, 
 		    valu = minsym_valu;
 		}
 
-	      if (block_address_function_relative)
-		/* For Solaris 2 compilers, the block addresses and
-		   N_SLINE's are relative to the start of the
-		   function.  On normal systems, and when using GCC on
-		   Solaris 2, these addresses are just absolute, or
-		   relative to the N_SO, depending on
-		   BLOCK_ADDRESS_ABSOLUTE.  */
-		function_start_offset = valu;
+	      /* These addresses are absolute.  */
+	      function_start_offset = valu;
 
 	      within_function = 1;
 
@@ -3166,8 +2950,8 @@ process_one_symbol (int type, int desc, 
 		  newobj = pop_context ();
 		  /* Make a block for the local symbols within.  */
 		  block = finish_block (newobj->name, &local_symbols,
-					newobj->old_blocks, newobj->start_addr,
-					valu);
+					newobj->old_blocks, NULL,
+					newobj->start_addr, valu);
 
 		  /* For C++, set the block's scope.  */
 		  if (SYMBOL_LANGUAGE (newobj->name) == language_cplus)
@@ -3287,13 +3071,8 @@ coffstab_build_psymtabs (struct objfile 
   int val;
   bfd *sym_bfd = objfile->obfd;
   char *name = bfd_get_filename (sym_bfd);
-  struct dbx_symfile_info *info;
   unsigned int stabsize;
 
-  /* There is already a dbx_symfile_info allocated by our caller.
-     It might even contain some info from the coff symtab to help us.  */
-  info = DBX_SYMFILE_INFO (objfile);
-
   DBX_TEXT_ADDR (objfile) = textaddr;
   DBX_TEXT_SIZE (objfile) = textsize;
 
@@ -3376,13 +3155,8 @@ elfstab_build_psymtabs (struct objfile *
   int val;
   bfd *sym_bfd = objfile->obfd;
   char *name = bfd_get_filename (sym_bfd);
-  struct dbx_symfile_info *info;
   struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
 
-  /* There is already a dbx_symfile_info allocated by our caller.
-     It might even contain some info from the ELF symtab to help us.  */
-  info = DBX_SYMFILE_INFO (objfile);
-
   /* Find the first and last text address.  dbx_symfile_read seems to
      want this.  */
   find_text_range (sym_bfd, objfile);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dcache.c ./gdb/dcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dcache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Caching code for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -370,8 +370,9 @@ dcache_alloc (DCACHE *dcache, CORE_ADDR 
       if (db)
 	remove_block (&dcache->freelist, db);
       else
-	db = xmalloc (offsetof (struct dcache_block, data) +
-		      dcache->line_size);
+	db = ((struct dcache_block *)
+	      xmalloc (offsetof (struct dcache_block, data)
+		       + dcache->line_size));
 
       dcache->size++;
     }
@@ -444,9 +445,7 @@ dcache_splay_tree_compare (splay_tree_ke
 DCACHE *
 dcache_init (void)
 {
-  DCACHE *dcache;
-
-  dcache = (DCACHE *) xmalloc (sizeof (*dcache));
+  DCACHE *dcache = XNEW (DCACHE);
 
   dcache->tree = splay_tree_new (dcache_splay_tree_compare,
 				 NULL,
@@ -498,9 +497,8 @@ dcache_read_memory_partial (struct targe
     {
       /* Even though reading the whole line failed, we may be able to
 	 read a piece starting where the caller wanted.  */
-      return ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
-				   myaddr, NULL, memaddr, len,
-				   xfered_len);
+      return raw_memory_xfer_partial (ops, myaddr, NULL, memaddr, len,
+				      xfered_len);
     }
   else
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dcache.h ./gdb/dcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Declarations for caching.  Typically used by remote back ends for
    caching remote memory.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/debug.c ./gdb/debug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/debug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/debug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Debug printing functions.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/defs.h ./gdb/defs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/defs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/defs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
 		      for now.  */
 /* Basic, host-specific, and target-specific definitions for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,6 +53,7 @@
 #include "ui-file.h"
 
 #include "host-defs.h"
+#include "common/enum-flags.h"
 
 /* Scope types enumerator.  List the types of scopes the compiler will
    accept.  */
@@ -102,13 +103,6 @@ enum compile_i_scope_types
 
 #include "hashtab.h"
 
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
 /* * Enable dbx commands if set.  */
 extern int dbx_commands;
 
@@ -125,67 +119,112 @@ extern char *python_libdir;
 /* * Search path for separate debug files.  */
 extern char *debug_file_directory;
 
-/* GDB has two methods for handling SIGINT.  When immediate_quit is
-   nonzero, a SIGINT results in an immediate longjmp out of the signal
-   handler.  Otherwise, SIGINT simply sets a flag; code that might
-   take a long time, and which ought to be interruptible, checks this
-   flag using the QUIT macro.
+/* GDB's SIGINT handler basically sets a flag; code that might take a
+   long time before it gets back to the event loop, and which ought to
+   be interruptible, checks this flag using the QUIT macro, which, if
+   GDB has the terminal, throws a quit exception.
+
+   In addition to setting a flag, the SIGINT handler also marks a
+   select/poll-able file descriptor as read-ready.  That is used by
+   interruptible_select in order to support interrupting blocking I/O
+   in a race-free manner.
 
    These functions use the extension_language_ops API to allow extension
    language(s) and GDB SIGINT handling to coexist seamlessly.  */
 
-/* * Clear the quit flag.  */
-extern void clear_quit_flag (void);
 /* * Evaluate to non-zero if the quit flag is set, zero otherwise.  This
    will clear the quit flag as a side effect.  */
 extern int check_quit_flag (void);
 /* * Set the quit flag.  */
 extern void set_quit_flag (void);
 
+/* The current quit handler (and its type).  This is called from the
+   QUIT macro.  See default_quit_handler below for default behavior.
+   Parts of GDB temporarily override this to e.g., completely suppress
+   Ctrl-C because it would not be safe to throw.  E.g., normally, you
+   wouldn't want to quit between a RSP command and its response, as
+   that would break the communication with the target, but you may
+   still want to intercept the Ctrl-C and offer to disconnect if the
+   user presses Ctrl-C multiple times while the target is stuck
+   waiting for the wedged remote stub.  */
+typedef void (quit_handler_ftype) (void);
+extern quit_handler_ftype *quit_handler;
+
+/* Override the current quit handler.  Sets NEW_QUIT_HANDLER as
+   current quit handler, and installs a cleanup that when run restores
+   the previous quit handler.  */
+struct cleanup *
+  make_cleanup_override_quit_handler (quit_handler_ftype *new_quit_handler);
+
+/* The default quit handler.  Checks whether Ctrl-C was pressed, and
+   if so:
+
+     - If GDB owns the terminal, throws a quit exception.
+
+     - If GDB does not own the terminal, forwards the Ctrl-C to the
+       target.
+*/
+extern void default_quit_handler (void);
+
 /* Flag that function quit should call quit_force.  */
 extern volatile int sync_quit_force_run;
 
-extern int immediate_quit;
-
 extern void quit (void);
 
-/* FIXME: cagney/2000-03-13: It has been suggested that the peformance
-   benefits of having a ``QUIT'' macro rather than a function are
-   marginal.  If the overhead of a QUIT function call is proving
-   significant then its calling frequency should probably be reduced
-   [kingdon].  A profile analyzing the current situtation is
-   needed.  */
-
-#define QUIT { \
-  if (check_quit_flag () || sync_quit_force_run) quit (); \
-  if (deprecated_interactive_hook) deprecated_interactive_hook (); \
-}
+/* Helper for the QUIT macro.  */
+
+extern void maybe_quit (void);
+
+/* Check whether a Ctrl-C was typed, and if so, call the current quit
+   handler.  */
+#define QUIT maybe_quit ()
+
+/* Set the serial event associated with the quit flag.  */
+extern void quit_serial_event_set (void);
+
+/* Clear the serial event associated with the quit flag.  */
+extern void quit_serial_event_clear (void);
 
 /* * Languages represented in the symbol table and elsewhere.
    This should probably be in language.h, but since enum's can't
    be forward declared to satisfy opaque references before their
-   actual definition, needs to be here.  */
+   actual definition, needs to be here.
+
+   The constants here are in priority order.  In particular,
+   demangling is attempted according to this order.
+
+   Note that there's ambiguity between the mangling schemes of some of
+   these languages, so some symbols could be successfully demangled by
+   several languages.  For that reason, the constants here are sorted
+   in the order we'll attempt demangling them.  For example: Rust uses
+   C++ mangling, so must come after C++; Ada must come last (see
+   ada_sniff_from_mangled_name).  */
 
 enum language
   {
     language_unknown,		/* Language not known */
     language_auto,		/* Placeholder for automatic setting */
     language_c,			/* C */
+    language_objc,		/* Objective-C */
     language_cplus,		/* C++ */
     language_d,			/* D */
     language_go,		/* Go */
-    language_objc,		/* Objective-C */
-    language_java,		/* Java */
     language_fortran,		/* Fortran */
     language_m2,		/* Modula-2 */
     language_asm,		/* Assembly language */
     language_pascal,		/* Pascal */
-    language_ada,		/* Ada */
     language_opencl,		/* OpenCL */
+    language_rust,		/* Rust */
     language_minimal,		/* All other languages, minimal support only */
+    language_ada,		/* Ada */
     nr_languages
   };
 
+/* The number of bits needed to represent all languages, with enough
+   padding to allow for reasonable growth.  */
+#define LANGUAGE_BITS 5
+gdb_static_assert (nr_languages <= (1 << LANGUAGE_BITS));
+
 enum precision_type
   {
     single_precision,
@@ -264,33 +303,19 @@ extern void symbol_file_command (char *,
 /* * Remote targets may wish to use this as their load function.  */
 extern void generic_load (const char *name, int from_tty);
 
-/* * Report on STREAM the performance of memory transfer operation,
-   such as 'load'.
-   @param DATA_COUNT is the number of bytes transferred.
-   @param WRITE_COUNT is the number of separate write operations, or 0,
-   if that information is not available.
-   @param START_TIME is the time at which an operation was started.
-   @param END_TIME is the time at which an operation ended.  */
-struct timeval;
-extern void print_transfer_performance (struct ui_file *stream,
-					unsigned long data_count,
-					unsigned long write_count,
-					const struct timeval *start_time,
-					const struct timeval *end_time);
-
 /* From top.c */
 
 typedef void initialize_file_ftype (void);
 
-extern char *gdb_readline (const char *);
-
 extern char *gdb_readline_wrapper (const char *);
 
 extern char *command_line_input (const char *, int, char *);
 
 extern void print_prompt (void);
 
-extern int input_from_terminal_p (void);
+struct ui;
+
+extern int input_interactive_p (struct ui *);
 
 extern int info_verbose;
 
@@ -549,16 +574,11 @@ enum gdb_osabi
   GDB_OSABI_HURD,
   GDB_OSABI_SOLARIS,
   GDB_OSABI_LINUX,
-  GDB_OSABI_FREEBSD_AOUT,
-  GDB_OSABI_FREEBSD_ELF,
-  GDB_OSABI_NETBSD_AOUT,
-  GDB_OSABI_NETBSD_ELF,
-  GDB_OSABI_OPENBSD_ELF,
+  GDB_OSABI_FREEBSD,
+  GDB_OSABI_NETBSD,
+  GDB_OSABI_OPENBSD,
   GDB_OSABI_WINCE,
   GDB_OSABI_GO32,
-  GDB_OSABI_IRIX,
-  GDB_OSABI_HPUX_ELF,
-  GDB_OSABI_HPUX_SOM,
   GDB_OSABI_QNXNTO,
   GDB_OSABI_CYGWIN,
   GDB_OSABI_AIX,
@@ -573,15 +593,24 @@ enum gdb_osabi
   GDB_OSABI_INVALID		/* keep this last */
 };
 
-/* Global functions from other, non-gdb GNU thingies.
-   Libiberty thingies are no longer declared here.  We include libiberty.h
-   above, instead.  */
+/* Enumerate the requirements a symbol has in order to be evaluated.
+   These are listed in order of "strength" -- a later entry subsumes
+   earlier ones.  This fine-grained distinction is important because
+   it allows for the evaluation of a TLS symbol during unwinding --
+   when unwinding one has access to registers, but not the frame
+   itself, because that is being constructed.  */
+
+enum symbol_needs_kind
+{
+  /* No special requirements -- just memory.  */
+  SYMBOL_NEEDS_NONE,
 
-/* From other system libraries */
+  /* The symbol needs registers.  */
+  SYMBOL_NEEDS_REGISTERS,
 
-#ifndef atof
-extern double atof (const char *);	/* X3.159-1989  4.10.1.1 */
-#endif
+  /* The symbol needs a frame.  */
+  SYMBOL_NEEDS_FRAME
+};
 
 /* Dynamic target-system-dependent parameters for GDB.  */
 #include "gdbarch.h"
@@ -619,6 +648,10 @@ extern void store_typed_address (gdb_byt
 
 extern int watchdog;
 
+/* From dwarf2read.c */
+
+ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *);
+
 /* Hooks for alternate command interfaces.  */
 
 /* * The name of the interpreter if specified on the command line.  */
@@ -649,7 +682,6 @@ extern void (*deprecated_readline_begin_
      ATTRIBUTE_FPTR_PRINTF_1;
 extern char *(*deprecated_readline_hook) (const char *);
 extern void (*deprecated_readline_end_hook) (void);
-extern void (*deprecated_register_changed_hook) (int regno);
 extern void (*deprecated_context_hook) (int);
 extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
 					      struct target_waitstatus *status,
@@ -686,6 +718,21 @@ enum block_enum
   FIRST_LOCAL_BLOCK = 2
 };
 
+/* User selection used in observer.h and multiple print functions.  */
+
+enum user_selected_what_flag
+  {
+    /* Inferior selected.  */
+    USER_SELECTED_INFERIOR = 1 << 1,
+
+    /* Thread selected.  */
+    USER_SELECTED_THREAD = 1 << 2,
+
+    /* Frame selected.  */
+    USER_SELECTED_FRAME = 1 << 3
+  };
+DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what);
+
 #include "utils.h"
 
 #endif /* #ifndef DEFS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/demangle.c ./gdb/demangle.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/demangle.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/demangle.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Basic C++ demangling support for GDB.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -240,7 +240,7 @@ _initialize_demangler (void)
        libiberty_demanglers[ndems].demangling_style != unknown_demangling; 
        ndems++)
     ;
-  demangling_style_names = xcalloc (ndems + 1, sizeof (char *));
+  demangling_style_names = XCNEWVEC (const char *, ndems + 1);
   for (i = 0;
        libiberty_demanglers[i].demangling_style != unknown_demangling; 
        i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-exp.c ./gdb/d-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/d-exp.c	2017-03-06 01:53:00.000000000 +0000
@@ -88,65 +88,10 @@
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_d_type(ps) builtin_d_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth d_maxdepth
-#define	yyparse	d_parse_internal
-#define	yylex	d_lex
-#define	yyerror	d_error
-#define	yylval	d_lval
-#define	yychar	d_char
-#define	yydebug	d_debug
-#define	yypact	d_pact
-#define	yyr1	d_r1
-#define	yyr2	d_r2
-#define	yydef	d_def
-#define	yychk	d_chk
-#define	yypgo	d_pgo
-#define	yyact	d_act
-#define	yyexca	d_exca
-#define	yyerrflag d_errflag
-#define	yynerrs	d_nerrs
-#define	yyps	d_ps
-#define	yypv	d_pv
-#define	yys	d_s
-#define	yy_yys	d_yys
-#define	yystate	d_state
-#define	yytmp	d_tmp
-#define	yyv	d_v
-#define	yy_yyv	d_yyv
-#define	yyval	d_val
-#define	yylloc	d_lloc
-#define	yyreds	d_reds	/* With YYDEBUG defined */
-#define	yytoks	d_toks	/* With YYDEBUG defined */
-#define	yyname	d_name	/* With YYDEBUG defined */
-#define	yyrule	d_rule	/* With YYDEBUG defined */
-#define	yylhs	d_yylhs
-#define	yylen	d_yylen
-#define	yydefre	d_yydefred
-#define	yydgoto	d_yydgoto
-#define	yysindex d_yysindex
-#define	yyrindex d_yyrindex
-#define	yygindex d_yygindex
-#define	yytable	d_yytable
-#define	yycheck	d_yycheck
-#define	yyss	d_yyss
-#define	yysslim	d_yysslim
-#define	yyssp	d_yyssp
-#define	yystacksize d_yystacksize
-#define	yyvs	d_yyvs
-#define	yyvsp	d_yyvsp
-
-#ifndef YYDEBUG
-#define YYDEBUG 1	/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX d_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -159,10 +104,12 @@ static int yylex (void);
 
 void yyerror (char *);
 
+static int type_aggregate_p (struct type *);
+
 
 
 /* Line 189 of yacc.c  */
-#line 166 "d-exp.c"
+#line 113 "d-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -190,100 +137,102 @@ void yyerror (char *);
       know about them.  */
    enum yytokentype {
      IDENTIFIER = 258,
-     TYPENAME = 259,
-     COMPLETE = 260,
-     NAME_OR_INT = 261,
-     INTEGER_LITERAL = 262,
-     FLOAT_LITERAL = 263,
-     CHARACTER_LITERAL = 264,
-     STRING_LITERAL = 265,
-     ENTRY = 266,
-     ERROR = 267,
-     TRUE_KEYWORD = 268,
-     FALSE_KEYWORD = 269,
-     NULL_KEYWORD = 270,
-     SUPER_KEYWORD = 271,
-     CAST_KEYWORD = 272,
-     SIZEOF_KEYWORD = 273,
-     TYPEOF_KEYWORD = 274,
-     TYPEID_KEYWORD = 275,
-     INIT_KEYWORD = 276,
-     IMMUTABLE_KEYWORD = 277,
-     CONST_KEYWORD = 278,
-     SHARED_KEYWORD = 279,
-     STRUCT_KEYWORD = 280,
-     UNION_KEYWORD = 281,
-     CLASS_KEYWORD = 282,
-     INTERFACE_KEYWORD = 283,
-     ENUM_KEYWORD = 284,
-     TEMPLATE_KEYWORD = 285,
-     DELEGATE_KEYWORD = 286,
-     FUNCTION_KEYWORD = 287,
-     DOLLAR_VARIABLE = 288,
-     ASSIGN_MODIFY = 289,
-     OROR = 290,
-     ANDAND = 291,
-     GEQ = 292,
-     LEQ = 293,
-     NOTEQUAL = 294,
-     EQUAL = 295,
-     RSH = 296,
-     LSH = 297,
-     HATHAT = 298,
-     NOTIDENTITY = 299,
-     IDENTITY = 300,
-     DECREMENT = 301,
-     INCREMENT = 302,
-     DOTDOT = 303
+     UNKNOWN_NAME = 259,
+     TYPENAME = 260,
+     COMPLETE = 261,
+     NAME_OR_INT = 262,
+     INTEGER_LITERAL = 263,
+     FLOAT_LITERAL = 264,
+     CHARACTER_LITERAL = 265,
+     STRING_LITERAL = 266,
+     ENTRY = 267,
+     ERROR = 268,
+     TRUE_KEYWORD = 269,
+     FALSE_KEYWORD = 270,
+     NULL_KEYWORD = 271,
+     SUPER_KEYWORD = 272,
+     CAST_KEYWORD = 273,
+     SIZEOF_KEYWORD = 274,
+     TYPEOF_KEYWORD = 275,
+     TYPEID_KEYWORD = 276,
+     INIT_KEYWORD = 277,
+     IMMUTABLE_KEYWORD = 278,
+     CONST_KEYWORD = 279,
+     SHARED_KEYWORD = 280,
+     STRUCT_KEYWORD = 281,
+     UNION_KEYWORD = 282,
+     CLASS_KEYWORD = 283,
+     INTERFACE_KEYWORD = 284,
+     ENUM_KEYWORD = 285,
+     TEMPLATE_KEYWORD = 286,
+     DELEGATE_KEYWORD = 287,
+     FUNCTION_KEYWORD = 288,
+     DOLLAR_VARIABLE = 289,
+     ASSIGN_MODIFY = 290,
+     OROR = 291,
+     ANDAND = 292,
+     GEQ = 293,
+     LEQ = 294,
+     NOTEQUAL = 295,
+     EQUAL = 296,
+     RSH = 297,
+     LSH = 298,
+     HATHAT = 299,
+     NOTIDENTITY = 300,
+     IDENTITY = 301,
+     DECREMENT = 302,
+     INCREMENT = 303,
+     DOTDOT = 304
    };
 #endif
 /* Tokens.  */
 #define IDENTIFIER 258
-#define TYPENAME 259
-#define COMPLETE 260
-#define NAME_OR_INT 261
-#define INTEGER_LITERAL 262
-#define FLOAT_LITERAL 263
-#define CHARACTER_LITERAL 264
-#define STRING_LITERAL 265
-#define ENTRY 266
-#define ERROR 267
-#define TRUE_KEYWORD 268
-#define FALSE_KEYWORD 269
-#define NULL_KEYWORD 270
-#define SUPER_KEYWORD 271
-#define CAST_KEYWORD 272
-#define SIZEOF_KEYWORD 273
-#define TYPEOF_KEYWORD 274
-#define TYPEID_KEYWORD 275
-#define INIT_KEYWORD 276
-#define IMMUTABLE_KEYWORD 277
-#define CONST_KEYWORD 278
-#define SHARED_KEYWORD 279
-#define STRUCT_KEYWORD 280
-#define UNION_KEYWORD 281
-#define CLASS_KEYWORD 282
-#define INTERFACE_KEYWORD 283
-#define ENUM_KEYWORD 284
-#define TEMPLATE_KEYWORD 285
-#define DELEGATE_KEYWORD 286
-#define FUNCTION_KEYWORD 287
-#define DOLLAR_VARIABLE 288
-#define ASSIGN_MODIFY 289
-#define OROR 290
-#define ANDAND 291
-#define GEQ 292
-#define LEQ 293
-#define NOTEQUAL 294
-#define EQUAL 295
-#define RSH 296
-#define LSH 297
-#define HATHAT 298
-#define NOTIDENTITY 299
-#define IDENTITY 300
-#define DECREMENT 301
-#define INCREMENT 302
-#define DOTDOT 303
+#define UNKNOWN_NAME 259
+#define TYPENAME 260
+#define COMPLETE 261
+#define NAME_OR_INT 262
+#define INTEGER_LITERAL 263
+#define FLOAT_LITERAL 264
+#define CHARACTER_LITERAL 265
+#define STRING_LITERAL 266
+#define ENTRY 267
+#define ERROR 268
+#define TRUE_KEYWORD 269
+#define FALSE_KEYWORD 270
+#define NULL_KEYWORD 271
+#define SUPER_KEYWORD 272
+#define CAST_KEYWORD 273
+#define SIZEOF_KEYWORD 274
+#define TYPEOF_KEYWORD 275
+#define TYPEID_KEYWORD 276
+#define INIT_KEYWORD 277
+#define IMMUTABLE_KEYWORD 278
+#define CONST_KEYWORD 279
+#define SHARED_KEYWORD 280
+#define STRUCT_KEYWORD 281
+#define UNION_KEYWORD 282
+#define CLASS_KEYWORD 283
+#define INTERFACE_KEYWORD 284
+#define ENUM_KEYWORD 285
+#define TEMPLATE_KEYWORD 286
+#define DELEGATE_KEYWORD 287
+#define FUNCTION_KEYWORD 288
+#define DOLLAR_VARIABLE 289
+#define ASSIGN_MODIFY 290
+#define OROR 291
+#define ANDAND 292
+#define GEQ 293
+#define LEQ 294
+#define NOTEQUAL 295
+#define EQUAL 296
+#define RSH 297
+#define LSH 298
+#define HATHAT 299
+#define NOTIDENTITY 300
+#define IDENTITY 301
+#define DECREMENT 302
+#define INCREMENT 303
+#define DOTDOT 304
 
 
 
@@ -293,7 +242,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 136 "d-exp.y"
+#line 83 "d-exp.y"
 
     struct {
       LONGEST val;
@@ -310,6 +259,7 @@ typedef union YYSTYPE
     struct ttype tsym;
     struct symtoken ssym;
     int ival;
+    int voidval;
     struct block *bval;
     enum exp_opcode opcode;
     struct stoken_vector svec;
@@ -317,7 +267,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 321 "d-exp.c"
+#line 271 "d-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -328,17 +278,15 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 /* Line 264 of yacc.c  */
-#line 157 "d-exp.y"
+#line 105 "d-exp.y"
 
 /* YYSTYPE gets defined by %union */
 static int parse_number (struct parser_state *, const char *,
 			 int, int, YYSTYPE *);
 
-static void push_expression_name (struct parser_state *, struct stoken);
-
 
 /* Line 264 of yacc.c  */
-#line 342 "d-exp.c"
+#line 290 "d-exp.c"
 
 #ifdef short
 # undef short
@@ -550,22 +498,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  79
+#define YYFINAL  70
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   236
+#define YYLAST   200
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  70
+#define YYNTOKENS  71
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  35
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  111
+#define YYNRULES  104
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  175
+#define YYNSTATES  169
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   303
+#define YYMAXUTOK   304
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -576,16 +524,16 @@ static const yytype_uint8 yytranslate[] 
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    67,     2,     2,     2,    55,    42,     2,
-      63,    68,    53,    51,    35,    52,    61,    54,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    65,     2,
-      43,    36,    44,    37,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    68,     2,     2,     2,    56,    43,     2,
+      64,    69,    54,    52,    36,    53,    62,    55,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    66,     2,
+      44,    37,    45,    38,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    62,     2,    69,    41,     2,     2,     2,     2,     2,
+       2,    63,     2,    70,    42,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,    40,     2,    66,     2,     2,     2,
+       2,     2,     2,     2,    41,     2,    67,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -602,8 +550,8 @@ static const yytype_uint8 yytranslate[] 
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      38,    39,    45,    46,    47,    48,    49,    50,    56,    57,
-      58,    59,    60,    64
+      35,    39,    40,    46,    47,    48,    49,    50,    51,    57,
+      58,    59,    60,    61,    65
 };
 
 #if YYDEBUG
@@ -616,70 +564,66 @@ static const yytype_uint16 yyprhs[] =
       57,    59,    63,    65,    67,    69,    71,    75,    79,    83,
       87,    91,    95,    99,   103,   105,   109,   113,   115,   119,
      123,   127,   129,   133,   137,   141,   144,   147,   150,   153,
-     156,   159,   162,   165,   167,   169,   175,   180,   182,   186,
-     188,   191,   194,   196,   198,   200,   202,   206,   207,   209,
-     210,   216,   221,   225,   232,   236,   238,   242,   247,   249,
-     251,   253,   255,   257,   259,   261,   263,   265,   267,   271,
-     273,   277,   279,   282,   284,   287,   289,   292,   296,   301,
-     303,   306,   309,   313,   316,   319,   323,   326,   329,   333,
-     336,   339
+     156,   159,   162,   165,   169,   171,   173,   179,   184,   186,
+     190,   192,   196,   200,   205,   209,   212,   215,   217,   219,
+     221,   223,   227,   228,   230,   231,   237,   242,   246,   253,
+     257,   259,   263,   265,   267,   269,   271,   273,   275,   277,
+     279,   281,   283,   288,   292,   294,   296,   299,   303,   305,
+     308,   310,   313,   317,   322
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      71,     0,    -1,    72,    -1,   102,    -1,    73,    -1,    74,
-      -1,    74,    35,    73,    -1,    75,    -1,    75,    36,    74,
-      -1,    75,    34,    74,    -1,    76,    -1,    76,    37,    72,
-      65,    75,    -1,    77,    -1,    76,    38,    77,    -1,    78,
-      -1,    77,    39,    78,    -1,    79,    -1,    78,    40,    79,
-      -1,    80,    -1,    79,    41,    80,    -1,    81,    -1,    80,
-      42,    81,    -1,    85,    -1,    82,    -1,    83,    -1,    84,
-      -1,    85,    48,    85,    -1,    85,    47,    85,    -1,    85,
-      58,    85,    -1,    85,    57,    85,    -1,    85,    43,    85,
-      -1,    85,    46,    85,    -1,    85,    44,    85,    -1,    85,
-      45,    85,    -1,    86,    -1,    85,    50,    86,    -1,    85,
-      49,    86,    -1,    87,    -1,    86,    51,    87,    -1,    86,
-      52,    87,    -1,    86,    66,    87,    -1,    88,    -1,    87,
-      53,    88,    -1,    87,    54,    88,    -1,    87,    55,    88,
-      -1,    42,    88,    -1,    60,    88,    -1,    59,    88,    -1,
-      53,    88,    -1,    52,    88,    -1,    51,    88,    -1,    67,
-      88,    -1,    66,    88,    -1,    89,    -1,    90,    -1,    17,
-      63,   102,    68,    88,    -1,    63,   102,    68,    88,    -1,
-      91,    -1,    91,    56,    88,    -1,    98,    -1,    91,    60,
-      -1,    91,    59,    -1,    94,    -1,    96,    -1,    97,    -1,
-      74,    -1,    92,    35,    74,    -1,    -1,    92,    -1,    -1,
-      91,    63,    95,    93,    68,    -1,    91,    62,    92,    69,
-      -1,    91,    62,    69,    -1,    91,    62,    74,    64,    74,
-      69,    -1,    63,    72,    68,    -1,   100,    -1,   100,    61,
-       5,    -1,   100,    61,     3,     5,    -1,    33,    -1,     6,
-      -1,    15,    -1,    13,    -1,    14,    -1,     7,    -1,     8,
-      -1,     9,    -1,   101,    -1,    99,    -1,    62,    93,    69,
-      -1,     3,    -1,   100,    61,     3,    -1,    10,    -1,   101,
-      10,    -1,   104,    -1,   104,   103,    -1,    53,    -1,    53,
-     103,    -1,    62,     7,    69,    -1,    62,     7,    69,   103,
-      -1,     4,    -1,    27,   100,    -1,    27,     5,    -1,    27,
-     100,     5,    -1,    25,   100,    -1,    25,     5,    -1,    25,
-     100,     5,    -1,    26,   100,    -1,    26,     5,    -1,    26,
-     100,     5,    -1,    29,   100,    -1,    29,     5,    -1,    29,
-     100,     5,    -1
+      72,     0,    -1,    73,    -1,   103,    -1,    74,    -1,    75,
+      -1,    75,    36,    74,    -1,    76,    -1,    76,    37,    75,
+      -1,    76,    35,    75,    -1,    77,    -1,    77,    38,    73,
+      66,    76,    -1,    78,    -1,    77,    39,    78,    -1,    79,
+      -1,    78,    40,    79,    -1,    80,    -1,    79,    41,    80,
+      -1,    81,    -1,    80,    42,    81,    -1,    82,    -1,    81,
+      43,    82,    -1,    86,    -1,    83,    -1,    84,    -1,    85,
+      -1,    86,    49,    86,    -1,    86,    48,    86,    -1,    86,
+      59,    86,    -1,    86,    58,    86,    -1,    86,    44,    86,
+      -1,    86,    47,    86,    -1,    86,    45,    86,    -1,    86,
+      46,    86,    -1,    87,    -1,    86,    51,    87,    -1,    86,
+      50,    87,    -1,    88,    -1,    87,    52,    88,    -1,    87,
+      53,    88,    -1,    87,    67,    88,    -1,    89,    -1,    88,
+      54,    89,    -1,    88,    55,    89,    -1,    88,    56,    89,
+      -1,    43,    89,    -1,    61,    89,    -1,    60,    89,    -1,
+      54,    89,    -1,    53,    89,    -1,    52,    89,    -1,    68,
+      89,    -1,    67,    89,    -1,   103,    62,    19,    -1,    90,
+      -1,    91,    -1,    18,    64,   103,    69,    89,    -1,    64,
+     103,    69,    89,    -1,    92,    -1,    92,    57,    89,    -1,
+      99,    -1,    92,    62,     6,    -1,    92,    62,     3,    -1,
+      92,    62,     3,     6,    -1,    92,    62,    19,    -1,    92,
+      61,    -1,    92,    60,    -1,    95,    -1,    97,    -1,    98,
+      -1,    75,    -1,    93,    36,    75,    -1,    -1,    93,    -1,
+      -1,    92,    64,    96,    94,    69,    -1,    92,    63,    93,
+      70,    -1,    92,    63,    70,    -1,    92,    63,    75,    65,
+      75,    70,    -1,    64,    73,    69,    -1,   101,    -1,   103,
+      62,   101,    -1,    34,    -1,     7,    -1,    16,    -1,    14,
+      -1,    15,    -1,     8,    -1,     9,    -1,    10,    -1,   102,
+      -1,   100,    -1,    20,    64,    73,    69,    -1,    63,    94,
+      70,    -1,     3,    -1,    11,    -1,   102,    11,    -1,    64,
+     103,    69,    -1,   105,    -1,   105,   104,    -1,    54,    -1,
+      54,   104,    -1,    63,     8,    70,    -1,    63,     8,    70,
+     104,    -1,     5,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   232,   232,   233,   239,   243,   244,   249,   250,   252,
-     259,   260,   265,   266,   271,   272,   277,   278,   283,   284,
-     289,   290,   295,   296,   297,   298,   302,   304,   309,   311,
-     316,   318,   320,   322,   327,   328,   330,   335,   336,   338,
-     340,   345,   346,   348,   350,   354,   356,   358,   360,   362,
-     364,   366,   368,   370,   371,   375,   381,   388,   389,   394,
-     395,   397,   399,   400,   401,   405,   407,   413,   414,   419,
-     418,   427,   440,   442,   447,   449,   451,   460,   466,   468,
-     476,   483,   487,   491,   496,   501,   506,   512,   520,   525,
-     526,   543,   558,   576,   580,   589,   591,   593,   596,   602,
-     604,   607,   610,   613,   616,   619,   622,   625,   628,   631,
-     634,   637
+       0,   178,   178,   179,   185,   189,   190,   195,   196,   198,
+     205,   206,   211,   212,   217,   218,   223,   224,   229,   230,
+     235,   236,   241,   242,   243,   244,   248,   250,   255,   257,
+     262,   264,   266,   268,   273,   274,   276,   281,   282,   284,
+     286,   291,   292,   294,   296,   300,   302,   304,   306,   308,
+     310,   312,   314,   316,   318,   319,   323,   327,   333,   334,
+     339,   340,   348,   352,   357,   359,   361,   363,   364,   365,
+     369,   371,   377,   378,   383,   382,   391,   404,   406,   411,
+     413,   461,   512,   514,   522,   529,   533,   537,   542,   547,
+     552,   558,   563,   568,   573,   577,   592,   610,   612,   616,
+     625,   627,   629,   632,   638
 };
 #endif
 
@@ -688,28 +632,28 @@ static const yytype_uint16 yyrline[] =
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "IDENTIFIER", "TYPENAME", "COMPLETE",
-  "NAME_OR_INT", "INTEGER_LITERAL", "FLOAT_LITERAL", "CHARACTER_LITERAL",
-  "STRING_LITERAL", "ENTRY", "ERROR", "TRUE_KEYWORD", "FALSE_KEYWORD",
-  "NULL_KEYWORD", "SUPER_KEYWORD", "CAST_KEYWORD", "SIZEOF_KEYWORD",
-  "TYPEOF_KEYWORD", "TYPEID_KEYWORD", "INIT_KEYWORD", "IMMUTABLE_KEYWORD",
-  "CONST_KEYWORD", "SHARED_KEYWORD", "STRUCT_KEYWORD", "UNION_KEYWORD",
-  "CLASS_KEYWORD", "INTERFACE_KEYWORD", "ENUM_KEYWORD", "TEMPLATE_KEYWORD",
-  "DELEGATE_KEYWORD", "FUNCTION_KEYWORD", "DOLLAR_VARIABLE",
-  "ASSIGN_MODIFY", "','", "'='", "'?'", "OROR", "ANDAND", "'|'", "'^'",
-  "'&'", "'<'", "'>'", "GEQ", "LEQ", "NOTEQUAL", "EQUAL", "RSH", "LSH",
-  "'+'", "'-'", "'*'", "'/'", "'%'", "HATHAT", "NOTIDENTITY", "IDENTITY",
-  "DECREMENT", "INCREMENT", "'.'", "'['", "'('", "DOTDOT", "':'", "'~'",
-  "'!'", "')'", "']'", "$accept", "start", "Expression", "CommaExpression",
-  "AssignExpression", "ConditionalExpression", "OrOrExpression",
-  "AndAndExpression", "OrExpression", "XorExpression", "AndExpression",
-  "CmpExpression", "EqualExpression", "IdentityExpression",
-  "RelExpression", "ShiftExpression", "AddExpression", "MulExpression",
-  "UnaryExpression", "CastExpression", "PowExpression",
-  "PostfixExpression", "ArgumentList", "ArgumentList_opt",
-  "CallExpression", "$@1", "IndexExpression", "SliceExpression",
-  "PrimaryExpression", "ArrayLiteral", "IdentifierExp", "StringExp",
-  "TypeExp", "BasicType2", "BasicType", 0
+  "$end", "error", "$undefined", "IDENTIFIER", "UNKNOWN_NAME", "TYPENAME",
+  "COMPLETE", "NAME_OR_INT", "INTEGER_LITERAL", "FLOAT_LITERAL",
+  "CHARACTER_LITERAL", "STRING_LITERAL", "ENTRY", "ERROR", "TRUE_KEYWORD",
+  "FALSE_KEYWORD", "NULL_KEYWORD", "SUPER_KEYWORD", "CAST_KEYWORD",
+  "SIZEOF_KEYWORD", "TYPEOF_KEYWORD", "TYPEID_KEYWORD", "INIT_KEYWORD",
+  "IMMUTABLE_KEYWORD", "CONST_KEYWORD", "SHARED_KEYWORD", "STRUCT_KEYWORD",
+  "UNION_KEYWORD", "CLASS_KEYWORD", "INTERFACE_KEYWORD", "ENUM_KEYWORD",
+  "TEMPLATE_KEYWORD", "DELEGATE_KEYWORD", "FUNCTION_KEYWORD",
+  "DOLLAR_VARIABLE", "ASSIGN_MODIFY", "','", "'='", "'?'", "OROR",
+  "ANDAND", "'|'", "'^'", "'&'", "'<'", "'>'", "GEQ", "LEQ", "NOTEQUAL",
+  "EQUAL", "RSH", "LSH", "'+'", "'-'", "'*'", "'/'", "'%'", "HATHAT",
+  "NOTIDENTITY", "IDENTITY", "DECREMENT", "INCREMENT", "'.'", "'['", "'('",
+  "DOTDOT", "':'", "'~'", "'!'", "')'", "']'", "$accept", "start",
+  "Expression", "CommaExpression", "AssignExpression",
+  "ConditionalExpression", "OrOrExpression", "AndAndExpression",
+  "OrExpression", "XorExpression", "AndExpression", "CmpExpression",
+  "EqualExpression", "IdentityExpression", "RelExpression",
+  "ShiftExpression", "AddExpression", "MulExpression", "UnaryExpression",
+  "CastExpression", "PowExpression", "PostfixExpression", "ArgumentList",
+  "ArgumentList_opt", "CallExpression", "$@1", "IndexExpression",
+  "SliceExpression", "PrimaryExpression", "ArrayLiteral", "IdentifierExp",
+  "StringExp", "TypeExp", "BasicType2", "BasicType", 0
 };
 #endif
 
@@ -721,28 +665,28 @@ static const yytype_uint16 yytoknum[] =
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,    44,    61,    63,   290,   291,
-     124,    94,    38,    60,    62,   292,   293,   294,   295,   296,
-     297,    43,    45,    42,    47,    37,   298,   299,   300,   301,
-     302,    46,    91,    40,   303,    58,   126,    33,    41,    93
+     285,   286,   287,   288,   289,   290,    44,    61,    63,   291,
+     292,   124,    94,    38,    60,    62,   293,   294,   295,   296,
+     297,   298,    43,    45,    42,    47,    37,   299,   300,   301,
+     302,   303,    46,    91,    40,   304,    58,   126,    33,    41,
+      93
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    70,    71,    71,    72,    73,    73,    74,    74,    74,
-      75,    75,    76,    76,    77,    77,    78,    78,    79,    79,
-      80,    80,    81,    81,    81,    81,    82,    82,    83,    83,
-      84,    84,    84,    84,    85,    85,    85,    86,    86,    86,
-      86,    87,    87,    87,    87,    88,    88,    88,    88,    88,
-      88,    88,    88,    88,    88,    89,    89,    90,    90,    91,
-      91,    91,    91,    91,    91,    92,    92,    93,    93,    95,
-      94,    96,    97,    97,    98,    98,    98,    98,    98,    98,
-      98,    98,    98,    98,    98,    98,    98,    98,    99,   100,
-     100,   101,   101,   102,   102,   103,   103,   103,   103,   104,
-     104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
-     104,   104
+       0,    71,    72,    72,    73,    74,    74,    75,    75,    75,
+      76,    76,    77,    77,    78,    78,    79,    79,    80,    80,
+      81,    81,    82,    82,    82,    82,    83,    83,    84,    84,
+      85,    85,    85,    85,    86,    86,    86,    87,    87,    87,
+      87,    88,    88,    88,    88,    89,    89,    89,    89,    89,
+      89,    89,    89,    89,    89,    89,    90,    90,    91,    91,
+      92,    92,    92,    92,    92,    92,    92,    92,    92,    92,
+      93,    93,    94,    94,    96,    95,    97,    98,    98,    99,
+      99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
+      99,    99,    99,   100,   101,   102,   102,   103,   103,   103,
+     104,   104,   104,   104,   105
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -753,13 +697,12 @@ static const yytype_uint8 yyr2[] =
        1,     3,     1,     1,     1,     1,     3,     3,     3,     3,
        3,     3,     3,     3,     1,     3,     3,     1,     3,     3,
        3,     1,     3,     3,     3,     2,     2,     2,     2,     2,
-       2,     2,     2,     1,     1,     5,     4,     1,     3,     1,
-       2,     2,     1,     1,     1,     1,     3,     0,     1,     0,
-       5,     4,     3,     6,     3,     1,     3,     4,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     3,     1,
-       3,     1,     2,     1,     2,     1,     2,     3,     4,     1,
-       2,     2,     3,     2,     2,     3,     2,     2,     3,     2,
-       2,     3
+       2,     2,     2,     3,     1,     1,     5,     4,     1,     3,
+       1,     3,     3,     4,     3,     2,     2,     1,     1,     1,
+       1,     3,     0,     1,     0,     5,     4,     3,     6,     3,
+       1,     3,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     4,     3,     1,     1,     2,     3,     1,     2,
+       1,     2,     3,     4,     1
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -767,67 +710,65 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,    89,    99,    79,    83,    84,    85,    91,    81,    82,
-      80,     0,     0,     0,     0,     0,    78,     0,     0,     0,
-       0,     0,     0,    67,     0,     0,     0,     0,     2,     4,
-       5,     7,    10,    12,    14,    16,    18,    20,    23,    24,
-      25,    22,    34,    37,    41,    53,    54,    57,    62,    63,
-      64,    59,    87,    75,    86,     3,    93,     0,   104,   103,
-     107,   106,   101,   100,   110,   109,    45,    50,    49,    48,
-      47,    46,    65,    68,     0,     0,     0,    52,    51,     1,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    94,   104,    83,    87,    88,    89,    95,    85,    86,
+      84,     0,     0,    82,     0,     0,     0,     0,     0,     0,
+      72,     0,     0,     0,     0,     2,     4,     5,     7,    10,
+      12,    14,    16,    18,    20,    23,    24,    25,    22,    34,
+      37,    41,    54,    55,    58,    67,    68,    69,    60,    91,
+      80,    90,     3,    98,     0,     0,    45,     0,    50,    49,
+      48,    47,    46,    70,    73,     0,     0,     0,    52,    51,
+       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    61,    60,     0,    69,
-       0,    92,    95,     0,    94,     0,   105,     0,   108,   102,
-     111,     0,    88,    74,     0,     6,     9,     8,     0,    13,
-      15,    17,    19,    21,    30,    32,    33,    31,    27,    26,
-      36,    35,    29,    28,    38,    39,    40,    42,    43,    44,
-      58,    72,    65,     0,    67,    90,    76,    96,     0,     0,
-      90,    66,    56,     0,     0,    71,     0,    77,    97,    55,
-      11,     0,    70,    98,    73
+       0,     0,     0,     0,     0,     0,     0,    66,    65,     0,
+       0,    74,    96,     0,   100,     0,    99,     0,     0,     0,
+       0,    93,    79,    97,     6,     9,     8,     0,    13,    15,
+      17,    19,    21,    30,    32,    33,    31,    27,    26,    36,
+      35,    29,    28,    38,    39,    40,    42,    43,    44,    59,
+      62,    61,    64,    77,    70,     0,    72,    53,    81,   101,
+       0,     0,     0,    92,    71,    57,     0,    63,     0,    76,
+       0,   102,    97,    56,    11,     0,    75,   103,    78
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    73,    74,    48,   154,    49,    50,    51,    52,
-      53,    54,    55,   114,    56
+      -1,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    64,    65,    45,   146,    46,    47,    48,    49,
+      50,    51,    57,   106,    53
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -86
+#define YYPACT_NINF -91
 static const yytype_int16 yypact[] =
 {
-     107,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,
-     -86,   -24,    37,    40,    76,    86,   -86,   169,   169,   169,
-     169,   169,   169,   169,   107,   169,   169,    72,   -86,   -86,
-      16,    68,    20,    34,    38,    43,    48,   -86,   -86,   -86,
-     -86,    51,   -22,    -6,   -86,   -86,   -86,    67,   -86,   -86,
-     -86,   -86,   -86,    32,    93,   -86,   -25,     9,   -86,     1,
-     -86,    15,   -86,    19,   -86,    21,   -86,   -86,   -86,   -86,
-     -86,   -86,   -86,    71,    56,    44,    60,   -86,   -86,   -86,
-     169,   169,   169,   169,   169,   169,   169,   169,   169,   169,
-     169,   169,   169,   169,   169,   169,   169,   169,   169,   169,
-     169,   169,   169,   169,   169,   169,   -86,   -86,     8,   -86,
-     132,   -86,   -25,   124,   -86,    73,   -86,   136,   -86,   -86,
-     -86,   169,   -86,   -86,   169,   -86,   -86,   -86,    78,    34,
-      38,    43,    48,   -86,    14,    14,    14,    14,    14,    14,
-     -22,   -22,    14,    14,    -6,    -6,    -6,   -86,   -86,   -86,
-     -86,   -86,    80,   -23,   169,   140,   -86,   -86,    77,   169,
-     -86,   -86,   -86,   169,   169,   -86,    79,   -86,   -25,   -86,
-     -86,    81,   -86,   -86,   -86
+     132,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
+     -91,   -43,   -27,   -91,   132,   132,   132,   132,   132,   132,
+     132,   132,   132,   132,    30,   -91,   -91,    17,    -8,     0,
+      14,    21,    35,    12,   -91,   -91,   -91,   -91,    -1,   -34,
+     -31,   -91,   -91,   -91,    43,   -91,   -91,   -91,   -91,   -91,
+     -91,    72,    22,   -37,     6,   132,   -91,    22,   -91,   -91,
+     -91,   -91,   -91,   -91,    49,    16,    19,   -49,   -91,   -91,
+     -91,   132,   132,   132,   132,   132,   132,   132,   132,   132,
+     132,   132,   132,   132,   132,   132,   132,   132,   132,   132,
+     132,   132,   132,   132,   132,   132,   132,   -91,   -91,     9,
+      58,   -91,   -91,    13,   -37,    81,   -91,     6,    24,    25,
+     132,   -91,   -91,   132,   -91,   -91,   -91,    29,    14,    21,
+      35,    12,   -91,    -9,    -9,    -9,    -9,    -9,    -9,   -34,
+     -34,    -9,    -9,   -31,   -31,   -31,   -91,   -91,   -91,   -91,
+      84,   -91,   -91,   -91,    26,   -30,   132,   -91,   -91,   -91,
+      28,    27,   132,   -91,   -91,   -91,   132,   -91,   132,   -91,
+      33,   -37,   -91,   -91,   -91,    38,   -91,   -91,   -91
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -86,   -86,   -14,    74,   -16,   -12,   -86,    69,    70,    66,
-      75,    83,   -86,   -86,   -86,    98,    23,   -68,   -17,   -86,
-     -86,   -86,    49,     2,   -86,   -86,   -86,   -86,   -86,   -86,
-      41,   -86,    -5,   -85,   -86
+     -91,   -91,     1,    42,   -13,   -47,   -91,    39,    40,    46,
+      37,    41,   -91,   -91,   -91,    73,   -35,   -56,   -14,   -91,
+     -91,   -91,    31,   -22,   -91,   -91,   -91,   -91,   -91,   -91,
+      48,   -91,    10,   -90,   -91
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -837,82 +778,75 @@ static const yytype_int8 yypgoto[] =
 #define YYTABLE_NINF -1
 static const yytype_uint8 yytable[] =
 {
-      66,    67,    68,    69,    70,    71,   116,    72,    77,    78,
-      75,     1,   121,     2,     3,     4,     5,     6,     7,    76,
-     118,     8,     9,    10,   119,    11,   120,   157,   112,    99,
-     100,   144,   145,   146,    12,    13,    14,   113,    15,    57,
-       1,    16,    58,     1,   101,    60,   165,   102,   103,   104,
-      17,    80,   115,    59,    61,    63,    65,    83,    84,    18,
-      19,    20,   117,    95,    96,   126,   127,    21,    22,   128,
-      23,    24,    79,    85,    25,    26,   117,   151,    86,     1,
-     117,    62,   117,   173,    87,   147,   148,   149,   150,     1,
-      88,    64,   152,   110,    89,    90,    91,    92,    93,    94,
-      95,    96,    81,   111,    82,   161,   121,   162,    97,    98,
-       1,     2,   123,     3,     4,     5,     6,     7,   140,   141,
-       8,     9,    10,   105,    11,   122,   106,   107,   124,   108,
-     109,   158,    12,    13,    14,   155,    15,   156,    72,   160,
-      16,   159,   169,   163,   164,   167,   168,   172,   171,    17,
-     174,   170,   131,   129,   125,   130,   166,   153,    18,    19,
-      20,     0,   132,     0,     0,     0,    21,    22,     0,    23,
-      24,   133,     1,    25,    26,     3,     4,     5,     6,     7,
-       0,     0,     8,     9,    10,     0,    11,   134,   135,   136,
-     137,   138,   139,     0,     0,   142,   143,     0,     0,     0,
-       0,     0,    16,     0,     0,     0,     0,     0,     0,     0,
-       0,    17,     0,     0,     0,     0,     0,     0,     0,     0,
-      18,    19,    20,     0,     0,     0,     0,     0,    21,    22,
-       0,    23,    24,     0,     0,    25,    26
+      56,    58,    59,    60,    61,    62,   110,    63,    68,    69,
+      52,     2,   140,   103,   149,   141,     1,   104,    90,    91,
+     113,    54,    66,    93,    94,    95,   105,    72,   142,    73,
+      70,    67,   147,    92,   133,   134,   135,    55,    74,    75,
+     159,    86,    87,    80,    81,    82,    83,    84,    85,    86,
+      87,   129,   130,    71,    76,    79,   109,    88,    89,   115,
+     116,     1,    77,     2,   108,     3,     4,     5,     6,     7,
+     107,   167,     8,     9,    10,   117,    11,    78,    12,   136,
+     137,   138,   139,   102,   103,   110,   111,   144,   112,   150,
+     157,   158,    13,   152,   153,   156,   162,   154,   161,   155,
+      96,    14,   166,    97,    98,    99,   100,   101,   168,   164,
+      15,    16,    17,   114,   118,   121,   119,   151,    18,    19,
+     122,    20,    21,   120,   160,    22,    23,     0,   143,     0,
+       0,   145,     0,    63,     0,     1,     0,     2,   163,     3,
+       4,     5,     6,     7,     0,   165,     8,     9,    10,     0,
+      11,   148,    12,   123,   124,   125,   126,   127,   128,     0,
+       0,   131,   132,     0,     0,     0,    13,     0,     0,     0,
+       0,     0,     0,     0,     0,    14,     0,     0,     0,     0,
+       0,     0,     0,     0,    15,    16,    17,     0,     0,     0,
+       0,     0,    18,    19,     0,    20,    21,     0,     0,    22,
+      23
 };
 
 static const yytype_int16 yycheck[] =
 {
-      17,    18,    19,    20,    21,    22,     5,    23,    25,    26,
-      24,     3,    35,     4,     6,     7,     8,     9,    10,    24,
-       5,    13,    14,    15,     5,    17,     5,   112,    53,    51,
-      52,    99,   100,   101,    25,    26,    27,    62,    29,    63,
-       3,    33,     5,     3,    66,     5,    69,    53,    54,    55,
-      42,    35,    57,    12,    13,    14,    15,    37,    38,    51,
-      52,    53,    61,    49,    50,    81,    82,    59,    60,    83,
-      62,    63,     0,    39,    66,    67,    61,    69,    40,     3,
-      61,     5,    61,   168,    41,   102,   103,   104,   105,     3,
-      42,     5,   108,    61,    43,    44,    45,    46,    47,    48,
-      49,    50,    34,    10,    36,   121,    35,   124,    57,    58,
-       3,     4,    68,     6,     7,     8,     9,    10,    95,    96,
-      13,    14,    15,    56,    17,    69,    59,    60,    68,    62,
-      63,     7,    25,    26,    27,     3,    29,     5,   154,     3,
-      33,    68,   159,    65,    64,     5,    69,    68,   164,    42,
-      69,   163,    86,    84,    80,    85,   154,   108,    51,    52,
-      53,    -1,    87,    -1,    -1,    -1,    59,    60,    -1,    62,
-      63,    88,     3,    66,    67,     6,     7,     8,     9,    10,
-      -1,    -1,    13,    14,    15,    -1,    17,    89,    90,    91,
-      92,    93,    94,    -1,    -1,    97,    98,    -1,    -1,    -1,
-      -1,    -1,    33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      51,    52,    53,    -1,    -1,    -1,    -1,    -1,    59,    60,
-      -1,    62,    63,    -1,    -1,    66,    67
+      14,    15,    16,    17,    18,    19,    36,    20,    22,    23,
+       0,     5,     3,    62,   104,     6,     3,    54,    52,    53,
+      69,    64,    21,    54,    55,    56,    63,    35,    19,    37,
+       0,    21,    19,    67,    90,    91,    92,    64,    38,    39,
+      70,    50,    51,    44,    45,    46,    47,    48,    49,    50,
+      51,    86,    87,    36,    40,    43,    55,    58,    59,    72,
+      73,     3,    41,     5,    54,     7,     8,     9,    10,    11,
+      64,   161,    14,    15,    16,    74,    18,    42,    20,    93,
+      94,    95,    96,    11,    62,    36,    70,   100,    69,     8,
+       6,    65,    34,    69,    69,    66,    69,   110,    70,   113,
+      57,    43,    69,    60,    61,    62,    63,    64,    70,   156,
+      52,    53,    54,    71,    75,    78,    76,   107,    60,    61,
+      79,    63,    64,    77,   146,    67,    68,    -1,    70,    -1,
+      -1,   100,    -1,   146,    -1,     3,    -1,     5,   152,     7,
+       8,     9,    10,    11,    -1,   158,    14,    15,    16,    -1,
+      18,   103,    20,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    88,    89,    -1,    -1,    -1,    34,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    43,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    52,    53,    54,    -1,    -1,    -1,
+      -1,    -1,    60,    61,    -1,    63,    64,    -1,    -1,    67,
+      68
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,     3,     4,     6,     7,     8,     9,    10,    13,    14,
-      15,    17,    25,    26,    27,    29,    33,    42,    51,    52,
-      53,    59,    60,    62,    63,    66,    67,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    86,    87,    88,    89,    90,    91,    94,    96,
-      97,    98,    99,   100,   101,   102,   104,    63,     5,   100,
-       5,   100,     5,   100,     5,   100,    88,    88,    88,    88,
-      88,    88,    74,    92,    93,    72,   102,    88,    88,     0,
-      35,    34,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    57,    58,    51,
-      52,    66,    53,    54,    55,    56,    59,    60,    62,    63,
-      61,    10,    53,    62,   103,   102,     5,    61,     5,     5,
-       5,    35,    69,    68,    68,    73,    74,    74,    72,    77,
-      78,    79,    80,    81,    85,    85,    85,    85,    85,    85,
-      86,    86,    85,    85,    87,    87,    87,    88,    88,    88,
-      88,    69,    74,    92,    95,     3,     5,   103,     7,    68,
-       3,    74,    88,    65,    64,    69,    93,     5,    69,    88,
-      75,    74,    68,   103,    69
+       0,     3,     5,     7,     8,     9,    10,    11,    14,    15,
+      16,    18,    20,    34,    43,    52,    53,    54,    60,    61,
+      63,    64,    67,    68,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    95,    97,    98,    99,   100,
+     101,   102,   103,   105,    64,    64,    89,   103,    89,    89,
+      89,    89,    89,    75,    93,    94,    73,   103,    89,    89,
+       0,    36,    35,    37,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    51,    58,    59,
+      52,    53,    67,    54,    55,    56,    57,    60,    61,    62,
+      63,    64,    11,    62,    54,    63,   104,    64,   103,    73,
+      36,    70,    69,    69,    74,    75,    75,    73,    78,    79,
+      80,    81,    82,    86,    86,    86,    86,    86,    86,    87,
+      87,    86,    86,    88,    88,    88,    89,    89,    89,    89,
+       3,     6,    19,    70,    75,    93,    96,    19,   101,   104,
+       8,   103,    69,    69,    75,    89,    66,     6,    65,    70,
+      94,    70,    69,    89,    76,    75,    69,   104,    70
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -1726,21 +1660,21 @@ yyreduce:
         case 6:
 
 /* Line 1455 of yacc.c  */
-#line 245 "d-exp.y"
+#line 191 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_COMMA); }
     break;
 
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 251 "d-exp.y"
+#line 197 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 253 "d-exp.y"
+#line 199 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 		  write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
 		  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
@@ -1749,293 +1683,335 @@ yyreduce:
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 261 "d-exp.y"
+#line 207 "d-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_COND); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 267 "d-exp.y"
+#line 213 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 273 "d-exp.y"
+#line 219 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 279 "d-exp.y"
+#line 225 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 285 "d-exp.y"
+#line 231 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 291 "d-exp.y"
+#line 237 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 303 "d-exp.y"
+#line 249 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 305 "d-exp.y"
+#line 251 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 310 "d-exp.y"
+#line 256 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 312 "d-exp.y"
+#line 258 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 317 "d-exp.y"
+#line 263 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 319 "d-exp.y"
+#line 265 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 321 "d-exp.y"
+#line 267 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 323 "d-exp.y"
+#line 269 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 329 "d-exp.y"
+#line 275 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LSH); }
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 331 "d-exp.y"
+#line 277 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_RSH); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 337 "d-exp.y"
+#line 283 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 339 "d-exp.y"
+#line 285 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 341 "d-exp.y"
+#line 287 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_CONCAT); }
     break;
 
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 347 "d-exp.y"
+#line 293 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 349 "d-exp.y"
+#line 295 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 351 "d-exp.y"
+#line 297 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 355 "d-exp.y"
+#line 301 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 357 "d-exp.y"
+#line 303 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
     break;
 
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 359 "d-exp.y"
+#line 305 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
     break;
 
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 361 "d-exp.y"
+#line 307 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 363 "d-exp.y"
+#line 309 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 365 "d-exp.y"
+#line 311 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PLUS); }
     break;
 
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 367 "d-exp.y"
+#line 313 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 369 "d-exp.y"
+#line 315 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
     break;
 
-  case 55:
+  case 53:
 
 /* Line 1455 of yacc.c  */
-#line 376 "d-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, (yyvsp[(3) - (5)].tval));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
+#line 317 "d-exp.y"
+    { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
     break;
 
   case 56:
 
 /* Line 1455 of yacc.c  */
-#line 382 "d-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, (yyvsp[(2) - (4)].tval));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
+#line 324 "d-exp.y"
+    { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
     break;
 
-  case 58:
+  case 57:
 
 /* Line 1455 of yacc.c  */
-#line 390 "d-exp.y"
+#line 328 "d-exp.y"
+    { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
+    break;
+
+  case 59:
+
+/* Line 1455 of yacc.c  */
+#line 335 "d-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EXP); }
     break;
 
-  case 60:
+  case 61:
+
+/* Line 1455 of yacc.c  */
+#line 341 "d-exp.y"
+    { struct stoken s;
+		  mark_struct_expression (pstate);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  s.ptr = "";
+		  s.length = 0;
+		  write_exp_string (pstate, s);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+    break;
+
+  case 62:
 
 /* Line 1455 of yacc.c  */
-#line 396 "d-exp.y"
+#line 349 "d-exp.y"
+    { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+    break;
+
+  case 63:
+
+/* Line 1455 of yacc.c  */
+#line 353 "d-exp.y"
+    { mark_struct_expression (pstate);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+    break;
+
+  case 64:
+
+/* Line 1455 of yacc.c  */
+#line 358 "d-exp.y"
+    { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
+    break;
+
+  case 65:
+
+/* Line 1455 of yacc.c  */
+#line 360 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
     break;
 
-  case 61:
+  case 66:
 
 /* Line 1455 of yacc.c  */
-#line 398 "d-exp.y"
+#line 362 "d-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
     break;
 
-  case 65:
+  case 70:
 
 /* Line 1455 of yacc.c  */
-#line 406 "d-exp.y"
+#line 370 "d-exp.y"
     { arglist_len = 1; }
     break;
 
-  case 66:
+  case 71:
 
 /* Line 1455 of yacc.c  */
-#line 408 "d-exp.y"
+#line 372 "d-exp.y"
     { arglist_len++; }
     break;
 
-  case 67:
+  case 72:
 
 /* Line 1455 of yacc.c  */
-#line 413 "d-exp.y"
+#line 377 "d-exp.y"
     { arglist_len = 0; }
     break;
 
-  case 69:
+  case 74:
 
 /* Line 1455 of yacc.c  */
-#line 419 "d-exp.y"
+#line 383 "d-exp.y"
     { start_arglist (); }
     break;
 
-  case 70:
+  case 75:
 
 /* Line 1455 of yacc.c  */
-#line 421 "d-exp.y"
+#line 385 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_FUNCALL);
 		  write_exp_elt_longcst (pstate, (LONGEST) end_arglist ());
 		  write_exp_elt_opcode (pstate, OP_FUNCALL); }
     break;
 
-  case 71:
+  case 76:
 
 /* Line 1455 of yacc.c  */
-#line 428 "d-exp.y"
+#line 392 "d-exp.y"
     { if (arglist_len > 0)
 		    {
 		      write_exp_elt_opcode (pstate, MULTI_SUBSCRIPT);
@@ -2047,70 +2023,147 @@ yyreduce:
 		}
     break;
 
-  case 72:
+  case 77:
 
 /* Line 1455 of yacc.c  */
-#line 441 "d-exp.y"
+#line 405 "d-exp.y"
     { /* Do nothing.  */ }
     break;
 
-  case 73:
+  case 78:
 
 /* Line 1455 of yacc.c  */
-#line 443 "d-exp.y"
+#line 407 "d-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_SLICE); }
     break;
 
-  case 74:
+  case 79:
 
 /* Line 1455 of yacc.c  */
-#line 448 "d-exp.y"
+#line 412 "d-exp.y"
     { /* Do nothing.  */ }
     break;
 
-  case 75:
+  case 80:
 
 /* Line 1455 of yacc.c  */
-#line 450 "d-exp.y"
-    { push_expression_name (pstate, (yyvsp[(1) - (1)].sval)); }
+#line 414 "d-exp.y"
+    { struct bound_minimal_symbol msymbol;
+		  char *copy = copy_name ((yyvsp[(1) - (1)].sval));
+		  struct field_of_this_result is_a_field_of_this;
+		  struct block_symbol sym;
+
+		  /* Handle VAR, which could be local or global.  */
+		  sym = lookup_symbol (copy, expression_context_block, VAR_DOMAIN,
+				       &is_a_field_of_this);
+		  if (sym.symbol && SYMBOL_CLASS (sym.symbol) != LOC_TYPEDEF)
+		    {
+		      if (symbol_read_needs_frame (sym.symbol))
+			{
+			  if (innermost_block == 0
+			      || contained_in (sym.block, innermost_block))
+			    innermost_block = sym.block;
+			}
+
+		      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+		      write_exp_elt_block (pstate, sym.block);
+		      write_exp_elt_sym (pstate, sym.symbol);
+		      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+		    }
+		  else if (is_a_field_of_this.type != NULL)
+		     {
+		      /* It hangs off of `this'.  Must not inadvertently convert from a
+			 method call to data ref.  */
+		      if (innermost_block == 0
+			  || contained_in (sym.block, innermost_block))
+			innermost_block = sym.block;
+		      write_exp_elt_opcode (pstate, OP_THIS);
+		      write_exp_elt_opcode (pstate, OP_THIS);
+		      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
+		      write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
+		      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
+		    }
+		  else
+		    {
+		      /* Lookup foreign name in global static symbols.  */
+		      msymbol = lookup_bound_minimal_symbol (copy);
+		      if (msymbol.minsym != NULL)
+			write_exp_msymbol (pstate, msymbol);
+		      else if (!have_full_symbols () && !have_partial_symbols ())
+			error (_("No symbol table is loaded.  Use the \"file\" command"));
+		      else
+			error (_("No symbol \"%s\" in current context."), copy);
+		    }
+		  }
     break;
 
-  case 76:
+  case 81:
 
 /* Line 1455 of yacc.c  */
-#line 452 "d-exp.y"
-    { struct stoken s;
-		  s.ptr = "";
-		  s.length = 0;
-		  push_expression_name (pstate, (yyvsp[(1) - (3)].sval));
-		  mark_struct_expression (pstate);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
-		  write_exp_string (pstate, s);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
-    break;
+#line 462 "d-exp.y"
+    { struct type *type = check_typedef ((yyvsp[(1) - (3)].tval));
 
-  case 77:
-
-/* Line 1455 of yacc.c  */
-#line 461 "d-exp.y"
-    { push_expression_name (pstate, (yyvsp[(1) - (4)].sval));
-		  mark_struct_expression (pstate);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
-		  write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+			  /* Check if the qualified name is in the global
+			     context.  However if the symbol has not already
+			     been resolved, it's not likely to be found.  */
+			  if (TYPE_CODE (type) == TYPE_CODE_MODULE)
+			    {
+			      struct bound_minimal_symbol msymbol;
+			      struct block_symbol sym;
+			      const char *type_name = TYPE_SAFE_NAME (type);
+			      int type_name_len = strlen (type_name);
+			      char *name;
+
+			      name = xstrprintf ("%.*s.%.*s",
+						 type_name_len, type_name,
+						 (yyvsp[(3) - (3)].sval).length, (yyvsp[(3) - (3)].sval).ptr);
+			      make_cleanup (xfree, name);
+
+			      sym =
+				lookup_symbol (name, (const struct block *) NULL,
+					       VAR_DOMAIN, NULL);
+			      if (sym.symbol)
+				{
+				  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+				  write_exp_elt_block (pstate, sym.block);
+				  write_exp_elt_sym (pstate, sym.symbol);
+				  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+				  break;
+				}
+
+			      msymbol = lookup_bound_minimal_symbol (name);
+			      if (msymbol.minsym != NULL)
+				write_exp_msymbol (pstate, msymbol);
+			      else if (!have_full_symbols () && !have_partial_symbols ())
+				error (_("No symbol table is loaded.  Use the \"file\" command."));
+			      else
+				error (_("No symbol \"%s\" in current context."), name);
+			    }
+
+			  /* Check if the qualified name resolves as a member
+			     of an aggregate or an enum type.  */
+			  if (!type_aggregate_p (type))
+			    error (_("`%s' is not defined as an aggregate type."),
+				   TYPE_SAFE_NAME (type));
+
+			  write_exp_elt_opcode (pstate, OP_SCOPE);
+			  write_exp_elt_type (pstate, type);
+			  write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
+			  write_exp_elt_opcode (pstate, OP_SCOPE);
+			}
     break;
 
-  case 78:
+  case 82:
 
 /* Line 1455 of yacc.c  */
-#line 467 "d-exp.y"
+#line 513 "d-exp.y"
     { write_dollar_variable (pstate, (yyvsp[(1) - (1)].sval)); }
     break;
 
-  case 79:
+  case 83:
 
 /* Line 1455 of yacc.c  */
-#line 469 "d-exp.y"
+#line 515 "d-exp.y"
     { YYSTYPE val;
                   parse_number (pstate, (yyvsp[(1) - (1)].sval).ptr, (yyvsp[(1) - (1)].sval).length, 0, &val);
 		  write_exp_elt_opcode (pstate, OP_LONG);
@@ -2120,10 +2173,10 @@ yyreduce:
 		  write_exp_elt_opcode (pstate, OP_LONG); }
     break;
 
-  case 80:
+  case 84:
 
 /* Line 1455 of yacc.c  */
-#line 477 "d-exp.y"
+#line 523 "d-exp.y"
     { struct type *type = parse_d_type (pstate)->builtin_void;
 		  type = lookup_pointer_type (type);
 		  write_exp_elt_opcode (pstate, OP_LONG);
@@ -2132,58 +2185,58 @@ yyreduce:
 		  write_exp_elt_opcode (pstate, OP_LONG); }
     break;
 
-  case 81:
+  case 85:
 
 /* Line 1455 of yacc.c  */
-#line 484 "d-exp.y"
+#line 530 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 		  write_exp_elt_longcst (pstate, (LONGEST) 1);
 		  write_exp_elt_opcode (pstate, OP_BOOL); }
     break;
 
-  case 82:
+  case 86:
 
 /* Line 1455 of yacc.c  */
-#line 488 "d-exp.y"
+#line 534 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 		  write_exp_elt_longcst (pstate, (LONGEST) 0);
 		  write_exp_elt_opcode (pstate, OP_BOOL); }
     break;
 
-  case 83:
+  case 87:
 
 /* Line 1455 of yacc.c  */
-#line 492 "d-exp.y"
+#line 538 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
 		  write_exp_elt_longcst (pstate, (LONGEST)((yyvsp[(1) - (1)].typed_val_int).val));
 		  write_exp_elt_opcode (pstate, OP_LONG); }
     break;
 
-  case 84:
+  case 88:
 
 /* Line 1455 of yacc.c  */
-#line 497 "d-exp.y"
+#line 543 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
 		  write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
 		  write_exp_elt_opcode (pstate, OP_DOUBLE); }
     break;
 
-  case 85:
+  case 89:
 
 /* Line 1455 of yacc.c  */
-#line 502 "d-exp.y"
+#line 548 "d-exp.y"
     { struct stoken_vector vec;
 		  vec.len = 1;
 		  vec.tokens = &(yyvsp[(1) - (1)].tsval);
 		  write_exp_string_vector (pstate, (yyvsp[(1) - (1)].tsval).type, &vec); }
     break;
 
-  case 86:
+  case 90:
 
 /* Line 1455 of yacc.c  */
-#line 507 "d-exp.y"
+#line 553 "d-exp.y"
     { int i;
 		  write_exp_string_vector (pstate, 0, &(yyvsp[(1) - (1)].svec));
 		  for (i = 0; i < (yyvsp[(1) - (1)].svec).len; ++i)
@@ -2191,46 +2244,34 @@ yyreduce:
 		  xfree ((yyvsp[(1) - (1)].svec).tokens); }
     break;
 
-  case 87:
+  case 91:
 
 /* Line 1455 of yacc.c  */
-#line 513 "d-exp.y"
+#line 559 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_ARRAY);
 		  write_exp_elt_longcst (pstate, (LONGEST) 0);
 		  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].ival) - 1);
 		  write_exp_elt_opcode (pstate, OP_ARRAY); }
     break;
 
-  case 88:
+  case 92:
 
 /* Line 1455 of yacc.c  */
-#line 521 "d-exp.y"
-    { (yyval.ival) = arglist_len; }
+#line 564 "d-exp.y"
+    { write_exp_elt_opcode (pstate, OP_TYPEOF); }
     break;
 
-  case 90:
+  case 93:
 
 /* Line 1455 of yacc.c  */
-#line 527 "d-exp.y"
-    { (yyval.sval).length = (yyvsp[(1) - (3)].sval).length + (yyvsp[(3) - (3)].sval).length + 1;
-		  if ((yyvsp[(1) - (3)].sval).ptr + (yyvsp[(1) - (3)].sval).length + 1 == (yyvsp[(3) - (3)].sval).ptr
-		      && (yyvsp[(1) - (3)].sval).ptr[(yyvsp[(1) - (3)].sval).length] == '.')
-		    (yyval.sval).ptr = (yyvsp[(1) - (3)].sval).ptr;  /* Optimization.  */
-		  else
-		    {
-		      char *buf = xmalloc ((yyval.sval).length + 1);
-		      make_cleanup (xfree, buf);
-		      sprintf (buf, "%.*s.%.*s",
-		               (yyvsp[(1) - (3)].sval).length, (yyvsp[(1) - (3)].sval).ptr, (yyvsp[(3) - (3)].sval).length, (yyvsp[(3) - (3)].sval).ptr);
-		      (yyval.sval).ptr = buf;
-		    }
-		}
+#line 569 "d-exp.y"
+    { (yyval.ival) = arglist_len; }
     break;
 
-  case 91:
+  case 95:
 
 /* Line 1455 of yacc.c  */
-#line 544 "d-exp.y"
+#line 578 "d-exp.y"
     { /* We copy the string here, and not in the
 		     lexer, to guarantee that we do not leak a
 		     string.  Note that we follow the
@@ -2242,23 +2283,23 @@ yyreduce:
 
 		  vec->type = (yyvsp[(1) - (1)].tsval).type;
 		  vec->length = (yyvsp[(1) - (1)].tsval).length;
-		  vec->ptr = xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
+		  vec->ptr = (char *) xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
 		  memcpy (vec->ptr, (yyvsp[(1) - (1)].tsval).ptr, (yyvsp[(1) - (1)].tsval).length + 1);
 		}
     break;
 
-  case 92:
+  case 96:
 
 /* Line 1455 of yacc.c  */
-#line 559 "d-exp.y"
+#line 593 "d-exp.y"
     { /* Note that we NUL-terminate here, but just
 		     for convenience.  */
 		  char *p;
 		  ++(yyval.svec).len;
-		  (yyval.svec).tokens = xrealloc ((yyval.svec).tokens,
-				       (yyval.svec).len * sizeof (struct typed_stoken));
+		  (yyval.svec).tokens
+		    = XRESIZEVEC (struct typed_stoken, (yyval.svec).tokens, (yyval.svec).len);
 
-		  p = xmalloc ((yyvsp[(2) - (2)].tsval).length + 1);
+		  p = (char *) xmalloc ((yyvsp[(2) - (2)].tsval).length + 1);
 		  memcpy (p, (yyvsp[(2) - (2)].tsval).ptr, (yyvsp[(2) - (2)].tsval).length + 1);
 
 		  (yyval.svec).tokens[(yyval.svec).len - 1].type = (yyvsp[(2) - (2)].tsval).type;
@@ -2267,19 +2308,26 @@ yyreduce:
 		}
     break;
 
-  case 93:
+  case 97:
 
 /* Line 1455 of yacc.c  */
-#line 577 "d-exp.y"
+#line 611 "d-exp.y"
+    { /* Do nothing.  */ }
+    break;
+
+  case 98:
+
+/* Line 1455 of yacc.c  */
+#line 613 "d-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
 		  write_exp_elt_opcode (pstate, OP_TYPE); }
     break;
 
-  case 94:
+  case 99:
 
 /* Line 1455 of yacc.c  */
-#line 581 "d-exp.y"
+#line 617 "d-exp.y"
     { (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval));
 		  write_exp_elt_opcode (pstate, OP_TYPE);
 		  write_exp_elt_type (pstate, (yyval.tval));
@@ -2287,143 +2335,47 @@ yyreduce:
 		}
     break;
 
-  case 95:
+  case 100:
 
 /* Line 1455 of yacc.c  */
-#line 590 "d-exp.y"
+#line 626 "d-exp.y"
     { push_type (tp_pointer); }
     break;
 
-  case 96:
+  case 101:
 
 /* Line 1455 of yacc.c  */
-#line 592 "d-exp.y"
+#line 628 "d-exp.y"
     { push_type (tp_pointer); }
     break;
 
-  case 97:
+  case 102:
 
 /* Line 1455 of yacc.c  */
-#line 594 "d-exp.y"
+#line 630 "d-exp.y"
     { push_type_int ((yyvsp[(2) - (3)].typed_val_int).val);
 		  push_type (tp_array); }
     break;
 
-  case 98:
+  case 103:
 
 /* Line 1455 of yacc.c  */
-#line 597 "d-exp.y"
+#line 633 "d-exp.y"
     { push_type_int ((yyvsp[(2) - (4)].typed_val_int).val);
 		  push_type (tp_array); }
     break;
 
-  case 99:
-
-/* Line 1455 of yacc.c  */
-#line 603 "d-exp.y"
-    { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
-    break;
-
-  case 100:
-
-/* Line 1455 of yacc.c  */
-#line 605 "d-exp.y"
-    { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
-				      expression_context_block); }
-    break;
-
-  case 101:
-
-/* Line 1455 of yacc.c  */
-#line 608 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 102:
-
-/* Line 1455 of yacc.c  */
-#line 611 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[(2) - (3)].sval).ptr, (yyvsp[(2) - (3)].sval).length);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 103:
-
-/* Line 1455 of yacc.c  */
-#line 614 "d-exp.y"
-    { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
-				      expression_context_block); }
-    break;
-
   case 104:
 
 /* Line 1455 of yacc.c  */
-#line 617 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 105:
-
-/* Line 1455 of yacc.c  */
-#line 620 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[(2) - (3)].sval).ptr, (yyvsp[(2) - (3)].sval).length);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 106:
-
-/* Line 1455 of yacc.c  */
-#line 623 "d-exp.y"
-    { (yyval.tval) = lookup_union (copy_name ((yyvsp[(2) - (2)].sval)),
-				     expression_context_block); }
-    break;
-
-  case 107:
-
-/* Line 1455 of yacc.c  */
-#line 626 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_UNION, "", 0);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 108:
-
-/* Line 1455 of yacc.c  */
-#line 629 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_UNION, (yyvsp[(2) - (3)].sval).ptr, (yyvsp[(2) - (3)].sval).length);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 109:
-
-/* Line 1455 of yacc.c  */
-#line 632 "d-exp.y"
-    { (yyval.tval) = lookup_enum (copy_name ((yyvsp[(2) - (2)].sval)),
-				    expression_context_block); }
-    break;
-
-  case 110:
-
-/* Line 1455 of yacc.c  */
-#line 635 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_ENUM, "", 0);
-		  (yyval.tval) = NULL; }
-    break;
-
-  case 111:
-
-/* Line 1455 of yacc.c  */
-#line 638 "d-exp.y"
-    { mark_completion_tag (TYPE_CODE_ENUM, (yyvsp[(2) - (3)].sval).ptr, (yyvsp[(2) - (3)].sval).length);
-		  (yyval.tval) = NULL; }
+#line 639 "d-exp.y"
+    { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
     break;
 
 
 
 /* Line 1455 of yacc.c  */
-#line 2428 "d-exp.c"
+#line 2380 "d-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2638,6 +2590,17 @@ yyreturn:
 #line 642 "d-exp.y"
 
 
+/* Return true if the type is aggregate-like.  */
+
+static int
+type_aggregate_p (struct type *type)
+{
+  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	  || TYPE_CODE (type) == TYPE_CODE_UNION
+	  || (TYPE_CODE (type) == TYPE_CODE_ENUM
+	      && TYPE_DECLARED_CLASS (type)));
+}
+
 /* Take care of parsing a number (anything that starts with a digit).
    Set yylval and return the token type; update lexptr.
    LEN is the number of characters in it.  */
@@ -2667,7 +2630,6 @@ parse_number (struct parser_state *ps, c
 
   if (parsed_float)
     {
-      const struct builtin_d_type *builtin_d_types;
       const char *suffix;
       int suffix_len;
       char *s, *sp;
@@ -2933,7 +2895,7 @@ parse_string_or_char (const char *tokptr
   else
     value->type = C_STRING;
 
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -3010,293 +2972,6 @@ static const struct token ident_tokens[]
     {"template", TEMPLATE_KEYWORD, OP_NULL},
   };
 
-/* If NAME is a type name in this scope, return it.  */
-
-static struct type *
-d_type_from_name (struct stoken name)
-{
-  struct symbol *sym;
-  char *copy = copy_name (name);
-
-  sym = lookup_symbol (copy, expression_context_block,
-		       STRUCT_DOMAIN, NULL);
-  if (sym != NULL)
-    return SYMBOL_TYPE (sym);
-
-  return NULL;
-}
-
-/* If NAME is a module name in this scope, return it.  */
-
-static struct type *
-d_module_from_name (struct stoken name)
-{
-  struct symbol *sym;
-  char *copy = copy_name (name);
-
-  sym = lookup_symbol (copy, expression_context_block,
-		       MODULE_DOMAIN, NULL);
-  if (sym != NULL)
-    return SYMBOL_TYPE (sym);
-
-  return NULL;
-}
-
-/* If NAME is a valid variable name in this scope, push it and return 1.
-   Otherwise, return 0.  */
-
-static int
-push_variable (struct parser_state *ps, struct stoken name)
-{
-  char *copy = copy_name (name);
-  struct field_of_this_result is_a_field_of_this;
-  struct symbol *sym;
-  sym = lookup_symbol (copy, expression_context_block, VAR_DOMAIN,
-                       &is_a_field_of_this);
-  if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-    {
-      if (symbol_read_needs_frame (sym))
-        {
-          if (innermost_block == 0 ||
-              contained_in (block_found, innermost_block))
-            innermost_block = block_found;
-        }
-
-      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      /* We want to use the selected frame, not another more inner frame
-         which happens to be in the same block.  */
-      write_exp_elt_block (ps, NULL);
-      write_exp_elt_sym (ps, sym);
-      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      return 1;
-    }
-  if (is_a_field_of_this.type != NULL)
-    {
-      /* It hangs off of `this'.  Must not inadvertently convert from a
-         method call to data ref.  */
-      if (innermost_block == 0 ||
-          contained_in (block_found, innermost_block))
-        innermost_block = block_found;
-      write_exp_elt_opcode (ps, OP_THIS);
-      write_exp_elt_opcode (ps, OP_THIS);
-      write_exp_elt_opcode (ps, STRUCTOP_PTR);
-      write_exp_string (ps, name);
-      write_exp_elt_opcode (ps, STRUCTOP_PTR);
-      return 1;
-    }
-  return 0;
-}
-
-/* Assuming a reference expression has been pushed, emit the
-   STRUCTOP_PTR ops to access the field named NAME.  If NAME is a
-   qualified name (has '.'), generate a field access for each part.  */
-
-static void
-push_fieldnames (struct parser_state *ps, struct stoken name)
-{
-  int i;
-  struct stoken token;
-  token.ptr = name.ptr;
-  for (i = 0;  ;  i++)
-    {
-      if (i == name.length || name.ptr[i] == '.')
-        {
-          /* token.ptr is start of current field name.  */
-          token.length = &name.ptr[i] - token.ptr;
-          write_exp_elt_opcode (ps, STRUCTOP_PTR);
-          write_exp_string (ps, token);
-          write_exp_elt_opcode (ps, STRUCTOP_PTR);
-          token.ptr += token.length + 1;
-        }
-      if (i >= name.length)
-        break;
-    }
-}
-
-/* Helper routine for push_expression_name.  Handle a TYPE symbol,
-   where DOT_INDEX is the index of the first '.' if NAME is part of
-   a qualified type.  */
-
-static void
-push_type_name (struct parser_state *ps, struct type *type,
-		struct stoken name, int dot_index)
-{
-  if (dot_index == name.length)
-    {
-      write_exp_elt_opcode (ps, OP_TYPE);
-      write_exp_elt_type (ps, type);
-      write_exp_elt_opcode (ps, OP_TYPE);
-    }
-  else
-    {
-      struct stoken token;
-
-      token.ptr = name.ptr;
-      token.length = dot_index;
-
-      dot_index = 0;
-
-      while (dot_index < name.length && name.ptr[dot_index] != '.')
-	dot_index++;
-      token.ptr = name.ptr;
-      token.length = dot_index;
-
-      write_exp_elt_opcode (ps, OP_SCOPE);
-      write_exp_elt_type (ps, type);
-      write_exp_string (ps, token);
-      write_exp_elt_opcode (ps, OP_SCOPE);
-
-      if (dot_index < name.length)
-	{
-	  dot_index++;
-	  name.ptr += dot_index;
-	  name.length -= dot_index;
-	  push_fieldnames (ps, name);
-	}
-    }
-}
-
-/* Helper routine for push_expression_name.  Like push_type_name,
-   but used when TYPE is a module.  Returns 1 on pushing the symbol.  */
-
-static int
-push_module_name (struct parser_state *ps, struct type *module,
-		  struct stoken name, int dot_index)
-{
-  if (dot_index == name.length)
-    {
-      write_exp_elt_opcode (ps, OP_TYPE);
-      write_exp_elt_type (ps, module);
-      write_exp_elt_opcode (ps, OP_TYPE);
-      return 1;
-    }
-  else
-    {
-      struct symbol *sym;
-      char *copy;
-
-      copy = copy_name (name);
-      sym = lookup_symbol_in_static_block (copy, expression_context_block,
-					   VAR_DOMAIN);
-      if (sym != NULL)
-	sym = lookup_global_symbol (copy, expression_context_block,
-				    VAR_DOMAIN);
-
-      if (sym != NULL)
-	{
-	  if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-	    {
-	      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-	      write_exp_elt_block (ps, NULL);
-	      write_exp_elt_sym (ps, sym);
-	      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-	    }
-	  else
-	    {
-	      write_exp_elt_opcode (ps, OP_TYPE);
-	      write_exp_elt_type (ps, SYMBOL_TYPE (sym));
-	      write_exp_elt_opcode (ps, OP_TYPE);
-	    }
-	  return 1;
-	}
-    }
-
-  return 0;
-}
-
-/* Handle NAME in an expression (or LHS), which could be a
-   variable, type, or module.  */
-
-static void
-push_expression_name (struct parser_state *ps, struct stoken name)
-{
-  struct stoken token;
-  struct type *typ;
-  struct bound_minimal_symbol msymbol;
-  char *copy;
-  int doti;
-
-  /* Handle VAR, which could be local or global.  */
-  if (push_variable (ps, name) != 0)
-    return;
-
-  /* Handle MODULE.  */
-  typ = d_module_from_name (name);
-  if (typ != NULL)
-    {
-      if (push_module_name (ps, typ, name, name.length) != 0)
-	return;
-    }
-
-  /* Handle TYPE.  */
-  typ = d_type_from_name (name);
-  if (typ != NULL)
-    {
-      push_type_name (ps, typ, name, name.length);
-      return;
-    }
-
-  /* Handle VAR.FIELD1..FIELDN.  */
-  for (doti = 0;  doti < name.length;  doti++)
-    {
-      if (name.ptr[doti] == '.')
-	{
-	  token.ptr = name.ptr;
-	  token.length = doti;
-
-	  if (push_variable (ps, token) != 0)
-	    {
-	      token.ptr = name.ptr + doti + 1;
-	      token.length = name.length - doti - 1;
-	      push_fieldnames (ps, token);
-	      return;
-	    }
-	  break;
-	}
-    }
-
-  /* Continue looking if we found a '.' in the name.  */
-  if (doti < name.length)
-    {
-      token.ptr = name.ptr;
-      for (;;)
-	{
-	  token.length = doti;
-
-	  /* Handle PACKAGE.MODULE.  */
-	  typ = d_module_from_name (token);
-	  if (typ != NULL)
-	    {
-	      if (push_module_name (ps, typ, name, doti) != 0)
-		return;
-	    }
-	  /* Handle TYPE.FIELD1..FIELDN.  */
-	  typ = d_type_from_name (token);
-	  if (typ != NULL)
-	    {
-	      push_type_name (ps, typ, name, doti);
-	      return;
-	    }
-
-	  if (doti >= name.length)
-	    break;
-	  doti++;   /* Skip '.'  */
-	  while (doti < name.length && name.ptr[doti] != '.')
-	    doti++;
-	}
-    }
-
-  /* Lookup foreign name in global static symbols.  */
-  copy  = copy_name (name);
-  msymbol = lookup_bound_minimal_symbol (copy);
-  if (msymbol.minsym != NULL)
-    write_exp_msymbol (ps, msymbol);
-  else if (!have_full_symbols () && !have_partial_symbols ())
-    error (_("No symbol table is loaded.  Use the \"file\" command"));
-  else
-    error (_("No symbol \"%s\" in current context."), copy);
-}
-
 /* This is set if a NAME token appeared at the very end of the input
    string, with no whitespace separating the name from the EOF.  This
    is used only when parsing to do field name completion.  */
@@ -3309,7 +2984,7 @@ static int last_was_structop;
 /* Read one token, getting characters through lexptr.  */
 
 static int
-yylex (void)
+lex_one_token (struct parser_state *par_state)
 {
   int c;
   int namelen;
@@ -3438,12 +3113,12 @@ yylex (void)
 	    /* We will take any letters or digits, ignoring any embedded '_'.
 	       parse_number will complain if past the radix, or if L or U are
 	       not final.  */
-	    else if ((*p < '0' || *p > '9') && (*p != '_') &&
-		     ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z')))
+	    else if ((*p < '0' || *p > '9') && (*p != '_')
+		     && ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z')))
 	      break;
 	  }
 
-	toktype = parse_number (pstate, tokstart, p - tokstart,
+	toktype = parse_number (par_state, tokstart, p - tokstart,
 				got_dot|got_e, &yylval);
 	if (toktype == ERROR)
 	  {
@@ -3574,8 +3249,8 @@ yylex (void)
     return DOLLAR_VARIABLE;
 
   yylval.tsym.type
-    = language_lookup_primitive_type (parse_language (pstate),
-				      parse_gdbarch (pstate), copy);
+    = language_lookup_primitive_type (parse_language (par_state),
+				      parse_gdbarch (par_state), copy);
   if (yylval.tsym.type != NULL)
     return TYPENAME;
 
@@ -3586,7 +3261,7 @@ yylex (void)
       || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10))
     {
       YYSTYPE newlval;	/* Its value is ignored.  */
-      int hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
+      int hextype = parse_number (par_state, tokstart, namelen, 0, &newlval);
       if (hextype == INTEGER_LITERAL)
 	return NAME_OR_INT;
     }
@@ -3597,6 +3272,299 @@ yylex (void)
   return IDENTIFIER;
 }
 
+/* An object of this type is pushed on a FIFO by the "outer" lexer.  */
+typedef struct
+{
+  int token;
+  YYSTYPE value;
+} token_and_value;
+
+DEF_VEC_O (token_and_value);
+
+/* A FIFO of tokens that have been read but not yet returned to the
+   parser.  */
+static VEC (token_and_value) *token_fifo;
+
+/* Non-zero if the lexer should return tokens from the FIFO.  */
+static int popping;
+
+/* Temporary storage for yylex; this holds symbol names as they are
+   built up.  */
+static struct obstack name_obstack;
+
+/* Classify an IDENTIFIER token.  The contents of the token are in `yylval'.
+   Updates yylval and returns the new token type.  BLOCK is the block
+   in which lookups start; this can be NULL to mean the global scope.  */
+
+static int
+classify_name (struct parser_state *par_state, const struct block *block)
+{
+  struct block_symbol sym;
+  char *copy;
+  struct field_of_this_result is_a_field_of_this;
+
+  copy = copy_name (yylval.sval);
+
+  sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
+  if (sym.symbol && SYMBOL_CLASS (sym.symbol) == LOC_TYPEDEF)
+    {
+      yylval.tsym.type = SYMBOL_TYPE (sym.symbol);
+      return TYPENAME;
+    }
+  else if (sym.symbol == NULL)
+    {
+      /* Look-up first for a module name, then a type.  */
+      sym = lookup_symbol (copy, block, MODULE_DOMAIN, NULL);
+      if (sym.symbol == NULL)
+	sym = lookup_symbol (copy, block, STRUCT_DOMAIN, NULL);
+
+      if (sym.symbol != NULL)
+	{
+	  yylval.tsym.type = SYMBOL_TYPE (sym.symbol);
+	  return TYPENAME;
+	}
+
+      return UNKNOWN_NAME;
+    }
+
+  return IDENTIFIER;
+}
+
+/* Like classify_name, but used by the inner loop of the lexer, when a
+   name might have already been seen.  CONTEXT is the context type, or
+   NULL if this is the first component of a name.  */
+
+static int
+classify_inner_name (struct parser_state *par_state,
+		     const struct block *block, struct type *context)
+{
+  struct type *type;
+  char *copy;
+
+  if (context == NULL)
+    return classify_name (par_state, block);
+
+  type = check_typedef (context);
+  if (!type_aggregate_p (type))
+    return ERROR;
+
+  copy = copy_name (yylval.ssym.stoken);
+  yylval.ssym.sym = d_lookup_nested_symbol (type, copy, block);
+
+  if (yylval.ssym.sym.symbol == NULL)
+    return ERROR;
+
+  if (SYMBOL_CLASS (yylval.ssym.sym.symbol) == LOC_TYPEDEF)
+    {
+      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym.symbol);
+      return TYPENAME;
+    }
+
+  return IDENTIFIER;
+}
+
+/* The outer level of a two-level lexer.  This calls the inner lexer
+   to return tokens.  It then either returns these tokens, or
+   aggregates them into a larger token.  This lets us work around a
+   problem in our parsing approach, where the parser could not
+   distinguish between qualified names and qualified types at the
+   right point.  */
+
+static int
+yylex (void)
+{
+  token_and_value current;
+  int last_was_dot;
+  struct type *context_type = NULL;
+  int last_to_examine, next_to_examine, checkpoint;
+  const struct block *search_block;
+
+  if (popping && !VEC_empty (token_and_value, token_fifo))
+    goto do_pop;
+  popping = 0;
+
+  /* Read the first token and decide what to do.  */
+  current.token = lex_one_token (pstate);
+  if (current.token != IDENTIFIER && current.token != '.')
+    return current.token;
+
+  /* Read any sequence of alternating "." and identifier tokens into
+     the token FIFO.  */
+  current.value = yylval;
+  VEC_safe_push (token_and_value, token_fifo, &current);
+  last_was_dot = current.token == '.';
+
+  while (1)
+    {
+      current.token = lex_one_token (pstate);
+      current.value = yylval;
+      VEC_safe_push (token_and_value, token_fifo, &current);
+
+      if ((last_was_dot && current.token != IDENTIFIER)
+	  || (!last_was_dot && current.token != '.'))
+	break;
+
+      last_was_dot = !last_was_dot;
+    }
+  popping = 1;
+
+  /* We always read one extra token, so compute the number of tokens
+     to examine accordingly.  */
+  last_to_examine = VEC_length (token_and_value, token_fifo) - 2;
+  next_to_examine = 0;
+
+  current = *VEC_index (token_and_value, token_fifo, next_to_examine);
+  ++next_to_examine;
+
+  /* If we are not dealing with a typename, now is the time to find out.  */
+  if (current.token == IDENTIFIER)
+    {
+      yylval = current.value;
+      current.token = classify_name (pstate, expression_context_block);
+      current.value = yylval;
+    }
+
+  /* If the IDENTIFIER is not known, it could be a package symbol,
+     first try building up a name until we find the qualified module.  */
+  if (current.token == UNKNOWN_NAME)
+    {
+      obstack_free (&name_obstack, obstack_base (&name_obstack));
+      obstack_grow (&name_obstack, current.value.sval.ptr,
+		    current.value.sval.length);
+
+      last_was_dot = 0;
+
+      while (next_to_examine <= last_to_examine)
+	{
+	  token_and_value *next;
+
+	  next = VEC_index (token_and_value, token_fifo, next_to_examine);
+	  ++next_to_examine;
+
+	  if (next->token == IDENTIFIER && last_was_dot)
+	    {
+	      /* Update the partial name we are constructing.  */
+              obstack_grow_str (&name_obstack, ".");
+	      obstack_grow (&name_obstack, next->value.sval.ptr,
+			    next->value.sval.length);
+
+	      yylval.sval.ptr = (char *) obstack_base (&name_obstack);
+	      yylval.sval.length = obstack_object_size (&name_obstack);
+
+	      current.token = classify_name (pstate, expression_context_block);
+	      current.value = yylval;
+
+	      /* We keep going until we find a TYPENAME.  */
+	      if (current.token == TYPENAME)
+		{
+		  /* Install it as the first token in the FIFO.  */
+		  VEC_replace (token_and_value, token_fifo, 0, &current);
+		  VEC_block_remove (token_and_value, token_fifo, 1,
+				    next_to_examine - 1);
+		  break;
+		}
+	    }
+	  else if (next->token == '.' && !last_was_dot)
+	    last_was_dot = 1;
+	  else
+	    {
+	      /* We've reached the end of the name.  */
+	      break;
+	    }
+	}
+
+      /* Reset our current token back to the start, if we found nothing
+	 this means that we will just jump to do pop.  */
+      current = *VEC_index (token_and_value, token_fifo, 0);
+      next_to_examine = 1;
+    }
+  if (current.token != TYPENAME && current.token != '.')
+    goto do_pop;
+
+  obstack_free (&name_obstack, obstack_base (&name_obstack));
+  checkpoint = 0;
+  if (current.token == '.')
+    search_block = NULL;
+  else
+    {
+      gdb_assert (current.token == TYPENAME);
+      search_block = expression_context_block;
+      obstack_grow (&name_obstack, current.value.sval.ptr,
+		    current.value.sval.length);
+      context_type = current.value.tsym.type;
+      checkpoint = 1;
+    }
+
+  last_was_dot = current.token == '.';
+
+  while (next_to_examine <= last_to_examine)
+    {
+      token_and_value *next;
+
+      next = VEC_index (token_and_value, token_fifo, next_to_examine);
+      ++next_to_examine;
+
+      if (next->token == IDENTIFIER && last_was_dot)
+	{
+	  int classification;
+
+	  yylval = next->value;
+	  classification = classify_inner_name (pstate, search_block,
+						context_type);
+	  /* We keep going until we either run out of names, or until
+	     we have a qualified name which is not a type.  */
+	  if (classification != TYPENAME && classification != IDENTIFIER)
+	    break;
+
+	  /* Accept up to this token.  */
+	  checkpoint = next_to_examine;
+
+	  /* Update the partial name we are constructing.  */
+	  if (context_type != NULL)
+	    {
+	      /* We don't want to put a leading "." into the name.  */
+              obstack_grow_str (&name_obstack, ".");
+	    }
+	  obstack_grow (&name_obstack, next->value.sval.ptr,
+			next->value.sval.length);
+
+	  yylval.sval.ptr = (char *) obstack_base (&name_obstack);
+	  yylval.sval.length = obstack_object_size (&name_obstack);
+	  current.value = yylval;
+	  current.token = classification;
+
+	  last_was_dot = 0;
+
+	  if (classification == IDENTIFIER)
+	    break;
+
+	  context_type = yylval.tsym.type;
+	}
+      else if (next->token == '.' && !last_was_dot)
+	last_was_dot = 1;
+      else
+	{
+	  /* We've reached the end of the name.  */
+	  break;
+	}
+    }
+
+  /* If we have a replacement token, install it as the first token in
+     the FIFO, and delete the other constituent tokens.  */
+  if (checkpoint > 0)
+    {
+      VEC_replace (token_and_value, token_fifo, 0, &current);
+      if (checkpoint > 1)
+	VEC_block_remove (token_and_value, token_fifo, 1, checkpoint - 1);
+    }
+
+ do_pop:
+  current = *VEC_index (token_and_value, token_fifo, 0);
+  VEC_ordered_remove (token_and_value, token_fifo, 0);
+  yylval = current.value;
+  return current.token;
+}
+
 int
 d_parse (struct parser_state *par_state)
 {
@@ -3617,6 +3585,11 @@ d_parse (struct parser_state *par_state)
   last_was_structop = 0;
   saw_name_at_eof = 0;
 
+  VEC_free (token_and_value, token_fifo);
+  popping = 0;
+  obstack_init (&name_obstack);
+  make_cleanup_obstack_free (&name_obstack);
+
   result = yyparse ();
   do_cleanups (back_to);
   return result;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-exp.y ./gdb/d-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/d-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* YACC parser for D expressions, for GDB.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,65 +55,10 @@
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_d_type(ps) builtin_d_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth d_maxdepth
-#define	yyparse	d_parse_internal
-#define	yylex	d_lex
-#define	yyerror	d_error
-#define	yylval	d_lval
-#define	yychar	d_char
-#define	yydebug	d_debug
-#define	yypact	d_pact
-#define	yyr1	d_r1
-#define	yyr2	d_r2
-#define	yydef	d_def
-#define	yychk	d_chk
-#define	yypgo	d_pgo
-#define	yyact	d_act
-#define	yyexca	d_exca
-#define	yyerrflag d_errflag
-#define	yynerrs	d_nerrs
-#define	yyps	d_ps
-#define	yypv	d_pv
-#define	yys	d_s
-#define	yy_yys	d_yys
-#define	yystate	d_state
-#define	yytmp	d_tmp
-#define	yyv	d_v
-#define	yy_yyv	d_yyv
-#define	yyval	d_val
-#define	yylloc	d_lloc
-#define	yyreds	d_reds	/* With YYDEBUG defined */
-#define	yytoks	d_toks	/* With YYDEBUG defined */
-#define	yyname	d_name	/* With YYDEBUG defined */
-#define	yyrule	d_rule	/* With YYDEBUG defined */
-#define	yylhs	d_yylhs
-#define	yylen	d_yylen
-#define	yydefre	d_yydefred
-#define	yydgoto	d_yydgoto
-#define	yysindex d_yysindex
-#define	yyrindex d_yyrindex
-#define	yygindex d_yygindex
-#define	yytable	d_yytable
-#define	yycheck	d_yycheck
-#define	yyss	d_yyss
-#define	yysslim	d_yysslim
-#define	yyssp	d_yyssp
-#define	yystacksize d_yystacksize
-#define	yyvs	d_yyvs
-#define	yyvsp	d_yyvsp
-
-#ifndef YYDEBUG
-#define YYDEBUG 1	/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX d_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -126,6 +71,8 @@ static int yylex (void);
 
 void yyerror (char *);
 
+static int type_aggregate_p (struct type *);
+
 %}
 
 /* Although the yacc "value" of an expression is not used,
@@ -149,6 +96,7 @@ void yyerror (char *);
     struct ttype tsym;
     struct symtoken ssym;
     int ival;
+    int voidval;
     struct block *bval;
     enum exp_opcode opcode;
     struct stoken_vector svec;
@@ -158,11 +106,9 @@ void yyerror (char *);
 /* YYSTYPE gets defined by %union */
 static int parse_number (struct parser_state *, const char *,
 			 int, int, YYSTYPE *);
-
-static void push_expression_name (struct parser_state *, struct stoken);
 %}
 
-%token <sval> IDENTIFIER
+%token <sval> IDENTIFIER UNKNOWN_NAME
 %token <tsym> TYPENAME
 %token <voidval> COMPLETE
 
@@ -367,21 +313,20 @@ UnaryExpression:
 		{ write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
 |	'~' UnaryExpression
 		{ write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
+|	TypeExp '.' SIZEOF_KEYWORD
+		{ write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
 |	CastExpression
 |	PowExpression
 ;
 
 CastExpression:
 	CAST_KEYWORD '(' TypeExp ')' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, $3);
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
+		{ write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
 	/* C style cast is illegal D, but is still recognised in
 	   the grammar, so we keep this around for convenience.  */
 |	'(' TypeExp ')' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, $2);
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
+		{ write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
+
 ;
 
 PowExpression:
@@ -392,6 +337,25 @@ PowExpression:
 
 PostfixExpression:
 	PrimaryExpression
+|	PostfixExpression '.' COMPLETE
+		{ struct stoken s;
+		  mark_struct_expression (pstate);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  s.ptr = "";
+		  s.length = 0;
+		  write_exp_string (pstate, s);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+|	PostfixExpression '.' IDENTIFIER
+		{ write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  write_exp_string (pstate, $3);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+|	PostfixExpression '.' IDENTIFIER COMPLETE
+		{ mark_struct_expression (pstate);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
+		  write_exp_string (pstate, $3);
+		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+|	PostfixExpression '.' SIZEOF_KEYWORD
+		{ write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
 |	PostfixExpression INCREMENT
 		{ write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
 |	PostfixExpression DECREMENT
@@ -447,22 +411,104 @@ PrimaryExpression:
 	'(' Expression ')'
 		{ /* Do nothing.  */ }
 |	IdentifierExp
-		{ push_expression_name (pstate, $1); }
-|	IdentifierExp '.' COMPLETE
-		{ struct stoken s;
-		  s.ptr = "";
-		  s.length = 0;
-		  push_expression_name (pstate, $1);
-		  mark_struct_expression (pstate);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
-		  write_exp_string (pstate, s);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
-|	IdentifierExp '.' IDENTIFIER COMPLETE
-		{ push_expression_name (pstate, $1);
-		  mark_struct_expression (pstate);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
-		  write_exp_string (pstate, $3);
-		  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
+		{ struct bound_minimal_symbol msymbol;
+		  char *copy = copy_name ($1);
+		  struct field_of_this_result is_a_field_of_this;
+		  struct block_symbol sym;
+
+		  /* Handle VAR, which could be local or global.  */
+		  sym = lookup_symbol (copy, expression_context_block, VAR_DOMAIN,
+				       &is_a_field_of_this);
+		  if (sym.symbol && SYMBOL_CLASS (sym.symbol) != LOC_TYPEDEF)
+		    {
+		      if (symbol_read_needs_frame (sym.symbol))
+			{
+			  if (innermost_block == 0
+			      || contained_in (sym.block, innermost_block))
+			    innermost_block = sym.block;
+			}
+
+		      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+		      write_exp_elt_block (pstate, sym.block);
+		      write_exp_elt_sym (pstate, sym.symbol);
+		      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+		    }
+		  else if (is_a_field_of_this.type != NULL)
+		     {
+		      /* It hangs off of `this'.  Must not inadvertently convert from a
+			 method call to data ref.  */
+		      if (innermost_block == 0
+			  || contained_in (sym.block, innermost_block))
+			innermost_block = sym.block;
+		      write_exp_elt_opcode (pstate, OP_THIS);
+		      write_exp_elt_opcode (pstate, OP_THIS);
+		      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
+		      write_exp_string (pstate, $1);
+		      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
+		    }
+		  else
+		    {
+		      /* Lookup foreign name in global static symbols.  */
+		      msymbol = lookup_bound_minimal_symbol (copy);
+		      if (msymbol.minsym != NULL)
+			write_exp_msymbol (pstate, msymbol);
+		      else if (!have_full_symbols () && !have_partial_symbols ())
+			error (_("No symbol table is loaded.  Use the \"file\" command"));
+		      else
+			error (_("No symbol \"%s\" in current context."), copy);
+		    }
+		  }
+|	TypeExp '.' IdentifierExp
+			{ struct type *type = check_typedef ($1);
+
+			  /* Check if the qualified name is in the global
+			     context.  However if the symbol has not already
+			     been resolved, it's not likely to be found.  */
+			  if (TYPE_CODE (type) == TYPE_CODE_MODULE)
+			    {
+			      struct bound_minimal_symbol msymbol;
+			      struct block_symbol sym;
+			      const char *type_name = TYPE_SAFE_NAME (type);
+			      int type_name_len = strlen (type_name);
+			      char *name;
+
+			      name = xstrprintf ("%.*s.%.*s",
+						 type_name_len, type_name,
+						 $3.length, $3.ptr);
+			      make_cleanup (xfree, name);
+
+			      sym =
+				lookup_symbol (name, (const struct block *) NULL,
+					       VAR_DOMAIN, NULL);
+			      if (sym.symbol)
+				{
+				  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+				  write_exp_elt_block (pstate, sym.block);
+				  write_exp_elt_sym (pstate, sym.symbol);
+				  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
+				  break;
+				}
+
+			      msymbol = lookup_bound_minimal_symbol (name);
+			      if (msymbol.minsym != NULL)
+				write_exp_msymbol (pstate, msymbol);
+			      else if (!have_full_symbols () && !have_partial_symbols ())
+				error (_("No symbol table is loaded.  Use the \"file\" command."));
+			      else
+				error (_("No symbol \"%s\" in current context."), name);
+			    }
+
+			  /* Check if the qualified name resolves as a member
+			     of an aggregate or an enum type.  */
+			  if (!type_aggregate_p (type))
+			    error (_("`%s' is not defined as an aggregate type."),
+				   TYPE_SAFE_NAME (type));
+
+			  write_exp_elt_opcode (pstate, OP_SCOPE);
+			  write_exp_elt_type (pstate, type);
+			  write_exp_string (pstate, $3);
+			  write_exp_elt_opcode (pstate, OP_SCOPE);
+			}
 |	DOLLAR_VARIABLE
 		{ write_dollar_variable (pstate, $1); }
 |	NAME_OR_INT
@@ -514,6 +560,8 @@ PrimaryExpression:
 		  write_exp_elt_longcst (pstate, (LONGEST) 0);
 		  write_exp_elt_longcst (pstate, (LONGEST) $1 - 1);
 		  write_exp_elt_opcode (pstate, OP_ARRAY); }
+|	TYPEOF_KEYWORD '(' Expression ')'
+		{ write_exp_elt_opcode (pstate, OP_TYPEOF); }
 ;
 
 ArrayLiteral:
@@ -523,20 +571,6 @@ ArrayLiteral:
 
 IdentifierExp:
 	IDENTIFIER
-|	IdentifierExp '.' IDENTIFIER
-		{ $$.length = $1.length + $3.length + 1;
-		  if ($1.ptr + $1.length + 1 == $3.ptr
-		      && $1.ptr[$1.length] == '.')
-		    $$.ptr = $1.ptr;  /* Optimization.  */
-		  else
-		    {
-		      char *buf = malloc ($$.length + 1);
-		      make_cleanup (free, buf);
-		      sprintf (buf, "%.*s.%.*s",
-		               $1.length, $1.ptr, $3.length, $3.ptr);
-		      $$.ptr = buf;
-		    }
-		}
 ;
 
 StringExp:
@@ -552,7 +586,7 @@ StringExp:
 
 		  vec->type = $1.type;
 		  vec->length = $1.length;
-		  vec->ptr = malloc ($1.length + 1);
+		  vec->ptr = (char *) malloc ($1.length + 1);
 		  memcpy (vec->ptr, $1.ptr, $1.length + 1);
 		}
 |	StringExp STRING_LITERAL
@@ -560,10 +594,10 @@ StringExp:
 		     for convenience.  */
 		  char *p;
 		  ++$$.len;
-		  $$.tokens = realloc ($$.tokens,
-				       $$.len * sizeof (struct typed_stoken));
+		  $$.tokens
+		    = XRESIZEVEC (struct typed_stoken, $$.tokens, $$.len);
 
-		  p = malloc ($2.length + 1);
+		  p = (char *) malloc ($2.length + 1);
 		  memcpy (p, $2.ptr, $2.length + 1);
 
 		  $$.tokens[$$.len - 1].type = $2.type;
@@ -573,7 +607,9 @@ StringExp:
 ;
 
 TypeExp:
-	BasicType
+	'(' TypeExp ')'
+		{ /* Do nothing.  */ }
+|	BasicType
 		{ write_exp_elt_opcode (pstate, OP_TYPE);
 		  write_exp_elt_type (pstate, $1);
 		  write_exp_elt_opcode (pstate, OP_TYPE); }
@@ -601,46 +637,21 @@ BasicType2:
 BasicType:
 	TYPENAME
 		{ $$ = $1.type; }
-|	CLASS_KEYWORD IdentifierExp
-		{ $$ = lookup_struct (copy_name ($2),
-				      expression_context_block); }
-|	CLASS_KEYWORD COMPLETE
-		{ mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
-		  $$ = NULL; }
-|	CLASS_KEYWORD IdentifierExp COMPLETE
-		{ mark_completion_tag (TYPE_CODE_STRUCT, $2.ptr, $2.length);
-		  $$ = NULL; }
-|	STRUCT_KEYWORD IdentifierExp
-		{ $$ = lookup_struct (copy_name ($2),
-				      expression_context_block); }
-|	STRUCT_KEYWORD COMPLETE
-		{ mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
-		  $$ = NULL; }
-|	STRUCT_KEYWORD IdentifierExp COMPLETE
-		{ mark_completion_tag (TYPE_CODE_STRUCT, $2.ptr, $2.length);
-		  $$ = NULL; }
-|	UNION_KEYWORD IdentifierExp
-		{ $$ = lookup_union (copy_name ($2),
-				     expression_context_block); }
-|	UNION_KEYWORD COMPLETE
-		{ mark_completion_tag (TYPE_CODE_UNION, "", 0);
-		  $$ = NULL; }
-|	UNION_KEYWORD IdentifierExp COMPLETE
-		{ mark_completion_tag (TYPE_CODE_UNION, $2.ptr, $2.length);
-		  $$ = NULL; }
-|	ENUM_KEYWORD IdentifierExp
-		{ $$ = lookup_enum (copy_name ($2),
-				    expression_context_block); }
-|	ENUM_KEYWORD COMPLETE
-		{ mark_completion_tag (TYPE_CODE_ENUM, "", 0);
-		  $$ = NULL; }
-|	ENUM_KEYWORD IdentifierExp COMPLETE
-		{ mark_completion_tag (TYPE_CODE_ENUM, $2.ptr, $2.length);
-		  $$ = NULL; }
 ;
 
 %%
 
+/* Return true if the type is aggregate-like.  */
+
+static int
+type_aggregate_p (struct type *type)
+{
+  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	  || TYPE_CODE (type) == TYPE_CODE_UNION
+	  || (TYPE_CODE (type) == TYPE_CODE_ENUM
+	      && TYPE_DECLARED_CLASS (type)));
+}
+
 /* Take care of parsing a number (anything that starts with a digit).
    Set yylval and return the token type; update lexptr.
    LEN is the number of characters in it.  */
@@ -670,7 +681,6 @@ parse_number (struct parser_state *ps, c
 
   if (parsed_float)
     {
-      const struct builtin_d_type *builtin_d_types;
       const char *suffix;
       int suffix_len;
       char *s, *sp;
@@ -936,7 +946,7 @@ parse_string_or_char (const char *tokptr
   else
     value->type = C_STRING;
 
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -1013,293 +1023,6 @@ static const struct token ident_tokens[]
     {"template", TEMPLATE_KEYWORD, OP_NULL},
   };
 
-/* If NAME is a type name in this scope, return it.  */
-
-static struct type *
-d_type_from_name (struct stoken name)
-{
-  struct symbol *sym;
-  char *copy = copy_name (name);
-
-  sym = lookup_symbol (copy, expression_context_block,
-		       STRUCT_DOMAIN, NULL);
-  if (sym != NULL)
-    return SYMBOL_TYPE (sym);
-
-  return NULL;
-}
-
-/* If NAME is a module name in this scope, return it.  */
-
-static struct type *
-d_module_from_name (struct stoken name)
-{
-  struct symbol *sym;
-  char *copy = copy_name (name);
-
-  sym = lookup_symbol (copy, expression_context_block,
-		       MODULE_DOMAIN, NULL);
-  if (sym != NULL)
-    return SYMBOL_TYPE (sym);
-
-  return NULL;
-}
-
-/* If NAME is a valid variable name in this scope, push it and return 1.
-   Otherwise, return 0.  */
-
-static int
-push_variable (struct parser_state *ps, struct stoken name)
-{
-  char *copy = copy_name (name);
-  struct field_of_this_result is_a_field_of_this;
-  struct symbol *sym;
-  sym = lookup_symbol (copy, expression_context_block, VAR_DOMAIN,
-                       &is_a_field_of_this);
-  if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-    {
-      if (symbol_read_needs_frame (sym))
-        {
-          if (innermost_block == 0 ||
-              contained_in (block_found, innermost_block))
-            innermost_block = block_found;
-        }
-
-      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      /* We want to use the selected frame, not another more inner frame
-         which happens to be in the same block.  */
-      write_exp_elt_block (ps, NULL);
-      write_exp_elt_sym (ps, sym);
-      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      return 1;
-    }
-  if (is_a_field_of_this.type != NULL)
-    {
-      /* It hangs off of `this'.  Must not inadvertently convert from a
-         method call to data ref.  */
-      if (innermost_block == 0 ||
-          contained_in (block_found, innermost_block))
-        innermost_block = block_found;
-      write_exp_elt_opcode (ps, OP_THIS);
-      write_exp_elt_opcode (ps, OP_THIS);
-      write_exp_elt_opcode (ps, STRUCTOP_PTR);
-      write_exp_string (ps, name);
-      write_exp_elt_opcode (ps, STRUCTOP_PTR);
-      return 1;
-    }
-  return 0;
-}
-
-/* Assuming a reference expression has been pushed, emit the
-   STRUCTOP_PTR ops to access the field named NAME.  If NAME is a
-   qualified name (has '.'), generate a field access for each part.  */
-
-static void
-push_fieldnames (struct parser_state *ps, struct stoken name)
-{
-  int i;
-  struct stoken token;
-  token.ptr = name.ptr;
-  for (i = 0;  ;  i++)
-    {
-      if (i == name.length || name.ptr[i] == '.')
-        {
-          /* token.ptr is start of current field name.  */
-          token.length = &name.ptr[i] - token.ptr;
-          write_exp_elt_opcode (ps, STRUCTOP_PTR);
-          write_exp_string (ps, token);
-          write_exp_elt_opcode (ps, STRUCTOP_PTR);
-          token.ptr += token.length + 1;
-        }
-      if (i >= name.length)
-        break;
-    }
-}
-
-/* Helper routine for push_expression_name.  Handle a TYPE symbol,
-   where DOT_INDEX is the index of the first '.' if NAME is part of
-   a qualified type.  */
-
-static void
-push_type_name (struct parser_state *ps, struct type *type,
-		struct stoken name, int dot_index)
-{
-  if (dot_index == name.length)
-    {
-      write_exp_elt_opcode (ps, OP_TYPE);
-      write_exp_elt_type (ps, type);
-      write_exp_elt_opcode (ps, OP_TYPE);
-    }
-  else
-    {
-      struct stoken token;
-
-      token.ptr = name.ptr;
-      token.length = dot_index;
-
-      dot_index = 0;
-
-      while (dot_index < name.length && name.ptr[dot_index] != '.')
-	dot_index++;
-      token.ptr = name.ptr;
-      token.length = dot_index;
-
-      write_exp_elt_opcode (ps, OP_SCOPE);
-      write_exp_elt_type (ps, type);
-      write_exp_string (ps, token);
-      write_exp_elt_opcode (ps, OP_SCOPE);
-
-      if (dot_index < name.length)
-	{
-	  dot_index++;
-	  name.ptr += dot_index;
-	  name.length -= dot_index;
-	  push_fieldnames (ps, name);
-	}
-    }
-}
-
-/* Helper routine for push_expression_name.  Like push_type_name,
-   but used when TYPE is a module.  Returns 1 on pushing the symbol.  */
-
-static int
-push_module_name (struct parser_state *ps, struct type *module,
-		  struct stoken name, int dot_index)
-{
-  if (dot_index == name.length)
-    {
-      write_exp_elt_opcode (ps, OP_TYPE);
-      write_exp_elt_type (ps, module);
-      write_exp_elt_opcode (ps, OP_TYPE);
-      return 1;
-    }
-  else
-    {
-      struct symbol *sym;
-      char *copy;
-
-      copy = copy_name (name);
-      sym = lookup_symbol_in_static_block (copy, expression_context_block,
-					   VAR_DOMAIN);
-      if (sym != NULL)
-	sym = lookup_global_symbol (copy, expression_context_block,
-				    VAR_DOMAIN);
-
-      if (sym != NULL)
-	{
-	  if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-	    {
-	      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-	      write_exp_elt_block (ps, NULL);
-	      write_exp_elt_sym (ps, sym);
-	      write_exp_elt_opcode (ps, OP_VAR_VALUE);
-	    }
-	  else
-	    {
-	      write_exp_elt_opcode (ps, OP_TYPE);
-	      write_exp_elt_type (ps, SYMBOL_TYPE (sym));
-	      write_exp_elt_opcode (ps, OP_TYPE);
-	    }
-	  return 1;
-	}
-    }
-
-  return 0;
-}
-
-/* Handle NAME in an expression (or LHS), which could be a
-   variable, type, or module.  */
-
-static void
-push_expression_name (struct parser_state *ps, struct stoken name)
-{
-  struct stoken token;
-  struct type *typ;
-  struct bound_minimal_symbol msymbol;
-  char *copy;
-  int doti;
-
-  /* Handle VAR, which could be local or global.  */
-  if (push_variable (ps, name) != 0)
-    return;
-
-  /* Handle MODULE.  */
-  typ = d_module_from_name (name);
-  if (typ != NULL)
-    {
-      if (push_module_name (ps, typ, name, name.length) != 0)
-	return;
-    }
-
-  /* Handle TYPE.  */
-  typ = d_type_from_name (name);
-  if (typ != NULL)
-    {
-      push_type_name (ps, typ, name, name.length);
-      return;
-    }
-
-  /* Handle VAR.FIELD1..FIELDN.  */
-  for (doti = 0;  doti < name.length;  doti++)
-    {
-      if (name.ptr[doti] == '.')
-	{
-	  token.ptr = name.ptr;
-	  token.length = doti;
-
-	  if (push_variable (ps, token) != 0)
-	    {
-	      token.ptr = name.ptr + doti + 1;
-	      token.length = name.length - doti - 1;
-	      push_fieldnames (ps, token);
-	      return;
-	    }
-	  break;
-	}
-    }
-
-  /* Continue looking if we found a '.' in the name.  */
-  if (doti < name.length)
-    {
-      token.ptr = name.ptr;
-      for (;;)
-	{
-	  token.length = doti;
-
-	  /* Handle PACKAGE.MODULE.  */
-	  typ = d_module_from_name (token);
-	  if (typ != NULL)
-	    {
-	      if (push_module_name (ps, typ, name, doti) != 0)
-		return;
-	    }
-	  /* Handle TYPE.FIELD1..FIELDN.  */
-	  typ = d_type_from_name (token);
-	  if (typ != NULL)
-	    {
-	      push_type_name (ps, typ, name, doti);
-	      return;
-	    }
-
-	  if (doti >= name.length)
-	    break;
-	  doti++;   /* Skip '.'  */
-	  while (doti < name.length && name.ptr[doti] != '.')
-	    doti++;
-	}
-    }
-
-  /* Lookup foreign name in global static symbols.  */
-  copy  = copy_name (name);
-  msymbol = lookup_bound_minimal_symbol (copy);
-  if (msymbol.minsym != NULL)
-    write_exp_msymbol (ps, msymbol);
-  else if (!have_full_symbols () && !have_partial_symbols ())
-    error (_("No symbol table is loaded.  Use the \"file\" command"));
-  else
-    error (_("No symbol \"%s\" in current context."), copy);
-}
-
 /* This is set if a NAME token appeared at the very end of the input
    string, with no whitespace separating the name from the EOF.  This
    is used only when parsing to do field name completion.  */
@@ -1312,7 +1035,7 @@ static int last_was_structop;
 /* Read one token, getting characters through lexptr.  */
 
 static int
-yylex (void)
+lex_one_token (struct parser_state *par_state)
 {
   int c;
   int namelen;
@@ -1441,12 +1164,12 @@ yylex (void)
 	    /* We will take any letters or digits, ignoring any embedded '_'.
 	       parse_number will complain if past the radix, or if L or U are
 	       not final.  */
-	    else if ((*p < '0' || *p > '9') && (*p != '_') &&
-		     ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z')))
+	    else if ((*p < '0' || *p > '9') && (*p != '_')
+		     && ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z')))
 	      break;
 	  }
 
-	toktype = parse_number (pstate, tokstart, p - tokstart,
+	toktype = parse_number (par_state, tokstart, p - tokstart,
 				got_dot|got_e, &yylval);
 	if (toktype == ERROR)
 	  {
@@ -1577,8 +1300,8 @@ yylex (void)
     return DOLLAR_VARIABLE;
 
   yylval.tsym.type
-    = language_lookup_primitive_type (parse_language (pstate),
-				      parse_gdbarch (pstate), copy);
+    = language_lookup_primitive_type (parse_language (par_state),
+				      parse_gdbarch (par_state), copy);
   if (yylval.tsym.type != NULL)
     return TYPENAME;
 
@@ -1589,7 +1312,7 @@ yylex (void)
       || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10))
     {
       YYSTYPE newlval;	/* Its value is ignored.  */
-      int hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
+      int hextype = parse_number (par_state, tokstart, namelen, 0, &newlval);
       if (hextype == INTEGER_LITERAL)
 	return NAME_OR_INT;
     }
@@ -1600,6 +1323,299 @@ yylex (void)
   return IDENTIFIER;
 }
 
+/* An object of this type is pushed on a FIFO by the "outer" lexer.  */
+typedef struct
+{
+  int token;
+  YYSTYPE value;
+} token_and_value;
+
+DEF_VEC_O (token_and_value);
+
+/* A FIFO of tokens that have been read but not yet returned to the
+   parser.  */
+static VEC (token_and_value) *token_fifo;
+
+/* Non-zero if the lexer should return tokens from the FIFO.  */
+static int popping;
+
+/* Temporary storage for yylex; this holds symbol names as they are
+   built up.  */
+static struct obstack name_obstack;
+
+/* Classify an IDENTIFIER token.  The contents of the token are in `yylval'.
+   Updates yylval and returns the new token type.  BLOCK is the block
+   in which lookups start; this can be NULL to mean the global scope.  */
+
+static int
+classify_name (struct parser_state *par_state, const struct block *block)
+{
+  struct block_symbol sym;
+  char *copy;
+  struct field_of_this_result is_a_field_of_this;
+
+  copy = copy_name (yylval.sval);
+
+  sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
+  if (sym.symbol && SYMBOL_CLASS (sym.symbol) == LOC_TYPEDEF)
+    {
+      yylval.tsym.type = SYMBOL_TYPE (sym.symbol);
+      return TYPENAME;
+    }
+  else if (sym.symbol == NULL)
+    {
+      /* Look-up first for a module name, then a type.  */
+      sym = lookup_symbol (copy, block, MODULE_DOMAIN, NULL);
+      if (sym.symbol == NULL)
+	sym = lookup_symbol (copy, block, STRUCT_DOMAIN, NULL);
+
+      if (sym.symbol != NULL)
+	{
+	  yylval.tsym.type = SYMBOL_TYPE (sym.symbol);
+	  return TYPENAME;
+	}
+
+      return UNKNOWN_NAME;
+    }
+
+  return IDENTIFIER;
+}
+
+/* Like classify_name, but used by the inner loop of the lexer, when a
+   name might have already been seen.  CONTEXT is the context type, or
+   NULL if this is the first component of a name.  */
+
+static int
+classify_inner_name (struct parser_state *par_state,
+		     const struct block *block, struct type *context)
+{
+  struct type *type;
+  char *copy;
+
+  if (context == NULL)
+    return classify_name (par_state, block);
+
+  type = check_typedef (context);
+  if (!type_aggregate_p (type))
+    return ERROR;
+
+  copy = copy_name (yylval.ssym.stoken);
+  yylval.ssym.sym = d_lookup_nested_symbol (type, copy, block);
+
+  if (yylval.ssym.sym.symbol == NULL)
+    return ERROR;
+
+  if (SYMBOL_CLASS (yylval.ssym.sym.symbol) == LOC_TYPEDEF)
+    {
+      yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym.symbol);
+      return TYPENAME;
+    }
+
+  return IDENTIFIER;
+}
+
+/* The outer level of a two-level lexer.  This calls the inner lexer
+   to return tokens.  It then either returns these tokens, or
+   aggregates them into a larger token.  This lets us work around a
+   problem in our parsing approach, where the parser could not
+   distinguish between qualified names and qualified types at the
+   right point.  */
+
+static int
+yylex (void)
+{
+  token_and_value current;
+  int last_was_dot;
+  struct type *context_type = NULL;
+  int last_to_examine, next_to_examine, checkpoint;
+  const struct block *search_block;
+
+  if (popping && !VEC_empty (token_and_value, token_fifo))
+    goto do_pop;
+  popping = 0;
+
+  /* Read the first token and decide what to do.  */
+  current.token = lex_one_token (pstate);
+  if (current.token != IDENTIFIER && current.token != '.')
+    return current.token;
+
+  /* Read any sequence of alternating "." and identifier tokens into
+     the token FIFO.  */
+  current.value = yylval;
+  VEC_safe_push (token_and_value, token_fifo, &current);
+  last_was_dot = current.token == '.';
+
+  while (1)
+    {
+      current.token = lex_one_token (pstate);
+      current.value = yylval;
+      VEC_safe_push (token_and_value, token_fifo, &current);
+
+      if ((last_was_dot && current.token != IDENTIFIER)
+	  || (!last_was_dot && current.token != '.'))
+	break;
+
+      last_was_dot = !last_was_dot;
+    }
+  popping = 1;
+
+  /* We always read one extra token, so compute the number of tokens
+     to examine accordingly.  */
+  last_to_examine = VEC_length (token_and_value, token_fifo) - 2;
+  next_to_examine = 0;
+
+  current = *VEC_index (token_and_value, token_fifo, next_to_examine);
+  ++next_to_examine;
+
+  /* If we are not dealing with a typename, now is the time to find out.  */
+  if (current.token == IDENTIFIER)
+    {
+      yylval = current.value;
+      current.token = classify_name (pstate, expression_context_block);
+      current.value = yylval;
+    }
+
+  /* If the IDENTIFIER is not known, it could be a package symbol,
+     first try building up a name until we find the qualified module.  */
+  if (current.token == UNKNOWN_NAME)
+    {
+      obstack_free (&name_obstack, obstack_base (&name_obstack));
+      obstack_grow (&name_obstack, current.value.sval.ptr,
+		    current.value.sval.length);
+
+      last_was_dot = 0;
+
+      while (next_to_examine <= last_to_examine)
+	{
+	  token_and_value *next;
+
+	  next = VEC_index (token_and_value, token_fifo, next_to_examine);
+	  ++next_to_examine;
+
+	  if (next->token == IDENTIFIER && last_was_dot)
+	    {
+	      /* Update the partial name we are constructing.  */
+              obstack_grow_str (&name_obstack, ".");
+	      obstack_grow (&name_obstack, next->value.sval.ptr,
+			    next->value.sval.length);
+
+	      yylval.sval.ptr = (char *) obstack_base (&name_obstack);
+	      yylval.sval.length = obstack_object_size (&name_obstack);
+
+	      current.token = classify_name (pstate, expression_context_block);
+	      current.value = yylval;
+
+	      /* We keep going until we find a TYPENAME.  */
+	      if (current.token == TYPENAME)
+		{
+		  /* Install it as the first token in the FIFO.  */
+		  VEC_replace (token_and_value, token_fifo, 0, &current);
+		  VEC_block_remove (token_and_value, token_fifo, 1,
+				    next_to_examine - 1);
+		  break;
+		}
+	    }
+	  else if (next->token == '.' && !last_was_dot)
+	    last_was_dot = 1;
+	  else
+	    {
+	      /* We've reached the end of the name.  */
+	      break;
+	    }
+	}
+
+      /* Reset our current token back to the start, if we found nothing
+	 this means that we will just jump to do pop.  */
+      current = *VEC_index (token_and_value, token_fifo, 0);
+      next_to_examine = 1;
+    }
+  if (current.token != TYPENAME && current.token != '.')
+    goto do_pop;
+
+  obstack_free (&name_obstack, obstack_base (&name_obstack));
+  checkpoint = 0;
+  if (current.token == '.')
+    search_block = NULL;
+  else
+    {
+      gdb_assert (current.token == TYPENAME);
+      search_block = expression_context_block;
+      obstack_grow (&name_obstack, current.value.sval.ptr,
+		    current.value.sval.length);
+      context_type = current.value.tsym.type;
+      checkpoint = 1;
+    }
+
+  last_was_dot = current.token == '.';
+
+  while (next_to_examine <= last_to_examine)
+    {
+      token_and_value *next;
+
+      next = VEC_index (token_and_value, token_fifo, next_to_examine);
+      ++next_to_examine;
+
+      if (next->token == IDENTIFIER && last_was_dot)
+	{
+	  int classification;
+
+	  yylval = next->value;
+	  classification = classify_inner_name (pstate, search_block,
+						context_type);
+	  /* We keep going until we either run out of names, or until
+	     we have a qualified name which is not a type.  */
+	  if (classification != TYPENAME && classification != IDENTIFIER)
+	    break;
+
+	  /* Accept up to this token.  */
+	  checkpoint = next_to_examine;
+
+	  /* Update the partial name we are constructing.  */
+	  if (context_type != NULL)
+	    {
+	      /* We don't want to put a leading "." into the name.  */
+              obstack_grow_str (&name_obstack, ".");
+	    }
+	  obstack_grow (&name_obstack, next->value.sval.ptr,
+			next->value.sval.length);
+
+	  yylval.sval.ptr = (char *) obstack_base (&name_obstack);
+	  yylval.sval.length = obstack_object_size (&name_obstack);
+	  current.value = yylval;
+	  current.token = classification;
+
+	  last_was_dot = 0;
+
+	  if (classification == IDENTIFIER)
+	    break;
+
+	  context_type = yylval.tsym.type;
+	}
+      else if (next->token == '.' && !last_was_dot)
+	last_was_dot = 1;
+      else
+	{
+	  /* We've reached the end of the name.  */
+	  break;
+	}
+    }
+
+  /* If we have a replacement token, install it as the first token in
+     the FIFO, and delete the other constituent tokens.  */
+  if (checkpoint > 0)
+    {
+      VEC_replace (token_and_value, token_fifo, 0, &current);
+      if (checkpoint > 1)
+	VEC_block_remove (token_and_value, token_fifo, 1, checkpoint - 1);
+    }
+
+ do_pop:
+  current = *VEC_index (token_and_value, token_fifo, 0);
+  VEC_ordered_remove (token_and_value, token_fifo, 0);
+  yylval = current.value;
+  return current.token;
+}
+
 int
 d_parse (struct parser_state *par_state)
 {
@@ -1620,6 +1636,11 @@ d_parse (struct parser_state *par_state)
   last_was_structop = 0;
   saw_name_at_eof = 0;
 
+  VEC_free (token_and_value, token_fifo);
+  popping = 0;
+  obstack_init (&name_obstack);
+  make_cleanup_obstack_free (&name_obstack);
+
   result = yyparse ();
   do_cleanups (back_to);
   return result;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dfp.c ./gdb/dfp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dfp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dfp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Decimal floating point support for GDB.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dfp.h ./gdb/dfp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dfp.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dfp.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Decimal floating point support for GDB.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,9 @@
 #ifndef DFP_H
 #define DFP_H
 
+#include "doublest.h"    /* For DOUBLEST.  */
+#include "expression.h"  /* For enum exp_opcode.  */
+
 /* When using decimal128, this is the maximum string length + 1
  * (value comes from libdecnumber's DECIMAL128_String constant).  */
 #define MAX_DECIMAL_STRING  43
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dicos-tdep.c ./gdb/dicos-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dicos-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dicos-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent, architecture-independent code for DICOS, for GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,8 +27,6 @@
 void
 dicos_init_abi (struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   set_solib_ops (gdbarch, &solib_target_so_ops);
 
   /* Every process, although has its own address space, sees the same
@@ -90,7 +88,7 @@ dicos_load_module_p (bfd *abfd, int head
     {
       long i, symcount;
 
-      symbol_table = xmalloc (storage_needed);
+      symbol_table = (asymbol **) xmalloc (storage_needed);
       symcount = bfd_canonicalize_symtab (abfd, symbol_table);
 
       if (symcount < 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dicos-tdep.h ./gdb/dicos-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dicos-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dicos-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent, architecture-independent code for DICOS, for GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dictionary.c ./gdb/dictionary.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dictionary.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dictionary.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for name->symbol lookups in GDB.
    
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
    Inc.
@@ -361,7 +361,7 @@ dict_create_hashed (struct obstack *obst
   struct symbol **buckets;
   const struct pending *list_counter;
 
-  retval = obstack_alloc (obstack, sizeof (struct dictionary));
+  retval = XOBNEW (obstack, struct dictionary);
   DICT_VECTOR (retval) = &dict_hashed_vector;
 
   /* Calculate the number of symbols, and allocate space for them.  */
@@ -373,7 +373,7 @@ dict_create_hashed (struct obstack *obst
     }
   nbuckets = DICT_HASHTABLE_SIZE (nsyms);
   DICT_HASHED_NBUCKETS (retval) = nbuckets;
-  buckets = obstack_alloc (obstack, nbuckets * sizeof (struct symbol *));
+  buckets = XOBNEWVEC (obstack, struct symbol *, nbuckets);
   memset (buckets, 0, nbuckets * sizeof (struct symbol *));
   DICT_HASHED_BUCKETS (retval) = buckets;
 
@@ -399,13 +399,12 @@ dict_create_hashed (struct obstack *obst
 extern struct dictionary *
 dict_create_hashed_expandable (void)
 {
-  struct dictionary *retval;
+  struct dictionary *retval = XNEW (struct dictionary);
 
-  retval = xmalloc (sizeof (struct dictionary));
   DICT_VECTOR (retval) = &dict_hashed_expandable_vector;
   DICT_HASHED_NBUCKETS (retval) = DICT_EXPANDABLE_INITIAL_CAPACITY;
-  DICT_HASHED_BUCKETS (retval) = xcalloc (DICT_EXPANDABLE_INITIAL_CAPACITY,
-					  sizeof (struct symbol *));
+  DICT_HASHED_BUCKETS (retval) = XCNEWVEC (struct symbol *,
+					   DICT_EXPANDABLE_INITIAL_CAPACITY);
   DICT_HASHED_EXPANDABLE_NSYMS (retval) = 0;
 
   return retval;
@@ -425,7 +424,7 @@ dict_create_linear (struct obstack *obst
   struct symbol **syms;
   const struct pending *list_counter;
 
-  retval = obstack_alloc (obstack, sizeof (struct dictionary));
+  retval = XOBNEW (obstack, struct dictionary);
   DICT_VECTOR (retval) = &dict_linear_vector;
 
   /* Calculate the number of symbols, and allocate space for them.  */
@@ -436,7 +435,7 @@ dict_create_linear (struct obstack *obst
       nsyms += list_counter->nsyms;
     }
   DICT_LINEAR_NSYMS (retval) = nsyms;
-  syms = obstack_alloc (obstack, nsyms * sizeof (struct symbol *));
+  syms = XOBNEWVEC (obstack, struct symbol *, nsyms );
   DICT_LINEAR_SYMS (retval) = syms;
 
   /* Now fill in the symbols.  Start filling in from the back, so as
@@ -464,16 +463,13 @@ dict_create_linear (struct obstack *obst
 struct dictionary *
 dict_create_linear_expandable (void)
 {
-  struct dictionary *retval;
+  struct dictionary *retval = XNEW (struct dictionary);
 
-  retval = xmalloc (sizeof (struct dictionary));
   DICT_VECTOR (retval) = &dict_linear_expandable_vector;
   DICT_LINEAR_NSYMS (retval) = 0;
-  DICT_LINEAR_EXPANDABLE_CAPACITY (retval)
-    = DICT_EXPANDABLE_INITIAL_CAPACITY;
+  DICT_LINEAR_EXPANDABLE_CAPACITY (retval) = DICT_EXPANDABLE_INITIAL_CAPACITY;
   DICT_LINEAR_SYMS (retval)
-    = xmalloc (DICT_LINEAR_EXPANDABLE_CAPACITY (retval)
-	       * sizeof (struct symbol *));
+    = XNEWVEC (struct symbol *, DICT_LINEAR_EXPANDABLE_CAPACITY (retval));
 
   return retval;
 }
@@ -754,9 +750,8 @@ expand_hashtable (struct dictionary *dic
 {
   int old_nbuckets = DICT_HASHED_NBUCKETS (dict);
   struct symbol **old_buckets = DICT_HASHED_BUCKETS (dict);
-  int new_nbuckets = 2*old_nbuckets + 1;
-  struct symbol **new_buckets = xcalloc (new_nbuckets,
-					 sizeof (struct symbol *));
+  int new_nbuckets = 2 * old_nbuckets + 1;
+  struct symbol **new_buckets = XCNEWVEC (struct symbol *, new_nbuckets);
   int i;
 
   DICT_HASHED_NBUCKETS (dict) = new_nbuckets;
@@ -942,9 +937,8 @@ add_symbol_linear_expandable (struct dic
     {
       DICT_LINEAR_EXPANDABLE_CAPACITY (dict) *= 2;
       DICT_LINEAR_SYMS (dict)
-	= xrealloc (DICT_LINEAR_SYMS (dict),
-		    DICT_LINEAR_EXPANDABLE_CAPACITY (dict)
-		    * sizeof (struct symbol *));
+	= XRESIZEVEC (struct symbol *, DICT_LINEAR_SYMS (dict),
+		      DICT_LINEAR_EXPANDABLE_CAPACITY (dict));
     }
 
   DICT_LINEAR_SYM (dict, nsyms - 1) = sym;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dictionary.h ./gdb/dictionary.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dictionary.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dictionary.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for name->symbol lookups in GDB.
    
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
    Inc.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dink32-rom.c ./gdb/dink32-rom.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dink32-rom.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dink32-rom.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,179 +0,0 @@
-/* Remote debugging interface for DINK32 (PowerPC) ROM monitor for
-   GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "symfile.h" /* For generic_load() */
-#include "inferior.h"
-#include "regcache.h"
-
-static void
-dink32_supply_register (struct regcache *regcache, char *regname,
-			int regnamelen, char *val, int vallen)
-{
-  int regno = 0;
-
-  if (regnamelen < 2 || regnamelen > 4)
-    return;
-
-  switch (regname[0])
-    {
-    case 'R':
-      if (regname[1] < '0' || regname[1] > '9')
-	return;
-      if (regnamelen == 2)
-	regno = regname[1] - '0';
-      else if (regnamelen == 3 && regname[2] >= '0' && regname[2] <= '9')
-	regno = (regname[1] - '0') * 10 + (regname[2] - '0');
-      else
-	return;
-      break;
-    case 'F':
-      if (regname[1] != 'R' || regname[2] < '0' || regname[2] > '9')
-	return;
-      if (regnamelen == 3)
-	regno = 32 + regname[2] - '0';
-      else if (regnamelen == 4 && regname[3] >= '0' && regname[3] <= '9')
-	regno = 32 + (regname[2] - '0') * 10 + (regname[3] - '0');
-      else
-	return;
-      break;
-    case 'I':
-      if (regnamelen != 2 || regname[1] != 'P')
-	return;
-      regno = 64;
-      break;
-    case 'M':
-      if (regnamelen != 3 || regname[1] != 'S' || regname[2] != 'R')
-	return;
-      regno = 65;
-      break;
-    case 'C':
-      if (regnamelen != 2 || regname[1] != 'R')
-	return;
-      regno = 66;
-      break;
-    case 'S':
-      if (regnamelen != 4 || regname[1] != 'P' || regname[2] != 'R')
-	return;
-      else if (regname[3] == '8')
-	regno = 67;
-      else if (regname[3] == '9')
-	regno = 68;
-      else if (regname[3] == '1')
-	regno = 69;
-      else if (regname[3] == '0')
-	regno = 70;
-      else
-	return;
-      break;
-    default:
-      return;
-    }
-
-  monitor_supply_register (regcache, regno, val);
-}
-
-/* This array of registers needs to match the indexes used by GDB.
-   The whole reason this exists is because the various ROM monitors
-   use different names than GDB does, and don't support all the
-   registers either.  */
-
-static char *dink32_regnames[] =
-{
-  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-  "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
-  "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
-
-  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-
-  "srr0", "msr", "cr", "lr", "ctr", "xer", "xer"
-};
-
-static struct target_ops dink32_ops;
-
-static char *dink32_inits[] =
-{"\r", NULL};
-
-static struct monitor_ops dink32_cmds;
-
-static void
-dink32_open (const char *args, int from_tty)
-{
-  monitor_open (args, &dink32_cmds, from_tty);
-}
-
-extern initialize_file_ftype _initialize_dink32_rom; /* -Wmissing-prototypes */
-
-void
-_initialize_dink32_rom (void)
-{
-  dink32_cmds.flags = MO_HEX_PREFIX | MO_GETMEM_NEEDS_RANGE
-    | MO_FILL_USES_ADDR | MO_HANDLE_NL | MO_32_REGS_PAIRED
-    | MO_SETREG_INTERACTIVE | MO_SETMEM_INTERACTIVE
-    | MO_GETMEM_16_BOUNDARY | MO_CLR_BREAK_1_BASED | MO_SREC_ACK
-    | MO_SREC_ACK_ROTATE;
-  dink32_cmds.init = dink32_inits;
-  dink32_cmds.cont = "go +\r";
-  dink32_cmds.step = "tr +\r";
-  dink32_cmds.set_break = "bp 0x%x\r";
-  dink32_cmds.clr_break = "bp %d\r";
-#if 0			/* Would need to follow strict alignment rules..  */
-  dink32_cmds.fill = "mf %x %x %x\r";
-#endif
-  dink32_cmds.setmem.cmdb = "mm -b %x\r";
-  dink32_cmds.setmem.cmdw = "mm -w %x\r";
-  dink32_cmds.setmem.cmdl = "mm %x\r";
-  dink32_cmds.setmem.term = " ?  ";
-  dink32_cmds.getmem.cmdb = "md %x\r";
-  dink32_cmds.getmem.resp_delim = "        ";
-  dink32_cmds.setreg.cmd = "rm %s\r";
-  dink32_cmds.setreg.term = " ?  ";
-  dink32_cmds.getreg.cmd = "rd %s\r";
-  dink32_cmds.getreg.resp_delim = ": ";
-  dink32_cmds.dump_registers = "rd r\r";
-  dink32_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)";
-  dink32_cmds.supply_register = dink32_supply_register;
-  /* S-record download, via "keyboard port".  */
-  dink32_cmds.load = "dl -k\r";
-  dink32_cmds.loadresp = "Set Input Port : set to Keyboard Port\r";
-  dink32_cmds.prompt = "DINK32_603 >>";
-  dink32_cmds.line_term = "\r";
-  dink32_cmds.target = &dink32_ops;
-  dink32_cmds.stopbits = SERIAL_1_STOPBITS;
-  dink32_cmds.regnames = dink32_regnames;
-  dink32_cmds.magic = MONITOR_OPS_MAGIC;
-
-  init_monitor_ops (&dink32_ops);
-
-  dink32_ops.to_shortname = "dink32";
-  dink32_ops.to_longname = "DINK32 monitor";
-  dink32_ops.to_doc = "Debug using the DINK32 monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  dink32_ops.to_open = dink32_open;
-
-  add_target (&dink32_ops);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/.dir-locals.el ./gdb/.dir-locals.el
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/.dir-locals.el	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/.dir-locals.el	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 ;; Emacs settings.
-;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -20,5 +20,10 @@
 	      (indent-tabs-mode . t)))
  (nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")))
  (c-mode . ((c-file-style . "GNU")
-	    (indent-tabs-mode . t)))
+	    (mode . c++)
+	    (indent-tabs-mode . t)
+	    (tab-width . 8)
+	    (c-basic-offset . 2)
+	    (eval . (c-set-offset 'innamespace 0))
+	    ))
 )
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disable-implicit-rules.mk ./gdb/disable-implicit-rules.mk
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disable-implicit-rules.mk	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/disable-implicit-rules.mk	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# An empty .SUFFIXES target clears the suffixes list, which will skip lookups
+# of many implicit rules, speeding up the execution of make.
+.SUFFIXES:
+
+# Disable some implicit pattern rules.
+%: %,v
+%: RCS/%,v
+%: RCS/%
+%: s.%
+%: SCCS/s.%
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm.c ./gdb/disasm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/disasm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Disassemble support for GDB.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,62 +18,156 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "arch-utils.h"
 #include "target.h"
 #include "value.h"
 #include "ui-out.h"
 #include "disasm.h"
 #include "gdbcore.h"
+#include "gdbcmd.h"
 #include "dis-asm.h"
+#include "source.h"
+#include "safe-ctype.h"
+#include <algorithm>
 
 /* Disassemble functions.
    FIXME: We should get rid of all the duplicate code in gdb that does
    the same thing: disassemble_command() and the gdbtk variation.  */
 
-/* This Structure is used to store line number information.
+/* This variable is used to hold the prospective disassembler_options value
+   which is set by the "set disassembler_options" command.  */
+static char *prospective_options = NULL;
+
+/* This structure is used to store line number information for the
+   deprecated /m option.
    We need a different sort of line table from the normal one cuz we can't
    depend upon implicit line-end pc's for lines to do the
    reordering in this function.  */
 
-struct dis_line_entry
+struct deprecated_dis_line_entry
 {
   int line;
   CORE_ADDR start_pc;
   CORE_ADDR end_pc;
 };
 
-/* Like target_read_memory, but slightly different parameters.  */
+/* This Structure is used to store line number information.
+   We need a different sort of line table from the normal one cuz we can't
+   depend upon implicit line-end pc's for lines to do the
+   reordering in this function.  */
+
+struct dis_line_entry
+{
+  struct symtab *symtab;
+  int line;
+};
+
+/* Hash function for dis_line_entry.  */
+
+static hashval_t
+hash_dis_line_entry (const void *item)
+{
+  const struct dis_line_entry *dle = (const struct dis_line_entry *) item;
+
+  return htab_hash_pointer (dle->symtab) + dle->line;
+}
+
+/* Equal function for dis_line_entry.  */
+
 static int
-dis_asm_read_memory (bfd_vma memaddr, gdb_byte *myaddr, unsigned int len,
-		     struct disassemble_info *info)
+eq_dis_line_entry (const void *item_lhs, const void *item_rhs)
 {
-  return target_read_code (memaddr, myaddr, len);
+  const struct dis_line_entry *lhs = (const struct dis_line_entry *) item_lhs;
+  const struct dis_line_entry *rhs = (const struct dis_line_entry *) item_rhs;
+
+  return (lhs->symtab == rhs->symtab
+	  && lhs->line == rhs->line);
 }
 
-/* Like memory_error with slightly different parameters.  */
-static void
-dis_asm_memory_error (int status, bfd_vma memaddr,
-		      struct disassemble_info *info)
+/* Create the table to manage lines for mixed source/disassembly.  */
+
+static htab_t
+allocate_dis_line_table (void)
 {
-  memory_error (status, memaddr);
+  return htab_create_alloc (41,
+			    hash_dis_line_entry, eq_dis_line_entry,
+			    xfree, xcalloc, xfree);
 }
 
-/* Like print_address with slightly different parameters.  */
+/* Add a new dis_line_entry containing SYMTAB and LINE to TABLE.  */
+
 static void
-dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
+add_dis_line_entry (htab_t table, struct symtab *symtab, int line)
 {
-  struct gdbarch *gdbarch = info->application_data;
+  void **slot;
+  struct dis_line_entry dle, *dlep;
 
-  print_address (gdbarch, addr, info->stream);
+  dle.symtab = symtab;
+  dle.line = line;
+  slot = htab_find_slot (table, &dle, INSERT);
+  if (*slot == NULL)
+    {
+      dlep = XNEW (struct dis_line_entry);
+      dlep->symtab = symtab;
+      dlep->line = line;
+      *slot = dlep;
+    }
+}
+
+/* Return non-zero if SYMTAB, LINE are in TABLE.  */
+
+static int
+line_has_code_p (htab_t table, struct symtab *symtab, int line)
+{
+  struct dis_line_entry dle;
+
+  dle.symtab = symtab;
+  dle.line = line;
+  return htab_find (table, &dle) != NULL;
+}
+
+/* Wrapper of target_read_code.  */
+
+int
+gdb_disassembler::dis_asm_read_memory (bfd_vma memaddr, gdb_byte *myaddr,
+				       unsigned int len,
+				       struct disassemble_info *info)
+{
+  return target_read_code (memaddr, myaddr, len);
+}
+
+/* Wrapper of memory_error.  */
+
+void
+gdb_disassembler::dis_asm_memory_error (int err, bfd_vma memaddr,
+					struct disassemble_info *info)
+{
+  gdb_disassembler *self
+    = static_cast<gdb_disassembler *>(info->application_data);
+
+  self->m_err_memaddr = memaddr;
+}
+
+/* Wrapper of print_address.  */
+
+void
+gdb_disassembler::dis_asm_print_address (bfd_vma addr,
+					 struct disassemble_info *info)
+{
+  gdb_disassembler *self
+    = static_cast<gdb_disassembler *>(info->application_data);
+
+  print_address (self->arch (), addr, self->stream ());
 }
 
 static int
 compare_lines (const void *mle1p, const void *mle2p)
 {
-  struct dis_line_entry *mle1, *mle2;
+  struct deprecated_dis_line_entry *mle1, *mle2;
   int val;
 
-  mle1 = (struct dis_line_entry *) mle1p;
-  mle2 = (struct dis_line_entry *) mle2p;
+  mle1 = (struct deprecated_dis_line_entry *) mle1p;
+  mle2 = (struct deprecated_dis_line_entry *) mle2p;
 
   /* End of sequence markers have a line number of 0 but don't want to
      be sorted to the head of the list, instead sort by PC.  */
@@ -92,129 +186,184 @@ compare_lines (const void *mle1p, const 
   return val;
 }
 
-static int
-dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
-	    struct disassemble_info * di,
-	    CORE_ADDR low, CORE_ADDR high,
-	    int how_many, int flags, struct ui_file *stb)
-{
-  int num_displayed = 0;
-  CORE_ADDR pc;
+/* See disasm.h.  */
 
+int
+gdb_pretty_print_disassembler::pretty_print_insn (struct ui_out *uiout,
+						  const struct disasm_insn *insn,
+						  int flags)
+{
   /* parts of the symbolic representation of the address */
   int unmapped;
   int offset;
   int line;
+  int size;
   struct cleanup *ui_out_chain;
+  char *filename = NULL;
+  char *name = NULL;
+  CORE_ADDR pc;
+  struct gdbarch *gdbarch = arch ();
+
+  ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+  pc = insn->addr;
 
-  for (pc = low; pc < high;)
+  if (insn->number != 0)
     {
-      char *filename = NULL;
-      char *name = NULL;
+      uiout->field_fmt ("insn-number", "%u", insn->number);
+      uiout->text ("\t");
+    }
 
-      QUIT;
-      if (how_many >= 0)
+  if ((flags & DISASSEMBLY_SPECULATIVE) != 0)
+    {
+      if (insn->is_speculative)
 	{
-	  if (num_displayed >= how_many)
-	    break;
+	  uiout->field_string ("is-speculative", "?");
+
+	  /* The speculative execution indication overwrites the first
+	     character of the PC prefix.
+	     We assume a PC prefix length of 3 characters.  */
+	  if ((flags & DISASSEMBLY_OMIT_PC) == 0)
+	    uiout->text (pc_prefix (pc) + 1);
 	  else
-	    num_displayed++;
+	    uiout->text ("  ");
 	}
-      ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+      else if ((flags & DISASSEMBLY_OMIT_PC) == 0)
+	uiout->text (pc_prefix (pc));
+      else
+	uiout->text ("   ");
+    }
+  else if ((flags & DISASSEMBLY_OMIT_PC) == 0)
+    uiout->text (pc_prefix (pc));
+  uiout->field_core_addr ("address", gdbarch, pc);
+
+  if (!build_address_symbolic (gdbarch, pc, 0, &name, &offset, &filename,
+			       &line, &unmapped))
+    {
+      /* We don't care now about line, filename and unmapped.  But we might in
+	 the future.  */
+      uiout->text (" <");
+      if ((flags & DISASSEMBLY_OMIT_FNAME) == 0)
+	uiout->field_string ("func-name", name);
+      uiout->text ("+");
+      uiout->field_int ("offset", offset);
+      uiout->text (">:\t");
+    }
+  else
+    uiout->text (":\t");
+
+  if (filename != NULL)
+    xfree (filename);
+  if (name != NULL)
+    xfree (name);
+
+  m_insn_stb.clear ();
 
-      if ((flags & DISASSEMBLY_OMIT_PC) == 0)
-	ui_out_text (uiout, pc_prefix (pc));
-      ui_out_field_core_addr (uiout, "address", gdbarch, pc);
-
-      if (!build_address_symbolic (gdbarch, pc, 0, &name, &offset, &filename,
-				   &line, &unmapped))
-	{
-	  /* We don't care now about line, filename and
-	     unmapped. But we might in the future.  */
-	  ui_out_text (uiout, " <");
-	  if ((flags & DISASSEMBLY_OMIT_FNAME) == 0)
-	    ui_out_field_string (uiout, "func-name", name);
-	  ui_out_text (uiout, "+");
-	  ui_out_field_int (uiout, "offset", offset);
-	  ui_out_text (uiout, ">:\t");
+  if (flags & DISASSEMBLY_RAW_INSN)
+    {
+      CORE_ADDR end_pc;
+      bfd_byte data;
+      int err;
+      const char *spacer = "";
+
+      /* Build the opcodes using a temporary stream so we can
+	 write them out in a single go for the MI.  */
+      m_opcode_stb.clear ();
+
+      size = m_di.print_insn (pc);
+      end_pc = pc + size;
+
+      for (;pc < end_pc; ++pc)
+	{
+	  read_code (pc, &data, 1);
+	  m_opcode_stb.printf ("%s%02x", spacer, (unsigned) data);
+	  spacer = " ";
 	}
-      else
-	ui_out_text (uiout, ":\t");
 
-      if (filename != NULL)
-	xfree (filename);
-      if (name != NULL)
-	xfree (name);
-
-      ui_file_rewind (stb);
-      if (flags & DISASSEMBLY_RAW_INSN)
-        {
-          CORE_ADDR old_pc = pc;
-          bfd_byte data;
-          int status;
-          const char *spacer = "";
-
-          /* Build the opcodes using a temporary stream so we can
-             write them out in a single go for the MI.  */
-          struct ui_file *opcode_stream = mem_fileopen ();
-          struct cleanup *cleanups =
-            make_cleanup_ui_file_delete (opcode_stream);
-
-          pc += gdbarch_print_insn (gdbarch, pc, di);
-          for (;old_pc < pc; old_pc++)
-            {
-              status = (*di->read_memory_func) (old_pc, &data, 1, di);
-              if (status != 0)
-                (*di->memory_error_func) (status, old_pc, di);
-              fprintf_filtered (opcode_stream, "%s%02x",
-                                spacer, (unsigned) data);
-              spacer = " ";
-            }
-          ui_out_field_stream (uiout, "opcodes", opcode_stream);
-          ui_out_text (uiout, "\t");
+      uiout->field_stream ("opcodes", m_opcode_stb);
+      uiout->text ("\t");
+    }
+  else
+    size = m_di.print_insn (pc);
 
-          do_cleanups (cleanups);
-        }
-      else
-        pc += gdbarch_print_insn (gdbarch, pc, di);
-      ui_out_field_stream (uiout, "inst", stb);
-      ui_file_rewind (stb);
-      do_cleanups (ui_out_chain);
-      ui_out_text (uiout, "\n");
+  uiout->field_stream ("inst", m_insn_stb);
+  do_cleanups (ui_out_chain);
+  uiout->text ("\n");
+
+  return size;
+}
+
+static int
+dump_insns (struct gdbarch *gdbarch,
+	    struct ui_out *uiout, CORE_ADDR low, CORE_ADDR high,
+	    int how_many, int flags, CORE_ADDR *end_pc)
+{
+  struct disasm_insn insn;
+  int num_displayed = 0;
+
+  memset (&insn, 0, sizeof (insn));
+  insn.addr = low;
+
+  gdb_pretty_print_disassembler disasm (gdbarch);
+
+  while (insn.addr < high && (how_many < 0 || num_displayed < how_many))
+    {
+      int size;
+
+      size = disasm.pretty_print_insn (uiout, &insn, flags);
+      if (size <= 0)
+	break;
+
+      ++num_displayed;
+      insn.addr += size;
+
+      /* Allow user to bail out with ^C.  */
+      QUIT;
     }
+
+  if (end_pc != NULL)
+    *end_pc = insn.addr;
+
   return num_displayed;
 }
 
 /* The idea here is to present a source-O-centric view of a
    function to the user.  This means that things are presented
    in source order, with (possibly) out of order assembly
-   immediately following.  */
+   immediately following.
+
+   N.B. This view is deprecated.  */
 
 static void
-do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
-			      struct disassemble_info *di, int nlines,
-			      struct linetable_entry *le,
-			      CORE_ADDR low, CORE_ADDR high,
-			      struct symtab *symtab,
-			      int how_many, int flags, struct ui_file *stb)
+do_mixed_source_and_assembly_deprecated
+  (struct gdbarch *gdbarch, struct ui_out *uiout,
+   struct symtab *symtab,
+   CORE_ADDR low, CORE_ADDR high,
+   int how_many, int flags)
 {
   int newlines = 0;
-  struct dis_line_entry *mle;
+  int nlines;
+  struct linetable_entry *le;
+  struct deprecated_dis_line_entry *mle;
   struct symtab_and_line sal;
   int i;
   int out_of_order = 0;
   int next_line = 0;
   int num_displayed = 0;
-  enum print_source_lines_flags psl_flags = 0;
+  print_source_lines_flags psl_flags = 0;
   struct cleanup *ui_out_chain;
   struct cleanup *ui_out_tuple_chain = make_cleanup (null_cleanup, 0);
   struct cleanup *ui_out_list_chain = make_cleanup (null_cleanup, 0);
 
+  gdb_assert (symtab != NULL && SYMTAB_LINETABLE (symtab) != NULL);
+
+  nlines = SYMTAB_LINETABLE (symtab)->nitems;
+  le = SYMTAB_LINETABLE (symtab)->item;
+
   if (flags & DISASSEMBLY_FILENAME)
     psl_flags |= PRINT_SOURCE_LINES_FILENAME;
 
-  mle = (struct dis_line_entry *) alloca (nlines
-					  * sizeof (struct dis_line_entry));
+  mle = (struct deprecated_dis_line_entry *)
+    alloca (nlines * sizeof (struct deprecated_dis_line_entry));
 
   /* Copy linetable entries for this function into our data
      structure, creating end_pc's and setting out_of_order as
@@ -255,11 +404,11 @@ do_mixed_source_and_assembly (struct gdb
       newlines++;
     }
 
-  /* Now, sort mle by line #s (and, then by addresses within
-     lines).  */
+  /* Now, sort mle by line #s (and, then by addresses within lines).  */
 
   if (out_of_order)
-    qsort (mle, newlines, sizeof (struct dis_line_entry), compare_lines);
+    qsort (mle, newlines, sizeof (struct deprecated_dis_line_entry),
+	   compare_lines);
 
   /* Now, for each line entry, emit the specified lines (unless
      they have been emitted before), followed by the assembly code
@@ -322,9 +471,9 @@ do_mixed_source_and_assembly (struct gdb
 	    = make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn");
 	}
 
-      num_displayed += dump_insns (gdbarch, uiout, di,
+      num_displayed += dump_insns (gdbarch, uiout,
 				   mle[i].start_pc, mle[i].end_pc,
-				   how_many, flags, stb);
+				   how_many, flags, NULL);
 
       /* When we've reached the end of the mle array, or we've seen the last
          assembly range for this source line, close out the list/tuple.  */
@@ -334,7 +483,7 @@ do_mixed_source_and_assembly (struct gdb
 	  do_cleanups (ui_out_tuple_chain);
 	  ui_out_tuple_chain = make_cleanup (null_cleanup, 0);
 	  ui_out_list_chain = make_cleanup (null_cleanup, 0);
-	  ui_out_text (uiout, "\n");
+	  uiout->text ("\n");
 	}
       if (how_many >= 0 && num_displayed >= how_many)
 	break;
@@ -342,20 +491,259 @@ do_mixed_source_and_assembly (struct gdb
   do_cleanups (ui_out_chain);
 }
 
+/* The idea here is to present a source-O-centric view of a
+   function to the user.  This means that things are presented
+   in source order, with (possibly) out of order assembly
+   immediately following.  */
+
+static void
+do_mixed_source_and_assembly (struct gdbarch *gdbarch,
+			      struct ui_out *uiout,
+			      struct symtab *main_symtab,
+			      CORE_ADDR low, CORE_ADDR high,
+			      int how_many, int flags)
+{
+  const struct linetable_entry *le, *first_le;
+  int i, nlines;
+  int num_displayed = 0;
+  print_source_lines_flags psl_flags = 0;
+  struct cleanup *ui_out_chain;
+  struct cleanup *ui_out_tuple_chain;
+  struct cleanup *ui_out_list_chain;
+  CORE_ADDR pc;
+  struct symtab *last_symtab;
+  int last_line;
+
+  gdb_assert (main_symtab != NULL && SYMTAB_LINETABLE (main_symtab) != NULL);
+
+  /* First pass: collect the list of all source files and lines.
+     We do this so that we can only print lines containing code once.
+     We try to print the source text leading up to the next instruction,
+     but if that text is for code that will be disassembled later, then
+     we'll want to defer printing it until later with its associated code.  */
+
+  htab_up dis_line_table (allocate_dis_line_table ());
+
+  pc = low;
+
+  /* The prologue may be empty, but there may still be a line number entry
+     for the opening brace which is distinct from the first line of code.
+     If the prologue has been eliminated find_pc_line may return the source
+     line after the opening brace.  We still want to print this opening brace.
+     first_le is used to implement this.  */
+
+  nlines = SYMTAB_LINETABLE (main_symtab)->nitems;
+  le = SYMTAB_LINETABLE (main_symtab)->item;
+  first_le = NULL;
+
+  /* Skip all the preceding functions.  */
+  for (i = 0; i < nlines && le[i].pc < low; i++)
+    continue;
+
+  if (i < nlines && le[i].pc < high)
+    first_le = &le[i];
+
+  /* Add lines for every pc value.  */
+  while (pc < high)
+    {
+      struct symtab_and_line sal;
+      int length;
+
+      sal = find_pc_line (pc, 0);
+      length = gdb_insn_length (gdbarch, pc);
+      pc += length;
+
+      if (sal.symtab != NULL)
+	add_dis_line_entry (dis_line_table.get (), sal.symtab, sal.line);
+    }
+
+  /* Second pass: print the disassembly.
+
+     Output format, from an MI perspective:
+       The result is a ui_out list, field name "asm_insns", where elements have
+       name "src_and_asm_line".
+       Each element is a tuple of source line specs (field names line, file,
+       fullname), and field "line_asm_insn" which contains the disassembly.
+       Field "line_asm_insn" is a list of tuples: address, func-name, offset,
+       opcodes, inst.
+
+     CLI output works on top of this because MI ignores ui_out_text output,
+     which is where we put file name and source line contents output.
+
+     Cleanup usage:
+     ui_out_chain
+       Handles the outer "asm_insns" list.
+     ui_out_tuple_chain
+       The tuples for each group of consecutive disassemblies.
+     ui_out_list_chain
+       List of consecutive source lines or disassembled insns.  */
+
+  if (flags & DISASSEMBLY_FILENAME)
+    psl_flags |= PRINT_SOURCE_LINES_FILENAME;
+
+  ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns");
+
+  ui_out_tuple_chain = NULL;
+  ui_out_list_chain = NULL;
+
+  last_symtab = NULL;
+  last_line = 0;
+  pc = low;
+
+  while (pc < high)
+    {
+      struct symtab_and_line sal;
+      CORE_ADDR end_pc;
+      int start_preceding_line_to_display = 0;
+      int end_preceding_line_to_display = 0;
+      int new_source_line = 0;
+
+      sal = find_pc_line (pc, 0);
+
+      if (sal.symtab != last_symtab)
+	{
+	  /* New source file.  */
+	  new_source_line = 1;
+
+	  /* If this is the first line of output, check for any preceding
+	     lines.  */
+	  if (last_line == 0
+	      && first_le != NULL
+	      && first_le->line < sal.line)
+	    {
+	      start_preceding_line_to_display = first_le->line;
+	      end_preceding_line_to_display = sal.line;
+	    }
+	}
+      else
+	{
+	  /* Same source file as last time.  */
+	  if (sal.symtab != NULL)
+	    {
+	      if (sal.line > last_line + 1 && last_line != 0)
+		{
+		  int l;
+
+		  /* Several preceding source lines.  Print the trailing ones
+		     not associated with code that we'll print later.  */
+		  for (l = sal.line - 1; l > last_line; --l)
+		    {
+		      if (line_has_code_p (dis_line_table.get (),
+					   sal.symtab, l))
+			break;
+		    }
+		  if (l < sal.line - 1)
+		    {
+		      start_preceding_line_to_display = l + 1;
+		      end_preceding_line_to_display = sal.line;
+		    }
+		}
+	      if (sal.line != last_line)
+		new_source_line = 1;
+	      else
+		{
+		  /* Same source line as last time.  This can happen, depending
+		     on the debug info.  */
+		}
+	    }
+	}
+
+      if (new_source_line)
+	{
+	  /* Skip the newline if this is the first instruction.  */
+	  if (pc > low)
+	    uiout->text ("\n");
+	  if (ui_out_tuple_chain != NULL)
+	    {
+	      gdb_assert (ui_out_list_chain != NULL);
+	      do_cleanups (ui_out_list_chain);
+	      do_cleanups (ui_out_tuple_chain);
+	    }
+	  if (sal.symtab != last_symtab
+	      && !(flags & DISASSEMBLY_FILENAME))
+	    {
+	      /* Remember MI ignores ui_out_text.
+		 We don't have to do anything here for MI because MI
+		 output includes the source specs for each line.  */
+	      if (sal.symtab != NULL)
+		{
+		  uiout->text (symtab_to_filename_for_display (sal.symtab));
+		}
+	      else
+		uiout->text ("unknown");
+	      uiout->text (":\n");
+	    }
+	  if (start_preceding_line_to_display > 0)
+	    {
+	      /* Several source lines w/o asm instructions associated.
+		 We need to preserve the structure of the output, so output
+		 a bunch of line tuples with no asm entries.  */
+	      int l;
+	      struct cleanup *ui_out_list_chain_line;
+	      struct cleanup *ui_out_tuple_chain_line;
+
+	      gdb_assert (sal.symtab != NULL);
+	      for (l = start_preceding_line_to_display;
+		   l < end_preceding_line_to_display;
+		   ++l)
+		{
+		  ui_out_tuple_chain_line
+		    = make_cleanup_ui_out_tuple_begin_end (uiout,
+							   "src_and_asm_line");
+		  print_source_lines (sal.symtab, l, l + 1, psl_flags);
+		  ui_out_list_chain_line
+		    = make_cleanup_ui_out_list_begin_end (uiout,
+							  "line_asm_insn");
+		  do_cleanups (ui_out_list_chain_line);
+		  do_cleanups (ui_out_tuple_chain_line);
+		}
+	    }
+	  ui_out_tuple_chain
+	    = make_cleanup_ui_out_tuple_begin_end (uiout, "src_and_asm_line");
+	  if (sal.symtab != NULL)
+	    print_source_lines (sal.symtab, sal.line, sal.line + 1, psl_flags);
+	  else
+	    uiout->text (_("--- no source info for this pc ---\n"));
+	  ui_out_list_chain
+	    = make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn");
+	}
+      else
+	{
+	  /* Here we're appending instructions to an existing line.
+	     By construction the very first insn will have a symtab
+	     and follow the new_source_line path above.  */
+	  gdb_assert (ui_out_tuple_chain != NULL);
+	  gdb_assert (ui_out_list_chain != NULL);
+	}
+
+      if (sal.end != 0)
+	end_pc = std::min (sal.end, high);
+      else
+	end_pc = pc + 1;
+      num_displayed += dump_insns (gdbarch, uiout, pc, end_pc,
+				   how_many, flags, &end_pc);
+      pc = end_pc;
+
+      if (how_many >= 0 && num_displayed >= how_many)
+	break;
+
+      last_symtab = sal.symtab;
+      last_line = sal.line;
+    }
+
+  do_cleanups (ui_out_chain);
+}
 
 static void
 do_assembly_only (struct gdbarch *gdbarch, struct ui_out *uiout,
-		  struct disassemble_info * di,
 		  CORE_ADDR low, CORE_ADDR high,
-		  int how_many, int flags, struct ui_file *stb)
+		  int how_many, int flags)
 {
-  int num_displayed = 0;
   struct cleanup *ui_out_chain;
 
   ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns");
 
-  num_displayed = dump_insns (gdbarch, uiout, di, low, high, how_many,
-                              flags, stb);
+  dump_insns (gdbarch, uiout, low, high, how_many, flags, NULL);
 
   do_cleanups (ui_out_chain);
 }
@@ -369,21 +757,22 @@ fprintf_disasm (void *stream, const char
   va_list args;
 
   va_start (args, format);
-  vfprintf_filtered (stream, format, args);
+  vfprintf_filtered ((struct ui_file *) stream, format, args);
   va_end (args);
   /* Something non -ve.  */
   return 0;
 }
 
-struct disassemble_info
-gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
+gdb_disassembler::gdb_disassembler (struct gdbarch *gdbarch,
+				    struct ui_file *file,
+				    di_read_memory_ftype read_memory_func)
+  : m_gdbarch (gdbarch),
+    m_err_memaddr (0)
 {
-  struct disassemble_info di;
-
-  init_disassemble_info (&di, file, fprintf_disasm);
-  di.flavour = bfd_target_unknown_flavour;
-  di.memory_error_func = dis_asm_memory_error;
-  di.print_address_func = dis_asm_print_address;
+  init_disassemble_info (&m_di, file, fprintf_disasm);
+  m_di.flavour = bfd_target_unknown_flavour;
+  m_di.memory_error_func = dis_asm_memory_error;
+  m_di.print_address_func = dis_asm_print_address;
   /* NOTE: cagney/2003-04-28: The original code, from the old Insight
      disassembler had a local optomization here.  By default it would
      access the executable file, instead of the target memory (there
@@ -392,47 +781,63 @@ gdb_disassemble_info (struct gdbarch *gd
      didn't work as they relied on the access going to the target.
      Further, it has been supperseeded by trust-read-only-sections
      (although that should be superseeded by target_trust..._p()).  */
-  di.read_memory_func = dis_asm_read_memory;
-  di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
-  di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
-  di.endian = gdbarch_byte_order (gdbarch);
-  di.endian_code = gdbarch_byte_order_for_code (gdbarch);
-  di.application_data = gdbarch;
-  disassemble_init_for_target (&di);
-  return di;
+  m_di.read_memory_func = read_memory_func;
+  m_di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
+  m_di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
+  m_di.endian = gdbarch_byte_order (gdbarch);
+  m_di.endian_code = gdbarch_byte_order_for_code (gdbarch);
+  m_di.application_data = this;
+  m_di.disassembler_options = get_disassembler_options (gdbarch);
+  disassemble_init_for_target (&m_di);
+}
+
+int
+gdb_disassembler::print_insn (CORE_ADDR memaddr,
+			      int *branch_delay_insns)
+{
+  m_err_memaddr = 0;
+
+  int length = gdbarch_print_insn (arch (), memaddr, &m_di);
+
+  if (length < 0)
+    memory_error (TARGET_XFER_E_IO, m_err_memaddr);
+
+  if (branch_delay_insns != NULL)
+    {
+      if (m_di.insn_info_valid)
+	*branch_delay_insns = m_di.branch_delay_insns;
+      else
+	*branch_delay_insns = 0;
+    }
+  return length;
 }
 
 void
 gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
-		 char *file_string, int flags, int how_many,
+		 int flags, int how_many,
 		 CORE_ADDR low, CORE_ADDR high)
 {
-  struct ui_file *stb = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (stb);
-  struct disassemble_info di = gdb_disassemble_info (gdbarch, stb);
   struct symtab *symtab;
-  struct linetable_entry *le = NULL;
   int nlines = -1;
 
   /* Assume symtab is valid for whole PC range.  */
   symtab = find_pc_line_symtab (low);
 
   if (symtab != NULL && SYMTAB_LINETABLE (symtab) != NULL)
-    {
-      /* Convert the linetable to a bunch of my_line_entry's.  */
-      le = SYMTAB_LINETABLE (symtab)->item;
-      nlines = SYMTAB_LINETABLE (symtab)->nitems;
-    }
+    nlines = SYMTAB_LINETABLE (symtab)->nitems;
 
-  if (!(flags & DISASSEMBLY_SOURCE) || nlines <= 0
-      || symtab == NULL || SYMTAB_LINETABLE (symtab) == NULL)
-    do_assembly_only (gdbarch, uiout, &di, low, high, how_many, flags, stb);
+  if (!(flags & (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
+      || nlines <= 0)
+    do_assembly_only (gdbarch, uiout, low, high, how_many, flags);
 
   else if (flags & DISASSEMBLY_SOURCE)
-    do_mixed_source_and_assembly (gdbarch, uiout, &di, nlines, le, low,
-				  high, symtab, how_many, flags, stb);
+    do_mixed_source_and_assembly (gdbarch, uiout, symtab, low, high,
+				  how_many, flags);
+
+  else if (flags & DISASSEMBLY_SOURCE_DEPRECATED)
+    do_mixed_source_and_assembly_deprecated (gdbarch, uiout, symtab,
+					     low, high, how_many, flags);
 
-  do_cleanups (cleanups);
   gdb_flush (gdb_stdout);
 }
 
@@ -444,25 +849,10 @@ int
 gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
 		struct ui_file *stream, int *branch_delay_insns)
 {
-  struct disassemble_info di;
-  int length;
 
-  di = gdb_disassemble_info (gdbarch, stream);
-  length = gdbarch_print_insn (gdbarch, memaddr, &di);
-  if (branch_delay_insns)
-    {
-      if (di.insn_info_valid)
-	*branch_delay_insns = di.branch_delay_insns;
-      else
-	*branch_delay_insns = 0;
-    }
-  return length;
-}
+  gdb_disassembler di (gdbarch, stream);
 
-static void
-do_ui_file_delete (void *arg)
-{
-  ui_file_delete (arg);
+  return di.print_insn (memaddr, branch_delay_insns);
 }
 
 /* Return the length in bytes of the instruction at address MEMADDR in
@@ -471,16 +861,7 @@ do_ui_file_delete (void *arg)
 int
 gdb_insn_length (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
-  static struct ui_file *null_stream = NULL;
-
-  /* Dummy file descriptor for the disassembler.  */
-  if (!null_stream)
-    {
-      null_stream = ui_file_new ();
-      make_final_cleanup (do_ui_file_delete, null_stream);
-    }
-
-  return gdb_print_insn (gdbarch, addr, null_stream, NULL);
+  return gdb_print_insn (gdbarch, addr, &null_stream, NULL);
 }
 
 /* fprintf-function for gdb_buffered_insn_length.  This function is a
@@ -515,6 +896,7 @@ gdb_buffered_insn_length_init_dis (struc
   di->endian = gdbarch_byte_order (gdbarch);
   di->endian_code = gdbarch_byte_order_for_code (gdbarch);
 
+  di->disassembler_options = get_disassembler_options (gdbarch);
   disassemble_init_for_target (di);
 }
 
@@ -531,3 +913,173 @@ gdb_buffered_insn_length (struct gdbarch
 
   return gdbarch_print_insn (gdbarch, addr, &di);
 }
+
+char *
+get_disassembler_options (struct gdbarch *gdbarch)
+{
+  char **disassembler_options = gdbarch_disassembler_options (gdbarch);
+  if (disassembler_options == NULL)
+    return NULL;
+  return *disassembler_options;
+}
+
+void
+set_disassembler_options (char *prospective_options)
+{
+  struct gdbarch *gdbarch = get_current_arch ();
+  char **disassembler_options = gdbarch_disassembler_options (gdbarch);
+  const disasm_options_t *valid_options;
+  char *options = remove_whitespace_and_extra_commas (prospective_options);
+  char *opt;
+
+  /* Allow all architectures, even ones that do not support 'set disassembler',
+     to reset their disassembler options to NULL.  */
+  if (options == NULL)
+    {
+      if (disassembler_options != NULL)
+	{
+	  free (*disassembler_options);
+	  *disassembler_options = NULL;
+	}
+      return;
+    }
+
+  valid_options = gdbarch_valid_disassembler_options (gdbarch);
+  if (valid_options  == NULL)
+    {
+      fprintf_filtered (gdb_stdlog, _("\
+'set disassembler-options ...' is not supported on this architecture.\n"));
+      return;
+    }
+
+  /* Verify we have valid disassembler options.  */
+  FOR_EACH_DISASSEMBLER_OPTION (opt, options)
+    {
+      size_t i;
+      for (i = 0; valid_options->name[i] != NULL; i++)
+	if (disassembler_options_cmp (opt, valid_options->name[i]) == 0)
+	  break;
+      if (valid_options->name[i] == NULL)
+	{
+	  fprintf_filtered (gdb_stdlog,
+			    _("Invalid disassembler option value: '%s'.\n"),
+			    opt);
+	  return;
+	}
+    }
+
+  free (*disassembler_options);
+  *disassembler_options = xstrdup (options);
+}
+
+static void
+set_disassembler_options_sfunc (char *args, int from_tty,
+				struct cmd_list_element *c)
+{
+  set_disassembler_options (prospective_options);
+}
+
+static void
+show_disassembler_options_sfunc (struct ui_file *file, int from_tty,
+				 struct cmd_list_element *c, const char *value)
+{
+  struct gdbarch *gdbarch = get_current_arch ();
+  const disasm_options_t *valid_options;
+
+  const char *options = get_disassembler_options (gdbarch);
+  if (options == NULL)
+    options = "";
+
+  fprintf_filtered (file, _("The current disassembler options are '%s'\n"),
+		    options);
+
+  valid_options = gdbarch_valid_disassembler_options (gdbarch);
+
+  if (valid_options == NULL)
+    return;
+
+  fprintf_filtered (file, _("\n\
+The following disassembler options are supported for use with the\n\
+'set disassembler-options <option>[,<option>...]' command:\n"));
+
+  if (valid_options->description != NULL)
+    {
+      size_t i, max_len = 0;
+
+      /* Compute the length of the longest option name.  */
+      for (i = 0; valid_options->name[i] != NULL; i++)
+	{
+	  size_t len = strlen (valid_options->name[i]);
+	  if (max_len < len)
+	    max_len = len;
+	}
+
+      for (i = 0, max_len++; valid_options->name[i] != NULL; i++)
+	{
+	  fprintf_filtered (file, "  %s", valid_options->name[i]);
+	  if (valid_options->description[i] != NULL)
+	    fprintf_filtered (file, "%*c %s",
+			      (int)(max_len - strlen (valid_options->name[i])), ' ',
+			      valid_options->description[i]);
+	  fprintf_filtered (file, "\n");
+	}
+    }
+  else
+    {
+      size_t i;
+      fprintf_filtered (file, "  ");
+      for (i = 0; valid_options->name[i] != NULL; i++)
+	{
+	  fprintf_filtered (file, "%s", valid_options->name[i]);
+	  if (valid_options->name[i + 1] != NULL)
+	    fprintf_filtered (file, ", ");
+	  wrap_here ("  ");
+	}
+      fprintf_filtered (file, "\n");
+    }
+}
+
+/* A completion function for "set disassembler".  */
+
+static VEC (char_ptr) *
+disassembler_options_completer (struct cmd_list_element *ignore,
+				const char *text, const char *word)
+{
+  struct gdbarch *gdbarch = get_current_arch ();
+  const disasm_options_t *opts = gdbarch_valid_disassembler_options (gdbarch);
+
+  if (opts != NULL)
+    {
+      /* Only attempt to complete on the last option text.  */
+      const char *separator = strrchr (text, ',');
+      if (separator != NULL)
+	text = separator + 1;
+      text = skip_spaces_const (text);
+      return complete_on_enum (opts->name, text, word);
+    }
+  return NULL;
+}
+
+
+/* Initialization code.  */
+
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_disasm;
+
+void
+_initialize_disasm (void)
+{
+  struct cmd_list_element *cmd;
+
+  /* Add the command that controls the disassembler options.  */
+  cmd = add_setshow_string_noescape_cmd ("disassembler-options", no_class,
+					 &prospective_options, _("\
+Set the disassembler options.\n\
+Usage: set disassembler-options <option>[,<option>...]\n\n\
+See: 'show disassembler-options' for valid option values.\n"), _("\
+Show the disassembler options."), NULL,
+					 set_disassembler_options_sfunc,
+					 show_disassembler_options_sfunc,
+					 &setlist, &showlist);
+  set_cmd_completer (cmd, disassembler_options_completer);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm.h ./gdb/disasm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/disasm.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Disassemble support for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,23 +21,73 @@
 
 #include "dis-asm.h"
 
-#define DISASSEMBLY_SOURCE	(0x1 << 0)
+#define DISASSEMBLY_SOURCE_DEPRECATED (0x1 << 0)
 #define DISASSEMBLY_RAW_INSN	(0x1 << 1)
 #define DISASSEMBLY_OMIT_FNAME	(0x1 << 2)
 #define DISASSEMBLY_FILENAME	(0x1 << 3)
 #define DISASSEMBLY_OMIT_PC	(0x1 << 4)
+#define DISASSEMBLY_SOURCE	(0x1 << 5)
+#define DISASSEMBLY_SPECULATIVE	(0x1 << 6)
 
 struct gdbarch;
 struct ui_out;
 struct ui_file;
 
-/* Return a filled in disassemble_info object for use by gdb.  */
-
-extern struct disassemble_info gdb_disassemble_info (struct gdbarch *gdbarch,
-						     struct ui_file *file);
+class gdb_disassembler
+{
+  using di_read_memory_ftype = decltype (disassemble_info::read_memory_func);
+
+public:
+  gdb_disassembler (struct gdbarch *gdbarch, struct ui_file *file)
+    : gdb_disassembler (gdbarch, file, dis_asm_read_memory)
+  {}
+
+  int print_insn (CORE_ADDR memaddr, int *branch_delay_insns = NULL);
+
+  /* Return the gdbarch of gdb_disassembler.  */
+  struct gdbarch *arch ()
+  { return m_gdbarch; }
+
+protected:
+  gdb_disassembler (struct gdbarch *gdbarch, struct ui_file *file,
+		    di_read_memory_ftype func);
+
+  struct ui_file *stream ()
+  { return (struct ui_file *) m_di.stream; }
+
+private:
+  struct gdbarch *m_gdbarch;
+
+  /* Stores data required for disassembling instructions in
+     opcodes.  */
+  struct disassemble_info m_di;
+  CORE_ADDR m_err_memaddr;
+
+  static int dis_asm_read_memory (bfd_vma memaddr, gdb_byte *myaddr,
+				  unsigned int len,
+				  struct disassemble_info *info);
+  static void dis_asm_memory_error (int err, bfd_vma memaddr,
+				    struct disassemble_info *info);
+  static void dis_asm_print_address (bfd_vma addr,
+				     struct disassemble_info *info);
+};
+
+/* An instruction to be disassembled.  */
+
+struct disasm_insn
+{
+  /* The address of the memory containing the instruction.  */
+  CORE_ADDR addr;
+
+  /* An optional instruction number.  If non-zero, it is printed first.  */
+  unsigned int number;
+
+  /* True if the instruction was executed speculatively.  */
+  unsigned int is_speculative:1;
+};
 
 extern void gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
-			     char *file_string, int flags, int how_many,
+			     int flags, int how_many,
 			     CORE_ADDR low, CORE_ADDR high);
 
 /* Print the instruction at address MEMADDR in debugged memory,
@@ -47,6 +97,35 @@ extern void gdb_disassembly (struct gdba
 extern int gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
 			   struct ui_file *stream, int *branch_delay_insns);
 
+/* Class used to pretty-print instructions.  */
+
+class gdb_pretty_print_disassembler
+{
+public:
+  explicit gdb_pretty_print_disassembler (struct gdbarch *gdbarch)
+    : m_di (gdbarch, &m_insn_stb)
+  {}
+
+  /* Prints the instruction INSN into UIOUT and returns the length of
+     the printed instruction in bytes.  */
+  int pretty_print_insn (struct ui_out *uiout, const struct disasm_insn *insn,
+			 int flags);
+
+private:
+  /* Returns the architecture used for disassembling.  */
+  struct gdbarch *arch () { return m_di.arch (); }
+
+  /* The disassembler used for instruction printing.  */
+  gdb_disassembler m_di;
+
+  /* The buffer used to build the instruction string.  The
+     disassembler is initialized with this stream.  */
+  string_file m_insn_stb;
+
+  /* The buffer used to build the raw opcodes string.  */
+  string_file m_opcode_stb;
+};
+
 /* Return the length in bytes of the instruction at address MEMADDR in
    debugged memory.  */
 
@@ -59,4 +138,12 @@ extern int gdb_buffered_insn_length (str
 				     const gdb_byte *insn, int max_len,
 				     CORE_ADDR memaddr);
 
+/* Returns GDBARCH's disassembler options.  */
+
+extern char *get_disassembler_options (struct gdbarch *gdbarch);
+
+/* Sets the active gdbarch's disassembler options to OPTIONS.  */
+
+extern void set_disassembler_options (char *options);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm-selftests.c ./gdb/disasm-selftests.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/disasm-selftests.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/disasm-selftests.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,220 @@
+/* Self tests for disassembler for GDB, the GNU debugger.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "disasm.h"
+
+#if GDB_SELF_TEST
+#include "selftest.h"
+#include "selftest-arch.h"
+
+namespace selftests {
+
+/* Test disassembly of one instruction.  */
+
+static void
+print_one_insn_test (struct gdbarch *gdbarch)
+{
+  size_t len = 0;
+  const gdb_byte *insn = NULL;
+
+  switch (gdbarch_bfd_arch_info (gdbarch)->arch)
+    {
+    case bfd_arch_bfin:
+      /* M3.L = 0xe117 */
+      static const gdb_byte bfin_insn[] = {0x17, 0xe1, 0xff, 0xff};
+
+      insn = bfin_insn;
+      len = sizeof (bfin_insn);
+      break;
+    case bfd_arch_arm:
+      /* mov     r0, #0 */
+      static const gdb_byte arm_insn[] = {0x0, 0x0, 0xa0, 0xe3};
+
+      insn = arm_insn;
+      len = sizeof (arm_insn);
+      break;
+    case bfd_arch_ia64:
+    case bfd_arch_mep:
+    case bfd_arch_mips:
+    case bfd_arch_tic6x:
+    case bfd_arch_xtensa:
+      return;
+    case bfd_arch_s390:
+      /* nopr %r7 */
+      static const gdb_byte s390_insn[] = {0x07, 0x07};
+
+      insn = s390_insn;
+      len = sizeof (s390_insn);
+      break;
+    case bfd_arch_xstormy16:
+      /* nop */
+      static const gdb_byte xstormy16_insn[] = {0x0, 0x0};
+
+      insn = xstormy16_insn;
+      len = sizeof (xstormy16_insn);
+      break;
+    case bfd_arch_arc:
+      /* PR 21003 */
+      if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601)
+	return;
+      /* fall through */
+    case bfd_arch_nios2:
+    case bfd_arch_score:
+      /* nios2 and score need to know the current instruction to select
+	 breakpoint instruction.  Give the breakpoint instruction kind
+	 explicitly.  */
+      int bplen;
+      insn = gdbarch_sw_breakpoint_from_kind (gdbarch, 4, &bplen);
+      len = bplen;
+      break;
+    default:
+      {
+	/* Test disassemble breakpoint instruction.  */
+	CORE_ADDR pc = 0;
+	int kind = gdbarch_breakpoint_kind_from_pc (gdbarch, &pc);
+	int bplen;
+
+	insn = gdbarch_sw_breakpoint_from_kind (gdbarch, kind, &bplen);
+	len = bplen;
+
+	break;
+      }
+    }
+  SELF_CHECK (len > 0);
+
+  /* Test gdb_disassembler for a given gdbarch by reading data from a
+     pre-allocated buffer.  If you want to see the disassembled
+     instruction printed to gdb_stdout, set verbose to true.  */
+  static const bool verbose = false;
+
+  class gdb_disassembler_test : public gdb_disassembler
+  {
+  public:
+
+    explicit gdb_disassembler_test (struct gdbarch *gdbarch,
+				    const gdb_byte *insn,
+				    size_t len)
+      : gdb_disassembler (gdbarch,
+			  (verbose ? gdb_stdout : &null_stream),
+			  gdb_disassembler_test::read_memory),
+	m_insn (insn), m_len (len)
+    {
+    }
+
+    int
+    print_insn (CORE_ADDR memaddr)
+    {
+      if (verbose)
+	{
+	  fprintf_unfiltered (stream (), "%s ",
+			      gdbarch_bfd_arch_info (arch ())->arch_name);
+	}
+
+      int len = gdb_disassembler::print_insn (memaddr);
+
+      if (verbose)
+	fprintf_unfiltered (stream (), "\n");
+
+      return len;
+    }
+
+  private:
+    /* A buffer contain one instruction.  */
+    const gdb_byte *m_insn;
+
+    /* Length of the buffer.  */
+    size_t m_len;
+
+    static int read_memory (bfd_vma memaddr, gdb_byte *myaddr,
+			    unsigned int len, struct disassemble_info *info)
+    {
+      gdb_disassembler_test *self
+	= static_cast<gdb_disassembler_test *>(info->application_data);
+
+      /* The disassembler in opcodes may read more data than one
+	 instruction.  Supply infinite consecutive copies
+	 of the same instruction.  */
+      for (size_t i = 0; i < len; i++)
+	myaddr[i] = self->m_insn[(memaddr + i) % self->m_len];
+
+      return 0;
+    }
+  };
+
+  gdb_disassembler_test di (gdbarch, insn, len);
+
+  SELF_CHECK (di.print_insn (0) == len);
+}
+
+/* Test disassembly on memory error.  */
+
+static void
+memory_error_test (struct gdbarch *gdbarch)
+{
+  class gdb_disassembler_test : public gdb_disassembler
+  {
+  public:
+    gdb_disassembler_test (struct gdbarch *gdbarch)
+      : gdb_disassembler (gdbarch, &null_stream,
+			  gdb_disassembler_test::read_memory)
+    {
+    }
+
+    static int read_memory (bfd_vma memaddr, gdb_byte *myaddr,
+			    unsigned int len,
+			    struct disassemble_info *info)
+    {
+      /* Always return an error.  */
+      return -1;
+    }
+  };
+
+  gdb_disassembler_test di (gdbarch);
+  bool saw_memory_error = false;
+
+  TRY
+    {
+      di.print_insn (0);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error == MEMORY_ERROR)
+	saw_memory_error = true;
+    }
+  END_CATCH
+
+  /* Expect MEMORY_ERROR.  */
+  SELF_CHECK (saw_memory_error);
+}
+
+} // namespace selftests
+#endif /* GDB_SELF_TEST */
+
+/* Suppress warning from -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_disasm_selftests;
+
+void
+_initialize_disasm_selftests (void)
+{
+#if GDB_SELF_TEST
+  register_self_test_foreach_arch (selftests::print_one_insn_test);
+  register_self_test_foreach_arch (selftests::memory_error_test);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-lang.c ./gdb/d-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/d-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* D language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,6 +55,15 @@ d_demangle (const char *symbol, int opti
   return gdb_demangle (symbol, options | DMGL_DLANG);
 }
 
+/* la_sniff_from_mangled_name implementation for D.  */
+
+static int
+d_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = d_demangle (mangled, 0);
+  return *demangled != NULL;
+}
+
 /* Table mapping opcodes into strings for printing operators
    and precedences of the operators.  */
 static const struct op_print d_op_print_tab[] =
@@ -90,7 +99,7 @@ static const struct op_print d_op_print_
   {"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
   {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
   {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_PREFIX, 0}
 };
 
 /* Mapping of all D basic data types into the language vector.  */
@@ -190,6 +199,11 @@ d_language_arch_info (struct gdbarch *gd
   lai->bool_type_default = builtin->builtin_bool;
 }
 
+static const char *d_extensions[] =
+{
+  ".d", NULL
+};
+
 static const struct language_defn d_language_defn =
 {
   "d",
@@ -199,9 +213,10 @@ static const struct language_defn d_lang
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  d_extensions,
   &exp_descriptor_c,
   d_parse,
-  d_error,
+  d_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant.  */
   c_printstr,			/* Function to print string constant.  */
@@ -214,9 +229,10 @@ static const struct language_defn d_lang
   default_read_var_value,	/* la_read_var_value */
   NULL,				/* Language specific skip_trampoline.  */
   "this",
-  basic_lookup_symbol_nonlocal, 
+  d_lookup_symbol_nonlocal,
   basic_lookup_transparent_type,
   d_demangle,			/* Language specific symbol demangler.  */
+  d_sniff_from_mangled_name,
   NULL,				/* Language specific
 				   class_name_from_physname.  */
   d_op_print_tab,		/* Expression operators for printing.  */
@@ -271,13 +287,13 @@ build_d_types (struct gdbarch *gdbarch)
     = arch_integer_type (gdbarch, 128, 1, "ucent");
   builtin_d_type->builtin_float
     = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
-		       "float", NULL);
+		       "float", gdbarch_float_format (gdbarch));
   builtin_d_type->builtin_double
     = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
-		       "double", NULL);
+		       "double", gdbarch_double_format (gdbarch));
   builtin_d_type->builtin_real
     = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
-		       "real", NULL);
+		       "real", gdbarch_long_double_format (gdbarch));
 
   TYPE_INSTANCE_FLAGS (builtin_d_type->builtin_byte)
     |= TYPE_INSTANCE_FLAG_NOTTEXT;
@@ -287,13 +303,13 @@ build_d_types (struct gdbarch *gdbarch)
   /* Imaginary and complex types.  */
   builtin_d_type->builtin_ifloat
     = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
-		       "ifloat", NULL);
+		       "ifloat", gdbarch_float_format (gdbarch));
   builtin_d_type->builtin_idouble
     = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
-		       "idouble", NULL);
+		       "idouble", gdbarch_double_format (gdbarch));
   builtin_d_type->builtin_ireal
     = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
-		       "ireal", NULL);
+		       "ireal", gdbarch_long_double_format (gdbarch));
   builtin_d_type->builtin_cfloat
     = arch_complex_type (gdbarch, "cfloat",
 			 builtin_d_type->builtin_float);
@@ -322,7 +338,7 @@ static struct gdbarch_data *d_type_data;
 const struct builtin_d_type *
 builtin_d_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, d_type_data);
+  return (const struct builtin_d_type *) gdbarch_data (gdbarch, d_type_data);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-lang.h ./gdb/d-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/d-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* D language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,7 +58,7 @@ struct builtin_d_type
 
 extern int d_parse (struct parser_state *);
 
-extern void d_error (char *);
+extern void d_yyerror (char *);
 
 /* Defined in d-lang.c  */
 
@@ -68,12 +68,22 @@ extern char *d_demangle (const char *man
 
 extern const struct builtin_d_type *builtin_d_type (struct gdbarch *);
 
+/* Defined in d-namespace.c  */
+
+extern struct block_symbol d_lookup_symbol_nonlocal (const struct language_defn *,
+						     const char *,
+						     const struct block *,
+						     const domain_enum);
+
+extern struct block_symbol d_lookup_nested_symbol (struct type *, const char *,
+						   const struct block *);
+
 /* Defined in d-valprint.c  */
 
-extern void d_val_print (struct type *type, const gdb_byte *valaddr,
+extern void d_val_print (struct type *type,
 			 int embedded_offset, CORE_ADDR address,
 			 struct ui_file *stream, int recurse,
-			 const struct value *val,
+			 struct value *val,
 			 const struct value_print_options *options);
 
 #endif /* !defined (D_LANG_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-namespace.c ./gdb/d-namespace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-namespace.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/d-namespace.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,565 @@
+/* Helper routines for D support in GDB.
+
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "symtab.h"
+#include "block.h"
+#include "language.h"
+#include "namespace.h"
+#include "d-lang.h"
+#include "gdb_obstack.h"
+
+/* This returns the length of first component of NAME, which should be
+   the demangled name of a D variable/function/method/etc.
+   Specifically, it returns the index of the first dot forming the
+   boundary of the first component: so, given 'A.foo' or 'A.B.foo'
+   it returns the 1, and given 'foo', it returns 0.  */
+
+/* The character in NAME indexed by the return value is guaranteed to
+   always be either '.' or '\0'.  */
+
+static unsigned int
+d_find_first_component (const char *name)
+{
+  unsigned int index = 0;
+
+  for (;; ++index)
+    {
+      if (name[index] == '.' || name[index] == '\0')
+	return index;
+    }
+}
+
+/* If NAME is the fully-qualified name of a D function/variable/method,
+   this returns the length of its entire prefix: all of the modules and
+   classes that make up its name.  Given 'A.foo', it returns 1, given
+   'A.B.foo', it returns 4, given 'foo', it returns 0.  */
+
+static unsigned int
+d_entire_prefix_len (const char *name)
+{
+  unsigned int current_len = d_find_first_component (name);
+  unsigned int previous_len = 0;
+
+  while (name[current_len] != '\0')
+    {
+      gdb_assert (name[current_len] == '.');
+      previous_len = current_len;
+      /* Skip the '.'  */
+      current_len++;
+      current_len += d_find_first_component (name + current_len);
+    }
+
+  return previous_len;
+}
+
+/* Look up NAME in BLOCK's static block and in global blocks.
+   If SEARCH is non-zero, search through base classes for a matching
+   symbol.  Other arguments are as in d_lookup_symbol_nonlocal.  */
+
+static struct block_symbol
+d_lookup_symbol (const struct language_defn *langdef,
+		 const char *name, const struct block *block,
+		 const domain_enum domain, int search)
+{
+  struct block_symbol sym;
+
+  sym = lookup_symbol_in_static_block (name, block, domain);
+  if (sym.symbol != NULL)
+    return sym;
+
+  /* If we didn't find a definition for a builtin type in the static block,
+     such as "ucent" which is a specialist type, search for it now.  */
+  if (langdef != NULL && domain == VAR_DOMAIN)
+    {
+      struct gdbarch *gdbarch;
+
+      if (block == NULL)
+	gdbarch = target_gdbarch ();
+      else
+	gdbarch = block_gdbarch (block);
+      sym.symbol
+	= language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
+      sym.block = NULL;
+      if (sym.symbol != NULL)
+	return sym;
+    }
+
+  sym = lookup_global_symbol (name, block, domain);
+
+  if (sym.symbol != NULL)
+    return sym;
+
+  if (search)
+    {
+      char *classname, *nested;
+      unsigned int prefix_len;
+      struct cleanup *cleanup;
+      struct block_symbol class_sym;
+
+      /* A simple lookup failed.  Check if the symbol was defined in
+	 a base class.  */
+
+      cleanup = make_cleanup (null_cleanup, NULL);
+
+      /* Find the name of the class and the name of the method,
+	 variable, etc.  */
+      prefix_len = d_entire_prefix_len (name);
+
+      /* If no prefix was found, search "this".  */
+      if (prefix_len == 0)
+	{
+	  struct type *type;
+	  struct block_symbol lang_this;
+
+	  lang_this = lookup_language_this (language_def (language_d), block);
+	  if (lang_this.symbol == NULL)
+	    {
+	      do_cleanups (cleanup);
+	      return null_block_symbol;
+	    }
+
+	  type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this.symbol)));
+	  classname = xstrdup (TYPE_NAME (type));
+	  nested = xstrdup (name);
+	}
+      else
+	{
+	  /* The class name is everything up to and including PREFIX_LEN.  */
+	  classname = savestring (name, prefix_len);
+
+	  /* The rest of the name is everything else past the initial scope
+	     operator.  */
+	  nested = xstrdup (name + prefix_len + 1);
+	}
+
+      /* Add cleanups to free memory for these strings.  */
+      make_cleanup (xfree, classname);
+      make_cleanup (xfree, nested);
+
+      /* Lookup a class named CLASSNAME.  If none is found, there is nothing
+	 more that can be done.  */
+      class_sym = lookup_global_symbol (classname, block, domain);
+      if (class_sym.symbol == NULL)
+	{
+	  do_cleanups (cleanup);
+	  return null_block_symbol;
+	}
+
+      /* Look for a symbol named NESTED in this class.  */
+      sym = d_lookup_nested_symbol (SYMBOL_TYPE (class_sym.symbol),
+				    nested, block);
+      do_cleanups (cleanup);
+    }
+
+  return sym;
+}
+
+/* Look up NAME in the D module MODULE.  Other arguments are as in
+   d_lookup_symbol_nonlocal.  If SEARCH is non-zero, search through
+   base classes for a matching symbol.  */
+
+static struct block_symbol
+d_lookup_symbol_in_module (const char *module, const char *name,
+			   const struct block *block,
+			   const domain_enum domain, int search)
+{
+  char *concatenated_name = NULL;
+
+  if (module[0] != '\0')
+    {
+      concatenated_name
+	= (char *) alloca (strlen (module) + strlen (name) + 2);
+      strcpy (concatenated_name, module);
+      strcat (concatenated_name, ".");
+      strcat (concatenated_name, name);
+      name = concatenated_name;
+    }
+
+  return d_lookup_symbol (NULL, name, block, domain, search);
+}
+
+/* Lookup NAME at module scope.  SCOPE is the module that the current
+   function is defined within; only consider modules whose length is at
+   least SCOPE_LEN.  Other arguments are as in d_lookup_symbol_nonlocal.
+
+   For example, if we're within a function A.B.f and looking for a
+   symbol x, this will get called with NAME = "x", SCOPE = "A.B", and
+   SCOPE_LEN = 0.  It then calls itself with NAME and SCOPE the same,
+   but with SCOPE_LEN = 1.  And then it calls itself with NAME and
+   SCOPE the same, but with SCOPE_LEN = 4.  This third call looks for
+   "A.B.x"; if it doesn't find it, then the second call looks for "A.x",
+   and if that call fails, then the first call looks for "x".  */
+
+static struct block_symbol
+lookup_module_scope (const struct language_defn *langdef,
+		     const char *name, const struct block *block,
+		     const domain_enum domain, const char *scope,
+		     int scope_len)
+{
+  char *module;
+
+  if (scope[scope_len] != '\0')
+    {
+      /* Recursively search for names in child modules first.  */
+
+      struct block_symbol sym;
+      int new_scope_len = scope_len;
+
+      /* If the current scope is followed by ".", skip past that.  */
+      if (new_scope_len != 0)
+	{
+	  gdb_assert (scope[new_scope_len] == '.');
+	  new_scope_len++;
+	}
+      new_scope_len += d_find_first_component (scope + new_scope_len);
+      sym = lookup_module_scope (langdef, name, block, domain,
+				 scope, new_scope_len);
+      if (sym.symbol != NULL)
+	return sym;
+    }
+
+  /* Okay, we didn't find a match in our children, so look for the
+     name in the current module.
+
+     If we there is no scope and we know we have a bare symbol, then short
+     circuit everything and call d_lookup_symbol directly.
+     This isn't an optimization, rather it allows us to pass LANGDEF which
+     is needed for primitive type lookup.  */
+
+  if (scope_len == 0 && strchr (name, '.') == NULL)
+    return d_lookup_symbol (langdef, name, block, domain, 1);
+
+  module = (char *) alloca (scope_len + 1);
+  strncpy (module, scope, scope_len);
+  module[scope_len] = '\0';
+  return d_lookup_symbol_in_module (module, name,
+				    block, domain, 1);
+}
+
+/* Search through the base classes of PARENT_TYPE for a symbol named
+   NAME in block BLOCK.  */
+
+static struct block_symbol
+find_symbol_in_baseclass (struct type *parent_type, const char *name,
+			  const struct block *block)
+{
+  char *concatenated_name = NULL;
+  struct block_symbol sym;
+  struct cleanup *cleanup;
+  int i;
+
+  sym.symbol = NULL;
+  sym.block = NULL;
+  cleanup = make_cleanup (free_current_contents, &concatenated_name);
+
+  for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
+    {
+      size_t len;
+      struct type *base_type = TYPE_BASECLASS (parent_type, i);
+      const char *base_name = TYPE_BASECLASS_NAME (parent_type, i);
+
+      if (base_name == NULL)
+	continue;
+
+      /* Search this particular base class.  */
+      sym = d_lookup_symbol_in_module (base_name, name, block,
+				       VAR_DOMAIN, 0);
+      if (sym.symbol != NULL)
+	break;
+
+      /* Now search all static file-level symbols.  We have to do this for
+	 things like typedefs in the class.  First search in this symtab,
+	 what we want is possibly there.  */
+      len = strlen (base_name) + strlen (name) + 2;
+      concatenated_name = (char *) xrealloc (concatenated_name, len);
+      xsnprintf (concatenated_name, len, "%s.%s", base_name, name);
+      sym = lookup_symbol_in_static_block (concatenated_name, block,
+					   VAR_DOMAIN);
+      if (sym.symbol != NULL)
+	break;
+
+      /* Nope.  We now have to search all static blocks in all objfiles,
+	 even if block != NULL, because there's no guarantees as to which
+	 symtab the symbol we want is in.  */
+      sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
+      if (sym.symbol != NULL)
+	break;
+
+      /* If this class has base classes, search them next.  */
+      base_type = check_typedef (base_type);
+      if (TYPE_N_BASECLASSES (base_type) > 0)
+	{
+	  sym = find_symbol_in_baseclass (base_type, name, block);
+	  if (sym.symbol != NULL)
+	    break;
+	}
+    }
+
+  do_cleanups (cleanup);
+  return sym;
+}
+
+/* Look up a symbol named NESTED_NAME that is nested inside the D
+   class or module given by PARENT_TYPE, from within the context
+   given by BLOCK.  Return NULL if there is no such nested type.  */
+
+struct block_symbol
+d_lookup_nested_symbol (struct type *parent_type,
+			const char *nested_name,
+			const struct block *block)
+{
+  /* type_name_no_tag_required provides better error reporting using the
+     original type.  */
+  struct type *saved_parent_type = parent_type;
+
+  parent_type = check_typedef (parent_type);
+
+  switch (TYPE_CODE (parent_type))
+    {
+    case TYPE_CODE_STRUCT:
+    case TYPE_CODE_UNION:
+    case TYPE_CODE_ENUM:
+    case TYPE_CODE_MODULE:
+	{
+	  int size;
+	  const char *parent_name = type_name_no_tag_or_error (saved_parent_type);
+	  struct block_symbol sym
+	    = d_lookup_symbol_in_module (parent_name, nested_name,
+					 block, VAR_DOMAIN, 0);
+	  char *concatenated_name;
+
+	  if (sym.symbol != NULL)
+	    return sym;
+
+	  /* Now search all static file-level symbols.  We have to do this
+	     for things like typedefs in the class.  We do not try to
+	     guess any imported module as even the fully specified
+	     module search is already not D compliant and more assumptions
+	     could make it too magic.  */
+	  size = strlen (parent_name) + strlen (nested_name) + 2;
+	  concatenated_name = (char *) alloca (size);
+
+	  xsnprintf (concatenated_name, size, "%s.%s",
+		     parent_name, nested_name);
+
+	  sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
+	  if (sym.symbol != NULL)
+	    return sym;
+
+	  /* If no matching symbols were found, try searching any
+	     base classes.  */
+	  return find_symbol_in_baseclass (parent_type, nested_name, block);
+	}
+
+    case TYPE_CODE_FUNC:
+    case TYPE_CODE_METHOD:
+      return null_block_symbol;
+
+    default:
+      gdb_assert_not_reached ("called with non-aggregate type.");
+    }
+}
+
+/* Used for cleanups to reset the "searched" flag incase
+   of an error.  */
+
+static void
+reset_directive_searched (void *data)
+{
+  struct using_direct *direct = (struct using_direct *) data;
+  direct->searched = 0;
+}
+
+/* Search for NAME by applying all import statements belonging to
+   BLOCK which are applicable in SCOPE.  */
+
+static struct block_symbol
+d_lookup_symbol_imports (const char *scope, const char *name,
+			 const struct block *block,
+			 const domain_enum domain)
+{
+  struct using_direct *current;
+  struct block_symbol sym;
+  struct cleanup *searched_cleanup;
+
+  /* First, try to find the symbol in the given module.  */
+  sym = d_lookup_symbol_in_module (scope, name, block, domain, 1);
+
+  if (sym.symbol != NULL)
+    return sym;
+
+  /* Go through the using directives.  If any of them add new names to
+     the module we're searching in, see if we can find a match by
+     applying them.  */
+
+  for (current = block_using (block);
+       current != NULL;
+       current = current->next)
+    {
+      const char **excludep;
+
+      /* If the import destination is the current scope then search it.  */
+      if (!current->searched && strcmp (scope, current->import_dest) == 0)
+	{
+	  /* Mark this import as searched so that the recursive call
+	     does not search it again.  */
+	  current->searched = 1;
+	  searched_cleanup = make_cleanup (reset_directive_searched,
+					   current);
+
+	  /* If there is an import of a single declaration, compare the
+	     imported declaration (after optional renaming by its alias)
+	     with the sought out name.  If there is a match pass
+	     current->import_src as MODULE to direct the search towards
+	     the imported module.  */
+	  if (current->declaration
+	      && strcmp (name, current->alias
+			 ? current->alias : current->declaration) == 0)
+	    sym = d_lookup_symbol_in_module (current->import_src,
+					     current->declaration,
+					     block, domain, 1);
+
+	  /* If a symbol was found or this import statement was an import
+	     declaration, the search of this import is complete.  */
+	  if (sym.symbol != NULL || current->declaration)
+	    {
+	      current->searched = 0;
+	      discard_cleanups (searched_cleanup);
+
+	      if (sym.symbol != NULL)
+		return sym;
+
+	      continue;
+	    }
+
+	  /* Do not follow CURRENT if NAME matches its EXCLUDES.  */
+	  for (excludep = current->excludes; *excludep; excludep++)
+	    if (strcmp (name, *excludep) == 0)
+	      break;
+	  if (*excludep)
+	    {
+	      discard_cleanups (searched_cleanup);
+	      continue;
+	    }
+
+	  /* If the import statement is creating an alias.  */
+	  if (current->alias != NULL)
+	    {
+	      if (strcmp (name, current->alias) == 0)
+		{
+		  /* If the alias matches the sought name.  Pass
+		     current->import_src as the NAME to direct the
+		     search towards the aliased module.  */
+		  sym = lookup_module_scope (NULL, current->import_src, block,
+					     domain, scope, 0);
+		}
+	      else
+		{
+		  /* If the alias matches the first component of the
+		     sought name, pass current->import_src as MODULE
+		     to direct the search, skipping over the aliased
+		     component in NAME.  */
+		  int name_scope = d_find_first_component (name);
+
+		  if (name[name_scope] != '\0'
+		      && strncmp (name, current->alias, name_scope) == 0)
+		    {
+		      /* Skip the '.'  */
+		      name_scope++;
+		      sym = d_lookup_symbol_in_module (current->import_src,
+						       name + name_scope,
+						       block, domain, 1);
+		    }
+		}
+	    }
+	  else
+	    {
+	      /* If this import statement creates no alias, pass
+		 current->import_src as MODULE to direct the search
+		 towards the imported module.  */
+	      sym = d_lookup_symbol_in_module (current->import_src,
+					       name, block, domain, 1);
+	    }
+	  current->searched = 0;
+	  discard_cleanups (searched_cleanup);
+
+	  if (sym.symbol != NULL)
+	    return sym;
+	}
+    }
+
+  return null_block_symbol;
+}
+
+/* Searches for NAME in the current module, and by applying relevant
+   import statements belonging to BLOCK and its parents.  SCOPE is the
+   module scope of the context in which the search is being evaluated.  */
+
+static struct block_symbol
+d_lookup_symbol_module (const char *scope, const char *name,
+			const struct block *block,
+			const domain_enum domain)
+{
+  struct block_symbol sym;
+
+  /* First, try to find the symbol in the given module.  */
+  sym = d_lookup_symbol_in_module (scope, name,
+				   block, domain, 1);
+  if (sym.symbol != NULL)
+    return sym;
+
+  /* Search for name in modules imported to this and parent
+     blocks.  */
+  while (block != NULL)
+    {
+      sym = d_lookup_symbol_imports (scope, name, block, domain);
+
+      if (sym.symbol != NULL)
+	return sym;
+
+      block = BLOCK_SUPERBLOCK (block);
+    }
+
+  return null_block_symbol;
+}
+
+/* The D-specific version of name lookup for static and global names
+   This makes sure that names get looked for in all modules that are
+   in scope.  NAME is the natural name of the symbol that we're looking
+   looking for, BLOCK is the block that we're searching within, DOMAIN
+   says what kind of symbols we're looking for, and if SYMTAB is non-NULL,
+   we should store the symtab where we found the symbol in it.  */
+
+struct block_symbol
+d_lookup_symbol_nonlocal (const struct language_defn *langdef,
+			  const char *name,
+			  const struct block *block,
+			  const domain_enum domain)
+{
+  struct block_symbol sym;
+  const char *scope = block_scope (block);
+
+  sym = lookup_module_scope (langdef, name, block, domain, scope, 0);
+  if (sym.symbol != NULL)
+    return sym;
+
+  return d_lookup_symbol_module (scope, name, block, domain);
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/agentexpr.texi ./gdb/doc/agentexpr.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/agentexpr.texi	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/agentexpr.texi	2017-03-06 01:49:07.000000000 +0000
@@ -7,7 +7,7 @@
 
 @c This file is part of the GDB manual.
 @c
-@c Copyright (C) 2003-2015 Free Software Foundation, Inc.
+@c Copyright (C) 2003-2017 Free Software Foundation, Inc.
 @c
 @c See the file gdb.texinfo for copying conditions.
 
@@ -353,8 +353,7 @@ byte unsigned integer following the @cod
 
 @item @code{zero_ext} (0x2a) @var{n}: @var{a} @result{} @var{a}, zero-extended from @var{n} bits
 Pop an unsigned value from the stack; zero all but the bottom @var{n}
-bits.  This means that all bits to the left of bit @var{n-1} (where the
-least significant bit is bit 0) are set to the value of bit @var{n-1}.
+bits.
 
 The number of source bits to preserve, @var{n}, is encoded as a single
 byte unsigned integer following the @code{zero_ext} bytecode.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/all-cfg.texi ./gdb/doc/all-cfg.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/all-cfg.texi	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/all-cfg.texi	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 @c GDB MANUAL configuration file.  
 @c
-@c Copyright (C) 1993-2015 Free Software Foundation, Inc.
+@c Copyright (C) 1993-2017 Free Software Foundation, Inc.
 @c
 @c NOTE: While the GDB manual is configurable (by changing these
 @c switches), its configuration is ***NOT*** automatically tied in to
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/annotate.info ./gdb/doc/annotate.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/annotate.info	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/annotate.info	2017-03-06 01:53:27.000000000 +0000
@@ -1,12 +1,7 @@
-This is annotate.info, produced by makeinfo version 4.13 from
-./annotate.texinfo.
+This is annotate.info, produced by makeinfo version 6.3 from
+annotate.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Annotate: (annotate).                 The obsolete annotation interface.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -14,10 +9,14 @@ any later version published by the Free 
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the section entitled "GNU
 Free Documentation License".
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Annotate: (annotate).                 The obsolete annotation interface.
+END-INFO-DIR-ENTRY
 
    This file documents GDB's obsolete annotations.
 
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -62,9 +61,9 @@ File: annotate.info,  Node: Annotations 
 ************************
 
 To produce obsolete level two annotations, start GDB with the
-`--annotate=2' option.
+'--annotate=2' option.
 
-   Annotations start with a newline character, two `control-z'
+   Annotations start with a newline character, two 'control-z'
 characters, and the name of the annotation.  If there is no additional
 information associated with this annotation, the name of the annotation
 is followed immediately by a newline.  If there is additional
@@ -72,11 +71,11 @@ information, the name of the annotation 
 additional information, and a newline.  The additional information
 cannot contain newline characters.
 
-   Any output not beginning with a newline and two `control-z'
+   Any output not beginning with a newline and two 'control-z'
 characters denotes literal output from GDB.  Currently there is no need
-for GDB to output a newline followed by two `control-z' characters, but
+for GDB to output a newline followed by two 'control-z' characters, but
 if there was such a need, the annotations could be extended with an
-`escape' annotation which means those three characters as output.
+'escape' annotation which means those three characters as output.
 
    A simple example of starting up GDB with annotations is:
 
@@ -99,8 +98,8 @@ if there was such a need, the annotation
      ^Z^Zpost-prompt
      $
 
-   Here `quit' is input to GDB; the rest is output from GDB.  The three
-lines beginning `^Z^Z' (where `^Z' denotes a `control-z' character) are
+   Here 'quit' is input to GDB; the rest is output from GDB.  The three
+lines beginning '^Z^Z' (where '^Z' denotes a 'control-z' character) are
 annotations; the rest is output from GDB.
 
 
@@ -123,9 +122,9 @@ The annotation interface works by inters
 command-line interpreter output.  Unfortunately, this makes the
 annotation client dependant on not just the annotations, but also the
 CLI output.  This is because the client is forced to assume that
-specific GDB commands provide specific information.  Any change to
-GDB's CLI output modifies or removes that information and,
-consequently, likely breaks the client.
+specific GDB commands provide specific information.  Any change to GDB's
+CLI output modifies or removes that information and, consequently,
+likely breaks the client.
 
    Since the GDB/MI output is independent of the CLI, it does not have
 this problem.
@@ -159,9 +158,8 @@ reporting such changes.
 2.4 Reliability
 ===============
 
-The GDB/MI interface includes a dedicated test directory
-(`gdb/gdb.mi'), and any addition or fix to GDB/MI must include
-testsuite changes.
+The GDB/MI interface includes a dedicated test directory ('gdb/gdb.mi'),
+and any addition or fix to GDB/MI must include testsuite changes.
 
 2.5 Maintainability
 ===================
@@ -180,7 +178,7 @@ File: annotate.info,  Node: Migrating to
 3 Migrating to GDB/MI
 *********************
 
-By using the `interp mi' command, it is possible for annotation clients
+By using the 'interp mi' command, it is possible for annotation clients
 to invoke GDB/MI commands, and hence access the GDB/MI.  By doing this,
 existing annotation clients have a migration path from this obsolete
 interface to GDB/MI.
@@ -191,15 +189,15 @@ File: annotate.info,  Node: Server Prefi
 4 The Server Prefix
 *******************
 
-To issue a command to GDB without affecting certain aspects of the
-state which is seen by users, prefix it with `server '.  This means
-that this command will not affect the command history, nor will it
-affect GDB's notion of which command to repeat if <RET> is pressed on a
-line by itself.
+To issue a command to GDB without affecting certain aspects of the state
+which is seen by users, prefix it with 'server '.  This means that this
+command will not affect the command history, nor will it affect GDB's
+notion of which command to repeat if <RET> is pressed on a line by
+itself.
 
    The server prefix does not affect the recording of values into the
 value history; to print a value without recording it into the value
-history, use the `output' command instead of the `print' command.
+history, use the 'output' command instead of the 'print' command.
 
 
 File: annotate.info,  Node: Value Annotations,  Next: Frame Annotations,  Prev: Server Prefix,  Up: Top
@@ -213,7 +211,7 @@ Objects._
    When a value is printed in various contexts, GDB uses annotations to
 delimit the value from the surrounding text.
 
-   If a value is printed using `print' and added to the value history,
+   If a value is printed using 'print' and added to the value history,
 the annotation looks like
 
      ^Z^Zvalue-history-begin HISTORY-NUMBER VALUE-FLAGS
@@ -223,13 +221,13 @@ the annotation looks like
      ^Z^Zvalue-history-end
 
 where HISTORY-NUMBER is the number it is getting in the value history,
-HISTORY-STRING is a string, such as `$5 = ', which introduces the value
+HISTORY-STRING is a string, such as '$5 = ', which introduces the value
 to the user, THE-VALUE is the output corresponding to the value itself,
-and VALUE-FLAGS is `*' for a value which can be dereferenced and `-'
-for a value which cannot.
+and VALUE-FLAGS is '*' for a value which can be dereferenced and '-' for
+a value which cannot.
 
    If the value is not added to the value history (it is an invalid
-float or it is printed with the `output' command), the annotation is
+float or it is printed with the 'output' command), the annotation is
 similar:
 
      ^Z^Zvalue-begin VALUE-FLAGS
@@ -237,7 +235,7 @@ similar:
      ^Z^Zvalue-end
 
    When GDB prints an argument to a function (for example, in the output
-from the `backtrace' command), it annotates it as follows:
+from the 'backtrace' command), it annotates it as follows:
 
      ^Z^Zarg-begin
      ARGUMENT-NAME
@@ -249,8 +247,8 @@ from the `backtrace' command), it annota
 
 where ARGUMENT-NAME is the name of the argument, SEPARATOR-STRING is
 text which separates the name from the value for the user's benefit
-(such as `='), and VALUE-FLAGS and THE-VALUE have the same meanings as
-in a `value-history-begin' annotation.
+(such as '='), and VALUE-FLAGS and THE-VALUE have the same meanings as
+in a 'value-history-begin' annotation.
 
    When printing a structure, GDB annotates it as follows:
 
@@ -264,25 +262,25 @@ in a `value-history-begin' annotation.
 
 where FIELD-NAME is the name of the field, SEPARATOR-STRING is text
 which separates the name from the value for the user's benefit (such as
-`='), and VALUE-FLAGS and THE-VALUE have the same meanings as in a
-`value-history-begin' annotation.
+'='), and VALUE-FLAGS and THE-VALUE have the same meanings as in a
+'value-history-begin' annotation.
 
    When printing an array, GDB annotates it as follows:
 
      ^Z^Zarray-section-begin ARRAY-INDEX VALUE-FLAGS
 
 where ARRAY-INDEX is the index of the first element being annotated and
-VALUE-FLAGS has the same meaning as in a `value-history-begin'
+VALUE-FLAGS has the same meaning as in a 'value-history-begin'
 annotation.  This is followed by any number of elements, where is
 element can be either a single element:
 
-     `,' WHITESPACE         ; omitted for the first element
+     ',' WHITESPACE         ; omitted for the first element
      THE-VALUE
      ^Z^Zelt
 
    or a repeated element
 
-     `,' WHITESPACE         ; omitted for the first element
+     ',' WHITESPACE         ; omitted for the first element
      THE-VALUE
      ^Z^Zelt-rep NUMBER-OF-REPETITIONS
      REPETITION-STRING
@@ -309,12 +307,12 @@ _Value Annotations have been removed.  G
 of frame commands._
 
    _Frame annotations are no longer available.  The GDB/MI provides
-`-stack-list-arguments', `-stack-list-locals', and `-stack-list-frames'
+'-stack-list-arguments', '-stack-list-locals', and '-stack-list-frames'
 commands._
 
    Whenever GDB prints a frame, it annotates it.  For example, this
 applies to frames printed when GDB stops, output from commands such as
-`backtrace' or `up', etc.
+'backtrace' or 'up', etc.
 
    The frame annotation begins with
 
@@ -323,9 +321,9 @@ applies to frames printed when GDB stops
 
 where LEVEL is the number of the frame (0 is the innermost frame, and
 other frames have positive numbers), ADDRESS is the address of the code
-executing in that frame, and LEVEL-STRING is a string designed to
-convey the level to the user.  ADDRESS is in the form `0x' followed by
-one or more lowercase hex digits (note that this does not depend on the
+executing in that frame, and LEVEL-STRING is a string designed to convey
+the level to the user.  ADDRESS is in the form '0x' followed by one or
+more lowercase hex digits (note that this does not depend on the
 language).  The frame ends with
 
      ^Z^Zframe-end
@@ -360,7 +358,7 @@ consist of
           SEPARATOR-STRING
 
      where ADDRESS is the address executing in the frame (the same
-     address as in the `frame-begin' annotation, but printed in a form
+     address as in the 'frame-begin' annotation, but printed in a form
      which is intended for user consumption--in particular, the syntax
      varies depending on the language), and SEPARATOR-STRING is a string
      intended to separate this address from what follows for the user's
@@ -374,8 +372,8 @@ consist of
           ARGUMENTS
 
      where FUNCTION-NAME is the name of the function executing in the
-     frame, or `??' if not known, and ARGUMENTS are the arguments to
-     the frame, with parentheses around them (each argument is annotated
+     frame, or '??' if not known, and ARGUMENTS are the arguments to the
+     frame, with parentheses around them (each argument is annotated
      individually as well, *note Value Annotations::).
 
      If source information is available, a reference to it is then
@@ -404,10 +402,10 @@ consist of
           INFORMATION
 
      Then, if source is to actually be displayed for this frame (for
-     example, this is not true for output from the `backtrace'
-     command), then a `source' annotation (*note Source Annotations::)
-     is displayed.  Unlike most annotations, this is output instead of
-     the normal text which would be output, not in addition.
+     example, this is not true for output from the 'backtrace' command),
+     then a 'source' annotation (*note Source Annotations::) is
+     displayed.  Unlike most annotations, this is output instead of the
+     normal text which would be output, not in addition.
 
 
 File: annotate.info,  Node: Displays,  Next: Prompting,  Prev: Frame Annotations,  Up: Top
@@ -418,7 +416,7 @@ File: annotate.info,  Node: Displays,  N
 _Display Annotations have been removed.  GDB/MI instead provides
 Variable Objects._
 
-   When GDB is told to display something using the `display' command,
+   When GDB is told to display something using the 'display' command,
 the results of the display are annotated:
 
      ^Z^Zdisplay-begin
@@ -437,11 +435,11 @@ the results of the display are annotated
 
 where NUMBER is the number of the display, NUMBER-SEPARATOR is intended
 to separate the number from what follows for the user, FORMAT includes
-information such as the size, format, or other information about how
-the value is being displayed, EXPRESSION is the expression being
-displayed, EXPRESSION-SEPARATOR is intended to separate the expression
-from the text that follows for the user, and VALUE is the actual value
-being displayed.
+information such as the size, format, or other information about how the
+value is being displayed, EXPRESSION is the expression being displayed,
+EXPRESSION-SEPARATOR is intended to separate the expression from the
+text that follows for the user, and VALUE is the actual value being
+displayed.
 
 
 File: annotate.info,  Node: Prompting,  Next: Errors,  Prev: Displays,  Up: Top
@@ -454,12 +452,12 @@ know when to send output, when the outpu
 etc.
 
    Different kinds of input each have a different "input type".  Each
-input type has three annotations: a `pre-' annotation, which denotes
-the beginning of any prompt which is being output, a plain annotation,
-which denotes the end of the prompt, and then a `post-' annotation
-which denotes the end of any echo which may (or may not) be associated
-with the input.  For example, the `prompt' input type features the
-following annotations:
+input type has three annotations: a 'pre-' annotation, which denotes the
+beginning of any prompt which is being output, a plain annotation, which
+denotes the end of the prompt, and then a 'post-' annotation which
+denotes the end of any echo which may (or may not) be associated with
+the input.  For example, the 'prompt' input type features the following
+annotations:
 
      ^Z^Zpre-prompt
      ^Z^Zprompt
@@ -467,25 +465,25 @@ following annotations:
 
    The input types are
 
-`prompt'
+'prompt'
      When GDB is prompting for a command (the main GDB prompt).
 
-`commands'
-     When GDB prompts for a set of commands, like in the `commands'
+'commands'
+     When GDB prompts for a set of commands, like in the 'commands'
      command.  The annotations are repeated for each command which is
      input.
 
-`overload-choice'
+'overload-choice'
      When GDB wants the user to select between various overloaded
      functions.
 
-`query'
+'query'
      When GDB wants the user to confirm a potentially dangerous
      operation.
 
-`prompt-for-continue'
+'prompt-for-continue'
      When GDB is asking the user to press return to continue.  Note:
-     Don't expect this to work well; instead use `set height 0' to
+     Don't expect this to work well; instead use 'set height 0' to
      disable prompting.  This is because the counting of lines is buggy
      in the presence of annotations.
 
@@ -505,8 +503,8 @@ File: annotate.info,  Node: Errors,  Nex
 
    Quit and error annotations indicate that any annotations which GDB
 was in the middle of may end abruptly.  For example, if a
-`value-history-begin' annotation is followed by a `error', one cannot
-expect to receive the matching `value-history-end'.  One cannot expect
+'value-history-begin' annotation is followed by a 'error', one cannot
+expect to receive the matching 'value-history-end'.  One cannot expect
 not to receive it either, however; an error annotation does not
 necessarily mean that GDB is immediately returning all the way to the
 top level.
@@ -529,7 +527,7 @@ File: annotate.info,  Node: Breakpoint I
 _Breakpoint Annotations have been removed.  GDB/MI instead provides
 breakpoint commands._
 
-   The output from the `info breakpoints' command is annotated as
+   The output from the 'info breakpoints' command is annotated as
 follows:
 
      ^Z^Zbreakpoints-headers
@@ -565,8 +563,8 @@ of:
      ^Z^Zfield 9
      COMMANDS
 
-   Note that ADDRESS is intended for user consumption--the syntax
-varies depending on the language.
+   Note that ADDRESS is intended for user consumption--the syntax varies
+depending on the language.
 
    The output ends with
 
@@ -581,13 +579,15 @@ File: annotate.info,  Node: Invalidation
 The following annotations say that certain pieces of state may have
 changed.
 
-`^Z^Zframes-invalid'
-     The frames (for example, output from the `backtrace' command) may
+'^Z^Zframes-invalid'
+
+     The frames (for example, output from the 'backtrace' command) may
      have changed.
 
-`^Z^Zbreakpoints-invalid'
-     The breakpoints may have changed.  For example, the user just
-     added or deleted a breakpoint.
+'^Z^Zbreakpoints-invalid'
+
+     The breakpoints may have changed.  For example, the user just added
+     or deleted a breakpoint.
 
 
 File: annotate.info,  Node: Annotations for Running,  Next: Source Annotations,  Prev: Invalidation,  Up: Top
@@ -595,8 +595,8 @@ File: annotate.info,  Node: Annotations 
 12 Running the Program
 **********************
 
-When the program starts executing due to a GDB command such as `step'
-or `continue',
+When the program starts executing due to a GDB command such as 'step' or
+'continue',
 
      ^Z^Zstarting
 
@@ -604,15 +604,15 @@ or `continue',
 
      ^Z^Zstopped
 
-   is output.  Before the `stopped' annotation, a variety of
-annotations describe how the program stopped.
+   is output.  Before the 'stopped' annotation, a variety of annotations
+describe how the program stopped.
 
-`^Z^Zexited EXIT-STATUS'
+'^Z^Zexited EXIT-STATUS'
      The program exited, and EXIT-STATUS is the exit status (zero for
      successful exit, otherwise nonzero).
 
-`^Z^Zsignalled'
-     The program exited with a signal.  After the `^Z^Zsignalled', the
+'^Z^Zsignalled'
+     The program exited with a signal.  After the '^Z^Zsignalled', the
      annotation continues:
 
           INTRO-TEXT
@@ -625,21 +625,21 @@ annotations describe how the program sto
           ^Z^Zsignal-string-end
           END-TEXT
 
-     where NAME is the name of the signal, such as `SIGILL' or
-     `SIGSEGV', and STRING is the explanation of the signal, such as
-     `Illegal Instruction' or `Segmentation fault'.  INTRO-TEXT,
+     where NAME is the name of the signal, such as 'SIGILL' or
+     'SIGSEGV', and STRING is the explanation of the signal, such as
+     'Illegal Instruction' or 'Segmentation fault'.  INTRO-TEXT,
      MIDDLE-TEXT, and END-TEXT are for the user's benefit and have no
      particular format.
 
-`^Z^Zsignal'
-     The syntax of this annotation is just like `signalled', but GDB is
+'^Z^Zsignal'
+     The syntax of this annotation is just like 'signalled', but GDB is
      just saying that the program received the signal, not that it was
      terminated with it.
 
-`^Z^Zbreakpoint NUMBER'
+'^Z^Zbreakpoint NUMBER'
      The program hit breakpoint number NUMBER.
 
-`^Z^Zwatchpoint NUMBER'
+'^Z^Zwatchpoint NUMBER'
      The program hit watchpoint number NUMBER.
 
 
@@ -652,16 +652,16 @@ The following annotation is used instead
 
      ^Z^Zsource FILENAME:LINE:CHARACTER:MIDDLE:ADDR
 
-   where FILENAME is an absolute file name indicating which source
-file, LINE is the line number within that file (where 1 is the first
-line in the file), CHARACTER is the character position within the file
-(where 0 is the first character in the file) (for most debug formats
-this will necessarily point to the beginning of a line), MIDDLE is
-`middle' if ADDR is in the middle of the line, or `beg' if ADDR is at
-the beginning of the line, and ADDR is the address in the target
-program associated with the source which is being displayed.  ADDR is
-in the form `0x' followed by one or more lowercase hex digits (note
-that this does not depend on the language).
+   where FILENAME is an absolute file name indicating which source file,
+LINE is the line number within that file (where 1 is the first line in
+the file), CHARACTER is the character position within the file (where 0
+is the first character in the file) (for most debug formats this will
+necessarily point to the beginning of a line), MIDDLE is 'middle' if
+ADDR is in the middle of the line, or 'beg' if ADDR is at the beginning
+of the line, and ADDR is the address in the target program associated
+with the source which is being displayed.  ADDR is in the form '0x'
+followed by one or more lowercase hex digits (note that this does not
+depend on the language).
 
 
 File: annotate.info,  Node: Multi-threaded Apps,  Next: GNU Free Documentation License,  Prev: Source Annotations,  Up: Top
@@ -671,16 +671,17 @@ File: annotate.info,  Node: Multi-thread
 
 The following annotations report thread related changes of state.
 
-`^Z^Znew-thread'
+'^Z^Znew-thread'
+
      This annotation is issued once for each thread that is created
      apart from the main thread, which is not reported.
 
-`^Z^Zthread-changed'
+'^Z^Zthread-changed'
+
      The selected thread has changed.  This may occur at the request of
-     the user with the `thread' command, or as a result of execution,
+     the user with the 'thread' command, or as a result of execution,
      e.g., another thread hits a breakpoint.
 
-
 
 File: annotate.info,  Node: GNU Free Documentation License,  Prev: Multi-threaded Apps,  Up: Top
 
@@ -690,7 +691,7 @@ Appendix A GNU Free Documentation Licens
                      Version 1.3, 3 November 2008
 
      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -715,21 +716,21 @@ Appendix A GNU Free Documentation Licens
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -747,12 +748,12 @@ Appendix A GNU Free Documentation Licens
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -763,27 +764,27 @@ Appendix A GNU Free Documentation Licens
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -821,8 +822,8 @@ Appendix A GNU Free Documentation Licens
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -836,12 +837,11 @@ Appendix A GNU Free Documentation Licens
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -849,40 +849,39 @@ Appendix A GNU Free Documentation Licens
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -912,31 +911,30 @@ Appendix A GNU Free Documentation Licens
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -949,11 +947,11 @@ Appendix A GNU Free Documentation Licens
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -962,15 +960,15 @@ Appendix A GNU Free Documentation Licens
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -980,8 +978,8 @@ Appendix A GNU Free Documentation Licens
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -1008,20 +1006,20 @@ Appendix A GNU Free Documentation Licens
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     a storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -1066,8 +1064,8 @@ Appendix A GNU Free Documentation Licens
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -1079,33 +1077,33 @@ Appendix A GNU Free Documentation Licens
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
+  10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
      proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
+  11. RELICENSING
 
      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
@@ -1135,7 +1133,6 @@ Appendix A GNU Free Documentation Licens
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -1152,7 +1149,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -1163,28 +1160,28 @@ combination of the three, merge those tw
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 
 
 Tag Table:
-Node: Top1173
-Node: Annotations Overview2343
-Node: Limitations4142
-Node: Migrating to GDB/MI6727
-Node: Server Prefix7110
-Node: Value Annotations7756
-Node: Frame Annotations10926
-Node: Displays14825
-Node: Prompting15856
-Node: Errors17359
-Node: Breakpoint Info18249
-Node: Invalidation19474
-Node: Annotations for Running19953
-Node: Source Annotations21466
-Node: Multi-threaded Apps22412
-Node: GNU Free Documentation License23021
+Node: Top1166
+Node: Annotations Overview2336
+Node: Limitations4135
+Node: Migrating to GDB/MI6720
+Node: Server Prefix7103
+Node: Value Annotations7749
+Node: Frame Annotations10919
+Node: Displays14818
+Node: Prompting15849
+Node: Errors17352
+Node: Breakpoint Info18242
+Node: Invalidation19467
+Node: Annotations for Running19948
+Node: Source Annotations21461
+Node: Multi-threaded Apps22407
+Node: GNU Free Documentation License23017
 
 End Tag Table
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/annotate.texinfo ./gdb/doc/annotate.texinfo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/annotate.texinfo	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/annotate.texinfo	2017-03-06 01:49:07.000000000 +0000
@@ -27,7 +27,7 @@
 @c cost.  Having a smaller cheaper manual helps the GNU Press with its sales.
 
 @copying
-Copyright @copyright{} 1994-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1994-2017 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/ChangeLog ./gdb/doc/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/ChangeLog	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/ChangeLog	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,639 @@
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.texinfo (Print Settings, Tail Call Frames): Rename DW_OP_GNU_*,
+	DW_TAG_GNU_* and DW_AT_GNU_*.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* python.texi (Recordings In Python): New section.
+
+2017-02-14  Tom Tromey  <tom@tromey.com>
+
+	PR python/13598:
+	* python.texi (Events In Python): Document events.before_prompt.
+
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.texinfo (Target Commands): Document the optional offset
+	argument for the load command.
+
+2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
+
+	PR gdb/21122
+	* gdb.texinfo (Breakpoints): Reword documentation to speak in terms of
+	space-separated breakpoint lists.  Also add a missing @table command
+	and @cindex for breakpoint lists.
+
+2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
+
+	PR tdep/20936
+	* gdb.texinfo: (Standard Target Features): Document SPARC features.
+	(Sparc Features): New node.
+
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.texinfo (i386 Features): Add system segment registers
+	as feature.
+
+2017-01-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* python.texi (Events In Python): Fix typo.
+
+2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
+	    Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.texinfo (-target-flash-erase): New MI command description.
+	(flash-erase): New CLI command description.
+
+2017-01-04  John Baldwin  <jhb@FreeBSD.org>
+
+	* gdb.texinfo (Contributors): Add SRI International and University
+	of Cambridge for FreeBSD/mips.
+
+2016-12-22  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.texinfo (Symbols): Update docs for symbol printing maintenance
+	commands.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (User-defined Commands): Limit on number of
+	arguments passed to user-defined commands removed; update.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	PR cli/20559
+	* gdb.texinfo (Define): Add example of using "eval" to process a
+	variable number of arguments.
+	(Output) <eval>: Add anchor.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Likewise.
+
+2016-11-18  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.texinfo (GDB/MI Async Records): Add missing comma after
+	xref.
+
+2016-10-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Packets) <vCont>: Remove mention of default
+	actions.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Packets): Clarify vCont packets with multiple
+	actions that match a thread, and what happens when an action
+	matches a thread that is already running.
+
+2016-10-14  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (Using Trace Files): Fix typo.
+	(GDB/MI Tracepoint Commands): Likewise.
+
+2016-10-14  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (GDB/MI Tracepoint Commands): Document -ctf switch
+	of -trace-save.
+
+2016-10-06  Tom Tromey  <tom@tromey.com>
+
+	* guile.texi (Types In Guile): Remove Java mentions.
+	* python.texi (Types In Python): Remove Java mentions.
+	* gdb.texinfo (Address Locations, Supported Languages)
+	(Index Section Format): Remove Java mentions.
+
+2016-08-15  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Target Description Format): Update docs on "end"
+	field spec and field default type.
+
+2016-10-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+2016-10-03  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20487
+	* gdb.texinfo (Context management): Update mention of frame
+	change notifications.
+	(gdb/mi Async Records): Document frame field in
+	=thread-select event.
+	* observer.texi (GDB Observers): New user_selected_context_changed
+	observer.
+
+2016-09-28  Tom Tromey  <tom@tromey.com>
+
+	* gdb.texinfo (Packets) <z0>: Use "software breakpoint" rather
+	than "memory breakpoint".  Further document "kind".  Move
+	protocol-details link earlier.
+	<z1>: Document the cmd_list argument.  Fix typo.
+	<g>: Remove incorrect sentence.
+	(Stop Reply Packets): Document "OK" response to requests when in
+	non-stop mode.
+	<swbreak>: Use "software breakpoint" rather than "memory
+	breakpoint".
+	<create>: Document that "R" is ignored.
+	<W, X, w>: Document formatting of "AA".
+	(Notification Packets): Use "%Stop", not "%%Stop".
+
+2016-09-21  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* gdb.texinfo (Embedded Processors): Document ARC.
+	(Synopsys ARC): New section.
+	(Standard Target Features): Document ARC features.
+	(ARC Features): New section.
+
+2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* .gitignore: New file.
+
+2016-08-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (Input/Output): Mention possibility to unset
+	inferior-tty.
+
+2016-07-25  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* gdb.texinfo: Resume btrace on reconnect.
+
+2016-07-23  Gabriel Krisman Bertazi  <gabriel@krisman.be>
+
+	* gdb.texinfo (Set Catchpoints): Add 'group' argument to catch
+	syscall.
+
+2016-06-30  Ð ÑƒÑ�Ð»Ð°Ð½ Ð˜Ð¶Ð±ÑƒÐ»Ð°Ñ‚Ð¾Ð²  <lrn1986@gmail.com>
+
+	* gdb.texinfo (Cygwin Native): Document the new 'signal-event'
+	command.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/15620, PR python/18620:
+	* python.texi (Events In Python): Document new breakpoint events.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/17698:
+	* python.texi (Breakpoints In Python): Document
+	Breakpoint.pending.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	* python.texi (Breakpoints In Python): Move table of types and
+	table of watchpoint types earlier in node.
+
+2016-07-12  Tom Tromey  <tom@tromey.com>
+
+	PR python/19293:
+	* python.texi (Frames In Python): Document
+	gdb.invalidate_cached_frames.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Interpreters): Update intepreter-exec section,
+	document new-ui and explain use case.
+
+2016-06-17  Yan-Ting Lin  <currygt52@gmail.com>
+
+	* gdb.texinfo (Standard Target Features): Document NDS32 features.
+	(NDS32 Features): New Section.
+
+2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
+
+	* gdb.texinfo (Examining Memory): Document negative repeat
+	count in the 'x' command.
+
+2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (GDB/MI Async Records): Document method and
+	format fields in =record-started.
+	* observer.texi (record_changed): Add method and format
+	parameters.
+
+2016-05-27  Eli Zaretskii  <eliz@gnu.org>
+
+	* gdb.texinfo (General Query Packets): Move the description of the
+	response before the long list of the specific 'read' and 'write'
+	requests.
+
+2016-05-23  Tom Tromey  <tom@tromey.com>
+
+	* python.texi (Basic Python): Document gdb.breakpoints return.
+
+2016-05-24  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/19194:
+	* gdb.texinfo (gdb man): Fix typo.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* gdb.texinfo (Supported Languages): Mention Rust.  Update menu.
+	(Rust): New node.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* gdb.texinfo (Maintenance Commands): Document "maint selftest".
+
+2016-04-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.texinfo (tfind): Complete doc about tfind without
+	argument.
+
+2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* agentexpr.texi (byte): Fix zero_ext description.
+
+2016-03-31  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (M32R/SDI): Delete node.
+	(MIPS Embedded): Remove references to the MIPS remote debugging
+	protocol, PMON and variants, and the associated commands.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Target Descriptions): New menu item "Enum Target Types".
+	(Target Description Format): Mention enum types.  Update docs on
+	flags types.
+	(Predefined Target Types): Add "bool".
+	(Enum Target Types): New node.
+
+2016-03-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Tracepoint Actions): Fix typo.
+
+2016-03-15  Pedro Alves  <palves@redhat.com>
+	    Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	    Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.texinfo (Tracepoint Actions): Document possible
+	unreliability of '$_ret'.
+
+2016-03-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (Symbols): Document new 'maint info line-table'
+	command.
+
+2016-03-10  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.texinfo (Convenience Functions): Document $_as_string.
+
+2016-02-23  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Skipping Over Functions and Files): Document new
+	options to "skip" command.  Update docs of output of "info skip".
+
+2016-02-18  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.texinfo (Signals): Add bound violation display hints for
+	a SIGSEGV.
+
+2016-02-18  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.texinfo (Trace File Format): Add documentation for description
+	section lines.
+
+2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.texinfo (Trace File Format): Remove misleading information
+	about register block ordering.
+
+2016-02-01  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Value Sizes): Fix typo.
+
+2016-02-01  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Skipping Over Functions and Files): Fix typo.
+
+2016-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (Value Sizes): New section.
+	(Data): Add the 'Value Sizes' node to the menu.
+
+2016-01-26  John Baldwin  <jhb@FreeBSD.org>
+
+	* gdb.texinfo (Debugging Output): Fix subject verb disagreements.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* gdb.texinfo (Debugging Output): Document "set/show debug fbsd-lwp".
+
+2016-01-18  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Mention that GDB displays the ID and name
+	of the thread that hit a breakpoint or received a signal.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads) <thread ID lists>: Document star ranges.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Document the $_gthread convenience
+	variable.
+	(Convenience Vars): Likewise.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Document "info threads -gid".
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* python.texi (Breakpoints In Python) <Breakpoint.thread>: Add
+	anchor.
+	(Threads In Python): Document new InferiorThread.global_num
+	attribute.
+
+2016-01-07  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Document per-inferior thread IDs,
+	qualified thread IDs, global thread IDs and thread ID lists.
+	(Set Watchpoints, Thread-Specific Breakpoints): Adjust to refer to
+	thread IDs.
+	(Convenience Vars): Document the $_thread convenience variable.
+	(Ada Tasks): Adjust to refer to thread IDs.
+	(GDB/MI Async Records, GDB/MI Thread Commands, GDB/MI Ada Tasking
+	Commands, GDB/MI Variable Objects): Update to mention global
+	thread IDs.
+	* guile.texi (Breakpoints In Guile)
+	<breakpoint-thread/set-breakpoint-thread breakpoint>: Mention
+	global thread IDs instead of thread IDs.
+	* python.texi (Threads In Python): Adjust documentation of
+	InferiorThread.num.
+	(Breakpoint.thread): Mention global thread IDs instead of thread
+	IDs.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* python.texi (Threads In Python): Document
+	InferiorThread.inferior.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Inferiors and Programs): Document the $_inferior
+	convenience variable.
+	(Convenience Vars): Likewise.
+
+2016-01-12  Josh Stone  <jistone@redhat.com>
+	    Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* gdb.texinfo (Remote Configuration): List the QCatchSyscalls packet.
+	(Stop Reply Packets): List the syscall entry and return stop reasons.
+	(General Query Packets): Describe QCatchSyscalls, and add it to the
+	table and the detailed list of stub features.
+
+2016-01-12  Pedro Alves  <palves@redhat.com>
+
+	Remove use of the registered trademark symbol throughout.
+
+2016-01-12  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.texinfo (Interrupts): Update the document on handling
+	interrupt when program is stopped.
+
+2015-12-11  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.texinfo (Forks): Correct Linux kernel version where
+	fork and exec events are supported, add notes about support
+	of these events in target remote mode.
+	(Connecting): Reorganize and clarify distinctions between
+	target remote, extended-remote, and multiprocess.
+	Reorganize related text from separate sections into new
+	sections.
+	(Server): Note effects of target extended-remote mode.
+	Delete section on Multi-Process Mode for gdbserver.
+	Move some text to "Connecting" node.
+
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Replace warning with explanation
+	about single-threaded programs.
+
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Threads): Remove mention of SGI.
+	(Forks): Remove mention of HP-UX.
+	(Breakpoints): Remove mention of HP-UX.
+	(Set Watchpoints) <hardware watchpoints>: Don't mention HP-UX.
+	Reword in terms of architectures.
+	(Set Catchpoints) <catch exec, catch fork, catch vfork>: Don't
+	mention supported systems.
+	(Convenience Vars): Don't mention HP-UX.
+	(Jumping): Remove mention of HP-UX in comment.
+	(Files) <shared libraries>: Update supported shared library types
+	list.  Remove mention of HP-UX.
+	(Native): Remove HP-UX subsection.
+	(SVR4 Process Information): Remove mention of HP-UX.
+
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Stack): Reorder menu.
+
+2015-12-09  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.texinfo (GDB/MI Variable Objects): Update text to mention
+	-var-set-format's new zero-hexadecimal format.
+
+2015-12-08  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.texinfo (Ada Mode Into): Move overloading support
+	description to its own node.
+	(Overloading support for Ada): New node.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	PR 14618
+	* gdb.texinfo (Stop Reply Packets): Document the N stop reply.
+	(Remote Configuration): Add the "set/show remote
+	no-resumed-stop-reply" to the available settings table.
+	(General Query Packets): Document the "no-resumed" qSupported
+	feature.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Remote Configuration): List "set/show remote
+	thread-events" command in configuration table.
+	(Stop Reply Packets): Document "T05 create" stop
+	reason and 'w' stop reply.
+	(General Query Packets): Document QThreadEvents packet.  Document
+	QThreadEvents qSupported feature.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Bootstrapping): Add "interrupting remote targets"
+	anchor.
+	(Packets): Document vCtrlC.
+
+2015-11-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (Thread List Format): Mention thread names.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* gdb.texinfo (Inferiors and Programs): Adjust "maint info
+	program-spaces" example to ascending order listing.
+	(Threads): Adjust "info threads" example to ascending order
+	listing.
+	(Forks): Adjust "info inferiors" example to ascending order
+	listing.
+
+2015-11-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.texinfo (Process Record and Replay): Document "record
+	instruction-history" modifiers.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (Frames): Remove 'frame' and 'select-frame'
+	description.
+	(Frame Filter Management): Move to later in the 'Examining the
+	Stack' chapter.
+	(Selection): Add entry for 'select-frame'.
+
+2015-09-25  Doug Evans  <dje@google.com>
+
+	* gdb.texinfo (Process Record and Replay): Fix syntax of
+	"record instruction-history begin, end" and
+	"record function-call-history begin, end".
+
+2015-09-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.texinfo (Specifying Source Directories): Fix
+	substitute-path example.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.texinfo (All-Stop Mode): Describe new scheduler-locking mode.
+
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	PR remote/18965
+	* gdb.texinfo (Stop Reply Packets): Revert previous change to
+	the vforkdone description.
+
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	PR remote/18965
+	* gdb.texinfo (Stop Reply Packets): Explain that vforkdone's 'r'
+	part indicates the thread ID of the parent process.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.texinfo (General Query Packets): Add vContSupported to
+	tables of 'gdbfeatures' and 'stub features' supported in the
+	qSupported packet, as well as to the list containing stub
+	feature details.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.texinfo (Remote Configuration): Add exec event
+	feature to table of packet settings.
+	(Stop Reply Packets): Add exec events to the list of stop
+	reasons.
+	(General Query Packets): Add exec events to tables of
+	'gdbfeatures' and 'stub features' supported in the qSupported
+	packet, as well as to the list containing stub feature
+	details.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Remote Configuration): Document the "set/show
+	remote multiprocess-extensions-packet" commands.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Embedded Processors) <ARM>: Remove references to RDI.
+	<M32R>: Remove references to M32R/D.
+	<M68K>: Remove references to target dbug.
+	<MIPS Embedded>: Remove references to target r3900 and target
+	array.
+	<PowerPC Embedded>: Remove references to target dink32 and target
+	ppcbug, target sds
+	<PA, Sparclet, Sparclite, Z8000>: Delete nodes.
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (GDB Files): Add 'File Caching' menu entry.
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (File Caching): Document "set/show debug bfd-cache".
+
+2015-08-18  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (Maintenance Commands): Move documentation of "main
+	info bfds" to...
+	(File Caching): A New section.  Outline bfd caching, and add new
+	description for "main set/show bfd-sharing".
+
+2015-08-14  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.texinfo (Machine Code): Update docs for mixed source/assembly
+	disassembly.
+	(GDB/MI Data Manipulation): Update docs for new disassembly modes.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.texinfo (Thread-Specific Breakpoints, Printing Source Lines):
+	Use "location(s)"instead of "linespec(s)".
+	(Specifying a Location): Rewrite.
+	Add subsections describing linespec, address, and explicit locations.
+	Add node/menu for each subsection.
+	(Source and Machine Code, C Preprocessor Macros)
+	(Create and Delete Trace points)
+	(Extensions for Ada Tasks): Use "location(s)" instead of "linespec(s)".
+	(Continuing at a Different Address): Remove "linespec" examples.
+	Add reference to "Specify a Location"
+	(The -break-insert Command): Rewrite.  Add anchor.
+	Add reference to appropriate manual section discussing locations.
+	(The -dprintf-insert Command): Refer to -break-insert for
+	specification of 'location'.
+
+2015-08-07  Pedro Alves  <palves@redhat.com>
+
+	* gdb.texinfo (Maintenance Commands): Document "maint set/show
+	target-non-stop".
+
+2015-08-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.texinfo (Process Record and Replay): Document prefixing of
+	speculatively executed instructions in the "record instruction-history"
+	command.
+
+2015-07-20  Doug Evans  <dje@google.com>
+
+	* Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi.
+
+2015-07-16  Doug Evans  <dje@google.com>
+
+	* stabs.texinfo: @include gdb-cfg.texi.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert the previous 2 commits:
+	gdbserver build-id attribute generator
+	Validate symbol file using build-id
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.texinfo (Files): Add 'set validate-build-id'
+	and 'show validate-build-id'.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	gdbserver build-id attribute generator.
+	* gdb.texinfo (Library List Format for SVR4 Targets): Add
+	'build-id' in description, example, new attribute in dtd.
+
+2015-07-08  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.texinfo (Selection): Update documentation for 'frame'
+	command.
+
 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
 
-        * gdb.texinfo (Maintenance Commands): Document "maint btrace"
+	* gdb.texinfo (Maintenance Commands): Document "maint btrace"
 	commands.
 
 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
@@ -75,7 +708,7 @@
 	linux-namespaces" command.
 
 2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
-            Mircea Gherzan  <mircea.gherzan@intel.com>
+	    Mircea Gherzan  <mircea.gherzan@intel.com>
 
 	* gdb.texinfo (i386): Add documentation about "show mpx bound"
 	and "set mpx bound".
@@ -180,8 +813,8 @@
 2015-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
 	    Eli Zaretskii  <eliz@gnu.org>
 
-	* gdb.texinfo (Compiling and Injecting Code): Describe set debug 
-	compile, show debug compile.  New subsection Compilation options for 
+	* gdb.texinfo (Compiling and Injecting Code): Describe set debug
+	compile, show debug compile.  New subsection Compilation options for
 	the compile command.  New subsection Compiler search for the compile
 	command.
 
@@ -1055,8 +1688,8 @@
 
 2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>
 
-        * gdb.texinfo (Commands In Python): Document COMPLETE_EXPRESSION
-        constant.
+	* gdb.texinfo (Commands In Python): Document COMPLETE_EXPRESSION
+	constant.
 
 2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>
 
@@ -1686,8 +2319,8 @@
 
 2012-12-23  Pierre Muller  <muller@sourceware.org>
 
-        * gdbint.texinfo (Function prototypes): Require use of "extern"
-        modifier for function prototypes in headers.
+	* gdbint.texinfo (Function prototypes): Require use of "extern"
+	modifier for function prototypes in headers.
 
 2012-12-19  Joel Brobecker  <brobecker@adacore.com>
 
@@ -1712,10 +2345,10 @@
 
 2012-12-14  Tom Tromey  <tromey@redhat.com>
 
-        * gdb.texinfo (SVR4 Process Information): Mention core files.
+	* gdb.texinfo (SVR4 Process Information): Mention core files.
 
 2012-12-12 Mircea Gherzan <mircea.gherzan@intel.com>
-    
+
 	* gdb.texinfo (GDB/MI Catchpoint Commands): New section.
 
 2012-12-11  Pedro Alves  <palves@redhat.com>
@@ -1831,7 +2464,7 @@
 	* observer.texi (memory_changed): Expand parameter LEN to ssize_t.
 
 2012-09-21  Yao Qi  <yao@codesourcery.com>
-            Pedro Alves  <palves@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
 
 	* gdb.texinfo (GDB/MI Async Records): Document notification
 	'record-started' and 'record-stopped'.
@@ -2131,7 +2764,7 @@
 	appropriate.
 
 2012-05-18  Sandra Loosemore  <sandra@codesourcery.com>
-            Maciej W. Rozycki  <macro@codesourcery.com>
+	    Maciej W. Rozycki  <macro@codesourcery.com>
 
 	* gdb.texinfo (MIPS): Document "set mips compression" and "show
 	mips compression".
@@ -2420,7 +3053,7 @@
 	Mention condition-evaluation mode being shown in "info break".
 	(Break Conditions): Add description for target-side
 	conditional breakpoints.
-	(Remote Configuration): Mention conditional-breakpoints-packet. 
+	(Remote Configuration): Mention conditional-breakpoints-packet.
 	(Packets): Add cond-expr parameter to Z0/Z1 packets and explain
 	cond-expr.
 	(General Query Packets): Mention new ConditionalBreakpoint feature.
@@ -2655,17 +3288,17 @@
 
 2011-10-27  Kevin Pouget  <kevin.pouget@st.com>
 
-	* gdb.texinfo ((Frames In Python): Document 
+	* gdb.texinfo ((Frames In Python): Document
 	gdb.FRAME_UNWIND_FIRST_ERROR contant.
 
 2011-10-26  Paul Koning  <paul_koning@dell.com>
 
 	* gdb.texinfo (gdb.types): Document new deepitems function.
-	
+
 2011-10-25  Paul Koning  <paul_koning@dell.com>
 
 	PR python/13327
-	
+
 	* gdb.texinfo (Values From Inferior): Add is_lazy attribute,
 	fetch_lazy method.
 
@@ -2683,7 +3316,7 @@
 2011-10-13  Kevin Pouget  <kevin.pouget@st.com>
 
 	PR python/13285 Document named constants for frame unwind stop reasons
-	* gdb.texinfo (Frames In Python): Document gdb.FRAME_UNWIND_* 
+	* gdb.texinfo (Frames In Python): Document gdb.FRAME_UNWIND_*
 	constants.
 
 2011-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
@@ -2794,7 +3427,7 @@
 	the syntax of Python.  Also put class and module names explicitly
 	on function, member, and variable names, matching Python
 	documentation conventions.
-	
+
 2011-09-15  Kevin Pouget  <kevin.pouget@st.com>
 
 	PR Python/12692 Add gdb.selected_inferior() to Python interface.
@@ -2818,11 +3451,11 @@
 
 2011-08-17  Phil Muldoon  <pmuldoon@redhat.com>
 
-        * gdb.texinfo (Prompt): Add set/show extended-prompt
-        documentation
-        (Basic Python): Add prompt_hook anchor.
-        (Python modules): Reword module text to reflect multiple modules.
-        (gdb.prompt): Document gdb.prompt module.
+	* gdb.texinfo (Prompt): Add set/show extended-prompt
+	documentation
+	(Basic Python): Add prompt_hook anchor.
+	(Python modules): Reword module text to reflect multiple modules.
+	(gdb.prompt): Document gdb.prompt module.
 
 2011-08-14  Yao Qi  <yao@codesourcery.com>
 
@@ -2868,10 +3501,10 @@
 
 2011-07-11  Phil Muldoon  <pmuldoon@redhat.com>
 
-        PR python/12438
+	PR python/12438
 	* gdb.texinfo (Python Commands): Add deprecate note to maint
-          set/show python print-stack.  Document set/show python
-          print-backtrace.
+	  set/show python print-stack.  Document set/show python
+	  print-backtrace.
 
 2011-07-05  Thiago Jung Bauermann  <bauerman.ibm.com>
 
@@ -3074,7 +3707,7 @@
 
 2011-02-27  Michael Snyder  <msnyder@vmware.com>
 
-	* gdb.texinfo (Inferiors and Programs): Update commands to show 
+	* gdb.texinfo (Inferiors and Programs): Update commands to show
 	that they can accept multiple arguments.
 
 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
@@ -3232,7 +3865,7 @@
 
 2010-11-29  Phil Muldoon  <pmuldoon@redhat.com>
 
-        PR python/12199
+	PR python/12199
 
 	* gdb.texinfo (Breakpoints In Python): Document "delete" method.
 
@@ -11258,4 +11891,5 @@ mode: change-log
 left-margin: 8
 fill-column: 74
 version-control: never
+coding: utf-8
 End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-base.in ./gdb/doc/Doxyfile-base.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-base.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/Doxyfile-base.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # Base doxyfile for GDB.
 # This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdb-api.in ./gdb/doc/Doxyfile-gdb-api.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdb-api.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/Doxyfile-gdb-api.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # Doxygen file for GDB internal API.
 # This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdbserver.in ./gdb/doc/Doxyfile-gdbserver.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdbserver.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/Doxyfile-gdbserver.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # Doxygen file for a GDBserver cross-reference.
 # This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdb-xref.in ./gdb/doc/Doxyfile-gdb-xref.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Doxyfile-gdb-xref.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/Doxyfile-gdb-xref.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # Doxygen file for a full GDB cross-reference.
 # This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/doxy-index.in ./gdb/doc/doxy-index.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/doxy-index.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/doxy-index.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 Navigation page for Doxygen-generated GDB info.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gcore.1 ./gdb/doc/gcore.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gcore.1	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gcore.1	2017-03-06 01:53:28.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GCORE 1"
-.TH GCORE 1 "2015-07-06" "gdb-7.9.50.20150706-cvs" "GNU Development Tools"
+.TH GCORE 1 "2017-03-06" "gdb-7.12.50.20170306-git" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -165,7 +165,7 @@ should give you access to the complete m
 Richard M. Stallman and Roland H. Pesch, July 1991.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (c) 1988\-2015 Free Software Foundation, Inc.
+Copyright (c) 1988\-2017 Free Software Foundation, Inc.
 .PP
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.1 ./gdb/doc/gdb.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.1	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.1	2017-03-06 01:53:27.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDB 1"
-.TH GDB 1 "2015-07-06" "gdb-7.9.50.20150706-cvs" "GNU Development Tools"
+.TH GDB 1 "2017-03-06" "gdb-7.12.50.20170306-git" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -194,8 +194,8 @@ named \fI1234\fR; \s-1GDB\s0 does check 
 With option \fB\-p\fR you can omit the \fIprogram\fR filename.
 .PP
 Here are some of the most frequently needed \s-1GDB\s0 commands:
-.IP "\fBbreak [\fR\fIfile\fR\fB:]\fR\fIfunctiop\fR" 4
-.IX Item "break [file:]functiop"
+.IP "\fBbreak [\fR\fIfile\fR\fB:]\fR\fIfunction\fR" 4
+.IX Item "break [file:]function"
 Set a breakpoint at \fIfunction\fR (in \fIfile\fR).
 .IP "\fBrun [\fR\fIarglist\fR\fB]\fR" 4
 .IX Item "run [arglist]"
@@ -382,7 +382,7 @@ should give you access to the complete m
 Richard M. Stallman and Roland H. Pesch, July 1991.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (c) 1988\-2015 Free Software Foundation, Inc.
+Copyright (c) 1988\-2017 Free Software Foundation, Inc.
 .PP
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info ./gdb/doc/gdb.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info	2017-03-06 01:53:25.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -39,711 +38,731 @@ developing GNU and promoting software fr
 
 
 Indirect:
-gdb.info-1: 1723
-gdb.info-2: 296975
-gdb.info-3: 594873
-gdb.info-4: 893208
-gdb.info-5: 1193118
-gdb.info-6: 1490374
-gdb.info-7: 1786622
-gdb.info-8: 1980712
+gdb.info-1: 1717
+gdb.info-2: 302362
+gdb.info-3: 619447
+gdb.info-4: 907266
+gdb.info-5: 1203378
+gdb.info-6: 1501784
+gdb.info-7: 1801820
 
 Tag Table:
 (Indirect)
-Node: Top1723
-Node: Summary5196
-Node: Free Software7069
-Node: Free Documentation7810
-Node: Contributors12745
-Node: Sample Session20839
-Node: Invocation27691
-Node: Invoking GDB28235
-Node: File Options30570
-Node: Mode Options33628
-Ref: -nx33855
-Ref: -nh34944
-Node: Startup41268
-Ref: Home Directory Init File41819
-Ref: Option -init-eval-command41929
-Ref: Init File in the Current Directory during Startup42274
-Ref: Startup-Footnote-144468
-Node: Quitting GDB44577
-Node: Shell Commands45474
-Node: Logging Output46401
-Node: Commands47247
-Node: Command Syntax47885
-Node: Completion50051
-Ref: Completion-Footnote-156442
-Node: Help56602
-Node: Running62356
-Node: Compilation63585
-Node: Starting65669
-Ref: set exec-wrapper70941
-Ref: set auto-connect-native-target73096
-Node: Arguments77492
-Node: Environment78762
-Node: Working Directory82494
-Node: Input/Output83646
-Node: Attach85617
-Node: Kill Process88084
-Node: Inferiors and Programs89065
-Node: Threads96311
-Ref: set libthread-db-search-path103867
-Node: Forks105925
-Node: Checkpoint/Restart112367
-Ref: Checkpoint/Restart-Footnote-1116896
-Node: Stopping116931
-Node: Breakpoints118194
-Node: Set Breaks121737
-Node: Set Watchpoints140168
-Node: Set Catchpoints149571
-Node: Delete Breaks160453
-Node: Disabling162389
-Node: Conditions165778
-Node: Break Commands171426
-Node: Dynamic Printf174648
-Node: Save Breakpoints178908
-Node: Static Probe Points180083
-Ref: Static Probe Points-Footnote-1184262
-Ref: Static Probe Points-Footnote-2184422
-Node: Error in Breakpoints184562
-Node: Breakpoint-related Warnings185298
-Node: Continuing and Stepping187625
-Ref: range stepping197100
-Node: Skipping Over Functions and Files198182
-Node: Signals201754
-Ref: stepping and signal handlers206188
-Ref: stepping into signal handlers206983
-Ref: extra signal information208216
-Node: Thread Stops209719
-Node: All-Stop Mode210818
-Node: Non-Stop Mode214627
-Node: Background Execution218044
-Node: Thread-Specific Breakpoints220261
-Node: Interrupted System Calls222279
-Node: Observer Mode223793
-Node: Reverse Execution227232
-Ref: Reverse Execution-Footnote-1231859
-Ref: Reverse Execution-Footnote-2232486
-Node: Process Record and Replay232536
-Node: Stack250255
-Node: Frames251803
-Node: Backtrace254571
-Ref: backtrace-command254922
-Ref: Backtrace-Footnote-1260691
-Node: Frame Filter Management260879
-Ref: disable frame-filter all261423
-Node: Selection265731
-Node: Frame Info268603
-Node: Source270597
-Node: List271663
-Node: Specify Location274365
-Node: Edit278968
-Ref: Edit-Footnote-1280443
-Node: Search280678
-Node: Source Path281486
-Ref: set substitute-path287853
-Node: Machine Code290074
-Node: Data296975
-Node: Expressions304638
-Node: Ambiguous Expressions306742
-Node: Variables309976
-Node: Arrays316042
-Node: Output Formats318573
-Ref: Output Formats-Footnote-1321945
-Node: Memory322102
-Ref: addressable memory unit327563
-Node: Auto Display329058
-Node: Print Settings333600
-Ref: set print entry-values341758
-Node: Pretty Printing353066
-Node: Pretty-Printer Introduction353579
-Node: Pretty-Printer Example355334
-Node: Pretty-Printer Commands356112
-Node: Value History358536
-Node: Convenience Vars360957
-Node: Convenience Funs367440
-Node: Registers372577
-Ref: standard registers373559
-Ref: Registers-Footnote-1378511
-Node: Floating Point Hardware378906
-Node: Vector Unit379438
-Node: OS Information379825
-Ref: linux info os infotypes381848
-Node: Memory Region Attributes386428
-Node: Dump/Restore Files391098
-Node: Core File Generation393501
-Ref: set use-coredump-filter394905
-Node: Character Sets396353
-Node: Caching Target Data402718
-Ref: Caching Target Data-Footnote-1405447
-Node: Searching Memory405685
-Node: Optimized Code408562
-Node: Inline Functions410239
-Node: Tail Call Frames412866
-Ref: set debug entry-values415006
-Node: Macros419080
-Ref: Macros-Footnote-1426656
-Node: Tracepoints426809
-Node: Set Tracepoints428870
-Node: Create and Delete Tracepoints431808
-Node: Enable and Disable Tracepoints438208
-Node: Tracepoint Passcounts439448
-Node: Tracepoint Conditions440875
-Node: Trace State Variables442569
-Node: Tracepoint Actions444763
-Node: Listing Tracepoints451068
-Node: Listing Static Tracepoint Markers452770
-Node: Starting and Stopping Trace Experiments454616
-Ref: disconnected tracing456361
-Node: Tracepoint Restrictions460789
-Node: Analyze Collected Data464559
-Node: tfind465864
-Node: tdump470286
-Node: save tracepoints472801
-Node: Tracepoint Variables473297
-Node: Trace Files474425
-Node: Overlays476801
-Node: How Overlays Work477521
-Ref: A code overlay480081
-Node: Overlay Commands483519
-Node: Automatic Overlay Debugging487709
-Node: Overlay Sample Program489850
-Node: Languages491610
-Node: Setting492773
-Node: Filenames494475
-Node: Manually495286
-Node: Automatically496495
-Node: Show497556
-Ref: show language497844
-Node: Checks498878
-Node: Type Checking499883
-Node: Range Checking501712
-Node: Supported Languages504113
-Node: C505413
-Node: C Operators506377
-Node: C Constants510722
-Node: C Plus Plus Expressions513603
-Node: C Defaults516946
-Node: C Checks517614
-Node: Debugging C518174
-Node: Debugging C Plus Plus518658
-Node: Decimal Floating Point522251
-Node: D523520
-Node: Go523777
-Node: Objective-C524871
-Node: Method Names in Commands525334
-Node: The Print Command with Objective-C527029
-Node: OpenCL C527680
-Node: OpenCL C Datatypes527955
-Node: OpenCL C Expressions528330
-Node: OpenCL C Operators528687
-Node: Fortran528919
-Node: Fortran Operators529641
-Node: Fortran Defaults530497
-Node: Special Fortran Commands530882
-Node: Pascal531388
-Node: Modula-2531903
-Node: M2 Operators532878
-Node: Built-In Func/Proc535877
-Node: M2 Constants538792
-Node: M2 Types540393
-Node: M2 Defaults543612
-Node: Deviations544212
-Node: M2 Checks545313
-Node: M2 Scope546131
-Node: GDB/M2547155
-Node: Ada548067
-Node: Ada Mode Intro549177
-Node: Omissions from Ada551087
-Node: Additions to Ada555441
-Node: Stopping Before Main Program559371
-Node: Ada Exceptions559905
-Node: Ada Tasks561102
-Node: Ada Tasks and Core Files567518
-Node: Ravenscar Profile568363
-Node: Ada Glitches569433
-Node: Unsupported Languages573448
-Node: Symbols574138
-Node: Altering593835
-Node: Assignment594873
-Node: Jumping597978
-Node: Signaling600139
-Node: Returning603068
-Node: Calling606420
-Node: Patching609463
-Node: Compiling and Injecting Code610577
-Ref: set debug compile614033
-Node: GDB Files623085
-Node: Files623805
-Ref: Shared Libraries636895
-Ref: Files-Footnote-1649184
-Node: Separate Debug Files649313
-Ref: debug-file-directory652419
-Node: MiniDebugInfo661017
-Node: Index Files663468
-Node: Symbol Errors665530
-Node: Data Files669143
-Node: Targets670099
-Node: Active Targets671579
-Node: Target Commands672653
-Ref: load677037
-Node: Byte Order678018
-Node: Remote Debugging678995
-Node: Connecting680257
-Node: File Transfer685486
-Node: Server686426
-Ref: Other Command-Line Arguments for gdbserver694018
-Ref: Monitor Commands for gdbserver697134
-Ref: Server-Footnote-1702305
-Node: Remote Configuration702425
-Ref: set remotebreak703686
-Ref: set remote hardware-watchpoint-limit705150
-Ref: set remote hardware-breakpoint-limit705150
-Ref: set remote hardware-watchpoint-length-limit705376
-Ref: set remote exec-file705791
-Node: Remote Stub713530
-Node: Stub Contents716427
-Node: Bootstrapping718534
-Node: Debug Session722348
-Node: Configurations724390
-Node: Native725159
-Node: HP-UX725728
-Node: BSD libkvm Interface726017
-Node: SVR4 Process Information727088
-Node: DJGPP Native730863
-Node: Cygwin Native737443
-Node: Non-debug DLL Symbols741185
-Node: Hurd Native745330
-Node: Darwin750591
-Node: Embedded OS751852
-Node: Embedded Processors752263
-Node: ARM753396
-Node: M32R/D757530
-Node: M68K759232
-Node: MicroBlaze759525
-Node: MIPS Embedded760975
-Node: PowerPC Embedded765916
-Node: PA769697
-Node: Sparclet769981
-Node: Sparclet File771450
-Node: Sparclet Connection772330
-Node: Sparclet Download772808
-Node: Sparclet Execution773857
-Node: Sparclite774448
-Node: Z8000774821
-Node: AVR776205
-Node: CRIS776568
-Node: Super-H777546
-Node: Architectures778606
-Node: AArch64779043
-Node: i386779450
-Ref: i386-Footnote-1782381
-Node: Alpha782467
-Node: MIPS782600
-Node: HPPA786493
-Node: SPU787012
-Node: PowerPC789200
-Node: Nios II789934
-Node: Controlling GDB790323
-Node: Prompt791220
-Node: Editing792939
-Node: Command History793882
-Node: Screen Size798193
-Node: Numbers800126
-Node: ABI802111
-Node: Auto-loading805285
-Ref: set auto-load off806660
-Ref: show auto-load807296
-Ref: info auto-load808075
-Node: Init File in the Current Directory811109
-Ref: set auto-load local-gdbinit811684
-Ref: show auto-load local-gdbinit811866
-Ref: info auto-load local-gdbinit812030
-Node: libthread_db.so.1 file812178
-Ref: set auto-load libthread-db813117
-Ref: show auto-load libthread-db813248
-Ref: info auto-load libthread-db813385
-Node: Auto-loading safe path813569
-Ref: set auto-load safe-path814875
-Ref: show auto-load safe-path815614
-Ref: add-auto-load-safe-path815737
-Node: Auto-loading verbose mode818639
-Ref: set debug auto-load819802
-Ref: show debug auto-load819903
-Node: Messages/Warnings820025
-Ref: confirmation requests821460
-Node: Debugging Output822667
-Node: Other Misc Settings831976
-Node: Extending GDB833005
-Node: Sequences834859
-Node: Define835520
-Node: Hooks839339
-Node: Command Files841706
-Node: Output846776
-Node: Auto-loading sequences851740
-Ref: set auto-load gdb-scripts852235
-Ref: show auto-load gdb-scripts852359
-Ref: info auto-load gdb-scripts852489
-Node: Python852720
-Node: Python Commands853893
-Node: Python API856228
-Node: Basic Python858767
-Ref: prompt_hook867428
-Node: Exception Handling868025
-Node: Values From Inferior870521
-Node: Types In Python883710
-Node: Pretty Printing API893208
-Node: Selecting Pretty-Printers897101
-Node: Writing a Pretty-Printer899434
-Node: Type Printing API904755
-Node: Frame Filter API907376
-Node: Frame Decorator API914661
-Ref: frame_args918240
-Node: Writing a Frame Filter921567
-Node: Unwinding Frames in Python933042
-Node: Xmethods In Python938495
-Node: Xmethod API941390
-Node: Writing an Xmethod945206
-Node: Inferiors In Python951042
-Node: Events In Python953950
-Node: Threads In Python961033
-Node: Commands In Python963476
-Node: Parameters In Python972895
-Node: Functions In Python978356
-Node: Progspaces In Python980578
-Node: Objfiles In Python984079
-Node: Frames In Python989858
-Node: Blocks In Python996396
-Node: Symbols In Python1000759
-Node: Symbol Tables In Python1007986
-Node: Line Tables In Python1011216
-Node: Breakpoints In Python1014053
-Node: Finish Breakpoints in Python1022045
-Node: Lazy Strings In Python1024152
-Node: Architectures In Python1026387
-Node: Python Auto-loading1028574
-Ref: set auto-load python-scripts1029203
-Ref: show auto-load python-scripts1029303
-Ref: info auto-load python-scripts1029409
-Node: Python modules1030543
-Node: gdb.printing1030929
-Node: gdb.types1032356
-Node: gdb.prompt1035369
-Node: Guile1037018
-Node: Guile Introduction1037677
-Node: Guile Commands1038548
-Node: Guile API1040417
-Node: Basic Guile1042414
-Node: Guile Configuration1048127
-Node: GDB Scheme Data Types1049103
-Node: Guile Exception Handling1050943
-Node: Values From Inferior In Guile1054994
-Node: Arithmetic In Guile1070539
-Node: Types In Guile1072170
-Ref: Fields of a type in Guile1080117
-Node: Guile Pretty Printing API1081518
-Node: Selecting Guile Pretty-Printers1087114
-Node: Writing a Guile Pretty-Printer1089493
-Node: Commands In Guile1094677
-Node: Parameters In Guile1105481
-Ref: Parameters In Guile-Footnote-11112363
-Node: Progspaces In Guile1112490
-Node: Objfiles In Guile1115078
-Node: Frames In Guile1117358
-Node: Blocks In Guile1123924
-Node: Symbols In Guile1128732
-Node: Symbol Tables In Guile1136064
-Node: Breakpoints In Guile1139027
-Node: Lazy Strings In Guile1149249
-Node: Architectures In Guile1151543
-Node: Disassembly In Guile1155849
-Node: I/O Ports in Guile1159049
-Node: Memory Ports in Guile1159605
-Node: Iterators In Guile1162881
-Node: Guile Auto-loading1167169
-Ref: set auto-load guile-scripts1167792
-Ref: show auto-load guile-scripts1167890
-Ref: info auto-load guile-scripts1167994
-Node: Guile Modules1168953
-Node: Guile Printing Module1169275
-Node: Guile Types Module1170095
-Node: Auto-loading extensions1171387
-Node: objfile-gdbdotext file1172585
-Ref: set auto-load scripts-directory1174029
-Ref: with-auto-load-dir1174405
-Ref: show auto-load scripts-directory1175223
-Ref: add-auto-load-scripts-directory1175303
-Node: dotdebug_gdb_scripts section1175779
-Node: Which flavor to choose?1179532
-Node: Multiple Extension Languages1181353
-Node: Aliases1182417
-Node: Interpreters1185282
-Node: TUI1187381
-Node: TUI Overview1188381
-Node: TUI Keys1190814
-Node: TUI Single Key Mode1193118
-Node: TUI Commands1193993
-Node: TUI Configuration1197391
-Node: Emacs1198687
-Node: GDB/MI1204161
-Node: GDB/MI General Design1206135
-Node: Context management1208658
-Node: Asynchronous and non-stop modes1212486
-Node: Thread groups1215462
-Node: GDB/MI Command Syntax1217740
-Node: GDB/MI Input Syntax1217983
-Node: GDB/MI Output Syntax1219537
-Node: GDB/MI Compatibility with CLI1223124
-Node: GDB/MI Development and Front Ends1223861
-Node: GDB/MI Output Records1225518
-Node: GDB/MI Result Records1225924
-Node: GDB/MI Stream Records1227274
-Node: GDB/MI Async Records1228539
-Node: GDB/MI Breakpoint Information1238170
-Node: GDB/MI Frame Information1242122
-Node: GDB/MI Thread Information1243209
-Node: GDB/MI Ada Exception Information1244188
-Node: GDB/MI Simple Examples1244611
-Node: GDB/MI Command Description Format1246819
-Node: GDB/MI Breakpoint Commands1247699
-Node: GDB/MI Catchpoint Commands1267570
-Node: Shared Library GDB/MI Catchpoint Commands1267938
-Node: Ada Exception GDB/MI Catchpoint Commands1269596
-Node: GDB/MI Program Context1272006
-Node: GDB/MI Thread Commands1276276
-Node: GDB/MI Ada Tasking Commands1280232
-Node: GDB/MI Program Execution1282486
-Node: GDB/MI Stack Manipulation1294523
-Ref: -stack-list-arguments1296422
-Ref: -stack-list-frames1300127
-Ref: -stack-list-locals1303996
-Ref: -stack-list-variables1305486
-Node: GDB/MI Variable Objects1307020
-Ref: -var-set-format1316923
-Ref: -var-list-children1318041
-Ref: -var-update1326830
-Ref: -var-set-frozen1329825
-Ref: -var-set-update-range1330621
-Ref: -var-set-visualizer1331151
-Node: GDB/MI Data Manipulation1332642
-Node: GDB/MI Tracepoint Commands1352474
-Node: GDB/MI Symbol Query1364067
-Node: GDB/MI File Commands1364756
-Node: GDB/MI Target Manipulation1368052
-Node: GDB/MI File Transfer Commands1374274
-Node: GDB/MI Ada Exceptions Commands1375597
-Node: GDB/MI Support Commands1376951
-Node: GDB/MI Miscellaneous Commands1381536
-Ref: -interpreter-exec1391877
-Node: Annotations1394213
-Node: Annotations Overview1395132
-Node: Server Prefix1397595
-Node: Prompting1398329
-Node: Errors1399846
-Node: Invalidation1400742
-Node: Annotations for Running1401219
-Node: Source Annotations1402753
-Node: JIT Interface1403682
-Node: Declarations1405482
-Node: Registering Code1406869
-Node: Unregistering Code1407841
-Node: Custom Debug Info1408468
-Node: Using JIT Debug Info Readers1409764
-Node: Writing JIT Debug Info Readers1410777
-Node: In-Process Agent1412974
-Ref: Control Agent1414917
-Node: In-Process Agent Protocol1415784
-Node: IPA Protocol Objects1416576
-Ref: agent expression object1417578
-Ref: tracepoint action object1417784
-Ref: tracepoint object1417865
-Node: IPA Protocol Commands1420821
-Node: GDB Bugs1422294
-Node: Bug Criteria1423026
-Node: Bug Reporting1423903
-Node: Command Line Editing1431734
-Node: Introduction and Notation1432386
-Node: Readline Interaction1434006
-Node: Readline Bare Essentials1435195
-Node: Readline Movement Commands1436982
-Node: Readline Killing Commands1437945
-Node: Readline Arguments1439863
-Node: Searching1440905
-Node: Readline Init File1443054
-Node: Readline Init File Syntax1444205
-Node: Conditional Init Constructs1459263
-Node: Sample Init File1461794
-Node: Bindable Readline Commands1464909
-Node: Commands For Moving1465964
-Node: Commands For History1466823
-Node: Commands For Text1470225
-Node: Commands For Killing1472949
-Node: Numeric Arguments1475089
-Node: Commands For Completion1476226
-Node: Keyboard Macros1478193
-Node: Miscellaneous Commands1478762
-Node: Readline vi Mode1482616
-Node: Using History Interactively1483526
-Node: History Interaction1484069
-Node: Event Designators1485491
-Node: Word Designators1486631
-Node: Modifiers1488268
-Node: In Memoriam1489491
-Node: Formatting Documentation1490374
-Ref: Formatting Documentation-Footnote-11493751
-Node: Installing GDB1493847
-Node: Requirements1494419
-Ref: Expat1494988
-Node: Running Configure1497613
-Node: Separate Objdir1501392
-Node: Config Names1504372
-Node: Configure Options1505849
-Node: System-wide configuration1508219
-Node: System-wide Configuration Scripts1510179
-Node: Maintenance Commands1511363
-Ref: maint info breakpoints1513018
-Node: Remote Protocol1532160
-Node: Overview1532852
-Ref: Binary Data1535414
-Node: Packets1537937
-Ref: thread-id syntax1538837
-Ref: extended mode1540282
-Ref: ? packet1540539
-Ref: bc1542003
-Ref: bs1542213
-Ref: read registers packet1543829
-Ref: cycle step packet1545765
-Ref: write register packet1548475
-Ref: step with signal packet1549453
-Ref: vCont packet1550927
-Ref: vKill packet1555824
-Ref: X packet1556757
-Ref: insert breakpoint or watchpoint packet1557125
-Node: Stop Reply Packets1561293
-Ref: swbreak stop reason1564234
-Node: General Query Packets1569127
-Ref: qCRC packet1571958
-Ref: QNonStop1579768
-Ref: QPassSignals1580427
-Ref: QProgramSignals1581631
-Ref: qSearch memory1584142
-Ref: QStartNoAckMode1584649
-Ref: qSupported1585179
-Ref: multiprocess extensions1597396
-Ref: install tracepoint in tracing1599425
-Ref: qXfer read1603550
-Ref: qXfer auxiliary vector read1604044
-Ref: qXfer btrace read1604391
-Ref: qXfer btrace-conf read1605452
-Ref: qXfer executable filename read1605801
-Ref: qXfer target description read1606415
-Ref: qXfer library list read1606859
-Ref: qXfer svr4 library list read1607514
-Ref: qXfer memory map read1609366
-Ref: qXfer sdata read1609752
-Ref: qXfer siginfo read1610216
-Ref: qXfer spu read1610612
-Ref: qXfer threads read1611135
-Ref: qXfer traceframe info read1611537
-Ref: qXfer unwind info block1611953
-Ref: qXfer fdpic loadmap read1612185
-Ref: qXfer osdata read1612600
-Ref: qXfer write1613858
-Ref: qXfer siginfo write1614424
-Ref: qXfer spu write1614820
-Ref: General Query Packets-Footnote-11618191
-Node: Architecture-Specific Protocol Details1618518
-Node: ARM-Specific Protocol Details1619027
-Node: ARM Breakpoint Kinds1619275
-Node: MIPS-Specific Protocol Details1619607
-Node: MIPS Register packet Format1619890
-Node: MIPS Breakpoint Kinds1620819
-Node: Tracepoint Packets1621238
-Ref: QTEnable1630556
-Ref: QTDisable1630752
-Ref: qTfSTM1636274
-Ref: qTsSTM1636274
-Ref: qTSTMat1637350
-Ref: QTBuffer-size1638501
-Node: Host I/O Packets1640475
-Node: Interrupts1646063
-Node: Notification Packets1647966
-Node: Remote Non-Stop1653354
-Node: Packet Acknowledgment1656469
-Node: Examples1658584
-Node: File-I/O Remote Protocol Extension1659210
-Node: File-I/O Overview1659672
-Node: Protocol Basics1661869
-Node: The F Request Packet1664101
-Node: The F Reply Packet1665002
-Node: The Ctrl-C Message1665920
-Node: Console I/O1667549
-Node: List of Supported Calls1668766
-Node: open1669128
-Node: close1671622
-Node: read1672004
-Node: write1672611
-Node: lseek1673378
-Node: rename1674256
-Node: unlink1675652
-Node: stat/fstat1676591
-Node: gettimeofday1677478
-Node: isatty1677913
-Node: system1678509
-Node: Protocol-specific Representation of Datatypes1680051
-Node: Integral Datatypes1680428
-Node: Pointer Values1681235
-Node: Memory Transfer1681943
-Node: struct stat1682563
-Node: struct timeval1684765
-Node: Constants1685282
-Node: Open Flags1685731
-Node: mode_t Values1686072
-Node: Errno Values1686564
-Node: Lseek Flags1687375
-Node: Limits1687560
-Node: File-I/O Examples1687920
-Node: Library List Format1689036
-Node: Library List Format for SVR4 Targets1691819
-Node: Memory Map Format1694289
-Node: Thread List Format1696866
-Node: Traceframe Info Format1697684
-Node: Branch Trace Format1699371
-Node: Branch Trace Configuration Format1701072
-Node: Agent Expressions1702259
-Node: General Bytecode Design1705080
-Node: Bytecode Descriptions1709880
-Node: Using Agent Expressions1723318
-Node: Varying Target Capabilities1725296
-Node: Rationale1726458
-Node: Target Descriptions1733844
-Node: Retrieving Descriptions1735720
-Node: Target Description Format1736805
-Node: Predefined Target Types1745849
-Node: Standard Target Features1747234
-Node: AArch64 Features1749122
-Node: ARM Features1749545
-Node: i386 Features1751062
-Node: MicroBlaze Features1753014
-Node: MIPS Features1753591
-Node: M68K Features1754781
-Node: Nios II Features1755444
-Node: PowerPC Features1755841
-Node: S/390 and System z Features1757164
-Node: TIC6x Features1758988
-Node: Operating System Information1759550
-Node: Process list1760388
-Node: Trace File Format1761450
-Node: Index Section Format1763444
-Node: Man Pages1771424
-Node: gdb man1771830
-Node: gdbserver man1777872
-Node: gcore man1785080
-Node: gdbinit man1785737
-Node: Copying1786622
-Node: GNU Free Documentation License1824201
-Node: Concept Index1849367
-Node: Command and Variable Index1980712
+Node: Top1717
+Node: Summary5190
+Node: Free Software7051
+Node: Free Documentation7791
+Node: Contributors12725
+Node: Sample Session21084
+Node: Invocation27937
+Node: Invoking GDB28480
+Node: File Options30814
+Node: Mode Options33871
+Ref: -nx34098
+Ref: -nh35182
+Node: Startup41499
+Ref: Home Directory Init File42050
+Ref: Option -init-eval-command42160
+Ref: Init File in the Current Directory during Startup42500
+Ref: Startup-Footnote-144696
+Node: Quitting GDB44805
+Node: Shell Commands45702
+Node: Logging Output46629
+Node: Commands47466
+Node: Command Syntax48104
+Node: Completion50270
+Ref: Completion-Footnote-156658
+Node: Help56818
+Node: Running62569
+Node: Compilation63798
+Node: Starting65882
+Ref: set exec-wrapper71150
+Ref: set auto-connect-native-target73304
+Node: Arguments77700
+Node: Environment78969
+Node: Working Directory82703
+Node: Input/Output83855
+Node: Attach85915
+Node: Kill Process88381
+Node: Inferiors and Programs89362
+Node: Threads96903
+Ref: thread numbers99014
+Ref: thread ID lists99904
+Ref: global thread numbers100944
+Ref: set libthread-db-search-path107301
+Node: Forks109355
+Node: Checkpoint/Restart115873
+Ref: Checkpoint/Restart-Footnote-1120401
+Node: Stopping120436
+Node: Breakpoints121699
+Node: Set Breaks124956
+Node: Set Watchpoints143382
+Node: Set Catchpoints152764
+Node: Delete Breaks164605
+Node: Disabling166541
+Node: Conditions169921
+Node: Break Commands175568
+Node: Dynamic Printf178788
+Node: Save Breakpoints183092
+Node: Static Probe Points184267
+Ref: Static Probe Points-Footnote-1188445
+Ref: Static Probe Points-Footnote-2188605
+Node: Error in Breakpoints188745
+Node: Breakpoint-related Warnings189481
+Node: Continuing and Stepping191808
+Ref: range stepping201271
+Node: Skipping Over Functions and Files202351
+Node: Signals207983
+Ref: stepping and signal handlers212417
+Ref: stepping into signal handlers213213
+Ref: extra signal information214446
+Node: Thread Stops216912
+Node: All-Stop Mode218011
+Node: Non-Stop Mode221978
+Node: Background Execution225391
+Node: Thread-Specific Breakpoints227607
+Node: Interrupted System Calls229623
+Node: Observer Mode231137
+Node: Reverse Execution234573
+Ref: Reverse Execution-Footnote-1239198
+Ref: Reverse Execution-Footnote-2239825
+Node: Process Record and Replay239875
+Node: Stack258608
+Node: Frames260156
+Node: Backtrace262450
+Ref: backtrace-command262787
+Ref: Backtrace-Footnote-1268557
+Node: Selection268745
+Node: Frame Info271626
+Node: Frame Filter Management273645
+Ref: disable frame-filter all274172
+Node: Source278480
+Node: List279546
+Node: Specify Location282248
+Node: Linespec Locations282869
+Node: Explicit Locations285575
+Node: Address Locations287789
+Node: Edit289540
+Ref: Edit-Footnote-1291016
+Node: Search291251
+Node: Source Path292059
+Ref: set substitute-path298425
+Node: Machine Code302362
+Node: Data312378
+Node: Expressions320111
+Node: Ambiguous Expressions322214
+Node: Variables325444
+Node: Arrays331510
+Node: Output Formats334041
+Ref: Output Formats-Footnote-1337414
+Node: Memory337571
+Ref: addressable memory unit343756
+Node: Auto Display345250
+Node: Print Settings349792
+Ref: set print entry-values357954
+Node: Pretty Printing369264
+Node: Pretty-Printer Introduction369778
+Node: Pretty-Printer Example371533
+Node: Pretty-Printer Commands372311
+Node: Value History374735
+Node: Convenience Vars377157
+Node: Convenience Funs383761
+Node: Registers389250
+Ref: standard registers390232
+Ref: Registers-Footnote-1395183
+Node: Floating Point Hardware395578
+Node: Vector Unit396110
+Node: OS Information396497
+Ref: linux info os infotypes398521
+Node: Memory Region Attributes403112
+Node: Dump/Restore Files407776
+Node: Core File Generation410179
+Ref: set use-coredump-filter411583
+Node: Character Sets413031
+Node: Caching Target Data419396
+Ref: Caching Target Data-Footnote-1422124
+Node: Searching Memory422362
+Node: Value Sizes425260
+Node: Optimized Code426913
+Node: Inline Functions428590
+Node: Tail Call Frames431217
+Ref: set debug entry-values433354
+Node: Macros437416
+Ref: Macros-Footnote-1444992
+Node: Tracepoints445145
+Node: Set Tracepoints447207
+Node: Create and Delete Tracepoints450145
+Node: Enable and Disable Tracepoints456492
+Node: Tracepoint Passcounts457732
+Node: Tracepoint Conditions459143
+Node: Trace State Variables460837
+Node: Tracepoint Actions463032
+Node: Listing Tracepoints469815
+Node: Listing Static Tracepoint Markers471517
+Node: Starting and Stopping Trace Experiments473365
+Ref: disconnected tracing475110
+Node: Tracepoint Restrictions479530
+Node: Analyze Collected Data483299
+Node: tfind484605
+Node: tdump489087
+Node: save tracepoints491602
+Node: Tracepoint Variables492098
+Node: Trace Files493226
+Node: Overlays495602
+Node: How Overlays Work496322
+Ref: A code overlay498877
+Node: Overlay Commands502290
+Node: Automatic Overlay Debugging506472
+Node: Overlay Sample Program508611
+Node: Languages510348
+Node: Setting511511
+Node: Filenames513212
+Node: Manually514023
+Node: Automatically515232
+Node: Show516293
+Ref: show language516581
+Node: Checks517615
+Node: Type Checking518620
+Node: Range Checking520449
+Node: Supported Languages522850
+Node: C524187
+Node: C Operators525151
+Node: C Constants529490
+Node: C Plus Plus Expressions532369
+Node: C Defaults535712
+Node: C Checks536380
+Node: Debugging C536940
+Node: Debugging C Plus Plus537424
+Node: Decimal Floating Point541017
+Node: D542287
+Node: Go542545
+Node: Objective-C543639
+Node: Method Names in Commands544102
+Node: The Print Command with Objective-C545793
+Node: OpenCL C546444
+Node: OpenCL C Datatypes546719
+Node: OpenCL C Expressions547094
+Node: OpenCL C Operators547451
+Node: Fortran547683
+Node: Fortran Operators548404
+Node: Fortran Defaults549260
+Node: Special Fortran Commands549645
+Node: Pascal550151
+Node: Rust550662
+Node: Modula-2553806
+Node: M2 Operators554779
+Node: Built-In Func/Proc557777
+Node: M2 Constants560691
+Node: M2 Types562292
+Node: M2 Defaults565510
+Node: Deviations566111
+Node: M2 Checks567212
+Node: M2 Scope568029
+Node: GDB/M2569053
+Node: Ada569966
+Node: Ada Mode Intro571203
+Node: Omissions from Ada572705
+Node: Additions to Ada577060
+Node: Overloading support for Ada580988
+Node: Stopping Before Main Program582628
+Node: Ada Exceptions583175
+Node: Ada Tasks584374
+Node: Ada Tasks and Core Files590799
+Node: Ravenscar Profile591646
+Node: Ada Glitches592717
+Node: Unsupported Languages596730
+Node: Symbols597420
+Node: Altering619447
+Node: Assignment620485
+Node: Jumping623591
+Node: Signaling625665
+Node: Returning628594
+Node: Calling631945
+Node: Patching634987
+Node: Compiling and Injecting Code636101
+Ref: set debug compile639558
+Node: GDB Files648605
+Node: Files649394
+Ref: Shared Libraries662460
+Ref: Files-Footnote-1674658
+Node: File Caching674787
+Node: Separate Debug Files675921
+Ref: debug-file-directory679031
+Node: MiniDebugInfo687646
+Node: Index Files690097
+Node: Symbol Errors692159
+Node: Data Files695775
+Node: Targets696731
+Node: Active Targets698211
+Node: Target Commands699285
+Ref: load703674
+Ref: flash-erase704867
+Node: Byte Order704927
+Node: Remote Debugging705901
+Node: Connecting707163
+Ref: --multi Option in Types of Remote Connnections709389
+Ref: Attaching in Types of Remote Connections710804
+Ref: Host and target files711305
+Node: File Transfer717780
+Node: Server718719
+Ref: Running gdbserver720295
+Ref: Attaching to a program722513
+Ref: Other Command-Line Arguments for gdbserver725038
+Ref: Monitor Commands for gdbserver728088
+Ref: Server-Footnote-1733344
+Node: Remote Configuration733464
+Ref: set remotebreak734724
+Ref: set remote hardware-watchpoint-limit736187
+Ref: set remote hardware-breakpoint-limit736187
+Ref: set remote hardware-watchpoint-length-limit736413
+Ref: set remote exec-file736828
+Node: Remote Stub747879
+Node: Stub Contents750774
+Node: Bootstrapping752881
+Node: Debug Session756696
+Node: Configurations758737
+Node: Native759506
+Node: BSD libkvm Interface760037
+Node: SVR4 Process Information761094
+Node: DJGPP Native764854
+Node: Cygwin Native771413
+Node: Non-debug DLL Symbols776334
+Node: Hurd Native780487
+Node: Darwin785743
+Node: Embedded OS787004
+Node: Embedded Processors787415
+Node: ARC788352
+Node: ARM788788
+Node: M68K791335
+Node: MicroBlaze791508
+Node: MIPS Embedded792957
+Node: PowerPC Embedded794257
+Node: AVR797486
+Node: CRIS797858
+Node: Super-H798834
+Node: Architectures799891
+Node: AArch64800328
+Node: i386800734
+Ref: i386-Footnote-1803660
+Node: Alpha803746
+Node: MIPS803879
+Node: HPPA807773
+Node: SPU808291
+Node: PowerPC810477
+Node: Nios II811212
+Node: Controlling GDB811601
+Node: Prompt812497
+Node: Editing814215
+Node: Command History815158
+Node: Screen Size819464
+Node: Numbers821398
+Node: ABI823377
+Node: Auto-loading826550
+Ref: set auto-load off827925
+Ref: show auto-load828561
+Ref: info auto-load829340
+Node: Init File in the Current Directory832307
+Ref: set auto-load local-gdbinit832882
+Ref: show auto-load local-gdbinit833064
+Ref: info auto-load local-gdbinit833228
+Node: libthread_db.so.1 file833376
+Ref: set auto-load libthread-db834315
+Ref: show auto-load libthread-db834446
+Ref: info auto-load libthread-db834583
+Node: Auto-loading safe path834767
+Ref: set auto-load safe-path836073
+Ref: show auto-load safe-path836812
+Ref: add-auto-load-safe-path836935
+Node: Auto-loading verbose mode839837
+Ref: set debug auto-load841000
+Ref: show debug auto-load841101
+Node: Messages/Warnings841223
+Ref: confirmation requests842657
+Node: Debugging Output843861
+Node: Other Misc Settings853272
+Node: Extending GDB854296
+Node: Sequences856149
+Node: Define856810
+Node: Hooks860890
+Node: Command Files863256
+Node: Output868329
+Ref: eval873131
+Node: Auto-loading sequences873293
+Ref: set auto-load gdb-scripts873788
+Ref: show auto-load gdb-scripts873912
+Ref: info auto-load gdb-scripts874042
+Node: Python874273
+Node: Python Commands875446
+Node: Python API877774
+Node: Basic Python880379
+Ref: prompt_hook889258
+Node: Exception Handling889856
+Node: Values From Inferior892352
+Node: Types In Python907266
+Node: Pretty Printing API916757
+Node: Selecting Pretty-Printers920653
+Node: Writing a Pretty-Printer922986
+Node: Type Printing API928308
+Node: Frame Filter API930924
+Node: Frame Decorator API938205
+Ref: frame_args941789
+Node: Writing a Frame Filter945119
+Node: Unwinding Frames in Python956593
+Node: Xmethods In Python962049
+Node: Xmethod API964945
+Node: Writing an Xmethod968757
+Node: Inferiors In Python974592
+Node: Events In Python977501
+Node: Threads In Python985344
+Node: Recordings In Python988231
+Node: Commands In Python995805
+Node: Parameters In Python1005218
+Node: Functions In Python1010678
+Node: Progspaces In Python1012895
+Node: Objfiles In Python1016396
+Node: Frames In Python1022175
+Node: Blocks In Python1029018
+Node: Symbols In Python1033380
+Node: Symbol Tables In Python1040607
+Node: Line Tables In Python1043830
+Node: Breakpoints In Python1046667
+Ref: python_breakpoint_thread1051801
+Node: Finish Breakpoints in Python1054838
+Node: Lazy Strings In Python1056944
+Node: Architectures In Python1059178
+Node: Python Auto-loading1061367
+Ref: set auto-load python-scripts1061996
+Ref: show auto-load python-scripts1062096
+Ref: info auto-load python-scripts1062202
+Node: Python modules1063336
+Node: gdb.printing1063722
+Node: gdb.types1065149
+Node: gdb.prompt1068161
+Node: Guile1069810
+Node: Guile Introduction1070469
+Node: Guile Commands1071340
+Node: Guile API1073194
+Node: Basic Guile1075191
+Node: Guile Configuration1080873
+Node: GDB Scheme Data Types1081849
+Node: Guile Exception Handling1083681
+Node: Values From Inferior In Guile1087715
+Node: Arithmetic In Guile1103250
+Node: Types In Guile1104881
+Ref: Fields of a type in Guile1112822
+Node: Guile Pretty Printing API1114210
+Node: Selecting Guile Pretty-Printers1119812
+Node: Writing a Guile Pretty-Printer1122188
+Node: Commands In Guile1127373
+Node: Parameters In Guile1138153
+Ref: Parameters In Guile-Footnote-11145034
+Node: Progspaces In Guile1145150
+Node: Objfiles In Guile1147738
+Node: Frames In Guile1150019
+Node: Blocks In Guile1156597
+Node: Symbols In Guile1161405
+Node: Symbol Tables In Guile1168739
+Node: Breakpoints In Guile1171702
+Node: Lazy Strings In Guile1181963
+Node: Architectures In Guile1184257
+Node: Disassembly In Guile1188564
+Node: I/O Ports in Guile1191766
+Node: Memory Ports in Guile1192322
+Node: Iterators In Guile1195588
+Node: Guile Auto-loading1199877
+Ref: set auto-load guile-scripts1200500
+Ref: show auto-load guile-scripts1200598
+Ref: info auto-load guile-scripts1200702
+Node: Guile Modules1203378
+Node: Guile Printing Module1203700
+Node: Guile Types Module1204519
+Node: Auto-loading extensions1205812
+Node: objfile-gdbdotext file1207010
+Ref: set auto-load scripts-directory1208446
+Ref: with-auto-load-dir1208822
+Ref: show auto-load scripts-directory1209640
+Ref: add-auto-load-scripts-directory1209720
+Node: dotdebug_gdb_scripts section1210196
+Node: Which flavor to choose?1213946
+Node: Multiple Extension Languages1215767
+Node: Aliases1216831
+Node: Interpreters1219696
+Node: TUI1222789
+Node: TUI Overview1223787
+Node: TUI Keys1226220
+Node: TUI Single Key Mode1228524
+Node: TUI Commands1229399
+Node: TUI Configuration1233338
+Node: Emacs1234644
+Node: GDB/MI1240081
+Node: GDB/MI General Design1242055
+Node: Context management1244575
+Node: Asynchronous and non-stop modes1248362
+Node: Thread groups1251336
+Node: GDB/MI Command Syntax1253614
+Node: GDB/MI Input Syntax1253857
+Node: GDB/MI Output Syntax1255407
+Node: GDB/MI Compatibility with CLI1258992
+Node: GDB/MI Development and Front Ends1259729
+Node: GDB/MI Output Records1261383
+Node: GDB/MI Result Records1261789
+Node: GDB/MI Stream Records1263139
+Node: GDB/MI Async Records1264404
+Node: GDB/MI Breakpoint Information1274750
+Node: GDB/MI Frame Information1278701
+Node: GDB/MI Thread Information1279787
+Node: GDB/MI Ada Exception Information1280774
+Node: GDB/MI Simple Examples1281197
+Node: GDB/MI Command Description Format1283405
+Node: GDB/MI Breakpoint Commands1284285
+Ref: -break-insert1291393
+Node: GDB/MI Catchpoint Commands1304848
+Node: Shared Library GDB/MI Catchpoint Commands1305216
+Node: Ada Exception GDB/MI Catchpoint Commands1306874
+Node: GDB/MI Program Context1309278
+Node: GDB/MI Thread Commands1313546
+Node: GDB/MI Ada Tasking Commands1317609
+Node: GDB/MI Program Execution1319881
+Node: GDB/MI Stack Manipulation1331915
+Ref: -stack-list-arguments1333814
+Ref: -stack-list-frames1337519
+Ref: -stack-list-locals1341382
+Ref: -stack-list-variables1342872
+Node: GDB/MI Variable Objects1344406
+Ref: -var-set-format1354371
+Ref: -var-list-children1355752
+Ref: -var-update1364560
+Ref: -var-set-frozen1367558
+Ref: -var-set-update-range1368355
+Ref: -var-set-visualizer1368884
+Node: GDB/MI Data Manipulation1370374
+Node: GDB/MI Tracepoint Commands1390548
+Node: GDB/MI Symbol Query1402339
+Node: GDB/MI File Commands1403028
+Node: GDB/MI Target Manipulation1406323
+Node: GDB/MI File Transfer Commands1412981
+Node: GDB/MI Ada Exceptions Commands1414304
+Node: GDB/MI Support Commands1415657
+Node: GDB/MI Miscellaneous Commands1420230
+Ref: -interpreter-exec1430564
+Node: Annotations1432904
+Node: Annotations Overview1433823
+Node: Server Prefix1436286
+Node: Prompting1437020
+Node: Errors1438537
+Node: Invalidation1439433
+Node: Annotations for Running1439912
+Node: Source Annotations1441446
+Node: JIT Interface1442375
+Node: Declarations1444174
+Node: Registering Code1445561
+Node: Unregistering Code1446533
+Node: Custom Debug Info1447160
+Node: Using JIT Debug Info Readers1448456
+Node: Writing JIT Debug Info Readers1449468
+Node: In-Process Agent1451663
+Ref: Control Agent1453606
+Node: In-Process Agent Protocol1454473
+Node: IPA Protocol Objects1455264
+Ref: agent expression object1456262
+Ref: tracepoint action object1456467
+Ref: tracepoint object1456547
+Node: IPA Protocol Commands1459077
+Node: GDB Bugs1460547
+Node: Bug Criteria1461279
+Node: Bug Reporting1462156
+Node: Command Line Editing1469985
+Node: Introduction and Notation1470637
+Node: Readline Interaction1472258
+Node: Readline Bare Essentials1473447
+Node: Readline Movement Commands1475228
+Node: Readline Killing Commands1476186
+Node: Readline Arguments1478102
+Node: Searching1479144
+Node: Readline Init File1481294
+Node: Readline Init File Syntax1482445
+Node: Conditional Init Constructs1497544
+Node: Sample Init File1501784
+Node: Bindable Readline Commands1504898
+Node: Commands For Moving1505950
+Node: Commands For History1506808
+Node: Commands For Text1510203
+Node: Commands For Killing1512926
+Node: Numeric Arguments1515066
+Node: Commands For Completion1516202
+Node: Keyboard Macros1518168
+Node: Miscellaneous Commands1518736
+Node: Readline vi Mode1522584
+Node: Using History Interactively1523494
+Node: History Interaction1524009
+Node: Event Designators1525431
+Node: Word Designators1526568
+Node: Modifiers1528203
+Node: In Memoriam1529424
+Node: Formatting Documentation1530307
+Ref: Formatting Documentation-Footnote-11533687
+Node: Installing GDB1533785
+Node: Requirements1534357
+Ref: Expat1534926
+Node: Running Configure1537546
+Node: Separate Objdir1541340
+Node: Config Names1544325
+Node: Configure Options1545804
+Node: System-wide configuration1548175
+Node: System-wide Configuration Scripts1550135
+Node: Maintenance Commands1551319
+Ref: maint info breakpoints1552974
+Node: Remote Protocol1572872
+Node: Overview1573564
+Ref: Binary Data1576109
+Node: Packets1578634
+Ref: thread-id syntax1579534
+Ref: extended mode1580979
+Ref: ? packet1581237
+Ref: bc1582703
+Ref: bs1582913
+Ref: read registers packet1584530
+Ref: cycle step packet1586385
+Ref: write register packet1589096
+Ref: step with signal packet1590075
+Ref: vCont packet1591551
+Ref: vCtrlC packet1594784
+Ref: vKill packet1597202
+Ref: X packet1598132
+Ref: insert breakpoint or watchpoint packet1598501
+Node: Stop Reply Packets1602830
+Ref: swbreak stop reason1606081
+Ref: thread create event1609678
+Ref: thread exit event1610881
+Node: General Query Packets1613090
+Ref: qCRC packet1615920
+Ref: QNonStop1623743
+Ref: QCatchSyscalls1624419
+Ref: QPassSignals1625956
+Ref: QProgramSignals1627163
+Ref: QThreadEvents1628730
+Ref: qSearch memory1630748
+Ref: QStartNoAckMode1631256
+Ref: qSupported1631787
+Ref: multiprocess extensions1647794
+Ref: install tracepoint in tracing1649824
+Ref: qXfer read1654347
+Ref: qXfer auxiliary vector read1655954
+Ref: qXfer btrace read1656302
+Ref: qXfer btrace-conf read1657367
+Ref: qXfer executable filename read1657718
+Ref: qXfer target description read1658333
+Ref: qXfer library list read1658767
+Ref: qXfer svr4 library list read1659423
+Ref: qXfer memory map read1661276
+Ref: qXfer sdata read1661663
+Ref: qXfer siginfo read1662129
+Ref: qXfer spu read1662526
+Ref: qXfer threads read1663050
+Ref: qXfer traceframe info read1663453
+Ref: qXfer unwind info block1663871
+Ref: qXfer fdpic loadmap read1664105
+Ref: qXfer osdata read1664521
+Ref: qXfer write1664675
+Ref: qXfer siginfo write1665767
+Ref: qXfer spu write1666164
+Ref: General Query Packets-Footnote-11669020
+Node: Architecture-Specific Protocol Details1669347
+Node: ARM-Specific Protocol Details1669856
+Node: ARM Breakpoint Kinds1670104
+Node: MIPS-Specific Protocol Details1670435
+Node: MIPS Register packet Format1670718
+Node: MIPS Breakpoint Kinds1671645
+Node: Tracepoint Packets1672063
+Ref: QTEnable1681377
+Ref: QTDisable1681573
+Ref: qTfSTM1687110
+Ref: qTsSTM1687110
+Ref: qTSTMat1688187
+Ref: QTBuffer-size1689338
+Node: Host I/O Packets1691311
+Node: Interrupts1696891
+Ref: interrupting remote targets1697035
+Node: Notification Packets1699203
+Node: Remote Non-Stop1704628
+Node: Packet Acknowledgment1707744
+Node: Examples1709859
+Node: File-I/O Remote Protocol Extension1710453
+Node: File-I/O Overview1710915
+Node: Protocol Basics1713114
+Node: The F Request Packet1715343
+Node: The F Reply Packet1716244
+Node: The Ctrl-C Message1717162
+Node: Console I/O1718788
+Node: List of Supported Calls1720004
+Node: open1720366
+Node: close1722874
+Node: read1723257
+Node: write1723866
+Node: lseek1724637
+Node: rename1725521
+Node: unlink1726928
+Node: stat/fstat1727875
+Node: gettimeofday1728768
+Node: isatty1729204
+Node: system1729800
+Node: Protocol-specific Representation of Datatypes1731342
+Node: Integral Datatypes1731719
+Node: Pointer Values1732526
+Node: Memory Transfer1733230
+Node: struct stat1733850
+Node: struct timeval1736052
+Node: Constants1736569
+Node: Open Flags1737018
+Node: mode_t Values1737359
+Node: Errno Values1737851
+Node: Lseek Flags1738661
+Node: Limits1738846
+Node: File-I/O Examples1739206
+Node: Library List Format1740294
+Node: Library List Format for SVR4 Targets1743076
+Node: Memory Map Format1745543
+Node: Thread List Format1748118
+Node: Traceframe Info Format1749031
+Node: Branch Trace Format1750717
+Node: Branch Trace Configuration Format1752417
+Node: Agent Expressions1753591
+Node: General Bytecode Design1756412
+Node: Bytecode Descriptions1761206
+Node: Using Agent Expressions1774509
+Node: Varying Target Capabilities1776486
+Node: Rationale1777647
+Node: Target Descriptions1785036
+Node: Retrieving Descriptions1786979
+Node: Target Description Format1788064
+Node: Predefined Target Types1797680
+Node: Enum Target Types1799108
+Node: Standard Target Features1801820
+Node: AArch64 Features1803757
+Node: ARC Features1804180
+Node: ARM Features1806241
+Node: i386 Features1807755
+Node: MicroBlaze Features1809970
+Node: MIPS Features1810547
+Node: M68K Features1811738
+Node: NDS32 Features1812399
+Node: Nios II Features1813423
+Node: PowerPC Features1813822
+Node: S/390 and System z Features1815147
+Node: Sparc Features1816973
+Node: TIC6x Features1817878
+Node: Operating System Information1818427
+Node: Process list1819262
+Node: Trace File Format1820325
+Node: Index Section Format1823539
+Node: Man Pages1831465
+Node: gdb man1831871
+Node: gdbserver man1837907
+Node: gcore man1845104
+Node: gdbinit man1845761
+Node: Copying1846644
+Node: GNU Free Documentation License1884205
+Node: Concept Index1909352
+Node: Command and Variable Index2043498
 
 End Tag Table
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-1 ./gdb/doc/gdb.info-1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-1	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-1	2017-03-06 01:53:13.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -45,9 +44,10 @@ Debugging with GDB
 
 This file describes GDB, the GNU symbolic debugger.
 
-   This is the Tenth Edition, for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, for GDB (GDB) Version
+7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This edition of the GDB manual is dedicated to the memory of Fred
 Fish.  Fred was a long-standing contributor to GDB and to Free software
@@ -92,7 +92,6 @@ in general.  We will miss him.
 
 * GDB Bugs::                    Reporting bugs in GDB
 
-
 * Command Line Editing::        Command Line Editing
 * Using History Interactively:: Using History Interactively
 * In Memoriam::                 In Memoriam
@@ -116,7 +115,7 @@ in general.  We will miss him.
                                   functions, and Python data types
 
 
-File: gdb.info,  Node: Summary,  Next: Sample Session,  Prev: Top,  Up: Top
+File: gdb.info,  Node: Summary,  Next: Sample Session,  Up: Top
 
 Summary of GDB
 **************
@@ -155,8 +154,8 @@ or nested functions does not currently w
 entering expressions, printing values, or similar features using Pascal
 syntax.
 
-   GDB can be used to debug programs written in Fortran, although it
-may be necessary to refer to some variables with a trailing underscore.
+   GDB can be used to debug programs written in Fortran, although it may
+be necessary to refer to some variables with a trailing underscore.
 
    GDB can be used to debug programs written in Objective-C, using
 either the Apple/NeXT or the GNU Objective-C runtime.
@@ -174,12 +173,12 @@ Free Software
 =============
 
 GDB is "free software", protected by the GNU General Public License
-(GPL).  The GPL gives you the freedom to copy or adapt a licensed
+(GPL). The GPL gives you the freedom to copy or adapt a licensed
 program--but every person getting a copy also gets with it the freedom
-to modify that copy (which means that they must get access to the
-source code), and the freedom to distribute further copies.  Typical
-software companies use copyrights to limit your freedoms; the Free
-Software Foundation uses the GPL to preserve these freedoms.
+to modify that copy (which means that they must get access to the source
+code), and the freedom to distribute further copies.  Typical software
+companies use copyrights to limit your freedoms; the Free Software
+Foundation uses the GPL to preserve these freedoms.
 
    Fundamentally, the General Public License is a license which says
 that you have these freedoms and that you cannot take these freedoms
@@ -202,14 +201,14 @@ free tutorial, that is a major gap.  We 
    Consider Perl, for instance.  The tutorial manuals that people
 normally use are non-free.  How did this come about?  Because the
 authors of those manuals published them with restrictive terms--no
-copying, no modification, source files not available--which exclude
-them from the free software world.
+copying, no modification, source files not available--which exclude them
+from the free software world.
 
    That wasn't the first time this sort of thing happened, and it was
-far from the last.  Many times we have heard a GNU user eagerly
-describe a manual that he is writing, his intended contribution to the
-community, only to learn that he had ruined everything by signing a
-publication contract to make it non-free.
+far from the last.  Many times we have heard a GNU user eagerly describe
+a manual that he is writing, his intended contribution to the community,
+only to learn that he had ruined everything by signing a publication
+contract to make it non-free.
 
    Free documentation, like free software, is a matter of freedom, not
 price.  The problem with the non-free manual is not that publishers
@@ -220,9 +219,9 @@ available in source code form, and give 
 modify.  Non-free manuals do not allow this.
 
    The criteria of freedom for a free manual are roughly the same as for
-free software.  Redistribution (including the normal kinds of
-commercial redistribution) must be permitted, so that the manual can
-accompany every copy of the program, both on-line and on paper.
+free software.  Redistribution (including the normal kinds of commercial
+redistribution) must be permitted, so that the manual can accompany
+every copy of the program, both on-line and on paper.
 
    Permission for modification of the technical content is crucial too.
 When people modify the software, adding or changing features, if they
@@ -232,35 +231,35 @@ that leaves you no choice but to write a
 changed version of the program is not really available to our community.
 
    Some kinds of limits on the way modification is handled are
-acceptable.  For example, requirements to preserve the original
-author's copyright notice, the distribution terms, or the list of
-authors, are ok.  It is also no problem to require modified versions to
-include notice that they were modified.  Even entire sections that may
-not be deleted or changed are acceptable, as long as they deal with
+acceptable.  For example, requirements to preserve the original author's
+copyright notice, the distribution terms, or the list of authors, are
+ok.  It is also no problem to require modified versions to include
+notice that they were modified.  Even entire sections that may not be
+deleted or changed are acceptable, as long as they deal with
 nontechnical topics (like this one).  These kinds of restrictions are
-acceptable because they don't obstruct the community's normal use of
-the manual.
+acceptable because they don't obstruct the community's normal use of the
+manual.
 
-   However, it must be possible to modify all the _technical_ content
-of the manual, and then distribute the result in all the usual media,
+   However, it must be possible to modify all the _technical_ content of
+the manual, and then distribute the result in all the usual media,
 through all the usual channels.  Otherwise, the restrictions obstruct
 the use of the manual, it is not free, and we need another manual to
 replace it.
 
    Please spread the word about this issue.  Our community continues to
-lose manuals to proprietary publishing.  If we spread the word that
-free software needs free reference manuals and free tutorials, perhaps
-the next person who wants to contribute by writing documentation will
-realize, before it is too late, that only free manuals contribute to
-the free software community.
+lose manuals to proprietary publishing.  If we spread the word that free
+software needs free reference manuals and free tutorials, perhaps the
+next person who wants to contribute by writing documentation will
+realize, before it is too late, that only free manuals contribute to the
+free software community.
 
    If you are writing documentation, please insist on publishing it
 under the GNU Free Documentation License or another free documentation
 license.  Remember that this decision requires your approval--you don't
-have to let the publisher decide.  Some commercial publishers will use
-a free license if you insist, but they will not propose the option; it
-is up to you to raise the issue and say firmly that this is what you
-want.  If the publisher you are dealing with refuses, please try other
+have to let the publisher decide.  Some commercial publishers will use a
+free license if you insist, but they will not propose the option; it is
+up to you to raise the issue and say firmly that this is what you want.
+If the publisher you are dealing with refuses, please try other
 publishers.  If you're not sure whether a proposed license is free,
 write to <licensing@gnu.org>.
 
@@ -275,7 +274,7 @@ have paid or pay the authors to work on 
 
    The Free Software Foundation maintains a list of free documentation
 published by other publishers, at
-`http://www.fsf.org/doc/other-free-books.html'.
+<http://www.fsf.org/doc/other-free-books.html>.
 
 
 File: gdb.info,  Node: Contributors,  Prev: Free Documentation,  Up: Summary
@@ -286,9 +285,9 @@ Contributors to GDB
 Richard Stallman was the original author of GDB, and of many other GNU
 programs.  Many others have contributed to its development.  This
 section attempts to credit major contributors.  One of the virtues of
-free software is that everyone is free to contribute to it; with
-regret, we cannot actually acknowledge everyone here.  The file
-`ChangeLog' in the GDB distribution approximates a blow-by-blow account.
+free software is that everyone is free to contribute to it; with regret,
+we cannot actually acknowledge everyone here.  The file 'ChangeLog' in
+the GDB distribution approximates a blow-by-blow account.
 
    Changes much prior to version 2.0 are lost in the mists of time.
 
@@ -299,24 +298,24 @@ regret, we cannot actually acknowledge e
    So that they may not regard their many labors as thankless, we
 particularly thank those who shepherded GDB through major releases:
 Andrew Cagney (releases 6.3, 6.2, 6.1, 6.0, 5.3, 5.2, 5.1 and 5.0); Jim
-Blandy (release 4.18); Jason Molenda (release 4.17); Stan Shebs
-(release 4.14); Fred Fish (releases 4.16, 4.15, 4.13, 4.12, 4.11, 4.10,
-and 4.9); Stu Grossman and John Gilmore (releases 4.8, 4.7, 4.6, 4.5,
-and 4.4); John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and 3.9); Jim
-Kingdon (releases 3.5, 3.4, and 3.3); and Randy Smith (releases 3.2,
-3.1, and 3.0).
+Blandy (release 4.18); Jason Molenda (release 4.17); Stan Shebs (release
+4.14); Fred Fish (releases 4.16, 4.15, 4.13, 4.12, 4.11, 4.10, and 4.9);
+Stu Grossman and John Gilmore (releases 4.8, 4.7, 4.6, 4.5, and 4.4);
+John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and 3.9); Jim Kingdon
+(releases 3.5, 3.4, and 3.3); and Randy Smith (releases 3.2, 3.1, and
+3.0).
 
    Richard Stallman, assisted at various times by Peter TerMaat, Chris
 Hanson, and Richard Mlynarik, handled releases through 2.8.
 
    Michael Tiemann is the author of most of the GNU C++ support in GDB,
 with significant additional contributions from Per Bothner and Daniel
-Berlin.  James Clark wrote the GNU C++ demangler.  Early work on C++
-was by Peter TerMaat (who also did much general update work leading to
+Berlin.  James Clark wrote the GNU C++ demangler.  Early work on C++ was
+by Peter TerMaat (who also did much general update work leading to
 release 3.0).
 
    GDB uses the BFD subroutine library to examine multiple object-file
-formats; BFD was a joint project of David V.  Henkel-Wallace, Rich
+formats; BFD was a joint project of David V. Henkel-Wallace, Rich
 Pixley, Steve Chamberlain, and John Gilmore.
 
    David Johnson wrote the original COFF support; Pace Willison did the
@@ -326,17 +325,17 @@ original support for encapsulated COFF.
 
    Adam de Boor and Bradley Davis contributed the ISI Optimum V support.
 Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS
-support.  Jean-Daniel Fekete contributed Sun 386i support.  Chris
-Hanson improved the HP9000 support.  Noboyuki Hikichi and Tomoyuki
-Hasei contributed Sony/News OS 3 support.  David Johnson contributed
-Encore Umax support.  Jyrki Kuoppala contributed Altos 3068 support.
-Jeff Law contributed HP PA and SOM support.  Keith Packard contributed
-NS32K support.  Doug Rabson contributed Acorn Risc Machine support.
-Bob Rusk contributed Harris Nighthawk CX-UX support.  Chris Smith
-contributed Convex support (and Fortran debugging).  Jonathan Stone
-contributed Pyramid support.  Michael Tiemann contributed SPARC support.
-Tim Tucker contributed support for the Gould NP1 and Gould Powernode.
-Pace Willison contributed Intel 386 support.  Jay Vosburgh contributed
+support.  Jean-Daniel Fekete contributed Sun 386i support.  Chris Hanson
+improved the HP9000 support.  Noboyuki Hikichi and Tomoyuki Hasei
+contributed Sony/News OS 3 support.  David Johnson contributed Encore
+Umax support.  Jyrki Kuoppala contributed Altos 3068 support.  Jeff Law
+contributed HP PA and SOM support.  Keith Packard contributed NS32K
+support.  Doug Rabson contributed Acorn Risc Machine support.  Bob Rusk
+contributed Harris Nighthawk CX-UX support.  Chris Smith contributed
+Convex support (and Fortran debugging).  Jonathan Stone contributed
+Pyramid support.  Michael Tiemann contributed SPARC support.  Tim Tucker
+contributed support for the Gould NP1 and Gould Powernode.  Pace
+Willison contributed Intel 386 support.  Jay Vosburgh contributed
 Symmetry support.  Marko Mlinar contributed OpenRISC 1000 support.
 
    Andreas Schwab contributed M68K GNU/Linux support.
@@ -349,8 +348,8 @@ several machine instruction sets.
 
    Patrick Duval, Ted Goldstein, Vikram Koka and Glenn Engel helped
 develop remote debugging.  Intel Corporation, Wind River Systems, AMD,
-and ARM contributed remote debugging modules for the i960, VxWorks,
-A29K UDI, and RDI targets, respectively.
+and ARM contributed remote debugging modules for the i960, VxWorks, A29K
+UDI, and RDI targets, respectively.
 
    Brian Fox is the author of the readline libraries providing
 command-line editing and command history.
@@ -361,8 +360,8 @@ Modula-2 support, and contributed the La
    Fred Fish wrote most of the support for Unix System Vr4.  He also
 enhanced the command-completion support to cover C++ overloaded symbols.
 
-   Hitachi America (now Renesas America), Ltd. sponsored the support for
-H8/300, H8/500, and Super-H processors.
+   Hitachi America (now Renesas America), Ltd.  sponsored the support
+for H8/300, H8/500, and Super-H processors.
 
    NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx
 processors.
@@ -390,10 +389,10 @@ innumerable bug fixes and cleanups throu
    The following people at the Hewlett-Packard Company contributed
 support for the PA-RISC 2.0 architecture, HP-UX 10.20, 10.30, and 11.0
 (narrow mode), HP's implementation of kernel threads, HP's aC++
-compiler, and the Text User Interface (nee Terminal User Interface):
-Ben Krepp, Richard Title, John Bishop, Susan Macchia, Kathy Mann,
-Satish Pai, India Paul, Steve Rehrauer, and Elena Zannoni.  Kim Haase
-provided HP-specific information in this manual.
+compiler, and the Text User Interface (nee Terminal User Interface): Ben
+Krepp, Richard Title, John Bishop, Susan Macchia, Kathy Mann, Satish
+Pai, India Paul, Steve Rehrauer, and Elena Zannoni.  Kim Haase provided
+HP-specific information in this manual.
 
    DJ Delorie ported GDB to MS-DOS, for the DJGPP project.  Robert
 Hoehne made significant contributions to the DJGPP port.
@@ -432,13 +431,12 @@ unwinder framework, this consisting of a
 frame IDs, independent frame sniffers, and the sentinel frame.  Mark
 Kettenis implemented the DWARF 2 unwinder, Jeff Johnston the libunwind
 unwinder, and Andrew Cagney the dummy, sentinel, tramp, and trad
-unwinders.  The architecture-specific changes, each involving a
-complete rewrite of the architecture's frame code, were carried out by
-Jim Blandy, Joel Brobecker, Kevin Buettner, Andrew Cagney, Stephane
-Carrez, Randolph Chung, Orjan Friberg, Richard Henderson, Daniel
-Jacobowitz, Jeff Johnston, Mark Kettenis, Theodore A. Roth, Kei
-Sakamoto, Yoshinori Sato, Michael Snyder, Corinna Vinschen, and Ulrich
-Weigand.
+unwinders.  The architecture-specific changes, each involving a complete
+rewrite of the architecture's frame code, were carried out by Jim
+Blandy, Joel Brobecker, Kevin Buettner, Andrew Cagney, Stephane Carrez,
+Randolph Chung, Orjan Friberg, Richard Henderson, Daniel Jacobowitz,
+Jeff Johnston, Mark Kettenis, Theodore A. Roth, Kei Sakamoto, Yoshinori
+Sato, Michael Snyder, Corinna Vinschen, and Ulrich Weigand.
 
    Christian Zankel, Ross Morley, Bob Wilson, and Maxim Grigoriev from
 Tensilica, Inc. contributed support for Xtensa processors.  Others who
@@ -448,25 +446,30 @@ John Newlin, and Scott Foehner.
    Michael Eager and staff of Xilinx, Inc., contributed support for the
 Xilinx MicroBlaze architecture.
 
+   Initial support for the FreeBSD/mips target and native configuration
+was developed by SRI International and the University of Cambridge
+Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+("CTSRD"), as part of the DARPA CRASH research programme.
+
 
 File: gdb.info,  Node: Sample Session,  Next: Invocation,  Prev: Summary,  Up: Top
 
 1 A Sample GDB Session
 **********************
 
-You can use this manual at your leisure to read all about GDB.
-However, a handful of commands are enough to get started using the
-debugger.  This chapter illustrates those commands.
+You can use this manual at your leisure to read all about GDB.  However,
+a handful of commands are enough to get started using the debugger.
+This chapter illustrates those commands.
 
-   One of the preliminary versions of GNU `m4' (a generic macro
+   One of the preliminary versions of GNU 'm4' (a generic macro
 processor) exhibits the following bug: sometimes, when we change its
 quote strings from the default, the commands used to capture one macro
-definition within another stop working.  In the following short `m4'
-session, we define a macro `foo' which expands to `0000'; we then use
-the `m4' built-in `defn' to define `bar' as the same thing.  However,
-when we change the open quote string to `<QUOTE>' and the close quote
-string to `<UNQUOTE>', the same procedure fails to define a new synonym
-`baz':
+definition within another stop working.  In the following short 'm4'
+session, we define a macro 'foo' which expands to '0000'; we then use
+the 'm4' built-in 'defn' to define 'bar' as the same thing.  However,
+when we change the open quote string to '<QUOTE>' and the close quote
+string to '<UNQUOTE>', the same procedure fails to define a new synonym
+'baz':
 
      $ cd gnu/m4
      $ ./m4
@@ -474,7 +477,7 @@ string to `<UNQUOTE>', the same procedur
 
      foo
      0000
-     define(bar,defn(`foo'))
+     define(bar,defn('foo'))
 
      bar
      0000
@@ -494,7 +497,7 @@ Let us use GDB to try to see what is goi
      There is absolutely no warranty for GDB; type "show warranty"
       for details.
 
-     GDB 7.9.50.20150706-cvs, Copyright 1999 Free Software Foundation, Inc...
+     GDB 7.12.50.20170306-git, Copyright 1999 Free Software Foundation, Inc...
      (gdb)
 
 GDB reads only enough symbol data to know where to find the rest when
@@ -504,16 +507,15 @@ fit in this manual.
 
      (gdb) set width 70
 
-We need to see how the `m4' built-in `changequote' works.  Having
-looked at the source, we know the relevant subroutine is
-`m4_changequote', so we set a breakpoint there with the GDB `break'
-command.
+We need to see how the 'm4' built-in 'changequote' works.  Having looked
+at the source, we know the relevant subroutine is 'm4_changequote', so
+we set a breakpoint there with the GDB 'break' command.
 
      (gdb) break m4_changequote
      Breakpoint 1 at 0x62f4: file builtin.c, line 879.
 
-Using the `run' command, we start `m4' running under GDB control; as
-long as control does not reach the `m4_changequote' subroutine, the
+Using the 'run' command, we start 'm4' running under GDB control; as
+long as control does not reach the 'm4_changequote' subroutine, the
 program runs as usual:
 
      (gdb) run
@@ -523,8 +525,8 @@ program runs as usual:
      foo
      0000
 
-To trigger the breakpoint, we call `changequote'.  GDB suspends
-execution of `m4', displaying information about the context where it
+To trigger the breakpoint, we call 'changequote'.  GDB suspends
+execution of 'm4', displaying information about the context where it
 stops.
 
      changequote(<QUOTE>,<UNQUOTE>)
@@ -533,28 +535,28 @@ stops.
          at builtin.c:879
      879         if (bad_argc(TOKEN_DATA_TEXT(argv[0]),argc,1,3))
 
-Now we use the command `n' (`next') to advance execution to the next
+Now we use the command 'n' ('next') to advance execution to the next
 line of the current function.
 
      (gdb) n
      882         set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1])\
       : nil,
 
-`set_quotes' looks like a promising subroutine.  We can go into it by
-using the command `s' (`step') instead of `next'.  `step' goes to the
+'set_quotes' looks like a promising subroutine.  We can go into it by
+using the command 's' ('step') instead of 'next'.  'step' goes to the
 next line to be executed in _any_ subroutine, so it steps into
-`set_quotes'.
+'set_quotes'.
 
      (gdb) s
      set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
          at input.c:530
      530         if (lquote != def_lquote)
 
-The display that shows the subroutine where `m4' is now suspended (and
+The display that shows the subroutine where 'm4' is now suspended (and
 its arguments) is called a stack frame display.  It shows a summary of
-the stack.  We can use the `backtrace' command (which can also be
-spelled `bt'), to see where we are in the stack as a whole: the
-`backtrace' command displays a stack frame for each active subroutine.
+the stack.  We can use the 'backtrace' command (which can also be
+spelled 'bt'), to see where we are in the stack as a whole: the
+'backtrace' command displays a stack frame for each active subroutine.
 
      (gdb) bt
      #0  set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
@@ -568,8 +570,8 @@ spelled `bt'), to see where we are in th
      #5  0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195
 
 We step through a few more lines to see what happens.  The first two
-times, we can use `s'; the next two times we use `n' to avoid falling
-into the `xstrdup' subroutine.
+times, we can use 's'; the next two times we use 'n' to avoid falling
+into the 'xstrdup' subroutine.
 
      (gdb) s
      0x3b5c  532         if (rquote != def_rquote)
@@ -583,8 +585,8 @@ into the `xstrdup' subroutine.
      538         len_lquote = strlen(rquote);
 
 The last line displayed looks a little odd; we can examine the variables
-`lquote' and `rquote' to see if they are in fact the new left and right
-quotes we specified.  We use the command `p' (`print') to see their
+'lquote' and 'rquote' to see if they are in fact the new left and right
+quotes we specified.  We use the command 'p' ('print') to see their
 values.
 
      (gdb) p lquote
@@ -592,9 +594,9 @@ values.
      (gdb) p rquote
      $2 = 0x35d50 "<UNQUOTE>"
 
-`lquote' and `rquote' are indeed the new left and right quotes.  To
-look at some context, we can display ten lines of source surrounding
-the current line with the `l' (`list') command.
+'lquote' and 'rquote' are indeed the new left and right quotes.  To look
+at some context, we can display ten lines of source surrounding the
+current line with the 'l' ('list') command.
 
      (gdb) l
      533             xfree(rquote);
@@ -610,7 +612,7 @@ the current line with the `l' (`list') c
      541
      542     void
 
-Let us step past the two lines that set `len_lquote' and `len_rquote',
+Let us step past the two lines that set 'len_lquote' and 'len_rquote',
 and then examine the values of those variables.
 
      (gdb) n
@@ -622,9 +624,9 @@ and then examine the values of those var
      (gdb) p len_rquote
      $4 = 7
 
-That certainly looks wrong, assuming `len_lquote' and `len_rquote' are
-meant to be the lengths of `lquote' and `rquote' respectively.  We can
-set them to better values using the `p' command, since it can print the
+That certainly looks wrong, assuming 'len_lquote' and 'len_rquote' are
+meant to be the lengths of 'lquote' and 'rquote' respectively.  We can
+set them to better values using the 'p' command, since it can print the
 value of any expression--and that expression can include subroutine
 calls and assignments.
 
@@ -633,9 +635,9 @@ calls and assignments.
      (gdb) p len_rquote=strlen(rquote)
      $6 = 9
 
-Is that enough to fix the problem of using the new quotes with the `m4'
-built-in `defn'?  We can allow `m4' to continue executing with the `c'
-(`continue') command, and then try the example that caused trouble
+Is that enough to fix the problem of using the new quotes with the 'm4'
+built-in 'defn'?  We can allow 'm4' to continue executing with the 'c'
+('continue') command, and then try the example that caused trouble
 initially:
 
      (gdb) c
@@ -648,13 +650,13 @@ initially:
 
 Success!  The new quotes now work just as well as the default ones.  The
 problem seems to have been just the two typos defining the wrong
-lengths.  We allow `m4' exit by giving it an EOF as input:
+lengths.  We allow 'm4' exit by giving it an EOF as input:
 
      Ctrl-d
      Program exited normally.
 
-The message `Program exited normally.' is from GDB; it indicates `m4'
-has finished executing.  We can end our GDB session with the GDB `quit'
+The message 'Program exited normally.' is from GDB; it indicates 'm4'
+has finished executing.  We can end our GDB session with the GDB 'quit'
 command.
 
      (gdb) quit
@@ -667,9 +669,8 @@ File: gdb.info,  Node: Invocation,  Next
 
 This chapter discusses how to start GDB, and how to get out of it.  The
 essentials are:
-   * type `gdb' to start GDB.
-
-   * type `quit' or `Ctrl-d' to exit.
+   * type 'gdb' to start GDB.
+   * type 'quit' or 'Ctrl-d' to exit.
 
 * Menu:
 
@@ -684,10 +685,10 @@ File: gdb.info,  Node: Invoking GDB,  Ne
 2.1 Invoking GDB
 ================
 
-Invoke GDB by running the program `gdb'.  Once started, GDB reads
+Invoke GDB by running the program 'gdb'.  Once started, GDB reads
 commands from the terminal until you tell it to exit.
 
-   You can also run `gdb' with a variety of arguments and options, to
+   You can also run 'gdb' with a variety of arguments and options, to
 specify more of your debugging environment at the outset.
 
    The command-line options described here are designed to cover a
@@ -709,8 +710,8 @@ want to debug a running process:
 
      gdb PROGRAM 1234
 
-would attach GDB to process `1234' (unless you also have a file named
-`1234'; GDB does check for a core file first).
+would attach GDB to process '1234' (unless you also have a file named
+'1234'; GDB does check for a core file first).
 
    Taking advantage of the second command-line argument requires a
 fairly complete operating system; when you use GDB as a remote debugger
@@ -718,31 +719,31 @@ attached to a bare board, there may not 
 there is often no way to get a core dump.  GDB will warn you if it is
 unable to attach or to read core dumps.
 
-   You can optionally have `gdb' pass any arguments after the
-executable file to the inferior using `--args'.  This option stops
-option processing.
+   You can optionally have 'gdb' pass any arguments after the executable
+file to the inferior using '--args'.  This option stops option
+processing.
      gdb --args gcc -O2 -c foo.c
-   This will cause `gdb' to debug `gcc', and to set `gcc''s
-command-line arguments (*note Arguments::) to `-O2 -c foo.c'.
+   This will cause 'gdb' to debug 'gcc', and to set 'gcc''s command-line
+arguments (*note Arguments::) to '-O2 -c foo.c'.
 
-   You can run `gdb' without printing the front material, which
-describes GDB's non-warranty, by specifying `--silent' (or
-`-q'/`--quiet'):
+   You can run 'gdb' without printing the front material, which
+describes GDB's non-warranty, by specifying '--silent' (or
+'-q'/'--quiet'):
 
      gdb --silent
 
-You can further control how GDB starts up by using command-line
-options.  GDB itself can remind you of the options available.
+You can further control how GDB starts up by using command-line options.
+GDB itself can remind you of the options available.
 
 Type
 
      gdb -help
 
-to display all available options and briefly describe their use (`gdb
+to display all available options and briefly describe their use ('gdb
 -h' is a shorter equivalent).
 
    All options and command line arguments you give are processed in
-sequential order.  The order makes a difference when the `-x' option is
+sequential order.  The order makes a difference when the '-x' option is
 used.
 
 * Menu:
@@ -757,281 +758,274 @@ File: gdb.info,  Node: File Options,  Ne
 2.1.1 Choosing Files
 --------------------
 
-When GDB starts, it reads any arguments other than options as
-specifying an executable file and core file (or process ID).  This is
-the same as if the arguments were specified by the `-se' and `-c' (or
-`-p') options respectively.  (GDB reads the first argument that does
-not have an associated option flag as equivalent to the `-se' option
-followed by that argument; and the second argument that does not have
-an associated option flag, if any, as equivalent to the `-c'/`-p'
-option followed by that argument.)  If the second argument begins with
-a decimal digit, GDB will first attempt to attach to it as a process,
-and if that fails, attempt to open it as a corefile.  If you have a
-corefile whose name begins with a digit, you can prevent GDB from
-treating it as a pid by prefixing it with `./', e.g. `./12345'.
-
-   If GDB has not been configured to included core file support, such
-as for most embedded targets, then it will complain about a second
-argument and ignore it.
+When GDB starts, it reads any arguments other than options as specifying
+an executable file and core file (or process ID). This is the same as if
+the arguments were specified by the '-se' and '-c' (or '-p') options
+respectively.  (GDB reads the first argument that does not have an
+associated option flag as equivalent to the '-se' option followed by
+that argument; and the second argument that does not have an associated
+option flag, if any, as equivalent to the '-c'/'-p' option followed by
+that argument.)  If the second argument begins with a decimal digit, GDB
+will first attempt to attach to it as a process, and if that fails,
+attempt to open it as a corefile.  If you have a corefile whose name
+begins with a digit, you can prevent GDB from treating it as a pid by
+prefixing it with './', e.g. './12345'.
+
+   If GDB has not been configured to included core file support, such as
+for most embedded targets, then it will complain about a second argument
+and ignore it.
 
    Many options have both long and short forms; both are shown in the
 following list.  GDB also recognizes the long forms if you truncate
-them, so long as enough of the option is present to be unambiguous.
-(If you prefer, you can flag option arguments with `--' rather than
-`-', though we illustrate the more usual convention.)
+them, so long as enough of the option is present to be unambiguous.  (If
+you prefer, you can flag option arguments with '--' rather than '-',
+though we illustrate the more usual convention.)
 
-`-symbols FILE'
-`-s FILE'
+'-symbols FILE'
+'-s FILE'
      Read symbol table from file FILE.
 
-`-exec FILE'
-`-e FILE'
+'-exec FILE'
+'-e FILE'
      Use file FILE as the executable file to execute when appropriate,
      and for examining pure data in conjunction with a core dump.
 
-`-se FILE'
+'-se FILE'
      Read symbol table from file FILE and use it as the executable file.
 
-`-core FILE'
-`-c FILE'
+'-core FILE'
+'-c FILE'
      Use file FILE as a core dump to examine.
 
-`-pid NUMBER'
-`-p NUMBER'
-     Connect to process ID NUMBER, as with the `attach' command.
+'-pid NUMBER'
+'-p NUMBER'
+     Connect to process ID NUMBER, as with the 'attach' command.
 
-`-command FILE'
-`-x FILE'
+'-command FILE'
+'-x FILE'
      Execute commands from file FILE.  The contents of this file is
-     evaluated exactly as the `source' command would.  *Note Command
+     evaluated exactly as the 'source' command would.  *Note Command
      files: Command Files.
 
-`-eval-command COMMAND'
-`-ex COMMAND'
+'-eval-command COMMAND'
+'-ex COMMAND'
      Execute a single GDB command.
 
      This option may be used multiple times to call multiple commands.
-     It may also be interleaved with `-command' as required.
+     It may also be interleaved with '-command' as required.
 
           gdb -ex 'target sim' -ex 'load' \
              -x setbreakpoints -ex 'run' a.out
 
-`-init-command FILE'
-`-ix FILE'
+'-init-command FILE'
+'-ix FILE'
      Execute commands from file FILE before loading the inferior (but
      after loading gdbinit files).  *Note Startup::.
 
-`-init-eval-command COMMAND'
-`-iex COMMAND'
-     Execute a single GDB command before loading the inferior (but
-     after loading gdbinit files).  *Note Startup::.
+'-init-eval-command COMMAND'
+'-iex COMMAND'
+     Execute a single GDB command before loading the inferior (but after
+     loading gdbinit files).  *Note Startup::.
 
-`-directory DIRECTORY'
-`-d DIRECTORY'
+'-directory DIRECTORY'
+'-d DIRECTORY'
      Add DIRECTORY to the path to search for source and script files.
 
-`-r'
-`-readnow'
+'-r'
+'-readnow'
      Read each symbol file's entire symbol table immediately, rather
      than the default, which is to read it incrementally as it is
      needed.  This makes startup slower, but makes future operations
      faster.
 
-
 
 File: gdb.info,  Node: Mode Options,  Next: Startup,  Prev: File Options,  Up: Invoking GDB
 
 2.1.2 Choosing Modes
 --------------------
 
-You can run GDB in various alternative modes--for example, in batch
-mode or quiet mode.
+You can run GDB in various alternative modes--for example, in batch mode
+or quiet mode.
 
-`-nx'
-`-n'
+'-nx'
+'-n'
      Do not execute commands found in any initialization file.  There
      are three init files, loaded in the following order:
 
-    ``system.gdbinit''
+     'system.gdbinit'
           This is the system-wide init file.  Its location is specified
-          with the `--with-system-gdbinit' configure option (*note
+          with the '--with-system-gdbinit' configure option (*note
           System-wide configuration::).  It is loaded first when GDB
           starts, before command line options have been processed.
-
-    ``~/.gdbinit''
+     '~/.gdbinit'
           This is the init file in your home directory.  It is loaded
-          next, after `system.gdbinit', and before command options have
+          next, after 'system.gdbinit', and before command options have
           been processed.
-
-    ``./.gdbinit''
+     './.gdbinit'
           This is the init file in the current directory.  It is loaded
-          last, after command line options other than `-x' and `-ex'
-          have been processed.  Command line options `-x' and `-ex' are
-          processed last, after `./.gdbinit' has been loaded.
+          last, after command line options other than '-x' and '-ex'
+          have been processed.  Command line options '-x' and '-ex' are
+          processed last, after './.gdbinit' has been loaded.
 
      For further documentation on startup processing, *Note Startup::.
      For documentation on how to write command files, *Note Command
      Files: Command Files.
 
-`-nh'
-     Do not execute commands found in `~/.gdbinit', the init file in
+'-nh'
+     Do not execute commands found in '~/.gdbinit', the init file in
      your home directory.  *Note Startup::.
 
-`-quiet'
-`-silent'
-`-q'
+'-quiet'
+'-silent'
+'-q'
      "Quiet".  Do not print the introductory and copyright messages.
      These messages are also suppressed in batch mode.
 
-`-batch'
-     Run in batch mode.  Exit with status `0' after processing all the
-     command files specified with `-x' (and all commands from
-     initialization files, if not inhibited with `-n').  Exit with
+'-batch'
+     Run in batch mode.  Exit with status '0' after processing all the
+     command files specified with '-x' (and all commands from
+     initialization files, if not inhibited with '-n').  Exit with
      nonzero status if an error occurs in executing the GDB commands in
      the command files.  Batch mode also disables pagination, sets
      unlimited terminal width and height *note Screen Size::, and acts
-     as if `set confirm off' were in effect (*note Messages/Warnings::).
+     as if 'set confirm off' were in effect (*note Messages/Warnings::).
 
      Batch mode may be useful for running GDB as a filter, for example
-     to download and run a program on another computer; in order to
-     make this more useful, the message
+     to download and run a program on another computer; in order to make
+     this more useful, the message
 
           Program exited normally.
 
      (which is ordinarily issued whenever a program running under GDB
      control terminates) is not issued when running in batch mode.
 
-`-batch-silent'
-     Run in batch mode exactly like `-batch', but totally silently.  All
-     GDB output to `stdout' is prevented (`stderr' is unaffected).
-     This is much quieter than `-silent' and would be useless for an
+'-batch-silent'
+     Run in batch mode exactly like '-batch', but totally silently.  All
+     GDB output to 'stdout' is prevented ('stderr' is unaffected).  This
+     is much quieter than '-silent' and would be useless for an
      interactive session.
 
-     This is particularly useful when using targets that give `Loading
+     This is particularly useful when using targets that give 'Loading
      section' messages, for example.
 
      Note that targets that give their output via GDB, as opposed to
-     writing directly to `stdout', will also be made silent.
+     writing directly to 'stdout', will also be made silent.
 
-`-return-child-result'
+'-return-child-result'
      The return code from GDB will be the return code from the child
      process (the process being debugged), with the following
      exceptions:
 
         * GDB exits abnormally.  E.g., due to an incorrect argument or
           an internal error.  In this case the exit code is the same as
-          it would have been without `-return-child-result'.
-
-        * The user quits with an explicit value.  E.g., `quit 1'.
-
+          it would have been without '-return-child-result'.
+        * The user quits with an explicit value.  E.g., 'quit 1'.
         * The child process never runs, or is not allowed to terminate,
           in which case the exit code will be -1.
 
-     This option is useful in conjunction with `-batch' or
-     `-batch-silent', when GDB is being used as a remote program loader
+     This option is useful in conjunction with '-batch' or
+     '-batch-silent', when GDB is being used as a remote program loader
      or simulator interface.
 
-`-nowindows'
-`-nw'
+'-nowindows'
+'-nw'
      "No windows".  If GDB comes with a graphical user interface (GUI)
      built in, then this option tells GDB to only use the command-line
      interface.  If no GUI is available, this option has no effect.
 
-`-windows'
-`-w'
+'-windows'
+'-w'
      If GDB includes a GUI, then this option requires it to be used if
      possible.
 
-`-cd DIRECTORY'
+'-cd DIRECTORY'
      Run GDB using DIRECTORY as its working directory, instead of the
      current directory.
 
-`-data-directory DIRECTORY'
-`-D DIRECTORY'
+'-data-directory DIRECTORY'
+'-D DIRECTORY'
      Run GDB using DIRECTORY as its data directory.  The data directory
      is where GDB searches for its auxiliary files.  *Note Data Files::.
 
-`-fullname'
-`-f'
+'-fullname'
+'-f'
      GNU Emacs sets this option when it runs GDB as a subprocess.  It
      tells GDB to output the full file name and line number in a
-     standard, recognizable fashion each time a stack frame is
-     displayed (which includes each time your program stops).  This
-     recognizable format looks like two `\032' characters, followed by
-     the file name, line number and character position separated by
-     colons, and a newline.  The Emacs-to-GDB interface program uses
-     the two `\032' characters as a signal to display the source code
-     for the frame.
+     standard, recognizable fashion each time a stack frame is displayed
+     (which includes each time your program stops).  This recognizable
+     format looks like two '\032' characters, followed by the file name,
+     line number and character position separated by colons, and a
+     newline.  The Emacs-to-GDB interface program uses the two '\032'
+     characters as a signal to display the source code for the frame.
 
-`-annotate LEVEL'
+'-annotate LEVEL'
      This option sets the "annotation level" inside GDB.  Its effect is
-     identical to using `set annotate LEVEL' (*note Annotations::).
-     The annotation LEVEL controls how much information GDB prints
-     together with its prompt, values of expressions, source lines, and
-     other types of output.  Level 0 is the normal, level 1 is for use
-     when GDB is run as a subprocess of GNU Emacs, level 3 is the
-     maximum annotation suitable for programs that control GDB, and
-     level 2 has been deprecated.
+     identical to using 'set annotate LEVEL' (*note Annotations::).  The
+     annotation LEVEL controls how much information GDB prints together
+     with its prompt, values of expressions, source lines, and other
+     types of output.  Level 0 is the normal, level 1 is for use when
+     GDB is run as a subprocess of GNU Emacs, level 3 is the maximum
+     annotation suitable for programs that control GDB, and level 2 has
+     been deprecated.
 
      The annotation mechanism has largely been superseded by GDB/MI
      (*note GDB/MI::).
 
-`--args'
+'--args'
      Change interpretation of command line so that arguments following
      the executable file are passed as command line arguments to the
      inferior.  This option stops option processing.
 
-`-baud BPS'
-`-b BPS'
+'-baud BPS'
+'-b BPS'
      Set the line speed (baud rate or bits per second) of any serial
      interface used by GDB for remote debugging.
 
-`-l TIMEOUT'
+'-l TIMEOUT'
      Set the timeout (in seconds) of any communication used by GDB for
      remote debugging.
 
-`-tty DEVICE'
-`-t DEVICE'
+'-tty DEVICE'
+'-t DEVICE'
      Run using DEVICE for your program's standard input and output.
 
-`-tui'
+'-tui'
      Activate the "Text User Interface" when starting.  The Text User
      Interface manages several text windows on the terminal, showing
-     source, assembly, registers and GDB command outputs (*note GDB
-     Text User Interface: TUI.).  Do not use this option if you run GDB
-     from Emacs (*note Using GDB under GNU Emacs: Emacs.).
+     source, assembly, registers and GDB command outputs (*note GDB Text
+     User Interface: TUI.). Do not use this option if you run GDB from
+     Emacs (*note Using GDB under GNU Emacs: Emacs.).
 
-`-interpreter INTERP'
+'-interpreter INTERP'
      Use the interpreter INTERP for interface with the controlling
      program or device.  This option is meant to be set by programs
      which communicate with GDB using it as a back end.  *Note Command
      Interpreters: Interpreters.
 
-     `--interpreter=mi' (or `--interpreter=mi2') causes GDB to use the
+     '--interpreter=mi' (or '--interpreter=mi2') causes GDB to use the
      "GDB/MI interface" (*note The GDB/MI Interface: GDB/MI.) included
      since GDB version 6.0.  The previous GDB/MI interface, included in
-     GDB version 5.3 and selected with `--interpreter=mi1', is
+     GDB version 5.3 and selected with '--interpreter=mi1', is
      deprecated.  Earlier GDB/MI interfaces are no longer supported.
 
-`-write'
+'-write'
      Open the executable and core files for both reading and writing.
-     This is equivalent to the `set write on' command inside GDB (*note
+     This is equivalent to the 'set write on' command inside GDB (*note
      Patching::).
 
-`-statistics'
+'-statistics'
      This option causes GDB to print statistics about time and memory
      usage after it completes each command and returns to the prompt.
 
-`-version'
+'-version'
      This option causes GDB to print its version number and no-warranty
      blurb, and exit.
 
-`-configuration'
+'-configuration'
      This option causes GDB to print details about its build-time
      configuration parameters, and then exit.  These details can be
      important when reporting GDB bugs (*note GDB Bugs::).
 
-
 
 File: gdb.info,  Node: Startup,  Prev: Mode Options,  Up: Invoking GDB
 
@@ -1043,46 +1037,45 @@ Here's the description of what GDB does 
   1. Sets up the command interpreter as specified by the command line
      (*note interpreter: Mode Options.).
 
-  2. Reads the system-wide "init file" (if `--with-system-gdbinit' was
+  2. Reads the system-wide "init file" (if '--with-system-gdbinit' was
      used when building GDB; *note System-wide configuration and
-     settings: System-wide configuration.) and executes all the
-     commands in that file.
+     settings: System-wide configuration.) and executes all the commands
+     in that file.
 
-  3. Reads the init file (if any) in your home directory(1) and
-     executes all the commands in that file.
+  3. Reads the init file (if any) in your home directory(1) and executes
+     all the commands in that file.
 
-  4. Executes commands and command files specified by the `-iex' and
-     `-ix' options in their specified order.  Usually you should use the
-     `-ex' and `-x' options instead, but this way you can apply
-     settings before GDB init files get executed and before inferior
-     gets loaded.
+  4. Executes commands and command files specified by the '-iex' and
+     '-ix' options in their specified order.  Usually you should use the
+     '-ex' and '-x' options instead, but this way you can apply settings
+     before GDB init files get executed and before inferior gets loaded.
 
   5. Processes command line options and operands.
 
   6. Reads and executes the commands from init file (if any) in the
-     current working directory as long as `set auto-load local-gdbinit'
-     is set to `on' (*note Init File in the Current Directory::).  This
+     current working directory as long as 'set auto-load local-gdbinit'
+     is set to 'on' (*note Init File in the Current Directory::).  This
      is only done if the current directory is different from your home
-     directory.  Thus, you can have more than one init file, one
-     generic in your home directory, and another, specific to the
-     program you are debugging, in the directory where you invoke GDB.
+     directory.  Thus, you can have more than one init file, one generic
+     in your home directory, and another, specific to the program you
+     are debugging, in the directory where you invoke GDB.
 
   7. If the command line specified a program to debug, or a process to
      attach to, or a core file, GDB loads any auto-loaded scripts
-     provided for the program or for its loaded shared libraries.
-     *Note Auto-loading::.
+     provided for the program or for its loaded shared libraries.  *Note
+     Auto-loading::.
 
-     If you wish to disable the auto-loading during startup, you must
-     do something like the following:
+     If you wish to disable the auto-loading during startup, you must do
+     something like the following:
 
           $ gdb -iex "set auto-load python-scripts off" myprogram
 
-     Option `-ex' does not work because the auto-loading is then turned
+     Option '-ex' does not work because the auto-loading is then turned
      off too late.
 
-  8. Executes commands and command files specified by the `-ex' and
-     `-x' options in their specified order.  *Note Command Files::, for
-     more details about GDB command files.
+  8. Executes commands and command files specified by the '-ex' and '-x'
+     options in their specified order.  *Note Command Files::, for more
+     details about GDB command files.
 
   9. Reads the command history recorded in the "history file".  *Note
      Command History::, for more details about the command history and
@@ -1090,24 +1083,24 @@ Here's the description of what GDB does 
 
    Init files use the same syntax as "command files" (*note Command
 Files::) and are processed by GDB in the same way.  The init file in
-your home directory can set options (such as `set complaints') that
-affect subsequent processing of command line options and operands.
-Init files are not executed if you use the `-nx' option (*note Choosing
+your home directory can set options (such as 'set complaints') that
+affect subsequent processing of command line options and operands.  Init
+files are not executed if you use the '-nx' option (*note Choosing
 Modes: Mode Options.).
 
    To display the list of init files loaded by gdb at startup, you can
-use `gdb --help'.
+use 'gdb --help'.
 
-   The GDB init files are normally called `.gdbinit'.  The DJGPP port
-of GDB uses the name `gdb.ini', due to the limitations of file names
+   The GDB init files are normally called '.gdbinit'.  The DJGPP port of
+GDB uses the name 'gdb.ini', due to the limitations of file names
 imposed by DOS filesystems.  The Windows port of GDB uses the standard
-name, but if it finds a `gdb.ini' file in your home directory, it warns
+name, but if it finds a 'gdb.ini' file in your home directory, it warns
 you about that and suggests to rename the file to the standard name.
 
    ---------- Footnotes ----------
 
    (1) On DOS/Windows systems, the home directory is the one pointed to
-by the `HOME' environment variable.
+by the 'HOME' environment variable.
 
 
 File: gdb.info,  Node: Quitting GDB,  Next: Shell Commands,  Prev: Invoking GDB,  Up: Invocation
@@ -1115,21 +1108,21 @@ File: gdb.info,  Node: Quitting GDB,  Ne
 2.2 Quitting GDB
 ================
 
-`quit [EXPRESSION]'
-`q'
-     To exit GDB, use the `quit' command (abbreviated `q'), or type an
-     end-of-file character (usually `Ctrl-d').  If you do not supply
+'quit [EXPRESSION]'
+'q'
+     To exit GDB, use the 'quit' command (abbreviated 'q'), or type an
+     end-of-file character (usually 'Ctrl-d').  If you do not supply
      EXPRESSION, GDB will terminate normally; otherwise it will
      terminate using the result of EXPRESSION as the error code.
 
-   An interrupt (often `Ctrl-c') does not exit from GDB, but rather
-terminates the action of any GDB command that is in progress and
-returns to GDB command level.  It is safe to type the interrupt
-character at any time because GDB does not allow it to take effect
-until a time when it is safe.
+   An interrupt (often 'Ctrl-c') does not exit from GDB, but rather
+terminates the action of any GDB command that is in progress and returns
+to GDB command level.  It is safe to type the interrupt character at any
+time because GDB does not allow it to take effect until a time when it
+is safe.
 
    If you have been using GDB to control an attached process or device,
-you can release it with the `detach' command (*note Debugging an
+you can release it with the 'detach' command (*note Debugging an
 Already-running Process: Attach.).
 
 
@@ -1140,22 +1133,22 @@ File: gdb.info,  Node: Shell Commands,  
 
 If you need to execute occasional shell commands during your debugging
 session, there is no need to leave or suspend GDB; you can just use the
-`shell' command.
+'shell' command.
 
-`shell COMMAND-STRING'
-`!COMMAND-STRING'
+'shell COMMAND-STRING'
+'!COMMAND-STRING'
      Invoke a standard shell to execute COMMAND-STRING.  Note that no
-     space is needed between `!' and COMMAND-STRING.  If it exists, the
-     environment variable `SHELL' determines which shell to run.
-     Otherwise GDB uses the default shell (`/bin/sh' on Unix systems,
-     `COMMAND.COM' on MS-DOS, etc.).
-
-   The utility `make' is often needed in development environments.  You
-do not have to use the `shell' command for this purpose in GDB:
-
-`make MAKE-ARGS'
-     Execute the `make' program with the specified arguments.  This is
-     equivalent to `shell make MAKE-ARGS'.
+     space is needed between '!' and COMMAND-STRING.  If it exists, the
+     environment variable 'SHELL' determines which shell to run.
+     Otherwise GDB uses the default shell ('/bin/sh' on Unix systems,
+     'COMMAND.COM' on MS-DOS, etc.).
+
+   The utility 'make' is often needed in development environments.  You
+do not have to use the 'shell' command for this purpose in GDB:
+
+'make MAKE-ARGS'
+     Execute the 'make' program with the specified arguments.  This is
+     equivalent to 'shell make MAKE-ARGS'.
 
 
 File: gdb.info,  Node: Logging Output,  Prev: Shell Commands,  Up: Invocation
@@ -1166,26 +1159,21 @@ File: gdb.info,  Node: Logging Output,  
 You may want to save the output of GDB commands to a file.  There are
 several commands to control GDB's logging.
 
-`set logging on'
+'set logging on'
      Enable logging.
-
-`set logging off'
-     Disable logging.  
-
-`set logging file FILE'
+'set logging off'
+     Disable logging.
+'set logging file FILE'
      Change the name of the current logfile.  The default logfile is
-     `gdb.txt'.
-
-`set logging overwrite [on|off]'
-     By default, GDB will append to the logfile.  Set `overwrite' if
-     you want `set logging on' to overwrite the logfile instead.
-
-`set logging redirect [on|off]'
+     'gdb.txt'.
+'set logging overwrite [on|off]'
+     By default, GDB will append to the logfile.  Set 'overwrite' if you
+     want 'set logging on' to overwrite the logfile instead.
+'set logging redirect [on|off]'
      By default, GDB output will go to both the terminal and the
-     logfile.  Set `redirect' if you want output to go only to the log
-     file.  
-
-`show logging'
+     logfile.  Set 'redirect' if you want output to go only to the log
+     file.
+'show logging'
      Show the current values of the logging settings.
 
 
@@ -1215,40 +1203,39 @@ File: gdb.info,  Node: Command Syntax,  
 A GDB command is a single line of input.  There is no limit on how long
 it can be.  It starts with a command name, which is followed by
 arguments whose meaning depends on the command name.  For example, the
-command `step' accepts an argument which is the number of times to
-step, as in `step 5'.  You can also use the `step' command with no
-arguments.  Some commands do not allow any arguments.
+command 'step' accepts an argument which is the number of times to step,
+as in 'step 5'.  You can also use the 'step' command with no arguments.
+Some commands do not allow any arguments.
 
    GDB command names may always be truncated if that abbreviation is
 unambiguous.  Other possible command abbreviations are listed in the
 documentation for individual commands.  In some cases, even ambiguous
-abbreviations are allowed; for example, `s' is specially defined as
-equivalent to `step' even though there are other commands whose names
-start with `s'.  You can test abbreviations by using them as arguments
-to the `help' command.
+abbreviations are allowed; for example, 's' is specially defined as
+equivalent to 'step' even though there are other commands whose names
+start with 's'.  You can test abbreviations by using them as arguments
+to the 'help' command.
 
    A blank line as input to GDB (typing just <RET>) means to repeat the
-previous command.  Certain commands (for example, `run') will not
-repeat this way; these are commands whose unintentional repetition
-might cause trouble and which you are unlikely to want to repeat.
-User-defined commands can disable this feature; see *note dont-repeat:
-Define.
+previous command.  Certain commands (for example, 'run') will not repeat
+this way; these are commands whose unintentional repetition might cause
+trouble and which you are unlikely to want to repeat.  User-defined
+commands can disable this feature; see *note dont-repeat: Define.
 
-   The `list' and `x' commands, when you repeat them with <RET>,
+   The 'list' and 'x' commands, when you repeat them with <RET>,
 construct new arguments rather than repeating exactly as typed.  This
 permits easy scanning of source or memory.
 
    GDB can also use <RET> in another way: to partition lengthy output,
-in a way similar to the common utility `more' (*note Screen Size:
-Screen Size.).  Since it is easy to press one <RET> too many in this
-situation, GDB disables command repetition after any command that
-generates this sort of display.
+in a way similar to the common utility 'more' (*note Screen Size: Screen
+Size.).  Since it is easy to press one <RET> too many in this situation,
+GDB disables command repetition after any command that generates this
+sort of display.
 
-   Any text from a `#' to the end of the line is a comment; it does
+   Any text from a '#' to the end of the line is a comment; it does
 nothing.  This is useful mainly in command files (*note Command Files:
 Command Files.).
 
-   The `Ctrl-o' binding is useful for repeating a complex sequence of
+   The 'Ctrl-o' binding is useful for repeating a complex sequence of
 commands.  This command accepts the current line, like <RET>, and then
 fetches the next line relative to the current line from the history for
 editing.
@@ -1271,24 +1258,24 @@ example, if you type
 
      (gdb) info bre <TAB>
 
-GDB fills in the rest of the word `breakpoints', since that is the only
-`info' subcommand beginning with `bre':
+GDB fills in the rest of the word 'breakpoints', since that is the only
+'info' subcommand beginning with 'bre':
 
      (gdb) info breakpoints
 
-You can either press <RET> at this point, to run the `info breakpoints'
-command, or backspace and enter something else, if `breakpoints' does
+You can either press <RET> at this point, to run the 'info breakpoints'
+command, or backspace and enter something else, if 'breakpoints' does
 not look like the command you expected.  (If you were sure you wanted
-`info breakpoints' in the first place, you might as well just type
-<RET> immediately after `info bre', to exploit command abbreviations
-rather than command completion).
+'info breakpoints' in the first place, you might as well just type <RET>
+immediately after 'info bre', to exploit command abbreviations rather
+than command completion).
 
    If there is more than one possibility for the next word when you
 press <TAB>, GDB sounds a bell.  You can either supply more characters
 and try again, or just press <TAB> a second time; GDB displays all the
 possible completions for that word.  For example, you might want to set
-a breakpoint on a subroutine whose name begins with `make_', but when
-you type `b make_<TAB>' GDB just sounds the bell.  Typing <TAB> again
+a breakpoint on a subroutine whose name begins with 'make_', but when
+you type 'b make_<TAB>' GDB just sounds the bell.  Typing <TAB> again
 displays all the function names in your program that begin with those
 characters, for example:
 
@@ -1302,13 +1289,13 @@ GDB sounds bell; press <TAB> again, to s
      (gdb) b make_
 
 After displaying the available possibilities, GDB copies your partial
-input (`b make_' in the example) so you can finish the command.
+input ('b make_' in the example) so you can finish the command.
 
    If you just want to see the list of alternatives in the first place,
-you can press `M-?' rather than pressing <TAB> twice.  `M-?' means
-`<META> ?'.  You can type this either by holding down a key designated
-as the <META> shift on your keyboard (if there is one) while typing
-`?', or as <ESC> followed by `?'.
+you can press 'M-?' rather than pressing <TAB> twice.  'M-?' means
+'<META> ?'.  You can type this either by holding down a key designated
+as the <META> shift on your keyboard (if there is one) while typing '?',
+or as <ESC> followed by '?'.
 
    If the number of possible completions is large, GDB will print as
 much of the list as it has collected, as well as a message indicating
@@ -1322,36 +1309,34 @@ that the list may be truncated.
 
 This behavior can be controlled with the following commands:
 
-`set max-completions LIMIT'
-`set max-completions unlimited'
+'set max-completions LIMIT'
+'set max-completions unlimited'
      Set the maximum number of completion candidates.  GDB will stop
      looking for more completions once it collects this many candidates.
      This is useful when completing on things like function names as
      collecting all the possible candidates can be time consuming.  The
      default value is 200.  A value of zero disables tab-completion.
      Note that setting either no limit or a very large limit can make
-     completion slow.  
-
-`show max-completions'
+     completion slow.
+'show max-completions'
      Show the maximum number of candidates that GDB will collect and
      show during completion.
 
    Sometimes the string you need, while logically a "word", may contain
 parentheses or other characters that GDB normally excludes from its
 notion of a word.  To permit word completion to work in this situation,
-you may enclose words in `'' (single quote marks) in GDB commands.
+you may enclose words in ''' (single quote marks) in GDB commands.
 
    The most likely situation where you might need this is in typing the
-name of a C++ function.  This is because C++ allows function
-overloading (multiple definitions of the same function, distinguished
-by argument type).  For example, when you want to set a breakpoint you
-may need to distinguish whether you mean the version of `name' that
-takes an `int' parameter, `name(int)', or the version that takes a
-`float' parameter, `name(float)'.  To use the word-completion
-facilities in this situation, type a single quote `'' at the beginning
-of the function name.  This alerts GDB that it may need to consider
-more information than usual when you press <TAB> or `M-?' to request
-word completion:
+name of a C++ function.  This is because C++ allows function overloading
+(multiple definitions of the same function, distinguished by argument
+type).  For example, when you want to set a breakpoint you may need to
+distinguish whether you mean the version of 'name' that takes an 'int'
+parameter, 'name(int)', or the version that takes a 'float' parameter,
+'name(float)'.  To use the word-completion facilities in this situation,
+type a single quote ''' at the beginning of the function name.  This
+alerts GDB that it may need to consider more information than usual when
+you press <TAB> or 'M-?' to request word completion:
 
      (gdb) b 'bubble( M-?
      bubble(double,double)    bubble(int,int)
@@ -1371,7 +1356,7 @@ have not yet started typing the argument
 completion on an overloaded symbol.
 
    For more information about overloaded functions, see *note C++
-Expressions: C Plus Plus Expressions.  You can use the command `set
+Expressions: C Plus Plus Expressions.  You can use the command 'set
 overload-resolution off' to disable overload resolution; see *note GDB
 Features for C++: Debugging C Plus Plus.
 
@@ -1385,7 +1370,7 @@ available in the type of the left-hand-s
      to_delete            to_put               to_write_async_safe
      to_flush             to_read
 
-This is because the `gdb_stdout' is a variable of the type `struct
+This is because the 'gdb_stdout' is a variable of the type 'struct
 ui_file' that is defined in GDB sources as follows:
 
      struct ui_file
@@ -1415,13 +1400,13 @@ File: gdb.info,  Node: Help,  Prev: Comp
 3.3 Getting Help
 ================
 
-You can always ask GDB itself for information on its commands, using
-the command `help'.
+You can always ask GDB itself for information on its commands, using the
+command 'help'.
 
-`help'
-`h'
-     You can use `help' (abbreviated `h') with no arguments to display
-     a short list of named classes of commands:
+'help'
+'h'
+     You can use 'help' (abbreviated 'h') with no arguments to display a
+     short list of named classes of commands:
 
           (gdb) help
           List of classes of commands:
@@ -1447,10 +1432,10 @@ the command `help'.
           Command name abbreviations are allowed if unambiguous.
           (gdb)
 
-`help CLASS'
+'help CLASS'
      Using one of the general help classes as an argument, you can get a
      list of the individual commands in that class.  For example, here
-     is the help display for the class `status':
+     is the help display for the class 'status':
 
           (gdb) help status
           Status inquiries.
@@ -1467,14 +1452,14 @@ the command `help'.
           Command name abbreviations are allowed if unambiguous.
           (gdb)
 
-`help COMMAND'
-     With a command name as `help' argument, GDB displays a short
+'help COMMAND'
+     With a command name as 'help' argument, GDB displays a short
      paragraph on how to use that command.
 
-`apropos ARGS'
-     The `apropos' command searches through all of the GDB commands,
-     and their documentation, for the regular expression specified in
-     ARGS.  It prints out all matches found.  For example:
+'apropos ARGS'
+     The 'apropos' command searches through all of the GDB commands, and
+     their documentation, for the regular expression specified in ARGS.
+     It prints out all matches found.  For example:
 
           apropos alias
 
@@ -1486,8 +1471,8 @@ the command `help'.
           del -- Delete some breakpoints or auto-display expressions
           delete -- Delete some breakpoints or auto-display expressions
 
-`complete ARGS'
-     The `complete ARGS' command lists all the possible completions for
+'complete ARGS'
+     The 'complete ARGS' command lists all the possible completions for
      the beginning of a command.  Use ARGS to specify the beginning of
      the command you want completed.  For example:
 
@@ -1502,68 +1487,67 @@ the command `help'.
 
      This is intended for use by GNU Emacs.
 
-   In addition to `help', you can use the GDB commands `info' and
-`show' to inquire about the state of your program, or the state of GDB
-itself.  Each command supports many topics of inquiry; this manual
-introduces each of them in the appropriate context.  The listings under
-`info' and under `show' in the Command, Variable, and Function Index
-point to all the sub-commands.  *Note Command and Variable Index::.
+   In addition to 'help', you can use the GDB commands 'info' and 'show'
+to inquire about the state of your program, or the state of GDB itself.
+Each command supports many topics of inquiry; this manual introduces
+each of them in the appropriate context.  The listings under 'info' and
+under 'show' in the Command, Variable, and Function Index point to all
+the sub-commands.  *Note Command and Variable Index::.
 
-`info'
-     This command (abbreviated `i') is for describing the state of your
+'info'
+     This command (abbreviated 'i') is for describing the state of your
      program.  For example, you can show the arguments passed to a
-     function with `info args', list the registers currently in use
-     with `info registers', or list the breakpoints you have set with
-     `info breakpoints'.  You can get a complete list of the `info'
-     sub-commands with `help info'.
+     function with 'info args', list the registers currently in use with
+     'info registers', or list the breakpoints you have set with 'info
+     breakpoints'.  You can get a complete list of the 'info'
+     sub-commands with 'help info'.
 
-`set'
+'set'
      You can assign the result of an expression to an environment
-     variable with `set'.  For example, you can set the GDB prompt to a
-     $-sign with `set prompt $'.
+     variable with 'set'.  For example, you can set the GDB prompt to a
+     $-sign with 'set prompt $'.
 
-`show'
-     In contrast to `info', `show' is for describing the state of GDB
-     itself.  You can change most of the things you can `show', by
-     using the related command `set'; for example, you can control what
-     number system is used for displays with `set radix', or simply
-     inquire which is currently in use with `show radix'.
+'show'
+     In contrast to 'info', 'show' is for describing the state of GDB
+     itself.  You can change most of the things you can 'show', by using
+     the related command 'set'; for example, you can control what number
+     system is used for displays with 'set radix', or simply inquire
+     which is currently in use with 'show radix'.
 
      To display all the settable parameters and their current values,
-     you can use `show' with no arguments; you may also use `info set'.
+     you can use 'show' with no arguments; you may also use 'info set'.
      Both commands produce the same display.
 
-   Here are several miscellaneous `show' subcommands, all of which are
-exceptional in lacking corresponding `set' commands:
+   Here are several miscellaneous 'show' subcommands, all of which are
+exceptional in lacking corresponding 'set' commands:
 
-`show version'
+'show version'
      Show what version of GDB is running.  You should include this
-     information in GDB bug-reports.  If multiple versions of GDB are
-     in use at your site, you may need to determine which version of
-     GDB you are running; as GDB evolves, new commands are introduced,
-     and old ones may wither away.  Also, many system vendors ship
-     variant versions of GDB, and there are variant versions of GDB in
-     GNU/Linux distributions as well.  The version number is the same
-     as the one announced when you start GDB.
+     information in GDB bug-reports.  If multiple versions of GDB are in
+     use at your site, you may need to determine which version of GDB
+     you are running; as GDB evolves, new commands are introduced, and
+     old ones may wither away.  Also, many system vendors ship variant
+     versions of GDB, and there are variant versions of GDB in GNU/Linux
+     distributions as well.  The version number is the same as the one
+     announced when you start GDB.
 
-`show copying'
-`info copying'
+'show copying'
+'info copying'
      Display information about permission for copying GDB.
 
-`show warranty'
-`info warranty'
+'show warranty'
+'info warranty'
      Display the GNU "NO WARRANTY" statement, or a warranty, if your
      version of GDB comes with one.
 
-`show configuration'
+'show configuration'
      Display detailed information about the way GDB was configured when
      it was built.  This displays the optional arguments passed to the
-     `configure' script and also configuration parameters detected
-     automatically by `configure'.  When reporting a GDB bug (*note GDB
+     'configure' script and also configuration parameters detected
+     automatically by 'configure'.  When reporting a GDB bug (*note GDB
      Bugs::), it is important to include this information in your
      report.
 
-
 
 File: gdb.info,  Node: Running,  Next: Stopping,  Prev: Commands,  Up: Top
 
@@ -1607,31 +1591,31 @@ in the object file; it describes the dat
 function and the correspondence between source line numbers and
 addresses in the executable code.
 
-   To request debugging information, specify the `-g' option when you
+   To request debugging information, specify the '-g' option when you
 run the compiler.
 
    Programs that are to be shipped to your customers are compiled with
-optimizations, using the `-O' compiler option.  However, some compilers
-are unable to handle the `-g' and `-O' options together.  Using those
+optimizations, using the '-O' compiler option.  However, some compilers
+are unable to handle the '-g' and '-O' options together.  Using those
 compilers, you cannot generate optimized executables containing
 debugging information.
 
-   GCC, the GNU C/C++ compiler, supports `-g' with or without `-O',
+   GCC, the GNU C/C++ compiler, supports '-g' with or without '-O',
 making it possible to debug optimized code.  We recommend that you
-_always_ use `-g' whenever you compile a program.  You may think your
+_always_ use '-g' whenever you compile a program.  You may think your
 program is correct, but there is no sense in pushing your luck.  For
 more information, see *note Optimized Code::.
 
-   Older versions of the GNU C compiler permitted a variant option
-`-gg' for debugging information.  GDB no longer supports this format;
-if your GNU C compiler has this option, do not use it.
+   Older versions of the GNU C compiler permitted a variant option '-gg'
+for debugging information.  GDB no longer supports this format; if your
+GNU C compiler has this option, do not use it.
 
    GDB knows about preprocessor macros and can show you their expansion
 (*note Macros::).  Most compilers do not include information about
-preprocessor macros in the debugging information if you specify the
-`-g' flag alone.  Version 3.1 and later of GCC, the GNU C compiler,
-provides macro information if you are using the DWARF debugging format,
-and specify the option `-g3'.
+preprocessor macros in the debugging information if you specify the '-g'
+flag alone.  Version 3.1 and later of GCC, the GNU C compiler, provides
+macro information if you are using the DWARF debugging format, and
+specify the option '-g3'.
 
    *Note Options for Debugging Your Program or GCC: (gcc.info)Debugging
 Options, for more information on GCC options affecting debug
@@ -1648,60 +1632,58 @@ File: gdb.info,  Node: Starting,  Next: 
 4.2 Starting your Program
 =========================
 
-`run'
-`r'
-     Use the `run' command to start your program under GDB.  You must
+'run'
+'r'
+     Use the 'run' command to start your program under GDB.  You must
      first specify the program name with an argument to GDB (*note
-     Getting In and Out of GDB: Invocation.), or by using the `file' or
-     `exec-file' command (*note Commands to Specify Files: Files.).
-
+     Getting In and Out of GDB: Invocation.), or by using the 'file' or
+     'exec-file' command (*note Commands to Specify Files: Files.).
 
    If you are running your program in an execution environment that
-supports processes, `run' creates an inferior process and makes that
-process run your program.  In some environments without processes,
-`run' jumps to the start of your program.  Other targets, like
-`remote', are always running.  If you get an error message like this
-one:
+supports processes, 'run' creates an inferior process and makes that
+process run your program.  In some environments without processes, 'run'
+jumps to the start of your program.  Other targets, like 'remote', are
+always running.  If you get an error message like this one:
 
      The "remote" target does not support "run".
      Try "help target" or "continue".
 
-then use `continue' to run your program.  You may need `load' first
+then use 'continue' to run your program.  You may need 'load' first
 (*note load::).
 
    The execution of a program is affected by certain information it
 receives from its superior.  GDB provides ways to specify this
-information, which you must do _before_ starting your program.  (You
-can change it after starting your program, but such changes only affect
-your program the next time you start it.)  This information may be
-divided into four categories:
+information, which you must do _before_ starting your program.  (You can
+change it after starting your program, but such changes only affect your
+program the next time you start it.)  This information may be divided
+into four categories:
 
 The _arguments._
      Specify the arguments to give your program as the arguments of the
-     `run' command.  If a shell is available on your target, the shell
+     'run' command.  If a shell is available on your target, the shell
      is used to pass the arguments, so that you may use normal
      conventions (such as wildcard expansion or variable substitution)
      in describing the arguments.  In Unix systems, you can control
-     which shell is used with the `SHELL' environment variable.  If you
-     do not define `SHELL', GDB uses the default shell (`/bin/sh').
-     You can disable use of any shell with the `set startup-with-shell'
+     which shell is used with the 'SHELL' environment variable.  If you
+     do not define 'SHELL', GDB uses the default shell ('/bin/sh').  You
+     can disable use of any shell with the 'set startup-with-shell'
      command (see below for details).
 
 The _environment._
      Your program normally inherits its environment from GDB, but you
-     can use the GDB commands `set environment' and `unset environment'
-     to change parts of the environment that affect your program.
-     *Note Your Program's Environment: Environment.
+     can use the GDB commands 'set environment' and 'unset environment'
+     to change parts of the environment that affect your program.  *Note
+     Your Program's Environment: Environment.
 
 The _working directory._
      Your program inherits its working directory from GDB.  You can set
-     the GDB working directory with the `cd' command in GDB.  *Note
-     Your Program's Working Directory: Working Directory.
+     the GDB working directory with the 'cd' command in GDB.  *Note Your
+     Program's Working Directory: Working Directory.
 
 The _standard input and output._
      Your program normally uses the same device for standard input and
      standard output as GDB is using.  You can redirect input and output
-     in the `run' command line, or you can use the `tty' command to set
+     in the 'run' command line, or you can use the 'tty' command to set
      a different device for your program.  *Note Your Program's Input
      and Output: Input/Output.
 
@@ -1710,66 +1692,65 @@ The _standard input and output._
      another program; if you attempt this, GDB is likely to wind up
      debugging the wrong program.
 
-   When you issue the `run' command, your program begins to execute
-immediately.  *Note Stopping and Continuing: Stopping, for discussion
-of how to arrange for your program to stop.  Once your program has
-stopped, you may call functions in your program, using the `print' or
-`call' commands.  *Note Examining Data: Data.
+   When you issue the 'run' command, your program begins to execute
+immediately.  *Note Stopping and Continuing: Stopping, for discussion of
+how to arrange for your program to stop.  Once your program has stopped,
+you may call functions in your program, using the 'print' or 'call'
+commands.  *Note Examining Data: Data.
 
    If the modification time of your symbol file has changed since the
-last time GDB read its symbols, GDB discards its symbol table, and
-reads it again.  When it does this, GDB tries to retain your current
+last time GDB read its symbols, GDB discards its symbol table, and reads
+it again.  When it does this, GDB tries to retain your current
 breakpoints.
 
-`start'
+'start'
      The name of the main procedure can vary from language to language.
-     With C or C++, the main procedure name is always `main', but other
-     languages such as Ada do not require a specific name for their
-     main procedure.  The debugger provides a convenient way to start
-     the execution of the program and to stop at the beginning of the
-     main procedure, depending on the language used.
+     With C or C++, the main procedure name is always 'main', but other
+     languages such as Ada do not require a specific name for their main
+     procedure.  The debugger provides a convenient way to start the
+     execution of the program and to stop at the beginning of the main
+     procedure, depending on the language used.
 
-     The `start' command does the equivalent of setting a temporary
+     The 'start' command does the equivalent of setting a temporary
      breakpoint at the beginning of the main procedure and then invoking
-     the `run' command.
+     the 'run' command.
 
      Some programs contain an "elaboration" phase where some startup
-     code is executed before the main procedure is called.  This
-     depends on the languages used to write your program.  In C++, for
-     instance, constructors for static and global objects are executed
-     before `main' is called.  It is therefore possible that the
-     debugger stops before reaching the main procedure.  However, the
-     temporary breakpoint will remain to halt execution.
+     code is executed before the main procedure is called.  This depends
+     on the languages used to write your program.  In C++, for instance,
+     constructors for static and global objects are executed before
+     'main' is called.  It is therefore possible that the debugger stops
+     before reaching the main procedure.  However, the temporary
+     breakpoint will remain to halt execution.
 
      Specify the arguments to give to your program as arguments to the
-     `start' command.  These arguments will be given verbatim to the
-     underlying `run' command.  Note that the same arguments will be
+     'start' command.  These arguments will be given verbatim to the
+     underlying 'run' command.  Note that the same arguments will be
      reused if no argument is provided during subsequent calls to
-     `start' or `run'.
+     'start' or 'run'.
 
      It is sometimes necessary to debug the program during elaboration.
-     In these cases, using the `start' command would stop the execution
+     In these cases, using the 'start' command would stop the execution
      of your program too late, as the program would have already
-     completed the elaboration phase.  Under these circumstances,
-     insert breakpoints in your elaboration code before running your
-     program.
-
-`set exec-wrapper WRAPPER'
-`show exec-wrapper'
-`unset exec-wrapper'
-     When `exec-wrapper' is set, the specified wrapper is used to
-     launch programs for debugging.  GDB starts your program with a
-     shell command of the form `exec WRAPPER PROGRAM'.  Quoting is
-     added to PROGRAM and its arguments, but not to WRAPPER, so you
-     should add quotes if appropriate for your shell.  The wrapper runs
-     until it executes your program, and then GDB takes control.
+     completed the elaboration phase.  Under these circumstances, insert
+     breakpoints in your elaboration code before running your program.
 
-     You can use any program that eventually calls `execve' with its
+'set exec-wrapper WRAPPER'
+'show exec-wrapper'
+'unset exec-wrapper'
+     When 'exec-wrapper' is set, the specified wrapper is used to launch
+     programs for debugging.  GDB starts your program with a shell
+     command of the form 'exec WRAPPER PROGRAM'.  Quoting is added to
+     PROGRAM and its arguments, but not to WRAPPER, so you should add
+     quotes if appropriate for your shell.  The wrapper runs until it
+     executes your program, and then GDB takes control.
+
+     You can use any program that eventually calls 'execve' with its
      arguments as a wrapper.  Several standard Unix utilities do this,
-     e.g. `env' and `nohup'.  Any Unix shell script ending with `exec
+     e.g. 'env' and 'nohup'.  Any Unix shell script ending with 'exec
      "$@"' will also work.
 
-     For example, you can use `env' to pass an environment variable to
+     For example, you can use 'env' to pass an environment variable to
      the debugged program, without setting the variable in your shell's
      environment:
 
@@ -1779,55 +1760,56 @@ breakpoints.
      This command is available when debugging locally on most targets,
      excluding DJGPP, Cygwin, MS Windows, and QNX Neutrino.
 
-`set startup-with-shell'
-`set startup-with-shell on'
-`set startup-with-shell off'
-`show set startup-with-shell'
+'set startup-with-shell'
+'set startup-with-shell on'
+'set startup-with-shell off'
+'show set startup-with-shell'
      On Unix systems, by default, if a shell is available on your
-     target, GDB) uses it to start your program.  Arguments of the
-     `run' command are passed to the shell, which does variable
-     substitution, expands wildcard characters and performs redirection
-     of I/O.  In some circumstances, it may be useful to disable such
-     use of a shell, for example, when debugging the shell itself or
-     diagnosing startup failures such as:
+     target, GDB) uses it to start your program.  Arguments of the 'run'
+     command are passed to the shell, which does variable substitution,
+     expands wildcard characters and performs redirection of I/O. In
+     some circumstances, it may be useful to disable such use of a
+     shell, for example, when debugging the shell itself or diagnosing
+     startup failures such as:
 
           (gdb) run
           Starting program: ./a.out
           During startup program terminated with signal SIGSEGV, Segmentation fault.
 
      which indicates the shell or the wrapper specified with
-     `exec-wrapper' crashed, not your program.  Most often, this is
+     'exec-wrapper' crashed, not your program.  Most often, this is
      caused by something odd in your shell's non-interactive mode
-     initialization file--such as `.cshrc' for C-shell, $`.zshenv' for
-     the Z shell, or the file specified in the `BASH_ENV' environment
+     initialization file--such as '.cshrc' for C-shell, $'.zshenv' for
+     the Z shell, or the file specified in the 'BASH_ENV' environment
      variable for BASH.
 
-`set auto-connect-native-target'
-`set auto-connect-native-target on'
-`set auto-connect-native-target off'
-`show auto-connect-native-target'
-     By default, if not connected to any target yet (e.g., with `target
-     remote'), the `run' command starts your program as a native
-     process under GDB, on your local machine.  If you're sure you
-     don't want to debug programs on your local machine, you can tell
-     GDB to not connect to the native target automatically with the
-     `set auto-connect-native-target off' command.
+'set auto-connect-native-target'
+'set auto-connect-native-target on'
+'set auto-connect-native-target off'
+'show auto-connect-native-target'
+
+     By default, if not connected to any target yet (e.g., with 'target
+     remote'), the 'run' command starts your program as a native process
+     under GDB, on your local machine.  If you're sure you don't want to
+     debug programs on your local machine, you can tell GDB to not
+     connect to the native target automatically with the 'set
+     auto-connect-native-target off' command.
 
-     If `on', which is the default, and if GDB is not connected to a
-     target already, the `run' command automaticaly connects to the
+     If 'on', which is the default, and if GDB is not connected to a
+     target already, the 'run' command automaticaly connects to the
      native target, if one is available.
 
-     If `off', and if GDB is not connected to a target already, the
-     `run' command fails with an error:
+     If 'off', and if GDB is not connected to a target already, the
+     'run' command fails with an error:
 
           (gdb) run
           Don't know how to run.  Try "help target".
 
      If GDB is already connected to a target, GDB always uses it with
-     the `run' command.
+     the 'run' command.
 
      In any case, you can explicitly connect to the native target with
-     the `target native' command.  For example,
+     the 'target native' command.  For example,
 
           (gdb) set auto-connect-native-target off
           (gdb) run
@@ -1837,16 +1819,16 @@ breakpoints.
           Starting program: ./a.out
           [Inferior 1 (process 10421) exited normally]
 
-     In case you connected explicitly to the `native' target, GDB
+     In case you connected explicitly to the 'native' target, GDB
      remains connected even if all inferiors exit, ready for the next
-     `run' command.  Use the `disconnect' command to disconnect.
+     'run' command.  Use the 'disconnect' command to disconnect.
 
      Examples of other commands that likewise respect the
-     `auto-connect-native-target' setting: `attach', `info proc', `info
+     'auto-connect-native-target' setting: 'attach', 'info proc', 'info
      os'.
 
-`set disable-randomization'
-`set disable-randomization on'
+'set disable-randomization'
+'set disable-randomization on'
      This option (enabled by default in GDB) will turn off the native
      randomization of the virtual address space of the started program.
      This option is useful for multiple debugging sessions to make the
@@ -1858,25 +1840,25 @@ breakpoints.
 
           (gdb) set exec-wrapper setarch `uname -m` -R
 
-`set disable-randomization off'
+'set disable-randomization off'
      Leave the behavior of the started executable unchanged.  Some bugs
      rear their ugly heads only when the program is loaded at certain
      addresses.  If your bug disappears when you run the program under
      GDB, that might be because GDB by default disables the address
      randomization on platforms, such as GNU/Linux, which do that for
-     stand-alone programs.  Use `set disable-randomization off' to try
+     stand-alone programs.  Use 'set disable-randomization off' to try
      to reproduce such elusive bugs.
 
      On targets where it is available, virtual address space
      randomization protects the programs against certain kinds of
      security attacks.  In these cases the attacker needs to know the
      exact location of a concrete executable code.  Randomizing its
-     location makes it impossible to inject jumps misusing a code at
-     its expected addresses.
+     location makes it impossible to inject jumps misusing a code at its
+     expected addresses.
 
      Prelinking shared libraries provides a startup performance
-     advantage but it makes addresses in these libraries predictable
-     for privileged processes by having just unprivileged access at the
+     advantage but it makes addresses in these libraries predictable for
+     privileged processes by having just unprivileged access at the
      target system.  Reading the shared library binary gives enough
      information for assembling the malicious code misusing it.  Still
      even a prelinked shared library can get loaded at a new random
@@ -1884,21 +1866,20 @@ breakpoints.
      startup.  Shared libraries not already prelinked are always loaded
      at a randomly chosen address.
 
-     Position independent executables (PIE) contain position
-     independent code similar to the shared libraries and therefore
-     such executables get loaded at a randomly chosen address upon
-     startup.  PIE executables always load even already prelinked
-     shared libraries at a random address.  You can build such
-     executable using `gcc -fPIE -pie'.
+     Position independent executables (PIE) contain position independent
+     code similar to the shared libraries and therefore such executables
+     get loaded at a randomly chosen address upon startup.  PIE
+     executables always load even already prelinked shared libraries at
+     a random address.  You can build such executable using 'gcc -fPIE
+     -pie'.
 
      Heap (malloc storage), stack and custom mmap areas are always
      placed randomly (as long as the randomization is enabled).
 
-`show disable-randomization'
+'show disable-randomization'
      Show the current setting of the explicit disable of the native
      randomization of the virtual address space of the started program.
 
-
 
 File: gdb.info,  Node: Arguments,  Next: Environment,  Prev: Starting,  Up: Running
 
@@ -1906,28 +1887,28 @@ File: gdb.info,  Node: Arguments,  Next:
 ============================
 
 The arguments to your program can be specified by the arguments of the
-`run' command.  They are passed to a shell, which expands wildcard
+'run' command.  They are passed to a shell, which expands wildcard
 characters and performs redirection of I/O, and thence to your program.
-Your `SHELL' environment variable (if it exists) specifies what shell
-GDB uses.  If you do not define `SHELL', GDB uses the default shell
-(`/bin/sh' on Unix).
+Your 'SHELL' environment variable (if it exists) specifies what shell
+GDB uses.  If you do not define 'SHELL', GDB uses the default shell
+('/bin/sh' on Unix).
 
    On non-Unix systems, the program is usually invoked directly by GDB,
-which emulates I/O redirection via the appropriate system calls, and
-the wildcard characters are expanded by the startup code of the
-program, not by the shell.
-
-   `run' with no arguments uses the same arguments used by the previous
-`run', or those set by the `set args' command.
-
-`set args'
-     Specify the arguments to be used the next time your program is
-     run.  If `set args' has no arguments, `run' executes your program
-     with no arguments.  Once you have run your program with arguments,
-     using `set args' before the next `run' is the only way to run it
-     again without arguments.
+which emulates I/O redirection via the appropriate system calls, and the
+wildcard characters are expanded by the startup code of the program, not
+by the shell.
+
+   'run' with no arguments uses the same arguments used by the previous
+'run', or those set by the 'set args' command.
+
+'set args'
+     Specify the arguments to be used the next time your program is run.
+     If 'set args' has no arguments, 'run' executes your program with no
+     arguments.  Once you have run your program with arguments, using
+     'set args' before the next 'run' is the only way to run it again
+     without arguments.
 
-`show args'
+'show args'
      Show the arguments to give your program when it is started.
 
 
@@ -1937,39 +1918,39 @@ File: gdb.info,  Node: Environment,  Nex
 ==============================
 
 The "environment" consists of a set of environment variables and their
-values.  Environment variables conventionally record such things as
-your user name, your home directory, your terminal type, and your search
-path for programs to run.  Usually you set up environment variables with
-the shell and they are inherited by all the other programs you run.
-When debugging, it can be useful to try running your program with a
-modified environment without having to start GDB over again.
+values.  Environment variables conventionally record such things as your
+user name, your home directory, your terminal type, and your search path
+for programs to run.  Usually you set up environment variables with the
+shell and they are inherited by all the other programs you run.  When
+debugging, it can be useful to try running your program with a modified
+environment without having to start GDB over again.
 
-`path DIRECTORY'
-     Add DIRECTORY to the front of the `PATH' environment variable (the
+'path DIRECTORY'
+     Add DIRECTORY to the front of the 'PATH' environment variable (the
      search path for executables) that will be passed to your program.
-     The value of `PATH' used by GDB does not change.  You may specify
+     The value of 'PATH' used by GDB does not change.  You may specify
      several directory names, separated by whitespace or by a
-     system-dependent separator character (`:' on Unix, `;' on MS-DOS
+     system-dependent separator character (':' on Unix, ';' on MS-DOS
      and MS-Windows).  If DIRECTORY is already in the path, it is moved
      to the front, so it is searched sooner.
 
-     You can use the string `$cwd' to refer to whatever is the current
+     You can use the string '$cwd' to refer to whatever is the current
      working directory at the time GDB searches the path.  If you use
-     `.' instead, it refers to the directory where you executed the
-     `path' command.  GDB replaces `.' in the DIRECTORY argument (with
+     '.' instead, it refers to the directory where you executed the
+     'path' command.  GDB replaces '.' in the DIRECTORY argument (with
      the current path) before adding DIRECTORY to the search path.
 
-`show paths'
-     Display the list of search paths for executables (the `PATH'
+'show paths'
+     Display the list of search paths for executables (the 'PATH'
      environment variable).
 
-`show environment [VARNAME]'
-     Print the value of environment variable VARNAME to be given to
-     your program when it starts.  If you do not supply VARNAME, print
-     the names and values of all environment variables to be given to
-     your program.  You can abbreviate `environment' as `env'.
+'show environment [VARNAME]'
+     Print the value of environment variable VARNAME to be given to your
+     program when it starts.  If you do not supply VARNAME, print the
+     names and values of all environment variables to be given to your
+     program.  You can abbreviate 'environment' as 'env'.
 
-`set environment VARNAME [=VALUE]'
+'set environment VARNAME [=VALUE]'
      Set environment variable VARNAME to VALUE.  The value changes for
      your program (and the shell GDB uses to launch it), not for GDB
      itself.  The VALUE may be any string; the values of environment
@@ -1981,31 +1962,31 @@ modified environment without having to s
 
           set env USER = foo
 
-     tells the debugged program, when subsequently run, that its user
-     is named `foo'.  (The spaces around `=' are used for clarity here;
+     tells the debugged program, when subsequently run, that its user is
+     named 'foo'.  (The spaces around '=' are used for clarity here;
      they are not actually required.)
 
-     Note that on Unix systems, GDB runs your program via a shell,
-     which also inherits the environment set with `set environment'.
-     If necessary, you can avoid that by using the `env' program as a
-     wrapper instead of using `set environment'.  *Note set
+     Note that on Unix systems, GDB runs your program via a shell, which
+     also inherits the environment set with 'set environment'.  If
+     necessary, you can avoid that by using the 'env' program as a
+     wrapper instead of using 'set environment'.  *Note set
      exec-wrapper::, for an example doing just that.
 
-`unset environment VARNAME'
+'unset environment VARNAME'
      Remove variable VARNAME from the environment to be passed to your
-     program.  This is different from `set env VARNAME ='; `unset
-     environment' removes the variable from the environment, rather
-     than assigning it an empty value.
+     program.  This is different from 'set env VARNAME ='; 'unset
+     environment' removes the variable from the environment, rather than
+     assigning it an empty value.
 
    _Warning:_ On Unix systems, GDB runs your program using the shell
-indicated by your `SHELL' environment variable if it exists (or
-`/bin/sh' if not).  If your `SHELL' variable names a shell that runs an
-initialization file when started non-interactively--such as `.cshrc'
-for C-shell, $`.zshenv' for the Z shell, or the file specified in the
-`BASH_ENV' environment variable for BASH--any variables you set in that
+indicated by your 'SHELL' environment variable if it exists (or
+'/bin/sh' if not).  If your 'SHELL' variable names a shell that runs an
+initialization file when started non-interactively--such as '.cshrc' for
+C-shell, $'.zshenv' for the Z shell, or the file specified in the
+'BASH_ENV' environment variable for BASH--any variables you set in that
 file affect your program.  You may wish to move setting of environment
-variables to files that are only run when you sign on, such as `.login'
-or `.profile'.
+variables to files that are only run when you sign on, such as '.login'
+or '.profile'.
 
 
 File: gdb.info,  Node: Working Directory,  Next: Input/Output,  Prev: Environment,  Up: Running
@@ -2013,27 +1994,27 @@ File: gdb.info,  Node: Working Directory
 4.5 Your Program's Working Directory
 ====================================
 
-Each time you start your program with `run', it inherits its working
+Each time you start your program with 'run', it inherits its working
 directory from the current working directory of GDB.  The GDB working
 directory is initially whatever it inherited from its parent process
 (typically the shell), but you can specify a new working directory in
-GDB with the `cd' command.
+GDB with the 'cd' command.
 
    The GDB working directory also serves as a default for the commands
 that specify files for GDB to operate on.  *Note Commands to Specify
 Files: Files.
 
-`cd [DIRECTORY]'
+'cd [DIRECTORY]'
      Set the GDB working directory to DIRECTORY.  If not given,
-     DIRECTORY uses `'~''.
+     DIRECTORY uses ''~''.
 
-`pwd'
+'pwd'
      Print the GDB working directory.
 
    It is generally impossible to find the current working directory of
 the process being debugged (since a program can change its directory
 during its run).  If you work on a system where GDB is configured with
-the `/proc' support, you can use the `info proc' command (*note SVR4
+the '/proc' support, you can use the 'info proc' command (*note SVR4
 Process Information::) to find out the current working directory of the
 debuggee.
 
@@ -2049,46 +2030,48 @@ terminal modes to interact with you, but
 your program was using and switches back to them when you continue
 running your program.
 
-`info terminal'
+'info terminal'
      Displays information recorded by GDB about the terminal modes your
      program is using.
 
    You can redirect your program's input and/or output using shell
-redirection with the `run' command.  For example,
+redirection with the 'run' command.  For example,
 
      run > outfile
 
-starts your program, diverting its output to the file `outfile'.
+starts your program, diverting its output to the file 'outfile'.
 
    Another way to specify where your program should do input and output
-is with the `tty' command.  This command accepts a file name as
-argument, and causes this file to be the default for future `run'
+is with the 'tty' command.  This command accepts a file name as
+argument, and causes this file to be the default for future 'run'
 commands.  It also resets the controlling terminal for the child
-process, for future `run' commands.  For example,
+process, for future 'run' commands.  For example,
 
      tty /dev/ttyb
 
-directs that processes started with subsequent `run' commands default
-to do input and output on the terminal `/dev/ttyb' and have that as
-their controlling terminal.
+directs that processes started with subsequent 'run' commands default to
+do input and output on the terminal '/dev/ttyb' and have that as their
+controlling terminal.
 
-   An explicit redirection in `run' overrides the `tty' command's
-effect on the input/output device, but not its effect on the controlling
+   An explicit redirection in 'run' overrides the 'tty' command's effect
+on the input/output device, but not its effect on the controlling
 terminal.
 
-   When you use the `tty' command or redirect input in the `run'
+   When you use the 'tty' command or redirect input in the 'run'
 command, only the input _for your program_ is affected.  The input for
-GDB still comes from your terminal.  `tty' is an alias for `set
+GDB still comes from your terminal.  'tty' is an alias for 'set
 inferior-tty'.
 
-   You can use the `show inferior-tty' command to tell GDB to display
+   You can use the 'show inferior-tty' command to tell GDB to display
 the name of the terminal that will be used for future runs of your
 program.
 
-`set inferior-tty /dev/ttyb'
-     Set the tty for the program being debugged to /dev/ttyb.
+'set inferior-tty [ TTY ]'
+     Set the tty for the program being debugged to TTY.  Omitting TTY
+     restores the default behavior, which is to use the same terminal as
+     GDB.
 
-`show inferior-tty'
+'show inferior-tty'
      Show the current tty for the program being debugged.
 
 
@@ -2097,50 +2080,50 @@ File: gdb.info,  Node: Attach,  Next: Ki
 4.7 Debugging an Already-running Process
 ========================================
 
-`attach PROCESS-ID'
+'attach PROCESS-ID'
      This command attaches to a running process--one that was started
-     outside GDB.  (`info files' shows your active targets.)  The
-     command takes as argument a process ID.  The usual way to find out
-     the PROCESS-ID of a Unix process is with the `ps' utility, or with
-     the `jobs -l' shell command.
+     outside GDB.  ('info files' shows your active targets.)  The
+     command takes as argument a process ID. The usual way to find out
+     the PROCESS-ID of a Unix process is with the 'ps' utility, or with
+     the 'jobs -l' shell command.
 
-     `attach' does not repeat if you press <RET> a second time after
+     'attach' does not repeat if you press <RET> a second time after
      executing the command.
 
-   To use `attach', your program must be running in an environment
-which supports processes; for example, `attach' does not work for
-programs on bare-board targets that lack an operating system.  You must
-also have permission to send the process a signal.
+   To use 'attach', your program must be running in an environment which
+supports processes; for example, 'attach' does not work for programs on
+bare-board targets that lack an operating system.  You must also have
+permission to send the process a signal.
 
-   When you use `attach', the debugger finds the program running in the
+   When you use 'attach', the debugger finds the program running in the
 process first by looking in the current working directory, then (if the
 program is not found) by using the source file search path (*note
 Specifying Source Directories: Source Path.).  You can also use the
-`file' command to load the program.  *Note Commands to Specify Files:
+'file' command to load the program.  *Note Commands to Specify Files:
 Files.
 
    The first thing GDB does after arranging to debug the specified
 process is to stop it.  You can examine and modify an attached process
 with all the GDB commands that are ordinarily available when you start
-processes with `run'.  You can insert breakpoints; you can step and
+processes with 'run'.  You can insert breakpoints; you can step and
 continue; you can modify storage.  If you would rather the process
-continue running, you may use the `continue' command after attaching
-GDB to the process.
+continue running, you may use the 'continue' command after attaching GDB
+to the process.
 
-`detach'
+'detach'
      When you have finished debugging the attached process, you can use
-     the `detach' command to release it from GDB control.  Detaching
-     the process continues its execution.  After the `detach' command,
-     that process and GDB become completely independent once more, and
-     you are ready to `attach' another process or start one with `run'.
-     `detach' does not repeat if you press <RET> again after executing
+     the 'detach' command to release it from GDB control.  Detaching the
+     process continues its execution.  After the 'detach' command, that
+     process and GDB become completely independent once more, and you
+     are ready to 'attach' another process or start one with 'run'.
+     'detach' does not repeat if you press <RET> again after executing
      the command.
 
    If you exit GDB while you have an attached process, you detach that
-process.  If you use the `run' command, you kill that process.  By
+process.  If you use the 'run' command, you kill that process.  By
 default, GDB asks for confirmation if you try to do either of these
 things; you can control whether or not you need to confirm by using the
-`set confirm' command (*note Optional Warnings and Messages:
+'set confirm' command (*note Optional Warnings and Messages:
 Messages/Warnings.).
 
 
@@ -2149,7 +2132,7 @@ File: gdb.info,  Node: Kill Process,  Ne
 4.8 Killing the Child Process
 =============================
 
-`kill'
+'kill'
      Kill the child process in which your program is running under GDB.
 
    This command is useful if you wish to debug a core dump instead of a
@@ -2157,16 +2140,16 @@ running process.  GDB ignores any core d
 running.
 
    On some operating systems, a program cannot be executed outside GDB
-while you have breakpoints set on it inside GDB.  You can use the
-`kill' command in this situation to permit running your program outside
-the debugger.
+while you have breakpoints set on it inside GDB.  You can use the 'kill'
+command in this situation to permit running your program outside the
+debugger.
 
-   The `kill' command is also useful if you wish to recompile and
-relink your program, since on many systems it is impossible to modify an
+   The 'kill' command is also useful if you wish to recompile and relink
+your program, since on many systems it is impossible to modify an
 executable file while it is running in a process.  In this case, when
-you next type `run', GDB notices that the file has changed, and reads
-the symbol table again (while trying to preserve your current
-breakpoint settings).
+you next type 'run', GDB notices that the file has changed, and reads
+the symbol table again (while trying to preserve your current breakpoint
+settings).
 
 
 File: gdb.info,  Node: Inferiors and Programs,  Next: Threads,  Prev: Kill Process,  Up: Running
@@ -2191,9 +2174,9 @@ its own distinct address space, although
 several inferiors running in different parts of a single address space.
 Each inferior may in turn have multiple threads running in it.
 
-   To find out what inferiors exist at any moment, use `info inferiors':
+   To find out what inferiors exist at any moment, use 'info inferiors':
 
-`info inferiors'
+'info inferiors'
      Print a list of all inferiors currently being managed by GDB.
 
      GDB displays for each inferior (in this order):
@@ -2204,8 +2187,7 @@ Each inferior may in turn have multiple 
 
        3. the name of the executable the inferior is running.
 
-
-     An asterisk `*' preceding the GDB inferior number indicates the
+     An asterisk '*' preceding the GDB inferior number indicates the
      current inferior.
 
      For example,
@@ -2215,27 +2197,33 @@ Each inferior may in turn have multiple 
        2    process 2307      hello
      * 1    process 3401      goodbye
 
-   To switch focus between inferiors, use the `inferior' command:
+   To switch focus between inferiors, use the 'inferior' command:
 
-`inferior INFNO'
+'inferior INFNO'
      Make inferior number INFNO the current inferior.  The argument
-     INFNO is the inferior number assigned by GDB, as shown in the
-     first field of the `info inferiors' display.
+     INFNO is the inferior number assigned by GDB, as shown in the first
+     field of the 'info inferiors' display.
+
+   The debugger convenience variable '$_inferior' contains the number of
+the current inferior.  You may find this useful in writing breakpoint
+conditional expressions, command scripts, and so forth.  *Note
+Convenience Variables: Convenience Vars, for general information on
+convenience variables.
 
    You can get multiple executables into a debugging session via the
-`add-inferior' and `clone-inferior' commands.  On some systems GDB can
+'add-inferior' and 'clone-inferior' commands.  On some systems GDB can
 add inferiors to the debug session automatically by following calls to
-`fork' and `exec'.  To remove inferiors from the debugging session use
-the `remove-inferiors' command.
+'fork' and 'exec'.  To remove inferiors from the debugging session use
+the 'remove-inferiors' command.
 
-`add-inferior [ -copies N ] [ -exec EXECUTABLE ]'
+'add-inferior [ -copies N ] [ -exec EXECUTABLE ]'
      Adds N inferiors to be run using EXECUTABLE as the executable; N
-     defaults to 1.  If no executable is specified, the inferiors
-     begins empty, with no program.  You can still assign or change the
-     program assigned to the inferior at any time by using the `file'
-     command with the executable name as its argument.
+     defaults to 1.  If no executable is specified, the inferiors begins
+     empty, with no program.  You can still assign or change the program
+     assigned to the inferior at any time by using the 'file' command
+     with the executable name as its argument.
 
-`clone-inferior [ -copies N ] [ INFNO ]'
+'clone-inferior [ -copies N ] [ INFNO ]'
      Adds N inferiors ready to execute the same program as inferior
      INFNO; N defaults to 1, and INFNO defaults to the number of the
      current inferior.  This is a convenient command when you want to
@@ -2254,70 +2242,68 @@ the `remove-inferiors' command.
 
      You can now simply switch focus to inferior 2 and run it.
 
-`remove-inferiors INFNO...'
+'remove-inferiors INFNO...'
      Removes the inferior or inferiors INFNO....  It is not possible to
      remove an inferior that is running with this command.  For those,
-     use the `kill' or `detach' command first.
-
+     use the 'kill' or 'detach' command first.
 
    To quit debugging one of the running inferiors that is not the
 current inferior, you can either detach from it by using the
-`detach inferior' command (allowing it to run independently), or kill it
-using the `kill inferiors' command:
+'detach inferior' command (allowing it to run independently), or kill it
+using the 'kill inferiors' command:
 
-`detach inferior INFNO...'
+'detach inferior INFNO...'
      Detach from the inferior or inferiors identified by GDB inferior
      number(s) INFNO....  Note that the inferior's entry still stays on
-     the list of inferiors shown by `info inferiors', but its
-     Description will show `<null>'.
-
-`kill inferiors INFNO...'
-     Kill the inferior or inferiors identified by GDB inferior
-     number(s) INFNO....  Note that the inferior's entry still stays on
-     the list of inferiors shown by `info inferiors', but its
-     Description will show `<null>'.
+     the list of inferiors shown by 'info inferiors', but its
+     Description will show '<null>'.
 
-   After the successful completion of a command such as `detach',
-`detach inferiors', `kill' or `kill inferiors', or after a normal
-process exit, the inferior is still valid and listed with `info
+'kill inferiors INFNO...'
+     Kill the inferior or inferiors identified by GDB inferior number(s)
+     INFNO....  Note that the inferior's entry still stays on the list
+     of inferiors shown by 'info inferiors', but its Description will
+     show '<null>'.
+
+   After the successful completion of a command such as 'detach',
+'detach inferiors', 'kill' or 'kill inferiors', or after a normal
+process exit, the inferior is still valid and listed with 'info
 inferiors', ready to be restarted.
 
-   To be notified when inferiors are started or exit under GDB's
-control use `set print inferior-events':
+   To be notified when inferiors are started or exit under GDB's control
+use 'set print inferior-events':
 
-`set print inferior-events'
-`set print inferior-events on'
-`set print inferior-events off'
-     The `set print inferior-events' command allows you to enable or
+'set print inferior-events'
+'set print inferior-events on'
+'set print inferior-events off'
+     The 'set print inferior-events' command allows you to enable or
      disable printing of messages when GDB notices that new inferiors
      have started or that inferiors have exited or have been detached.
      By default, these messages will not be printed.
 
-`show print inferior-events'
+'show print inferior-events'
      Show whether messages will be printed when GDB detects that
      inferiors have started, exited or have been detached.
 
    Many commands will work the same with multiple programs as with a
-single program: e.g., `print myglobal' will simply display the value of
-`myglobal' in the current inferior.
+single program: e.g., 'print myglobal' will simply display the value of
+'myglobal' in the current inferior.
 
    Occasionaly, when debugging GDB itself, it may be useful to get more
 info about the relationship of inferiors, programs, address spaces in a
-debug session.  You can do that with the `maint info program-spaces'
+debug session.  You can do that with the 'maint info program-spaces'
 command.
 
-`maint info program-spaces'
+'maint info program-spaces'
      Print a list of all program spaces currently being managed by GDB.
 
      GDB displays for each program space (in this order):
 
        1. the program space number assigned by GDB
 
-       2. the name of the executable loaded into the program space,
-          with e.g., the `file' command.
-
+       2. the name of the executable loaded into the program space, with
+          e.g., the 'file' command.
 
-     An asterisk `*' preceding the GDB program space number indicates
+     An asterisk '*' preceding the GDB program space number indicates
      the current program space.
 
      In addition, below each program space line, GDB prints extra
@@ -2326,15 +2312,15 @@ command.
 
           (gdb) maint info program-spaces
             Id   Executable
+          * 1    hello
             2    goodbye
                   Bound inferiors: ID 1 (process 21561)
-          * 1    hello
 
-     Here we can see that no inferior is running the program `hello',
-     while `process 21561' is running the program `goodbye'.  On some
+     Here we can see that no inferior is running the program 'hello',
+     while 'process 21561' is running the program 'goodbye'.  On some
      targets, it is possible that multiple inferiors are bound to the
      same program space.  The most common example is that of debugging
-     both the parent and child processes of a `vfork' call.  For
+     both the parent and child processes of a 'vfork' call.  For
      example,
 
           (gdb) maint info program-spaces
@@ -2343,7 +2329,7 @@ command.
                   Bound inferiors: ID 2 (process 18050), ID 1 (process 18045)
 
      Here, both inferior 2 and inferior 1 are running in the same
-     program space as a result of inferior 1 having executed a `vfork'
+     program space as a result of inferior 1 having executed a 'vfork'
      call.
 
 
@@ -2352,45 +2338,29 @@ File: gdb.info,  Node: Threads,  Next: F
 4.10 Debugging Programs with Multiple Threads
 =============================================
 
-In some operating systems, such as HP-UX and Solaris, a single program
-may have more than one "thread" of execution.  The precise semantics of
-threads differ from one operating system to another, but in general the
-threads of a single program are akin to multiple processes--except that
-they share one address space (that is, they can all examine and modify
-the same variables).  On the other hand, each thread has its own
-registers and execution stack, and perhaps private memory.
+In some operating systems, such as GNU/Linux and Solaris, a single
+program may have more than one "thread" of execution.  The precise
+semantics of threads differ from one operating system to another, but in
+general the threads of a single program are akin to multiple
+processes--except that they share one address space (that is, they can
+all examine and modify the same variables).  On the other hand, each
+thread has its own registers and execution stack, and perhaps private
+memory.
 
    GDB provides these facilities for debugging multi-thread programs:
 
    * automatic notification of new threads
-
-   * `thread THREADNO', a command to switch among threads
-
-   * `info threads', a command to inquire about existing threads
-
-   * `thread apply [THREADNO] [ALL] ARGS', a command to apply a command
-     to a list of threads
-
+   * 'thread THREAD-ID', a command to switch among threads
+   * 'info threads', a command to inquire about existing threads
+   * 'thread apply [THREAD-ID-LIST] [ALL] ARGS', a command to apply a
+     command to a list of threads
    * thread-specific breakpoints
-
-   * `set print thread-events', which controls printing of messages on
+   * 'set print thread-events', which controls printing of messages on
      thread start and exit.
-
-   * `set libthread-db-search-path PATH', which lets the user specify
-     which `libthread_db' to use if the default choice isn't compatible
+   * 'set libthread-db-search-path PATH', which lets the user specify
+     which 'libthread_db' to use if the default choice isn't compatible
      with the program.
 
-     _Warning:_ These facilities are not yet available on every GDB
-     configuration where the operating system supports threads.  If
-     your GDB does not support threads, these commands have no effect.
-     For example, a system without thread support shows no output from
-     `info threads', and always rejects the `thread' command, like this:
-
-          (gdb) info threads
-          (gdb) thread 1
-          Thread ID 1 not known.  Use the "info threads" command to
-          see the IDs of currently known threads.
-
    The GDB thread debugging facility allows you to observe all threads
 while your program runs--but whenever GDB takes control, one thread in
 particular is always the focus of debugging.  This thread is called the
@@ -2398,103 +2368,182 @@ particular is always the focus of debugg
 perspective of the current thread.
 
    Whenever GDB detects a new thread in your program, it displays the
-target system's identification for the thread with a message in the
-form `[New SYSTAG]', where SYSTAG is a thread identifier whose form
-varies depending on the particular system.  For example, on GNU/Linux,
-you might see
+target system's identification for the thread with a message in the form
+'[New SYSTAG]', where SYSTAG is a thread identifier whose form varies
+depending on the particular system.  For example, on GNU/Linux, you
+might see
 
      [New Thread 0x41e02940 (LWP 25582)]
 
-when GDB notices a new thread.  In contrast, on an SGI system, the
-SYSTAG is simply something like `process 368', with no further
+when GDB notices a new thread.  In contrast, on other systems, the
+SYSTAG is simply something like 'process 368', with no further
 qualifier.
 
-   For debugging purposes, GDB associates its own thread number--always
-a single integer--with each thread in your program.
-
-`info threads [ID...]'
-     Display a summary of all threads currently in your program.
-     Optional argument ID... is one or more thread ids separated by
-     spaces, and means to print information only about the specified
-     thread or threads.  GDB displays for each thread (in this order):
+   For debugging purposes, GDB associates its own thread number --always
+a single integer--with each thread of an inferior.  This number is
+unique between all threads of an inferior, but not unique between
+threads of different inferiors.
+
+   You can refer to a given thread in an inferior using the qualified
+INFERIOR-NUM.THREAD-NUM syntax, also known as "qualified thread ID",
+with INFERIOR-NUM being the inferior number and THREAD-NUM being the
+thread number of the given inferior.  For example, thread '2.3' refers
+to thread number 3 of inferior 2.  If you omit INFERIOR-NUM (e.g.,
+'thread 3'), then GDB infers you're referring to a thread of the current
+inferior.
+
+   Until you create a second inferior, GDB does not show the
+INFERIOR-NUM part of thread IDs, even though you can always use the full
+INFERIOR-NUM.THREAD-NUM form to refer to threads of inferior 1, the
+initial inferior.
+
+   Some commands accept a space-separated "thread ID list" as argument.
+A list element can be:
+
+  1. A thread ID as shown in the first field of the 'info threads'
+     display, with or without an inferior qualifier.  E.g., '2.1' or
+     '1'.
+
+  2. A range of thread numbers, again with or without an inferior
+     qualifier, as in INF.THR1-THR2 or THR1-THR2.  E.g., '1.2-4' or
+     '2-4'.
+
+  3. All threads of an inferior, specified with a star wildcard, with or
+     without an inferior qualifier, as in INF.'*' (e.g., '1.*') or '*'.
+     The former refers to all threads of the given inferior, and the
+     latter form without an inferior qualifier refers to all threads of
+     the current inferior.
+
+   For example, if the current inferior is 1, and inferior 7 has one
+thread with ID 7.1, the thread list '1 2-3 4.5 6.7-9 7.*' includes
+threads 1 to 3 of inferior 1, thread 5 of inferior 4, threads 7 to 9 of
+inferior 6 and all threads of inferior 7.  That is, in expanded
+qualified form, the same as '1.1 1.2 1.3 4.5 6.7 6.8 6.9 7.1'.
+
+   In addition to a _per-inferior_ number, each thread is also assigned
+a unique _global_ number, also known as "global thread ID", a single
+integer.  Unlike the thread number component of the thread ID, no two
+threads have the same global ID, even when you're debugging multiple
+inferiors.
+
+   From GDB's perspective, a process always has at least one thread.  In
+other words, GDB assigns a thread number to the program's "main thread"
+even if the program is not multi-threaded.
+
+   The debugger convenience variables '$_thread' and '$_gthread'
+contain, respectively, the per-inferior thread number and the global
+thread number of the current thread.  You may find this useful in
+writing breakpoint conditional expressions, command scripts, and so
+forth.  *Note Convenience Variables: Convenience Vars, for general
+information on convenience variables.
+
+   If GDB detects the program is multi-threaded, it augments the usual
+message about stopping at a breakpoint with the ID and name of the
+thread that hit the breakpoint.
+
+     Thread 2 "client" hit Breakpoint 1, send_message () at client.c:68
+
+   Likewise when the program receives a signal:
+
+     Thread 1 "main" received signal SIGINT, Interrupt.
+
+'info threads [THREAD-ID-LIST]'
+
+     Display information about one or more threads.  With no arguments
+     displays information about all threads.  You can specify the list
+     of threads that you want to display using the thread ID list syntax
+     (*note thread ID lists::).
+
+     GDB displays for each thread (in this order):
+
+       1. the per-inferior thread number assigned by GDB
 
-       1. the thread number assigned by GDB
+       2. the global thread number assigned by GDB, if the '-gid' option
+          was specified
 
-       2. the target system's thread identifier (SYSTAG)
+       3. the target system's thread identifier (SYSTAG)
 
-       3. the thread's name, if one is known.  A thread can either be
-          named by the user (see `thread name', below), or, in some
+       4. the thread's name, if one is known.  A thread can either be
+          named by the user (see 'thread name', below), or, in some
           cases, by the program itself.
 
-       4. the current stack frame summary for that thread
+       5. the current stack frame summary for that thread
 
-     An asterisk `*' to the left of the GDB thread number indicates the
+     An asterisk '*' to the left of the GDB thread number indicates the
      current thread.
 
      For example,
 
      (gdb) info threads
        Id   Target Id         Frame
-       3    process 35 thread 27  0x34e5 in sigpause ()
-       2    process 35 thread 23  0x34e5 in sigpause ()
      * 1    process 35 thread 13  main (argc=1, argv=0x7ffffff8)
+       2    process 35 thread 23  0x34e5 in sigpause ()
+       3    process 35 thread 27  0x34e5 in sigpause ()
          at threadtest.c:68
 
+   If you're debugging multiple inferiors, GDB displays thread IDs using
+the qualified INFERIOR-NUM.THREAD-NUM format.  Otherwise, only
+THREAD-NUM is shown.
+
+   If you specify the '-gid' option, GDB displays a column indicating
+each thread's global thread ID:
+
+     (gdb) info threads
+       Id   GId  Target Id             Frame
+       1.1  1    process 35 thread 13  main (argc=1, argv=0x7ffffff8)
+       1.2  3    process 35 thread 23  0x34e5 in sigpause ()
+       1.3  4    process 35 thread 27  0x34e5 in sigpause ()
+     * 2.1  2    process 65 thread 1   main (argc=1, argv=0x7ffffff8)
+
    On Solaris, you can display more information about user threads with
 a Solaris-specific command:
 
-`maint info sol-threads'
+'maint info sol-threads'
      Display info on Solaris user threads.
 
-`thread THREADNO'
-     Make thread number THREADNO the current thread.  The command
-     argument THREADNO is the internal GDB thread number, as shown in
-     the first field of the `info threads' display.  GDB responds by
-     displaying the system identifier of the thread you selected, and
-     its current stack frame summary:
+'thread THREAD-ID'
+     Make thread ID THREAD-ID the current thread.  The command argument
+     THREAD-ID is the GDB thread ID, as shown in the first field of the
+     'info threads' display, with or without an inferior qualifier
+     (e.g., '2.1' or '1').
+
+     GDB responds by displaying the system identifier of the thread you
+     selected, and its current stack frame summary:
 
           (gdb) thread 2
           [Switching to thread 2 (Thread 0xb7fdab70 (LWP 12747))]
           #0  some_function (ignore=0x0) at example.c:8
           8	    printf ("hello\n");
 
-     As with the `[New ...]' message, the form of the text after
-     `Switching to' depends on your system's conventions for identifying
+     As with the '[New ...]' message, the form of the text after
+     'Switching to' depends on your system's conventions for identifying
      threads.
 
-     The debugger convenience variable `$_thread' contains the number
-     of the current thread.  You may find this useful in writing
-     breakpoint conditional expressions, command scripts, and so forth.
-     See *Note Convenience Variables: Convenience Vars, for general
-     information on convenience variables.
-
-`thread apply [THREADNO | all [-ascending]] COMMAND'
-     The `thread apply' command allows you to apply the named COMMAND
-     to one or more threads.  Specify the numbers of the threads that
-     you want affected with the command argument THREADNO.  It can be a
-     single thread number, one of the numbers shown in the first field
-     of the `info threads' display; or it could be a range of thread
-     numbers, as in `2-4'.  To apply a command to all threads in
-     descending order, type `thread apply all COMMAND'.  To apply a
-     command to all threads in ascending order, type `thread apply all
-     -ascending COMMAND'.
+'thread apply [THREAD-ID-LIST | all [-ascending]] COMMAND'
+     The 'thread apply' command allows you to apply the named COMMAND to
+     one or more threads.  Specify the threads that you want affected
+     using the thread ID list syntax (*note thread ID lists::), or
+     specify 'all' to apply to all threads.  To apply a command to all
+     threads in descending order, type 'thread apply all COMMAND'.  To
+     apply a command to all threads in ascending order, type 'thread
+     apply all -ascending COMMAND'.
 
-`thread name [NAME]'
+'thread name [NAME]'
      This command assigns a name to the current thread.  If no argument
      is given, any existing user-specified name is removed.  The thread
-     name appears in the `info threads' display.
+     name appears in the 'info threads' display.
 
      On some systems, such as GNU/Linux, GDB is able to determine the
-     name of the thread as given by the OS.  On these systems, a name
-     specified with `thread name' will override the system-give name,
+     name of the thread as given by the OS. On these systems, a name
+     specified with 'thread name' will override the system-give name,
      and removing the user-specified name will cause GDB to once again
      display the system-specified name.
 
-`thread find [REGEXP]'
+'thread find [REGEXP]'
      Search for and display thread ids whose name or SYSTAG matches the
      supplied regular expression.
 
-     As well as being the complement to the `thread name' command, this
+     As well as being the complement to the 'thread name' command, this
      command also allows you to identify a thread by its target SYSTAG.
      For instance, on GNU/Linux, the target SYSTAG is the LWP id.
 
@@ -2504,17 +2553,17 @@ a Solaris-specific command:
             Id   Target Id         Frame
             4    Thread 0x41e02940 (LWP 26688) 0x00000031ca6cd372 in select ()
 
-`set print thread-events'
-`set print thread-events on'
-`set print thread-events off'
-     The `set print thread-events' command allows you to enable or
+'set print thread-events'
+'set print thread-events on'
+'set print thread-events off'
+     The 'set print thread-events' command allows you to enable or
      disable printing of messages when GDB notices that new threads have
      started or that threads have exited.  By default, these messages
      will be printed if detection of these events is supported by the
      target.  Note that these messages cannot be disabled on all
      targets.
 
-`show print thread-events'
+'show print thread-events'
      Show whether messages will be printed when GDB detects that threads
      have started and exited.
 
@@ -2525,49 +2574,48 @@ with multiple threads.
    *Note Setting Watchpoints: Set Watchpoints, for information about
 watchpoints in programs with multiple threads.
 
-`set libthread-db-search-path [PATH]'
+'set libthread-db-search-path [PATH]'
      If this variable is set, PATH is a colon-separated list of
-     directories GDB will use to search for `libthread_db'.  If you
-     omit PATH, `libthread-db-search-path' will be reset to its default
-     value (`$sdir:$pdir' on GNU/Linux and Solaris systems).
-     Internally, the default value comes from the
-     `LIBTHREAD_DB_SEARCH_PATH' macro.
+     directories GDB will use to search for 'libthread_db'.  If you omit
+     PATH, 'libthread-db-search-path' will be reset to its default value
+     ('$sdir:$pdir' on GNU/Linux and Solaris systems).  Internally, the
+     default value comes from the 'LIBTHREAD_DB_SEARCH_PATH' macro.
 
      On GNU/Linux and Solaris systems, GDB uses a "helper"
-     `libthread_db' library to obtain information about threads in the
-     inferior process.  GDB will use `libthread-db-search-path' to find
-     `libthread_db'.  GDB also consults first if inferior specific
-     thread debugging library loading is enabled by `set auto-load
+     'libthread_db' library to obtain information about threads in the
+     inferior process.  GDB will use 'libthread-db-search-path' to find
+     'libthread_db'.  GDB also consults first if inferior specific
+     thread debugging library loading is enabled by 'set auto-load
      libthread-db' (*note libthread_db.so.1 file::).
 
-     A special entry `$sdir' for `libthread-db-search-path' refers to
+     A special entry '$sdir' for 'libthread-db-search-path' refers to
      the default system directories that are normally searched for
-     loading shared libraries.  The `$sdir' entry is the only kind not
-     needing to be enabled by `set auto-load libthread-db' (*note
+     loading shared libraries.  The '$sdir' entry is the only kind not
+     needing to be enabled by 'set auto-load libthread-db' (*note
      libthread_db.so.1 file::).
 
-     A special entry `$pdir' for `libthread-db-search-path' refers to
-     the directory from which `libpthread' was loaded in the inferior
+     A special entry '$pdir' for 'libthread-db-search-path' refers to
+     the directory from which 'libpthread' was loaded in the inferior
      process.
 
-     For any `libthread_db' library GDB finds in above directories, GDB
+     For any 'libthread_db' library GDB finds in above directories, GDB
      attempts to initialize it with the current inferior process.  If
      this initialization fails (which could happen because of a version
-     mismatch between `libthread_db' and `libpthread'), GDB will unload
-     `libthread_db', and continue with the next directory.  If none of
-     `libthread_db' libraries initialize successfully, GDB will issue a
+     mismatch between 'libthread_db' and 'libpthread'), GDB will unload
+     'libthread_db', and continue with the next directory.  If none of
+     'libthread_db' libraries initialize successfully, GDB will issue a
      warning and thread debugging will be disabled.
 
-     Setting `libthread-db-search-path' is currently implemented only
-     on some platforms.
+     Setting 'libthread-db-search-path' is currently implemented only on
+     some platforms.
 
-`show libthread-db-search-path'
+'show libthread-db-search-path'
      Display current libthread_db search path.
 
-`set debug libthread-db'
-`show debug libthread-db'
-     Turns on or off display of `libthread_db'-related events.  Use `1'
-     to enable, `0' to disable.
+'set debug libthread-db'
+'show debug libthread-db'
+     Turns on or off display of 'libthread_db'-related events.  Use '1'
+     to enable, '0' to disable.
 
 
 File: gdb.info,  Node: Forks,  Next: Checkpoint/Restart,  Prev: Threads,  Up: Running
@@ -2575,114 +2623,114 @@ File: gdb.info,  Node: Forks,  Next: Che
 4.11 Debugging Forks
 ====================
 
-On most systems, GDB has no special support for debugging programs
-which create additional processes using the `fork' function.  When a
-program forks, GDB will continue to debug the parent process and the
-child process will run unimpeded.  If you have set a breakpoint in any
-code which the child then executes, the child will get a `SIGTRAP'
-signal which (unless it catches the signal) will cause it to terminate.
+On most systems, GDB has no special support for debugging programs which
+create additional processes using the 'fork' function.  When a program
+forks, GDB will continue to debug the parent process and the child
+process will run unimpeded.  If you have set a breakpoint in any code
+which the child then executes, the child will get a 'SIGTRAP' signal
+which (unless it catches the signal) will cause it to terminate.
 
    However, if you want to debug the child process there is a workaround
-which isn't too painful.  Put a call to `sleep' in the code which the
+which isn't too painful.  Put a call to 'sleep' in the code which the
 child process executes after the fork.  It may be useful to sleep only
 if a certain environment variable is set, or a certain file exists, so
 that the delay need not occur when you don't want to run GDB on the
-child.  While the child is sleeping, use the `ps' program to get its
-process ID.  Then tell GDB (a new invocation of GDB if you are also
+child.  While the child is sleeping, use the 'ps' program to get its
+process ID. Then tell GDB (a new invocation of GDB if you are also
 debugging the parent process) to attach to the child process (*note
-Attach::).  From that point on you can debug the child process just
-like any other process which you attached to.
+Attach::).  From that point on you can debug the child process just like
+any other process which you attached to.
 
    On some systems, GDB provides support for debugging programs that
-create additional processes using the `fork' or `vfork' functions.
-Currently, the only platforms with this feature are HP-UX (11.x and
-later only?) and GNU/Linux (kernel version 2.5.60 and later).
-
-   The fork debugging commands are supported in both native mode and
-when connected to `gdbserver' using `target extended-remote'.
+create additional processes using the 'fork' or 'vfork' functions.  On
+GNU/Linux platforms, this feature is supported with kernel version
+2.5.46 and later.
+
+   The fork debugging commands are supported in native mode and when
+connected to 'gdbserver' in either 'target remote' mode or 'target
+extended-remote' mode.
 
    By default, when a program forks, GDB will continue to debug the
 parent process and the child process will run unimpeded.
 
    If you want to follow the child process instead of the parent
-process, use the command `set follow-fork-mode'.
+process, use the command 'set follow-fork-mode'.
 
-`set follow-fork-mode MODE'
-     Set the debugger response to a program call of `fork' or `vfork'.
-     A call to `fork' or `vfork' creates a new process.  The MODE
+'set follow-fork-mode MODE'
+     Set the debugger response to a program call of 'fork' or 'vfork'.
+     A call to 'fork' or 'vfork' creates a new process.  The MODE
      argument can be:
 
-    `parent'
+     'parent'
           The original process is debugged after a fork.  The child
           process runs unimpeded.  This is the default.
 
-    `child'
+     'child'
           The new process is debugged after a fork.  The parent process
           runs unimpeded.
 
-
-`show follow-fork-mode'
-     Display the current debugger response to a `fork' or `vfork' call.
+'show follow-fork-mode'
+     Display the current debugger response to a 'fork' or 'vfork' call.
 
    On Linux, if you want to debug both the parent and child processes,
-use the command `set detach-on-fork'.
+use the command 'set detach-on-fork'.
 
-`set detach-on-fork MODE'
+'set detach-on-fork MODE'
      Tells gdb whether to detach one of the processes after a fork, or
      retain debugger control over them both.
 
-    `on'
+     'on'
           The child process (or parent process, depending on the value
-          of `follow-fork-mode') will be detached and allowed to run
+          of 'follow-fork-mode') will be detached and allowed to run
           independently.  This is the default.
 
-    `off'
+     'off'
           Both processes will be held under the control of GDB.  One
           process (child or parent, depending on the value of
-          `follow-fork-mode') is debugged as usual, while the other is
+          'follow-fork-mode') is debugged as usual, while the other is
           held suspended.
 
-
-`show detach-on-fork'
+'show detach-on-fork'
      Show whether detach-on-fork mode is on/off.
 
-   If you choose to set `detach-on-fork' mode off, then GDB will retain
+   If you choose to set 'detach-on-fork' mode off, then GDB will retain
 control of all forked processes (including nested forks).  You can list
 the forked processes under the control of GDB by using the
-`info inferiors' command, and switch from one fork to another by using
-the `inferior' command (*note Debugging Multiple Inferiors and
-Programs: Inferiors and Programs.).
+'info inferiors' command, and switch from one fork to another by using
+the 'inferior' command (*note Debugging Multiple Inferiors and Programs:
+Inferiors and Programs.).
 
    To quit debugging one of the forked processes, you can either detach
-from it by using the `detach inferiors' command (allowing it to run
-independently), or kill it using the `kill inferiors' command.  *Note
+from it by using the 'detach inferiors' command (allowing it to run
+independently), or kill it using the 'kill inferiors' command.  *Note
 Debugging Multiple Inferiors and Programs: Inferiors and Programs.
 
-   If you ask to debug a child process and a `vfork' is followed by an
-`exec', GDB executes the new target up to the first breakpoint in the
-new target.  If you have a breakpoint set on `main' in your original
-program, the breakpoint will also be set on the child process's `main'.
+   If you ask to debug a child process and a 'vfork' is followed by an
+'exec', GDB executes the new target up to the first breakpoint in the
+new target.  If you have a breakpoint set on 'main' in your original
+program, the breakpoint will also be set on the child process's 'main'.
 
-   On some systems, when a child process is spawned by `vfork', you
-cannot debug the child or parent until an `exec' call completes.
+   On some systems, when a child process is spawned by 'vfork', you
+cannot debug the child or parent until an 'exec' call completes.
 
-   If you issue a `run' command to GDB after an `exec' call executes,
-the new target restarts.  To restart the parent process, use the `file'
+   If you issue a 'run' command to GDB after an 'exec' call executes,
+the new target restarts.  To restart the parent process, use the 'file'
 command with the parent executable name as its argument.  By default,
-after an `exec' call executes, GDB discards the symbols of the previous
+after an 'exec' call executes, GDB discards the symbols of the previous
 executable image.  You can change this behaviour with the
-`set follow-exec-mode' command.
+'set follow-exec-mode' command.
+
+'set follow-exec-mode MODE'
 
-`set follow-exec-mode MODE'
-     Set debugger response to a program call of `exec'.  An `exec' call
+     Set debugger response to a program call of 'exec'.  An 'exec' call
      replaces the program image of a process.
 
-     `follow-exec-mode' can be:
+     'follow-exec-mode' can be:
 
-    `new'
-          GDB creates a new inferior and rebinds the process to this
-          new inferior.  The program the process was running before the
-          `exec' call can be restarted afterwards by restarting the
+     'new'
+          GDB creates a new inferior and rebinds the process to this new
+          inferior.  The program the process was running before the
+          'exec' call can be restarted afterwards by restarting the
           original inferior.
 
           For example:
@@ -2696,15 +2744,15 @@ executable image.  You can change this b
                Program exited normally.
                (gdb) info inferiors
                  Id   Description   Executable
-               * 2    <null>        prog2
                  1    <null>        prog1
+               * 2    <null>        prog2
 
-    `same'
+     'same'
           GDB keeps the process bound to the same inferior.  The new
           executable image replaces the previous executable loaded in
-          the inferior.  Restarting the inferior after the `exec' call,
-          with e.g., the `run' command, restarts the executable the
-          process was running after the `exec' call.  This is the
+          the inferior.  Restarting the inferior after the 'exec' call,
+          with e.g., the 'run' command, restarts the executable the
+          process was running after the 'exec' call.  This is the
           default mode.
 
           For example:
@@ -2719,9 +2767,11 @@ executable image.  You can change this b
                  Id   Description   Executable
                * 1    <null>        prog2
 
+   'follow-exec-mode' is supported in native mode and 'target
+extended-remote' mode.
 
-   You can use the `catch' command to make GDB stop whenever a `fork',
-`vfork', or `exec' call is made.  *Note Setting Catchpoints: Set
+   You can use the 'catch' command to make GDB stop whenever a 'fork',
+'vfork', or 'exec' call is made.  *Note Setting Catchpoints: Set
 Catchpoints.
 
 
@@ -2734,10 +2784,10 @@ On certain operating systems(1), GDB is 
 program's state, called a "checkpoint", and come back to it later.
 
    Returning to a checkpoint effectively undoes everything that has
-happened in the program since the `checkpoint' was saved.  This
-includes changes in memory, registers, and even (within some limits)
-system state.  Effectively, it is like going back in time to the moment
-when the checkpoint was saved.
+happened in the program since the 'checkpoint' was saved.  This includes
+changes in memory, registers, and even (within some limits) system
+state.  Effectively, it is like going back in time to the moment when
+the checkpoint was saved.
 
    Thus, if you're stepping thru a program and you think you're getting
 close to the point where things go wrong, you can save a checkpoint.
@@ -2748,42 +2798,38 @@ just go back to the checkpoint and start
    This can be especially useful if it takes a lot of time or steps to
 reach the point where you think the bug occurs.
 
-   To use the `checkpoint'/`restart' method of debugging:
+   To use the 'checkpoint'/'restart' method of debugging:
 
-`checkpoint'
+'checkpoint'
      Save a snapshot of the debugged program's current execution state.
-     The `checkpoint' command takes no arguments, but each checkpoint
-     is assigned a small integer id, similar to a breakpoint id.
+     The 'checkpoint' command takes no arguments, but each checkpoint is
+     assigned a small integer id, similar to a breakpoint id.
 
-`info checkpoints'
+'info checkpoints'
      List the checkpoints that have been saved in the current debugging
      session.  For each checkpoint, the following information will be
      listed:
 
-    `Checkpoint ID'
+     'Checkpoint ID'
+     'Process ID'
+     'Code Address'
+     'Source line, or label'
 
-    `Process ID'
-
-    `Code Address'
-
-    `Source line, or label'
-
-`restart CHECKPOINT-ID'
+'restart CHECKPOINT-ID'
      Restore the program state that was saved as checkpoint number
-     CHECKPOINT-ID.  All program variables, registers, stack frames
-     etc.  will be returned to the values that they had when the
-     checkpoint was saved.  In essence, gdb will "wind back the clock"
-     to the point in time when the checkpoint was saved.
-
-     Note that breakpoints, GDB variables, command history etc.  are
-     not affected by restoring a checkpoint.  In general, a checkpoint
-     only restores things that reside in the program being debugged,
-     not in the debugger.
+     CHECKPOINT-ID.  All program variables, registers, stack frames etc.
+     will be returned to the values that they had when the checkpoint
+     was saved.  In essence, gdb will "wind back the clock" to the point
+     in time when the checkpoint was saved.
+
+     Note that breakpoints, GDB variables, command history etc.  are not
+     affected by restoring a checkpoint.  In general, a checkpoint only
+     restores things that reside in the program being debugged, not in
+     the debugger.
 
-`delete checkpoint CHECKPOINT-ID'
+'delete checkpoint CHECKPOINT-ID'
      Delete the previously-saved checkpoint identified by CHECKPOINT-ID.
 
-
    Returning to a previously saved checkpoint will restore the user
 state of the program being debugged, plus a significant subset of the
 system (OS) state, including file pointers.  It won't "un-write" data
@@ -2793,9 +2839,9 @@ files opened in read mode, the pointer w
 previously read data can be read again.
 
    Of course, characters that have been sent to a printer (or other
-external device) cannot be "snatched back", and characters received
-from eg. a serial device can be removed from internal program buffers,
-but they cannot be "pushed back" into the serial pipeline, ready to be
+external device) cannot be "snatched back", and characters received from
+eg. a serial device can be removed from internal program buffers, but
+they cannot be "pushed back" into the serial pipeline, ready to be
 received again.  Similarly, the actual contents of files that have been
 changed cannot be restored (at this time).
 
@@ -2806,10 +2852,9 @@ different execution path this time.
 
    Finally, there is one bit of internal program state that will be
 different when you return to a checkpoint -- the program's process id.
-Each checkpoint will have a unique process id (or PID), and each will
-be different from the program's original PID.  If your program has
-saved a local copy of its process id, this could potentially pose a
-problem.
+Each checkpoint will have a unique process id (or PID), and each will be
+different from the program's original PID.  If your program has saved a
+local copy of its process id, this could potentially pose a problem.
 
 4.12.1 A Non-obvious Benefit of Using Checkpoints
 -------------------------------------------------
@@ -2823,8 +2868,8 @@ location of a symbol will change from on
    A checkpoint, however, is an _identical_ copy of a process.
 Therefore if you create a checkpoint at (eg.) the start of main, and
 simply return to that checkpoint instead of restarting the process, you
-can avoid the effects of address randomization and your symbols will
-all stay in the same place.
+can avoid the effects of address randomization and your symbols will all
+stay in the same place.
 
    ---------- Footnotes ----------
 
@@ -2840,15 +2885,15 @@ The principal purposes of using a debugg
 program before it terminates; or so that, if your program runs into
 trouble, you can investigate and find out why.
 
-   Inside GDB, your program may stop for any of several reasons, such
-as a signal, a breakpoint, or reaching a new line after a GDB command
-such as `step'.  You may then examine and change variables, set new
+   Inside GDB, your program may stop for any of several reasons, such as
+a signal, a breakpoint, or reaching a new line after a GDB command such
+as 'step'.  You may then examine and change variables, set new
 breakpoints or remove old ones, and then continue execution.  Usually,
 the messages shown by GDB provide ample explanation of the status of
 your program--but you can also explicitly request this information at
 any time.
 
-`info program'
+'info program'
      Display information about the status of your program: whether it is
      running or not, what process it is, and why it stopped.
 
@@ -2870,21 +2915,18 @@ File: gdb.info,  Node: Breakpoints,  Nex
 A "breakpoint" makes your program stop whenever a certain point in the
 program is reached.  For each breakpoint, you can add conditions to
 control in finer detail whether your program stops.  You can set
-breakpoints with the `break' command and its variants (*note Setting
+breakpoints with the 'break' command and its variants (*note Setting
 Breakpoints: Set Breaks.), to specify the place where your program
 should stop by line number, function name or exact address in the
 program.
 
    On some systems, you can set breakpoints in shared libraries before
-the executable is run.  There is a minor limitation on HP-UX systems:
-you must wait until the executable is run in order to set breakpoints
-in shared library routines that are not called directly by the program
-(for example, routines that are arguments in a `pthread_create' call).
+the executable is run.
 
    A "watchpoint" is a special breakpoint that stops your program when
 the value of an expression changes.  The expression may be a value of a
 variable, or it could involve values of one or more variables combined
-by operators, such as `a + b'.  This is sometimes called "data
+by operators, such as 'a + b'.  This is sometimes called "data
 breakpoints".  You must use a different command to set watchpoints
 (*note Setting Watchpoints: Set Watchpoints.), but aside from that, you
 can manage a watchpoint like any other breakpoint: you enable, disable,
@@ -2900,7 +2942,7 @@ exception or the loading of a library.  
 different command to set a catchpoint (*note Setting Catchpoints: Set
 Catchpoints.), but aside from that, you can manage a catchpoint like any
 other breakpoint.  (To stop when your program receives a signal, use the
-`handle' command; see *note Signals: Signals.)
+'handle' command; see *note Signals: Signals.)
 
    GDB assigns a number to each breakpoint, watchpoint, or catchpoint
 when you create it; these numbers are successive integers starting with
@@ -2909,11 +2951,11 @@ breakpoints you use the breakpoint numbe
 want to change.  Each breakpoint may be "enabled" or "disabled"; if
 disabled, it has no effect on your program until you enable it again.
 
-   Some GDB commands accept a range of breakpoints on which to operate.
-A breakpoint range is either a single breakpoint number, like `5', or
-two such numbers, in increasing order, separated by a hyphen, like
-`5-7'.  When a breakpoint range is given to a command, all breakpoints
-in that range are operated on.
+   Some GDB commands accept a space-separated list of breakpoints on
+which to operate.  A list element can be either a single breakpoint
+number, like '5', or a range of such numbers, like '5-7'.  When a
+breakpoint list is given to a command, all breakpoints in that list are
+operated on.
 
 * Menu:
 
@@ -2927,8 +2969,8 @@ in that range are operated on.
 * Dynamic Printf::              Dynamic printf
 * Save Breakpoints::            How to save breakpoints in a file
 * Static Probe Points::         Listing static probe points
-* Error in Breakpoints::        ``Cannot insert breakpoints''
-* Breakpoint-related Warnings:: ``Breakpoint address adjusted...''
+* Error in Breakpoints::        "Cannot insert breakpoints"
+* Breakpoint-related Warnings:: "Breakpoint address adjusted..."
 
 
 File: gdb.info,  Node: Set Breaks,  Next: Set Watchpoints,  Up: Breakpoints
@@ -2936,13 +2978,13 @@ File: gdb.info,  Node: Set Breaks,  Next
 5.1.1 Setting Breakpoints
 -------------------------
 
-Breakpoints are set with the `break' command (abbreviated `b').  The
-debugger convenience variable `$bpnum' records the number of the
+Breakpoints are set with the 'break' command (abbreviated 'b').  The
+debugger convenience variable '$bpnum' records the number of the
 breakpoint you've set most recently; see *note Convenience Variables:
 Convenience Vars, for a discussion of what you can do with convenience
 variables.
 
-`break LOCATION'
+'break LOCATION'
      Set a breakpoint at the given LOCATION, which can specify a
      function name, a line number, or an address of an instruction.
      (*Note Specify Location::, for a list of all the possible ways to
@@ -2959,96 +3001,94 @@ variables.
      Breakpoints::) or a specific task (*note Ada Tasks::) hits that
      breakpoint.
 
-`break'
-     When called without any arguments, `break' sets a breakpoint at
-     the next instruction to be executed in the selected stack frame
-     (*note Examining the Stack: Stack.).  In any selected frame but the
+'break'
+     When called without any arguments, 'break' sets a breakpoint at the
+     next instruction to be executed in the selected stack frame (*note
+     Examining the Stack: Stack.).  In any selected frame but the
      innermost, this makes your program stop as soon as control returns
-     to that frame.  This is similar to the effect of a `finish'
-     command in the frame inside the selected frame--except that
-     `finish' does not leave an active breakpoint.  If you use `break'
-     without an argument in the innermost frame, GDB stops the next
-     time it reaches the current location; this may be useful inside
-     loops.
+     to that frame.  This is similar to the effect of a 'finish' command
+     in the frame inside the selected frame--except that 'finish' does
+     not leave an active breakpoint.  If you use 'break' without an
+     argument in the innermost frame, GDB stops the next time it reaches
+     the current location; this may be useful inside loops.
 
      GDB normally ignores breakpoints when it resumes execution, until
-     at least one instruction has been executed.  If it did not do
-     this, you would be unable to proceed past a breakpoint without
-     first disabling the breakpoint.  This rule applies whether or not
-     the breakpoint already existed when your program stopped.
+     at least one instruction has been executed.  If it did not do this,
+     you would be unable to proceed past a breakpoint without first
+     disabling the breakpoint.  This rule applies whether or not the
+     breakpoint already existed when your program stopped.
 
-`break ... if COND'
+'break ... if COND'
      Set a breakpoint with condition COND; evaluate the expression COND
      each time the breakpoint is reached, and stop only if the value is
-     nonzero--that is, if COND evaluates as true.  `...' stands for one
+     nonzero--that is, if COND evaluates as true.  '...' stands for one
      of the possible arguments described above (or no argument)
-     specifying where to break.  *Note Break Conditions: Conditions,
-     for more information on breakpoint conditions.
+     specifying where to break.  *Note Break Conditions: Conditions, for
+     more information on breakpoint conditions.
 
-`tbreak ARGS'
+'tbreak ARGS'
      Set a breakpoint enabled only for one stop.  The ARGS are the same
-     as for the `break' command, and the breakpoint is set in the same
+     as for the 'break' command, and the breakpoint is set in the same
      way, but the breakpoint is automatically deleted after the first
      time your program stops there.  *Note Disabling Breakpoints:
      Disabling.
 
-`hbreak ARGS'
+'hbreak ARGS'
      Set a hardware-assisted breakpoint.  The ARGS are the same as for
-     the `break' command and the breakpoint is set in the same way, but
+     the 'break' command and the breakpoint is set in the same way, but
      the breakpoint requires hardware support and some target hardware
      may not have this support.  The main purpose of this is EPROM/ROM
      code debugging, so you can set a breakpoint at an instruction
      without changing the instruction.  This can be used with the new
      trap-generation provided by SPARClite DSU and most x86-based
-     targets.  These targets will generate traps when a program
-     accesses some data or instruction address that is assigned to the
-     debug registers.  However the hardware breakpoint registers can
-     take a limited number of breakpoints.  For example, on the DSU,
-     only two data breakpoints can be set at a time, and GDB will
-     reject this command if more than two are used.  Delete or disable
-     unused hardware breakpoints before setting new ones (*note
-     Disabling Breakpoints: Disabling.).  *Note Break Conditions:
-     Conditions.  For remote targets, you can restrict the number of
-     hardware breakpoints GDB will use, see *note set remote
-     hardware-breakpoint-limit::.
+     targets.  These targets will generate traps when a program accesses
+     some data or instruction address that is assigned to the debug
+     registers.  However the hardware breakpoint registers can take a
+     limited number of breakpoints.  For example, on the DSU, only two
+     data breakpoints can be set at a time, and GDB will reject this
+     command if more than two are used.  Delete or disable unused
+     hardware breakpoints before setting new ones (*note Disabling
+     Breakpoints: Disabling.).  *Note Break Conditions: Conditions.  For
+     remote targets, you can restrict the number of hardware breakpoints
+     GDB will use, see *note set remote hardware-breakpoint-limit::.
 
-`thbreak ARGS'
+'thbreak ARGS'
      Set a hardware-assisted breakpoint enabled only for one stop.  The
-     ARGS are the same as for the `hbreak' command and the breakpoint
-     is set in the same way.  However, like the `tbreak' command, the
+     ARGS are the same as for the 'hbreak' command and the breakpoint is
+     set in the same way.  However, like the 'tbreak' command, the
      breakpoint is automatically deleted after the first time your
-     program stops there.  Also, like the `hbreak' command, the
+     program stops there.  Also, like the 'hbreak' command, the
      breakpoint requires hardware support and some target hardware may
      not have this support.  *Note Disabling Breakpoints: Disabling.
      See also *note Break Conditions: Conditions.
 
-`rbreak REGEX'
+'rbreak REGEX'
      Set breakpoints on all functions matching the regular expression
      REGEX.  This command sets an unconditional breakpoint on all
      matches, printing a list of all breakpoints it set.  Once these
-     breakpoints are set, they are treated just like the breakpoints
-     set with the `break' command.  You can delete them, disable them,
-     or make them conditional the same way as any other breakpoint.
+     breakpoints are set, they are treated just like the breakpoints set
+     with the 'break' command.  You can delete them, disable them, or
+     make them conditional the same way as any other breakpoint.
 
      The syntax of the regular expression is the standard one used with
-     tools like `grep'.  Note that this is different from the syntax
-     used by shells, so for instance `foo*' matches all functions that
-     include an `fo' followed by zero or more `o's.  There is an
-     implicit `.*' leading and trailing the regular expression you
-     supply, so to match only functions that begin with `foo', use
-     `^foo'.
+     tools like 'grep'.  Note that this is different from the syntax
+     used by shells, so for instance 'foo*' matches all functions that
+     include an 'fo' followed by zero or more 'o's.  There is an
+     implicit '.*' leading and trailing the regular expression you
+     supply, so to match only functions that begin with 'foo', use
+     '^foo'.
 
-     When debugging C++ programs, `rbreak' is useful for setting
+     When debugging C++ programs, 'rbreak' is useful for setting
      breakpoints on overloaded functions that are not members of any
      special classes.
 
-     The `rbreak' command can be used to set breakpoints in *all* the
+     The 'rbreak' command can be used to set breakpoints in *all* the
      functions in a program, like this:
 
           (gdb) rbreak .
 
-`rbreak FILE:REGEX'
-     If `rbreak' is called with a filename qualification, it limits the
+'rbreak FILE:REGEX'
+     If 'rbreak' is called with a filename qualification, it limits the
      search for functions matching the given regular expression to the
      specified FILE.  This can be used, for example, to set breakpoints
      on every function in a given file:
@@ -3058,37 +3098,32 @@ variables.
      The colon separating the filename qualifier from the regex may
      optionally be surrounded by spaces.
 
-`info breakpoints [N...]'
-`info break [N...]'
+'info breakpoints [LIST...]'
+'info break [LIST...]'
      Print a table of all breakpoints, watchpoints, and catchpoints set
      and not deleted.  Optional argument N means print information only
      about the specified breakpoint(s) (or watchpoint(s) or
      catchpoint(s)).  For each breakpoint, following columns are
      printed:
 
-    _Breakpoint Numbers_
-
-    _Type_
+     _Breakpoint Numbers_
+     _Type_
           Breakpoint, watchpoint, or catchpoint.
-
-    _Disposition_
+     _Disposition_
           Whether the breakpoint is marked to be disabled or deleted
           when hit.
-
-    _Enabled or Disabled_
-          Enabled breakpoints are marked with `y'.  `n' marks
+     _Enabled or Disabled_
+          Enabled breakpoints are marked with 'y'.  'n' marks
           breakpoints that are not enabled.
-
-    _Address_
+     _Address_
           Where the breakpoint is in your program, as a memory address.
           For a pending breakpoint whose address is not yet known, this
-          field will contain `<PENDING>'.  Such breakpoint won't fire
-          until a shared library that has the symbol or line referred
-          by breakpoint is loaded.  See below for details.  A
-          breakpoint with several locations will have `<MULTIPLE>' in
-          this field--see below for details.
-
-    _What_
+          field will contain '<PENDING>'.  Such breakpoint won't fire
+          until a shared library that has the symbol or line referred by
+          breakpoint is loaded.  See below for details.  A breakpoint
+          with several locations will have '<MULTIPLE>' in this
+          field--see below for details.
+     _What_
           Where the breakpoint is in the source for your program, as a
           file and line number.  For a pending breakpoint, the original
           string passed to the breakpoint command will be listed as it
@@ -3098,7 +3133,7 @@ variables.
      If a breakpoint is conditional, there are two evaluation modes:
      "host" and "target".  If mode is "host", breakpoint condition
      evaluation is done by GDB on the host's side.  If it is "target",
-     then the condition is evaluated by the target.  The `info break'
+     then the condition is evaluated by the target.  The 'info break'
      command shows the condition on the line following the affected
      breakpoint, together with its condition evaluation mode in between
      parentheses.
@@ -3109,22 +3144,21 @@ variables.
      loaded that allows the pending breakpoint to resolve to a valid
      location.
 
-     `info break' with a breakpoint number N as argument lists only
-     that breakpoint.  The convenience variable `$_' and the default
-     examining-address for the `x' command are set to the address of
-     the last breakpoint listed (*note Examining Memory: Memory.).
+     'info break' with a breakpoint number N as argument lists only that
+     breakpoint.  The convenience variable '$_' and the default
+     examining-address for the 'x' command are set to the address of the
+     last breakpoint listed (*note Examining Memory: Memory.).
 
-     `info break' displays a count of the number of times the breakpoint
+     'info break' displays a count of the number of times the breakpoint
      has been hit.  This is especially useful in conjunction with the
-     `ignore' command.  You can ignore a large number of breakpoint
+     'ignore' command.  You can ignore a large number of breakpoint
      hits, look at the breakpoint info to see how many times the
-     breakpoint was hit, and then run again, ignoring one less than
-     that number.  This will get you quickly to the last hit of that
+     breakpoint was hit, and then run again, ignoring one less than that
+     number.  This will get you quickly to the last hit of that
      breakpoint.
 
-     For a breakpoints with an enable count (xref) greater than 1,
-     `info break' also displays that count.
-
+     For a breakpoints with an enable count (xref) greater than 1, 'info
+     break' also displays that count.
 
    GDB allows you to set any number of breakpoints at the same place in
 your program.  There is nothing silly or meaningless about this.  When
@@ -3136,8 +3170,8 @@ your program.  Examples of this situatio
 
    * Multiple functions in the program may have the same name.
 
-   * For a C++ constructor, the GCC compiler generates several
-     instances of the function body, used in different cases.
+   * For a C++ constructor, the GCC compiler generates several instances
+     of the function body, used in different cases.
 
    * For a C++ template function, a given line in the function can
      correspond to any number of instantiations.
@@ -3150,7 +3184,7 @@ locations.
 
    A breakpoint with multiple locations is displayed in the breakpoint
 table using several rows--one header row, followed by one row for each
-breakpoint location.  The header row has `<MULTIPLE>' in the address
+breakpoint location.  The header row has '<MULTIPLE>' in the address
 column.  The rows for individual locations contain the actual addresses
 for locations, and show the functions to which those locations belong.
 The number column for a location is of the form
@@ -3166,10 +3200,10 @@ BREAKPOINT-NUMBER.LOCATION-NUMBER.
      1.2                         y    0x080486ca in void foo<double>() at t.cc:8
 
    Each location can be individually enabled or disabled by passing
-BREAKPOINT-NUMBER.LOCATION-NUMBER as argument to the `enable' and
-`disable' commands.  Note that you cannot delete the individual
+BREAKPOINT-NUMBER.LOCATION-NUMBER as argument to the 'enable' and
+'disable' commands.  Note that you cannot delete the individual
 locations from the list, you can only delete the entire list of
-locations that belong to their parent breakpoint (with the `delete NUM'
+locations that belong to their parent breakpoint (with the 'delete NUM'
 command, where NUM is the number of the parent breakpoint, 1 in the
 above example).  Disabling or enabling the parent breakpoint (*note
 Disabling::) affects all of the locations that belong to that
@@ -3180,94 +3214,92 @@ Shared libraries can be loaded and unloa
 repeatedly, as the program is executed.  To support this use case, GDB
 updates breakpoint locations whenever any shared library is loaded or
 unloaded.  Typically, you would set a breakpoint in a shared library at
-the beginning of your debugging session, when the library is not
-loaded, and when the symbols from the library are not available.  When
-you try to set breakpoint, GDB will ask you if you want to set a so
-called "pending breakpoint"--breakpoint whose address is not yet
-resolved.
+the beginning of your debugging session, when the library is not loaded,
+and when the symbols from the library are not available.  When you try
+to set breakpoint, GDB will ask you if you want to set a so called
+"pending breakpoint"--breakpoint whose address is not yet resolved.
 
    After the program is run, whenever a new shared library is loaded,
-GDB reevaluates all the breakpoints.  When a newly loaded shared
-library contains the symbol or line referred to by some pending
-breakpoint, that breakpoint is resolved and becomes an ordinary
-breakpoint.  When a library is unloaded, all breakpoints that refer to
-its symbols or source lines become pending again.
+GDB reevaluates all the breakpoints.  When a newly loaded shared library
+contains the symbol or line referred to by some pending breakpoint, that
+breakpoint is resolved and becomes an ordinary breakpoint.  When a
+library is unloaded, all breakpoints that refer to its symbols or source
+lines become pending again.
 
    This logic works for breakpoints with multiple locations, too.  For
 example, if you have a breakpoint in a C++ template function, and a
-newly loaded shared library has an instantiation of that template, a
-new location is added to the list of locations for the breakpoint.
+newly loaded shared library has an instantiation of that template, a new
+location is added to the list of locations for the breakpoint.
 
    Except for having unresolved address, pending breakpoints do not
 differ from regular breakpoints.  You can set conditions or commands,
 enable and disable them and perform other breakpoint operations.
 
    GDB provides some additional commands for controlling what happens
-when the `break' command cannot resolve breakpoint address
-specification to an address:
+when the 'break' command cannot resolve breakpoint address specification
+to an address:
 
-`set breakpoint pending auto'
+'set breakpoint pending auto'
      This is the default behavior.  When GDB cannot find the breakpoint
      location, it queries you whether a pending breakpoint should be
      created.
 
-`set breakpoint pending on'
+'set breakpoint pending on'
      This indicates that an unrecognized breakpoint location should
      automatically result in a pending breakpoint being created.
 
-`set breakpoint pending off'
+'set breakpoint pending off'
      This indicates that pending breakpoints are not to be created.  Any
-     unrecognized breakpoint location results in an error.  This
-     setting does not affect any pending breakpoints previously created.
+     unrecognized breakpoint location results in an error.  This setting
+     does not affect any pending breakpoints previously created.
 
-`show breakpoint pending'
+'show breakpoint pending'
      Show the current behavior setting for creating pending breakpoints.
 
-   The settings above only affect the `break' command and its variants.
+   The settings above only affect the 'break' command and its variants.
 Once breakpoint is set, it will be automatically updated as shared
 libraries are loaded and unloaded.
 
    For some targets, GDB can automatically decide if hardware or
-software breakpoints should be used, depending on whether the
-breakpoint address is read-only or read-write.  This applies to
-breakpoints set with the `break' command as well as to internal
-breakpoints set by commands like `next' and `finish'.  For breakpoints
-set with `hbreak', GDB will always use hardware breakpoints.
+software breakpoints should be used, depending on whether the breakpoint
+address is read-only or read-write.  This applies to breakpoints set
+with the 'break' command as well as to internal breakpoints set by
+commands like 'next' and 'finish'.  For breakpoints set with 'hbreak',
+GDB will always use hardware breakpoints.
 
-   You can control this automatic behaviour with the following
-commands::
+   You can control this automatic behaviour with the following commands:
 
-`set breakpoint auto-hw on'
+'set breakpoint auto-hw on'
      This is the default behavior.  When GDB sets a breakpoint, it will
      try to use the target memory map to decide if software or hardware
      breakpoint must be used.
 
-`set breakpoint auto-hw off'
-     This indicates GDB should not automatically select breakpoint
-     type.  If the target provides a memory map, GDB will warn when
-     trying to set software breakpoint at a read-only address.
+'set breakpoint auto-hw off'
+     This indicates GDB should not automatically select breakpoint type.
+     If the target provides a memory map, GDB will warn when trying to
+     set software breakpoint at a read-only address.
 
    GDB normally implements breakpoints by replacing the program code at
-the breakpoint address with a special instruction, which, when
-executed, given control to the debugger.  By default, the program code
-is so modified only when the program is resumed.  As soon as the
-program stops, GDB restores the original instructions.  This behaviour
-guards against leaving breakpoints inserted in the target should gdb
-abrubptly disconnect.  However, with slow remote targets, inserting and
-removing breakpoint can reduce the performance.  This behavior can be
-controlled with the following commands::
+the breakpoint address with a special instruction, which, when executed,
+given control to the debugger.  By default, the program code is so
+modified only when the program is resumed.  As soon as the program
+stops, GDB restores the original instructions.  This behaviour guards
+against leaving breakpoints inserted in the target should gdb abrubptly
+disconnect.  However, with slow remote targets, inserting and removing
+breakpoint can reduce the performance.  This behavior can be controlled
+with the following commands::
 
-`set breakpoint always-inserted off'
+'set breakpoint always-inserted off'
      All breakpoints, including newly added by the user, are inserted in
      the target only when the target is resumed.  All breakpoints are
      removed from the target when it stops.  This is the default mode.
 
-`set breakpoint always-inserted on'
+'set breakpoint always-inserted on'
      Causes all breakpoints to be inserted in the target at all times.
      If the user adds a new breakpoint, or changes an existing
      breakpoint, the breakpoints in the target are updated immediately.
-     A breakpoint is removed from the target only when breakpoint
-     itself is deleted.
+     A breakpoint is removed from the target only when breakpoint itself
+     is deleted.
 
    GDB handles conditional breakpoints by evaluating these conditions
 when a breakpoint breaks.  If the condition is true, then the process
@@ -3278,27 +3310,27 @@ download the breakpoint, together with i
 
    This feature can be controlled via the following commands:
 
-`set breakpoint condition-evaluation host'
+'set breakpoint condition-evaluation host'
      This option commands GDB to evaluate the breakpoint conditions on
      the host's side.  Unconditional breakpoints are sent to the target
      which in turn receives the triggers and reports them back to GDB
      for condition evaluation.  This is the standard evaluation mode.
 
-`set breakpoint condition-evaluation target'
+'set breakpoint condition-evaluation target'
      This option commands GDB to download breakpoint conditions to the
-     target at the moment of their insertion.  The target is
-     responsible for evaluating the conditional expression and reporting
-     breakpoint stop events back to GDB whenever the condition is true.
-     Due to limitations of target-side evaluation, some conditions
-     cannot be evaluated there, e.g., conditions that depend on local
-     data that is only known to the host.  Examples include conditional
-     expressions involving convenience variables, complex types that
-     cannot be handled by the agent expression parser and expressions
-     that are too long to be sent over to the target, specially when the
-     target is a remote system.  In these cases, the conditions will be
-     evaluated by GDB.
+     target at the moment of their insertion.  The target is responsible
+     for evaluating the conditional expression and reporting breakpoint
+     stop events back to GDB whenever the condition is true.  Due to
+     limitations of target-side evaluation, some conditions cannot be
+     evaluated there, e.g., conditions that depend on local data that is
+     only known to the host.  Examples include conditional expressions
+     involving convenience variables, complex types that cannot be
+     handled by the agent expression parser and expressions that are too
+     long to be sent over to the target, specially when the target is a
+     remote system.  In these cases, the conditions will be evaluated by
+     GDB.
 
-`set breakpoint condition-evaluation auto'
+'set breakpoint condition-evaluation auto'
      This is the default mode.  If the target supports evaluating
      breakpoint conditions on its end, GDB will download breakpoint
      conditions to the target (limitations mentioned previously apply).
@@ -3307,11 +3339,11 @@ download the breakpoint, together with i
      host's side.
 
    GDB itself sometimes sets breakpoints in your program for special
-purposes, such as proper handling of `longjmp' (in C programs).  These
-internal breakpoints are assigned negative numbers, starting with `-1';
-`info breakpoints' does not display them.  You can see these
-breakpoints with the GDB maintenance command `maint info breakpoints'
-(*note maint info breakpoints::).
+purposes, such as proper handling of 'longjmp' (in C programs).  These
+internal breakpoints are assigned negative numbers, starting with '-1';
+'info breakpoints' does not display them.  You can see these breakpoints
+with the GDB maintenance command 'maint info breakpoints' (*note maint
+info breakpoints::).
 
 
 File: gdb.info,  Node: Set Watchpoints,  Next: Set Catchpoints,  Prev: Set Breaks,  Up: Breakpoints
@@ -3327,21 +3359,21 @@ complex as many variables combined by op
 
    * A reference to the value of a single variable.
 
-   * An address cast to an appropriate data type.  For example, `*(int
+   * An address cast to an appropriate data type.  For example, '*(int
      *)0x12345678' will watch a 4-byte region at the specified address
-     (assuming an `int' occupies 4 bytes).
+     (assuming an 'int' occupies 4 bytes).
 
-   * An arbitrarily complex expression, such as `a*b + c/d'.  The
+   * An arbitrarily complex expression, such as 'a*b + c/d'.  The
      expression can use any operators valid in the program's native
      language (*note Languages::).
 
    You can set a watchpoint on an expression even if the expression can
 not be evaluated yet.  For instance, you can set a watchpoint on
-`*global_ptr' before `global_ptr' is initialized.  GDB will stop when
-your program sets `global_ptr' and the expression produces a valid
+'*global_ptr' before 'global_ptr' is initialized.  GDB will stop when
+your program sets 'global_ptr' and the expression produces a valid
 value.  If the expression becomes valid in some other way than changing
-a variable (e.g. if the memory pointed to by `*global_ptr' becomes
-readable as the result of a `malloc' call), GDB may not stop until the
+a variable (e.g. if the memory pointed to by '*global_ptr' becomes
+readable as the result of a 'malloc' call), GDB may not stop until the
 next time the expression changes.
 
    Depending on your system, watchpoints may be implemented in software
@@ -3351,11 +3383,11 @@ times slower than normal execution.  (Bu
 catch errors where you have no clue what part of your program is the
 culprit.)
 
-   On some systems, such as HP-UX, PowerPC, GNU/Linux and most other
-x86-based targets, GDB includes support for hardware watchpoints, which
-do not slow down the running of your program.
+   On some systems, such as most PowerPC or x86-based targets, GDB
+includes support for hardware watchpoints, which do not slow down the
+running of your program.
 
-`watch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]'
+'watch [-l|-location] EXPR [thread THREAD-ID] [mask MASKVALUE]'
      Set a watchpoint for an expression.  GDB will break when the
      expression EXPR is written into by the program and its value
      changes.  The simplest (and the most popular) use of this command
@@ -3363,51 +3395,51 @@ do not slow down the running of your pro
 
           (gdb) watch foo
 
-     If the command includes a `[thread THREADNUM]' argument, GDB
-     breaks only when the thread identified by THREADNUM changes the
-     value of EXPR.  If any other threads change the value of EXPR, GDB
-     will not break.  Note that watchpoints restricted to a single
-     thread in this way only work with Hardware Watchpoints.
+     If the command includes a '[thread THREAD-ID]' argument, GDB breaks
+     only when the thread identified by THREAD-ID changes the value of
+     EXPR.  If any other threads change the value of EXPR, GDB will not
+     break.  Note that watchpoints restricted to a single thread in this
+     way only work with Hardware Watchpoints.
 
      Ordinarily a watchpoint respects the scope of variables in EXPR
-     (see below).  The `-location' argument tells GDB to instead watch
+     (see below).  The '-location' argument tells GDB to instead watch
      the memory referred to by EXPR.  In this case, GDB will evaluate
      EXPR, take the address of the result, and watch the memory at that
      address.  The type of the result is used to determine the size of
      the watched memory.  If the expression's result does not have an
      address, then GDB will print an error.
 
-     The `[mask MASKVALUE]' argument allows creation of masked
+     The '[mask MASKVALUE]' argument allows creation of masked
      watchpoints, if the current architecture supports this feature
      (e.g., PowerPC Embedded architecture, see *note PowerPC
-     Embedded::.)  A "masked watchpoint" specifies a mask in addition
-     to an address to watch.  The mask specifies that some bits of an
+     Embedded::.)  A "masked watchpoint" specifies a mask in addition to
+     an address to watch.  The mask specifies that some bits of an
      address (the bits which are reset in the mask) should be ignored
      when matching the address accessed by the inferior against the
      watchpoint address.  Thus, a masked watchpoint watches many
      addresses simultaneously--those addresses whose unmasked bits are
      identical to the unmasked bits in the watchpoint address.  The
-     `mask' argument implies `-location'.  Examples:
+     'mask' argument implies '-location'.  Examples:
 
           (gdb) watch foo mask 0xffff00ff
           (gdb) watch *0xdeadbeef mask 0xffffff00
 
-`rwatch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]'
+'rwatch [-l|-location] EXPR [thread THREAD-ID] [mask MASKVALUE]'
      Set a watchpoint that will break when the value of EXPR is read by
      the program.
 
-`awatch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]'
+'awatch [-l|-location] EXPR [thread THREAD-ID] [mask MASKVALUE]'
      Set a watchpoint that will break when EXPR is either read from or
      written into by the program.
 
-`info watchpoints [N...]'
+'info watchpoints [LIST...]'
      This command prints a list of watchpoints, using the same format as
-     `info break' (*note Set Breaks::).
+     'info break' (*note Set Breaks::).
 
    If you watch for a change in a numerically entered address you need
-to dereference it, as the address itself is just a constant number
-which will never change.  GDB refuses to create a watchpoint that
-watches a never-changing value:
+to dereference it, as the address itself is just a constant number which
+will never change.  GDB refuses to create a watchpoint that watches a
+never-changing value:
 
      (gdb) watch 0x600850
      Cannot watch constant value 0x600850.
@@ -3416,59 +3448,58 @@ watches a never-changing value:
 
    GDB sets a "hardware watchpoint" if possible.  Hardware watchpoints
 execute very quickly, and the debugger reports a change in value at the
-exact instruction where the change occurs.  If GDB cannot set a
-hardware watchpoint, it sets a software watchpoint, which executes more
-slowly and reports the change in value at the next _statement_, not the
+exact instruction where the change occurs.  If GDB cannot set a hardware
+watchpoint, it sets a software watchpoint, which executes more slowly
+and reports the change in value at the next _statement_, not the
 instruction, after the change occurs.
 
-   You can force GDB to use only software watchpoints with the `set
+   You can force GDB to use only software watchpoints with the 'set
 can-use-hw-watchpoints 0' command.  With this variable set to zero, GDB
 will never try to use hardware watchpoints, even if the underlying
 system supports them.  (Note that hardware-assisted watchpoints that
-were set _before_ setting `can-use-hw-watchpoints' to zero will still
+were set _before_ setting 'can-use-hw-watchpoints' to zero will still
 use the hardware mechanism of watching expression values.)
 
-`set can-use-hw-watchpoints'
+'set can-use-hw-watchpoints'
      Set whether or not to use hardware watchpoints.
 
-`show can-use-hw-watchpoints'
+'show can-use-hw-watchpoints'
      Show the current mode of using hardware watchpoints.
 
    For remote targets, you can restrict the number of hardware
 watchpoints GDB will use, see *note set remote
 hardware-breakpoint-limit::.
 
-   When you issue the `watch' command, GDB reports
+   When you issue the 'watch' command, GDB reports
 
      Hardware watchpoint NUM: EXPR
 
 if it was able to set a hardware watchpoint.
 
-   Currently, the `awatch' and `rwatch' commands can only set hardware
-watchpoints, because accesses to data that don't change the value of
-the watched expression cannot be detected without examining every
-instruction as it is being executed, and GDB does not do that
-currently.  If GDB finds that it is unable to set a hardware breakpoint
-with the `awatch' or `rwatch' command, it will print a message like
-this:
+   Currently, the 'awatch' and 'rwatch' commands can only set hardware
+watchpoints, because accesses to data that don't change the value of the
+watched expression cannot be detected without examining every
+instruction as it is being executed, and GDB does not do that currently.
+If GDB finds that it is unable to set a hardware breakpoint with the
+'awatch' or 'rwatch' command, it will print a message like this:
 
      Expression cannot be implemented with read/access watchpoint.
 
-   Sometimes, GDB cannot set a hardware watchpoint because the data
-type of the watched expression is wider than what a hardware watchpoint
-on the target machine can handle.  For example, some systems can only
-watch regions that are up to 4 bytes wide; on such systems you cannot
-set hardware watchpoints for an expression that yields a
-double-precision floating-point number (which is typically 8 bytes
-wide).  As a work-around, it might be possible to break the large region
-into a series of smaller ones and watch them with separate watchpoints.
+   Sometimes, GDB cannot set a hardware watchpoint because the data type
+of the watched expression is wider than what a hardware watchpoint on
+the target machine can handle.  For example, some systems can only watch
+regions that are up to 4 bytes wide; on such systems you cannot set
+hardware watchpoints for an expression that yields a double-precision
+floating-point number (which is typically 8 bytes wide).  As a
+work-around, it might be possible to break the large region into a
+series of smaller ones and watch them with separate watchpoints.
 
    If you set too many hardware watchpoints, GDB might be unable to
-insert all of them when you resume the execution of your program.
-Since the precise number of active watchpoints is unknown until such
-time as the program is about to be resumed, GDB might not be able to
-warn you about this when you set the watchpoints, and the warning will
-be printed only when the program is resumed:
+insert all of them when you resume the execution of your program.  Since
+the precise number of active watchpoints is unknown until such time as
+the program is about to be resumed, GDB might not be able to warn you
+about this when you set the watchpoints, and the warning will be printed
+only when the program is resumed:
 
      Hardware watchpoint NUM: Could not insert watchpoint
 
@@ -3479,9 +3510,9 @@ exhaust the resources available for hard
 That's because GDB needs to watch every variable in the expression with
 separately allocated resources.
 
-   If you call a function interactively using `print' or `call', any
-watchpoints you have set will be inactive until GDB reaches another
-kind of breakpoint or the call completes.
+   If you call a function interactively using 'print' or 'call', any
+watchpoints you have set will be inactive until GDB reaches another kind
+of breakpoint or the call completes.
 
    GDB automatically deletes watchpoints that watch local (automatic)
 variables, or expressions that involve such variables, when they go out
@@ -3490,7 +3521,7 @@ variables were defined.  In particular, 
 terminates, _all_ local variables go out of scope, and so only
 watchpoints that watch global variables remain set.  If you rerun the
 program, you will need to set all such watchpoints again.  One way of
-doing that would be to set a code breakpoint at the entry to the `main'
+doing that would be to set a code breakpoint at the entry to the 'main'
 function and when it breaks, set all the watchpoints.
 
    In multi-threaded programs, watchpoints will detect changes to the
@@ -3498,10 +3529,10 @@ watched expression from every thread.
 
      _Warning:_ In multi-threaded programs, software watchpoints have
      only limited usefulness.  If GDB creates a software watchpoint, it
-     can only watch the value of an expression _in a single thread_.
-     If you are confident that the expression can only change due to
-     the current thread's activity (and if you are also confident that
-     no other thread can become current), then you can use software
+     can only watch the value of an expression _in a single thread_.  If
+     you are confident that the expression can only change due to the
+     current thread's activity (and if you are also confident that no
+     other thread can become current), then you can use software
      watchpoints as usual.  However, GDB may not notice when a
      non-current thread's activity changes the expression.  (Hardware
      watchpoints, in contrast, watch an expression in all threads.)
@@ -3516,106 +3547,104 @@ File: gdb.info,  Node: Set Catchpoints, 
 
 You can use "catchpoints" to cause the debugger to stop for certain
 kinds of program events, such as C++ exceptions or the loading of a
-shared library.  Use the `catch' command to set a catchpoint.
+shared library.  Use the 'catch' command to set a catchpoint.
 
-`catch EVENT'
+'catch EVENT'
      Stop when EVENT occurs.  The EVENT can be any of the following:
 
-    `throw [REGEXP]'
-    `rethrow [REGEXP]'
-    `catch [REGEXP]'
+     'throw [REGEXP]'
+     'rethrow [REGEXP]'
+     'catch [REGEXP]'
           The throwing, re-throwing, or catching of a C++ exception.
 
           If REGEXP is given, then only exceptions whose type matches
           the regular expression will be caught.
 
-          The convenience variable `$_exception' is available at an
+          The convenience variable '$_exception' is available at an
           exception-related catchpoint, on some systems.  This holds the
           exception being thrown.
 
-          There are currently some limitations to C++ exception
-          handling in GDB:
+          There are currently some limitations to C++ exception handling
+          in GDB:
 
              * The support for these commands is system-dependent.
-               Currently, only systems using the `gnu-v3' C++ ABI
-               (*note ABI::) are supported.
+               Currently, only systems using the 'gnu-v3' C++ ABI (*note
+               ABI::) are supported.
 
-             * The regular expression feature and the `$_exception'
+             * The regular expression feature and the '$_exception'
                convenience variable rely on the presence of some SDT
-               probes in `libstdc++'.  If these probes are not present,
+               probes in 'libstdc++'.  If these probes are not present,
                then these features cannot be used.  These probes were
                first available in the GCC 4.8 release, but whether or
-               not they are available in your GCC also depends on how
-               it was built.
+               not they are available in your GCC also depends on how it
+               was built.
 
-             * The `$_exception' convenience variable is only valid at
+             * The '$_exception' convenience variable is only valid at
                the instruction at which an exception-related catchpoint
                is set.
 
-             * When an exception-related catchpoint is hit, GDB stops
-               at a location in the system library which implements
-               runtime exception support for C++, usually `libstdc++'.
-               You can use `up' (*note Selection::) to get to your code.
+             * When an exception-related catchpoint is hit, GDB stops at
+               a location in the system library which implements runtime
+               exception support for C++, usually 'libstdc++'.  You can
+               use 'up' (*note Selection::) to get to your code.
 
              * If you call a function interactively, GDB normally
                returns control to you when the function has finished
-               executing.  If the call raises an exception, however,
-               the call may bypass the mechanism that returns control
-               to you and cause your program either to abort or to
-               simply continue running until it hits a breakpoint,
-               catches a signal that GDB is listening for, or exits.
-               This is the case even if you set a catchpoint for the
-               exception; catchpoints on exceptions are disabled within
-               interactive calls.  *Note Calling::, for information on
-               controlling this with `set
-               unwind-on-terminating-exception'.
+               executing.  If the call raises an exception, however, the
+               call may bypass the mechanism that returns control to you
+               and cause your program either to abort or to simply
+               continue running until it hits a breakpoint, catches a
+               signal that GDB is listening for, or exits.  This is the
+               case even if you set a catchpoint for the exception;
+               catchpoints on exceptions are disabled within interactive
+               calls.  *Note Calling::, for information on controlling
+               this with 'set unwind-on-terminating-exception'.
 
              * You cannot raise an exception interactively.
 
              * You cannot install an exception handler interactively.
 
-    `exception'
+     'exception'
           An Ada exception being raised.  If an exception name is
-          specified at the end of the command (eg `catch exception
+          specified at the end of the command (eg 'catch exception
           Program_Error'), the debugger will stop only when this
           specific exception is raised.  Otherwise, the debugger stops
           execution when any Ada exception is raised.
 
           When inserting an exception catchpoint on a user-defined
           exception whose name is identical to one of the exceptions
-          defined by the language, the fully qualified name must be
-          used as the exception name.  Otherwise, GDB will assume that
-          it should stop on the pre-defined exception rather than the
+          defined by the language, the fully qualified name must be used
+          as the exception name.  Otherwise, GDB will assume that it
+          should stop on the pre-defined exception rather than the
           user-defined one.  For instance, assuming an exception called
-          `Constraint_Error' is defined in package `Pck', then the
-          command to use to catch such exceptions is `catch exception
+          'Constraint_Error' is defined in package 'Pck', then the
+          command to use to catch such exceptions is 'catch exception
           Pck.Constraint_Error'.
 
-    `exception unhandled'
+     'exception unhandled'
           An exception that was raised but is not handled by the
           program.
 
-    `assert'
+     'assert'
           A failed Ada assertion.
 
-    `exec'
-          A call to `exec'.  This is currently only available for HP-UX
-          and GNU/Linux.
+     'exec'
+          A call to 'exec'.
 
-    `syscall'
-    `syscall [NAME | NUMBER] ...'
+     'syscall'
+     'syscall [NAME | NUMBER | group:GROUPNAME | g:GROUPNAME] ...'
           A call to or return from a system call, a.k.a. "syscall".  A
           syscall is a mechanism for application programs to request a
-          service from the operating system (OS) or one of the OS
-          system services.  GDB can catch some or all of the syscalls
-          issued by the debuggee, and show the related information for
-          each syscall.  If no argument is specified, calls to and
-          returns from all system calls will be caught.
+          service from the operating system (OS) or one of the OS system
+          services.  GDB can catch some or all of the syscalls issued by
+          the debuggee, and show the related information for each
+          syscall.  If no argument is specified, calls to and returns
+          from all system calls will be caught.
 
           NAME can be any system call name that is valid for the
-          underlying OS.  Just what syscalls are valid depends on the
-          OS.  On GNU and Unix systems, you can find the full list of
-          valid syscall names on `/usr/include/asm/unistd.h'.
+          underlying OS. Just what syscalls are valid depends on the OS.
+          On GNU and Unix systems, you can find the full list of valid
+          syscall names on '/usr/include/asm/unistd.h'.
 
           Normally, GDB knows in advance which syscalls are valid for
           each OS, so you can use the GDB command-line completion
@@ -3626,10 +3655,19 @@ shared library.  Use the `catch' command
           number is the value passed to the OS's syscall dispatcher to
           identify the requested service.  When you specify the syscall
           by its name, GDB uses its database of syscalls to convert the
-          name into the corresponding numeric code, but using the
-          number directly may be useful if GDB's database does not have
-          the complete list of syscalls on your system (e.g., because
-          GDB lags behind the OS upgrades).
+          name into the corresponding numeric code, but using the number
+          directly may be useful if GDB's database does not have the
+          complete list of syscalls on your system (e.g., because GDB
+          lags behind the OS upgrades).
+
+          You may specify a group of related syscalls to be caught at
+          once using the 'group:' syntax ('g:' is a shorter equivalent).
+          For instance, on some platforms GDB allows you to catch all
+          network related syscalls, by passing the argument
+          'group:network' to 'catch syscall'.  Note that not all syscall
+          groups are available in every system.  You can use the command
+          completion facilities (*note command completion: Completion.)
+          to list the syscall groups available on your environment.
 
           The example below illustrates how this command works if you
           don't provide arguments to it:
@@ -3681,24 +3719,39 @@ shared library.  Use the `catch' command
                Program exited normally.
                (gdb)
 
+          Here is an example of catching a syscall group:
+
+               (gdb) catch syscall group:process
+               Catchpoint 1 (syscalls 'exit' [1] 'fork' [2] 'waitpid' [7]
+               'execve' [11] 'wait4' [114] 'clone' [120] 'vfork' [190]
+               'exit_group' [252] 'waitid' [284] 'unshare' [310])
+               (gdb) r
+               Starting program: /tmp/catch-syscall
+
+               Catchpoint 1 (call to syscall fork), 0x00007ffff7df4e27 in open64 ()
+                  from /lib64/ld-linux-x86-64.so.2
+
+               (gdb) c
+               Continuing.
+
           However, there can be situations when there is no
           corresponding name in XML file for that syscall number.  In
-          this case, GDB prints a warning message saying that it was
-          not able to find the syscall name, but the catchpoint will be
-          set anyway.  See the example below:
+          this case, GDB prints a warning message saying that it was not
+          able to find the syscall name, but the catchpoint will be set
+          anyway.  See the example below:
 
                (gdb) catch syscall 764
                warning: The number '764' does not represent a known syscall.
                Catchpoint 2 (syscall 764)
                (gdb)
 
-          If you configure GDB using the `--without-expat' option, it
+          If you configure GDB using the '--without-expat' option, it
           will not be able to display syscall names.  Also, if your
           architecture does not have an XML file describing its system
           calls, you will not be able to see the syscall names.  It is
           important to notice that these two features are used for
-          accessing the syscall name database.  In either case, you
-          will see a warning like this:
+          accessing the syscall name database.  In either case, you will
+          see a warning like this:
 
                (gdb) catch syscall
                warning: Could not open "syscalls/i386-linux.xml"
@@ -3717,56 +3770,51 @@ shared library.  Use the `catch' command
                (gdb) catch syscall 252
                Catchpoint 1 (syscall(s) 252)
 
-          Again, in this case GDB would not be able to display
-          syscall's names.
+          Again, in this case GDB would not be able to display syscall's
+          names.
+
+     'fork'
+          A call to 'fork'.
 
-    `fork'
-          A call to `fork'.  This is currently only available for HP-UX
-          and GNU/Linux.
-
-    `vfork'
-          A call to `vfork'.  This is currently only available for HP-UX
-          and GNU/Linux.
+     'vfork'
+          A call to 'vfork'.
 
-    `load [regexp]'
-    `unload [regexp]'
+     'load [regexp]'
+     'unload [regexp]'
           The loading or unloading of a shared library.  If REGEXP is
           given, then the catchpoint will stop only if the regular
           expression matches one of the affected libraries.
 
-    `signal [SIGNAL... | `all']'
+     'signal [SIGNAL... | 'all']'
           The delivery of a signal.
 
           With no arguments, this catchpoint will catch any signal that
           is not used internally by GDB, specifically, all signals
-          except `SIGTRAP' and `SIGINT'.
+          except 'SIGTRAP' and 'SIGINT'.
 
-          With the argument `all', all signals, including those used by
+          With the argument 'all', all signals, including those used by
           GDB, will be caught.  This argument cannot be used with other
           signal names.
 
           Otherwise, the arguments are a list of signal names as given
-          to `handle' (*note Signals::).  Only signals specified in
-          this list will be caught.
+          to 'handle' (*note Signals::).  Only signals specified in this
+          list will be caught.
 
-          One reason that `catch signal' can be more useful than
-          `handle' is that you can attach commands and conditions to the
+          One reason that 'catch signal' can be more useful than
+          'handle' is that you can attach commands and conditions to the
           catchpoint.
 
-          When a signal is caught by a catchpoint, the signal's `stop'
-          and `print' settings, as specified by `handle', are ignored.
-          However, whether the signal is still delivered to the
-          inferior depends on the `pass' setting; this can be changed
-          in the catchpoint's commands.
+          When a signal is caught by a catchpoint, the signal's 'stop'
+          and 'print' settings, as specified by 'handle', are ignored.
+          However, whether the signal is still delivered to the inferior
+          depends on the 'pass' setting; this can be changed in the
+          catchpoint's commands.
+
+'tcatch EVENT'
+     Set a catchpoint that is enabled only for one stop.  The catchpoint
+     is automatically deleted after the first time the event is caught.
 
-
-`tcatch EVENT'
-     Set a catchpoint that is enabled only for one stop.  The
-     catchpoint is automatically deleted after the first time the event
-     is caught.
-
-
-   Use the `info break' command to list the current catchpoints.
+   Use the 'info break' command to list the current catchpoints.
 
 
 File: gdb.info,  Node: Delete Breaks,  Next: Disabling,  Prev: Set Catchpoints,  Up: Breakpoints
@@ -3779,8 +3827,8 @@ catchpoint once it has done its job and 
 to stop there.  This is called "deleting" the breakpoint.  A breakpoint
 that has been deleted no longer exists; it is forgotten.
 
-   With the `clear' command you can delete breakpoints according to
-where they are in your program.  With the `delete' command you can
+   With the 'clear' command you can delete breakpoints according to
+where they are in your program.  With the 'delete' command you can
 delete individual breakpoints, watchpoints, or catchpoints by specifying
 their breakpoint numbers.
 
@@ -3789,32 +3837,32 @@ automatically ignores breakpoints on the
 executed when you continue execution without changing the execution
 address.
 
-`clear'
+'clear'
      Delete any breakpoints at the next instruction to be executed in
      the selected stack frame (*note Selecting a Frame: Selection.).
      When the innermost frame is selected, this is a good way to delete
      a breakpoint where your program just stopped.
 
-`clear LOCATION'
+'clear LOCATION'
      Delete any breakpoints set at the specified LOCATION.  *Note
      Specify Location::, for the various forms of LOCATION; the most
      useful ones are listed below:
 
-    `clear FUNCTION'
-    `clear FILENAME:FUNCTION'
+     'clear FUNCTION'
+     'clear FILENAME:FUNCTION'
           Delete any breakpoints set at entry to the named FUNCTION.
 
-    `clear LINENUM'
-    `clear FILENAME:LINENUM'
+     'clear LINENUM'
+     'clear FILENAME:LINENUM'
           Delete any breakpoints set at or within the code of the
           specified LINENUM of the specified FILENAME.
 
-`delete [breakpoints] [RANGE...]'
+'delete [breakpoints] [LIST...]'
      Delete the breakpoints, watchpoints, or catchpoints of the
-     breakpoint ranges specified as arguments.  If no argument is
+     breakpoint list specified as argument.  If no argument is
      specified, delete all breakpoints (GDB asks confirmation, unless
-     you have `set confirm off').  You can abbreviate this command as
-     `d'.
+     you have 'set confirm off').  You can abbreviate this command as
+     'd'.
 
 
 File: gdb.info,  Node: Disabling,  Next: Conditions,  Prev: Delete Breaks,  Up: Breakpoints
@@ -3828,8 +3876,8 @@ had been deleted, but remembers the info
 that you can "enable" it again later.
 
    You disable and enable breakpoints, watchpoints, and catchpoints with
-the `enable' and `disable' commands, optionally specifying one or more
-breakpoint numbers as arguments.  Use `info break' to print a list of
+the 'enable' and 'disable' commands, optionally specifying one or more
+breakpoint numbers as arguments.  Use 'info break' to print a list of
 all breakpoints, watchpoints, and catchpoints if you do not know which
 numbers to use.
 
@@ -3839,40 +3887,36 @@ affects all of its locations.
    A breakpoint, watchpoint, or catchpoint can have any of several
 different states of enablement:
 
-   * Enabled.  The breakpoint stops your program.  A breakpoint set
-     with the `break' command starts out in this state.
-
+   * Enabled.  The breakpoint stops your program.  A breakpoint set with
+     the 'break' command starts out in this state.
    * Disabled.  The breakpoint has no effect on your program.
-
    * Enabled once.  The breakpoint stops your program, but then becomes
      disabled.
-
    * Enabled for a count.  The breakpoint stops your program for the
      next N times, then becomes disabled.
-
    * Enabled for deletion.  The breakpoint stops your program, but
      immediately after it does so it is deleted permanently.  A
-     breakpoint set with the `tbreak' command starts out in this state.
+     breakpoint set with the 'tbreak' command starts out in this state.
 
    You can use the following commands to enable or disable breakpoints,
 watchpoints, and catchpoints:
 
-`disable [breakpoints] [RANGE...]'
+'disable [breakpoints] [LIST...]'
      Disable the specified breakpoints--or all breakpoints, if none are
      listed.  A disabled breakpoint has no effect but is not forgotten.
      All options such as ignore-counts, conditions and commands are
      remembered in case the breakpoint is enabled again later.  You may
-     abbreviate `disable' as `dis'.
+     abbreviate 'disable' as 'dis'.
 
-`enable [breakpoints] [RANGE...]'
+'enable [breakpoints] [LIST...]'
      Enable the specified breakpoints (or all defined breakpoints).
      They become effective once again in stopping your program.
 
-`enable [breakpoints] once RANGE...'
+'enable [breakpoints] once LIST...'
      Enable the specified breakpoints temporarily.  GDB disables any of
      these breakpoints immediately after stopping your program.
 
-`enable [breakpoints] count COUNT RANGE...'
+'enable [breakpoints] count COUNT LIST...'
      Enable the specified breakpoints temporarily.  GDB records COUNT
      with each of the specified breakpoints, and decrements a
      breakpoint's count when it is hit.  When any count reaches 0, GDB
@@ -3880,17 +3924,17 @@ watchpoints, and catchpoints:
      (*note Break Conditions: Conditions.), that will be decremented to
      0 before COUNT is affected.
 
-`enable [breakpoints] delete RANGE...'
+'enable [breakpoints] delete LIST...'
      Enable the specified breakpoints to work once, then die.  GDB
      deletes any of these breakpoints as soon as your program stops
-     there.  Breakpoints set by the `tbreak' command start out in this
+     there.  Breakpoints set by the 'tbreak' command start out in this
      state.
 
-   Except for a breakpoint set with `tbreak' (*note Setting
-Breakpoints: Set Breaks.), breakpoints that you set are initially
-enabled; subsequently, they become disabled or enabled only when you
-use one of the commands above.  (The command `until' can set and delete
-a breakpoint of its own, but it does not change the state of your other
+   Except for a breakpoint set with 'tbreak' (*note Setting Breakpoints:
+Set Breaks.), breakpoints that you set are initially enabled;
+subsequently, they become disabled or enabled only when you use one of
+the commands above.  (The command 'until' can set and delete a
+breakpoint of its own, but it does not change the state of your other
 breakpoints; see *note Continuing and Stepping: Continuing and
 Stepping.)
 
@@ -3909,9 +3953,9 @@ program stops only if the condition is _
 
    This is the converse of using assertions for program validation; in
 that situation, you want to stop when the assertion is violated--that
-is, when the condition is false.  In C, if you want to test an
-assertion expressed by the condition ASSERT, you should set the
-condition `! ASSERT' on the appropriate breakpoint.
+is, when the condition is false.  In C, if you want to test an assertion
+expressed by the condition ASSERT, you should set the condition '!
+ASSERT' on the appropriate breakpoint.
 
    Conditions are also accepted for watchpoints; you may not need them,
 since a watchpoint is inspecting the value of an expression anyhow--but
@@ -3923,12 +3967,12 @@ interesting one.
 in your program.  This can be useful, for example, to activate functions
 that log program progress, or to use your own print functions to format
 special data structures.  The effects are completely predictable unless
-there is another enabled breakpoint at the same address.  (In that
-case, GDB might see the other breakpoint first and stop your program
-without checking the condition of this one.)  Note that breakpoint
-commands are usually more convenient and flexible than break conditions
-for the purpose of performing side effects when a breakpoint is reached
-(*note Breakpoint Command Lists: Break Commands.).
+there is another enabled breakpoint at the same address.  (In that case,
+GDB might see the other breakpoint first and stop your program without
+checking the condition of this one.)  Note that breakpoint commands are
+usually more convenient and flexible than break conditions for the
+purpose of performing side effects when a breakpoint is reached (*note
+Breakpoint Command Lists: Break Commands.).
 
    Breakpoint conditions can also be evaluated on the target's side if
 the target supports it.  Instead of evaluating the conditions locally,
@@ -3944,19 +3988,19 @@ target since it does not need to keep GD
 breakpoint trigger, even those with false conditions.
 
    Break conditions can be specified when a breakpoint is set, by using
-`if' in the arguments to the `break' command.  *Note Setting
+'if' in the arguments to the 'break' command.  *Note Setting
 Breakpoints: Set Breaks.  They can also be changed at any time with the
-`condition' command.
+'condition' command.
 
-   You can also use the `if' keyword with the `watch' command.  The
-`catch' command does not recognize the `if' keyword; `condition' is the
+   You can also use the 'if' keyword with the 'watch' command.  The
+'catch' command does not recognize the 'if' keyword; 'condition' is the
 only way to impose a further condition on a catchpoint.
 
-`condition BNUM EXPRESSION'
+'condition BNUM EXPRESSION'
      Specify EXPRESSION as the break condition for breakpoint,
      watchpoint, or catchpoint number BNUM.  After you set a condition,
      breakpoint BNUM stops your program only if the value of EXPRESSION
-     is true (nonzero, in C).  When you use `condition', GDB checks
+     is true (nonzero, in C). When you use 'condition', GDB checks
      EXPRESSION immediately for syntactic correctness, and to determine
      whether symbols in it have referents in the context of your
      breakpoint.  If EXPRESSION uses symbols not referenced in the
@@ -3965,18 +4009,18 @@ only way to impose a further condition o
           No symbol "foo" in current context.
 
      GDB does not actually evaluate EXPRESSION at the time the
-     `condition' command (or a command that sets a breakpoint with a
-     condition, like `break if ...') is given, however.  *Note
+     'condition' command (or a command that sets a breakpoint with a
+     condition, like 'break if ...') is given, however.  *Note
      Expressions: Expressions.
 
-`condition BNUM'
+'condition BNUM'
      Remove the condition from breakpoint number BNUM.  It becomes an
      ordinary unconditional breakpoint.
 
    A special case of a breakpoint condition is to stop only when the
 breakpoint has been reached a certain number of times.  This is so
-useful that there is a special way to do it, using the "ignore count"
-of the breakpoint.  Every breakpoint has an ignore count, which is an
+useful that there is a special way to do it, using the "ignore count" of
+the breakpoint.  Every breakpoint has an ignore count, which is an
 integer.  Most of the time, the ignore count is zero, and therefore has
 no effect.  But if your program reaches a breakpoint whose ignore count
 is positive, then instead of stopping, it just decrements the ignore
@@ -3984,7 +4028,7 @@ count by one and continues.  As a result
 N, the breakpoint does not stop the next N times your program reaches
 it.
 
-`ignore BNUM COUNT'
+'ignore BNUM COUNT'
      Set the ignore count of breakpoint number BNUM to COUNT.  The next
      COUNT times the breakpoint is reached, your program's execution
      does not stop; other than to decrement the ignore count, GDB takes
@@ -3993,19 +4037,19 @@ it.
      To make the breakpoint stop the next time it is reached, specify a
      count of zero.
 
-     When you use `continue' to resume execution of your program from a
-     breakpoint, you can specify an ignore count directly as an
-     argument to `continue', rather than using `ignore'.  *Note
-     Continuing and Stepping: Continuing and Stepping.
+     When you use 'continue' to resume execution of your program from a
+     breakpoint, you can specify an ignore count directly as an argument
+     to 'continue', rather than using 'ignore'.  *Note Continuing and
+     Stepping: Continuing and Stepping.
 
      If a breakpoint has a positive ignore count and a condition, the
      condition is not checked.  Once the ignore count reaches zero, GDB
      resumes checking the condition.
 
      You could achieve the effect of the ignore count with a condition
-     such as `$foo-- <= 0' using a debugger convenience variable that
-     is decremented each time.  *Note Convenience Variables:
-     Convenience Vars.
+     such as '$foo-- <= 0' using a debugger convenience variable that is
+     decremented each time.  *Note Convenience Variables: Convenience
+     Vars.
 
    Ignore counts apply to breakpoints, watchpoints, and catchpoints.
 
@@ -4020,51 +4064,51 @@ commands to execute when your program st
 example, you might want to print the values of certain expressions, or
 enable other breakpoints.
 
-`commands [RANGE...]'
-`... COMMAND-LIST ...'
-`end'
+'commands [LIST...]'
+'... COMMAND-LIST ...'
+'end'
      Specify a list of commands for the given breakpoints.  The commands
      themselves appear on the following lines.  Type a line containing
-     just `end' to terminate the commands.
+     just 'end' to terminate the commands.
 
-     To remove all commands from a breakpoint, type `commands' and
-     follow it immediately with `end'; that is, give no commands.
+     To remove all commands from a breakpoint, type 'commands' and
+     follow it immediately with 'end'; that is, give no commands.
 
-     With no argument, `commands' refers to the last breakpoint,
+     With no argument, 'commands' refers to the last breakpoint,
      watchpoint, or catchpoint set (not to the breakpoint most recently
      encountered).  If the most recent breakpoints were set with a
-     single command, then the `commands' will apply to all the
+     single command, then the 'commands' will apply to all the
      breakpoints set by that command.  This applies to breakpoints set
-     by `rbreak', and also applies when a single `break' command
-     creates multiple breakpoints (*note Ambiguous Expressions:
-     Ambiguous Expressions.).
+     by 'rbreak', and also applies when a single 'break' command creates
+     multiple breakpoints (*note Ambiguous Expressions: Ambiguous
+     Expressions.).
 
    Pressing <RET> as a means of repeating the last GDB command is
 disabled within a COMMAND-LIST.
 
    You can use breakpoint commands to start your program up again.
-Simply use the `continue' command, or `step', or any other command that
+Simply use the 'continue' command, or 'step', or any other command that
 resumes execution.
 
    Any other commands in the command list, after a command that resumes
 execution, are ignored.  This is because any time you resume execution
-(even with a simple `next' or `step'), you may encounter another
+(even with a simple 'next' or 'step'), you may encounter another
 breakpoint--which could have its own command list, leading to
 ambiguities about which list to execute.
 
-   If the first command you specify in a command list is `silent', the
+   If the first command you specify in a command list is 'silent', the
 usual message about stopping at a breakpoint is not printed.  This may
 be desirable for breakpoints that are to print a specific message and
 then continue.  If none of the remaining commands print anything, you
-see no sign that the breakpoint was reached.  `silent' is meaningful
+see no sign that the breakpoint was reached.  'silent' is meaningful
 only at the beginning of a breakpoint command list.
 
-   The commands `echo', `output', and `printf' allow you to print
-precisely controlled output, and are often useful in silent
-breakpoints.  *Note Commands for Controlled Output: Output.
+   The commands 'echo', 'output', and 'printf' allow you to print
+precisely controlled output, and are often useful in silent breakpoints.
+*Note Commands for Controlled Output: Output.
 
    For example, here is how you could use breakpoint commands to print
-the value of `x' at entry to `foo' whenever `x' is positive.
+the value of 'x' at entry to 'foo' whenever 'x' is positive.
 
      break foo if x>0
      commands
@@ -4077,8 +4121,8 @@ the value of `x' at entry to `foo' whene
 so you can test for another.  Put a breakpoint just after the erroneous
 line of code, give it a condition to detect the case in which something
 erroneous has been done, and give it commands to assign correct values
-to any variables that need them.  End with the `continue' command so
-that your program does not stop, and start with the `silent' command so
+to any variables that need them.  End with the 'continue' command so
+that your program does not stop, and start with the 'silent' command so
 that no output is produced.  Here is an example:
 
      break 403
@@ -4094,17 +4138,17 @@ File: gdb.info,  Node: Dynamic Printf,  
 5.1.8 Dynamic Printf
 --------------------
 
-The dynamic printf command `dprintf' combines a breakpoint with
+The dynamic printf command 'dprintf' combines a breakpoint with
 formatted printing of your program's data to give you the effect of
-inserting `printf' calls into your program on-the-fly, without having
-to recompile it.
+inserting 'printf' calls into your program on-the-fly, without having to
+recompile it.
 
    In its most basic form, the output goes to the GDB console.  However,
-you can set the variable `dprintf-style' for alternate handling.  For
+you can set the variable 'dprintf-style' for alternate handling.  For
 instance, you can ask to format the output by calling your program's
-`printf' function.  This has the advantage that the characters go to
-the program's output device, so they can recorded in redirects to files
-and so forth.
+'printf' function.  This has the advantage that the characters go to the
+program's output device, so they can recorded in redirects to files and
+so forth.
 
    If you are doing remote debugging with a stub or agent, you can also
 ask to have the printf handled by the remote agent.  In addition to
@@ -4114,45 +4158,45 @@ dprintf remain active even after disconn
 Using the stub/agent is also more efficient, as it can do everything
 without needing to communicate with GDB.
 
-`dprintf LOCATION,TEMPLATE,EXPRESSION[,EXPRESSION...]'
+'dprintf LOCATION,TEMPLATE,EXPRESSION[,EXPRESSION...]'
      Whenever execution reaches LOCATION, print the values of one or
      more EXPRESSIONS under the control of the string TEMPLATE.  To
      print several values, separate them with commas.
 
-`set dprintf-style STYLE'
+'set dprintf-style STYLE'
      Set the dprintf output to be handled in one of several different
      styles enumerated below.  A change of style affects all existing
      dynamic printfs immediately.  (If you need individual control over
      the print commands, simply define normal breakpoints with
      explicitly-supplied command lists.)
 
-`gdb'
-     Handle the output using the GDB `printf' command.
+     'gdb'
+          Handle the output using the GDB 'printf' command.
 
-`call'
-     Handle the output by calling a function in your program (normally
-     `printf').
-
-`agent'
-     Have the remote debugging agent (such as `gdbserver') handle the
-     output itself.  This style is only available for agents that
-     support running commands on the target.
-
-`set dprintf-function FUNCTION'
-     Set the function to call if the dprintf style is `call'.  By
-     default its value is `printf'.  You may set it to any expression.
-     that GDB can evaluate to a function, as per the `call' command.
-
-`set dprintf-channel CHANNEL'
-     Set a "channel" for dprintf.  If set to a non-empty value, GDB
-     will evaluate it as an expression and pass the result as a first
-     argument to the `dprintf-function', in the manner of `fprintf' and
+     'call'
+          Handle the output by calling a function in your program
+          (normally 'printf').
+
+     'agent'
+          Have the remote debugging agent (such as 'gdbserver') handle
+          the output itself.  This style is only available for agents
+          that support running commands on the target.
+
+'set dprintf-function FUNCTION'
+     Set the function to call if the dprintf style is 'call'.  By
+     default its value is 'printf'.  You may set it to any expression.
+     that GDB can evaluate to a function, as per the 'call' command.
+
+'set dprintf-channel CHANNEL'
+     Set a "channel" for dprintf.  If set to a non-empty value, GDB will
+     evaluate it as an expression and pass the result as a first
+     argument to the 'dprintf-function', in the manner of 'fprintf' and
      similar functions.  Otherwise, the dprintf format string will be
-     the first argument, in the manner of `printf'.
+     the first argument, in the manner of 'printf'.
 
-     As an example, if you wanted `dprintf' output to go to a logfile
-     that is a standard I/O stream assigned to the variable `mylog',
-     you could do the following:
+     As an example, if you wanted 'dprintf' output to go to a logfile
+     that is a standard I/O stream assigned to the variable 'mylog', you
+     could do the following:
 
           (gdb) set dprintf-style call
           (gdb) set dprintf-function fprintf
@@ -4165,19 +4209,18 @@ without needing to communicate with GDB.
                   continue
           (gdb)
 
-     Note that the `info break' displays the dynamic printf commands as
+     Note that the 'info break' displays the dynamic printf commands as
      normal breakpoint commands; you can thus easily see the effect of
      the variable settings.
 
-`set disconnected-dprintf on'
-`set disconnected-dprintf off'
-     Choose whether `dprintf' commands should continue to run if GDB
-     has disconnected from the target.  This only applies if the
-     `dprintf-style' is `agent'.
-
-`show disconnected-dprintf off'
-     Show the current choice for disconnected `dprintf'.
+'set disconnected-dprintf on'
+'set disconnected-dprintf off'
+     Choose whether 'dprintf' commands should continue to run if GDB has
+     disconnected from the target.  This only applies if the
+     'dprintf-style' is 'agent'.
 
+'show disconnected-dprintf off'
+     Show the current choice for disconnected 'dprintf'.
 
    GDB does not check the validity of function and channel, relying on
 you to supply values that are meaningful for the contexts in which they
@@ -4192,23 +4235,23 @@ File: gdb.info,  Node: Save Breakpoints,
 5.1.9 How to save breakpoints to a file
 ---------------------------------------
 
-To save breakpoint definitions to a file use the `save breakpoints'
+To save breakpoint definitions to a file use the 'save breakpoints'
 command.
 
-`save breakpoints [FILENAME]'
+'save breakpoints [FILENAME]'
      This command saves all current breakpoint definitions together with
-     their commands and ignore counts, into a file `FILENAME' suitable
+     their commands and ignore counts, into a file 'FILENAME' suitable
      for use in a later debugging session.  This includes all types of
      breakpoints (breakpoints, watchpoints, catchpoints, tracepoints).
-     To read the saved breakpoint definitions, use the `source' command
+     To read the saved breakpoint definitions, use the 'source' command
      (*note Command Files::).  Note that watchpoints with expressions
      involving local variables may fail to be recreated because it may
-     not be possible to access the context where the watchpoint is
-     valid anymore.  Because the saved breakpoint definitions are
-     simply a sequence of GDB commands that recreate the breakpoints,
-     you can edit the file in your favorite editing program, and remove
-     the breakpoint definitions you're not interested in, or that can
-     no longer be recreated.
+     not be possible to access the context where the watchpoint is valid
+     anymore.  Because the saved breakpoint definitions are simply a
+     sequence of GDB commands that recreate the breakpoints, you can
+     edit the file in your favorite editing program, and remove the
+     breakpoint definitions you're not interested in, or that can no
+     longer be recreated.
 
 
 File: gdb.info,  Node: Static Probe Points,  Next: Error in Breakpoints,  Prev: Save Breakpoints,  Up: Breakpoints
@@ -4217,34 +4260,34 @@ File: gdb.info,  Node: Static Probe Poin
 --------------------------
 
 GDB supports "SDT" probes in the code.  SDT stands for Statically
-Defined Tracing, and the probes are designed to have a tiny runtime
-code and data footprint, and no dynamic relocations.
+Defined Tracing, and the probes are designed to have a tiny runtime code
+and data footprint, and no dynamic relocations.
 
    Currently, the following types of probes are supported on
 ELF-compatible systems:
 
-   * `SystemTap' (`http://sourceware.org/systemtap/') SDT probes(1).
-     `SystemTap' probes are usable from assembly, C and C++
+   * 'SystemTap' (<http://sourceware.org/systemtap/>) SDT probes(1).
+     'SystemTap' probes are usable from assembly, C and C++
      languages(2).
 
-   * `DTrace' (`http://oss.oracle.com/projects/DTrace') USDT probes.
-     `DTrace' probes are usable from C and C++ languages.
+   * 'DTrace' (<http://oss.oracle.com/projects/DTrace>) USDT probes.
+     'DTrace' probes are usable from C and C++ languages.
 
-   Some `SystemTap' probes have an associated semaphore variable; for
+   Some 'SystemTap' probes have an associated semaphore variable; for
 instance, this happens automatically if you defined your probe using a
-DTrace-style `.d' file.  If your probe has a semaphore, GDB will
+DTrace-style '.d' file.  If your probe has a semaphore, GDB will
 automatically enable it when you specify a breakpoint using the
-`-probe-stap' notation.  But, if you put a breakpoint at a probe's
-location by some other method (e.g., `break file:line'), then GDB will
-not automatically set the semaphore.  `DTrace' probes do not support
+'-probe-stap' notation.  But, if you put a breakpoint at a probe's
+location by some other method (e.g., 'break file:line'), then GDB will
+not automatically set the semaphore.  'DTrace' probes do not support
 semaphores.
 
-   You can examine the available static static probes using `info
+   You can examine the available static static probes using 'info
 probes', with optional arguments:
 
-`info probes [TYPE] [PROVIDER [NAME [OBJFILE]]]'
-     If given, TYPE is either `stap' for listing `SystemTap' probes or
-     `dtrace' for listing `DTrace' probes.  If omitted all probes are
+'info probes [TYPE] [PROVIDER [NAME [OBJFILE]]]'
+     If given, TYPE is either 'stap' for listing 'SystemTap' probes or
+     'dtrace' for listing 'DTrace' probes.  If omitted all probes are
      listed regardless of their types.
 
      If given, PROVIDER is a regular expression used to match against
@@ -4259,44 +4302,44 @@ probes', with optional arguments:
      object files (executable or shared libraries) to examine.  If not
      given, all object files are considered.
 
-`info probes all'
+'info probes all'
      List the available static probes, from all types.
 
    Some probe points can be enabled and/or disabled.  The effect of
 enabling or disabling a probe depends on the type of probe being
-handled.  Some `DTrace' probes can be enabled or disabled, but
-`SystemTap' probes cannot be disabled.
+handled.  Some 'DTrace' probes can be enabled or disabled, but
+'SystemTap' probes cannot be disabled.
 
    You can enable (or disable) one or more probes using the following
 commands, with optional arguments:
 
-`enable probes [PROVIDER [NAME [OBJFILE]]]'
+'enable probes [PROVIDER [NAME [OBJFILE]]]'
      If given, PROVIDER is a regular expression used to match against
      provider names when selecting which probes to enable.  If omitted,
      all probes from all providers are enabled.
 
-     If given, NAME is a regular expression to match against probe
-     names when selecting which probes to enable.  If omitted, probe
-     names are not considered when deciding whether to enable them.
+     If given, NAME is a regular expression to match against probe names
+     when selecting which probes to enable.  If omitted, probe names are
+     not considered when deciding whether to enable them.
 
      If given, OBJFILE is a regular expression used to select which
      object files (executable or shared libraries) to examine.  If not
      given, all object files are considered.
 
-`disable probes [PROVIDER [NAME [OBJFILE]]]'
-     See the `enable probes' command above for a description of the
+'disable probes [PROVIDER [NAME [OBJFILE]]]'
+     See the 'enable probes' command above for a description of the
      optional arguments accepted by this command.
 
    A probe may specify up to twelve arguments.  These are available at
 the point at which the probe is defined--that is, when the current PC is
 at the probe's location.  The arguments are available using the
 convenience variables (*note Convenience Vars::)
-`$_probe_arg0'...`$_probe_arg11'.  In `SystemTap' probes each probe
-argument is an integer of the appropriate size; types are not
-preserved.  In `DTrace' probes types are preserved provided that they
-are recognized as such by GDB; otherwise the value of the probe
-argument will be a long integer.  The convenience variable
-`$_probe_argc' holds the number of arguments at the current probe point.
+'$_probe_arg0'...'$_probe_arg11'.  In 'SystemTap' probes each probe
+argument is an integer of the appropriate size; types are not preserved.
+In 'DTrace' probes types are preserved provided that they are recognized
+as such by GDB; otherwise the value of the probe argument will be a long
+integer.  The convenience variable '$_probe_argc' holds the number of
+arguments at the current probe point.
 
    These variables are always available, but attempts to access them at
 any location other than a probe point will cause GDB to give an error
@@ -4305,12 +4348,12 @@ message.
    ---------- Footnotes ----------
 
    (1) See
-`http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps' for
-more information on how to add `SystemTap' SDT probes in your
+<http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps> for
+more information on how to add 'SystemTap' SDT probes in your
 applications.
 
    (2) See
-`http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation' for
+<http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation> for
 a good reference on how the SDT probes are implemented.
 
 
@@ -4338,26 +4381,24 @@ File: gdb.info,  Node: Breakpoint-relate
 5.1.12 "Breakpoint address adjusted..."
 ---------------------------------------
 
-Some processor architectures place constraints on the addresses at
-which breakpoints may be placed.  For architectures thus constrained,
-GDB will attempt to adjust the breakpoint's address to comply with the
+Some processor architectures place constraints on the addresses at which
+breakpoints may be placed.  For architectures thus constrained, GDB will
+attempt to adjust the breakpoint's address to comply with the
 constraints dictated by the architecture.
 
-   One example of such an architecture is the Fujitsu FR-V.  The FR-V is
+   One example of such an architecture is the Fujitsu FR-V. The FR-V is
 a VLIW architecture in which a number of RISC-like instructions may be
 bundled together for parallel execution.  The FR-V architecture
-constrains the location of a breakpoint instruction within such a
-bundle to the instruction with the lowest address.  GDB honors this
-constraint by adjusting a breakpoint's address to the first in the
-bundle.
+constrains the location of a breakpoint instruction within such a bundle
+to the instruction with the lowest address.  GDB honors this constraint
+by adjusting a breakpoint's address to the first in the bundle.
 
    It is not uncommon for optimized code to have bundles which contain
-instructions from different source statements, thus it may happen that
-a breakpoint's address will be adjusted from one source statement to
-another.  Since this adjustment may significantly alter GDB's
-breakpoint related behavior from what the user expects, a warning is
-printed when the breakpoint is first set and also when the breakpoint
-is hit.
+instructions from different source statements, thus it may happen that a
+breakpoint's address will be adjusted from one source statement to
+another.  Since this adjustment may significantly alter GDB's breakpoint
+related behavior from what the user expects, a warning is printed when
+the breakpoint is first set and also when the breakpoint is hit.
 
    A warning like the one below is printed when setting a breakpoint
 that's been subject to address adjustment:
@@ -4365,13 +4406,13 @@ that's been subject to address adjustmen
      warning: Breakpoint address adjusted from 0x00010414 to 0x00010410.
 
    Such warnings are printed both for user settable and GDB's internal
-breakpoints.  If you see one of these warnings, you should verify that
-a breakpoint set at the adjusted address will have the desired affect.
-If not, the breakpoint in question may be removed and other breakpoints
-may be set which will have the desired behavior.  E.g., it may be
-sufficient to place the breakpoint at a later instruction.  A
-conditional breakpoint may also be useful in some cases to prevent the
-breakpoint from triggering too often.
+breakpoints.  If you see one of these warnings, you should verify that a
+breakpoint set at the adjusted address will have the desired affect.  If
+not, the breakpoint in question may be removed and other breakpoints may
+be set which will have the desired behavior.  E.g., it may be sufficient
+to place the breakpoint at a later instruction.  A conditional
+breakpoint may also be useful in some cases to prevent the breakpoint
+from triggering too often.
 
    GDB will also issue a warning when stopping at one of these adjusted
 breakpoints:
@@ -4393,34 +4434,32 @@ File: gdb.info,  Node: Continuing and St
 completes normally.  In contrast, "stepping" means executing just one
 more "step" of your program, where "step" may mean either one line of
 source code, or one machine instruction (depending on what particular
-command you use).  Either when continuing or when stepping, your
-program may stop even sooner, due to a breakpoint or a signal.  (If it
-stops due to a signal, you may want to use `handle', or use `signal 0'
-to resume execution (*note Signals: Signals.), or you may step into the
-signal's handler (*note stepping and signal handlers::).)
-
-`continue [IGNORE-COUNT]'
-`c [IGNORE-COUNT]'
-`fg [IGNORE-COUNT]'
+command you use).  Either when continuing or when stepping, your program
+may stop even sooner, due to a breakpoint or a signal.  (If it stops due
+to a signal, you may want to use 'handle', or use 'signal 0' to resume
+execution (*note Signals: Signals.), or you may step into the signal's
+handler (*note stepping and signal handlers::).)
+
+'continue [IGNORE-COUNT]'
+'c [IGNORE-COUNT]'
+'fg [IGNORE-COUNT]'
      Resume program execution, at the address where your program last
      stopped; any breakpoints set at that address are bypassed.  The
      optional argument IGNORE-COUNT allows you to specify a further
-     number of times to ignore a breakpoint at this location; its
-     effect is like that of `ignore' (*note Break Conditions:
-     Conditions.).
+     number of times to ignore a breakpoint at this location; its effect
+     is like that of 'ignore' (*note Break Conditions: Conditions.).
 
      The argument IGNORE-COUNT is meaningful only when your program
      stopped due to a breakpoint.  At other times, the argument to
-     `continue' is ignored.
+     'continue' is ignored.
 
-     The synonyms `c' and `fg' (for "foreground", as the debugged
-     program is deemed to be the foreground program) are provided
-     purely for convenience, and have exactly the same behavior as
-     `continue'.
-
-   To resume execution at a different place, you can use `return'
-(*note Returning from a Function: Returning.) to go back to the calling
-function; or `jump' (*note Continuing at a Different Address: Jumping.)
+     The synonyms 'c' and 'fg' (for "foreground", as the debugged
+     program is deemed to be the foreground program) are provided purely
+     for convenience, and have exactly the same behavior as 'continue'.
+
+   To resume execution at a different place, you can use 'return' (*note
+Returning from a Function: Returning.) to go back to the calling
+function; or 'jump' (*note Continuing at a Different Address: Jumping.)
 to go to an arbitrary location in your program.
 
    A typical technique for using stepping is to set a breakpoint (*note
@@ -4430,101 +4469,101 @@ is believed to lie, run your program unt
 and then step through the suspect area, examining the variables that are
 interesting, until you see the problem happen.
 
-`step'
+'step'
      Continue running your program until control reaches a different
      source line, then stop it and return control to GDB.  This command
-     is abbreviated `s'.
+     is abbreviated 's'.
 
-          _Warning:_ If you use the `step' command while control is
+          _Warning:_ If you use the 'step' command while control is
           within a function that was compiled without debugging
           information, execution proceeds until control reaches a
           function that does have debugging information.  Likewise, it
           will not step into a function which is compiled without
           debugging information.  To step through functions without
-          debugging information, use the `stepi' command, described
+          debugging information, use the 'stepi' command, described
           below.
 
-     The `step' command only stops at the first instruction of a source
+     The 'step' command only stops at the first instruction of a source
      line.  This prevents the multiple stops that could otherwise occur
-     in `switch' statements, `for' loops, etc.  `step' continues to
-     stop if a function that has debugging information is called within
-     the line.  In other words, `step' _steps inside_ any functions
-     called within the line.
+     in 'switch' statements, 'for' loops, etc.  'step' continues to stop
+     if a function that has debugging information is called within the
+     line.  In other words, 'step' _steps inside_ any functions called
+     within the line.
 
-     Also, the `step' command only enters a function if there is line
+     Also, the 'step' command only enters a function if there is line
      number information for the function.  Otherwise it acts like the
-     `next' command.  This avoids problems when using `cc -gl' on MIPS
-     machines.  Previously, `step' entered subroutines if there was any
+     'next' command.  This avoids problems when using 'cc -gl' on MIPS
+     machines.  Previously, 'step' entered subroutines if there was any
      debugging information about the routine.
 
-`step COUNT'
-     Continue running as in `step', but do so COUNT times.  If a
+'step COUNT'
+     Continue running as in 'step', but do so COUNT times.  If a
      breakpoint is reached, or a signal not related to stepping occurs
      before COUNT steps, stepping stops right away.
 
-`next [COUNT]'
+'next [COUNT]'
      Continue to the next source line in the current (innermost) stack
-     frame.  This is similar to `step', but function calls that appear
+     frame.  This is similar to 'step', but function calls that appear
      within the line of code are executed without stopping.  Execution
-     stops when control reaches a different line of code at the
-     original stack level that was executing when you gave the `next'
-     command.  This command is abbreviated `n'.
+     stops when control reaches a different line of code at the original
+     stack level that was executing when you gave the 'next' command.
+     This command is abbreviated 'n'.
 
-     An argument COUNT is a repeat count, as for `step'.
+     An argument COUNT is a repeat count, as for 'step'.
 
-     The `next' command only stops at the first instruction of a source
+     The 'next' command only stops at the first instruction of a source
      line.  This prevents multiple stops that could otherwise occur in
-     `switch' statements, `for' loops, etc.
+     'switch' statements, 'for' loops, etc.
 
-`set step-mode'
-`set step-mode on'
-     The `set step-mode on' command causes the `step' command to stop
-     at the first instruction of a function which contains no debug line
+'set step-mode'
+'set step-mode on'
+     The 'set step-mode on' command causes the 'step' command to stop at
+     the first instruction of a function which contains no debug line
      information rather than stepping over it.
 
      This is useful in cases where you may be interested in inspecting
      the machine instructions of a function which has no symbolic info
      and do not want GDB to automatically skip over this function.
 
-`set step-mode off'
-     Causes the `step' command to step over any functions which
-     contains no debug information.  This is the default.
-
-`show step-mode'
-     Show whether GDB will stop in or step over functions without
-     source line debug information.
+'set step-mode off'
+     Causes the 'step' command to step over any functions which contains
+     no debug information.  This is the default.
+
+'show step-mode'
+     Show whether GDB will stop in or step over functions without source
+     line debug information.
 
-`finish'
+'finish'
      Continue running until just after function in the selected stack
      frame returns.  Print the returned value (if any).  This command
-     can be abbreviated as `fin'.
+     can be abbreviated as 'fin'.
 
-     Contrast this with the `return' command (*note Returning from a
+     Contrast this with the 'return' command (*note Returning from a
      Function: Returning.).
 
-`until'
-`u'
+'until'
+'u'
      Continue running until a source line past the current line, in the
      current stack frame, is reached.  This command is used to avoid
      single stepping through a loop more than once.  It is like the
-     `next' command, except that when `until' encounters a jump, it
+     'next' command, except that when 'until' encounters a jump, it
      automatically continues execution until the program counter is
      greater than the address of the jump.
 
      This means that when you reach the end of a loop after single
-     stepping though it, `until' makes your program continue execution
-     until it exits the loop.  In contrast, a `next' command at the end
+     stepping though it, 'until' makes your program continue execution
+     until it exits the loop.  In contrast, a 'next' command at the end
      of a loop simply steps back to the beginning of the loop, which
      forces you to step through the next iteration.
 
-     `until' always stops your program if it attempts to exit the
+     'until' always stops your program if it attempts to exit the
      current stack frame.
 
-     `until' may produce somewhat counterintuitive results if the order
+     'until' may produce somewhat counterintuitive results if the order
      of machine code does not match the order of the source lines.  For
-     example, in the following excerpt from a debugging session, the `f'
-     (`frame') command shows that execution is stopped at line `206';
-     yet when we use `until', we get to line `195':
+     example, in the following excerpt from a debugging session, the 'f'
+     ('frame') command shows that execution is stopped at line '206';
+     yet when we use 'until', we get to line '195':
 
           (gdb) f
           #0  main (argc=4, argv=0xf7fffae8) at m4.c:206
@@ -4534,27 +4573,27 @@ interesting, until you see the problem h
 
      This happened because, for execution efficiency, the compiler had
      generated code for the loop closure test at the end, rather than
-     the start, of the loop--even though the test in a C `for'-loop is
-     written before the body of the loop.  The `until' command appeared
+     the start, of the loop--even though the test in a C 'for'-loop is
+     written before the body of the loop.  The 'until' command appeared
      to step back to the beginning of the loop when it advanced to this
      expression; however, it has not really gone to an earlier
      statement--not in terms of the actual machine code.
 
-     `until' with no argument works by means of single instruction
-     stepping, and hence is slower than `until' with an argument.
+     'until' with no argument works by means of single instruction
+     stepping, and hence is slower than 'until' with an argument.
 
-`until LOCATION'
-`u LOCATION'
+'until LOCATION'
+'u LOCATION'
      Continue running your program until either the specified LOCATION
      is reached, or the current stack frame returns.  The location is
      any of the forms described in *note Specify Location::.  This form
      of the command uses temporary breakpoints, and hence is quicker
-     than `until' without an argument.  The specified location is
+     than 'until' without an argument.  The specified location is
      actually reached only if it is in the current frame.  This implies
-     that `until' can be used to skip over recursive function
+     that 'until' can be used to skip over recursive function
      invocations.  For instance in the code below, if the current
-     location is line `96', issuing `until 99' will execute the program
-     up to line `99' in the same invocation of factorial, i.e., after
+     location is line '96', issuing 'until 99' will execute the program
+     up to line '99' in the same invocation of factorial, i.e., after
      the inner invocations have returned.
 
           94	int factorial (int value)
@@ -4565,58 +4604,55 @@ interesting, until you see the problem h
           99	    return (value);
           100     }
 
-`advance LOCATION'
-     Continue running the program up to the given LOCATION.  An
-     argument is required, which should be of one of the forms
-     described in *note Specify Location::.  Execution will also stop
-     upon exit from the current stack frame.  This command is similar
-     to `until', but `advance' will not skip over recursive function
-     calls, and the target location doesn't have to be in the same
-     frame as the current one.
-
-`stepi'
-`stepi ARG'
-`si'
+'advance LOCATION'
+     Continue running the program up to the given LOCATION.  An argument
+     is required, which should be of one of the forms described in *note
+     Specify Location::.  Execution will also stop upon exit from the
+     current stack frame.  This command is similar to 'until', but
+     'advance' will not skip over recursive function calls, and the
+     target location doesn't have to be in the same frame as the current
+     one.
+
+'stepi'
+'stepi ARG'
+'si'
      Execute one machine instruction, then stop and return to the
      debugger.
 
-     It is often useful to do `display/i $pc' when stepping by machine
+     It is often useful to do 'display/i $pc' when stepping by machine
      instructions.  This makes GDB automatically display the next
      instruction to be executed, each time your program stops.  *Note
      Automatic Display: Auto Display.
 
-     An argument is a repeat count, as in `step'.
+     An argument is a repeat count, as in 'step'.
 
-`nexti'
-`nexti ARG'
-`ni'
+'nexti'
+'nexti ARG'
+'ni'
      Execute one machine instruction, but if it is a function call,
      proceed until the function returns.
 
-     An argument is a repeat count, as in `next'.
-
+     An argument is a repeat count, as in 'next'.
 
-   By default, and if available, GDB makes use of target-assisted
-"range stepping".  In other words, whenever you use a stepping command
-(e.g., `step', `next'), GDB tells the target to step the corresponding
-range of instruction addresses instead of issuing multiple
-single-steps.  This speeds up line stepping, particularly for remote
-targets.  Ideally, there should be no reason you would want to turn
-range stepping off.  However, it's possible that a bug in the debug
-info, a bug in the remote stub (for remote targets), or even a bug in
-GDB could make line stepping behave incorrectly when target-assisted
-range stepping is enabled.  You can use the following command to turn
-off range stepping if necessary:
+   By default, and if available, GDB makes use of target-assisted "range
+stepping".  In other words, whenever you use a stepping command (e.g.,
+'step', 'next'), GDB tells the target to step the corresponding range of
+instruction addresses instead of issuing multiple single-steps.  This
+speeds up line stepping, particularly for remote targets.  Ideally,
+there should be no reason you would want to turn range stepping off.
+However, it's possible that a bug in the debug info, a bug in the remote
+stub (for remote targets), or even a bug in GDB could make line stepping
+behave incorrectly when target-assisted range stepping is enabled.  You
+can use the following command to turn off range stepping if necessary:
 
-`set range-stepping'
-`show range-stepping'
+'set range-stepping'
+'show range-stepping'
      Control whether range stepping is enabled.
 
-     If `on', and the target supports it, GDB tells the target to step
-     a range of addresses itself, instead of issuing multiple
-     single-steps.  If `off', GDB always issues single-steps, even if
-     range stepping is supported by the target.  The default is `on'.
-
+     If 'on', and the target supports it, GDB tells the target to step a
+     range of addresses itself, instead of issuing multiple
+     single-steps.  If 'off', GDB always issues single-steps, even if
+     range stepping is supported by the target.  The default is 'on'.
 
 
 File: gdb.info,  Node: Skipping Over Functions and Files,  Next: Signals,  Prev: Continuing and Stepping,  Up: Stopping
@@ -4625,8 +4661,9 @@ File: gdb.info,  Node: Skipping Over Fun
 =====================================
 
 The program you are debugging may contain some functions which are
-uninteresting to debug.  The `skip' comand lets you tell GDB to skip a
-function or all functions in a file when stepping.
+uninteresting to debug.  The 'skip' command lets you tell GDB to skip a
+function, all functions in a file or a particular function in a
+particular file when stepping.
 
    For example, consider the following C function:
 
@@ -4636,87 +4673,136 @@ function or all functions in a file when
      104         bar(boring());
      105     }
 
-Suppose you wish to step into the functions `foo' and `bar', but you
-are not interested in stepping through `boring'.  If you run `step' at
-line 103, you'll enter `boring()', but if you run `next', you'll step
-over both `foo' and `boring'!
+Suppose you wish to step into the functions 'foo' and 'bar', but you are
+not interested in stepping through 'boring'.  If you run 'step' at line
+103, you'll enter 'boring()', but if you run 'next', you'll step over
+both 'foo' and 'boring'!
 
-   One solution is to `step' into `boring' and use the `finish' command
-to immediately exit it.  But this can become tedious if `boring' is
+   One solution is to 'step' into 'boring' and use the 'finish' command
+to immediately exit it.  But this can become tedious if 'boring' is
 called from many places.
 
-   A more flexible solution is to execute `skip boring'.  This instructs
-GDB never to step into `boring'.  Now when you execute `step' at line
-103, you'll step over `boring' and directly into `foo'.
+   A more flexible solution is to execute 'skip boring'.  This instructs
+GDB never to step into 'boring'.  Now when you execute 'step' at line
+103, you'll step over 'boring' and directly into 'foo'.
+
+   Functions may be skipped by providing either a function name,
+linespec (*note Specify Location::), regular expression that matches the
+function's name, file name or a 'glob'-style pattern that matches the
+file name.
+
+   On Posix systems the form of the regular expression is "Extended
+Regular Expressions".  See for example 'man 7 regex' on GNU/Linux
+systems.  On non-Posix systems the form of the regular expression is
+whatever is provided by the 'regcomp' function of the underlying system.
+See for example 'man 7 glob' on GNU/Linux systems for a description of
+'glob'-style patterns.
+
+'skip [OPTIONS]'
+     The basic form of the 'skip' command takes zero or more options
+     that specify what to skip.  The OPTIONS argument is any useful
+     combination of the following:
+
+     '-file FILE'
+     '-fi FILE'
+          Functions in FILE will be skipped over when stepping.
+
+     '-gfile FILE-GLOB-PATTERN'
+     '-gfi FILE-GLOB-PATTERN'
+          Functions in files matching FILE-GLOB-PATTERN will be skipped
+          over when stepping.
+
+               (gdb) skip -gfi utils/*.c
+
+     '-function LINESPEC'
+     '-fu LINESPEC'
+          Functions named by LINESPEC or the function containing the
+          line named by LINESPEC will be skipped over when stepping.
+          *Note Specify Location::.
+
+     '-rfunction REGEXP'
+     '-rfu REGEXP'
+          Functions whose name matches REGEXP will be skipped over when
+          stepping.
+
+          This form is useful for complex function names.  For example,
+          there is generally no need to step into C++ 'std::string'
+          constructors or destructors.  Plus with C++ templates it can
+          be hard to write out the full name of the function, and often
+          it doesn't matter what the template arguments are.  Specifying
+          the function to be skipped as a regular expression makes this
+          easier.
+
+               (gdb) skip -rfu ^std::(allocator|basic_string)<.*>::~?\1 *\(
+
+          If you want to skip every templated C++ constructor and
+          destructor in the 'std' namespace you can do:
 
-   You can also instruct GDB to skip all functions in a file, with, for
-example, `skip file boring.c'.
+               (gdb) skip -rfu ^std::([a-zA-z0-9_]+)<.*>::~?\1 *\(
+
+     If no options are specified, the function you're currently
+     debugging will be skipped.
 
-`skip [LINESPEC]'
-`skip function [LINESPEC]'
+'skip function [LINESPEC]'
      After running this command, the function named by LINESPEC or the
-     function containing the line named by LINESPEC will be skipped
-     over when stepping.  *Note Specify Location::.
+     function containing the line named by LINESPEC will be skipped over
+     when stepping.  *Note Specify Location::.
 
      If you do not specify LINESPEC, the function you're currently
      debugging will be skipped.
 
-     (If you have a function called `file' that you want to skip, use
-     `skip function file'.)
+     (If you have a function called 'file' that you want to skip, use
+     'skip function file'.)
 
-`skip file [FILENAME]'
+'skip file [FILENAME]'
      After running this command, any function whose source lives in
      FILENAME will be skipped over when stepping.
 
-     If you do not specify FILENAME, functions whose source lives in
-     the file you're currently debugging will be skipped.
+          (gdb) skip file boring.c
+          File boring.c will be skipped when stepping.
+
+     If you do not specify FILENAME, functions whose source lives in the
+     file you're currently debugging will be skipped.
 
    Skips can be listed, deleted, disabled, and enabled, much like
 breakpoints.  These are the commands for managing your list of skips:
 
-`info skip [RANGE]'
+'info skip [RANGE]'
      Print details about the specified skip(s).  If RANGE is not
-     specified, print a table with details about all functions and
-     files marked for skipping.  `info skip' prints the following
-     information about each skip:
+     specified, print a table with details about all functions and files
+     marked for skipping.  'info skip' prints the following information
+     about each skip:
 
-    _Identifier_
+     _Identifier_
           A number identifying this skip.
+     _Enabled or Disabled_
+          Enabled skips are marked with 'y'.  Disabled skips are marked
+          with 'n'.
+     _Glob_
+          If the file name is a 'glob' pattern this is 'y'.  Otherwise
+          it is 'n'.
+     _File_
+          The name or 'glob' pattern of the file to be skipped.  If no
+          file is specified this is '<none>'.
+     _RE_
+          If the function name is a 'regular expression' this is 'y'.
+          Otherwise it is 'n'.
+     _Function_
+          The name or regular expression of the function to skip.  If no
+          function is specified this is '<none>'.
 
-    _Type_
-          The type of this skip, either `function' or `file'.
-
-    _Enabled or Disabled_
-          Enabled skips are marked with `y'.  Disabled skips are marked
-          with `n'.
-
-    _Address_
-          For function skips, this column indicates the address in
-          memory of the function being skipped.  If you've set a
-          function skip on a function which has not yet been loaded,
-          this field will contain `<PENDING>'.  Once a shared library
-          which has the function is loaded, `info skip' will show the
-          function's address here.
-
-    _What_
-          For file skips, this field contains the filename being
-          skipped.  For functions skips, this field contains the
-          function name and its line number in the file where it is
-          defined.
-
-`skip delete [RANGE]'
+'skip delete [RANGE]'
      Delete the specified skip(s).  If RANGE is not specified, delete
      all skips.
 
-`skip enable [RANGE]'
+'skip enable [RANGE]'
      Enable the specified skip(s).  If RANGE is not specified, enable
      all skips.
 
-`skip disable [RANGE]'
+'skip disable [RANGE]'
      Disable the specified skip(s).  If RANGE is not specified, disable
      all skips.
 
-
 
 File: gdb.info,  Node: Signals,  Next: Thread Stops,  Prev: Skipping Over Functions and Files,  Up: Stopping
 
@@ -4725,129 +4811,129 @@ File: gdb.info,  Node: Signals,  Next: T
 
 A signal is an asynchronous event that can happen in a program.  The
 operating system defines the possible kinds of signals, and gives each
-kind a name and a number.  For example, in Unix `SIGINT' is the signal
-a program gets when you type an interrupt character (often `Ctrl-c');
-`SIGSEGV' is the signal a program gets from referencing a place in
-memory far away from all the areas in use; `SIGALRM' occurs when the
+kind a name and a number.  For example, in Unix 'SIGINT' is the signal a
+program gets when you type an interrupt character (often 'Ctrl-c');
+'SIGSEGV' is the signal a program gets from referencing a place in
+memory far away from all the areas in use; 'SIGALRM' occurs when the
 alarm clock timer goes off (which happens only if your program has
 requested an alarm).
 
-   Some signals, including `SIGALRM', are a normal part of the
-functioning of your program.  Others, such as `SIGSEGV', indicate
+   Some signals, including 'SIGALRM', are a normal part of the
+functioning of your program.  Others, such as 'SIGSEGV', indicate
 errors; these signals are "fatal" (they kill your program immediately)
-if the program has not specified in advance some other way to handle
-the signal.  `SIGINT' does not indicate an error in your program, but
-it is normally fatal so it can carry out the purpose of the interrupt:
-to kill the program.
+if the program has not specified in advance some other way to handle the
+signal.  'SIGINT' does not indicate an error in your program, but it is
+normally fatal so it can carry out the purpose of the interrupt: to kill
+the program.
 
    GDB has the ability to detect any occurrence of a signal in your
 program.  You can tell GDB in advance what to do for each kind of
 signal.
 
    Normally, GDB is set up to let the non-erroneous signals like
-`SIGALRM' be silently passed to your program (so as not to interfere
+'SIGALRM' be silently passed to your program (so as not to interfere
 with their role in the program's functioning) but to stop your program
 immediately whenever an error signal happens.  You can change these
-settings with the `handle' command.
+settings with the 'handle' command.
 
-`info signals'
-`info handle'
-     Print a table of all the kinds of signals and how GDB has been
-     told to handle each one.  You can use this to see the signal
-     numbers of all the defined types of signals.
+'info signals'
+'info handle'
+     Print a table of all the kinds of signals and how GDB has been told
+     to handle each one.  You can use this to see the signal numbers of
+     all the defined types of signals.
 
-`info signals SIG'
+'info signals SIG'
      Similar, but print information only about the specified signal
      number.
 
-     `info handle' is an alias for `info signals'.
+     'info handle' is an alias for 'info signals'.
 
-`catch signal [SIGNAL... | `all']'
+'catch signal [SIGNAL... | 'all']'
      Set a catchpoint for the indicated signals.  *Note Set
      Catchpoints::, for details about this command.
 
-`handle SIGNAL [KEYWORDS...]'
+'handle SIGNAL [KEYWORDS...]'
      Change the way GDB handles signal SIGNAL.  The SIGNAL can be the
-     number of a signal or its name (with or without the `SIG' at the
-     beginning); a list of signal numbers of the form `LOW-HIGH'; or
-     the word `all', meaning all the known signals.  Optional arguments
+     number of a signal or its name (with or without the 'SIG' at the
+     beginning); a list of signal numbers of the form 'LOW-HIGH'; or the
+     word 'all', meaning all the known signals.  Optional arguments
      KEYWORDS, described below, say what change to make.
 
-   The keywords allowed by the `handle' command can be abbreviated.
+   The keywords allowed by the 'handle' command can be abbreviated.
 Their full names are:
 
-`nostop'
+'nostop'
      GDB should not stop your program when this signal happens.  It may
      still print a message telling you that the signal has come in.
 
-`stop'
+'stop'
      GDB should stop your program when this signal happens.  This
-     implies the `print' keyword as well.
+     implies the 'print' keyword as well.
 
-`print'
+'print'
      GDB should print a message when this signal happens.
 
-`noprint'
+'noprint'
      GDB should not mention the occurrence of the signal at all.  This
-     implies the `nostop' keyword as well.
+     implies the 'nostop' keyword as well.
 
-`pass'
-`noignore'
+'pass'
+'noignore'
      GDB should allow your program to see this signal; your program can
      handle the signal, or else it may terminate if the signal is fatal
-     and not handled.  `pass' and `noignore' are synonyms.
+     and not handled.  'pass' and 'noignore' are synonyms.
 
-`nopass'
-`ignore'
-     GDB should not allow your program to see this signal.  `nopass'
-     and `ignore' are synonyms.
+'nopass'
+'ignore'
+     GDB should not allow your program to see this signal.  'nopass' and
+     'ignore' are synonyms.
 
    When a signal stops your program, the signal is not visible to the
 program until you continue.  Your program sees the signal then, if
-`pass' is in effect for the signal in question _at that time_.  In
-other words, after GDB reports a signal, you can use the `handle'
-command with `pass' or `nopass' to control whether your program sees
-that signal when you continue.
-
-   The default is set to `nostop', `noprint', `pass' for non-erroneous
-signals such as `SIGALRM', `SIGWINCH' and `SIGCHLD', and to `stop',
-`print', `pass' for the erroneous signals.
+'pass' is in effect for the signal in question _at that time_.  In other
+words, after GDB reports a signal, you can use the 'handle' command with
+'pass' or 'nopass' to control whether your program sees that signal when
+you continue.
+
+   The default is set to 'nostop', 'noprint', 'pass' for non-erroneous
+signals such as 'SIGALRM', 'SIGWINCH' and 'SIGCHLD', and to 'stop',
+'print', 'pass' for the erroneous signals.
 
-   You can also use the `signal' command to prevent your program from
+   You can also use the 'signal' command to prevent your program from
 seeing a signal, or cause it to see a signal it normally would not see,
 or to give it any signal at any time.  For example, if your program
 stopped due to some sort of memory reference error, you might store
 correct values into the erroneous variables and continue, hoping to see
 more execution; but your program would probably terminate immediately as
 a result of the fatal signal once it saw the signal.  To prevent this,
-you can continue with `signal 0'.  *Note Giving your Program a Signal:
+you can continue with 'signal 0'.  *Note Giving your Program a Signal:
 Signaling.
 
    GDB optimizes for stepping the mainline code.  If a signal that has
-`handle nostop' and `handle pass' set arrives while a stepping command
-(e.g., `stepi', `step', `next') is in progress, GDB lets the signal
+'handle nostop' and 'handle pass' set arrives while a stepping command
+(e.g., 'stepi', 'step', 'next') is in progress, GDB lets the signal
 handler run and then resumes stepping the mainline code once the signal
 handler returns.  In other words, GDB steps over the signal handler.
 This prevents signals that you've specified as not interesting (with
-`handle nostop') from changing the focus of debugging unexpectedly.
-Note that the signal handler itself may still hit a breakpoint, stop
-for another signal that has `handle stop' in effect, or for any other
-event that normally results in stopping the stepping command sooner.
-Also note that GDB still informs you that the program received a signal
-if `handle print' is set.
-
-   If you set `handle pass' for a signal, and your program sets up a
-handler for it, then issuing a stepping command, such as `step' or
-`stepi', when your program is stopped due to the signal will step
-_into_ the signal handler (if the target supports that).
+'handle nostop') from changing the focus of debugging unexpectedly.
+Note that the signal handler itself may still hit a breakpoint, stop for
+another signal that has 'handle stop' in effect, or for any other event
+that normally results in stopping the stepping command sooner.  Also
+note that GDB still informs you that the program received a signal if
+'handle print' is set.
+
+   If you set 'handle pass' for a signal, and your program sets up a
+handler for it, then issuing a stepping command, such as 'step' or
+'stepi', when your program is stopped due to the signal will step _into_
+the signal handler (if the target supports that).
 
-   Likewise, if you use the `queue-signal' command to queue a signal to
+   Likewise, if you use the 'queue-signal' command to queue a signal to
 be delivered to the current thread when execution of the thread resumes
 (*note Giving your Program a Signal: Signaling.), then a stepping
 command will step into the signal handler.
 
-   Here's an example, using `stepi' to step to the first instruction of
-`SIGUSR1''s handler:
+   Here's an example, using 'stepi' to step to the first instruction of
+'SIGUSR1''s handler:
 
      (gdb) handle SIGUSR1
      Signal        Stop      Print   Pass to program Description
@@ -4862,8 +4948,8 @@ command will step into the signal handle
      sigusr1_handler () at sigusr1.c:9
      9       {
 
-   The same, but using `queue-signal' instead of waiting for the
-program to receive the signal first:
+   The same, but using 'queue-signal' instead of waiting for the program
+to receive the signal first:
 
      (gdb) n
      28        p = 0;
@@ -4875,13 +4961,13 @@ program to receive the signal first:
 
    On some targets, GDB can inspect extra signal information associated
 with the intercepted signal, before it is actually delivered to the
-program being debugged.  This information is exported by the
-convenience variable `$_siginfo', and consists of data that is passed
-by the kernel to the signal handler at the time of the receipt of a
-signal.  The data type of the information itself is target dependent.
-You can see the data type using the `ptype $_siginfo' command.  On Unix
-systems, it typically corresponds to the standard `siginfo_t' type, as
-defined in the `signal.h' system header.
+program being debugged.  This information is exported by the convenience
+variable '$_siginfo', and consists of data that is passed by the kernel
+to the signal handler at the time of the receipt of a signal.  The data
+type of the information itself is target dependent.  You can see the
+data type using the 'ptype $_siginfo' command.  On Unix systems, it
+typically corresponds to the standard 'siginfo_t' type, as defined in
+the 'signal.h' system header.
 
    Here's an example, on a GNU/Linux system, printing the stray
 referenced address that raised a segmentation fault.
@@ -4912,7 +4998,27 @@ referenced address that raised a segment
      (gdb) p $_siginfo._sifields._sigfault.si_addr
      $1 = (void *) 0x7ffff7ff7000
 
-   Depending on target support, `$_siginfo' may also be writable.
+   Depending on target support, '$_siginfo' may also be writable.
+
+   On some targets, a 'SIGSEGV' can be caused by a boundary violation,
+i.e., accessing an address outside of the allowed range.  In those cases
+GDB may displays additional information, depending on how GDB has been
+told to handle the signal.  With 'handle stop SIGSEGV', GDB displays the
+violation kind: "Upper" or "Lower", the memory address accessed and the
+bounds, while with 'handle nostop SIGSEGV' no additional information is
+displayed.
+
+   The usual output of a segfault is:
+     Program received signal SIGSEGV, Segmentation fault
+     0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
+     68        value = *(p + len);
+
+   While a bound violation is presented as:
+     Program received signal SIGSEGV, Segmentation fault
+     Upper bound violation while accessing address 0x7fffffffc3b3
+     Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
+     0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
+     68        value = *(p + len);
 
 
 File: gdb.info,  Node: Thread Stops,  Prev: Signals,  Up: Stopping
@@ -4924,11 +5030,10 @@ GDB supports debugging programs with mul
 Programs with Multiple Threads: Threads.).  There are two modes of
 controlling execution of your program within the debugger.  In the
 default mode, referred to as "all-stop mode", when any thread in your
-program stops (for example, at a breakpoint or while being stepped),
-all other threads in the program are also stopped by GDB.  On some
-targets, GDB also supports "non-stop mode", in which other threads can
-continue to run freely while you examine the stopped thread in the
-debugger.
+program stops (for example, at a breakpoint or while being stepped), all
+other threads in the program are also stopped by GDB.  On some targets,
+GDB also supports "non-stop mode", in which other threads can continue
+to run freely while you examine the stopped thread in the debugger.
 
 * Menu:
 
@@ -4953,14 +5058,14 @@ underfoot.
 
    Conversely, whenever you restart the program, _all_ threads start
 executing.  _This is true even when single-stepping_ with commands like
-`step' or `next'.
+'step' or 'next'.
 
-   In particular, GDB cannot single-step all threads in lockstep.
-Since thread scheduling is up to your debugging target's operating
-system (not controlled by GDB), other threads may execute more than one
-statement while the current thread completes a single step.  Moreover,
-in general other threads stop in the middle of a statement, rather than
-at a clean statement boundary, when the program stops.
+   In particular, GDB cannot single-step all threads in lockstep.  Since
+thread scheduling is up to your debugging target's operating system (not
+controlled by GDB), other threads may execute more than one statement
+while the current thread completes a single step.  Moreover, in general
+other threads stop in the middle of a statement, rather than at a clean
+statement boundary, when the program stops.
 
    You might even find your program stopped in another thread after
 continuing or even single-stepping.  This happens whenever some other
@@ -4970,49 +5075,51 @@ first thread completes whatever you requ
    Whenever GDB stops your program, due to a breakpoint or a signal, it
 automatically selects the thread where that breakpoint or signal
 happened.  GDB alerts you to the context switch with a message such as
-`[Switching to Thread N]' to identify the thread.
+'[Switching to Thread N]' to identify the thread.
 
-   On some OSes, you can modify GDB's default behavior by locking the
-OS scheduler to allow only a single thread to run.
+   On some OSes, you can modify GDB's default behavior by locking the OS
+scheduler to allow only a single thread to run.
 
-`set scheduler-locking MODE'
-     Set the scheduler locking mode.  If it is `off', then there is no
-     locking and any thread may run at any time.  If `on', then only the
-     current thread may run when the inferior is resumed.  The `step'
+'set scheduler-locking MODE'
+     Set the scheduler locking mode.  It applies to normal execution,
+     record mode, and replay mode.  If it is 'off', then there is no
+     locking and any thread may run at any time.  If 'on', then only the
+     current thread may run when the inferior is resumed.  The 'step'
      mode optimizes for single-stepping; it prevents other threads from
      preempting the current thread while you are stepping, so that the
      focus of debugging does not change unexpectedly.  Other threads
      never get a chance to run when you step, and they are completely
-     free to run when you use commands like `continue', `until', or
-     `finish'.  However, unless another thread hits a breakpoint during
-     its timeslice, GDB does not change the current thread away from
-     the thread that you are debugging.
+     free to run when you use commands like 'continue', 'until', or
+     'finish'.  However, unless another thread hits a breakpoint during
+     its timeslice, GDB does not change the current thread away from the
+     thread that you are debugging.  The 'replay' mode behaves like
+     'off' in record mode and like 'on' in replay mode.
 
-`show scheduler-locking'
+'show scheduler-locking'
      Display the current scheduler locking mode.
 
    By default, when you issue one of the execution commands such as
-`continue', `next' or `step', GDB allows only threads of the current
-inferior to run.  For example, if GDB is attached to two inferiors,
-each with two threads, the `continue' command resumes only the two
-threads of the current inferior.  This is useful, for example, when you
-debug a program that forks and you want to hold the parent stopped (so
-that, for instance, it doesn't run to exit), while you debug the child.
-In other situations, you may not be interested in inspecting the
-current state of any of the processes GDB is attached to, and you may
-want to resume them all until some breakpoint is hit.  In the latter
-case, you can instruct GDB to allow all threads of all the inferiors to
-run with the `set schedule-multiple' command.
+'continue', 'next' or 'step', GDB allows only threads of the current
+inferior to run.  For example, if GDB is attached to two inferiors, each
+with two threads, the 'continue' command resumes only the two threads of
+the current inferior.  This is useful, for example, when you debug a
+program that forks and you want to hold the parent stopped (so that, for
+instance, it doesn't run to exit), while you debug the child.  In other
+situations, you may not be interested in inspecting the current state of
+any of the processes GDB is attached to, and you may want to resume them
+all until some breakpoint is hit.  In the latter case, you can instruct
+GDB to allow all threads of all the inferiors to run with the
+'set schedule-multiple' command.
 
-`set schedule-multiple'
+'set schedule-multiple'
      Set the mode for allowing threads of multiple processes to be
-     resumed when an execution command is issued.  When `on', all
-     threads of all processes are allowed to run.  When `off', only the
-     threads of the current process are resumed.  The default is `off'.
-     The `scheduler-locking' mode takes precedence when set to `on', or
-     while you are stepping and set to `step'.
+     resumed when an execution command is issued.  When 'on', all
+     threads of all processes are allowed to run.  When 'off', only the
+     threads of the current process are resumed.  The default is 'off'.
+     The 'scheduler-locking' mode takes precedence when set to 'on', or
+     while you are stepping and set to 'step'.
 
-`show schedule-multiple'
+'show schedule-multiple'
      Display the current mode for resuming the execution of threads of
      multiple processes.
 
@@ -5024,15 +5131,15 @@ File: gdb.info,  Node: Non-Stop Mode,  N
 
 For some multi-threaded targets, GDB supports an optional mode of
 operation in which you can examine stopped program threads in the
-debugger while other threads continue to execute freely.  This
-minimizes intrusion when debugging live systems, such as programs where
-some threads have real-time constraints or must continue to respond to
+debugger while other threads continue to execute freely.  This minimizes
+intrusion when debugging live systems, such as programs where some
+threads have real-time constraints or must continue to respond to
 external events.  This is referred to as "non-stop" mode.
 
    In non-stop mode, when a thread stops to report a debugging event,
 _only_ that thread is stopped; GDB does not stop other threads as well,
 in contrast to the all-stop mode behavior.  Additionally, execution
-commands such as `continue' and `step' apply by default only to the
+commands such as 'continue' and 'step' apply by default only to the
 current thread in non-stop mode, rather than all threads as in all-stop
 mode.  This allows you to control threads explicitly in ways that are
 not possible in all-stop mode -- for example, stepping one thread while
@@ -5051,47 +5158,45 @@ or attach to your program:
 
    You can use these commands to manipulate the non-stop mode setting:
 
-`set non-stop on'
+'set non-stop on'
      Enable selection of non-stop mode.
-
-`set non-stop off'
-     Disable selection of non-stop mode.  
-
-`show non-stop'
+'set non-stop off'
+     Disable selection of non-stop mode.
+'show non-stop'
      Show the current non-stop enablement setting.
 
    Note these commands only reflect whether non-stop mode is enabled,
 not whether the currently-executing program is being run in non-stop
-mode.  In particular, the `set non-stop' preference is only consulted
+mode.  In particular, the 'set non-stop' preference is only consulted
 when GDB starts or connects to the target program, and it is generally
 not possible to switch modes once debugging has started.  Furthermore,
 since not all targets support non-stop mode, even when you have enabled
 non-stop mode, GDB may still fall back to all-stop operation by default.
 
    In non-stop mode, all execution commands apply only to the current
-thread by default.  That is, `continue' only continues one thread.  To
-continue all threads, issue `continue -a' or `c -a'.
+thread by default.  That is, 'continue' only continues one thread.  To
+continue all threads, issue 'continue -a' or 'c -a'.
 
    You can use GDB's background execution commands (*note Background
-Execution::) to run some threads in the background while you continue
-to examine or step others from GDB.  The MI execution commands (*note
+Execution::) to run some threads in the background while you continue to
+examine or step others from GDB.  The MI execution commands (*note
 GDB/MI Program Execution::) are always executed asynchronously in
 non-stop mode.
 
-   Suspending execution is done with the `interrupt' command when
-running in the background, or `Ctrl-c' during foreground execution.  In
+   Suspending execution is done with the 'interrupt' command when
+running in the background, or 'Ctrl-c' during foreground execution.  In
 all-stop mode, this stops the whole process; but in non-stop mode the
 interrupt applies only to the current thread.  To stop the whole
-program, use `interrupt -a'.
+program, use 'interrupt -a'.
 
-   Other execution commands do not currently support the `-a' option.
+   Other execution commands do not currently support the '-a' option.
 
    In non-stop mode, when a thread stops, GDB doesn't automatically make
 that thread current, as it does in all-stop mode.  This is because the
-thread stop notifications are asynchronous with respect to GDB's
-command interpreter, and it would be confusing if GDB unexpectedly
-changed to a different thread just as you entered a command to operate
-on the previously current thread.
+thread stop notifications are asynchronous with respect to GDB's command
+interpreter, and it would be confusing if GDB unexpectedly changed to a
+different thread just as you entered a command to operate on the
+previously current thread.
 
 
 File: gdb.info,  Node: Background Execution,  Next: Thread-Specific Breakpoints,  Prev: Non-Stop Mode,  Up: Thread Stops
@@ -5099,66 +5204,66 @@ File: gdb.info,  Node: Background Execut
 5.5.3 Background Execution
 --------------------------
 
-GDB's execution commands have two variants:  the normal foreground
+GDB's execution commands have two variants: the normal foreground
 (synchronous) behavior, and a background (asynchronous) behavior.  In
 foreground execution, GDB waits for the program to report that some
 thread has stopped before prompting for another command.  In background
 execution, GDB immediately gives a command prompt so that you can issue
 other commands while your program runs.
 
-   If the target doesn't support async mode, GDB issues an error
-message if you attempt to use the background execution commands.
+   If the target doesn't support async mode, GDB issues an error message
+if you attempt to use the background execution commands.
 
-   To specify background execution, add a `&' to the command.  For
-example, the background form of the `continue' command is `continue&',
-or just `c&'.  The execution commands that accept background execution
+   To specify background execution, add a '&' to the command.  For
+example, the background form of the 'continue' command is 'continue&',
+or just 'c&'.  The execution commands that accept background execution
 are:
 
-`run'
+'run'
      *Note Starting your Program: Starting.
 
-`attach'
+'attach'
      *Note Debugging an Already-running Process: Attach.
 
-`step'
+'step'
      *Note step: Continuing and Stepping.
 
-`stepi'
+'stepi'
      *Note stepi: Continuing and Stepping.
 
-`next'
+'next'
      *Note next: Continuing and Stepping.
 
-`nexti'
+'nexti'
      *Note nexti: Continuing and Stepping.
 
-`continue'
+'continue'
      *Note continue: Continuing and Stepping.
 
-`finish'
+'finish'
      *Note finish: Continuing and Stepping.
 
-`until'
+'until'
      *Note until: Continuing and Stepping.
 
-
    Background execution is especially useful in conjunction with
 non-stop mode for debugging programs with multiple threads; see *note
-Non-Stop Mode::.  However, you can also use these commands in the
-normal all-stop mode with the restriction that you cannot issue another
-execution command until the previous one finishes.  Examples of
-commands that are valid in all-stop mode while the program is running
-include `help' and `info break'.
+Non-Stop Mode::.  However, you can also use these commands in the normal
+all-stop mode with the restriction that you cannot issue another
+execution command until the previous one finishes.  Examples of commands
+that are valid in all-stop mode while the program is running include
+'help' and 'info break'.
 
    You can interrupt your program while it is running in the background
-by using the `interrupt' command.
+by using the 'interrupt' command.
+
+'interrupt'
+'interrupt -a'
 
-`interrupt'
-`interrupt -a'
      Suspend execution of the running program.  In all-stop mode,
-     `interrupt' stops the whole process, but in non-stop mode, it stops
+     'interrupt' stops the whole process, but in non-stop mode, it stops
      only the current thread.  To stop the whole program in non-stop
-     mode, use `interrupt -a'.
+     mode, use 'interrupt -a'.
 
 
 File: gdb.info,  Node: Thread-Specific Breakpoints,  Next: Interrupted System Calls,  Prev: Background Execution,  Up: Thread Stops
@@ -5170,28 +5275,27 @@ When your program has multiple threads (
 Multiple Threads: Threads.), you can choose whether to set breakpoints
 on all threads, or on a particular thread.
 
-`break LINESPEC thread THREADNO'
-`break LINESPEC thread THREADNO if ...'
-     LINESPEC specifies source lines; there are several ways of writing
+'break LOCATION thread THREAD-ID'
+'break LOCATION thread THREAD-ID if ...'
+     LOCATION specifies source lines; there are several ways of writing
      them (*note Specify Location::), but the effect is always to
      specify some source line.
 
-     Use the qualifier `thread THREADNO' with a breakpoint command to
+     Use the qualifier 'thread THREAD-ID' with a breakpoint command to
      specify that you only want GDB to stop the program when a
-     particular thread reaches this breakpoint.  The THREADNO specifier
-     is one of the numeric thread identifiers assigned by GDB, shown in
-     the first column of the `info threads' display.
+     particular thread reaches this breakpoint.  The THREAD-ID specifier
+     is one of the thread identifiers assigned by GDB, shown in the
+     first column of the 'info threads' display.
 
-     If you do not specify `thread THREADNO' when you set a breakpoint,
+     If you do not specify 'thread THREAD-ID' when you set a breakpoint,
      the breakpoint applies to _all_ threads of your program.
 
-     You can use the `thread' qualifier on conditional breakpoints as
-     well; in this case, place `thread THREADNO' before or after the
+     You can use the 'thread' qualifier on conditional breakpoints as
+     well; in this case, place 'thread THREAD-ID' before or after the
      breakpoint condition, like this:
 
           (gdb) break frik.c:13 thread 28 if bartab > lim
 
-
    Thread-specific breakpoints are automatically deleted when GDB
 detects the corresponding thread is no longer in the thread list.  For
 example:
@@ -5200,12 +5304,12 @@ example:
      Thread-specific breakpoint 3 deleted - thread 28 no longer in the thread list.
 
    There are several ways for a thread to disappear, such as a regular
-thread exit, but also when you detach from the process with the
-`detach' command (*note Debugging an Already-running Process: Attach.),
-or if GDB loses the remote connection (*note Remote Debugging::), etc.
-Note that with some targets, GDB is only able to detect a thread has
-exited when the user explictly asks for the thread list with the `info
-threads' command.
+thread exit, but also when you detach from the process with the 'detach'
+command (*note Debugging an Already-running Process: Attach.), or if GDB
+loses the remote connection (*note Remote Debugging::), etc.  Note that
+with some targets, GDB is only able to detect a thread has exited when
+the user explictly asks for the thread list with the 'info threads'
+command.
 
 
 File: gdb.info,  Node: Interrupted System Calls,  Next: Observer Mode,  Prev: Thread-Specific Breakpoints,  Up: Thread Stops
@@ -5228,7 +5332,7 @@ style anyways.
 
        sleep (10);
 
-   The call to `sleep' will return early if a different thread stops at
+   The call to 'sleep' will return early if a different thread stops at
 a breakpoint or for some other reason.
 
    Instead, write this:
@@ -5238,8 +5342,8 @@ a breakpoint or for some other reason.
          unslept = sleep (unslept);
 
    A system call is allowed to return early, so the system is still
-conforming to its specification.  But GDB does cause your
-multi-threaded program to behave differently than it would without GDB.
+conforming to its specification.  But GDB does cause your multi-threaded
+program to behave differently than it would without GDB.
 
    Also, GDB uses internal breakpoints in the thread library to monitor
 certain events such as thread creation and thread destruction.  When
@@ -5258,84 +5362,82 @@ disable all of the debugger's attempts t
 writing memory, inserting breakpoints, etc.  These operate at a low
 level, intercepting operations from all commands.
 
-   When all of these are set to `off', then GDB is said to be "observer
-mode".  As a convenience, the variable `observer' can be set to disable
+   When all of these are set to 'off', then GDB is said to be "observer
+mode".  As a convenience, the variable 'observer' can be set to disable
 these, plus enable non-stop mode.
 
    Note that GDB will not prevent you from making nonsensical
-combinations of these settings. For instance, if you have enabled
-`may-insert-breakpoints' but disabled `may-write-memory', then
+combinations of these settings.  For instance, if you have enabled
+'may-insert-breakpoints' but disabled 'may-write-memory', then
 breakpoints that work by writing trap instructions into the code stream
 will still not be able to be placed.
 
-`set observer on'
-`set observer off'
-     When set to `on', this disables all the permission variables below
-     (except for `insert-fast-tracepoints'), plus enables non-stop
-     debugging.  Setting this to `off' switches back to normal
+'set observer on'
+'set observer off'
+     When set to 'on', this disables all the permission variables below
+     (except for 'insert-fast-tracepoints'), plus enables non-stop
+     debugging.  Setting this to 'off' switches back to normal
      debugging, though remaining in non-stop mode.
 
-`show observer'
+'show observer'
      Show whether observer mode is on or off.
 
-`set may-write-registers on'
-`set may-write-registers off'
+'set may-write-registers on'
+'set may-write-registers off'
      This controls whether GDB will attempt to alter the values of
-     registers, such as with assignment expressions in `print', or the
-     `jump' command.  It defaults to `on'.
+     registers, such as with assignment expressions in 'print', or the
+     'jump' command.  It defaults to 'on'.
 
-`show may-write-registers'
+'show may-write-registers'
      Show the current permission to write registers.
 
-`set may-write-memory on'
-`set may-write-memory off'
+'set may-write-memory on'
+'set may-write-memory off'
      This controls whether GDB will attempt to alter the contents of
-     memory, such as with assignment expressions in `print'.  It
-     defaults to `on'.
+     memory, such as with assignment expressions in 'print'.  It
+     defaults to 'on'.
 
-`show may-write-memory'
+'show may-write-memory'
      Show the current permission to write memory.
 
-`set may-insert-breakpoints on'
-`set may-insert-breakpoints off'
-     This controls whether GDB will attempt to insert breakpoints.
-     This affects all breakpoints, including internal breakpoints
-     defined by GDB.  It defaults to `on'.
+'set may-insert-breakpoints on'
+'set may-insert-breakpoints off'
+     This controls whether GDB will attempt to insert breakpoints.  This
+     affects all breakpoints, including internal breakpoints defined by
+     GDB.  It defaults to 'on'.
 
-`show may-insert-breakpoints'
+'show may-insert-breakpoints'
      Show the current permission to insert breakpoints.
 
-`set may-insert-tracepoints on'
-`set may-insert-tracepoints off'
+'set may-insert-tracepoints on'
+'set may-insert-tracepoints off'
      This controls whether GDB will attempt to insert (regular)
      tracepoints at the beginning of a tracing experiment.  It affects
-     only non-fast tracepoints, fast tracepoints being under the
-     control of `may-insert-fast-tracepoints'.  It defaults to `on'.
+     only non-fast tracepoints, fast tracepoints being under the control
+     of 'may-insert-fast-tracepoints'.  It defaults to 'on'.
 
-`show may-insert-tracepoints'
+'show may-insert-tracepoints'
      Show the current permission to insert tracepoints.
 
-`set may-insert-fast-tracepoints on'
-`set may-insert-fast-tracepoints off'
+'set may-insert-fast-tracepoints on'
+'set may-insert-fast-tracepoints off'
      This controls whether GDB will attempt to insert fast tracepoints
      at the beginning of a tracing experiment.  It affects only fast
-     tracepoints, regular (non-fast) tracepoints being under the
-     control of `may-insert-tracepoints'.  It defaults to `on'.
+     tracepoints, regular (non-fast) tracepoints being under the control
+     of 'may-insert-tracepoints'.  It defaults to 'on'.
 
-`show may-insert-fast-tracepoints'
+'show may-insert-fast-tracepoints'
      Show the current permission to insert fast tracepoints.
 
-`set may-interrupt on'
-`set may-interrupt off'
-     This controls whether GDB will attempt to interrupt or stop
-     program execution.  When this variable is `off', the `interrupt'
-     command will have no effect, nor will `Ctrl-c'. It defaults to
-     `on'.
+'set may-interrupt on'
+'set may-interrupt off'
+     This controls whether GDB will attempt to interrupt or stop program
+     execution.  When this variable is 'off', the 'interrupt' command
+     will have no effect, nor will 'Ctrl-c'.  It defaults to 'on'.
 
-`show may-interrupt'
+'show may-interrupt'
      Show the current permission to interrupt or stop the program.
 
-
 
 File: gdb.info,  Node: Reverse Execution,  Next: Process Record and Replay,  Prev: Stopping,  Up: Top
 
@@ -5349,9 +5451,9 @@ program by running it backward.
 
    A target environment that supports reverse execution should be able
 to "undo" the changes in machine state that have taken place as the
-program was executing normally.  Variables, registers etc. should
-revert to their previous values.  Obviously this requires a great deal
-of sophistication on the part of the target environment; not all target
+program was executing normally.  Variables, registers etc. should revert
+to their previous values.  Obviously this requires a great deal of
+sophistication on the part of the target environment; not all target
 environments can support reverse execution.
 
    When a program is executed in reverse, the instructions that have
@@ -5366,69 +5468,67 @@ all variables should be returned to thei
    If you are debugging in a target environment that supports reverse
 execution, GDB provides the following commands.
 
-`reverse-continue [IGNORE-COUNT]'
-`rc [IGNORE-COUNT]'
+'reverse-continue [IGNORE-COUNT]'
+'rc [IGNORE-COUNT]'
      Beginning at the point where your program last stopped, start
      executing in reverse.  Reverse execution will stop for breakpoints
      and synchronous exceptions (signals), just like normal execution.
      Behavior of asynchronous signals depends on the target environment.
 
-`reverse-step [COUNT]'
+'reverse-step [COUNT]'
      Run the program backward until control reaches the start of a
      different source line; then stop it, and return control to GDB.
 
-     Like the `step' command, `reverse-step' will only stop at the
+     Like the 'step' command, 'reverse-step' will only stop at the
      beginning of a source line.  It "un-executes" the previously
      executed source line.  If the previous source line included calls
-     to debuggable functions, `reverse-step' will step (backward) into
+     to debuggable functions, 'reverse-step' will step (backward) into
      the called function, stopping at the beginning of the _last_
      statement in the called function (typically a return statement).
 
-     Also, as with the `step' command, if non-debuggable functions are
-     called, `reverse-step' will run thru them backward without
+     Also, as with the 'step' command, if non-debuggable functions are
+     called, 'reverse-step' will run thru them backward without
      stopping.
 
-`reverse-stepi [COUNT]'
+'reverse-stepi [COUNT]'
      Reverse-execute one machine instruction.  Note that the instruction
      to be reverse-executed is _not_ the one pointed to by the program
      counter, but the instruction executed prior to that one.  For
-     instance, if the last instruction was a jump, `reverse-stepi' will
+     instance, if the last instruction was a jump, 'reverse-stepi' will
      take you back from the destination of the jump to the jump
      instruction itself.
 
-`reverse-next [COUNT]'
+'reverse-next [COUNT]'
      Run backward to the beginning of the previous line executed in the
      current (innermost) stack frame.  If the line contains function
      calls, they will be "un-executed" without stopping.  Starting from
-     the first line of a function, `reverse-next' will take you back to
-     the caller of that function, _before_ the function was called,
-     just as the normal `next' command would take you from the last
-     line of a function back to its return to its caller (2).
+     the first line of a function, 'reverse-next' will take you back to
+     the caller of that function, _before_ the function was called, just
+     as the normal 'next' command would take you from the last line of a
+     function back to its return to its caller (2).
 
-`reverse-nexti [COUNT]'
-     Like `nexti', `reverse-nexti' executes a single instruction in
+'reverse-nexti [COUNT]'
+     Like 'nexti', 'reverse-nexti' executes a single instruction in
      reverse, except that called functions are "un-executed" atomically.
      That is, if the previously executed instruction was a return from
-     another function, `reverse-nexti' will continue to execute in
+     another function, 'reverse-nexti' will continue to execute in
      reverse until the call to that function (from the current stack
      frame) is reached.
 
-`reverse-finish'
-     Just as the `finish' command takes you to the point where the
-     current function returns, `reverse-finish' takes you to the point
+'reverse-finish'
+     Just as the 'finish' command takes you to the point where the
+     current function returns, 'reverse-finish' takes you to the point
      where it was called.  Instead of ending up at the end of the
      current function invocation, you end up at the beginning.
 
-`set exec-direction'
+'set exec-direction'
      Set the direction of target execution.
-
-`set exec-direction reverse'
+'set exec-direction reverse'
      GDB will perform all execution commands in reverse, until the
      exec-direction mode is changed to "forward".  Affected commands
-     include `step, stepi, next, nexti, continue, and finish'.  The
-     `return' command cannot be used in reverse mode.
-
-`set exec-direction forward'
+     include 'step, stepi, next, nexti, continue, and finish'.  The
+     'return' command cannot be used in reverse mode.
+'set exec-direction forward'
      GDB will perform all execution commands in the normal fashion.
      This is the default.
 
@@ -5478,43 +5578,46 @@ by the range of the instructions recorde
 other words, reverse execution on platforms that don't support it
 directly can only be done in the replay mode.
 
-   When debugging in the reverse direction, GDB will work in replay
-mode as long as the execution log includes the record for the previous
+   When debugging in the reverse direction, GDB will work in replay mode
+as long as the execution log includes the record for the previous
 instruction; otherwise, it will work in record mode, if the platform
 supports reverse execution, or stop if not.
 
    For architecture environments that support process record and replay,
 GDB provides the following commands:
 
-`record METHOD'
+'record METHOD'
      This command starts the process record and replay target.  The
      recording method can be specified as parameter.  Without a
-     parameter the command uses the `full' recording method.  The
+     parameter the command uses the 'full' recording method.  The
      following recording methods are available:
 
-    `full'
+     'full'
           Full record/replay recording using GDB's software record and
           replay implementation.  This method allows replaying and
           reverse execution.
 
-    `btrace FORMAT'
+     'btrace FORMAT'
           Hardware-supported instruction recording.  This method does
           not record data.  Further, the data is collected in a ring
           buffer so old data will be overwritten when the buffer is
           full.  It allows limited reverse execution.  Variables and
-          registers are not available during reverse execution.
+          registers are not available during reverse execution.  In
+          remote debugging, recording continues on disconnect.  Recorded
+          data can be inspected after reconnecting.  The recording may
+          be stopped using 'record stop'.
 
-          The recording format can be specified as parameter.  Without
-          a parameter the command chooses the recording format.  The
+          The recording format can be specified as parameter.  Without a
+          parameter the command chooses the recording format.  The
           following recording formats are available:
 
-         `bts'
+          'bts'
                Use the "Branch Trace Store" (BTS) recording format.  In
                this format, the processor stores a from/to record for
                each executed branch in the btrace ring buffer.
 
-         `pt'
-               Use the "Intel(R) Processor Trace" recording format.  In
+          'pt'
+               Use the "Intel Processor Trace" recording format.  In
                this format, the processor stores the execution trace in
                a compressed form that is afterwards decoded by GDB.
 
@@ -5523,79 +5626,79 @@ GDB provides the following commands:
                to already contain a big number of instructions compared
                to BTS.
 
-               Decoding the recorded execution trace, on the other
-               hand, is more expensive than decoding BTS trace.  This
-               is mostly due to the increased number of instructions to
+               Decoding the recorded execution trace, on the other hand,
+               is more expensive than decoding BTS trace.  This is
+               mostly due to the increased number of instructions to
                process.  You should increase the buffer-size with care.
 
           Not all recording formats may be available on all processors.
 
      The process record and replay target can only debug a process that
-     is already running.  Therefore, you need first to start the
-     process with the `run' or `start' commands, and then start the
-     recording with the `record METHOD' command.
+     is already running.  Therefore, you need first to start the process
+     with the 'run' or 'start' commands, and then start the recording
+     with the 'record METHOD' command.
 
      Displaced stepping (*note displaced stepping: Maintenance
-     Commands.)  will be automatically disabled when process record and
+     Commands.) will be automatically disabled when process record and
      replay target is started.  That's because the process record and
      replay target doesn't support displaced stepping.
 
      If the inferior is in the non-stop mode (*note Non-Stop Mode::) or
      in the asynchronous execution mode (*note Background Execution::),
-     not all recording methods are available.  The `full' recording
+     not all recording methods are available.  The 'full' recording
      method does not support these two modes.
 
-`record stop'
+'record stop'
      Stop the process record and replay target.  When process record and
      replay target stops, the entire execution log will be deleted and
-     the inferior will either be terminated, or will remain in its
-     final state.
+     the inferior will either be terminated, or will remain in its final
+     state.
 
      When you stop the process record and replay target in record mode
      (at the end of the execution log), the inferior will be stopped at
      the next instruction that would have been recorded.  In other
      words, if you record for a while and then stop recording, the
-     inferior process will be left in the same state as if the
-     recording never happened.
+     inferior process will be left in the same state as if the recording
+     never happened.
 
      On the other hand, if the process record and replay target is
      stopped while in replay mode (that is, not at the end of the
      execution log, but at some earlier point), the inferior process
      will become "live" at that earlier state, and it will then be
-     possible to continue the usual "live" debugging of the process
-     from that state.
+     possible to continue the usual "live" debugging of the process from
+     that state.
 
      When the inferior process exits, or GDB detaches from it, process
      record and replay target will automatically stop itself.
 
-`record goto'
+'record goto'
      Go to a specific location in the execution log.  There are several
      ways to specify the location to go to:
 
-    `record goto begin'
-    `record goto start'
+     'record goto begin'
+     'record goto start'
           Go to the beginning of the execution log.
 
-    `record goto end'
+     'record goto end'
           Go to the end of the execution log.
 
-    `record goto N'
+     'record goto N'
           Go to instruction number N in the execution log.
 
-`record save FILENAME'
-     Save the execution log to a file `FILENAME'.  Default filename is
-     `gdb_record.PROCESS_ID', where PROCESS_ID is the process ID of the
+'record save FILENAME'
+     Save the execution log to a file 'FILENAME'.  Default filename is
+     'gdb_record.PROCESS_ID', where PROCESS_ID is the process ID of the
      inferior.
 
      This command may not be available for all recording methods.
 
-`record restore FILENAME'
-     Restore the execution log from a file `FILENAME'.  File must have
-     been created with `record save'.
-
-`set record full insn-number-max LIMIT'
-`set record full insn-number-max unlimited'
-     Set the limit of instructions to be recorded for the `full'
+'record restore FILENAME'
+     Restore the execution log from a file 'FILENAME'.  File must have
+     been created with 'record save'.
+
+'set record full insn-number-max LIMIT'
+'set record full insn-number-max unlimited'
+     Set the limit of instructions to be recorded for the 'full'
      recording method.  Default value is 200000.
 
      If LIMIT is a positive number, then GDB will start deleting
@@ -5605,46 +5708,45 @@ GDB provides the following commands:
      keep the number of recorded instructions at the limit.  (Since
      deleting recorded instructions loses information, GDB lets you
      control what happens when the limit is reached, by means of the
-     `stop-at-limit' option, described below.)
+     'stop-at-limit' option, described below.)
 
-     If LIMIT is `unlimited' or zero, GDB will never delete recorded
+     If LIMIT is 'unlimited' or zero, GDB will never delete recorded
      instructions from the execution log.  The number of recorded
      instructions is limited only by the available memory.
 
-`show record full insn-number-max'
-     Show the limit of instructions to be recorded with the `full'
+'show record full insn-number-max'
+     Show the limit of instructions to be recorded with the 'full'
      recording method.
 
-`set record full stop-at-limit'
-     Control the behavior of the  `full' recording method when the
-     number of recorded instructions reaches the limit.  If ON (the
-     default), GDB will stop when the limit is reached for the first
-     time and ask you whether you want to stop the inferior or continue
-     running it and recording the execution log.  If you decide to
-     continue recording, each new recorded instruction will cause the
-     oldest one to be deleted.
+'set record full stop-at-limit'
+     Control the behavior of the 'full' recording method when the number
+     of recorded instructions reaches the limit.  If ON (the default),
+     GDB will stop when the limit is reached for the first time and ask
+     you whether you want to stop the inferior or continue running it
+     and recording the execution log.  If you decide to continue
+     recording, each new recorded instruction will cause the oldest one
+     to be deleted.
 
      If this option is OFF, GDB will automatically delete the oldest
      record to make room for each new one, without asking.
 
-`show record full stop-at-limit'
-     Show the current setting of `stop-at-limit'.
+'show record full stop-at-limit'
+     Show the current setting of 'stop-at-limit'.
 
-`set record full memory-query'
+'set record full memory-query'
      Control the behavior when GDB is unable to record memory changes
-     caused by an instruction for the `full' recording method.  If ON,
+     caused by an instruction for the 'full' recording method.  If ON,
      GDB will query whether to stop the inferior in that case.
 
      If this option is OFF (the default), GDB will automatically ignore
-     the effect of such instructions on memory.  Later, when GDB
-     replays this execution log, it will mark the log of this
-     instruction as not accessible, and it will not affect the replay
-     results.
+     the effect of such instructions on memory.  Later, when GDB replays
+     this execution log, it will mark the log of this instruction as not
+     accessible, and it will not affect the replay results.
 
-`show record full memory-query'
-     Show the current setting of `memory-query'.
+'show record full memory-query'
+     Show the current setting of 'memory-query'.
 
-     The `btrace' record target does not trace data.  As a convenience,
+     The 'btrace' record target does not trace data.  As a convenience,
      when replaying, GDB reads read-only memory off the live program
      directly, assuming that the addresses of the read-only areas don't
      change.  This for example makes it possible to disassemble code
@@ -5652,162 +5754,172 @@ GDB provides the following commands:
      able to inspect variables might be useful.  You can use the
      following command for that:
 
-`set record btrace replay-memory-access'
-     Control the behavior of the `btrace' recording method when
-     accessing memory during replay.  If `read-only' (the default), GDB
-     will only allow accesses to read-only memory.  If `read-write',
-     GDB will allow accesses to read-only and to read-write memory.
-     Beware that the accessed memory corresponds to the live target and
-     not necessarily to the current replay position.
+'set record btrace replay-memory-access'
+     Control the behavior of the 'btrace' recording method when
+     accessing memory during replay.  If 'read-only' (the default), GDB
+     will only allow accesses to read-only memory.  If 'read-write', GDB
+     will allow accesses to read-only and to read-write memory.  Beware
+     that the accessed memory corresponds to the live target and not
+     necessarily to the current replay position.
 
-`show record btrace replay-memory-access'
-     Show the current setting of `replay-memory-access'.
+'show record btrace replay-memory-access'
+     Show the current setting of 'replay-memory-access'.
 
-`set record btrace bts buffer-size SIZE'
-`set record btrace bts buffer-size unlimited'
+'set record btrace bts buffer-size SIZE'
+'set record btrace bts buffer-size unlimited'
      Set the requested ring buffer size for branch tracing in BTS
      format.  Default is 64KB.
 
      If SIZE is a positive number, then GDB will try to allocate a
      buffer of at least SIZE bytes for each new thread that uses the
      btrace recording method and the BTS format.  The actually obtained
-     buffer size may differ from the requested SIZE.  Use the `info
+     buffer size may differ from the requested SIZE.  Use the 'info
      record' command to see the actual buffer size for each thread that
      uses the btrace recording method and the BTS format.
 
-     If LIMIT is `unlimited' or zero, GDB will try to allocate a buffer
+     If LIMIT is 'unlimited' or zero, GDB will try to allocate a buffer
      of 4MB.
 
      Bigger buffers mean longer traces.  On the other hand, GDB will
      also need longer to process the branch trace data before it can be
      used.
 
-`show record btrace bts buffer-size SIZE'
+'show record btrace bts buffer-size SIZE'
      Show the current setting of the requested ring buffer size for
      branch tracing in BTS format.
 
-`set record btrace pt buffer-size SIZE'
-`set record btrace pt buffer-size unlimited'
-     Set the requested ring buffer size for branch tracing in Intel(R)
+'set record btrace pt buffer-size SIZE'
+'set record btrace pt buffer-size unlimited'
+     Set the requested ring buffer size for branch tracing in Intel
      Processor Trace format.  Default is 16KB.
 
      If SIZE is a positive number, then GDB will try to allocate a
      buffer of at least SIZE bytes for each new thread that uses the
-     btrace recording method and the Intel(R) Processor Trace format.
-     The actually obtained buffer size may differ from the requested
-     SIZE.  Use the `info record' command to see the actual buffer size
-     for each thread.
+     btrace recording method and the Intel Processor Trace format.  The
+     actually obtained buffer size may differ from the requested SIZE.
+     Use the 'info record' command to see the actual buffer size for
+     each thread.
 
-     If LIMIT is `unlimited' or zero, GDB will try to allocate a buffer
+     If LIMIT is 'unlimited' or zero, GDB will try to allocate a buffer
      of 4MB.
 
      Bigger buffers mean longer traces.  On the other hand, GDB will
      also need longer to process the branch trace data before it can be
      used.
 
-`show record btrace pt buffer-size SIZE'
+'show record btrace pt buffer-size SIZE'
      Show the current setting of the requested ring buffer size for
-     branch tracing in Intel(R) Processor Trace format.
+     branch tracing in Intel Processor Trace format.
 
-`info record'
+'info record'
      Show various statistics about the recording depending on the
      recording method:
 
-    `full'
-          For the `full' recording method, it shows the state of process
+     'full'
+          For the 'full' recording method, it shows the state of process
           record and its in-memory execution log buffer, including:
 
              * Whether in record mode or replay mode.
-
              * Lowest recorded instruction number (counting from when
                the current execution log started recording
                instructions).
-
              * Highest recorded instruction number.
-
              * Current instruction about to be replayed (if in replay
                mode).
-
              * Number of instructions contained in the execution log.
-
              * Maximum number of instructions that may be contained in
                the execution log.
 
-    `btrace'
-          For the `btrace' recording method, it shows:
+     'btrace'
+          For the 'btrace' recording method, it shows:
 
              * Recording format.
-
              * Number of instructions that have been recorded.
-
-             * Number of blocks of sequential control-flow formed by
-               the recorded instructions.
-
+             * Number of blocks of sequential control-flow formed by the
+               recorded instructions.
              * Whether in record mode or replay mode.
 
-          For the `bts' recording format, it also shows:
+          For the 'bts' recording format, it also shows:
              * Size of the perf ring buffer.
 
-          For the `pt' recording format, it also shows:
+          For the 'pt' recording format, it also shows:
              * Size of the perf ring buffer.
 
-`record delete'
+'record delete'
      When record target runs in replay mode ("in the past"), delete the
      subsequent execution log and begin to record a new execution log
-     starting from the current address.  This means you will abandon
-     the previously recorded "future" and begin recording a new
-     "future".
+     starting from the current address.  This means you will abandon the
+     previously recorded "future" and begin recording a new "future".
 
-`record instruction-history'
+'record instruction-history'
      Disassembles instructions from the recorded execution log.  By
      default, ten instructions are disassembled.  This can be changed
-     using the `set record instruction-history-size' command.
-     Instructions are printed in execution order.  There are several
-     ways to specify what part of the execution log to disassemble:
+     using the 'set record instruction-history-size' command.
+     Instructions are printed in execution order.
 
-    `record instruction-history INSN'
+     It can also print mixed source+disassembly if you specify the the
+     '/m' or '/s' modifier, and print the raw instructions in hex as
+     well as in symbolic form by specifying the '/r' modifier.
+
+     The current position marker is printed for the instruction at the
+     current program counter value.  This instruction can appear
+     multiple times in the trace and the current position marker will be
+     printed every time.  To omit the current position marker, specify
+     the '/p' modifier.
+
+     To better align the printed instructions when the trace contains
+     instructions from more than one function, the function name may be
+     omitted by specifying the '/f' modifier.
+
+     Speculatively executed instructions are prefixed with '?'.  This
+     feature is not available for all recording formats.
+
+     There are several ways to specify what part of the execution log to
+     disassemble:
+
+     'record instruction-history INSN'
           Disassembles ten instructions starting from instruction number
           INSN.
 
-    `record instruction-history INSN, +/-N'
+     'record instruction-history INSN, +/-N'
           Disassembles N instructions around instruction number INSN.
-          If N is preceded with `+', disassembles N instructions after
-          instruction number INSN.  If N is preceded with `-',
+          If N is preceded with '+', disassembles N instructions after
+          instruction number INSN.  If N is preceded with '-',
           disassembles N instructions before instruction number INSN.
 
-    `record instruction-history'
+     'record instruction-history'
           Disassembles ten more instructions after the last disassembly.
 
-    `record instruction-history -'
+     'record instruction-history -'
           Disassembles ten more instructions before the last
           disassembly.
 
-    `record instruction-history BEGIN END'
+     'record instruction-history BEGIN, END'
           Disassembles instructions beginning with instruction number
           BEGIN until instruction number END.  The instruction number
           END is included.
 
      This command may not be available for all recording methods.
 
-`set record instruction-history-size SIZE'
-`set record instruction-history-size unlimited'
-     Define how many instructions to disassemble in the `record
+'set record instruction-history-size SIZE'
+'set record instruction-history-size unlimited'
+     Define how many instructions to disassemble in the 'record
      instruction-history' command.  The default value is 10.  A SIZE of
-     `unlimited' means unlimited instructions.
+     'unlimited' means unlimited instructions.
 
-`show record instruction-history-size'
-     Show how many instructions to disassemble in the `record
+'show record instruction-history-size'
+     Show how many instructions to disassemble in the 'record
      instruction-history' command.
 
-`record function-call-history'
-     Prints the execution history at function granularity. It prints one
-     line for each sequence of instructions that belong to the same
+'record function-call-history'
+     Prints the execution history at function granularity.  It prints
+     one line for each sequence of instructions that belong to the same
      function giving the name of that function, the source lines for
-     this instruction sequence (if the `/l' modifier is specified), and
-     the instructions numbers that form the sequence (if the `/i'
-     modifier is specified).  The function names are indented to
-     reflect the call stack depth if the `/c' modifier is specified.
-     The `/l', `/i', and `/c' modifiers can be given together.
+     this instruction sequence (if the '/l' modifier is specified), and
+     the instructions numbers that form the sequence (if the '/i'
+     modifier is specified).  The function names are indented to reflect
+     the call stack depth if the '/c' modifier is specified.  The '/l',
+     '/i', and '/c' modifiers can be given together.
 
           (gdb) list 1, 10
           1   void foo (void)
@@ -5826,39 +5938,39 @@ GDB provides the following commands:
           3  bar     inst 11,13   at foo.c:9,10
 
      By default, ten lines are printed.  This can be changed using the
-     `set record function-call-history-size' command.  Functions are
+     'set record function-call-history-size' command.  Functions are
      printed in execution order.  There are several ways to specify what
      to print:
 
-    `record function-call-history FUNC'
+     'record function-call-history FUNC'
           Prints ten functions starting from function number FUNC.
 
-    `record function-call-history FUNC, +/-N'
+     'record function-call-history FUNC, +/-N'
           Prints N functions around function number FUNC.  If N is
-          preceded with `+', prints N functions after function number
-          FUNC.  If N is preceded with `-', prints N functions before
+          preceded with '+', prints N functions after function number
+          FUNC.  If N is preceded with '-', prints N functions before
           function number FUNC.
 
-    `record function-call-history'
+     'record function-call-history'
           Prints ten more functions after the last ten-line print.
 
-    `record function-call-history -'
+     'record function-call-history -'
           Prints ten more functions before the last ten-line print.
 
-    `record function-call-history BEGIN END'
+     'record function-call-history BEGIN, END'
           Prints functions beginning with function number BEGIN until
           function number END.  The function number END is included.
 
      This command may not be available for all recording methods.
 
-`set record function-call-history-size SIZE'
-`set record function-call-history-size unlimited'
-     Define how many lines to print in the `record
+'set record function-call-history-size SIZE'
+'set record function-call-history-size unlimited'
+     Define how many lines to print in the 'record
      function-call-history' command.  The default value is 10.  A size
-     of `unlimited' means unlimited lines.
+     of 'unlimited' means unlimited lines.
 
-`show record function-call-history-size'
-     Show how many lines to print in the `record function-call-history'
+'show record function-call-history-size'
+     Show how many lines to print in the 'record function-call-history'
      command.
 
 
@@ -5867,37 +5979,36 @@ File: gdb.info,  Node: Stack,  Next: Sou
 8 Examining the Stack
 *********************
 
-When your program has stopped, the first thing you need to know is
-where it stopped and how it got there.
+When your program has stopped, the first thing you need to know is where
+it stopped and how it got there.
 
    Each time your program performs a function call, information about
 the call is generated.  That information includes the location of the
-call in your program, the arguments of the call, and the local
-variables of the function being called.  The information is saved in a
-block of data called a "stack frame".  The stack frames are allocated
-in a region of memory called the "call stack".
+call in your program, the arguments of the call, and the local variables
+of the function being called.  The information is saved in a block of
+data called a "stack frame".  The stack frames are allocated in a region
+of memory called the "call stack".
 
    When your program stops, the GDB commands for examining the stack
 allow you to see all of this information.
 
    One of the stack frames is "selected" by GDB and many GDB commands
-refer implicitly to the selected frame.  In particular, whenever you
-ask GDB for the value of a variable in your program, the value is found
-in the selected frame.  There are special GDB commands to select
-whichever frame you are interested in.  *Note Selecting a Frame:
-Selection.
+refer implicitly to the selected frame.  In particular, whenever you ask
+GDB for the value of a variable in your program, the value is found in
+the selected frame.  There are special GDB commands to select whichever
+frame you are interested in.  *Note Selecting a Frame: Selection.
 
    When your program stops, GDB automatically selects the currently
-executing frame and describes it briefly, similar to the `frame'
-command (*note Information about a Frame: Frame Info.).
+executing frame and describes it briefly, similar to the 'frame' command
+(*note Information about a Frame: Frame Info.).
 
 * Menu:
 
 * Frames::                      Stack frames
 * Backtrace::                   Backtraces
-* Frame Filter Management::     Managing frame filters
 * Selection::                   Selecting a frame
 * Frame Info::                  Information on a frame
+* Frame Filter Management::     Managing frame filters
 
 
 File: gdb.info,  Node: Frames,  Next: Backtrace,  Up: Stack
@@ -5907,24 +6018,24 @@ File: gdb.info,  Node: Frames,  Next: Ba
 
 The call stack is divided up into contiguous pieces called "stack
 frames", or "frames" for short; each frame is the data associated with
-one call to one function.  The frame contains the arguments given to
-the function, the function's local variables, and the address at which
-the function is executing.
+one call to one function.  The frame contains the arguments given to the
+function, the function's local variables, and the address at which the
+function is executing.
 
    When your program is started, the stack has only one frame, that of
-the function `main'.  This is called the "initial" frame or the
-"outermost" frame.  Each time a function is called, a new frame is
-made.  Each time a function returns, the frame for that function
-invocation is eliminated.  If a function is recursive, there can be
-many frames for the same function.  The frame for the function in which
-execution is actually occurring is called the "innermost" frame.  This
-is the most recently created of all the stack frames that still exist.
+the function 'main'.  This is called the "initial" frame or the
+"outermost" frame.  Each time a function is called, a new frame is made.
+Each time a function returns, the frame for that function invocation is
+eliminated.  If a function is recursive, there can be many frames for
+the same function.  The frame for the function in which execution is
+actually occurring is called the "innermost" frame.  This is the most
+recently created of all the stack frames that still exist.
 
    Inside your program, stack frames are identified by their addresses.
-A stack frame consists of many bytes, each of which has its own
-address; each kind of computer has a convention for choosing one byte
-whose address serves as the address of the frame.  Usually this address
-is kept in a register called the "frame pointer register" (*note $fp:
+A stack frame consists of many bytes, each of which has its own address;
+each kind of computer has a convention for choosing one byte whose
+address serves as the address of the frame.  Usually this address is
+kept in a register called the "frame pointer register" (*note $fp:
 Registers.) while execution is going on in that frame.
 
    GDB assigns numbers to all existing stack frames, starting with zero
@@ -5935,90 +6046,79 @@ commands.
 
    Some compilers provide a way to compile functions so that they
 operate without stack frames.  (For example, the GCC option
-     `-fomit-frame-pointer'
-   generates functions without a frame.)  This is occasionally done
-with heavily used library functions to save the frame setup time.  GDB
-has limited facilities for dealing with these function invocations.  If
-the innermost function invocation has no stack frame, GDB nevertheless
+     '-fomit-frame-pointer'
+   generates functions without a frame.)  This is occasionally done with
+heavily used library functions to save the frame setup time.  GDB has
+limited facilities for dealing with these function invocations.  If the
+innermost function invocation has no stack frame, GDB nevertheless
 regards it as though it had a separate frame, which is numbered zero as
 usual, allowing correct tracing of the function call chain.  However,
 GDB has no provision for frameless functions elsewhere in the stack.
 
-`frame [FRAMESPEC]'
-     The `frame' command allows you to move from one stack frame to
-     another, and to print the stack frame you select.  The FRAMESPEC
-     may be either the address of the frame or the stack frame number.
-     Without an argument, `frame' prints the current stack frame.
-
-`select-frame'
-     The `select-frame' command allows you to move from one stack frame
-     to another without printing the frame.  This is the silent version
-     of `frame'.
-
 
-File: gdb.info,  Node: Backtrace,  Next: Frame Filter Management,  Prev: Frames,  Up: Stack
+File: gdb.info,  Node: Backtrace,  Next: Selection,  Prev: Frames,  Up: Stack
 
 8.2 Backtraces
 ==============
 
 A backtrace is a summary of how your program got where it is.  It shows
 one line per frame, for many frames, starting with the currently
-executing frame (frame zero), followed by its caller (frame one), and
-on up the stack.
+executing frame (frame zero), followed by its caller (frame one), and on
+up the stack.
 
-`backtrace'
-`bt'
+'backtrace'
+'bt'
      Print a backtrace of the entire stack: one line per frame for all
      frames in the stack.
 
      You can stop the backtrace at any time by typing the system
-     interrupt character, normally `Ctrl-c'.
+     interrupt character, normally 'Ctrl-c'.
 
-`backtrace N'
-`bt N'
+'backtrace N'
+'bt N'
      Similar, but print only the innermost N frames.
 
-`backtrace -N'
-`bt -N'
+'backtrace -N'
+'bt -N'
      Similar, but print only the outermost N frames.
 
-`backtrace full'
-`bt full'
-`bt full N'
-`bt full -N'
+'backtrace full'
+'bt full'
+'bt full N'
+'bt full -N'
      Print the values of the local variables also.  As described above,
      N specifies the number of frames to print.
 
-`backtrace no-filters'
-`bt no-filters'
-`bt no-filters N'
-`bt no-filters -N'
-`bt no-filters full'
-`bt no-filters full N'
-`bt no-filters full -N'
+'backtrace no-filters'
+'bt no-filters'
+'bt no-filters N'
+'bt no-filters -N'
+'bt no-filters full'
+'bt no-filters full N'
+'bt no-filters full -N'
      Do not run Python frame filters on this backtrace.  *Note Frame
-     Filter API::, for more information.  Additionally use *note
-     disable frame-filter all:: to turn off all frame filters.  This is
-     only relevant when GDB has been configured with `Python' support.
+     Filter API::, for more information.  Additionally use *note disable
+     frame-filter all:: to turn off all frame filters.  This is only
+     relevant when GDB has been configured with 'Python' support.
 
-   The names `where' and `info stack' (abbreviated `info s') are
-additional aliases for `backtrace'.
+   The names 'where' and 'info stack' (abbreviated 'info s') are
+additional aliases for 'backtrace'.
 
    In a multi-threaded program, GDB by default shows the backtrace only
 for the current thread.  To display the backtrace for several or all of
-the threads, use the command `thread apply' (*note thread apply:
-Threads.).  For example, if you type `thread apply all backtrace', GDB
+the threads, use the command 'thread apply' (*note thread apply:
+Threads.).  For example, if you type 'thread apply all backtrace', GDB
 will display the backtrace for all the threads; this is handy when you
 debug a core dump of a multi-threaded program.
 
    Each line in the backtrace shows the frame number and the function
-name.  The program counter value is also shown--unless you use `set
+name.  The program counter value is also shown--unless you use 'set
 print address off'.  The backtrace also shows the source file name and
 line number, as well as the arguments to the function.  The program
 counter value is omitted if it is at the beginning of the code for that
 line number.
 
-   Here is an example of a backtrace.  It was made with the command `bt
+   Here is an example of a backtrace.  It was made with the command 'bt
 3', so it shows the innermost three frames.
 
      #0  m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8)
@@ -6030,21 +6130,21 @@ line number.
 
 The display for frame zero does not begin with a program counter value,
 indicating that your program has stopped at the beginning of the code
-for line `993' of `builtin.c'.
+for line '993' of 'builtin.c'.
 
-The value of parameter `data' in frame 1 has been replaced by `...'.
-By default, GDB prints the value of a parameter only if it is a scalar
-(integer, pointer, enumeration, etc).  See command `set print
+The value of parameter 'data' in frame 1 has been replaced by '...'.  By
+default, GDB prints the value of a parameter only if it is a scalar
+(integer, pointer, enumeration, etc).  See command 'set print
 frame-arguments' in *note Print Settings:: for more details on how to
 configure the way function parameter values are printed.
 
    If your program was compiled with optimizations, some compilers will
-optimize away arguments passed to functions if those arguments are
-never used after the call.  Such optimizations generate code that
-passes arguments through registers, but doesn't store those arguments
-in the stack frame.  GDB has no way of displaying such arguments in
-stack frames other than the innermost one.  Here's what such a
-backtrace might look like:
+optimize away arguments passed to functions if those arguments are never
+used after the call.  Such optimizations generate code that passes
+arguments through registers, but doesn't store those arguments in the
+stack frame.  GDB has no way of displaying such arguments in stack
+frames other than the innermost one.  Here's what such a backtrace might
+look like:
 
      #0  m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8)
          at builtin.c:993
@@ -6054,7 +6154,7 @@ backtrace might look like:
      (More stack frames follow...)
 
 The values of arguments that were not saved in their stack frames are
-shown as `<optimized out>'.
+shown as '<optimized out>'.
 
    If you need to display the values of such optimized-out arguments,
 either deduce that from other variables whose values depend on the one
@@ -6062,73 +6162,196 @@ you are interested in, or recompile with
 
    Most programs have a standard user entry point--a place where system
 libraries and startup code transition into user code.  For C this is
-`main'(1).  When GDB finds the entry function in a backtrace it will
+'main'(1).  When GDB finds the entry function in a backtrace it will
 terminate the backtrace, to avoid tracing into highly system-specific
 (and generally uninteresting) code.
 
    If you need to examine the startup code, or limit the number of
 levels in a backtrace, you can change this behavior:
 
-`set backtrace past-main'
-`set backtrace past-main on'
+'set backtrace past-main'
+'set backtrace past-main on'
      Backtraces will continue past the user entry point.
 
-`set backtrace past-main off'
+'set backtrace past-main off'
      Backtraces will stop when they encounter the user entry point.
      This is the default.
 
-`show backtrace past-main'
+'show backtrace past-main'
      Display the current user entry point backtrace policy.
 
-`set backtrace past-entry'
-`set backtrace past-entry on'
+'set backtrace past-entry'
+'set backtrace past-entry on'
      Backtraces will continue past the internal entry point of an
      application.  This entry point is encoded by the linker when the
      application is built, and is likely before the user entry point
-     `main' (or equivalent) is called.
+     'main' (or equivalent) is called.
 
-`set backtrace past-entry off'
+'set backtrace past-entry off'
      Backtraces will stop when they encounter the internal entry point
      of an application.  This is the default.
 
-`show backtrace past-entry'
+'show backtrace past-entry'
      Display the current internal entry point backtrace policy.
 
-`set backtrace limit N'
-`set backtrace limit 0'
-`set backtrace limit unlimited'
-     Limit the backtrace to N levels.  A value of `unlimited' or zero
+'set backtrace limit N'
+'set backtrace limit 0'
+'set backtrace limit unlimited'
+     Limit the backtrace to N levels.  A value of 'unlimited' or zero
      means unlimited levels.
 
-`show backtrace limit'
+'show backtrace limit'
      Display the current limit on backtrace levels.
 
    You can control how file names are displayed.
 
-`set filename-display'
-`set filename-display relative'
+'set filename-display'
+'set filename-display relative'
      Display file names relative to the compilation directory.  This is
      the default.
 
-`set filename-display basename'
+'set filename-display basename'
      Display only basename of a filename.
 
-`set filename-display absolute'
+'set filename-display absolute'
      Display an absolute filename.
 
-`show filename-display'
+'show filename-display'
      Show the current way to display filenames.
 
    ---------- Footnotes ----------
 
    (1) Note that embedded programs (the so-called "free-standing"
-environment) are not required to have a `main' function as the entry
+environment) are not required to have a 'main' function as the entry
 point.  They could even have multiple entry points.
 
 
-File: gdb.info,  Node: Frame Filter Management,  Next: Selection,  Prev: Backtrace,  Up: Stack
+File: gdb.info,  Node: Selection,  Next: Frame Info,  Prev: Backtrace,  Up: Stack
+
+8.3 Selecting a Frame
+=====================
+
+Most commands for examining the stack and other data in your program
+work on whichever stack frame is selected at the moment.  Here are the
+commands for selecting a stack frame; all of them finish by printing a
+brief description of the stack frame just selected.
 
-8.3 Management of Frame Filters.
+'frame N'
+'f N'
+     Select frame number N.  Recall that frame zero is the innermost
+     (currently executing) frame, frame one is the frame that called the
+     innermost one, and so on.  The highest-numbered frame is the one
+     for 'main'.
+
+'frame STACK-ADDR [ PC-ADDR ]'
+'f STACK-ADDR [ PC-ADDR ]'
+     Select the frame at address STACK-ADDR.  This is useful mainly if
+     the chaining of stack frames has been damaged by a bug, making it
+     impossible for GDB to assign numbers properly to all frames.  In
+     addition, this can be useful when your program has multiple stacks
+     and switches between them.  The optional PC-ADDR can also be given
+     to specify the value of PC for the stack frame.
+
+'up N'
+     Move N frames up the stack; N defaults to 1.  For positive numbers
+     N, this advances toward the outermost frame, to higher frame
+     numbers, to frames that have existed longer.
+
+'down N'
+     Move N frames down the stack; N defaults to 1.  For positive
+     numbers N, this advances toward the innermost frame, to lower frame
+     numbers, to frames that were created more recently.  You may
+     abbreviate 'down' as 'do'.
+
+   All of these commands end by printing two lines of output describing
+the frame.  The first line shows the frame number, the function name,
+the arguments, and the source file and line number of execution in that
+frame.  The second line shows the text of that source line.
+
+   For example:
+
+     (gdb) up
+     #1  0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
+         at env.c:10
+     10              read_input_file (argv[i]);
+
+   After such a printout, the 'list' command with no arguments prints
+ten lines centered on the point of execution in the frame.  You can also
+edit the program at the point of execution with your favorite editing
+program by typing 'edit'.  *Note Printing Source Lines: List, for
+details.
+
+'select-frame'
+     The 'select-frame' command is a variant of 'frame' that does not
+     display the new frame after selecting it.  This command is intended
+     primarily for use in GDB command scripts, where the output might be
+     unnecessary and distracting.
+
+'up-silently N'
+'down-silently N'
+     These two commands are variants of 'up' and 'down', respectively;
+     they differ in that they do their work silently, without causing
+     display of the new frame.  They are intended primarily for use in
+     GDB command scripts, where the output might be unnecessary and
+     distracting.
+
+
+File: gdb.info,  Node: Frame Info,  Next: Frame Filter Management,  Prev: Selection,  Up: Stack
+
+8.4 Information About a Frame
+=============================
+
+There are several other commands to print information about the selected
+stack frame.
+
+'frame'
+'f'
+     When used without any argument, this command does not change which
+     frame is selected, but prints a brief description of the currently
+     selected stack frame.  It can be abbreviated 'f'.  With an
+     argument, this command is used to select a stack frame.  *Note
+     Selecting a Frame: Selection.
+
+'info frame'
+'info f'
+     This command prints a verbose description of the selected stack
+     frame, including:
+
+        * the address of the frame
+        * the address of the next frame down (called by this frame)
+        * the address of the next frame up (caller of this frame)
+        * the language in which the source code corresponding to this
+          frame is written
+        * the address of the frame's arguments
+        * the address of the frame's local variables
+        * the program counter saved in it (the address of execution in
+          the caller frame)
+        * which registers were saved in the frame
+
+     The verbose description is useful when something has gone wrong
+     that has made the stack format fail to fit the usual conventions.
+
+'info frame ADDR'
+'info f ADDR'
+     Print a verbose description of the frame at address ADDR, without
+     selecting that frame.  The selected frame remains unchanged by this
+     command.  This requires the same kind of address (more than one for
+     some architectures) that you specify in the 'frame' command.  *Note
+     Selecting a Frame: Selection.
+
+'info args'
+     Print the arguments of the selected frame, each on a separate line.
+
+'info locals'
+     Print the local variables of the selected frame, each on a separate
+     line.  These are all variables (declared either static or
+     automatic) accessible at the point of execution of the selected
+     frame.
+
+
+File: gdb.info,  Node: Frame Filter Management,  Prev: Frame Info,  Up: Stack
+
+8.5 Management of Frame Filters.
 ================================
 
 Frame filters are Python based utilities to manage and decorate the
@@ -6137,27 +6360,27 @@ output of frames.  *Note Frame Filter AP
    Managing frame filters is performed by several commands available
 within GDB, detailed here.
 
-`info frame-filter'
+'info frame-filter'
      Print a list of installed frame filters from all dictionaries,
      showing their name, priority and enabled status.
 
-`disable frame-filter FILTER-DICTIONARY FILTER-NAME'
-     Disable a frame filter in the dictionary matching
-     FILTER-DICTIONARY and FILTER-NAME.  The FILTER-DICTIONARY may be
-     `all', `global', `progspace', or the name of the object file where
-     the frame filter dictionary resides.  When `all' is specified, all
-     frame filters across all dictionaries are disabled.  The
-     FILTER-NAME is the name of the frame filter and is used when `all'
-     is not the option for FILTER-DICTIONARY.  A disabled frame-filter
-     is not deleted, it may be enabled again later.
+'disable frame-filter FILTER-DICTIONARY FILTER-NAME'
+     Disable a frame filter in the dictionary matching FILTER-DICTIONARY
+     and FILTER-NAME.  The FILTER-DICTIONARY may be 'all', 'global',
+     'progspace', or the name of the object file where the frame filter
+     dictionary resides.  When 'all' is specified, all frame filters
+     across all dictionaries are disabled.  The FILTER-NAME is the name
+     of the frame filter and is used when 'all' is not the option for
+     FILTER-DICTIONARY.  A disabled frame-filter is not deleted, it may
+     be enabled again later.
 
-`enable frame-filter FILTER-DICTIONARY FILTER-NAME'
+'enable frame-filter FILTER-DICTIONARY FILTER-NAME'
      Enable a frame filter in the dictionary matching FILTER-DICTIONARY
-     and FILTER-NAME.  The FILTER-DICTIONARY may be `all', `global',
-     `progspace' or the name of the object file where the frame filter
-     dictionary resides.  When `all' is specified, all frame filters
+     and FILTER-NAME.  The FILTER-DICTIONARY may be 'all', 'global',
+     'progspace' or the name of the object file where the frame filter
+     dictionary resides.  When 'all' is specified, all frame filters
      across all dictionaries are enabled.  The FILTER-NAME is the name
-     of the frame filter and is used when `all' is not the option for
+     of the frame filter and is used when 'all' is not the option for
      FILTER-DICTIONARY.
 
      Example:
@@ -6209,17 +6432,17 @@ within GDB, detailed here.
             Priority  Enabled  Name
             999       No       BuildProgramFilter
 
-`set frame-filter priority FILTER-DICTIONARY FILTER-NAME PRIORITY'
+'set frame-filter priority FILTER-DICTIONARY FILTER-NAME PRIORITY'
      Set the PRIORITY of a frame filter in the dictionary matching
      FILTER-DICTIONARY, and the frame filter name matching FILTER-NAME.
-     The FILTER-DICTIONARY may be `global', `progspace' or the name of
+     The FILTER-DICTIONARY may be 'global', 'progspace' or the name of
      the object file where the frame filter dictionary resides.  The
      PRIORITY is an integer.
 
-`show frame-filter priority FILTER-DICTIONARY FILTER-NAME'
+'show frame-filter priority FILTER-DICTIONARY FILTER-NAME'
      Show the PRIORITY of a frame filter in the dictionary matching
      FILTER-DICTIONARY, and the frame filter name matching FILTER-NAME.
-     The FILTER-DICTIONARY may be `global', `progspace' or the name of
+     The FILTER-DICTIONARY may be 'global', 'progspace' or the name of
      the object file where the frame filter dictionary resides.
 
      Example:
@@ -6256,139 +6479,6 @@ within GDB, detailed here.
             999       No       BuildProgramFilter
 
 
-File: gdb.info,  Node: Selection,  Next: Frame Info,  Prev: Frame Filter Management,  Up: Stack
-
-8.4 Selecting a Frame
-=====================
-
-Most commands for examining the stack and other data in your program
-work on whichever stack frame is selected at the moment.  Here are the
-commands for selecting a stack frame; all of them finish by printing a
-brief description of the stack frame just selected.
-
-`frame N'
-`f N'
-     Select frame number N.  Recall that frame zero is the innermost
-     (currently executing) frame, frame one is the frame that called the
-     innermost one, and so on.  The highest-numbered frame is the one
-     for `main'.
-
-`frame ADDR'
-`f ADDR'
-     Select the frame at address ADDR.  This is useful mainly if the
-     chaining of stack frames has been damaged by a bug, making it
-     impossible for GDB to assign numbers properly to all frames.  In
-     addition, this can be useful when your program has multiple stacks
-     and switches between them.
-
-     On the SPARC architecture, `frame' needs two addresses to select
-     an arbitrary frame: a frame pointer and a stack pointer.
-
-     On the MIPS and Alpha architecture, it needs two addresses: a stack
-     pointer and a program counter.
-
-     On the 29k architecture, it needs three addresses: a register stack
-     pointer, a program counter, and a memory stack pointer.
-
-`up N'
-     Move N frames up the stack; N defaults to 1.  For positive numbers
-     N, this advances toward the outermost frame, to higher frame
-     numbers, to frames that have existed longer.
-
-`down N'
-     Move N frames down the stack; N defaults to 1.  For positive
-     numbers N, this advances toward the innermost frame, to lower
-     frame numbers, to frames that were created more recently.  You may
-     abbreviate `down' as `do'.
-
-   All of these commands end by printing two lines of output describing
-the frame.  The first line shows the frame number, the function name,
-the arguments, and the source file and line number of execution in that
-frame.  The second line shows the text of that source line.
-
-   For example:
-
-     (gdb) up
-     #1  0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
-         at env.c:10
-     10              read_input_file (argv[i]);
-
-   After such a printout, the `list' command with no arguments prints
-ten lines centered on the point of execution in the frame.  You can
-also edit the program at the point of execution with your favorite
-editing program by typing `edit'.  *Note Printing Source Lines: List,
-for details.
-
-`up-silently N'
-`down-silently N'
-     These two commands are variants of `up' and `down', respectively;
-     they differ in that they do their work silently, without causing
-     display of the new frame.  They are intended primarily for use in
-     GDB command scripts, where the output might be unnecessary and
-     distracting.
-
-
-File: gdb.info,  Node: Frame Info,  Prev: Selection,  Up: Stack
-
-8.5 Information About a Frame
-=============================
-
-There are several other commands to print information about the selected
-stack frame.
-
-`frame'
-`f'
-     When used without any argument, this command does not change which
-     frame is selected, but prints a brief description of the currently
-     selected stack frame.  It can be abbreviated `f'.  With an
-     argument, this command is used to select a stack frame.  *Note
-     Selecting a Frame: Selection.
-
-`info frame'
-`info f'
-     This command prints a verbose description of the selected stack
-     frame, including:
-
-        * the address of the frame
-
-        * the address of the next frame down (called by this frame)
-
-        * the address of the next frame up (caller of this frame)
-
-        * the language in which the source code corresponding to this
-          frame is written
-
-        * the address of the frame's arguments
-
-        * the address of the frame's local variables
-
-        * the program counter saved in it (the address of execution in
-          the caller frame)
-
-        * which registers were saved in the frame
-
-     The verbose description is useful when something has gone wrong
-     that has made the stack format fail to fit the usual conventions.
-
-`info frame ADDR'
-`info f ADDR'
-     Print a verbose description of the frame at address ADDR, without
-     selecting that frame.  The selected frame remains unchanged by this
-     command.  This requires the same kind of address (more than one
-     for some architectures) that you specify in the `frame' command.
-     *Note Selecting a Frame: Selection.
-
-`info args'
-     Print the arguments of the selected frame, each on a separate line.
-
-`info locals'
-     Print the local variables of the selected frame, each on a separate
-     line.  These are all variables (declared either static or
-     automatic) accessible at the point of execution of the selected
-     frame.
-
-
-
 File: gdb.info,  Node: Source,  Next: Data,  Prev: Stack,  Up: Top
 
 9 Examining Source Files
@@ -6396,15 +6486,15 @@ File: gdb.info,  Node: Source,  Next: Da
 
 GDB can print parts of your program's source, since the debugging
 information recorded in the program tells GDB what source files were
-used to build it.  When your program stops, GDB spontaneously prints
-the line where it stopped.  Likewise, when you select a stack frame
-(*note Selecting a Frame: Selection.), GDB prints the line where
-execution in that frame has stopped.  You can print other portions of
-source files by explicit command.
-
-   If you use GDB through its GNU Emacs interface, you may prefer to
-use Emacs facilities to view source; see *note Using GDB under GNU
-Emacs: Emacs.
+used to build it.  When your program stops, GDB spontaneously prints the
+line where it stopped.  Likewise, when you select a stack frame (*note
+Selecting a Frame: Selection.), GDB prints the line where execution in
+that frame has stopped.  You can print other portions of source files by
+explicit command.
+
+   If you use GDB through its GNU Emacs interface, you may prefer to use
+Emacs facilities to view source; see *note Using GDB under GNU Emacs:
+Emacs.
 
 * Menu:
 
@@ -6421,77 +6511,77 @@ File: gdb.info,  Node: List,  Next: Spec
 9.1 Printing Source Lines
 =========================
 
-To print lines from a source file, use the `list' command (abbreviated
-`l').  By default, ten lines are printed.  There are several ways to
+To print lines from a source file, use the 'list' command (abbreviated
+'l').  By default, ten lines are printed.  There are several ways to
 specify what part of the file you want to print; see *note Specify
 Location::, for the full list.
 
-   Here are the forms of the `list' command most commonly used:
+   Here are the forms of the 'list' command most commonly used:
 
-`list LINENUM'
+'list LINENUM'
      Print lines centered around line number LINENUM in the current
      source file.
 
-`list FUNCTION'
+'list FUNCTION'
      Print lines centered around the beginning of function FUNCTION.
 
-`list'
+'list'
      Print more lines.  If the last lines printed were printed with a
-     `list' command, this prints lines following the last lines
-     printed; however, if the last line printed was a solitary line
-     printed as part of displaying a stack frame (*note Examining the
-     Stack: Stack.), this prints lines centered around that line.
+     'list' command, this prints lines following the last lines printed;
+     however, if the last line printed was a solitary line printed as
+     part of displaying a stack frame (*note Examining the Stack:
+     Stack.), this prints lines centered around that line.
 
-`list -'
+'list -'
      Print lines just before the lines last printed.
 
    By default, GDB prints ten source lines with any of these forms of
-the `list' command.  You can change this using `set listsize':
+the 'list' command.  You can change this using 'set listsize':
 
-`set listsize COUNT'
-`set listsize unlimited'
-     Make the `list' command display COUNT source lines (unless the
-     `list' argument explicitly specifies some other number).  Setting
-     COUNT to `unlimited' or 0 means there's no limit.
-
-`show listsize'
-     Display the number of lines that `list' prints.
-
-   Repeating a `list' command with <RET> discards the argument, so it
-is equivalent to typing just `list'.  This is more useful than listing
-the same lines again.  An exception is made for an argument of `-';
-that argument is preserved in repetition so that each repetition moves
-up in the source file.
+'set listsize COUNT'
+'set listsize unlimited'
+     Make the 'list' command display COUNT source lines (unless the
+     'list' argument explicitly specifies some other number).  Setting
+     COUNT to 'unlimited' or 0 means there's no limit.
+
+'show listsize'
+     Display the number of lines that 'list' prints.
+
+   Repeating a 'list' command with <RET> discards the argument, so it is
+equivalent to typing just 'list'.  This is more useful than listing the
+same lines again.  An exception is made for an argument of '-'; that
+argument is preserved in repetition so that each repetition moves up in
+the source file.
 
-   In general, the `list' command expects you to supply zero, one or two
-"linespecs".  Linespecs specify source lines; there are several ways of
+   In general, the 'list' command expects you to supply zero, one or two
+"locations".  Locations specify source lines; there are several ways of
 writing them (*note Specify Location::), but the effect is always to
 specify some source line.
 
-   Here is a complete description of the possible arguments for `list':
+   Here is a complete description of the possible arguments for 'list':
 
-`list LINESPEC'
-     Print lines centered around the line specified by LINESPEC.
+'list LOCATION'
+     Print lines centered around the line specified by LOCATION.
 
-`list FIRST,LAST'
-     Print lines from FIRST to LAST.  Both arguments are linespecs.
-     When a `list' command has two linespecs, and the source file of
-     the second linespec is omitted, this refers to the same source
-     file as the first linespec.
+'list FIRST,LAST'
+     Print lines from FIRST to LAST.  Both arguments are locations.
+     When a 'list' command has two locations, and the source file of the
+     second location is omitted, this refers to the same source file as
+     the first location.
 
-`list ,LAST'
+'list ,LAST'
      Print lines ending with LAST.
 
-`list FIRST,'
+'list FIRST,'
      Print lines starting with FIRST.
 
-`list +'
+'list +'
      Print lines just after the lines last printed.
 
-`list -'
+'list -'
      Print lines just before the lines last printed.
 
-`list'
+'list'
      As described in the preceding table.
 
 
@@ -6500,103 +6590,173 @@ File: gdb.info,  Node: Specify Location,
 9.2 Specifying a Location
 =========================
 
+* Menu:
+
+* Linespec Locations::                Linespec locations
+* Explicit Locations::                Explicit locations
+* Address Locations::                 Address locations
+
 Several GDB commands accept arguments that specify a location of your
 program's code.  Since GDB is a source-level debugger, a location
-usually specifies some line in the source code; for that reason,
-locations are also known as "linespecs".
+usually specifies some line in the source code.  Locations may be
+specified using three different formats: linespec locations, explicit
+locations, or address locations.
+
+
+File: gdb.info,  Node: Linespec Locations,  Next: Explicit Locations,  Up: Specify Location
+
+9.2.1 Linespec Locations
+------------------------
 
-   Here are all the different ways of specifying a code location that
-GDB understands:
+A "linespec" is a colon-separated list of source location parameters
+such as file name, function name, etc.  Here are all the different ways
+of specifying a linespec:
 
-`LINENUM'
+'LINENUM'
      Specifies the line number LINENUM of the current source file.
 
-`-OFFSET'
-`+OFFSET'
-     Specifies the line OFFSET lines before or after the "current
-     line".  For the `list' command, the current line is the last one
-     printed; for the breakpoint commands, this is the line at which
-     execution stopped in the currently selected "stack frame" (*note
-     Frames: Frames, for a description of stack frames.)  When used as
-     the second of the two linespecs in a `list' command, this
-     specifies the line OFFSET lines up or down from the first linespec.
+'-OFFSET'
+'+OFFSET'
+     Specifies the line OFFSET lines before or after the "current line".
+     For the 'list' command, the current line is the last one printed;
+     for the breakpoint commands, this is the line at which execution
+     stopped in the currently selected "stack frame" (*note Frames:
+     Frames, for a description of stack frames.)  When used as the
+     second of the two linespecs in a 'list' command, this specifies the
+     line OFFSET lines up or down from the first linespec.
 
-`FILENAME:LINENUM'
+'FILENAME:LINENUM'
      Specifies the line LINENUM in the source file FILENAME.  If
      FILENAME is a relative file name, then it will match any source
      file name with the same trailing components.  For example, if
-     FILENAME is `gcc/expr.c', then it will match source file name of
-     `/build/trunk/gcc/expr.c', but not `/build/trunk/libcpp/expr.c' or
-     `/build/trunk/gcc/x-expr.c'.
+     FILENAME is 'gcc/expr.c', then it will match source file name of
+     '/build/trunk/gcc/expr.c', but not '/build/trunk/libcpp/expr.c' or
+     '/build/trunk/gcc/x-expr.c'.
 
-`FUNCTION'
+'FUNCTION'
      Specifies the line that begins the body of the function FUNCTION.
      For example, in C, this is the line with the open brace.
 
-`FUNCTION:LABEL'
+'FUNCTION:LABEL'
      Specifies the line where LABEL appears in FUNCTION.
 
-`FILENAME:FUNCTION'
-     Specifies the line that begins the body of the function FUNCTION
-     in the file FILENAME.  You only need the file name with a function
+'FILENAME:FUNCTION'
+     Specifies the line that begins the body of the function FUNCTION in
+     the file FILENAME.  You only need the file name with a function
      name to avoid ambiguity when there are identically named functions
      in different source files.
 
-`LABEL'
-     Specifies the line at which the label named LABEL appears.  GDB
-     searches for the label in the function corresponding to the
-     currently selected stack frame.  If there is no current selected
-     stack frame (for instance, if the inferior is not running), then
-     GDB will not search for a label.
-
-`*ADDRESS'
-     Specifies the program address ADDRESS.  For line-oriented
-     commands, such as `list' and `edit', this specifies a source line
-     that contains ADDRESS.  For `break' and other breakpoint oriented
-     commands, this can be used to set breakpoints in parts of your
-     program which do not have debugging information or source files.
-
-     Here ADDRESS may be any expression valid in the current working
-     language (*note working language: Languages.) that specifies a code
-     address.  In addition, as a convenience, GDB extends the semantics
-     of expressions used in locations to cover the situations that
-     frequently happen during debugging.  Here are the various forms of
-     ADDRESS:
-
-    `EXPRESSION'
-          Any expression valid in the current working language.
-
-    `FUNCADDR'
-          An address of a function or procedure derived from its name.
-          In C, C++, Java, Objective-C, Fortran, minimal, and assembly,
-          this is simply the function's name FUNCTION (and actually a
-          special case of a valid expression).  In Pascal and Modula-2,
-          this is `&FUNCTION'.  In Ada, this is `FUNCTION'Address'
-          (although the Pascal form also works).
-
-          This form specifies the address of the function's first
-          instruction, before the stack frame and arguments have been
-          set up.
-
-    `'FILENAME':FUNCADDR'
-          Like FUNCADDR above, but also specifies the name of the source
-          file explicitly.  This is useful if the name of the function
-          does not specify the function unambiguously, e.g., if there
-          are several functions with identical names in different
-          source files.
+'LABEL'
+     Specifies the line at which the label named LABEL appears in the
+     function corresponding to the currently selected stack frame.  If
+     there is no current selected stack frame (for instance, if the
+     inferior is not running), then GDB will not search for a label.
 
-`-pstap|-probe-stap [OBJFILE:[PROVIDER:]]NAME'
-     The GNU/Linux tool `SystemTap' provides a way for applications to
+'-pstap|-probe-stap [OBJFILE:[PROVIDER:]]NAME'
+     The GNU/Linux tool 'SystemTap' provides a way for applications to
      embed static probes.  *Note Static Probe Points::, for more
      information on finding and using static probes.  This form of
      linespec specifies the location of such a static probe.
 
-     If OBJFILE is given, only probes coming from that shared library
-     or executable matching OBJFILE as a regular expression are
-     considered.  If PROVIDER is given, then only probes from that
-     provider are considered.  If several probes match the spec, GDB
-     will insert a breakpoint at each one of those probes.
-
+     If OBJFILE is given, only probes coming from that shared library or
+     executable matching OBJFILE as a regular expression are considered.
+     If PROVIDER is given, then only probes from that provider are
+     considered.  If several probes match the spec, GDB will insert a
+     breakpoint at each one of those probes.
+
+
+File: gdb.info,  Node: Explicit Locations,  Next: Address Locations,  Prev: Linespec Locations,  Up: Specify Location
+
+9.2.2 Explicit Locations
+------------------------
+
+"Explicit locations" allow the user to directly specify the source
+location's parameters using option-value pairs.
+
+   Explicit locations are useful when several functions, labels, or file
+names have the same name (base name for files) in the program's sources.
+In these cases, explicit locations point to the source line you meant
+more accurately and unambiguously.  Also, using explicit locations might
+be faster in large programs.
+
+   For example, the linespec 'foo:bar' may refer to a function 'bar'
+defined in the file named 'foo' or the label 'bar' in a function named
+'foo'.  GDB must search either the file system or the symbol table to
+know.
+
+   The list of valid explicit location options is summarized in the
+following table:
+
+'-source FILENAME'
+     The value specifies the source file name.  To differentiate between
+     files with the same base name, prepend as many directories as is
+     necessary to uniquely identify the desired file, e.g.,
+     'foo/bar/baz.c'.  Otherwise GDB will use the first file it finds
+     with the given base name.  This option requires the use of either
+     '-function' or '-line'.
+
+'-function FUNCTION'
+     The value specifies the name of a function.  Operations on function
+     locations unmodified by other options (such as '-label' or '-line')
+     refer to the line that begins the body of the function.  In C, for
+     example, this is the line with the open brace.
+
+'-label LABEL'
+     The value specifies the name of a label.  When the function name is
+     not specified, the label is searched in the function of the
+     currently selected stack frame.
+
+'-line NUMBER'
+     The value specifies a line offset for the location.  The offset may
+     either be absolute ('-line 3') or relative ('-line +3'), depending
+     on the command.  When specified without any other options, the line
+     offset is relative to the current line.
+
+   Explicit location options may be abbreviated by omitting any
+non-unique trailing characters from the option name, e.g., 'break -s
+main.c -li 3'.
+
+
+File: gdb.info,  Node: Address Locations,  Prev: Explicit Locations,  Up: Specify Location
+
+9.2.3 Address Locations
+-----------------------
+
+"Address locations" indicate a specific program address.  They have the
+generalized form *ADDRESS.
+
+   For line-oriented commands, such as 'list' and 'edit', this specifies
+a source line that contains ADDRESS.  For 'break' and other
+breakpoint-oriented commands, this can be used to set breakpoints in
+parts of your program which do not have debugging information or source
+files.
+
+   Here ADDRESS may be any expression valid in the current working
+language (*note working language: Languages.) that specifies a code
+address.  In addition, as a convenience, GDB extends the semantics of
+expressions used in locations to cover several situations that
+frequently occur during debugging.  Here are the various forms of
+ADDRESS:
+
+'EXPRESSION'
+     Any expression valid in the current working language.
+
+'FUNCADDR'
+     An address of a function or procedure derived from its name.  In C,
+     C++, Objective-C, Fortran, minimal, and assembly, this is simply
+     the function's name FUNCTION (and actually a special case of a
+     valid expression).  In Pascal and Modula-2, this is '&FUNCTION'.
+     In Ada, this is 'FUNCTION'Address' (although the Pascal form also
+     works).
+
+     This form specifies the address of the function's first
+     instruction, before the stack frame and arguments have been set up.
+
+''FILENAME':FUNCADDR'
+     Like FUNCADDR above, but also specifies the name of the source file
+     explicitly.  This is useful if the name of the function does not
+     specify the function unambiguously, e.g., if there are several
+     functions with identical names in different source files.
 
 
 File: gdb.info,  Node: Edit,  Next: Search,  Prev: Specify Location,  Up: Source
@@ -6604,45 +6764,44 @@ File: gdb.info,  Node: Edit,  Next: Sear
 9.3 Editing Source Files
 ========================
 
-To edit the lines in a source file, use the `edit' command.  The
-editing program of your choice is invoked with the current line set to
-the active line in the program.  Alternatively, there are several ways
-to specify what part of the file you want to print if you want to see
-other parts of the program:
+To edit the lines in a source file, use the 'edit' command.  The editing
+program of your choice is invoked with the current line set to the
+active line in the program.  Alternatively, there are several ways to
+specify what part of the file you want to print if you want to see other
+parts of the program:
 
-`edit LOCATION'
-     Edit the source file specified by `location'.  Editing starts at
+'edit LOCATION'
+     Edit the source file specified by 'location'.  Editing starts at
      that LOCATION, e.g., at the specified source line of the specified
      file.  *Note Specify Location::, for all the possible forms of the
-     LOCATION argument; here are the forms of the `edit' command most
+     LOCATION argument; here are the forms of the 'edit' command most
      commonly used:
 
-    `edit NUMBER'
+     'edit NUMBER'
           Edit the current source file with NUMBER as the active line
           number.
 
-    `edit FUNCTION'
+     'edit FUNCTION'
           Edit the file containing FUNCTION at the beginning of its
           definition.
 
-
 9.3.1 Choosing your Editor
 --------------------------
 
-You can customize GDB to use any editor you want (1).  By default, it
-is `/bin/ex', but you can change this by setting the environment
-variable `EDITOR' before using GDB.  For example, to configure GDB to
-use the `vi' editor, you could use these commands with the `sh' shell:
+You can customize GDB to use any editor you want (1).  By default, it is
+'/bin/ex', but you can change this by setting the environment variable
+'EDITOR' before using GDB.  For example, to configure GDB to use the
+'vi' editor, you could use these commands with the 'sh' shell:
      EDITOR=/usr/bin/vi
      export EDITOR
      gdb ...
-   or in the `csh' shell,
+   or in the 'csh' shell,
      setenv EDITOR /usr/bin/vi
      gdb ...
 
    ---------- Footnotes ----------
 
-   (1) The only restriction is that your editor (say `ex'), recognizes
+   (1) The only restriction is that your editor (say 'ex'), recognizes
 the following command-line syntax:
      ex +NUMBER file
    The optional numeric value +NUMBER specifies the number of the line
@@ -6654,21 +6813,21 @@ File: gdb.info,  Node: Search,  Next: So
 9.4 Searching Source Files
 ==========================
 
-There are two commands for searching through the current source file
-for a regular expression.
+There are two commands for searching through the current source file for
+a regular expression.
 
-`forward-search REGEXP'
-`search REGEXP'
-     The command `forward-search REGEXP' checks each line, starting
-     with the one following the last line listed, for a match for
-     REGEXP.  It lists the line that is found.  You can use the synonym
-     `search REGEXP' or abbreviate the command name as `fo'.
-
-`reverse-search REGEXP'
-     The command `reverse-search REGEXP' checks each line, starting
-     with the one before the last line listed and going backward, for a
-     match for REGEXP.  It lists the line that is found.  You can
-     abbreviate this command as `rev'.
+'forward-search REGEXP'
+'search REGEXP'
+     The command 'forward-search REGEXP' checks each line, starting with
+     the one following the last line listed, for a match for REGEXP.  It
+     lists the line that is found.  You can use the synonym 'search
+     REGEXP' or abbreviate the command name as 'fo'.
+
+'reverse-search REGEXP'
+     The command 'reverse-search REGEXP' checks each line, starting with
+     the one before the last line listed and going backward, for a match
+     for REGEXP.  It lists the line that is found.  You can abbreviate
+     this command as 'rev'.
 
 
 File: gdb.info,  Node: Source Path,  Next: Machine Code,  Prev: Search,  Up: Source
@@ -6678,29 +6837,28 @@ File: gdb.info,  Node: Source Path,  Nex
 
 Executable programs sometimes do not record the directories of the
 source files from which they were compiled, just the names.  Even when
-they do, the directories could be moved between the compilation and
-your debugging session.  GDB has a list of directories to search for
-source files; this is called the "source path".  Each time GDB wants a
-source file, it tries all the directories in the list, in the order
-they are present in the list, until it finds a file with the desired
-name.
+they do, the directories could be moved between the compilation and your
+debugging session.  GDB has a list of directories to search for source
+files; this is called the "source path".  Each time GDB wants a source
+file, it tries all the directories in the list, in the order they are
+present in the list, until it finds a file with the desired name.
 
    For example, suppose an executable references the file
-`/usr/src/foo-1.0/lib/foo.c', and our source path is `/mnt/cross'.  The
+'/usr/src/foo-1.0/lib/foo.c', and our source path is '/mnt/cross'.  The
 file is first looked up literally; if this fails,
-`/mnt/cross/usr/src/foo-1.0/lib/foo.c' is tried; if this fails,
-`/mnt/cross/foo.c' is opened; if this fails, an error message is
+'/mnt/cross/usr/src/foo-1.0/lib/foo.c' is tried; if this fails,
+'/mnt/cross/foo.c' is opened; if this fails, an error message is
 printed.  GDB does not look up the parts of the source file name, such
-as `/mnt/cross/src/foo-1.0/lib/foo.c'.  Likewise, the subdirectories of
-the source path are not searched: if the source path is `/mnt/cross',
-and the binary refers to `foo.c', GDB would not find it under
-`/mnt/cross/usr/src/foo-1.0/lib'.
+as '/mnt/cross/src/foo-1.0/lib/foo.c'.  Likewise, the subdirectories of
+the source path are not searched: if the source path is '/mnt/cross',
+and the binary refers to 'foo.c', GDB would not find it under
+'/mnt/cross/usr/src/foo-1.0/lib'.
 
    Plain file names, relative file names with leading directories, file
 names containing dots, etc. are all treated as described above; for
-instance, if the source path is `/mnt/cross', and the source file is
-recorded as `../lib/foo.c', GDB would first try `../lib/foo.c', then
-`/mnt/cross/../lib/foo.c', and after that--`/mnt/cross/foo.c'.
+instance, if the source path is '/mnt/cross', and the source file is
+recorded as '../lib/foo.c', GDB would first try '../lib/foo.c', then
+'/mnt/cross/../lib/foo.c', and after that--'/mnt/cross/foo.c'.
 
    Note that the executable search path is _not_ used to locate the
 source files.
@@ -6709,11 +6867,11 @@ source files.
 information it has cached about where source files are found and where
 each line is in the file.
 
-   When you start GDB, its source path includes only `cdir' and `cwd',
-in that order.  To add other directories, use the `directory' command.
+   When you start GDB, its source path includes only 'cdir' and 'cwd',
+in that order.  To add other directories, use the 'directory' command.
 
    The search path is used to find both program source files and GDB
-script files (read using the `-command' option and `source' command).
+script files (read using the '-command' option and 'source' command).
 
    In addition to the source path, GDB provides a set of commands that
 manage a list of source path substitution rules.  A "substitution rule"
@@ -6723,92 +6881,91 @@ directory between compilation and debugg
 strings, the first specifying what needs to be rewritten in the path,
 and the second specifying how it should be rewritten.  In *note set
 substitute-path::, we name these two parts FROM and TO respectively.
-GDB does a simple string replacement of FROM with TO at the start of
-the directory part of the source file name, and uses that result
-instead of the original file name to look up the sources.
-
-   Using the previous example, suppose the `foo-1.0' tree has been
-moved from `/usr/src' to `/mnt/cross', then you can tell GDB to replace
-`/usr/src' in all source path names with `/mnt/cross'.  The first
-lookup will then be `/mnt/cross/foo-1.0/lib/foo.c' in place of the
-original location of `/usr/src/foo-1.0/lib/foo.c'.  To define a source
-path substitution rule, use the `set substitute-path' command (*note
-set substitute-path::).
+GDB does a simple string replacement of FROM with TO at the start of the
+directory part of the source file name, and uses that result instead of
+the original file name to look up the sources.
+
+   Using the previous example, suppose the 'foo-1.0' tree has been moved
+from '/usr/src' to '/mnt/cross', then you can tell GDB to replace
+'/usr/src' in all source path names with '/mnt/cross'.  The first lookup
+will then be '/mnt/cross/foo-1.0/lib/foo.c' in place of the original
+location of '/usr/src/foo-1.0/lib/foo.c'.  To define a source path
+substitution rule, use the 'set substitute-path' command (*note set
+substitute-path::).
 
    To avoid unexpected substitution results, a rule is applied only if
 the FROM part of the directory name ends at a directory separator.  For
-instance, a rule substituting  `/usr/source' into `/mnt/cross' will be
-applied to `/usr/source/foo-1.0' but not to `/usr/sourceware/foo-2.0'.
+instance, a rule substituting '/usr/source' into '/mnt/cross' will be
+applied to '/usr/source/foo-1.0' but not to '/usr/sourceware/foo-2.0'.
 And because the substitution is applied only at the beginning of the
 directory name, this rule will not be applied to
-`/root/usr/source/baz.c' either.
+'/root/usr/source/baz.c' either.
 
-   In many cases, you can achieve the same result using the `directory'
-command.  However, `set substitute-path' can be more efficient in the
+   In many cases, you can achieve the same result using the 'directory'
+command.  However, 'set substitute-path' can be more efficient in the
 case where the sources are organized in a complex tree with multiple
-subdirectories.  With the `directory' command, you need to add each
+subdirectories.  With the 'directory' command, you need to add each
 subdirectory of your project.  If you moved the entire tree while
-preserving its internal organization, then `set substitute-path' allows
+preserving its internal organization, then 'set substitute-path' allows
 you to direct the debugger to all the sources with one single command.
 
-   `set substitute-path' is also more than just a shortcut command.
-The source path is only used if the file at the original location no
-longer exists.  On the other hand, `set substitute-path' modifies the
-debugger behavior to look at the rewritten location instead.  So, if
-for any reason a source file that is not relevant to your executable is
-located at the original location, a substitution rule is the only
-method available to point GDB at the new location.
+   'set substitute-path' is also more than just a shortcut command.  The
+source path is only used if the file at the original location no longer
+exists.  On the other hand, 'set substitute-path' modifies the debugger
+behavior to look at the rewritten location instead.  So, if for any
+reason a source file that is not relevant to your executable is located
+at the original location, a substitution rule is the only method
+available to point GDB at the new location.
 
    You can configure a default source path substitution rule by
-configuring GDB with the `--with-relocated-sources=DIR' option.  The DIR
+configuring GDB with the '--with-relocated-sources=DIR' option.  The DIR
 should be the name of a directory under GDB's configured prefix (set
-with `--prefix' or `--exec-prefix'), and directory names in debug
+with '--prefix' or '--exec-prefix'), and directory names in debug
 information under DIR will be adjusted automatically if the installed
 GDB is moved to a new location.  This is useful if GDB, libraries or
 executables with debug information and corresponding source code are
 being moved together.
 
-`directory DIRNAME ...'
-
-`dir DIRNAME ...'
+'directory DIRNAME ...'
+'dir DIRNAME ...'
      Add directory DIRNAME to the front of the source path.  Several
-     directory names may be given to this command, separated by `:'
-     (`;' on MS-DOS and MS-Windows, where `:' usually appears as part
-     of absolute file names) or whitespace.  You may specify a
-     directory that is already in the source path; this moves it
-     forward, so GDB searches it sooner.
-
-     You can use the string `$cdir' to refer to the compilation
-     directory (if one is recorded), and `$cwd' to refer to the current
-     working directory.  `$cwd' is not the same as `.'--the former
+     directory names may be given to this command, separated by ':' (';'
+     on MS-DOS and MS-Windows, where ':' usually appears as part of
+     absolute file names) or whitespace.  You may specify a directory
+     that is already in the source path; this moves it forward, so GDB
+     searches it sooner.
+
+     You can use the string '$cdir' to refer to the compilation
+     directory (if one is recorded), and '$cwd' to refer to the current
+     working directory.  '$cwd' is not the same as '.'--the former
      tracks the current working directory as it changes during your GDB
      session, while the latter is immediately expanded to the current
      directory at the time you add an entry to the source path.
 
-`directory'
-     Reset the source path to its default value (`$cdir:$cwd' on Unix
+'directory'
+     Reset the source path to its default value ('$cdir:$cwd' on Unix
      systems).  This requires confirmation.
 
-`set directories PATH-LIST'
-     Set the source path to PATH-LIST.  `$cdir:$cwd' are added if
+'set directories PATH-LIST'
+     Set the source path to PATH-LIST.  '$cdir:$cwd' are added if
      missing.
 
-`show directories'
+'show directories'
      Print the source path: show which directories it contains.
 
-`set substitute-path FROM TO'
+'set substitute-path FROM TO'
      Define a source path substitution rule, and add it at the end of
      the current list of existing substitution rules.  If a rule with
      the same FROM was already defined, then the old rule is also
      deleted.
 
-     For example, if the file `/foo/bar/baz.c' was moved to
-     `/mnt/cross/baz.c', then the command
+     For example, if the file '/foo/bar/baz.c' was moved to
+     '/mnt/cross/baz.c', then the command
 
-          (gdb) set substitute-path /usr/src /mnt/cross
+          (gdb) set substitute-path /foo/bar /mnt/cross
 
-     will tell GDB to replace `/usr/src' with `/mnt/cross', which will
-     allow GDB to find the file `baz.c' even though it was moved.
+     will tell GDB to replace '/foo/bar' with '/mnt/cross', which will
+     allow GDB to find the file 'baz.c' even though it was moved.
 
      In the case when more than one substitution rule have been defined,
      the rules are evaluated one by one in the order where they have
@@ -6820,196 +6977,34 @@ being moved together.
           (gdb) set substitute-path /usr/src/include /mnt/include
           (gdb) set substitute-path /usr/src /mnt/src
 
-     GDB would then rewrite `/usr/src/include/defs.h' into
-     `/mnt/include/defs.h' by using the first rule.  However, it would
-     use the second rule to rewrite `/usr/src/lib/foo.c' into
-     `/mnt/src/lib/foo.c'.
+     GDB would then rewrite '/usr/src/include/defs.h' into
+     '/mnt/include/defs.h' by using the first rule.  However, it would
+     use the second rule to rewrite '/usr/src/lib/foo.c' into
+     '/mnt/src/lib/foo.c'.
 
-`unset substitute-path [path]'
+'unset substitute-path [path]'
      If a path is specified, search the current list of substitution
-     rules for a rule that would rewrite that path.  Delete that rule
-     if found.  A warning is emitted by the debugger if no rule could
-     be found.
+     rules for a rule that would rewrite that path.  Delete that rule if
+     found.  A warning is emitted by the debugger if no rule could be
+     found.
 
      If no path is specified, then all substitution rules are deleted.
 
-`show substitute-path [path]'
+'show substitute-path [path]'
      If a path is specified, then print the source path substitution
      rule which would rewrite that path, if any.
 
      If no path is specified, then print all existing source path
      substitution rules.
 
-
    If your source path is cluttered with directories that are no longer
 of interest, GDB may sometimes cause confusion by finding the wrong
 versions of source.  You can correct the situation as follows:
 
-  1. Use `directory' with no argument to reset the source path to its
+  1. Use 'directory' with no argument to reset the source path to its
      default value.
 
-  2. Use `directory' with suitable arguments to reinstall the
+  2. Use 'directory' with suitable arguments to reinstall the
      directories you want in the source path.  You can add all the
      directories in one command.
 
-
-File: gdb.info,  Node: Machine Code,  Prev: Source Path,  Up: Source
-
-9.6 Source and Machine Code
-===========================
-
-You can use the command `info line' to map source lines to program
-addresses (and vice versa), and the command `disassemble' to display a
-range of addresses as machine instructions.  You can use the command
-`set disassemble-next-line' to set whether to disassemble next source
-line when execution stops.  When run under GNU Emacs mode, the `info
-line' command causes the arrow to point to the line specified.  Also,
-`info line' prints addresses in symbolic form as well as hex.
-
-`info line LINESPEC'
-     Print the starting and ending addresses of the compiled code for
-     source line LINESPEC.  You can specify source lines in any of the
-     ways documented in *note Specify Location::.
-
-   For example, we can use `info line' to discover the location of the
-object code for the first line of function `m4_changequote':
-
-     (gdb) info line m4_changequote
-     Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350.
-
-We can also inquire (using `*ADDR' as the form for LINESPEC) what
-source line covers a particular address:
-     (gdb) info line *0x63ff
-     Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
-
-   After `info line', the default address for the `x' command is
-changed to the starting address of the line, so that `x/i' is
-sufficient to begin examining the machine code (*note Examining Memory:
-Memory.).  Also, this address is saved as the value of the convenience
-variable `$_' (*note Convenience Variables: Convenience Vars.).
-
-`disassemble'
-`disassemble /m'
-`disassemble /r'
-     This specialized command dumps a range of memory as machine
-     instructions.  It can also print mixed source+disassembly by
-     specifying the `/m' modifier and print the raw instructions in hex
-     as well as in symbolic form by specifying the `/r'.  The default
-     memory range is the function surrounding the program counter of
-     the selected frame.  A single argument to this command is a
-     program counter value; GDB dumps the function surrounding this
-     value.  When two arguments are given, they should be separated by
-     a comma, possibly surrounded by whitespace.  The arguments specify
-     a range of addresses to dump, in one of two forms:
-
-    `START,END'
-          the addresses from START (inclusive) to END (exclusive)
-
-    `START,+LENGTH'
-          the addresses from START (inclusive) to `START+LENGTH'
-          (exclusive).
-
-     When 2 arguments are specified, the name of the function is also
-     printed (since there could be several functions in the given
-     range).
-
-     The argument(s) can be any expression yielding a numeric value,
-     such as `0x32c4', `&main+10' or `$pc - 8'.
-
-     If the range of memory being disassembled contains current program
-     counter, the instruction at that location is shown with a `=>'
-     marker.
-
-   The following example shows the disassembly of a range of addresses
-of HP PA-RISC 2.0 code:
-
-     (gdb) disas 0x32c4, 0x32e4
-     Dump of assembler code from 0x32c4 to 0x32e4:
-        0x32c4 <main+204>:      addil 0,dp
-        0x32c8 <main+208>:      ldw 0x22c(sr0,r1),r26
-        0x32cc <main+212>:      ldil 0x3000,r31
-        0x32d0 <main+216>:      ble 0x3f8(sr4,r31)
-        0x32d4 <main+220>:      ldo 0(r31),rp
-        0x32d8 <main+224>:      addil -0x800,dp
-        0x32dc <main+228>:      ldo 0x588(r1),r26
-        0x32e0 <main+232>:      ldil 0x3000,r31
-     End of assembler dump.
-
-   Here is an example showing mixed source+assembly for Intel x86, when
-the program is stopped just after function prologue:
-
-     (gdb) disas /m main
-     Dump of assembler code for function main:
-     5       {
-        0x08048330 <+0>:    push   %ebp
-        0x08048331 <+1>:    mov    %esp,%ebp
-        0x08048333 <+3>:    sub    $0x8,%esp
-        0x08048336 <+6>:    and    $0xfffffff0,%esp
-        0x08048339 <+9>:    sub    $0x10,%esp
-
-     6         printf ("Hello.\n");
-     => 0x0804833c <+12>:   movl   $0x8048440,(%esp)
-        0x08048343 <+19>:   call   0x8048284 <puts@plt>
-
-     7         return 0;
-     8       }
-        0x08048348 <+24>:   mov    $0x0,%eax
-        0x0804834d <+29>:   leave
-        0x0804834e <+30>:   ret
-
-     End of assembler dump.
-
-   Here is another example showing raw instructions in hex for AMD
-x86-64,
-
-     (gdb) disas /r 0x400281,+10
-     Dump of assembler code from 0x400281 to 0x40028b:
-        0x0000000000400281:  38 36  cmp    %dh,(%rsi)
-        0x0000000000400283:  2d 36 34 2e 73 sub    $0x732e3436,%eax
-        0x0000000000400288:  6f     outsl  %ds:(%rsi),(%dx)
-        0x0000000000400289:  2e 32 00       xor    %cs:(%rax),%al
-     End of assembler dump.
-
-   Addresses cannot be specified as a linespec (*note Specify
-Location::).  So, for example, if you want to disassemble function `bar'
-in file `foo.c', you must type `disassemble 'foo.c'::bar' and not
-`disassemble foo.c:bar'.
-
-   Some architectures have more than one commonly-used set of
-instruction mnemonics or other syntax.
-
-   For programs that were dynamically linked and use shared libraries,
-instructions that call functions or branch to locations in the shared
-libraries might show a seemingly bogus location--it's actually a
-location of the relocation table.  On some architectures, GDB might be
-able to resolve these to actual function names.
-
-`set disassembly-flavor INSTRUCTION-SET'
-     Select the instruction set to use when disassembling the program
-     via the `disassemble' or `x/i' commands.
-
-     Currently this command is only defined for the Intel x86 family.
-     You can set INSTRUCTION-SET to either `intel' or `att'.  The
-     default is `att', the AT&T flavor used by default by Unix
-     assemblers for x86-based targets.
-
-`show disassembly-flavor'
-     Show the current setting of the disassembly flavor.
-
-`set disassemble-next-line'
-`show disassemble-next-line'
-     Control whether or not GDB will disassemble the next source line
-     or instruction when execution stops.  If ON, GDB will display
-     disassembly of the next source line when execution of the program
-     being debugged stops.  This is _in addition_ to displaying the
-     source line itself, which GDB always does if possible.  If the
-     next source line cannot be displayed for some reason (e.g., if GDB
-     cannot find the source file, or there's no line info in the debug
-     info), GDB will display disassembly of the next _instruction_
-     instead of showing the next source line.  If AUTO, GDB will
-     display disassembly of next instruction only if the source line
-     cannot be displayed.  This setting causes GDB to display some
-     feedback when you step through a function with no line info or
-     whose source file is unavailable.  The default is OFF, which means
-     never display the disassembly of the next line or instruction.
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-2 ./gdb/doc/gdb.info-2
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-2	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-2	2017-03-06 01:53:15.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,55 +37,314 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Machine Code,  Prev: Source Path,  Up: Source
+
+9.6 Source and Machine Code
+===========================
+
+You can use the command 'info line' to map source lines to program
+addresses (and vice versa), and the command 'disassemble' to display a
+range of addresses as machine instructions.  You can use the command
+'set disassemble-next-line' to set whether to disassemble next source
+line when execution stops.  When run under GNU Emacs mode, the 'info
+line' command causes the arrow to point to the line specified.  Also,
+'info line' prints addresses in symbolic form as well as hex.
+
+'info line LOCATION'
+     Print the starting and ending addresses of the compiled code for
+     source line LOCATION.  You can specify source lines in any of the
+     ways documented in *note Specify Location::.
+
+   For example, we can use 'info line' to discover the location of the
+object code for the first line of function 'm4_changequote':
+
+     (gdb) info line m4_changequote
+     Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350.
+
+We can also inquire (using '*ADDR' as the form for LOCATION) what source
+line covers a particular address:
+     (gdb) info line *0x63ff
+     Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
+
+   After 'info line', the default address for the 'x' command is changed
+to the starting address of the line, so that 'x/i' is sufficient to
+begin examining the machine code (*note Examining Memory: Memory.).
+Also, this address is saved as the value of the convenience variable
+'$_' (*note Convenience Variables: Convenience Vars.).
+
+'disassemble'
+'disassemble /m'
+'disassemble /s'
+'disassemble /r'
+     This specialized command dumps a range of memory as machine
+     instructions.  It can also print mixed source+disassembly by
+     specifying the '/m' or '/s' modifier and print the raw instructions
+     in hex as well as in symbolic form by specifying the '/r' modifier.
+     The default memory range is the function surrounding the program
+     counter of the selected frame.  A single argument to this command
+     is a program counter value; GDB dumps the function surrounding this
+     value.  When two arguments are given, they should be separated by a
+     comma, possibly surrounded by whitespace.  The arguments specify a
+     range of addresses to dump, in one of two forms:
+
+     'START,END'
+          the addresses from START (inclusive) to END (exclusive)
+     'START,+LENGTH'
+          the addresses from START (inclusive) to 'START+LENGTH'
+          (exclusive).
+
+     When 2 arguments are specified, the name of the function is also
+     printed (since there could be several functions in the given
+     range).
+
+     The argument(s) can be any expression yielding a numeric value,
+     such as '0x32c4', '&main+10' or '$pc - 8'.
+
+     If the range of memory being disassembled contains current program
+     counter, the instruction at that location is shown with a '=>'
+     marker.
+
+   The following example shows the disassembly of a range of addresses
+of HP PA-RISC 2.0 code:
+
+     (gdb) disas 0x32c4, 0x32e4
+     Dump of assembler code from 0x32c4 to 0x32e4:
+        0x32c4 <main+204>:      addil 0,dp
+        0x32c8 <main+208>:      ldw 0x22c(sr0,r1),r26
+        0x32cc <main+212>:      ldil 0x3000,r31
+        0x32d0 <main+216>:      ble 0x3f8(sr4,r31)
+        0x32d4 <main+220>:      ldo 0(r31),rp
+        0x32d8 <main+224>:      addil -0x800,dp
+        0x32dc <main+228>:      ldo 0x588(r1),r26
+        0x32e0 <main+232>:      ldil 0x3000,r31
+     End of assembler dump.
+
+   Here is an example showing mixed source+assembly for Intel x86 with
+'/m' or '/s', when the program is stopped just after function prologue
+in a non-optimized function with no inline code.
+
+     (gdb) disas /m main
+     Dump of assembler code for function main:
+     5       {
+        0x08048330 <+0>:    push   %ebp
+        0x08048331 <+1>:    mov    %esp,%ebp
+        0x08048333 <+3>:    sub    $0x8,%esp
+        0x08048336 <+6>:    and    $0xfffffff0,%esp
+        0x08048339 <+9>:    sub    $0x10,%esp
+
+     6         printf ("Hello.\n");
+     => 0x0804833c <+12>:   movl   $0x8048440,(%esp)
+        0x08048343 <+19>:   call   0x8048284 <puts@plt>
+
+     7         return 0;
+     8       }
+        0x08048348 <+24>:   mov    $0x0,%eax
+        0x0804834d <+29>:   leave
+        0x0804834e <+30>:   ret
+
+     End of assembler dump.
+
+   The '/m' option is deprecated as its output is not useful when there
+is either inlined code or re-ordered code.  The '/s' option is the
+preferred choice.  Here is an example for AMD x86-64 showing the
+difference between '/m' output and '/s' output.  This example has one
+inline function defined in a header file, and the code is compiled with
+'-O2' optimization.  Note how the '/m' output is missing the disassembly
+of several instructions that are present in the '/s' output.
+
+   'foo.h':
+
+     int
+     foo (int a)
+     {
+       if (a < 0)
+         return a * 2;
+       if (a == 0)
+         return 1;
+       return a + 10;
+     }
+
+   'foo.c':
+
+     #include "foo.h"
+     volatile int x, y;
+     int
+     main ()
+     {
+       x = foo (y);
+       return 0;
+     }
+
+     (gdb) disas /m main
+     Dump of assembler code for function main:
+     5	{
+
+     6	  x = foo (y);
+        0x0000000000400400 <+0>:	mov    0x200c2e(%rip),%eax # 0x601034 <y>
+        0x0000000000400417 <+23>:	mov    %eax,0x200c13(%rip) # 0x601030 <x>
+
+     7	  return 0;
+     8	}
+        0x000000000040041d <+29>:	xor    %eax,%eax
+        0x000000000040041f <+31>:	retq
+        0x0000000000400420 <+32>:	add    %eax,%eax
+        0x0000000000400422 <+34>:	jmp    0x400417 <main+23>
+
+     End of assembler dump.
+     (gdb) disas /s main
+     Dump of assembler code for function main:
+     foo.c:
+     5	{
+     6	  x = foo (y);
+        0x0000000000400400 <+0>:	mov    0x200c2e(%rip),%eax # 0x601034 <y>
+
+     foo.h:
+     4	  if (a < 0)
+        0x0000000000400406 <+6>:	test   %eax,%eax
+        0x0000000000400408 <+8>:	js     0x400420 <main+32>
+
+     6	  if (a == 0)
+     7	    return 1;
+     8	  return a + 10;
+        0x000000000040040a <+10>:	lea    0xa(%rax),%edx
+        0x000000000040040d <+13>:	test   %eax,%eax
+        0x000000000040040f <+15>:	mov    $0x1,%eax
+        0x0000000000400414 <+20>:	cmovne %edx,%eax
+
+     foo.c:
+     6	  x = foo (y);
+        0x0000000000400417 <+23>:	mov    %eax,0x200c13(%rip) # 0x601030 <x>
+
+     7	  return 0;
+     8	}
+        0x000000000040041d <+29>:	xor    %eax,%eax
+        0x000000000040041f <+31>:	retq
+
+     foo.h:
+     5	    return a * 2;
+        0x0000000000400420 <+32>:	add    %eax,%eax
+        0x0000000000400422 <+34>:	jmp    0x400417 <main+23>
+     End of assembler dump.
+
+   Here is another example showing raw instructions in hex for AMD
+x86-64,
+
+     (gdb) disas /r 0x400281,+10
+     Dump of assembler code from 0x400281 to 0x40028b:
+        0x0000000000400281:  38 36  cmp    %dh,(%rsi)
+        0x0000000000400283:  2d 36 34 2e 73 sub    $0x732e3436,%eax
+        0x0000000000400288:  6f     outsl  %ds:(%rsi),(%dx)
+        0x0000000000400289:  2e 32 00       xor    %cs:(%rax),%al
+     End of assembler dump.
+
+   Addresses cannot be specified as a location (*note Specify
+Location::).  So, for example, if you want to disassemble function 'bar'
+in file 'foo.c', you must type 'disassemble 'foo.c'::bar' and not
+'disassemble foo.c:bar'.
+
+   Some architectures have more than one commonly-used set of
+instruction mnemonics or other syntax.
+
+   For programs that were dynamically linked and use shared libraries,
+instructions that call functions or branch to locations in the shared
+libraries might show a seemingly bogus location--it's actually a
+location of the relocation table.  On some architectures, GDB might be
+able to resolve these to actual function names.
+
+'set disassembler-options OPTION1[,OPTION2...]'
+     This command controls the passing of target specific information to
+     the disassembler.  For a list of valid options, please refer to the
+     '-M'/'--disassembler-options' section of the 'objdump' manual
+     and/or the output of 'objdump --help' (*note objdump:
+     (binutils.info)objdump.).  The default value is the empty string.
+
+     If it is necessary to specify more than one disassembler option,
+     then multiple options can be placed together into a comma separated
+     list.  Currently this command is only supported on targets ARM,
+     PowerPC and S/390.
+
+'show disassembler-options'
+     Show the current setting of the disassembler options.
+
+'set disassembly-flavor INSTRUCTION-SET'
+     Select the instruction set to use when disassembling the program
+     via the 'disassemble' or 'x/i' commands.
+
+     Currently this command is only defined for the Intel x86 family.
+     You can set INSTRUCTION-SET to either 'intel' or 'att'.  The
+     default is 'att', the AT&T flavor used by default by Unix
+     assemblers for x86-based targets.
+
+'show disassembly-flavor'
+     Show the current setting of the disassembly flavor.
+
+'set disassemble-next-line'
+'show disassemble-next-line'
+     Control whether or not GDB will disassemble the next source line or
+     instruction when execution stops.  If ON, GDB will display
+     disassembly of the next source line when execution of the program
+     being debugged stops.  This is _in addition_ to displaying the
+     source line itself, which GDB always does if possible.  If the next
+     source line cannot be displayed for some reason (e.g., if GDB
+     cannot find the source file, or there's no line info in the debug
+     info), GDB will display disassembly of the next _instruction_
+     instead of showing the next source line.  If AUTO, GDB will display
+     disassembly of next instruction only if the source line cannot be
+     displayed.  This setting causes GDB to display some feedback when
+     you step through a function with no line info or whose source file
+     is unavailable.  The default is OFF, which means never display the
+     disassembly of the next line or instruction.
+
+
 File: gdb.info,  Node: Data,  Next: Optimized Code,  Prev: Source,  Up: Top
 
 10 Examining Data
 *****************
 
-The usual way to examine data in your program is with the `print'
-command (abbreviated `p'), or its synonym `inspect'.  It evaluates and
+The usual way to examine data in your program is with the 'print'
+command (abbreviated 'p'), or its synonym 'inspect'.  It evaluates and
 prints the value of an expression of the language your program is
 written in (*note Using GDB with Different Languages: Languages.).  It
-may also print the expression using a Python-based pretty-printer
-(*note Pretty Printing::).
+may also print the expression using a Python-based pretty-printer (*note
+Pretty Printing::).
 
-`print EXPR'
-`print /F EXPR'
+'print EXPR'
+'print /F EXPR'
      EXPR is an expression (in the source language).  By default the
      value of EXPR is printed in a format appropriate to its data type;
-     you can choose a different format by specifying `/F', where F is a
+     you can choose a different format by specifying '/F', where F is a
      letter specifying the format; see *note Output Formats: Output
      Formats.
 
-`print'
-`print /F'
+'print'
+'print /F'
      If you omit EXPR, GDB displays the last value again (from the
-     "value history"; *note Value History: Value History.).  This
-     allows you to conveniently inspect the same value in an
-     alternative format.
+     "value history"; *note Value History: Value History.).  This allows
+     you to conveniently inspect the same value in an alternative
+     format.
 
-   A more low-level way of examining data is with the `x' command.  It
+   A more low-level way of examining data is with the 'x' command.  It
 examines data in memory at a specified address and prints it in a
 specified format.  *Note Examining Memory: Memory.
 
    If you are interested in information about types, or about how the
-fields of a struct or a class are declared, use the `ptype EXP' command
-rather than `print'.  *Note Examining the Symbol Table: Symbols.
+fields of a struct or a class are declared, use the 'ptype EXP' command
+rather than 'print'.  *Note Examining the Symbol Table: Symbols.
 
    Another way of examining values of expressions and type information
-is through the Python extension command `explore' (available only if
-the GDB build is configured with `--with-python').  It offers an
-interactive way to start at the highest level (or, the most abstract
-level) of the data type of an expression (or, the data type itself) and
-explore all the way down to leaf scalar values/fields embedded in the
-higher level data types.
+is through the Python extension command 'explore' (available only if the
+GDB build is configured with '--with-python').  It offers an interactive
+way to start at the highest level (or, the most abstract level) of the
+data type of an expression (or, the data type itself) and explore all
+the way down to leaf scalar values/fields embedded in the higher level
+data types.
 
-`explore ARG'
+'explore ARG'
      ARG is either an expression (in the source language), or a type
      visible in the current context of the program being debugged.
 
-   The working of the `explore' command can be illustrated with an
-example.  If a data type `struct ComplexStruct' is defined in your C
+   The working of the 'explore' command can be illustrated with an
+example.  If a data type 'struct ComplexStruct' is defined in your C
 program as
 
      struct SimpleStruct
@@ -106,8 +364,8 @@ followed by variable declarations as
      struct SimpleStruct ss = { 10, 1.11 };
      struct ComplexStruct cs = { &ss, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } };
 
-then, the value of the variable `cs' can be explored using the
-`explore' command as follows.
+then, the value of the variable 'cs' can be explored using the 'explore'
+command as follows.
 
      (gdb) explore cs
      The value of `cs' is a struct/class of type `struct ComplexStruct' with
@@ -118,14 +376,14 @@ then, the value of the variable `cs' can
 
      Enter the field number of choice:
 
-Since the fields of `cs' are not scalar values, you are being prompted
+Since the fields of 'cs' are not scalar values, you are being prompted
 to chose the field you want to explore.  Let's say you choose the field
-`ss_p' by entering `0'.  Then, since this field is a pointer, you will
+'ss_p' by entering '0'.  Then, since this field is a pointer, you will
 be asked if it is pointing to a single value.  From the declaration of
-`cs' above, it is indeed pointing to a single value, hence you enter
-`y'.  If you enter `n', then you will be asked if it were pointing to
-an array of values, in which case this field will be explored as if it
-were an array.
+'cs' above, it is indeed pointing to a single value, hence you enter
+'y'.  If you enter 'n', then you will be asked if it were pointing to an
+array of values, in which case this field will be explored as if it were
+an array.
 
      `cs.ss_p' is a pointer to a value of type `struct SimpleStruct'
      Continue exploring it as a pointer to a single value [y/n]: y
@@ -137,7 +395,7 @@ were an array.
 
      Press enter to return to parent value:
 
-If the field `arr' of `cs' was chosen for exploration by entering `1'
+If the field 'arr' of 'cs' was chosen for exploration by entering '1'
 earlier, then since it is as array, you will be prompted to enter the
 index of the element in the array that you want to explore.
 
@@ -155,42 +413,42 @@ the leaf values by responding to the pro
 return key to return to the enclosing data structure (the higher level
 data structure).
 
-   Similar to exploring values, you can use the `explore' command to
+   Similar to exploring values, you can use the 'explore' command to
 explore types.  Instead of specifying a value (which is typically a
 variable name or an expression valid in the current context of the
 program being debugged), you specify a type name.  If you consider the
-same example as above, your can explore the type `struct ComplexStruct'
-by passing the argument `struct ComplexStruct' to the `explore' command.
+same example as above, your can explore the type 'struct ComplexStruct'
+by passing the argument 'struct ComplexStruct' to the 'explore' command.
 
      (gdb) explore struct ComplexStruct
 
 By responding to the prompts appropriately in the subsequent interactive
-session, you can explore the type `struct ComplexStruct' in a manner
-similar to how the value `cs' was explored in the above example.
+session, you can explore the type 'struct ComplexStruct' in a manner
+similar to how the value 'cs' was explored in the above example.
 
-   The `explore' command also has two sub-commands, `explore value' and
-`explore type'. The former sub-command is a way to explicitly specify
+   The 'explore' command also has two sub-commands, 'explore value' and
+'explore type'.  The former sub-command is a way to explicitly specify
 that value exploration of the argument is being invoked, while the
 latter is a way to explicitly specify that type exploration of the
 argument is being invoked.
 
-`explore value EXPR'
-     This sub-command of `explore' explores the value of the expression
+'explore value EXPR'
+     This sub-command of 'explore' explores the value of the expression
      EXPR (if EXPR is an expression valid in the current context of the
-     program being debugged).  The behavior of this command is
-     identical to that of the behavior of the `explore' command being
-     passed the argument EXPR.
-
-`explore type ARG'
-     This sub-command of `explore' explores the type of ARG (if ARG is
-     a type visible in the current context of program being debugged),
-     or the type of the value/expression ARG (if ARG is an expression
-     valid in the current context of the program being debugged).  If
-     ARG is a type, then the behavior of this command is identical to
-     that of the `explore' command being passed the argument ARG.  If
-     ARG is an expression, then the behavior of this command will be
-     identical to that of the `explore' command being passed the type
-     of ARG as the argument.
+     program being debugged).  The behavior of this command is identical
+     to that of the behavior of the 'explore' command being passed the
+     argument EXPR.
+
+'explore type ARG'
+     This sub-command of 'explore' explores the type of ARG (if ARG is a
+     type visible in the current context of program being debugged), or
+     the type of the value/expression ARG (if ARG is an expression valid
+     in the current context of the program being debugged).  If ARG is a
+     type, then the behavior of this command is identical to that of the
+     'explore' command being passed the argument ARG.  If ARG is an
+     expression, then the behavior of this command will be identical to
+     that of the 'explore' command being passed the type of ARG as the
+     argument.
 
 * Menu:
 
@@ -217,6 +475,7 @@ argument is being invoked.
                                 character set than GDB does
 * Caching Target Data::         Data caching for targets
 * Searching Memory::            Searching memory for a sequence of bytes
+* Value Sizes::                 Managing memory allocated for values
 
 
 File: gdb.info,  Node: Expressions,  Next: Ambiguous Expressions,  Up: Data
@@ -224,24 +483,22 @@ File: gdb.info,  Node: Expressions,  Nex
 10.1 Expressions
 ================
 
-`print' and many other GDB commands accept an expression and compute
-its value.  Any kind of constant, variable or operator defined by the
+'print' and many other GDB commands accept an expression and compute its
+value.  Any kind of constant, variable or operator defined by the
 programming language you are using is valid in an expression in GDB.
-This includes conditional expressions, function calls, casts, and
-string constants.  It also includes preprocessor macros, if you
-compiled your program to include this information; see *note
-Compilation::.
+This includes conditional expressions, function calls, casts, and string
+constants.  It also includes preprocessor macros, if you compiled your
+program to include this information; see *note Compilation::.
 
    GDB supports array constants in expressions input by the user.  The
 syntax is {ELEMENT, ELEMENT...}.  For example, you can use the command
-`print {1, 2, 3}' to create an array of three integers.  If you pass an
+'print {1, 2, 3}' to create an array of three integers.  If you pass an
 array to a function or assign it to a program variable, GDB copies the
-array to memory that is `malloc'ed in the target program.
+array to memory that is 'malloc'ed in the target program.
 
-   Because C is so widespread, most of the expressions shown in
-examples in this manual are in C.  *Note Using GDB with Different
-Languages: Languages, for information on how to use expressions in other
-languages.
+   Because C is so widespread, most of the expressions shown in examples
+in this manual are in C. *Note Using GDB with Different Languages:
+Languages, for information on how to use expressions in other languages.
 
    In this section, we discuss operators that you can use in GDB
 expressions regardless of your programming language.
@@ -253,20 +510,20 @@ at that address in memory.
    GDB supports these operators, in addition to those common to
 programming languages:
 
-`@'
-     `@' is a binary operator for treating parts of memory as arrays.
+'@'
+     '@' is a binary operator for treating parts of memory as arrays.
      *Note Artificial Arrays: Arrays, for more information.
 
-`::'
-     `::' allows you to specify a variable in terms of the file or
+'::'
+     '::' allows you to specify a variable in terms of the file or
      function where it is defined.  *Note Program Variables: Variables.
 
-`{TYPE} ADDR'
+'{TYPE} ADDR'
      Refers to an object of type TYPE stored at address ADDR in memory.
-     The address ADDR may be any expression whose value is an integer
-     or pointer (but parentheses are required around binary operators,
-     just as in a cast).  This construct is allowed regardless of what
-     kind of data is normally supposed to reside at ADDR.
+     The address ADDR may be any expression whose value is an integer or
+     pointer (but parentheses are required around binary operators, just
+     as in a cast).  This construct is allowed regardless of what kind
+     of data is normally supposed to reside at ADDR.
 
 
 File: gdb.info,  Node: Ambiguous Expressions,  Next: Variables,  Prev: Expressions,  Up: Data
@@ -284,20 +541,20 @@ resulting in the same function name bein
 
    In some cases and depending on the language, it is possible to adjust
 the expression to remove the ambiguity.  For instance in C++, you can
-specify the signature of the function you want to break on, as in
-`break FUNCTION(TYPES)'.  In Ada, using the fully qualified name of
-your function often makes the expression unambiguous as well.
+specify the signature of the function you want to break on, as in 'break
+FUNCTION(TYPES)'.  In Ada, using the fully qualified name of your
+function often makes the expression unambiguous as well.
 
    When an ambiguity that needs to be resolved is detected, the debugger
 has the capability to display a menu of numbered choices for each
-possibility, and then waits for the selection with the prompt `>'.  The
-first option is always `[0] cancel', and typing `0 <RET>' aborts the
-current command.  If the command in which the expression was used
-allows more than one choice to be selected, the next option in the menu
-is `[1] all', and typing `1 <RET>' selects all possible choices.
+possibility, and then waits for the selection with the prompt '>'.  The
+first option is always '[0] cancel', and typing '0 <RET>' aborts the
+current command.  If the command in which the expression was used allows
+more than one choice to be selected, the next option in the menu is '[1]
+all', and typing '1 <RET>' selects all possible choices.
 
    For example, the following session excerpt shows an attempt to set a
-breakpoint at the overloaded symbol `String::after'.  We choose three
+breakpoint at the overloaded symbol 'String::after'.  We choose three
 particular definitions of that function name:
 
      (gdb) b String::after
@@ -318,28 +575,28 @@ particular definitions of that function 
       breakpoints.
      (gdb)
 
-`set multiple-symbols MODE'
+'set multiple-symbols MODE'
+
      This option allows you to adjust the debugger behavior when an
      expression is ambiguous.
 
-     By default, MODE is set to `all'.  If the command with which the
+     By default, MODE is set to 'all'.  If the command with which the
      expression is used allows more than one choice, then GDB
      automatically selects all possible choices.  For instance,
      inserting a breakpoint on a function using an ambiguous name
      results in a breakpoint inserted on each possible match.  However,
-     if a unique choice must be made, then GDB uses the menu to help
-     you disambiguate the expression.  For instance, printing the
-     address of an overloaded function will result in the use of the
-     menu.
+     if a unique choice must be made, then GDB uses the menu to help you
+     disambiguate the expression.  For instance, printing the address of
+     an overloaded function will result in the use of the menu.
 
-     When MODE is set to `ask', the debugger always uses the menu when
+     When MODE is set to 'ask', the debugger always uses the menu when
      an ambiguity is detected.
 
-     Finally, when MODE is set to `cancel', the debugger reports an
+     Finally, when MODE is set to 'cancel', the debugger reports an
      error due to the ambiguity and the command is aborted.
 
-`show multiple-symbols'
-     Show the current value of the `multiple-symbols' setting.
+'show multiple-symbols'
+     Show the current value of the 'multiple-symbols' setting.
 
 
 File: gdb.info,  Node: Variables,  Next: Arrays,  Prev: Ambiguous Expressions,  Up: Data
@@ -372,10 +629,10 @@ This means that in the function
        }
      }
 
-you can examine and use the variable `a' whenever your program is
-executing within the function `foo', but you can only use or examine
-the variable `b' while your program is executing inside the block where
-`b' is declared.
+you can examine and use the variable 'a' whenever your program is
+executing within the function 'foo', but you can only use or examine the
+variable 'b' while your program is executing inside the block where 'b'
+is declared.
 
    There is an exception: you can refer to a variable or function whose
 scope is a single source file even if the current execution point is not
@@ -383,7 +640,7 @@ in this file.  But it is possible to hav
 function with the same name (in different source files).  If that
 happens, referring to that name has unpredictable effects.  If you wish,
 you can specify a static variable in a particular function or file by
-using the colon-colon (`::') notation:
+using the colon-colon ('::') notation:
 
      FILE::VARIABLE
      FUNCTION::VARIABLE
@@ -391,15 +648,15 @@ using the colon-colon (`::') notation:
 Here FILE or FUNCTION is the name of the context for the static
 VARIABLE.  In the case of file names, you can use quotes to make sure
 GDB parses the file name as a single word--for example, to print a
-global value of `x' defined in `f2.c':
+global value of 'x' defined in 'f2.c':
 
      (gdb) p 'f2.c'::x
 
-   The `::' notation is normally used for referring to static
-variables, since you typically disambiguate uses of local variables in
-functions by selecting the appropriate frame and using the simple name
-of the variable.  However, you may also use this notation to refer to
-local variables in frames enclosing the selected frame:
+   The '::' notation is normally used for referring to static variables,
+since you typically disambiguate uses of local variables in functions by
+selecting the appropriate frame and using the simple name of the
+variable.  However, you may also use this notation to refer to local
+variables in frames enclosing the selected frame:
 
      void
      foo (int a)
@@ -418,7 +675,7 @@ local variables in frames enclosing the 
 
 For example, if there is a breakpoint at the commented line, here is
 what you might see when the program stops after executing the call
-`bar(0)':
+'bar(0)':
 
      (gdb) p a
      $1 = 10
@@ -431,14 +688,14 @@ what you might see when the program stop
      (gdb) p bar::a
      $4 = 0
 
-   These uses of `::' are very rarely in conflict with the very similar
+   These uses of '::' are very rarely in conflict with the very similar
 use of the same notation in C++.  When they are in conflict, the C++
-meaning takes precedence; however, this can be overridden by quoting
-the file or function name with single quotes.
+meaning takes precedence; however, this can be overridden by quoting the
+file or function name with single quotes.
 
    For example, suppose the program is stopped in a method of a class
-that has a field named `includefile', and there is also an include file
-named `includefile' that defines a variable, `some_global'.
+that has a field named 'includefile', and there is also an include file
+named 'includefile' that defines a variable, 'some_global'.
 
      (gdb) p includefile
      $1 = 23
@@ -451,13 +708,13 @@ named `includefile' that defines a varia
      wrong value at certain points in a function--just after entry to a
      new scope, and just before exit.
    You may see this problem when you are stepping by machine
-instructions.  This is because, on most machines, it takes more than
-one instruction to set up a stack frame (including local variable
-definitions); if you are stepping by machine instructions, variables
-may appear to have the wrong values until the stack frame is completely
-built.  On exit, it usually also takes more than one machine
-instruction to destroy a stack frame; after you begin stepping through
-that group of instructions, local variable definitions may be gone.
+instructions.  This is because, on most machines, it takes more than one
+instruction to set up a stack frame (including local variable
+definitions); if you are stepping by machine instructions, variables may
+appear to have the wrong values until the stack frame is completely
+built.  On exit, it usually also takes more than one machine instruction
+to destroy a stack frame; after you begin stepping through that group of
+instructions, local variable definitions may be gone.
 
    This may also happen when the compiler does significant
 optimizations.  To be sure of always seeing accurate values, turn off
@@ -480,10 +737,10 @@ formats that are best suited to C++ prog
 
    If you ask to print an object whose contents are unknown to GDB,
 e.g., because its data type is not completely specified by the debug
-information, GDB will say `<incomplete type>'.  *Note incomplete type:
+information, GDB will say '<incomplete type>'.  *Note incomplete type:
 Symbols, for more about this.
 
-   If you append `@entry' string to a function parameter name you get
+   If you append '@entry' string to a function parameter name you get
 its value at the time the function got called.  If the value is not
 available an error message is printed.  Entry values are available only
 with some compilers.  Entry values are normally also printed at the
@@ -498,11 +755,11 @@ function parameter list according to *no
      (gdb) print i@entry
      $2 = 30
 
-   Strings are identified as arrays of `char' values without specified
-signedness.  Arrays of either `signed char' or `unsigned char' get
-printed as arrays of 1 byte sized integers.  `-fsigned-char' or
-`-funsigned-char' GCC options have no effect as GDB defines literal
-string type `"char"' as `char' without a sign.  For program code
+   Strings are identified as arrays of 'char' values without specified
+signedness.  Arrays of either 'signed char' or 'unsigned char' get
+printed as arrays of 1 byte sized integers.  '-fsigned-char' or
+'-funsigned-char' GCC options have no effect as GDB defines literal
+string type '"char"' as 'char' without a sign.  For program code
 
      char var0[] = "A";
      signed char var1[] = "A";
@@ -524,8 +781,8 @@ type in memory; a section of an array, o
 determined size for which only a pointer exists in the program.
 
    You can do this by referring to a contiguous span of memory as an
-"artificial array", using the binary operator `@'.  The left operand of
-`@' should be the first element of the desired array and be an
+"artificial array", using the binary operator '@'.  The left operand of
+'@' should be the first element of the desired array and be an
 individual object.  The right operand should be the desired length of
 the array.  The result is an array value whose elements are all of the
 type of the left argument.  The first element is actually the left
@@ -535,12 +792,12 @@ example.  If a program says
 
      int *array = (int *) malloc (len * sizeof (int));
 
-you can print the contents of `array' with
+you can print the contents of 'array' with
 
      p *array@len
 
-   The left operand of `@' must reside in memory.  Array values made
-with `@' in this way behave just like other arrays in terms of
+   The left operand of '@' must reside in memory.  Array values made
+with '@' in this way behave just like other arrays in terms of
 subscripting, and are coerced to pointers when used in expressions.
 Artificial arrays most often appear in expressions via the value history
 (*note Value History: Value History.), after printing one out.
@@ -552,20 +809,20 @@ memory:
      $1 = {0x1234, 0x5678}
 
    As a convenience, if you leave the array length out (as in
-`(TYPE[])VALUE') GDB calculates the size to fill the value (as
-`sizeof(VALUE)/sizeof(TYPE)':
+'(TYPE[])VALUE') GDB calculates the size to fill the value (as
+'sizeof(VALUE)/sizeof(TYPE)':
      (gdb) p/x (short[])0x12345678
      $2 = {0x1234, 0x5678}
 
    Sometimes the artificial array mechanism is not quite enough; in
 moderately complex data structures, the elements of interest may not
 actually be adjacent--for example, if you are interested in the values
-of pointers in an array.  One useful work-around in this situation is
-to use a convenience variable (*note Convenience Variables: Convenience
+of pointers in an array.  One useful work-around in this situation is to
+use a convenience variable (*note Convenience Variables: Convenience
 Vars.) as a counter in an expression that prints the first interesting
-value, and then repeat that expression via <RET>.  For instance,
-suppose you have an array `dtab' of pointers to structures, and you are
-interested in the values of a field `fv' in each structure.  Here is an
+value, and then repeat that expression via <RET>.  For instance, suppose
+you have an array 'dtab' of pointers to structures, and you are
+interested in the values of a field 'fv' in each structure.  Here is an
 example of what you might type:
 
      set $i = 0
@@ -588,75 +845,75 @@ instruction.  To do these things, specif
 print a value.
 
    The simplest use of output formats is to say how to print a value
-already computed.  This is done by starting the arguments of the
-`print' command with a slash and a format letter.  The format letters
-supported are:
+already computed.  This is done by starting the arguments of the 'print'
+command with a slash and a format letter.  The format letters supported
+are:
 
-`x'
+'x'
      Regard the bits of the value as an integer, and print the integer
      in hexadecimal.
 
-`d'
+'d'
      Print as integer in signed decimal.
 
-`u'
+'u'
      Print as integer in unsigned decimal.
 
-`o'
+'o'
      Print as integer in octal.
 
-`t'
-     Print as integer in binary.  The letter `t' stands for "two".  (1)
+'t'
+     Print as integer in binary.  The letter 't' stands for "two".  (1)
 
-`a'
+'a'
      Print as an address, both absolute in hexadecimal and as an offset
-     from the nearest preceding symbol.  You can use this format used
-     to discover where (in what function) an unknown address is located:
+     from the nearest preceding symbol.  You can use this format used to
+     discover where (in what function) an unknown address is located:
 
           (gdb) p/a 0x54320
           $3 = 0x54320 <_initialize_vx+396>
 
-     The command `info symbol 0x54320' yields similar results.  *Note
+     The command 'info symbol 0x54320' yields similar results.  *Note
      info symbol: Symbols.
 
-`c'
+'c'
      Regard as an integer and print it as a character constant.  This
      prints both the numerical value and its character representation.
      The character representation is replaced with the octal escape
-     `\nnn' for characters outside the 7-bit ASCII range.
+     '\nnn' for characters outside the 7-bit ASCII range.
 
-     Without this format, GDB displays `char', `unsigned char', and
-     `signed char' data as character constants.  Single-byte members of
+     Without this format, GDB displays 'char', 'unsigned char', and
+     'signed char' data as character constants.  Single-byte members of
      vectors are displayed as integer data.
 
-`f'
+'f'
      Regard the bits of the value as a floating point number and print
      using typical floating point syntax.
 
-`s'
+'s'
      Regard as a string, if possible.  With this format, pointers to
      single-byte data are displayed as null-terminated strings and
      arrays of single-byte data are displayed as fixed-length strings.
      Other values are displayed in their natural types.
 
-     Without this format, GDB displays pointers to and arrays of
-     `char', `unsigned char', and `signed char' as strings.
-     Single-byte members of a vector are displayed as an integer array.
-
-`z'
-     Like `x' formatting, the value is treated as an integer and
-     printed as hexadecimal, but leading zeros are printed to pad the
-     value to the size of the integer type.
+     Without this format, GDB displays pointers to and arrays of 'char',
+     'unsigned char', and 'signed char' as strings.  Single-byte members
+     of a vector are displayed as an integer array.
+
+'z'
+     Like 'x' formatting, the value is treated as an integer and printed
+     as hexadecimal, but leading zeros are printed to pad the value to
+     the size of the integer type.
 
-`r'
-     Print using the `raw' formatting.  By default, GDB will use a
+'r'
+     Print using the 'raw' formatting.  By default, GDB will use a
      Python-based pretty-printer, if one is available (*note Pretty
      Printing::).  This typically results in a higher-level display of
-     the value's contents.  The `r' format bypasses any Python
+     the value's contents.  The 'r' format bypasses any Python
      pretty-printer which might exist.
 
-   For example, to print the program counter in hex (*note
-Registers::), type
+   For example, to print the program counter in hex (*note Registers::),
+type
 
      p/x $pc
 
@@ -664,13 +921,13 @@ Note that no space is required before th
 names in GDB cannot contain a slash.
 
    To reprint the last value in the value history with a different
-format, you can use the `print' command with just a format and no
-expression.  For example, `p/x' reprints the last value in hex.
+format, you can use the 'print' command with just a format and no
+expression.  For example, 'p/x' reprints the last value in hex.
 
    ---------- Footnotes ----------
 
-   (1) `b' cannot be used because these format letters are also used
-with the `x' command, where `b' stands for "byte"; see *note Examining
+   (1) 'b' cannot be used because these format letters are also used
+with the 'x' command, where 'b' stands for "byte"; see *note Examining
 Memory: Memory.
 
 
@@ -679,101 +936,111 @@ File: gdb.info,  Node: Memory,  Next: Au
 10.6 Examining Memory
 =====================
 
-You can use the command `x' (for "examine") to examine memory in any of
+You can use the command 'x' (for "examine") to examine memory in any of
 several formats, independently of your program's data types.
 
-`x/NFU ADDR'
-`x ADDR'
-`x'
-     Use the `x' command to examine memory.
+'x/NFU ADDR'
+'x ADDR'
+'x'
+     Use the 'x' command to examine memory.
 
    N, F, and U are all optional parameters that specify how much memory
 to display and how to format it; ADDR is an expression giving the
 address where you want to start displaying memory.  If you use defaults
-for NFU, you need not type the slash `/'.  Several commands set
+for NFU, you need not type the slash '/'.  Several commands set
 convenient defaults for ADDR.
 
 N, the repeat count
      The repeat count is a decimal integer; the default is 1.  It
-     specifies how much memory (counting by units U) to display.
+     specifies how much memory (counting by units U) to display.  If a
+     negative number is specified, memory is examined backward from
+     ADDR.
 
 F, the display format
-     The display format is one of the formats used by `print' (`x',
-     `d', `u', `o', `t', `a', `c', `f', `s'), and in addition `i' (for
-     machine instructions).  The default is `x' (hexadecimal)
-     initially.  The default changes each time you use either `x' or
-     `print'.
+     The display format is one of the formats used by 'print' ('x', 'd',
+     'u', 'o', 't', 'a', 'c', 'f', 's'), and in addition 'i' (for
+     machine instructions).  The default is 'x' (hexadecimal) initially.
+     The default changes each time you use either 'x' or 'print'.
 
 U, the unit size
      The unit size is any of
 
-    `b'
+     'b'
           Bytes.
-
-    `h'
+     'h'
           Halfwords (two bytes).
-
-    `w'
+     'w'
           Words (four bytes).  This is the initial default.
-
-    `g'
+     'g'
           Giant words (eight bytes).
 
-     Each time you specify a unit size with `x', that size becomes the
-     default unit the next time you use `x'.  For the `i' format, the
-     unit size is ignored and is normally not written.  For the `s'
-     format, the unit size defaults to `b', unless it is explicitly
-     given.  Use `x /hs' to display 16-bit char strings and `x /ws' to
-     display 32-bit strings.  The next use of `x /s' will again display
+     Each time you specify a unit size with 'x', that size becomes the
+     default unit the next time you use 'x'.  For the 'i' format, the
+     unit size is ignored and is normally not written.  For the 's'
+     format, the unit size defaults to 'b', unless it is explicitly
+     given.  Use 'x /hs' to display 16-bit char strings and 'x /ws' to
+     display 32-bit strings.  The next use of 'x /s' will again display
      8-bit strings.  Note that the results depend on the programming
      language of the current compilation unit.  If the language is C,
-     the `s' modifier will use the UTF-16 encoding while `w' will use
+     the 's' modifier will use the UTF-16 encoding while 'w' will use
      UTF-32.  The encoding is set by the programming language and cannot
      be altered.
 
 ADDR, starting display address
      ADDR is the address where you want GDB to begin displaying memory.
-     The expression need not have a pointer value (though it may); it
-     is always interpreted as an integer address of a byte of memory.
+     The expression need not have a pointer value (though it may); it is
+     always interpreted as an integer address of a byte of memory.
      *Note Expressions: Expressions, for more information on
      expressions.  The default for ADDR is usually just after the last
      address examined--but several other commands also set the default
-     address: `info breakpoints' (to the address of the last breakpoint
-     listed), `info line' (to the starting address of a line), and
-     `print' (if you use it to display a value from memory).
-
-   For example, `x/3uh 0x54320' is a request to display three halfwords
-(`h') of memory, formatted as unsigned decimal integers (`u'), starting
-at address `0x54320'.  `x/4xw $sp' prints the four words (`w') of
-memory above the stack pointer (here, `$sp'; *note Registers:
-Registers.) in hexadecimal (`x').
+     address: 'info breakpoints' (to the address of the last breakpoint
+     listed), 'info line' (to the starting address of a line), and
+     'print' (if you use it to display a value from memory).
+
+   For example, 'x/3uh 0x54320' is a request to display three halfwords
+('h') of memory, formatted as unsigned decimal integers ('u'), starting
+at address '0x54320'.  'x/4xw $sp' prints the four words ('w') of memory
+above the stack pointer (here, '$sp'; *note Registers: Registers.) in
+hexadecimal ('x').
+
+   You can also specify a negative repeat count to examine memory
+backward from the given address.  For example, 'x/-3uh 0x54320' prints
+three halfwords ('h') at '0x54314', '0x54328', and '0x5431c'.
 
    Since the letters indicating unit sizes are all distinct from the
 letters specifying output formats, you do not have to remember whether
 unit size or format comes first; either order works.  The output
-specifications `4xw' and `4wx' mean exactly the same thing.  (However,
-the count N must come first; `wx4' does not work.)
+specifications '4xw' and '4wx' mean exactly the same thing.  (However,
+the count N must come first; 'wx4' does not work.)
 
-   Even though the unit size U is ignored for the formats `s' and `i',
-you might still want to use a count N; for example, `3i' specifies that
-you want to see three machine instructions, including any operands.
-For convenience, especially when used with the `display' command, the
-`i' format also prints branch delay slot instructions, if any, beyond
-the count specified, which immediately follow the last instruction that
-is within the count.  The command `disassemble' gives an alternative
-way of inspecting machine instructions; see *note Source and Machine
-Code: Machine Code.
+   Even though the unit size U is ignored for the formats 's' and 'i',
+you might still want to use a count N; for example, '3i' specifies that
+you want to see three machine instructions, including any operands.  For
+convenience, especially when used with the 'display' command, the 'i'
+format also prints branch delay slot instructions, if any, beyond the
+count specified, which immediately follow the last instruction that is
+within the count.  The command 'disassemble' gives an alternative way of
+inspecting machine instructions; see *note Source and Machine Code:
+Machine Code.
+
+   If a negative repeat count is specified for the formats 's' or 'i',
+the command displays null-terminated strings or instructions before the
+given address as many as the absolute value of the given number.  For
+the 'i' format, we use line number information in the debug info to
+accurately locate instruction boundaries while disassembling backward.
+If line info is not available, the command stops examining memory with
+an error message.
 
-   All the defaults for the arguments to `x' are designed to make it
+   All the defaults for the arguments to 'x' are designed to make it
 easy to continue scanning memory with minimal specifications each time
-you use `x'.  For example, after you have inspected three machine
-instructions with `x/3i ADDR', you can inspect the next seven with just
-`x/7'.  If you use <RET> to repeat the `x' command, the repeat count N
+you use 'x'.  For example, after you have inspected three machine
+instructions with 'x/3i ADDR', you can inspect the next seven with just
+'x/7'.  If you use <RET> to repeat the 'x' command, the repeat count N
 is used again; the other arguments default as for successive uses of
-`x'.
+'x'.
 
    When examining machine instructions, the instruction at current
-program counter is shown with a `=>' marker. For example:
+program counter is shown with a '=>' marker.  For example:
 
      (gdb) x/5i $pc-6
         0x804837f <main+11>: mov    %esp,%ebp
@@ -782,16 +1049,16 @@ program counter is shown with a `=>' mar
      => 0x8048385 <main+17>: movl   $0x8048460,(%esp)
         0x804838c <main+24>: call   0x80482d4 <puts@plt>
 
-   The addresses and contents printed by the `x' command are not saved
+   The addresses and contents printed by the 'x' command are not saved
 in the value history because there is often too much of them and they
 would get in the way.  Instead, GDB makes these values available for
 subsequent use in expressions as values of the convenience variables
-`$_' and `$__'.  After an `x' command, the last address examined is
-available for use in expressions in the convenience variable `$_'.  The
+'$_' and '$__'.  After an 'x' command, the last address examined is
+available for use in expressions in the convenience variable '$_'.  The
 contents of that address, as examined, are available in the convenience
-variable `$__'.
+variable '$__'.
 
-   If the `x' command has a repeat count, the address and contents saved
+   If the 'x' command has a repeat count, the address and contents saved
 are from the last memory unit printed; this is not the same as the last
 address printed if several units were printed on the last line of
 output.
@@ -810,14 +1077,14 @@ systems, addressable memory unit is a sy
 in the remote machine's memory against the executable file you
 downloaded to the target.  Or, on any target, you may want to check
 whether the program has corrupted its own read-only sections.  The
-`compare-sections' command is provided for such situations.
+'compare-sections' command is provided for such situations.
 
-`compare-sections [SECTION-NAME|`-r']'
+'compare-sections [SECTION-NAME|-r]'
      Compare the data of a loadable section SECTION-NAME in the
-     executable file of the program being debugged with the same
-     section in the target machine's memory, and report any mismatches.
-     With no arguments, compares all loadable sections.  With an
-     argument of `-r', compares all loadable read-only sections.
+     executable file of the program being debugged with the same section
+     in the target machine's memory, and report any mismatches.  With no
+     arguments, compares all loadable sections.  With an argument of
+     '-r', compares all loadable read-only sections.
 
      Note: for remote targets, this command can be accelerated if the
      target supports computing the CRC checksum of a block of memory
@@ -840,85 +1107,85 @@ automatic display looks like this:
      3: bar[5] = (struct hack *) 0x3804
 
 This display shows item numbers, expressions and their current values.
-As with displays you request manually using `x' or `print', you can
-specify the output format you prefer; in fact, `display' decides
-whether to use `print' or `x' depending your format specification--it
-uses `x' if you specify either the `i' or `s' format, or a unit size;
-otherwise it uses `print'.
+As with displays you request manually using 'x' or 'print', you can
+specify the output format you prefer; in fact, 'display' decides whether
+to use 'print' or 'x' depending your format specification--it uses 'x'
+if you specify either the 'i' or 's' format, or a unit size; otherwise
+it uses 'print'.
 
-`display EXPR'
+'display EXPR'
      Add the expression EXPR to the list of expressions to display each
      time your program stops.  *Note Expressions: Expressions.
 
-     `display' does not repeat if you press <RET> again after using it.
+     'display' does not repeat if you press <RET> again after using it.
 
-`display/FMT EXPR'
+'display/FMT EXPR'
      For FMT specifying only a display format and not a size or count,
      add the expression EXPR to the auto-display list but arrange to
      display it each time in the specified format FMT.  *Note Output
      Formats: Output Formats.
 
-`display/FMT ADDR'
-     For FMT `i' or `s', or including a unit-size or a number of units,
+'display/FMT ADDR'
+     For FMT 'i' or 's', or including a unit-size or a number of units,
      add the expression ADDR as a memory address to be examined each
-     time your program stops.  Examining means in effect doing `x/FMT
+     time your program stops.  Examining means in effect doing 'x/FMT
      ADDR'.  *Note Examining Memory: Memory.
 
-   For example, `display/i $pc' can be helpful, to see the machine
-instruction about to be executed each time execution stops (`$pc' is a
+   For example, 'display/i $pc' can be helpful, to see the machine
+instruction about to be executed each time execution stops ('$pc' is a
 common name for the program counter; *note Registers: Registers.).
 
-`undisplay DNUMS...'
-`delete display DNUMS...'
+'undisplay DNUMS...'
+'delete display DNUMS...'
      Remove items from the list of expressions to display.  Specify the
      numbers of the displays that you want affected with the command
      argument DNUMS.  It can be a single display number, one of the
-     numbers shown in the first field of the `info display' display; or
-     it could be a range of display numbers, as in `2-4'.
+     numbers shown in the first field of the 'info display' display; or
+     it could be a range of display numbers, as in '2-4'.
 
-     `undisplay' does not repeat if you press <RET> after using it.
-     (Otherwise you would just get the error `No display number ...'.)
+     'undisplay' does not repeat if you press <RET> after using it.
+     (Otherwise you would just get the error 'No display number ...'.)
 
-`disable display DNUMS...'
-     Disable the display of item numbers DNUMS.  A disabled display
-     item is not printed automatically, but is not forgotten.  It may be
+'disable display DNUMS...'
+     Disable the display of item numbers DNUMS.  A disabled display item
+     is not printed automatically, but is not forgotten.  It may be
      enabled again later.  Specify the numbers of the displays that you
      want affected with the command argument DNUMS.  It can be a single
      display number, one of the numbers shown in the first field of the
-     `info display' display; or it could be a range of display numbers,
-     as in `2-4'.
+     'info display' display; or it could be a range of display numbers,
+     as in '2-4'.
 
-`enable display DNUMS...'
+'enable display DNUMS...'
      Enable display of item numbers DNUMS.  It becomes effective once
      again in auto display of its expression, until you specify
      otherwise.  Specify the numbers of the displays that you want
      affected with the command argument DNUMS.  It can be a single
      display number, one of the numbers shown in the first field of the
-     `info display' display; or it could be a range of display numbers,
-     as in `2-4'.
+     'info display' display; or it could be a range of display numbers,
+     as in '2-4'.
 
-`display'
+'display'
      Display the current values of the expressions on the list, just as
      is done when your program stops.
 
-`info display'
+'info display'
      Print the list of expressions previously set up to display
      automatically, each one with its item number, but without showing
      the values.  This includes disabled expressions, which are marked
-     as such.  It also includes expressions which would not be
-     displayed right now because they refer to automatic variables not
-     currently available.
+     as such.  It also includes expressions which would not be displayed
+     right now because they refer to automatic variables not currently
+     available.
 
    If a display expression refers to local variables, then it does not
 make sense outside the lexical context for which it was set up.  Such an
 expression is disabled when execution enters a context where one of its
-variables is not defined.  For example, if you give the command
-`display last_char' while inside a function with an argument
-`last_char', GDB displays this argument while your program continues to
-stop inside that function.  When it stops elsewhere--where there is no
-variable `last_char'--the display is disabled automatically.  The next
-time your program stops where `last_char' is meaningful, you can enable
-the display expression once again.
+variables is not defined.  For example, if you give the command 'display
+last_char' while inside a function with an argument 'last_char', GDB
+displays this argument while your program continues to stop inside that
+function.  When it stops elsewhere--where there is no variable
+'last_char'--the display is disabled automatically.  The next time your
+program stops where 'last_char' is meaningful, you can enable the
+display expression once again.
 
 
 File: gdb.info,  Node: Print Settings,  Next: Pretty Printing,  Prev: Auto Display,  Up: Data
@@ -931,22 +1198,22 @@ symbols are printed.
 
 These settings are useful for debugging programs in any language:
 
-`set print address'
-`set print address on'
+'set print address'
+'set print address on'
      GDB prints memory addresses showing the location of stack traces,
      structure values, pointer values, breakpoints, and so forth, even
      when it also displays the contents of those addresses.  The default
-     is `on'.  For example, this is what a stack frame display looks
-     like with `set print address on':
+     is 'on'.  For example, this is what a stack frame display looks
+     like with 'set print address on':
 
           (gdb) f
           #0  set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>")
               at input.c:530
           530         if (lquote != def_lquote)
 
-`set print address off'
+'set print address off'
      Do not print addresses when displaying their contents.  For
-     example, this is the same stack frame displayed with `set print
+     example, this is the same stack frame displayed with 'set print
      address off':
 
           (gdb) set print addr off
@@ -954,31 +1221,30 @@ These settings are useful for debugging 
           #0  set_quotes (lq="<<", rq=">>") at input.c:530
           530         if (lquote != def_lquote)
 
-     You can use `set print address off' to eliminate all machine
+     You can use 'set print address off' to eliminate all machine
      dependent displays from the GDB interface.  For example, with
-     `print address off', you should get the same text for backtraces on
+     'print address off', you should get the same text for backtraces on
      all machines--whether or not they involve pointer arguments.
 
-`show print address'
+'show print address'
      Show whether or not addresses are to be printed.
 
    When GDB prints a symbolic address, it normally prints the closest
 earlier symbol plus an offset.  If that symbol does not uniquely
 identify the address (for example, it is a name whose scope is a single
-source file), you may need to clarify.  One way to do this is with
-`info line', for example `info line *0x4537'.  Alternately, you can set
-GDB to print the source file and line number when it prints a symbolic
-address:
+source file), you may need to clarify.  One way to do this is with 'info
+line', for example 'info line *0x4537'.  Alternately, you can set GDB to
+print the source file and line number when it prints a symbolic address:
 
-`set print symbol-filename on'
+'set print symbol-filename on'
      Tell GDB to print the source file name and line number of a symbol
      in the symbolic form of an address.
 
-`set print symbol-filename off'
-     Do not print source file name and line number of a symbol.  This
-     is the default.
+'set print symbol-filename off'
+     Do not print source file name and line number of a symbol.  This is
+     the default.
 
-`show print symbol-filename'
+'show print symbol-filename'
      Show whether or not GDB will print the source file name and line
      number of a symbol in the symbolic form of an address.
 
@@ -989,144 +1255,144 @@ and source file that corresponds to each
    Also, you may wish to see the symbolic form only if the address being
 printed is reasonably close to the closest earlier symbol:
 
-`set print max-symbolic-offset MAX-OFFSET'
-`set print max-symbolic-offset unlimited'
+'set print max-symbolic-offset MAX-OFFSET'
+'set print max-symbolic-offset unlimited'
      Tell GDB to only display the symbolic form of an address if the
      offset between the closest earlier symbol and the address is less
-     than MAX-OFFSET.  The default is `unlimited', which tells GDB to
+     than MAX-OFFSET.  The default is 'unlimited', which tells GDB to
      always print the symbolic form of an address if any symbol precedes
-     it.  Zero is equivalent to `unlimited'.
+     it.  Zero is equivalent to 'unlimited'.
 
-`show print max-symbolic-offset'
+'show print max-symbolic-offset'
      Ask how large the maximum offset is that GDB prints in a symbolic
      address.
 
-   If you have a pointer and you are not sure where it points, try `set
+   If you have a pointer and you are not sure where it points, try 'set
 print symbol-filename on'.  Then you can determine the name and source
-file location of the variable where it points, using `p/a POINTER'.
+file location of the variable where it points, using 'p/a POINTER'.
 This interprets the address in symbolic form.  For example, here GDB
-shows that a variable `ptt' points at another variable `t', defined in
-`hi2.c':
+shows that a variable 'ptt' points at another variable 't', defined in
+'hi2.c':
 
      (gdb) set print symbol-filename on
      (gdb) p/a ptt
      $4 = 0xe008 <t in hi2.c>
 
-     _Warning:_ For pointers that point to a local variable, `p/a' does
+     _Warning:_ For pointers that point to a local variable, 'p/a' does
      not show the symbol name and filename of the referent, even with
-     the appropriate `set print' options turned on.
+     the appropriate 'set print' options turned on.
 
-   You can also enable `/a'-like formatting all the time using `set
+   You can also enable '/a'-like formatting all the time using 'set
 print symbol on':
 
-`set print symbol on'
+'set print symbol on'
      Tell GDB to print the symbol corresponding to an address, if one
      exists.
 
-`set print symbol off'
+'set print symbol off'
      Tell GDB not to print the symbol corresponding to an address.  In
      this mode, GDB will still print the symbol corresponding to
      pointers to functions.  This is the default.
 
-`show print symbol'
+'show print symbol'
      Show whether GDB will display the symbol corresponding to an
      address.
 
    Other settings control how different kinds of objects are printed:
 
-`set print array'
-`set print array on'
+'set print array'
+'set print array on'
      Pretty print arrays.  This format is more convenient to read, but
      uses more space.  The default is off.
 
-`set print array off'
+'set print array off'
      Return to compressed format for arrays.
 
-`show print array'
+'show print array'
      Show whether compressed or pretty format is selected for displaying
      arrays.
 
-`set print array-indexes'
-`set print array-indexes on'
+'set print array-indexes'
+'set print array-indexes on'
      Print the index of each element when displaying arrays.  May be
      more convenient to locate a given element in the array or quickly
      find the index of a given element in that printed array.  The
      default is off.
 
-`set print array-indexes off'
+'set print array-indexes off'
      Stop printing element indexes when displaying arrays.
 
-`show print array-indexes'
+'show print array-indexes'
      Show whether the index of each element is printed when displaying
      arrays.
 
-`set print elements NUMBER-OF-ELEMENTS'
-`set print elements unlimited'
+'set print elements NUMBER-OF-ELEMENTS'
+'set print elements unlimited'
      Set a limit on how many elements of an array GDB will print.  If
      GDB is printing a large array, it stops printing after it has
-     printed the number of elements set by the `set print elements'
+     printed the number of elements set by the 'set print elements'
      command.  This limit also applies to the display of strings.  When
      GDB starts, this limit is set to 200.  Setting NUMBER-OF-ELEMENTS
-     to `unlimited' or zero means that the number of elements to print
+     to 'unlimited' or zero means that the number of elements to print
      is unlimited.
 
-`show print elements'
+'show print elements'
      Display the number of elements of a large array that GDB will
      print.  If the number is 0, then the printing is unlimited.
 
-`set print frame-arguments VALUE'
+'set print frame-arguments VALUE'
      This command allows to control how the values of arguments are
      printed when the debugger prints a frame (*note Frames::).  The
      possible values are:
 
-    `all'
+     'all'
           The values of all arguments are printed.
 
-    `scalars'
+     'scalars'
           Print the value of an argument only if it is a scalar.  The
           value of more complex arguments such as arrays, structures,
-          unions, etc, is replaced by `...'.  This is the default.
-          Here is an example where only scalar arguments are shown:
+          unions, etc, is replaced by '...'.  This is the default.  Here
+          is an example where only scalar arguments are shown:
 
                #1  0x08048361 in call_me (i=3, s=..., ss=0xbf8d508c, u=..., e=green)
                  at frame-args.c:23
 
-    `none'
+     'none'
           None of the argument values are printed.  Instead, the value
-          of each argument is replaced by `...'.  In this case, the
+          of each argument is replaced by '...'.  In this case, the
           example above now becomes:
 
                #1  0x08048361 in call_me (i=..., s=..., ss=..., u=..., e=...)
                  at frame-args.c:23
 
-     By default, only scalar arguments are printed.  This command can
-     be used to configure the debugger to print the value of all
-     arguments, regardless of their type.  However, it is often
-     advantageous to not print the value of more complex parameters.
-     For instance, it reduces the amount of information printed in each
-     frame, making the backtrace more readable.  Also, it improves
-     performance when displaying Ada frames, because the computation of
-     large arguments can sometimes be CPU-intensive, especially in
-     large applications.  Setting `print frame-arguments' to `scalars'
-     (the default) or `none' avoids this computation, thus speeding up
-     the display of each Ada frame.
-
-`show print frame-arguments'
-     Show how the value of arguments should be displayed when printing
-     a frame.
+     By default, only scalar arguments are printed.  This command can be
+     used to configure the debugger to print the value of all arguments,
+     regardless of their type.  However, it is often advantageous to not
+     print the value of more complex parameters.  For instance, it
+     reduces the amount of information printed in each frame, making the
+     backtrace more readable.  Also, it improves performance when
+     displaying Ada frames, because the computation of large arguments
+     can sometimes be CPU-intensive, especially in large applications.
+     Setting 'print frame-arguments' to 'scalars' (the default) or
+     'none' avoids this computation, thus speeding up the display of
+     each Ada frame.
+
+'show print frame-arguments'
+     Show how the value of arguments should be displayed when printing a
+     frame.
 
-`set print raw frame-arguments on'
+'set print raw frame-arguments on'
      Print frame arguments in raw, non pretty-printed, form.
 
-`set print raw frame-arguments off'
+'set print raw frame-arguments off'
      Print frame arguments in pretty-printed form, if there is a
      pretty-printer for the value (*note Pretty Printing::), otherwise
      print the value in raw form.  This is the default.
 
-`show print raw frame-arguments'
+'show print raw frame-arguments'
      Show whether to print frame arguments in raw form.
 
-`set print entry-values VALUE'
+'set print entry-values VALUE'
      Set printing of frame argument values at function entry.  In some
      cases GDB can determine the value of function argument which was
      passed by the function caller, even if the value was modified
@@ -1134,19 +1400,19 @@ print symbol on':
      optimized code, the current value could be unavailable, but the
      entry value may still be known.
 
-     The default value is `default' (see below for its description).
-     Older GDB behaved as with the setting `no'.  Compilers not
-     supporting this feature will behave in the `default' setting the
-     same way as with the `no' setting.
-
-     This functionality is currently supported only by DWARF 2
-     debugging format and the compiler has to produce
-     `DW_TAG_GNU_call_site' tags.  With GCC, you need to specify `-O
-     -g' during compilation, to get this information.
+     The default value is 'default' (see below for its description).
+     Older GDB behaved as with the setting 'no'.  Compilers not
+     supporting this feature will behave in the 'default' setting the
+     same way as with the 'no' setting.
+
+     This functionality is currently supported only by DWARF 2 debugging
+     format and the compiler has to produce 'DW_TAG_call_site' tags.
+     With GCC, you need to specify '-O -g' during compilation, to get
+     this information.
 
      The VALUE parameter can be one of the following:
 
-    `no'
+     'no'
           Print only actual parameter values, never print values from
           function entry point.
                #0  equal (val=5)
@@ -1155,7 +1421,7 @@ print symbol on':
                #0  born (val=10)
                #0  invalid (val=<optimized out>)
 
-    `only'
+     'only'
           Print only parameter values from function entry point.  The
           actual parameter values are never printed.
                #0  equal (val@entry=5)
@@ -1164,7 +1430,7 @@ print symbol on':
                #0  born (val@entry=<optimized out>)
                #0  invalid (val@entry=<optimized out>)
 
-    `preferred'
+     'preferred'
           Print only parameter values from function entry point.  If
           value from function entry point is not known while the actual
           value is known, print the actual value for such parameter.
@@ -1174,7 +1440,7 @@ print symbol on':
                #0  born (val=10)
                #0  invalid (val@entry=<optimized out>)
 
-    `if-needed'
+     'if-needed'
           Print actual parameter values.  If actual parameter value is
           not known while value from function entry point is known,
           print the entry point value for such parameter.
@@ -1184,7 +1450,7 @@ print symbol on':
                #0  born (val=10)
                #0  invalid (val=<optimized out>)
 
-    `both'
+     'both'
           Always print both the actual parameter value and its value
           from function entry point, even if values of one or both are
           not available due to compiler optimizations.
@@ -1194,12 +1460,12 @@ print symbol on':
                #0  born (val=10, val@entry=<optimized out>)
                #0  invalid (val=<optimized out>, val@entry=<optimized out>)
 
-    `compact'
+     'compact'
           Print the actual parameter value if it is known and also its
-          value from function entry point if it is known.  If neither
-          is known, print for the actual value `<optimized out>'.  If
-          not in MI mode (*note GDB/MI::) and if both values are known
-          and identical, print the shortened `param=param@entry=VALUE'
+          value from function entry point if it is known.  If neither is
+          known, print for the actual value '<optimized out>'.  If not
+          in MI mode (*note GDB/MI::) and if both values are known and
+          identical, print the shortened 'param=param@entry=VALUE'
           notation.
                #0  equal (val=val@entry=5)
                #0  different (val=6, val@entry=5)
@@ -1207,11 +1473,11 @@ print symbol on':
                #0  born (val=10)
                #0  invalid (val=<optimized out>)
 
-    `default'
-          Always print the actual parameter value.  Print also its
-          value from function entry point, but only if it is known.  If
-          not in MI mode (*note GDB/MI::) and if both values are known
-          and identical, print the shortened `param=param@entry=VALUE'
+     'default'
+          Always print the actual parameter value.  Print also its value
+          from function entry point, but only if it is known.  If not in
+          MI mode (*note GDB/MI::) and if both values are known and
+          identical, print the shortened 'param=param@entry=VALUE'
           notation.
                #0  equal (val=val@entry=5)
                #0  different (val=6, val@entry=5)
@@ -1219,38 +1485,37 @@ print symbol on':
                #0  born (val=10)
                #0  invalid (val=<optimized out>)
 
-     For analysis messages on possible failures of frame argument
-     values at function entry resolution see *note set debug
-     entry-values::.
-
-`show print entry-values'
-     Show the method being used for printing of frame argument values
-     at function entry.
+     For analysis messages on possible failures of frame argument values
+     at function entry resolution see *note set debug entry-values::.
 
-`set print repeats NUMBER-OF-REPEATS'
-`set print repeats unlimited'
+'show print entry-values'
+     Show the method being used for printing of frame argument values at
+     function entry.
+
+'set print repeats NUMBER-OF-REPEATS'
+'set print repeats unlimited'
      Set the threshold for suppressing display of repeated array
      elements.  When the number of consecutive identical elements of an
-     array exceeds the threshold, GDB prints the string `"<repeats N
+     array exceeds the threshold, GDB prints the string '"<repeats N
      times>"', where N is the number of identical repetitions, instead
      of displaying the identical elements themselves.  Setting the
-     threshold to `unlimited' or zero will cause all elements to be
+     threshold to 'unlimited' or zero will cause all elements to be
      individually printed.  The default threshold is 10.
 
-`show print repeats'
+'show print repeats'
      Display the current threshold for printing repeated identical
      elements.
 
-`set print null-stop'
+'set print null-stop'
      Cause GDB to stop printing the characters of an array when the
      first NULL is encountered.  This is useful when large arrays
      actually contain only short strings.  The default is off.
 
-`show print null-stop'
+'show print null-stop'
      Show whether GDB stops printing an array on the first NULL
      character.
 
-`set print pretty on'
+'set print pretty on'
      Cause GDB to print structures in an indented format with one member
      per line, like this:
 
@@ -1263,7 +1528,7 @@ print symbol on':
             meat = 0x54 "Pork"
           }
 
-`set print pretty off'
+'set print pretty off'
      Cause GDB to print structures in a compact format, like this:
 
           $1 = {next = 0x0, flags = {sweet = 1, sour = 1}, \
@@ -1271,32 +1536,32 @@ print symbol on':
 
      This is the default format.
 
-`show print pretty'
+'show print pretty'
      Show which format GDB is using to print structures.
 
-`set print sevenbit-strings on'
+'set print sevenbit-strings on'
      Print using only seven-bit characters; if this option is set, GDB
      displays any eight-bit characters (in strings or character values)
-     using the notation `\'NNN.  This setting is best if you are
-     working in English (ASCII) and you use the high-order bit of
-     characters as a marker or "meta" bit.
+     using the notation '\'NNN.  This setting is best if you are working
+     in English (ASCII) and you use the high-order bit of characters as
+     a marker or "meta" bit.
 
-`set print sevenbit-strings off'
+'set print sevenbit-strings off'
      Print full eight-bit characters.  This allows the use of more
      international character sets, and is the default.
 
-`show print sevenbit-strings'
+'show print sevenbit-strings'
      Show whether or not GDB is printing only seven-bit characters.
 
-`set print union on'
+'set print union on'
      Tell GDB to print unions which are contained in structures and
      other unions.  This is the default setting.
 
-`set print union off'
+'set print union off'
      Tell GDB not to print unions which are contained in structures and
-     other unions.  GDB will print `"{...}"' instead.
+     other unions.  GDB will print '"{...}"' instead.
 
-`show print union'
+'show print union'
      Ask GDB whether or not it will print unions which are contained in
      structures and other unions.
 
@@ -1317,71 +1582,71 @@ print symbol on':
 
           struct thing foo = {Tree, {Acorn}};
 
-     with `set print union on' in effect `p foo' would print
+     with 'set print union on' in effect 'p foo' would print
 
           $1 = {it = Tree, form = {tree = Acorn, bug = Cocoon}}
 
-     and with `set print union off' in effect it would print
+     and with 'set print union off' in effect it would print
 
           $1 = {it = Tree, form = {...}}
 
-     `set print union' affects programs written in C-like languages and
+     'set print union' affects programs written in C-like languages and
      in Pascal.
 
 These settings are of interest when debugging C++ programs:
 
-`set print demangle'
-`set print demangle on'
+'set print demangle'
+'set print demangle on'
      Print C++ names in their source form rather than in the encoded
      ("mangled") form passed to the assembler and linker for type-safe
      linkage.  The default is on.
 
-`show print demangle'
+'show print demangle'
      Show whether C++ names are printed in mangled or demangled form.
 
-`set print asm-demangle'
-`set print asm-demangle on'
+'set print asm-demangle'
+'set print asm-demangle on'
      Print C++ names in their source form rather than their mangled
      form, even in assembler code printouts such as instruction
      disassemblies.  The default is off.
 
-`show print asm-demangle'
+'show print asm-demangle'
      Show whether C++ names in assembly listings are printed in mangled
      or demangled form.
 
-`set demangle-style STYLE'
+'set demangle-style STYLE'
      Choose among several encoding schemes used by different compilers
      to represent C++ names.  The choices for STYLE are currently:
 
-    `auto'
+     'auto'
           Allow GDB to choose a decoding style by inspecting your
           program.  This is the default.
 
-    `gnu'
-          Decode based on the GNU C++ compiler (`g++') encoding
+     'gnu'
+          Decode based on the GNU C++ compiler ('g++') encoding
           algorithm.
 
-    `hp'
-          Decode based on the HP ANSI C++ (`aCC') encoding algorithm.
+     'hp'
+          Decode based on the HP ANSI C++ ('aCC') encoding algorithm.
 
-    `lucid'
-          Decode based on the Lucid C++ compiler (`lcc') encoding
+     'lucid'
+          Decode based on the Lucid C++ compiler ('lcc') encoding
           algorithm.
 
-    `arm'
-          Decode using the algorithm in the `C++ Annotated Reference
+     'arm'
+          Decode using the algorithm in the 'C++ Annotated Reference
           Manual'.  *Warning:* this setting alone is not sufficient to
-          allow debugging `cfront'-generated executables.  GDB would
+          allow debugging 'cfront'-generated executables.  GDB would
           require further enhancement to permit that.
 
      If you omit STYLE, you will see a list of possible formats.
 
-`show demangle-style'
+'show demangle-style'
      Display the encoding style currently in use for decoding C++
      symbols.
 
-`set print object'
-`set print object on'
+'set print object'
+'set print object on'
      When displaying a pointer to an object, identify the _actual_
      (derived) type of the object rather than the _declared_ type, using
      the virtual function table.  Note that the virtual function table
@@ -1391,45 +1656,45 @@ These settings are of interest when debu
      also taken into account when working with variable objects via MI
      (*note GDB/MI::).
 
-`set print object off'
+'set print object off'
      Display only the declared type of objects, without reference to the
      virtual function table.  This is the default setting.
 
-`show print object'
+'show print object'
      Show whether actual, or declared, object types are displayed.
 
-`set print static-members'
-`set print static-members on'
+'set print static-members'
+'set print static-members on'
      Print static members when displaying a C++ object.  The default is
      on.
 
-`set print static-members off'
+'set print static-members off'
      Do not print static members when displaying a C++ object.
 
-`show print static-members'
+'show print static-members'
      Show whether C++ static members are printed or not.
 
-`set print pascal_static-members'
-`set print pascal_static-members on'
+'set print pascal_static-members'
+'set print pascal_static-members on'
      Print static members when displaying a Pascal object.  The default
      is on.
 
-`set print pascal_static-members off'
+'set print pascal_static-members off'
      Do not print static members when displaying a Pascal object.
 
-`show print pascal_static-members'
+'show print pascal_static-members'
      Show whether Pascal static members are printed or not.
 
-`set print vtbl'
-`set print vtbl on'
+'set print vtbl'
+'set print vtbl on'
      Pretty print C++ virtual function tables.  The default is off.
-     (The `vtbl' commands do not work on programs compiled with the HP
-     ANSI C++ compiler (`aCC').)
+     (The 'vtbl' commands do not work on programs compiled with the HP
+     ANSI C++ compiler ('aCC').)
 
-`set print vtbl off'
+'set print vtbl off'
      Do not pretty print C++ virtual function tables.
 
-`show print vtbl'
+'show print vtbl'
      Show whether C++ virtual function tables are pretty printed, or
      not.
 
@@ -1439,9 +1704,9 @@ File: gdb.info,  Node: Pretty Printing, 
 10.9 Pretty Printing
 ====================
 
-GDB provides a mechanism to allow pretty-printing of values using
-Python code.  It greatly simplifies the display of complex objects.
-This mechanism works for both MI and the CLI.
+GDB provides a mechanism to allow pretty-printing of values using Python
+code.  It greatly simplifies the display of complex objects.  This
+mechanism works for both MI and the CLI.
 
 * Menu:
 
@@ -1461,7 +1726,7 @@ pretty-printer to print the value.  Othe
 normally.
 
    Pretty-printers are normally named.  This makes them easy to manage.
-The `info pretty-printer' command will list all the installed
+The 'info pretty-printer' command will list all the installed
 pretty-printers with their names.  If a pretty-printer can handle
 multiple data types, then its "subprinters" are the printers for the
 individual data types.  Each such subprinter has its own name.  The
@@ -1497,7 +1762,7 @@ File: gdb.info,  Node: Pretty-Printer Ex
 10.9.2 Pretty-Printer Example
 -----------------------------
 
-Here is how a C++ `std::string' looks without a pretty-printer:
+Here is how a C++ 'std::string' looks without a pretty-printer:
 
      (gdb) print s
      $1 = {
@@ -1513,7 +1778,7 @@ Here is how a C++ `std::string' looks wi
        }
      }
 
-   With a pretty-printer for `std::string' only the contents are
+   With a pretty-printer for 'std::string' only the contents are
 printed:
 
      (gdb) print s
@@ -1525,12 +1790,12 @@ File: gdb.info,  Node: Pretty-Printer Co
 10.9.3 Pretty-Printer Commands
 ------------------------------
 
-`info pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
+'info pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
      Print the list of installed pretty-printers.  This includes
      disabled pretty-printers, which are marked as such.
 
      OBJECT-REGEXP is a regular expression matching the objects whose
-     pretty-printers to list.  Objects can be `global', the program
+     pretty-printers to list.  Objects can be 'global', the program
      space's file (*note Progspaces In Python::), and the object files
      within that program space (*note Objfiles In Python::).  *Note
      Selecting Pretty-Printers::, for details on how GDB looks up a
@@ -1539,20 +1804,20 @@ File: gdb.info,  Node: Pretty-Printer Co
      NAME-REGEXP is a regular expression matching the name of the
      printers to list.
 
-`disable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
+'disable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
      Disable pretty-printers matching OBJECT-REGEXP and NAME-REGEXP.  A
      disabled pretty-printer is not forgotten, it may be enabled again
      later.
 
-`enable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
+'enable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]'
      Enable pretty-printers matching OBJECT-REGEXP and NAME-REGEXP.
 
    Example:
 
    Suppose we have three pretty-printers installed: one from library1.so
-named `foo' that prints objects of type `foo', and another from
-library2.so named `bar' that prints two types of objects, `bar1' and
-`bar2'.
+named 'foo' that prints objects of type 'foo', and another from
+library2.so named 'bar' that prints two types of objects, 'bar1' and
+'bar2'.
 
      (gdb) info pretty-printer
      library1.so:
@@ -1597,7 +1862,7 @@ library2.so named `bar' that prints two 
          bar1 [disabled]
          bar2
 
-   Note that for `bar' the entire printer can be disabled, as can each
+   Note that for 'bar' the entire printer can be disabled, as can each
 individual subprinter.
 
 
@@ -1606,31 +1871,31 @@ File: gdb.info,  Node: Value History,  N
 10.10 Value History
 ===================
 
-Values printed by the `print' command are saved in the GDB "value
+Values printed by the 'print' command are saved in the GDB "value
 history".  This allows you to refer to them in other expressions.
 Values are kept until the symbol table is re-read or discarded (for
-example with the `file' or `symbol-file' commands).  When the symbol
+example with the 'file' or 'symbol-file' commands).  When the symbol
 table changes, the value history is discarded, since the values may
 contain pointers back to the types defined in the symbol table.
 
-   The values printed are given "history numbers" by which you can
-refer to them.  These are successive integers starting with one.
-`print' shows you the history number assigned to a value by printing
-`$NUM = ' before the value; here NUM is the history number.
-
-   To refer to any previous value, use `$' followed by the value's
-history number.  The way `print' labels its output is designed to
-remind you of this.  Just `$' refers to the most recent value in the
-history, and `$$' refers to the value before that.  `$$N' refers to the
-Nth value from the end; `$$2' is the value just prior to `$$', `$$1' is
-equivalent to `$$', and `$$0' is equivalent to `$'.
+   The values printed are given "history numbers" by which you can refer
+to them.  These are successive integers starting with one.  'print'
+shows you the history number assigned to a value by printing '$NUM = '
+before the value; here NUM is the history number.
+
+   To refer to any previous value, use '$' followed by the value's
+history number.  The way 'print' labels its output is designed to remind
+you of this.  Just '$' refers to the most recent value in the history,
+and '$$' refers to the value before that.  '$$N' refers to the Nth value
+from the end; '$$2' is the value just prior to '$$', '$$1' is equivalent
+to '$$', and '$$0' is equivalent to '$'.
 
    For example, suppose you have just printed a pointer to a structure
 and want to see the contents of the structure.  It suffices to type
 
      p *$
 
-   If you have a chain of structures where the component `next' points
+   If you have a chain of structures where the component 'next' points
 to the next one, you can print the contents of the next one with this:
 
      p *$.next
@@ -1639,28 +1904,28 @@ You can print successive links in the ch
 command--which you can do by just typing <RET>.
 
    Note that the history records values, not expressions.  If the value
-of `x' is 4 and you type these commands:
+of 'x' is 4 and you type these commands:
 
      print x
      set x=5
 
-then the value recorded in the value history by the `print' command
-remains 4 even though the value of `x' has changed.
+then the value recorded in the value history by the 'print' command
+remains 4 even though the value of 'x' has changed.
 
-`show values'
+'show values'
      Print the last ten values in the value history, with their item
-     numbers.  This is like `p $$9' repeated ten times, except that
-     `show values' does not change the history.
+     numbers.  This is like 'p $$9' repeated ten times, except that
+     'show values' does not change the history.
 
-`show values N'
+'show values N'
      Print ten history values centered on history item number N.
 
-`show values +'
-     Print ten history values just after the values last printed.  If
-     no more values are available, `show values +' produces no display.
+'show values +'
+     Print ten history values just after the values last printed.  If no
+     more values are available, 'show values +' produces no display.
 
-   Pressing <RET> to repeat `show values N' has exactly the same effect
-as `show values +'.
+   Pressing <RET> to repeat 'show values N' has exactly the same effect
+as 'show values +'.
 
 
 File: gdb.info,  Node: Convenience Vars,  Next: Convenience Funs,  Prev: Value History,  Up: Data
@@ -1668,17 +1933,17 @@ File: gdb.info,  Node: Convenience Vars,
 10.11 Convenience Variables
 ===========================
 
-GDB provides "convenience variables" that you can use within GDB to
-hold on to a value and refer to it later.  These variables exist
-entirely within GDB; they are not part of your program, and setting a
-convenience variable has no direct effect on further execution of your
-program.  That is why you can use them freely.
+GDB provides "convenience variables" that you can use within GDB to hold
+on to a value and refer to it later.  These variables exist entirely
+within GDB; they are not part of your program, and setting a convenience
+variable has no direct effect on further execution of your program.
+That is why you can use them freely.
 
-   Convenience variables are prefixed with `$'.  Any name preceded by
-`$' can be used for a convenience variable, unless it is one of the
+   Convenience variables are prefixed with '$'.  Any name preceded by
+'$' can be used for a convenience variable, unless it is one of the
 predefined machine-specific register names (*note Registers:
 Registers.).  (Value history references, in contrast, are _numbers_
-preceded by `$'.  *Note Value History: Value History.)
+preceded by '$'.  *Note Value History: Value History.)
 
    You can save a value in a convenience variable with an assignment
 expression, just as you would set a variable in your program.  For
@@ -1686,27 +1951,27 @@ example:
 
      set $foo = *object_ptr
 
-would save in `$foo' the value contained in the object pointed to by
-`object_ptr'.
+would save in '$foo' the value contained in the object pointed to by
+'object_ptr'.
 
    Using a convenience variable for the first time creates it, but its
-value is `void' until you assign a new value.  You can alter the value
+value is 'void' until you assign a new value.  You can alter the value
 with another assignment at any time.
 
    Convenience variables have no fixed types.  You can assign a
-convenience variable any type of value, including structures and
-arrays, even if that variable already has a value of a different type.
-The convenience variable, when used as an expression, has the type of
-its current value.
+convenience variable any type of value, including structures and arrays,
+even if that variable already has a value of a different type.  The
+convenience variable, when used as an expression, has the type of its
+current value.
 
-`show convenience'
+'show convenience'
      Print a list of convenience variables used so far, and their
      values, as well as a list of the convenience functions.
-     Abbreviated `show conv'.
+     Abbreviated 'show conv'.
 
-`init-if-undefined $VARIABLE = EXPRESSION'
-     Set a convenience variable if it has not already been set.  This
-     is useful for user-defined commands that keep some state.  It is
+'init-if-undefined $VARIABLE = EXPRESSION'
+     Set a convenience variable if it has not already been set.  This is
+     useful for user-defined commands that keep some state.  It is
      similar, in concept, to using local static variables with
      initializers in C (except that convenience variables are global).
      It can also be used to allow users to override default values used
@@ -1727,33 +1992,33 @@ Repeat that command by typing <RET>.
    Some convenience variables are created automatically by GDB and given
 values likely to be useful.
 
-`$_'
-     The variable `$_' is automatically set by the `x' command to the
+'$_'
+     The variable '$_' is automatically set by the 'x' command to the
      last address examined (*note Examining Memory: Memory.).  Other
-     commands which provide a default address for `x' to examine also
-     set `$_' to that address; these commands include `info line' and
-     `info breakpoint'.  The type of `$_' is `void *' except when set
-     by the `x' command, in which case it is a pointer to the type of
-     `$__'.
+     commands which provide a default address for 'x' to examine also
+     set '$_' to that address; these commands include 'info line' and
+     'info breakpoint'.  The type of '$_' is 'void *' except when set by
+     the 'x' command, in which case it is a pointer to the type of
+     '$__'.
 
-`$__'
-     The variable `$__' is automatically set by the `x' command to the
+'$__'
+     The variable '$__' is automatically set by the 'x' command to the
      value found in the last address examined.  Its type is chosen to
      match the format in which the data was printed.
 
-`$_exitcode'
+'$_exitcode'
      When the program being debugged terminates normally, GDB
      automatically sets this variable to the exit code of the program,
-     and resets `$_exitsignal' to `void'.
+     and resets '$_exitsignal' to 'void'.
 
-`$_exitsignal'
-     When the program being debugged dies due to an uncaught signal,
-     GDB automatically sets this variable to that signal's number, and
-     resets `$_exitcode' to `void'.
+'$_exitsignal'
+     When the program being debugged dies due to an uncaught signal, GDB
+     automatically sets this variable to that signal's number, and
+     resets '$_exitcode' to 'void'.
 
      To distinguish between whether the program being debugged has
-     exited (i.e., `$_exitcode' is not `void') or signalled (i.e.,
-     `$_exitsignal' is not `void'), the convenience function `$_isvoid'
+     exited (i.e., '$_exitcode' is not 'void') or signalled (i.e.,
+     '$_exitsignal' is not 'void'), the convenience function '$_isvoid'
      can be used (*note Convenience Functions: Convenience Funs.).  For
      example, considering the following source code:
 
@@ -1787,45 +2052,51 @@ values likely to be useful.
           The program has signalled
 
      As can be seen, GDB correctly informs that the program being
-     debugged has signalled, since it calls `raise' and raises a
-     `SIGALRM' signal.  If the program being debugged had not called
-     `raise', then GDB would report a normal exit:
+     debugged has signalled, since it calls 'raise' and raises a
+     'SIGALRM' signal.  If the program being debugged had not called
+     'raise', then GDB would report a normal exit:
 
           (gdb) has_exited_or_signalled
           The program has exited
 
-`$_exception'
-     The variable `$_exception' is set to the exception object being
+'$_exception'
+     The variable '$_exception' is set to the exception object being
      thrown at an exception-related catchpoint.  *Note Set
      Catchpoints::.
 
-`$_probe_argc'
-`$_probe_arg0...$_probe_arg11'
+'$_probe_argc'
+'$_probe_arg0...$_probe_arg11'
      Arguments to a static probe.  *Note Static Probe Points::.
 
-`$_sdata'
-     The variable `$_sdata' contains extra collected static tracepoint
+'$_sdata'
+     The variable '$_sdata' contains extra collected static tracepoint
      data.  *Note Tracepoint Action Lists: Tracepoint Actions.  Note
-     that `$_sdata' could be empty, if not inspecting a trace buffer, or
+     that '$_sdata' could be empty, if not inspecting a trace buffer, or
      if extra static tracepoint data has not been collected.
 
-`$_siginfo'
-     The variable `$_siginfo' contains extra signal information (*note
-     extra signal information::).  Note that `$_siginfo' could be
-     empty, if the application has not yet received any signals.  For
-     example, it will be empty before you execute the `run' command.
+'$_siginfo'
+     The variable '$_siginfo' contains extra signal information (*note
+     extra signal information::).  Note that '$_siginfo' could be empty,
+     if the application has not yet received any signals.  For example,
+     it will be empty before you execute the 'run' command.
 
-`$_tlb'
-     The variable `$_tlb' is automatically set when debugging
+'$_tlb'
+     The variable '$_tlb' is automatically set when debugging
      applications running on MS-Windows in native mode or connected to
-     gdbserver that supports the `qGetTIBAddr' request.  *Note General
+     gdbserver that supports the 'qGetTIBAddr' request.  *Note General
      Query Packets::.  This variable contains the address of the thread
      information block.
 
-
-   On HP-UX systems, if you refer to a function or variable name that
-begins with a dollar sign, GDB searches for a user or system name
-first, before it searches for a convenience variable.
+'$_inferior'
+     The number of the current inferior.  *Note Debugging Multiple
+     Inferiors and Programs: Inferiors and Programs.
+
+'$_thread'
+     The thread number of the current thread.  *Note thread numbers::.
+
+'$_gthread'
+     The global number of the current thread.  *Note global thread
+     numbers::.
 
 
 File: gdb.info,  Node: Convenience Funs,  Next: Registers,  Prev: Convenience Vars,  Up: Data
@@ -1834,21 +2105,21 @@ File: gdb.info,  Node: Convenience Funs,
 ===========================
 
 GDB also supplies some "convenience functions".  These have a syntax
-similar to convenience variables.  A convenience function can be used
-in an expression just like an ordinary function; however, a convenience
+similar to convenience variables.  A convenience function can be used in
+an expression just like an ordinary function; however, a convenience
 function is implemented internally to GDB.
 
-   These functions do not require GDB to be configured with `Python'
+   These functions do not require GDB to be configured with 'Python'
 support, which means that they are always available.
 
-`$_isvoid (EXPR)'
-     Return one if the expression EXPR is `void'.  Otherwise it returns
+'$_isvoid (EXPR)'
+     Return one if the expression EXPR is 'void'.  Otherwise it returns
      zero.
 
-     A `void' expression is an expression where the type of the result
-     is `void'.  For example, you can examine a convenience variable
+     A 'void' expression is an expression where the type of the result
+     is 'void'.  For example, you can examine a convenience variable
      (see *note Convenience Variables: Convenience Vars.) to check
-     whether it is `void':
+     whether it is 'void':
 
           (gdb) print $_exitcode
           $1 = void
@@ -1862,14 +2133,14 @@ support, which means that they are alway
           (gdb) print $_isvoid ($_exitcode)
           $4 = 0
 
-     In the example above, we used `$_isvoid' to check whether
-     `$_exitcode' is `void' before and after the execution of the
-     program being debugged.  Before the execution there is no exit
-     code to be examined, therefore `$_exitcode' is `void'.  After the
+     In the example above, we used '$_isvoid' to check whether
+     '$_exitcode' is 'void' before and after the execution of the
+     program being debugged.  Before the execution there is no exit code
+     to be examined, therefore '$_exitcode' is 'void'.  After the
      execution the program being debugged returned zero, therefore
-     `$_exitcode' is zero, which means that it is not `void' anymore.
+     '$_exitcode' is zero, which means that it is not 'void' anymore.
 
-     The `void' expression can also be a call of a function from the
+     The 'void' expression can also be a call of a function from the
      program being debugged.  For example, given the following function:
 
           void
@@ -1877,7 +2148,7 @@ support, which means that they are alway
           {
           }
 
-     The result of calling it inside GDB is `void':
+     The result of calling it inside GDB is 'void':
 
           (gdb) print foo ()
           $1 = void
@@ -1889,27 +2160,25 @@ support, which means that they are alway
           (gdb) print $_isvoid ($v)
           $4 = 1
 
+   These functions require GDB to be configured with 'Python' support.
 
-   These functions require GDB to be configured with `Python' support.
-
-`$_memeq(BUF1, BUF2, LENGTH)'
+'$_memeq(BUF1, BUF2, LENGTH)'
      Returns one if the LENGTH bytes at the addresses given by BUF1 and
      BUF2 are equal.  Otherwise it returns zero.
 
-`$_regex(STR, REGEX)'
-     Returns one if the string STR matches the regular expression
-     REGEX.  Otherwise it returns zero.  The syntax of the regular
-     expression is that specified by `Python''s regular expression
-     support.
+'$_regex(STR, REGEX)'
+     Returns one if the string STR matches the regular expression REGEX.
+     Otherwise it returns zero.  The syntax of the regular expression is
+     that specified by 'Python''s regular expression support.
 
-`$_streq(STR1, STR2)'
+'$_streq(STR1, STR2)'
      Returns one if the strings STR1 and STR2 are equal.  Otherwise it
      returns zero.
 
-`$_strlen(STR)'
+'$_strlen(STR)'
      Returns the length of string STR.
 
-`$_caller_is(NAME[, NUMBER_OF_FRAMES])'
+'$_caller_is(NAME[, NUMBER_OF_FRAMES])'
      Returns one if the calling function's name is equal to NAME.
      Otherwise it returns zero.
 
@@ -1932,42 +2201,51 @@ support, which means that they are alway
           (gdb) print $_caller_is ("top_func", 2)
           $1 = 1
 
-`$_caller_matches(REGEXP[, NUMBER_OF_FRAMES])'
+'$_caller_matches(REGEXP[, NUMBER_OF_FRAMES])'
      Returns one if the calling function's name matches the regular
      expression REGEXP.  Otherwise it returns zero.
 
      If the optional argument NUMBER_OF_FRAMES is provided, it is the
      number of frames up in the stack to look.  The default is 1.
 
-`$_any_caller_is(NAME[, NUMBER_OF_FRAMES])'
+'$_any_caller_is(NAME[, NUMBER_OF_FRAMES])'
      Returns one if any calling function's name is equal to NAME.
      Otherwise it returns zero.
 
      If the optional argument NUMBER_OF_FRAMES is provided, it is the
      number of frames up in the stack to look.  The default is 1.
 
-     This function differs from `$_caller_is' in that this function
+     This function differs from '$_caller_is' in that this function
      checks all stack frames from the immediate caller to the frame
-     specified by NUMBER_OF_FRAMES, whereas `$_caller_is' only checks
+     specified by NUMBER_OF_FRAMES, whereas '$_caller_is' only checks
      the frame specified by NUMBER_OF_FRAMES.
 
-`$_any_caller_matches(REGEXP[, NUMBER_OF_FRAMES])'
+'$_any_caller_matches(REGEXP[, NUMBER_OF_FRAMES])'
      Returns one if any calling function's name matches the regular
      expression REGEXP.  Otherwise it returns zero.
 
      If the optional argument NUMBER_OF_FRAMES is provided, it is the
      number of frames up in the stack to look.  The default is 1.
 
-     This function differs from `$_caller_matches' in that this function
+     This function differs from '$_caller_matches' in that this function
      checks all stack frames from the immediate caller to the frame
-     specified by NUMBER_OF_FRAMES, whereas `$_caller_matches' only
+     specified by NUMBER_OF_FRAMES, whereas '$_caller_matches' only
      checks the frame specified by NUMBER_OF_FRAMES.
 
+'$_as_string(VALUE)'
+     Return the string representation of VALUE.
+
+     This function is useful to obtain the textual label (enumerator) of
+     an enumeration value.  For example, assuming the variable NODE is
+     of an enumerated type:
+
+          (gdb) printf "Visiting node of type %s\n", $_as_string(node)
+          Visiting node of type NODE_INTEGER
 
    GDB provides the ability to list and get help on convenience
 functions.
 
-`help function'
+'help function'
      Print a list of all convenience functions.
 
 
@@ -1977,31 +2255,31 @@ File: gdb.info,  Node: Registers,  Next:
 ===============
 
 You can refer to machine register contents, in expressions, as variables
-with names starting with `$'.  The names of registers are different for
-each machine; use `info registers' to see the names used on your
+with names starting with '$'.  The names of registers are different for
+each machine; use 'info registers' to see the names used on your
 machine.
 
-`info registers'
+'info registers'
      Print the names and values of all registers except floating-point
      and vector registers (in the selected stack frame).
 
-`info all-registers'
+'info all-registers'
      Print the names and values of all registers, including
      floating-point and vector registers (in the selected stack frame).
 
-`info registers REGNAME ...'
+'info registers REGNAME ...'
      Print the "relativized" value of each specified register REGNAME.
-     As discussed in detail below, register values are normally
-     relative to the selected stack frame.  The REGNAME may be any
-     register name valid on the machine you are using, with or without
-     the initial `$'.
+     As discussed in detail below, register values are normally relative
+     to the selected stack frame.  The REGNAME may be any register name
+     valid on the machine you are using, with or without the initial
+     '$'.
 
    GDB has four "standard" register names that are available (in
 expressions) on most machines--whenever they do not conflict with an
 architecture's canonical mnemonics for registers.  The register names
-`$pc' and `$sp' are used for the program counter register and the stack
-pointer.  `$fp' is used for a register that contains a pointer to the
-current stack frame, and `$ps' is used for a register that contains the
+'$pc' and '$sp' are used for the program counter register and the stack
+pointer.  '$fp' is used for a register that contains a pointer to the
+current stack frame, and '$ps' is used for a register that contains the
 processor status.  For example, you could print the program counter in
 hex with
 
@@ -2017,10 +2295,10 @@ or add four to the stack pointer(1) with
 
    Whenever possible, these four standard register names are available
 on your machine even though the machine has different canonical
-mnemonics, so long as there is no conflict.  The `info registers'
-command shows the canonical names.  For example, on the SPARC, `info
-registers' displays the processor status register as `$psr' but you can
-also refer to it as `$ps'; and on x86-based machines `$ps' is an alias
+mnemonics, so long as there is no conflict.  The 'info registers'
+command shows the canonical names.  For example, on the SPARC, 'info
+registers' displays the processor status register as '$psr' but you can
+also refer to it as '$ps'; and on x86-based machines '$ps' is an alias
 for the EFLAGS register.
 
    GDB always considers the contents of an ordinary register as an
@@ -2028,7 +2306,7 @@ integer when the register is examined in
 special registers which can hold nothing but floating point; these
 registers are considered to have floating point values.  There is no way
 to refer to the contents of an ordinary register as floating point value
-(although you can _print_ it as a floating point value with `print/f
+(although you can _print_ it as a floating point value with 'print/f
 $REGNAME').
 
    Some registers have distinct "raw" and "virtual" data formats.  This
@@ -2038,14 +2316,14 @@ sees.  For example, the registers of the
 coprocessor are always saved in "extended" (raw) format, but all C
 programs expect to work with "double" (virtual) format.  In such cases,
 GDB normally works with the virtual format only (the format that makes
-sense for your program), but the `info registers' command prints the
+sense for your program), but the 'info registers' command prints the
 data in both formats.
 
    Some machines have special registers whose contents can be
 interpreted in several different ways.  For example, modern x86-based
 machines have SSE and MMX registers that can hold several values packed
 together in several different formats.  GDB refers to such registers in
-`struct' notation:
+'struct' notation:
 
      (gdb) print $xmm1
      $1 = {
@@ -2060,7 +2338,7 @@ together in several different formats.  
 
 To set values of such registers, you need to tell GDB which view of the
 register you wish to change, as if you were assigning value to a
-`struct' member:
+'struct' member:
 
       (gdb) set $xmm1.uint128 = 0x000000000000000000000000FFFFFFFF
 
@@ -2068,8 +2346,8 @@ register you wish to change, as if you w
 (*note Selecting a Frame: Selection.).  This means that you get the
 value that the register would contain if all stack frames farther in
 were exited and their saved registers restored.  In order to see the
-true contents of hardware registers, you must select the innermost
-frame (with `frame 0').
+true contents of hardware registers, you must select the innermost frame
+(with 'frame 0').
 
    Usually ABIs reserve some registers as not needed to be saved by the
 callee (a.k.a.: "caller-saved", "call-clobbered" or "volatile"
@@ -2077,31 +2355,31 @@ registers).  It may therefore not be pos
 a register had before the call (in other words, in the outer frame), if
 the register value has since been changed by the callee.  GDB tries to
 deduce where the inner frame saved ("callee-saved") registers, from the
-debug info, unwind info, or the machine code generated by your
-compiler.  If some register is not saved, and GDB knows the register is
+debug info, unwind info, or the machine code generated by your compiler.
+If some register is not saved, and GDB knows the register is
 "caller-saved" (via its own knowledge of the ABI, or because the
 debug/unwind info explicitly says the register's value is undefined),
-GDB displays `<not saved>' as the register's value.  With targets that
+GDB displays '<not saved>' as the register's value.  With targets that
 GDB has no knowledge of the register saving convention, if a register
 was not saved by the callee, then its value and location in the outer
 frame are assumed to be the same of the inner frame.  This is usually
 harmless, because if the register is call-clobbered, the caller either
 does not care what is in the register after the call, or has code to
 restore the value that it does care about.  Note, however, that if you
-change such a register in the outer frame, you may also be affecting
-the inner frame.  Also, the more "outer" the frame is you're looking
-at, the more likely a call-clobbered register's value is to be wrong,
-in the sense that it doesn't actually represent the value the register
-had just before the call.
+change such a register in the outer frame, you may also be affecting the
+inner frame.  Also, the more "outer" the frame is you're looking at, the
+more likely a call-clobbered register's value is to be wrong, in the
+sense that it doesn't actually represent the value the register had just
+before the call.
 
    ---------- Footnotes ----------
 
    (1) This is a way of removing one word from the stack, on machines
 where stacks grow downward in memory (most machines, nowadays).  This
-assumes that the innermost stack frame is selected; setting `$sp' is
-not allowed when other stack frames are selected.  To pop entire frames
-off the stack, regardless of machine architecture, use `return'; see
-*note Returning from a Function: Returning.
+assumes that the innermost stack frame is selected; setting '$sp' is not
+allowed when other stack frames are selected.  To pop entire frames off
+the stack, regardless of machine architecture, use 'return'; see *note
+Returning from a Function: Returning.
 
 
 File: gdb.info,  Node: Floating Point Hardware,  Next: Vector Unit,  Prev: Registers,  Up: Data
@@ -2112,11 +2390,11 @@ File: gdb.info,  Node: Floating Point Ha
 Depending on the configuration, GDB may be able to give you more
 information about the status of the floating point hardware.
 
-`info float'
+'info float'
      Display hardware-dependent information about the floating point
-     unit.  The exact contents and layout vary depending on the
-     floating point chip.  Currently, `info float' is supported on the
-     ARM and x86 machines.
+     unit.  The exact contents and layout vary depending on the floating
+     point chip.  Currently, 'info float' is supported on the ARM and
+     x86 machines.
 
 
 File: gdb.info,  Node: Vector Unit,  Next: OS Information,  Prev: Floating Point Hardware,  Up: Data
@@ -2127,7 +2405,7 @@ File: gdb.info,  Node: Vector Unit,  Nex
 Depending on the configuration, GDB may be able to give you more
 information about the status of the vector unit.
 
-`info vector'
+'info vector'
      Display information about the vector unit.  The exact contents and
      layout vary depending on the hardware.
 
@@ -2141,18 +2419,17 @@ GDB provides interfaces to useful OS fac
 your program.
 
    Some operating systems supply an "auxiliary vector" to programs at
-startup.  This is akin to the arguments and environment that you
-specify for a program, but contains a system-dependent variety of
-binary values that tell system libraries important details about the
-hardware, operating system, and process.  Each value's purpose is
-identified by an integer tag; the meanings are well-known but
-system-specific.  Depending on the configuration and operating system
-facilities, GDB may be able to show you this information.  For remote
-targets, this functionality may further depend on the remote stub's
-support of the `qXfer:auxv:read' packet, see *note qXfer auxiliary
-vector read::.
+startup.  This is akin to the arguments and environment that you specify
+for a program, but contains a system-dependent variety of binary values
+that tell system libraries important details about the hardware,
+operating system, and process.  Each value's purpose is identified by an
+integer tag; the meanings are well-known but system-specific.  Depending
+on the configuration and operating system facilities, GDB may be able to
+show you this information.  For remote targets, this functionality may
+further depend on the remote stub's support of the 'qXfer:auxv:read'
+packet, see *note qXfer auxiliary vector read::.
 
-`info auxv'
+'info auxv'
      Display the auxiliary vector of the inferior, which can be either a
      live process or a core dump file.  GDB prints each tag value
      numerically, and also shows names and text descriptions for
@@ -2161,52 +2438,53 @@ vector read::.
      each value in the most appropriate form for a recognized tag, and
      in hexadecimal for an unrecognized tag.
 
-   On some targets, GDB can access operating system-specific
-information and show it to you.  The types of information available
-will differ depending on the type of operating system running on the
-target.  The mechanism used to fetch the data is described in *note
-Operating System Information::.  For remote targets, this functionality
-depends on the remote stub's support of the `qXfer:osdata:read' packet,
-see *note qXfer osdata read::.
+   On some targets, GDB can access operating system-specific information
+and show it to you.  The types of information available will differ
+depending on the type of operating system running on the target.  The
+mechanism used to fetch the data is described in *note Operating System
+Information::.  For remote targets, this functionality depends on the
+remote stub's support of the 'qXfer:osdata:read' packet, see *note qXfer
+osdata read::.
+
+'info os INFOTYPE'
 
-`info os INFOTYPE'
      Display OS information of the requested type.
 
      On GNU/Linux, the following values of INFOTYPE are valid:
 
-    `cpus'
-          Display the list of all CPUs/cores. For each CPU/core, GDB
-          prints the available fields from /proc/cpuinfo. For each
-          supported architecture different fields are available. Two
+     'cpus'
+          Display the list of all CPUs/cores.  For each CPU/core, GDB
+          prints the available fields from /proc/cpuinfo.  For each
+          supported architecture different fields are available.  Two
           common entries are processor which gives CPU number and
           bogomips; a system constant that is calculated during kernel
           initialization.
 
-    `files'
+     'files'
           Display the list of open file descriptors on the target.  For
           each file descriptor, GDB prints the identifier of the process
           owning the descriptor, the command of the owning process, the
           value of the descriptor, and the target of the descriptor.
 
-    `modules'
+     'modules'
           Display the list of all loaded kernel modules on the target.
           For each module, GDB prints the module name, the size of the
           module in bytes, the number of times the module is used, the
           dependencies of the module, the status of the module, and the
           address of the loaded module in memory.
 
-    `msg'
-          Display the list of all System V message queues on the
-          target.  For each message queue, GDB prints the message queue
-          key, the message queue identifier, the access permissions,
-          the current number of bytes on the queue, the current number
-          of messages on the queue, the processes that last sent and
-          received a message on the queue, the user and group of the
-          owner and creator of the message queue, the times at which a
-          message was last sent and received on the queue, and the time
-          at which the message queue was last changed.
+     'msg'
+          Display the list of all System V message queues on the target.
+          For each message queue, GDB prints the message queue key, the
+          message queue identifier, the access permissions, the current
+          number of bytes on the queue, the current number of messages
+          on the queue, the processes that last sent and received a
+          message on the queue, the user and group of the owner and
+          creator of the message queue, the times at which a message was
+          last sent and received on the queue, and the time at which the
+          message queue was last changed.
 
-    `processes'
+     'processes'
           Display the list of processes on the target.  For each
           process, GDB prints the process identifier, the name of the
           user, the command corresponding to the process, and the list
@@ -2215,7 +2493,7 @@ see *note qXfer osdata read::.
           following info types, please consult the general GNU/Linux
           documentation.)
 
-    `procgroups'
+     'procgroups'
           Display the list of process groups on the target.  For each
           process, GDB prints the identifier of the process group that
           it belongs to, the command corresponding to the process group
@@ -2225,43 +2503,43 @@ see *note qXfer osdata read::.
           belonging to the same process group are grouped together and
           the process group leader is listed first.
 
-    `semaphores'
-          Display the list of all System V semaphore sets on the
-          target.  For each semaphore set, GDB prints the semaphore set
-          key, the semaphore set identifier, the access permissions,
-          the number of semaphores in the set, the user and group of
-          the owner and creator of the semaphore set, and the times at
-          which the semaphore set was operated upon and changed.
+     'semaphores'
+          Display the list of all System V semaphore sets on the target.
+          For each semaphore set, GDB prints the semaphore set key, the
+          semaphore set identifier, the access permissions, the number
+          of semaphores in the set, the user and group of the owner and
+          creator of the semaphore set, and the times at which the
+          semaphore set was operated upon and changed.
 
-    `shm'
+     'shm'
           Display the list of all System V shared-memory regions on the
           target.  For each shared-memory region, GDB prints the region
-          key, the shared-memory identifier, the access permissions,
-          the size of the region, the process that created the region,
-          the process that last attached to or detached from the
-          region, the current number of live attaches to the region,
-          and the times at which the region was last attached to,
-          detach from, and changed.
+          key, the shared-memory identifier, the access permissions, the
+          size of the region, the process that created the region, the
+          process that last attached to or detached from the region, the
+          current number of live attaches to the region, and the times
+          at which the region was last attached to, detach from, and
+          changed.
 
-    `sockets'
+     'sockets'
           Display the list of Internet-domain sockets on the target.
           For each socket, GDB prints the address and port of the local
-          and remote endpoints, the current state of the connection,
-          the creator of the socket, the IP address family of the
-          socket, and the type of the connection.
+          and remote endpoints, the current state of the connection, the
+          creator of the socket, the IP address family of the socket,
+          and the type of the connection.
 
-    `threads'
+     'threads'
           Display the list of threads running on the target.  For each
           thread, GDB prints the identifier of the process that the
           thread belongs to, the command of the process, the thread
           identifier, and the processor core that it is currently
           running on.  The main thread of a process is not listed.
 
-`info os'
+'info os'
      If INFOTYPE is omitted, then list the possible values for INFOTYPE
-     and the kind of OS information available for each INFOTYPE.  If
-     the target does not return a list of possible types, this command
-     will report an error.
+     and the kind of OS information available for each INFOTYPE.  If the
+     target does not return a list of possible types, this command will
+     report an error.
 
 
 File: gdb.info,  Node: Memory Region Attributes,  Next: Dump/Restore Files,  Prev: OS Information,  Up: Data
@@ -2273,9 +2551,9 @@ File: gdb.info,  Node: Memory Region Att
 required by regions of your target's memory.  GDB uses attributes to
 determine whether to allow certain types of memory accesses; whether to
 use specific width accesses; and whether to cache target memory.  By
-default the description of memory regions is fetched from the target
-(if the current target supports this), but the user can override the
-fetched regions.
+default the description of memory regions is fetched from the target (if
+the current target supports this), but the user can override the fetched
+regions.
 
    Defined memory regions can be individually enabled and disabled.
 When a memory region is disabled, GDB uses the default attributes when
@@ -2285,48 +2563,47 @@ been defined, GDB uses the default attri
    When a memory region is defined, it is given a number to identify it;
 to enable, disable, or remove a memory region, you specify that number.
 
-`mem LOWER UPPER ATTRIBUTES...'
+'mem LOWER UPPER ATTRIBUTES...'
      Define a memory region bounded by LOWER and UPPER with attributes
      ATTRIBUTES..., and add it to the list of regions monitored by GDB.
      Note that UPPER == 0 is a special case: it is treated as the
      target's maximum memory address.  (0xffff on 16 bit targets,
      0xffffffff on 32 bit targets, etc.)
 
-`mem auto'
+'mem auto'
      Discard any user changes to the memory regions and use
      target-supplied regions, if available, or no regions if the target
      does not support.
 
-`delete mem NUMS...'
-     Remove memory regions NUMS... from the list of regions monitored
-     by GDB.
+'delete mem NUMS...'
+     Remove memory regions NUMS... from the list of regions monitored by
+     GDB.
 
-`disable mem NUMS...'
+'disable mem NUMS...'
      Disable monitoring of memory regions NUMS....  A disabled memory
      region is not forgotten.  It may be enabled again later.
 
-`enable mem NUMS...'
+'enable mem NUMS...'
      Enable monitoring of memory regions NUMS....
 
-`info mem'
+'info mem'
      Print a table of all defined memory regions, with the following
      columns for each region:
 
-    _Memory Region Number_
-
-    _Enabled or Disabled._
-          Enabled memory regions are marked with `y'.  Disabled memory
-          regions are marked with `n'.
+     _Memory Region Number_
+     _Enabled or Disabled._
+          Enabled memory regions are marked with 'y'.  Disabled memory
+          regions are marked with 'n'.
 
-    _Lo Address_
+     _Lo Address_
           The address defining the inclusive lower bound of the memory
           region.
 
-    _Hi Address_
+     _Hi Address_
           The address defining the exclusive upper bound of the memory
           region.
 
-    _Attributes_
+     _Attributes_
           The list of attributes set for this memory region.
 
 10.17.1 Attributes
@@ -2342,13 +2619,11 @@ accesses to a memory region.
 accesses, they do nothing to prevent the target system, I/O DMA, etc.
 from accessing memory.
 
-`ro'
+'ro'
      Memory is read only.
-
-`wo'
+'wo'
      Memory is write only.
-
-`rw'
+'rw'
      Memory is read/write.  This is the default.
 
 10.17.1.2 Memory Access Size
@@ -2359,16 +2634,13 @@ the memory region.  Often memory mapped 
 specific sized accesses.  If no access size attribute is specified, GDB
 may use accesses of any size.
 
-`8'
+'8'
      Use 8 bit memory accesses.
-
-`16'
+'16'
      Use 16 bit memory accesses.
-
-`32'
+'32'
      Use 32 bit memory accesses.
-
-`64'
+'64'
      Use 64 bit memory accesses.
 
 10.17.1.3 Data Cache
@@ -2379,10 +2651,9 @@ While this generally improves performanc
 overhead, it can lead to incorrect results because GDB does not know
 about volatile variables or memory mapped device registers.
 
-`cache'
+'cache'
      Enable GDB to cache target memory.
-
-`nocache'
+'nocache'
      Disable GDB from caching target memory.  This is the default.
 
 10.17.2 Memory Access Checking
@@ -2393,15 +2664,14 @@ explicitly described.  This can be usefu
 undesired effects for a specific target, or to provide better error
 checking.  The following commands control this behaviour.
 
-`set mem inaccessible-by-default [on|off]'
-     If `on' is specified, make  GDB treat memory not explicitly
+'set mem inaccessible-by-default [on|off]'
+     If 'on' is specified, make GDB treat memory not explicitly
      described by the memory ranges as non-existent and refuse accesses
      to such memory.  The checks are only performed if there's at least
-     one memory range defined.  If `off' is specified, make GDB treat
+     one memory range defined.  If 'off' is specified, make GDB treat
      the memory not explicitly described by the memory ranges as RAM.
-     The default value is `on'.  
-
-`show mem inaccessible-by-default'
+     The default value is 'on'.
+'show mem inaccessible-by-default'
      Show the current handling of accesses to unknown memory.
 
 
@@ -2410,49 +2680,45 @@ File: gdb.info,  Node: Dump/Restore File
 10.18 Copy Between Memory and a File
 ====================================
 
-You can use the commands `dump', `append', and `restore' to copy data
-between target memory and a file.  The `dump' and `append' commands
-write data to a file, and the `restore' command reads data from a file
+You can use the commands 'dump', 'append', and 'restore' to copy data
+between target memory and a file.  The 'dump' and 'append' commands
+write data to a file, and the 'restore' command reads data from a file
 back into the inferior's memory.  Files may be in binary, Motorola
 S-record, Intel hex, Tektronix Hex, or Verilog Hex format; however, GDB
 can only append to binary files, and cannot read from Verilog Hex files.
 
-`dump [FORMAT] memory FILENAME START_ADDR END_ADDR'
-`dump [FORMAT] value FILENAME EXPR'
+'dump [FORMAT] memory FILENAME START_ADDR END_ADDR'
+'dump [FORMAT] value FILENAME EXPR'
      Dump the contents of memory from START_ADDR to END_ADDR, or the
      value of EXPR, to FILENAME in the given format.
 
      The FORMAT parameter may be any one of:
-    `binary'
+     'binary'
           Raw binary form.
-
-    `ihex'
+     'ihex'
           Intel hex format.
-
-    `srec'
+     'srec'
           Motorola S-record format.
-
-    `tekhex'
+     'tekhex'
           Tektronix Hex format.
-
-    `verilog'
+     'verilog'
           Verilog Hex format.
 
      GDB uses the same definitions of these formats as the GNU binary
-     utilities, like `objdump' and `objcopy'.  If FORMAT is omitted,
-     GDB dumps the data in raw binary form.
+     utilities, like 'objdump' and 'objcopy'.  If FORMAT is omitted, GDB
+     dumps the data in raw binary form.
 
-`append [binary] memory FILENAME START_ADDR END_ADDR'
-`append [binary] value FILENAME EXPR'
+'append [binary] memory FILENAME START_ADDR END_ADDR'
+'append [binary] value FILENAME EXPR'
      Append the contents of memory from START_ADDR to END_ADDR, or the
      value of EXPR, to the file FILENAME, in raw binary form.  (GDB can
      only append data to files in raw binary form.)
 
-`restore FILENAME [binary] BIAS START END'
-     Restore the contents of file FILENAME into memory.  The `restore'
+'restore FILENAME [binary] BIAS START END'
+     Restore the contents of file FILENAME into memory.  The 'restore'
      command can automatically recognize any known BFD file format,
      except for raw binary.  To restore a raw binary file you must
-     specify the optional keyword `binary' after the filename.
+     specify the optional keyword 'binary' after the filename.
 
      If BIAS is non-zero, its value will be added to the addresses
      contained in the file.  Binary files always start at address zero,
@@ -2462,9 +2728,8 @@ can only append to binary files, and can
 
      If START and/or END are non-zero, then only data between file
      offset START and file offset END will be restored.  These offsets
-     are relative to the addresses in the file, before the BIAS
-     argument is applied.
-
+     are relative to the addresses in the file, before the BIAS argument
+     is applied.
 
 
 File: gdb.info,  Node: Core File Generation,  Next: Character Sets,  Prev: Dump/Restore Files,  Up: Data
@@ -2475,54 +2740,53 @@ File: gdb.info,  Node: Core File Generat
 A "core file" or "core dump" is a file that records the memory image of
 a running process and its process status (register values etc.).  Its
 primary use is post-mortem debugging of a program that crashed while it
-ran outside a debugger.  A program that crashes automatically produces
-a core file, unless this feature is disabled by the user.  *Note
-Files::, for information on invoking GDB in the post-mortem debugging
-mode.
+ran outside a debugger.  A program that crashes automatically produces a
+core file, unless this feature is disabled by the user.  *Note Files::,
+for information on invoking GDB in the post-mortem debugging mode.
 
    Occasionally, you may wish to produce a core file of the program you
 are debugging in order to preserve a snapshot of its state.  GDB has a
 special command for that.
 
-`generate-core-file [FILE]'
-`gcore [FILE]'
+'generate-core-file [FILE]'
+'gcore [FILE]'
      Produce a core dump of the inferior process.  The optional argument
      FILE specifies the file name where to put the core dump.  If not
-     specified, the file name defaults to `core.PID', where PID is the
+     specified, the file name defaults to 'core.PID', where PID is the
      inferior process ID.
 
      Note that this command is implemented only for some systems (as of
      this writing, GNU/Linux, FreeBSD, Solaris, and S390).
 
      On GNU/Linux, this command can take into account the value of the
-     file `/proc/PID/coredump_filter' when generating the core dump
+     file '/proc/PID/coredump_filter' when generating the core dump
      (*note set use-coredump-filter::).
 
-`set use-coredump-filter on'
-`set use-coredump-filter off'
-     Enable or disable the use of the file `/proc/PID/coredump_filter'
+'set use-coredump-filter on'
+'set use-coredump-filter off'
+     Enable or disable the use of the file '/proc/PID/coredump_filter'
      when generating core dump files.  This file is used by the Linux
      kernel to decide what types of memory mappings will be dumped or
-     ignored when generating a core dump file.  PID is the process ID
-     of a currently running process.
+     ignored when generating a core dump file.  PID is the process ID of
+     a currently running process.
 
      To make use of this feature, you have to write in the
-     `/proc/PID/coredump_filter' file a value, in hexadecimal, which is
+     '/proc/PID/coredump_filter' file a value, in hexadecimal, which is
      a bit mask representing the memory mapping types.  If a bit is set
      in the bit mask, then the memory mappings of the corresponding
      types will be dumped; otherwise, they will be ignored.  This
      configuration is inherited by child processes.  For more
      information about the bits that can be set in the
-     `/proc/PID/coredump_filter' file, please refer to the manpage of
-     `core(5)'.
+     '/proc/PID/coredump_filter' file, please refer to the manpage of
+     'core(5)'.
 
-     By default, this option is `on'.  If this option is turned `off',
-     GDB does not read the `coredump_filter' file and instead uses the
+     By default, this option is 'on'.  If this option is turned 'off',
+     GDB does not read the 'coredump_filter' file and instead uses the
      same default value as the Linux kernel in order to decide which
      pages will be dumped in the core dump file.  This value is
-     currently `0x33', which means that bits `0' (anonymous private
-     mappings), `1' (anonymous shared mappings), `4' (ELF headers) and
-     `5' (private huge pages) are active.  This will cause these memory
+     currently '0x33', which means that bits '0' (anonymous private
+     mappings), '1' (anonymous shared mappings), '4' (ELF headers) and
+     '5' (private huge pages) are active.  This will cause these memory
      mappings to be dumped automatically.
 
 
@@ -2537,66 +2801,66 @@ automatically translate between the char
 character set GDB uses we call the "host character set"; the one the
 inferior program uses we call the "target character set".
 
-   For example, if you are running GDB on a GNU/Linux system, which
-uses the ISO Latin 1 character set, but you are using GDB's remote
-protocol (*note Remote Debugging::) to debug a program running on an
-IBM mainframe, which uses the EBCDIC character set, then the host
-character set is Latin-1, and the target character set is EBCDIC.  If
-you give GDB the command `set target-charset EBCDIC-US', then GDB
-translates between EBCDIC and Latin 1 as you print character or string
-values, or use character and string literals in expressions.
+   For example, if you are running GDB on a GNU/Linux system, which uses
+the ISO Latin 1 character set, but you are using GDB's remote protocol
+(*note Remote Debugging::) to debug a program running on an IBM
+mainframe, which uses the EBCDIC character set, then the host character
+set is Latin-1, and the target character set is EBCDIC.  If you give GDB
+the command 'set target-charset EBCDIC-US', then GDB translates between
+EBCDIC and Latin 1 as you print character or string values, or use
+character and string literals in expressions.
 
    GDB has no way to automatically recognize which character set the
-inferior program uses; you must tell it, using the `set target-charset'
+inferior program uses; you must tell it, using the 'set target-charset'
 command, described below.
 
    Here are the commands for controlling GDB's character set support:
 
-`set target-charset CHARSET'
+'set target-charset CHARSET'
      Set the current target character set to CHARSET.  To display the
      list of supported target character sets, type
-     `set target-charset <TAB><TAB>'.
+     'set target-charset <TAB><TAB>'.
 
-`set host-charset CHARSET'
+'set host-charset CHARSET'
      Set the current host character set to CHARSET.
 
-     By default, GDB uses a host character set appropriate to the
-     system it is running on; you can override that default using the
-     `set host-charset' command.  On some systems, GDB cannot
-     automatically determine the appropriate host character set.  In
-     this case, GDB uses `UTF-8'.
+     By default, GDB uses a host character set appropriate to the system
+     it is running on; you can override that default using the 'set
+     host-charset' command.  On some systems, GDB cannot automatically
+     determine the appropriate host character set.  In this case, GDB
+     uses 'UTF-8'.
 
      GDB can only use certain character sets as its host character set.
-     If you type `set host-charset <TAB><TAB>', GDB will list the host
+     If you type 'set host-charset <TAB><TAB>', GDB will list the host
      character sets it supports.
 
-`set charset CHARSET'
+'set charset CHARSET'
      Set the current host and target character sets to CHARSET.  As
-     above, if you type `set charset <TAB><TAB>', GDB will list the
+     above, if you type 'set charset <TAB><TAB>', GDB will list the
      names of the character sets that can be used for both host and
      target.
 
-`show charset'
+'show charset'
      Show the names of the current host and target character sets.
 
-`show host-charset'
+'show host-charset'
      Show the name of the current host character set.
 
-`show target-charset'
+'show target-charset'
      Show the name of the current target character set.
 
-`set target-wide-charset CHARSET'
+'set target-wide-charset CHARSET'
      Set the current target's wide character set to CHARSET.  This is
-     the character set used by the target's `wchar_t' type.  To display
+     the character set used by the target's 'wchar_t' type.  To display
      the list of supported wide character sets, type
-     `set target-wide-charset <TAB><TAB>'.
+     'set target-wide-charset <TAB><TAB>'.
 
-`show target-wide-charset'
+'show target-wide-charset'
      Show the name of the current target's wide character set.
 
    Here is an example of GDB's character set support in action.  Assume
 that the following source code has been placed in the file
-`charset-test.c':
+'charset-test.c':
 
      #include <stdio.h>
 
@@ -2612,8 +2876,8 @@ that the following source code has been 
        printf ("Hello, world!\n");
      }
 
-   In this program, `ascii_hello' and `ibm1047_hello' are arrays
-containing the string `Hello, world!' followed by a newline, encoded in
+   In this program, 'ascii_hello' and 'ibm1047_hello' are arrays
+containing the string 'Hello, world!' followed by a newline, encoded in
 the ASCII and IBM1047 character sets.
 
    We compile the program, and invoke the debugger on it:
@@ -2625,7 +2889,7 @@ the ASCII and IBM1047 character sets.
      ...
      (gdb)
 
-   We can use the `show charset' command to see what character sets GDB
+   We can use the 'show charset' command to see what character sets GDB
 is currently using to interpret and display characters and strings:
 
      (gdb) show charset
@@ -2641,9 +2905,9 @@ character set:
 
    Let's assume that ASCII is indeed the correct character set for our
 host system -- in other words, let's assume that if GDB prints
-characters using the ASCII character set, our terminal will display
-them properly.  Since our current target character set is also ASCII,
-the contents of `ascii_hello' print legibly:
+characters using the ASCII character set, our terminal will display them
+properly.  Since our current target character set is also ASCII, the
+contents of 'ascii_hello' print legibly:
 
      (gdb) print ascii_hello
      $1 = 0x401698 "Hello, world!\n"
@@ -2658,11 +2922,11 @@ you use in expressions:
      $3 = 43 '+'
      (gdb)
 
-   The ASCII character set uses the number 43 to encode the `+'
+   The ASCII character set uses the number 43 to encode the '+'
 character.
 
    GDB relies on the user to tell it which character set the target
-program uses.  If we print `ibm1047_hello' while our target character
+program uses.  If we print 'ibm1047_hello' while our target character
 set is still ASCII, we get jibberish:
 
      (gdb) print ibm1047_hello
@@ -2671,7 +2935,7 @@ set is still ASCII, we get jibberish:
      $5 = 200 '\310'
      (gdb)
 
-   If we invoke the `set target-charset' followed by <TAB><TAB>, GDB
+   If we invoke the 'set target-charset' followed by <TAB><TAB>, GDB
 tells us the character sets it supports:
 
      (gdb) set target-charset
@@ -2680,7 +2944,7 @@ tells us the character sets it supports:
 
    We can select IBM1047 as our target character set, and examine the
 program's strings again.  Now the ASCII string is wrong, but GDB
-translates the contents of `ibm1047_hello' from the target character
+translates the contents of 'ibm1047_hello' from the target character
 set, IBM1047, to the host character set, ASCII, and they display
 correctly:
 
@@ -2705,7 +2969,7 @@ literals you use in expressions:
      $10 = 78 '+'
      (gdb)
 
-   The IBM1047 character set uses the number 78 to encode the `+'
+   The IBM1047 character set uses the number 78 to encode the '+'
 character.
 
 
@@ -2714,47 +2978,47 @@ File: gdb.info,  Node: Caching Target Da
 10.21 Caching Data of Targets
 =============================
 
-GDB caches data exchanged between the debugger and a target.  Each
-cache is associated with the address space of the inferior.  *Note
-Inferiors and Programs::, about inferior and address space.  Such
-caching generally improves performance in remote debugging (*note
-Remote Debugging::), because it reduces the overhead of the remote
-protocol by bundling memory reads and writes into large chunks.
-Unfortunately, simply caching everything would lead to incorrect
-results, since GDB does not necessarily know anything about volatile
-values, memory-mapped I/O addresses, etc.  Furthermore, in non-stop mode
-(*note Non-Stop Mode::) memory can be changed _while_ a gdb command is
-executing.  Therefore, by default, GDB only caches data known to be on
-the stack(1) or in the code segment.  Other regions of memory can be
-explicitly marked as cacheable; *note Memory Region Attributes::.
+GDB caches data exchanged between the debugger and a target.  Each cache
+is associated with the address space of the inferior.  *Note Inferiors
+and Programs::, about inferior and address space.  Such caching
+generally improves performance in remote debugging (*note Remote
+Debugging::), because it reduces the overhead of the remote protocol by
+bundling memory reads and writes into large chunks.  Unfortunately,
+simply caching everything would lead to incorrect results, since GDB
+does not necessarily know anything about volatile values, memory-mapped
+I/O addresses, etc.  Furthermore, in non-stop mode (*note Non-Stop
+Mode::) memory can be changed _while_ a gdb command is executing.
+Therefore, by default, GDB only caches data known to be on the stack(1)
+or in the code segment.  Other regions of memory can be explicitly
+marked as cacheable; *note Memory Region Attributes::.
 
-`set remotecache on'
-`set remotecache off'
+'set remotecache on'
+'set remotecache off'
      This option no longer does anything; it exists for compatibility
      with old scripts.
 
-`show remotecache'
+'show remotecache'
      Show the current state of the obsolete remotecache flag.
 
-`set stack-cache on'
-`set stack-cache off'
-     Enable or disable caching of stack accesses.  When `on', use
-     caching.  By default, this option is `on'.
+'set stack-cache on'
+'set stack-cache off'
+     Enable or disable caching of stack accesses.  When 'on', use
+     caching.  By default, this option is 'on'.
 
-`show stack-cache'
+'show stack-cache'
      Show the current state of data caching for memory accesses.
 
-`set code-cache on'
-`set code-cache off'
-     Enable or disable caching of code segment accesses.  When `on',
-     use caching.  By default, this option is `on'.  This improves
+'set code-cache on'
+'set code-cache off'
+     Enable or disable caching of code segment accesses.  When 'on', use
+     caching.  By default, this option is 'on'.  This improves
      performance of disassembly in remote debugging.
 
-`show code-cache'
+'show code-cache'
      Show the current state of target memory cache for code segment
      accesses.
 
-`info dcache [line]'
+'info dcache [line]'
      Print the information about the performance of data cache of the
      current inferior's address space.  The information displayed
      includes the dcache width and depth, and for each cache line, its
@@ -2764,21 +3028,20 @@ explicitly marked as cacheable; *note Me
      If a line number is specified, the contents of that line will be
      printed in hex.
 
-`set dcache size SIZE'
+'set dcache size SIZE'
      Set maximum number of entries in dcache (dcache depth above).
 
-`set dcache line-size LINE-SIZE'
+'set dcache line-size LINE-SIZE'
      Set number of bytes each dcache entry caches (dcache width above).
      Must be a power of 2.
 
-`show dcache size'
+'show dcache size'
      Show maximum number of dcache entries.  *Note info dcache: Caching
      Target Data.
 
-`show dcache line-size'
+'show dcache line-size'
      Show default size of dcache lines.
 
-
    ---------- Footnotes ----------
 
    (1) In non-stop mode, it is moderately rare for a running thread to
@@ -2787,16 +3050,16 @@ a backtrace, and caching of stack reads 
 of remote backtraces.
 
 
-File: gdb.info,  Node: Searching Memory,  Prev: Caching Target Data,  Up: Data
+File: gdb.info,  Node: Searching Memory,  Next: Value Sizes,  Prev: Caching Target Data,  Up: Data
 
 10.22 Search Memory
 ===================
 
 Memory can be searched for a particular sequence of bytes with the
-`find' command.
+'find' command.
 
-`find [/SN] START_ADDR, +LEN, VAL1 [, VAL2, ...]'
-`find [/SN] START_ADDR, END_ADDR, VAL1 [, VAL2, ...]'
+'find [/SN] START_ADDR, +LEN, VAL1 [, VAL2, ...]'
+'find [/SN] START_ADDR, END_ADDR, VAL1 [, VAL2, ...]'
      Search memory for the sequence of bytes specified by VAL1, VAL2,
      etc.  The search begins at address START_ADDR and continues for
      either LEN bytes or through to END_ADDR inclusive.
@@ -2807,16 +3070,13 @@ order, apart or together.
 S, search query size
      The size of each search query value.
 
-    `b'
+     'b'
           bytes
-
-    `h'
+     'h'
           halfwords (two bytes)
-
-    `w'
+     'w'
           words (four bytes)
-
-    `g'
+     'g'
           giant words (eight bytes)
 
      All values are interpreted in the current language.  This means,
@@ -2827,24 +3087,24 @@ S, search query size
      type in the current language.  This is useful when one wants to
      specify the search pattern as a mixture of types.  Note that this
      means, for example, that in the case of C-like languages a search
-     for an untyped 0x42 will search for `(int) 0x42' which is
-     typically four bytes.
+     for an untyped 0x42 will search for '(int) 0x42' which is typically
+     four bytes.
 
 N, maximum number of finds
      The maximum number of matches to print.  The default is to print
      all finds.
 
    You can use strings as search values.  Quote them with double-quotes
-(`"').  The string value is copied into the search pattern byte by byte,
+('"').  The string value is copied into the search pattern byte by byte,
 regardless of the endianness of the target and the size specification.
 
    The address of each match found is printed as well as a count of the
 number of matches found.
 
    The address of the last value found is stored in convenience variable
-`$_'.  A count of the number of matches is stored in `$numfound'.
+'$_'.  A count of the number of matches is stored in '$numfound'.
 
-   For example, if stopped at the `printf' in this function:
+   For example, if stopped at the 'printf' in this function:
 
      void
      hello ()
@@ -2877,6 +3137,46 @@ you get during debugging:
      $2 = (void *) 0x8049560
 
 
+File: gdb.info,  Node: Value Sizes,  Prev: Searching Memory,  Up: Data
+
+10.23 Value Sizes
+=================
+
+Whenever GDB prints a value memory will be allocated within GDB to hold
+the contents of the value.  It is possible in some languages with
+dynamic typing systems, that an invalid program may indicate a value
+that is incorrectly large, this in turn may cause GDB to try and
+allocate an overly large ammount of memory.
+
+'set max-value-size BYTES'
+'set max-value-size unlimited'
+     Set the maximum size of memory that GDB will allocate for the
+     contents of a value to BYTES, trying to display a value that
+     requires more memory than that will result in an error.
+
+     Setting this variable does not effect values that have already been
+     allocated within GDB, only future allocations.
+
+     There's a minimum size that 'max-value-size' can be set to in order
+     that GDB can still operate correctly, this minimum is currently 16
+     bytes.
+
+     The limit applies to the results of some subexpressions as well as
+     to complete expressions.  For example, an expression denoting a
+     simple integer component, such as 'x.y.z', may fail if the size of
+     X.Y is dynamic and exceeds BYTES.  On the other hand, GDB is
+     sometimes clever; the expression 'A[i]', where A is an array
+     variable with non-constant size, will generally succeed regardless
+     of the bounds on A, as long as the component size is less than
+     BYTES.
+
+     The default value of 'max-value-size' is currently 64k.
+
+'show max-value-size'
+     Show the maximum size of memory, in bytes, that GDB will allocate
+     for the contents of a value.
+
+
 File: gdb.info,  Node: Optimized Code,  Next: Macros,  Prev: Data,  Up: Top
 
 11 Debugging Optimized Code
@@ -2884,29 +3184,29 @@ File: gdb.info,  Node: Optimized Code,  
 
 Almost all compilers support optimization.  With optimization disabled,
 the compiler generates assembly code that corresponds directly to your
-source code, in a simplistic way.  As the compiler applies more
-powerful optimizations, the generated assembly code diverges from your
-original source code.  With help from debugging information generated
-by the compiler, GDB can map from the running program back to
-constructs from your original source.
+source code, in a simplistic way.  As the compiler applies more powerful
+optimizations, the generated assembly code diverges from your original
+source code.  With help from debugging information generated by the
+compiler, GDB can map from the running program back to constructs from
+your original source.
 
    GDB is more accurate with optimization disabled.  If you can
 recompile without optimization, it is easier to follow the progress of
 your program during debugging.  But, there are many cases where you may
 need to debug an optimized version.
 
-   When you debug a program compiled with `-g -O', remember that the
+   When you debug a program compiled with '-g -O', remember that the
 optimizer has rearranged your code; the debugger shows you what is
 really there.  Do not be too surprised when the execution path does not
 exactly match your source file!  An extreme example: if you define a
 variable, but never use it, GDB never sees that variable--because the
 compiler optimizes it out of existence.
 
-   Some things do not work as well with `-g -O' as with just `-g',
+   Some things do not work as well with '-g -O' as with just '-g',
 particularly on machines with instruction scheduling.  If in doubt,
-recompile with `-g' alone, and if this fixes the problem, please report
-it to us as a bug (including a test case!).  *Note Variables::, for
-more information about debugging optimized code.
+recompile with '-g' alone, and if this fixes the problem, please report
+it to us as a bug (including a test case!).  *Note Variables::, for more
+information about debugging optimized code.
 
 * Menu:
 
@@ -2920,33 +3220,32 @@ File: gdb.info,  Node: Inline Functions,
 =====================
 
 "Inlining" is an optimization that inserts a copy of the function body
-directly at each call site, instead of jumping to a shared routine.
-GDB displays inlined functions just like non-inlined functions.  They
-appear in backtraces.  You can view their arguments and local
-variables, step into them with `step', skip them with `next', and
-escape from them with `finish'.  You can check whether a function was
-inlined by using the `info frame' command.
+directly at each call site, instead of jumping to a shared routine.  GDB
+displays inlined functions just like non-inlined functions.  They appear
+in backtraces.  You can view their arguments and local variables, step
+into them with 'step', skip them with 'next', and escape from them with
+'finish'.  You can check whether a function was inlined by using the
+'info frame' command.
 
    For GDB to support inlined functions, the compiler must record
 information about inlining in the debug information -- GCC using the
-DWARF 2 format does this, and several other compilers do also.  GDB
-only supports inlined functions when using DWARF 2.  Versions of GCC
-before 4.1 do not emit two required attributes (`DW_AT_call_file' and
-`DW_AT_call_line'); GDB does not display inlined function calls with
+DWARF 2 format does this, and several other compilers do also.  GDB only
+supports inlined functions when using DWARF 2.  Versions of GCC before
+4.1 do not emit two required attributes ('DW_AT_call_file' and
+'DW_AT_call_line'); GDB does not display inlined function calls with
 earlier versions of GCC.  It instead displays the arguments and local
 variables of inlined functions as local variables in the caller.
 
    The body of an inlined function is directly included at its call
 site; unlike a non-inlined function, there are no instructions devoted
-to the call.  GDB still pretends that the call site and the start of
-the inlined function are different instructions.  Stepping to the call
-site shows the call site, and then stepping again shows the first line
-of the inlined function, even though no additional instructions are
-executed.
+to the call.  GDB still pretends that the call site and the start of the
+inlined function are different instructions.  Stepping to the call site
+shows the call site, and then stepping again shows the first line of the
+inlined function, even though no additional instructions are executed.
 
    This makes source-level debugging much clearer; you can see both the
-context of the call and then the effect of the call.  Only stepping by
-a single instruction using `stepi' or `nexti' does not do this; single
+context of the call and then the effect of the call.  Only stepping by a
+single instruction using 'stepi' or 'nexti' does not do this; single
 instruction steps always show the inlined body.
 
    There are some ways that GDB does not pretend that inlined function
@@ -2959,41 +3258,39 @@ calls are the same as normal calls:
      future version of GDB; until then, set a breakpoint on an earlier
      line or inside the inlined function instead.
 
-   * GDB cannot locate the return value of inlined calls after using
-     the `finish' command.  This is a limitation of compiler-generated
-     debugging information; after `finish', you can step to the next
+   * GDB cannot locate the return value of inlined calls after using the
+     'finish' command.  This is a limitation of compiler-generated
+     debugging information; after 'finish', you can step to the next
      line and print a variable where your program stored the return
      value.
 
-
 
 File: gdb.info,  Node: Tail Call Frames,  Prev: Inline Functions,  Up: Optimized Code
 
 11.2 Tail Call Frames
 =====================
 
-Function `B' can call function `C' in its very last statement.  In
-unoptimized compilation the call of `C' is immediately followed by
-return instruction at the end of `B' code.  Optimizing compiler may
-replace the call and return in function `B' into one jump to function
-`C' instead.  Such use of a jump instruction is called "tail call".
-
-   During execution of function `C', there will be no indication in the
-function call stack frames that it was tail-called from `B'.  If
-function `A' regularly calls function `B' which tail-calls function `C',
-then GDB will see `A' as the caller of `C'.  However, in some cases GDB
-can determine that `C' was tail-called from `B', and it will then
-create fictitious call frame for that, with the return address set up
-as if `B' called `C' normally.
+Function 'B' can call function 'C' in its very last statement.  In
+unoptimized compilation the call of 'C' is immediately followed by
+return instruction at the end of 'B' code.  Optimizing compiler may
+replace the call and return in function 'B' into one jump to function
+'C' instead.  Such use of a jump instruction is called "tail call".
+
+   During execution of function 'C', there will be no indication in the
+function call stack frames that it was tail-called from 'B'.  If
+function 'A' regularly calls function 'B' which tail-calls function 'C',
+then GDB will see 'A' as the caller of 'C'.  However, in some cases GDB
+can determine that 'C' was tail-called from 'B', and it will then create
+fictitious call frame for that, with the return address set up as if 'B'
+called 'C' normally.
 
    This functionality is currently supported only by DWARF 2 debugging
-format and the compiler has to produce `DW_TAG_GNU_call_site' tags.
-With GCC, you need to specify `-O -g' during compilation, to get this
+format and the compiler has to produce 'DW_TAG_call_site' tags.  With
+GCC, you need to specify '-O -g' during compilation, to get this
 information.
 
-   `info frame' command (*note Frame Info::) will indicate the tail
-call frame kind by text `tail call frame' such as in this sample GDB
-output:
+   'info frame' command (*note Frame Info::) will indicate the tail call
+frame kind by text 'tail call frame' such as in this sample GDB output:
 
      (gdb) x/i $pc - 2
         0x40066b <b(int, double)+11>: jmp 0x400640 <c(int, double)>
@@ -3006,14 +3303,14 @@ output:
       Locals at unknown address, Previous frame's sp is 0x7fffffffda30
 
    The detection of all the possible code path executions can find them
-ambiguous.  There is no execution history stored (possible *note
-Reverse Execution:: is never used for this purpose) and the last known
-caller could have reached the known callee by multiple different jump
+ambiguous.  There is no execution history stored (possible *note Reverse
+Execution:: is never used for this purpose) and the last known caller
+could have reached the known callee by multiple different jump
 sequences.  In such case GDB still tries to show at least all the
-unambiguous top tail callers and all the unambiguous bottom tail
-calees, if any.
+unambiguous top tail callers and all the unambiguous bottom tail calees,
+if any.
 
-`set debug entry-values'
+'set debug entry-values'
      When set to on, enables printing of analysis messages for both
      frame argument values at function entry and tail calls.  It will
      show all the possible valid tail calls code paths it has
@@ -3021,13 +3318,13 @@ calees, if any.
      final unambiguous (possibly partial or even empty) code path
      result.
 
-`show debug entry-values'
-     Show the current state of analysis messages printing for both
-     frame argument values at function entry and tail calls.
+'show debug entry-values'
+     Show the current state of analysis messages printing for both frame
+     argument values at function entry and tail calls.
 
    The analysis messages for tail calls can for example show why the
-virtual tail call frame for function `c' has not been recognized (due
-to the indirect reference by variable `x'):
+virtual tail call frame for function 'c' has not been recognized (due to
+the indirect reference by variable 'x'):
 
      static void __attribute__((noinline, noclone)) c (void);
      void (*x) (void) = c;
@@ -3035,8 +3332,8 @@ to the indirect reference by variable `x
      static void __attribute__((noinline, noclone)) c (void) { a (); }
      int main (void) { x (); return 0; }
 
-     Breakpoint 1, DW_OP_GNU_entry_value resolving cannot find
-     DW_TAG_GNU_call_site 0x40039a in main
+     Breakpoint 1, DW_OP_entry_value resolving cannot find
+     DW_TAG_call_site 0x40039a in main
      a () at t.c:3
      3	static void __attribute__((noinline, noclone)) a (void) { x++; }
      (gdb) bt
@@ -3064,21 +3361,21 @@ resolution:
      #1  0x00000000004004d2 in a () at t.c:8
      #2  0x0000000000400395 in main () at t.c:9
 
-   Frames #0 and #2 are real, #1 is a virtual tail call frame.  The
-code can have possible execution paths `main->a->b->c->d->f' or
-`main->a->b->e->f', GDB cannot find which one from the inferior state.
+   Frames #0 and #2 are real, #1 is a virtual tail call frame.  The code
+can have possible execution paths 'main->a->b->c->d->f' or
+'main->a->b->e->f', GDB cannot find which one from the inferior state.
 
-   `initial:' state shows some random possible calling sequence GDB has
+   'initial:' state shows some random possible calling sequence GDB has
 found.  It then finds another possible calling sequcen - that one is
-prefixed by `compare:'.  The non-ambiguous intersection of these two is
-printed as the `reduced:' calling sequence.  That one could have many
-futher `compare:' and `reduced:' statements as long as there remain any
+prefixed by 'compare:'.  The non-ambiguous intersection of these two is
+printed as the 'reduced:' calling sequence.  That one could have many
+futher 'compare:' and 'reduced:' statements as long as there remain any
 non-ambiguous sequence entries.
 
-   For the frame of function `b' in both cases there are different
-possible `$pc' values (`0x4004cc' or `0x4004ce'), therefore this frame
+   For the frame of function 'b' in both cases there are different
+possible '$pc' values ('0x4004cc' or '0x4004ce'), therefore this frame
 is also ambigous.  The only non-ambiguous frame is the one for function
-`a', therefore this one is displayed to the user while the ambiguous
+'a', therefore this one is displayed to the user while the ambiguous
 frames are omitted.
 
    There can be also reasons why printing of frame argument values at
@@ -3094,16 +3391,16 @@ function entry may fail:
 
      (gdb) bt
      #0  c (i=i@entry=0) at t.c:2
-     #1  0x0000000000400428 in a (DW_OP_GNU_entry_value resolving has found
+     #1  0x0000000000400428 in a (DW_OP_entry_value resolving has found
      function "a" at 0x400420 can call itself via tail calls
      i=<optimized out>) at t.c:6
      #2  0x000000000040036e in main () at t.c:7
 
    GDB cannot find out from the inferior state if and how many times did
-function `a' call itself (via function `b') as these calls would be
-tail calls.  Such tail calls would modify thue `i' variable, therefore
-GDB cannot be sure the value it knows would be right - GDB prints
-`<optimized out>' instead.
+function 'a' call itself (via function 'b') as these calls would be tail
+calls.  Such tail calls would modify thue 'i' variable, therefore GDB
+cannot be sure the value it knows would be right - GDB prints
+'<optimized out>' instead.
 
 
 File: gdb.info,  Node: Macros,  Next: Tracepoints,  Prev: Optimized Code,  Up: Top
@@ -3120,29 +3417,29 @@ defined.
    You may need to compile your program specially to provide GDB with
 information about preprocessor macros.  Most compilers do not include
 macros in their debugging information, even when you compile with the
-`-g' flag.  *Note Compilation::.
+'-g' flag.  *Note Compilation::.
 
    A program may define a macro at one point, remove that definition
 later, and then provide a different definition after that.  Thus, at
-different points in the program, a macro may have different
-definitions, or have no definition at all.  If there is a current stack
-frame, GDB uses the macros in scope at that frame's source code line.
-Otherwise, GDB uses the macros in scope at the current listing location;
-see *note List::.
+different points in the program, a macro may have different definitions,
+or have no definition at all.  If there is a current stack frame, GDB
+uses the macros in scope at that frame's source code line.  Otherwise,
+GDB uses the macros in scope at the current listing location; see *note
+List::.
 
    Whenever GDB evaluates an expression, it always expands any macro
 invocations present in the expression.  GDB also provides the following
 commands for working with macros explicitly.
 
-`macro expand EXPRESSION'
-`macro exp EXPRESSION'
+'macro expand EXPRESSION'
+'macro exp EXPRESSION'
      Show the results of expanding all preprocessor macro invocations in
      EXPRESSION.  Since GDB simply expands macros, but does not parse
      the result, EXPRESSION need not be a valid expression; it can be
      any string of tokens.
 
-`macro expand-once EXPRESSION'
-`macro exp1 EXPRESSION'
+'macro expand-once EXPRESSION'
+'macro exp1 EXPRESSION'
      (This command is not yet implemented.)  Show the results of
      expanding those preprocessor macro invocations that appear
      explicitly in EXPRESSION.  Macro invocations appearing in that
@@ -3152,20 +3449,20 @@ commands for working with macros explici
      not parse the result, EXPRESSION need not be a valid expression; it
      can be any string of tokens.
 
-`info macro [-a|-all] [--] MACRO'
+'info macro [-a|-all] [--] MACRO'
      Show the current definition or all definitions of the named MACRO,
      and describe the source location or compiler command-line where
      that definition was established.  The optional double dash is to
      signify the end of argument processing and the beginning of MACRO
      for non C-like macros where the macro may begin with a hyphen.
 
-`info macros LINESPEC'
+'info macros LOCATION'
      Show all macro definitions that are in effect at the location
-     specified by LINESPEC,  and describe the source location or
-     compiler command-line where those definitions were established.
+     specified by LOCATION, and describe the source location or compiler
+     command-line where those definitions were established.
 
-`macro define MACRO REPLACEMENT-LIST'
-`macro define MACRO(ARGLIST) REPLACEMENT-LIST'
+'macro define MACRO REPLACEMENT-LIST'
+'macro define MACRO(ARGLIST) REPLACEMENT-LIST'
      Introduce a definition for a preprocessor macro named MACRO,
      invocations of which are replaced by the tokens given in
      REPLACEMENT-LIST.  The first form of this command defines an
@@ -3174,19 +3471,19 @@ commands for working with macros explici
      ARGLIST.
 
      A definition introduced by this command is in scope in every
-     expression evaluated in GDB, until it is removed with the `macro
+     expression evaluated in GDB, until it is removed with the 'macro
      undef' command, described below.  The definition overrides all
      definitions for MACRO present in the program being debugged, as
      well as any previous user-supplied definition.
 
-`macro undef MACRO'
+'macro undef MACRO'
      Remove any user-supplied definition for the macro named MACRO.
-     This command only affects definitions provided with the `macro
+     This command only affects definitions provided with the 'macro
      define' command, described above; it cannot remove definitions
      present in the program being debugged.
 
-`macro list'
-     List all the macros defined using the `macro define' command.
+'macro list'
+     List all the macros defined using the 'macro define' command.
 
    Here is a transcript showing the above commands in action.  First, we
 show our source files:
@@ -3212,7 +3509,7 @@ show our source files:
      $
 
    Now, we compile the program using the GNU C compiler, GCC.  We pass
-the `-gdwarf-2'(1) _and_ `-g3' flags to ensure the compiler includes
+the '-gdwarf-2'(1) _and_ '-g3' flags to ensure the compiler includes
 information about preprocessor macros in the debugging information.
 
      $ gcc -gdwarf-2 -g3 sample.c -o sample
@@ -3227,8 +3524,8 @@ information about preprocessor macros in
      (gdb)
 
    We can expand macros and examine their definitions, even when the
-program is not running.  GDB uses the current listing position to
-decide which macro definitions are in scope:
+program is not running.  GDB uses the current listing position to decide
+which macro definitions are in scope:
 
      (gdb) list main
      3
@@ -3254,10 +3551,10 @@ decide which macro definitions are in sc
      expands to: once (M + 1)
      (gdb)
 
-   In the example above, note that `macro expand-once' expands only the
+   In the example above, note that 'macro expand-once' expands only the
 macro invocation explicit in the original text -- the invocation of
-`ADD' -- but does not expand the invocation of the macro `M', which was
-introduced by `ADD'.
+'ADD' -- but does not expand the invocation of the macro 'M', which was
+introduced by 'ADD'.
 
    Once the program is running, GDB uses the macro definitions in force
 at the source line of the current stack frame:
@@ -3271,7 +3568,7 @@ at the source line of the current stack 
      10        printf ("Hello, world!\n");
      (gdb)
 
-   At line 10, the definition of the macro `N' at line 9 is in force:
+   At line 10, the definition of the macro 'N' at line 9 is in force:
 
      (gdb) info macro N
      Defined at /home/jimb/gdb/macros/play/sample.c:9
@@ -3282,7 +3579,7 @@ at the source line of the current stack 
      $1 = 1
      (gdb)
 
-   As we step over directives that remove `N''s definition, and then
+   As we step over directives that remove 'N''s definition, and then
 give it a new definition, GDB finds the definition (or lack thereof) in
 force at each point:
 
@@ -3304,10 +3601,10 @@ force at each point:
      $2 = 0
      (gdb)
 
-   In addition to source files, macros can be defined on the
-compilation command line using the `-DNAME=VALUE' syntax.  For macros
-defined in such a way, GDB displays the location of their definition as
-line zero of the source file submitted to the compiler.
+   In addition to source files, macros can be defined on the compilation
+command line using the '-DNAME=VALUE' syntax.  For macros defined in
+such a way, GDB displays the location of their definition as line zero
+of the source file submitted to the compiler.
 
      (gdb) info macro __STDC__
      Defined at /home/jimb/gdb/macros/play/sample.c:0
@@ -3316,9 +3613,9 @@ line zero of the source file submitted t
 
    ---------- Footnotes ----------
 
-   (1) This is the minimum.  Recent versions of GCC support `-gdwarf-3'
-and `-gdwarf-4'; we recommend always choosing the most recent version
-of DWARF.
+   (1) This is the minimum.  Recent versions of GCC support '-gdwarf-3'
+and '-gdwarf-4'; we recommend always choosing the most recent version of
+DWARF.
 
 
 File: gdb.info,  Node: Tracepoints,  Next: Overlays,  Prev: Macros,  Up: Top
@@ -3328,23 +3625,22 @@ File: gdb.info,  Node: Tracepoints,  Nex
 
 In some applications, it is not feasible for the debugger to interrupt
 the program's execution long enough for the developer to learn anything
-helpful about its behavior.  If the program's correctness depends on
-its real-time behavior, delays introduced by a debugger might cause the
+helpful about its behavior.  If the program's correctness depends on its
+real-time behavior, delays introduced by a debugger might cause the
 program to change its behavior drastically, or perhaps fail, even when
 the code itself is correct.  It is useful to be able to observe the
 program's behavior without interrupting it.
 
-   Using GDB's `trace' and `collect' commands, you can specify
-locations in the program, called "tracepoints", and arbitrary
-expressions to evaluate when those tracepoints are reached.  Later,
-using the `tfind' command, you can examine the values those expressions
-had when the program hit the tracepoints.  The expressions may also
-denote objects in memory--structures or arrays, for example--whose
-values GDB should record; while visiting a particular tracepoint, you
-may inspect those objects as if they were in memory at that moment.
-However, because GDB records these values without interacting with you,
-it can do so quickly and unobtrusively, hopefully not disturbing the
-program's behavior.
+   Using GDB's 'trace' and 'collect' commands, you can specify locations
+in the program, called "tracepoints", and arbitrary expressions to
+evaluate when those tracepoints are reached.  Later, using the 'tfind'
+command, you can examine the values those expressions had when the
+program hit the tracepoints.  The expressions may also denote objects in
+memory--structures or arrays, for example--whose values GDB should
+record; while visiting a particular tracepoint, you may inspect those
+objects as if they were in memory at that moment.  However, because GDB
+records these values without interacting with you, it can do so quickly
+and unobtrusively, hopefully not disturbing the program's behavior.
 
    The tracepoint facility is currently available only for remote
 targets.  *Note Targets::.  In addition, your remote target must know
@@ -3354,7 +3650,7 @@ tracepoints as of this writing.  The for
 to implement tracepoints are described in *note Tracepoint Packets::.
 
    It is also possible to get trace data from a file, in a manner
-reminiscent of corefiles; you specify the filename, and use `tfind' to
+reminiscent of corefiles; you specify the filename, and use 'tfind' to
 search through the file.  *Note Trace Files::, for more details.
 
    This chapter describes the tracepoint commands and features.
@@ -3374,11 +3670,11 @@ File: gdb.info,  Node: Set Tracepoints, 
 
 Before running such a "trace experiment", an arbitrary number of
 tracepoints can be set.  A tracepoint is actually a special type of
-breakpoint (*note Set Breaks::), so you can manipulate it using
-standard breakpoint commands.  For instance, as with breakpoints,
-tracepoint numbers are successive integers starting from one, and many
-of the commands associated with tracepoints take the tracepoint number
-as their argument, to identify which tracepoint to work on.
+breakpoint (*note Set Breaks::), so you can manipulate it using standard
+breakpoint commands.  For instance, as with breakpoints, tracepoint
+numbers are successive integers starting from one, and many of the
+commands associated with tracepoints take the tracepoint number as their
+argument, to identify which tracepoint to work on.
 
    For each tracepoint, you can specify, in advance, some arbitrary set
 of data that you want the target to collect in the trace buffer when it
@@ -3398,21 +3694,20 @@ but possibly restricted in where they ma
 that they can be used to insert tracepoints at (almost) any location in
 the target.  Some targets may also support controlling "static
 tracepoints" from GDB.  With static tracing, a set of instrumentation
-points, also known as "markers", are embedded in the target program,
-and can be activated or deactivated by name or address.  These are
-usually placed at locations which facilitate investigating what the
-target is actually doing.  GDB's support for static tracing includes
-being able to list instrumentation points, and attach them with GDB
-defined high level tracepoints that expose the whole range of
-convenience of GDB's tracepoints support.  Namely, support for
-collecting registers values and values of global or local (to the
-instrumentation point) variables; tracepoint conditions and trace state
-variables.  The act of installing a GDB static tracepoint on an
-instrumentation point, or marker, is referred to as "probing" a static
-tracepoint marker.
+points, also known as "markers", are embedded in the target program, and
+can be activated or deactivated by name or address.  These are usually
+placed at locations which facilitate investigating what the target is
+actually doing.  GDB's support for static tracing includes being able to
+list instrumentation points, and attach them with GDB defined high level
+tracepoints that expose the whole range of convenience of GDB's
+tracepoints support.  Namely, support for collecting registers values
+and values of global or local (to the instrumentation point) variables;
+tracepoint conditions and trace state variables.  The act of installing
+a GDB static tracepoint on an instrumentation point, or marker, is
+referred to as "probing" a static tracepoint marker.
 
-   `gdbserver' supports tracepoints on some target systems.  *Note
-Tracepoints support in `gdbserver': Server.
+   'gdbserver' supports tracepoints on some target systems.  *Note
+Tracepoints support in 'gdbserver': Server.
 
    This section describes commands to set tracepoints and associated
 conditions and actions.
@@ -3436,30 +3731,29 @@ File: gdb.info,  Node: Create and Delete
 13.1.1 Create and Delete Tracepoints
 ------------------------------------
 
-`trace LOCATION'
-     The `trace' command is very similar to the `break' command.  Its
-     argument LOCATION can be a source line, a function name, or an
-     address in the target program.  *Note Specify Location::.  The
-     `trace' command defines a tracepoint, which is a point in the
-     target program where the debugger will briefly stop, collect some
-     data, and then allow the program to continue.  Setting a
-     tracepoint or changing its actions takes effect immediately if the
-     remote stub supports the `InstallInTrace' feature (*note install
-     tracepoint in tracing::).  If remote stub doesn't support the
-     `InstallInTrace' feature, all these changes don't take effect
-     until the next `tstart' command, and once a trace experiment is
+'trace LOCATION'
+     The 'trace' command is very similar to the 'break' command.  Its
+     argument LOCATION can be any valid location.  *Note Specify
+     Location::.  The 'trace' command defines a tracepoint, which is a
+     point in the target program where the debugger will briefly stop,
+     collect some data, and then allow the program to continue.  Setting
+     a tracepoint or changing its actions takes effect immediately if
+     the remote stub supports the 'InstallInTrace' feature (*note
+     install tracepoint in tracing::).  If remote stub doesn't support
+     the 'InstallInTrace' feature, all these changes don't take effect
+     until the next 'tstart' command, and once a trace experiment is
      running, further changes will not have any effect until the next
      trace experiment starts.  In addition, GDB supports "pending
-     tracepoints"--tracepoints whose address is not yet resolved.
-     (This is similar to pending breakpoints.)  Pending tracepoints are
-     not downloaded to the target and not installed until they are
-     resolved.  The resolution of pending tracepoints requires GDB
-     support--when debugging with the remote target, and GDB
-     disconnects from the remote stub (*note disconnected tracing::),
-     pending tracepoints can not be resolved (and downloaded to the
-     remote stub) while GDB is disconnected.
+     tracepoints"--tracepoints whose address is not yet resolved.  (This
+     is similar to pending breakpoints.)  Pending tracepoints are not
+     downloaded to the target and not installed until they are resolved.
+     The resolution of pending tracepoints requires GDB support--when
+     debugging with the remote target, and GDB disconnects from the
+     remote stub (*note disconnected tracing::), pending tracepoints can
+     not be resolved (and downloaded to the remote stub) while GDB is
+     disconnected.
 
-     Here are some examples of using the `trace' command:
+     Here are some examples of using the 'trace' command:
 
           (gdb) trace foo.c:121    // a source file and line number
 
@@ -3471,53 +3765,53 @@ File: gdb.info,  Node: Create and Delete
 
           (gdb) trace *0x2117c4    // an address
 
-     You can abbreviate `trace' as `tr'.
+     You can abbreviate 'trace' as 'tr'.
 
-`trace LOCATION if COND'
+'trace LOCATION if COND'
      Set a tracepoint with condition COND; evaluate the expression COND
      each time the tracepoint is reached, and collect data only if the
      value is nonzero--that is, if COND evaluates as true.  *Note
      Tracepoint Conditions: Tracepoint Conditions, for more information
      on tracepoint conditions.
 
-`ftrace LOCATION [ if COND ]'
-     The `ftrace' command sets a fast tracepoint.  For targets that
+'ftrace LOCATION [ if COND ]'
+     The 'ftrace' command sets a fast tracepoint.  For targets that
      support them, fast tracepoints will use a more efficient but
-     possibly less general technique to trigger data collection, such
-     as a jump instruction instead of a trap, or some sort of hardware
-     support.  It may not be possible to create a fast tracepoint at
-     the desired location, in which case the command will exit with an
+     possibly less general technique to trigger data collection, such as
+     a jump instruction instead of a trap, or some sort of hardware
+     support.  It may not be possible to create a fast tracepoint at the
+     desired location, in which case the command will exit with an
      explanatory message.
 
-     GDB handles arguments to `ftrace' exactly as for `trace'.
+     GDB handles arguments to 'ftrace' exactly as for 'trace'.
 
      On 32-bit x86-architecture systems, fast tracepoints normally need
      to be placed at an instruction that is 5 bytes or longer, but can
      be placed at 4-byte instructions if the low 64K of memory of the
-     target program is available to install trampolines.  Some
-     Unix-type systems, such as GNU/Linux, exclude low addresses from
-     the program's address space; but for instance with the Linux
-     kernel it is possible to let GDB use this area by doing a `sysctl'
-     command to set the `mmap_min_addr' kernel parameter, as in
+     target program is available to install trampolines.  Some Unix-type
+     systems, such as GNU/Linux, exclude low addresses from the
+     program's address space; but for instance with the Linux kernel it
+     is possible to let GDB use this area by doing a 'sysctl' command to
+     set the 'mmap_min_addr' kernel parameter, as in
 
           sudo sysctl -w vm.mmap_min_addr=32768
 
      which sets the low address to 32K, which leaves plenty of room for
      trampolines.  The minimum address should be set to a page boundary.
 
-`strace LOCATION [ if COND ]'
-     The `strace' command sets a static tracepoint.  For targets that
+'strace LOCATION [ if COND ]'
+     The 'strace' command sets a static tracepoint.  For targets that
      support it, setting a static tracepoint probes a static
-     instrumentation point, or marker, found at LOCATION.  It may not
-     be possible to set a static tracepoint at the desired location, in
+     instrumentation point, or marker, found at LOCATION.  It may not be
+     possible to set a static tracepoint at the desired location, in
      which case the command will exit with an explanatory message.
 
-     GDB handles arguments to `strace' exactly as for `trace', with the
-     addition that the user can also specify `-m MARKER' as LOCATION.
+     GDB handles arguments to 'strace' exactly as for 'trace', with the
+     addition that the user can also specify '-m MARKER' as LOCATION.
      This probes the marker identified by the MARKER string identifier.
      This identifier depends on the static tracepoint backend library
      your program is using.  You can find all the marker identifiers in
-     the `ID' field of the `info static-tracepoint-markers' command
+     the 'ID' field of the 'info static-tracepoint-markers' command
      output.  *Note Listing Static Tracepoint Markers: Listing Static
      Tracepoint Markers.  For example, in the following small program
      using the UST tracing engine:
@@ -3528,7 +3822,7 @@ File: gdb.info,  Node: Create and Delete
           }
 
      the marker id is composed of joining the first two arguments to the
-     `trace_mark' call with a slash, which translates to:
+     'trace_mark' call with a slash, which translates to:
 
           (gdb) info static-tracepoint-markers
           Cnt Enb ID         Address            What
@@ -3540,26 +3834,26 @@ File: gdb.info,  Node: Create and Delete
 
           (gdb) strace -m ust/bar33
 
-     Static tracepoints accept an extra collect action -- `collect
+     Static tracepoints accept an extra collect action -- 'collect
      $_sdata'.  This collects arbitrary user data passed in the probe
      point call to the tracing library.  In the UST example above,
-     you'll see that the third argument to `trace_mark' is a
-     printf-like format string.  The user data is then the result of
-     running that formating string against the following arguments.
-     Note that `info static-tracepoint-markers' command output lists
-     that format string in the `Data:' field.
+     you'll see that the third argument to 'trace_mark' is a printf-like
+     format string.  The user data is then the result of running that
+     formating string against the following arguments.  Note that 'info
+     static-tracepoint-markers' command output lists that format string
+     in the 'Data:' field.
 
      You can inspect this data when analyzing the trace buffer, by
      printing the $_sdata variable like any other variable available to
      GDB.  *Note Tracepoint Action Lists: Tracepoint Actions.
 
-     The convenience variable `$tpnum' records the tracepoint number of
+     The convenience variable '$tpnum' records the tracepoint number of
      the most recently set tracepoint.
 
-`delete tracepoint [NUM]'
+'delete tracepoint [NUM]'
      Permanently delete one or more tracepoints.  With no argument, the
      default is to delete all tracepoints.  Note that the regular
-     `delete' command can remove tracepoints also.
+     'delete' command can remove tracepoints also.
 
      Examples:
 
@@ -3567,7 +3861,7 @@ File: gdb.info,  Node: Create and Delete
 
           (gdb) delete trace       // remove all tracepoints
 
-     You can abbreviate this command as `del tr'.
+     You can abbreviate this command as 'del tr'.
 
 
 File: gdb.info,  Node: Enable and Disable Tracepoints,  Next: Tracepoint Passcounts,  Prev: Create and Delete Tracepoints,  Up: Set Tracepoints
@@ -3575,20 +3869,20 @@ File: gdb.info,  Node: Enable and Disabl
 13.1.2 Enable and Disable Tracepoints
 -------------------------------------
 
-These commands are deprecated; they are equivalent to plain `disable'
-and `enable'.
+These commands are deprecated; they are equivalent to plain 'disable'
+and 'enable'.
 
-`disable tracepoint [NUM]'
+'disable tracepoint [NUM]'
      Disable tracepoint NUM, or all tracepoints if no argument NUM is
      given.  A disabled tracepoint will have no effect during a trace
      experiment, but it is not forgotten.  You can re-enable a disabled
-     tracepoint using the `enable tracepoint' command.  If the command
+     tracepoint using the 'enable tracepoint' command.  If the command
      is issued during a trace experiment and the debug target has
      support for disabling tracepoints during a trace experiment, then
      the change will be effective immediately.  Otherwise, it will be
      applied to the next trace experiment.
 
-`enable tracepoint [NUM]'
+'enable tracepoint [NUM]'
      Enable tracepoint NUM, or all tracepoints.  If this command is
      issued during a trace experiment and the debug target supports
      enabling tracepoints during a trace experiment, then the enabled
@@ -3601,33 +3895,31 @@ File: gdb.info,  Node: Tracepoint Passco
 13.1.3 Tracepoint Passcounts
 ----------------------------
 
-`passcount [N [NUM]]'
+'passcount [N [NUM]]'
      Set the "passcount" of a tracepoint.  The passcount is a way to
-     automatically stop a trace experiment.  If a tracepoint's
-     passcount is N, then the trace experiment will be automatically
-     stopped on the N'th time that tracepoint is hit.  If the
-     tracepoint number NUM is not specified, the `passcount' command
-     sets the passcount of the most recently defined tracepoint.  If no
-     passcount is given, the trace experiment will run until stopped
-     explicitly by the user.
+     automatically stop a trace experiment.  If a tracepoint's passcount
+     is N, then the trace experiment will be automatically stopped on
+     the N'th time that tracepoint is hit.  If the tracepoint number NUM
+     is not specified, the 'passcount' command sets the passcount of the
+     most recently defined tracepoint.  If no passcount is given, the
+     trace experiment will run until stopped explicitly by the user.
 
      Examples:
 
           (gdb) passcount 5 2 // Stop on the 5th execution of
-                                        `// tracepoint 2'
+                                        // tracepoint 2
 
           (gdb) passcount 12  // Stop on the 12th execution of the
-                                        `// most recently defined tracepoint.'
+                                        // most recently defined tracepoint.
           (gdb) trace foo
           (gdb) pass 3
           (gdb) trace bar
           (gdb) pass 2
           (gdb) trace baz
           (gdb) pass 1        // Stop tracing when foo has been
-                                         `// executed 3 times OR when bar has'
-                                         `// been executed 2 times'
-                                         `// OR when baz has been executed 1 time.'
-
+                                         // executed 3 times OR when bar has
+                                         // been executed 2 times
+                                         // OR when baz has been executed 1 time.
 
 
 File: gdb.info,  Node: Tracepoint Conditions,  Next: Trace State Variables,  Prev: Tracepoint Passcounts,  Up: Set Tracepoints
@@ -3639,28 +3931,27 @@ The simplest sort of tracepoint collects
 reaches a specified place.  You can also specify a "condition" for a
 tracepoint.  A condition is just a Boolean expression in your
 programming language (*note Expressions: Expressions.).  A tracepoint
-with a condition evaluates the expression each time your program
-reaches it, and data collection happens only if the condition is true.
+with a condition evaluates the expression each time your program reaches
+it, and data collection happens only if the condition is true.
 
    Tracepoint conditions can be specified when a tracepoint is set, by
-using `if' in the arguments to the `trace' command.  *Note Setting
+using 'if' in the arguments to the 'trace' command.  *Note Setting
 Tracepoints: Create and Delete Tracepoints.  They can also be set or
-changed at any time with the `condition' command, just as with
+changed at any time with the 'condition' command, just as with
 breakpoints.
 
    Unlike breakpoint conditions, GDB does not actually evaluate the
-conditional expression itself.  Instead, GDB encodes the expression
-into an agent expression (*note Agent Expressions::) suitable for
-execution on the target, independently of GDB.  Global variables become
-raw memory locations, locals become stack accesses, and so forth.
+conditional expression itself.  Instead, GDB encodes the expression into
+an agent expression (*note Agent Expressions::) suitable for execution
+on the target, independently of GDB.  Global variables become raw memory
+locations, locals become stack accesses, and so forth.
 
    For instance, suppose you have a function that is usually called
 frequently, but should not be called after an error has occurred.  You
 could use the following tracepoint command to collect data about calls
-of that function that happen while the error code is propagating
-through the program; an unconditional tracepoint could end up
-collecting thousands of useless trace frames that you would have to
-search through.
+of that function that happen while the error code is propagating through
+the program; an unconditional tracepoint could end up collecting
+thousands of useless trace frames that you would have to search through.
 
      (gdb) trace normal_operation if errcode > 0
 
@@ -3674,7 +3965,7 @@ A "trace state variable" is a special ty
 and managed by target-side code.  The syntax is the same as that for
 GDB's convenience variables (a string prefixed with "$"), but they are
 stored on the target.  They must be created explicitly, using a
-`tvariable' command.  They are always 64-bit signed integers.
+'tvariable' command.  They are always 64-bit signed integers.
 
    Trace state variables are remembered by GDB, and downloaded to the
 target along with tracepoint information when the trace experiment
@@ -3685,54 +3976,53 @@ variables, beyond memory limitations of 
 them in print commands and expressions as if they were convenience
 variables; GDB will get the current value from the target while the
 trace experiment is running.  Trace state variables share the same
-namespace as other "$" variables, which means that you cannot have
-trace state variables with names like `$23' or `$pc', nor can you have
-a trace state variable and a convenience variable with the same name.
-
-`tvariable $NAME [ = EXPRESSION ]'
-     The `tvariable' command creates a new trace state variable named
-     `$NAME', and optionally gives it an initial value of EXPRESSION.
+namespace as other "$" variables, which means that you cannot have trace
+state variables with names like '$23' or '$pc', nor can you have a trace
+state variable and a convenience variable with the same name.
+
+'tvariable $NAME [ = EXPRESSION ]'
+     The 'tvariable' command creates a new trace state variable named
+     '$NAME', and optionally gives it an initial value of EXPRESSION.
      The EXPRESSION is evaluated when this command is entered; the
      result will be converted to an integer if possible, otherwise GDB
-     will report an error. A subsequent `tvariable' command specifying
+     will report an error.  A subsequent 'tvariable' command specifying
      the same name does not create a variable, but instead assigns the
      supplied initial value to the existing variable of that name,
-     overwriting any previous initial value. The default initial value
+     overwriting any previous initial value.  The default initial value
      is 0.
 
-`info tvariables'
+'info tvariables'
      List all the trace state variables along with their initial values.
-     Their current values may also be displayed, if the trace
-     experiment is currently running.
+     Their current values may also be displayed, if the trace experiment
+     is currently running.
 
-`delete tvariable [ $NAME ... ]'
+'delete tvariable [ $NAME ... ]'
      Delete the given trace state variables, or all of them if no
      arguments are specified.
 
-
 
 File: gdb.info,  Node: Tracepoint Actions,  Next: Listing Tracepoints,  Prev: Trace State Variables,  Up: Set Tracepoints
 
 13.1.6 Tracepoint Action Lists
 ------------------------------
 
-`actions [NUM]'
+'actions [NUM]'
      This command will prompt for a list of actions to be taken when the
      tracepoint is hit.  If the tracepoint number NUM is not specified,
      this command sets the actions for the one that was most recently
-     defined (so that you can define a tracepoint and then say
-     `actions' without bothering about its number).  You specify the
-     actions themselves on the following lines, one action at a time,
-     and terminate the actions list with a line containing just `end'.
-     So far, the only defined actions are `collect', `teval', and
-     `while-stepping'.
+     defined (so that you can define a tracepoint and then say 'actions'
+     without bothering about its number).  You specify the actions
+     themselves on the following lines, one action at a time, and
+     terminate the actions list with a line containing just 'end'.  So
+     far, the only defined actions are 'collect', 'teval', and
+     'while-stepping'.
 
-     `actions' is actually equivalent to `commands' (*note Breakpoint
+     'actions' is actually equivalent to 'commands' (*note Breakpoint
      Command Lists: Break Commands.), except that only the defined
      actions are allowed; any other GDB command is rejected.
 
-     To remove all actions from a tracepoint, type `actions NUM' and
-     follow it immediately with `end'.
+     To remove all actions from a tracepoint, type 'actions NUM' and
+     follow it immediately with 'end'.
 
           (gdb) collect DATA // collect some data
 
@@ -3740,14 +4030,14 @@ File: gdb.info,  Node: Tracepoint Action
 
           (gdb) end              // signals the end of actions.
 
-     In the following example, the action list begins with `collect'
+     In the following example, the action list begins with 'collect'
      commands indicating the things to be collected when the tracepoint
      is hit.  Then, in order to single-step and collect additional data
-     following the tracepoint, a `while-stepping' command is used,
+     following the tracepoint, a 'while-stepping' command is used,
      followed by the list of things to be collected after each step in a
-     sequence of single steps.  The `while-stepping' command is
-     terminated by its own separate `end' command.  Lastly, the action
-     list is terminated by an `end' command.
+     sequence of single steps.  The 'while-stepping' command is
+     terminated by its own separate 'end' command.  Lastly, the action
+     list is terminated by an 'end' command.
 
           (gdb) trace foo
           (gdb) actions
@@ -3759,122 +4049,127 @@ File: gdb.info,  Node: Tracepoint Action
             > end
           end
 
-`collect[/MODS] EXPR1, EXPR2, ...'
+'collect[/MODS] EXPR1, EXPR2, ...'
      Collect values of the given expressions when the tracepoint is hit.
      This command accepts a comma-separated list of any valid
      expressions.  In addition to global, static, or local variables,
      the following special arguments are supported:
 
-    `$regs'
+     '$regs'
           Collect all registers.
 
-    `$args'
+     '$args'
           Collect all function arguments.
 
-    `$locals'
+     '$locals'
           Collect all local variables.
 
-    `$_ret'
+     '$_ret'
           Collect the return address.  This is helpful if you want to
           see more of a backtrace.
 
-    `$_probe_argc'
+          _Note:_ The return address location can not always be reliably
+          determined up front, and the wrong address / registers may end
+          up collected instead.  On some architectures the reliability
+          is higher for tracepoints at function entry, while on others
+          it's the opposite.  When this happens, backtracing will stop
+          because the return address is found unavailable (unless
+          another collect rule happened to match it).
+
+     '$_probe_argc'
           Collects the number of arguments from the static probe at
           which the tracepoint is located.  *Note Static Probe Points::.
 
-    `$_probe_argN'
+     '$_probe_argN'
           N is an integer between 0 and 11.  Collects the Nth argument
           from the static probe at which the tracepoint is located.
           *Note Static Probe Points::.
 
-    `$_sdata'
+     '$_sdata'
           Collect static tracepoint marker specific data.  Only
           available for static tracepoints.  *Note Tracepoint Action
           Lists: Tracepoint Actions.  On the UST static tracepoints
-          library backend, an instrumentation point resembles a
-          `printf' function call.  The tracing library is able to
-          collect user specified data formatted to a character string
-          using the format provided by the programmer that instrumented
-          the program.  Other backends have similar mechanisms.  Here's
-          an example of a UST marker call:
+          library backend, an instrumentation point resembles a 'printf'
+          function call.  The tracing library is able to collect user
+          specified data formatted to a character string using the
+          format provided by the programmer that instrumented the
+          program.  Other backends have similar mechanisms.  Here's an
+          example of a UST marker call:
 
                 const char master_name[] = "$your_name";
                 trace_mark(channel1, marker1, "hello %s", master_name)
 
-          In this case, collecting `$_sdata' collects the string `hello
+          In this case, collecting '$_sdata' collects the string 'hello
           $yourname'.  When analyzing the trace buffer, you can inspect
-          `$_sdata' like any other variable available to GDB.
+          '$_sdata' like any other variable available to GDB.
 
-     You can give several consecutive `collect' commands, each one with
-     a single argument, or one `collect' command with several arguments
+     You can give several consecutive 'collect' commands, each one with
+     a single argument, or one 'collect' command with several arguments
      separated by commas; the effect is the same.
 
-     The optional MODS changes the usual handling of the arguments.
-     `s' requests that pointers to chars be handled as strings, in
+     The optional MODS changes the usual handling of the arguments.  's'
+     requests that pointers to chars be handled as strings, in
      particular collecting the contents of the memory being pointed at,
      up to the first zero.  The upper bound is by default the value of
-     the `print elements' variable; if `s' is followed by a decimal
+     the 'print elements' variable; if 's' is followed by a decimal
      number, that is the upper bound instead.  So for instance
-     `collect/s25 mystr' collects as many as 25 characters at `mystr'.
+     'collect/s25 mystr' collects as many as 25 characters at 'mystr'.
 
-     The command `info scope' (*note info scope: Symbols.) is
+     The command 'info scope' (*note info scope: Symbols.) is
      particularly useful for figuring out what data to collect.
 
-`teval EXPR1, EXPR2, ...'
+'teval EXPR1, EXPR2, ...'
      Evaluate the given expressions when the tracepoint is hit.  This
      command accepts a comma-separated list of expressions.  The results
      are discarded, so this is mainly useful for assigning values to
      trace state variables (*note Trace State Variables::) without
      adding those values to the trace buffer, as would be the case if
-     the `collect' action were used.
+     the 'collect' action were used.
 
-`while-stepping N'
+'while-stepping N'
      Perform N single-step instruction traces after the tracepoint,
-     collecting new data after each step.  The `while-stepping' command
-     is followed by the list of what to collect while stepping
-     (followed by its own `end' command):
+     collecting new data after each step.  The 'while-stepping' command
+     is followed by the list of what to collect while stepping (followed
+     by its own 'end' command):
 
           > while-stepping 12
             > collect $regs, myglobal
             > end
           >
 
-     Note that `$pc' is not automatically collected by
-     `while-stepping'; you need to explicitly collect that register if
-     you need it.  You may abbreviate `while-stepping' as `ws' or
-     `stepping'.
+     Note that '$pc' is not automatically collected by 'while-stepping';
+     you need to explicitly collect that register if you need it.  You
+     may abbreviate 'while-stepping' as 'ws' or 'stepping'.
 
-`set default-collect EXPR1, EXPR2, ...'
+'set default-collect EXPR1, EXPR2, ...'
      This variable is a list of expressions to collect at each
-     tracepoint hit.  It is effectively an additional `collect' action
+     tracepoint hit.  It is effectively an additional 'collect' action
      prepended to every tracepoint action list.  The expressions are
-     parsed individually for each tracepoint, so for instance a
-     variable named `xyz' may be interpreted as a global for one
-     tracepoint, and a local for another, as appropriate to the
-     tracepoint's location.
+     parsed individually for each tracepoint, so for instance a variable
+     named 'xyz' may be interpreted as a global for one tracepoint, and
+     a local for another, as appropriate to the tracepoint's location.
 
-`show default-collect'
+'show default-collect'
      Show the list of expressions that are collected by default at each
      tracepoint hit.
 
-
 
 File: gdb.info,  Node: Listing Tracepoints,  Next: Listing Static Tracepoint Markers,  Prev: Tracepoint Actions,  Up: Set Tracepoints
 
 13.1.7 Listing Tracepoints
 --------------------------
 
-`info tracepoints [NUM...]'
-     Display information about the tracepoint NUM.  If you don't
-     specify a tracepoint number, displays information about all the
-     tracepoints defined so far.  The format is similar to that used for
-     `info breakpoints'; in fact, `info tracepoints' is the same
-     command, simply restricting itself to tracepoints.
+'info tracepoints [NUM...]'
+     Display information about the tracepoint NUM.  If you don't specify
+     a tracepoint number, displays information about all the tracepoints
+     defined so far.  The format is similar to that used for 'info
+     breakpoints'; in fact, 'info tracepoints' is the same command,
+     simply restricting itself to tracepoints.
 
      A tracepoint's listing may include additional information specific
      to tracing:
 
-        * its passcount as given by the `passcount N' command
+        * its passcount as given by the 'passcount N' command
 
         * the state about installed on target of each location
 
@@ -3898,7 +4193,7 @@ File: gdb.info,  Node: Listing Tracepoin
                   not installed on target
           (gdb)
 
-     This command can be abbreviated `info tp'.
+     This command can be abbreviated 'info tp'.
 
 
 File: gdb.info,  Node: Listing Static Tracepoint Markers,  Next: Starting and Stopping Trace Experiments,  Prev: Listing Tracepoints,  Up: Set Tracepoints
@@ -3906,41 +4201,36 @@ File: gdb.info,  Node: Listing Static Tr
 13.1.8 Listing Static Tracepoint Markers
 ----------------------------------------
 
-`info static-tracepoint-markers'
+'info static-tracepoint-markers'
      Display information about all static tracepoint markers defined in
      the program.
 
      For each marker, the following columns are printed:
 
-    _Count_
+     _Count_
           An incrementing counter, output to help readability.  This is
           not a stable identifier.
-
-    _ID_
+     _ID_
           The marker ID, as reported by the target.
-
-    _Enabled or Disabled_
-          Probed markers are tagged with `y'.  `n' identifies marks
-          that are not enabled.
-
-    _Address_
+     _Enabled or Disabled_
+          Probed markers are tagged with 'y'.  'n' identifies marks that
+          are not enabled.
+     _Address_
           Where the marker is in your program, as a memory address.
-
-    _What_
+     _What_
           Where the marker is in the source for your program, as a file
           and line number.  If the debug information included in the
-          program does not allow GDB to locate the source of the
-          marker, this column will be left blank.
+          program does not allow GDB to locate the source of the marker,
+          this column will be left blank.
 
      In addition, the following information may be printed for each
      marker:
 
-    _Data_
+     _Data_
           User data passed to the tracing library by the marker call.
           In the UST backend, this is the format string passed as
           argument to the marker call.
-
-    _Static tracepoints probing the marker_
+     _Static tracepoints probing the marker_
           The list of static tracepoints attached to the marker.
 
           (gdb) info static-tracepoint-markers
@@ -3958,17 +4248,17 @@ File: gdb.info,  Node: Starting and Stop
 13.1.9 Starting and Stopping Trace Experiments
 ----------------------------------------------
 
-`tstart'
+'tstart'
      This command starts the trace experiment, and begins collecting
      data.  It has the side effect of discarding all the data collected
      in the trace buffer during the previous trace experiment.  If any
      arguments are supplied, they are taken as a note and stored with
-     the trace experiment's state.  The notes may be arbitrary text,
-     and are especially useful with disconnected tracing in a
-     multi-user context; the notes can explain what the trace is doing,
-     supply user contact information, and so forth.
+     the trace experiment's state.  The notes may be arbitrary text, and
+     are especially useful with disconnected tracing in a multi-user
+     context; the notes can explain what the trace is doing, supply user
+     contact information, and so forth.
 
-`tstop'
+'tstop'
      This command stops the trace experiment.  If any arguments are
      supplied, they are recorded with the experiment as a note.  This is
      useful if you are stopping a trace started by someone else, for
@@ -3979,7 +4269,7 @@ File: gdb.info,  Node: Starting and Stop
      automatically if any tracepoint's passcount is reached (*note
      Tracepoint Passcounts::), or if the trace buffer becomes full.
 
-`tstatus'
+'tstatus'
      This command displays the status of the current trace data
      collection.
 
@@ -3998,29 +4288,28 @@ File: gdb.info,  Node: Starting and Stop
      (gdb) tstop
 
    You can choose to continue running the trace experiment even if GDB
-disconnects from the target, voluntarily or involuntarily.  For
-commands such as `detach', the debugger will ask what you want to do
-with the trace.  But for unexpected terminations (GDB crash, network
-outage), it would be unfortunate to lose hard-won trace data, so the
-variable `disconnected-tracing' lets you decide whether the trace should
-continue running without GDB.
+disconnects from the target, voluntarily or involuntarily.  For commands
+such as 'detach', the debugger will ask what you want to do with the
+trace.  But for unexpected terminations (GDB crash, network outage), it
+would be unfortunate to lose hard-won trace data, so the variable
+'disconnected-tracing' lets you decide whether the trace should continue
+running without GDB.
 
-`set disconnected-tracing on'
-`set disconnected-tracing off'
+'set disconnected-tracing on'
+'set disconnected-tracing off'
      Choose whether a tracing run should continue to run if GDB has
-     disconnected from the target.  Note that `detach' or `quit' will
+     disconnected from the target.  Note that 'detach' or 'quit' will
      ask you directly what to do about a running trace no matter what
      this variable's setting, so the variable is mainly useful for
      handling unexpected situations, such as loss of the network.
 
-`show disconnected-tracing'
+'show disconnected-tracing'
      Show the current choice for disconnected tracing.
 
-
    When you reconnect to the target, the trace experiment may or may not
-still be running; it might have filled the trace buffer in the
-meantime, or stopped for one of the other reasons.  If it is running,
-it will continue after reconnection.
+still be running; it might have filled the trace buffer in the meantime,
+or stopped for one of the other reasons.  If it is running, it will
+continue after reconnection.
 
    Upon reconnection, the target will upload information about the
 tracepoints in effect.  GDB will then compare that information to the
@@ -4033,68 +4322,65 @@ tracepoint.  This matching-up process is
 may result in useless tracepoints being created; you may simply delete
 them if they are of no use.
 
-   If your target agent supports a "circular trace buffer", then you
-can run a trace experiment indefinitely without filling the trace
-buffer; when space runs out, the agent deletes already-collected trace
-frames, oldest first, until there is enough room to continue
-collecting.  This is especially useful if your tracepoints are being
-hit too often, and your trace gets terminated prematurely because the
-buffer is full.  To ask for a circular trace buffer, simply set
-`circular-trace-buffer' to on.  You can set this at any time, including
-during tracing; if the agent can do it, it will change buffer handling
-on the fly, otherwise it will not take effect until the next run.
+   If your target agent supports a "circular trace buffer", then you can
+run a trace experiment indefinitely without filling the trace buffer;
+when space runs out, the agent deletes already-collected trace frames,
+oldest first, until there is enough room to continue collecting.  This
+is especially useful if your tracepoints are being hit too often, and
+your trace gets terminated prematurely because the buffer is full.  To
+ask for a circular trace buffer, simply set 'circular-trace-buffer' to
+on.  You can set this at any time, including during tracing; if the
+agent can do it, it will change buffer handling on the fly, otherwise it
+will not take effect until the next run.
 
-`set circular-trace-buffer on'
-`set circular-trace-buffer off'
+'set circular-trace-buffer on'
+'set circular-trace-buffer off'
      Choose whether a tracing run should use a linear or circular buffer
      for trace data.  A linear buffer will not lose any trace data, but
      may fill up prematurely, while a circular buffer will discard old
      trace data, but it will have always room for the latest tracepoint
      hits.
 
-`show circular-trace-buffer'
+'show circular-trace-buffer'
      Show the current choice for the trace buffer.  Note that this may
-     not match the agent's current buffer handling, nor is it
-     guaranteed to match the setting that might have been in effect
-     during a past run, for instance if you are looking at frames from
-     a trace file.
+     not match the agent's current buffer handling, nor is it guaranteed
+     to match the setting that might have been in effect during a past
+     run, for instance if you are looking at frames from a trace file.
 
-
-`set trace-buffer-size N'
-`set trace-buffer-size unlimited'
+'set trace-buffer-size N'
+'set trace-buffer-size unlimited'
      Request that the target use a trace buffer of N bytes.  Not all
      targets will honor the request; they may have a compiled-in size
      for the trace buffer, or some other limitation.  Set to a value of
-     `unlimited' or `-1' to let the target use whatever size it likes.
+     'unlimited' or '-1' to let the target use whatever size it likes.
      This is also the default.
 
-`show trace-buffer-size'
+'show trace-buffer-size'
      Show the current requested size for the trace buffer.  Note that
      this will only match the actual size if the target supports
      size-setting, and was able to handle the requested size.  For
      instance, if the target can only change buffer size between runs,
      this variable will not reflect the change until the next run
-     starts.  Use `tstatus' to get a report of the actual buffer size.
+     starts.  Use 'tstatus' to get a report of the actual buffer size.
 
-`set trace-user TEXT'
+'set trace-user TEXT'
 
-`show trace-user'
+'show trace-user'
 
-`set trace-notes TEXT'
+'set trace-notes TEXT'
      Set the trace run's notes.
 
-`show trace-notes'
+'show trace-notes'
      Show the trace run's notes.
 
-`set trace-stop-notes TEXT'
+'set trace-stop-notes TEXT'
      Set the trace run's stop notes.  The handling of the note is as for
-     `tstop' arguments; the set command is convenient way to fix a stop
+     'tstop' arguments; the set command is convenient way to fix a stop
      note that is mistaken or incomplete.
 
-`show trace-stop-notes'
+'show trace-stop-notes'
      Show the trace run's stop notes.
 
-
 
 File: gdb.info,  Node: Tracepoint Restrictions,  Prev: Starting and Stopping Trace Experiments,  Up: Set Tracepoints
 
@@ -4118,14 +4404,14 @@ may run into additional difficulties not
      accessors), and therefore cannot be collected either.
 
    * Collection of local variables, either individually or in bulk with
-     `$locals' or `$args', during `while-stepping' may behave
+     '$locals' or '$args', during 'while-stepping' may behave
      erratically.  The stepping action may enter a new scope (for
      instance by stepping into a function), or the location of the
      variable may change (for instance it is loaded into a register).
      The tracepoint data recorded uses the location information for the
      variables that is correct for the tracepoint location.  When the
      tracepoint is created, it is not possible, in general, to determine
-     where the steps of a `while-stepping' sequence will advance the
+     where the steps of a 'while-stepping' sequence will advance the
      program--particularly if a conditional branch is stepped.
 
    * Collection of an incompletely-initialized or partially-destroyed
@@ -4138,51 +4424,49 @@ may run into additional difficulties not
      does not automatically collect the string.  You need to explicitly
      dereference the pointer and provide size information if you want to
      collect not only the pointer, but the memory pointed to.  For
-     example, `*ptr@50' can be used to collect the 50 element array
-     pointed to by `ptr'.
+     example, '*ptr@50' can be used to collect the 50 element array
+     pointed to by 'ptr'.
 
    * It is not possible to collect a complete stack backtrace at a
      tracepoint.  Instead, you may collect the registers and a few
      hundred bytes from the stack pointer with something like
-     `*(unsigned char *)$esp@300' (adjust to use the name of the actual
+     '*(unsigned char *)$esp@300' (adjust to use the name of the actual
      stack pointer register on your target architecture, and the amount
-     of stack you wish to capture).  Then the `backtrace' command will
+     of stack you wish to capture).  Then the 'backtrace' command will
      show a partial backtrace when using a trace frame.  The number of
      stack frames that can be examined depends on the sizes of the
-     frames in the collected stack.  Note that if you ask for a block
-     so large that it goes past the bottom of the stack, the target
-     agent may report an error trying to read from an invalid address.
+     frames in the collected stack.  Note that if you ask for a block so
+     large that it goes past the bottom of the stack, the target agent
+     may report an error trying to read from an invalid address.
 
-   * If you do not collect registers at a tracepoint, GDB can infer
-     that the value of `$pc' must be the same as the address of the
+   * If you do not collect registers at a tracepoint, GDB can infer that
+     the value of '$pc' must be the same as the address of the
      tracepoint and use that when you are looking at a trace frame for
      that tracepoint.  However, this cannot work if the tracepoint has
      multiple locations (for instance if it was set in a function that
-     was inlined), or if it has a `while-stepping' loop.  In those cases
-     GDB will warn you that it can't infer `$pc', and default it to
+     was inlined), or if it has a 'while-stepping' loop.  In those cases
+     GDB will warn you that it can't infer '$pc', and default it to
      zero.
 
-
 
 File: gdb.info,  Node: Analyze Collected Data,  Next: Tracepoint Variables,  Prev: Set Tracepoints,  Up: Tracepoints
 
 13.2 Using the Collected Data
 =============================
 
-After the tracepoint experiment ends, you use GDB commands for
-examining the trace data.  The basic idea is that each tracepoint
-collects a trace "snapshot" every time it is hit and another snapshot
-every time it single-steps.  All these snapshots are consecutively
-numbered from zero and go into a buffer, and you can examine them
-later.  The way you examine them is to "focus" on a specific trace
-snapshot.  When the remote stub is focused on a trace snapshot, it will
-respond to all GDB requests for memory and registers by reading from
-the buffer which belongs to that snapshot, rather than from _real_
-memory or registers of the program being debugged.  This means that
-*all* GDB commands (`print', `info registers', `backtrace', etc.) will
-behave as if we were currently debugging the program state as it was
-when the tracepoint occurred.  Any requests for data that are not in
-the buffer will fail.
+After the tracepoint experiment ends, you use GDB commands for examining
+the trace data.  The basic idea is that each tracepoint collects a trace
+"snapshot" every time it is hit and another snapshot every time it
+single-steps.  All these snapshots are consecutively numbered from zero
+and go into a buffer, and you can examine them later.  The way you
+examine them is to "focus" on a specific trace snapshot.  When the
+remote stub is focused on a trace snapshot, it will respond to all GDB
+requests for memory and registers by reading from the buffer which
+belongs to that snapshot, rather than from _real_ memory or registers of
+the program being debugged.  This means that *all* GDB commands
+('print', 'info registers', 'backtrace', etc.)  will behave as if we
+were currently debugging the program state as it was when the tracepoint
+occurred.  Any requests for data that are not in the buffer will fail.
 
 * Menu:
 
@@ -4193,80 +4477,81 @@ the buffer will fail.
 
 File: gdb.info,  Node: tfind,  Next: tdump,  Up: Analyze Collected Data
 
-13.2.1 `tfind N'
+13.2.1 'tfind N'
 ----------------
 
 The basic command for selecting a trace snapshot from the buffer is
-`tfind N', which finds trace snapshot number N, counting from zero.  If
+'tfind N', which finds trace snapshot number N, counting from zero.  If
 no argument N is given, the next snapshot is selected.
 
-   Here are the various forms of using the `tfind' command.
+   Here are the various forms of using the 'tfind' command.
 
-`tfind start'
+'tfind start'
      Find the first snapshot in the buffer.  This is a synonym for
-     `tfind 0' (since 0 is the number of the first snapshot).
+     'tfind 0' (since 0 is the number of the first snapshot).
 
-`tfind none'
+'tfind none'
      Stop debugging trace snapshots, resume _live_ debugging.
 
-`tfind end'
-     Same as `tfind none'.
+'tfind end'
+     Same as 'tfind none'.
 
-`tfind'
-     No argument means find the next trace snapshot.
+'tfind'
+     No argument means find the next trace snapshot or find the first
+     one if no trace snapshot is selected.
 
-`tfind -'
+'tfind -'
      Find the previous trace snapshot before the current one.  This
      permits retracing earlier steps.
 
-`tfind tracepoint NUM'
+'tfind tracepoint NUM'
      Find the next snapshot associated with tracepoint NUM.  Search
      proceeds forward from the last examined trace snapshot.  If no
      argument NUM is given, it means find the next snapshot collected
      for the same tracepoint as the current snapshot.
 
-`tfind pc ADDR'
+'tfind pc ADDR'
      Find the next snapshot associated with the value ADDR of the
      program counter.  Search proceeds forward from the last examined
      trace snapshot.  If no argument ADDR is given, it means find the
      next snapshot with the same value of PC as the current snapshot.
 
-`tfind outside ADDR1, ADDR2'
+'tfind outside ADDR1, ADDR2'
      Find the next snapshot whose PC is outside the given range of
      addresses (exclusive).
 
-`tfind range ADDR1, ADDR2'
+'tfind range ADDR1, ADDR2'
      Find the next snapshot whose PC is between ADDR1 and ADDR2
      (inclusive).
 
-`tfind line [FILE:]N'
+'tfind line [FILE:]N'
      Find the next snapshot associated with the source line N.  If the
      optional argument FILE is given, refer to line N in that source
      file.  Search proceeds forward from the last examined trace
      snapshot.  If no argument N is given, it means find the next line
-     other than the one currently being examined; thus saying `tfind
+     other than the one currently being examined; thus saying 'tfind
      line' repeatedly can appear to have the same effect as stepping
      from line to line in a _live_ debugging session.
 
-   The default arguments for the `tfind' commands are specifically
+   The default arguments for the 'tfind' commands are specifically
 designed to make it easy to scan through the trace buffer.  For
-instance, `tfind' with no argument selects the next trace snapshot, and
-`tfind -' with no argument selects the previous trace snapshot.  So, by
-giving one `tfind' command, and then simply hitting <RET> repeatedly
-you can examine all the trace snapshots in order.  Or, by saying `tfind
--' and then hitting <RET> repeatedly you can examine the snapshots in
-reverse order.  The `tfind line' command with no argument selects the
-snapshot for the next source line executed.  The `tfind pc' command with
-no argument selects the next snapshot with the same program counter
-(PC) as the current frame.  The `tfind tracepoint' command with no
-argument selects the next trace snapshot collected by the same
-tracepoint as the current one.
+instance, 'tfind' with no argument selects the next trace snapshot, and
+'tfind -' with no argument selects the previous trace snapshot.  So, by
+giving one 'tfind' command, and then simply hitting <RET> repeatedly you
+can examine all the trace snapshots in order.  Or, by saying 'tfind -'
+and then hitting <RET> repeatedly you can examine the snapshots in
+reverse order.  The 'tfind line' command with no argument selects the
+snapshot for the next source line executed.  The 'tfind pc' command with
+no argument selects the next snapshot with the same program counter (PC)
+as the current frame.  The 'tfind tracepoint' command with no argument
+selects the next trace snapshot collected by the same tracepoint as the
+current one.
 
    In addition to letting you scan through the trace buffer manually,
 these commands make it easy to construct GDB scripts that scan through
 the trace buffer and print out whatever collected data you are
-interested in.  Thus, if we want to examine the PC, FP, and SP
-registers from each trace frame in the buffer, we can say this:
+interested in.  Thus, if we want to examine the PC, FP, and SP registers
+from each trace frame in the buffer, we can say this:
 
      (gdb) tfind start
      (gdb) while ($trace_frame != -1)
@@ -4287,8 +4572,8 @@ registers from each trace frame in the b
      Frame 9, PC = 0020DC8E, SP = 0030BF18, FP = 0030BF44
      Frame 10, PC = 00203F6C, SP = 0030BE3C, FP = 0030BF14
 
-   Or, if we want to examine the variable `X' at each source line in
-the buffer:
+   Or, if we want to examine the variable 'X' at each source line in the
+buffer:
 
      (gdb) tfind start
      (gdb) while ($trace_frame != -1)
@@ -4303,7 +4588,7 @@ the buffer:
 
 File: gdb.info,  Node: tdump,  Next: save tracepoints,  Prev: tfind,  Up: Analyze Collected Data
 
-13.2.2 `tdump'
+13.2.2 'tdump'
 --------------
 
 This command takes no arguments.  It prints all the data collected at
@@ -4356,17 +4641,17 @@ the current trace snapshot.
 
      (gdb)
 
-   `tdump' works by scanning the tracepoint's current collection
-actions and printing the value of each expression listed.  So `tdump'
-can fail, if after a run, you change the tracepoint's actions to
-mention variables that were not collected during the run.
+   'tdump' works by scanning the tracepoint's current collection actions
+and printing the value of each expression listed.  So 'tdump' can fail,
+if after a run, you change the tracepoint's actions to mention variables
+that were not collected during the run.
 
-   Also, for tracepoints with `while-stepping' loops, `tdump' uses the
-collected value of `$pc' to distinguish between trace frames that were
+   Also, for tracepoints with 'while-stepping' loops, 'tdump' uses the
+collected value of '$pc' to distinguish between trace frames that were
 collected at the tracepoint hit, and frames that were collected while
 stepping.  This allows it to correctly choose whether to display the
 basic list of collections, or the collections from the body of the
-while-stepping loop.  However, if `$pc' was not collected, then `tdump'
+while-stepping loop.  However, if '$pc' was not collected, then 'tdump'
 will always attempt to dump using the basic collection list, and may
 fail if a while-stepping frame does not include all the same data that
 is collected at the tracepoint hit.
@@ -4374,14 +4659,14 @@ is collected at the tracepoint hit.
 
 File: gdb.info,  Node: save tracepoints,  Prev: tdump,  Up: Analyze Collected Data
 
-13.2.3 `save tracepoints FILENAME'
+13.2.3 'save tracepoints FILENAME'
 ----------------------------------
 
 This command saves all current tracepoint definitions together with
-their actions and passcounts, into a file `FILENAME' suitable for use
-in a later debugging session.  To read the saved tracepoint
-definitions, use the `source' command (*note Command Files::).  The
-`save-tracepoints' command is a deprecated alias for `save tracepoints'
+their actions and passcounts, into a file 'FILENAME' suitable for use in
+a later debugging session.  To read the saved tracepoint definitions,
+use the 'source' command (*note Command Files::).  The
+'save-tracepoints' command is a deprecated alias for 'save tracepoints'
 
 
 File: gdb.info,  Node: Tracepoint Variables,  Next: Trace Files,  Prev: Analyze Collected Data,  Up: Tracepoints
@@ -4389,24 +4674,24 @@ File: gdb.info,  Node: Tracepoint Variab
 13.3 Convenience Variables for Tracepoints
 ==========================================
 
-`(int) $trace_frame'
+'(int) $trace_frame'
      The current trace snapshot (a.k.a. "frame") number, or -1 if no
      snapshot is selected.
 
-`(int) $tracepoint'
+'(int) $tracepoint'
      The tracepoint for the current trace snapshot.
 
-`(int) $trace_line'
+'(int) $trace_line'
      The line number for the current trace snapshot.
 
-`(char []) $trace_file'
+'(char []) $trace_file'
      The source file for the current trace snapshot.
 
-`(char []) $trace_func'
-     The name of the function containing `$tracepoint'.
+'(char []) $trace_func'
+     The name of the function containing '$tracepoint'.
 
-   Note: `$trace_file' is not suitable for use in `printf', use
-`output' instead.
+   Note: '$trace_file' is not suitable for use in 'printf', use 'output'
+instead.
 
    Here's a simple example of using these convenience variables for
 stepping through all the trace snapshots and printing some of their
@@ -4431,30 +4716,30 @@ In some situations, the target running a
 be available; perhaps it crashed, or the hardware was needed for a
 different activity.  To handle these cases, you can arrange to dump the
 trace data into a file, and later use that file as a source of trace
-data, via the `target tfile' command.
+data, via the 'target tfile' command.
 
-`tsave [ -r ] FILENAME'
-`tsave [-ctf] DIRNAME'
+'tsave [ -r ] FILENAME'
+'tsave [-ctf] DIRNAME'
      Save the trace data to FILENAME.  By default, this command assumes
      that FILENAME refers to the host filesystem, so if necessary GDB
      will copy raw trace data up from the target and then save it.  If
      the target supports it, you can also supply the optional argument
-     `-r' ("remote") to direct the target to save the data directly
-     into FILENAME in its own filesystem, which may be more efficient
-     if the trace buffer is very large.  (Note, however, that `target
-     tfile' can only read from files accessible to the host.)  By
-     default, this command will save trace frame in tfile format.  You
-     can supply the optional argument `-ctf' to save date in CTF
-     format.  The "Common Trace Format" (CTF) is proposed as a trace
-     format that can be shared by multiple debugging and tracing tools.
-     Please go to <http://www.efficios.com/ctf> to get more information.
+     '-r' ("remote") to direct the target to save the data directly into
+     FILENAME in its own filesystem, which may be more efficient if the
+     trace buffer is very large.  (Note, however, that 'target tfile'
+     can only read from files accessible to the host.)  By default, this
+     command will save trace frame in tfile format.  You can supply the
+     optional argument '-ctf' to save data in CTF format.  The "Common
+     Trace Format" (CTF) is proposed as a trace format that can be
+     shared by multiple debugging and tracing tools.  Please go to
+     'http://www.efficios.com/ctf' to get more information.
 
-`target tfile FILENAME'
-`target ctf DIRNAME'
+'target tfile FILENAME'
+'target ctf DIRNAME'
      Use the file named FILENAME or directory named DIRNAME as a source
      of trace data.  Commands that examine data work as they do with a
      live target, but it is not possible to run any new trace
-     experiments.  `tstatus' will report the state of the trace run at
+     experiments.  'tstatus' will report the state of the trace run at
      the moment the data was saved, as well as the current trace frame
      you are examining.  Both FILENAME and DIRNAME must be on a
      filesystem accessible to the host.
@@ -4473,7 +4758,6 @@ data, via the `target tfile' command.
           (gdb) p b
           $1 = 1
 
-
 
 File: gdb.info,  Node: Overlays,  Next: Languages,  Prev: Tracepoints,  Up: Top
 
@@ -4544,31 +4828,29 @@ there.
 
    The diagram (*note A code overlay::) shows a system with separate
 data and instruction address spaces.  To map an overlay, the program
-copies its code from the larger address space to the instruction
-address space.  Since the overlays shown here all use the same mapped
-address, only one may be mapped at a time.  For a system with a single
-address space for data and instructions, the diagram would be similar,
-except that the program variables and heap would share an address space
-with the main program and the overlay area.
+copies its code from the larger address space to the instruction address
+space.  Since the overlays shown here all use the same mapped address,
+only one may be mapped at a time.  For a system with a single address
+space for data and instructions, the diagram would be similar, except
+that the program variables and heap would share an address space with
+the main program and the overlay area.
 
-   An overlay loaded into instruction memory and ready for use is
-called a "mapped" overlay; its "mapped address" is its address in the
+   An overlay loaded into instruction memory and ready for use is called
+a "mapped" overlay; its "mapped address" is its address in the
 instruction memory.  An overlay not present (or only partially present)
 in instruction memory is called "unmapped"; its "load address" is its
 address in the larger memory.  The mapped address is also called the
 "virtual memory address", or "VMA"; the load address is also called the
 "load memory address", or "LMA".
 
-   Unfortunately, overlays are not a completely transparent way to
-adapt a program to limited instruction memory.  They introduce a new
-set of global constraints you must keep in mind as you design your
-program:
+   Unfortunately, overlays are not a completely transparent way to adapt
+a program to limited instruction memory.  They introduce a new set of
+global constraints you must keep in mind as you design your program:
 
    * Before calling or returning to a function in an overlay, your
-     program must make sure that overlay is actually mapped.
-     Otherwise, the call or return will transfer control to the right
-     address, but in the wrong overlay, and your program will probably
-     crash.
+     program must make sure that overlay is actually mapped.  Otherwise,
+     the call or return will transfer control to the right address, but
+     in the wrong overlay, and your program will probably crash.
 
    * If the process of mapping an overlay is expensive on your system,
      you will need to choose your overlays carefully to minimize their
@@ -4579,14 +4861,12 @@ program:
      not its mapped address.  However, each overlay's instructions must
      be relocated and its symbols defined as if the overlay were at its
      mapped address.  You can use GNU linker scripts to specify
-     different load and relocation addresses for pieces of your
-     program; see *note Overlay Description: (ld.info)Overlay
-     Description.
-
-   * The procedure for loading executable files onto your system must
-     be able to load their contents into the larger address space as
-     well as the instruction and data spaces.
+     different load and relocation addresses for pieces of your program;
+     see *note (ld.info)Overlay Description::.
 
+   * The procedure for loading executable files onto your system must be
+     able to load their contents into the larger address space as well
+     as the instruction and data spaces.
 
    The overlay system described above is rather simple, and could be
 improved in many ways:
@@ -4609,7 +4889,6 @@ improved in many ways:
      address before you can copy a different data overlay into the same
      mapped area.
 
-
 
 File: gdb.info,  Node: Overlay Commands,  Next: Automatic Overlay Debugging,  Prev: How Overlays Work,  Up: Overlays
 
@@ -4623,73 +4902,71 @@ mapped and load addresses.  Identifying 
 GDB to determine the appropriate address of a function or variable,
 depending on whether the overlay is mapped or not.
 
-   GDB's overlay commands all start with the word `overlay'; you can
-abbreviate this as `ov' or `ovly'.  The commands are:
+   GDB's overlay commands all start with the word 'overlay'; you can
+abbreviate this as 'ov' or 'ovly'.  The commands are:
 
-`overlay off'
+'overlay off'
      Disable GDB's overlay support.  When overlay support is disabled,
      GDB assumes that all functions and variables are always present at
      their mapped addresses.  By default, GDB's overlay support is
      disabled.
 
-`overlay manual'
-     Enable "manual" overlay debugging.  In this mode, GDB relies on
-     you to tell it which overlays are mapped, and which are not, using
-     the `overlay map-overlay' and `overlay unmap-overlay' commands
+'overlay manual'
+     Enable "manual" overlay debugging.  In this mode, GDB relies on you
+     to tell it which overlays are mapped, and which are not, using the
+     'overlay map-overlay' and 'overlay unmap-overlay' commands
      described below.
 
-`overlay map-overlay OVERLAY'
-`overlay map OVERLAY'
+'overlay map-overlay OVERLAY'
+'overlay map OVERLAY'
      Tell GDB that OVERLAY is now mapped; OVERLAY must be the name of
-     the object file section containing the overlay.  When an overlay
-     is mapped, GDB assumes it can find the overlay's functions and
+     the object file section containing the overlay.  When an overlay is
+     mapped, GDB assumes it can find the overlay's functions and
      variables at their mapped addresses.  GDB assumes that any other
      overlays whose mapped ranges overlap that of OVERLAY are now
      unmapped.
 
-`overlay unmap-overlay OVERLAY'
-`overlay unmap OVERLAY'
-     Tell GDB that OVERLAY is no longer mapped; OVERLAY must be the
-     name of the object file section containing the overlay.  When an
-     overlay is unmapped, GDB assumes it can find the overlay's
-     functions and variables at their load addresses.
-
-`overlay auto'
-     Enable "automatic" overlay debugging.  In this mode, GDB consults
-     a data structure the overlay manager maintains in the inferior to
-     see which overlays are mapped.  For details, see *note Automatic
+'overlay unmap-overlay OVERLAY'
+'overlay unmap OVERLAY'
+     Tell GDB that OVERLAY is no longer mapped; OVERLAY must be the name
+     of the object file section containing the overlay.  When an overlay
+     is unmapped, GDB assumes it can find the overlay's functions and
+     variables at their load addresses.
+
+'overlay auto'
+     Enable "automatic" overlay debugging.  In this mode, GDB consults a
+     data structure the overlay manager maintains in the inferior to see
+     which overlays are mapped.  For details, see *note Automatic
      Overlay Debugging::.
 
-`overlay load-target'
-`overlay load'
+'overlay load-target'
+'overlay load'
      Re-read the overlay table from the inferior.  Normally, GDB
      re-reads the table GDB automatically each time the inferior stops,
      so this command should only be necessary if you have changed the
      overlay mapping yourself using GDB.  This command is only useful
      when using automatic overlay debugging.
 
-`overlay list-overlays'
-`overlay list'
+'overlay list-overlays'
+'overlay list'
      Display a list of the overlays currently mapped, along with their
      mapped addresses, load addresses, and sizes.
 
-
-   Normally, when GDB prints a code address, it includes the name of
-the function the address falls in:
+   Normally, when GDB prints a code address, it includes the name of the
+function the address falls in:
 
      (gdb) print main
      $3 = {int ()} 0x11a0 <main>
-   When overlay debugging is enabled, GDB recognizes code in unmapped
+When overlay debugging is enabled, GDB recognizes code in unmapped
 overlays, and prints the names of unmapped functions with asterisks
-around them.  For example, if `foo' is a function in an unmapped
+around them.  For example, if 'foo' is a function in an unmapped
 overlay, GDB prints it this way:
 
      (gdb) overlay list
      No sections are mapped.
      (gdb) print foo
      $5 = {int (int)} 0x100000 <*foo*>
-   When `foo''s overlay is mapped, GDB prints the function's name
-normally:
+When 'foo''s overlay is mapped, GDB prints the function's name normally:
 
      (gdb) overlay list
      Section .ov.foo.text, loaded at 0x100000 - 0x100034,
@@ -4698,18 +4975,17 @@ normally:
      $6 = {int (int)} 0x1016 <foo>
 
    When overlay debugging is enabled, GDB can find the correct address
-for functions and variables in an overlay, whether or not the overlay
-is mapped.  This allows most GDB commands, like `break' and
-`disassemble', to work normally, even on unmapped code.  However, GDB's
-breakpoint support has some limitations:
+for functions and variables in an overlay, whether or not the overlay is
+mapped.  This allows most GDB commands, like 'break' and 'disassemble',
+to work normally, even on unmapped code.  However, GDB's breakpoint
+support has some limitations:
 
    * You can set breakpoints in functions in unmapped overlays, as long
      as GDB can write to the overlay at its load address.
-
-   * GDB can not set hardware or simulator-based breakpoints in
-     unmapped overlays.  However, if you set a breakpoint at the end of
-     your overlay manager (and tell GDB which overlays are now mapped,
-     if you are using manual overlay management), GDB will re-set its
+   * GDB can not set hardware or simulator-based breakpoints in unmapped
+     overlays.  However, if you set a breakpoint at the end of your
+     overlay manager (and tell GDB which overlays are now mapped, if you
+     are using manual overlay management), GDB will re-set its
      breakpoints properly.
 
 
@@ -4718,17 +4994,16 @@ File: gdb.info,  Node: Automatic Overlay
 14.3 Automatic Overlay Debugging
 ================================
 
-GDB can automatically track which overlays are mapped and which are
-not, given some simple co-operation from the overlay manager in the
-inferior.  If you enable automatic overlay debugging with the `overlay
-auto' command (*note Overlay Commands::), GDB looks in the inferior's
-memory for certain variables describing the current state of the
-overlays.
+GDB can automatically track which overlays are mapped and which are not,
+given some simple co-operation from the overlay manager in the inferior.
+If you enable automatic overlay debugging with the 'overlay auto'
+command (*note Overlay Commands::), GDB looks in the inferior's memory
+for certain variables describing the current state of the overlays.
 
    Here are the variables your overlay manager must define to support
 GDB's automatic overlay debugging:
 
-`_ovly_table':
+'_ovly_table':
      This variable must be an array of the following structures:
 
           struct
@@ -4747,24 +5022,23 @@ GDB's automatic overlay debugging:
             unsigned long mapped;
           }
 
-`_novlys':
+'_novlys':
      This variable must be a four-byte signed integer, holding the total
-     number of elements in `_ovly_table'.
-
+     number of elements in '_ovly_table'.
 
    To decide whether a particular overlay is mapped or not, GDB looks
-for an entry in `_ovly_table' whose `vma' and `lma' members equal the
+for an entry in '_ovly_table' whose 'vma' and 'lma' members equal the
 VMA and LMA of the overlay's section in the executable file.  When GDB
-finds a matching entry, it consults the entry's `mapped' member to
+finds a matching entry, it consults the entry's 'mapped' member to
 determine whether the overlay is currently mapped.
 
    In addition, your overlay manager may define a function called
-`_ovly_debug_event'.  If this function is defined, GDB will silently
-set a breakpoint there.  If the overlay manager then calls this
-function whenever it has changed the overlay table, this will enable
-GDB to accurately keep track of which overlays are in program memory,
-and update any breakpoints that may be set in overlays.  This will
-allow breakpoints to work even if the overlays are kept in ROM or other
+'_ovly_debug_event'.  If this function is defined, GDB will silently set
+a breakpoint there.  If the overlay manager then calls this function
+whenever it has changed the overlay table, this will enable GDB to
+accurately keep track of which overlays are in program memory, and
+update any breakpoints that may be set in overlays.  This will allow
+breakpoints to work even if the overlays are kept in ROM or other
 non-writable memory while they are not being executed.
 
 
@@ -4775,35 +5049,32 @@ File: gdb.info,  Node: Overlay Sample Pr
 
 When linking a program which uses overlays, you must place the overlays
 at their load addresses, while relocating them to run at their mapped
-addresses.  To do this, you must write a linker script (*note Overlay
-Description: (ld.info)Overlay Description.).  Unfortunately, since
-linker scripts are specific to a particular host system, target
-architecture, and target memory layout, this manual cannot provide
-portable sample code demonstrating GDB's overlay support.
+addresses.  To do this, you must write a linker script (*note
+(ld.info)Overlay Description::).  Unfortunately, since linker scripts
+are specific to a particular host system, target architecture, and
+target memory layout, this manual cannot provide portable sample code
+demonstrating GDB's overlay support.
 
    However, the GDB source distribution does contain an overlaid
 program, with linker scripts for a few systems, as part of its test
 suite.  The program consists of the following files from
-`gdb/testsuite/gdb.base':
+'gdb/testsuite/gdb.base':
 
-`overlays.c'
+'overlays.c'
      The main program file.
+'ovlymgr.c'
+     A simple overlay manager, used by 'overlays.c'.
+'foo.c'
+'bar.c'
+'baz.c'
+'grbx.c'
+     Overlay modules, loaded and used by 'overlays.c'.
+'d10v.ld'
+'m32r.ld'
+     Linker scripts for linking the test program on the 'd10v-elf' and
+     'm32r-elf' targets.
 
-`ovlymgr.c'
-     A simple overlay manager, used by `overlays.c'.
-
-`foo.c'
-`bar.c'
-`baz.c'
-`grbx.c'
-     Overlay modules, loaded and used by `overlays.c'.
-
-`d10v.ld'
-`m32r.ld'
-     Linker scripts for linking the test program on the `d10v-elf' and
-     `m32r-elf' targets.
-
-   You can build the test program using the `d10v-elf' GCC
+   You can build the test program using the 'd10v-elf' GCC
 cross-compiler like this:
 
      $ d10v-elf-gcc -g -c overlays.c
@@ -4817,7 +5088,7 @@ cross-compiler like this:
 
    The build process is identical for any other architecture, except
 that you must substitute the appropriate compiler and linker script for
-the target system for `d10v-elf-gcc' and `d10v.ld'.
+the target system for 'd10v-elf-gcc' and 'd10v.ld'.
 
 
 File: gdb.info,  Node: Languages,  Next: Symbols,  Prev: Overlays,  Up: Top
@@ -4827,10 +5098,10 @@ File: gdb.info,  Node: Languages,  Next:
 
 Although programming languages generally have common aspects, they are
 rarely expressed in the same manner.  For instance, in ANSI C,
-dereferencing a pointer `p' is accomplished by `*p', but in Modula-2,
-it is accomplished by `p^'.  Values can also be represented (and
-displayed) differently.  Hex numbers in C appear as `0x1ae', while in
-Modula-2 they appear as `1AEH'.
+dereferencing a pointer 'p' is accomplished by '*p', but in Modula-2, it
+is accomplished by 'p^'.  Values can also be represented (and displayed)
+differently.  Hex numbers in C appear as '0x1ae', while in Modula-2 they
+appear as '1AEH'.
 
    Language-specific information is built into GDB for some languages,
 allowing you to express operations like the above in your program's
@@ -4853,29 +5124,28 @@ File: gdb.info,  Node: Setting,  Next: S
 =======================================
 
 There are two ways to control the working language--either have GDB set
-it automatically, or select it manually yourself.  You can use the `set
+it automatically, or select it manually yourself.  You can use the 'set
 language' command for either purpose.  On startup, GDB defaults to
 setting the language automatically.  The working language is used to
 determine how expressions you type are interpreted, how values are
 printed, etc.
 
-   In addition to the working language, every source file that GDB
-knows about has its own working language.  For some object file
-formats, the compiler might indicate which language a particular source
-file is in.  However, most of the time GDB infers the language from the
-name of the file.  The language of a source file controls whether C++
-names are demangled--this way `backtrace' can show each frame
-appropriately for its own language.  There is no way to set the
-language of a source file from within GDB, but you can set the language
-associated with a filename extension.  *Note Displaying the Language:
-Show.
+   In addition to the working language, every source file that GDB knows
+about has its own working language.  For some object file formats, the
+compiler might indicate which language a particular source file is in.
+However, most of the time GDB infers the language from the name of the
+file.  The language of a source file controls whether C++ names are
+demangled--this way 'backtrace' can show each frame appropriately for
+its own language.  There is no way to set the language of a source file
+from within GDB, but you can set the language associated with a filename
+extension.  *Note Displaying the Language: Show.
 
    This is most commonly a problem when you use a program, such as
-`cfront' or `f2c', that generates C but is written in another language.
-In that case, make the program use `#line' directives in its C output;
+'cfront' or 'f2c', that generates C but is written in another language.
+In that case, make the program use '#line' directives in its C output;
 that way GDB will know the correct language of the source code of the
-original program, and will display that source code, not the generated
-C code.
+original program, and will display that source code, not the generated C
+code.
 
 * Menu:
 
@@ -4892,38 +5162,38 @@ File: gdb.info,  Node: Filenames,  Next:
 If a source file name ends in one of the following extensions, then GDB
 infers that its language is the one indicated.
 
-`.ada'
-`.ads'
-`.adb'
-`.a'
+'.ada'
+'.ads'
+'.adb'
+'.a'
      Ada source file.
 
-`.c'
+'.c'
      C source file
 
-`.C'
-`.cc'
-`.cp'
-`.cpp'
-`.cxx'
-`.c++'
+'.C'
+'.cc'
+'.cp'
+'.cpp'
+'.cxx'
+'.c++'
      C++ source file
 
-`.d'
+'.d'
      D source file
 
-`.m'
+'.m'
      Objective-C source file
 
-`.f'
-`.F'
+'.f'
+'.F'
      Fortran source file
 
-`.mod'
+'.mod'
      Modula-2 source file
 
-`.s'
-`.S'
+'.s'
+'.S'
      Assembler source file.  This actually behaves almost like C, but
      GDB does not skip over function prologues when stepping.
 
@@ -4940,23 +5210,23 @@ If you allow GDB to set the language aut
 interpreted the same way in your debugging session and your program.
 
    If you wish, you may set the language manually.  To do this, issue
-the command `set language LANG', where LANG is the name of a language,
-such as `c' or `modula-2'.  For a list of the supported languages, type
-`set language'.
+the command 'set language LANG', where LANG is the name of a language,
+such as 'c' or 'modula-2'.  For a list of the supported languages, type
+'set language'.
 
    Setting the language manually prevents GDB from updating the working
 language automatically.  This can lead to confusion if you try to debug
 a program when the working language is not the same as the source
 language, when an expression is acceptable to both languages--but means
-different things.  For instance, if the current source file were
-written in C, and GDB was parsing Modula-2, a command such as:
+different things.  For instance, if the current source file were written
+in C, and GDB was parsing Modula-2, a command such as:
 
      print a = b + c
 
-might not have the effect you intended.  In C, this means to add `b'
-and `c' and place the result in `a'.  The result printed would be the
-value of `a'.  In Modula-2, this means to compare `a' to the result of
-`b+c', yielding a `BOOLEAN' value.
+might not have the effect you intended.  In C, this means to add 'b' and
+'c' and place the result in 'a'.  The result printed would be the value
+of 'a'.  In Modula-2, this means to compare 'a' to the result of 'b+c',
+yielding a 'BOOLEAN' value.
 
 
 File: gdb.info,  Node: Automatically,  Prev: Manually,  Up: Setting
@@ -4964,19 +5234,19 @@ File: gdb.info,  Node: Automatically,  P
 15.1.3 Having GDB Infer the Source Language
 -------------------------------------------
 
-To have GDB set the working language automatically, use `set language
-local' or `set language auto'.  GDB then infers the working language.
+To have GDB set the working language automatically, use 'set language
+local' or 'set language auto'.  GDB then infers the working language.
 That is, when your program stops in a frame (usually by encountering a
 breakpoint), GDB sets the working language to the language recorded for
 the function in that frame.  If the language for a frame is unknown
 (that is, if the function or block corresponding to the frame was
-defined in a source file that does not have a recognized extension),
-the current working language is not changed, and GDB issues a warning.
+defined in a source file that does not have a recognized extension), the
+current working language is not changed, and GDB issues a warning.
 
    This may not seem necessary for most programs, which are written
 entirely in one source language.  However, program modules and libraries
 written in one source language can be used by a main program written in
-a different source language.  Using `set language auto' in this case
+a different source language.  Using 'set language auto' in this case
 frees you from having to set the working language manually.
 
 
@@ -4988,31 +5258,31 @@ File: gdb.info,  Node: Show,  Next: Chec
 The following commands help you find out which language is the working
 language, and also what language source files were written in.
 
-`show language'
-     Display the current working language.  This is the language you
-     can use with commands such as `print' to build and compute
-     expressions that may involve variables in your program.
+'show language'
+     Display the current working language.  This is the language you can
+     use with commands such as 'print' to build and compute expressions
+     that may involve variables in your program.
 
-`info frame'
+'info frame'
      Display the source language for this frame.  This language becomes
      the working language if you use an identifier from this frame.
      *Note Information about a Frame: Frame Info, to identify the other
      information listed here.
 
-`info source'
+'info source'
      Display the source language of this source file.  *Note Examining
-     the Symbol Table: Symbols, to identify the other information
-     listed here.
+     the Symbol Table: Symbols, to identify the other information listed
+     here.
 
    In unusual circumstances, you may have source files with extensions
 not in the standard list.  You can then set the extension associated
 with a language explicitly:
 
-`set extension-language EXT LANGUAGE'
+'set extension-language EXT LANGUAGE'
      Tell GDB that source files with extension EXT are to be assumed as
      written in the source language LANGUAGE.
 
-`info extensions'
+'info extensions'
      List all the filename extensions and the associated languages.
 
 
@@ -5032,7 +5302,7 @@ errors when your program is running.
    By default GDB checks for these errors according to the rules of the
 current source language.  Although GDB does not check the statements in
 your program, it can check expressions entered directly into GDB for
-evaluation via the `print' command, for example.
+evaluation via the 'print' command, for example.
 
 * Menu:
 
@@ -5058,29 +5328,29 @@ but
      (gdb) print obj.my_method (0x1234)
      Cannot resolve method klass::my_method to any overloaded instance
 
-   The second example fails because in C++ the integer constant
-`0x1234' is not type-compatible with the pointer parameter type.
+   The second example fails because in C++ the integer constant '0x1234'
+is not type-compatible with the pointer parameter type.
 
    For the expressions you use in GDB commands, you can tell GDB to not
 enforce strict type checking or to treat any mismatches as errors and
-abandon the expression; When type checking is disabled, GDB
-successfully evaluates expressions like the second example above.
+abandon the expression; When type checking is disabled, GDB successfully
+evaluates expressions like the second example above.
 
    Even if type checking is off, there may be other reasons related to
 type that prevent GDB from evaluating an expression.  For instance, GDB
-does not know how to add an `int' and a `struct foo'.  These particular
+does not know how to add an 'int' and a 'struct foo'.  These particular
 type errors have nothing to do with the language in use and usually
 arise from expressions which make little sense to evaluate anyway.
 
    GDB provides some additional commands for controlling type checking:
 
-`set check type on'
-`set check type off'
+'set check type on'
+'set check type off'
      Set strict type checking on or off.  If any type mismatches occur
      in evaluating an expression while type checking is on, GDB prints a
      message and aborts evaluation of the expression.
 
-`show check type'
+'show check type'
      Show the current setting of type checking and whether GDB is
      enforcing strict type checking rules.
 
@@ -5104,9 +5374,9 @@ expression anyway.
    A range error can result from numerical overflow, from exceeding an
 array index bound, or when you type a constant that is not a member of
 any type.  Some languages, however, do not treat overflows as an error.
-In many implementations of C, mathematical overflow causes the result
-to "wrap around" to lower values--for example, if M is the largest
-integer value, and S is the smallest, then
+In many implementations of C, mathematical overflow causes the result to
+"wrap around" to lower values--for example, if M is the largest integer
+value, and S is the smallest, then
 
      M + 1 => S
 
@@ -5118,27 +5388,27 @@ languages.
    GDB provides some additional commands for controlling the range
 checker:
 
-`set check range auto'
+'set check range auto'
      Set range checking on or off based on the current working language.
      *Note Supported Languages: Supported Languages, for the default
      settings for each language.
 
-`set check range on'
-`set check range off'
+'set check range on'
+'set check range off'
      Set range checking on or off, overriding the default setting for
      the current working language.  A warning is issued if the setting
      does not match the language default.  If a range error occurs and
      range checking is on, then a message is printed and evaluation of
      the expression is aborted.
 
-`set check range warn'
+'set check range warn'
      Output messages when the GDB range checker detects a range error,
      but attempt to evaluate the expression anyway.  Evaluating the
      expression may still be impossible for other reasons, such as
      accessing memory that the process does not own (a typical example
      from many Unix systems).
 
-`show range'
+'show range'
      Show the current setting of the range checker, and whether or not
      it is being set automatically by GDB.
 
@@ -5148,19 +5418,19 @@ File: gdb.info,  Node: Supported Languag
 15.4 Supported Languages
 ========================
 
-GDB supports C, C++, D, Go, Objective-C, Fortran, Java, OpenCL C,
-Pascal, assembly, Modula-2, and Ada.  Some GDB features may be used in
-expressions regardless of the language you use: the GDB `@' and `::'
-operators, and the `{type}addr' construct (*note Expressions:
+GDB supports C, C++, D, Go, Objective-C, Fortran, OpenCL C, Pascal,
+Rust, assembly, Modula-2, and Ada.  Some GDB features may be used in
+expressions regardless of the language you use: the GDB '@' and '::'
+operators, and the '{type}addr' construct (*note Expressions:
 Expressions.) can be used with the constructs of any supported language.
 
    The following sections detail to what degree each source language is
-supported by GDB.  These sections are not meant to be language
-tutorials or references, but serve only as a reference guide to what the
-GDB expression parser accepts, and what input and output formats should
-look like for different languages.  There are many good books written
-on each of these languages; please look to these for a language
-reference or tutorial.
+supported by GDB.  These sections are not meant to be language tutorials
+or references, but serve only as a reference guide to what the GDB
+expression parser accepts, and what input and output formats should look
+like for different languages.  There are many good books written on each
+of these languages; please look to these for a language reference or
+tutorial.
 
 * Menu:
 
@@ -5171,6 +5441,7 @@ reference or tutorial.
 * OpenCL C::                    OpenCL C
 * Fortran::                     Fortran
 * Pascal::                      Pascal
+* Rust::                        Rust
 * Modula-2::                    Modula-2
 * Ada::                         Ada
 
@@ -5187,7 +5458,7 @@ together.
    The C++ debugging facilities are jointly implemented by the C++
 compiler and GDB.  Therefore, to debug your C++ code effectively, you
 must compile your C++ programs with a supported C++ compiler, such as
-GNU `g++', or the HP ANSI C++ compiler (`aCC').
+GNU 'g++', or the HP ANSI C++ compiler ('aCC').
 
 * Menu:
 
@@ -5207,142 +5478,140 @@ File: gdb.info,  Node: C Operators,  Nex
 ............................
 
 Operators must be defined on values of specific types.  For instance,
-`+' is defined on numbers, but not on structures.  Operators are often
+'+' is defined on numbers, but not on structures.  Operators are often
 defined on groups of types.
 
    For the purposes of C and C++, the following definitions hold:
 
-   * _Integral types_ include `int' with any of its storage-class
-     specifiers; `char'; `enum'; and, for C++, `bool'.
+   * _Integral types_ include 'int' with any of its storage-class
+     specifiers; 'char'; 'enum'; and, for C++, 'bool'.
 
-   * _Floating-point types_ include `float', `double', and `long
-     double' (if supported by the target platform).
+   * _Floating-point types_ include 'float', 'double', and 'long double'
+     (if supported by the target platform).
 
-   * _Pointer types_ include all types defined as `(TYPE *)'.
+   * _Pointer types_ include all types defined as '(TYPE *)'.
 
    * _Scalar types_ include all of the above.
 
+The following operators are supported.  They are listed here in order of
+increasing precedence:
 
-The following operators are supported.  They are listed here in order
-of increasing precedence:
-
-`,'
-     The comma or sequencing operator.  Expressions in a
-     comma-separated list are evaluated from left to right, with the
-     result of the entire expression being the last expression
-     evaluated.
+','
+     The comma or sequencing operator.  Expressions in a comma-separated
+     list are evaluated from left to right, with the result of the
+     entire expression being the last expression evaluated.
 
-`='
+'='
      Assignment.  The value of an assignment expression is the value
      assigned.  Defined on scalar types.
 
-`OP='
-     Used in an expression of the form `A OP= B', and translated to
-     `A = A OP B'.  `OP=' and `=' have the same precedence.  The
-     operator OP is any one of the operators `|', `^', `&', `<<', `>>',
-     `+', `-', `*', `/', `%'.
-
-`?:'
-     The ternary operator.  `A ? B : C' can be thought of as:  if A
-     then B else C.  The argument A should be of an integral type.
+'OP='
+     Used in an expression of the form 'A OP= B', and translated to
+     'A = A OP B'.  'OP=' and '=' have the same precedence.  The
+     operator OP is any one of the operators '|', '^', '&', '<<', '>>',
+     '+', '-', '*', '/', '%'.
+
+'?:'
+     The ternary operator.  'A ? B : C' can be thought of as: if A then
+     B else C.  The argument A should be of an integral type.
 
-`||'
+'||'
      Logical OR.  Defined on integral types.
 
-`&&'
+'&&'
      Logical AND.  Defined on integral types.
 
-`|'
+'|'
      Bitwise OR.  Defined on integral types.
 
-`^'
+'^'
      Bitwise exclusive-OR.  Defined on integral types.
 
-`&'
+'&'
      Bitwise AND.  Defined on integral types.
 
-`==, !='
+'==, !='
      Equality and inequality.  Defined on scalar types.  The value of
      these expressions is 0 for false and non-zero for true.
 
-`<, >, <=, >='
+'<, >, <=, >='
      Less than, greater than, less than or equal, greater than or equal.
      Defined on scalar types.  The value of these expressions is 0 for
      false and non-zero for true.
 
-`<<, >>'
+'<<, >>'
      left shift, and right shift.  Defined on integral types.
 
-`@'
+'@'
      The GDB "artificial array" operator (*note Expressions:
      Expressions.).
 
-`+, -'
+'+, -'
      Addition and subtraction.  Defined on integral types,
      floating-point types and pointer types.
 
-`*, /, %'
-     Multiplication, division, and modulus.  Multiplication and
-     division are defined on integral and floating-point types.
-     Modulus is defined on integral types.
+'*, /, %'
+     Multiplication, division, and modulus.  Multiplication and division
+     are defined on integral and floating-point types.  Modulus is
+     defined on integral types.
 
-`++, --'
+'++, --'
      Increment and decrement.  When appearing before a variable, the
      operation is performed before the variable is used in an
      expression; when appearing after it, the variable's value is used
      before the operation takes place.
 
-`*'
+'*'
      Pointer dereferencing.  Defined on pointer types.  Same precedence
-     as `++'.
+     as '++'.
 
-`&'
-     Address operator.  Defined on variables.  Same precedence as `++'.
+'&'
+     Address operator.  Defined on variables.  Same precedence as '++'.
 
-     For debugging C++, GDB implements a use of `&' beyond what is
-     allowed in the C++ language itself: you can use `&(&REF)' to
+     For debugging C++, GDB implements a use of '&' beyond what is
+     allowed in the C++ language itself: you can use '&(&REF)' to
      examine the address where a C++ reference variable (declared with
-     `&REF') is stored.
+     '&REF') is stored.
 
-`-'
+'-'
      Negative.  Defined on integral and floating-point types.  Same
-     precedence as `++'.
+     precedence as '++'.
 
-`!'
+'!'
      Logical negation.  Defined on integral types.  Same precedence as
-     `++'.
+     '++'.
 
-`~'
+'~'
      Bitwise complement operator.  Defined on integral types.  Same
-     precedence as `++'.
+     precedence as '++'.
 
-`., ->'
+'., ->'
      Structure member, and pointer-to-structure member.  For
-     convenience, GDB regards the two as equivalent, choosing whether
-     to dereference a pointer based on the stored type information.
-     Defined on `struct' and `union' data.
+     convenience, GDB regards the two as equivalent, choosing whether to
+     dereference a pointer based on the stored type information.
+     Defined on 'struct' and 'union' data.
 
-`.*, ->*'
+'.*, ->*'
      Dereferences of pointers to members.
 
-`[]'
-     Array indexing.  `A[I]' is defined as `*(A+I)'.  Same precedence
-     as `->'.
-
-`()'
-     Function parameter list.  Same precedence as `->'.
-
-`::'
-     C++ scope resolution operator.  Defined on `struct', `union', and
-     `class' types.
+'[]'
+     Array indexing.  'A[I]' is defined as '*(A+I)'.  Same precedence as
+     '->'.
+
+'()'
+     Function parameter list.  Same precedence as '->'.
+
+'::'
+     C++ scope resolution operator.  Defined on 'struct', 'union', and
+     'class' types.
 
-`::'
+'::'
      Doubled colons also represent the GDB scope operator (*note
-     Expressions: Expressions.).  Same precedence as `::', above.
+     Expressions: Expressions.).  Same precedence as '::', above.
 
-   If an operator is redefined in the user code, GDB usually attempts
-to invoke the redefined version instead of using the operator's
-predefined meaning.
+   If an operator is redefined in the user code, GDB usually attempts to
+invoke the redefined version instead of using the operator's predefined
+meaning.
 
 
 File: gdb.info,  Node: C Constants,  Next: C Plus Plus Expressions,  Prev: C Operators,  Up: C
@@ -5354,54 +5623,54 @@ GDB allows you to express the constants 
 ways:
 
    * Integer constants are a sequence of digits.  Octal constants are
-     specified by a leading `0' (i.e. zero), and hexadecimal constants
-     by a leading `0x' or `0X'.  Constants may also end with a letter
-     `l', specifying that the constant should be treated as a `long'
+     specified by a leading '0' (i.e. zero), and hexadecimal constants
+     by a leading '0x' or '0X'.  Constants may also end with a letter
+     'l', specifying that the constant should be treated as a 'long'
      value.
 
    * Floating point constants are a sequence of digits, followed by a
      decimal point, followed by a sequence of digits, and optionally
      followed by an exponent.  An exponent is of the form:
-     `e[[+]|-]NNN', where NNN is another sequence of digits.  The `+'
-     is optional for positive exponents.  A floating-point constant may
-     also end with a letter `f' or `F', specifying that the constant
-     should be treated as being of the `float' (as opposed to the
-     default `double') type; or with a letter `l' or `L', which
-     specifies a `long double' constant.
+     'e[[+]|-]NNN', where NNN is another sequence of digits.  The '+' is
+     optional for positive exponents.  A floating-point constant may
+     also end with a letter 'f' or 'F', specifying that the constant
+     should be treated as being of the 'float' (as opposed to the
+     default 'double') type; or with a letter 'l' or 'L', which
+     specifies a 'long double' constant.
 
    * Enumerated constants consist of enumerated identifiers, or their
      integral equivalents.
 
    * Character constants are a single character surrounded by single
-     quotes (`''), or a number--the ordinal value of the corresponding
+     quotes ('''), or a number--the ordinal value of the corresponding
      character (usually its ASCII value).  Within quotes, the single
      character may be represented by a letter or by "escape sequences",
-     which are of the form `\NNN', where NNN is the octal representation
-     of the character's ordinal value; or of the form `\X', where `X'
-     is a predefined special character--for example, `\n' for newline.
+     which are of the form '\NNN', where NNN is the octal representation
+     of the character's ordinal value; or of the form '\X', where 'X' is
+     a predefined special character--for example, '\n' for newline.
 
      Wide character constants can be written by prefixing a character
-     constant with `L', as in C.  For example, `L'x'' is the wide form
-     of `x'.  The target wide character set is used when computing the
+     constant with 'L', as in C. For example, 'L'x'' is the wide form of
+     'x'.  The target wide character set is used when computing the
      value of this constant (*note Character Sets::).
 
    * String constants are a sequence of character constants surrounded
-     by double quotes (`"').  Any valid character constant (as described
+     by double quotes ('"').  Any valid character constant (as described
      above) may appear.  Double quotes within the string must be
-     preceded by a backslash, so for instance `"a\"b'c"' is a string of
+     preceded by a backslash, so for instance '"a\"b'c"' is a string of
      five characters.
 
      Wide string constants can be written by prefixing a string constant
-     with `L', as in C.  The target wide character set is used when
+     with 'L', as in C. The target wide character set is used when
      computing the value of this constant (*note Character Sets::).
 
    * Pointer constants are an integral value.  You can also write
-     pointers to constants using the C operator `&'.
+     pointers to constants using the C operator '&'.
 
-   * Array constants are comma-separated lists surrounded by braces `{'
-     and `}'; for example, `{1,2,3}' is a three-element array of
-     integers, `{{1,2}, {3,4}, {5,6}}' is a three-by-two array, and
-     `{&"hi", &"there", &"fred"}' is a three-element array of pointers.
+   * Array constants are comma-separated lists surrounded by braces '{'
+     and '}'; for example, '{1,2,3}' is a three-element array of
+     integers, '{{1,2}, {3,4}, {5,6}}' is a three-by-two array, and
+     '{&"hi", &"there", &"fred"}' is a three-element array of pointers.
 
 
 File: gdb.info,  Node: C Plus Plus Expressions,  Next: C Defaults,  Prev: C Constants,  Up: C
@@ -5426,7 +5695,7 @@ GDB expression handling can interpret mo
   2. While a member function is active (in the selected stack frame),
      your expressions have the same namespace available as the member
      function; that is, GDB allows implicit references to the class
-     instance pointer `this' following the same rules as C++.  `using'
+     instance pointer 'this' following the same rules as C++.  'using'
      declarations in the current scope are also respected by GDB.
 
   3. You can call overloaded functions; GDB resolves the function call
@@ -5443,10 +5712,10 @@ GDB expression handling can interpret mo
      requires an exact match on the number of function arguments.
 
      Overload resolution is always performed, unless you have specified
-     `set overload-resolution off'.  *Note GDB Features for C++:
+     'set overload-resolution off'.  *Note GDB Features for C++:
      Debugging C Plus Plus.
 
-     You must specify `set overload-resolution off' in order to use an
+     You must specify 'set overload-resolution off' in order to use an
      explicit function signature to call an overloaded function, as in
           p 'foo(char,int)'('x', 13)
 
@@ -5460,14 +5729,14 @@ GDB expression handling can interpret mo
      In the parameter list shown when GDB displays a frame, the values
      of reference variables are not displayed (unlike other variables);
      this avoids clutter, since references are often used for large
-     structures.  The _address_ of a reference variable is always
-     shown, unless you have specified `set print address off'.
+     structures.  The _address_ of a reference variable is always shown,
+     unless you have specified 'set print address off'.
 
-  5. GDB supports the C++ name resolution operator `::'--your
+  5. GDB supports the C++ name resolution operator '::'--your
      expressions can use it just as expressions in your program do.
-     Since one scope may be defined in another, you can use `::'
+     Since one scope may be defined in another, you can use '::'
      repeatedly if necessary, for example in an expression like
-     `SCOPE1::SCOPE2::NAME'.  GDB also allows resolving name scope by
+     'SCOPE1::SCOPE2::NAME'.  GDB also allows resolving name scope by
      reference to source files, in both C and C++ debugging (*note
      Program Variables: Variables.).
 
@@ -5481,11 +5750,11 @@ File: gdb.info,  Node: C Defaults,  Next
 ...........................
 
 If you allow GDB to set range checking automatically, it defaults to
-`off' whenever the working language changes to C or C++.  This happens
+'off' whenever the working language changes to C or C++.  This happens
 regardless of whether you or GDB selects the working language.
 
    If you allow GDB to set the language automatically, it recognizes
-source files whose names end with `.c', `.C', or `.cc', etc, and when
+source files whose names end with '.c', '.C', or '.cc', etc, and when
 GDB enters code compiled from one of these files, it sets the working
 language to C or C++.  *Note Having GDB Infer the Source Language:
 Automatically, for further details.
@@ -5497,9 +5766,9 @@ File: gdb.info,  Node: C Checks,  Next: 
 ........................................
 
 By default, when GDB parses C or C++ expressions, strict type checking
-is used.  However, if you turn type checking off, GDB will allow
-certain non-standard conversions, such as promoting integer constants
-to pointers.
+is used.  However, if you turn type checking off, GDB will allow certain
+non-standard conversions, such as promoting integer constants to
+pointers.
 
    Range checking, if turned on, is done on mathematical operations.
 Array indices are not checked, since they are often used to index a
@@ -5511,12 +5780,12 @@ File: gdb.info,  Node: Debugging C,  Nex
 15.4.1.6 GDB and C
 ..................
 
-The `set print union' and `show print union' commands apply to the
-`union' type.  When set to `on', any `union' that is inside a `struct'
-or `class' is also printed.  Otherwise, it appears as `{...}'.
+The 'set print union' and 'show print union' commands apply to the
+'union' type.  When set to 'on', any 'union' that is inside a 'struct'
+or 'class' is also printed.  Otherwise, it appears as '{...}'.
 
-   The `@' operator aids in the debugging of dynamic arrays, formed
-with pointers and a memory allocation function.  *Note Expressions:
+   The '@' operator aids in the debugging of dynamic arrays, formed with
+pointers and a memory allocation function.  *Note Expressions:
 Expressions.
 
 
@@ -5528,57 +5797,57 @@ File: gdb.info,  Node: Debugging C Plus 
 Some GDB commands are particularly useful with C++, and some are
 designed specifically for use with C++.  Here is a summary:
 
-`breakpoint menus'
+'breakpoint menus'
      When you want a breakpoint in a function whose name is overloaded,
      GDB has the capability to display a menu of possible breakpoint
      locations to help you specify which function definition you want.
      *Note Ambiguous Expressions: Ambiguous Expressions.
 
-`rbreak REGEX'
+'rbreak REGEX'
      Setting breakpoints using regular expressions is helpful for
-     setting breakpoints on overloaded functions that are not members
-     of any special classes.  *Note Setting Breakpoints: Set Breaks.
+     setting breakpoints on overloaded functions that are not members of
+     any special classes.  *Note Setting Breakpoints: Set Breaks.
 
-`catch throw'
-`catch rethrow'
-`catch catch'
+'catch throw'
+'catch rethrow'
+'catch catch'
      Debug C++ exception handling using these commands.  *Note Setting
      Catchpoints: Set Catchpoints.
 
-`ptype TYPENAME'
+'ptype TYPENAME'
      Print inheritance relationships as well as other information for
      type TYPENAME.  *Note Examining the Symbol Table: Symbols.
 
-`info vtbl EXPRESSION.'
-     The `info vtbl' command can be used to display the virtual method
+'info vtbl EXPRESSION.'
+     The 'info vtbl' command can be used to display the virtual method
      tables of the object computed by EXPRESSION.  This shows one entry
      per virtual table; there may be multiple virtual tables when
      multiple inheritance is in use.
 
-`demangle NAME'
-     Demangle NAME.  *Note Symbols::, for a more complete description
-     of the `demangle' command.
-
-`set print demangle'
-`show print demangle'
-`set print asm-demangle'
-`show print asm-demangle'
+'demangle NAME'
+     Demangle NAME.  *Note Symbols::, for a more complete description of
+     the 'demangle' command.
+
+'set print demangle'
+'show print demangle'
+'set print asm-demangle'
+'show print asm-demangle'
      Control whether C++ symbols display in their source form, both when
      displaying code as C++ source and when displaying disassemblies.
      *Note Print Settings: Print Settings.
 
-`set print object'
-`show print object'
+'set print object'
+'show print object'
      Choose whether to print derived (actual) or declared types of
      objects.  *Note Print Settings: Print Settings.
 
-`set print vtbl'
-`show print vtbl'
+'set print vtbl'
+'show print vtbl'
      Control the format for printing virtual function tables.  *Note
-     Print Settings: Print Settings.  (The `vtbl' commands do not work
-     on programs compiled with the HP ANSI C++ compiler (`aCC').)
+     Print Settings: Print Settings.  (The 'vtbl' commands do not work
+     on programs compiled with the HP ANSI C++ compiler ('aCC').)
 
-`set overload-resolution on'
+'set overload-resolution on'
      Enable overload resolution for C++ expression evaluation.  The
      default is on.  For overloaded functions, GDB evaluates the
      arguments and searches for a function whose signature matches the
@@ -5586,7 +5855,7 @@ designed specifically for use with C++. 
      C++ Expressions: C Plus Plus Expressions, for details).  If it
      cannot find a match, it emits a message.
 
-`set overload-resolution off'
+'set overload-resolution off'
      Disable overload resolution for C++ expression evaluation.  For
      overloaded functions that are not class member functions, GDB
      chooses the first function of the specified name that it finds in
@@ -5595,13 +5864,13 @@ designed specifically for use with C++. 
      GDB searches for a function whose signature _exactly_ matches the
      argument types.
 
-`show overload-resolution'
+'show overload-resolution'
      Show the current setting of overload resolution.
 
-`Overloaded symbol names'
+'Overloaded symbol names'
      You can specify a particular definition of an overloaded symbol,
      using the same notation that is used to declare such symbols in
-     C++: type `SYMBOL(TYPES)' rather than just SYMBOL.  You can also
+     C++: type 'SYMBOL(TYPES)' rather than just SYMBOL.  You can also
      use the GDB command-line word completion facilities to list the
      available choices, or to finish the type list for you.  *Note
      Command Completion: Completion, for details on how to do this.
@@ -5614,7 +5883,7 @@ File: gdb.info,  Node: Decimal Floating 
 
 GDB can examine, set and perform computations with numbers in decimal
 floating point format, which in the C language correspond to the
-`_Decimal32', `_Decimal64' and `_Decimal128' types as specified by the
+'_Decimal32', '_Decimal64' and '_Decimal128' types as specified by the
 extension to support decimal floating-point arithmetic.
 
    There are two encodings in use, depending on the architecture: BID
@@ -5622,18 +5891,17 @@ extension to support decimal floating-po
 Decimal) for PowerPC and S/390.  GDB will use the appropriate encoding
 for the configured target.
 
-   Because of a limitation in `libdecnumber', the library used by GDB
-to manipulate decimal floating point numbers, it is not possible to
-convert (using a cast, for example) integers wider than 32-bit to
-decimal float.
+   Because of a limitation in 'libdecnumber', the library used by GDB to
+manipulate decimal floating point numbers, it is not possible to convert
+(using a cast, for example) integers wider than 32-bit to decimal float.
 
    In addition, in order to imitate GDB's behaviour with binary floating
 point computations, error checking in decimal float operations ignores
 underflow, overflow and divide by zero exceptions.
 
    In the PowerPC architecture, GDB provides a set of pseudo-registers
-to inspect `_Decimal128' values stored in floating point registers.
-See *note PowerPC: PowerPC. for more details.
+to inspect '_Decimal128' values stored in floating point registers.  See
+*note PowerPC: PowerPC. for more details.
 
 
 File: gdb.info,  Node: D,  Next: Go,  Prev: C,  Up: Supported Languages
@@ -5642,7 +5910,7 @@ File: gdb.info,  Node: D,  Next: Go,  Pr
 --------
 
 GDB can be used to debug programs written in D and compiled with GDC,
-LDC or DMD compilers. Currently GDB supports only one D specific
+LDC or DMD compilers.  Currently GDB supports only one D specific
 feature -- dynamic arrays.
 
 
@@ -5652,11 +5920,11 @@ File: gdb.info,  Node: Go,  Next: Object
 ---------
 
 GDB can be used to debug programs written in Go and compiled with
-`gccgo' or `6g' compilers.
+'gccgo' or '6g' compilers.
 
    Here is a summary of the Go-specific features and restrictions:
 
-`The current Go package'
+'The current Go package'
      The name of the current package does not need to be specified when
      specifying global variables and functions.
 
@@ -5668,20 +5936,20 @@ GDB can be used to debug programs writte
             // ...
           }
 
-     When stopped inside `main' either of these work:
+     When stopped inside 'main' either of these work:
 
           (gdb) p myglob
           (gdb) p main.myglob
 
-`Builtin Go types'
-     The `string' type is recognized by GDB and is printed as a string.
+'Builtin Go types'
+     The 'string' type is recognized by GDB and is printed as a string.
 
-`Builtin Go functions'
-     The GDB expression parser recognizes the `unsafe.Sizeof' function
+'Builtin Go functions'
+     The GDB expression parser recognizes the 'unsafe.Sizeof' function
      and handles it internally.
 
-`Restrictions on Go expressions'
-     All Go operators are supported except `&^'.  The Go `_' "blank
+'Restrictions on Go expressions'
+     All Go operators are supported except '&^'.  The Go '_' "blank
      identifier" is not supported.  Automatic dereferencing of pointers
      is not supported.
 
@@ -5693,8 +5961,8 @@ File: gdb.info,  Node: Objective-C,  Nex
 
 This section provides information about some commands and command
 options that are useful for debugging Objective-C code.  See also *note
-info classes: Symbols, and *note info selectors: Symbols, for a few
-more commands specific to Objective-C support.
+info classes: Symbols, and *note info selectors: Symbols, for a few more
+commands specific to Objective-C support.
 
 * Menu:
 
@@ -5710,15 +5978,11 @@ File: gdb.info,  Node: Method Names in C
 The following commands have been extended to accept Objective-C method
 names as line specifications:
 
-   * `clear'
-
-   * `break'
-
-   * `info line'
-
-   * `jump'
-
-   * `list'
+   * 'clear'
+   * 'break'
+   * 'info line'
+   * 'jump'
+   * 'list'
 
    A fully qualified Objective-C method name is specified as
 
@@ -5728,12 +5992,12 @@ names as line specifications:
 plus sign (not shown) is used to indicate a class method.  The class
 name CLASS and method name METHODNAME are enclosed in brackets, similar
 to the way messages are specified in Objective-C source code.  For
-example, to set a breakpoint at the `create' instance method of class
-`Fruit' in the program currently being debugged, enter:
+example, to set a breakpoint at the 'create' instance method of class
+'Fruit' in the program currently being debugged, enter:
 
      break -[Fruit create]
 
-   To list ten program lines around the `initialize' class method,
+   To list ten program lines around the 'initialize' class method,
 enter:
 
      list +[NSText initialize]
@@ -5746,13 +6010,13 @@ just a method name:
      break create
 
    You must specify the complete method name, including any colons.  If
-your program's source files contain more than one `create' method,
+your program's source files contain more than one 'create' method,
 you'll be presented with a numbered list of classes that implement that
-method.  Indicate your choice by number, or type `0' to exit if none
+method.  Indicate your choice by number, or type '0' to exit if none
 apply.
 
    As another example, to clear a breakpoint established at the
-`makeKeyAndOrderFront:' method of the `NSWindow' class, enter:
+'makeKeyAndOrderFront:' method of the 'NSWindow' class, enter:
 
      clear -[NSWindow makeKeyAndOrderFront:]
 
@@ -5767,11 +6031,11 @@ example:
 
      print -[OBJECT hash]
 
-will tell GDB to send the `hash' message to OBJECT and print the
-result.  Also, an additional command has been added, `print-object' or
-`po' for short, which is meant to print the description of an object.
-However, this command may only work with certain Objective-C libraries
-that have a particular hook function, `_NSPrintForDebugger', defined.
+will tell GDB to send the 'hash' message to OBJECT and print the result.
+Also, an additional command has been added, 'print-object' or 'po' for
+short, which is meant to print the description of an object.  However,
+this command may only work with certain Objective-C libraries that have
+a particular hook function, '_NSPrintForDebugger', defined.
 
 
 File: gdb.info,  Node: OpenCL C,  Next: Fortran,  Prev: Objective-C,  Up: Supported Languages
@@ -5793,10 +6057,10 @@ File: gdb.info,  Node: OpenCL C Datatype
 15.4.5.1 OpenCL C Datatypes
 ...........................
 
-GDB supports the builtin scalar and vector datatypes specified by
-OpenCL 1.1.  In addition the half- and double-precision floating point
-data types of the `cl_khr_fp16' and `cl_khr_fp64' OpenCL extensions are
-also known to GDB.
+GDB supports the builtin scalar and vector datatypes specified by OpenCL
+1.1.  In addition the half- and double-precision floating point data
+types of the 'cl_khr_fp16' and 'cl_khr_fp64' OpenCL extensions are also
+known to GDB.
 
 
 File: gdb.info,  Node: OpenCL C Expressions,  Next: OpenCL C Operators,  Prev: OpenCL C Datatypes,  Up: OpenCL C
@@ -5814,8 +6078,8 @@ File: gdb.info,  Node: OpenCL C Operator
 15.4.5.3 OpenCL C Operators
 ...........................
 
-GDB supports the operators specified by OpenCL 1.1 for scalar and
-vector data types.
+GDB supports the operators specified by OpenCL 1.1 for scalar and vector
+data types.
 
 
 File: gdb.info,  Node: Fortran,  Next: Pascal,  Prev: OpenCL C,  Up: Supported Languages
@@ -5826,11 +6090,10 @@ File: gdb.info,  Node: Fortran,  Next: P
 GDB can be used to debug programs written in Fortran, but it currently
 supports only the features of Fortran 77 language.
 
-   Some Fortran compilers (GNU Fortran 77 and Fortran 95 compilers
-among them) append an underscore to the names of variables and
-functions.  When you debug programs compiled by those compilers, you
-will need to refer to variables and functions with a trailing
-underscore.
+   Some Fortran compilers (GNU Fortran 77 and Fortran 95 compilers among
+them) append an underscore to the names of variables and functions.
+When you debug programs compiled by those compilers, you will need to
+refer to variables and functions with a trailing underscore.
 
 * Menu:
 
@@ -5845,22 +6108,22 @@ File: gdb.info,  Node: Fortran Operators
 ..........................................
 
 Operators must be defined on values of specific types.  For instance,
-`+' is defined on numbers, but not on characters or other non-
+'+' is defined on numbers, but not on characters or other non-
 arithmetic types.  Operators are often defined on groups of types.
 
-`**'
+'**'
      The exponentiation operator.  It raises the first operand to the
      power of the second one.
 
-`:'
+':'
      The range operator.  Normally used in the form of array(low:high)
      to represent a section of array.
 
-`%'
-     The access component operator.  Normally used to access elements
-     in derived types.  Also suitable for unions.  As unions aren't
-     part of regular Fortran, this can only happen when accessing a
-     register that uses a gdbarch-defined union type.
+'%'
+     The access component operator.  Normally used to access elements in
+     derived types.  Also suitable for unions.  As unions aren't part of
+     regular Fortran, this can only happen when accessing a register
+     that uses a gdbarch-defined union type.
 
 
 File: gdb.info,  Node: Fortran Defaults,  Next: Special Fortran Commands,  Prev: Fortran Operators,  Up: Fortran
@@ -5870,7 +6133,7 @@ File: gdb.info,  Node: Fortran Defaults,
 
 Fortran symbols are usually case-insensitive, so GDB by default uses
 case-insensitive matches for Fortran symbols.  You can change that with
-the `set case-insensitive' command, see *note Symbols::, for the
+the 'set case-insensitive' command, see *note Symbols::, for the
 details.
 
 
@@ -5882,31 +6145,105 @@ File: gdb.info,  Node: Special Fortran C
 GDB has some commands to support Fortran-specific features, such as
 displaying common blocks.
 
-`info common [COMMON-NAME]'
-     This command prints the values contained in the Fortran `COMMON'
+'info common [COMMON-NAME]'
+     This command prints the values contained in the Fortran 'COMMON'
      block whose name is COMMON-NAME.  With no argument, the names of
-     all `COMMON' blocks visible at the current program location are
+     all 'COMMON' blocks visible at the current program location are
      printed.
 
 
-File: gdb.info,  Node: Pascal,  Next: Modula-2,  Prev: Fortran,  Up: Supported Languages
+File: gdb.info,  Node: Pascal,  Next: Rust,  Prev: Fortran,  Up: Supported Languages
 
 15.4.7 Pascal
 -------------
 
 Debugging Pascal programs which use sets, subranges, file variables, or
-nested functions does not currently work.  GDB does not support
-entering expressions, printing values, or similar features using Pascal
-syntax.
+nested functions does not currently work.  GDB does not support entering
+expressions, printing values, or similar features using Pascal syntax.
 
-   The Pascal-specific command `set print pascal_static-members'
+   The Pascal-specific command 'set print pascal_static-members'
 controls whether static members of Pascal objects are displayed.  *Note
 pascal_static-members: Print Settings.
 
 
-File: gdb.info,  Node: Modula-2,  Next: Ada,  Prev: Pascal,  Up: Supported Languages
+File: gdb.info,  Node: Rust,  Next: Modula-2,  Prev: Pascal,  Up: Supported Languages
+
+15.4.8 Rust
+-----------
+
+GDB supports the Rust Programming Language (https://www.rust-lang.org/).
+Type- and value-printing, and expression parsing, are reasonably
+complete.  However, there are a few peculiarities and holes to be aware
+of.
+
+   * Linespecs (*note Specify Location::) are never relative to the
+     current crate.  Instead, they act as if there were a global
+     namespace of crates, somewhat similar to the way 'extern crate'
+     behaves.
+
+     That is, if GDB is stopped at a breakpoint in a function in crate
+     'A', module 'B', then 'break B::f' will attempt to set a breakpoint
+     in a function named 'f' in a crate named 'B'.
+
+     As a consequence of this approach, linespecs also cannot refer to
+     items using 'self::' or 'super::'.
+
+   * Because GDB implements Rust name-lookup semantics in expressions,
+     it will sometimes prepend the current crate to a name.  For
+     example, if GDB is stopped at a breakpoint in the crate 'K', then
+     'print ::x::y' will try to find the symbol 'K::x::y'.
+
+     However, since it is useful to be able to refer to other crates
+     when debugging, GDB provides the 'extern' extension to circumvent
+     this.  To use the extension, just put 'extern' before a path
+     expression to refer to the otherwise unavailable "global" scope.
+
+     In the above example, if you wanted to refer to the symbol 'y' in
+     the crate 'x', you would use 'print extern x::y'.
+
+   * The Rust expression evaluator does not support "statement-like"
+     expressions such as 'if' or 'match', or lambda expressions.
+
+   * Tuple expressions are not implemented.
+
+   * The Rust expression evaluator does not currently implement the
+     'Drop' trait.  Objects that may be created by the evaluator will
+     never be destroyed.
+
+   * GDB does not implement type inference for generics.  In order to
+     call generic functions or otherwise refer to generic items, you
+     will have to specify the type parameters manually.
+
+   * GDB currently uses the C++ demangler for Rust.  In most cases this
+     does not cause any problems.  However, in an expression context,
+     completing a generic function name will give syntactically invalid
+     results.  This happens because Rust requires the '::' operator
+     between the function name and its generic arguments.  For example,
+     GDB might provide a completion like 'crate::f<u32>', where the
+     parser would require 'crate::f::<u32>'.
+
+   * As of this writing, the Rust compiler (version 1.8) has a few holes
+     in the debugging information it generates.  These holes prevent
+     certain features from being implemented by GDB:
+
+        * Method calls cannot be made via traits.
+
+        * Trait objects cannot be created or inspected.
+
+        * Operator overloading is not implemented.
+
+        * When debugging in a monomorphized function, you cannot use the
+          generic type names.
+
+        * The type 'Self' is not available.
+
+        * 'use' statements are not available, so some names may not be
+          available in the crate.
+
+
+File: gdb.info,  Node: Modula-2,  Next: Ada,  Prev: Rust,  Up: Supported Languages
 
-15.4.8 Modula-2
+15.4.9 Modula-2
 ---------------
 
 The extensions made to GDB to support Modula-2 only support output from
@@ -5924,140 +6261,140 @@ reads in the executable's symbol table.
 * M2 Defaults::                 Default settings for Modula-2
 * Deviations::                  Deviations from standard Modula-2
 * M2 Checks::                   Modula-2 type and range checks
-* M2 Scope::                    The scope operators `::' and `.'
+* M2 Scope::                    The scope operators '::' and '.'
 * GDB/M2::                      GDB and Modula-2
 
 
 File: gdb.info,  Node: M2 Operators,  Next: Built-In Func/Proc,  Up: Modula-2
 
-15.4.8.1 Operators
+15.4.9.1 Operators
 ..................
 
 Operators must be defined on values of specific types.  For instance,
-`+' is defined on numbers, but not on structures.  Operators are often
-defined on groups of types.  For the purposes of Modula-2, the
-following definitions hold:
+'+' is defined on numbers, but not on structures.  Operators are often
+defined on groups of types.  For the purposes of Modula-2, the following
+definitions hold:
 
-   * _Integral types_ consist of `INTEGER', `CARDINAL', and their
+   * _Integral types_ consist of 'INTEGER', 'CARDINAL', and their
      subranges.
 
-   * _Character types_ consist of `CHAR' and its subranges.
+   * _Character types_ consist of 'CHAR' and its subranges.
 
-   * _Floating-point types_ consist of `REAL'.
+   * _Floating-point types_ consist of 'REAL'.
 
-   * _Pointer types_ consist of anything declared as `POINTER TO TYPE'.
+   * _Pointer types_ consist of anything declared as 'POINTER TO TYPE'.
 
    * _Scalar types_ consist of all of the above.
 
-   * _Set types_ consist of `SET' and `BITSET' types.
+   * _Set types_ consist of 'SET' and 'BITSET' types.
 
-   * _Boolean types_ consist of `BOOLEAN'.
+   * _Boolean types_ consist of 'BOOLEAN'.
 
-The following operators are supported, and appear in order of
-increasing precedence:
+The following operators are supported, and appear in order of increasing
+precedence:
 
-`,'
+','
      Function argument or array index separator.
 
-`:='
-     Assignment.  The value of VAR `:=' VALUE is VALUE.
+':='
+     Assignment.  The value of VAR ':=' VALUE is VALUE.
 
-`<, >'
+'<, >'
      Less than, greater than on integral, floating-point, or enumerated
      types.
 
-`<=, >='
+'<=, >='
      Less than or equal to, greater than or equal to on integral,
-     floating-point and enumerated types, or set inclusion on set
-     types.  Same precedence as `<'.
+     floating-point and enumerated types, or set inclusion on set types.
+     Same precedence as '<'.
 
-`=, <>, #'
+'=, <>, #'
      Equality and two ways of expressing inequality, valid on scalar
-     types.  Same precedence as `<'.  In GDB scripts, only `<>' is
-     available for inequality, since `#' conflicts with the script
+     types.  Same precedence as '<'.  In GDB scripts, only '<>' is
+     available for inequality, since '#' conflicts with the script
      comment character.
 
-`IN'
+'IN'
      Set membership.  Defined on set types and the types of their
-     members.  Same precedence as `<'.
+     members.  Same precedence as '<'.
 
-`OR'
+'OR'
      Boolean disjunction.  Defined on boolean types.
 
-`AND, &'
+'AND, &'
      Boolean conjunction.  Defined on boolean types.
 
-`@'
+'@'
      The GDB "artificial array" operator (*note Expressions:
      Expressions.).
 
-`+, -'
+'+, -'
      Addition and subtraction on integral and floating-point types, or
      union and difference on set types.
 
-`*'
+'*'
      Multiplication on integral and floating-point types, or set
      intersection on set types.
 
-`/'
+'/'
      Division on floating-point types, or symmetric set difference on
-     set types.  Same precedence as `*'.
+     set types.  Same precedence as '*'.
 
-`DIV, MOD'
+'DIV, MOD'
      Integer division and remainder.  Defined on integral types.  Same
-     precedence as `*'.
+     precedence as '*'.
 
-`-'
-     Negative.  Defined on `INTEGER' and `REAL' data.
+'-'
+     Negative.  Defined on 'INTEGER' and 'REAL' data.
 
-`^'
+'^'
      Pointer dereferencing.  Defined on pointer types.
 
-`NOT'
+'NOT'
      Boolean negation.  Defined on boolean types.  Same precedence as
-     `^'.
+     '^'.
 
-`.'
-     `RECORD' field selector.  Defined on `RECORD' data.  Same
-     precedence as `^'.
+'.'
+     'RECORD' field selector.  Defined on 'RECORD' data.  Same
+     precedence as '^'.
 
-`[]'
-     Array indexing.  Defined on `ARRAY' data.  Same precedence as `^'.
+'[]'
+     Array indexing.  Defined on 'ARRAY' data.  Same precedence as '^'.
 
-`()'
-     Procedure argument list.  Defined on `PROCEDURE' objects.  Same
-     precedence as `^'.
+'()'
+     Procedure argument list.  Defined on 'PROCEDURE' objects.  Same
+     precedence as '^'.
 
-`::, .'
+'::, .'
      GDB and Modula-2 scope operators.
 
      _Warning:_ Set expressions and their operations are not yet
-     supported, so GDB treats the use of the operator `IN', or the use
-     of operators `+', `-', `*', `/', `=', , `<>', `#', `<=', and `>='
+     supported, so GDB treats the use of the operator 'IN', or the use
+     of operators '+', '-', '*', '/', '=', , '<>', '#', '<=', and '>='
      on sets as an error.
 
 
 File: gdb.info,  Node: Built-In Func/Proc,  Next: M2 Constants,  Prev: M2 Operators,  Up: Modula-2
 
-15.4.8.2 Built-in Functions and Procedures
+15.4.9.2 Built-in Functions and Procedures
 ..........................................
 
 Modula-2 also makes available several built-in procedures and functions.
 In describing these, the following metavariables are used:
 
 A
-     represents an `ARRAY' variable.
+     represents an 'ARRAY' variable.
 
 C
-     represents a `CHAR' constant or variable.
+     represents a 'CHAR' constant or variable.
 
 I
      represents a variable or constant of integral type.
 
 M
      represents an identifier that belongs to a set.  Generally used in
-     the same function with the metavariable S.  The type of S should
-     be `SET OF MTYPE' (where MTYPE is the type of M).
+     the same function with the metavariable S.  The type of S should be
+     'SET OF MTYPE' (where MTYPE is the type of M).
 
 N
      represents a variable or constant of integral or floating-point
@@ -6079,82 +6416,82 @@ X
    All Modula-2 built-in procedures also return a result, described
 below.
 
-`ABS(N)'
+'ABS(N)'
      Returns the absolute value of N.
 
-`CAP(C)'
+'CAP(C)'
      If C is a lower case letter, it returns its upper case equivalent,
      otherwise it returns its argument.
 
-`CHR(I)'
+'CHR(I)'
      Returns the character whose ordinal value is I.
 
-`DEC(V)'
+'DEC(V)'
      Decrements the value in the variable V by one.  Returns the new
      value.
 
-`DEC(V,I)'
+'DEC(V,I)'
      Decrements the value in the variable V by I.  Returns the new
      value.
 
-`EXCL(M,S)'
+'EXCL(M,S)'
      Removes the element M from the set S.  Returns the new set.
 
-`FLOAT(I)'
+'FLOAT(I)'
      Returns the floating point equivalent of the integer I.
 
-`HIGH(A)'
+'HIGH(A)'
      Returns the index of the last member of A.
 
-`INC(V)'
+'INC(V)'
      Increments the value in the variable V by one.  Returns the new
      value.
 
-`INC(V,I)'
+'INC(V,I)'
      Increments the value in the variable V by I.  Returns the new
      value.
 
-`INCL(M,S)'
+'INCL(M,S)'
      Adds the element M to the set S if it is not already there.
      Returns the new set.
 
-`MAX(T)'
+'MAX(T)'
      Returns the maximum value of the type T.
 
-`MIN(T)'
+'MIN(T)'
      Returns the minimum value of the type T.
 
-`ODD(I)'
+'ODD(I)'
      Returns boolean TRUE if I is an odd number.
 
-`ORD(X)'
+'ORD(X)'
      Returns the ordinal value of its argument.  For example, the
      ordinal value of a character is its ASCII value (on machines
      supporting the ASCII character set).  The argument X must be of an
      ordered type, which include integral, character and enumerated
      types.
 
-`SIZE(X)'
-     Returns the size of its argument.  The argument X can be a
-     variable or a type.
+'SIZE(X)'
+     Returns the size of its argument.  The argument X can be a variable
+     or a type.
 
-`TRUNC(R)'
+'TRUNC(R)'
      Returns the integral part of R.
 
-`TSIZE(X)'
-     Returns the size of its argument.  The argument X can be a
-     variable or a type.
+'TSIZE(X)'
+     Returns the size of its argument.  The argument X can be a variable
+     or a type.
 
-`VAL(T,I)'
+'VAL(T,I)'
      Returns the member of the type T whose ordinal value is I.
 
-     _Warning:_  Sets and their operations are not yet supported, so
-     GDB treats the use of procedures `INCL' and `EXCL' as an error.
+     _Warning:_ Sets and their operations are not yet supported, so GDB
+     treats the use of procedures 'INCL' and 'EXCL' as an error.
 
 
 File: gdb.info,  Node: M2 Constants,  Next: M2 Types,  Prev: Built-In Func/Proc,  Up: Modula-2
 
-15.4.8.3 Constants
+15.4.9.3 Constants
 ..................
 
 GDB allows you to express the constants of Modula-2 in the following
@@ -6163,28 +6500,28 @@ ways:
    * Integer constants are simply a sequence of digits.  When used in an
      expression, a constant is interpreted to be type-compatible with
      the rest of the expression.  Hexadecimal integers are specified by
-     a trailing `H', and octal integers by a trailing `B'.
+     a trailing 'H', and octal integers by a trailing 'B'.
 
    * Floating point constants appear as a sequence of digits, followed
      by a decimal point and another sequence of digits.  An optional
-     exponent can then be specified, in the form `E[+|-]NNN', where
-     `[+|-]NNN' is the desired exponent.  All of the digits of the
+     exponent can then be specified, in the form 'E[+|-]NNN', where
+     '[+|-]NNN' is the desired exponent.  All of the digits of the
      floating point constant must be valid decimal (base 10) digits.
 
    * Character constants consist of a single character enclosed by a
-     pair of like quotes, either single (`'') or double (`"').  They may
+     pair of like quotes, either single (''') or double ('"').  They may
      also be expressed by their ordinal value (their ASCII value,
-     usually) followed by a `C'.
+     usually) followed by a 'C'.
 
    * String constants consist of a sequence of characters enclosed by a
-     pair of like quotes, either single (`'') or double (`"').  Escape
+     pair of like quotes, either single (''') or double ('"').  Escape
      sequences in the style of C are also allowed.  *Note C and C++
      Constants: C Constants, for a brief explanation of escape
      sequences.
 
    * Enumerated constants consist of an enumerated identifier.
 
-   * Boolean constants consist of the identifiers `TRUE' and `FALSE'.
+   * Boolean constants consist of the identifiers 'TRUE' and 'FALSE'.
 
    * Pointer constants consist of integral values only.
 
@@ -6193,15 +6530,14 @@ ways:
 
 File: gdb.info,  Node: M2 Types,  Next: M2 Defaults,  Prev: M2 Constants,  Up: Modula-2
 
-15.4.8.4 Modula-2 Types
+15.4.9.4 Modula-2 Types
 .......................
 
 Currently GDB can print the following data types in Modula-2 syntax:
 array types, record types, set types, pointer types, procedure types,
-enumerated types, subrange types and base types.  You can also print
-the contents of variables declared using these type.  This section
-gives a number of simple source code examples together with sample GDB
-sessions.
+enumerated types, subrange types and base types.  You can also print the
+contents of variables declared using these type.  This section gives a
+number of simple source code examples together with sample GDB sessions.
 
    The first example contains the following section of code:
 
@@ -6209,8 +6545,8 @@ sessions.
         s: SET OF CHAR ;
         r: [20..40] ;
 
-and you can request GDB to interrogate the type and value of `r' and
-`s'.
+and you can request GDB to interrogate the type and value of 'r' and
+'s'.
 
      (gdb) print s
      {'A'..'C', 'Z'}
@@ -6221,18 +6557,18 @@ and you can request GDB to interrogate t
      (gdb) ptype r
      [20..40]
 
-Likewise if your source code declares `s' as:
+Likewise if your source code declares 's' as:
 
      VAR
         s: SET ['A'..'Z'] ;
 
-then you may query the type of `s' by:
+then you may query the type of 's' by:
 
      (gdb) ptype s
      type = SET ['A'..'Z']
 
-Note that at present you cannot interactively manipulate set
-expressions using the debugger.
+Note that at present you cannot interactively manipulate set expressions
+using the debugger.
 
    The following example shows how you might declare an array in
 Modula-2 and how you can interact with GDB to print its type and
@@ -6246,7 +6582,7 @@ contents:
 
    Note that the array handling is not yet complete and although the
 type is printed correctly, expression handling still assumes that all
-arrays have a lower bound of zero and not `-10' as in the example above.
+arrays have a lower bound of zero and not '-10' as in the example above.
 
    Here are some more type related Modula-2 examples:
 
@@ -6258,17 +6594,17 @@ arrays have a lower bound of zero and no
      BEGIN
         s := blue ;
 
-The GDB interaction shows how you can query the data type and value of
-a variable.
+The GDB interaction shows how you can query the data type and value of a
+variable.
 
      (gdb) print s
      $1 = blue
      (gdb) ptype t
      type = [blue..yellow]
 
-In this example a Modula-2 array is declared and its contents
-displayed.  Observe that the contents are written in the same way as
-their `C' counterparts.
+In this example a Modula-2 array is declared and its contents displayed.
+Observe that the contents are written in the same way as their 'C'
+counterparts.
 
      VAR
         s: ARRAY [1..5] OF CARDINAL ;
@@ -6280,8 +6616,8 @@ their `C' counterparts.
      (gdb) ptype s
      type = ARRAY [1..5] OF CARDINAL
 
-   The Modula-2 language interface to GDB also understands pointer
-types as shown in this example:
+   The Modula-2 language interface to GDB also understands pointer types
+as shown in this example:
 
      VAR
         s: POINTER TO ARRAY [1..5] OF CARDINAL ;
@@ -6289,7 +6625,7 @@ types as shown in this example:
         NEW(s) ;
         s^[1] := 1 ;
 
-and you can request that GDB describes the type of `s'.
+and you can request that GDB describes the type of 's'.
 
      (gdb) ptype s
      type = POINTER TO ARRAY [1..5] OF CARDINAL
@@ -6309,7 +6645,7 @@ combine array types, record types, point
      VAR
         s: POINTER TO ARRAY myrange OF foo ;
 
-and you can ask GDB to describe the type of `s' as shown below.
+and you can ask GDB to describe the type of 's' as shown below.
 
      (gdb) ptype s
      type = POINTER TO ARRAY [-2..2] OF foo = RECORD
@@ -6321,23 +6657,22 @@ and you can ask GDB to describe the type
 
 File: gdb.info,  Node: M2 Defaults,  Next: Deviations,  Prev: M2 Types,  Up: Modula-2
 
-15.4.8.5 Modula-2 Defaults
+15.4.9.5 Modula-2 Defaults
 ..........................
 
 If type and range checking are set automatically by GDB, they both
-default to `on' whenever the working language changes to Modula-2.
-This happens regardless of whether you or GDB selected the working
-language.
+default to 'on' whenever the working language changes to Modula-2.  This
+happens regardless of whether you or GDB selected the working language.
 
    If you allow GDB to set the language automatically, then entering
-code compiled from a file whose name ends with `.mod' sets the working
+code compiled from a file whose name ends with '.mod' sets the working
 language to Modula-2.  *Note Having GDB Infer the Source Language:
 Automatically, for further details.
 
 
 File: gdb.info,  Node: Deviations,  Next: M2 Checks,  Prev: M2 Defaults,  Up: Modula-2
 
-15.4.8.6 Deviations from Standard Modula-2
+15.4.9.6 Deviations from Standard Modula-2
 ..........................................
 
 A few changes have been made to make Modula-2 programs easier to debug.
@@ -6347,15 +6682,15 @@ This is done primarily via loosening its
      integers.  This allows you to modify pointer variables during
      debugging.  (In standard Modula-2, the actual address contained in
      a pointer variable is hidden from you; it can only be modified
-     through direct assignment to another pointer variable or
-     expression that returned a pointer.)
+     through direct assignment to another pointer variable or expression
+     that returned a pointer.)
 
    * C escape sequences can be used in strings and characters to
      represent non-printable characters.  GDB prints out strings with
      these escape sequences embedded.  Single non-printable characters
-     are printed using the `CHR(NNN)' format.
+     are printed using the 'CHR(NNN)' format.
 
-   * The assignment operator (`:=') returns the value of its right-hand
+   * The assignment operator (':=') returns the value of its right-hand
      argument.
 
    * All built-in procedures both modify _and_ return their argument.
@@ -6363,7 +6698,7 @@ This is done primarily via loosening its
 
 File: gdb.info,  Node: M2 Checks,  Next: M2 Scope,  Prev: Deviations,  Up: Modula-2
 
-15.4.8.7 Modula-2 Type and Range Checks
+15.4.9.7 Modula-2 Type and Range Checks
 .......................................
 
      _Warning:_ in this release, GDB does not yet perform type or range
@@ -6371,10 +6706,10 @@ File: gdb.info,  Node: M2 Checks,  Next:
 
    GDB considers two Modula-2 variables type equivalent if:
 
-   * They are of types that have been declared equivalent via a `TYPE
-     T1 = T2' statement
+   * They are of types that have been declared equivalent via a 'TYPE T1
+     = T2' statement
 
-   * They have been declared on the same line.  (Note:  This is true of
+   * They have been declared on the same line.  (Note: This is true of
      the GNU Modula-2 compiler, but it may not be true of other
      compilers.)
 
@@ -6387,26 +6722,25 @@ array index bounds, and all built-in fun
 
 File: gdb.info,  Node: M2 Scope,  Next: GDB/M2,  Prev: M2 Checks,  Up: Modula-2
 
-15.4.8.8 The Scope Operators `::' and `.'
+15.4.9.8 The Scope Operators '::' and '.'
 .........................................
 
 There are a few subtle differences between the Modula-2 scope operator
-(`.') and the GDB scope operator (`::').  The two have similar syntax:
+('.') and the GDB scope operator ('::').  The two have similar syntax:
 
 
      MODULE . ID
      SCOPE :: ID
 
-where SCOPE is the name of a module or a procedure, MODULE the name of
-a module, and ID is any declared identifier within your program, except
+where SCOPE is the name of a module or a procedure, MODULE the name of a
+module, and ID is any declared identifier within your program, except
 another module.
 
-   Using the `::' operator makes GDB search the scope specified by
-SCOPE for the identifier ID.  If it is not found in the specified
-scope, then GDB searches all scopes enclosing the one specified by
-SCOPE.
+   Using the '::' operator makes GDB search the scope specified by SCOPE
+for the identifier ID.  If it is not found in the specified scope, then
+GDB searches all scopes enclosing the one specified by SCOPE.
 
-   Using the `.' operator makes GDB search the current scope for the
+   Using the '.' operator makes GDB search the current scope for the
 identifier specified by ID that was imported from the definition module
 specified by MODULE.  With this operator, it is an error if the
 identifier ID was not imported from definition module MODULE, or if ID
@@ -6415,29 +6749,29 @@ is not an identifier in MODULE.
 
 File: gdb.info,  Node: GDB/M2,  Prev: M2 Scope,  Up: Modula-2
 
-15.4.8.9 GDB and Modula-2
+15.4.9.9 GDB and Modula-2
 .........................
 
 Some GDB commands have little use when debugging Modula-2 programs.
-Five subcommands of `set print' and `show print' apply specifically to
-C and C++: `vtbl', `demangle', `asm-demangle', `object', and `union'.
-The first four apply to C++, and the last to the C `union' type, which
-has no direct analogue in Modula-2.
+Five subcommands of 'set print' and 'show print' apply specifically to C
+and C++: 'vtbl', 'demangle', 'asm-demangle', 'object', and 'union'.  The
+first four apply to C++, and the last to the C 'union' type, which has
+no direct analogue in Modula-2.
 
-   The `@' operator (*note Expressions: Expressions.), while available
+   The '@' operator (*note Expressions: Expressions.), while available
 with any language, is not useful with Modula-2.  Its intent is to aid
 the debugging of "dynamic arrays", which cannot be created in Modula-2
 as they can in C or C++.  However, because an address can be specified
-by an integral constant, the construct `{TYPE}ADREXP' is still useful.
+by an integral constant, the construct '{TYPE}ADREXP' is still useful.
 
-   In GDB scripts, the Modula-2 inequality operator `#' is interpreted
-as the beginning of a comment.  Use `<>' instead.
+   In GDB scripts, the Modula-2 inequality operator '#' is interpreted
+as the beginning of a comment.  Use '<>' instead.
 
 
 File: gdb.info,  Node: Ada,  Prev: Modula-2,  Up: Supported Languages
 
-15.4.9 Ada
-----------
+15.4.10 Ada
+-----------
 
 The extensions made to GDB for Ada only support output from the GNU Ada
 (GNAT) compiler.  Other Ada compilers are not currently supported, and
@@ -6451,6 +6785,8 @@ difficult.
                                    in GDB.
 * Omissions from Ada::          Restrictions on the Ada expression syntax.
 * Additions to Ada::            Extensions of the Ada expression syntax.
+* Overloading support for Ada:: Support for expressions involving overloaded
+                                   subprograms.
 * Stopping Before Main Program:: Debugging the program during elaboration.
 * Ada Exceptions::              Ada Exceptions
 * Ada Tasks::                   Listing and setting breakpoints in tasks.
@@ -6462,8 +6798,8 @@ difficult.
 
 File: gdb.info,  Node: Ada Mode Intro,  Next: Omissions from Ada,  Up: Ada
 
-15.4.9.1 Introduction
-.....................
+15.4.10.1 Introduction
+......................
 
 The Ada mode of GDB supports a fairly large subset of Ada expression
 syntax, with some extensions.  The philosophy behind the design of this
@@ -6472,8 +6808,8 @@ subset is
    * That GDB should provide basic literals and access to operations for
      arithmetic, dereferencing, field selection, indexing, and
      subprogram calls, leaving more sophisticated computations to
-     subprograms written into the program (which therefore may be
-     called from GDB).
+     subprograms written into the program (which therefore may be called
+     from GDB).
 
    * That type safety and strict adherence to Ada language restrictions
      are not particularly important to the GDB user.
@@ -6487,33 +6823,26 @@ names with their packages, regardless of
 ambiguity, GDB asks the user's intent.
 
    The debugger will start in Ada mode if it detects an Ada main
-program.  As for other languages, it will enter Ada mode when stopped
-in a program that was translated from an Ada source file.
+program.  As for other languages, it will enter Ada mode when stopped in
+a program that was translated from an Ada source file.
 
-   While in Ada mode, you may use `-' for comments.  This is useful
-mostly for documenting command files.  The standard GDB comment (`#')
+   While in Ada mode, you may use '--' for comments.  This is useful
+mostly for documenting command files.  The standard GDB comment ('#')
 still works at the beginning of a line in Ada mode, but not in the
 middle (to allow based literals).
 
-   The debugger supports limited overloading.  Given a subprogram call
-in which the function symbol has multiple definitions, it will use the
-number of actual parameters and some information about their types to
-attempt to narrow the set of definitions.  It also makes very limited
-use of context, preferring procedures to functions in the context of
-the `call' command, and functions to procedures elsewhere.
-
 
 File: gdb.info,  Node: Omissions from Ada,  Next: Additions to Ada,  Prev: Ada Mode Intro,  Up: Ada
 
-15.4.9.2 Omissions from Ada
-...........................
+15.4.10.2 Omissions from Ada
+............................
 
 Here are the notable omissions from the subset:
 
    * Only a subset of the attributes are supported:
 
-        - 'First, 'Last, and 'Length  on array objects (not on types
-          and subtypes).
+        - 'First, 'Last, and 'Length on array objects (not on types and
+          subtypes).
 
         - 'Min and 'Max.
 
@@ -6522,28 +6851,28 @@ Here are the notable omissions from the 
         - 'Tag.
 
         - 'Range on array objects (not subtypes), but only as the right
-          operand of the membership (`in') operator.
+          operand of the membership ('in') operator.
 
         - 'Access, 'Unchecked_Access, and 'Unrestricted_Access (a GNAT
           extension).
 
         - 'Address.
 
-   * The names in `Characters.Latin_1' are not available and
+   * The names in 'Characters.Latin_1' are not available and
      concatenation is not implemented.  Thus, escape characters in
      strings are not currently available.
 
-   * Equality tests (`=' and `/=') on arrays test for bitwise equality
-     of representations.  They will generally work correctly for
-     strings and arrays whose elements have integer or enumeration
-     types.  They may not work correctly for arrays whose element types
-     have user-defined equality, for arrays of real values (in
-     particular, IEEE-conformant floating point, because of negative
-     zeroes and NaNs), and for arrays whose elements contain unused
-     bits with indeterminate values.
+   * Equality tests ('=' and '/=') on arrays test for bitwise equality
+     of representations.  They will generally work correctly for strings
+     and arrays whose elements have integer or enumeration types.  They
+     may not work correctly for arrays whose element types have
+     user-defined equality, for arrays of real values (in particular,
+     IEEE-conformant floating point, because of negative zeroes and
+     NaNs), and for arrays whose elements contain unused bits with
+     indeterminate values.
 
-   * The other component-by-component array operations (`and', `or',
-     `xor', `not', and relational tests other than equality) are not
+   * The other component-by-component array operations ('and', 'or',
+     'xor', 'not', and relational tests other than equality) are not
      implemented.
 
    * There is limited support for array and record aggregates.  They are
@@ -6562,14 +6891,14 @@ Here are the notable omissions from the 
      However, you can first modify discriminants by directly assigning
      to them (which normally would not be allowed in Ada), and then
      performing an aggregate assignment.  For example, given a variable
-     `A_Rec' declared to have a type such as:
+     'A_Rec' declared to have a type such as:
 
           type Rec (Len : Small_Integer := 0) is record
               Id : Integer;
               Vals : IntArray (1 .. Len);
           end record;
 
-     you can assign a value with a different size of `Vals' with two
+     you can assign a value with a different size of 'Vals' with two
      assignments:
 
           (gdb) set A_Rec.Len := 4
@@ -6577,8 +6906,8 @@ Here are the notable omissions from the 
 
      As this example also illustrates, GDB is very loose about the usual
      rules concerning aggregates.  You may leave out some of the
-     components of an array or record aggregate (such as the `Len'
-     component in the assignment to `A_Rec' above); they will retain
+     components of an array or record aggregate (such as the 'Len'
+     component in the assignment to 'A_Rec' above); they will retain
      their original values upon assignment.  You may freely use dynamic
      values as indices in component associations.  You may even use
      overlapping or redundant component associations, although which
@@ -6587,13 +6916,13 @@ Here are the notable omissions from the 
    * Calls to dispatching subprograms are not implemented.
 
    * The overloading algorithm is much more limited (i.e., less
-     selective) than that of real Ada.  It makes only limited use of
-     the context in which a subexpression appears to resolve its
-     meaning, and it is much looser in its rules for allowing type
-     matches.  As a result, some function calls will be ambiguous, and
-     the user will be asked to choose the proper resolution.
+     selective) than that of real Ada.  It makes only limited use of the
+     context in which a subexpression appears to resolve its meaning,
+     and it is much looser in its rules for allowing type matches.  As a
+     result, some function calls will be ambiguous, and the user will be
+     asked to choose the proper resolution.
 
-   * The `new' operator is not implemented.
+   * The 'new' operator is not implemented.
 
    * Entry calls are not implemented.
 
@@ -6602,50 +6931,50 @@ Here are the notable omissions from the 
 
    * It is not possible to slice a packed array.
 
-   * The names `True' and `False', when not part of a qualified name,
-     are interpreted as if implicitly prefixed by `Standard',
-     regardless of context.  Should your program redefine these names
-     in a package or procedure (at best a dubious practice), you will
-     have to use fully qualified names to access their new definitions.
+   * The names 'True' and 'False', when not part of a qualified name,
+     are interpreted as if implicitly prefixed by 'Standard', regardless
+     of context.  Should your program redefine these names in a package
+     or procedure (at best a dubious practice), you will have to use
+     fully qualified names to access their new definitions.
 
 
-File: gdb.info,  Node: Additions to Ada,  Next: Stopping Before Main Program,  Prev: Omissions from Ada,  Up: Ada
+File: gdb.info,  Node: Additions to Ada,  Next: Overloading support for Ada,  Prev: Omissions from Ada,  Up: Ada
 
-15.4.9.3 Additions to Ada
-.........................
+15.4.10.3 Additions to Ada
+..........................
 
 As it does for other languages, GDB makes certain generic extensions to
 Ada (*note Expressions::):
 
    * If the expression E is a variable residing in memory (typically a
      local variable or array element) and N is a positive integer, then
-     `E@N' displays the values of E and the N-1 adjacent variables
+     'E@N' displays the values of E and the N-1 adjacent variables
      following it in memory as an array.  In Ada, this operator is
-     generally not necessary, since its prime use is in displaying
-     parts of an array, and slicing will usually do this in Ada.
-     However, there are occasional uses when debugging programs in
-     which certain debugging information has been optimized away.
+     generally not necessary, since its prime use is in displaying parts
+     of an array, and slicing will usually do this in Ada.  However,
+     there are occasional uses when debugging programs in which certain
+     debugging information has been optimized away.
 
-   * `B::VAR' means "the variable named VAR that appears in function or
+   * 'B::VAR' means "the variable named VAR that appears in function or
      file B."  When B is a file name, you must typically surround it in
      single quotes.
 
-   * The expression `{TYPE} ADDR' means "the variable of type TYPE that
+   * The expression '{TYPE} ADDR' means "the variable of type TYPE that
      appears at address ADDR."
 
-   * A name starting with `$' is a convenience variable (*note
+   * A name starting with '$' is a convenience variable (*note
      Convenience Vars::) or a machine register (*note Registers::).
 
    In addition, GDB provides a few other shortcuts and outright
 additions specific to Ada:
 
-   * The assignment statement is allowed as an expression, returning
-     its right-hand operand as its value.  Thus, you may enter
+   * The assignment statement is allowed as an expression, returning its
+     right-hand operand as its value.  Thus, you may enter
 
           (gdb) set x := y + 3
           (gdb) print A(tmp := y + 1)
 
-   * The semicolon is allowed as an "operator,"  returning as its value
+   * The semicolon is allowed as an "operator," returning as its value
      the value of its right-hand operand.  This allows, for example,
      complex conditional breaks:
 
@@ -6655,12 +6984,12 @@ additions specific to Ada:
    * Rather than use catenation and symbolic character names to
      introduce special characters into strings, one may instead use a
      special bracket notation, which is also used to print strings.  A
-     sequence of characters of the form `["XX"]' within a string or
+     sequence of characters of the form '["XX"]' within a string or
      character literal denotes the (single) character whose numeric
-     encoding is XX in hexadecimal.  The sequence of characters `["""]'
-     also denotes a single quotation mark in strings.   For example,
+     encoding is XX in hexadecimal.  The sequence of characters '["""]'
+     also denotes a single quotation mark in strings.  For example,
              "One line.["0a"]Next line.["0a"]"
-     contains an ASCII newline character (`Ada.Characters.Latin_1.LF')
+     contains an ASCII newline character ('Ada.Characters.Latin_1.LF')
      after each period.
 
    * The subtype used as a prefix for the attributes 'Pos, 'Min, and
@@ -6677,12 +7006,12 @@ additions specific to Ada:
           (3 => 10, 17, 1)
 
      That is, in contrast to valid Ada, only the first component has a
-     `=>' clause.
+     '=>' clause.
 
    * You may abbreviate attributes in expressions with any unique,
      multi-character subsequence of their names (an exact match gets
      preference).  For example, you may use a'len, a'gth, or a'lh in
-     place of  a'length.
+     place of a'length.
 
    * Since Ada is case-insensitive, the debugger normally maps
      identifiers you type to lower case.  The GNAT compiler uses
@@ -6698,30 +7027,70 @@ additions specific to Ada:
      Likewise, component selection on such a value will operate on the
      specific type of the object.
 
+
+File: gdb.info,  Node: Overloading support for Ada,  Next: Stopping Before Main Program,  Prev: Additions to Ada,  Up: Ada
+
+15.4.10.4 Overloading support for Ada
+.....................................
+
+The debugger supports limited overloading.  Given a subprogram call in
+which the function symbol has multiple definitions, it will use the
+number of actual parameters and some information about their types to
+attempt to narrow the set of definitions.  It also makes very limited
+use of context, preferring procedures to functions in the context of the
+'call' command, and functions to procedures elsewhere.
+
+   If, after narrowing, the set of matching definitions still contains
+more than one definition, GDB will display a menu to query which one it
+should use, for instance:
+
+     (gdb) print f(1)
+     Multiple matches for f
+     [0] cancel
+     [1] foo.f (integer) return boolean at foo.adb:23
+     [2] foo.f (foo.new_integer) return boolean at foo.adb:28
+     >
+
+   In this case, just select one menu entry either to cancel expression
+evaluation (type '0' and press <RET>) or to continue evaluation with a
+specific instance (type the corresponding number and press <RET>).
+
+   Here are a couple of commands to customize GDB's behavior in this
+case:
+
+'set ada print-signatures'
+     Control whether parameter types and return types are displayed in
+     overloads selection menus.  It is 'on' by default.  *Note
+     Overloading support for Ada::.
+
+'show ada print-signatures'
+     Show the current setting for displaying parameter types and return
+     types in overloads selection menu.  *Note Overloading support for
+     Ada::.
 
 
-File: gdb.info,  Node: Stopping Before Main Program,  Next: Ada Exceptions,  Prev: Additions to Ada,  Up: Ada
+File: gdb.info,  Node: Stopping Before Main Program,  Next: Ada Exceptions,  Prev: Overloading support for Ada,  Up: Ada
 
-15.4.9.4 Stopping at the Very Beginning
-.......................................
+15.4.10.5 Stopping at the Very Beginning
+........................................
 
 It is sometimes necessary to debug the program during elaboration, and
 before reaching the main procedure.  As defined in the Ada Reference
 Manual, the elaboration code is invoked from a procedure called
-`adainit'.  To run your program up to the beginning of elaboration,
-simply use the following two commands: `tbreak adainit' and `run'.
+'adainit'.  To run your program up to the beginning of elaboration,
+simply use the following two commands: 'tbreak adainit' and 'run'.
 
 
 File: gdb.info,  Node: Ada Exceptions,  Next: Ada Tasks,  Prev: Stopping Before Main Program,  Up: Ada
 
-15.4.9.5 Ada Exceptions
-.......................
+15.4.10.6 Ada Exceptions
+........................
 
 A command is provided to list all Ada exceptions:
 
-`info exceptions'
-`info exceptions REGEXP'
-     The `info exceptions' command allows you to list all Ada exceptions
+'info exceptions'
+'info exceptions REGEXP'
+     The 'info exceptions' command allows you to list all Ada exceptions
      defined within the program being debugged, as well as their
      addresses.  With a regular expression, REGEXP, as argument, only
      those exceptions whose names match REGEXP are listed.
@@ -6748,15 +7117,15 @@ an exception is raised.  For more detail
 
 File: gdb.info,  Node: Ada Tasks,  Next: Ada Tasks and Core Files,  Prev: Ada Exceptions,  Up: Ada
 
-15.4.9.6 Extensions for Ada Tasks
-.................................
+15.4.10.7 Extensions for Ada Tasks
+..................................
 
 Support for Ada tasks is analogous to that for threads (*note
 Threads::).  GDB provides the following task-related commands:
 
-`info tasks'
-     This command shows a list of current Ada tasks, as in the
-     following example:
+'info tasks'
+     This command shows a list of current Ada tasks, as in the following
+     example:
 
           (gdb) info tasks
             ID       TID P-ID Pri State                 Name
@@ -6765,78 +7134,77 @@ Threads::).  GDB provides the following 
              3   809a800   1   15 Child Activation Wait a
           *  4   80ae800   3   15 Runnable              c
 
+
      In this listing, the asterisk before the last task indicates it to
      be the task currently being inspected.
 
-    ID
+     ID
           Represents GDB's internal task number.
 
-    TID
+     TID
           The Ada task ID.
 
-    P-ID
+     P-ID
           The parent's task ID (GDB's internal task number).
 
-    Pri
+     Pri
           The base priority of the task.
 
-    State
+     State
           Current state of the task.
 
-         `Unactivated'
-               The task has been created but has not been activated.
-               It cannot be executing.
-
-         `Runnable'
-               The task is not blocked for any reason known to Ada.
-               (It may be waiting for a mutex, though.) It is
-               conceptually "executing" in normal mode.
-
-         `Terminated'
-               The task is terminated, in the sense of ARM 9.3 (5).
-               Any dependents that were waiting on terminate
-               alternatives have been awakened and have terminated
-               themselves.
+          'Unactivated'
+               The task has been created but has not been activated.  It
+               cannot be executing.
+
+          'Runnable'
+               The task is not blocked for any reason known to Ada.  (It
+               may be waiting for a mutex, though.)  It is conceptually
+               "executing" in normal mode.
+
+          'Terminated'
+               The task is terminated, in the sense of ARM 9.3 (5).  Any
+               dependents that were waiting on terminate alternatives
+               have been awakened and have terminated themselves.
 
-         `Child Activation Wait'
+          'Child Activation Wait'
                The task is waiting for created tasks to complete
                activation.
 
-         `Accept Statement'
+          'Accept Statement'
                The task is waiting on an accept or selective wait
                statement.
 
-         `Waiting on entry call'
+          'Waiting on entry call'
                The task is waiting on an entry call.
 
-         `Async Select Wait'
+          'Async Select Wait'
                The task is waiting to start the abortable part of an
                asynchronous select statement.
 
-         `Delay Sleep'
+          'Delay Sleep'
                The task is waiting on a select statement with only a
                delay alternative open.
 
-         `Child Termination Wait'
+          'Child Termination Wait'
                The task is sleeping having completed a master within
                itself, and is waiting for the tasks dependent on that
                master to become terminated or waiting on a terminate
                Phase.
 
-         `Wait Child in Term Alt'
+          'Wait Child in Term Alt'
                The task is sleeping waiting for tasks on terminate
                alternatives to finish terminating.
 
-         `Accepting RV with TASKNO'
+          'Accepting RV with TASKNO'
                The task is accepting a rendez-vous with the task TASKNO.
 
-    Name
+     Name
           Name of the task in the program.
 
-
-`info task TASKNO'
-     This command shows detailled informations on the specified task,
-     as in the following example:
+'info task TASKNO'
+     This command shows detailled informations on the specified task, as
+     in the following example:
           (gdb) info tasks
             ID       TID P-ID Pri State                  Name
              1   8077880    0  15 Child Activation Wait  main_task
@@ -6849,7 +7217,7 @@ Threads::).  GDB provides the following 
           Base Priority: 15
           State: Runnable
 
-`task'
+'task'
      This command prints the ID of the current task.
 
           (gdb) info tasks
@@ -6859,8 +7227,8 @@ Threads::).  GDB provides the following 
           (gdb) task
           [Current task is 2]
 
-`task TASKNO'
-     This command is like the `thread THREADNO' command (*note
+'task TASKNO'
+     This command is like the 'thread THREAD-ID' command (*note
      Threads::).  It switches the context of debugging from the current
      task to the given task.
 
@@ -6878,24 +7246,24 @@ Threads::).  GDB provides the following 
           #3  0x806153e in system.tasking.stages.activate_tasks ()
           #4  0x804aacc in un () at un.adb:5
 
-`break LINESPEC task TASKNO'
-`break LINESPEC task TASKNO if ...'
-     These commands are like the `break ... thread ...' command (*note
-     Thread Stops::).  The LINESPEC argument specifies source lines, as
+'break LOCATION task TASKNO'
+'break LOCATION task TASKNO if ...'
+     These commands are like the 'break ... thread ...' command (*note
+     Thread Stops::).  The LOCATION argument specifies source lines, as
      described in *note Specify Location::.
 
-     Use the qualifier `task TASKNO' with a breakpoint command to
+     Use the qualifier 'task TASKNO' with a breakpoint command to
      specify that you only want GDB to stop the program when a
      particular Ada task reaches this breakpoint.  The TASKNO is one of
      the numeric task identifiers assigned by GDB, shown in the first
-     column of the `info tasks' display.
+     column of the 'info tasks' display.
 
-     If you do not specify `task TASKNO' when you set a breakpoint, the
+     If you do not specify 'task TASKNO' when you set a breakpoint, the
      breakpoint applies to _all_ tasks of your program.
 
-     You can use the `task' qualifier on conditional breakpoints as
-     well; in this case, place `task TASKNO' before the breakpoint
-     condition (before the `if').
+     You can use the 'task' qualifier on conditional breakpoints as
+     well; in this case, place 'task TASKNO' before the breakpoint
+     condition (before the 'if').
 
      For example,
 
@@ -6924,8 +7292,8 @@ Threads::).  GDB provides the following 
 
 File: gdb.info,  Node: Ada Tasks and Core Files,  Next: Ravenscar Profile,  Prev: Ada Tasks,  Up: Ada
 
-15.4.9.7 Tasking Support when Debugging Core Files
-..................................................
+15.4.10.8 Tasking Support when Debugging Core Files
+...................................................
 
 When inspecting a core file, as opposed to debugging a live program,
 tasking support may be limited or even unavailable, depending on the
@@ -6935,25 +7303,25 @@ available, but task switching is not sup
    On certain platforms, the debugger needs to perform some memory
 writes in order to provide Ada tasking support.  When inspecting a core
 file, this means that the core file must be opened with read-write
-privileges, using the command `"set write on"' (*note Patching::).
+privileges, using the command '"set write on"' (*note Patching::).
 Under these circumstances, you should make a backup copy of the core
 file before inspecting it with GDB.
 
 
 File: gdb.info,  Node: Ravenscar Profile,  Next: Ada Glitches,  Prev: Ada Tasks and Core Files,  Up: Ada
 
-15.4.9.8 Tasking Support when using the Ravenscar Profile
-.........................................................
+15.4.10.9 Tasking Support when using the Ravenscar Profile
+..........................................................
 
 The "Ravenscar Profile" is a subset of the Ada tasking features,
 specifically designed for systems with safety-critical real-time
 requirements.
 
-`set ravenscar task-switching on'
+'set ravenscar task-switching on'
      Allows task switching when debugging a program that uses the
      Ravenscar Profile.  This is the default.
 
-`set ravenscar task-switching off'
+'set ravenscar task-switching off'
      Turn off task switching when debugging a program that uses the
      Ravenscar Profile.  This is mostly intended to disable the code
      that adds support for the Ravenscar Profile, in case a bug in
@@ -6961,109 +7329,104 @@ requirements.
      working properly.  To be effective, this command should be run
      before the program is started.
 
-`show ravenscar task-switching'
+'show ravenscar task-switching'
      Show whether it is possible to switch from task to task in a
      program using the Ravenscar Profile.
 
-
 
 File: gdb.info,  Node: Ada Glitches,  Prev: Ravenscar Profile,  Up: Ada
 
-15.4.9.9 Known Peculiarities of Ada Mode
-........................................
+15.4.10.10 Known Peculiarities of Ada Mode
+..........................................
 
-Besides the omissions listed previously (*note Omissions from Ada::),
-we know of several problems with and limitations of Ada mode in GDB,
-some of which will be fixed with planned future releases of the debugger
-and the GNU Ada compiler.
+Besides the omissions listed previously (*note Omissions from Ada::), we
+know of several problems with and limitations of Ada mode in GDB, some
+of which will be fixed with planned future releases of the debugger and
+the GNU Ada compiler.
 
    * Static constants that the compiler chooses not to materialize as
      objects in storage are invisible to the debugger.
 
-   * Named parameter associations in function argument lists are
-     ignored (the argument lists are treated as positional).
+   * Named parameter associations in function argument lists are ignored
+     (the argument lists are treated as positional).
 
    * Many useful library packages are currently invisible to the
      debugger.
 
    * Fixed-point arithmetic, conversions, input, and output is carried
-     out using floating-point arithmetic, and may give results that
-     only approximate those on the host machine.
+     out using floating-point arithmetic, and may give results that only
+     approximate those on the host machine.
 
-   * The GNAT compiler never generates the prefix `Standard' for any of
+   * The GNAT compiler never generates the prefix 'Standard' for any of
      the standard symbols defined by the Ada language.  GDB knows about
-     this: it will strip the prefix from names when you use it, and
-     will never look for a name you have so qualified among local
-     symbols, nor match against symbols in other packages or
-     subprograms.  If you have defined entities anywhere in your
-     program other than parameters and local variables whose simple
-     names match names in `Standard', GNAT's lack of qualification here
-     can cause confusion.  When this happens, you can usually resolve
-     the confusion by qualifying the problematic names with package
-     `Standard' explicitly.
+     this: it will strip the prefix from names when you use it, and will
+     never look for a name you have so qualified among local symbols,
+     nor match against symbols in other packages or subprograms.  If you
+     have defined entities anywhere in your program other than
+     parameters and local variables whose simple names match names in
+     'Standard', GNAT's lack of qualification here can cause confusion.
+     When this happens, you can usually resolve the confusion by
+     qualifying the problematic names with package 'Standard'
+     explicitly.
 
    Older versions of the compiler sometimes generate erroneous debugging
-information, resulting in the debugger incorrectly printing the value
-of affected entities.  In some cases, the debugger is able to work
-around an issue automatically. In other cases, the debugger is able to
-work around the issue, but the work-around has to be specifically
-enabled.
+information, resulting in the debugger incorrectly printing the value of
+affected entities.  In some cases, the debugger is able to work around
+an issue automatically.  In other cases, the debugger is able to work
+around the issue, but the work-around has to be specifically enabled.
 
-`set ada trust-PAD-over-XVS on'
+'set ada trust-PAD-over-XVS on'
      Configure GDB to strictly follow the GNAT encoding when computing
-     the value of Ada entities, particularly when `PAD' and `PAD___XVS'
-     types are involved (see `ada/exp_dbug.ads' in the GCC sources for
-     a complete description of the encoding used by the GNAT compiler).
+     the value of Ada entities, particularly when 'PAD' and 'PAD___XVS'
+     types are involved (see 'ada/exp_dbug.ads' in the GCC sources for a
+     complete description of the encoding used by the GNAT compiler).
      This is the default.
 
-`set ada trust-PAD-over-XVS off'
-     This is related to the encoding using by the GNAT compiler.  If
-     GDB sometimes prints the wrong value for certain entities,
-     changing `ada trust-PAD-over-XVS' to `off' activates a work-around
-     which may fix the issue.  It is always safe to set `ada
-     trust-PAD-over-XVS' to `off', but this incurs a slight performance
-     penalty, so it is recommended to leave this setting to `on' unless
-     necessary.
-
+'set ada trust-PAD-over-XVS off'
+     This is related to the encoding using by the GNAT compiler.  If GDB
+     sometimes prints the wrong value for certain entities, changing
+     'ada trust-PAD-over-XVS' to 'off' activates a work-around which may
+     fix the issue.  It is always safe to set 'ada trust-PAD-over-XVS'
+     to 'off', but this incurs a slight performance penalty, so it is
+     recommended to leave this setting to 'on' unless necessary.
 
    Internally, the debugger also relies on the compiler following a
-number of conventions known as the `GNAT Encoding', all documented in
-`gcc/ada/exp_dbug.ads' in the GCC sources. This encoding describes how
+number of conventions known as the 'GNAT Encoding', all documented in
+'gcc/ada/exp_dbug.ads' in the GCC sources.  This encoding describes how
 the debugging information should be generated for certain types.  In
 particular, this convention makes use of "descriptive types", which are
 artificial types generated purely to help the debugger.
 
    These encodings were defined at a time when the debugging information
 format used was not powerful enough to describe some of the more complex
-types available in Ada.  Since DWARF allows us to express nearly all
-Ada features, the long-term goal is to slowly replace these descriptive
+types available in Ada.  Since DWARF allows us to express nearly all Ada
+features, the long-term goal is to slowly replace these descriptive
 types by their pure DWARF equivalent.  To facilitate that transition, a
 new maintenance option is available to force the debugger to ignore
 those descriptive types.  It allows the user to quickly evaluate how
 well GDB works without them.
 
-`maintenance ada set ignore-descriptive-types [on|off]'
+'maintenance ada set ignore-descriptive-types [on|off]'
      Control whether the debugger should ignore descriptive types.  The
-     default is not to ignore descriptives types (`off').
+     default is not to ignore descriptives types ('off').
 
-`maintenance ada show ignore-descriptive-types'
+'maintenance ada show ignore-descriptive-types'
      Show if descriptive types are ignored by GDB.
 
-
 
 File: gdb.info,  Node: Unsupported Languages,  Prev: Supported Languages,  Up: Languages
 
 15.5 Unsupported Languages
 ==========================
 
-In addition to the other fully-supported programming languages, GDB
-also provides a pseudo-language, called `minimal'.  It does not
-represent a real programming language, but provides a set of
-capabilities close to what the C or assembly languages provide.  This
-should allow most simple operations to be performed while debugging an
-application that uses a language currently not supported by GDB.
+In addition to the other fully-supported programming languages, GDB also
+provides a pseudo-language, called 'minimal'.  It does not represent a
+real programming language, but provides a set of capabilities close to
+what the C or assembly languages provide.  This should allow most simple
+operations to be performed while debugging an application that uses a
+language currently not supported by GDB.
 
-   If the language is set to `auto', GDB will automatically select this
+   If the language is set to 'auto', GDB will automatically select this
 language if the current frame corresponds to an unsupported language.
 
 
@@ -7085,82 +7448,81 @@ characters, which GDB ordinarily treats 
 frequent case is in referring to static variables in other source files
 (*note Program Variables: Variables.).  File names are recorded in
 object files as debugging symbols, but GDB would ordinarily parse a
-typical file name, like `foo.c', as the three words `foo' `.' `c'.  To
-allow GDB to recognize `foo.c' as a single symbol, enclose it in single
+typical file name, like 'foo.c', as the three words 'foo' '.'  'c'.  To
+allow GDB to recognize 'foo.c' as a single symbol, enclose it in single
 quotes; for example,
 
      p 'foo.c'::x
 
-looks up the value of `x' in the scope of the file `foo.c'.
+looks up the value of 'x' in the scope of the file 'foo.c'.
 
-`set case-sensitive on'
-`set case-sensitive off'
-`set case-sensitive auto'
+'set case-sensitive on'
+'set case-sensitive off'
+'set case-sensitive auto'
      Normally, when GDB looks up symbols, it matches their names with
      case sensitivity determined by the current source language.
-     Occasionally, you may wish to control that.  The command `set
-     case-sensitive' lets you do that by specifying `on' for
-     case-sensitive matches or `off' for case-insensitive ones.  If you
-     specify `auto', case sensitivity is reset to the default suitable
-     for the source language.  The default is case-sensitive matches
-     for all languages except for Fortran, for which the default is
+     Occasionally, you may wish to control that.  The command 'set
+     case-sensitive' lets you do that by specifying 'on' for
+     case-sensitive matches or 'off' for case-insensitive ones.  If you
+     specify 'auto', case sensitivity is reset to the default suitable
+     for the source language.  The default is case-sensitive matches for
+     all languages except for Fortran, for which the default is
      case-insensitive matches.
 
-`show case-sensitive'
+'show case-sensitive'
      This command shows the current setting of case sensitivity for
      symbols lookups.
 
-`set print type methods'
-`set print type methods on'
-`set print type methods off'
-     Normally, when GDB prints a class, it displays any methods
-     declared in that class.  You can control this behavior either by
-     passing the appropriate flag to `ptype', or using `set print type
-     methods'.  Specifying `on' will cause GDB to display the methods;
-     this is the default.  Specifying `off' will cause GDB to omit the
-     methods.
+'set print type methods'
+'set print type methods on'
+'set print type methods off'
+     Normally, when GDB prints a class, it displays any methods declared
+     in that class.  You can control this behavior either by passing the
+     appropriate flag to 'ptype', or using 'set print type methods'.
+     Specifying 'on' will cause GDB to display the methods; this is the
+     default.  Specifying 'off' will cause GDB to omit the methods.
 
-`show print type methods'
+'show print type methods'
      This command shows the current setting of method display when
      printing classes.
 
-`set print type typedefs'
-`set print type typedefs on'
-`set print type typedefs off'
-     Normally, when GDB prints a class, it displays any typedefs
-     defined in that class.  You can control this behavior either by
-     passing the appropriate flag to `ptype', or using `set print type
-     typedefs'.  Specifying `on' will cause GDB to display the typedef
-     definitions; this is the default.  Specifying `off' will cause GDB
-     to omit the typedef definitions.  Note that this controls whether
-     the typedef definition itself is printed, not whether typedef
-     names are substituted when printing other types.
+'set print type typedefs'
+'set print type typedefs on'
+'set print type typedefs off'
+
+     Normally, when GDB prints a class, it displays any typedefs defined
+     in that class.  You can control this behavior either by passing the
+     appropriate flag to 'ptype', or using 'set print type typedefs'.
+     Specifying 'on' will cause GDB to display the typedef definitions;
+     this is the default.  Specifying 'off' will cause GDB to omit the
+     typedef definitions.  Note that this controls whether the typedef
+     definition itself is printed, not whether typedef names are
+     substituted when printing other types.
 
-`show print type typedefs'
+'show print type typedefs'
      This command shows the current setting of typedef display when
      printing classes.
 
-`info address SYMBOL'
+'info address SYMBOL'
      Describe where the data for SYMBOL is stored.  For a register
      variable, this says which register it is kept in.  For a
      non-register local variable, this prints the stack-frame offset at
      which the variable is always stored.
 
-     Note the contrast with `print &SYMBOL', which does not work at all
+     Note the contrast with 'print &SYMBOL', which does not work at all
      for a register variable, and for a stack local variable prints the
      exact address of the current instantiation of the variable.
 
-`info symbol ADDR'
-     Print the name of a symbol which is stored at the address ADDR.
-     If no symbol is stored exactly at ADDR, GDB prints the nearest
-     symbol and an offset from it:
+'info symbol ADDR'
+     Print the name of a symbol which is stored at the address ADDR.  If
+     no symbol is stored exactly at ADDR, GDB prints the nearest symbol
+     and an offset from it:
 
           (gdb) info symbol 0x54320
           _initialize_vx + 396 in section .text
 
-     This is the opposite of the `info address' command.  You can use
-     it to find out the name of a variable or a function given its
-     address.
+     This is the opposite of the 'info address' command.  You can use it
+     to find out the name of a variable or a function given its address.
 
      For dynamically linked executables, the name of executable or
      shared library containing the symbol is also printed:
@@ -7170,85 +7532,85 @@ looks up the value of `x' in the scope o
           (gdb) info symbol 0x2aaaac2811cf
           __read_nocancel + 6 in section .text of /usr/lib64/libc.so.6
 
-`demangle [-l LANGUAGE] [-] NAME'
+'demangle [-l LANGUAGE] [--] NAME'
      Demangle NAME.  If LANGUAGE is provided it is the name of the
      language to demangle NAME in.  Otherwise NAME is demangled in the
      current language.
 
-     The `--' option specifies the end of options, and is useful when
+     The '--' option specifies the end of options, and is useful when
      NAME begins with a dash.
 
-     The parameter `demangle-style' specifies how to interpret the kind
-     of mangling used. *Note Print Settings::.
+     The parameter 'demangle-style' specifies how to interpret the kind
+     of mangling used.  *Note Print Settings::.
 
-`whatis[/FLAGS] [ARG]'
+'whatis[/FLAGS] [ARG]'
      Print the data type of ARG, which can be either an expression or a
-     name of a data type.  With no argument, print the data type of
-     `$', the last value in the value history.
+     name of a data type.  With no argument, print the data type of '$',
+     the last value in the value history.
 
      If ARG is an expression (*note Expressions: Expressions.), it is
      not actually evaluated, and any side-effecting operations (such as
      assignments or function calls) inside it do not take place.
 
-     If ARG is a variable or an expression, `whatis' prints its literal
+     If ARG is a variable or an expression, 'whatis' prints its literal
      type as it is used in the source code.  If the type was defined
-     using a `typedef', `whatis' will _not_ print the data type
-     underlying the `typedef'.  If the type of the variable or the
-     expression is a compound data type, such as `struct' or  `class',
-     `whatis' never prints their fields or methods.  It just prints the
-     `struct'/`class' name (a.k.a. its "tag").  If you want to see the
-     members of such a compound data type, use `ptype'.
-
-     If ARG is a type name that was defined using `typedef', `whatis'
-     "unrolls" only one level of that `typedef'.  Unrolling means that
-     `whatis' will show the underlying type used in the `typedef'
+     using a 'typedef', 'whatis' will _not_ print the data type
+     underlying the 'typedef'.  If the type of the variable or the
+     expression is a compound data type, such as 'struct' or 'class',
+     'whatis' never prints their fields or methods.  It just prints the
+     'struct'/'class' name (a.k.a. its "tag").  If you want to see the
+     members of such a compound data type, use 'ptype'.
+
+     If ARG is a type name that was defined using 'typedef', 'whatis'
+     "unrolls" only one level of that 'typedef'.  Unrolling means that
+     'whatis' will show the underlying type used in the 'typedef'
      declaration of ARG.  However, if that underlying type is also a
-     `typedef', `whatis' will not unroll it.
+     'typedef', 'whatis' will not unroll it.
 
-     For C code, the type names may also have the form `class
-     CLASS-NAME', `struct STRUCT-TAG', `union UNION-TAG' or `enum
+     For C code, the type names may also have the form 'class
+     CLASS-NAME', 'struct STRUCT-TAG', 'union UNION-TAG' or 'enum
      ENUM-TAG'.
 
      FLAGS can be used to modify how the type is displayed.  Available
      flags are:
 
-    `r'
+     'r'
           Display in "raw" form.  Normally, GDB substitutes template
           parameters and typedefs defined in a class when printing the
-          class' members.  The `/r' flag disables this.
+          class' members.  The '/r' flag disables this.
 
-    `m'
+     'm'
           Do not print methods defined in the class.
 
-    `M'
+     'M'
           Print methods defined in the class.  This is the default, but
-          the flag exists in case you change the default with `set
-          print type methods'.
+          the flag exists in case you change the default with 'set print
+          type methods'.
 
-    `t'
+     't'
           Do not print typedefs defined in the class.  Note that this
-          controls whether the typedef definition itself is printed,
-          not whether typedef names are substituted when printing other
+          controls whether the typedef definition itself is printed, not
+          whether typedef names are substituted when printing other
           types.
 
-    `T'
-          Print typedefs defined in the class.  This is the default,
-          but the flag exists in case you change the default with `set
-          print type typedefs'.
+     'T'
+          Print typedefs defined in the class.  This is the default, but
+          the flag exists in case you change the default with 'set print
+          type typedefs'.
 
-`ptype[/FLAGS] [ARG]'
-     `ptype' accepts the same arguments as `whatis', but prints a
+'ptype[/FLAGS] [ARG]'
+     'ptype' accepts the same arguments as 'whatis', but prints a
      detailed description of the type, instead of just the name of the
      type.  *Note Expressions: Expressions.
 
-     Contrary to `whatis', `ptype' always unrolls any `typedef's in its
+     Contrary to 'whatis', 'ptype' always unrolls any 'typedef's in its
      argument declaration, whether the argument is a variable,
-     expression, or a data type.  This means that `ptype' of a variable
+     expression, or a data type.  This means that 'ptype' of a variable
      or an expression will not print literally its type as present in
-     the source code--use `whatis' for that.  `typedef's at the pointer
-     or reference targets are also unrolled.  Only `typedef's of
-     fields, methods and inner `class typedef's of `struct's, `class'es
-     and `union's are not unrolled even with `ptype'.
+     the source code--use 'whatis' for that.  'typedef's at the pointer
+     or reference targets are also unrolled.  Only 'typedef's of fields,
+     methods and inner 'class typedef's of 'struct's, 'class'es and
+     'union's are not unrolled even with 'ptype'.
 
      For example, for this variable declaration:
 
@@ -7281,19 +7643,19 @@ looks up the value of `x' in the scope o
           (gdb) ptype real_pointer_var
           type = double *
 
-     As with `whatis', using `ptype' without an argument refers to the
-     type of `$', the last value in the value history.
+     As with 'whatis', using 'ptype' without an argument refers to the
+     type of '$', the last value in the value history.
 
      Sometimes, programs use opaque data types or incomplete
-     specifications of complex data structure.  If the debug
-     information included in the program does not allow GDB to display
-     a full declaration of the data type, it will say `<incomplete
-     type>'.  For example, given these declarations:
+     specifications of complex data structure.  If the debug information
+     included in the program does not allow GDB to display a full
+     declaration of the data type, it will say '<incomplete type>'.  For
+     example, given these declarations:
 
               struct foo;
               struct foo *fooptr;
 
-     but no definition for `struct foo' itself, GDB will say:
+     but no definition for 'struct foo' itself, GDB will say:
 
             (gdb) ptype foo
             $1 = <incomplete type>
@@ -7301,37 +7663,36 @@ looks up the value of `x' in the scope o
      "Incomplete type" is C terminology for data types that are not
      completely specified.
 
-`info types REGEXP'
-`info types'
+'info types REGEXP'
+'info types'
      Print a brief description of all types whose names match the
      regular expression REGEXP (or all types in your program, if you
      supply no argument).  Each complete typename is matched as though
-     it were a complete line; thus, `i type value' gives information on
-     all types in your program whose names include the string `value',
-     but `i type ^value$' gives information only on types whose complete
-     name is `value'.
+     it were a complete line; thus, 'i type value' gives information on
+     all types in your program whose names include the string 'value',
+     but 'i type ^value$' gives information only on types whose complete
+     name is 'value'.
 
-     This command differs from `ptype' in two ways: first, like
-     `whatis', it does not print a detailed description; second, it
+     This command differs from 'ptype' in two ways: first, like
+     'whatis', it does not print a detailed description; second, it
      lists all source files where a type is defined.
 
-`info type-printers'
+'info type-printers'
      Versions of GDB that ship with Python scripting enabled may have
-     "type printers" available.  When using `ptype' or `whatis', these
+     "type printers" available.  When using 'ptype' or 'whatis', these
      printers are consulted when the name of a type is needed.  *Note
      Type Printing API::, for more information on writing type printers.
 
-     `info type-printers' displays all the available type printers.
-
-`enable type-printer NAME...'
+     'info type-printers' displays all the available type printers.
 
-`disable type-printer NAME...'
+'enable type-printer NAME...'
+'disable type-printer NAME...'
      These commands can be used to enable or disable type printers.
 
-`info scope LOCATION'
+'info scope LOCATION'
      List all the variables local to a particular scope.  This command
      accepts a LOCATION argument--a function name, a source line, or an
-     address preceded by a `*', and prints all the variables local to
+     address preceded by a '*', and prints all the variables local to
      the scope defined by that location.  (*Note Specify Location::, for
      details about supported forms of LOCATION.)  For example:
 
@@ -7349,127 +7710,127 @@ looks up the value of `x' in the scope o
      collect during a "trace experiment", see *note collect: Tracepoint
      Actions.
 
-`info source'
-     Show information about the current source file--that is, the
-     source file for the function containing the current point of
-     execution:
+'info source'
+     Show information about the current source file--that is, the source
+     file for the function containing the current point of execution:
         * the name of the source file, and the directory containing it,
-
         * the directory it was compiled in,
-
         * its length, in lines,
-
         * which programming language it is written in,
-
         * if the debug information provides it, the program that
           compiled the file (which may include, e.g., the compiler
           version and command line arguments),
-
-        * whether the executable includes debugging information for
-          that file, and if so, what format the information is in
-          (e.g., STABS, Dwarf 2, etc.), and
-
+        * whether the executable includes debugging information for that
+          file, and if so, what format the information is in (e.g.,
+          STABS, Dwarf 2, etc.), and
         * whether the debugging information includes information about
           preprocessor macros.
 
-`info sources'
-     Print the names of all source files in your program for which
-     there is debugging information, organized into two lists: files
-     whose symbols have already been read, and files whose symbols will
-     be read when needed.
+'info sources'
+     Print the names of all source files in your program for which there
+     is debugging information, organized into two lists: files whose
+     symbols have already been read, and files whose symbols will be
+     read when needed.
 
-`info functions'
+'info functions'
      Print the names and data types of all defined functions.
 
-`info functions REGEXP'
-     Print the names and data types of all defined functions whose
-     names contain a match for regular expression REGEXP.  Thus, `info
-     fun step' finds all functions whose names include `step'; `info
-     fun ^step' finds those whose names start with `step'.  If a
-     function name contains characters that conflict with the regular
-     expression language (e.g.  `operator*()'), they may be quoted with
-     a backslash.
+'info functions REGEXP'
+     Print the names and data types of all defined functions whose names
+     contain a match for regular expression REGEXP.  Thus, 'info fun
+     step' finds all functions whose names include 'step'; 'info fun
+     ^step' finds those whose names start with 'step'.  If a function
+     name contains characters that conflict with the regular expression
+     language (e.g. 'operator*()'), they may be quoted with a backslash.
 
-`info variables'
+'info variables'
      Print the names and data types of all variables that are defined
      outside of functions (i.e. excluding local variables).
 
-`info variables REGEXP'
+'info variables REGEXP'
      Print the names and data types of all variables (except for local
      variables) whose names contain a match for regular expression
      REGEXP.
 
-`info classes'
-`info classes REGEXP'
+'info classes'
+'info classes REGEXP'
      Display all Objective-C classes in your program, or (with the
      REGEXP argument) all those matching a particular regular
      expression.
 
-`info selectors'
-`info selectors REGEXP'
+'info selectors'
+'info selectors REGEXP'
      Display all Objective-C selectors in your program, or (with the
      REGEXP argument) all those matching a particular regular
      expression.
 
-`set opaque-type-resolution on'
+'set opaque-type-resolution on'
      Tell GDB to resolve opaque types.  An opaque type is a type
-     declared as a pointer to a `struct', `class', or `union'--for
-     example, `struct MyType *'--that is used in one source file
-     although the full declaration of `struct MyType' is in another
+     declared as a pointer to a 'struct', 'class', or 'union'--for
+     example, 'struct MyType *'--that is used in one source file
+     although the full declaration of 'struct MyType' is in another
      source file.  The default is on.
 
      A change in the setting of this subcommand will not take effect
      until the next time symbols for a file are loaded.
 
-`set opaque-type-resolution off'
+'set opaque-type-resolution off'
      Tell GDB not to resolve opaque types.  In this case, the type is
      printed as follows:
           {<no data fields>}
 
-`show opaque-type-resolution'
+'show opaque-type-resolution'
      Show whether opaque types are resolved or not.
 
-`set print symbol-loading'
-`set print symbol-loading full'
-`set print symbol-loading brief'
-`set print symbol-loading off'
-     The `set print symbol-loading' command allows you to control the
-     printing of messages when GDB loads symbol information.  By
-     default a message is printed for the executable and one for each
-     shared library, and normally this is what you want.  However, when
+'set print symbol-loading'
+'set print symbol-loading full'
+'set print symbol-loading brief'
+'set print symbol-loading off'
+     The 'set print symbol-loading' command allows you to control the
+     printing of messages when GDB loads symbol information.  By default
+     a message is printed for the executable and one for each shared
+     library, and normally this is what you want.  However, when
      debugging apps with large numbers of shared libraries these
-     messages can be annoying.  When set to `brief' a message is
-     printed for each executable, and when GDB loads a collection of
-     shared libraries at once it will only print one message regardless
-     of the number of shared libraries.  When set to `off' no messages
-     are printed.
+     messages can be annoying.  When set to 'brief' a message is printed
+     for each executable, and when GDB loads a collection of shared
+     libraries at once it will only print one message regardless of the
+     number of shared libraries.  When set to 'off' no messages are
+     printed.
 
-`show print symbol-loading'
+'show print symbol-loading'
      Show whether messages will be printed when a GDB command entered
      from the keyboard causes symbol information to be loaded.
 
-`maint print symbols FILENAME'
-`maint print psymbols FILENAME'
-`maint print msymbols FILENAME'
-     Write a dump of debugging symbol data into the file FILENAME.
-     These commands are used to debug the GDB symbol-reading code.  Only
-     symbols with debugging data are included.  If you use `maint print
-     symbols', GDB includes all the symbols for which it has already
-     collected full details: that is, FILENAME reflects symbols for
-     only those files whose symbols GDB has read.  You can use the
-     command `info sources' to find out which files these are.  If you
-     use `maint print psymbols' instead, the dump shows information
-     about symbols that GDB only knows partially--that is, symbols
-     defined in files that GDB has skimmed, but not yet read
-     completely.  Finally, `maint print msymbols' dumps just the
-     minimal symbol information required for each object file from
-     which GDB has read some symbols.  *Note Commands to Specify Files:
-     Files, for a discussion of how GDB reads symbols (in the
-     description of `symbol-file').
-
-`maint info symtabs [ REGEXP ]'
-`maint info psymtabs [ REGEXP ]'
-     List the `struct symtab' or `struct partial_symtab' structures
+'maint print symbols [-pc ADDRESS] [FILENAME]'
+'maint print symbols [-objfile OBJFILE] [-source SOURCE] [--] [FILENAME]'
+'maint print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [FILENAME]'
+'maint print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [FILENAME]'
+'maint print msymbols [-objfile OBJFILE] [--] [FILENAME]'
+     Write a dump of debugging symbol data into the file FILENAME or the
+     terminal if FILENAME is unspecified.  If '-objfile OBJFILE' is
+     specified, only dump symbols for that objfile.  If '-pc ADDRESS' is
+     specified, only dump symbols for the file with code at that
+     address.  Note that ADDRESS may be a symbol like 'main'.  If
+     '-source SOURCE' is specified, only dump symbols for that source
+     file.
+
+     These commands are used to debug the GDB symbol-reading code.
+     These commands do not modify internal GDB state, therefore 'maint
+     print symbols' will only print symbols for already expanded symbol
+     tables.  You can use the command 'info sources' to find out which
+     files these are.  If you use 'maint print psymbols' instead, the
+     dump shows information about symbols that GDB only knows
+     partially--that is, symbols defined in files that GDB has skimmed,
+     but not yet read completely.  Finally, 'maint print msymbols' just
+     dumps "minimal symbols", e.g., "ELF symbols".
+
+     *Note Commands to Specify Files: Files, for a discussion of how GDB
+     reads symbols (in the description of 'symbol-file').
+
+'maint info symtabs [ REGEXP ]'
+'maint info psymtabs [ REGEXP ]'
+
+     List the 'struct symtab' or 'struct partial_symtab' structures
      whose names match REGEXP.  If REGEXP is not given, list them all.
      The output includes expressions which you can copy into a GDB
      debugging this one to examine a particular structure in more
@@ -7491,7 +7852,7 @@ looks up the value of `x' in the scope o
           (gdb) maint info symtabs
           (gdb)
      We see that there is one partial symbol table whose filename
-     contains the string `dwarf2read', belonging to the `gdb'
+     contains the string 'dwarf2read', belonging to the 'gdb'
      executable; and we see that GDB has not read in any symtabs yet at
      all.  If we set a breakpoint on a function, that will cause GDB to
      read the symtab for the compilation unit containing that function:
@@ -7513,51 +7874,30 @@ looks up the value of `x' in the scope o
           }
           (gdb)
 
-`maint set symbol-cache-size SIZE'
+'maint info line-table [ REGEXP ]'
+
+     List the 'struct linetable' from all 'struct symtab' instances
+     whose name matches REGEXP.  If REGEXP is not given, list the
+     'struct linetable' from all 'struct symtab'.
+
+'maint set symbol-cache-size SIZE'
      Set the size of the symbol cache to SIZE.  The default size is
      intended to be good enough for debugging most applications.  This
      option exists to allow for experimenting with different sizes.
 
-`maint show symbol-cache-size'
+'maint show symbol-cache-size'
      Show the size of the symbol cache.
 
-`maint print symbol-cache'
+'maint print symbol-cache'
      Print the contents of the symbol cache.  This is useful when
      debugging symbol cache issues.
 
-`maint print symbol-cache-statistics'
-     Print symbol cache usage statistics.  This helps determine how
-     well the cache is being utilized.
+'maint print symbol-cache-statistics'
+     Print symbol cache usage statistics.  This helps determine how well
+     the cache is being utilized.
 
-`maint flush-symbol-cache'
+'maint flush-symbol-cache'
      Flush the contents of the symbol cache, all entries are removed.
-     This command is useful when debugging the symbol cache.  It is
-     also useful when collecting performance data.
-
-
-
-File: gdb.info,  Node: Altering,  Next: GDB Files,  Prev: Symbols,  Up: Top
-
-17 Altering Execution
-*********************
-
-Once you think you have found an error in your program, you might want
-to find out for certain whether correcting the apparent error would
-lead to correct results in the rest of the run.  You can find the
-answer by experiment, using the GDB features for altering execution of
-the program.
-
-   For example, you can store new values into variables or memory
-locations, give your program a signal, restart it at a different
-address, or even return prematurely from a function.
-
-* Menu:
-
-* Assignment::                  Assignment to variables
-* Jumping::                     Continuing at a different address
-* Signaling::                   Giving your program a signal
-* Returning::                   Returning from a function
-* Calling::                     Calling your program's functions
-* Patching::                    Patching your program
-* Compiling and Injecting Code:: Compiling and injecting code in GDB
+     This command is useful when debugging the symbol cache.  It is also
+     useful when collecting performance data.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-3 ./gdb/doc/gdb.info-3
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-3	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-3	2017-03-06 01:53:16.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,6 +37,32 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Altering,  Next: GDB Files,  Prev: Symbols,  Up: Top
+
+17 Altering Execution
+*********************
+
+Once you think you have found an error in your program, you might want
+to find out for certain whether correcting the apparent error would lead
+to correct results in the rest of the run.  You can find the answer by
+experiment, using the GDB features for altering execution of the
+program.
+
+   For example, you can store new values into variables or memory
+locations, give your program a signal, restart it at a different
+address, or even return prematurely from a function.
+
+* Menu:
+
+* Assignment::                  Assignment to variables
+* Jumping::                     Continuing at a different address
+* Signaling::                   Giving your program a signal
+* Returning::                   Returning from a function
+* Calling::                     Calling your program's functions
+* Patching::                    Patching your program
+* Compiling and Injecting Code:: Compiling and injecting code in GDB
+
+
 File: gdb.info,  Node: Assignment,  Next: Jumping,  Up: Altering
 
 17.1 Assignment to Variables
@@ -48,23 +73,23 @@ To alter the value of a variable, evalua
 
      print x=4
 
-stores the value 4 into the variable `x', and then prints the value of
+stores the value 4 into the variable 'x', and then prints the value of
 the assignment expression (which is 4).  *Note Using GDB with Different
 Languages: Languages, for more information on operators in supported
 languages.
 
    If you are not interested in seeing the value of the assignment, use
-the `set' command instead of the `print' command.  `set' is really the
-same as `print' except that the expression's value is not printed and
-is not put in the value history (*note Value History: Value History.).
-The expression is evaluated only for its effects.
-
-   If the beginning of the argument string of the `set' command appears
-identical to a `set' subcommand, use the `set variable' command instead
-of just `set'.  This command is identical to `set' except for its lack
-of subcommands.  For example, if your program has a variable `width',
-you get an error if you try to set a new value with just `set
-width=13', because GDB has the command `set width':
+the 'set' command instead of the 'print' command.  'set' is really the
+same as 'print' except that the expression's value is not printed and is
+not put in the value history (*note Value History: Value History.).  The
+expression is evaluated only for its effects.
+
+   If the beginning of the argument string of the 'set' command appears
+identical to a 'set' subcommand, use the 'set variable' command instead
+of just 'set'.  This command is identical to 'set' except for its lack
+of subcommands.  For example, if your program has a variable 'width',
+you get an error if you try to set a new value with just 'set width=13',
+because GDB has the command 'set width':
 
      (gdb) whatis width
      type = double
@@ -73,17 +98,17 @@ width=13', because GDB has the command `
      (gdb) set width=47
      Invalid syntax in expression.
 
-The invalid expression, of course, is `=47'.  In order to actually set
-the program's variable `width', use
+The invalid expression, of course, is '=47'.  In order to actually set
+the program's variable 'width', use
 
      (gdb) set var width=47
 
-   Because the `set' command has many subcommands that can conflict
-with the names of program variables, it is a good idea to use the `set
-variable' command instead of just `set'.  For example, if your program
-has a variable `g', you run into problems if you try to set a new value
-with just `set g=4', because GDB has the command `set gnutarget',
-abbreviated `set g':
+   Because the 'set' command has many subcommands that can conflict with
+the names of program variables, it is a good idea to use the 'set
+variable' command instead of just 'set'.  For example, if your program
+has a variable 'g', you run into problems if you try to set a new value
+with just 'set g=4', because GDB has the command 'set gnutarget',
+abbreviated 'set g':
 
      (gdb) whatis g
      type = double
@@ -101,20 +126,20 @@ abbreviated `set g':
      (gdb) show g
      The current BFD target is "=4".
 
-The program variable `g' did not change, and you silently set the
-`gnutarget' to an invalid value.  In order to set the variable `g', use
+The program variable 'g' did not change, and you silently set the
+'gnutarget' to an invalid value.  In order to set the variable 'g', use
 
      (gdb) set var g=4
 
    GDB allows more implicit conversions in assignments than C; you can
-freely store an integer value into a pointer variable or vice versa,
-and you can convert any structure to any other structure that is the
-same length or shorter.
+freely store an integer value into a pointer variable or vice versa, and
+you can convert any structure to any other structure that is the same
+length or shorter.
 
-   To store values into arbitrary places in memory, use the `{...}'
+   To store values into arbitrary places in memory, use the '{...}'
 construct to generate a value of specified type at a specified address
-(*note Expressions: Expressions.).  For example, `{int}0x83040' refers
-to memory location `0x83040' as an integer (which implies a certain size
+(*note Expressions: Expressions.).  For example, '{int}0x83040' refers
+to memory location '0x83040' as an integer (which implies a certain size
 and representation in memory), and
 
      set {int}0x83040 = 4
@@ -128,43 +153,40 @@ File: gdb.info,  Node: Jumping,  Next: S
 ======================================
 
 Ordinarily, when you continue your program, you do so at the place where
-it stopped, with the `continue' command.  You can instead continue at
-an address of your own choosing, with the following commands:
+it stopped, with the 'continue' command.  You can instead continue at an
+address of your own choosing, with the following commands:
 
-`jump LINESPEC'
-`j LINESPEC'
-`jump LOCATION'
-`j LOCATION'
-     Resume execution at line LINESPEC or at address given by LOCATION.
-     Execution stops again immediately if there is a breakpoint there.
-     *Note Specify Location::, for a description of the different forms
-     of LINESPEC and LOCATION.  It is common practice to use the
-     `tbreak' command in conjunction with `jump'.  *Note Setting
-     Breakpoints: Set Breaks.
+'jump LOCATION'
+'j LOCATION'
+     Resume execution at LOCATION.  Execution stops again immediately if
+     there is a breakpoint there.  *Note Specify Location::, for a
+     description of the different forms of LOCATION.  It is common
+     practice to use the 'tbreak' command in conjunction with 'jump'.
+     *Note Setting Breakpoints: Set Breaks.
 
-     The `jump' command does not change the current stack frame, or the
+     The 'jump' command does not change the current stack frame, or the
      stack pointer, or the contents of any memory location or any
-     register other than the program counter.  If line LINESPEC is in a
+     register other than the program counter.  If LOCATION is in a
      different function from the one currently executing, the results
      may be bizarre if the two functions expect different patterns of
-     arguments or of local variables.  For this reason, the `jump'
+     arguments or of local variables.  For this reason, the 'jump'
      command requests confirmation if the specified line is not in the
      function currently executing.  However, even bizarre results are
      predictable if you are well acquainted with the machine-language
      code of your program.
 
-   On many systems, you can get much the same effect as the `jump'
-command by storing a new value into the register `$pc'.  The difference
+   On many systems, you can get much the same effect as the 'jump'
+command by storing a new value into the register '$pc'.  The difference
 is that this does not start your program running; it only changes the
 address of where it _will_ run when you continue.  For example,
 
      set $pc = 0x485
 
-makes the next `continue' command or stepping command execute at
-address `0x485', rather than at the address where your program stopped.
-*Note Continuing and Stepping: Continuing and Stepping.
+makes the next 'continue' command or stepping command execute at address
+'0x485', rather than at the address where your program stopped.  *Note
+Continuing and Stepping: Continuing and Stepping.
 
-   The most common occasion to use the `jump' command is to back
+   The most common occasion to use the 'jump' command is to back
 up--perhaps with more breakpoints set--over a portion of a program that
 has already executed, in order to examine its execution in more detail.
 
@@ -174,56 +196,56 @@ File: gdb.info,  Node: Signaling,  Next:
 17.3 Giving your Program a Signal
 =================================
 
-`signal SIGNAL'
+'signal SIGNAL'
      Resume execution where your program is stopped, but immediately
      give it the signal SIGNAL.  The SIGNAL can be the name or the
-     number of a signal.  For example, on many systems `signal 2' and
-     `signal SIGINT' are both ways of sending an interrupt signal.
+     number of a signal.  For example, on many systems 'signal 2' and
+     'signal SIGINT' are both ways of sending an interrupt signal.
 
-     Alternatively, if SIGNAL is zero, continue execution without
-     giving a signal.  This is useful when your program stopped on
-     account of a signal and would ordinarily see the signal when
-     resumed with the `continue' command; `signal 0' causes it to
-     resume without a signal.
-
-     _Note:_ When resuming a multi-threaded program, SIGNAL is
-     delivered to the currently selected thread, not the thread that
-     last reported a stop.  This includes the situation where a thread
-     was stopped due to a signal.  So if you want to continue execution
-     suppressing the signal that stopped a thread, you should select
-     that same thread before issuing the `signal 0' command.  If you
-     issue the `signal 0' command with another thread as the selected
-     one, GDB detects that and asks for confirmation.
-
-     Invoking the `signal' command is not the same as invoking the
-     `kill' utility from the shell.  Sending a signal with `kill'
-     causes GDB to decide what to do with the signal depending on the
-     signal handling tables (*note Signals::).  The `signal' command
-     passes the signal directly to your program.
+     Alternatively, if SIGNAL is zero, continue execution without giving
+     a signal.  This is useful when your program stopped on account of a
+     signal and would ordinarily see the signal when resumed with the
+     'continue' command; 'signal 0' causes it to resume without a
+     signal.
+
+     _Note:_ When resuming a multi-threaded program, SIGNAL is delivered
+     to the currently selected thread, not the thread that last reported
+     a stop.  This includes the situation where a thread was stopped due
+     to a signal.  So if you want to continue execution suppressing the
+     signal that stopped a thread, you should select that same thread
+     before issuing the 'signal 0' command.  If you issue the 'signal 0'
+     command with another thread as the selected one, GDB detects that
+     and asks for confirmation.
+
+     Invoking the 'signal' command is not the same as invoking the
+     'kill' utility from the shell.  Sending a signal with 'kill' causes
+     GDB to decide what to do with the signal depending on the signal
+     handling tables (*note Signals::).  The 'signal' command passes the
+     signal directly to your program.
 
-     `signal' does not repeat when you press <RET> a second time after
+     'signal' does not repeat when you press <RET> a second time after
      executing the command.
 
-`queue-signal SIGNAL'
-     Queue SIGNAL to be delivered immediately to the current thread
-     when execution of the thread resumes.  The SIGNAL can be the name
-     or the number of a signal.  For example, on many systems `signal
-     2' and `signal SIGINT' are both ways of sending an interrupt
-     signal.  The handling of the signal must be set to pass the signal
-     to the program, otherwise GDB will report an error.  You can
-     control the handling of signals from GDB with the `handle' command
-     (*note Signals::).
+'queue-signal SIGNAL'
+     Queue SIGNAL to be delivered immediately to the current thread when
+     execution of the thread resumes.  The SIGNAL can be the name or the
+     number of a signal.  For example, on many systems 'signal 2' and
+     'signal SIGINT' are both ways of sending an interrupt signal.  The
+     handling of the signal must be set to pass the signal to the
+     program, otherwise GDB will report an error.  You can control the
+     handling of signals from GDB with the 'handle' command (*note
+     Signals::).
 
      Alternatively, if SIGNAL is zero, any currently queued signal for
      the current thread is discarded and when execution resumes no
-     signal will be delivered.  This is useful when your program
-     stopped on account of a signal and would ordinarily see the signal
-     when resumed with the `continue' command.
+     signal will be delivered.  This is useful when your program stopped
+     on account of a signal and would ordinarily see the signal when
+     resumed with the 'continue' command.
 
-     This command differs from the `signal' command in that the signal
-     is just queued, execution is not resumed.  And `queue-signal'
+     This command differs from the 'signal' command in that the signal
+     is just queued, execution is not resumed.  And 'queue-signal'
      cannot be used to pass a signal whose handling state has been set
-     to `nopass' (*note Signals::).
+     to 'nopass' (*note Signals::).
 
    *Note stepping into signal handlers::, for information on how
 stepping commands behave when the thread has a signal queued.
@@ -234,16 +256,16 @@ File: gdb.info,  Node: Returning,  Next:
 17.4 Returning from a Function
 ==============================
 
-`return'
-`return EXPRESSION'
-     You can cancel execution of a function call with the `return'
+'return'
+'return EXPRESSION'
+     You can cancel execution of a function call with the 'return'
      command.  If you give an EXPRESSION argument, its value is used as
      the function's return value.
 
-   When you use `return', GDB discards the selected stack frame (and
-all frames within it).  You can think of this as making the discarded
-frame return prematurely.  If you wish to specify a value to be
-returned, give that value as the argument to `return'.
+   When you use 'return', GDB discards the selected stack frame (and all
+frames within it).  You can think of this as making the discarded frame
+return prematurely.  If you wish to specify a value to be returned, give
+that value as the argument to 'return'.
 
    This pops the selected stack frame (*note Selecting a Frame:
 Selection.), and any other frames inside of it, leaving its caller as
@@ -251,28 +273,28 @@ the innermost remaining frame.  That fra
 specified value is stored in the registers used for returning values of
 functions.
 
-   The `return' command does not resume execution; it leaves the
-program stopped in the state that would exist if the function had just
-returned.  In contrast, the `finish' command (*note Continuing and
-Stepping: Continuing and Stepping.) resumes execution until the
-selected stack frame returns naturally.
+   The 'return' command does not resume execution; it leaves the program
+stopped in the state that would exist if the function had just returned.
+In contrast, the 'finish' command (*note Continuing and Stepping:
+Continuing and Stepping.) resumes execution until the selected stack
+frame returns naturally.
 
    GDB needs to know how the EXPRESSION argument should be set for the
 inferior.  The concrete registers assignment depends on the OS ABI and
 the type being returned by the selected stack frame.  For example it is
-common for OS ABI to return floating point values in FPU registers
-while integer values in CPU registers.  Still some ABIs return even
-floating point values in CPU registers.  Larger integer widths (such as
-`long long int') also have specific placement rules.  GDB already knows
-the OS ABI from its current target so it needs to find out also the
-type being returned to make the assignment into the right register(s).
+common for OS ABI to return floating point values in FPU registers while
+integer values in CPU registers.  Still some ABIs return even floating
+point values in CPU registers.  Larger integer widths (such as 'long
+long int') also have specific placement rules.  GDB already knows the OS
+ABI from its current target so it needs to find out also the type being
+returned to make the assignment into the right register(s).
 
    Normally, the selected stack frame has debug info.  GDB will always
 use the debug info instead of the implicit type of EXPRESSION when the
-debug info is available.  For example, if you type `return -1', and the
-function in the current stack frame is declared to return a `long long
-int', GDB transparently converts the implicit `int' value of -1 into a
-`long long int':
+debug info is available.  For example, if you type 'return -1', and the
+function in the current stack frame is declared to return a 'long long
+int', GDB transparently converts the implicit 'int' value of -1 into a
+'long long int':
 
      Breakpoint 1, func () at gdb.base/return-nodebug.c:29
      29        return 31;
@@ -286,11 +308,10 @@ int', GDB transparently converts the imp
 e.g., if the function was compiled without debug info, GDB has to find
 out the type to return from user.  Specifying a different type by
 mistake may set the value in different inferior registers than the
-caller code expects.  For example, typing `return -1' with its implicit
-type `int' would set only a part of a `long long int' result for a
-debug info less function (on 32-bit architectures).  Therefore the user
-is required to specify the return type by an appropriate cast
-explicitly:
+caller code expects.  For example, typing 'return -1' with its implicit
+type 'int' would set only a part of a 'long long int' result for a debug
+info less function (on 32-bit architectures).  Therefore the user is
+required to specify the return type by an appropriate cast explicitly:
 
      Breakpoint 2, 0x0040050b in func ()
      (gdb) return -1
@@ -307,47 +328,47 @@ File: gdb.info,  Node: Calling,  Next: P
 17.5 Calling Program Functions
 ==============================
 
-`print EXPR'
+'print EXPR'
      Evaluate the expression EXPR and display the resulting value.  The
      expression may include calls to functions in the program being
      debugged.
 
-`call EXPR'
-     Evaluate the expression EXPR without displaying `void' returned
+'call EXPR'
+     Evaluate the expression EXPR without displaying 'void' returned
      values.
 
-     You can use this variant of the `print' command if you want to
+     You can use this variant of the 'print' command if you want to
      execute a function from your program that does not return anything
      (a.k.a. "a void function"), but without cluttering the output with
-     `void' returned values that GDB will otherwise print.  If the
+     'void' returned values that GDB will otherwise print.  If the
      result is not void, it is printed and saved in the value history.
 
-   It is possible for the function you call via the `print' or `call'
-command to generate a signal (e.g., if there's a bug in the function,
-or if you passed it incorrect arguments).  What happens in that case is
-controlled by the `set unwindonsignal' command.
+   It is possible for the function you call via the 'print' or 'call'
+command to generate a signal (e.g., if there's a bug in the function, or
+if you passed it incorrect arguments).  What happens in that case is
+controlled by the 'set unwindonsignal' command.
 
    Similarly, with a C++ program it is possible for the function you
-call via the `print' or `call' command to generate an exception that is
+call via the 'print' or 'call' command to generate an exception that is
 not handled due to the constraints of the dummy frame.  In this case,
 any exception that is raised in the frame, but has an out-of-frame
 exception handler will not be found.  GDB builds a dummy-frame for the
 inferior function call, and the unwinder cannot seek for exception
 handlers outside of this dummy-frame.  What happens in that case is
-controlled by the `set unwind-on-terminating-exception' command.
+controlled by the 'set unwind-on-terminating-exception' command.
 
-`set unwindonsignal'
+'set unwindonsignal'
      Set unwinding of the stack if a signal is received while in a
      function that GDB called in the program being debugged.  If set to
      on, GDB unwinds the stack it created for the call and restores the
      context to what it was before the call.  If set to off (the
      default), GDB stops in the frame where the signal was received.
 
-`show unwindonsignal'
-     Show the current setting of stack unwinding in the functions
-     called by GDB.
+'show unwindonsignal'
+     Show the current setting of stack unwinding in the functions called
+     by GDB.
 
-`set unwind-on-terminating-exception'
+'set unwind-on-terminating-exception'
      Set unwinding of the stack if a C++ exception is raised, but left
      unhandled while in a function that GDB called in the program being
      debugged.  If set to on (the default), GDB unwinds the stack it
@@ -355,17 +376,16 @@ controlled by the `set unwind-on-termina
      the call.  If set to off, GDB the exception is delivered to the
      default C++ exception handler and the inferior terminated.
 
-`show unwind-on-terminating-exception'
-     Show the current setting of stack unwinding in the functions
-     called by GDB.
-
-
-   Sometimes, a function you wish to call is actually a "weak alias"
-for another function.  In such case, GDB might not pick up the type
-information, including the types of the function arguments, which
-causes GDB to call the inferior function incorrectly.  As a result, the
-called function will function erroneously and may even crash.  A
-solution to that is to use the name of the aliased function instead.
+'show unwind-on-terminating-exception'
+     Show the current setting of stack unwinding in the functions called
+     by GDB.
+
+   Sometimes, a function you wish to call is actually a "weak alias" for
+another function.  In such case, GDB might not pick up the type
+information, including the types of the function arguments, which causes
+GDB to call the inferior function incorrectly.  As a result, the called
+function will function erroneously and may even crash.  A solution to
+that is to use the name of the aliased function instead.
 
 
 File: gdb.info,  Node: Patching,  Next: Compiling and Injecting Code,  Prev: Calling,  Up: Altering
@@ -373,26 +393,26 @@ File: gdb.info,  Node: Patching,  Next: 
 17.6 Patching Programs
 ======================
 
-By default, GDB opens the file containing your program's executable
-code (or the corefile) read-only.  This prevents accidental alterations
-to machine code; but it also prevents you from intentionally patching
-your program's binary.
+By default, GDB opens the file containing your program's executable code
+(or the corefile) read-only.  This prevents accidental alterations to
+machine code; but it also prevents you from intentionally patching your
+program's binary.
 
    If you'd like to be able to patch the binary, you can specify that
-explicitly with the `set write' command.  For example, you might want
-to turn on internal debugging flags, or even to make emergency repairs.
+explicitly with the 'set write' command.  For example, you might want to
+turn on internal debugging flags, or even to make emergency repairs.
 
-`set write on'
-`set write off'
-     If you specify `set write on', GDB opens executable and core files
-     for both reading and writing; if you specify `set write off' (the
+'set write on'
+'set write off'
+     If you specify 'set write on', GDB opens executable and core files
+     for both reading and writing; if you specify 'set write off' (the
      default), GDB opens them read-only.
 
      If you have already loaded a file, you must load it again (using
-     the `exec-file' or `core-file' command) after changing `set
-     write', for your new setting to take effect.
+     the 'exec-file' or 'core-file' command) after changing 'set write',
+     for your new setting to take effect.
 
-`show write'
+'show write'
      Display whether executable files and core files are opened for
      writing as well as reading.
 
@@ -403,22 +423,22 @@ File: gdb.info,  Node: Compiling and Inj
 ========================================
 
 GDB supports on-demand compilation and code injection into programs
-running under GDB.  GCC 5.0 or higher built with `libcc1.so' must be
+running under GDB.  GCC 5.0 or higher built with 'libcc1.so' must be
 installed for this functionality to be enabled.  This functionality is
 implemented with the following commands.
 
-`compile code SOURCE-CODE'
-`compile code -raw - SOURCE-CODE'
+'compile code SOURCE-CODE'
+'compile code -raw -- SOURCE-CODE'
      Compile SOURCE-CODE with the compiler language found as the current
      language in GDB (*note Languages::).  If compilation and injection
-     is not supported with the current language specified in GDB, or
-     the compiler does not support this feature, an error message will
-     be printed.  If SOURCE-CODE compiles and links successfully, GDB
-     will load the object-code emitted, and execute it within the
-     context of the currently selected inferior.  It is important to
-     note that the compiled code is executed immediately.  After
-     execution, the compiled code is removed from GDB and any new types
-     or variables you have defined will be deleted.
+     is not supported with the current language specified in GDB, or the
+     compiler does not support this feature, an error message will be
+     printed.  If SOURCE-CODE compiles and links successfully, GDB will
+     load the object-code emitted, and execute it within the context of
+     the currently selected inferior.  It is important to note that the
+     compiled code is executed immediately.  After execution, the
+     compiled code is removed from GDB and any new types or variables
+     you have defined will be deleted.
 
      The command allows you to specify SOURCE-CODE in two ways.  The
      simplest method is to provide a single line of code to the command.
@@ -427,16 +447,16 @@ implemented with the following commands.
           compile code printf ("hello world\n");
 
      If you specify options on the command line as well as source code,
-     they may conflict.  The `--' delimiter can be used to separate
+     they may conflict.  The '--' delimiter can be used to separate
      options from actual source code.  E.g.:
 
           compile code -r -- printf ("hello world\n");
 
      Alternatively you can enter source code as multiple lines of text.
-     To enter this mode, invoke the `compile code' command without any
+     To enter this mode, invoke the 'compile code' command without any
      text following the command.  This will start the multiple-line
      editor and allow you to type as many lines of source code as
-     required.  When you have completed typing, enter `end' on its own
+     required.  When you have completed typing, enter 'end' on its own
      line to exit the editor.
 
           compile code
@@ -444,47 +464,47 @@ implemented with the following commands.
           >printf ("world\n");
           >end
 
-     Specifying `-raw', prohibits GDB from wrapping the provided
+     Specifying '-raw', prohibits GDB from wrapping the provided
      SOURCE-CODE in a callable scope.  In this case, you must specify
      the entry point of the code by defining a function named
-     `_gdb_expr_'.  The `-raw' code cannot access variables of the
-     inferior.  Using `-raw' option may be needed for example when
-     SOURCE-CODE requires `#include' lines which may conflict with
+     '_gdb_expr_'.  The '-raw' code cannot access variables of the
+     inferior.  Using '-raw' option may be needed for example when
+     SOURCE-CODE requires '#include' lines which may conflict with
      inferior symbols otherwise.
 
-`compile file FILENAME'
-`compile file -raw FILENAME'
-     Like `compile code', but take the source code from FILENAME.
+'compile file FILENAME'
+'compile file -raw FILENAME'
+     Like 'compile code', but take the source code from FILENAME.
 
           compile file /home/user/example.c
 
-`compile print EXPR'
-`compile print /F EXPR'
+'compile print EXPR'
+'compile print /F EXPR'
      Compile and execute EXPR with the compiler language found as the
      current language in GDB (*note Languages::).  By default the value
      of EXPR is printed in a format appropriate to its data type; you
-     can choose a different format by specifying `/F', where F is a
+     can choose a different format by specifying '/F', where F is a
      letter specifying the format; see *note Output Formats: Output
      Formats.
 
-`compile print'
-`compile print /F'
+'compile print'
+'compile print /F'
      Alternatively you can enter the expression (source code producing
      it) as multiple lines of text.  To enter this mode, invoke the
-     `compile print' command without any text following the command.
+     'compile print' command without any text following the command.
      This will start the multiple-line editor.
 
 The process of compiling and injecting the code can be inspected using:
 
-`set debug compile'
+'set debug compile'
      Turns on or off display of GDB process of compiling and injecting
      the code.  The default is off.
 
-`show debug compile'
+'show debug compile'
      Displays the current state of displaying GDB process of compiling
      and injecting the code.
 
-17.7.1 Compilation options for the `compile' command
+17.7.1 Compilation options for the 'compile' command
 ----------------------------------------------------
 
 GDB needs to specify the right compilation options for the code to be
@@ -493,47 +513,47 @@ part to make the injected code compatibl
 
 The options used, in increasing precedence:
 
-target architecture and OS options (`gdbarch')
+target architecture and OS options ('gdbarch')
      These options depend on target processor type and target operating
-     system, usually they specify at least 32-bit (`-m32') or 64-bit
-     (`-m64') compilation option.
+     system, usually they specify at least 32-bit ('-m32') or 64-bit
+     ('-m64') compilation option.
 
 compilation options recorded in the target
      GCC (since version 4.7) stores the options used for compilation
-     into `DW_AT_producer' part of DWARF debugging information according
-     to the GCC option `-grecord-gcc-switches'.  One has to explicitly
-     specify `-g' during inferior compilation otherwise GCC produces no
-     DWARF.  This feature is only relevant for platforms where `-g'
+     into 'DW_AT_producer' part of DWARF debugging information according
+     to the GCC option '-grecord-gcc-switches'.  One has to explicitly
+     specify '-g' during inferior compilation otherwise GCC produces no
+     DWARF. This feature is only relevant for platforms where '-g'
      produces DWARF by default, otherwise one may try to enforce DWARF
-     by using `-gdwarf-4'.
+     by using '-gdwarf-4'.
 
-compilation options set by `set compile-args'
+compilation options set by 'set compile-args'
 
 You can override compilation options using the following command:
 
-`set compile-args'
+'set compile-args'
      Set compilation options used for compiling and injecting code with
-     the `compile' commands.  These options override any conflicting
+     the 'compile' commands.  These options override any conflicting
      ones from the target architecture and/or options stored during
      inferior compilation.
 
-`show compile-args'
+'show compile-args'
      Displays the current state of compilation options override.  This
-     does not show all the options actually used during compilation,
-     use *note set debug compile:: for that.
+     does not show all the options actually used during compilation, use
+     *note set debug compile:: for that.
 
-17.7.2 Caveats when using the `compile' command
+17.7.2 Caveats when using the 'compile' command
 -----------------------------------------------
 
-There are a few caveats to keep in mind when using the `compile'
+There are a few caveats to keep in mind when using the 'compile'
 command.  As the caveats are different per language, the table below
 highlights specific issues on a per language basis.
 
 C code examples and caveats
-     When the language in GDB is set to `C', the compiler will attempt
-     to compile the source code with a `C' compiler.  The source code
-     provided to the `compile' command will have much the same access
-     to variables and types as it normally would if it were part of the
+     When the language in GDB is set to 'C', the compiler will attempt
+     to compile the source code with a 'C' compiler.  The source code
+     provided to the 'compile' command will have much the same access to
+     variables and types as it normally would if it were part of the
      program currently being debugged in GDB.
 
      Below is a sample program that forms the basis of the examples that
@@ -560,50 +580,50 @@ C code examples and caveats
              return 0;
           }
 
-     For the purposes of the examples in this section, the program
-     above has been compiled, loaded into GDB, stopped at the function
-     `main', and GDB is awaiting input from the user.
+     For the purposes of the examples in this section, the program above
+     has been compiled, loaded into GDB, stopped at the function 'main',
+     and GDB is awaiting input from the user.
 
      To access variables and types for any program in GDB, the program
      must be compiled and packaged with debug information.  The
-     `compile' command is not an exception to this rule.  Without debug
-     information, you can still use the `compile' command, but you will
+     'compile' command is not an exception to this rule.  Without debug
+     information, you can still use the 'compile' command, but you will
      be very limited in what variables and types you can access.
 
      So with that in mind, the example above has been compiled with
-     debug information enabled.  The `compile' command will have access
+     debug information enabled.  The 'compile' command will have access
      to all variables and types (except those that may have been
      optimized out).  Currently, as GDB has stopped the program in the
-     `main' function, the `compile' command would have access to the
-     variable `k'.  You could invoke the `compile' command and type
-     some source code to set the value of `k'.  You can also read it,
-     or do anything with that variable you would normally do in `C'.
-     Be aware that changes to inferior variables in the `compile'
-     command are persistent.  In the following example:
+     'main' function, the 'compile' command would have access to the
+     variable 'k'.  You could invoke the 'compile' command and type some
+     source code to set the value of 'k'.  You can also read it, or do
+     anything with that variable you would normally do in 'C'.  Be aware
+     that changes to inferior variables in the 'compile' command are
+     persistent.  In the following example:
 
           compile code k = 3;
 
-     the variable `k' is now 3.  It will retain that value until
+     the variable 'k' is now 3.  It will retain that value until
      something else in the example program changes it, or another
-     `compile' command changes it.
+     'compile' command changes it.
 
      Normal scope and access rules apply to source code compiled and
-     injected by the `compile' command.  In the example, the variables
-     `j' and `k' are not accessible yet, because the program is
-     currently stopped in the `main' function, where these variables
-     are not in scope.  Therefore, the following command
+     injected by the 'compile' command.  In the example, the variables
+     'j' and 'k' are not accessible yet, because the program is
+     currently stopped in the 'main' function, where these variables are
+     not in scope.  Therefore, the following command
 
           compile code j = 3;
 
      will result in a compilation error message.
 
-     Once the program is continued, execution will bring these
-     variables in scope, and they will become accessible; then the code
-     you specify via the `compile' command will be able to access them.
+     Once the program is continued, execution will bring these variables
+     in scope, and they will become accessible; then the code you
+     specify via the 'compile' command will be able to access them.
 
-     You can create variables and types with the `compile' command as
+     You can create variables and types with the 'compile' command as
      part of your source code.  Variables and types that are created as
-     part of the `compile' command are not visible to the rest of the
+     part of the 'compile' command are not visible to the rest of the
      program for the duration of its run.  This example is valid:
 
           compile code int ff = 5; printf ("ff is %d\n", ff);
@@ -613,41 +633,40 @@ C code examples and caveats
 
           compile code printf ("ff is %d\n'', ff);
 
-     a compiler error would be raised as the variable `ff' no longer
-     exists.  Object code generated and injected by the `compile'
+     a compiler error would be raised as the variable 'ff' no longer
+     exists.  Object code generated and injected by the 'compile'
      command is removed when its execution ends.  Caution is advised
      when assigning to program variables values of variables created by
-     the code submitted to the `compile' command.  This example is
+     the code submitted to the 'compile' command.  This example is
      valid:
 
           compile code int ff = 5; k = ff;
 
-     The value of the variable `ff' is assigned to `k'.  The variable
-     `k' does not require the existence of `ff' to maintain the value
-     it has been assigned.  However, pointers require particular care in
-     assignment.  If the source code compiled with the `compile' command
-     changed the address of a pointer in the example program, perhaps
-     to a variable created in the `compile' command, that pointer would
-     point to an invalid location when the command exits.  The
-     following example would likely cause issues with your debugged
-     program:
+     The value of the variable 'ff' is assigned to 'k'.  The variable
+     'k' does not require the existence of 'ff' to maintain the value it
+     has been assigned.  However, pointers require particular care in
+     assignment.  If the source code compiled with the 'compile' command
+     changed the address of a pointer in the example program, perhaps to
+     a variable created in the 'compile' command, that pointer would
+     point to an invalid location when the command exits.  The following
+     example would likely cause issues with your debugged program:
 
           compile code int ff = 5; p = &ff;
 
-     In this example, `p' would point to `ff' when the `compile'
-     command is executing the source code provided to it.  However, as
-     variables in the (example) program persist with their assigned
-     values, the variable `p' would point to an invalid location when
-     the command exists.  A general rule should be followed in that you
-     should either assign `NULL' to any assigned pointers, or restore a
-     valid location to the pointer before the command exits.
+     In this example, 'p' would point to 'ff' when the 'compile' command
+     is executing the source code provided to it.  However, as variables
+     in the (example) program persist with their assigned values, the
+     variable 'p' would point to an invalid location when the command
+     exists.  A general rule should be followed in that you should
+     either assign 'NULL' to any assigned pointers, or restore a valid
+     location to the pointer before the command exits.
 
      Similar caution must be exercised with any structs, unions, and
-     typedefs defined in `compile' command.  Types defined in the
-     `compile' command will no longer be available in the next
-     `compile' command.  Therefore, if you cast a variable to a type
-     defined in the `compile' command, care must be taken to ensure
-     that any future need to resolve the type can be achieved.
+     typedefs defined in 'compile' command.  Types defined in the
+     'compile' command will no longer be available in the next 'compile'
+     command.  Therefore, if you cast a variable to a type defined in
+     the 'compile' command, care must be taken to ensure that any future
+     need to resolve the type can be achieved.
 
           (gdb) compile code static struct a { int a; } v = { 42 }; argv = &v;
           (gdb) compile code printf ("%d\n", ((struct a *) argv)->a);
@@ -657,26 +676,26 @@ C code examples and caveats
           42
 
      Variables that have been optimized away by the compiler are not
-     accessible to the code submitted to the `compile' command.  Access
+     accessible to the code submitted to the 'compile' command.  Access
      to those variables will generate a compiler error which GDB will
      print to the console.
 
-17.7.3 Compiler search for the `compile' command
+17.7.3 Compiler search for the 'compile' command
 ------------------------------------------------
 
 GDB needs to find GCC for the inferior being debugged which may not be
 obvious for remote targets of different architecture than where GDB is
-running.  Environment variable `PATH' (`PATH' from shell that executed
-GDB, not the one set by GDB command `set environment').  *Note
-Environment::.  `PATH' on GDB host is searched for GCC binary matching
+running.  Environment variable 'PATH' ('PATH' from shell that executed
+GDB, not the one set by GDB command 'set environment').  *Note
+Environment::.  'PATH' on GDB host is searched for GCC binary matching
 the target architecture and operating system.
 
-   Specifically `PATH' is searched for binaries matching regular
-expression `ARCH(-[^-]*)?-OS-gcc' according to the inferior target being
+   Specifically 'PATH' is searched for binaries matching regular
+expression 'ARCH(-[^-]*)?-OS-gcc' according to the inferior target being
 debugged.  ARCH is processor name -- multiarch is supported, so for
-example both `i386' and `x86_64' targets look for pattern
-`(x86_64|i.86)' and both `s390' and `s390x' targets look for pattern
-`s390x?'.  OS is currently supported only for pattern `linux(-gnu)?'.
+example both 'i386' and 'x86_64' targets look for pattern
+'(x86_64|i.86)' and both 's390' and 's390x' targets look for pattern
+'s390x?'.  OS is currently supported only for pattern 'linux(-gnu)?'.
 
 
 File: gdb.info,  Node: GDB Files,  Next: Targets,  Prev: Altering,  Up: Top
@@ -692,6 +711,7 @@ the core dump file.
 * Menu:
 
 * Files::                       Commands to specify files
+* File Caching::                Information about GDB's file caching
 * Separate Debug Files::        Debugging information in separate files
 * MiniDebugInfo::               Debugging information in a special section
 * Index Files::                 Index files speed up GDB
@@ -699,7 +719,7 @@ the core dump file.
 * Data Files::                  GDB data files
 
 
-File: gdb.info,  Node: Files,  Next: Separate Debug Files,  Up: GDB Files
+File: gdb.info,  Node: Files,  Next: File Caching,  Up: GDB Files
 
 18.1 Commands to Specify Files
 ==============================
@@ -710,161 +730,157 @@ start-up commands (*note Getting In and 
 
    Occasionally it is necessary to change to a different file during a
 GDB session.  Or you may run GDB and forget to specify a file you want
-to use.  Or you are debugging a remote target via `gdbserver' (*note
+to use.  Or you are debugging a remote target via 'gdbserver' (*note
 file: Server.).  In these situations the GDB commands to specify new
 files are useful.
 
-`file FILENAME'
+'file FILENAME'
      Use FILENAME as the program to be debugged.  It is read for its
      symbols and for the contents of pure memory.  It is also the
-     program executed when you use the `run' command.  If you do not
+     program executed when you use the 'run' command.  If you do not
      specify a directory and the file is not found in the GDB working
-     directory, GDB uses the environment variable `PATH' as a list of
+     directory, GDB uses the environment variable 'PATH' as a list of
      directories to search, just as the shell does when looking for a
      program to run.  You can change the value of this variable, for
-     both GDB and your program, using the `path' command.
+     both GDB and your program, using the 'path' command.
 
-     You can load unlinked object `.o' files into GDB using the `file'
-     command.  You will not be able to "run" an object file, but you
-     can disassemble functions and inspect variables.  Also, if the
-     underlying BFD functionality supports it, you could use `gdb
+     You can load unlinked object '.o' files into GDB using the 'file'
+     command.  You will not be able to "run" an object file, but you can
+     disassemble functions and inspect variables.  Also, if the
+     underlying BFD functionality supports it, you could use 'gdb
      -write' to patch object files using this technique.  Note that GDB
      can neither interpret nor modify relocations in this case, so
      branches and some initialized variables will appear to go to the
      wrong place.  But this feature is still handy from time to time.
 
-`file'
-     `file' with no argument makes GDB discard any information it has
-     on both executable file and the symbol table.
+'file'
+     'file' with no argument makes GDB discard any information it has on
+     both executable file and the symbol table.
 
-`exec-file [ FILENAME ]'
+'exec-file [ FILENAME ]'
      Specify that the program to be run (but not the symbol table) is
-     found in FILENAME.  GDB searches the environment variable `PATH'
-     if necessary to locate your program.  Omitting FILENAME means to
+     found in FILENAME.  GDB searches the environment variable 'PATH' if
+     necessary to locate your program.  Omitting FILENAME means to
      discard information on the executable file.
 
-`symbol-file [ FILENAME ]'
-     Read symbol table information from file FILENAME.  `PATH' is
-     searched when necessary.  Use the `file' command to get both symbol
+'symbol-file [ FILENAME ]'
+     Read symbol table information from file FILENAME.  'PATH' is
+     searched when necessary.  Use the 'file' command to get both symbol
      table and program to run from the same file.
 
-     `symbol-file' with no argument clears out GDB information on your
+     'symbol-file' with no argument clears out GDB information on your
      program's symbol table.
 
-     The `symbol-file' command causes GDB to forget the contents of
-     some breakpoints and auto-display expressions.  This is because
-     they may contain pointers to the internal data recording symbols
-     and data types, which are part of the old symbol table data being
-     discarded inside GDB.
+     The 'symbol-file' command causes GDB to forget the contents of some
+     breakpoints and auto-display expressions.  This is because they may
+     contain pointers to the internal data recording symbols and data
+     types, which are part of the old symbol table data being discarded
+     inside GDB.
 
-     `symbol-file' does not repeat if you press <RET> again after
+     'symbol-file' does not repeat if you press <RET> again after
      executing it once.
 
-     When GDB is configured for a particular environment, it
-     understands debugging information in whatever format is the
-     standard generated for that environment; you may use either a GNU
-     compiler, or other compilers that adhere to the local conventions.
-     Best results are usually obtained from GNU compilers; for example,
-     using `GCC' you can generate debugging information for optimized
-     code.
+     When GDB is configured for a particular environment, it understands
+     debugging information in whatever format is the standard generated
+     for that environment; you may use either a GNU compiler, or other
+     compilers that adhere to the local conventions.  Best results are
+     usually obtained from GNU compilers; for example, using 'GCC' you
+     can generate debugging information for optimized code.
 
      For most kinds of object files, with the exception of old SVR3
-     systems using COFF, the `symbol-file' command does not normally
+     systems using COFF, the 'symbol-file' command does not normally
      read the symbol table in full right away.  Instead, it scans the
      symbol table quickly to find which source files and which symbols
      are present.  The details are read later, one source file at a
      time, as they are needed.
 
-     The purpose of this two-stage reading strategy is to make GDB
-     start up faster.  For the most part, it is invisible except for
+     The purpose of this two-stage reading strategy is to make GDB start
+     up faster.  For the most part, it is invisible except for
      occasional pauses while the symbol table details for a particular
-     source file are being read.  (The `set verbose' command can turn
-     these pauses into messages if desired.  *Note Optional Warnings
-     and Messages: Messages/Warnings.)
+     source file are being read.  (The 'set verbose' command can turn
+     these pauses into messages if desired.  *Note Optional Warnings and
+     Messages: Messages/Warnings.)
 
      We have not implemented the two-stage strategy for COFF yet.  When
-     the symbol table is stored in COFF format, `symbol-file' reads the
+     the symbol table is stored in COFF format, 'symbol-file' reads the
      symbol table data in full right away.  Note that "stabs-in-COFF"
      still does the two-stage strategy, since the debug info is actually
      in stabs format.
 
-`symbol-file [ -readnow ] FILENAME'
-`file [ -readnow ] FILENAME'
+'symbol-file [ -readnow ] FILENAME'
+'file [ -readnow ] FILENAME'
      You can override the GDB two-stage strategy for reading symbol
-     tables by using the `-readnow' option with any of the commands that
+     tables by using the '-readnow' option with any of the commands that
      load symbol table information, if you want to be sure GDB has the
      entire symbol table available.
 
-`core-file [FILENAME]'
-`core'
+'core-file [FILENAME]'
+'core'
      Specify the whereabouts of a core dump file to be used as the
      "contents of memory".  Traditionally, core files contain only some
      parts of the address space of the process that generated them; GDB
      can access the executable file itself for other parts.
 
-     `core-file' with no argument specifies that no core file is to be
+     'core-file' with no argument specifies that no core file is to be
      used.
 
      Note that the core file is ignored when your program is actually
      running under GDB.  So, if you have been running your program and
-     you wish to debug a core file instead, you must kill the
-     subprocess in which the program is running.  To do this, use the
-     `kill' command (*note Killing the Child Process: Kill Process.).
-
-`add-symbol-file FILENAME ADDRESS'
-`add-symbol-file FILENAME ADDRESS [ -readnow ]'
-`add-symbol-file FILENAME ADDRESS -s SECTION ADDRESS ...'
-     The `add-symbol-file' command reads additional symbol table
+     you wish to debug a core file instead, you must kill the subprocess
+     in which the program is running.  To do this, use the 'kill'
+     command (*note Killing the Child Process: Kill Process.).
+
+'add-symbol-file FILENAME ADDRESS'
+'add-symbol-file FILENAME ADDRESS [ -readnow ]'
+'add-symbol-file FILENAME ADDRESS -s SECTION ADDRESS ...'
+     The 'add-symbol-file' command reads additional symbol table
      information from the file FILENAME.  You would use this command
      when FILENAME has been dynamically loaded (by some other means)
      into the program that is running.  The ADDRESS should give the
      memory address at which the file has been loaded; GDB cannot figure
      this out for itself.  You can additionally specify an arbitrary
-     number of `-s SECTION ADDRESS' pairs, to give an explicit section
+     number of '-s SECTION ADDRESS' pairs, to give an explicit section
      name and base address for that section.  You can specify any
      ADDRESS as an expression.
 
      The symbol table of the file FILENAME is added to the symbol table
-     originally read with the `symbol-file' command.  You can use the
-     `add-symbol-file' command any number of times; the new symbol data
+     originally read with the 'symbol-file' command.  You can use the
+     'add-symbol-file' command any number of times; the new symbol data
      thus read is kept in addition to the old.
 
-     Changes can be reverted using the command `remove-symbol-file'.
+     Changes can be reverted using the command 'remove-symbol-file'.
 
-     Although FILENAME is typically a shared library file, an
-     executable file, or some other object file which has been fully
-     relocated for loading into a process, you can also load symbolic
-     information from relocatable `.o' files, as long as:
+     Although FILENAME is typically a shared library file, an executable
+     file, or some other object file which has been fully relocated for
+     loading into a process, you can also load symbolic information from
+     relocatable '.o' files, as long as:
 
         * the file's symbolic information refers only to linker symbols
           defined in that file, not to symbols defined by other object
           files,
-
         * every section the file's symbolic information refers to has
           actually been loaded into the inferior, as it appears in the
           file, and
-
         * you can determine the address at which every section was
-          loaded, and provide these to the `add-symbol-file' command.
+          loaded, and provide these to the 'add-symbol-file' command.
 
      Some embedded operating systems, like Sun Chorus and VxWorks, can
      load relocatable files into an already running program; such
      systems typically make the requirements above easy to meet.
      However, it's important to recognize that many native systems use
-     complex link procedures (`.linkonce' section factoring and C++
-     constructor table assembly, for example) that make the
-     requirements difficult to meet.  In general, one cannot assume
-     that using `add-symbol-file' to read a relocatable object file's
-     symbolic information will have the same effect as linking the
-     relocatable object file into the program in the normal way.
+     complex link procedures ('.linkonce' section factoring and C++
+     constructor table assembly, for example) that make the requirements
+     difficult to meet.  In general, one cannot assume that using
+     'add-symbol-file' to read a relocatable object file's symbolic
+     information will have the same effect as linking the relocatable
+     object file into the program in the normal way.
 
-     `add-symbol-file' does not repeat if you press <RET> after using
+     'add-symbol-file' does not repeat if you press <RET> after using
      it.
 
-`remove-symbol-file FILENAME'
-
-`remove-symbol-file -a ADDRESS'
-     Remove a symbol file added via the `add-symbol-file' command.  The
+'remove-symbol-file FILENAME'
+'remove-symbol-file -a ADDRESS'
+     Remove a symbol file added via the 'add-symbol-file' command.  The
      file to remove can be identified by its FILENAME or by an ADDRESS
      that lies within the boundaries of this symbol file in memory.
      Example:
@@ -878,97 +894,82 @@ files are useful.
           Remove symbol table from file "/home/user/gdb/mylib.so"? (y or n) y
           (gdb)
 
-     `remove-symbol-file' does not repeat if you press <RET> after
-     using it.
+     'remove-symbol-file' does not repeat if you press <RET> after using
+     it.
 
-`add-symbol-file-from-memory ADDRESS'
+'add-symbol-file-from-memory ADDRESS'
      Load symbols from the given ADDRESS in a dynamically loaded object
      file whose image is mapped directly into the inferior's memory.
-     For example, the Linux kernel maps a `syscall DSO' into each
+     For example, the Linux kernel maps a 'syscall DSO' into each
      process's address space; this DSO provides kernel-specific code for
      some system calls.  The argument can be any expression whose
      evaluation yields the address of the file's shared object file
-     header.  For this command to work, you must have used
-     `symbol-file' or `exec-file' commands in advance.
+     header.  For this command to work, you must have used 'symbol-file'
+     or 'exec-file' commands in advance.
 
-`section SECTION ADDR'
-     The `section' command changes the base address of the named
-     SECTION of the exec file to ADDR.  This can be used if the exec
-     file does not contain section addresses, (such as in the `a.out'
-     format), or when the addresses specified in the file itself are
-     wrong.  Each section must be changed separately.  The `info files'
-     command, described below, lists all the sections and their
-     addresses.
-
-`info files'
-`info target'
-     `info files' and `info target' are synonymous; both print the
+'section SECTION ADDR'
+     The 'section' command changes the base address of the named SECTION
+     of the exec file to ADDR.  This can be used if the exec file does
+     not contain section addresses, (such as in the 'a.out' format), or
+     when the addresses specified in the file itself are wrong.  Each
+     section must be changed separately.  The 'info files' command,
+     described below, lists all the sections and their addresses.
+
+'info files'
+'info target'
+     'info files' and 'info target' are synonymous; both print the
      current target (*note Specifying a Debugging Target: Targets.),
-     including the names of the executable and core dump files
-     currently in use by GDB, and the files from which symbols were
-     loaded.  The command `help target' lists all possible targets
-     rather than current ones.
+     including the names of the executable and core dump files currently
+     in use by GDB, and the files from which symbols were loaded.  The
+     command 'help target' lists all possible targets rather than
+     current ones.
 
-`maint info sections'
+'maint info sections'
      Another command that can give you extra information about program
-     sections is `maint info sections'.  In addition to the section
-     information displayed by `info files', this command displays the
+     sections is 'maint info sections'.  In addition to the section
+     information displayed by 'info files', this command displays the
      flags and file offset of each section in the executable and core
-     dump files.  In addition, `maint info sections' provides the
+     dump files.  In addition, 'maint info sections' provides the
      following command options (which may be arbitrarily combined):
 
-    `ALLOBJ'
-          Display sections for all loaded object files, including
-          shared libraries.
-
-    `SECTIONS'
+     'ALLOBJ'
+          Display sections for all loaded object files, including shared
+          libraries.
+     'SECTIONS'
           Display info only for named SECTIONS.
-
-    `SECTION-FLAGS'
+     'SECTION-FLAGS'
           Display info only for sections for which SECTION-FLAGS are
           true.  The section flags that GDB currently knows about are:
-         `ALLOC'
+          'ALLOC'
                Section will have space allocated in the process when
                loaded.  Set for all sections except those containing
                debug information.
-
-         `LOAD'
+          'LOAD'
                Section will be loaded from the file into the child
                process memory.  Set for pre-initialized code and data,
-               clear for `.bss' sections.
-
-         `RELOC'
+               clear for '.bss' sections.
+          'RELOC'
                Section needs to be relocated before loading.
-
-         `READONLY'
+          'READONLY'
                Section cannot be modified by the child process.
-
-         `CODE'
+          'CODE'
                Section contains executable code only.
-
-         `DATA'
+          'DATA'
                Section contains data only (no executable code).
-
-         `ROM'
+          'ROM'
                Section will reside in ROM.
-
-         `CONSTRUCTOR'
+          'CONSTRUCTOR'
                Section contains data for constructor/destructor lists.
-
-         `HAS_CONTENTS'
+          'HAS_CONTENTS'
                Section is not empty.
-
-         `NEVER_LOAD'
+          'NEVER_LOAD'
                An instruction to the linker to not output the section.
-
-         `COFF_SHARED_LIBRARY'
+          'COFF_SHARED_LIBRARY'
                A notification to the linker that the section contains
                COFF shared library information.
-
-         `IS_COMMON'
+          'IS_COMMON'
                Section contains common symbols.
-     
-`set trust-readonly-sections on'
+'set trust-readonly-sections on'
      Tell GDB that readonly sections in your object file really are
      read-only (i.e. that their contents will not change).  In that
      case, GDB can fetch values from these sections out of the object
@@ -978,32 +979,30 @@ files are useful.
 
      The default is off.
 
-`set trust-readonly-sections off'
+'set trust-readonly-sections off'
      Tell GDB not to trust readonly sections.  This means that the
      contents of the section might change while the program is running,
      and must therefore be fetched from the target when needed.
 
-`show trust-readonly-sections'
+'show trust-readonly-sections'
      Show the current setting of trusting readonly sections.
 
    All file-specifying commands allow both absolute and relative file
 names as arguments.  GDB always converts the file name to an absolute
 file name and remembers it that way.
 
-   GDB supports GNU/Linux, MS-Windows, HP-UX, SunOS, SVr4, Irix, and
-IBM RS/6000 AIX shared libraries.
+   GDB supports GNU/Linux, MS-Windows, SunOS, Darwin/Mach-O, SVr4, IBM
+RS/6000 AIX, QNX Neutrino, FDPIC (FR-V), and DSBT (TIC6X) shared
+libraries.
 
    On MS-Windows GDB must be linked with the Expat library to support
 shared libraries.  *Note Expat::.
 
-   GDB automatically loads symbol definitions from shared libraries
-when you use the `run' command, or when you examine a core file.
-(Before you issue the `run' command, GDB does not understand references
-to a function in a shared library, however--unless you are debugging a
-core file).
-
-   On HP-UX, if the program loads a library explicitly, GDB
-automatically loads the symbols at the time of the `shl_load' call.
+   GDB automatically loads symbol definitions from shared libraries when
+you use the 'run' command, or when you examine a core file.  (Before you
+issue the 'run' command, GDB does not understand references to a
+function in a shared library, however--unless you are debugging a core
+file).
 
    There are times, however, when you may wish to not automatically load
 symbol definitions from shared libraries, such as when they are
@@ -1012,47 +1011,47 @@ particularly large or there are many of 
    To control the automatic loading of shared library symbols, use the
 commands:
 
-`set auto-solib-add MODE'
-     If MODE is `on', symbols from all shared object libraries will be
-     loaded automatically when the inferior begins execution, you
-     attach to an independently started inferior, or when the dynamic
-     linker informs GDB that a new library has been loaded.  If MODE is
-     `off', symbols must be loaded manually, using the `sharedlibrary'
-     command.  The default value is `on'.
+'set auto-solib-add MODE'
+     If MODE is 'on', symbols from all shared object libraries will be
+     loaded automatically when the inferior begins execution, you attach
+     to an independently started inferior, or when the dynamic linker
+     informs GDB that a new library has been loaded.  If MODE is 'off',
+     symbols must be loaded manually, using the 'sharedlibrary' command.
+     The default value is 'on'.
 
      If your program uses lots of shared libraries with debug info that
      takes large amounts of memory, you can decrease the GDB memory
      footprint by preventing it from automatically loading the symbols
-     from shared libraries.  To that end, type `set auto-solib-add off'
+     from shared libraries.  To that end, type 'set auto-solib-add off'
      before running the inferior, then load each library whose debug
-     symbols you do need with `sharedlibrary REGEXP', where REGEXP is a
+     symbols you do need with 'sharedlibrary REGEXP', where REGEXP is a
      regular expression that matches the libraries whose symbols you
      want to be loaded.
 
-`show auto-solib-add'
+'show auto-solib-add'
      Display the current autoloading mode.
 
-   To explicitly load shared library symbols, use the `sharedlibrary'
+   To explicitly load shared library symbols, use the 'sharedlibrary'
 command:
 
-`info share REGEX'
-`info sharedlibrary REGEX'
+'info share REGEX'
+'info sharedlibrary REGEX'
      Print the names of the shared libraries which are currently loaded
      that match REGEX.  If REGEX is omitted then print all shared
      libraries that are loaded.
 
-`info dll REGEX'
-     This is an alias of `info sharedlibrary'.
+'info dll REGEX'
+     This is an alias of 'info sharedlibrary'.
 
-`sharedlibrary REGEX'
-`share REGEX'
+'sharedlibrary REGEX'
+'share REGEX'
      Load shared object library symbols for files matching a Unix
      regular expression.  As with files loaded automatically, it only
      loads shared libraries required by your program for a core file or
-     after typing `run'.  If REGEX is omitted all shared libraries
+     after typing 'run'.  If REGEX is omitted all shared libraries
      required by your program are loaded.
 
-`nosharedlibrary'
+'nosharedlibrary'
      Unload all shared object library symbols.  This discards all
      symbols that have been loaded from all shared libraries.  Symbols
      from shared libraries that were loaded by explicit user requests
@@ -1060,20 +1059,20 @@ command:
 
    Sometimes you may wish that GDB stops and gives you control when any
 of shared library events happen.  The best way to do this is to use
-`catch load' and `catch unload' (*note Set Catchpoints::).
+'catch load' and 'catch unload' (*note Set Catchpoints::).
 
-   GDB also supports the the `set stop-on-solib-events' command for
+   GDB also supports the the 'set stop-on-solib-events' command for
 this.  This command exists for historical reasons.  It is less useful
 than setting a catchpoint, because it does not allow for conditions or
 commands as a catchpoint does.
 
-`set stop-on-solib-events'
+'set stop-on-solib-events'
      This command controls whether GDB should give you control when the
      dynamic linker notifies it about some shared library event.  The
      most common event of interest is loading or unloading of a new
      shared library.
 
-`show stop-on-solib-events'
+'show stop-on-solib-events'
      Show whether GDB stops and gives you control when shared library
      events happen.
 
@@ -1086,34 +1085,34 @@ provided, they need to be the same as th
 copies on the target can be stripped as long as the copies on the host
 are not.
 
-   For remote debugging, you need to tell GDB where the target
-libraries are, so that it can load the correct copies--otherwise, it
-may try to load the host's libraries.  GDB has two variables to specify
-the search directories for target libraries.
+   For remote debugging, you need to tell GDB where the target libraries
+are, so that it can load the correct copies--otherwise, it may try to
+load the host's libraries.  GDB has two variables to specify the search
+directories for target libraries.
 
-`set sysroot PATH'
+'set sysroot PATH'
      Use PATH as the system root for the program being debugged.  Any
      absolute shared library paths will be prefixed with PATH; many
      runtime loaders store the absolute paths to the shared library in
-     the target program's memory.  When starting processes remotely,
-     and when attaching to already-running processes (local or remote),
+     the target program's memory.  When starting processes remotely, and
+     when attaching to already-running processes (local or remote),
      their executable filenames will be prefixed with PATH if reported
-     to GDB as absolute by the operating system.  If you use `set
+     to GDB as absolute by the operating system.  If you use 'set
      sysroot' to find executables and shared libraries, they need to be
      laid out in the same way that they are on the target, with e.g. a
-     `/bin', `/lib' and `/usr/lib' hierarchy under PATH.
+     '/bin', '/lib' and '/usr/lib' hierarchy under PATH.
 
-     If PATH starts with the sequence `target:' and the target system
-     is remote then GDB will retrieve the target binaries from the
-     remote system.  This is only supported when using a remote target
-     that supports the `remote get' command (*note Sending files to a
-     remote system: File Transfer.).  The part of PATH following the
-     initial `target:' (if present) is used as system root prefix on
-     the remote file system.  If PATH starts with the sequence
-     `remote:' this is converted to the sequence `target:' by `set
-     sysroot'(1).  If you want to specify a local system root using a
-     directory that happens to be named `target:' or `remote:', you
-     need to use some equivalent variant of the name like `./target:'.
+     If PATH starts with the sequence 'target:' and the target system is
+     remote then GDB will retrieve the target binaries from the remote
+     system.  This is only supported when using a remote target that
+     supports the 'remote get' command (*note Sending files to a remote
+     system: File Transfer.).  The part of PATH following the initial
+     'target:' (if present) is used as system root prefix on the remote
+     file system.  If PATH starts with the sequence 'remote:' this is
+     converted to the sequence 'target:' by 'set sysroot'(1).  If you
+     want to specify a local system root using a directory that happens
+     to be named 'target:' or 'remote:', you need to use some equivalent
+     variant of the name like './target:'.
 
      For targets with an MS-DOS based filesystem, such as MS-Windows and
      SymbianOS, GDB tries prefixing a few variants of the target
@@ -1128,7 +1127,7 @@ the search directories for target librar
 
             c:/foo/bar.dll => /path/to/sysroot/c:/foo/bar.dll
 
-     If that does not find the binary, GDB tries removing the `:'
+     If that does not find the binary, GDB tries removing the ':'
      character from the drive spec, both for convenience, and, for the
      case of the host file system not supporting file names with colons:
 
@@ -1136,16 +1135,16 @@ the search directories for target librar
 
      This makes it possible to have a system root that mirrors a target
      with more than one drive.  E.g., you may want to setup your local
-     copies of the target system shared libraries like so (note `c' vs
-     `z'):
+     copies of the target system shared libraries like so (note 'c' vs
+     'z'):
 
-           `/path/to/sysroot/c/sys/bin/foo.dll'
-           `/path/to/sysroot/c/sys/bin/bar.dll'
-           `/path/to/sysroot/z/sys/bin/bar.dll'
-
-     and point the system root at `/path/to/sysroot', so that GDB can
-     find the correct copies of both `c:\sys\bin\foo.dll', and
-     `z:\sys\bin\bar.dll'.
+           /path/to/sysroot/c/sys/bin/foo.dll
+           /path/to/sysroot/c/sys/bin/bar.dll
+           /path/to/sysroot/z/sys/bin/bar.dll
+
+     and point the system root at '/path/to/sysroot', so that GDB can
+     find the correct copies of both 'c:\sys\bin\foo.dll', and
+     'z:\sys\bin\bar.dll'.
 
      If that still does not find the binary, GDB tries removing the
      whole drive spec from the target file name:
@@ -1155,33 +1154,33 @@ the search directories for target librar
      This last lookup makes it possible to not care about the drive
      name, if you don't want or need to.
 
-     The `set solib-absolute-prefix' command is an alias for `set
+     The 'set solib-absolute-prefix' command is an alias for 'set
      sysroot'.
 
      You can set the default system root by using the configure-time
-     `--with-sysroot' option.  If the system root is inside GDB's
-     configured binary prefix (set with `--prefix' or `--exec-prefix'),
+     '--with-sysroot' option.  If the system root is inside GDB's
+     configured binary prefix (set with '--prefix' or '--exec-prefix'),
      then the default system root will be updated automatically if the
      installed GDB is moved to a new location.
 
-`show sysroot'
+'show sysroot'
      Display the current executable and shared library prefix.
 
-`set solib-search-path PATH'
+'set solib-search-path PATH'
      If this variable is set, PATH is a colon-separated list of
-     directories to search for shared libraries.  `solib-search-path'
-     is used after `sysroot' fails to locate the library, or if the
-     path to the library is relative instead of absolute.  If you want
-     to use `solib-search-path' instead of `sysroot', be sure to set
-     `sysroot' to a nonexistent directory to prevent GDB from finding
-     your host's libraries.  `sysroot' is preferred; setting it to a
-     nonexistent directory may interfere with automatic loading of
-     shared library symbols.
+     directories to search for shared libraries.  'solib-search-path' is
+     used after 'sysroot' fails to locate the library, or if the path to
+     the library is relative instead of absolute.  If you want to use
+     'solib-search-path' instead of 'sysroot', be sure to set 'sysroot'
+     to a nonexistent directory to prevent GDB from finding your host's
+     libraries.  'sysroot' is preferred; setting it to a nonexistent
+     directory may interfere with automatic loading of shared library
+     symbols.
 
-`show solib-search-path'
+'show solib-search-path'
      Display the current shared library search path.
 
-`set target-file-system-kind KIND'
+'set target-file-system-kind KIND'
      Set assumed file system kind for target reported file names.
 
      Shared library file names as reported by the target system may not
@@ -1189,79 +1188,109 @@ the search directories for target librar
      when remote debugging a target that has MS-DOS based file system
      semantics, from a Unix host, the target may be reporting to GDB a
      list of loaded shared libraries with file names such as
-     `c:\Windows\kernel32.dll'.  On Unix hosts, there's no concept of
-     drive letters, so the `c:\' prefix is not normally understood as
+     'c:\Windows\kernel32.dll'.  On Unix hosts, there's no concept of
+     drive letters, so the 'c:\' prefix is not normally understood as
      indicating an absolute file name, and neither is the backslash
      normally considered a directory separator character.  In that case,
      the native file system would interpret this whole absolute file
      name as a relative file name with no directory components.  This
      would make it impossible to point GDB at a copy of the remote
-     target's shared libraries on the host using `set sysroot', and
-     impractical with `set solib-search-path'.  Setting
-     `target-file-system-kind' to `dos-based' tells GDB to interpret
+     target's shared libraries on the host using 'set sysroot', and
+     impractical with 'set solib-search-path'.  Setting
+     'target-file-system-kind' to 'dos-based' tells GDB to interpret
      such file names similarly to how the target would, and to map them
      to file names valid on GDB's native file system semantics.  The
-     value of KIND can be `"auto"', in addition to one of the supported
+     value of KIND can be '"auto"', in addition to one of the supported
      file system kinds.  In that case, GDB tries to determine the
      appropriate file system variant based on the current target's
-     operating system (*note Configuring the Current ABI: ABI.).  The
+     operating system (*note Configuring the Current ABI: ABI.). The
      supported file system settings are:
 
-    `unix'
-          Instruct GDB to assume the target file system is of Unix
-          kind.  Only file names starting the forward slash (`/')
-          character are considered absolute, and the directory
-          separator character is also the forward slash.
+     'unix'
+          Instruct GDB to assume the target file system is of Unix kind.
+          Only file names starting the forward slash ('/') character are
+          considered absolute, and the directory separator character is
+          also the forward slash.
 
-    `dos-based'
+     'dos-based'
           Instruct GDB to assume the target file system is DOS based.
           File names starting with either a forward slash, or a drive
-          letter followed by a colon (e.g., `c:'), are considered
-          absolute, and both the slash (`/') and the backslash (`\\')
+          letter followed by a colon (e.g., 'c:'), are considered
+          absolute, and both the slash ('/') and the backslash ('\\')
           characters are considered directory separators.
 
-    `auto'
+     'auto'
           Instruct GDB to use the file system kind associated with the
           target operating system (*note Configuring the Current ABI:
-          ABI.).  This is the default.
+          ABI.). This is the default.
 
-   When processing file names provided by the user, GDB frequently
-needs to compare them to the file names recorded in the program's debug
-info.  Normally, GDB compares just the "base names" of the files as
-strings, which is reasonably fast even for very large programs.  (The
-base name of a file is the last portion of its name, after stripping
-all the leading directories.)  This shortcut in comparison is based
-upon the assumption that files cannot have more than one base name.
-This is usually true, but references to files that use symlinks or
-similar filesystem facilities violate that assumption.  If your program
-records files using such facilities, or if you provide file names to
-GDB using symlinks etc., you can set `basenames-may-differ' to `true'
-to instruct GDB to completely canonicalize each pair of file names it
-needs to compare.  This will make file-name comparisons accurate, but
-at a price of a significant slowdown.
+   When processing file names provided by the user, GDB frequently needs
+to compare them to the file names recorded in the program's debug info.
+Normally, GDB compares just the "base names" of the files as strings,
+which is reasonably fast even for very large programs.  (The base name
+of a file is the last portion of its name, after stripping all the
+leading directories.)  This shortcut in comparison is based upon the
+assumption that files cannot have more than one base name.  This is
+usually true, but references to files that use symlinks or similar
+filesystem facilities violate that assumption.  If your program records
+files using such facilities, or if you provide file names to GDB using
+symlinks etc., you can set 'basenames-may-differ' to 'true' to instruct
+GDB to completely canonicalize each pair of file names it needs to
+compare.  This will make file-name comparisons accurate, but at a price
+of a significant slowdown.
 
-`set basenames-may-differ'
+'set basenames-may-differ'
      Set whether a source file may have multiple base names.
 
-`show basenames-may-differ'
+'show basenames-may-differ'
      Show whether a source file may have multiple base names.
 
    ---------- Footnotes ----------
 
    (1) Historically the functionality to retrieve binaries from the
-remote system was provided by prefixing PATH with `remote:'
+remote system was provided by prefixing PATH with 'remote:'
+
+
+File: gdb.info,  Node: File Caching,  Next: Separate Debug Files,  Prev: Files,  Up: GDB Files
+
+18.2 File Caching
+=================
+
+To speed up file loading, and reduce memory usage, GDB will reuse the
+'bfd' objects used to track open files.  *Note BFD: (bfd)Top.  The
+following commands allow visibility and control of the caching behavior.
+
+'maint info bfds'
+     This prints information about each 'bfd' object that is known to
+     GDB.
+
+'maint set bfd-sharing'
+'maint show bfd-sharing'
+     Control whether 'bfd' objects can be shared.  When sharing is
+     enabled GDB reuses already open 'bfd' objects rather than reopening
+     the same file.  Turning sharing off does not cause already shared
+     'bfd' objects to be unshared, but all future files that are opened
+     will create a new 'bfd' object.  Similarly, re-enabling sharing
+     does not cause multiple existing 'bfd' objects to be collapsed into
+     a single shared 'bfd' object.
+
+'set debug bfd-cache LEVEL'
+     Turns on debugging of the bfd cache, setting the level to LEVEL.
+
+'show debug bfd-cache'
+     Show the current debugging level of the bfd cache.
 
 
-File: gdb.info,  Node: Separate Debug Files,  Next: MiniDebugInfo,  Prev: Files,  Up: GDB Files
+File: gdb.info,  Node: Separate Debug Files,  Next: MiniDebugInfo,  Prev: File Caching,  Up: GDB Files
 
-18.2 Debugging Information in Separate Files
+18.3 Debugging Information in Separate Files
 ============================================
 
 GDB allows you to put a program's debugging information in a file
 separate from the executable itself, in a way that allows GDB to find
 and load the debugging information automatically.  Since debugging
-information can be very large--sometimes larger than the executable
-code itself--some systems distribute debugging information for their
+information can be very large--sometimes larger than the executable code
+itself--some systems distribute debugging information for their
 executables in separate files, which users can install only when they
 need to debug a problem.
 
@@ -1269,18 +1298,18 @@ need to debug a problem.
 
    * The executable contains a "debug link" that specifies the name of
      the separate debug info file.  The separate debug file's name is
-     usually `EXECUTABLE.debug', where EXECUTABLE is the name of the
+     usually 'EXECUTABLE.debug', where EXECUTABLE is the name of the
      corresponding executable file without leading directories (e.g.,
-     `ls.debug' for `/usr/bin/ls').  In addition, the debug link
-     specifies a 32-bit "Cyclic Redundancy Check" (CRC) checksum for
-     the debug file, which GDB uses to validate that the executable and
-     the debug file came from the same build.
+     'ls.debug' for '/usr/bin/ls').  In addition, the debug link
+     specifies a 32-bit "Cyclic Redundancy Check" (CRC) checksum for the
+     debug file, which GDB uses to validate that the executable and the
+     debug file came from the same build.
 
    * The executable contains a "build ID", a unique bit string that is
      also present in the corresponding debug info file.  (This is
      supported only on some operating systems, when using the ELF or PE
      file formats for binary files and the GNU Binutils.)  For more
-     details about this feature, see the description of the `--build-id'
+     details about this feature, see the description of the '--build-id'
      command-line option in *note Command Line Options:
      (ld.info)Options.  The debug info file's name is not specified
      explicitly by the build ID, but can be computed from the build ID,
@@ -1291,130 +1320,125 @@ different methods of looking for the deb
 
    * For the "debug link" method, GDB looks up the named file in the
      directory of the executable file, then in a subdirectory of that
-     directory named `.debug', and finally under each one of the global
-     debug directories, in a subdirectory whose name is identical to
-     the leading directories of the executable's absolute file name.
-
-   * For the "build ID" method, GDB looks in the `.build-id'
-     subdirectory of each one of the global debug directories for a
-     file named `NN/NNNNNNNN.debug', where NN are the first 2 hex
-     characters of the build ID bit string, and NNNNNNNN are the rest
-     of the bit string.  (Real build ID strings are 32 or more hex
-     characters, not 10.)
-
-   So, for example, suppose you ask GDB to debug `/usr/bin/ls', which
-has a debug link that specifies the file `ls.debug', and a build ID
-whose value in hex is `abcdef1234'.  If the list of the global debug
-directories includes `/usr/lib/debug', then GDB will look for the
+     directory named '.debug', and finally under each one of the global
+     debug directories, in a subdirectory whose name is identical to the
+     leading directories of the executable's absolute file name.
+
+   * For the "build ID" method, GDB looks in the '.build-id'
+     subdirectory of each one of the global debug directories for a file
+     named 'NN/NNNNNNNN.debug', where NN are the first 2 hex characters
+     of the build ID bit string, and NNNNNNNN are the rest of the bit
+     string.  (Real build ID strings are 32 or more hex characters, not
+     10.)
+
+   So, for example, suppose you ask GDB to debug '/usr/bin/ls', which
+has a debug link that specifies the file 'ls.debug', and a build ID
+whose value in hex is 'abcdef1234'.  If the list of the global debug
+directories includes '/usr/lib/debug', then GDB will look for the
 following debug information files, in the indicated order:
 
-   - `/usr/lib/debug/.build-id/ab/cdef1234.debug'
-
-   - `/usr/bin/ls.debug'
-
-   - `/usr/bin/.debug/ls.debug'
-
-   - `/usr/lib/debug/usr/bin/ls.debug'.
+   - '/usr/lib/debug/.build-id/ab/cdef1234.debug'
+   - '/usr/bin/ls.debug'
+   - '/usr/bin/.debug/ls.debug'
+   - '/usr/lib/debug/usr/bin/ls.debug'.
 
    Global debugging info directories default to what is set by GDB
-configure option `--with-separate-debug-dir'.  During GDB run you can
-also set the global debugging info directories, and view the list GDB
-is currently using.
+configure option '--with-separate-debug-dir'.  During GDB run you can
+also set the global debugging info directories, and view the list GDB is
+currently using.
 
-`set debug-file-directory DIRECTORIES'
+'set debug-file-directory DIRECTORIES'
      Set the directories which GDB searches for separate debugging
      information files to DIRECTORY.  Multiple path components can be
      set concatenating them by a path separator.
 
-`show debug-file-directory'
+'show debug-file-directory'
      Show the directories GDB searches for separate debugging
      information files.
 
-
    A debug link is a special section of the executable file named
-`.gnu_debuglink'.  The section must contain:
-
-   * A filename, with any leading directory components removed,
-     followed by a zero byte,
+'.gnu_debuglink'.  The section must contain:
 
+   * A filename, with any leading directory components removed, followed
+     by a zero byte,
    * zero to three bytes of padding, as needed to reach the next
      four-byte boundary within the section, and
-
    * a four-byte CRC checksum, stored in the same endianness used for
      the executable file itself.  The checksum is computed on the
      debugging information file's full contents by the function given
      below, passing zero as the CRC argument.
 
    Any executable file format can carry a debug link, as long as it can
-contain a section named `.gnu_debuglink' with the contents described
+contain a section named '.gnu_debuglink' with the contents described
 above.
 
    The build ID is a special section in the executable file (and in
 other ELF binary files that GDB may consider).  This section is often
-named `.note.gnu.build-id', but that name is not mandatory.  It
-contains unique identification for the built files--the ID remains the
-same across multiple builds of the same build tree.  The default
-algorithm SHA1 produces 160 bits (40 hexadecimal characters) of the
-content for the build ID string.  The same section with an identical
-value is present in the original built binary with symbols, in its
-stripped variant, and in the separate debugging information file.
+named '.note.gnu.build-id', but that name is not mandatory.  It contains
+unique identification for the built files--the ID remains the same
+across multiple builds of the same build tree.  The default algorithm
+SHA1 produces 160 bits (40 hexadecimal characters) of the content for
+the build ID string.  The same section with an identical value is
+present in the original built binary with symbols, in its stripped
+variant, and in the separate debugging information file.
 
    The debugging information file itself should be an ordinary
 executable, containing a full set of linker symbols, sections, and
 debugging information.  The sections of the debugging information file
 should have the same names, addresses, and sizes as the original file,
-but they need not contain any data--much like a `.bss' section in an
+but they need not contain any data--much like a '.bss' section in an
 ordinary executable.
 
-   The GNU binary utilities (Binutils) package includes the `objcopy'
+   The GNU binary utilities (Binutils) package includes the 'objcopy'
 utility that can produce the separated executable / debugging
 information file pairs using the following commands:
 
      objcopy --only-keep-debug foo foo.debug
      strip -g foo
 
-These commands remove the debugging information from the executable
-file `foo' and place it in the file `foo.debug'.  You can use the
-first, second or both methods to link the two files:
+These commands remove the debugging information from the executable file
+'foo' and place it in the file 'foo.debug'.  You can use the first,
+second or both methods to link the two files:
 
    * The debug link method needs the following additional command to
-     also leave behind a debug link in `foo':
+     also leave behind a debug link in 'foo':
 
           objcopy --add-gnu-debuglink=foo.debug foo
 
-     Ulrich Drepper's `elfutils' package, starting with version 0.53,
-     contains a version of the `strip' command such that the command
-     `strip foo -f foo.debug' has the same functionality as the two
-     `objcopy' commands and the `ln -s' command above, together.
+     Ulrich Drepper's 'elfutils' package, starting with version 0.53,
+     contains a version of the 'strip' command such that the command
+     'strip foo -f foo.debug' has the same functionality as the two
+     'objcopy' commands and the 'ln -s' command above, together.
 
-   * Build ID gets embedded into the main executable using `ld
-     --build-id' or the GCC counterpart `gcc -Wl,--build-id'.  Build ID
+   * Build ID gets embedded into the main executable using 'ld
+     --build-id' or the GCC counterpart 'gcc -Wl,--build-id'.  Build ID
      support plus compatibility fixes for debug files separation are
      present in GNU binary utilities (Binutils) package since version
      2.18.
 
-The CRC used in `.gnu_debuglink' is the CRC-32 defined in IEEE 802.3
+
+   The CRC used in '.gnu_debuglink' is the CRC-32 defined in IEEE 802.3
 using the polynomial:
 
-      x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11
-      + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
+      x^{32} + x^{26} + x^{23} + x^{22} + x^{16} + x^{12} + x^{11}
+      + x^{10} + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
 
-   The function is computed byte at a time, taking the least
-significant bit of each byte first.  The initial pattern `0xffffffff'
-is used, to ensure leading zeros affect the CRC and the final result is
-inverted to ensure trailing zeros also affect the CRC.
+   The function is computed byte at a time, taking the least significant
+bit of each byte first.  The initial pattern '0xffffffff' is used, to
+ensure leading zeros affect the CRC and the final result is inverted to
+ensure trailing zeros also affect the CRC.
 
    _Note:_ This is the same CRC polynomial as used in handling the
-"Remote Serial Protocol" `qCRC' packet (*note qCRC packet::).  However
+"Remote Serial Protocol" 'qCRC' packet (*note qCRC packet::).  However
 in the case of the Remote Serial Protocol, the CRC is computed _most_
-significant bit first, and the result is not inverted, so trailing
-zeros have no effect on the CRC value.
+significant bit first, and the result is not inverted, so trailing zeros
+have no effect on the CRC value.
 
    To complete the description, we show below the code of the function
-which produces the CRC used in `.gnu_debuglink'.  Inverting the
-initially supplied `crc' argument means that an initial call to this
+which produces the CRC used in '.gnu_debuglink'.  Inverting the
+initially supplied 'crc' argument means that an initial call to this
 function passing in zero will start computing the CRC using
-`0xffffffff'.
+'0xffffffff'.
 
      unsigned long
      gnu_debuglink_crc32 (unsigned long crc,
@@ -1488,11 +1512,11 @@ This computation does not apply to the "
 
 File: gdb.info,  Node: MiniDebugInfo,  Next: Index Files,  Prev: Separate Debug Files,  Up: GDB Files
 
-18.3 Debugging information in a special section
+18.4 Debugging information in a special section
 ===============================================
 
 Some systems ship pre-built executables and libraries that have a
-special `.gnu_debugdata' section.  This feature is called
+special '.gnu_debugdata' section.  This feature is called
 "MiniDebugInfo".  This section holds an LZMA-compressed object and is
 used to supply extra symbols for backtraces.
 
@@ -1507,8 +1531,8 @@ information might be included in the sec
 is used provided that no other source of debugging information can be
 found, and that GDB was configured with LZMA support.
 
-   This section can be easily created using `objcopy' and other
-standard utilities:
+   This section can be easily created using 'objcopy' and other standard
+utilities:
 
      # Extract the dynamic symbols from the main binary, there is no need
      # to also have these in the normal symbol table.
@@ -1545,41 +1569,41 @@ standard utilities:
 
 File: gdb.info,  Node: Index Files,  Next: Symbol Errors,  Prev: MiniDebugInfo,  Up: GDB Files
 
-18.4 Index Files Speed Up GDB
+18.5 Index Files Speed Up GDB
 =============================
 
 When GDB finds a symbol file, it scans the symbols in the file in order
 to construct an internal symbol table.  This lets most GDB operations
-work quickly--at the cost of a delay early on.  For large programs,
-this delay can be quite lengthy, so GDB provides a way to build an
-index, which speeds up startup.
+work quickly--at the cost of a delay early on.  For large programs, this
+delay can be quite lengthy, so GDB provides a way to build an index,
+which speeds up startup.
 
    The index is stored as a section in the symbol file.  GDB can write
 the index to a file, then you can put it into the symbol file using
-`objcopy'.
+'objcopy'.
 
-   To create an index file, use the `save gdb-index' command:
+   To create an index file, use the 'save gdb-index' command:
 
-`save gdb-index DIRECTORY'
+'save gdb-index DIRECTORY'
      Create an index file for each symbol file currently known by GDB.
      Each file is named after its corresponding symbol file, with
-     `.gdb-index' appended, and is written into the given DIRECTORY.
+     '.gdb-index' appended, and is written into the given DIRECTORY.
 
    Once you have created an index file you can merge it into your symbol
-file, here named `symfile', using `objcopy':
+file, here named 'symfile', using 'objcopy':
 
      $ objcopy --add-section .gdb_index=symfile.gdb-index \
          --set-section-flags .gdb_index=readonly symfile symfile
 
-   GDB will normally ignore older versions of `.gdb_index' sections
-that have been deprecated.  Usually they are deprecated because they
-are missing a new feature or have performance issues.  To tell GDB to
-use a deprecated index section anyway specify `set
-use-deprecated-index-sections on'.  The default is `off'.  This can
+   GDB will normally ignore older versions of '.gdb_index' sections that
+have been deprecated.  Usually they are deprecated because they are
+missing a new feature or have performance issues.  To tell GDB to use a
+deprecated index section anyway specify 'set
+use-deprecated-index-sections on'.  The default is 'off'.  This can
 speed up startup, but may result in some functionality being lost.
 *Note Index Section Format::.
 
-   _Warning:_ Setting `use-deprecated-index-sections' to `on' must be
+   _Warning:_ Setting 'use-deprecated-index-sections' to 'on' must be
 done before gdb reads the file.  The following will not work:
 
      $ gdb -ex "set use-deprecated-index-sections on" <program>
@@ -1595,23 +1619,24 @@ work for programs using Ada.
 
 File: gdb.info,  Node: Symbol Errors,  Next: Data Files,  Prev: Index Files,  Up: GDB Files
 
-18.5 Errors Reading Symbol Files
+18.6 Errors Reading Symbol Files
 ================================
 
 While reading a symbol file, GDB occasionally encounters problems, such
-as symbol types it does not recognize, or known bugs in compiler
-output.  By default, GDB does not notify you of such problems, since
-they are relatively common and primarily of interest to people
-debugging compilers.  If you are interested in seeing information about
+as symbol types it does not recognize, or known bugs in compiler output.
+By default, GDB does not notify you of such problems, since they are
+relatively common and primarily of interest to people debugging
+compilers.  If you are interested in seeing information about
 ill-constructed symbol tables, you can either ask GDB to print only one
 message about each such type of problem, no matter how many times the
 problem occurs; or you can ask GDB to print more messages, to see how
-many times the problems occur, with the `set complaints' command (*note
+many times the problems occur, with the 'set complaints' command (*note
 Optional Warnings and Messages: Messages/Warnings.).
 
    The messages currently printed, and their meanings, include:
 
-`inner block not inside outer block in SYMBOL'
+'inner block not inside outer block in SYMBOL'
+
      The symbol information shows where symbol scopes begin and end
      (such as at the start of a function or a block of statements).
      This error indicates that an inner scope block is not fully
@@ -1619,21 +1644,23 @@ Optional Warnings and Messages: Messages
 
      GDB circumvents the problem by treating the inner block as if it
      had the same scope as the outer block.  In the error message,
-     SYMBOL may be shown as "`(don't know)'" if the outer block is not a
+     SYMBOL may be shown as "'(don't know)'" if the outer block is not a
      function.
 
-`block at ADDRESS out of order'
+'block at ADDRESS out of order'
+
      The symbol information for symbol scope blocks should occur in
      order of increasing addresses.  This error indicates that it does
      not do so.
 
      GDB does not circumvent this problem, and has trouble locating
      symbols in the source file whose symbols it is reading.  (You can
-     often determine what source file is affected by specifying `set
+     often determine what source file is affected by specifying 'set
      verbose on'.  *Note Optional Warnings and Messages:
      Messages/Warnings.)
 
-`bad block start address patched'
+'bad block start address patched'
+
      The symbol information for a symbol scope block has a start address
      smaller than the address of the preceding source line.  This is
      known to occur in the SunOS 4.1.1 (and earlier) C compiler.
@@ -1641,64 +1668,67 @@ Optional Warnings and Messages: Messages
      GDB circumvents the problem by treating the symbol scope block as
      starting on the previous source line.
 
-`bad string table offset in symbol N'
+'bad string table offset in symbol N'
+
      Symbol number N contains a pointer into the string table which is
      larger than the size of the string table.
 
      GDB circumvents the problem by considering the symbol to have the
-     name `foo', which may cause other problems if many symbols end up
+     name 'foo', which may cause other problems if many symbols end up
      with this name.
 
-`unknown symbol type `0xNN''
+'unknown symbol type 0xNN'
+
      The symbol information contains new data types that GDB does not
-     yet know how to read.  `0xNN' is the symbol type of the
+     yet know how to read.  '0xNN' is the symbol type of the
      uncomprehended information, in hexadecimal.
 
      GDB circumvents the error by ignoring this symbol information.
      This usually allows you to debug your program, though certain
      symbols are not accessible.  If you encounter such a problem and
-     feel like debugging it, you can debug `gdb' with itself, breakpoint
-     on `complain', then go up to the function `read_dbx_symtab' and
-     examine `*bufp' to see the symbol.
+     feel like debugging it, you can debug 'gdb' with itself, breakpoint
+     on 'complain', then go up to the function 'read_dbx_symtab' and
+     examine '*bufp' to see the symbol.
+
+'stub type has NULL name'
 
-`stub type has NULL name'
      GDB could not find the full definition for a struct or class.
 
-`const/volatile indicator missing (ok if using g++ v1.x), got...'
+'const/volatile indicator missing (ok if using g++ v1.x), got...'
      The symbol information for a C++ member function is missing some
-     information that recent versions of the compiler should have
-     output for it.
+     information that recent versions of the compiler should have output
+     for it.
 
-`info mismatch between compiler and debugger'
-     GDB could not parse a type specification output by the compiler.
+'info mismatch between compiler and debugger'
 
+     GDB could not parse a type specification output by the compiler.
 
 
 File: gdb.info,  Node: Data Files,  Prev: Symbol Errors,  Up: GDB Files
 
-18.6 GDB Data Files
+18.7 GDB Data Files
 ===================
 
-GDB will sometimes read an auxiliary data file.  These files are kept
-in a directory known as the "data directory".
+GDB will sometimes read an auxiliary data file.  These files are kept in
+a directory known as the "data directory".
 
    You can set the data directory's name, and view the name GDB is
 currently using.
 
-`set data-directory DIRECTORY'
+'set data-directory DIRECTORY'
      Set the directory which GDB searches for auxiliary data files to
      DIRECTORY.
 
-`show data-directory'
+'show data-directory'
      Show the directory GDB searches for auxiliary data files.
 
    You can set the default data directory by using the configure-time
-`--with-gdb-datadir' option.  If the data directory is inside GDB's
-configured binary prefix (set with `--prefix' or `--exec-prefix'), then
+'--with-gdb-datadir' option.  If the data directory is inside GDB's
+configured binary prefix (set with '--prefix' or '--exec-prefix'), then
 the default data directory will be updated automatically if the
 installed GDB is moved to a new location.
 
-   The data directory may also be specified with the `--data-directory'
+   The data directory may also be specified with the '--data-directory'
 command line option.  *Note Mode Options::.
 
 
@@ -1709,31 +1739,31 @@ File: gdb.info,  Node: Targets,  Next: R
 
 A "target" is the execution environment occupied by your program.
 
-   Often, GDB runs in the same host environment as your program; in
-that case, the debugging target is specified as a side effect when you
-use the `file' or `core' commands.  When you need more flexibility--for
+   Often, GDB runs in the same host environment as your program; in that
+case, the debugging target is specified as a side effect when you use
+the 'file' or 'core' commands.  When you need more flexibility--for
 example, running GDB on a physically separate host, or controlling a
 standalone system over a serial port or a realtime system over a TCP/IP
-connection--you can use the `target' command to specify one of the
+connection--you can use the 'target' command to specify one of the
 target types configured for GDB (*note Commands for Managing Targets:
 Target Commands.).
 
    It is possible to build GDB for several different "target
 architectures".  When GDB is built like that, you can choose one of the
-available architectures with the `set architecture' command.
+available architectures with the 'set architecture' command.
 
-`set architecture ARCH'
+'set architecture ARCH'
      This command sets the current target architecture to ARCH.  The
-     value of ARCH can be `"auto"', in addition to one of the supported
+     value of ARCH can be '"auto"', in addition to one of the supported
      architectures.
 
-`show architecture'
+'show architecture'
      Show the current target architecture.
 
-`set processor'
-`processor'
-     These are alias commands for, respectively, `set architecture' and
-     `show architecture'.
+'set processor'
+'processor'
+     These are alias commands for, respectively, 'set architecture' and
+     'show architecture'.
 
 * Menu:
 
@@ -1753,14 +1783,14 @@ making core file and process mutually ex
 work concurrently on multiple active targets, one in each class.  This
 allows you to (for example) start a process and inspect its activity,
 while still having access to the executable file after the process
-finishes.  Or if you start process recording (*note Reverse
-Execution::) and `reverse-step' there, you are presented a virtual
-layer of the recording target, while the process target remains stopped
-at the chronologically last point of the process execution.
+finishes.  Or if you start process recording (*note Reverse Execution::)
+and 'reverse-step' there, you are presented a virtual layer of the
+recording target, while the process target remains stopped at the
+chronologically last point of the process execution.
 
-   Use the `core-file' and `exec-file' commands to select a new core
+   Use the 'core-file' and 'exec-file' commands to select a new core
 file or executable target (*note Commands to Specify Files: Files.).  To
-specify as a target a process that is already running, use the `attach'
+specify as a target a process that is already running, use the 'attach'
 command (*note Debugging an Already-running Process: Attach.).
 
 
@@ -1769,7 +1799,7 @@ File: gdb.info,  Node: Target Commands, 
 19.2 Commands for Managing Targets
 ==================================
 
-`target TYPE PARAMETERS'
+'target TYPE PARAMETERS'
      Connects the GDB host environment to a target machine or process.
      A target is typically a protocol for talking to debugging
      facilities.  You use the argument TYPE to specify the type or
@@ -1779,63 +1809,63 @@ File: gdb.info,  Node: Target Commands, 
      typically include things like device names or host names to connect
      with, process numbers, and baud rates.
 
-     The `target' command does not repeat if you press <RET> again
-     after executing the command.
+     The 'target' command does not repeat if you press <RET> again after
+     executing the command.
 
-`help target'
+'help target'
      Displays the names of all targets available.  To display targets
-     currently selected, use either `info target' or `info files'
-     (*note Commands to Specify Files: Files.).
+     currently selected, use either 'info target' or 'info files' (*note
+     Commands to Specify Files: Files.).
 
-`help target NAME'
+'help target NAME'
      Describe a particular target, including any parameters necessary to
      select it.
 
-`set gnutarget ARGS'
-     GDB uses its own library BFD to read your files.  GDB knows
-     whether it is reading an "executable", a "core", or a ".o" file;
-     however, you can specify the file format with the `set gnutarget'
-     command.  Unlike most `target' commands, with `gnutarget' the
-     `target' refers to a program, not a machine.
+'set gnutarget ARGS'
+     GDB uses its own library BFD to read your files.  GDB knows whether
+     it is reading an "executable", a "core", or a ".o" file; however,
+     you can specify the file format with the 'set gnutarget' command.
+     Unlike most 'target' commands, with 'gnutarget' the 'target' refers
+     to a program, not a machine.
 
-          _Warning:_ To specify a file format with `set gnutarget', you
+          _Warning:_ To specify a file format with 'set gnutarget', you
           must know the actual BFD name.
 
      *Note Commands to Specify Files: Files.
 
-`show gnutarget'
-     Use the `show gnutarget' command to display what file format
-     `gnutarget' is set to read.  If you have not set `gnutarget', GDB
+'show gnutarget'
+     Use the 'show gnutarget' command to display what file format
+     'gnutarget' is set to read.  If you have not set 'gnutarget', GDB
      will determine the file format for each file automatically, and
-     `show gnutarget' displays `The current BFD target is "auto"'.
+     'show gnutarget' displays 'The current BFD target is "auto"'.
 
    Here are some common targets (available, or not, depending on the GDB
 configuration):
 
-`target exec PROGRAM'
-     An executable file.  `target exec PROGRAM' is the same as
-     `exec-file PROGRAM'.
-
-`target core FILENAME'
-     A core dump file.  `target core FILENAME' is the same as
-     `core-file FILENAME'.
+'target exec PROGRAM'
+     An executable file.  'target exec PROGRAM' is the same as
+     'exec-file PROGRAM'.
+
+'target core FILENAME'
+     A core dump file.  'target core FILENAME' is the same as 'core-file
+     FILENAME'.
 
-`target remote MEDIUM'
+'target remote MEDIUM'
      A remote system connected to GDB via a serial line or network
      connection.  This command tells GDB to use its own remote protocol
      over MEDIUM for debugging.  *Note Remote Debugging::.
 
-     For example, if you have a board connected to `/dev/ttya' on the
+     For example, if you have a board connected to '/dev/ttya' on the
      machine running GDB, you could say:
 
           target remote /dev/ttya
 
-     `target remote' supports the `load' command.  This is only useful
+     'target remote' supports the 'load' command.  This is only useful
      if you have some other way of getting the stub to the target
      system, and you can put it somewhere in memory where it won't get
      clobbered by the download.
 
-`target sim [SIMARGS] ...'
+'target sim [SIMARGS] ...'
      Builtin CPU simulator.  GDB includes simulators for most
      architectures.  In general,
                   target sim
@@ -1843,17 +1873,16 @@ configuration):
                   run
      works; however, you cannot assume that a specific memory map,
      device drivers, or even basic I/O is available, although some
-     simulators do provide these.  For info about any
-     processor-specific simulator details, see the appropriate section
-     in *note Embedded Processors: Embedded Processors.
-
-`target native'
-     Setup for local/native process debugging.  Useful to make the
-     `run' command spawn native processes (likewise `attach', etc.)
-     even when `set auto-connect-native-target' is `off' (*note set
+     simulators do provide these.  For info about any processor-specific
+     simulator details, see the appropriate section in *note Embedded
+     Processors: Embedded Processors.
+
+'target native'
+     Setup for local/native process debugging.  Useful to make the 'run'
+     command spawn native processes (likewise 'attach', etc.) even when
+     'set auto-connect-native-target' is 'off' (*note set
      auto-connect-native-target::).
 
-
    Different targets are available on different configurations of GDB;
 your configuration may have more or fewer targets.
 
@@ -1861,44 +1890,52 @@ your configuration may have more or fewe
 once you've successfully established a connection.  You may wish to
 control various aspects of this process.
 
-`set hash'
-     This command controls whether a hash mark `#' is displayed while
+'set hash'
+     This command controls whether a hash mark '#' is displayed while
      downloading a file to the remote monitor.  If on, a hash mark is
      displayed after each S-record is successfully downloaded to the
      monitor.
 
-`show hash'
+'show hash'
      Show the current status of displaying the hash mark.
 
-`set debug monitor'
+'set debug monitor'
      Enable or disable display of communications messages between GDB
      and the remote monitor.
 
-`show debug monitor'
+'show debug monitor'
      Show the current status of displaying communications between GDB
      and the remote monitor.
 
-`load FILENAME'
+'load FILENAME OFFSET'
      Depending on what remote debugging facilities are configured into
-     GDB, the `load' command may be available.  Where it exists, it is
+     GDB, the 'load' command may be available.  Where it exists, it is
      meant to make FILENAME (an executable) available for debugging on
      the remote system--by downloading, or dynamic linking, for example.
-     `load' also records the FILENAME symbol table in GDB, like the
-     `add-symbol-file' command.
+     'load' also records the FILENAME symbol table in GDB, like the
+     'add-symbol-file' command.
 
-     If your GDB does not have a `load' command, attempting to execute
-     it gets the error message "`You can't do that when your target is
+     If your GDB does not have a 'load' command, attempting to execute
+     it gets the error message "'You can't do that when your target is
      ...'"
 
      The file is loaded at whatever address is specified in the
-     executable.  For some object file formats, you can specify the
-     load address when you link the program; for other formats, like
-     a.out, the object file format specifies a fixed address.
+     executable.  For some object file formats, you can specify the load
+     address when you link the program; for other formats, like a.out,
+     the object file format specifies a fixed address.
+
+     It is also possible to tell GDB to load the executable file at a
+     specific offset described by the optional argument OFFSET.  When
+     OFFSET is provided, FILENAME must also be provided.
 
      Depending on the remote side capabilities, GDB may be able to load
      programs into flash memory.
 
-     `load' does not repeat if you press <RET> again after using it.
+     'load' does not repeat if you press <RET> again after using it.
+
+'flash-erase'
+
+     Erases all known flash memory regions on the target.
 
 
 File: gdb.info,  Node: Byte Order,  Prev: Target Commands,  Up: Targets
@@ -1907,25 +1944,24 @@ File: gdb.info,  Node: Byte Order,  Prev
 ===============================
 
 Some types of processors, such as the MIPS, PowerPC, and Renesas SH,
-offer the ability to run either big-endian or little-endian byte
-orders.  Usually the executable or symbol will include a bit to
-designate the endian-ness, and you will not need to worry about which
-to use.  However, you may still find it useful to adjust GDB's idea of
-processor endian-ness manually.
+offer the ability to run either big-endian or little-endian byte orders.
+Usually the executable or symbol will include a bit to designate the
+endian-ness, and you will not need to worry about which to use.
+However, you may still find it useful to adjust GDB's idea of processor
+endian-ness manually.
 
-`set endian big'
+'set endian big'
      Instruct GDB to assume the target is big-endian.
 
-`set endian little'
+'set endian little'
      Instruct GDB to assume the target is little-endian.
 
-`set endian auto'
+'set endian auto'
      Instruct GDB to use the byte order associated with the executable.
 
-`show endian'
+'show endian'
      Display GDB's current idea of the target byte order.
 
-
    Note that these commands merely adjust interpretation of symbolic
 data on the host, and that they have absolutely no effect on the target
 system.
@@ -1950,7 +1986,7 @@ remote stubs--the code that runs on the 
 with GDB.
 
    Other remote targets may be available in your configuration of GDB;
-use `help target' to list them.
+use 'help target' to list them.
 
 * Menu:
 
@@ -1966,33 +2002,142 @@ File: gdb.info,  Node: Connecting,  Next
 20.1 Connecting to a Remote Target
 ==================================
 
-GDB needs an unstripped copy of your program to access symbol and
-debugging information.  Some remote targets (*note qXfer executable
-filename read::, and *note Host I/O Packets::) allow GDB to access
-program files over the same connection used to communicate with GDB.
-With such a target, if the remote program is unstripped, the only
-command you need is `target remote'.  Otherwise, start up GDB using the
-name of the local unstripped copy of your program as the first
-argument, or use the `file' command.
-
-   GDB can communicate with the target over a serial line, or over an
-IP network using TCP or UDP.  In each case, GDB uses the same protocol
-for debugging your program; only the medium carrying the debugging
-packets varies.  The `target remote' command establishes a connection
-to the target.  Its arguments indicate which medium to use:
+This section describes how to connect to a remote target, including the
+types of connections and their differences, how to set up executable and
+symbol files on the host and target, and the commands used for
+connecting to and disconnecting from the remote target.
+
+20.1.1 Types of Remote Connections
+----------------------------------
+
+GDB supports two types of remote connections, 'target remote' mode and
+'target extended-remote' mode.  Note that many remote targets support
+only 'target remote' mode.  There are several major differences between
+the two types of connections, enumerated here:
+
+Result of detach or program exit
+     *With target remote mode:* When the debugged program exits or you
+     detach from it, GDB disconnects from the target.  When using
+     'gdbserver', 'gdbserver' will exit.
+
+     *With target extended-remote mode:* When the debugged program exits
+     or you detach from it, GDB remains connected to the target, even
+     though no program is running.  You can rerun the program, attach to
+     a running program, or use 'monitor' commands specific to the
+     target.
+
+     When using 'gdbserver' in this case, it does not exit unless it was
+     invoked using the '--once' option.  If the '--once' option was not
+     used, you can ask 'gdbserver' to exit using the 'monitor exit'
+     command (*note Monitor Commands for gdbserver::).
+
+Specifying the program to debug
+     For both connection types you use the 'file' command to specify the
+     program on the host system.  If you are using 'gdbserver' there are
+     some differences in how to specify the location of the program on
+     the target.
+
+     *With target remote mode:* You must either specify the program to
+     debug on the 'gdbserver' command line or use the '--attach' option
+     (*note Attaching to a Running Program: Attaching to a program.).
+
+     *With target extended-remote mode:* You may specify the program to
+     debug on the 'gdbserver' command line, or you can load the program
+     or attach to it using GDB commands after connecting to 'gdbserver'.
+
+     You can start 'gdbserver' without supplying an initial command to
+     run or process ID to attach.  To do this, use the '--multi' command
+     line option.  Then you can connect using 'target extended-remote'
+     and start the program you want to debug (see below for details on
+     using the 'run' command in this scenario).  Note that the
+     conditions under which 'gdbserver' terminates depend on how GDB
+     connects to it ('target remote' or 'target extended-remote').  The
+     '--multi' option to 'gdbserver' has no influence on that.
+
+The 'run' command
+     *With target remote mode:* The 'run' command is not supported.
+     Once a connection has been established, you can use all the usual
+     GDB commands to examine and change data.  The remote program is
+     already running, so you can use commands like 'step' and
+     'continue'.
+
+     *With target extended-remote mode:* The 'run' command is supported.
+     The 'run' command uses the value set by 'set remote exec-file'
+     (*note set remote exec-file::) to select the program to run.
+     Command line arguments are supported, except for wildcard expansion
+     and I/O redirection (*note Arguments::).
+
+     If you specify the program to debug on the command line, then the
+     'run' command is not required to start execution, and you can
+     resume using commands like 'step' and 'continue' as with 'target
+     remote' mode.
+
+Attaching
+     *With target remote mode:* The GDB command 'attach' is not
+     supported.  To attach to a running program using 'gdbserver', you
+     must use the '--attach' option (*note Running gdbserver::).
+
+     *With target extended-remote mode:* To attach to a running program,
+     you may use the 'attach' command after the connection has been
+     established.  If you are using 'gdbserver', you may also invoke
+     'gdbserver' using the '--attach' option (*note Running
+     gdbserver::).
+
+20.1.2 Host and Target Files
+----------------------------
+
+GDB, running on the host, needs access to symbol and debugging
+information for your program running on the target.  This requires
+access to an unstripped copy of your program, and possibly any
+associated symbol files.  Note that this section applies equally to both
+'target remote' mode and 'target extended-remote' mode.
+
+   Some remote targets (*note qXfer executable filename read::, and
+*note Host I/O Packets::) allow GDB to access program files over the
+same connection used to communicate with GDB.  With such a target, if
+the remote program is unstripped, the only command you need is 'target
+remote' (or 'target extended-remote').
+
+   If the remote program is stripped, or the target does not support
+remote program file access, start up GDB using the name of the local
+unstripped copy of your program as the first argument, or use the 'file'
+command.  Use 'set sysroot' to specify the location (on the host) of
+target libraries (unless your GDB was compiled with the correct sysroot
+using '--with-sysroot').  Alternatively, you may use 'set
+solib-search-path' to specify how GDB locates target libraries.
+
+   The symbol file and target libraries must exactly match the
+executable and libraries on the target, with one exception: the files on
+the host system should not be stripped, even if the files on the target
+system are.  Mismatched or missing files will lead to confusing results
+during debugging.  On GNU/Linux targets, mismatched or missing files may
+also prevent 'gdbserver' from debugging multi-threaded programs.
+
+20.1.3 Remote Connection Commands
+---------------------------------
+
+GDB can communicate with the target over a serial line, or over an IP
+network using TCP or UDP.  In each case, GDB uses the same protocol for
+debugging your program; only the medium carrying the debugging packets
+varies.  The 'target remote' and 'target extended-remote' commands
+establish a connection to the target.  Both commands accept the same
+arguments, which indicate the medium to use:
 
-`target remote SERIAL-DEVICE'
+'target remote SERIAL-DEVICE'
+'target extended-remote SERIAL-DEVICE'
      Use SERIAL-DEVICE to communicate with the target.  For example, to
-     use a serial line connected to the device named `/dev/ttyb':
+     use a serial line connected to the device named '/dev/ttyb':
 
           target remote /dev/ttyb
 
      If you're using a serial line, you may want to give GDB the
-     `--baud' option, or use the `set serial baud' command (*note set
-     serial baud: Remote Configuration.) before the `target' command.
+     '--baud' option, or use the 'set serial baud' command (*note set
+     serial baud: Remote Configuration.) before the 'target' command.
 
-`target remote `HOST:PORT''
-`target remote `tcp:HOST:PORT''
+'target remote HOST:PORT'
+'target remote tcp:HOST:PORT'
+'target extended-remote HOST:PORT'
+'target extended-remote tcp:HOST:PORT'
      Debug using a TCP connection to PORT on HOST.  The HOST may be
      either a host name or a numeric IP address; PORT must be a decimal
      number.  The HOST could be the target machine itself, if it is
@@ -2000,50 +2145,47 @@ to the target.  Its arguments indicate w
      which in turn has a serial line to the target.
 
      For example, to connect to port 2828 on a terminal server named
-     `manyfarms':
+     'manyfarms':
 
           target remote manyfarms:2828
 
      If your remote target is actually running on the same machine as
      your debugger session (e.g. a simulator for your target running on
-     the same host), you can omit the hostname.  For example, to
-     connect to port 1234 on your local machine:
+     the same host), you can omit the hostname.  For example, to connect
+     to port 1234 on your local machine:
 
           target remote :1234
+
      Note that the colon is still required here.
 
-`target remote `udp:HOST:PORT''
+'target remote udp:HOST:PORT'
+'target extended-remote udp:HOST:PORT'
      Debug using UDP packets to PORT on HOST.  For example, to connect
-     to UDP port 2828 on a terminal server named `manyfarms':
+     to UDP port 2828 on a terminal server named 'manyfarms':
 
           target remote udp:manyfarms:2828
 
      When using a UDP connection for remote debugging, you should keep
-     in mind that the `U' stands for "Unreliable".  UDP can silently
-     drop packets on busy or unreliable networks, which will cause
-     havoc with your debugging session.
-
-`target remote | COMMAND'
-     Run COMMAND in the background and communicate with it using a
-     pipe.  The COMMAND is a shell command, to be parsed and expanded
-     by the system's command shell, `/bin/sh'; it should expect remote
-     protocol packets on its standard input, and send replies on its
-     standard output.  You could use this to run a stand-alone simulator
-     that speaks the remote debugging protocol, to make net connections
-     using programs like `ssh', or for other similar tricks.
+     in mind that the 'U' stands for "Unreliable".  UDP can silently
+     drop packets on busy or unreliable networks, which will cause havoc
+     with your debugging session.
+
+'target remote | COMMAND'
+'target extended-remote | COMMAND'
+     Run COMMAND in the background and communicate with it using a pipe.
+     The COMMAND is a shell command, to be parsed and expanded by the
+     system's command shell, '/bin/sh'; it should expect remote protocol
+     packets on its standard input, and send replies on its standard
+     output.  You could use this to run a stand-alone simulator that
+     speaks the remote debugging protocol, to make net connections using
+     programs like 'ssh', or for other similar tricks.
 
      If COMMAND closes its standard output (perhaps by exiting), GDB
-     will try to send it a `SIGTERM' signal.  (If the program has
+     will try to send it a 'SIGTERM' signal.  (If the program has
      already exited, this will have no effect.)
 
-
-   Once the connection has been established, you can use all the usual
-commands to examine and change data.  The remote program is already
-running; you can use `step' and `continue', and you do not need to use
-`run'.
-
    Whenever GDB is waiting for the remote program, if you type the
-interrupt character (often `Ctrl-c'), GDB attempts to stop the program.
+interrupt character (often 'Ctrl-c'), GDB attempts to stop the program.
 This may or may not succeed, depending in part on the hardware and the
 serial drivers the remote system uses.  If you type the interrupt
 character once again, GDB displays this prompt:
@@ -2051,30 +2193,36 @@ character once again, GDB displays this 
      Interrupted while waiting for the program.
      Give up (and stop debugging it)?  (y or n)
 
-   If you type `y', GDB abandons the remote debugging session.  (If you
-decide you want to try again later, you can use `target remote' again
-to connect once more.)  If you type `n', GDB goes back to waiting.
+   In 'target remote' mode, if you type 'y', GDB abandons the remote
+debugging session.  (If you decide you want to try again later, you can
+use 'target remote' again to connect once more.)  If you type 'n', GDB
+goes back to waiting.
+
+   In 'target extended-remote' mode, typing 'n' will leave GDB connected
+to the target.
 
-`detach'
+'detach'
      When you have finished debugging the remote program, you can use
-     the `detach' command to release it from GDB control.  Detaching
+     the 'detach' command to release it from GDB control.  Detaching
      from the target normally resumes its execution, but the results
-     will depend on your particular remote stub.  After the `detach'
-     command, GDB is free to connect to another target.
-
-`disconnect'
-     The `disconnect' command behaves like `detach', except that the
-     target is generally not resumed.  It will wait for GDB (this
+     will depend on your particular remote stub.  After the 'detach'
+     command in 'target remote' mode, GDB is free to connect to another
+     target.  In 'target extended-remote' mode, GDB is still connected
+     to the target.
+
+'disconnect'
+     The 'disconnect' command closes the connection to the target, and
+     the target is generally not resumed.  It will wait for GDB (this
      instance or another one) to connect and continue debugging.  After
-     the `disconnect' command, GDB is again free to connect to another
+     the 'disconnect' command, GDB is again free to connect to another
      target.
 
-`monitor CMD'
+'monitor CMD'
      This command allows you to send arbitrary commands directly to the
-     remote monitor.  Since GDB doesn't care about the commands it
-     sends like this, this command is the way to extend GDB--you can
-     add new commands that only the external monitor will understand
-     and implement.
+     remote monitor.  Since GDB doesn't care about the commands it sends
+     like this, this command is the way to extend GDB--you can add new
+     commands that only the external monitor will understand and
+     implement.
 
 
 File: gdb.info,  Node: File Transfer,  Next: Server,  Prev: Connecting,  Up: Remote Debugging
@@ -2083,62 +2231,61 @@ File: gdb.info,  Node: File Transfer,  N
 =====================================
 
 Some remote targets offer the ability to transfer files over the same
-connection used to communicate with GDB.  This is convenient for
-targets accessible through other means, e.g. GNU/Linux systems running
-`gdbserver' over a network interface.  For other targets, e.g. embedded
+connection used to communicate with GDB.  This is convenient for targets
+accessible through other means, e.g. GNU/Linux systems running
+'gdbserver' over a network interface.  For other targets, e.g. embedded
 devices with only a single serial port, this may be the only way to
 upload or download files.
 
    Not all remote targets support these commands.
 
-`remote put HOSTFILE TARGETFILE'
+'remote put HOSTFILE TARGETFILE'
      Copy file HOSTFILE from the host system (the machine running GDB)
      to TARGETFILE on the target system.
 
-`remote get TARGETFILE HOSTFILE'
-     Copy file TARGETFILE from the target system to HOSTFILE on the
-     host system.
+'remote get TARGETFILE HOSTFILE'
+     Copy file TARGETFILE from the target system to HOSTFILE on the host
+     system.
 
-`remote delete TARGETFILE'
+'remote delete TARGETFILE'
      Delete TARGETFILE from the target system.
 
-
 
 File: gdb.info,  Node: Server,  Next: Remote Configuration,  Prev: File Transfer,  Up: Remote Debugging
 
-20.3 Using the `gdbserver' Program
+20.3 Using the 'gdbserver' Program
 ==================================
 
-`gdbserver' is a control program for Unix-like systems, which allows
-you to connect your program with a remote GDB via `target remote'--but
-without linking in the usual debugging stub.
+'gdbserver' is a control program for Unix-like systems, which allows you
+to connect your program with a remote GDB via 'target remote' or 'target
+extended-remote'--but without linking in the usual debugging stub.
 
-   `gdbserver' is not a complete replacement for the debugging stubs,
+   'gdbserver' is not a complete replacement for the debugging stubs,
 because it requires essentially the same operating-system facilities
-that GDB itself does.  In fact, a system that can run `gdbserver' to
-connect to a remote GDB could also run GDB locally!  `gdbserver' is
-sometimes useful nevertheless, because it is a much smaller program
-than GDB itself.  It is also easier to port than all of GDB, so you may
-be able to get started more quickly on a new system by using
-`gdbserver'.  Finally, if you develop code for real-time systems, you
-may find that the tradeoffs involved in real-time operation make it
-more convenient to do as much development work as possible on another
-system, for example by cross-compiling.  You can use `gdbserver' to
-make a similar choice for debugging.
+that GDB itself does.  In fact, a system that can run 'gdbserver' to
+connect to a remote GDB could also run GDB locally!  'gdbserver' is
+sometimes useful nevertheless, because it is a much smaller program than
+GDB itself.  It is also easier to port than all of GDB, so you may be
+able to get started more quickly on a new system by using 'gdbserver'.
+Finally, if you develop code for real-time systems, you may find that
+the tradeoffs involved in real-time operation make it more convenient to
+do as much development work as possible on another system, for example
+by cross-compiling.  You can use 'gdbserver' to make a similar choice
+for debugging.
 
-   GDB and `gdbserver' communicate via either a serial line or a TCP
+   GDB and 'gdbserver' communicate via either a serial line or a TCP
 connection, using the standard GDB remote serial protocol.
 
-     _Warning:_ `gdbserver' does not have any built-in security.  Do
-     not run `gdbserver' connected to any public network; a GDB
-     connection to `gdbserver' provides access to the target system
-     with the same privileges as the user running `gdbserver'.
+     _Warning:_ 'gdbserver' does not have any built-in security.  Do not
+     run 'gdbserver' connected to any public network; a GDB connection
+     to 'gdbserver' provides access to the target system with the same
+     privileges as the user running 'gdbserver'.
 
-20.3.1 Running `gdbserver'
+20.3.1 Running 'gdbserver'
 --------------------------
 
-Run `gdbserver' on the target system.  You need a copy of the program
-you want to debug, including any libraries it requires.  `gdbserver'
+Run 'gdbserver' on the target system.  You need a copy of the program
+you want to debug, including any libraries it requires.  'gdbserver'
 does not need your program's symbol table, so you can strip the program
 if necessary to save space.  GDB on the host system does all the symbol
 handling.
@@ -2150,304 +2297,277 @@ syntax is:
      target> gdbserver COMM PROGRAM [ ARGS ... ]
 
    COMM is either a device name (to use a serial line), or a TCP
-hostname and portnumber, or `-' or `stdio' to use stdin/stdout of
-`gdbserver'.  For example, to debug Emacs with the argument `foo.txt'
-and communicate with GDB over the serial port `/dev/com1':
+hostname and portnumber, or '-' or 'stdio' to use stdin/stdout of
+'gdbserver'.  For example, to debug Emacs with the argument 'foo.txt'
+and communicate with GDB over the serial port '/dev/com1':
 
      target> gdbserver /dev/com1 emacs foo.txt
 
-   `gdbserver' waits passively for the host GDB to communicate with it.
+   'gdbserver' waits passively for the host GDB to communicate with it.
 
    To use a TCP connection instead of a serial line:
 
      target> gdbserver host:2345 emacs foo.txt
 
    The only difference from the previous example is the first argument,
-specifying that you are communicating with the host GDB via TCP.  The
-`host:2345' argument means that `gdbserver' is to expect a TCP
-connection from machine `host' to local TCP port 2345.  (Currently, the
-`host' part is ignored.)  You can choose any number you want for the
+specifying that you are communicating with the host GDB via TCP. The
+'host:2345' argument means that 'gdbserver' is to expect a TCP
+connection from machine 'host' to local TCP port 2345.  (Currently, the
+'host' part is ignored.)  You can choose any number you want for the
 port number as long as it does not conflict with any TCP ports already
-in use on the target system (for example, `23' is reserved for
-`telnet').(1)  You must use the same port number with the host GDB
-`target remote' command.
+in use on the target system (for example, '23' is reserved for
+'telnet').(1)  You must use the same port number with the host GDB
+'target remote' command.
 
-   The `stdio' connection is useful when starting `gdbserver' with ssh:
+   The 'stdio' connection is useful when starting 'gdbserver' with ssh:
 
      (gdb) target remote | ssh -T hostname gdbserver - hello
 
-   The `-T' option to ssh is provided because we don't need a remote
+   The '-T' option to ssh is provided because we don't need a remote
 pty, and we don't want escape-character handling.  Ssh does this by
 default when a command is provided, the flag is provided to make it
 explicit.  You could elide it if you want to.
 
-   Programs started with stdio-connected gdbserver have `/dev/null' for
-`stdin', and `stdout',`stderr' are sent back to gdb for display through
-a pipe connected to gdbserver.  Both `stdout' and `stderr' use the same
+   Programs started with stdio-connected gdbserver have '/dev/null' for
+'stdin', and 'stdout','stderr' are sent back to gdb for display through
+a pipe connected to gdbserver.  Both 'stdout' and 'stderr' use the same
 pipe.
 
 20.3.1.1 Attaching to a Running Program
 .......................................
 
-On some targets, `gdbserver' can also attach to running programs.  This
-is accomplished via the `--attach' argument.  The syntax is:
+On some targets, 'gdbserver' can also attach to running programs.  This
+is accomplished via the '--attach' argument.  The syntax is:
 
      target> gdbserver --attach COMM PID
 
    PID is the process ID of a currently running process.  It isn't
-necessary to point `gdbserver' at a binary for the running process.
+necessary to point 'gdbserver' at a binary for the running process.
+
+   In 'target extended-remote' mode, you can also attach using the GDB
+attach command (*note Attaching in Types of Remote Connections::).
 
    You can debug processes by name instead of process ID if your target
-has the `pidof' utility:
+has the 'pidof' utility:
 
      target> gdbserver --attach COMM `pidof PROGRAM`
 
    In case more than one copy of PROGRAM is running, or PROGRAM has
-multiple threads, most versions of `pidof' support the `-s' option to
+multiple threads, most versions of 'pidof' support the '-s' option to
 only return the first process ID.
 
-20.3.1.2 Multi-Process Mode for `gdbserver'
-...........................................
-
-When you connect to `gdbserver' using `target remote', `gdbserver'
-debugs the specified program only once.  When the program exits, or you
-detach from it, GDB closes the connection and `gdbserver' exits.
-
-   If you connect using `target extended-remote', `gdbserver' enters
-multi-process mode.  When the debugged program exits, or you detach
-from it, GDB stays connected to `gdbserver' even though no program is
-running.  The `run' and `attach' commands instruct `gdbserver' to run
-or attach to a new program.  The `run' command uses `set remote
-exec-file' (*note set remote exec-file::) to select the program to run.
-Command line arguments are supported, except for wildcard expansion and
-I/O redirection (*note Arguments::).
-
-   To start `gdbserver' without supplying an initial command to run or
-process ID to attach, use the `--multi' command line option.  Then you
-can connect using `target extended-remote' and start the program you
-want to debug.
-
-   In multi-process mode `gdbserver' does not automatically exit unless
-you use the option `--once'.  You can terminate it by using `monitor
-exit' (*note Monitor Commands for gdbserver::).  Note that the
-conditions under which `gdbserver' terminates depend on how GDB
-connects to it (`target remote' or `target extended-remote').  The
-`--multi' option to `gdbserver' has no influence on that.
-
-20.3.1.3 TCP port allocation lifecycle of `gdbserver'
+20.3.1.2 TCP port allocation lifecycle of 'gdbserver'
 .....................................................
 
-This section applies only when `gdbserver' is run to listen on a TCP
+This section applies only when 'gdbserver' is run to listen on a TCP
 port.
 
-   `gdbserver' normally terminates after all of its debugged processes
-have terminated in `target remote' mode.  On the other hand, for `target
-extended-remote', `gdbserver' stays running even with no processes left.
+   'gdbserver' normally terminates after all of its debugged processes
+have terminated in 'target remote' mode.  On the other hand, for 'target
+extended-remote', 'gdbserver' stays running even with no processes left.
 GDB normally terminates the spawned debugged process on its exit, which
-normally also terminates `gdbserver' in the `target remote' mode.
+normally also terminates 'gdbserver' in the 'target remote' mode.
 Therefore, when the connection drops unexpectedly, and GDB cannot ask
-`gdbserver' to kill its debugged processes, `gdbserver' stays running
-even in the `target remote' mode.
+'gdbserver' to kill its debugged processes, 'gdbserver' stays running
+even in the 'target remote' mode.
 
-   When `gdbserver' stays running, GDB can connect to it again later.
+   When 'gdbserver' stays running, GDB can connect to it again later.
 Such reconnecting is useful for features like *note disconnected
 tracing::.  For completeness, at most one GDB can be connected at a
 time.
 
-   By default, `gdbserver' keeps the listening TCP port open, so that
-subsequent connections are possible.  However, if you start `gdbserver'
-with the `--once' option, it will stop listening for any further
+   By default, 'gdbserver' keeps the listening TCP port open, so that
+subsequent connections are possible.  However, if you start 'gdbserver'
+with the '--once' option, it will stop listening for any further
 connection attempts after connecting to the first GDB session.  This
-means no further connections to `gdbserver' will be possible after the
-first one.  It also means `gdbserver' will terminate after the first
+means no further connections to 'gdbserver' will be possible after the
+first one.  It also means 'gdbserver' will terminate after the first
 connection with remote GDB has closed, even for unexpectedly closed
-connections and even in the `target extended-remote' mode.  The
-`--once' option allows reusing the same port number for connecting to
-multiple instances of `gdbserver' running on the same host, since each
-instance closes its port after the first connection.
+connections and even in the 'target extended-remote' mode.  The '--once'
+option allows reusing the same port number for connecting to multiple
+instances of 'gdbserver' running on the same host, since each instance
+closes its port after the first connection.
 
-20.3.1.4 Other Command-Line Arguments for `gdbserver'
+20.3.1.3 Other Command-Line Arguments for 'gdbserver'
 .....................................................
 
-The `--debug' option tells `gdbserver' to display extra status
-information about the debugging process.  The `--remote-debug' option
-tells `gdbserver' to display remote protocol debug output.  These
-options are intended for `gdbserver' development and for bug reports to
+You can use the '--multi' option to start 'gdbserver' without specifying
+a program to debug or a process to attach to.  Then you can attach in
+'target extended-remote' mode and run or attach to a program.  For more
+information, *note --multi Option in Types of Remote Connnections::.
+
+   The '--debug' option tells 'gdbserver' to display extra status
+information about the debugging process.  The '--remote-debug' option
+tells 'gdbserver' to display remote protocol debug output.  These
+options are intended for 'gdbserver' development and for bug reports to
 the developers.
 
-   The `--debug-format=option1[,option2,...]' option tells `gdbserver'
+   The '--debug-format=option1[,option2,...]' option tells 'gdbserver'
 to include additional information in each output.  Possible options are:
 
-`none'
+'none'
      Turn off all extra information in debugging output.
-
-`all'
+'all'
      Turn on all extra information in debugging output.
-
-`timestamps'
+'timestamps'
      Include a timestamp in each line of debugging output.
 
-   Options are processed in order.  Thus, for example, if `none'
-appears last then no additional information is added to debugging
-output.
+   Options are processed in order.  Thus, for example, if 'none' appears
+last then no additional information is added to debugging output.
 
-   The `--wrapper' option specifies a wrapper to launch programs for
+   The '--wrapper' option specifies a wrapper to launch programs for
 debugging.  The option should be followed by the name of the wrapper,
-then any command-line arguments to pass to the wrapper, then `--'
+then any command-line arguments to pass to the wrapper, then '--'
 indicating the end of the wrapper arguments.
 
-   `gdbserver' runs the specified wrapper program with a combined
+   'gdbserver' runs the specified wrapper program with a combined
 command line including the wrapper arguments, then the name of the
 program to debug, then any arguments to the program.  The wrapper runs
 until it executes your program, and then GDB gains control.
 
-   You can use any program that eventually calls `execve' with its
+   You can use any program that eventually calls 'execve' with its
 arguments as a wrapper.  Several standard Unix utilities do this, e.g.
-`env' and `nohup'.  Any Unix shell script ending with `exec "$@"' will
+'env' and 'nohup'.  Any Unix shell script ending with 'exec "$@"' will
 also work.
 
-   For example, you can use `env' to pass an environment variable to
-the debugged program, without setting the variable in `gdbserver''s
+   For example, you can use 'env' to pass an environment variable to the
+debugged program, without setting the variable in 'gdbserver''s
 environment:
 
      $ gdbserver --wrapper env LD_PRELOAD=libtest.so -- :2222 ./testprog
 
-20.3.2 Connecting to `gdbserver'
+20.3.2 Connecting to 'gdbserver'
 --------------------------------
 
-Run GDB on the host system.
+The basic procedure for connecting to the remote target is:
 
-   First make sure you have the necessary symbol files.  Load symbols
-for your application using the `file' command before you connect.  Use
-`set sysroot' to locate target libraries (unless your GDB was compiled
-with the correct sysroot using `--with-sysroot').
+   * Run GDB on the host system.
 
-   The symbol file and target libraries must exactly match the
-executable and libraries on the target, with one exception: the files
-on the host system should not be stripped, even if the files on the
-target system are.  Mismatched or missing files will lead to confusing
-results during debugging.  On GNU/Linux targets, mismatched or missing
-files may also prevent `gdbserver' from debugging multi-threaded
-programs.
-
-   Connect to your target (*note Connecting to a Remote Target:
-Connecting.).  For TCP connections, you must start up `gdbserver' prior
-to using the `target remote' command.  Otherwise you may get an error
-whose text depends on the host system, but which usually looks
-something like `Connection refused'.  Don't use the `load' command in
-GDB when using `gdbserver', since the program is already on the target.
+   * Make sure you have the necessary symbol files (*note Host and
+     target files::).  Load symbols for your application using the
+     'file' command before you connect.  Use 'set sysroot' to locate
+     target libraries (unless your GDB was compiled with the correct
+     sysroot using '--with-sysroot').
+
+   * Connect to your target (*note Connecting to a Remote Target:
+     Connecting.).  For TCP connections, you must start up 'gdbserver'
+     prior to using the 'target' command.  Otherwise you may get an
+     error whose text depends on the host system, but which usually
+     looks something like 'Connection refused'.  Don't use the 'load'
+     command in GDB when using 'target remote' mode, since the program
+     is already on the target.
 
-20.3.3 Monitor Commands for `gdbserver'
+20.3.3 Monitor Commands for 'gdbserver'
 ---------------------------------------
 
-During a GDB session using `gdbserver', you can use the `monitor'
-command to send special requests to `gdbserver'.  Here are the
-available commands.
+During a GDB session using 'gdbserver', you can use the 'monitor'
+command to send special requests to 'gdbserver'.  Here are the available
+commands.
 
-`monitor help'
+'monitor help'
      List the available monitor commands.
 
-`monitor set debug 0'
-`monitor set debug 1'
+'monitor set debug 0'
+'monitor set debug 1'
      Disable or enable general debugging messages.
 
-`monitor set remote-debug 0'
-`monitor set remote-debug 1'
+'monitor set remote-debug 0'
+'monitor set remote-debug 1'
      Disable or enable specific debugging messages associated with the
      remote protocol (*note Remote Protocol::).
 
-`monitor set debug-format option1[,option2,...]'
+'monitor set debug-format option1[,option2,...]'
      Specify additional text to add to debugging messages.  Possible
      options are:
 
-    `none'
+     'none'
           Turn off all extra information in debugging output.
-
-    `all'
+     'all'
           Turn on all extra information in debugging output.
-
-    `timestamps'
+     'timestamps'
           Include a timestamp in each line of debugging output.
 
-     Options are processed in order.  Thus, for example, if `none'
+     Options are processed in order.  Thus, for example, if 'none'
      appears last then no additional information is added to debugging
      output.
 
-`monitor set libthread-db-search-path [PATH]'
+'monitor set libthread-db-search-path [PATH]'
      When this command is issued, PATH is a colon-separated list of
-     directories to search for `libthread_db' (*note set
+     directories to search for 'libthread_db' (*note set
      libthread-db-search-path: Threads.).  If you omit PATH,
-     `libthread-db-search-path' will be reset to its default value.
+     'libthread-db-search-path' will be reset to its default value.
 
-     The special entry `$pdir' for `libthread-db-search-path' is not
-     supported in `gdbserver'.
+     The special entry '$pdir' for 'libthread-db-search-path' is not
+     supported in 'gdbserver'.
 
-`monitor exit'
+'monitor exit'
      Tell gdbserver to exit immediately.  This command should be
-     followed by `disconnect' to close the debugging session.
-     `gdbserver' will detach from any attached processes and kill any
-     processes it created.  Use `monitor exit' to terminate `gdbserver'
+     followed by 'disconnect' to close the debugging session.
+     'gdbserver' will detach from any attached processes and kill any
+     processes it created.  Use 'monitor exit' to terminate 'gdbserver'
      at the end of a multi-process mode debug session.
 
-
-20.3.4 Tracepoints support in `gdbserver'
+20.3.4 Tracepoints support in 'gdbserver'
 -----------------------------------------
 
-On some targets, `gdbserver' supports tracepoints, fast tracepoints and
+On some targets, 'gdbserver' supports tracepoints, fast tracepoints and
 static tracepoints.
 
    For fast or static tracepoints to work, a special library called the
 "in-process agent" (IPA), must be loaded in the inferior process.  This
-library is built and distributed as an integral part of `gdbserver'.
-In addition, support for static tracepoints requires building the
+library is built and distributed as an integral part of 'gdbserver'.  In
+addition, support for static tracepoints requires building the
 in-process agent library with static tracepoints support.  At present,
-the UST (LTTng Userspace Tracer, `http://lttng.org/ust') tracing engine
+the UST (LTTng Userspace Tracer, <http://lttng.org/ust>) tracing engine
 is supported.  This support is automatically available if UST
 development headers are found in the standard include path when
-`gdbserver' is built, or if `gdbserver' was explicitly configured using
-`--with-ust' to point at such headers.  You can explicitly disable the
-support using `--with-ust=no'.
+'gdbserver' is built, or if 'gdbserver' was explicitly configured using
+'--with-ust' to point at such headers.  You can explicitly disable the
+support using '--with-ust=no'.
 
    There are several ways to load the in-process agent in your program:
 
-`Specifying it as dependency at link time'
+'Specifying it as dependency at link time'
+
      You can link your program dynamically with the in-process agent
      library.  On most systems, this is accomplished by adding
-     `-linproctrace' to the link command.
+     '-linproctrace' to the link command.
+
+'Using the system's preloading mechanisms'
 
-`Using the system's preloading mechanisms'
      You can force loading the in-process agent at startup time by using
      your system's support for preloading shared libraries.  Many Unixes
      support the concept of preloading user defined libraries.  In most
-     cases, you do that by specifying `LD_PRELOAD=libinproctrace.so' in
-     the environment.  See also the description of `gdbserver''s
-     `--wrapper' command line option.
+     cases, you do that by specifying 'LD_PRELOAD=libinproctrace.so' in
+     the environment.  See also the description of 'gdbserver''s
+     '--wrapper' command line option.
+
+'Using GDB to force loading the agent at run time'
 
-`Using GDB to force loading the agent at run time'
      On some systems, you can force the inferior to load a shared
      library, by calling a dynamic loader function in the inferior that
      takes care of dynamically looking up and loading a shared library.
-     On most Unix systems, the function is `dlopen'.  You'll use the
-     `call' command for that.  For example:
+     On most Unix systems, the function is 'dlopen'.  You'll use the
+     'call' command for that.  For example:
 
           (gdb) call dlopen ("libinproctrace.so", ...)
 
-     Note that on most Unix systems, for the `dlopen' function to be
-     available, the program needs to be linked with `-ldl'.
+     Note that on most Unix systems, for the 'dlopen' function to be
+     available, the program needs to be linked with '-ldl'.
 
    On systems that have a userspace dynamic loader, like most Unix
-systems, when you connect to `gdbserver' using `target remote', you'll
+systems, when you connect to 'gdbserver' using 'target remote', you'll
 find that the program is stopped at the dynamic loader's entry point,
 and no shared library has been loaded in the program's address space
-yet, including the in-process agent.  In that case, before being able
-to use any of the fast or static tracepoints features, you need to let
-the loader run and load the shared libraries.  The simplest way to do
-that is to run the program to the main procedure.  E.g., if debugging a
-C or C++ program, start `gdbserver' like so:
+yet, including the in-process agent.  In that case, before being able to
+use any of the fast or static tracepoints features, you need to let the
+loader run and load the shared libraries.  The simplest way to do that
+is to run the program to the main procedure.  E.g., if debugging a C or
+C++ program, start 'gdbserver' like so:
 
      $ gdbserver :9999 myprogram
 
-   Start GDB and connect to `gdbserver' like so, and run to main:
+   Start GDB and connect to 'gdbserver' like so, and run to main:
 
      $ gdb myprogram
      (gdb) target remote myhost:9999
@@ -2456,15 +2576,15 @@ C or C++ program, start `gdbserver' like
      (gdb) continue
 
    The in-process tracing agent library should now be loaded into the
-process; you can confirm it with the `info sharedlibrary' command,
-which will list `libinproctrace.so' as loaded in the process.  You are
-now ready to install fast tracepoints, list static tracepoint markers,
-probe static tracepoints markers, and start tracing.
+process; you can confirm it with the 'info sharedlibrary' command, which
+will list 'libinproctrace.so' as loaded in the process.  You are now
+ready to install fast tracepoints, list static tracepoint markers, probe
+static tracepoints markers, and start tracing.
 
    ---------- Footnotes ----------
 
    (1) If you choose a port number that conflicts with another service,
-`gdbserver' prints an error message and exits.
+'gdbserver' prints an error message and exits.
 
 
 File: gdb.info,  Node: Remote Configuration,  Next: Remote Stub,  Prev: Server,  Up: Remote Debugging
@@ -2477,153 +2597,153 @@ debugging remote programs.  For the opti
 extensions of the remote protocol, see *note system-call-allowed:
 system.
 
-`set remoteaddresssize BITS'
+'set remoteaddresssize BITS'
      Set the maximum size of address in a memory packet to the specified
      number of bits.  GDB will mask off the address bits above that
-     number, when it passes addresses to the remote target.  The
-     default value is the number of bits in the target's address.
+     number, when it passes addresses to the remote target.  The default
+     value is the number of bits in the target's address.
 
-`show remoteaddresssize'
+'show remoteaddresssize'
      Show the current value of remote address size in bits.
 
-`set serial baud N'
+'set serial baud N'
      Set the baud rate for the remote serial I/O to N baud.  The value
      is used to set the speed of the serial port used for debugging
      remote targets.
 
-`show serial baud'
+'show serial baud'
      Show the current speed of the remote connection.
 
-`set serial parity PARITY'
-     Set the parity for the remote serial I/O.  Supported values of
-     PARITY are: `even', `none', and `odd'.  The default is `none'.
+'set serial parity PARITY'
+     Set the parity for the remote serial I/O. Supported values of
+     PARITY are: 'even', 'none', and 'odd'.  The default is 'none'.
 
-`show serial parity'
+'show serial parity'
      Show the current parity of the serial port.
 
-`set remotebreak'
-     If set to on, GDB sends a `BREAK' signal to the remote when you
-     type `Ctrl-c' to interrupt the program running on the remote.  If
-     set to off, GDB sends the `Ctrl-C' character instead.  The default
-     is off, since most remote systems expect to see `Ctrl-C' as the
+'set remotebreak'
+     If set to on, GDB sends a 'BREAK' signal to the remote when you
+     type 'Ctrl-c' to interrupt the program running on the remote.  If
+     set to off, GDB sends the 'Ctrl-C' character instead.  The default
+     is off, since most remote systems expect to see 'Ctrl-C' as the
      interrupt signal.
 
-`show remotebreak'
-     Show whether GDB sends `BREAK' or `Ctrl-C' to interrupt the remote
+'show remotebreak'
+     Show whether GDB sends 'BREAK' or 'Ctrl-C' to interrupt the remote
      program.
 
-`set remoteflow on'
-`set remoteflow off'
-     Enable or disable hardware flow control (`RTS'/`CTS') on the
-     serial port used to communicate to the remote target.
+'set remoteflow on'
+'set remoteflow off'
+     Enable or disable hardware flow control ('RTS'/'CTS') on the serial
+     port used to communicate to the remote target.
 
-`show remoteflow'
+'show remoteflow'
      Show the current setting of hardware flow control.
 
-`set remotelogbase BASE'
+'set remotelogbase BASE'
      Set the base (a.k.a. radix) of logging serial protocol
-     communications to BASE.  Supported values of BASE are: `ascii',
-     `octal', and `hex'.  The default is `ascii'.
+     communications to BASE.  Supported values of BASE are: 'ascii',
+     'octal', and 'hex'.  The default is 'ascii'.
 
-`show remotelogbase'
+'show remotelogbase'
      Show the current setting of the radix for logging remote serial
      protocol.
 
-`set remotelogfile FILE'
-     Record remote serial communications on the named FILE.  The
-     default is not to record at all.
+'set remotelogfile FILE'
+     Record remote serial communications on the named FILE.  The default
+     is not to record at all.
 
-`show remotelogfile.'
-     Show the current setting  of the file name on which to record the
+'show remotelogfile.'
+     Show the current setting of the file name on which to record the
      serial communications.
 
-`set remotetimeout NUM'
+'set remotetimeout NUM'
      Set the timeout limit to wait for the remote target to respond to
      NUM seconds.  The default is 2 seconds.
 
-`show remotetimeout'
+'show remotetimeout'
      Show the current number of seconds to wait for the remote target
      responses.
 
-`set remote hardware-watchpoint-limit LIMIT'
-`set remote hardware-breakpoint-limit LIMIT'
+'set remote hardware-watchpoint-limit LIMIT'
+'set remote hardware-breakpoint-limit LIMIT'
      Restrict GDB to using LIMIT remote hardware breakpoint or
      watchpoints.  A limit of -1, the default, is treated as unlimited.
 
-`set remote hardware-watchpoint-length-limit LIMIT'
+'set remote hardware-watchpoint-length-limit LIMIT'
      Restrict GDB to using LIMIT bytes for the maximum length of a
      remote hardware watchpoint.  A limit of -1, the default, is treated
      as unlimited.
 
-`show remote hardware-watchpoint-length-limit'
-     Show the current limit (in bytes) of the maximum length of a
-     remote hardware watchpoint.
-
-`set remote exec-file FILENAME'
-`show remote exec-file'
-     Select the file used for `run' with `target extended-remote'.
-     This should be set to a filename valid on the target system.  If
-     it is not set, the target will use a default filename (e.g. the
-     last program run).
-
-`set remote interrupt-sequence'
-     Allow the user to select one of `Ctrl-C', a `BREAK' or `BREAK-g'
-     as the sequence to the remote target in order to interrupt the
-     execution.  `Ctrl-C' is a default.  Some system prefers `BREAK'
+'show remote hardware-watchpoint-length-limit'
+     Show the current limit (in bytes) of the maximum length of a remote
+     hardware watchpoint.
+
+'set remote exec-file FILENAME'
+'show remote exec-file'
+     Select the file used for 'run' with 'target extended-remote'.  This
+     should be set to a filename valid on the target system.  If it is
+     not set, the target will use a default filename (e.g. the last
+     program run).
+
+'set remote interrupt-sequence'
+     Allow the user to select one of 'Ctrl-C', a 'BREAK' or 'BREAK-g' as
+     the sequence to the remote target in order to interrupt the
+     execution.  'Ctrl-C' is a default.  Some system prefers 'BREAK'
      which is high level of serial line for some certain time.  Linux
-     kernel prefers `BREAK-g', a.k.a Magic SysRq g.  It is `BREAK'
-     signal followed by character `g'.
+     kernel prefers 'BREAK-g', a.k.a Magic SysRq g.  It is 'BREAK'
+     signal followed by character 'g'.
 
-`show interrupt-sequence'
-     Show which of `Ctrl-C', `BREAK' or `BREAK-g' is sent by GDB to
-     interrupt the remote program.  `BREAK-g' is BREAK signal followed
-     by `g' and also known as Magic SysRq g.
+'show interrupt-sequence'
+     Show which of 'Ctrl-C', 'BREAK' or 'BREAK-g' is sent by GDB to
+     interrupt the remote program.  'BREAK-g' is BREAK signal followed
+     by 'g' and also known as Magic SysRq g.
 
-`set remote interrupt-on-connect'
+'set remote interrupt-on-connect'
      Specify whether interrupt-sequence is sent to remote target when
      GDB connects to it.  This is mostly needed when you debug Linux
-     kernel.  Linux kernel expects `BREAK' followed by `g' which is
+     kernel.  Linux kernel expects 'BREAK' followed by 'g' which is
      known as Magic SysRq g in order to connect GDB.
 
-`show interrupt-on-connect'
+'show interrupt-on-connect'
      Show whether interrupt-sequence is sent to remote target when GDB
      connects to it.
 
-`set tcp auto-retry on'
+'set tcp auto-retry on'
      Enable auto-retry for remote TCP connections.  This is useful if
      the remote debugging agent is launched in parallel with GDB; there
      is a race condition because the agent may not become ready to
      accept the connection before GDB attempts to connect.  When
-     auto-retry is enabled, if the initial attempt to connect fails,
-     GDB reattempts to establish the connection using the timeout
-     specified by `set tcp connect-timeout'.
+     auto-retry is enabled, if the initial attempt to connect fails, GDB
+     reattempts to establish the connection using the timeout specified
+     by 'set tcp connect-timeout'.
 
-`set tcp auto-retry off'
+'set tcp auto-retry off'
      Do not auto-retry failed TCP connections.
 
-`show tcp auto-retry'
+'show tcp auto-retry'
      Show the current auto-retry setting.
 
-`set tcp connect-timeout SECONDS'
-`set tcp connect-timeout unlimited'
+'set tcp connect-timeout SECONDS'
+'set tcp connect-timeout unlimited'
      Set the timeout for establishing a TCP connection to the remote
      target to SECONDS.  The timeout affects both polling to retry
-     failed connections (enabled by `set tcp auto-retry on') and
-     waiting for connections that are merely slow to complete, and
-     represents an approximate cumulative value.  If SECONDS is
-     `unlimited', there is no timeout and GDB will keep attempting to
-     establish a connection forever, unless interrupted with `Ctrl-c'.
-     The default is 15 seconds.
+     failed connections (enabled by 'set tcp auto-retry on') and waiting
+     for connections that are merely slow to complete, and represents an
+     approximate cumulative value.  If SECONDS is 'unlimited', there is
+     no timeout and GDB will keep attempting to establish a connection
+     forever, unless interrupted with 'Ctrl-c'.  The default is 15
+     seconds.
 
-`show tcp connect-timeout'
+'show tcp connect-timeout'
      Show the current connection timeout setting.
 
    The GDB remote protocol autodetects the packets supported by your
 debugging stub.  If you need to override the autodetection, you can use
-these commands to enable or disable individual packets.  Each packet
-can be set to `on' (the remote target supports this packet), `off' (the
-remote target does not support this packet), or `auto' (detect remote
-target support for this packet).  They all default to `auto'.  For more
+these commands to enable or disable individual packets.  Each packet can
+be set to 'on' (the remote target supports this packet), 'off' (the
+remote target does not support this packet), or 'auto' (detect remote
+target support for this packet).  They all default to 'auto'.  For more
 information about each packet, see *note Remote Protocol::.
 
    During normal use, you should not have to use any of these commands.
@@ -2631,84 +2751,154 @@ If you do, that may be a bug in your rem
 GDB.  You may want to report the problem to the GDB developers.
 
    For each packet NAME, the command to enable or disable the packet is
-`set remote NAME-packet'.  The available settings are:
+'set remote NAME-packet'.  The available settings are:
 
 Command Name         Remote Packet           Related Features
-`fetch-register'     `p'                     `info registers'
-`set-register'       `P'                     `set'
-`binary-download'    `X'                     `load', `set'
-`read-aux-vector'    `qXfer:auxv:read'       `info auxv'
-`symbol-lookup'      `qSymbol'               Detecting
+                                             
+'fetch-register'     'p'                     'info registers'
+                                             
+'set-register'       'P'                     'set'
+                                             
+'binary-download'    'X'                     'load', 'set'
+                                             
+'read-aux-vector'    'qXfer:auxv:read'       'info auxv'
+                                             
+'symbol-lookup'      'qSymbol'               Detecting
+                                             multiple threads
+                                             
+'attach'             'vAttach'               'attach'
+                                             
+'verbose-resume'     'vCont'                 Stepping or
+                                             resuming
                                              multiple threads
-`attach'             `vAttach'               `attach'
-`verbose-resume'     `vCont'                 Stepping or
-                                             resuming multiple
-                                             threads
-`run'                `vRun'                  `run'
-`software-breakpoint'`Z0'                    `break'
-`hardware-breakpoint'`Z1'                    `hbreak'
-`write-watchpoint'   `Z2'                    `watch'
-`read-watchpoint'    `Z3'                    `rwatch'
-`access-watchpoint'  `Z4'                    `awatch'
-`pid-to-exec-file'   `qXfer:exec-file:read'  `attach', `run'
-`target-features'    `qXfer:features:read'   `set architecture'
-`library-info'       `qXfer:libraries:read'  `info
+                                             
+'run'                'vRun'                  'run'
+                                             
+'software-breakpoint''Z0'                    'break'
+                                             
+'hardware-breakpoint''Z1'                    'hbreak'
+                                             
+'write-watchpoint'   'Z2'                    'watch'
+                                             
+'read-watchpoint'    'Z3'                    'rwatch'
+                                             
+'access-watchpoint'  'Z4'                    'awatch'
+                                             
+'pid-to-exec-file'   'qXfer:exec-file:read'  'attach', 'run'
+                                             
+'target-features'    'qXfer:features:read'   'set
+                                             architecture'
+                                             
+'library-info'       'qXfer:libraries:read'  'info
                                              sharedlibrary'
-`memory-map'         `qXfer:memory-map:read' `info mem'
-`read-sdata-object'  `qXfer:sdata:read'      `print $_sdata'
-`read-spu-object'    `qXfer:spu:read'        `info spu'
-`write-spu-object'   `qXfer:spu:write'       `info spu'
-`read-siginfo-object'`qXfer:siginfo:read'    `print $_siginfo'
-`write-siginfo-object'`qXfer:siginfo:write'   `set $_siginfo'
-`threads'            `qXfer:threads:read'    `info threads'
-`get-thread-local-   `qGetTLSAddr'           Displaying
-storage-address'                             `__thread'
+                                             
+'memory-map'         'qXfer:memory-map:read' 'info mem'
+                                             
+'read-sdata-object'  'qXfer:sdata:read'      'print $_sdata'
+                                             
+'read-spu-object'    'qXfer:spu:read'        'info spu'
+                                             
+'write-spu-object'   'qXfer:spu:write'       'info spu'
+                                             
+'read-siginfo-object''qXfer:siginfo:read'    'print
+                                             $_siginfo'
+                                             
+'write-siginfo-object''qXfer:siginfo:write'  'set $_siginfo'
+                                             
+'threads'            'qXfer:threads:read'    'info threads'
+                                             
+'get-thread-local-   'qGetTLSAddr'           Displaying
+storage-address'                             '__thread'
                                              variables
-`get-thread-information-block-address'`qGetTIBAddr'           Display
-                                             MS-Windows Thread
-                                             Information Block.
-`search-memory'      `qSearch:memory'        `find'
-`supported-packets'  `qSupported'            Remote
+                                             
+'get-thread-information-block-address''qGetTIBAddr'Display
+                                             MS-Windows
+                                             Thread
+                                             Information
+                                             Block.
+                                             
+'search-memory'      'qSearch:memory'        'find'
+                                             
+'supported-packets'  'qSupported'            Remote
                                              communications
                                              parameters
-`pass-signals'       `QPassSignals'          `handle SIGNAL'
-`program-signals'    `QProgramSignals'       `handle SIGNAL'
-`hostio-close-packet'`vFile:close'           `remote get',
-                                             `remote put'
-`hostio-open-packet' `vFile:open'            `remote get',
-                                             `remote put'
-`hostio-pread-packet'`vFile:pread'           `remote get',
-                                             `remote put'
-`hostio-pwrite-packet'`vFile:pwrite'          `remote get',
-                                             `remote put'
-`hostio-unlink-packet'`vFile:unlink'          `remote delete'
-`hostio-readlink-packet'`vFile:readlink'        Host I/O
-`hostio-fstat-packet'`vFile:fstat'           Host I/O
-`hostio-setfs-packet'`vFile:setfs'           Host I/O
-`noack-packet'       `QStartNoAckMode'       Packet
+                                             
+'catch-syscalls'     'QCatchSyscalls'        'catch syscall'
+                                             
+'pass-signals'       'QPassSignals'          'handle SIGNAL'
+                                             
+'program-signals'    'QProgramSignals'       'handle SIGNAL'
+                                             
+'hostio-close-packet''vFile:close'           'remote get',
+                                             'remote put'
+                                             
+'hostio-open-packet' 'vFile:open'            'remote get',
+                                             'remote put'
+                                             
+'hostio-pread-packet''vFile:pread'           'remote get',
+                                             'remote put'
+                                             
+'hostio-pwrite-packet''vFile:pwrite'         'remote get',
+                                             'remote put'
+                                             
+'hostio-unlink-packet''vFile:unlink'         'remote delete'
+                                             
+'hostio-readlink-packet''vFile:readlink'     Host I/O
+                                             
+'hostio-fstat-packet''vFile:fstat'           Host I/O
+                                             
+'hostio-setfs-packet''vFile:setfs'           Host I/O
+                                             
+'noack-packet'       'QStartNoAckMode'       Packet
                                              acknowledgment
-`osdata'             `qXfer:osdata:read'     `info os'
-`query-attached'     `qAttached'             Querying remote
+                                             
+'osdata'             'qXfer:osdata:read'     'info os'
+                                             
+'query-attached'     'qAttached'             Querying remote
                                              process attach
                                              state.
-`trace-buffer-size'  `QTBuffer:size'         `set
+                                             
+'trace-buffer-size'  'QTBuffer:size'         'set
                                              trace-buffer-size'
-`trace-status'       `qTStatus'              `tstatus'
-`traceframe-info'    `qXfer:traceframe-info:read'Traceframe info
-`install-in-trace'   `InstallInTrace'        Install
+                                             
+'trace-status'       'qTStatus'              'tstatus'
+                                             
+'traceframe-info'    'qXfer:traceframe-info:read'Traceframe info
+                                             
+'install-in-trace'   'InstallInTrace'        Install
                                              tracepoint in
                                              tracing
-`disable-randomization'`QDisableRandomization' `set
+                                             
+'disable-randomization''QDisableRandomization''set
                                              disable-randomization'
-`conditional-breakpoints-packet'`Z0 and Z1'             `Support for
+                                             
+'conditional-breakpoints-packet''Z0 and Z1'  'Support for
                                              target-side
                                              breakpoint
                                              condition
                                              evaluation'
-`swbreak-feature'    `swbreak stop reason'   `break'
-`hwbreak-feature'    `hwbreak stop reason'   `hbreak'
-`fork-event-feature' `fork stop reason'      `fork'
-`vfork-event-feature'`vfork stop reason'     `vfork'
+                                             
+'multiprocess-extensions''multiprocess       Debug multiple
+                     extensions'             processes and
+                                             remote process
+                                             PID awareness
+                                             
+'swbreak-feature'    'swbreak stop reason'   'break'
+                                             
+'hwbreak-feature'    'hwbreak stop reason'   'hbreak'
+                                             
+'fork-event-feature' 'fork stop reason'      'fork'
+                                             
+'vfork-event-feature''vfork stop reason'     'vfork'
+                                             
+'exec-event-feature' 'exec stop reason'      'exec'
+                                             
+'thread-events'      'QThreadEvents'         Tracking thread
+                                             lifetime.
+                                             
+'no-resumed-stop-reply''no resumed thread    Tracking thread
+                     left stop reply'        lifetime.
+                                             
 
 
 File: gdb.info,  Node: Remote Stub,  Prev: Remote Configuration,  Up: Remote Debugging
@@ -2718,19 +2908,18 @@ File: gdb.info,  Node: Remote Stub,  Pre
 
 The stub files provided with GDB implement the target side of the
 communication protocol, and the GDB side is implemented in the GDB
-source file `remote.c'.  Normally, you can simply allow these
+source file 'remote.c'.  Normally, you can simply allow these
 subroutines to communicate, and ignore the details.  (If you're
 implementing your own stub file, you can still ignore the details: start
-with one of the existing stub files.  `sparc-stub.c' is the best
+with one of the existing stub files.  'sparc-stub.c' is the best
 organized, and therefore the easiest to read.)
 
-   To debug a program running on another machine (the debugging
-"target" machine), you must first arrange for all the usual
-prerequisites for the program to run by itself.  For example, for a C
-program, you need:
+   To debug a program running on another machine (the debugging "target"
+machine), you must first arrange for all the usual prerequisites for the
+program to run by itself.  For example, for a C program, you need:
 
   1. A startup routine to set up the C runtime environment; these
-     usually have a name like `crt0'.  The startup routine may be
+     usually have a name like 'crt0'.  The startup routine may be
      supplied by your hardware supplier, or you may have to write your
      own.
 
@@ -2748,41 +2937,40 @@ In general terms, the scheme looks like 
 
 _On the host,_
      GDB already understands how to use this protocol; when everything
-     else is set up, you can simply use the `target remote' command
+     else is set up, you can simply use the 'target remote' command
      (*note Specifying a Debugging Target: Targets.).
 
 _On the target,_
      you must link with your program a few special-purpose subroutines
-     that implement the GDB remote serial protocol.  The file
-     containing these subroutines is called  a "debugging stub".
+     that implement the GDB remote serial protocol.  The file containing
+     these subroutines is called a "debugging stub".
 
      On certain remote targets, you can use an auxiliary program
-     `gdbserver' instead of linking a stub into your program.  *Note
-     Using the `gdbserver' Program: Server, for details.
+     'gdbserver' instead of linking a stub into your program.  *Note
+     Using the 'gdbserver' Program: Server, for details.
 
    The debugging stub is specific to the architecture of the remote
-machine; for example, use `sparc-stub.c' to debug programs on SPARC
+machine; for example, use 'sparc-stub.c' to debug programs on SPARC
 boards.
 
    These working remote stubs are distributed with GDB:
 
-`i386-stub.c'
+'i386-stub.c'
      For Intel 386 and compatible architectures.
 
-`m68k-stub.c'
+'m68k-stub.c'
      For Motorola 680x0 architectures.
 
-`sh-stub.c'
+'sh-stub.c'
      For Renesas SH architectures.
 
-`sparc-stub.c'
+'sparc-stub.c'
      For SPARC architectures.
 
-`sparcl-stub.c'
+'sparcl-stub.c'
      For Fujitsu SPARCLITE architectures.
 
-
-   The `README' file in the GDB distribution may list other recently
+   The 'README' file in the GDB distribution may list other recently
 added stubs.
 
 * Menu:
@@ -2800,40 +2988,40 @@ File: gdb.info,  Node: Stub Contents,  N
 The debugging stub for your architecture supplies these three
 subroutines:
 
-`set_debug_traps'
-     This routine arranges for `handle_exception' to run when your
+'set_debug_traps'
+     This routine arranges for 'handle_exception' to run when your
      program stops.  You must call this subroutine explicitly in your
      program's startup code.
 
-`handle_exception'
+'handle_exception'
      This is the central workhorse, but your program never calls it
-     explicitly--the setup code arranges for `handle_exception' to run
+     explicitly--the setup code arranges for 'handle_exception' to run
      when a trap is triggered.
 
-     `handle_exception' takes control when your program stops during
+     'handle_exception' takes control when your program stops during
      execution (for example, on a breakpoint), and mediates
      communications with GDB on the host machine.  This is where the
-     communications protocol is implemented; `handle_exception' acts as
-     the GDB representative on the target machine.  It begins by
-     sending summary information on the state of your program, then
-     continues to execute, retrieving and transmitting any information
-     GDB needs, until you execute a GDB command that makes your program
-     resume; at that point, `handle_exception' returns control to your
-     own code on the target machine.
+     communications protocol is implemented; 'handle_exception' acts as
+     the GDB representative on the target machine.  It begins by sending
+     summary information on the state of your program, then continues to
+     execute, retrieving and transmitting any information GDB needs,
+     until you execute a GDB command that makes your program resume; at
+     that point, 'handle_exception' returns control to your own code on
+     the target machine.
 
-`breakpoint'
+'breakpoint'
      Use this auxiliary subroutine to make your program contain a
-     breakpoint.  Depending on the particular situation, this may be
-     the only way for GDB to get control.  For instance, if your target
+     breakpoint.  Depending on the particular situation, this may be the
+     only way for GDB to get control.  For instance, if your target
      machine has some sort of interrupt button, you won't need to call
      this; pressing the interrupt button transfers control to
-     `handle_exception'--in effect, to GDB.  On some machines, simply
+     'handle_exception'--in effect, to GDB.  On some machines, simply
      receiving characters on the serial port may also trigger a trap;
-     again, in that situation, you don't need to call `breakpoint' from
-     your own program--simply running `target remote' from the host GDB
+     again, in that situation, you don't need to call 'breakpoint' from
+     your own program--simply running 'target remote' from the host GDB
      session gets control.
 
-     Call `breakpoint' if none of these is true, or if you simply want
+     Call 'breakpoint' if none of these is true, or if you simply want
      to make certain your program stops at a predetermined point for the
      start of your debugging session.
 
@@ -2850,36 +3038,36 @@ debugging target machine.
    First of all you need to tell the stub how to communicate with the
 serial port.
 
-`int getDebugChar()'
+'int getDebugChar()'
      Write this subroutine to read a single character from the serial
-     port.  It may be identical to `getchar' for your target system; a
+     port.  It may be identical to 'getchar' for your target system; a
      different name is used to allow you to distinguish the two if you
      wish.
 
-`void putDebugChar(int)'
+'void putDebugChar(int)'
      Write this subroutine to write a single character to the serial
-     port.  It may be identical to `putchar' for your target system; a
+     port.  It may be identical to 'putchar' for your target system; a
      different name is used to allow you to distinguish the two if you
      wish.
 
    If you want GDB to be able to stop your program while it is running,
-you need to use an interrupt-driven serial driver, and arrange for it
-to stop when it receives a `^C' (`\003', the control-C character).
-That is the character which GDB uses to tell the remote system to stop.
+you need to use an interrupt-driven serial driver, and arrange for it to
+stop when it receives a '^C' ('\003', the control-C character).  That is
+the character which GDB uses to tell the remote system to stop.
 
    Getting the debugging target to return the proper status to GDB
 probably requires changes to the standard stub; one quick and dirty way
 is to just execute a breakpoint instruction (the "dirty" part is that
-GDB reports a `SIGTRAP' instead of a `SIGINT').
+GDB reports a 'SIGTRAP' instead of a 'SIGINT').
 
    Other routines you need to supply are:
 
-`void exceptionHandler (int EXCEPTION_NUMBER, void *EXCEPTION_ADDRESS)'
+'void exceptionHandler (int EXCEPTION_NUMBER, void *EXCEPTION_ADDRESS)'
      Write this function to install EXCEPTION_ADDRESS in the exception
      handling tables.  You need to do this because the stub does not
      have any way of knowing what the exception handling tables on your
-     target system are like (for example, the processor's table might
-     be in ROM, containing entries which point to a table in RAM).  The
+     target system are like (for example, the processor's table might be
+     in ROM, containing entries which point to a table in RAM).  The
      EXCEPTION_NUMBER specifies the exception which should be changed;
      its meaning is architecture-dependent (for example, different
      numbers might represent divide by zero, misaligned access, etc).
@@ -2894,9 +3082,9 @@ GDB reports a `SIGTRAP' instead of a `SI
      gate so that interrupts are masked while the handler runs.  The
      gate should be at privilege level 0 (the most privileged level).
      The SPARC and 68k stubs are able to mask interrupts themselves
-     without help from `exceptionHandler'.
+     without help from 'exceptionHandler'.
 
-`void flush_i_cache()'
+'void flush_i_cache()'
      On SPARC and SPARCLITE only, write this subroutine to flush the
      instruction cache, if any, on your target machine.  If there is no
      instruction cache, this subroutine may be a no-op.
@@ -2906,16 +3094,16 @@ GDB reports a `SIGTRAP' instead of a `SI
 
 You must also make sure this library routine is available:
 
-`void *memset(void *, int, int)'
-     This is the standard library function `memset' that sets an area of
+'void *memset(void *, int, int)'
+     This is the standard library function 'memset' that sets an area of
      memory to a known value.  If you have one of the free versions of
-     `libc.a', `memset' can be found there; otherwise, you must either
+     'libc.a', 'memset' can be found there; otherwise, you must either
      obtain it from your hardware manufacturer, or write your own.
 
    If you do not use the GNU C compiler, you may need other standard
 library subroutines as well; this varies from one stub to another, but
 in general the stubs are likely to use any of the common library
-subroutines which `GCC' generates as inline code.
+subroutines which 'GCC' generates as inline code.
 
 
 File: gdb.info,  Node: Debug Session,  Prev: Bootstrapping,  Up: Remote Stub
@@ -2926,10 +3114,10 @@ File: gdb.info,  Node: Debug Session,  P
 In summary, when your program is ready to debug, you must follow these
 steps.
 
-  1. Make sure you have defined the supporting low-level routines
-     (*note What You Must Do for the Stub: Bootstrapping.):
-          `getDebugChar', `putDebugChar',
-          `flush_i_cache', `memset', `exceptionHandler'.
+  1. Make sure you have defined the supporting low-level routines (*note
+     What You Must Do for the Stub: Bootstrapping.):
+          'getDebugChar', 'putDebugChar',
+          'flush_i_cache', 'memset', 'exceptionHandler'.
 
   2. Insert these lines in your program's startup code, before the main
      procedure is called:
@@ -2940,21 +3128,21 @@ steps.
      On some machines, when a breakpoint trap is raised, the hardware
      automatically makes the PC point to the instruction after the
      breakpoint.  If your machine doesn't do that, you may need to
-     adjust `handle_exception' to arrange for it to return to the
+     adjust 'handle_exception' to arrange for it to return to the
      instruction after the breakpoint on this first invocation, so that
-     your program doesn't keep hitting the initial breakpoint instead
-     of making progress.
+     your program doesn't keep hitting the initial breakpoint instead of
+     making progress.
 
   3. For the 680x0 stub only, you need to provide a variable called
-     `exceptionHook'.  Normally you just use:
+     'exceptionHook'.  Normally you just use:
 
           void (*exceptionHook)() = 0;
 
-     but if before calling `set_debug_traps', you set it to point to a
-     function in your program, that function is called when `GDB'
+     but if before calling 'set_debug_traps', you set it to point to a
+     function in your program, that function is called when 'GDB'
      continues after stopping on a trap (for example, bus error).  The
-     function indicated by `exceptionHook' is called with one
-     parameter: an `int' which is the exception number.
+     function indicated by 'exceptionHook' is called with one parameter:
+     an 'int' which is the exception number.
 
   4. Compile and link together: your program, the GDB debugging stub for
      your target architecture, and the supporting subroutines.
@@ -2968,7 +3156,6 @@ steps.
   7. Start GDB on the host, and connect to the target (*note Connecting
      to a Remote Target: Connecting.).
 
-
 
 File: gdb.info,  Node: Configurations,  Next: Controlling GDB,  Prev: Remote Debugging,  Up: Top
 
@@ -3003,7 +3190,6 @@ configurations.
 
 * Menu:
 
-* HP-UX::                       HP-UX
 * BSD libkvm Interface::	Debugging BSD kernel memory images
 * SVR4 Process Information::    SVR4 process information
 * DJGPP Native::                Features specific to the DJGPP port
@@ -3012,67 +3198,56 @@ configurations.
 * Darwin::			Features specific to Darwin
 
 
-File: gdb.info,  Node: HP-UX,  Next: BSD libkvm Interface,  Up: Native
-
-21.1.1 HP-UX
-------------
-
-On HP-UX systems, if you refer to a function or variable name that
-begins with a dollar sign, GDB searches for a user or system name
-first, before it searches for a convenience variable.
-
-
-File: gdb.info,  Node: BSD libkvm Interface,  Next: SVR4 Process Information,  Prev: HP-UX,  Up: Native
+File: gdb.info,  Node: BSD libkvm Interface,  Next: SVR4 Process Information,  Up: Native
 
-21.1.2 BSD libkvm Interface
+21.1.1 BSD libkvm Interface
 ---------------------------
 
 BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory
 interface that provides a uniform interface for accessing kernel virtual
 memory images, including live systems and crash dumps.  GDB uses this
 interface to allow you to debug live kernels and kernel crash dumps on
-many native BSD configurations.  This is implemented as a special `kvm'
+many native BSD configurations.  This is implemented as a special 'kvm'
 debugging target.  For debugging a live system, load the currently
-running kernel into GDB and connect to the `kvm' target:
+running kernel into GDB and connect to the 'kvm' target:
 
      (gdb) target kvm
 
-   For debugging crash dumps, provide the file name of the crash dump
-as an argument:
+   For debugging crash dumps, provide the file name of the crash dump as
+an argument:
 
      (gdb) target kvm /var/crash/bsd.0
 
-   Once connected to the `kvm' target, the following commands are
+   Once connected to the 'kvm' target, the following commands are
 available:
 
-`kvm pcb'
+'kvm pcb'
      Set current context from the "Process Control Block" (PCB) address.
 
-`kvm proc'
+'kvm proc'
      Set current context from proc address.  This command isn't
      available on modern FreeBSD systems.
 
 
 File: gdb.info,  Node: SVR4 Process Information,  Next: DJGPP Native,  Prev: BSD libkvm Interface,  Up: Native
 
-21.1.3 SVR4 Process Information
+21.1.2 SVR4 Process Information
 -------------------------------
 
 Many versions of SVR4 and compatible systems provide a facility called
-`/proc' that can be used to examine the image of a running process
-using file-system subroutines.
+'/proc' that can be used to examine the image of a running process using
+file-system subroutines.
 
    If GDB is configured for an operating system with this facility, the
-command `info proc' is available to report information about the
-process running your program, or about any process running on your
-system.  This includes, as of this writing, GNU/Linux and Solaris, but
-not HP-UX, for example.
+command 'info proc' is available to report information about the process
+running your program, or about any process running on your system.  This
+includes, as of this writing, GNU/Linux and Solaris, for example.
 
    This command may also work on core files that were created on a
-system that has the `/proc' facility.
+system that has the '/proc' facility.
 
-`info proc'
-`info proc PROCESS-ID'
+'info proc'
+'info proc PROCESS-ID'
      Summarize available information about any running process.  If a
      process ID is specified by PROCESS-ID, display information about
      that process; otherwise display information about the program being
@@ -3080,78 +3255,78 @@ system that has the `/proc' facility.
      command line used to invoke it, its current working directory, and
      its executable file's absolute file name.
 
-     On some systems, PROCESS-ID can be of the form `[PID]/TID' which
+     On some systems, PROCESS-ID can be of the form '[PID]/TID' which
      specifies a certain thread ID within a process.  If the optional
      PID part is missing, it means a thread from the process being
-     debugged (the leading `/' still needs to be present, or else GDB
+     debugged (the leading '/' still needs to be present, or else GDB
      will interpret the number as a process ID rather than a thread ID).
 
-`info proc cmdline'
+'info proc cmdline'
      Show the original command line of the process.  This command is
      specific to GNU/Linux.
 
-`info proc cwd'
+'info proc cwd'
      Show the current working directory of the process.  This command is
      specific to GNU/Linux.
 
-`info proc exe'
+'info proc exe'
      Show the name of executable of the process.  This command is
      specific to GNU/Linux.
 
-`info proc mappings'
+'info proc mappings'
      Report the memory address space ranges accessible in the program,
-     with information on whether the process has read, write, or
-     execute access rights to each range.  On GNU/Linux systems, each
-     memory range includes the object file which is mapped to that
-     range, instead of the memory access rights to that range.
-
-`info proc stat'
-`info proc status'
-     These subcommands are specific to GNU/Linux systems.  They show
-     the process-related information, including the user ID and group
-     ID; how many threads are there in the process; its virtual memory
-     usage; the signals that are pending, blocked, and ignored; its
-     TTY; its consumption of system and user time; its stack size; its
-     `nice' value; etc.  For more information, see the `proc' man page
-     (type `man 5 proc' from your shell prompt).
+     with information on whether the process has read, write, or execute
+     access rights to each range.  On GNU/Linux systems, each memory
+     range includes the object file which is mapped to that range,
+     instead of the memory access rights to that range.
+
+'info proc stat'
+'info proc status'
+     These subcommands are specific to GNU/Linux systems.  They show the
+     process-related information, including the user ID and group ID;
+     how many threads are there in the process; its virtual memory
+     usage; the signals that are pending, blocked, and ignored; its TTY;
+     its consumption of system and user time; its stack size; its 'nice'
+     value; etc.  For more information, see the 'proc' man page (type
+     'man 5 proc' from your shell prompt).
 
-`info proc all'
+'info proc all'
      Show all the information about the process described under all of
-     the above `info proc' subcommands.
+     the above 'info proc' subcommands.
 
-`set procfs-trace'
-     This command enables and disables tracing of `procfs' API calls.
+'set procfs-trace'
+     This command enables and disables tracing of 'procfs' API calls.
 
-`show procfs-trace'
-     Show the current state of `procfs' API call tracing.
+'show procfs-trace'
+     Show the current state of 'procfs' API call tracing.
 
-`set procfs-file FILE'
-     Tell GDB to write `procfs' API trace to the named FILE.  GDB
+'set procfs-file FILE'
+     Tell GDB to write 'procfs' API trace to the named FILE.  GDB
      appends the trace info to the previous contents of the file.  The
      default is to display the trace on the standard output.
 
-`show procfs-file'
-     Show the file to which `procfs' API trace is written.
+'show procfs-file'
+     Show the file to which 'procfs' API trace is written.
 
-`proc-trace-entry'
-`proc-trace-exit'
-`proc-untrace-entry'
-`proc-untrace-exit'
+'proc-trace-entry'
+'proc-trace-exit'
+'proc-untrace-entry'
+'proc-untrace-exit'
      These commands enable and disable tracing of entries into and exits
-     from the `syscall' interface.
+     from the 'syscall' interface.
 
-`info pidlist'
+'info pidlist'
      For QNX Neutrino only, this command displays the list of all the
      processes and all the threads within each process.
 
-`info meminfo'
+'info meminfo'
      For QNX Neutrino only, this command displays the list of all
      mapinfos.
 
 
 File: gdb.info,  Node: DJGPP Native,  Next: Cygwin Native,  Prev: SVR4 Process Information,  Up: Native
 
-21.1.4 Features for Debugging DJGPP Programs
+21.1.3 Features for Debugging DJGPP Programs
 --------------------------------------------
 
 DJGPP is a port of the GNU development tools to MS-DOS and MS-Windows.
@@ -3163,25 +3338,25 @@ systems and their emulations.
 commands specific to the DJGPP port.  This subsection describes those
 commands.
 
-`info dos'
-     This is a prefix of DJGPP-specific commands which print
-     information about the target system and important OS structures.
+'info dos'
+     This is a prefix of DJGPP-specific commands which print information
+     about the target system and important OS structures.
 
-`info dos sysinfo'
+'info dos sysinfo'
      This command displays assorted information about the underlying
      platform: the CPU type and features, the OS version and flavor, the
      DPMI version, and the available conventional and DPMI memory.
 
-`info dos gdt'
-`info dos ldt'
-`info dos idt'
+'info dos gdt'
+'info dos ldt'
+'info dos idt'
      These 3 commands display entries from, respectively, Global, Local,
-     and Interrupt Descriptor Tables (GDT, LDT, and IDT).  The
-     descriptor tables are data structures which store a descriptor for
-     each segment that is currently in use.  The segment's selector is
-     an index into a descriptor table; the table entry for that index
-     holds the descriptor's base address and limit, and its attributes
-     and access rights.
+     and Interrupt Descriptor Tables (GDT, LDT, and IDT). The descriptor
+     tables are data structures which store a descriptor for each
+     segment that is currently in use.  The segment's selector is an
+     index into a descriptor table; the table entry for that index holds
+     the descriptor's base address and limit, and its attributes and
+     access rights.
 
      A typical DJGPP program uses 3 segments: a code segment, a data
      segment (used for both data and the stack), and a DOS segment
@@ -3197,29 +3372,28 @@ commands.
      For example, here's a convenient way to display information about
      the debugged program's data segment:
 
-     `(gdb) info dos ldt $ds'
-     `0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)'
-
+     (gdb) info dos ldt $ds
+     0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)
 
      This comes in handy when you want to see whether a pointer is
      outside the data segment's limit (i.e. "garbled").
 
-`info dos pde'
-`info dos pte'
+'info dos pde'
+'info dos pte'
      These two commands display entries from, respectively, the Page
      Directory and the Page Tables.  Page Directories and Page Tables
      are data structures which control how virtual memory addresses are
-     mapped into physical addresses.  A Page Table includes an entry
-     for every page of memory that is mapped into the program's address
+     mapped into physical addresses.  A Page Table includes an entry for
+     every page of memory that is mapped into the program's address
      space; there may be several Page Tables, each one holding up to
      4096 entries.  A Page Directory has up to 4096 entries, one each
      for every Page Table that is currently in use.
 
-     Without an argument, `info dos pde' displays the entire Page
-     Directory, and `info dos pte' displays all the entries in all of
+     Without an argument, 'info dos pde' displays the entire Page
+     Directory, and 'info dos pte' displays all the entries in all of
      the Page Tables.  An argument, an integer expression, given to the
-     `info dos pde' command means display only that entry from the Page
-     Directory table.  An argument given to the `info dos pte' command
+     'info dos pde' command means display only that entry from the Page
+     Directory table.  An argument given to the 'info dos pte' command
      means display entries from a single Page Table, the one pointed to
      by the specified entry in the Page Directory.
 
@@ -3229,43 +3403,41 @@ commands.
 
      These commands are supported only with some DPMI servers.
 
-`info dos address-pte ADDR'
+'info dos address-pte ADDR'
      This command displays the Page Table entry for a specified linear
      address.  The argument ADDR is a linear address which should
      already have the appropriate segment's base address added to it,
      because this command accepts addresses which may belong to _any_
      segment.  For example, here's how to display the Page Table entry
-     for the page where a variable `i' is stored:
-
-     `(gdb) info dos address-pte __djgpp_base_address + (char *)&i'
-     `Page Table entry for address 0x11a00d30:'
-     `Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30'
-
+     for the page where a variable 'i' is stored:
 
-     This says that `i' is stored at offset `0xd30' from the page whose
-     physical base address is `0x02698000', and shows all the
-     attributes of that page.
+     (gdb) info dos address-pte __djgpp_base_address + (char *)&i
+     Page Table entry for address 0x11a00d30:
+     Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30
+
+     This says that 'i' is stored at offset '0xd30' from the page whose
+     physical base address is '0x02698000', and shows all the attributes
+     of that page.
 
-     Note that you must cast the addresses of variables to a `char *',
-     since otherwise the value of `__djgpp_base_address', the base
+     Note that you must cast the addresses of variables to a 'char *',
+     since otherwise the value of '__djgpp_base_address', the base
      address of all variables and functions in a DJGPP program, will be
-     added using the rules of C pointer arithmetics: if `i' is declared
-     an `int', GDB will add 4 times the value of `__djgpp_base_address'
-     to the address of `i'.
+     added using the rules of C pointer arithmetics: if 'i' is declared
+     an 'int', GDB will add 4 times the value of '__djgpp_base_address'
+     to the address of 'i'.
 
      Here's another example, it displays the Page Table entry for the
      transfer buffer:
 
-     `(gdb) info dos address-pte *((unsigned *)&_go32_info_block + 3)'
-     `Page Table entry for address 0x29110:'
-     `Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110'
+     (gdb) info dos address-pte *((unsigned *)&_go32_info_block + 3)
+     Page Table entry for address 0x29110:
+     Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110
 
-
-     (The `+ 3' offset is because the transfer buffer's address is the
-     3rd member of the `_go32_info_block' structure.)  The output
+     (The '+ 3' offset is because the transfer buffer's address is the
+     3rd member of the '_go32_info_block' structure.)  The output
      clearly shows that this DPMI server maps the addresses in
-     conventional memory 1:1, i.e. the physical (`0x00029000' +
-     `0x110') and linear (`0x29110') addresses are identical.
+     conventional memory 1:1, i.e. the physical ('0x00029000' + '0x110')
+     and linear ('0x29110') addresses are identical.
 
      This command is supported only with some DPMI servers.
 
@@ -3273,23 +3445,23 @@ commands.
 debugging via a serial data link.  The following commands are specific
 to remote serial debugging in the DJGPP port of GDB.
 
-`set com1base ADDR'
-     This command sets the base I/O port address of the `COM1' serial
+'set com1base ADDR'
+     This command sets the base I/O port address of the 'COM1' serial
      port.
 
-`set com1irq IRQ'
-     This command sets the "Interrupt Request" (`IRQ') line to use for
-     the `COM1' serial port.
+'set com1irq IRQ'
+     This command sets the "Interrupt Request" ('IRQ') line to use for
+     the 'COM1' serial port.
 
-     There are similar commands `set com2base', `set com3irq', etc. for
-     setting the port address and the `IRQ' lines for the other 3 COM
+     There are similar commands 'set com2base', 'set com3irq', etc. for
+     setting the port address and the 'IRQ' lines for the other 3 COM
      ports.
 
-     The related commands `show com1base', `show com1irq' etc.  display
-     the current settings of the base address and the `IRQ' lines used
+     The related commands 'show com1base', 'show com1irq' etc. display
+     the current settings of the base address and the 'IRQ' lines used
      by the COM ports.
 
-`info serial'
+'info serial'
      This command prints the status of the 4 DOS serial ports.  For each
      port, it prints whether it's active or not, its I/O base address
      and IRQ number, whether it uses a 16550-style FIFO, its baudrate,
@@ -3298,94 +3470,118 @@ to remote serial debugging in the DJGPP 
 
 File: gdb.info,  Node: Cygwin Native,  Next: Hurd Native,  Prev: DJGPP Native,  Up: Native
 
-21.1.5 Features for Debugging MS Windows PE Executables
+21.1.4 Features for Debugging MS Windows PE Executables
 -------------------------------------------------------
 
 GDB supports native debugging of MS Windows programs, including DLLs
 with and without symbolic debugging information.
 
-   MS-Windows programs that call `SetConsoleMode' to switch off the
-special meaning of the `Ctrl-C' keystroke cannot be interrupted by
-typing `C-c'.  For this reason, GDB on MS-Windows supports `C-<BREAK>'
-as an alternative interrupt key sequence, which can be used to
-interrupt the debuggee even if it ignores `C-c'.
+   MS-Windows programs that call 'SetConsoleMode' to switch off the
+special meaning of the 'Ctrl-C' keystroke cannot be interrupted by
+typing 'C-c'.  For this reason, GDB on MS-Windows supports 'C-<BREAK>'
+as an alternative interrupt key sequence, which can be used to interrupt
+the debuggee even if it ignores 'C-c'.
 
    There are various additional Cygwin-specific commands, described in
 this section.  Working with DLLs that have no debugging symbols is
 described in *note Non-debug DLL Symbols::.
 
-`info w32'
+'info w32'
      This is a prefix of MS Windows-specific commands which print
      information about the target system and important OS structures.
 
-`info w32 selector'
+'info w32 selector'
      This command displays information returned by the Win32 API
-     `GetThreadSelectorEntry' function.  It takes an optional argument
+     'GetThreadSelectorEntry' function.  It takes an optional argument
      that is evaluated to a long value to give the information about
      this given selector.  Without argument, this command displays
      information about the six segment registers.
 
-`info w32 thread-information-block'
+'info w32 thread-information-block'
      This command displays thread specific information stored in the
      Thread Information Block (readable on the X86 CPU family using
-     `$fs' selector for 32-bit programs and `$gs' for 64-bit programs).
+     '$fs' selector for 32-bit programs and '$gs' for 64-bit programs).
 
-`set cygwin-exceptions MODE'
-     If MODE is `on', GDB will break on exceptions that happen inside
-     the Cygwin DLL.  If MODE is `off', GDB will delay recognition of
+'signal-event ID'
+     This command signals an event with user-provided ID.  Used to
+     resume crashing process when attached to it using MS-Windows JIT
+     debugging (AeDebug).
+
+     To use it, create or edit the following keys in
+     'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug' and/or
+     'HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows
+     NT\CurrentVersion\AeDebug' (for x86_64 versions):
+
+        - 'Debugger' (REG_SZ) -- a command to launch the debugger.
+          Suggested command is: 'FULLY-QUALIFIED-PATH-TO-GDB.EXE -ex
+          "attach %ld" -ex "signal-event %ld" -ex "continue"'.
+
+          The first '%ld' will be replaced by the process ID of the
+          crashing process, the second '%ld' will be replaced by the ID
+          of the event that blocks the crashing process, waiting for GDB
+          to attach.
+
+        - 'Auto' (REG_SZ) -- either '1' or '0'.  '1' will make the
+          system run debugger specified by the Debugger key
+          automatically, '0' will cause a dialog box with "OK" and
+          "Cancel" buttons to appear, which allows the user to either
+          terminate the crashing process (OK) or debug it (Cancel).
+
+'set cygwin-exceptions MODE'
+     If MODE is 'on', GDB will break on exceptions that happen inside
+     the Cygwin DLL. If MODE is 'off', GDB will delay recognition of
      exceptions, and may ignore some exceptions which seem to be caused
      by internal Cygwin DLL "bookkeeping".  This option is meant
-     primarily for debugging the Cygwin DLL itself; the default value
-     is `off' to avoid annoying GDB users with false `SIGSEGV' signals.
+     primarily for debugging the Cygwin DLL itself; the default value is
+     'off' to avoid annoying GDB users with false 'SIGSEGV' signals.
 
-`show cygwin-exceptions'
+'show cygwin-exceptions'
      Displays whether GDB will break on exceptions that happen inside
      the Cygwin DLL itself.
 
-`set new-console MODE'
-     If MODE is `on' the debuggee will be started in a new console on
-     next start.  If MODE is `off', the debuggee will be started in the
+'set new-console MODE'
+     If MODE is 'on' the debuggee will be started in a new console on
+     next start.  If MODE is 'off', the debuggee will be started in the
      same console as the debugger.
 
-`show new-console'
+'show new-console'
      Displays whether a new console is used when the debuggee is
      started.
 
-`set new-group MODE'
-     This boolean value controls whether the debuggee should start a
-     new group or stay in the same group as the debugger.  This affects
-     the way the Windows OS handles `Ctrl-C'.
+'set new-group MODE'
+     This boolean value controls whether the debuggee should start a new
+     group or stay in the same group as the debugger.  This affects the
+     way the Windows OS handles 'Ctrl-C'.
 
-`show new-group'
+'show new-group'
      Displays current value of new-group boolean.
 
-`set debugevents'
+'set debugevents'
      This boolean value adds debug output concerning kernel events
-     related to the debuggee seen by the debugger.  This includes
-     events that signal thread and process creation and exit, DLL
-     loading and unloading, console interrupts, and debugging messages
-     produced by the Windows `OutputDebugString' API call.
+     related to the debuggee seen by the debugger.  This includes events
+     that signal thread and process creation and exit, DLL loading and
+     unloading, console interrupts, and debugging messages produced by
+     the Windows 'OutputDebugString' API call.
 
-`set debugexec'
+'set debugexec'
      This boolean value adds debug output concerning execute events
      (such as resume thread) seen by the debugger.
 
-`set debugexceptions'
+'set debugexceptions'
      This boolean value adds debug output concerning exceptions in the
      debuggee seen by the debugger.
 
-`set debugmemory'
+'set debugmemory'
      This boolean value adds debug output concerning debuggee memory
      reads and writes by the debugger.
 
-`set shell'
+'set shell'
      This boolean values specifies whether the debuggee is called via a
      shell or directly (default value is on).
 
-`show shell'
+'show shell'
      Displays if the debuggee will be started with a shell.
 
-
 * Menu:
 
 * Non-debug DLL Symbols::  Support for DLLs without debugging symbols
@@ -3393,12 +3589,12 @@ described in *note Non-debug DLL Symbols
 
 File: gdb.info,  Node: Non-debug DLL Symbols,  Up: Cygwin Native
 
-21.1.5.1 Support for DLLs without Debugging Symbols
+21.1.4.1 Support for DLLs without Debugging Symbols
 ...................................................
 
 Very often on windows, some of the DLLs that your program relies on do
 not include symbolic debugging information (for example,
-`kernel32.dll').  When GDB doesn't recognize any debugging symbols in a
+'kernel32.dll').  When GDB doesn't recognize any debugging symbols in a
 DLL, it relies on the minimal amount of symbolic information contained
 in the DLL's export table.  This section describes working with such
 symbols, known internally to GDB as "minimal symbols".
@@ -3408,24 +3604,24 @@ will have been loaded.  The easiest way 
 start the program -- either by setting a breakpoint or letting the
 program run once to completion.
 
-21.1.5.2 DLL Name Prefixes
+21.1.4.2 DLL Name Prefixes
 ..........................
 
 In keeping with the naming conventions used by the Microsoft debugging
 tools, DLL export symbols are made available with a prefix based on the
-DLL name, for instance `KERNEL32!CreateFileA'.  The plain name is also
-entered into the symbol table, so `CreateFileA' is often sufficient.
-In some cases there will be name clashes within a program (particularly
-if the executable itself includes full debugging symbols) necessitating
-the use of the fully qualified name when referring to the contents of
-the DLL.  Use single-quotes around the name to avoid the exclamation
-mark ("!")  being interpreted as a language operator.
+DLL name, for instance 'KERNEL32!CreateFileA'.  The plain name is also
+entered into the symbol table, so 'CreateFileA' is often sufficient.  In
+some cases there will be name clashes within a program (particularly if
+the executable itself includes full debugging symbols) necessitating the
+use of the fully qualified name when referring to the contents of the
+DLL. Use single-quotes around the name to avoid the exclamation mark
+("!")  being interpreted as a language operator.
 
    Note that the internal name of the DLL may be all upper-case, even
 though the file name of the DLL is lower-case, or vice-versa.  Since
 symbols within GDB are _case-sensitive_ this may cause some confusion.
-If in doubt, try the `info functions' and `info variables' commands or
-even `maint print msymbols' (*note Symbols::). Here's an example:
+If in doubt, try the 'info functions' and 'info variables' commands or
+even 'maint print msymbols' (*note Symbols::).  Here's an example:
 
      (gdb) info function CreateFileA
      All functions matching regular expression "CreateFileA":
@@ -3443,21 +3639,21 @@ even `maint print msymbols' (*note Symbo
      0x61004240  cygwin1!dll_crt0(per_process *)
      [etc...]
 
-21.1.5.3 Working with Minimal Symbols
+21.1.4.3 Working with Minimal Symbols
 .....................................
 
 Symbols extracted from a DLL's export table do not contain very much
-type information. All that GDB can do is guess whether a symbol refers
+type information.  All that GDB can do is guess whether a symbol refers
 to a function or variable depending on the linker section that contains
-the symbol. Also note that the actual contents of the memory contained
-in a DLL are not available unless the program is running. This means
+the symbol.  Also note that the actual contents of the memory contained
+in a DLL are not available unless the program is running.  This means
 that you cannot examine the contents of a variable or disassemble a
 function within a DLL without a running program.
 
    Variables are generally treated as pointers and dereferenced
-automatically. For this reason, it is often necessary to prefix a
+automatically.  For this reason, it is often necessary to prefix a
 variable name with the address-of operator ("&") and provide explicit
-type information in the command. Here's an example of the type of
+type information in the command.  Here's an example of the type of
 problem:
 
      (gdb) print 'cygwin1!__argv'
@@ -3479,152 +3675,151 @@ problem:
      0x22fd98:        "/cygdrive/c/mydirectory/myprogram"
 
    Setting a break point within a DLL is possible even before the
-program starts execution. However, under these circumstances, GDB can't
+program starts execution.  However, under these circumstances, GDB can't
 examine the initial instructions of the function in order to skip the
-function's frame set-up code. You can work around this by using "*&" to
+function's frame set-up code.  You can work around this by using "*&" to
 set the breakpoint at a raw memory address:
 
      (gdb) break *&'python22!PyOS_Readline'
      Breakpoint 1 at 0x1e04eff0
 
-   The author of these extensions is not entirely convinced that
-setting a break point within a shared DLL like `kernel32.dll' is
-completely safe.
+   The author of these extensions is not entirely convinced that setting
+a break point within a shared DLL like 'kernel32.dll' is completely
+safe.
 
 
 File: gdb.info,  Node: Hurd Native,  Next: Darwin,  Prev: Cygwin Native,  Up: Native
 
-21.1.6 Commands Specific to GNU Hurd Systems
+21.1.5 Commands Specific to GNU Hurd Systems
 --------------------------------------------
 
 This subsection describes GDB commands specific to the GNU Hurd native
 debugging.
 
-`set signals'
-`set sigs'
+'set signals'
+'set sigs'
      This command toggles the state of inferior signal interception by
      GDB.  Mach exceptions, such as breakpoint traps, are not affected
-     by this command.  `sigs' is a shorthand alias for `signals'.
+     by this command.  'sigs' is a shorthand alias for 'signals'.
 
-`show signals'
-`show sigs'
+'show signals'
+'show sigs'
      Show the current state of intercepting inferior's signals.
 
-`set signal-thread'
-`set sigthread'
-     This command tells GDB which thread is the `libc' signal thread.
-     That thread is run when a signal is delivered to a running
-     process.  `set sigthread' is the shorthand alias of `set
-     signal-thread'.
+'set signal-thread'
+'set sigthread'
+     This command tells GDB which thread is the 'libc' signal thread.
+     That thread is run when a signal is delivered to a running process.
+     'set sigthread' is the shorthand alias of 'set signal-thread'.
 
-`show signal-thread'
-`show sigthread'
+'show signal-thread'
+'show sigthread'
      These two commands show which thread will run when the inferior is
      delivered a signal.
 
-`set stopped'
+'set stopped'
      This commands tells GDB that the inferior process is stopped, as
-     with the `SIGSTOP' signal.  The stopped process can be continued
-     by delivering a signal to it.
+     with the 'SIGSTOP' signal.  The stopped process can be continued by
+     delivering a signal to it.
 
-`show stopped'
+'show stopped'
      This command shows whether GDB thinks the debuggee is stopped.
 
-`set exceptions'
+'set exceptions'
      Use this command to turn off trapping of exceptions in the
      inferior.  When exception trapping is off, neither breakpoints nor
      single-stepping will work.  To restore the default, set exception
      trapping on.
 
-`show exceptions'
+'show exceptions'
      Show the current state of trapping exceptions in the inferior.
 
-`set task pause'
-     This command toggles task suspension when GDB has control.
-     Setting it to on takes effect immediately, and the task is
-     suspended whenever GDB gets control.  Setting it to off will take
-     effect the next time the inferior is continued.  If this option is
-     set to off, you can use `set thread default pause on' or `set
-     thread pause on' (see below) to pause individual threads.
+'set task pause'
+     This command toggles task suspension when GDB has control.  Setting
+     it to on takes effect immediately, and the task is suspended
+     whenever GDB gets control.  Setting it to off will take effect the
+     next time the inferior is continued.  If this option is set to off,
+     you can use 'set thread default pause on' or 'set thread pause on'
+     (see below) to pause individual threads.
 
-`show task pause'
+'show task pause'
      Show the current state of task suspension.
 
-`set task detach-suspend-count'
+'set task detach-suspend-count'
      This command sets the suspend count the task will be left with when
      GDB detaches from it.
 
-`show task detach-suspend-count'
+'show task detach-suspend-count'
      Show the suspend count the task will be left with when detaching.
 
-`set task exception-port'
-`set task excp'
-     This command sets the task exception port to which GDB will
-     forward exceptions.  The argument should be the value of the "send
-     rights" of the task.  `set task excp' is a shorthand alias.
+'set task exception-port'
+'set task excp'
+     This command sets the task exception port to which GDB will forward
+     exceptions.  The argument should be the value of the "send rights"
+     of the task.  'set task excp' is a shorthand alias.
 
-`set noninvasive'
+'set noninvasive'
      This command switches GDB to a mode that is the least invasive as
      far as interfering with the inferior is concerned.  This is the
-     same as using `set task pause', `set exceptions', and `set
-     signals' to values opposite to the defaults.
+     same as using 'set task pause', 'set exceptions', and 'set signals'
+     to values opposite to the defaults.
 
-`info send-rights'
-`info receive-rights'
-`info port-rights'
-`info port-sets'
-`info dead-names'
-`info ports'
-`info psets'
+'info send-rights'
+'info receive-rights'
+'info port-rights'
+'info port-sets'
+'info dead-names'
+'info ports'
+'info psets'
      These commands display information about, respectively, send
-     rights, receive rights, port rights, port sets, and dead names of
-     a task.  There are also shorthand aliases: `info ports' for `info
-     port-rights' and `info psets' for `info port-sets'.
+     rights, receive rights, port rights, port sets, and dead names of a
+     task.  There are also shorthand aliases: 'info ports' for 'info
+     port-rights' and 'info psets' for 'info port-sets'.
 
-`set thread pause'
+'set thread pause'
      This command toggles current thread suspension when GDB has
      control.  Setting it to on takes effect immediately, and the
      current thread is suspended whenever GDB gets control.  Setting it
      to off will take effect the next time the inferior is continued.
      Normally, this command has no effect, since when GDB has control,
-     the whole task is suspended.  However, if you used `set task pause
+     the whole task is suspended.  However, if you used 'set task pause
      off' (see above), this command comes in handy to suspend only the
      current thread.
 
-`show thread pause'
+'show thread pause'
      This command shows the state of current thread suspension.
 
-`set thread run'
+'set thread run'
      This command sets whether the current thread is allowed to run.
 
-`show thread run'
+'show thread run'
      Show whether the current thread is allowed to run.
 
-`set thread detach-suspend-count'
-     This command sets the suspend count GDB will leave on a thread
-     when detaching.  This number is relative to the suspend count
-     found by GDB when it notices the thread; use `set thread
+'set thread detach-suspend-count'
+     This command sets the suspend count GDB will leave on a thread when
+     detaching.  This number is relative to the suspend count found by
+     GDB when it notices the thread; use 'set thread
      takeover-suspend-count' to force it to an absolute value.
 
-`show thread detach-suspend-count'
+'show thread detach-suspend-count'
      Show the suspend count GDB will leave on the thread when detaching.
 
-`set thread exception-port'
-`set thread excp'
+'set thread exception-port'
+'set thread excp'
      Set the thread exception port to which to forward exceptions.  This
-     overrides the port set by `set task exception-port' (see above).
-     `set thread excp' is the shorthand alias.
+     overrides the port set by 'set task exception-port' (see above).
+     'set thread excp' is the shorthand alias.
 
-`set thread takeover-suspend-count'
-     Normally, GDB's thread suspend counts are relative to the value
-     GDB finds when it notices each thread.  This command changes the
+'set thread takeover-suspend-count'
+     Normally, GDB's thread suspend counts are relative to the value GDB
+     finds when it notices each thread.  This command changes the
      suspend counts to be absolute instead.
 
-`set thread default'
-`show thread default'
-     Each of the above `set thread' commands has a `set thread default'
-     counterpart (e.g., `set thread default pause', `set thread default
-     exception-port', etc.).  The `thread default' variety of commands
+'set thread default'
+'show thread default'
+     Each of the above 'set thread' commands has a 'set thread default'
+     counterpart (e.g., 'set thread default pause', 'set thread default
+     exception-port', etc.).  The 'thread default' variety of commands
      sets the default thread properties for all threads; you can then
      change the properties of individual threads with the non-default
      commands.
@@ -3632,37 +3827,37 @@ debugging.
 
 File: gdb.info,  Node: Darwin,  Prev: Hurd Native,  Up: Native
 
-21.1.7 Darwin
+21.1.6 Darwin
 -------------
 
 GDB provides the following commands specific to the Darwin target:
 
-`set debug darwin NUM'
+'set debug darwin NUM'
      When set to a non zero value, enables debugging messages specific
      to the Darwin support.  Higher values produce more verbose output.
 
-`show debug darwin'
+'show debug darwin'
      Show the current state of Darwin messages.
 
-`set debug mach-o NUM'
+'set debug mach-o NUM'
      When set to a non zero value, enables debugging messages while GDB
      is reading Darwin object files.  ("Mach-O" is the file format used
      on Darwin for object and executable files.)  Higher values produce
      more verbose output.  This is a command to diagnose problems
      internal to GDB and should not be needed in normal usage.
 
-`show debug mach-o'
+'show debug mach-o'
      Show the current state of Mach-O file messages.
 
-`set mach-exceptions on'
-`set mach-exceptions off'
+'set mach-exceptions on'
+'set mach-exceptions off'
      On Darwin, faults are first reported as a Mach exception and are
      then mapped to a Posix signal.  Use this command to turn on
      trapping of Mach exceptions in the inferior.  This might be
      sometimes useful to better understand the cause of a fault.  The
      default is off.
 
-`show mach-exceptions'
+'show mach-exceptions'
      Show the current state of exceptions trapping.
 
 
@@ -3687,245 +3882,135 @@ File: gdb.info,  Node: Embedded Processo
 This section goes into details specific to particular embedded
 configurations.
 
-   Whenever a specific embedded processor has a simulator, GDB allows
-to send an arbitrary command to the simulator.
+   Whenever a specific embedded processor has a simulator, GDB allows to
+send an arbitrary command to the simulator.
 
-`sim COMMAND'
+'sim COMMAND'
      Send an arbitrary COMMAND string to the simulator.  Consult the
      documentation for the specific simulator in use for information
      about acceptable commands.
 
 * Menu:
 
-* ARM::                         ARM RDI
-* M32R/D::                      Renesas M32R/D
+* ARC::                         Synopsys ARC
+* ARM::                         ARM
 * M68K::                        Motorola M68K
 * MicroBlaze::			Xilinx MicroBlaze
 * MIPS Embedded::               MIPS Embedded
 * PowerPC Embedded::            PowerPC Embedded
-* PA::                          HP PA Embedded
-* Sparclet::                    Tsqware Sparclet
-* Sparclite::                   Fujitsu Sparclite
-* Z8000::                       Zilog Z8000
 * AVR::                         Atmel AVR
 * CRIS::                        CRIS
 * Super-H::                     Renesas Super-H
 
 
-File: gdb.info,  Node: ARM,  Next: M32R/D,  Up: Embedded Processors
+File: gdb.info,  Node: ARC,  Next: ARM,  Up: Embedded Processors
 
-21.3.1 ARM
-----------
+21.3.1 Synopsys ARC
+-------------------
 
-`target rdi DEV'
-     ARM Angel monitor, via RDI library interface to ADP protocol.  You
-     may use this target to communicate with both boards running the
-     Angel monitor, or with the EmbeddedICE JTAG debug device.
+GDB provides the following ARC-specific commands:
 
-`target rdp DEV'
-     ARM Demon monitor.
+'set debug arc'
+     Control the level of ARC specific debug messages.  Use 0 for no
+     messages (the default) and 1 for debug messages.  At present higher
+     values offer no further messages.
 
+'show debug arc'
+     Show the level of ARC specific debugging in operation.
 
-   GDB provides the following ARM-specific commands:
+
+File: gdb.info,  Node: ARM,  Next: M68K,  Prev: ARC,  Up: Embedded Processors
+
+21.3.2 ARM
+----------
 
-`set arm disassembler'
+GDB provides the following ARM-specific commands:
+
+'set arm disassembler'
      This commands selects from a list of disassembly styles.  The
-     `"std"' style is the standard style.
+     '"std"' style is the standard style.
 
-`show arm disassembler'
+'show arm disassembler'
      Show the current disassembly style.
 
-`set arm apcs32'
+'set arm apcs32'
      This command toggles ARM operation mode between 32-bit and 26-bit.
 
-`show arm apcs32'
+'show arm apcs32'
      Display the current usage of the ARM 32-bit mode.
 
-`set arm fpu FPUTYPE'
+'set arm fpu FPUTYPE'
      This command sets the ARM floating-point unit (FPU) type.  The
      argument FPUTYPE can be one of these:
 
-    `auto'
+     'auto'
           Determine the FPU type by querying the OS ABI.
-
-    `softfpa'
+     'softfpa'
           Software FPU, with mixed-endian doubles on little-endian ARM
           processors.
-
-    `fpa'
+     'fpa'
           GCC-compiled FPA co-processor.
-
-    `softvfp'
+     'softvfp'
           Software FPU with pure-endian doubles.
-
-    `vfp'
+     'vfp'
           VFP co-processor.
 
-`show arm fpu'
+'show arm fpu'
      Show the current type of the FPU.
 
-`set arm abi'
+'set arm abi'
      This command forces GDB to use the specified ABI.
 
-`show arm abi'
+'show arm abi'
      Show the currently used ABI.
 
-`set arm fallback-mode (arm|thumb|auto)'
+'set arm fallback-mode (arm|thumb|auto)'
      GDB uses the symbol table, when available, to determine whether
-     instructions are ARM or Thumb.  This command controls GDB's
-     default behavior when the symbol table is not available.  The
-     default is `auto', which causes GDB to use the current execution
-     mode (from the `T' bit in the `CPSR' register).
+     instructions are ARM or Thumb.  This command controls GDB's default
+     behavior when the symbol table is not available.  The default is
+     'auto', which causes GDB to use the current execution mode (from
+     the 'T' bit in the 'CPSR' register).
 
-`show arm fallback-mode'
+'show arm fallback-mode'
      Show the current fallback instruction mode.
 
-`set arm force-mode (arm|thumb|auto)'
+'set arm force-mode (arm|thumb|auto)'
      This command overrides use of the symbol table to determine whether
-     instructions are ARM or Thumb.  The default is `auto', which
-     causes GDB to use the symbol table and then the setting of `set
-     arm fallback-mode'.
+     instructions are ARM or Thumb.  The default is 'auto', which causes
+     GDB to use the symbol table and then the setting of 'set arm
+     fallback-mode'.
 
-`show arm force-mode'
+'show arm force-mode'
      Show the current forced instruction mode.
 
-`set debug arm'
+'set debug arm'
      Toggle whether to display ARM-specific debugging messages from the
      ARM target support subsystem.
 
-`show debug arm'
+'show debug arm'
      Show whether ARM-specific debugging messages are enabled.
 
-   The following commands are available when an ARM target is debugged
-using the RDI interface:
-
-`rdilogfile [FILE]'
-     Set the filename for the ADP (Angel Debugger Protocol) packet log.
-     With an argument, sets the log file to the specified FILE.  With
-     no argument, show the current log file name.  The default log file
-     is `rdi.log'.
-
-`rdilogenable [ARG]'
-     Control logging of ADP packets.  With an argument of 1 or `"yes"'
-     enables logging, with an argument 0 or `"no"' disables it.  With
-     no arguments displays the current setting.  When logging is
-     enabled, ADP packets exchanged between GDB and the RDI target
-     device are logged to a file.
-
-`set rdiromatzero'
-     Tell GDB whether the target has ROM at address 0.  If on, vector
-     catching is disabled, so that zero address can be used.  If off
-     (the default), vector catching is enabled.  For this command to
-     take effect, it needs to be invoked prior to the `target rdi'
-     command.
-
-`show rdiromatzero'
-     Show the current setting of ROM at zero address.
-
-`set rdiheartbeat'
-     Enable or disable RDI heartbeat packets.  It is not recommended to
-     turn on this option, since it confuses ARM and EPI JTAG interface,
-     as well as the Angel monitor.
-
-`show rdiheartbeat'
-     Show the setting of RDI heartbeat packets.
-
-`target sim [SIMARGS] ...'
+'target sim [SIMARGS] ...'
      The GDB ARM simulator accepts the following optional arguments.
 
-    `--swi-support=TYPE'
+     '--swi-support=TYPE'
           Tell the simulator which SWI interfaces to support.  The
           argument TYPE may be a comma separated list of the following
-          values.  The default value is `all'.
-
-         `none'
-
-         `demon'
+          values.  The default value is 'all'.
 
-         `angel'
-
-         `redboot'
-
-         `all'
+          'none'
+          'demon'
+          'angel'
+          'redboot'
+          'all'
 
 
-File: gdb.info,  Node: M32R/D,  Next: M68K,  Prev: ARM,  Up: Embedded Processors
-
-21.3.2 Renesas M32R/D and M32R/SDI
-----------------------------------
-
-`target m32r DEV'
-     Renesas M32R/D ROM monitor.
-
-`target m32rsdi DEV'
-     Renesas M32R SDI server, connected via parallel port to the board.
-
-   The following GDB commands are specific to the M32R monitor:
-
-`set download-path PATH'
-     Set the default path for finding downloadable SREC files.
-
-`show download-path'
-     Show the default path for downloadable SREC files.
-
-`set board-address ADDR'
-     Set the IP address for the M32R-EVA target board.
-
-`show board-address'
-     Show the current IP address of the target board.
-
-`set server-address ADDR'
-     Set the IP address for the download server, which is the GDB's
-     host machine.
-
-`show server-address'
-     Display the IP address of the download server.
-
-`upload [FILE]'
-     Upload the specified SREC FILE via the monitor's Ethernet upload
-     capability.  If no FILE argument is given, the current executable
-     file is uploaded.
-
-`tload [FILE]'
-     Test the `upload' command.
-
-   The following commands are available for M32R/SDI:
-
-`sdireset'
-     This command resets the SDI connection.
-
-`sdistatus'
-     This command shows the SDI connection status.
-
-`debug_chaos'
-     Instructs the remote that M32R/Chaos debugging is to be used.
-
-`use_debug_dma'
-     Instructs the remote to use the DEBUG_DMA method of accessing
-     memory.
-
-`use_mon_code'
-     Instructs the remote to use the MON_CODE method of accessing
-     memory.
-
-`use_ib_break'
-     Instructs the remote to set breakpoints by IB break.
-
-`use_dbt_break'
-     Instructs the remote to set breakpoints by DBT.
-
-
-File: gdb.info,  Node: M68K,  Next: MicroBlaze,  Prev: M32R/D,  Up: Embedded Processors
+File: gdb.info,  Node: M68K,  Next: MicroBlaze,  Prev: ARM,  Up: Embedded Processors
 
 21.3.3 M68k
 -----------
 
-The Motorola m68k configuration includes ColdFire support, and a target
-command for the following ROM monitor.
-
-`target dbug DEV'
-     dBUG ROM monitor for Motorola ColdFire.
-
+The Motorola m68k configuration includes ColdFire support.
 
 
 File: gdb.info,  Node: MicroBlaze,  Next: MIPS Embedded,  Prev: M68K,  Up: Embedded Processors
@@ -3938,30 +4023,30 @@ FPGAs, such as Spartan or Virtex series.
 usually have JTAG ports which connect to a host system running the
 Xilinx Embedded Development Kit (EDK) or Software Development Kit (SDK).
 This host system is used to download the configuration bitstream to the
-target FPGA.  The Xilinx Microprocessor Debugger (XMD) program
-communicates with the target board using the JTAG interface and
-presents a `gdbserver' interface to the board.  By default `xmd' uses
-port `1234'.  (While it is possible to change this default port, it
-requires the use of undocumented `xmd' commands.  Contact Xilinx
-support if you need to do this.)
+target FPGA. The Xilinx Microprocessor Debugger (XMD) program
+communicates with the target board using the JTAG interface and presents
+a 'gdbserver' interface to the board.  By default 'xmd' uses port
+'1234'.  (While it is possible to change this default port, it requires
+the use of undocumented 'xmd' commands.  Contact Xilinx support if you
+need to do this.)
 
    Use these GDB commands to connect to the MicroBlaze target processor.
 
-`target remote :1234'
-     Use this command to connect to the target if you are running GDB
-     on the same system as `xmd'.
+'target remote :1234'
+     Use this command to connect to the target if you are running GDB on
+     the same system as 'xmd'.
 
-`target remote XMD-HOST:1234'
+'target remote XMD-HOST:1234'
      Use this command to connect to the target if it is connected to
-     `xmd' running on a different system named XMD-HOST.
+     'xmd' running on a different system named XMD-HOST.
 
-`load'
+'load'
      Use this command to download a program to the MicroBlaze target.
 
-`set debug microblaze N'
+'set debug microblaze N'
      Enable MicroBlaze-specific debugging messages if non-zero.
 
-`show debug microblaze N'
+'show debug microblaze N'
      Show MicroBlaze-specific debugging level.
 
 
@@ -3970,156 +4055,53 @@ File: gdb.info,  Node: MIPS Embedded,  N
 21.3.5 MIPS Embedded
 --------------------
 
-GDB can use the MIPS remote debugging protocol to talk to a MIPS board
-attached to a serial line.  This is available when you configure GDB
-with `--target=mips-elf'.
-
-   Use these GDB commands to specify the connection to your target
-board:
-
-`target mips PORT'
-     To run a program on the board, start up `gdb' with the name of
-     your program as the argument.  To connect to the board, use the
-     command `target mips PORT', where PORT is the name of the serial
-     port connected to the board.  If the program has not already been
-     downloaded to the board, you may use the `load' command to
-     download it.  You can then use all the usual GDB commands.
-
-     For example, this sequence connects to the target board through a
-     serial port, and loads and runs a program called PROG through the
-     debugger:
-
-          host$ gdb PROG
-          GDB is free software and ...
-          (gdb) target mips /dev/ttyb
-          (gdb) load PROG
-          (gdb) run
-
-`target mips HOSTNAME:PORTNUMBER'
-     On some GDB host configurations, you can specify a TCP connection
-     (for instance, to a serial line managed by a terminal
-     concentrator) instead of a serial port, using the syntax
-     `HOSTNAME:PORTNUMBER'.
-
-`target pmon PORT'
-     PMON ROM monitor.
-
-`target ddb PORT'
-     NEC's DDB variant of PMON for Vr4300.
-
-`target lsi PORT'
-     LSI variant of PMON.
-
-`target r3900 DEV'
-     Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
-
-`target array DEV'
-     Array Tech LSI33K RAID controller board.
-
-
-GDB also supports these special commands for MIPS targets:
-
-`set mipsfpu double'
-`set mipsfpu single'
-`set mipsfpu none'
-`set mipsfpu auto'
-`show mipsfpu'
+GDB supports these special commands for MIPS targets:
+
+'set mipsfpu double'
+'set mipsfpu single'
+'set mipsfpu none'
+'set mipsfpu auto'
+'show mipsfpu'
      If your target board does not support the MIPS floating point
-     coprocessor, you should use the command `set mipsfpu none' (if you
+     coprocessor, you should use the command 'set mipsfpu none' (if you
      need this, you may wish to put the command in your GDB init file).
      This tells GDB how to find the return value of functions which
      return floating point values.  It also allows GDB to avoid saving
      the floating point registers when calling functions on the board.
      If you are using a floating point coprocessor with only single
      precision floating point support, as on the R4650 processor, use
-     the command `set mipsfpu single'.  The default double precision
-     floating point coprocessor may be selected using `set mipsfpu
+     the command 'set mipsfpu single'.  The default double precision
+     floating point coprocessor may be selected using 'set mipsfpu
      double'.
 
      In previous versions the only choices were double precision or no
-     floating point, so `set mipsfpu on' will select double precision
-     and `set mipsfpu off' will select no floating point.
+     floating point, so 'set mipsfpu on' will select double precision
+     and 'set mipsfpu off' will select no floating point.
 
-     As usual, you can inquire about the `mipsfpu' variable with `show
+     As usual, you can inquire about the 'mipsfpu' variable with 'show
      mipsfpu'.
 
-`set timeout SECONDS'
-`set retransmit-timeout SECONDS'
-`show timeout'
-`show retransmit-timeout'
-     You can control the timeout used while waiting for a packet, in
-     the MIPS remote protocol, with the `set timeout SECONDS' command.
-     The default is 5 seconds.  Similarly, you can control the timeout
-     used while waiting for an acknowledgment of a packet with the `set
-     retransmit-timeout SECONDS' command.  The default is 3 seconds.
-     You can inspect both values with `show timeout' and `show
-     retransmit-timeout'.  (These commands are _only_ available when
-     GDB is configured for `--target=mips-elf'.)
-
-     The timeout set by `set timeout' does not apply when GDB is
-     waiting for your program to stop.  In that case, GDB waits forever
-     because it has no way of knowing how long the program is going to
-     run before stopping.
-
-`set syn-garbage-limit NUM'
-     Limit the maximum number of characters GDB should ignore when it
-     tries to synchronize with the remote target.  The default is 10
-     characters.  Setting the limit to -1 means there's no limit.
-
-`show syn-garbage-limit'
-     Show the current limit on the number of characters to ignore when
-     trying to synchronize with the remote system.
-
-`set monitor-prompt PROMPT'
-     Tell GDB to expect the specified PROMPT string from the remote
-     monitor.  The default depends on the target:
-    pmon target
-          `PMON'
-
-    ddb target
-          `NEC010'
-
-    lsi target
-          `PMON>'
-
-`show monitor-prompt'
-     Show the current strings GDB expects as the prompt from the remote
-     monitor.
-
-`set monitor-warnings'
-     Enable or disable monitor warnings about hardware breakpoints.
-     This has effect only for the `lsi' target.  When on, GDB will
-     display warning messages whose codes are returned by the `lsi'
-     PMON monitor for breakpoint commands.
-
-`show monitor-warnings'
-     Show the current setting of printing monitor warnings.
-
-`pmon COMMAND'
-     This command allows sending an arbitrary COMMAND string to the
-     monitor.  The monitor must be in debug mode for this to work.
-
 
-File: gdb.info,  Node: PowerPC Embedded,  Next: PA,  Prev: MIPS Embedded,  Up: Embedded Processors
+File: gdb.info,  Node: PowerPC Embedded,  Next: AVR,  Prev: MIPS Embedded,  Up: Embedded Processors
 
 21.3.6 PowerPC Embedded
 -----------------------
 
-GDB supports using the DVC (Data Value Compare) register to implement
-in hardware simple hardware watchpoint conditions of the form:
+GDB supports using the DVC (Data Value Compare) register to implement in
+hardware simple hardware watchpoint conditions of the form:
 
      (gdb) watch ADDRESS|VARIABLE \
        if  ADDRESS|VARIABLE == CONSTANT EXPRESSION
 
    The DVC register will be automatically used when GDB detects such
 pattern in a condition expression, and the created watchpoint uses one
-debug register (either the `exact-watchpoints' option is on and the
+debug register (either the 'exact-watchpoints' option is on and the
 variable is scalar, or the variable has a length of one byte).  This
 feature is available in native GDB running on a Linux kernel version
 2.6.34 or newer.
 
    When running on PowerPC embedded processors, GDB automatically uses
-ranged hardware watchpoints, unless the `exact-watchpoints' option is
+ranged hardware watchpoints, unless the 'exact-watchpoints' option is
 on, in which case watchpoints using only one debug register are created
 when watching variables of scalar types.
 
@@ -4130,335 +4112,117 @@ region using one of the following comman
      (gdb) watch {char[LENGTH]} ADDRESS
 
    PowerPC embedded processors support masked watchpoints.  See the
-discussion about the `mask' argument in *note Set Watchpoints::.
+discussion about the 'mask' argument in *note Set Watchpoints::.
 
    PowerPC embedded processors support hardware accelerated "ranged
 breakpoints".  A ranged breakpoint stops execution of the inferior
 whenever it executes an instruction at any address within the range it
-specifies.  To set a ranged breakpoint in GDB, use the `break-range'
+specifies.  To set a ranged breakpoint in GDB, use the 'break-range'
 command.
 
    GDB provides the following PowerPC-specific commands:
 
-`break-range START-LOCATION, END-LOCATION'
+'break-range START-LOCATION, END-LOCATION'
      Set a breakpoint for an address range given by START-LOCATION and
      END-LOCATION, which can specify a function name, a line number, an
      offset of lines from the current line or from the start location,
      or an address of an instruction (see *note Specify Location::, for
      a list of all the possible ways to specify a LOCATION.)  The
-     breakpoint will stop execution of the inferior whenever it
-     executes an instruction at any address within the specified range,
+     breakpoint will stop execution of the inferior whenever it executes
+     an instruction at any address within the specified range,
      (including START-LOCATION and END-LOCATION.)
 
-`set powerpc soft-float'
-`show powerpc soft-float'
+'set powerpc soft-float'
+'show powerpc soft-float'
      Force GDB to use (or not use) a software floating point calling
      convention.  By default, GDB selects the calling convention based
      on the selected architecture and the provided executable file.
 
-`set powerpc vector-abi'
-`show powerpc vector-abi'
+'set powerpc vector-abi'
+'show powerpc vector-abi'
      Force GDB to use the specified calling convention for vector
-     arguments and return values.  The valid options are `auto';
-     `generic', to avoid vector registers even if they are present;
-     `altivec', to use AltiVec registers; and `spe' to use SPE
-     registers.  By default, GDB selects the calling convention based
-     on the selected architecture and the provided executable file.
+     arguments and return values.  The valid options are 'auto';
+     'generic', to avoid vector registers even if they are present;
+     'altivec', to use AltiVec registers; and 'spe' to use SPE
+     registers.  By default, GDB selects the calling convention based on
+     the selected architecture and the provided executable file.
 
-`set powerpc exact-watchpoints'
-`show powerpc exact-watchpoints'
+'set powerpc exact-watchpoints'
+'show powerpc exact-watchpoints'
      Allow GDB to use only one debug register when watching a variable
-     of scalar type, thus assuming that the variable is accessed
-     through the address of its first byte.
-
-`target dink32 DEV'
-     DINK32 ROM monitor.
-
-`target ppcbug DEV'
-
-`target ppcbug1 DEV'
-     PPCBUG ROM monitor for PowerPC.
-
-`target sds DEV'
-     SDS monitor, running on a PowerPC board (such as Motorola's ADS).
-
-   The following commands specific to the SDS protocol are supported by
-GDB:
-
-`set sdstimeout NSEC'
-     Set the timeout for SDS protocol reads to be NSEC seconds.  The
-     default is 2 seconds.
-
-`show sdstimeout'
-     Show the current value of the SDS timeout.
-
-`sds COMMAND'
-     Send the specified COMMAND string to the SDS monitor.
-
-
-File: gdb.info,  Node: PA,  Next: Sparclet,  Prev: PowerPC Embedded,  Up: Embedded Processors
-
-21.3.7 HP PA Embedded
----------------------
-
-`target op50n DEV'
-     OP50N monitor, running on an OKI HPPA board.
-
-`target w89k DEV'
-     W89K monitor, running on a Winbond HPPA board.
-
-
-
-File: gdb.info,  Node: Sparclet,  Next: Sparclite,  Prev: PA,  Up: Embedded Processors
-
-21.3.8 Tsqware Sparclet
------------------------
-
-GDB enables developers to debug tasks running on Sparclet targets from
-a Unix host.  GDB uses code that runs on both the Unix host and on the
-Sparclet target.  The program `gdb' is installed and executed on the
-Unix host.
-
-`remotetimeout ARGS'
-     GDB supports the option `remotetimeout'.  This option is set by
-     the user, and ARGS represents the number of seconds GDB waits for
-     responses.
-
-   When compiling for debugging, include the options `-g' to get debug
-information and `-Ttext' to relocate the program to where you wish to
-load it on the target.  You may also want to add the options `-n' or
-`-N' in order to reduce the size of the sections.  Example:
-
-     sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
-
-   You can use `objdump' to verify that the addresses are what you
-intended:
-
-     sparclet-aout-objdump --headers --syms prog
-
-   Once you have set your Unix execution search path to find GDB, you
-are ready to run GDB.  From your Unix host, run `gdb' (or
-`sparclet-aout-gdb', depending on your installation).
-
-   GDB comes up showing the prompt:
-
-     (gdbslet)
-
-* Menu:
-
-* Sparclet File::                Setting the file to debug
-* Sparclet Connection::          Connecting to Sparclet
-* Sparclet Download::            Sparclet download
-* Sparclet Execution::           Running and debugging
-
-
-File: gdb.info,  Node: Sparclet File,  Next: Sparclet Connection,  Up: Sparclet
-
-21.3.8.1 Setting File to Debug
-..............................
-
-The GDB command `file' lets you choose with program to debug.
-
-     (gdbslet) file prog
-
-   GDB then attempts to read the symbol table of `prog'.  GDB locates
-the file by searching the directories listed in the command search path.
-If the file was compiled with debug information (option `-g'), source
-files will be searched as well.  GDB locates the source files by
-searching the directories listed in the directory search path (*note
-Your Program's Environment: Environment.).  If it fails to find a file,
-it displays a message such as:
-
-     prog: No such file or directory.
-
-   When this happens, add the appropriate directories to the search
-paths with the GDB commands `path' and `dir', and execute the `target'
-command again.
+     of scalar type, thus assuming that the variable is accessed through
+     the address of its first byte.
 
 
-File: gdb.info,  Node: Sparclet Connection,  Next: Sparclet Download,  Prev: Sparclet File,  Up: Sparclet
+File: gdb.info,  Node: AVR,  Next: CRIS,  Prev: PowerPC Embedded,  Up: Embedded Processors
 
-21.3.8.2 Connecting to Sparclet
-...............................
-
-The GDB command `target' lets you connect to a Sparclet target.  To
-connect to a target on serial port "`ttya'", type:
-
-     (gdbslet) target sparclet /dev/ttya
-     Remote target sparclet connected to /dev/ttya
-     main () at ../prog.c:3
-
-   GDB displays messages like these:
-
-     Connected to ttya.
-
-
-File: gdb.info,  Node: Sparclet Download,  Next: Sparclet Execution,  Prev: Sparclet Connection,  Up: Sparclet
-
-21.3.8.3 Sparclet Download
-..........................
-
-Once connected to the Sparclet target, you can use the GDB `load'
-command to download the file from the host to the target.  The file
-name and load offset should be given as arguments to the `load' command.
-Since the file format is aout, the program must be loaded to the
-starting address.  You can use `objdump' to find out what this value
-is.  The load offset is an offset which is added to the VMA (virtual
-memory address) of each of the file's sections.  For instance, if the
-program `prog' was linked to text address 0x1201000, with data at
-0x12010160 and bss at 0x12010170, in GDB, type:
-
-     (gdbslet) load prog 0x12010000
-     Loading section .text, size 0xdb0 vma 0x12010000
-
-   If the code is loaded at a different address then what the program
-was linked to, you may need to use the `section' and `add-symbol-file'
-commands to tell GDB where to map the symbol table.
-
-
-File: gdb.info,  Node: Sparclet Execution,  Prev: Sparclet Download,  Up: Sparclet
-
-21.3.8.4 Running and Debugging
-..............................
-
-You can now begin debugging the task using GDB's execution control
-commands, `b', `step', `run', etc.  See the GDB manual for the list of
-commands.
-
-     (gdbslet) b main
-     Breakpoint 1 at 0x12010000: file prog.c, line 3.
-     (gdbslet) run
-     Starting program: prog
-     Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
-     3        char *symarg = 0;
-     (gdbslet) step
-     4        char *execarg = "hello!";
-     (gdbslet)
-
-
-File: gdb.info,  Node: Sparclite,  Next: Z8000,  Prev: Sparclet,  Up: Embedded Processors
-
-21.3.9 Fujitsu Sparclite
-------------------------
-
-`target sparclite DEV'
-     Fujitsu sparclite boards, used only for the purpose of loading.
-     You must use an additional command to debug the program.  For
-     example: target remote DEV using GDB standard remote protocol.
-
-
-
-File: gdb.info,  Node: Z8000,  Next: AVR,  Prev: Sparclite,  Up: Embedded Processors
-
-21.3.10 Zilog Z8000
--------------------
-
-When configured for debugging Zilog Z8000 targets, GDB includes a Z8000
-simulator.
-
-   For the Z8000 family, `target sim' simulates either the Z8002 (the
-unsegmented variant of the Z8000 architecture) or the Z8001 (the
-segmented variant).  The simulator recognizes which architecture is
-appropriate by inspecting the object code.
-
-`target sim ARGS'
-     Debug programs on a simulated CPU.  If the simulator supports setup
-     options, specify them via ARGS.
-
-After specifying this target, you can debug programs for the simulated
-CPU in the same style as programs for your host computer; use the
-`file' command to load a new program image, the `run' command to run
-your program, and so on.
-
-   As well as making available all the usual machine registers (*note
-Registers: Registers.), the Z8000 simulator provides three additional
-items of information as specially named registers:
-
-`cycles'
-     Counts clock-ticks in the simulator.
-
-`insts'
-     Counts instructions run in the simulator.
-
-`time'
-     Execution time in 60ths of a second.
-
-
-   You can refer to these values in GDB expressions with the usual
-conventions; for example, `b fputc if $cycles>5000' sets a conditional
-breakpoint that suspends only after at least 5000 simulated clock ticks.
-
-
-File: gdb.info,  Node: AVR,  Next: CRIS,  Prev: Z8000,  Up: Embedded Processors
-
-21.3.11 Atmel AVR
------------------
+21.3.7 Atmel AVR
+----------------
 
 When configured for debugging the Atmel AVR, GDB supports the following
 AVR-specific commands:
 
-`info io_registers'
+'info io_registers'
      This command displays information about the AVR I/O registers.  For
      each register, GDB prints its number and value.
 
 
 File: gdb.info,  Node: CRIS,  Next: Super-H,  Prev: AVR,  Up: Embedded Processors
 
-21.3.12 CRIS
-------------
+21.3.8 CRIS
+-----------
 
 When configured for debugging CRIS, GDB provides the following
 CRIS-specific commands:
 
-`set cris-version VER'
-     Set the current CRIS version to VER, either `10' or `32'.  The
-     CRIS version affects register names and sizes.  This command is
-     useful in case autodetection of the CRIS version fails.
+'set cris-version VER'
+     Set the current CRIS version to VER, either '10' or '32'.  The CRIS
+     version affects register names and sizes.  This command is useful
+     in case autodetection of the CRIS version fails.
 
-`show cris-version'
+'show cris-version'
      Show the current CRIS version.
 
-`set cris-dwarf2-cfi'
+'set cris-dwarf2-cfi'
      Set the usage of DWARF-2 CFI for CRIS debugging.  The default is
-     `on'.  Change to `off' when using `gcc-cris' whose version is below
-     `R59'.
+     'on'.  Change to 'off' when using 'gcc-cris' whose version is below
+     'R59'.
 
-`show cris-dwarf2-cfi'
+'show cris-dwarf2-cfi'
      Show the current state of using DWARF-2 CFI.
 
-`set cris-mode MODE'
+'set cris-mode MODE'
      Set the current CRIS mode to MODE.  It should only be changed when
-     debugging in guru mode, in which case it should be set to `guru'
-     (the default is `normal').
+     debugging in guru mode, in which case it should be set to 'guru'
+     (the default is 'normal').
 
-`show cris-mode'
+'show cris-mode'
      Show the current CRIS mode.
 
 
 File: gdb.info,  Node: Super-H,  Prev: CRIS,  Up: Embedded Processors
 
-21.3.13 Renesas Super-H
------------------------
+21.3.9 Renesas Super-H
+----------------------
 
 For the Renesas Super-H processor, GDB provides these commands:
 
-`set sh calling-convention CONVENTION'
+'set sh calling-convention CONVENTION'
      Set the calling-convention used when calling functions from GDB.
-     Allowed values are `gcc', which is the default setting, and
-     `renesas'.  With the `gcc' setting, functions are called using the
+     Allowed values are 'gcc', which is the default setting, and
+     'renesas'.  With the 'gcc' setting, functions are called using the
      GCC calling convention.  If the DWARF-2 information of the called
      function specifies that the function follows the Renesas calling
      convention, the function is called using the Renesas calling
-     convention.  If the calling convention is set to `renesas', the
+     convention.  If the calling convention is set to 'renesas', the
      Renesas calling convention is always used, regardless of the
      DWARF-2 information.  This can be used to override the default of
-     `gcc' if debug information is missing, or the compiler does not
+     'gcc' if debug information is missing, or the compiler does not
      emit the DWARF-2 calling convention entry for a function.
 
-`show sh calling-convention'
+'show sh calling-convention'
      Show the current calling convention setting.
 
-
 
 File: gdb.info,  Node: Architectures,  Prev: Embedded Processors,  Up: Configurations
 
@@ -4488,49 +4252,48 @@ File: gdb.info,  Node: AArch64,  Next: i
 When GDB is debugging the AArch64 architecture, it provides the
 following special commands:
 
-`set debug aarch64'
+'set debug aarch64'
      This command determines whether AArch64 architecture-specific
      debugging messages are to be displayed.
 
-`show debug aarch64'
+'show debug aarch64'
      Show whether AArch64 debugging messages are displayed.
 
-
 
 File: gdb.info,  Node: i386,  Next: Alpha,  Prev: AArch64,  Up: Architectures
 
 21.4.2 x86 Architecture-specific Issues
 ---------------------------------------
 
-`set struct-convention MODE'
-     Set the convention used by the inferior to return `struct's and
-     `union's from functions to MODE.  Possible values of MODE are
-     `"pcc"', `"reg"', and `"default"' (the default).  `"default"' or
-     `"pcc"' means that `struct's are returned on the stack, while
-     `"reg"' means that a `struct' or a `union' whose size is 1, 2, 4,
+'set struct-convention MODE'
+     Set the convention used by the inferior to return 'struct's and
+     'union's from functions to MODE.  Possible values of MODE are
+     '"pcc"', '"reg"', and '"default"' (the default).  '"default"' or
+     '"pcc"' means that 'struct's are returned on the stack, while
+     '"reg"' means that a 'struct' or a 'union' whose size is 1, 2, 4,
      or 8 bytes will be returned in a register.
 
-`show struct-convention'
-     Show the current setting of the convention to return `struct's
-     from functions.
-
-21.4.2.1 Intel(R) "Memory Protection Extensions" (MPX).
-.......................................................
-
-Memory Protection Extension (MPX) adds the bound registers `BND0' (1)
-through `BND3'.  Bound registers store a pair of 64-bit values which
-are the lower bound and upper bound.  Bounds are effective addresses or
+'show struct-convention'
+     Show the current setting of the convention to return 'struct's from
+     functions.
+
+21.4.2.1 Intel "Memory Protection Extensions" (MPX).
+....................................................
+
+Memory Protection Extension (MPX) adds the bound registers 'BND0' (1)
+through 'BND3'.  Bound registers store a pair of 64-bit values which are
+the lower bound and upper bound.  Bounds are effective addresses or
 memory locations.  The upper bounds are architecturally represented in
 1's complement form.  A bound having lower bound = 0, and upper bound =
 0 (1's complement of all bits set) will allow access to the entire
 address space.
 
-   `BND0' through `BND3' are represented in GDB as `bnd0raw' through
-`bnd3raw'.  Pseudo registers `bnd0' through `bnd3' display the upper
+   'BND0' through 'BND3' are represented in GDB as 'bnd0raw' through
+'bnd3raw'.  Pseudo registers 'bnd0' through 'bnd3' display the upper
 bound performing the complement of one operation on the upper bound
-value, i.e. when upper bound in `bnd0raw' is 0 in the GDB `bnd0' it
-will be `0xfff...'.  In this sense it can also be noted that the upper
-bounds are inclusive.
+value, i.e. when upper bound in 'bnd0raw' is 0 in the GDB 'bnd0' it will
+be '0xfff...'.  In this sense it can also be noted that the upper bounds
+are inclusive.
 
    As an example, assume that the register BND0 holds bounds for a
 pointer having access allowed for the range between 0x32 and 0x71.  The
@@ -4547,19 +4310,19 @@ pointer.
 
    Bounds can also be stored in bounds tables, which are stored in
 application memory.  These tables store bounds for pointers by
-specifying the bounds pointer's value along with its bounds.
-Evaluating and changing bounds located in bound tables is therefore
-interesting while investigating bugs on MPX context.  GDB provides
-commands for this purpose:
+specifying the bounds pointer's value along with its bounds.  Evaluating
+and changing bounds located in bound tables is therefore interesting
+while investigating bugs on MPX context.  GDB provides commands for this
+purpose:
 
-`show mpx bound POINTER'
+'show mpx bound POINTER'
      Display bounds of the given POINTER.
 
-`set mpx bound POINTER, LBOUND, UBOUND'
-     Set the bounds of a pointer in the bound table.  This command
-     takes three parameters: POINTER is the pointers whose bounds are
-     to be changed, LBOUND and UBOUND are new values for lower and
-     upper bounds respectively.
+'set mpx bound POINTER, LBOUND, UBOUND'
+     Set the bounds of a pointer in the bound table.  This command takes
+     three parameters: POINTER is the pointers whose bounds are to be
+     changed, LBOUND and UBOUND are new values for lower and upper
+     bounds respectively.
 
    ---------- Footnotes ----------
 
@@ -4581,54 +4344,48 @@ File: gdb.info,  Node: MIPS,  Next: HPPA
 -----------
 
 Alpha- and MIPS-based computers use an unusual stack frame, which
-sometimes requires GDB to search backward in the object code to find
-the beginning of a function.
+sometimes requires GDB to search backward in the object code to find the
+beginning of a function.
 
    To improve response time (especially for embedded applications, where
 GDB may be restricted to a slow serial line for this search) you may
 want to limit the size of this search, using one of these commands:
 
-`set heuristic-fence-post LIMIT'
-     Restrict GDB to examining at most LIMIT bytes in its search for
-     the beginning of a function.  A value of 0 (the default) means
-     there is no limit.  However, except for 0, the larger the limit
-     the more bytes `heuristic-fence-post' must search and therefore
-     the longer it takes to run.  You should only need to use this
-     command when debugging a stripped executable.
+'set heuristic-fence-post LIMIT'
+     Restrict GDB to examining at most LIMIT bytes in its search for the
+     beginning of a function.  A value of 0 (the default) means there is
+     no limit.  However, except for 0, the larger the limit the more
+     bytes 'heuristic-fence-post' must search and therefore the longer
+     it takes to run.  You should only need to use this command when
+     debugging a stripped executable.
 
-`show heuristic-fence-post'
+'show heuristic-fence-post'
      Display the current limit.
 
-These commands are available _only_ when GDB is configured for
-debugging programs on Alpha or MIPS processors.
+These commands are available _only_ when GDB is configured for debugging
+programs on Alpha or MIPS processors.
 
    Several MIPS-specific commands are available when debugging MIPS
 programs:
 
-`set mips abi ARG'
+'set mips abi ARG'
      Tell GDB which MIPS ABI is used by the inferior.  Possible values
      of ARG are:
 
-    `auto'
+     'auto'
           The default ABI associated with the current binary (this is
           the default).
+     'o32'
+     'o64'
+     'n32'
+     'n64'
+     'eabi32'
+     'eabi64'
 
-    `o32'
-
-    `o64'
-
-    `n32'
-
-    `n64'
-
-    `eabi32'
-
-    `eabi64'
-
-`show mips abi'
+'show mips abi'
      Show the MIPS ABI used by GDB to debug the inferior.
 
-`set mips compression ARG'
+'set mips compression ARG'
      Tell GDB which MIPS compressed ISA (Instruction Set Architecture)
      encoding is used by the inferior.  GDB uses this for code
      disassembly and other internal interpretation purposes.  This
@@ -4637,8 +4394,8 @@ programs:
      information about the encoding it uses.  Otherwise this setting is
      automatically updated from information provided by the executable.
 
-     Possible values of ARG are `mips16' and `micromips'.  The default
-     compressed ISA encoding is `mips16', as executables containing
+     Possible values of ARG are 'mips16' and 'micromips'.  The default
+     compressed ISA encoding is 'mips16', as executables containing
      MIPS16 code frequently are not identified as such.
 
      This setting is "sticky"; that is, it retains its value across
@@ -4651,39 +4408,39 @@ programs:
      GDB uses them in preference to the global compressed ISA encoding
      setting.
 
-`show mips compression'
+'show mips compression'
      Show the MIPS compressed ISA encoding used by GDB to debug the
      inferior.
 
-`set mipsfpu'
-`show mipsfpu'
+'set mipsfpu'
+'show mipsfpu'
      *Note set mipsfpu: MIPS Embedded.
 
-`set mips mask-address ARG'
+'set mips mask-address ARG'
      This command determines whether the most-significant 32 bits of
      64-bit MIPS addresses are masked off.  The argument ARG can be
-     `on', `off', or `auto'.  The latter is the default setting, which
+     'on', 'off', or 'auto'.  The latter is the default setting, which
      lets GDB determine the correct value.
 
-`show mips mask-address'
+'show mips mask-address'
      Show whether the upper 32 bits of MIPS addresses are masked off or
      not.
 
-`set remote-mips64-transfers-32bit-regs'
+'set remote-mips64-transfers-32bit-regs'
      This command controls compatibility with 64-bit MIPS targets that
      transfer data in 32-bit quantities.  If you have an old MIPS 64
      target that transfers 32 bits for some registers, like SR and FSR,
-     and 64 bits for other registers, set this option to `on'.
+     and 64 bits for other registers, set this option to 'on'.
 
-`show remote-mips64-transfers-32bit-regs'
+'show remote-mips64-transfers-32bit-regs'
      Show the current setting of compatibility with older MIPS 64
      targets.
 
-`set debug mips'
+'set debug mips'
      This command turns on and off debugging messages for the
      MIPS-specific target code in GDB.
 
-`show debug mips'
+'show debug mips'
      Show the current setting of MIPS debugging messages.
 
 
@@ -4695,18 +4452,17 @@ File: gdb.info,  Node: HPPA,  Next: SPU,
 When GDB is debugging the HP PA architecture, it provides the following
 special commands:
 
-`set debug hppa'
+'set debug hppa'
      This command determines whether HPPA architecture-specific
      debugging messages are to be displayed.
 
-`show debug hppa'
+'show debug hppa'
      Show whether HPPA debugging messages are displayed.
 
-`maint print unwind ADDRESS'
+'maint print unwind ADDRESS'
      This command displays the contents of the unwind table entry at the
      given ADDRESS.
 
-
 
 File: gdb.info,  Node: SPU,  Next: PowerPC,  Prev: HPPA,  Up: Architectures
 
@@ -4716,55 +4472,53 @@ File: gdb.info,  Node: SPU,  Next: Power
 When GDB is debugging the Cell Broadband Engine SPU architecture, it
 provides the following special commands:
 
-`info spu event'
+'info spu event'
      Display SPU event facility status.  Shows current event mask and
      pending event status.
 
-`info spu signal'
+'info spu signal'
      Display SPU signal notification facility status.  Shows pending
      signal-control word and signal notification mode of both signal
      notification channels.
 
-`info spu mailbox'
-     Display SPU mailbox facility status.  Shows all pending entries,
-     in order of processing, in each of the SPU Write Outbound, SPU
-     Write Outbound Interrupt, and SPU Read Inbound mailboxes.
+'info spu mailbox'
+     Display SPU mailbox facility status.  Shows all pending entries, in
+     order of processing, in each of the SPU Write Outbound, SPU Write
+     Outbound Interrupt, and SPU Read Inbound mailboxes.
 
-`info spu dma'
+'info spu dma'
      Display MFC DMA status.  Shows all pending commands in the MFC DMA
-     queue.  For each entry, opcode, tag, class IDs, effective and
-     local store addresses and transfer size are shown.
+     queue.  For each entry, opcode, tag, class IDs, effective and local
+     store addresses and transfer size are shown.
 
-`info spu proxydma'
+'info spu proxydma'
      Display MFC Proxy-DMA status.  Shows all pending commands in the
      MFC Proxy-DMA queue.  For each entry, opcode, tag, class IDs,
      effective and local store addresses and transfer size are shown.
 
-
    When GDB is debugging a combined PowerPC/SPU application on the Cell
 Broadband Engine, it provides in addition the following special
 commands:
 
-`set spu stop-on-load ARG'
-     Set whether to stop for new SPE threads.  When set to `on', GDB
+'set spu stop-on-load ARG'
+     Set whether to stop for new SPE threads.  When set to 'on', GDB
      will give control to the user when a new SPE thread enters its
-     `main' function.  The default is `off'.
+     'main' function.  The default is 'off'.
 
-`show spu stop-on-load'
+'show spu stop-on-load'
      Show whether to stop for new SPE threads.
 
-`set spu auto-flush-cache ARG'
+'set spu auto-flush-cache ARG'
      Set whether to automatically flush the software-managed cache.
-     When set to `on', GDB will automatically cause the SPE
+     When set to 'on', GDB will automatically cause the SPE
      software-managed cache to be flushed whenever SPE execution stops.
      This provides a consistent view of PowerPC memory that is accessed
-     via the cache.  If an application does not use the
-     software-managed cache, this option has no effect.
+     via the cache.  If an application does not use the software-managed
+     cache, this option has no effect.
 
-`show spu auto-flush-cache'
+'show spu auto-flush-cache'
      Show whether to automatically flush the software-managed cache.
 
-
 
 File: gdb.info,  Node: PowerPC,  Next: Nios II,  Prev: SPU,  Up: Architectures
 
@@ -4773,16 +4527,16 @@ File: gdb.info,  Node: PowerPC,  Next: N
 
 When GDB is debugging the PowerPC architecture, it provides a set of
 pseudo-registers to enable inspection of 128-bit wide Decimal Floating
-Point numbers stored in the floating point registers. These values must
+Point numbers stored in the floating point registers.  These values must
 be stored in two consecutive registers, always starting at an even
-register like `f0' or `f2'.
+register like 'f0' or 'f2'.
 
-   The pseudo-registers go from `$dl0' through `$dl15', and are formed
-by joining the even/odd register pairs `f0' and `f1' for `$dl0', `f2'
-and `f3' for `$dl1' and so on.
+   The pseudo-registers go from '$dl0' through '$dl15', and are formed
+by joining the even/odd register pairs 'f0' and 'f1' for '$dl0', 'f2'
+and 'f3' for '$dl1' and so on.
 
    For POWER7 processors, GDB provides a set of pseudo-registers, the
-64-bit wide Extended Floating Point Registers (`f32' through `f63').
+64-bit wide Extended Floating Point Registers ('f32' through 'f63').
 
 
 File: gdb.info,  Node: Nios II,  Prev: PowerPC,  Up: Architectures
@@ -4793,11 +4547,11 @@ File: gdb.info,  Node: Nios II,  Prev: P
 When GDB is debugging the Nios II architecture, it provides the
 following special commands:
 
-`set debug nios2'
+'set debug nios2'
      This command turns on and off debugging messages for the Nios II
      target code in GDB.
 
-`show debug nios2'
+'show debug nios2'
      Show the current setting of Nios II debugging messages.
 
 
@@ -4806,9 +4560,9 @@ File: gdb.info,  Node: Controlling GDB, 
 22 Controlling GDB
 ******************
 
-You can alter the way GDB interacts with you by using the `set'
-command.  For commands controlling how GDB displays data, see *note
-Print Settings: Print Settings.  Other settings are described here.
+You can alter the way GDB interacts with you by using the 'set' command.
+For commands controlling how GDB displays data, see *note Print
+Settings: Print Settings.  Other settings are described here.
 
 * Menu:
 
@@ -4830,25 +4584,25 @@ File: gdb.info,  Node: Prompt,  Next: Ed
 ===========
 
 GDB indicates its readiness to read a command by printing a string
-called the "prompt".  This string is normally `(gdb)'.  You can change
-the prompt string with the `set prompt' command.  For instance, when
+called the "prompt".  This string is normally '(gdb)'.  You can change
+the prompt string with the 'set prompt' command.  For instance, when
 debugging GDB with GDB, it is useful to change the prompt in one of the
 GDB sessions so that you can always tell which one you are talking to.
 
-   _Note:_  `set prompt' does not add a space for you after the prompt
+   _Note:_ 'set prompt' does not add a space for you after the prompt
 you set.  This allows you to set a prompt which ends in a space or a
 prompt that does not.
 
-`set prompt NEWPROMPT'
+'set prompt NEWPROMPT'
      Directs GDB to use NEWPROMPT as its prompt string henceforth.
 
-`show prompt'
-     Prints a line of the form: `Gdb's prompt is: YOUR-PROMPT'
+'show prompt'
+     Prints a line of the form: 'Gdb's prompt is: YOUR-PROMPT'
 
    Versions of GDB that ship with Python scripting enabled have prompt
 extensions.  The commands for interacting with these extensions are:
 
-`set extended-prompt PROMPT'
+'set extended-prompt PROMPT'
      Set an extended prompt that allows for substitutions.  *Note
      gdb.prompt::, for a list of escape sequences that can be used for
      substitution.  Any escape sequences specified as part of the prompt
@@ -4862,10 +4616,10 @@ extensions.  The commands for interactin
      Note that when an extended-prompt is set, it takes control of the
      PROMPT_HOOK hook.  *Note prompt_hook::, for further information.
 
-`show extended-prompt'
-     Prints the extended prompt.  Any escape sequences specified as
-     part of the prompt string with `set extended-prompt', are replaced
-     with the corresponding strings each time the prompt is displayed.
+'show extended-prompt'
+     Prints the extended prompt.  Any escape sequences specified as part
+     of the prompt string with 'set extended-prompt', are replaced with
+     the corresponding strings each time the prompt is displayed.
 
 
 File: gdb.info,  Node: Editing,  Next: Command History,  Prev: Prompt,  Up: Controlling GDB
@@ -4876,24 +4630,24 @@ File: gdb.info,  Node: Editing,  Next: C
 GDB reads its input commands via the "Readline" interface.  This GNU
 library provides consistent behavior for programs which provide a
 command line interface to the user.  Advantages are GNU Emacs-style or
-"vi"-style inline editing of commands, `csh'-like history substitution,
+"vi"-style inline editing of commands, 'csh'-like history substitution,
 and a storage and recall of command history across debugging sessions.
 
    You may control the behavior of command line editing in GDB with the
-command `set'.
+command 'set'.
 
-`set editing'
-`set editing on'
+'set editing'
+'set editing on'
      Enable command line editing (enabled by default).
 
-`set editing off'
+'set editing off'
      Disable command line editing.
 
-`show editing'
+'show editing'
      Show whether command line editing is enabled.
 
    *Note Command Line Editing::, for more details about the Readline
-interface.  Users unfamiliar with GNU Emacs or `vi' are encouraged to
+interface.  Users unfamiliar with GNU Emacs or 'vi' are encouraged to
 read that chapter.
 
 
@@ -4911,95 +4665,93 @@ provide the history facility.  *Note Usi
 the detailed description of the History library.
 
    To issue a command to GDB without affecting certain aspects of the
-state which is seen by users, prefix it with `server ' (*note Server
+state which is seen by users, prefix it with 'server ' (*note Server
 Prefix::).  This means that this command will not affect the command
 history, nor will it affect GDB's notion of which command to repeat if
 <RET> is pressed on a line by itself.
 
    The server prefix does not affect the recording of values into the
 value history; to print a value without recording it into the value
-history, use the `output' command instead of the `print' command.
+history, use the 'output' command instead of the 'print' command.
 
    Here is the description of GDB commands related to command history.
 
-`set history filename FNAME'
-     Set the name of the GDB command history file to FNAME.  This is
-     the file where GDB reads an initial command history list, and
-     where it writes the command history from this session when it
-     exits.  You can access this list through history expansion or
-     through the history command editing characters listed below.  This
-     file defaults to the value of the environment variable
-     `GDBHISTFILE', or to `./.gdb_history' (`./_gdb_history' on MS-DOS)
-     if this variable is not set.
+'set history filename FNAME'
+     Set the name of the GDB command history file to FNAME.  This is the
+     file where GDB reads an initial command history list, and where it
+     writes the command history from this session when it exits.  You
+     can access this list through history expansion or through the
+     history command editing characters listed below.  This file
+     defaults to the value of the environment variable 'GDBHISTFILE', or
+     to './.gdb_history' ('./_gdb_history' on MS-DOS) if this variable
+     is not set.
 
-`set history save'
-`set history save on'
+'set history save'
+'set history save on'
      Record command history in a file, whose name may be specified with
-     the `set history filename' command.  By default, this option is
+     the 'set history filename' command.  By default, this option is
      disabled.
 
-`set history save off'
+'set history save off'
      Stop recording command history in a file.
 
-`set history size SIZE'
-`set history size unlimited'
+'set history size SIZE'
+'set history size unlimited'
      Set the number of commands which GDB keeps in its history list.
      This defaults to the value of the environment variable
-     `GDBHISTSIZE', or to 256 if this variable is not set.  Non-numeric
-     values of `GDBHISTSIZE' are ignored.  If SIZE is `unlimited' or if
-     `GDBHISTSIZE' is either a negative number or the empty string,
-     then the number of commands GDB keeps in the history list is
-     unlimited.
+     'GDBHISTSIZE', or to 256 if this variable is not set.  Non-numeric
+     values of 'GDBHISTSIZE' are ignored.  If SIZE is 'unlimited' or if
+     'GDBHISTSIZE' is either a negative number or the empty string, then
+     the number of commands GDB keeps in the history list is unlimited.
 
-`set history remove-duplicates COUNT'
-`set history remove-duplicates unlimited'
+'set history remove-duplicates COUNT'
+'set history remove-duplicates unlimited'
      Control the removal of duplicate history entries in the command
-     history list.  If COUNT is non-zero, GDB will look back at the
-     last COUNT history entries and remove the first entry that is a
+     history list.  If COUNT is non-zero, GDB will look back at the last
+     COUNT history entries and remove the first entry that is a
      duplicate of the current entry being added to the command history
-     list.  If COUNT is `unlimited' then this lookbehind is unbounded.
+     list.  If COUNT is 'unlimited' then this lookbehind is unbounded.
      If COUNT is 0, then removal of duplicate history entries is
      disabled.
 
      Only history entries added during the current session are
      considered for removal.  This option is set to 0 by default.
 
-
-   History expansion assigns special meaning to the character `!'.
+   History expansion assigns special meaning to the character '!'.
 *Note Event Designators::, for more details.
 
-   Since `!' is also the logical not operator in C, history expansion
-is off by default. If you decide to enable history expansion with the
-`set history expansion on' command, you may sometimes need to follow
-`!' (when it is used as logical not, in an expression) with a space or
-a tab to prevent it from being expanded.  The readline history
-facilities do not attempt substitution on the strings `!=' and `!(',
-even when history expansion is enabled.
+   Since '!' is also the logical not operator in C, history expansion is
+off by default.  If you decide to enable history expansion with the 'set
+history expansion on' command, you may sometimes need to follow '!'
+(when it is used as logical not, in an expression) with a space or a tab
+to prevent it from being expanded.  The readline history facilities do
+not attempt substitution on the strings '!=' and '!(', even when history
+expansion is enabled.
 
    The commands to control history expansion are:
 
-`set history expansion on'
-`set history expansion'
+'set history expansion on'
+'set history expansion'
      Enable history expansion.  History expansion is off by default.
 
-`set history expansion off'
+'set history expansion off'
      Disable history expansion.
 
-`show history'
-`show history filename'
-`show history save'
-`show history size'
-`show history expansion'
+'show history'
+'show history filename'
+'show history save'
+'show history size'
+'show history expansion'
      These commands display the state of the GDB history parameters.
-     `show history' by itself displays all four states.
+     'show history' by itself displays all four states.
 
-`show commands'
+'show commands'
      Display the last ten commands in the command history.
 
-`show commands N'
+'show commands N'
      Print ten commands centered on command number N.
 
-`show commands +'
+'show commands +'
      Print ten commands just after the commands last printed.
 
 
@@ -5011,43 +4763,42 @@ File: gdb.info,  Node: Screen Size,  Nex
 Certain commands to GDB may produce large amounts of information output
 to the screen.  To help you read all of it, GDB pauses and asks you for
 input at the end of each page of output.  Type <RET> when you want to
-continue the output, or `q' to discard the remaining output.  Also, the
-screen width setting determines when to wrap lines of output.
-Depending on what is being printed, GDB tries to break the line at a
-readable place, rather than simply letting it overflow onto the
-following line.
+continue the output, or 'q' to discard the remaining output.  Also, the
+screen width setting determines when to wrap lines of output.  Depending
+on what is being printed, GDB tries to break the line at a readable
+place, rather than simply letting it overflow onto the following line.
 
    Normally GDB knows the size of the screen from the terminal driver
 software.  For example, on Unix GDB uses the termcap data base together
-with the value of the `TERM' environment variable and the `stty rows'
-and `stty cols' settings.  If this is not correct, you can override it
-with the `set height' and `set width' commands:
-
-`set height LPP'
-`set height unlimited'
-`show height'
-`set width CPL'
-`set width unlimited'
-`show width'
-     These `set' commands specify a screen height of LPP lines and a
-     screen width of CPL characters.  The associated `show' commands
+with the value of the 'TERM' environment variable and the 'stty rows'
+and 'stty cols' settings.  If this is not correct, you can override it
+with the 'set height' and 'set width' commands:
+
+'set height LPP'
+'set height unlimited'
+'show height'
+'set width CPL'
+'set width unlimited'
+'show width'
+     These 'set' commands specify a screen height of LPP lines and a
+     screen width of CPL characters.  The associated 'show' commands
      display the current settings.
 
-     If you specify a height of either `unlimited' or zero lines, GDB
+     If you specify a height of either 'unlimited' or zero lines, GDB
      does not pause during output no matter how long the output is.
      This is useful if output is to a file or to an editor buffer.
 
-     Likewise, you can specify `set width unlimited' or `set width 0'
-     to prevent GDB from wrapping its output.
+     Likewise, you can specify 'set width unlimited' or 'set width 0' to
+     prevent GDB from wrapping its output.
 
-`set pagination on'
-`set pagination off'
+'set pagination on'
+'set pagination off'
      Turn the output pagination on or off; the default is on.  Turning
-     pagination off is the alternative to `set height unlimited'.  Note
-     that running GDB with the `--batch' option (*note -batch: Mode
+     pagination off is the alternative to 'set height unlimited'.  Note
+     that running GDB with the '--batch' option (*note -batch: Mode
      Options.) also automatically disables pagination.
 
-`show pagination'
+'show pagination'
      Show the current pagination mode.
 
 
@@ -5056,50 +4807,48 @@ File: gdb.info,  Node: Numbers,  Next: A
 22.5 Numbers
 ============
 
-You can always enter numbers in octal, decimal, or hexadecimal in GDB
-by the usual conventions: octal numbers begin with `0', decimal numbers
-end with `.', and hexadecimal numbers begin with `0x'.  Numbers that
-neither begin with `0' or `0x', nor end with a `.' are, by default,
-entered in base 10; likewise, the default display for numbers--when no
-particular format is specified--is base 10.  You can change the default
-base for both input and output with the commands described below.
-
-`set input-radix BASE'
-     Set the default base for numeric input.  Supported choices for
-     BASE are decimal 8, 10, or 16.  The base must itself be specified
-     either unambiguously or using the current input radix; for
-     example, any of
+You can always enter numbers in octal, decimal, or hexadecimal in GDB by
+the usual conventions: octal numbers begin with '0', decimal numbers end
+with '.', and hexadecimal numbers begin with '0x'.  Numbers that neither
+begin with '0' or '0x', nor end with a '.' are, by default, entered in
+base 10; likewise, the default display for numbers--when no particular
+format is specified--is base 10.  You can change the default base for
+both input and output with the commands described below.
+
+'set input-radix BASE'
+     Set the default base for numeric input.  Supported choices for BASE
+     are decimal 8, 10, or 16.  The base must itself be specified either
+     unambiguously or using the current input radix; for example, any of
 
           set input-radix 012
           set input-radix 10.
           set input-radix 0xa
 
-     sets the input base to decimal.  On the other hand, `set
-     input-radix 10' leaves the input radix unchanged, no matter what
-     it was, since `10', being without any leading or trailing signs of
-     its base, is interpreted in the current radix.  Thus, if the
-     current radix is 16, `10' is interpreted in hex, i.e. as 16
-     decimal, which doesn't change the radix.
+     sets the input base to decimal.  On the other hand, 'set
+     input-radix 10' leaves the input radix unchanged, no matter what it
+     was, since '10', being without any leading or trailing signs of its
+     base, is interpreted in the current radix.  Thus, if the current
+     radix is 16, '10' is interpreted in hex, i.e. as 16 decimal, which
+     doesn't change the radix.
 
-`set output-radix BASE'
+'set output-radix BASE'
      Set the default base for numeric display.  Supported choices for
      BASE are decimal 8, 10, or 16.  The base must itself be specified
      either unambiguously or using the current input radix.
 
-`show input-radix'
+'show input-radix'
      Display the current default base for numeric input.
 
-`show output-radix'
+'show output-radix'
      Display the current default base for numeric display.
 
-`set radix [BASE]'
-`show radix'
+'set radix [BASE]'
+'show radix'
      These commands set and show the default base for both input and
-     output of numbers.  `set radix' sets the radix of input and output
+     output of numbers.  'set radix' sets the radix of input and output
      to the same base; without an argument, it resets the radix back to
      its default value of 10.
 
-
 
 File: gdb.info,  Node: ABI,  Next: Auto-loading,  Prev: Numbers,  Up: Controlling GDB
 
@@ -5114,68 +4863,67 @@ ABI.
    One GDB configuration can debug binaries for multiple operating
 system targets, either via remote debugging or native emulation.  GDB
 will autodetect the "OS ABI" (Operating System ABI) in use, but you can
-override its conclusion using the `set osabi' command.  One example
+override its conclusion using the 'set osabi' command.  One example
 where this is useful is in debugging of binaries which use an alternate
 C library (e.g. UCLIBC for GNU/Linux) which does not have the same
 identifying marks that the standard C library for your platform
 provides.
 
    When GDB is debugging the AArch64 architecture, it provides a
-"Newlib" OS ABI.  This is useful for handling `setjmp' and `longjmp'
-when debugging binaries that use the NEWLIB C library.  The "Newlib" OS
-ABI can be selected by `set osabi Newlib'.
+"Newlib" OS ABI. This is useful for handling 'setjmp' and 'longjmp' when
+debugging binaries that use the NEWLIB C library.  The "Newlib" OS ABI
+can be selected by 'set osabi Newlib'.
 
-`show osabi'
+'show osabi'
      Show the OS ABI currently in use.
 
-`set osabi'
+'set osabi'
      With no argument, show the list of registered available OS ABI's.
 
-`set osabi ABI'
+'set osabi ABI'
      Set the current OS ABI to ABI.
 
-   Generally, the way that an argument of type `float' is passed to a
+   Generally, the way that an argument of type 'float' is passed to a
 function depends on whether the function is prototyped.  For a
-prototyped (i.e. ANSI/ISO style) function, `float' arguments are passed
-unchanged, according to the architecture's convention for `float'.  For
-unprototyped (i.e. K&R style) functions, `float' arguments are first
-promoted to type `double' and then passed.
+prototyped (i.e. ANSI/ISO style) function, 'float' arguments are passed
+unchanged, according to the architecture's convention for 'float'.  For
+unprototyped (i.e. K&R style) functions, 'float' arguments are first
+promoted to type 'double' and then passed.
 
    Unfortunately, some forms of debug information do not reliably
-indicate whether a function is prototyped.  If GDB calls a function
-that is not marked as prototyped, it consults `set
-coerce-float-to-double'.
-
-`set coerce-float-to-double'
-`set coerce-float-to-double on'
-     Arguments of type `float' will be promoted to `double' when passed
+indicate whether a function is prototyped.  If GDB calls a function that
+is not marked as prototyped, it consults 'set coerce-float-to-double'.
+
+'set coerce-float-to-double'
+'set coerce-float-to-double on'
+     Arguments of type 'float' will be promoted to 'double' when passed
      to an unprototyped function.  This is the default setting.
 
-`set coerce-float-to-double off'
-     Arguments of type `float' will be passed directly to unprototyped
+'set coerce-float-to-double off'
+     Arguments of type 'float' will be passed directly to unprototyped
      functions.
 
-`show coerce-float-to-double'
-     Show the current setting of promoting `float' to `double'.
+'show coerce-float-to-double'
+     Show the current setting of promoting 'float' to 'double'.
 
    GDB needs to know the ABI used for your program's C++ objects.  The
 correct C++ ABI depends on which C++ compiler was used to build your
-application.  GDB only fully supports programs with a single C++ ABI;
-if your program contains code using multiple C++ ABI's or if GDB can
-not identify your program's ABI correctly, you can tell GDB which ABI
-to use.  Currently supported ABI's include "gnu-v2", for `g++' versions
-before 3.0, "gnu-v3", for `g++' versions 3.0 and later, and "hpaCC" for
+application.  GDB only fully supports programs with a single C++ ABI; if
+your program contains code using multiple C++ ABI's or if GDB can not
+identify your program's ABI correctly, you can tell GDB which ABI to
+use.  Currently supported ABI's include "gnu-v2", for 'g++' versions
+before 3.0, "gnu-v3", for 'g++' versions 3.0 and later, and "hpaCC" for
 the HP ANSI C++ compiler.  Other C++ compilers may use the "gnu-v2" or
 "gnu-v3" ABI's as well.  The default setting is "auto".
 
-`show cp-abi'
+'show cp-abi'
      Show the C++ ABI currently in use.
 
-`set cp-abi'
+'set cp-abi'
      With no argument, show the list of supported C++ ABI's.
 
-`set cp-abi ABI'
-`set cp-abi auto'
+'set cp-abi ABI'
+'set cp-abi auto'
      Set the current C++ ABI to ABI, or return to automatic detection.
 
 
@@ -5193,26 +4941,26 @@ untrusted sources).
 
 * Menu:
 
-* Init File in the Current Directory:: `set/show/info auto-load local-gdbinit'
-* libthread_db.so.1 file::             `set/show/info auto-load libthread-db'
+* Init File in the Current Directory:: 'set/show/info auto-load local-gdbinit'
+* libthread_db.so.1 file::             'set/show/info auto-load libthread-db'
 
-* Auto-loading safe path::             `set/show/info auto-load safe-path'
-* Auto-loading verbose mode::          `set/show debug auto-load'
+* Auto-loading safe path::             'set/show/info auto-load safe-path'
+* Auto-loading verbose mode::          'set/show debug auto-load'
 
    There are various kinds of files GDB can automatically load.  In
 addition to these files, GDB supports auto-loading code written in
 various extension languages.  *Note Auto-loading extensions::.
 
    Note that loading of these associated files (including the local
-`.gdbinit' file) requires accordingly configured `auto-load safe-path'
+'.gdbinit' file) requires accordingly configured 'auto-load safe-path'
 (*note Auto-loading safe path::).
 
    For these reasons, GDB includes commands and options to let you
 control when to auto-load files and which files should be auto-loaded.
 
-`set auto-load off'
-     Globally disable loading of all auto-loaded files.  You may want
-     to use this command with the `-iex' option (*note Option
+'set auto-load off'
+     Globally disable loading of all auto-loaded files.  You may want to
+     use this command with the '-iex' option (*note Option
      -init-eval-command::) such as:
           $ gdb -iex "set auto-load off" untrusted-executable corefile
 
@@ -5220,11 +4968,11 @@ control when to auto-load files and whic
      and init files from your home directory (*note Home Directory Init
      File::) still get read (as they come from generally trusted
      directories).  To prevent GDB from auto-loading even those init
-     files, use the `-nx' option (*note Mode Options::), in addition to
-     `set auto-load no'.
+     files, use the '-nx' option (*note Mode Options::), in addition to
+     'set auto-load no'.
 
-`show auto-load'
-     Show whether auto-loading of each specific `auto-load' file(s) is
+'show auto-load'
+     Show whether auto-loading of each specific 'auto-load' file(s) is
      enabled or disabled.
 
           (gdb) show auto-load
@@ -5238,8 +4986,8 @@ control when to auto-load files and whic
           scripts-directory:  List of directories from which to load auto-loaded scripts
                               is $debugdir:$datadir/auto-load.
 
-`info auto-load'
-     Print whether each specific `auto-load' file(s) have been
+'info auto-load'
+     Print whether each specific 'auto-load' file(s) have been
      auto-loaded or not.
 
           (gdb) info auto-load
@@ -5256,34 +5004,32 @@ control when to auto-load files and whic
    These are GDB control commands for the auto-loading:
 
 *Note set auto-load off::.           Disable auto-loading globally.
-*Note show auto-load::.              Show setting of all kinds of files.
+*Note show auto-load::.              Show setting of all kinds of
+                                     files.
 *Note info auto-load::.              Show state of all kinds of files.
 *Note set auto-load gdb-scripts::.   Control for GDB command scripts.
-*Note show auto-load gdb-scripts::.  Show setting of GDB command scripts.
+*Note show auto-load gdb-scripts::.  Show setting of GDB command
+                                     scripts.
 *Note info auto-load gdb-scripts::.  Show state of GDB command scripts.
-*Note set auto-load                  Control for GDB Python scripts.
-python-scripts::.                    
-*Note show auto-load                 Show setting of GDB Python scripts.
-python-scripts::.                    
-*Note info auto-load                 Show state of GDB Python scripts.
-python-scripts::.                    
+*Note set auto-load python-scripts::.Control for GDB Python scripts.
+*Note show auto-load python-scripts::.Show setting of GDB Python
+                                     scripts.
+*Note info auto-load python-scripts::.Show state of GDB Python scripts.
 *Note set auto-load guile-scripts::. Control for GDB Guile scripts.
-*Note show auto-load                 Show setting of GDB Guile scripts.
-guile-scripts::.                     
-*Note info auto-load                 Show state of GDB Guile scripts.
-guile-scripts::.                     
-*Note set auto-load                  Control for GDB auto-loaded scripts
-scripts-directory::.                 location.
-*Note show auto-load                 Show GDB auto-loaded scripts
-scripts-directory::.                 location.
-*Note                                Add directory for auto-loaded
-add-auto-load-scripts-directory::.   scripts location list.
+*Note show auto-load guile-scripts::.Show setting of GDB Guile scripts.
+*Note info auto-load guile-scripts::.Show state of GDB Guile scripts.
+*Note set auto-load scripts-directory::.Control for GDB auto-loaded
+                                     scripts location.
+*Note show auto-load scripts-directory::.Show GDB auto-loaded scripts
+                                     location.
+*Note add-auto-load-scripts-directory::.Add directory for auto-loaded
+                                     scripts location list.
 *Note set auto-load local-gdbinit::. Control for init file in the
                                      current directory.
-*Note show auto-load                 Show setting of init file in the
-local-gdbinit::.                     current directory.
-*Note info auto-load                 Show state of init file in the
-local-gdbinit::.                     current directory.
+*Note show auto-load local-gdbinit::.Show setting of init file in the
+                                     current directory.
+*Note info auto-load local-gdbinit::.Show state of init file in the
+                                     current directory.
 *Note set auto-load libthread-db::.  Control for thread debugging
                                      library.
 *Note show auto-load libthread-db::. Show setting of thread debugging
@@ -5294,8 +5040,8 @@ local-gdbinit::.                     cur
                                      automatic loading.
 *Note show auto-load safe-path::.    Show directories trusted for
                                      automatic loading.
-*Note add-auto-load-safe-path::.     Add directory trusted for automatic
-                                     loading.
+*Note add-auto-load-safe-path::.     Add directory trusted for
+                                     automatic loading.
 
 
 File: gdb.info,  Node: Init File in the Current Directory,  Next: libthread_db.so.1 file,  Up: Auto-loading
@@ -5303,23 +5049,23 @@ File: gdb.info,  Node: Init File in the 
 22.7.1 Automatically loading init file in the current directory
 ---------------------------------------------------------------
 
-By default, GDB reads and executes the canned sequences of commands
-from init file (if any) in the current working directory, see *note
-Init File in the Current Directory during Startup::.
+By default, GDB reads and executes the canned sequences of commands from
+init file (if any) in the current working directory, see *note Init File
+in the Current Directory during Startup::.
 
-   Note that loading of this local `.gdbinit' file also requires
-accordingly configured `auto-load safe-path' (*note Auto-loading safe
+   Note that loading of this local '.gdbinit' file also requires
+accordingly configured 'auto-load safe-path' (*note Auto-loading safe
 path::).
 
-`set auto-load local-gdbinit [on|off]'
+'set auto-load local-gdbinit [on|off]'
      Enable or disable the auto-loading of canned sequences of commands
      (*note Sequences::) found in init file in the current directory.
 
-`show auto-load local-gdbinit'
-     Show whether auto-loading of canned sequences of commands from
-     init file in the current directory is enabled or disabled.
+'show auto-load local-gdbinit'
+     Show whether auto-loading of canned sequences of commands from init
+     file in the current directory is enabled or disabled.
 
-`info auto-load local-gdbinit'
+'info auto-load local-gdbinit'
      Print whether canned sequences of commands from init file in the
      current directory have been auto-loaded.
 
@@ -5334,26 +5080,25 @@ This feature is currently present only o
    GDB reads in some cases thread debugging library from places specific
 to the inferior (*note set libthread-db-search-path::).
 
-   The special `libthread-db-search-path' entry `$sdir' is processed
-without checking this `set auto-load libthread-db' switch as system
+   The special 'libthread-db-search-path' entry '$sdir' is processed
+without checking this 'set auto-load libthread-db' switch as system
 libraries have to be trusted in general.  In all other cases of
-`libthread-db-search-path' entries GDB checks first if `set auto-load
+'libthread-db-search-path' entries GDB checks first if 'set auto-load
 libthread-db' is enabled before trying to open such thread debugging
 library.
 
-   Note that loading of this debugging library also requires
-accordingly configured `auto-load safe-path' (*note Auto-loading safe
-path::).
+   Note that loading of this debugging library also requires accordingly
+configured 'auto-load safe-path' (*note Auto-loading safe path::).
 
-`set auto-load libthread-db [on|off]'
+'set auto-load libthread-db [on|off]'
      Enable or disable the auto-loading of inferior specific thread
      debugging library.
 
-`show auto-load libthread-db'
+'show auto-load libthread-db'
      Show whether auto-loading of inferior specific thread debugging
      library is enabled or disabled.
 
-`info auto-load libthread-db'
+'info auto-load libthread-db'
      Print the list of all loaded inferior specific thread debugging
      libraries and for each such library print list of inferior PIDs
      using it.
@@ -5366,7 +5111,7 @@ File: gdb.info,  Node: Auto-loading safe
 
 As the files of inferior can come from untrusted source (such as
 submitted by an application user) GDB does not always load any files
-automatically.  GDB provides the `set auto-load safe-path' setting to
+automatically.  GDB provides the 'set auto-load safe-path' setting to
 list directories trusted for loading files not explicitly requested by
 user.  Each directory can also be a shell wildcard pattern.
 
@@ -5390,65 +5135,64 @@ like this:
    The list of trusted directories is controlled by the following
 commands:
 
-`set auto-load safe-path [DIRECTORIES]'
+'set auto-load safe-path [DIRECTORIES]'
      Set the list of directories (and their subdirectories) trusted for
      automatic loading and execution of scripts.  You can also enter a
-     specific trusted file.  Each directory can also be a shell
-     wildcard pattern; wildcards do not match directory separator - see
-     `FNM_PATHNAME' for system function `fnmatch' (*note fnmatch:
-     (libc)Wildcard Matching.).  If you omit DIRECTORIES, `auto-load
+     specific trusted file.  Each directory can also be a shell wildcard
+     pattern; wildcards do not match directory separator - see
+     'FNM_PATHNAME' for system function 'fnmatch' (*note fnmatch:
+     (libc)Wildcard Matching.).  If you omit DIRECTORIES, 'auto-load
      safe-path' will be reset to its default value as specified during
      GDB compilation.
 
-     The list of directories uses path separator (`:' on GNU and Unix
-     systems, `;' on MS-Windows and MS-DOS) to separate directories,
-     similarly to the `PATH' environment variable.
+     The list of directories uses path separator (':' on GNU and Unix
+     systems, ';' on MS-Windows and MS-DOS) to separate directories,
+     similarly to the 'PATH' environment variable.
 
-`show auto-load safe-path'
+'show auto-load safe-path'
      Show the list of directories trusted for automatic loading and
      execution of scripts.
 
-`add-auto-load-safe-path'
+'add-auto-load-safe-path'
      Add an entry (or list of entries) to the list of directories
      trusted for automatic loading and execution of scripts.  Multiple
      entries may be delimited by the host platform path separator in
      use.
 
-   This variable defaults to what `--with-auto-load-dir' has been
-configured to (*note with-auto-load-dir::).  `$debugdir' and `$datadir'
+   This variable defaults to what '--with-auto-load-dir' has been
+configured to (*note with-auto-load-dir::).  '$debugdir' and '$datadir'
 substitution applies the same as for *note set auto-load
-scripts-directory::.  The default `set auto-load safe-path' value can
-be also overriden by GDB configuration option
-`--with-auto-load-safe-path'.
+scripts-directory::.  The default 'set auto-load safe-path' value can be
+also overriden by GDB configuration option '--with-auto-load-safe-path'.
 
-   Setting this variable to `/' disables this security protection,
+   Setting this variable to '/' disables this security protection,
 corresponding GDB configuration option is
-`--without-auto-load-safe-path'.  This variable is supposed to be set
-to the system directories writable by the system superuser only.  Users
-can add their source directories in init files in their home
-directories (*note Home Directory Init File::).  See also deprecated
-init file in the current directory (*note Init File in the Current
-Directory during Startup::).
+'--without-auto-load-safe-path'.  This variable is supposed to be set to
+the system directories writable by the system superuser only.  Users can
+add their source directories in init files in their home directories
+(*note Home Directory Init File::).  See also deprecated init file in
+the current directory (*note Init File in the Current Directory during
+Startup::).
 
    To force GDB to load the files it declined to load in the previous
 example, you could use one of the following ways:
 
-`~/.gdbinit': `add-auto-load-safe-path ~/src/gdb'
+'~/.gdbinit': 'add-auto-load-safe-path ~/src/gdb'
      Specify this trusted directory (or a file) as additional component
      of the list.  You have to specify also any existing directories
-     displayed by by `show auto-load safe-path' (such as `/usr:/bin' in
+     displayed by by 'show auto-load safe-path' (such as '/usr:/bin' in
      this example).
 
-`gdb -iex "set auto-load safe-path /usr:/bin:~/src/gdb" ...'
+'gdb -iex "set auto-load safe-path /usr:/bin:~/src/gdb" ...'
      Specify this directory as in the previous case but just for a
      single GDB session.
 
-`gdb -iex "set auto-load safe-path /" ...'
-     Disable auto-loading safety for a single GDB session.  This
-     assumes all the files you debug during this GDB session will come
-     from trusted sources.
+'gdb -iex "set auto-load safe-path /" ...'
+     Disable auto-loading safety for a single GDB session.  This assumes
+     all the files you debug during this GDB session will come from
+     trusted sources.
 
-`./configure --without-auto-load-safe-path'
+'./configure --without-auto-load-safe-path'
      During compilation of GDB you may disable any auto-loading safety.
      This assumes all the files you will ever debug with this GDB come
      from trusted sources.
@@ -5456,18 +5200,18 @@ example, you could use one of the follow
    On the other hand you can also explicitly forbid automatic files
 loading which also suppresses any such warning messages:
 
-`gdb -iex "set auto-load no" ...'
+'gdb -iex "set auto-load no" ...'
      You can use GDB command-line option for a single GDB session.
 
-`~/.gdbinit': `set auto-load no'
+'~/.gdbinit': 'set auto-load no'
      Disable auto-loading globally for the user (*note Home Directory
      Init File::).  While it is improbable, you could also use system
      init file instead (*note System-wide configuration::).
 
    This setting applies to the file names as entered by user.  If no
 entry matches GDB tries as a last resort to also resolve all the file
-names into their canonical form (typically resolving symbolic links)
-and compare the entries again.  GDB already canonicalizes most of the
+names into their canonical form (typically resolving symbolic links) and
+compare the entries again.  GDB already canonicalizes most of the
 filenames on its own before starting the comparison so a canonical form
 of directories is recommended to be entered.
 
@@ -5498,10 +5242,10 @@ up.
      warning: File "/tmp/true-gdb.gdb" auto-loading has been declined
               by your `auto-load safe-path' set to "/usr:/opt".
 
-`set debug auto-load [on|off]'
+'set debug auto-load [on|off]'
      Set whether to print the filenames attempted to be auto-loaded.
 
-`show debug auto-load'
+'show debug auto-load'
      Show whether printing of the filenames attempted to be auto-loaded
      is turned on or off.
 
@@ -5512,38 +5256,37 @@ File: gdb.info,  Node: Messages/Warnings
 ===================================
 
 By default, GDB is silent about its inner workings.  If you are running
-on a slow machine, you may want to use the `set verbose' command.  This
+on a slow machine, you may want to use the 'set verbose' command.  This
 makes GDB tell you when it does a lengthy internal operation, so you
 will not think it has crashed.
 
-   Currently, the messages controlled by `set verbose' are those which
+   Currently, the messages controlled by 'set verbose' are those which
 announce that the symbol table for a source file is being read; see
-`symbol-file' in *note Commands to Specify Files: Files.
+'symbol-file' in *note Commands to Specify Files: Files.
 
-`set verbose on'
+'set verbose on'
      Enables GDB output of certain informational messages.
 
-`set verbose off'
+'set verbose off'
      Disables GDB output of certain informational messages.
 
-`show verbose'
-     Displays whether `set verbose' is on or off.
+'show verbose'
+     Displays whether 'set verbose' is on or off.
 
    By default, if GDB encounters bugs in the symbol table of an object
 file, it is silent; but if you are debugging a compiler, you may find
 this information useful (*note Errors Reading Symbol Files: Symbol
 Errors.).
 
-`set complaints LIMIT'
+'set complaints LIMIT'
      Permits GDB to output LIMIT complaints about each type of unusual
      symbols before becoming silent about the problem.  Set LIMIT to
      zero to suppress all complaints; set it to a large number to
      prevent complaints from being suppressed.
 
-`show complaints'
+'show complaints'
      Displays how many symbol complaints GDB is permitted to produce.
 
-
    By default, GDB is cautious, and asks what sometimes seems to be a
 lot of stupid questions to confirm certain commands.  For example, if
 you try to run a program which is already running:
@@ -5555,30 +5298,27 @@ you try to run a program which is alread
    If you are willing to unflinchingly face the consequences of your own
 commands, you can disable this "feature":
 
-`set confirm off'
+'set confirm off'
      Disables confirmation requests.  Note that running GDB with the
-     `--batch' option (*note -batch: Mode Options.) also automatically
+     '--batch' option (*note -batch: Mode Options.) also automatically
      disables confirmation requests.
 
-`set confirm on'
+'set confirm on'
      Enables confirmation requests (the default).
 
-`show confirm'
+'show confirm'
      Displays state of confirmation requests.
 
-
    If you need to debug user-defined commands or sourced files you may
 find it useful to enable "command tracing".  In this mode each command
-will be printed as it is executed, prefixed with one or more `+'
+will be printed as it is executed, prefixed with one or more '+'
 symbols, the quantity denoting the call depth of each command.
 
-`set trace-commands on'
+'set trace-commands on'
      Enable command tracing.
-
-`set trace-commands off'
+'set trace-commands off'
      Disable command tracing.
-
-`show trace-commands'
+'show trace-commands'
      Display the current state of command tracing.
 
 
@@ -5592,272 +5332,209 @@ GDB subsystems; normally these commands 
 maintainers, or when reporting a bug.  This section documents those
 commands.
 
-`set exec-done-display'
+'set exec-done-display'
      Turns on or off the notification of asynchronous commands'
-     completion.  When on, GDB will print a message when an
-     asynchronous command finishes its execution.  The default is off.  
-
-`show exec-done-display'
+     completion.  When on, GDB will print a message when an asynchronous
+     command finishes its execution.  The default is off.
+'show exec-done-display'
      Displays the current setting of asynchronous command completion
-     notification.  
-
-`set debug aarch64'
+     notification.
+'set debug aarch64'
      Turns on or off display of debugging messages related to ARM
-     AArch64.  The default is off.  
-
-`show debug aarch64'
-     Displays the current state of displaying debugging messages
-     related to ARM AArch64.  
-
-`set debug arch'
+     AArch64.  The default is off.
+'show debug aarch64'
+     Displays the current state of displaying debugging messages related
+     to ARM AArch64.
+'set debug arch'
      Turns on or off display of gdbarch debugging info.  The default is
      off
-
-`show debug arch'
+'show debug arch'
      Displays the current state of displaying gdbarch debugging info.
-
-`set debug aix-solib'
+'set debug aix-solib'
      Control display of debugging messages from the AIX shared library
      support module.  The default is off.
-
-`show debug aix-thread'
+'show debug aix-thread'
      Show the current state of displaying AIX shared library debugging
      messages.
-
-`set debug aix-thread'
+'set debug aix-thread'
      Display debugging messages about inner workings of the AIX thread
      module.
-
-`show debug aix-thread'
+'show debug aix-thread'
      Show the current state of AIX thread debugging info display.
-
-`set debug check-physname'
+'set debug check-physname'
      Check the results of the "physname" computation.  When reading
      DWARF debugging information for C++, GDB attempts to compute each
      entity's name.  GDB can do this computation in two different ways,
      depending on exactly what information is present.  When enabled,
      this setting causes GDB to compute the names both ways and display
      any discrepancies.
-
-`show debug check-physname'
+'show debug check-physname'
      Show the current state of "physname" checking.
-
-`set debug coff-pe-read'
+'set debug coff-pe-read'
      Control display of debugging messages related to reading of COFF/PE
      exported symbols.  The default is off.
-
-`show debug coff-pe-read'
-     Displays the current state of displaying debugging messages
-     related to reading of COFF/PE exported symbols.
-
-`set debug dwarf-die'
-     Dump DWARF DIEs after they are read in.  The value is the number
-     of nesting levels to print.  A value of zero turns off the display.
-
-`show debug dwarf-die'
+'show debug coff-pe-read'
+     Displays the current state of displaying debugging messages related
+     to reading of COFF/PE exported symbols.
+'set debug dwarf-die'
+     Dump DWARF DIEs after they are read in.  The value is the number of
+     nesting levels to print.  A value of zero turns off the display.
+'show debug dwarf-die'
      Show the current state of DWARF DIE debugging.
-
-`set debug dwarf-line'
+'set debug dwarf-line'
      Turns on or off display of debugging messages related to reading
      DWARF line tables.  The default is 0 (off).  A value of 1 provides
      basic information.  A value greater than 1 provides more verbose
      information.
-
-`show debug dwarf-line'
+'show debug dwarf-line'
      Show the current state of DWARF line table debugging.
-
-`set debug dwarf-read'
+'set debug dwarf-read'
      Turns on or off display of debugging messages related to reading
      DWARF debug info.  The default is 0 (off).  A value of 1 provides
      basic information.  A value greater than 1 provides more verbose
      information.
-
-`show debug dwarf-read'
+'show debug dwarf-read'
      Show the current state of DWARF reader debugging.
-
-`set debug displaced'
+'set debug displaced'
      Turns on or off display of GDB debugging info for the displaced
      stepping support.  The default is off.
-
-`show debug displaced'
-     Displays the current state of displaying GDB debugging info
-     related to displaced stepping.
-
-`set debug event'
+'show debug displaced'
+     Displays the current state of displaying GDB debugging info related
+     to displaced stepping.
+'set debug event'
      Turns on or off display of GDB event debugging info.  The default
      is off.
-
-`show debug event'
+'show debug event'
      Displays the current state of displaying GDB event debugging info.
-
-`set debug expression'
+'set debug expression'
      Turns on or off display of debugging info about GDB expression
      parsing.  The default is off.
-
-`show debug expression'
+'show debug expression'
      Displays the current state of displaying debugging info about GDB
      expression parsing.
-
-`set debug frame'
+'set debug fbsd-lwp'
+     Turns on or off debugging messages from the FreeBSD LWP debug
+     support.
+'show debug fbsd-lwp'
+     Show the current state of FreeBSD LWP debugging messages.
+'set debug frame'
      Turns on or off display of GDB frame debugging info.  The default
      is off.
-
-`show debug frame'
+'show debug frame'
      Displays the current state of displaying GDB frame debugging info.
-
-`set debug gnu-nat'
-     Turns on or off debugging messages from the GNU/Hurd debug support.
-
-`show debug gnu-nat'
+'set debug gnu-nat'
+     Turn on or off debugging messages from the GNU/Hurd debug support.
+'show debug gnu-nat'
      Show the current state of GNU/Hurd debugging messages.
-
-`set debug infrun'
+'set debug infrun'
      Turns on or off display of GDB debugging info for running the
-     inferior.  The default is off.  `infrun.c' contains GDB's runtime
+     inferior.  The default is off.  'infrun.c' contains GDB's runtime
      state machine used for implementing operations such as
      single-stepping the inferior.
-
-`show debug infrun'
+'show debug infrun'
      Displays the current state of GDB inferior debugging.
-
-`set debug jit'
-     Turns on or off debugging messages from JIT debug support.
-
-`show debug jit'
+'set debug jit'
+     Turn on or off debugging messages from JIT debug support.
+'show debug jit'
      Displays the current state of GDB JIT debugging.
-
-`set debug lin-lwp'
-     Turns on or off debugging messages from the Linux LWP debug
-     support.
-
-`show debug lin-lwp'
+'set debug lin-lwp'
+     Turn on or off debugging messages from the Linux LWP debug support.
+'show debug lin-lwp'
      Show the current state of Linux LWP debugging messages.
-
-`set debug linux-namespaces'
-     Turns on or off debugging messages from the Linux namespaces debug
+'set debug linux-namespaces'
+     Turn on or off debugging messages from the Linux namespaces debug
      support.
-
-`show debug linux-namespaces'
+'show debug linux-namespaces'
      Show the current state of Linux namespaces debugging messages.
-
-`set debug mach-o'
+'set debug mach-o'
      Control display of debugging messages related to Mach-O symbols
      processing.  The default is off.
-
-`show debug mach-o'
-     Displays the current state of displaying debugging messages
-     related to reading of COFF/PE exported symbols.
-
-`set debug notification'
-     Turns on or off debugging messages about remote async notification.
+'show debug mach-o'
+     Displays the current state of displaying debugging messages related
+     to reading of COFF/PE exported symbols.
+'set debug notification'
+     Turn on or off debugging messages about remote async notification.
      The default is off.
-
-`show debug notification'
+'show debug notification'
      Displays the current state of remote async notification debugging
      messages.
-
-`set debug observer'
+'set debug observer'
      Turns on or off display of GDB observer debugging.  This includes
      info such as the notification of observable events.
-
-`show debug observer'
+'show debug observer'
      Displays the current state of observer debugging.
-
-`set debug overload'
-     Turns on or off display of GDB C++ overload debugging info. This
+'set debug overload'
+     Turns on or off display of GDB C++ overload debugging info.  This
      includes info such as ranking of functions, etc.  The default is
      off.
-
-`show debug overload'
-     Displays the current state of displaying GDB C++ overload
-     debugging info.  
-
-`set debug parser'
+'show debug overload'
+     Displays the current state of displaying GDB C++ overload debugging
+     info.
+'set debug parser'
      Turns on or off the display of expression parser debugging output.
-     Internally, this sets the `yydebug' variable in the expression
+     Internally, this sets the 'yydebug' variable in the expression
      parser.  *Note Tracing Your Parser: (bison)Tracing, for details.
      The default is off.
-
-`show debug parser'
-     Show the current state of expression parser debugging.  
-
-`set debug remote'
+'show debug parser'
+     Show the current state of expression parser debugging.
+'set debug remote'
      Turns on or off display of reports on all packets sent back and
      forth across the serial line to the remote machine.  The info is
-     printed on the GDB standard output stream. The default is off.
-
-`show debug remote'
+     printed on the GDB standard output stream.  The default is off.
+'show debug remote'
      Displays the state of display of remote packets.
-
-`set debug serial'
-     Turns on or off display of GDB serial debugging info. The default
+'set debug serial'
+     Turns on or off display of GDB serial debugging info.  The default
      is off.
-
-`show debug serial'
+'show debug serial'
      Displays the current state of displaying GDB serial debugging info.
-
-`set debug solib-frv'
-     Turns on or off debugging messages for FR-V shared-library code.
-
-`show debug solib-frv'
+'set debug solib-frv'
+     Turn on or off debugging messages for FR-V shared-library code.
+'show debug solib-frv'
      Display the current state of FR-V shared-library code debugging
      messages.
-
-`set debug symbol-lookup'
+'set debug symbol-lookup'
      Turns on or off display of debugging messages related to symbol
      lookup.  The default is 0 (off).  A value of 1 provides basic
      information.  A value greater than 1 provides more verbose
      information.
-
-`show debug symbol-lookup'
+'show debug symbol-lookup'
      Show the current state of symbol lookup debugging messages.
-
-`set debug symfile'
+'set debug symfile'
      Turns on or off display of debugging messages related to symbol
      file functions.  The default is off.  *Note Files::.
-
-`show debug symfile'
+'show debug symfile'
      Show the current state of symbol file debugging messages.
-
-`set debug symtab-create'
+'set debug symtab-create'
      Turns on or off display of debugging messages related to symbol
      table creation.  The default is 0 (off).  A value of 1 provides
      basic information.  A value greater than 1 provides more verbose
      information.
-
-`show debug symtab-create'
+'show debug symtab-create'
      Show the current state of symbol table creation debugging.
-
-`set debug target'
-     Turns on or off display of GDB target debugging info. This info
+'set debug target'
+     Turns on or off display of GDB target debugging info.  This info
      includes what is going on at the target level of GDB, as it
-     happens. The default is 0.  Set it to 1 to track events, and to 2
+     happens.  The default is 0.  Set it to 1 to track events, and to 2
      to also track the value of large memory transfers.
-
-`show debug target'
+'show debug target'
      Displays the current state of displaying GDB target debugging info.
-
-`set debug timestamp'
+'set debug timestamp'
      Turns on or off display of timestamps with GDB debugging info.
      When enabled, seconds and microseconds are displayed before each
      debugging message.
-
-`show debug timestamp'
+'show debug timestamp'
      Displays the current state of displaying timestamps with GDB
      debugging info.
-
-`set debug varobj'
-     Turns on or off display of GDB variable object debugging info. The
+'set debug varobj'
+     Turns on or off display of GDB variable object debugging info.  The
      default is off.
-
-`show debug varobj'
+'show debug varobj'
      Displays the current state of displaying GDB variable object
      debugging info.
-
-`set debug xml'
-     Turns on or off debugging messages for built-in XML parsers.
-
-`show debug xml'
+'set debug xml'
+     Turn on or off debugging messages for built-in XML parsers.
+'show debug xml'
      Displays the current state of XML debugging messages.
 
 
@@ -5866,22 +5543,21 @@ File: gdb.info,  Node: Other Misc Settin
 22.10 Other Miscellaneous Settings
 ==================================
 
-`set interactive-mode'
-     If `on', forces GDB to assume that GDB was started in a terminal.
-     In practice, this means that GDB should wait for the user to
-     answer queries generated by commands entered at the command
-     prompt.  If `off', forces GDB to operate in the opposite mode, and
-     it uses the default answers to all queries.  If `auto' (the
-     default), GDB tries to determine whether its standard input is a
-     terminal, and works in interactive-mode if it is,
-     non-interactively otherwise.
+'set interactive-mode'
+     If 'on', forces GDB to assume that GDB was started in a terminal.
+     In practice, this means that GDB should wait for the user to answer
+     queries generated by commands entered at the command prompt.  If
+     'off', forces GDB to operate in the opposite mode, and it uses the
+     default answers to all queries.  If 'auto' (the default), GDB tries
+     to determine whether its standard input is a terminal, and works in
+     interactive-mode if it is, non-interactively otherwise.
 
      In the vast majority of cases, the debugger should be able to guess
      correctly which mode should be used.  But this setting can be
      useful in certain specific cases, such as running a MinGW GDB
      inside a cygwin window.
 
-`show interactive-mode'
+'show interactive-mode'
      Displays whether the debugger is operating in interactive mode or
      not.
 
@@ -5914,23 +5590,22 @@ treated as a GDB Command Files.  *Note C
    You can control how GDB evaluates these files with the following
 setting:
 
-`set script-extension off'
+'set script-extension off'
      All scripts are always evaluated as GDB Command Files.
 
-`set script-extension soft'
+'set script-extension soft'
      The debugger determines the scripting language based on filename
      extension.  If this scripting language is supported, GDB evaluates
      the script using that language.  Otherwise, it evaluates the file
      as a GDB Command File.
 
-`set script-extension strict'
+'set script-extension strict'
      The debugger determines the scripting language based on filename
      extension, and evaluates the script using that language.  If the
      language is not supported, then the evaluation fails.
 
-`show script-extension'
-     Display the current value of the `script-extension' option.
-
+'show script-extension'
+     Display the current value of the 'script-extension' option.
 
 
 File: gdb.info,  Node: Sequences,  Next: Python,  Up: Extending GDB
@@ -5957,10 +5632,10 @@ File: gdb.info,  Node: Define,  Next: Ho
 ----------------------------
 
 A "user-defined command" is a sequence of GDB commands to which you
-assign a new name as a command.  This is done with the `define'
-command.  User commands may accept up to 10 arguments separated by
+assign a new name as a command.  This is done with the 'define' command.
+User commands may accept an unlimited number of arguments separated by
 whitespace.  Arguments are accessed within the user command via
-`$arg0...$arg9'.  A trivial example:
+'$arg0...$argN'.  A trivial example:
 
      define adder
        print $arg0 + $arg1 + $arg2
@@ -5970,13 +5645,13 @@ To execute the command use:
 
      adder 1 2 3
 
-This defines the command `adder', which prints the sum of its three
+This defines the command 'adder', which prints the sum of its three
 arguments.  Note the arguments are text substitutions, so they may
 reference variables, use complex expressions, or even perform inferior
 functions calls.
 
-   In addition, `$argc' may be used to find out how many arguments have
-been passed.  This expands to a number in the range 0...10.
+   In addition, '$argc' may be used to find out how many arguments have
+been passed.
 
      define adder
        if $argc == 2
@@ -5987,51 +5662,63 @@ been passed.  This expands to a number i
        end
      end
 
-`define COMMANDNAME'
+   Combining with the 'eval' command (*note eval::) makes it easier to
+process a variable number of arguments:
+
+     define adder
+       set $i = 0
+       set $sum = 0
+       while $i < $argc
+         eval "set $sum = $sum + $arg%d", $i
+         set $i = $i + 1
+       end
+       print $sum
+     end
+
+'define COMMANDNAME'
      Define a command named COMMANDNAME.  If there is already a command
      by that name, you are asked to confirm that you want to redefine
-     it.  The argument COMMANDNAME may be a bare command name
-     consisting of letters, numbers, dashes, and underscores.  It may
-     also start with any predefined prefix command.  For example,
-     `define target my-target' creates a user-defined `target
-     my-target' command.
+     it.  The argument COMMANDNAME may be a bare command name consisting
+     of letters, numbers, dashes, and underscores.  It may also start
+     with any predefined prefix command.  For example, 'define target
+     my-target' creates a user-defined 'target my-target' command.
 
      The definition of the command is made up of other GDB command
-     lines, which are given following the `define' command.  The end of
-     these commands is marked by a line containing `end'.
+     lines, which are given following the 'define' command.  The end of
+     these commands is marked by a line containing 'end'.
 
-`document COMMANDNAME'
+'document COMMANDNAME'
      Document the user-defined command COMMANDNAME, so that it can be
-     accessed by `help'.  The command COMMANDNAME must already be
+     accessed by 'help'.  The command COMMANDNAME must already be
      defined.  This command reads lines of documentation just as
-     `define' reads the lines of the command definition, ending with
-     `end'.  After the `document' command is finished, `help' on command
+     'define' reads the lines of the command definition, ending with
+     'end'.  After the 'document' command is finished, 'help' on command
      COMMANDNAME displays the documentation you have written.
 
-     You may use the `document' command again to change the
-     documentation of a command.  Redefining the command with `define'
+     You may use the 'document' command again to change the
+     documentation of a command.  Redefining the command with 'define'
      does not change the documentation.
 
-`dont-repeat'
+'dont-repeat'
      Used inside a user-defined command, this tells GDB that this
      command should not be repeated when the user hits <RET> (*note
      repeat last command: Command Syntax.).
 
-`help user-defined'
+'help user-defined'
      List all user-defined commands and all python commands defined in
-     class COMAND_USER.  The first line of the documentation or
-     docstring is included (if any).
+     class COMAND_USER. The first line of the documentation or docstring
+     is included (if any).
 
-`show user'
-`show user COMMANDNAME'
+'show user'
+'show user COMMANDNAME'
      Display the GDB commands used to define COMMANDNAME (but not its
      documentation).  If no COMMANDNAME is given, display the
      definitions for all user-defined commands.  This does not work for
      user-defined python commands.
 
-`show max-user-call-depth'
-`set max-user-call-depth'
-     The value of `max-user-call-depth' controls how many recursion
+'show max-user-call-depth'
+'set max-user-call-depth'
+     The value of 'max-user-call-depth' controls how many recursion
      levels are allowed in user-defined commands before GDB suspects an
      infinite recursion and aborts the command.  This does not apply to
      user-defined python commands.
@@ -6055,13 +5742,13 @@ File: gdb.info,  Node: Hooks,  Next: Com
 ---------------------------------
 
 You may define "hooks", which are a special kind of user-defined
-command.  Whenever you run the command `foo', if the user-defined
-command `hook-foo' exists, it is executed (with no arguments) before
+command.  Whenever you run the command 'foo', if the user-defined
+command 'hook-foo' exists, it is executed (with no arguments) before
 that command.
 
    A hook may also be defined which is run after the command you
-executed.  Whenever you run the command `foo', if the user-defined
-command `hookpost-foo' exists, it is executed (with no arguments) after
+executed.  Whenever you run the command 'foo', if the user-defined
+command 'hookpost-foo' exists, it is executed (with no arguments) after
 that command.  Post-execution hooks may exist simultaneously with
 pre-execution hooks, for the same command.
 
@@ -6069,12 +5756,12 @@ pre-execution hooks, for the same comman
 occurs, the hook is not re-executed, thereby avoiding infinite
 recursion.
 
-   In addition, a pseudo-command, `stop' exists.  Defining
-(`hook-stop') makes the associated commands execute every time
-execution stops in your program: before breakpoint commands are run,
-displays are printed, or the stack frame is printed.
+   In addition, a pseudo-command, 'stop' exists.  Defining ('hook-stop')
+makes the associated commands execute every time execution stops in your
+program: before breakpoint commands are run, displays are printed, or
+the stack frame is printed.
 
-   For example, to ignore `SIGALRM' signals while single-stepping, but
+   For example, to ignore 'SIGALRM' signals while single-stepping, but
 treat them normally during normal execution, you could define:
 
      define hook-stop
@@ -6089,7 +5776,7 @@ treat them normally during normal execut
      handle SIGALRM pass
      end
 
-   As a further example, to hook at the beginning and end of the `echo'
+   As a further example, to hook at the beginning and end of the 'echo'
 command, and to add extra text to the beginning and end of the message,
 you could define:
 
@@ -6105,19 +5792,19 @@ you could define:
      <<<---Hello World--->>>
      (gdb)
 
-   You can define a hook for any single-word command in GDB, but not
-for command aliases; you should define a hook for the basic command
-name, e.g.  `backtrace' rather than `bt'.  You can hook a multi-word
-command by adding `hook-' or `hookpost-' to the last word of the
-command, e.g.  `define target hook-remote' to add a hook to `target
-remote'.
+
+   You can define a hook for any single-word command in GDB, but not for
+command aliases; you should define a hook for the basic command name,
+e.g. 'backtrace' rather than 'bt'.  You can hook a multi-word command by
+adding 'hook-' or 'hookpost-' to the last word of the command, e.g.
+'define target hook-remote' to add a hook to 'target remote'.
 
    If an error occurs during the execution of your hook, execution of
 GDB commands stops and GDB issues a prompt (before the command that you
 actually typed had a chance to run).
 
    If you try to define a hook which does not match any known command,
-you get a warning from the `define' command.
+you get a warning from the 'define' command.
 
 
 File: gdb.info,  Node: Command Files,  Next: Output,  Prev: Hooks,  Up: Sequences
@@ -6126,17 +5813,17 @@ File: gdb.info,  Node: Command Files,  N
 --------------------
 
 A command file for GDB is a text file made of lines that are GDB
-commands.  Comments (lines starting with `#') may also be included.  An
+commands.  Comments (lines starting with '#') may also be included.  An
 empty line in a command file does nothing; it does not mean to repeat
 the last command, as it would from the terminal.
 
-   You can request the execution of a command file with the `source'
-command.  Note that the `source' command is also used to evaluate
+   You can request the execution of a command file with the 'source'
+command.  Note that the 'source' command is also used to evaluate
 scripts that are not Command Files.  The exact behavior can be
-configured using the `script-extension' setting.  *Note Extending GDB:
+configured using the 'script-extension' setting.  *Note Extending GDB:
 Extending GDB.
 
-`source [-s] [-v] FILENAME'
+'source [-s] [-v] FILENAME'
      Execute the command file FILENAME.
 
    The lines in a command file are generally executed sequentially,
@@ -6146,26 +5833,26 @@ executed.  An error in any command termi
 file and control is returned to the console.
 
    GDB first searches for FILENAME in the current directory.  If the
-file is not found there, and FILENAME does not specify a directory,
-then GDB also looks for the file on the source search path (specified
-with the `directory' command); except that `$cdir' is not searched
-because the compilation directory is not relevant to scripts.
+file is not found there, and FILENAME does not specify a directory, then
+GDB also looks for the file on the source search path (specified with
+the 'directory' command); except that '$cdir' is not searched because
+the compilation directory is not relevant to scripts.
 
-   If `-s' is specified, then GDB searches for FILENAME on the search
+   If '-s' is specified, then GDB searches for FILENAME on the search
 path even if FILENAME specifies a directory.  The search is done by
-appending FILENAME to each element of the search path.  So, for
-example, if FILENAME is `mylib/myscript' and the search path contains
-`/home/user' then GDB will look for the script
-`/home/user/mylib/myscript'.  The search is also done if FILENAME is an
-absolute path.  For example, if FILENAME is `/tmp/myscript' and the
-search path contains `/home/user' then GDB will look for the script
-`/home/user/tmp/myscript'.  For DOS-like systems, if FILENAME contains
-a drive specification, it is stripped before concatenation.  For
-example, if FILENAME is `d:myscript' and the search path contains
-`c:/tmp' then GDB will look for the script `c:/tmp/myscript'.
+appending FILENAME to each element of the search path.  So, for example,
+if FILENAME is 'mylib/myscript' and the search path contains
+'/home/user' then GDB will look for the script
+'/home/user/mylib/myscript'.  The search is also done if FILENAME is an
+absolute path.  For example, if FILENAME is '/tmp/myscript' and the
+search path contains '/home/user' then GDB will look for the script
+'/home/user/tmp/myscript'.  For DOS-like systems, if FILENAME contains a
+drive specification, it is stripped before concatenation.  For example,
+if FILENAME is 'd:myscript' and the search path contains 'c:/tmp' then
+GDB will look for the script 'c:/tmp/myscript'.
 
-   If `-v', for verbose mode, is given then GDB displays each command
-as it is executed.  The option must be given before FILENAME, and is
+   If '-v', for verbose mode, is given then GDB displays each command as
+it is executed.  The option must be given before FILENAME, and is
 interpreted as part of the filename anywhere else.
 
    Commands that would ask for confirmation if used interactively
@@ -6181,51 +5868,50 @@ next command.
 
      gdb < cmds > log 2>&1
 
-   (The syntax above will vary depending on the shell used.) This
-example will execute commands from the file `cmds'. All output and
-errors would be directed to `log'.
+   (The syntax above will vary depending on the shell used.)  This
+example will execute commands from the file 'cmds'.  All output and
+errors would be directed to 'log'.
 
    Since commands stored on command files tend to be more general than
 commands typed interactively, they frequently need to deal with
 complicated situations, such as different or unexpected values of
 variables and symbols, changes in how the program being debugged is
 built, etc.  GDB provides a set of flow-control commands to deal with
-these complexities.  Using these commands, you can write complex
-scripts that loop over data structures, execute commands conditionally,
-etc.
+these complexities.  Using these commands, you can write complex scripts
+that loop over data structures, execute commands conditionally, etc.
 
-`if'
-`else'
+'if'
+'else'
      This command allows to include in your script conditionally
-     executed commands. The `if' command takes a single argument, which
+     executed commands.  The 'if' command takes a single argument, which
      is an expression to evaluate.  It is followed by a series of
      commands that are executed only if the expression is true (its
-     value is nonzero).  There can then optionally be an `else' line,
+     value is nonzero).  There can then optionally be an 'else' line,
      followed by a series of commands that are only executed if the
      expression was false.  The end of the list is marked by a line
-     containing `end'.
+     containing 'end'.
 
-`while'
-     This command allows to write loops.  Its syntax is similar to
-     `if': the command takes a single argument, which is an expression
-     to evaluate, and must be followed by the commands to execute, one
-     per line, terminated by an `end'.  These commands are called the
-     "body" of the loop.  The commands in the body of `while' are
-     executed repeatedly as long as the expression evaluates to true.
-
-`loop_break'
-     This command exits the `while' loop in whose body it is included.
-     Execution of the script continues after that `while's `end' line.
+'while'
+     This command allows to write loops.  Its syntax is similar to 'if':
+     the command takes a single argument, which is an expression to
+     evaluate, and must be followed by the commands to execute, one per
+     line, terminated by an 'end'.  These commands are called the "body"
+     of the loop.  The commands in the body of 'while' are executed
+     repeatedly as long as the expression evaluates to true.
+
+'loop_break'
+     This command exits the 'while' loop in whose body it is included.
+     Execution of the script continues after that 'while's 'end' line.
 
-`loop_continue'
+'loop_continue'
      This command skips the execution of the rest of the body of
-     commands in the `while' loop in whose body it is included.
-     Execution branches to the beginning of the `while' loop, where it
+     commands in the 'while' loop in whose body it is included.
+     Execution branches to the beginning of the 'while' loop, where it
      evaluates the controlling expression.
 
-`end'
-     Terminate the block of commands that are the body of `if', `else',
-     or `while' flow-control commands.
+'end'
+     Terminate the block of commands that are the body of 'if', 'else',
+     or 'while' flow-control commands.
 
 
 File: gdb.info,  Node: Output,  Next: Auto-loading sequences,  Prev: Command Files,  Up: Sequences
@@ -6239,15 +5925,15 @@ explicitly printed by the commands in th
 describes three commands useful for generating exactly the output you
 want.
 
-`echo TEXT'
-     Print TEXT.  Nonprinting characters can be included in TEXT using
-     C escape sequences, such as `\n' to print a newline.  *No newline
-     is printed unless you specify one.* In addition to the standard C
+'echo TEXT'
+     Print TEXT.  Nonprinting characters can be included in TEXT using C
+     escape sequences, such as '\n' to print a newline.  *No newline is
+     printed unless you specify one.*  In addition to the standard C
      escape sequences, a backslash followed by a space stands for a
      space.  This is useful for displaying a string with spaces at the
      beginning or the end, since leading and trailing spaces are
-     otherwise trimmed from all arguments.  To print ` and foo = ', use
-     the command `echo \ and foo = \ '.
+     otherwise trimmed from all arguments.  To print ' and foo = ', use
+     the command 'echo \ and foo = \ '.
 
      A backslash at the end of TEXT can be used, as in C, to continue
      the command onto subsequent lines.  For example,
@@ -6262,18 +5948,18 @@ want.
           echo which is continued\n
           echo onto several lines.\n
 
-`output EXPRESSION'
+'output EXPRESSION'
      Print the value of EXPRESSION and nothing but that value: no
-     newlines, no `$NN = '.  The value is not entered in the value
+     newlines, no '$NN = '.  The value is not entered in the value
      history either.  *Note Expressions: Expressions, for more
      information on expressions.
 
-`output/FMT EXPRESSION'
+'output/FMT EXPRESSION'
      Print the value of EXPRESSION in format FMT.  You can use the same
-     formats as for `print'.  *Note Output Formats: Output Formats, for
+     formats as for 'print'.  *Note Output Formats: Output Formats, for
      more information.
 
-`printf TEMPLATE, EXPRESSIONS...'
+'printf TEMPLATE, EXPRESSIONS...'
      Print the values of one or more EXPRESSIONS under the control of
      the string TEMPLATE.  To print several values, make EXPRESSIONS be
      a comma-separated list of individual expressions, which may be
@@ -6283,8 +5969,8 @@ want.
 
           printf (TEMPLATE, EXPRESSIONS...);
 
-     As in `C' `printf', ordinary characters in TEMPLATE are printed
-     verbatim, while "conversion specification" introduced by the `%'
+     As in 'C' 'printf', ordinary characters in TEMPLATE are printed
+     verbatim, while "conversion specification" introduced by the '%'
      character cause subsequent EXPRESSIONS to be evaluated, their
      values converted and formatted according to type and style
      information encoded in the conversion specifications, and then
@@ -6294,85 +5980,84 @@ want.
 
           printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo
 
-     `printf' supports all the standard `C' conversion specifications,
-     including the flags and modifiers between the `%' character and
-     the conversion letter, with the following exceptions:
+     'printf' supports all the standard 'C' conversion specifications,
+     including the flags and modifiers between the '%' character and the
+     conversion letter, with the following exceptions:
 
-        * The argument-ordering modifiers, such as `2$', are not
+        * The argument-ordering modifiers, such as '2$', are not
           supported.
 
-        * The modifier `*' is not supported for specifying precision or
+        * The modifier '*' is not supported for specifying precision or
           width.
 
-        * The `'' flag (for separation of digits into groups according
-          to `LC_NUMERIC'') is not supported.
+        * The ''' flag (for separation of digits into groups according
+          to 'LC_NUMERIC'') is not supported.
 
-        * The type modifiers `hh', `j', `t', and `z' are not supported.
+        * The type modifiers 'hh', 'j', 't', and 'z' are not supported.
 
-        * The conversion letter `n' (as in `%n') is not supported.
+        * The conversion letter 'n' (as in '%n') is not supported.
 
-        * The conversion letters `a' and `A' are not supported.
+        * The conversion letters 'a' and 'A' are not supported.
 
-     Note that the `ll' type modifier is supported only if the
-     underlying `C' implementation used to build GDB supports the `long
-     long int' type, and the `L' type modifier is supported only if
-     `long double' type is available.
+     Note that the 'll' type modifier is supported only if the
+     underlying 'C' implementation used to build GDB supports the 'long
+     long int' type, and the 'L' type modifier is supported only if
+     'long double' type is available.
 
-     As in `C', `printf' supports simple backslash-escape sequences,
-     such as `\n', `\t', `\\', `\"', `\a', and `\f', that consist of
+     As in 'C', 'printf' supports simple backslash-escape sequences,
+     such as '\n', '\t', '\\', '\"', '\a', and '\f', that consist of
      backslash followed by a single character.  Octal and hexadecimal
      escape sequences are not supported.
 
-     Additionally, `printf' supports conversion specifications for DFP
+     Additionally, 'printf' supports conversion specifications for DFP
      ("Decimal Floating Point") types using the following length
      modifiers together with a floating point specifier.  letters:
 
-        * `H' for printing `Decimal32' types.
+        * 'H' for printing 'Decimal32' types.
 
-        * `D' for printing `Decimal64' types.
+        * 'D' for printing 'Decimal64' types.
 
-        * `DD' for printing `Decimal128' types.
+        * 'DD' for printing 'Decimal128' types.
 
-     If the underlying `C' implementation used to build GDB has support
+     If the underlying 'C' implementation used to build GDB has support
      for the three length modifiers for DFP types, other modifiers such
      as width and precision will also be available for GDB to use.
 
-     In case there is no such `C' support, no additional modifiers will
+     In case there is no such 'C' support, no additional modifiers will
      be available and the value will be printed in the standard way.
 
      Here's an example of printing DFP types using the above conversion
      letters:
           printf "D32: %Hf - D64: %Df - D128: %DDf\n",1.2345df,1.2E10dd,1.2E1dl
 
-`eval TEMPLATE, EXPRESSIONS...'
+'eval TEMPLATE, EXPRESSIONS...'
      Convert the values of one or more EXPRESSIONS under the control of
      the string TEMPLATE to a command line, and call it.
 
-
 
 File: gdb.info,  Node: Auto-loading sequences,  Prev: Output,  Up: Sequences
 
 23.1.5 Controlling auto-loading native GDB scripts
 --------------------------------------------------
 
-When a new object file is read (for example, due to the `file' command,
+When a new object file is read (for example, due to the 'file' command,
 or because the inferior has loaded a shared library), GDB will look for
-the command file `OBJFILE-gdb.gdb'.  *Note Auto-loading extensions::.
+the command file 'OBJFILE-gdb.gdb'.  *Note Auto-loading extensions::.
 
    Auto-loading can be enabled or disabled, and the list of auto-loaded
 scripts can be printed.
 
-`set auto-load gdb-scripts [on|off]'
+'set auto-load gdb-scripts [on|off]'
      Enable or disable the auto-loading of canned sequences of commands
      scripts.
 
-`show auto-load gdb-scripts'
+'show auto-load gdb-scripts'
      Show whether auto-loading of canned sequences of commands scripts
      is enabled or disabled.
 
-`info auto-load gdb-scripts [REGEXP]'
-     Print the list of all canned sequences of commands scripts that
-     GDB auto-loaded.
+'info auto-load gdb-scripts [REGEXP]'
+     Print the list of all canned sequences of commands scripts that GDB
+     auto-loaded.
 
    If REGEXP is supplied only canned sequences of commands scripts with
 matching names are printed.
@@ -6385,10 +6070,10 @@ File: gdb.info,  Node: Python,  Next: Gu
 
 You can extend GDB using the Python programming language
 (http://www.python.org/).  This feature is available only if GDB was
-configured using `--with-python'.
+configured using '--with-python'.
 
    Python scripts used by GDB should be installed in
-`DATA-DIRECTORY/python', where DATA-DIRECTORY is the data directory as
+'DATA-DIRECTORY/python', where DATA-DIRECTORY is the data directory as
 determined at GDB startup (*note Data Files::).  This directory, known
 as the "python directory", is automatically added to the Python Search
 Path in order to allow the Python interpreter to locate all scripts
@@ -6396,8 +6081,8 @@ installed at this location.
 
    Additionally, GDB commands and convenience functions which are
 written in Python and are located in the
-`DATA-DIRECTORY/python/gdb/command' or
-`DATA-DIRECTORY/python/gdb/function' directories are automatically
+'DATA-DIRECTORY/python/gdb/command' or
+'DATA-DIRECTORY/python/gdb/function' directories are automatically
 imported when GDB starts.
 
 * Menu:
@@ -6416,11 +6101,11 @@ File: gdb.info,  Node: Python Commands, 
 GDB provides two commands for accessing the Python interpreter, and one
 related setting:
 
-`python-interactive [COMMAND]'
-`pi [COMMAND]'
-     Without an argument, the `python-interactive' command can be used
+'python-interactive [COMMAND]'
+'pi [COMMAND]'
+     Without an argument, the 'python-interactive' command can be used
      to start an interactive Python prompt.  To return to GDB, type the
-     `EOF' character (e.g., `Ctrl-D' on an empty prompt).
+     'EOF' character (e.g., 'Ctrl-D' on an empty prompt).
 
      Alternatively, a single-line Python command can be given as an
      argument and evaluated.  If the command is an expression, the
@@ -6430,21 +6115,21 @@ related setting:
           (gdb) python-interactive 2 + 3
           5
 
-`python [COMMAND]'
-`py [COMMAND]'
-     The `python' command can be used to evaluate Python code.
+'python [COMMAND]'
+'py [COMMAND]'
+     The 'python' command can be used to evaluate Python code.
 
-     If given an argument, the `python' command will evaluate the
+     If given an argument, the 'python' command will evaluate the
      argument as a Python command.  For example:
 
           (gdb) python print 23
           23
 
-     If you do not provide an argument to `python', it will act as a
-     multi-line command, like `define'.  In this case, the Python
-     script is made up of subsequent command lines, given after the
-     `python' command.  This command list is terminated using a line
-     containing `end'.  For example:
+     If you do not provide an argument to 'python', it will act as a
+     multi-line command, like 'define'.  In this case, the Python script
+     is made up of subsequent command lines, given after the 'python'
+     command.  This command list is terminated using a line containing
+     'end'.  For example:
 
           (gdb) python
           Type python script
@@ -6453,25 +6138,24 @@ related setting:
           >end
           23
 
-`set python print-stack'
+'set python print-stack'
      By default, GDB will print only the message component of a Python
      exception when an error occurs in a Python script.  This can be
-     controlled using `set python print-stack': if `full', then full
-     Python stack printing is enabled; if `none', then Python stack and
-     message printing is disabled; if `message', the default, only the
+     controlled using 'set python print-stack': if 'full', then full
+     Python stack printing is enabled; if 'none', then Python stack and
+     message printing is disabled; if 'message', the default, only the
      message component of the error is printed.
 
    It is also possible to execute a Python script from the GDB
 interpreter:
 
-`source `script-name''
-     The script name must end with `.py' and GDB must be configured to
-     recognize the script language based on filename extension using
-     the `script-extension' setting.  *Note Extending GDB: Extending
-     GDB.
+'source script-name'
+     The script name must end with '.py' and GDB must be configured to
+     recognize the script language based on filename extension using the
+     'script-extension' setting.  *Note Extending GDB: Extending GDB.
 
-`python execfile ("script-name")'
-     This method is based on the `execfile' Python built-in function,
+'python execfile ("script-name")'
+     This method is based on the 'execfile' Python built-in function,
      and thus is always available.
 
 
@@ -6481,12 +6165,12 @@ File: gdb.info,  Node: Python API,  Next
 -----------------
 
 You can get quick online help for GDB's Python API by issuing the
-command `python help (gdb)'.
+command 'python help (gdb)'.
 
    Functions and methods which have two or more optional arguments allow
 them to be specified using keyword syntax.  This allows passing some
 optional arguments while skipping others.  Example:
-`gdb.some_function ('foo', bar = 1, baz = 2)'.
+'gdb.some_function ('foo', bar = 1, baz = 2)'.
 
 * Menu:
 
@@ -6508,6 +6192,7 @@ optional arguments while skipping others
 * Inferiors In Python::         Python representation of inferiors (processes)
 * Events In Python::            Listening for events from GDB.
 * Threads In Python::           Accessing inferior threads from Python.
+* Recordings In Python::        Accessing recordings from Python.
 * Commands In Python::          Implementing new commands in Python.
 * Parameters In Python::        Adding new GDB parameters.
 * Functions In Python::         Writing new convenience functions.
@@ -6530,20 +6215,20 @@ File: gdb.info,  Node: Basic Python,  Ne
 23.2.2.1 Basic Python
 .....................
 
-At startup, GDB overrides Python's `sys.stdout' and `sys.stderr' to
-print using GDB's output-paging streams.  A Python program which
-outputs to one of these streams may have its output interrupted by the
-user (*note Screen Size::).  In this situation, a Python
-`KeyboardInterrupt' exception is thrown.
+At startup, GDB overrides Python's 'sys.stdout' and 'sys.stderr' to
+print using GDB's output-paging streams.  A Python program which outputs
+to one of these streams may have its output interrupted by the user
+(*note Screen Size::).  In this situation, a Python 'KeyboardInterrupt'
+exception is thrown.
 
    Some care must be taken when writing Python code to run in GDB.  Two
 things worth noting in particular:
 
-   * GDB install handlers for `SIGCHLD' and `SIGINT'.  Python code must
-     not override these, or even change the options using `sigaction'.
+   * GDB install handlers for 'SIGCHLD' and 'SIGINT'.  Python code must
+     not override these, or even change the options using 'sigaction'.
      If your program changes the handling of these signals, GDB will
      most likely stop working correctly.  Note that it is unfortunately
-     common for GUI toolkits to install a `SIGCHLD' handler.
+     common for GUI toolkits to install a 'SIGCHLD' handler.
 
    * GDB takes care to mark its internal file descriptors as
      close-on-exec.  However, this cannot be done in a thread-safe way
@@ -6552,90 +6237,93 @@ things worth noting in particular:
      set and arrange to close unneeded file descriptors before starting
      a child process.
 
-   GDB introduces a new Python module, named `gdb'.  All methods and
+   GDB introduces a new Python module, named 'gdb'.  All methods and
 classes added by GDB are placed in this module.  GDB automatically
-`import's the `gdb' module for use in all scripts evaluated by the
-`python' command.
+'import's the 'gdb' module for use in all scripts evaluated by the
+'python' command.
 
  -- Variable: gdb.PYTHONDIR
      A string containing the python directory (*note Python::).
 
  -- Function: gdb.execute (command [, from_tty [, to_string]])
      Evaluate COMMAND, a string, as a GDB CLI command.  If a GDB
-     exception happens while COMMAND runs, it is translated as
-     described in *note Exception Handling: Exception Handling.
+     exception happens while COMMAND runs, it is translated as described
+     in *note Exception Handling: Exception Handling.
 
      The FROM_TTY flag specifies whether GDB ought to consider this
      command as having originated from the user invoking it
      interactively.  It must be a boolean value.  If omitted, it
-     defaults to `False'.
+     defaults to 'False'.
 
      By default, any output produced by COMMAND is sent to GDB's
      standard output (and to the log output if logging is turned on).
-     If the TO_STRING parameter is `True', then output will be
-     collected by `gdb.execute' and returned as a string.  The default
-     is `False', in which case the return value is `None'.  If
-     TO_STRING is `True', the GDB virtual terminal will be temporarily
-     set to unlimited width and height, and its pagination will be
-     disabled; *note Screen Size::.
+     If the TO_STRING parameter is 'True', then output will be collected
+     by 'gdb.execute' and returned as a string.  The default is 'False',
+     in which case the return value is 'None'.  If TO_STRING is 'True',
+     the GDB virtual terminal will be temporarily set to unlimited width
+     and height, and its pagination will be disabled; *note Screen
+     Size::.
 
  -- Function: gdb.breakpoints ()
      Return a sequence holding all of GDB's breakpoints.  *Note
-     Breakpoints In Python::, for more information.
+     Breakpoints In Python::, for more information.  In GDB version 7.11
+     and earlier, this function returned 'None' if there were no
+     breakpoints.  This peculiarity was subsequently fixed, and now
+     'gdb.breakpoints' returns an empty sequence in this case.
 
  -- Function: gdb.parameter (parameter)
      Return the value of a GDB PARAMETER given by its name, a string;
      the parameter name string may contain spaces if the parameter has a
-     multi-part name.  For example, `print object' is a valid parameter
+     multi-part name.  For example, 'print object' is a valid parameter
      name.
 
      If the named parameter does not exist, this function throws a
-     `gdb.error' (*note Exception Handling::).  Otherwise, the
+     'gdb.error' (*note Exception Handling::).  Otherwise, the
      parameter's value is converted to a Python value of the appropriate
      type, and returned.
 
  -- Function: gdb.history (number)
      Return a value from GDB's value history (*note Value History::).
      The NUMBER argument indicates which history element to return.  If
-     NUMBER is negative, then GDB will take its absolute value and
-     count backward from the last element (i.e., the most recent
-     element) to find the value to return.  If NUMBER is zero, then GDB
-     will return the most recent element.  If the element specified by
-     NUMBER doesn't exist in the value history, a `gdb.error' exception
-     will be raised.
+     NUMBER is negative, then GDB will take its absolute value and count
+     backward from the last element (i.e., the most recent element) to
+     find the value to return.  If NUMBER is zero, then GDB will return
+     the most recent element.  If the element specified by NUMBER
+     doesn't exist in the value history, a 'gdb.error' exception will be
+     raised.
 
      If no exception is raised, the return value is always an instance
-     of `gdb.Value' (*note Values From Inferior::).
+     of 'gdb.Value' (*note Values From Inferior::).
 
  -- Function: gdb.parse_and_eval (expression)
      Parse EXPRESSION, which must be a string, as an expression in the
      current language, evaluate it, and return the result as a
-     `gdb.Value'.
+     'gdb.Value'.
 
      This function can be useful when implementing a new command (*note
      Commands In Python::), as it provides a way to parse the command's
      argument as an expression.  It is also useful simply to compute
      values, for example, it is the only way to get the value of a
-     convenience variable (*note Convenience Vars::) as a `gdb.Value'.
+     convenience variable (*note Convenience Vars::) as a 'gdb.Value'.
 
  -- Function: gdb.find_pc_line (pc)
-     Return the `gdb.Symtab_and_line' object corresponding to the PC
-     value.  *Note Symbol Tables In Python::.  If an invalid value of
-     PC is passed as an argument, then the `symtab' and `line'
-     attributes of the returned `gdb.Symtab_and_line' object will be
-     `None' and 0 respectively.
+     Return the 'gdb.Symtab_and_line' object corresponding to the PC
+     value.  *Note Symbol Tables In Python::.  If an invalid value of PC
+     is passed as an argument, then the 'symtab' and 'line' attributes
+     of the returned 'gdb.Symtab_and_line' object will be 'None' and 0
+     respectively.
 
  -- Function: gdb.post_event (event)
      Put EVENT, a callable object taking no arguments, into GDB's
      internal event queue.  This callable will be invoked at some later
      point, during GDB's event processing.  Events posted using
-     `post_event' will be run in the order in which they were posted;
+     'post_event' will be run in the order in which they were posted;
      however, there is no way to know when they will be processed
      relative to other events inside GDB.
 
      GDB is not thread-safe.  If your Python program uses multiple
-     threads, you must be careful to only call GDB-specific functions
-     in the GDB thread.  `post_event' ensures this.  For example:
+     threads, you must be careful to only call GDB-specific functions in
+     the GDB thread.  'post_event' ensures this.  For example:
 
           (gdb) python
           >import threading
@@ -6664,79 +6352,78 @@ classes added by GDB are placed in this 
      STREAM determines the stream to print to.  The default stream is
      GDB's standard output stream.  Possible stream values are:
 
-    `gdb.STDOUT'
+     'gdb.STDOUT'
           GDB's standard output stream.
 
-    `gdb.STDERR'
+     'gdb.STDERR'
           GDB's standard error stream.
 
-    `gdb.STDLOG'
+     'gdb.STDLOG'
           GDB's log stream (*note Logging Output::).
 
-     Writing to `sys.stdout' or `sys.stderr' will automatically call
+     Writing to 'sys.stdout' or 'sys.stderr' will automatically call
      this function and will automatically direct the output to the
      relevant stream.
 
  -- Function: gdb.flush ()
-     Flush the buffer of a GDB paginated stream so that the contents
-     are displayed immediately.  GDB will flush the contents of a
-     stream automatically when it encounters a newline in the buffer.
-     The optional STREAM determines the stream to flush.  The default
-     stream is GDB's standard output stream.  Possible stream values
-     are:
+     Flush the buffer of a GDB paginated stream so that the contents are
+     displayed immediately.  GDB will flush the contents of a stream
+     automatically when it encounters a newline in the buffer.  The
+     optional STREAM determines the stream to flush.  The default stream
+     is GDB's standard output stream.  Possible stream values are:
 
-    `gdb.STDOUT'
+     'gdb.STDOUT'
           GDB's standard output stream.
 
-    `gdb.STDERR'
+     'gdb.STDERR'
           GDB's standard error stream.
 
-    `gdb.STDLOG'
+     'gdb.STDLOG'
           GDB's log stream (*note Logging Output::).
 
-
-     Flushing `sys.stdout' or `sys.stderr' will automatically call this
+     Flushing 'sys.stdout' or 'sys.stderr' will automatically call this
      function for the relevant stream.
 
  -- Function: gdb.target_charset ()
      Return the name of the current target character set (*note
      Character Sets::).  This differs from
-     `gdb.parameter('target-charset')' in that `auto' is never returned.
+     'gdb.parameter('target-charset')' in that 'auto' is never returned.
 
  -- Function: gdb.target_wide_charset ()
      Return the name of the current target wide character set (*note
      Character Sets::).  This differs from
-     `gdb.parameter('target-wide-charset')' in that `auto' is never
+     'gdb.parameter('target-wide-charset')' in that 'auto' is never
      returned.
 
  -- Function: gdb.solib_name (address)
      Return the name of the shared library holding the given ADDRESS as
-     a string, or `None'.
+     a string, or 'None'.
 
  -- Function: gdb.decode_line [expression]
      Return locations of the line specified by EXPRESSION, or of the
      current line if no argument was given.  This function returns a
-     Python tuple containing two elements.  The first element contains
-     a string holding any unparsed section of EXPRESSION (or `None' if
-     the expression has been fully parsed).  The second element contains
-     either `None' or another tuple that contains all the locations
-     that match the expression represented as `gdb.Symtab_and_line'
-     objects (*note Symbol Tables In Python::).  If EXPRESSION is
-     provided, it is decoded the way that GDB's inbuilt `break' or
-     `edit' commands do (*note Specify Location::).
+     Python tuple containing two elements.  The first element contains a
+     string holding any unparsed section of EXPRESSION (or 'None' if the
+     expression has been fully parsed).  The second element contains
+     either 'None' or another tuple that contains all the locations that
+     match the expression represented as 'gdb.Symtab_and_line' objects
+     (*note Symbol Tables In Python::).  If EXPRESSION is provided, it
+     is decoded the way that GDB's inbuilt 'break' or 'edit' commands do
+     (*note Specify Location::).
 
  -- Function: gdb.prompt_hook (current_prompt)
+
      If PROMPT_HOOK is callable, GDB will call the method assigned to
      this operation before a prompt is displayed by GDB.
 
-     The parameter `current_prompt' contains the current GDB prompt.
-     This method must return a Python string, or `None'.  If a string
-     is returned, the GDB prompt will be set to that string.  If `None'
-     is returned, GDB will continue to use the current prompt.
+     The parameter 'current_prompt' contains the current GDB prompt.
+     This method must return a Python string, or 'None'.  If a string is
+     returned, the GDB prompt will be set to that string.  If 'None' is
+     returned, GDB will continue to use the current prompt.
 
      Some prompts cannot be substituted in GDB.  Secondary prompts such
-     as those used by readline for command input, and annotation
-     related prompts are prohibited from being changed.
+     as those used by readline for command input, and annotation related
+     prompts are prohibited from being changed.
 
 
 File: gdb.info,  Node: Exception Handling,  Next: Values From Inferior,  Prev: Basic Python,  Up: Python API
@@ -6744,9 +6431,9 @@ File: gdb.info,  Node: Exception Handlin
 23.2.2.2 Exception Handling
 ...........................
 
-When executing the `python' command, Python exceptions uncaught within
+When executing the 'python' command, Python exceptions uncaught within
 the Python code are translated to calls to GDB error-reporting
-mechanism.  If the command that called `python' does not handle the
+mechanism.  If the command that called 'python' does not handle the
 error, GDB will terminate it and print an error message containing the
 Python exception name, the associated value, and the Python call stack
 backtrace at the point where the exception was raised.  Example:
@@ -6760,30 +6447,30 @@ backtrace at the point where the excepti
 converted to Python exceptions.  The type of the Python exception
 depends on the error.
 
-`gdb.error'
-     This is the base class for most exceptions generated by GDB.  It
-     is derived from `RuntimeError', for compatibility with earlier
+'gdb.error'
+     This is the base class for most exceptions generated by GDB.  It is
+     derived from 'RuntimeError', for compatibility with earlier
      versions of GDB.
 
      If an error occurring in GDB does not fit into some more specific
      category, then the generated exception will have this type.
 
-`gdb.MemoryError'
-     This is a subclass of `gdb.error' which is thrown when an
-     operation tried to access invalid memory in the inferior.
-
-`KeyboardInterrupt'
-     User interrupt (via `C-c' or by typing `q' at a pagination prompt)
-     is translated to a Python `KeyboardInterrupt' exception.
+'gdb.MemoryError'
+     This is a subclass of 'gdb.error' which is thrown when an operation
+     tried to access invalid memory in the inferior.
+
+'KeyboardInterrupt'
+     User interrupt (via 'C-c' or by typing 'q' at a pagination prompt)
+     is translated to a Python 'KeyboardInterrupt' exception.
 
    In all cases, your exception handler will see the GDB error message
-as its value and the Python call stack backtrace at the Python
-statement closest to where the GDB error occured as the traceback.
+as its value and the Python call stack backtrace at the Python statement
+closest to where the GDB error occured as the traceback.
 
-   When implementing GDB commands in Python via `gdb.Command', it is
+   When implementing GDB commands in Python via 'gdb.Command', it is
 useful to be able to throw an exception that doesn't cause a traceback
 to be printed.  For example, the user may have invoked the command
-incorrectly.  Use the `gdb.GdbError' exception to handle this case.
+incorrectly.  Use the 'gdb.GdbError' exception to handle this case.
 Example:
 
      (gdb) python
@@ -6807,69 +6494,69 @@ File: gdb.info,  Node: Values From Infer
 23.2.2.3 Values From Inferior
 .............................
 
-GDB provides values it obtains from the inferior program in an object
-of type `gdb.Value'.  GDB uses this object for its internal bookkeeping
-of the inferior's values, and for fetching values when necessary.
+GDB provides values it obtains from the inferior program in an object of
+type 'gdb.Value'.  GDB uses this object for its internal bookkeeping of
+the inferior's values, and for fetching values when necessary.
 
    Inferior values that are simple scalars can be used directly in
 Python expressions that are valid for the value's data type.  Here's an
-example for an integer or floating-point value `some_val':
+example for an integer or floating-point value 'some_val':
 
      bar = some_val + 2
 
-As result of this, `bar' will also be a `gdb.Value' object whose values
-are of the same type as those of `some_val'.  Valid Python operations
-can also be performed on `gdb.Value' objects representing a `struct' or
-`class' object.  For such cases, the overloaded operator (if present),
-is used to perform the operation.  For example, if `val1' and `val2'
-are `gdb.Value' objects representing instances of a `class' which
-overloads the `+' operator, then one can use the `+' operator in their
-Python script as follows:
+As result of this, 'bar' will also be a 'gdb.Value' object whose values
+are of the same type as those of 'some_val'.  Valid Python operations
+can also be performed on 'gdb.Value' objects representing a 'struct' or
+'class' object.  For such cases, the overloaded operator (if present),
+is used to perform the operation.  For example, if 'val1' and 'val2' are
+'gdb.Value' objects representing instances of a 'class' which overloads
+the '+' operator, then one can use the '+' operator in their Python
+script as follows:
 
      val3 = val1 + val2
 
-The result of the operation `val3' is also a `gdb.Value' object
-corresponding to the value returned by the overloaded `+' operator.  In
+The result of the operation 'val3' is also a 'gdb.Value' object
+corresponding to the value returned by the overloaded '+' operator.  In
 general, overloaded operators are invoked for the following operations:
-`+' (binary addition), `-' (binary subtraction), `*' (multiplication),
-`/', `%', `<<', `>>', `|', `&', `^'.
+'+' (binary addition), '-' (binary subtraction), '*' (multiplication),
+'/', '%', '<<', '>>', '|', '&', '^'.
 
-   Inferior values that are structures or instances of some class can
-be accessed using the Python "dictionary syntax".  For example, if
-`some_val' is a `gdb.Value' instance holding a structure, you can
-access its `foo' element with:
+   Inferior values that are structures or instances of some class can be
+accessed using the Python "dictionary syntax".  For example, if
+'some_val' is a 'gdb.Value' instance holding a structure, you can access
+its 'foo' element with:
 
      bar = some_val['foo']
 
-   Again, `bar' will also be a `gdb.Value' object.  Structure elements
-can also be accessed by using `gdb.Field' objects as subscripts (*note
-Types In Python::, for more information on `gdb.Field' objects).  For
-example, if `foo_field' is a `gdb.Field' object corresponding to
-element `foo' of the above structure, then `bar' can also be accessed
-as follows:
+   Again, 'bar' will also be a 'gdb.Value' object.  Structure elements
+can also be accessed by using 'gdb.Field' objects as subscripts (*note
+Types In Python::, for more information on 'gdb.Field' objects).  For
+example, if 'foo_field' is a 'gdb.Field' object corresponding to element
+'foo' of the above structure, then 'bar' can also be accessed as
+follows:
 
      bar = some_val[foo_field]
 
-   A `gdb.Value' that represents a function can be executed via
-inferior function call.  Any arguments provided to the call must match
-the function's prototype, and must be provided in the order specified
-by that prototype.
+   A 'gdb.Value' that represents a function can be executed via inferior
+function call.  Any arguments provided to the call must match the
+function's prototype, and must be provided in the order specified by
+that prototype.
 
-   For example, `some_val' is a `gdb.Value' instance representing a
+   For example, 'some_val' is a 'gdb.Value' instance representing a
 function that takes two integers as arguments.  To execute this
 function, call it like so:
 
      result = some_val (10,20)
 
    Any values returned from a function call will be stored as a
-`gdb.Value'.
+'gdb.Value'.
 
    The following attributes are provided:
 
  -- Variable: Value.address
      If this object is addressable, this read-only attribute holds a
-     `gdb.Value' object representing the address.  Otherwise, this
-     attribute holds `None'.
+     'gdb.Value' object representing the address.  Otherwise, this
+     attribute holds 'None'.
 
  -- Variable: Value.is_optimized_out
      This read-only boolean attribute is true if the compiler optimized
@@ -6877,11 +6564,11 @@ function, call it like so:
      inferior.
 
  -- Variable: Value.type
-     The type of this `gdb.Value'.  The value of this attribute is a
-     `gdb.Type' object (*note Types In Python::).
+     The type of this 'gdb.Value'.  The value of this attribute is a
+     'gdb.Type' object (*note Types In Python::).
 
  -- Variable: Value.dynamic_type
-     The dynamic type of this `gdb.Value'.  This uses C++ run-time type
+     The dynamic type of this 'gdb.Value'.  This uses C++ run-time type
      information (RTTI) to determine the dynamic type of the value.  If
      this value is of class type, it will return the class in which the
      value is embedded, if any.  If this value is of pointer or
@@ -6892,86 +6579,86 @@ function, call it like so:
 
      Note that this feature will only work when debugging a C++ program
      that includes RTTI for the object in question.  Otherwise, it will
-     just return the static type of the value as in `ptype foo' (*note
+     just return the static type of the value as in 'ptype foo' (*note
      ptype: Symbols.).
 
  -- Variable: Value.is_lazy
-     The value of this read-only boolean attribute is `True' if this
-     `gdb.Value' has not yet been fetched from the inferior.  GDB does
+     The value of this read-only boolean attribute is 'True' if this
+     'gdb.Value' has not yet been fetched from the inferior.  GDB does
      not fetch values until necessary, for efficiency.  For example:
 
           myval = gdb.parse_and_eval ('somevar')
 
-     The value of `somevar' is not fetched at this time.  It will be
-     fetched when the value is needed, or when the `fetch_lazy' method
+     The value of 'somevar' is not fetched at this time.  It will be
+     fetched when the value is needed, or when the 'fetch_lazy' method
      is invoked.
 
    The following methods are provided:
 
  -- Function: Value.__init__ (VAL)
-     Many Python values can be converted directly to a `gdb.Value' via
+     Many Python values can be converted directly to a 'gdb.Value' via
      this object initializer.  Specifically:
 
-    Python boolean
+     Python boolean
           A Python boolean is converted to the boolean type from the
           current language.
 
-    Python integer
-          A Python integer is converted to the C `long' type for the
+     Python integer
+          A Python integer is converted to the C 'long' type for the
           current architecture.
 
-    Python long
-          A Python long is converted to the C `long long' type for the
+     Python long
+          A Python long is converted to the C 'long long' type for the
           current architecture.
 
-    Python float
-          A Python float is converted to the C `double' type for the
+     Python float
+          A Python float is converted to the C 'double' type for the
           current architecture.
 
-    Python string
-          A Python string is converted to a target string in the
-          current target language using the current target encoding.
-          If a character cannot be represented in the current target
+     Python string
+          A Python string is converted to a target string in the current
+          target language using the current target encoding.  If a
+          character cannot be represented in the current target
           encoding, then an exception is thrown.
 
-    `gdb.Value'
-          If `val' is a `gdb.Value', then a copy of the value is made.
+     'gdb.Value'
+          If 'val' is a 'gdb.Value', then a copy of the value is made.
 
-    `gdb.LazyString'
-          If `val' is a `gdb.LazyString' (*note Lazy Strings In
-          Python::), then the lazy string's `value' method is called,
+     'gdb.LazyString'
+          If 'val' is a 'gdb.LazyString' (*note Lazy Strings In
+          Python::), then the lazy string's 'value' method is called,
           and its result is used.
 
  -- Function: Value.cast (type)
-     Return a new instance of `gdb.Value' that is the result of casting
+     Return a new instance of 'gdb.Value' that is the result of casting
      this instance to the type described by TYPE, which must be a
-     `gdb.Type' object.  If the cast cannot be performed for some
+     'gdb.Type' object.  If the cast cannot be performed for some
      reason, this method throws an exception.
 
  -- Function: Value.dereference ()
-     For pointer data types, this method returns a new `gdb.Value'
-     object whose contents is the object pointed to by the pointer.
-     For example, if `foo' is a C pointer to an `int', declared in your
-     C program as
+     For pointer data types, this method returns a new 'gdb.Value'
+     object whose contents is the object pointed to by the pointer.  For
+     example, if 'foo' is a C pointer to an 'int', declared in your C
+     program as
 
           int *foo;
 
-     then you can use the corresponding `gdb.Value' to access what
-     `foo' points to like this:
+     then you can use the corresponding 'gdb.Value' to access what 'foo'
+     points to like this:
 
           bar = foo.dereference ()
 
-     The result `bar' will be a `gdb.Value' object holding the value
-     pointed to by `foo'.
+     The result 'bar' will be a 'gdb.Value' object holding the value
+     pointed to by 'foo'.
 
-     A similar function `Value.referenced_value' exists which also
-     returns `gdb.Value' objects corresonding to the values pointed to
+     A similar function 'Value.referenced_value' exists which also
+     returns 'gdb.Value' objects corresonding to the values pointed to
      by pointer values (and additionally, values referenced by reference
-     values).  However, the behavior of `Value.dereference' differs
-     from `Value.referenced_value' by the fact that the behavior of
-     `Value.dereference' is identical to applying the C unary operator
-     `*' on a given value.  For example, consider a reference to a
-     pointer `ptrref', declared in your C++ program as
+     values).  However, the behavior of 'Value.dereference' differs from
+     'Value.referenced_value' by the fact that the behavior of
+     'Value.dereference' is identical to applying the C unary operator
+     '*' on a given value.  For example, consider a reference to a
+     pointer 'ptrref', declared in your C++ program as
 
           typedef int *intptr;
           ...
@@ -6979,73 +6666,73 @@ function, call it like so:
           intptr ptr = &val;
           intptr &ptrref = ptr;
 
-     Though `ptrref' is a reference value, one can apply the method
-     `Value.dereference' to the `gdb.Value' object corresponding to it
-     and obtain a `gdb.Value' which is identical to that corresponding
-     to `val'.  However, if you apply the method
-     `Value.referenced_value', the result would be a `gdb.Value' object
-     identical to that corresponding to `ptr'.
+     Though 'ptrref' is a reference value, one can apply the method
+     'Value.dereference' to the 'gdb.Value' object corresponding to it
+     and obtain a 'gdb.Value' which is identical to that corresponding
+     to 'val'.  However, if you apply the method
+     'Value.referenced_value', the result would be a 'gdb.Value' object
+     identical to that corresponding to 'ptr'.
 
           py_ptrref = gdb.parse_and_eval ("ptrref")
           py_val = py_ptrref.dereference ()
           py_ptr = py_ptrref.referenced_value ()
 
-     The `gdb.Value' object `py_val' is identical to that corresponding
-     to `val', and `py_ptr' is identical to that corresponding to
-     `ptr'.  In general, `Value.dereference' can be applied whenever
-     the C unary operator `*' can be applied to the corresponding C
-     value.  For those cases where applying both `Value.dereference'
-     and `Value.referenced_value' is allowed, the results obtained need
-     not be identical (as we have seen in the above example).  The
-     results are however identical when applied on `gdb.Value' objects
-     corresponding to pointers (`gdb.Value' objects with type code
-     `TYPE_CODE_PTR') in a C/C++ program.
+     The 'gdb.Value' object 'py_val' is identical to that corresponding
+     to 'val', and 'py_ptr' is identical to that corresponding to 'ptr'.
+     In general, 'Value.dereference' can be applied whenever the C unary
+     operator '*' can be applied to the corresponding C value.  For
+     those cases where applying both 'Value.dereference' and
+     'Value.referenced_value' is allowed, the results obtained need not
+     be identical (as we have seen in the above example).  The results
+     are however identical when applied on 'gdb.Value' objects
+     corresponding to pointers ('gdb.Value' objects with type code
+     'TYPE_CODE_PTR') in a C/C++ program.
 
  -- Function: Value.referenced_value ()
      For pointer or reference data types, this method returns a new
-     `gdb.Value' object corresponding to the value referenced by the
+     'gdb.Value' object corresponding to the value referenced by the
      pointer/reference value.  For pointer data types,
-     `Value.dereference' and `Value.referenced_value' produce identical
+     'Value.dereference' and 'Value.referenced_value' produce identical
      results.  The difference between these methods is that
-     `Value.dereference' cannot get the values referenced by reference
-     values.  For example, consider a reference to an `int', declared
-     in your C++ program as
+     'Value.dereference' cannot get the values referenced by reference
+     values.  For example, consider a reference to an 'int', declared in
+     your C++ program as
 
           int val = 10;
           int &ref = val;
 
-     then applying `Value.dereference' to the `gdb.Value' object
-     corresponding to `ref' will result in an error, while applying
-     `Value.referenced_value' will result in a `gdb.Value' object
-     identical to that corresponding to `val'.
+     then applying 'Value.dereference' to the 'gdb.Value' object
+     corresponding to 'ref' will result in an error, while applying
+     'Value.referenced_value' will result in a 'gdb.Value' object
+     identical to that corresponding to 'val'.
 
           py_ref = gdb.parse_and_eval ("ref")
           er_ref = py_ref.dereference ()       # Results in error
           py_val = py_ref.referenced_value ()  # Returns the referenced value
 
-     The `gdb.Value' object `py_val' is identical to that corresponding
-     to `val'.
+     The 'gdb.Value' object 'py_val' is identical to that corresponding
+     to 'val'.
 
  -- Function: Value.reference_value ()
-     Return a `gdb.Value' object which is a reference to the value
+     Return a 'gdb.Value' object which is a reference to the value
      encapsulated by this instance.
 
  -- Function: Value.const_value ()
-     Return a `gdb.Value' object which is a `const' version of the
-     value encapsulated by this instance.
+     Return a 'gdb.Value' object which is a 'const' version of the value
+     encapsulated by this instance.
 
  -- Function: Value.dynamic_cast (type)
-     Like `Value.cast', but works as if the C++ `dynamic_cast' operator
+     Like 'Value.cast', but works as if the C++ 'dynamic_cast' operator
      were used.  Consult a C++ reference for details.
 
  -- Function: Value.reinterpret_cast (type)
-     Like `Value.cast', but works as if the C++ `reinterpret_cast'
+     Like 'Value.cast', but works as if the C++ 'reinterpret_cast'
      operator were used.  Consult a C++ reference for details.
 
  -- Function: Value.string ([encoding[, errors[, length]]])
-     If this `gdb.Value' represents a string, then this method converts
-     the contents to a Python string.  Otherwise, this method will
-     throw an exception.
+     If this 'gdb.Value' represents a string, then this method converts
+     the contents to a Python string.  Otherwise, this method will throw
+     an exception.
 
      Values are interpreted as strings according to the rules of the
      current language.  If the optional length argument is given, the
@@ -7055,33 +6742,33 @@ function, call it like so:
      will be converted.
 
      For example, in C-like languages, a value is a string if it is a
-     pointer to or an array of characters or ints of type `wchar_t',
-     `char16_t', or `char32_t'.
+     pointer to or an array of characters or ints of type 'wchar_t',
+     'char16_t', or 'char32_t'.
 
      If the optional ENCODING argument is given, it must be a string
-     naming the encoding of the string in the `gdb.Value', such as
-     `"ascii"', `"iso-8859-6"' or `"utf-8"'.  It accepts the same
-     encodings as the corresponding argument to Python's
-     `string.decode' method, and the Python codec machinery will be used
-     to convert the string.  If ENCODING is not given, or if ENCODING
-     is the empty string, then either the `target-charset' (*note
-     Character Sets::) will be used, or a language-specific encoding
-     will be used, if the current language is able to supply one.
+     naming the encoding of the string in the 'gdb.Value', such as
+     '"ascii"', '"iso-8859-6"' or '"utf-8"'.  It accepts the same
+     encodings as the corresponding argument to Python's 'string.decode'
+     method, and the Python codec machinery will be used to convert the
+     string.  If ENCODING is not given, or if ENCODING is the empty
+     string, then either the 'target-charset' (*note Character Sets::)
+     will be used, or a language-specific encoding will be used, if the
+     current language is able to supply one.
 
      The optional ERRORS argument is the same as the corresponding
-     argument to Python's `string.decode' method.
+     argument to Python's 'string.decode' method.
 
      If the optional LENGTH argument is given, the string will be
      fetched and converted to the given length.
 
  -- Function: Value.lazy_string ([encoding [, length]])
-     If this `gdb.Value' represents a string, then this method converts
-     the contents to a `gdb.LazyString' (*note Lazy Strings In
+     If this 'gdb.Value' represents a string, then this method converts
+     the contents to a 'gdb.LazyString' (*note Lazy Strings In
      Python::).  Otherwise, this method will throw an exception.
 
      If the optional ENCODING argument is given, it must be a string
-     naming the encoding of the `gdb.LazyString'.  Some examples are:
-     `ascii', `iso-8859-6' or `utf-8'.  If the ENCODING argument is an
+     naming the encoding of the 'gdb.LazyString'.  Some examples are:
+     'ascii', 'iso-8859-6' or 'utf-8'.  If the ENCODING argument is an
      encoding that GDB does recognize, GDB will raise an error.
 
      When a lazy string is printed, the GDB encoding machinery is used
@@ -7097,286 +6784,13 @@ function, call it like so:
      encoded until a null of appropriate width is found.
 
  -- Function: Value.fetch_lazy ()
-     If the `gdb.Value' object is currently a lazy value
-     (`gdb.Value.is_lazy' is `True'), then the value is fetched from
-     the inferior.  Any errors that occur in the process will produce a
+     If the 'gdb.Value' object is currently a lazy value
+     ('gdb.Value.is_lazy' is 'True'), then the value is fetched from the
+     inferior.  Any errors that occur in the process will produce a
      Python exception.
 
-     If the `gdb.Value' object is not a lazy value, this method has no
+     If the 'gdb.Value' object is not a lazy value, this method has no
      effect.
 
      This method does not return a value.
 
-
-File: gdb.info,  Node: Types In Python,  Next: Pretty Printing API,  Prev: Values From Inferior,  Up: Python API
-
-23.2.2.4 Types In Python
-........................
-
-GDB represents types from the inferior using the class `gdb.Type'.
-
-   The following type-related functions are available in the `gdb'
-module:
-
- -- Function: gdb.lookup_type (name [, block])
-     This function looks up a type by its NAME, which must be a string.
-
-     If BLOCK is given, then NAME is looked up in that scope.
-     Otherwise, it is searched for globally.
-
-     Ordinarily, this function will return an instance of `gdb.Type'.
-     If the named type cannot be found, it will throw an exception.
-
-   If the type is a structure or class type, or an enum type, the fields
-of that type can be accessed using the Python "dictionary syntax".  For
-example, if `some_type' is a `gdb.Type' instance holding a structure
-type, you can access its `foo' field with:
-
-     bar = some_type['foo']
-
-   `bar' will be a `gdb.Field' object; see below under the description
-of the `Type.fields' method for a description of the `gdb.Field' class.
-
-   An instance of `Type' has the following attributes:
-
- -- Variable: Type.code
-     The type code for this type.  The type code will be one of the
-     `TYPE_CODE_' constants defined below.
-
- -- Variable: Type.name
-     The name of this type.  If this type has no name, then `None' is
-     returned.
-
- -- Variable: Type.sizeof
-     The size of this type, in target `char' units.  Usually, a
-     target's `char' type will be an 8-bit byte.  However, on some
-     unusual platforms, this type may have a different size.
-
- -- Variable: Type.tag
-     The tag name for this type.  The tag name is the name after
-     `struct', `union', or `enum' in C and C++; not all languages have
-     this concept.  If this type has no tag name, then `None' is
-     returned.
-
-   The following methods are provided:
-
- -- Function: Type.fields ()
-     For structure and union types, this method returns the fields.
-     Range types have two fields, the minimum and maximum values.  Enum
-     types have one field per enum constant.  Function and method types
-     have one field per parameter.  The base types of C++ classes are
-     also represented as fields.  If the type has no fields, or does
-     not fit into one of these categories, an empty sequence will be
-     returned.
-
-     Each field is a `gdb.Field' object, with some pre-defined
-     attributes:
-    `bitpos'
-          This attribute is not available for `enum' or `static' (as in
-          C++ or Java) fields.  The value is the position, counting in
-          bits, from the start of the containing type.
-
-    `enumval'
-          This attribute is only available for `enum' fields, and its
-          value is the enumeration member's integer representation.
-
-    `name'
-          The name of the field, or `None' for anonymous fields.
-
-    `artificial'
-          This is `True' if the field is artificial, usually meaning
-          that it was provided by the compiler and not the user.  This
-          attribute is always provided, and is `False' if the field is
-          not artificial.
-
-    `is_base_class'
-          This is `True' if the field represents a base class of a C++
-          structure.  This attribute is always provided, and is `False'
-          if the field is not a base class of the type that is the
-          argument of `fields', or if that type was not a C++ class.
-
-    `bitsize'
-          If the field is packed, or is a bitfield, then this will have
-          a non-zero value, which is the size of the field in bits.
-          Otherwise, this will be zero; in this case the field's size
-          is given by its type.
-
-    `type'
-          The type of the field.  This is usually an instance of `Type',
-          but it can be `None' in some situations.
-
-    `parent_type'
-          The type which contains this field.  This is an instance of
-          `gdb.Type'.
-
- -- Function: Type.array (N1 [, N2])
-     Return a new `gdb.Type' object which represents an array of this
-     type.  If one argument is given, it is the inclusive upper bound of
-     the array; in this case the lower bound is zero.  If two arguments
-     are given, the first argument is the lower bound of the array, and
-     the second argument is the upper bound of the array.  An array's
-     length must not be negative, but the bounds can be.
-
- -- Function: Type.vector (N1 [, N2])
-     Return a new `gdb.Type' object which represents a vector of this
-     type.  If one argument is given, it is the inclusive upper bound of
-     the vector; in this case the lower bound is zero.  If two
-     arguments are given, the first argument is the lower bound of the
-     vector, and the second argument is the upper bound of the vector.
-     A vector's length must not be negative, but the bounds can be.
-
-     The difference between an `array' and a `vector' is that arrays
-     behave like in C: when used in expressions they decay to a pointer
-     to the first element whereas vectors are treated as first class
-     values.
-
- -- Function: Type.const ()
-     Return a new `gdb.Type' object which represents a
-     `const'-qualified variant of this type.
-
- -- Function: Type.volatile ()
-     Return a new `gdb.Type' object which represents a
-     `volatile'-qualified variant of this type.
-
- -- Function: Type.unqualified ()
-     Return a new `gdb.Type' object which represents an unqualified
-     variant of this type.  That is, the result is neither `const' nor
-     `volatile'.
-
- -- Function: Type.range ()
-     Return a Python `Tuple' object that contains two elements: the low
-     bound of the argument type and the high bound of that type.  If
-     the type does not have a range, GDB will raise a `gdb.error'
-     exception (*note Exception Handling::).
-
- -- Function: Type.reference ()
-     Return a new `gdb.Type' object which represents a reference to this
-     type.
-
- -- Function: Type.pointer ()
-     Return a new `gdb.Type' object which represents a pointer to this
-     type.
-
- -- Function: Type.strip_typedefs ()
-     Return a new `gdb.Type' that represents the real type, after
-     removing all layers of typedefs.
-
- -- Function: Type.target ()
-     Return a new `gdb.Type' object which represents the target type of
-     this type.
-
-     For a pointer type, the target type is the type of the pointed-to
-     object.  For an array type (meaning C-like arrays), the target
-     type is the type of the elements of the array.  For a function or
-     method type, the target type is the type of the return value.  For
-     a complex type, the target type is the type of the elements.  For
-     a typedef, the target type is the aliased type.
-
-     If the type does not have a target, this method will throw an
-     exception.
-
- -- Function: Type.template_argument (n [, block])
-     If this `gdb.Type' is an instantiation of a template, this will
-     return a new `gdb.Value' or `gdb.Type' which represents the value
-     of the Nth template argument (indexed starting at 0).
-
-     If this `gdb.Type' is not a template type, or if the type has fewer
-     than N template arguments, this will throw an exception.
-     Ordinarily, only C++ code will have template types.
-
-     If BLOCK is given, then NAME is looked up in that scope.
-     Otherwise, it is searched for globally.
-
- -- Function: Type.optimized_out ()
-     Return `gdb.Value' instance of this type whose value is optimized
-     out.  This allows a frame decorator to indicate that the value of
-     an argument or a local variable is not known.
-
-   Each type has a code, which indicates what category this type falls
-into.  The available type categories are represented by constants
-defined in the `gdb' module:
-
-`gdb.TYPE_CODE_PTR'
-     The type is a pointer.
-
-`gdb.TYPE_CODE_ARRAY'
-     The type is an array.
-
-`gdb.TYPE_CODE_STRUCT'
-     The type is a structure.
-
-`gdb.TYPE_CODE_UNION'
-     The type is a union.
-
-`gdb.TYPE_CODE_ENUM'
-     The type is an enum.
-
-`gdb.TYPE_CODE_FLAGS'
-     A bit flags type, used for things such as status registers.
-
-`gdb.TYPE_CODE_FUNC'
-     The type is a function.
-
-`gdb.TYPE_CODE_INT'
-     The type is an integer type.
-
-`gdb.TYPE_CODE_FLT'
-     A floating point type.
-
-`gdb.TYPE_CODE_VOID'
-     The special type `void'.
-
-`gdb.TYPE_CODE_SET'
-     A Pascal set type.
-
-`gdb.TYPE_CODE_RANGE'
-     A range type, that is, an integer type with bounds.
-
-`gdb.TYPE_CODE_STRING'
-     A string type.  Note that this is only used for certain languages
-     with language-defined string types; C strings are not represented
-     this way.
-
-`gdb.TYPE_CODE_BITSTRING'
-     A string of bits.  It is deprecated.
-
-`gdb.TYPE_CODE_ERROR'
-     An unknown or erroneous type.
-
-`gdb.TYPE_CODE_METHOD'
-     A method type, as found in C++ or Java.
-
-`gdb.TYPE_CODE_METHODPTR'
-     A pointer-to-member-function.
-
-`gdb.TYPE_CODE_MEMBERPTR'
-     A pointer-to-member.
-
-`gdb.TYPE_CODE_REF'
-     A reference type.
-
-`gdb.TYPE_CODE_CHAR'
-     A character type.
-
-`gdb.TYPE_CODE_BOOL'
-     A boolean type.
-
-`gdb.TYPE_CODE_COMPLEX'
-     A complex float type.
-
-`gdb.TYPE_CODE_TYPEDEF'
-     A typedef to some other type.
-
-`gdb.TYPE_CODE_NAMESPACE'
-     A C++ namespace.
-
-`gdb.TYPE_CODE_DECFLOAT'
-     A decimal floating point type.
-
-`gdb.TYPE_CODE_INTERNAL_FUNCTION'
-     A function internal to GDB.  This is the type used to represent
-     convenience functions.
-
-   Further support for types is provided in the `gdb.types' Python
-module (*note gdb.types::).
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-4 ./gdb/doc/gdb.info-4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-4	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-4	2017-03-06 01:53:19.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,6 +37,279 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Types In Python,  Next: Pretty Printing API,  Prev: Values From Inferior,  Up: Python API
+
+23.2.2.4 Types In Python
+........................
+
+GDB represents types from the inferior using the class 'gdb.Type'.
+
+   The following type-related functions are available in the 'gdb'
+module:
+
+ -- Function: gdb.lookup_type (name [, block])
+     This function looks up a type by its NAME, which must be a string.
+
+     If BLOCK is given, then NAME is looked up in that scope.
+     Otherwise, it is searched for globally.
+
+     Ordinarily, this function will return an instance of 'gdb.Type'.
+     If the named type cannot be found, it will throw an exception.
+
+   If the type is a structure or class type, or an enum type, the fields
+of that type can be accessed using the Python "dictionary syntax".  For
+example, if 'some_type' is a 'gdb.Type' instance holding a structure
+type, you can access its 'foo' field with:
+
+     bar = some_type['foo']
+
+   'bar' will be a 'gdb.Field' object; see below under the description
+of the 'Type.fields' method for a description of the 'gdb.Field' class.
+
+   An instance of 'Type' has the following attributes:
+
+ -- Variable: Type.code
+     The type code for this type.  The type code will be one of the
+     'TYPE_CODE_' constants defined below.
+
+ -- Variable: Type.name
+     The name of this type.  If this type has no name, then 'None' is
+     returned.
+
+ -- Variable: Type.sizeof
+     The size of this type, in target 'char' units.  Usually, a target's
+     'char' type will be an 8-bit byte.  However, on some unusual
+     platforms, this type may have a different size.
+
+ -- Variable: Type.tag
+     The tag name for this type.  The tag name is the name after
+     'struct', 'union', or 'enum' in C and C++; not all languages have
+     this concept.  If this type has no tag name, then 'None' is
+     returned.
+
+   The following methods are provided:
+
+ -- Function: Type.fields ()
+     For structure and union types, this method returns the fields.
+     Range types have two fields, the minimum and maximum values.  Enum
+     types have one field per enum constant.  Function and method types
+     have one field per parameter.  The base types of C++ classes are
+     also represented as fields.  If the type has no fields, or does not
+     fit into one of these categories, an empty sequence will be
+     returned.
+
+     Each field is a 'gdb.Field' object, with some pre-defined
+     attributes:
+     'bitpos'
+          This attribute is not available for 'enum' or 'static' (as in
+          C++) fields.  The value is the position, counting in bits,
+          from the start of the containing type.
+
+     'enumval'
+          This attribute is only available for 'enum' fields, and its
+          value is the enumeration member's integer representation.
+
+     'name'
+          The name of the field, or 'None' for anonymous fields.
+
+     'artificial'
+          This is 'True' if the field is artificial, usually meaning
+          that it was provided by the compiler and not the user.  This
+          attribute is always provided, and is 'False' if the field is
+          not artificial.
+
+     'is_base_class'
+          This is 'True' if the field represents a base class of a C++
+          structure.  This attribute is always provided, and is 'False'
+          if the field is not a base class of the type that is the
+          argument of 'fields', or if that type was not a C++ class.
+
+     'bitsize'
+          If the field is packed, or is a bitfield, then this will have
+          a non-zero value, which is the size of the field in bits.
+          Otherwise, this will be zero; in this case the field's size is
+          given by its type.
+
+     'type'
+          The type of the field.  This is usually an instance of 'Type',
+          but it can be 'None' in some situations.
+
+     'parent_type'
+          The type which contains this field.  This is an instance of
+          'gdb.Type'.
+
+ -- Function: Type.array (N1 [, N2])
+     Return a new 'gdb.Type' object which represents an array of this
+     type.  If one argument is given, it is the inclusive upper bound of
+     the array; in this case the lower bound is zero.  If two arguments
+     are given, the first argument is the lower bound of the array, and
+     the second argument is the upper bound of the array.  An array's
+     length must not be negative, but the bounds can be.
+
+ -- Function: Type.vector (N1 [, N2])
+     Return a new 'gdb.Type' object which represents a vector of this
+     type.  If one argument is given, it is the inclusive upper bound of
+     the vector; in this case the lower bound is zero.  If two arguments
+     are given, the first argument is the lower bound of the vector, and
+     the second argument is the upper bound of the vector.  A vector's
+     length must not be negative, but the bounds can be.
+
+     The difference between an 'array' and a 'vector' is that arrays
+     behave like in C: when used in expressions they decay to a pointer
+     to the first element whereas vectors are treated as first class
+     values.
+
+ -- Function: Type.const ()
+     Return a new 'gdb.Type' object which represents a 'const'-qualified
+     variant of this type.
+
+ -- Function: Type.volatile ()
+     Return a new 'gdb.Type' object which represents a
+     'volatile'-qualified variant of this type.
+
+ -- Function: Type.unqualified ()
+     Return a new 'gdb.Type' object which represents an unqualified
+     variant of this type.  That is, the result is neither 'const' nor
+     'volatile'.
+
+ -- Function: Type.range ()
+     Return a Python 'Tuple' object that contains two elements: the low
+     bound of the argument type and the high bound of that type.  If the
+     type does not have a range, GDB will raise a 'gdb.error' exception
+     (*note Exception Handling::).
+
+ -- Function: Type.reference ()
+     Return a new 'gdb.Type' object which represents a reference to this
+     type.
+
+ -- Function: Type.pointer ()
+     Return a new 'gdb.Type' object which represents a pointer to this
+     type.
+
+ -- Function: Type.strip_typedefs ()
+     Return a new 'gdb.Type' that represents the real type, after
+     removing all layers of typedefs.
+
+ -- Function: Type.target ()
+     Return a new 'gdb.Type' object which represents the target type of
+     this type.
+
+     For a pointer type, the target type is the type of the pointed-to
+     object.  For an array type (meaning C-like arrays), the target type
+     is the type of the elements of the array.  For a function or method
+     type, the target type is the type of the return value.  For a
+     complex type, the target type is the type of the elements.  For a
+     typedef, the target type is the aliased type.
+
+     If the type does not have a target, this method will throw an
+     exception.
+
+ -- Function: Type.template_argument (n [, block])
+     If this 'gdb.Type' is an instantiation of a template, this will
+     return a new 'gdb.Value' or 'gdb.Type' which represents the value
+     of the Nth template argument (indexed starting at 0).
+
+     If this 'gdb.Type' is not a template type, or if the type has fewer
+     than N template arguments, this will throw an exception.
+     Ordinarily, only C++ code will have template types.
+
+     If BLOCK is given, then NAME is looked up in that scope.
+     Otherwise, it is searched for globally.
+
+ -- Function: Type.optimized_out ()
+     Return 'gdb.Value' instance of this type whose value is optimized
+     out.  This allows a frame decorator to indicate that the value of
+     an argument or a local variable is not known.
+
+   Each type has a code, which indicates what category this type falls
+into.  The available type categories are represented by constants
+defined in the 'gdb' module:
+
+'gdb.TYPE_CODE_PTR'
+     The type is a pointer.
+
+'gdb.TYPE_CODE_ARRAY'
+     The type is an array.
+
+'gdb.TYPE_CODE_STRUCT'
+     The type is a structure.
+
+'gdb.TYPE_CODE_UNION'
+     The type is a union.
+
+'gdb.TYPE_CODE_ENUM'
+     The type is an enum.
+
+'gdb.TYPE_CODE_FLAGS'
+     A bit flags type, used for things such as status registers.
+
+'gdb.TYPE_CODE_FUNC'
+     The type is a function.
+
+'gdb.TYPE_CODE_INT'
+     The type is an integer type.
+
+'gdb.TYPE_CODE_FLT'
+     A floating point type.
+
+'gdb.TYPE_CODE_VOID'
+     The special type 'void'.
+
+'gdb.TYPE_CODE_SET'
+     A Pascal set type.
+
+'gdb.TYPE_CODE_RANGE'
+     A range type, that is, an integer type with bounds.
+
+'gdb.TYPE_CODE_STRING'
+     A string type.  Note that this is only used for certain languages
+     with language-defined string types; C strings are not represented
+     this way.
+
+'gdb.TYPE_CODE_BITSTRING'
+     A string of bits.  It is deprecated.
+
+'gdb.TYPE_CODE_ERROR'
+     An unknown or erroneous type.
+
+'gdb.TYPE_CODE_METHOD'
+     A method type, as found in C++.
+
+'gdb.TYPE_CODE_METHODPTR'
+     A pointer-to-member-function.
+
+'gdb.TYPE_CODE_MEMBERPTR'
+     A pointer-to-member.
+
+'gdb.TYPE_CODE_REF'
+     A reference type.
+
+'gdb.TYPE_CODE_CHAR'
+     A character type.
+
+'gdb.TYPE_CODE_BOOL'
+     A boolean type.
+
+'gdb.TYPE_CODE_COMPLEX'
+     A complex float type.
+
+'gdb.TYPE_CODE_TYPEDEF'
+     A typedef to some other type.
+
+'gdb.TYPE_CODE_NAMESPACE'
+     A C++ namespace.
+
+'gdb.TYPE_CODE_DECFLOAT'
+     A decimal floating point type.
+
+'gdb.TYPE_CODE_INTERNAL_FUNCTION'
+     A function internal to GDB.  This is the type used to represent
+     convenience functions.
+
+   Further support for types is provided in the 'gdb.types' Python
+module (*note gdb.types::).
+
+
 File: gdb.info,  Node: Pretty Printing API,  Next: Selecting Pretty-Printers,  Prev: Types In Python,  Up: Python API
 
 23.2.2.5 Pretty Printing API
@@ -64,68 +336,68 @@ a specific interface, defined here.
  -- Function: pretty_printer.display_hint (self)
      The CLI may call this method and use its result to change the
      formatting of a value.  The result will also be supplied to an MI
-     consumer as a `displayhint' attribute of the variable being
+     consumer as a 'displayhint' attribute of the variable being
      printed.
 
-     This method is optional.  If it does exist, this method must
-     return a string.
+     This method is optional.  If it does exist, this method must return
+     a string.
 
      Some display hints are predefined by GDB:
 
-    `array'
+     'array'
           Indicate that the object being printed is "array-like".  The
-          CLI uses this to respect parameters such as `set print
-          elements' and `set print array'.
+          CLI uses this to respect parameters such as 'set print
+          elements' and 'set print array'.
 
-    `map'
-          Indicate that the object being printed is "map-like", and
-          that the children of this value can be assumed to alternate
-          between keys and values.
+     'map'
+          Indicate that the object being printed is "map-like", and that
+          the children of this value can be assumed to alternate between
+          keys and values.
 
-    `string'
+     'string'
           Indicate that the object being printed is "string-like".  If
-          the printer's `to_string' method returns a Python string of
+          the printer's 'to_string' method returns a Python string of
           some kind, then GDB will call its internal language-specific
           string-printing function to format the string.  For the CLI
           this means adding quotation marks, possibly escaping some
-          characters, respecting `set print elements', and the like.
+          characters, respecting 'set print elements', and the like.
 
  -- Function: pretty_printer.to_string (self)
      GDB will call this method to display the string representation of
      the value passed to the object's constructor.
 
-     When printing from the CLI, if the `to_string' method exists, then
-     GDB will prepend its result to the values returned by `children'.
+     When printing from the CLI, if the 'to_string' method exists, then
+     GDB will prepend its result to the values returned by 'children'.
      Exactly how this formatting is done is dependent on the display
      hint, and may change as more hints are added.  Also, depending on
-     the print settings (*note Print Settings::), the CLI may print
-     just the result of `to_string' in a stack trace, omitting the
-     result of `children'.
+     the print settings (*note Print Settings::), the CLI may print just
+     the result of 'to_string' in a stack trace, omitting the result of
+     'children'.
 
      If this method returns a string, it is printed verbatim.
 
-     Otherwise, if this method returns an instance of `gdb.Value', then
+     Otherwise, if this method returns an instance of 'gdb.Value', then
      GDB prints this value.  This may result in a call to another
      pretty-printer.
 
      If instead the method returns a Python value which is convertible
-     to a `gdb.Value', then GDB performs the conversion and prints the
+     to a 'gdb.Value', then GDB performs the conversion and prints the
      resulting value.  Again, this may result in a call to another
      pretty-printer.  Python scalars (integers, floats, and booleans)
-     and strings are convertible to `gdb.Value'; other types are not.
+     and strings are convertible to 'gdb.Value'; other types are not.
 
-     Finally, if this method returns `None' then no further operations
+     Finally, if this method returns 'None' then no further operations
      are peformed in this method and nothing is printed.
 
      If the result is not one of these types, an exception is raised.
 
    GDB provides a function which can be used to look up the default
-pretty-printer for a `gdb.Value':
+pretty-printer for a 'gdb.Value':
 
  -- Function: gdb.default_visualizer (value)
-     This function takes a `gdb.Value' object as an argument.  If a
+     This function takes a 'gdb.Value' object as an argument.  If a
      pretty-printer for this value exists, then it is returned.  If no
-     such printer exists, then this returns `None'.
+     such printer exists, then this returns 'None'.
 
 
 File: gdb.info,  Node: Selecting Pretty-Printers,  Next: Writing a Pretty-Printer,  Prev: Pretty Printing API,  Up: Python API
@@ -133,26 +405,26 @@ File: gdb.info,  Node: Selecting Pretty-
 23.2.2.6 Selecting Pretty-Printers
 ..................................
 
-The Python list `gdb.pretty_printers' contains an array of functions or
+The Python list 'gdb.pretty_printers' contains an array of functions or
 callable objects that have been registered via addition as a
-pretty-printer.  Printers in this list are called `global' printers,
-they're available when debugging all inferiors.  Each `gdb.Progspace'
-contains a `pretty_printers' attribute.  Each `gdb.Objfile' also
-contains a `pretty_printers' attribute.
+pretty-printer.  Printers in this list are called 'global' printers,
+they're available when debugging all inferiors.  Each 'gdb.Progspace'
+contains a 'pretty_printers' attribute.  Each 'gdb.Objfile' also
+contains a 'pretty_printers' attribute.
 
-   Each function on these lists is passed a single `gdb.Value' argument
+   Each function on these lists is passed a single 'gdb.Value' argument
 and should return a pretty-printer object conforming to the interface
 definition above (*note Pretty Printing API::).  If a function cannot
-create a pretty-printer for the value, it should return `None'.
+create a pretty-printer for the value, it should return 'None'.
 
-   GDB first checks the `pretty_printers' attribute of each
-`gdb.Objfile' in the current program space and iteratively calls each
-enabled lookup routine in the list for that `gdb.Objfile' until it
+   GDB first checks the 'pretty_printers' attribute of each
+'gdb.Objfile' in the current program space and iteratively calls each
+enabled lookup routine in the list for that 'gdb.Objfile' until it
 receives a pretty-printer object.  If no pretty-printer is found in the
 objfile lists, GDB then searches the pretty-printer list of the current
 program space, calling each enabled function until an object is
 returned.  After these lists have been exhausted, it tries the global
-`gdb.pretty_printers' list, again calling each enabled function until an
+'gdb.pretty_printers' list, again calling each enabled function until an
 object is returned.
 
    The order in which the objfiles are searched is not specified.  For a
@@ -161,17 +433,17 @@ iterated over sequentially until the end
 object is returned.
 
    For various reasons a pretty-printer may not work.  For example, the
-underlying data structure may have changed and the pretty-printer is
-out of date.
+underlying data structure may have changed and the pretty-printer is out
+of date.
 
    The consequences of a broken pretty-printer are severe enough that
 GDB provides support for enabling and disabling individual printers.
-For example, if `print frame-arguments' is on, a backtrace can become
+For example, if 'print frame-arguments' is on, a backtrace can become
 highly illegible if any argument is printed with a broken printer.
 
-   Pretty-printers are enabled and disabled by attaching an `enabled'
+   Pretty-printers are enabled and disabled by attaching an 'enabled'
 attribute to the registered function or callable object.  If this
-attribute is present and its value is `False', the printer is disabled,
+attribute is present and its value is 'False', the printer is disabled,
 otherwise the printer is enabled.
 
 
@@ -183,7 +455,7 @@ File: gdb.info,  Node: Writing a Pretty-
 A pretty-printer consists of two parts: a lookup function to detect if
 the type is supported, and the printer itself.
 
-   Here is an example showing how a `std::string' printer might be
+   Here is an example showing how a 'std::string' printer might be
 written.  *Note Pretty Printing API::, for details on the API this class
 must provide.
 
@@ -214,32 +486,32 @@ example above might be written.
    The example lookup function extracts the value's type, and attempts
 to match it to a type that it can pretty-print.  If it is a type the
 printer can pretty-print, it will return a printer object.  If not, it
-returns `None'.
+returns 'None'.
 
    We recommend that you put your core pretty-printers into a Python
-package.  If your pretty-printers are for use with a library, we
-further recommend embedding a version number into the package name.
-This practice will enable GDB to load multiple versions of your
+package.  If your pretty-printers are for use with a library, we further
+recommend embedding a version number into the package name.  This
+practice will enable GDB to load multiple versions of your
 pretty-printers at the same time, because they will have different
 names.
 
    You should write auto-loaded code (*note Python Auto-loading::) such
 that it can be evaluated multiple times without changing its meaning.
-An ideal auto-load file will consist solely of `import's of your
-printer modules, followed by a call to a register pretty-printers with
-the current objfile.
+An ideal auto-load file will consist solely of 'import's of your printer
+modules, followed by a call to a register pretty-printers with the
+current objfile.
 
    Taken as a whole, this approach will scale nicely to multiple
 inferiors, each potentially using a different library version.
 Embedding a version number in the Python package name will ensure that
-GDB is able to load both sets of printers simultaneously.  Then,
-because the search for pretty-printers is done by objfile, and because
-your auto-loaded code took care to register your library's printers
-with a specific objfile, GDB will find the correct printers for the
-specific version of the library used by each inferior.
+GDB is able to load both sets of printers simultaneously.  Then, because
+the search for pretty-printers is done by objfile, and because your
+auto-loaded code took care to register your library's printers with a
+specific objfile, GDB will find the correct printers for the specific
+version of the library used by each inferior.
 
-   To continue the `std::string' example (*note Pretty Printing API::),
-this code might appear in `gdb.libstdcxx.v6':
+   To continue the 'std::string' example (*note Pretty Printing API::),
+this code might appear in 'gdb.libstdcxx.v6':
 
      def register_printers(objfile):
          objfile.pretty_printers.append(str_lookup_function)
@@ -249,8 +521,8 @@ And then the corresponding contents of t
      import gdb.libstdcxx.v6
      gdb.libstdcxx.v6.register_printers(gdb.current_objfile())
 
-   The previous example illustrates a basic pretty-printer.  There are
-a few things that can be improved on.  The printer doesn't have a name,
+   The previous example illustrates a basic pretty-printer.  There are a
+few things that can be improved on.  The printer doesn't have a name,
 making it hard to identify in a list of installed printers.  The lookup
 function has a name, but lookup functions can have arbitrary, even
 identical, names.
@@ -258,12 +530,12 @@ identical, names.
    Second, the printer only handles one type, whereas a library
 typically has several types.  One could install a lookup function for
 each desired type in the library, but one could also have a single
-lookup function recognize several types.  The latter is the
-conventional way this is handled.  If a pretty-printer can handle
-multiple data types, then its "subprinters" are the printers for the
-individual data types.
+lookup function recognize several types.  The latter is the conventional
+way this is handled.  If a pretty-printer can handle multiple data
+types, then its "subprinters" are the printers for the individual data
+types.
 
-   The `gdb.printing' module provides a formal way of solving these
+   The 'gdb.printing' module provides a formal way of solving these
 problems (*note gdb.printing::).  Here is another example that handles
 multiple types.
 
@@ -295,7 +567,7 @@ multiple types.
                      "> y=<" + str(self.val["y"]) + ">")
 
    This example doesn't need a lookup function, that is handled by the
-`gdb.printing' module.  Instead a function is provided to build up the
+'gdb.printing' module.  Instead a function is provided to build up the
 object that handles the lookup.
 
      import gdb.printing
@@ -316,7 +588,7 @@ object that handles the lookup.
          my_library.build_pretty_printer())
 
    Finally, when this printer is loaded into GDB, here is the
-corresponding output of `info pretty-printer':
+corresponding output of 'info pretty-printer':
 
      (gdb) info pretty-printer
      my_library.so:
@@ -339,47 +611,45 @@ see *note gdb.types::.  A type printer m
 
  -- Instance Variable of type_printer: enabled
      A boolean which is True if the printer is enabled, and False
-     otherwise.  This is manipulated by the `enable type-printer' and
-     `disable type-printer' commands.
+     otherwise.  This is manipulated by the 'enable type-printer' and
+     'disable type-printer' commands.
 
  -- Instance Variable of type_printer: name
-     The name of the type printer.  This must be a string.  This is
-     used by the `enable type-printer' and `disable type-printer'
-     commands.
+     The name of the type printer.  This must be a string.  This is used
+     by the 'enable type-printer' and 'disable type-printer' commands.
 
  -- Method on type_printer: instantiate (self)
      This is called by GDB at the start of type-printing.  It is only
      called if the type printer is enabled.  This method must return a
-     new object that supplies a `recognize' method, as described below.
+     new object that supplies a 'recognize' method, as described below.
 
-   When displaying a type, say via the `ptype' command, GDB will
-compute a list of type recognizers.  This is done by iterating first
-over the per-objfile type printers (*note Objfiles In Python::),
-followed by the per-progspace type printers (*note Progspaces In
-Python::), and finally the global type printers.
-
-   GDB will call the `instantiate' method of each enabled type printer.
-If this method returns `None', then the result is ignored; otherwise,
-it is appended to the list of recognizers.
+   When displaying a type, say via the 'ptype' command, GDB will compute
+a list of type recognizers.  This is done by iterating first over the
+per-objfile type printers (*note Objfiles In Python::), followed by the
+per-progspace type printers (*note Progspaces In Python::), and finally
+the global type printers.
+
+   GDB will call the 'instantiate' method of each enabled type printer.
+If this method returns 'None', then the result is ignored; otherwise, it
+is appended to the list of recognizers.
 
    Then, when GDB is going to display a type name, it iterates over the
 list of recognizers.  For each one, it calls the recognition function,
-stopping if the function returns a non-`None' value.  The recognition
+stopping if the function returns a non-'None' value.  The recognition
 function is defined as:
 
  -- Method on type_recognizer: recognize (self, type)
-     If TYPE is not recognized, return `None'.  Otherwise, return a
+     If TYPE is not recognized, return 'None'.  Otherwise, return a
      string which is to be printed as the name of TYPE.  The TYPE
-     argument will be an instance of `gdb.Type' (*note Types In
+     argument will be an instance of 'gdb.Type' (*note Types In
      Python::).
 
-   GDB uses this two-pass approach so that type printers can
-efficiently cache information without holding on to it too long.  For
-example, it can be convenient to look up type information in a type
-printer and hold it for a recognizer's lifetime; if a single pass were
-done then type printers would have to make use of the event system in
-order to avoid holding information that could become stale as the
-inferior changed.
+   GDB uses this two-pass approach so that type printers can efficiently
+cache information without holding on to it too long.  For example, it
+can be convenient to look up type information in a type printer and hold
+it for a recognizer's lifetime; if a single pass were done then type
+printers would have to make use of the event system in order to avoid
+holding information that could become stale as the inferior changed.
 
 
 File: gdb.info,  Node: Frame Filter API,  Next: Frame Decorator API,  Prev: Type Printing API,  Up: Python API
@@ -394,31 +664,31 @@ frame or frames when a backtrace (*note 
 commands (*note GDB/MI::), those that return a collection of frames are
 affected.  The commands that work with frame filters are:
 
-   `backtrace' (*note The backtrace command: backtrace-command.),
-`-stack-list-frames' (*note The -stack-list-frames command:
--stack-list-frames.), `-stack-list-variables' (*note The
+   'backtrace' (*note The backtrace command: backtrace-command.),
+'-stack-list-frames' (*note The -stack-list-frames command:
+-stack-list-frames.), '-stack-list-variables' (*note The
 -stack-list-variables command: -stack-list-variables.),
-`-stack-list-arguments' *note The -stack-list-arguments command:
--stack-list-arguments.) and `-stack-list-locals' (*note The
+'-stack-list-arguments' *note The -stack-list-arguments command:
+-stack-list-arguments.) and '-stack-list-locals' (*note The
 -stack-list-locals command: -stack-list-locals.).
 
    A frame filter works by taking an iterator as an argument, applying
-actions to the contents of that iterator, and returning another
-iterator (or, possibly, the same iterator it was provided in the case
-where the filter does not perform any operations).  Typically, frame
-filters utilize tools such as the Python's `itertools' module to work
-with and create new iterators from the source iterator.  Regardless of
-how a filter chooses to apply actions, it must not alter the underlying
-GDB frame or frames, or attempt to alter the call-stack within GDB.
-This preserves data integrity within GDB.  Frame filters are executed
-on a priority basis and care should be taken that some frame filters
-may have been executed before, and that some frame filters will be
-executed after.
+actions to the contents of that iterator, and returning another iterator
+(or, possibly, the same iterator it was provided in the case where the
+filter does not perform any operations).  Typically, frame filters
+utilize tools such as the Python's 'itertools' module to work with and
+create new iterators from the source iterator.  Regardless of how a
+filter chooses to apply actions, it must not alter the underlying GDB
+frame or frames, or attempt to alter the call-stack within GDB.  This
+preserves data integrity within GDB.  Frame filters are executed on a
+priority basis and care should be taken that some frame filters may have
+been executed before, and that some frame filters will be executed
+after.
 
    An important consideration when designing frame filters, and well
 worth reflecting upon, is that frame filters should avoid unwinding the
-call stack if possible.  Some stacks can run very deep, into the tens
-of thousands in some cases.  To search every frame when a frame filter
+call stack if possible.  Some stacks can run very deep, into the tens of
+thousands in some cases.  To search every frame when a frame filter
 executes may be too expensive at that step.  The frame filter cannot
 know how many frames it has to iterate over, and it may have to iterate
 through them all.  This ends up duplicating effort as GDB performs this
@@ -429,37 +699,36 @@ on decorators.  Also, there are examples
 filters in later chapters.  *Note Writing a Frame Filter::, for more
 information.
 
-   The Python dictionary `gdb.frame_filters' contains key/object
-pairings that comprise a frame filter.  Frame filters in this
-dictionary are called `global' frame filters, and they are available
-when debugging all inferiors.  These frame filters must register with
-the dictionary directly.  In addition to the `global' dictionary, there
-are other dictionaries that are loaded with different inferiors via
-auto-loading (*note Python Auto-loading::).  The two other areas where
-frame filter dictionaries can be found are: `gdb.Progspace' which
-contains a `frame_filters' dictionary attribute, and each `gdb.Objfile'
-object which also contains a `frame_filters' dictionary attribute.
+   The Python dictionary 'gdb.frame_filters' contains key/object
+pairings that comprise a frame filter.  Frame filters in this dictionary
+are called 'global' frame filters, and they are available when debugging
+all inferiors.  These frame filters must register with the dictionary
+directly.  In addition to the 'global' dictionary, there are other
+dictionaries that are loaded with different inferiors via auto-loading
+(*note Python Auto-loading::).  The two other areas where frame filter
+dictionaries can be found are: 'gdb.Progspace' which contains a
+'frame_filters' dictionary attribute, and each 'gdb.Objfile' object
+which also contains a 'frame_filters' dictionary attribute.
 
    When a command is executed from GDB that is compatible with frame
-filters, GDB combines the `global', `gdb.Progspace' and all
-`gdb.Objfile' dictionaries currently loaded.  All of the `gdb.Objfile'
+filters, GDB combines the 'global', 'gdb.Progspace' and all
+'gdb.Objfile' dictionaries currently loaded.  All of the 'gdb.Objfile'
 dictionaries are combined, as several frames, and thus several object
 files, might be in use.  GDB then prunes any frame filter whose
-`enabled' attribute is `False'.  This pruned list is then sorted
-according to the `priority' attribute in each filter.
+'enabled' attribute is 'False'.  This pruned list is then sorted
+according to the 'priority' attribute in each filter.
 
-   Once the dictionaries are combined, pruned and sorted, GDB creates
-an iterator which wraps each frame in the call stack in a
-`FrameDecorator' object, and calls each filter in order.  The output
-from the previous filter will always be the input to the next filter,
-and so on.
+   Once the dictionaries are combined, pruned and sorted, GDB creates an
+iterator which wraps each frame in the call stack in a 'FrameDecorator'
+object, and calls each filter in order.  The output from the previous
+filter will always be the input to the next filter, and so on.
 
    Frame filters have a mandatory interface which each frame filter must
 implement, defined here:
 
  -- Function: FrameFilter.filter (iterator)
-     GDB will call this method on a frame filter when it has reached
-     the order in the priority list for that filter.
+     GDB will call this method on a frame filter when it has reached the
+     order in the priority list for that filter.
 
      For example, if there are four frame filters:
 
@@ -474,20 +743,19 @@ implement, defined here:
 
           Filter3 -> Filter2 -> Filter1 -> Filter4
 
-     Note that the output from `Filter3' is passed to the input of
-     `Filter2', and so on.
+     Note that the output from 'Filter3' is passed to the input of
+     'Filter2', and so on.
 
-     This `filter' method is passed a Python iterator.  This iterator
-     contains a sequence of frame decorators that wrap each
-     `gdb.Frame', or a frame decorator that wraps another frame
-     decorator.  The first filter that is executed in the sequence of
-     frame filters will receive an iterator entirely comprised of
-     default `FrameDecorator' objects.  However, after each frame
-     filter is executed, the previous frame filter may have wrapped
-     some or all of the frame decorators with their own frame
-     decorator.  As frame decorators must also conform to a mandatory
-     interface, these decorators can be assumed to act in a uniform
-     manner (*note Frame Decorator API::).
+     This 'filter' method is passed a Python iterator.  This iterator
+     contains a sequence of frame decorators that wrap each 'gdb.Frame',
+     or a frame decorator that wraps another frame decorator.  The first
+     filter that is executed in the sequence of frame filters will
+     receive an iterator entirely comprised of default 'FrameDecorator'
+     objects.  However, after each frame filter is executed, the
+     previous frame filter may have wrapped some or all of the frame
+     decorators with their own frame decorator.  As frame decorators
+     must also conform to a mandatory interface, these decorators can be
+     assumed to act in a uniform manner (*note Frame Decorator API::).
 
      This method must return an object conforming to the Python iterator
      protocol.  Each item in the iterator must be an object conforming
@@ -499,28 +767,28 @@ implement, defined here:
      and print an error.
 
  -- Variable: FrameFilter.name
-     The `name' attribute must be Python string which contains the name
+     The 'name' attribute must be Python string which contains the name
      of the filter displayed by GDB (*note Frame Filter Management::).
      This attribute may contain any combination of letters or numbers.
      Care should be taken to ensure that it is unique.  This attribute
      is mandatory.
 
  -- Variable: FrameFilter.enabled
-     The `enabled' attribute must be Python boolean.  This attribute
-     indicates to GDB whether the frame filter is enabled, and should
-     be considered when frame filters are executed.  If `enabled' is
-     `True', then the frame filter will be executed when any of the
+     The 'enabled' attribute must be Python boolean.  This attribute
+     indicates to GDB whether the frame filter is enabled, and should be
+     considered when frame filters are executed.  If 'enabled' is
+     'True', then the frame filter will be executed when any of the
      backtrace commands detailed earlier in this chapter are executed.
-     If `enabled' is `False', then the frame filter will not be
+     If 'enabled' is 'False', then the frame filter will not be
      executed.  This attribute is mandatory.
 
  -- Variable: FrameFilter.priority
-     The `priority' attribute must be Python integer.  This attribute
+     The 'priority' attribute must be Python integer.  This attribute
      controls the order of execution in relation to other frame filters.
-     There are no imposed limits on the range of `priority' other than
-     it must be a valid integer.  The higher the `priority' attribute,
+     There are no imposed limits on the range of 'priority' other than
+     it must be a valid integer.  The higher the 'priority' attribute,
      the sooner the frame filter will be executed in relation to other
-     frame filters.  Although `priority' can be negative, it is
+     frame filters.  Although 'priority' can be negative, it is
      recommended practice to assume zero is the lowest priority that a
      frame filter can be assigned.  Frame filters that have the same
      priority are executed in unsorted order in that priority slot.
@@ -532,97 +800,102 @@ File: gdb.info,  Node: Frame Decorator A
 23.2.2.10 Decorating Frames.
 ............................
 
-Frame decorators are sister objects to frame filters (*note Frame
-Filter API::).  Frame decorators are applied by a frame filter and can
-only be used in conjunction with frame filters.
+Frame decorators are sister objects to frame filters (*note Frame Filter
+API::).  Frame decorators are applied by a frame filter and can only be
+used in conjunction with frame filters.
 
    The purpose of a frame decorator is to customize the printed content
-of each `gdb.Frame' in commands where frame filters are executed.  This
+of each 'gdb.Frame' in commands where frame filters are executed.  This
 concept is called decorating a frame.  Frame decorators decorate a
-`gdb.Frame' with Python code contained within each API call.  This
-separates the actual data contained in a `gdb.Frame' from the decorated
+'gdb.Frame' with Python code contained within each API call.  This
+separates the actual data contained in a 'gdb.Frame' from the decorated
 data produced by a frame decorator.  This abstraction is necessary to
-maintain integrity of the data contained in each `gdb.Frame'.
+maintain integrity of the data contained in each 'gdb.Frame'.
 
    Frame decorators have a mandatory interface, defined below.
 
-   GDB already contains a frame decorator called `FrameDecorator'.
-This contains substantial amounts of boilerplate code to decorate the
-content of a `gdb.Frame'.  It is recommended that other frame
-decorators inherit and extend this object, and only to override the
-methods needed.
+   GDB already contains a frame decorator called 'FrameDecorator'.  This
+contains substantial amounts of boilerplate code to decorate the content
+of a 'gdb.Frame'.  It is recommended that other frame decorators inherit
+and extend this object, and only to override the methods needed.
 
  -- Function: FrameDecorator.elided (self)
-     The `elided' method groups frames together in a hierarchical
+
+     The 'elided' method groups frames together in a hierarchical
      system.  An example would be an interpreter, where multiple
-     low-level frames make up a single call in the interpreted
-     language.  In this example, the frame filter would elide the
-     low-level frames and present a single high-level frame,
-     representing the call in the interpreted language, to the user.
+     low-level frames make up a single call in the interpreted language.
+     In this example, the frame filter would elide the low-level frames
+     and present a single high-level frame, representing the call in the
+     interpreted language, to the user.
 
-     The `elided' function must return an iterable and this iterable
+     The 'elided' function must return an iterable and this iterable
      must contain the frames that are being elided wrapped in a suitable
      frame decorator.  If no frames are being elided this function may
-     return an empty iterable, or `None'.  Elided frames are indented
-     from normal frames in a `CLI' backtrace, or in the case of
-     `GDB/MI', are placed in the `children' field of the eliding frame.
+     return an empty iterable, or 'None'.  Elided frames are indented
+     from normal frames in a 'CLI' backtrace, or in the case of
+     'GDB/MI', are placed in the 'children' field of the eliding frame.
 
      It is the frame filter's task to also filter out the elided frames
      from the source iterator.  This will avoid printing the frame
      twice.
 
  -- Function: FrameDecorator.function (self)
+
      This method returns the name of the function in the frame that is
      to be printed.
 
      This method must return a Python string describing the function, or
-     `None'.
+     'None'.
 
-     If this function returns `None', GDB will not print any data for
+     If this function returns 'None', GDB will not print any data for
      this field.
 
  -- Function: FrameDecorator.address (self)
+
      This method returns the address of the frame that is to be printed.
 
      This method must return a Python numeric integer type of sufficient
-     size to describe the address of the frame, or `None'.
+     size to describe the address of the frame, or 'None'.
 
-     If this function returns a `None', GDB will not print any data for
+     If this function returns a 'None', GDB will not print any data for
      this field.
 
  -- Function: FrameDecorator.filename (self)
+
      This method returns the filename and path associated with this
      frame.
 
      This method must return a Python string containing the filename and
-     the path to the object file backing the frame, or `None'.
+     the path to the object file backing the frame, or 'None'.
 
-     If this function returns a `None', GDB will not print any data for
+     If this function returns a 'None', GDB will not print any data for
      this field.
 
  -- Function: FrameDecorator.line (self):
+
      This method returns the line number associated with the current
      position within the function addressed by this frame.
 
-     This method must return a Python integer type, or `None'.
+     This method must return a Python integer type, or 'None'.
 
-     If this function returns a `None', GDB will not print any data for
+     If this function returns a 'None', GDB will not print any data for
      this field.
 
  -- Function: FrameDecorator.frame_args (self)
-     This method must return an iterable, or `None'.  Returning an
-     empty iterable, or `None' means frame arguments will not be
-     printed for this frame.  This iterable must contain objects that
-     implement two methods, described here.
-
-     This object must implement a `argument' method which takes a
-     single `self' parameter and must return a `gdb.Symbol' (*note
-     Symbols In Python::), or a Python string.  The object must also
-     implement a `value' method which takes a single `self' parameter
-     and must return a `gdb.Value' (*note Values From Inferior::), a
-     Python value, or `None'.  If the `value' method returns `None',
-     and the `argument' method returns a `gdb.Symbol', GDB will look-up
-     and print the value of the `gdb.Symbol' automatically.
+
+     This method must return an iterable, or 'None'.  Returning an empty
+     iterable, or 'None' means frame arguments will not be printed for
+     this frame.  This iterable must contain objects that implement two
+     methods, described here.
+
+     This object must implement a 'argument' method which takes a single
+     'self' parameter and must return a 'gdb.Symbol' (*note Symbols In
+     Python::), or a Python string.  The object must also implement a
+     'value' method which takes a single 'self' parameter and must
+     return a 'gdb.Value' (*note Values From Inferior::), a Python
+     value, or 'None'.  If the 'value' method returns 'None', and the
+     'argument' method returns a 'gdb.Symbol', GDB will look-up and
+     print the value of the 'gdb.Symbol' automatically.
 
      A brief example:
 
@@ -661,13 +934,14 @@ methods needed.
                   return args
 
  -- Function: FrameDecorator.frame_locals (self)
-     This method must return an iterable or `None'.  Returning an empty
-     iterable, or `None' means frame local arguments will not be
-     printed for this frame.
+
+     This method must return an iterable or 'None'.  Returning an empty
+     iterable, or 'None' means frame local arguments will not be printed
+     for this frame.
 
      The object interface, the description of the various strategies for
      reading frame locals, and the example are largely similar to those
-     described in the `frame_args' function, (*note The frame filter
+     described in the 'frame_args' function, (*note The frame filter
      frame_args function: frame_args.).  Below is a modified example:
 
           class SomeFrameDecorator()
@@ -693,10 +967,11 @@ methods needed.
                   return vars
 
  -- Function: FrameDecorator.inferior_frame (self):
-     This method must return the underlying `gdb.Frame' that this frame
+
+     This method must return the underlying 'gdb.Frame' that this frame
      decorator is decorating.  GDB requires the underlying frame for
-     internal frame information to determine how to print certain
-     values when printing a frame.
+     internal frame information to determine how to print certain values
+     when printing a frame.
 
 
 File: gdb.info,  Node: Writing a Frame Filter,  Next: Unwinding Frames in Python,  Prev: Frame Decorator API,  Up: Python API
@@ -706,11 +981,10 @@ File: gdb.info,  Node: Writing a Frame F
 
 There are three basic elements that a frame filter must implement: it
 must correctly implement the documented interface (*note Frame Filter
-API::), it must register itself with GDB, and finally, it must decide
-if it is to work on the data provided by GDB.  In all cases, whether it
-works on the iterator or not, each frame filter must return an
-iterator.  A bare-bones frame filter follows the pattern in the
-following example.
+API::), it must register itself with GDB, and finally, it must decide if
+it is to work on the data provided by GDB.  In all cases, whether it
+works on the iterator or not, each frame filter must return an iterator.
+A bare-bones frame filter follows the pattern in the following example.
 
      import gdb
 
@@ -745,42 +1019,42 @@ registers, and makes a decision on the i
 returns the iterator untouched).
 
    The first step is attribute creation and assignment, and as shown in
-the comments the filter assigns the following attributes:  `name',
-`priority' and whether the filter should be enabled with the `enabled'
+the comments the filter assigns the following attributes: 'name',
+'priority' and whether the filter should be enabled with the 'enabled'
 attribute.
 
    The second step is registering the frame filter with the dictionary
 or dictionaries that the frame filter has interest in.  As shown in the
 comments, this filter just registers itself with the global dictionary
-`gdb.frame_filters'.  As noted earlier, `gdb.frame_filters' is a
-dictionary that is initialized in the `gdb' module when GDB starts.
+'gdb.frame_filters'.  As noted earlier, 'gdb.frame_filters' is a
+dictionary that is initialized in the 'gdb' module when GDB starts.
 What dictionary a filter registers with is an important consideration.
 Generally, if a filter is specific to a set of code, it should be
-registered either in the `objfile' or `progspace' dictionaries as they
+registered either in the 'objfile' or 'progspace' dictionaries as they
 are specific to the program currently loaded in GDB.  The global
 dictionary is always present in GDB and is never unloaded.  Any filters
 registered with the global dictionary will exist until GDB exits.  To
 avoid filters that may conflict, it is generally better to register
 frame filters against the dictionaries that more closely align with the
-usage of the filter currently in question.  *Note Python
-Auto-loading::, for further information on auto-loading Python scripts.
+usage of the filter currently in question.  *Note Python Auto-loading::,
+for further information on auto-loading Python scripts.
 
    GDB takes a hands-off approach to frame filter registration,
-therefore it is the frame filter's responsibility to ensure
-registration has occurred, and that any exceptions are handled
-appropriately.  In particular, you may wish to handle exceptions
-relating to Python dictionary key uniqueness.  It is mandatory that the
-dictionary key is the same as frame filter's `name' attribute.  When a
-user manages frame filters (*note Frame Filter Management::), the names
-GDB will display are those contained in the `name' attribute.
-
-   The final step of this example is the implementation of the `filter'
-method.  As shown in the example comments, we define the `filter'
-method and note that the method must take an iterator, and also must
-return an iterator.  In this bare-bones example, the frame filter is
-not very useful as it just returns the iterator untouched.  However
-this is a valid operation for frame filters that have the `enabled'
-attribute set, but decide not to operate on any frames.
+therefore it is the frame filter's responsibility to ensure registration
+has occurred, and that any exceptions are handled appropriately.  In
+particular, you may wish to handle exceptions relating to Python
+dictionary key uniqueness.  It is mandatory that the dictionary key is
+the same as frame filter's 'name' attribute.  When a user manages frame
+filters (*note Frame Filter Management::), the names GDB will display
+are those contained in the 'name' attribute.
+
+   The final step of this example is the implementation of the 'filter'
+method.  As shown in the example comments, we define the 'filter' method
+and note that the method must take an iterator, and also must return an
+iterator.  In this bare-bones example, the frame filter is not very
+useful as it just returns the iterator untouched.  However this is a
+valid operation for frame filters that have the 'enabled' attribute set,
+but decide not to operate on any frames.
 
    In the next example, the frame filter operates on all frames and
 utilizes a frame decorator to perform some work on the frames.  *Note
@@ -789,33 +1063,33 @@ interface.
 
    This example works on inlined frames.  It highlights frames which are
 inlined by tagging them with an "[inlined]" tag.  By applying a frame
-decorator to all frames with the Python `itertools imap' method, the
+decorator to all frames with the Python 'itertools imap' method, the
 example defers actions to the frame decorator.  Frame decorators are
 only processed when GDB prints the backtrace.
 
    This introduces a new decision making topic: whether to perform
 decision making operations at the filtering step, or at the printing
 step.  In this example's approach, it does not perform any filtering
-decisions at the filtering step beyond mapping a frame decorator to
-each frame.  This allows the actual decision making to be performed
-when each frame is printed.  This is an important consideration, and
-well worth reflecting upon when designing a frame filter.  An issue
-that frame filters should avoid is unwinding the stack if possible.
-Some stacks can run very deep, into the tens of thousands in some
-cases.  To search every frame to determine if it is inlined ahead of
-time may be too expensive at the filtering step.  The frame filter
-cannot know how many frames it has to iterate over, and it would have
-to iterate through them all.  This ends up duplicating effort as GDB
-performs this iteration when it prints the frames.
+decisions at the filtering step beyond mapping a frame decorator to each
+frame.  This allows the actual decision making to be performed when each
+frame is printed.  This is an important consideration, and well worth
+reflecting upon when designing a frame filter.  An issue that frame
+filters should avoid is unwinding the stack if possible.  Some stacks
+can run very deep, into the tens of thousands in some cases.  To search
+every frame to determine if it is inlined ahead of time may be too
+expensive at the filtering step.  The frame filter cannot know how many
+frames it has to iterate over, and it would have to iterate through them
+all.  This ends up duplicating effort as GDB performs this iteration
+when it prints the frames.
 
    In this example decision making can be deferred to the printing step.
 As each frame is printed, the frame decorator can examine each frame in
 turn when GDB iterates.  From a performance viewpoint, this is the most
 appropriate decision to make as it avoids duplicating the effort that
-the printing step would undertake anyway.  Also, if there are many
-frame filters unwinding the stack during filtering, it can
-substantially delay the printing of the backtrace which will result in
-large memory usage, and a poor user experience.
+the printing step would undertake anyway.  Also, if there are many frame
+filters unwinding the stack during filtering, it can substantially delay
+the printing of the backtrace which will result in large memory usage,
+and a poor user experience.
 
      class InlineFilter():
 
@@ -831,11 +1105,11 @@ large memory usage, and a poor user expe
              return frame_iter
 
    This frame filter is somewhat similar to the earlier example, except
-that the `filter' method applies a frame decorator object called
-`InlinedFrameDecorator' to each element in the iterator.  The `imap'
-Python method is light-weight.  It does not proactively iterate over
-the iterator, but rather creates a new iterator which wraps the
-existing one.
+that the 'filter' method applies a frame decorator object called
+'InlinedFrameDecorator' to each element in the iterator.  The 'imap'
+Python method is light-weight.  It does not proactively iterate over the
+iterator, but rather creates a new iterator which wraps the existing
+one.
 
    Below is the frame decorator for this example.
 
@@ -853,8 +1127,8 @@ existing one.
 
              return name
 
-   This frame decorator only defines and overrides the `function'
-method.  It lets the supplied `FrameDecorator', which is shipped with
+   This frame decorator only defines and overrides the 'function'
+method.  It lets the supplied 'FrameDecorator', which is shipped with
 GDB, perform the other work associated with printing this frame.
 
    The combination of these two objects create this output from a
@@ -867,8 +1141,8 @@ backtrace:
    So in the case of this example, a frame decorator is applied to all
 frames, regardless of whether they may be inlined or not.  As GDB
 iterates over the iterator produced by the frame filters, GDB executes
-each frame decorator which then makes a decision on what to print in
-the `function' callback.  Using a strategy like this is a way to defer
+each frame decorator which then makes a decision on what to print in the
+'function' callback.  Using a strategy like this is a way to defer
 decisions on the frame content to printing time.
 
 Eliding Frames
@@ -876,13 +1150,13 @@ Eliding Frames
 
 It might be that the above example is not desirable for representing
 inlined frames, and a hierarchical approach may be preferred.  If we
-want to hierarchically represent frames, the `elided' frame decorator
+want to hierarchically represent frames, the 'elided' frame decorator
 interface might be preferable.
 
-   This example approaches the issue with the `elided' method.  This
-example is quite long, but very simplistic.  It is out-of-scope for
-this section to write a complete example that comprehensively covers
-all approaches of finding and printing inlined frames.  However, this
+   This example approaches the issue with the 'elided' method.  This
+example is quite long, but very simplistic.  It is out-of-scope for this
+section to write a complete example that comprehensively covers all
+approaches of finding and printing inlined frames.  However, this
 example illustrates the approach an author might use.
 
    This example comprises of three sections.
@@ -900,7 +1174,7 @@ example illustrates the approach an auth
 
    This frame filter is very similar to the other examples.  The only
 difference is this frame filter is wrapping the iterator provided to it
-(`frame_iter') with a custom iterator called `ElidingInlineIterator'.
+('frame_iter') with a custom iterator called 'ElidingInlineIterator'.
 This again defers actions to when GDB prints the backtrace, as the
 iterator is not traversed until printing.
 
@@ -927,13 +1201,13 @@ of the example where decisions are made 
              return ElidingFrameDecorator(eliding_frame, [frame])
 
    This iterator implements the Python iterator protocol.  When the
-`next' function is called (when GDB prints each frame), the iterator
-checks if this frame decorator, `frame', is wrapping an inlined frame.
+'next' function is called (when GDB prints each frame), the iterator
+checks if this frame decorator, 'frame', is wrapping an inlined frame.
 If it is not, it returns the existing frame decorator untouched.  If it
 is wrapping an inlined frame, it assumes that the inlined frame was
-contained within the next oldest frame, `eliding_frame', which it
+contained within the next oldest frame, 'eliding_frame', which it
 fetches.  It then creates and returns a frame decorator,
-`ElidingFrameDecorator', which contains both the elided frame, and the
+'ElidingFrameDecorator', which contains both the elided frame, and the
 eliding frame.
 
      class ElidingInlineDecorator(FrameDecorator):
@@ -947,17 +1221,17 @@ eliding frame.
              return iter(self.elided_frames)
 
    This frame decorator overrides one function and returns the inlined
-frame in the `elided' method.  As before it lets `FrameDecorator' do
-the rest of the work involved in printing this frame.  This produces
-the following output.
+frame in the 'elided' method.  As before it lets 'FrameDecorator' do the
+rest of the work involved in printing this frame.  This produces the
+following output.
 
      #0  0x004004e0 in bar () at inline.c:11
      #2  0x00400529 in main () at inline.c:25
          #1  0x00400529 in max (b=6, a=12) at inline.c:15
 
-   In that output, `max' which has been inlined into `main' is printed
-hierarchically.  Another approach would be to combine the `function'
-method, and the `elided' method to both print a marker in the inlined
+   In that output, 'max' which has been inlined into 'main' is printed
+hierarchically.  Another approach would be to combine the 'function'
+method, and the 'elided' method to both print a marker in the inlined
 frame, and also show the hierarchical relationship.
 
 
@@ -982,10 +1256,10 @@ the GDB unwinders.  You can write Python
 custom frames.
 
    You implement a frame unwinder in Python as a class with which has
-two attributes, `name' and `enabled', with obvious meanings, and a
-single method `__call__', which examines a given frame and returns an
-object (an instance of `gdb.UnwindInfo class)' describing it.  If an
-unwinder does not recognize a frame, it should return `None'.  The code
+two attributes, 'name' and 'enabled', with obvious meanings, and a
+single method '__call__', which examines a given frame and returns an
+object (an instance of 'gdb.UnwindInfo class)' describing it.  If an
+unwinder does not recognize a frame, it should return 'None'.  The code
 in GDB that enables writing unwinders in Python uses this object to
 return frame's ID and previous frame registers when GDB core asks for
 them.
@@ -993,55 +1267,54 @@ them.
 Unwinder Input
 --------------
 
-An object passed to an unwinder (a `gdb.PendingFrame' instance)
-provides a method to read frame's registers:
+An object passed to an unwinder (a 'gdb.PendingFrame' instance) provides
+a method to read frame's registers:
 
  -- Function: PendingFrame.read_register (reg)
      This method returns the contents of the register REGN in the frame
-     as a `gdb.Value' object.  REG can be either a register number or a
+     as a 'gdb.Value' object.  REG can be either a register number or a
      register name; the values are platform-specific.  They are usually
-     found in the corresponding `PLATFORM-tdep.h' file in the GDB
-     source tree.
+     found in the corresponding 'PLATFORM-tdep.h' file in the GDB source
+     tree.
 
-   It also provides a factory method to create a `gdb.UnwindInfo'
+   It also provides a factory method to create a 'gdb.UnwindInfo'
 instance to be returned to GDB:
 
  -- Function: PendingFrame.create_unwind_info (frame_id)
-     Returns a new `gdb.UnwindInfo' instance identified by given
+     Returns a new 'gdb.UnwindInfo' instance identified by given
      FRAME_ID.  The argument is used to build GDB's frame ID using one
      of functions provided by GDB.  FRAME_ID's attributes determine
      which function will be used, as follows:
 
-    `sp, pc, special'
-          `frame_id_build_special (FRAME_ID.sp, FRAME_ID.pc,
+     'sp, pc, special'
+          'frame_id_build_special (FRAME_ID.sp, FRAME_ID.pc,
           FRAME_ID.special)'
 
-    `sp, pc'
-          `frame_id_build (FRAME_ID.sp, FRAME_ID.pc)'
+     'sp, pc'
+          'frame_id_build (FRAME_ID.sp, FRAME_ID.pc)'
 
           This is the most common case.
 
-    `sp'
-          `frame_id_build_wild (FRAME_ID.sp)'
-     The attribute values should be `gdb.Value'
-
+     'sp'
+          'frame_id_build_wild (FRAME_ID.sp)'
+     The attribute values should be 'gdb.Value'
 
 Unwinder Output: UnwindInfo
 ---------------------------
 
-Use `PendingFrame.create_unwind_info' method described above to create
-a `gdb.UnwindInfo' instance.  Use the following method to specify
-caller registers that have been saved in this frame:
+Use 'PendingFrame.create_unwind_info' method described above to create a
+'gdb.UnwindInfo' instance.  Use the following method to specify caller
+registers that have been saved in this frame:
 
  -- Function: gdb.UnwindInfo.add_saved_register (reg, value)
-     REG identifies the register.  It can be a number or a name, just
-     as for the `PendingFrame.read_register' method above.  VALUE is a
-     register value (a `gdb.Value' object).
+     REG identifies the register.  It can be a number or a name, just as
+     for the 'PendingFrame.read_register' method above.  VALUE is a
+     register value (a 'gdb.Value' object).
 
 Unwinder Skeleton Code
 ----------------------
 
-GDB comes with the module containing the base `Unwinder' class.  Derive
+GDB comes with the module containing the base 'Unwinder' class.  Derive
 your unwinder class from it and structure the code as follows:
 
      from gdb.unwinders import Unwinder
@@ -1073,32 +1346,33 @@ your unwinder class from it and structur
              # Return the result:
              return unwind_info
 
+
 Registering a Unwinder
 ----------------------
 
 An object file, a program space, and the GDB proper can have unwinders
 registered with it.
 
-   The `gdb.unwinders' module provides the function to register a
+   The 'gdb.unwinders' module provides the function to register a
 unwinder:
 
  -- Function: gdb.unwinder.register_unwinder (locus, unwinder,
           replace=False)
      LOCUS is specifies an object file or a program space to which
-     UNWINDER is added.  Passing `None' or `gdb' adds UNWINDER to the
+     UNWINDER is added.  Passing 'None' or 'gdb' adds UNWINDER to the
      GDB's global unwinder list.  The newly added UNWINDER will be
      called before any other unwinder from the same locus.  Two
      unwinders in the same locus cannot have the same name.  An attempt
      to add a unwinder with already existing name raises an exception
-     unless REPLACE is `True', in which case the old unwinder is
+     unless REPLACE is 'True', in which case the old unwinder is
      deleted.
 
 Unwinder Precedence
 -------------------
 
-GDB first calls the unwinders from all the object files in no
-particular order, then the unwinders from the current program space,
-and finally the unwinders from GDB.
+GDB first calls the unwinders from all the object files in no particular
+order, then the unwinders from the current program space, and finally
+the unwinders from GDB.
 
 
 File: gdb.info,  Node: Xmethods In Python,  Next: Xmethod API,  Prev: Unwinding Frames in Python,  Up: Python API
@@ -1120,34 +1394,33 @@ available, it is better to use its repla
 defined.
 
    The xmethods feature in Python is available via the concepts of an
-"xmethod matcher" and an "xmethod worker".  To implement an xmethod,
-one has to implement a matcher and a corresponding worker for it (more
-than one worker can be implemented, each catering to a different
-overloaded instance of the method).  Internally, GDB invokes the
-`match' method of a matcher to match the class type and method name.
-On a match, the `match' method returns a list of matching _worker_
-objects.  Each worker object typically corresponds to an overloaded
-instance of the xmethod.  They implement a `get_arg_types' method which
-returns a sequence of types corresponding to the arguments the xmethod
-requires.  GDB uses this sequence of types to perform overload
-resolution and picks a winning xmethod worker.  A winner is also
-selected from among the methods GDB finds in the C++ source code.
-Next, the winning xmethod worker and the winning C++ method are
-compared to select an overall winner.  In case of a tie between a
-xmethod worker and a C++ method, the xmethod worker is selected as the
-winner.  That is, if a winning xmethod worker is found to be equivalent
-to the winning C++ method, then the xmethod worker is treated as a
-replacement for the C++ method.  GDB uses the overall winner to invoke
-the method.  If the winning xmethod worker is the overall winner, then
-the corresponding xmethod is invoked via the `__call__' method of the
-worker object.
-
-   If one wants to implement an xmethod as a replacement for an
-existing C++ method, then they have to implement an equivalent xmethod
-which has exactly the same name and takes arguments of exactly the same
-type as the C++ method.  If the user wants to invoke the C++ method
-even though a replacement xmethod is available for that method, then
-they can disable the xmethod.
+"xmethod matcher" and an "xmethod worker".  To implement an xmethod, one
+has to implement a matcher and a corresponding worker for it (more than
+one worker can be implemented, each catering to a different overloaded
+instance of the method).  Internally, GDB invokes the 'match' method of
+a matcher to match the class type and method name.  On a match, the
+'match' method returns a list of matching _worker_ objects.  Each worker
+object typically corresponds to an overloaded instance of the xmethod.
+They implement a 'get_arg_types' method which returns a sequence of
+types corresponding to the arguments the xmethod requires.  GDB uses
+this sequence of types to perform overload resolution and picks a
+winning xmethod worker.  A winner is also selected from among the
+methods GDB finds in the C++ source code.  Next, the winning xmethod
+worker and the winning C++ method are compared to select an overall
+winner.  In case of a tie between a xmethod worker and a C++ method, the
+xmethod worker is selected as the winner.  That is, if a winning xmethod
+worker is found to be equivalent to the winning C++ method, then the
+xmethod worker is treated as a replacement for the C++ method.  GDB uses
+the overall winner to invoke the method.  If the winning xmethod worker
+is the overall winner, then the corresponding xmethod is invoked via the
+'__call__' method of the worker object.
+
+   If one wants to implement an xmethod as a replacement for an existing
+C++ method, then they have to implement an equivalent xmethod which has
+exactly the same name and takes arguments of exactly the same type as
+the C++ method.  If the user wants to invoke the C++ method even though
+a replacement xmethod is available for that method, then they can
+disable the xmethod.
 
    *Note Xmethod API::, for API to implement xmethods in Python.  *Note
 Writing an Xmethod::, for implementing xmethods in Python.
@@ -1163,8 +1436,8 @@ implement, register and manipulate xmeth
 Python::.
 
    An xmethod matcher should be an instance of a class derived from
-`XMethodMatcher' defined in the module `gdb.xmethod', or an object with
-similar interface and attributes.  An instance of `XMethodMatcher' has
+'XMethodMatcher' defined in the module 'gdb.xmethod', or an object with
+similar interface and attributes.  An instance of 'XMethodMatcher' has
 the following attributes:
 
  -- Variable: name
@@ -1175,74 +1448,71 @@ the following attributes:
      disabled.
 
  -- Variable: methods
-     A list of named methods managed by the matcher.  Each object in
-     the list is an instance of the class `XMethod' defined in the
-     module `gdb.xmethod', or any object with the following attributes:
+     A list of named methods managed by the matcher.  Each object in the
+     list is an instance of the class 'XMethod' defined in the module
+     'gdb.xmethod', or any object with the following attributes:
 
-    `name'
+     'name'
           Name of the xmethod which should be unique for each xmethod
           managed by the matcher.
 
-    `enabled'
+     'enabled'
           A boolean value indicating whether the xmethod is enabled or
           disabled.
 
-
-     The class `XMethod' is a convenience class with same attributes as
+     The class 'XMethod' is a convenience class with same attributes as
      above along with the following constructor:
 
       -- Function: XMethod.__init__ (self, name)
           Constructs an enabled xmethod with name NAME.
 
-The `XMethodMatcher' class has the following methods:
+The 'XMethodMatcher' class has the following methods:
 
  -- Function: XMethodMatcher.__init__ (self, name)
      Constructs an enabled xmethod matcher with name NAME.  The
-     `methods' attribute is initialized to `None'.
+     'methods' attribute is initialized to 'None'.
 
  -- Function: XMethodMatcher.match (self, class_type, method_name)
      Derived classes should override this method.  It should return a
      xmethod worker object (or a sequence of xmethod worker objects)
      matching the CLASS_TYPE and METHOD_NAME.  CLASS_TYPE is a
-     `gdb.Type' object, and METHOD_NAME is a string value.  If the
-     matcher manages named methods as listed in its `methods'
-     attribute, then only those worker objects whose corresponding
-     entries in the `methods' list are enabled should be returned.
+     'gdb.Type' object, and METHOD_NAME is a string value.  If the
+     matcher manages named methods as listed in its 'methods' attribute,
+     then only those worker objects whose corresponding entries in the
+     'methods' list are enabled should be returned.
 
    An xmethod worker should be an instance of a class derived from
-`XMethodWorker' defined in the module `gdb.xmethod', or support the
+'XMethodWorker' defined in the module 'gdb.xmethod', or support the
 following interface:
 
  -- Function: XMethodWorker.get_arg_types (self)
-     This method returns a sequence of `gdb.Type' objects corresponding
+     This method returns a sequence of 'gdb.Type' objects corresponding
      to the arguments that the xmethod takes.  It can return an empty
-     sequence or `None' if the xmethod does not take any arguments.  If
-     the xmethod takes a single argument, then a single `gdb.Type'
+     sequence or 'None' if the xmethod does not take any arguments.  If
+     the xmethod takes a single argument, then a single 'gdb.Type'
      object corresponding to it can be returned.
 
  -- Function: XMethodWorker.get_result_type (self, *args)
-     This method returns a `gdb.Type' object representing the type of
-     the result of invoking this xmethod.  The ARGS argument is the
-     same tuple of arguments that would be passed to the `__call__'
-     method of this worker.
+     This method returns a 'gdb.Type' object representing the type of
+     the result of invoking this xmethod.  The ARGS argument is the same
+     tuple of arguments that would be passed to the '__call__' method of
+     this worker.
 
  -- Function: XMethodWorker.__call__ (self, *args)
      This is the method which does the _work_ of the xmethod.  The ARGS
      arguments is the tuple of arguments to the xmethod.  Each element
      in this tuple is a gdb.Value object.  The first element is always
-     the `this' pointer value.
+     the 'this' pointer value.
 
-   For GDB to lookup xmethods, the xmethod matchers should be
-registered using the following function defined in the module
-`gdb.xmethod':
+   For GDB to lookup xmethods, the xmethod matchers should be registered
+using the following function defined in the module 'gdb.xmethod':
 
  -- Function: register_xmethod_matcher (locus, matcher, replace=False)
-     The `matcher' is registered with `locus', replacing an existing
-     matcher with the same name as `matcher' if `replace' is `True'.
-     `locus' can be a `gdb.Objfile' object (*note Objfiles In
-     Python::), or a `gdb.Progspace' object (*note Progspaces In
-     Python::), or `None'.  If it is `None', then `matcher' is
-     registered globally.
+     The 'matcher' is registered with 'locus', replacing an existing
+     matcher with the same name as 'matcher' if 'replace' is 'True'.
+     'locus' can be a 'gdb.Objfile' object (*note Objfiles In Python::),
+     or a 'gdb.Progspace' object (*note Progspaces In Python::), or
+     'None'.  If it is 'None', then 'matcher' is registered globally.
 
 
 File: gdb.info,  Node: Writing an Xmethod,  Next: Inferiors In Python,  Prev: Xmethod API,  Up: Python API
@@ -1251,8 +1521,8 @@ File: gdb.info,  Node: Writing an Xmetho
 ............................
 
 Implementing xmethods in Python will require implementing xmethod
-matchers and xmethod workers (*note Xmethods In Python::).  Consider
-the following C++ class:
+matchers and xmethod workers (*note Xmethods In Python::).  Consider the
+following C++ class:
 
      class MyClass
      {
@@ -1272,10 +1542,10 @@ the following C++ class:
        return a_ + b;
      }
 
-Let us define two xmethods for the class `MyClass', one replacing the
-method `geta', and another adding an overloaded flavor of `operator+'
-which takes a `MyClass' argument (the C++ code above already has an
-overloaded `operator+' which takes an `int' argument).  The xmethod
+Let us define two xmethods for the class 'MyClass', one replacing the
+method 'geta', and another adding an overloaded flavor of 'operator+'
+which takes a 'MyClass' argument (the C++ code above already has an
+overloaded 'operator+' which takes an 'int' argument).  The xmethod
 matcher can be defined as follows:
 
      class MyClass_geta(gdb.xmethod.XMethod):
@@ -1314,18 +1584,17 @@ matcher can be defined as follows:
 
              return workers
 
-Notice that the `match' method of `MyClassMatcher' returns a worker
-object of type `MyClassWorker_geta' for the `geta' method, and a worker
-object of type `MyClassWorker_plus' for the `operator+' method.  This
-is done indirectly via helper classes derived from
-`gdb.xmethod.XMethod'.  One does not need to use the `methods'
-attribute in a matcher as it is optional.  However, if a matcher
-manages more than one xmethod, it is a good practice to list the
-xmethods in the `methods' attribute of the matcher.  This will then
-facilitate enabling and disabling individual xmethods via the
-`enable/disable' commands.  Notice also that a worker object is
-returned only if the corresponding entry in the `methods' attribute of
-the matcher is enabled.
+Notice that the 'match' method of 'MyClassMatcher' returns a worker
+object of type 'MyClassWorker_geta' for the 'geta' method, and a worker
+object of type 'MyClassWorker_plus' for the 'operator+' method.  This is
+done indirectly via helper classes derived from 'gdb.xmethod.XMethod'.
+One does not need to use the 'methods' attribute in a matcher as it is
+optional.  However, if a matcher manages more than one xmethod, it is a
+good practice to list the xmethods in the 'methods' attribute of the
+matcher.  This will then facilitate enabling and disabling individual
+xmethods via the 'enable/disable' commands.  Notice also that a worker
+object is returned only if the corresponding entry in the 'methods'
+attribute of the matcher is enabled.
 
    The implementation of the worker classes returned by the matcher
 setup above is as follows:
@@ -1357,14 +1626,14 @@ follows:
 
      gdb.xmethod.register_xmethod_matcher(None, MyClassMatcher())
 
-   If an object `obj' of type `MyClass' is initialized in C++ code as
+   If an object 'obj' of type 'MyClass' is initialized in C++ code as
 follows:
 
      MyClass obj(5);
 
 then, after loading the Python script defining the xmethod matchers and
-workers into `GDBN', invoking the method `geta' or using the operator
-`+' on `obj' will invoke the xmethods defined above:
+workers into 'GDBN', invoking the method 'geta' or using the operator
+'+' on 'obj' will invoke the xmethods defined above:
 
      (gdb) p obj.geta()
      $1 = 5
@@ -1392,7 +1661,7 @@ workers into `GDBN', invoking the method
      };
 
    Let us implement an xmethod for the above class which serves as a
-replacement for the `footprint' method.  The full code listing of the
+replacement for the 'footprint' method.  The full code listing of the
 xmethod workers and xmethod matchers is as follows:
 
      class MyTemplateWorker_footprint(gdb.xmethod.XMethodWorker):
@@ -1421,7 +1690,7 @@ xmethod workers and xmethod matchers is 
                  method_name == 'footprint'):
                  return MyTemplateWorker_footprint(class_type)
 
-   Notice that, in this example, we have not used the `methods'
+   Notice that, in this example, we have not used the 'methods'
 attribute of the matcher as the matcher manages only one xmethod.  The
 user can enable/disable this xmethod by enabling/disabling the matcher
 itself.
@@ -1435,9 +1704,9 @@ File: gdb.info,  Node: Inferiors In Pyth
 Programs which are being run under GDB are called inferiors (*note
 Inferiors and Programs::).  Python scripts can access information about
 and manipulate inferiors controlled by GDB via objects of the
-`gdb.Inferior' class.
+'gdb.Inferior' class.
 
-   The following inferior-related functions are available in the `gdb'
+   The following inferior-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.inferiors ()
@@ -1446,7 +1715,7 @@ module:
  -- Function: gdb.selected_inferior ()
      Return an object representing the current inferior.
 
-   A `gdb.Inferior' object has the following attributes:
+   A 'gdb.Inferior' object has the following attributes:
 
  -- Variable: Inferior.num
      ID of inferior, as assigned by GDB.
@@ -1456,16 +1725,16 @@ module:
      system.
 
  -- Variable: Inferior.was_attached
-     Boolean signaling whether the inferior was created using `attach',
+     Boolean signaling whether the inferior was created using 'attach',
      or started by GDB itself.
 
-   A `gdb.Inferior' object has the following methods:
+   A 'gdb.Inferior' object has the following methods:
 
  -- Function: Inferior.is_valid ()
-     Returns `True' if the `gdb.Inferior' object is valid, `False' if
-     not.  A `gdb.Inferior' object will become invalid if the inferior
-     no longer exists within GDB.  All other `gdb.Inferior' methods
-     will throw an exception if it is invalid at the time the method is
+     Returns 'True' if the 'gdb.Inferior' object is valid, 'False' if
+     not.  A 'gdb.Inferior' object will become invalid if the inferior
+     no longer exists within GDB.  All other 'gdb.Inferior' methods will
+     throw an exception if it is invalid at the time the method is
      called.
 
  -- Function: Inferior.threads ()
@@ -1477,24 +1746,24 @@ module:
      Read LENGTH addressable memory units from the inferior, starting at
      ADDRESS.  Returns a buffer object, which behaves much like an array
      or a string.  It can be modified and given to the
-     `Inferior.write_memory' function.  In `Python' 3, the return value
-     is a `memoryview' object.
+     'Inferior.write_memory' function.  In 'Python' 3, the return value
+     is a 'memoryview' object.
 
  -- Function: Inferior.write_memory (address, buffer [, length])
      Write the contents of BUFFER to the inferior, starting at ADDRESS.
      The BUFFER parameter must be a Python object which supports the
      buffer protocol, i.e., a string, an array or the object returned
-     from `Inferior.read_memory'.  If given, LENGTH determines the
+     from 'Inferior.read_memory'.  If given, LENGTH determines the
      number of addressable memory units from BUFFER to be written.
 
  -- Function: Inferior.search_memory (address, length, pattern)
-     Search a region of the inferior memory starting at ADDRESS with
-     the given LENGTH using the search pattern supplied in PATTERN.
-     The PATTERN parameter must be a Python object which supports the
-     buffer protocol, i.e., a string, an array or the object returned
-     from `gdb.read_memory'.  Returns a Python `Long' containing the
-     address where the pattern was found, or `None' if the pattern
-     could not be found.
+     Search a region of the inferior memory starting at ADDRESS with the
+     given LENGTH using the search pattern supplied in PATTERN.  The
+     PATTERN parameter must be a Python object which supports the buffer
+     protocol, i.e., a string, an array or the object returned from
+     'gdb.read_memory'.  Returns a Python 'Long' containing the address
+     where the pattern was found, or 'None' if the pattern could not be
+     found.
 
 
 File: gdb.info,  Node: Events In Python,  Next: Threads In Python,  Prev: Inferiors In Python,  Up: Python API
@@ -1512,7 +1781,7 @@ of the change.  All the existing events 
 
    In order to be notified of an event, you must register an event
 handler with an "event registry".  An event registry is an object in the
-`gdb.events' module which dispatches particular events.  A registry
+'gdb.events' module which dispatches particular events.  A registry
 provides methods to register and unregister event handlers:
 
  -- Function: EventRegistry.connect (object)
@@ -1531,106 +1800,102 @@ provides methods to register and unregis
 
      gdb.events.exited.connect (exit_handler)
 
-   In the above example we connect our handler `exit_handler' to the
-registry `events.exited'.  Once connected, `exit_handler' gets called
+   In the above example we connect our handler 'exit_handler' to the
+registry 'events.exited'.  Once connected, 'exit_handler' gets called
 when the inferior exits.  The argument "event" in this example is of
-type `gdb.ExitedEvent'.  As you can see in the example the
-`ExitedEvent' object has an attribute which indicates the exit code of
-the inferior.
+type 'gdb.ExitedEvent'.  As you can see in the example the 'ExitedEvent'
+object has an attribute which indicates the exit code of the inferior.
 
-   The following is a listing of the event registries that are
-available and details of the events they emit:
+   The following is a listing of the event registries that are available
+and details of the events they emit:
 
-`events.cont'
-     Emits `gdb.ThreadEvent'.
+'events.cont'
+     Emits 'gdb.ThreadEvent'.
 
      Some events can be thread specific when GDB is running in non-stop
      mode.  When represented in Python, these events all extend
-     `gdb.ThreadEvent'.  Note, this event is not emitted directly;
+     'gdb.ThreadEvent'.  Note, this event is not emitted directly;
      instead, events which are emitted by this or other modules might
      extend this event.  Examples of these events are
-     `gdb.BreakpointEvent' and `gdb.ContinueEvent'.
+     'gdb.BreakpointEvent' and 'gdb.ContinueEvent'.
 
       -- Variable: ThreadEvent.inferior_thread
           In non-stop mode this attribute will be set to the specific
-          thread which was involved in the emitted event. Otherwise, it
-          will be set to `None'.
+          thread which was involved in the emitted event.  Otherwise, it
+          will be set to 'None'.
 
-     Emits `gdb.ContinueEvent' which extends `gdb.ThreadEvent'.
+     Emits 'gdb.ContinueEvent' which extends 'gdb.ThreadEvent'.
 
      This event indicates that the inferior has been continued after a
-     stop. For inherited attribute refer to `gdb.ThreadEvent' above.
-
-`events.exited'
-     Emits `events.ExitedEvent' which indicates that the inferior has
-     exited.  `events.ExitedEvent' has two attributes:
+     stop.  For inherited attribute refer to 'gdb.ThreadEvent' above.
 
+'events.exited'
+     Emits 'events.ExitedEvent' which indicates that the inferior has
+     exited.  'events.ExitedEvent' has two attributes:
       -- Variable: ExitedEvent.exit_code
-          An integer representing the exit code, if available, which
-          the inferior has returned.  (The exit code could be
-          unavailable if, for example, GDB detaches from the inferior.)
-          If the exit code is unavailable, the attribute does not exist.
-
-      -- Variable: ExitedEvent inferior
-          A reference to the inferior which triggered the `exited'
+          An integer representing the exit code, if available, which the
+          inferior has returned.  (The exit code could be unavailable
+          if, for example, GDB detaches from the inferior.)  If the exit
+          code is unavailable, the attribute does not exist.
+      -- Variable: ExitedEvent.inferior
+          A reference to the inferior which triggered the 'exited'
           event.
 
-`events.stop'
-     Emits `gdb.StopEvent' which extends `gdb.ThreadEvent'.
+'events.stop'
+     Emits 'gdb.StopEvent' which extends 'gdb.ThreadEvent'.
 
      Indicates that the inferior has stopped.  All events emitted by
-     this registry extend StopEvent.  As a child of `gdb.ThreadEvent',
-     `gdb.StopEvent' will indicate the stopped thread when GDB is
-     running in non-stop mode.  Refer to `gdb.ThreadEvent' above for
+     this registry extend StopEvent.  As a child of 'gdb.ThreadEvent',
+     'gdb.StopEvent' will indicate the stopped thread when GDB is
+     running in non-stop mode.  Refer to 'gdb.ThreadEvent' above for
      more details.
 
-     Emits `gdb.SignalEvent' which extends `gdb.StopEvent'.
+     Emits 'gdb.SignalEvent' which extends 'gdb.StopEvent'.
 
      This event indicates that the inferior or one of its threads has
-     received as signal.  `gdb.SignalEvent' has the following
+     received as signal.  'gdb.SignalEvent' has the following
      attributes:
 
       -- Variable: SignalEvent.stop_signal
           A string representing the signal received by the inferior.  A
           list of possible signal values can be obtained by running the
-          command `info signals' in the GDB command prompt.
+          command 'info signals' in the GDB command prompt.
 
-     Also emits  `gdb.BreakpointEvent' which extends `gdb.StopEvent'.
+     Also emits 'gdb.BreakpointEvent' which extends 'gdb.StopEvent'.
 
-     `gdb.BreakpointEvent' event indicates that one or more breakpoints
+     'gdb.BreakpointEvent' event indicates that one or more breakpoints
      have been hit, and has the following attributes:
 
       -- Variable: BreakpointEvent.breakpoints
           A sequence containing references to all the breakpoints (type
-          `gdb.Breakpoint') that were hit.  *Note Breakpoints In
-          Python::, for details of the `gdb.Breakpoint' object.
-
+          'gdb.Breakpoint') that were hit.  *Note Breakpoints In
+          Python::, for details of the 'gdb.Breakpoint' object.
       -- Variable: BreakpointEvent.breakpoint
           A reference to the first breakpoint that was hit.  This
           function is maintained for backward compatibility and is now
-          deprecated in favor of the `gdb.BreakpointEvent.breakpoints'
+          deprecated in favor of the 'gdb.BreakpointEvent.breakpoints'
           attribute.
 
-`events.new_objfile'
-     Emits `gdb.NewObjFileEvent' which indicates that a new object file
-     has been loaded by GDB.  `gdb.NewObjFileEvent' has one attribute:
+'events.new_objfile'
+     Emits 'gdb.NewObjFileEvent' which indicates that a new object file
+     has been loaded by GDB.  'gdb.NewObjFileEvent' has one attribute:
 
       -- Variable: NewObjFileEvent.new_objfile
-          A reference to the object file (`gdb.Objfile') which has been
+          A reference to the object file ('gdb.Objfile') which has been
           loaded.  *Note Objfiles In Python::, for details of the
-          `gdb.Objfile' object.
+          'gdb.Objfile' object.
 
-`events.clear_objfiles'
-     Emits `gdb.ClearObjFilesEvent' which indicates that the list of
+'events.clear_objfiles'
+     Emits 'gdb.ClearObjFilesEvent' which indicates that the list of
      object files for a program space has been reset.
-     `gdb.ClearObjFilesEvent' has one attribute:
+     'gdb.ClearObjFilesEvent' has one attribute:
 
       -- Variable: ClearObjFilesEvent.progspace
-          A reference to the program space (`gdb.Progspace') whose
+          A reference to the program space ('gdb.Progspace') whose
           objfile list has been cleared.  *Note Progspaces In Python::.
 
-`events.inferior_call_pre'
-     Emits `gdb.InferiorCallPreEvent' which indicates that a function in
+'events.inferior_call_pre'
+     Emits 'gdb.InferiorCallPreEvent' which indicates that a function in
      the inferior is about to be called.
 
       -- Variable: InferiorCallPreEvent.ptid
@@ -1639,8 +1904,8 @@ available and details of the events they
       -- Variable: InferiorCallPreEvent.address
           The location of the function to be called.
 
-`events.inferior_call_post'
-     Emits `gdb.InferiorCallPostEvent' which indicates that a function
+'events.inferior_call_post'
+     Emits 'gdb.InferiorCallPostEvent' which indicates that a function
      in the inferior has returned.
 
       -- Variable: InferiorCallPostEvent.ptid
@@ -1649,10 +1914,10 @@ available and details of the events they
       -- Variable: InferiorCallPostEvent.address
           The location of the function that was called.
 
-`events.memory_changed'
-     Emits `gdb.MemoryChangedEvent' which indicates that the memory of
+'events.memory_changed'
+     Emits 'gdb.MemoryChangedEvent' which indicates that the memory of
      the inferior has been modified by the GDB user, for instance via a
-     command like `set *addr = value'.  The event has the following
+     command like 'set *addr = value'.  The event has the following
      attributes:
 
       -- Variable: MemoryChangedEvent.address
@@ -1661,66 +1926,91 @@ available and details of the events they
       -- Variable: MemoryChangedEvent.length
           Length in bytes of the changed region.
 
-`events.register_changed'
-     Emits `gdb.RegisterChangedEvent' which indicates that a register
-     in the inferior has been modified by the GDB user.
+'events.register_changed'
+     Emits 'gdb.RegisterChangedEvent' which indicates that a register in
+     the inferior has been modified by the GDB user.
 
       -- Variable: RegisterChangedEvent.frame
           A gdb.Frame object representing the frame in which the
           register was modified.
-
       -- Variable: RegisterChangedEvent.regnum
           Denotes which register was modified.
 
+'events.breakpoint_created'
+     This is emitted when a new breakpoint has been created.  The
+     argument that is passed is the new 'gdb.Breakpoint' object.
+
+'events.breakpoint_modified'
+     This is emitted when a breakpoint has been modified in some way.
+     The argument that is passed is the new 'gdb.Breakpoint' object.
+
+'events.breakpoint_deleted'
+     This is emitted when a breakpoint has been deleted.  The argument
+     that is passed is the 'gdb.Breakpoint' object.  When this event is
+     emitted, the 'gdb.Breakpoint' object will already be in its invalid
+     state; that is, the 'is_valid' method will return 'False'.
+
+'events.before_prompt'
+     This event carries no payload.  It is emitted each time GDB
+     presents a prompt to the user.
 
 
-File: gdb.info,  Node: Threads In Python,  Next: Commands In Python,  Prev: Events In Python,  Up: Python API
+File: gdb.info,  Node: Threads In Python,  Next: Recordings In Python,  Prev: Events In Python,  Up: Python API
 
 23.2.2.18 Threads In Python
 ...........................
 
 Python scripts can access information about, and manipulate inferior
-threads controlled by GDB, via objects of the `gdb.InferiorThread'
+threads controlled by GDB, via objects of the 'gdb.InferiorThread'
 class.
 
-   The following thread-related functions are available in the `gdb'
+   The following thread-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.selected_thread ()
      This function returns the thread object for the selected thread.
-     If there is no selected thread, this will return `None'.
+     If there is no selected thread, this will return 'None'.
 
-   A `gdb.InferiorThread' object has the following attributes:
+   A 'gdb.InferiorThread' object has the following attributes:
 
  -- Variable: InferiorThread.name
-     The name of the thread.  If the user specified a name using
-     `thread name', then this returns that name.  Otherwise, if an
-     OS-supplied name is available, then it is returned.  Otherwise,
-     this returns `None'.
+     The name of the thread.  If the user specified a name using 'thread
+     name', then this returns that name.  Otherwise, if an OS-supplied
+     name is available, then it is returned.  Otherwise, this returns
+     'None'.
 
      This attribute can be assigned to.  The new value must be a string
-     object, which sets the new name, or `None', which removes any
+     object, which sets the new name, or 'None', which removes any
      user-specified thread name.
 
  -- Variable: InferiorThread.num
-     ID of the thread, as assigned by GDB.
+     The per-inferior number of the thread, as assigned by GDB.
+
+ -- Variable: InferiorThread.global_num
+     The global ID of the thread, as assigned by GDB. You can use this
+     to make Python breakpoints thread-specific, for example (*note The
+     Breakpoint.thread attribute: python_breakpoint_thread.).
 
  -- Variable: InferiorThread.ptid
      ID of the thread, as assigned by the operating system.  This
      attribute is a tuple containing three integers.  The first is the
-     Process ID (PID); the second is the Lightweight Process ID
-     (LWPID), and the third is the Thread ID (TID).  Either the LWPID
-     or TID may be 0, which indicates that the operating system does
-     not  use that identifier.
+     Process ID (PID); the second is the Lightweight Process ID (LWPID),
+     and the third is the Thread ID (TID). Either the LWPID or TID may
+     be 0, which indicates that the operating system does not use that
+     identifier.
+
+ -- Variable: InferiorThread.inferior
+     The inferior this thread belongs to.  This attribute is represented
+     as a 'gdb.Inferior' object.  This attribute is not writable.
 
-   A `gdb.InferiorThread' object has the following methods:
+   A 'gdb.InferiorThread' object has the following methods:
 
  -- Function: InferiorThread.is_valid ()
-     Returns `True' if the `gdb.InferiorThread' object is valid,
-     `False' if not.  A `gdb.InferiorThread' object will become invalid
-     if the thread exits, or the inferior that the thread belongs is
-     deleted.  All other `gdb.InferiorThread' methods will throw an
-     exception if it is invalid at the time the method is called.
+     Returns 'True' if the 'gdb.InferiorThread' object is valid, 'False'
+     if not.  A 'gdb.InferiorThread' object will become invalid if the
+     thread exits, or the inferior that the thread belongs is deleted.
+     All other 'gdb.InferiorThread' methods will throw an exception if
+     it is invalid at the time the method is called.
 
  -- Function: InferiorThread.switch ()
      This changes GDB's currently selected thread to the one represented
@@ -1736,20 +2026,231 @@ module:
      Return a Boolean indicating whether the thread is exited.
 
 
-File: gdb.info,  Node: Commands In Python,  Next: Parameters In Python,  Prev: Threads In Python,  Up: Python API
+File: gdb.info,  Node: Recordings In Python,  Next: Commands In Python,  Prev: Threads In Python,  Up: Python API
+
+23.2.2.19 Recordings In Python
+..............................
+
+The following recordings-related functions (*note Process Record and
+Replay::) are available in the 'gdb' module:
+
+ -- Function: gdb.start_recording ([method], [format])
+     Start a recording using the given METHOD and FORMAT.  If no FORMAT
+     is given, the default format for the recording method is used.  If
+     no METHOD is given, the default method will be used.  Returns a
+     'gdb.Record' object on success.  Throw an exception on failure.
+
+     The following strings can be passed as METHOD:
+
+        * '"full"'
+        * '"btrace"': Possible values for FORMAT: '"pt"', '"bts"' or
+          leave out for default format.
+
+ -- Function: gdb.current_recording ()
+     Access a currently running recording.  Return a 'gdb.Record' object
+     on success.  Return 'None' if no recording is currently active.
+
+ -- Function: gdb.stop_recording ()
+     Stop the current recording.  Throw an exception if no recording is
+     currently active.  All record objects become invalid after this
+     call.
+
+   A 'gdb.Record' object has the following attributes:
+
+ -- Variable: Record.ptid
+     ID of the thread associated with this object as a tuple of three
+     integers.  The first is the Process ID (PID); the second is the
+     Lightweight Process ID (LWPID), and the third is the Thread ID
+     (TID). Either the LWPID or TID may be 0, which indicates that the
+     operating system does not use that identifier.
+
+ -- Variable: Record.method
+     A string with the current recording method, e.g. 'full' or
+     'btrace'.
+
+ -- Variable: Record.format
+     A string with the current recording format, e.g. 'bt', 'pts' or
+     'None'.
+
+ -- Variable: Record.begin
+     A method specific instruction object representing the first
+     instruction in this recording.
+
+ -- Variable: Record.end
+     A method specific instruction object representing the current
+     instruction, that is not actually part of the recording.
+
+ -- Variable: Record.replay_position
+     The instruction representing the current replay position.  If there
+     is no replay active, this will be 'None'.
+
+ -- Variable: Record.instruction_history
+     A list with all recorded instructions.
+
+ -- Variable: Record.function_call_history
+     A list with all recorded function call segments.
+
+   A 'gdb.Record' object has the following methods:
+
+ -- Function: Record.goto (instruction)
+     Move the replay position to the given INSTRUCTION.
+
+   The attributes and methods of instruction objects depend on the
+current recording method.  Currently, only btrace instructions are
+supported.
+
+   A 'gdb.BtraceInstruction' object has the following attributes:
+
+ -- Variable: BtraceInstruction.number
+     An integer identifying this instruction.  NUMBER corresponds to the
+     numbers seen in 'record instruction-history' (*note Process Record
+     and Replay::).
+
+ -- Variable: BtraceInstruction.error
+     An integer identifying the error code for gaps in the history.
+     'None' for regular instructions.
+
+ -- Variable: BtraceInstruction.sal
+     A 'gdb.Symtab_and_line' object representing the associated symtab
+     and line of this instruction.  May be 'None' if the instruction is
+     a gap.
+
+ -- Variable: BtraceInstruction.pc
+     An integer representing this instruction's address.  May be 'None'
+     if the instruction is a gap or the debug symbols could not be read.
+
+ -- Variable: BtraceInstruction.data
+     A buffer with the raw instruction data.  May be 'None' if the
+     instruction is a gap.
+
+ -- Variable: BtraceInstruction.decoded
+     A human readable string with the disassembled instruction.
+     Contains the error message for gaps.
+
+ -- Variable: BtraceInstruction.size
+     The size of the instruction in bytes.  Will be 'None' if the
+     instruction is a gap.
+
+ -- Variable: BtraceInstruction.is_speculative
+     A boolean indicating whether the instruction was executed
+     speculatively.  Will be 'None' for gaps.
+
+   The attributes and methods of function call objects depend on the
+current recording format.  Currently, only btrace function calls are
+supported.
+
+   A 'gdb.BtraceFunctionCall' object has the following attributes:
+
+ -- Variable: BtraceFunctionCall.number
+     An integer identifying this function call.  NUMBER corresponds to
+     the numbers seen in 'record function-call-history' (*note Process
+     Record and Replay::).
+
+ -- Variable: BtraceFunctionCall.symbol
+     A 'gdb.Symbol' object representing the associated symbol.  May be
+     'None' if the function call is a gap or the debug symbols could not
+     be read.
+
+ -- Variable: BtraceFunctionCall.level
+     An integer representing the function call's stack level.  May be
+     'None' if the function call is a gap.
+
+ -- Variable: BtraceFunctionCall.instructions
+     A list of 'gdb.BtraceInstruction' objects associated with this
+     function call.
+
+ -- Variable: BtraceFunctionCall.up
+     A 'gdb.BtraceFunctionCall' object representing the caller's
+     function segment.  If the call has not been recorded, this will be
+     the function segment to which control returns.  If neither the call
+     nor the return have been recorded, this will be 'None'.
+
+ -- Variable: BtraceFunctionCall.prev_sibling
+     A 'gdb.BtraceFunctionCall' object representing the previous segment
+     of this function call.  May be 'None'.
+
+ -- Variable: BtraceFunctionCall.next_sibling
+     A 'gdb.BtraceFunctionCall' object representing the next segment of
+     this function call.  May be 'None'.
+
+   The following example demonstrates the usage of these objects and
+functions to create a function that will rewind a record to the last
+time a function in a different file was executed.  This would typically
+be used to track the execution of user provided callback functions in a
+library which typically are not visible in a back trace.
+
+     def bringback ():
+         rec = gdb.current_recording ()
+         if not rec:
+             return
+
+         insn = rec.instruction_history
+         if len (insn) == 0:
+             return
+
+         try:
+             position = insn.index (rec.replay_position)
+         except:
+             position = -1
+         try:
+             filename = insn[position].sal.symtab.fullname ()
+         except:
+             filename = None
+
+         for i in reversed (insn[:position]):
+     	try:
+                 current = i.sal.symtab.fullname ()
+     	except:
+                 current = None
+
+             if filename == current:
+                 continue
+
+             rec.goto (i)
+             return
+
+   Another possible application is to write a function that counts the
+number of code executions in a given line range.  This line range can
+contain parts of functions or span across several functions and is not
+limited to be contiguous.
+
+     def countrange (filename, linerange):
+         count = 0
+
+         def filter_only (file_name):
+             for call in gdb.current_recording ().function_call_history:
+                 try:
+                     if file_name in call.symbol.symtab.fullname ():
+                         yield call
+                 except:
+                     pass
+
+         for c in filter_only (filename):
+             for i in c.instructions:
+                 try:
+                     if i.sal.line in linerange:
+                         count += 1
+                         break;
+                 except:
+                         pass
+
+         return count
+
+
+File: gdb.info,  Node: Commands In Python,  Next: Parameters In Python,  Prev: Recordings In Python,  Up: Python API
 
-23.2.2.19 Commands In Python
+23.2.2.20 Commands In Python
 ............................
 
 You can implement new GDB CLI commands in Python.  A CLI command is
-implemented using an instance of the `gdb.Command' class, most commonly
+implemented using an instance of the 'gdb.Command' class, most commonly
 using a subclass.
 
  -- Function: Command.__init__ (name, COMMAND_CLASS [, COMPLETER_CLASS
           [, PREFIX]])
-     The object initializer for `Command' registers the new command
-     with GDB.  This initializer is normally invoked from the subclass'
-     own `__init__' method.
+     The object initializer for 'Command' registers the new command with
+     GDB.  This initializer is normally invoked from the subclass' own
+     '__init__' method.
 
      NAME is the name of the command.  If NAME consists of multiple
      words, then the initial words are looked for as prefix commands.
@@ -1758,31 +2259,30 @@ using a subclass.
 
      There is no support for multi-line commands.
 
-     COMMAND_CLASS should be one of the `COMMAND_' constants defined
+     COMMAND_CLASS should be one of the 'COMMAND_' constants defined
      below.  This argument tells GDB how to categorize the new command
      in the help system.
 
      COMPLETER_CLASS is an optional argument.  If given, it should be
-     one of the `COMPLETE_' constants defined below.  This argument
+     one of the 'COMPLETE_' constants defined below.  This argument
      tells GDB how to perform completion for this command.  If not
-     given, GDB will attempt to complete using the object's `complete'
-     method (see below); if no such method is found, an error will
-     occur when completion is attempted.
+     given, GDB will attempt to complete using the object's 'complete'
+     method (see below); if no such method is found, an error will occur
+     when completion is attempted.
 
-     PREFIX is an optional argument.  If `True', then the new command
-     is a prefix command; sub-commands of this command may be
-     registered.
+     PREFIX is an optional argument.  If 'True', then the new command is
+     a prefix command; sub-commands of this command may be registered.
 
      The help text for the new command is taken from the Python
      documentation string for the command's class, if there is one.  If
      no documentation string is provided, the default value "This
-     command is not documented." is used.
+     command is not documented."  is used.
 
  -- Function: Command.dont_repeat ()
      By default, a GDB command is repeated when the user enters a blank
      line at the command prompt.  A command can suppress this behavior
-     by invoking the `dont_repeat' method.  This is similar to the user
-     command `dont-repeat', see *note dont-repeat: Define.
+     by invoking the 'dont_repeat' method.  This is similar to the user
+     command 'dont-repeat', see *note dont-repeat: Define.
 
  -- Function: Command.invoke (argument, from_tty)
      This method is called by GDB when this command is invoked.
@@ -1794,39 +2294,38 @@ using a subclass.
      command was entered by the user at the terminal; when false it
      means that the command came from elsewhere.
 
-     If this method throws an exception, it is turned into a GDB
-     `error' call.  Otherwise, the return value is ignored.
+     If this method throws an exception, it is turned into a GDB 'error'
+     call.  Otherwise, the return value is ignored.
 
      To break ARGUMENT up into an argv-like string use
-     `gdb.string_to_argv'.  This function behaves identically to GDB's
-     internal argument lexer `buildargv'.  It is recommended to use
-     this for consistency.  Arguments are separated by spaces and may
-     be quoted.  Example:
+     'gdb.string_to_argv'.  This function behaves identically to GDB's
+     internal argument lexer 'buildargv'.  It is recommended to use this
+     for consistency.  Arguments are separated by spaces and may be
+     quoted.  Example:
 
           print gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\"")
           ['1', '2 "3', '4 "5', "6 '7"]
 
-
  -- Function: Command.complete (text, word)
      This method is called by GDB when the user attempts completion on
      this command.  All forms of completion are handled by this method,
-     that is, the <TAB> and <M-?> key bindings (*note Completion::),
-     and the `complete' command (*note complete: Help.).
+     that is, the <TAB> and <M-?> key bindings (*note Completion::), and
+     the 'complete' command (*note complete: Help.).
 
      The arguments TEXT and WORD are both strings; TEXT holds the
-     complete command line up to the cursor's location, while WORD
-     holds the last word of the command line; this is computed using a
+     complete command line up to the cursor's location, while WORD holds
+     the last word of the command line; this is computed using a
      word-breaking heuristic.
 
-     The `complete' method can return several values:
+     The 'complete' method can return several values:
         * If the return value is a sequence, the contents of the
-          sequence are used as the completions.  It is up to `complete'
+          sequence are used as the completions.  It is up to 'complete'
           to ensure that the contents actually do complete the word.  A
           zero-length sequence is allowed, it means that there were no
           completions available.  Only string elements of the sequence
           are used; other elements in the sequence are ignored.
 
-        * If the return value is one of the `COMPLETE_' constants
+        * If the return value is one of the 'COMPLETE_' constants
           defined below, then the corresponding GDB-internal completion
           function is invoked, and its result is used.
 
@@ -1838,102 +2337,101 @@ some general class of commands.  This is
 commands in the on-line help system; note that prefix commands are not
 listed under their own category but rather that of their top-level
 command.  The available classifications are represented by constants
-defined in the `gdb' module:
+defined in the 'gdb' module:
 
-`gdb.COMMAND_NONE'
+'gdb.COMMAND_NONE'
      The command does not belong to any particular class.  A command in
      this category will not be displayed in any of the help categories.
 
-`gdb.COMMAND_RUNNING'
+'gdb.COMMAND_RUNNING'
      The command is related to running the inferior.  For example,
-     `start', `step', and `continue' are in this category.  Type `help
+     'start', 'step', and 'continue' are in this category.  Type 'help
      running' at the GDB prompt to see a list of commands in this
      category.
 
-`gdb.COMMAND_DATA'
-     The command is related to data or variables.  For example, `call',
-     `find', and `print' are in this category.  Type `help data' at the
+'gdb.COMMAND_DATA'
+     The command is related to data or variables.  For example, 'call',
+     'find', and 'print' are in this category.  Type 'help data' at the
      GDB prompt to see a list of commands in this category.
 
-`gdb.COMMAND_STACK'
+'gdb.COMMAND_STACK'
      The command has to do with manipulation of the stack.  For example,
-     `backtrace', `frame', and `return' are in this category.  Type
-     `help stack' at the GDB prompt to see a list of commands in this
+     'backtrace', 'frame', and 'return' are in this category.  Type
+     'help stack' at the GDB prompt to see a list of commands in this
      category.
 
-`gdb.COMMAND_FILES'
-     This class is used for file-related commands.  For example,
-     `file', `list' and `section' are in this category.  Type `help
-     files' at the GDB prompt to see a list of commands in this
-     category.
+'gdb.COMMAND_FILES'
+     This class is used for file-related commands.  For example, 'file',
+     'list' and 'section' are in this category.  Type 'help files' at
+     the GDB prompt to see a list of commands in this category.
 
-`gdb.COMMAND_SUPPORT'
+'gdb.COMMAND_SUPPORT'
      This should be used for "support facilities", generally meaning
      things that are useful to the user when interacting with GDB, but
-     not related to the state of the inferior.  For example, `help',
-     `make', and `shell' are in this category.  Type `help support' at
+     not related to the state of the inferior.  For example, 'help',
+     'make', and 'shell' are in this category.  Type 'help support' at
      the GDB prompt to see a list of commands in this category.
 
-`gdb.COMMAND_STATUS'
-     The command is an `info'-related command, that is, related to the
-     state of GDB itself.  For example, `info', `macro', and `show' are
-     in this category.  Type `help status' at the GDB prompt to see a
+'gdb.COMMAND_STATUS'
+     The command is an 'info'-related command, that is, related to the
+     state of GDB itself.  For example, 'info', 'macro', and 'show' are
+     in this category.  Type 'help status' at the GDB prompt to see a
      list of commands in this category.
 
-`gdb.COMMAND_BREAKPOINTS'
-     The command has to do with breakpoints.  For example, `break',
-     `clear', and `delete' are in this category.  Type `help
+'gdb.COMMAND_BREAKPOINTS'
+     The command has to do with breakpoints.  For example, 'break',
+     'clear', and 'delete' are in this category.  Type 'help
      breakpoints' at the GDB prompt to see a list of commands in this
      category.
 
-`gdb.COMMAND_TRACEPOINTS'
-     The command has to do with tracepoints.  For example, `trace',
-     `actions', and `tfind' are in this category.  Type `help
+'gdb.COMMAND_TRACEPOINTS'
+     The command has to do with tracepoints.  For example, 'trace',
+     'actions', and 'tfind' are in this category.  Type 'help
      tracepoints' at the GDB prompt to see a list of commands in this
      category.
 
-`gdb.COMMAND_USER'
+'gdb.COMMAND_USER'
      The command is a general purpose command for the user, and
-     typically does not fit in one of the other categories.  Type `help
+     typically does not fit in one of the other categories.  Type 'help
      user-defined' at the GDB prompt to see a list of commands in this
      category, as well as the list of gdb macros (*note Sequences::).
 
-`gdb.COMMAND_OBSCURE'
+'gdb.COMMAND_OBSCURE'
      The command is only used in unusual circumstances, or is not of
-     general interest to users.  For example, `checkpoint', `fork', and
-     `stop' are in this category.  Type `help obscure' at the GDB
-     prompt to see a list of commands in this category.
-
-`gdb.COMMAND_MAINTENANCE'
-     The command is only useful to GDB maintainers.  The `maintenance'
-     and `flushregs' commands are in this category.  Type `help
+     general interest to users.  For example, 'checkpoint', 'fork', and
+     'stop' are in this category.  Type 'help obscure' at the GDB prompt
+     to see a list of commands in this category.
+
+'gdb.COMMAND_MAINTENANCE'
+     The command is only useful to GDB maintainers.  The 'maintenance'
+     and 'flushregs' commands are in this category.  Type 'help
      internals' at the GDB prompt to see a list of commands in this
      category.
 
    A new command can use a predefined completion function, either by
-specifying it via an argument at initialization, or by returning it
-from the `complete' method.  These predefined completion constants are
-all defined in the `gdb' module:
+specifying it via an argument at initialization, or by returning it from
+the 'complete' method.  These predefined completion constants are all
+defined in the 'gdb' module:
 
-`gdb.COMPLETE_NONE'
+'gdb.COMPLETE_NONE'
      This constant means that no completion should be done.
 
-`gdb.COMPLETE_FILENAME'
+'gdb.COMPLETE_FILENAME'
      This constant means that filename completion should be performed.
 
-`gdb.COMPLETE_LOCATION'
-     This constant means that location completion should be done.
-     *Note Specify Location::.
+'gdb.COMPLETE_LOCATION'
+     This constant means that location completion should be done.  *Note
+     Specify Location::.
 
-`gdb.COMPLETE_COMMAND'
+'gdb.COMPLETE_COMMAND'
      This constant means that completion should examine GDB command
      names.
 
-`gdb.COMPLETE_SYMBOL'
+'gdb.COMPLETE_SYMBOL'
      This constant means that completion should be done using symbol
      names as the source.
 
-`gdb.COMPLETE_EXPRESSION'
+'gdb.COMPLETE_EXPRESSION'
      This constant means that completion should be done on expressions.
      Often this means completing on symbol names, but some language
      parsers also have support for completing on field names.
@@ -1954,55 +2452,55 @@ implemented in Python:
 
    The last line instantiates the class, and is necessary to trigger the
 registration of the command with GDB.  Depending on how the Python code
-is read into GDB, you may need to import the `gdb' module explicitly.
+is read into GDB, you may need to import the 'gdb' module explicitly.
 
 
 File: gdb.info,  Node: Parameters In Python,  Next: Functions In Python,  Prev: Commands In Python,  Up: Python API
 
-23.2.2.20 Parameters In Python
+23.2.2.21 Parameters In Python
 ..............................
 
 You can implement new GDB parameters using Python.  A new parameter is
-implemented as an instance of the `gdb.Parameter' class.
+implemented as an instance of the 'gdb.Parameter' class.
 
-   Parameters are exposed to the user via the `set' and `show'
-commands.  *Note Help::.
+   Parameters are exposed to the user via the 'set' and 'show' commands.
+*Note Help::.
 
    There are many parameters that already exist and can be set in GDB.
-Two examples are: `set follow fork' and `set charset'.  Setting these
+Two examples are: 'set follow fork' and 'set charset'.  Setting these
 parameters influences certain behavior in GDB.  Similarly, you can
 define parameters that can be used to influence behavior in custom
 Python scripts and commands.
 
  -- Function: Parameter.__init__ (name, COMMAND-CLASS, PARAMETER-CLASS
           [, ENUM-SEQUENCE])
-     The object initializer for `Parameter' registers the new parameter
+     The object initializer for 'Parameter' registers the new parameter
      with GDB.  This initializer is normally invoked from the subclass'
-     own `__init__' method.
+     own '__init__' method.
 
      NAME is the name of the new parameter.  If NAME consists of
      multiple words, then the initial words are looked for as prefix
-     parameters.  An example of this can be illustrated with the `set
-     print' set of parameters.  If NAME is `print foo', then `print'
+     parameters.  An example of this can be illustrated with the 'set
+     print' set of parameters.  If NAME is 'print foo', then 'print'
      will be searched as the prefix parameter.  In this case the
-     parameter can subsequently be accessed in GDB as `set print foo'.
+     parameter can subsequently be accessed in GDB as 'set print foo'.
 
      If NAME consists of multiple words, and no prefix parameter group
      can be found, an exception is raised.
 
-     COMMAND-CLASS should be one of the `COMMAND_' constants (*note
+     COMMAND-CLASS should be one of the 'COMMAND_' constants (*note
      Commands In Python::).  This argument tells GDB how to categorize
      the new parameter in the help system.
 
-     PARAMETER-CLASS should be one of the `PARAM_' constants defined
-     below.  This argument tells GDB the type of the new parameter;
-     this information is used for input validation and completion.
+     PARAMETER-CLASS should be one of the 'PARAM_' constants defined
+     below.  This argument tells GDB the type of the new parameter; this
+     information is used for input validation and completion.
 
-     If PARAMETER-CLASS is `PARAM_ENUM', then ENUM-SEQUENCE must be a
+     If PARAMETER-CLASS is 'PARAM_ENUM', then ENUM-SEQUENCE must be a
      sequence of strings.  These strings represent the possible values
      for the parameter.
 
-     If PARAMETER-CLASS is not `PARAM_ENUM', then the presence of a
+     If PARAMETER-CLASS is not 'PARAM_ENUM', then the presence of a
      fourth argument will cause an exception to be thrown.
 
      The help text for the new parameter is taken from the Python
@@ -2011,114 +2509,113 @@ Python scripts and commands.
 
  -- Variable: Parameter.set_doc
      If this attribute exists, and is a string, then its value is used
-     as the help text for this parameter's `set' command.  The value is
-     examined when `Parameter.__init__' is invoked; subsequent changes
+     as the help text for this parameter's 'set' command.  The value is
+     examined when 'Parameter.__init__' is invoked; subsequent changes
      have no effect.
 
  -- Variable: Parameter.show_doc
      If this attribute exists, and is a string, then its value is used
-     as the help text for this parameter's `show' command.  The value is
-     examined when `Parameter.__init__' is invoked; subsequent changes
+     as the help text for this parameter's 'show' command.  The value is
+     examined when 'Parameter.__init__' is invoked; subsequent changes
      have no effect.
 
  -- Variable: Parameter.value
-     The `value' attribute holds the underlying value of the parameter.
+     The 'value' attribute holds the underlying value of the parameter.
      It can be read and assigned to just as any other attribute.  GDB
      does validation when assignments are made.
 
-   There are two methods that should be implemented in any `Parameter'
+   There are two methods that should be implemented in any 'Parameter'
 class.  These are:
 
  -- Function: Parameter.get_set_string (self)
-     GDB will call this method when a PARAMETER's value has been
-     changed via the `set' API (for example, `set foo off').  The
-     `value' attribute has already been populated with the new value
-     and may be used in output.  This method must return a string.
+     GDB will call this method when a PARAMETER's value has been changed
+     via the 'set' API (for example, 'set foo off').  The 'value'
+     attribute has already been populated with the new value and may be
+     used in output.  This method must return a string.
 
  -- Function: Parameter.get_show_string (self, svalue)
-     GDB will call this method when a PARAMETER's `show' API has been
-     invoked (for example, `show foo').  The argument `svalue' receives
+     GDB will call this method when a PARAMETER's 'show' API has been
+     invoked (for example, 'show foo').  The argument 'svalue' receives
      the string representation of the current value.  This method must
      return a string.
 
    When a new parameter is defined, its type must be specified.  The
-available types are represented by constants defined in the `gdb'
+available types are represented by constants defined in the 'gdb'
 module:
 
-`gdb.PARAM_BOOLEAN'
-     The value is a plain boolean.  The Python boolean values, `True'
-     and `False' are the only valid values.
+'gdb.PARAM_BOOLEAN'
+     The value is a plain boolean.  The Python boolean values, 'True'
+     and 'False' are the only valid values.
 
-`gdb.PARAM_AUTO_BOOLEAN'
-     The value has three possible states: true, false, and `auto'.  In
+'gdb.PARAM_AUTO_BOOLEAN'
+     The value has three possible states: true, false, and 'auto'.  In
      Python, true and false are represented using boolean constants, and
-     `auto' is represented using `None'.
+     'auto' is represented using 'None'.
 
-`gdb.PARAM_UINTEGER'
+'gdb.PARAM_UINTEGER'
      The value is an unsigned integer.  The value of 0 should be
      interpreted to mean "unlimited".
 
-`gdb.PARAM_INTEGER'
+'gdb.PARAM_INTEGER'
      The value is a signed integer.  The value of 0 should be
      interpreted to mean "unlimited".
 
-`gdb.PARAM_STRING'
+'gdb.PARAM_STRING'
      The value is a string.  When the user modifies the string, any
-     escape sequences, such as `\t', `\f', and octal escapes, are
+     escape sequences, such as '\t', '\f', and octal escapes, are
      translated into corresponding characters and encoded into the
      current host charset.
 
-`gdb.PARAM_STRING_NOESCAPE'
+'gdb.PARAM_STRING_NOESCAPE'
      The value is a string.  When the user modifies the string, escapes
      are passed through untranslated.
 
-`gdb.PARAM_OPTIONAL_FILENAME'
-     The value is a either a filename (a string), or `None'.
+'gdb.PARAM_OPTIONAL_FILENAME'
+     The value is a either a filename (a string), or 'None'.
 
-`gdb.PARAM_FILENAME'
+'gdb.PARAM_FILENAME'
      The value is a filename.  This is just like
-     `PARAM_STRING_NOESCAPE', but uses file names for completion.
+     'PARAM_STRING_NOESCAPE', but uses file names for completion.
 
-`gdb.PARAM_ZINTEGER'
-     The value is an integer.  This is like `PARAM_INTEGER', except 0
-     is interpreted as itself.
+'gdb.PARAM_ZINTEGER'
+     The value is an integer.  This is like 'PARAM_INTEGER', except 0 is
+     interpreted as itself.
 
-`gdb.PARAM_ENUM'
+'gdb.PARAM_ENUM'
      The value is a string, which must be one of a collection string
      constants provided when the parameter is created.
 
 
 File: gdb.info,  Node: Functions In Python,  Next: Progspaces In Python,  Prev: Parameters In Python,  Up: Python API
 
-23.2.2.21 Writing new convenience functions
+23.2.2.22 Writing new convenience functions
 ...........................................
 
 You can implement new convenience functions (*note Convenience Vars::)
 in Python.  A convenience function is an instance of a subclass of the
-class `gdb.Function'.
+class 'gdb.Function'.
 
  -- Function: Function.__init__ (name)
-     The initializer for `Function' registers the new function with
-     GDB.  The argument NAME is the name of the function, a string.
-     The function will be visible to the user as a convenience variable
-     of type `internal function', whose name is the same as the given
-     NAME.
+     The initializer for 'Function' registers the new function with GDB.
+     The argument NAME is the name of the function, a string.  The
+     function will be visible to the user as a convenience variable of
+     type 'internal function', whose name is the same as the given NAME.
 
      The documentation for the new function is taken from the
      documentation string for the new class.
 
  -- Function: Function.invoke (*ARGS)
      When a convenience function is evaluated, its arguments are
-     converted to instances of `gdb.Value', and then the function's
-     `invoke' method is called.  Note that GDB does not predetermine
-     the arity of convenience functions.  Instead, all available
-     arguments are passed to `invoke', following the standard Python
-     calling convention.  In particular, a convenience function can
-     have default values for parameters without ill effect.
+     converted to instances of 'gdb.Value', and then the function's
+     'invoke' method is called.  Note that GDB does not predetermine the
+     arity of convenience functions.  Instead, all available arguments
+     are passed to 'invoke', following the standard Python calling
+     convention.  In particular, a convenience function can have default
+     values for parameters without ill effect.
 
      The return value of this method is used as its value in the
      enclosing expression.  If an ordinary Python value is returned, it
-     is converted to a `gdb.Value' following the usual rules.
+     is converted to a 'gdb.Value' following the usual rules.
 
    The following code snippet shows how a trivial convenience function
 can be implemented in Python:
@@ -2136,9 +2633,8 @@ can be implemented in Python:
      Greet ()
 
    The last line instantiates the class, and is necessary to trigger the
-registration of the function with GDB.  Depending on how the Python
-code is read into GDB, you may need to import the `gdb' module
-explicitly.
+registration of the function with GDB.  Depending on how the Python code
+is read into GDB, you may need to import the 'gdb' module explicitly.
 
    Now you can use the function in an expression:
 
@@ -2148,7 +2644,7 @@ explicitly.
 
 File: gdb.info,  Node: Progspaces In Python,  Next: Objfiles In Python,  Prev: Functions In Python,  Up: Python API
 
-23.2.2.22 Program Spaces In Python
+23.2.2.23 Program Spaces In Python
 ..................................
 
 A program space, or "progspace", represents a symbolic view of an
@@ -2156,7 +2652,7 @@ address space.  It consists of all of th
 *Note Objfiles In Python::.  *Note program spaces: Inferiors and
 Programs, for more details about program spaces.
 
-   The following progspace-related functions are available in the `gdb'
+   The following progspace-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.current_progspace ()
@@ -2166,34 +2662,34 @@ module:
  -- Function: gdb.progspaces ()
      Return a sequence of all the progspaces currently known to GDB.
 
-   Each progspace is represented by an instance of the `gdb.Progspace'
+   Each progspace is represented by an instance of the 'gdb.Progspace'
 class.
 
  -- Variable: Progspace.filename
      The file name of the progspace as a string.
 
  -- Variable: Progspace.pretty_printers
-     The `pretty_printers' attribute is a list of functions.  It is
-     used to look up pretty-printers.  A `Value' is passed to each
-     function in order; if the function returns `None', then the search
+     The 'pretty_printers' attribute is a list of functions.  It is used
+     to look up pretty-printers.  A 'Value' is passed to each function
+     in order; if the function returns 'None', then the search
      continues.  Otherwise, the return value should be an object which
      is used to format the value.  *Note Pretty Printing API::, for more
      information.
 
  -- Variable: Progspace.type_printers
-     The `type_printers' attribute is a list of type printer objects.
+     The 'type_printers' attribute is a list of type printer objects.
      *Note Type Printing API::, for more information.
 
  -- Variable: Progspace.frame_filters
-     The `frame_filters' attribute is a dictionary of frame filter
+     The 'frame_filters' attribute is a dictionary of frame filter
      objects.  *Note Frame Filter API::, for more information.
 
-   One may add arbitrary attributes to `gdb.Progspace' objects in the
+   One may add arbitrary attributes to 'gdb.Progspace' objects in the
 usual Python way.  This is useful if, for example, one needs to do some
 extra record keeping associated with the program space.
 
-   In this contrived example, we want to perform some processing when
-an objfile with a certain symbol is loaded, but we only want to do this
+   In this contrived example, we want to perform some processing when an
+objfile with a certain symbol is loaded, but we only want to do this
 once because it is expensive.  To achieve this we record the results
 with the program space because we can't predict when the desired objfile
 will be loaded.
@@ -2232,23 +2728,23 @@ will be loaded.
 
 File: gdb.info,  Node: Objfiles In Python,  Next: Frames In Python,  Prev: Progspaces In Python,  Up: Python API
 
-23.2.2.23 Objfiles In Python
+23.2.2.24 Objfiles In Python
 ............................
 
 GDB loads symbols for an inferior from various symbol-containing files
 (*note Files::).  These include the primary executable file, any shared
-libraries used by the inferior, and any separate debug info files
-(*note Separate Debug Files::).  GDB calls these symbol-containing
-files "objfiles".
+libraries used by the inferior, and any separate debug info files (*note
+Separate Debug Files::).  GDB calls these symbol-containing files
+"objfiles".
 
-   The following objfile-related functions are available in the `gdb'
+   The following objfile-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.current_objfile ()
      When auto-loading a Python script (*note Python Auto-loading::),
      GDB sets the "current objfile" to the corresponding objfile.  This
      function returns the current objfile.  If there is no current
-     objfile, this function returns `None'.
+     objfile, this function returns 'None'.
 
  -- Function: gdb.objfiles ()
      Return a sequence of all the objfiles current known to GDB.  *Note
@@ -2257,76 +2753,76 @@ module:
  -- Function: gdb.lookup_objfile (name [, by_build_id])
      Look up NAME, a file name or build ID, in the list of objfiles for
      the current program space (*note Progspaces In Python::).  If the
-     objfile is not found throw the Python `ValueError' exception.
+     objfile is not found throw the Python 'ValueError' exception.
 
-     If NAME is a relative file name, then it will match any source
-     file name with the same trailing components.  For example, if NAME
-     is `gcc/expr.c', then it will match source file name of
-     `/build/trunk/gcc/expr.c', but not `/build/trunk/libcpp/expr.c' or
-     `/build/trunk/gcc/x-expr.c'.
-
-     If BY_BUILD_ID is provided and is `True' then NAME is the build ID
-     of the objfile.  Otherwise, NAME is a file name.  This is
-     supported only on some operating systems, notably those which use
-     the ELF format for binary files and the GNU Binutils.  For more
-     details about this feature, see the description of the `--build-id'
+     If NAME is a relative file name, then it will match any source file
+     name with the same trailing components.  For example, if NAME is
+     'gcc/expr.c', then it will match source file name of
+     '/build/trunk/gcc/expr.c', but not '/build/trunk/libcpp/expr.c' or
+     '/build/trunk/gcc/x-expr.c'.
+
+     If BY_BUILD_ID is provided and is 'True' then NAME is the build ID
+     of the objfile.  Otherwise, NAME is a file name.  This is supported
+     only on some operating systems, notably those which use the ELF
+     format for binary files and the GNU Binutils.  For more details
+     about this feature, see the description of the '--build-id'
      command-line option in *note Command Line Options:
      (ld.info)Options.
 
-   Each objfile is represented by an instance of the `gdb.Objfile'
+   Each objfile is represented by an instance of the 'gdb.Objfile'
 class.
 
  -- Variable: Objfile.filename
      The file name of the objfile as a string, with symbolic links
      resolved.
 
-     The value is `None' if the objfile is no longer valid.  See the
-     `gdb.Objfile.is_valid' method, described below.
+     The value is 'None' if the objfile is no longer valid.  See the
+     'gdb.Objfile.is_valid' method, described below.
 
  -- Variable: Objfile.username
      The file name of the objfile as specified by the user as a string.
 
-     The value is `None' if the objfile is no longer valid.  See the
-     `gdb.Objfile.is_valid' method, described below.
+     The value is 'None' if the objfile is no longer valid.  See the
+     'gdb.Objfile.is_valid' method, described below.
 
  -- Variable: Objfile.owner
      For separate debug info objfiles this is the corresponding
-     `gdb.Objfile' object that debug info is being provided for.
-     Otherwise this is `None'.  Separate debug info objfiles are added
-     with the `gdb.Objfile.add_separate_debug_file' method, described
+     'gdb.Objfile' object that debug info is being provided for.
+     Otherwise this is 'None'.  Separate debug info objfiles are added
+     with the 'gdb.Objfile.add_separate_debug_file' method, described
      below.
 
  -- Variable: Objfile.build_id
      The build ID of the objfile as a string.  If the objfile does not
-     have a build ID then the value is `None'.
+     have a build ID then the value is 'None'.
 
      This is supported only on some operating systems, notably those
      which use the ELF format for binary files and the GNU Binutils.
      For more details about this feature, see the description of the
-     `--build-id' command-line option in *note Command Line Options:
+     '--build-id' command-line option in *note Command Line Options:
      (ld.info)Options.
 
  -- Variable: Objfile.progspace
-     The containing program space of the objfile as a `gdb.Progspace'
+     The containing program space of the objfile as a 'gdb.Progspace'
      object.  *Note Progspaces In Python::.
 
  -- Variable: Objfile.pretty_printers
-     The `pretty_printers' attribute is a list of functions.  It is
-     used to look up pretty-printers.  A `Value' is passed to each
-     function in order; if the function returns `None', then the search
+     The 'pretty_printers' attribute is a list of functions.  It is used
+     to look up pretty-printers.  A 'Value' is passed to each function
+     in order; if the function returns 'None', then the search
      continues.  Otherwise, the return value should be an object which
      is used to format the value.  *Note Pretty Printing API::, for more
      information.
 
  -- Variable: Objfile.type_printers
-     The `type_printers' attribute is a list of type printer objects.
+     The 'type_printers' attribute is a list of type printer objects.
      *Note Type Printing API::, for more information.
 
  -- Variable: Objfile.frame_filters
-     The `frame_filters' attribute is a dictionary of frame filter
+     The 'frame_filters' attribute is a dictionary of frame filter
      objects.  *Note Frame Filter API::, for more information.
 
-   One may add arbitrary attributes to `gdb.Objfile' objects in the
+   One may add arbitrary attributes to 'gdb.Objfile' objects in the
 usual Python way.  This is useful if, for example, one needs to do some
 extra record keeping associated with the objfile.
 
@@ -2345,13 +2841,13 @@ objfile.
      (gdb) python print gdb.objfiles()[0].time_loaded
      2014-10-09 11:41:36.770345
 
-   A `gdb.Objfile' object has the following methods:
+   A 'gdb.Objfile' object has the following methods:
 
  -- Function: Objfile.is_valid ()
-     Returns `True' if the `gdb.Objfile' object is valid, `False' if
-     not.  A `gdb.Objfile' object can become invalid if the object file
+     Returns 'True' if the 'gdb.Objfile' object is valid, 'False' if
+     not.  A 'gdb.Objfile' object can become invalid if the object file
      it refers to is not loaded in GDB any longer.  All other
-     `gdb.Objfile' methods will throw an exception if it is invalid at
+     'gdb.Objfile' methods will throw an exception if it is invalid at
      the time the method is called.
 
  -- Function: Objfile.add_separate_debug_file (file)
@@ -2359,30 +2855,30 @@ objfile.
      information for the objfile.  This is useful when the debug info
      has been removed from the program and stored in a separate file.
      GDB has built-in support for finding separate debug info files
-     (*note Separate Debug Files::), but if the file doesn't live in
-     one of the standard places that GDB searches then this function
-     can be used to add a debug info file from a different place.
+     (*note Separate Debug Files::), but if the file doesn't live in one
+     of the standard places that GDB searches then this function can be
+     used to add a debug info file from a different place.
 
 
 File: gdb.info,  Node: Frames In Python,  Next: Blocks In Python,  Prev: Objfiles In Python,  Up: Python API
 
-23.2.2.24 Accessing inferior stack frames from Python.
+23.2.2.25 Accessing inferior stack frames from Python.
 ......................................................
 
 When the debugged program stops, GDB is able to analyze its call stack
-(*note Stack frames: Frames.).  The `gdb.Frame' class represents a
-frame in the stack.  A `gdb.Frame' object is only valid while its
+(*note Stack frames: Frames.).  The 'gdb.Frame' class represents a frame
+in the stack.  A 'gdb.Frame' object is only valid while its
 corresponding frame exists in the inferior's stack.  If you try to use
-an invalid frame object, GDB will throw a `gdb.error' exception (*note
+an invalid frame object, GDB will throw a 'gdb.error' exception (*note
 Exception Handling::).
 
-   Two `gdb.Frame' objects can be compared for equality with the `=='
+   Two 'gdb.Frame' objects can be compared for equality with the '=='
 operator, like:
 
      (gdb) python print gdb.newest_frame() == gdb.selected_frame ()
      True
 
-   The following frame-related functions are available in the `gdb'
+   The following frame-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.selected_frame ()
@@ -2395,93 +2891,100 @@ module:
  -- Function: gdb.frame_stop_reason_string (reason)
      Return a string explaining the reason why GDB stopped unwinding
      frames, as expressed by the given REASON code (an integer, see the
-     `unwind_stop_reason' method further down in this section).
+     'unwind_stop_reason' method further down in this section).
 
-   A `gdb.Frame' object has the following methods:
+ -- Function: gdb.invalidate_cached_frames
+     GDB internally keeps a cache of the frames that have been unwound.
+     This function invalidates this cache.
+
+     This function should not generally be called by ordinary Python
+     code.  It is documented for the sake of completeness.
+
+   A 'gdb.Frame' object has the following methods:
 
  -- Function: Frame.is_valid ()
-     Returns true if the `gdb.Frame' object is valid, false if not.  A
+     Returns true if the 'gdb.Frame' object is valid, false if not.  A
      frame object can become invalid if the frame it refers to doesn't
-     exist anymore in the inferior.  All `gdb.Frame' methods will throw
+     exist anymore in the inferior.  All 'gdb.Frame' methods will throw
      an exception if it is invalid at the time the method is called.
 
  -- Function: Frame.name ()
-     Returns the function name of the frame, or `None' if it can't be
+     Returns the function name of the frame, or 'None' if it can't be
      obtained.
 
  -- Function: Frame.architecture ()
-     Returns the `gdb.Architecture' object corresponding to the frame's
+     Returns the 'gdb.Architecture' object corresponding to the frame's
      architecture.  *Note Architectures In Python::.
 
  -- Function: Frame.type ()
      Returns the type of the frame.  The value can be one of:
-    `gdb.NORMAL_FRAME'
+     'gdb.NORMAL_FRAME'
           An ordinary stack frame.
 
-    `gdb.DUMMY_FRAME'
+     'gdb.DUMMY_FRAME'
           A fake stack frame that was created by GDB when performing an
           inferior function call.
 
-    `gdb.INLINE_FRAME'
+     'gdb.INLINE_FRAME'
           A frame representing an inlined function.  The function was
-          inlined into a `gdb.NORMAL_FRAME' that is older than this one.
+          inlined into a 'gdb.NORMAL_FRAME' that is older than this one.
 
-    `gdb.TAILCALL_FRAME'
+     'gdb.TAILCALL_FRAME'
           A frame representing a tail call.  *Note Tail Call Frames::.
 
-    `gdb.SIGTRAMP_FRAME'
+     'gdb.SIGTRAMP_FRAME'
           A signal trampoline frame.  This is the frame created by the
           OS when it calls into a signal handler.
 
-    `gdb.ARCH_FRAME'
+     'gdb.ARCH_FRAME'
           A fake stack frame representing a cross-architecture call.
 
-    `gdb.SENTINEL_FRAME'
-          This is like `gdb.NORMAL_FRAME', but it is only used for the
+     'gdb.SENTINEL_FRAME'
+          This is like 'gdb.NORMAL_FRAME', but it is only used for the
           newest frame.
 
  -- Function: Frame.unwind_stop_reason ()
      Return an integer representing the reason why it's not possible to
      find more frames toward the outermost frame.  Use
-     `gdb.frame_stop_reason_string' to convert the value returned by
-     this function to a string. The value can be one of:
+     'gdb.frame_stop_reason_string' to convert the value returned by
+     this function to a string.  The value can be one of:
 
-    `gdb.FRAME_UNWIND_NO_REASON'
+     'gdb.FRAME_UNWIND_NO_REASON'
           No particular reason (older frames should be available).
 
-    `gdb.FRAME_UNWIND_NULL_ID'
-          The previous frame's analyzer returns an invalid result.
-          This is no longer used by GDB, and is kept only for backward
+     'gdb.FRAME_UNWIND_NULL_ID'
+          The previous frame's analyzer returns an invalid result.  This
+          is no longer used by GDB, and is kept only for backward
           compatibility.
 
-    `gdb.FRAME_UNWIND_OUTERMOST'
+     'gdb.FRAME_UNWIND_OUTERMOST'
           This frame is the outermost.
 
-    `gdb.FRAME_UNWIND_UNAVAILABLE'
+     'gdb.FRAME_UNWIND_UNAVAILABLE'
           Cannot unwind further, because that would require knowing the
           values of registers or memory that have not been collected.
 
-    `gdb.FRAME_UNWIND_INNER_ID'
+     'gdb.FRAME_UNWIND_INNER_ID'
           This frame ID looks like it ought to belong to a NEXT frame,
           but we got it for a PREV frame.  Normally, this is a sign of
           unwinder failure.  It could also indicate stack corruption.
 
-    `gdb.FRAME_UNWIND_SAME_ID'
+     'gdb.FRAME_UNWIND_SAME_ID'
           This frame has the same ID as the previous one.  That means
           that unwinding further would almost certainly give us another
           frame with exactly the same ID, so break the chain.  Normally,
           this is a sign of unwinder failure.  It could also indicate
           stack corruption.
 
-    `gdb.FRAME_UNWIND_NO_SAVED_PC'
+     'gdb.FRAME_UNWIND_NO_SAVED_PC'
           The frame unwinder did not find any saved PC, but we needed
           one to unwind further.
 
-    `gdb.FRAME_UNWIND_MEMORY_ERROR'
+     'gdb.FRAME_UNWIND_MEMORY_ERROR'
           The frame unwinder caused an error while trying to access
           memory.
 
-    `gdb.FRAME_UNWIND_FIRST_ERROR'
+     'gdb.FRAME_UNWIND_FIRST_ERROR'
           Any stop reason greater or equal to this value indicates some
           kind of error.  This special value facilitates writing code
           that tests for errors in unwinding in a way that will work
@@ -2492,7 +2995,6 @@ module:
                if reason >=  gdb.FRAME_UNWIND_FIRST_ERROR:
                    print "An error occured: %s" % reason_str
 
-
  -- Function: Frame.pc ()
      Returns the frame's resume address.
 
@@ -2515,7 +3017,7 @@ module:
 
  -- Function: Frame.read_register (register)
      Return the value of REGISTER in this frame.  The REGISTER argument
-     must be a string (e.g., `'sp'' or `'rax'').  Returns a `Gdb.Value'
+     must be a string (e.g., ''sp'' or ''rax'').  Returns a 'Gdb.Value'
      object.  Throws an exception if REGISTER does not exist.
 
  -- Function: Frame.read_var (variable [, block])
@@ -2523,8 +3025,8 @@ module:
      argument BLOCK is provided, search for the variable from that
      block; otherwise start at the frame's current block (which is
      determined by the frame's current program counter).  The VARIABLE
-     argument must be a string or a `gdb.Symbol' object; BLOCK must be a
-     `gdb.Block' object.
+     argument must be a string or a 'gdb.Symbol' object; BLOCK must be a
+     'gdb.Block' object.
 
  -- Function: Frame.select ()
      Set this frame to be the selected frame.  *Note Examining the
@@ -2533,19 +3035,19 @@ module:
 
 File: gdb.info,  Node: Blocks In Python,  Next: Symbols In Python,  Prev: Frames In Python,  Up: Python API
 
-23.2.2.25 Accessing blocks from Python.
+23.2.2.26 Accessing blocks from Python.
 .......................................
 
 In GDB, symbols are stored in blocks.  A block corresponds roughly to a
 scope in the source code.  Blocks are organized hierarchically, and are
-represented individually in Python as a `gdb.Block'.  Blocks rely on
+represented individually in Python as a 'gdb.Block'.  Blocks rely on
 debugging information being available.
 
    A frame has a block.  Please see *note Frames In Python::, for a more
 in-depth discussion of frames.
 
-   The outermost block is known as the "global block".  The global
-block typically holds public global variables and functions.
+   The outermost block is known as the "global block".  The global block
+typically holds public global variables and functions.
 
    The block nested just inside the global block is the "static block".
 The static block typically holds file-scoped variables and functions.
@@ -2582,31 +3084,31 @@ over all the blocks in a symbol table (*
        }
      }
 
-   A `gdb.Block' is iterable.  The iterator returns the symbols (*note
+   A 'gdb.Block' is iterable.  The iterator returns the symbols (*note
 Symbols In Python::) local to the block.  Python programs should not
 assume that a specific block object will always contain a given symbol,
 since changes in GDB features and infrastructure may cause symbols move
 across blocks in a symbol table.
 
-   The following block-related functions are available in the `gdb'
+   The following block-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.block_for_pc (pc)
-     Return the innermost `gdb.Block' containing the given PC value.
-     If the block cannot be found for the PC value specified, the
-     function will return `None'.
+     Return the innermost 'gdb.Block' containing the given PC value.  If
+     the block cannot be found for the PC value specified, the function
+     will return 'None'.
 
-   A `gdb.Block' object has the following methods:
+   A 'gdb.Block' object has the following methods:
 
  -- Function: Block.is_valid ()
-     Returns `True' if the `gdb.Block' object is valid, `False' if not.
-     A block object can become invalid if the block it refers to
-     doesn't exist anymore in the inferior.  All other `gdb.Block'
-     methods will throw an exception if it is invalid at the time the
-     method is called.  The block's validity is also checked during
-     iteration over symbols of the block.
+     Returns 'True' if the 'gdb.Block' object is valid, 'False' if not.
+     A block object can become invalid if the block it refers to doesn't
+     exist anymore in the inferior.  All other 'gdb.Block' methods will
+     throw an exception if it is invalid at the time the method is
+     called.  The block's validity is also checked during iteration over
+     symbols of the block.
 
-   A `gdb.Block' object has the following attributes:
+   A 'gdb.Block' object has the following attributes:
 
  -- Variable: Block.start
      The start address of the block.  This attribute is not writable.
@@ -2615,8 +3117,8 @@ module:
      The end address of the block.  This attribute is not writable.
 
  -- Variable: Block.function
-     The name of the block represented as a `gdb.Symbol'.  If the block
-     is not named, then this attribute holds `None'.  This attribute is
+     The name of the block represented as a 'gdb.Symbol'.  If the block
+     is not named, then this attribute holds 'None'.  This attribute is
      not writable.
 
      For ordinary function blocks, the superblock is the static block.
@@ -2626,7 +3128,7 @@ module:
 
  -- Variable: Block.superblock
      The block containing this block.  If this parent block does not
-     exist, this attribute holds `None'.  This attribute is not
+     exist, this attribute holds 'None'.  This attribute is not
      writable.
 
  -- Variable: Block.global_block
@@ -2638,24 +3140,24 @@ module:
      writable.
 
  -- Variable: Block.is_global
-     `True' if the `gdb.Block' object is a global block, `False' if
-     not.  This attribute is not writable.
+     'True' if the 'gdb.Block' object is a global block, 'False' if not.
+     This attribute is not writable.
 
  -- Variable: Block.is_static
-     `True' if the `gdb.Block' object is a static block, `False' if
-     not.  This attribute is not writable.
+     'True' if the 'gdb.Block' object is a static block, 'False' if not.
+     This attribute is not writable.
 
 
 File: gdb.info,  Node: Symbols In Python,  Next: Symbol Tables In Python,  Prev: Blocks In Python,  Up: Python API
 
-23.2.2.26 Python representation of Symbols.
+23.2.2.27 Python representation of Symbols.
 ...........................................
 
-GDB represents every variable, function and type as an entry in a
-symbol table.  *Note Examining the Symbol Table: Symbols.  Similarly,
-Python represents these symbols in GDB with the `gdb.Symbol' object.
+GDB represents every variable, function and type as an entry in a symbol
+table.  *Note Examining the Symbol Table: Symbols.  Similarly, Python
+represents these symbols in GDB with the 'gdb.Symbol' object.
 
-   The following symbol-related functions are available in the `gdb'
+   The following symbol-related functions are available in the 'gdb'
 module:
 
  -- Function: gdb.lookup_symbol (name [, block [, domain]])
@@ -2663,43 +3165,43 @@ module:
      be restricted to the parameters defined in the optional domain and
      block arguments.
 
-     NAME is the name of the symbol.  It must be a string.  The
-     optional BLOCK argument restricts the search to symbols visible in
-     that BLOCK.  The BLOCK argument must be a `gdb.Block' object.  If
+     NAME is the name of the symbol.  It must be a string.  The optional
+     BLOCK argument restricts the search to symbols visible in that
+     BLOCK.  The BLOCK argument must be a 'gdb.Block' object.  If
      omitted, the block for the current frame is used.  The optional
      DOMAIN argument restricts the search to the domain type.  The
-     DOMAIN argument must be a domain constant defined in the `gdb'
+     DOMAIN argument must be a domain constant defined in the 'gdb'
      module and described later in this chapter.
 
      The result is a tuple of two elements.  The first element is a
-     `gdb.Symbol' object or `None' if the symbol is not found.  If the
-     symbol is found, the second element is `True' if the symbol is a
-     field of a method's object (e.g., `this' in C++), otherwise it is
-     `False'.  If the symbol is not found, the second element is
-     `False'.
+     'gdb.Symbol' object or 'None' if the symbol is not found.  If the
+     symbol is found, the second element is 'True' if the symbol is a
+     field of a method's object (e.g., 'this' in C++), otherwise it is
+     'False'.  If the symbol is not found, the second element is
+     'False'.
 
  -- Function: gdb.lookup_global_symbol (name [, domain])
      This function searches for a global symbol by name.  The search
      scope can be restricted to by the domain argument.
 
-     NAME is the name of the symbol.  It must be a string.  The
-     optional DOMAIN argument restricts the search to the domain type.
-     The DOMAIN argument must be a domain constant defined in the `gdb'
+     NAME is the name of the symbol.  It must be a string.  The optional
+     DOMAIN argument restricts the search to the domain type.  The
+     DOMAIN argument must be a domain constant defined in the 'gdb'
      module and described later in this chapter.
 
-     The result is a `gdb.Symbol' object or `None' if the symbol is not
+     The result is a 'gdb.Symbol' object or 'None' if the symbol is not
      found.
 
-   A `gdb.Symbol' object has the following attributes:
+   A 'gdb.Symbol' object has the following attributes:
 
  -- Variable: Symbol.type
-     The type of the symbol or `None' if no type is recorded.  This
-     attribute is represented as a `gdb.Type' object.  *Note Types In
+     The type of the symbol or 'None' if no type is recorded.  This
+     attribute is represented as a 'gdb.Type' object.  *Note Types In
      Python::.  This attribute is not writable.
 
  -- Variable: Symbol.symtab
      The symbol table in which the symbol appears.  This attribute is
-     represented as a `gdb.Symtab' object.  *Note Symbol Tables In
+     represented as a 'gdb.Symtab' object.  *Note Symbol Tables In
      Python::.  This attribute is not writable.
 
  -- Variable: Symbol.line
@@ -2716,147 +3218,147 @@ module:
 
  -- Variable: Symbol.print_name
      The name of the symbol in a form suitable for output.  This is
-     either `name' or `linkage_name', depending on whether the user
+     either 'name' or 'linkage_name', depending on whether the user
      asked GDB to display demangled or mangled names.
 
  -- Variable: Symbol.addr_class
      The address class of the symbol.  This classifies how to find the
      value of a symbol.  Each address class is a constant defined in the
-     `gdb' module and described later in this chapter.
+     'gdb' module and described later in this chapter.
 
  -- Variable: Symbol.needs_frame
-     This is `True' if evaluating this symbol's value requires a frame
-     (*note Frames In Python::) and `False' otherwise.  Typically,
-     local variables will require a frame, but other symbols will not.
+     This is 'True' if evaluating this symbol's value requires a frame
+     (*note Frames In Python::) and 'False' otherwise.  Typically, local
+     variables will require a frame, but other symbols will not.
 
  -- Variable: Symbol.is_argument
-     `True' if the symbol is an argument of a function.
+     'True' if the symbol is an argument of a function.
 
  -- Variable: Symbol.is_constant
-     `True' if the symbol is a constant.
+     'True' if the symbol is a constant.
 
  -- Variable: Symbol.is_function
-     `True' if the symbol is a function or a method.
+     'True' if the symbol is a function or a method.
 
  -- Variable: Symbol.is_variable
-     `True' if the symbol is a variable.
+     'True' if the symbol is a variable.
 
-   A `gdb.Symbol' object has the following methods:
+   A 'gdb.Symbol' object has the following methods:
 
  -- Function: Symbol.is_valid ()
-     Returns `True' if the `gdb.Symbol' object is valid, `False' if
-     not.  A `gdb.Symbol' object can become invalid if the symbol it
-     refers to does not exist in GDB any longer.  All other
-     `gdb.Symbol' methods will throw an exception if it is invalid at
-     the time the method is called.
+     Returns 'True' if the 'gdb.Symbol' object is valid, 'False' if not.
+     A 'gdb.Symbol' object can become invalid if the symbol it refers to
+     does not exist in GDB any longer.  All other 'gdb.Symbol' methods
+     will throw an exception if it is invalid at the time the method is
+     called.
 
  -- Function: Symbol.value ([frame])
-     Compute the value of the symbol, as a `gdb.Value'.  For functions,
+     Compute the value of the symbol, as a 'gdb.Value'.  For functions,
      this computes the address of the function, cast to the appropriate
      type.  If the symbol requires a frame in order to compute its
      value, then FRAME must be given.  If FRAME is not given, or if
      FRAME is invalid, then this method will throw an exception.
 
-   The available domain categories in `gdb.Symbol' are represented as
-constants in the `gdb' module:
+   The available domain categories in 'gdb.Symbol' are represented as
+constants in the 'gdb' module:
 
-`gdb.SYMBOL_UNDEF_DOMAIN'
+'gdb.SYMBOL_UNDEF_DOMAIN'
      This is used when a domain has not been discovered or none of the
-     following domains apply.  This usually indicates an error either
-     in the symbol information or in GDB's handling of symbols.
+     following domains apply.  This usually indicates an error either in
+     the symbol information or in GDB's handling of symbols.
 
-`gdb.SYMBOL_VAR_DOMAIN'
+'gdb.SYMBOL_VAR_DOMAIN'
      This domain contains variables, function names, typedef names and
      enum type values.
 
-`gdb.SYMBOL_STRUCT_DOMAIN'
+'gdb.SYMBOL_STRUCT_DOMAIN'
      This domain holds struct, union and enum type names.
 
-`gdb.SYMBOL_LABEL_DOMAIN'
+'gdb.SYMBOL_LABEL_DOMAIN'
      This domain contains names of labels (for gotos).
 
-`gdb.SYMBOL_VARIABLES_DOMAIN'
-     This domain holds a subset of the `SYMBOLS_VAR_DOMAIN'; it
-     contains everything minus functions and types.
+'gdb.SYMBOL_VARIABLES_DOMAIN'
+     This domain holds a subset of the 'SYMBOLS_VAR_DOMAIN'; it contains
+     everything minus functions and types.
 
-`gdb.SYMBOL_FUNCTION_DOMAIN'
+'gdb.SYMBOL_FUNCTION_DOMAIN'
      This domain contains all functions.
 
-`gdb.SYMBOL_TYPES_DOMAIN'
+'gdb.SYMBOL_TYPES_DOMAIN'
      This domain contains all types.
 
-   The available address class categories in `gdb.Symbol' are
-represented as constants in the `gdb' module:
+   The available address class categories in 'gdb.Symbol' are
+represented as constants in the 'gdb' module:
 
-`gdb.SYMBOL_LOC_UNDEF'
+'gdb.SYMBOL_LOC_UNDEF'
      If this is returned by address class, it indicates an error either
      in the symbol information or in GDB's handling of symbols.
 
-`gdb.SYMBOL_LOC_CONST'
+'gdb.SYMBOL_LOC_CONST'
      Value is constant int.
 
-`gdb.SYMBOL_LOC_STATIC'
+'gdb.SYMBOL_LOC_STATIC'
      Value is at a fixed address.
 
-`gdb.SYMBOL_LOC_REGISTER'
+'gdb.SYMBOL_LOC_REGISTER'
      Value is in a register.
 
-`gdb.SYMBOL_LOC_ARG'
+'gdb.SYMBOL_LOC_ARG'
      Value is an argument.  This value is at the offset stored within
      the symbol inside the frame's argument list.
 
-`gdb.SYMBOL_LOC_REF_ARG'
+'gdb.SYMBOL_LOC_REF_ARG'
      Value address is stored in the frame's argument list.  Just like
-     `LOC_ARG' except that the value's address is stored at the offset,
+     'LOC_ARG' except that the value's address is stored at the offset,
      not the value itself.
 
-`gdb.SYMBOL_LOC_REGPARM_ADDR'
-     Value is a specified register.  Just like `LOC_REGISTER' except
-     the register holds the address of the argument instead of the
-     argument itself.
+'gdb.SYMBOL_LOC_REGPARM_ADDR'
+     Value is a specified register.  Just like 'LOC_REGISTER' except the
+     register holds the address of the argument instead of the argument
+     itself.
 
-`gdb.SYMBOL_LOC_LOCAL'
+'gdb.SYMBOL_LOC_LOCAL'
      Value is a local variable.
 
-`gdb.SYMBOL_LOC_TYPEDEF'
-     Value not used.  Symbols in the domain `SYMBOL_STRUCT_DOMAIN' all
+'gdb.SYMBOL_LOC_TYPEDEF'
+     Value not used.  Symbols in the domain 'SYMBOL_STRUCT_DOMAIN' all
      have this class.
 
-`gdb.SYMBOL_LOC_BLOCK'
+'gdb.SYMBOL_LOC_BLOCK'
      Value is a block.
 
-`gdb.SYMBOL_LOC_CONST_BYTES'
+'gdb.SYMBOL_LOC_CONST_BYTES'
      Value is a byte-sequence.
 
-`gdb.SYMBOL_LOC_UNRESOLVED'
-     Value is at a fixed address, but the address of the variable has
-     to be determined from the minimal symbol table whenever the
-     variable is referenced.
+'gdb.SYMBOL_LOC_UNRESOLVED'
+     Value is at a fixed address, but the address of the variable has to
+     be determined from the minimal symbol table whenever the variable
+     is referenced.
 
-`gdb.SYMBOL_LOC_OPTIMIZED_OUT'
+'gdb.SYMBOL_LOC_OPTIMIZED_OUT'
      The value does not actually exist in the program.
 
-`gdb.SYMBOL_LOC_COMPUTED'
+'gdb.SYMBOL_LOC_COMPUTED'
      The value's address is a computed location.
 
 
 File: gdb.info,  Node: Symbol Tables In Python,  Next: Line Tables In Python,  Prev: Symbols In Python,  Up: Python API
 
-23.2.2.27 Symbol table representation in Python.
+23.2.2.28 Symbol table representation in Python.
 ................................................
 
-Access to symbol table data maintained by GDB on the inferior is
-exposed to Python via two objects: `gdb.Symtab_and_line' and
-`gdb.Symtab'.  Symbol table and line data for a frame is returned from
-the `find_sal' method in `gdb.Frame' object.  *Note Frames In Python::.
+Access to symbol table data maintained by GDB on the inferior is exposed
+to Python via two objects: 'gdb.Symtab_and_line' and 'gdb.Symtab'.
+Symbol table and line data for a frame is returned from the 'find_sal'
+method in 'gdb.Frame' object.  *Note Frames In Python::.
 
    For more information on GDB's symbol table management, see *note
 Examining the Symbol Table: Symbols, for more information.
 
-   A `gdb.Symtab_and_line' object has the following attributes:
+   A 'gdb.Symtab_and_line' object has the following attributes:
 
  -- Variable: Symtab_and_line.symtab
-     The symbol table object (`gdb.Symtab') for this frame.  This
+     The symbol table object ('gdb.Symtab') for this frame.  This
      attribute is not writable.
 
  -- Variable: Symtab_and_line.pc
@@ -2871,17 +3373,16 @@ Examining the Symbol Table: Symbols, for
      Indicates the current line number for this object.  This attribute
      is not writable.
 
-   A `gdb.Symtab_and_line' object has the following methods:
+   A 'gdb.Symtab_and_line' object has the following methods:
 
  -- Function: Symtab_and_line.is_valid ()
-     Returns `True' if the `gdb.Symtab_and_line' object is valid,
-     `False' if not.  A `gdb.Symtab_and_line' object can become invalid
+     Returns 'True' if the 'gdb.Symtab_and_line' object is valid,
+     'False' if not.  A 'gdb.Symtab_and_line' object can become invalid
      if the Symbol table and line object it refers to does not exist in
-     GDB any longer.  All other `gdb.Symtab_and_line' methods will
-     throw an exception if it is invalid at the time the method is
-     called.
+     GDB any longer.  All other 'gdb.Symtab_and_line' methods will throw
+     an exception if it is invalid at the time the method is called.
 
-   A `gdb.Symtab' object has the following attributes:
+   A 'gdb.Symtab' object has the following attributes:
 
  -- Variable: Symtab.filename
      The symbol table's source filename.  This attribute is not
@@ -2893,18 +3394,18 @@ Examining the Symbol Table: Symbols, for
 
  -- Variable: Symtab.producer
      The name and possibly version number of the program that compiled
-     the code in the symbol table.  The contents of this string is up
-     to the compiler.  If no producer information is available then
-     `None' is returned.  This attribute is not writable.
+     the code in the symbol table.  The contents of this string is up to
+     the compiler.  If no producer information is available then 'None'
+     is returned.  This attribute is not writable.
 
-   A `gdb.Symtab' object has the following methods:
+   A 'gdb.Symtab' object has the following methods:
 
  -- Function: Symtab.is_valid ()
-     Returns `True' if the `gdb.Symtab' object is valid, `False' if
-     not.  A `gdb.Symtab' object can become invalid if the symbol table
-     it refers to does not exist in GDB any longer.  All other
-     `gdb.Symtab' methods will throw an exception if it is invalid at
-     the time the method is called.
+     Returns 'True' if the 'gdb.Symtab' object is valid, 'False' if not.
+     A 'gdb.Symtab' object can become invalid if the symbol table it
+     refers to does not exist in GDB any longer.  All other 'gdb.Symtab'
+     methods will throw an exception if it is invalid at the time the
+     method is called.
 
  -- Function: Symtab.fullname ()
      Return the symbol table's source absolute file name.
@@ -2918,25 +3419,24 @@ Examining the Symbol Table: Symbols, for
      Blocks In Python::.
 
  -- Function: Symtab.linetable ()
-     Return the line table associated with the symbol table.  *Note
-     Line Tables In Python::.
+     Return the line table associated with the symbol table.  *Note Line
+     Tables In Python::.
 
 
 File: gdb.info,  Node: Line Tables In Python,  Next: Breakpoints In Python,  Prev: Symbol Tables In Python,  Up: Python API
 
-23.2.2.28 Manipulating line tables using Python
+23.2.2.29 Manipulating line tables using Python
 ...............................................
 
-Python code can request and inspect line table information from a
-symbol table that is loaded in GDB.  A line table is a mapping of
-source lines to their executable locations in memory.  To acquire the
-line table information for a particular symbol table, use the
-`linetable' function (*note Symbol Tables In Python::).
-
-   A `gdb.LineTable' is iterable.  The iterator returns
-`LineTableEntry' objects that correspond to the source line and address
-for each line table entry.  `LineTableEntry' objects have the following
-attributes:
+Python code can request and inspect line table information from a symbol
+table that is loaded in GDB.  A line table is a mapping of source lines
+to their executable locations in memory.  To acquire the line table
+information for a particular symbol table, use the 'linetable' function
+(*note Symbol Tables In Python::).
+
+   A 'gdb.LineTable' is iterable.  The iterator returns 'LineTableEntry'
+objects that correspond to the source line and address for each line
+table entry.  'LineTableEntry' objects have the following attributes:
 
  -- Variable: LineTableEntry.line
      The source line number for this line table entry.  This number
@@ -2949,10 +3449,10 @@ attributes:
      attribute is not writable.
 
    As there can be multiple addresses for a single source line, you may
-receive multiple `LineTableEntry' objects with matching `line'
-attributes, but with different `pc' attributes.  The iterator is sorted
-in ascending `pc' order.  Here is a small example illustrating
-iterating over a line table.
+receive multiple 'LineTableEntry' objects with matching 'line'
+attributes, but with different 'pc' attributes.  The iterator is sorted
+in ascending 'pc' order.  Here is a small example illustrating iterating
+over a line table.
 
      symtab = gdb.selected_frame().find_sal().symtab
      linetable = symtab.linetable()
@@ -2970,71 +3470,100 @@ iterating over a line table.
      Line: 42 Address: 0x40060cL
      Line: 45 Address: 0x400615L
 
-   In addition to being able to iterate over a `LineTable', it also has
+   In addition to being able to iterate over a 'LineTable', it also has
 the following direct access methods:
 
  -- Function: LineTable.line (line)
-     Return a Python `Tuple' of `LineTableEntry' objects for any
-     entries in the line table for the given LINE, which specifies the
-     source code line.  If there are no entries for that source code
-     LINE, the Python `None' is returned.
+     Return a Python 'Tuple' of 'LineTableEntry' objects for any entries
+     in the line table for the given LINE, which specifies the source
+     code line.  If there are no entries for that source code LINE, the
+     Python 'None' is returned.
 
  -- Function: LineTable.has_line (line)
-     Return a Python `Boolean' indicating whether there is an entry in
-     the line table for this source line.  Return `True' if an entry is
-     found, or `False' if not.
+     Return a Python 'Boolean' indicating whether there is an entry in
+     the line table for this source line.  Return 'True' if an entry is
+     found, or 'False' if not.
 
  -- Function: LineTable.source_lines ()
-     Return a Python `List' of the source line numbers in the symbol
+     Return a Python 'List' of the source line numbers in the symbol
      table.  Only lines with executable code locations are returned.
-     The contents of the `List' will just be the source line entries
-     represented as Python `Long' values.
+     The contents of the 'List' will just be the source line entries
+     represented as Python 'Long' values.
 
 
 File: gdb.info,  Node: Breakpoints In Python,  Next: Finish Breakpoints in Python,  Prev: Line Tables In Python,  Up: Python API
 
-23.2.2.29 Manipulating breakpoints using Python
+23.2.2.30 Manipulating breakpoints using Python
 ...............................................
 
-Python code can manipulate breakpoints via the `gdb.Breakpoint' class.
+Python code can manipulate breakpoints via the 'gdb.Breakpoint' class.
 
  -- Function: Breakpoint.__init__ (spec [, type [, wp_class [,internal
           [,temporary]]]])
-     Create a new breakpoint according to SPEC, which is a string
-     naming the location of the breakpoint, or an expression that
-     defines a watchpoint.  The contents can be any location recognized
-     by the `break' command, or in the case of a watchpoint, by the
-     `watch' command.  The optional TYPE denotes the breakpoint to
-     create from the types defined later in this chapter.  This argument
-     can be either `gdb.BP_BREAKPOINT' or `gdb.BP_WATCHPOINT'; it
-     defaults to `gdb.BP_BREAKPOINT'.  The optional INTERNAL argument
-     allows the breakpoint to become invisible to the user.  The
-     breakpoint will neither be reported when created, nor will it be
-     listed in the output from `info breakpoints' (but will be listed
-     with the `maint info breakpoints' command).  The optional
-     TEMPORARY argument makes the breakpoint a temporary breakpoint.
-     Temporary breakpoints are deleted after they have been hit.  Any
-     further access to the Python breakpoint after it has been hit will
-     result in a runtime error (as that breakpoint has now been
-     automatically deleted).  The optional WP_CLASS argument defines
-     the class of watchpoint to create, if TYPE is `gdb.BP_WATCHPOINT'.
-     If a watchpoint class is not provided, it is assumed to be a
-     `gdb.WP_WRITE' class.
+     Create a new breakpoint according to SPEC, which is a string naming
+     the location of the breakpoint, or an expression that defines a
+     watchpoint.  The contents can be any location recognized by the
+     'break' command, or in the case of a watchpoint, by the 'watch'
+     command.  The optional TYPE denotes the breakpoint to create from
+     the types defined later in this chapter.  This argument can be
+     either 'gdb.BP_BREAKPOINT' or 'gdb.BP_WATCHPOINT'; it defaults to
+     'gdb.BP_BREAKPOINT'.  The optional INTERNAL argument allows the
+     breakpoint to become invisible to the user.  The breakpoint will
+     neither be reported when created, nor will it be listed in the
+     output from 'info breakpoints' (but will be listed with the 'maint
+     info breakpoints' command).  The optional TEMPORARY argument makes
+     the breakpoint a temporary breakpoint.  Temporary breakpoints are
+     deleted after they have been hit.  Any further access to the Python
+     breakpoint after it has been hit will result in a runtime error (as
+     that breakpoint has now been automatically deleted).  The optional
+     WP_CLASS argument defines the class of watchpoint to create, if
+     TYPE is 'gdb.BP_WATCHPOINT'.  If a watchpoint class is not
+     provided, it is assumed to be a 'gdb.WP_WRITE' class.
+
+   The available types are represented by constants defined in the 'gdb'
+module:
+
+'gdb.BP_BREAKPOINT'
+     Normal code breakpoint.
+
+'gdb.BP_WATCHPOINT'
+     Watchpoint breakpoint.
+
+'gdb.BP_HARDWARE_WATCHPOINT'
+     Hardware assisted watchpoint.
+
+'gdb.BP_READ_WATCHPOINT'
+     Hardware assisted read watchpoint.
+
+'gdb.BP_ACCESS_WATCHPOINT'
+     Hardware assisted access watchpoint.
+
+   The available watchpoint types represented by constants are defined
+in the 'gdb' module:
+
+'gdb.WP_READ'
+     Read only watchpoint.
+
+'gdb.WP_WRITE'
+     Write only watchpoint.
+
+'gdb.WP_ACCESS'
+     Read/Write watchpoint.
 
  -- Function: Breakpoint.stop (self)
-     The `gdb.Breakpoint' class can be sub-classed and, in particular,
-     you may choose to implement the `stop' method.  If this method is
-     defined in a sub-class of `gdb.Breakpoint', it will be called when
+     The 'gdb.Breakpoint' class can be sub-classed and, in particular,
+     you may choose to implement the 'stop' method.  If this method is
+     defined in a sub-class of 'gdb.Breakpoint', it will be called when
      the inferior reaches any location of a breakpoint which
-     instantiates that sub-class.  If the method returns `True', the
+     instantiates that sub-class.  If the method returns 'True', the
      inferior will be stopped at the location of the breakpoint,
      otherwise the inferior will continue.
 
      If there are multiple breakpoints at the same location with a
-     `stop' method, each one will be called regardless of the return
-     status of the previous.  This ensures that all `stop' methods have
+     'stop' method, each one will be called regardless of the return
+     status of the previous.  This ensures that all 'stop' methods have
      a chance to execute at that location.  In this scenario if one of
-     the methods returns `True' but the others return `False', the
+     the methods returns 'True' but the others return 'False', the
      inferior will still be stopped.
 
      You should not alter the execution state of the inferior (i.e.,
@@ -3043,7 +3572,7 @@ Python code can manipulate breakpoints v
      As a general rule, you should not alter any data within GDB or the
      inferior at this time.
 
-     Example `stop' implementation:
+     Example 'stop' implementation:
 
           class MyBreakpoint (gdb.Breakpoint):
                 def stop (self):
@@ -3052,53 +3581,45 @@ Python code can manipulate breakpoints v
                     return True
                   return False
 
-   The available watchpoint types represented by constants are defined
-in the `gdb' module:
-
-`gdb.WP_READ'
-     Read only watchpoint.
-
-`gdb.WP_WRITE'
-     Write only watchpoint.
-
-`gdb.WP_ACCESS'
-     Read/Write watchpoint.
-
  -- Function: Breakpoint.is_valid ()
-     Return `True' if this `Breakpoint' object is valid, `False'
-     otherwise.  A `Breakpoint' object can become invalid if the user
-     deletes the breakpoint.  In this case, the object still exists,
-     but the underlying breakpoint does not.  In the cases of
-     watchpoint scope, the watchpoint remains valid even if execution
-     of the inferior leaves the scope of that watchpoint.
+     Return 'True' if this 'Breakpoint' object is valid, 'False'
+     otherwise.  A 'Breakpoint' object can become invalid if the user
+     deletes the breakpoint.  In this case, the object still exists, but
+     the underlying breakpoint does not.  In the cases of watchpoint
+     scope, the watchpoint remains valid even if execution of the
+     inferior leaves the scope of that watchpoint.
 
  -- Function: Breakpoint.delete ()
      Permanently deletes the GDB breakpoint.  This also invalidates the
-     Python `Breakpoint' object.  Any further access to this object's
+     Python 'Breakpoint' object.  Any further access to this object's
      attributes or methods will raise an error.
 
  -- Variable: Breakpoint.enabled
-     This attribute is `True' if the breakpoint is enabled, and `False'
+     This attribute is 'True' if the breakpoint is enabled, and 'False'
      otherwise.  This attribute is writable.  You can use it to enable
      or disable the breakpoint.
 
  -- Variable: Breakpoint.silent
-     This attribute is `True' if the breakpoint is silent, and `False'
+     This attribute is 'True' if the breakpoint is silent, and 'False'
      otherwise.  This attribute is writable.
 
      Note that a breakpoint can also be silent if it has commands and
-     the first command is `silent'.  This is not reported by the
-     `silent' attribute.
+     the first command is 'silent'.  This is not reported by the
+     'silent' attribute.
+
+ -- Variable: Breakpoint.pending
+     This attribute is 'True' if the breakpoint is pending, and 'False'
+     otherwise.  *Note Set Breaks::.  This attribute is read-only.
 
  -- Variable: Breakpoint.thread
      If the breakpoint is thread-specific, this attribute holds the
-     thread id.  If the breakpoint is not thread-specific, this
-     attribute is `None'.  This attribute is writable.
+     thread's global id.  If the breakpoint is not thread-specific, this
+     attribute is 'None'.  This attribute is writable.
 
  -- Variable: Breakpoint.task
      If the breakpoint is Ada task-specific, this attribute holds the
      Ada task id.  If the breakpoint is not task-specific (or the
-     underlying language is not Ada), this attribute is `None'.  This
+     underlying language is not Ada), this attribute is 'None'.  This
      attribute is writable.
 
  -- Variable: Breakpoint.ignore_count
@@ -3106,9 +3627,9 @@ in the `gdb' module:
      integer.  This attribute is writable.
 
  -- Variable: Breakpoint.number
-     This attribute holds the breakpoint's number -- the identifier
-     used by the user to manipulate the breakpoint.  This attribute is
-     not writable.
+     This attribute holds the breakpoint's number -- the identifier used
+     by the user to manipulate the breakpoint.  This attribute is not
+     writable.
 
  -- Variable: Breakpoint.type
      This attribute holds the breakpoint's type -- the identifier used
@@ -3117,7 +3638,7 @@ in the `gdb' module:
 
  -- Variable: Breakpoint.visible
      This attribute tells whether the breakpoint is visible to the user
-     when set, or when the `info breakpoints' command is run.  This
+     when set, or when the 'info breakpoints' command is run.  This
      attribute is not writable.
 
  -- Variable: Breakpoint.temporary
@@ -3125,28 +3646,10 @@ in the `gdb' module:
      temporary breakpoint.  Temporary breakpoints are automatically
      deleted after that breakpoint has been hit.  Access to this
      attribute, and all other attributes and functions other than the
-     `is_valid' function, will result in an error after the breakpoint
+     'is_valid' function, will result in an error after the breakpoint
      has been hit (as it has been automatically deleted).  This
      attribute is not writable.
 
-   The available types are represented by constants defined in the `gdb'
-module:
-
-`gdb.BP_BREAKPOINT'
-     Normal code breakpoint.
-
-`gdb.BP_WATCHPOINT'
-     Watchpoint breakpoint.
-
-`gdb.BP_HARDWARE_WATCHPOINT'
-     Hardware assisted watchpoint.
-
-`gdb.BP_READ_WATCHPOINT'
-     Hardware assisted read watchpoint.
-
-`gdb.BP_ACCESS_WATCHPOINT'
-     Hardware assisted access watchpoint.
-
  -- Variable: Breakpoint.hit_count
      This attribute holds the hit count for the breakpoint, an integer.
      This attribute is writable, but currently it can only be set to
@@ -3156,53 +3659,53 @@ module:
      This attribute holds the location of the breakpoint, as specified
      by the user.  It is a string.  If the breakpoint does not have a
      location (that is, it is a watchpoint) the attribute's value is
-     `None'.  This attribute is not writable.
+     'None'.  This attribute is not writable.
 
  -- Variable: Breakpoint.expression
      This attribute holds a breakpoint expression, as specified by the
      user.  It is a string.  If the breakpoint does not have an
      expression (the breakpoint is not a watchpoint) the attribute's
-     value is `None'.  This attribute is not writable.
+     value is 'None'.  This attribute is not writable.
 
  -- Variable: Breakpoint.condition
      This attribute holds the condition of the breakpoint, as specified
      by the user.  It is a string.  If there is no condition, this
-     attribute's value is `None'.  This attribute is writable.
+     attribute's value is 'None'.  This attribute is writable.
 
  -- Variable: Breakpoint.commands
      This attribute holds the commands attached to the breakpoint.  If
      there are commands, this attribute's value is a string holding all
      the commands, separated by newlines.  If there are no commands,
-     this attribute is `None'.  This attribute is not writable.
+     this attribute is 'None'.  This attribute is not writable.
 
 
 File: gdb.info,  Node: Finish Breakpoints in Python,  Next: Lazy Strings In Python,  Prev: Breakpoints In Python,  Up: Python API
 
-23.2.2.30 Finish Breakpoints
+23.2.2.31 Finish Breakpoints
 ............................
 
 A finish breakpoint is a temporary breakpoint set at the return address
-of a frame, based on the `finish' command.  `gdb.FinishBreakpoint'
-extends `gdb.Breakpoint'.  The underlying breakpoint will be disabled
+of a frame, based on the 'finish' command.  'gdb.FinishBreakpoint'
+extends 'gdb.Breakpoint'.  The underlying breakpoint will be disabled
 and deleted when the execution will run out of the breakpoint scope
-(i.e.  `Breakpoint.stop' or `FinishBreakpoint.out_of_scope' triggered).
+(i.e. 'Breakpoint.stop' or 'FinishBreakpoint.out_of_scope' triggered).
 Finish breakpoints are thread specific and must be create with the right
 thread selected.
 
  -- Function: FinishBreakpoint.__init__ ([frame] [, internal])
-     Create a finish breakpoint at the return address of the `gdb.Frame'
+     Create a finish breakpoint at the return address of the 'gdb.Frame'
      object FRAME.  If FRAME is not provided, this defaults to the
-     newest frame.  The optional INTERNAL argument allows the
-     breakpoint to become invisible to the user.  *Note Breakpoints In
-     Python::, for further details about this argument.
+     newest frame.  The optional INTERNAL argument allows the breakpoint
+     to become invisible to the user.  *Note Breakpoints In Python::,
+     for further details about this argument.
 
  -- Function: FinishBreakpoint.out_of_scope (self)
-     In some circumstances (e.g. `longjmp', C++ exceptions, GDB
-     `return' command, ...), a function may not properly terminate, and
-     thus never hit the finish breakpoint.  When GDB notices such a
-     situation, the `out_of_scope' callback will be triggered.
+     In some circumstances (e.g. 'longjmp', C++ exceptions, GDB 'return'
+     command, ...), a function may not properly terminate, and thus
+     never hit the finish breakpoint.  When GDB notices such a
+     situation, the 'out_of_scope' callback will be triggered.
 
-     You may want to sub-class `gdb.FinishBreakpoint' and override this
+     You may want to sub-class 'gdb.FinishBreakpoint' and override this
      method:
 
           class MyFinishBreakpoint (gdb.FinishBreakpoint)
@@ -3215,37 +3718,37 @@ thread selected.
 
  -- Variable: FinishBreakpoint.return_value
      When GDB is stopped at a finish breakpoint and the frame used to
-     build the `gdb.FinishBreakpoint' object had debug symbols, this
-     attribute will contain a `gdb.Value' object corresponding to the
-     return value of the function.  The value will be `None' if the
-     function return type is `void' or if the return value was not
+     build the 'gdb.FinishBreakpoint' object had debug symbols, this
+     attribute will contain a 'gdb.Value' object corresponding to the
+     return value of the function.  The value will be 'None' if the
+     function return type is 'void' or if the return value was not
      computable.  This attribute is not writable.
 
 
 File: gdb.info,  Node: Lazy Strings In Python,  Next: Architectures In Python,  Prev: Finish Breakpoints in Python,  Up: Python API
 
-23.2.2.31 Python representation of lazy strings.
+23.2.2.32 Python representation of lazy strings.
 ................................................
 
 A "lazy string" is a string whose contents is not retrieved or encoded
 until it is needed.
 
-   A `gdb.LazyString' is represented in GDB as an `address' that points
-to a region of memory, an `encoding' that will be used to encode that
-region of memory, and a `length' to delimit the region of memory that
-represents the string.  The difference between a `gdb.LazyString' and a
-string wrapped within a `gdb.Value' is that a `gdb.LazyString' will be
-treated differently by GDB when printing.  A `gdb.LazyString' is
-retrieved and encoded during printing, while a `gdb.Value' wrapping a
+   A 'gdb.LazyString' is represented in GDB as an 'address' that points
+to a region of memory, an 'encoding' that will be used to encode that
+region of memory, and a 'length' to delimit the region of memory that
+represents the string.  The difference between a 'gdb.LazyString' and a
+string wrapped within a 'gdb.Value' is that a 'gdb.LazyString' will be
+treated differently by GDB when printing.  A 'gdb.LazyString' is
+retrieved and encoded during printing, while a 'gdb.Value' wrapping a
 string is immediately retrieved and encoded on creation.
 
-   A `gdb.LazyString' object has the following functions:
+   A 'gdb.LazyString' object has the following functions:
 
  -- Function: LazyString.value ()
-     Convert the `gdb.LazyString' to a `gdb.Value'.  This value will
+     Convert the 'gdb.LazyString' to a 'gdb.Value'.  This value will
      point to the string in memory, but will lose all the delayed
      retrieval, encoding and handling that GDB applies to a
-     `gdb.LazyString'.
+     'gdb.LazyString'.
 
  -- Variable: LazyString.address
      This attribute holds the address of the string.  This attribute is
@@ -3253,35 +3756,35 @@ string is immediately retrieved and enco
 
  -- Variable: LazyString.length
      This attribute holds the length of the string in characters.  If
-     the length is -1, then the string will be fetched and encoded up
-     to the first null of appropriate width.  This attribute is not
+     the length is -1, then the string will be fetched and encoded up to
+     the first null of appropriate width.  This attribute is not
      writable.
 
  -- Variable: LazyString.encoding
      This attribute holds the encoding that will be applied to the
      string when the string is printed by GDB.  If the encoding is not
-     set, or contains an empty string,  then GDB will select the most
-     appropriate encoding when the string is printed.  This attribute
-     is not writable.
+     set, or contains an empty string, then GDB will select the most
+     appropriate encoding when the string is printed.  This attribute is
+     not writable.
 
  -- Variable: LazyString.type
      This attribute holds the type that is represented by the lazy
      string's type.  For a lazy string this will always be a pointer
-     type.  To resolve this to the lazy string's character type, use
-     the type's `target' method.  *Note Types In Python::.  This
-     attribute is not writable.
+     type.  To resolve this to the lazy string's character type, use the
+     type's 'target' method.  *Note Types In Python::.  This attribute
+     is not writable.
 
 
 File: gdb.info,  Node: Architectures In Python,  Prev: Lazy Strings In Python,  Up: Python API
 
-23.2.2.32 Python representation of architectures
+23.2.2.33 Python representation of architectures
 ................................................
 
 GDB uses architecture specific parameters and artifacts in a number of
-its various computations.  An architecture is represented by an
-instance of the `gdb.Architecture' class.
+its various computations.  An architecture is represented by an instance
+of the 'gdb.Architecture' class.
 
-   A `gdb.Architecture' class has the following methods:
+   A 'gdb.Architecture' class has the following methods:
 
  -- Function: Architecture.name ()
      Return the name (string value) of the architecture.
@@ -3289,46 +3792,45 @@ instance of the `gdb.Architecture' class
  -- Function: Architecture.disassemble (START_PC [, END_PC [, COUNT]])
      Return a list of disassembled instructions starting from the memory
      address START_PC.  The optional arguments END_PC and COUNT
-     determine the number of instructions in the returned list.  If
-     both the optional arguments END_PC and COUNT are specified, then a
-     list of at most COUNT disassembled instructions whose start
-     address falls in the closed memory address interval from START_PC
-     to END_PC are returned.  If END_PC is not specified, but COUNT is
-     specified, then COUNT number of instructions starting from the
-     address START_PC are returned.  If COUNT is not specified but
-     END_PC is specified, then all instructions whose start address
-     falls in the closed memory address interval from START_PC to
-     END_PC are returned.  If neither END_PC nor COUNT are specified,
-     then a single instruction at START_PC is returned.  For all of
-     these cases, each element of the returned list is a Python `dict'
-     with the following string keys:
+     determine the number of instructions in the returned list.  If both
+     the optional arguments END_PC and COUNT are specified, then a list
+     of at most COUNT disassembled instructions whose start address
+     falls in the closed memory address interval from START_PC to END_PC
+     are returned.  If END_PC is not specified, but COUNT is specified,
+     then COUNT number of instructions starting from the address
+     START_PC are returned.  If COUNT is not specified but END_PC is
+     specified, then all instructions whose start address falls in the
+     closed memory address interval from START_PC to END_PC are
+     returned.  If neither END_PC nor COUNT are specified, then a single
+     instruction at START_PC is returned.  For all of these cases, each
+     element of the returned list is a Python 'dict' with the following
+     string keys:
 
-    `addr'
+     'addr'
           The value corresponding to this key is a Python long integer
           capturing the memory address of the instruction.
 
-    `asm'
+     'asm'
           The value corresponding to this key is a string value which
           represents the instruction with assembly language mnemonics.
           The assembly language flavor used is the same as that
-          specified by the current CLI variable `disassembly-flavor'.
+          specified by the current CLI variable 'disassembly-flavor'.
           *Note Machine Code::.
 
-    `length'
+     'length'
           The value corresponding to this key is the length (integer
           value) of the instruction in bytes.
 
-
 
 File: gdb.info,  Node: Python Auto-loading,  Next: Python modules,  Prev: Python API,  Up: Python
 
 23.2.3 Python Auto-loading
 --------------------------
 
-When a new object file is read (for example, due to the `file' command,
+When a new object file is read (for example, due to the 'file' command,
 or because the inferior has loaded a shared library), GDB will look for
-Python support scripts in several ways: `OBJFILE-gdb.py' and
-`.debug_gdb_scripts' section.  *Note Auto-loading extensions::.
+Python support scripts in several ways: 'OBJFILE-gdb.py' and
+'.debug_gdb_scripts' section.  *Note Auto-loading extensions::.
 
    The auto-loading feature is useful for supplying application-specific
 debugging commands and scripts.
@@ -3336,19 +3838,19 @@ debugging commands and scripts.
    Auto-loading can be enabled or disabled, and the list of auto-loaded
 scripts can be printed.
 
-`set auto-load python-scripts [on|off]'
+'set auto-load python-scripts [on|off]'
      Enable or disable the auto-loading of Python scripts.
 
-`show auto-load python-scripts'
+'show auto-load python-scripts'
      Show whether auto-loading of Python scripts is enabled or disabled.
 
-`info auto-load python-scripts [REGEXP]'
+'info auto-load python-scripts [REGEXP]'
      Print the list of all Python scripts that GDB auto-loaded.
 
      Also printed is the list of Python scripts that were mentioned in
-     the `.debug_gdb_scripts' section and were either not found (*note
+     the '.debug_gdb_scripts' section and were either not found (*note
      dotdebug_gdb_scripts section::) or were not auto-loaded due to
-     `auto-load safe-path' rejection (*note Auto-loading::).  This is
+     'auto-load safe-path' rejection (*note Auto-loading::).  This is
      useful because their names are not printed when GDB tries to load
      them and fails.  There may be many of them, and printing an error
      message for each one is problematic.
@@ -3365,7 +3867,7 @@ scripts can be printed.
           No     my-foo-pretty-printers.py
 
    When reading an auto-loaded file or script, GDB sets the "current
-objfile".  This is available via the `gdb.current_objfile' function
+objfile".  This is available via the 'gdb.current_objfile' function
 (*note Objfiles In Python::).  This can be useful for registering
 objfile-specific pretty-printers and frame-filters.
 
@@ -3392,31 +3894,31 @@ File: gdb.info,  Node: gdb.printing,  Ne
 This module provides a collection of utilities for working with
 pretty-printers.
 
-`PrettyPrinter (NAME, SUBPRINTERS=None)'
-     This class specifies the API that makes `info pretty-printer',
-     `enable pretty-printer' and `disable pretty-printer' work.
+'PrettyPrinter (NAME, SUBPRINTERS=None)'
+     This class specifies the API that makes 'info pretty-printer',
+     'enable pretty-printer' and 'disable pretty-printer' work.
      Pretty-printers should generally inherit from this class.
 
-`SubPrettyPrinter (NAME)'
+'SubPrettyPrinter (NAME)'
      For printers that handle multiple types, this class specifies the
      corresponding API for the subprinters.
 
-`RegexpCollectionPrettyPrinter (NAME)'
+'RegexpCollectionPrettyPrinter (NAME)'
      Utility class for handling multiple printers, all recognized via
      regular expressions.  *Note Writing a Pretty-Printer::, for an
      example.
 
-`FlagEnumerationPrinter (NAME)'
-     A pretty-printer which handles printing of `enum' values.  Unlike
-     GDB's built-in `enum' printing, this printer attempts to work
+'FlagEnumerationPrinter (NAME)'
+     A pretty-printer which handles printing of 'enum' values.  Unlike
+     GDB's built-in 'enum' printing, this printer attempts to work
      properly when there is some overlap between the enumeration
      constants.  The argument NAME is the name of the printer and also
-     the name of the `enum' type to look up.
+     the name of the 'enum' type to look up.
 
-`register_pretty_printer (OBJ, PRINTER, REPLACE=False)'
+'register_pretty_printer (OBJ, PRINTER, REPLACE=False)'
      Register PRINTER with the pretty-printer list of OBJ.  If REPLACE
-     is `True' then any existing copy of the printer is replaced.
-     Otherwise a `RuntimeError' exception is raised if a printer with
+     is 'True' then any existing copy of the printer is replaced.
+     Otherwise a 'RuntimeError' exception is raised if a printer with
      the same name already exists.
 
 
@@ -3426,9 +3928,9 @@ File: gdb.info,  Node: gdb.types,  Next:
 ..................
 
 This module provides a collection of utilities for working with
-`gdb.Type' objects.
+'gdb.Type' objects.
 
-`get_basic_type (TYPE)'
+'get_basic_type (TYPE)'
      Return TYPE with const and volatile qualifiers stripped, and with
      typedefs and C++ references converted to the underlying type.
 
@@ -3447,17 +3949,17 @@ This module provides a collection of uti
           (gdb) python print gdb.types.get_basic_type(foo_ref.type)
           int
 
-`has_field (TYPE, FIELD)'
-     Return `True' if TYPE, assumed to be a type with fields (e.g., a
+'has_field (TYPE, FIELD)'
+     Return 'True' if TYPE, assumed to be a type with fields (e.g., a
      structure or union), has field FIELD.
 
-`make_enum_dict (ENUM_TYPE)'
-     Return a Python `dictionary' type produced from ENUM_TYPE.
+'make_enum_dict (ENUM_TYPE)'
+     Return a Python 'dictionary' type produced from ENUM_TYPE.
 
-`deep_items (TYPE)'
+'deep_items (TYPE)'
      Returns a Python iterator similar to the standard
-     `gdb.Type.iteritems' method, except that the iterator returned by
-     `deep_items' will recursively traverse anonymous struct or union
+     'gdb.Type.iteritems' method, except that the iterator returned by
+     'deep_items' will recursively traverse anonymous struct or union
      fields.  For example:
 
           struct A
@@ -3477,35 +3979,34 @@ This module provides a collection of uti
           (gdb) python print [k for k,v in gdb.types.deep_items(struct_a)]
           {['a', 'b0', 'b1']}
 
-`get_type_recognizers ()'
+'get_type_recognizers ()'
      Return a list of the enabled type recognizers for the current
      context.  This is called by GDB during the type-printing process
      (*note Type Printing API::).
 
-`apply_type_recognizers (recognizers, type_obj)'
+'apply_type_recognizers (recognizers, type_obj)'
      Apply the type recognizers, RECOGNIZERS, to the type object
      TYPE_OBJ.  If any recognizer returns a string, return that string.
-     Otherwise, return `None'.  This is called by GDB during the
+     Otherwise, return 'None'.  This is called by GDB during the
      type-printing process (*note Type Printing API::).
 
-`register_type_printer (locus, printer)'
+'register_type_printer (locus, printer)'
      This is a convenience function to register a type printer PRINTER.
      The printer must implement the type printer protocol.  The LOCUS
-     argument is either a `gdb.Objfile', in which case the printer is
-     registered with that objfile; a `gdb.Progspace', in which case the
-     printer is registered with that progspace; or `None', in which
-     case the printer is registered globally.
+     argument is either a 'gdb.Objfile', in which case the printer is
+     registered with that objfile; a 'gdb.Progspace', in which case the
+     printer is registered with that progspace; or 'None', in which case
+     the printer is registered globally.
 
-`TypePrinter'
+'TypePrinter'
      This is a base class that implements the type printer protocol.
-     Type printers are encouraged, but not required, to derive from
-     this class.  It defines a constructor:
+     Type printers are encouraged, but not required, to derive from this
+     class.  It defines a constructor:
 
       -- Method on TypePrinter: __init__ (self, name)
           Initialize the type printer with the given name.  The new
           printer starts in the enabled state.
 
-
 
 File: gdb.info,  Node: gdb.prompt,  Prev: gdb.types,  Up: Python modules
 
@@ -3514,51 +4015,41 @@ File: gdb.info,  Node: gdb.prompt,  Prev
 
 This module provides a method for prompt value-substitution.
 
-`substitute_prompt (STRING)'
+'substitute_prompt (STRING)'
      Return STRING with escape sequences substituted by values.  Some
      escape sequences take arguments.  You can specify arguments inside
      "{}" immediately following the escape sequence.
 
      The escape sequences you can pass to this function are:
 
-    `\\'
+     '\\'
           Substitute a backslash.
-
-    `\e'
+     '\e'
           Substitute an ESC character.
-
-    `\f'
+     '\f'
           Substitute the selected frame; an argument names a frame
           parameter.
-
-    `\n'
+     '\n'
           Substitute a newline.
-
-    `\p'
+     '\p'
           Substitute a parameter's value; the argument names the
           parameter.
-
-    `\r'
+     '\r'
           Substitute a carriage return.
-
-    `\t'
+     '\t'
           Substitute the selected thread; an argument names a thread
           parameter.
-
-    `\v'
+     '\v'
           Substitute the version of GDB.
-
-    `\w'
+     '\w'
           Substitute the current working directory.
-
-    `\['
+     '\['
           Begin a sequence of non-printing characters.  These sequences
-          are typically used with the ESC character, and are not
-          counted in the string length.  Example:
-          "\[\e[0;34m\](gdb)\[\e[0m\]" will return a blue-colored
-          "(gdb)" prompt where the length is five.
-
-    `\]'
+          are typically used with the ESC character, and are not counted
+          in the string length.  Example: "\[\e[0;34m\](gdb)\[\e[0m\]"
+          will return a blue-colored "(gdb)" prompt where the length is
+          five.
+     '\]'
           End a sequence of non-printing characters.
 
      For example:
@@ -3568,7 +4059,6 @@ This module provides a method for prompt
 
 will return the string:
 
-
           "frame: main, print arguments: scalars"
 
 
@@ -3578,8 +4068,8 @@ File: gdb.info,  Node: Guile,  Next: Aut
 ==============================
 
 You can extend GDB using the Guile implementation of the Scheme
-programming language (http://www.gnu.org/software/guile/).  This
-feature is available only if GDB was configured using `--with-guile'.
+programming language (http://www.gnu.org/software/guile/).  This feature
+is available only if GDB was configured using '--with-guile'.
 
 * Menu:
 
@@ -3595,8 +4085,8 @@ File: gdb.info,  Node: Guile Introductio
 23.3.1 Guile Introduction
 -------------------------
 
-Guile is an implementation of the Scheme programming language and is
-the GNU project's official extension language.
+Guile is an implementation of the Scheme programming language and is the
+GNU project's official extension language.
 
    Guile support in GDB follows the Python support in GDB reasonably
 closely, so concepts there should carry over.  However, some things are
@@ -3606,7 +4096,7 @@ done differently where it makes sense.
 supported.
 
    Guile scripts used by GDB should be installed in
-`DATA-DIRECTORY/guile', where DATA-DIRECTORY is the data directory as
+'DATA-DIRECTORY/guile', where DATA-DIRECTORY is the data directory as
 determined at GDB startup (*note Data Files::).  This directory, known
 as the "guile directory", is automatically added to the Guile Search
 Path in order to allow the Guile interpreter to locate all scripts
@@ -3620,16 +4110,16 @@ File: gdb.info,  Node: Guile Commands,  
 
 GDB provides two commands for accessing the Guile interpreter:
 
-`guile-repl'
-`gr'
-     The `guile-repl' command can be used to start an interactive Guile
-     prompt or "repl".  To return to GDB, type `,q' or the `EOF'
-     character (e.g., `Ctrl-D' on an empty prompt).  These commands do
+'guile-repl'
+'gr'
+     The 'guile-repl' command can be used to start an interactive Guile
+     prompt or "repl".  To return to GDB, type ',q' or the 'EOF'
+     character (e.g., 'Ctrl-D' on an empty prompt).  These commands do
      not take any arguments.
 
-`guile [SCHEME-EXPRESSION]'
-`gu [SCHEME-EXPRESSION]'
-     The `guile' command can be used to evaluate a Scheme expression.
+'guile [SCHEME-EXPRESSION]'
+'gu [SCHEME-EXPRESSION]'
+     The 'guile' command can be used to evaluate a Scheme expression.
 
      If given an argument, GDB will pass the argument to the Guile
      interpreter for evaluation.
@@ -3637,17 +4127,17 @@ GDB provides two commands for accessing 
           (gdb) guile (display (+ 20 3)) (newline)
           23
 
-     The result of the Scheme expression is displayed using normal
-     Guile rules.
+     The result of the Scheme expression is displayed using normal Guile
+     rules.
 
           (gdb) guile (+ 20 3)
           23
 
-     If you do not provide an argument to `guile', it will act as a
-     multi-line command, like `define'.  In this case, the Guile script
-     is made up of subsequent command lines, given after the `guile'
+     If you do not provide an argument to 'guile', it will act as a
+     multi-line command, like 'define'.  In this case, the Guile script
+     is made up of subsequent command lines, given after the 'guile'
      command.  This command list is terminated using a line containing
-     `end'.  For example:
+     'end'.  For example:
 
           (gdb) guile
           >(display 23)
@@ -3658,17 +4148,16 @@ GDB provides two commands for accessing 
    It is also possible to execute a Guile script from the GDB
 interpreter:
 
-`source `script-name''
-     The script name must end with `.scm' and GDB must be configured to
-     recognize the script language based on filename extension using
-     the `script-extension' setting.  *Note Extending GDB: Extending
-     GDB.
+'source script-name'
+     The script name must end with '.scm' and GDB must be configured to
+     recognize the script language based on filename extension using the
+     'script-extension' setting.  *Note Extending GDB: Extending GDB.
 
-`guile (load "script-name")'
-     This method uses the `load' Guile function.  It takes a string
+'guile (load "script-name")'
+     This method uses the 'load' Guile function.  It takes a string
      argument that is the name of the script to load.  See the Guile
-     documentation for a description of this function.  (*note Loading:
-     (guile)Loading.).
+     documentation for a description of this function.  (*note
+     (guile)Loading::).
 
 
 File: gdb.info,  Node: Guile API,  Next: Guile Auto-loading,  Prev: Guile Commands,  Up: Guile
@@ -3676,12 +4165,11 @@ File: gdb.info,  Node: Guile API,  Next:
 23.3.3 Guile API
 ----------------
 
-You can get quick online help for GDB's Guile API by issuing the
-command `help guile', or by issuing the command `,help' from an
-interactive Guile session.  Furthermore, most Guile procedures provided
-by GDB have doc strings which can be obtained with `,describe
-PROCEDURE-NAME' or `,d PROCEDURE-NAME' from the Guile interactive
-prompt.
+You can get quick online help for GDB's Guile API by issuing the command
+'help guile', or by issuing the command ',help' from an interactive
+Guile session.  Furthermore, most Guile procedures provided by GDB have
+doc strings which can be obtained with ',describe PROCEDURE-NAME' or ',d
+PROCEDURE-NAME' from the Guile interactive prompt.
 
 * Menu:
 
@@ -3717,29 +4205,29 @@ File: gdb.info,  Node: Basic Guile,  Nex
 23.3.3.1 Basic Guile
 ....................
 
-At startup, GDB overrides Guile's `current-output-port' and
-`current-error-port' to print using GDB's output-paging streams.  A
+At startup, GDB overrides Guile's 'current-output-port' and
+'current-error-port' to print using GDB's output-paging streams.  A
 Guile program which outputs to one of these streams may have its output
 interrupted by the user (*note Screen Size::).  In this situation, a
-Guile `signal' exception is thrown with value `SIGINT'.
+Guile 'signal' exception is thrown with value 'SIGINT'.
 
    Guile's history mechanism uses the same naming as GDB's, namely the
 user of dollar-variables (e.g., $1, $2, etc.).  The results of
-evaluations in Guile and in GDB are counted separately, `$1' in Guile
-is not the same value as `$1' in GDB.
+evaluations in Guile and in GDB are counted separately, '$1' in Guile is
+not the same value as '$1' in GDB.
 
-   GDB is not thread-safe.  If your Guile program uses multiple
-threads, you must be careful to only call GDB-specific functions in the
-GDB thread.
+   GDB is not thread-safe.  If your Guile program uses multiple threads,
+you must be careful to only call GDB-specific functions in the GDB
+thread.
 
    Some care must be taken when writing Guile code to run in GDB.  Two
 things are worth noting in particular:
 
-   * GDB installs handlers for `SIGCHLD' and `SIGINT'.  Guile code must
-     not override these, or even change the options using `sigaction'.
+   * GDB installs handlers for 'SIGCHLD' and 'SIGINT'.  Guile code must
+     not override these, or even change the options using 'sigaction'.
      If your program changes the handling of these signals, GDB will
      most likely stop working correctly.  Note that it is unfortunately
-     common for GUI toolkits to install a `SIGCHLD' handler.
+     common for GUI toolkits to install a 'SIGCHLD' handler.
 
    * GDB takes care to mark its internal file descriptors as
      close-on-exec.  However, this cannot be done in a thread-safe way
@@ -3748,11 +4236,11 @@ things are worth noting in particular:
      set and arrange to close unneeded file descriptors before starting
      a child process.
 
-   GDB introduces a new Guile module, named `gdb'.  All methods and
+   GDB introduces a new Guile module, named 'gdb'.  All methods and
 classes added by GDB are placed in this module.  GDB does not
-automatically `import' the `gdb' module, scripts must do this
+automatically 'import' the 'gdb' module, scripts must do this
 themselves.  There are various options for how to import a module, so
-GDB leaves the choice of how the `gdb' module is imported to the user.
+GDB leaves the choice of how the 'gdb' module is imported to the user.
 To simplify interactive use, it is recommended to add one of the
 following to your ~/.gdbinit.
 
@@ -3761,12 +4249,11 @@ following to your ~/.gdbinit.
      guile (use-modules ((gdb) #:renamer (symbol-prefix-proc 'gdb:)))
 
    Which one to choose depends on your preference.  The second one adds
-`gdb:' as a prefix to all module functions and variables.
+'gdb:' as a prefix to all module functions and variables.
 
-   The rest of this manual assumes the `gdb' module has been imported
-without any prefix.  See the Guile documentation for `use-modules' for
-more information (*note Using Guile Modules: (guile)Using Guile
-Modules.).
+   The rest of this manual assumes the 'gdb' module has been imported
+without any prefix.  See the Guile documentation for 'use-modules' for
+more information (*note (guile)Using Guile Modules::).
 
    Example:
 
@@ -3778,24 +4265,23 @@ Modules.).
      int
      (gdb)
 
-   The `(gdb)' module provides these basic Guile functions.
+   The '(gdb)' module provides these basic Guile functions.
 
  -- Scheme Procedure: execute command [#:from-tty boolean] [#:to-string
           boolean]
      Evaluate COMMAND, a string, as a GDB CLI command.  If a GDB
-     exception happens while COMMAND runs, it is translated as
-     described in *note Guile Exception Handling: Guile Exception
-     Handling.
+     exception happens while COMMAND runs, it is translated as described
+     in *note Guile Exception Handling: Guile Exception Handling.
 
      FROM-TTY specifies whether GDB ought to consider this command as
-     having originated from the user invoking it interactively.  It
-     must be a boolean value.  If omitted, it defaults to `#f'.
+     having originated from the user invoking it interactively.  It must
+     be a boolean value.  If omitted, it defaults to '#f'.
 
      By default, any output produced by COMMAND is sent to GDB's
      standard output (and to the log output if logging is turned on).
-     If the TO-STRING parameter is `#t', then output will be collected
-     by `execute' and returned as a string.  The default is `#f', in
-     which case the return value is unspecified.  If TO-STRING is `#t',
+     If the TO-STRING parameter is '#t', then output will be collected
+     by 'execute' and returned as a string.  The default is '#f', in
+     which case the return value is unspecified.  If TO-STRING is '#t',
      the GDB virtual terminal will be temporarily set to unlimited width
      and height, and its pagination will be disabled; *note Screen
      Size::.
@@ -3803,40 +4289,39 @@ Modules.).
  -- Scheme Procedure: history-ref number
      Return a value from GDB's value history (*note Value History::).
      The NUMBER argument indicates which history element to return.  If
-     NUMBER is negative, then GDB will take its absolute value and
-     count backward from the last element (i.e., the most recent
-     element) to find the value to return.  If NUMBER is zero, then GDB
-     will return the most recent element.  If the element specified by
-     NUMBER doesn't exist in the value history, a `gdb:error' exception
-     will be raised.
+     NUMBER is negative, then GDB will take its absolute value and count
+     backward from the last element (i.e., the most recent element) to
+     find the value to return.  If NUMBER is zero, then GDB will return
+     the most recent element.  If the element specified by NUMBER
+     doesn't exist in the value history, a 'gdb:error' exception will be
+     raised.
 
      If no exception is raised, the return value is always an instance
-     of `<gdb:value>' (*note Values From Inferior In Guile::).
+     of '<gdb:value>' (*note Values From Inferior In Guile::).
 
-     _Note:_ GDB's value history is independent of Guile's.  `$1' in
-     GDB's value history contains the result of evaluating an
-     expression from GDB's command line and `$1' from Guile's history
-     contains the result of evaluating an expression from Guile's
-     command line.
+     _Note:_ GDB's value history is independent of Guile's.  '$1' in
+     GDB's value history contains the result of evaluating an expression
+     from GDB's command line and '$1' from Guile's history contains the
+     result of evaluating an expression from Guile's command line.
 
  -- Scheme Procedure: history-append! value
-     Append VALUE, an instance of `<gdb:value>', to GDB's value
-     history.  Return its index in the history.
+     Append VALUE, an instance of '<gdb:value>', to GDB's value history.
+     Return its index in the history.
 
      Putting into history values returned by Guile extensions will allow
      the user convenient access to those values via CLI history
      facilities.
 
  -- Scheme Procedure: parse-and-eval expression
-     Parse EXPRESSION as an expression in the current language,
-     evaluate it, and return the result as a `<gdb:value>'.  The
-     EXPRESSION must be a string.
+     Parse EXPRESSION as an expression in the current language, evaluate
+     it, and return the result as a '<gdb:value>'.  The EXPRESSION must
+     be a string.
 
      This function can be useful when implementing a new command (*note
      Commands In Guile::), as it provides a way to parse the command's
      arguments as an expression.  It is also is useful when computing
      values.  For example, it is the only way to get the value of a
-     convenience variable (*note Convenience Vars::) as a `<gdb:value>'.
+     convenience variable (*note Convenience Vars::) as a '<gdb:value>'.
 
 
 File: gdb.info,  Node: Guile Configuration,  Next: GDB Scheme Data Types,  Prev: Basic Guile,  Up: Guile API
@@ -3860,11 +4345,11 @@ parameters.
 
  -- Scheme Procedure: host-config
      Return a string containing the host configuration.  This is the
-     string passed to `--host' when GDB was configured.
+     string passed to '--host' when GDB was configured.
 
  -- Scheme Procedure: target-config
      Return a string containing the target configuration.  This is the
-     string passed to `--target' when GDB was configured.
+     string passed to '--target' when GDB was configured.
 
 
 File: gdb.info,  Node: GDB Scheme Data Types,  Next: Guile Exception Handling,  Prev: Guile Configuration,  Up: Guile API
@@ -3877,91 +4362,83 @@ are several kinds of GDB object, and eac
 types known to Guile.
 
  -- Scheme Procedure: gdb-object-kind object
-     Return the kind of the GDB object, e.g., `<gdb:breakpoint>', as a
+     Return the kind of the GDB object, e.g., '<gdb:breakpoint>', as a
      symbol.
 
    GDB defines the following object types:
 
-`<gdb:arch>'
+'<gdb:arch>'
      *Note Architectures In Guile::.
 
-`<gdb:block>'
+'<gdb:block>'
      *Note Blocks In Guile::.
 
-`<gdb:block-symbols-iterator>'
+'<gdb:block-symbols-iterator>'
      *Note Blocks In Guile::.
 
-`<gdb:breakpoint>'
+'<gdb:breakpoint>'
      *Note Breakpoints In Guile::.
 
-`<gdb:command>'
+'<gdb:command>'
      *Note Commands In Guile::.
 
-`<gdb:exception>'
+'<gdb:exception>'
      *Note Guile Exception Handling::.
 
-`<gdb:frame>'
+'<gdb:frame>'
      *Note Frames In Guile::.
 
-`<gdb:iterator>'
+'<gdb:iterator>'
      *Note Iterators In Guile::.
 
-`<gdb:lazy-string>'
+'<gdb:lazy-string>'
      *Note Lazy Strings In Guile::.
 
-`<gdb:objfile>'
+'<gdb:objfile>'
      *Note Objfiles In Guile::.
 
-`<gdb:parameter>'
+'<gdb:parameter>'
      *Note Parameters In Guile::.
 
-`<gdb:pretty-printer>'
+'<gdb:pretty-printer>'
      *Note Guile Pretty Printing API::.
 
-`<gdb:pretty-printer-worker>'
+'<gdb:pretty-printer-worker>'
      *Note Guile Pretty Printing API::.
 
-`<gdb:progspace>'
+'<gdb:progspace>'
      *Note Progspaces In Guile::.
 
-`<gdb:symbol>'
+'<gdb:symbol>'
      *Note Symbols In Guile::.
 
-`<gdb:symtab>'
+'<gdb:symtab>'
      *Note Symbol Tables In Guile::.
 
-`<gdb:sal>'
+'<gdb:sal>'
      *Note Symbol Tables In Guile::.
 
-`<gdb:type>'
+'<gdb:type>'
      *Note Types In Guile::.
 
-`<gdb:field>'
+'<gdb:field>'
      *Note Types In Guile::.
 
-`<gdb:value>'
+'<gdb:value>'
      *Note Values From Inferior In Guile::.
 
    The following GDB objects are managed internally so that the Scheme
-function `eq?' may be applied to them.
-
-`<gdb:arch>'
-
-`<gdb:block>'
-
-`<gdb:breakpoint>'
-
-`<gdb:frame>'
-
-`<gdb:objfile>'
-
-`<gdb:progspace>'
-
-`<gdb:symbol>'
+function 'eq?' may be applied to them.
 
-`<gdb:symtab>'
-
-`<gdb:type>'
+'<gdb:arch>'
+'<gdb:block>'
+'<gdb:breakpoint>'
+'<gdb:frame>'
+'<gdb:objfile>'
+'<gdb:progspace>'
+'<gdb:symbol>'
+'<gdb:symtab>'
+'<gdb:type>'
 
 
 File: gdb.info,  Node: Guile Exception Handling,  Next: Values From Inferior In Guile,  Prev: GDB Scheme Data Types,  Up: Guile API
@@ -3969,18 +4446,18 @@ File: gdb.info,  Node: Guile Exception H
 23.3.3.4 Guile Exception Handling
 .................................
 
-When executing the `guile' command, Guile exceptions uncaught within
-the Guile code are translated to calls to the GDB error-reporting
-mechanism.  If the command that called `guile' does not handle the
-error, GDB will terminate it and report the error according to the
-setting of the `guile print-stack' parameter.
+When executing the 'guile' command, Guile exceptions uncaught within the
+Guile code are translated to calls to the GDB error-reporting mechanism.
+If the command that called 'guile' does not handle the error, GDB will
+terminate it and report the error according to the setting of the 'guile
+print-stack' parameter.
 
-   The `guile print-stack' parameter has three settings:
+   The 'guile print-stack' parameter has three settings:
 
-`none'
+'none'
      Nothing is printed.
 
-`message'
+'message'
      An error message is printed containing the Guile exception name,
      the associated value, and the Guile call stack backtrace at the
      point where the exception was raised.  Example:
@@ -3990,7 +4467,7 @@ setting of the `guile print-stack' param
           ERROR: Unbound variable: foo
           Error while executing Scheme code.
 
-`full'
+'full'
      In addition to an error message a full backtrace is printed.
 
           (gdb) set guile print-stack full
@@ -4025,50 +4502,49 @@ converted to Guile exceptions.  The type
 on the error.
 
    Guile procedures provided by GDB can throw the standard Guile
-exceptions like `wrong-type-arg' and `out-of-range'.
+exceptions like 'wrong-type-arg' and 'out-of-range'.
 
-   User interrupt (via `C-c' or by typing `q' at a pagination prompt)
-is translated to a Guile `signal' exception with value `SIGINT'.
+   User interrupt (via 'C-c' or by typing 'q' at a pagination prompt) is
+translated to a Guile 'signal' exception with value 'SIGINT'.
 
    GDB Guile procedures can also throw these exceptions:
 
-`gdb:error'
+'gdb:error'
      This exception is a catch-all for errors generated from within GDB.
 
-`gdb:invalid-object'
+'gdb:invalid-object'
      This exception is thrown when accessing Guile objects that wrap
      underlying GDB objects have become invalid.  For example, a
-     `<gdb:breakpoint>' object becomes invalid if the user deletes it
+     '<gdb:breakpoint>' object becomes invalid if the user deletes it
      from the command line.  The object still exists in Guile, but the
      object it represents is gone.  Further operations on this
      breakpoint will throw this exception.
 
-`gdb:memory-error'
+'gdb:memory-error'
      This exception is thrown when an operation tried to access invalid
      memory in the inferior.
 
-`gdb:pp-type-error'
+'gdb:pp-type-error'
      This exception is thrown when a Guile pretty-printer passes a bad
      object to GDB.
 
    The following exception-related procedures are provided by the
-`(gdb)' module.
+'(gdb)' module.
 
  -- Scheme Procedure: make-exception key args
-     Return a `<gdb:exception>' object given by its KEY and ARGS, which
+     Return a '<gdb:exception>' object given by its KEY and ARGS, which
      are the standard Guile parameters of an exception.  See the Guile
-     documentation for more information (*note Exceptions:
-     (guile)Exceptions.).
+     documentation for more information (*note (guile)Exceptions::).
 
  -- Scheme Procedure: exception? object
-     Return `#t' if OBJECT is a `<gdb:exception>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:exception>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: exception-key exception
-     Return the ARGS field of a `<gdb:exception>' object.
+     Return the ARGS field of a '<gdb:exception>' object.
 
  -- Scheme Procedure: exception-args exception
-     Return the ARGS field of a `<gdb:exception>' object.
+     Return the ARGS field of a '<gdb:exception>' object.
 
 
 File: gdb.info,  Node: Values From Inferior In Guile,  Next: Arithmetic In Guile,  Prev: Guile Exception Handling,  Up: Guile API
@@ -4076,12 +4552,11 @@ File: gdb.info,  Node: Values From Infer
 23.3.3.5 Values From Inferior In Guile
 ......................................
 
-GDB provides values it obtains from the inferior program in an object
-of type `<gdb:value>'.  GDB uses this object for its internal
-bookkeeping of the inferior's values, and for fetching values when
-necessary.
+GDB provides values it obtains from the inferior program in an object of
+type '<gdb:value>'.  GDB uses this object for its internal bookkeeping
+of the inferior's values, and for fetching values when necessary.
 
-   GDB does not memoize `<gdb:value>' objects.  `make-value' always
+   GDB does not memoize '<gdb:value>' objects.  'make-value' always
 returns a fresh object.
 
      (gdb) guile (eq? (make-value 1) (make-value 1))
@@ -4089,155 +4564,155 @@ returns a fresh object.
      (gdb) guile (equal? (make-value 1) (make-value 1))
      $1 = #t
 
-   A `<gdb:value>' that represents a function can be executed via
-inferior function call with `value-call'.  Any arguments provided to
-the call must match the function's prototype, and must be provided in
-the order specified by that prototype.
+   A '<gdb:value>' that represents a function can be executed via
+inferior function call with 'value-call'.  Any arguments provided to the
+call must match the function's prototype, and must be provided in the
+order specified by that prototype.
 
-   For example, `some-val' is a `<gdb:value>' instance representing a
+   For example, 'some-val' is a '<gdb:value>' instance representing a
 function that takes two integers as arguments.  To execute this
 function, call it like so:
 
      (define result (value-call some-val 10 20))
 
-   Any values returned from a function call are `<gdb:value>' objects.
+   Any values returned from a function call are '<gdb:value>' objects.
 
-   Note: Unlike Python scripting in GDB, inferior values that are
-simple scalars cannot be used directly in Scheme expressions that are
-valid for the value's data type.  For example, `(+ (parse-and-eval
-"int_variable") 2)' does not work.  And inferior values that are
-structures or instances of some class cannot be accessed using any
-special syntax, instead `value-field' must be used.
+   Note: Unlike Python scripting in GDB, inferior values that are simple
+scalars cannot be used directly in Scheme expressions that are valid for
+the value's data type.  For example, '(+ (parse-and-eval "int_variable")
+2)' does not work.  And inferior values that are structures or instances
+of some class cannot be accessed using any special syntax, instead
+'value-field' must be used.
 
-   The following value-related procedures are provided by the `(gdb)'
+   The following value-related procedures are provided by the '(gdb)'
 module.
 
  -- Scheme Procedure: value? object
-     Return `#t' if OBJECT is a `<gdb:value>' object.  Otherwise return
-     `#f'.
+     Return '#t' if OBJECT is a '<gdb:value>' object.  Otherwise return
+     '#f'.
 
  -- Scheme Procedure: make-value value [#:type type]
-     Many Scheme values can be converted directly to a `<gdb:value>'
+     Many Scheme values can be converted directly to a '<gdb:value>'
      with this procedure.  If TYPE is specified, the result is a value
      of this type, and if VALUE can't be represented with this type an
      exception is thrown.  Otherwise the type of the result is
      determined from VALUE as described below.
 
-     *Note Architectures In Guile::, for a list of the builtin types
-     for an architecture.
+     *Note Architectures In Guile::, for a list of the builtin types for
+     an architecture.
 
      Here's how Scheme values are converted when TYPE argument to
-     `make-value' is not specified:
+     'make-value' is not specified:
 
-    Scheme boolean
-          A Scheme boolean is converted the boolean type for the
-          current language.
-
-    Scheme integer
-          A Scheme integer is converted to the first of a C `int',
-          `unsigned int', `long', `unsigned long', `long long' or
-          `unsigned long long' type for the current architecture that
+     Scheme boolean
+          A Scheme boolean is converted the boolean type for the current
+          language.
+
+     Scheme integer
+          A Scheme integer is converted to the first of a C 'int',
+          'unsigned int', 'long', 'unsigned long', 'long long' or
+          'unsigned long long' type for the current architecture that
           can represent the value.
 
           If the Scheme integer cannot be represented as a target
-          integer an `out-of-range' exception is thrown.
+          integer an 'out-of-range' exception is thrown.
 
-    Scheme real
-          A Scheme real is converted to the C `double' type for the
+     Scheme real
+          A Scheme real is converted to the C 'double' type for the
           current architecture.
 
-    Scheme string
+     Scheme string
           A Scheme string is converted to a string in the current target
           language using the current target encoding.  Characters that
           cannot be represented in the current target encoding are
           replaced with the corresponding escape sequence.  This is
-          Guile's `SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE' conversion
-          strategy (*note Strings: (guile)Strings.).
+          Guile's 'SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE' conversion
+          strategy (*note (guile)Strings::).
 
           Passing TYPE is not supported in this case, if it is provided
-          a `wrong-type-arg' exception is thrown.
+          a 'wrong-type-arg' exception is thrown.
 
-    `<gdb:lazy-string>'
-          If VALUE is a `<gdb:lazy-string>' object (*note Lazy Strings
-          In Guile::), then the `lazy-string->value' procedure is
+     '<gdb:lazy-string>'
+          If VALUE is a '<gdb:lazy-string>' object (*note Lazy Strings
+          In Guile::), then the 'lazy-string->value' procedure is
           called, and its result is used.
 
           Passing TYPE is not supported in this case, if it is provided
-          a `wrong-type-arg' exception is thrown.
+          a 'wrong-type-arg' exception is thrown.
 
-    Scheme bytevector
+     Scheme bytevector
           If VALUE is a Scheme bytevector and TYPE is provided, VALUE
           must be the same size, in bytes, of values of type TYPE, and
-          the result is essentially created by using `memcpy'.
+          the result is essentially created by using 'memcpy'.
 
           If VALUE is a Scheme bytevector and TYPE is not provided, the
-          result is an array of type `uint8' of the same length.
+          result is an array of type 'uint8' of the same length.
 
  -- Scheme Procedure: value-optimized-out? value
-     Return `#t' if the compiler optimized out VALUE, thus it is not
-     available for fetching from the inferior.  Otherwise return `#f'.
+     Return '#t' if the compiler optimized out VALUE, thus it is not
+     available for fetching from the inferior.  Otherwise return '#f'.
 
  -- Scheme Procedure: value-address value
-     If VALUE is addressable, returns a `<gdb:value>' object
-     representing the address.  Otherwise, `#f' is returned.
+     If VALUE is addressable, returns a '<gdb:value>' object
+     representing the address.  Otherwise, '#f' is returned.
 
  -- Scheme Procedure: value-type value
-     Return the type of VALUE as a `<gdb:type>' object (*note Types In
+     Return the type of VALUE as a '<gdb:type>' object (*note Types In
      Guile::).
 
  -- Scheme Procedure: value-dynamic-type value
      Return the dynamic type of VALUE.  This uses C++ run-time type
      information (RTTI) to determine the dynamic type of the value.  If
      the value is of class type, it will return the class in which the
-     value is embedded, if any.  If the value is of pointer or
-     reference to a class type, it will compute the dynamic type of the
-     referenced object, and return a pointer or reference to that type,
+     value is embedded, if any.  If the value is of pointer or reference
+     to a class type, it will compute the dynamic type of the referenced
+     object, and return a pointer or reference to that type,
      respectively.  In all other cases, it will return the value's
      static type.
 
      Note that this feature will only work when debugging a C++ program
      that includes RTTI for the object in question.  Otherwise, it will
-     just return the static type of the value as in `ptype foo'.  *Note
+     just return the static type of the value as in 'ptype foo'.  *Note
      ptype: Symbols.
 
  -- Scheme Procedure: value-cast value type
-     Return a new instance of `<gdb:value>' that is the result of
+     Return a new instance of '<gdb:value>' that is the result of
      casting VALUE to the type described by TYPE, which must be a
-     `<gdb:type>' object.  If the cast cannot be performed for some
+     '<gdb:type>' object.  If the cast cannot be performed for some
      reason, this method throws an exception.
 
  -- Scheme Procedure: value-dynamic-cast value type
-     Like `value-cast', but works as if the C++ `dynamic_cast' operator
+     Like 'value-cast', but works as if the C++ 'dynamic_cast' operator
      were used.  Consult a C++ reference for details.
 
  -- Scheme Procedure: value-reinterpret-cast value type
-     Like `value-cast', but works as if the C++ `reinterpret_cast'
+     Like 'value-cast', but works as if the C++ 'reinterpret_cast'
      operator were used.  Consult a C++ reference for details.
 
  -- Scheme Procedure: value-dereference value
-     For pointer data types, this method returns a new `<gdb:value>'
+     For pointer data types, this method returns a new '<gdb:value>'
      object whose contents is the object pointed to by VALUE.  For
-     example, if `foo' is a C pointer to an `int', declared in your C
+     example, if 'foo' is a C pointer to an 'int', declared in your C
      program as
 
           int *foo;
 
-     then you can use the corresponding `<gdb:value>' to access what
-     `foo' points to like this:
+     then you can use the corresponding '<gdb:value>' to access what
+     'foo' points to like this:
 
           (define bar (value-dereference foo))
 
-     The result `bar' will be a `<gdb:value>' object holding the value
-     pointed to by `foo'.
+     The result 'bar' will be a '<gdb:value>' object holding the value
+     pointed to by 'foo'.
 
-     A similar function `value-referenced-value' exists which also
-     returns `<gdb:value>' objects corresonding to the values pointed to
+     A similar function 'value-referenced-value' exists which also
+     returns '<gdb:value>' objects corresonding to the values pointed to
      by pointer values (and additionally, values referenced by reference
-     values).  However, the behavior of `value-dereference' differs
-     from `value-referenced-value' by the fact that the behavior of
-     `value-dereference' is identical to applying the C unary operator
-     `*' on a given value.  For example, consider a reference to a
-     pointer `ptrref', declared in your C++ program as
+     values).  However, the behavior of 'value-dereference' differs from
+     'value-referenced-value' by the fact that the behavior of
+     'value-dereference' is identical to applying the C unary operator
+     '*' on a given value.  For example, consider a reference to a
+     pointer 'ptrref', declared in your C++ program as
 
           typedef int *intptr;
           ...
@@ -4245,80 +4720,80 @@ module.
           intptr ptr = &val;
           intptr &ptrref = ptr;
 
-     Though `ptrref' is a reference value, one can apply the method
-     `value-dereference' to the `<gdb:value>' object corresponding to
-     it and obtain a `<gdb:value>' which is identical to that
-     corresponding to `val'.  However, if you apply the method
-     `value-referenced-value', the result would be a `<gdb:value>'
-     object identical to that corresponding to `ptr'.
+     Though 'ptrref' is a reference value, one can apply the method
+     'value-dereference' to the '<gdb:value>' object corresponding to it
+     and obtain a '<gdb:value>' which is identical to that corresponding
+     to 'val'.  However, if you apply the method
+     'value-referenced-value', the result would be a '<gdb:value>'
+     object identical to that corresponding to 'ptr'.
 
           (define scm-ptrref (parse-and-eval "ptrref"))
           (define scm-val (value-dereference scm-ptrref))
           (define scm-ptr (value-referenced-value scm-ptrref))
 
-     The `<gdb:value>' object `scm-val' is identical to that
-     corresponding to `val', and `scm-ptr' is identical to that
-     corresponding to `ptr'.  In general, `value-dereference' can be
-     applied whenever the C unary operator `*' can be applied to the
+     The '<gdb:value>' object 'scm-val' is identical to that
+     corresponding to 'val', and 'scm-ptr' is identical to that
+     corresponding to 'ptr'.  In general, 'value-dereference' can be
+     applied whenever the C unary operator '*' can be applied to the
      corresponding C value.  For those cases where applying both
-     `value-dereference' and `value-referenced-value' is allowed, the
+     'value-dereference' and 'value-referenced-value' is allowed, the
      results obtained need not be identical (as we have seen in the
      above example).  The results are however identical when applied on
-     `<gdb:value>' objects corresponding to pointers (`<gdb:value>'
-     objects with type code `TYPE_CODE_PTR') in a C/C++ program.
+     '<gdb:value>' objects corresponding to pointers ('<gdb:value>'
+     objects with type code 'TYPE_CODE_PTR') in a C/C++ program.
 
  -- Scheme Procedure: value-referenced-value value
      For pointer or reference data types, this method returns a new
-     `<gdb:value>' object corresponding to the value referenced by the
+     '<gdb:value>' object corresponding to the value referenced by the
      pointer/reference value.  For pointer data types,
-     `value-dereference' and `value-referenced-value' produce identical
+     'value-dereference' and 'value-referenced-value' produce identical
      results.  The difference between these methods is that
-     `value-dereference' cannot get the values referenced by reference
-     values.  For example, consider a reference to an `int', declared
-     in your C++ program as
+     'value-dereference' cannot get the values referenced by reference
+     values.  For example, consider a reference to an 'int', declared in
+     your C++ program as
 
           int val = 10;
           int &ref = val;
 
-     then applying `value-dereference' to the `<gdb:value>' object
-     corresponding to `ref' will result in an error, while applying
-     `value-referenced-value' will result in a `<gdb:value>' object
-     identical to that corresponding to `val'.
+     then applying 'value-dereference' to the '<gdb:value>' object
+     corresponding to 'ref' will result in an error, while applying
+     'value-referenced-value' will result in a '<gdb:value>' object
+     identical to that corresponding to 'val'.
 
           (define scm-ref (parse-and-eval "ref"))
           (define err-ref (value-dereference scm-ref))      ;; error
           (define scm-val (value-referenced-value scm-ref)) ;; ok
 
-     The `<gdb:value>' object `scm-val' is identical to that
-     corresponding to `val'.
+     The '<gdb:value>' object 'scm-val' is identical to that
+     corresponding to 'val'.
 
  -- Scheme Procedure: value-field value field-name
-     Return field FIELD-NAME from `<gdb:value>' object VALUE.
+     Return field FIELD-NAME from '<gdb:value>' object VALUE.
 
  -- Scheme Procedure: value-subscript value index
-     Return the value of array VALUE at index INDEX.  The VALUE
-     argument must be a subscriptable `<gdb:value>' object.
+     Return the value of array VALUE at index INDEX.  The VALUE argument
+     must be a subscriptable '<gdb:value>' object.
 
  -- Scheme Procedure: value-call value arg-list
-     Perform an inferior function call, taking VALUE as a pointer to
-     the function to call.  Each element of list ARG-LIST must be a
+     Perform an inferior function call, taking VALUE as a pointer to the
+     function to call.  Each element of list ARG-LIST must be a
      <gdb:value> object or an object that can be converted to a value.
      The result is the value returned by the function.
 
  -- Scheme Procedure: value->bool value
-     Return the Scheme boolean representing `<gdb:value>' VALUE.  The
+     Return the Scheme boolean representing '<gdb:value>' VALUE.  The
      value must be "integer like".  Pointers are ok.
 
  -- Scheme Procedure: value->integer
-     Return the Scheme integer representing `<gdb:value>' VALUE.  The
+     Return the Scheme integer representing '<gdb:value>' VALUE.  The
      value must be "integer like".  Pointers are ok.
 
  -- Scheme Procedure: value->real
-     Return the Scheme real number representing `<gdb:value>' VALUE.
+     Return the Scheme real number representing '<gdb:value>' VALUE.
      The value must be a number.
 
  -- Scheme Procedure: value->bytevector
-     Return a Scheme bytevector with the raw contents of `<gdb:value>'
+     Return a Scheme bytevector with the raw contents of '<gdb:value>'
      VALUE.  No transformation, endian or otherwise, is performed.
 
  -- Scheme Procedure: value->string value [#:encoding encoding]
@@ -4335,42 +4810,42 @@ module.
      will be converted.
 
      For example, in C-like languages, a value is a string if it is a
-     pointer to or an array of characters or ints of type `wchar_t',
-     `char16_t', or `char32_t'.
+     pointer to or an array of characters or ints of type 'wchar_t',
+     'char16_t', or 'char32_t'.
 
      If the optional ENCODING argument is given, it must be a string
-     naming the encoding of the string in the `<gdb:value>', such as
-     `"ascii"', `"iso-8859-6"' or `"utf-8"'.  It accepts the same
+     naming the encoding of the string in the '<gdb:value>', such as
+     '"ascii"', '"iso-8859-6"' or '"utf-8"'.  It accepts the same
      encodings as the corresponding argument to Guile's
-     `scm_from_stringn' function, and the Guile codec machinery will be
+     'scm_from_stringn' function, and the Guile codec machinery will be
      used to convert the string.  If ENCODING is not given, or if
-     ENCODING is the empty string, then either the `target-charset'
+     ENCODING is the empty string, then either the 'target-charset'
      (*note Character Sets::) will be used, or a language-specific
      encoding will be used, if the current language is able to supply
      one.
 
-     The optional ERRORS argument is one of `#f', `error' or
-     `substitute'.  `error' and `substitute' must be symbols.  If
-     ERRORS is not specified, or if its value is `#f', then the default
+     The optional ERRORS argument is one of '#f', 'error' or
+     'substitute'.  'error' and 'substitute' must be symbols.  If ERRORS
+     is not specified, or if its value is '#f', then the default
      conversion strategy is used, which is set with the Scheme function
-     `set-port-conversion-strategy!'.  If the value is `'error' then an
-     exception is thrown if there is any conversion error.  If the
-     value is `'substitute' then any conversion error is replaced with
-     question marks.  *Note Strings: (guile)Strings.
+     'set-port-conversion-strategy!'.  If the value is ''error' then an
+     exception is thrown if there is any conversion error.  If the value
+     is ''substitute' then any conversion error is replaced with
+     question marks.  *Note (guile)Strings::.
 
      If the optional LENGTH argument is given, the string will be
      fetched and converted to the given length.  The length must be a
-     Scheme integer and not a `<gdb:value>' integer.
+     Scheme integer and not a '<gdb:value>' integer.
 
  -- Scheme Procedure: value->lazy-string value [#:encoding encoding]
           [#:length length]
-     If this `<gdb:value>' represents a string, then this method
-     converts VALUE to a `<gdb:lazy-string' (*note Lazy Strings In
+     If this '<gdb:value>' represents a string, then this method
+     converts VALUE to a '<gdb:lazy-string' (*note Lazy Strings In
      Guile::).  Otherwise, this method will throw an exception.
 
      If the optional ENCODING argument is given, it must be a string
-     naming the encoding of the `<gdb:lazy-string'.  Some examples are:
-     `"ascii"', `"iso-8859-6"' or `"utf-8"'.  If the ENCODING argument
+     naming the encoding of the '<gdb:lazy-string'.  Some examples are:
+     '"ascii"', '"iso-8859-6"' or '"utf-8"'.  If the ENCODING argument
      is an encoding that GDB does not recognize, GDB will raise an
      error.
 
@@ -4385,27 +4860,27 @@ module.
      fetched and encoded to the length of characters specified.  If the
      LENGTH argument is not provided, the string will be fetched and
      encoded until a null of appropriate width is found.  The length
-     must be a Scheme integer and not a `<gdb:value>' integer.
+     must be a Scheme integer and not a '<gdb:value>' integer.
 
  -- Scheme Procedure: value-lazy? value
-     Return `#t' if VALUE has not yet been fetched from the inferior.
-     Otherwise return `#f'.  GDB does not fetch values until necessary,
+     Return '#t' if VALUE has not yet been fetched from the inferior.
+     Otherwise return '#f'.  GDB does not fetch values until necessary,
      for efficiency.  For example:
 
           (define myval (parse-and-eval "somevar"))
 
-     The value of `somevar' is not fetched at this time.  It will be
-     fetched when the value is needed, or when the `fetch-lazy'
+     The value of 'somevar' is not fetched at this time.  It will be
+     fetched when the value is needed, or when the 'fetch-lazy'
      procedure is invoked.
 
  -- Scheme Procedure: make-lazy-value type address
-     Return a `<gdb:value>' that will be lazily fetched from the
-     target.  The object of type `<gdb:type>' whose value to fetch is
-     specified by its TYPE and its target memory ADDRESS, which is a
-     Scheme integer.
+     Return a '<gdb:value>' that will be lazily fetched from the target.
+     The object of type '<gdb:type>' whose value to fetch is specified
+     by its TYPE and its target memory ADDRESS, which is a Scheme
+     integer.
 
  -- Scheme Procedure: value-fetch-lazy! value
-     If VALUE is a lazy value (`(value-lazy? value)' is `#t'), then the
+     If VALUE is a lazy value ('(value-lazy? value)' is '#t'), then the
      value is fetched from the inferior.  Any errors that occur in the
      process will produce a Guile exception.
 
@@ -4414,7 +4889,7 @@ module.
      The result of this function is unspecified.
 
  -- Scheme Procedure: value-print value
-     Return the string representation (print form) of `<gdb:value>'
+     Return the string representation (print form) of '<gdb:value>'
      VALUE.
 
 
@@ -4423,8 +4898,8 @@ File: gdb.info,  Node: Arithmetic In Gui
 23.3.3.6 Arithmetic In Guile
 ............................
 
-The `(gdb)' module provides several functions for performing arithmetic
-on `<gdb:value>' objects.  The arithmetic is performed as if it were
+The '(gdb)' module provides several functions for performing arithmetic
+on '<gdb:value>' objects.  The arithmetic is performed as if it were
 done by the target, and therefore has target semantics which are not
 necessarily those of Scheme.  For example operations work with a fixed
 precision, not the arbitrary precision of Scheme.
@@ -4480,7 +4955,7 @@ will convert appropriate Scheme values t
 
  -- Scheme Procedure: value>=? a b
 
-   Scheme does not provide a `not-equal' function, and thus Guile
+   Scheme does not provide a 'not-equal' function, and thus Guile
 support in GDB does not either.
 
 
@@ -4489,54 +4964,54 @@ File: gdb.info,  Node: Types In Guile,  
 23.3.3.7 Types In Guile
 .......................
 
-GDB represents types from the inferior in objects of type `<gdb:type>'.
+GDB represents types from the inferior in objects of type '<gdb:type>'.
 
-   The following type-related procedures are provided by the `(gdb)'
+   The following type-related procedures are provided by the '(gdb)'
 module.
 
  -- Scheme Procedure: type? object
-     Return `#t' if OBJECT is an object of type `<gdb:type>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:type>'.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: lookup-type name [#:block block]
      This function looks up a type by its NAME, which must be a string.
 
-     If BLOCK is given, it is an object of type `<gdb:block>', and NAME
+     If BLOCK is given, it is an object of type '<gdb:block>', and NAME
      is looked up in that scope.  Otherwise, it is searched for
      globally.
 
-     Ordinarily, this function will return an instance of `<gdb:type>'.
+     Ordinarily, this function will return an instance of '<gdb:type>'.
      If the named type cannot be found, it will throw an exception.
 
  -- Scheme Procedure: type-code type
      Return the type code of TYPE.  The type code will be one of the
-     `TYPE_CODE_' constants defined below.
+     'TYPE_CODE_' constants defined below.
 
  -- Scheme Procedure: type-tag type
      Return the tag name of TYPE.  The tag name is the name after
-     `struct', `union', or `enum' in C and C++; not all languages have
-     this concept.  If this type has no tag name, then `#f' is returned.
+     'struct', 'union', or 'enum' in C and C++; not all languages have
+     this concept.  If this type has no tag name, then '#f' is returned.
 
  -- Scheme Procedure: type-name type
-     Return the name of TYPE.  If this type has no name, then `#f' is
+     Return the name of TYPE.  If this type has no name, then '#f' is
      returned.
 
  -- Scheme Procedure: type-print-name type
      Return the print name of TYPE.  This returns something even for
-     anonymous types.  For example, for an anonymous C struct `"struct
+     anonymous types.  For example, for an anonymous C struct '"struct
      {...}"' is returned.
 
  -- Scheme Procedure: type-sizeof type
-     Return the size of this type, in target `char' units.  Usually, a
-     target's `char' type will be an 8-bit byte.  However, on some
+     Return the size of this type, in target 'char' units.  Usually, a
+     target's 'char' type will be an 8-bit byte.  However, on some
      unusual platforms, this type may have a different size.
 
  -- Scheme Procedure: type-strip-typedefs type
-     Return a new `<gdb:type>' that represents the real type of TYPE,
+     Return a new '<gdb:type>' that represents the real type of TYPE,
      after removing all layers of typedefs.
 
  -- Scheme Procedure: type-array type n1 [n2]
-     Return a new `<gdb:type>' object which represents an array of this
+     Return a new '<gdb:type>' object which represents an array of this
      type.  If one argument is given, it is the inclusive upper bound of
      the array; in this case the lower bound is zero.  If two arguments
      are given, the first argument is the lower bound of the array, and
@@ -4544,20 +5019,20 @@ module.
      length must not be negative, but the bounds can be.
 
  -- Scheme Procedure: type-vector type n1 [n2]
-     Return a new `<gdb:type>' object which represents a vector of this
+     Return a new '<gdb:type>' object which represents a vector of this
      type.  If one argument is given, it is the inclusive upper bound of
-     the vector; in this case the lower bound is zero.  If two
-     arguments are given, the first argument is the lower bound of the
-     vector, and the second argument is the upper bound of the vector.
-     A vector's length must not be negative, but the bounds can be.
+     the vector; in this case the lower bound is zero.  If two arguments
+     are given, the first argument is the lower bound of the vector, and
+     the second argument is the upper bound of the vector.  A vector's
+     length must not be negative, but the bounds can be.
 
-     The difference between an `array' and a `vector' is that arrays
+     The difference between an 'array' and a 'vector' is that arrays
      behave like in C: when used in expressions they decay to a pointer
      to the first element whereas vectors are treated as first class
      values.
 
  -- Scheme Procedure: type-pointer type
-     Return a new `<gdb:type>' object which represents a pointer to
+     Return a new '<gdb:type>' object which represents a pointer to
      TYPE.
 
  -- Scheme Procedure: type-range type
@@ -4565,42 +5040,42 @@ module.
      TYPE.  If TYPE does not have a range, an exception is thrown.
 
  -- Scheme Procedure: type-reference type
-     Return a new `<gdb:type>' object which represents a reference to
+     Return a new '<gdb:type>' object which represents a reference to
      TYPE.
 
  -- Scheme Procedure: type-target type
-     Return a new `<gdb:type>' object which represents the target type
+     Return a new '<gdb:type>' object which represents the target type
      of TYPE.
 
      For a pointer type, the target type is the type of the pointed-to
-     object.  For an array type (meaning C-like arrays), the target
-     type is the type of the elements of the array.  For a function or
-     method type, the target type is the type of the return value.  For
-     a complex type, the target type is the type of the elements.  For
-     a typedef, the target type is the aliased type.
+     object.  For an array type (meaning C-like arrays), the target type
+     is the type of the elements of the array.  For a function or method
+     type, the target type is the type of the return value.  For a
+     complex type, the target type is the type of the elements.  For a
+     typedef, the target type is the aliased type.
 
      If the type does not have a target, this method will throw an
      exception.
 
  -- Scheme Procedure: type-const type
-     Return a new `<gdb:type>' object which represents a
-     `const'-qualified variant of TYPE.
+     Return a new '<gdb:type>' object which represents a
+     'const'-qualified variant of TYPE.
 
  -- Scheme Procedure: type-volatile type
-     Return a new `<gdb:type>' object which represents a
-     `volatile'-qualified variant of TYPE.
+     Return a new '<gdb:type>' object which represents a
+     'volatile'-qualified variant of TYPE.
 
  -- Scheme Procedure: type-unqualified type
-     Return a new `<gdb:type>' object which represents an unqualified
-     variant of TYPE.  That is, the result is neither `const' nor
-     `volatile'.
+     Return a new '<gdb:type>' object which represents an unqualified
+     variant of TYPE.  That is, the result is neither 'const' nor
+     'volatile'.
 
  -- Scheme Procedure: type-num-fields
-     Return the number of fields of `<gdb:type>' TYPE.
+     Return the number of fields of '<gdb:type>' TYPE.
 
  -- Scheme Procedure: type-fields type
      Return the fields of TYPE as a list.  For structure and union
-     types, `fields' has the usual meaning.  Range types have two
+     types, 'fields' has the usual meaning.  Range types have two
      fields, the minimum and maximum values.  Enum types have one field
      per enum constant.  Function and method types have one field per
      parameter.  The base types of C++ classes are also represented as
@@ -4614,145 +5089,144 @@ module.
 
  -- Scheme Procedure: type-field type field-name
      Return field named FIELD-NAME in TYPE.  The result is an object of
-     type `<gdb:field>'.  *Note Fields of a type in Guile::.  If the
-     type does not have fields, or FIELD-NAME is not a field of TYPE,
-     an exception is thrown.
+     type '<gdb:field>'.  *Note Fields of a type in Guile::.  If the
+     type does not have fields, or FIELD-NAME is not a field of TYPE, an
+     exception is thrown.
 
-     For example, if `some-type' is a `<gdb:type>' instance holding a
-     structure type, you can access its `foo' field with:
+     For example, if 'some-type' is a '<gdb:type>' instance holding a
+     structure type, you can access its 'foo' field with:
 
           (define bar (type-field some-type "foo"))
 
-     `bar' will be a `<gdb:field>' object.
+     'bar' will be a '<gdb:field>' object.
 
  -- Scheme Procedure: type-has-field? type name
-     Return `#t' if `<gdb:type>' TYPE has field named NAME.  Otherwise
-     return `#f'.
+     Return '#t' if '<gdb:type>' TYPE has field named NAME.  Otherwise
+     return '#f'.
 
    Each type has a code, which indicates what category this type falls
 into.  The available type categories are represented by constants
-defined in the `(gdb)' module:
+defined in the '(gdb)' module:
 
-`TYPE_CODE_PTR'
+'TYPE_CODE_PTR'
      The type is a pointer.
 
-`TYPE_CODE_ARRAY'
+'TYPE_CODE_ARRAY'
      The type is an array.
 
-`TYPE_CODE_STRUCT'
+'TYPE_CODE_STRUCT'
      The type is a structure.
 
-`TYPE_CODE_UNION'
+'TYPE_CODE_UNION'
      The type is a union.
 
-`TYPE_CODE_ENUM'
+'TYPE_CODE_ENUM'
      The type is an enum.
 
-`TYPE_CODE_FLAGS'
+'TYPE_CODE_FLAGS'
      A bit flags type, used for things such as status registers.
 
-`TYPE_CODE_FUNC'
+'TYPE_CODE_FUNC'
      The type is a function.
 
-`TYPE_CODE_INT'
+'TYPE_CODE_INT'
      The type is an integer type.
 
-`TYPE_CODE_FLT'
+'TYPE_CODE_FLT'
      A floating point type.
 
-`TYPE_CODE_VOID'
-     The special type `void'.
+'TYPE_CODE_VOID'
+     The special type 'void'.
 
-`TYPE_CODE_SET'
+'TYPE_CODE_SET'
      A Pascal set type.
 
-`TYPE_CODE_RANGE'
+'TYPE_CODE_RANGE'
      A range type, that is, an integer type with bounds.
 
-`TYPE_CODE_STRING'
+'TYPE_CODE_STRING'
      A string type.  Note that this is only used for certain languages
      with language-defined string types; C strings are not represented
      this way.
 
-`TYPE_CODE_BITSTRING'
+'TYPE_CODE_BITSTRING'
      A string of bits.  It is deprecated.
 
-`TYPE_CODE_ERROR'
+'TYPE_CODE_ERROR'
      An unknown or erroneous type.
 
-`TYPE_CODE_METHOD'
-     A method type, as found in C++ or Java.
+'TYPE_CODE_METHOD'
+     A method type, as found in C++.
 
-`TYPE_CODE_METHODPTR'
+'TYPE_CODE_METHODPTR'
      A pointer-to-member-function.
 
-`TYPE_CODE_MEMBERPTR'
+'TYPE_CODE_MEMBERPTR'
      A pointer-to-member.
 
-`TYPE_CODE_REF'
+'TYPE_CODE_REF'
      A reference type.
 
-`TYPE_CODE_CHAR'
+'TYPE_CODE_CHAR'
      A character type.
 
-`TYPE_CODE_BOOL'
+'TYPE_CODE_BOOL'
      A boolean type.
 
-`TYPE_CODE_COMPLEX'
+'TYPE_CODE_COMPLEX'
      A complex float type.
 
-`TYPE_CODE_TYPEDEF'
+'TYPE_CODE_TYPEDEF'
      A typedef to some other type.
 
-`TYPE_CODE_NAMESPACE'
+'TYPE_CODE_NAMESPACE'
      A C++ namespace.
 
-`TYPE_CODE_DECFLOAT'
+'TYPE_CODE_DECFLOAT'
      A decimal floating point type.
 
-`TYPE_CODE_INTERNAL_FUNCTION'
+'TYPE_CODE_INTERNAL_FUNCTION'
      A function internal to GDB.  This is the type used to represent
      convenience functions (*note Convenience Funs::).
 
-   Further support for types is provided in the `(gdb types)' Guile
+   Further support for types is provided in the '(gdb types)' Guile
 module (*note Guile Types Module::).
 
-   Each field is represented as an object of type `<gdb:field>'.
+   Each field is represented as an object of type '<gdb:field>'.
 
-   The following field-related procedures are provided by the `(gdb)'
+   The following field-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: field? object
-     Return `#t' if OBJECT is an object of type `<gdb:field>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:field>'.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: field-name field
-     Return the name of the field, or `#f' for anonymous fields.
+     Return the name of the field, or '#f' for anonymous fields.
 
  -- Scheme Procedure: field-type field
      Return the type of the field.  This is usually an instance of
-     `<gdb:type>', but it can be `#f' in some situations.
+     '<gdb:type>', but it can be '#f' in some situations.
 
  -- Scheme Procedure: field-enumval field
-     Return the enum value represented by `<gdb:field>' FIELD.
+     Return the enum value represented by '<gdb:field>' FIELD.
 
  -- Scheme Procedure: field-bitpos field
-     Return the bit position of `<gdb:field>' FIELD.  This attribute is
-     not available for `static' fields (as in C++ or Java).
+     Return the bit position of '<gdb:field>' FIELD.  This attribute is
+     not available for 'static' fields (as in C++).
 
  -- Scheme Procedure: field-bitsize field
      If the field is packed, or is a bitfield, return the size of
-     `<gdb:field>' FIELD in bits.  Otherwise, zero is returned; in
-     which case the field's size is given by its type.
+     '<gdb:field>' FIELD in bits.  Otherwise, zero is returned; in which
+     case the field's size is given by its type.
 
  -- Scheme Procedure: field-artificial? field
-     Return `#t' if the field is artificial, usually meaning that it
-     was provided by the compiler and not the user.  Otherwise return
-     `#f'.
+     Return '#t' if the field is artificial, usually meaning that it was
+     provided by the compiler and not the user.  Otherwise return '#f'.
 
  -- Scheme Procedure: field-base-class? field
-     Return `#t' if the field represents a base class of a C++
-     structure.  Otherwise return `#f'.
+     Return '#t' if the field represents a base class of a C++
+     structure.  Otherwise return '#f'.
 
 
 File: gdb.info,  Node: Guile Pretty Printing API,  Next: Selecting Guile Pretty-Printers,  Prev: Types In Guile,  Up: Guile API
@@ -4764,30 +5238,30 @@ An example output is provided (*note Pre
 
    A pretty-printer is represented by an object of type
 <gdb:pretty-printer>.  Pretty-printer objects are created with
-`make-pretty-printer'.
+'make-pretty-printer'.
 
    The following pretty-printer-related procedures are provided by the
-`(gdb)' module:
+'(gdb)' module:
 
  -- Scheme Procedure: make-pretty-printer name lookup-function
-     Return a `<gdb:pretty-printer>' object named NAME.
+     Return a '<gdb:pretty-printer>' object named NAME.
 
      LOOKUP-FUNCTION is a function of one parameter: the value to be
      printed.  If the value is handled by this pretty-printer, then
      LOOKUP-FUNCTION returns an object of type
      <gdb:pretty-printer-worker> to perform the actual pretty-printing.
-     Otherwise LOOKUP-FUNCTION returns `#f'.
+     Otherwise LOOKUP-FUNCTION returns '#f'.
 
  -- Scheme Procedure: pretty-printer? object
-     Return `#t' if OBJECT is a `<gdb:pretty-printer>' object.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is a '<gdb:pretty-printer>' object.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: pretty-printer-enabled? pretty-printer
-     Return `#t' if PRETTY-PRINTER is enabled.  Otherwise return `#f'.
+     Return '#t' if PRETTY-PRINTER is enabled.  Otherwise return '#f'.
 
  -- Scheme Procedure: set-pretty-printer-enabled! pretty-printer flag
-     Set the enabled flag of PRETTY-PRINTER to FLAG.  The value
-     returned is unspecified.
+     Set the enabled flag of PRETTY-PRINTER to FLAG.  The value returned
+     is unspecified.
 
  -- Scheme Procedure: pretty-printers
      Return the list of global pretty-printers.
@@ -4798,92 +5272,92 @@ An example output is provided (*note Pre
 
  -- Scheme Procedure: make-pretty-printer-worker display-hint to-string
           children
-     Return an object of type `<gdb:pretty-printer-worker>'.
+     Return an object of type '<gdb:pretty-printer-worker>'.
 
      This function takes three parameters:
 
-    `display-hint'
-          DISPLAY-HINT provides a hint to GDB or GDB front end via MI
-          to change the formatting of the value being printed.  The
-          value must be a string or `#f' (meaning there is no hint).
-          Several values for DISPLAY-HINT are predefined by GDB:
+     'display-hint'
+          DISPLAY-HINT provides a hint to GDB or GDB front end via MI to
+          change the formatting of the value being printed.  The value
+          must be a string or '#f' (meaning there is no hint).  Several
+          values for DISPLAY-HINT are predefined by GDB:
 
-         `array'
+          'array'
                Indicate that the object being printed is "array-like".
-               The CLI uses this to respect parameters such as `set
-               print elements' and `set print array'.
+               The CLI uses this to respect parameters such as 'set
+               print elements' and 'set print array'.
 
-         `map'
-               Indicate that the object being printed is "map-like",
-               and that the children of this value can be assumed to
+          'map'
+               Indicate that the object being printed is "map-like", and
+               that the children of this value can be assumed to
                alternate between keys and values.
 
-         `string'
+          'string'
                Indicate that the object being printed is "string-like".
-               If the printer's `to-string' function returns a Guile
+               If the printer's 'to-string' function returns a Guile
                string of some kind, then GDB will call its internal
                language-specific string-printing function to format the
                string.  For the CLI this means adding quotation marks,
-               possibly escaping some characters, respecting `set print
+               possibly escaping some characters, respecting 'set print
                elements', and the like.
 
-    `to-string'
+     'to-string'
           TO-STRING is either a function of one parameter, the
-          `<gdb:pretty-printer-worker>' object, or `#f'.
+          '<gdb:pretty-printer-worker>' object, or '#f'.
 
-          When printing from the CLI, if the `to-string' method exists,
+          When printing from the CLI, if the 'to-string' method exists,
           then GDB will prepend its result to the values returned by
-          `children'.  Exactly how this formatting is done is dependent
+          'children'.  Exactly how this formatting is done is dependent
           on the display hint, and may change as more hints are added.
           Also, depending on the print settings (*note Print
-          Settings::), the CLI may print just the result of `to-string'
-          in a stack trace, omitting the result of `children'.
+          Settings::), the CLI may print just the result of 'to-string'
+          in a stack trace, omitting the result of 'children'.
 
           If this method returns a string, it is printed verbatim.
 
           Otherwise, if this method returns an instance of
-          `<gdb:value>', then GDB prints this value.  This may result
-          in a call to another pretty-printer.
+          '<gdb:value>', then GDB prints this value.  This may result in
+          a call to another pretty-printer.
 
           If instead the method returns a Guile value which is
-          convertible to a `<gdb:value>', then GDB performs the
+          convertible to a '<gdb:value>', then GDB performs the
           conversion and prints the resulting value.  Again, this may
           result in a call to another pretty-printer.  Guile scalars
           (integers, floats, and booleans) and strings are convertible
-          to `<gdb:value>'; other types are not.
+          to '<gdb:value>'; other types are not.
 
-          Finally, if this method returns `#f' then no further
+          Finally, if this method returns '#f' then no further
           operations are peformed in this method and nothing is printed.
 
           If the result is not one of these types, an exception is
           raised.
 
-          TO-STRING may also be `#f' in which case it is left to
+          TO-STRING may also be '#f' in which case it is left to
           CHILDREN to print the value.
 
-    `children'
+     'children'
           CHILDREN is either a function of one parameter, the
-          `<gdb:pretty-printer-worker>' object, or `#f'.
+          '<gdb:pretty-printer-worker>' object, or '#f'.
 
           GDB will call this function on a pretty-printer to compute the
           children of the pretty-printer's value.
 
           This function must return a <gdb:iterator> object.  Each item
-          returned by the iterator must be a tuple holding two
-          elements.  The first element is the "name" of the child; the
-          second element is the child's value.  The value can be any
-          Guile object which is convertible to a GDB value.
+          returned by the iterator must be a tuple holding two elements.
+          The first element is the "name" of the child; the second
+          element is the child's value.  The value can be any Guile
+          object which is convertible to a GDB value.
 
-          If CHILDREN is `#f', GDB will act as though the value has no
+          If CHILDREN is '#f', GDB will act as though the value has no
           children.
 
    GDB provides a function which can be used to look up the default
-pretty-printer for a `<gdb:value>':
+pretty-printer for a '<gdb:value>':
 
  -- Scheme Procedure: default-visualizer value
-     This function takes a `<gdb:value>' object as an argument.  If a
+     This function takes a '<gdb:value>' object as an argument.  If a
      pretty-printer for this value exists, then it is returned.  If no
-     such printer exists, then this returns `#f'.
+     such printer exists, then this returns '#f'.
 
 
 File: gdb.info,  Node: Selecting Guile Pretty-Printers,  Next: Writing a Guile Pretty-Printer,  Prev: Guile Pretty Printing API,  Up: Guile API
@@ -4894,47 +5368,44 @@ File: gdb.info,  Node: Selecting Guile P
 There are three sets of pretty-printers that GDB searches:
 
    * Per-objfile list of pretty-printers (*note Objfiles In Guile::).
-
    * Per-progspace list of pretty-printers (*note Progspaces In
      Guile::).
-
    * The global list of pretty-printers (*note Guile Pretty Printing
      API::).  These printers are available when debugging any inferior.
 
    Pretty-printer lookup is done by passing the value to be printed to
-the lookup function of each enabled object in turn.  Lookup stops when
-a lookup function returns a non-`#f' value or when the list is
-exhausted.  Lookup functions must return either a
-`<gdb:pretty-printer-worker>' object or `#f'.  Otherwise an exception
-is thrown.
-
-   GDB first checks the result of `objfile-pretty-printers' of each
-`<gdb:objfile>' in the current program space and iteratively calls each
-enabled lookup function in the list for that `<gdb:objfile>' until a
-non-`#f' object is returned.  If no pretty-printer is found in the
+the lookup function of each enabled object in turn.  Lookup stops when a
+lookup function returns a non-'#f' value or when the list is exhausted.
+Lookup functions must return either a '<gdb:pretty-printer-worker>'
+object or '#f'.  Otherwise an exception is thrown.
+
+   GDB first checks the result of 'objfile-pretty-printers' of each
+'<gdb:objfile>' in the current program space and iteratively calls each
+enabled lookup function in the list for that '<gdb:objfile>' until a
+non-'#f' object is returned.  If no pretty-printer is found in the
 objfile lists, GDB then searches the result of
-`progspace-pretty-printers' of the current program space, calling each
-enabled function until a non-`#f' object is returned.  After these
-lists have been exhausted, it tries the global pretty-printers list,
-obtained with `pretty-printers', again calling each enabled function
-until a non-`#f' object is returned.
+'progspace-pretty-printers' of the current program space, calling each
+enabled function until a non-'#f' object is returned.  After these lists
+have been exhausted, it tries the global pretty-printers list, obtained
+with 'pretty-printers', again calling each enabled function until a
+non-'#f' object is returned.
 
    The order in which the objfiles are searched is not specified.  For a
 given list, functions are always invoked from the head of the list, and
 iterated over sequentially until the end of the list, or a
-`<gdb:pretty-printer-worker>' object is returned.
+'<gdb:pretty-printer-worker>' object is returned.
 
    For various reasons a pretty-printer may not work.  For example, the
-underlying data structure may have changed and the pretty-printer is
-out of date.
+underlying data structure may have changed and the pretty-printer is out
+of date.
 
    The consequences of a broken pretty-printer are severe enough that
 GDB provides support for enabling and disabling individual printers.
-For example, if `print frame-arguments' is on, a backtrace can become
+For example, if 'print frame-arguments' is on, a backtrace can become
 highly illegible if any argument is printed with a broken printer.
 
    Pretty-printers are enabled and disabled from Scheme by calling
-`set-pretty-printer-enabled!'.  *Note Guile Pretty Printing API::.
+'set-pretty-printer-enabled!'.  *Note Guile Pretty Printing API::.
 
 
 File: gdb.info,  Node: Writing a Guile Pretty-Printer,  Next: Commands In Guile,  Prev: Selecting Guile Pretty-Printers,  Up: Guile API
@@ -4945,7 +5416,7 @@ File: gdb.info,  Node: Writing a Guile P
 A pretty-printer consists of two basic parts: a lookup function to
 determine if the type is supported, and the printer itself.
 
-   Here is an example showing how a `std::string' printer might be
+   Here is an example showing how a 'std::string' printer might be
 written.  *Note Guile Pretty Printing API::, for details.
 
      (define (make-my-string-printer value)
@@ -4973,32 +5444,32 @@ example above might be written.
    The example lookup function extracts the value's type, and attempts
 to match it to a type that it can pretty-print.  If it is a type the
 printer can pretty-print, it will return a <gdb:pretty-printer-worker>
-object.  If not, it returns `#f'.
+object.  If not, it returns '#f'.
 
    We recommend that you put your core pretty-printers into a Guile
-package.  If your pretty-printers are for use with a library, we
-further recommend embedding a version number into the package name.
-This practice will enable GDB to load multiple versions of your
+package.  If your pretty-printers are for use with a library, we further
+recommend embedding a version number into the package name.  This
+practice will enable GDB to load multiple versions of your
 pretty-printers at the same time, because they will have different
 names.
 
    You should write auto-loaded code (*note Guile Auto-loading::) such
 that it can be evaluated multiple times without changing its meaning.
-An ideal auto-load file will consist solely of `import's of your
-printer modules, followed by a call to a register pretty-printers with
-the current objfile.
+An ideal auto-load file will consist solely of 'import's of your printer
+modules, followed by a call to a register pretty-printers with the
+current objfile.
 
    Taken as a whole, this approach will scale nicely to multiple
 inferiors, each potentially using a different library version.
 Embedding a version number in the Guile package name will ensure that
-GDB is able to load both sets of printers simultaneously.  Then,
-because the search for pretty-printers is done by objfile, and because
-your auto-loaded code took care to register your library's printers
-with a specific objfile, GDB will find the correct printers for the
-specific version of the library used by each inferior.
+GDB is able to load both sets of printers simultaneously.  Then, because
+the search for pretty-printers is done by objfile, and because your
+auto-loaded code took care to register your library's printers with a
+specific objfile, GDB will find the correct printers for the specific
+version of the library used by each inferior.
 
-   To continue the `my::string' example, this code might appear in
-`(my-project my-library v1)':
+   To continue the 'my::string' example, this code might appear in
+'(my-project my-library v1)':
 
      (use-modules (gdb))
      (define (register-printers objfile)
@@ -5010,16 +5481,16 @@ And then the corresponding contents of t
      (use-modules (gdb) (my-project my-library v1))
      (register-printers (current-objfile))
 
-   The previous example illustrates a basic pretty-printer.  There are
-a few things that can be improved on.  The printer only handles one
-type, whereas a library typically has several types.  One could install
-a lookup function for each desired type in the library, but one could
-also have a single lookup function recognize several types.  The latter
-is the conventional way this is handled.  If a pretty-printer can
-handle multiple data types, then its "subprinters" are the printers for
-the individual data types.
+   The previous example illustrates a basic pretty-printer.  There are a
+few things that can be improved on.  The printer only handles one type,
+whereas a library typically has several types.  One could install a
+lookup function for each desired type in the library, but one could also
+have a single lookup function recognize several types.  The latter is
+the conventional way this is handled.  If a pretty-printer can handle
+multiple data types, then its "subprinters" are the printers for the
+individual data types.
 
-   The `(gdb printing)' module provides a formal way of solving this
+   The '(gdb printing)' module provides a formal way of solving this
 problem (*note Guile Printing Module::).  Here is another example that
 handles multiple types.
 
@@ -5049,8 +5520,8 @@ handles multiple types.
         #f))
 
    This example doesn't need a lookup function, that is handled by the
-`(gdb printing)' module.  Instead a function is provided to build up
-the object that handles the lookup.
+'(gdb printing)' module.  Instead a function is provided to build up the
+object that handles the lookup.
 
      (use-modules (gdb printing))
 
@@ -5066,7 +5537,7 @@ the object that handles the lookup.
      (append-objfile-pretty-printer! (current-objfile) (build-pretty-printer))
 
    Finally, when this printer is loaded into GDB, here is the
-corresponding output of `info pretty-printer':
+corresponding output of 'info pretty-printer':
 
      (gdb) info pretty-printer
      my_library.so:
@@ -5081,46 +5552,47 @@ File: gdb.info,  Node: Commands In Guile
 ...........................
 
 You can implement new GDB CLI commands in Guile.  A CLI command object
-is created with the `make-command' Guile function, and added to GDB
-with the `register-command!' Guile function.  This two-step approach is
-taken to separate out the side-effect of adding the command to GDB from
-`make-command'.
+is created with the 'make-command' Guile function, and added to GDB with
+the 'register-command!' Guile function.  This two-step approach is taken
+to separate out the side-effect of adding the command to GDB from
+'make-command'.
 
    There is no support for multi-line commands, that is commands that
-consist of multiple lines and are terminated with `end'.
+consist of multiple lines and are terminated with 'end'.
 
  -- Scheme Procedure: (make-command name [#:invoke invoke]
           [#:command-class command-class] [#:completer-class completer]
           [#:prefix? prefix] [#:doc doc-string])
+
      The argument NAME is the name of the command.  If NAME consists of
      multiple words, then the initial words are looked for as prefix
      commands.  In this case, if one of the prefix commands does not
      exist, an exception is raised.
 
-     The result is the `<gdb:command>' object representing the command.
+     The result is the '<gdb:command>' object representing the command.
      The command is not usable until it has been registered with GDB
-     with `register-command!'.
+     with 'register-command!'.
 
      The rest of the arguments are optional.
 
      The argument INVOKE is a procedure of three arguments: SELF, ARGS
-     and FROM-TTY.  The argument SELF is the `<gdb:command>' object
+     and FROM-TTY.  The argument SELF is the '<gdb:command>' object
      representing the command.  The argument ARGS is a string
-     representing the arguments passed to the command, after leading
-     and trailing whitespace has been stripped.  The argument FROM-TTY
-     is a boolean flag and specifies whether the command should
-     consider itself to have been originated from the user invoking it
+     representing the arguments passed to the command, after leading and
+     trailing whitespace has been stripped.  The argument FROM-TTY is a
+     boolean flag and specifies whether the command should consider
+     itself to have been originated from the user invoking it
      interactively.  If this function throws an exception, it is turned
-     into a GDB `error' call.  Otherwise, the return value is ignored.
+     into a GDB 'error' call.  Otherwise, the return value is ignored.
 
-     The argument COMMAND-CLASS is one of the `COMMAND_' constants
+     The argument COMMAND-CLASS is one of the 'COMMAND_' constants
      defined below.  This argument tells GDB how to categorize the new
-     command in the help system.  The default is `COMMAND_NONE'.
+     command in the help system.  The default is 'COMMAND_NONE'.
 
-     The argument COMPLETER is either `#f', one of the `COMPLETE_'
+     The argument COMPLETER is either '#f', one of the 'COMPLETE_'
      constants defined below, or a procedure, also defined below.  This
      argument tells GDB how to perform completion for this command.  If
-     not provided or if the value is `#f', then no completion is
+     not provided or if the value is '#f', then no completion is
      performed on the command.
 
      The argument PREFIX is a boolean flag indicating whether the new
@@ -5129,22 +5601,22 @@ consist of multiple lines and are termin
 
      The argument DOC-STRING is help text for the new command.  If no
      documentation string is provided, the default value "This command
-     is not documented." is used.
+     is not documented."  is used.
 
  -- Scheme Procedure: register-command! command
-     Add COMMAND, a `<gdb:command>' object, to GDB's list of commands.
-     It is an error to register a command more than once.  The result
-     is unspecified.
+     Add COMMAND, a '<gdb:command>' object, to GDB's list of commands.
+     It is an error to register a command more than once.  The result is
+     unspecified.
 
  -- Scheme Procedure: command? object
-     Return `#t' if OBJECT is a `<gdb:command>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:command>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: dont-repeat
      By default, a GDB command is repeated when the user enters a blank
      line at the command prompt.  A command can suppress this behavior
-     by invoking the `dont-repeat' function.  This is similar to the
-     user command `dont-repeat', see *note dont-repeat: Define.
+     by invoking the 'dont-repeat' function.  This is similar to the
+     user command 'dont-repeat', see *note dont-repeat: Define.
 
  -- Scheme Procedure: string->argv string
      Convert a string to a list of strings split up according to GDB's
@@ -5155,11 +5627,10 @@ consist of multiple lines and are termin
           $1 = ("1" "2 \"3" "4 \"5" "6 '7")
 
  -- Scheme Procedure: throw-user-error message . args
-     Throw a `gdb:user-error' exception.  The argument MESSAGE is the
+     Throw a 'gdb:user-error' exception.  The argument MESSAGE is the
      error message as a format string, like the FMT argument to the
-     `format' Scheme function.  *Note Formatted Output:
-     (guile)Formatted Output.  The argument ARGS is a list of the
-     optional arguments of MESSAGE.
+     'format' Scheme function.  *Note (guile)Formatted Output::.  The
+     argument ARGS is a list of the optional arguments of MESSAGE.
 
      This is used when the command detects a user error of some kind,
      say a bad command argument.
@@ -5175,29 +5646,29 @@ consist of multiple lines and are termin
           ERROR: Bad argument ugh
 
  -- completer: self text word
-     If the COMPLETER option to `make-command' is a procedure, it takes
-     three arguments: SELF which is the `<gdb:command>' object, and
-     TEXT and WORD which are both strings.  The argument TEXT holds the
+     If the COMPLETER option to 'make-command' is a procedure, it takes
+     three arguments: SELF which is the '<gdb:command>' object, and TEXT
+     and WORD which are both strings.  The argument TEXT holds the
      complete command line up to the cursor's location.  The argument
      WORD holds the last word of the command line; this is computed
      using a word-breaking heuristic.
 
      All forms of completion are handled by this function, that is, the
      <TAB> and <M-?> key bindings (*note Completion::), and the
-     `complete' command (*note complete: Help.).
+     'complete' command (*note complete: Help.).
 
      This procedure can return several kinds of values:
 
         * If the return value is a list, the contents of the list are
-          used as the completions.  It is up to COMPLETER to ensure
-          that the contents actually do complete the word.  An empty
-          list is allowed, it means that there were no completions
-          available.  Only string elements of the list are used; other
-          elements in the list are ignored.
+          used as the completions.  It is up to COMPLETER to ensure that
+          the contents actually do complete the word.  An empty list is
+          allowed, it means that there were no completions available.
+          Only string elements of the list are used; other elements in
+          the list are ignored.
 
-        * If the return value is a `<gdb:iterator>' object, it is
+        * If the return value is a '<gdb:iterator>' object, it is
           iterated over to obtain the completions.  It is up to
-          `completer-procedure' to ensure that the results actually do
+          'completer-procedure' to ensure that the results actually do
           complete the word.  Only string elements of the result are
           used; other elements in the sequence are ignored.
 
@@ -5206,106 +5677,105 @@ consist of multiple lines and are termin
 
    When a new command is registered, it will have been declared as a
 member of some general class of commands.  This is used to classify
-top-level commands in the on-line help system; note that prefix
-commands are not listed under their own category but rather that of
-their top-level command.  The available classifications are represented
-by constants defined in the `gdb' module:
+top-level commands in the on-line help system; note that prefix commands
+are not listed under their own category but rather that of their
+top-level command.  The available classifications are represented by
+constants defined in the 'gdb' module:
 
-`COMMAND_NONE'
+'COMMAND_NONE'
      The command does not belong to any particular class.  A command in
      this category will not be displayed in any of the help categories.
      This is the default.
 
-`COMMAND_RUNNING'
+'COMMAND_RUNNING'
      The command is related to running the inferior.  For example,
-     `start', `step', and `continue' are in this category.  Type `help
+     'start', 'step', and 'continue' are in this category.  Type 'help
      running' at the GDB prompt to see a list of commands in this
      category.
 
-`COMMAND_DATA'
-     The command is related to data or variables.  For example, `call',
-     `find', and `print' are in this category.  Type `help data' at the
+'COMMAND_DATA'
+     The command is related to data or variables.  For example, 'call',
+     'find', and 'print' are in this category.  Type 'help data' at the
      GDB prompt to see a list of commands in this category.
 
-`COMMAND_STACK'
+'COMMAND_STACK'
      The command has to do with manipulation of the stack.  For example,
-     `backtrace', `frame', and `return' are in this category.  Type
-     `help stack' at the GDB prompt to see a list of commands in this
+     'backtrace', 'frame', and 'return' are in this category.  Type
+     'help stack' at the GDB prompt to see a list of commands in this
      category.
 
-`COMMAND_FILES'
-     This class is used for file-related commands.  For example,
-     `file', `list' and `section' are in this category.  Type `help
-     files' at the GDB prompt to see a list of commands in this
-     category.
+'COMMAND_FILES'
+     This class is used for file-related commands.  For example, 'file',
+     'list' and 'section' are in this category.  Type 'help files' at
+     the GDB prompt to see a list of commands in this category.
 
-`COMMAND_SUPPORT'
+'COMMAND_SUPPORT'
      This should be used for "support facilities", generally meaning
      things that are useful to the user when interacting with GDB, but
-     not related to the state of the inferior.  For example, `help',
-     `make', and `shell' are in this category.  Type `help support' at
+     not related to the state of the inferior.  For example, 'help',
+     'make', and 'shell' are in this category.  Type 'help support' at
      the GDB prompt to see a list of commands in this category.
 
-`COMMAND_STATUS'
-     The command is an `info'-related command, that is, related to the
-     state of GDB itself.  For example, `info', `macro', and `show' are
-     in this category.  Type `help status' at the GDB prompt to see a
+'COMMAND_STATUS'
+     The command is an 'info'-related command, that is, related to the
+     state of GDB itself.  For example, 'info', 'macro', and 'show' are
+     in this category.  Type 'help status' at the GDB prompt to see a
      list of commands in this category.
 
-`COMMAND_BREAKPOINTS'
-     The command has to do with breakpoints.  For example, `break',
-     `clear', and `delete' are in this category.  Type `help
+'COMMAND_BREAKPOINTS'
+     The command has to do with breakpoints.  For example, 'break',
+     'clear', and 'delete' are in this category.  Type 'help
      breakpoints' at the GDB prompt to see a list of commands in this
      category.
 
-`COMMAND_TRACEPOINTS'
-     The command has to do with tracepoints.  For example, `trace',
-     `actions', and `tfind' are in this category.  Type `help
+'COMMAND_TRACEPOINTS'
+     The command has to do with tracepoints.  For example, 'trace',
+     'actions', and 'tfind' are in this category.  Type 'help
      tracepoints' at the GDB prompt to see a list of commands in this
      category.
 
-`COMMAND_USER'
+'COMMAND_USER'
      The command is a general purpose command for the user, and
-     typically does not fit in one of the other categories.  Type `help
+     typically does not fit in one of the other categories.  Type 'help
      user-defined' at the GDB prompt to see a list of commands in this
      category, as well as the list of gdb macros (*note Sequences::).
 
-`COMMAND_OBSCURE'
+'COMMAND_OBSCURE'
      The command is only used in unusual circumstances, or is not of
-     general interest to users.  For example, `checkpoint', `fork', and
-     `stop' are in this category.  Type `help obscure' at the GDB
-     prompt to see a list of commands in this category.
-
-`COMMAND_MAINTENANCE'
-     The command is only useful to GDB maintainers.  The `maintenance'
-     and `flushregs' commands are in this category.  Type `help
+     general interest to users.  For example, 'checkpoint', 'fork', and
+     'stop' are in this category.  Type 'help obscure' at the GDB prompt
+     to see a list of commands in this category.
+
+'COMMAND_MAINTENANCE'
+     The command is only useful to GDB maintainers.  The 'maintenance'
+     and 'flushregs' commands are in this category.  Type 'help
      internals' at the GDB prompt to see a list of commands in this
      category.
 
    A new command can use a predefined completion function, either by
-specifying it via an argument at initialization, or by returning it
-from the `completer' procedure.  These predefined completion constants
-are all defined in the `gdb' module:
+specifying it via an argument at initialization, or by returning it from
+the 'completer' procedure.  These predefined completion constants are
+all defined in the 'gdb' module:
 
-`COMPLETE_NONE'
+'COMPLETE_NONE'
      This constant means that no completion should be done.
 
-`COMPLETE_FILENAME'
+'COMPLETE_FILENAME'
      This constant means that filename completion should be performed.
 
-`COMPLETE_LOCATION'
-     This constant means that location completion should be done.
-     *Note Specify Location::.
+'COMPLETE_LOCATION'
+     This constant means that location completion should be done.  *Note
+     Specify Location::.
 
-`COMPLETE_COMMAND'
+'COMPLETE_COMMAND'
      This constant means that completion should examine GDB command
      names.
 
-`COMPLETE_SYMBOL'
+'COMPLETE_SYMBOL'
      This constant means that completion should be done using symbol
      names as the source.
 
-`COMPLETE_EXPRESSION'
+'COMPLETE_EXPRESSION'
      This constant means that completion should be done on expressions.
      Often this means completing on symbol names, but some language
      parsers also have support for completing on field names.
@@ -5331,160 +5801,161 @@ File: gdb.info,  Node: Parameters In Gui
 You can implement new GDB "parameters" using Guile (1).
 
    There are many parameters that already exist and can be set in GDB.
-Two examples are: `set follow-fork' and `set charset'.  Setting these
+Two examples are: 'set follow-fork' and 'set charset'.  Setting these
 parameters influences certain behavior in GDB.  Similarly, you can
-define parameters that can be used to influence behavior in custom
-Guile scripts and commands.
+define parameters that can be used to influence behavior in custom Guile
+scripts and commands.
 
-   A new parameter is defined with the `make-parameter' Guile function,
-and added to GDB with the `register-parameter!' Guile function.  This
-two-step approach is taken to separate out the side-effect of adding
-the parameter to GDB from `make-parameter'.
+   A new parameter is defined with the 'make-parameter' Guile function,
+and added to GDB with the 'register-parameter!' Guile function.  This
+two-step approach is taken to separate out the side-effect of adding the
+parameter to GDB from 'make-parameter'.
 
-   Parameters are exposed to the user via the `set' and `show'
-commands.  *Note Help::.
+   Parameters are exposed to the user via the 'set' and 'show' commands.
+*Note Help::.
 
  -- Scheme Procedure: (make-parameter name [#:command-class
           command-class] [#:parameter-type parameter-type] [#:enum-list
           enum-list] [#:set-func set-func] [#:show-func show-func]
           [#:doc doc] [#:set-doc set-doc] [#:show-doc show-doc]
           [#:initial-value initial-value])
+
      The argument NAME is the name of the new parameter.  If NAME
      consists of multiple words, then the initial words are looked for
      as prefix parameters.  An example of this can be illustrated with
-     the `set print' set of parameters.  If NAME is `print foo', then
-     `print' will be searched as the prefix parameter.  In this case
-     the parameter can subsequently be accessed in GDB as `set print
-     foo'.  If NAME consists of multiple words, and no prefix parameter
-     group can be found, an exception is raised.
+     the 'set print' set of parameters.  If NAME is 'print foo', then
+     'print' will be searched as the prefix parameter.  In this case the
+     parameter can subsequently be accessed in GDB as 'set print foo'.
+     If NAME consists of multiple words, and no prefix parameter group
+     can be found, an exception is raised.
 
-     The result is the `<gdb:parameter>' object representing the
+     The result is the '<gdb:parameter>' object representing the
      parameter.  The parameter is not usable until it has been
-     registered with GDB with `register-parameter!'.
+     registered with GDB with 'register-parameter!'.
 
      The rest of the arguments are optional.
 
-     The argument COMMAND-CLASS should be one of the `COMMAND_'
-     constants (*note Commands In Guile::).  This argument tells GDB
-     how to categorize the new parameter in the help system.  The
-     default is `COMMAND_NONE'.
+     The argument COMMAND-CLASS should be one of the 'COMMAND_'
+     constants (*note Commands In Guile::).  This argument tells GDB how
+     to categorize the new parameter in the help system.  The default is
+     'COMMAND_NONE'.
 
-     The argument PARAMETER-TYPE should be one of the `PARAM_' constants
+     The argument PARAMETER-TYPE should be one of the 'PARAM_' constants
      defined below.  This argument tells GDB the type of the new
      parameter; this information is used for input validation and
-     completion.  The default is `PARAM_BOOLEAN'.
+     completion.  The default is 'PARAM_BOOLEAN'.
 
-     If PARAMETER-TYPE is `PARAM_ENUM', then ENUM-LIST must be a list
-     of strings.  These strings represent the possible values for the
+     If PARAMETER-TYPE is 'PARAM_ENUM', then ENUM-LIST must be a list of
+     strings.  These strings represent the possible values for the
      parameter.
 
-     If PARAMETER-TYPE is not `PARAM_ENUM', then the presence of
+     If PARAMETER-TYPE is not 'PARAM_ENUM', then the presence of
      ENUM-LIST will cause an exception to be thrown.
 
      The argument SET-FUNC is a function of one argument: SELF which is
-     the `<gdb:parameter>' object representing the parameter.  GDB will
+     the '<gdb:parameter>' object representing the parameter.  GDB will
      call this function when a PARAMETER's value has been changed via
-     the `set' API (for example, `set foo off').  The value of the
+     the 'set' API (for example, 'set foo off').  The value of the
      parameter has already been set to the new value.  This function
      must return a string to be displayed to the user.  GDB will add a
-     trailing newline if the string is non-empty.  GDB generally
-     doesn't print anything when a parameter is set, thus typically
-     this function should return `""'.  A non-empty string result
-     should typically be used for displaying warnings and errors.
+     trailing newline if the string is non-empty.  GDB generally doesn't
+     print anything when a parameter is set, thus typically this
+     function should return '""'.  A non-empty string result should
+     typically be used for displaying warnings and errors.
 
      The argument SHOW-FUNC is a function of two arguments: SELF which
-     is the `<gdb:parameter>' object representing the parameter, and
+     is the '<gdb:parameter>' object representing the parameter, and
      SVALUE which is the string representation of the current value.
-     GDB will call this function when a PARAMETER's `show' API has been
-     invoked (for example, `show foo').  This function must return a
-     string, and will be displayed to the user.  GDB will add a
-     trailing newline.
+     GDB will call this function when a PARAMETER's 'show' API has been
+     invoked (for example, 'show foo').  This function must return a
+     string, and will be displayed to the user.  GDB will add a trailing
+     newline.
 
      The argument DOC is the help text for the new parameter.  If there
      is no documentation string, a default value is used.
 
-     The argument SET-DOC is the help text for this parameter's `set'
+     The argument SET-DOC is the help text for this parameter's 'set'
      command.
 
-     The argument SHOW-DOC is the help text for this parameter's `show'
+     The argument SHOW-DOC is the help text for this parameter's 'show'
      command.
 
      The argument INITIAL-VALUE specifies the initial value of the
      parameter.  If it is a function, it takes one parameter, the
-     `<gdb:parameter>' object and its result is used as the initial
+     '<gdb:parameter>' object and its result is used as the initial
      value of the parameter.  The initial value must be valid for the
      parameter type, otherwise an exception is thrown.
 
  -- Scheme Procedure: register-parameter! parameter
-     Add PARAMETER, a `<gdb:parameter>' object, to GDB's list of
+     Add PARAMETER, a '<gdb:parameter>' object, to GDB's list of
      parameters.  It is an error to register a parameter more than once.
      The result is unspecified.
 
  -- Scheme Procedure: parameter? object
-     Return `#t' if OBJECT is a `<gdb:parameter>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:parameter>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: parameter-value parameter
      Return the value of PARAMETER which may either be a
-     `<gdb:parameter>' object or a string naming the parameter.
+     '<gdb:parameter>' object or a string naming the parameter.
 
  -- Scheme Procedure: set-parameter-value! parameter new-value
      Assign PARAMETER the value of NEW-VALUE.  The argument PARAMETER
-     must be an object of type `<gdb:parameter>'.  GDB does validation
+     must be an object of type '<gdb:parameter>'.  GDB does validation
      when assignments are made.
 
    When a new parameter is defined, its type must be specified.  The
-available types are represented by constants defined in the `gdb'
+available types are represented by constants defined in the 'gdb'
 module:
 
-`PARAM_BOOLEAN'
-     The value is a plain boolean.  The Guile boolean values, `#t' and
-     `#f' are the only valid values.
+'PARAM_BOOLEAN'
+     The value is a plain boolean.  The Guile boolean values, '#t' and
+     '#f' are the only valid values.
 
-`PARAM_AUTO_BOOLEAN'
-     The value has three possible states: true, false, and `auto'.  In
+'PARAM_AUTO_BOOLEAN'
+     The value has three possible states: true, false, and 'auto'.  In
      Guile, true and false are represented using boolean constants, and
-     `auto' is represented using `#:auto'.
+     'auto' is represented using '#:auto'.
 
-`PARAM_UINTEGER'
+'PARAM_UINTEGER'
      The value is an unsigned integer.  The value of 0 should be
      interpreted to mean "unlimited".
 
-`PARAM_ZINTEGER'
+'PARAM_ZINTEGER'
      The value is an integer.
 
-`PARAM_ZUINTEGER'
+'PARAM_ZUINTEGER'
      The value is an unsigned integer.
 
-`PARAM_ZUINTEGER_UNLIMITED'
-     The value is an integer in the range `[0, INT_MAX]'.  A value of
-     `-1' means "unlimited", and other negative numbers are not allowed.
+'PARAM_ZUINTEGER_UNLIMITED'
+     The value is an integer in the range '[0, INT_MAX]'.  A value of
+     '-1' means "unlimited", and other negative numbers are not allowed.
 
-`PARAM_STRING'
+'PARAM_STRING'
      The value is a string.  When the user modifies the string, any
-     escape sequences, such as `\t', `\f', and octal escapes, are
+     escape sequences, such as '\t', '\f', and octal escapes, are
      translated into corresponding characters and encoded into the
      current host charset.
 
-`PARAM_STRING_NOESCAPE'
+'PARAM_STRING_NOESCAPE'
      The value is a string.  When the user modifies the string, escapes
      are passed through untranslated.
 
-`PARAM_OPTIONAL_FILENAME'
-     The value is a either a filename (a string), or `#f'.
+'PARAM_OPTIONAL_FILENAME'
+     The value is a either a filename (a string), or '#f'.
 
-`PARAM_FILENAME'
+'PARAM_FILENAME'
      The value is a filename.  This is just like
-     `PARAM_STRING_NOESCAPE', but uses file names for completion.
+     'PARAM_STRING_NOESCAPE', but uses file names for completion.
 
-`PARAM_ENUM'
+'PARAM_ENUM'
      The value is a string, which must be one of a collection of string
      constants provided when the parameter is created.
 
    ---------- Footnotes ----------
 
    (1) Note that GDB parameters must not be confused with Guileâ€™s
-parameter objects (*note Parameters: (guile)Parameters.).
+parameter objects (*note (guile)Parameters::).
 
 
 File: gdb.info,  Node: Progspaces In Guile,  Next: Objfiles In Guile,  Prev: Parameters In Guile,  Up: Guile API
@@ -5497,55 +5968,55 @@ address space.  It consists of all of th
 *Note Objfiles In Guile::.  *Note program spaces: Inferiors and
 Programs, for more details about program spaces.
 
-   Each progspace is represented by an instance of the `<gdb:progspace>'
+   Each progspace is represented by an instance of the '<gdb:progspace>'
 smob.  *Note GDB Scheme Data Types::.
 
    The following progspace-related functions are available in the
-`(gdb)' module:
+'(gdb)' module:
 
  -- Scheme Procedure: progspace? object
-     Return `#t' if OBJECT is a `<gdb:progspace>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:progspace>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: progspace-valid? progspace
-     Return `#t' if PROGSPACE is valid, `#f' if not.  A
-     `<gdb:progspace>' object can become invalid if the program it
+     Return '#t' if PROGSPACE is valid, '#f' if not.  A
+     '<gdb:progspace>' object can become invalid if the program it
      refers to is not loaded in GDB any longer.
 
  -- Scheme Procedure: current-progspace
      This function returns the program space of the currently selected
      inferior.  There is always a current progspace, this never returns
-     `#f'.  *Note Inferiors and Programs::.
+     '#f'.  *Note Inferiors and Programs::.
 
  -- Scheme Procedure: progspaces
      Return a list of all the progspaces currently known to GDB.
 
  -- Scheme Procedure: progspace-filename progspace
      Return the absolute file name of PROGSPACE as a string.  This is
-     the name of the file passed as the argument to the `file' or
-     `symbol-file' commands.  If the program space does not have an
-     associated file name, then `#f' is returned.  This occurs, for
+     the name of the file passed as the argument to the 'file' or
+     'symbol-file' commands.  If the program space does not have an
+     associated file name, then '#f' is returned.  This occurs, for
      example, when GDB is started without a program to debug.
 
-     A `gdb:invalid-object-error' exception is thrown if PROGSPACE is
+     A 'gdb:invalid-object-error' exception is thrown if PROGSPACE is
      invalid.
 
  -- Scheme Procedure: progspace-objfiles progspace
-     Return the list of objfiles of PROGSPACE.  The order of objfiles
-     in the result is arbitrary.  Each element is an object of type
-     `<gdb:objfile>'.  *Note Objfiles In Guile::.
+     Return the list of objfiles of PROGSPACE.  The order of objfiles in
+     the result is arbitrary.  Each element is an object of type
+     '<gdb:objfile>'.  *Note Objfiles In Guile::.
 
-     A `gdb:invalid-object-error' exception is thrown if PROGSPACE is
+     A 'gdb:invalid-object-error' exception is thrown if PROGSPACE is
      invalid.
 
  -- Scheme Procedure: progspace-pretty-printers progspace
      Return the list of pretty-printers of PROGSPACE.  Each element is
-     an object of type `<gdb:pretty-printer>'.  *Note Guile Pretty
+     an object of type '<gdb:pretty-printer>'.  *Note Guile Pretty
      Printing API::, for more information.
 
  -- Scheme Procedure: set-progspace-pretty-printers! progspace
           printer-list
-     Set the list of registered `<gdb:pretty-printer>' objects for
+     Set the list of registered '<gdb:pretty-printer>' objects for
      PROGSPACE to PRINTER-LIST.  *Note Guile Pretty Printing API::, for
      more information.
 
@@ -5557,23 +6028,23 @@ File: gdb.info,  Node: Objfiles In Guile
 
 GDB loads symbols for an inferior from various symbol-containing files
 (*note Files::).  These include the primary executable file, any shared
-libraries used by the inferior, and any separate debug info files
-(*note Separate Debug Files::).  GDB calls these symbol-containing
-files "objfiles".
+libraries used by the inferior, and any separate debug info files (*note
+Separate Debug Files::).  GDB calls these symbol-containing files
+"objfiles".
 
-   Each objfile is represented as an object of type `<gdb:objfile>'.
+   Each objfile is represented as an object of type '<gdb:objfile>'.
 
-   The following objfile-related procedures are provided by the `(gdb)'
+   The following objfile-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: objfile? object
-     Return `#t' if OBJECT is a `<gdb:objfile>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:objfile>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: objfile-valid? objfile
-     Return `#t' if OBJFILE is valid, `#f' if not.  A `<gdb:objfile>'
+     Return '#t' if OBJFILE is valid, '#f' if not.  A '<gdb:objfile>'
      object can become invalid if the object file it refers to is not
-     loaded in GDB any longer.  All other `<gdb:objfile>' procedures
+     loaded in GDB any longer.  All other '<gdb:objfile>' procedures
      will throw an exception if it is invalid at the time the procedure
      is called.
 
@@ -5582,24 +6053,24 @@ module:
      resolved.
 
  -- Scheme Procedure: objfile-progspace objfile
-     Return the `<gdb:progspace>' that this object file lives in.
-     *Note Progspaces In Guile::, for more on progspaces.
+     Return the '<gdb:progspace>' that this object file lives in.  *Note
+     Progspaces In Guile::, for more on progspaces.
 
  -- Scheme Procedure: objfile-pretty-printers objfile
-     Return the list of registered `<gdb:pretty-printer>' objects for
+     Return the list of registered '<gdb:pretty-printer>' objects for
      OBJFILE.  *Note Guile Pretty Printing API::, for more information.
 
  -- Scheme Procedure: set-objfile-pretty-printers! objfile printer-list
-     Set the list of registered `<gdb:pretty-printer>' objects for
+     Set the list of registered '<gdb:pretty-printer>' objects for
      OBJFILE to PRINTER-LIST.  The PRINTER-LIST must be a list of
-     `<gdb:pretty-printer>' objects.  *Note Guile Pretty Printing
-     API::, for more information.
+     '<gdb:pretty-printer>' objects.  *Note Guile Pretty Printing API::,
+     for more information.
 
  -- Scheme Procedure: current-objfile
      When auto-loading a Guile script (*note Guile Auto-loading::), GDB
      sets the "current objfile" to the corresponding objfile.  This
      function returns the current objfile.  If there is no current
-     objfile, this function returns `#f'.
+     objfile, this function returns '#f'.
 
  -- Scheme Procedure: objfiles
      Return a list of all the objfiles in the current program space.
@@ -5611,107 +6082,106 @@ File: gdb.info,  Node: Frames In Guile, 
 .....................................................
 
 When the debugged program stops, GDB is able to analyze its call stack
-(*note Stack frames: Frames.).  The `<gdb:frame>' class represents a
-frame in the stack.  A `<gdb:frame>' object is only valid while its
+(*note Stack frames: Frames.).  The '<gdb:frame>' class represents a
+frame in the stack.  A '<gdb:frame>' object is only valid while its
 corresponding frame exists in the inferior's stack.  If you try to use
-an invalid frame object, GDB will throw a `gdb:invalid-object'
-exception (*note Guile Exception Handling::).
+an invalid frame object, GDB will throw a 'gdb:invalid-object' exception
+(*note Guile Exception Handling::).
 
-   Two `<gdb:frame>' objects can be compared for equality with the
-`equal?' function, like:
+   Two '<gdb:frame>' objects can be compared for equality with the
+'equal?' function, like:
 
      (gdb) guile (equal? (newest-frame) (selected-frame))
      #t
 
-   The following frame-related procedures are provided by the `(gdb)'
+   The following frame-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: frame? object
-     Return `#t' if OBJECT is a `<gdb:frame>' object.  Otherwise return
-     `#f'.
+     Return '#t' if OBJECT is a '<gdb:frame>' object.  Otherwise return
+     '#f'.
 
  -- Scheme Procedure: frame-valid? frame
-     Returns `#t' if FRAME is valid, `#f' if not.  A frame object can
+     Returns '#t' if FRAME is valid, '#f' if not.  A frame object can
      become invalid if the frame it refers to doesn't exist anymore in
-     the inferior.  All `<gdb:frame>' procedures will throw an
-     exception if the frame is invalid at the time the procedure is
-     called.
+     the inferior.  All '<gdb:frame>' procedures will throw an exception
+     if the frame is invalid at the time the procedure is called.
 
  -- Scheme Procedure: frame-name frame
-     Return the function name of FRAME, or `#f' if it can't be obtained.
+     Return the function name of FRAME, or '#f' if it can't be obtained.
 
  -- Scheme Procedure: frame-arch frame
-     Return the `<gdb:architecture>' object corresponding to FRAME's
+     Return the '<gdb:architecture>' object corresponding to FRAME's
      architecture.  *Note Architectures In Guile::.
 
  -- Scheme Procedure: frame-type frame
      Return the type of FRAME.  The value can be one of:
 
-    `NORMAL_FRAME'
+     'NORMAL_FRAME'
           An ordinary stack frame.
 
-    `DUMMY_FRAME'
+     'DUMMY_FRAME'
           A fake stack frame that was created by GDB when performing an
           inferior function call.
 
-    `INLINE_FRAME'
+     'INLINE_FRAME'
           A frame representing an inlined function.  The function was
-          inlined into a `NORMAL_FRAME' that is older than this one.
+          inlined into a 'NORMAL_FRAME' that is older than this one.
 
-    `TAILCALL_FRAME'
+     'TAILCALL_FRAME'
           A frame representing a tail call.  *Note Tail Call Frames::.
 
-    `SIGTRAMP_FRAME'
+     'SIGTRAMP_FRAME'
           A signal trampoline frame.  This is the frame created by the
           OS when it calls into a signal handler.
 
-    `ARCH_FRAME'
+     'ARCH_FRAME'
           A fake stack frame representing a cross-architecture call.
 
-    `SENTINEL_FRAME'
-          This is like `NORMAL_FRAME', but it is only used for the
+     'SENTINEL_FRAME'
+          This is like 'NORMAL_FRAME', but it is only used for the
           newest frame.
 
  -- Scheme Procedure: frame-unwind-stop-reason frame
      Return an integer representing the reason why it's not possible to
      find more frames toward the outermost frame.  Use
-     `unwind-stop-reason-string' to convert the value returned by this
-     function to a string. The value can be one of:
+     'unwind-stop-reason-string' to convert the value returned by this
+     function to a string.  The value can be one of:
 
-    `FRAME_UNWIND_NO_REASON'
+     'FRAME_UNWIND_NO_REASON'
           No particular reason (older frames should be available).
 
-    `FRAME_UNWIND_NULL_ID'
+     'FRAME_UNWIND_NULL_ID'
           The previous frame's analyzer returns an invalid result.
 
-    `FRAME_UNWIND_OUTERMOST'
+     'FRAME_UNWIND_OUTERMOST'
           This frame is the outermost.
 
-    `FRAME_UNWIND_UNAVAILABLE'
+     'FRAME_UNWIND_UNAVAILABLE'
           Cannot unwind further, because that would require knowing the
           values of registers or memory that have not been collected.
 
-    `FRAME_UNWIND_INNER_ID'
+     'FRAME_UNWIND_INNER_ID'
           This frame ID looks like it ought to belong to a NEXT frame,
           but we got it for a PREV frame.  Normally, this is a sign of
           unwinder failure.  It could also indicate stack corruption.
 
-    `FRAME_UNWIND_SAME_ID'
+     'FRAME_UNWIND_SAME_ID'
           This frame has the same ID as the previous one.  That means
           that unwinding further would almost certainly give us another
           frame with exactly the same ID, so break the chain.  Normally,
           this is a sign of unwinder failure.  It could also indicate
           stack corruption.
 
-    `FRAME_UNWIND_NO_SAVED_PC'
+     'FRAME_UNWIND_NO_SAVED_PC'
           The frame unwinder did not find any saved PC, but we needed
           one to unwind further.
 
-    `FRAME_UNWIND_MEMORY_ERROR'
+     'FRAME_UNWIND_MEMORY_ERROR'
           The frame unwinder caused an error while trying to access
           memory.
 
-    `FRAME_UNWIND_FIRST_ERROR'
+     'FRAME_UNWIND_FIRST_ERROR'
           Any stop reason greater or equal to this value indicates some
           kind of error.  This special value facilitates writing code
           that tests for errors in unwinding in a way that will work
@@ -5727,13 +6197,13 @@ module:
      Return the frame's resume address.
 
  -- Scheme Procedure: frame-block frame
-     Return the frame's code block as a `<gdb:block>' object.  *Note
+     Return the frame's code block as a '<gdb:block>' object.  *Note
      Blocks In Guile::.
 
  -- Scheme Procedure: frame-function frame
-     Return the symbol for the function corresponding to this frame as
-     a `<gdb:symbol>' object, or `#f' if there isn't one.  *Note
-     Symbols In Guile::.
+     Return the symbol for the function corresponding to this frame as a
+     '<gdb:symbol>' object, or '#f' if there isn't one.  *Note Symbols
+     In Guile::.
 
  -- Scheme Procedure: frame-older frame
      Return the frame that called FRAME.
@@ -5742,20 +6212,20 @@ module:
      Return the frame called by FRAME.
 
  -- Scheme Procedure: frame-sal frame
-     Return the frame's `<gdb:sal>' (symtab and line) object.  *Note
+     Return the frame's '<gdb:sal>' (symtab and line) object.  *Note
      Symbol Tables In Guile::.
 
  -- Scheme Procedure: frame-read-register frame register
      Return the value of REGISTER in FRAME.  REGISTER should be a
-     string, like `pc'.
+     string, like 'pc'.
 
  -- Scheme Procedure: frame-read-var frame variable [#:block block]
      Return the value of VARIABLE in FRAME.  If the optional argument
      BLOCK is provided, search for the variable from that block;
      otherwise start at the frame's current block (which is determined
      by the frame's current program counter).  The VARIABLE must be
-     given as a string or a `<gdb:symbol>' object, and BLOCK must be a
-     `<gdb:block>' object.
+     given as a string or a '<gdb:symbol>' object, and BLOCK must be a
+     '<gdb:block>' object.
 
  -- Scheme Procedure: frame-select frame
      Set FRAME to be the selected frame.  *Note Examining the Stack:
@@ -5771,7 +6241,7 @@ module:
  -- Scheme Procedure: unwind-stop-reason-string reason
      Return a string explaining the reason why GDB stopped unwinding
      frames, as expressed by the given REASON code (an integer, see the
-     `frame-unwind-stop-reason' procedure above in this section).
+     'frame-unwind-stop-reason' procedure above in this section).
 
 
 File: gdb.info,  Node: Blocks In Guile,  Next: Symbols In Guile,  Prev: Frames In Guile,  Up: Guile API
@@ -5781,14 +6251,14 @@ File: gdb.info,  Node: Blocks In Guile, 
 
 In GDB, symbols are stored in blocks.  A block corresponds roughly to a
 scope in the source code.  Blocks are organized hierarchically, and are
-represented individually in Guile as an object of type `<gdb:block>'.
+represented individually in Guile as an object of type '<gdb:block>'.
 Blocks rely on debugging information being available.
 
    A frame has a block.  Please see *note Frames In Guile::, for a more
 in-depth discussion of frames.
 
-   The outermost block is known as the "global block".  The global
-block typically holds public global variables and functions.
+   The outermost block is known as the "global block".  The global block
+typically holds public global variables and functions.
 
    The block nested just inside the global block is the "static block".
 The static block typically holds file-scoped variables and functions.
@@ -5825,30 +6295,30 @@ over all the blocks in a symbol table (*
        }
      }
 
-   The following block-related procedures are provided by the `(gdb)'
+   The following block-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: block? object
-     Return `#t' if OBJECT is a `<gdb:block>' object.  Otherwise return
-     `#f'.
+     Return '#t' if OBJECT is a '<gdb:block>' object.  Otherwise return
+     '#f'.
 
  -- Scheme Procedure: block-valid? block
-     Returns `#t' if `<gdb:block>' BLOCK is valid, `#f' if not.  A
-     block object can become invalid if the block it refers to doesn't
-     exist anymore in the inferior.  All other `<gdb:block>' methods
-     will throw an exception if it is invalid at the time the procedure
-     is called.  The block's validity is also checked during iteration
-     over symbols of the block.
+     Returns '#t' if '<gdb:block>' BLOCK is valid, '#f' if not.  A block
+     object can become invalid if the block it refers to doesn't exist
+     anymore in the inferior.  All other '<gdb:block>' methods will
+     throw an exception if it is invalid at the time the procedure is
+     called.  The block's validity is also checked during iteration over
+     symbols of the block.
 
  -- Scheme Procedure: block-start block
-     Return the start address of `<gdb:block>' BLOCK.
+     Return the start address of '<gdb:block>' BLOCK.
 
  -- Scheme Procedure: block-end block
-     Return the end address of `<gdb:block>' BLOCK.
+     Return the end address of '<gdb:block>' BLOCK.
 
  -- Scheme Procedure: block-function block
-     Return the name of `<gdb:block>' BLOCK represented as a
-     `<gdb:symbol>' object.  If the block is not named, then `#f' is
+     Return the name of '<gdb:block>' BLOCK represented as a
+     '<gdb:symbol>' object.  If the block is not named, then '#f' is
      returned.
 
      For ordinary function blocks, the superblock is the static block.
@@ -5857,29 +6327,29 @@ module:
      this happens for an inlined function.
 
  -- Scheme Procedure: block-superblock block
-     Return the block containing `<gdb:block>' BLOCK.  If the parent
-     block does not exist, then `#f' is returned.
+     Return the block containing '<gdb:block>' BLOCK.  If the parent
+     block does not exist, then '#f' is returned.
 
  -- Scheme Procedure: block-global-block block
-     Return the global block associated with `<gdb:block>' BLOCK.
+     Return the global block associated with '<gdb:block>' BLOCK.
 
  -- Scheme Procedure: block-static-block block
-     Return the static block associated with `<gdb:block>' BLOCK.
+     Return the static block associated with '<gdb:block>' BLOCK.
 
  -- Scheme Procedure: block-global? block
-     Return `#t' if `<gdb:block>' BLOCK is a global block.  Otherwise
-     return `#f'.
+     Return '#t' if '<gdb:block>' BLOCK is a global block.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: block-static? block
-     Return `#t' if `<gdb:block>' BLOCK is a static block.  Otherwise
-     return `#f'.
+     Return '#t' if '<gdb:block>' BLOCK is a static block.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: block-symbols
      Return a list of all symbols (as <gdb:symbol> objects) in
-     `<gdb:block>' BLOCK.
+     '<gdb:block>' BLOCK.
 
  -- Scheme Procedure: make-block-symbols-iterator block
-     Return an object of type `<gdb:iterator>' that will iterate over
+     Return an object of type '<gdb:iterator>' that will iterate over
      all symbols of the block.  Guile programs should not assume that a
      specific block object will always contain a given symbol, since
      changes in GDB features and infrastructure may cause symbols move
@@ -5887,13 +6357,13 @@ module:
 
  -- Scheme Procedure: block-symbols-progress?
      Return #t if the object is a <gdb:block-symbols-progress> object.
-     This object would be obtained from the `progress' element of the
-     `<gdb:iterator>' object returned by `make-block-symbols-iterator'.
+     This object would be obtained from the 'progress' element of the
+     '<gdb:iterator>' object returned by 'make-block-symbols-iterator'.
 
  -- Scheme Procedure: lookup-block pc
-     Return the innermost `<gdb:block>' containing the given PC value.
+     Return the innermost '<gdb:block>' containing the given PC value.
      If the block cannot be found for the PC value specified, the
-     function will return `#f'.
+     function will return '#f'.
 
 
 File: gdb.info,  Node: Symbols In Guile,  Next: Symbol Tables In Guile,  Prev: Blocks In Guile,  Up: Guile API
@@ -5901,31 +6371,31 @@ File: gdb.info,  Node: Symbols In Guile,
 23.3.3.17 Guile representation of Symbols.
 ..........................................
 
-GDB represents every variable, function and type as an entry in a
-symbol table.  *Note Examining the Symbol Table: Symbols.  Guile
-represents these symbols in GDB with the `<gdb:symbol>' object.
+GDB represents every variable, function and type as an entry in a symbol
+table.  *Note Examining the Symbol Table: Symbols.  Guile represents
+these symbols in GDB with the '<gdb:symbol>' object.
 
-   The following symbol-related procedures are provided by the `(gdb)'
+   The following symbol-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: symbol? object
-     Return `#t' if OBJECT is an object of type `<gdb:symbol>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:symbol>'.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: symbol-valid? symbol
-     Return `#t' if the `<gdb:symbol>' object is valid, `#f' if not.  A
-     `<gdb:symbol>' object can become invalid if the symbol it refers
-     to does not exist in GDB any longer.  All other `<gdb:symbol>'
-     procedures will throw an exception if it is invalid at the time
-     the procedure is called.
+     Return '#t' if the '<gdb:symbol>' object is valid, '#f' if not.  A
+     '<gdb:symbol>' object can become invalid if the symbol it refers to
+     does not exist in GDB any longer.  All other '<gdb:symbol>'
+     procedures will throw an exception if it is invalid at the time the
+     procedure is called.
 
  -- Scheme Procedure: symbol-type symbol
-     Return the type of SYMBOL or `#f' if no type is recorded.  The
-     result is an object of type `<gdb:type>'.  *Note Types In Guile::.
+     Return the type of SYMBOL or '#f' if no type is recorded.  The
+     result is an object of type '<gdb:type>'.  *Note Types In Guile::.
 
  -- Scheme Procedure: symbol-symtab symbol
      Return the symbol table in which SYMBOL appears.  The result is an
-     object of type `<gdb:symtab>'.  *Note Symbol Tables In Guile::.
+     object of type '<gdb:symtab>'.  *Note Symbol Tables In Guile::.
 
  -- Scheme Procedure: symbol-line symbol
      Return the line number in the source code at which SYMBOL was
@@ -5940,35 +6410,35 @@ module:
 
  -- Scheme Procedure: symbol-print-name symbol
      Return the name of SYMBOL in a form suitable for output.  This is
-     either `name' or `linkage_name', depending on whether the user
+     either 'name' or 'linkage_name', depending on whether the user
      asked GDB to display demangled or mangled names.
 
  -- Scheme Procedure: symbol-addr-class symbol
      Return the address class of the symbol.  This classifies how to
      find the value of a symbol.  Each address class is a constant
-     defined in the `(gdb)' module and described later in this chapter.
+     defined in the '(gdb)' module and described later in this chapter.
 
  -- Scheme Procedure: symbol-needs-frame? symbol
-     Return `#t' if evaluating SYMBOL's value requires a frame (*note
-     Frames In Guile::) and `#f' otherwise.  Typically, local variables
+     Return '#t' if evaluating SYMBOL's value requires a frame (*note
+     Frames In Guile::) and '#f' otherwise.  Typically, local variables
      will require a frame, but other symbols will not.
 
  -- Scheme Procedure: symbol-argument? symbol
-     Return `#t' if SYMBOL is an argument of a function.  Otherwise
-     return `#f'.
+     Return '#t' if SYMBOL is an argument of a function.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: symbol-constant? symbol
-     Return `#t' if SYMBOL is a constant.  Otherwise return `#f'.
+     Return '#t' if SYMBOL is a constant.  Otherwise return '#f'.
 
  -- Scheme Procedure: symbol-function? symbol
-     Return `#t' if SYMBOL is a function or a method.  Otherwise return
-     `#f'.
+     Return '#t' if SYMBOL is a function or a method.  Otherwise return
+     '#f'.
 
  -- Scheme Procedure: symbol-variable? symbol
-     Return `#t' if SYMBOL is a variable.  Otherwise return `#f'.
+     Return '#t' if SYMBOL is a variable.  Otherwise return '#f'.
 
  -- Scheme Procedure: symbol-value symbol [#:frame frame]
-     Compute the value of SYMBOL, as a `<gdb:value>'.  For functions,
+     Compute the value of SYMBOL, as a '<gdb:value>'.  For functions,
      this computes the address of the function, cast to the appropriate
      type.  If the symbol requires a frame in order to compute its
      value, then FRAME must be given.  If FRAME is not given, or if
@@ -5980,112 +6450,112 @@ module:
      be restricted to the parameters defined in the optional domain and
      block arguments.
 
-     NAME is the name of the symbol.  It must be a string.  The
-     optional BLOCK argument restricts the search to symbols visible in
-     that BLOCK.  The BLOCK argument must be a `<gdb:block>' object.
-     If omitted, the block for the current frame is used.  The optional
+     NAME is the name of the symbol.  It must be a string.  The optional
+     BLOCK argument restricts the search to symbols visible in that
+     BLOCK.  The BLOCK argument must be a '<gdb:block>' object.  If
+     omitted, the block for the current frame is used.  The optional
      DOMAIN argument restricts the search to the domain type.  The
-     DOMAIN argument must be a domain constant defined in the `(gdb)'
+     DOMAIN argument must be a domain constant defined in the '(gdb)'
      module and described later in this chapter.
 
      The result is a list of two elements.  The first element is a
-     `<gdb:symbol>' object or `#f' if the symbol is not found.  If the
-     symbol is found, the second element is `#t' if the symbol is a
-     field of a method's object (e.g., `this' in C++), otherwise it is
-     `#f'.  If the symbol is not found, the second element is `#f'.
+     '<gdb:symbol>' object or '#f' if the symbol is not found.  If the
+     symbol is found, the second element is '#t' if the symbol is a
+     field of a method's object (e.g., 'this' in C++), otherwise it is
+     '#f'.  If the symbol is not found, the second element is '#f'.
 
  -- Scheme Procedure: lookup-global-symbol name [#:domain domain]
      This function searches for a global symbol by name.  The search
      scope can be restricted by the domain argument.
 
-     NAME is the name of the symbol.  It must be a string.  The
-     optional DOMAIN argument restricts the search to the domain type.
-     The DOMAIN argument must be a domain constant defined in the
-     `(gdb)' module and described later in this chapter.
+     NAME is the name of the symbol.  It must be a string.  The optional
+     DOMAIN argument restricts the search to the domain type.  The
+     DOMAIN argument must be a domain constant defined in the '(gdb)'
+     module and described later in this chapter.
 
-     The result is a `<gdb:symbol>' object or `#f' if the symbol is not
+     The result is a '<gdb:symbol>' object or '#f' if the symbol is not
      found.
 
-   The available domain categories in `<gdb:symbol>' are represented as
-constants in the `(gdb)' module:
+   The available domain categories in '<gdb:symbol>' are represented as
+constants in the '(gdb)' module:
 
-`SYMBOL_UNDEF_DOMAIN'
+'SYMBOL_UNDEF_DOMAIN'
      This is used when a domain has not been discovered or none of the
-     following domains apply.  This usually indicates an error either
-     in the symbol information or in GDB's handling of symbols.
+     following domains apply.  This usually indicates an error either in
+     the symbol information or in GDB's handling of symbols.
 
-`SYMBOL_VAR_DOMAIN'
+'SYMBOL_VAR_DOMAIN'
      This domain contains variables, function names, typedef names and
      enum type values.
 
-`SYMBOL_STRUCT_DOMAIN'
+'SYMBOL_STRUCT_DOMAIN'
      This domain holds struct, union and enum type names.
 
-`SYMBOL_LABEL_DOMAIN'
+'SYMBOL_LABEL_DOMAIN'
      This domain contains names of labels (for gotos).
 
-`SYMBOL_VARIABLES_DOMAIN'
-     This domain holds a subset of the `SYMBOLS_VAR_DOMAIN'; it
-     contains everything minus functions and types.
+'SYMBOL_VARIABLES_DOMAIN'
+     This domain holds a subset of the 'SYMBOLS_VAR_DOMAIN'; it contains
+     everything minus functions and types.
 
-`SYMBOL_FUNCTION_DOMAIN'
+'SYMBOL_FUNCTION_DOMAIN'
      This domain contains all functions.
 
-`SYMBOL_TYPES_DOMAIN'
+'SYMBOL_TYPES_DOMAIN'
      This domain contains all types.
 
-   The available address class categories in `<gdb:symbol>' are
-represented as constants in the `gdb' module:
+   The available address class categories in '<gdb:symbol>' are
+represented as constants in the 'gdb' module:
 
-`SYMBOL_LOC_UNDEF'
+'SYMBOL_LOC_UNDEF'
      If this is returned by address class, it indicates an error either
      in the symbol information or in GDB's handling of symbols.
 
-`SYMBOL_LOC_CONST'
+'SYMBOL_LOC_CONST'
      Value is constant int.
 
-`SYMBOL_LOC_STATIC'
+'SYMBOL_LOC_STATIC'
      Value is at a fixed address.
 
-`SYMBOL_LOC_REGISTER'
+'SYMBOL_LOC_REGISTER'
      Value is in a register.
 
-`SYMBOL_LOC_ARG'
+'SYMBOL_LOC_ARG'
      Value is an argument.  This value is at the offset stored within
      the symbol inside the frame's argument list.
 
-`SYMBOL_LOC_REF_ARG'
+'SYMBOL_LOC_REF_ARG'
      Value address is stored in the frame's argument list.  Just like
-     `LOC_ARG' except that the value's address is stored at the offset,
+     'LOC_ARG' except that the value's address is stored at the offset,
      not the value itself.
 
-`SYMBOL_LOC_REGPARM_ADDR'
-     Value is a specified register.  Just like `LOC_REGISTER' except
-     the register holds the address of the argument instead of the
-     argument itself.
+'SYMBOL_LOC_REGPARM_ADDR'
+     Value is a specified register.  Just like 'LOC_REGISTER' except the
+     register holds the address of the argument instead of the argument
+     itself.
 
-`SYMBOL_LOC_LOCAL'
+'SYMBOL_LOC_LOCAL'
      Value is a local variable.
 
-`SYMBOL_LOC_TYPEDEF'
-     Value not used.  Symbols in the domain `SYMBOL_STRUCT_DOMAIN' all
+'SYMBOL_LOC_TYPEDEF'
+     Value not used.  Symbols in the domain 'SYMBOL_STRUCT_DOMAIN' all
      have this class.
 
-`SYMBOL_LOC_BLOCK'
+'SYMBOL_LOC_BLOCK'
      Value is a block.
 
-`SYMBOL_LOC_CONST_BYTES'
+'SYMBOL_LOC_CONST_BYTES'
      Value is a byte-sequence.
 
-`SYMBOL_LOC_UNRESOLVED'
-     Value is at a fixed address, but the address of the variable has
-     to be determined from the minimal symbol table whenever the
-     variable is referenced.
+'SYMBOL_LOC_UNRESOLVED'
+     Value is at a fixed address, but the address of the variable has to
+     be determined from the minimal symbol table whenever the variable
+     is referenced.
 
-`SYMBOL_LOC_OPTIMIZED_OUT'
+'SYMBOL_LOC_OPTIMIZED_OUT'
      The value does not actually exist in the program.
 
-`SYMBOL_LOC_COMPUTED'
+'SYMBOL_LOC_COMPUTED'
      The value's address is a computed location.
 
 
@@ -6094,28 +6564,27 @@ File: gdb.info,  Node: Symbol Tables In 
 23.3.3.18 Symbol table representation in Guile.
 ...............................................
 
-Access to symbol table data maintained by GDB on the inferior is
-exposed to Guile via two objects: `<gdb:sal>' (symtab-and-line) and
-`<gdb:symtab>'.  Symbol table and line data for a frame is returned
-from the `frame-find-sal' `<gdb:frame>' procedure.  *Note Frames In
-Guile::.
+Access to symbol table data maintained by GDB on the inferior is exposed
+to Guile via two objects: '<gdb:sal>' (symtab-and-line) and
+'<gdb:symtab>'.  Symbol table and line data for a frame is returned from
+the 'frame-find-sal' '<gdb:frame>' procedure.  *Note Frames In Guile::.
 
    For more information on GDB's symbol table management, see *note
 Examining the Symbol Table: Symbols.
 
-   The following symtab-related procedures are provided by the `(gdb)'
+   The following symtab-related procedures are provided by the '(gdb)'
 module:
 
  -- Scheme Procedure: symtab? object
-     Return `#t' if OBJECT is an object of type `<gdb:symtab>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:symtab>'.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: symtab-valid? symtab
-     Return `#t' if the `<gdb:symtab>' object is valid, `#f' if not.  A
-     `<gdb:symtab>' object becomes invalid when the symbol table it
-     refers to no longer exists in GDB.  All other `<gdb:symtab>'
-     procedures will throw an exception if it is invalid at the time
-     the procedure is called.
+     Return '#t' if the '<gdb:symtab>' object is valid, '#f' if not.  A
+     '<gdb:symtab>' object becomes invalid when the symbol table it
+     refers to no longer exists in GDB.  All other '<gdb:symtab>'
+     procedures will throw an exception if it is invalid at the time the
+     procedure is called.
 
  -- Scheme Procedure: symtab-filename symtab
      Return the symbol table's source filename.
@@ -6136,20 +6605,20 @@ module:
      Blocks In Guile::.
 
    The following symtab-and-line-related procedures are provided by the
-`(gdb)' module:
+'(gdb)' module:
 
  -- Scheme Procedure: sal? object
-     Return `#t' if OBJECT is an object of type `<gdb:sal>'.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:sal>'.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: sal-valid? sal
-     Return `#t' if SAL is valid, `#f' if not.  A `<gdb:sal>' object
-     becomes invalid when the Symbol table object it refers to no
-     longer exists in GDB.  All other `<gdb:sal>' procedures will throw
-     an exception if it is invalid at the time the procedure is called.
+     Return '#t' if SAL is valid, '#f' if not.  A '<gdb:sal>' object
+     becomes invalid when the Symbol table object it refers to no longer
+     exists in GDB.  All other '<gdb:sal>' procedures will throw an
+     exception if it is invalid at the time the procedure is called.
 
  -- Scheme Procedure: sal-symtab sal
-     Return the symbol table object (`<gdb:symtab>') for SAL.
+     Return the symbol table object ('<gdb:symtab>') for SAL.
 
  -- Scheme Procedure: sal-line sal
      Return the line number for SAL.
@@ -6161,10 +6630,10 @@ module:
      Return the end of the address range occupied by code for SAL.
 
  -- Scheme Procedure: find-pc-line pc
-     Return the `<gdb:sal>' object corresponding to the PC value.  If
-     an invalid value of PC is passed as an argument, then the `symtab'
-     and `line' attributes of the returned `<gdb:sal>' object will be
-     `#f' and 0 respectively.
+     Return the '<gdb:sal>' object corresponding to the PC value.  If an
+     invalid value of PC is passed as an argument, then the 'symtab' and
+     'line' attributes of the returned '<gdb:sal>' object will be '#f'
+     and 0 respectively.
 
 
 File: gdb.info,  Node: Breakpoints In Guile,  Next: Lazy Strings In Guile,  Prev: Symbol Tables In Guile,  Up: Guile API
@@ -6173,93 +6642,92 @@ File: gdb.info,  Node: Breakpoints In Gu
 ..............................................
 
 Breakpoints in Guile are represented by objects of type
-`<gdb:breakpoint>'.  New breakpoints can be created with the
-`make-breakpoint' Guile function, and then added to GDB with the
-`register-breakpoint!' Guile function.  This two-step approach is taken
+'<gdb:breakpoint>'.  New breakpoints can be created with the
+'make-breakpoint' Guile function, and then added to GDB with the
+'register-breakpoint!' Guile function.  This two-step approach is taken
 to separate out the side-effect of adding the breakpoint to GDB from
-`make-breakpoint'.
+'make-breakpoint'.
 
    Support is also provided to view and manipulate breakpoints created
 outside of Guile.
 
    The following breakpoint-related procedures are provided by the
-`(gdb)' module:
+'(gdb)' module:
 
- -- Scheme Procedure: make-breakpoint location [#:type type]
-          [#:wp-class wp-class] [#:internal internal]
+ -- Scheme Procedure: make-breakpoint location [#:type type] [#:wp-class
+          wp-class] [#:internal internal]
      Create a new breakpoint at LOCATION, a string naming the location
-     of the breakpoint, or an expression that defines a watchpoint.
-     The contents can be any location recognized by the `break' command,
-     or in the case of a watchpoint, by the `watch' command.
-
-     The breakpoint is initially marked as `invalid'.  The breakpoint
-     is not usable until it has been registered with GDB with
-     `register-breakpoint!', at which point it becomes `valid'.  The
-     result is the `<gdb:breakpoint>' object representing the
+     of the breakpoint, or an expression that defines a watchpoint.  The
+     contents can be any location recognized by the 'break' command, or
+     in the case of a watchpoint, by the 'watch' command.
+
+     The breakpoint is initially marked as 'invalid'.  The breakpoint is
+     not usable until it has been registered with GDB with
+     'register-breakpoint!', at which point it becomes 'valid'.  The
+     result is the '<gdb:breakpoint>' object representing the
      breakpoint.
 
      The optional TYPE denotes the breakpoint to create.  This argument
-     can be either `BP_BREAKPOINT' or `BP_WATCHPOINT', and defaults to
-     `BP_BREAKPOINT'.
+     can be either 'BP_BREAKPOINT' or 'BP_WATCHPOINT', and defaults to
+     'BP_BREAKPOINT'.
 
      The optional WP-CLASS argument defines the class of watchpoint to
-     create, if TYPE is `BP_WATCHPOINT'.  If a watchpoint class is not
-     provided, it is assumed to be a `WP_WRITE' class.
+     create, if TYPE is 'BP_WATCHPOINT'.  If a watchpoint class is not
+     provided, it is assumed to be a 'WP_WRITE' class.
 
      The optional INTERNAL argument allows the breakpoint to become
      invisible to the user.  The breakpoint will neither be reported
-     when registered, nor will it be listed in the output from `info
-     breakpoints' (but will be listed with the `maint info breakpoints'
+     when registered, nor will it be listed in the output from 'info
+     breakpoints' (but will be listed with the 'maint info breakpoints'
      command).  If an internal flag is not provided, the breakpoint is
      visible (non-internal).
 
      When a watchpoint is created, GDB will try to create a hardware
      assisted watchpoint.  If successful, the type of the watchpoint is
-     changed from `BP_WATCHPOINT' to `BP_HARDWARE_WATCHPOINT' for
-     `WP_WRITE', `BP_READ_WATCHPOINT' for `WP_READ', and
-     `BP_ACCESS_WATCHPOINT' for `WP_ACCESS'.  If not successful, the
-     type of the watchpoint is left as `WP_WATCHPOINT'.
+     changed from 'BP_WATCHPOINT' to 'BP_HARDWARE_WATCHPOINT' for
+     'WP_WRITE', 'BP_READ_WATCHPOINT' for 'WP_READ', and
+     'BP_ACCESS_WATCHPOINT' for 'WP_ACCESS'.  If not successful, the
+     type of the watchpoint is left as 'WP_WATCHPOINT'.
 
      The available types are represented by constants defined in the
-     `gdb' module:
+     'gdb' module:
 
-    `BP_BREAKPOINT'
+     'BP_BREAKPOINT'
           Normal code breakpoint.
 
-    `BP_WATCHPOINT'
+     'BP_WATCHPOINT'
           Watchpoint breakpoint.
 
-    `BP_HARDWARE_WATCHPOINT'
+     'BP_HARDWARE_WATCHPOINT'
           Hardware assisted watchpoint.  This value cannot be specified
           when creating the breakpoint.
 
-    `BP_READ_WATCHPOINT'
+     'BP_READ_WATCHPOINT'
           Hardware assisted read watchpoint.  This value cannot be
           specified when creating the breakpoint.
 
-    `BP_ACCESS_WATCHPOINT'
+     'BP_ACCESS_WATCHPOINT'
           Hardware assisted access watchpoint.  This value cannot be
           specified when creating the breakpoint.
 
-     The available watchpoint types represented by constants are
-     defined in the `(gdb)' module:
+     The available watchpoint types represented by constants are defined
+     in the '(gdb)' module:
 
-    `WP_READ'
+     'WP_READ'
           Read only watchpoint.
 
-    `WP_WRITE'
+     'WP_WRITE'
           Write only watchpoint.
 
-    `WP_ACCESS'
+     'WP_ACCESS'
           Read/Write watchpoint.
 
-
  -- Scheme Procedure: register-breakpoint! breakpoint
-     Add BREAKPOINT, a `<gdb:breakpoint>' object, to GDB's list of
+     Add BREAKPOINT, a '<gdb:breakpoint>' object, to GDB's list of
      breakpoints.  The breakpoint must have been created with
-     `make-breakpoint'.  One cannot register breakpoints that have been
+     'make-breakpoint'.  One cannot register breakpoints that have been
      created outside of Guile.  Once a breakpoint is registered it
-     becomes `valid'.  It is an error to register an already registered
+     becomes 'valid'.  It is an error to register an already registered
      breakpoint.  The result is unspecified.
 
  -- Scheme Procedure: delete-breakpoint! breakpoint
@@ -6267,23 +6735,23 @@ outside of Guile.
      invalidates the Guile BREAKPOINT object.  Any further attempt to
      access the object will throw an exception.
 
-     If BREAKPOINT was created from Guile with `make-breakpoint' it may
+     If BREAKPOINT was created from Guile with 'make-breakpoint' it may
      be re-registered with GDB, in which case the breakpoint becomes
      valid again.
 
  -- Scheme Procedure: breakpoints
      Return a list of all breakpoints.  Each element of the list is a
-     `<gdb:breakpoint>' object.
+     '<gdb:breakpoint>' object.
 
  -- Scheme Procedure: breakpoint? object
-     Return `#t' if OBJECT is a `<gdb:breakpoint>' object, and `#f'
+     Return '#t' if OBJECT is a '<gdb:breakpoint>' object, and '#f'
      otherwise.
 
  -- Scheme Procedure: breakpoint-valid? breakpoint
-     Return `#t' if BREAKPOINT is valid, `#f' otherwise.  Breakpoints
-     created with `make-breakpoint' are marked as invalid until they
-     are registered with GDB with `register-breakpoint!'.  A
-     `<gdb:breakpoint>' object can become invalid if the user deletes
+     Return '#t' if BREAKPOINT is valid, '#f' otherwise.  Breakpoints
+     created with 'make-breakpoint' are marked as invalid until they are
+     registered with GDB with 'register-breakpoint!'.  A
+     '<gdb:breakpoint>' object can become invalid if the user deletes
      the breakpoint.  In this case, the object still exists, but the
      underlying breakpoint does not.  In the cases of watchpoint scope,
      the watchpoint remains valid even if execution of the inferior
@@ -6298,35 +6766,35 @@ outside of Guile.
      the actual breakpoint type or use-case.
 
  -- Scheme Procedure: breakpoint-visible? breakpoint
-     Return `#t' if the breakpoint is visible to the user when hit, or
-     when the `info breakpoints' command is run.  Otherwise return `#f'.
+     Return '#t' if the breakpoint is visible to the user when hit, or
+     when the 'info breakpoints' command is run.  Otherwise return '#f'.
 
  -- Scheme Procedure: breakpoint-location breakpoint
      Return the location of the breakpoint, as specified by the user.
      It is a string.  If the breakpoint does not have a location (that
-     is, it is a watchpoint) return `#f'.
+     is, it is a watchpoint) return '#f'.
 
  -- Scheme Procedure: breakpoint-expression breakpoint
      Return the breakpoint expression, as specified by the user.  It is
      a string.  If the breakpoint does not have an expression (the
-     breakpoint is not a watchpoint) return `#f'.
+     breakpoint is not a watchpoint) return '#f'.
 
  -- Scheme Procedure: breakpoint-enabled? breakpoint
-     Return `#t' if the breakpoint is enabled, and `#f' otherwise.
+     Return '#t' if the breakpoint is enabled, and '#f' otherwise.
 
  -- Scheme Procedure: set-breakpoint-enabled! breakpoint flag
-     Set the enabled state of BREAKPOINT to FLAG.  If flag is `#f' it
-     is disabled, otherwise it is enabled.
+     Set the enabled state of BREAKPOINT to FLAG.  If flag is '#f' it is
+     disabled, otherwise it is enabled.
 
  -- Scheme Procedure: breakpoint-silent? breakpoint
-     Return `#t' if the breakpoint is silent, and `#f' otherwise.
+     Return '#t' if the breakpoint is silent, and '#f' otherwise.
 
      Note that a breakpoint can also be silent if it has commands and
-     the first command is `silent'.  This is not reported by the
-     `silent' attribute.
+     the first command is 'silent'.  This is not reported by the
+     'silent' attribute.
 
  -- Scheme Procedure: set-breakpoint-silent! breakpoint flag
-     Set the silent state of BREAKPOINT to FLAG.  If flag is `#f' the
+     Set the silent state of BREAKPOINT to FLAG.  If flag is '#f' the
      breakpoint is made silent, otherwise it is made non-silent (or
      noisy).
 
@@ -6344,47 +6812,48 @@ outside of Guile.
      be zero.
 
  -- Scheme Procedure: breakpoint-thread breakpoint
-     Return the thread-id for thread-specific breakpoint BREAKPOINT.
-     Return #f if BREAKPOINT is not thread-specific.
+     Return the global-thread-id for thread-specific breakpoint
+     BREAKPOINT.  Return #f if BREAKPOINT is not thread-specific.
 
- -- Scheme Procedure: set-breakpoint-thread! breakpoint thread-id|#f
-     Set the thread-id for BREAKPOINT to THREAD-ID.  If set to `#f',
-     the breakpoint is no longer thread-specific.
+ -- Scheme Procedure: set-breakpoint-thread! breakpoint
+          global-thread-id|#f
+     Set the thread-id for BREAKPOINT to GLOBAL-THREAD-ID If set to
+     '#f', the breakpoint is no longer thread-specific.
 
  -- Scheme Procedure: breakpoint-task breakpoint
-     If the breakpoint is Ada task-specific, return the Ada task id.
-     If the breakpoint is not task-specific (or the underlying language
-     is not Ada), return `#f'.
+     If the breakpoint is Ada task-specific, return the Ada task id.  If
+     the breakpoint is not task-specific (or the underlying language is
+     not Ada), return '#f'.
 
  -- Scheme Procedure: set-breakpoint-task! breakpoint task
-     Set the Ada task of BREAKPOINT to TASK.  If set to `#f', the
+     Set the Ada task of BREAKPOINT to TASK.  If set to '#f', the
      breakpoint is no longer task-specific.
 
  -- Scheme Procedure: breakpoint-condition breakpoint
      Return the condition of BREAKPOINT, as specified by the user.  It
-     is a string.  If there is no condition, return `#f'.
+     is a string.  If there is no condition, return '#f'.
 
  -- Scheme Procedure: set-breakpoint-condition! breakpoint condition
      Set the condition of BREAKPOINT to CONDITION, which must be a
-     string.  If set to `#f' then the breakpoint becomes unconditional.
+     string.  If set to '#f' then the breakpoint becomes unconditional.
 
  -- Scheme Procedure: breakpoint-stop breakpoint
      Return the stop predicate of BREAKPOINT.  See
-     `set-breakpoint-stop!' below in this section.
+     'set-breakpoint-stop!' below in this section.
 
  -- Scheme Procedure: set-breakpoint-stop! breakpoint procedure|#f
      Set the stop predicate of BREAKPOINT.  The predicate PROCEDURE
-     takes one argument: the <gdb:breakpoint> object.  If this
-     predicate is set to a procedure then it is invoked whenever the
-     inferior reaches this breakpoint.  If it returns `#t', or any
-     non-`#f' value, then the inferior is stopped, otherwise the
-     inferior will continue.
+     takes one argument: the <gdb:breakpoint> object.  If this predicate
+     is set to a procedure then it is invoked whenever the inferior
+     reaches this breakpoint.  If it returns '#t', or any non-'#f'
+     value, then the inferior is stopped, otherwise the inferior will
+     continue.
 
      If there are multiple breakpoints at the same location with a
-     `stop' predicate, each one will be called regardless of the return
-     status of the previous.  This ensures that all `stop' predicates
-     have a chance to execute at that location.  In this scenario if
-     one of the methods returns `#t' but the others return `#f', the
+     'stop' predicate, each one will be called regardless of the return
+     status of the previous.  This ensures that all 'stop' predicates
+     have a chance to execute at that location.  In this scenario if one
+     of the methods returns '#t' but the others return '#f', the
      inferior will still be stopped.
 
      You should not alter the execution state of the inferior (i.e.,
@@ -6393,7 +6862,7 @@ outside of Guile.
      As a general rule, you should not alter any data within GDB or the
      inferior at this time.
 
-     Example `stop' implementation:
+     Example 'stop' implementation:
 
           (define (my-stop? bkpt)
             (let ((int-val (parse-and-eval "foo")))
@@ -6403,7 +6872,7 @@ outside of Guile.
           (set-breakpoint-stop! bkpt my-stop?)
 
  -- Scheme Procedure: breakpoint-commands breakpoint
-     Return the commands attached to BREAKPOINT as a string, or `#f' if
+     Return the commands attached to BREAKPOINT as a string, or '#f' if
      there are none.
 
 
@@ -6415,22 +6884,22 @@ File: gdb.info,  Node: Lazy Strings In G
 A "lazy string" is a string whose contents is not retrieved or encoded
 until it is needed.
 
-   A `<gdb:lazy-string>' is represented in GDB as an `address' that
-points to a region of memory, an `encoding' that will be used to encode
-that region of memory, and a `length' to delimit the region of memory
+   A '<gdb:lazy-string>' is represented in GDB as an 'address' that
+points to a region of memory, an 'encoding' that will be used to encode
+that region of memory, and a 'length' to delimit the region of memory
 that represents the string.  The difference between a
-`<gdb:lazy-string>' and a string wrapped within a `<gdb:value>' is that
-a `<gdb:lazy-string>' will be treated differently by GDB when printing.
-A `<gdb:lazy-string>' is retrieved and encoded during printing, while a
-`<gdb:value>' wrapping a string is immediately retrieved and encoded on
+'<gdb:lazy-string>' and a string wrapped within a '<gdb:value>' is that
+a '<gdb:lazy-string>' will be treated differently by GDB when printing.
+A '<gdb:lazy-string>' is retrieved and encoded during printing, while a
+'<gdb:value>' wrapping a string is immediately retrieved and encoded on
 creation.
 
    The following lazy-string-related procedures are provided by the
-`(gdb)' module:
+'(gdb)' module:
 
  -- Scheme Procedure: lazy-string? object
-     Return `#t' if OBJECT is an object of type `<gdb:lazy-string>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:lazy-string>'.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: lazy-string-address lazy-sring
      Return the address of LAZY-STRING.
@@ -6443,20 +6912,20 @@ creation.
  -- Scheme Procedure: lazy-string-encoding lazy-string
      Return the encoding that will be applied to LAZY-STRING when the
      string is printed by GDB.  If the encoding is not set, or contains
-     an empty string,  then GDB will select the most appropriate
-     encoding when the string is printed.
+     an empty string, then GDB will select the most appropriate encoding
+     when the string is printed.
 
  -- Scheme Procedure: lazy-string-type lazy-string
      Return the type that is represented by LAZY-STRING's type.  For a
-     lazy string this will always be a pointer type.  To resolve this
-     to the lazy string's character type, use `type-target-type'.
-     *Note Types In Guile::.
+     lazy string this will always be a pointer type.  To resolve this to
+     the lazy string's character type, use 'type-target-type'.  *Note
+     Types In Guile::.
 
  -- Scheme Procedure: lazy-string->value lazy-string
-     Convert the `<gdb:lazy-string>' to a `<gdb:value>'.  This value
+     Convert the '<gdb:lazy-string>' to a '<gdb:value>'.  This value
      will point to the string in memory, but will lose all the delayed
      retrieval, encoding and handling that GDB applies to a
-     `<gdb:lazy-string>'.
+     '<gdb:lazy-string>'.
 
 
 File: gdb.info,  Node: Architectures In Guile,  Next: Disassembly In Guile,  Prev: Lazy Strings In Guile,  Up: Guile API
@@ -6465,125 +6934,125 @@ File: gdb.info,  Node: Architectures In 
 ...............................................
 
 GDB uses architecture specific parameters and artifacts in a number of
-its various computations.  An architecture is represented by an
-instance of the `<gdb:arch>' class.
+its various computations.  An architecture is represented by an instance
+of the '<gdb:arch>' class.
 
    The following architecture-related procedures are provided by the
-`(gdb)' module:
+'(gdb)' module:
 
  -- Scheme Procedure: arch? object
-     Return `#t' if OBJECT is an object of type `<gdb:arch>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:arch>'.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: current-arch
-     Return the current architecture as a `<gdb:arch>' object.
+     Return the current architecture as a '<gdb:arch>' object.
 
  -- Scheme Procedure: arch-name arch
-     Return the name (string value) of `<gdb:arch>' ARCH.
+     Return the name (string value) of '<gdb:arch>' ARCH.
 
  -- Scheme Procedure: arch-charset arch
-     Return name of target character set of `<gdb:arch>' ARCH.
+     Return name of target character set of '<gdb:arch>' ARCH.
 
  -- Scheme Procedure: arch-wide-charset
-     Return name of target wide character set of `<gdb:arch>' ARCH.
+     Return name of target wide character set of '<gdb:arch>' ARCH.
 
-   Each architecture provides a set of predefined types, obtained by
-the following functions.
+   Each architecture provides a set of predefined types, obtained by the
+following functions.
 
  -- Scheme Procedure: arch-void-type arch
-     Return the `<gdb:type>' object for a `void' type of architecture
+     Return the '<gdb:type>' object for a 'void' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-char-type arch
-     Return the `<gdb:type>' object for a `char' type of architecture
+     Return the '<gdb:type>' object for a 'char' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-short-type arch
-     Return the `<gdb:type>' object for a `short' type of architecture
+     Return the '<gdb:type>' object for a 'short' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-int-type arch
-     Return the `<gdb:type>' object for an `int' type of architecture
+     Return the '<gdb:type>' object for an 'int' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-long-type arch
-     Return the `<gdb:type>' object for a `long' type of architecture
+     Return the '<gdb:type>' object for a 'long' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-schar-type arch
-     Return the `<gdb:type>' object for a `signed char' type of
+     Return the '<gdb:type>' object for a 'signed char' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-uchar-type arch
-     Return the `<gdb:type>' object for an `unsigned char' type of
+     Return the '<gdb:type>' object for an 'unsigned char' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-ushort-type arch
-     Return the `<gdb:type>' object for an `unsigned short' type of
+     Return the '<gdb:type>' object for an 'unsigned short' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-uint-type arch
-     Return the `<gdb:type>' object for an `unsigned int' type of
+     Return the '<gdb:type>' object for an 'unsigned int' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-ulong-type arch
-     Return the `<gdb:type>' object for an `unsigned long' type of
+     Return the '<gdb:type>' object for an 'unsigned long' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-float-type arch
-     Return the `<gdb:type>' object for a `float' type of architecture
+     Return the '<gdb:type>' object for a 'float' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-double-type arch
-     Return the `<gdb:type>' object for a `double' type of architecture
+     Return the '<gdb:type>' object for a 'double' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-longdouble-type arch
-     Return the `<gdb:type>' object for a `long double' type of
+     Return the '<gdb:type>' object for a 'long double' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-bool-type arch
-     Return the `<gdb:type>' object for a `bool' type of architecture
+     Return the '<gdb:type>' object for a 'bool' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-longlong-type arch
-     Return the `<gdb:type>' object for a `long long' type of
+     Return the '<gdb:type>' object for a 'long long' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-ulonglong-type arch
-     Return the `<gdb:type>' object for an `unsigned long long' type of
+     Return the '<gdb:type>' object for an 'unsigned long long' type of
      architecture ARCH.
 
  -- Scheme Procedure: arch-int8-type arch
-     Return the `<gdb:type>' object for an `int8' type of architecture
+     Return the '<gdb:type>' object for an 'int8' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-uint8-type arch
-     Return the `<gdb:type>' object for a `uint8' type of architecture
+     Return the '<gdb:type>' object for a 'uint8' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-int16-type arch
-     Return the `<gdb:type>' object for an `int16' type of architecture
+     Return the '<gdb:type>' object for an 'int16' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-uint16-type arch
-     Return the `<gdb:type>' object for a `uint16' type of architecture
+     Return the '<gdb:type>' object for a 'uint16' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-int32-type arch
-     Return the `<gdb:type>' object for an `int32' type of architecture
+     Return the '<gdb:type>' object for an 'int32' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-uint32-type arch
-     Return the `<gdb:type>' object for a `uint32' type of architecture
+     Return the '<gdb:type>' object for a 'uint32' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-int64-type arch
-     Return the `<gdb:type>' object for an `int64' type of architecture
+     Return the '<gdb:type>' object for an 'int64' type of architecture
      ARCH.
 
  -- Scheme Procedure: arch-uint64-type arch
-     Return the `<gdb:type>' object for a `uint64' type of architecture
+     Return the '<gdb:type>' object for a 'uint64' type of architecture
      ARCH.
 
    Example:
@@ -6598,8 +7067,8 @@ File: gdb.info,  Node: Disassembly In Gu
 ..............................
 
 The disassembler can be invoked from Scheme code.  Furthermore, the
-disassembler can take a Guile port as input, allowing one to
-disassemble from any source, and not just target memory.
+disassembler can take a Guile port as input, allowing one to disassemble
+from any source, and not just target memory.
 
  -- Scheme Procedure: arch-disassemble arch start-pc [#:port port]
           [#:offset offset] [#:size size] [#:count count]
@@ -6607,11 +7076,11 @@ disassemble from any source, and not jus
      address START-PC.
 
      The optional argument PORT specifies the input port to read bytes
-     from.  If PORT is `#f' then bytes are read from target memory.
+     from.  If PORT is '#f' then bytes are read from target memory.
 
      The optional argument OFFSET specifies the address offset of the
      first byte in PORT.  This is useful, for example, when PORT
-     specifies a `bytevector' and you want the bytevector to be
+     specifies a 'bytevector' and you want the bytevector to be
      disassembled as if it came from that address.  The START-PC passed
      to the reader for PORT is offset by the same amount.
 
@@ -6630,35 +7099,34 @@ disassemble from any source, and not jus
      specified as zero, then no instructions are disassembled and an
      empty list is returned.  If both the optional arguments SIZE and
      COUNT are specified, then a list of at most COUNT disassembled
-     instructions whose start address falls in the closed memory
-     address interval from START-PC to (START-PC + SIZE - 1) are
-     returned.  If SIZE is not specified, but COUNT is specified, then
-     COUNT number of instructions starting from the address START-PC
-     are returned.  If COUNT is not specified but SIZE is specified,
-     then all instructions whose start address falls in the closed
-     memory address interval from START-PC to (START-PC + SIZE - 1) are
-     returned.  If neither SIZE nor COUNT are specified, then a single
-     instruction at START-PC is returned.
+     instructions whose start address falls in the closed memory address
+     interval from START-PC to (START-PC + SIZE - 1) are returned.  If
+     SIZE is not specified, but COUNT is specified, then COUNT number of
+     instructions starting from the address START-PC are returned.  If
+     COUNT is not specified but SIZE is specified, then all instructions
+     whose start address falls in the closed memory address interval
+     from START-PC to (START-PC + SIZE - 1) are returned.  If neither
+     SIZE nor COUNT are specified, then a single instruction at START-PC
+     is returned.
 
      Each element of the returned list is an alist (associative list)
      with the following keys:
 
-    `address'
+     'address'
           The value corresponding to this key is a Guile integer of the
           memory address of the instruction.
 
-    `asm'
+     'asm'
           The value corresponding to this key is a string value which
           represents the instruction with assembly language mnemonics.
           The assembly language flavor used is the same as that
-          specified by the current CLI variable `disassembly-flavor'.
+          specified by the current CLI variable 'disassembly-flavor'.
           *Note Machine Code::.
 
-    `length'
+     'length'
           The value corresponding to this key is the length of the
           instruction in bytes.
 
-
 
 File: gdb.info,  Node: I/O Ports in Guile,  Next: Memory Ports in Guile,  Prev: Disassembly In Guile,  Up: Guile API
 
@@ -6675,7 +7143,7 @@ File: gdb.info,  Node: I/O Ports in Guil
      Return GDB's error port as a Guile port object.
 
  -- Scheme Procedure: stdio-port? object
-     Return `#t' if OBJECT is a GDB stdio port.  Otherwise return `#f'.
+     Return '#t' if OBJECT is a GDB stdio port.  Otherwise return '#f'.
 
 
 File: gdb.info,  Node: Memory Ports in Guile,  Next: Iterators In Guile,  Prev: I/O Ports in Guile,  Up: Guile API
@@ -6683,57 +7151,57 @@ File: gdb.info,  Node: Memory Ports in G
 23.3.3.24 Memory Ports in Guile
 ...............................
 
-GDB provides a `port' interface to target memory.  This allows Guile
+GDB provides a 'port' interface to target memory.  This allows Guile
 code to read/write target memory using Guile's port and bytevector
-functionality.  The main routine is `open-memory' which returns a port
+functionality.  The main routine is 'open-memory' which returns a port
 object.  One can then read/write memory using that object.
 
  -- Scheme Procedure: open-memory [#:mode mode] [#:start address]
           [#:size size]
      Return a port object that can be used for reading and writing
      memory.  The port will be open according to MODE, which is the
-     standard mode argument to Guile port open routines, except that
-     the `"a"' and `"l"' modes are not supported.  *Note File Ports:
-     (guile)File Ports.  The `"b"' (binary) character may be present,
-     but is ignored: memory ports are binary only.  If `"0"' is
-     appended then the port is marked as unbuffered.  The default is
-     `"r"', read-only and buffered.
+     standard mode argument to Guile port open routines, except that the
+     '"a"' and '"l"' modes are not supported.  *Note (guile)File
+     Ports::.  The '"b"' (binary) character may be present, but is
+     ignored: memory ports are binary only.  If '"0"' is appended then
+     the port is marked as unbuffered.  The default is '"r"', read-only
+     and buffered.
 
      The chunk of memory that can be accessed can be bounded.  If both
      START and SIZE are unspecified, all of memory can be accessed.  If
      only START is specified, all of memory from that point on can be
      accessed.  If only SIZE if specified, all memory in the range
-     [0,SIZE) can be accessed.  If both are specified, all memory in
-     the rane [START,START+SIZE) can be accessed.
+     [0,SIZE) can be accessed.  If both are specified, all memory in the
+     rane [START,START+SIZE) can be accessed.
 
  -- Scheme Procedure: memory-port?
-     Return `#t' if OBJECT is an object of type `<gdb:memory-port>'.
-     Otherwise return `#f'.
+     Return '#t' if OBJECT is an object of type '<gdb:memory-port>'.
+     Otherwise return '#f'.
 
  -- Scheme Procedure: memory-port-range memory-port
-     Return the range of `<gdb:memory-port>' MEMORY-PORT as a list of
-     two elements: `(start end)'.  The range is START to END inclusive.
+     Return the range of '<gdb:memory-port>' MEMORY-PORT as a list of
+     two elements: '(start end)'.  The range is START to END inclusive.
 
  -- Scheme Procedure: memory-port-read-buffer-size memory-port
-     Return the size of the read buffer of `<gdb:memory-port>'
+     Return the size of the read buffer of '<gdb:memory-port>'
      MEMORY-PORT.
 
  -- Scheme Procedure: set-memory-port-read-buffer-size! memory-port size
-     Set the size of the read buffer of `<gdb:memory-port>' MEMORY-PORT
+     Set the size of the read buffer of '<gdb:memory-port>' MEMORY-PORT
      to SIZE.  The result is unspecified.
 
  -- Scheme Procedure: memory-port-write-buffer-size memory-port
-     Return the size of the write buffer of `<gdb:memory-port>'
+     Return the size of the write buffer of '<gdb:memory-port>'
      MEMORY-PORT.
 
  -- Scheme Procedure: set-memory-port-write-buffer-size! memory-port
           size
-     Set the size of the write buffer of `<gdb:memory-port>'
-     MEMORY-PORT to SIZE.  The result is unspecified.
+     Set the size of the write buffer of '<gdb:memory-port>' MEMORY-PORT
+     to SIZE.  The result is unspecified.
 
-   A memory port is closed like any other port, with `close-port'.
+   A memory port is closed like any other port, with 'close-port'.
 
-   Combined with Guile's `bytevectors', memory ports provide a lot of
+   Combined with Guile's 'bytevectors', memory ports provide a lot of
 utility.  For example, to fill a buffer of 10 integers in memory, one
 can do something like the following.
 
@@ -6759,22 +7227,22 @@ File: gdb.info,  Node: Iterators In Guil
 ............................
 
 A simple iterator facility is provided to allow, for example, iterating
-over the set of program symbols without having to first construct a
-list of all of them.  A useful contribution would be to add support for
-SRFI 41 and SRFI 45.
+over the set of program symbols without having to first construct a list
+of all of them.  A useful contribution would be to add support for SRFI
+41 and SRFI 45.
 
  -- Scheme Procedure: make-iterator object progress next!
-     A `<gdb:iterator>' object is constructed with the `make-iterator'
+     A '<gdb:iterator>' object is constructed with the 'make-iterator'
      procedure.  It takes three arguments: the object to be iterated
      over, an object to record the progress of the iteration, and a
      procedure to return the next element in the iteration, or an
      implementation chosen value to denote the end of iteration.
 
      By convention, end of iteration is marked with
-     `(end-of-iteration)', and may be tested with the
-     `end-of-iteration?' predicate.  The result of `(end-of-iteration)'
-     is chosen so that it is not otherwise used by the `(gdb)' module.
-     If you are using `<gdb:iterator>' in your own code it is your
+     '(end-of-iteration)', and may be tested with the
+     'end-of-iteration?' predicate.  The result of '(end-of-iteration)'
+     is chosen so that it is not otherwise used by the '(gdb)' module.
+     If you are using '<gdb:iterator>' in your own code it is your
      responsibility to maintain this invariant.
 
      A trivial example for illustration's sake:
@@ -6791,8 +7259,8 @@ SRFI 41 and SRFI 45.
                                      (set-iterator-progress! iter (cdr l))
                                      (car l)))))))
 
-     Here is a slightly more realistic example, which computes a list
-     of all the functions in `my-global-block'.
+     Here is a slightly more realistic example, which computes a list of
+     all the functions in 'my-global-block'.
 
           (use-modules (gdb iterator))
           (define this-sal (find-pc-line (frame-pc (selected-frame))))
@@ -6802,12 +7270,12 @@ SRFI 41 and SRFI 45.
           (define functions (iterator-filter symbol-function? syms-iter))
 
  -- Scheme Procedure: iterator? object
-     Return `#t' if OBJECT is a `<gdb:iterator>' object.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is a '<gdb:iterator>' object.  Otherwise
+     return '#f'.
 
  -- Scheme Procedure: iterator-object iterator
-     Return the first argument that was passed to `make-iterator'.
-     This is the object being iterated over.
+     Return the first argument that was passed to 'make-iterator'.  This
+     is the object being iterated over.
 
  -- Scheme Procedure: iterator-progress iterator
      Return the object tracking iteration progress.
@@ -6817,23 +7285,23 @@ SRFI 41 and SRFI 45.
 
  -- Scheme Procedure: iterator-next! iterator
      Invoke the procedure that was the third argument to
-     `make-iterator', passing it one argument, the `<gdb:iterator>'
-     object.  The result is either the next element in the iteration,
-     or an end marker as implemented by the `next!' procedure.  By
-     convention the end marker is the result of `(end-of-iteration)'.
+     'make-iterator', passing it one argument, the '<gdb:iterator>'
+     object.  The result is either the next element in the iteration, or
+     an end marker as implemented by the 'next!' procedure.  By
+     convention the end marker is the result of '(end-of-iteration)'.
 
  -- Scheme Procedure: end-of-iteration
      Return the Scheme object that denotes end of iteration.
 
  -- Scheme Procedure: end-of-iteration? object
-     Return `#t' if OBJECT is the end of iteration marker.  Otherwise
-     return `#f'.
+     Return '#t' if OBJECT is the end of iteration marker.  Otherwise
+     return '#f'.
 
-   These functions are provided by the `(gdb iterator)' module to
-assist in using iterators.
+   These functions are provided by the '(gdb iterator)' module to assist
+in using iterators.
 
  -- Scheme Procedure: make-list-iterator list
-     Return a `<gdb:iterator>' object that will iterate over LIST.
+     Return a '<gdb:iterator>' object that will iterate over LIST.
 
  -- Scheme Procedure: iterator->list iterator
      Return the elements pointed to by ITERATOR as a list.
@@ -6851,8 +7319,8 @@ assist in using iterators.
      PRED.
 
  -- Scheme Procedure: iterator-until pred iterator
-     Run ITERATOR until the result of `(pred element)' is true and
-     return that as the result.  Otherwise return `#f'.
+     Run ITERATOR until the result of '(pred element)' is true and
+     return that as the result.  Otherwise return '#f'.
 
 
 File: gdb.info,  Node: Guile Auto-loading,  Next: Guile Modules,  Prev: Guile API,  Up: Guile
@@ -6860,10 +7328,10 @@ File: gdb.info,  Node: Guile Auto-loadin
 23.3.4 Guile Auto-loading
 -------------------------
 
-When a new object file is read (for example, due to the `file' command,
+When a new object file is read (for example, due to the 'file' command,
 or because the inferior has loaded a shared library), GDB will look for
-Guile support scripts in two ways: `OBJFILE-gdb.scm' and the
-`.debug_gdb_scripts' section.  *Note Auto-loading extensions::.
+Guile support scripts in two ways: 'OBJFILE-gdb.scm' and the
+'.debug_gdb_scripts' section.  *Note Auto-loading extensions::.
 
    The auto-loading feature is useful for supplying application-specific
 debugging commands and scripts.
@@ -6871,17 +7339,17 @@ debugging commands and scripts.
    Auto-loading can be enabled or disabled, and the list of auto-loaded
 scripts can be printed.
 
-`set auto-load guile-scripts [on|off]'
+'set auto-load guile-scripts [on|off]'
      Enable or disable the auto-loading of Guile scripts.
 
-`show auto-load guile-scripts'
+'show auto-load guile-scripts'
      Show whether auto-loading of Guile scripts is enabled or disabled.
 
-`info auto-load guile-scripts [REGEXP]'
+'info auto-load guile-scripts [REGEXP]'
      Print the list of all Guile scripts that GDB auto-loaded.
 
      Also printed is the list of Guile scripts that were mentioned in
-     the `.debug_gdb_scripts' section and were not found.  This is
+     the '.debug_gdb_scripts' section and were not found.  This is
      useful because their names are not printed when GDB tries to load
      them and fails.  There may be many of them, and printing an error
      message for each one is problematic.
@@ -6898,674 +7366,7 @@ scripts can be printed.
           No     my-foo-pretty-printers.scm
 
    When reading an auto-loaded file, GDB sets the "current objfile".
-This is available via the `current-objfile' procedure (*note Objfiles
-In Guile::).  This can be useful for registering objfile-specific
+This is available via the 'current-objfile' procedure (*note Objfiles In
+Guile::).  This can be useful for registering objfile-specific
 pretty-printers.
 
-
-File: gdb.info,  Node: Guile Modules,  Prev: Guile Auto-loading,  Up: Guile
-
-23.3.5 Guile Modules
---------------------
-
-GDB comes with several modules to assist writing Guile code.
-
-* Menu:
-
-* Guile Printing Module::  Building and registering pretty-printers
-* Guile Types Module::     Utilities for working with types
-
-
-File: gdb.info,  Node: Guile Printing Module,  Next: Guile Types Module,  Up: Guile Modules
-
-23.3.5.1 Guile Printing Module
-..............................
-
-This module provides a collection of utilities for working with
-pretty-printers.
-
-   Usage:
-
-     (use-modules (gdb printing))
-
- -- Scheme Procedure: prepend-pretty-printer! object printer
-     Add PRINTER to the front of the list of pretty-printers for
-     OBJECT.  The OBJECT must either be a `<gdb:objfile>' object, or
-     `#f' in which case PRINTER is added to the global list of printers.
-
- -- Scheme Procecure: append-pretty-printer! object printer
-     Add PRINTER to the end of the list of pretty-printers for OBJECT.
-     The OBJECT must either be a `<gdb:objfile>' object, or `#f' in
-     which case PRINTER is added to the global list of printers.
-
-
-File: gdb.info,  Node: Guile Types Module,  Prev: Guile Printing Module,  Up: Guile Modules
-
-23.3.5.2 Guile Types Module
-...........................
-
-This module provides a collection of utilities for working with
-`<gdb:type>' objects.
-
-   Usage:
-
-     (use-modules (gdb types))
-
- -- Scheme Procedure: get-basic-type type
-     Return TYPE with const and volatile qualifiers stripped, and with
-     typedefs and C++ references converted to the underlying type.
-
-     C++ example:
-
-          typedef const int const_int;
-          const_int foo (3);
-          const_int& foo_ref (foo);
-          int main () { return 0; }
-
-     Then in gdb:
-
-          (gdb) start
-          (gdb) guile (use-modules (gdb) (gdb types))
-          (gdb) guile (define foo-ref (parse-and-eval "foo_ref"))
-          (gdb) guile (get-basic-type (value-type foo-ref))
-          int
-
- -- Scheme Procedure: type-has-field-deep? type field
-     Return `#t' if TYPE, assumed to be a type with fields (e.g., a
-     structure or union), has field FIELD.  Otherwise return `#f'.
-     This searches baseclasses, whereas `type-has-field?' does not.
-
- -- Scheme Procedure: make-enum-hashtable enum-type
-     Return a Guile hash table produced from ENUM-TYPE.  Elements in
-     the hash table are referenced with `hashq-ref'.
-
-
-File: gdb.info,  Node: Auto-loading extensions,  Next: Multiple Extension Languages,  Prev: Guile,  Up: Extending GDB
-
-23.4 Auto-loading extensions
-============================
-
-GDB provides two mechanisms for automatically loading extensions when a
-new object file is read (for example, due to the `file' command, or
-because the inferior has loaded a shared library): `OBJFILE-gdb.EXT'
-and the `.debug_gdb_scripts' section of modern file formats like ELF.
-
-* Menu:
-
-* objfile-gdb.ext file: objfile-gdbdotext file.  The `OBJFILE-gdb.EXT' file
-* .debug_gdb_scripts section: dotdebug_gdb_scripts section.  The `.debug_gdb_scripts' section
-* Which flavor to choose?::
-
-   The auto-loading feature is useful for supplying application-specific
-debugging commands and features.
-
-   Auto-loading can be enabled or disabled, and the list of auto-loaded
-scripts can be printed.  See the `auto-loading' section of each
-extension language for more information.  For GDB command files see
-*note Auto-loading sequences::.  For Python files see *note Python
-Auto-loading::.
-
-   Note that loading of this script file also requires accordingly
-configured `auto-load safe-path' (*note Auto-loading safe path::).
-
-
-File: gdb.info,  Node: objfile-gdbdotext file,  Next: dotdebug_gdb_scripts section,  Up: Auto-loading extensions
-
-23.4.1 The `OBJFILE-gdb.EXT' file
----------------------------------
-
-When a new object file is read, GDB looks for a file named
-`OBJFILE-gdb.EXT' (we call it SCRIPT-NAME below), where OBJFILE is the
-object file's name and where EXT is the file extension for the
-extension language:
-
-``OBJFILE-gdb.gdb''
-     GDB's own command language
-
-``OBJFILE-gdb.py''
-     Python
-
-``OBJFILE-gdb.scm''
-     Guile
-
-   SCRIPT-NAME is formed by ensuring that the file name of OBJFILE is
-absolute, following all symlinks, and resolving `.' and `..'
-components, and appending the `-gdb.EXT' suffix.  If this file exists
-and is readable, GDB will evaluate it as a script in the specified
-extension language.
-
-   If this file does not exist, then GDB will look for SCRIPT-NAME file
-in all of the directories as specified below.
-
-   Note that loading of these files requires an accordingly configured
-`auto-load safe-path' (*note Auto-loading safe path::).
-
-   For object files using `.exe' suffix GDB tries to load first the
-scripts normally according to its `.exe' filename.  But if no scripts
-are found GDB also tries script filenames matching the object file
-without its `.exe' suffix.  This `.exe' stripping is case insensitive
-and it is attempted on any platform.  This makes the script filenames
-compatible between Unix and MS-Windows hosts.
-
-`set auto-load scripts-directory [DIRECTORIES]'
-     Control GDB auto-loaded scripts location.  Multiple directory
-     entries may be delimited by the host platform path separator in use
-     (`:' on Unix, `;' on MS-Windows and MS-DOS).
-
-     Each entry here needs to be covered also by the security setting
-     `set auto-load safe-path' (*note set auto-load safe-path::).
-
-     This variable defaults to `$debugdir:$datadir/auto-load'.  The
-     default `set auto-load safe-path' value can be also overriden by
-     GDB configuration option `--with-auto-load-dir'.
-
-     Any reference to `$debugdir' will get replaced by
-     DEBUG-FILE-DIRECTORY value (*note Separate Debug Files::) and any
-     reference to `$datadir' will get replaced by DATA-DIRECTORY which
-     is determined at GDB startup (*note Data Files::).  `$debugdir' and
-     `$datadir' must be placed as a directory component -- either alone
-     or delimited by `/' or `\' directory separators, depending on the
-     host platform.
-
-     The list of directories uses path separator (`:' on GNU and Unix
-     systems, `;' on MS-Windows and MS-DOS) to separate directories,
-     similarly to the `PATH' environment variable.
-
-`show auto-load scripts-directory'
-     Show GDB auto-loaded scripts location.
-
-`add-auto-load-scripts-directory [DIRECTORIES...]'
-     Add an entry (or list of entries) to the list of auto-loaded
-     scripts locations.  Multiple entries may be delimited by the host
-     platform path separator in use.
-
-   GDB does not track which files it has already auto-loaded this way.
-GDB will load the associated script every time the corresponding
-OBJFILE is opened.  So your `-gdb.EXT' file should be careful to avoid
-errors if it is evaluated more than once.
-
-
-File: gdb.info,  Node: dotdebug_gdb_scripts section,  Next: Which flavor to choose?,  Prev: objfile-gdbdotext file,  Up: Auto-loading extensions
-
-23.4.2 The `.debug_gdb_scripts' section
----------------------------------------
-
-For systems using file formats like ELF and COFF, when GDB loads a new
-object file it will look for a special section named
-`.debug_gdb_scripts'.  If this section exists, its contents is a list
-of null-terminated entries specifying scripts to load.  Each entry
-begins with a non-null prefix byte that specifies the kind of entry,
-typically the extension language and whether the script is in a file or
-inlined in `.debug_gdb_scripts'.
-
-   The following entries are supported:
-
-`SECTION_SCRIPT_ID_PYTHON_FILE = 1'
-
-`SECTION_SCRIPT_ID_SCHEME_FILE = 3'
-
-`SECTION_SCRIPT_ID_PYTHON_TEXT = 4'
-
-`SECTION_SCRIPT_ID_SCHEME_TEXT = 6'
-
-23.4.2.1 Script File Entries
-............................
-
-If the entry specifies a file, GDB will look for the file first in the
-current directory and then along the source search path (*note
-Specifying Source Directories: Source Path.), except that `$cdir' is
-not searched, since the compilation directory is not relevant to
-scripts.
-
-   File entries can be placed in section `.debug_gdb_scripts' with, for
-example, this GCC macro for Python scripts.
-
-     /* Note: The "MS" section flags are to remove duplicates.  */
-     #define DEFINE_GDB_PY_SCRIPT(script_name) \
-       asm("\
-     .pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n\
-     .byte 1 /* Python */\n\
-     .asciz \"" script_name "\"\n\
-     .popsection \n\
-     ");
-
-For Guile scripts, replace `.byte 1' with `.byte 3'.  Then one can
-reference the macro in a header or source file like this:
-
-     DEFINE_GDB_PY_SCRIPT ("my-app-scripts.py")
-
-   The script name may include directories if desired.
-
-   Note that loading of this script file also requires accordingly
-configured `auto-load safe-path' (*note Auto-loading safe path::).
-
-   If the macro invocation is put in a header, any application or
-library using this header will get a reference to the specified script,
-and with the use of `"MS"' attributes on the section, the linker will
-remove duplicates.
-
-23.4.2.2 Script Text Entries
-............................
-
-Script text entries allow to put the executable script in the entry
-itself instead of loading it from a file.  The first line of the entry,
-everything after the prefix byte and up to the first newline (`0xa')
-character, is the script name, and must not contain any kind of space
-character, e.g., spaces or tabs.  The rest of the entry, up to the
-trailing null byte, is the script to execute in the specified language.
-The name needs to be unique among all script names, as GDB executes
-each script only once based on its name.
-
-   Here is an example from file `py-section-script.c' in the GDB
-testsuite.
-
-     #include "symcat.h"
-     #include "gdb/section-scripts.h"
-     asm(
-     ".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n"
-     ".byte " XSTRING (SECTION_SCRIPT_ID_PYTHON_TEXT) "\n"
-     ".ascii \"gdb.inlined-script\\n\"\n"
-     ".ascii \"class test_cmd (gdb.Command):\\n\"\n"
-     ".ascii \"  def __init__ (self):\\n\"\n"
-     ".ascii \"    super (test_cmd, self).__init__ ("
-         "\\\"test-cmd\\\", gdb.COMMAND_OBSCURE)\\n\"\n"
-     ".ascii \"  def invoke (self, arg, from_tty):\\n\"\n"
-     ".ascii \"    print (\\\"test-cmd output, arg = %s\\\" % arg)\\n\"\n"
-     ".ascii \"test_cmd ()\\n\"\n"
-     ".byte 0\n"
-     ".popsection\n"
-     );
-
-   Loading of inlined scripts requires a properly configured `auto-load
-safe-path' (*note Auto-loading safe path::).  The path to specify in
-`auto-load safe-path' is the path of the file containing the
-`.debug_gdb_scripts' section.
-
-
-File: gdb.info,  Node: Which flavor to choose?,  Prev: dotdebug_gdb_scripts section,  Up: Auto-loading extensions
-
-23.4.3 Which flavor to choose?
-------------------------------
-
-Given the multiple ways of auto-loading extensions, it might not always
-be clear which one to choose.  This section provides some guidance.
-
-Benefits of the `-gdb.EXT' way:
-
-   * Can be used with file formats that don't support multiple sections.
-
-   * Ease of finding scripts for public libraries.
-
-     Scripts specified in the `.debug_gdb_scripts' section are searched
-     for in the source search path.  For publicly installed libraries,
-     e.g., `libstdc++', there typically isn't a source directory in
-     which to find the script.
-
-   * Doesn't require source code additions.
-
-Benefits of the `.debug_gdb_scripts' way:
-
-   * Works with static linking.
-
-     Scripts for libraries done the `-gdb.EXT' way require an objfile to
-     trigger their loading.  When an application is statically linked
-     the only objfile available is the executable, and it is cumbersome
-     to attach all the scripts from all the input libraries to the
-     executable's `-gdb.EXT' script.
-
-   * Works with classes that are entirely inlined.
-
-     Some classes can be entirely inlined, and thus there may not be an
-     associated shared library to attach a `-gdb.EXT' script to.
-
-   * Scripts needn't be copied out of the source tree.
-
-     In some circumstances, apps can be built out of large collections
-     of internal libraries, and the build infrastructure necessary to
-     install the `-gdb.EXT' scripts in a place where GDB can find them
-     is cumbersome.  It may be easier to specify the scripts in the
-     `.debug_gdb_scripts' section as relative paths, and add a path to
-     the top of the source tree to the source search path.
-
-
-File: gdb.info,  Node: Multiple Extension Languages,  Next: Aliases,  Prev: Auto-loading extensions,  Up: Extending GDB
-
-23.5 Multiple Extension Languages
-=================================
-
-The Guile and Python extension languages do not share any state, and
-generally do not interfere with each other.  There are some things to
-be aware of, however.
-
-23.5.1 Python comes first
--------------------------
-
-Python was GDB's first extension language, and to avoid breaking
-existing behaviour Python comes first.  This is generally solved by the
-"first one wins" principle.  GDB maintains a list of enabled extension
-languages, and when it makes a call to an extension language, (say to
-pretty-print a value), it tries each in turn until an extension
-language indicates it has performed the request (e.g., has returned the
-pretty-printed form of a value).  This extends to errors while
-performing such requests: If an error happens while, for example,
-trying to pretty-print an object then the error is reported and any
-following extension languages are not tried.
-
-
-File: gdb.info,  Node: Aliases,  Prev: Multiple Extension Languages,  Up: Extending GDB
-
-23.6 Creating new spellings of existing commands
-================================================
-
-It is often useful to define alternate spellings of existing commands.
-For example, if a new GDB command defined in Python has a long name to
-type, it is handy to have an abbreviated version of it that involves
-less typing.
-
-   GDB itself uses aliases.  For example `s' is an alias of the `step'
-command even though it is otherwise an ambiguous abbreviation of other
-commands like `set' and `show'.
-
-   Aliases are also used to provide shortened or more common versions
-of multi-word commands.  For example, GDB provides the `tty' alias of
-the `set inferior-tty' command.
-
-   You can define a new alias with the `alias' command.
-
-`alias [-a] [--] ALIAS = COMMAND'
-
-   ALIAS specifies the name of the new alias.  Each word of ALIAS must
-consist of letters, numbers, dashes and underscores.
-
-   COMMAND specifies the name of an existing command that is being
-aliased.
-
-   The `-a' option specifies that the new alias is an abbreviation of
-the command.  Abbreviations are not shown in command lists displayed by
-the `help' command.
-
-   The `--' option specifies the end of options, and is useful when
-ALIAS begins with a dash.
-
-   Here is a simple example showing how to make an abbreviation of a
-command so that there is less to type.  Suppose you were tired of
-typing `disas', the current shortest unambiguous abbreviation of the
-`disassemble' command and you wanted an even shorter version named `di'.
-The following will accomplish this.
-
-     (gdb) alias -a di = disas
-
-   Note that aliases are different from user-defined commands.  With a
-user-defined command, you also need to write documentation for it with
-the `document' command.  An alias automatically picks up the
-documentation of the existing command.
-
-   Here is an example where we make `elms' an abbreviation of
-`elements' in the `set print elements' command.  This is to show that
-you can make an abbreviation of any part of a command.
-
-     (gdb) alias -a set print elms = set print elements
-     (gdb) alias -a show print elms = show print elements
-     (gdb) set p elms 20
-     (gdb) show p elms
-     Limit on string chars or array elements to print is 200.
-
-   Note that if you are defining an alias of a `set' command, and you
-want to have an alias for the corresponding `show' command, then you
-need to define the latter separately.
-
-   Unambiguously abbreviated commands are allowed in COMMAND and ALIAS,
-just as they are normally.
-
-     (gdb) alias -a set pr elms = set p ele
-
-   Finally, here is an example showing the creation of a one word alias
-for a more complex command.  This creates alias `spe' of the command
-`set print elements'.
-
-     (gdb) alias spe = set print elements
-     (gdb) spe 20
-
-
-File: gdb.info,  Node: Interpreters,  Next: TUI,  Prev: Extending GDB,  Up: Top
-
-24 Command Interpreters
-***********************
-
-GDB supports multiple command interpreters, and some command
-infrastructure to allow users or user interface writers to switch
-between interpreters or run commands in other interpreters.
-
-   GDB currently supports two command interpreters, the console
-interpreter (sometimes called the command-line interpreter or CLI) and
-the machine interface interpreter (or GDB/MI).  This manual describes
-both of these interfaces in great detail.
-
-   By default, GDB will start with the console interpreter.  However,
-the user may choose to start GDB with another interpreter by specifying
-the `-i' or `--interpreter' startup options.  Defined interpreters
-include:
-
-`console'
-     The traditional console or command-line interpreter.  This is the
-     most often used interpreter with GDB. With no interpreter
-     specified at runtime, GDB will use this interpreter.
-
-`mi'
-     The newest GDB/MI interface (currently `mi2').  Used primarily by
-     programs wishing to use GDB as a backend for a debugger GUI or an
-     IDE.  For more information, see *note The GDB/MI Interface: GDB/MI.
-
-`mi2'
-     The current GDB/MI interface.
-
-`mi1'
-     The GDB/MI interface included in GDB 5.1, 5.2, and 5.3.
-
-
-   The interpreter being used by GDB may not be dynamically switched at
-runtime.  Although possible, this could lead to a very precarious
-situation.  Consider an IDE using GDB/MI.  If a user enters the command
-"interpreter-set console" in a console view, GDB would switch to using
-the console interpreter, rendering the IDE inoperable!
-
-   Although you may only choose a single interpreter at startup, you
-may execute commands in any interpreter from the current interpreter
-using the appropriate command.  If you are running the console
-interpreter, simply use the `interpreter-exec' command:
-
-     interpreter-exec mi "-data-list-register-names"
-
-   GDB/MI has a similar command, although it is only available in
-versions of GDB which support GDB/MI version 2 (or greater).
-
-
-File: gdb.info,  Node: TUI,  Next: Emacs,  Prev: Interpreters,  Up: Top
-
-25 GDB Text User Interface
-**************************
-
-* Menu:
-
-* TUI Overview::                TUI overview
-* TUI Keys::                    TUI key bindings
-* TUI Single Key Mode::         TUI single key mode
-* TUI Commands::                TUI-specific commands
-* TUI Configuration::           TUI configuration variables
-
-   The GDB Text User Interface (TUI) is a terminal interface which uses
-the `curses' library to show the source file, the assembly output, the
-program registers and GDB commands in separate text windows.  The TUI
-mode is supported only on platforms where a suitable version of the
-`curses' library is available.
-
-   The TUI mode is enabled by default when you invoke GDB as `gdb -tui'.
-You can also switch in and out of TUI mode while GDB runs by using
-various TUI commands and key bindings, such as `tui enable' or `C-x
-C-a'.  *Note TUI Commands: TUI Commands and *note TUI Key Bindings: TUI
-Keys.
-
-
-File: gdb.info,  Node: TUI Overview,  Next: TUI Keys,  Up: TUI
-
-25.1 TUI Overview
-=================
-
-In TUI mode, GDB can display several text windows:
-
-_command_
-     This window is the GDB command window with the GDB prompt and the
-     GDB output.  The GDB input is still managed using readline.
-
-_source_
-     The source window shows the source file of the program.  The
-     current line and active breakpoints are displayed in this window.
-
-_assembly_
-     The assembly window shows the disassembly output of the program.
-
-_register_
-     This window shows the processor registers.  Registers are
-     highlighted when their values change.
-
-   The source and assembly windows show the current program position by
-highlighting the current line and marking it with a `>' marker.
-Breakpoints are indicated with two markers.  The first marker indicates
-the breakpoint type:
-
-`B'
-     Breakpoint which was hit at least once.
-
-`b'
-     Breakpoint which was never hit.
-
-`H'
-     Hardware breakpoint which was hit at least once.
-
-`h'
-     Hardware breakpoint which was never hit.
-
-   The second marker indicates whether the breakpoint is enabled or not:
-
-`+'
-     Breakpoint is enabled.
-
-`-'
-     Breakpoint is disabled.
-
-   The source, assembly and register windows are updated when the
-current thread changes, when the frame changes, or when the program
-counter changes.
-
-   These windows are not all visible at the same time.  The command
-window is always visible.  The others can be arranged in several
-layouts:
-
-   * source only,
-
-   * assembly only,
-
-   * source and assembly,
-
-   * source and registers, or
-
-   * assembly and registers.
-
-   A status line above the command window shows the following
-information:
-
-_target_
-     Indicates the current GDB target.  (*note Specifying a Debugging
-     Target: Targets.).
-
-_process_
-     Gives the current process or thread number.  When no process is
-     being debugged, this field is set to `No process'.
-
-_function_
-     Gives the current function name for the selected frame.  The name
-     is demangled if demangling is turned on (*note Print Settings::).
-     When there is no symbol corresponding to the current program
-     counter, the string `??' is displayed.
-
-_line_
-     Indicates the current line number for the selected frame.  When
-     the current line number is not known, the string `??' is displayed.
-
-_pc_
-     Indicates the current program counter address.
-
-
-File: gdb.info,  Node: TUI Keys,  Next: TUI Single Key Mode,  Prev: TUI Overview,  Up: TUI
-
-25.2 TUI Key Bindings
-=====================
-
-The TUI installs several key bindings in the readline keymaps (*note
-Command Line Editing::).  The following key bindings are installed for
-both TUI mode and the GDB standard mode.
-
-`C-x C-a'
-`C-x a'
-`C-x A'
-     Enter or leave the TUI mode.  When leaving the TUI mode, the
-     curses window management stops and GDB operates using its standard
-     mode, writing on the terminal directly.  When reentering the TUI
-     mode, control is given back to the curses windows.  The screen is
-     then refreshed.
-
-`C-x 1'
-     Use a TUI layout with only one window.  The layout will either be
-     `source' or `assembly'.  When the TUI mode is not active, it will
-     switch to the TUI mode.
-
-     Think of this key binding as the Emacs `C-x 1' binding.
-
-`C-x 2'
-     Use a TUI layout with at least two windows.  When the current
-     layout already has two windows, the next layout with two windows
-     is used.  When a new layout is chosen, one window will always be
-     common to the previous layout and the new one.
-
-     Think of it as the Emacs `C-x 2' binding.
-
-`C-x o'
-     Change the active window.  The TUI associates several key bindings
-     (like scrolling and arrow keys) with the active window.  This
-     command gives the focus to the next TUI window.
-
-     Think of it as the Emacs `C-x o' binding.
-
-`C-x s'
-     Switch in and out of the TUI SingleKey mode that binds single keys
-     to GDB commands (*note TUI Single Key Mode::).
-
-   The following key bindings only work in the TUI mode:
-
-<PgUp>
-     Scroll the active window one page up.
-
-<PgDn>
-     Scroll the active window one page down.
-
-<Up>
-     Scroll the active window one line up.
-
-<Down>
-     Scroll the active window one line down.
-
-<Left>
-     Scroll the active window one column left.
-
-<Right>
-     Scroll the active window one column right.
-
-`C-L'
-     Refresh the screen.
-
-   Because the arrow keys scroll the active window in the TUI mode, they
-are not available for their normal use by readline unless the command
-window has the focus.  When another window is active, you must use
-other readline key bindings such as `C-p', `C-n', `C-b' and `C-f' to
-control the command window.
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-5 ./gdb/doc/gdb.info-5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-5	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-5	2017-03-06 01:53:21.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,51 +37,736 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Guile Modules,  Prev: Guile Auto-loading,  Up: Guile
+
+23.3.5 Guile Modules
+--------------------
+
+GDB comes with several modules to assist writing Guile code.
+
+* Menu:
+
+* Guile Printing Module::  Building and registering pretty-printers
+* Guile Types Module::     Utilities for working with types
+
+
+File: gdb.info,  Node: Guile Printing Module,  Next: Guile Types Module,  Up: Guile Modules
+
+23.3.5.1 Guile Printing Module
+..............................
+
+This module provides a collection of utilities for working with
+pretty-printers.
+
+   Usage:
+
+     (use-modules (gdb printing))
+
+ -- Scheme Procedure: prepend-pretty-printer! object printer
+     Add PRINTER to the front of the list of pretty-printers for OBJECT.
+     The OBJECT must either be a '<gdb:objfile>' object, or '#f' in
+     which case PRINTER is added to the global list of printers.
+
+ -- Scheme Procecure: append-pretty-printer! object printer
+     Add PRINTER to the end of the list of pretty-printers for OBJECT.
+     The OBJECT must either be a '<gdb:objfile>' object, or '#f' in
+     which case PRINTER is added to the global list of printers.
+
+
+File: gdb.info,  Node: Guile Types Module,  Prev: Guile Printing Module,  Up: Guile Modules
+
+23.3.5.2 Guile Types Module
+...........................
+
+This module provides a collection of utilities for working with
+'<gdb:type>' objects.
+
+   Usage:
+
+     (use-modules (gdb types))
+
+ -- Scheme Procedure: get-basic-type type
+     Return TYPE with const and volatile qualifiers stripped, and with
+     typedefs and C++ references converted to the underlying type.
+
+     C++ example:
+
+          typedef const int const_int;
+          const_int foo (3);
+          const_int& foo_ref (foo);
+          int main () { return 0; }
+
+     Then in gdb:
+
+          (gdb) start
+          (gdb) guile (use-modules (gdb) (gdb types))
+          (gdb) guile (define foo-ref (parse-and-eval "foo_ref"))
+          (gdb) guile (get-basic-type (value-type foo-ref))
+          int
+
+ -- Scheme Procedure: type-has-field-deep? type field
+     Return '#t' if TYPE, assumed to be a type with fields (e.g., a
+     structure or union), has field FIELD.  Otherwise return '#f'.  This
+     searches baseclasses, whereas 'type-has-field?' does not.
+
+ -- Scheme Procedure: make-enum-hashtable enum-type
+     Return a Guile hash table produced from ENUM-TYPE.  Elements in the
+     hash table are referenced with 'hashq-ref'.
+
+
+File: gdb.info,  Node: Auto-loading extensions,  Next: Multiple Extension Languages,  Prev: Guile,  Up: Extending GDB
+
+23.4 Auto-loading extensions
+============================
+
+GDB provides two mechanisms for automatically loading extensions when a
+new object file is read (for example, due to the 'file' command, or
+because the inferior has loaded a shared library): 'OBJFILE-gdb.EXT' and
+the '.debug_gdb_scripts' section of modern file formats like ELF.
+
+* Menu:
+
+* objfile-gdb.ext file: objfile-gdbdotext file.  The 'OBJFILE-gdb.EXT' file
+* .debug_gdb_scripts section: dotdebug_gdb_scripts section.  The '.debug_gdb_scripts' section
+* Which flavor to choose?::
+
+   The auto-loading feature is useful for supplying application-specific
+debugging commands and features.
+
+   Auto-loading can be enabled or disabled, and the list of auto-loaded
+scripts can be printed.  See the 'auto-loading' section of each
+extension language for more information.  For GDB command files see
+*note Auto-loading sequences::.  For Python files see *note Python
+Auto-loading::.
+
+   Note that loading of this script file also requires accordingly
+configured 'auto-load safe-path' (*note Auto-loading safe path::).
+
+
+File: gdb.info,  Node: objfile-gdbdotext file,  Next: dotdebug_gdb_scripts section,  Up: Auto-loading extensions
+
+23.4.1 The 'OBJFILE-gdb.EXT' file
+---------------------------------
+
+When a new object file is read, GDB looks for a file named
+'OBJFILE-gdb.EXT' (we call it SCRIPT-NAME below), where OBJFILE is the
+object file's name and where EXT is the file extension for the extension
+language:
+
+'OBJFILE-gdb.gdb'
+     GDB's own command language
+'OBJFILE-gdb.py'
+     Python
+'OBJFILE-gdb.scm'
+     Guile
+
+   SCRIPT-NAME is formed by ensuring that the file name of OBJFILE is
+absolute, following all symlinks, and resolving '.' and '..' components,
+and appending the '-gdb.EXT' suffix.  If this file exists and is
+readable, GDB will evaluate it as a script in the specified extension
+language.
+
+   If this file does not exist, then GDB will look for SCRIPT-NAME file
+in all of the directories as specified below.
+
+   Note that loading of these files requires an accordingly configured
+'auto-load safe-path' (*note Auto-loading safe path::).
+
+   For object files using '.exe' suffix GDB tries to load first the
+scripts normally according to its '.exe' filename.  But if no scripts
+are found GDB also tries script filenames matching the object file
+without its '.exe' suffix.  This '.exe' stripping is case insensitive
+and it is attempted on any platform.  This makes the script filenames
+compatible between Unix and MS-Windows hosts.
+
+'set auto-load scripts-directory [DIRECTORIES]'
+     Control GDB auto-loaded scripts location.  Multiple directory
+     entries may be delimited by the host platform path separator in use
+     (':' on Unix, ';' on MS-Windows and MS-DOS).
+
+     Each entry here needs to be covered also by the security setting
+     'set auto-load safe-path' (*note set auto-load safe-path::).
+
+     This variable defaults to '$debugdir:$datadir/auto-load'.  The
+     default 'set auto-load safe-path' value can be also overriden by
+     GDB configuration option '--with-auto-load-dir'.
+
+     Any reference to '$debugdir' will get replaced by
+     DEBUG-FILE-DIRECTORY value (*note Separate Debug Files::) and any
+     reference to '$datadir' will get replaced by DATA-DIRECTORY which
+     is determined at GDB startup (*note Data Files::).  '$debugdir' and
+     '$datadir' must be placed as a directory component -- either alone
+     or delimited by '/' or '\' directory separators, depending on the
+     host platform.
+
+     The list of directories uses path separator (':' on GNU and Unix
+     systems, ';' on MS-Windows and MS-DOS) to separate directories,
+     similarly to the 'PATH' environment variable.
+
+'show auto-load scripts-directory'
+     Show GDB auto-loaded scripts location.
+
+'add-auto-load-scripts-directory [DIRECTORIES...]'
+     Add an entry (or list of entries) to the list of auto-loaded
+     scripts locations.  Multiple entries may be delimited by the host
+     platform path separator in use.
+
+   GDB does not track which files it has already auto-loaded this way.
+GDB will load the associated script every time the corresponding OBJFILE
+is opened.  So your '-gdb.EXT' file should be careful to avoid errors if
+it is evaluated more than once.
+
+
+File: gdb.info,  Node: dotdebug_gdb_scripts section,  Next: Which flavor to choose?,  Prev: objfile-gdbdotext file,  Up: Auto-loading extensions
+
+23.4.2 The '.debug_gdb_scripts' section
+---------------------------------------
+
+For systems using file formats like ELF and COFF, when GDB loads a new
+object file it will look for a special section named
+'.debug_gdb_scripts'.  If this section exists, its contents is a list of
+null-terminated entries specifying scripts to load.  Each entry begins
+with a non-null prefix byte that specifies the kind of entry, typically
+the extension language and whether the script is in a file or inlined in
+'.debug_gdb_scripts'.
+
+   The following entries are supported:
+
+'SECTION_SCRIPT_ID_PYTHON_FILE = 1'
+'SECTION_SCRIPT_ID_SCHEME_FILE = 3'
+'SECTION_SCRIPT_ID_PYTHON_TEXT = 4'
+'SECTION_SCRIPT_ID_SCHEME_TEXT = 6'
+
+23.4.2.1 Script File Entries
+............................
+
+If the entry specifies a file, GDB will look for the file first in the
+current directory and then along the source search path (*note
+Specifying Source Directories: Source Path.), except that '$cdir' is not
+searched, since the compilation directory is not relevant to scripts.
+
+   File entries can be placed in section '.debug_gdb_scripts' with, for
+example, this GCC macro for Python scripts.
+
+     /* Note: The "MS" section flags are to remove duplicates.  */
+     #define DEFINE_GDB_PY_SCRIPT(script_name) \
+       asm("\
+     .pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n\
+     .byte 1 /* Python */\n\
+     .asciz \"" script_name "\"\n\
+     .popsection \n\
+     ");
+
+For Guile scripts, replace '.byte 1' with '.byte 3'.  Then one can
+reference the macro in a header or source file like this:
+
+     DEFINE_GDB_PY_SCRIPT ("my-app-scripts.py")
+
+   The script name may include directories if desired.
+
+   Note that loading of this script file also requires accordingly
+configured 'auto-load safe-path' (*note Auto-loading safe path::).
+
+   If the macro invocation is put in a header, any application or
+library using this header will get a reference to the specified script,
+and with the use of '"MS"' attributes on the section, the linker will
+remove duplicates.
+
+23.4.2.2 Script Text Entries
+............................
+
+Script text entries allow to put the executable script in the entry
+itself instead of loading it from a file.  The first line of the entry,
+everything after the prefix byte and up to the first newline ('0xa')
+character, is the script name, and must not contain any kind of space
+character, e.g., spaces or tabs.  The rest of the entry, up to the
+trailing null byte, is the script to execute in the specified language.
+The name needs to be unique among all script names, as GDB executes each
+script only once based on its name.
+
+   Here is an example from file 'py-section-script.c' in the GDB
+testsuite.
+
+     #include "symcat.h"
+     #include "gdb/section-scripts.h"
+     asm(
+     ".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n"
+     ".byte " XSTRING (SECTION_SCRIPT_ID_PYTHON_TEXT) "\n"
+     ".ascii \"gdb.inlined-script\\n\"\n"
+     ".ascii \"class test_cmd (gdb.Command):\\n\"\n"
+     ".ascii \"  def __init__ (self):\\n\"\n"
+     ".ascii \"    super (test_cmd, self).__init__ ("
+         "\\\"test-cmd\\\", gdb.COMMAND_OBSCURE)\\n\"\n"
+     ".ascii \"  def invoke (self, arg, from_tty):\\n\"\n"
+     ".ascii \"    print (\\\"test-cmd output, arg = %s\\\" % arg)\\n\"\n"
+     ".ascii \"test_cmd ()\\n\"\n"
+     ".byte 0\n"
+     ".popsection\n"
+     );
+
+   Loading of inlined scripts requires a properly configured 'auto-load
+safe-path' (*note Auto-loading safe path::).  The path to specify in
+'auto-load safe-path' is the path of the file containing the
+'.debug_gdb_scripts' section.
+
+
+File: gdb.info,  Node: Which flavor to choose?,  Prev: dotdebug_gdb_scripts section,  Up: Auto-loading extensions
+
+23.4.3 Which flavor to choose?
+------------------------------
+
+Given the multiple ways of auto-loading extensions, it might not always
+be clear which one to choose.  This section provides some guidance.
+
+Benefits of the '-gdb.EXT' way:
+
+   * Can be used with file formats that don't support multiple sections.
+
+   * Ease of finding scripts for public libraries.
+
+     Scripts specified in the '.debug_gdb_scripts' section are searched
+     for in the source search path.  For publicly installed libraries,
+     e.g., 'libstdc++', there typically isn't a source directory in
+     which to find the script.
+
+   * Doesn't require source code additions.
+
+Benefits of the '.debug_gdb_scripts' way:
+
+   * Works with static linking.
+
+     Scripts for libraries done the '-gdb.EXT' way require an objfile to
+     trigger their loading.  When an application is statically linked
+     the only objfile available is the executable, and it is cumbersome
+     to attach all the scripts from all the input libraries to the
+     executable's '-gdb.EXT' script.
+
+   * Works with classes that are entirely inlined.
+
+     Some classes can be entirely inlined, and thus there may not be an
+     associated shared library to attach a '-gdb.EXT' script to.
+
+   * Scripts needn't be copied out of the source tree.
+
+     In some circumstances, apps can be built out of large collections
+     of internal libraries, and the build infrastructure necessary to
+     install the '-gdb.EXT' scripts in a place where GDB can find them
+     is cumbersome.  It may be easier to specify the scripts in the
+     '.debug_gdb_scripts' section as relative paths, and add a path to
+     the top of the source tree to the source search path.
+
+
+File: gdb.info,  Node: Multiple Extension Languages,  Next: Aliases,  Prev: Auto-loading extensions,  Up: Extending GDB
+
+23.5 Multiple Extension Languages
+=================================
+
+The Guile and Python extension languages do not share any state, and
+generally do not interfere with each other.  There are some things to be
+aware of, however.
+
+23.5.1 Python comes first
+-------------------------
+
+Python was GDB's first extension language, and to avoid breaking
+existing behaviour Python comes first.  This is generally solved by the
+"first one wins" principle.  GDB maintains a list of enabled extension
+languages, and when it makes a call to an extension language, (say to
+pretty-print a value), it tries each in turn until an extension language
+indicates it has performed the request (e.g., has returned the
+pretty-printed form of a value).  This extends to errors while
+performing such requests: If an error happens while, for example, trying
+to pretty-print an object then the error is reported and any following
+extension languages are not tried.
+
+
+File: gdb.info,  Node: Aliases,  Prev: Multiple Extension Languages,  Up: Extending GDB
+
+23.6 Creating new spellings of existing commands
+================================================
+
+It is often useful to define alternate spellings of existing commands.
+For example, if a new GDB command defined in Python has a long name to
+type, it is handy to have an abbreviated version of it that involves
+less typing.
+
+   GDB itself uses aliases.  For example 's' is an alias of the 'step'
+command even though it is otherwise an ambiguous abbreviation of other
+commands like 'set' and 'show'.
+
+   Aliases are also used to provide shortened or more common versions of
+multi-word commands.  For example, GDB provides the 'tty' alias of the
+'set inferior-tty' command.
+
+   You can define a new alias with the 'alias' command.
+
+'alias [-a] [--] ALIAS = COMMAND'
+
+   ALIAS specifies the name of the new alias.  Each word of ALIAS must
+consist of letters, numbers, dashes and underscores.
+
+   COMMAND specifies the name of an existing command that is being
+aliased.
+
+   The '-a' option specifies that the new alias is an abbreviation of
+the command.  Abbreviations are not shown in command lists displayed by
+the 'help' command.
+
+   The '--' option specifies the end of options, and is useful when
+ALIAS begins with a dash.
+
+   Here is a simple example showing how to make an abbreviation of a
+command so that there is less to type.  Suppose you were tired of typing
+'disas', the current shortest unambiguous abbreviation of the
+'disassemble' command and you wanted an even shorter version named 'di'.
+The following will accomplish this.
+
+     (gdb) alias -a di = disas
+
+   Note that aliases are different from user-defined commands.  With a
+user-defined command, you also need to write documentation for it with
+the 'document' command.  An alias automatically picks up the
+documentation of the existing command.
+
+   Here is an example where we make 'elms' an abbreviation of 'elements'
+in the 'set print elements' command.  This is to show that you can make
+an abbreviation of any part of a command.
+
+     (gdb) alias -a set print elms = set print elements
+     (gdb) alias -a show print elms = show print elements
+     (gdb) set p elms 20
+     (gdb) show p elms
+     Limit on string chars or array elements to print is 200.
+
+   Note that if you are defining an alias of a 'set' command, and you
+want to have an alias for the corresponding 'show' command, then you
+need to define the latter separately.
+
+   Unambiguously abbreviated commands are allowed in COMMAND and ALIAS,
+just as they are normally.
+
+     (gdb) alias -a set pr elms = set p ele
+
+   Finally, here is an example showing the creation of a one word alias
+for a more complex command.  This creates alias 'spe' of the command
+'set print elements'.
+
+     (gdb) alias spe = set print elements
+     (gdb) spe 20
+
+
+File: gdb.info,  Node: Interpreters,  Next: TUI,  Prev: Extending GDB,  Up: Top
+
+24 Command Interpreters
+***********************
+
+GDB supports multiple command interpreters, and some command
+infrastructure to allow users or user interface writers to switch
+between interpreters or run commands in other interpreters.
+
+   GDB currently supports two command interpreters, the console
+interpreter (sometimes called the command-line interpreter or CLI) and
+the machine interface interpreter (or GDB/MI).  This manual describes
+both of these interfaces in great detail.
+
+   By default, GDB will start with the console interpreter.  However,
+the user may choose to start GDB with another interpreter by specifying
+the '-i' or '--interpreter' startup options.  Defined interpreters
+include:
+
+'console'
+     The traditional console or command-line interpreter.  This is the
+     most often used interpreter with GDB.  With no interpreter
+     specified at runtime, GDB will use this interpreter.
+
+'mi'
+     The newest GDB/MI interface (currently 'mi2').  Used primarily by
+     programs wishing to use GDB as a backend for a debugger GUI or an
+     IDE. For more information, see *note The GDB/MI Interface: GDB/MI.
+
+'mi2'
+     The current GDB/MI interface.
+
+'mi1'
+     The GDB/MI interface included in GDB 5.1, 5.2, and 5.3.
+
+   You may execute commands in any interpreter from the current
+interpreter using the appropriate command.  If you are running the
+console interpreter, simply use the 'interpreter-exec' command:
+
+     interpreter-exec mi "-data-list-register-names"
+
+   GDB/MI has a similar command, although it is only available in
+versions of GDB which support GDB/MI version 2 (or greater).
+
+   Note that 'interpreter-exec' only changes the interpreter for the
+duration of the specified command.  It does not change the interpreter
+permanently.
+
+   Although you may only choose a single interpreter at startup, it is
+possible to run an independent interpreter on a specified input/output
+device (usually a tty).
+
+   For example, consider a debugger GUI or IDE that wants to provide a
+GDB console view.  It may do so by embedding a terminal emulator widget
+in its GUI, starting GDB in the traditional command-line mode with
+stdin/stdout/stderr redirected to that terminal, and then creating an MI
+interpreter running on a specified input/output device.  The console
+interpreter created by GDB at startup handles commands the user types in
+the terminal widget, while the GUI controls and synchronizes state with
+GDB using the separate MI interpreter.
+
+   To start a new secondary "user interface" running MI, use the
+'new-ui' command:
+
+     new-ui INTERPRETER TTY
+
+   The INTERPRETER parameter specifies the interpreter to run.  This
+accepts the same values as the 'interpreter-exec' command.  For example,
+'console', 'mi', 'mi2', etc.  The TTY parameter specifies the name of
+the bidirectional file the interpreter uses for input/output, usually
+the name of a pseudoterminal slave on Unix systems.  For example:
+
+     (gdb) new-ui mi /dev/pts/9
+
+runs an MI interpreter on '/dev/pts/9'.
+
+
+File: gdb.info,  Node: TUI,  Next: Emacs,  Prev: Interpreters,  Up: Top
+
+25 GDB Text User Interface
+**************************
+
+* Menu:
+
+* TUI Overview::                TUI overview
+* TUI Keys::                    TUI key bindings
+* TUI Single Key Mode::         TUI single key mode
+* TUI Commands::                TUI-specific commands
+* TUI Configuration::           TUI configuration variables
+
+The GDB Text User Interface (TUI) is a terminal interface which uses the
+'curses' library to show the source file, the assembly output, the
+program registers and GDB commands in separate text windows.  The TUI
+mode is supported only on platforms where a suitable version of the
+'curses' library is available.
+
+   The TUI mode is enabled by default when you invoke GDB as 'gdb -tui'.
+You can also switch in and out of TUI mode while GDB runs by using
+various TUI commands and key bindings, such as 'tui enable' or 'C-x
+C-a'.  *Note TUI Commands: TUI Commands, and *note TUI Key Bindings: TUI
+Keys.
+
+
+File: gdb.info,  Node: TUI Overview,  Next: TUI Keys,  Up: TUI
+
+25.1 TUI Overview
+=================
+
+In TUI mode, GDB can display several text windows:
+
+_command_
+     This window is the GDB command window with the GDB prompt and the
+     GDB output.  The GDB input is still managed using readline.
+
+_source_
+     The source window shows the source file of the program.  The
+     current line and active breakpoints are displayed in this window.
+
+_assembly_
+     The assembly window shows the disassembly output of the program.
+
+_register_
+     This window shows the processor registers.  Registers are
+     highlighted when their values change.
+
+   The source and assembly windows show the current program position by
+highlighting the current line and marking it with a '>' marker.
+Breakpoints are indicated with two markers.  The first marker indicates
+the breakpoint type:
+
+'B'
+     Breakpoint which was hit at least once.
+
+'b'
+     Breakpoint which was never hit.
+
+'H'
+     Hardware breakpoint which was hit at least once.
+
+'h'
+     Hardware breakpoint which was never hit.
+
+   The second marker indicates whether the breakpoint is enabled or not:
+
+'+'
+     Breakpoint is enabled.
+
+'-'
+     Breakpoint is disabled.
+
+   The source, assembly and register windows are updated when the
+current thread changes, when the frame changes, or when the program
+counter changes.
+
+   These windows are not all visible at the same time.  The command
+window is always visible.  The others can be arranged in several
+layouts:
+
+   * source only,
+
+   * assembly only,
+
+   * source and assembly,
+
+   * source and registers, or
+
+   * assembly and registers.
+
+   A status line above the command window shows the following
+information:
+
+_target_
+     Indicates the current GDB target.  (*note Specifying a Debugging
+     Target: Targets.).
+
+_process_
+     Gives the current process or thread number.  When no process is
+     being debugged, this field is set to 'No process'.
+
+_function_
+     Gives the current function name for the selected frame.  The name
+     is demangled if demangling is turned on (*note Print Settings::).
+     When there is no symbol corresponding to the current program
+     counter, the string '??' is displayed.
+
+_line_
+     Indicates the current line number for the selected frame.  When the
+     current line number is not known, the string '??' is displayed.
+
+_pc_
+     Indicates the current program counter address.
+
+
+File: gdb.info,  Node: TUI Keys,  Next: TUI Single Key Mode,  Prev: TUI Overview,  Up: TUI
+
+25.2 TUI Key Bindings
+=====================
+
+The TUI installs several key bindings in the readline keymaps (*note
+Command Line Editing::).  The following key bindings are installed for
+both TUI mode and the GDB standard mode.
+
+'C-x C-a'
+'C-x a'
+'C-x A'
+     Enter or leave the TUI mode.  When leaving the TUI mode, the curses
+     window management stops and GDB operates using its standard mode,
+     writing on the terminal directly.  When reentering the TUI mode,
+     control is given back to the curses windows.  The screen is then
+     refreshed.
+
+'C-x 1'
+     Use a TUI layout with only one window.  The layout will either be
+     'source' or 'assembly'.  When the TUI mode is not active, it will
+     switch to the TUI mode.
+
+     Think of this key binding as the Emacs 'C-x 1' binding.
+
+'C-x 2'
+     Use a TUI layout with at least two windows.  When the current
+     layout already has two windows, the next layout with two windows is
+     used.  When a new layout is chosen, one window will always be
+     common to the previous layout and the new one.
+
+     Think of it as the Emacs 'C-x 2' binding.
+
+'C-x o'
+     Change the active window.  The TUI associates several key bindings
+     (like scrolling and arrow keys) with the active window.  This
+     command gives the focus to the next TUI window.
+
+     Think of it as the Emacs 'C-x o' binding.
+
+'C-x s'
+     Switch in and out of the TUI SingleKey mode that binds single keys
+     to GDB commands (*note TUI Single Key Mode::).
+
+   The following key bindings only work in the TUI mode:
+
+<PgUp>
+     Scroll the active window one page up.
+
+<PgDn>
+     Scroll the active window one page down.
+
+<Up>
+     Scroll the active window one line up.
+
+<Down>
+     Scroll the active window one line down.
+
+<Left>
+     Scroll the active window one column left.
+
+<Right>
+     Scroll the active window one column right.
+
+'C-L'
+     Refresh the screen.
+
+   Because the arrow keys scroll the active window in the TUI mode, they
+are not available for their normal use by readline unless the command
+window has the focus.  When another window is active, you must use other
+readline key bindings such as 'C-p', 'C-n', 'C-b' and 'C-f' to control
+the command window.
+
+
 File: gdb.info,  Node: TUI Single Key Mode,  Next: TUI Commands,  Prev: TUI Keys,  Up: TUI
 
 25.3 TUI Single Key Mode
 ========================
 
-The TUI also provides a "SingleKey" mode, which binds several
-frequently used GDB commands to single keys.  Type `C-x s' to switch
-into this mode, where the following key bindings are used:
+The TUI also provides a "SingleKey" mode, which binds several frequently
+used GDB commands to single keys.  Type 'C-x s' to switch into this
+mode, where the following key bindings are used:
 
-`c'
+'c'
      continue
 
-`d'
+'d'
      down
 
-`f'
+'f'
      finish
 
-`n'
+'n'
      next
 
-`q'
+'q'
      exit the SingleKey mode.
 
-`r'
+'r'
      run
 
-`s'
+'s'
      step
 
-`u'
+'u'
      up
 
-`v'
+'v'
      info locals
 
-`w'
+'w'
      where
 
    Other keys temporarily switch to the GDB command prompt.  The key
 that was pressed is inserted in the editing buffer so that it is
 possible to type most GDB commands without interaction with the TUI
 SingleKey mode.  Once the command is entered the TUI SingleKey mode is
-restored.  The only way to permanently leave this mode is by typing `q'
-or `C-x s'.
+restored.  The only way to permanently leave this mode is by typing 'q'
+or 'C-x s'.
 
 
 File: gdb.info,  Node: TUI Commands,  Next: TUI Configuration,  Prev: TUI Single Key Mode,  Up: TUI
@@ -95,105 +779,112 @@ commands are always available, even when
 When GDB is in the standard mode, most of these commands will
 automatically switch to the TUI mode.
 
-   Note that if GDB's `stdout' is not connected to a terminal, or GDB
+   Note that if GDB's 'stdout' is not connected to a terminal, or GDB
 has been started with the machine interface interpreter (*note The
 GDB/MI Interface: GDB/MI.), most of these commands will fail with an
 error, because it would not be possible or desirable to enable curses
 window management.
 
-`tui enable'
+'tui enable'
      Activate TUI mode.  The last active TUI window layout will be used
      if TUI mode has prevsiouly been used in the current debugging
      session, otherwise a default layout is used.
 
-`tui disable'
+'tui disable'
      Disable TUI mode, returning to the console interpreter.
 
-`info win'
+'info win'
      List and give the size of all displayed windows.
 
-`layout next'
-     Display the next layout.
+'layout NAME'
+     Changes which TUI windows are displayed.  In each layout the
+     command window is always displayed, the NAME parameter controls
+     which additional windows are displayed, and can be any of the
+     following:
+
+     'next'
+          Display the next layout.
+
+     'prev'
+          Display the previous layout.
 
-`layout prev'
-     Display the previous layout.
+     'src'
+          Display the source and command windows.
 
-`layout src'
-     Display the source window only.
+     'asm'
+          Display the assembly and command windows.
 
-`layout asm'
-     Display the assembly window only.
+     'split'
+          Display the source, assembly, and command windows.
 
-`layout split'
-     Display the source and assembly window.
+     'regs'
+          When in 'src' layout display the register, source, and command
+          windows.  When in 'asm' or 'split' layout display the
+          register, assembler, and command windows.
 
-`layout regs'
-     Display the register window together with the source or assembly
-     window.
+'focus NAME'
+     Changes which TUI window is currently active for scrolling.  The
+     NAME parameter can be any of the following:
 
-`focus next'
-     Make the next window active for scrolling.
+     'next'
+          Make the next window active for scrolling.
 
-`focus prev'
-     Make the previous window active for scrolling.
+     'prev'
+          Make the previous window active for scrolling.
 
-`focus src'
-     Make the source window active for scrolling.
+     'src'
+          Make the source window active for scrolling.
 
-`focus asm'
-     Make the assembly window active for scrolling.
+     'asm'
+          Make the assembly window active for scrolling.
 
-`focus regs'
-     Make the register window active for scrolling.
+     'regs'
+          Make the register window active for scrolling.
 
-`focus cmd'
-     Make the command window active for scrolling.
+     'cmd'
+          Make the command window active for scrolling.
 
-`refresh'
-     Refresh the screen.  This is similar to typing `C-L'.
+'refresh'
+     Refresh the screen.  This is similar to typing 'C-L'.
 
-`tui reg GROUP'
+'tui reg GROUP'
      Changes the register group displayed in the tui register window to
      GROUP.  If the register window is not currently displayed this
      command will cause the register window to be displayed.  The list
-     of register groups, as well as their order is target specific. The
+     of register groups, as well as their order is target specific.  The
      following groups are available on most targets:
-    `next'
+     'next'
           Repeatedly selecting this group will cause the display to
           cycle through all of the available register groups.
 
-    `prev'
+     'prev'
           Repeatedly selecting this group will cause the display to
           cycle through all of the available register groups in the
           reverse order to NEXT.
 
-    `general'
+     'general'
           Display the general registers.
-
-    `float'
+     'float'
           Display the floating point registers.
-
-    `system'
+     'system'
           Display the system registers.
-
-    `vector'
+     'vector'
           Display the vector registers.
-
-    `all'
+     'all'
           Display all registers.
 
-`update'
+'update'
      Update the source window and the current execution point.
 
-`winheight NAME +COUNT'
-`winheight NAME -COUNT'
+'winheight NAME +COUNT'
+'winheight NAME -COUNT'
      Change the height of the window NAME by COUNT lines.  Positive
-     counts increase the height, while negative counts decrease it.
-     The NAME parameter can be one of `src' (the source window), `cmd'
-     (the command window), `asm' (the disassembly window), or `regs'
-     (the register display window).
+     counts increase the height, while negative counts decrease it.  The
+     NAME parameter can be one of 'src' (the source window), 'cmd' (the
+     command window), 'asm' (the disassembly window), or 'regs' (the
+     register display window).
 
-`tabset NCHARS'
+'tabset NCHARS'
      Set the width of tab stops to be NCHARS characters.  This setting
      affects the display of TAB characters in the source and assembly
      windows.
@@ -206,44 +897,44 @@ File: gdb.info,  Node: TUI Configuration
 
 Several configuration variables control the appearance of TUI windows.
 
-`set tui border-kind KIND'
+'set tui border-kind KIND'
      Select the border appearance for the source, assembly and register
      windows.  The possible values are the following:
-    `space'
+     'space'
           Use a space character to draw the border.
 
-    `ascii'
-          Use ASCII characters `+', `-' and `|' to draw the border.
+     'ascii'
+          Use ASCII characters '+', '-' and '|' to draw the border.
 
-    `acs'
+     'acs'
           Use the Alternate Character Set to draw the border.  The
           border is drawn using character line graphics if the terminal
           supports them.
 
-`set tui border-mode MODE'
-`set tui active-border-mode MODE'
+'set tui border-mode MODE'
+'set tui active-border-mode MODE'
      Select the display attributes for the borders of the inactive
      windows or the active window.  The MODE can be one of the
      following:
-    `normal'
+     'normal'
           Use normal attributes to display the border.
 
-    `standout'
+     'standout'
           Use standout mode.
 
-    `reverse'
+     'reverse'
           Use reverse video mode.
 
-    `half'
+     'half'
           Use half bright mode.
 
-    `half-standout'
+     'half-standout'
           Use half bright and standout mode.
 
-    `bold'
+     'bold'
           Use extra bright or bold mode.
 
-    `bold-standout'
+     'bold-standout'
           Use extra bright or bold and standout mode.
 
 
@@ -255,7 +946,7 @@ File: gdb.info,  Node: Emacs,  Next: GDB
 A special interface allows you to use GNU Emacs to view (and edit) the
 source files for the program you are debugging with GDB.
 
-   To use this interface, use the command `M-x gdb' in Emacs.  Give the
+   To use this interface, use the command 'M-x gdb' in Emacs.  Give the
 executable file you want to debug as an argument.  This command starts
 GDB as a subprocess of Emacs, with input and output through a newly
 created Emacs buffer.
@@ -274,32 +965,32 @@ for two things:
      the output in this way.
 
      All the facilities of Emacs' Shell mode are available for
-     interacting with your program.  In particular, you can send
-     signals the usual way--for example, `C-c C-c' for an interrupt,
-     `C-c C-z' for a stop.
+     interacting with your program.  In particular, you can send signals
+     the usual way--for example, 'C-c C-c' for an interrupt, 'C-c C-z'
+     for a stop.
 
    * GDB displays source code through Emacs.
 
      Each time GDB displays a stack frame, Emacs automatically finds the
-     source file for that frame and puts an arrow (`=>') at the left
+     source file for that frame and puts an arrow ('=>') at the left
      margin of the current line.  Emacs uses a separate buffer for
      source display, and splits the screen to show both your GDB session
      and the source.
 
-     Explicit GDB `list' or search commands still produce output as
+     Explicit GDB 'list' or search commands still produce output as
      usual, but you probably have no reason to use them from Emacs.
 
-   We call this "text command mode".  Emacs 22.1, and later, also uses
-a graphical mode, enabled by default, which provides further buffers
-that can control the execution and describe the state of your program.
-*Note GDB Graphical Interface: (Emacs)GDB Graphical Interface.
+   We call this "text command mode".  Emacs 22.1, and later, also uses a
+graphical mode, enabled by default, which provides further buffers that
+can control the execution and describe the state of your program.  *Note
+(Emacs)GDB Graphical Interface::.
 
-   If you specify an absolute file name when prompted for the `M-x gdb'
+   If you specify an absolute file name when prompted for the 'M-x gdb'
 argument, then Emacs sets your current working directory to where your
 program resides.  If you only specify the file name, then Emacs sets
 your current working directory to the directory associated with the
 previous buffer.  In this case, GDB may find your program by searching
-your environment's `PATH' variable, but on some operating systems it
+your environment's 'PATH' variable, but on some operating systems it
 might not find the source.  So, although the GDB input and output
 session proceeds normally, the auxiliary buffer does not display the
 current source and line of execution.
@@ -309,60 +1000,59 @@ the GUD buffer and this serves as a defa
 specify files for GDB to operate on.  *Note Commands to Specify Files:
 Files.
 
-   By default, `M-x gdb' calls the program called `gdb'.  If you need
-to call GDB by a different name (for example, if you keep several
-configurations around, with different names) you can customize the
-Emacs variable `gud-gdb-command-name' to run the one you want.
+   By default, 'M-x gdb' calls the program called 'gdb'.  If you need to
+call GDB by a different name (for example, if you keep several
+configurations around, with different names) you can customize the Emacs
+variable 'gud-gdb-command-name' to run the one you want.
 
    In the GUD buffer, you can use these special Emacs commands in
 addition to the standard Shell mode commands:
 
-`C-h m'
+'C-h m'
      Describe the features of Emacs' GUD Mode.
 
-`C-c C-s'
-     Execute to another source line, like the GDB `step' command; also
+'C-c C-s'
+     Execute to another source line, like the GDB 'step' command; also
      update the display window to show the current file and location.
 
-`C-c C-n'
+'C-c C-n'
      Execute to next source line in this function, skipping all function
-     calls, like the GDB `next' command.  Then update the display window
+     calls, like the GDB 'next' command.  Then update the display window
      to show the current file and location.
 
-`C-c C-i'
-     Execute one instruction, like the GDB `stepi' command; update
+'C-c C-i'
+     Execute one instruction, like the GDB 'stepi' command; update
      display window accordingly.
 
-`C-c C-f'
+'C-c C-f'
      Execute until exit from the selected stack frame, like the GDB
-     `finish' command.
+     'finish' command.
 
-`C-c C-r'
-     Continue execution of your program, like the GDB `continue'
+'C-c C-r'
+     Continue execution of your program, like the GDB 'continue'
      command.
 
-`C-c <'
-     Go up the number of frames indicated by the numeric argument
-     (*note Numeric Arguments: (Emacs)Arguments.), like the GDB `up'
-     command.
+'C-c <'
+     Go up the number of frames indicated by the numeric argument (*note
+     Numeric Arguments: (Emacs)Arguments.), like the GDB 'up' command.
 
-`C-c >'
+'C-c >'
      Go down the number of frames indicated by the numeric argument,
-     like the GDB `down' command.
+     like the GDB 'down' command.
 
-   In any source file, the Emacs command `C-x <SPC>' (`gud-break')
-tells GDB to set a breakpoint on the source line point is on.
+   In any source file, the Emacs command 'C-x <SPC>' ('gud-break') tells
+GDB to set a breakpoint on the source line point is on.
 
-   In text command mode, if you type `M-x speedbar', Emacs displays a
+   In text command mode, if you type 'M-x speedbar', Emacs displays a
 separate frame which shows a backtrace when the GUD buffer is current.
 Move point to any frame in the stack and type <RET> to make it become
 the current frame and display the associated source in the source
-buffer.  Alternatively, click `Mouse-2' to make the selected frame
+buffer.  Alternatively, click 'Mouse-2' to make the selected frame
 become the current one.  In graphical mode, the speedbar displays watch
 expressions.
 
    If you accidentally delete the source-display buffer, an easy way to
-get it back is to type the command `f' in the GDB buffer, to request a
+get it back is to type the command 'f' in the GDB buffer, to request a
 frame display; when you run under Emacs, this recreates the source
 buffer if necessary to show you the context of the current frame.
 
@@ -370,11 +1060,11 @@ buffer if necessary to show you the cont
 which are visiting the source files in the usual way.  You can edit the
 files with these buffers if you wish; but keep in mind that GDB
 communicates with Emacs in terms of line numbers.  If you add or delete
-lines from the text, the line numbers that GDB knows cease to
-correspond properly with the code.
+lines from the text, the line numbers that GDB knows cease to correspond
+properly with the code.
 
    A more detailed description of Emacs' interaction with GDB is given
-in the Emacs manual (*note Debuggers: (Emacs)Debuggers.).
+in the Emacs manual (*note (Emacs)Debuggers::).
 
 
 File: gdb.info,  Node: GDB/MI,  Next: Annotations,  Prev: Emacs,  Up: Top
@@ -386,7 +1076,7 @@ Function and Purpose
 ====================
 
 GDB/MI is a line based machine oriented text interface to GDB and is
-activated by specifying using the `--interpreter' command line option
+activated by specifying using the '--interpreter' command line option
 (*note Mode Options::).  It is specifically intended to support the
 development of systems which use the debugger as just one small
 component of a larger system.
@@ -394,27 +1084,27 @@ component of a larger system.
    This chapter is a specification of the GDB/MI interface.  It is
 written in the form of a reference manual.
 
-   Note that GDB/MI is still under construction, so some of the
-features described below are incomplete and subject to change (*note
-GDB/MI Development and Front Ends: GDB/MI Development and Front Ends.).
+   Note that GDB/MI is still under construction, so some of the features
+described below are incomplete and subject to change (*note GDB/MI
+Development and Front Ends: GDB/MI Development and Front Ends.).
 
 Notation and Terminology
 ========================
 
 This chapter uses the following notation:
 
-   * `|' separates two alternatives.
+   * '|' separates two alternatives.
 
-   * `[ SOMETHING ]' indicates that SOMETHING is optional: it may or
-     may not be given.
+   * '[ SOMETHING ]' indicates that SOMETHING is optional: it may or may
+     not be given.
 
-   * `( GROUP )*' means that GROUP inside the parentheses may repeat
+   * '( GROUP )*' means that GROUP inside the parentheses may repeat
      zero or more times.
 
-   * `( GROUP )+' means that GROUP inside the parentheses may repeat
-     one or more times.
+   * '( GROUP )+' means that GROUP inside the parentheses may repeat one
+     or more times.
 
-   * `"STRING"' means a literal STRING.
+   * '"STRING"' means a literal STRING.
 
 * Menu:
 
@@ -449,33 +1139,33 @@ File: gdb.info,  Node: GDB/MI General De
 27.1 GDB/MI General Design
 ==========================
 
-Interaction of a GDB/MI frontend with GDB involves three
-parts--commands sent to GDB, responses to those commands and
-notifications.  Each command results in exactly one response,
-indicating either successful completion of the command, or an error.
-For the commands that do not resume the target, the response contains
-the requested information.  For the commands that resume the target, the
-response only indicates whether the target was successfully resumed.
-Notifications is the mechanism for reporting changes in the state of the
-target, or in GDB state, that cannot conveniently be associated with a
-command and reported as part of that command response.
+Interaction of a GDB/MI frontend with GDB involves three parts--commands
+sent to GDB, responses to those commands and notifications.  Each
+command results in exactly one response, indicating either successful
+completion of the command, or an error.  For the commands that do not
+resume the target, the response contains the requested information.  For
+the commands that resume the target, the response only indicates whether
+the target was successfully resumed.  Notifications is the mechanism for
+reporting changes in the state of the target, or in GDB state, that
+cannot conveniently be associated with a command and reported as part of
+that command response.
 
    The important examples of notifications are:
+
    * Exec notifications.  These are used to report changes in target
      state--when a target is resumed, or stopped.  It would not be
      feasible to include this information in response of resuming
-     commands, because one resume commands can result in multiple
-     events in different threads.  Also, quite some time may pass
-     before any event happens in the target, while a frontend needs to
-     know whether the resuming command itself was successfully executed.
+     commands, because one resume commands can result in multiple events
+     in different threads.  Also, quite some time may pass before any
+     event happens in the target, while a frontend needs to know whether
+     the resuming command itself was successfully executed.
 
    * Console output, and status notifications.  Console output
      notifications are used to report output of CLI commands, as well as
      diagnostics for other commands.  Status notifications are used to
      report the progress of a long-running operation.  Naturally,
-     including this information in command response would mean no
-     output is produced until the command is finished, which is
-     undesirable.
+     including this information in command response would mean no output
+     is produced until the command is finished, which is undesirable.
 
    * General notifications.  Commands may have various side effects on
      the GDB or target state beyond their official purpose.  For
@@ -483,13 +1173,11 @@ command and reported as part of that com
      changes can be included in command response, using notification
      allows for more orthogonal frontend design.
 
-
    There's no guarantee that whenever an MI command reports an error,
 GDB or the target are in any specific state, and especially, the state
 is not reverted to the state before the MI command was processed.
-Therefore, whenever an MI command results in an error, we recommend
-that the frontend refreshes all the information shown in the user
-interface.
+Therefore, whenever an MI command results in an error, we recommend that
+the frontend refreshes all the information shown in the user interface.
 
 * Menu:
 
@@ -513,8 +1201,8 @@ specified.  The CLI interface maintains 
 and supplies them to target on each command.  This is convenient,
 because a command line user would not want to specify that information
 explicitly on each command, and because user interacts with GDB via a
-single terminal, so no confusion is possible as to what thread and
-frame are the current ones.
+single terminal, so no confusion is possible as to what thread and frame
+are the current ones.
 
    In the case of MI, the concept of selected thread and frame is less
 useful.  First, a frontend can easily remember this information itself.
@@ -523,36 +1211,36 @@ used for debugging a different thread, a
 access additional threads for internal purposes.  This increases the
 risk that by relying on implicitly selected thread, the frontend may be
 operating on a wrong one.  Therefore, each MI command should explicitly
-specify which thread and frame to operate on.  To make it possible,
-each MI command accepts the `--thread' and `--frame' options, the value
-to each is GDB identifier for thread and frame to operate on.
+specify which thread and frame to operate on.  To make it possible, each
+MI command accepts the '--thread' and '--frame' options, the value to
+each is GDB global identifier for thread and frame to operate on.
 
    Usually, each top-level window in a frontend allows the user to
 select a thread and a frame, and remembers the user selection for
 further operations.  However, in some cases GDB may suggest that the
-current thread be changed.  For example, when stopping on a breakpoint
-it is reasonable to switch to the thread where breakpoint is hit.  For
-another example, if the user issues the CLI `thread' command via the
-frontend, it is desirable to change the frontend's selected thread to
-the one specified by user.  GDB communicates the suggestion to change
-current thread using the `=thread-selected' notification.  No such
-notification is available for the selected frame at the moment.
+current thread or frame be changed.  For example, when stopping on a
+breakpoint it is reasonable to switch to the thread where breakpoint is
+hit.  For another example, if the user issues the CLI 'thread' or
+'frame' commands via the frontend, it is desirable to change the
+frontend's selection to the one specified by user.  GDB communicates the
+suggestion to change current thread and frame using the
+'=thread-selected' notification.
 
    Note that historically, MI shares the selected thread with CLI, so
-frontends used the `-thread-select' to execute commands in the right
+frontends used the '-thread-select' to execute commands in the right
 context.  However, getting this to work right is cumbersome.  The
-simplest way is for frontend to emit `-thread-select' command before
+simplest way is for frontend to emit '-thread-select' command before
 every command.  This doubles the number of commands that need to be
-sent.  The alternative approach is to suppress `-thread-select' if the
+sent.  The alternative approach is to suppress '-thread-select' if the
 selected thread in GDB is supposed to be identical to the thread the
 frontend wants to operate on.  However, getting this optimization right
-can be tricky.  In particular, if the frontend sends several commands
-to GDB, and one of the commands changes the selected thread, then the
+can be tricky.  In particular, if the frontend sends several commands to
+GDB, and one of the commands changes the selected thread, then the
 behaviour of subsequent commands will change.  So, a frontend should
 either wait for response from such problematic commands, or explicitly
-add `-thread-select' for all subsequent commands.  No frontend is known
+add '-thread-select' for all subsequent commands.  No frontend is known
 to do this exactly right, so it is suggested to just always pass the
-`--thread' and `--frame' options.
+'--thread' and '--frame' options.
 
 27.1.1.2 Language
 .................
@@ -560,16 +1248,16 @@ to do this exactly right, so it is sugge
 The execution of several commands depends on which language is selected.
 By default, the current language (*note show language::) is used.  But
 for commands known to be language-sensitive, it is recommended to use
-the `--language' option.  This option takes one argument, which is the
+the '--language' option.  This option takes one argument, which is the
 name of the language to use while executing the command.  For instance:
 
      -data-evaluate-expression --language c "sizeof (void*)"
      ^done,value="4"
      (gdb)
 
-   The valid language names are the same names accepted by the `set
-language' command (*note Manually::), excluding `auto', `local' or
-`unknown'.
+   The valid language names are the same names accepted by the 'set
+language' command (*note Manually::), excluding 'auto', 'local' or
+'unknown'.
 
 
 File: gdb.info,  Node: Asynchronous and non-stop modes,  Next: Thread groups,  Prev: Context management,  Up: GDB/MI General Design
@@ -577,34 +1265,33 @@ File: gdb.info,  Node: Asynchronous and 
 27.1.2 Asynchronous command execution and non-stop mode
 -------------------------------------------------------
 
-On some targets, GDB is capable of processing MI commands even while
-the target is running.  This is called "asynchronous command execution"
+On some targets, GDB is capable of processing MI commands even while the
+target is running.  This is called "asynchronous command execution"
 (*note Background Execution::).  The frontend may specify a preferrence
-for asynchronous execution using the `-gdb-set mi-async 1' command,
+for asynchronous execution using the '-gdb-set mi-async 1' command,
 which should be emitted before either running the executable or
 attaching to the target.  After the frontend has started the executable
 or attached to the target, it can find if asynchronous execution is
-enabled using the `-list-target-features' command.
-
-`-gdb-set mi-async on'
+enabled using the '-list-target-features' command.
 
-`-gdb-set mi-async off'
+'-gdb-set mi-async on'
+'-gdb-set mi-async off'
      Set whether MI is in asynchronous mode.
 
-     When `off', which is the default, MI execution commands (e.g.,
-     `-exec-continue') are foreground commands, and GDB waits for the
+     When 'off', which is the default, MI execution commands (e.g.,
+     '-exec-continue') are foreground commands, and GDB waits for the
      program to stop before processing further commands.
 
-     When `on', MI execution commands are background execution commands
-     (e.g., `-exec-continue' becomes the equivalent of the `c&' CLI
+     When 'on', MI execution commands are background execution commands
+     (e.g., '-exec-continue' becomes the equivalent of the 'c&' CLI
      command), and so GDB is capable of processing MI commands even
      while the target is running.
 
-`-gdb-show mi-async'
+'-gdb-show mi-async'
      Show whether MI asynchronous mode is enabled.
 
    Note: In GDB version 7.7 and earlier, this option was called
-`target-async' instead of `mi-async', and it had the effect of both
+'target-async' instead of 'mi-async', and it had the effect of both
 putting MI in asynchronous mode and making CLI background commands
 possible.  CLI background commands are now always possible "out of the
 box" if the target supports them.  The old spelling is kept as a
@@ -621,15 +1308,15 @@ target in the context of that thread may
 some targets.  In particular, commands that try to operate on thread's
 stack will not work, on any target.  Commands that read memory, or
 modify breakpoints, may work or not work, depending on the target.  Note
-that even commands that operate on global state, such as `print',
-`set', and breakpoint commands, still access the target in the context
-of a specific thread,  so frontend should try to find a stopped thread
-and perform the operation on that thread (using the `--thread' option).
-
-   Which commands will work in the context of a running thread is
-highly target dependent.  However, the two commands `-exec-interrupt',
-to stop a thread, and `-thread-info', to find the state of a thread,
-will always work.
+that even commands that operate on global state, such as 'print', 'set',
+and breakpoint commands, still access the target in the context of a
+specific thread, so frontend should try to find a stopped thread and
+perform the operation on that thread (using the '--thread' option).
+
+   Which commands will work in the context of a running thread is highly
+target dependent.  However, the two commands '-exec-interrupt', to stop
+a thread, and '-thread-info', to find the state of a thread, will always
+work.
 
 
 File: gdb.info,  Node: Thread groups,  Prev: Asynchronous and non-stop modes,  Up: GDB/MI General Design
@@ -645,34 +1332,33 @@ debugging scenarios.
 
    The key observation is that regardless of the structure of the
 target, MI can have a global list of threads, because most commands that
-accept the `--thread' option do not need to know what process that
+accept the '--thread' option do not need to know what process that
 thread belongs to.  Therefore, it is not necessary to introduce neither
-additional `--process' option, nor an notion of the current process in
-the MI interface.  The only strictly new feature that is required is
-the ability to find how the threads are grouped into processes.
+additional '--process' option, nor an notion of the current process in
+the MI interface.  The only strictly new feature that is required is the
+ability to find how the threads are grouped into processes.
 
    To allow the user to discover such grouping, and to support arbitrary
 hierarchy of machines/cores/processes, MI introduces the concept of a
 "thread group".  Thread group is a collection of threads and other
 thread groups.  A thread group always has a string identifier, a type,
-and may have additional attributes specific to the type.  A new
-command, `-list-thread-groups', returns the list of top-level thread
-groups, which correspond to processes that GDB is debugging at the
-moment.  By passing an identifier of a thread group to the
-`-list-thread-groups' command, it is possible to obtain the members of
-specific thread group.
+and may have additional attributes specific to the type.  A new command,
+'-list-thread-groups', returns the list of top-level thread groups,
+which correspond to processes that GDB is debugging at the moment.  By
+passing an identifier of a thread group to the '-list-thread-groups'
+command, it is possible to obtain the members of specific thread group.
 
    To allow the user to easily discover processes, and other objects, he
 wishes to debug, a concept of "available thread group" is introduced.
-Available thread group is an thread group that GDB is not debugging,
-but that can be attached to, using the `-target-attach' command.  The
-list of available top-level thread groups can be obtained using
-`-list-thread-groups --available'.  In general, the content of a thread
+Available thread group is an thread group that GDB is not debugging, but
+that can be attached to, using the '-target-attach' command.  The list
+of available top-level thread groups can be obtained using
+'-list-thread-groups --available'.  In general, the content of a thread
 group may be only retrieved only after attaching to that thread group.
 
    Thread groups are related to inferiors (*note Inferiors and
 Programs::).  Each inferior corresponds to a thread group of a special
-type `process', and some additional operations are permitted on such
+type 'process', and some additional operations are permitted on such
 thread groups.
 
 
@@ -692,52 +1378,52 @@ File: gdb.info,  Node: GDB/MI Input Synt
 27.2.1 GDB/MI Input Syntax
 --------------------------
 
-`COMMAND ==>'
-     `CLI-COMMAND | MI-COMMAND'
+'COMMAND ==>'
+     'CLI-COMMAND | MI-COMMAND'
 
-`CLI-COMMAND ==>'
-     `[ TOKEN ] CLI-COMMAND NL', where CLI-COMMAND is any existing GDB
+'CLI-COMMAND ==>'
+     '[ TOKEN ] CLI-COMMAND NL', where CLI-COMMAND is any existing GDB
      CLI command.
 
-`MI-COMMAND ==>'
-     `[ TOKEN ] "-" OPERATION ( " " OPTION )* `[' " --" `]' ( " "
-     PARAMETER )* NL'
+'MI-COMMAND ==>'
+     '[ TOKEN ] "-" OPERATION ( " " OPTION )* [ " --" ] ( " " PARAMETER
+     )* NL'
 
-`TOKEN ==>'
+'TOKEN ==>'
      "any sequence of digits"
 
-`OPTION ==>'
-     `"-" PARAMETER [ " " PARAMETER ]'
+'OPTION ==>'
+     '"-" PARAMETER [ " " PARAMETER ]'
 
-`PARAMETER ==>'
-     `NON-BLANK-SEQUENCE | C-STRING'
+'PARAMETER ==>'
+     'NON-BLANK-SEQUENCE | C-STRING'
 
-`OPERATION ==>'
+'OPERATION ==>'
      _any of the operations described in this chapter_
 
-`NON-BLANK-SEQUENCE ==>'
+'NON-BLANK-SEQUENCE ==>'
      _anything, provided it doesn't contain special characters such as
      "-", NL, """ and of course " "_
 
-`C-STRING ==>'
-     `""" SEVEN-BIT-ISO-C-STRING-CONTENT """'
+'C-STRING ==>'
+     '""" SEVEN-BIT-ISO-C-STRING-CONTENT """'
 
-`NL ==>'
-     `CR | CR-LF'
+'NL ==>'
+     'CR | CR-LF'
 
 Notes:
 
    * The CLI commands are still handled by the MI interpreter; their
      output is described below.
 
-   * The `TOKEN', when present, is passed back when the command
+   * The 'TOKEN', when present, is passed back when the command
      finishes.
 
    * Some MI commands accept optional arguments as part of the parameter
-     list.  Each option is identified by a leading `-' (dash) and may be
-     followed by an optional argument parameter.  Options occur first
-     in the parameter list and can be delimited from normal parameters
-     using `--' (this is useful when some parameters begin with a dash).
+     list.  Each option is identified by a leading '-' (dash) and may be
+     followed by an optional argument parameter.  Options occur first in
+     the parameter list and can be delimited from normal parameters
+     using '--' (this is useful when some parameters begin with a dash).
 
    Pragmatics:
 
@@ -754,85 +1440,85 @@ File: gdb.info,  Node: GDB/MI Output Syn
 The output from GDB/MI consists of zero or more out-of-band records
 followed, optionally, by a single result record.  This result record is
 for the most recent command.  The sequence of output records is
-terminated by `(gdb)'.
+terminated by '(gdb)'.
 
-   If an input command was prefixed with a `TOKEN' then the
+   If an input command was prefixed with a 'TOKEN' then the
 corresponding output for that command will also be prefixed by that same
 TOKEN.
 
-`OUTPUT ==>'
-     `( OUT-OF-BAND-RECORD )* [ RESULT-RECORD ] "(gdb)" NL'
+'OUTPUT ==>'
+     '( OUT-OF-BAND-RECORD )* [ RESULT-RECORD ] "(gdb)" NL'
 
-`RESULT-RECORD ==>'
-     ` [ TOKEN ] "^" RESULT-CLASS ( "," RESULT )* NL'
+'RESULT-RECORD ==>'
+     ' [ TOKEN ] "^" RESULT-CLASS ( "," RESULT )* NL'
 
-`OUT-OF-BAND-RECORD ==>'
-     `ASYNC-RECORD | STREAM-RECORD'
+'OUT-OF-BAND-RECORD ==>'
+     'ASYNC-RECORD | STREAM-RECORD'
 
-`ASYNC-RECORD ==>'
-     `EXEC-ASYNC-OUTPUT | STATUS-ASYNC-OUTPUT | NOTIFY-ASYNC-OUTPUT'
+'ASYNC-RECORD ==>'
+     'EXEC-ASYNC-OUTPUT | STATUS-ASYNC-OUTPUT | NOTIFY-ASYNC-OUTPUT'
 
-`EXEC-ASYNC-OUTPUT ==>'
-     `[ TOKEN ] "*" ASYNC-OUTPUT NL'
+'EXEC-ASYNC-OUTPUT ==>'
+     '[ TOKEN ] "*" ASYNC-OUTPUT NL'
 
-`STATUS-ASYNC-OUTPUT ==>'
-     `[ TOKEN ] "+" ASYNC-OUTPUT NL'
+'STATUS-ASYNC-OUTPUT ==>'
+     '[ TOKEN ] "+" ASYNC-OUTPUT NL'
 
-`NOTIFY-ASYNC-OUTPUT ==>'
-     `[ TOKEN ] "=" ASYNC-OUTPUT NL'
+'NOTIFY-ASYNC-OUTPUT ==>'
+     '[ TOKEN ] "=" ASYNC-OUTPUT NL'
 
-`ASYNC-OUTPUT ==>'
-     `ASYNC-CLASS ( "," RESULT )*'
+'ASYNC-OUTPUT ==>'
+     'ASYNC-CLASS ( "," RESULT )*'
 
-`RESULT-CLASS ==>'
-     `"done" | "running" | "connected" | "error" | "exit"'
+'RESULT-CLASS ==>'
+     '"done" | "running" | "connected" | "error" | "exit"'
 
-`ASYNC-CLASS ==>'
-     `"stopped" | OTHERS' (where OTHERS will be added depending on the
+'ASYNC-CLASS ==>'
+     '"stopped" | OTHERS' (where OTHERS will be added depending on the
      needs--this is still in development).
 
-`RESULT ==>'
-     ` VARIABLE "=" VALUE'
+'RESULT ==>'
+     ' VARIABLE "=" VALUE'
 
-`VARIABLE ==>'
-     ` STRING '
+'VARIABLE ==>'
+     ' STRING '
 
-`VALUE ==>'
-     ` CONST | TUPLE | LIST '
+'VALUE ==>'
+     ' CONST | TUPLE | LIST '
 
-`CONST ==>'
-     `C-STRING'
+'CONST ==>'
+     'C-STRING'
 
-`TUPLE ==>'
-     ` "{}" | "{" RESULT ( "," RESULT )* "}" '
+'TUPLE ==>'
+     ' "{}" | "{" RESULT ( "," RESULT )* "}" '
 
-`LIST ==>'
-     ` "[]" | "[" VALUE ( "," VALUE )* "]" | "[" RESULT ( "," RESULT )*
+'LIST ==>'
+     ' "[]" | "[" VALUE ( "," VALUE )* "]" | "[" RESULT ( "," RESULT )*
      "]" '
 
-`STREAM-RECORD ==>'
-     `CONSOLE-STREAM-OUTPUT | TARGET-STREAM-OUTPUT | LOG-STREAM-OUTPUT'
+'STREAM-RECORD ==>'
+     'CONSOLE-STREAM-OUTPUT | TARGET-STREAM-OUTPUT | LOG-STREAM-OUTPUT'
 
-`CONSOLE-STREAM-OUTPUT ==>'
-     `"~" C-STRING NL'
+'CONSOLE-STREAM-OUTPUT ==>'
+     '"~" C-STRING NL'
 
-`TARGET-STREAM-OUTPUT ==>'
-     `"@" C-STRING NL'
+'TARGET-STREAM-OUTPUT ==>'
+     '"@" C-STRING NL'
 
-`LOG-STREAM-OUTPUT ==>'
-     `"&" C-STRING NL'
+'LOG-STREAM-OUTPUT ==>'
+     '"&" C-STRING NL'
 
-`NL ==>'
-     `CR | CR-LF'
+'NL ==>'
+     'CR | CR-LF'
 
-`TOKEN ==>'
+'TOKEN ==>'
      _any sequence of digits_.
 
 Notes:
 
    * All output sequences end in a single line containing a period.
 
-   * The `TOKEN' is from the corresponding request.  Note that for all
+   * The 'TOKEN' is from the corresponding request.  Note that for all
      async output, while the token is allowed by the grammar and may be
      output by future versions of GDB for select async output messages,
      it is generally omitted.  Frontends should treat all async output
@@ -841,30 +1527,29 @@ Notes:
 
    * STATUS-ASYNC-OUTPUT contains on-going status information about the
      progress of a slow operation.  It can be discarded.  All status
-     output is prefixed by `+'.
+     output is prefixed by '+'.
 
    * EXEC-ASYNC-OUTPUT contains asynchronous state change on the target
      (stopped, started, disappeared).  All async output is prefixed by
-     `*'.
+     '*'.
 
    * NOTIFY-ASYNC-OUTPUT contains supplementary information that the
      client should handle (e.g., a new breakpoint information).  All
-     notify output is prefixed by `='.
+     notify output is prefixed by '='.
 
    * CONSOLE-STREAM-OUTPUT is output that should be displayed as is in
-     the console.  It is the textual response to a CLI command.  All
-     the console output is prefixed by `~'.
+     the console.  It is the textual response to a CLI command.  All the
+     console output is prefixed by '~'.
 
    * TARGET-STREAM-OUTPUT is the output produced by the target program.
-     All the target output is prefixed by `@'.
+     All the target output is prefixed by '@'.
 
    * LOG-STREAM-OUTPUT is output text coming from GDB's internals, for
-     instance messages that should be displayed as part of an error
-     log.  All the log output is prefixed by `&'.
+     instance messages that should be displayed as part of an error log.
+     All the log output is prefixed by '&'.
 
    * New GDB/MI commands should only output LISTS containing VALUES.
 
-
    *Note GDB/MI Stream Records: GDB/MI Stream Records, for more details
 about the various output records.
 
@@ -874,15 +1559,15 @@ File: gdb.info,  Node: GDB/MI Compatibil
 27.3 GDB/MI Compatibility with CLI
 ==================================
 
-For the developers convenience CLI commands can be entered directly,
-but there may be some unexpected behaviour.  For example, commands that
+For the developers convenience CLI commands can be entered directly, but
+there may be some unexpected behaviour.  For example, commands that
 query the user will behave as if the user replied yes, breakpoint
-command lists are not executed and some CLI commands, such as `if',
-`when' and `define', prompt for further input with `>', which is not
+command lists are not executed and some CLI commands, such as 'if',
+'when' and 'define', prompt for further input with '>', which is not
 valid MI output.
 
    This feature may be removed at some stage in the future and it is
-recommended that front ends use the `-interpreter-exec' command (*note
+recommended that front ends use the '-interpreter-exec' command (*note
 -interpreter-exec::).
 
 
@@ -900,27 +1585,26 @@ functionality without breaking existing 
 minimize the problems by describing how the protocol might change.
 
    Some changes in MI need not break a carefully designed front end, and
-for these the MI version will remain unchanged.  The following is a
-list of changes that may occur within one level, so front ends should
-parse MI output in a way that can handle them:
+for these the MI version will remain unchanged.  The following is a list
+of changes that may occur within one level, so front ends should parse
+MI output in a way that can handle them:
 
    * New MI commands may be added.
 
    * New fields may be added to the output of any MI command.
 
    * The range of values for fields with specified values, e.g.,
-     `in_scope' (*note -var-update::) may be extended.
-
+     'in_scope' (*note -var-update::) may be extended.
 
    If the changes are likely to break front ends, the MI version level
 will be increased by one.  This will allow the front end to parse the
-output according to the MI version.  Apart from mi0, new versions of
-GDB will not support old versions of MI and it will be the
-responsibility of the front end to work with the new one.
+output according to the MI version.  Apart from mi0, new versions of GDB
+will not support old versions of MI and it will be the responsibility of
+the front end to work with the new one.
 
    The best way to avoid unexpected changes in MI that might break your
 front end is to make your project known to GDB developers and follow
-development on <gdb@sourceware.org> and <gdb-patches@sourceware.org>.  
+development on <gdb@sourceware.org> and <gdb-patches@sourceware.org>.
 
 
 File: gdb.info,  Node: GDB/MI Output Records,  Next: GDB/MI Simple Examples,  Prev: GDB/MI Development and Front Ends,  Up: GDB/MI
@@ -947,36 +1631,35 @@ File: gdb.info,  Node: GDB/MI Result Rec
 In addition to a number of out-of-band notifications, the response to a
 GDB/MI command includes one of the following result indications:
 
-`"^done" [ "," RESULTS ]'
-     The synchronous operation was successful, `RESULTS' are the return
+'"^done" [ "," RESULTS ]'
+     The synchronous operation was successful, 'RESULTS' are the return
      values.
 
-`"^running"'
-     This result record is equivalent to `^done'.  Historically, it was
-     output instead of `^done' if the command has resumed the target.
+'"^running"'
+     This result record is equivalent to '^done'.  Historically, it was
+     output instead of '^done' if the command has resumed the target.
      This behaviour is maintained for backward compatibility, but all
-     frontends should treat `^done' and `^running' identically and rely
-     on the `*running' output record to determine which threads are
+     frontends should treat '^done' and '^running' identically and rely
+     on the '*running' output record to determine which threads are
      resumed.
 
-`"^connected"'
+'"^connected"'
      GDB has connected to a remote target.
 
-`"^error" "," "msg=" C-STRING [ "," "code=" C-STRING ]'
-     The operation failed.  The `msg=C-STRING' variable contains the
+'"^error" "," "msg=" C-STRING [ "," "code=" C-STRING ]'
+     The operation failed.  The 'msg=C-STRING' variable contains the
      corresponding error message.
 
-     If present, the `code=C-STRING' variable provides an error code on
+     If present, the 'code=C-STRING' variable provides an error code on
      which consumers can rely on to detect the corresponding error
      condition.  At present, only one error code is defined:
 
-    `"undefined-command"'
+     '"undefined-command"'
           Indicates that the command causing the error does not exist.
 
-`"^exit"'
+'"^exit"'
      GDB has terminated.
 
-
 
 File: gdb.info,  Node: GDB/MI Stream Records,  Next: GDB/MI Async Records,  Prev: GDB/MI Result Records,  Up: GDB/MI Output Records
 
@@ -990,21 +1673,21 @@ funneled through the GDB/MI interface us
    Each stream record begins with a unique "prefix character" which
 identifies its stream (*note GDB/MI Output Syntax: GDB/MI Output
 Syntax.).  In addition to the prefix, each stream record contains a
-`STRING-OUTPUT'.  This is either raw text (with an implicit new line)
-or a quoted C string (which does not contain an implicit newline).
+'STRING-OUTPUT'.  This is either raw text (with an implicit new line) or
+a quoted C string (which does not contain an implicit newline).
 
-`"~" STRING-OUTPUT'
-     The console output stream contains text that should be displayed
-     in the CLI console window.  It contains the textual responses to
-     CLI commands.
+'"~" STRING-OUTPUT'
+     The console output stream contains text that should be displayed in
+     the CLI console window.  It contains the textual responses to CLI
+     commands.
 
-`"@" STRING-OUTPUT'
+'"@" STRING-OUTPUT'
      The target output stream contains any textual output from the
      running target.  This is only present when GDB's event loop is
      truly asynchronous, which is currently only the case for remote
      targets.
 
-`"&" STRING-OUTPUT'
+'"&" STRING-OUTPUT'
      The log stream contains debugging messages being produced by GDB's
      internals.
 
@@ -1021,139 +1704,130 @@ activity (e.g., target stopped).
 
    The following is the list of possible async records:
 
-`*running,thread-id="THREAD"'
-     The target is now running.  The THREAD field tells which specific
-     thread is now running, and can be `all' if all threads are
-     running.  The frontend should assume that no interaction with a
-     running thread is possible after this notification is produced.
-     The frontend should not assume that this notification is output
-     only once for any command.  GDB may emit this notification several
-     times, either for different threads, because it cannot resume all
-     threads together, or even for a single thread, if the thread must
-     be stepped though some code before letting it run freely.
+'*running,thread-id="THREAD"'
+     The target is now running.  The THREAD field can be the global
+     thread ID of the the thread that is now running, and it can be
+     'all' if all threads are running.  The frontend should assume that
+     no interaction with a running thread is possible after this
+     notification is produced.  The frontend should not assume that this
+     notification is output only once for any command.  GDB may emit
+     this notification several times, either for different threads,
+     because it cannot resume all threads together, or even for a single
+     thread, if the thread must be stepped though some code before
+     letting it run freely.
 
-`*stopped,reason="REASON",thread-id="ID",stopped-threads="STOPPED",core="CORE"'
+'*stopped,reason="REASON",thread-id="ID",stopped-threads="STOPPED",core="CORE"'
      The target has stopped.  The REASON field can have one of the
      following values:
 
-    `breakpoint-hit'
+     'breakpoint-hit'
           A breakpoint was reached.
-
-    `watchpoint-trigger'
+     'watchpoint-trigger'
           A watchpoint was triggered.
-
-    `read-watchpoint-trigger'
+     'read-watchpoint-trigger'
           A read watchpoint was triggered.
-
-    `access-watchpoint-trigger'
+     'access-watchpoint-trigger'
           An access watchpoint was triggered.
-
-    `function-finished'
+     'function-finished'
           An -exec-finish or similar CLI command was accomplished.
-
-    `location-reached'
+     'location-reached'
           An -exec-until or similar CLI command was accomplished.
-
-    `watchpoint-scope'
+     'watchpoint-scope'
           A watchpoint has gone out of scope.
-
-    `end-stepping-range'
+     'end-stepping-range'
           An -exec-next, -exec-next-instruction, -exec-step,
           -exec-step-instruction or similar CLI command was
           accomplished.
-
-    `exited-signalled'
+     'exited-signalled'
           The inferior exited because of a signal.
-
-    `exited'
+     'exited'
           The inferior exited.
-
-    `exited-normally'
+     'exited-normally'
           The inferior exited normally.
-
-    `signal-received'
+     'signal-received'
           A signal was received by the inferior.
-
-    `solib-event'
+     'solib-event'
           The inferior has stopped due to a library being loaded or
-          unloaded.  This can happen when `stop-on-solib-events' (*note
-          Files::) is set or when a `catch load' or `catch unload'
+          unloaded.  This can happen when 'stop-on-solib-events' (*note
+          Files::) is set or when a 'catch load' or 'catch unload'
           catchpoint is in use (*note Set Catchpoints::).
-
-    `fork'
-          The inferior has forked.  This is reported when `catch fork'
+     'fork'
+          The inferior has forked.  This is reported when 'catch fork'
           (*note Set Catchpoints::) has been used.
-
-    `vfork'
-          The inferior has vforked.  This is reported in when `catch
+     'vfork'
+          The inferior has vforked.  This is reported in when 'catch
           vfork' (*note Set Catchpoints::) has been used.
-
-    `syscall-entry'
+     'syscall-entry'
           The inferior entered a system call.  This is reported when
-          `catch syscall' (*note Set Catchpoints::) has been used.
-
-    `syscall-return'
+          'catch syscall' (*note Set Catchpoints::) has been used.
+     'syscall-return'
           The inferior returned from a system call.  This is reported
-          when `catch syscall' (*note Set Catchpoints::) has been used.
-
-    `exec'
-          The inferior called `exec'.  This is reported when `catch
+          when 'catch syscall' (*note Set Catchpoints::) has been used.
+     'exec'
+          The inferior called 'exec'.  This is reported when 'catch
           exec' (*note Set Catchpoints::) has been used.
 
-     The ID field identifies the thread that directly caused the stop -
-     for example by hitting a breakpoint.  Depending on whether all-stop
-     mode is in effect (*note All-Stop Mode::), GDB may either stop all
-     threads, or only the thread that directly triggered the stop.  If
-     all threads are stopped, the STOPPED field will have the value of
-     `"all"'.  Otherwise, the value of the STOPPED field will be a list
-     of thread identifiers.  Presently, this list will always include a
-     single thread, but frontend should be prepared to see several
-     threads in the list.  The CORE field reports the processor core on
-     which the stop event has happened.  This field may be absent if
-     such information is not available.
+     The ID field identifies the global thread ID of the thread that
+     directly caused the stop - for example by hitting a breakpoint.
+     Depending on whether all-stop mode is in effect (*note All-Stop
+     Mode::), GDB may either stop all threads, or only the thread that
+     directly triggered the stop.  If all threads are stopped, the
+     STOPPED field will have the value of '"all"'.  Otherwise, the value
+     of the STOPPED field will be a list of thread identifiers.
+     Presently, this list will always include a single thread, but
+     frontend should be prepared to see several threads in the list.
+     The CORE field reports the processor core on which the stop event
+     has happened.  This field may be absent if such information is not
+     available.
 
-`=thread-group-added,id="ID"'
-`=thread-group-removed,id="ID"'
+'=thread-group-added,id="ID"'
+'=thread-group-removed,id="ID"'
      A thread group was either added or removed.  The ID field contains
      the GDB identifier of the thread group.  When a thread group is
-     added, it generally might not be associated with a running
-     process.  When a thread group is removed, its id becomes invalid
-     and cannot be used in any way.
+     added, it generally might not be associated with a running process.
+     When a thread group is removed, its id becomes invalid and cannot
+     be used in any way.
 
-`=thread-group-started,id="ID",pid="PID"'
+'=thread-group-started,id="ID",pid="PID"'
      A thread group became associated with a running program, either
      because the program was just started or the thread group was
-     attached to a program.  The ID field contains the GDB identifier
-     of the thread group.  The PID field contains process identifier,
+     attached to a program.  The ID field contains the GDB identifier of
+     the thread group.  The PID field contains process identifier,
      specific to the operating system.
 
-`=thread-group-exited,id="ID"[,exit-code="CODE"]'
+'=thread-group-exited,id="ID"[,exit-code="CODE"]'
      A thread group is no longer associated with a running program,
      either because the program has exited, or because it was detached
      from.  The ID field contains the GDB identifier of the thread
      group.  The CODE field is the exit code of the inferior; it exists
      only when the inferior exited with some code.
 
-`=thread-created,id="ID",group-id="GID"'
-`=thread-exited,id="ID",group-id="GID"'
+'=thread-created,id="ID",group-id="GID"'
+'=thread-exited,id="ID",group-id="GID"'
      A thread either was created, or has exited.  The ID field contains
-     the GDB identifier of the thread.  The GID field identifies the
-     thread group this thread belongs to.
+     the global GDB identifier of the thread.  The GID field identifies
+     the thread group this thread belongs to.
 
-`=thread-selected,id="ID"'
-     Informs that the selected thread was changed as result of the last
-     command.  This notification is not emitted as result of
-     `-thread-select' command but is emitted whenever an MI command
-     that is not documented to change the selected thread actually
-     changes it.  In particular, invoking, directly or indirectly (via
-     user-defined command), the CLI `thread' command, will generate
-     this notification.
+'=thread-selected,id="ID"[,frame="FRAME"]'
+     Informs that the selected thread or frame were changed.  This
+     notification is not emitted as result of the '-thread-select' or
+     '-stack-select-frame' commands, but is emitted whenever an MI
+     command that is not documented to change the selected thread and
+     frame actually changes them.  In particular, invoking, directly or
+     indirectly (via user-defined command), the CLI 'thread' or 'frame'
+     commands, will generate this notification.  Changing the thread or
+     frame from another user interface (see *note Interpreters::) will
+     also generate this notification.
+
+     The FRAME field is only present if the newly selected thread is
+     stopped.  See *note GDB/MI Frame Information:: for the format of
+     its value.
 
      We suggest that in response to this notification, front ends
      highlight the selected thread and cause subsequent commands to
      apply to that thread.
 
-`=library-loaded,...'
+'=library-loaded,...'
      Reports that a new library file was loaded by the program.  This
      notification has 4 fields--ID, TARGET-NAME, HOST-NAME, and
      SYMBOLS-LOADED.  The ID field is an opaque identifier of the
@@ -1163,43 +1837,43 @@ activity (e.g., target stopped).
      the same value.  The SYMBOLS-LOADED field is emitted only for
      backward compatibility and should not be relied on to convey any
      useful information.  The THREAD-GROUP field, if present, specifies
-     the id of the thread group in whose context the library was
-     loaded.  If the field is absent, it means the library was loaded
-     in the context of all present thread groups.
+     the id of the thread group in whose context the library was loaded.
+     If the field is absent, it means the library was loaded in the
+     context of all present thread groups.
 
-`=library-unloaded,...'
+'=library-unloaded,...'
      Reports that a library was unloaded by the program.  This
      notification has 3 fields--ID, TARGET-NAME and HOST-NAME with the
-     same meaning as for the `=library-loaded' notification.  The
+     same meaning as for the '=library-loaded' notification.  The
      THREAD-GROUP field, if present, specifies the id of the thread
      group in whose context the library was unloaded.  If the field is
      absent, it means the library was unloaded in the context of all
      present thread groups.
 
-`=traceframe-changed,num=TFNUM,tracepoint=TPNUM'
-`=traceframe-changed,end'
+'=traceframe-changed,num=TFNUM,tracepoint=TPNUM'
+'=traceframe-changed,end'
      Reports that the trace frame was changed and its new number is
      TFNUM.  The number of the tracepoint associated with this trace
      frame is TPNUM.
 
-`=tsv-created,name=NAME,initial=INITIAL'
+'=tsv-created,name=NAME,initial=INITIAL'
      Reports that the new trace state variable NAME is created with
      initial value INITIAL.
 
-`=tsv-deleted,name=NAME'
-`=tsv-deleted'
+'=tsv-deleted,name=NAME'
+'=tsv-deleted'
      Reports that the trace state variable NAME is deleted or all trace
      state variables are deleted.
 
-`=tsv-modified,name=NAME,initial=INITIAL[,current=CURRENT]'
+'=tsv-modified,name=NAME,initial=INITIAL[,current=CURRENT]'
      Reports that the trace state variable NAME is modified with the
-     initial value INITIAL. The current value CURRENT of trace state
+     initial value INITIAL.  The current value CURRENT of trace state
      variable is optional and is reported if the current value of trace
      state variable is known.
 
-`=breakpoint-created,bkpt={...}'
-`=breakpoint-modified,bkpt={...}'
-`=breakpoint-deleted,id=NUMBER'
+'=breakpoint-created,bkpt={...}'
+'=breakpoint-modified,bkpt={...}'
+'=breakpoint-deleted,id=NUMBER'
      Reports that a breakpoint was created, modified, or deleted,
      respectively.  Only user-visible breakpoints are reported to the MI
      user.
@@ -1211,24 +1885,28 @@ activity (e.g., target stopped).
      Note that if a breakpoint is emitted in the result record of a
      command, then it will not also be emitted in an async record.
 
-`=record-started,thread-group="ID"'
-`=record-stopped,thread-group="ID"'
+'=record-started,thread-group="ID",method="METHOD"[,format="FORMAT"]'
+'=record-stopped,thread-group="ID"'
      Execution log recording was either started or stopped on an
      inferior.  The ID is the GDB identifier of the thread group
      corresponding to the affected inferior.
 
-`=cmd-param-changed,param=PARAM,value=VALUE'
-     Reports that a parameter of the command `set PARAM' is changed to
-     VALUE.  In the multi-word `set' command, the PARAM is the whole
-     parameter list to `set' command.  For example, In command `set
-     check type on', PARAM is `check type' and VALUE is `on'.
+     The METHOD field indicates the method used to record execution.  If
+     the method in use supports multiple recording formats, FORMAT will
+     be present and contain the currently used format.  *Note Process
+     Record and Replay::, for existing method and format values.
+
+'=cmd-param-changed,param=PARAM,value=VALUE'
+     Reports that a parameter of the command 'set PARAM' is changed to
+     VALUE.  In the multi-word 'set' command, the PARAM is the whole
+     parameter list to 'set' command.  For example, In command 'set
+     check type on', PARAM is 'check type' and VALUE is 'on'.
 
-`=memory-changed,thread-group=ID,addr=ADDR,len=LEN[,type="code"]'
+'=memory-changed,thread-group=ID,addr=ADDR,len=LEN[,type="code"]'
      Reports that bytes from ADDR to DATA + LEN were written in an
      inferior.  The ID is the identifier of the thread group
-     corresponding to the affected inferior.  The optional
-     `type="code"' part is reported if the memory written to holds
-     executable code.
+     corresponding to the affected inferior.  The optional 'type="code"'
+     part is reported if the memory written to holds executable code.
 
 
 File: gdb.info,  Node: GDB/MI Breakpoint Information,  Next: GDB/MI Frame Information,  Prev: GDB/MI Async Records,  Up: GDB/MI Output Records
@@ -1239,113 +1917,112 @@ File: gdb.info,  Node: GDB/MI Breakpoint
 When GDB reports information about a breakpoint, a tracepoint, a
 watchpoint, or a catchpoint, it uses a tuple with the following fields:
 
-`number'
+'number'
      The breakpoint number.  For a breakpoint that represents one
      location of a multi-location breakpoint, this will be a dotted
-     pair, like `1.2'.
+     pair, like '1.2'.
 
-`type'
+'type'
      The type of the breakpoint.  For ordinary breakpoints this will be
-     `breakpoint', but many values are possible.
+     'breakpoint', but many values are possible.
 
-`catch-type'
-     If the type of the breakpoint is `catchpoint', then this indicates
+'catch-type'
+     If the type of the breakpoint is 'catchpoint', then this indicates
      the exact type of catchpoint.
 
-`disp'
-     This is the breakpoint disposition--either `del', meaning that the
-     breakpoint will be deleted at the next stop, or `keep', meaning
+'disp'
+     This is the breakpoint disposition--either 'del', meaning that the
+     breakpoint will be deleted at the next stop, or 'keep', meaning
      that the breakpoint will not be deleted.
 
-`enabled'
+'enabled'
      This indicates whether the breakpoint is enabled, in which case the
-     value is `y', or disabled, in which case the value is `n'.  Note
-     that this is not the same as the field `enable'.
+     value is 'y', or disabled, in which case the value is 'n'.  Note
+     that this is not the same as the field 'enable'.
 
-`addr'
+'addr'
      The address of the breakpoint.  This may be a hexidecimal number,
-     giving the address; or the string `<PENDING>', for a pending
-     breakpoint; or the string `<MULTIPLE>', for a breakpoint with
+     giving the address; or the string '<PENDING>', for a pending
+     breakpoint; or the string '<MULTIPLE>', for a breakpoint with
      multiple locations.  This field will not be present if no address
      can be determined.  For example, a watchpoint does not have an
      address.
 
-`func'
+'func'
      If known, the function in which the breakpoint appears.  If not
      known, this field is not present.
 
-`filename'
+'filename'
      The name of the source file which contains this function, if known.
      If not known, this field is not present.
 
-`fullname'
-     The full file name of the source file which contains this
-     function, if known.  If not known, this field is not present.
-
-`line'
-     The line number at which this breakpoint appears, if known.  If
-     not known, this field is not present.
+'fullname'
+     The full file name of the source file which contains this function,
+     if known.  If not known, this field is not present.
+
+'line'
+     The line number at which this breakpoint appears, if known.  If not
+     known, this field is not present.
 
-`at'
+'at'
      If the source file is not known, this field may be provided.  If
      provided, this holds the address of the breakpoint, possibly
      followed by a symbol name.
 
-`pending'
+'pending'
      If this breakpoint is pending, this field is present and holds the
      text used to set the breakpoint, as entered by the user.
 
-`evaluated-by'
-     Where this breakpoint's condition is evaluated, either `host' or
-     `target'.
+'evaluated-by'
+     Where this breakpoint's condition is evaluated, either 'host' or
+     'target'.
 
-`thread'
+'thread'
      If this is a thread-specific breakpoint, then this identifies the
      thread in which the breakpoint can trigger.
 
-`task'
+'task'
      If this breakpoint is restricted to a particular Ada task, then
      this field will hold the task identifier.
 
-`cond'
+'cond'
      If the breakpoint is conditional, this is the condition expression.
 
-`ignore'
+'ignore'
      The ignore count of the breakpoint.
 
-`enable'
+'enable'
      The enable count of the breakpoint.
 
-`traceframe-usage'
+'traceframe-usage'
      FIXME.
 
-`static-tracepoint-marker-string-id'
+'static-tracepoint-marker-string-id'
      For a static tracepoint, the name of the static tracepoint marker.
 
-`mask'
+'mask'
      For a masked watchpoint, this is the mask.
 
-`pass'
+'pass'
      A tracepoint's pass count.
 
-`original-location'
+'original-location'
      The location of the breakpoint as originally specified by the user.
      This field is optional.
 
-`times'
+'times'
      The number of times the breakpoint has been hit.
 
-`installed'
-     This field is only given for tracepoints.  This is either `y',
-     meaning that the tracepoint is installed, or `n', meaning that it
+'installed'
+     This field is only given for tracepoints.  This is either 'y',
+     meaning that the tracepoint is installed, or 'n', meaning that it
      is not.
 
-`what'
+'what'
      Some extra data, the exact contents of which are type-dependent.
 
-
-   For example, here is what the output of `-break-insert' (*note
-GDB/MI Breakpoint Commands::) might be:
+   For example, here is what the output of '-break-insert' (*note GDB/MI
+Breakpoint Commands::) might be:
 
      -> -break-insert main
      <- ^done,bkpt={number="1",type="breakpoint",disp="keep",
@@ -1363,31 +2040,30 @@ File: gdb.info,  Node: GDB/MI Frame Info
 Response from many MI commands includes an information about stack
 frame.  This information is a tuple that may have the following fields:
 
-`level'
+'level'
      The level of the stack frame.  The innermost frame has the level of
      zero.  This field is always present.
 
-`func'
+'func'
      The name of the function corresponding to the frame.  This field
      may be absent if GDB is unable to determine the function name.
 
-`addr'
+'addr'
      The code address for the frame.  This field is always present.
 
-`file'
+'file'
      The name of the source files that correspond to the frame's code
      address.  This field may be absent.
 
-`line'
+'line'
      The source line corresponding to the frames' code address.  This
      field may be absent.
 
-`from'
+'from'
      The name of the binary file (either executable or shared library)
      the corresponds to the frame's code address.  This field may be
      absent.
 
-
 
 File: gdb.info,  Node: GDB/MI Thread Information,  Next: GDB/MI Ada Exception Information,  Prev: GDB/MI Frame Information,  Up: GDB/MI Output Records
 
@@ -1397,24 +2073,24 @@ File: gdb.info,  Node: GDB/MI Thread Inf
 Whenever GDB has to report an information about a thread, it uses a
 tuple with the following fields:
 
-`id'
-     The numeric id assigned to the thread by GDB.  This field is
+'id'
+     The global numeric id assigned to the thread by GDB.  This field is
      always present.
 
-`target-id'
+'target-id'
      Target-specific string identifying the thread.  This field is
      always present.
 
-`details'
-     Additional information about the thread provided by the target.
-     It is supposed to be human-readable and not interpreted by the
+'details'
+     Additional information about the thread provided by the target.  It
+     is supposed to be human-readable and not interpreted by the
      frontend.  This field is optional.
 
-`state'
-     Either `stopped' or `running', depending on whether the thread is
+'state'
+     Either 'stopped' or 'running', depending on whether the thread is
      presently running.  This field is always present.
 
-`core'
+'core'
      The value of this field is an integer number of the processor core
      the thread was last seen on.  This field is optional.
 
@@ -1424,10 +2100,10 @@ File: gdb.info,  Node: GDB/MI Ada Except
 27.5.7 GDB/MI Ada Exception Information
 ---------------------------------------
 
-Whenever a `*stopped' record is emitted because the program stopped
+Whenever a '*stopped' record is emitted because the program stopped
 after hitting an exception catchpoint (*note Set Catchpoints::), GDB
 provides the name of the exception that was raised via the
-`exception-name' field.
+'exception-name' field.
 
 
 File: gdb.info,  Node: GDB/MI Simple Examples,  Next: GDB/MI Command Description Format,  Prev: GDB/MI Output Records,  Up: GDB/MI
@@ -1436,8 +2112,8 @@ File: gdb.info,  Node: GDB/MI Simple Exa
 ==========================================
 
 This subsection presents several simple examples of interaction using
-the GDB/MI interface.  In these examples, `->' means that the following
-line is passed to GDB/MI as input, while `<-' means the output received
+the GDB/MI interface.  In these examples, '->' means that the following
+line is passed to GDB/MI as input, while '<-' means the output received
 from GDB/MI.
 
    Note the line breaks shown in the examples are here only for
@@ -1459,8 +2135,8 @@ detailed information of the breakpoint.
 Program Execution
 -----------------
 
-Program execution generates asynchronous records and MI gives the
-reason that execution stopped.
+Program execution generates asynchronous records and MI gives the reason
+that execution stopped.
 
      -> -exec-run
      <- ^running
@@ -1479,13 +2155,13 @@ reason that execution stopped.
 Quitting GDB
 ------------
 
-Quitting GDB just prints the result class `^exit'.
+Quitting GDB just prints the result class '^exit'.
 
      -> (gdb)
      <- -gdb-exit
      <- ^exit
 
-   Please note that `^exit' is printed immediately, but it might take
+   Please note that '^exit' is printed immediately, but it might take
 some time for GDB to actually exit.  During that time, GDB performs
 necessary cleanups, including killing programs being debugged or
 disconnecting from debug hardware, so the frontend should wait till GDB
@@ -1553,7 +2229,7 @@ File: gdb.info,  Node: GDB/MI Breakpoint
 
 This section documents GDB/MI commands for manipulating breakpoints.
 
-The `-break-after' Command
+The '-break-after' Command
 --------------------------
 
 Synopsis
@@ -1563,13 +2239,13 @@ Synopsis
 
    The breakpoint number NUMBER is not in effect until it has been hit
 COUNT times.  To see how this is reflected in the output of the
-`-break-list' command, see the description of the `-break-list' command
+'-break-list' command, see the description of the '-break-list' command
 below.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `ignore'.
+The corresponding GDB command is 'ignore'.
 
 Example
 .......
@@ -1598,7 +2274,7 @@ Example
      line="5",thread-groups=["i1"],times="0",ignore="3"}]}
      (gdb)
 
-The `-break-commands' Command
+The '-break-commands' Command
 -----------------------------
 
 Synopsis
@@ -1616,7 +2292,7 @@ breakpoint is hit and then continuing.
 GDB Command
 ...........
 
-The corresponding GDB command is `commands'.
+The corresponding GDB command is 'commands'.
 
 Example
 .......
@@ -1632,7 +2308,7 @@ Example
      ^done
      (gdb)
 
-The `-break-condition' Command
+The '-break-condition' Command
 ------------------------------
 
 Synopsis
@@ -1640,14 +2316,14 @@ Synopsis
 
       -break-condition NUMBER EXPR
 
-   Breakpoint NUMBER will stop the program only if the condition in
-EXPR is true.  The condition becomes part of the `-break-list' output
-(see the description of the `-break-list' command below).
+   Breakpoint NUMBER will stop the program only if the condition in EXPR
+is true.  The condition becomes part of the '-break-list' output (see
+the description of the '-break-list' command below).
 
 GDB Command
 ...........
 
-The corresponding GDB command is `condition'.
+The corresponding GDB command is 'condition'.
 
 Example
 .......
@@ -1669,7 +2345,7 @@ Example
      line="5",cond="1",thread-groups=["i1"],times="0",ignore="3"}]}
      (gdb)
 
-The `-break-delete' Command
+The '-break-delete' Command
 ---------------------------
 
 Synopsis
@@ -1683,7 +2359,7 @@ argument list.  This is obviously reflec
 GDB Command
 ...........
 
-The corresponding GDB command is `delete'.
+The corresponding GDB command is 'delete'.
 
 Example
 .......
@@ -1703,7 +2379,7 @@ Example
      body=[]}
      (gdb)
 
-The `-break-disable' Command
+The '-break-disable' Command
 ----------------------------
 
 Synopsis
@@ -1711,13 +2387,13 @@ Synopsis
 
       -break-disable ( BREAKPOINT )+
 
-   Disable the named BREAKPOINT(s).  The field `enabled' in the break
-list is now set to `n' for the named BREAKPOINT(s).
+   Disable the named BREAKPOINT(s).  The field 'enabled' in the break
+list is now set to 'n' for the named BREAKPOINT(s).
 
 GDB Command
 ...........
 
-The corresponding GDB command is `disable'.
+The corresponding GDB command is 'disable'.
 
 Example
 .......
@@ -1739,7 +2415,7 @@ Example
      line="5",thread-groups=["i1"],times="0"}]}
      (gdb)
 
-The `-break-enable' Command
+The '-break-enable' Command
 ---------------------------
 
 Synopsis
@@ -1752,7 +2428,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `enable'.
+The corresponding GDB command is 'enable'.
 
 Example
 .......
@@ -1774,7 +2450,7 @@ Example
      line="5",thread-groups=["i1"],times="0"}]}
      (gdb)
 
-The `-break-info' Command
+The '-break-info' Command
 -------------------------
 
 Synopsis
@@ -1791,14 +2467,14 @@ table.
 GDB Command
 ...........
 
-The corresponding GDB command is `info break BREAKPOINT'.
+The corresponding GDB command is 'info break BREAKPOINT'.
 
 Example
 .......
 
 N.A.
 
-The `-break-insert' Command
+The '-break-insert' Command
 ---------------------------
 
 Synopsis
@@ -1810,43 +2486,54 @@ Synopsis
 
 If specified, LOCATION, can be one of:
 
-   * function
+LINESPEC LOCATION
+     A linespec location.  *Note Linespec Locations::.
 
-   * filename:linenum
+EXPLICIT LOCATION
+     An explicit location.  GDB/MI explicit locations are analogous to
+     the CLI's explicit locations using the option names listed below.
+     *Note Explicit Locations::.
 
-   * filename:function
+     '--source FILENAME'
+          The source file name of the location.  This option requires
+          the use of either '--function' or '--line'.
 
-   * *address
+     '--function FUNCTION'
+          The name of a function or method.
 
-   The possible optional parameters of this command are:
+     '--label LABEL'
+          The name of a label.
 
-`-t'
-     Insert a temporary breakpoint.
+     '--line LINEOFFSET'
+          An absolute or relative line offset from the start of the
+          location.
 
-`-h'
-     Insert a hardware breakpoint.
+ADDRESS LOCATION
+     An address location, *ADDRESS.  *Note Address Locations::.
+
+The possible optional parameters of this command are:
 
-`-f'
+'-t'
+     Insert a temporary breakpoint.
+'-h'
+     Insert a hardware breakpoint.
+'-f'
      If LOCATION cannot be parsed (for example if it refers to unknown
-     files or functions), create a pending breakpoint. Without this
+     files or functions), create a pending breakpoint.  Without this
      flag, GDB will report an error, and won't create a breakpoint, if
      LOCATION cannot be parsed.
-
-`-d'
+'-d'
      Create a disabled breakpoint.
-
-`-a'
+'-a'
      Create a tracepoint.  *Note Tracepoints::.  When this parameter is
-     used together with `-h', a fast tracepoint is created.
-
-`-c CONDITION'
+     used together with '-h', a fast tracepoint is created.
+'-c CONDITION'
      Make the breakpoint conditional on CONDITION.
-
-`-i IGNORE-COUNT'
+'-i IGNORE-COUNT'
      Initialize the IGNORE-COUNT.
-
-`-p THREAD-ID'
-     Restrict the breakpoint to the specified THREAD-ID.
+'-p THREAD-ID'
+     Restrict the breakpoint to the thread with the specified global
+     THREAD-ID.
 
 Result
 ......
@@ -1859,8 +2546,8 @@ resulting breakpoint.
 GDB Command
 ...........
 
-The corresponding GDB commands are `break', `tbreak', `hbreak', and
-`thbreak'.
+The corresponding GDB commands are 'break', 'tbreak', 'hbreak', and
+'thbreak'.
 
 Example
 .......
@@ -1894,7 +2581,7 @@ Example
      times="0"}]}
      (gdb)
 
-The `-dprintf-insert' Command
+The '-dprintf-insert' Command
 -----------------------------
 
 Synopsis
@@ -1905,39 +2592,28 @@ Synopsis
          [ -p THREAD-ID ] [ LOCATION ] [ FORMAT ]
          [ ARGUMENT ]
 
-If specified, LOCATION, can be one of:
-
-   * FUNCTION
-
-   * FILENAME:LINENUM
-
-   * FILENAME:function
-
-   * *ADDRESS
+If supplied, LOCATION may be specified the same way as for the
+'-break-insert' command.  *Note -break-insert::.
 
    The possible optional parameters of this command are:
 
-`-t'
+'-t'
      Insert a temporary breakpoint.
-
-`-f'
+'-f'
      If LOCATION cannot be parsed (for example, if it refers to unknown
      files or functions), create a pending breakpoint.  Without this
      flag, GDB will report an error, and won't create a breakpoint, if
      LOCATION cannot be parsed.
-
-`-d'
+'-d'
      Create a disabled breakpoint.
-
-`-c CONDITION'
+'-c CONDITION'
      Make the breakpoint conditional on CONDITION.
-
-`-i IGNORE-COUNT'
+'-i IGNORE-COUNT'
      Set the ignore count of the breakpoint (*note ignore count:
-     Conditions.)  to IGNORE-COUNT.
-
-`-p THREAD-ID'
-     Restrict the breakpoint to the specified THREAD-ID.
+     Conditions.) to IGNORE-COUNT.
+'-p THREAD-ID'
+     Restrict the breakpoint to the thread with the specified global
+     THREAD-ID.
 
 Result
 ......
@@ -1948,7 +2624,7 @@ resulting breakpoint.
 GDB Command
 ...........
 
-The corresponding GDB command is `dprintf'.
+The corresponding GDB command is 'dprintf'.
 
 Example
 .......
@@ -1969,7 +2645,7 @@ Example
      original-location="mi-dprintf.c:26"}
      (gdb)
 
-The `-break-list' Command
+The '-break-list' Command
 -------------------------
 
 Synopsis
@@ -1980,39 +2656,32 @@ Synopsis
    Displays the list of inserted breakpoints, showing the following
 fields:
 
-`Number'
+'Number'
      number of the breakpoint
-
-`Type'
-     type of the breakpoint: `breakpoint' or `watchpoint'
-
-`Disposition'
-     should the breakpoint be deleted or disabled when it is hit: `keep'
-     or `nokeep'
-
-`Enabled'
-     is the breakpoint enabled or no: `y' or `n'
-
-`Address'
+'Type'
+     type of the breakpoint: 'breakpoint' or 'watchpoint'
+'Disposition'
+     should the breakpoint be deleted or disabled when it is hit: 'keep'
+     or 'nokeep'
+'Enabled'
+     is the breakpoint enabled or no: 'y' or 'n'
+'Address'
      memory location at which the breakpoint is set
-
-`What'
+'What'
      logical location of the breakpoint, expressed by function name,
      file name, line number
-
-`Thread-groups'
+'Thread-groups'
      list of thread groups to which this breakpoint applies
-
-`Times'
+'Times'
      number of times the breakpoint has been hit
 
-   If there are no breakpoints or watchpoints, the `BreakpointTable'
-`body' field is an empty list.
+   If there are no breakpoints or watchpoints, the 'BreakpointTable'
+'body' field is an empty list.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `info break'.
+The corresponding GDB command is 'info break'.
 
 Example
 .......
@@ -2048,7 +2717,7 @@ Example
      body=[]}
      (gdb)
 
-The `-break-passcount' Command
+The '-break-passcount' Command
 ------------------------------
 
 Synopsis
@@ -2058,9 +2727,9 @@ Synopsis
 
    Set the passcount for tracepoint TRACEPOINT-NUMBER to PASSCOUNT.  If
 the breakpoint referred to by TRACEPOINT-NUMBER is not a tracepoint,
-error is emitted.  This corresponds to CLI command `passcount'.
+error is emitted.  This corresponds to CLI command 'passcount'.
 
-The `-break-watch' Command
+The '-break-watch' Command
 --------------------------
 
 Synopsis
@@ -2068,27 +2737,27 @@ Synopsis
 
       -break-watch [ -a | -r ]
 
-   Create a watchpoint.  With the `-a' option it will create an
-"access" watchpoint, i.e., a watchpoint that triggers either on a read
-from or on a write to the memory location.  With the `-r' option, the
-watchpoint created is a "read" watchpoint, i.e., it will trigger only
-when the memory location is accessed for reading.  Without either of
-the options, the watchpoint created is a regular watchpoint, i.e., it
-will trigger when the memory location is accessed for writing.  *Note
-Setting Watchpoints: Set Watchpoints.
+   Create a watchpoint.  With the '-a' option it will create an "access"
+watchpoint, i.e., a watchpoint that triggers either on a read from or on
+a write to the memory location.  With the '-r' option, the watchpoint
+created is a "read" watchpoint, i.e., it will trigger only when the
+memory location is accessed for reading.  Without either of the options,
+the watchpoint created is a regular watchpoint, i.e., it will trigger
+when the memory location is accessed for writing.  *Note Setting
+Watchpoints: Set Watchpoints.
 
-   Note that `-break-list' will report a single list of watchpoints and
+   Note that '-break-list' will report a single list of watchpoints and
 breakpoints inserted.
 
 GDB Command
 ...........
 
-The corresponding GDB commands are `watch', `awatch', and `rwatch'.
+The corresponding GDB commands are 'watch', 'awatch', and 'rwatch'.
 
 Example
 .......
 
-Setting a watchpoint on a variable in the `main' function:
+Setting a watchpoint on a variable in the 'main' function:
 
      (gdb)
      -break-watch x
@@ -2104,8 +2773,8 @@ Setting a watchpoint on a variable in th
      (gdb)
 
    Setting a watchpoint on a variable local to a function.  GDB will
-stop the program execution twice: first for the variable changing
-value, then for the watchpoint going out of scope.
+stop the program execution twice: first for the variable changing value,
+then for the watchpoint going out of scope.
 
      (gdb)
      -break-watch C
@@ -2221,7 +2890,7 @@ File: gdb.info,  Node: Shared Library GD
 27.9.1 Shared Library GDB/MI Catchpoints
 ----------------------------------------
 
-The `-catch-load' Command
+The '-catch-load' Command
 -------------------------
 
 Synopsis
@@ -2229,16 +2898,16 @@ Synopsis
 
       -catch-load [ -t ] [ -d ] REGEXP
 
-   Add a catchpoint for library load events.  If the `-t' option is
+   Add a catchpoint for library load events.  If the '-t' option is
 used, the catchpoint is a temporary one (*note Setting Breakpoints: Set
-Breaks.).  If the `-d' option is used, the catchpoint is created in a
-disabled state.  The `regexp' argument is a regular expression used to
+Breaks.).  If the '-d' option is used, the catchpoint is created in a
+disabled state.  The 'regexp' argument is a regular expression used to
 match the name of the loaded library.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `catch load'.
+The corresponding GDB command is 'catch load'.
 
 Example
 .......
@@ -2248,7 +2917,7 @@ Example
      what="load of library matching foo.so",catch-type="load",times="0"}
      (gdb)
 
-The `-catch-unload' Command
+The '-catch-unload' Command
 ---------------------------
 
 Synopsis
@@ -2256,16 +2925,16 @@ Synopsis
 
       -catch-unload [ -t ] [ -d ] REGEXP
 
-   Add a catchpoint for library unload events.  If the `-t' option is
+   Add a catchpoint for library unload events.  If the '-t' option is
 used, the catchpoint is a temporary one (*note Setting Breakpoints: Set
-Breaks.).  If the `-d' option is used, the catchpoint is created in a
-disabled state.  The `regexp' argument is a regular expression used to
+Breaks.).  If the '-d' option is used, the catchpoint is created in a
+disabled state.  The 'regexp' argument is a regular expression used to
 match the name of the unloaded library.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `catch unload'.
+The corresponding GDB command is 'catch unload'.
 
 Example
 .......
@@ -2284,7 +2953,7 @@ File: gdb.info,  Node: Ada Exception GDB
 The following GDB/MI commands can be used to create catchpoints that
 stop the execution when Ada exceptions are being raised.
 
-The `-catch-assert' Command
+The '-catch-assert' Command
 ---------------------------
 
 Synopsis
@@ -2296,19 +2965,17 @@ Synopsis
 
    The possible optional parameters for this command are:
 
-`-c CONDITION'
+'-c CONDITION'
      Make the catchpoint conditional on CONDITION.
-
-`-d'
+'-d'
      Create a disabled catchpoint.
-
-`-t'
+'-t'
      Create a temporary catchpoint.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `catch assert'.
+The corresponding GDB command is 'catch assert'.
 
 Example
 .......
@@ -2320,7 +2987,7 @@ Example
      original-location="__gnat_debug_raise_assert_failure"}
      (gdb)
 
-The `-catch-exception' Command
+The '-catch-exception' Command
 ------------------------------
 
 Synopsis
@@ -2336,27 +3003,23 @@ parameters described below, to create mo
 
    The possible optional parameters for this command are:
 
-`-c CONDITION'
+'-c CONDITION'
      Make the catchpoint conditional on CONDITION.
-
-`-d'
+'-d'
      Create a disabled catchpoint.
-
-`-e EXCEPTION-NAME'
+'-e EXCEPTION-NAME'
      Only stop when EXCEPTION-NAME is raised.  This option cannot be
-     used combined with `-u'.
-
-`-t'
+     used combined with '-u'.
+'-t'
      Create a temporary catchpoint.
-
-`-u'
+'-u'
      Stop only when an unhandled exception gets raised.  This option
-     cannot be used combined with `-e'.
+     cannot be used combined with '-e'.
 
 GDB Command
 ...........
 
-The corresponding GDB commands are `catch exception' and `catch
+The corresponding GDB commands are 'catch exception' and 'catch
 exception unhandled'.
 
 Example
@@ -2372,10 +3035,10 @@ Example
 
 File: gdb.info,  Node: GDB/MI Program Context,  Next: GDB/MI Thread Commands,  Prev: GDB/MI Catchpoint Commands,  Up: GDB/MI
 
-27.10 GDB/MI  Program Context
-=============================
+27.10 GDB/MI Program Context
+============================
 
-The `-exec-arguments' Command
+The '-exec-arguments' Command
 -----------------------------
 
 Synopsis
@@ -2384,12 +3047,12 @@ Synopsis
       -exec-arguments ARGS
 
    Set the inferior program arguments, to be used in the next
-`-exec-run'.
+'-exec-run'.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `set args'.
+The corresponding GDB command is 'set args'.
 
 Example
 .......
@@ -2399,7 +3062,7 @@ Example
      ^done
      (gdb)
 
-The `-environment-cd' Command
+The '-environment-cd' Command
 -----------------------------
 
 Synopsis
@@ -2412,7 +3075,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `cd'.
+The corresponding GDB command is 'cd'.
 
 Example
 .......
@@ -2422,7 +3085,7 @@ Example
      ^done
      (gdb)
 
-The `-environment-directory' Command
+The '-environment-directory' Command
 ------------------------------------
 
 Synopsis
@@ -2431,9 +3094,9 @@ Synopsis
       -environment-directory [ -r ] [ PATHDIR ]+
 
    Add directories PATHDIR to beginning of search path for source files.
-If the `-r' option is used, the search path is reset to the default
+If the '-r' option is used, the search path is reset to the default
 search path.  If directories PATHDIR are supplied in addition to the
-`-r' option, the search path is first reset and then addition occurs as
+'-r' option, the search path is first reset and then addition occurs as
 normal.  Multiple directories may be specified, separated by blanks.
 Specifying multiple directories in a single command results in the
 directories added to the beginning of the search path in the same order
@@ -2441,13 +3104,13 @@ they were presented in the command.  If 
 directory name, double-quotes should be used around the name.  In the
 command output, the path will show up separated by the system
 directory-separator character.  The directory-separator character must
-not be used in any directory name.  If no directories are specified,
-the current search path is displayed.
+not be used in any directory name.  If no directories are specified, the
+current search path is displayed.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `dir'.
+The corresponding GDB command is 'dir'.
 
 Example
 .......
@@ -2466,7 +3129,7 @@ Example
      ^done,source-path="$cdir:$cwd"
      (gdb)
 
-The `-environment-path' Command
+The '-environment-path' Command
 -------------------------------
 
 Synopsis
@@ -2475,9 +3138,9 @@ Synopsis
       -environment-path [ -r ] [ PATHDIR ]+
 
    Add directories PATHDIR to beginning of search path for object files.
-If the `-r' option is used, the search path is reset to the original
+If the '-r' option is used, the search path is reset to the original
 search path that existed at gdb start-up.  If directories PATHDIR are
-supplied in addition to the `-r' option, the search path is first reset
+supplied in addition to the '-r' option, the search path is first reset
 and then addition occurs as normal.  Multiple directories may be
 specified, separated by blanks.  Specifying multiple directories in a
 single command results in the directories added to the beginning of the
@@ -2491,7 +3154,7 @@ If no directories are specified, the cur
 GDB Command
 ...........
 
-The corresponding GDB command is `path'.
+The corresponding GDB command is 'path'.
 
 Example
 .......
@@ -2507,7 +3170,7 @@ Example
      ^done,path="/usr/local/bin:/usr/bin"
      (gdb)
 
-The `-environment-pwd' Command
+The '-environment-pwd' Command
 ------------------------------
 
 Synopsis
@@ -2520,7 +3183,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `pwd'.
+The corresponding GDB command is 'pwd'.
 
 Example
 .......
@@ -2536,7 +3199,7 @@ File: gdb.info,  Node: GDB/MI Thread Com
 27.11 GDB/MI Thread Commands
 ============================
 
-The `-thread-info' Command
+The '-thread-info' Command
 --------------------------
 
 Synopsis
@@ -2545,13 +3208,14 @@ Synopsis
       -thread-info [ THREAD-ID ]
 
    Reports information about either a specific thread, if the THREAD-ID
-parameter is present, or about all threads.  When printing information
-about all threads, also reports the current thread.
+parameter is present, or about all threads.  THREAD-ID is the thread's
+global thread ID. When printing information about all threads, also
+reports the global ID of the current thread.
 
 GDB Command
 ...........
 
-The `info thread' command prints the same information about all threads.
+The 'info thread' command prints the same information about all threads.
 
 Result
 ......
@@ -2559,48 +3223,46 @@ Result
 The result is a list of threads.  The following attributes are defined
 for a given thread:
 
-`current'
+'current'
      This field exists only for the current thread.  It has the value
-     `*'.
+     '*'.
 
-`id'
-     The identifier that GDB uses to refer to the thread.
+'id'
+     The global identifier that GDB uses to refer to the thread.
 
-`target-id'
+'target-id'
      The identifier that the target uses to refer to the thread.
 
-`details'
+'details'
      Extra information about the thread, in a target-specific format.
      This field is optional.
 
-`name'
+'name'
      The name of the thread.  If the user specified a name using the
-     `thread name' command, then this name is given.  Otherwise, if GDB
+     'thread name' command, then this name is given.  Otherwise, if GDB
      can extract the thread name from the target, then that name is
      given.  If GDB cannot find the thread name, then this field is
      omitted.
 
-`frame'
+'frame'
      The stack frame currently executing in the thread.
 
-`state'
-     The thread's state.  The `state' field may have the following
+'state'
+     The thread's state.  The 'state' field may have the following
      values:
 
-    `stopped'
+     'stopped'
           The thread is stopped.  Frame information is available for
           stopped threads.
 
-    `running'
+     'running'
           The thread is running.  There's no frame information for
           running threads.
 
-
-`core'
+'core'
      If GDB can find the CPU core on which this thread is running, then
      this field is the core identifier.  This field is optional.
 
-
 Example
 .......
 
@@ -2617,7 +3279,7 @@ Example
      current-thread-id="1"
      (gdb)
 
-The `-thread-list-ids' Command
+The '-thread-list-ids' Command
 ------------------------------
 
 Synopsis
@@ -2625,16 +3287,16 @@ Synopsis
 
       -thread-list-ids
 
-   Produces a list of the currently known GDB thread ids.  At the end
-of the list it also prints the total number of such threads.
+   Produces a list of the currently known global GDB thread ids.  At the
+end of the list it also prints the total number of such threads.
 
-   This command is retained for historical reasons, the `-thread-info'
+   This command is retained for historical reasons, the '-thread-info'
 command should be used instead.
 
 GDB Command
 ...........
 
-Part of `info threads' supplies the same information.
+Part of 'info threads' supplies the same information.
 
 Example
 .......
@@ -2645,24 +3307,25 @@ Example
      current-thread-id="1",number-of-threads="3"
      (gdb)
 
-The `-thread-select' Command
+The '-thread-select' Command
 ----------------------------
 
 Synopsis
 ........
 
-      -thread-select THREADNUM
+      -thread-select THREAD-ID
 
-   Make THREADNUM the current thread.  It prints the number of the new
-current thread, and the topmost frame for that thread.
+   Make thread with global thread number THREAD-ID the current thread.
+It prints the number of the new current thread, and the topmost frame
+for that thread.
 
    This command is deprecated in favor of explicitly using the
-`--thread' option to each command.
+'--thread' option to each command.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `thread'.
+The corresponding GDB command is 'thread'.
 
 Example
 .......
@@ -2692,7 +3355,7 @@ File: gdb.info,  Node: GDB/MI Ada Taskin
 27.12 GDB/MI Ada Tasking Commands
 =================================
 
-The `-ada-task-info' Command
+The '-ada-task-info' Command
 ----------------------------
 
 Synopsis
@@ -2706,8 +3369,8 @@ parameter is present, or about all Ada t
 GDB Command
 ...........
 
-The `info tasks' command prints the same information about all Ada
-tasks (*note Ada Tasks::).
+The 'info tasks' command prints the same information about all Ada tasks
+(*note Ada Tasks::).
 
 Result
 ......
@@ -2715,38 +3378,38 @@ Result
 The result is a table of Ada tasks.  The following columns are defined
 for each Ada task:
 
-`current'
+'current'
      This field exists only for the current thread.  It has the value
-     `*'.
+     '*'.
 
-`id'
+'id'
      The identifier that GDB uses to refer to the Ada task.
 
-`task-id'
+'task-id'
      The identifier that the target uses to refer to the Ada task.
 
-`thread-id'
-     The identifier of the thread corresponding to the Ada task.
+'thread-id'
+     The global thread identifier of the thread corresponding to the Ada
+     task.
 
      This field should always exist, as Ada tasks are always implemented
      on top of a thread.  But if GDB cannot find this corresponding
      thread for any reason, the field is omitted.
 
-`parent-id'
+'parent-id'
      This field exists only when the task was created by another task.
      In this case, it provides the ID of the parent task.
 
-`priority'
+'priority'
      The base priority of the task.
 
-`state'
+'state'
      The current state of the task.  For a detailed description of the
      possible states, see *note Ada Tasks::.
 
-`name'
+'name'
      The name of the task.
 
-
 Example
 .......
 
@@ -2771,10 +3434,10 @@ File: gdb.info,  Node: GDB/MI Program Ex
 ==============================
 
 These are the asynchronous commands which generate the out-of-band
-record `*stopped'.  Currently GDB only really executes asynchronously
+record '*stopped'.  Currently GDB only really executes asynchronously
 with remote targets and this interaction is mimicked in other cases.
 
-The `-exec-continue' Command
+The '-exec-continue' Command
 ----------------------------
 
 Synopsis
@@ -2782,28 +3445,25 @@ Synopsis
 
       -exec-continue [--reverse] [--all|--thread-group N]
 
-   Resumes the execution of the inferior program, which will continue
-to execute until it reaches a debugger stop event.  If the `--reverse'
+   Resumes the execution of the inferior program, which will continue to
+execute until it reaches a debugger stop event.  If the '--reverse'
 option is specified, execution resumes in reverse until it reaches a
 stop event.  Stop events may include
    * breakpoints or watchpoints
-
    * signals or exceptions
-
-   * the end of the process (or its beginning under `--reverse')
-
+   * the end of the process (or its beginning under '--reverse')
    * the end or beginning of a replay log if one is being used.
-   In all-stop mode (*note All-Stop Mode::), may resume only one
-thread, or all threads, depending on the value of the
-`scheduler-locking' variable.  If `--all' is specified, all threads (in
-all inferiors) will be resumed.  The `--all' option is ignored in
-all-stop mode.  If the `--thread-group' options is specified, then all
-threads in that thread group are resumed.
+   In all-stop mode (*note All-Stop Mode::), may resume only one thread,
+or all threads, depending on the value of the 'scheduler-locking'
+variable.  If '--all' is specified, all threads (in all inferiors) will
+be resumed.  The '--all' option is ignored in all-stop mode.  If the
+'--thread-group' options is specified, then all threads in that thread
+group are resumed.
 
 GDB Command
 ...........
 
-The corresponding GDB corresponding is `continue'.
+The corresponding GDB corresponding is 'continue'.
 
 Example
 .......
@@ -2817,7 +3477,7 @@ Example
      line="13"}
      (gdb)
 
-The `-exec-finish' Command
+The '-exec-finish' Command
 --------------------------
 
 Synopsis
@@ -2827,18 +3487,18 @@ Synopsis
 
    Resumes the execution of the inferior program until the current
 function is exited.  Displays the results returned by the function.  If
-the `--reverse' option is specified, resumes the reverse execution of
+the '--reverse' option is specified, resumes the reverse execution of
 the inferior program until the point where current function was called.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `finish'.
+The corresponding GDB command is 'finish'.
 
 Example
 .......
 
-Function returning `void'.
+Function returning 'void'.
 
      -exec-finish
      ^running
@@ -2848,7 +3508,7 @@ Function returning `void'.
      file="hello.c",fullname="/home/foo/bar/hello.c",line="7"}
      (gdb)
 
-   Function returning other than `void'.  The name of the internal GDB
+   Function returning other than 'void'.  The name of the internal GDB
 variable storing the result is printed, together with the value itself.
 
      -exec-finish
@@ -2860,7 +3520,7 @@ variable storing the result is printed, 
      gdb-result-var="$1",return-value="0"
      (gdb)
 
-The `-exec-interrupt' Command
+The '-exec-interrupt' Command
 -----------------------------
 
 Synopsis
@@ -2871,23 +3531,23 @@ Synopsis
    Interrupts the background execution of the target.  Note how the
 token associated with the stop message is the one for the execution
 command that has been interrupted.  The token for the interrupt itself
-only appears in the `^done' output.  If the user is trying to interrupt
+only appears in the '^done' output.  If the user is trying to interrupt
 a non-running program, an error message will be printed.
 
    Note that when asynchronous execution is enabled, this command is
 asynchronous just like other execution commands.  That is, first the
-`^done' response will be printed, and the target stop will be reported
-after that using the `*stopped' notification.
+'^done' response will be printed, and the target stop will be reported
+after that using the '*stopped' notification.
 
    In non-stop mode, only the context thread is interrupted by default.
-All threads (in all inferiors) will be interrupted if the `--all'
-option is specified.  If the `--thread-group' option is specified, all
-threads in that group will be interrupted.
+All threads (in all inferiors) will be interrupted if the '--all' option
+is specified.  If the '--thread-group' option is specified, all threads
+in that group will be interrupted.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `interrupt'.
+The corresponding GDB command is 'interrupt'.
 
 Example
 .......
@@ -2910,7 +3570,7 @@ Example
      ^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
      (gdb)
 
-The `-exec-jump' Command
+The '-exec-jump' Command
 ------------------------
 
 Synopsis
@@ -2925,7 +3585,7 @@ different forms of LOCATION.
 GDB Command
 ...........
 
-The corresponding GDB command is `jump'.
+The corresponding GDB command is 'jump'.
 
 Example
 .......
@@ -2934,7 +3594,7 @@ Example
      *running,thread-id="all"
      ^running
 
-The `-exec-next' Command
+The '-exec-next' Command
 ------------------------
 
 Synopsis
@@ -2945,7 +3605,7 @@ Synopsis
    Resumes execution of the inferior program, stopping when the
 beginning of the next source line is reached.
 
-   If the `--reverse' option is specified, resumes reverse execution of
+   If the '--reverse' option is specified, resumes reverse execution of
 the inferior program, stopping at the beginning of the previous source
 line.  If you issue this command on the first line of a function, it
 will take you back to the caller of that function, to the source line
@@ -2954,7 +3614,7 @@ where the function was called.
 GDB Command
 ...........
 
-The corresponding GDB command is `next'.
+The corresponding GDB command is 'next'.
 
 Example
 .......
@@ -2965,7 +3625,7 @@ Example
      *stopped,reason="end-stepping-range",line="8",file="hello.c"
      (gdb)
 
-The `-exec-next-instruction' Command
+The '-exec-next-instruction' Command
 ------------------------------------
 
 Synopsis
@@ -2978,7 +3638,7 @@ call, continues until the function retur
 instruction in the middle of a source line, the address will be printed
 as well.
 
-   If the `--reverse' option is specified, resumes reverse execution of
+   If the '--reverse' option is specified, resumes reverse execution of
 the inferior program, stopping at the previous instruction.  If the
 previously executed instruction was a return from another function, it
 will continue to execute in reverse until the call to that function
@@ -2987,7 +3647,7 @@ will continue to execute in reverse unti
 GDB Command
 ...........
 
-The corresponding GDB command is `nexti'.
+The corresponding GDB command is 'nexti'.
 
 Example
 .......
@@ -3001,7 +3661,7 @@ Example
      addr="0x000100d4",line="5",file="hello.c"
      (gdb)
 
-The `-exec-return' Command
+The '-exec-return' Command
 --------------------------
 
 Synopsis
@@ -3015,7 +3675,7 @@ inferior.  Displays the new current fram
 GDB Command
 ...........
 
-The corresponding GDB command is `return'.
+The corresponding GDB command is 'return'.
 
 Example
 .......
@@ -3044,7 +3704,7 @@ Example
      fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
      (gdb)
 
-The `-exec-run' Command
+The '-exec-run' Command
 -----------------------
 
 Synopsis
@@ -3057,20 +3717,20 @@ executes until either a breakpoint is en
 In the latter case the output will include an exit code, if the program
 has exited exceptionally.
 
-   When neither the `--all' nor the `--thread-group' option is
-specified, the current inferior is started.  If the `--thread-group'
+   When neither the '--all' nor the '--thread-group' option is
+specified, the current inferior is started.  If the '--thread-group'
 option is specified, it should refer to a thread group of type
-`process', and that thread group will be started.  If the `--all'
-option is specified, then all inferiors will be started.
+'process', and that thread group will be started.  If the '--all' option
+is specified, then all inferiors will be started.
 
-   Using the `--start' option instructs the debugger to stop the
+   Using the '--start' option instructs the debugger to stop the
 execution at the start of the inferior's main subprogram, following the
-same behavior as the `start' command (*note Starting::).
+same behavior as the 'start' command (*note Starting::).
 
 GDB Command
 ...........
 
-The corresponding GDB command is `run'.
+The corresponding GDB command is 'run'.
 
 Examples
 ........
@@ -3107,14 +3767,14 @@ Program exited exceptionally:
      *stopped,reason="exited",exit-code="01"
      (gdb)
 
-   Another way the program can terminate is if it receives a signal
-such as `SIGINT'.  In this case, GDB/MI displays this:
+   Another way the program can terminate is if it receives a signal such
+as 'SIGINT'.  In this case, GDB/MI displays this:
 
      (gdb)
      *stopped,reason="exited-signalled",signal-name="SIGINT",
      signal-meaning="Interrupt"
 
-The `-exec-step' Command
+The '-exec-step' Command
 ------------------------
 
 Synopsis
@@ -3123,16 +3783,16 @@ Synopsis
       -exec-step [--reverse]
 
    Resumes execution of the inferior program, stopping when the
-beginning of the next source line is reached, if the next source line
-is not a function call.  If it is, stop at the first instruction of the
-called function.  If the `--reverse' option is specified, resumes
+beginning of the next source line is reached, if the next source line is
+not a function call.  If it is, stop at the first instruction of the
+called function.  If the '--reverse' option is specified, resumes
 reverse execution of the inferior program, stopping at the beginning of
 the previously executed source line.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `step'.
+The corresponding GDB command is 'step'.
 
 Example
 .......
@@ -3156,7 +3816,7 @@ Stepping into a function:
      *stopped,reason="end-stepping-range",line="14",file="recursive2.c"
      (gdb)
 
-The `-exec-step-instruction' Command
+The '-exec-step-instruction' Command
 ------------------------------------
 
 Synopsis
@@ -3165,7 +3825,7 @@ Synopsis
       -exec-step-instruction [--reverse]
 
    Resumes the inferior which executes one machine instruction.  If the
-`--reverse' option is specified, resumes reverse execution of the
+'--reverse' option is specified, resumes reverse execution of the
 inferior program, stopping at the previously executed instruction.  The
 output, once GDB has stopped, will vary depending on whether we have
 stopped in the middle of a source line or not.  In the former case, the
@@ -3174,7 +3834,7 @@ address at which the program stopped wil
 GDB Command
 ...........
 
-The corresponding GDB command is `stepi'.
+The corresponding GDB command is 'stepi'.
 
 Example
 .......
@@ -3197,7 +3857,7 @@ Example
      fullname="/home/foo/bar/try.c",line="10"}
      (gdb)
 
-The `-exec-until' Command
+The '-exec-until' Command
 -------------------------
 
 Synopsis
@@ -3205,15 +3865,15 @@ Synopsis
 
       -exec-until [ LOCATION ]
 
-   Executes the inferior until the LOCATION specified in the argument
-is reached.  If there is no argument, the inferior executes until a
-source line greater than the current one is reached.  The reason for
-stopping in this case will be `location-reached'.
+   Executes the inferior until the LOCATION specified in the argument is
+reached.  If there is no argument, the inferior executes until a source
+line greater than the current one is reached.  The reason for stopping
+in this case will be 'location-reached'.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `until'.
+The corresponding GDB command is 'until'.
 
 Example
 .......
@@ -3233,22 +3893,22 @@ File: gdb.info,  Node: GDB/MI Stack Mani
 27.14 GDB/MI Stack Manipulation Commands
 ========================================
 
-The `-enable-frame-filters' Command
+The '-enable-frame-filters' Command
 -----------------------------------
 
      -enable-frame-filters
 
    GDB allows Python-based frame filters to affect the output of the MI
-commands relating to stack traces.  As there is no way to implement
-this in a fully backward-compatible way, a front end must request that
-this functionality be enabled.
+commands relating to stack traces.  As there is no way to implement this
+in a fully backward-compatible way, a front end must request that this
+functionality be enabled.
 
    Once enabled, this feature cannot be disabled.
 
    Note that if Python support has not been compiled into GDB, this
 command will still succeed (and do nothing).
 
-The `-stack-info-frame' Command
+The '-stack-info-frame' Command
 -------------------------------
 
 Synopsis
@@ -3261,7 +3921,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `info frame' or `frame' (without
+The corresponding GDB command is 'info frame' or 'frame' (without
 arguments).
 
 Example
@@ -3274,7 +3934,7 @@ Example
      fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"}
      (gdb)
 
-The `-stack-info-depth' Command
+The '-stack-info-depth' Command
 -------------------------------
 
 Synopsis
@@ -3312,7 +3972,7 @@ For a stack with frame levels 0 through 
      ^done,depth="12"
      (gdb)
 
-The `-stack-list-arguments' Command
+The '-stack-list-arguments' Command
 -----------------------------------
 
 Synopsis
@@ -3324,31 +3984,31 @@ Synopsis
    Display a list of the arguments for the frames between LOW-FRAME and
 HIGH-FRAME (inclusive).  If LOW-FRAME and HIGH-FRAME are not provided,
 list the arguments for the whole call stack.  If the two arguments are
-equal, show the single frame at the corresponding level.  It is an
-error if LOW-FRAME is larger than the actual number of frames.  On the
-other hand, HIGH-FRAME may be larger than the actual number of frames,
-in which case only existing frames will be returned.
-
-   If PRINT-VALUES is 0 or `--no-values', print only the names of the
-variables; if it is 1 or `--all-values', print also their values; and
-if it is 2 or `--simple-values', print the name, type and value for
-simple data types, and the name and type for arrays, structures and
-unions.  If the option `--no-frame-filters' is supplied, then Python
-frame filters will not be executed.
+equal, show the single frame at the corresponding level.  It is an error
+if LOW-FRAME is larger than the actual number of frames.  On the other
+hand, HIGH-FRAME may be larger than the actual number of frames, in
+which case only existing frames will be returned.
+
+   If PRINT-VALUES is 0 or '--no-values', print only the names of the
+variables; if it is 1 or '--all-values', print also their values; and if
+it is 2 or '--simple-values', print the name, type and value for simple
+data types, and the name and type for arrays, structures and unions.  If
+the option '--no-frame-filters' is supplied, then Python frame filters
+will not be executed.
 
-   If the `--skip-unavailable' option is specified, arguments that are
+   If the '--skip-unavailable' option is specified, arguments that are
 not available are not listed.  Partially available arguments are still
 displayed, however.
 
    Use of this command to obtain arguments in a single frame is
-deprecated in favor of the `-stack-list-variables' command.
+deprecated in favor of the '-stack-list-variables' command.
 
 GDB Command
 ...........
 
-GDB does not have an equivalent command.  `gdbtk' has a `gdb_get_args'
+GDB does not have an equivalent command.  'gdbtk' has a 'gdb_get_args'
 command which partially overlaps with the functionality of
-`-stack-list-arguments'.
+'-stack-list-arguments'.
 
 Example
 .......
@@ -3406,7 +4066,7 @@ Example
      {name="strarg",value="0x11940 \"A string argument.\""}]}]
      (gdb)
 
-The `-stack-list-frames' Command
+The '-stack-list-frames' Command
 --------------------------------
 
 Synopsis
@@ -3417,26 +4077,20 @@ Synopsis
    List the frames currently on the stack.  For each frame it displays
 the following info:
 
-`LEVEL'
+'LEVEL'
      The frame number, 0 being the topmost frame, i.e., the innermost
      function.
-
-`ADDR'
-     The `$pc' value for that frame.
-
-`FUNC'
+'ADDR'
+     The '$pc' value for that frame.
+'FUNC'
      Function name.
-
-`FILE'
+'FILE'
      File name of the source file where the function lives.
-
-`FULLNAME'
+'FULLNAME'
      The full file name of the source file where the function lives.
-
-`LINE'
-     Line number corresponding to the `$pc'.
-
-`FROM'
+'LINE'
+     Line number corresponding to the '$pc'.
+'FROM'
      The shared library where this function is defined.  This is only
      given if the frame's function is not known.
 
@@ -3447,13 +4101,13 @@ are equal, it shows the single frame at 
 an error if LOW-FRAME is larger than the actual number of frames.  On
 the other hand, HIGH-FRAME may be larger than the actual number of
 frames, in which case only existing frames will be returned.  If the
-option `--no-frame-filters' is supplied, then Python frame filters will
+option '--no-frame-filters' is supplied, then Python frame filters will
 not be executed.
 
 GDB Command
 ...........
 
-The corresponding GDB commands are `backtrace' and `where'.
+The corresponding GDB commands are 'backtrace' and 'where'.
 
 Example
 .......
@@ -3511,7 +4165,7 @@ Full stack backtrace:
        file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}]
      (gdb)
 
-The `-stack-list-locals' Command
+The '-stack-list-locals' Command
 --------------------------------
 
 Synopsis
@@ -3520,27 +4174,27 @@ Synopsis
       -stack-list-locals [ --no-frame-filters ] [ --skip-unavailable ] PRINT-VALUES
 
    Display the local variable names for the selected frame.  If
-PRINT-VALUES is 0 or `--no-values', print only the names of the
-variables; if it is 1 or `--all-values', print also their values; and
-if it is 2 or `--simple-values', print the name, type and value for
-simple data types, and the name and type for arrays, structures and
-unions.  In this last case, a frontend can immediately display the
-value of simple data types and create variable objects for other data
-types when the user wishes to explore their values in more detail.  If
-the option `--no-frame-filters' is supplied, then Python frame filters
-will not be executed.
+PRINT-VALUES is 0 or '--no-values', print only the names of the
+variables; if it is 1 or '--all-values', print also their values; and if
+it is 2 or '--simple-values', print the name, type and value for simple
+data types, and the name and type for arrays, structures and unions.  In
+this last case, a frontend can immediately display the value of simple
+data types and create variable objects for other data types when the
+user wishes to explore their values in more detail.  If the option
+'--no-frame-filters' is supplied, then Python frame filters will not be
+executed.
+
+   If the '--skip-unavailable' option is specified, local variables that
+are not available are not listed.  Partially available local variables
+are still displayed, however.
 
-   If the `--skip-unavailable' option is specified, local variables
-that are not available are not listed.  Partially available local
-variables are still displayed, however.
-
-   This command is deprecated in favor of the `-stack-list-variables'
+   This command is deprecated in favor of the '-stack-list-variables'
 command.
 
 GDB Command
 ...........
 
-`info locals' in GDB, `gdb_get_locals' in `gdbtk'.
+'info locals' in GDB, 'gdb_get_locals' in 'gdbtk'.
 
 Example
 .......
@@ -3557,7 +4211,7 @@ Example
        {name="B",type="int",value="2"},{name="C",type="int [3]"}]
      (gdb)
 
-The `-stack-list-variables' Command
+The '-stack-list-variables' Command
 -----------------------------------
 
 Synopsis
@@ -3566,14 +4220,14 @@ Synopsis
       -stack-list-variables [ --no-frame-filters ] [ --skip-unavailable ] PRINT-VALUES
 
    Display the names of local variables and function arguments for the
-selected frame.  If PRINT-VALUES is 0 or `--no-values', print only the
-names of the variables; if it is 1 or `--all-values', print also their
-values; and if it is 2 or `--simple-values', print the name, type and
+selected frame.  If PRINT-VALUES is 0 or '--no-values', print only the
+names of the variables; if it is 1 or '--all-values', print also their
+values; and if it is 2 or '--simple-values', print the name, type and
 value for simple data types, and the name and type for arrays,
-structures and unions.  If the option `--no-frame-filters' is supplied,
+structures and unions.  If the option '--no-frame-filters' is supplied,
 then Python frame filters will not be executed.
 
-   If the `--skip-unavailable' option is specified, local variables and
+   If the '--skip-unavailable' option is specified, local variables and
 arguments that are not available are not listed.  Partially available
 arguments and local variables are still displayed, however.
 
@@ -3585,7 +4239,7 @@ Example
      ^done,variables=[{name="x",value="11"},{name="s",value="{a = 1, b = 2}"}]
      (gdb)
 
-The `-stack-select-frame' Command
+The '-stack-select-frame' Command
 ---------------------------------
 
 Synopsis
@@ -3596,14 +4250,14 @@ Synopsis
    Change the selected frame.  Select a different frame FRAMENUM on the
 stack.
 
-   This command in deprecated in favor of passing the `--frame' option
+   This command in deprecated in favor of passing the '--frame' option
 to every command.
 
 GDB Command
 ...........
 
-The corresponding GDB commands are `frame', `up', `down',
-`select-frame', `up-silent', and `down-silent'.
+The corresponding GDB commands are 'frame', 'up', 'down',
+'select-frame', 'up-silent', and 'down-silent'.
 
 Example
 .......
@@ -3625,8 +4279,8 @@ Introduction to Variable Objects
 Variable objects are "object-oriented" MI interface for examining and
 changing values of expressions.  Unlike some other MI interfaces that
 work with expressions, variable objects are specifically designed for
-simple and efficient presentation in the frontend.  A variable object
-is identified by string name.  When a variable object is created, the
+simple and efficient presentation in the frontend.  A variable object is
+identified by string name.  When a variable object is created, the
 frontend specifies the expression for that variable object.  The
 expression can be a simple variable, or it can be an arbitrary complex
 expression, and can even involve CPU registers.  After creating a
@@ -3660,8 +4314,8 @@ variables that frontend has created.
 
    The automatic update is not always desirable.  For example, a
 frontend might want to keep a value of some expression for future
-reference, and never update it.  For another example,  fetching memory
-is relatively slow for embedded targets, so a frontend might want to
+reference, and never update it.  For another example, fetching memory is
+relatively slow for embedded targets, so a frontend might want to
 disable automatic update for the variables that are either not visible
 on the screen, or "closed".  This is possible using so called "frozen
 variable objects".  Such variable objects are never implicitly updated.
@@ -3669,8 +4323,8 @@ variable objects".  Such variable object
    Variable objects can be either "fixed" or "floating".  For the fixed
 variable object, the expression is parsed when the variable object is
 created, including associating identifiers to specific variables.  The
-meaning of expression never changes.  For a floating variable object
-the values of variables whose names appear in the expressions are
+meaning of expression never changes.  For a floating variable object the
+values of variables whose names appear in the expressions are
 re-evaluated every time in the context of the current frame.  Consider
 this example:
 
@@ -3682,11 +4336,11 @@ this example:
                 do_work(...);
      }
 
-   If a fixed variable object for the `state' variable is created in
-this function, and we enter the recursive call, the variable object
-will report the value of `state' in the top-level `do_work' invocation.
-On the other hand, a floating variable object will report the value of
-`state' in the current frame.
+   If a fixed variable object for the 'state' variable is created in
+this function, and we enter the recursive call, the variable object will
+report the value of 'state' in the top-level 'do_work' invocation.  On
+the other hand, a floating variable object will report the value of
+'state' in the current frame.
 
    If an expression specified when creating a fixed variable object
 refers to a local variable, the variable object becomes bound to the
@@ -3699,26 +4353,28 @@ re-evaluates the variable object in cont
 access this functionality:
 
 *Operation*                   *Description*
-`-enable-pretty-printing'     enable Python-based pretty-printing
-`-var-create'                 create a variable object
-`-var-delete'                 delete the variable object and/or its
+                              
+'-enable-pretty-printing'     enable Python-based pretty-printing
+'-var-create'                 create a variable object
+'-var-delete'                 delete the variable object and/or its
                               children
-`-var-set-format'             set the display format of this variable
-`-var-show-format'            show the display format of this variable
-`-var-info-num-children'      tells how many children this object has
-`-var-list-children'          return a list of the object's children
-`-var-info-type'              show the type of this variable object
-`-var-info-expression'        print parent-relative expression that this
-                              variable object represents
-`-var-info-path-expression'   print full expression that this variable
+'-var-set-format'             set the display format of this variable
+'-var-show-format'            show the display format of this variable
+'-var-info-num-children'      tells how many children this object has
+'-var-list-children'          return a list of the object's children
+'-var-info-type'              show the type of this variable object
+'-var-info-expression'        print parent-relative expression that
+                              this variable object represents
+'-var-info-path-expression'   print full expression that this variable
                               object represents
-`-var-show-attributes'        is this variable editable? does it exist
+'-var-show-attributes'        is this variable editable?  does it exist
                               here?
-`-var-evaluate-expression'    get the value of this variable
-`-var-assign'                 set the value of this variable
-`-var-update'                 update the variable and its children
-`-var-set-frozen'             set frozeness attribute
-`-var-set-update-range'       set range of children to display on update
+'-var-evaluate-expression'    get the value of this variable
+'-var-assign'                 set the value of this variable
+'-var-update'                 update the variable and its children
+'-var-set-frozen'             set frozeness attribute
+'-var-set-update-range'       set range of children to display on
+                              update
 
    In the next subsection we describe each operation in detail and
 suggest how it can be used.
@@ -3726,7 +4382,7 @@ suggest how it can be used.
 Description And Use of Operations on Variable Objects
 -----------------------------------------------------
 
-The `-enable-pretty-printing' Command
+The '-enable-pretty-printing' Command
 -------------------------------------
 
      -enable-pretty-printing
@@ -3744,7 +4400,7 @@ command will still succeed (and do nothi
    This feature is currently (as of GDB 7.0) experimental, and may work
 differently in future versions of GDB.
 
-The `-var-create' Command
+The '-var-create' Command
 -------------------------
 
 Synopsis
@@ -3753,36 +4409,36 @@ Synopsis
       -var-create {NAME | "-"}
          {FRAME-ADDR | "*" | "@"} EXPRESSION
 
-   This operation creates a variable object, which allows the
-monitoring of a variable, the result of an expression, a memory cell or
-a CPU register.
+   This operation creates a variable object, which allows the monitoring
+of a variable, the result of an expression, a memory cell or a CPU
+register.
 
    The NAME parameter is the string by which the object can be
-referenced.  It must be unique.  If `-' is specified, the varobj system
+referenced.  It must be unique.  If '-' is specified, the varobj system
 will generate a string "varNNNNNN" automatically.  It will be unique
 provided that one does not specify NAME of that format.  The command
 fails if a duplicate name is found.
 
    The frame under which the expression should be evaluated can be
-specified by FRAME-ADDR.  A `*' indicates that the current frame should
-be used.  A `@' indicates that a floating variable object must be
+specified by FRAME-ADDR.  A '*' indicates that the current frame should
+be used.  A '@' indicates that a floating variable object must be
 created.
 
    EXPRESSION is any expression valid on the current language set (must
-not begin with a `*'), or one of the following:
+not begin with a '*'), or one of the following:
 
-   * `*ADDR', where ADDR is the address of a memory cell
+   * '*ADDR', where ADDR is the address of a memory cell
 
-   * `*ADDR-ADDR' -- a memory address range (TBD)
+   * '*ADDR-ADDR' -- a memory address range (TBD)
 
-   * `$REGNAME' -- a CPU register name
+   * '$REGNAME' -- a CPU register name
 
-   A varobj's contents may be provided by a Python-based
-pretty-printer.  In this case the varobj is known as a "dynamic
-varobj".  Dynamic varobjs have slightly different semantics in some
-cases.  If the `-enable-pretty-printing' command is not sent, then GDB
-will never create a dynamic varobj.  This ensures backward
-compatibility for existing clients.
+   A varobj's contents may be provided by a Python-based pretty-printer.
+In this case the varobj is known as a "dynamic varobj".  Dynamic varobjs
+have slightly different semantics in some cases.  If the
+'-enable-pretty-printing' command is not sent, then GDB will never
+create a dynamic varobj.  This ensures backward compatibility for
+existing clients.
 
 Result
 ......
@@ -3790,50 +4446,49 @@ Result
 This operation returns attributes of the newly-created varobj.  These
 are:
 
-`name'
+'name'
      The name of the varobj.
 
-`numchild'
+'numchild'
      The number of children of the varobj.  This number is not
      necessarily reliable for a dynamic varobj.  Instead, you must
-     examine the `has_more' attribute.
+     examine the 'has_more' attribute.
 
-`value'
+'value'
      The varobj's scalar value.  For a varobj whose type is some sort of
-     aggregate (e.g., a `struct'), or for a dynamic varobj, this value
+     aggregate (e.g., a 'struct'), or for a dynamic varobj, this value
      will not be interesting.
 
-`type'
+'type'
      The varobj's type.  This is a string representation of the type, as
-     would be printed by the GDB CLI.  If `print object' (*note set
-     print object: Print Settings.) is set to `on', the _actual_
-     (derived) type of the object is shown rather than the _declared_
-     one.
+     would be printed by the GDB CLI. If 'print object' (*note set print
+     object: Print Settings.) is set to 'on', the _actual_ (derived)
+     type of the object is shown rather than the _declared_ one.
 
-`thread-id'
+'thread-id'
      If a variable object is bound to a specific thread, then this is
-     the thread's identifier.
+     the thread's global identifier.
 
-`has_more'
+'has_more'
      For a dynamic varobj, this indicates whether there appear to be any
      children available.  For a non-dynamic varobj, this will be 0.
 
-`dynamic'
-     This attribute will be present and have the value `1' if the
-     varobj is a dynamic varobj.  If the varobj is not a dynamic varobj,
-     then this attribute will not be present.
+'dynamic'
+     This attribute will be present and have the value '1' if the varobj
+     is a dynamic varobj.  If the varobj is not a dynamic varobj, then
+     this attribute will not be present.
 
-`displayhint'
+'displayhint'
      A dynamic varobj can supply a display hint to the front end.  The
      value comes directly from the Python pretty-printer object's
-     `display_hint' method.  *Note Pretty Printing API::.
+     'display_hint' method.  *Note Pretty Printing API::.
 
    Typical output will look like this:
 
       name="NAME",numchild="N",type="TYPE",thread-id="M",
        has_more="HAS_MORE"
 
-The `-var-delete' Command
+The '-var-delete' Command
 -------------------------
 
 Synopsis
@@ -3842,11 +4497,11 @@ Synopsis
       -var-delete [ -c ] NAME
 
    Deletes a previously created variable object and all of its children.
-With the `-c' option, just deletes the children.
+With the '-c' option, just deletes the children.
 
    Returns an error if the object NAME is not found.
 
-The `-var-set-format' Command
+The '-var-set-format' Command
 -----------------------------
 
 Synopsis
@@ -3860,16 +4515,21 @@ FORMAT-SPEC.
    The syntax for the FORMAT-SPEC is as follows:
 
       FORMAT-SPEC ==>
-      {binary | decimal | hexadecimal | octal | natural}
+      {binary | decimal | hexadecimal | octal | natural | zero-hexadecimal}
 
    The natural format is the default format choosen automatically based
-on the variable type (like decimal for an `int', hex for pointers,
+on the variable type (like decimal for an 'int', hex for pointers,
 etc.).
 
+   The zero-hexadecimal format has a representation similar to
+hexadecimal but with padding zeroes to the left of the value.  For
+example, a 32-bit hexadecimal value of 0x1234 would be represented as
+0x00001234 in the zero-hexadecimal format.
+
    For a variable with children, the format is set only on the variable
 itself, and the children are not affected.
 
-The `-var-show-format' Command
+The '-var-show-format' Command
 ------------------------------
 
 Synopsis
@@ -3882,7 +4542,7 @@ Synopsis
       FORMAT ==>
       FORMAT-SPEC
 
-The `-var-info-num-children' Command
+The '-var-info-num-children' Command
 ------------------------------------
 
 Synopsis
@@ -3898,33 +4558,34 @@ Synopsis
 varobj.  It will return the current number of children, but more
 children may be available.
 
-The `-var-list-children' Command
+The '-var-list-children' Command
 --------------------------------
 
 Synopsis
 ........
 
       -var-list-children [PRINT-VALUES] NAME [FROM TO]
-Return a list of the children of the specified variable object and
+
+   Return a list of the children of the specified variable object and
 create variable objects for them, if they do not already exist.  With a
-single argument or if PRINT-VALUES has a value of 0 or `--no-values',
+single argument or if PRINT-VALUES has a value of 0 or '--no-values',
 print only the names of the variables; if PRINT-VALUES is 1 or
-`--all-values', also print their values; and if it is 2 or
-`--simple-values' print the name and value for simple data types and
+'--all-values', also print their values; and if it is 2 or
+'--simple-values' print the name and value for simple data types and
 just the name for arrays, structures and unions.
 
    FROM and TO, if specified, indicate the range of children to report.
 If FROM or TO is less than zero, the range is reset and all children
-will be reported.  Otherwise, children starting at FROM (zero-based)
-and up to and excluding TO will be reported.
+will be reported.  Otherwise, children starting at FROM (zero-based) and
+up to and excluding TO will be reported.
 
    If a child range is requested, it will only affect the current call
-to `-var-list-children', but not future calls to `-var-update'.  For
-this, you must instead use `-var-set-update-range'.  The intent of this
+to '-var-list-children', but not future calls to '-var-update'.  For
+this, you must instead use '-var-set-update-range'.  The intent of this
 approach is to enable a front end to implement any update approach it
 likes; for example, scrolling a view may cause the front end to request
-more children with `-var-list-children', and then the front end could
-call `-var-set-update-range' with a different range to ensure that
+more children with '-var-list-children', and then the front end could
+call '-var-set-update-range' with a different range to ensure that
 future updates are restricted to just the visible items.
 
    For each child the following results are returned:
@@ -3943,7 +4604,7 @@ EXP
 
      For C/C++ structures there are several pseudo children returned to
      designate access qualifiers.  For these pseudo children EXP is
-     `public', `private', or `protected'.  In this case the type and
+     'public', 'private', or 'protected'.  In this case the type and
      value are not present.
 
      A dynamic varobj will not report the access qualifying
@@ -3951,20 +4612,20 @@ EXP
      not available at all with a dynamic varobj.
 
 NUMCHILD
-     Number of children this child has.  For a dynamic varobj, this
-     will be 0.
+     Number of children this child has.  For a dynamic varobj, this will
+     be 0.
 
 TYPE
-     The type of the child.  If `print object' (*note set print object:
-     Print Settings.) is set to `on', the _actual_ (derived) type of
-     the object is shown rather than the _declared_ one.
+     The type of the child.  If 'print object' (*note set print object:
+     Print Settings.) is set to 'on', the _actual_ (derived) type of the
+     object is shown rather than the _declared_ one.
 
 VALUE
      If values were requested, this is the value.
 
 THREAD-ID
      If this variable object is associated with a thread, this is the
-     thread id.  Otherwise this result is not present.
+     thread's global thread id.  Otherwise this result is not present.
 
 FROZEN
      If the variable object is frozen, this variable will be present
@@ -3973,22 +4634,21 @@ FROZEN
 DISPLAYHINT
      A dynamic varobj can supply a display hint to the front end.  The
      value comes directly from the Python pretty-printer object's
-     `display_hint' method.  *Note Pretty Printing API::.
+     'display_hint' method.  *Note Pretty Printing API::.
 
 DYNAMIC
-     This attribute will be present and have the value `1' if the
-     varobj is a dynamic varobj.  If the varobj is not a dynamic varobj,
-     then this attribute will not be present.
-
+     This attribute will be present and have the value '1' if the varobj
+     is a dynamic varobj.  If the varobj is not a dynamic varobj, then
+     this attribute will not be present.
 
    The result may have its own attributes:
 
-`displayhint'
+'displayhint'
      A dynamic varobj can supply a display hint to the front end.  The
      value comes directly from the Python pretty-printer object's
-     `display_hint' method.  *Note Pretty Printing API::.
+     'display_hint' method.  *Note Pretty Printing API::.
 
-`has_more'
+'has_more'
      This is an integer attribute which is nonzero if there are children
      remaining after the end of the selected range.
 
@@ -4004,7 +4664,7 @@ Example
       ^done,numchild=N,children=[child={name=NAME,exp=EXP,
       numchild=N,value=VALUE,type=TYPE},(repeats N times)]
 
-The `-var-info-type' Command
+The '-var-info-type' Command
 ----------------------------
 
 Synopsis
@@ -4017,7 +4677,7 @@ returned as a string in the same format 
 
       type=TYPENAME
 
-The `-var-info-expression' Command
+The '-var-info-expression' Command
 ----------------------------------
 
 Synopsis
@@ -4025,24 +4685,24 @@ Synopsis
 
       -var-info-expression NAME
 
-   Returns a string that is suitable for presenting this variable
-object in user interface.  The string is generally not valid expression
-in the current language, and cannot be evaluated.
+   Returns a string that is suitable for presenting this variable object
+in user interface.  The string is generally not valid expression in the
+current language, and cannot be evaluated.
 
-   For example, if `a' is an array, and variable object `A' was created
-for `a', then we'll get this output:
+   For example, if 'a' is an array, and variable object 'A' was created
+for 'a', then we'll get this output:
 
      (gdb) -var-info-expression A.1
      ^done,lang="C",exp="1"
 
-Here, the value of `lang' is the language name, which can be found in
+Here, the value of 'lang' is the language name, which can be found in
 *note Supported Languages::.
 
-   Note that the output of the `-var-list-children' command also
-includes those expressions, so the `-var-info-expression' command is of
+   Note that the output of the '-var-list-children' command also
+includes those expressions, so the '-var-info-expression' command is of
 limited use.
 
-The `-var-info-path-expression' Command
+The '-var-info-path-expression' Command
 ---------------------------------------
 
 Synopsis
@@ -4052,21 +4712,21 @@ Synopsis
 
    Returns an expression that can be evaluated in the current context
 and will yield the same value that a variable object has.  Compare this
-with the `-var-info-expression' command, which result can be used only
-for UI presentation.  Typical use of the `-var-info-path-expression'
+with the '-var-info-expression' command, which result can be used only
+for UI presentation.  Typical use of the '-var-info-path-expression'
 command is creating a watchpoint from a variable object.
 
    This command is currently not valid for children of a dynamic varobj,
 and will give an error when invoked on one.
 
-   For example, suppose `C' is a C++ class, derived from class `Base',
-and that the `Base' class has a member called `m_size'.  Assume a
-variable `c' is has the type of `C' and a variable object `C' was
-created for variable `c'.  Then, we'll get this output:
+   For example, suppose 'C' is a C++ class, derived from class 'Base',
+and that the 'Base' class has a member called 'm_size'.  Assume a
+variable 'c' is has the type of 'C' and a variable object 'C' was
+created for variable 'c'.  Then, we'll get this output:
      (gdb) -var-info-path-expression C.Base.public.m_size
      ^done,path_expr=((Base)c).m_size)
 
-The `-var-show-attributes' Command
+The '-var-show-attributes' Command
 ----------------------------------
 
 Synopsis
@@ -4078,9 +4738,9 @@ Synopsis
 
       status=ATTR [ ( ,ATTR )* ]
 
-where ATTR is `{ { editable | noneditable } | TBD }'.
+where ATTR is '{ { editable | noneditable } | TBD }'.
 
-The `-var-evaluate-expression' Command
+The '-var-evaluate-expression' Command
 --------------------------------------
 
 Synopsis
@@ -4090,18 +4750,18 @@ Synopsis
 
    Evaluates the expression that is represented by the specified
 variable object and returns its value as a string.  The format of the
-string can be specified with the `-f' option.  The possible values of
-this option are the same as for `-var-set-format' (*note
--var-set-format::).  If the `-f' option is not specified, the current
+string can be specified with the '-f' option.  The possible values of
+this option are the same as for '-var-set-format' (*note
+-var-set-format::).  If the '-f' option is not specified, the current
 display format will be used.  The current display format can be changed
-using the `-var-set-format' command.
+using the '-var-set-format' command.
 
       value=VALUE
 
-   Note that one must invoke `-var-list-children' for a variable before
+   Note that one must invoke '-var-list-children' for a variable before
 the value of a child variable can be evaluated.
 
-The `-var-assign' Command
+The '-var-assign' Command
 -------------------------
 
 Synopsis
@@ -4110,9 +4770,9 @@ Synopsis
       -var-assign NAME EXPRESSION
 
    Assigns the value of EXPRESSION to the variable object specified by
-NAME.  The object must be `editable'.  If the variable's value is
+NAME.  The object must be 'editable'.  If the variable's value is
 altered by the assign, the variable will show up in any subsequent
-`-var-update' list.
+'-var-update' list.
 
 Example
 .......
@@ -4125,7 +4785,7 @@ Example
      ^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
      (gdb)
 
-The `-var-update' Command
+The '-var-update' Command
 -------------------------
 
 Synopsis
@@ -4135,103 +4795,103 @@ Synopsis
 
    Reevaluate the expressions corresponding to the variable object NAME
 and all its direct and indirect children, and return the list of
-variable objects whose values have changed; NAME must be a root
-variable object.  Here, "changed" means that the result of
-`-var-evaluate-expression' before and after the `-var-update' is
-different.  If `*' is used as the variable object names, all existing
+variable objects whose values have changed; NAME must be a root variable
+object.  Here, "changed" means that the result of
+'-var-evaluate-expression' before and after the '-var-update' is
+different.  If '*' is used as the variable object names, all existing
 variable objects are updated, except for frozen ones (*note
 -var-set-frozen::).  The option PRINT-VALUES determines whether both
 names and values, or just names are printed.  The possible values of
-this option are the same as for `-var-list-children' (*note
--var-list-children::).  It is recommended to use the `--all-values'
+this option are the same as for '-var-list-children' (*note
+-var-list-children::).  It is recommended to use the '--all-values'
 option, to reduce the number of MI commands needed on each program stop.
 
-   With the `*' parameter, if a variable object is bound to a currently
+   With the '*' parameter, if a variable object is bound to a currently
 running thread, it will not be updated, without any diagnostic.
 
-   If `-var-set-update-range' was previously used on a varobj, then
-only the selected range of children will be reported.
+   If '-var-set-update-range' was previously used on a varobj, then only
+the selected range of children will be reported.
 
-   `-var-update' reports all the changed varobjs in a tuple named
-`changelist'.
+   '-var-update' reports all the changed varobjs in a tuple named
+'changelist'.
 
    Each item in the change list is itself a tuple holding:
 
-`name'
+'name'
      The name of the varobj.
 
-`value'
+'value'
      If values were requested for this update, then this field will be
      present and will hold the value of the varobj.
 
-`in_scope'
+'in_scope'
      This field is a string which may take one of three values:
 
-    `"true"'
+     '"true"'
           The variable object's current value is valid.
 
-    `"false"'
+     '"false"'
           The variable object does not currently hold a valid value but
           it may hold one in the future if its associated expression
           comes back into scope.
 
-    `"invalid"'
+     '"invalid"'
           The variable object no longer holds a valid value.  This can
           occur when the executable file being debugged has changed,
-          either through recompilation or by using the GDB `file'
-          command.  The front end should normally choose to delete
-          these variable objects.
+          either through recompilation or by using the GDB 'file'
+          command.  The front end should normally choose to delete these
+          variable objects.
 
      In the future new values may be added to this list so the front
      should be prepared for this possibility.  *Note GDB/MI Development
      and Front Ends: GDB/MI Development and Front Ends.
 
-`type_changed'
+'type_changed'
      This is only present if the varobj is still valid.  If the type
-     changed, then this will be the string `true'; otherwise it will be
-     `false'.
+     changed, then this will be the string 'true'; otherwise it will be
+     'false'.
 
      When a varobj's type changes, its children are also likely to have
      become incorrect.  Therefore, the varobj's children are
-     automatically deleted when this attribute is `true'.  Also, the
-     varobj's update range, when set using the `-var-set-update-range'
+     automatically deleted when this attribute is 'true'.  Also, the
+     varobj's update range, when set using the '-var-set-update-range'
      command, is unset.
 
-`new_type'
+'new_type'
      If the varobj's type changed, then this field will be present and
      will hold the new type.
 
-`new_num_children'
+'new_num_children'
      For a dynamic varobj, if the number of children changed, or if the
      type changed, this will be the new number of children.
 
-     The `numchild' field in other varobj responses is generally not
+     The 'numchild' field in other varobj responses is generally not
      valid for a dynamic varobj - it will show the number of children
      that GDB knows about, but because dynamic varobjs lazily
      instantiate their children, this will not reflect the number of
      children which may be available.
 
-     The `new_num_children' attribute only reports changes to the
-     number of children known by GDB.  This is the only way to detect
-     whether an update has removed children (which necessarily can only
-     happen at the end of the update range).
+     The 'new_num_children' attribute only reports changes to the number
+     of children known by GDB.  This is the only way to detect whether
+     an update has removed children (which necessarily can only happen
+     at the end of the update range).
 
-`displayhint'
+'displayhint'
      The display hint, if any.
 
-`has_more'
+'has_more'
      This is an integer value, which will be 1 if there are more
      children available outside the varobj's update range.
 
-`dynamic'
-     This attribute will be present and have the value `1' if the
-     varobj is a dynamic varobj.  If the varobj is not a dynamic varobj,
-     then this attribute will not be present.
+'dynamic'
+     This attribute will be present and have the value '1' if the varobj
+     is a dynamic varobj.  If the varobj is not a dynamic varobj, then
+     this attribute will not be present.
 
-`new_children'
+'new_children'
      If new children were added to a dynamic varobj within the selected
-     update range (as set by `-var-set-update-range'), then they will
-     be listed in this attribute.
+     update range (as set by '-var-set-update-range'), then they will be
+     listed in this attribute.
 
 Example
 .......
@@ -4245,7 +4905,7 @@ Example
      type_changed="false"}]
      (gdb)
 
-The `-var-set-frozen' Command
+The '-var-set-frozen' Command
 -----------------------------
 
 Synopsis
@@ -4254,14 +4914,14 @@ Synopsis
       -var-set-frozen NAME FLAG
 
    Set the frozenness flag on the variable object NAME.  The FLAG
-parameter should be either `1' to make the variable frozen or `0' to
+parameter should be either '1' to make the variable frozen or '0' to
 make it unfrozen.  If a variable object is frozen, then neither itself,
-nor any of its children, are implicitly updated by `-var-update' of a
-parent variable or by `-var-update *'.  Only `-var-update' of the
-variable itself will update its value and values of its children.
-After a variable object is unfrozen, it is implicitly updated by all
-subsequent `-var-update' operations.  Unfreezing a variable does not
-update it, only subsequent `-var-update' does.
+nor any of its children, are implicitly updated by '-var-update' of a
+parent variable or by '-var-update *'.  Only '-var-update' of the
+variable itself will update its value and values of its children.  After
+a variable object is unfrozen, it is implicitly updated by all
+subsequent '-var-update' operations.  Unfreezing a variable does not
+update it, only subsequent '-var-update' does.
 
 Example
 .......
@@ -4271,7 +4931,7 @@ Example
      ^done
      (gdb)
 
-The `-var-set-update-range' command
+The '-var-set-update-range' command
 -----------------------------------
 
 Synopsis
@@ -4280,12 +4940,12 @@ Synopsis
       -var-set-update-range NAME FROM TO
 
    Set the range of children to be returned by future invocations of
-`-var-update'.
+'-var-update'.
 
    FROM and TO indicate the range of children to report.  If FROM or TO
-is less than zero, the range is reset and all children will be
-reported.  Otherwise, children starting at FROM (zero-based) and up to
-and excluding TO will be reported.
+is less than zero, the range is reset and all children will be reported.
+Otherwise, children starting at FROM (zero-based) and up to and
+excluding TO will be reported.
 
 Example
 .......
@@ -4294,7 +4954,7 @@ Example
      -var-set-update-range V 1 2
      ^done
 
-The `-var-set-visualizer' command
+The '-var-set-visualizer' command
 ---------------------------------
 
 Synopsis
@@ -4304,24 +4964,24 @@ Synopsis
 
    Set a visualizer for the variable object NAME.
 
-   VISUALIZER is the visualizer to use.  The special value `None' means
+   VISUALIZER is the visualizer to use.  The special value 'None' means
 to disable any visualizer in use.
 
-   If not `None', VISUALIZER must be a Python expression.  This
+   If not 'None', VISUALIZER must be a Python expression.  This
 expression must evaluate to a callable object which accepts a single
 argument.  GDB will call this object with the value of the varobj NAME
 as an argument (this is done so that the same Python pretty-printing
-code can be used for both the CLI and MI).  When called, this object
-must return an object which conforms to the pretty-printing interface
-(*note Pretty Printing API::).
+code can be used for both the CLI and MI). When called, this object must
+return an object which conforms to the pretty-printing interface (*note
+Pretty Printing API::).
 
-   The pre-defined function `gdb.default_visualizer' may be used to
+   The pre-defined function 'gdb.default_visualizer' may be used to
 select a visualizer by following the built-in process (*note Selecting
 Pretty-Printers::).  This is done automatically when a varobj is
 created, and so ordinarily is not needed.
 
    This feature is only available if Python support is enabled.  The MI
-command `-list-features' (*note GDB/MI Support Commands::) can be used
+command '-list-features' (*note GDB/MI Support Commands::) can be used
 to check this.
 
 Example
@@ -4339,7 +4999,7 @@ Resetting the visualizer:
      -var-set-visualizer V gdb.default_visualizer
      ^done
 
-   Suppose `SomeClass' is a visualizer class.  A lambda expression can
+   Suppose 'SomeClass' is a visualizer class.  A lambda expression can
 be used to instantiate this class for a varobj:
 
      (gdb)
@@ -4352,13 +5012,13 @@ File: gdb.info,  Node: GDB/MI Data Manip
 27.16 GDB/MI Data Manipulation
 ==============================
 
-This section describes the GDB/MI commands that manipulate data:
-examine memory and registers, evaluate expressions, etc.
+This section describes the GDB/MI commands that manipulate data: examine
+memory and registers, evaluate expressions, etc.
 
    For details about what an addressable memory unit is, *note
 addressable memory unit::.
 
-The `-data-disassemble' Command
+The '-data-disassemble' Command
 -------------------------------
 
 Synopsis
@@ -4371,98 +5031,100 @@ Synopsis
 
 Where:
 
-`START-ADDR'
-     is the beginning address (or `$pc')
-
-`END-ADDR'
+'START-ADDR'
+     is the beginning address (or '$pc')
+'END-ADDR'
      is the end address
-
-`FILENAME'
+'FILENAME'
      is the name of the file to disassemble
-
-`LINENUM'
+'LINENUM'
      is the line number to disassemble around
-
-`LINES'
+'LINES'
      is the number of disassembly lines to be produced.  If it is -1,
      the whole function will be disassembled, in case no END-ADDR is
-     specified.  If END-ADDR is specified as a non-zero value, and
-     LINES is lower than the number of disassembly lines between
-     START-ADDR and END-ADDR, only LINES lines are displayed; if LINES
-     is higher than the number of lines between START-ADDR and
-     END-ADDR, only the lines up to END-ADDR are displayed.
-
-`MODE'
-     is either 0 (meaning only disassembly), 1 (meaning mixed source and
-     disassembly), 2 (meaning disassembly with raw opcodes), or 3
-     (meaning mixed source and disassembly with raw opcodes).
+     specified.  If END-ADDR is specified as a non-zero value, and LINES
+     is lower than the number of disassembly lines between START-ADDR
+     and END-ADDR, only LINES lines are displayed; if LINES is higher
+     than the number of lines between START-ADDR and END-ADDR, only the
+     lines up to END-ADDR are displayed.
+'MODE'
+     is one of:
+        * 0 disassembly only
+        * 1 mixed source and disassembly (deprecated)
+        * 2 disassembly with raw opcodes
+        * 3 mixed source and disassembly with raw opcodes (deprecated)
+        * 4 mixed source and disassembly
+        * 5 mixed source and disassembly with raw opcodes
+
+     Modes 1 and 3 are deprecated.  The output is "source centric" which
+     hasn't proved useful in practice.  *Note Machine Code::, for a
+     discussion of the difference between '/m' and '/s' output of the
+     'disassemble' command.
 
 Result
 ......
 
-The result of the `-data-disassemble' command will be a list named
-`asm_insns', the contents of this list depend on the MODE used with the
-`-data-disassemble' command.
+The result of the '-data-disassemble' command will be a list named
+'asm_insns', the contents of this list depend on the MODE used with the
+'-data-disassemble' command.
 
-   For modes 0 and 2 the `asm_insns' list contains tuples with the
+   For modes 0 and 2 the 'asm_insns' list contains tuples with the
 following fields:
 
-`address'
+'address'
      The address at which this instruction was disassembled.
 
-`func-name'
+'func-name'
      The name of the function this instruction is within.
 
-`offset'
-     The decimal offset in bytes from the start of `func-name'.
+'offset'
+     The decimal offset in bytes from the start of 'func-name'.
 
-`inst'
-     The text disassembly for this `address'.
+'inst'
+     The text disassembly for this 'address'.
 
-`opcodes'
-     This field is only present for mode 2.  This contains the raw
-     opcode bytes for the `inst' field.
+'opcodes'
+     This field is only present for modes 2, 3 and 5.  This contains the
+     raw opcode bytes for the 'inst' field.
 
+   For modes 1, 3, 4 and 5 the 'asm_insns' list contains tuples named
+'src_and_asm_line', each of which has the following fields:
 
-   For modes 1 and 3 the `asm_insns' list contains tuples named
-`src_and_asm_line', each of which has the following fields:
+'line'
+     The line number within 'file'.
 
-`line'
-     The line number within `file'.
-
-`file'
+'file'
      The file name from the compilation unit.  This might be an absolute
      file name or a relative file name depending on the compile command
      used.
 
-`fullname'
-     Absolute file name of `file'.  It is converted to a canonical form
+'fullname'
+     Absolute file name of 'file'.  It is converted to a canonical form
      using the source file search path (*note Specifying Source
-     Directories: Source Path.)  and after resolving all the symbolic
+     Directories: Source Path.) and after resolving all the symbolic
      links.
 
      If the source file is not found this field will contain the path as
      present in the debug information.
 
-`line_asm_insn'
-     This is a list of tuples containing the disassembly for `line' in
-     `file'.  The fields of each tuple are the same as for
-     `-data-disassemble' in MODE 0 and 2, so `address', `func-name',
-     `offset', `inst', and optionally `opcodes'.
-
+'line_asm_insn'
+     This is a list of tuples containing the disassembly for 'line' in
+     'file'.  The fields of each tuple are the same as for
+     '-data-disassemble' in MODE 0 and 2, so 'address', 'func-name',
+     'offset', 'inst', and optionally 'opcodes'.
 
-   Note that whatever included in the `inst' field, is not manipulated
+   Note that whatever included in the 'inst' field, is not manipulated
 directly by GDB/MI, i.e., it is not possible to adjust its format.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `disassemble'.
+The corresponding GDB command is 'disassemble'.
 
 Example
 .......
 
-Disassemble from the current value of `$pc' to `$pc + 20':
+Disassemble from the current value of '$pc' to '$pc + 20':
 
      (gdb)
      -data-disassemble -s $pc -e "$pc + 20" -- 0
@@ -4480,7 +5142,7 @@ Disassemble from the current value of `$
      inst="or  %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"}]
      (gdb)
 
-   Disassemble the whole `main' function.  Line 32 is part of `main'.
+   Disassemble the whole 'main' function.  Line 32 is part of 'main'.
 
      -data-disassemble -f basics.c -l 32 -- 0
      ^done,asm_insns=[
@@ -4495,7 +5157,7 @@ Disassemble from the current value of `$
      {address="0x00010820",func-name="main",offset="100",inst="restore "}]
      (gdb)
 
-   Disassemble 3 instructions from the start of `main':
+   Disassemble 3 instructions from the start of 'main':
 
      (gdb)
      -data-disassemble -f basics.c -l 32 -n 3 -- 0
@@ -4508,7 +5170,7 @@ Disassemble from the current value of `$
      inst="sethi  %hi(0x11800), %o2"}]
      (gdb)
 
-   Disassemble 3 instructions from the start of `main' in mixed mode:
+   Disassemble 3 instructions from the start of 'main' in mixed mode:
 
      (gdb)
      -data-disassemble -f basics.c -l 32 -n 3 -- 1
@@ -4527,7 +5189,7 @@ Disassemble from the current value of `$
      inst="sethi  %hi(0x11800), %o2"}]}]
      (gdb)
 
-The `-data-evaluate-expression' Command
+The '-data-evaluate-expression' Command
 ---------------------------------------
 
 Synopsis
@@ -4542,8 +5204,8 @@ If the expression contains spaces, it mu
 GDB Command
 ...........
 
-The corresponding GDB commands are `print', `output', and `call'.  In
-`gdbtk' only, there's a corresponding `gdb_eval' command.
+The corresponding GDB commands are 'print', 'output', and 'call'.  In
+'gdbtk' only, there's a corresponding 'gdb_eval' command.
 
 Example
 .......
@@ -4565,7 +5227,7 @@ Syntax.  Notice how GDB/MI returns the s
      511^done,value="4"
      (gdb)
 
-The `-data-list-changed-registers' Command
+The '-data-list-changed-registers' Command
 ------------------------------------------
 
 Synopsis
@@ -4578,8 +5240,8 @@ Synopsis
 GDB Command
 ...........
 
-GDB doesn't have a direct analog for this command; `gdbtk' has the
-corresponding command `gdb_changed_register_list'.
+GDB doesn't have a direct analog for this command; 'gdbtk' has the
+corresponding command 'gdb_changed_register_list'.
 
 Example
 .......
@@ -4601,7 +5263,7 @@ On a PPC MBX board:
      "24","25","26","27","28","30","31","64","65","66","67","69"]
      (gdb)
 
-The `-data-list-register-names' Command
+The '-data-list-register-names' Command
 ---------------------------------------
 
 Synopsis
@@ -4620,8 +5282,8 @@ GDB Command
 ...........
 
 GDB does not have a command which corresponds to
-`-data-list-register-names'.  In `gdbtk' there is a corresponding
-command `gdb_regnames'.
+'-data-list-register-names'.  In 'gdbtk' there is a corresponding
+command 'gdb_regnames'.
 
 Example
 .......
@@ -4641,47 +5303,42 @@ For the PPC MBX board:
      ^done,register-names=["r1","r2","r3"]
      (gdb)
 
-The `-data-list-register-values' Command
+The '-data-list-register-values' Command
 ----------------------------------------
 
 Synopsis
 ........
 
       -data-list-register-values
-         [ `--skip-unavailable' ] FMT [ ( REGNO )*]
+         [ --skip-unavailable ] FMT [ ( REGNO )*]
 
    Display the registers' contents.  The format according to which the
 registers' contents are to be returned is given by FMT, followed by an
-optional list of numbers specifying the registers to display.  A
-missing list of numbers indicates that the contents of all the
-registers must be returned.  The `--skip-unavailable' option indicates
-that only the available registers are to be returned.
+optional list of numbers specifying the registers to display.  A missing
+list of numbers indicates that the contents of all the registers must be
+returned.  The '--skip-unavailable' option indicates that only the
+available registers are to be returned.
 
    Allowed formats for FMT are:
 
-`x'
+'x'
      Hexadecimal
-
-`o'
+'o'
      Octal
-
-`t'
+'t'
      Binary
-
-`d'
+'d'
      Decimal
-
-`r'
+'r'
      Raw
-
-`N'
+'N'
      Natural
 
 GDB Command
 ...........
 
-The corresponding GDB commands are `info reg', `info all-reg', and (in
-`gdbtk') `gdb_fetch_registers'.
+The corresponding GDB commands are 'info reg', 'info all-reg', and (in
+'gdbtk') 'gdb_fetch_registers'.
 
 Example
 .......
@@ -4733,10 +5390,10 @@ don't appear in the actual output):
      {number="69",value="0x20002b03"}]
      (gdb)
 
-The `-data-read-memory' Command
+The '-data-read-memory' Command
 -------------------------------
 
-This command is deprecated, use `-data-read-memory-bytes' instead.
+This command is deprecated, use '-data-read-memory-bytes' instead.
 
 Synopsis
 ........
@@ -4747,56 +5404,56 @@ Synopsis
 
 where:
 
-`ADDRESS'
+'ADDRESS'
      An expression specifying the address of the first memory word to be
      read.  Complex expressions containing embedded white space should
      be quoted using the C convention.
 
-`WORD-FORMAT'
+'WORD-FORMAT'
      The format to be used to print the memory words.  The notation is
-     the same as for GDB's `print' command (*note Output Formats:
-     Output Formats.).
+     the same as for GDB's 'print' command (*note Output Formats: Output
+     Formats.).
 
-`WORD-SIZE'
+'WORD-SIZE'
      The size of each memory word in bytes.
 
-`NR-ROWS'
+'NR-ROWS'
      The number of rows in the output table.
 
-`NR-COLS'
+'NR-COLS'
      The number of columns in the output table.
 
-`ASCHAR'
+'ASCHAR'
      If present, indicates that each row should include an ASCII dump.
      The value of ASCHAR is used as a padding character when a byte is
      not a member of the printable ASCII character set (printable ASCII
      characters are those whose code is between 32 and 126,
      inclusively).
 
-`BYTE-OFFSET'
+'BYTE-OFFSET'
      An offset to add to the ADDRESS before fetching memory.
 
    This command displays memory contents as a table of NR-ROWS by
-NR-COLS words, each word being WORD-SIZE bytes.  In total, `NR-ROWS *
-NR-COLS * WORD-SIZE' bytes are read (returned as `total-bytes').
-Should less than the requested number of bytes be returned by the
-target, the missing words are identified using `N/A'.  The number of
-bytes read from the target is returned in `nr-bytes' and the starting
-address used to read memory in `addr'.
+NR-COLS words, each word being WORD-SIZE bytes.  In total, 'NR-ROWS *
+NR-COLS * WORD-SIZE' bytes are read (returned as 'total-bytes').  Should
+less than the requested number of bytes be returned by the target, the
+missing words are identified using 'N/A'.  The number of bytes read from
+the target is returned in 'nr-bytes' and the starting address used to
+read memory in 'addr'.
 
    The address of the next/previous row or page is available in
-`next-row' and `prev-row', `next-page' and `prev-page'.
+'next-row' and 'prev-row', 'next-page' and 'prev-page'.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `x'.  `gdbtk' has `gdb_get_mem' memory
+The corresponding GDB command is 'x'.  'gdbtk' has 'gdb_get_mem' memory
 read command.
 
 Example
 .......
 
-Read six bytes of memory starting at `bytes+6' but then offset by `-6'
+Read six bytes of memory starting at 'bytes+6' but then offset by '-6'
 bytes.  Format as three rows of two columns.  One byte per word.
 Display each word in hex.
 
@@ -4810,7 +5467,7 @@ Display each word in hex.
      {addr="0x00001394",data=["0x04","0x05"]}]
      (gdb)
 
-   Read two bytes of memory starting at address `shorts + 64' and
+   Read two bytes of memory starting at address 'shorts + 64' and
 display as a single word formatted in decimal.
 
      (gdb)
@@ -4821,8 +5478,8 @@ display as a single word formatted in de
      {addr="0x00001510",data=["128"]}]
      (gdb)
 
-   Read thirty two bytes of memory starting at `bytes+16' and format as
-eight rows of four columns.  Include a string encoding with `x' used as
+   Read thirty two bytes of memory starting at 'bytes+16' and format as
+eight rows of four columns.  Include a string encoding with 'x' used as
 the non-printable character.
 
      (gdb)
@@ -4840,7 +5497,7 @@ the non-printable character.
      {addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"}]
      (gdb)
 
-The `-data-read-memory-bytes' Command
+The '-data-read-memory-bytes' Command
 -------------------------------------
 
 Synopsis
@@ -4851,21 +5508,20 @@ Synopsis
 
 where:
 
-`ADDRESS'
+'ADDRESS'
      An expression specifying the address of the first addressable
      memory unit to be read.  Complex expressions containing embedded
      white space should be quoted using the C convention.
 
-`COUNT'
+'COUNT'
      The number of addressable memory units to read.  This should be an
      integer literal.
 
-`OFFSET'
+'OFFSET'
      The offset relative to ADDRESS at which to start reading.  This
      should be an integer literal.  This option is provided so that a
-     frontend is not required to first evaluate address and then
-     perform address arithmetics itself.
-
+     frontend is not required to first evaluate address and then perform
+     address arithmetics itself.
 
    This command attempts to read all accessible memory regions in the
 specified range.  First, all regions marked as unreadable in the memory
@@ -4874,38 +5530,37 @@ Attributes::.  Second, GDB will attempt 
 For each one, if reading full region results in an errors, GDB will try
 to read a subset of the region.
 
-   In general, every single memory unit in the region may be readable
-or not, and the only way to read every readable unit is to try a read at
-every address, which is not practical.   Therefore, GDB will attempt to
+   In general, every single memory unit in the region may be readable or
+not, and the only way to read every readable unit is to try a read at
+every address, which is not practical.  Therefore, GDB will attempt to
 read all accessible memory units at either beginning or the end of the
 region, using a binary division scheme.  This heuristic works well for
 reading accross a memory map boundary.  Note that if a region has a
-readable range that is neither at the beginning or the end, GDB will
-not read it.
+readable range that is neither at the beginning or the end, GDB will not
+read it.
 
    The result record (*note GDB/MI Result Records::) that is output of
-the command includes a field named `memory' whose content is a list of
+the command includes a field named 'memory' whose content is a list of
 tuples.  Each tuple represent a successfully read memory block and has
 the following fields:
 
-`begin'
+'begin'
      The start address of the memory block, as hexadecimal literal.
 
-`end'
+'end'
      The end address of the memory block, as hexadecimal literal.
 
-`offset'
+'offset'
      The offset of the memory block, as hexadecimal literal, relative to
-     the start address passed to `-data-read-memory-bytes'.
+     the start address passed to '-data-read-memory-bytes'.
 
-`contents'
+'contents'
      The contents of the memory block, in hex.
 
-
 GDB Command
 ...........
 
-The corresponding GDB command is `x'.
+The corresponding GDB command is 'x'.
 
 Example
 .......
@@ -4917,7 +5572,7 @@ Example
                    contents="01000000020000000300"}]
      (gdb)
 
-The `-data-write-memory-bytes' Command
+The '-data-write-memory-bytes' Command
 --------------------------------------
 
 Synopsis
@@ -4928,21 +5583,19 @@ Synopsis
 
 where:
 
-`ADDRESS'
+'ADDRESS'
      An expression specifying the address of the first addressable
-     memory unit to be written.  Complex expressions containing
-     embedded white space should be quoted using the C convention.
-
-`CONTENTS'
-     The hex-encoded data to write.  It is an error if CONTENTS does
-     not represent an integral number of addressable memory units.
-
-`COUNT'
-     Optional argument indicating the number of addressable memory
-     units to be written.  If COUNT is greater than CONTENTS' length,
-     GDB will repeatedly write CONTENTS until it fills COUNT memory
-     units.
+     memory unit to be written.  Complex expressions containing embedded
+     white space should be quoted using the C convention.
 
+'CONTENTS'
+     The hex-encoded data to write.  It is an error if CONTENTS does not
+     represent an integral number of addressable memory units.
+
+'COUNT'
+     Optional argument indicating the number of addressable memory units
+     to be written.  If COUNT is greater than CONTENTS' length, GDB will
+     repeatedly write CONTENTS until it fills COUNT memory units.
 
 GDB Command
 ...........
@@ -4971,7 +5624,7 @@ File: gdb.info,  Node: GDB/MI Tracepoint
 The commands defined in this section implement MI support for
 tracepoints.  For detailed introduction, see *note Tracepoints::.
 
-The `-trace-find' Command
+The '-trace-find' Command
 -------------------------
 
 Synopsis
@@ -4983,64 +5636,61 @@ Synopsis
 The following table lists permissible modes and their parameters.  For
 details of operation, see *note tfind::.
 
-`none'
+'none'
      No parameters are required.  Stops examining trace frames.
 
-`frame-number'
+'frame-number'
      An integer is required as parameter.  Selects tracepoint frame with
      that index.
 
-`tracepoint-number'
+'tracepoint-number'
      An integer is required as parameter.  Finds next trace frame that
      corresponds to tracepoint with the specified number.
 
-`pc'
+'pc'
      An address is required as parameter.  Finds next trace frame that
      corresponds to any tracepoint at the specified address.
 
-`pc-inside-range'
+'pc-inside-range'
      Two addresses are required as parameters.  Finds next trace frame
-     that corresponds to a tracepoint at an address inside the
-     specified range.  Both bounds are considered to be inside the
-     range.
+     that corresponds to a tracepoint at an address inside the specified
+     range.  Both bounds are considered to be inside the range.
 
-`pc-outside-range'
+'pc-outside-range'
      Two addresses are required as parameters.  Finds next trace frame
      that corresponds to a tracepoint at an address outside the
      specified range.  Both bounds are considered to be inside the
      range.
 
-`line'
+'line'
      Line specification is required as parameter.  *Note Specify
      Location::.  Finds next trace frame that corresponds to a
      tracepoint at the specified location.
 
-
-   If `none' was passed as MODE, the response does not have fields.
+   If 'none' was passed as MODE, the response does not have fields.
 Otherwise, the response may have the following fields:
 
-`found'
-     This field has either `0' or `1' as the value, depending on
-     whether a matching tracepoint was found.
+'found'
+     This field has either '0' or '1' as the value, depending on whether
+     a matching tracepoint was found.
 
-`traceframe'
+'traceframe'
      The index of the found traceframe.  This field is present iff the
-     `found' field has value of `1'.
+     'found' field has value of '1'.
 
-`tracepoint'
+'tracepoint'
      The index of the found tracepoint.  This field is present iff the
-     `found' field has value of `1'.
+     'found' field has value of '1'.
 
-`frame'
+'frame'
      The information about the frame corresponding to the found trace
      frame.  This field is present only if a trace frame was found.
      *Note GDB/MI Frame Information::, for description of this field.
 
-
 GDB Command
 ...........
 
-The corresponding GDB command is `tfind'.
+The corresponding GDB command is 'tfind'.
 
 -trace-define-variable
 ----------------------
@@ -5052,14 +5702,14 @@ Synopsis
 
    Create trace variable NAME if it does not exist.  If VALUE is
 specified, sets the initial value of the specified trace variable to
-that value.  Note that the NAME should start with the `$' character.
+that value.  Note that the NAME should start with the '$' character.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `tvariable'.
+The corresponding GDB command is 'tvariable'.
 
-The `-trace-frame-collected' Command
+The '-trace-frame-collected' Command
 ------------------------------------
 
 Synopsis
@@ -5077,19 +5727,19 @@ have been collected at a particular trac
 parameters to the command affect the output format in different ways.
 See the output description table below for more details.
 
-   The reported names can be used in the normal manner to create
-varobjs and inspect the objects themselves.  The items returned by this
-command are categorized so that it is clear which is a variable, which
-is a register, which is a trace state variable, which is a memory range
-and which is a computed expression.
+   The reported names can be used in the normal manner to create varobjs
+and inspect the objects themselves.  The items returned by this command
+are categorized so that it is clear which is a variable, which is a
+register, which is a trace state variable, which is a memory range and
+which is a computed expression.
 
    For instance, if the actions were
      collect myVar, myArray[myIndex], myObj.field, myPtr->field, myCount + 2
      collect *(int*)0xaf02bef0@40
 
-the object collected in its entirety would be `myVar'.  The object
-`myArray' would be partially collected, because only the element at
-index `myIndex' would be collected.  The remaining objects would be
+the object collected in its entirety would be 'myVar'.  The object
+'myArray' would be partially collected, because only the element at
+index 'myIndex' would be collected.  The remaining objects would be
 computed expressions.
 
    An example output would be:
@@ -5115,50 +5765,48 @@ computed expressions.
 
    Where:
 
-`explicit-variables'
+'explicit-variables'
      The set of objects that have been collected in their entirety (as
      opposed to collecting just a few elements of an array or a few
      struct members).  For each object, its name and value are printed.
-     The `--var-print-values' option affects how or whether the value
+     The '--var-print-values' option affects how or whether the value
      field is output.  If VAR_PVAL is 0, then print only the names; if
      it is 1, print also their values; and if it is 2, print the name,
      type and value for simple data types, and the name and type for
      arrays, structures and unions.
 
-`computed-expressions'
+'computed-expressions'
      The set of computed expressions that have been collected at the
-     current trace frame.  The `--comp-print-values' option affects
-     this set like the `--var-print-values' option affects the
-     `explicit-variables' set.  See above.
+     current trace frame.  The '--comp-print-values' option affects this
+     set like the '--var-print-values' option affects the
+     'explicit-variables' set.  See above.
 
-`registers'
+'registers'
      The registers that have been collected at the current trace frame.
      For each register collected, the name and current value are
      returned.  The value is formatted according to the
-     `--registers-format' option.  See the `-data-list-register-values'
-     command for a list of the allowed formats.  The default is `x'.
+     '--registers-format' option.  See the '-data-list-register-values'
+     command for a list of the allowed formats.  The default is 'x'.
 
-`tvars'
+'tvars'
      The trace state variables that have been collected at the current
      trace frame.  For each trace state variable collected, the name and
      current value are returned.
 
-`memory'
+'memory'
      The set of memory ranges that have been collected at the current
      trace frame.  Its content is a list of tuples.  Each tuple
      represents a collected memory range and has the following fields:
 
-    `address'
+     'address'
           The start address of the memory range, as hexadecimal literal.
 
-    `length'
+     'length'
           The length of the memory range, as decimal literal.
 
-    `contents'
+     'contents'
           The contents of the memory block, in hex.  This field is only
-          present if the `--memory-contents' option is specified.
-
-
+          present if the '--memory-contents' option is specified.
 
 GDB Command
 ...........
@@ -5179,24 +5827,23 @@ Synopsis
    Return a table of all defined trace variables.  Each element of the
 table has the following fields:
 
-`name'
+'name'
      The name of the trace variable.  This field is always present.
 
-`initial'
-     The initial value.  This is a 64-bit signed integer.  This field
-     is always present.
+'initial'
+     The initial value.  This is a 64-bit signed integer.  This field is
+     always present.
 
-`current'
+'current'
      The value the trace variable has at the moment.  This is a 64-bit
      signed integer.  This field is absent iff current value is not
      defined, for example if the trace was never run, or is presently
      running.
 
-
 GDB Command
 ...........
 
-The corresponding GDB command is `tvariables'.
+The corresponding GDB command is 'tvariables'.
 
 Example
 .......
@@ -5217,16 +5864,20 @@ Example
 Synopsis
 ........
 
-      -trace-save [-r ] FILENAME
+      -trace-save [ -r ] [ -ctf ] FILENAME
 
-   Saves the collected trace data to FILENAME.  Without the `-r'
-option, the data is downloaded from the target and saved in a local
-file.  With the `-r' option the target is asked to perform the save.
+   Saves the collected trace data to FILENAME.  Without the '-r' option,
+the data is downloaded from the target and saved in a local file.  With
+the '-r' option the target is asked to perform the save.
+
+   By default, this command will save the trace in the tfile format.
+You can supply the optional '-ctf' argument to save it the CTF format.
+See *note Trace Files:: for more information about CTF.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `tsave'.
+The corresponding GDB command is 'tsave'.
 
 -trace-start
 ------------
@@ -5236,13 +5887,13 @@ Synopsis
 
       -trace-start
 
-   Starts a tracing experiments.  The result of this command does not
+   Starts a tracing experiment.  The result of this command does not
 have any fields.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `tstart'.
+The corresponding GDB command is 'tstart'.
 
 -trace-status
 -------------
@@ -5255,66 +5906,65 @@ Synopsis
    Obtains the status of a tracing experiment.  The result may include
 the following fields:
 
-`supported'
-     May have a value of either `0', when no tracing operations are
-     supported, `1', when all tracing operations are supported, or
-     `file' when examining trace file.  In the latter case, examining
-     of trace frame is possible but new tracing experiement cannot be
+'supported'
+     May have a value of either '0', when no tracing operations are
+     supported, '1', when all tracing operations are supported, or
+     'file' when examining trace file.  In the latter case, examining of
+     trace frame is possible but new tracing experiement cannot be
      started.  This field is always present.
 
-`running'
-     May have a value of either `0' or `1' depending on whether tracing
+'running'
+     May have a value of either '0' or '1' depending on whether tracing
      experiement is in progress on target.  This field is present if
-     `supported' field is not `0'.
+     'supported' field is not '0'.
 
-`stop-reason'
+'stop-reason'
      Report the reason why the tracing was stopped last time.  This
      field may be absent iff tracing was never stopped on target yet.
-     The value of `request' means the tracing was stopped as result of
-     the `-trace-stop' command.  The value of `overflow' means the
-     tracing buffer is full.  The value of `disconnection' means
-     tracing was automatically stopped when GDB has disconnected.  The
-     value of `passcount' means tracing was stopped when a tracepoint
-     was passed a maximal number of times for that tracepoint.  This
-     field is present if `supported' field is not `0'.
+     The value of 'request' means the tracing was stopped as result of
+     the '-trace-stop' command.  The value of 'overflow' means the
+     tracing buffer is full.  The value of 'disconnection' means tracing
+     was automatically stopped when GDB has disconnected.  The value of
+     'passcount' means tracing was stopped when a tracepoint was passed
+     a maximal number of times for that tracepoint.  This field is
+     present if 'supported' field is not '0'.
 
-`stopping-tracepoint'
+'stopping-tracepoint'
      The number of tracepoint whose passcount as exceeded.  This field
-     is present iff the `stop-reason' field has the value of
-     `passcount'.
+     is present iff the 'stop-reason' field has the value of
+     'passcount'.
 
-`frames'
-`frames-created'
-     The `frames' field is a count of the total number of trace frames
-     in the trace buffer, while `frames-created' is the total created
+'frames'
+'frames-created'
+     The 'frames' field is a count of the total number of trace frames
+     in the trace buffer, while 'frames-created' is the total created
      during the run, including ones that were discarded, such as when a
      circular trace buffer filled up.  Both fields are optional.
 
-`buffer-size'
-`buffer-free'
+'buffer-size'
+'buffer-free'
      These fields tell the current size of the tracing buffer and the
      remaining space.  These fields are optional.
 
-`circular'
-     The value of the circular trace buffer flag.  `1' means that the
+'circular'
+     The value of the circular trace buffer flag.  '1' means that the
      trace buffer is circular and old trace frames will be discarded if
-     necessary to make room, `0' means that the trace buffer is linear
+     necessary to make room, '0' means that the trace buffer is linear
      and may fill up.
 
-`disconnected'
-     The value of the disconnected tracing flag.  `1' means that
-     tracing will continue after GDB disconnects, `0' means that the
-     trace run will stop.
+'disconnected'
+     The value of the disconnected tracing flag.  '1' means that tracing
+     will continue after GDB disconnects, '0' means that the trace run
+     will stop.
 
-`trace-file'
+'trace-file'
      The filename of the trace file being examined.  This field is
      optional, and only present when examining a trace file.
 
-
 GDB Command
 ...........
 
-The corresponding GDB command is `tstatus'.
+The corresponding GDB command is 'tstatus'.
 
 -trace-stop
 -----------
@@ -5325,13 +5975,13 @@ Synopsis
       -trace-stop
 
    Stops a tracing experiment.  The result of this command has the same
-fields as `-trace-status', except that the `supported' and `running'
+fields as '-trace-status', except that the 'supported' and 'running'
 fields are not output.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `tstop'.
+The corresponding GDB command is 'tstop'.
 
 
 File: gdb.info,  Node: GDB/MI Symbol Query,  Next: GDB/MI File Commands,  Prev: GDB/MI Tracepoint Commands,  Up: GDB/MI
@@ -5339,7 +5989,7 @@ File: gdb.info,  Node: GDB/MI Symbol Que
 27.18 GDB/MI Symbol Query Commands
 ==================================
 
-The `-symbol-list-lines' Command
+The '-symbol-list-lines' Command
 --------------------------------
 
 Synopsis
@@ -5348,8 +5998,8 @@ Synopsis
       -symbol-list-lines FILENAME
 
    Print the list of lines that contain code and their associated
-program addresses for the given source filename.  The entries are
-sorted in ascending PC order.
+program addresses for the given source filename.  The entries are sorted
+in ascending PC order.
 
 GDB Command
 ...........
@@ -5373,7 +6023,7 @@ File: gdb.info,  Node: GDB/MI File Comma
 This section describes the GDB/MI commands to specify executable file
 names and to read in and obtain symbol table information.
 
-The `-file-exec-and-symbols' Command
+The '-file-exec-and-symbols' Command
 ------------------------------------
 
 Synopsis
@@ -5391,7 +6041,7 @@ notification.
 GDB Command
 ...........
 
-The corresponding GDB command is `file'.
+The corresponding GDB command is 'file'.
 
 Example
 .......
@@ -5401,7 +6051,7 @@ Example
      ^done
      (gdb)
 
-The `-file-exec-file' Command
+The '-file-exec-file' Command
 -----------------------------
 
 Synopsis
@@ -5410,15 +6060,15 @@ Synopsis
       -file-exec-file FILE
 
    Specify the executable file to be debugged.  Unlike
-`-file-exec-and-symbols', the symbol table is _not_ read from this
-file.  If used without argument, GDB clears the information about the
+'-file-exec-and-symbols', the symbol table is _not_ read from this file.
+If used without argument, GDB clears the information about the
 executable file.  No output is produced, except a completion
 notification.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `exec-file'.
+The corresponding GDB command is 'exec-file'.
 
 Example
 .......
@@ -5428,7 +6078,7 @@ Example
      ^done
      (gdb)
 
-The `-file-list-exec-source-file' Command
+The '-file-list-exec-source-file' Command
 -----------------------------------------
 
 Synopsis
@@ -5438,13 +6088,13 @@ Synopsis
 
    List the line number, the current source file, and the absolute path
 to the current source file for the current executable.  The macro
-information field has a value of `1' or `0' depending on whether or not
+information field has a value of '1' or '0' depending on whether or not
 the file includes preprocessor macro information.
 
 GDB Command
 ...........
 
-The GDB equivalent is `info source'
+The GDB equivalent is 'info source'
 
 Example
 .......
@@ -5454,7 +6104,7 @@ Example
      123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1"
      (gdb)
 
-The `-file-list-exec-source-files' Command
+The '-file-list-exec-source-files' Command
 ------------------------------------------
 
 Synopsis
@@ -5470,8 +6120,8 @@ name) of a source file.
 GDB Command
 ...........
 
-The GDB equivalent is `info sources'.  `gdbtk' has an analogous command
-`gdb_listfiles'.
+The GDB equivalent is 'info sources'.  'gdbtk' has an analogous command
+'gdb_listfiles'.
 
 Example
 .......
@@ -5484,7 +6134,7 @@ Example
      {file=gdb_could_not_find_fullpath.c}]
      (gdb)
 
-The `-file-symbol-file' Command
+The '-file-symbol-file' Command
 -------------------------------
 
 Synopsis
@@ -5499,7 +6149,7 @@ produced, except for a completion notifi
 GDB Command
 ...........
 
-The corresponding GDB command is `symbol-file'.
+The corresponding GDB command is 'symbol-file'.
 
 Example
 .......
@@ -5515,7 +6165,7 @@ File: gdb.info,  Node: GDB/MI Target Man
 27.20 GDB/MI Target Manipulation Commands
 =========================================
 
-The `-target-attach' Command
+The '-target-attach' Command
 ----------------------------
 
 Synopsis
@@ -5525,12 +6175,12 @@ Synopsis
 
    Attach to a process PID or a file FILE outside of GDB, or a thread
 group GID.  If attaching to a thread group, the id previously returned
-by `-list-thread-groups --available' must be used.
+by '-list-thread-groups --available' must be used.
 
 GDB Command
 ...........
 
-The corresponding GDB command is `attach'.
+The corresponding GDB command is 'attach'.
 
 Example
 .......
@@ -5542,7 +6192,7 @@ Example
      ^done
      (gdb)
 
-The `-target-detach' Command
+The '-target-detach' Command
 ----------------------------
 
 Synopsis
@@ -5557,7 +6207,7 @@ process, or specified thread group.  The
 GDB Command
 ...........
 
-The corresponding GDB command is `detach'.
+The corresponding GDB command is 'detach'.
 
 Example
 .......
@@ -5567,7 +6217,7 @@ Example
      ^done
      (gdb)
 
-The `-target-disconnect' Command
+The '-target-disconnect' Command
 --------------------------------
 
 Synopsis
@@ -5581,7 +6231,7 @@ is generally not resumed.
 GDB Command
 ...........
 
-The corresponding GDB command is `disconnect'.
+The corresponding GDB command is 'disconnect'.
 
 Example
 .......
@@ -5591,7 +6241,7 @@ Example
      ^done
      (gdb)
 
-The `-target-download' Command
+The '-target-download' Command
 ------------------------------
 
 Synopsis
@@ -5599,23 +6249,19 @@ Synopsis
 
       -target-download
 
-   Loads the executable onto the remote target.  It prints out an
-update message every half second, which includes the fields:
+   Loads the executable onto the remote target.  It prints out an update
+message every half second, which includes the fields:
 
-`section'
+'section'
      The name of the section.
-
-`section-sent'
+'section-sent'
      The size of what has been sent so far for that section.
-
-`section-size'
+'section-size'
      The size of the section.
-
-`total-sent'
+'total-sent'
      The total size of what was sent so far (the current and the
      previous sections).
-
-`total-size'
+'total-size'
      The size of the overall executable to download.
 
 Each message is sent as status record (*note GDB/MI Output Syntax:
@@ -5624,13 +6270,11 @@ GDB/MI Output Syntax.).
    In addition, it prints the name and size of the sections, as they are
 downloaded.  These messages include the following fields:
 
-`section'
+'section'
      The name of the section.
-
-`section-size'
+'section-size'
      The size of the section.
-
-`total-size'
+'total-size'
      The size of the overall executable to download.
 
 At the end, a summary is printed.
@@ -5638,7 +6282,7 @@ At the end, a summary is printed.
 GDB Command
 ...........
 
-The corresponding GDB command is `load'.
+The corresponding GDB command is 'load'.
 
 Example
 .......
@@ -5704,7 +6348,27 @@ Example
 
 N.A.
 
-The `-target-select' Command
+The '-target-flash-erase' Command
+---------------------------------
+
+Synopsis
+........
+
+      -target-flash-erase
+
+   Erases all known flash memory regions on the target.
+
+   The corresponding GDB command is 'flash-erase'.
+
+   The output is a list of flash regions that have been erased, with
+starting addresses and memory region sizes.
+
+     (gdb)
+     -target-flash-erase
+     ^done,erased-regions={address="0x0",size="0x40000"}
+     (gdb)
+
+The '-target-select' Command
 ----------------------------
 
 Synopsis
@@ -5714,12 +6378,11 @@ Synopsis
 
    Connect GDB to the remote target.  This command takes two args:
 
-`TYPE'
-     The type of target, for instance `remote', etc.
-
-`PARAMETERS'
-     Device names, host names and the like.  *Note Commands for
-     Managing Targets: Target Commands, for more details.
+'TYPE'
+     The type of target, for instance 'remote', etc.
+'PARAMETERS'
+     Device names, host names and the like.  *Note Commands for Managing
+     Targets: Target Commands, for more details.
 
    The output is a connection notification, followed by the address at
 which the target program is, in the following form:
@@ -5730,7 +6393,7 @@ which the target program is, in the foll
 GDB Command
 ...........
 
-The corresponding GDB command is `target'.
+The corresponding GDB command is 'target'.
 
 Example
 .......
@@ -5746,7 +6409,7 @@ File: gdb.info,  Node: GDB/MI File Trans
 27.21 GDB/MI File Transfer Commands
 ===================================
 
-The `-target-file-put' Command
+The '-target-file-put' Command
 ------------------------------
 
 Synopsis
@@ -5760,7 +6423,7 @@ TARGETFILE on the target system.
 GDB Command
 ...........
 
-The corresponding GDB command is `remote put'.
+The corresponding GDB command is 'remote put'.
 
 Example
 .......
@@ -5770,7 +6433,7 @@ Example
      ^done
      (gdb)
 
-The `-target-file-get' Command
+The '-target-file-get' Command
 ------------------------------
 
 Synopsis
@@ -5784,7 +6447,7 @@ system.
 GDB Command
 ...........
 
-The corresponding GDB command is `remote get'.
+The corresponding GDB command is 'remote get'.
 
 Example
 .......
@@ -5794,7 +6457,7 @@ Example
      ^done
      (gdb)
 
-The `-target-file-delete' Command
+The '-target-file-delete' Command
 ---------------------------------
 
 Synopsis
@@ -5807,7 +6470,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `remote delete'.
+The corresponding GDB command is 'remote delete'.
 
 Example
 .......
@@ -5823,7 +6486,7 @@ File: gdb.info,  Node: GDB/MI Ada Except
 27.22 Ada Exceptions GDB/MI Commands
 ====================================
 
-The `-info-ada-exceptions' Command
+The '-info-ada-exceptions' Command
 ----------------------------------
 
 Synopsis
@@ -5838,7 +6501,7 @@ match REGEXP are listed.
 GDB Command
 ...........
 
-The corresponding GDB command is `info exceptions'.
+The corresponding GDB command is 'info exceptions'.
 
 Result
 ......
@@ -5846,13 +6509,12 @@ Result
 The result is a table of Ada exceptions.  The following columns are
 defined for each exception:
 
-`name'
+'name'
      The name of the exception.
 
-`address'
+'address'
      The address of the exception.
 
-
 Example
 .......
 
@@ -5878,10 +6540,10 @@ File: gdb.info,  Node: GDB/MI Support Co
 
 Since new commands and features get regularly added to GDB/MI, some
 commands are available to help front-ends query the debugger about
-support for these capabilities.  Similarly, it is also possible to
-query GDB about target support of certain features.
+support for these capabilities.  Similarly, it is also possible to query
+GDB about target support of certain features.
 
-The `-info-gdb-mi-command' Command
+The '-info-gdb-mi-command' Command
 ----------------------------------
 
 Synopsis
@@ -5891,7 +6553,7 @@ Synopsis
 
    Query support for the GDB/MI command named CMD_NAME.
 
-   Note that the dash (`-') starting all GDB/MI commands is technically
+   Note that the dash ('-') starting all GDB/MI commands is technically
 not part of the command name (*note GDB/MI Input Syntax::), and thus
 should be omitted in CMD_NAME.  However, for ease of use, this command
 also accepts the form with the leading dash.
@@ -5906,10 +6568,9 @@ Result
 
 The result is a tuple.  There is currently only one field:
 
-`exists'
-     This field is equal to `"true"' if the GDB/MI command exists,
-     `"false"' otherwise.
-
+'exists'
+     This field is equal to '"true"' if the GDB/MI command exists,
+     '"false"' otherwise.
 
 Example
 .......
@@ -5925,7 +6586,7 @@ debugger:
      -info-gdb-mi-command symbol-list-lines
      ^done,command={exists="true"}
 
-The `-list-features' Command
+The '-list-features' Command
 ----------------------------
 
 Returns a list of particular features of the MI protocol that this
@@ -5946,83 +6607,72 @@ given below.
 
    The current list of features is:
 
-`frozen-varobjs'
-     Indicates support for the `-var-set-frozen' command, as well as
-     possible presense of the `frozen' field in the output of
-     `-varobj-create'.
-
-`pending-breakpoints'
-     Indicates support for the `-f' option to the `-break-insert'
+'frozen-varobjs'
+     Indicates support for the '-var-set-frozen' command, as well as
+     possible presense of the 'frozen' field in the output of
+     '-varobj-create'.
+'pending-breakpoints'
+     Indicates support for the '-f' option to the '-break-insert'
      command.
-
-`python'
+'python'
      Indicates Python scripting support, Python-based pretty-printing
-     commands, and possible presence of the `display_hint' field in the
-     output of `-var-list-children'
-
-`thread-info'
-     Indicates support for the `-thread-info' command.
-
-`data-read-memory-bytes'
-     Indicates support for the `-data-read-memory-bytes' and the
-     `-data-write-memory-bytes' commands.
-
-`breakpoint-notifications'
+     commands, and possible presence of the 'display_hint' field in the
+     output of '-var-list-children'
+'thread-info'
+     Indicates support for the '-thread-info' command.
+'data-read-memory-bytes'
+     Indicates support for the '-data-read-memory-bytes' and the
+     '-data-write-memory-bytes' commands.
+'breakpoint-notifications'
      Indicates that changes to breakpoints and breakpoints created via
      the CLI will be announced via async records.
-
-`ada-task-info'
-     Indicates support for the `-ada-task-info' command.
-
-`language-option'
-     Indicates that all GDB/MI commands accept the `--language' option
+'ada-task-info'
+     Indicates support for the '-ada-task-info' command.
+'language-option'
+     Indicates that all GDB/MI commands accept the '--language' option
      (*note Context management::).
-
-`info-gdb-mi-command'
-     Indicates support for the `-info-gdb-mi-command' command.
-
-`undefined-command-error-code'
+'info-gdb-mi-command'
+     Indicates support for the '-info-gdb-mi-command' command.
+'undefined-command-error-code'
      Indicates support for the "undefined-command" error code in error
-     result records, produced when trying to execute an undefined
-     GDB/MI command (*note GDB/MI Result Records::).
-
-`exec-run-start-option'
-     Indicates that the `-exec-run' command supports the `--start'
+     result records, produced when trying to execute an undefined GDB/MI
+     command (*note GDB/MI Result Records::).
+'exec-run-start-option'
+     Indicates that the '-exec-run' command supports the '--start'
      option (*note GDB/MI Program Execution::).
 
-The `-list-target-features' Command
+The '-list-target-features' Command
 -----------------------------------
 
 Returns a list of particular features that are supported by the target.
-Those features affect the permitted MI commands, but unlike the
-features reported by the `-list-features' command, the features depend
-on which target GDB is using at the moment.  Whenever a target can
-change, due to commands such as `-target-select', `-target-attach' or
-`-exec-run', the list of target features may change, and the frontend
-should obtain it again.  Example output:
+Those features affect the permitted MI commands, but unlike the features
+reported by the '-list-features' command, the features depend on which
+target GDB is using at the moment.  Whenever a target can change, due to
+commands such as '-target-select', '-target-attach' or '-exec-run', the
+list of target features may change, and the frontend should obtain it
+again.  Example output:
 
      (gdb) -list-target-features
      ^done,result=["async"]
 
    The current list of features is:
 
-`async'
+'async'
      Indicates that the target is capable of asynchronous command
      execution, which means that GDB will accept further commands while
      the target is running.
 
-`reverse'
+'reverse'
      Indicates that the target is capable of reverse execution.  *Note
      Reverse Execution::, for more information.
 
-
 
 File: gdb.info,  Node: GDB/MI Miscellaneous Commands,  Prev: GDB/MI Support Commands,  Up: GDB/MI
 
 27.24 Miscellaneous GDB/MI Commands
 ===================================
 
-The `-gdb-exit' Command
+The '-gdb-exit' Command
 -----------------------
 
 Synopsis
@@ -6035,7 +6685,7 @@ Synopsis
 GDB Command
 ...........
 
-Approximately corresponds to `quit'.
+Approximately corresponds to 'quit'.
 
 Example
 .......
@@ -6044,7 +6694,7 @@ Example
      -gdb-exit
      ^exit
 
-The `-gdb-set' Command
+The '-gdb-set' Command
 ----------------------
 
 Synopsis
@@ -6057,7 +6707,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `set'.
+The corresponding GDB command is 'set'.
 
 Example
 .......
@@ -6067,7 +6717,7 @@ Example
      ^done
      (gdb)
 
-The `-gdb-show' Command
+The '-gdb-show' Command
 -----------------------
 
 Synopsis
@@ -6080,7 +6730,7 @@ Synopsis
 GDB Command
 ...........
 
-The corresponding GDB command is `show'.
+The corresponding GDB command is 'show'.
 
 Example
 .......
@@ -6090,7 +6740,7 @@ Example
      ^done,value="0"
      (gdb)
 
-The `-gdb-version' Command
+The '-gdb-version' Command
 --------------------------
 
 Synopsis
@@ -6103,7 +6753,7 @@ Synopsis
 GDB Command
 ...........
 
-The GDB equivalent is `show version'.  GDB by default shows this
+The GDB equivalent is 'show version'.  GDB by default shows this
 information when you start an interactive session.
 
 Example
@@ -6124,7 +6774,7 @@ Example
      ^done
      (gdb)
 
-The `-list-thread-groups' Command
+The '-list-thread-groups' Command
 ---------------------------------
 
 Synopsis
@@ -6133,86 +6783,83 @@ Synopsis
      -list-thread-groups [ --available ] [ --recurse 1 ] [ GROUP ... ]
 
    Lists thread groups (*note Thread groups::).  When a single thread
-group is passed as the argument, lists the children of that group.
-When several thread group are passed, lists information about those
-thread groups.  Without any parameters, lists information about all
-top-level thread groups.
+group is passed as the argument, lists the children of that group.  When
+several thread group are passed, lists information about those thread
+groups.  Without any parameters, lists information about all top-level
+thread groups.
 
    Normally, thread groups that are being debugged are reported.  With
-the `--available' option, GDB reports thread groups available on the
+the '--available' option, GDB reports thread groups available on the
 target.
 
-   The output of this command may have either a `threads' result or a
-`groups' result.  The `thread' result has a list of tuples as value,
-with each tuple describing a thread (*note GDB/MI Thread
-Information::).  The `groups' result has a list of tuples as value,
-each tuple describing a thread group.  If top-level groups are
-requested (that is, no parameter is passed), or when several groups are
-passed, the output always has a `groups' result.  The format of the
-`group' result is described below.
+   The output of this command may have either a 'threads' result or a
+'groups' result.  The 'thread' result has a list of tuples as value,
+with each tuple describing a thread (*note GDB/MI Thread Information::).
+The 'groups' result has a list of tuples as value, each tuple describing
+a thread group.  If top-level groups are requested (that is, no
+parameter is passed), or when several groups are passed, the output
+always has a 'groups' result.  The format of the 'group' result is
+described below.
 
    To reduce the number of roundtrips it's possible to list thread
-groups together with their children, by passing the `--recurse' option
+groups together with their children, by passing the '--recurse' option
 and the recursion depth.  Presently, only recursion depth of 1 is
 permitted.  If this option is present, then every reported thread group
-will also include its children, either as `group' or `threads' field.
+will also include its children, either as 'group' or 'threads' field.
 
    In general, any combination of option and parameters is permitted,
 with the following caveats:
 
    * When a single thread group is passed, the output will typically be
-     the `threads' result.  Because threads may not contain anything,
-     the `recurse' option will be ignored.
-
-   * When the `--available' option is passed, limited information may
-     be available.  In particular, the list of threads of a process
-     might be inaccessible.  Further, specifying specific thread groups
-     might not give any performance advantage over listing all thread
-     groups.  The frontend should assume that `-list-thread-groups
-     --available' is always an expensive operation and cache the
-     results.
+     the 'threads' result.  Because threads may not contain anything,
+     the 'recurse' option will be ignored.
 
+   * When the '--available' option is passed, limited information may be
+     available.  In particular, the list of threads of a process might
+     be inaccessible.  Further, specifying specific thread groups might
+     not give any performance advantage over listing all thread groups.
+     The frontend should assume that '-list-thread-groups --available'
+     is always an expensive operation and cache the results.
 
-   The `groups' result is a list of tuples, where each tuple may have
+   The 'groups' result is a list of tuples, where each tuple may have
 the following fields:
 
-`id'
-     Identifier of the thread group.  This field is always present.
-     The identifier is an opaque string; frontends should not try to
-     convert it to an integer, even though it might look like one.
+'id'
+     Identifier of the thread group.  This field is always present.  The
+     identifier is an opaque string; frontends should not try to convert
+     it to an integer, even though it might look like one.
 
-`type'
-     The type of the thread group.  At present, only `process' is a
+'type'
+     The type of the thread group.  At present, only 'process' is a
      valid type.
 
-`pid'
+'pid'
      The target-specific process identifier.  This field is only present
-     for thread groups of type `process' and only if the process exists.
+     for thread groups of type 'process' and only if the process exists.
 
-`exit-code'
+'exit-code'
      The exit code of this group's last exited thread, formatted in
      octal.  This field is only present for thread groups of type
-     `process' and only if the process is not running.
+     'process' and only if the process is not running.
 
-`num_children'
+'num_children'
      The number of children this thread group has.  This field may be
      absent for an available thread group.
 
-`threads'
+'threads'
      This field has a list of tuples as value, each tuple describing a
-     thread.  It may be present if the `--recurse' option is specified,
+     thread.  It may be present if the '--recurse' option is specified,
      and it's actually possible to obtain the threads.
 
-`cores'
+'cores'
      This field is a list of integers, each identifying a core that one
      thread of the group is running on.  This field may be absent if
      such information is not available.
 
-`executable'
+'executable'
      The name of the executable file that corresponds to this thread
      group.  The field is only present for thread groups of type
-     `process', and only if there is a corresponding executable file.
-
+     'process', and only if there is a corresponding executable file.
 
 Example
 -------
@@ -6237,7 +6884,7 @@ Example
                     threads=[{id="1",target-id="Thread 0xb7e14b90",cores=[1]},
                              {id="2",target-id="Thread 0xb7e14b90",cores=[2]}]},...]
 
-The `-info-os' Command
+The '-info-os' Command
 ----------------------
 
 Synopsis
@@ -6256,7 +6903,7 @@ system.
 GDB Command
 ...........
 
-The corresponding GDB command is `info os'.
+The corresponding GDB command is 'info os'.
 
 Example
 .......
@@ -6305,13 +6952,13 @@ this:
            item={col0="28152",col1="stan",col2="bash",col3="1"}]}
      (gdb)
 
-   (Note that the MI output here includes a `"Title"' column that does
-not appear in command-line `info os'; this column is useful for MI
+   (Note that the MI output here includes a '"Title"' column that does
+not appear in command-line 'info os'; this column is useful for MI
 clients that want to enumerate the types of data, such as in a popup
-menu, but is needless clutter on the command line, and `info os' omits
+menu, but is needless clutter on the command line, and 'info os' omits
 it.)
 
-The `-add-inferior' Command
+The '-add-inferior' Command
 ---------------------------
 
 Synopsis
@@ -6320,11 +6967,11 @@ Synopsis
      -add-inferior
 
    Creates a new inferior (*note Inferiors and Programs::).  The created
-inferior is not associated with any executable.  Such association may
-be established with the `-file-exec-and-symbols' command (*note GDB/MI
-File Commands::).  The command response has a single field, `inferior',
-whose value is the identifier of the thread group corresponding to the
-new inferior.
+inferior is not associated with any executable.  Such association may be
+established with the '-file-exec-and-symbols' command (*note GDB/MI File
+Commands::).  The command response has a single field, 'inferior', whose
+value is the identifier of the thread group corresponding to the new
+inferior.
 
 Example
 -------
@@ -6333,19 +6980,20 @@ Example
      -add-inferior
      ^done,inferior="i3"
 
-The `-interpreter-exec' Command
+The '-interpreter-exec' Command
 -------------------------------
 
 Synopsis
 --------
 
      -interpreter-exec INTERPRETER COMMAND
-Execute the specified COMMAND in the given INTERPRETER.
+
+   Execute the specified COMMAND in the given INTERPRETER.
 
 GDB Command
 -----------
 
-The corresponding GDB command is `interpreter-exec'.
+The corresponding GDB command is 'interpreter-exec'.
 
 Example
 -------
@@ -6358,7 +7006,7 @@ Example
      ^done
      (gdb)
 
-The `-inferior-tty-set' Command
+The '-inferior-tty-set' Command
 -------------------------------
 
 Synopsis
@@ -6371,7 +7019,7 @@ Synopsis
 GDB Command
 -----------
 
-The corresponding GDB command is `set inferior-tty' /dev/pts/1.
+The corresponding GDB command is 'set inferior-tty' /dev/pts/1.
 
 Example
 -------
@@ -6381,7 +7029,7 @@ Example
      ^done
      (gdb)
 
-The `-inferior-tty-show' Command
+The '-inferior-tty-show' Command
 --------------------------------
 
 Synopsis
@@ -6394,7 +7042,7 @@ Synopsis
 GDB Command
 -----------
 
-The corresponding GDB command is `show inferior-tty'.
+The corresponding GDB command is 'show inferior-tty'.
 
 Example
 -------
@@ -6407,7 +7055,7 @@ Example
      ^done,inferior_tty_terminal="/dev/pts/1"
      (gdb)
 
-The `-enable-timings' Command
+The '-enable-timings' Command
 -----------------------------
 
 Synopsis
@@ -6418,7 +7066,7 @@ Synopsis
    Toggle the printing of the wallclock, user and system times for an MI
 command as a field in its output.  This command is to help frontend
 developers optimize the performance of their code.  No argument is
-equivalent to `yes'.
+equivalent to 'yes'.
 
 GDB Command
 -----------
@@ -6457,12 +7105,12 @@ File: gdb.info,  Node: Annotations,  Nex
 28 GDB Annotations
 ******************
 
-This chapter describes annotations in GDB.  Annotations were designed
-to interface GDB to graphical user interfaces or other similar programs
+This chapter describes annotations in GDB.  Annotations were designed to
+interface GDB to graphical user interfaces or other similar programs
 which want to interact with GDB at a relatively high level.
 
-   The annotation mechanism has largely been superseded by GDB/MI
-(*note GDB/MI::).
+   The annotation mechanism has largely been superseded by GDB/MI (*note
+GDB/MI::).
 
 * Menu:
 
@@ -6481,7 +7129,7 @@ File: gdb.info,  Node: Annotations Overv
 28.1 What is an Annotation?
 ===========================
 
-Annotations start with a newline character, two `control-z' characters,
+Annotations start with a newline character, two 'control-z' characters,
 and the name of the annotation.  If there is no additional information
 associated with this annotation, the name of the annotation is followed
 immediately by a newline.  If there is additional information, the name
@@ -6489,26 +7137,26 @@ of the annotation is followed by a space
 and a newline.  The additional information cannot contain newline
 characters.
 
-   Any output not beginning with a newline and two `control-z'
+   Any output not beginning with a newline and two 'control-z'
 characters denotes literal output from GDB.  Currently there is no need
-for GDB to output a newline followed by two `control-z' characters, but
+for GDB to output a newline followed by two 'control-z' characters, but
 if there was such a need, the annotations could be extended with an
-`escape' annotation which means those three characters as output.
+'escape' annotation which means those three characters as output.
 
-   The annotation LEVEL, which is specified using the `--annotate'
+   The annotation LEVEL, which is specified using the '--annotate'
 command line option (*note Mode Options::), controls how much
 information GDB prints together with its prompt, values of expressions,
-source lines, and other types of output.  Level 0 is for no
-annotations, level 1 is for use when GDB is run as a subprocess of GNU
-Emacs, level 3 is the maximum annotation suitable for programs that
-control GDB, and level 2 annotations have been made obsolete (*note
-Limitations of the Annotation Interface: (annotate)Limitations.).
-
-`set annotate LEVEL'
-     The GDB command `set annotate' sets the level of annotations to
-     the specified LEVEL.
+source lines, and other types of output.  Level 0 is for no annotations,
+level 1 is for use when GDB is run as a subprocess of GNU Emacs, level 3
+is the maximum annotation suitable for programs that control GDB, and
+level 2 annotations have been made obsolete (*note Limitations of the
+Annotation Interface: (annotate)Limitations.).
+
+'set annotate LEVEL'
+     The GDB command 'set annotate' sets the level of annotations to the
+     specified LEVEL.
 
-`show annotate'
+'show annotate'
      Show the current annotation level.
 
    This chapter describes level 3 annotations.
@@ -6534,8 +7182,8 @@ Limitations of the Annotation Interface:
      ^Z^Zpost-prompt
      $
 
-   Here `quit' is input to GDB; the rest is output from GDB.  The three
-lines beginning `^Z^Z' (where `^Z' denotes a `control-z' character) are
+   Here 'quit' is input to GDB; the rest is output from GDB.  The three
+lines beginning '^Z^Z' (where '^Z' denotes a 'control-z' character) are
 annotations; the rest is output from GDB.
 
 
@@ -6544,15 +7192,15 @@ File: gdb.info,  Node: Server Prefix,  N
 28.2 The Server Prefix
 ======================
 
-If you prefix a command with `server ' then it will not affect the
+If you prefix a command with 'server ' then it will not affect the
 command history, nor will it affect GDB's notion of which command to
 repeat if <RET> is pressed on a line by itself.  This means that
-commands can be run behind a user's back by a front-end in a
-transparent manner.
+commands can be run behind a user's back by a front-end in a transparent
+manner.
 
-   The `server ' prefix does not affect the recording of values into
-the value history; to print a value without recording it into the value
-history, use the `output' command instead of the `print' command.
+   The 'server ' prefix does not affect the recording of values into the
+value history; to print a value without recording it into the value
+history, use the 'output' command instead of the 'print' command.
 
    Using this prefix also disables confirmation requests (*note
 confirmation requests::).
@@ -6568,12 +7216,12 @@ know when to send output, when the outpu
 etc.
 
    Different kinds of input each have a different "input type".  Each
-input type has three annotations: a `pre-' annotation, which denotes
-the beginning of any prompt which is being output, a plain annotation,
-which denotes the end of the prompt, and then a `post-' annotation
-which denotes the end of any echo which may (or may not) be associated
-with the input.  For example, the `prompt' input type features the
-following annotations:
+input type has three annotations: a 'pre-' annotation, which denotes the
+beginning of any prompt which is being output, a plain annotation, which
+denotes the end of the prompt, and then a 'post-' annotation which
+denotes the end of any echo which may (or may not) be associated with
+the input.  For example, the 'prompt' input type features the following
+annotations:
 
      ^Z^Zpre-prompt
      ^Z^Zprompt
@@ -6581,25 +7229,25 @@ following annotations:
 
    The input types are
 
-`prompt'
+'prompt'
      When GDB is prompting for a command (the main GDB prompt).
 
-`commands'
-     When GDB prompts for a set of commands, like in the `commands'
+'commands'
+     When GDB prompts for a set of commands, like in the 'commands'
      command.  The annotations are repeated for each command which is
      input.
 
-`overload-choice'
+'overload-choice'
      When GDB wants the user to select between various overloaded
      functions.
 
-`query'
+'query'
      When GDB wants the user to confirm a potentially dangerous
      operation.
 
-`prompt-for-continue'
+'prompt-for-continue'
      When GDB is asking the user to press return to continue.  Note:
-     Don't expect this to work well; instead use `set height 0' to
+     Don't expect this to work well; instead use 'set height 0' to
      disable prompting.  This is because the counting of lines is buggy
      in the presence of annotations.
 
@@ -6619,8 +7267,8 @@ File: gdb.info,  Node: Errors,  Next: In
 
    Quit and error annotations indicate that any annotations which GDB
 was in the middle of may end abruptly.  For example, if a
-`value-history-begin' annotation is followed by a `error', one cannot
-expect to receive the matching `value-history-end'.  One cannot expect
+'value-history-begin' annotation is followed by a 'error', one cannot
+expect to receive the matching 'value-history-end'.  One cannot expect
 not to receive it either, however; an error annotation does not
 necessarily mean that GDB is immediately returning all the way to the
 top level.
@@ -6643,13 +7291,15 @@ File: gdb.info,  Node: Invalidation,  Ne
 The following annotations say that certain pieces of state may have
 changed.
 
-`^Z^Zframes-invalid'
-     The frames (for example, output from the `backtrace' command) may
+'^Z^Zframes-invalid'
+
+     The frames (for example, output from the 'backtrace' command) may
      have changed.
 
-`^Z^Zbreakpoints-invalid'
-     The breakpoints may have changed.  For example, the user just
-     added or deleted a breakpoint.
+'^Z^Zbreakpoints-invalid'
+
+     The breakpoints may have changed.  For example, the user just added
+     or deleted a breakpoint.
 
 
 File: gdb.info,  Node: Annotations for Running,  Next: Source Annotations,  Prev: Invalidation,  Up: Annotations
@@ -6657,8 +7307,8 @@ File: gdb.info,  Node: Annotations for R
 28.6 Running the Program
 ========================
 
-When the program starts executing due to a GDB command such as `step'
-or `continue',
+When the program starts executing due to a GDB command such as 'step' or
+'continue',
 
      ^Z^Zstarting
 
@@ -6666,15 +7316,15 @@ or `continue',
 
      ^Z^Zstopped
 
-   is output.  Before the `stopped' annotation, a variety of
-annotations describe how the program stopped.
+   is output.  Before the 'stopped' annotation, a variety of annotations
+describe how the program stopped.
 
-`^Z^Zexited EXIT-STATUS'
+'^Z^Zexited EXIT-STATUS'
      The program exited, and EXIT-STATUS is the exit status (zero for
      successful exit, otherwise nonzero).
 
-`^Z^Zsignalled'
-     The program exited with a signal.  After the `^Z^Zsignalled', the
+'^Z^Zsignalled'
+     The program exited with a signal.  After the '^Z^Zsignalled', the
      annotation continues:
 
           INTRO-TEXT
@@ -6687,21 +7337,21 @@ annotations describe how the program sto
           ^Z^Zsignal-string-end
           END-TEXT
 
-     where NAME is the name of the signal, such as `SIGILL' or
-     `SIGSEGV', and STRING is the explanation of the signal, such as
-     `Illegal Instruction' or `Segmentation fault'.  The arguments
+     where NAME is the name of the signal, such as 'SIGILL' or
+     'SIGSEGV', and STRING is the explanation of the signal, such as
+     'Illegal Instruction' or 'Segmentation fault'.  The arguments
      INTRO-TEXT, MIDDLE-TEXT, and END-TEXT are for the user's benefit
      and have no particular format.
 
-`^Z^Zsignal'
-     The syntax of this annotation is just like `signalled', but GDB is
+'^Z^Zsignal'
+     The syntax of this annotation is just like 'signalled', but GDB is
      just saying that the program received the signal, not that it was
      terminated with it.
 
-`^Z^Zbreakpoint NUMBER'
+'^Z^Zbreakpoint NUMBER'
      The program hit breakpoint number NUMBER.
 
-`^Z^Zwatchpoint NUMBER'
+'^Z^Zwatchpoint NUMBER'
      The program hit watchpoint number NUMBER.
 
 
@@ -6714,16 +7364,16 @@ The following annotation is used instead
 
      ^Z^Zsource FILENAME:LINE:CHARACTER:MIDDLE:ADDR
 
-   where FILENAME is an absolute file name indicating which source
-file, LINE is the line number within that file (where 1 is the first
-line in the file), CHARACTER is the character position within the file
-(where 0 is the first character in the file) (for most debug formats
-this will necessarily point to the beginning of a line), MIDDLE is
-`middle' if ADDR is in the middle of the line, or `beg' if ADDR is at
-the beginning of the line, and ADDR is the address in the target
-program associated with the source which is being displayed.  The ADDR
-is in the form `0x' followed by one or more lowercase hex digits (note
-that this does not depend on the language).
+   where FILENAME is an absolute file name indicating which source file,
+LINE is the line number within that file (where 1 is the first line in
+the file), CHARACTER is the character position within the file (where 0
+is the first character in the file) (for most debug formats this will
+necessarily point to the beginning of a line), MIDDLE is 'middle' if
+ADDR is in the middle of the line, or 'beg' if ADDR is at the beginning
+of the line, and ADDR is the address in the target program associated
+with the source which is being displayed.  The ADDR is in the form '0x'
+followed by one or more lowercase hex digits (note that this does not
+depend on the language).
 
 
 File: gdb.info,  Node: JIT Interface,  Next: In-Process Agent,  Prev: Annotations,  Up: Top
@@ -6731,10 +7381,10 @@ File: gdb.info,  Node: JIT Interface,  N
 29 JIT Compilation Interface
 ****************************
 
-This chapter documents GDB's "just-in-time" (JIT) compilation
-interface.  A JIT compiler is a program or library that generates native
-executable code at runtime and executes it, usually in order to achieve
-good performance while maintaining platform independence.
+This chapter documents GDB's "just-in-time" (JIT) compilation interface.
+A JIT compiler is a program or library that generates native executable
+code at runtime and executes it, usually in order to achieve good
+performance while maintaining platform independence.
 
    Programs that use JIT compilation are normally difficult to debug
 because portions of their code are generated at runtime, instead of
@@ -6753,8 +7403,8 @@ client of this interface is the LLVM JIT
 interface.  The JIT compiler communicates with GDB by writing data into
 a global variable and calling a fuction at a well-known symbol.  When
 GDB attaches, it reads a linked list of symbol files from the global
-variable to find existing code, and puts a breakpoint in the function
-so that it can find out about additional code.
+variable to find existing code, and puts a breakpoint in the function so
+that it can find out about additional code.
 
 * Menu:
 
@@ -6821,20 +7471,20 @@ To register code with GDB, the JIT shoul
      debug information.  The file must include the virtual addresses of
      the sections.
 
-   * Create a code entry for the file, which gives the start and size
-     of the symbol file.
+   * Create a code entry for the file, which gives the start and size of
+     the symbol file.
 
    * Add it to the linked list in the JIT descriptor.
 
    * Point the relevant_entry field of the descriptor at the entry.
 
-   * Set `action_flag' to `JIT_REGISTER' and call
-     `__jit_debug_register_code'.
+   * Set 'action_flag' to 'JIT_REGISTER' and call
+     '__jit_debug_register_code'.
 
    When GDB is attached and the breakpoint fires, GDB uses the
-`relevant_entry' pointer so it doesn't have to walk the list looking for
-new code.  However, the linked list must still be maintained in order
-to allow GDB to attach to a running process and still find the symbol
+'relevant_entry' pointer so it doesn't have to walk the list looking for
+new code.  However, the linked list must still be maintained in order to
+allow GDB to attach to a running process and still find the symbol
 files.
 
 
@@ -6848,11 +7498,11 @@ If code is freed, then the JIT should us
    * Remove the code entry corresponding to the code from the linked
      list.
 
-   * Point the `relevant_entry' field of the descriptor at the code
+   * Point the 'relevant_entry' field of the descriptor at the code
      entry.
 
-   * Set `action_flag' to `JIT_UNREGISTER' and call
-     `__jit_debug_register_code'.
+   * Set 'action_flag' to 'JIT_UNREGISTER' and call
+     '__jit_debug_register_code'.
 
    If the JIT frees or recompiles code without unregistering it, then
 GDB and the JIT will leak the memory used for the associated symbol
@@ -6871,13 +7521,13 @@ can be resolved by having the JIT writer
 and also provide a reader that parses the debug info generated by the
 JIT compiler.  This section gives a brief overview on writing such a
 parser.  More specific details can be found in the source file
-`gdb/jit-reader.in', which is also installed as a header at
-`INCLUDEDIR/gdb/jit-reader.h' for easy inclusion.
+'gdb/jit-reader.in', which is also installed as a header at
+'INCLUDEDIR/gdb/jit-reader.h' for easy inclusion.
 
    The reader is implemented as a shared object (so this functionality
 is not available on platforms which don't allow loading shared objects
-at runtime).  Two GDB commands, `jit-reader-load' and
-`jit-reader-unload' are provided, to be used to load and unload the
+at runtime).  Two GDB commands, 'jit-reader-load' and
+'jit-reader-unload' are provided, to be used to load and unload the
 readers from a preconfigured directory.  Once loaded, the shared object
 is used the parse the debug information emitted by the JIT compiler.
 
@@ -6892,26 +7542,25 @@ File: gdb.info,  Node: Using JIT Debug I
 29.4.1 Using JIT Debug Info Readers
 -----------------------------------
 
-Readers can be loaded and unloaded using the `jit-reader-load' and
-`jit-reader-unload' commands.
+Readers can be loaded and unloaded using the 'jit-reader-load' and
+'jit-reader-unload' commands.
 
-`jit-reader-load READER'
+'jit-reader-load READER'
      Load the JIT reader named READER, which is a shared object
      specified as either an absolute or a relative file name.  In the
      latter case, GDB will try to load the reader from a pre-configured
-     directory, usually `LIBDIR/gdb/' on a UNIX system (here LIBDIR is
-     the system library directory, often `/usr/local/lib').
+     directory, usually 'LIBDIR/gdb/' on a UNIX system (here LIBDIR is
+     the system library directory, often '/usr/local/lib').
 
      Only one reader can be active at a time; trying to load a second
      reader when one is already loaded will result in GDB reporting an
      error.  A new JIT reader can be loaded by first unloading the
-     current one using `jit-reader-unload' and then invoking
-     `jit-reader-load'.
+     current one using 'jit-reader-unload' and then invoking
+     'jit-reader-load'.
 
-`jit-reader-unload'
+'jit-reader-unload'
      Unload the currently loaded JIT reader.
 
-
 
 File: gdb.info,  Node: Writing JIT Debug Info Readers,  Prev: Using JIT Debug Info Readers,  Up: Custom Debug Info
 
@@ -6919,27 +7568,27 @@ File: gdb.info,  Node: Writing JIT Debug
 -------------------------------------
 
 As mentioned, a reader is essentially a shared object conforming to a
-certain ABI.  This ABI is described in `jit-reader.h'.
+certain ABI. This ABI is described in 'jit-reader.h'.
 
-   `jit-reader.h' defines the structures, macros and functions required
+   'jit-reader.h' defines the structures, macros and functions required
 to write a reader.  It is installed (along with GDB), in
-`INCLUDEDIR/gdb' where INCLUDEDIR is the system include directory.
+'INCLUDEDIR/gdb' where INCLUDEDIR is the system include directory.
 
    Readers need to be released under a GPL compatible license.  A reader
 can be declared as released under such a license by placing the macro
-`GDB_DECLARE_GPL_COMPATIBLE_READER' in a source file.
+'GDB_DECLARE_GPL_COMPATIBLE_READER' in a source file.
 
-   The entry point for readers is the symbol `gdb_init_reader', which
-is expected to be a function with the prototype
+   The entry point for readers is the symbol 'gdb_init_reader', which is
+expected to be a function with the prototype
 
      extern struct gdb_reader_funcs *gdb_init_reader (void);
 
-   `struct gdb_reader_funcs' contains a set of pointers to callback
+   'struct gdb_reader_funcs' contains a set of pointers to callback
 functions.  These functions are executed to read the debug info
-generated by the JIT compiler (`read'), to unwind stack frames
-(`unwind') and to create canonical frame IDs (`get_Frame_id').  It also
+generated by the JIT compiler ('read'), to unwind stack frames
+('unwind') and to create canonical frame IDs ('get_Frame_id').  It also
 has a callback that is called when the reader is being unloaded
-(`destroy').  The struct looks like this
+('destroy').  The struct looks like this
 
      struct gdb_reader_funcs
      {
@@ -6955,15 +7604,15 @@ has a callback that is called when the r
        gdb_destroy_reader *destroy;
      };
 
-   The callbacks are provided with another set of callbacks by GDB to
-do their job.  For `read', these callbacks are passed in a `struct
-gdb_symbol_callbacks' and for `unwind' and `get_frame_id', in a `struct
-gdb_unwind_callbacks'.  `struct gdb_symbol_callbacks' has callbacks to
-create new object files and new symbol tables inside those object
-files.  `struct gdb_unwind_callbacks' has callbacks to read registers
-off the current frame and to write out the values of the registers in
-the previous frame.  Both have a callback (`target_read') to read bytes
-off the target's address space.
+   The callbacks are provided with another set of callbacks by GDB to do
+their job.  For 'read', these callbacks are passed in a 'struct
+gdb_symbol_callbacks' and for 'unwind' and 'get_frame_id', in a 'struct
+gdb_unwind_callbacks'.  'struct gdb_symbol_callbacks' has callbacks to
+create new object files and new symbol tables inside those object files.
+'struct gdb_unwind_callbacks' has callbacks to read registers off the
+current frame and to write out the values of the registers in the
+previous frame.  Both have a callback ('target_read') to read bytes off
+the target's address space.
 
 
 File: gdb.info,  Node: In-Process Agent,  Next: GDB Bugs,  Prev: JIT Interface,  Up: Top
@@ -6980,8 +7629,8 @@ execution, for example, thread races, be
 with the program's timing may conceal the bugs.  On the other hand, in
 some applications, it is not feasible for the debugger to interrupt the
 program's execution long enough for the developer to learn anything
-helpful about its behavior.  If the program's correctness depends on
-its real-time behavior, delays introduced by a debugger might cause the
+helpful about its behavior.  If the program's correctness depends on its
+real-time behavior, delays introduced by a debugger might cause the
 program to fail, even when the code itself is correct.  It is useful to
 be able to observe the program's behavior without interrupting it.
 
@@ -6989,8 +7638,8 @@ be able to observe the program's behavio
 some bugs.  In order to reduce the interference with the program, we can
 reduce the number of operations performed by debugger.  The "In-Process
 Agent", a shared library, is running within the same process with
-inferior, and is able to perform some debugging operations itself.  As
-a result, debugger is only involved when necessary, and performance of
+inferior, and is able to perform some debugging operations itself.  As a
+result, debugger is only involved when necessary, and performance of
 debugging can be improved accordingly.  Note that interference with
 program can be reduced but can't be removed completely, because the
 in-process agent will still stop or slow down the program.
@@ -7003,20 +7652,20 @@ data in tracepoints, and condition evalu
    You can control whether the in-process agent is used as an aid for
 debugging with the following commands:
 
-`set agent on'
-     Causes the in-process agent to perform some operations on behalf
-     of the debugger.  Just which operations requested by the user will
-     be done by the in-process agent depends on the its capabilities.
-     For example, if you request to evaluate breakpoint conditions in
-     the in-process agent, and the in-process agent has such capability
-     as well, then breakpoint conditions will be evaluated in the
+'set agent on'
+     Causes the in-process agent to perform some operations on behalf of
+     the debugger.  Just which operations requested by the user will be
+     done by the in-process agent depends on the its capabilities.  For
+     example, if you request to evaluate breakpoint conditions in the
+     in-process agent, and the in-process agent has such capability as
+     well, then breakpoint conditions will be evaluated in the
      in-process agent.
 
-`set agent off'
-     Disables execution of debugging operations by the in-process
-     agent.  All of the operations will be performed by GDB.
+'set agent off'
+     Disables execution of debugging operations by the in-process agent.
+     All of the operations will be performed by GDB.
 
-`show agent'
+'show agent'
      Display the current setting of execution of debugging operations by
      the in-process agent.
 
@@ -7032,13 +7681,13 @@ File: gdb.info,  Node: In-Process Agent 
 
 The in-process agent is able to communicate with both GDB and GDBserver
 (*note In-Process Agent::).  This section documents the protocol used
-for communications between GDB or GDBserver and the IPA.  In general,
-GDB or GDBserver sends commands (*note IPA Protocol Commands::) and
-data to in-process agent, and then in-process agent replies back with
-the return result of the command, or some other information.  The data
-sent to in-process agent is composed of primitive data types, such as
-4-byte or 8-byte type, and composite types, which are called objects
-(*note IPA Protocol Objects::).
+for communications between GDB or GDBserver and the IPA. In general, GDB
+or GDBserver sends commands (*note IPA Protocol Commands::) and data to
+in-process agent, and then in-process agent replies back with the return
+result of the command, or some other information.  The data sent to
+in-process agent is composed of primitive data types, such as 4-byte or
+8-byte type, and composite types, which are called objects (*note IPA
+Protocol Objects::).
 
 * Menu:
 
@@ -7060,22 +7709,19 @@ ends as remote protocol (*note Remote Pr
 However, there are still some differences of two ends in two processes:
 
   1. word size.  On some 64-bit machines, GDB or GDBserver can be
-     compiled as a 64-bit executable, while in-process agent is a
-     32-bit one.
-
-  2. ABI.  Some machines may have multiple types of ABI, GDB or
-     GDBserver is compiled with one, and in-process agent is compiled
-     with the other one.
+     compiled as a 64-bit executable, while in-process agent is a 32-bit
+     one.
+  2. ABI. Some machines may have multiple types of ABI, GDB or GDBserver
+     is compiled with one, and in-process agent is compiled with the
+     other one.
 
    Here are the IPA Protocol Objects:
 
   1. agent expression object.  It represents an agent expression (*note
      Agent Expressions::).
-
-  2. tracepoint action object.  It represents a tracepoint action
-     (*note Tracepoint Action Lists: Tracepoint Actions.) to collect
-     registers, memory, static trace data and to evaluate expression.
-
+  2. tracepoint action object.  It represents a tracepoint action (*note
+     Tracepoint Action Lists: Tracepoint Actions.) to collect registers,
+     memory, static trace data and to evaluate expression.
   3. tracepoint object.  It represents a tracepoint (*note
      Tracepoints::).
 
@@ -7083,16 +7729,16 @@ However, there are still some difference
 protocol object:
 
 Name                   Size           Description
---------------------------------------------------------------------------- 
-_agent expression                     
-object_                               
+---------------------------------------------------------------------------
+_agent expression
+object_
 length                 4              length of bytes code
 byte code              LENGTH         contents of byte code
-_tracepoint action                    
-for collecting                        
-memory_                               
+_tracepoint action
+for collecting
+memory_
 'M'                    1              type of tracepoint action
-addr                   8              if BASEREG is `-1', ADDR is the
+addr                   8              if BASEREG is '-1', ADDR is the
                                       address of the lowest byte to
                                       collect, otherwise ADDR is the
                                       offset of BASEREG for memory
@@ -7101,20 +7747,20 @@ len                    8              le
 basereg                4              the register number containing the
                                       starting memory address for
                                       collecting.
-_tracepoint action                    
-for collecting                        
-registers_                            
+_tracepoint action
+for collecting
+registers_
 'R'                    1              type of tracepoint action
-_tracepoint action                    
-for collecting static                 
-trace data_                           
+_tracepoint action
+for collecting
+static trace data_
 'L'                    1              type of tracepoint action
-_tracepoint action                    
-for expression                        
-evaluation_                           
+_tracepoint action
+for expression
+evaluation_
 'X'                    1              type of tracepoint action
 agent expression       length of      *note agent expression object::
-_tracepoint object_                   
+_tracepoint object_
 number                 4              number of tracepoint
 address                8              address of tracepoint inserted on
 type                   4              type of tracepoint
@@ -7127,15 +7773,13 @@ trace frame usage      8              tr
 compiled_cond          8              compiled condition
 orig_size              8              orig size
 condition              4 if           zero if condition is NULL,
-                       condition is   otherwise is *note agent expression
-                       NULL           object::
-                       otherwise      
-                       length of      
-                       *note agent    
-                       expression     
-                       object::       
-actions                variable       numactions number of *note
-                                      tracepoint action object::
+                       condition is   otherwise is
+                       NULL           *note agent expression object::
+                       otherwise
+                       length of
+                       *note agent expression object::
+actions                variable       numactions number of
+                                      *note tracepoint action object::
 
 
 File: gdb.info,  Node: IPA Protocol Commands,  Prev: IPA Protocol Objects,  Up: In-Process Agent Protocol
@@ -7146,45 +7790,39 @@ File: gdb.info,  Node: IPA Protocol Comm
 The spaces in each command are delimiters to ease reading this commands
 specification.  They don't exist in real commands.
 
-`FastTrace:TRACEPOINT_OBJECT GDB_JUMP_PAD_HEAD'
+'FastTrace:TRACEPOINT_OBJECT GDB_JUMP_PAD_HEAD'
      Installs a new fast tracepoint described by TRACEPOINT_OBJECT
      (*note tracepoint object::).  The GDB_JUMP_PAD_HEAD, 8-byte long,
      is the head of "jumppad", which is used to jump to data collection
      routine in IPA finally.
 
      Replies:
-    `OK TARGET_ADDRESS GDB_JUMP_PAD_HEAD FJUMP_SIZE FJUMP'
+     'OK TARGET_ADDRESS GDB_JUMP_PAD_HEAD FJUMP_SIZE FJUMP'
           TARGET_ADDRESS is address of tracepoint in the inferior.  The
           GDB_JUMP_PAD_HEAD is updated head of jumppad.  Both of
           TARGET_ADDRESS and GDB_JUMP_PAD_HEAD are 8-byte long.  The
           FJUMP contains a sequence of instructions jump to jumppad
           entry.  The FJUMP_SIZE, 4-byte long, is the size of FJUMP.
-
-    `E NN'
+     'E NN'
           for an error
 
-
-`close'
+'close'
      Closes the in-process agent.  This command is sent when GDB or
      GDBserver is about to kill inferiors.
 
-`qTfSTM'
+'qTfSTM'
      *Note qTfSTM::.
-
-`qTsSTM'
+'qTsSTM'
      *Note qTsSTM::.
-
-`qTSTMat'
+'qTSTMat'
      *Note qTSTMat::.
-
-`probe_marker_at:ADDRESS'
+'probe_marker_at:ADDRESS'
      Asks in-process agent to probe the marker at ADDRESS.
 
      Replies:
-    `E NN'
+     'E NN'
           for an error
-
-`unprobe_marker_at:ADDRESS'
+'unprobe_marker_at:ADDRESS'
      Asks in-process agent to unprobe the marker at ADDRESS.
 
 
@@ -7224,10 +7862,10 @@ guidelines:
      (Note that if you're cross debugging, the problem may also be
      somewhere in the connection to the target.)
 
-   * If GDB does not produce an error message for invalid input, that
-     is a bug.  However, you should note that your idea of "invalid
-     input" might be our idea of "an extension" or "support for
-     traditional practice".
+   * If GDB does not produce an error message for invalid input, that is
+     a bug.  However, you should note that your idea of "invalid input"
+     might be our idea of "an extension" or "support for traditional
+     practice".
 
    * If you are an experienced user of debugging tools, your suggestions
      for improvement of GDB are welcome in any case.
@@ -7243,29 +7881,29 @@ If you obtained GDB from a support organ
 contact that organization first.
 
    You can find contact information for many support companies and
-individuals in the file `etc/SERVICE' in the GNU Emacs distribution.
+individuals in the file 'etc/SERVICE' in the GNU Emacs distribution.
 
    In any event, we also recommend that you submit bug reports for GDB.
 The preferred method is to submit them directly using GDB's Bugs web
-page (http://www.gnu.org/software/gdb/bugs/).  Alternatively, the
-e-mail gateway <bug-gdb@gnu.org> can be used.
+page (http://www.gnu.org/software/gdb/bugs/).  Alternatively, the e-mail
+gateway <bug-gdb@gnu.org> can be used.
 
-   *Do not send bug reports to `info-gdb', or to `help-gdb', or to any
+   *Do not send bug reports to 'info-gdb', or to 'help-gdb', or to any
 newsgroups.*  Most users of GDB do not want to receive bug reports.
-Those that do have arranged to receive `bug-gdb'.
+Those that do have arranged to receive 'bug-gdb'.
 
-   The mailing list `bug-gdb' has a newsgroup `gnu.gdb.bug' which
-serves as a repeater.  The mailing list and the newsgroup carry exactly
-the same messages.  Often people think of posting bug reports to the
+   The mailing list 'bug-gdb' has a newsgroup 'gnu.gdb.bug' which serves
+as a repeater.  The mailing list and the newsgroup carry exactly the
+same messages.  Often people think of posting bug reports to the
 newsgroup instead of mailing them.  This appears to work, but it has one
 problem which can be crucial: a newsgroup posting often lacks a mail
 path back to the sender.  Thus, if we need to ask for more information,
 we may be unable to reach you.  For this reason, it is better to send
 bug reports to the mailing list.
 
-   The fundamental principle of reporting bugs usefully is this:
-*report all the facts*.  If you are not sure whether to state a fact or
-leave it out, state it!
+   The fundamental principle of reporting bugs usefully is this: *report
+all the facts*.  If you are not sure whether to state a fact or leave it
+out, state it!
 
    Often people omit facts because they think they know what causes the
 problem and assume that some details do not matter.  Thus, you might
@@ -7290,7 +7928,7 @@ to respond to them_ except to chide the 
    To enable us to fix the bug, you should include all these things:
 
    * The version of GDB.  GDB announces it if you start with no
-     arguments; you can also print it at any time using `show version'.
+     arguments; you can also print it at any time using 'show version'.
 
      Without this, we will not know whether there is any point in
      looking for the bug in the current version of GDB.
@@ -7299,22 +7937,22 @@ to respond to them_ except to chide the 
      and version number.
 
    * The details of the GDB build-time configuration.  GDB shows these
-     details if you invoke it with the `--configuration' command-line
-     option, or if you type `show configuration' at GDB's prompt.
+     details if you invoke it with the '--configuration' command-line
+     option, or if you type 'show configuration' at GDB's prompt.
 
    * What compiler (and its version) was used to compile GDB--e.g.
      "gcc-2.8.1".
 
-   * What compiler (and its version) was used to compile the program
-     you are debugging--e.g.  "gcc-2.8.1", or "HP92453-01 A.10.32.03 HP
-     C Compiler".  For GCC, you can say `gcc --version' to get this
+   * What compiler (and its version) was used to compile the program you
+     are debugging--e.g. "gcc-2.8.1", or "HP92453-01 A.10.32.03 HP C
+     Compiler".  For GCC, you can say 'gcc --version' to get this
      information; for other compilers, see the documentation for those
      compilers.
 
-   * The command arguments you gave the compiler to compile your
-     example and observe the bug.  For example, did you use `-O'?  To
-     guarantee you will not omit something important, list them all.  A
-     copy of the Makefile (or the output from make) is sufficient.
+   * The command arguments you gave the compiler to compile your example
+     and observe the bug.  For example, did you use '-O'?  To guarantee
+     you will not omit something important, list them all.  A copy of
+     the Makefile (or the output from make) is sufficient.
 
      If we were to try to guess the arguments, we would probably guess
      wrong and then we might not encounter the bug.
@@ -7325,10 +7963,10 @@ to respond to them_ except to chide the 
    * A description of what behavior you observe that you believe is
      incorrect.  For example, "It gets a fatal signal."
 
-     Of course, if the bug is that GDB gets a fatal signal, then we
-     will certainly notice it.  But if the bug is incorrect output, we
-     might not notice unless it is glaringly wrong.  You might as well
-     not give us a chance to make a mistake.
+     Of course, if the bug is that GDB gets a fatal signal, then we will
+     certainly notice it.  But if the bug is incorrect output, we might
+     not notice unless it is glaringly wrong.  You might as well not
+     give us a chance to make a mistake.
 
      Even if the problem you experience is a fatal signal, you should
      still say so explicitly.  Suppose something strange is going on,
@@ -7341,9 +7979,9 @@ to respond to them_ except to chide the 
      observations.
 
      To collect all this information, you can use a session recording
-     program such as `script', which is available on many Unix systems.
-     Just run your GDB session inside `script' and then include the
-     `typescript' file with your bug report.
+     program such as 'script', which is available on many Unix systems.
+     Just run your GDB session inside 'script' and then include the
+     'typescript' file with your bug report.
 
      Another way to record a GDB session is to run GDB inside Emacs and
      then save the entire buffer to a file.
@@ -7352,10 +7990,9 @@ to respond to them_ except to chide the 
      diffs.  If you even discuss something in the GDB source, refer to
      it by context, not by line number.
 
-     The line numbers in our development sources will not match those
-     in your sources.  Your line numbers would convey no useful
-     information to us.
-
+     The line numbers in our development sources will not match those in
+     your sources.  Your line numbers would convey no useful information
+     to us.
 
    Here are some things that are not necessary:
 
@@ -7370,8 +8007,8 @@ to respond to them_ except to chide the 
      debugger with breakpoints, not by pure deduction from a series of
      examples.  We recommend that you save your time for something else.
 
-     Of course, if you can find a simpler example to report _instead_
-     of the original one, that is a convenience for us.  Errors in the
+     Of course, if you can find a simpler example to report _instead_ of
+     the original one, that is a convenience for us.  Errors in the
      output will be easier to spot, running under the debugger will take
      less time, and so on.
 
@@ -7383,15 +8020,15 @@ to respond to them_ except to chide the 
 
      A patch for the bug does help us if it is a good one.  But do not
      omit the necessary information, such as the test case, on the
-     assumption that a patch is all we need.  We might see problems
-     with your patch and decide to fix the problem another way, or we
-     might not understand it at all.
+     assumption that a patch is all we need.  We might see problems with
+     your patch and decide to fix the problem another way, or we might
+     not understand it at all.
 
      Sometimes with a program as complicated as GDB it is very hard to
      construct an example that will make the program follow a certain
      path through the code.  If you do not send us the example, we will
-     not be able to construct one, so we will not be able to verify
-     that the bug is fixed.
+     not be able to construct one, so we will not be able to verify that
+     the bug is fixed.
 
      And if we cannot understand what bug you are trying to fix, or why
      your patch should be an improvement, we will not install it.  A
@@ -7430,10 +8067,10 @@ File: gdb.info,  Node: Introduction and 
 The following paragraphs describe the notation used to represent
 keystrokes.
 
-   The text `C-k' is read as `Control-K' and describes the character
+   The text 'C-k' is read as 'Control-K' and describes the character
 produced when the <k> key is pressed while the Control key is depressed.
 
-   The text `M-k' is read as `Meta-K' and describes the character
+   The text 'M-k' is read as 'Meta-K' and describes the character
 produced when the Meta key (if you have one) is depressed, and the <k>
 key is pressed.  The Meta key is labeled <ALT> on many keyboards.  On
 keyboards with two keys labeled <ALT> (usually to either side of the
@@ -7447,15 +8084,15 @@ Meta key, the identical keystroke can be
 _first_, and then typing <k>.  Either process is known as "metafying"
 the <k> key.
 
-   The text `M-C-k' is read as `Meta-Control-k' and describes the
-character produced by "metafying" `C-k'.
+   The text 'M-C-k' is read as 'Meta-Control-k' and describes the
+character produced by "metafying" 'C-k'.
 
-   In addition, several keys have their own names.  Specifically,
-<DEL>, <ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves
-when seen in this text, or in an init file (*note Readline Init File::).
-If your keyboard lacks a <LFD> key, typing <C-j> will produce the
-desired character.  The <RET> key may be labeled <Return> or <Enter> on
-some keyboards.
+   In addition, several keys have their own names.  Specifically, <DEL>,
+<ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves when seen
+in this text, or in an init file (*note Readline Init File::).  If your
+keyboard lacks a <LFD> key, typing <C-j> will produce the desired
+character.  The <RET> key may be labeled <Return> or <Enter> on some
+keyboards.
 
 
 File: gdb.info,  Node: Readline Interaction,  Next: Readline Init File,  Prev: Introduction and Notation,  Up: Command Line Editing
@@ -7493,41 +8130,35 @@ character appears where the cursor was, 
 space to the right.  If you mistype a character, you can use your erase
 character to back up and delete the mistyped character.
 
-   Sometimes you may mistype a character, and not notice the error
-until you have typed several other characters.  In that case, you can
-type `C-b' to move the cursor to the left, and then correct your
-mistake.  Afterwards, you can move the cursor to the right with `C-f'.
+   Sometimes you may mistype a character, and not notice the error until
+you have typed several other characters.  In that case, you can type
+'C-b' to move the cursor to the left, and then correct your mistake.
+Afterwards, you can move the cursor to the right with 'C-f'.
 
    When you add text in the middle of a line, you will notice that
-characters to the right of the cursor are `pushed over' to make room
-for the text that you have inserted.  Likewise, when you delete text
-behind the cursor, characters to the right of the cursor are `pulled
-back' to fill in the blank space created by the removal of the text.  A
-list of the bare essentials for editing the text of an input line
-follows.
+characters to the right of the cursor are 'pushed over' to make room for
+the text that you have inserted.  Likewise, when you delete text behind
+the cursor, characters to the right of the cursor are 'pulled back' to
+fill in the blank space created by the removal of the text.  A list of
+the bare essentials for editing the text of an input line follows.
 
-`C-b'
+'C-b'
      Move back one character.
-
-`C-f'
+'C-f'
      Move forward one character.
-
 <DEL> or <Backspace>
      Delete the character to the left of the cursor.
-
-`C-d'
+'C-d'
      Delete the character underneath the cursor.
-
 Printing characters
      Insert the character into the line at the cursor.
-
-`C-_' or `C-x C-u'
+'C-_' or 'C-x C-u'
      Undo the last editing command.  You can undo all the way back to an
      empty line.
 
 (Depending on your configuration, the <Backspace> key be set to delete
 the character to the left of the cursor and the <DEL> key set to delete
-the character underneath the cursor, like `C-d', rather than the
+the character underneath the cursor, like 'C-d', rather than the
 character to the left of the cursor.)
 
 
@@ -7537,29 +8168,25 @@ File: gdb.info,  Node: Readline Movement
 ---------------------------------
 
 The above table describes the most basic keystrokes that you need in
-order to do editing of the input line.  For your convenience, many
-other commands have been added in addition to `C-b', `C-f', `C-d', and
-<DEL>.  Here are some commands for moving more rapidly about the line.
+order to do editing of the input line.  For your convenience, many other
+commands have been added in addition to 'C-b', 'C-f', 'C-d', and <DEL>.
+Here are some commands for moving more rapidly about the line.
 
-`C-a'
+'C-a'
      Move to the start of the line.
-
-`C-e'
+'C-e'
      Move to the end of the line.
-
-`M-f'
+'M-f'
      Move forward a word, where a word is composed of letters and
      digits.
-
-`M-b'
+'M-b'
      Move backward a word.
-
-`C-l'
+'C-l'
      Clear the screen, reprinting the current line at the top.
 
-   Notice how `C-f' moves forward a character, while `M-f' moves
-forward a word.  It is a loose convention that control keystrokes
-operate on characters while meta keystrokes operate on words.
+   Notice how 'C-f' moves forward a character, while 'M-f' moves forward
+a word.  It is a loose convention that control keystrokes operate on
+characters while meta keystrokes operate on words.
 
 
 File: gdb.info,  Node: Readline Killing Commands,  Next: Readline Arguments,  Prev: Readline Movement Commands,  Up: Readline Interaction
@@ -7568,51 +8195,49 @@ File: gdb.info,  Node: Readline Killing 
 --------------------------------
 
 "Killing" text means to delete the text from the line, but to save it
-away for later use, usually by "yanking" (re-inserting) it back into
-the line.  (`Cut' and `paste' are more recent jargon for `kill' and
-`yank'.)
+away for later use, usually by "yanking" (re-inserting) it back into the
+line.  ('Cut' and 'paste' are more recent jargon for 'kill' and 'yank'.)
 
-   If the description for a command says that it `kills' text, then you
+   If the description for a command says that it 'kills' text, then you
 can be sure that you can get the text back in a different (or the same)
 place later.
 
-   When you use a kill command, the text is saved in a "kill-ring".
-Any number of consecutive kills save all of the killed text together, so
+   When you use a kill command, the text is saved in a "kill-ring".  Any
+number of consecutive kills save all of the killed text together, so
 that when you yank it back, you get it all.  The kill ring is not line
 specific; the text that you killed on a previously typed line is
-available to be yanked back later, when you are typing another line.  
+available to be yanked back later, when you are typing another line.
 
    Here is the list of commands for killing text.
 
-`C-k'
+'C-k'
      Kill the text from the current cursor position to the end of the
      line.
 
-`M-d'
+'M-d'
      Kill from the cursor to the end of the current word, or, if between
      words, to the end of the next word.  Word boundaries are the same
-     as those used by `M-f'.
+     as those used by 'M-f'.
 
-`M-<DEL>'
+'M-<DEL>'
      Kill from the cursor the start of the current word, or, if between
      words, to the start of the previous word.  Word boundaries are the
-     same as those used by `M-b'.
-
-`C-w'
-     Kill from the cursor to the previous whitespace.  This is
-     different than `M-<DEL>' because the word boundaries differ.
+     same as those used by 'M-b'.
 
+'C-w'
+     Kill from the cursor to the previous whitespace.  This is different
+     than 'M-<DEL>' because the word boundaries differ.
 
    Here is how to "yank" the text back into the line.  Yanking means to
 copy the most-recently-killed text from the kill buffer.
 
-`C-y'
+'C-y'
      Yank the most recently killed text back into the buffer at the
      cursor.
 
-`M-y'
+'M-y'
      Rotate the kill-ring, and yank the new top.  You can only do this
-     if the prior command is `C-y' or `M-y'.
+     if the prior command is 'C-y' or 'M-y'.
 
 
 File: gdb.info,  Node: Readline Arguments,  Next: Searching,  Prev: Readline Killing Commands,  Up: Readline Interaction
@@ -7625,15 +8250,15 @@ argument acts as a repeat count, other t
 argument that is significant.  If you pass a negative argument to a
 command which normally acts in a forward direction, that command will
 act in a backward direction.  For example, to kill text back to the
-start of the line, you might type `M-- C-k'.
+start of the line, you might type 'M-- C-k'.
 
    The general way to pass numeric arguments to a command is to type
-meta digits before the command.  If the first `digit' typed is a minus
-sign (`-'), then the sign of the argument will be negative.  Once you
+meta digits before the command.  If the first 'digit' typed is a minus
+sign ('-'), then the sign of the argument will be negative.  Once you
 have typed one meta digit to get the argument started, you can type the
-remainder of the digits, and then the command.  For example, to give
-the `C-d' command an argument of 10, you could type `M-1 0 C-d', which
-will delete the next ten characters on the input line.
+remainder of the digits, and then the command.  For example, to give the
+'C-d' command an argument of 10, you could type 'M-1 0 C-d', which will
+delete the next ten characters on the input line.
 
 
 File: gdb.info,  Node: Searching,  Prev: Readline Arguments,  Up: Readline Interaction
@@ -7641,36 +8266,36 @@ File: gdb.info,  Node: Searching,  Prev:
 32.2.5 Searching for Commands in the History
 --------------------------------------------
 
-Readline provides commands for searching through the command history
-for lines containing a specified string.  There are two search modes:
+Readline provides commands for searching through the command history for
+lines containing a specified string.  There are two search modes:
 "incremental" and "non-incremental".
 
    Incremental searches begin before the user has finished typing the
 search string.  As each character of the search string is typed,
 Readline displays the next entry from the history matching the string
-typed so far.  An incremental search requires only as many characters
-as needed to find the desired history entry.  To search backward in the
-history for a particular string, type `C-r'.  Typing `C-s' searches
-forward through the history.  The characters present in the value of
-the `isearch-terminators' variable are used to terminate an incremental
+typed so far.  An incremental search requires only as many characters as
+needed to find the desired history entry.  To search backward in the
+history for a particular string, type 'C-r'.  Typing 'C-s' searches
+forward through the history.  The characters present in the value of the
+'isearch-terminators' variable are used to terminate an incremental
 search.  If that variable has not been assigned a value, the <ESC> and
-`C-J' characters will terminate an incremental search.  `C-g' will
-abort an incremental search and restore the original line.  When the
-search is terminated, the history entry containing the search string
-becomes the current line.
-
-   To find other matching entries in the history list, type `C-r' or
-`C-s' as appropriate.  This will search backward or forward in the
-history for the next entry matching the search string typed so far.
-Any other key sequence bound to a Readline command will terminate the
-search and execute that command.  For instance, a <RET> will terminate
-the search and accept the line, thereby executing the command from the
+'C-J' characters will terminate an incremental search.  'C-g' will abort
+an incremental search and restore the original line.  When the search is
+terminated, the history entry containing the search string becomes the
+current line.
+
+   To find other matching entries in the history list, type 'C-r' or
+'C-s' as appropriate.  This will search backward or forward in the
+history for the next entry matching the search string typed so far.  Any
+other key sequence bound to a Readline command will terminate the search
+and execute that command.  For instance, a <RET> will terminate the
+search and accept the line, thereby executing the command from the
 history list.  A movement command will terminate the search, make the
 last line found the current line, and begin editing.
 
-   Readline remembers the last incremental search string.  If two
-`C-r's are typed without any intervening characters defining a new
-search string, any remembered search string is used.
+   Readline remembers the last incremental search string.  If two 'C-r's
+are typed without any intervening characters defining a new search
+string, any remembered search string is used.
 
    Non-incremental searches read the entire search string before
 starting to search for matching history lines.  The search string may be
@@ -7682,19 +8307,19 @@ File: gdb.info,  Node: Readline Init Fil
 32.3 Readline Init File
 =======================
 
-Although the Readline library comes with a set of Emacs-like
-keybindings installed by default, it is possible to use a different set
-of keybindings.  Any user can customize programs that use Readline by
+Although the Readline library comes with a set of Emacs-like keybindings
+installed by default, it is possible to use a different set of
+keybindings.  Any user can customize programs that use Readline by
 putting commands in an "inputrc" file, conventionally in his home
 directory.  The name of this file is taken from the value of the
-environment variable `INPUTRC'.  If that variable is unset, the default
-is `~/.inputrc'.  If that file does not exist or cannot be read, the
-ultimate default is `/etc/inputrc'.
+environment variable 'INPUTRC'.  If that variable is unset, the default
+is '~/.inputrc'.  If that file does not exist or cannot be read, the
+ultimate default is '/etc/inputrc'.
 
    When a program which uses the Readline library starts up, the init
 file is read, and the key bindings are set.
 
-   In addition, the `C-x C-r' command re-reads this init file, thus
+   In addition, the 'C-x C-r' command re-reads this init file, thus
 incorporating any changes that you might have made to it.
 
 * Menu:
@@ -7711,21 +8336,21 @@ File: gdb.info,  Node: Readline Init Fil
 32.3.1 Readline Init File Syntax
 --------------------------------
 
-There are only a few basic constructs allowed in the Readline init
-file.  Blank lines are ignored.  Lines beginning with a `#' are
-comments.  Lines beginning with a `$' indicate conditional constructs
-(*note Conditional Init Constructs::).  Other lines denote variable
-settings and key bindings.
+There are only a few basic constructs allowed in the Readline init file.
+Blank lines are ignored.  Lines beginning with a '#' are comments.
+Lines beginning with a '$' indicate conditional constructs (*note
+Conditional Init Constructs::).  Other lines denote variable settings
+and key bindings.
 
 Variable Settings
      You can modify the run-time behavior of Readline by altering the
-     values of variables in Readline using the `set' command within the
+     values of variables in Readline using the 'set' command within the
      init file.  The syntax is simple:
 
           set VARIABLE VALUE
 
-     Here, for example, is how to change from the default Emacs-like
-     key binding to use `vi' line editing commands:
+     Here, for example, is how to change from the default Emacs-like key
+     binding to use 'vi' line editing commands:
 
           set editing-mode vi
 
@@ -7733,229 +8358,228 @@ Variable Settings
      without regard to case.  Unrecognized variable names are ignored.
 
      Boolean variables (those that can be set to on or off) are set to
-     on if the value is null or empty, ON (case-insensitive), or 1.
-     Any other value results in the variable being set to off.
+     on if the value is null or empty, ON (case-insensitive), or 1.  Any
+     other value results in the variable being set to off.
 
      A great deal of run-time behavior is changeable with the following
      variables.
 
-    `bell-style'
-          Controls what happens when Readline wants to ring the
-          terminal bell.  If set to `none', Readline never rings the
-          bell.  If set to `visible', Readline uses a visible bell if
-          one is available.  If set to `audible' (the default),
-          Readline attempts to ring the terminal's bell.
+     'bell-style'
+          Controls what happens when Readline wants to ring the terminal
+          bell.  If set to 'none', Readline never rings the bell.  If
+          set to 'visible', Readline uses a visible bell if one is
+          available.  If set to 'audible' (the default), Readline
+          attempts to ring the terminal's bell.
 
-    `bind-tty-special-chars'
-          If set to `on', Readline attempts to bind the control
+     'bind-tty-special-chars'
+          If set to 'on', Readline attempts to bind the control
           characters treated specially by the kernel's terminal driver
           to their Readline equivalents.
 
-    `comment-begin'
+     'comment-begin'
           The string to insert at the beginning of the line when the
-          `insert-comment' command is executed.  The default value is
-          `"#"'.
+          'insert-comment' command is executed.  The default value is
+          '"#"'.
 
-    `completion-display-width'
+     'completion-display-width'
           The number of screen columns used to display possible matches
           when performing completion.  The value is ignored if it is
           less than 0 or greater than the terminal screen width.  A
           value of 0 will cause matches to be displayed one per line.
           The default value is -1.
 
-    `completion-ignore-case'
-          If set to `on', Readline performs filename matching and
+     'completion-ignore-case'
+          If set to 'on', Readline performs filename matching and
           completion in a case-insensitive fashion.  The default value
-          is `off'.
+          is 'off'.
 
-    `completion-map-case'
-          If set to `on', and COMPLETION-IGNORE-CASE is enabled,
-          Readline treats hyphens (`-') and underscores (`_') as
+     'completion-map-case'
+          If set to 'on', and COMPLETION-IGNORE-CASE is enabled,
+          Readline treats hyphens ('-') and underscores ('_') as
           equivalent when performing case-insensitive filename matching
           and completion.
 
-    `completion-prefix-display-length'
+     'completion-prefix-display-length'
           The length in characters of the common prefix of a list of
           possible completions that is displayed without modification.
           When set to a value greater than zero, common prefixes longer
           than this value are replaced with an ellipsis when displaying
           possible completions.
 
-    `completion-query-items'
+     'completion-query-items'
           The number of possible completions that determines when the
           user is asked whether the list of possibilities should be
           displayed.  If the number of possible completions is greater
           than this value, Readline will ask the user whether or not he
           wishes to view them; otherwise, they are simply listed.  This
-          variable must be set to an integer value greater than or
-          equal to 0.  A negative value means Readline should never ask.
-          The default limit is `100'.
+          variable must be set to an integer value greater than or equal
+          to 0.  A negative value means Readline should never ask.  The
+          default limit is '100'.
 
-    `convert-meta'
-          If set to `on', Readline will convert characters with the
+     'convert-meta'
+          If set to 'on', Readline will convert characters with the
           eighth bit set to an ASCII key sequence by stripping the
           eighth bit and prefixing an <ESC> character, converting them
-          to a meta-prefixed key sequence.  The default value is `on'.
+          to a meta-prefixed key sequence.  The default value is 'on'.
 
-    `disable-completion'
-          If set to `On', Readline will inhibit word completion.
-          Completion  characters will be inserted into the line as if
-          they had been mapped to `self-insert'.  The default is `off'.
+     'disable-completion'
+          If set to 'On', Readline will inhibit word completion.
+          Completion characters will be inserted into the line as if
+          they had been mapped to 'self-insert'.  The default is 'off'.
 
-    `editing-mode'
-          The `editing-mode' variable controls which default set of key
+     'editing-mode'
+          The 'editing-mode' variable controls which default set of key
           bindings is used.  By default, Readline starts up in Emacs
           editing mode, where the keystrokes are most similar to Emacs.
-          This variable can be set to either `emacs' or `vi'.
+          This variable can be set to either 'emacs' or 'vi'.
 
-    `echo-control-characters'
-          When set to `on', on operating systems that indicate they
+     'echo-control-characters'
+          When set to 'on', on operating systems that indicate they
           support it, readline echoes a character corresponding to a
-          signal generated from the keyboard.  The default is `on'.
+          signal generated from the keyboard.  The default is 'on'.
 
-    `enable-keypad'
-          When set to `on', Readline will try to enable the application
+     'enable-keypad'
+          When set to 'on', Readline will try to enable the application
           keypad when it is called.  Some systems need this to enable
-          the arrow keys.  The default is `off'.
+          the arrow keys.  The default is 'off'.
 
-    `enable-meta-key'
-          When set to `on', Readline will try to enable any meta
-          modifier key the terminal claims to support when it is
-          called.  On many terminals, the meta key is used to send
-          eight-bit characters.  The default is `on'.
-
-    `expand-tilde'
-          If set to `on', tilde expansion is performed when Readline
-          attempts word completion.  The default is `off'.
+     'enable-meta-key'
+          When set to 'on', Readline will try to enable any meta
+          modifier key the terminal claims to support when it is called.
+          On many terminals, the meta key is used to send eight-bit
+          characters.  The default is 'on'.
+
+     'expand-tilde'
+          If set to 'on', tilde expansion is performed when Readline
+          attempts word completion.  The default is 'off'.
 
-    `history-preserve-point'
-          If set to `on', the history code attempts to place the point
+     'history-preserve-point'
+          If set to 'on', the history code attempts to place the point
           (the current cursor position) at the same location on each
-          history line retrieved with `previous-history' or
-          `next-history'.  The default is `off'.
+          history line retrieved with 'previous-history' or
+          'next-history'.  The default is 'off'.
 
-    `history-size'
-          Set the maximum number of history entries saved in the
-          history list.  If set to zero, the number of entries in the
-          history list is not limited.
-
-    `horizontal-scroll-mode'
-          This variable can be set to either `on' or `off'.  Setting it
-          to `on' means that the text of the lines being edited will
+     'history-size'
+          Set the maximum number of history entries saved in the history
+          list.  If set to zero, the number of entries in the history
+          list is not limited.
+
+     'horizontal-scroll-mode'
+          This variable can be set to either 'on' or 'off'.  Setting it
+          to 'on' means that the text of the lines being edited will
           scroll horizontally on a single screen line when they are
           longer than the width of the screen, instead of wrapping onto
-          a new screen line.  By default, this variable is set to `off'.
+          a new screen line.  By default, this variable is set to 'off'.
 
-    `input-meta'
-          If set to `on', Readline will enable eight-bit input (it will
+     'input-meta'
+          If set to 'on', Readline will enable eight-bit input (it will
           not clear the eighth bit in the characters it reads),
           regardless of what the terminal claims it can support.  The
-          default value is `off'.  The name `meta-flag' is a synonym
-          for this variable.
+          default value is 'off'.  The name 'meta-flag' is a synonym for
+          this variable.
 
-    `isearch-terminators'
+     'isearch-terminators'
           The string of characters that should terminate an incremental
           search without subsequently executing the character as a
           command (*note Searching::).  If this variable has not been
-          given a value, the characters <ESC> and `C-J' will terminate
+          given a value, the characters <ESC> and 'C-J' will terminate
           an incremental search.
 
-    `keymap'
+     'keymap'
           Sets Readline's idea of the current keymap for key binding
-          commands.  Acceptable `keymap' names are `emacs',
-          `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
-          `vi-command', and `vi-insert'.  `vi' is equivalent to
-          `vi-command'; `emacs' is equivalent to `emacs-standard'.  The
-          default value is `emacs'.  The value of the `editing-mode'
+          commands.  Acceptable 'keymap' names are 'emacs',
+          'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move',
+          'vi-command', and 'vi-insert'.  'vi' is equivalent to
+          'vi-command'; 'emacs' is equivalent to 'emacs-standard'.  The
+          default value is 'emacs'.  The value of the 'editing-mode'
           variable also affects the default keymap.
 
-    `mark-directories'
-          If set to `on', completed directory names have a slash
-          appended.  The default is `on'.
-
-    `mark-modified-lines'
-          This variable, when set to `on', causes Readline to display an
-          asterisk (`*') at the start of history lines which have been
-          modified.  This variable is `off' by default.
+     'mark-directories'
+          If set to 'on', completed directory names have a slash
+          appended.  The default is 'on'.
+
+     'mark-modified-lines'
+          This variable, when set to 'on', causes Readline to display an
+          asterisk ('*') at the start of history lines which have been
+          modified.  This variable is 'off' by default.
 
-    `mark-symlinked-directories'
-          If set to `on', completed names which are symbolic links to
+     'mark-symlinked-directories'
+          If set to 'on', completed names which are symbolic links to
           directories have a slash appended (subject to the value of
-          `mark-directories').  The default is `off'.
+          'mark-directories').  The default is 'off'.
 
-    `match-hidden-files'
-          This variable, when set to `on', causes Readline to match
-          files whose names begin with a `.' (hidden files) when
-          performing filename completion.  If set to `off', the leading
-          `.' must be supplied by the user in the filename to be
-          completed.  This variable is `on' by default.
+     'match-hidden-files'
+          This variable, when set to 'on', causes Readline to match
+          files whose names begin with a '.' (hidden files) when
+          performing filename completion.  If set to 'off', the leading
+          '.' must be supplied by the user in the filename to be
+          completed.  This variable is 'on' by default.
 
-    `menu-complete-display-prefix'
-          If set to `on', menu completion displays the common prefix of
+     'menu-complete-display-prefix'
+          If set to 'on', menu completion displays the common prefix of
           the list of possible completions (which may be empty) before
-          cycling through the list.  The default is `off'.
+          cycling through the list.  The default is 'off'.
 
-    `output-meta'
-          If set to `on', Readline will display characters with the
+     'output-meta'
+          If set to 'on', Readline will display characters with the
           eighth bit set directly rather than as a meta-prefixed escape
-          sequence.  The default is `off'.
+          sequence.  The default is 'off'.
 
-    `page-completions'
-          If set to `on', Readline uses an internal `more'-like pager
-          to display a screenful of possible completions at a time.
-          This variable is `on' by default.
+     'page-completions'
+          If set to 'on', Readline uses an internal 'more'-like pager to
+          display a screenful of possible completions at a time.  This
+          variable is 'on' by default.
 
-    `print-completions-horizontally'
-          If set to `on', Readline will display completions with matches
+     'print-completions-horizontally'
+          If set to 'on', Readline will display completions with matches
           sorted horizontally in alphabetical order, rather than down
-          the screen.  The default is `off'.
+          the screen.  The default is 'off'.
 
-    `revert-all-at-newline'
-          If set to `on', Readline will undo all changes to history
-          lines before returning when `accept-line' is executed.  By
+     'revert-all-at-newline'
+          If set to 'on', Readline will undo all changes to history
+          lines before returning when 'accept-line' is executed.  By
           default, history lines may be modified and retain individual
-          undo lists across calls to `readline'.  The default is `off'.
+          undo lists across calls to 'readline'.  The default is 'off'.
 
-    `show-all-if-ambiguous'
+     'show-all-if-ambiguous'
           This alters the default behavior of the completion functions.
-          If set to `on', words which have more than one possible
+          If set to 'on', words which have more than one possible
           completion cause the matches to be listed immediately instead
-          of ringing the bell.  The default value is `off'.
+          of ringing the bell.  The default value is 'off'.
 
-    `show-all-if-unmodified'
+     'show-all-if-unmodified'
           This alters the default behavior of the completion functions
           in a fashion similar to SHOW-ALL-IF-AMBIGUOUS.  If set to
-          `on', words which have more than one possible completion
+          'on', words which have more than one possible completion
           without any possible partial completion (the possible
           completions don't share a common prefix) cause the matches to
           be listed immediately instead of ringing the bell.  The
-          default value is `off'.
-
-    `skip-completed-text'
-          If set to `on', this alters the default completion behavior
-          when inserting a single match into the line.  It's only
-          active when performing completion in the middle of a word.
-          If enabled, readline does not insert characters from the
-          completion that match characters after point in the word
-          being completed, so portions of the word following the cursor
-          are not duplicated.  For instance, if this is enabled,
-          attempting completion when the cursor is after the `e' in
-          `Makefile' will result in `Makefile' rather than
-          `Makefilefile', assuming there is a single possible
-          completion.  The default value is `off'.
-
-    `visible-stats'
-          If set to `on', a character denoting a file's type is
-          appended to the filename when listing possible completions.
-          The default is `off'.
+          default value is 'off'.
 
+     'skip-completed-text'
+          If set to 'on', this alters the default completion behavior
+          when inserting a single match into the line.  It's only active
+          when performing completion in the middle of a word.  If
+          enabled, readline does not insert characters from the
+          completion that match characters after point in the word being
+          completed, so portions of the word following the cursor are
+          not duplicated.  For instance, if this is enabled, attempting
+          completion when the cursor is after the 'e' in 'Makefile' will
+          result in 'Makefile' rather than 'Makefilefile', assuming
+          there is a single possible completion.  The default value is
+          'off'.
+
+     'visible-stats'
+          If set to 'on', a character denoting a file's type is appended
+          to the filename when listing possible completions.  The
+          default is 'off'.
 
 Key Bindings
-     The syntax for controlling key bindings in the init file is
-     simple.  First you need to find the name of the command that you
-     want to change.  The following sections contain tables of the
-     command name, the default keybinding, if any, and a short
-     description of what the command does.
+     The syntax for controlling key bindings in the init file is simple.
+     First you need to find the name of the command that you want to
+     change.  The following sections contain tables of the command name,
+     the default keybinding, if any, and a short description of what the
+     command does.
 
      Once you know the name of the command, simply place on a line in
      the init file the name of the key you wish to bind the command to,
@@ -7964,27 +8588,27 @@ Key Bindings
      part of the key name.  The name of the key can be expressed in
      different ways, depending on what you find most comfortable.
 
-     In addition to command names, readline allows keys to be bound to
-     a string that is inserted when the key is pressed (a MACRO).
+     In addition to command names, readline allows keys to be bound to a
+     string that is inserted when the key is pressed (a MACRO).
 
-    KEYNAME: FUNCTION-NAME or MACRO
+     KEYNAME: FUNCTION-NAME or MACRO
           KEYNAME is the name of a key spelled out in English.  For
           example:
                Control-u: universal-argument
                Meta-Rubout: backward-kill-word
                Control-o: "> output"
 
-          In the above example, `C-u' is bound to the function
-          `universal-argument', `M-DEL' is bound to the function
-          `backward-kill-word', and `C-o' is bound to run the macro
+          In the above example, 'C-u' is bound to the function
+          'universal-argument', 'M-DEL' is bound to the function
+          'backward-kill-word', and 'C-o' is bound to run the macro
           expressed on the right hand side (that is, to insert the text
-          `> output' into the line).
+          '> output' into the line).
 
           A number of symbolic character names are recognized while
           processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
           NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.
 
-    "KEYSEQ": FUNCTION-NAME or MACRO
+     "KEYSEQ": FUNCTION-NAME or MACRO
           KEYSEQ differs from KEYNAME above in that strings denoting an
           entire key sequence can be specified, by placing the key
           sequence in double quotes.  Some GNU Emacs style key escapes
@@ -7995,66 +8619,51 @@ Key Bindings
                "\C-x\C-r": re-read-init-file
                "\e[11~": "Function Key 1"
 
-          In the above example, `C-u' is again bound to the function
-          `universal-argument' (just as it was in the first example),
-          `C-x C-r' is bound to the function `re-read-init-file', and
-          `<ESC> <[> <1> <1> <~>' is bound to insert the text `Function
-          Key 1'.
-
+          In the above example, 'C-u' is again bound to the function
+          'universal-argument' (just as it was in the first example),
+          ''C-x' 'C-r'' is bound to the function 're-read-init-file',
+          and '<ESC> <[> <1> <1> <~>' is bound to insert the text
+          'Function Key 1'.
 
      The following GNU Emacs style escape sequences are available when
      specifying key sequences:
 
-    `\C-'
+     '\C-'
           control prefix
-
-    `\M-'
+     '\M-'
           meta prefix
-
-    `\e'
+     '\e'
           an escape character
-
-    `\\'
+     '\\'
           backslash
-
-    `\"'
+     '\"'
           <">, a double quotation mark
-
-    `\''
+     '\''
           <'>, a single quote or apostrophe
 
      In addition to the GNU Emacs style escape sequences, a second set
      of backslash escapes is available:
 
-    `\a'
+     '\a'
           alert (bell)
-
-    `\b'
+     '\b'
           backspace
-
-    `\d'
+     '\d'
           delete
-
-    `\f'
+     '\f'
           form feed
-
-    `\n'
+     '\n'
           newline
-
-    `\r'
+     '\r'
           carriage return
-
-    `\t'
+     '\t'
           horizontal tab
-
-    `\v'
+     '\v'
           vertical tab
-
-    `\NNN'
+     '\NNN'
           the eight-bit character whose value is the octal value NNN
           (one to three digits)
-
-    `\xHH'
+     '\xHH'
           the eight-bit character whose value is the hexadecimal value
           HH (one or two hex digits)
 
@@ -8062,12 +8671,11 @@ Key Bindings
      used to indicate a macro definition.  Unquoted text is assumed to
      be a function name.  In the macro body, the backslash escapes
      described above are expanded.  Backslash will quote any other
-     character in the macro text, including `"' and `''.  For example,
-     the following binding will make `C-x \' insert a single `\' into
+     character in the macro text, including '"' and '''.  For example,
+     the following binding will make ''C-x' \' insert a single '\' into
      the line:
           "\C-x\\": "\\"
 
-
 
 File: gdb.info,  Node: Conditional Init Constructs,  Next: Sample Init File,  Prev: Readline Init File Syntax,  Up: Readline Init File
 
@@ -8075,33 +8683,32 @@ File: gdb.info,  Node: Conditional Init 
 ----------------------------------
 
 Readline implements a facility similar in spirit to the conditional
-compilation features of the C preprocessor which allows key bindings
-and variable settings to be performed as the result of tests.  There
-are four parser directives used.
-
-`$if'
-     The `$if' construct allows bindings to be made based on the
-     editing mode, the terminal being used, or the application using
-     Readline.  The text of the test extends to the end of the line; no
-     characters are required to isolate it.
-
-    `mode'
-          The `mode=' form of the `$if' directive is used to test
-          whether Readline is in `emacs' or `vi' mode.  This may be
-          used in conjunction with the `set keymap' command, for
-          instance, to set bindings in the `emacs-standard' and
-          `emacs-ctlx' keymaps only if Readline is starting out in
-          `emacs' mode.
+compilation features of the C preprocessor which allows key bindings and
+variable settings to be performed as the result of tests.  There are
+four parser directives used.
+
+'$if'
+     The '$if' construct allows bindings to be made based on the editing
+     mode, the terminal being used, or the application using Readline.
+     The text of the test extends to the end of the line; no characters
+     are required to isolate it.
+
+     'mode'
+          The 'mode=' form of the '$if' directive is used to test
+          whether Readline is in 'emacs' or 'vi' mode.  This may be used
+          in conjunction with the 'set keymap' command, for instance, to
+          set bindings in the 'emacs-standard' and 'emacs-ctlx' keymaps
+          only if Readline is starting out in 'emacs' mode.
 
-    `term'
-          The `term=' form may be used to include terminal-specific key
+     'term'
+          The 'term=' form may be used to include terminal-specific key
           bindings, perhaps to bind the key sequences output by the
           terminal's function keys.  The word on the right side of the
-          `=' is tested against both the full name of the terminal and
-          the portion of the terminal name before the first `-'.  This
-          allows `sun' to match both `sun' and `sun-cmd', for instance.
+          '=' is tested against both the full name of the terminal and
+          the portion of the terminal name before the first '-'.  This
+          allows 'sun' to match both 'sun' and 'sun-cmd', for instance.
 
-    `application'
+     'application'
           The APPLICATION construct is used to include
           application-specific settings.  Each program using the
           Readline library sets the APPLICATION NAME, and you can test
@@ -8114,822 +8721,17 @@ are four parser directives used.
                "\C-xq": "\eb\"\ef\""
                $endif
 
-`$endif'
-     This command, as seen in the previous example, terminates an `$if'
+'$endif'
+     This command, as seen in the previous example, terminates an '$if'
      command.
 
-`$else'
-     Commands in this branch of the `$if' directive are executed if the
+'$else'
+     Commands in this branch of the '$if' directive are executed if the
      test fails.
 
-`$include'
+'$include'
      This directive takes a single filename as an argument and reads
      commands and bindings from that file.  For example, the following
-     directive reads from `/etc/inputrc':
+     directive reads from '/etc/inputrc':
           $include /etc/inputrc
 
-
-File: gdb.info,  Node: Sample Init File,  Prev: Conditional Init Constructs,  Up: Readline Init File
-
-32.3.3 Sample Init File
------------------------
-
-Here is an example of an INPUTRC file.  This illustrates key binding,
-variable assignment, and conditional syntax.
-
-
-     # This file controls the behaviour of line input editing for
-     # programs that use the GNU Readline library.  Existing
-     # programs include FTP, Bash, and GDB.
-     #
-     # You can re-read the inputrc file with C-x C-r.
-     # Lines beginning with '#' are comments.
-     #
-     # First, include any systemwide bindings and variable
-     # assignments from /etc/Inputrc
-     $include /etc/Inputrc
-
-     #
-     # Set various bindings for emacs mode.
-
-     set editing-mode emacs
-
-     $if mode=emacs
-
-     Meta-Control-h:	backward-kill-word	Text after the function name is ignored
-
-     #
-     # Arrow keys in keypad mode
-     #
-     #"\M-OD":        backward-char
-     #"\M-OC":        forward-char
-     #"\M-OA":        previous-history
-     #"\M-OB":        next-history
-     #
-     # Arrow keys in ANSI mode
-     #
-     "\M-[D":        backward-char
-     "\M-[C":        forward-char
-     "\M-[A":        previous-history
-     "\M-[B":        next-history
-     #
-     # Arrow keys in 8 bit keypad mode
-     #
-     #"\M-\C-OD":       backward-char
-     #"\M-\C-OC":       forward-char
-     #"\M-\C-OA":       previous-history
-     #"\M-\C-OB":       next-history
-     #
-     # Arrow keys in 8 bit ANSI mode
-     #
-     #"\M-\C-[D":       backward-char
-     #"\M-\C-[C":       forward-char
-     #"\M-\C-[A":       previous-history
-     #"\M-\C-[B":       next-history
-
-     C-q: quoted-insert
-
-     $endif
-
-     # An old-style binding.  This happens to be the default.
-     TAB: complete
-
-     # Macros that are convenient for shell interaction
-     $if Bash
-     # edit the path
-     "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
-     # prepare to type a quoted word --
-     # insert open and close double quotes
-     # and move to just after the open quote
-     "\C-x\"": "\"\"\C-b"
-     # insert a backslash (testing backslash escapes
-     # in sequences and macros)
-     "\C-x\\": "\\"
-     # Quote the current or previous word
-     "\C-xq": "\eb\"\ef\""
-     # Add a binding to refresh the line, which is unbound
-     "\C-xr": redraw-current-line
-     # Edit variable on current line.
-     "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
-     $endif
-
-     # use a visible bell if one is available
-     set bell-style visible
-
-     # don't strip characters to 7 bits when reading
-     set input-meta on
-
-     # allow iso-latin1 characters to be inserted rather
-     # than converted to prefix-meta sequences
-     set convert-meta off
-
-     # display characters with the eighth bit set directly
-     # rather than as meta-prefixed characters
-     set output-meta on
-
-     # if there are more than 150 possible completions for
-     # a word, ask the user if he wants to see all of them
-     set completion-query-items 150
-
-     # For FTP
-     $if Ftp
-     "\C-xg": "get \M-?"
-     "\C-xt": "put \M-?"
-     "\M-.": yank-last-arg
-     $endif
-
-
-File: gdb.info,  Node: Bindable Readline Commands,  Next: Readline vi Mode,  Prev: Readline Init File,  Up: Command Line Editing
-
-32.4 Bindable Readline Commands
-===============================
-
-* Menu:
-
-* Commands For Moving::		Moving about the line.
-* Commands For History::	Getting at previous lines.
-* Commands For Text::		Commands for changing text.
-* Commands For Killing::	Commands for killing and yanking.
-* Numeric Arguments::		Specifying numeric arguments, repeat counts.
-* Commands For Completion::	Getting Readline to do the typing for you.
-* Keyboard Macros::		Saving and re-executing typed characters
-* Miscellaneous Commands::	Other miscellaneous commands.
-
-   This section describes Readline commands that may be bound to key
-sequences.  Command names without an accompanying key sequence are
-unbound by default.
-
-   In the following descriptions, "point" refers to the current cursor
-position, and "mark" refers to a cursor position saved by the
-`set-mark' command.  The text between the point and mark is referred to
-as the "region".
-
-
-File: gdb.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Bindable Readline Commands
-
-32.4.1 Commands For Moving
---------------------------
-
-`beginning-of-line (C-a)'
-     Move to the start of the current line.
-
-`end-of-line (C-e)'
-     Move to the end of the line.
-
-`forward-char (C-f)'
-     Move forward a character.
-
-`backward-char (C-b)'
-     Move back a character.
-
-`forward-word (M-f)'
-     Move forward to the end of the next word.  Words are composed of
-     letters and digits.
-
-`backward-word (M-b)'
-     Move back to the start of the current or previous word.  Words are
-     composed of letters and digits.
-
-`clear-screen (C-l)'
-     Clear the screen and redraw the current line, leaving the current
-     line at the top of the screen.
-
-`redraw-current-line ()'
-     Refresh the current line.  By default, this is unbound.
-
-
-
-File: gdb.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Bindable Readline Commands
-
-32.4.2 Commands For Manipulating The History
---------------------------------------------
-
-`accept-line (Newline or Return)'
-     Accept the line regardless of where the cursor is.  If this line is
-     non-empty, it may be added to the history list for future recall
-     with `add_history()'.  If this line is a modified history line,
-     the history line is restored to its original state.
-
-`previous-history (C-p)'
-     Move `back' through the history list, fetching the previous
-     command.
-
-`next-history (C-n)'
-     Move `forward' through the history list, fetching the next command.
-
-`beginning-of-history (M-<)'
-     Move to the first line in the history.
-
-`end-of-history (M->)'
-     Move to the end of the input history, i.e., the line currently
-     being entered.
-
-`reverse-search-history (C-r)'
-     Search backward starting at the current line and moving `up'
-     through the history as necessary.  This is an incremental search.
-
-`forward-search-history (C-s)'
-     Search forward starting at the current line and moving `down'
-     through the the history as necessary.  This is an incremental
-     search.
-
-`non-incremental-reverse-search-history (M-p)'
-     Search backward starting at the current line and moving `up'
-     through the history as necessary using a non-incremental search
-     for a string supplied by the user.
-
-`non-incremental-forward-search-history (M-n)'
-     Search forward starting at the current line and moving `down'
-     through the the history as necessary using a non-incremental search
-     for a string supplied by the user.
-
-`history-search-forward ()'
-     Search forward through the history for the string of characters
-     between the start of the current line and the point.  This is a
-     non-incremental search.  By default, this command is unbound.
-
-`history-search-backward ()'
-     Search backward through the history for the string of characters
-     between the start of the current line and the point.  This is a
-     non-incremental search.  By default, this command is unbound.
-
-`yank-nth-arg (M-C-y)'
-     Insert the first argument to the previous command (usually the
-     second word on the previous line) at point.  With an argument N,
-     insert the Nth word from the previous command (the words in the
-     previous command begin with word 0).  A negative argument inserts
-     the Nth word from the end of the previous command.  Once the
-     argument N is computed, the argument is extracted as if the `!N'
-     history expansion had been specified.
-
-`yank-last-arg (M-. or M-_)'
-     Insert last argument to the previous command (the last word of the
-     previous history entry).  With a numeric argument, behave exactly
-     like `yank-nth-arg'.  Successive calls to `yank-last-arg' move
-     back through the history list, inserting the last word (or the
-     word specified by the argument to the first call) of each line in
-     turn.  Any numeric argument supplied to these successive calls
-     determines the direction to move through the history.  A negative
-     argument switches the direction through the history (back or
-     forward).  The history expansion facilities are used to extract
-     the last argument, as if the `!$' history expansion had been
-     specified.
-
-
-
-File: gdb.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Bindable Readline Commands
-
-32.4.3 Commands For Changing Text
----------------------------------
-
-`delete-char (C-d)'
-     Delete the character at point.  If point is at the beginning of
-     the line, there are no characters in the line, and the last
-     character typed was not bound to `delete-char', then return EOF.
-
-`backward-delete-char (Rubout)'
-     Delete the character behind the cursor.  A numeric argument means
-     to kill the characters instead of deleting them.
-
-`forward-backward-delete-char ()'
-     Delete the character under the cursor, unless the cursor is at the
-     end of the line, in which case the character behind the cursor is
-     deleted.  By default, this is not bound to a key.
-
-`quoted-insert (C-q or C-v)'
-     Add the next character typed to the line verbatim.  This is how to
-     insert key sequences like `C-q', for example.
-
-`tab-insert (M-<TAB>)'
-     Insert a tab character.
-
-`self-insert (a, b, A, 1, !, ...)'
-     Insert yourself.
-
-`transpose-chars (C-t)'
-     Drag the character before the cursor forward over the character at
-     the cursor, moving the cursor forward as well.  If the insertion
-     point is at the end of the line, then this transposes the last two
-     characters of the line.  Negative arguments have no effect.
-
-`transpose-words (M-t)'
-     Drag the word before point past the word after point, moving point
-     past that word as well.  If the insertion point is at the end of
-     the line, this transposes the last two words on the line.
-
-`upcase-word (M-u)'
-     Uppercase the current (or following) word.  With a negative
-     argument, uppercase the previous word, but do not move the cursor.
-
-`downcase-word (M-l)'
-     Lowercase the current (or following) word.  With a negative
-     argument, lowercase the previous word, but do not move the cursor.
-
-`capitalize-word (M-c)'
-     Capitalize the current (or following) word.  With a negative
-     argument, capitalize the previous word, but do not move the cursor.
-
-`overwrite-mode ()'
-     Toggle overwrite mode.  With an explicit positive numeric argument,
-     switches to overwrite mode.  With an explicit non-positive numeric
-     argument, switches to insert mode.  This command affects only
-     `emacs' mode; `vi' mode does overwrite differently.  Each call to
-     `readline()' starts in insert mode.
-
-     In overwrite mode, characters bound to `self-insert' replace the
-     text at point rather than pushing the text to the right.
-     Characters bound to `backward-delete-char' replace the character
-     before point with a space.
-
-     By default, this command is unbound.
-
-
-
-File: gdb.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Bindable Readline Commands
-
-32.4.4 Killing And Yanking
---------------------------
-
-`kill-line (C-k)'
-     Kill the text from point to the end of the line.
-
-`backward-kill-line (C-x Rubout)'
-     Kill backward to the beginning of the line.
-
-`unix-line-discard (C-u)'
-     Kill backward from the cursor to the beginning of the current line.
-
-`kill-whole-line ()'
-     Kill all characters on the current line, no matter where point is.
-     By default, this is unbound.
-
-`kill-word (M-d)'
-     Kill from point to the end of the current word, or if between
-     words, to the end of the next word.  Word boundaries are the same
-     as `forward-word'.
-
-`backward-kill-word (M-<DEL>)'
-     Kill the word behind point.  Word boundaries are the same as
-     `backward-word'.
-
-`unix-word-rubout (C-w)'
-     Kill the word behind point, using white space as a word boundary.
-     The killed text is saved on the kill-ring.
-
-`unix-filename-rubout ()'
-     Kill the word behind point, using white space and the slash
-     character as the word boundaries.  The killed text is saved on the
-     kill-ring.
-
-`delete-horizontal-space ()'
-     Delete all spaces and tabs around point.  By default, this is
-     unbound.
-
-`kill-region ()'
-     Kill the text in the current region.  By default, this command is
-     unbound.
-
-`copy-region-as-kill ()'
-     Copy the text in the region to the kill buffer, so it can be yanked
-     right away.  By default, this command is unbound.
-
-`copy-backward-word ()'
-     Copy the word before point to the kill buffer.  The word
-     boundaries are the same as `backward-word'.  By default, this
-     command is unbound.
-
-`copy-forward-word ()'
-     Copy the word following point to the kill buffer.  The word
-     boundaries are the same as `forward-word'.  By default, this
-     command is unbound.
-
-`yank (C-y)'
-     Yank the top of the kill ring into the buffer at point.
-
-`yank-pop (M-y)'
-     Rotate the kill-ring, and yank the new top.  You can only do this
-     if the prior command is `yank' or `yank-pop'.
-
-
-File: gdb.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Bindable Readline Commands
-
-32.4.5 Specifying Numeric Arguments
------------------------------------
-
-`digit-argument (M-0, M-1, ... M--)'
-     Add this digit to the argument already accumulating, or start a new
-     argument.  `M--' starts a negative argument.
-
-`universal-argument ()'
-     This is another way to specify an argument.  If this command is
-     followed by one or more digits, optionally with a leading minus
-     sign, those digits define the argument.  If the command is
-     followed by digits, executing `universal-argument' again ends the
-     numeric argument, but is otherwise ignored.  As a special case, if
-     this command is immediately followed by a character that is
-     neither a digit or minus sign, the argument count for the next
-     command is multiplied by four.  The argument count is initially
-     one, so executing this function the first time makes the argument
-     count four, a second time makes the argument count sixteen, and so
-     on.  By default, this is not bound to a key.
-
-
-File: gdb.info,  Node: Commands For Completion,  Next: Keyboard Macros,  Prev: Numeric Arguments,  Up: Bindable Readline Commands
-
-32.4.6 Letting Readline Type For You
-------------------------------------
-
-`complete (<TAB>)'
-     Attempt to perform completion on the text before point.  The
-     actual completion performed is application-specific.  The default
-     is filename completion.
-
-`possible-completions (M-?)'
-     List the possible completions of the text before point.  When
-     displaying completions, Readline sets the number of columns used
-     for display to the value of `completion-display-width', the value
-     of the environment variable `COLUMNS', or the screen width, in
-     that order.
-
-`insert-completions (M-*)'
-     Insert all completions of the text before point that would have
-     been generated by `possible-completions'.
-
-`menu-complete ()'
-     Similar to `complete', but replaces the word to be completed with
-     a single match from the list of possible completions.  Repeated
-     execution of `menu-complete' steps through the list of possible
-     completions, inserting each match in turn.  At the end of the list
-     of completions, the bell is rung (subject to the setting of
-     `bell-style') and the original text is restored.  An argument of N
-     moves N positions forward in the list of matches; a negative
-     argument may be used to move backward through the list.  This
-     command is intended to be bound to <TAB>, but is unbound by
-     default.
-
-`menu-complete-backward ()'
-     Identical to `menu-complete', but moves backward through the list
-     of possible completions, as if `menu-complete' had been given a
-     negative argument.
-
-`delete-char-or-list ()'
-     Deletes the character under the cursor if not at the beginning or
-     end of the line (like `delete-char').  If at the end of the line,
-     behaves identically to `possible-completions'.  This command is
-     unbound by default.
-
-
-
-File: gdb.info,  Node: Keyboard Macros,  Next: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Bindable Readline Commands
-
-32.4.7 Keyboard Macros
-----------------------
-
-`start-kbd-macro (C-x ()'
-     Begin saving the characters typed into the current keyboard macro.
-
-`end-kbd-macro (C-x ))'
-     Stop saving the characters typed into the current keyboard macro
-     and save the definition.
-
-`call-last-kbd-macro (C-x e)'
-     Re-execute the last keyboard macro defined, by making the
-     characters in the macro appear as if typed at the keyboard.
-
-
-
-File: gdb.info,  Node: Miscellaneous Commands,  Prev: Keyboard Macros,  Up: Bindable Readline Commands
-
-32.4.8 Some Miscellaneous Commands
-----------------------------------
-
-`re-read-init-file (C-x C-r)'
-     Read in the contents of the INPUTRC file, and incorporate any
-     bindings or variable assignments found there.
-
-`abort (C-g)'
-     Abort the current editing command and ring the terminal's bell
-     (subject to the setting of `bell-style').
-
-`do-uppercase-version (M-a, M-b, M-X, ...)'
-     If the metafied character X is lowercase, run the command that is
-     bound to the corresponding uppercase character.
-
-`prefix-meta (<ESC>)'
-     Metafy the next character typed.  This is for keyboards without a
-     meta key.  Typing `<ESC> f' is equivalent to typing `M-f'.
-
-`undo (C-_ or C-x C-u)'
-     Incremental undo, separately remembered for each line.
-
-`revert-line (M-r)'
-     Undo all changes made to this line.  This is like executing the
-     `undo' command enough times to get back to the beginning.
-
-`tilde-expand (M-~)'
-     Perform tilde expansion on the current word.
-
-`set-mark (C-@)'
-     Set the mark to the point.  If a numeric argument is supplied, the
-     mark is set to that position.
-
-`exchange-point-and-mark (C-x C-x)'
-     Swap the point with the mark.  The current cursor position is set
-     to the saved position, and the old cursor position is saved as the
-     mark.
-
-`character-search (C-])'
-     A character is read and point is moved to the next occurrence of
-     that character.  A negative count searches for previous
-     occurrences.
-
-`character-search-backward (M-C-])'
-     A character is read and point is moved to the previous occurrence
-     of that character.  A negative count searches for subsequent
-     occurrences.
-
-`skip-csi-sequence ()'
-     Read enough characters to consume a multi-key sequence such as
-     those defined for keys like Home and End.  Such sequences begin
-     with a Control Sequence Indicator (CSI), usually ESC-[.  If this
-     sequence is bound to "\e[", keys producing such sequences will
-     have no effect unless explicitly bound to a readline command,
-     instead of inserting stray characters into the editing buffer.
-     This is unbound by default, but usually bound to ESC-[.
-
-`insert-comment (M-#)'
-     Without a numeric argument, the value of the `comment-begin'
-     variable is inserted at the beginning of the current line.  If a
-     numeric argument is supplied, this command acts as a toggle:  if
-     the characters at the beginning of the line do not match the value
-     of `comment-begin', the value is inserted, otherwise the
-     characters in `comment-begin' are deleted from the beginning of
-     the line.  In either case, the line is accepted as if a newline
-     had been typed.
-
-`dump-functions ()'
-     Print all of the functions and their key bindings to the Readline
-     output stream.  If a numeric argument is supplied, the output is
-     formatted in such a way that it can be made part of an INPUTRC
-     file.  This command is unbound by default.
-
-`dump-variables ()'
-     Print all of the settable variables and their values to the
-     Readline output stream.  If a numeric argument is supplied, the
-     output is formatted in such a way that it can be made part of an
-     INPUTRC file.  This command is unbound by default.
-
-`dump-macros ()'
-     Print all of the Readline key sequences bound to macros and the
-     strings they output.  If a numeric argument is supplied, the
-     output is formatted in such a way that it can be made part of an
-     INPUTRC file.  This command is unbound by default.
-
-`emacs-editing-mode (C-e)'
-     When in `vi' command mode, this causes a switch to `emacs' editing
-     mode.
-
-`vi-editing-mode (M-C-j)'
-     When in `emacs' editing mode, this causes a switch to `vi' editing
-     mode.
-
-
-
-File: gdb.info,  Node: Readline vi Mode,  Prev: Bindable Readline Commands,  Up: Command Line Editing
-
-32.5 Readline vi Mode
-=====================
-
-While the Readline library does not have a full set of `vi' editing
-functions, it does contain enough to allow simple editing of the line.
-The Readline `vi' mode behaves as specified in the POSIX standard.
-
-   In order to switch interactively between `emacs' and `vi' editing
-modes, use the command `M-C-j' (bound to emacs-editing-mode when in
-`vi' mode and to vi-editing-mode in `emacs' mode).  The Readline
-default is `emacs' mode.
-
-   When you enter a line in `vi' mode, you are already placed in
-`insertion' mode, as if you had typed an `i'.  Pressing <ESC> switches
-you into `command' mode, where you can edit the text of the line with
-the standard `vi' movement keys, move to previous history lines with
-`k' and subsequent lines with `j', and so forth.
-
-
-File: gdb.info,  Node: Using History Interactively,  Next: In Memoriam,  Prev: Command Line Editing,  Up: Top
-
-33 Using History Interactively
-******************************
-
-This chapter describes how to use the GNU History Library interactively,
-from a user's standpoint.  It should be considered a user's guide.  For
-information on using the GNU History Library in your own programs,
-*note Programming with GNU History: (history)Programming with GNU
-History.
-
-* Menu:
-
-* History Interaction::		What it feels like using History as a user.
-
-
-File: gdb.info,  Node: History Interaction,  Up: Using History Interactively
-
-33.1 History Expansion
-======================
-
-The History library provides a history expansion feature that is similar
-to the history expansion provided by `csh'.  This section describes the
-syntax used to manipulate the history information.
-
-   History expansions introduce words from the history list into the
-input stream, making it easy to repeat commands, insert the arguments
-to a previous command into the current input line, or fix errors in
-previous commands quickly.
-
-   History expansion takes place in two parts.  The first is to
-determine which line from the history list should be used during
-substitution.  The second is to select portions of that line for
-inclusion into the current one.  The line selected from the history is
-called the "event", and the portions of that line that are acted upon
-are called "words".  Various "modifiers" are available to manipulate
-the selected words.  The line is broken into words in the same fashion
-that Bash does, so that several words surrounded by quotes are
-considered one word.  History expansions are introduced by the
-appearance of the history expansion character, which is `!' by default.
-
-* Menu:
-
-* Event Designators::	How to specify which history line to use.
-* Word Designators::	Specifying which words are of interest.
-* Modifiers::		Modifying the results of substitution.
-
-
-File: gdb.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction
-
-33.1.1 Event Designators
-------------------------
-
-An event designator is a reference to a command line entry in the
-history list.  Unless the reference is absolute, events are relative to
-the current position in the history list.  
-
-`!'
-     Start a history substitution, except when followed by a space, tab,
-     the end of the line, or `='.
-
-`!N'
-     Refer to command line N.
-
-`!-N'
-     Refer to the command N lines back.
-
-`!!'
-     Refer to the previous command.  This is a synonym for `!-1'.
-
-`!STRING'
-     Refer to the most recent command preceding the current position in
-     the history list starting with STRING.
-
-`!?STRING[?]'
-     Refer to the most recent command preceding the current position in
-     the history list containing STRING.  The trailing `?' may be
-     omitted if the STRING is followed immediately by a newline.
-
-`^STRING1^STRING2^'
-     Quick Substitution.  Repeat the last command, replacing STRING1
-     with STRING2.  Equivalent to `!!:s/STRING1/STRING2/'.
-
-`!#'
-     The entire command line typed so far.
-
-
-
-File: gdb.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction
-
-33.1.2 Word Designators
------------------------
-
-Word designators are used to select desired words from the event.  A
-`:' separates the event specification from the word designator.  It may
-be omitted if the word designator begins with a `^', `$', `*', `-', or
-`%'.  Words are numbered from the beginning of the line, with the first
-word being denoted by 0 (zero).  Words are inserted into the current
-line separated by single spaces.
-
-   For example,
-
-`!!'
-     designates the preceding command.  When you type this, the
-     preceding command is repeated in toto.
-
-`!!:$'
-     designates the last argument of the preceding command.  This may be
-     shortened to `!$'.
-
-`!fi:2'
-     designates the second argument of the most recent command starting
-     with the letters `fi'.
-
-   Here are the word designators:
-
-`0 (zero)'
-     The `0'th word.  For many applications, this is the command word.
-
-`N'
-     The Nth word.
-
-`^'
-     The first argument; that is, word 1.
-
-`$'
-     The last argument.
-
-`%'
-     The word matched by the most recent `?STRING?' search.
-
-`X-Y'
-     A range of words; `-Y' abbreviates `0-Y'.
-
-`*'
-     All of the words, except the `0'th.  This is a synonym for `1-$'.
-     It is not an error to use `*' if there is just one word in the
-     event; the empty string is returned in that case.
-
-`X*'
-     Abbreviates `X-$'
-
-`X-'
-     Abbreviates `X-$' like `X*', but omits the last word.
-
-
-   If a word designator is supplied without an event specification, the
-previous command is used as the event.
-
-
-File: gdb.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction
-
-33.1.3 Modifiers
-----------------
-
-After the optional word designator, you can add a sequence of one or
-more of the following modifiers, each preceded by a `:'.
-
-`h'
-     Remove a trailing pathname component, leaving only the head.
-
-`t'
-     Remove all leading pathname components, leaving the tail.
-
-`r'
-     Remove a trailing suffix of the form `.SUFFIX', leaving the
-     basename.
-
-`e'
-     Remove all but the trailing suffix.
-
-`p'
-     Print the new command but do not execute it.
-
-`s/OLD/NEW/'
-     Substitute NEW for the first occurrence of OLD in the event line.
-     Any delimiter may be used in place of `/'.  The delimiter may be
-     quoted in OLD and NEW with a single backslash.  If `&' appears in
-     NEW, it is replaced by OLD.  A single backslash will quote the
-     `&'.  The final delimiter is optional if it is the last character
-     on the input line.
-
-`&'
-     Repeat the previous substitution.
-
-`g'
-`a'
-     Cause changes to be applied over the entire event line.  Used in
-     conjunction with `s', as in `gs/OLD/NEW/', or with `&'.
-
-`G'
-     Apply the following `s' modifier once to each word in the event.
-
-
-
-File: gdb.info,  Node: In Memoriam,  Next: Formatting Documentation,  Prev: Using History Interactively,  Up: Top
-
-Appendix A In Memoriam
-**********************
-
-The GDB project mourns the loss of the following long-time contributors:
-
-`Fred Fish'
-     Fred was a long-standing contributor to GDB (1991-2006), and to
-     Free Software in general.  Outside of GDB, he was known in the
-     Amiga world for his series of Fish Disks, and the GeekGadget
-     project.
-
-`Michael Snyder'
-     Michael was one of the Global Maintainers of the GDB project, with
-     contributions recorded as early as 1996, until 2011.  In addition
-     to his day to day participation, he was a large driving force
-     behind adding Reverse Debugging to GDB.
-
-   Beyond their technical contributions to the project, they were also
-enjoyable members of the Free Software Community.  We will miss them.
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-6 ./gdb/doc/gdb.info-6
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-6	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-6	2017-03-06 01:53:23.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,24 +37,816 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Sample Init File,  Prev: Conditional Init Constructs,  Up: Readline Init File
+
+32.3.3 Sample Init File
+-----------------------
+
+Here is an example of an INPUTRC file.  This illustrates key binding,
+variable assignment, and conditional syntax.
+
+     # This file controls the behaviour of line input editing for
+     # programs that use the GNU Readline library.  Existing
+     # programs include FTP, Bash, and GDB.
+     #
+     # You can re-read the inputrc file with C-x C-r.
+     # Lines beginning with '#' are comments.
+     #
+     # First, include any systemwide bindings and variable
+     # assignments from /etc/Inputrc
+     $include /etc/Inputrc
+
+     #
+     # Set various bindings for emacs mode.
+
+     set editing-mode emacs
+
+     $if mode=emacs
+
+     Meta-Control-h:	backward-kill-word	Text after the function name is ignored
+
+     #
+     # Arrow keys in keypad mode
+     #
+     #"\M-OD":        backward-char
+     #"\M-OC":        forward-char
+     #"\M-OA":        previous-history
+     #"\M-OB":        next-history
+     #
+     # Arrow keys in ANSI mode
+     #
+     "\M-[D":        backward-char
+     "\M-[C":        forward-char
+     "\M-[A":        previous-history
+     "\M-[B":        next-history
+     #
+     # Arrow keys in 8 bit keypad mode
+     #
+     #"\M-\C-OD":       backward-char
+     #"\M-\C-OC":       forward-char
+     #"\M-\C-OA":       previous-history
+     #"\M-\C-OB":       next-history
+     #
+     # Arrow keys in 8 bit ANSI mode
+     #
+     #"\M-\C-[D":       backward-char
+     #"\M-\C-[C":       forward-char
+     #"\M-\C-[A":       previous-history
+     #"\M-\C-[B":       next-history
+
+     C-q: quoted-insert
+
+     $endif
+
+     # An old-style binding.  This happens to be the default.
+     TAB: complete
+
+     # Macros that are convenient for shell interaction
+     $if Bash
+     # edit the path
+     "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
+     # prepare to type a quoted word --
+     # insert open and close double quotes
+     # and move to just after the open quote
+     "\C-x\"": "\"\"\C-b"
+     # insert a backslash (testing backslash escapes
+     # in sequences and macros)
+     "\C-x\\": "\\"
+     # Quote the current or previous word
+     "\C-xq": "\eb\"\ef\""
+     # Add a binding to refresh the line, which is unbound
+     "\C-xr": redraw-current-line
+     # Edit variable on current line.
+     "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
+     $endif
+
+     # use a visible bell if one is available
+     set bell-style visible
+
+     # don't strip characters to 7 bits when reading
+     set input-meta on
+
+     # allow iso-latin1 characters to be inserted rather
+     # than converted to prefix-meta sequences
+     set convert-meta off
+
+     # display characters with the eighth bit set directly
+     # rather than as meta-prefixed characters
+     set output-meta on
+
+     # if there are more than 150 possible completions for
+     # a word, ask the user if he wants to see all of them
+     set completion-query-items 150
+
+     # For FTP
+     $if Ftp
+     "\C-xg": "get \M-?"
+     "\C-xt": "put \M-?"
+     "\M-.": yank-last-arg
+     $endif
+
+
+File: gdb.info,  Node: Bindable Readline Commands,  Next: Readline vi Mode,  Prev: Readline Init File,  Up: Command Line Editing
+
+32.4 Bindable Readline Commands
+===============================
+
+* Menu:
+
+* Commands For Moving::		Moving about the line.
+* Commands For History::	Getting at previous lines.
+* Commands For Text::		Commands for changing text.
+* Commands For Killing::	Commands for killing and yanking.
+* Numeric Arguments::		Specifying numeric arguments, repeat counts.
+* Commands For Completion::	Getting Readline to do the typing for you.
+* Keyboard Macros::		Saving and re-executing typed characters
+* Miscellaneous Commands::	Other miscellaneous commands.
+
+This section describes Readline commands that may be bound to key
+sequences.  Command names without an accompanying key sequence are
+unbound by default.
+
+   In the following descriptions, "point" refers to the current cursor
+position, and "mark" refers to a cursor position saved by the 'set-mark'
+command.  The text between the point and mark is referred to as the
+"region".
+
+
+File: gdb.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Bindable Readline Commands
+
+32.4.1 Commands For Moving
+--------------------------
+
+'beginning-of-line (C-a)'
+     Move to the start of the current line.
+
+'end-of-line (C-e)'
+     Move to the end of the line.
+
+'forward-char (C-f)'
+     Move forward a character.
+
+'backward-char (C-b)'
+     Move back a character.
+
+'forward-word (M-f)'
+     Move forward to the end of the next word.  Words are composed of
+     letters and digits.
+
+'backward-word (M-b)'
+     Move back to the start of the current or previous word.  Words are
+     composed of letters and digits.
+
+'clear-screen (C-l)'
+     Clear the screen and redraw the current line, leaving the current
+     line at the top of the screen.
+
+'redraw-current-line ()'
+     Refresh the current line.  By default, this is unbound.
+
+
+File: gdb.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Bindable Readline Commands
+
+32.4.2 Commands For Manipulating The History
+--------------------------------------------
+
+'accept-line (Newline or Return)'
+     Accept the line regardless of where the cursor is.  If this line is
+     non-empty, it may be added to the history list for future recall
+     with 'add_history()'.  If this line is a modified history line, the
+     history line is restored to its original state.
+
+'previous-history (C-p)'
+     Move 'back' through the history list, fetching the previous
+     command.
+
+'next-history (C-n)'
+     Move 'forward' through the history list, fetching the next command.
+
+'beginning-of-history (M-<)'
+     Move to the first line in the history.
+
+'end-of-history (M->)'
+     Move to the end of the input history, i.e., the line currently
+     being entered.
+
+'reverse-search-history (C-r)'
+     Search backward starting at the current line and moving 'up'
+     through the history as necessary.  This is an incremental search.
+
+'forward-search-history (C-s)'
+     Search forward starting at the current line and moving 'down'
+     through the the history as necessary.  This is an incremental
+     search.
+
+'non-incremental-reverse-search-history (M-p)'
+     Search backward starting at the current line and moving 'up'
+     through the history as necessary using a non-incremental search for
+     a string supplied by the user.
+
+'non-incremental-forward-search-history (M-n)'
+     Search forward starting at the current line and moving 'down'
+     through the the history as necessary using a non-incremental search
+     for a string supplied by the user.
+
+'history-search-forward ()'
+     Search forward through the history for the string of characters
+     between the start of the current line and the point.  This is a
+     non-incremental search.  By default, this command is unbound.
+
+'history-search-backward ()'
+     Search backward through the history for the string of characters
+     between the start of the current line and the point.  This is a
+     non-incremental search.  By default, this command is unbound.
+
+'yank-nth-arg (M-C-y)'
+     Insert the first argument to the previous command (usually the
+     second word on the previous line) at point.  With an argument N,
+     insert the Nth word from the previous command (the words in the
+     previous command begin with word 0).  A negative argument inserts
+     the Nth word from the end of the previous command.  Once the
+     argument N is computed, the argument is extracted as if the '!N'
+     history expansion had been specified.
+
+'yank-last-arg (M-. or M-_)'
+     Insert last argument to the previous command (the last word of the
+     previous history entry).  With a numeric argument, behave exactly
+     like 'yank-nth-arg'.  Successive calls to 'yank-last-arg' move back
+     through the history list, inserting the last word (or the word
+     specified by the argument to the first call) of each line in turn.
+     Any numeric argument supplied to these successive calls determines
+     the direction to move through the history.  A negative argument
+     switches the direction through the history (back or forward).  The
+     history expansion facilities are used to extract the last argument,
+     as if the '!$' history expansion had been specified.
+
+
+File: gdb.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Bindable Readline Commands
+
+32.4.3 Commands For Changing Text
+---------------------------------
+
+'delete-char (C-d)'
+     Delete the character at point.  If point is at the beginning of the
+     line, there are no characters in the line, and the last character
+     typed was not bound to 'delete-char', then return EOF.
+
+'backward-delete-char (Rubout)'
+     Delete the character behind the cursor.  A numeric argument means
+     to kill the characters instead of deleting them.
+
+'forward-backward-delete-char ()'
+     Delete the character under the cursor, unless the cursor is at the
+     end of the line, in which case the character behind the cursor is
+     deleted.  By default, this is not bound to a key.
+
+'quoted-insert (C-q or C-v)'
+     Add the next character typed to the line verbatim.  This is how to
+     insert key sequences like 'C-q', for example.
+
+'tab-insert (M-<TAB>)'
+     Insert a tab character.
+
+'self-insert (a, b, A, 1, !, ...)'
+     Insert yourself.
+
+'transpose-chars (C-t)'
+     Drag the character before the cursor forward over the character at
+     the cursor, moving the cursor forward as well.  If the insertion
+     point is at the end of the line, then this transposes the last two
+     characters of the line.  Negative arguments have no effect.
+
+'transpose-words (M-t)'
+     Drag the word before point past the word after point, moving point
+     past that word as well.  If the insertion point is at the end of
+     the line, this transposes the last two words on the line.
+
+'upcase-word (M-u)'
+     Uppercase the current (or following) word.  With a negative
+     argument, uppercase the previous word, but do not move the cursor.
+
+'downcase-word (M-l)'
+     Lowercase the current (or following) word.  With a negative
+     argument, lowercase the previous word, but do not move the cursor.
+
+'capitalize-word (M-c)'
+     Capitalize the current (or following) word.  With a negative
+     argument, capitalize the previous word, but do not move the cursor.
+
+'overwrite-mode ()'
+     Toggle overwrite mode.  With an explicit positive numeric argument,
+     switches to overwrite mode.  With an explicit non-positive numeric
+     argument, switches to insert mode.  This command affects only
+     'emacs' mode; 'vi' mode does overwrite differently.  Each call to
+     'readline()' starts in insert mode.
+
+     In overwrite mode, characters bound to 'self-insert' replace the
+     text at point rather than pushing the text to the right.
+     Characters bound to 'backward-delete-char' replace the character
+     before point with a space.
+
+     By default, this command is unbound.
+
+
+File: gdb.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Bindable Readline Commands
+
+32.4.4 Killing And Yanking
+--------------------------
+
+'kill-line (C-k)'
+     Kill the text from point to the end of the line.
+
+'backward-kill-line (C-x Rubout)'
+     Kill backward to the beginning of the line.
+
+'unix-line-discard (C-u)'
+     Kill backward from the cursor to the beginning of the current line.
+
+'kill-whole-line ()'
+     Kill all characters on the current line, no matter where point is.
+     By default, this is unbound.
+
+'kill-word (M-d)'
+     Kill from point to the end of the current word, or if between
+     words, to the end of the next word.  Word boundaries are the same
+     as 'forward-word'.
+
+'backward-kill-word (M-<DEL>)'
+     Kill the word behind point.  Word boundaries are the same as
+     'backward-word'.
+
+'unix-word-rubout (C-w)'
+     Kill the word behind point, using white space as a word boundary.
+     The killed text is saved on the kill-ring.
+
+'unix-filename-rubout ()'
+     Kill the word behind point, using white space and the slash
+     character as the word boundaries.  The killed text is saved on the
+     kill-ring.
+
+'delete-horizontal-space ()'
+     Delete all spaces and tabs around point.  By default, this is
+     unbound.
+
+'kill-region ()'
+     Kill the text in the current region.  By default, this command is
+     unbound.
+
+'copy-region-as-kill ()'
+     Copy the text in the region to the kill buffer, so it can be yanked
+     right away.  By default, this command is unbound.
+
+'copy-backward-word ()'
+     Copy the word before point to the kill buffer.  The word boundaries
+     are the same as 'backward-word'.  By default, this command is
+     unbound.
+
+'copy-forward-word ()'
+     Copy the word following point to the kill buffer.  The word
+     boundaries are the same as 'forward-word'.  By default, this
+     command is unbound.
+
+'yank (C-y)'
+     Yank the top of the kill ring into the buffer at point.
+
+'yank-pop (M-y)'
+     Rotate the kill-ring, and yank the new top.  You can only do this
+     if the prior command is 'yank' or 'yank-pop'.
+
+
+File: gdb.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Bindable Readline Commands
+
+32.4.5 Specifying Numeric Arguments
+-----------------------------------
+
+'digit-argument (M-0, M-1, ... M--)'
+     Add this digit to the argument already accumulating, or start a new
+     argument.  'M--' starts a negative argument.
+
+'universal-argument ()'
+     This is another way to specify an argument.  If this command is
+     followed by one or more digits, optionally with a leading minus
+     sign, those digits define the argument.  If the command is followed
+     by digits, executing 'universal-argument' again ends the numeric
+     argument, but is otherwise ignored.  As a special case, if this
+     command is immediately followed by a character that is neither a
+     digit or minus sign, the argument count for the next command is
+     multiplied by four.  The argument count is initially one, so
+     executing this function the first time makes the argument count
+     four, a second time makes the argument count sixteen, and so on.
+     By default, this is not bound to a key.
+
+
+File: gdb.info,  Node: Commands For Completion,  Next: Keyboard Macros,  Prev: Numeric Arguments,  Up: Bindable Readline Commands
+
+32.4.6 Letting Readline Type For You
+------------------------------------
+
+'complete (<TAB>)'
+     Attempt to perform completion on the text before point.  The actual
+     completion performed is application-specific.  The default is
+     filename completion.
+
+'possible-completions (M-?)'
+     List the possible completions of the text before point.  When
+     displaying completions, Readline sets the number of columns used
+     for display to the value of 'completion-display-width', the value
+     of the environment variable 'COLUMNS', or the screen width, in that
+     order.
+
+'insert-completions (M-*)'
+     Insert all completions of the text before point that would have
+     been generated by 'possible-completions'.
+
+'menu-complete ()'
+     Similar to 'complete', but replaces the word to be completed with a
+     single match from the list of possible completions.  Repeated
+     execution of 'menu-complete' steps through the list of possible
+     completions, inserting each match in turn.  At the end of the list
+     of completions, the bell is rung (subject to the setting of
+     'bell-style') and the original text is restored.  An argument of N
+     moves N positions forward in the list of matches; a negative
+     argument may be used to move backward through the list.  This
+     command is intended to be bound to <TAB>, but is unbound by
+     default.
+
+'menu-complete-backward ()'
+     Identical to 'menu-complete', but moves backward through the list
+     of possible completions, as if 'menu-complete' had been given a
+     negative argument.
+
+'delete-char-or-list ()'
+     Deletes the character under the cursor if not at the beginning or
+     end of the line (like 'delete-char').  If at the end of the line,
+     behaves identically to 'possible-completions'.  This command is
+     unbound by default.
+
+
+File: gdb.info,  Node: Keyboard Macros,  Next: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Bindable Readline Commands
+
+32.4.7 Keyboard Macros
+----------------------
+
+'start-kbd-macro (C-x ()'
+     Begin saving the characters typed into the current keyboard macro.
+
+'end-kbd-macro (C-x ))'
+     Stop saving the characters typed into the current keyboard macro
+     and save the definition.
+
+'call-last-kbd-macro (C-x e)'
+     Re-execute the last keyboard macro defined, by making the
+     characters in the macro appear as if typed at the keyboard.
+
+
+File: gdb.info,  Node: Miscellaneous Commands,  Prev: Keyboard Macros,  Up: Bindable Readline Commands
+
+32.4.8 Some Miscellaneous Commands
+----------------------------------
+
+'re-read-init-file (C-x C-r)'
+     Read in the contents of the INPUTRC file, and incorporate any
+     bindings or variable assignments found there.
+
+'abort (C-g)'
+     Abort the current editing command and ring the terminal's bell
+     (subject to the setting of 'bell-style').
+
+'do-uppercase-version (M-a, M-b, M-X, ...)'
+     If the metafied character X is lowercase, run the command that is
+     bound to the corresponding uppercase character.
+
+'prefix-meta (<ESC>)'
+     Metafy the next character typed.  This is for keyboards without a
+     meta key.  Typing '<ESC> f' is equivalent to typing 'M-f'.
+
+'undo (C-_ or C-x C-u)'
+     Incremental undo, separately remembered for each line.
+
+'revert-line (M-r)'
+     Undo all changes made to this line.  This is like executing the
+     'undo' command enough times to get back to the beginning.
+
+'tilde-expand (M-~)'
+     Perform tilde expansion on the current word.
+
+'set-mark (C-@)'
+     Set the mark to the point.  If a numeric argument is supplied, the
+     mark is set to that position.
+
+'exchange-point-and-mark (C-x C-x)'
+     Swap the point with the mark.  The current cursor position is set
+     to the saved position, and the old cursor position is saved as the
+     mark.
+
+'character-search (C-])'
+     A character is read and point is moved to the next occurrence of
+     that character.  A negative count searches for previous
+     occurrences.
+
+'character-search-backward (M-C-])'
+     A character is read and point is moved to the previous occurrence
+     of that character.  A negative count searches for subsequent
+     occurrences.
+
+'skip-csi-sequence ()'
+     Read enough characters to consume a multi-key sequence such as
+     those defined for keys like Home and End.  Such sequences begin
+     with a Control Sequence Indicator (CSI), usually ESC-[.  If this
+     sequence is bound to "\e[", keys producing such sequences will have
+     no effect unless explicitly bound to a readline command, instead of
+     inserting stray characters into the editing buffer.  This is
+     unbound by default, but usually bound to ESC-[.
+
+'insert-comment (M-#)'
+     Without a numeric argument, the value of the 'comment-begin'
+     variable is inserted at the beginning of the current line.  If a
+     numeric argument is supplied, this command acts as a toggle: if the
+     characters at the beginning of the line do not match the value of
+     'comment-begin', the value is inserted, otherwise the characters in
+     'comment-begin' are deleted from the beginning of the line.  In
+     either case, the line is accepted as if a newline had been typed.
+
+'dump-functions ()'
+     Print all of the functions and their key bindings to the Readline
+     output stream.  If a numeric argument is supplied, the output is
+     formatted in such a way that it can be made part of an INPUTRC
+     file.  This command is unbound by default.
+
+'dump-variables ()'
+     Print all of the settable variables and their values to the
+     Readline output stream.  If a numeric argument is supplied, the
+     output is formatted in such a way that it can be made part of an
+     INPUTRC file.  This command is unbound by default.
+
+'dump-macros ()'
+     Print all of the Readline key sequences bound to macros and the
+     strings they output.  If a numeric argument is supplied, the output
+     is formatted in such a way that it can be made part of an INPUTRC
+     file.  This command is unbound by default.
+
+'emacs-editing-mode (C-e)'
+     When in 'vi' command mode, this causes a switch to 'emacs' editing
+     mode.
+
+'vi-editing-mode (M-C-j)'
+     When in 'emacs' editing mode, this causes a switch to 'vi' editing
+     mode.
+
+
+File: gdb.info,  Node: Readline vi Mode,  Prev: Bindable Readline Commands,  Up: Command Line Editing
+
+32.5 Readline vi Mode
+=====================
+
+While the Readline library does not have a full set of 'vi' editing
+functions, it does contain enough to allow simple editing of the line.
+The Readline 'vi' mode behaves as specified in the POSIX standard.
+
+   In order to switch interactively between 'emacs' and 'vi' editing
+modes, use the command 'M-C-j' (bound to emacs-editing-mode when in 'vi'
+mode and to vi-editing-mode in 'emacs' mode).  The Readline default is
+'emacs' mode.
+
+   When you enter a line in 'vi' mode, you are already placed in
+'insertion' mode, as if you had typed an 'i'.  Pressing <ESC> switches
+you into 'command' mode, where you can edit the text of the line with
+the standard 'vi' movement keys, move to previous history lines with 'k'
+and subsequent lines with 'j', and so forth.
+
+
+File: gdb.info,  Node: Using History Interactively,  Next: In Memoriam,  Prev: Command Line Editing,  Up: Top
+
+33 Using History Interactively
+******************************
+
+This chapter describes how to use the GNU History Library interactively,
+from a user's standpoint.  It should be considered a user's guide.  For
+information on using the GNU History Library in your own programs, *note
+(history)Programming with GNU History::.
+
+* Menu:
+
+* History Interaction::		What it feels like using History as a user.
+
+
+File: gdb.info,  Node: History Interaction,  Up: Using History Interactively
+
+33.1 History Expansion
+======================
+
+The History library provides a history expansion feature that is similar
+to the history expansion provided by 'csh'.  This section describes the
+syntax used to manipulate the history information.
+
+   History expansions introduce words from the history list into the
+input stream, making it easy to repeat commands, insert the arguments to
+a previous command into the current input line, or fix errors in
+previous commands quickly.
+
+   History expansion takes place in two parts.  The first is to
+determine which line from the history list should be used during
+substitution.  The second is to select portions of that line for
+inclusion into the current one.  The line selected from the history is
+called the "event", and the portions of that line that are acted upon
+are called "words".  Various "modifiers" are available to manipulate the
+selected words.  The line is broken into words in the same fashion that
+Bash does, so that several words surrounded by quotes are considered one
+word.  History expansions are introduced by the appearance of the
+history expansion character, which is '!' by default.
+
+* Menu:
+
+* Event Designators::	How to specify which history line to use.
+* Word Designators::	Specifying which words are of interest.
+* Modifiers::		Modifying the results of substitution.
+
+
+File: gdb.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction
+
+33.1.1 Event Designators
+------------------------
+
+An event designator is a reference to a command line entry in the
+history list.  Unless the reference is absolute, events are relative to
+the current position in the history list.
+
+'!'
+     Start a history substitution, except when followed by a space, tab,
+     the end of the line, or '='.
+
+'!N'
+     Refer to command line N.
+
+'!-N'
+     Refer to the command N lines back.
+
+'!!'
+     Refer to the previous command.  This is a synonym for '!-1'.
+
+'!STRING'
+     Refer to the most recent command preceding the current position in
+     the history list starting with STRING.
+
+'!?STRING[?]'
+     Refer to the most recent command preceding the current position in
+     the history list containing STRING.  The trailing '?' may be
+     omitted if the STRING is followed immediately by a newline.
+
+'^STRING1^STRING2^'
+     Quick Substitution.  Repeat the last command, replacing STRING1
+     with STRING2.  Equivalent to '!!:s/STRING1/STRING2/'.
+
+'!#'
+     The entire command line typed so far.
+
+
+File: gdb.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction
+
+33.1.2 Word Designators
+-----------------------
+
+Word designators are used to select desired words from the event.  A ':'
+separates the event specification from the word designator.  It may be
+omitted if the word designator begins with a '^', '$', '*', '-', or '%'.
+Words are numbered from the beginning of the line, with the first word
+being denoted by 0 (zero).  Words are inserted into the current line
+separated by single spaces.
+
+   For example,
+
+'!!'
+     designates the preceding command.  When you type this, the
+     preceding command is repeated in toto.
+
+'!!:$'
+     designates the last argument of the preceding command.  This may be
+     shortened to '!$'.
+
+'!fi:2'
+     designates the second argument of the most recent command starting
+     with the letters 'fi'.
+
+   Here are the word designators:
+
+'0 (zero)'
+     The '0'th word.  For many applications, this is the command word.
+
+'N'
+     The Nth word.
+
+'^'
+     The first argument; that is, word 1.
+
+'$'
+     The last argument.
+
+'%'
+     The word matched by the most recent '?STRING?' search.
+
+'X-Y'
+     A range of words; '-Y' abbreviates '0-Y'.
+
+'*'
+     All of the words, except the '0'th.  This is a synonym for '1-$'.
+     It is not an error to use '*' if there is just one word in the
+     event; the empty string is returned in that case.
+
+'X*'
+     Abbreviates 'X-$'
+
+'X-'
+     Abbreviates 'X-$' like 'X*', but omits the last word.
+
+   If a word designator is supplied without an event specification, the
+previous command is used as the event.
+
+
+File: gdb.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction
+
+33.1.3 Modifiers
+----------------
+
+After the optional word designator, you can add a sequence of one or
+more of the following modifiers, each preceded by a ':'.
+
+'h'
+     Remove a trailing pathname component, leaving only the head.
+
+'t'
+     Remove all leading pathname components, leaving the tail.
+
+'r'
+     Remove a trailing suffix of the form '.SUFFIX', leaving the
+     basename.
+
+'e'
+     Remove all but the trailing suffix.
+
+'p'
+     Print the new command but do not execute it.
+
+'s/OLD/NEW/'
+     Substitute NEW for the first occurrence of OLD in the event line.
+     Any delimiter may be used in place of '/'.  The delimiter may be
+     quoted in OLD and NEW with a single backslash.  If '&' appears in
+     NEW, it is replaced by OLD.  A single backslash will quote the '&'.
+     The final delimiter is optional if it is the last character on the
+     input line.
+
+'&'
+     Repeat the previous substitution.
+
+'g'
+'a'
+     Cause changes to be applied over the entire event line.  Used in
+     conjunction with 's', as in 'gs/OLD/NEW/', or with '&'.
+
+'G'
+     Apply the following 's' modifier once to each word in the event.
+
+
+File: gdb.info,  Node: In Memoriam,  Next: Formatting Documentation,  Prev: Using History Interactively,  Up: Top
+
+Appendix A In Memoriam
+**********************
+
+The GDB project mourns the loss of the following long-time contributors:
+
+'Fred Fish'
+     Fred was a long-standing contributor to GDB (1991-2006), and to
+     Free Software in general.  Outside of GDB, he was known in the
+     Amiga world for his series of Fish Disks, and the GeekGadget
+     project.
+
+'Michael Snyder'
+     Michael was one of the Global Maintainers of the GDB project, with
+     contributions recorded as early as 1996, until 2011.  In addition
+     to his day to day participation, he was a large driving force
+     behind adding Reverse Debugging to GDB.
+
+   Beyond their technical contributions to the project, they were also
+enjoyable members of the Free Software Community.  We will miss them.
+
+
 File: gdb.info,  Node: Formatting Documentation,  Next: Installing GDB,  Prev: In Memoriam,  Up: Top
 
 Appendix B Formatting Documentation
 ***********************************
 
 The GDB 4 release includes an already-formatted reference card, ready
-for printing with PostScript or Ghostscript, in the `gdb' subdirectory
+for printing with PostScript or Ghostscript, in the 'gdb' subdirectory
 of the main source directory(1).  If you can use PostScript or
 Ghostscript with your printer, you can print the reference card
-immediately with `refcard.ps'.
+immediately with 'refcard.ps'.
 
-   The release also includes the source for the reference card.  You
-can format it, using TeX, by typing:
+   The release also includes the source for the reference card.  You can
+format it, using TeX, by typing:
 
      make refcard.dvi
 
-   The GDB reference card is designed to print in "landscape" mode on
-US "letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches
+   The GDB reference card is designed to print in "landscape" mode on US
+"letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches
 high.  You will need to specify this form of printing as an option to
 your DVI output program.
 
@@ -64,58 +855,57 @@ distribution.  The documentation is writ
 a documentation system that uses a single source file to produce both
 on-line information and a printed manual.  You can use one of the Info
 formatting commands to create the on-line version of the documentation
-and TeX (or `texi2roff') to typeset the printed version.
+and TeX (or 'texi2roff') to typeset the printed version.
 
-   GDB includes an already formatted copy of the on-line Info version
-of this manual in the `gdb' subdirectory.  The main Info file is
-`gdb-7.9.50.20150706-cvs/gdb/gdb.info', and it refers to subordinate
-files matching `gdb.info*' in the same directory.  If necessary, you
-can print out these files, or read them with any editor; but they are
-easier to read using the `info' subsystem in GNU Emacs or the
-standalone `info' program, available as part of the GNU Texinfo
-distribution.
+   GDB includes an already formatted copy of the on-line Info version of
+this manual in the 'gdb' subdirectory.  The main Info file is
+'gdb-7.12.50.20170306-git/gdb/gdb.info', and it refers to subordinate
+files matching 'gdb.info*' in the same directory.  If necessary, you can
+print out these files, or read them with any editor; but they are easier
+to read using the 'info' subsystem in GNU Emacs or the standalone 'info'
+program, available as part of the GNU Texinfo distribution.
 
    If you want to format these Info files yourself, you need one of the
-Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
+Info formatting programs, such as 'texinfo-format-buffer' or 'makeinfo'.
 
-   If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-7.9.50.20150706-cvs', in the case of version
-7.9.50.20150706-cvs), you can make the Info file by typing:
+   If you have 'makeinfo' installed, and are in the top level GDB source
+directory ('gdb-7.12.50.20170306-git', in the case of version
+7.12.50.20170306-git), you can make the Info file by typing:
 
      cd gdb
      make gdb.info
 
    If you want to typeset and print copies of this manual, you need TeX,
-a program to print its DVI output files, and `texinfo.tex', the Texinfo
+a program to print its DVI output files, and 'texinfo.tex', the Texinfo
 definitions file.
 
    TeX is a typesetting program; it does not print files directly, but
 produces output files called DVI files.  To print a typeset document,
 you need a program to print DVI files.  If your system has TeX
 installed, chances are it has such a program.  The precise command to
-use depends on your system; `lpr -d' is common; another (for PostScript
-devices) is `dvips'.  The DVI print command may require a file name
-without any extension or a `.dvi' extension.
-
-   TeX also requires a macro definitions file called `texinfo.tex'.
-This file tells TeX how to typeset a document written in Texinfo
-format.  On its own, TeX cannot either read or typeset a Texinfo file.
-`texinfo.tex' is distributed with GDB and is located in the
-`gdb-VERSION-NUMBER/texinfo' directory.
+use depends on your system; 'lpr -d' is common; another (for PostScript
+devices) is 'dvips'.  The DVI print command may require a file name
+without any extension or a '.dvi' extension.
+
+   TeX also requires a macro definitions file called 'texinfo.tex'.
+This file tells TeX how to typeset a document written in Texinfo format.
+On its own, TeX cannot either read or typeset a Texinfo file.
+'texinfo.tex' is distributed with GDB and is located in the
+'gdb-VERSION-NUMBER/texinfo' directory.
 
    If you have TeX and a DVI printer program installed, you can typeset
-and print this manual.  First switch to the `gdb' subdirectory of the
-main source directory (for example, to `gdb-7.9.50.20150706-cvs/gdb')
+and print this manual.  First switch to the 'gdb' subdirectory of the
+main source directory (for example, to 'gdb-7.12.50.20170306-git/gdb')
 and type:
 
      make gdb.dvi
 
-   Then give `gdb.dvi' to your DVI printing program.
+   Then give 'gdb.dvi' to your DVI printing program.
 
    ---------- Footnotes ----------
 
-   (1) In `gdb-7.9.50.20150706-cvs/gdb/refcard.ps' of the version
-7.9.50.20150706-cvs release.
+   (1) In 'gdb-7.12.50.20170306-git/gdb/refcard.ps' of the version
+7.12.50.20170306-git release.
 
 
 File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Formatting Documentation,  Up: Top
@@ -126,7 +916,7 @@ Appendix C Installing GDB
 * Menu:
 
 * Requirements::                Requirements for building GDB
-* Running Configure::           Invoking the GDB `configure' script
+* Running Configure::           Invoking the GDB 'configure' script
 * Separate Objdir::             Compiling GDB in another directory
 * Config Names::                Specifying names for hosts and targets
 * Configure Options::           Summary of options for configure
@@ -138,16 +928,15 @@ File: gdb.info,  Node: Requirements,  Ne
 C.1 Requirements for Building GDB
 =================================
 
-Building GDB requires various tools and packages to be available.
-Other packages will be used only if they are found.
+Building GDB requires various tools and packages to be available.  Other
+packages will be used only if they are found.
 
 Tools/Packages Necessary for Building GDB
 =========================================
 
 ISO C90 compiler
-     GDB is written in ISO C90.  It should be buildable with any
-     working C90 compiler, e.g. GCC.
-
+     GDB is written in ISO C90.  It should be buildable with any working
+     C90 compiler, e.g. GCC.
 
 Tools/Packages Optional for Building GDB
 ========================================
@@ -155,155 +944,150 @@ Tools/Packages Optional for Building GDB
 Expat
      GDB can use the Expat XML parsing library.  This library may be
      included with your operating system distribution; if it is not, you
-     can get the latest version from `http://expat.sourceforge.net'.
-     The `configure' script will search for this library in several
+     can get the latest version from <http://expat.sourceforge.net>.
+     The 'configure' script will search for this library in several
      standard locations; if it is installed in an unusual path, you can
-     use the `--with-libexpat-prefix' option to specify its location.
+     use the '--with-libexpat-prefix' option to specify its location.
 
      Expat is used for:
 
         * Remote protocol memory maps (*note Memory Map Format::)
-
         * Target descriptions (*note Target Descriptions::)
-
         * Remote shared library lists (*Note Library List Format::, or
           alternatively *note Library List Format for SVR4 Targets::)
-
         * MS-Windows shared libraries (*note Shared Libraries::)
-
         * Traceframe info (*note Traceframe Info Format::)
-
         * Branch trace (*note Branch Trace Format::, *note Branch Trace
           Configuration Format::)
 
 zlib
-     GDB will use the `zlib' library, if available, to read compressed
+     GDB will use the 'zlib' library, if available, to read compressed
      debug sections.  Some linkers, such as GNU gold, are capable of
      producing binaries with compressed debug sections.  If GDB is
-     compiled with `zlib', it will be able to read the debug
-     information in such binaries.
+     compiled with 'zlib', it will be able to read the debug information
+     in such binaries.
 
-     The `zlib' library is likely included with your operating system
+     The 'zlib' library is likely included with your operating system
      distribution; if it is not, you can get the latest version from
-     `http://zlib.net'.
+     <http://zlib.net>.
 
 iconv
      GDB's features related to character sets (*note Character Sets::)
-     require a functioning `iconv' implementation.  If you are on a GNU
+     require a functioning 'iconv' implementation.  If you are on a GNU
      system, then this is provided by the GNU C Library.  Some other
-     systems also provide a working `iconv'.
+     systems also provide a working 'iconv'.
 
-     If GDB is using the `iconv' program which is installed in a
+     If GDB is using the 'iconv' program which is installed in a
      non-standard place, you will need to tell GDB where to find it.
-     This is done with `--with-iconv-bin' which specifies the directory
-     that contains the `iconv' program.
+     This is done with '--with-iconv-bin' which specifies the directory
+     that contains the 'iconv' program.
 
-     On systems without `iconv', you can install GNU Libiconv.  If you
+     On systems without 'iconv', you can install GNU Libiconv.  If you
      have previously installed Libiconv, you can use the
-     `--with-libiconv-prefix' option to configure.
+     '--with-libiconv-prefix' option to configure.
 
-     GDB's top-level `configure' and `Makefile' will arrange to build
-     Libiconv if a directory named `libiconv' appears in the top-most
+     GDB's top-level 'configure' and 'Makefile' will arrange to build
+     Libiconv if a directory named 'libiconv' appears in the top-most
      source directory.  If Libiconv is built this way, and if the
-     operating system does not provide a suitable `iconv'
+     operating system does not provide a suitable 'iconv'
      implementation, then the just-built library will automatically be
      used by GDB.  One easy way to set this up is to download GNU
      Libiconv, unpack it, and then rename the directory holding the
-     Libiconv source code to `libiconv'.
+     Libiconv source code to 'libiconv'.
 
 
 File: gdb.info,  Node: Running Configure,  Next: Separate Objdir,  Prev: Requirements,  Up: Installing GDB
 
-C.2 Invoking the GDB `configure' Script
+C.2 Invoking the GDB 'configure' Script
 =======================================
 
-GDB comes with a `configure' script that automates the process of
-preparing GDB for installation; you can then use `make' to build the
-`gdb' program.
-
-   The GDB distribution includes all the source code you need for GDB
-in a single directory, whose name is usually composed by appending the
-version number to `gdb'.
+GDB comes with a 'configure' script that automates the process of
+preparing GDB for installation; you can then use 'make' to build the
+'gdb' program.
+
+   The GDB distribution includes all the source code you need for GDB in
+a single directory, whose name is usually composed by appending the
+version number to 'gdb'.
 
-   For example, the GDB version 7.9.50.20150706-cvs distribution is in
-the `gdb-7.9.50.20150706-cvs' directory.  That directory contains:
+   For example, the GDB version 7.12.50.20170306-git distribution is in
+the 'gdb-7.12.50.20170306-git' directory.  That directory contains:
 
-`gdb-7.9.50.20150706-cvs/configure (and supporting files)'
+'gdb-7.12.50.20170306-git/configure (and supporting files)'
      script for configuring GDB and all its supporting libraries
 
-`gdb-7.9.50.20150706-cvs/gdb'
+'gdb-7.12.50.20170306-git/gdb'
      the source specific to GDB itself
 
-`gdb-7.9.50.20150706-cvs/bfd'
+'gdb-7.12.50.20170306-git/bfd'
      source for the Binary File Descriptor library
 
-`gdb-7.9.50.20150706-cvs/include'
+'gdb-7.12.50.20170306-git/include'
      GNU include files
 
-`gdb-7.9.50.20150706-cvs/libiberty'
-     source for the `-liberty' free software library
+'gdb-7.12.50.20170306-git/libiberty'
+     source for the '-liberty' free software library
 
-`gdb-7.9.50.20150706-cvs/opcodes'
+'gdb-7.12.50.20170306-git/opcodes'
      source for the library of opcode tables and disassemblers
 
-`gdb-7.9.50.20150706-cvs/readline'
+'gdb-7.12.50.20170306-git/readline'
      source for the GNU command-line interface
 
-`gdb-7.9.50.20150706-cvs/glob'
+'gdb-7.12.50.20170306-git/glob'
      source for the GNU filename pattern-matching subroutine
 
-`gdb-7.9.50.20150706-cvs/mmalloc'
+'gdb-7.12.50.20170306-git/mmalloc'
      source for the GNU memory-mapped malloc package
 
-   The simplest way to configure and build GDB is to run `configure'
-from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-7.9.50.20150706-cvs' directory.
+   The simplest way to configure and build GDB is to run 'configure'
+from the 'gdb-VERSION-NUMBER' source directory, which in this example is
+the 'gdb-7.12.50.20170306-git' directory.
 
-   First switch to the `gdb-VERSION-NUMBER' source directory if you are
-not already in it; then run `configure'.  Pass the identifier for the
+   First switch to the 'gdb-VERSION-NUMBER' source directory if you are
+not already in it; then run 'configure'.  Pass the identifier for the
 platform on which GDB will run as an argument.
 
    For example:
 
-     cd gdb-7.9.50.20150706-cvs
+     cd gdb-7.12.50.20170306-git
      ./configure HOST
      make
 
-where HOST is an identifier such as `sun4' or `decstation', that
+where HOST is an identifier such as 'sun4' or 'decstation', that
 identifies the platform where GDB will run.  (You can often leave off
-HOST; `configure' tries to guess the correct value by examining your
+HOST; 'configure' tries to guess the correct value by examining your
 system.)
 
-   Running `configure HOST' and then running `make' builds the `bfd',
-`readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
+   Running 'configure HOST' and then running 'make' builds the 'bfd',
+'readline', 'mmalloc', and 'libiberty' libraries, then 'gdb' itself.
 The configured source files, and the binaries, are left in the
 corresponding source directories.
 
-   `configure' is a Bourne-shell (`/bin/sh') script; if your system
-does not recognize this automatically when you run a different shell,
-you may need to run `sh' on it explicitly:
+   'configure' is a Bourne-shell ('/bin/sh') script; if your system does
+not recognize this automatically when you run a different shell, you may
+need to run 'sh' on it explicitly:
 
      sh configure HOST
 
-   If you run `configure' from a directory that contains source
+   If you run 'configure' from a directory that contains source
 directories for multiple libraries or programs, such as the
-`gdb-7.9.50.20150706-cvs' source directory for version
-7.9.50.20150706-cvs, `configure' creates configuration files for every
+'gdb-7.12.50.20170306-git' source directory for version
+7.12.50.20170306-git, 'configure' creates configuration files for every
 directory level underneath (unless you tell it not to, with the
-`--norecursion' option).
+'--norecursion' option).
 
-   You should run the `configure' script from the top directory in the
-source tree, the `gdb-VERSION-NUMBER' directory.  If you run
-`configure' from one of the subdirectories, you will configure only
-that subdirectory.  That is usually not what you want.  In particular,
-if you run the first `configure' from the `gdb' subdirectory of the
-`gdb-VERSION-NUMBER' directory, you will omit the configuration of
-`bfd', `readline', and other sibling directories of the `gdb'
+   You should run the 'configure' script from the top directory in the
+source tree, the 'gdb-VERSION-NUMBER' directory.  If you run 'configure'
+from one of the subdirectories, you will configure only that
+subdirectory.  That is usually not what you want.  In particular, if you
+run the first 'configure' from the 'gdb' subdirectory of the
+'gdb-VERSION-NUMBER' directory, you will omit the configuration of
+'bfd', 'readline', and other sibling directories of the 'gdb'
 subdirectory.  This leads to build errors about missing include files
-such as `bfd/bfd.h'.
+such as 'bfd/bfd.h'.
 
-   You can install `gdb' anywhere; it has no hardwired paths.  However,
-you should make sure that the shell on your path (named by the `SHELL'
+   You can install 'gdb' anywhere; it has no hardwired paths.  However,
+you should make sure that the shell on your path (named by the 'SHELL'
 environment variable) is publicly readable.  Remember that GDB uses the
 shell to start your program--some systems refuse to let GDB debug child
 processes whose programs are not readable.
@@ -314,62 +1098,61 @@ File: gdb.info,  Node: Separate Objdir, 
 C.3 Compiling GDB in Another Directory
 ======================================
 
-If you want to run GDB versions for several host or target machines,
-you need a different `gdb' compiled for each combination of host and
-target.  `configure' is designed to make this easy by allowing you to
-generate each configuration in a separate subdirectory, rather than in
-the source directory.  If your `make' program handles the `VPATH'
-feature (GNU `make' does), running `make' in each of these directories
-builds the `gdb' program specified there.
-
-   To build `gdb' in a separate directory, run `configure' with the
-`--srcdir' option to specify where to find the source.  (You also need
-to specify a path to find `configure' itself from your working
-directory.  If the path to `configure' would be the same as the
-argument to `--srcdir', you can leave out the `--srcdir' option; it is
-assumed.)
+If you want to run GDB versions for several host or target machines, you
+need a different 'gdb' compiled for each combination of host and target.
+'configure' is designed to make this easy by allowing you to generate
+each configuration in a separate subdirectory, rather than in the source
+directory.  If your 'make' program handles the 'VPATH' feature (GNU
+'make' does), running 'make' in each of these directories builds the
+'gdb' program specified there.
+
+   To build 'gdb' in a separate directory, run 'configure' with the
+'--srcdir' option to specify where to find the source.  (You also need
+to specify a path to find 'configure' itself from your working
+directory.  If the path to 'configure' would be the same as the argument
+to '--srcdir', you can leave out the '--srcdir' option; it is assumed.)
 
-   For example, with version 7.9.50.20150706-cvs, you can build GDB in a
-separate directory for a Sun 4 like this:
+   For example, with version 7.12.50.20170306-git, you can build GDB in
+a separate directory for a Sun 4 like this:
 
-     cd gdb-7.9.50.20150706-cvs
+     cd gdb-7.12.50.20170306-git
      mkdir ../gdb-sun4
      cd ../gdb-sun4
-     ../gdb-7.9.50.20150706-cvs/configure sun4
+     ../gdb-7.12.50.20170306-git/configure sun4
      make
 
-   When `configure' builds a configuration using a remote source
+   When 'configure' builds a configuration using a remote source
 directory, it creates a tree for the binaries with the same structure
 (and using the same names) as the tree under the source directory.  In
-the example, you'd find the Sun 4 library `libiberty.a' in the
-directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
+the example, you'd find the Sun 4 library 'libiberty.a' in the directory
+'gdb-sun4/libiberty', and GDB itself in 'gdb-sun4/gdb'.
 
-   Make sure that your path to the `configure' script has just one
-instance of `gdb' in it.  If your path to `configure' looks like
-`../gdb-7.9.50.20150706-cvs/gdb/configure', you are configuring only
+   Make sure that your path to the 'configure' script has just one
+instance of 'gdb' in it.  If your path to 'configure' looks like
+'../gdb-7.12.50.20170306-git/gdb/configure', you are configuring only
 one subdirectory of GDB, not the whole package.  This leads to build
-errors about missing include files such as `bfd/bfd.h'.
+errors about missing include files such as 'bfd/bfd.h'.
 
    One popular reason to build several GDB configurations in separate
 directories is to configure GDB for cross-compiling (where GDB runs on
 one machine--the "host"--while debugging programs that run on another
 machine--the "target").  You specify a cross-debugging target by giving
-the `--target=TARGET' option to `configure'.
+the '--target=TARGET' option to 'configure'.
 
-   When you run `make' to build a program or library, you must run it
-in a configured directory--whatever directory you were in when you
-called `configure' (or one of its subdirectories).
-
-   The `Makefile' that `configure' generates in each source directory
-also runs recursively.  If you type `make' in a source directory such
-as `gdb-7.9.50.20150706-cvs' (or in a separate configured directory
-configured with `--srcdir=DIRNAME/gdb-7.9.50.20150706-cvs'), you will
+   When you run 'make' to build a program or library, you must run it in
+a configured directory--whatever directory you were in when you called
+'configure' (or one of its subdirectories).
+
+   The 'Makefile' that 'configure' generates in each source directory
+also runs recursively.  If you type 'make' in a source directory such as
+'gdb-7.12.50.20170306-git' (or in a separate configured directory
+configured with '--srcdir=DIRNAME/gdb-7.12.50.20170306-git'), you will
 build all the required libraries, and then build GDB.
 
    When you have multiple hosts or targets configured in separate
-directories, you can run `make' on them in parallel (for example, if
-they are NFS-mounted on each of the hosts); they will not interfere
-with each other.
+directories, you can run 'make' on them in parallel (for example, if
+they are NFS-mounted on each of the hosts); they will not interfere with
+each other.
 
 
 File: gdb.info,  Node: Config Names,  Next: Configure Options,  Prev: Separate Objdir,  Up: Installing GDB
@@ -377,20 +1160,20 @@ File: gdb.info,  Node: Config Names,  Ne
 C.4 Specifying Names for Hosts and Targets
 ==========================================
 
-The specifications used for hosts and targets in the `configure' script
+The specifications used for hosts and targets in the 'configure' script
 are based on a three-part naming scheme, but some short predefined
 aliases are also supported.  The full naming scheme encodes three pieces
 of information in the following pattern:
 
      ARCHITECTURE-VENDOR-OS
 
-   For example, you can use the alias `sun4' as a HOST argument, or as
-the value for TARGET in a `--target=TARGET' option.  The equivalent
-full name is `sparc-sun-sunos4'.
+   For example, you can use the alias 'sun4' as a HOST argument, or as
+the value for TARGET in a '--target=TARGET' option.  The equivalent full
+name is 'sparc-sun-sunos4'.
 
-   The `configure' script accompanying GDB does not provide any query
+   The 'configure' script accompanying GDB does not provide any query
 facility to list all supported host and target names or aliases.
-`configure' calls the Bourne shell script `config.sub' to map
+'configure' calls the Bourne shell script 'config.sub' to map
 abbreviations to full names; you can read the script, if you wish, or
 you can use it to test your guesses on abbreviations--for example:
 
@@ -407,19 +1190,19 @@ you can use it to test your guesses on a
      % sh config.sub i986v
      Invalid configuration `i986v': machine `i986v' not recognized
 
-`config.sub' is also distributed in the GDB source directory
-(`gdb-7.9.50.20150706-cvs', for version 7.9.50.20150706-cvs).
+'config.sub' is also distributed in the GDB source directory
+('gdb-7.12.50.20170306-git', for version 7.12.50.20170306-git).
 
 
 File: gdb.info,  Node: Configure Options,  Next: System-wide configuration,  Prev: Config Names,  Up: Installing GDB
 
-C.5 `configure' Options
+C.5 'configure' Options
 =======================
 
-Here is a summary of the `configure' options and arguments that are
-most often useful for building GDB.  `configure' also has several other
+Here is a summary of the 'configure' options and arguments that are most
+often useful for building GDB.  'configure' also has several other
 options not listed here.  *note (configure.info)What Configure Does::,
-for a full explanation of `configure'.
+for a full explanation of 'configure'.
 
      configure [--help]
                [--prefix=DIR]
@@ -429,36 +1212,36 @@ for a full explanation of `configure'.
                [--target=TARGET]
                HOST
 
-You may introduce options with a single `-' rather than `--' if you
-prefer; but you may abbreviate option names if you use `--'.
+You may introduce options with a single '-' rather than '--' if you
+prefer; but you may abbreviate option names if you use '--'.
 
-`--help'
-     Display a quick summary of how to invoke `configure'.
+'--help'
+     Display a quick summary of how to invoke 'configure'.
 
-`--prefix=DIR'
+'--prefix=DIR'
      Configure the source to install programs and files under directory
-     `DIR'.
+     'DIR'.
 
-`--exec-prefix=DIR'
-     Configure the source to install programs under directory `DIR'.
+'--exec-prefix=DIR'
+     Configure the source to install programs under directory 'DIR'.
 
-`--srcdir=DIRNAME'
-     *Warning: using this option requires GNU `make', or another `make'
-     that implements the `VPATH' feature.*
-     Use this option to make configurations in directories separate
-     from the GDB source directories.  Among other things, you can use
-     this to build (or maintain) several configurations simultaneously,
-     in separate directories.  `configure' writes
-     configuration-specific files in the current directory, but
-     arranges for them to use the source in the directory DIRNAME.
-     `configure' creates directories under the working directory in
-     parallel to the source directories below DIRNAME.
+'--srcdir=DIRNAME'
+     *Warning: using this option requires GNU 'make', or another 'make'
+     that implements the 'VPATH' feature.*
+     Use this option to make configurations in directories separate from
+     the GDB source directories.  Among other things, you can use this
+     to build (or maintain) several configurations simultaneously, in
+     separate directories.  'configure' writes configuration-specific
+     files in the current directory, but arranges for them to use the
+     source in the directory DIRNAME.  'configure' creates directories
+     under the working directory in parallel to the source directories
+     below DIRNAME.
 
-`--norecursion'
-     Configure only the directory level where `configure' is executed;
+'--norecursion'
+     Configure only the directory level where 'configure' is executed;
      do not propagate configuration to subdirectories.
 
-`--target=TARGET'
+'--target=TARGET'
      Configure GDB for cross-debugging programs running on the specified
      TARGET.  Without this option, GDB is configured to debug programs
      that run on the same machine (HOST) as GDB itself.
@@ -466,7 +1249,7 @@ prefer; but you may abbreviate option na
      There is no convenient way to generate a list of all available
      targets.
 
-`HOST ...'
+'HOST ...'
      Configure GDB to run on the specified HOST.
 
      There is no convenient way to generate a list of all available
@@ -481,41 +1264,41 @@ File: gdb.info,  Node: System-wide confi
 C.6 System-wide configuration and settings
 ==========================================
 
-GDB can be configured to have a system-wide init file; this file will
-be read and executed at startup (*note What GDB does during startup:
+GDB can be configured to have a system-wide init file; this file will be
+read and executed at startup (*note What GDB does during startup:
 Startup.).
 
    Here is the corresponding configure option:
 
-`--with-system-gdbinit=FILE'
+'--with-system-gdbinit=FILE'
      Specify that the default location of the system-wide init file is
      FILE.
 
-   If GDB has been configured with the option `--prefix=$prefix', it
-may be subject to relocation.  Two possible cases:
+   If GDB has been configured with the option '--prefix=$prefix', it may
+be subject to relocation.  Two possible cases:
 
-   * If the default location of this init file contains `$prefix', it
+   * If the default location of this init file contains '$prefix', it
      will be subject to relocation.  Suppose that the configure options
-     are `--prefix=$prefix --with-system-gdbinit=$prefix/etc/gdbinit';
-     if GDB is moved from `$prefix' to `$install', the system init file
-     is looked for as `$install/etc/gdbinit' instead of
-     `$prefix/etc/gdbinit'.
+     are '--prefix=$prefix --with-system-gdbinit=$prefix/etc/gdbinit';
+     if GDB is moved from '$prefix' to '$install', the system init file
+     is looked for as '$install/etc/gdbinit' instead of
+     '$prefix/etc/gdbinit'.
 
    * By contrast, if the default location does not contain the prefix,
      it will not be relocated.  E.g. if GDB has been configured with
-     `--prefix=/usr/local --with-system-gdbinit=/usr/share/gdb/gdbinit',
-     then GDB will always look for `/usr/share/gdb/gdbinit', wherever
+     '--prefix=/usr/local --with-system-gdbinit=/usr/share/gdb/gdbinit',
+     then GDB will always look for '/usr/share/gdb/gdbinit', wherever
      GDB is installed.
 
    If the configured location of the system-wide init file (as given by
-the `--with-system-gdbinit' option at configure time) is in the
-data-directory (as specified by `--with-gdb-datadir' at configure time)
+the '--with-system-gdbinit' option at configure time) is in the
+data-directory (as specified by '--with-gdb-datadir' at configure time)
 or in one of its subdirectories, then GDB will look for the system-wide
-init file in the directory specified by the `--data-directory'
+init file in the directory specified by the '--data-directory'
 command-line option.  Note that the system-wide init file is only read
-once, during GDB initialization.  If the data-directory is changed
-after GDB has started with the `set data-directory' command, the file
-will not be reread.
+once, during GDB initialization.  If the data-directory is changed after
+GDB has started with the 'set data-directory' command, the file will not
+be reread.
 
 * Menu:
 
@@ -527,25 +1310,25 @@ File: gdb.info,  Node: System-wide Confi
 C.6.1 Installed System-wide Configuration Scripts
 -------------------------------------------------
 
-The `system-gdbinit' directory, located inside the data-directory (as
-specified by `--with-gdb-datadir' at configure time) contains a number
+The 'system-gdbinit' directory, located inside the data-directory (as
+specified by '--with-gdb-datadir' at configure time) contains a number
 of scripts which can be used as system-wide init files.  To
 automatically source those scripts at startup, GDB should be configured
-with `--with-system-gdbinit'.  Otherwise, any user should be able to
+with '--with-system-gdbinit'.  Otherwise, any user should be able to
 source them by hand as needed.
 
    The following scripts are currently available:
-   * `elinos.py' This script is useful when debugging a program on an
+
+   * 'elinos.py' This script is useful when debugging a program on an
      ELinOS target.  It takes advantage of the environment variables
      defined in a standard ELinOS environment in order to determine the
      location of the system shared libraries, and then sets the
-     `solib-absolute-prefix' and `solib-search-path' variables
+     'solib-absolute-prefix' and 'solib-search-path' variables
      appropriately.
 
-   * `wrs-linux.py' This script is useful when debugging a program on a
-     target running Wind River Linux.  It expects the `ENV_PREFIX' to
-     be set to the host-side sysroot used by the target system.
-
+   * 'wrs-linux.py' This script is useful when debugging a program on a
+     target running Wind River Linux.  It expects the 'ENV_PREFIX' to be
+     set to the host-side sysroot used by the target system.
 
 
 File: gdb.info,  Node: Maintenance Commands,  Next: Remote Protocol,  Prev: Installing GDB,  Up: Top
@@ -553,110 +1336,100 @@ File: gdb.info,  Node: Maintenance Comma
 Appendix D Maintenance Commands
 *******************************
 
-In addition to commands intended for GDB users, GDB includes a number
-of commands intended for GDB developers, that are not documented
-elsewhere in this manual.  These commands are provided here for
-reference.  (For commands that turn on debugging messages, see *note
-Debugging Output::.)
+In addition to commands intended for GDB users, GDB includes a number of
+commands intended for GDB developers, that are not documented elsewhere
+in this manual.  These commands are provided here for reference.  (For
+commands that turn on debugging messages, see *note Debugging Output::.)
 
-`maint agent [-at LOCATION,] EXPRESSION'
-`maint agent-eval [-at LOCATION,] EXPRESSION'
+'maint agent [-at LOCATION,] EXPRESSION'
+'maint agent-eval [-at LOCATION,] EXPRESSION'
      Translate the given EXPRESSION into remote agent bytecodes.  This
      command is useful for debugging the Agent Expression mechanism
-     (*note Agent Expressions::).  The `agent' version produces an
+     (*note Agent Expressions::).  The 'agent' version produces an
      expression useful for data collection, such as by tracepoints,
-     while `maint agent-eval' produces an expression that evaluates
+     while 'maint agent-eval' produces an expression that evaluates
      directly to a result.  For instance, a collection expression for
-     `globa + globb' will include bytecodes to record four bytes of
-     memory at each of the addresses of `globa' and `globb', while
+     'globa + globb' will include bytecodes to record four bytes of
+     memory at each of the addresses of 'globa' and 'globb', while
      discarding the result of the addition, while an evaluation
-     expression will do the addition and return the sum.  If `-at' is
+     expression will do the addition and return the sum.  If '-at' is
      given, generate remote agent bytecode for LOCATION.  If not,
      generate remote agent bytecode for current frame PC address.
 
-`maint agent-printf FORMAT,EXPR,...'
+'maint agent-printf FORMAT,EXPR,...'
      Translate the given format string and list of argument expressions
      into remote agent bytecodes and display them as a disassembled
      list.  This command is useful for debugging the agent version of
      dynamic printf (*note Dynamic Printf::).
 
-`maint info breakpoints'
-     Using the same format as `info breakpoints', display both the
+'maint info breakpoints'
+     Using the same format as 'info breakpoints', display both the
      breakpoints you've set explicitly, and those GDB is using for
      internal purposes.  Internal breakpoints are shown with negative
      breakpoint numbers.  The type column identifies what kind of
      breakpoint is shown:
 
-    `breakpoint'
+     'breakpoint'
           Normal, explicitly set breakpoint.
 
-    `watchpoint'
+     'watchpoint'
           Normal, explicitly set watchpoint.
 
-    `longjmp'
+     'longjmp'
           Internal breakpoint, used to handle correctly stepping through
-          `longjmp' calls.
+          'longjmp' calls.
 
-    `longjmp resume'
-          Internal breakpoint at the target of a `longjmp'.
+     'longjmp resume'
+          Internal breakpoint at the target of a 'longjmp'.
 
-    `until'
-          Temporary internal breakpoint used by the GDB `until' command.
+     'until'
+          Temporary internal breakpoint used by the GDB 'until' command.
 
-    `finish'
-          Temporary internal breakpoint used by the GDB `finish'
+     'finish'
+          Temporary internal breakpoint used by the GDB 'finish'
           command.
 
-    `shlib events'
+     'shlib events'
           Shared library events.
 
-
-`maint info bfds'
-     This prints information about each `bfd' object that is known to
-     GDB.  *Note BFD: (bfd)Top.
-
-`maint info btrace'
+'maint info btrace'
      Pint information about raw branch tracing data.
 
-`maint btrace packet-history'
+'maint btrace packet-history'
      Print the raw branch trace packets that are used to compute the
-     execution history for the `record btrace' command.  Both the
+     execution history for the 'record btrace' command.  Both the
      information and the format in which it is printed depend on the
      btrace recording format.
 
-    `bts'
+     'bts'
           For the BTS recording format, print a list of blocks of
-          sequential code.  For each block, the following information
-          is printed:
+          sequential code.  For each block, the following information is
+          printed:
 
-         Block number
+          Block number
                Newer blocks have higher numbers.  The oldest block has
                number zero.
+          Lowest 'PC'
+          Highest 'PC'
 
-         Lowest `PC'
-
-         Highest `PC'
-
-    `pt'
-          For the Intel(R) Processor Trace recording format, print a
-          list of Intel(R) Processor Trace packets.  For each packet,
-          the following information is printed:
+     'pt'
+          For the Intel Processor Trace recording format, print a list
+          of Intel Processor Trace packets.  For each packet, the
+          following information is printed:
 
-         Packet number
-               Newer packets have higher numbers.  The oldest packet
-               has number zero.
-
-         Trace offset
+          Packet number
+               Newer packets have higher numbers.  The oldest packet has
+               number zero.
+          Trace offset
                The packet's offset in the trace stream.
+          Packet opcode and payload
 
-         Packet opcode and payload
-
-`maint btrace clear-packet-history'
-     Discards the cached packet history printed by the `maint btrace
+'maint btrace clear-packet-history'
+     Discards the cached packet history printed by the 'maint btrace
      packet-history' command.  The history will be computed again when
      needed.
 
-`maint btrace clear'
+'maint btrace clear'
      Discard the branch trace data.  The data will be fetched anew and
      the branch trace will be recomputed when needed.
 
@@ -664,14 +1437,13 @@ Debugging Output::.)
      buffer.  When updating branch trace incrementally, the branch trace
      available to GDB may be bigger than a single branch trace buffer.
 
-`maint set btrace pt skip-pad'
-
-`maint show btrace pt skip-pad'
-     Control whether GDB will skip PAD packets when computing the
-     packet history.
+'maint set btrace pt skip-pad'
+'maint show btrace pt skip-pad'
+     Control whether GDB will skip PAD packets when computing the packet
+     history.
 
-`set displaced-stepping'
-`show displaced-stepping'
+'set displaced-stepping'
+'show displaced-stepping'
      Control whether or not GDB will do "displaced stepping" if the
      target supports it.  Displaced stepping is a way to single-step
      over breakpoints without removing them from the inferior, by
@@ -679,72 +1451,73 @@ Debugging Output::.)
      originally at the breakpoint location.  It is also known as
      out-of-line single-stepping.
 
-    `set displaced-stepping on'
-          If the target architecture supports it, GDB will use
-          displaced stepping to step over breakpoints.
+     'set displaced-stepping on'
+          If the target architecture supports it, GDB will use displaced
+          stepping to step over breakpoints.
 
-    `set displaced-stepping off'
+     'set displaced-stepping off'
           GDB will not use displaced stepping to step over breakpoints,
           even if such is supported by the target architecture.
 
-    `set displaced-stepping auto'
+     'set displaced-stepping auto'
           This is the default mode.  GDB will use displaced stepping
           only if non-stop mode is active (*note Non-Stop Mode::) and
           the target architecture supports displaced stepping.
 
-`maint check-psymtabs'
+'maint check-psymtabs'
      Check the consistency of currently expanded psymtabs versus
      symtabs.  Use this to check, for example, whether a symbol is in
      one but not the other.
 
-`maint check-symtabs'
+'maint check-symtabs'
      Check the consistency of currently expanded symtabs.
 
-`maint expand-symtabs [REGEXP]'
+'maint expand-symtabs [REGEXP]'
      Expand symbol tables.  If REGEXP is specified, only expand symbol
      tables for file names matching REGEXP.
 
-`maint set catch-demangler-crashes [on|off]'
-`maint show catch-demangler-crashes'
+'maint set catch-demangler-crashes [on|off]'
+'maint show catch-demangler-crashes'
      Control whether GDB should attempt to catch crashes in the symbol
      name demangler.  The default is to attempt to catch crashes.  If
      enabled, the first time a crash is caught, a core file is created,
      the offending symbol is displayed and the user is presented with
      the option to terminate the current session.
 
-`maint cplus first_component NAME'
+'maint cplus first_component NAME'
      Print the first C++ class/namespace component of NAME.
 
-`maint cplus namespace'
+'maint cplus namespace'
      Print the list of possible C++ namespaces.
 
-`maint deprecate COMMAND [REPLACEMENT]'
-`maint undeprecate COMMAND'
+'maint deprecate COMMAND [REPLACEMENT]'
+'maint undeprecate COMMAND'
      Deprecate or undeprecate the named COMMAND.  Deprecated commands
      cause GDB to issue a warning when you use them.  The optional
      argument REPLACEMENT says which newer command should be used in
      favor of the deprecated one; if it is given, GDB will mention the
      replacement as part of the warning.
 
-`maint dump-me'
+'maint dump-me'
      Cause a fatal signal in the debugger and force it to dump its core.
      This is supported only on systems which support aborting a program
-     with the `SIGQUIT' signal.
+     with the 'SIGQUIT' signal.
 
-`maint internal-error [MESSAGE-TEXT]'
-`maint internal-warning [MESSAGE-TEXT]'
-`maint demangler-warning [MESSAGE-TEXT]'
-     Cause GDB to call the internal function `internal_error',
-     `internal_warning' or `demangler_warning' and hence behave as
+'maint internal-error [MESSAGE-TEXT]'
+'maint internal-warning [MESSAGE-TEXT]'
+'maint demangler-warning [MESSAGE-TEXT]'
+
+     Cause GDB to call the internal function 'internal_error',
+     'internal_warning' or 'demangler_warning' and hence behave as
      though an internal problem has been detected.  In addition to
      reporting the internal problem, these functions give the user the
-     opportunity to either quit GDB or (for `internal_error' and
-     `internal_warning') create a core file of the current GDB session.
+     opportunity to either quit GDB or (for 'internal_error' and
+     'internal_warning') create a core file of the current GDB session.
 
-     These commands take an optional parameter MESSAGE-TEXT that is
-     used as the text of the error or warning message.
+     These commands take an optional parameter MESSAGE-TEXT that is used
+     as the text of the error or warning message.
 
-     Here's an example of using `internal-error':
+     Here's an example of using 'internal-error':
 
           (gdb) maint internal-error testing, 1, 2
           .../maint.c:121: internal-error: testing, 1, 2
@@ -754,45 +1527,45 @@ Debugging Output::.)
           Create a core file? (y or n) n
           (gdb)
 
-`maint set internal-error ACTION [ask|yes|no]'
-`maint show internal-error ACTION'
-`maint set internal-warning ACTION [ask|yes|no]'
-`maint show internal-warning ACTION'
-`maint set demangler-warning ACTION [ask|yes|no]'
-`maint show demangler-warning ACTION'
+'maint set internal-error ACTION [ask|yes|no]'
+'maint show internal-error ACTION'
+'maint set internal-warning ACTION [ask|yes|no]'
+'maint show internal-warning ACTION'
+'maint set demangler-warning ACTION [ask|yes|no]'
+'maint show demangler-warning ACTION'
      When GDB reports an internal problem (error or warning) it gives
-     the user the opportunity to both quit GDB and create a core file
-     of the current GDB session.  These commands let you override the
+     the user the opportunity to both quit GDB and create a core file of
+     the current GDB session.  These commands let you override the
      default behaviour for each particular ACTION, described in the
      table below.
 
-    `quit'
+     'quit'
           You can specify that GDB should always (yes) or never (no)
           quit.  The default is to ask the user what to do.
 
-    `corefile'
+     'corefile'
           You can specify that GDB should always (yes) or never (no)
           create a core file.  The default is to ask the user what to
-          do.  Note that there is no `corefile' option for
-          `demangler-warning': demangler warnings always create a core
+          do.  Note that there is no 'corefile' option for
+          'demangler-warning': demangler warnings always create a core
           file and this cannot be disabled.
 
-`maint packet TEXT'
-     If GDB is talking to an inferior via the serial protocol, then
-     this command sends the string TEXT to the inferior, and displays
-     the response packet.  GDB supplies the initial `$' character, the
-     terminating `#' character, and the checksum.
+'maint packet TEXT'
+     If GDB is talking to an inferior via the serial protocol, then this
+     command sends the string TEXT to the inferior, and displays the
+     response packet.  GDB supplies the initial '$' character, the
+     terminating '#' character, and the checksum.
 
-`maint print architecture [FILE]'
+'maint print architecture [FILE]'
      Print the entire architecture configuration.  The optional argument
      FILE names the file where the output goes.
 
-`maint print c-tdesc'
+'maint print c-tdesc'
      Print the current target description (*note Target Descriptions::)
      as a C source file.  The created source file can be used in GDB
      when an XML parser is not available to parse the description.
 
-`maint print dummy-frames'
+'maint print dummy-frames'
      Prints the contents of GDB's internal dummy-frame stack.
 
           (gdb) b add
@@ -808,26 +1581,26 @@ Debugging Output::.)
 
      Takes an optional file parameter.
 
-`maint print registers [FILE]'
-`maint print raw-registers [FILE]'
-`maint print cooked-registers [FILE]'
-`maint print register-groups [FILE]'
-`maint print remote-registers [FILE]'
+'maint print registers [FILE]'
+'maint print raw-registers [FILE]'
+'maint print cooked-registers [FILE]'
+'maint print register-groups [FILE]'
+'maint print remote-registers [FILE]'
      Print GDB's internal register data structures.
 
-     The command `maint print raw-registers' includes the contents of
-     the raw register cache; the command `maint print cooked-registers'
+     The command 'maint print raw-registers' includes the contents of
+     the raw register cache; the command 'maint print cooked-registers'
      includes the (cooked) value of all registers, including registers
      which aren't available on the target nor visible to user; the
-     command `maint print register-groups' includes the groups that
-     each register is a member of; and the command `maint print
-     remote-registers' includes the remote target's register numbers
-     and offsets in the `G' packets.
+     command 'maint print register-groups' includes the groups that each
+     register is a member of; and the command 'maint print
+     remote-registers' includes the remote target's register numbers and
+     offsets in the 'G' packets.
 
      These commands take an optional parameter, a file name to which to
      write the information.
 
-`maint print reggroups [FILE]'
+'maint print reggroups [FILE]'
      Print GDB's internal register group data structures.  The optional
      argument FILE tells to what file to write the information.
 
@@ -843,49 +1616,49 @@ Debugging Output::.)
            save       internal
            restore    internal
 
-`flushregs'
+'flushregs'
      This command forces GDB to flush its internal register cache.
 
-`maint print objfiles [REGEXP]'
+'maint print objfiles [REGEXP]'
      Print a dump of all known object files.  If REGEXP is specified,
      only print object files whose names match REGEXP.  For each object
      file, this command prints its name, address in memory, and all of
      its psymtabs and symtabs.
 
-`maint print user-registers'
+'maint print user-registers'
      List all currently available "user registers".  User registers
      typically provide alternate names for actual hardware registers.
-     They include the four "standard" registers `$fp', `$pc', `$sp',
-     and `$ps'.  *Note standard registers::.  User registers can be
-     used in expressions in the same way as the canonical register
-     names, but only the latter are listed by the `info registers' and
-     `maint print registers' commands.
+     They include the four "standard" registers '$fp', '$pc', '$sp', and
+     '$ps'.  *Note standard registers::.  User registers can be used in
+     expressions in the same way as the canonical register names, but
+     only the latter are listed by the 'info registers' and 'maint print
+     registers' commands.
 
-`maint print section-scripts [REGEXP]'
-     Print a dump of scripts specified in the `.debug_gdb_section'
+'maint print section-scripts [REGEXP]'
+     Print a dump of scripts specified in the '.debug_gdb_section'
      section.  If REGEXP is specified, only print scripts loaded by
-     object files matching REGEXP.  For each script, this command
-     prints its name as specified in the objfile, and the full path if
-     known.  *Note dotdebug_gdb_scripts section::.
+     object files matching REGEXP.  For each script, this command prints
+     its name as specified in the objfile, and the full path if known.
+     *Note dotdebug_gdb_scripts section::.
 
-`maint print statistics'
+'maint print statistics'
      This command prints, for each object file in the program, various
      data about that object file followed by the byte cache ("bcache")
      statistics for the object file.  The objfile data includes the
      number of minimal, partial, full, and stabs symbols, the number of
      types defined by the objfile, the number of as yet unexpanded psym
-     tables, the number of line tables and string tables, and the
-     amount of memory used by the various tables.  The bcache
-     statistics include the counts, sizes, and counts of duplicates of
-     all and unique objects, max, average, and median entry size, total
-     memory used and its overhead and savings, and various measures of
-     the hash table size and chain lengths.
+     tables, the number of line tables and string tables, and the amount
+     of memory used by the various tables.  The bcache statistics
+     include the counts, sizes, and counts of duplicates of all and
+     unique objects, max, average, and median entry size, total memory
+     used and its overhead and savings, and various measures of the hash
+     table size and chain lengths.
 
-`maint print target-stack'
+'maint print target-stack'
      A "target" is an interface between the debugger and a particular
      kind of file or process.  Targets can be stacked in "strata", so
-     that more than one target can potentially respond to a request.
-     In particular, memory accesses will walk down the stack of targets
+     that more than one target can potentially respond to a request.  In
+     particular, memory accesses will walk down the stack of targets
      until they find a target that is interested in handling that
      particular address.
 
@@ -893,24 +1666,26 @@ Debugging Output::.)
      pushed on the "target stack", starting from the top layer down to
      the bottom one.
 
-`maint print type EXPR'
+'maint print type EXPR'
      Print the type chain for a type specified by EXPR.  The argument
-     can be either a type name or a symbol.  If it is a symbol, the
-     type of that symbol is described.  The type chain produced by this
+     can be either a type name or a symbol.  If it is a symbol, the type
+     of that symbol is described.  The type chain produced by this
      command is a recursive definition of the data type as stored in
      GDB's data structures, including its flags and contained types.
 
-`maint set dwarf always-disassemble'
+     Run any self tests that were compiled in to GDB.  This will print a
+     message showing how many tests were run, and how many failed.
 
-`maint show dwarf always-disassemble'
-     Control the behavior of `info address' when using DWARF debugging
+'maint set dwarf always-disassemble'
+'maint show dwarf always-disassemble'
+     Control the behavior of 'info address' when using DWARF debugging
      information.
 
-     The default is `off', which means that GDB should try to describe
-     a variable's location in an easily readable format.  When `on',
-     GDB will instead display the DWARF location expression in an
-     assembly-like format.  Note that some locations are too complex
-     for GDB to describe simply; in this case you will always see the
+     The default is 'off', which means that GDB should try to describe a
+     variable's location in an easily readable format.  When 'on', GDB
+     will instead display the DWARF location expression in an
+     assembly-like format.  Note that some locations are too complex for
+     GDB to describe simply; in this case you will always see the
      disassembly form.
 
      Here is an example of the resulting disassembly:
@@ -922,12 +1697,12 @@ Debugging Output::.)
      For more information on these expressions, see the DWARF standard
      (http://www.dwarfstd.org/).
 
-`maint set dwarf max-cache-age'
-`maint show dwarf max-cache-age'
+'maint set dwarf max-cache-age'
+'maint show dwarf max-cache-age'
      Control the DWARF compilation unit cache.
 
      In object files with inter-compilation-unit references, such as
-     those produced by the GCC option `-feliminate-dwarf2-dups', the
+     those produced by the GCC option '-feliminate-dwarf2-dups', the
      DWARF reader needs to frequently refer to previously read
      compilation units.  This setting controls how long a compilation
      unit will remain in the cache if it is not referenced.  A higher
@@ -936,97 +1711,116 @@ Debugging Output::.)
      disables caching, which will slow down GDB startup, but reduce
      memory consumption.
 
-`maint set profile'
-`maint show profile'
+'maint set profile'
+'maint show profile'
      Control profiling of GDB.
 
-     Profiling will be disabled until you use the `maint set profile'
+     Profiling will be disabled until you use the 'maint set profile'
      command to enable it.  When you enable profiling, the system will
      begin collecting timing and execution count data; when you disable
      profiling or exit GDB, the results will be written to a log file.
      Remember that if you use profiling, GDB will overwrite the
-     profiling log file (often called `gmon.out').  If you have a
-     record of important profiling data in a `gmon.out' file, be sure
-     to move it to a safe location.
+     profiling log file (often called 'gmon.out').  If you have a record
+     of important profiling data in a 'gmon.out' file, be sure to move
+     it to a safe location.
 
-     Configuring with `--enable-profiling' arranges for GDB to be
-     compiled with the `-pg' compiler option.
+     Configuring with '--enable-profiling' arranges for GDB to be
+     compiled with the '-pg' compiler option.
 
-`maint set show-debug-regs'
-`maint show show-debug-regs'
+'maint set show-debug-regs'
+'maint show show-debug-regs'
      Control whether to show variables that mirror the hardware debug
-     registers.  Use `on' to enable, `off' to disable.  If enabled, the
+     registers.  Use 'on' to enable, 'off' to disable.  If enabled, the
      debug registers values are shown when GDB inserts or removes a
-     hardware breakpoint or watchpoint, and when the inferior triggers
-     a hardware-assisted breakpoint or watchpoint.
+     hardware breakpoint or watchpoint, and when the inferior triggers a
+     hardware-assisted breakpoint or watchpoint.
 
-`maint set show-all-tib'
-`maint show show-all-tib'
+'maint set show-all-tib'
+'maint show show-all-tib'
      Control whether to show all non zero areas within a 1k block
-     starting at thread local base, when using the `info w32
+     starting at thread local base, when using the 'info w32
      thread-information-block' command.
 
-`maint set target-async'
-`maint show target-async'
+'maint set target-async'
+'maint show target-async'
      This controls whether GDB targets operate in synchronous or
      asynchronous mode (*note Background Execution::).  Normally the
      default is asynchronous, if it is available; but this can be
-     changed to more easily debug problems occurring only in
-     synchronous mode.
+     changed to more easily debug problems occurring only in synchronous
+     mode.
+
+'maint set target-non-stop'
+'maint show target-non-stop'
+
+     This controls whether GDB targets always operate in non-stop mode
+     even if 'set non-stop' is 'off' (*note Non-Stop Mode::).  The
+     default is 'auto', meaning non-stop mode is enabled if supported by
+     the target.
+
+     'maint set target-non-stop auto'
+          This is the default mode.  GDB controls the target in non-stop
+          mode if the target supports it.
 
-`maint set per-command'
-`maint show per-command'
-     GDB can display the resources used by each command.  This is
-     useful in debugging performance problems.
+     'maint set target-non-stop on'
+          GDB controls the target in non-stop mode even if the target
+          does not indicate support.
 
-    `maint set per-command space [on|off]'
-    `maint show per-command space'
+     'maint set target-non-stop off'
+          GDB does not control the target in non-stop mode even if the
+          target supports it.
+
+'maint set per-command'
+'maint show per-command'
+
+     GDB can display the resources used by each command.  This is useful
+     in debugging performance problems.
+
+     'maint set per-command space [on|off]'
+     'maint show per-command space'
           Enable or disable the printing of the memory used by GDB for
           each command.  If enabled, GDB will display how much memory
           each command took, following the command's own output.  This
-          can also be requested by invoking GDB with the `--statistics'
+          can also be requested by invoking GDB with the '--statistics'
           command-line switch (*note Mode Options::).
 
-    `maint set per-command time [on|off]'
-    `maint show per-command time'
+     'maint set per-command time [on|off]'
+     'maint show per-command time'
           Enable or disable the printing of the execution time of GDB
           for each command.  If enabled, GDB will display how much time
           it took to execute each command, following the command's own
           output.  Both CPU time and wallclock time are printed.
           Printing both is useful when trying to determine whether the
-          cost is CPU or, e.g., disk/network latency.  Note that the
-          CPU time printed is for GDB only, it does not include the
+          cost is CPU or, e.g., disk/network latency.  Note that the CPU
+          time printed is for GDB only, it does not include the
           execution time of the inferior because there's no mechanism
           currently to compute how much time was spent by GDB and how
           much time was spent by the program been debugged.  This can
-          also be requested by invoking GDB with the `--statistics'
+          also be requested by invoking GDB with the '--statistics'
           command-line switch (*note Mode Options::).
 
-    `maint set per-command symtab [on|off]'
-    `maint show per-command symtab'
+     'maint set per-command symtab [on|off]'
+     'maint show per-command symtab'
           Enable or disable the printing of basic symbol table
-          statistics for each command.  If enabled, GDB will display
-          the following information:
+          statistics for each command.  If enabled, GDB will display the
+          following information:
 
             a. number of symbol tables
-
             b. number of primary symbol tables
-
             c. number of blocks in the blockvector
 
-`maint space VALUE'
-     An alias for `maint set per-command space'.  A non-zero value
+'maint space VALUE'
+     An alias for 'maint set per-command space'.  A non-zero value
      enables it, zero disables it.
 
-`maint time VALUE'
-     An alias for `maint set per-command time'.  A non-zero value
+'maint time VALUE'
+     An alias for 'maint set per-command time'.  A non-zero value
      enables it, zero disables it.
 
-`maint translate-address [SECTION] ADDR'
+'maint translate-address [SECTION] ADDR'
      Find the symbol stored at the location specified by the address
      ADDR and an optional section name SECTION.  If found, GDB prints
      the name of the closest symbol and an offset from the symbol's
-     location to the specified address.  This is similar to the `info
+     location to the specified address.  This is similar to the 'info
      address' command (*note Symbols::), except that this command also
      allows to find symbols in other sections.
 
@@ -1035,16 +1829,15 @@ Debugging Output::.)
      name of executable or shared library containing the symbol is
      printed as well.
 
-
    The following command is useful for non-interactive invocations of
 GDB, such as in the test suite.
 
-`set watchdog NSEC'
+'set watchdog NSEC'
      Set the maximum number of seconds GDB will wait for the target
      operation to finish.  If this time expires, GDB reports and error
      and the command is aborted.
 
-`show watchdog'
+'show watchdog'
      Show the current setting of the target wait timeout.
 
 
@@ -1087,102 +1880,102 @@ protocol--for example, if there is only 
 machine, you might want your program to do something special if it
 recognizes a packet meant for GDB.
 
-   In the examples below, `->' and `<-' are used to indicate
-transmitted and received data, respectively.
+   In the examples below, '->' and '<-' are used to indicate transmitted
+and received data, respectively.
 
    All GDB commands and responses (other than acknowledgments and
 notifications, see *note Notification Packets::) are sent as a PACKET.
-A PACKET is introduced with the character `$', the actual PACKET-DATA,
-and the terminating character `#' followed by a two-digit CHECKSUM:
+A PACKET is introduced with the character '$', the actual PACKET-DATA,
+and the terminating character '#' followed by a two-digit CHECKSUM:
 
-     `$'PACKET-DATA`#'CHECKSUM
-   The two-digit CHECKSUM is computed as the modulo 256 sum of all
-characters between the leading `$' and the trailing `#' (an eight bit
+     $PACKET-DATA#CHECKSUM
+
+The two-digit CHECKSUM is computed as the modulo 256 sum of all
+characters between the leading '$' and the trailing '#' (an eight bit
 unsigned checksum).
 
    Implementors should note that prior to GDB 5.0 the protocol
 specification also included an optional two-digit SEQUENCE-ID:
 
-     `$'SEQUENCE-ID`:'PACKET-DATA`#'CHECKSUM
+     $SEQUENCE-ID:PACKET-DATA#CHECKSUM
 
 That SEQUENCE-ID was appended to the acknowledgment.  GDB has never
-output SEQUENCE-IDs.  Stubs that handle packets added since GDB 5.0
-must not accept SEQUENCE-ID.
+output SEQUENCE-IDs.  Stubs that handle packets added since GDB 5.0 must
+not accept SEQUENCE-ID.
 
    When either the host or the target machine receives a packet, the
-first response expected is an acknowledgment: either `+' (to indicate
-the package was received correctly) or `-' (to request retransmission):
+first response expected is an acknowledgment: either '+' (to indicate
+the package was received correctly) or '-' (to request retransmission):
+
+     -> $PACKET-DATA#CHECKSUM
+     <- +
 
-     -> `$'PACKET-DATA`#'CHECKSUM
-     <- `+'
-   The `+'/`-' acknowledgments can be disabled once a connection is
+   The '+'/'-' acknowledgments can be disabled once a connection is
 established.  *Note Packet Acknowledgment::, for details.
 
    The host (GDB) sends COMMANDs, and the target (the debugging stub
-incorporated in your program) sends a RESPONSE.  In the case of step
-and continue COMMANDs, the response is only sent when the operation has
+incorporated in your program) sends a RESPONSE.  In the case of step and
+continue COMMANDs, the response is only sent when the operation has
 completed, and the target has again stopped all threads in all attached
 processes.  This is the default all-stop mode behavior, but the remote
 protocol also supports GDB's non-stop execution mode; see *note Remote
 Non-Stop::, for details.
 
    PACKET-DATA consists of a sequence of characters with the exception
-of `#' and `$' (see `X' packet for additional exceptions).
+of '#' and '$' (see 'X' packet for additional exceptions).
 
-   Fields within the packet should be separated using `,' `;' or `:'.
+   Fields within the packet should be separated using ',' ';' or ':'.
 Except where otherwise noted all numbers are represented in HEX with
 leading zeros suppressed.
 
-   Implementors should note that prior to GDB 5.0, the character `:'
+   Implementors should note that prior to GDB 5.0, the character ':'
 could not appear as the third character in a packet (as it would
 potentially conflict with the SEQUENCE-ID).
 
    Binary data in most packets is encoded either as two hexadecimal
 digits per byte of binary data.  This allowed the traditional remote
-protocol to work over connections which were only seven-bit clean.
-Some packets designed more recently assume an eight-bit clean
-connection, and use a more efficient encoding to send and receive
-binary data.
+protocol to work over connections which were only seven-bit clean.  Some
+packets designed more recently assume an eight-bit clean connection, and
+use a more efficient encoding to send and receive binary data.
 
-   The binary data representation uses `7d' (ASCII `}') as an escape
+   The binary data representation uses '7d' (ASCII '}') as an escape
 character.  Any escaped byte is transmitted as the escape character
-followed by the original character XORed with `0x20'.  For example, the
-byte `0x7d' would be transmitted as the two bytes `0x7d 0x5d'.  The
-bytes `0x23' (ASCII `#'), `0x24' (ASCII `$'), and `0x7d' (ASCII `}')
+followed by the original character XORed with '0x20'.  For example, the
+byte '0x7d' would be transmitted as the two bytes '0x7d 0x5d'.  The
+bytes '0x23' (ASCII '#'), '0x24' (ASCII '$'), and '0x7d' (ASCII '}')
 must always be escaped.  Responses sent by the stub must also escape
-`0x2a' (ASCII `*'), so that it is not interpreted as the start of a
+'0x2a' (ASCII '*'), so that it is not interpreted as the start of a
 run-length encoded sequence (described next).
 
    Response DATA can be run-length encoded to save space.  Run-length
 encoding replaces runs of identical characters with one instance of the
-repeated character, followed by a `*' and a repeat count.  The repeat
+repeated character, followed by a '*' and a repeat count.  The repeat
 count is itself sent encoded, to avoid binary characters in DATA: a
-value of N is sent as `N+29'.  For a repeat count greater or equal to
-3, this produces a printable ASCII character, e.g. a space (ASCII code
-32) for a repeat count of 3.  (This is because run-length encoding
-starts to win for counts 3 or more.)  Thus, for example, `0* ' is a
-run-length encoding of "0000": the space character after `*' means
-repeat the leading `0' `32 - 29 = 3' more times.
-
-   The printable characters `#' and `$' or with a numeric value greater
-than 126 must not be used.  Runs of six repeats (`#') or seven repeats
-(`$') can be expanded using a repeat count of only five (`"').  For
-example, `00000000' can be encoded as `0*"00'.
+value of N is sent as 'N+29'.  For a repeat count greater or equal to 3,
+this produces a printable ASCII character, e.g. a space (ASCII code 32)
+for a repeat count of 3.  (This is because run-length encoding starts to
+win for counts 3 or more.)  Thus, for example, '0* ' is a run-length
+encoding of "0000": the space character after '*' means repeat the
+leading '0' '32 - 29 = 3' more times.
+
+   The printable characters '#' and '$' or with a numeric value greater
+than 126 must not be used.  Runs of six repeats ('#') or seven repeats
+('$') can be expanded using a repeat count of only five ('"').  For
+example, '00000000' can be encoded as '0*"00'.
 
    The error response returned for some packets includes a two character
 error number.  That number is not well defined.
 
-   For any COMMAND not supported by the stub, an empty response
-(`$#00') should be returned.  That way it is possible to extend the
-protocol.  A newer GDB can tell if a packet is supported based on that
-response.
+   For any COMMAND not supported by the stub, an empty response ('$#00')
+should be returned.  That way it is possible to extend the protocol.  A
+newer GDB can tell if a packet is supported based on that response.
 
-   At a minimum, a stub is required to support the `g' and `G' commands
-for register access, and the `m' and `M' commands for memory access.
+   At a minimum, a stub is required to support the 'g' and 'G' commands
+for register access, and the 'm' and 'M' commands for memory access.
 Stubs that only control single-threaded targets can implement run
-control with the `c' (continue), and `s' (step) commands.  Stubs that
-support multi-threading targets should support the `vCont' command.
-All other commands are optional.
+control with the 'c' (continue), and 's' (step) commands.  Stubs that
+support multi-threading targets should support the 'vCont' command.  All
+other commands are optional.
 
 
 File: gdb.info,  Node: Packets,  Next: Stop Reply Packets,  Prev: Overview,  Up: Remote Protocol
@@ -1199,68 +1992,67 @@ remote protocol.
 syntax, followed by an explanation of the packet's meaning.  We include
 spaces in some of the templates for clarity; these are not part of the
 packet's syntax.  No GDB packet uses spaces to separate its components.
-For example, a template like `foo BAR BAZ' describes a packet beginning
-with the three ASCII bytes `foo', followed by a BAR, followed directly
-by a BAZ.  GDB does not transmit a space character between the `foo'
-and the BAR, or between the BAR and the BAZ.
+For example, a template like 'foo BAR BAZ' describes a packet beginning
+with the three ASCII bytes 'foo', followed by a BAR, followed directly
+by a BAZ.  GDB does not transmit a space character between the 'foo' and
+the BAR, or between the BAR and the BAZ.
 
    Several packets and replies include a THREAD-ID field to identify a
 thread.  Normally these are positive numbers with a target-specific
 interpretation, formatted as big-endian hex strings.  A THREAD-ID can
-also be a literal `-1' to indicate all threads, or `0' to pick any
+also be a literal '-1' to indicate all threads, or '0' to pick any
 thread.
 
    In addition, the remote protocol supports a multiprocess feature in
 which the THREAD-ID syntax is extended to optionally include both
-process and thread ID fields, as `pPID.TID'.  The PID (process) and TID
+process and thread ID fields, as 'pPID.TID'.  The PID (process) and TID
 (thread) components each have the format described above: a positive
-number with target-specific interpretation formatted as a big-endian
-hex string, literal `-1' to indicate all processes or threads
-(respectively), or `0' to indicate an arbitrary process or thread.
-Specifying just a process, as `pPID', is equivalent to `pPID.-1'.  It
-is an error to specify all processes but a specific thread, such as
-`p-1.TID'.  Note that the `p' prefix is _not_ used for those packets
-and replies explicitly documented to include a process ID, rather than
-a THREAD-ID.
+number with target-specific interpretation formatted as a big-endian hex
+string, literal '-1' to indicate all processes or threads
+(respectively), or '0' to indicate an arbitrary process or thread.
+Specifying just a process, as 'pPID', is equivalent to 'pPID.-1'.  It is
+an error to specify all processes but a specific thread, such as
+'p-1.TID'.  Note that the 'p' prefix is _not_ used for those packets and
+replies explicitly documented to include a process ID, rather than a
+THREAD-ID.
 
    The multiprocess THREAD-ID syntax extensions are only used if both
-GDB and the stub report support for the `multiprocess' feature using
-`qSupported'.  *Note multiprocess extensions::, for more information.
+GDB and the stub report support for the 'multiprocess' feature using
+'qSupported'.  *Note multiprocess extensions::, for more information.
 
    Note that all packet forms beginning with an upper- or lower-case
 letter, other than those described here, are reserved for future use.
 
    Here are the packet descriptions.
 
-`!'
+'!'
      Enable extended mode.  In extended mode, the remote server is made
-     persistent.  The `R' packet is used to restart the program being
+     persistent.  The 'R' packet is used to restart the program being
      debugged.
 
      Reply:
-    `OK'
+     'OK'
           The remote target both supports and has enabled extended mode.
 
-`?'
+'?'
      Indicate the reason the target halted.  The reply is the same as
      for step and continue.  This packet has a special interpretation
      when the target is in non-stop mode; see *note Remote Non-Stop::.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`A ARGLEN,ARGNUM,ARG,...'
-     Initialized `argv[]' array passed into program. ARGLEN specifies
+'A ARGLEN,ARGNUM,ARG,...'
+     Initialized 'argv[]' array passed into program.  ARGLEN specifies
      the number of bytes in the hex encoded byte stream ARG.  See
-     `gdbserver' for more details.
+     'gdbserver' for more details.
 
      Reply:
-    `OK'
+     'OK'
           The arguments were set.
-
-    `E NN'
+     'E NN'
           An error occurred.
 
-`b BAUD'
+'b BAUD'
      (Don't use this packet; its behavior is not well-defined.)  Change
      the serial line speed to BAUD.
 
@@ -1271,57 +2063,57 @@ letter, other than those described here,
 
      Stan: _If people really wanted to add something like this, and get
      it working for the first time, they ought to modify ser-unix.c to
-     send some kind of out-of-band message to a specially-setup stub
-     and have the switch happen "in between" packets, so that from
-     remote protocol's point of view, nothing actually happened._
+     send some kind of out-of-band message to a specially-setup stub and
+     have the switch happen "in between" packets, so that from remote
+     protocol's point of view, nothing actually happened._
 
-`B ADDR,MODE'
-     Set (MODE is `S') or clear (MODE is `C') a breakpoint at ADDR.
+'B ADDR,MODE'
+     Set (MODE is 'S') or clear (MODE is 'C') a breakpoint at ADDR.
 
-     Don't use this packet.  Use the `Z' and `z' packets instead (*note
+     Don't use this packet.  Use the 'Z' and 'z' packets instead (*note
      insert breakpoint or watchpoint packet::).
 
-`bc'
+'bc'
      Backward continue.  Execute the target system in reverse.  No
      parameter.  *Note Reverse Execution::, for more information.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`bs'
+'bs'
      Backward single step.  Execute one instruction in reverse.  No
      parameter.  *Note Reverse Execution::, for more information.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`c [ADDR]'
+'c [ADDR]'
      Continue at ADDR, which is the address to resume.  If ADDR is
      omitted, resume at current address.
 
-     This packet is deprecated for multi-threading support.  *Note
-     vCont packet::.
+     This packet is deprecated for multi-threading support.  *Note vCont
+     packet::.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`C SIG[;ADDR]'
-     Continue with signal SIG (hex signal number).  If `;ADDR' is
+'C SIG[;ADDR]'
+     Continue with signal SIG (hex signal number).  If ';ADDR' is
      omitted, resume at same address.
 
-     This packet is deprecated for multi-threading support.  *Note
-     vCont packet::.
+     This packet is deprecated for multi-threading support.  *Note vCont
+     packet::.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`d'
+'d'
      Toggle debug flag.
 
      Don't use this packet; instead, define a general set packet (*note
      General Query Packets::).
 
-`D'
-`D;PID'
+'D'
+'D;PID'
      The first form of the packet is used to detach GDB from the remote
-     system.  It is sent to the remote target before GDB disconnects
-     via the `detach' command.
+     system.  It is sent to the remote target before GDB disconnects via
+     the 'detach' command.
 
      The second form, including a process ID, is used when multiprocess
      protocol extensions are enabled (*note multiprocess extensions::),
@@ -1329,88 +2121,84 @@ letter, other than those described here,
      big-endian hex string.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`F RC,EE,CF;XX'
-     A reply from GDB to an `F' packet sent by the target.  This is
-     part of the File-I/O protocol extension.  *Note File-I/O Remote
-     Protocol Extension::, for the specification.
+'F RC,EE,CF;XX'
+     A reply from GDB to an 'F' packet sent by the target.  This is part
+     of the File-I/O protocol extension.  *Note File-I/O Remote Protocol
+     Extension::, for the specification.
 
-`g'
+'g'
      Read general registers.
 
      Reply:
-    `XX...'
+     'XX...'
           Each byte of register data is described by two hex digits.
           The bytes with the register are transmitted in target byte
           order.  The size of each register and their position within
-          the `g' packet are determined by the GDB internal gdbarch
-          functions `DEPRECATED_REGISTER_RAW_SIZE' and
-          `gdbarch_register_name'.  The specification of several
-          standard `g' packets is specified below.
+          the 'g' packet are determined by the GDB internal gdbarch
+          functions 'DEPRECATED_REGISTER_RAW_SIZE' and
+          'gdbarch_register_name'.
 
           When reading registers from a trace frame (*note Using the
           Collected Data: Analyze Collected Data.), the stub may also
-          return a string of literal `x''s in place of the register
-          data digits, to indicate that the corresponding register has
-          not been collected, thus its value is unavailable.  For
-          example, for an architecture with 4 registers of 4 bytes
-          each, the following reply indicates to GDB that registers 0
-          and 2 have not been collected, while registers 1 and 3 have
-          been collected, and both have zero value:
+          return a string of literal 'x''s in place of the register data
+          digits, to indicate that the corresponding register has not
+          been collected, thus its value is unavailable.  For example,
+          for an architecture with 4 registers of 4 bytes each, the
+          following reply indicates to GDB that registers 0 and 2 have
+          not been collected, while registers 1 and 3 have been
+          collected, and both have zero value:
 
-               -> `g'
-               <- `xxxxxxxx00000000xxxxxxxx00000000'
+               -> g
+               <- xxxxxxxx00000000xxxxxxxx00000000
 
-    `E NN'
+     'E NN'
           for an error.
 
-`G XX...'
+'G XX...'
      Write general registers.  *Note read registers packet::, for a
      description of the XX... data.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`H OP THREAD-ID'
-     Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
-     Depending on the operation to be performed, OP should be `c' for
+'H OP THREAD-ID'
+     Set thread for subsequent operations ('m', 'M', 'g', 'G', et.al.).
+     Depending on the operation to be performed, OP should be 'c' for
      step and continue operations (note that this is deprecated,
-     supporting the `vCont' command is a better option), and `g' for
+     supporting the 'vCont' command is a better option), and 'g' for
      other operations.  The thread designator THREAD-ID has the format
      and interpretation described in *note thread-id syntax::.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`i [ADDR[,NNN]]'
-     Step the remote target by a single clock cycle.  If `,NNN' is
+'i [ADDR[,NNN]]'
+     Step the remote target by a single clock cycle.  If ',NNN' is
      present, cycle step NNN cycles.  If ADDR is present, cycle step
      starting at that address.
 
-`I'
+'I'
      Signal, then cycle step.  *Note step with signal packet::.  *Note
      cycle step packet::.
 
-`k'
+'k'
      Kill request.
 
      The exact effect of this packet is not specified.
 
      For a bare-metal target, it may power cycle or reset the target
-     system.  For that reason, the `k' packet has no reply.
+     system.  For that reason, the 'k' packet has no reply.
 
      For a single-process target, it may kill that process if possible.
 
@@ -1419,132 +2207,126 @@ letter, other than those described here,
      the vKill packet (*note vKill packet::).
 
      If the target system immediately closes the connection in response
-     to `k', GDB does not consider the lack of packet acknowledgment to
+     to 'k', GDB does not consider the lack of packet acknowledgment to
      be an error, and assumes the kill was successful.
 
-     If connected using `target extended-remote', and the target does
+     If connected using 'target extended-remote', and the target does
      not close the connection in response to a kill request, GDB probes
      the target state as if a new connection was opened (*note ?
      packet::).
 
-`m ADDR,LENGTH'
+'m ADDR,LENGTH'
      Read LENGTH addressable memory units starting at address ADDR
      (*note addressable memory unit::).  Note that ADDR may not be
      aligned to any particular boundary.
 
      The stub need not use any particular size or alignment when
      gathering data from memory for the response; even if ADDR is
-     word-aligned and LENGTH is a multiple of the word size, the stub
-     is free to use byte accesses, or not.  For this reason, this
-     packet may not be suitable for accessing memory-mapped I/O devices.  
+     word-aligned and LENGTH is a multiple of the word size, the stub is
+     free to use byte accesses, or not.  For this reason, this packet
+     may not be suitable for accessing memory-mapped I/O devices.
 
      Reply:
-    `XX...'
+     'XX...'
           Memory contents; each byte is transmitted as a two-digit
           hexadecimal number.  The reply may contain fewer addressable
           memory units than requested if the server was able to read
           only part of the region of memory.
-
-    `E NN'
+     'E NN'
           NN is errno
 
-`M ADDR,LENGTH:XX...'
+'M ADDR,LENGTH:XX...'
      Write LENGTH addressable memory units starting at address ADDR
      (*note addressable memory unit::).  The data is given by XX...;
      each byte is transmitted as a two-digit hexadecimal number.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error (this includes the case where only part of the
           data was written).
 
-`p N'
+'p N'
      Read the value of register N; N is in hex.  *Note read registers
      packet::, for a description of how the returned register value is
      encoded.
 
      Reply:
-    `XX...'
+     'XX...'
           the register's value
-
-    `E NN'
+     'E NN'
           for an error
-
-    `'
+     ''
           Indicating an unrecognized QUERY.
 
-`P N...=R...'
+'P N...=R...'
      Write register N... with value R....  The register number N is in
      hexadecimal, and R... contains two hex digits for each byte in the
      register (target byte order).
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`q NAME PARAMS...'
-`Q NAME PARAMS...'
-     General query (`q') and set (`Q').  These packets are described
+'q NAME PARAMS...'
+'Q NAME PARAMS...'
+     General query ('q') and set ('Q').  These packets are described
      fully in *note General Query Packets::.
 
-`r'
+'r'
      Reset the entire system.
 
-     Don't use this packet; use the `R' packet instead.
+     Don't use this packet; use the 'R' packet instead.
 
-`R XX'
+'R XX'
      Restart the program being debugged.  The XX, while needed, is
      ignored.  This packet is only available in extended mode (*note
      extended mode::).
 
-     The `R' packet has no reply.
+     The 'R' packet has no reply.
 
-`s [ADDR]'
+'s [ADDR]'
      Single step, resuming at ADDR.  If ADDR is omitted, resume at same
      address.
 
-     This packet is deprecated for multi-threading support.  *Note
-     vCont packet::.
+     This packet is deprecated for multi-threading support.  *Note vCont
+     packet::.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`S SIG[;ADDR]'
-     Step with signal.  This is analogous to the `C' packet, but
+'S SIG[;ADDR]'
+     Step with signal.  This is analogous to the 'C' packet, but
      requests a single-step, rather than a normal resumption of
      execution.
 
-     This packet is deprecated for multi-threading support.  *Note
-     vCont packet::.
+     This packet is deprecated for multi-threading support.  *Note vCont
+     packet::.
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`t ADDR:PP,MM'
+'t ADDR:PP,MM'
      Search backwards starting at address ADDR for a match with pattern
      PP and mask MM, both of which are are 4 byte long.  There must be
      at least 3 digits in ADDR.
 
-`T THREAD-ID'
+'T THREAD-ID'
      Find out if the thread THREAD-ID is alive.  *Note thread-id
      syntax::.
 
      Reply:
-    `OK'
+     'OK'
           thread is still alive
-
-    `E NN'
+     'E NN'
           thread is dead
 
-`v'
-     Packets starting with `v' are identified by a multi-letter name,
-     up to the first `;' or `?' (or the end of the packet).
+'v'
+     Packets starting with 'v' are identified by a multi-letter name, up
+     to the first ';' or '?' (or the end of the packet).
 
-`vAttach;PID'
+'vAttach;PID'
      Attach to a new process with the specified process ID PID.  The
      process ID is a hexadecimal integer identifying the process.  In
      all-stop mode, all threads in the attached process are stopped; in
@@ -1555,45 +2337,40 @@ letter, other than those described here,
      mode::).
 
      Reply:
-    `E NN'
+     'E NN'
           for an error
-
-    `Any stop packet'
+     'Any stop packet'
           for success in all-stop mode (*note Stop Reply Packets::)
-
-    `OK'
+     'OK'
           for success in non-stop mode (*note Remote Non-Stop::)
 
-`vCont[;ACTION[:THREAD-ID]]...'
+'vCont[;ACTION[:THREAD-ID]]...'
      Resume the inferior, specifying different actions for each thread.
-     If an action is specified with no THREAD-ID, then it is applied to
-     any threads that don't have a specific action specified; if no
-     default action is specified then other threads should remain
-     stopped in all-stop mode and in their current state in non-stop
-     mode.  Specifying multiple default actions is an error; specifying
-     no actions is also an error.  Thread IDs are specified using the
-     syntax described in *note thread-id syntax::.
+
+     For each inferior thread, the leftmost action with a matching
+     THREAD-ID is applied.  Threads that don't match any action remain
+     in their current state.  Thread IDs are specified using the syntax
+     described in *note thread-id syntax::.  If multiprocess extensions
+     (*note multiprocess extensions::) are supported, actions can be
+     specified to match all threads in a process by using the 'pPID.-1'
+     form of the THREAD-ID.  An action with no THREAD-ID matches all
+     threads.  Specifying no actions is an error.
 
      Currently supported actions are:
 
-    `c'
+     'c'
           Continue.
-
-    `C SIG'
+     'C SIG'
           Continue with signal SIG.  The signal SIG should be two hex
           digits.
-
-    `s'
+     's'
           Step.
-
-    `S SIG'
+     'S SIG'
           Step with signal SIG.  The signal SIG should be two hex
           digits.
-
-    `t'
+     't'
           Stop.
-
-    `r START,END'
+     'r START,END'
           Step once, and then keep stepping as long as the thread stops
           at addresses between START (inclusive) and END (exclusive).
           The remote stub reports a stop reply when either the thread
@@ -1601,554 +2378,597 @@ letter, other than those described here,
           reason, such as hitting a breakpoint.  *Note range stepping::.
 
           If the range is empty (START == END), then the action becomes
-          equivalent to the `s' action.  In other words, single-step
+          equivalent to the 's' action.  In other words, single-step
           once, and report the stop (even if the stepped instruction
           jumps to START).
 
-          (A stop reply may be sent at any point even if the PC is
-          still within the stepping range; for example, it is valid to
+          (A stop reply may be sent at any point even if the PC is still
+          within the stepping range; for example, it is valid to
           implement this packet in a degenerate way as a single
           instruction step operation.)
 
+     The optional argument ADDR normally associated with the 'c', 'C',
+     's', and 'S' packets is not supported in 'vCont'.
 
-     The optional argument ADDR normally associated with the `c', `C',
-     `s', and `S' packets is not supported in `vCont'.
-
-     The `t' action is only relevant in non-stop mode (*note Remote
-     Non-Stop::) and may be ignored by the stub otherwise.  A stop
-     reply should be generated for any affected thread not already
-     stopped.  When a thread is stopped by means of a `t' action, the
+     The 't' action is only relevant in non-stop mode (*note Remote
+     Non-Stop::) and may be ignored by the stub otherwise.  A stop reply
+     should be generated for any affected thread not already stopped.
+     When a thread is stopped by means of a 't' action, the
      corresponding stop reply should indicate that the thread has
-     stopped with signal `0', regardless of whether the target uses
-     some other signal as an implementation detail.
+     stopped with signal '0', regardless of whether the target uses some
+     other signal as an implementation detail.
+
+     The server must ignore 'c', 'C', 's', 'S', and 'r' actions for
+     threads that are already running.  Conversely, the server must
+     ignore 't' actions for threads that are already stopped.
+
+     _Note:_ In non-stop mode, a thread is considered running until GDB
+     acknowleges an asynchronous stop notification for it with the
+     'vStopped' packet (*note Remote Non-Stop::).
 
-     The stub must support `vCont' if it reports support for
-     multiprocess extensions (*note multiprocess extensions::).  Note
-     that in this case `vCont' actions can be specified to apply to all
-     threads in a process by using the `pPID.-1' form of the THREAD-ID.
+     The stub must support 'vCont' if it reports support for
+     multiprocess extensions (*note multiprocess extensions::).
 
      Reply: *Note Stop Reply Packets::, for the reply specifications.
 
-`vCont?'
-     Request a list of actions supported by the `vCont' packet.
+'vCont?'
+     Request a list of actions supported by the 'vCont' packet.
 
      Reply:
-    `vCont[;ACTION...]'
-          The `vCont' packet is supported.  Each ACTION is a supported
-          command in the `vCont' packet.
+     'vCont[;ACTION...]'
+          The 'vCont' packet is supported.  Each ACTION is a supported
+          command in the 'vCont' packet.
+     ''
+          The 'vCont' packet is not supported.
+
+'vCtrlC'
+     Interrupt remote target as if a control-C was pressed on the remote
+     terminal.  This is the equivalent to reacting to the '^C' ('\003',
+     the control-C character) character in all-stop mode while the
+     target is running, except this works in non-stop mode.  *Note
+     interrupting remote targets::, for more info on the all-stop
+     variant.
 
-    `'
-          The `vCont' packet is not supported.
+     Reply:
+     'E NN'
+          for an error
+     'OK'
+          for success
 
-`vFile:OPERATION:PARAMETER...'
+'vFile:OPERATION:PARAMETER...'
      Perform a file operation on the target system.  For details, see
      *note Host I/O Packets::.
 
-`vFlashErase:ADDR,LENGTH'
+'vFlashErase:ADDR,LENGTH'
      Direct the stub to erase LENGTH bytes of flash starting at ADDR.
      The region may enclose any number of flash blocks, but its start
      and end must fall on block boundaries, as indicated by the flash
-     block size appearing in the memory map (*note Memory Map
-     Format::).  GDB groups flash memory programming operations
-     together, and sends a `vFlashDone' request after each group; the
-     stub is allowed to delay erase operation until the `vFlashDone'
-     packet is received.
+     block size appearing in the memory map (*note Memory Map Format::).
+     GDB groups flash memory programming operations together, and sends
+     a 'vFlashDone' request after each group; the stub is allowed to
+     delay erase operation until the 'vFlashDone' packet is received.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`vFlashWrite:ADDR:XX...'
+'vFlashWrite:ADDR:XX...'
      Direct the stub to write data to flash address ADDR.  The data is
-     passed in binary form using the same encoding as for the `X'
-     packet (*note Binary Data::).  The memory ranges specified by
-     `vFlashWrite' packets preceding a `vFlashDone' packet must not
-     overlap, and must appear in order of increasing addresses
-     (although `vFlashErase' packets for higher addresses may already
-     have been received; the ordering is guaranteed only between
-     `vFlashWrite' packets).  If a packet writes to an address that was
-     neither erased by a preceding `vFlashErase' packet nor by some
-     other target-specific method, the results are unpredictable.
+     passed in binary form using the same encoding as for the 'X' packet
+     (*note Binary Data::).  The memory ranges specified by
+     'vFlashWrite' packets preceding a 'vFlashDone' packet must not
+     overlap, and must appear in order of increasing addresses (although
+     'vFlashErase' packets for higher addresses may already have been
+     received; the ordering is guaranteed only between 'vFlashWrite'
+     packets).  If a packet writes to an address that was neither erased
+     by a preceding 'vFlashErase' packet nor by some other
+     target-specific method, the results are unpredictable.
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E.memtype'
+     'E.memtype'
           for vFlashWrite addressing non-flash memory
-
-    `E NN'
+     'E NN'
           for an error
 
-`vFlashDone'
+'vFlashDone'
      Indicate to the stub that flash programming operation is finished.
      The stub is permitted to delay or batch the effects of a group of
-     `vFlashErase' and `vFlashWrite' packets until a `vFlashDone'
-     packet is received.  The contents of the affected regions of flash
-     memory are unpredictable until the `vFlashDone' request is
-     completed.
+     'vFlashErase' and 'vFlashWrite' packets until a 'vFlashDone' packet
+     is received.  The contents of the affected regions of flash memory
+     are unpredictable until the 'vFlashDone' request is completed.
 
-`vKill;PID'
+'vKill;PID'
      Kill the process with the specified process ID PID, which is a
      hexadecimal integer identifying the process.  This packet is used
-     in preference to `k' when multiprocess protocol extensions are
+     in preference to 'k' when multiprocess protocol extensions are
      supported; see *note multiprocess extensions::.
 
      Reply:
-    `E NN'
+     'E NN'
           for an error
-
-    `OK'
+     'OK'
           for success
 
-`vRun;FILENAME[;ARGUMENT]...'
+'vRun;FILENAME[;ARGUMENT]...'
      Run the program FILENAME, passing it each ARGUMENT on its command
-     line.  The file and arguments are hex-encoded strings.  If
-     FILENAME is an empty string, the stub may use a default program
-     (e.g. the last program run).  The program is created in the stopped
-     state.
+     line.  The file and arguments are hex-encoded strings.  If FILENAME
+     is an empty string, the stub may use a default program (e.g. the
+     last program run).  The program is created in the stopped state.
 
      This packet is only available in extended mode (*note extended
      mode::).
 
      Reply:
-    `E NN'
+     'E NN'
           for an error
-
-    `Any stop packet'
+     'Any stop packet'
           for success (*note Stop Reply Packets::)
 
-`vStopped'
+'vStopped'
      *Note Notification Packets::.
 
-`X ADDR,LENGTH:XX...'
+'X ADDR,LENGTH:XX...'
      Write data to memory, where the data is transmitted in binary.
      Memory is specified by its address ADDR and number of addressable
-     memory units LENGTH (*note addressable memory unit::); `XX...' is
+     memory units LENGTH (*note addressable memory unit::); 'XX...' is
      binary data (*note Binary Data::).
 
      Reply:
-    `OK'
+     'OK'
           for success
-
-    `E NN'
+     'E NN'
           for an error
 
-`z TYPE,ADDR,KIND'
-`Z TYPE,ADDR,KIND'
-     Insert (`Z') or remove (`z') a TYPE breakpoint or watchpoint
+'z TYPE,ADDR,KIND'
+'Z TYPE,ADDR,KIND'
+     Insert ('Z') or remove ('z') a TYPE breakpoint or watchpoint
      starting at address ADDRESS of kind KIND.
 
      Each breakpoint and watchpoint packet TYPE is documented
      separately.
 
      _Implementation notes: A remote target shall return an empty string
-     for an unrecognized breakpoint or watchpoint packet TYPE.  A
-     remote target shall support either both or neither of a given
-     `ZTYPE...' and `zTYPE...' packet pair.  To avoid potential
-     problems with duplicate packets, the operations should be
-     implemented in an idempotent way._
-
-`z0,ADDR,KIND'
-`Z0,ADDR,KIND[;COND_LIST...][;cmds:PERSIST,CMD_LIST...]'
-     Insert (`Z0') or remove (`z0') a memory breakpoint at address ADDR
-     of type KIND.
-
-     A memory breakpoint is implemented by replacing the instruction at
-     ADDR with a software breakpoint or trap instruction.  The KIND is
-     target-specific and typically indicates the size of the breakpoint
-     in bytes that should be inserted.  E.g., the ARM and MIPS can
-     insert either a 2 or 4 byte breakpoint.  Some architectures have
-     additional meanings for KIND; COND_LIST is an optional list of
-     conditional expressions in bytecode form that should be evaluated
-     on the target's side.  These are the conditions that should be
-     taken into consideration when deciding if the breakpoint trigger
-     should be reported back to GDBN.
+     for an unrecognized breakpoint or watchpoint packet TYPE.  A remote
+     target shall support either both or neither of a given 'ZTYPE...'
+     and 'zTYPE...' packet pair.  To avoid potential problems with
+     duplicate packets, the operations should be implemented in an
+     idempotent way._
+
+'z0,ADDR,KIND'
+'Z0,ADDR,KIND[;COND_LIST...][;cmds:PERSIST,CMD_LIST...]'
+     Insert ('Z0') or remove ('z0') a software breakpoint at address
+     ADDR of type KIND.
+
+     A software breakpoint is implemented by replacing the instruction
+     at ADDR with a software breakpoint or trap instruction.  The KIND
+     is target-specific and typically indicates the size of the
+     breakpoint in bytes that should be inserted.  E.g., the ARM and
+     MIPS can insert either a 2 or 4 byte breakpoint.  Some
+     architectures have additional meanings for KIND (*note
+     Architecture-Specific Protocol Details::); if no
+     architecture-specific value is being used, it should be '0'.  KIND
+     is hex-encoded.  COND_LIST is an optional list of conditional
+     expressions in bytecode form that should be evaluated on the
+     target's side.  These are the conditions that should be taken into
+     consideration when deciding if the breakpoint trigger should be
+     reported back to GDB.
 
-     See also the `swbreak' stop reason (*note swbreak stop reason::)
-     for how to best report a memory breakpoint event to GDB.
+     See also the 'swbreak' stop reason (*note swbreak stop reason::)
+     for how to best report a software breakpoint event to GDB.
 
      The COND_LIST parameter is comprised of a series of expressions,
-     concatenated without separators. Each expression has the following
+     concatenated without separators.  Each expression has the following
      form:
 
-    `X LEN,EXPR'
+     'X LEN,EXPR'
           LEN is the length of the bytecode expression and EXPR is the
           actual conditional expression in bytecode form.
 
-
-     The optional CMD_LIST parameter introduces commands that may be
-     run on the target, rather than being reported back to GDB.  The
+     The optional CMD_LIST parameter introduces commands that may be run
+     on the target, rather than being reported back to GDB.  The
      parameter starts with a numeric flag PERSIST; if the flag is
      nonzero, then the breakpoint may remain active and the commands
      continue to be run even when GDB disconnects from the target.
      Following this flag is a series of expressions concatenated with no
      separators.  Each expression has the following form:
 
-    `X LEN,EXPR'
+     'X LEN,EXPR'
           LEN is the length of the bytecode expression and EXPR is the
           actual conditional expression in bytecode form.
 
-
-     see *note Architecture-Specific Protocol Details::.
-
      _Implementation note: It is possible for a target to copy or move
-     code that contains memory breakpoints (e.g., when implementing
+     code that contains software breakpoints (e.g., when implementing
      overlays).  The behavior of this packet, in the presence of such a
      target, is not defined._
 
      Reply:
-    `OK'
+     'OK'
           success
-
-    `'
+     ''
           not supported
-
-    `E NN'
+     'E NN'
           for an error
 
-`z1,ADDR,KIND'
-`Z1,ADDR,KIND[;COND_LIST...]'
-     Insert (`Z1') or remove (`z1') a hardware breakpoint at address
+'z1,ADDR,KIND'
+'Z1,ADDR,KIND[;COND_LIST...][;cmds:PERSIST,CMD_LIST...]'
+     Insert ('Z1') or remove ('z1') a hardware breakpoint at address
      ADDR.
 
      A hardware breakpoint is implemented using a mechanism that is not
-     dependant on being able to modify the target's memory.  The KIND
-     and COND_LIST have the same meaning as in `Z0' packets.
+     dependent on being able to modify the target's memory.  The KIND,
+     COND_LIST, and CMD_LIST arguments have the same meaning as in 'Z0'
+     packets.
 
      _Implementation note: A hardware breakpoint is not affected by code
      movement._
 
      Reply:
-    `OK'
+     'OK'
           success
-
-    `'
+     ''
           not supported
-
-    `E NN'
+     'E NN'
           for an error
 
-`z2,ADDR,KIND'
-`Z2,ADDR,KIND'
-     Insert (`Z2') or remove (`z2') a write watchpoint at ADDR.  The
+'z2,ADDR,KIND'
+'Z2,ADDR,KIND'
+     Insert ('Z2') or remove ('z2') a write watchpoint at ADDR.  The
      number of bytes to watch is specified by KIND.
 
      Reply:
-    `OK'
+     'OK'
           success
-
-    `'
+     ''
           not supported
-
-    `E NN'
+     'E NN'
           for an error
 
-`z3,ADDR,KIND'
-`Z3,ADDR,KIND'
-     Insert (`Z3') or remove (`z3') a read watchpoint at ADDR.  The
+'z3,ADDR,KIND'
+'Z3,ADDR,KIND'
+     Insert ('Z3') or remove ('z3') a read watchpoint at ADDR.  The
      number of bytes to watch is specified by KIND.
 
      Reply:
-    `OK'
+     'OK'
           success
-
-    `'
+     ''
           not supported
-
-    `E NN'
+     'E NN'
           for an error
 
-`z4,ADDR,KIND'
-`Z4,ADDR,KIND'
-     Insert (`Z4') or remove (`z4') an access watchpoint at ADDR.  The
+'z4,ADDR,KIND'
+'Z4,ADDR,KIND'
+     Insert ('Z4') or remove ('z4') an access watchpoint at ADDR.  The
      number of bytes to watch is specified by KIND.
 
      Reply:
-    `OK'
+     'OK'
           success
-
-    `'
+     ''
           not supported
-
-    `E NN'
+     'E NN'
           for an error
 
-
 
 File: gdb.info,  Node: Stop Reply Packets,  Next: General Query Packets,  Prev: Packets,  Up: Remote Protocol
 
 E.3 Stop Reply Packets
 ======================
 
-The `C', `c', `S', `s', `vCont', `vAttach', `vRun', `vStopped', and `?'
-packets can receive any of the below as a reply.  Except for `?' and
-`vStopped', that reply is only returned when the target halts.  In the
+The 'C', 'c', 'S', 's', 'vCont', 'vAttach', 'vRun', 'vStopped', and '?'
+packets can receive any of the below as a reply.  Except for '?' and
+'vStopped', that reply is only returned when the target halts.  In the
 below the exact meaning of "signal number" is defined by the header
-`include/gdb/signals.h' in the GDB source code.
+'include/gdb/signals.h' in the GDB source code.
+
+   In non-stop mode, the server will simply reply 'OK' to commands such
+as 'vCont'; any stop will be the subject of a future notification.
+*Note Remote Non-Stop::.
 
    As in the description of request packets, we include spaces in the
 reply templates for clarity; these are not part of the reply packet's
 syntax.  No GDB stop reply packet uses spaces to separate its
 components.
 
-`S AA'
+'S AA'
      The program received signal number AA (a two-digit hexadecimal
-     number).  This is equivalent to a `T' response with no N:R pairs.
+     number).  This is equivalent to a 'T' response with no N:R pairs.
 
-`T AA N1:R1;N2:R2;...'
+'T AA N1:R1;N2:R2;...'
      The program received signal number AA (a two-digit hexadecimal
-     number).  This is equivalent to an `S' response, except that the
-     `N:R' pairs can carry values of important registers and other
+     number).  This is equivalent to an 'S' response, except that the
+     'N:R' pairs can carry values of important registers and other
      information directly in the stop reply packet, reducing round-trip
      latency.  Single-step and breakpoint traps are reported this way.
-     Each `N:R' pair is interpreted as follows:
+     Each 'N:R' pair is interpreted as follows:
 
         * If N is a hexadecimal number, it is a register number, and the
           corresponding R gives that register's value.  The data R is a
           series of bytes in target byte order, with each byte given by
           a two-digit hex number.
 
-        * If N is `thread', then R is the THREAD-ID of the stopped
+        * If N is 'thread', then R is the THREAD-ID of the stopped
           thread, as specified in *note thread-id syntax::.
 
-        * If N is `core', then R is the hexadecimal number of the core
+        * If N is 'core', then R is the hexadecimal number of the core
           on which the stop event was detected.
 
         * If N is a recognized "stop reason", it describes a more
-          specific event that stopped the target.  The currently
-          defined stop reasons are listed below.  The AA should be
-          `05', the trap signal.  At most one stop reason should be
-          present.
+          specific event that stopped the target.  The currently defined
+          stop reasons are listed below.  The AA should be '05', the
+          trap signal.  At most one stop reason should be present.
 
-        * Otherwise, GDB should ignore this `N:R' pair and go on to the
+        * Otherwise, GDB should ignore this 'N:R' pair and go on to the
           next; this allows us to extend the protocol in the future.
 
      The currently defined stop reasons are:
 
-    `watch'
-    `rwatch'
-    `awatch'
+     'watch'
+     'rwatch'
+     'awatch'
           The packet indicates a watchpoint hit, and R is the data
           address, in hex.
 
-    `library'
+     'syscall_entry'
+     'syscall_return'
+          The packet indicates a syscall entry or return, and R is the
+          syscall number, in hex.
+
+     'library'
           The packet indicates that the loaded libraries have changed.
-          GDB should use `qXfer:libraries:read' to fetch a new list of
+          GDB should use 'qXfer:libraries:read' to fetch a new list of
           loaded libraries.  The R part is ignored.
 
-    `replaylog'
+     'replaylog'
           The packet indicates that the target cannot continue replaying
           logged execution events, because it has reached the end (or
           the beginning when executing backward) of the log.  The value
-          of R will be either `begin' or `end'.  *Note Reverse
+          of R will be either 'begin' or 'end'.  *Note Reverse
           Execution::, for more information.
 
-    `swbreak'
-          The packet indicates a memory breakpoint instruction was
+     'swbreak'
+          The packet indicates a software breakpoint instruction was
           executed, irrespective of whether it was GDB that planted the
-          breakpoint or the breakpoint is hardcoded in the program.
-          The R part must be left empty.
+          breakpoint or the breakpoint is hardcoded in the program.  The
+          R part must be left empty.
 
-          On some architectures, such as x86, at the architecture
-          level, when a breakpoint instruction executes the program
-          counter points at the breakpoint address plus an offset.  On
-          such targets, the stub is responsible for adjusting the PC to
-          point back at the breakpoint address.
+          On some architectures, such as x86, at the architecture level,
+          when a breakpoint instruction executes the program counter
+          points at the breakpoint address plus an offset.  On such
+          targets, the stub is responsible for adjusting the PC to point
+          back at the breakpoint address.
 
           This packet should not be sent by default; older GDB versions
           did not support it.  GDB requests it, by supplying an
-          appropriate `qSupported' feature (*note qSupported::).  The
-          remote stub must also supply the appropriate `qSupported'
+          appropriate 'qSupported' feature (*note qSupported::).  The
+          remote stub must also supply the appropriate 'qSupported'
           feature indicating support.
 
           This packet is required for correct non-stop mode operation.
 
-    `hwbreak'
+     'hwbreak'
           The packet indicates the target stopped for a hardware
           breakpoint.  The R part must be left empty.
 
-          The same remarks about `qSupported' and non-stop mode above
+          The same remarks about 'qSupported' and non-stop mode above
           apply.
 
-    `fork'
-          The packet indicates that `fork' was called, and R is the
+     'fork'
+          The packet indicates that 'fork' was called, and R is the
           thread ID of the new child process.  Refer to *note thread-id
           syntax:: for the format of the THREAD-ID field.  This packet
           is only applicable to targets that support fork events.
 
           This packet should not be sent by default; older GDB versions
           did not support it.  GDB requests it, by supplying an
-          appropriate `qSupported' feature (*note qSupported::).  The
-          remote stub must also supply the appropriate `qSupported'
+          appropriate 'qSupported' feature (*note qSupported::).  The
+          remote stub must also supply the appropriate 'qSupported'
           feature indicating support.
 
-    `vfork'
-          The packet indicates that `vfork' was called, and R is the
-          thread ID of the new child process. Refer to *note thread-id
+     'vfork'
+          The packet indicates that 'vfork' was called, and R is the
+          thread ID of the new child process.  Refer to *note thread-id
           syntax:: for the format of the THREAD-ID field.  This packet
           is only applicable to targets that support vfork events.
 
           This packet should not be sent by default; older GDB versions
           did not support it.  GDB requests it, by supplying an
-          appropriate `qSupported' feature (*note qSupported::).  The
-          remote stub must also supply the appropriate `qSupported'
+          appropriate 'qSupported' feature (*note qSupported::).  The
+          remote stub must also supply the appropriate 'qSupported'
           feature indicating support.
 
-    `vforkdone'
+     'vforkdone'
           The packet indicates that a child process created by a vfork
-          has either called `exec' or terminated, so that the address
+          has either called 'exec' or terminated, so that the address
           spaces of the parent and child process are no longer shared.
           The R part is ignored.  This packet is only applicable to
           targets that support vforkdone events.
 
           This packet should not be sent by default; older GDB versions
           did not support it.  GDB requests it, by supplying an
-          appropriate `qSupported' feature (*note qSupported::).  The
-          remote stub must also supply the appropriate `qSupported'
+          appropriate 'qSupported' feature (*note qSupported::).  The
+          remote stub must also supply the appropriate 'qSupported'
+          feature indicating support.
+
+     'exec'
+          The packet indicates that 'execve' was called, and R is the
+          absolute pathname of the file that was executed, in hex.  This
+          packet is only applicable to targets that support exec events.
+
+          This packet should not be sent by default; older GDB versions
+          did not support it.  GDB requests it, by supplying an
+          appropriate 'qSupported' feature (*note qSupported::).  The
+          remote stub must also supply the appropriate 'qSupported'
           feature indicating support.
 
+     'create'
+          The packet indicates that the thread was just created.  The
+          new thread is stopped until GDB sets it running with a
+          resumption packet (*note vCont packet::).  This packet should
+          not be sent by default; GDB requests it with the *note
+          QThreadEvents:: packet.  See also the 'w' (*note thread exit
+          event::) remote reply below.  The R part is ignored.
 
-`W AA'
-`W AA ; process:PID'
+'W AA'
+'W AA ; process:PID'
      The process exited, and AA is the exit status.  This is only
      applicable to certain targets.
 
      The second form of the response, including the process ID of the
      exited process, can be used only when GDB has reported support for
      multiprocess protocol extensions; see *note multiprocess
-     extensions::.  The PID is formatted as a big-endian hex string.
+     extensions::.  Both AA and PID are formatted as big-endian hex
+     strings.
 
-`X AA'
-`X AA ; process:PID'
+'X AA'
+'X AA ; process:PID'
      The process terminated with signal AA.
 
      The second form of the response, including the process ID of the
      terminated process, can be used only when GDB has reported support
      for multiprocess protocol extensions; see *note multiprocess
-     extensions::.  The PID is formatted as a big-endian hex string.
+     extensions::.  Both AA and PID are formatted as big-endian hex
+     strings.
 
-`O XX...'
-     `XX...' is hex encoding of ASCII data, to be written as the
+'w AA ; TID'
+
+     The thread exited, and AA is the exit status.  This response should
+     not be sent by default; GDB requests it with the *note
+     QThreadEvents:: packet.  See also *note thread create event::
+     above.  AA is formatted as a big-endian hex string.
+
+'N'
+     There are no resumed threads left in the target.  In other words,
+     even though the process is alive, the last resumed thread has
+     exited.  For example, say the target process has two threads:
+     thread 1 and thread 2.  The client leaves thread 1 stopped, and
+     resumes thread 2, which subsequently exits.  At this point, even
+     though the process is still alive, and thus no 'W' stop reply is
+     sent, no thread is actually executing either.  The 'N' stop reply
+     thus informs the client that it can stop waiting for stop replies.
+     This packet should not be sent by default; older GDB versions did
+     not support it.  GDB requests it, by supplying an appropriate
+     'qSupported' feature (*note qSupported::).  The remote stub must
+     also supply the appropriate 'qSupported' feature indicating
+     support.
+
+'O XX...'
+     'XX...' is hex encoding of ASCII data, to be written as the
      program's console output.  This can happen at any time while the
      program is running and the debugger should continue to wait for
-     `W', `T', etc.  This reply is not permitted in non-stop mode.
+     'W', 'T', etc.  This reply is not permitted in non-stop mode.
 
-`F CALL-ID,PARAMETER...'
+'F CALL-ID,PARAMETER...'
      CALL-ID is the identifier which says which host system call should
      be called.  This is just the name of the function.  Translation
      into the correct system call is only applicable as it's defined in
      GDB.  *Note File-I/O Remote Protocol Extension::, for a list of
      implemented system calls.
 
-     `PARAMETER...' is a list of parameters as defined for this very
+     'PARAMETER...' is a list of parameters as defined for this very
      system call.
 
      The target replies with this packet when it expects GDB to call a
      host system call on behalf of the target.  GDB replies with an
-     appropriate `F' packet and keeps up waiting for the next reply
-     packet from the target.  The latest `C', `c', `S' or `s' action is
+     appropriate 'F' packet and keeps up waiting for the next reply
+     packet from the target.  The latest 'C', 'c', 'S' or 's' action is
      expected to be continued.  *Note File-I/O Remote Protocol
      Extension::, for more details.
 
-
 
 File: gdb.info,  Node: General Query Packets,  Next: Architecture-Specific Protocol Details,  Prev: Stop Reply Packets,  Up: Remote Protocol
 
 E.4 General Query Packets
 =========================
 
-Packets starting with `q' are "general query packets"; packets starting
-with `Q' are "general set packets".  General query and set packets are
-a semi-unified form for retrieving and sending information to and from
-the stub.
+Packets starting with 'q' are "general query packets"; packets starting
+with 'Q' are "general set packets".  General query and set packets are a
+semi-unified form for retrieving and sending information to and from the
+stub.
 
    The initial letter of a query or set packet is followed by a name
 indicating what sort of thing the packet applies to.  For example, GDB
-may use a `qSymbol' packet to exchange symbol definitions with the
-stub.  These packet names follow some conventions:
+may use a 'qSymbol' packet to exchange symbol definitions with the stub.
+These packet names follow some conventions:
 
    * The name must not contain commas, colons or semicolons.
-
    * Most GDB query and set packets have a leading upper case letter.
-
    * The names of custom vendor packets should use a company prefix, in
      lower case, followed by a period.  For example, packets designed at
-     the Acme Corporation might begin with `qacme.foo' (for querying
-     foos) or `Qacme.bar' (for setting bars).
+     the Acme Corporation might begin with 'qacme.foo' (for querying
+     foos) or 'Qacme.bar' (for setting bars).
 
    The name of a query or set packet should be separated from any
-parameters by a `:'; the parameters themselves should be separated by
-`,' or `;'.  Stubs must be careful to match the full packet name, and
-check for a separator or the end of the packet, in case two packet
-names share a common prefix.  New packets should not begin with `qC',
-`qP', or `qL'(1).
+parameters by a ':'; the parameters themselves should be separated by
+',' or ';'.  Stubs must be careful to match the full packet name, and
+check for a separator or the end of the packet, in case two packet names
+share a common prefix.  New packets should not begin with 'qC', 'qP', or
+'qL'(1).
 
-   Like the descriptions of the other packets, each description here
-has a template showing the packet's overall syntax, followed by an
+   Like the descriptions of the other packets, each description here has
+a template showing the packet's overall syntax, followed by an
 explanation of the packet's meaning.  We include spaces in some of the
 templates for clarity; these are not part of the packet's syntax.  No
 GDB packet uses spaces to separate its components.
 
    Here are the currently defined query and set packets:
 
-`QAgent:1'
-`QAgent:0'
+'QAgent:1'
+'QAgent:0'
      Turn on or off the agent as a helper to perform some debugging
      operations delegated from GDB (*note Control Agent::).
 
-`QAllow:OP:VAL...'
-     Specify which operations GDB expects to request of the target, as
-     a semicolon-separated list of operation name and value pairs.
-     Possible values for OP include `WriteReg', `WriteMem',
-     `InsertBreak', `InsertTrace', `InsertFastTrace', and `Stop'. VAL
-     is either 0, indicating that GDB will not request the operation,
-     or 1, indicating that it may.  (The target can then use this to
-     set up its own internals optimally, for instance if the debugger
-     never expects to insert breakpoints, it may not need to install
-     its own trap handler.)
+'QAllow:OP:VAL...'
+     Specify which operations GDB expects to request of the target, as a
+     semicolon-separated list of operation name and value pairs.
+     Possible values for OP include 'WriteReg', 'WriteMem',
+     'InsertBreak', 'InsertTrace', 'InsertFastTrace', and 'Stop'.  VAL
+     is either 0, indicating that GDB will not request the operation, or
+     1, indicating that it may.  (The target can then use this to set up
+     its own internals optimally, for instance if the debugger never
+     expects to insert breakpoints, it may not need to install its own
+     trap handler.)
 
-`qC'
+'qC'
      Return the current thread ID.
 
      Reply:
-    `QC THREAD-ID'
+     'QC THREAD-ID'
           Where THREAD-ID is a thread ID as documented in *note
           thread-id syntax::.
-
-    `(anything else)'
+     '(anything else)'
           Any other reply implies the old thread ID.
 
-`qCRC:ADDR,LENGTH'
+'qCRC:ADDR,LENGTH'
      Compute the CRC checksum of a block of memory using CRC-32 defined
      in IEEE 802.3.  The CRC is computed byte at a time, taking the most
      significant bit of each byte first.  The initial pattern code
-     `0xffffffff' is used to ensure leading zeros affect the CRC.
+     '0xffffffff' is used to ensure leading zeros affect the CRC.
 
      _Note:_ This is the same CRC used in validating separate debug
      files (*note Debugging Information in Separate Files: Separate
      Debug Files.).  However the algorithm is slightly different.  When
      validating separate debug files, the CRC is computed taking the
-     _least_ significant bit of each byte first, and the final result
-     is inverted to detect trailing zeros.
+     _least_ significant bit of each byte first, and the final result is
+     inverted to detect trailing zeros.
 
      Reply:
-    `E NN'
+     'E NN'
           An error (such as memory fault)
-
-    `C CRC32'
+     'C CRC32'
           The specified memory region's checksum is CRC32.
 
-`QDisableRandomization:VALUE'
+'QDisableRandomization:VALUE'
      Some target operating systems will randomize the virtual address
      space of the inferior process as a security feature, but provide a
      feature to disable such randomization, e.g. to allow for a more
      deterministic debugging experience.  On such systems, this packet
      with a VALUE of 1 directs the target to disable address space
-     randomization for processes subsequently started via `vRun'
+     randomization for processes subsequently started via 'vRun'
      packets, while a packet with a VALUE of 0 tells the target to
      enable address space randomization.
 
@@ -2156,61 +2976,59 @@ GDB packet uses spaces to separate its c
      mode::).
 
      Reply:
-    `OK'
+     'OK'
           The request succeeded.
 
-    `E NN'
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
 
-    `'
-          An empty reply indicates that `QDisableRandomization' is not
+     ''
+          An empty reply indicates that 'QDisableRandomization' is not
           supported by the stub.
 
      This packet is not probed by default; the remote stub must request
-     it, by supplying an appropriate `qSupported' response (*note
+     it, by supplying an appropriate 'qSupported' response (*note
      qSupported::).  This should only be done on targets that actually
      support disabling address space randomization.
 
-`qfThreadInfo'
-`qsThreadInfo'
-     Obtain a list of all active thread IDs from the target (OS).
-     Since there may be too many active threads to fit into one reply
-     packet, this query works iteratively: it may require more than one
+'qfThreadInfo'
+'qsThreadInfo'
+     Obtain a list of all active thread IDs from the target (OS). Since
+     there may be too many active threads to fit into one reply packet,
+     this query works iteratively: it may require more than one
      query/reply sequence to obtain the entire list of threads.  The
-     first query of the sequence will be the `qfThreadInfo' query;
-     subsequent queries in the sequence will be the `qsThreadInfo'
+     first query of the sequence will be the 'qfThreadInfo' query;
+     subsequent queries in the sequence will be the 'qsThreadInfo'
      query.
 
-     NOTE: This packet replaces the `qL' query (see below).
+     NOTE: This packet replaces the 'qL' query (see below).
 
      Reply:
-    `m THREAD-ID'
+     'm THREAD-ID'
           A single thread ID
-
-    `m THREAD-ID,THREAD-ID...'
+     'm THREAD-ID,THREAD-ID...'
           a comma-separated list of thread IDs
+     'l'
+          (lower case letter 'L') denotes end of list.
 
-    `l'
-          (lower case letter `L') denotes end of list.
+     In response to each query, the target will reply with a list of one
+     or more thread IDs, separated by commas.  GDB will respond to each
+     reply with a request for more thread ids (using the 'qs' form of
+     the query), until the target responds with 'l' (lower-case ell, for
+     "last").  Refer to *note thread-id syntax::, for the format of the
+     THREAD-ID fields.
 
-     In response to each query, the target will reply with a list of
-     one or more thread IDs, separated by commas.  GDB will respond to
-     each reply with a request for more thread ids (using the `qs' form
-     of the query), until the target responds with `l' (lower-case ell,
-     for "last").  Refer to *note thread-id syntax::, for the format of
-     the THREAD-ID fields.
-
-     _Note: GDB will send the `qfThreadInfo' query during the initial
+     _Note: GDB will send the 'qfThreadInfo' query during the initial
      connection with the remote target, and the very first thread ID
      mentioned in the reply will be stopped by GDB in a subsequent
      message.  Therefore, the stub should ensure that the first thread
-     ID in the `qfThreadInfo' reply is suitable for being stopped by
+     ID in the 'qfThreadInfo' reply is suitable for being stopped by
      GDB._
 
-`qGetTLSAddr:THREAD-ID,OFFSET,LM'
-     Fetch the address associated with thread local storage specified
-     by THREAD-ID, OFFSET, and LM.
+'qGetTLSAddr:THREAD-ID,OFFSET,LM'
+     Fetch the address associated with thread local storage specified by
+     THREAD-ID, OFFSET, and LM.
 
      THREAD-ID is the thread ID associated with the thread for which to
      fetch the TLS address.  *Note thread-id syntax::.
@@ -2228,360 +3046,427 @@ GDB packet uses spaces to separate its c
      this parameter will vary.
 
      Reply:
-    `XX...'
-          Hex encoded (big endian) bytes representing the address of
-          the thread local storage requested.
+     'XX...'
+          Hex encoded (big endian) bytes representing the address of the
+          thread local storage requested.
 
-    `E NN'
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
 
-    `'
-          An empty reply indicates that `qGetTLSAddr' is not supported
+     ''
+          An empty reply indicates that 'qGetTLSAddr' is not supported
           by the stub.
 
-`qGetTIBAddr:THREAD-ID'
+'qGetTIBAddr:THREAD-ID'
      Fetch address of the Windows OS specific Thread Information Block.
 
      THREAD-ID is the thread ID associated with the thread.
 
      Reply:
-    `XX...'
-          Hex encoded (big endian) bytes representing the linear
-          address of the thread information block.
+     'XX...'
+          Hex encoded (big endian) bytes representing the linear address
+          of the thread information block.
 
-    `E NN'
+     'E NN'
           An error occured.  This means that either the thread was not
           found, or the address could not be retrieved.
 
-    `'
-          An empty reply indicates that `qGetTIBAddr' is not supported
+     ''
+          An empty reply indicates that 'qGetTIBAddr' is not supported
           by the stub.
 
-`qL STARTFLAG THREADCOUNT NEXTTHREAD'
-     Obtain thread information from RTOS.  Where: STARTFLAG (one hex
+'qL STARTFLAG THREADCOUNT NEXTTHREAD'
+     Obtain thread information from RTOS. Where: STARTFLAG (one hex
      digit) is one to indicate the first query and zero to indicate a
      subsequent query; THREADCOUNT (two hex digits) is the maximum
      number of threads the response packet can contain; and NEXTTHREAD
      (eight hex digits), for subsequent queries (STARTFLAG is zero), is
      returned in the response as ARGTHREAD.
 
-     Don't use this packet; use the `qfThreadInfo' query instead (see
+     Don't use this packet; use the 'qfThreadInfo' query instead (see
      above).
 
      Reply:
-    `qM COUNT DONE ARGTHREAD THREAD...'
+     'qM COUNT DONE ARGTHREAD THREAD...'
           Where: COUNT (two hex digits) is the number of threads being
           returned; DONE (one hex digit) is zero to indicate more
           threads and one indicates no further threads; ARGTHREADID
           (eight hex digits) is NEXTTHREAD from the request packet;
-          THREAD...  is a sequence of thread IDs, THREADID (eight hex
+          THREAD... is a sequence of thread IDs, THREADID (eight hex
           digits), from the target.  See
-          `remote.c:parse_threadlist_response()'.
+          'remote.c:parse_threadlist_response()'.
 
-`qOffsets'
+'qOffsets'
      Get section offsets that the target used when relocating the
      downloaded image.
 
      Reply:
-    `Text=XXX;Data=YYY[;Bss=ZZZ]'
-          Relocate the `Text' section by XXX from its original address.
-          Relocate the `Data' section by YYY from its original address.
+     'Text=XXX;Data=YYY[;Bss=ZZZ]'
+          Relocate the 'Text' section by XXX from its original address.
+          Relocate the 'Data' section by YYY from its original address.
           If the object file format provides segment information (e.g.
-          ELF `PT_LOAD' program headers), GDB will relocate entire
+          ELF 'PT_LOAD' program headers), GDB will relocate entire
           segments by the supplied offsets.
 
-          _Note: while a `Bss' offset may be included in the response,
-          GDB ignores this and instead applies the `Data' offset to the
-          `Bss' section._
+          _Note: while a 'Bss' offset may be included in the response,
+          GDB ignores this and instead applies the 'Data' offset to the
+          'Bss' section._
 
-    `TextSeg=XXX[;DataSeg=YYY]'
+     'TextSeg=XXX[;DataSeg=YYY]'
           Relocate the first segment of the object file, which
-          conventionally contains program code, to a starting address
-          of XXX.  If `DataSeg' is specified, relocate the second
-          segment, which conventionally contains modifiable data, to a
-          starting address of YYY.  GDB will report an error if the
-          object file does not contain segment information, or does not
-          contain at least as many segments as mentioned in the reply.
-          Extra segments are kept at fixed offsets relative to the last
+          conventionally contains program code, to a starting address of
+          XXX.  If 'DataSeg' is specified, relocate the second segment,
+          which conventionally contains modifiable data, to a starting
+          address of YYY.  GDB will report an error if the object file
+          does not contain segment information, or does not contain at
+          least as many segments as mentioned in the reply.  Extra
+          segments are kept at fixed offsets relative to the last
           relocated segment.
 
-`qP MODE THREAD-ID'
+'qP MODE THREAD-ID'
      Returns information on THREAD-ID.  Where: MODE is a hex encoded 32
      bit mode; THREAD-ID is a thread ID (*note thread-id syntax::).
 
-     Don't use this packet; use the `qThreadExtraInfo' query instead
+     Don't use this packet; use the 'qThreadExtraInfo' query instead
      (see below).
 
-     Reply: see `remote.c:remote_unpack_thread_info_response()'.
+     Reply: see 'remote.c:remote_unpack_thread_info_response()'.
 
-`QNonStop:1'
-`QNonStop:0'
-     Enter non-stop (`QNonStop:1') or all-stop (`QNonStop:0') mode.
+'QNonStop:1'
+'QNonStop:0'
+     Enter non-stop ('QNonStop:1') or all-stop ('QNonStop:0') mode.
      *Note Remote Non-Stop::, for more information.
 
      Reply:
-    `OK'
+     'OK'
           The request succeeded.
 
-    `E NN'
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
 
-    `'
-          An empty reply indicates that `QNonStop' is not supported by
+     ''
+          An empty reply indicates that 'QNonStop' is not supported by
           the stub.
 
      This packet is not probed by default; the remote stub must request
-     it, by supplying an appropriate `qSupported' response (*note
-     qSupported::).  Use of this packet is controlled by the `set
+     it, by supplying an appropriate 'qSupported' response (*note
+     qSupported::).  Use of this packet is controlled by the 'set
      non-stop' command; *note Non-Stop Mode::.
 
-`QPassSignals: SIGNAL [;SIGNAL]...'
+'QCatchSyscalls:1 [;SYSNO]...'
+'QCatchSyscalls:0'
+     Enable ('QCatchSyscalls:1') or disable ('QCatchSyscalls:0')
+     catching syscalls from the inferior process.
+
+     For 'QCatchSyscalls:1', each listed syscall SYSNO (encoded in hex)
+     should be reported to GDB.  If no syscall SYSNO is listed, every
+     system call should be reported.
+
+     Note that if a syscall not in the list is reported, GDB will still
+     filter the event according to its own list from all corresponding
+     'catch syscall' commands.  However, it is more efficient to only
+     report the requested syscalls.
+
+     Multiple 'QCatchSyscalls:1' packets do not combine; any earlier
+     'QCatchSyscalls:1' list is completely replaced by the new list.
+
+     If the inferior process execs, the state of 'QCatchSyscalls' is
+     kept for the new process too.  On targets where exec may affect
+     syscall numbers, for example with exec between 32 and 64-bit
+     processes, the client should send a new packet with the new syscall
+     list.
+
+     Reply:
+     'OK'
+          The request succeeded.
+
+     'E NN'
+          An error occurred.  NN are hex digits.
+
+     ''
+          An empty reply indicates that 'QCatchSyscalls' is not
+          supported by the stub.
+
+     Use of this packet is controlled by the 'set remote catch-syscalls'
+     command (*note set remote catch-syscalls: Remote Configuration.).
+     This packet is not probed by default; the remote stub must request
+     it, by supplying an appropriate 'qSupported' response (*note
+     qSupported::).
+
+'QPassSignals: SIGNAL [;SIGNAL]...'
      Each listed SIGNAL should be passed directly to the inferior
      process.  Signals are numbered identically to continue packets and
      stop replies (*note Stop Reply Packets::).  Each SIGNAL list item
      should be strictly greater than the previous item.  These signals
-     do not need to stop the inferior, or be reported to GDB.  All
-     other signals should be reported to GDB.  Multiple `QPassSignals'
-     packets do not combine; any earlier `QPassSignals' list is
-     completely replaced by the new list.  This packet improves
-     performance when using `handle SIGNAL nostop noprint pass'.
+     do not need to stop the inferior, or be reported to GDB.  All other
+     signals should be reported to GDB.  Multiple 'QPassSignals' packets
+     do not combine; any earlier 'QPassSignals' list is completely
+     replaced by the new list.  This packet improves performance when
+     using 'handle SIGNAL nostop noprint pass'.
 
      Reply:
-    `OK'
+     'OK'
           The request succeeded.
 
-    `E NN'
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
 
-    `'
-          An empty reply indicates that `QPassSignals' is not supported
+     ''
+          An empty reply indicates that 'QPassSignals' is not supported
           by the stub.
 
-     Use of this packet is controlled by the `set remote pass-signals'
+     Use of this packet is controlled by the 'set remote pass-signals'
      command (*note set remote pass-signals: Remote Configuration.).
      This packet is not probed by default; the remote stub must request
-     it, by supplying an appropriate `qSupported' response (*note
+     it, by supplying an appropriate 'qSupported' response (*note
      qSupported::).
 
-`QProgramSignals: SIGNAL [;SIGNAL]...'
+'QProgramSignals: SIGNAL [;SIGNAL]...'
      Each listed SIGNAL may be delivered to the inferior process.
      Others should be silently discarded.
 
      In some cases, the remote stub may need to decide whether to
      deliver a signal to the program or not without GDB involvement.
-     One example of that is while detaching -- the program's threads
-     may have stopped for signals that haven't yet had a chance of
-     being reported to GDB, and so the remote stub can use the signal
-     list specified by this packet to know whether to deliver or ignore
-     those pending signals.
+     One example of that is while detaching -- the program's threads may
+     have stopped for signals that haven't yet had a chance of being
+     reported to GDB, and so the remote stub can use the signal list
+     specified by this packet to know whether to deliver or ignore those
+     pending signals.
 
-     This does not influence whether to deliver a signal as requested
-     by a resumption packet (*note vCont packet::).
+     This does not influence whether to deliver a signal as requested by
+     a resumption packet (*note vCont packet::).
 
      Signals are numbered identically to continue packets and stop
-     replies (*note Stop Reply Packets::).  Each SIGNAL list item
-     should be strictly greater than the previous item.  Multiple
-     `QProgramSignals' packets do not combine; any earlier
-     `QProgramSignals' list is completely replaced by the new list.
+     replies (*note Stop Reply Packets::).  Each SIGNAL list item should
+     be strictly greater than the previous item.  Multiple
+     'QProgramSignals' packets do not combine; any earlier
+     'QProgramSignals' list is completely replaced by the new list.
 
      Reply:
-    `OK'
+     'OK'
           The request succeeded.
 
-    `E NN'
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
 
-    `'
-          An empty reply indicates that `QProgramSignals' is not
+     ''
+          An empty reply indicates that 'QProgramSignals' is not
           supported by the stub.
 
-     Use of this packet is controlled by the `set remote
+     Use of this packet is controlled by the 'set remote
      program-signals' command (*note set remote program-signals: Remote
      Configuration.).  This packet is not probed by default; the remote
-     stub must request it, by supplying an appropriate `qSupported'
+     stub must request it, by supplying an appropriate 'qSupported'
      response (*note qSupported::).
 
-`qRcmd,COMMAND'
+'QThreadEvents:1'
+'QThreadEvents:0'
+
+     Enable ('QThreadEvents:1') or disable ('QThreadEvents:0') reporting
+     of thread create and exit events.  *Note thread create event::, for
+     the reply specifications.  For example, this is used in non-stop
+     mode when GDB stops a set of threads and synchronously waits for
+     the their corresponding stop replies.  Without exit events, if one
+     of the threads exits, GDB would hang forever not knowing that it
+     should no longer expect a stop for that same thread.  GDB does not
+     enable this feature unless the stub reports that it supports it by
+     including 'QThreadEvents+' in its 'qSupported' reply.
+
+     Reply:
+     'OK'
+          The request succeeded.
+
+     'E NN'
+          An error occurred.  The error number NN is given as hex
+          digits.
+
+     ''
+          An empty reply indicates that 'QThreadEvents' is not supported
+          by the stub.
+
+     Use of this packet is controlled by the 'set remote thread-events'
+     command (*note set remote thread-events: Remote Configuration.).
+
+'qRcmd,COMMAND'
      COMMAND (hex encoded) is passed to the local interpreter for
      execution.  Invalid commands should be reported using the output
      string.  Before the final result packet, the target may also
-     respond with a number of intermediate `OOUTPUT' console output
+     respond with a number of intermediate 'OOUTPUT' console output
      packets.  _Implementors should note that providing access to a
      stubs's interpreter may have security implications_.
 
      Reply:
-    `OK'
+     'OK'
           A command response with no output.
-
-    `OUTPUT'
+     'OUTPUT'
           A command response with the hex encoded output string OUTPUT.
-
-    `E NN'
+     'E NN'
           Indicate a badly formed request.
+     ''
+          An empty reply indicates that 'qRcmd' is not recognized.
 
-    `'
-          An empty reply indicates that `qRcmd' is not recognized.
-
-     (Note that the `qRcmd' packet's name is separated from the command
-     by a `,', not a `:', contrary to the naming conventions above.
+     (Note that the 'qRcmd' packet's name is separated from the command
+     by a ',', not a ':', contrary to the naming conventions above.
      Please don't use this packet as a model for new packets.)
 
-`qSearch:memory:ADDRESS;LENGTH;SEARCH-PATTERN'
+'qSearch:memory:ADDRESS;LENGTH;SEARCH-PATTERN'
      Search LENGTH bytes at ADDRESS for SEARCH-PATTERN.  Both ADDRESS
      and LENGTH are encoded in hex; SEARCH-PATTERN is a sequence of
      bytes, also hex encoded.
 
      Reply:
-    `0'
+     '0'
           The pattern was not found.
-
-    `1,address'
+     '1,address'
           The pattern was found at ADDRESS.
-
-    `E NN'
+     'E NN'
           A badly formed request or an error was encountered while
           searching memory.
-
-    `'
-          An empty reply indicates that `qSearch:memory' is not
+     ''
+          An empty reply indicates that 'qSearch:memory' is not
           recognized.
 
-`QStartNoAckMode'
-     Request that the remote stub disable the normal `+'/`-' protocol
+'QStartNoAckMode'
+     Request that the remote stub disable the normal '+'/'-' protocol
      acknowledgments (*note Packet Acknowledgment::).
 
      Reply:
-    `OK'
+     'OK'
           The stub has switched to no-acknowledgment mode.  GDB
           acknowledges this reponse, but neither the stub nor GDB shall
-          send or expect further `+'/`-' acknowledgments in the current
+          send or expect further '+'/'-' acknowledgments in the current
           connection.
-
-    `'
+     ''
           An empty reply indicates that the stub does not support
           no-acknowledgment mode.
 
-`qSupported [:GDBFEATURE [;GDBFEATURE]... ]'
-     Tell the remote stub about features supported by GDB, and query
-     the stub for features it supports.  This packet allows GDB and the
+'qSupported [:GDBFEATURE [;GDBFEATURE]... ]'
+     Tell the remote stub about features supported by GDB, and query the
+     stub for features it supports.  This packet allows GDB and the
      remote stub to take advantage of each others' features.
-     `qSupported' also consolidates multiple feature probes at startup,
+     'qSupported' also consolidates multiple feature probes at startup,
      to improve GDB performance--a single larger packet performs better
      than multiple smaller probe packets on high-latency links.  Some
      features may enable behavior which must not be on by default, e.g.
      because it would confuse older clients or stubs.  Other features
      may describe packets which could be automatically probed for, but
-     are not.  These features must be reported before GDB will use
-     them.  This "default unsupported" behavior is not appropriate for
-     all packets, but it helps to keep the initial connection time
-     under control with new versions of GDB which support increasing
-     numbers of packets.
+     are not.  These features must be reported before GDB will use them.
+     This "default unsupported" behavior is not appropriate for all
+     packets, but it helps to keep the initial connection time under
+     control with new versions of GDB which support increasing numbers
+     of packets.
 
      Reply:
-    `STUBFEATURE [;STUBFEATURE]...'
+     'STUBFEATURE [;STUBFEATURE]...'
           The stub supports or does not support each returned
           STUBFEATURE, depending on the form of each STUBFEATURE (see
           below for the possible forms).
-
-    `'
-          An empty reply indicates that `qSupported' is not recognized,
+     ''
+          An empty reply indicates that 'qSupported' is not recognized,
           or that no features needed to be reported to GDB.
 
      The allowed forms for each feature (either a GDBFEATURE in the
-     `qSupported' packet, or a STUBFEATURE in the response) are:
+     'qSupported' packet, or a STUBFEATURE in the response) are:
 
-    `NAME=VALUE'
+     'NAME=VALUE'
           The remote protocol feature NAME is supported, and associated
           with the specified VALUE.  The format of VALUE depends on the
           feature, but it must not include a semicolon.
-
-    `NAME+'
+     'NAME+'
           The remote protocol feature NAME is supported, and does not
           need an associated value.
-
-    `NAME-'
+     'NAME-'
           The remote protocol feature NAME is not supported.
-
-    `NAME?'
+     'NAME?'
           The remote protocol feature NAME may be supported, and GDB
           should auto-detect support in some other way when it is
           needed.  This form will not be used for GDBFEATURE
           notifications, but may be used for STUBFEATURE responses.
 
-     Whenever the stub receives a `qSupported' request, the supplied
-     set of GDB features should override any previous request.  This
-     allows GDB to put the stub in a known state, even if the stub had
+     Whenever the stub receives a 'qSupported' request, the supplied set
+     of GDB features should override any previous request.  This allows
+     GDB to put the stub in a known state, even if the stub had
      previously been communicating with a different version of GDB.
 
-     The following values of GDBFEATURE (for the packet sent by GDB)
-     are defined:
+     The following values of GDBFEATURE (for the packet sent by GDB) are
+     defined:
 
-    `multiprocess'
+     'multiprocess'
           This feature indicates whether GDB supports multiprocess
           extensions to the remote protocol.  GDB does not use such
           extensions unless the stub also reports that it supports them
-          by including `multiprocess+' in its `qSupported' reply.
-          *Note multiprocess extensions::, for details.
+          by including 'multiprocess+' in its 'qSupported' reply.  *Note
+          multiprocess extensions::, for details.
 
-    `xmlRegisters'
+     'xmlRegisters'
           This feature indicates that GDB supports the XML target
-          description.  If the stub sees `xmlRegisters=' with target
+          description.  If the stub sees 'xmlRegisters=' with target
           specific strings separated by a comma, it will report register
           description.
 
-    `qRelocInsn'
-          This feature indicates whether GDB supports the `qRelocInsn'
+     'qRelocInsn'
+          This feature indicates whether GDB supports the 'qRelocInsn'
           packet (*note Relocate instruction reply packet: Tracepoint
           Packets.).
 
-    `swbreak'
+     'swbreak'
           This feature indicates whether GDB supports the swbreak stop
           reason in stop replies.  *Note swbreak stop reason::, for
           details.
 
-    `hwbreak'
+     'hwbreak'
           This feature indicates whether GDB supports the hwbreak stop
           reason in stop replies.  *Note swbreak stop reason::, for
           details.
 
-    `fork-events'
+     'fork-events'
           This feature indicates whether GDB supports fork event
           extensions to the remote protocol.  GDB does not use such
           extensions unless the stub also reports that it supports them
-          by including `fork-events+' in its `qSupported' reply.
+          by including 'fork-events+' in its 'qSupported' reply.
 
-    `vfork-events'
+     'vfork-events'
           This feature indicates whether GDB supports vfork event
           extensions to the remote protocol.  GDB does not use such
           extensions unless the stub also reports that it supports them
-          by including `vfork-events+' in its `qSupported' reply.
+          by including 'vfork-events+' in its 'qSupported' reply.
+
+     'exec-events'
+          This feature indicates whether GDB supports exec event
+          extensions to the remote protocol.  GDB does not use such
+          extensions unless the stub also reports that it supports them
+          by including 'exec-events+' in its 'qSupported' reply.
+
+     'vContSupported'
+          This feature indicates whether GDB wants to know the supported
+          actions in the reply to 'vCont?' packet.
 
      Stubs should ignore any unknown values for GDBFEATURE.  Any GDB
-     which sends a `qSupported' packet supports receiving packets of
+     which sends a 'qSupported' packet supports receiving packets of
      unlimited length (earlier versions of GDB may reject overly long
-     responses).  Additional values for GDBFEATURE may be defined in
-     the future to let the stub take advantage of new features in GDB,
-     e.g. incompatible improvements in the remote protocol--the
-     `multiprocess' feature is an example of such a feature.  The
-     stub's reply should be independent of the GDBFEATURE entries sent
-     by GDB; first GDB describes all the features it supports, and then
-     the stub replies with all the features it supports.
+     responses).  Additional values for GDBFEATURE may be defined in the
+     future to let the stub take advantage of new features in GDB, e.g.
+     incompatible improvements in the remote protocol--the
+     'multiprocess' feature is an example of such a feature.  The stub's
+     reply should be independent of the GDBFEATURE entries sent by GDB;
+     first GDB describes all the features it supports, and then the stub
+     replies with all the features it supports.
 
      Similarly, GDB will silently ignore unrecognized stub feature
      responses, as long as each response uses one of the standard forms.
 
      Some features are flags.  A stub which supports a flag feature
-     should respond with a `+' form response.  Other features require
-     values, and the stub should respond with an `=' form response.
+     should respond with a '+' form response.  Other features require
+     values, and the stub should respond with an '=' form response.
 
      Each feature has a default value, which GDB will use if
-     `qSupported' is not available or if the feature is not mentioned
-     in the `qSupported' response.  The default values are fixed; a
-     stub is free to omit any feature responses that match the defaults.
+     'qSupported' is not available or if the feature is not mentioned in
+     the 'qSupported' response.  The default values are fixed; a stub is
+     free to omit any feature responses that match the defaults.
 
      Not all features can be probed, but for those which can, the
      probing mechanism is useful: in some cases, a stub's internal
@@ -2592,275 +3477,343 @@ GDB packet uses spaces to separate its c
 
      These are the currently defined stub features and their properties:
 
-     Feature Name            Value         Default  Probe Allowed
-                             Required               
-     `PacketSize'            Yes           `-'      No
-     `qXfer:auxv:read'       No            `-'      Yes
-     `qXfer:btrace:read'     No            `-'      Yes
-     `qXfer:btrace-conf:read'No            `-'      Yes
-     `qXfer:exec-file:read'  No            `-'      Yes
-     `qXfer:features:read'   No            `-'      Yes
-     `qXfer:libraries:read'  No            `-'      Yes
-     `qXfer:libraries-svr4:read'No            `-'      Yes
-     `augmented-libraries-svr4-read'No            `-'      No
-     `qXfer:memory-map:read' No            `-'      Yes
-     `qXfer:sdata:read'      No            `-'      Yes
-     `qXfer:spu:read'        No            `-'      Yes
-     `qXfer:spu:write'       No            `-'      Yes
-     `qXfer:siginfo:read'    No            `-'      Yes
-     `qXfer:siginfo:write'   No            `-'      Yes
-     `qXfer:threads:read'    No            `-'      Yes
-     `qXfer:traceframe-info:read'No            `-'      Yes
-     `qXfer:uib:read'        No            `-'      Yes
-     `qXfer:fdpic:read'      No            `-'      Yes
-     `Qbtrace:off'           Yes           `-'      Yes
-     `Qbtrace:bts'           Yes           `-'      Yes
-     `Qbtrace:pt'            Yes           `-'      Yes
-     `Qbtrace-conf:bts:size' Yes           `-'      Yes
-     `Qbtrace-conf:pt:size'  Yes           `-'      Yes
-     `QNonStop'              No            `-'      Yes
-     `QPassSignals'          No            `-'      Yes
-     `QStartNoAckMode'       No            `-'      Yes
-     `multiprocess'          No            `-'      No
-     `ConditionalBreakpoints'No            `-'      No
-     `ConditionalTracepoints'No            `-'      No
-     `ReverseContinue'       No            `-'      No
-     `ReverseStep'           No            `-'      No
-     `TracepointSource'      No            `-'      No
-     `QAgent'                No            `-'      No
-     `QAllow'                No            `-'      No
-     `QDisableRandomization' No            `-'      No
-     `EnableDisableTracepoints'No            `-'      No
-     `QTBuffer:size'         No            `-'      No
-     `tracenz'               No            `-'      No
-     `BreakpointCommands'    No            `-'      No
-     `swbreak'               No            `-'      No
-     `hwbreak'               No            `-'      No
-     `fork-events'           No            `-'      No
-     `vfork-events'          No            `-'      No
+     Feature Name              Value          Default   Probe
+                               Required                 Allowed
+                                                        
+     'PacketSize'              Yes            '-'       No
+                                                        
+     'qXfer:auxv:read'         No             '-'       Yes
+                                                        
+     'qXfer:btrace:read'       No             '-'       Yes
+                                                        
+     'qXfer:btrace-conf:read'  No             '-'       Yes
+                                                        
+     'qXfer:exec-file:read'    No             '-'       Yes
+                                                        
+     'qXfer:features:read'     No             '-'       Yes
+                                                        
+     'qXfer:libraries:read'    No             '-'       Yes
+                                                        
+     'qXfer:libraries-svr4:read'No            '-'       Yes
+                                                        
+     'augmented-libraries-svr4-read'No        '-'       No
+                                                        
+     'qXfer:memory-map:read'   No             '-'       Yes
+                                                        
+     'qXfer:sdata:read'        No             '-'       Yes
+                                                        
+     'qXfer:spu:read'          No             '-'       Yes
+                                                        
+     'qXfer:spu:write'         No             '-'       Yes
+                                                        
+     'qXfer:siginfo:read'      No             '-'       Yes
+                                                        
+     'qXfer:siginfo:write'     No             '-'       Yes
+                                                        
+     'qXfer:threads:read'      No             '-'       Yes
+                                                        
+     'qXfer:traceframe-info:read'No           '-'       Yes
+                                                        
+     'qXfer:uib:read'          No             '-'       Yes
+                                                        
+     'qXfer:fdpic:read'        No             '-'       Yes
+                                                        
+     'Qbtrace:off'             Yes            '-'       Yes
+                                                        
+     'Qbtrace:bts'             Yes            '-'       Yes
+                                                        
+     'Qbtrace:pt'              Yes            '-'       Yes
+                                                        
+     'Qbtrace-conf:bts:size'   Yes            '-'       Yes
+                                                        
+     'Qbtrace-conf:pt:size'    Yes            '-'       Yes
+                                                        
+     'QNonStop'                No             '-'       Yes
+                                                        
+     'QCatchSyscalls'          No             '-'       Yes
+                                                        
+     'QPassSignals'            No             '-'       Yes
+                                                        
+     'QStartNoAckMode'         No             '-'       Yes
+                                                        
+     'multiprocess'            No             '-'       No
+                                                        
+     'ConditionalBreakpoints'  No             '-'       No
+                                                        
+     'ConditionalTracepoints'  No             '-'       No
+                                                        
+     'ReverseContinue'         No             '-'       No
+                                                        
+     'ReverseStep'             No             '-'       No
+                                                        
+     'TracepointSource'        No             '-'       No
+                                                        
+     'QAgent'                  No             '-'       No
+                                                        
+     'QAllow'                  No             '-'       No
+                                                        
+     'QDisableRandomization'   No             '-'       No
+                                                        
+     'EnableDisableTracepoints'No             '-'       No
+                                                        
+     'QTBuffer:size'           No             '-'       No
+                                                        
+     'tracenz'                 No             '-'       No
+                                                        
+     'BreakpointCommands'      No             '-'       No
+                                                        
+     'swbreak'                 No             '-'       No
+                                                        
+     'hwbreak'                 No             '-'       No
+                                                        
+     'fork-events'             No             '-'       No
+                                                        
+     'vfork-events'            No             '-'       No
+                                                        
+     'exec-events'             No             '-'       No
+                                                        
+     'QThreadEvents'           No             '-'       No
+                                                        
+     'no-resumed'              No             '-'       No
+                                                        
 
      These are the currently defined stub features, in more detail:
 
-    `PacketSize=BYTES'
+     'PacketSize=BYTES'
           The remote stub can accept packets up to at least BYTES in
           length.  GDB will send packets up to this size for bulk
           transfers, and will never send larger packets.  This is a
           limit on the data characters in the packet, including the
-          frame and checksum.  There is no trailing NUL byte in a
-          remote protocol packet; if the stub stores packets in a
+          frame and checksum.  There is no trailing NUL byte in a remote
+          protocol packet; if the stub stores packets in a
           NUL-terminated format, it should allow an extra byte in its
-          buffer for the NUL.  If this stub feature is not supported,
-          GDB guesses based on the size of the `g' packet response.
+          buffer for the NUL. If this stub feature is not supported, GDB
+          guesses based on the size of the 'g' packet response.
 
-    `qXfer:auxv:read'
-          The remote stub understands the `qXfer:auxv:read' packet
+     'qXfer:auxv:read'
+          The remote stub understands the 'qXfer:auxv:read' packet
           (*note qXfer auxiliary vector read::).
 
-    `qXfer:btrace:read'
-          The remote stub understands the `qXfer:btrace:read' packet
+     'qXfer:btrace:read'
+          The remote stub understands the 'qXfer:btrace:read' packet
           (*note qXfer btrace read::).
 
-    `qXfer:btrace-conf:read'
-          The remote stub understands the `qXfer:btrace-conf:read'
+     'qXfer:btrace-conf:read'
+          The remote stub understands the 'qXfer:btrace-conf:read'
           packet (*note qXfer btrace-conf read::).
 
-    `qXfer:exec-file:read'
-          The remote stub understands the `qXfer:exec-file:read' packet
+     'qXfer:exec-file:read'
+          The remote stub understands the 'qXfer:exec-file:read' packet
           (*note qXfer executable filename read::).
 
-    `qXfer:features:read'
-          The remote stub understands the `qXfer:features:read' packet
+     'qXfer:features:read'
+          The remote stub understands the 'qXfer:features:read' packet
           (*note qXfer target description read::).
 
-    `qXfer:libraries:read'
-          The remote stub understands the `qXfer:libraries:read' packet
+     'qXfer:libraries:read'
+          The remote stub understands the 'qXfer:libraries:read' packet
           (*note qXfer library list read::).
 
-    `qXfer:libraries-svr4:read'
-          The remote stub understands the `qXfer:libraries-svr4:read'
+     'qXfer:libraries-svr4:read'
+          The remote stub understands the 'qXfer:libraries-svr4:read'
           packet (*note qXfer svr4 library list read::).
 
-    `augmented-libraries-svr4-read'
+     'augmented-libraries-svr4-read'
           The remote stub understands the augmented form of the
-          `qXfer:libraries-svr4:read' packet (*note qXfer svr4 library
+          'qXfer:libraries-svr4:read' packet (*note qXfer svr4 library
           list read::).
 
-    `qXfer:memory-map:read'
-          The remote stub understands the `qXfer:memory-map:read' packet
+     'qXfer:memory-map:read'
+          The remote stub understands the 'qXfer:memory-map:read' packet
           (*note qXfer memory map read::).
 
-    `qXfer:sdata:read'
-          The remote stub understands the `qXfer:sdata:read' packet
+     'qXfer:sdata:read'
+          The remote stub understands the 'qXfer:sdata:read' packet
           (*note qXfer sdata read::).
 
-    `qXfer:spu:read'
-          The remote stub understands the `qXfer:spu:read' packet
-          (*note qXfer spu read::).
+     'qXfer:spu:read'
+          The remote stub understands the 'qXfer:spu:read' packet (*note
+          qXfer spu read::).
 
-    `qXfer:spu:write'
-          The remote stub understands the `qXfer:spu:write' packet
+     'qXfer:spu:write'
+          The remote stub understands the 'qXfer:spu:write' packet
           (*note qXfer spu write::).
 
-    `qXfer:siginfo:read'
-          The remote stub understands the `qXfer:siginfo:read' packet
+     'qXfer:siginfo:read'
+          The remote stub understands the 'qXfer:siginfo:read' packet
           (*note qXfer siginfo read::).
 
-    `qXfer:siginfo:write'
-          The remote stub understands the `qXfer:siginfo:write' packet
+     'qXfer:siginfo:write'
+          The remote stub understands the 'qXfer:siginfo:write' packet
           (*note qXfer siginfo write::).
 
-    `qXfer:threads:read'
-          The remote stub understands the `qXfer:threads:read' packet
+     'qXfer:threads:read'
+          The remote stub understands the 'qXfer:threads:read' packet
           (*note qXfer threads read::).
 
-    `qXfer:traceframe-info:read'
-          The remote stub understands the `qXfer:traceframe-info:read'
+     'qXfer:traceframe-info:read'
+          The remote stub understands the 'qXfer:traceframe-info:read'
           packet (*note qXfer traceframe info read::).
 
-    `qXfer:uib:read'
-          The remote stub understands the `qXfer:uib:read' packet
-          (*note qXfer unwind info block::).
+     'qXfer:uib:read'
+          The remote stub understands the 'qXfer:uib:read' packet (*note
+          qXfer unwind info block::).
 
-    `qXfer:fdpic:read'
-          The remote stub understands the `qXfer:fdpic:read' packet
+     'qXfer:fdpic:read'
+          The remote stub understands the 'qXfer:fdpic:read' packet
           (*note qXfer fdpic loadmap read::).
 
-    `QNonStop'
-          The remote stub understands the `QNonStop' packet (*note
+     'QNonStop'
+          The remote stub understands the 'QNonStop' packet (*note
           QNonStop::).
 
-    `QPassSignals'
-          The remote stub understands the `QPassSignals' packet (*note
+     'QCatchSyscalls'
+          The remote stub understands the 'QCatchSyscalls' packet (*note
+          QCatchSyscalls::).
+
+     'QPassSignals'
+          The remote stub understands the 'QPassSignals' packet (*note
           QPassSignals::).
 
-    `QStartNoAckMode'
-          The remote stub understands the `QStartNoAckMode' packet and
+     'QStartNoAckMode'
+          The remote stub understands the 'QStartNoAckMode' packet and
           prefers to operate in no-acknowledgment mode.  *Note Packet
           Acknowledgment::.
 
-    `multiprocess'
-          The remote stub understands the multiprocess extensions to
-          the remote protocol syntax.  The multiprocess extensions
-          affect the syntax of thread IDs in both packets and replies
-          (*note thread-id syntax::), and add process IDs to the `D'
-          packet and `W' and `X' replies.  Note that reporting this
-          feature indicates support for the syntactic extensions only,
-          not that the stub necessarily supports debugging of more than
-          one process at a time.  The stub must not use multiprocess
+     'multiprocess'
+          The remote stub understands the multiprocess extensions to the
+          remote protocol syntax.  The multiprocess extensions affect
+          the syntax of thread IDs in both packets and replies (*note
+          thread-id syntax::), and add process IDs to the 'D' packet and
+          'W' and 'X' replies.  Note that reporting this feature
+          indicates support for the syntactic extensions only, not that
+          the stub necessarily supports debugging of more than one
+          process at a time.  The stub must not use multiprocess
           extensions in packet replies unless GDB has also indicated it
-          supports them in its `qSupported' request.
+          supports them in its 'qSupported' request.
 
-    `qXfer:osdata:read'
-          The remote stub understands the `qXfer:osdata:read' packet
+     'qXfer:osdata:read'
+          The remote stub understands the 'qXfer:osdata:read' packet
           ((*note qXfer osdata read::).
 
-    `ConditionalBreakpoints'
+     'ConditionalBreakpoints'
           The target accepts and implements evaluation of conditional
           expressions defined for breakpoints.  The target will only
           report breakpoint triggers when such conditions are true
           (*note Break Conditions: Conditions.).
 
-    `ConditionalTracepoints'
-          The remote stub accepts and implements conditional
-          expressions defined for tracepoints (*note Tracepoint
-          Conditions::).
+     'ConditionalTracepoints'
+          The remote stub accepts and implements conditional expressions
+          defined for tracepoints (*note Tracepoint Conditions::).
 
-    `ReverseContinue'
+     'ReverseContinue'
           The remote stub accepts and implements the reverse continue
           packet (*note bc::).
 
-    `ReverseStep'
+     'ReverseStep'
           The remote stub accepts and implements the reverse step packet
           (*note bs::).
 
-    `TracepointSource'
-          The remote stub understands the `QTDPsrc' packet that supplies
+     'TracepointSource'
+          The remote stub understands the 'QTDPsrc' packet that supplies
           the source form of tracepoint definitions.
 
-    `QAgent'
-          The remote stub understands the `QAgent' packet.
+     'QAgent'
+          The remote stub understands the 'QAgent' packet.
 
-    `QAllow'
-          The remote stub understands the `QAllow' packet.
+     'QAllow'
+          The remote stub understands the 'QAllow' packet.
 
-    `QDisableRandomization'
-          The remote stub understands the `QDisableRandomization'
+     'QDisableRandomization'
+          The remote stub understands the 'QDisableRandomization'
           packet.
 
-    `StaticTracepoint'
+     'StaticTracepoint'
           The remote stub supports static tracepoints.
 
-    `InstallInTrace'
+     'InstallInTrace'
           The remote stub supports installing tracepoint in tracing.
 
-    `EnableDisableTracepoints'
-          The remote stub supports the `QTEnable' (*note QTEnable::) and
-          `QTDisable' (*note QTDisable::) packets that allow tracepoints
+     'EnableDisableTracepoints'
+          The remote stub supports the 'QTEnable' (*note QTEnable::) and
+          'QTDisable' (*note QTDisable::) packets that allow tracepoints
           to be enabled and disabled while a trace experiment is
           running.
 
-    `QTBuffer:size'
-          The remote stub supports the `QTBuffer:size' (*note
+     'QTBuffer:size'
+          The remote stub supports the 'QTBuffer:size' (*note
           QTBuffer-size::) packet that allows to change the size of the
           trace buffer.
 
-    `tracenz'
-          The remote stub supports the `tracenz' bytecode for
-          collecting strings.  See *note Bytecode Descriptions:: for
-          details about the bytecode.
+     'tracenz'
+          The remote stub supports the 'tracenz' bytecode for collecting
+          strings.  See *note Bytecode Descriptions:: for details about
+          the bytecode.
 
-    `BreakpointCommands'
+     'BreakpointCommands'
           The remote stub supports running a breakpoint's command list
           itself, rather than reporting the hit to GDB.
 
-    `Qbtrace:off'
-          The remote stub understands the `Qbtrace:off' packet.
+     'Qbtrace:off'
+          The remote stub understands the 'Qbtrace:off' packet.
 
-    `Qbtrace:bts'
-          The remote stub understands the `Qbtrace:bts' packet.
+     'Qbtrace:bts'
+          The remote stub understands the 'Qbtrace:bts' packet.
 
-    `Qbtrace:pt'
-          The remote stub understands the `Qbtrace:pt' packet.
+     'Qbtrace:pt'
+          The remote stub understands the 'Qbtrace:pt' packet.
 
-    `Qbtrace-conf:bts:size'
-          The remote stub understands the `Qbtrace-conf:bts:size'
+     'Qbtrace-conf:bts:size'
+          The remote stub understands the 'Qbtrace-conf:bts:size'
           packet.
 
-    `Qbtrace-conf:pt:size'
-          The remote stub understands the `Qbtrace-conf:pt:size' packet.
+     'Qbtrace-conf:pt:size'
+          The remote stub understands the 'Qbtrace-conf:pt:size' packet.
 
-    `swbreak'
-          The remote stub reports the `swbreak' stop reason for memory
+     'swbreak'
+          The remote stub reports the 'swbreak' stop reason for memory
           breakpoints.
 
-    `hwbreak'
-          The remote stub reports the `hwbreak' stop reason for hardware
+     'hwbreak'
+          The remote stub reports the 'hwbreak' stop reason for hardware
           breakpoints.
 
-    `fork-events'
-          The remote stub reports the `fork' stop reason for fork
+     'fork-events'
+          The remote stub reports the 'fork' stop reason for fork
           events.
 
-    `vfork-events'
-          The remote stub reports the `vfork' stop reason for vfork
+     'vfork-events'
+          The remote stub reports the 'vfork' stop reason for vfork
           events and vforkdone events.
 
+     'exec-events'
+          The remote stub reports the 'exec' stop reason for exec
+          events.
+
+     'vContSupported'
+          The remote stub reports the supported actions in the reply to
+          'vCont?' packet.
+
+     'QThreadEvents'
+          The remote stub understands the 'QThreadEvents' packet.
 
-`qSymbol::'
+     'no-resumed'
+          The remote stub reports the 'N' stop reply.
+
+'qSymbol::'
      Notify the target that GDB is prepared to serve symbol lookup
      requests.  Accept requests from the target for the values of
      symbols.
 
      Reply:
-    `OK'
+     'OK'
           The target does not need to look up any (more) symbols.
-
-    `qSymbol:SYM_NAME'
+     'qSymbol:SYM_NAME'
           The target requests the value of symbol SYM_NAME (hex
           encoded).  GDB may provide the value by using the
-          `qSymbol:SYM_VALUE:SYM_NAME' message, described below.
+          'qSymbol:SYM_VALUE:SYM_NAME' message, described below.
 
-`qSymbol:SYM_VALUE:SYM_NAME'
+'qSymbol:SYM_VALUE:SYM_NAME'
      Set the value of SYM_NAME to SYM_VALUE.
 
      SYM_NAME (hex encoded) is the name of a symbol whose value the
@@ -2870,142 +3823,171 @@ GDB packet uses spaces to separate its c
      supply a value for SYM_NAME, then this field will be empty.
 
      Reply:
-    `OK'
+     'OK'
           The target does not need to look up any (more) symbols.
-
-    `qSymbol:SYM_NAME'
+     'qSymbol:SYM_NAME'
           The target requests the value of a new symbol SYM_NAME (hex
           encoded).  GDB will continue to supply the values of symbols
           (if available), until the target ceases to request them.
 
-`qTBuffer'
-`QTBuffer'
-`QTDisconnected'
-`QTDP'
-`QTDPsrc'
-`QTDV'
-`qTfP'
-`qTfV'
-`QTFrame'
-`qTMinFTPILen'
+'qTBuffer'
+'QTBuffer'
+'QTDisconnected'
+'QTDP'
+'QTDPsrc'
+'QTDV'
+'qTfP'
+'qTfV'
+'QTFrame'
+'qTMinFTPILen'
+
      *Note Tracepoint Packets::.
 
-`qThreadExtraInfo,THREAD-ID'
+'qThreadExtraInfo,THREAD-ID'
      Obtain from the target OS a printable string description of thread
      attributes for the thread THREAD-ID; see *note thread-id syntax::,
      for the forms of THREAD-ID.  This string may contain anything that
      the target OS thinks is interesting for GDB to tell the user about
-     the thread.  The string is displayed in GDB's `info threads'
+     the thread.  The string is displayed in GDB's 'info threads'
      display.  Some examples of possible thread extra info strings are
-     `Runnable', or `Blocked on Mutex'.
+     'Runnable', or 'Blocked on Mutex'.
 
      Reply:
-    `XX...'
-          Where `XX...' is a hex encoding of ASCII data, comprising the
+     'XX...'
+          Where 'XX...' is a hex encoding of ASCII data, comprising the
           printable string containing the extra information about the
           thread's attributes.
 
-     (Note that the `qThreadExtraInfo' packet's name is separated from
-     the command by a `,', not a `:', contrary to the naming
-     conventions above.  Please don't use this packet as a model for new
-     packets.)
-
-`QTNotes'
-`qTP'
-`QTSave'
-`qTsP'
-`qTsV'
-`QTStart'
-`QTStop'
-`QTEnable'
-`QTDisable'
-`QTinit'
-`QTro'
-`qTStatus'
-`qTV'
-`qTfSTM'
-`qTsSTM'
-`qTSTMat'
+     (Note that the 'qThreadExtraInfo' packet's name is separated from
+     the command by a ',', not a ':', contrary to the naming conventions
+     above.  Please don't use this packet as a model for new packets.)
+
+'QTNotes'
+'qTP'
+'QTSave'
+'qTsP'
+'qTsV'
+'QTStart'
+'QTStop'
+'QTEnable'
+'QTDisable'
+'QTinit'
+'QTro'
+'qTStatus'
+'qTV'
+'qTfSTM'
+'qTsSTM'
+'qTSTMat'
      *Note Tracepoint Packets::.
 
-`qXfer:OBJECT:read:ANNEX:OFFSET,LENGTH'
+'qXfer:OBJECT:read:ANNEX:OFFSET,LENGTH'
      Read uninterpreted bytes from the target's special data area
-     identified by the keyword OBJECT.  Request LENGTH bytes starting
-     at OFFSET bytes into the data.  The content and encoding of ANNEX
-     is specific to OBJECT; it can supply additional details about what
+     identified by the keyword OBJECT.  Request LENGTH bytes starting at
+     OFFSET bytes into the data.  The content and encoding of ANNEX is
+     specific to OBJECT; it can supply additional details about what
      data to access.
 
+     Reply:
+     'm DATA'
+          Data DATA (*note Binary Data::) has been read from the target.
+          There may be more data at a higher address (although it is
+          permitted to return 'm' even for the last valid block of data,
+          as long as at least one byte of data was read).  It is
+          possible for DATA to have fewer bytes than the LENGTH in the
+          request.
+
+     'l DATA'
+          Data DATA (*note Binary Data::) has been read from the target.
+          There is no more data to be read.  It is possible for DATA to
+          have fewer bytes than the LENGTH in the request.
+
+     'l'
+          The OFFSET in the request is at the end of the data.  There is
+          no more data to be read.
+
+     'E00'
+          The request was malformed, or ANNEX was invalid.
+
+     'E NN'
+          The offset was invalid, or there was an error encountered
+          reading the data.  The NN part is a hex-encoded 'errno' value.
+
+     ''
+          An empty reply indicates the OBJECT string was not recognized
+          by the stub, or that the object does not support reading.
+
      Here are the specific requests of this form defined so far.  All
-     `qXfer:OBJECT:read:...' requests use the same reply formats,
-     listed below.
+     the 'qXfer:OBJECT:read:...' requests use the same reply formats,
+     listed above.
 
-    `qXfer:auxv:read::OFFSET,LENGTH'
+     'qXfer:auxv:read::OFFSET,LENGTH'
           Access the target's "auxiliary vector".  *Note auxiliary
           vector: OS Information.  Note ANNEX must be empty.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:btrace:read:ANNEX:OFFSET,LENGTH'
+     'qXfer:btrace:read:ANNEX:OFFSET,LENGTH'
+
           Return a description of the current branch trace.  *Note
-          Branch Trace Format::.  The annex part of the generic `qXfer'
+          Branch Trace Format::.  The annex part of the generic 'qXfer'
           packet may have one of the following values:
 
-         `all'
+          'all'
                Returns all available branch trace.
 
-         `new'
+          'new'
                Returns all available branch trace if the branch trace
                changed since the last read request.
 
-         `delta'
-               Returns the new branch trace since the last read
-               request.  Adds a new block to the end of the trace that
-               begins at zero and ends at the source location of the
-               first branch in the trace buffer.  This extra block is
-               used to stitch traces together.
+          'delta'
+               Returns the new branch trace since the last read request.
+               Adds a new block to the end of the trace that begins at
+               zero and ends at the source location of the first branch
+               in the trace buffer.  This extra block is used to stitch
+               traces together.
 
                If the trace buffer overflowed, returns an error
                indicating the overflow.
 
           This packet is not probed by default; the remote stub must
-          request it by supplying an appropriate `qSupported' response
+          request it by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:btrace-conf:read::OFFSET,LENGTH'
+     'qXfer:btrace-conf:read::OFFSET,LENGTH'
+
           Return a description of the current branch trace
           configuration.  *Note Branch Trace Configuration Format::.
 
           This packet is not probed by default; the remote stub must
-          request it by supplying an appropriate `qSupported' response
+          request it by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:exec-file:read:ANNEX:OFFSET,LENGTH'
-          Return the full absolute name of the file that was executed
-          to create a process running on the remote system.  The annex
+     'qXfer:exec-file:read:ANNEX:OFFSET,LENGTH'
+          Return the full absolute name of the file that was executed to
+          create a process running on the remote system.  The annex
           specifies the numeric process ID of the process to query,
           encoded as a hexadecimal number.  If the annex part is empty
           the remote stub should return the filename corresponding to
           the currently executing process.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:features:read:ANNEX:OFFSET,LENGTH'
-          Access the "target description".  *Note Target
-          Descriptions::.  The annex specifies which XML document to
-          access.  The main description is always loaded from the
-          `target.xml' annex.
+     'qXfer:features:read:ANNEX:OFFSET,LENGTH'
+          Access the "target description".  *Note Target Descriptions::.
+          The annex specifies which XML document to access.  The main
+          description is always loaded from the 'target.xml' annex.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:libraries:read:ANNEX:OFFSET,LENGTH'
+     'qXfer:libraries:read:ANNEX:OFFSET,LENGTH'
           Access the target's list of loaded libraries.  *Note Library
-          List Format::.  The annex part of the generic `qXfer' packet
+          List Format::.  The annex part of the generic 'qXfer' packet
           must be empty (*note qXfer read::).
 
           Targets which maintain a list of libraries in the program's
@@ -3014,16 +3996,16 @@ GDB packet uses spaces to separate its c
           loaded libraries.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:libraries-svr4:read:ANNEX:OFFSET,LENGTH'
+     'qXfer:libraries-svr4:read:ANNEX:OFFSET,LENGTH'
           Access the target's list of loaded libraries when the target
           is an SVR4 platform.  *Note Library List Format for SVR4
-          Targets::.  The annex part of the generic `qXfer' packet must
+          Targets::.  The annex part of the generic 'qXfer' packet must
           be empty unless the remote stub indicated it supports the
           augmented form of this packet by supplying an appropriate
-          `qSupported' response (*note qXfer read::, *note
+          'qSupported' response (*note qXfer read::, *note
           qSupported::).
 
           This packet is optional for better performance on SVR4
@@ -3031,275 +4013,239 @@ GDB packet uses spaces to separate its c
           library list otherwise.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-          If the remote stub indicates it supports the augmented form
-          of this packet then the annex part of the generic `qXfer'
-          packet may contain a semicolon-separated list of `NAME=VALUE'
+          If the remote stub indicates it supports the augmented form of
+          this packet then the annex part of the generic 'qXfer' packet
+          may contain a semicolon-separated list of 'NAME=VALUE'
           arguments.  The currently supported arguments are:
 
-         `start=ADDRESS'
+          'start=ADDRESS'
                A hexadecimal number specifying the address of the
-               `struct link_map' to start reading the library list
-               from.  If unset or zero then the first `struct link_map'
-               in the library list will be chosen as the starting point.
+               'struct link_map' to start reading the library list from.
+               If unset or zero then the first 'struct link_map' in the
+               library list will be chosen as the starting point.
 
-         `prev=ADDRESS'
+          'prev=ADDRESS'
                A hexadecimal number specifying the address of the
-               `struct link_map' immediately preceding the `struct
-               link_map' specified by the `start' argument.  If unset
-               or zero then the remote stub will expect that no `struct
+               'struct link_map' immediately preceding the 'struct
+               link_map' specified by the 'start' argument.  If unset or
+               zero then the remote stub will expect that no 'struct
                link_map' exists prior to the starting point.
 
-
           Arguments that are not understood by the remote stub will be
           silently ignored.
 
-    `qXfer:memory-map:read::OFFSET,LENGTH'
+     'qXfer:memory-map:read::OFFSET,LENGTH'
           Access the target's "memory-map".  *Note Memory Map Format::.
-          The annex part of the generic `qXfer' packet must be empty
+          The annex part of the generic 'qXfer' packet must be empty
           (*note qXfer read::).
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:sdata:read::OFFSET,LENGTH'
+     'qXfer:sdata:read::OFFSET,LENGTH'
+
           Read contents of the extra collected static tracepoint marker
-          information.  The annex part of the generic `qXfer' packet
+          information.  The annex part of the generic 'qXfer' packet
           must be empty (*note qXfer read::).  *Note Tracepoint Action
           Lists: Tracepoint Actions.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:siginfo:read::OFFSET,LENGTH'
+     'qXfer:siginfo:read::OFFSET,LENGTH'
           Read contents of the extra signal information on the target
-          system.  The annex part of the generic `qXfer' packet must be
+          system.  The annex part of the generic 'qXfer' packet must be
           empty (*note qXfer read::).
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:spu:read:ANNEX:OFFSET,LENGTH'
-          Read contents of an `spufs' file on the target system.  The
+     'qXfer:spu:read:ANNEX:OFFSET,LENGTH'
+          Read contents of an 'spufs' file on the target system.  The
           annex specifies which file to read; it must be of the form
-          `ID/NAME', where ID specifies an SPU context ID in the target
-          process, and NAME identifes the `spufs' file in that context
+          'ID/NAME', where ID specifies an SPU context ID in the target
+          process, and NAME identifes the 'spufs' file in that context
           to be accessed.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:threads:read::OFFSET,LENGTH'
+     'qXfer:threads:read::OFFSET,LENGTH'
           Access the list of threads on target.  *Note Thread List
-          Format::.  The annex part of the generic `qXfer' packet must
+          Format::.  The annex part of the generic 'qXfer' packet must
           be empty (*note qXfer read::).
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:traceframe-info:read::OFFSET,LENGTH'
+     'qXfer:traceframe-info:read::OFFSET,LENGTH'
+
           Return a description of the current traceframe's contents.
           *Note Traceframe Info Format::.  The annex part of the generic
-          `qXfer' packet must be empty (*note qXfer read::).
+          'qXfer' packet must be empty (*note qXfer read::).
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:uib:read:PC:OFFSET,LENGTH'
+     'qXfer:uib:read:PC:OFFSET,LENGTH'
+
           Return the unwind information block for PC.  This packet is
           used on OpenVMS/ia64 to ask the kernel unwind information.
 
           This packet is not probed by default.
 
-    `qXfer:fdpic:read:ANNEX:OFFSET,LENGTH'
-          Read contents of `loadmap's on the target system.  The annex,
-          either `exec' or `interp', specifies which `loadmap',
-          executable `loadmap' or interpreter `loadmap' to read.
+     'qXfer:fdpic:read:ANNEX:OFFSET,LENGTH'
+          Read contents of 'loadmap's on the target system.  The annex,
+          either 'exec' or 'interp', specifies which 'loadmap',
+          executable 'loadmap' or interpreter 'loadmap' to read.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:osdata:read::OFFSET,LENGTH'
+     'qXfer:osdata:read::OFFSET,LENGTH'
           Access the target's "operating system information".  *Note
           Operating System Information::.
 
+'qXfer:OBJECT:write:ANNEX:OFFSET:DATA...'
+     Write uninterpreted bytes into the target's special data area
+     identified by the keyword OBJECT, starting at OFFSET bytes into the
+     data.  The binary-encoded data (*note Binary Data::) to be written
+     is given by DATA....  The content and encoding of ANNEX is specific
+     to OBJECT; it can supply additional details about what data to
+     access.
 
      Reply:
-    `m DATA'
-          Data DATA (*note Binary Data::) has been read from the
-          target.  There may be more data at a higher address (although
-          it is permitted to return `m' even for the last valid block
-          of data, as long as at least one byte of data was read).  It
-          is possible for DATA to have fewer bytes than the LENGTH in
-          the request.
-
-    `l DATA'
-          Data DATA (*note Binary Data::) has been read from the target.
-          There is no more data to be read.  It is possible for DATA to
-          have fewer bytes than the LENGTH in the request.
-
-    `l'
-          The OFFSET in the request is at the end of the data.  There
-          is no more data to be read.
+     'NN'
+          NN (hex encoded) is the number of bytes written.  This may be
+          fewer bytes than supplied in the request.
 
-    `E00'
+     'E00'
           The request was malformed, or ANNEX was invalid.
 
-    `E NN'
+     'E NN'
           The offset was invalid, or there was an error encountered
-          reading the data.  The NN part is a hex-encoded `errno' value.
+          writing the data.  The NN part is a hex-encoded 'errno' value.
 
-    `'
+     ''
           An empty reply indicates the OBJECT string was not recognized
-          by the stub, or that the object does not support reading.
-
-`qXfer:OBJECT:write:ANNEX:OFFSET:DATA...'
-     Write uninterpreted bytes into the target's special data area
-     identified by the keyword OBJECT, starting at OFFSET bytes into
-     the data.  The binary-encoded data (*note Binary Data::) to be
-     written is given by DATA....  The content and encoding of ANNEX is
-     specific to OBJECT; it can supply additional details about what
-     data to access.
+          by the stub, or that the object does not support writing.
 
      Here are the specific requests of this form defined so far.  All
-     `qXfer:OBJECT:write:...' requests use the same reply formats,
-     listed below.
+     the 'qXfer:OBJECT:write:...' requests use the same reply formats,
+     listed above.
 
-    `qXfer:siginfo:write::OFFSET:DATA...'
+     'qXfer:siginfo:write::OFFSET:DATA...'
           Write DATA to the extra signal information on the target
-          system.  The annex part of the generic `qXfer' packet must be
+          system.  The annex part of the generic 'qXfer' packet must be
           empty (*note qXfer write::).
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-    `qXfer:spu:write:ANNEX:OFFSET:DATA...'
-          Write DATA to an `spufs' file on the target system.  The
-          annex specifies which file to write; it must be of the form
-          `ID/NAME', where ID specifies an SPU context ID in the target
-          process, and NAME identifes the `spufs' file in that context
+     'qXfer:spu:write:ANNEX:OFFSET:DATA...'
+          Write DATA to an 'spufs' file on the target system.  The annex
+          specifies which file to write; it must be of the form
+          'ID/NAME', where ID specifies an SPU context ID in the target
+          process, and NAME identifes the 'spufs' file in that context
           to be accessed.
 
           This packet is not probed by default; the remote stub must
-          request it, by supplying an appropriate `qSupported' response
+          request it, by supplying an appropriate 'qSupported' response
           (*note qSupported::).
 
-     Reply:
-    `NN'
-          NN (hex encoded) is the number of bytes written.  This may be
-          fewer bytes than supplied in the request.
-
-    `E00'
-          The request was malformed, or ANNEX was invalid.
-
-    `E NN'
-          The offset was invalid, or there was an error encountered
-          writing the data.  The NN part is a hex-encoded `errno' value.
-
-    `'
-          An empty reply indicates the OBJECT string was not recognized
-          by the stub, or that the object does not support writing.
-
-`qXfer:OBJECT:OPERATION:...'
+'qXfer:OBJECT:OPERATION:...'
      Requests of this form may be added in the future.  When a stub does
      not recognize the OBJECT keyword, or its support for OBJECT does
      not recognize the OPERATION keyword, the stub must respond with an
      empty packet.
 
-`qAttached:PID'
+'qAttached:PID'
      Return an indication of whether the remote server attached to an
      existing process or created a new process.  When the multiprocess
      protocol extensions are supported (*note multiprocess
      extensions::), PID is an integer in hexadecimal format identifying
-     the target process.  Otherwise, GDB will omit the PID field and
-     the query packet will be simplified as `qAttached'.
+     the target process.  Otherwise, GDB will omit the PID field and the
+     query packet will be simplified as 'qAttached'.
 
      This query is used, for example, to know whether the remote process
      should be detached or killed when a GDB session is ended with the
-     `quit' command.
+     'quit' command.
 
      Reply:
-    `1'
+     '1'
           The remote server attached to an existing process.
-
-    `0'
+     '0'
           The remote server created a new process.
-
-    `E NN'
+     'E NN'
           A badly formed request or an error was encountered.
 
-`Qbtrace:bts'
+'Qbtrace:bts'
      Enable branch tracing for the current thread using Branch Trace
      Store.
 
      Reply:
-    `OK'
+     'OK'
           Branch tracing has been enabled.
-
-    `E.errtext'
+     'E.errtext'
           A badly formed request or an error was encountered.
 
-`Qbtrace:pt'
-     Enable branch tracing for the current thread using Intel(R)
-     Processor Trace.
+'Qbtrace:pt'
+     Enable branch tracing for the current thread using Intel Processor
+     Trace.
 
      Reply:
-    `OK'
+     'OK'
           Branch tracing has been enabled.
-
-    `E.errtext'
+     'E.errtext'
           A badly formed request or an error was encountered.
 
-`Qbtrace:off'
+'Qbtrace:off'
      Disable branch tracing for the current thread.
 
      Reply:
-    `OK'
+     'OK'
           Branch tracing has been disabled.
-
-    `E.errtext'
+     'E.errtext'
           A badly formed request or an error was encountered.
 
-`Qbtrace-conf:bts:size=VALUE'
+'Qbtrace-conf:bts:size=VALUE'
      Set the requested ring buffer size for new threads that use the
      btrace recording method in bts format.
 
      Reply:
-    `OK'
+     'OK'
           The ring buffer size has been set.
-
-    `E.errtext'
+     'E.errtext'
           A badly formed request or an error was encountered.
 
-`Qbtrace-conf:pt:size=VALUE'
+'Qbtrace-conf:pt:size=VALUE'
      Set the requested ring buffer size for new threads that use the
      btrace recording method in pt format.
 
      Reply:
-    `OK'
+     'OK'
           The ring buffer size has been set.
-
-    `E.errtext'
+     'E.errtext'
           A badly formed request or an error was encountered.
 
-
    ---------- Footnotes ----------
 
-   (1) The `qP' and `qL' packets predate these conventions, and have
+   (1) The 'qP' and 'qL' packets predate these conventions, and have
 arguments without any terminator for the packet name; we suspect they
-are in widespread use in places that are difficult to upgrade.  The
-`qC' packet has no arguments, but some existing stubs (e.g. RedBoot)
-are known to not check for the end of the packet.
+are in widespread use in places that are difficult to upgrade.  The 'qC'
+packet has no arguments, but some existing stubs (e.g. RedBoot) are
+known to not check for the end of the packet.
 
 
 File: gdb.info,  Node: Architecture-Specific Protocol Details,  Next: Tracepoint Packets,  Prev: General Query Packets,  Up: Remote Protocol
@@ -3332,7 +4278,7 @@ File: gdb.info,  Node: ARM Breakpoint Ki
 E.5.1.1 ARM Breakpoint Kinds
 ............................
 
-These breakpoint kinds are defined for the `Z0' and `Z1' packets.
+These breakpoint kinds are defined for the 'Z0' and 'Z1' packets.
 
 2
      16-bit Thumb mode breakpoint.
@@ -3343,7 +4289,6 @@ These breakpoint kinds are defined for t
 4
      32-bit ARM mode breakpoint.
 
-
 
 File: gdb.info,  Node: MIPS-Specific Protocol Details,  Prev: ARM-Specific Protocol Details,  Up: Architecture-Specific Protocol Details
 
@@ -3361,12 +4306,12 @@ File: gdb.info,  Node: MIPS Register pac
 E.5.2.1 MIPS Register Packet Format
 ...................................
 
-The following `g'/`G' packets have previously been defined.  In the
-below, some thirty-two bit registers are transferred as sixty-four
-bits.  Those registers should be zero/sign extended (which?)  to fill
-the space allocated.  Register bytes are transferred in target byte
-order.  The two nibbles within a register byte are transferred
-most-significant - least-significant.
+The following 'g'/'G' packets have previously been defined.  In the
+below, some thirty-two bit registers are transferred as sixty-four bits.
+Those registers should be zero/sign extended (which?)  to fill the space
+allocated.  Register bytes are transferred in target byte order.  The
+two nibbles within a register byte are transferred most-significant -
+least-significant.
 
 MIPS32
      All registers are transferred as thirty-two bit quantities in the
@@ -3375,9 +4320,8 @@ MIPS32
 
 MIPS64
      All registers are transferred as sixty-four bit quantities
-     (including thirty-two bit registers such as `sr').  The ordering
-     is the same as `MIPS32'.
-
+     (including thirty-two bit registers such as 'sr').  The ordering is
+     the same as 'MIPS32'.
 
 
 File: gdb.info,  Node: MIPS Breakpoint Kinds,  Prev: MIPS Register packet Format,  Up: MIPS-Specific Protocol Details
@@ -3385,7 +4329,7 @@ File: gdb.info,  Node: MIPS Breakpoint K
 E.5.2.2 MIPS Breakpoint Kinds
 .............................
 
-These breakpoint kinds are defined for the `Z0' and `Z1' packets.
+These breakpoint kinds are defined for the 'Z0' and 'Z1' packets.
 
 2
      16-bit MIPS16 mode breakpoint.
@@ -3399,7 +4343,6 @@ These breakpoint kinds are defined for t
 5
      32-bit microMIPS mode breakpoint.
 
-
 
 File: gdb.info,  Node: Tracepoint Packets,  Next: Host I/O Packets,  Prev: Architecture-Specific Protocol Details,  Up: Remote Protocol
 
@@ -3409,66 +4352,62 @@ E.6 Tracepoint Packets
 Here we describe the packets GDB uses to implement tracepoints (*note
 Tracepoints::).
 
-`QTDP:N:ADDR:ENA:STEP:PASS[:FFLEN][:XLEN,BYTES][-]'
-     Create a new tracepoint, number N, at ADDR.  If ENA is `E', then
-     the tracepoint is enabled; if it is `D', then the tracepoint is
+'QTDP:N:ADDR:ENA:STEP:PASS[:FFLEN][:XLEN,BYTES][-]'
+     Create a new tracepoint, number N, at ADDR.  If ENA is 'E', then
+     the tracepoint is enabled; if it is 'D', then the tracepoint is
      disabled.  The STEP gives the tracepoint's step count, and PASS
-     gives its pass count.  If an `F' is present, then the tracepoint
-     is to be a fast tracepoint, and the FLEN is the number of bytes
-     that the target should copy elsewhere to make room for the
-     tracepoint.  If an `X' is present, it introduces a tracepoint
-     condition, which consists of a hexadecimal length, followed by a
-     comma and hex-encoded bytes, in a manner similar to action
-     encodings as described below.  If the trailing `-' is present,
-     further `QTDP' packets will follow to specify this tracepoint's
-     actions.
+     gives its pass count.  If an 'F' is present, then the tracepoint is
+     to be a fast tracepoint, and the FLEN is the number of bytes that
+     the target should copy elsewhere to make room for the tracepoint.
+     If an 'X' is present, it introduces a tracepoint condition, which
+     consists of a hexadecimal length, followed by a comma and
+     hex-encoded bytes, in a manner similar to action encodings as
+     described below.  If the trailing '-' is present, further 'QTDP'
+     packets will follow to specify this tracepoint's actions.
 
      Replies:
-    `OK'
+     'OK'
           The packet was understood and carried out.
-
-    `qRelocInsn'
+     'qRelocInsn'
           *Note Relocate instruction reply packet: Tracepoint Packets.
-
-    `'
+     ''
           The packet was not recognized.
 
-`QTDP:-N:ADDR:[S]ACTION...[-]'
+'QTDP:-N:ADDR:[S]ACTION...[-]'
      Define actions to be taken when a tracepoint is hit.  The N and
-     ADDR must be the same as in the initial `QTDP' packet for this
-     tracepoint.  This packet may only be sent immediately after
-     another `QTDP' packet that ended with a `-'.  If the trailing `-'
-     is present, further `QTDP' packets will follow, specifying more
+     ADDR must be the same as in the initial 'QTDP' packet for this
+     tracepoint.  This packet may only be sent immediately after another
+     'QTDP' packet that ended with a '-'.  If the trailing '-' is
+     present, further 'QTDP' packets will follow, specifying more
      actions for this tracepoint.
 
      In the series of action packets for a given tracepoint, at most one
-     can have an `S' before its first ACTION.  If such a packet is
-     sent, it and the following packets define "while-stepping"
-     actions.  Any prior packets define ordinary actions -- that is,
-     those taken when the tracepoint is first hit.  If no action packet
-     has an `S', then all the packets in the series specify ordinary
-     tracepoint actions.
+     can have an 'S' before its first ACTION.  If such a packet is sent,
+     it and the following packets define "while-stepping" actions.  Any
+     prior packets define ordinary actions -- that is, those taken when
+     the tracepoint is first hit.  If no action packet has an 'S', then
+     all the packets in the series specify ordinary tracepoint actions.
 
-     The `ACTION...' portion of the packet is a series of actions,
+     The 'ACTION...' portion of the packet is a series of actions,
      concatenated without separators.  Each action has one of the
      following forms:
 
-    `R MASK'
+     'R MASK'
           Collect the registers whose bits are set in MASK, a
           hexadecimal number whose I'th bit is set if register number I
           should be collected.  (The least significant bit is numbered
           zero.)  Note that MASK may be any number of digits long; it
           may not fit in a 32-bit word.
 
-    `M BASEREG,OFFSET,LEN'
+     'M BASEREG,OFFSET,LEN'
           Collect LEN bytes of memory starting at the address in
-          register number BASEREG, plus OFFSET.  If BASEREG is `-1',
+          register number BASEREG, plus OFFSET.  If BASEREG is '-1',
           then the range has a fixed address: OFFSET is the address of
           the lowest byte to collect.  The BASEREG, OFFSET, and LEN
-          parameters are all unsigned hexadecimal values (the `-1'
-          value for BASEREG is a special case).
+          parameters are all unsigned hexadecimal values (the '-1' value
+          for BASEREG is a special case).
 
-    `X LEN,EXPR'
+     'X LEN,EXPR'
           Evaluate EXPR, whose length is LEN, and collect memory as it
           directs.  The agent expression EXPR is as described in *note
           Agent Expressions::.  Each byte of the expression is encoded
@@ -3476,70 +4415,67 @@ Tracepoints::).
           bytes in the expression (and thus one-half the number of hex
           digits in the packet).
 
-
-     Any number of actions may be packed together in a single `QTDP'
+     Any number of actions may be packed together in a single 'QTDP'
      packet, as long as the packet does not exceed the maximum packet
-     length (400 bytes, for many stubs).  There may be only one `R'
-     action per tracepoint, and it must precede any `M' or `X' actions.
-     Any registers referred to by `M' and `X' actions must be collected
-     by a preceding `R' action.  (The "while-stepping" actions are
+     length (400 bytes, for many stubs).  There may be only one 'R'
+     action per tracepoint, and it must precede any 'M' or 'X' actions.
+     Any registers referred to by 'M' and 'X' actions must be collected
+     by a preceding 'R' action.  (The "while-stepping" actions are
      treated as if they were attached to a separate tracepoint, as far
      as these restrictions are concerned.)
 
      Replies:
-    `OK'
+     'OK'
           The packet was understood and carried out.
-
-    `qRelocInsn'
+     'qRelocInsn'
           *Note Relocate instruction reply packet: Tracepoint Packets.
-
-    `'
+     ''
           The packet was not recognized.
 
-`QTDPsrc:N:ADDR:TYPE:START:SLEN:BYTES'
+'QTDPsrc:N:ADDR:TYPE:START:SLEN:BYTES'
      Specify a source string of tracepoint N at address ADDR.  This is
      useful to get accurate reproduction of the tracepoints originally
-     downloaded at the beginning of the trace run.  The TYPE is the
-     name of the tracepoint part, such as `cond' for the tracepoint's
-     conditional expression (see below for a list of types), while
-     BYTES is the string, encoded in hexadecimal.
+     downloaded at the beginning of the trace run.  The TYPE is the name
+     of the tracepoint part, such as 'cond' for the tracepoint's
+     conditional expression (see below for a list of types), while BYTES
+     is the string, encoded in hexadecimal.
 
      START is the offset of the BYTES within the overall source string,
      while SLEN is the total length of the source string.  This is
      intended for handling source strings that are longer than will fit
      in a single packet.
 
-     The available string types are `at' for the location, `cond' for
-     the conditional, and `cmd' for an action command.  GDB sends a
+     The available string types are 'at' for the location, 'cond' for
+     the conditional, and 'cmd' for an action command.  GDB sends a
      separate packet for each command in the action list, in the same
      order in which the commands are stored in the list.
 
      The target does not need to do anything with source strings except
-     report them back as part of the replies to the `qTfP'/`qTsP' query
+     report them back as part of the replies to the 'qTfP'/'qTsP' query
      packets.
 
      Although this packet is optional, and GDB will only send it if the
-     target replies with `TracepointSource' *Note General Query
+     target replies with 'TracepointSource' *Note General Query
      Packets::, it makes both disconnected tracing and trace files much
      easier to use.  Otherwise the user must be careful that the
      tracepoints in effect while looking at trace frames are identical
      to the ones in effect during the trace run; even a small
-     discrepancy could cause `tdump' not to work, or a particular trace
+     discrepancy could cause 'tdump' not to work, or a particular trace
      frame not be found.
 
-`QTDV:N:VALUE:BUILTIN:NAME'
+'QTDV:N:VALUE:BUILTIN:NAME'
      Create a new trace state variable, number N, with an initial value
      of VALUE, which is a 64-bit signed integer.  Both N and VALUE are
-     encoded as hexadecimal values. GDB has the option of not using
+     encoded as hexadecimal values.  GDB has the option of not using
      this packet for initial values of zero; the target should simply
      create the trace state variables as they are mentioned in
      expressions.  The value BUILTIN should be 1 (one) if the trace
      state variable is builtin and 0 (zero) if it is not builtin.  GDB
-     only sets BUILTIN to 1 if a previous `qTfV' or `qTsV' packet had
-     it set.  The contents of NAME is the hex-encoded name (without the
-     leading `$') of the trace state variable.
+     only sets BUILTIN to 1 if a previous 'qTfV' or 'qTsV' packet had it
+     set.  The contents of NAME is the hex-encoded name (without the
+     leading '$') of the trace state variable.
 
-`QTFrame:N'
+'QTFrame:N'
      Select the N'th tracepoint frame from the buffer, and use the
      register and memory contents recorded there to answer subsequent
      request packets from GDB.
@@ -3549,85 +4485,81 @@ Tracepoints::).
      concatenated without separators, describing the frame we selected.
      Each part has one of the following forms:
 
-    `F F'
-          The selected frame is number N in the trace frame buffer; F
-          is a hexadecimal number.  If F is `-1', then there was no
-          frame matching the criteria in the request packet.
+     'F F'
+          The selected frame is number N in the trace frame buffer; F is
+          a hexadecimal number.  If F is '-1', then there was no frame
+          matching the criteria in the request packet.
 
-    `T T'
+     'T T'
           The selected trace frame records a hit of tracepoint number T;
           T is a hexadecimal number.
 
-
-`QTFrame:pc:ADDR'
-     Like `QTFrame:N', but select the first tracepoint frame after the
+'QTFrame:pc:ADDR'
+     Like 'QTFrame:N', but select the first tracepoint frame after the
      currently selected frame whose PC is ADDR; ADDR is a hexadecimal
      number.
 
-`QTFrame:tdp:T'
-     Like `QTFrame:N', but select the first tracepoint frame after the
+'QTFrame:tdp:T'
+     Like 'QTFrame:N', but select the first tracepoint frame after the
      currently selected frame that is a hit of tracepoint T; T is a
      hexadecimal number.
 
-`QTFrame:range:START:END'
-     Like `QTFrame:N', but select the first tracepoint frame after the
+'QTFrame:range:START:END'
+     Like 'QTFrame:N', but select the first tracepoint frame after the
      currently selected frame whose PC is between START (inclusive) and
      END (inclusive); START and END are hexadecimal numbers.
 
-`QTFrame:outside:START:END'
-     Like `QTFrame:range:START:END', but select the first frame
+'QTFrame:outside:START:END'
+     Like 'QTFrame:range:START:END', but select the first frame
      _outside_ the given range of addresses (exclusive).
 
-`qTMinFTPILen'
+'qTMinFTPILen'
      This packet requests the minimum length of instruction at which a
      fast tracepoint (*note Set Tracepoints::) may be placed.  For
      instance, on the 32-bit x86 architecture, it is possible to use a
      4-byte jump, but it depends on the target system being able to
-     create trampolines in the first 64K of memory, which might or
-     might not be possible for that system.  So the reply to this
-     packet will be 4 if it is able to arrange for that.
+     create trampolines in the first 64K of memory, which might or might
+     not be possible for that system.  So the reply to this packet will
+     be 4 if it is able to arrange for that.
 
      Replies:
 
-    `0'
+     '0'
           The minimum instruction length is currently unknown.
-
-    `LENGTH'
+     'LENGTH'
           The minimum instruction length is LENGTH, where LENGTH is a
           hexadecimal number greater or equal to 1.  A reply of 1 means
           that a fast tracepoint may be placed on any instruction
           regardless of size.
-
-    `E'
+     'E'
           An error has occurred.
-
-    `'
+     ''
           An empty reply indicates that the request is not supported by
           the stub.
 
-`QTStart'
+'QTStart'
      Begin the tracepoint experiment.  Begin collecting data from
      tracepoint hits in the trace frame buffer.  This packet supports
-     the `qRelocInsn' reply (*note Relocate instruction reply packet:
+     the 'qRelocInsn' reply (*note Relocate instruction reply packet:
      Tracepoint Packets.).
 
-`QTStop'
+'QTStop'
      End the tracepoint experiment.  Stop collecting trace frames.
 
-`QTEnable:N:ADDR'
+'QTEnable:N:ADDR'
      Enable tracepoint N at address ADDR in a started tracepoint
      experiment.  If the tracepoint was previously disabled, then
      collection of data from it will resume.
 
-`QTDisable:N:ADDR'
+'QTDisable:N:ADDR'
      Disable tracepoint N at address ADDR in a started tracepoint
      experiment.  No more data will be collected from the tracepoint
-     unless `QTEnable:N:ADDR' is subsequently issued.
+     unless 'QTEnable:N:ADDR' is subsequently issued.
 
-`QTinit'
+'QTinit'
      Clear the table of tracepoints, and empty the trace frame buffer.
 
-`QTro:START1,END1:START2,END2:...'
+'QTro:START1,END1:START2,END2:...'
      Establish the given ranges of memory as "transparent".  The stub
      will answer requests for these ranges from memory's current
      contents, if they were not collected as part of the tracepoint hit.
@@ -3638,105 +4570,101 @@ Tracepoints::).
      was hit, so there's no reason for the stub to refuse to provide
      their contents.
 
-`QTDisconnected:VALUE'
+'QTDisconnected:VALUE'
      Set the choice to what to do with the tracing run when GDB
      disconnects from the target.  A VALUE of 1 directs the target to
      continue the tracing run, while 0 tells the target to stop tracing
      if GDB is no longer in the picture.
 
-`qTStatus'
+'qTStatus'
      Ask the stub if there is a trace experiment running right now.
 
      The reply has the form:
 
-    `TRUNNING[;FIELD]...'
-          RUNNING is a single digit `1' if the trace is presently
-          running, or `0' if not.  It is followed by semicolon-separated
+     'TRUNNING[;FIELD]...'
+          RUNNING is a single digit '1' if the trace is presently
+          running, or '0' if not.  It is followed by semicolon-separated
           optional fields that an agent may use to report additional
           status.
 
-
      If the trace is not running, the agent may report any of several
      explanations as one of the optional fields:
 
-    `tnotrun:0'
+     'tnotrun:0'
           No trace has been run yet.
 
-    `tstop[:TEXT]:0'
+     'tstop[:TEXT]:0'
           The trace was stopped by a user-originated stop command.  The
-          optional TEXT field is a user-supplied string supplied as
-          part of the stop command (for instance, an explanation of why
-          the trace was stopped manually).  It is hex-encoded.
+          optional TEXT field is a user-supplied string supplied as part
+          of the stop command (for instance, an explanation of why the
+          trace was stopped manually).  It is hex-encoded.
 
-    `tfull:0'
+     'tfull:0'
           The trace stopped because the trace buffer filled up.
 
-    `tdisconnected:0'
+     'tdisconnected:0'
           The trace stopped because GDB disconnected from the target.
 
-    `tpasscount:TPNUM'
+     'tpasscount:TPNUM'
           The trace stopped because tracepoint TPNUM exceeded its pass
           count.
 
-    `terror:TEXT:TPNUM'
+     'terror:TEXT:TPNUM'
           The trace stopped because tracepoint TPNUM had an error.  The
           string TEXT is available to describe the nature of the error
           (for instance, a divide by zero in the condition expression);
           it is hex encoded.
 
-    `tunknown:0'
+     'tunknown:0'
           The trace stopped for some other reason.
 
-
      Additional optional fields supply statistical and other
      information.  Although not required, they are extremely useful for
      users monitoring the progress of a trace run.  If a trace has
      stopped, and these numbers are reported, they must reflect the
      state of the just-stopped trace.
 
-    `tframes:N'
+     'tframes:N'
           The number of trace frames in the buffer.
 
-    `tcreated:N'
-          The total number of trace frames created during the run. This
+     'tcreated:N'
+          The total number of trace frames created during the run.  This
           may be larger than the trace frame count, if the buffer is
           circular.
 
-    `tsize:N'
+     'tsize:N'
           The total size of the trace buffer, in bytes.
 
-    `tfree:N'
+     'tfree:N'
           The number of bytes still unused in the buffer.
 
-    `circular:N'
-          The value of the circular trace buffer flag.  `1' means that
+     'circular:N'
+          The value of the circular trace buffer flag.  '1' means that
           the trace buffer is circular and old trace frames will be
-          discarded if necessary to make room, `0' means that the trace
+          discarded if necessary to make room, '0' means that the trace
           buffer is linear and may fill up.
 
-    `disconn:N'
-          The value of the disconnected tracing flag.  `1' means that
-          tracing will continue after GDB disconnects, `0' means that
+     'disconn:N'
+          The value of the disconnected tracing flag.  '1' means that
+          tracing will continue after GDB disconnects, '0' means that
           the trace run will stop.
 
-
-`qTP:TP:ADDR'
+'qTP:TP:ADDR'
      Ask the stub for the current state of tracepoint number TP at
      address ADDR.
 
      Replies:
-    `VHITS:USAGE'
+     'VHITS:USAGE'
           The tracepoint has been hit HITS times so far during the trace
           run, and accounts for USAGE in the trace buffer.  Note that
-          `while-stepping' steps are not counted as separate hits, but
+          'while-stepping' steps are not counted as separate hits, but
           the steps' space consumption is added into the usage number.
 
-
-`qTV:VAR'
+'qTV:VAR'
      Ask the stub for the value of the trace state variable number VAR.
 
      Replies:
-    `VVALUE'
+     'VVALUE'
           The value of the variable is VALUE.  This will be the current
           value of the variable if the user is examining a running
           target, or a saved value if the variable was collected in the
@@ -3744,97 +4672,92 @@ Tracepoints::).
           requests may result in different reply values, such as when
           requesting values while the program is running.
 
-    `U'
+     'U'
           The value of the variable is unknown.  This would occur, for
           example, if the user is examining a trace frame in which the
           requested variable was not collected.
 
-`qTfP'
-`qTsP'
+'qTfP'
+'qTsP'
      These packets request data about tracepoints that are being used by
-     the target.  GDB sends `qTfP' to get the first piece of data, and
-     multiple `qTsP' to get additional pieces.  Replies to these
-     packets generally take the form of the `QTDP' packets that define
-     tracepoints. (FIXME add detailed syntax)
+     the target.  GDB sends 'qTfP' to get the first piece of data, and
+     multiple 'qTsP' to get additional pieces.  Replies to these packets
+     generally take the form of the 'QTDP' packets that define
+     tracepoints.  (FIXME add detailed syntax)
 
-`qTfV'
-`qTsV'
+'qTfV'
+'qTsV'
      These packets request data about trace state variables that are on
-     the target.  GDB sends `qTfV' to get the first vari of data, and
-     multiple `qTsV' to get additional variables.  Replies to these
-     packets follow the syntax of the `QTDV' packets that define trace
+     the target.  GDB sends 'qTfV' to get the first vari of data, and
+     multiple 'qTsV' to get additional variables.  Replies to these
+     packets follow the syntax of the 'QTDV' packets that define trace
      state variables.
 
-`qTfSTM'
-`qTsSTM'
+'qTfSTM'
+'qTsSTM'
      These packets request data about static tracepoint markers that
-     exist in the target program.  GDB sends `qTfSTM' to get the first
-     piece of data, and multiple `qTsSTM' to get additional pieces.
+     exist in the target program.  GDB sends 'qTfSTM' to get the first
+     piece of data, and multiple 'qTsSTM' to get additional pieces.
      Replies to these packets take the following form:
 
      Reply:
-    `m ADDRESS:ID:EXTRA'
+     'm ADDRESS:ID:EXTRA'
           A single marker
-
-    `m ADDRESS:ID:EXTRA,ADDRESS:ID:EXTRA...'
+     'm ADDRESS:ID:EXTRA,ADDRESS:ID:EXTRA...'
           a comma-separated list of markers
-
-    `l'
-          (lower case letter `L') denotes end of list.
-
-    `E NN'
+     'l'
+          (lower case letter 'L') denotes end of list.
+     'E NN'
           An error occurred.  The error number NN is given as hex
           digits.
-
-    `'
+     ''
           An empty reply indicates that the request is not supported by
           the stub.
 
      The ADDRESS is encoded in hex; ID and EXTRA are strings encoded in
      hex.
 
-     In response to each query, the target will reply with a list of
-     one or more markers, separated by commas.  GDB will respond to each
-     reply with a request for more markers (using the `qs' form of the
-     query), until the target responds with `l' (lower-case ell, for
+     In response to each query, the target will reply with a list of one
+     or more markers, separated by commas.  GDB will respond to each
+     reply with a request for more markers (using the 'qs' form of the
+     query), until the target responds with 'l' (lower-case ell, for
      "last").
 
-`qTSTMat:ADDRESS'
+'qTSTMat:ADDRESS'
      This packets requests data about static tracepoint markers in the
      target program at ADDRESS.  Replies to this packet follow the
-     syntax of the `qTfSTM' and `qTsSTM' packets that list static
+     syntax of the 'qTfSTM' and 'qTsSTM' packets that list static
      tracepoint markers.
 
-`QTSave:FILENAME'
+'QTSave:FILENAME'
      This packet directs the target to save trace data to the file name
      FILENAME in the target's filesystem.  The FILENAME is encoded as a
      hex string; the interpretation of the file name (relative vs
      absolute, wild cards, etc) is up to the target.
 
-`qTBuffer:OFFSET,LEN'
+'qTBuffer:OFFSET,LEN'
      Return up to LEN bytes of the current contents of trace buffer,
      starting at OFFSET.  The trace buffer is treated as if it were a
      contiguous collection of traceframes, as per the trace file format.
      The reply consists as many hex-encoded bytes as the target can
      deliver in a packet; it is not an error to return fewer than were
-     asked for.  A reply consisting of just `l' indicates that no bytes
+     asked for.  A reply consisting of just 'l' indicates that no bytes
      are available.
 
-`QTBuffer:circular:VALUE'
+'QTBuffer:circular:VALUE'
      This packet directs the target to use a circular trace buffer if
      VALUE is 1, or a linear buffer if the value is 0.
 
-`QTBuffer:size:SIZE'
+'QTBuffer:size:SIZE'
      This packet directs the target to make the trace buffer be of size
-     SIZE if possible.  A value of `-1' tells the target to use
-     whatever size it prefers.
+     SIZE if possible.  A value of '-1' tells the target to use whatever
+     size it prefers.
 
-`QTNotes:[TYPE:TEXT][;TYPE:TEXT]...'
+'QTNotes:[TYPE:TEXT][;TYPE:TEXT]...'
      This packet adds optional textual notes to the trace run.
-     Allowable types include `user', `notes', and `tstop', the TEXT
+     Allowable types include 'user', 'notes', and 'tstop', the TEXT
      fields are arbitrary strings, hex-encoded.
 
-
 E.6.1 Relocate instruction reply packet
 ---------------------------------------
 
@@ -3844,28 +4767,28 @@ different address in memory.  For most i
 enough, but, for example, call instructions that implicitly push the
 return address on the stack, and relative branches or other PC-relative
 instructions require offset adjustment, so that the effect of executing
-the instruction at a different address is the same as if it had
-executed in the original location.
+the instruction at a different address is the same as if it had executed
+in the original location.
 
    In response to several of the tracepoint packets, the target may also
-respond with a number of intermediate `qRelocInsn' request packets
+respond with a number of intermediate 'qRelocInsn' request packets
 before the final result packet, to have GDB handle this relocation
 operation.  If a packet supports this mechanism, its documentation will
 explicitly say so.  See for example the above descriptions for the
-`QTStart' and `QTDP' packets.  The format of the request is:
+'QTStart' and 'QTDP' packets.  The format of the request is:
+
+'qRelocInsn:FROM;TO'
 
-`qRelocInsn:FROM;TO'
      This requests GDB to copy instruction at address FROM to address
      TO, possibly adjusted so that executing the instruction at TO has
      the same effect as executing it at FROM.  GDB writes the adjusted
      instruction to target memory starting at TO.
 
    Replies:
-`qRelocInsn:ADJUSTED_SIZE'
+'qRelocInsn:ADJUSTED_SIZE'
      Informs the stub the relocation is complete.  The ADJUSTED_SIZE is
      the length in bytes of resulting relocated instruction sequence.
-
-`E NN'
+'E NN'
      A badly formed request was detected, or an error was encountered
      while relocating the instruction.
 
@@ -3881,15 +4804,14 @@ download files to a remote target with i
 uses the same constant values and data structure layout as the
 target-initiated File-I/O protocol.  However, the Host I/O packets are
 structured differently.  The target-initiated protocol relies on target
-memory to store parameters and buffers.  Host I/O requests are
-initiated by GDB, and the target's memory is not involved.  *Note
-File-I/O Remote Protocol Extension::, for more details on the
-target-initiated protocol.
+memory to store parameters and buffers.  Host I/O requests are initiated
+by GDB, and the target's memory is not involved.  *Note File-I/O Remote
+Protocol Extension::, for more details on the target-initiated protocol.
 
    The Host I/O request packets all encode a single operation along with
 its arguments.  They have this format:
 
-`vFile:OPERATION: PARAMETER...'
+'vFile:OPERATION: PARAMETER...'
      OPERATION is the name of the particular request; the target should
      compare the entire packet name up to the second colon when checking
      for a supported operation.  The format of PARAMETER depends on the
@@ -3899,10 +4821,9 @@ its arguments.  They have this format:
      hexadecimal bytes.  The last argument to a system call may be a
      buffer of escaped binary data (*note Binary Data::).
 
-
    The valid responses to Host I/O packets are:
 
-`F RESULT [, ERRNO] [; ATTACHMENT]'
+'F RESULT [, ERRNO] [; ATTACHMENT]'
      RESULT is the integer value returned by this operation, usually
      non-negative for success and -1 for errors.  If an error has
      occured, ERRNO will be included in the result specifying a value
@@ -3912,80 +4833,77 @@ its arguments.  They have this format:
      the normal way (*note Binary Data::).  See the individual packet
      documentation for the interpretation of RESULT and ATTACHMENT.
 
-`'
+''
      An empty response indicates that this operation is not recognized.
 
-
    These are the supported Host I/O operations:
 
-`vFile:open: FILENAME, FLAGS, MODE'
+'vFile:open: FILENAME, FLAGS, MODE'
      Open a file at FILENAME and return a file descriptor for it, or
      return -1 if an error occurs.  The FILENAME is a string, FLAGS is
      an integer indicating a mask of open flags (*note Open Flags::),
-     and MODE is an integer indicating a mask of mode bits to use if
-     the file is created (*note mode_t Values::).  *Note open::, for
-     details of the open flags and mode values.
+     and MODE is an integer indicating a mask of mode bits to use if the
+     file is created (*note mode_t Values::).  *Note open::, for details
+     of the open flags and mode values.
 
-`vFile:close: FD'
+'vFile:close: FD'
      Close the open file corresponding to FD and return 0, or -1 if an
      error occurs.
 
-`vFile:pread: FD, COUNT, OFFSET'
+'vFile:pread: FD, COUNT, OFFSET'
      Read data from the open file corresponding to FD.  Up to COUNT
      bytes will be read from the file, starting at OFFSET relative to
      the start of the file.  The target may read fewer bytes; common
      reasons include packet size limits and an end-of-file condition.
-     The number of bytes read is returned.  Zero should only be
-     returned for a successful read at the end of the file, or if COUNT
-     was zero.
+     The number of bytes read is returned.  Zero should only be returned
+     for a successful read at the end of the file, or if COUNT was zero.
 
      The data read should be returned as a binary attachment on success.
      If zero bytes were read, the response should include an empty
-     binary attachment (i.e. a trailing semicolon).  The return value
-     is the number of target bytes read; the binary attachment may be
+     binary attachment (i.e. a trailing semicolon).  The return value is
+     the number of target bytes read; the binary attachment may be
      longer if some characters were escaped.
 
-`vFile:pwrite: FD, OFFSET, DATA'
+'vFile:pwrite: FD, OFFSET, DATA'
      Write DATA (a binary buffer) to the open file corresponding to FD.
      Start the write at OFFSET from the start of the file.  Unlike many
-     `write' system calls, there is no separate COUNT argument; the
-     length of DATA in the packet is used.  `vFile:write' returns the
+     'write' system calls, there is no separate COUNT argument; the
+     length of DATA in the packet is used.  'vFile:write' returns the
      number of bytes written, which may be shorter than the length of
      DATA, or -1 if an error occurred.
 
-`vFile:fstat: FD'
+'vFile:fstat: FD'
      Get information about the open file corresponding to FD.  On
      success the information is returned as a binary attachment and the
      return value is the size of this attachment in bytes.  If an error
      occurs the return value is -1.  The format of the returned binary
      attachment is as described in *note struct stat::.
 
-`vFile:unlink: FILENAME'
+'vFile:unlink: FILENAME'
      Delete the file at FILENAME on the target.  Return 0, or -1 if an
      error occurs.  The FILENAME is a string.
 
-`vFile:readlink: FILENAME'
+'vFile:readlink: FILENAME'
      Read value of symbolic link FILENAME on the target.  Return the
      number of bytes read, or -1 if an error occurs.
 
      The data read should be returned as a binary attachment on success.
      If zero bytes were read, the response should include an empty
-     binary attachment (i.e. a trailing semicolon).  The return value
-     is the number of target bytes read; the binary attachment may be
+     binary attachment (i.e. a trailing semicolon).  The return value is
+     the number of target bytes read; the binary attachment may be
      longer if some characters were escaped.
 
-`vFile:setfs: PID'
-     Select the filesystem on which `vFile' operations with FILENAME
+'vFile:setfs: PID'
+     Select the filesystem on which 'vFile' operations with FILENAME
      arguments will operate.  This is required for GDB to be able to
-     access files on remote targets where the remote stub does not
-     share a common filesystem with the inferior(s).
+     access files on remote targets where the remote stub does not share
+     a common filesystem with the inferior(s).
 
      If PID is nonzero, select the filesystem as seen by process PID.
      If PID is zero, select the filesystem as seen by the remote stub.
-     Return 0 on success, or -1 if an error occurs.  If `vFile:setfs:'
+     Return 0 on success, or -1 if an error occurs.  If 'vFile:setfs:'
      indicates success, the selected filesystem remains selected until
-     the next successful `vFile:setfs:' operation.
-
+     the next successful 'vFile:setfs:' operation.
 
 
 File: gdb.info,  Node: Interrupts,  Next: Notification Packets,  Prev: Host I/O Packets,  Up: Remote Protocol
@@ -3993,38 +4911,46 @@ File: gdb.info,  Node: Interrupts,  Next
 E.8 Interrupts
 ==============
 
-When a program on the remote target is running, GDB may attempt to
-interrupt it by sending a `Ctrl-C', `BREAK' or a `BREAK' followed by
-`g', control of which is specified via GDB's `interrupt-sequence'.
-
-   The precise meaning of `BREAK' is defined by the transport mechanism
-and may, in fact, be undefined.  GDB does not currently define a
-`BREAK' mechanism for any of the network interfaces except for TCP, in
-which case GDB sends the `telnet' BREAK sequence.
+In all-stop mode, when a program on the remote target is running, GDB
+may attempt to interrupt it by sending a 'Ctrl-C', 'BREAK' or a 'BREAK'
+followed by 'g', control of which is specified via GDB's
+'interrupt-sequence'.
+
+   The precise meaning of 'BREAK' is defined by the transport mechanism
+and may, in fact, be undefined.  GDB does not currently define a 'BREAK'
+mechanism for any of the network interfaces except for TCP, in which
+case GDB sends the 'telnet' BREAK sequence.
 
-   `Ctrl-C', on the other hand, is defined and implemented for all
+   'Ctrl-C', on the other hand, is defined and implemented for all
 transport mechanisms.  It is represented by sending the single byte
-`0x03' without any of the usual packet overhead described in the
-Overview section (*note Overview::).  When a `0x03' byte is transmitted
+'0x03' without any of the usual packet overhead described in the
+Overview section (*note Overview::).  When a '0x03' byte is transmitted
 as part of a packet, it is considered to be packet data and does _not_
-represent an interrupt.  E.g., an `X' packet (*note X packet::), used
-for binary downloads, may include an unescaped `0x03' as part of its
+represent an interrupt.  E.g., an 'X' packet (*note X packet::), used
+for binary downloads, may include an unescaped '0x03' as part of its
 packet.
 
-   `BREAK' followed by `g' is also known as Magic SysRq g.  When Linux
+   'BREAK' followed by 'g' is also known as Magic SysRq g.  When Linux
 kernel receives this sequence from serial port, it stops execution and
 connects to gdb.
 
+   In non-stop mode, because packet resumptions are asynchronous (*note
+vCont packet::), GDB is always free to send a remote command to the
+remote stub, even when the target is running.  For that reason, GDB
+instead sends a regular packet (*note vCtrlC packet::) with the usual
+packet framing instead of the single byte '0x03'.
+
    Stubs are not required to recognize these interrupt mechanisms and
 the precise meaning associated with receipt of the interrupt is
 implementation defined.  If the target supports debugging of multiple
 threads and/or processes, it should attempt to interrupt all
-currently-executing threads and processes.  If the stub is successful
-at interrupting the running program, it should send one of the stop
-reply packets (*note Stop Reply Packets::) to GDB as a result of
-successfully stopping the program in all-stop mode, and a stop reply
-for each stopped thread in non-stop mode.  Interrupts received while the
-program is stopped are discarded.
+currently-executing threads and processes.  If the stub is successful at
+interrupting the running program, it should send one of the stop reply
+packets (*note Stop Reply Packets::) to GDB as a result of successfully
+stopping the program in all-stop mode, and a stop reply for each stopped
+thread in non-stop mode.  Interrupts received while the program is
+stopped are queued and the program will be interrupted when it is
+resumed next time.
 
 
 File: gdb.info,  Node: Notification Packets,  Next: Remote Non-Stop,  Prev: Interrupts,  Up: Remote Protocol
@@ -4039,20 +4965,20 @@ sent by the stub).  Notifications carry 
 the round-trip latency of an acknowledgment, and so are useful for
 low-impact communications where occasional packet loss is not a problem.
 
-   A notification packet has the form `% DATA # CHECKSUM', where DATA
-is the content of the notification, and CHECKSUM is a checksum of DATA,
+   A notification packet has the form '% DATA # CHECKSUM', where DATA is
+the content of the notification, and CHECKSUM is a checksum of DATA,
 computed and formatted as for ordinary GDB packets.  A notification's
-DATA never contains `$', `%' or `#' characters.  Upon receiving a
-notification, the recipient sends no `+' or `-' to acknowledge the
+DATA never contains '$', '%' or '#' characters.  Upon receiving a
+notification, the recipient sends no '+' or '-' to acknowledge the
 notification's receipt or to report its corruption.
 
-   Every notification's DATA begins with a name, which contains no
-colon characters, followed by a colon character.
+   Every notification's DATA begins with a name, which contains no colon
+characters, followed by a colon character.
 
    Recipients should silently ignore corrupted notifications and
-notifications they do not understand.  Recipients should restart
-timeout periods on receipt of a well-formed notification, whether or
-not they understand it.
+notifications they do not understand.  Recipients should restart timeout
+periods on receipt of a well-formed notification, whether or not they
+understand it.
 
    Senders should only send the notifications described here when this
 protocol description specifies that they are permitted.  In the future,
@@ -4060,43 +4986,42 @@ we may extend the protocol to permit exi
 contexts; this rule helps older senders avoid confusing newer
 recipients.
 
-   (Older versions of GDB ignore bytes received until they see the `$'
+   (Older versions of GDB ignore bytes received until they see the '$'
 byte that begins an ordinary packet, so new stubs may transmit
 notifications without fear of confusing older clients.  There are no
 notifications defined for GDB to send at the moment, but we assume that
 most older stubs would ignore them, as well.)
 
    Each notification is comprised of three parts:
-`NAME:EVENT'
+'NAME:EVENT'
      The notification packet is sent by the side that initiates the
      exchange (currently, only the stub does that), with EVENT carrying
      the specific information about the notification, and NAME
      specifying the name of the notification.
-
-`ACK'
-     The acknowledge sent by the other side, usually GDB, to
-     acknowledge the exchange and request the event.
+'ACK'
+     The acknowledge sent by the other side, usually GDB, to acknowledge
+     the exchange and request the event.
 
    The purpose of an asynchronous notification mechanism is to report to
 GDB that something interesting happened in the remote stub.
 
-   The remote stub may send notification NAME:EVENT at any time, but
-GDB acknowledges the notification when appropriate.  The notification
-event is pending before GDB acknowledges.  Only one notification at a
-time may be pending; if additional events occur before GDB has
-acknowledged the previous notification, they must be queued by the stub
-for later synchronous transmission in response to ACK packets from GDB.
-Because the notification mechanism is unreliable, the stub is permitted
-to resend a notification if it believes GDB may not have received it.
+   The remote stub may send notification NAME:EVENT at any time, but GDB
+acknowledges the notification when appropriate.  The notification event
+is pending before GDB acknowledges.  Only one notification at a time may
+be pending; if additional events occur before GDB has acknowledged the
+previous notification, they must be queued by the stub for later
+synchronous transmission in response to ACK packets from GDB.  Because
+the notification mechanism is unreliable, the stub is permitted to
+resend a notification if it believes GDB may not have received it.
 
    Specifically, notifications may appear when GDB is not otherwise
 reading input from the stub, or when GDB is expecting to read a normal
-synchronous response or a `+'/`-' acknowledgment to a packet it has
+synchronous response or a '+'/'-' acknowledgment to a packet it has
 sent.  Notification packets are distinct from any other communication
 from the stub so there is no ambiguity.
 
-   After receiving a notification, GDB shall acknowledge it by sending
-a ACK packet as a regular, synchronous request to the stub.  Such
+   After receiving a notification, GDB shall acknowledge it by sending a
+ACK packet as a regular, synchronous request to the stub.  Such
 acknowledgment is not required to happen immediately, as GDB is
 permitted to send other, unrelated packets to the stub first, which the
 stub should process normally.
@@ -4104,38 +5029,41 @@ stub should process normally.
    Upon receiving a ACK packet, if the stub has other queued events to
 report to GDB, it shall respond by sending a normal EVENT.  GDB shall
 then send another ACK packet to solicit further responses; again, it is
-permitted to send other, unrelated packets as well which the stub
-should process normally.
+permitted to send other, unrelated packets as well which the stub should
+process normally.
 
    If the stub receives a ACK packet and there are no additional EVENT
-to report, the stub shall return an `OK' response.  At this point, GDB
+to report, the stub shall return an 'OK' response.  At this point, GDB
 has finished processing a notification and the stub has completed
-sending any queued events.  GDB won't accept any new notifications
-until the final `OK' is received .  If further notification events
-occur, the stub shall send a new notification, GDB shall accept the
-notification, and the process shall be repeated.
+sending any queued events.  GDB won't accept any new notifications until
+the final 'OK' is received .  If further notification events occur, the
+stub shall send a new notification, GDB shall accept the notification,
+and the process shall be repeated.
 
    The process of asynchronous notification can be illustrated by the
 following example:
-     <- `%%Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;'
-     `...'
-     -> `vStopped'
-     <- `T0505:68f37db7;04:40f37db7;08:63850408;thread:p7526.7528;core:0;'
-     -> `vStopped'
-     <- `T0505:68e3fdb6;04:40e3fdb6;08:63850408;thread:p7526.7529;core:0;'
-     -> `vStopped'
-     <- `OK'
+     <- %Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;
+     ...
+     -> vStopped
+     <- T0505:68f37db7;04:40f37db7;08:63850408;thread:p7526.7528;core:0;
+     -> vStopped
+     <- T0505:68e3fdb6;04:40e3fdb6;08:63850408;thread:p7526.7529;core:0;
+     -> vStopped
+     <- OK
 
    The following notifications are defined:
-NotificationAck       Event                       Description
+
+NotificationAck     Event                       Description
+                                                
 Stop      vStopped  REPLY.  The REPLY has the   Report an asynchronous
                     form of a stop reply, as    stop event in non-stop
-                    described in *note Stop     mode.
-                    Reply Packets::.  Refer to  
-                    *note Remote Non-Stop::,    
-                    for information on how      
-                    these notifications are     
-                    acknowledged by GDB.        
+                    described in                mode.
+                    *note Stop Reply Packets::. 
+                    Refer to
+                    *note Remote Non-Stop::,
+                    for information on how
+                    these notifications are
+                    acknowledged by GDB.
 
 
 File: gdb.info,  Node: Remote Non-Stop,  Next: Packet Acknowledgment,  Prev: Notification Packets,  Up: Remote Protocol
@@ -4145,53 +5073,52 @@ E.10 Remote Protocol Support for Non-Sto
 
 GDB's remote protocol supports non-stop debugging of multi-threaded
 programs, as described in *note Non-Stop Mode::.  If the stub supports
-non-stop mode, it should report that to GDB by including `QNonStop+' in
-its `qSupported' response (*note qSupported::).
+non-stop mode, it should report that to GDB by including 'QNonStop+' in
+its 'qSupported' response (*note qSupported::).
 
-   GDB typically sends a `QNonStop' packet only when establishing a new
+   GDB typically sends a 'QNonStop' packet only when establishing a new
 connection with the stub.  Entering non-stop mode does not alter the
 state of any currently-running threads, but targets must stop all
 threads in any already-attached processes when entering all-stop mode.
-GDB uses the `?' packet as necessary to probe the target state after a
+GDB uses the '?' packet as necessary to probe the target state after a
 mode change.
 
    In non-stop mode, when an attached process encounters an event that
 would otherwise be reported with a stop reply, it uses the asynchronous
-notification mechanism (*note Notification Packets::) to inform GDB.
-In contrast to all-stop mode, where all threads in all processes are
+notification mechanism (*note Notification Packets::) to inform GDB.  In
+contrast to all-stop mode, where all threads in all processes are
 stopped when a stop reply is sent, in non-stop mode only the thread
-reporting the stop event is stopped.  That is, when reporting a `S' or
-`T' response to indicate completion of a step operation, hitting a
+reporting the stop event is stopped.  That is, when reporting a 'S' or
+'T' response to indicate completion of a step operation, hitting a
 breakpoint, or a fault, only the affected thread is stopped; any other
-still-running threads continue to run.  When reporting a `W' or `X'
+still-running threads continue to run.  When reporting a 'W' or 'X'
 response, all running threads belonging to other attached processes
 continue to run.
 
-   In non-stop mode, the target shall respond to the `?' packet as
-follows.  First, any incomplete stop reply notification/`vStopped'
-sequence in progress is abandoned.  The target must begin a new
-sequence reporting stop events for all stopped threads, whether or not
-it has previously reported those events to GDB.  The first stop reply
-is sent as a synchronous reply to the `?' packet, and subsequent stop
-replies are sent as responses to `vStopped' packets using the mechanism
+   In non-stop mode, the target shall respond to the '?' packet as
+follows.  First, any incomplete stop reply notification/'vStopped'
+sequence in progress is abandoned.  The target must begin a new sequence
+reporting stop events for all stopped threads, whether or not it has
+previously reported those events to GDB.  The first stop reply is sent
+as a synchronous reply to the '?' packet, and subsequent stop replies
+are sent as responses to 'vStopped' packets using the mechanism
 described above.  The target must not send asynchronous stop reply
 notifications until the sequence is complete.  If all threads are
-running when the target receives the `?' packet, or if the target is
-not attached to any process, it shall respond `OK'.
+running when the target receives the '?' packet, or if the target is not
+attached to any process, it shall respond 'OK'.
 
    If the stub supports non-stop mode, it should also support the
-`swbreak' stop reason if software breakpoints are supported, and the
-`hwbreak' stop reason if hardware breakpoints are supported (*note
+'swbreak' stop reason if software breakpoints are supported, and the
+'hwbreak' stop reason if hardware breakpoints are supported (*note
 swbreak stop reason::).  This is because given the asynchronous nature
 of non-stop mode, between the time a thread hits a breakpoint and the
 time the event is finally processed by GDB, the breakpoint may have
-already been removed from the target.  Due to this, GDB needs to be
-able to tell whether a trap stop was caused by a delayed breakpoint
-event, which should be ignored, as opposed to a random trap signal,
-which should be reported to the user.  Note the `swbreak' feature
-implies that the target is responsible for adjusting the PC when a
-software breakpoint triggers, if necessary, such as on the x86
-architecture.
+already been removed from the target.  Due to this, GDB needs to be able
+to tell whether a trap stop was caused by a delayed breakpoint event,
+which should be ignored, as opposed to a random trap signal, which
+should be reported to the user.  Note the 'swbreak' feature implies that
+the target is responsible for adjusting the PC when a software
+breakpoint triggers, if necessary, such as on the x86 architecture.
 
 
 File: gdb.info,  Node: Packet Acknowledgment,  Next: Examples,  Prev: Remote Non-Stop,  Up: Remote Protocol
@@ -4200,36 +5127,36 @@ E.11 Packet Acknowledgment
 ==========================
 
 By default, when either the host or the target machine receives a
-packet, the first response expected is an acknowledgment: either `+'
-(to indicate the package was received correctly) or `-' (to request
+packet, the first response expected is an acknowledgment: either '+' (to
+indicate the package was received correctly) or '-' (to request
 retransmission).  This mechanism allows the GDB remote protocol to
 operate over unreliable transport mechanisms, such as a serial line.
 
    In cases where the transport mechanism is itself reliable (such as a
-pipe or TCP connection), the `+'/`-' acknowledgments are redundant.  It
+pipe or TCP connection), the '+'/'-' acknowledgments are redundant.  It
 may be desirable to disable them in that case to reduce communication
 overhead, or for other reasons.  This can be accomplished by means of
-the `QStartNoAckMode' packet; *note QStartNoAckMode::.
+the 'QStartNoAckMode' packet; *note QStartNoAckMode::.
 
    When in no-acknowledgment mode, neither the stub nor GDB shall send
-or expect `+'/`-' protocol acknowledgments.  The packet and response
+or expect '+'/'-' protocol acknowledgments.  The packet and response
 format still includes the normal checksum, as described in *note
 Overview::, but the checksum may be ignored by the receiver.
 
-   If the stub supports `QStartNoAckMode' and prefers to operate in
+   If the stub supports 'QStartNoAckMode' and prefers to operate in
 no-acknowledgment mode, it should report that to GDB by including
-`QStartNoAckMode+' in its response to `qSupported'; *note qSupported::.
-If GDB also supports `QStartNoAckMode' and it has not been disabled via
-the `set remote noack-packet off' command (*note Remote
-Configuration::), GDB may then send a `QStartNoAckMode' packet to the
+'QStartNoAckMode+' in its response to 'qSupported'; *note qSupported::.
+If GDB also supports 'QStartNoAckMode' and it has not been disabled via
+the 'set remote noack-packet off' command (*note Remote
+Configuration::), GDB may then send a 'QStartNoAckMode' packet to the
 stub.  Only then may the stub actually turn off packet acknowledgments.
-GDB sends a final `+' acknowledgment of the stub's `OK' response, which
+GDB sends a final '+' acknowledgment of the stub's 'OK' response, which
 can be safely ignored by the stub.
 
-   Note that `set remote noack-packet' command only affects negotiation
+   Note that 'set remote noack-packet' command only affects negotiation
 between GDB and the stub when subsequent connections are made; it does
 not affect the protocol acknowledgment state for any current connection.
-Since `+'/`-' acknowledgments are enabled by default when a new
+Since '+'/'-' acknowledgments are enabled by default when a new
 connection is established, there is also no protocol request to
 re-enable the acknowledgments for the current connection, once disabled.
 
@@ -4242,27 +5169,27 @@ E.12 Examples
 Example sequence of a target being re-started.  Notice how the restart
 does not get any direct output:
 
-     -> `R00'
-     <- `+'
+     -> R00
+     <- +
      _target restarts_
-     -> `?'
-     <- `+'
-     <- `T001:1234123412341234'
-     -> `+'
+     -> ?
+     <- +
+     <- T001:1234123412341234
+     -> +
 
    Example sequence of a target being stepped by a single instruction:
 
-     -> `G1445...'
-     <- `+'
-     -> `s'
-     <- `+'
+     -> G1445...
+     <- +
+     -> s
+     <- +
      _time passes_
-     <- `T001:1234123412341234'
-     -> `+'
-     -> `g'
-     <- `+'
-     <- `1455...'
-     -> `+'
+     <- T001:1234123412341234
+     -> +
+     -> g
+     <- +
+     <- 1455...
+     -> +
 
 
 File: gdb.info,  Node: File-I/O Remote Protocol Extension,  Next: Library List Format,  Prev: Examples,  Up: Remote Protocol
@@ -4293,27 +5220,26 @@ The "File I/O remote protocol extension"
 target to use the host's file system and console I/O to perform various
 system calls.  System calls on the target system are translated into a
 remote protocol packet to the host system, which then performs the
-needed actions and returns a response packet to the target system.
-This simulates file system operations even on targets that lack file
-systems.
-
-   The protocol is defined to be independent of both the host and
-target systems.  It uses its own internal representation of datatypes
-and values.  Both GDB and the target's GDB stub are responsible for
+needed actions and returns a response packet to the target system.  This
+simulates file system operations even on targets that lack file systems.
+
+   The protocol is defined to be independent of both the host and target
+systems.  It uses its own internal representation of datatypes and
+values.  Both GDB and the target's GDB stub are responsible for
 translating the system-dependent value representations into the internal
 protocol representations when data is transmitted.
 
    The communication is synchronous.  A system call is possible only
-when GDB is waiting for a response from the `C', `c', `S' or `s'
-packets.  While GDB handles the request for a system call, the target
-is stopped to allow deterministic access to the target's memory.
-Therefore File-I/O is not interruptible by target signals.  On the
-other hand, it is possible to interrupt File-I/O by a user interrupt
-(`Ctrl-C') within GDB.
+when GDB is waiting for a response from the 'C', 'c', 'S' or 's'
+packets.  While GDB handles the request for a system call, the target is
+stopped to allow deterministic access to the target's memory.  Therefore
+File-I/O is not interruptible by target signals.  On the other hand, it
+is possible to interrupt File-I/O by a user interrupt ('Ctrl-C') within
+GDB.
 
    The target's request to perform a host system call does not finish
-the latest `C', `c', `S' or `s' action.  That means, after finishing
-the system call, the target returns to continuing the previous activity
+the latest 'C', 'c', 'S' or 's' action.  That means, after finishing the
+system call, the target returns to continuing the previous activity
 (continue, step).  No additional continue or step request from GDB is
 required.
 
@@ -4337,11 +5263,11 @@ File: gdb.info,  Node: Protocol Basics, 
 E.13.2 Protocol Basics
 ----------------------
 
-The File-I/O protocol uses the `F' packet as the request as well as
+The File-I/O protocol uses the 'F' packet as the request as well as
 reply packet.  Since a File-I/O system call can only occur when GDB is
 waiting for a response from the continuing or stepping target, the
 File-I/O request is a reply that GDB has to expect as a result of a
-previous `C', `c', `S' or `s' packet.  This `F' packet contains all
+previous 'C', 'c', 'S' or 's' packet.  This 'F' packet contains all
 information needed to allow GDB to call the appropriate host system
 call:
 
@@ -4353,14 +5279,13 @@ call:
      Numerical control flags are given in a protocol-specific
      representation.
 
-
    At this point, GDB has to perform the following actions.
 
-   * If the parameters include pointer values to data needed as input
-     to a system call, GDB requests this data from the target with a
-     standard `m' packet request.  This additional communication has to
+   * If the parameters include pointer values to data needed as input to
+     a system call, GDB requests this data from the target with a
+     standard 'm' packet request.  This additional communication has to
      be expected by the target implementation and is handled as any
-     other `m' packet.
+     other 'm' packet.
 
    * GDB translates all value from protocol representation to host
      representation as needed.  Datatypes are coerced into the host
@@ -4372,65 +5297,64 @@ call:
 
    * If the system call is expected to return data in buffer space
      specified by pointer parameters to the call, the data is
-     transmitted to the target using a `M' or `X' packet.  This packet
+     transmitted to the target using a 'M' or 'X' packet.  This packet
      has to be expected by the target implementation and is handled as
-     any other `M' or `X' packet.
-
+     any other 'M' or 'X' packet.
 
-   Eventually GDB replies with another `F' packet which contains all
+   Eventually GDB replies with another 'F' packet which contains all
 necessary information for the target to continue.  This at least
 contains
 
    * Return value.
 
-   * `errno', if has been changed by the system call.
+   * 'errno', if has been changed by the system call.
 
    * "Ctrl-C" flag.
 
-
    After having done the needed type and value coercion, the target
 continues the latest continue or step action.
 
 
 File: gdb.info,  Node: The F Request Packet,  Next: The F Reply Packet,  Prev: Protocol Basics,  Up: File-I/O Remote Protocol Extension
 
-E.13.3 The `F' Request Packet
+E.13.3 The 'F' Request Packet
 -----------------------------
 
-The `F' request packet has the following format:
+The 'F' request packet has the following format:
+
+'FCALL-ID,PARAMETER...'
 
-`FCALL-ID,PARAMETER...'
      CALL-ID is the identifier to indicate the host system call to be
      called.  This is just the name of the function.
 
-     PARAMETER... are the parameters to the system call.  Parameters
-     are hexadecimal integer values, either the actual values in case
-     of scalar datatypes, pointers to target buffer space in case of
+     PARAMETER... are the parameters to the system call.  Parameters are
+     hexadecimal integer values, either the actual values in case of
+     scalar datatypes, pointers to target buffer space in case of
      compound datatypes and unspecified memory areas, or pointer/length
      pairs in case of string parameters.  These are appended to the
      CALL-ID as a comma-delimited list.  All values are transmitted in
      ASCII string representation, pointer/length pairs separated by a
      slash.
 
-
 
 File: gdb.info,  Node: The F Reply Packet,  Next: The Ctrl-C Message,  Prev: The F Request Packet,  Up: File-I/O Remote Protocol Extension
 
-E.13.4 The `F' Reply Packet
+E.13.4 The 'F' Reply Packet
 ---------------------------
 
-The `F' reply packet has the following format:
+The 'F' reply packet has the following format:
+
+'FRETCODE,ERRNO,CTRL-C FLAG;CALL-SPECIFIC ATTACHMENT'
 
-`FRETCODE,ERRNO,CTRL-C FLAG;CALL-SPECIFIC ATTACHMENT'
      RETCODE is the return code of the system call as hexadecimal value.
 
-     ERRNO is the `errno' set by the call, in protocol-specific
+     ERRNO is the 'errno' set by the call, in protocol-specific
      representation.  This parameter can be omitted if the call was
      successful.
 
      CTRL-C FLAG is only sent if the user requested a break.  In this
      case, ERRNO must be sent as well, even if the call was successful.
-     The CTRL-C FLAG itself consists of the character `C':
+     The CTRL-C FLAG itself consists of the character 'C':
 
           F0,0,C
 
@@ -4439,20 +5363,19 @@ The `F' reply packet has the following f
 
           F-1,4,C
 
-     assuming 4 is the protocol-specific representation of `EINTR'.
-
+     assuming 4 is the protocol-specific representation of 'EINTR'.
 
 
 File: gdb.info,  Node: The Ctrl-C Message,  Next: Console I/O,  Prev: The F Reply Packet,  Up: File-I/O Remote Protocol Extension
 
-E.13.5 The `Ctrl-C' Message
+E.13.5 The 'Ctrl-C' Message
 ---------------------------
 
-If the `Ctrl-C' flag is set in the GDB reply packet (*note The F Reply
-Packet::), the target should behave as if it had gotten a break
-message.  The meaning for the target is "system call interrupted by
-`SIGINT'".  Consequentially, the target should actually stop (as with a
-break message) and return to GDB with a `T02' packet.
+If the 'Ctrl-C' flag is set in the GDB reply packet (*note The F Reply
+Packet::), the target should behave as if it had gotten a break message.
+The meaning for the target is "system call interrupted by 'SIGINT'".
+Consequentially, the target should actually stop (as with a break
+message) and return to GDB with a 'T02' packet.
 
    It's important for the target to know in which state the system call
 was interrupted.  There are two possible cases:
@@ -4461,22 +5384,21 @@ was interrupted.  There are two possible
 
    * The system call on the host has been finished.
 
-
    These two states can be distinguished by the target by the value of
-the returned `errno'.  If it's the protocol representation of `EINTR',
+the returned 'errno'.  If it's the protocol representation of 'EINTR',
 the system call hasn't been performed.  This is equivalent to the
-`EINTR' handling on POSIX systems.  In any other case, the target may
-presume that the system call has been finished -- successfully or not
--- and should behave as if the break message arrived right after the
-system call.
+'EINTR' handling on POSIX systems.  In any other case, the target may
+presume that the system call has been finished -- successfully or not --
+and should behave as if the break message arrived right after the system
+call.
 
    GDB must behave reliably.  If the system call has not been called
-yet, GDB may send the `F' reply immediately, setting `EINTR' as `errno'
+yet, GDB may send the 'F' reply immediately, setting 'EINTR' as 'errno'
 in the packet.  If the system call on the host has been finished before
 the user requests a break, the full action must be finished by GDB.
-This requires sending `M' or `X' packets as necessary.  The `F' packet
-may only be sent when either nothing has happened or the full action
-has been completed.
+This requires sending 'M' or 'X' packets as necessary.  The 'F' packet
+may only be sent when either nothing has happened or the full action has
+been completed.
 
 
 File: gdb.info,  Node: Console I/O,  Next: List of Supported Calls,  Prev: The Ctrl-C Message,  Up: File-I/O Remote Protocol Extension
@@ -4486,25 +5408,24 @@ E.13.6 Console I/O
 
 By default and if not explicitly closed by the target system, the file
 descriptors 0, 1 and 2 are connected to the GDB console.  Output on the
-GDB console is handled as any other file output operation (`write(1,
-...)' or `write(2, ...)').  Console input is handled by GDB so that
+GDB console is handled as any other file output operation ('write(1,
+...)' or 'write(2, ...)').  Console input is handled by GDB so that
 after the target read request from file descriptor 0 all following
 typing is buffered until either one of the following conditions is met:
 
-   * The user types `Ctrl-c'.  The behaviour is as explained above, and
-     the `read' system call is treated as finished.
+   * The user types 'Ctrl-c'.  The behaviour is as explained above, and
+     the 'read' system call is treated as finished.
 
    * The user presses <RET>.  This is treated as end of input with a
      trailing newline.
 
-   * The user types `Ctrl-d'.  This is treated as end of input.  No
-     trailing character (neither newline nor `Ctrl-D') is appended to
+   * The user types 'Ctrl-d'.  This is treated as end of input.  No
+     trailing character (neither newline nor 'Ctrl-D') is appended to
      the input.
 
-
    If the user has typed more characters than fit in the buffer given to
-the `read' call, the trailing characters are buffered in GDB until
-either another `read(0, ...)' is requested by the target, or debugging
+the 'read' call, the trailing characters are buffered in GDB until
+either another 'read(0, ...)' is requested by the target, or debugging
 is stopped at the user's request.
 
 
@@ -4538,104 +5459,102 @@ Synopsis:
           int open(const char *pathname, int flags, mode_t mode);
 
 Request:
-     `Fopen,PATHPTR/LEN,FLAGS,MODE'
+     'Fopen,PATHPTR/LEN,FLAGS,MODE'
 
-     FLAGS is the bitwise `OR' of the following values:
+     FLAGS is the bitwise 'OR' of the following values:
 
-    `O_CREAT'
-          If the file does not exist it will be created.  The host
-          rules apply as far as file ownership and time stamps are
-          concerned.
+     'O_CREAT'
+          If the file does not exist it will be created.  The host rules
+          apply as far as file ownership and time stamps are concerned.
 
-    `O_EXCL'
-          When used with `O_CREAT', if the file already exists it is an
+     'O_EXCL'
+          When used with 'O_CREAT', if the file already exists it is an
           error and open() fails.
 
-    `O_TRUNC'
+     'O_TRUNC'
           If the file already exists and the open mode allows writing
-          (`O_RDWR' or `O_WRONLY' is given) it will be truncated to
-          zero length.
+          ('O_RDWR' or 'O_WRONLY' is given) it will be truncated to zero
+          length.
 
-    `O_APPEND'
+     'O_APPEND'
           The file is opened in append mode.
 
-    `O_RDONLY'
+     'O_RDONLY'
           The file is opened for reading only.
 
-    `O_WRONLY'
+     'O_WRONLY'
           The file is opened for writing only.
 
-    `O_RDWR'
+     'O_RDWR'
           The file is opened for reading and writing.
 
      Other bits are silently ignored.
 
-     MODE is the bitwise `OR' of the following values:
+     MODE is the bitwise 'OR' of the following values:
 
-    `S_IRUSR'
+     'S_IRUSR'
           User has read permission.
 
-    `S_IWUSR'
+     'S_IWUSR'
           User has write permission.
 
-    `S_IRGRP'
+     'S_IRGRP'
           Group has read permission.
 
-    `S_IWGRP'
+     'S_IWGRP'
           Group has write permission.
 
-    `S_IROTH'
+     'S_IROTH'
           Others have read permission.
 
-    `S_IWOTH'
+     'S_IWOTH'
           Others have write permission.
 
      Other bits are silently ignored.
 
 Return value:
-     `open' returns the new file descriptor or -1 if an error occurred.
+     'open' returns the new file descriptor or -1 if an error occurred.
 
 Errors:
 
-    `EEXIST'
-          PATHNAME already exists and `O_CREAT' and `O_EXCL' were used.
+     'EEXIST'
+          PATHNAME already exists and 'O_CREAT' and 'O_EXCL' were used.
 
-    `EISDIR'
+     'EISDIR'
           PATHNAME refers to a directory.
 
-    `EACCES'
+     'EACCES'
           The requested access is not allowed.
 
-    `ENAMETOOLONG'
+     'ENAMETOOLONG'
           PATHNAME was too long.
 
-    `ENOENT'
+     'ENOENT'
           A directory component in PATHNAME does not exist.
 
-    `ENODEV'
+     'ENODEV'
           PATHNAME refers to a device, pipe, named pipe or socket.
 
-    `EROFS'
+     'EROFS'
           PATHNAME refers to a file on a read-only filesystem and write
           access was requested.
 
-    `EFAULT'
+     'EFAULT'
           PATHNAME is an invalid pointer value.
 
-    `ENOSPC'
+     'ENOSPC'
           No space on device to create the file.
 
-    `EMFILE'
+     'EMFILE'
           The process already has the maximum number of files open.
 
-    `ENFILE'
+     'ENFILE'
           The limit on the total number of files open on the system has
           been reached.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: close,  Next: read,  Prev: open,  Up: List of Supported Calls
 
@@ -4646,20 +5565,19 @@ Synopsis:
           int close(int fd);
 
 Request:
-     `Fclose,FD'
+     'Fclose,FD'
 
 Return value:
-     `close' returns zero on success, or -1 if an error occurred.
+     'close' returns zero on success, or -1 if an error occurred.
 
 Errors:
 
-    `EBADF'
+     'EBADF'
           FD isn't a valid open file descriptor.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: read,  Next: write,  Prev: close,  Up: List of Supported Calls
 
@@ -4670,7 +5588,7 @@ Synopsis:
           int read(int fd, void *buf, unsigned int count);
 
 Request:
-     `Fread,FD,BUFPTR,COUNT'
+     'Fread,FD,BUFPTR,COUNT'
 
 Return value:
      On success, the number of bytes read is returned.  Zero indicates
@@ -4679,16 +5597,15 @@ Return value:
 
 Errors:
 
-    `EBADF'
+     'EBADF'
           FD is not a valid file descriptor or is not open for reading.
 
-    `EFAULT'
+     'EFAULT'
           BUFPTR is an invalid pointer value.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: write,  Next: lseek,  Prev: read,  Up: List of Supported Calls
 
@@ -4699,7 +5616,7 @@ Synopsis:
           int write(int fd, const void *buf, unsigned int count);
 
 Request:
-     `Fwrite,FD,BUFPTR,COUNT'
+     'Fwrite,FD,BUFPTR,COUNT'
 
 Return value:
      On success, the number of bytes written are returned.  Zero
@@ -4707,23 +5624,22 @@ Return value:
 
 Errors:
 
-    `EBADF'
+     'EBADF'
           FD is not a valid file descriptor or is not open for writing.
 
-    `EFAULT'
+     'EFAULT'
           BUFPTR is an invalid pointer value.
 
-    `EFBIG'
+     'EFBIG'
           An attempt was made to write a file that exceeds the
           host-specific maximum file size allowed.
 
-    `ENOSPC'
+     'ENOSPC'
           No space on device to write the data.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: lseek,  Next: rename,  Prev: write,  Up: List of Supported Calls
 
@@ -4734,17 +5650,17 @@ Synopsis:
           long lseek (int fd, long offset, int flag);
 
 Request:
-     `Flseek,FD,OFFSET,FLAG'
+     'Flseek,FD,OFFSET,FLAG'
 
      FLAG is one of:
 
-    `SEEK_SET'
+     'SEEK_SET'
           The offset is set to OFFSET bytes.
 
-    `SEEK_CUR'
+     'SEEK_CUR'
           The offset is set to its current location plus OFFSET bytes.
 
-    `SEEK_END'
+     'SEEK_END'
           The offset is set to the size of the file plus OFFSET bytes.
 
 Return value:
@@ -4754,19 +5670,18 @@ Return value:
 
 Errors:
 
-    `EBADF'
+     'EBADF'
           FD is not a valid open file descriptor.
 
-    `ESPIPE'
+     'ESPIPE'
           FD is associated with the GDB console.
 
-    `EINVAL'
+     'EINVAL'
           FLAG is not a proper value.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: rename,  Next: unlink,  Prev: lseek,  Up: List of Supported Calls
 
@@ -4777,56 +5692,56 @@ Synopsis:
           int rename(const char *oldpath, const char *newpath);
 
 Request:
-     `Frename,OLDPATHPTR/LEN,NEWPATHPTR/LEN'
+     'Frename,OLDPATHPTR/LEN,NEWPATHPTR/LEN'
 
 Return value:
      On success, zero is returned.  On error, -1 is returned.
 
 Errors:
 
-    `EISDIR'
+     'EISDIR'
           NEWPATH is an existing directory, but OLDPATH is not a
           directory.
 
-    `EEXIST'
+     'EEXIST'
           NEWPATH is a non-empty directory.
 
-    `EBUSY'
+     'EBUSY'
           OLDPATH or NEWPATH is a directory that is in use by some
           process.
 
-    `EINVAL'
+     'EINVAL'
           An attempt was made to make a directory a subdirectory of
           itself.
 
-    `ENOTDIR'
-          A  component used as a directory in OLDPATH or new path is
-          not a directory.  Or OLDPATH is a directory and NEWPATH
-          exists but is not a directory.
+     'ENOTDIR'
+          A component used as a directory in OLDPATH or new path is not
+          a directory.  Or OLDPATH is a directory and NEWPATH exists but
+          is not a directory.
 
-    `EFAULT'
+     'EFAULT'
           OLDPATHPTR or NEWPATHPTR are invalid pointer values.
 
-    `EACCES'
+     'EACCES'
           No access to the file or the path of the file.
 
-    `ENAMETOOLONG'
+     'ENAMETOOLONG'
+
           OLDPATH or NEWPATH was too long.
 
-    `ENOENT'
+     'ENOENT'
           A directory component in OLDPATH or NEWPATH does not exist.
 
-    `EROFS'
+     'EROFS'
           The file is on a read-only filesystem.
 
-    `ENOSPC'
+     'ENOSPC'
           The device containing the file has no room for the new
           directory entry.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: unlink,  Next: stat/fstat,  Prev: rename,  Up: List of Supported Calls
 
@@ -4837,42 +5752,41 @@ Synopsis:
           int unlink(const char *pathname);
 
 Request:
-     `Funlink,PATHNAMEPTR/LEN'
+     'Funlink,PATHNAMEPTR/LEN'
 
 Return value:
      On success, zero is returned.  On error, -1 is returned.
 
 Errors:
 
-    `EACCES'
+     'EACCES'
           No access to the file or the path of the file.
 
-    `EPERM'
+     'EPERM'
           The system does not allow unlinking of directories.
 
-    `EBUSY'
+     'EBUSY'
           The file PATHNAME cannot be unlinked because it's being used
           by another process.
 
-    `EFAULT'
+     'EFAULT'
           PATHNAMEPTR is an invalid pointer value.
 
-    `ENAMETOOLONG'
+     'ENAMETOOLONG'
           PATHNAME was too long.
 
-    `ENOENT'
+     'ENOENT'
           A directory component in PATHNAME does not exist.
 
-    `ENOTDIR'
+     'ENOTDIR'
           A component of the path is not a directory.
 
-    `EROFS'
+     'EROFS'
           The file is on a read-only filesystem.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: stat/fstat,  Next: gettimeofday,  Prev: unlink,  Up: List of Supported Calls
 
@@ -4884,37 +5798,36 @@ Synopsis:
           int fstat(int fd, struct stat *buf);
 
 Request:
-     `Fstat,PATHNAMEPTR/LEN,BUFPTR'
-     `Ffstat,FD,BUFPTR'
+     'Fstat,PATHNAMEPTR/LEN,BUFPTR'
+     'Ffstat,FD,BUFPTR'
 
 Return value:
      On success, zero is returned.  On error, -1 is returned.
 
 Errors:
 
-    `EBADF'
+     'EBADF'
           FD is not a valid open file.
 
-    `ENOENT'
+     'ENOENT'
           A directory component in PATHNAME does not exist or the path
           is an empty string.
 
-    `ENOTDIR'
+     'ENOTDIR'
           A component of the path is not a directory.
 
-    `EFAULT'
+     'EFAULT'
           PATHNAMEPTR is an invalid pointer value.
 
-    `EACCES'
+     'EACCES'
           No access to the file or the path of the file.
 
-    `ENAMETOOLONG'
+     'ENAMETOOLONG'
           PATHNAME was too long.
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
 
 File: gdb.info,  Node: gettimeofday,  Next: isatty,  Prev: stat/fstat,  Up: List of Supported Calls
 
@@ -4925,20 +5838,19 @@ Synopsis:
           int gettimeofday(struct timeval *tv, void *tz);
 
 Request:
-     `Fgettimeofday,TVPTR,TZPTR'
+     'Fgettimeofday,TVPTR,TZPTR'
 
 Return value:
      On success, 0 is returned, -1 otherwise.
 
 Errors:
 
-    `EINVAL'
+     'EINVAL'
           TZ is a non-NULL pointer.
 
-    `EFAULT'
+     'EFAULT'
           TVPTR and/or TZPTR is an invalid pointer value.
 
-
 
 File: gdb.info,  Node: isatty,  Next: system,  Prev: gettimeofday,  Up: List of Supported Calls
 
@@ -4949,21 +5861,20 @@ Synopsis:
           int isatty(int fd);
 
 Request:
-     `Fisatty,FD'
+     'Fisatty,FD'
 
 Return value:
      Returns 1 if FD refers to the GDB console, 0 otherwise.
 
 Errors:
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
-   Note that the `isatty' call is treated as a special case: it returns
-1 to the target if the file descriptor is attached to the GDB console,
-0 otherwise.  Implementing through system calls would require
-implementing `ioctl' and would be more complex than needed.
+   Note that the 'isatty' call is treated as a special case: it returns
+1 to the target if the file descriptor is attached to the GDB console, 0
+otherwise.  Implementing through system calls would require implementing
+'ioctl' and would be more complex than needed.
 
 
 File: gdb.info,  Node: system,  Prev: isatty,  Up: List of Supported Calls
@@ -4975,39 +5886,38 @@ Synopsis:
           int system(const char *command);
 
 Request:
-     `Fsystem,COMMANDPTR/LEN'
+     'Fsystem,COMMANDPTR/LEN'
 
 Return value:
      If LEN is zero, the return value indicates whether a shell is
      available.  A zero return value indicates a shell is not available.
      For non-zero LEN, the value returned is -1 on error and the return
      status of the command otherwise.  Only the exit status of the
-     command is returned, which is extracted from the host's `system'
-     return value by calling `WEXITSTATUS(retval)'.  In case `/bin/sh'
+     command is returned, which is extracted from the host's 'system'
+     return value by calling 'WEXITSTATUS(retval)'.  In case '/bin/sh'
      could not be executed, 127 is returned.
 
 Errors:
 
-    `EINTR'
+     'EINTR'
           The call was interrupted by the user.
 
-
    GDB takes over the full task of calling the necessary host calls to
-perform the `system' call.  The return value of `system' on the host is
+perform the 'system' call.  The return value of 'system' on the host is
 simplified before it's returned to the target.  Any termination signal
 information from the child process is discarded, and the return value
 consists entirely of the exit status of the called command.
 
-   Due to security concerns, the `system' call is by default refused by
-GDB.  The user has to allow this call explicitly with the `set remote
+   Due to security concerns, the 'system' call is by default refused by
+GDB.  The user has to allow this call explicitly with the 'set remote
 system-call-allowed 1' command.
 
-`set remote system-call-allowed'
-     Control whether to allow the `system' calls in the File I/O
+'set remote system-call-allowed'
+     Control whether to allow the 'system' calls in the File I/O
      protocol for the remote target.  The default is zero (disabled).
 
-`show remote system-call-allowed'
-     Show whether the `system' calls are allowed in the File I/O
+'show remote system-call-allowed'
+     Show whether the 'system' calls are allowed in the File I/O
      protocol.
 
 
@@ -5030,21 +5940,21 @@ File: gdb.info,  Node: Integral Datatype
 Integral Datatypes
 ..................
 
-The integral datatypes used in the system calls are `int', `unsigned
-int', `long', `unsigned long', `mode_t', and `time_t'.
+The integral datatypes used in the system calls are 'int', 'unsigned
+int', 'long', 'unsigned long', 'mode_t', and 'time_t'.
 
-   `int', `unsigned int', `mode_t' and `time_t' are implemented as 32
+   'int', 'unsigned int', 'mode_t' and 'time_t' are implemented as 32
 bit values in this protocol.
 
-   `long' and `unsigned long' are implemented as 64 bit types.
+   'long' and 'unsigned long' are implemented as 64 bit types.
 
    *Note Limits::, for corresponding MIN and MAX values (similar to
-those in `limits.h') to allow range checking on host and target.
+those in 'limits.h') to allow range checking on host and target.
 
-   `time_t' datatypes are defined as seconds since the Epoch.
+   'time_t' datatypes are defined as seconds since the Epoch.
 
    All integral datatypes transferred as part of a memory read or write
-of a structured datatype e.g. a `struct stat' have to be given in big
+of a structured datatype e.g. a 'struct stat' have to be given in big
 endian byte order.
 
 
@@ -5055,17 +5965,17 @@ Pointer Values
 
 Pointers to target data are transmitted as they are.  An exception is
 made for pointers to buffers for which the length isn't transmitted as
-part of the function call, namely strings.  Strings are transmitted as
-a pointer/length pair, both as hex values, e.g.
+part of the function call, namely strings.  Strings are transmitted as a
+pointer/length pair, both as hex values, e.g.
 
-     `1aaf/12'
+     1aaf/12
 
 which is a pointer to data of length 18 bytes at position 0x1aaf.  The
 length is defined as the full string length in bytes, including the
-trailing null byte.  For example, the string `"hello world"' at address
+trailing null byte.  For example, the string '"hello world"' at address
 0x123456 is transmitted as
 
-     `123456/d'
+     123456/d
 
 
 File: gdb.info,  Node: Memory Transfer,  Next: struct stat,  Prev: Pointer Values,  Up: Protocol-specific Representation of Datatypes
@@ -5074,12 +5984,12 @@ Memory Transfer
 ...............
 
 Structured data which is transferred using a memory read or write (for
-example, a `struct stat') is expected to be in a protocol-specific
+example, a 'struct stat') is expected to be in a protocol-specific
 format with all scalar multibyte datatypes being big endian.
 Translation to this representation needs to be done both by the target
-before the `F' packet is sent, and by GDB before it transfers memory to
-the target.  Transferred pointers to structured data should point to
-the already-coerced data at any time.
+before the 'F' packet is sent, and by GDB before it transfers memory to
+the target.  Transferred pointers to structured data should point to the
+already-coerced data at any time.
 
 
 File: gdb.info,  Node: struct stat,  Next: struct timeval,  Prev: Memory Transfer,  Up: Protocol-specific Representation of Datatypes
@@ -5087,7 +5997,7 @@ File: gdb.info,  Node: struct stat,  Nex
 struct stat
 ...........
 
-The buffer of type `struct stat' used by the target and GDB is defined
+The buffer of type 'struct stat' used by the target and GDB is defined
 as follows:
 
      struct stat {
@@ -5113,34 +6023,34 @@ this structure is of size 64 bytes.
    The values of several fields have a restricted meaning and/or range
 of values.
 
-`st_dev'
+'st_dev'
      A value of 0 represents a file, 1 the console.
 
-`st_ino'
+'st_ino'
      No valid meaning for the target.  Transmitted unchanged.
 
-`st_mode'
-     Valid mode bits are described in *note Constants::.  Any other
-     bits have currently no meaning for the target.
-
-`st_uid'
-`st_gid'
-`st_rdev'
+'st_mode'
+     Valid mode bits are described in *note Constants::.  Any other bits
+     have currently no meaning for the target.
+
+'st_uid'
+'st_gid'
+'st_rdev'
      No valid meaning for the target.  Transmitted unchanged.
 
-`st_atime'
-`st_mtime'
-`st_ctime'
+'st_atime'
+'st_mtime'
+'st_ctime'
      These values have a host and file system dependent accuracy.
      Especially on Windows hosts, the file system may not support exact
      timing values.
 
-   The target gets a `struct stat' of the above representation and is
+   The target gets a 'struct stat' of the above representation and is
 responsible for coercing it to the target representation before
 continuing.
 
    Note that due to size differences between the host, target, and
-protocol representations of `struct stat' members, these members could
+protocol representations of 'struct stat' members, these members could
 eventually get truncated on the target.
 
 
@@ -5149,7 +6059,7 @@ File: gdb.info,  Node: struct timeval,  
 struct timeval
 ..............
 
-The buffer of type `struct timeval' used by the File-I/O protocol is
+The buffer of type 'struct timeval' used by the File-I/O protocol is
 defined as follows:
 
      struct timeval {
@@ -5244,8 +6154,8 @@ All values are given in decimal represen
        ENAMETOOLONG   91
        EUNKNOWN       9999
 
-   `EUNKNOWN' is used as a fallback error value if a host system returns
- any error value not in the list of supported error numbers.
+   'EUNKNOWN' is used as a fallback error value if a host system returns
+any error value not in the list of supported error numbers.
 
 
 File: gdb.info,  Node: Lseek Flags,  Next: Limits,  Prev: Errno Values,  Up: Constants
@@ -5281,41 +6191,41 @@ E.13.10 File-I/O Examples
 Example sequence of a write call, file descriptor 3, buffer is at target
 address 0x1234, 6 bytes should be written:
 
-     <- `Fwrite,3,1234,6'
+     <- Fwrite,3,1234,6
      _request memory read from target_
-     -> `m1234,6'
+     -> m1234,6
      <- XXXXXX
      _return "6 bytes written"_
-     -> `F6'
+     -> F6
 
    Example sequence of a read call, file descriptor 3, buffer is at
 target address 0x1234, 6 bytes should be read:
 
-     <- `Fread,3,1234,6'
+     <- Fread,3,1234,6
      _request memory write to target_
-     -> `X1234,6:XXXXXX'
+     -> X1234,6:XXXXXX
      _return "6 bytes read"_
-     -> `F6'
+     -> F6
 
    Example sequence of a read call, call fails on the host due to
-invalid file descriptor (`EBADF'):
+invalid file descriptor ('EBADF'):
 
-     <- `Fread,3,1234,6'
-     -> `F-1,9'
+     <- Fread,3,1234,6
+     -> F-1,9
 
-   Example sequence of a read call, user presses `Ctrl-c' before
-syscall on host is called:
+   Example sequence of a read call, user presses 'Ctrl-c' before syscall
+on host is called:
 
-     <- `Fread,3,1234,6'
-     -> `F-1,4,C'
-     <- `T02'
+     <- Fread,3,1234,6
+     -> F-1,4,C
+     <- T02
 
-   Example sequence of a read call, user presses `Ctrl-c' after syscall
+   Example sequence of a read call, user presses 'Ctrl-c' after syscall
 on host is called:
 
-     <- `Fread,3,1234,6'
-     -> `X1234,6:XXXXXX'
-     <- `T02'
+     <- Fread,3,1234,6
+     -> X1234,6:XXXXXX
+     <- T02
 
 
 File: gdb.info,  Node: Library List Format,  Next: Library List Format for SVR4 Targets,  Prev: File-I/O Remote Protocol Extension,  Up: Remote Protocol
@@ -5323,27 +6233,27 @@ File: gdb.info,  Node: Library List Form
 E.14 Library List Format
 ========================
 
-On some platforms, a dynamic loader (e.g. `ld.so') runs in the same
+On some platforms, a dynamic loader (e.g. 'ld.so') runs in the same
 process as your application to manage libraries.  In this case, GDB can
-use the loader's symbol table and normal memory operations to maintain
-a list of shared libraries.  On other platforms, the operating system
+use the loader's symbol table and normal memory operations to maintain a
+list of shared libraries.  On other platforms, the operating system
 manages loaded libraries.  GDB can not retrieve the list of currently
 loaded libraries through memory operations, so it uses the
-`qXfer:libraries:read' packet (*note qXfer library list read::)
-instead.  The remote stub queries the target's operating system and
-reports which libraries are loaded.
-
-   The `qXfer:libraries:read' packet returns an XML document which
-lists loaded libraries and their offsets.  Each library has an
-associated name and one or more segment or section base addresses,
-which report where the library was loaded in memory.
+'qXfer:libraries:read' packet (*note qXfer library list read::) instead.
+The remote stub queries the target's operating system and reports which
+libraries are loaded.
+
+   The 'qXfer:libraries:read' packet returns an XML document which lists
+loaded libraries and their offsets.  Each library has an associated name
+and one or more segment or section base addresses, which report where
+the library was loaded in memory.
 
    For the common case of libraries that are fully linked binaries, the
 library should have a list of segments.  If the target supports dynamic
 linking of a relocatable object file, its library XML element should
 instead include a list of allocated sections.  The segment or section
-bases are start addresses, not relocation offsets; they do not depend
-on the library's link-time base addresses.
+bases are start addresses, not relocation offsets; they do not depend on
+the library's link-time base addresses.
 
    GDB must be linked with the Expat library to support XML library
 lists.  *Note Expat::.
@@ -5390,34 +6300,31 @@ File: gdb.info,  Node: Library List Form
 E.15 Library List Format for SVR4 Targets
 =========================================
 
-On SVR4 platforms GDB can use the symbol table of a dynamic loader
-(e.g. `ld.so') and normal memory operations to maintain a list of
-shared libraries.  Still a special library list provided by this packet
-is more efficient for the GDB remote protocol.
+On SVR4 platforms GDB can use the symbol table of a dynamic loader (e.g.
+'ld.so') and normal memory operations to maintain a list of shared
+libraries.  Still a special library list provided by this packet is more
+efficient for the GDB remote protocol.
 
-   The `qXfer:libraries-svr4:read' packet returns an XML document which
+   The 'qXfer:libraries-svr4:read' packet returns an XML document which
 lists loaded libraries and their SVR4 linker parameters.  For each
 library on SVR4 target, the following parameters are reported:
 
-   - `name', the absolute file name from the `l_name' field of `struct
+   - 'name', the absolute file name from the 'l_name' field of 'struct
      link_map'.
-
-   - `lm' with address of `struct link_map' used for TLS (Thread Local
+   - 'lm' with address of 'struct link_map' used for TLS (Thread Local
      Storage) access.
-
-   - `l_addr', the displacement as read from the field `l_addr' of
-     `struct link_map'.  For prelinked libraries this is not an absolute
+   - 'l_addr', the displacement as read from the field 'l_addr' of
+     'struct link_map'.  For prelinked libraries this is not an absolute
      memory address.  It is a displacement of absolute memory address
      against address the file was prelinked to during the library load.
+   - 'l_ld', which is memory address of the 'PT_DYNAMIC' segment
 
-   - `l_ld', which is memory address of the `PT_DYNAMIC' segment
-
-   Additionally the single `main-lm' attribute specifies address of
-`struct link_map' used for the main executable.  This parameter is used
+   Additionally the single 'main-lm' attribute specifies address of
+'struct link_map' used for the main executable.  This parameter is used
 for TLS access and its presence is optional.
 
-   GDB must be linked with the Expat library to support XML SVR4
-library lists.  *Note Expat::.
+   GDB must be linked with the Expat library to support XML SVR4 library
+lists.  *Note Expat::.
 
    A simple memory map, with two loaded libraries (which do not use
 prelink), looks like this:
@@ -5450,12 +6357,12 @@ E.16 Memory Map Format
 To be able to write into flash memory, GDB needs to obtain a memory map
 from the target.  This section describes the format of the memory map.
 
-   The memory map is obtained using the `qXfer:memory-map:read' (*note
-qXfer memory map read::) packet and is an XML document that lists
-memory regions.
+   The memory map is obtained using the 'qXfer:memory-map:read' (*note
+qXfer memory map read::) packet and is an XML document that lists memory
+regions.
 
-   GDB must be linked with the Expat library to support XML memory
-maps.  *Note Expat::.
+   GDB must be linked with the Expat library to support XML memory maps.
+*Note Expat::.
 
    The top-level structure of the document is shown below:
 
@@ -5485,9 +6392,8 @@ maps.  *Note Expat::.
             <property name="blocksize">BLOCKSIZE</property>
           </memory>
 
-
    Regions must not overlap.  GDB assumes that areas of memory not
-covered by the memory map are RAM, and uses the ordinary `M' and `X'
+covered by the memory map are RAM, and uses the ordinary 'M' and 'X'
 packets to write to addresses in such ranges.
 
    The formal DTD for memory map format is given below:
@@ -5518,21 +6424,22 @@ E.17 Thread List Format
 =======================
 
 To efficiently update the list of threads and their attributes, GDB
-issues the `qXfer:threads:read' packet (*note qXfer threads read::) and
+issues the 'qXfer:threads:read' packet (*note qXfer threads read::) and
 obtains the XML document with the following structure:
 
      <?xml version="1.0"?>
      <threads>
-         <thread id="id" core="0">
+         <thread id="id" core="0" name="name">
          ... description ...
          </thread>
      </threads>
 
-   Each `thread' element must have the `id' attribute that identifies
-the thread (*note thread-id syntax::).  The `core' attribute, if
+   Each 'thread' element must have the 'id' attribute that identifies
+the thread (*note thread-id syntax::).  The 'core' attribute, if
 present, specifies which processor core the thread was last executing
-on.  The content of the of `thread' element is interpreted as
-human-readable auxilliary information.
+on.  The 'name' attribute, if present, specifies the human-readable name
+of the thread.  The content of the of 'thread' element is interpreted as
+human-readable auxiliary information.
 
 
 File: gdb.info,  Node: Traceframe Info Format,  Next: Branch Trace Format,  Prev: Thread List Format,  Up: Remote Protocol
@@ -5545,7 +6452,7 @@ inspecting a tracepoint hit, GDB needs t
 ranges, registers and trace state variables that have been collected in
 a traceframe.
 
-   This list is obtained using the `qXfer:traceframe-info:read' (*note
+   This list is obtained using the 'qXfer:traceframe-info:read' (*note
 qXfer traceframe info read::) packet and is an XML document.
 
    GDB must be linked with the Expat library to support XML traceframe
@@ -5573,7 +6480,6 @@ info discovery.  *Note Expat::.
 
           <tvar id="NUMBER"/>
 
-
    The formal DTD for the traceframe info format is given below:
 
      <!ELEMENT traceframe-info  (memory | tvar)* >
@@ -5591,12 +6497,12 @@ File: gdb.info,  Node: Branch Trace Form
 E.19 Branch Trace Format
 ========================
 
-In order to display the branch trace of an inferior thread, GDB needs
-to obtain the list of branches.  This list is represented as list of
+In order to display the branch trace of an inferior thread, GDB needs to
+obtain the list of branches.  This list is represented as list of
 sequential code blocks that are connected via branches.  The code in
 each block has been executed sequentially.
 
-   This list is obtained using the `qXfer:btrace:read' (*note qXfer
+   This list is obtained using the 'qXfer:btrace:read' (*note qXfer
 btrace read::) packet and is an XML document.
 
    GDB must be linked with the Expat library to support XML traceframe
@@ -5612,12 +6518,11 @@ info discovery.  *Note Expat::.
         block...
      </btrace>
 
-   * A block of sequentially executed instructions starting at BEGIN
-     and ending at END:
+   * A block of sequentially executed instructions starting at BEGIN and
+     ending at END:
 
           <block begin="BEGIN" end="END"/>
 
-
    The formal DTD for the branch trace format is given below:
 
      <!ELEMENT btrace  (block* | pt) >
@@ -5646,25 +6551,23 @@ E.20 Branch Trace Configuration Format
 ======================================
 
 For each inferior thread, GDB can obtain the branch trace configuration
-using the `qXfer:btrace-conf:read' (*note qXfer btrace-conf read::)
+using the 'qXfer:btrace-conf:read' (*note qXfer btrace-conf read::)
 packet.
 
    The configuration describes the branch trace format and configuration
 settings for that format.  The following information is described:
 
-`bts'
+'bts'
      This thread uses the "Branch Trace Store" (BTS) format.
-    `size'
+     'size'
           The size of the BTS ring buffer in bytes.
+'pt'
+     This thread uses the "Intel Processor Trace" (Intel PT) format.
+     'size'
+          The size of the Intel PT ring buffer in bytes.
 
-`pt'
-     This thread uses the "Intel(R) Processor Trace" (Intel(R) PT)
-     format.
-    `size'
-          The size of the Intel(R) PT ring buffer in bytes.
-
-   GDB must be linked with the Expat library to support XML branch
-trace configuration discovery.  *Note Expat::.
+   GDB must be linked with the Expat library to support XML branch trace
+configuration discovery.  *Note Expat::.
 
    The formal DTD for the branch trace configuration format is given
 below:
@@ -5691,17 +6594,16 @@ real-time behavior, delays introduced by
 program to fail, even when the code itself is correct.  It is useful to
 be able to observe the program's behavior without interrupting it.
 
-   Using GDB's `trace' and `collect' commands, the user can specify
+   Using GDB's 'trace' and 'collect' commands, the user can specify
 locations in the program, and arbitrary expressions to evaluate when
-those locations are reached.  Later, using the `tfind' command, she can
+those locations are reached.  Later, using the 'tfind' command, she can
 examine the values those expressions had when the program hit the trace
-points.  The expressions may also denote objects in memory --
-structures or arrays, for example -- whose values GDB should record;
-while visiting a particular tracepoint, the user may inspect those
-objects as if they were in memory at that moment.  However, because GDB
-records these values without interacting with the user, it can do so
-quickly and unobtrusively, hopefully not disturbing the program's
-behavior.
+points.  The expressions may also denote objects in memory -- structures
+or arrays, for example -- whose values GDB should record; while visiting
+a particular tracepoint, the user may inspect those objects as if they
+were in memory at that moment.  However, because GDB records these
+values without interacting with the user, it can do so quickly and
+unobtrusively, hopefully not disturbing the program's behavior.
 
    When GDB is debugging a remote target, the GDB "agent" code running
 on the target computes the values of the expressions itself.  To avoid
@@ -5712,16 +6614,15 @@ bytecode, and records the values for GDB
 
    The bytecode language is simple; there are forty-odd opcodes, the
 bulk of which are the usual vocabulary of C operands (addition,
-subtraction, shifts, and so on) and various sizes of literals and
-memory reference operations.  The bytecode interpreter operates
-strictly on machine-level values -- various sizes of integers and
-floating point numbers -- and requires no information about types or
-symbols; thus, the interpreter's internal data structures are simple,
-and each bytecode requires only a few native machine instructions to
-implement it.  The interpreter is small, and strict limits on the
-memory and time required to evaluate an expression are easy to
-determine, making it suitable for use by the debugging agent in
-real-time applications.
+subtraction, shifts, and so on) and various sizes of literals and memory
+reference operations.  The bytecode interpreter operates strictly on
+machine-level values -- various sizes of integers and floating point
+numbers -- and requires no information about types or symbols; thus, the
+interpreter's internal data structures are simple, and each bytecode
+requires only a few native machine instructions to implement it.  The
+interpreter is small, and strict limits on the memory and time required
+to evaluate an expression are easy to determine, making it suitable for
+use by the debugging agent in real-time applications.
 
 * Menu:
 
@@ -5739,7 +6640,7 @@ F.1 General Bytecode Design
 
 The agent represents bytecode expressions as an array of bytes.  Each
 instruction is one byte long (thus the term "bytecode").  Some
-instructions are followed by operand bytes; for example, the `goto'
+instructions are followed by operand bytes; for example, the 'goto'
 instruction is followed by a destination for the jump.
 
    The bytecode interpreter is a stack-based machine; most instructions
@@ -5756,27 +6657,27 @@ stack element as follows:
        LONGEST l;
        DOUBLEST d;
      };
-   where `LONGEST' and `DOUBLEST' are `typedef' names for the largest
+where 'LONGEST' and 'DOUBLEST' are 'typedef' names for the largest
 integer and floating point types on the machine.
 
    By the time the bytecode interpreter reaches the end of the
-expression, the value of the expression should be the only value left
-on the stack.  For tracing applications, `trace' bytecodes in the
+expression, the value of the expression should be the only value left on
+the stack.  For tracing applications, 'trace' bytecodes in the
 expression will have recorded the necessary data, and the value on the
 stack may be discarded.  For other applications, like conditional
 breakpoints, the value may be useful.
 
    Separate from the stack, the interpreter has two registers:
-`pc'
+'pc'
      The address of the next bytecode to execute.
 
-`start'
+'start'
      The address of the start of the bytecode expression, necessary for
-     interpreting the `goto' and `if_goto' instructions.
+     interpreting the 'goto' and 'if_goto' instructions.
 
-   Neither of these registers is directly visible to the bytecode
-language itself, but they are useful for defining the meanings of the
-bytecode operations.
+Neither of these registers is directly visible to the bytecode language
+itself, but they are useful for defining the meanings of the bytecode
+operations.
 
    There are no instructions to perform side effects on the running
 program, or call the program's functions; we assume that these
@@ -5787,17 +6688,17 @@ the running code.
 sizes of values, and operate on full-width values; the upper bits of the
 values are simply ignored, since they do not usually make a difference
 to the value computed.  The exceptions to this rule are:
-memory reference instructions (`ref'N)
+
+memory reference instructions ('ref'N)
      There are distinct instructions to fetch different word sizes from
      memory.  Once on the stack, however, the values are treated as
-     full-size integers.  They may need to be sign-extended; the `ext'
+     full-size integers.  They may need to be sign-extended; the 'ext'
      instruction exists for this purpose.
 
-the sign-extension instruction (`ext' N)
+the sign-extension instruction ('ext' N)
      These clearly need to know which portion of their operand is to be
      extended to occupy the full length of the word.
 
-
    If the interpreter is unable to evaluate an expression completely for
 some reason (a memory location is inaccessible, or a divisor is zero,
 for example), we say that interpretation "terminates with an error".
@@ -5807,9 +6708,9 @@ assume that they may attempt to divide b
 locations, and misbehave in other ways.
 
    Even complicated C expressions compile to a few bytecode
-instructions; for example, the expression `x + y * z' would typically
-produce code like the following, assuming that `x' and `y' live in
-registers, and `z' is a global variable holding a 32-bit `int':
+instructions; for example, the expression 'x + y * z' would typically
+produce code like the following, assuming that 'x' and 'y' live in
+registers, and 'z' is a global variable holding a 32-bit 'int':
      reg 1
      reg 2
      const32 address of z
@@ -5820,39 +6721,39 @@ registers, and `z' is a global variable 
      end
 
    In detail, these mean:
-`reg 1'
-     Push the value of register 1 (presumably holding `x') onto the
+
+'reg 1'
+     Push the value of register 1 (presumably holding 'x') onto the
      stack.
 
-`reg 2'
-     Push the value of register 2 (holding `y').
+'reg 2'
+     Push the value of register 2 (holding 'y').
 
-`const32 address of z'
-     Push the address of `z' onto the stack.
+'const32 address of z'
+     Push the address of 'z' onto the stack.
 
-`ref32'
+'ref32'
      Fetch a 32-bit word from the address at the top of the stack;
      replace the address on the stack with the value.  Thus, we replace
-     the address of `z' with `z''s value.
+     the address of 'z' with 'z''s value.
 
-`ext 32'
+'ext 32'
      Sign-extend the value on the top of the stack from 32 bits to full
-     length.  This is necessary because `z' is a signed integer.
+     length.  This is necessary because 'z' is a signed integer.
 
-`mul'
+'mul'
      Pop the top two numbers on the stack, multiply them, and push their
      product.  Now the top of the stack contains the value of the
-     expression `y * z'.
+     expression 'y * z'.
 
-`add'
+'add'
      Pop the top two numbers, add them, and push the sum.  Now the top
-     of the stack contains the value of `x + y * z'.
+     of the stack contains the value of 'x + y * z'.
 
-`end'
+'end'
      Stop executing; the value left on the stack top is the value to be
      recorded.
 
-
 
 File: gdb.info,  Node: Bytecode Descriptions,  Next: Using Agent Expressions,  Prev: General Bytecode Design,  Up: Agent Expressions
 
@@ -5861,35 +6762,34 @@ F.2 Bytecode Descriptions
 
 Each bytecode description has the following form:
 
-`add' (0x02): A B => A+B
+'add' (0x02): A B => A+B
+
      Pop the top two stack items, A and B, as integers; push their sum,
      as an integer.
 
-
-   In this example, `add' is the name of the bytecode, and `(0x02)' is
+   In this example, 'add' is the name of the bytecode, and '(0x02)' is
 the one-byte value used to encode the bytecode, in hexadecimal.  The
 phrase "A B => A+B" shows the stack before and after the bytecode
-executes.  Beforehand, the stack must contain at least two values, A
-and B; since the top of the stack is to the right, B is on the top of
-the stack, and A is underneath it.  After execution, the bytecode will
-have popped A and B from the stack, and replaced them with a single
-value, A+B.  There may be other values on the stack below those shown,
-but the bytecode affects only those shown.
+executes.  Beforehand, the stack must contain at least two values, A and
+B; since the top of the stack is to the right, B is on the top of the
+stack, and A is underneath it.  After execution, the bytecode will have
+popped A and B from the stack, and replaced them with a single value,
+A+B.  There may be other values on the stack below those shown, but the
+bytecode affects only those shown.
 
    Here is another example:
 
-`const8' (0x22) N: => N
+'const8' (0x22) N: => N
      Push the 8-bit integer constant N on the stack, without sign
      extension.
 
-
-   In this example, the bytecode `const8' takes an operand N directly
-from the bytecode stream; the operand follows the `const8' bytecode
+   In this example, the bytecode 'const8' takes an operand N directly
+from the bytecode stream; the operand follows the 'const8' bytecode
 itself.  We write any such operands immediately after the name of the
 bytecode, before the colon, and describe the exact encoding of the
 operand in the bytecode stream in the body of the bytecode description.
 
-   For the `const8' bytecode, there are no stack items given before the
+   For the 'const8' bytecode, there are no stack items given before the
 =>; this simply means that the bytecode consumes no values from the
 stack.  If a bytecode consumes no values, or produces no values, the
 list on either side of the => may be empty.
@@ -5903,265 +6803,264 @@ this design can be extended in a clean w
 values, they are not of immediate interest to the customer, so we avoid
 describing them, to save time.
 
-`float' (0x01): =>
+'float' (0x01): =>
+
      Prefix for floating-point bytecodes.  Not implemented yet.
 
-`add' (0x02): A B => A+B
+'add' (0x02): A B => A+B
      Pop two integers from the stack, and push their sum, as an integer.
 
-`sub' (0x03): A B => A-B
+'sub' (0x03): A B => A-B
      Pop two integers from the stack, subtract the top value from the
      next-to-top value, and push the difference.
 
-`mul' (0x04): A B => A*B
+'mul' (0x04): A B => A*B
      Pop two integers from the stack, multiply them, and push the
      product on the stack.  Note that, when one multiplies two N-bit
      numbers yielding another N-bit number, it is irrelevant whether the
      numbers are signed or not; the results are the same.
 
-`div_signed' (0x05): A B => A/B
+'div_signed' (0x05): A B => A/B
      Pop two signed integers from the stack; divide the next-to-top
      value by the top value, and push the quotient.  If the divisor is
      zero, terminate with an error.
 
-`div_unsigned' (0x06): A B => A/B
+'div_unsigned' (0x06): A B => A/B
      Pop two unsigned integers from the stack; divide the next-to-top
      value by the top value, and push the quotient.  If the divisor is
      zero, terminate with an error.
 
-`rem_signed' (0x07): A B => A MODULO B
+'rem_signed' (0x07): A B => A MODULO B
      Pop two signed integers from the stack; divide the next-to-top
      value by the top value, and push the remainder.  If the divisor is
      zero, terminate with an error.
 
-`rem_unsigned' (0x08): A B => A MODULO B
+'rem_unsigned' (0x08): A B => A MODULO B
      Pop two unsigned integers from the stack; divide the next-to-top
      value by the top value, and push the remainder.  If the divisor is
      zero, terminate with an error.
 
-`lsh' (0x09): A B => A<<B
+'lsh' (0x09): A B => A<<B
      Pop two integers from the stack; let A be the next-to-top value,
      and B be the top value.  Shift A left by B bits, and push the
      result.
 
-`rsh_signed' (0x0a): A B => `(signed)'A>>B
+'rsh_signed' (0x0a): A B => '(signed)'A>>B
      Pop two integers from the stack; let A be the next-to-top value,
      and B be the top value.  Shift A right by B bits, inserting copies
      of the top bit at the high end, and push the result.
 
-`rsh_unsigned' (0x0b): A B => A>>B
+'rsh_unsigned' (0x0b): A B => A>>B
      Pop two integers from the stack; let A be the next-to-top value,
      and B be the top value.  Shift A right by B bits, inserting zero
      bits at the high end, and push the result.
 
-`log_not' (0x0e): A => !A
+'log_not' (0x0e): A => !A
      Pop an integer from the stack; if it is zero, push the value one;
      otherwise, push the value zero.
 
-`bit_and' (0x0f): A B => A&B
-     Pop two integers from the stack, and push their bitwise `and'.
+'bit_and' (0x0f): A B => A&B
+     Pop two integers from the stack, and push their bitwise 'and'.
 
-`bit_or' (0x10): A B => A|B
-     Pop two integers from the stack, and push their bitwise `or'.
+'bit_or' (0x10): A B => A|B
+     Pop two integers from the stack, and push their bitwise 'or'.
 
-`bit_xor' (0x11): A B => A^B
+'bit_xor' (0x11): A B => A^B
      Pop two integers from the stack, and push their bitwise
-     exclusive-`or'.
+     exclusive-'or'.
 
-`bit_not' (0x12): A => ~A
+'bit_not' (0x12): A => ~A
      Pop an integer from the stack, and push its bitwise complement.
 
-`equal' (0x13): A B => A=B
+'equal' (0x13): A B => A=B
      Pop two integers from the stack; if they are equal, push the value
      one; otherwise, push the value zero.
 
-`less_signed' (0x14): A B => A<B
-     Pop two signed integers from the stack; if the next-to-top value
-     is less than the top value, push the value one; otherwise, push
-     the value zero.
+'less_signed' (0x14): A B => A<B
+     Pop two signed integers from the stack; if the next-to-top value is
+     less than the top value, push the value one; otherwise, push the
+     value zero.
 
-`less_unsigned' (0x15): A B => A<B
+'less_unsigned' (0x15): A B => A<B
      Pop two unsigned integers from the stack; if the next-to-top value
-     is less than the top value, push the value one; otherwise, push
-     the value zero.
+     is less than the top value, push the value one; otherwise, push the
+     value zero.
 
-`ext' (0x16) N: A => A, sign-extended from N bits
+'ext' (0x16) N: A => A, sign-extended from N bits
      Pop an unsigned value from the stack; treating it as an N-bit
      twos-complement value, extend it to full length.  This means that
-     all bits to the left of bit N-1 (where the least significant bit
-     is bit 0) are set to the value of bit N-1.  Note that N may be
-     larger than or equal to the width of the stack elements of the
-     bytecode engine; in this case, the bytecode should have no effect.
+     all bits to the left of bit N-1 (where the least significant bit is
+     bit 0) are set to the value of bit N-1.  Note that N may be larger
+     than or equal to the width of the stack elements of the bytecode
+     engine; in this case, the bytecode should have no effect.
 
      The number of source bits to preserve, N, is encoded as a single
-     byte unsigned integer following the `ext' bytecode.
+     byte unsigned integer following the 'ext' bytecode.
 
-`zero_ext' (0x2a) N: A => A, zero-extended from N bits
+'zero_ext' (0x2a) N: A => A, zero-extended from N bits
      Pop an unsigned value from the stack; zero all but the bottom N
-     bits.  This means that all bits to the left of bit N-1 (where the
-     least significant bit is bit 0) are set to the value of bit N-1.
+     bits.
 
      The number of source bits to preserve, N, is encoded as a single
-     byte unsigned integer following the `zero_ext' bytecode.
+     byte unsigned integer following the 'zero_ext' bytecode.
 
-`ref8' (0x17): ADDR => A
-`ref16' (0x18): ADDR => A
-`ref32' (0x19): ADDR => A
-`ref64' (0x1a): ADDR => A
-     Pop an address ADDR from the stack.  For bytecode `ref'N, fetch an
+'ref8' (0x17): ADDR => A
+'ref16' (0x18): ADDR => A
+'ref32' (0x19): ADDR => A
+'ref64' (0x1a): ADDR => A
+     Pop an address ADDR from the stack.  For bytecode 'ref'N, fetch an
      N-bit value from ADDR, using the natural target endianness.  Push
      the fetched value as an unsigned integer.
 
-     Note that ADDR may not be aligned in any particular way; the
-     `refN' bytecodes should operate correctly for any address.
+     Note that ADDR may not be aligned in any particular way; the 'refN'
+     bytecodes should operate correctly for any address.
 
      If attempting to access memory at ADDR would cause a processor
      exception of some sort, terminate with an error.
 
-`ref_float' (0x1b): ADDR => D
-`ref_double' (0x1c): ADDR => D
-`ref_long_double' (0x1d): ADDR => D
-`l_to_d' (0x1e): A => D
-`d_to_l' (0x1f): D => A
+'ref_float' (0x1b): ADDR => D
+'ref_double' (0x1c): ADDR => D
+'ref_long_double' (0x1d): ADDR => D
+'l_to_d' (0x1e): A => D
+'d_to_l' (0x1f): D => A
      Not implemented yet.
 
-`dup' (0x28): A => A A
+'dup' (0x28): A => A A
      Push another copy of the stack's top element.
 
-`swap' (0x2b): A B => B A
+'swap' (0x2b): A B => B A
      Exchange the top two items on the stack.
 
-`pop' (0x29): A =>
+'pop' (0x29): A =>
      Discard the top value on the stack.
 
-`pick' (0x32) N: A ... B => A ... B A
+'pick' (0x32) N: A ... B => A ... B A
      Duplicate an item from the stack and push it on the top of the
      stack.  N, a single byte, indicates the stack item to copy.  If N
-     is zero, this is the same as `dup'; if N is one, it copies the
-     item under the top item, etc.  If N exceeds the number of items on
-     the stack, terminate with an error.
+     is zero, this is the same as 'dup'; if N is one, it copies the item
+     under the top item, etc.  If N exceeds the number of items on the
+     stack, terminate with an error.
 
-`rot' (0x33): A B C => C B A
+'rot' (0x33): A B C => C B A
      Rotate the top three items on the stack.
 
-`if_goto' (0x20) OFFSET: A =>
+'if_goto' (0x20) OFFSET: A =>
      Pop an integer off the stack; if it is non-zero, branch to the
      given offset in the bytecode string.  Otherwise, continue to the
      next instruction in the bytecode stream.  In other words, if A is
-     non-zero, set the `pc' register to `start' + OFFSET.  Thus, an
+     non-zero, set the 'pc' register to 'start' + OFFSET.  Thus, an
      offset of zero denotes the beginning of the expression.
 
      The OFFSET is stored as a sixteen-bit unsigned value, stored
-     immediately following the `if_goto' bytecode.  It is always stored
+     immediately following the 'if_goto' bytecode.  It is always stored
      most significant byte first, regardless of the target's normal
      endianness.  The offset is not guaranteed to fall at any particular
      alignment within the bytecode stream; thus, on machines where
      fetching a 16-bit on an unaligned address raises an exception, you
      should fetch the offset one byte at a time.
 
-`goto' (0x21) OFFSET: =>
-     Branch unconditionally to OFFSET; in other words, set the `pc'
-     register to `start' + OFFSET.
-
-     The offset is stored in the same way as for the `if_goto' bytecode.
-
-`const8' (0x22) N: => N
-`const16' (0x23) N: => N
-`const32' (0x24) N: => N
-`const64' (0x25) N: => N
+'goto' (0x21) OFFSET: =>
+     Branch unconditionally to OFFSET; in other words, set the 'pc'
+     register to 'start' + OFFSET.
+
+     The offset is stored in the same way as for the 'if_goto' bytecode.
+
+'const8' (0x22) N: => N
+'const16' (0x23) N: => N
+'const32' (0x24) N: => N
+'const64' (0x25) N: => N
      Push the integer constant N on the stack, without sign extension.
      To produce a small negative value, push a small twos-complement
-     value, and then sign-extend it using the `ext' bytecode.
+     value, and then sign-extend it using the 'ext' bytecode.
 
      The constant N is stored in the appropriate number of bytes
-     following the `const'B bytecode.  The constant N is always stored
+     following the 'const'B bytecode.  The constant N is always stored
      most significant byte first, regardless of the target's normal
      endianness.  The constant is not guaranteed to fall at any
      particular alignment within the bytecode stream; thus, on machines
      where fetching a 16-bit on an unaligned address raises an
      exception, you should fetch N one byte at a time.
 
-`reg' (0x26) N: => A
+'reg' (0x26) N: => A
      Push the value of register number N, without sign extension.  The
      registers are numbered following GDB's conventions.
 
      The register number N is encoded as a 16-bit unsigned integer
-     immediately following the `reg' bytecode.  It is always stored most
+     immediately following the 'reg' bytecode.  It is always stored most
      significant byte first, regardless of the target's normal
      endianness.  The register number is not guaranteed to fall at any
      particular alignment within the bytecode stream; thus, on machines
      where fetching a 16-bit on an unaligned address raises an
      exception, you should fetch the register number one byte at a time.
 
-`getv' (0x2c) N: => V
+'getv' (0x2c) N: => V
      Push the value of trace state variable number N, without sign
      extension.
 
      The variable number N is encoded as a 16-bit unsigned integer
-     immediately following the `getv' bytecode.  It is always stored
+     immediately following the 'getv' bytecode.  It is always stored
      most significant byte first, regardless of the target's normal
      endianness.  The variable number is not guaranteed to fall at any
      particular alignment within the bytecode stream; thus, on machines
      where fetching a 16-bit on an unaligned address raises an
      exception, you should fetch the register number one byte at a time.
 
-`setv' (0x2d) N: V => V
+'setv' (0x2d) N: V => V
      Set trace state variable number N to the value found on the top of
      the stack.  The stack is unchanged, so that the value is readily
      available if the assignment is part of a larger expression.  The
-     handling of N is as described for `getv'.
+     handling of N is as described for 'getv'.
 
-`trace' (0x0c): ADDR SIZE =>
+'trace' (0x0c): ADDR SIZE =>
      Record the contents of the SIZE bytes at ADDR in a trace buffer,
      for later retrieval by GDB.
 
-`trace_quick' (0x0d) SIZE: ADDR => ADDR
+'trace_quick' (0x0d) SIZE: ADDR => ADDR
      Record the contents of the SIZE bytes at ADDR in a trace buffer,
-     for later retrieval by GDB.  SIZE is a single byte unsigned
-     integer following the `trace' opcode.
+     for later retrieval by GDB. SIZE is a single byte unsigned integer
+     following the 'trace' opcode.
 
-     This bytecode is equivalent to the sequence `dup const8 SIZE
+     This bytecode is equivalent to the sequence 'dup const8 SIZE
      trace', but we provide it anyway to save space in bytecode strings.
 
-`trace16' (0x30) SIZE: ADDR => ADDR
+'trace16' (0x30) SIZE: ADDR => ADDR
      Identical to trace_quick, except that SIZE is a 16-bit big-endian
      unsigned integer, not a single byte.  This should probably have
-     been named `trace_quick16', for consistency.
+     been named 'trace_quick16', for consistency.
 
-`tracev' (0x2e) N: => A
+'tracev' (0x2e) N: => A
      Record the value of trace state variable number N in the trace
-     buffer.  The handling of N is as described for `getv'.
+     buffer.  The handling of N is as described for 'getv'.
 
-`tracenz' (0x2f)  ADDR SIZE =>
+'tracenz' (0x2f) ADDR SIZE =>
      Record the bytes at ADDR in a trace buffer, for later retrieval by
-     GDB.  Stop at either the first zero byte, or when SIZE bytes have
+     GDB. Stop at either the first zero byte, or when SIZE bytes have
      been recorded, whichever occurs first.
 
-`printf' (0x34)  NUMARGS STRING =>
-     Do a formatted print, in the style of the C function `printf').
+'printf' (0x34) NUMARGS STRING =>
+     Do a formatted print, in the style of the C function 'printf').
      The value of NUMARGS is the number of arguments to expect on the
      stack, while STRING is the format string, prefixed with a two-byte
      length.  The last byte of the string must be zero, and is included
      in the length.  The format string includes escaped sequences just
      as it appears in C source, so for instance the format string
-     `"\t%d\n"' is six characters long, and the output will consist of
-     a tab character, a decimal number, and a newline.  At the top of
-     the stack, above the values to be printed, this bytecode will pop a
+     '"\t%d\n"' is six characters long, and the output will consist of a
+     tab character, a decimal number, and a newline.  At the top of the
+     stack, above the values to be printed, this bytecode will pop a
      "function" and "channel".  If the function is nonzero, then the
      target may treat it as a function and call it, passing the channel
-     as a first argument, as with the C function `fprintf'.  If the
+     as a first argument, as with the C function 'fprintf'.  If the
      function is zero, then the target may simply call a standard
-     formatted print function of its choice.  In all, this bytecode
-     pops 2 + NUMARGS stack elements, and pushes nothing.
+     formatted print function of its choice.  In all, this bytecode pops
+     2 + NUMARGS stack elements, and pushes nothing.
 
-`end' (0x27): =>
+'end' (0x27): =>
      Stop executing bytecode; the result should be the top element of
      the stack.  If the purpose of the expression was to compute an
      lvalue or a range of memory, then the next-to-top of the stack is
      the lvalue's address, and the top of the stack is the lvalue's
      size, in bytes.
 
-
 
 File: gdb.info,  Node: Using Agent Expressions,  Next: Varying Target Capabilities,  Prev: Bytecode Descriptions,  Up: Agent Expressions
 
@@ -6178,17 +7077,17 @@ sequence that simply gets values from re
 arithmetic, and returns a result.
 
    Another way to use agent expressions is for tracepoint data
-collection.  GDB generates a different bytecode sequence for
-collection; in addition to bytecodes that do the calculation, GDB adds
-`trace' bytecodes to save the pieces of memory that were used.
+collection.  GDB generates a different bytecode sequence for collection;
+in addition to bytecodes that do the calculation, GDB adds 'trace'
+bytecodes to save the pieces of memory that were used.
 
    * The user selects trace points in the program's code at which GDB
      should collect data.
 
    * The user specifies expressions to evaluate at each trace point.
-     These expressions may denote objects in memory, in which case
-     those objects' contents are recorded as the program runs, or
-     computed values, in which case the values themselves are recorded.
+     These expressions may denote objects in memory, in which case those
+     objects' contents are recorded as the program runs, or computed
+     values, in which case the values themselves are recorded.
 
    * GDB transmits the tracepoints and their associated expressions to
      the GDB agent, running on the debugging target.
@@ -6205,7 +7104,6 @@ collection; in addition to bytecodes tha
      If the user asks to see an object whose contents have not been
      recorded, GDB reports an error.
 
-
 
 File: gdb.info,  Node: Varying Target Capabilities,  Next: Rationale,  Prev: Using Agent Expressions,  Up: Agent Expressions
 
@@ -6213,7 +7111,7 @@ F.4 Varying Target Capabilities
 ===============================
 
 Some targets don't support floating-point, and some would rather not
-have to deal with `long long' operations.  Also, different targets will
+have to deal with 'long long' operations.  Also, different targets will
 have different stack sizes, and different bytecode buffer lengths.
 
    Thus, GDB needs a way to ask the target about itself.  We haven't
@@ -6226,7 +7124,7 @@ least the following information:
 
    * whether floating point is supported
 
-   * whether `long long' is supported
+   * whether 'long long' is supported
 
    * maximum acceptable size of bytecode stack
 
@@ -6236,7 +7134,6 @@ least the following information:
 
    * whether the target supports disabled tracepoints
 
-
 
 File: gdb.info,  Node: Rationale,  Prev: Varying Target Capabilities,  Up: Agent Expressions
 
@@ -6252,66 +7149,67 @@ What about stack overflow/underflow?
      isn't about what kinds of error-checking GDB ought to do.
 
 Why are you doing everything in LONGEST?
-     Speed isn't important, but agent code size is; using LONGEST
-     brings in a bunch of support code to do things like division, etc.
-     So this is a serious concern.
+
+     Speed isn't important, but agent code size is; using LONGEST brings
+     in a bunch of support code to do things like division, etc.  So
+     this is a serious concern.
 
      First, note that you don't need different bytecodes for different
      operand sizes.  You can generate code without _knowing_ how big the
      stack elements actually are on the target.  If the target only
      supports 32-bit ints, and you don't send any 64-bit bytecodes,
      everything just works.  The observation here is that the MIPS and
-     the Alpha have only fixed-size registers, and you can still get
-     C's semantics even though most instructions only operate on
-     full-sized words.  You just need to make sure everything is
-     properly sign-extended at the right times.  So there is no need
-     for 32- and 64-bit variants of the bytecodes.  Just implement
-     everything using the largest size you support.
+     the Alpha have only fixed-size registers, and you can still get C's
+     semantics even though most instructions only operate on full-sized
+     words.  You just need to make sure everything is properly
+     sign-extended at the right times.  So there is no need for 32- and
+     64-bit variants of the bytecodes.  Just implement everything using
+     the largest size you support.
 
      GDB should certainly check to see what sizes the target supports,
      so the user can get an error earlier, rather than later.  But this
      information is not necessary for correctness.
 
-Why don't you have `>' or `<=' operators?
+Why don't you have '>' or '<=' operators?
      I want to keep the interpreter small, and we don't need them.  We
-     can combine the `less_' opcodes with `log_not', and swap the order
+     can combine the 'less_' opcodes with 'log_not', and swap the order
      of the operands, yielding all four asymmetrical comparison
-     operators.  For example, `(x <= y)' is `! (x > y)', which is `! (y
+     operators.  For example, '(x <= y)' is '! (x > y)', which is '! (y
      < x)'.
 
-Why do you have `log_not'?
-Why do you have `ext'?
-Why do you have `zero_ext'?
+Why do you have 'log_not'?
+Why do you have 'ext'?
+Why do you have 'zero_ext'?
      These are all easily synthesized from other instructions, but I
-     expect them to be used frequently, and they're simple, so I
-     include them to keep bytecode strings short.
+     expect them to be used frequently, and they're simple, so I include
+     them to keep bytecode strings short.
 
-     `log_not' is equivalent to `const8 0 equal'; it's used in half the
+     'log_not' is equivalent to 'const8 0 equal'; it's used in half the
      relational operators.
 
-     `ext N' is equivalent to `const8 S-N lsh const8 S-N rsh_signed',
-     where S is the size of the stack elements; it follows `refM' and
+     'ext N' is equivalent to 'const8 S-N lsh const8 S-N rsh_signed',
+     where S is the size of the stack elements; it follows 'refM' and
      REG bytecodes when the value should be signed.  See the next
      bulleted item.
 
-     `zero_ext N' is equivalent to `constM MASK log_and'; it's used
+     'zero_ext N' is equivalent to 'constM MASK log_and'; it's used
      whenever we push the value of a register, because we can't assume
      the upper bits of the register aren't garbage.
 
-Why not have sign-extending variants of the `ref' operators?
-     Because that would double the number of `ref' operators, and we
-     need the `ext' bytecode anyway for accessing bitfields.
-
-Why not have constant-address variants of the `ref' operators?
-     Because that would double the number of `ref' operators again, and
-     `const32 ADDRESS ref32' is only one byte longer.
+Why not have sign-extending variants of the 'ref' operators?
+     Because that would double the number of 'ref' operators, and we
+     need the 'ext' bytecode anyway for accessing bitfields.
+
+Why not have constant-address variants of the 'ref' operators?
+     Because that would double the number of 'ref' operators again, and
+     'const32 ADDRESS ref32' is only one byte longer.
 
-Why do the `refN' operators have to support unaligned fetches?
+Why do the 'refN' operators have to support unaligned fetches?
      GDB will generate bytecode that fetches multi-byte values at
-     unaligned addresses whenever the executable's debugging
-     information tells it to.  Furthermore, GDB does not know the value
-     the pointer will have when GDB generates the bytecode, so it
-     cannot determine whether a particular fetch will be aligned or not.
+     unaligned addresses whenever the executable's debugging information
+     tells it to.  Furthermore, GDB does not know the value the pointer
+     will have when GDB generates the bytecode, so it cannot determine
+     whether a particular fetch will be aligned or not.
 
      In particular, structure bitfields may be several bytes long, but
      follow no alignment rules; members of packed structures are not
@@ -6325,15 +7223,15 @@ Why do the `refN' operators have to supp
 
 Why are there no side-effecting operators?
      Because our current client doesn't want them?  That's a cheap
-     answer.  I think the real answer is that I'm afraid of
-     implementing function calls.  We should re-visit this issue after
-     the present contract is delivered.
+     answer.  I think the real answer is that I'm afraid of implementing
+     function calls.  We should re-visit this issue after the present
+     contract is delivered.
 
-Why aren't the `goto' ops PC-relative?
+Why aren't the 'goto' ops PC-relative?
      The interpreter has the base address around anyway for PC bounds
      checking, and it seemed simpler.
 
-Why is there only one offset size for the `goto' ops?
+Why is there only one offset size for the 'goto' ops?
      Offsets are currently sixteen bits.  I'm not happy with this
      situation either:
 
@@ -6353,46 +7251,47 @@ Why is there only one offset size for th
      I'd always know my offset size.  That might be fun.
 
 Where is the function call bytecode?
+
      When we add side-effects, we should add this.
 
-Why does the `reg' bytecode take a 16-bit register number?
+Why does the 'reg' bytecode take a 16-bit register number?
+
      Intel's IA-64 architecture has 128 general-purpose registers, and
      128 floating-point registers, and I'm sure it has some random
      control registers.
 
-Why do we need `trace' and `trace_quick'?
+Why do we need 'trace' and 'trace_quick'?
      Because GDB needs to record all the memory contents and registers
      an expression touches.  If the user wants to evaluate an expression
-     `x->y->z', the agent must record the values of `x' and `x->y' as
-     well as the value of `x->y->z'.
+     'x->y->z', the agent must record the values of 'x' and 'x->y' as
+     well as the value of 'x->y->z'.
 
-Don't the `trace' bytecodes make the interpreter less general?
+Don't the 'trace' bytecodes make the interpreter less general?
      They do mean that the interpreter contains special-purpose code,
      but that doesn't mean the interpreter can only be used for that
-     purpose.  If an expression doesn't use the `trace' bytecodes, they
+     purpose.  If an expression doesn't use the 'trace' bytecodes, they
      don't get in its way.
 
-Why doesn't `trace_quick' consume its arguments the way everything else does?
+Why doesn't 'trace_quick' consume its arguments the way everything else does?
      In general, you do want your operators to consume their arguments;
      it's consistent, and generally reduces the amount of stack
-     rearrangement necessary.  However, `trace_quick' is a kludge to
-     save space; it only exists so we needn't write `dup const8 SIZE
+     rearrangement necessary.  However, 'trace_quick' is a kludge to
+     save space; it only exists so we needn't write 'dup const8 SIZE
      trace' before every memory reference.  Therefore, it's okay for it
      not to consume its arguments; it's meant for a specific context in
      which we know exactly what it should do with the stack.  If we're
      going to have a kludge, it should be an effective kludge.
 
-Why does `trace16' exist?
+Why does 'trace16' exist?
      That opcode was added by the customer that contracted Cygnus for
      the data tracing work.  I personally think it is unnecessary;
-     objects that large will be quite rare, so it is okay to use `dup
+     objects that large will be quite rare, so it is okay to use 'dup
      const16 SIZE trace' in those cases.
 
-     Whatever we decide to do with `trace16', we should at least leave
+     Whatever we decide to do with 'trace16', we should at least leave
      opcode 0x30 reserved, to remain compatible with the customer who
      added it.
 
-
 
 File: gdb.info,  Node: Target Descriptions,  Next: Operating System Information,  Prev: Agent Expressions,  Up: Top
 
@@ -6403,20 +7302,18 @@ One of the challenges of using GDB to de
 there are so many minor variants of each processor architecture in use.
 It is common practice for vendors to start with a standard processor
 core -- ARM, PowerPC, or MIPS, for example -- and then make changes to
-adapt it to a particular market niche.  Some architectures have
-hundreds of variants, available from dozens of vendors.  This leads to
-a number of problems:
+adapt it to a particular market niche.  Some architectures have hundreds
+of variants, available from dozens of vendors.  This leads to a number
+of problems:
 
    * With so many different customized processors, it is difficult for
      the GDB maintainers to keep up with the changes.
-
    * Since individual variants may have short lifetimes or limited
      audiences, it may not be worthwhile to carry information about
      every variant in the GDB source tree.
-
    * When GDB does support the architecture of the embedded system at
      hand, the task of finding the correct architecture name to give the
-     `set architecture' command can be error-prone.
+     'set architecture' command can be error-prone.
 
    To address these problems, the GDB remote protocol allows a target
 system to not only identify itself to GDB, but to actually describe its
@@ -6433,6 +7330,7 @@ descriptions.  *Note Expat::.
 * Target Description Format::       The contents of a target description.
 * Predefined Target Types::         Standard types available for target
                                     descriptions.
+* Enum Target Types::               How to define enum target types.
 * Standard Target Features::        Features GDB knows about.
 
 
@@ -6444,23 +7342,23 @@ G.1 Retrieving Descriptions
 Target descriptions can be read from the target automatically, or
 specified by the user manually.  The default behavior is to read the
 description from the target.  GDB retrieves it via the remote protocol
-using `qXfer' requests (*note qXfer: General Query Packets.).  The
-ANNEX in the `qXfer' packet will be `target.xml'.  The contents of the
-`target.xml' annex are an XML document, of the form described in *note
+using 'qXfer' requests (*note qXfer: General Query Packets.).  The ANNEX
+in the 'qXfer' packet will be 'target.xml'.  The contents of the
+'target.xml' annex are an XML document, of the form described in *note
 Target Description Format::.
 
    Alternatively, you can specify a file to read for the target
 description.  If a file is set, the target will not be queried.  The
 commands to specify a file are:
 
-`set tdesc filename PATH'
+'set tdesc filename PATH'
      Read the target description from PATH.
 
-`unset tdesc filename'
+'unset tdesc filename'
      Do not read the XML target description from a file.  GDB will use
      the description supplied by the current target.
 
-`show tdesc filename'
+'show tdesc filename'
      Show the filename to read for a target description, if any.
 
 
@@ -6471,8 +7369,8 @@ G.2 Target Description Format
 
 A target description annex is an XML (http://www.w3.org/XML/) document
 which complies with the Document Type Definition provided in the GDB
-sources in `gdb/features/gdb-target.dtd'.  This means you can use
-generally available tools like `xmllint' to check that your feature
+sources in 'gdb/features/gdb-target.dtd'.  This means you can use
+generally available tools like 'xmllint' to check that your feature
 descriptions are well-formed and valid.  However, to help people
 unfamiliar with XML write descriptions for their targets, we also
 describe the grammar here.
@@ -6493,8 +7391,8 @@ This minimal description only says that 
 architecture.
 
    A target description has the following overall form, with [ ] marking
-optional elements and ... marking repeatable elements.  The elements
-are explained further below.
+optional elements and ... marking repeatable elements.  The elements are
+explained further below.
 
      <?xml version="1.0"?>
      <!DOCTYPE target SYSTEM "gdb-target.dtd">
@@ -6507,12 +7405,11 @@ are explained further below.
 
 The description is generally insensitive to whitespace and line breaks,
 under the usual common-sense rules.  The XML version declaration and
-document type declaration can generally be omitted (GDB does not
-require them), but specifying them may be useful for XML validation
-tools.  The `version' attribute for `<target>' may also be omitted, but
-we recommend including it; if future versions of GDB use an incompatible
-revision of `gdb-target.dtd', they will detect and report the version
-mismatch.
+document type declaration can generally be omitted (GDB does not require
+them), but specifying them may be useful for XML validation tools.  The
+'version' attribute for '<target>' may also be omitted, but we recommend
+including it; if future versions of GDB use an incompatible revision of
+'gdb-target.dtd', they will detect and report the version mismatch.
 
 G.2.1 Inclusion
 ---------------
@@ -6520,14 +7417,14 @@ G.2.1 Inclusion
 It can sometimes be valuable to split a target description up into
 several different annexes, either for organizational purposes, or to
 share files between different possible target descriptions.  You can
-divide a description into multiple files by replacing any element of
-the target description with an inclusion directive of the form:
+divide a description into multiple files by replacing any element of the
+target description with an inclusion directive of the form:
 
      <xi:include href="DOCUMENT"/>
 
 When GDB encounters an element of this form, it will retrieve the named
 XML DOCUMENT, and replace the inclusion directive with the contents of
-that document.  If the current description was read using `qXfer', then
+that document.  If the current description was read using 'qXfer', then
 so will be the included document; DOCUMENT will be interpreted as the
 name of an annex.  If the current description was read from a file, GDB
 will look for DOCUMENT as a file in the same directory where it found
@@ -6536,11 +7433,11 @@ the original description.
 G.2.2 Architecture
 ------------------
 
-An `<architecture>' element has this form:
+An '<architecture>' element has this form:
 
        <architecture>ARCH</architecture>
 
-   ARCH is one of the architectures from the set accepted by `set
+   ARCH is one of the architectures from the set accepted by 'set
 architecture' (*note Specifying a Debugging Target: Targets.).
 
 G.2.3 OS ABI
@@ -6549,12 +7446,12 @@ G.2.3 OS ABI
 This optional field was introduced in GDB version 7.0.  Previous
 versions of GDB ignore it.
 
-   An `<osabi>' element has this form:
+   An '<osabi>' element has this form:
 
        <osabi>ABI-NAME</osabi>
 
    ABI-NAME is an OS ABI name from the same selection accepted by
-`set osabi' (*note Configuring the Current ABI: ABI.).
+'set osabi' (*note Configuring the Current ABI: ABI.).
 
 G.2.4 Compatible Architecture
 -----------------------------
@@ -6562,20 +7459,20 @@ G.2.4 Compatible Architecture
 This optional field was introduced in GDB version 7.0.  Previous
 versions of GDB ignore it.
 
-   A `<compatible>' element has this form:
+   A '<compatible>' element has this form:
 
        <compatible>ARCH</compatible>
 
-   ARCH is one of the architectures from the set accepted by `set
+   ARCH is one of the architectures from the set accepted by 'set
 architecture' (*note Specifying a Debugging Target: Targets.).
 
-   A `<compatible>' element is used to specify that the target is able
-to run binaries in some other than the main target architecture given
-by the `<architecture>' element.  For example, on the Cell Broadband
-Engine, the main architecture is `powerpc:common' or
-`powerpc:common64', but the system is able to run binaries in the `spu'
-architecture as well.  The way to describe this capability with
-`<compatible>' is as follows:
+   A '<compatible>' element is used to specify that the target is able
+to run binaries in some other than the main target architecture given by
+the '<architecture>' element.  For example, on the Cell Broadband
+Engine, the main architecture is 'powerpc:common' or 'powerpc:common64',
+but the system is able to run binaries in the 'spu' architecture as
+well.  The way to describe this capability with '<compatible>' is as
+follows:
 
        <architecture>powerpc:common</architecture>
        <compatible>spu</compatible>
@@ -6583,9 +7480,9 @@ architecture as well.  The way to descri
 G.2.5 Features
 --------------
 
-Each `<feature>' describes some logical portion of the target system.
+Each '<feature>' describes some logical portion of the target system.
 Features are currently used to describe available CPU registers and the
-types of their contents.  A `<feature>' element has this form:
+types of their contents.  A '<feature>' element has this form:
 
      <feature name="NAME">
        [TYPE...]
@@ -6604,22 +7501,22 @@ Any register's value is a collection of 
 The default interpretation is a two's complement integer, but other
 types can be requested by name in the register description.  Some
 predefined types are provided by GDB (*note Predefined Target Types::),
-and the description can define additional composite types.
+and the description can define additional composite and enum types.
 
-   Each type element must have an `id' attribute, which gives a unique
-(within the containing `<feature>') name to the type.  Types must be
+   Each type element must have an 'id' attribute, which gives a unique
+(within the containing '<feature>') name to the type.  Types must be
 defined before they are used.
 
    Some targets offer vector registers, which can be treated as arrays
-of scalar elements.  These types are written as `<vector>' elements,
+of scalar elements.  These types are written as '<vector>' elements,
 specifying the array element type, TYPE, and the number of elements,
 COUNT:
 
      <vector id="ID" type="TYPE" count="COUNT"/>
 
    If a register's value is usefully viewed in multiple ways, define it
-with a union type containing the useful representations.  The `<union>'
-element contains one or more `<field>' elements, each of which has a
+with a union type containing the useful representations.  The '<union>'
+element contains one or more '<field>' elements, each of which has a
 NAME and a TYPE:
 
      <union id="ID">
@@ -6628,37 +7525,61 @@ NAME and a TYPE:
      </union>
 
    If a register's value is composed from several separate values,
-define it with a structure type.  There are two forms of the `<struct>'
-element; a `<struct>' element must either contain only bitfields or
-contain no bitfields.  If the structure contains only bitfields, its
-total size in bytes must be specified, each bitfield must have an
-explicit start and end, and bitfields are automatically assigned an
-integer type.  The field's START should be less than or equal to its
-END, and zero represents the least significant bit.
+define it with either a structure type or a flags type.  A flags type
+may only contain bitfields.  A structure type may either contain only
+bitfields or contain no bitfields.  If the value contains only
+bitfields, its total size in bytes must be specified.
 
-     <struct id="ID" size="SIZE">
-       <field name="NAME" start="START" end="END"/>
-       ...
-     </struct>
-
-   If the structure contains no bitfields, then each field has an
-explicit type, and no implicit padding is added.
+   Non-bitfield values have a NAME and TYPE.
 
      <struct id="ID">
        <field name="NAME" type="TYPE"/>
        ...
      </struct>
 
-   If a register's value is a series of single-bit flags, define it with
-a flags type.  The `<flags>' element has an explicit SIZE and contains
-one or more `<field>' elements.  Each field has a NAME, a START, and an
-END.  Only single-bit flags are supported.
+   Both NAME and TYPE values are required.  No implicit padding is
+added.
+
+   Bitfield values have a NAME, START, END and TYPE.
+
+     <struct id="ID" size="SIZE">
+       <field name="NAME" start="START" end="END" type="TYPE"/>
+       ...
+     </struct>
 
      <flags id="ID" size="SIZE">
-       <field name="NAME" start="START" end="END"/>
+       <field name="NAME" start="START" end="END" type="TYPE"/>
        ...
      </flags>
 
+   The NAME value is required.  Bitfield values may be named with the
+empty string, '""', in which case the field is "filler" and its value is
+not printed.  Not all bits need to be specified, so "filler" fields are
+optional.
+
+   The START and END values are required, and TYPE is optional.  The
+field's START must be less than or equal to its END, and zero represents
+the least significant bit.
+
+   The default value of TYPE is 'bool' for single bit fields, and an
+unsigned integer otherwise.
+
+   Which to choose?  Structures or flags?
+
+   Registers defined with 'flags' have these advantages over defining
+them with 'struct':
+
+   * Arithmetic may be performed on them as if they were integers.
+   * They are printed in a more readable fashion.
+
+   Registers defined with 'struct' have one advantage over defining them
+with 'flags':
+
+   * One can fetch individual fields like in 'C'.
+
+          (gdb) print $my_struct_reg.field3
+          $1 = 42
+
 G.2.7 Registers
 ---------------
 
@@ -6685,32 +7606,31 @@ REGNUM
      greater than that of the previous register (either in the current
      feature or in a preceding feature); the first register in the
      target description defaults to zero.  This register number is used
-     to read or write the register; e.g. it is used in the remote `p'
-     and `P' packets, and registers appear in the `g' and `G' packets
-     in order of increasing register number.
+     to read or write the register; e.g. it is used in the remote 'p'
+     and 'P' packets, and registers appear in the 'g' and 'G' packets in
+     order of increasing register number.
 
 SAVE-RESTORE
      Whether the register should be preserved across inferior function
-     calls; this must be either `yes' or `no'.  The default is `yes',
+     calls; this must be either 'yes' or 'no'.  The default is 'yes',
      which is appropriate for most registers except for some system
      control registers; this is not related to the target's ABI.
 
 TYPE
      The type of the register.  It may be a predefined type, a type
-     defined in the current feature, or one of the special types `int'
-     and `float'.  `int' is an integer type of the correct size for
-     BITSIZE, and `float' is a floating point type (in the
+     defined in the current feature, or one of the special types 'int'
+     and 'float'.  'int' is an integer type of the correct size for
+     BITSIZE, and 'float' is a floating point type (in the
      architecture's normal floating point format) of the correct size
-     for BITSIZE.  The default is `int'.
+     for BITSIZE.  The default is 'int'.
 
 GROUP
      The register group to which this register belongs.  It must be
-     either `general', `float', or `vector'.  If no GROUP is specified,
-     GDB will not display the register in `info registers'.
-
+     either 'general', 'float', or 'vector'.  If no GROUP is specified,
+     GDB will not display the register in 'info registers'.
 
 
-File: gdb.info,  Node: Predefined Target Types,  Next: Standard Target Features,  Prev: Target Description Format,  Up: Target Descriptions
+File: gdb.info,  Node: Predefined Target Types,  Next: Enum Target Types,  Prev: Target Description Format,  Up: Target Descriptions
 
 G.3 Predefined Target Types
 ===========================
@@ -6720,1120 +7640,80 @@ from basic building blocks, but can not 
 Instead, standard identifiers are provided by GDB for the fundamental
 types.  The currently supported types are:
 
-`int8'
-`int16'
-`int32'
-`int64'
-`int128'
+'bool'
+     Boolean type, occupying a single bit.
+
+'int8'
+'int16'
+'int32'
+'int64'
+'int128'
      Signed integer types holding the specified number of bits.
 
-`uint8'
-`uint16'
-`uint32'
-`uint64'
-`uint128'
+'uint8'
+'uint16'
+'uint32'
+'uint64'
+'uint128'
      Unsigned integer types holding the specified number of bits.
 
-`code_ptr'
-`data_ptr'
-     Pointers to unspecified code and data.  The program counter and
-     any dedicated return address register may be marked as code
-     pointers; printing a code pointer converts it into a symbolic
-     address.  The stack pointer and any dedicated address registers
-     may be marked as data pointers.
+'code_ptr'
+'data_ptr'
+     Pointers to unspecified code and data.  The program counter and any
+     dedicated return address register may be marked as code pointers;
+     printing a code pointer converts it into a symbolic address.  The
+     stack pointer and any dedicated address registers may be marked as
+     data pointers.
 
-`ieee_single'
+'ieee_single'
      Single precision IEEE floating point.
 
-`ieee_double'
+'ieee_double'
      Double precision IEEE floating point.
 
-`arm_fpa_ext'
+'arm_fpa_ext'
      The 12-byte extended precision format used by ARM FPA registers.
 
-`i387_ext'
+'i387_ext'
      The 10-byte extended precision format used by x87 registers.
 
-`i386_eflags'
+'i386_eflags'
      32bit EFLAGS register used by x86.
 
-`i386_mxcsr'
+'i386_mxcsr'
      32bit MXCSR register used by x86.
 
-
-
-File: gdb.info,  Node: Standard Target Features,  Prev: Predefined Target Types,  Up: Target Descriptions
-
-G.4 Standard Target Features
-============================
-
-A target description must contain either no registers or all the
-target's registers.  If the description contains no registers, then GDB
-will assume a default register layout, selected based on the
-architecture.  If the description contains any registers, the default
-layout will not be used; the standard registers must be described in
-the target description, in such a way that GDB can recognize them.
-
-   This is accomplished by giving specific names to feature elements
-which contain standard registers.  GDB will look for features with
-those names and verify that they contain the expected registers; if any
-known feature is missing required registers, or if any required feature
-is missing, GDB will reject the target description.  You can add
-additional registers to any of the standard features -- GDB will
-display them just as if they were added to an unrecognized feature.
-
-   This section lists the known features and their expected contents.
-Sample XML documents for these features are included in the GDB source
-tree, in the directory `gdb/features'.
-
-   Names recognized by GDB should include the name of the company or
-organization which selected the name, and the overall architecture to
-which the feature applies; so e.g. the feature containing ARM core
-registers is named `org.gnu.gdb.arm.core'.
-
-   The names of registers are not case sensitive for the purpose of
-recognizing standard features, but GDB will only display registers
-using the capitalization used in the description.
-
-* Menu:
-
-* AArch64 Features::
-* ARM Features::
-* i386 Features::
-* MicroBlaze Features::
-* MIPS Features::
-* M68K Features::
-* Nios II Features::
-* PowerPC Features::
-* S/390 and System z Features::
-* TIC6x Features::
-
-
-File: gdb.info,  Node: AArch64 Features,  Next: ARM Features,  Up: Standard Target Features
-
-G.4.1 AArch64 Features
-----------------------
-
-The `org.gnu.gdb.aarch64.core' feature is required for AArch64 targets.
-It should contain registers `x0' through `x30', `sp', `pc', and `cpsr'.
-
-   The `org.gnu.gdb.aarch64.fpu' feature is optional.  If present, it
-should contain registers `v0' through `v31', `fpsr', and `fpcr'.
-
-
-File: gdb.info,  Node: ARM Features,  Next: i386 Features,  Prev: AArch64 Features,  Up: Standard Target Features
-
-G.4.2 ARM Features
-------------------
-
-The `org.gnu.gdb.arm.core' feature is required for non-M-profile ARM
-targets.  It should contain registers `r0' through `r13', `sp', `lr',
-`pc', and `cpsr'.
-
-   For M-profile targets (e.g. Cortex-M3), the `org.gnu.gdb.arm.core'
-feature is replaced by `org.gnu.gdb.arm.m-profile'.  It should contain
-registers `r0' through `r13', `sp', `lr', `pc', and `xpsr'.
-
-   The `org.gnu.gdb.arm.fpa' feature is optional.  If present, it
-should contain registers `f0' through `f7' and `fps'.
-
-   The `org.gnu.gdb.xscale.iwmmxt' feature is optional.  If present, it
-should contain at least registers `wR0' through `wR15' and `wCGR0'
-through `wCGR3'.  The `wCID', `wCon', `wCSSF', and `wCASF' registers
-are optional.
-
-   The `org.gnu.gdb.arm.vfp' feature is optional.  If present, it
-should contain at least registers `d0' through `d15'.  If they are
-present, `d16' through `d31' should also be included.  GDB will
-synthesize the single-precision registers from halves of the
-double-precision registers.
-
-   The `org.gnu.gdb.arm.neon' feature is optional.  It does not need to
-contain registers; it instructs GDB to display the VFP double-precision
-registers as vectors and to synthesize the quad-precision registers
-from pairs of double-precision registers.  If this feature is present,
-`org.gnu.gdb.arm.vfp' must also be present and include 32
-double-precision registers.
-
-
-File: gdb.info,  Node: i386 Features,  Next: MicroBlaze Features,  Prev: ARM Features,  Up: Standard Target Features
-
-G.4.3 i386 Features
--------------------
-
-The `org.gnu.gdb.i386.core' feature is required for i386/amd64 targets.
-It should describe the following registers:
-
-   - `eax' through `edi' plus `eip' for i386
-
-   - `rax' through `r15' plus `rip' for amd64
-
-   - `eflags', `cs', `ss', `ds', `es', `fs', `gs'
-
-   - `st0' through `st7'
-
-   - `fctrl', `fstat', `ftag', `fiseg', `fioff', `foseg', `fooff' and
-     `fop'
-
-   The register sets may be different, depending on the target.
-
-   The `org.gnu.gdb.i386.sse' feature is optional.  It should describe
-registers:
-
-   - `xmm0' through `xmm7' for i386
-
-   - `xmm0' through `xmm15' for amd64
-
-   - `mxcsr'
-
-   The `org.gnu.gdb.i386.avx' feature is optional and requires the
-`org.gnu.gdb.i386.sse' feature.  It should describe the upper 128 bits
-of YMM registers:
-
-   - `ymm0h' through `ymm7h' for i386
-
-   - `ymm0h' through `ymm15h' for amd64
-
-   The `org.gnu.gdb.i386.mpx' is an optional feature representing
-Intel(R) Memory Protection Extension (MPX).  It should describe the
-following registers:
-
-   - `bnd0raw' through `bnd3raw' for i386 and amd64.
-
-   - `bndcfgu' and `bndstatus' for i386 and amd64.
-
-   The `org.gnu.gdb.i386.linux' feature is optional.  It should
-describe a single register, `orig_eax'.
-
-   The `org.gnu.gdb.i386.avx512' feature is optional and requires the
-`org.gnu.gdb.i386.avx' feature.  It should describe additional XMM
-registers:
-
-   - `xmm16h' through `xmm31h', only valid for amd64.
-
-   It should describe the upper 128 bits of additional YMM registers:
-
-   - `ymm16h' through `ymm31h', only valid for amd64.
-
-   It should describe the upper 256 bits of ZMM registers:
-
-   - `zmm0h' through `zmm7h' for i386.
-
-   - `zmm0h' through `zmm15h' for amd64.
-
-   It should describe the additional ZMM registers:
-
-   - `zmm16h' through `zmm31h', only valid for amd64.
-
-
-File: gdb.info,  Node: MicroBlaze Features,  Next: MIPS Features,  Prev: i386 Features,  Up: Standard Target Features
-
-G.4.4 MicroBlaze Features
--------------------------
-
-The `org.gnu.gdb.microblaze.core' feature is required for MicroBlaze
-targets.  It should contain registers `r0' through `r31', `rpc',
-`rmsr', `rear', `resr', `rfsr', `rbtr', `rpvr', `rpvr1' through
-`rpvr11', `redr', `rpid', `rzpr', `rtlbx', `rtlbsx', `rtlblo', and
-`rtlbhi'.
-
-   The `org.gnu.gdb.microblaze.stack-protect' feature is optional.  If
-present, it should contain registers `rshr' and `rslr'
-
-
-File: gdb.info,  Node: MIPS Features,  Next: M68K Features,  Prev: MicroBlaze Features,  Up: Standard Target Features
-
-G.4.5 MIPS Features
--------------------
-
-The `org.gnu.gdb.mips.cpu' feature is required for MIPS targets.  It
-should contain registers `r0' through `r31', `lo', `hi', and `pc'.
-They may be 32-bit or 64-bit depending on the target.
-
-   The `org.gnu.gdb.mips.cp0' feature is also required.  It should
-contain at least the `status', `badvaddr', and `cause' registers.  They
-may be 32-bit or 64-bit depending on the target.
-
-   The `org.gnu.gdb.mips.fpu' feature is currently required, though it
-may be optional in a future version of GDB.  It should contain
-registers `f0' through `f31', `fcsr', and `fir'.  They may be 32-bit or
-64-bit depending on the target.
-
-   The `org.gnu.gdb.mips.dsp' feature is optional.  It should contain
-registers `hi1' through `hi3', `lo1' through `lo3', and `dspctl'.  The
-`dspctl' register should be 32-bit and the rest may be 32-bit or 64-bit
-depending on the target.
-
-   The `org.gnu.gdb.mips.linux' feature is optional.  It should contain
-a single register, `restart', which is used by the Linux kernel to
-control restartable syscalls.
-
-
-File: gdb.info,  Node: M68K Features,  Next: Nios II Features,  Prev: MIPS Features,  Up: Standard Target Features
-
-G.4.6 M68K Features
--------------------
-
-``org.gnu.gdb.m68k.core''
-``org.gnu.gdb.coldfire.core''
-``org.gnu.gdb.fido.core''
-     One of those features must be always present.  The feature that is
-     present determines which flavor of m68k is used.  The feature that
-     is present should contain registers `d0' through `d7', `a0'
-     through `a5', `fp', `sp', `ps' and `pc'.
-
-``org.gnu.gdb.coldfire.fp''
-     This feature is optional.  If present, it should contain registers
-     `fp0' through `fp7', `fpcontrol', `fpstatus' and `fpiaddr'.
-
-
-File: gdb.info,  Node: Nios II Features,  Next: PowerPC Features,  Prev: M68K Features,  Up: Standard Target Features
-
-G.4.7 Nios II Features
-----------------------
-
-The `org.gnu.gdb.nios2.cpu' feature is required for Nios II targets.
-It should contain the 32 core registers (`zero', `at', `r2' through
-`r23', `et' through `ra'), `pc', and the 16 control registers (`status'
-through `mpuacc').
-
-
-File: gdb.info,  Node: PowerPC Features,  Next: S/390 and System z Features,  Prev: Nios II Features,  Up: Standard Target Features
-
-G.4.8 PowerPC Features
-----------------------
-
-The `org.gnu.gdb.power.core' feature is required for PowerPC targets.
-It should contain registers `r0' through `r31', `pc', `msr', `cr',
-`lr', `ctr', and `xer'.  They may be 32-bit or 64-bit depending on the
-target.
-
-   The `org.gnu.gdb.power.fpu' feature is optional.  It should contain
-registers `f0' through `f31' and `fpscr'.
-
-   The `org.gnu.gdb.power.altivec' feature is optional.  It should
-contain registers `vr0' through `vr31', `vscr', and `vrsave'.
-
-   The `org.gnu.gdb.power.vsx' feature is optional.  It should contain
-registers `vs0h' through `vs31h'.  GDB will combine these registers
-with the floating point registers (`f0' through `f31') and the altivec
-registers (`vr0' through `vr31') to present the 128-bit wide registers
-`vs0' through `vs63', the set of vector registers for POWER7.
-
-   The `org.gnu.gdb.power.spe' feature is optional.  It should contain
-registers `ev0h' through `ev31h', `acc', and `spefscr'.  SPE targets
-should provide 32-bit registers in `org.gnu.gdb.power.core' and provide
-the upper halves in `ev0h' through `ev31h'.  GDB will combine these to
-present registers `ev0' through `ev31' to the user.
-
-
-File: gdb.info,  Node: S/390 and System z Features,  Next: TIC6x Features,  Prev: PowerPC Features,  Up: Standard Target Features
-
-G.4.9 S/390 and System z Features
----------------------------------
-
-The `org.gnu.gdb.s390.core' feature is required for S/390 and System z
-targets.  It should contain the PSW and the 16 general registers.  In
-particular, System z targets should provide the 64-bit registers
-`pswm', `pswa', and `r0' through `r15'.  S/390 targets should provide
-the 32-bit versions of these registers.  A System z target that runs in
-31-bit addressing mode should provide 32-bit versions of `pswm' and
-`pswa', as well as the general register's upper halves `r0h' through
-`r15h', and their lower halves `r0l' through `r15l'.
-
-   The `org.gnu.gdb.s390.fpr' feature is required.  It should contain
-the 64-bit registers `f0' through `f15', and `fpc'.
-
-   The `org.gnu.gdb.s390.acr' feature is required.  It should contain
-the 32-bit registers `acr0' through `acr15'.
-
-   The `org.gnu.gdb.s390.linux' feature is optional.  It should contain
-the register `orig_r2', which is 64-bit wide on System z targets and
-32-bit otherwise.  In addition, the feature may contain the
-`last_break' register, whose width depends on the addressing mode, as
-well as the `system_call' register, which is always 32-bit wide.
-
-   The `org.gnu.gdb.s390.tdb' feature is optional.  It should contain
-the 64-bit registers `tdb0', `tac', `tct', `atia', and `tr0' through
-`tr15'.
-
-   The `org.gnu.gdb.s390.vx' feature is optional.  It should contain
-64-bit wide registers `v0l' through `v15l', which will be combined by
-GDB with the floating point registers `f0' through `f15' to present the
-128-bit wide vector registers `v0' through `v15'.  In addition, this
-feature should contain the 128-bit wide vector registers `v16' through
-`v31'.
-
-
-File: gdb.info,  Node: TIC6x Features,  Prev: S/390 and System z Features,  Up: Standard Target Features
-
-G.4.10 TMS320C6x Features
--------------------------
-
-The `org.gnu.gdb.tic6x.core' feature is required for TMS320C6x targets.
-It should contain registers `A0' through `A15', registers `B0' through
-`B15', `CSR' and `PC'.
-
-   The `org.gnu.gdb.tic6x.gp' feature is optional.  It should contain
-registers `A16' through `A31' and `B16' through `B31'.
-
-   The `org.gnu.gdb.tic6x.c6xp' feature is optional.  It should contain
-registers `TSR', `ILC' and `RILC'.
-
-
-File: gdb.info,  Node: Operating System Information,  Next: Trace File Format,  Prev: Target Descriptions,  Up: Top
-
-Appendix H Operating System Information
-***************************************
-
-* Menu:
-
-* Process list::
-
-   Users of GDB often wish to obtain information about the state of the
-operating system running on the target--for example the list of
-processes, or the list of open files.  This section describes the
-mechanism that makes it possible.  This mechanism is similar to the
-target features mechanism (*note Target Descriptions::), but focuses on
-a different aspect of target.
-
-   Operating system information is retrived from the target via the
-remote protocol, using `qXfer' requests (*note qXfer osdata read::).
-The object name in the request should be `osdata', and the ANNEX
-identifies the data to be fetched.
-
-
-File: gdb.info,  Node: Process list,  Up: Operating System Information
-
-H.1 Process list
-================
-
-When requesting the process list, the ANNEX field in the `qXfer'
-request should be `processes'.  The returned data is an XML document.
-The formal syntax of this document is defined in
-`gdb/features/osdata.dtd'.
-
-   An example document is:
-
-     <?xml version="1.0"?>
-     <!DOCTYPE target SYSTEM "osdata.dtd">
-     <osdata type="processes">
-       <item>
-         <column name="pid">1</column>
-         <column name="user">root</column>
-         <column name="command">/sbin/init</column>
-         <column name="cores">1,2,3</column>
-       </item>
-     </osdata>
-
-   Each item should include a column whose name is `pid'.  The value of
-that column should identify the process on the target.  The `user' and
-`command' columns are optional, and will be displayed by GDB.  The
-`cores' column, if present, should contain a comma-separated list of
-cores that this process is running on.  Target may provide additional
-columns, which GDB currently ignores.
-
-
-File: gdb.info,  Node: Trace File Format,  Next: Index Section Format,  Prev: Operating System Information,  Up: Top
-
-Appendix I Trace File Format
-****************************
-
-The trace file comes in three parts: a header, a textual description
-section, and a trace frame section with binary data.
-
-   The header has the form `\x7fTRACE0\n'.  The first byte is `0x7f' so
-as to indicate that the file contains binary data, while the `0' is a
-version number that may have different values in the future.
-
-   The description section consists of multiple lines of ASCII text
-separated by newline characters (`0xa').  The lines may include a
-variety of optional descriptive or context-setting information, such as
-tracepoint definitions or register set size.  GDB will ignore any line
-that it does not recognize.  An empty line marks the end of this
-section.
-
-   The trace frame section consists of a number of consecutive frames.
-Each frame begins with a two-byte tracepoint number, followed by a
-four-byte size giving the amount of data in the frame.  The data in the
-frame consists of a number of blocks, each introduced by a character
-indicating its type (at least register, memory, and trace state
-variable).  The data in this section is raw binary, not a hexadecimal
-or other encoding; its endianness matches the target's endianness.
-
-`R BYTES'
-     Register block.  The number and ordering of bytes matches that of a
-     `g' packet in the remote protocol.  Note that these are the actual
-     bytes, in target order and GDB register order, not a hexadecimal
-     encoding.
-
-`M ADDRESS LENGTH BYTES...'
-     Memory block.  This is a contiguous block of memory, at the 8-byte
-     address ADDRESS, with a 2-byte length LENGTH, followed by LENGTH
-     bytes.
-
-`V NUMBER VALUE'
-     Trace state variable block.  This records the 8-byte signed value
-     VALUE of trace state variable numbered NUMBER.
-
-
-   Future enhancements of the trace file format may include additional
-types of blocks.
-
-
-File: gdb.info,  Node: Index Section Format,  Next: Man Pages,  Prev: Trace File Format,  Up: Top
-
-Appendix J `.gdb_index' section format
-**************************************
-
-This section documents the index section that is created by `save
-gdb-index' (*note Index Files::).  The index section is DWARF-specific;
-some knowledge of DWARF is assumed in this description.
-
-   The mapped index file format is designed to be directly `mmap'able
-on any architecture.  In most cases, a datum is represented using a
-little-endian 32-bit integer value, called an `offset_type'.  Big
-endian machines must byte-swap the values before using them.
-Exceptions to this rule are noted.  The data is laid out such that
-alignment is always respected.
-
-   A mapped index consists of several areas, laid out in order.
-
-  1. The file header.  This is a sequence of values, of `offset_type'
-     unless otherwise noted:
-
-       1. The version number, currently 8.  Versions 1, 2 and 3 are
-          obsolete.  Version 4 uses a different hashing function from
-          versions 5 and 6.  Version 6 includes symbols for inlined
-          functions, whereas versions 4 and 5 do not.  Version 7 adds
-          attributes to the CU indices in the symbol table.  Version 8
-          specifies that symbols from DWARF type units
-          (`DW_TAG_type_unit') refer to the type unit's symbol table
-          and not the compilation unit (`DW_TAG_comp_unit') using the
-          type.
-
-          GDB will only read version 4, 5, or 6 indices by specifying
-          `set use-deprecated-index-sections on'.  GDB has a workaround
-          for potentially broken version 7 indices so it is currently
-          not flagged as deprecated.
-
-       2. The offset, from the start of the file, of the CU list.
-
-       3. The offset, from the start of the file, of the types CU list.
-          Note that this area can be empty, in which case this offset
-          will be equal to the next offset.
-
-       4. The offset, from the start of the file, of the address area.
-
-       5. The offset, from the start of the file, of the symbol table.
-
-       6. The offset, from the start of the file, of the constant pool.
-
-  2. The CU list.  This is a sequence of pairs of 64-bit little-endian
-     values, sorted by the CU offset.  The first element in each pair is
-     the offset of a CU in the `.debug_info' section.  The second
-     element in each pair is the length of that CU.  References to a CU
-     elsewhere in the map are done using a CU index, which is just the
-     0-based index into this table.  Note that if there are type CUs,
-     then conceptually CUs and type CUs form a single list for the
-     purposes of CU indices.
-
-  3. The types CU list.  This is a sequence of triplets of 64-bit
-     little-endian values.  In a triplet, the first value is the CU
-     offset, the second value is the type offset in the CU, and the
-     third value is the type signature.  The types CU list is not
-     sorted.
-
-  4. The address area.  The address area consists of a sequence of
-     address entries.  Each address entry has three elements:
-
-       1. The low address.  This is a 64-bit little-endian value.
-
-       2. The high address.  This is a 64-bit little-endian value.  Like
-          `DW_AT_high_pc', the value is one byte beyond the end.
-
-       3. The CU index.  This is an `offset_type' value.
-
-  5. The symbol table.  This is an open-addressed hash table.  The size
-     of the hash table is always a power of 2.
-
-     Each slot in the hash table consists of a pair of `offset_type'
-     values.  The first value is the offset of the symbol's name in the
-     constant pool.  The second value is the offset of the CU vector in
-     the constant pool.
-
-     If both values are 0, then this slot in the hash table is empty.
-     This is ok because while 0 is a valid constant pool index, it
-     cannot be a valid index for both a string and a CU vector.
-
-     The hash value for a table entry is computed by applying an
-     iterative hash function to the symbol's name.  Starting with an
-     initial value of `r = 0', each (unsigned) character `c' in the
-     string is incorporated into the hash using the formula depending
-     on the index version:
-
-    Version 4
-          The formula is `r = r * 67 + c - 113'.
-
-    Versions 5 to 7
-          The formula is `r = r * 67 + tolower (c) - 113'.
-
-     The terminating `\0' is not incorporated into the hash.
-
-     The step size used in the hash table is computed via `((hash * 17)
-     & (size - 1)) | 1', where `hash' is the hash value, and `size' is
-     the size of the hash table.  The step size is used to find the
-     next candidate slot when handling a hash collision.
-
-     The names of C++ symbols in the hash table are canonicalized.  We
-     don't currently have a simple description of the canonicalization
-     algorithm; if you intend to create new index sections, you must
-     read the code.
-
-  6. The constant pool.  This is simply a bunch of bytes.  It is
-     organized so that alignment is correct: CU vectors are stored
-     first, followed by strings.
-
-     A CU vector in the constant pool is a sequence of `offset_type'
-     values.  The first value is the number of CU indices in the vector.
-     Each subsequent value is the index and symbol attributes of a CU in
-     the CU list.  This element in the hash table is used to indicate
-     which CUs define the symbol and how the symbol is used.  See below
-     for the format of each CU index+attributes entry.
-
-     A string in the constant pool is zero-terminated.
-
-   Attributes were added to CU index values in `.gdb_index' version 7.
-If a symbol has multiple uses within a CU then there is one CU
-index+attributes value for each use.
-
-   The format of each CU index+attributes entry is as follows (bit 0 =
-LSB):
-
-Bits 0-23
-     This is the index of the CU in the CU list.
-
-Bits 24-27
-     These bits are reserved for future purposes and must be zero.
-
-Bits 28-30
-     The kind of the symbol in the CU.
-
-    0
-          This value is reserved and should not be used.  By reserving
-          zero the full `offset_type' value is backwards compatible
-          with previous versions of the index.
-
-    1
-          The symbol is a type.
-
-    2
-          The symbol is a variable or an enum value.
-
-    3
-          The symbol is a function.
-
-    4
-          Any other kind of symbol.
-
-    5,6,7
-          These values are reserved.
-
-Bit 31
-     This bit is zero if the value is global and one if it is static.
-
-     The determination of whether a symbol is global or static is
-     complicated.  The authorative reference is the file `dwarf2read.c'
-     in GDB sources.
-
-
-   This pseudo-code describes the computation of a symbol's kind and
-global/static attributes in the index.
-
-     is_external = get_attribute (die, DW_AT_external);
-     language = get_attribute (cu_die, DW_AT_language);
-     switch (die->tag)
-       {
-       case DW_TAG_typedef:
-       case DW_TAG_base_type:
-       case DW_TAG_subrange_type:
-         kind = TYPE;
-         is_static = 1;
-         break;
-       case DW_TAG_enumerator:
-         kind = VARIABLE;
-         is_static = (language != CPLUS && language != JAVA);
-         break;
-       case DW_TAG_subprogram:
-         kind = FUNCTION;
-         is_static = ! (is_external || language == ADA);
-         break;
-       case DW_TAG_constant:
-         kind = VARIABLE;
-         is_static = ! is_external;
-         break;
-       case DW_TAG_variable:
-         kind = VARIABLE;
-         is_static = ! is_external;
-         break;
-       case DW_TAG_namespace:
-         kind = TYPE;
-         is_static = 0;
-         break;
-       case DW_TAG_class_type:
-       case DW_TAG_interface_type:
-       case DW_TAG_structure_type:
-       case DW_TAG_union_type:
-       case DW_TAG_enumeration_type:
-         kind = TYPE;
-         is_static = (language != CPLUS && language != JAVA);
-         break;
-       default:
-         assert (0);
-       }
-
-
-File: gdb.info,  Node: Man Pages,  Next: Copying,  Prev: Index Section Format,  Up: Top
-
-Appendix K Manual pages
-***********************
-
-* Menu:
-
-* gdb man::                     The GNU Debugger man page
-* gdbserver man::               Remote Server for the GNU Debugger man page
-* gcore man::                   Generate a core file of a running program
-* gdbinit man::                 gdbinit scripts
-
-
-File: gdb.info,  Node: gdb man,  Next: gdbserver man,  Up: Man Pages
-
-gdb man
-=======
-
-gdb [`-help'] [`-nh'] [`-nx'] [`-q'] [`-batch'] [`-cd='DIR] [`-f']
-[`-b' BPS]     [`-tty='DEV] [`-s' SYMFILE] [`-e' PROG] [`-se' PROG]
-[`-c' CORE] [`-p' PROCID]     [`-x' CMDS] [`-d' DIR] [PROG|PROG
-PROCID|PROG CORE]
-
-   The purpose of a debugger such as GDB is to allow you to see what is
-going on "inside" another program while it executes - or what another
-program was doing at the moment it crashed.
-
-   GDB can do four main kinds of things (plus other things in support of
-these) to help you catch bugs in the act:
-
-   * Start your program, specifying anything that might affect its
-     behavior.
-
-   * Make your program stop on specified conditions.
-
-   * Examine what has happened, when your program has stopped.
-
-   * Change things in your program, so you can experiment with
-     correcting the effects of one bug and go on to learn about another.
-
-   You can use GDB to debug programs written in C, C++, Fortran and
-Modula-2.
-
-   GDB is invoked with the shell command `gdb'.  Once started, it reads
-commands from the terminal until you tell it to exit with the GDB
-command `quit'.  You can get online help from GDB itself by using the
-command `help'.
-
-   You can run `gdb' with no arguments or options; but the most usual
-way to start GDB is with one argument or two, specifying an executable
-program as the argument:
-
-     gdb program
-
-   You can also start with both an executable program and a core file
-specified:
-
-     gdb program core
-
-   You can, instead, specify a process ID as a second argument, if you
-want to debug a running process:
-
-     gdb program 1234
-     gdb -p 1234
-
-would attach GDB to process `1234' (unless you also have a file named
-`1234'; GDB does check for a core file first).  With option `-p' you
-can omit the PROGRAM filename.
-
-   Here are some of the most frequently needed GDB commands:
-
-`break [FILE:]FUNCTIOP'
-     Set a breakpoint at FUNCTION (in FILE).
-
-`run [ARGLIST]'
-     Start your program (with ARGLIST, if specified).
-
-`bt'
-     Backtrace: display the program stack.
-
-`print EXPR'
-     Display the value of an expression.
-
-`c'
-     Continue running your program (after stopping, e.g. at a
-     breakpoint).
-
-`next'
-     Execute next program line (after stopping); step _over_ any
-     function calls in the line.
-
-`edit [FILE:]FUNCTION'
-     look at the program line where it is presently stopped.
-
-`list [FILE:]FUNCTION'
-     type the text of the program in the vicinity of where it is
-     presently stopped.
-
-`step'
-     Execute next program line (after stopping); step _into_ any
-     function calls in the line.
-
-`help [NAME]'
-     Show information about GDB command NAME, or general information
-     about using GDB.
-
-`quit'
-     Exit from GDB.
-
-   Any arguments other than options specify an executable file and core
-file (or process ID); that is, the first argument encountered with no
-associated option flag is equivalent to a `-se' option, and the second,
-if any, is equivalent to a `-c' option if it's the name of a file.
-Many options have both long and short forms; both are shown here.  The
-long forms are also recognized if you truncate them, so long as enough
-of the option is present to be unambiguous.  (If you prefer, you can
-flag option arguments with `+' rather than `-', though we illustrate the
-more usual convention.)
-
-   All the options and command line arguments you give are processed in
-sequential order.  The order makes a difference when the `-x' option is
-used.
-
-`-help'
-`-h'
-     List all options, with brief explanations.
-
-`-symbols=FILE'
-`-s FILE'
-     Read symbol table from file FILE.
-
-`-write'
-     Enable writing into executable and core files.
-
-`-exec=FILE'
-`-e FILE'
-     Use file FILE as the executable file to execute when appropriate,
-     and for examining pure data in conjunction with a core dump.
-
-`-se=FILE'
-     Read symbol table from file FILE and use it as the executable file.
-
-`-core=FILE'
-`-c FILE'
-     Use file FILE as a core dump to examine.
-
-`-command=FILE'
-`-x FILE'
-     Execute GDB commands from file FILE.
-
-`-ex COMMAND'
-     Execute given GDB COMMAND.
-
-`-directory=DIRECTORY'
-`-d DIRECTORY'
-     Add DIRECTORY to the path to search for source files.
-
-`-nh'
-     Do not execute commands from `~/.gdbinit'.
-
-`-nx'
-`-n'
-     Do not execute commands from any `.gdbinit' initialization files.
-
-`-quiet'
-`-q'
-     "Quiet".  Do not print the introductory and copyright messages.
-     These messages are also suppressed in batch mode.
-
-`-batch'
-     Run in batch mode.  Exit with status `0' after processing all the
-     command files specified with `-x' (and `.gdbinit', if not
-     inhibited).  Exit with nonzero status if an error occurs in
-     executing the GDB commands in the command files.
-
-     Batch mode may be useful for running GDB as a filter, for example
-     to download and run a program on another computer; in order to
-     make this more useful, the message
-
-          Program exited normally.
-
-     (which is ordinarily issued whenever a program running under GDB
-     control terminates) is not issued when running in batch mode.
-
-`-cd=DIRECTORY'
-     Run GDB using DIRECTORY as its working directory, instead of the
-     current directory.
-
-`-fullname'
-`-f'
-     Emacs sets this option when it runs GDB as a subprocess.  It tells
-     GDB to output the full file name and line number in a standard,
-     recognizable fashion each time a stack frame is displayed (which
-     includes each time the program stops).  This recognizable format
-     looks like two `\032' characters, followed by the file name, line
-     number and character position separated by colons, and a newline.
-     The Emacs-to-GDB interface program uses the two `\032' characters
-     as a signal to display the source code for the frame.
-
-`-b BPS'
-     Set the line speed (baud rate or bits per second) of any serial
-     interface used by GDB for remote debugging.
-
-`-tty=DEVICE'
-     Run using DEVICE for your program's standard input and output.
-
 
-File: gdb.info,  Node: gdbserver man,  Next: gcore man,  Prev: gdb man,  Up: Man Pages
-
-gdbserver man
-=============
-
-gdbserver COMM PROG [ARGS...]
-
-gdbserver -attach COMM PID
-
-gdbserver -multi COMM
-
-   `gdbserver' is a program that allows you to run GDB on a different
-machine than the one which is running the program being debugged.
-
-Usage (server (target) side)
-----------------------------
-
-   First, you need to have a copy of the program you want to debug put
-onto the target system.  The program can be stripped to save space if
-needed, as `gdbserver' doesn't care about symbols.  All symbol handling
-is taken care of by the GDB running on the host system.
-
-   To use the server, you log on to the target system, and run the
-`gdbserver' program.  You must tell it (a) how to communicate with GDB,
-(b) the name of your program, and (c) its arguments.  The general
-syntax is:
-
-     target> gdbserver COMM PROGRAM [ARGS ...]
-
-   For example, using a serial port, you might say:
-
-     target> gdbserver `/dev/com1' emacs foo.txt
-
-   This tells `gdbserver' to debug emacs with an argument of foo.txt,
-and to communicate with GDB via `/dev/com1'.  `gdbserver' now waits
-patiently for the host GDB to communicate with it.
-
-   To use a TCP connection, you could say:
+File: gdb.info,  Node: Enum Target Types,  Next: Standard Target Features,  Prev: Predefined Target Types,  Up: Target Descriptions
 
-     target> gdbserver host:2345 emacs foo.txt
+G.4 Enum Target Types
+=====================
 
-   This says pretty much the same thing as the last example, except
-that we are going to communicate with the `host' GDB via TCP.  The
-`host:2345' argument means that we are expecting to see a TCP
-connection from `host' to local TCP port 2345.  (Currently, the `host'
-part is ignored.)  You can choose any number you want for the port
-number as long as it does not conflict with any existing TCP ports on
-the target system.  This same port number must be used in the host GDBs
-`target remote' command, which will be described shortly.  Note that if
-you chose a port number that conflicts with another service,
-`gdbserver' will print an error message and exit.
+Enum target types are useful in 'struct' and 'flags' register
+descriptions.  *Note Target Description Format::.
 
-   `gdbserver' can also attach to running programs.  This is
-accomplished via the `--attach' argument.  The syntax is:
+   Enum types have a name, size and a list of name/value pairs.
 
-     target> gdbserver --attach COMM PID
-
-   PID is the process ID of a currently running process.  It isn't
-necessary to point `gdbserver' at a binary for the running process.
-
-   To start `gdbserver' without supplying an initial command to run or
-process ID to attach, use the `--multi' command line option.  In such
-case you should connect using `target extended-remote' to start the
-program you want to debug.
-
-     target> gdbserver --multi COMM
-
-Usage (host side)
------------------
-
-   You need an unstripped copy of the target program on your host
-system, since GDB needs to examine it's symbol tables and such.  Start
-up GDB as you normally would, with the target program as the first
-argument.  (You may need to use the `--baud' option if the serial line
-is running at anything except 9600 baud.)  That is `gdb TARGET-PROG',
-or `gdb --baud BAUD TARGET-PROG'.  After that, the only new command you
-need to know about is `target remote' (or `target extended-remote').
-Its argument is either a device name (usually a serial device, like
-`/dev/ttyb'), or a `HOST:PORT' descriptor.  For example:
-
-     (gdb) target remote `/dev/ttyb'
-
-communicates with the server via serial line `/dev/ttyb', and:
-
-     (gdb) target remote the-target:2345
-
-communicates via a TCP connection to port 2345 on host `the-target',
-where you previously started up `gdbserver' with the same port number.
-Note that for TCP connections, you must start up `gdbserver' prior to
-using the `target remote' command, otherwise you may get an error that
-looks something like `Connection refused'.
-
-   `gdbserver' can also debug multiple inferiors at once, described in
-*note Inferiors and Programs::.  In such case use the `extended-remote'
-GDB command variant:
-
-     (gdb) target extended-remote the-target:2345
-
-   The `gdbserver' option `--multi' may or may not be used in such case.
-
-   There are three different modes for invoking `gdbserver':
-
-   * Debug a specific program specified by its program name:
-
-          gdbserver COMM PROG [ARGS...]
-
-     The COMM parameter specifies how should the server communicate
-     with GDB; it is either a device name (to use a serial line), a TCP
-     port number (`:1234'), or `-' or `stdio' to use stdin/stdout of
-     `gdbserver'.  Specify the name of the program to debug in PROG.
-     Any remaining arguments will be passed to the program verbatim.
-     When the program exits, GDB will close the connection, and
-     `gdbserver' will exit.
-
-   * Debug a specific program by specifying the process ID of a running
-     program:
-
-          gdbserver --attach COMM PID
-
-     The COMM parameter is as described above.  Supply the process ID
-     of a running program in PID; GDB will do everything else.  Like
-     with the previous mode, when the process PID exits, GDB will close
-     the connection, and `gdbserver' will exit.
-
-   * Multi-process mode - debug more than one program/process:
-
-          gdbserver --multi COMM
-
-     In this mode, GDB can instruct `gdbserver' which command(s) to
-     run.  Unlike the other 2 modes, GDB will not close the connection
-     when a process being debugged exits, so you can debug several
-     processes in the same session.
-
-   In each of the modes you may specify these options:
-
-`--help'
-     List all options, with brief explanations.
-
-`--version'
-     This option causes `gdbserver' to print its version number and
-     exit.
-
-`--attach'
-     `gdbserver' will attach to a running program.  The syntax is:
-
-          target> gdbserver --attach COMM PID
-
-     PID is the process ID of a currently running process.  It isn't
-     necessary to point `gdbserver' at a binary for the running process.
-
-`--multi'
-     To start `gdbserver' without supplying an initial command to run
-     or process ID to attach, use this command line option.  Then you
-     can connect using `target extended-remote' and start the program
-     you want to debug.  The syntax is:
-
-          target> gdbserver --multi COMM
-
-`--debug'
-     Instruct `gdbserver' to display extra status information about the
-     debugging process.  This option is intended for `gdbserver'
-     development and for bug reports to the developers.
-
-`--remote-debug'
-     Instruct `gdbserver' to display remote protocol debug output.
-     This option is intended for `gdbserver' development and for bug
-     reports to the developers.
-
-`--debug-format=option1[,option2,...]'
-     Instruct `gdbserver' to include extra information in each line of
-     debugging output.  *Note Other Command-Line Arguments for
-     gdbserver::.
-
-`--wrapper'
-     Specify a wrapper to launch programs for debugging.  The option
-     should be followed by the name of the wrapper, then any
-     command-line arguments to pass to the wrapper, then `--'
-     indicating the end of the wrapper arguments.
-
-`--once'
-     By default, `gdbserver' keeps the listening TCP port open, so that
-     additional connections are possible.  However, if you start
-     `gdbserver' with the `--once' option, it will stop listening for
-     any further connection attempts after connecting to the first GDB
-     session.
-
-
-
-File: gdb.info,  Node: gcore man,  Next: gdbinit man,  Prev: gdbserver man,  Up: Man Pages
-
-gcore
-=====
-
-gcore [-o FILENAME] PID
-
-   Generate a core dump of a running program with process ID PID.
-Produced file is equivalent to a kernel produced core file as if the
-process crashed (and if `ulimit -c' were used to set up an appropriate
-core dump limit).  Unlike after a crash, after `gcore' the program
-remains running without any change.
-
-`-o FILENAME'
-     The optional argument FILENAME specifies the file name where to
-     put the core dump.  If not specified, the file name defaults to
-     `core.PID', where PID is the running program process ID.
-
-
-File: gdb.info,  Node: gdbinit man,  Prev: gcore man,  Up: Man Pages
-
-gdbinit
-=======
-
-
-~/.gdbinit
-
-./.gdbinit
-
-   These files contain GDB commands to automatically execute during GDB
-startup.  The lines of contents are canned sequences of commands,
-described in *note Sequences::.
+     <enum id="ID" size="SIZE">
+       <evalue name="NAME" value="VALUE"/>
+       ...
+     </enum>
 
-   Please read more in *note Startup::.
+   Enums must be defined before they are used.
 
-`(not enabled with `--with-system-gdbinit' during compilation)'
-     System-wide initialization file.  It is executed unless user
-     specified GDB option `-nx' or `-n'.  See more in *note System-wide
-     configuration::.
+     <enum id="levels_type" size="4">
+       <evalue name="low" value="0"/>
+       <evalue name="high" value="1"/>
+     </enum>
+     <flags id="flags_type" size="4">
+       <field name="X" start="0"/>
+       <field name="LEVEL" start="1" end="1" type="levels_type"/>
+     </flags>
+     <reg name="flags" bitsize="32" type="flags_type"/>
 
-`~/.gdbinit'
-     User initialization file.  It is executed unless user specified
-     GDB options `-nx', `-n' or `-nh'.
+   Given that description, a value of 3 for the 'flags' register would
+be printed as:
 
-`./.gdbinit'
-     Initialization file for current directory.  It may need to be
-     enabled with GDB security command `set auto-load local-gdbinit'.
-     See more in *note Init File in the Current Directory::.
+     (gdb) info register flags
+     flags 0x3 [ X LEVEL=high ]
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-7 ./gdb/doc/gdb.info-7
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-7	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-7	2017-03-06 01:53:25.000000000 +0000
@@ -1,12 +1,6 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
+This is gdb.info, produced by makeinfo version 6.3 from gdb.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18,13 +12,18 @@ with the Back-Cover Texts as in (a) belo
    (a) The FSF's Back-Cover Text is: "You are free to copy and modify
 this GNU Manual.  Buying copies from GNU Press supports the FSF in
 developing GNU and promoting software freedom."
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Gdb: (gdb).                     The GNU debugger.
+* gdbserver: (gdb) Server.        The GNU debugging server.
+END-INFO-DIR-ENTRY
 
    This file documents the GNU debugger GDB.
 
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
+   This is the Tenth Edition, of 'Debugging with GDB: the GNU
+Source-Level Debugger' for GDB (GDB) Version 7.12.50.20170306-git.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -38,6 +37,1189 @@ this GNU Manual.  Buying copies from GNU
 developing GNU and promoting software freedom."
 
 
+File: gdb.info,  Node: Standard Target Features,  Prev: Enum Target Types,  Up: Target Descriptions
+
+G.5 Standard Target Features
+============================
+
+A target description must contain either no registers or all the
+target's registers.  If the description contains no registers, then GDB
+will assume a default register layout, selected based on the
+architecture.  If the description contains any registers, the default
+layout will not be used; the standard registers must be described in the
+target description, in such a way that GDB can recognize them.
+
+   This is accomplished by giving specific names to feature elements
+which contain standard registers.  GDB will look for features with those
+names and verify that they contain the expected registers; if any known
+feature is missing required registers, or if any required feature is
+missing, GDB will reject the target description.  You can add additional
+registers to any of the standard features -- GDB will display them just
+as if they were added to an unrecognized feature.
+
+   This section lists the known features and their expected contents.
+Sample XML documents for these features are included in the GDB source
+tree, in the directory 'gdb/features'.
+
+   Names recognized by GDB should include the name of the company or
+organization which selected the name, and the overall architecture to
+which the feature applies; so e.g. the feature containing ARM core
+registers is named 'org.gnu.gdb.arm.core'.
+
+   The names of registers are not case sensitive for the purpose of
+recognizing standard features, but GDB will only display registers using
+the capitalization used in the description.
+
+* Menu:
+
+* AArch64 Features::
+* ARC Features::
+* ARM Features::
+* i386 Features::
+* MicroBlaze Features::
+* MIPS Features::
+* M68K Features::
+* NDS32 Features::
+* Nios II Features::
+* PowerPC Features::
+* S/390 and System z Features::
+* Sparc Features::
+* TIC6x Features::
+
+
+File: gdb.info,  Node: AArch64 Features,  Next: ARC Features,  Up: Standard Target Features
+
+G.5.1 AArch64 Features
+----------------------
+
+The 'org.gnu.gdb.aarch64.core' feature is required for AArch64 targets.
+It should contain registers 'x0' through 'x30', 'sp', 'pc', and 'cpsr'.
+
+   The 'org.gnu.gdb.aarch64.fpu' feature is optional.  If present, it
+should contain registers 'v0' through 'v31', 'fpsr', and 'fpcr'.
+
+
+File: gdb.info,  Node: ARC Features,  Next: ARM Features,  Prev: AArch64 Features,  Up: Standard Target Features
+
+G.5.2 ARC Features
+------------------
+
+ARC processors are highly configurable, so even core registers and their
+number are not completely predetermined.  In addition flags and PC
+registers which are important to GDB are not "core" registers in ARC. It
+is required that one of the core registers features is present.
+'org.gnu.gdb.arc.aux-minimal' feature is mandatory.
+
+   The 'org.gnu.gdb.arc.core.v2' feature is required for ARC EM and ARC
+HS targets with a normal register file.  It should contain registers
+'r0' through 'r25', 'gp', 'fp', 'sp', 'r30', 'blink', 'lp_count' and
+'pcl'.  This feature may contain register 'ilink' and any of extension
+core registers 'r32' through 'r59/acch'.  'ilink' and extension core
+registers are not available to read/write, when debugging GNU/Linux
+applications, thus 'ilink' is made optional.
+
+   The 'org.gnu.gdb.arc.core-reduced.v2' feature is required for ARC EM
+and ARC HS targets with a reduced register file.  It should contain
+registers 'r0' through 'r3', 'r10' through 'r15', 'gp', 'fp', 'sp',
+'r30', 'blink', 'lp_count' and 'pcl'.  This feature may contain register
+'ilink' and any of extension core registers 'r32' through 'r59/acch'.
+
+   The 'org.gnu.gdb.arc.core.arcompact' feature is required for
+ARCompact targets with a normal register file.  It should contain
+registers 'r0' through 'r25', 'gp', 'fp', 'sp', 'r30', 'blink',
+'lp_count' and 'pcl'.  This feature may contain registers 'ilink1',
+'ilink2' and any of extension core registers 'r32' through 'r59/acch'.
+'ilink1' and 'ilink2' and extension core registers are not available
+when debugging GNU/Linux applications.  The only difference with
+'org.gnu.gdb.arc.core.v2' feature is in the names of 'ilink1' and
+'ilink2' registers and that 'r30' is mandatory in ARC v2, but 'ilink2'
+is optional on ARCompact.
+
+   The 'org.gnu.gdb.arc.aux-minimal' feature is required for all ARC
+targets.  It should contain registers 'pc' and 'status32'.
+
+
+File: gdb.info,  Node: ARM Features,  Next: i386 Features,  Prev: ARC Features,  Up: Standard Target Features
+
+G.5.3 ARM Features
+------------------
+
+The 'org.gnu.gdb.arm.core' feature is required for non-M-profile ARM
+targets.  It should contain registers 'r0' through 'r13', 'sp', 'lr',
+'pc', and 'cpsr'.
+
+   For M-profile targets (e.g.  Cortex-M3), the 'org.gnu.gdb.arm.core'
+feature is replaced by 'org.gnu.gdb.arm.m-profile'.  It should contain
+registers 'r0' through 'r13', 'sp', 'lr', 'pc', and 'xpsr'.
+
+   The 'org.gnu.gdb.arm.fpa' feature is optional.  If present, it should
+contain registers 'f0' through 'f7' and 'fps'.
+
+   The 'org.gnu.gdb.xscale.iwmmxt' feature is optional.  If present, it
+should contain at least registers 'wR0' through 'wR15' and 'wCGR0'
+through 'wCGR3'.  The 'wCID', 'wCon', 'wCSSF', and 'wCASF' registers are
+optional.
+
+   The 'org.gnu.gdb.arm.vfp' feature is optional.  If present, it should
+contain at least registers 'd0' through 'd15'.  If they are present,
+'d16' through 'd31' should also be included.  GDB will synthesize the
+single-precision registers from halves of the double-precision
+registers.
+
+   The 'org.gnu.gdb.arm.neon' feature is optional.  It does not need to
+contain registers; it instructs GDB to display the VFP double-precision
+registers as vectors and to synthesize the quad-precision registers from
+pairs of double-precision registers.  If this feature is present,
+'org.gnu.gdb.arm.vfp' must also be present and include 32
+double-precision registers.
+
+
+File: gdb.info,  Node: i386 Features,  Next: MicroBlaze Features,  Prev: ARM Features,  Up: Standard Target Features
+
+G.5.4 i386 Features
+-------------------
+
+The 'org.gnu.gdb.i386.core' feature is required for i386/amd64 targets.
+It should describe the following registers:
+
+   - 'eax' through 'edi' plus 'eip' for i386
+   - 'rax' through 'r15' plus 'rip' for amd64
+   - 'eflags', 'cs', 'ss', 'ds', 'es', 'fs', 'gs'
+   - 'st0' through 'st7'
+   - 'fctrl', 'fstat', 'ftag', 'fiseg', 'fioff', 'foseg', 'fooff' and
+     'fop'
+
+   The register sets may be different, depending on the target.
+
+   The 'org.gnu.gdb.i386.sse' feature is optional.  It should describe
+registers:
+
+   - 'xmm0' through 'xmm7' for i386
+   - 'xmm0' through 'xmm15' for amd64
+   - 'mxcsr'
+
+   The 'org.gnu.gdb.i386.avx' feature is optional and requires the
+'org.gnu.gdb.i386.sse' feature.  It should describe the upper 128 bits
+of YMM registers:
+
+   - 'ymm0h' through 'ymm7h' for i386
+   - 'ymm0h' through 'ymm15h' for amd64
+
+   The 'org.gnu.gdb.i386.mpx' is an optional feature representing Intel
+Memory Protection Extension (MPX). It should describe the following
+registers:
+
+   - 'bnd0raw' through 'bnd3raw' for i386 and amd64.
+   - 'bndcfgu' and 'bndstatus' for i386 and amd64.
+
+   The 'org.gnu.gdb.i386.linux' feature is optional.  It should describe
+a single register, 'orig_eax'.
+
+   The 'org.gnu.gdb.i386.segments' feature is optional.  It should
+describe two system registers: 'fs_base' and 'gs_base'.
+
+   The 'org.gnu.gdb.i386.avx512' feature is optional and requires the
+'org.gnu.gdb.i386.avx' feature.  It should describe additional XMM
+registers:
+
+   - 'xmm16h' through 'xmm31h', only valid for amd64.
+
+   It should describe the upper 128 bits of additional YMM registers:
+
+   - 'ymm16h' through 'ymm31h', only valid for amd64.
+
+   It should describe the upper 256 bits of ZMM registers:
+
+   - 'zmm0h' through 'zmm7h' for i386.
+   - 'zmm0h' through 'zmm15h' for amd64.
+
+   It should describe the additional ZMM registers:
+
+   - 'zmm16h' through 'zmm31h', only valid for amd64.
+
+   The 'org.gnu.gdb.i386.pkeys' feature is optional.  It should describe
+a single register, 'pkru'.  It is a 32-bit register valid for i386 and
+amd64.
+
+
+File: gdb.info,  Node: MicroBlaze Features,  Next: MIPS Features,  Prev: i386 Features,  Up: Standard Target Features
+
+G.5.5 MicroBlaze Features
+-------------------------
+
+The 'org.gnu.gdb.microblaze.core' feature is required for MicroBlaze
+targets.  It should contain registers 'r0' through 'r31', 'rpc', 'rmsr',
+'rear', 'resr', 'rfsr', 'rbtr', 'rpvr', 'rpvr1' through 'rpvr11',
+'redr', 'rpid', 'rzpr', 'rtlbx', 'rtlbsx', 'rtlblo', and 'rtlbhi'.
+
+   The 'org.gnu.gdb.microblaze.stack-protect' feature is optional.  If
+present, it should contain registers 'rshr' and 'rslr'
+
+
+File: gdb.info,  Node: MIPS Features,  Next: M68K Features,  Prev: MicroBlaze Features,  Up: Standard Target Features
+
+G.5.6 MIPS Features
+-------------------
+
+The 'org.gnu.gdb.mips.cpu' feature is required for MIPS targets.  It
+should contain registers 'r0' through 'r31', 'lo', 'hi', and 'pc'.  They
+may be 32-bit or 64-bit depending on the target.
+
+   The 'org.gnu.gdb.mips.cp0' feature is also required.  It should
+contain at least the 'status', 'badvaddr', and 'cause' registers.  They
+may be 32-bit or 64-bit depending on the target.
+
+   The 'org.gnu.gdb.mips.fpu' feature is currently required, though it
+may be optional in a future version of GDB.  It should contain registers
+'f0' through 'f31', 'fcsr', and 'fir'.  They may be 32-bit or 64-bit
+depending on the target.
+
+   The 'org.gnu.gdb.mips.dsp' feature is optional.  It should contain
+registers 'hi1' through 'hi3', 'lo1' through 'lo3', and 'dspctl'.  The
+'dspctl' register should be 32-bit and the rest may be 32-bit or 64-bit
+depending on the target.
+
+   The 'org.gnu.gdb.mips.linux' feature is optional.  It should contain
+a single register, 'restart', which is used by the Linux kernel to
+control restartable syscalls.
+
+
+File: gdb.info,  Node: M68K Features,  Next: NDS32 Features,  Prev: MIPS Features,  Up: Standard Target Features
+
+G.5.7 M68K Features
+-------------------
+
+''org.gnu.gdb.m68k.core''
+''org.gnu.gdb.coldfire.core''
+''org.gnu.gdb.fido.core''
+     One of those features must be always present.  The feature that is
+     present determines which flavor of m68k is used.  The feature that
+     is present should contain registers 'd0' through 'd7', 'a0' through
+     'a5', 'fp', 'sp', 'ps' and 'pc'.
+
+''org.gnu.gdb.coldfire.fp''
+     This feature is optional.  If present, it should contain registers
+     'fp0' through 'fp7', 'fpcontrol', 'fpstatus' and 'fpiaddr'.
+
+
+File: gdb.info,  Node: NDS32 Features,  Next: Nios II Features,  Prev: M68K Features,  Up: Standard Target Features
+
+G.5.8 NDS32 Features
+--------------------
+
+The 'org.gnu.gdb.nds32.core' feature is required for NDS32 targets.  It
+should contain at least registers 'r0' through 'r10', 'r15', 'fp', 'gp',
+'lp', 'sp', and 'pc'.
+
+   The 'org.gnu.gdb.nds32.fpu' feature is optional.  If present, it
+should contain 64-bit double-precision floating-point registers 'fd0'
+through _fdN_, which should be 'fd3', 'fd7', 'fd15', or 'fd31' based on
+the FPU configuration implemented.
+
+   _Note:_ The first sixteen 64-bit double-precision floating-point
+registers are overlapped with the thirty-two 32-bit single-precision
+floating-point registers.  The 32-bit single-precision registers, if not
+being listed explicitly, will be synthesized from halves of the
+overlapping 64-bit double-precision registers.  Listing 32-bit
+single-precision registers explicitly is deprecated, and the support to
+it could be totally removed some day.
+
+
+File: gdb.info,  Node: Nios II Features,  Next: PowerPC Features,  Prev: NDS32 Features,  Up: Standard Target Features
+
+G.5.9 Nios II Features
+----------------------
+
+The 'org.gnu.gdb.nios2.cpu' feature is required for Nios II targets.  It
+should contain the 32 core registers ('zero', 'at', 'r2' through 'r23',
+'et' through 'ra'), 'pc', and the 16 control registers ('status' through
+'mpuacc').
+
+
+File: gdb.info,  Node: PowerPC Features,  Next: S/390 and System z Features,  Prev: Nios II Features,  Up: Standard Target Features
+
+G.5.10 PowerPC Features
+-----------------------
+
+The 'org.gnu.gdb.power.core' feature is required for PowerPC targets.
+It should contain registers 'r0' through 'r31', 'pc', 'msr', 'cr', 'lr',
+'ctr', and 'xer'.  They may be 32-bit or 64-bit depending on the target.
+
+   The 'org.gnu.gdb.power.fpu' feature is optional.  It should contain
+registers 'f0' through 'f31' and 'fpscr'.
+
+   The 'org.gnu.gdb.power.altivec' feature is optional.  It should
+contain registers 'vr0' through 'vr31', 'vscr', and 'vrsave'.
+
+   The 'org.gnu.gdb.power.vsx' feature is optional.  It should contain
+registers 'vs0h' through 'vs31h'.  GDB will combine these registers with
+the floating point registers ('f0' through 'f31') and the altivec
+registers ('vr0' through 'vr31') to present the 128-bit wide registers
+'vs0' through 'vs63', the set of vector registers for POWER7.
+
+   The 'org.gnu.gdb.power.spe' feature is optional.  It should contain
+registers 'ev0h' through 'ev31h', 'acc', and 'spefscr'.  SPE targets
+should provide 32-bit registers in 'org.gnu.gdb.power.core' and provide
+the upper halves in 'ev0h' through 'ev31h'.  GDB will combine these to
+present registers 'ev0' through 'ev31' to the user.
+
+
+File: gdb.info,  Node: S/390 and System z Features,  Next: Sparc Features,  Prev: PowerPC Features,  Up: Standard Target Features
+
+G.5.11 S/390 and System z Features
+----------------------------------
+
+The 'org.gnu.gdb.s390.core' feature is required for S/390 and System z
+targets.  It should contain the PSW and the 16 general registers.  In
+particular, System z targets should provide the 64-bit registers 'pswm',
+'pswa', and 'r0' through 'r15'.  S/390 targets should provide the 32-bit
+versions of these registers.  A System z target that runs in 31-bit
+addressing mode should provide 32-bit versions of 'pswm' and 'pswa', as
+well as the general register's upper halves 'r0h' through 'r15h', and
+their lower halves 'r0l' through 'r15l'.
+
+   The 'org.gnu.gdb.s390.fpr' feature is required.  It should contain
+the 64-bit registers 'f0' through 'f15', and 'fpc'.
+
+   The 'org.gnu.gdb.s390.acr' feature is required.  It should contain
+the 32-bit registers 'acr0' through 'acr15'.
+
+   The 'org.gnu.gdb.s390.linux' feature is optional.  It should contain
+the register 'orig_r2', which is 64-bit wide on System z targets and
+32-bit otherwise.  In addition, the feature may contain the 'last_break'
+register, whose width depends on the addressing mode, as well as the
+'system_call' register, which is always 32-bit wide.
+
+   The 'org.gnu.gdb.s390.tdb' feature is optional.  It should contain
+the 64-bit registers 'tdb0', 'tac', 'tct', 'atia', and 'tr0' through
+'tr15'.
+
+   The 'org.gnu.gdb.s390.vx' feature is optional.  It should contain
+64-bit wide registers 'v0l' through 'v15l', which will be combined by
+GDB with the floating point registers 'f0' through 'f15' to present the
+128-bit wide vector registers 'v0' through 'v15'.  In addition, this
+feature should contain the 128-bit wide vector registers 'v16' through
+'v31'.
+
+
+File: gdb.info,  Node: Sparc Features,  Next: TIC6x Features,  Prev: S/390 and System z Features,  Up: Standard Target Features
+
+G.5.12 Sparc Features
+---------------------
+
+The 'org.gnu.gdb.sparc.cpu' feature is required for sparc32/sparc64
+targets.  It should describe the following registers:
+
+   - 'g0' through 'g7'
+   - 'o0' through 'o7'
+   - 'l0' through 'l7'
+   - 'i0' through 'i7'
+
+   They may be 32-bit or 64-bit depending on the target.
+
+   Also the 'org.gnu.gdb.sparc.fpu' feature is required for
+sparc32/sparc64 targets.  It should describe the following registers:
+
+   - 'f0' through 'f31'
+   - 'f32' through 'f62' for sparc64
+
+   The 'org.gnu.gdb.sparc.cp0' feature is required for sparc32/sparc64
+targets.  It should describe the following registers:
+
+   - 'y', 'psr', 'wim', 'tbr', 'pc', 'npc', 'fsr', and 'csr' for sparc32
+   - 'pc', 'npc', 'state', 'fsr', 'fprs', and 'y' for sparc64
+
+
+File: gdb.info,  Node: TIC6x Features,  Prev: Sparc Features,  Up: Standard Target Features
+
+G.5.13 TMS320C6x Features
+-------------------------
+
+The 'org.gnu.gdb.tic6x.core' feature is required for TMS320C6x targets.
+It should contain registers 'A0' through 'A15', registers 'B0' through
+'B15', 'CSR' and 'PC'.
+
+   The 'org.gnu.gdb.tic6x.gp' feature is optional.  It should contain
+registers 'A16' through 'A31' and 'B16' through 'B31'.
+
+   The 'org.gnu.gdb.tic6x.c6xp' feature is optional.  It should contain
+registers 'TSR', 'ILC' and 'RILC'.
+
+
+File: gdb.info,  Node: Operating System Information,  Next: Trace File Format,  Prev: Target Descriptions,  Up: Top
+
+Appendix H Operating System Information
+***************************************
+
+* Menu:
+
+* Process list::
+
+Users of GDB often wish to obtain information about the state of the
+operating system running on the target--for example the list of
+processes, or the list of open files.  This section describes the
+mechanism that makes it possible.  This mechanism is similar to the
+target features mechanism (*note Target Descriptions::), but focuses on
+a different aspect of target.
+
+   Operating system information is retrived from the target via the
+remote protocol, using 'qXfer' requests (*note qXfer osdata read::).
+The object name in the request should be 'osdata', and the ANNEX
+identifies the data to be fetched.
+
+
+File: gdb.info,  Node: Process list,  Up: Operating System Information
+
+H.1 Process list
+================
+
+When requesting the process list, the ANNEX field in the 'qXfer' request
+should be 'processes'.  The returned data is an XML document.  The
+formal syntax of this document is defined in 'gdb/features/osdata.dtd'.
+
+   An example document is:
+
+     <?xml version="1.0"?>
+     <!DOCTYPE target SYSTEM "osdata.dtd">
+     <osdata type="processes">
+       <item>
+         <column name="pid">1</column>
+         <column name="user">root</column>
+         <column name="command">/sbin/init</column>
+         <column name="cores">1,2,3</column>
+       </item>
+     </osdata>
+
+   Each item should include a column whose name is 'pid'.  The value of
+that column should identify the process on the target.  The 'user' and
+'command' columns are optional, and will be displayed by GDB.  The
+'cores' column, if present, should contain a comma-separated list of
+cores that this process is running on.  Target may provide additional
+columns, which GDB currently ignores.
+
+
+File: gdb.info,  Node: Trace File Format,  Next: Index Section Format,  Prev: Operating System Information,  Up: Top
+
+Appendix I Trace File Format
+****************************
+
+The trace file comes in three parts: a header, a textual description
+section, and a trace frame section with binary data.
+
+   The header has the form '\x7fTRACE0\n'.  The first byte is '0x7f' so
+as to indicate that the file contains binary data, while the '0' is a
+version number that may have different values in the future.
+
+   The description section consists of multiple lines of ASCII text
+separated by newline characters ('0xa').  The lines may include a
+variety of optional descriptive or context-setting information, such as
+tracepoint definitions or register set size.  GDB will ignore any line
+that it does not recognize.  An empty line marks the end of this
+section.
+
+'R SIZE'
+     Specifies the size of a register block in bytes.  This is equal to
+     the size of a 'g' packet payload in the remote protocol.  SIZE is
+     an ascii decimal number.  There should be only one such line in a
+     single trace file.
+
+'status STATUS'
+     Trace status.  STATUS has the same format as a 'qTStatus' remote
+     packet reply.  There should be only one such line in a single trace
+     file.
+
+'tp PAYLOAD'
+     Tracepoint definition.  The PAYLOAD has the same format as
+     'qTfP'/'qTsP' remote packet reply payload.  A single tracepoint may
+     take multiple lines of definition, corresponding to the multiple
+     reply packets.
+
+'tsv PAYLOAD'
+     Trace state variable definition.  The PAYLOAD has the same format
+     as 'qTfV'/'qTsV' remote packet reply payload.  A single variable
+     may take multiple lines of definition, corresponding to the
+     multiple reply packets.
+
+'tdesc PAYLOAD'
+     Target description in XML format.  The PAYLOAD is a single line of
+     the XML file.  All such lines should be concatenated together to
+     get the original XML file.  This file is in the same format as
+     'qXfer' 'features' payload, and corresponds to the main
+     'target.xml' file.  Includes are not allowed.
+
+   The trace frame section consists of a number of consecutive frames.
+Each frame begins with a two-byte tracepoint number, followed by a
+four-byte size giving the amount of data in the frame.  The data in the
+frame consists of a number of blocks, each introduced by a character
+indicating its type (at least register, memory, and trace state
+variable).  The data in this section is raw binary, not a hexadecimal or
+other encoding; its endianness matches the target's endianness.
+
+'R BYTES'
+     Register block.  The number and ordering of bytes matches that of a
+     'g' packet in the remote protocol.  Note that these are the actual
+     bytes, in target order, not a hexadecimal encoding.
+
+'M ADDRESS LENGTH BYTES...'
+     Memory block.  This is a contiguous block of memory, at the 8-byte
+     address ADDRESS, with a 2-byte length LENGTH, followed by LENGTH
+     bytes.
+
+'V NUMBER VALUE'
+     Trace state variable block.  This records the 8-byte signed value
+     VALUE of trace state variable numbered NUMBER.
+
+   Future enhancements of the trace file format may include additional
+types of blocks.
+
+
+File: gdb.info,  Node: Index Section Format,  Next: Man Pages,  Prev: Trace File Format,  Up: Top
+
+Appendix J '.gdb_index' section format
+**************************************
+
+This section documents the index section that is created by 'save
+gdb-index' (*note Index Files::).  The index section is DWARF-specific;
+some knowledge of DWARF is assumed in this description.
+
+   The mapped index file format is designed to be directly 'mmap'able on
+any architecture.  In most cases, a datum is represented using a
+little-endian 32-bit integer value, called an 'offset_type'.  Big endian
+machines must byte-swap the values before using them.  Exceptions to
+this rule are noted.  The data is laid out such that alignment is always
+respected.
+
+   A mapped index consists of several areas, laid out in order.
+
+  1. The file header.  This is a sequence of values, of 'offset_type'
+     unless otherwise noted:
+
+       1. The version number, currently 8.  Versions 1, 2 and 3 are
+          obsolete.  Version 4 uses a different hashing function from
+          versions 5 and 6.  Version 6 includes symbols for inlined
+          functions, whereas versions 4 and 5 do not.  Version 7 adds
+          attributes to the CU indices in the symbol table.  Version 8
+          specifies that symbols from DWARF type units
+          ('DW_TAG_type_unit') refer to the type unit's symbol table and
+          not the compilation unit ('DW_TAG_comp_unit') using the type.
+
+          GDB will only read version 4, 5, or 6 indices by specifying
+          'set use-deprecated-index-sections on'.  GDB has a workaround
+          for potentially broken version 7 indices so it is currently
+          not flagged as deprecated.
+
+       2. The offset, from the start of the file, of the CU list.
+
+       3. The offset, from the start of the file, of the types CU list.
+          Note that this area can be empty, in which case this offset
+          will be equal to the next offset.
+
+       4. The offset, from the start of the file, of the address area.
+
+       5. The offset, from the start of the file, of the symbol table.
+
+       6. The offset, from the start of the file, of the constant pool.
+
+  2. The CU list.  This is a sequence of pairs of 64-bit little-endian
+     values, sorted by the CU offset.  The first element in each pair is
+     the offset of a CU in the '.debug_info' section.  The second
+     element in each pair is the length of that CU. References to a CU
+     elsewhere in the map are done using a CU index, which is just the
+     0-based index into this table.  Note that if there are type CUs,
+     then conceptually CUs and type CUs form a single list for the
+     purposes of CU indices.
+
+  3. The types CU list.  This is a sequence of triplets of 64-bit
+     little-endian values.  In a triplet, the first value is the CU
+     offset, the second value is the type offset in the CU, and the
+     third value is the type signature.  The types CU list is not
+     sorted.
+
+  4. The address area.  The address area consists of a sequence of
+     address entries.  Each address entry has three elements:
+
+       1. The low address.  This is a 64-bit little-endian value.
+
+       2. The high address.  This is a 64-bit little-endian value.  Like
+          'DW_AT_high_pc', the value is one byte beyond the end.
+
+       3. The CU index.  This is an 'offset_type' value.
+
+  5. The symbol table.  This is an open-addressed hash table.  The size
+     of the hash table is always a power of 2.
+
+     Each slot in the hash table consists of a pair of 'offset_type'
+     values.  The first value is the offset of the symbol's name in the
+     constant pool.  The second value is the offset of the CU vector in
+     the constant pool.
+
+     If both values are 0, then this slot in the hash table is empty.
+     This is ok because while 0 is a valid constant pool index, it
+     cannot be a valid index for both a string and a CU vector.
+
+     The hash value for a table entry is computed by applying an
+     iterative hash function to the symbol's name.  Starting with an
+     initial value of 'r = 0', each (unsigned) character 'c' in the
+     string is incorporated into the hash using the formula depending on
+     the index version:
+
+     Version 4
+          The formula is 'r = r * 67 + c - 113'.
+
+     Versions 5 to 7
+          The formula is 'r = r * 67 + tolower (c) - 113'.
+
+     The terminating '\0' is not incorporated into the hash.
+
+     The step size used in the hash table is computed via '((hash * 17)
+     & (size - 1)) | 1', where 'hash' is the hash value, and 'size' is
+     the size of the hash table.  The step size is used to find the next
+     candidate slot when handling a hash collision.
+
+     The names of C++ symbols in the hash table are canonicalized.  We
+     don't currently have a simple description of the canonicalization
+     algorithm; if you intend to create new index sections, you must
+     read the code.
+
+  6. The constant pool.  This is simply a bunch of bytes.  It is
+     organized so that alignment is correct: CU vectors are stored
+     first, followed by strings.
+
+     A CU vector in the constant pool is a sequence of 'offset_type'
+     values.  The first value is the number of CU indices in the vector.
+     Each subsequent value is the index and symbol attributes of a CU in
+     the CU list.  This element in the hash table is used to indicate
+     which CUs define the symbol and how the symbol is used.  See below
+     for the format of each CU index+attributes entry.
+
+     A string in the constant pool is zero-terminated.
+
+   Attributes were added to CU index values in '.gdb_index' version 7.
+If a symbol has multiple uses within a CU then there is one CU
+index+attributes value for each use.
+
+   The format of each CU index+attributes entry is as follows (bit 0 =
+LSB):
+
+Bits 0-23
+     This is the index of the CU in the CU list.
+Bits 24-27
+     These bits are reserved for future purposes and must be zero.
+Bits 28-30
+     The kind of the symbol in the CU.
+
+     0
+          This value is reserved and should not be used.  By reserving
+          zero the full 'offset_type' value is backwards compatible with
+          previous versions of the index.
+     1
+          The symbol is a type.
+     2
+          The symbol is a variable or an enum value.
+     3
+          The symbol is a function.
+     4
+          Any other kind of symbol.
+     5,6,7
+          These values are reserved.
+
+Bit 31
+     This bit is zero if the value is global and one if it is static.
+
+     The determination of whether a symbol is global or static is
+     complicated.  The authorative reference is the file 'dwarf2read.c'
+     in GDB sources.
+
+   This pseudo-code describes the computation of a symbol's kind and
+global/static attributes in the index.
+
+     is_external = get_attribute (die, DW_AT_external);
+     language = get_attribute (cu_die, DW_AT_language);
+     switch (die->tag)
+       {
+       case DW_TAG_typedef:
+       case DW_TAG_base_type:
+       case DW_TAG_subrange_type:
+         kind = TYPE;
+         is_static = 1;
+         break;
+       case DW_TAG_enumerator:
+         kind = VARIABLE;
+         is_static = language != CPLUS;
+         break;
+       case DW_TAG_subprogram:
+         kind = FUNCTION;
+         is_static = ! (is_external || language == ADA);
+         break;
+       case DW_TAG_constant:
+         kind = VARIABLE;
+         is_static = ! is_external;
+         break;
+       case DW_TAG_variable:
+         kind = VARIABLE;
+         is_static = ! is_external;
+         break;
+       case DW_TAG_namespace:
+         kind = TYPE;
+         is_static = 0;
+         break;
+       case DW_TAG_class_type:
+       case DW_TAG_interface_type:
+       case DW_TAG_structure_type:
+       case DW_TAG_union_type:
+       case DW_TAG_enumeration_type:
+         kind = TYPE;
+         is_static = language != CPLUS;
+         break;
+       default:
+         assert (0);
+       }
+
+
+File: gdb.info,  Node: Man Pages,  Next: Copying,  Prev: Index Section Format,  Up: Top
+
+Appendix K Manual pages
+***********************
+
+* Menu:
+
+* gdb man::                     The GNU Debugger man page
+* gdbserver man::               Remote Server for the GNU Debugger man page
+* gcore man::                   Generate a core file of a running program
+* gdbinit man::                 gdbinit scripts
+
+
+File: gdb.info,  Node: gdb man,  Next: gdbserver man,  Up: Man Pages
+
+gdb man
+=======
+
+gdb ['-help'] ['-nh'] ['-nx'] ['-q'] ['-batch'] ['-cd='DIR] ['-f']
+['-b' BPS] ['-tty='DEV] ['-s' SYMFILE] ['-e' PROG] ['-se' PROG]
+['-c' CORE] ['-p' PROCID] ['-x' CMDS] ['-d' DIR] [PROG|PROG PROCID|PROG
+CORE]
+
+   The purpose of a debugger such as GDB is to allow you to see what is
+going on "inside" another program while it executes - or what another
+program was doing at the moment it crashed.
+
+   GDB can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+   * Start your program, specifying anything that might affect its
+     behavior.
+
+   * Make your program stop on specified conditions.
+
+   * Examine what has happened, when your program has stopped.
+
+   * Change things in your program, so you can experiment with
+     correcting the effects of one bug and go on to learn about another.
+
+   You can use GDB to debug programs written in C, C++, Fortran and
+Modula-2.
+
+   GDB is invoked with the shell command 'gdb'.  Once started, it reads
+commands from the terminal until you tell it to exit with the GDB
+command 'quit'.  You can get online help from GDB itself by using the
+command 'help'.
+
+   You can run 'gdb' with no arguments or options; but the most usual
+way to start GDB is with one argument or two, specifying an executable
+program as the argument:
+
+     gdb program
+
+   You can also start with both an executable program and a core file
+specified:
+
+     gdb program core
+
+   You can, instead, specify a process ID as a second argument, if you
+want to debug a running process:
+
+     gdb program 1234
+     gdb -p 1234
+
+would attach GDB to process '1234' (unless you also have a file named
+'1234'; GDB does check for a core file first).  With option '-p' you can
+omit the PROGRAM filename.
+
+   Here are some of the most frequently needed GDB commands:
+
+'break [FILE:]FUNCTION'
+     Set a breakpoint at FUNCTION (in FILE).
+
+'run [ARGLIST]'
+     Start your program (with ARGLIST, if specified).
+
+'bt'
+     Backtrace: display the program stack.
+
+'print EXPR'
+     Display the value of an expression.
+
+'c'
+     Continue running your program (after stopping, e.g.  at a
+     breakpoint).
+
+'next'
+     Execute next program line (after stopping); step _over_ any
+     function calls in the line.
+
+'edit [FILE:]FUNCTION'
+     look at the program line where it is presently stopped.
+
+'list [FILE:]FUNCTION'
+     type the text of the program in the vicinity of where it is
+     presently stopped.
+
+'step'
+     Execute next program line (after stopping); step _into_ any
+     function calls in the line.
+
+'help [NAME]'
+     Show information about GDB command NAME, or general information
+     about using GDB.
+
+'quit'
+     Exit from GDB.
+
+   Any arguments other than options specify an executable file and core
+file (or process ID); that is, the first argument encountered with no
+associated option flag is equivalent to a '-se' option, and the second,
+if any, is equivalent to a '-c' option if it's the name of a file.  Many
+options have both long and short forms; both are shown here.  The long
+forms are also recognized if you truncate them, so long as enough of the
+option is present to be unambiguous.  (If you prefer, you can flag
+option arguments with '+' rather than '-', though we illustrate the more
+usual convention.)
+
+   All the options and command line arguments you give are processed in
+sequential order.  The order makes a difference when the '-x' option is
+used.
+
+'-help'
+'-h'
+     List all options, with brief explanations.
+
+'-symbols=FILE'
+'-s FILE'
+     Read symbol table from file FILE.
+
+'-write'
+     Enable writing into executable and core files.
+
+'-exec=FILE'
+'-e FILE'
+     Use file FILE as the executable file to execute when appropriate,
+     and for examining pure data in conjunction with a core dump.
+
+'-se=FILE'
+     Read symbol table from file FILE and use it as the executable file.
+
+'-core=FILE'
+'-c FILE'
+     Use file FILE as a core dump to examine.
+
+'-command=FILE'
+'-x FILE'
+     Execute GDB commands from file FILE.
+
+'-ex COMMAND'
+     Execute given GDB COMMAND.
+
+'-directory=DIRECTORY'
+'-d DIRECTORY'
+     Add DIRECTORY to the path to search for source files.
+
+'-nh'
+     Do not execute commands from '~/.gdbinit'.
+
+'-nx'
+'-n'
+     Do not execute commands from any '.gdbinit' initialization files.
+
+'-quiet'
+'-q'
+     "Quiet".  Do not print the introductory and copyright messages.
+     These messages are also suppressed in batch mode.
+
+'-batch'
+     Run in batch mode.  Exit with status '0' after processing all the
+     command files specified with '-x' (and '.gdbinit', if not
+     inhibited).  Exit with nonzero status if an error occurs in
+     executing the GDB commands in the command files.
+
+     Batch mode may be useful for running GDB as a filter, for example
+     to download and run a program on another computer; in order to make
+     this more useful, the message
+
+          Program exited normally.
+
+     (which is ordinarily issued whenever a program running under GDB
+     control terminates) is not issued when running in batch mode.
+
+'-cd=DIRECTORY'
+     Run GDB using DIRECTORY as its working directory, instead of the
+     current directory.
+
+'-fullname'
+'-f'
+     Emacs sets this option when it runs GDB as a subprocess.  It tells
+     GDB to output the full file name and line number in a standard,
+     recognizable fashion each time a stack frame is displayed (which
+     includes each time the program stops).  This recognizable format
+     looks like two '\032' characters, followed by the file name, line
+     number and character position separated by colons, and a newline.
+     The Emacs-to-GDB interface program uses the two '\032' characters
+     as a signal to display the source code for the frame.
+
+'-b BPS'
+     Set the line speed (baud rate or bits per second) of any serial
+     interface used by GDB for remote debugging.
+
+'-tty=DEVICE'
+     Run using DEVICE for your program's standard input and output.
+
+
+File: gdb.info,  Node: gdbserver man,  Next: gcore man,  Prev: gdb man,  Up: Man Pages
+
+gdbserver man
+=============
+
+gdbserver COMM PROG [ARGS...]
+
+gdbserver -attach COMM PID
+
+gdbserver -multi COMM
+
+   'gdbserver' is a program that allows you to run GDB on a different
+machine than the one which is running the program being debugged.
+
+Usage (server (target) side)
+----------------------------
+
+First, you need to have a copy of the program you want to debug put onto
+the target system.  The program can be stripped to save space if needed,
+as 'gdbserver' doesn't care about symbols.  All symbol handling is taken
+care of by the GDB running on the host system.
+
+   To use the server, you log on to the target system, and run the
+'gdbserver' program.  You must tell it (a) how to communicate with GDB,
+(b) the name of your program, and (c) its arguments.  The general syntax
+is:
+
+     target> gdbserver COMM PROGRAM [ARGS ...]
+
+   For example, using a serial port, you might say:
+
+     target> gdbserver /dev/com1 emacs foo.txt
+
+   This tells 'gdbserver' to debug emacs with an argument of foo.txt,
+and to communicate with GDB via '/dev/com1'.  'gdbserver' now waits
+patiently for the host GDB to communicate with it.
+
+   To use a TCP connection, you could say:
+
+     target> gdbserver host:2345 emacs foo.txt
+
+   This says pretty much the same thing as the last example, except that
+we are going to communicate with the 'host' GDB via TCP. The 'host:2345'
+argument means that we are expecting to see a TCP connection from 'host'
+to local TCP port 2345.  (Currently, the 'host' part is ignored.)  You
+can choose any number you want for the port number as long as it does
+not conflict with any existing TCP ports on the target system.  This
+same port number must be used in the host GDBs 'target remote' command,
+which will be described shortly.  Note that if you chose a port number
+that conflicts with another service, 'gdbserver' will print an error
+message and exit.
+
+   'gdbserver' can also attach to running programs.  This is
+accomplished via the '--attach' argument.  The syntax is:
+
+     target> gdbserver --attach COMM PID
+
+   PID is the process ID of a currently running process.  It isn't
+necessary to point 'gdbserver' at a binary for the running process.
+
+   To start 'gdbserver' without supplying an initial command to run or
+process ID to attach, use the '--multi' command line option.  In such
+case you should connect using 'target extended-remote' to start the
+program you want to debug.
+
+     target> gdbserver --multi COMM
+
+Usage (host side)
+-----------------
+
+You need an unstripped copy of the target program on your host system,
+since GDB needs to examine it's symbol tables and such.  Start up GDB as
+you normally would, with the target program as the first argument.  (You
+may need to use the '--baud' option if the serial line is running at
+anything except 9600 baud.)  That is 'gdb TARGET-PROG', or 'gdb --baud
+BAUD TARGET-PROG'.  After that, the only new command you need to know
+about is 'target remote' (or 'target extended-remote').  Its argument is
+either a device name (usually a serial device, like '/dev/ttyb'), or a
+'HOST:PORT' descriptor.  For example:
+
+     (gdb) target remote /dev/ttyb
+
+communicates with the server via serial line '/dev/ttyb', and:
+
+     (gdb) target remote the-target:2345
+
+communicates via a TCP connection to port 2345 on host 'the-target',
+where you previously started up 'gdbserver' with the same port number.
+Note that for TCP connections, you must start up 'gdbserver' prior to
+using the 'target remote' command, otherwise you may get an error that
+looks something like 'Connection refused'.
+
+   'gdbserver' can also debug multiple inferiors at once, described in
+*note Inferiors and Programs::.  In such case use the 'extended-remote'
+GDB command variant:
+
+     (gdb) target extended-remote the-target:2345
+
+   The 'gdbserver' option '--multi' may or may not be used in such case.
+
+   There are three different modes for invoking 'gdbserver':
+
+   * Debug a specific program specified by its program name:
+
+          gdbserver COMM PROG [ARGS...]
+
+     The COMM parameter specifies how should the server communicate with
+     GDB; it is either a device name (to use a serial line), a TCP port
+     number (':1234'), or '-' or 'stdio' to use stdin/stdout of
+     'gdbserver'.  Specify the name of the program to debug in PROG.
+     Any remaining arguments will be passed to the program verbatim.
+     When the program exits, GDB will close the connection, and
+     'gdbserver' will exit.
+
+   * Debug a specific program by specifying the process ID of a running
+     program:
+
+          gdbserver --attach COMM PID
+
+     The COMM parameter is as described above.  Supply the process ID of
+     a running program in PID; GDB will do everything else.  Like with
+     the previous mode, when the process PID exits, GDB will close the
+     connection, and 'gdbserver' will exit.
+
+   * Multi-process mode - debug more than one program/process:
+
+          gdbserver --multi COMM
+
+     In this mode, GDB can instruct 'gdbserver' which command(s) to run.
+     Unlike the other 2 modes, GDB will not close the connection when a
+     process being debugged exits, so you can debug several processes in
+     the same session.
+
+   In each of the modes you may specify these options:
+
+'--help'
+     List all options, with brief explanations.
+
+'--version'
+     This option causes 'gdbserver' to print its version number and
+     exit.
+
+'--attach'
+     'gdbserver' will attach to a running program.  The syntax is:
+
+          target> gdbserver --attach COMM PID
+
+     PID is the process ID of a currently running process.  It isn't
+     necessary to point 'gdbserver' at a binary for the running process.
+
+'--multi'
+     To start 'gdbserver' without supplying an initial command to run or
+     process ID to attach, use this command line option.  Then you can
+     connect using 'target extended-remote' and start the program you
+     want to debug.  The syntax is:
+
+          target> gdbserver --multi COMM
+
+'--debug'
+     Instruct 'gdbserver' to display extra status information about the
+     debugging process.  This option is intended for 'gdbserver'
+     development and for bug reports to the developers.
+
+'--remote-debug'
+     Instruct 'gdbserver' to display remote protocol debug output.  This
+     option is intended for 'gdbserver' development and for bug reports
+     to the developers.
+
+'--debug-format=option1[,option2,...]'
+     Instruct 'gdbserver' to include extra information in each line of
+     debugging output.  *Note Other Command-Line Arguments for
+     gdbserver::.
+
+'--wrapper'
+     Specify a wrapper to launch programs for debugging.  The option
+     should be followed by the name of the wrapper, then any
+     command-line arguments to pass to the wrapper, then '--' indicating
+     the end of the wrapper arguments.
+
+'--once'
+     By default, 'gdbserver' keeps the listening TCP port open, so that
+     additional connections are possible.  However, if you start
+     'gdbserver' with the '--once' option, it will stop listening for
+     any further connection attempts after connecting to the first GDB
+     session.
+
+
+File: gdb.info,  Node: gcore man,  Next: gdbinit man,  Prev: gdbserver man,  Up: Man Pages
+
+gcore
+=====
+
+gcore [-o FILENAME] PID
+
+   Generate a core dump of a running program with process ID PID.
+Produced file is equivalent to a kernel produced core file as if the
+process crashed (and if 'ulimit -c' were used to set up an appropriate
+core dump limit).  Unlike after a crash, after 'gcore' the program
+remains running without any change.
+
+'-o FILENAME'
+     The optional argument FILENAME specifies the file name where to put
+     the core dump.  If not specified, the file name defaults to
+     'core.PID', where PID is the running program process ID.
+
+
+File: gdb.info,  Node: gdbinit man,  Prev: gcore man,  Up: Man Pages
+
+gdbinit
+=======
+
+
+~/.gdbinit
+
+./.gdbinit
+
+   These files contain GDB commands to automatically execute during GDB
+startup.  The lines of contents are canned sequences of commands,
+described in *note Sequences::.
+
+   Please read more in *note Startup::.
+
+'(not enabled with --with-system-gdbinit during compilation)'
+     System-wide initialization file.  It is executed unless user
+     specified GDB option '-nx' or '-n'.  See more in *note System-wide
+     configuration::.
+
+'~/.gdbinit'
+     User initialization file.  It is executed unless user specified GDB
+     options '-nx', '-n' or '-nh'.
+
+'./.gdbinit'
+     Initialization file for current directory.  It may need to be
+     enabled with GDB security command 'set auto-load local-gdbinit'.
+     See more in *note Init File in the Current Directory::.
+
+
 File: gdb.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Man Pages,  Up: Top
 
 Appendix L GNU GENERAL PUBLIC LICENSE
@@ -45,7 +1227,7 @@ Appendix L GNU GENERAL PUBLIC LICENSE
 
                         Version 3, 29 June 2007
 
-     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
+     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies of this
      license document, but changing it is not allowed.
@@ -59,11 +1241,11 @@ and other kinds of works.
    The licenses for most software and other practical works are designed
 to take away your freedom to share and change the works.  By contrast,
 the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains
-free software for all its users.  We, the Free Software Foundation, use
-the GNU General Public License for most of our software; it applies
-also to any other work released this way by its authors.  You can apply
-it to your programs, too.
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
 
    When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
@@ -73,9 +1255,9 @@ want it, that you can change the softwar
 free programs, and that you know you can do these things.
 
    To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you
-have certain responsibilities if you distribute copies of the software,
-or if you modify it: responsibilities to respect the freedom of others.
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
 
    For example, if you distribute copies of such a program, whether
 gratis or for a fee, you must pass on to the recipients the same
@@ -94,16 +1276,15 @@ changed, so that their problems will not
 authors of previous versions.
 
    Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the
-manufacturer can do so.  This is fundamentally incompatible with the
-aim of protecting users' freedom to change the software.  The
-systematic pattern of such abuse occurs in the area of products for
-individuals to use, which is precisely where it is most unacceptable.
-Therefore, we have designed this version of the GPL to prohibit the
-practice for those products.  If such problems arise substantially in
-other domains, we stand ready to extend this provision to those domains
-in future versions of the GPL, as needed to protect the freedom of
-users.
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
 
    Finally, every program is threatened constantly by software patents.
 States should not allow patents to restrict development and use of
@@ -140,8 +1321,8 @@ TERMS AND CONDITIONS
 
      To "propagate" a work means to do anything with it that, without
      permission, would make you directly or secondarily liable for
-     infringement under applicable copyright law, except executing it
-     on a computer or modifying a private copy.  Propagation includes
+     infringement under applicable copyright law, except executing it on
+     a computer or modifying a private copy.  Propagation includes
      copying, distribution (with or without modification), making
      available to the public, and in some countries other activities as
      well.
@@ -155,8 +1336,8 @@ TERMS AND CONDITIONS
      to the extent that it includes a convenient and prominently visible
      feature that (1) displays an appropriate copyright notice, and (2)
      tells the user that there is no warranty for the work (except to
-     the extent that warranties are provided), that licensees may
-     convey the work under this License, and how to view a copy of this
+     the extent that warranties are provided), that licensees may convey
+     the work under this License, and how to view a copy of this
      License.  If the interface presents a list of user commands or
      options, such as a menu, a prominent item in the list meets this
      criterion.
@@ -164,8 +1345,8 @@ TERMS AND CONDITIONS
   1. Source Code.
 
      The "source code" for a work means the preferred form of the work
-     for making modifications to it.  "Object code" means any
-     non-source form of a work.
+     for making modifications to it.  "Object code" means any non-source
+     form of a work.
 
      A "Standard Interface" means an interface that either is an
      official standard defined by a recognized standards body, or, in
@@ -176,10 +1357,10 @@ TERMS AND CONDITIONS
      The "System Libraries" of an executable work include anything,
      other than the work as a whole, that (a) is included in the normal
      form of packaging a Major Component, but which is not part of that
-     Major Component, and (b) serves only to enable use of the work
-     with that Major Component, or to implement a Standard Interface
-     for which an implementation is available to the public in source
-     code form.  A "Major Component", in this context, means a major
+     Major Component, and (b) serves only to enable use of the work with
+     that Major Component, or to implement a Standard Interface for
+     which an implementation is available to the public in source code
+     form.  A "Major Component", in this context, means a major
      essential component (kernel, window system, and so on) of the
      specific operating system (if any) on which the executable work
      runs, or a compiler used to produce the work, or an object code
@@ -187,15 +1368,15 @@ TERMS AND CONDITIONS
 
      The "Corresponding Source" for a work in object code form means all
      the source code needed to generate, install, and (for an executable
-     work) run the object code and to modify the work, including
-     scripts to control those activities.  However, it does not include
-     the work's System Libraries, or general-purpose tools or generally
+     work) run the object code and to modify the work, including scripts
+     to control those activities.  However, it does not include the
+     work's System Libraries, or general-purpose tools or generally
      available free programs which are used unmodified in performing
      those activities but which are not part of the work.  For example,
-     Corresponding Source includes interface definition files
-     associated with source files for the work, and the source code for
-     shared libraries and dynamically linked subprograms that the work
-     is specifically designed to require, such as by intimate data
+     Corresponding Source includes interface definition files associated
+     with source files for the work, and the source code for shared
+     libraries and dynamically linked subprograms that the work is
+     specifically designed to require, such as by intimate data
      communication or control flow between those subprograms and other
      parts of the work.
 
@@ -212,22 +1393,22 @@ TERMS AND CONDITIONS
      copyright on the Program, and are irrevocable provided the stated
      conditions are met.  This License explicitly affirms your unlimited
      permission to run the unmodified Program.  The output from running
-     a covered work is covered by this License only if the output,
-     given its content, constitutes a covered work.  This License
-     acknowledges your rights of fair use or other equivalent, as
-     provided by copyright law.
+     a covered work is covered by this License only if the output, given
+     its content, constitutes a covered work.  This License acknowledges
+     your rights of fair use or other equivalent, as provided by
+     copyright law.
 
      You may make, run and propagate covered works that you do not
      convey, without conditions so long as your license otherwise
      remains in force.  You may convey covered works to others for the
-     sole purpose of having them make modifications exclusively for
-     you, or provide you with facilities for running those works,
-     provided that you comply with the terms of this License in
-     conveying all material for which you do not control copyright.
-     Those thus making or running the covered works for you must do so
-     exclusively on your behalf, under your direction and control, on
-     terms that prohibit them from making any copies of your
-     copyrighted material outside their relationship with you.
+     sole purpose of having them make modifications exclusively for you,
+     or provide you with facilities for running those works, provided
+     that you comply with the terms of this License in conveying all
+     material for which you do not control copyright.  Those thus making
+     or running the covered works for you must do so exclusively on your
+     behalf, under your direction and control, on terms that prohibit
+     them from making any copies of your copyrighted material outside
+     their relationship with you.
 
      Conveying under any other circumstances is permitted solely under
      the conditions stated below.  Sublicensing is not allowed; section
@@ -244,8 +1425,8 @@ TERMS AND CONDITIONS
      When you convey a covered work, you waive any legal power to forbid
      circumvention of technological measures to the extent such
      circumvention is effected by exercising rights under this License
-     with respect to the covered work, and you disclaim any intention
-     to limit operation or modification of the work as a means of
+     with respect to the covered work, and you disclaim any intention to
+     limit operation or modification of the work as a means of
      enforcing, against the work's users, your or third parties' legal
      rights to forbid circumvention of technological measures.
 
@@ -315,8 +1496,8 @@ TERMS AND CONDITIONS
 
        b. Convey the object code in, or embodied in, a physical product
           (including a physical distribution medium), accompanied by a
-          written offer, valid for at least three years and valid for
-          as long as you offer spare parts or customer support for that
+          written offer, valid for at least three years and valid for as
+          long as you offer spare parts or customer support for that
           product model, to give anyone who possesses the object code
           either (1) a copy of the Corresponding Source for all the
           software in the product that is covered by this License, on a
@@ -326,32 +1507,31 @@ TERMS AND CONDITIONS
           to copy the Corresponding Source from a network server at no
           charge.
 
-       c. Convey individual copies of the object code with a copy of
-          the written offer to provide the Corresponding Source.  This
+       c. Convey individual copies of the object code with a copy of the
+          written offer to provide the Corresponding Source.  This
           alternative is allowed only occasionally and noncommercially,
           and only if you received the object code with such an offer,
           in accord with subsection 6b.
 
        d. Convey the object code by offering access from a designated
-          place (gratis or for a charge), and offer equivalent access
-          to the Corresponding Source in the same way through the same
+          place (gratis or for a charge), and offer equivalent access to
+          the Corresponding Source in the same way through the same
           place at no further charge.  You need not require recipients
           to copy the Corresponding Source along with the object code.
           If the place to copy the object code is a network server, the
-          Corresponding Source may be on a different server (operated
-          by you or a third party) that supports equivalent copying
-          facilities, provided you maintain clear directions next to
-          the object code saying where to find the Corresponding Source.
+          Corresponding Source may be on a different server (operated by
+          you or a third party) that supports equivalent copying
+          facilities, provided you maintain clear directions next to the
+          object code saying where to find the Corresponding Source.
           Regardless of what server hosts the Corresponding Source, you
-          remain obligated to ensure that it is available for as long
-          as needed to satisfy these requirements.
+          remain obligated to ensure that it is available for as long as
+          needed to satisfy these requirements.
 
        e. Convey the object code using peer-to-peer transmission,
           provided you inform other peers where the object code and
           Corresponding Source of the work are being offered to the
           general public at no charge under subsection 6d.
 
-
      A separable portion of the object code, whose source code is
      excluded from the Corresponding Source as a System Library, need
      not be included in conveying the object code work.
@@ -359,8 +1539,8 @@ TERMS AND CONDITIONS
      A "User Product" is either (1) a "consumer product", which means
      any tangible personal property which is normally used for personal,
      family, or household purposes, or (2) anything designed or sold for
-     incorporation into a dwelling.  In determining whether a product
-     is a consumer product, doubtful cases shall be resolved in favor of
+     incorporation into a dwelling.  In determining whether a product is
+     a consumer product, doubtful cases shall be resolved in favor of
      coverage.  For a particular product received by a particular user,
      "normally used" refers to a typical or common use of that class of
      product, regardless of the status of the particular user or of the
@@ -391,11 +1571,11 @@ TERMS AND CONDITIONS
 
      The requirement to provide Installation Information does not
      include a requirement to continue to provide support service,
-     warranty, or updates for a work that has been modified or
-     installed by the recipient, or for the User Product in which it
-     has been modified or installed.  Access to a network may be denied
-     when the modification itself materially and adversely affects the
-     operation of the network or violates the rules and protocols for
+     warranty, or updates for a work that has been modified or installed
+     by the recipient, or for the User Product in which it has been
+     modified or installed.  Access to a network may be denied when the
+     modification itself materially and adversely affects the operation
+     of the network or violates the rules and protocols for
      communication across the network.
 
      Corresponding Source conveyed, and Installation Information
@@ -425,8 +1605,8 @@ TERMS AND CONDITIONS
 
      Notwithstanding any other provision of this License, for material
      you add to a covered work, you may (if authorized by the copyright
-     holders of that material) supplement the terms of this License
-     with terms:
+     holders of that material) supplement the terms of this License with
+     terms:
 
        a. Disclaiming warranty or limiting liability differently from
           the terms of sections 15 and 16 of this License; or
@@ -436,9 +1616,8 @@ TERMS AND CONDITIONS
           Legal Notices displayed by works containing it; or
 
        c. Prohibiting misrepresentation of the origin of that material,
-          or requiring that modified versions of such material be
-          marked in reasonable ways as different from the original
-          version; or
+          or requiring that modified versions of such material be marked
+          in reasonable ways as different from the original version; or
 
        d. Limiting the use for publicity purposes of names of licensors
           or authors of the material; or
@@ -457,11 +1636,10 @@ TERMS AND CONDITIONS
      you received it, or any part of it, contains a notice stating that
      it is governed by this License along with a term that is a further
      restriction, you may remove that term.  If a license document
-     contains a further restriction but permits relicensing or
-     conveying under this License, you may add to a covered work
-     material governed by the terms of that license document, provided
-     that the further restriction does not survive such relicensing or
-     conveying.
+     contains a further restriction but permits relicensing or conveying
+     under this License, you may add to a covered work material governed
+     by the terms of that license document, provided that the further
+     restriction does not survive such relicensing or conveying.
 
      If you add terms to a covered work in accord with this section, you
      must place, in the relevant source files, a statement of the
@@ -477,13 +1655,13 @@ TERMS AND CONDITIONS
      You may not propagate or modify a covered work except as expressly
      provided under this License.  Any attempt otherwise to propagate or
      modify it is void, and will automatically terminate your rights
-     under this License (including any patent licenses granted under
-     the third paragraph of section 11).
+     under this License (including any patent licenses granted under the
+     third paragraph of section 11).
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -495,10 +1673,10 @@ TERMS AND CONDITIONS
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, you do not qualify to receive new
-     licenses for the same material under section 10.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, you do not qualify to receive new licenses
+     for the same material under section 10.
 
   9. Acceptance Not Required for Having Copies.
 
@@ -512,7 +1690,7 @@ TERMS AND CONDITIONS
      by modifying or propagating a covered work, you indicate your
      acceptance of this License to do so.
 
- 10. Automatic Licensing of Downstream Recipients.
+  10. Automatic Licensing of Downstream Recipients.
 
      Each time you convey a covered work, the recipient automatically
      receives a license from the original licensors, to run, modify and
@@ -526,21 +1704,21 @@ TERMS AND CONDITIONS
      covered work results from an entity transaction, each party to that
      transaction who receives a copy of the work also receives whatever
      licenses to the work the party's predecessor in interest had or
-     could give under the previous paragraph, plus a right to
-     possession of the Corresponding Source of the work from the
-     predecessor in interest, if the predecessor has it or can get it
-     with reasonable efforts.
+     could give under the previous paragraph, plus a right to possession
+     of the Corresponding Source of the work from the predecessor in
+     interest, if the predecessor has it or can get it with reasonable
+     efforts.
 
      You may not impose any further restrictions on the exercise of the
      rights granted or affirmed under this License.  For example, you
-     may not impose a license fee, royalty, or other charge for
-     exercise of rights granted under this License, and you may not
-     initiate litigation (including a cross-claim or counterclaim in a
-     lawsuit) alleging that any patent claim is infringed by making,
-     using, selling, offering for sale, or importing the Program or any
-     portion of it.
+     may not impose a license fee, royalty, or other charge for exercise
+     of rights granted under this License, and you may not initiate
+     litigation (including a cross-claim or counterclaim in a lawsuit)
+     alleging that any patent claim is infringed by making, using,
+     selling, offering for sale, or importing the Program or any portion
+     of it.
 
- 11. Patents.
+  11. Patents.
 
      A "contributor" is a copyright holder who authorizes use under this
      License of the Program or a work on which the Program is based.
@@ -560,15 +1738,15 @@ TERMS AND CONDITIONS
      Each contributor grants you a non-exclusive, worldwide,
      royalty-free patent license under the contributor's essential
      patent claims, to make, use, sell, offer for sale, import and
-     otherwise run, modify and propagate the contents of its
-     contributor version.
+     otherwise run, modify and propagate the contents of its contributor
+     version.
 
      In the following three paragraphs, a "patent license" is any
      express agreement or commitment, however denominated, not to
      enforce a patent (such as an express permission to practice a
-     patent or covenant not to sue for patent infringement).  To
-     "grant" such a patent license to a party means to make such an
-     agreement or commitment not to enforce a patent against the party.
+     patent or covenant not to sue for patent infringement).  To "grant"
+     such a patent license to a party means to make such an agreement or
+     commitment not to enforce a patent against the party.
 
      If you convey a covered work, knowingly relying on a patent
      license, and the Corresponding Source of the work is not available
@@ -598,36 +1776,35 @@ TERMS AND CONDITIONS
      conditioned on the non-exercise of one or more of the rights that
      are specifically granted under this License.  You may not convey a
      covered work if you are a party to an arrangement with a third
-     party that is in the business of distributing software, under
-     which you make payment to the third party based on the extent of
-     your activity of conveying the work, and under which the third
-     party grants, to any of the parties who would receive the covered
-     work from you, a discriminatory patent license (a) in connection
-     with copies of the covered work conveyed by you (or copies made
-     from those copies), or (b) primarily for and in connection with
-     specific products or compilations that contain the covered work,
-     unless you entered into that arrangement, or that patent license
-     was granted, prior to 28 March 2007.
+     party that is in the business of distributing software, under which
+     you make payment to the third party based on the extent of your
+     activity of conveying the work, and under which the third party
+     grants, to any of the parties who would receive the covered work
+     from you, a discriminatory patent license (a) in connection with
+     copies of the covered work conveyed by you (or copies made from
+     those copies), or (b) primarily for and in connection with specific
+     products or compilations that contain the covered work, unless you
+     entered into that arrangement, or that patent license was granted,
+     prior to 28 March 2007.
 
      Nothing in this License shall be construed as excluding or limiting
      any implied license or other defenses to infringement that may
      otherwise be available to you under applicable patent law.
 
- 12. No Surrender of Others' Freedom.
+  12. No Surrender of Others' Freedom.
 
-     If conditions are imposed on you (whether by court order,
-     agreement or otherwise) that contradict the conditions of this
-     License, they do not excuse you from the conditions of this
-     License.  If you cannot convey a covered work so as to satisfy
-     simultaneously your obligations under this License and any other
-     pertinent obligations, then as a consequence you may not convey it
-     at all.  For example, if you agree to terms that obligate you to
-     collect a royalty for further conveying from those to whom you
-     convey the Program, the only way you could satisfy both those
-     terms and this License would be to refrain entirely from conveying
-     the Program.
+     If conditions are imposed on you (whether by court order, agreement
+     or otherwise) that contradict the conditions of this License, they
+     do not excuse you from the conditions of this License.  If you
+     cannot convey a covered work so as to satisfy simultaneously your
+     obligations under this License and any other pertinent obligations,
+     then as a consequence you may not convey it at all.  For example,
+     if you agree to terms that obligate you to collect a royalty for
+     further conveying from those to whom you convey the Program, the
+     only way you could satisfy both those terms and this License would
+     be to refrain entirely from conveying the Program.
 
- 13. Use with the GNU Affero General Public License.
+  13. Use with the GNU Affero General Public License.
 
      Notwithstanding any other provision of this License, you have
      permission to link or combine any covered work with a work licensed
@@ -638,22 +1815,21 @@ TERMS AND CONDITIONS
      General Public License, section 13, concerning interaction through
      a network will apply to the combination as such.
 
- 14. Revised Versions of this License.
+  14. Revised Versions of this License.
 
      The Free Software Foundation may publish revised and/or new
-     versions of the GNU General Public License from time to time.
-     Such new versions will be similar in spirit to the present
-     version, but may differ in detail to address new problems or
-     concerns.
+     versions of the GNU General Public License from time to time.  Such
+     new versions will be similar in spirit to the present version, but
+     may differ in detail to address new problems or concerns.
 
      Each version is given a distinguishing version number.  If the
      Program specifies that a certain numbered version of the GNU
      General Public License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
-     that numbered version or of any later version published by the
-     Free Software Foundation.  If the Program does not specify a
-     version number of the GNU General Public License, you may choose
-     any version ever published by the Free Software Foundation.
+     that numbered version or of any later version published by the Free
+     Software Foundation.  If the Program does not specify a version
+     number of the GNU General Public License, you may choose any
+     version ever published by the Free Software Foundation.
 
      If the Program specifies that a proxy can decide which future
      versions of the GNU General Public License can be used, that
@@ -665,24 +1841,24 @@ TERMS AND CONDITIONS
      author or copyright holder as a result of your choosing to follow a
      later version.
 
- 15. Disclaimer of Warranty.
+  15. Disclaimer of Warranty.
 
      THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
+     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
      COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
      WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
+     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
      RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
      SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
      NECESSARY SERVICING, REPAIR OR CORRECTION.
 
- 16. Limitation of Liability.
+  16. Limitation of Liability.
 
      IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
-     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
-     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
      CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
      THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
      BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
@@ -690,7 +1866,7 @@ TERMS AND CONDITIONS
      PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
      THE POSSIBILITY OF SUCH DAMAGES.
 
- 17. Interpretation of Sections 15 and 16.
+  17. Interpretation of Sections 15 and 16.
 
      If the disclaimer of warranty and limitation of liability provided
      above cannot be given local legal effect according to their terms,
@@ -699,7 +1875,6 @@ TERMS AND CONDITIONS
      connection with the Program, unless a warranty or assumption of
      liability accompanies a copy of the Program in return for a fee.
 
-
 END OF TERMS AND CONDITIONS
 ===========================
 
@@ -730,7 +1905,7 @@ state the exclusion of warranty; and eac
      General Public License for more details.
 
      You should have received a copy of the GNU General Public License
-     along with this program.  If not, see `http://www.gnu.org/licenses/'.
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
    Also add information on how to contact you by electronic and paper
 mail.
@@ -739,11 +1914,11 @@ mail.
 notice like this when it starts in an interactive mode:
 
      PROGRAM Copyright (C) YEAR NAME OF AUTHOR
-     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
      This is free software, and you are welcome to redistribute it
-     under certain conditions; type `show c' for details.
+     under certain conditions; type 'show c' for details.
 
-   The hypothetical commands `show w' and `show c' should show the
+   The hypothetical commands 'show w' and 'show c' should show the
 appropriate parts of the General Public License.  Of course, your
 program's commands might be different; for a GUI interface, you would
 use an "about box".
@@ -751,14 +1926,14 @@ use an "about box".
    You should also get your employer (if you work as a programmer) or
 school, if any, to sign a "copyright disclaimer" for the program, if
 necessary.  For more information on this, and how to apply and follow
-the GNU GPL, see `http://www.gnu.org/licenses/'.
+the GNU GPL, see <http://www.gnu.org/licenses/>.
 
    The GNU General Public License does not permit incorporating your
 program into proprietary programs.  If your program is a subroutine
 library, you may consider it more useful to permit linking proprietary
 applications with the library.  If this is what you want to do, use the
 GNU Lesser General Public License instead of this License.  But first,
-please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
+please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
 
 
 File: gdb.info,  Node: GNU Free Documentation License,  Next: Concept Index,  Prev: Copying,  Up: Top
@@ -769,7 +1944,7 @@ Appendix M GNU Free Documentation Licens
                      Version 1.3, 3 November 2008
 
      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -794,21 +1969,21 @@ Appendix M GNU Free Documentation Licens
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -826,12 +2001,12 @@ Appendix M GNU Free Documentation Licens
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -842,27 +2017,27 @@ Appendix M GNU Free Documentation Licens
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -900,8 +2075,8 @@ Appendix M GNU Free Documentation Licens
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -915,12 +2090,11 @@ Appendix M GNU Free Documentation Licens
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -928,40 +2102,39 @@ Appendix M GNU Free Documentation Licens
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -991,31 +2164,30 @@ Appendix M GNU Free Documentation Licens
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -1028,11 +2200,11 @@ Appendix M GNU Free Documentation Licens
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -1041,15 +2213,15 @@ Appendix M GNU Free Documentation Licens
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -1059,8 +2231,8 @@ Appendix M GNU Free Documentation Licens
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -1087,20 +2259,20 @@ Appendix M GNU Free Documentation Licens
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     a storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -1145,8 +2317,8 @@ Appendix M GNU Free Documentation Licens
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -1158,33 +2330,33 @@ Appendix M GNU Free Documentation Licens
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
+  10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
      proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
+  11. RELICENSING
 
      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
@@ -1214,7 +2386,6 @@ Appendix M GNU Free Documentation Licens
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -1231,7 +2402,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -1242,9 +2413,9 @@ combination of the three, merge those tw
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 
 File: gdb.info,  Node: Concept Index,  Next: Command and Variable Index,  Prev: GNU Free Documentation License,  Up: Top
@@ -1260,72 +2431,72 @@ Concept Index
 * # in Modula-2:                         GDB/M2.             (line   18)
 * $:                                     Value History.      (line   13)
 * $$:                                    Value History.      (line   13)
-* $_ and info breakpoints:               Set Breaks.         (line  128)
+* $_ and info breakpoints:               Set Breaks.         (line  126)
 * $_ and info line:                      Machine Code.       (line   30)
-* $_, $__, and value history:            Memory.             (line  109)
-* --annotate:                            Mode Options.       (line  126)
-* --args:                                Mode Options.       (line  139)
+* $_, $__, and value history:            Memory.             (line  119)
+* --annotate:                            Mode Options.       (line  121)
+* --args:                                Mode Options.       (line  134)
 * --attach, gdbserver option:            Server.             (line   86)
-* --batch:                               Mode Options.       (line   46)
-* --batch-silent:                        Mode Options.       (line   64)
-* --baud:                                Mode Options.       (line  145)
-* --cd:                                  Mode Options.       (line  105)
+* --batch:                               Mode Options.       (line   44)
+* --batch-silent:                        Mode Options.       (line   62)
+* --baud:                                Mode Options.       (line  140)
+* --cd:                                  Mode Options.       (line  101)
 * --command:                             File Options.       (line   51)
-* --configuration:                       Mode Options.       (line  189)
+* --configuration:                       Mode Options.       (line  184)
 * --core:                                File Options.       (line   43)
-* --data-directory:                      Mode Options.       (line  110)
-* --debug, gdbserver option:             Server.             (line  166)
-* --debug-format, gdbserver option:      Server.             (line  172)
+* --data-directory:                      Mode Options.       (line  106)
+* --debug, gdbserver option:             Server.             (line  146)
+* --debug-format, gdbserver option:      Server.             (line  152)
 * --directory:                           File Options.       (line   77)
 * --eval-command:                        File Options.       (line   57)
 * --exec:                                File Options.       (line   35)
-* --fullname:                            Mode Options.       (line  115)
+* --fullname:                            Mode Options.       (line  111)
 * --init-command:                        File Options.       (line   67)
 * --init-eval-command:                   File Options.       (line   72)
-* --interpreter:                         Mode Options.       (line  164)
-* --multi, gdbserver option:             Server.             (line  119)
-* --nh:                                  Mode Options.       (line   36)
-* --nowindows:                           Mode Options.       (line   95)
+* --interpreter:                         Mode Options.       (line  159)
+* --multi, gdbserver option:             Connecting.         (line   45)
+* --nh:                                  Mode Options.       (line   34)
+* --nowindows:                           Mode Options.       (line   91)
 * --nx:                                  Mode Options.       (line   11)
-* --once, gdbserver option:              Server.             (line  151)
+* --once, gdbserver option:              Server.             (line  126)
 * --pid:                                 File Options.       (line   47)
-* --quiet:                               Mode Options.       (line   42)
+* --quiet:                               Mode Options.       (line   40)
 * --readnow:                             File Options.       (line   81)
-* --remote-debug, gdbserver option:      Server.             (line  167)
-* --return-child-result:                 Mode Options.       (line   76)
+* --remote-debug, gdbserver option:      Server.             (line  147)
+* --return-child-result:                 Mode Options.       (line   74)
 * --se:                                  File Options.       (line   39)
-* --silent:                              Mode Options.       (line   42)
-* --statistics:                          Mode Options.       (line  181)
+* --silent:                              Mode Options.       (line   40)
+* --statistics:                          Mode Options.       (line  176)
 * --symbols:                             File Options.       (line   31)
-* --tty:                                 Mode Options.       (line  154)
-* --tui:                                 Mode Options.       (line  157)
-* --version:                             Mode Options.       (line  185)
-* --windows:                             Mode Options.       (line  101)
+* --tty:                                 Mode Options.       (line  149)
+* --tui:                                 Mode Options.       (line  152)
+* --version:                             Mode Options.       (line  180)
+* --windows:                             Mode Options.       (line   97)
 * --with-gdb-datadir:                    Data Files.         (line   19)
-* --with-relocated-sources:              Source Path.        (line   89)
-* --with-sysroot:                        Files.              (line  460)
-* --wrapper, gdbserver option:           Server.             (line  188)
-* --write:                               Mode Options.       (line  176)
-* -b:                                    Mode Options.       (line  145)
+* --with-relocated-sources:              Source Path.        (line   88)
+* --with-sysroot:                        Files.              (line  439)
+* --wrapper, gdbserver option:           Server.             (line  165)
+* --write:                               Mode Options.       (line  171)
+* -b:                                    Mode Options.       (line  140)
 * -c:                                    File Options.       (line   43)
-* -D:                                    Mode Options.       (line  110)
 * -d:                                    File Options.       (line   77)
+* -D:                                    Mode Options.       (line  106)
 * -e:                                    File Options.       (line   35)
 * -ex:                                   File Options.       (line   57)
-* -f:                                    Mode Options.       (line  115)
+* -f:                                    Mode Options.       (line  111)
 * -iex:                                  File Options.       (line   72)
 * -info-gdb-mi-command:                  GDB/MI Support Commands.
                                                              (line   14)
 * -ix:                                   File Options.       (line   67)
-* -l:                                    Mode Options.       (line  149)
+* -l:                                    Mode Options.       (line  144)
 * -n:                                    Mode Options.       (line   11)
-* -nw:                                   Mode Options.       (line   95)
+* -nw:                                   Mode Options.       (line   91)
 * -p:                                    File Options.       (line   47)
-* -q:                                    Mode Options.       (line   42)
+* -q:                                    Mode Options.       (line   40)
 * -r:                                    File Options.       (line   81)
 * -s:                                    File Options.       (line   31)
-* -t:                                    Mode Options.       (line  154)
-* -w:                                    Mode Options.       (line  101)
+* -t:                                    Mode Options.       (line  149)
+* -w:                                    Mode Options.       (line   97)
 * -x:                                    File Options.       (line   51)
 * ., Modula-2 scope operator:            M2 Scope.           (line    6)
 * .build-id directory:                   Separate Debug Files.
@@ -1334,40 +2505,41 @@ Concept Index
                                                              (line    6)
 * .debug_gdb_scripts section:            dotdebug_gdb_scripts section.
                                                              (line    6)
+* .gdbinit:                              Startup.            (line   65)
 * .gdb_index section:                    Index Files.        (line    6)
 * .gdb_index section format:             Index Section Format.
                                                              (line    6)
-* .gdbinit:                              Startup.            (line   66)
 * .gnu_debugdata section:                MiniDebugInfo.      (line    6)
 * .gnu_debuglink sections:               Separate Debug Files.
-                                                             (line   80)
+                                                             (line   76)
 * .note.gnu.build-id sections:           Separate Debug Files.
-                                                             (line   98)
-* .o files, reading symbols from:        Files.              (line  133)
+                                                             (line   92)
+* .o files, reading symbols from:        Files.              (line  132)
 * /proc:                                 SVR4 Process Information.
                                                              (line    6)
 * <architecture>:                        Target Description Format.
-                                                             (line   73)
+                                                             (line   72)
 * <compatible>:                          Target Description Format.
-                                                             (line   96)
+                                                             (line   95)
 * <feature>:                             Target Description Format.
-                                                             (line  120)
+                                                             (line  119)
 * <flags>:                               Target Description Format.
-                                                             (line  186)
+                                                             (line  163)
 * <not saved> values:                    Registers.          (line  101)
 * <osabi>:                               Target Description Format.
-                                                             (line   83)
+                                                             (line   82)
 * <reg>:                                 Target Description Format.
-                                                             (line  199)
+                                                             (line  222)
 * <struct>:                              Target Description Format.
-                                                             (line  164)
+                                                             (line  163)
 * <union>:                               Target Description Format.
-                                                             (line  154)
+                                                             (line  153)
 * <vector>:                              Target Description Format.
-                                                             (line  147)
+                                                             (line  146)
 * ? packet:                              Packets.            (line   58)
 * _NSPrintForDebugger, and printing Objective-C objects: The Print Command with Objective-C.
                                                              (line   11)
+* {TYPE}:                                Expressions.        (line   41)
 * A packet:                              Packets.            (line   65)
 * AArch64 support:                       AArch64.            (line    6)
 * abbreviation:                          Command Syntax.     (line   13)
@@ -1375,26 +2547,26 @@ Concept Index
                                                              (line    6)
 * active targets:                        Active Targets.     (line    6)
 * Ada:                                   Ada.                (line    6)
-* Ada exception catching:                Set Catchpoints.    (line   67)
+* Ada exception catching:                Set Catchpoints.    (line   66)
 * Ada mode, general:                     Ada Mode Intro.     (line    6)
-* Ada task switching:                    Ada Tasks.          (line  115)
+* Ada task switching:                    Ada Tasks.          (line  114)
 * Ada tasking and core file debugging:   Ada Tasks and Core Files.
                                                              (line    6)
 * Ada, deviations from:                  Additions to Ada.   (line    6)
 * Ada, omissions from:                   Omissions from Ada. (line    6)
 * Ada, problems:                         Ada Glitches.       (line    6)
 * Ada, tasking:                          Ada Tasks.          (line    6)
-* add new commands for external monitor: Connecting.         (line  109)
+* add new commands for external monitor: Connecting.         (line  221)
+* address locations:                     Address Locations.  (line    6)
 * address of a symbol:                   Symbols.            (line   74)
 * address size for remote targets:       Remote Configuration.
                                                              (line   12)
-* addressable memory unit:               Memory.             (line  123)
-* ADP (Angel Debugger Protocol) logging: ARM.                (line   89)
+* addressable memory unit:               Memory.             (line  133)
 * aggregates (Ada):                      Omissions from Ada. (line   44)
-* AIX shared library debugging:          Debugging Output.   (line   36)
-* AIX threads:                           Debugging Output.   (line   44)
+* AIX shared library debugging:          Debugging Output.   (line   30)
+* AIX threads:                           Debugging Output.   (line   36)
 * aliases for commands:                  Aliases.            (line    6)
-* alignment of remote memory accesses:   Packets.            (line  252)
+* alignment of remote memory accesses:   Packets.            (line  247)
 * all-stop mode:                         All-Stop Mode.      (line    6)
 * Alpha stack:                           MIPS.               (line    6)
 * ambiguous expressions:                 Ambiguous Expressions.
@@ -1408,18 +2580,22 @@ Concept Index
                                                              (line    6)
 * annotations for source display:        Source Annotations. (line    6)
 * append data to a file:                 Dump/Restore Files. (line    6)
-* apply command to several threads:      Threads.            (line  122)
-* architecture debugging info:           Debugging Output.   (line   26)
+* apply command to several threads:      Threads.            (line  187)
+* ARC EM:                                ARC.                (line    6)
+* ARC HS:                                ARC.                (line    6)
+* ARC specific commands:                 ARC.                (line    6)
+* ARC600:                                ARC.                (line    6)
+* ARC700:                                ARC.                (line    6)
+* architecture debugging info:           Debugging Output.   (line   23)
 * argument count in user-defined commands: Define.           (line   25)
 * arguments (to your program):           Arguments.          (line    6)
 * arguments, to gdbserver:               Server.             (line   34)
 * arguments, to user-defined commands:   Define.             (line    6)
-* ARM 32-bit mode:                       ARM.                (line   25)
-* ARM AArch64:                           Debugging Output.   (line   18)
-* ARM RDI:                               ARM.                (line    6)
+* ARM 32-bit mode:                       ARM.                (line   16)
+* ARM AArch64:                           Debugging Output.   (line   17)
 * array aggregates (Ada):                Omissions from Ada. (line   44)
 * arrays:                                Arrays.             (line    6)
-* arrays in expressions:                 Expressions.        (line   14)
+* arrays in expressions:                 Expressions.        (line   13)
 * artificial array:                      Arrays.             (line    6)
 * assembly instructions:                 Machine Code.       (line   36)
 * assignment:                            Assignment.         (line    6)
@@ -1430,8 +2606,8 @@ Concept Index
 * asynchronous execution:                Background Execution.
                                                              (line    6)
 * asynchronous execution, and process record and replay: Process Record and Replay.
-                                                             (line   92)
-* AT&T disassembly flavor:               Machine Code.       (line  132)
+                                                             (line   95)
+* AT&T disassembly flavor:               Machine Code.       (line  230)
 * attach:                                Attach.             (line    6)
 * attach to a program, gdbserver:        Server.             (line   86)
 * auto-loading:                          Auto-loading.       (line    6)
@@ -1448,79 +2624,81 @@ Concept Index
 * auto-retry, for remote TCP target:     Remote Configuration.
                                                              (line  124)
 * automatic display:                     Auto Display.       (line    6)
-* automatic hardware breakpoints:        Set Breaks.         (line  297)
+* automatic hardware breakpoints:        Set Breaks.         (line  288)
 * automatic overlay debugging:           Automatic Overlay Debugging.
                                                              (line    6)
 * automatic thread selection:            All-Stop Mode.      (line   28)
 * auxiliary vector:                      OS Information.     (line    9)
 * AVR:                                   AVR.                (line    6)
-* B packet:                              Packets.            (line   92)
-* b packet:                              Packets.            (line   77)
+* b packet:                              Packets.            (line   76)
+* B packet:                              Packets.            (line   91)
 * background execution:                  Background Execution.
                                                              (line    6)
 * backtrace beyond main function:        Backtrace.          (line  105)
 * backtrace limit:                       Backtrace.          (line  142)
-* base name differences:                 Files.              (line  527)
+* base name differences:                 Files.              (line  506)
 * baud rate for remote targets:          Remote Configuration.
                                                              (line   21)
-* bc packet:                             Packets.            (line   97)
+* bc packet:                             Packets.            (line   96)
 * bcache statistics:                     Maintenance Commands.
-                                                             (line  321)
+                                                             (line  311)
 * bits in remote address:                Remote Configuration.
                                                              (line   12)
 * blocks in guile:                       Blocks In Guile.    (line    6)
 * blocks in python:                      Blocks In Python.   (line    6)
 * bookmark:                              Checkpoint/Restart. (line    6)
+* boundary violations, Intel MPX:        Signals.            (line  197)
 * branch trace configuration format:     Branch Trace Configuration Format.
                                                              (line    6)
 * branch trace format:                   Branch Trace Format.
                                                              (line    6)
 * branch trace store:                    Process Record and Replay.
-                                                             (line   61)
+                                                             (line   64)
 * break in overloaded functions:         Debugging C Plus Plus.
                                                              (line    9)
-* break on a system call.:               Set Catchpoints.    (line   96)
-* break on fork/exec:                    Set Catchpoints.    (line   91)
+* break on a system call.:               Set Catchpoints.    (line   94)
+* break on fork/exec:                    Set Catchpoints.    (line   90)
 * BREAK signal instead of Ctrl-C:        Remote Configuration.
                                                              (line   36)
 * breakpoint address adjusted:           Breakpoint-related Warnings.
                                                              (line    6)
-* breakpoint at static probe point:      Specify Location.   (line   91)
+* breakpoint at static probe point:      Linespec Locations. (line   50)
 * breakpoint commands:                   Break Commands.     (line    6)
 * breakpoint commands for GDB/MI:        GDB/MI Breakpoint Commands.
                                                              (line    6)
 * breakpoint commands, in remote protocol: General Query Packets.
-                                                             (line  755)
+                                                             (line  872)
 * breakpoint conditions:                 Conditions.         (line    6)
 * breakpoint kinds, ARM:                 ARM Breakpoint Kinds.
                                                              (line    6)
 * breakpoint kinds, MIPS:                MIPS Breakpoint Kinds.
                                                              (line    6)
-* breakpoint numbers:                    Breakpoints.        (line   41)
-* breakpoint on events:                  Breakpoints.        (line   33)
-* breakpoint on memory address:          Breakpoints.        (line   20)
-* breakpoint on variable modification:   Breakpoints.        (line   20)
-* breakpoint ranges:                     Breakpoints.        (line   48)
+* breakpoint lists:                      Breakpoints.        (line   45)
+* breakpoint numbers:                    Breakpoints.        (line   38)
+* breakpoint on events:                  Breakpoints.        (line   30)
+* breakpoint on memory address:          Breakpoints.        (line   17)
+* breakpoint on variable modification:   Breakpoints.        (line   17)
+* breakpoint ranges:                     Breakpoints.        (line   45)
 * breakpoint subroutine, remote:         Stub Contents.      (line   31)
 * breakpointing Ada elaboration code:    Stopping Before Main Program.
                                                              (line    6)
 * breakpoints:                           Breakpoints.        (line    6)
-* breakpoints and tasks, in Ada:         Ada Tasks.          (line  135)
+* breakpoints and tasks, in Ada:         Ada Tasks.          (line  134)
 * breakpoints and threads:               Thread-Specific Breakpoints.
                                                              (line   10)
-* breakpoints at functions matching a regexp: Set Breaks.    (line   92)
+* breakpoints at functions matching a regexp: Set Breaks.    (line   90)
 * breakpoints in guile:                  Breakpoints In Guile.
                                                              (line    6)
-* breakpoints in overlays:               Overlay Commands.   (line   93)
+* breakpoints in overlays:               Overlay Commands.   (line   91)
 * breakpoints in python:                 Breakpoints In Python.
                                                              (line    6)
-* breakpoints, multiple locations:       Set Breaks.         (line  201)
-* bs packet:                             Packets.            (line  103)
+* breakpoints, multiple locations:       Set Breaks.         (line  193)
+* bs packet:                             Packets.            (line  102)
 * bug criteria:                          Bug Criteria.       (line    6)
 * bug reports:                           Bug Reporting.      (line    6)
 * bugs in GDB:                           GDB Bugs.           (line    6)
 * build ID sections:                     Separate Debug Files.
-                                                             (line   98)
+                                                             (line   92)
 * build ID, and separate debugging files: Separate Debug Files.
                                                              (line    6)
 * building GDB, requirements for:        Requirements.       (line    6)
@@ -1532,8 +2710,8 @@ Concept Index
 * C and C++ constants:                   C Constants.        (line    6)
 * C and C++ defaults:                    C Defaults.         (line    6)
 * C and C++ operators:                   C Operators.        (line    6)
-* C packet:                              Packets.            (line  119)
-* c packet:                              Packets.            (line  110)
+* c packet:                              Packets.            (line  109)
+* C packet:                              Packets.            (line  118)
 * C++:                                   C.                  (line   10)
 * C++ compilers:                         C Plus Plus Expressions.
                                                              (line    8)
@@ -1541,13 +2719,15 @@ Concept Index
                                                              (line   36)
 * C++ exception handling:                Debugging C Plus Plus.
                                                              (line   20)
-* C++ overload debugging info:           Debugging Output.   (line  183)
+* C++ overload debugging info:           Debugging Output.   (line  143)
 * C++ scope resolution:                  Variables.          (line   90)
-* C++ symbol decoding style:             Print Settings.     (line  429)
+* C++ symbol decoding style:             Print Settings.     (line  427)
 * C++ symbol display:                    Debugging C Plus Plus.
                                                              (line   40)
 * caching data of targets:               Caching Target Data.
                                                              (line    6)
+* caching of bfd objects:                File Caching.       (line    6)
+* caching of opened files:               File Caching.       (line    6)
 * call dummy stack unwinding:            Calling.            (line   36)
 * call dummy stack unwinding on unhandled exception.: Calling.
                                                              (line   47)
@@ -1561,30 +2741,32 @@ Concept Index
 * calling make:                          Shell Commands.     (line   21)
 * case sensitivity in symbol names:      Symbols.            (line   27)
 * case-insensitive symbol names:         Symbols.            (line   27)
-* casts, in expressions:                 Expressions.        (line   28)
-* casts, to view memory:                 Expressions.        (line   43)
-* catch Ada exceptions:                  Set Catchpoints.    (line   67)
-* catchpoints:                           Breakpoints.        (line   33)
+* casts, in expressions:                 Expressions.        (line   26)
+* casts, to view memory:                 Expressions.        (line   41)
+* catch Ada exceptions:                  Set Catchpoints.    (line   66)
+* catch syscalls from inferior, remote request: General Query Packets.
+                                                             (line  278)
+* catchpoints:                           Breakpoints.        (line   30)
 * catchpoints, setting:                  Set Catchpoints.    (line    6)
 * Cell Broadband Engine:                 SPU.                (line    6)
 * change working directory:              Working Directory.  (line   16)
 * character sets:                        Character Sets.     (line    6)
 * charset:                               Character Sets.     (line    6)
 * checkpoint:                            Checkpoint/Restart. (line    6)
-* checkpoints and process id:            Checkpoint/Restart. (line   80)
-* checks, range:                         Type Checking.      (line   45)
-* checks, type:                          Checks.             (line   24)
-* checksum, for GDB remote:              Overview.           (line   20)
+* checkpoints and process id:            Checkpoint/Restart. (line   76)
+* checks, range:                         Type Checking.      (line   44)
+* checks, type:                          Checks.             (line   23)
+* checksum, for GDB remote:              Overview.           (line   21)
 * choosing target byte order:            Byte Order.         (line    6)
 * circular trace buffer:                 Starting and Stopping Trace Experiments.
-                                                             (line   81)
+                                                             (line   80)
 * clearing breakpoints, watchpoints, catchpoints: Delete Breaks.
                                                              (line    6)
 * close, file-i/o system call:           close.              (line    6)
 * closest symbol and offset for an address: Symbols.         (line   84)
 * code address and its source line:      Machine Code.       (line   25)
-* code compression, MIPS:                MIPS.               (line   55)
-* COFF/PE exported symbols:              Debugging Output.   (line   62)
+* code compression, MIPS:                MIPS.               (line   49)
+* COFF/PE exported symbols:              Debugging Output.   (line   50)
 * collected data discarded:              Starting and Stopping Trace Experiments.
                                                              (line    6)
 * colon, doubled as scope operator:      M2 Scope.           (line    6)
@@ -1596,40 +2778,39 @@ Concept Index
 * command hooks:                         Hooks.              (line    6)
 * command interpreters:                  Interpreters.       (line    6)
 * command line editing:                  Editing.            (line    6)
-* command scripts, debugging:            Messages/Warnings.  (line   67)
-* command tracing:                       Messages/Warnings.  (line   62)
+* command scripts, debugging:            Messages/Warnings.  (line   65)
+* command tracing:                       Messages/Warnings.  (line   60)
 * commands for C++:                      Debugging C Plus Plus.
                                                              (line    6)
 * commands in guile:                     Commands In Guile.  (line    6)
 * commands in python:                    Commands In Python. (line    6)
 * commands to access guile:              Guile Commands.     (line    6)
 * commands to access python:             Python Commands.    (line    6)
-* comment:                               Command Syntax.     (line   38)
+* comment:                               Command Syntax.     (line   37)
 * COMMON blocks, Fortran:                Special Fortran Commands.
                                                              (line    9)
 * common targets:                        Target Commands.    (line   46)
 * compatibility, GDB/MI and CLI:         GDB/MI Compatibility with CLI.
                                                              (line    6)
-* compilation directory:                 Source Path.        (line  108)
+* compilation directory:                 Source Path.        (line  106)
 * compile command debugging info:        Compiling and Injecting Code.
                                                              (line   81)
 * compile command options override:      Compiling and Injecting Code.
                                                              (line  116)
 * compiling code:                        Compiling and Injecting Code.
                                                              (line    6)
-* compiling, on Sparclet:                Sparclet.           (line   16)
 * completion:                            Completion.         (line    6)
 * completion of Guile commands:          Commands In Guile.  (line  100)
-* completion of Python commands:         Commands In Python. (line   72)
-* completion of quoted strings:          Completion.         (line   83)
-* completion of structure field names:   Completion.         (line  122)
-* completion of union field names:       Completion.         (line  122)
-* compressed debug sections:             Requirements.       (line   45)
+* completion of Python commands:         Commands In Python. (line   70)
+* completion of quoted strings:          Completion.         (line   82)
+* completion of structure field names:   Completion.         (line  120)
+* completion of union field names:       Completion.         (line  120)
+* compressed debug sections:             Requirements.       (line   39)
 * conditional breakpoints:               Conditions.         (line    6)
 * conditional tracepoints:               Tracepoint Conditions.
                                                              (line    6)
 * configuring GDB:                       Running Configure.  (line    6)
-* confirmation:                          Messages/Warnings.  (line   50)
+* confirmation:                          Messages/Warnings.  (line   49)
 * connection timeout, for remote TCP target: Remote Configuration.
                                                              (line  140)
 * console i/o as part of file-i/o:       Console I/O.        (line    6)
@@ -1655,42 +2836,41 @@ Concept Index
 * core dump file target:                 Target Commands.    (line   54)
 * crash of debugger:                     Bug Criteria.       (line    9)
 * CRC algorithm definition:              Separate Debug Files.
-                                                             (line  142)
+                                                             (line  137)
 * CRC of memory block, remote request:   General Query Packets.
-                                                             (line   68)
+                                                             (line   65)
 * CRIS:                                  CRIS.               (line    6)
 * CRIS mode:                             CRIS.               (line   26)
 * CRIS version:                          CRIS.               (line   10)
 * Ctrl-BREAK, MS-Windows:                Cygwin Native.      (line    9)
 * ctrl-c message, in file-i/o protocol:  The Ctrl-C Message. (line    6)
-* current Ada task ID:                   Ada Tasks.          (line  105)
-* current directory:                     Source Path.        (line  108)
+* current Ada task ID:                   Ada Tasks.          (line  104)
+* current directory:                     Source Path.        (line  106)
 * current Go package:                    Go.                 (line   11)
-* current stack frame:                   Frames.             (line   45)
-* current thread:                        Threads.            (line   45)
+* current thread:                        Threads.            (line   29)
 * current thread, remote request:        General Query Packets.
-                                                             (line   57)
+                                                             (line   55)
 * custom JIT debug info:                 Custom Debug Info.  (line    6)
-* Cygwin DLL, debugging:                 Cygwin Native.      (line   35)
+* Cygwin DLL, debugging:                 Cygwin Native.      (line   60)
 * Cygwin-specific commands:              Cygwin Native.      (line    6)
 * D:                                     D.                  (line    6)
-* D packet:                              Packets.            (line  135)
-* d packet:                              Packets.            (line  128)
+* d packet:                              Packets.            (line  127)
+* D packet:                              Packets.            (line  134)
 * Darwin:                                Darwin.             (line    6)
-* data breakpoints:                      Breakpoints.        (line   20)
+* data breakpoints:                      Breakpoints.        (line   17)
 * data manipulation, in GDB/MI:          GDB/MI Data Manipulation.
                                                              (line    6)
 * dcache line-size:                      Caching Target Data.
                                                              (line   60)
 * dcache size:                           Caching Target Data.
                                                              (line   57)
-* dead names, GNU Hurd:                  Hurd Native.        (line   85)
-* debug expression parser:               Debugging Output.   (line  189)
+* dead names, GNU Hurd:                  Hurd Native.        (line   84)
+* debug expression parser:               Debugging Output.   (line  148)
 * debug formats and C++:                 C Plus Plus Expressions.
                                                              (line    8)
 * debug link sections:                   Separate Debug Files.
-                                                             (line   80)
-* debug remote protocol:                 Debugging Output.   (line  198)
+                                                             (line   76)
+* debug remote protocol:                 Debugging Output.   (line  155)
 * debugger crash:                        Bug Criteria.       (line    9)
 * debugging agent:                       In-Process Agent.   (line    6)
 * debugging C++ programs:                C Plus Plus Expressions.
@@ -1699,70 +2879,73 @@ Concept Index
                                                              (line    6)
 * debugging information in separate files: Separate Debug Files.
                                                              (line    6)
-* debugging libthread_db:                Threads.            (line  218)
+* debugging libthread_db:                Threads.            (line  280)
 * debugging multiple processes:          Forks.              (line   55)
 * debugging optimized code:              Optimized Code.     (line    6)
 * debugging stub, example:               Remote Stub.        (line    6)
 * debugging target:                      Targets.            (line    6)
-* debugging the Cygwin DLL:              Cygwin Native.      (line   35)
+* debugging the Cygwin DLL:              Cygwin Native.      (line   60)
 * decimal floating point format:         Decimal Floating Point.
                                                              (line    6)
-* default collection action:             Tracepoint Actions. (line  135)
+* default collection action:             Tracepoint Actions. (line  142)
 * default data directory:                Data Files.         (line   19)
-* default source path substitution:      Source Path.        (line   89)
-* default system root:                   Files.              (line  460)
+* default source path substitution:      Source Path.        (line   88)
+* default system root:                   Files.              (line  439)
 * define trace state variable, remote request: Tracepoint Packets.
-                                                             (line  128)
+                                                             (line  121)
 * defining macros interactively:         Macros.             (line   59)
 * definition of a macro, showing:        Macros.             (line   47)
 * delete breakpoints:                    Delete Breaks.      (line   41)
 * deleting breakpoints, watchpoints, catchpoints: Delete Breaks.
                                                              (line    6)
 * deliver a signal to a program:         Signaling.          (line    6)
-* demangle:                              Symbols.            (line  104)
+* demangle:                              Symbols.            (line  103)
 * demangler crashes:                     Maintenance Commands.
-                                                             (line  157)
-* demangling C++ names:                  Print Settings.     (line  410)
+                                                             (line  146)
+* demangler crashes <1>:                 Maintenance Commands.
+                                                             (line  173)
+* demangler crashes <2>:                 Maintenance Commands.
+                                                             (line  197)
+* demangling C++ names:                  Print Settings.     (line  408)
 * deprecated commands:                   Maintenance Commands.
-                                                             (line  171)
-* derived type of an object, printing:   Print Settings.     (line  462)
+                                                             (line  160)
+* derived type of an object, printing:   Print Settings.     (line  460)
 * descriptor tables display:             DJGPP Native.       (line   24)
-* detach from task, GNU Hurd:            Hurd Native.        (line   60)
-* detach from thread, GNU Hurd:          Hurd Native.        (line  110)
-* direct memory access (DMA) on MS-DOS:  DJGPP Native.       (line   75)
+* detach from task, GNU Hurd:            Hurd Native.        (line   59)
+* detach from thread, GNU Hurd:          Hurd Native.        (line  109)
+* direct memory access (DMA) on MS-DOS:  DJGPP Native.       (line   74)
 * directories for source files:          Source Path.        (line    6)
-* directory, compilation:                Source Path.        (line  108)
-* directory, current:                    Source Path.        (line  108)
+* directory, compilation:                Source Path.        (line  106)
+* directory, current:                    Source Path.        (line  106)
 * disable address space randomization, remote request: General Query Packets.
-                                                             (line   88)
+                                                             (line   84)
+* disassembler options:                  Machine Code.       (line  215)
 * disconnected tracing:                  Starting and Stopping Trace Experiments.
                                                              (line   45)
-* displaced stepping debugging info:     Debugging Output.   (line   95)
+* displaced stepping debugging info:     Debugging Output.   (line   75)
 * displaced stepping support:            Maintenance Commands.
-                                                             (line  123)
+                                                             (line  112)
 * displaced stepping, and process record and replay: Process Record and Replay.
-                                                             (line   87)
-* display command history:               Command History.    (line   97)
-* display derived types:                 Print Settings.     (line  462)
+                                                             (line   90)
+* display command history:               Command History.    (line   95)
+* display derived types:                 Print Settings.     (line  460)
 * display disabled out of scope:         Auto Display.       (line   86)
-* display GDB copyright:                 Help.               (line  137)
+* display GDB copyright:                 Help.               (line  138)
 * display of expressions:                Auto Display.       (line    6)
-* display remote monitor communications: Target Commands.    (line  108)
-* display remote packets:                Debugging Output.   (line  198)
+* display remote monitor communications: Target Commands.    (line  107)
+* display remote packets:                Debugging Output.   (line  155)
 * DJGPP debugging:                       DJGPP Native.       (line    6)
 * DLLs with no debugging symbols:        Non-debug DLL Symbols.
                                                              (line    6)
-* do not print frame argument values:    Print Settings.     (line  155)
+* do not print frame argument values:    Print Settings.     (line  154)
 * documentation:                         Formatting Documentation.
                                                              (line   22)
-* don't repeat command:                  Define.             (line   62)
-* don't repeat Guile command:            Commands In Guile.  (line   66)
-* don't repeat Python command:           Commands In Python. (line   43)
-* DOS file-name semantics of file names.: Files.             (line  483)
-* DOS serial data link, remote debugging: DJGPP Native.      (line  121)
-* DOS serial port status:                DJGPP Native.       (line  142)
-* download server address (M32R):        M32R/D.             (line   27)
-* download to Sparclet:                  Sparclet Download.  (line    6)
+* don't repeat command:                  Define.             (line   74)
+* don't repeat Guile command:            Commands In Guile.  (line   67)
+* don't repeat Python command:           Commands In Python. (line   42)
+* DOS file-name semantics of file names.: Files.             (line  462)
+* DOS serial data link, remote debugging: DJGPP Native.      (line  118)
+* DOS serial port status:                DJGPP Native.       (line  139)
 * DPMI:                                  DJGPP Native.       (line    6)
 * dprintf:                               Dynamic Printf.     (line    6)
 * dump all data collected at tracepoint: tdump.              (line    6)
@@ -1772,25 +2955,25 @@ Concept Index
 * dump/restore files:                    Dump/Restore Files. (line    6)
 * DVC register:                          PowerPC Embedded.   (line    6)
 * DWARF compilation units cache:         Maintenance Commands.
-                                                             (line  379)
-* DWARF DIEs:                            Debugging Output.   (line   70)
-* DWARF Line Tables:                     Debugging Output.   (line   77)
-* DWARF Reading:                         Debugging Output.   (line   86)
+                                                             (line  371)
+* DWARF DIEs:                            Debugging Output.   (line   56)
+* DWARF Line Tables:                     Debugging Output.   (line   61)
+* DWARF Reading:                         Debugging Output.   (line   68)
 * DWARF-2 CFI and CRIS:                  CRIS.               (line   18)
-* dynamic linking:                       Files.              (line  113)
+* dynamic linking:                       Files.              (line  112)
 * dynamic printf:                        Dynamic Printf.     (line    6)
 * dynamic varobj:                        GDB/MI Variable Objects.
-                                                             (line  164)
+                                                             (line  166)
 * editing:                               Editing.            (line   15)
 * editing command lines:                 Readline Bare Essentials.
                                                              (line    6)
 * editing source files:                  Edit.               (line    6)
-* eight-bit characters in strings:       Print Settings.     (line  355)
-* elaboration phase:                     Starting.           (line   91)
+* eight-bit characters in strings:       Print Settings.     (line  353)
+* elaboration phase:                     Starting.           (line   89)
 * ELinOS system-wide configuration script: System-wide Configuration Scripts.
-                                                             (line   14)
+                                                             (line   15)
 * Emacs:                                 Emacs.              (line    6)
-* empty response, for unsupported packets: Overview.         (line   96)
+* empty response, for unsupported packets: Overview.         (line   97)
 * enable/disable a breakpoint:           Disabling.          (line    6)
 * enabling and disabling probes:         Static Probe Points.
                                                              (line   52)
@@ -1798,7 +2981,7 @@ Concept Index
 * environment (of your program):         Environment.        (line    6)
 * errno values, in file-i/o protocol:    Errno Values.       (line    6)
 * error on valid input:                  Bug Criteria.       (line   12)
-* event debugging info:                  Debugging Output.   (line  103)
+* event debugging info:                  Debugging Output.   (line   81)
 * event designators:                     Event Designators.  (line    6)
 * event handling:                        Set Catchpoints.    (line    6)
 * examine process image:                 SVR4 Process Information.
@@ -1809,45 +2992,47 @@ Concept Index
 * exceptions, guile:                     Guile Exception Handling.
                                                              (line    6)
 * exceptions, python:                    Exception Handling. (line    6)
+* exec events, remote reply:             Stop Reply Packets. (line  141)
 * executable file:                       Files.              (line   16)
 * executable file target:                Target Commands.    (line   50)
 * executable file, for remote target:    Remote Configuration.
                                                              (line   95)
 * execute commands from a file:          Command Files.      (line   17)
-* execute forward or backward in time:   Reverse Execution.  (line   87)
+* execute forward or backward in time:   Reverse Execution.  (line   86)
 * execute remote command, remote request: General Query Packets.
-                                                             (line  351)
+                                                             (line  413)
 * execution, foreground, background and asynchronous: Background Execution.
                                                              (line    6)
 * exiting GDB:                           Quitting GDB.       (line    6)
 * expand macro once:                     Macros.             (line   38)
 * expanding preprocessor macros:         Macros.             (line   29)
+* explicit locations:                    Explicit Locations. (line    6)
 * explore type:                          Data.               (line  145)
 * explore value:                         Data.               (line  138)
 * exploring hierarchical data structures: Data.              (line   36)
-* expression debugging info:             Debugging Output.   (line  110)
-* expression parser, debugging info:     Debugging Output.   (line  189)
+* expression debugging info:             Debugging Output.   (line   86)
+* expression parser, debugging info:     Debugging Output.   (line  148)
 * expressions:                           Expressions.        (line    6)
 * expressions in Ada:                    Ada.                (line   11)
 * expressions in C or C++:               C.                  (line    6)
 * expressions in C++:                    C Plus Plus Expressions.
                                                              (line    6)
 * expressions in Modula-2:               Modula-2.           (line   12)
-* extend GDB for remote targets:         Connecting.         (line  109)
+* extend GDB for remote targets:         Connecting.         (line  221)
 * extending GDB:                         Extending GDB.      (line    6)
 * extra signal information:              Signals.            (line  156)
-* F packet:                              Packets.            (line  152)
+* F packet:                              Packets.            (line  150)
 * F reply packet:                        The F Reply Packet. (line    6)
 * F request packet:                      The F Request Packet.
                                                              (line    6)
 * fast tracepoints:                      Set Tracepoints.    (line   24)
 * fast tracepoints, setting:             Create and Delete Tracepoints.
-                                                             (line   51)
+                                                             (line   50)
 * fatal signal:                          Bug Criteria.       (line    9)
 * fatal signals:                         Signals.            (line   15)
 * features of the remote protocol:       General Query Packets.
-                                                             (line  411)
-* file name canonicalization:            Files.              (line  527)
+                                                             (line  466)
+* file name canonicalization:            Files.              (line  506)
 * file transfer:                         File Transfer.      (line    6)
 * file transfer, remote protocol:        Host I/O Packets.   (line    6)
 * file-i/o examples:                     File-I/O Examples.  (line    6)
@@ -1858,19 +3043,18 @@ Concept Index
 * file-i/o request packet:               The F Request Packet.
                                                              (line    6)
 * filename-display:                      Backtrace.          (line  152)
-* find downloadable SREC files (M32R):   M32R/D.             (line   15)
 * find trace snapshot:                   tfind.              (line    6)
-* flinching:                             Messages/Warnings.  (line   50)
+* flinching:                             Messages/Warnings.  (line   49)
 * float promotion:                       ABI.                (line   34)
 * floating point:                        Floating Point Hardware.
                                                              (line    6)
 * floating point registers:              Registers.          (line   15)
-* floating point, MIPS remote:           MIPS Embedded.      (line   60)
-* focus of debugging:                    Threads.            (line   45)
-* foo:                                   Symbol Errors.      (line   50)
+* floating point, MIPS remote:           MIPS Embedded.      (line   13)
+* focus of debugging:                    Threads.            (line   29)
+* foo:                                   Symbol Errors.      (line   54)
 * foreground execution:                  Background Execution.
                                                              (line    6)
-* fork events, remote reply:             Stop Reply Packets. (line   96)
+* fork events, remote reply:             Stop Reply Packets. (line  104)
 * fork, debugging programs which call:   Forks.              (line    6)
 * format options:                        Print Settings.     (line    6)
 * formatted output:                      Output Formats.     (line    6)
@@ -1878,8 +3062,8 @@ Concept Index
 * Fortran Defaults:                      Fortran Defaults.   (line    6)
 * Fortran operators and expressions:     Fortran Operators.  (line    6)
 * Fortran-specific support in GDB:       Fortran.            (line    6)
-* FR-V shared-library debugging:         Debugging Output.   (line  216)
-* frame debugging info:                  Debugging Output.   (line  118)
+* FR-V shared-library debugging:         Debugging Output.   (line  168)
+* frame debugging info:                  Debugging Output.   (line   97)
 * frame decorator api:                   Frame Decorator API.
                                                              (line    6)
 * frame filters api:                     Frame Filter API.   (line    6)
@@ -1891,30 +3075,31 @@ Concept Index
 * frames in guile:                       Frames In Guile.    (line    6)
 * frames in python:                      Frames In Python.   (line    6)
 * free memory information (MS-DOS):      DJGPP Native.       (line   19)
+* FreeBSD LWP debug messages:            Debugging Output.   (line   92)
 * fstat, file-i/o system call:           stat/fstat.         (line    6)
-* Fujitsu:                               Remote Stub.        (line   69)
-* full symbol tables, listing GDB's internal: Symbols.       (line  401)
+* Fujitsu:                               Remote Stub.        (line   68)
+* full symbol tables, listing GDB's internal: Symbols.       (line  398)
 * function call arguments, optimized out: Backtrace.         (line   83)
 * function entry/exit, wrong values of variables: Variables. (line  106)
 * functions without line info, and stepping: Continuing and Stepping.
-                                                             (line   94)
-* G packet:                              Packets.            (line  186)
-* g packet:                              Packets.            (line  157)
+                                                             (line   92)
+* g packet:                              Packets.            (line  155)
+* G packet:                              Packets.            (line  183)
 * g++, GNU C++ compiler:                 C.                  (line   10)
 * garbled pointers:                      DJGPP Native.       (line   42)
 * GCC and C++:                           C Plus Plus Expressions.
                                                              (line    8)
 * GDB bugs, reporting:                   Bug Reporting.      (line    6)
 * GDB internal error:                    Maintenance Commands.
-                                                             (line  207)
+                                                             (line  197)
 * gdb module:                            Basic Python.       (line   28)
 * gdb objects:                           GDB Scheme Data Types.
                                                              (line    6)
 * GDB reference card:                    Formatting Documentation.
                                                              (line    6)
 * GDB startup:                           Startup.            (line    6)
-* GDB version number:                    Help.               (line  127)
-* gdb.ini:                               Startup.            (line   66)
+* GDB version number:                    Help.               (line  128)
+* gdb.ini:                               Startup.            (line   65)
 * gdb.printing:                          gdb.printing.       (line    6)
 * gdb.prompt:                            gdb.prompt.         (line    6)
 * gdb.types:                             gdb.types.          (line    6)
@@ -1943,37 +3128,42 @@ Concept Index
                                                              (line    6)
 * GDB/MI, stream records:                GDB/MI Stream Records.
                                                              (line    6)
-* gdbarch debugging info:                Debugging Output.   (line   26)
+* gdbarch debugging info:                Debugging Output.   (line   23)
 * GDBHISTFILE, environment variable:     Command History.    (line   26)
 * GDBHISTSIZE, environment variable:     Command History.    (line   45)
 * gdbserver, command-line arguments:     Server.             (line   34)
-* gdbserver, multiple processes:         Server.             (line  106)
-* gdbserver, search path for libthread_db: Server.           (line  271)
+* gdbserver, connecting:                 Connecting.         (line    6)
+* gdbserver, search path for libthread_db: Server.           (line  242)
+* gdbserver, target extended-remote mode: Connecting.        (line    6)
+* gdbserver, target remote mode:         Connecting.         (line    6)
+* gdbserver, types of connections:       Connecting.         (line    6)
 * GDT:                                   DJGPP Native.       (line   24)
 * get thread information block address:  General Query Packets.
-                                                             (line  186)
+                                                             (line  180)
 * get thread-local storage address, remote request: General Query Packets.
-                                                             (line  154)
+                                                             (line  148)
 * gettimeofday, file-i/o system call:    gettimeofday.       (line    6)
 * getting structure elements using gdb.Field objects as subscripts: Values From Inferior.
                                                              (line   40)
 * global debugging information directories: Separate Debug Files.
                                                              (line    6)
-* GNAT descriptive types:                Ada Glitches.       (line   60)
-* GNAT encoding:                         Ada Glitches.       (line   60)
+* global thread identifier (GDB):        Threads.            (line   88)
+* global thread number:                  Threads.            (line   88)
+* GNAT descriptive types:                Ada Glitches.       (line   57)
+* GNAT encoding:                         Ada Glitches.       (line   57)
 * GNU C++:                               C.                  (line   10)
 * GNU Emacs:                             Emacs.              (line    6)
 * GNU Hurd debugging:                    Hurd Native.        (line    6)
-* GNU/Hurd debug messages:               Debugging Output.   (line  125)
-* GNU/Linux LWP debug messages:          Debugging Output.   (line  146)
-* GNU/Linux namespaces debug messages:   Debugging Output.   (line  153)
+* GNU/Hurd debug messages:               Debugging Output.   (line  102)
+* GNU/Linux LWP debug messages:          Debugging Output.   (line  117)
+* GNU/Linux namespaces debug messages:   Debugging Output.   (line  121)
 * Go (programming language):             Go.                 (line    6)
 * guile api:                             Guile API.          (line    6)
 * guile architectures:                   Architectures In Guile.
                                                              (line    6)
 * guile auto-loading:                    Guile Auto-loading. (line    6)
-* guile commands <1>:                    Commands In Guile.  (line    6)
 * guile commands:                        Guile Commands.     (line    6)
+* guile commands <1>:                    Commands In Guile.  (line    6)
 * guile configuration:                   Guile Configuration.
                                                              (line    6)
 * guile exceptions:                      Guile Exception Handling.
@@ -1992,18 +3182,18 @@ Concept Index
 * guile, working with types:             Types In Guile.     (line    6)
 * guile, working with values from inferior: Values From Inferior In Guile.
                                                              (line    6)
-* H packet:                              Packets.            (line  197)
+* H packet:                              Packets.            (line  193)
 * handling signals:                      Signals.            (line   27)
-* hardware breakpoints:                  Set Breaks.         (line   62)
+* hardware breakpoints:                  Set Breaks.         (line   61)
 * hardware debug registers:              Maintenance Commands.
-                                                             (line  405)
+                                                             (line  397)
 * hardware watchpoints:                  Set Watchpoints.    (line   31)
-* hash mark while downloading:           Target Commands.    (line   99)
+* hash mark while downloading:           Target Commands.    (line   98)
 * heuristic-fence-post (Alpha, MIPS):    MIPS.               (line   14)
 * history events:                        Event Designators.  (line    8)
 * history expansion:                     History Interaction.
                                                              (line    6)
-* history expansion, turn on/off:        Command History.    (line   72)
+* history expansion, turn on/off:        Command History.    (line   70)
 * history file:                          Command History.    (line   26)
 * history number:                        Value History.      (line   13)
 * history of values printed by GDB:      Value History.      (line    6)
@@ -2016,40 +3206,40 @@ Concept Index
 * Host I/O, remote protocol:             Host I/O Packets.   (line    6)
 * how many arguments (user-defined commands): Define.        (line   25)
 * HPPA support:                          HPPA.               (line    6)
-* I packet:                              Packets.            (line  217)
-* i packet:                              Packets.            (line  212)
+* i packet:                              Packets.            (line  207)
+* I packet:                              Packets.            (line  212)
 * i/o:                                   Input/Output.       (line    6)
 * I/O registers (Atmel AVR):             AVR.                (line   10)
-* i386:                                  Remote Stub.        (line   57)
-* i386-stub.c:                           Remote Stub.        (line   57)
+* i386:                                  Remote Stub.        (line   56)
+* i386-stub.c:                           Remote Stub.        (line   56)
 * IDT:                                   DJGPP Native.       (line   24)
 * ignore count (of breakpoint):          Conditions.         (line   79)
 * in-process agent protocol:             In-Process Agent Protocol.
                                                              (line    6)
-* incomplete type:                       Symbols.            (line  218)
-* indentation in structure display:      Print Settings.     (line  331)
+* incomplete type:                       Symbols.            (line  217)
+* indentation in structure display:      Print Settings.     (line  329)
 * index files:                           Index Files.        (line    6)
 * index section format:                  Index Section Format.
                                                              (line    6)
 * inferior:                              Inferiors and Programs.
                                                              (line   13)
-* inferior debugging info:               Debugging Output.   (line  131)
+* inferior debugging info:               Debugging Output.   (line  106)
 * inferior events in Python:             Events In Python.   (line    6)
 * inferior functions, calling:           Calling.            (line    6)
 * inferior tty:                          Input/Output.       (line   44)
 * inferiors in Python:                   Inferiors In Python.
                                                              (line    6)
-* infinite recursion in user-defined commands: Define.       (line   79)
+* infinite recursion in user-defined commands: Define.       (line   91)
 * info for known .debug_gdb_scripts-loaded scripts: Maintenance Commands.
-                                                             (line  314)
+                                                             (line  304)
 * info for known object files:           Maintenance Commands.
-                                                             (line  299)
+                                                             (line  289)
 * info proc cmdline:                     SVR4 Process Information.
-                                                             (line   35)
+                                                             (line   34)
 * info proc cwd:                         SVR4 Process Information.
-                                                             (line   39)
+                                                             (line   38)
 * info proc exe:                         SVR4 Process Information.
-                                                             (line   43)
+                                                             (line   42)
 * information about static tracepoint markers: Listing Static Tracepoint Markers.
                                                              (line    6)
 * information about tracepoints:         Listing Tracepoints.
@@ -2057,7 +3247,7 @@ Concept Index
 * inheritance:                           Debugging C Plus Plus.
                                                              (line   26)
 * init file:                             Startup.            (line   11)
-* init file name:                        Startup.            (line   66)
+* init file name:                        Startup.            (line   65)
 * initial frame:                         Frames.             (line   12)
 * initialization file, readline:         Readline Init File. (line    6)
 * injecting code:                        Compiling and Injecting Code.
@@ -2070,27 +3260,30 @@ Concept Index
 * instructions, assembly:                Machine Code.       (line   36)
 * integral datatypes, in file-i/o protocol: Integral Datatypes.
                                                              (line    6)
-* Intel:                                 Remote Stub.        (line   57)
-* Intel disassembly flavor:              Machine Code.       (line  132)
-* Intel(R) Memory Protection Extensions (MPX).: i386.        (line   21)
-* Intel(R) Processor Trace:              Process Record and Replay.
-                                                             (line   66)
+* Intel:                                 Remote Stub.        (line   56)
+* Intel disassembly flavor:              Machine Code.       (line  230)
+* Intel Memory Protection Extensions (MPX).: i386.           (line   21)
+* Intel MPX boundary violations:         Signals.            (line  197)
+* Intel Processor Trace:                 Process Record and Replay.
+                                                             (line   69)
 * interaction, readline:                 Readline Interaction.
                                                              (line    6)
 * internal commands:                     Maintenance Commands.
                                                              (line    6)
 * internal errors, control of GDB behavior: Maintenance Commands.
-                                                             (line  207)
-* internal GDB breakpoints:              Set Breaks.         (line  376)
+                                                             (line  197)
+* internal GDB breakpoints:              Set Breaks.         (line  366)
 * interrupt:                             Quitting GDB.       (line   13)
 * interrupt debuggee on MS-Windows:      Cygwin Native.      (line    9)
 * interrupt remote programs:             Remote Configuration.
                                                              (line   36)
-* interrupting remote programs:          Connecting.         (line   82)
+* interrupt remote programs <1>:         Remote Configuration.
+                                                             (line  101)
+* interrupting remote programs:          Connecting.         (line  188)
 * interrupting remote targets:           Bootstrapping.      (line   25)
 * interrupts (remote protocol):          Interrupts.         (line    6)
 * invalid input:                         Bug Criteria.       (line   16)
-* invoke another interpreter:            Interpreters.       (line   37)
+* invoke another interpreter:            Interpreters.       (line   36)
 * ipa protocol commands:                 IPA Protocol Commands.
                                                              (line    6)
 * ipa protocol objects:                  IPA Protocol Objects.
@@ -2100,19 +3293,19 @@ Concept Index
 * JIT debug info reader:                 Custom Debug Info.  (line    6)
 * just-in-time compilation:              JIT Interface.      (line    6)
 * just-in-time compilation, debugging messages: Debugging Output.
-                                                             (line  140)
-* k packet:                              Packets.            (line  221)
+                                                             (line  113)
+* k packet:                              Packets.            (line  216)
 * kernel crash dump:                     BSD libkvm Interface.
                                                              (line    6)
 * kernel memory image:                   BSD libkvm Interface.
                                                              (line    6)
 * kill ring:                             Readline Killing Commands.
-                                                             (line   19)
+                                                             (line   18)
 * killing text:                          Readline Killing Commands.
                                                              (line    6)
 * languages:                             Languages.          (line    6)
 * last tracepoint number:                Create and Delete Tracepoints.
-                                                             (line  123)
+                                                             (line  122)
 * latest breakpoint:                     Set Breaks.         (line    6)
 * lazy strings in guile:                 Lazy Strings In Guile.
                                                              (line    6)
@@ -2122,49 +3315,51 @@ Concept Index
 * leaving GDB:                           Quitting GDB.       (line    6)
 * libkvm:                                BSD libkvm Interface.
                                                              (line    6)
-* library list format, remote protocol <1>: Library List Format for SVR4 Targets.
-                                                             (line    6)
 * library list format, remote protocol:  Library List Format.
                                                              (line    6)
+* library list format, remote protocol <1>: Library List Format for SVR4 Targets.
+                                                             (line    6)
 * limit hardware breakpoints and watchpoints: Remote Configuration.
                                                              (line   79)
 * limit hardware watchpoints length:     Remote Configuration.
                                                              (line   84)
-* limit on number of printed array elements: Print Settings. (line  142)
+* limit on number of printed array elements: Print Settings. (line  141)
 * limits, in file-i/o protocol:          Limits.             (line    6)
 * line tables in python:                 Line Tables In Python.
                                                              (line    6)
-* linespec:                              Specify Location.   (line    6)
-* Linux lightweight processes:           Debugging Output.   (line  146)
+* line tables, listing GDB's internal:   Symbols.            (line  445)
+* linespec locations:                    Linespec Locations. (line    6)
+* Linux lightweight processes:           Debugging Output.   (line  117)
 * list active threads, remote request:   General Query Packets.
-                                                             (line  119)
+                                                             (line  115)
 * list of supported file-i/o calls:      List of Supported Calls.
                                                              (line    6)
 * list output in GDB/MI:                 GDB/MI Output Syntax.
                                                              (line  117)
 * list, how many lines to display:       List.               (line   30)
-* listing GDB's internal symbol tables:  Symbols.            (line  401)
+* listing GDB's internal line tables:    Symbols.            (line  445)
+* listing GDB's internal symbol tables:  Symbols.            (line  398)
 * listing machine instructions:          Machine Code.       (line   36)
 * listing mapped overlays:               Overlay Commands.   (line   60)
+* lists of breakpoints:                  Breakpoints.        (line   45)
 * load address, overlay's:               How Overlays Work.  (line    6)
-* load shared library:                   Files.              (line  334)
-* load symbols from memory:              Files.              (line  183)
-* local variables:                       Symbols.            (line  262)
+* load shared library:                   Files.              (line  313)
+* load symbols from memory:              Files.              (line  179)
+* local variables:                       Symbols.            (line  260)
 * locate address:                        Output Formats.     (line   35)
+* location:                              Specify Location.   (line    6)
 * lock scheduler:                        All-Stop Mode.      (line   37)
 * log output in GDB/MI:                  GDB/MI Output Syntax.
                                                              (line  113)
-* logging file name:                     Logging Output.     (line   13)
+* logging file name:                     Logging Output.     (line   12)
 * logging GDB output:                    Logging Output.     (line    6)
 * lseek flags, in file-i/o protocol:     Lseek Flags.        (line    6)
 * lseek, file-i/o system call:           lseek.              (line    6)
-* M packet:                              Packets.            (line  265)
-* m packet:                              Packets.            (line  244)
-* M32-EVA target board address:          M32R/D.             (line   21)
-* M32R/Chaos debugging:                  M32R/D.             (line   50)
-* m680x0:                                Remote Stub.        (line   60)
-* m68k-stub.c:                           Remote Stub.        (line   60)
-* Mach-O symbols processing:             Debugging Output.   (line  160)
+* m packet:                              Packets.            (line  239)
+* M packet:                              Packets.            (line  259)
+* m680x0:                                Remote Stub.        (line   59)
+* m68k-stub.c:                           Remote Stub.        (line   59)
+* Mach-O symbols processing:             Debugging Output.   (line  126)
 * machine instructions:                  Machine Code.       (line   36)
 * macro definition, showing:             Macros.             (line   47)
 * macro expansion, showing the results of preprocessor: Macros.
@@ -2173,7 +3368,7 @@ Concept Index
 * macros, from debug info:               Macros.             (line   47)
 * macros, user-defined:                  Macros.             (line   59)
 * mailing lists:                         GDB/MI Development and Front Ends.
-                                                             (line   35)
+                                                             (line   34)
 * maintenance commands:                  Maintenance Commands.
                                                              (line    6)
 * Man pages:                             Man Pages.          (line    6)
@@ -2182,37 +3377,36 @@ Concept Index
 * manual overlay debugging:              Overlay Commands.   (line   23)
 * map an overlay:                        Overlay Commands.   (line   30)
 * mapinfo list, QNX Neutrino:            SVR4 Process Information.
-                                                             (line   93)
+                                                             (line   92)
 * mapped address:                        How Overlays Work.  (line    6)
 * mapped overlays:                       How Overlays Work.  (line    6)
 * markers, static tracepoints:           Set Tracepoints.    (line   28)
 * maximum value for offset of closest symbol: Print Settings.
-                                                             (line   71)
+                                                             (line   70)
 * member functions:                      C Plus Plus Expressions.
                                                              (line   16)
 * memory address space mappings:         SVR4 Process Information.
-                                                             (line   47)
+                                                             (line   46)
 * memory map format:                     Memory Map Format.  (line    6)
 * memory region attributes:              Memory Region Attributes.
                                                              (line    6)
-* memory tracing:                        Breakpoints.        (line   20)
+* memory tracing:                        Breakpoints.        (line   17)
 * memory transfer, in file-i/o protocol: Memory Transfer.    (line    6)
 * memory used by commands:               Maintenance Commands.
-                                                             (line  467)
-* memory used for symbol tables:         Files.              (line  322)
-* memory, alignment and size of remote accesses: Packets.    (line  252)
-* memory, viewing as typed object:       Expressions.        (line   43)
+                                                             (line  478)
+* memory used for symbol tables:         Files.              (line  301)
+* memory, alignment and size of remote accesses: Packets.    (line  247)
+* memory, viewing as typed object:       Expressions.        (line   41)
 * mi interpreter:                        Interpreters.       (line   26)
 * mi1 interpreter:                       Interpreters.       (line   34)
 * mi2 interpreter:                       Interpreters.       (line   31)
 * minimal language:                      Unsupported Languages.
                                                              (line    6)
-* minimal symbol dump:                   Symbols.            (line  382)
+* minimal symbol dump:                   Symbols.            (line  372)
 * Minimal symbols and DLLs:              Non-debug DLL Symbols.
                                                              (line    6)
-* MIPS addresses, masking:               MIPS.               (line   86)
-* MIPS boards:                           MIPS Embedded.      (line    6)
-* MIPS remote floating point:            MIPS Embedded.      (line   60)
+* MIPS addresses, masking:               MIPS.               (line   80)
+* MIPS remote floating point:            MIPS Embedded.      (line   13)
 * MIPS stack:                            MIPS.               (line    6)
 * miscellaneous settings:                Other Misc Settings.
                                                              (line    6)
@@ -2221,28 +3415,27 @@ Concept Index
 * Modula-2:                              Summary.            (line   29)
 * Modula-2 built-ins:                    Built-In Func/Proc. (line    6)
 * Modula-2 checks:                       M2 Checks.          (line    6)
-* Modula-2 constants:                    Built-In Func/Proc. (line  115)
+* Modula-2 constants:                    Built-In Func/Proc. (line  114)
 * Modula-2 defaults:                     M2 Defaults.        (line    6)
 * Modula-2 operators:                    M2 Operators.       (line    6)
 * Modula-2 types:                        M2 Types.           (line    6)
 * Modula-2, deviations from:             Deviations.         (line    6)
 * Modula-2, GDB support:                 Modula-2.           (line    6)
-* monitor commands, for gdbserver:       Server.             (line  237)
-* Motorola 680x0:                        Remote Stub.        (line   60)
+* monitor commands, for gdbserver:       Server.             (line  210)
+* Motorola 680x0:                        Remote Stub.        (line   59)
 * MS Windows debugging:                  Cygwin Native.      (line    6)
 * MS-DOS system info:                    DJGPP Native.       (line   19)
 * MS-DOS-specific commands:              DJGPP Native.       (line    6)
-* multiple locations, breakpoints:       Set Breaks.         (line  201)
+* multiple locations, breakpoints:       Set Breaks.         (line  193)
 * multiple processes:                    Forks.              (line    6)
-* multiple processes with gdbserver:     Server.             (line  106)
 * multiple targets:                      Active Targets.     (line    6)
 * multiple threads:                      Threads.            (line    6)
 * multiple threads, backtrace:           Backtrace.          (line   49)
 * multiple-symbols menu:                 Ambiguous Expressions.
                                                              (line   51)
 * multiprocess extensions, in remote protocol: General Query Packets.
-                                                             (line  684)
-* name a thread:                         Threads.            (line  133)
+                                                             (line  802)
+* name a thread:                         Threads.            (line  196)
 * names of symbols:                      Symbols.            (line   14)
 * namespace in C++:                      C Plus Plus Expressions.
                                                              (line   20)
@@ -2251,20 +3444,21 @@ Concept Index
 * native script auto-loading:            Auto-loading sequences.
                                                              (line    6)
 * native target:                         Target Commands.    (line   85)
-* negative breakpoint numbers:           Set Breaks.         (line  376)
-* New SYSTAG message:                    Threads.            (line   51)
+* negative breakpoint numbers:           Set Breaks.         (line  366)
+* New SYSTAG message:                    Threads.            (line   35)
+* new user interface:                    Interpreters.       (line   65)
 * Newlib OS ABI and its influence on the longjmp handling: ABI.
                                                              (line   11)
 * Nios II architecture:                  Nios II.            (line    6)
-* non-member C++ functions, set breakpoint in: Set Breaks.   (line  108)
+* non-member C++ functions, set breakpoint in: Set Breaks.   (line  106)
 * non-stop mode:                         Non-Stop Mode.      (line    6)
 * non-stop mode, and process record and replay: Process Record and Replay.
-                                                             (line   92)
+                                                             (line   95)
 * non-stop mode, and set displaced-stepping: Maintenance Commands.
-                                                             (line  140)
+                                                             (line  129)
 * non-stop mode, remote request:         General Query Packets.
-                                                             (line  262)
-* noninvasive task options:              Hurd Native.        (line   73)
+                                                             (line  256)
+* noninvasive task options:              Hurd Native.        (line   72)
 * notation, readline:                    Readline Bare Essentials.
                                                              (line    6)
 * notational conventions, for GDB/MI:    GDB/MI.             (line   25)
@@ -2272,13 +3466,13 @@ Concept Index
                                                              (line    6)
 * notify output in GDB/MI:               GDB/MI Output Syntax.
                                                              (line  102)
-* NULL elements in arrays:               Print Settings.     (line  322)
-* number of array elements to print:     Print Settings.     (line  142)
+* NULL elements in arrays:               Print Settings.     (line  320)
+* number of array elements to print:     Print Settings.     (line  141)
 * number representation:                 Numbers.            (line    6)
-* numbers for breakpoints:               Breakpoints.        (line   41)
-* object files, relocatable, reading symbols from: Files.    (line  133)
+* numbers for breakpoints:               Breakpoints.        (line   38)
+* object files, relocatable, reading symbols from: Files.    (line  132)
 * Objective-C:                           Objective-C.        (line    6)
-* Objective-C, classes and selectors:    Symbols.            (line  333)
+* Objective-C, classes and selectors:    Symbols.            (line  323)
 * Objective-C, print objects:            The Print Command with Objective-C.
                                                              (line    6)
 * OBJFILE-gdb.gdb:                       objfile-gdbdotext file.
@@ -2289,10 +3483,10 @@ Concept Index
                                                              (line    6)
 * objfiles in guile:                     Objfiles In Guile.  (line    6)
 * objfiles in python:                    Objfiles In Python. (line    6)
-* observer debugging info:               Debugging Output.   (line  176)
-* octal escapes in strings:              Print Settings.     (line  355)
+* observer debugging info:               Debugging Output.   (line  138)
+* octal escapes in strings:              Print Settings.     (line  353)
 * online documentation:                  Help.               (line    6)
-* opaque data types:                     Symbols.            (line  345)
+* opaque data types:                     Symbols.            (line  335)
 * open flags, in file-i/o protocol:      Open Flags.         (line    6)
 * open, file-i/o system call:            open.               (line    6)
 * OpenCL C:                              OpenCL C.           (line    6)
@@ -2306,7 +3500,7 @@ Concept Index
 * optimized code, debugging:             Optimized Code.     (line    6)
 * optimized code, wrong values of variables: Variables.      (line  106)
 * optimized out value in guile:          Values From Inferior In Guile.
-                                                             (line  103)
+                                                             (line  102)
 * optimized out value in Python:         Values From Inferior.
                                                              (line   70)
 * optimized out, in backtrace:           Backtrace.          (line   83)
@@ -2315,7 +3509,7 @@ Concept Index
 * OS ABI:                                ABI.                (line   11)
 * OS information:                        OS Information.     (line    6)
 * out-of-line single-stepping:           Maintenance Commands.
-                                                             (line  123)
+                                                             (line  112)
 * outermost frame:                       Frames.             (line   12)
 * output formats:                        Output Formats.     (line    6)
 * output syntax of GDB/MI:               GDB/MI Output Syntax.
@@ -2324,69 +3518,71 @@ Concept Index
 * overlay example program:               Overlay Sample Program.
                                                              (line    6)
 * overlays:                              Overlays.           (line    6)
-* overlays, setting breakpoints in:      Overlay Commands.   (line   93)
+* overlays, setting breakpoints in:      Overlay Commands.   (line   91)
 * overloaded functions, calling:         C Plus Plus Expressions.
                                                              (line   26)
 * overloaded functions, overload resolution: Debugging C Plus Plus.
                                                              (line   59)
 * overloading in C++:                    Debugging C Plus Plus.
                                                              (line   15)
-* P packet:                              Packets.            (line  293)
-* p packet:                              Packets.            (line  278)
+* overloading, Ada:                      Overloading support for Ada.
+                                                             (line    6)
+* p packet:                              Packets.            (line  271)
+* P packet:                              Packets.            (line  284)
 * packet acknowledgment, for GDB remote: Packet Acknowledgment.
                                                              (line    6)
 * packet size, remote protocol:          General Query Packets.
-                                                             (line  586)
+                                                             (line  700)
 * packets, notification:                 Notification Packets.
                                                              (line    6)
-* packets, reporting on stdout:          Debugging Output.   (line  198)
+* packets, reporting on stdout:          Debugging Output.   (line  155)
 * packets, tracepoint:                   Tracepoint Packets. (line    6)
 * page size:                             Screen Size.        (line    6)
-* page tables display (MS-DOS):          DJGPP Native.       (line   56)
+* page tables display (MS-DOS):          DJGPP Native.       (line   55)
 * pagination:                            Screen Size.        (line    6)
 * parameters in guile:                   Parameters In Guile.
                                                              (line    6)
 * parameters in python:                  Parameters In Python.
                                                              (line    6)
-* partial symbol dump:                   Symbols.            (line  382)
-* partial symbol tables, listing GDB's internal: Symbols.    (line  401)
+* partial symbol dump:                   Symbols.            (line  372)
+* partial symbol tables, listing GDB's internal: Symbols.    (line  398)
 * Pascal:                                Summary.            (line   35)
-* Pascal objects, static members display: Print Settings.    (line  491)
+* Pascal objects, static members display: Print Settings.    (line  489)
 * Pascal support in GDB, limitations:    Pascal.             (line    6)
 * pass signals to inferior, remote request: General Query Packets.
-                                                             (line  283)
+                                                             (line  317)
 * patching binaries:                     Patching.           (line    6)
 * patching object files:                 Files.              (line   26)
-* pause current task (GNU Hurd):         Hurd Native.        (line   49)
-* pause current thread (GNU Hurd):       Hurd Native.        (line   91)
+* pause current task (GNU Hurd):         Hurd Native.        (line   48)
+* pause current thread (GNU Hurd):       Hurd Native.        (line   90)
 * pauses in output:                      Screen Size.        (line    6)
-* pending breakpoints:                   Set Breaks.         (line  245)
-* physical address from linear address:  DJGPP Native.       (line   81)
-* physname:                              Debugging Output.   (line   51)
-* pipe, target remote to:                Connecting.         (line   64)
-* pipes:                                 Starting.           (line   63)
+* pending breakpoints:                   Set Breaks.         (line  237)
+* physical address from linear address:  DJGPP Native.       (line   80)
+* physname:                              Debugging Output.   (line   41)
+* pipe, target remote to:                Connecting.         (line  176)
+* pipes:                                 Starting.           (line   61)
 * pointer values, in file-i/o protocol:  Pointer Values.     (line    6)
-* pointer, finding referent:             Print Settings.     (line   81)
-* port rights, GNU Hurd:                 Hurd Native.        (line   85)
-* port sets, GNU Hurd:                   Hurd Native.        (line   85)
+* pointer, finding referent:             Print Settings.     (line   80)
+* port rights, GNU Hurd:                 Hurd Native.        (line   84)
+* port sets, GNU Hurd:                   Hurd Native.        (line   84)
 * PowerPC architecture:                  PowerPC.            (line    6)
 * prefix for data files:                 Data Files.         (line    6)
 * prefix for executable and shared library file names: Files.
-                                                             (line  393)
+                                                             (line  372)
 * premature return from system calls:    Interrupted System Calls.
                                                              (line    6)
 * preprocessor macro expansion, showing the results of: Macros.
                                                              (line   29)
-* pretty print arrays:                   Print Settings.     (line  116)
-* pretty print C++ virtual function tables: Print Settings.  (line  502)
+* pretty print arrays:                   Print Settings.     (line  115)
+* pretty print C++ virtual function tables: Print Settings.  (line  500)
 * pretty-printer commands:               Pretty-Printer Commands.
                                                              (line    6)
-* print all frame argument values:       Print Settings.     (line  155)
+* print all frame argument values:       Print Settings.     (line  154)
 * print an Objective-C object description: The Print Command with Objective-C.
                                                              (line   11)
-* print array indexes:                   Print Settings.     (line  126)
+* print array indexes:                   Print Settings.     (line  125)
 * print frame argument values for scalars only: Print Settings.
-                                                             (line  155)
+                                                             (line  154)
 * print list of auto-loaded canned sequences of commands scripts: Auto-loading sequences.
                                                              (line   21)
 * print list of auto-loaded Guile scripts: Guile Auto-loading.
@@ -2394,35 +3590,35 @@ Concept Index
 * print list of auto-loaded Python scripts: Python Auto-loading.
                                                              (line   23)
 * print messages on inferior start and exit: Inferiors and Programs.
-                                                             (line  117)
-* print messages on thread start and exit: Threads.          (line  158)
-* print messages when symbols are loaded: Symbols.           (line  363)
+                                                             (line  123)
+* print messages on thread start and exit: Threads.          (line  221)
+* print messages when symbols are loaded: Symbols.           (line  353)
 * print settings:                        Print Settings.     (line    6)
-* print structures in indented form:     Print Settings.     (line  331)
+* print structures in indented form:     Print Settings.     (line  329)
 * print/don't print memory addresses:    Print Settings.     (line   13)
 * printing byte arrays:                  Output Formats.     (line   60)
 * printing data:                         Data.               (line    6)
-* printing frame argument values:        Print Settings.     (line  155)
+* printing frame argument values:        Print Settings.     (line  154)
 * printing strings:                      Output Formats.     (line   60)
 * probe static tracepoint marker:        Create and Delete Tracepoints.
-                                                             (line   76)
+                                                             (line   75)
 * probing markers, static tracepoints:   Set Tracepoints.    (line   28)
 * process detailed status information:   SVR4 Process Information.
-                                                             (line   55)
+                                                             (line   54)
 * process ID:                            SVR4 Process Information.
-                                                             (line   19)
+                                                             (line   18)
 * process info via /proc:                SVR4 Process Information.
                                                              (line    6)
 * process list, QNX Neutrino:            SVR4 Process Information.
-                                                             (line   89)
+                                                             (line   88)
 * process record and replay:             Process Record and Replay.
                                                              (line    6)
 * process status register:               Registers.          (line   26)
 * processes, multiple:                   Forks.              (line    6)
 * procfs API calls:                      SVR4 Process Information.
-                                                             (line   68)
+                                                             (line   67)
 * profiling GDB:                         Maintenance Commands.
-                                                             (line  389)
+                                                             (line  381)
 * program counter register:              Registers.          (line   26)
 * program entry point:                   Backtrace.          (line  105)
 * programming in guile:                  Guile API.          (line    6)
@@ -2441,8 +3637,8 @@ Concept Index
                                                              (line    6)
 * Python auto-loading:                   Python Auto-loading.
                                                              (line    6)
-* python commands <1>:                   Commands In Python. (line    6)
 * python commands:                       Python Commands.    (line    6)
+* python commands <1>:                   Commands In Python. (line    6)
 * python convenience functions:          Functions In Python.
                                                              (line    6)
 * python directory:                      Python.             (line   10)
@@ -2462,101 +3658,105 @@ Concept Index
 * Python, working with types:            Types In Python.    (line    6)
 * python, working with values from inferior: Values From Inferior.
                                                              (line    6)
-* Q packet:                              Packets.            (line  306)
-* q packet:                              Packets.            (line  306)
+* q packet:                              Packets.            (line  296)
+* Q packet:                              Packets.            (line  296)
 * QAllow packet:                         General Query Packets.
-                                                             (line   46)
+                                                             (line   44)
 * qAttached packet:                      General Query Packets.
-                                                             (line 1162)
+                                                             (line 1292)
 * qC packet:                             General Query Packets.
-                                                             (line   57)
+                                                             (line   55)
+* QCatchSyscalls packet:                 General Query Packets.
+                                                             (line  278)
 * qCRC packet:                           General Query Packets.
-                                                             (line   68)
+                                                             (line   65)
 * QDisableRandomization packet:          General Query Packets.
-                                                             (line   88)
+                                                             (line   84)
 * qfThreadInfo packet:                   General Query Packets.
-                                                             (line  119)
+                                                             (line  115)
 * qGetTIBAddr packet:                    General Query Packets.
-                                                             (line  186)
+                                                             (line  180)
 * qGetTLSAddr packet:                    General Query Packets.
-                                                             (line  154)
+                                                             (line  148)
 * QNonStop packet:                       General Query Packets.
-                                                             (line  262)
+                                                             (line  256)
 * qOffsets packet:                       General Query Packets.
-                                                             (line  225)
+                                                             (line  219)
 * qP packet:                             General Query Packets.
-                                                             (line  252)
+                                                             (line  246)
 * QPassSignals packet:                   General Query Packets.
-                                                             (line  283)
+                                                             (line  317)
 * QProgramSignals packet:                General Query Packets.
-                                                             (line  312)
+                                                             (line  346)
 * qRcmd packet:                          General Query Packets.
-                                                             (line  351)
+                                                             (line  413)
 * qSearch memory packet:                 General Query Packets.
-                                                             (line  376)
+                                                             (line  435)
 * QStartNoAckMode packet:                General Query Packets.
-                                                             (line  396)
+                                                             (line  452)
 * qsThreadInfo packet:                   General Query Packets.
-                                                             (line  119)
+                                                             (line  115)
 * qSupported packet:                     General Query Packets.
-                                                             (line  411)
+                                                             (line  466)
 * qSymbol packet:                        General Query Packets.
-                                                             (line  792)
-* qTBuffer packet:                       Tracepoint Packets. (line  412)
-* QTBuffer size packet:                  Tracepoint Packets. (line  425)
-* QTDisable packet:                      Tracepoint Packets. (line  220)
-* QTDisconnected packet:                 Tracepoint Packets. (line  239)
+                                                             (line  922)
+* qTBuffer packet:                       Tracepoint Packets. (line  393)
+* QTBuffer size packet:                  Tracepoint Packets. (line  406)
+* QTDisable packet:                      Tracepoint Packets. (line  209)
+* QTDisconnected packet:                 Tracepoint Packets. (line  228)
 * QTDP packet:                           Tracepoint Packets. (line   10)
-* QTDPsrc packet:                        Tracepoint Packets. (line   97)
-* QTDV packet:                           Tracepoint Packets. (line  128)
-* QTEnable packet:                       Tracepoint Packets. (line  215)
-* qTfP packet:                           Tracepoint Packets. (line  350)
-* QTFrame packet:                        Tracepoint Packets. (line  140)
-* qTfSTM packet:                         Tracepoint Packets. (line  367)
-* qTfV packet:                           Tracepoint Packets. (line  358)
+* QTDPsrc packet:                        Tracepoint Packets. (line   90)
+* QTDV packet:                           Tracepoint Packets. (line  121)
+* QTEnable packet:                       Tracepoint Packets. (line  204)
+* qTfP packet:                           Tracepoint Packets. (line  335)
+* QTFrame packet:                        Tracepoint Packets. (line  133)
+* qTfSTM packet:                         Tracepoint Packets. (line  352)
+* qTfV packet:                           Tracepoint Packets. (line  343)
+* QThreadEvents packet:                  General Query Packets.
+                                                             (line  386)
 * qThreadExtraInfo packet:               General Query Packets.
-                                                             (line  836)
-* QTinit packet:                         Tracepoint Packets. (line  225)
-* qTMinFTPILen packet:                   Tracepoint Packets. (line  179)
-* QTNotes packet:                        Tracepoint Packets. (line  430)
-* qTP packet:                            Tracepoint Packets. (line  321)
-* QTro packet:                           Tracepoint Packets. (line  228)
-* QTSave packet:                         Tracepoint Packets. (line  406)
-* qTsP packet:                           Tracepoint Packets. (line  351)
-* qTsSTM packet:                         Tracepoint Packets. (line  367)
-* QTStart packet:                        Tracepoint Packets. (line  206)
-* qTStatus packet:                       Tracepoint Packets. (line  245)
-* qTSTMat packet:                        Tracepoint Packets. (line  400)
-* QTStop packet:                         Tracepoint Packets. (line  212)
-* qTsV packet:                           Tracepoint Packets. (line  359)
-* qTV packet:                            Tracepoint Packets. (line  333)
+                                                             (line  965)
+* QTinit packet:                         Tracepoint Packets. (line  214)
+* qTMinFTPILen packet:                   Tracepoint Packets. (line  171)
+* QTNotes packet:                        Tracepoint Packets. (line  411)
+* qTP packet:                            Tracepoint Packets. (line  307)
+* QTro packet:                           Tracepoint Packets. (line  217)
+* QTSave packet:                         Tracepoint Packets. (line  387)
+* qTsP packet:                           Tracepoint Packets. (line  336)
+* qTsSTM packet:                         Tracepoint Packets. (line  352)
+* QTStart packet:                        Tracepoint Packets. (line  195)
+* qTStatus packet:                       Tracepoint Packets. (line  234)
+* qTSTMat packet:                        Tracepoint Packets. (line  381)
+* QTStop packet:                         Tracepoint Packets. (line  201)
+* qTsV packet:                           Tracepoint Packets. (line  344)
+* qTV packet:                            Tracepoint Packets. (line  318)
+* qualified thread ID:                   Threads.            (line   52)
 * query attached, remote request:        General Query Packets.
-                                                             (line 1162)
-* quotes in commands:                    Completion.         (line   83)
+                                                             (line 1292)
+* quotes in commands:                    Completion.         (line   82)
 * quoting Ada internal identifiers:      Additions to Ada.   (line   76)
 * quoting names:                         Symbols.            (line   14)
 * qXfer packet:                          General Query Packets.
-                                                             (line  874)
-* R packet:                              Packets.            (line  315)
-* r packet:                              Packets.            (line  310)
+                                                             (line 1002)
+* r packet:                              Packets.            (line  300)
+* R packet:                              Packets.            (line  305)
 * range checking:                        Type Checking.      (line   45)
 * range stepping:                        Continuing and Stepping.
-                                                             (line  213)
+                                                             (line  210)
 * ranged breakpoint:                     PowerPC Embedded.   (line   33)
-* ranges of breakpoints:                 Breakpoints.        (line   48)
+* ranges of breakpoints:                 Breakpoints.        (line   45)
 * Ravenscar Profile:                     Ravenscar Profile.  (line    6)
-* raw printing:                          Output Formats.     (line   75)
-* RDI heartbeat:                         ARM.                (line  112)
+* raw printing:                          Output Formats.     (line   76)
 * read special object, remote request:   General Query Packets.
-                                                             (line  874)
+                                                             (line 1002)
 * read, file-i/o system call:            read.               (line    6)
-* read-only sections:                    Files.              (line  269)
-* reading symbols from relocatable object files: Files.      (line  133)
-* reading symbols immediately:           Files.              (line   90)
+* read-only sections:                    Files.              (line  251)
+* reading symbols from relocatable object files: Files.      (line  132)
+* reading symbols immediately:           Files.              (line   89)
 * readline:                              Editing.            (line    6)
-* receive rights, GNU Hurd:              Hurd Native.        (line   85)
+* receive rights, GNU Hurd:              Hurd Native.        (line   84)
 * recent tracepoint number:              Create and Delete Tracepoints.
-                                                             (line  123)
+                                                             (line  122)
 * record aggregates (Ada):               Omissions from Ada. (line   44)
 * record mode:                           Process Record and Replay.
                                                              (line   19)
@@ -2565,6 +3765,8 @@ Concept Index
 * recording a session script:            Bug Reporting.      (line  108)
 * recording inferior's execution and replaying it: Process Record and Replay.
                                                              (line    6)
+* recordings in python:                  Recordings In Python.
+                                                             (line    6)
 * redirection:                           Input/Output.       (line    6)
 * reference card:                        Formatting Documentation.
                                                              (line    6)
@@ -2573,28 +3775,32 @@ Concept Index
 * register packet format, MIPS:          MIPS Register packet Format.
                                                              (line    6)
 * registers:                             Registers.          (line    6)
-* regular expression:                    Set Breaks.         (line   92)
+* regular expression:                    Set Breaks.         (line   90)
 * reloading the overlay table:           Overlay Commands.   (line   52)
-* relocatable object files, reading symbols from: Files.     (line  133)
+* relocatable object files, reading symbols from: Files.     (line  132)
 * remote async notification debugging info: Debugging Output.
-                                                             (line  168)
+                                                             (line  132)
+* remote connection commands:            Connecting.         (line  120)
 * remote connection without stubs:       Server.             (line    6)
 * remote debugging:                      Remote Debugging.   (line    6)
-* remote memory comparison:              Memory.             (line  132)
-* remote monitor prompt:                 MIPS Embedded.      (line  107)
+* remote debugging, connecting:          Connecting.         (line    6)
+* remote debugging, detach and program exit: Connecting.     (line   19)
+* remote debugging, symbol files:        Connecting.         (line   90)
+* remote debugging, types of connections: Connecting.        (line    6)
+* remote memory comparison:              Memory.             (line  142)
 * remote packets, enabling and disabling: Remote Configuration.
                                                              (line  152)
-* remote programs, interrupting:         Connecting.         (line   82)
-* remote protocol debugging:             Debugging Output.   (line  198)
-* remote protocol, binary data:          Overview.           (line   61)
-* remote protocol, field separator:      Overview.           (line   53)
+* remote programs, interrupting:         Connecting.         (line  188)
+* remote protocol debugging:             Debugging Output.   (line  155)
+* remote protocol, binary data:          Overview.           (line   63)
+* remote protocol, field separator:      Overview.           (line   55)
 * remote query requests:                 General Query Packets.
                                                              (line    6)
 * remote serial debugging summary:       Debug Session.      (line    6)
 * remote serial debugging, overview:     Remote Stub.        (line   14)
 * remote serial protocol:                Overview.           (line   14)
 * remote serial stub:                    Stub Contents.      (line    6)
-* remote serial stub list:               Remote Stub.        (line   54)
+* remote serial stub list:               Remote Stub.        (line   53)
 * remote serial stub, initialization:    Stub Contents.      (line   10)
 * remote serial stub, main routine:      Stub Contents.      (line   15)
 * remote stub, example:                  Remote Stub.        (line    6)
@@ -2608,22 +3814,21 @@ Concept Index
 * remote timeout:                        Remote Configuration.
                                                              (line   72)
 * remove actions from a tracepoint:      Tracepoint Actions. (line   21)
-* remove duplicate history:              Command History.    (line   55)
+* remove duplicate history:              Command History.    (line   54)
 * rename, file-i/o system call:          rename.             (line    6)
-* Renesas:                               Remote Stub.        (line   63)
-* repeated array elements:               Print Settings.     (line  309)
-* repeating command sequences:           Command Syntax.     (line   42)
+* Renesas:                               Remote Stub.        (line   62)
+* repeated array elements:               Print Settings.     (line  307)
+* repeating command sequences:           Command Syntax.     (line   41)
 * repeating commands:                    Command Syntax.     (line   21)
-* replay log events, remote reply:       Stop Reply Packets. (line   62)
+* replay log events, remote reply:       Stop Reply Packets. (line   70)
 * replay mode:                           Process Record and Replay.
                                                              (line   10)
 * reporting bugs in GDB:                 GDB Bugs.           (line    6)
+* reprint the last value:                Data.               (line   23)
 * reprint the last value <1>:            Compiling and Injecting Code.
                                                              (line   73)
-* reprint the last value:                Data.               (line   23)
-* reset SDI connection, M32R:            M32R/D.             (line   44)
 * resources used by commands:            Maintenance Commands.
-                                                             (line  429)
+                                                             (line  441)
 * response time, MIPS debugging:         MIPS.               (line   10)
 * restart:                               Checkpoint/Restart. (line    6)
 * restore data from a file:              Dump/Restore Files. (line    6)
@@ -2631,24 +3836,19 @@ Concept Index
 * result records in GDB/MI:              GDB/MI Result Records.
                                                              (line    6)
 * resume threads of multiple processes simultaneously: All-Stop Mode.
-                                                             (line   52)
+                                                             (line   54)
 * resuming execution:                    Continuing and Stepping.
                                                              (line    6)
-* retransmit-timeout, MIPS protocol:     MIPS Embedded.      (line   83)
 * returning from a function:             Returning.          (line    6)
 * reverse execution:                     Reverse Execution.  (line    6)
 * rewind program state:                  Checkpoint/Restart. (line    6)
-* ROM at zero address, RDI:              ARM.                (line  102)
-* run to main procedure:                 Starting.           (line   80)
+* run to main procedure:                 Starting.           (line   78)
 * run until specified location:          Continuing and Stepping.
-                                                             (line  119)
+                                                             (line  117)
 * running:                               Starting.           (line    6)
-* running and debugging Sparclet programs: Sparclet Execution.
-                                                             (line    6)
 * running programs backward:             Reverse Execution.  (line    6)
-* running, on Sparclet:                  Sparclet.           (line   28)
-* S packet:                              Packets.            (line  331)
-* s packet:                              Packets.            (line  322)
+* s packet:                              Packets.            (line  312)
+* S packet:                              Packets.            (line  321)
 * save breakpoints to a file for future sessions: Save Breakpoints.
                                                              (line    9)
 * save command history:                  Command History.    (line   36)
@@ -2660,88 +3860,90 @@ Concept Index
 * scripting commands:                    Command Files.      (line    6)
 * scripting with guile:                  Guile.              (line    6)
 * scripting with python:                 Python.             (line    6)
-* SDS protocol:                          PowerPC Embedded.   (line   83)
-* search for a thread:                   Threads.            (line  144)
-* search path for libthread_db:          Threads.            (line  179)
+* search for a thread:                   Threads.            (line  207)
+* search path for libthread_db:          Threads.            (line  242)
 * searching memory:                      Searching Memory.   (line    6)
 * searching memory, in remote debugging: General Query Packets.
-                                                             (line  376)
+                                                             (line  435)
 * searching source files:                Search.             (line    6)
 * section offsets, remote request:       General Query Packets.
-                                                             (line  225)
+                                                             (line  219)
 * segment descriptor tables:             DJGPP Native.       (line   24)
 * select Ctrl-C, BREAK or BREAK-g:       Remote Configuration.
                                                              (line  101)
 * select trace snapshot:                 tfind.              (line    6)
 * selected frame:                        Stack.              (line   19)
-* selecting frame silently:              Frames.             (line   51)
 * selecting guile pretty-printers:       Selecting Guile Pretty-Printers.
                                                              (line    6)
 * selecting python pretty-printers:      Selecting Pretty-Printers.
                                                              (line    6)
+* self tests:                            Maintenance Commands.
+                                                             (line  343)
 * semaphores on static probe points:     Static Probe Points.
                                                              (line   20)
-* send command to remote monitor:        Connecting.         (line  109)
+* send command to remote monitor:        Connecting.         (line  221)
 * send command to simulator:             Embedded Processors.
                                                              (line    9)
 * send interrupt-sequence on start:      Remote Configuration.
                                                              (line  114)
-* send PMON command:                     MIPS Embedded.      (line  132)
-* send rights, GNU Hurd:                 Hurd Native.        (line   85)
+* send rights, GNU Hurd:                 Hurd Native.        (line   84)
 * sending files to remote systems:       File Transfer.      (line    6)
 * separate debug sections:               MiniDebugInfo.      (line    6)
 * separate debugging information files:  Separate Debug Files.
                                                              (line    6)
-* sequence-id, for GDB remote:           Overview.           (line   29)
-* serial connections, debugging:         Debugging Output.   (line  198)
-* serial line, target remote:            Connecting.         (line   22)
+* sequence-id, for GDB remote:           Overview.           (line   30)
+* serial connections, debugging:         Debugging Output.   (line  155)
+* serial line, target remote:            Connecting.         (line  129)
 * serial protocol, GDB remote:           Overview.           (line   14)
 * server prefix:                         Server Prefix.      (line    6)
 * server, command prefix:                Command History.    (line   20)
 * set ABI for MIPS:                      MIPS.               (line   32)
-* set breakpoints in many functions:     Set Breaks.         (line   92)
-* set breakpoints on all functions:      Set Breaks.         (line  112)
+* set breakpoints in many functions:     Set Breaks.         (line   90)
+* set breakpoints on all functions:      Set Breaks.         (line  110)
 * set fast tracepoint:                   Create and Delete Tracepoints.
-                                                             (line   51)
+                                                             (line   50)
 * set inferior controlling terminal:     Input/Output.       (line   44)
 * set static tracepoint:                 Create and Delete Tracepoints.
-                                                             (line   76)
+                                                             (line   75)
 * set tdesc filename:                    Retrieving Descriptions.
                                                              (line   18)
 * set tracepoint:                        Create and Delete Tracepoints.
                                                              (line    6)
 * setting variables:                     Assignment.         (line    6)
 * setting watchpoints:                   Set Watchpoints.    (line    6)
-* SH:                                    Remote Stub.        (line   63)
-* sh-stub.c:                             Remote Stub.        (line   63)
-* shared libraries:                      Files.              (line  292)
-* shared library events, remote reply:   Stop Reply Packets. (line   57)
+* SH:                                    Remote Stub.        (line   62)
+* sh-stub.c:                             Remote Stub.        (line   62)
+* shared libraries:                      Files.              (line  273)
+* shared library events, remote reply:   Stop Reply Packets. (line   65)
 * shell escape:                          Shell Commands.     (line   10)
-* show all convenience functions:        Convenience Funs.   (line  141)
+* show all convenience functions:        Convenience Funs.   (line  148)
 * show all user variables and functions: Convenience Vars.   (line   37)
-* show last commands:                    Command History.    (line   97)
+* show last commands:                    Command History.    (line   95)
 * show tdesc filename:                   Retrieving Descriptions.
                                                              (line   25)
 * signals:                               Signals.            (line    6)
 * signals the inferior may see, remote request: General Query Packets.
-                                                             (line  312)
+                                                             (line  346)
 * SIGQUIT signal, dump core of GDB:      Maintenance Commands.
-                                                             (line  180)
-* simulator, Z8000:                      Z8000.              (line    6)
-* size of remote memory accesses:        Packets.            (line  252)
+                                                             (line  169)
+* size of remote memory accesses:        Packets.            (line  247)
 * size of screen:                        Screen Size.        (line    6)
+* skipping over files via glob-style patterns: Skipping Over Functions and Files.
+                                                             (line   55)
 * skipping over functions and files:     Skipping Over Functions and Files.
                                                              (line    6)
+* skipping over functions via regular expressions: Skipping Over Functions and Files.
+                                                             (line   68)
 * snapshot of a process:                 Checkpoint/Restart. (line    6)
 * software watchpoints:                  Set Watchpoints.    (line   31)
-* source file and line of a symbol:      Print Settings.     (line   51)
+* source file and line of a symbol:      Print Settings.     (line   50)
 * source line and its code address:      Machine Code.       (line    6)
+* source location:                       Specify Location.   (line    6)
 * source path:                           Source Path.        (line    6)
-* Sparc:                                 Remote Stub.        (line   66)
-* sparc-stub.c:                          Remote Stub.        (line   66)
-* sparcl-stub.c:                         Remote Stub.        (line   69)
-* Sparclet:                              Sparclet.           (line    6)
-* SparcLite:                             Remote Stub.        (line   69)
+* Sparc:                                 Remote Stub.        (line   65)
+* sparc-stub.c:                          Remote Stub.        (line   65)
+* sparcl-stub.c:                         Remote Stub.        (line   68)
+* SparcLite:                             Remote Stub.        (line   68)
 * Special Fortran commands:              Special Fortran Commands.
                                                              (line    6)
 * specifying location:                   Specify Location.   (line    6)
@@ -2753,22 +3955,23 @@ Concept Index
 * stack pointer register:                Registers.          (line   26)
 * stacking targets:                      Active Targets.     (line    6)
 * standard registers:                    Registers.          (line   26)
+* start a new independent interpreter:   Interpreters.       (line   49)
 * start a new trace experiment:          Starting and Stopping Trace Experiments.
                                                              (line    6)
 * starting:                              Starting.           (line    6)
 * startup code, and backtrace:           Backtrace.          (line  105)
 * stat, file-i/o system call:            stat/fstat.         (line    6)
-* static members of C++ objects:         Print Settings.     (line  480)
-* static members of Pascal objects:      Print Settings.     (line  491)
+* static members of C++ objects:         Print Settings.     (line  478)
+* static members of Pascal objects:      Print Settings.     (line  489)
 * static probe point, DTrace:            Static Probe Points.
                                                              (line    6)
 * static probe point, SystemTap:         Static Probe Points.
                                                              (line    6)
 * static tracepoints:                    Set Tracepoints.    (line   28)
 * static tracepoints, in remote protocol: General Query Packets.
-                                                             (line  733)
+                                                             (line  850)
 * static tracepoints, setting:           Create and Delete Tracepoints.
-                                                             (line   76)
+                                                             (line   75)
 * status of trace data collection:       Starting and Stopping Trace Experiments.
                                                              (line   27)
 * status output in GDB/MI:               GDB/MI Output Syntax.
@@ -2777,7 +3980,7 @@ Concept Index
                                                              (line    6)
 * stepping and signal handlers:          Signals.            (line  106)
 * stepping into functions with no line info: Continuing and Stepping.
-                                                             (line   94)
+                                                             (line   92)
 * stop a running trace experiment:       Starting and Stopping Trace Experiments.
                                                              (line   16)
 * stop on C++ exceptions:                Set Catchpoints.    (line   16)
@@ -2786,7 +3989,7 @@ Concept Index
 * stream records in GDB/MI:              GDB/MI Stream Records.
                                                              (line    6)
 * string tracing, in remote protocol:    General Query Packets.
-                                                             (line  750)
+                                                             (line  867)
 * struct gdb_reader_funcs:               Writing JIT Debug Info Readers.
                                                              (line   22)
 * struct gdb_symbol_callbacks:           Writing JIT Debug Info Readers.
@@ -2797,75 +4000,81 @@ Concept Index
 * struct stat, in file-i/o protocol:     struct stat.        (line    6)
 * struct timeval, in file-i/o protocol:  struct timeval.     (line    6)
 * struct/union returned in registers:    i386.               (line    7)
-* structure field name completion:       Completion.         (line  122)
+* structure field name completion:       Completion.         (line  120)
 * stub example, remote debugging:        Remote Stub.        (line    6)
-* stupid questions:                      Messages/Warnings.  (line   50)
+* stupid questions:                      Messages/Warnings.  (line   49)
 * Super-H:                               Super-H.            (line    6)
 * supported GDB/MI features, list:       GDB/MI Support Commands.
-                                                             (line   58)
+                                                             (line   57)
 * supported packets, remote query:       General Query Packets.
-                                                             (line  411)
+                                                             (line  466)
 * switching threads:                     Threads.            (line    6)
 * switching threads automatically:       All-Stop Mode.      (line   28)
-* symbol cache size:                     Symbols.            (line  447)
-* symbol cache, flushing:                Symbols.            (line  463)
-* symbol cache, printing its contents:   Symbols.            (line  455)
-* symbol cache, printing usage statistics: Symbols.          (line  459)
-* symbol decoding style, C++:            Print Settings.     (line  429)
-* symbol dump:                           Symbols.            (line  382)
-* symbol file functions:                 Debugging Output.   (line  232)
+* symbol cache size:                     Symbols.            (line  451)
+* symbol cache, flushing:                Symbols.            (line  467)
+* symbol cache, printing its contents:   Symbols.            (line  459)
+* symbol cache, printing usage statistics: Symbols.          (line  463)
+* symbol decoding style, C++:            Print Settings.     (line  427)
+* symbol dump:                           Symbols.            (line  372)
+* symbol file functions:                 Debugging Output.   (line  180)
+* symbol files, remote debugging:        Connecting.         (line   90)
 * symbol from address:                   Symbols.            (line   84)
-* symbol lookup:                         Debugging Output.   (line  223)
+* symbol lookup:                         Debugging Output.   (line  173)
 * symbol lookup, remote request:         General Query Packets.
-                                                             (line  792)
+                                                             (line  922)
 * symbol names:                          Symbols.            (line   14)
 * symbol table:                          Files.              (line    6)
-* symbol table creation:                 Debugging Output.   (line  239)
+* symbol table creation:                 Debugging Output.   (line  185)
 * symbol tables in guile:                Symbol Tables In Guile.
                                                              (line    6)
 * symbol tables in python:               Symbol Tables In Python.
                                                              (line    6)
-* symbol tables, listing GDB's internal: Symbols.            (line  401)
-* symbol, source file and line:          Print Settings.     (line   51)
+* symbol tables, listing GDB's internal: Symbols.            (line  398)
+* symbol, source file and line:          Print Settings.     (line   50)
 * symbols in guile:                      Symbols In Guile.   (line    6)
 * symbols in python:                     Symbols In Python.  (line    6)
-* symbols, reading from relocatable object files: Files.     (line  133)
-* symbols, reading immediately:          Files.              (line   90)
-* synchronize with remote MIPS target:   MIPS Embedded.      (line   98)
-* syscall DSO:                           Files.              (line  183)
+* symbols, reading from relocatable object files: Files.     (line  132)
+* symbols, reading immediately:          Files.              (line   89)
+* Synopsys ARC:                          ARC.                (line    6)
+* syscall DSO:                           Files.              (line  179)
 * system calls and thread breakpoints:   Interrupted System Calls.
                                                              (line    6)
-* system root, alternate:                Files.              (line  393)
+* system root, alternate:                Files.              (line  372)
 * system, file-i/o system call:          system.             (line    6)
 * system-wide configuration scripts:     System-wide Configuration Scripts.
                                                              (line    6)
 * system-wide init file:                 System-wide configuration.
                                                              (line    6)
-* T packet:                              Packets.            (line  346)
-* t packet:                              Packets.            (line  341)
-* T packet reply:                        Stop Reply Packets. (line   22)
+* t packet:                              Packets.            (line  331)
+* T packet:                              Packets.            (line  336)
+* T packet reply:                        Stop Reply Packets. (line   26)
 * tail call frames, debugging:           Tail Call Frames.   (line    6)
 * target architecture:                   Targets.            (line   17)
 * target byte order:                     Byte Order.         (line    6)
 * target character set:                  Character Sets.     (line    6)
-* target debugging info:                 Debugging Output.   (line  248)
+* target debugging info:                 Debugging Output.   (line  192)
 * target descriptions:                   Target Descriptions.
                                                              (line    6)
 * target descriptions, AArch64 features: AArch64 Features.   (line    6)
+* target descriptions, ARC Features:     ARC Features.       (line    6)
 * target descriptions, ARM features:     ARM Features.       (line    6)
+* target descriptions, enum types:       Enum Target Types.  (line    6)
 * target descriptions, i386 features:    i386 Features.      (line    6)
 * target descriptions, inclusion:        Target Description Format.
-                                                             (line   54)
+                                                             (line   53)
 * target descriptions, M68K features:    M68K Features.      (line    6)
 * target descriptions, MicroBlaze features: MicroBlaze Features.
                                                              (line    6)
 * target descriptions, MIPS features:    MIPS Features.      (line    6)
+* target descriptions, NDS32 features:   NDS32 Features.     (line    6)
 * target descriptions, Nios II features: Nios II Features.   (line    6)
 * target descriptions, PowerPC features: PowerPC Features.   (line    6)
 * target descriptions, predefined types: Predefined Target Types.
                                                              (line    6)
 * target descriptions, S/390 features:   S/390 and System z Features.
                                                              (line    6)
+* target descriptions, sparc32 features: Sparc Features.     (line    6)
+* target descriptions, sparc64 features: Sparc Features.     (line    6)
 * target descriptions, standard features: Standard Target Features.
                                                              (line    6)
 * target descriptions, System z features: S/390 and System z Features.
@@ -2874,62 +4083,65 @@ Concept Index
 * target descriptions, TMS320C6x features: TIC6x Features.   (line    6)
 * target descriptions, XML format:       Target Description Format.
                                                              (line    6)
-* target memory comparison:              Memory.             (line  132)
+* target memory comparison:              Memory.             (line  142)
 * target output in GDB/MI:               GDB/MI Output Syntax.
                                                              (line  110)
-* target remote:                         Connecting.         (line   15)
 * target stack description:              Maintenance Commands.
-                                                             (line  334)
+                                                             (line  324)
 * target-assisted range stepping:        Continuing and Stepping.
-                                                             (line  213)
-* task attributes (GNU Hurd):            Hurd Native.        (line   49)
-* task breakpoints, in Ada:              Ada Tasks.          (line  135)
-* task exception port, GNU Hurd:         Hurd Native.        (line   68)
-* task suspend count:                    Hurd Native.        (line   60)
+                                                             (line  210)
+* task attributes (GNU Hurd):            Hurd Native.        (line   48)
+* task breakpoints, in Ada:              Ada Tasks.          (line  134)
+* task exception port, GNU Hurd:         Hurd Native.        (line   67)
+* task suspend count:                    Hurd Native.        (line   59)
 * task switching with program using Ravenscar Profile: Ravenscar Profile.
                                                              (line   10)
-* TCP port, target remote:               Connecting.         (line   33)
+* TCP port, target remote:               Connecting.         (line  142)
 * terminal:                              Input/Output.       (line    6)
 * Text User Interface:                   TUI.                (line    6)
 * thread attributes info, remote request: General Query Packets.
-                                                             (line  836)
+                                                             (line  965)
 * thread breakpoints:                    Thread-Specific Breakpoints.
                                                              (line   10)
 * thread breakpoints and system calls:   Interrupted System Calls.
                                                              (line    6)
-* thread default settings, GNU Hurd:     Hurd Native.        (line  131)
-* thread identifier (GDB):               Threads.            (line   63)
-* thread identifier (system):            Threads.            (line   51)
-* thread info (Solaris):                 Threads.            (line   98)
+* thread create event, remote reply:     Stop Reply Packets. (line  152)
+* thread create/exit events, remote request: General Query Packets.
+                                                             (line  386)
+* thread default settings, GNU Hurd:     Hurd Native.        (line  130)
+* thread exit event, remote reply:       Stop Reply Packets. (line  181)
+* thread ID lists:                       Threads.            (line   65)
+* thread identifier (GDB):               Threads.            (line   47)
+* thread identifier (system):            Threads.            (line   35)
+* thread info (Solaris):                 Threads.            (line  167)
 * thread information, remote request:    General Query Packets.
-                                                             (line  252)
+                                                             (line  246)
 * thread list format:                    Thread List Format. (line    6)
-* thread number:                         Threads.            (line   63)
-* thread properties, GNU Hurd:           Hurd Native.        (line   91)
-* thread suspend count, GNU Hurd:        Hurd Native.        (line  110)
+* thread number, per inferior:           Threads.            (line   47)
+* thread properties, GNU Hurd:           Hurd Native.        (line   90)
+* thread suspend count, GNU Hurd:        Hurd Native.        (line  109)
 * THREAD-ID, in remote protocol:         Packets.            (line   20)
-* threads and watchpoints:               Set Watchpoints.    (line  180)
+* threads and watchpoints:               Set Watchpoints.    (line  179)
 * threads in python:                     Threads In Python.  (line    6)
 * threads of execution:                  Threads.            (line    6)
 * threads, automatic switching:          All-Stop Mode.      (line   28)
 * threads, continuing:                   Thread Stops.       (line    6)
 * threads, stopped:                      Thread Stops.       (line    6)
 * time of command execution:             Maintenance Commands.
-                                                             (line  471)
+                                                             (line  482)
 * timeout for commands:                  Maintenance Commands.
-                                                             (line  493)
+                                                             (line  503)
 * timeout for serial communications:     Remote Configuration.
                                                              (line   72)
 * timeout, for remote target connection: Remote Configuration.
                                                              (line  140)
-* timeout, MIPS protocol:                MIPS Embedded.      (line   83)
-* timestampping debugging info:          Debugging Output.   (line  257)
+* timestampping debugging info:          Debugging Output.   (line  199)
 * trace experiment, status of:           Starting and Stopping Trace Experiments.
                                                              (line   27)
 * trace file format:                     Trace File Format.  (line    6)
 * trace files:                           Trace Files.        (line    6)
 * trace state variable value, remote request: Tracepoint Packets.
-                                                             (line  333)
+                                                             (line  318)
 * trace state variables:                 Trace State Variables.
                                                              (line    6)
 * traceback:                             Backtrace.          (line    6)
@@ -2940,19 +4152,19 @@ Concept Index
                                                              (line    6)
 * tracepoint data, display:              tdump.              (line    6)
 * tracepoint deletion:                   Create and Delete Tracepoints.
-                                                             (line  126)
+                                                             (line  125)
 * tracepoint number:                     Create and Delete Tracepoints.
-                                                             (line  123)
+                                                             (line  122)
 * tracepoint packets:                    Tracepoint Packets. (line    6)
 * tracepoint pass count:                 Tracepoint Passcounts.
                                                              (line    6)
 * tracepoint restrictions:               Tracepoint Restrictions.
                                                              (line    6)
-* tracepoint status, remote request:     Tracepoint Packets. (line  321)
+* tracepoint status, remote request:     Tracepoint Packets. (line  307)
 * tracepoint variables:                  Tracepoint Variables.
                                                              (line    6)
 * tracepoints:                           Tracepoints.        (line    6)
-* tracepoints support in gdbserver:      Server.             (line  290)
+* tracepoints support in gdbserver:      Server.             (line  260)
 * trailing underscore, in Fortran symbols: Fortran.          (line    9)
 * translating between character sets:    Character Sets.     (line    6)
 * TUI:                                   TUI.                (line    6)
@@ -2961,9 +4173,9 @@ Concept Index
 * TUI key bindings:                      TUI Keys.           (line    6)
 * TUI single key mode:                   TUI Single Key Mode.
                                                              (line    6)
-* type casting memory:                   Expressions.        (line   43)
+* type casting memory:                   Expressions.        (line   41)
 * type chain of a data type:             Maintenance Commands.
-                                                             (line  346)
+                                                             (line  336)
 * type checking:                         Checks.             (line   24)
 * type conversions in C++:               C Plus Plus Expressions.
                                                              (line   26)
@@ -2971,13 +4183,13 @@ Concept Index
 * type printing API for Python:          Type Printing API.  (line    6)
 * types in guile:                        Types In Guile.     (line    6)
 * types in Python:                       Types In Python.    (line    6)
-* UDP port, target remote:               Connecting.         (line   53)
-* union field name completion:           Completion.         (line  122)
-* unions in structures, printing:        Print Settings.     (line  369)
+* UDP port, target remote:               Connecting.         (line  164)
+* union field name completion:           Completion.         (line  120)
+* unions in structures, printing:        Print Settings.     (line  367)
 * unknown address, locating:             Output Formats.     (line   35)
 * unlink, file-i/o system call:          unlink.             (line    6)
 * unlinked object files:                 Files.              (line   26)
-* unload symbols from shared libraries:  Files.              (line  355)
+* unload symbols from shared libraries:  Files.              (line  334)
 * unmap an overlay:                      Overlay Commands.   (line   39)
 * unmapped overlays:                     How Overlays Work.  (line    6)
 * unset tdesc filename:                  Retrieving Descriptions.
@@ -2991,7 +4203,7 @@ Concept Index
                                                              (line    6)
 * use only software watchpoints:         Set Watchpoints.    (line  108)
 * user registers:                        Maintenance Commands.
-                                                             (line  305)
+                                                             (line  295)
 * user-defined command:                  Define.             (line    6)
 * user-defined macros:                   Macros.             (line   59)
 * user-defined variables:                Convenience Vars.   (line    6)
@@ -3001,48 +4213,49 @@ Concept Index
 * values from inferior, with Python:     Values From Inferior.
                                                              (line    6)
 * variable name conflict:                Variables.          (line   36)
-* variable object debugging info:        Debugging Output.   (line  266)
+* variable object debugging info:        Debugging Output.   (line  206)
 * variable objects in GDB/MI:            GDB/MI Variable Objects.
                                                              (line    9)
 * variable values, wrong:                Variables.          (line  106)
 * variables, readline:                   Readline Init File Syntax.
                                                              (line   34)
 * variables, setting:                    Assignment.         (line   16)
-* vAttach packet:                        Packets.            (line  361)
-* vCont packet:                          Packets.            (line  381)
-* vCont? packet:                         Packets.            (line  446)
+* vAttach packet:                        Packets.            (line  350)
+* vCont packet:                          Packets.            (line  368)
+* vCont? packet:                         Packets.            (line  435)
+* vCtrlC packet:                         Packets.            (line  445)
 * vector unit:                           Vector Unit.        (line    6)
 * vector, auxiliary:                     OS Information.     (line    9)
 * verbose operation:                     Messages/Warnings.  (line    6)
-* verify remote memory image:            Memory.             (line  132)
-* verify target memory image:            Memory.             (line  132)
-* vFile packet:                          Packets.            (line  457)
-* vFlashDone packet:                     Packets.            (line  500)
-* vFlashErase packet:                    Packets.            (line  461)
+* verify remote memory image:            Memory.             (line  142)
+* verify target memory image:            Memory.             (line  142)
+* vFile packet:                          Packets.            (line  459)
+* vFlashDone packet:                     Packets.            (line  498)
+* vFlashErase packet:                    Packets.            (line  463)
 * vFlashWrite packet:                    Packets.            (line  478)
-* vfork events, remote reply:            Stop Reply Packets. (line  108)
-* vforkdone events, remote reply:        Stop Reply Packets. (line  120)
-* virtual functions (C++) display:       Print Settings.     (line  502)
-* vKill packet:                          Packets.            (line  508)
+* vfork events, remote reply:            Stop Reply Packets. (line  116)
+* vforkdone events, remote reply:        Stop Reply Packets. (line  128)
+* virtual functions (C++) display:       Print Settings.     (line  500)
+* vKill packet:                          Packets.            (line  505)
 * volatile registers:                    Registers.          (line  101)
-* vRun packet:                           Packets.            (line  521)
-* vStopped packet:                       Packets.            (line  538)
-* VTBL display:                          Print Settings.     (line  502)
+* vRun packet:                           Packets.            (line  517)
+* vStopped packet:                       Packets.            (line  532)
+* VTBL display:                          Print Settings.     (line  500)
 * watchdog timer:                        Maintenance Commands.
-                                                             (line  493)
-* watchpoints:                           Breakpoints.        (line   20)
-* watchpoints and threads:               Set Watchpoints.    (line  180)
-* weak alias functions:                  Calling.            (line   59)
-* where to look for shared libraries:    Files.              (line  388)
-* wild pointer, interpreting:            Print Settings.     (line   81)
+                                                             (line  503)
+* watchpoints:                           Breakpoints.        (line   17)
+* watchpoints and threads:               Set Watchpoints.    (line  179)
+* weak alias functions:                  Calling.            (line   58)
+* where to look for shared libraries:    Files.              (line  367)
+* wild pointer, interpreting:            Print Settings.     (line   80)
 * Wind River Linux system-wide configuration script: System-wide Configuration Scripts.
-                                                             (line   21)
+                                                             (line   22)
 * word completion:                       Completion.         (line    6)
-* working directory:                     Source Path.        (line  108)
+* working directory:                     Source Path.        (line  106)
 * working directory (of your program):   Working Directory.  (line    6)
 * working language:                      Languages.          (line   13)
 * write data into object, remote request: General Query Packets.
-                                                             (line 1108)
+                                                             (line 1238)
 * write, file-i/o system call:           write.              (line    6)
 * writing a frame filter:                Writing a Frame Filter.
                                                              (line    6)
@@ -3053,37 +4266,2921 @@ Concept Index
 * writing convenience functions:         Functions In Python.
                                                              (line    6)
 * writing into corefiles:                Patching.           (line    6)
+* writing into executables:              Patching.           (line    6)
 * writing into executables <1>:          Compiling and Injecting Code.
                                                              (line    6)
-* writing into executables:              Patching.           (line    6)
 * writing JIT debug info readers:        Writing JIT Debug Info Readers.
                                                              (line    6)
 * writing xmethods in Python:            Writing an Xmethod. (line    6)
 * wrong values:                          Variables.          (line  106)
 * x command, default address:            Machine Code.       (line   30)
-* X packet:                              Packets.            (line  541)
+* X packet:                              Packets.            (line  535)
 * Xilinx MicroBlaze:                     MicroBlaze.         (line    6)
 * XInclude:                              Target Description Format.
-                                                             (line   54)
+                                                             (line   53)
 * XMD, Xilinx Microprocessor Debugger:   MicroBlaze.         (line    6)
 * xmethod API:                           Xmethod API.        (line    6)
 * xmethods in Python:                    Xmethods In Python. (line    6)
-* XML parser debugging:                  Debugging Output.   (line  274)
+* XML parser debugging:                  Debugging Output.   (line  212)
 * yanking text:                          Readline Killing Commands.
                                                              (line    6)
-* z packet:                              Packets.            (line  555)
-* Z packets:                             Packets.            (line  555)
-* Z0 packet:                             Packets.            (line  570)
-* z0 packet:                             Packets.            (line  570)
-* Z1 packet:                             Packets.            (line  628)
-* z1 packet:                             Packets.            (line  628)
-* Z2 packet:                             Packets.            (line  650)
-* z2 packet:                             Packets.            (line  650)
-* Z3 packet:                             Packets.            (line  665)
-* z3 packet:                             Packets.            (line  665)
-* Z4 packet:                             Packets.            (line  680)
-* z4 packet:                             Packets.            (line  680)
-* Z8000:                                 Z8000.              (line    6)
-* Zilog Z8000 simulator:                 Z8000.              (line    6)
-* {TYPE}:                                Expressions.        (line   43)
+* z packet:                              Packets.            (line  548)
+* Z packets:                             Packets.            (line  548)
+* z0 packet:                             Packets.            (line  563)
+* Z0 packet:                             Packets.            (line  563)
+* z1 packet:                             Packets.            (line  618)
+* Z1 packet:                             Packets.            (line  618)
+* z2 packet:                             Packets.            (line  639)
+* Z2 packet:                             Packets.            (line  639)
+* z3 packet:                             Packets.            (line  652)
+* Z3 packet:                             Packets.            (line  652)
+* z4 packet:                             Packets.            (line  665)
+* Z4 packet:                             Packets.            (line  665)
+
+
+File: gdb.info,  Node: Command and Variable Index,  Prev: Concept Index,  Up: Top
+
+Command, Variable, and Function Index
+*************************************
+
+[index]
+* Menu:
+
+* !:                                     Shell Commands.      (line  10)
+* # (a comment):                         Command Syntax.      (line  37)
+* $bpnum, convenience variable:          Set Breaks.          (line   6)
+* $cdir, convenience variable:           Source Path.         (line 106)
+* $cwd, convenience variable:            Source Path.         (line 106)
+* $tpnum:                                Create and Delete Tracepoints.
+                                                              (line 122)
+* $tracepoint:                           Tracepoint Variables.
+                                                              (line  10)
+* $trace_file:                           Tracepoint Variables.
+                                                              (line  16)
+* $trace_frame:                          Tracepoint Variables.
+                                                              (line   6)
+* $trace_func:                           Tracepoint Variables.
+                                                              (line  19)
+* $trace_line:                           Tracepoint Variables.
+                                                              (line  13)
+* $_, convenience variable:              Convenience Vars.    (line  65)
+* $_any_caller_is, convenience function: Convenience Funs.    (line 111)
+* $_any_caller_matches, convenience function: Convenience Funs.
+                                                              (line 123)
+* $_as_string, convenience function:     Convenience Funs.    (line 135)
+* $_caller_is, convenience function:     Convenience Funs.    (line  81)
+* $_caller_matches, convenience function: Convenience Funs.   (line 104)
+* $_exception, convenience variable:     Set Catchpoints.     (line  21)
+* $_exitcode, convenience variable:      Convenience Vars.    (line  80)
+* $_exitsignal, convenience variable:    Convenience Vars.    (line  85)
+* $_gthread, convenience variable:       Threads.             (line  98)
+* $_inferior, convenience variable:      Inferiors and Programs.
+                                                              (line  53)
+* $_isvoid, convenience function:        Convenience Funs.    (line  15)
+* $_memeq, convenience function:         Convenience Funs.    (line  65)
+* $_probe_arg, convenience variable:     Static Probe Points. (line  77)
+* $_regex, convenience function:         Convenience Funs.    (line  69)
+* $_sdata, collect:                      Tracepoint Actions.  (line  86)
+* $_sdata, inspect, convenience variable: Convenience Vars.   (line 142)
+* $_siginfo, convenience variable:       Convenience Vars.    (line 148)
+* $_streq, convenience function:         Convenience Funs.    (line  74)
+* $_strlen, convenience function:        Convenience Funs.    (line  78)
+* $_thread, convenience variable:        Threads.             (line  98)
+* $_tlb, convenience variable:           Convenience Vars.    (line 154)
+* $__, convenience variable:             Convenience Vars.    (line  74)
+* (make-command:                         Commands In Guile.   (line  15)
+* (make-parameter:                       Parameters In Guile. (line  22)
+* -ada-task-info:                        GDB/MI Ada Tasking Commands.
+                                                              (line   9)
+* -add-inferior:                         GDB/MI Miscellaneous Commands.
+                                                              (line 295)
+* -break-after:                          GDB/MI Breakpoint Commands.
+                                                              (line  11)
+* -break-commands:                       GDB/MI Breakpoint Commands.
+                                                              (line  56)
+* -break-condition:                      GDB/MI Breakpoint Commands.
+                                                              (line  90)
+* -break-delete:                         GDB/MI Breakpoint Commands.
+                                                              (line 127)
+* -break-disable:                        GDB/MI Breakpoint Commands.
+                                                              (line 161)
+* -break-enable:                         GDB/MI Breakpoint Commands.
+                                                              (line 197)
+* -break-info:                           GDB/MI Breakpoint Commands.
+                                                              (line 232)
+* -break-insert:                         GDB/MI Breakpoint Commands.
+                                                              (line 256)
+* -break-list:                           GDB/MI Breakpoint Commands.
+                                                              (line 427)
+* -break-passcount:                      GDB/MI Breakpoint Commands.
+                                                              (line 499)
+* -break-watch:                          GDB/MI Breakpoint Commands.
+                                                              (line 511)
+* -catch-assert:                         Ada Exception GDB/MI Catchpoint Commands.
+                                                              (line  12)
+* -catch-exception:                      Ada Exception GDB/MI Catchpoint Commands.
+                                                              (line  46)
+* -catch-load:                           Shared Library GDB/MI Catchpoint Commands.
+                                                              (line   9)
+* -catch-unload:                         Shared Library GDB/MI Catchpoint Commands.
+                                                              (line  36)
+* -data-disassemble:                     GDB/MI Data Manipulation.
+                                                              (line  15)
+* -data-evaluate-expression:             GDB/MI Data Manipulation.
+                                                              (line 186)
+* -data-list-changed-registers:          GDB/MI Data Manipulation.
+                                                              (line 224)
+* -data-list-register-names:             GDB/MI Data Manipulation.
+                                                              (line 260)
+* -data-list-register-values:            GDB/MI Data Manipulation.
+                                                              (line 300)
+* -data-read-memory:                     GDB/MI Data Manipulation.
+                                                              (line 387)
+* -data-read-memory-bytes:               GDB/MI Data Manipulation.
+                                                              (line 494)
+* -data-write-memory-bytes:              GDB/MI Data Manipulation.
+                                                              (line 569)
+* -dprintf-insert:                       GDB/MI Breakpoint Commands.
+                                                              (line 363)
+* -enable-frame-filters:                 GDB/MI Stack Manipulation.
+                                                              (line   9)
+* -enable-pretty-printing:               GDB/MI Variable Objects.
+                                                              (line 118)
+* -enable-timings:                       GDB/MI Miscellaneous Commands.
+                                                              (line 392)
+* -environment-cd:                       GDB/MI Program Context.
+                                                              (line  33)
+* -environment-directory:                GDB/MI Program Context.
+                                                              (line  56)
+* -environment-path:                     GDB/MI Program Context.
+                                                              (line 100)
+* -environment-pwd:                      GDB/MI Program Context.
+                                                              (line 141)
+* -exec-arguments:                       GDB/MI Program Context.
+                                                              (line   9)
+* -exec-continue:                        GDB/MI Program Execution.
+                                                              (line  13)
+* -exec-finish:                          GDB/MI Program Execution.
+                                                              (line  53)
+* -exec-interrupt:                       GDB/MI Program Execution.
+                                                              (line  96)
+* -exec-jump:                            GDB/MI Program Execution.
+                                                              (line 146)
+* -exec-next:                            GDB/MI Program Execution.
+                                                              (line 170)
+* -exec-next-instruction:                GDB/MI Program Execution.
+                                                              (line 201)
+* -exec-return:                          GDB/MI Program Execution.
+                                                              (line 237)
+* -exec-run:                             GDB/MI Program Execution.
+                                                              (line 280)
+* -exec-step:                            GDB/MI Program Execution.
+                                                              (line 350)
+* -exec-step-instruction:                GDB/MI Program Execution.
+                                                              (line 392)
+* -exec-until:                           GDB/MI Program Execution.
+                                                              (line 433)
+* -file-exec-and-symbols:                GDB/MI File Commands.
+                                                              (line  12)
+* -file-exec-file:                       GDB/MI File Commands.
+                                                              (line  40)
+* -file-list-exec-source-file:           GDB/MI File Commands.
+                                                              (line  67)
+* -file-list-exec-source-files:          GDB/MI File Commands.
+                                                              (line  93)
+* -file-symbol-file:                     GDB/MI File Commands.
+                                                              (line 123)
+* -gdb-exit:                             GDB/MI Miscellaneous Commands.
+                                                              (line   9)
+* -gdb-set:                              GDB/MI Miscellaneous Commands.
+                                                              (line  31)
+* -gdb-show:                             GDB/MI Miscellaneous Commands.
+                                                              (line  54)
+* -gdb-version:                          GDB/MI Miscellaneous Commands.
+                                                              (line  77)
+* -inferior-tty-set:                     GDB/MI Miscellaneous Commands.
+                                                              (line 343)
+* -inferior-tty-show:                    GDB/MI Miscellaneous Commands.
+                                                              (line 366)
+* -info-ada-exceptions:                  GDB/MI Ada Exceptions Commands.
+                                                              (line   9)
+* -info-gdb-mi-command:                  GDB/MI Support Commands.
+                                                              (line  14)
+* -info-os:                              GDB/MI Miscellaneous Commands.
+                                                              (line 221)
+* -interpreter-exec:                     GDB/MI Miscellaneous Commands.
+                                                              (line 317)
+* -list-features:                        GDB/MI Support Commands.
+                                                              (line  57)
+* -list-target-features:                 GDB/MI Support Commands.
+                                                              (line 112)
+* -list-thread-groups:                   GDB/MI Miscellaneous Commands.
+                                                              (line 111)
+* -stack-info-depth:                     GDB/MI Stack Manipulation.
+                                                              (line  50)
+* -stack-info-frame:                     GDB/MI Stack Manipulation.
+                                                              (line  24)
+* -stack-list-arguments:                 GDB/MI Stack Manipulation.
+                                                              (line  88)
+* -stack-list-frames:                    GDB/MI Stack Manipulation.
+                                                              (line 182)
+* -stack-list-locals:                    GDB/MI Stack Manipulation.
+                                                              (line 281)
+* -stack-list-variables:                 GDB/MI Stack Manipulation.
+                                                              (line 327)
+* -stack-select-frame:                   GDB/MI Stack Manipulation.
+                                                              (line 355)
+* -symbol-list-lines:                    GDB/MI Symbol Query. (line   9)
+* -target-attach:                        GDB/MI Target Manipulation.
+                                                              (line   9)
+* -target-detach:                        GDB/MI Target Manipulation.
+                                                              (line  36)
+* -target-disconnect:                    GDB/MI Target Manipulation.
+                                                              (line  61)
+* -target-download:                      GDB/MI Target Manipulation.
+                                                              (line  85)
+* -target-file-delete:                   GDB/MI File Transfer Commands.
+                                                              (line  57)
+* -target-file-get:                      GDB/MI File Transfer Commands.
+                                                              (line  33)
+* -target-file-put:                      GDB/MI File Transfer Commands.
+                                                              (line   9)
+* -target-flash-erase:                   GDB/MI Target Manipulation.
+                                                              (line 192)
+* -target-select:                        GDB/MI Target Manipulation.
+                                                              (line 212)
+* -thread-info:                          GDB/MI Thread Commands.
+                                                              (line   9)
+* -thread-list-ids:                      GDB/MI Thread Commands.
+                                                              (line  89)
+* -thread-select:                        GDB/MI Thread Commands.
+                                                              (line 117)
+* -trace-define-variable:                GDB/MI Tracepoint Commands.
+                                                              (line  80)
+* -trace-find:                           GDB/MI Tracepoint Commands.
+                                                              (line  12)
+* -trace-frame-collected:                GDB/MI Tracepoint Commands.
+                                                              (line  97)
+* -trace-list-variables:                 GDB/MI Tracepoint Commands.
+                                                              (line 204)
+* -trace-save:                           GDB/MI Tracepoint Commands.
+                                                              (line 246)
+* -trace-start:                          GDB/MI Tracepoint Commands.
+                                                              (line 267)
+* -trace-status:                         GDB/MI Tracepoint Commands.
+                                                              (line 283)
+* -trace-stop:                           GDB/MI Tracepoint Commands.
+                                                              (line 354)
+* -var-assign:                           GDB/MI Variable Objects.
+                                                              (line 497)
+* -var-create:                           GDB/MI Variable Objects.
+                                                              (line 136)
+* -var-delete:                           GDB/MI Variable Objects.
+                                                              (line 224)
+* -var-evaluate-expression:              GDB/MI Variable Objects.
+                                                              (line 476)
+* -var-info-expression:                  GDB/MI Variable Objects.
+                                                              (line 413)
+* -var-info-num-children:                GDB/MI Variable Objects.
+                                                              (line 278)
+* -var-info-path-expression:             GDB/MI Variable Objects.
+                                                              (line 438)
+* -var-info-type:                        GDB/MI Variable Objects.
+                                                              (line 400)
+* -var-list-children:                    GDB/MI Variable Objects.
+                                                              (line 294)
+* -var-set-format:                       GDB/MI Variable Objects.
+                                                              (line 237)
+* -var-set-frozen:                       GDB/MI Variable Objects.
+                                                              (line 641)
+* -var-set-update-range:                 GDB/MI Variable Objects.
+                                                              (line 667)
+* -var-set-visualizer:                   GDB/MI Variable Objects.
+                                                              (line 690)
+* -var-show-attributes:                  GDB/MI Variable Objects.
+                                                              (line 462)
+* -var-show-format:                      GDB/MI Variable Objects.
+                                                              (line 265)
+* -var-update:                           GDB/MI Variable Objects.
+                                                              (line 521)
+* <gdb:arch>:                            Architectures In Guile.
+                                                              (line   6)
+* <gdb:block>:                           Blocks In Guile.     (line   6)
+* <gdb:breakpoint>:                      Breakpoints In Guile.
+                                                              (line   6)
+* <gdb:iterator>:                        Iterators In Guile.  (line   6)
+* <gdb:lazy-string>:                     Lazy Strings In Guile.
+                                                              (line   6)
+* <gdb:objfile>:                         Objfiles In Guile.   (line   6)
+* <gdb:progspace>:                       Progspaces In Guile. (line   6)
+* <gdb:sal>:                             Symbol Tables In Guile.
+                                                              (line   6)
+* <gdb:symbol>:                          Symbols In Guile.    (line   6)
+* <gdb:symtab>:                          Symbol Tables In Guile.
+                                                              (line   6)
+* <gdb:type>:                            Types In Guile.      (line   6)
+* <gdb:value>:                           Values From Inferior In Guile.
+                                                              (line   6)
+* @, referencing memory as an array:     Arrays.              (line   6)
+* ^connected:                            GDB/MI Result Records.
+                                                              (line  22)
+* ^done:                                 GDB/MI Result Records.
+                                                              (line   9)
+* ^error:                                GDB/MI Result Records.
+                                                              (line  25)
+* ^exit:                                 GDB/MI Result Records.
+                                                              (line  36)
+* ^running:                              GDB/MI Result Records.
+                                                              (line  14)
+* __init__ on TypePrinter:               gdb.types.           (line  82)
+* abort (C-g):                           Miscellaneous Commands.
+                                                              (line  10)
+* accept-line (Newline or Return):       Commands For History.
+                                                              (line   6)
+* actions:                               Tracepoint Actions.  (line   6)
+* ada-task-info:                         GDB/MI Support Commands.
+                                                              (line  94)
+* add-auto-load-safe-path:               Auto-loading safe path.
+                                                              (line  50)
+* add-auto-load-scripts-directory:       objfile-gdbdotext file.
+                                                              (line  64)
+* add-inferior:                          Inferiors and Programs.
+                                                              (line  66)
+* add-symbol-file:                       Files.               (line 112)
+* add-symbol-file-from-memory:           Files.               (line 179)
+* advance LOCATION:                      Continuing and Stepping.
+                                                              (line 180)
+* alias:                                 Aliases.             (line  21)
+* append:                                Dump/Restore Files.  (line  34)
+* append-pretty-printer!:                Guile Printing Module.
+                                                              (line  18)
+* apropos:                               Help.                (line  62)
+* arch-bool-type:                        Architectures In Guile.
+                                                              (line  84)
+* arch-char-type:                        Architectures In Guile.
+                                                              (line  36)
+* arch-charset:                          Architectures In Guile.
+                                                              (line  23)
+* arch-disassemble:                      Disassembly In Guile.
+                                                              (line  10)
+* arch-double-type:                      Architectures In Guile.
+                                                              (line  76)
+* arch-float-type:                       Architectures In Guile.
+                                                              (line  72)
+* arch-int-type:                         Architectures In Guile.
+                                                              (line  44)
+* arch-int16-type:                       Architectures In Guile.
+                                                              (line 104)
+* arch-int32-type:                       Architectures In Guile.
+                                                              (line 112)
+* arch-int64-type:                       Architectures In Guile.
+                                                              (line 120)
+* arch-int8-type:                        Architectures In Guile.
+                                                              (line  96)
+* arch-long-type:                        Architectures In Guile.
+                                                              (line  48)
+* arch-longdouble-type:                  Architectures In Guile.
+                                                              (line  80)
+* arch-longlong-type:                    Architectures In Guile.
+                                                              (line  88)
+* arch-name:                             Architectures In Guile.
+                                                              (line  20)
+* arch-schar-type:                       Architectures In Guile.
+                                                              (line  52)
+* arch-short-type:                       Architectures In Guile.
+                                                              (line  40)
+* arch-uchar-type:                       Architectures In Guile.
+                                                              (line  56)
+* arch-uint-type:                        Architectures In Guile.
+                                                              (line  64)
+* arch-uint16-type:                      Architectures In Guile.
+                                                              (line 108)
+* arch-uint32-type:                      Architectures In Guile.
+                                                              (line 116)
+* arch-uint64-type:                      Architectures In Guile.
+                                                              (line 124)
+* arch-uint8-type:                       Architectures In Guile.
+                                                              (line 100)
+* arch-ulong-type:                       Architectures In Guile.
+                                                              (line  68)
+* arch-ulonglong-type:                   Architectures In Guile.
+                                                              (line  92)
+* arch-ushort-type:                      Architectures In Guile.
+                                                              (line  60)
+* arch-void-type:                        Architectures In Guile.
+                                                              (line  32)
+* arch-wide-charset:                     Architectures In Guile.
+                                                              (line  26)
+* arch?:                                 Architectures In Guile.
+                                                              (line  13)
+* Architecture.disassemble:              Architectures In Python.
+                                                              (line  15)
+* Architecture.name:                     Architectures In Python.
+                                                              (line  12)
+* attach:                                Attach.              (line   6)
+* attach&:                               Background Execution.
+                                                              (line  25)
+* awatch:                                Set Watchpoints.     (line  83)
+* b (break):                             Set Breaks.          (line   6)
+* backtrace:                             Backtrace.           (line  11)
+* backward-char (C-b):                   Commands For Moving. (line  15)
+* backward-delete-char (Rubout):         Commands For Text.   (line  11)
+* backward-kill-line (C-x Rubout):       Commands For Killing.
+                                                              (line   9)
+* backward-kill-word (M-<DEL>):          Commands For Killing.
+                                                              (line  24)
+* backward-word (M-b):                   Commands For Moving. (line  22)
+* beginning-of-history (M-<):            Commands For History.
+                                                              (line  19)
+* beginning-of-line (C-a):               Commands For Moving. (line   6)
+* bell-style:                            Readline Init File Syntax.
+                                                              (line  35)
+* bfd caching:                           File Caching.        (line  14)
+* bfd caching <1>:                       File Caching.        (line  24)
+* bfd caching <2>:                       File Caching.        (line  27)
+* bind-tty-special-chars:                Readline Init File Syntax.
+                                                              (line  42)
+* block-end:                             Blocks In Guile.     (line  70)
+* block-function:                        Blocks In Guile.     (line  73)
+* block-global-block:                    Blocks In Guile.     (line  87)
+* block-global?:                         Blocks In Guile.     (line  93)
+* block-start:                           Blocks In Guile.     (line  67)
+* block-static-block:                    Blocks In Guile.     (line  90)
+* block-static?:                         Blocks In Guile.     (line  97)
+* block-superblock:                      Blocks In Guile.     (line  83)
+* block-symbols:                         Blocks In Guile.     (line 101)
+* block-symbols-progress?:               Blocks In Guile.     (line 112)
+* block-valid?:                          Blocks In Guile.     (line  59)
+* Block.end:                             Blocks In Python.    (line  81)
+* Block.function:                        Blocks In Python.    (line  84)
+* Block.global_block:                    Blocks In Python.    (line  99)
+* Block.is_global:                       Blocks In Python.    (line 107)
+* Block.is_static:                       Blocks In Python.    (line 111)
+* Block.is_valid:                        Blocks In Python.    (line  68)
+* Block.start:                           Blocks In Python.    (line  78)
+* Block.static_block:                    Blocks In Python.    (line 103)
+* Block.superblock:                      Blocks In Python.    (line  94)
+* block?:                                Blocks In Guile.     (line  55)
+* BP_ACCESS_WATCHPOINT:                  Breakpoints In Python.
+                                                              (line  45)
+* BP_ACCESS_WATCHPOINT <1>:              Breakpoints In Guile.
+                                                              (line  71)
+* BP_BREAKPOINT:                         Breakpoints In Python.
+                                                              (line  33)
+* BP_BREAKPOINT <1>:                     Breakpoints In Guile.
+                                                              (line  57)
+* BP_HARDWARE_WATCHPOINT:                Breakpoints In Python.
+                                                              (line  39)
+* BP_HARDWARE_WATCHPOINT <1>:            Breakpoints In Guile.
+                                                              (line  63)
+* BP_READ_WATCHPOINT:                    Breakpoints In Python.
+                                                              (line  42)
+* BP_READ_WATCHPOINT <1>:                Breakpoints In Guile.
+                                                              (line  67)
+* BP_WATCHPOINT:                         Breakpoints In Python.
+                                                              (line  36)
+* BP_WATCHPOINT <1>:                     Breakpoints In Guile.
+                                                              (line  60)
+* break:                                 Set Breaks.          (line   6)
+* break ... task TASKNO (Ada):           Ada Tasks.           (line 134)
+* break ... thread THREAD-ID:            Thread-Specific Breakpoints.
+                                                              (line  10)
+* break, and Objective-C:                Method Names in Commands.
+                                                              (line   9)
+* break-range:                           PowerPC Embedded.    (line  41)
+* breakpoint annotation:                 Annotations for Running.
+                                                              (line  47)
+* breakpoint-commands:                   Breakpoints In Guile.
+                                                              (line 236)
+* breakpoint-condition:                  Breakpoints In Guile.
+                                                              (line 194)
+* breakpoint-enabled?:                   Breakpoints In Guile.
+                                                              (line 144)
+* breakpoint-expression:                 Breakpoints In Guile.
+                                                              (line 139)
+* breakpoint-hit-count:                  Breakpoints In Guile.
+                                                              (line 169)
+* breakpoint-ignore-count:               Breakpoints In Guile.
+                                                              (line 163)
+* breakpoint-location:                   Breakpoints In Guile.
+                                                              (line 134)
+* breakpoint-notifications:              GDB/MI Support Commands.
+                                                              (line  91)
+* breakpoint-number:                     Breakpoints In Guile.
+                                                              (line 122)
+* breakpoint-silent?:                    Breakpoints In Guile.
+                                                              (line 151)
+* breakpoint-stop:                       Breakpoints In Guile.
+                                                              (line 202)
+* breakpoint-task:                       Breakpoints In Guile.
+                                                              (line 185)
+* breakpoint-thread:                     Breakpoints In Guile.
+                                                              (line 176)
+* breakpoint-type:                       Breakpoints In Guile.
+                                                              (line 126)
+* breakpoint-valid?:                     Breakpoints In Guile.
+                                                              (line 112)
+* breakpoint-visible?:                   Breakpoints In Guile.
+                                                              (line 130)
+* Breakpoint.commands:                   Breakpoints In Python.
+                                                              (line 182)
+* Breakpoint.condition:                  Breakpoints In Python.
+                                                              (line 177)
+* Breakpoint.delete:                     Breakpoints In Python.
+                                                              (line  99)
+* Breakpoint.enabled:                    Breakpoints In Python.
+                                                              (line 104)
+* Breakpoint.expression:                 Breakpoints In Python.
+                                                              (line 171)
+* Breakpoint.hit_count:                  Breakpoints In Python.
+                                                              (line 160)
+* Breakpoint.ignore_count:               Breakpoints In Python.
+                                                              (line 132)
+* Breakpoint.is_valid:                   Breakpoints In Python.
+                                                              (line  91)
+* Breakpoint.location:                   Breakpoints In Python.
+                                                              (line 165)
+* Breakpoint.number:                     Breakpoints In Python.
+                                                              (line 136)
+* Breakpoint.pending:                    Breakpoints In Python.
+                                                              (line 117)
+* Breakpoint.silent:                     Breakpoints In Python.
+                                                              (line 109)
+* Breakpoint.stop:                       Breakpoints In Python.
+                                                              (line  60)
+* Breakpoint.task:                       Breakpoints In Python.
+                                                              (line 126)
+* Breakpoint.temporary:                  Breakpoints In Python.
+                                                              (line 151)
+* Breakpoint.thread:                     Breakpoints In Python.
+                                                              (line 121)
+* Breakpoint.type:                       Breakpoints In Python.
+                                                              (line 141)
+* Breakpoint.visible:                    Breakpoints In Python.
+                                                              (line 146)
+* Breakpoint.__init__:                   Breakpoints In Python.
+                                                              (line   8)
+* breakpoint?:                           Breakpoints In Guile.
+                                                              (line 108)
+* BreakpointEvent.breakpoint:            Events In Python.    (line 105)
+* BreakpointEvent.breakpoints:           Events In Python.    (line 101)
+* breakpoints:                           Breakpoints In Guile.
+                                                              (line 104)
+* breakpoints-invalid annotation:        Invalidation.        (line  14)
+* bt (backtrace):                        Backtrace.           (line  11)
+* BtraceFunctionCall.instructions:       Recordings In Python.
+                                                              (line 130)
+* BtraceFunctionCall.level:              Recordings In Python.
+                                                              (line 126)
+* BtraceFunctionCall.next_sibling:       Recordings In Python.
+                                                              (line 144)
+* BtraceFunctionCall.number:             Recordings In Python.
+                                                              (line 116)
+* BtraceFunctionCall.prev_sibling:       Recordings In Python.
+                                                              (line 140)
+* BtraceFunctionCall.symbol:             Recordings In Python.
+                                                              (line 121)
+* BtraceFunctionCall.up:                 Recordings In Python.
+                                                              (line 134)
+* BtraceInstruction.data:                Recordings In Python.
+                                                              (line  94)
+* BtraceInstruction.decoded:             Recordings In Python.
+                                                              (line  98)
+* BtraceInstruction.error:               Recordings In Python.
+                                                              (line  81)
+* BtraceInstruction.is_speculative:      Recordings In Python.
+                                                              (line 106)
+* BtraceInstruction.number:              Recordings In Python.
+                                                              (line  76)
+* BtraceInstruction.pc:                  Recordings In Python.
+                                                              (line  90)
+* BtraceInstruction.sal:                 Recordings In Python.
+                                                              (line  85)
+* BtraceInstruction.size:                Recordings In Python.
+                                                              (line 102)
+* c (continue):                          Continuing and Stepping.
+                                                              (line  16)
+* c (SingleKey TUI key):                 TUI Single Key Mode. (line  10)
+* C-L:                                   TUI Keys.            (line  65)
+* C-x 1:                                 TUI Keys.            (line  19)
+* C-x 2:                                 TUI Keys.            (line  26)
+* C-x a:                                 TUI Keys.            (line  11)
+* C-x A:                                 TUI Keys.            (line  12)
+* C-x C-a:                               TUI Keys.            (line  10)
+* C-x o:                                 TUI Keys.            (line  34)
+* C-x s:                                 TUI Keys.            (line  41)
+* call:                                  Calling.             (line  11)
+* call-last-kbd-macro (C-x e):           Keyboard Macros.     (line  13)
+* capitalize-word (M-c):                 Commands For Text.   (line  49)
+* catch:                                 Set Catchpoints.     (line  10)
+* catch assert:                          Set Catchpoints.     (line  87)
+* catch catch:                           Set Catchpoints.     (line  16)
+* catch exception:                       Set Catchpoints.     (line  66)
+* catch exception unhandled:             Set Catchpoints.     (line  83)
+* catch exec:                            Set Catchpoints.     (line  90)
+* catch fork:                            Set Catchpoints.     (line 235)
+* catch load:                            Set Catchpoints.     (line 242)
+* catch rethrow:                         Set Catchpoints.     (line  16)
+* catch signal:                          Set Catchpoints.     (line 247)
+* catch syscall:                         Set Catchpoints.     (line  94)
+* catch throw:                           Set Catchpoints.     (line  16)
+* catch unload:                          Set Catchpoints.     (line 242)
+* catch vfork:                           Set Catchpoints.     (line 238)
+* cd:                                    Working Directory.   (line  16)
+* cdir:                                  Source Path.         (line 106)
+* character-search (C-]):                Miscellaneous Commands.
+                                                              (line  41)
+* character-search-backward (M-C-]):     Miscellaneous Commands.
+                                                              (line  46)
+* checkpoint:                            Checkpoint/Restart.  (line  26)
+* clear:                                 Delete Breaks.       (line  21)
+* clear, and Objective-C:                Method Names in Commands.
+                                                              (line   9)
+* clear-screen (C-l):                    Commands For Moving. (line  26)
+* ClearObjFilesEvent.progspace:          Events In Python.    (line 125)
+* clone-inferior:                        Inferiors and Programs.
+                                                              (line  73)
+* collect (tracepoints):                 Tracepoint Actions.  (line  49)
+* colon-colon, in Modula-2:              M2 Scope.            (line   6)
+* Command.complete:                      Commands In Python.  (line  70)
+* Command.dont_repeat:                   Commands In Python.  (line  42)
+* Command.invoke:                        Commands In Python.  (line  48)
+* Command.__init__:                      Commands In Python.  (line  10)
+* command?:                              Commands In Guile.   (line  63)
+* commands:                              Break Commands.      (line  11)
+* commands annotation:                   Prompting.           (line  27)
+* COMMAND_BREAKPOINTS:                   Commands In Python.  (line 142)
+* COMMAND_BREAKPOINTS <1>:               Commands In Guile.   (line 177)
+* COMMAND_DATA:                          Commands In Python.  (line 113)
+* COMMAND_DATA <1>:                      Commands In Guile.   (line 148)
+* COMMAND_FILES:                         Commands In Python.  (line 124)
+* COMMAND_FILES <1>:                     Commands In Guile.   (line 159)
+* COMMAND_MAINTENANCE:                   Commands In Python.  (line 166)
+* COMMAND_MAINTENANCE <1>:               Commands In Guile.   (line 201)
+* COMMAND_NONE:                          Commands In Python.  (line 103)
+* COMMAND_NONE <1>:                      Commands In Guile.   (line 137)
+* COMMAND_OBSCURE:                       Commands In Python.  (line 160)
+* COMMAND_OBSCURE <1>:                   Commands In Guile.   (line 195)
+* COMMAND_RUNNING:                       Commands In Python.  (line 107)
+* COMMAND_RUNNING <1>:                   Commands In Guile.   (line 142)
+* COMMAND_STACK:                         Commands In Python.  (line 118)
+* COMMAND_STACK <1>:                     Commands In Guile.   (line 153)
+* COMMAND_STATUS:                        Commands In Python.  (line 136)
+* COMMAND_STATUS <1>:                    Commands In Guile.   (line 171)
+* COMMAND_SUPPORT:                       Commands In Python.  (line 129)
+* COMMAND_SUPPORT <1>:                   Commands In Guile.   (line 164)
+* COMMAND_TRACEPOINTS:                   Commands In Python.  (line 148)
+* COMMAND_TRACEPOINTS <1>:               Commands In Guile.   (line 183)
+* COMMAND_USER:                          Commands In Python.  (line 154)
+* COMMAND_USER <1>:                      Commands In Guile.   (line 189)
+* comment-begin:                         Readline Init File Syntax.
+                                                              (line  47)
+* compare-sections:                      Memory.              (line 149)
+* compile code:                          Compiling and Injecting Code.
+                                                              (line  11)
+* compile file:                          Compiling and Injecting Code.
+                                                              (line  56)
+* complete:                              Help.                (line  77)
+* complete (<TAB>):                      Commands For Completion.
+                                                              (line   6)
+* COMPLETE_COMMAND:                      Commands In Python.  (line 187)
+* COMPLETE_COMMAND <1>:                  Commands In Guile.   (line 222)
+* COMPLETE_EXPRESSION:                   Commands In Python.  (line 195)
+* COMPLETE_EXPRESSION <1>:               Commands In Guile.   (line 230)
+* COMPLETE_FILENAME:                     Commands In Python.  (line 180)
+* COMPLETE_FILENAME <1>:                 Commands In Guile.   (line 215)
+* COMPLETE_LOCATION:                     Commands In Python.  (line 183)
+* COMPLETE_LOCATION <1>:                 Commands In Guile.   (line 218)
+* COMPLETE_NONE:                         Commands In Python.  (line 177)
+* COMPLETE_NONE <1>:                     Commands In Guile.   (line 212)
+* COMPLETE_SYMBOL:                       Commands In Python.  (line 191)
+* COMPLETE_SYMBOL <1>:                   Commands In Guile.   (line 226)
+* completion-display-width:              Readline Init File Syntax.
+                                                              (line  52)
+* completion-ignore-case:                Readline Init File Syntax.
+                                                              (line  59)
+* completion-map-case:                   Readline Init File Syntax.
+                                                              (line  64)
+* completion-prefix-display-length:      Readline Init File Syntax.
+                                                              (line  70)
+* completion-query-items:                Readline Init File Syntax.
+                                                              (line  77)
+* condition:                             Conditions.          (line  58)
+* continue:                              Continuing and Stepping.
+                                                              (line  16)
+* continue&:                             Background Execution.
+                                                              (line  40)
+* convert-meta:                          Readline Init File Syntax.
+                                                              (line  87)
+* copy-backward-word ():                 Commands For Killing.
+                                                              (line  49)
+* copy-forward-word ():                  Commands For Killing.
+                                                              (line  54)
+* copy-region-as-kill ():                Commands For Killing.
+                                                              (line  45)
+* core-file:                             Files.               (line  96)
+* ctf:                                   Trace Files.         (line  28)
+* Ctrl-o (operate-and-get-next):         Command Syntax.      (line  41)
+* current-arch:                          Architectures In Guile.
+                                                              (line  17)
+* current-objfile:                       Objfiles In Guile.   (line  46)
+* current-progspace:                     Progspaces In Guile. (line  26)
+* cwd:                                   Source Path.         (line 106)
+* d (delete):                            Delete Breaks.       (line  41)
+* d (SingleKey TUI key):                 TUI Single Key Mode. (line  13)
+* data-directory:                        Guile Configuration. (line   9)
+* data-read-memory-bytes:                GDB/MI Support Commands.
+                                                              (line  88)
+* default-visualizer:                    Guile Pretty Printing API.
+                                                              (line 126)
+* define:                                Define.              (line  50)
+* delete:                                Delete Breaks.       (line  41)
+* delete checkpoint CHECKPOINT-ID:       Checkpoint/Restart.  (line  53)
+* delete display:                        Auto Display.        (line  45)
+* delete mem:                            Memory Region Attributes.
+                                                              (line  34)
+* delete tracepoint:                     Create and Delete Tracepoints.
+                                                              (line 125)
+* delete tvariable:                      Trace State Variables.
+                                                              (line  42)
+* delete-breakpoint!:                    Breakpoints In Guile.
+                                                              (line  95)
+* delete-char (C-d):                     Commands For Text.   (line   6)
+* delete-char-or-list ():                Commands For Completion.
+                                                              (line  39)
+* delete-horizontal-space ():            Commands For Killing.
+                                                              (line  37)
+* demangle:                              Symbols.             (line 103)
+* detach:                                Attach.              (line  36)
+* detach (remote):                       Connecting.          (line 205)
+* detach inferiors INFNO...:             Inferiors and Programs.
+                                                              (line 102)
+* digit-argument (M-0, M-1, ... M--):    Numeric Arguments.   (line   6)
+* dir:                                   Source Path.         (line  38)
+* directory:                             Source Path.         (line  38)
+* dis (disable):                         Disabling.           (line  37)
+* disable:                               Disabling.           (line  37)
+* disable display:                       Auto Display.        (line  56)
+* disable frame-filter:                  Frame Filter Management.
+                                                              (line  16)
+* disable mem:                           Memory Region Attributes.
+                                                              (line  38)
+* disable pretty-printer:                Pretty-Printer Commands.
+                                                              (line  20)
+* disable probes:                        Static Probe Points. (line  73)
+* disable tracepoint:                    Enable and Disable Tracepoints.
+                                                              (line   9)
+* disable type-printer:                  Symbols.             (line 256)
+* disable-completion:                    Readline Init File Syntax.
+                                                              (line  93)
+* disassemble:                           Machine Code.        (line  36)
+* disconnect:                            Connecting.          (line 214)
+* display:                               Auto Display.        (line  23)
+* do (down):                             Selection.           (line  32)
+* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
+                                                              (line  14)
+* document:                              Define.              (line  62)
+* dont-repeat:                           Commands In Guile.   (line  67)
+* dont-repeat <1>:                       Define.              (line  74)
+* down:                                  Selection.           (line  32)
+* Down:                                  TUI Keys.            (line  56)
+* down-silently:                         Selection.           (line  62)
+* downcase-word (M-l):                   Commands For Text.   (line  45)
+* dprintf:                               Dynamic Printf.      (line  26)
+* dprintf-style agent:                   Dynamic Printf.      (line  46)
+* dprintf-style call:                    Dynamic Printf.      (line  42)
+* dprintf-style gdb:                     Dynamic Printf.      (line  39)
+* dump:                                  Dump/Restore Files.  (line  13)
+* dump-functions ():                     Miscellaneous Commands.
+                                                              (line  69)
+* dump-macros ():                        Miscellaneous Commands.
+                                                              (line  81)
+* dump-variables ():                     Miscellaneous Commands.
+                                                              (line  75)
+* e (edit):                              Edit.                (line   6)
+* echo:                                  Output.              (line  12)
+* edit:                                  Edit.                (line   6)
+* editing-mode:                          Readline Init File Syntax.
+                                                              (line  98)
+* else:                                  Command Files.       (line  74)
+* emacs-editing-mode (C-e):              Miscellaneous Commands.
+                                                              (line  87)
+* enable:                                Disabling.           (line  44)
+* enable display:                        Auto Display.        (line  65)
+* enable frame-filter:                   Frame Filter Management.
+                                                              (line  26)
+* enable mem:                            Memory Region Attributes.
+                                                              (line  42)
+* enable pretty-printer:                 Pretty-Printer Commands.
+                                                              (line  25)
+* enable probes:                         Static Probe Points. (line  60)
+* enable tracepoint:                     Enable and Disable Tracepoints.
+                                                              (line  19)
+* enable type-printer:                   Symbols.             (line 256)
+* enable-keypad:                         Readline Init File Syntax.
+                                                              (line 109)
+* enabled:                               Xmethod API.         (line  18)
+* enabled of type_printer:               Type Printing API.   (line  13)
+* end (breakpoint commands):             Break Commands.      (line  11)
+* end (if/else/while commands):          Command Files.       (line 103)
+* end (user-defined commands):           Define.              (line  62)
+* end-kbd-macro (C-x )):                 Keyboard Macros.     (line   9)
+* end-of-history (M->):                  Commands For History.
+                                                              (line  22)
+* end-of-iteration:                      Iterators In Guile.  (line  70)
+* end-of-iteration?:                     Iterators In Guile.  (line  73)
+* end-of-line (C-e):                     Commands For Moving. (line   9)
+* error annotation:                      Errors.              (line  10)
+* error-begin annotation:                Errors.              (line  22)
+* error-port:                            I/O Ports in Guile.  (line  12)
+* eval:                                  Output.              (line 117)
+* EventRegistry.connect:                 Events In Python.    (line  19)
+* EventRegistry.disconnect:              Events In Python.    (line  23)
+* exception-args:                        Guile Exception Handling.
+                                                              (line 103)
+* exception-key:                         Guile Exception Handling.
+                                                              (line 100)
+* exception?:                            Guile Exception Handling.
+                                                              (line  96)
+* exceptionHandler:                      Bootstrapping.       (line  38)
+* exchange-point-and-mark (C-x C-x):     Miscellaneous Commands.
+                                                              (line  36)
+* exec-file:                             Files.               (line  39)
+* exec-run-start-option:                 GDB/MI Support Commands.
+                                                              (line 105)
+* execute:                               Basic Guile.         (line  68)
+* exited annotation:                     Annotations for Running.
+                                                              (line  18)
+* ExitedEvent.exit_code:                 Events In Python.    (line  67)
+* ExitedEvent.inferior:                  Events In Python.    (line  72)
+* expand-tilde:                          Readline Init File Syntax.
+                                                              (line 120)
+* explore:                               Data.                (line  36)
+* f (frame):                             Selection.           (line  11)
+* f (SingleKey TUI key):                 TUI Single Key Mode. (line  16)
+* fg (resume foreground execution):      Continuing and Stepping.
+                                                              (line  16)
+* field-artificial?:                     Types In Guile.      (line 262)
+* field-base-class?:                     Types In Guile.      (line 266)
+* field-bitpos:                          Types In Guile.      (line 253)
+* field-bitsize:                         Types In Guile.      (line 257)
+* field-enumval:                         Types In Guile.      (line 250)
+* field-name:                            Types In Guile.      (line 243)
+* field-type:                            Types In Guile.      (line 246)
+* field?:                                Types In Guile.      (line 239)
+* file:                                  Files.               (line  16)
+* fin (finish):                          Continuing and Stepping.
+                                                              (line 109)
+* find:                                  Searching Memory.    (line   9)
+* find-pc-line:                          Symbol Tables In Guile.
+                                                              (line  71)
+* finish:                                Continuing and Stepping.
+                                                              (line 109)
+* finish&:                               Background Execution.
+                                                              (line  43)
+* FinishBreakpoint.out_of_scope:         Finish Breakpoints in Python.
+                                                              (line  21)
+* FinishBreakpoint.return_value:         Finish Breakpoints in Python.
+                                                              (line  38)
+* FinishBreakpoint.__init__:             Finish Breakpoints in Python.
+                                                              (line  14)
+* flash-erase:                           Target Commands.     (line 140)
+* flushregs:                             Maintenance Commands.
+                                                              (line 286)
+* flush_i_cache:                         Bootstrapping.       (line  60)
+* fo (forward-search):                   Search.              (line   9)
+* focus:                                 TUI Commands.        (line  55)
+* forward-backward-delete-char ():       Commands For Text.   (line  15)
+* forward-char (C-f):                    Commands For Moving. (line  12)
+* forward-search:                        Search.              (line   9)
+* forward-search-history (C-s):          Commands For History.
+                                                              (line  30)
+* forward-word (M-f):                    Commands For Moving. (line  18)
+* frame, selecting:                      Selection.           (line  11)
+* frame-arch:                            Frames In Guile.     (line  35)
+* frame-block:                           Frames In Guile.     (line 121)
+* frame-function:                        Frames In Guile.     (line 125)
+* frame-name:                            Frames In Guile.     (line  32)
+* frame-newer:                           Frames In Guile.     (line 133)
+* frame-older:                           Frames In Guile.     (line 130)
+* frame-pc:                              Frames In Guile.     (line 118)
+* frame-read-register:                   Frames In Guile.     (line 140)
+* frame-read-var:                        Frames In Guile.     (line 144)
+* frame-sal:                             Frames In Guile.     (line 136)
+* frame-select:                          Frames In Guile.     (line 152)
+* frame-type:                            Frames In Guile.     (line  39)
+* frame-unwind-stop-reason:              Frames In Guile.     (line  67)
+* frame-valid?:                          Frames In Guile.     (line  26)
+* Frame.architecture:                    Frames In Python.    (line  53)
+* Frame.block:                           Frames In Python.    (line 139)
+* Frame.find_sal:                        Frames In Python.    (line 152)
+* Frame.function:                        Frames In Python.    (line 142)
+* Frame.is_valid:                        Frames In Python.    (line  43)
+* Frame.name:                            Frames In Python.    (line  49)
+* Frame.newer:                           Frames In Python.    (line 149)
+* Frame.older:                           Frames In Python.    (line 146)
+* Frame.pc:                              Frames In Python.    (line 136)
+* Frame.read_register:                   Frames In Python.    (line 156)
+* Frame.read_var:                        Frames In Python.    (line 161)
+* Frame.select:                          Frames In Python.    (line 169)
+* Frame.type:                            Frames In Python.    (line  57)
+* Frame.unwind_stop_reason:              Frames In Python.    (line  84)
+* frame?:                                Frames In Guile.     (line  22)
+* FrameDecorator.address:                Frame Decorator API. (line  56)
+* FrameDecorator.elided:                 Frame Decorator API. (line  25)
+* FrameDecorator.filename:               Frame Decorator API. (line  66)
+* FrameDecorator.frame_args:             Frame Decorator API. (line  87)
+* FrameDecorator.frame_locals:           Frame Decorator API. (line 139)
+* FrameDecorator.function:               Frame Decorator API. (line  45)
+* FrameDecorator.inferior_frame:         Frame Decorator API. (line 172)
+* FrameDecorator.line:                   Frame Decorator API. (line  77)
+* FrameFilter.enabled:                   Frame Filter API.    (line 122)
+* FrameFilter.filter:                    Frame Filter API.    (line  75)
+* FrameFilter.name:                      Frame Filter API.    (line 115)
+* FrameFilter.priority:                  Frame Filter API.    (line 131)
+* frames-invalid annotation:             Invalidation.        (line   9)
+* frozen-varobjs:                        GDB/MI Support Commands.
+                                                              (line  75)
+* ftrace:                                Create and Delete Tracepoints.
+                                                              (line  50)
+* Function:                              Functions In Python. (line   6)
+* Function.invoke:                       Functions In Python. (line  19)
+* Function.__init__:                     Functions In Python. (line  10)
+* gcore:                                 Core File Generation.
+                                                              (line  17)
+* gdb-object-kind:                       GDB Scheme Data Types.
+                                                              (line  10)
+* gdb-version:                           Guile Configuration. (line  17)
+* gdb.Block:                             Blocks In Python.    (line   6)
+* gdb.block_for_pc:                      Blocks In Python.    (line  61)
+* gdb.block_for_pc <1>:                  Blocks In Python.    (line  61)
+* gdb.BP_ACCESS_WATCHPOINT:              Breakpoints In Python.
+                                                              (line  45)
+* gdb.BP_BREAKPOINT:                     Breakpoints In Python.
+                                                              (line  33)
+* gdb.BP_HARDWARE_WATCHPOINT:            Breakpoints In Python.
+                                                              (line  39)
+* gdb.BP_READ_WATCHPOINT:                Breakpoints In Python.
+                                                              (line  42)
+* gdb.BP_WATCHPOINT:                     Breakpoints In Python.
+                                                              (line  36)
+* gdb.Breakpoint:                        Breakpoints In Python.
+                                                              (line   6)
+* gdb.breakpoints:                       Basic Python.        (line  55)
+* gdb.breakpoints <1>:                   Basic Python.        (line  55)
+* gdb.COMMAND_BREAKPOINTS:               Commands In Python.  (line 142)
+* gdb.COMMAND_DATA:                      Commands In Python.  (line 113)
+* gdb.COMMAND_FILES:                     Commands In Python.  (line 124)
+* gdb.COMMAND_MAINTENANCE:               Commands In Python.  (line 166)
+* gdb.COMMAND_NONE:                      Commands In Python.  (line 103)
+* gdb.COMMAND_OBSCURE:                   Commands In Python.  (line 160)
+* gdb.COMMAND_RUNNING:                   Commands In Python.  (line 107)
+* gdb.COMMAND_STACK:                     Commands In Python.  (line 118)
+* gdb.COMMAND_STATUS:                    Commands In Python.  (line 136)
+* gdb.COMMAND_SUPPORT:                   Commands In Python.  (line 129)
+* gdb.COMMAND_TRACEPOINTS:               Commands In Python.  (line 148)
+* gdb.COMMAND_USER:                      Commands In Python.  (line 154)
+* gdb.COMPLETE_COMMAND:                  Commands In Python.  (line 187)
+* gdb.COMPLETE_EXPRESSION:               Commands In Python.  (line 195)
+* gdb.COMPLETE_FILENAME:                 Commands In Python.  (line 180)
+* gdb.COMPLETE_LOCATION:                 Commands In Python.  (line 183)
+* gdb.COMPLETE_NONE:                     Commands In Python.  (line 177)
+* gdb.COMPLETE_SYMBOL:                   Commands In Python.  (line 191)
+* gdb.current_objfile:                   Objfiles In Python.  (line  15)
+* gdb.current_objfile <1>:               Objfiles In Python.  (line  15)
+* gdb.current_progspace:                 Progspaces In Python.
+                                                              (line  14)
+* gdb.current_progspace <1>:             Progspaces In Python.
+                                                              (line  14)
+* gdb.current_recording:                 Recordings In Python.
+                                                              (line  21)
+* gdb.decode_line:                       Basic Python.        (line 190)
+* gdb.decode_line <1>:                   Basic Python.        (line 190)
+* gdb.default_visualizer:                Pretty Printing API. (line  85)
+* gdb.default_visualizer <1>:            Pretty Printing API. (line  85)
+* gdb.error:                             Exception Handling.  (line  22)
+* gdb.execute:                           Basic Python.        (line  36)
+* gdb.execute <1>:                       Basic Python.        (line  36)
+* gdb.find_pc_line:                      Basic Python.        (line  97)
+* gdb.find_pc_line <1>:                  Basic Python.        (line  97)
+* gdb.FinishBreakpoint:                  Finish Breakpoints in Python.
+                                                              (line   6)
+* gdb.flush:                             Basic Python.        (line 156)
+* gdb.flush <1>:                         Basic Python.        (line 156)
+* gdb.frame_stop_reason_string:          Frames In Python.    (line  29)
+* gdb.Function:                          Functions In Python. (line   6)
+* gdb.GdbError:                          Exception Handling.  (line  42)
+* gdb.history:                           Basic Python.        (line  73)
+* gdb.history <1>:                       Basic Python.        (line  73)
+* gdb.Inferior:                          Inferiors In Python. (line   6)
+* gdb.inferiors:                         Inferiors In Python. (line  14)
+* gdb.InferiorThread:                    Threads In Python.   (line   6)
+* gdb.invalidate_cached_frames:          Frames In Python.    (line  34)
+* gdb.invalidate_cached_frames <1>:      Frames In Python.    (line  34)
+* gdb.LazyString:                        Lazy Strings In Python.
+                                                              (line   6)
+* gdb.LineTable:                         Line Tables In Python.
+                                                              (line   6)
+* gdb.lookup_global_symbol:              Symbols In Python.   (line  33)
+* gdb.lookup_global_symbol <1>:          Symbols In Python.   (line  33)
+* gdb.lookup_objfile:                    Objfiles In Python.  (line  25)
+* gdb.lookup_objfile <1>:                Objfiles In Python.  (line  25)
+* gdb.lookup_symbol:                     Symbols In Python.   (line  13)
+* gdb.lookup_symbol <1>:                 Symbols In Python.   (line  13)
+* gdb.lookup_type:                       Types In Python.     (line  11)
+* gdb.lookup_type <1>:                   Types In Python.     (line  11)
+* gdb.MemoryError:                       Exception Handling.  (line  30)
+* gdb.newest_frame:                      Frames In Python.    (line  26)
+* gdb.newest_frame <1>:                  Frames In Python.    (line  26)
+* gdb.Objfile:                           Objfiles In Python.  (line   6)
+* gdb.objfiles:                          Objfiles In Python.  (line  21)
+* gdb.objfiles <1>:                      Objfiles In Python.  (line  21)
+* gdb.Parameter:                         Parameters In Python.
+                                                              (line   6)
+* gdb.parameter:                         Basic Python.        (line  62)
+* gdb.parameter <1>:                     Basic Python.        (line  62)
+* gdb.PARAM_AUTO_BOOLEAN:                Parameters In Python.
+                                                              (line  93)
+* gdb.PARAM_BOOLEAN:                     Parameters In Python.
+                                                              (line  89)
+* gdb.PARAM_ENUM:                        Parameters In Python.
+                                                              (line 127)
+* gdb.PARAM_FILENAME:                    Parameters In Python.
+                                                              (line 119)
+* gdb.PARAM_INTEGER:                     Parameters In Python.
+                                                              (line 102)
+* gdb.PARAM_OPTIONAL_FILENAME:           Parameters In Python.
+                                                              (line 116)
+* gdb.PARAM_STRING:                      Parameters In Python.
+                                                              (line 106)
+* gdb.PARAM_STRING_NOESCAPE:             Parameters In Python.
+                                                              (line 112)
+* gdb.PARAM_UINTEGER:                    Parameters In Python.
+                                                              (line  98)
+* gdb.PARAM_ZINTEGER:                    Parameters In Python.
+                                                              (line 123)
+* gdb.parse_and_eval:                    Basic Python.        (line  86)
+* gdb.parse_and_eval <1>:                Basic Python.        (line  86)
+* gdb.post_event:                        Basic Python.        (line 104)
+* gdb.post_event <1>:                    Basic Python.        (line 104)
+* gdb.Progspace:                         Progspaces In Python.
+                                                              (line   6)
+* gdb.progspaces:                        Progspaces In Python.
+                                                              (line  18)
+* gdb.progspaces <1>:                    Progspaces In Python.
+                                                              (line  18)
+* gdb.prompt_hook:                       Basic Python.        (line 202)
+* gdb.PYTHONDIR:                         Basic Python.        (line  33)
+* gdb.PYTHONDIR <1>:                     Basic Python.        (line  33)
+* gdb.search_memory:                     Inferiors In Python. (line  61)
+* gdb.selected_frame:                    Frames In Python.    (line  22)
+* gdb.selected_frame <1>:                Frames In Python.    (line  22)
+* gdb.selected_inferior:                 Inferiors In Python. (line  17)
+* gdb.selected_thread:                   Threads In Python.   (line  13)
+* gdb.selected_thread <1>:               Threads In Python.   (line  13)
+* gdb.solib_name:                        Basic Python.        (line 186)
+* gdb.solib_name <1>:                    Basic Python.        (line 186)
+* gdb.start_recording:                   Recordings In Python.
+                                                              (line   9)
+* gdb.STDERR:                            Basic Python.        (line 146)
+* gdb.STDERR <1>:                        Basic Python.        (line 166)
+* gdb.STDLOG:                            Basic Python.        (line 149)
+* gdb.STDLOG <1>:                        Basic Python.        (line 169)
+* gdb.STDOUT:                            Basic Python.        (line 143)
+* gdb.STDOUT <1>:                        Basic Python.        (line 163)
+* gdb.stop_recording:                    Recordings In Python.
+                                                              (line  25)
+* gdb.string_to_argv:                    Commands In Python.  (line  61)
+* gdb.Symbol:                            Symbols In Python.   (line   6)
+* gdb.SYMBOL_FUNCTION_DOMAIN:            Symbols In Python.   (line 134)
+* gdb.SYMBOL_LABEL_DOMAIN:               Symbols In Python.   (line 127)
+* gdb.SYMBOL_LOC_ARG:                    Symbols In Python.   (line 156)
+* gdb.SYMBOL_LOC_BLOCK:                  Symbols In Python.   (line 177)
+* gdb.SYMBOL_LOC_COMPUTED:               Symbols In Python.   (line 191)
+* gdb.SYMBOL_LOC_CONST:                  Symbols In Python.   (line 147)
+* gdb.SYMBOL_LOC_CONST_BYTES:            Symbols In Python.   (line 180)
+* gdb.SYMBOL_LOC_LOCAL:                  Symbols In Python.   (line 170)
+* gdb.SYMBOL_LOC_OPTIMIZED_OUT:          Symbols In Python.   (line 188)
+* gdb.SYMBOL_LOC_REF_ARG:                Symbols In Python.   (line 160)
+* gdb.SYMBOL_LOC_REGISTER:               Symbols In Python.   (line 153)
+* gdb.SYMBOL_LOC_REGPARM_ADDR:           Symbols In Python.   (line 165)
+* gdb.SYMBOL_LOC_STATIC:                 Symbols In Python.   (line 150)
+* gdb.SYMBOL_LOC_TYPEDEF:                Symbols In Python.   (line 173)
+* gdb.SYMBOL_LOC_UNDEF:                  Symbols In Python.   (line 143)
+* gdb.SYMBOL_LOC_UNRESOLVED:             Symbols In Python.   (line 183)
+* gdb.SYMBOL_STRUCT_DOMAIN:              Symbols In Python.   (line 124)
+* gdb.SYMBOL_TYPES_DOMAIN:               Symbols In Python.   (line 137)
+* gdb.SYMBOL_UNDEF_DOMAIN:               Symbols In Python.   (line 115)
+* gdb.SYMBOL_VARIABLES_DOMAIN:           Symbols In Python.   (line 130)
+* gdb.SYMBOL_VAR_DOMAIN:                 Symbols In Python.   (line 120)
+* gdb.Symtab:                            Symbol Tables In Python.
+                                                              (line   6)
+* gdb.Symtab_and_line:                   Symbol Tables In Python.
+                                                              (line   6)
+* gdb.target_charset:                    Basic Python.        (line 175)
+* gdb.target_charset <1>:                Basic Python.        (line 175)
+* gdb.target_wide_charset:               Basic Python.        (line 180)
+* gdb.target_wide_charset <1>:           Basic Python.        (line 180)
+* gdb.Type:                              Types In Python.     (line   6)
+* gdb.TYPE_CODE_ARRAY:                   Types In Python.     (line 192)
+* gdb.TYPE_CODE_BITSTRING:               Types In Python.     (line 230)
+* gdb.TYPE_CODE_BOOL:                    Types In Python.     (line 251)
+* gdb.TYPE_CODE_CHAR:                    Types In Python.     (line 248)
+* gdb.TYPE_CODE_COMPLEX:                 Types In Python.     (line 254)
+* gdb.TYPE_CODE_DECFLOAT:                Types In Python.     (line 263)
+* gdb.TYPE_CODE_ENUM:                    Types In Python.     (line 201)
+* gdb.TYPE_CODE_ERROR:                   Types In Python.     (line 233)
+* gdb.TYPE_CODE_FLAGS:                   Types In Python.     (line 204)
+* gdb.TYPE_CODE_FLT:                     Types In Python.     (line 213)
+* gdb.TYPE_CODE_FUNC:                    Types In Python.     (line 207)
+* gdb.TYPE_CODE_INT:                     Types In Python.     (line 210)
+* gdb.TYPE_CODE_INTERNAL_FUNCTION:       Types In Python.     (line 266)
+* gdb.TYPE_CODE_MEMBERPTR:               Types In Python.     (line 242)
+* gdb.TYPE_CODE_METHOD:                  Types In Python.     (line 236)
+* gdb.TYPE_CODE_METHODPTR:               Types In Python.     (line 239)
+* gdb.TYPE_CODE_NAMESPACE:               Types In Python.     (line 260)
+* gdb.TYPE_CODE_PTR:                     Types In Python.     (line 189)
+* gdb.TYPE_CODE_RANGE:                   Types In Python.     (line 222)
+* gdb.TYPE_CODE_REF:                     Types In Python.     (line 245)
+* gdb.TYPE_CODE_SET:                     Types In Python.     (line 219)
+* gdb.TYPE_CODE_STRING:                  Types In Python.     (line 225)
+* gdb.TYPE_CODE_STRUCT:                  Types In Python.     (line 195)
+* gdb.TYPE_CODE_TYPEDEF:                 Types In Python.     (line 257)
+* gdb.TYPE_CODE_UNION:                   Types In Python.     (line 198)
+* gdb.TYPE_CODE_VOID:                    Types In Python.     (line 216)
+* gdb.unwinder.register_unwinder:        Unwinding Frames in Python.
+                                                              (line 122)
+* gdb.UnwindInfo.add_saved_register:     Unwinding Frames in Python.
+                                                              (line  72)
+* gdb.WP_ACCESS:                         Breakpoints In Python.
+                                                              (line  57)
+* gdb.WP_READ:                           Breakpoints In Python.
+                                                              (line  51)
+* gdb.WP_WRITE:                          Breakpoints In Python.
+                                                              (line  54)
+* gdb.write:                             Basic Python.        (line 138)
+* gdb.write <1>:                         Basic Python.        (line 138)
+* gdb:error:                             Guile Exception Handling.
+                                                              (line  69)
+* gdb:invalid-object:                    Guile Exception Handling.
+                                                              (line  72)
+* gdb:memory-error:                      Guile Exception Handling.
+                                                              (line  80)
+* gdb:pp-type-error:                     Guile Exception Handling.
+                                                              (line  84)
+* gdbserver:                             Server.              (line   6)
+* gdb_init_reader:                       Writing JIT Debug Info Readers.
+                                                              (line  20)
+* generate-core-file:                    Core File Generation.
+                                                              (line  17)
+* get-basic-type:                        Guile Types Module.  (line  13)
+* getDebugChar:                          Bootstrapping.       (line  14)
+* gnu_debuglink_crc32:                   Separate Debug Files.
+                                                              (line 160)
+* gr:                                    Guile Commands.      (line   8)
+* gu:                                    Guile Commands.      (line  15)
+* guile:                                 Guile Commands.      (line  15)
+* guile-data-directory:                  Guile Configuration. (line  13)
+* guile-repl:                            Guile Commands.      (line   8)
+* h (help):                              Help.                (line   9)
+* handle:                                Signals.             (line  49)
+* handle_exception:                      Stub Contents.       (line  15)
+* hbreak:                                Set Breaks.          (line  61)
+* help:                                  Help.                (line   6)
+* help function:                         Convenience Funs.    (line 148)
+* help target:                           Target Commands.     (line  19)
+* help user-defined:                     Define.              (line  79)
+* history-append!:                       Basic Guile.         (line 105)
+* history-preserve-point:                Readline Init File Syntax.
+                                                              (line 124)
+* history-ref:                           Basic Guile.         (line  87)
+* history-search-backward ():            Commands For History.
+                                                              (line  50)
+* history-search-forward ():             Commands For History.
+                                                              (line  45)
+* history-size:                          Readline Init File Syntax.
+                                                              (line 130)
+* hook:                                  Hooks.               (line   6)
+* hookpost:                              Hooks.               (line  11)
+* horizontal-scroll-mode:                Readline Init File Syntax.
+                                                              (line 135)
+* host-config:                           Guile Configuration. (line  20)
+* i (info):                              Help.                (line 100)
+* if:                                    Command Files.       (line  74)
+* ignore:                                Conditions.          (line  90)
+* inferior INFNO:                        Inferiors and Programs.
+                                                              (line  48)
+* Inferior.is_valid:                     Inferiors In Python. (line  35)
+* Inferior.num:                          Inferiors In Python. (line  22)
+* Inferior.pid:                          Inferiors In Python. (line  25)
+* Inferior.read_memory:                  Inferiors In Python. (line  47)
+* Inferior.read_memory <1>:              Inferiors In Python. (line  47)
+* Inferior.search_memory:                Inferiors In Python. (line  61)
+* Inferior.threads:                      Inferiors In Python. (line  42)
+* Inferior.was_attached:                 Inferiors In Python. (line  29)
+* Inferior.write_memory:                 Inferiors In Python. (line  54)
+* Inferior.write_memory <1>:             Inferiors In Python. (line  54)
+* InferiorCallPostEvent.address:         Events In Python.    (line 146)
+* InferiorCallPostEvent.ptid:            Events In Python.    (line 143)
+* InferiorCallPreEvent.address:          Events In Python.    (line 136)
+* InferiorCallPreEvent.ptid:             Events In Python.    (line 133)
+* InferiorThread.global_num:             Threads In Python.   (line  32)
+* InferiorThread.inferior:               Threads In Python.   (line  45)
+* InferiorThread.is_exited:              Threads In Python.   (line  68)
+* InferiorThread.is_running:             Threads In Python.   (line  65)
+* InferiorThread.is_stopped:             Threads In Python.   (line  62)
+* InferiorThread.is_valid:               Threads In Python.   (line  51)
+* InferiorThread.name:                   Threads In Python.   (line  19)
+* InferiorThread.num:                    Threads In Python.   (line  29)
+* InferiorThread.ptid:                   Threads In Python.   (line  37)
+* InferiorThread.switch:                 Threads In Python.   (line  58)
+* info:                                  Help.                (line 100)
+* info address:                          Symbols.             (line  74)
+* info all-registers:                    Registers.           (line  15)
+* info args:                             Frame Info.          (line  44)
+* info auto-load:                        Auto-loading.        (line  60)
+* info auto-load gdb-scripts:            Auto-loading sequences.
+                                                              (line  21)
+* info auto-load guile-scripts:          Guile Auto-loading.  (line  23)
+* info auto-load libthread-db:           libthread_db.so.1 file.
+                                                              (line  29)
+* info auto-load local-gdbinit:          Init File in the Current Directory.
+                                                              (line  22)
+* info auto-load python-scripts:         Python Auto-loading. (line  23)
+* info auxv:                             OS Information.      (line  20)
+* info breakpoints:                      Set Breaks.          (line 126)
+* info checkpoints:                      Checkpoint/Restart.  (line  31)
+* info classes:                          Symbols.             (line 323)
+* info common:                           Special Fortran Commands.
+                                                              (line   9)
+* info copying:                          Help.                (line 138)
+* info dcache:                           Caching Target Data. (line  46)
+* info display:                          Auto Display.        (line  78)
+* info dll:                              Files.               (line 322)
+* info dos:                              DJGPP Native.        (line  15)
+* info exceptions:                       Ada Exceptions.      (line   8)
+* info extensions:                       Show.                (line  34)
+* info f (info frame):                   Frame Info.          (line  17)
+* info files:                            Files.               (line 197)
+* info float:                            Floating Point Hardware.
+                                                              (line   9)
+* info frame:                            Frame Info.          (line  17)
+* info frame, show the source language:  Show.                (line  15)
+* info frame-filter:                     Frame Filter Management.
+                                                              (line  12)
+* info functions:                        Symbols.             (line 303)
+* info handle:                           Signals.             (line  33)
+* info inferiors:                        Inferiors and Programs.
+                                                              (line  25)
+* info io_registers, AVR:                AVR.                 (line  10)
+* info line:                             Machine Code.        (line  14)
+* info line, and Objective-C:            Method Names in Commands.
+                                                              (line   9)
+* info locals:                           Frame Info.          (line  48)
+* info macro:                            Macros.              (line  47)
+* info macros:                           Macros.              (line  54)
+* info mem:                              Memory Region Attributes.
+                                                              (line  45)
+* info meminfo:                          SVR4 Process Information.
+                                                              (line  92)
+* info os:                               OS Information.      (line  37)
+* info os cpus:                          OS Information.      (line  43)
+* info os files:                         OS Information.      (line  51)
+* info os modules:                       OS Information.      (line  57)
+* info os msg:                           OS Information.      (line  64)
+* info os processes:                     OS Information.      (line  75)
+* info os procgroups:                    OS Information.      (line  84)
+* info os semaphores:                    OS Information.      (line  94)
+* info os shm:                           OS Information.      (line 102)
+* info os sockets:                       OS Information.      (line 112)
+* info os threads:                       OS Information.      (line 119)
+* info pidlist:                          SVR4 Process Information.
+                                                              (line  88)
+* info pretty-printer:                   Pretty-Printer Commands.
+                                                              (line   6)
+* info probes:                           Static Probe Points. (line  32)
+* info proc:                             SVR4 Process Information.
+                                                              (line  18)
+* info program:                          Stopping.            (line  18)
+* info record:                           Process Record and Replay.
+                                                              (line 263)
+* info registers:                        Registers.           (line  11)
+* info scope:                            Symbols.             (line 260)
+* info selectors:                        Symbols.             (line 329)
+* info serial:                           DJGPP Native.        (line 139)
+* info set:                              Help.                (line 121)
+* info share:                            Files.               (line 316)
+* info sharedlibrary:                    Files.               (line 316)
+* info signals:                          Signals.             (line  33)
+* info skip:                             Skipping Over Functions and Files.
+                                                              (line 113)
+* info source:                           Symbols.             (line 281)
+* info source, show the source language: Show.                (line  21)
+* info sources:                          Symbols.             (line 297)
+* info spu:                              SPU.                 (line  10)
+* info stack:                            Backtrace.           (line  46)
+* info static-tracepoint-markers:        Listing Static Tracepoint Markers.
+                                                              (line   6)
+* info symbol:                           Symbols.             (line  84)
+* info target:                           Files.               (line 197)
+* info task TASKNO:                      Ada Tasks.           (line  88)
+* info tasks:                            Ada Tasks.           (line   9)
+* info terminal:                         Input/Output.        (line  12)
+* info threads:                          Threads.             (line 115)
+* info tp [N...]:                        Listing Tracepoints. (line   6)
+* info tracepoints [N...]:               Listing Tracepoints. (line   6)
+* info tvariables:                       Trace State Variables.
+                                                              (line  37)
+* info type-printers:                    Symbols.             (line 248)
+* info types:                            Symbols.             (line 234)
+* info variables:                        Symbols.             (line 314)
+* info vector:                           Vector Unit.         (line   9)
+* info w32:                              Cygwin Native.       (line  19)
+* info warranty:                         Help.                (line 142)
+* info watchpoints [LIST...]:            Set Watchpoints.     (line  87)
+* info win:                              TUI Commands.        (line  26)
+* info-gdb-mi-command:                   GDB/MI Support Commands.
+                                                              (line  99)
+* init-if-undefined:                     Convenience Vars.    (line  42)
+* input-meta:                            Readline Init File Syntax.
+                                                              (line 142)
+* input-port:                            I/O Ports in Guile.  (line   6)
+* insert-comment (M-#):                  Miscellaneous Commands.
+                                                              (line  60)
+* insert-completions (M-*):              Commands For Completion.
+                                                              (line  18)
+* inspect:                               Data.                (line   6)
+* instantiate on type_printer:           Type Printing API.   (line  22)
+* interpreter-exec:                      Interpreters.        (line  36)
+* interrupt:                             Background Execution.
+                                                              (line  59)
+* isearch-terminators:                   Readline Init File Syntax.
+                                                              (line 149)
+* iterator->list:                        Iterators In Guile.  (line  83)
+* iterator-filter:                       Iterators In Guile.  (line  94)
+* iterator-for-each:                     Iterators In Guile.  (line  90)
+* iterator-map:                          Iterators In Guile.  (line  86)
+* iterator-next!:                        Iterators In Guile.  (line  63)
+* iterator-object:                       Iterators In Guile.  (line  53)
+* iterator-progress:                     Iterators In Guile.  (line  57)
+* iterator-until:                        Iterators In Guile.  (line  98)
+* iterator?:                             Iterators In Guile.  (line  49)
+* j (jump):                              Jumping.             (line  10)
+* jit-reader-load:                       Using JIT Debug Info Readers.
+                                                              (line   6)
+* jit-reader-unload:                     Using JIT Debug Info Readers.
+                                                              (line   6)
+* jump:                                  Jumping.             (line  10)
+* jump, and Objective-C:                 Method Names in Commands.
+                                                              (line   9)
+* KeyboardInterrupt:                     Exception Handling.  (line  34)
+* keymap:                                Readline Init File Syntax.
+                                                              (line 156)
+* kill:                                  Kill Process.        (line   6)
+* kill inferiors INFNO...:               Inferiors and Programs.
+                                                              (line 108)
+* kill-line (C-k):                       Commands For Killing.
+                                                              (line   6)
+* kill-region ():                        Commands For Killing.
+                                                              (line  41)
+* kill-whole-line ():                    Commands For Killing.
+                                                              (line  15)
+* kill-word (M-d):                       Commands For Killing.
+                                                              (line  19)
+* kvm:                                   BSD libkvm Interface.
+                                                              (line  24)
+* l (list):                              List.                (line   6)
+* language-option:                       GDB/MI Support Commands.
+                                                              (line  96)
+* layout:                                TUI Commands.        (line  29)
+* lazy-string->value:                    Lazy Strings In Guile.
+                                                              (line  46)
+* lazy-string-address:                   Lazy Strings In Guile.
+                                                              (line  26)
+* lazy-string-encoding:                  Lazy Strings In Guile.
+                                                              (line  34)
+* lazy-string-length:                    Lazy Strings In Guile.
+                                                              (line  29)
+* lazy-string-type:                      Lazy Strings In Guile.
+                                                              (line  40)
+* lazy-string?:                          Lazy Strings In Guile.
+                                                              (line  22)
+* LazyString.address:                    Lazy Strings In Python.
+                                                              (line  26)
+* LazyString.encoding:                   Lazy Strings In Python.
+                                                              (line  36)
+* LazyString.length:                     Lazy Strings In Python.
+                                                              (line  30)
+* LazyString.type:                       Lazy Strings In Python.
+                                                              (line  43)
+* LazyString.value:                      Lazy Strings In Python.
+                                                              (line  20)
+* Left:                                  TUI Keys.            (line  59)
+* LineTable.has_line:                    Line Tables In Python.
+                                                              (line  57)
+* LineTable.line:                        Line Tables In Python.
+                                                              (line  51)
+* LineTable.source_lines:                Line Tables In Python.
+                                                              (line  62)
+* LineTableEntry.line:                   Line Tables In Python.
+                                                              (line  16)
+* LineTableEntry.pc:                     Line Tables In Python.
+                                                              (line  21)
+* list:                                  List.                (line   6)
+* list, and Objective-C:                 Method Names in Commands.
+                                                              (line   9)
+* load FILENAME OFFSET:                  Target Commands.     (line 114)
+* lookup-block:                          Blocks In Guile.     (line 117)
+* lookup-global-symbol:                  Symbols In Guile.    (line  99)
+* lookup-symbol:                         Symbols In Guile.    (line  79)
+* lookup-type:                           Types In Guile.      (line  15)
+* loop_break:                            Command Files.       (line  93)
+* loop_continue:                         Command Files.       (line  97)
+* macro define:                          Macros.              (line  59)
+* macro exp1:                            Macros.              (line  36)
+* macro expand:                          Macros.              (line  29)
+* macro list:                            Macros.              (line  80)
+* macro undef:                           Macros.              (line  74)
+* maint ada set ignore-descriptive-types: Ada Glitches.       (line  73)
+* maint ada show ignore-descriptive-types: Ada Glitches.      (line  77)
+* maint agent:                           Maintenance Commands.
+                                                              (line  11)
+* maint agent-eval:                      Maintenance Commands.
+                                                              (line  11)
+* maint agent-printf:                    Maintenance Commands.
+                                                              (line  26)
+* maint btrace clear:                    Maintenance Commands.
+                                                              (line  99)
+* maint btrace clear-packet-history:     Maintenance Commands.
+                                                              (line  94)
+* maint btrace packet-history:           Maintenance Commands.
+                                                              (line  65)
+* maint check-psymtabs:                  Maintenance Commands.
+                                                              (line 134)
+* maint check-symtabs:                   Maintenance Commands.
+                                                              (line 139)
+* maint cplus first_component:           Maintenance Commands.
+                                                              (line 154)
+* maint cplus namespace:                 Maintenance Commands.
+                                                              (line 157)
+* maint demangler-warning:               Maintenance Commands.
+                                                              (line 173)
+* maint deprecate:                       Maintenance Commands.
+                                                              (line 160)
+* maint dump-me:                         Maintenance Commands.
+                                                              (line 168)
+* maint expand-symtabs:                  Maintenance Commands.
+                                                              (line 142)
+* maint flush-symbol-cache:              Symbols.             (line 467)
+* maint info bfds:                       File Caching.        (line  10)
+* maint info breakpoints:                Maintenance Commands.
+                                                              (line  32)
+* maint info btrace:                     Maintenance Commands.
+                                                              (line  62)
+* maint info line-table:                 Symbols.             (line 445)
+* maint info program-spaces:             Inferiors and Programs.
+                                                              (line 145)
+* maint info psymtabs:                   Symbols.             (line 398)
+* maint info sections:                   Files.               (line 206)
+* maint info sol-threads:                Threads.             (line 167)
+* maint info symtabs:                    Symbols.             (line 398)
+* maint internal-error:                  Maintenance Commands.
+                                                              (line 173)
+* maint internal-warning:                Maintenance Commands.
+                                                              (line 173)
+* maint packet:                          Maintenance Commands.
+                                                              (line 220)
+* maint print architecture:              Maintenance Commands.
+                                                              (line 226)
+* maint print c-tdesc:                   Maintenance Commands.
+                                                              (line 230)
+* maint print cooked-registers:          Maintenance Commands.
+                                                              (line 251)
+* maint print dummy-frames:              Maintenance Commands.
+                                                              (line 235)
+* maint print msymbols:                  Symbols.             (line 372)
+* maint print objfiles:                  Maintenance Commands.
+                                                              (line 289)
+* maint print psymbols:                  Symbols.             (line 372)
+* maint print raw-registers:             Maintenance Commands.
+                                                              (line 251)
+* maint print reggroups:                 Maintenance Commands.
+                                                              (line 270)
+* maint print register-groups:           Maintenance Commands.
+                                                              (line 251)
+* maint print registers:                 Maintenance Commands.
+                                                              (line 251)
+* maint print remote-registers:          Maintenance Commands.
+                                                              (line 251)
+* maint print section-scripts:           Maintenance Commands.
+                                                              (line 304)
+* maint print statistics:                Maintenance Commands.
+                                                              (line 311)
+* maint print symbol-cache:              Symbols.             (line 459)
+* maint print symbol-cache-statistics:   Symbols.             (line 463)
+* maint print symbols:                   Symbols.             (line 372)
+* maint print target-stack:              Maintenance Commands.
+                                                              (line 324)
+* maint print type:                      Maintenance Commands.
+                                                              (line 336)
+* maint print unwind, HPPA:              HPPA.                (line  17)
+* maint print user-registers:            Maintenance Commands.
+                                                              (line 295)
+* maint selftest:                        Maintenance Commands.
+                                                              (line 343)
+* maint set bfd-sharing:                 File Caching.        (line  14)
+* maint set btrace pt skip-pad:          Maintenance Commands.
+                                                              (line 107)
+* maint set catch-demangler-crashes:     Maintenance Commands.
+                                                              (line 146)
+* maint set demangler-warning:           Maintenance Commands.
+                                                              (line 197)
+* maint set dwarf always-disassemble:    Maintenance Commands.
+                                                              (line 346)
+* maint set dwarf max-cache-age:         Maintenance Commands.
+                                                              (line 367)
+* maint set internal-error:              Maintenance Commands.
+                                                              (line 197)
+* maint set internal-warning:            Maintenance Commands.
+                                                              (line 197)
+* maint set per-command:                 Maintenance Commands.
+                                                              (line 439)
+* maint set profile:                     Maintenance Commands.
+                                                              (line 381)
+* maint set show-all-tib:                Maintenance Commands.
+                                                              (line 405)
+* maint set show-debug-regs:             Maintenance Commands.
+                                                              (line 397)
+* maint set symbol-cache-size:           Symbols.             (line 451)
+* maint set target-async:                Maintenance Commands.
+                                                              (line 411)
+* maint set target-non-stop MODE [on|off|auto]: Maintenance Commands.
+                                                              (line 419)
+* maint show bfd-sharing:                File Caching.        (line  14)
+* maint show btrace pt skip-pad:         Maintenance Commands.
+                                                              (line 108)
+* maint show catch-demangler-crashes:    Maintenance Commands.
+                                                              (line 146)
+* maint show demangler-warning:          Maintenance Commands.
+                                                              (line 197)
+* maint show dwarf always-disassemble:   Maintenance Commands.
+                                                              (line 346)
+* maint show dwarf max-cache-age:        Maintenance Commands.
+                                                              (line 367)
+* maint show internal-error:             Maintenance Commands.
+                                                              (line 197)
+* maint show internal-warning:           Maintenance Commands.
+                                                              (line 197)
+* maint show per-command:                Maintenance Commands.
+                                                              (line 439)
+* maint show profile:                    Maintenance Commands.
+                                                              (line 381)
+* maint show show-all-tib:               Maintenance Commands.
+                                                              (line 405)
+* maint show show-debug-regs:            Maintenance Commands.
+                                                              (line 397)
+* maint show symbol-cache-size:          Symbols.             (line 456)
+* maint show target-async:               Maintenance Commands.
+                                                              (line 411)
+* maint show target-non-stop:            Maintenance Commands.
+                                                              (line 419)
+* maint space:                           Maintenance Commands.
+                                                              (line 478)
+* maint time:                            Maintenance Commands.
+                                                              (line 482)
+* maint translate-address:               Maintenance Commands.
+                                                              (line 486)
+* maint undeprecate:                     Maintenance Commands.
+                                                              (line 160)
+* make:                                  Shell Commands.      (line  21)
+* make-block-symbols-iterator:           Blocks In Guile.     (line 105)
+* make-breakpoint:                       Breakpoints In Guile.
+                                                              (line  19)
+* make-enum-hashtable:                   Guile Types Module.  (line  37)
+* make-exception:                        Guile Exception Handling.
+                                                              (line  91)
+* make-field-iterator:                   Types In Guile.      (line 125)
+* make-iterator:                         Iterators In Guile.  (line  11)
+* make-lazy-value:                       Values From Inferior In Guile.
+                                                              (line 327)
+* make-list-iterator:                    Iterators In Guile.  (line  80)
+* make-pretty-printer:                   Guile Pretty Printing API.
+                                                              (line  15)
+* make-pretty-printer-worker:            Guile Pretty Printing API.
+                                                              (line  42)
+* make-value:                            Values From Inferior In Guile.
+                                                              (line  45)
+* mark-modified-lines:                   Readline Init File Syntax.
+                                                              (line 169)
+* mark-symlinked-directories:            Readline Init File Syntax.
+                                                              (line 174)
+* match-hidden-files:                    Readline Init File Syntax.
+                                                              (line 179)
+* may-insert-breakpoints:                Observer Mode.       (line  50)
+* may-insert-fast-tracepoints:           Observer Mode.       (line  69)
+* may-insert-tracepoints:                Observer Mode.       (line  59)
+* may-interrupt:                         Observer Mode.       (line  79)
+* may-write-memory:                      Observer Mode.       (line  41)
+* may-write-registers:                   Observer Mode.       (line  32)
+* mem:                                   Memory Region Attributes.
+                                                              (line  22)
+* memory-port-range:                     Memory Ports in Guile.
+                                                              (line  33)
+* memory-port-read-buffer-size:          Memory Ports in Guile.
+                                                              (line  37)
+* memory-port-write-buffer-size:         Memory Ports in Guile.
+                                                              (line  45)
+* memory-port?:                          Memory Ports in Guile.
+                                                              (line  29)
+* MemoryChangedEvent.address:            Events In Python.    (line 156)
+* MemoryChangedEvent.length:             Events In Python.    (line 159)
+* memset:                                Bootstrapping.       (line  70)
+* menu-complete ():                      Commands For Completion.
+                                                              (line  22)
+* menu-complete-backward ():             Commands For Completion.
+                                                              (line  34)
+* menu-complete-display-prefix:          Readline Init File Syntax.
+                                                              (line 186)
+* meta-flag:                             Readline Init File Syntax.
+                                                              (line 142)
+* methods:                               Xmethod API.         (line  22)
+* monitor:                               Connecting.          (line 221)
+* n (next):                              Continuing and Stepping.
+                                                              (line  77)
+* n (SingleKey TUI key):                 TUI Single Key Mode. (line  19)
+* name:                                  Xmethod API.         (line  15)
+* name of type_printer:                  Type Printing API.   (line  18)
+* new-ui:                                Interpreters.        (line  65)
+* newest-frame:                          Frames In Guile.     (line 160)
+* NewObjFileEvent.new_objfile:           Events In Python.    (line 115)
+* next:                                  Continuing and Stepping.
+                                                              (line  77)
+* next&:                                 Background Execution.
+                                                              (line  34)
+* next-history (C-n):                    Commands For History.
+                                                              (line  16)
+* nexti:                                 Continuing and Stepping.
+                                                              (line 202)
+* nexti&:                                Background Execution.
+                                                              (line  37)
+* ni (nexti):                            Continuing and Stepping.
+                                                              (line 202)
+* non-incremental-forward-search-history (M-n): Commands For History.
+                                                              (line  40)
+* non-incremental-reverse-search-history (M-p): Commands For History.
+                                                              (line  35)
+* nosharedlibrary:                       Files.               (line 334)
+* Objfile:                               Objfiles In Python.  (line   6)
+* objfile-filename:                      Objfiles In Guile.   (line  28)
+* objfile-pretty-printers:               Objfiles In Guile.   (line  36)
+* objfile-progspace:                     Objfiles In Guile.   (line  32)
+* objfile-valid?:                        Objfiles In Guile.   (line  21)
+* Objfile.add_separate_debug_file:       Objfiles In Python.  (line 125)
+* Objfile.build_id:                      Objfiles In Python.  (line  67)
+* Objfile.filename:                      Objfiles In Python.  (line  47)
+* Objfile.frame_filters:                 Objfiles In Python.  (line  93)
+* Objfile.is_valid:                      Objfiles In Python.  (line 118)
+* Objfile.owner:                         Objfiles In Python.  (line  60)
+* Objfile.pretty_printers:               Objfiles In Python.  (line  81)
+* Objfile.progspace:                     Objfiles In Python.  (line  77)
+* Objfile.type_printers:                 Objfiles In Python.  (line  89)
+* Objfile.username:                      Objfiles In Python.  (line  54)
+* objfile?:                              Objfiles In Guile.   (line  17)
+* objfiles:                              Objfiles In Guile.   (line  52)
+* observer:                              Observer Mode.       (line  22)
+* open-memory:                           Memory Ports in Guile.
+                                                              (line  11)
+* output:                                Output.              (line  35)
+* output-meta:                           Readline Init File Syntax.
+                                                              (line 191)
+* output-port:                           I/O Ports in Guile.  (line   9)
+* overlay:                               Overlay Commands.    (line  17)
+* overload-choice annotation:            Prompting.           (line  32)
+* overwrite-mode ():                     Commands For Text.   (line  53)
+* page-completions:                      Readline Init File Syntax.
+                                                              (line 196)
+* Parameter:                             Parameters In Python.
+                                                              (line   6)
+* Parameter <1>:                         Parameters In Guile. (line   6)
+* parameter-value:                       Parameters In Guile. (line 103)
+* Parameter.get_set_string:              Parameters In Python.
+                                                              (line  73)
+* Parameter.get_show_string:             Parameters In Python.
+                                                              (line  79)
+* Parameter.set_doc:                     Parameters In Python.
+                                                              (line  53)
+* Parameter.show_doc:                    Parameters In Python.
+                                                              (line  59)
+* Parameter.value:                       Parameters In Python.
+                                                              (line  65)
+* Parameter.__init__:                    Parameters In Python.
+                                                              (line  18)
+* parameter?:                            Parameters In Guile. (line  99)
+* PARAM_AUTO_BOOLEAN:                    Parameters In Python.
+                                                              (line  93)
+* PARAM_AUTO_BOOLEAN <1>:                Parameters In Guile. (line 120)
+* PARAM_BOOLEAN:                         Parameters In Python.
+                                                              (line  89)
+* PARAM_BOOLEAN <1>:                     Parameters In Guile. (line 116)
+* PARAM_ENUM:                            Parameters In Python.
+                                                              (line 127)
+* PARAM_ENUM <1>:                        Parameters In Guile. (line 156)
+* PARAM_FILENAME:                        Parameters In Python.
+                                                              (line 119)
+* PARAM_FILENAME <1>:                    Parameters In Guile. (line 152)
+* PARAM_INTEGER:                         Parameters In Python.
+                                                              (line 102)
+* PARAM_OPTIONAL_FILENAME:               Parameters In Python.
+                                                              (line 116)
+* PARAM_OPTIONAL_FILENAME <1>:           Parameters In Guile. (line 149)
+* PARAM_STRING:                          Parameters In Python.
+                                                              (line 106)
+* PARAM_STRING <1>:                      Parameters In Guile. (line 139)
+* PARAM_STRING_NOESCAPE:                 Parameters In Python.
+                                                              (line 112)
+* PARAM_STRING_NOESCAPE <1>:             Parameters In Guile. (line 145)
+* PARAM_UINTEGER:                        Parameters In Python.
+                                                              (line  98)
+* PARAM_UINTEGER <1>:                    Parameters In Guile. (line 125)
+* PARAM_ZINTEGER:                        Parameters In Python.
+                                                              (line 123)
+* PARAM_ZINTEGER <1>:                    Parameters In Guile. (line 129)
+* PARAM_ZUINTEGER:                       Parameters In Guile. (line 132)
+* PARAM_ZUINTEGER_UNLIMITED:             Parameters In Guile. (line 135)
+* parse-and-eval:                        Basic Guile.         (line 113)
+* passcount:                             Tracepoint Passcounts.
+                                                              (line   6)
+* path:                                  Environment.         (line  14)
+* pending-breakpoints:                   GDB/MI Support Commands.
+                                                              (line  79)
+* PendingFrame.create_unwind_info:       Unwinding Frames in Python.
+                                                              (line  46)
+* PendingFrame.read_register:            Unwinding Frames in Python.
+                                                              (line  36)
+* PgDn:                                  TUI Keys.            (line  50)
+* PgUp:                                  TUI Keys.            (line  47)
+* pi:                                    Python Commands.     (line   9)
+* po (print-object):                     The Print Command with Objective-C.
+                                                              (line   6)
+* possible-completions (M-?):            Commands For Completion.
+                                                              (line  11)
+* post-commands annotation:              Prompting.           (line  27)
+* post-overload-choice annotation:       Prompting.           (line  32)
+* post-prompt annotation:                Prompting.           (line  24)
+* post-prompt-for-continue annotation:   Prompting.           (line  40)
+* post-query annotation:                 Prompting.           (line  36)
+* pre-commands annotation:               Prompting.           (line  27)
+* pre-overload-choice annotation:        Prompting.           (line  32)
+* pre-prompt annotation:                 Prompting.           (line  24)
+* pre-prompt-for-continue annotation:    Prompting.           (line  40)
+* pre-query annotation:                  Prompting.           (line  36)
+* prefix-meta (<ESC>):                   Miscellaneous Commands.
+                                                              (line  18)
+* prepend-pretty-printer!:               Guile Printing Module.
+                                                              (line  13)
+* pretty-printer-enabled?:               Guile Pretty Printing API.
+                                                              (line  28)
+* pretty-printer?:                       Guile Pretty Printing API.
+                                                              (line  24)
+* pretty-printers:                       Guile Pretty Printing API.
+                                                              (line  35)
+* pretty_printer.children:               Pretty Printing API. (line  11)
+* pretty_printer.display_hint:           Pretty Printing API. (line  24)
+* pretty_printer.to_string:              Pretty Printing API. (line  53)
+* previous-history (C-p):                Commands For History.
+                                                              (line  12)
+* print:                                 Data.                (line   6)
+* print-object:                          The Print Command with Objective-C.
+                                                              (line   6)
+* printf:                                Output.              (line  46)
+* proc-trace-entry:                      SVR4 Process Information.
+                                                              (line  84)
+* proc-trace-exit:                       SVR4 Process Information.
+                                                              (line  84)
+* proc-untrace-entry:                    SVR4 Process Information.
+                                                              (line  84)
+* proc-untrace-exit:                     SVR4 Process Information.
+                                                              (line  84)
+* Progspace:                             Progspaces In Python.
+                                                              (line   6)
+* progspace-filename:                    Progspaces In Guile. (line  34)
+* progspace-objfiles:                    Progspaces In Guile. (line  44)
+* progspace-pretty-printers:             Progspaces In Guile. (line  52)
+* progspace-valid?:                      Progspaces In Guile. (line  21)
+* Progspace.filename:                    Progspaces In Python.
+                                                              (line  24)
+* Progspace.frame_filters:               Progspaces In Python.
+                                                              (line  39)
+* Progspace.pretty_printers:             Progspaces In Python.
+                                                              (line  27)
+* Progspace.type_printers:               Progspaces In Python.
+                                                              (line  35)
+* progspace?:                            Progspaces In Guile. (line  17)
+* progspaces:                            Progspaces In Guile. (line  31)
+* prompt annotation:                     Prompting.           (line  24)
+* prompt-for-continue annotation:        Prompting.           (line  40)
+* ptype:                                 Symbols.             (line 169)
+* putDebugChar:                          Bootstrapping.       (line  20)
+* pwd:                                   Working Directory.   (line  20)
+* py:                                    Python Commands.     (line  23)
+* python:                                GDB/MI Support Commands.
+                                                              (line  82)
+* python <1>:                            Python Commands.     (line  23)
+* python-interactive:                    Python Commands.     (line   9)
+* q (quit):                              Quitting GDB.        (line   6)
+* q (SingleKey TUI key):                 TUI Single Key Mode. (line  22)
+* query annotation:                      Prompting.           (line  36)
+* queue-signal:                          Signaling.           (line  36)
+* quit annotation:                       Errors.              (line   6)
+* quit [EXPRESSION]:                     Quitting GDB.        (line   6)
+* quoted-insert (C-q or C-v):            Commands For Text.   (line  20)
+* r (run):                               Starting.            (line   6)
+* r (SingleKey TUI key):                 TUI Single Key Mode. (line  25)
+* rbreak:                                Set Breaks.          (line  90)
+* rc (reverse-continue):                 Reverse Execution.   (line  30)
+* re-read-init-file (C-x C-r):           Miscellaneous Commands.
+                                                              (line   6)
+* readnow:                               Files.               (line  89)
+* rec:                                   Process Record and Replay.
+                                                              (line  38)
+* rec btrace:                            Process Record and Replay.
+                                                              (line  38)
+* rec btrace bts:                        Process Record and Replay.
+                                                              (line  38)
+* rec btrace pt:                         Process Record and Replay.
+                                                              (line  38)
+* rec bts:                               Process Record and Replay.
+                                                              (line  38)
+* rec del:                               Process Record and Replay.
+                                                              (line 297)
+* rec full:                              Process Record and Replay.
+                                                              (line  38)
+* rec function-call-history:             Process Record and Replay.
+                                                              (line 363)
+* rec instruction-history:               Process Record and Replay.
+                                                              (line 303)
+* rec pt:                                Process Record and Replay.
+                                                              (line  38)
+* rec s:                                 Process Record and Replay.
+                                                              (line 100)
+* recognize on type_recognizer:          Type Printing API.   (line  42)
+* record:                                Process Record and Replay.
+                                                              (line  38)
+* record btrace:                         Process Record and Replay.
+                                                              (line  38)
+* record btrace bts:                     Process Record and Replay.
+                                                              (line  38)
+* record btrace pt:                      Process Record and Replay.
+                                                              (line  38)
+* record bts:                            Process Record and Replay.
+                                                              (line  38)
+* record delete:                         Process Record and Replay.
+                                                              (line 297)
+* record full:                           Process Record and Replay.
+                                                              (line  38)
+* record function-call-history:          Process Record and Replay.
+                                                              (line 363)
+* record goto:                           Process Record and Replay.
+                                                              (line 123)
+* record instruction-history:            Process Record and Replay.
+                                                              (line 303)
+* record pt:                             Process Record and Replay.
+                                                              (line  38)
+* record restore:                        Process Record and Replay.
+                                                              (line 144)
+* record save:                           Process Record and Replay.
+                                                              (line 137)
+* record stop:                           Process Record and Replay.
+                                                              (line 100)
+* Record.begin:                          Recordings In Python.
+                                                              (line  47)
+* Record.end:                            Recordings In Python.
+                                                              (line  51)
+* Record.format:                         Recordings In Python.
+                                                              (line  43)
+* Record.function_call_history:          Recordings In Python.
+                                                              (line  62)
+* Record.goto:                           Recordings In Python.
+                                                              (line  67)
+* Record.instruction_history:            Recordings In Python.
+                                                              (line  59)
+* Record.method:                         Recordings In Python.
+                                                              (line  39)
+* Record.ptid:                           Recordings In Python.
+                                                              (line  32)
+* Record.replay_position:                Recordings In Python.
+                                                              (line  55)
+* redraw-current-line ():                Commands For Moving. (line  30)
+* refresh:                               TUI Commands.        (line  77)
+* register-breakpoint!:                  Breakpoints In Guile.
+                                                              (line  87)
+* register-command!:                     Commands In Guile.   (line  58)
+* register-parameter!:                   Parameters In Guile. (line  94)
+* RegisterChangedEvent.frame:            Events In Python.    (line 166)
+* RegisterChangedEvent.regnum:           Events In Python.    (line 169)
+* register_xmethod_matcher:              Xmethod API.         (line  82)
+* remote delete:                         File Transfer.       (line  23)
+* remote get:                            File Transfer.       (line  19)
+* remote put:                            File Transfer.       (line  15)
+* remove-inferiors:                      Inferiors and Programs.
+                                                              (line  92)
+* remove-symbol-file:                    Files.               (line 160)
+* restart CHECKPOINT-ID:                 Checkpoint/Restart.  (line  41)
+* restore:                               Dump/Restore Files.  (line  40)
+* RET (repeat last command):             Command Syntax.      (line  21)
+* return:                                Returning.           (line   6)
+* reverse-continue:                      Reverse Execution.   (line  30)
+* reverse-finish:                        Reverse Execution.   (line  77)
+* reverse-next:                          Reverse Execution.   (line  60)
+* reverse-nexti:                         Reverse Execution.   (line  69)
+* reverse-search:                        Search.              (line  16)
+* reverse-search-history (C-r):          Commands For History.
+                                                              (line  26)
+* reverse-step:                          Reverse Execution.   (line  37)
+* reverse-stepi:                         Reverse Execution.   (line  52)
+* revert-all-at-newline:                 Readline Init File Syntax.
+                                                              (line 206)
+* revert-line (M-r):                     Miscellaneous Commands.
+                                                              (line  25)
+* Right:                                 TUI Keys.            (line  62)
+* rn (reverse-next):                     Reverse Execution.   (line  60)
+* rni (reverse-nexti):                   Reverse Execution.   (line  69)
+* rs (step):                             Reverse Execution.   (line  37)
+* rsi (reverse-stepi):                   Reverse Execution.   (line  52)
+* run:                                   Starting.            (line   6)
+* run&:                                  Background Execution.
+                                                              (line  21)
+* rwatch:                                Set Watchpoints.     (line  79)
+* s (SingleKey TUI key):                 TUI Single Key Mode. (line  28)
+* s (step):                              Continuing and Stepping.
+                                                              (line  45)
+* sal-last:                              Symbol Tables In Guile.
+                                                              (line  68)
+* sal-line:                              Symbol Tables In Guile.
+                                                              (line  62)
+* sal-pc:                                Symbol Tables In Guile.
+                                                              (line  65)
+* sal-symtab:                            Symbol Tables In Guile.
+                                                              (line  59)
+* sal-valid?:                            Symbol Tables In Guile.
+                                                              (line  53)
+* sal?:                                  Symbol Tables In Guile.
+                                                              (line  49)
+* save breakpoints:                      Save Breakpoints.    (line   9)
+* save gdb-index:                        Index Files.         (line  19)
+* save tracepoints:                      save tracepoints.    (line   6)
+* save-tracepoints:                      save tracepoints.    (line   6)
+* search:                                Search.              (line   9)
+* section:                               Files.               (line 189)
+* select-frame:                          Selection.           (line  56)
+* selected-frame:                        Frames In Guile.     (line 156)
+* self:                                  Commands In Guile.   (line 100)
+* self-insert (a, b, A, 1, !, ...):      Commands For Text.   (line  27)
+* set:                                   Help.                (line 109)
+* set ada print-signatures:              Overloading support for Ada.
+                                                              (line  31)
+* set ada trust-PAD-over-XVS:            Ada Glitches.        (line  42)
+* set agent off:                         In-Process Agent.    (line  47)
+* set agent on:                          In-Process Agent.    (line  38)
+* set annotate:                          Annotations Overview.
+                                                              (line  29)
+* set architecture:                      Targets.             (line  21)
+* set args:                              Arguments.           (line  21)
+* set arm:                               ARM.                 (line   9)
+* set auto-connect-native-target:        Starting.            (line 157)
+* set auto-load gdb-scripts:             Auto-loading sequences.
+                                                              (line  13)
+* set auto-load guile-scripts:           Guile Auto-loading.  (line  17)
+* set auto-load libthread-db:            libthread_db.so.1 file.
+                                                              (line  21)
+* set auto-load local-gdbinit:           Init File in the Current Directory.
+                                                              (line  14)
+* set auto-load off:                     Auto-loading.        (line  32)
+* set auto-load python-scripts:          Python Auto-loading. (line  17)
+* set auto-load safe-path:               Auto-loading safe path.
+                                                              (line  32)
+* set auto-load scripts-directory:       objfile-gdbdotext file.
+                                                              (line  37)
+* set auto-solib-add:                    Files.               (line 293)
+* set backtrace:                         Backtrace.           (line 116)
+* set basenames-may-differ:              Files.               (line 522)
+* set breakpoint always-inserted:        Set Breaks.          (line 317)
+* set breakpoint auto-hw:                Set Breaks.          (line 297)
+* set breakpoint condition-evaluation:   Set Breaks.          (line 338)
+* set breakpoint pending:                Set Breaks.          (line 267)
+* set can-use-hw-watchpoints:            Set Watchpoints.     (line 116)
+* set case-sensitive:                    Symbols.             (line  27)
+* set charset:                           Character Sets.      (line  46)
+* set check range:                       Range Checking.      (line  34)
+* set check type:                        Type Checking.       (line  35)
+* set circular-trace-buffer:             Starting and Stopping Trace Experiments.
+                                                              (line  93)
+* set code-cache:                        Caching Target Data. (line  36)
+* set coerce-float-to-double:            ABI.                 (line  45)
+* set com1base:                          DJGPP Native.        (line 122)
+* set com1irq:                           DJGPP Native.        (line 122)
+* set com2base:                          DJGPP Native.        (line 122)
+* set com2irq:                           DJGPP Native.        (line 122)
+* set com3base:                          DJGPP Native.        (line 122)
+* set com3irq:                           DJGPP Native.        (line 122)
+* set com4base:                          DJGPP Native.        (line 122)
+* set com4irq:                           DJGPP Native.        (line 122)
+* set complaints:                        Messages/Warnings.   (line  29)
+* set confirm:                           Messages/Warnings.   (line  49)
+* set cp-abi:                            ABI.                 (line  57)
+* set cygwin-exceptions:                 Cygwin Native.       (line  60)
+* set data-directory:                    Data Files.          (line  12)
+* set dcache line-size:                  Caching Target Data. (line  60)
+* set dcache size:                       Caching Target Data. (line  57)
+* set debug:                             Debugging Output.    (line  17)
+* set debug aarch64:                     AArch64.             (line  10)
+* set debug arc:                         ARC.                 (line   9)
+* set debug auto-load:                   Auto-loading verbose mode.
+                                                              (line  27)
+* set debug bfd-cache LEVEL:             File Caching.        (line  24)
+* set debug darwin:                      Darwin.              (line   9)
+* set debug entry-values:                Tail Call Frames.    (line  47)
+* set debug hppa:                        HPPA.                (line  10)
+* set debug libthread-db:                Threads.             (line 280)
+* set debug mach-o:                      Darwin.              (line  16)
+* set debug mips:                        MIPS.                (line 100)
+* set debug monitor:                     Target Commands.     (line 107)
+* set debug nios2:                       Nios II.             (line  10)
+* set debug-file-directory:              Separate Debug Files.
+                                                              (line  67)
+* set debugevents:                       Cygwin Native.       (line  89)
+* set debugexceptions:                   Cygwin Native.       (line 100)
+* set debugexec:                         Cygwin Native.       (line  96)
+* set debugmemory:                       Cygwin Native.       (line 104)
+* set default-collect:                   Tracepoint Actions.  (line 142)
+* set demangle-style:                    Print Settings.      (line 427)
+* set detach-on-fork:                    Forks.               (line  58)
+* set directories:                       Source Path.         (line 118)
+* set disable-randomization:             Starting.            (line 201)
+* set disassemble-next-line:             Machine Code.        (line 242)
+* set disassembler-options:              Machine Code.        (line 215)
+* set disassembly-flavor:                Machine Code.        (line 230)
+* set disconnected-dprintf:              Dynamic Printf.      (line  83)
+* set disconnected-tracing:              Starting and Stopping Trace Experiments.
+                                                              (line  55)
+* set displaced-stepping:                Maintenance Commands.
+                                                              (line 112)
+* set editing:                           Editing.             (line  15)
+* set endian:                            Byte Order.          (line  13)
+* set environment:                       Environment.         (line  39)
+* set exceptions, Hurd command:          Hurd Native.         (line  39)
+* set exec-direction:                    Reverse Execution.   (line  83)
+* set exec-done-display:                 Debugging Output.    (line  11)
+* set exec-wrapper:                      Starting.            (line 109)
+* set extended-prompt:                   Prompt.              (line  25)
+* set extension-language:                Show.                (line  30)
+* set follow-exec-mode:                  Forks.               (line 105)
+* set follow-fork-mode:                  Forks.               (line  39)
+* set frame-filter priority:             Frame Filter Management.
+                                                              (line  84)
+* set gnutarget:                         Target Commands.     (line  28)
+* set guile print-stack:                 Guile Exception Handling.
+                                                              (line   6)
+* set hash, for remote monitors:         Target Commands.     (line  98)
+* set height:                            Screen Size.         (line  20)
+* set history expansion:                 Command History.     (line  82)
+* set history filename:                  Command History.     (line  26)
+* set history remove-duplicates:         Command History.     (line  54)
+* set history save:                      Command History.     (line  36)
+* set history size:                      Command History.     (line  45)
+* set host-charset:                      Character Sets.      (line  33)
+* set inferior-tty:                      Input/Output.        (line  49)
+* set input-radix:                       Numbers.             (line  14)
+* set interactive-mode:                  Other Misc Settings. (line   6)
+* set language:                          Manually.            (line   9)
+* set libthread-db-search-path:          Threads.             (line 242)
+* set listsize:                          List.                (line  33)
+* set logging:                           Logging Output.      (line   9)
+* set mach-exceptions:                   Darwin.              (line  27)
+* set max-completions:                   Completion.          (line  69)
+* set max-user-call-depth:               Define.              (line  91)
+* set max-value-size:                    Value Sizes.         (line  12)
+* set mem inaccessible-by-default:       Memory Region Attributes.
+                                                              (line 123)
+* set mips abi:                          MIPS.                (line  32)
+* set mips compression:                  MIPS.                (line  49)
+* set mips mask-address:                 MIPS.                (line  80)
+* set mipsfpu:                           MIPS Embedded.       (line  13)
+* set mpx bound:                         i386.                (line  60)
+* set multiple-symbols:                  Ambiguous Expressions.
+                                                              (line  50)
+* set new-console:                       Cygwin Native.       (line  72)
+* set new-group:                         Cygwin Native.       (line  81)
+* set non-stop:                          Non-Stop Mode.       (line  35)
+* set opaque-type-resolution:            Symbols.             (line 335)
+* set osabi:                             ABI.                 (line  11)
+* set output-radix:                      Numbers.             (line  30)
+* set overload-resolution:               Debugging C Plus Plus.
+                                                              (line  59)
+* set pagination:                        Screen Size.         (line  39)
+* set powerpc:                           PowerPC Embedded.    (line  51)
+* set print:                             Print Settings.      (line  11)
+* set print entry-values:                Print Settings.      (line 206)
+* set print frame-arguments:             Print Settings.      (line 154)
+* set print inferior-events:             Inferiors and Programs.
+                                                              (line 123)
+* set print symbol-loading:              Symbols.             (line 353)
+* set print thread-events:               Threads.             (line 221)
+* set print type methods:                Symbols.             (line  44)
+* set print type typedefs:               Symbols.             (line  57)
+* set processor:                         Targets.             (line  31)
+* set procfs-file:                       SVR4 Process Information.
+                                                              (line  73)
+* set procfs-trace:                      SVR4 Process Information.
+                                                              (line  67)
+* set prompt:                            Prompt.              (line  16)
+* set python print-stack:                Python Commands.     (line  46)
+* set radix:                             Numbers.             (line  43)
+* set range-stepping:                    Continuing and Stepping.
+                                                              (line 221)
+* set ravenscar task-switching off:      Ravenscar Profile.   (line  14)
+* set ravenscar task-switching on:       Ravenscar Profile.   (line  10)
+* set record:                            Process Record and Replay.
+                                                              (line 353)
+* set record btrace:                     Process Record and Replay.
+                                                              (line 198)
+* set record btrace bts:                 Process Record and Replay.
+                                                              (line 217)
+* set record btrace pt:                  Process Record and Replay.
+                                                              (line 240)
+* set record full:                       Process Record and Replay.
+                                                              (line 148)
+* set remote:                            Remote Configuration.
+                                                              (line   6)
+* set remote system-call-allowed:        system.              (line  37)
+* set remote-mips64-transfers-32bit-regs: MIPS.               (line  90)
+* set remotecache:                       Caching Target Data. (line  20)
+* set remoteflow:                        Remote Configuration.
+                                                              (line  48)
+* set schedule-multiple:                 All-Stop Mode.       (line  67)
+* set script-extension:                  Extending GDB.       (line  29)
+* set sh calling-convention:             Super-H.             (line   9)
+* set shell:                             Cygwin Native.       (line 108)
+* set signal-thread:                     Hurd Native.         (line  21)
+* set signals, Hurd command:             Hurd Native.         (line  11)
+* set sigs, Hurd command:                Hurd Native.         (line  11)
+* set sigthread:                         Hurd Native.         (line  21)
+* set solib-absolute-prefix:             Files.               (line 372)
+* set solib-search-path:                 Files.               (line 448)
+* set spu:                               SPU.                 (line  38)
+* set stack-cache:                       Caching Target Data. (line  28)
+* set startup-with-shell:                Starting.            (line 134)
+* set step-mode:                         Continuing and Stepping.
+                                                              (line  91)
+* set stop-on-solib-events:              Files.               (line 349)
+* set stopped, Hurd command:             Hurd Native.         (line  31)
+* set struct-convention:                 i386.                (line   7)
+* set substitute-path:                   Source Path.         (line 125)
+* set sysroot:                           Files.               (line 372)
+* set target-charset:                    Character Sets.      (line  28)
+* set target-file-system-kind (unix|dos-based|auto): Files.   (line 462)
+* set target-wide-charset:               Character Sets.      (line  61)
+* set task, Hurd commands:               Hurd Native.         (line  48)
+* set tcp:                               Remote Configuration.
+                                                              (line 123)
+* set thread, Hurd command:              Hurd Native.         (line  90)
+* set trace-buffer-size:                 Starting and Stopping Trace Experiments.
+                                                              (line 107)
+* set trace-commands:                    Messages/Warnings.   (line  65)
+* set trace-notes:                       Starting and Stopping Trace Experiments.
+                                                              (line 126)
+* set trace-stop-notes:                  Starting and Stopping Trace Experiments.
+                                                              (line 132)
+* set trace-user:                        Starting and Stopping Trace Experiments.
+                                                              (line 122)
+* set trust-readonly-sections:           Files.               (line 251)
+* set tui active-border-mode:            TUI Configuration.   (line  24)
+* set tui border-kind:                   TUI Configuration.   (line   9)
+* set tui border-mode:                   TUI Configuration.   (line  23)
+* set unwind-on-terminating-exception:   Calling.             (line  47)
+* set unwindonsignal:                    Calling.             (line  36)
+* set use-coredump-filter:               Core File Generation.
+                                                              (line  31)
+* set variable:                          Assignment.          (line  16)
+* set verbose:                           Messages/Warnings.   (line  15)
+* set watchdog:                          Maintenance Commands.
+                                                              (line 503)
+* set width:                             Screen Size.         (line  20)
+* set write:                             Patching.            (line  15)
+* set-breakpoint-condition!:             Breakpoints In Guile.
+                                                              (line 198)
+* set-breakpoint-enabled!:               Breakpoints In Guile.
+                                                              (line 147)
+* set-breakpoint-hit-count!:             Breakpoints In Guile.
+                                                              (line 172)
+* set-breakpoint-ignore-count!:          Breakpoints In Guile.
+                                                              (line 166)
+* set-breakpoint-silent!:                Breakpoints In Guile.
+                                                              (line 158)
+* set-breakpoint-stop!:                  Breakpoints In Guile.
+                                                              (line 206)
+* set-breakpoint-task!:                  Breakpoints In Guile.
+                                                              (line 190)
+* set-breakpoint-thread!:                Breakpoints In Guile.
+                                                              (line 180)
+* set-iterator-progress!:                Iterators In Guile.  (line  60)
+* set-mark (C-@):                        Miscellaneous Commands.
+                                                              (line  32)
+* set-memory-port-read-buffer-size!:     Memory Ports in Guile.
+                                                              (line  41)
+* set-memory-port-write-buffer-size!:    Memory Ports in Guile.
+                                                              (line  49)
+* set-objfile-pretty-printers!:          Objfiles In Guile.   (line  40)
+* set-parameter-value!:                  Parameters In Guile. (line 107)
+* set-pretty-printer-enabled!:           Guile Pretty Printing API.
+                                                              (line  31)
+* set-pretty-printers!:                  Guile Pretty Printing API.
+                                                              (line  38)
+* set-progspace-pretty-printers!:        Progspaces In Guile. (line  57)
+* set_debug_traps:                       Stub Contents.       (line  10)
+* share:                                 Files.               (line 325)
+* sharedlibrary:                         Files.               (line 325)
+* shell:                                 Shell Commands.      (line  10)
+* show:                                  Help.                (line 114)
+* show ada print-signatures:             Overloading support for Ada.
+                                                              (line  36)
+* show ada trust-PAD-over-XVS:           Ada Glitches.        (line  42)
+* show agent:                            In-Process Agent.    (line  51)
+* show annotate:                         Annotations Overview.
+                                                              (line  34)
+* show architecture:                     Targets.             (line  21)
+* show args:                             Arguments.           (line  28)
+* show arm:                              ARM.                 (line  13)
+* show auto-load:                        Auto-loading.        (line  45)
+* show auto-load gdb-scripts:            Auto-loading sequences.
+                                                              (line  17)
+* show auto-load guile-scripts:          Guile Auto-loading.  (line  20)
+* show auto-load libthread-db:           libthread_db.so.1 file.
+                                                              (line  25)
+* show auto-load local-gdbinit:          Init File in the Current Directory.
+                                                              (line  18)
+* show auto-load python-scripts:         Python Auto-loading. (line  20)
+* show auto-load safe-path:              Auto-loading safe path.
+                                                              (line  46)
+* show auto-load scripts-directory:      objfile-gdbdotext file.
+                                                              (line  61)
+* show auto-solib-add:                   Files.               (line 310)
+* show backtrace:                        Backtrace.           (line 123)
+* show basenames-may-differ:             Files.               (line 525)
+* show breakpoint always-inserted:       Set Breaks.          (line 317)
+* show breakpoint auto-hw:               Set Breaks.          (line 297)
+* show breakpoint condition-evaluation:  Set Breaks.          (line 338)
+* show breakpoint pending:               Set Breaks.          (line 267)
+* show can-use-hw-watchpoints:           Set Watchpoints.     (line 119)
+* show case-sensitive:                   Symbols.             (line  40)
+* show charset:                          Character Sets.      (line  52)
+* show check range:                      Range Checking.      (line  34)
+* show check type:                       Type Checking.       (line  35)
+* show circular-trace-buffer:            Starting and Stopping Trace Experiments.
+                                                              (line 100)
+* show code-cache:                       Caching Target Data. (line  42)
+* show coerce-float-to-double:           ABI.                 (line  54)
+* show com1base:                         DJGPP Native.        (line 134)
+* show com1irq:                          DJGPP Native.        (line 134)
+* show com2base:                         DJGPP Native.        (line 134)
+* show com2irq:                          DJGPP Native.        (line 134)
+* show com3base:                         DJGPP Native.        (line 134)
+* show com3irq:                          DJGPP Native.        (line 134)
+* show com4base:                         DJGPP Native.        (line 134)
+* show com4irq:                          DJGPP Native.        (line 134)
+* show commands:                         Command History.     (line  95)
+* show complaints:                       Messages/Warnings.   (line  35)
+* show configuration:                    Help.                (line 147)
+* show confirm:                          Messages/Warnings.   (line  57)
+* show convenience:                      Convenience Vars.    (line  37)
+* show copying:                          Help.                (line 138)
+* show cp-abi:                           ABI.                 (line  57)
+* show cygwin-exceptions:                Cygwin Native.       (line  68)
+* show data-directory:                   Data Files.          (line  16)
+* show dcache line-size:                 Caching Target Data. (line  68)
+* show dcache size:                      Caching Target Data. (line  64)
+* show debug:                            Debugging Output.    (line  20)
+* show debug arc:                        ARC.                 (line  14)
+* show debug auto-load:                  Auto-loading verbose mode.
+                                                              (line  30)
+* show debug bfd-cache:                  File Caching.        (line  27)
+* show debug darwin:                     Darwin.              (line  13)
+* show debug entry-values:               Tail Call Frames.    (line  55)
+* show debug libthread-db:               Threads.             (line 280)
+* show debug mach-o:                     Darwin.              (line  23)
+* show debug mips:                       MIPS.                (line 104)
+* show debug monitor:                    Target Commands.     (line 111)
+* show debug nios2:                      Nios II.             (line  14)
+* show debug-file-directory:             Separate Debug Files.
+                                                              (line  72)
+* show default-collect:                  Tracepoint Actions.  (line 150)
+* show detach-on-fork:                   Forks.               (line  73)
+* show directories:                      Source Path.         (line 122)
+* show disassemble-next-line:            Machine Code.        (line 242)
+* show disassembler-options:             Machine Code.        (line 227)
+* show disassembly-flavor:               Machine Code.        (line 239)
+* show disconnected-dprintf:             Dynamic Printf.      (line  88)
+* show disconnected-tracing:             Starting and Stopping Trace Experiments.
+                                                              (line  62)
+* show displaced-stepping:               Maintenance Commands.
+                                                              (line 112)
+* show editing:                          Editing.             (line  22)
+* show environment:                      Environment.         (line  33)
+* show exceptions, Hurd command:         Hurd Native.         (line  45)
+* show exec-done-display:                Debugging Output.    (line  14)
+* show extended-prompt:                  Prompt.              (line  39)
+* show follow-fork-mode:                 Forks.               (line  52)
+* show frame-filter priority:            Frame Filter Management.
+                                                              (line  91)
+* show gnutarget:                        Target Commands.     (line  40)
+* show hash, for remote monitors:        Target Commands.     (line 104)
+* show height:                           Screen Size.         (line  20)
+* show history:                          Command History.     (line  87)
+* show host-charset:                     Character Sets.      (line  55)
+* show inferior-tty:                     Input/Output.        (line  54)
+* show input-radix:                      Numbers.             (line  35)
+* show interactive-mode:                 Other Misc Settings. (line  20)
+* show language:                         Show.                (line  10)
+* show libthread-db-search-path:         Threads.             (line 277)
+* show listsize:                         List.                (line  39)
+* show logging:                          Logging Output.      (line  22)
+* show mach-exceptions:                  Darwin.              (line  34)
+* show max-completions:                  Completion.          (line  77)
+* show max-user-call-depth:              Define.              (line  91)
+* show max-value-size:                   Value Sizes.         (line  36)
+* show mem inaccessible-by-default:      Memory Region Attributes.
+                                                              (line 129)
+* show mips abi:                         MIPS.                (line  46)
+* show mips compression:                 MIPS.                (line  72)
+* show mips mask-address:                MIPS.                (line  86)
+* show mipsfpu:                          MIPS Embedded.       (line  13)
+* show mpx bound:                        i386.                (line  57)
+* show multiple-symbols:                 Ambiguous Expressions.
+                                                              (line  70)
+* show new-console:                      Cygwin Native.       (line  77)
+* show new-group:                        Cygwin Native.       (line  86)
+* show non-stop:                         Non-Stop Mode.       (line  38)
+* show opaque-type-resolution:           Symbols.             (line 350)
+* show osabi:                            ABI.                 (line  11)
+* show output-radix:                     Numbers.             (line  38)
+* show overload-resolution:              Debugging C Plus Plus.
+                                                              (line  76)
+* show pagination:                       Screen Size.         (line  45)
+* show paths:                            Environment.         (line  29)
+* show print:                            Print Settings.      (line  39)
+* show print inferior-events:            Inferiors and Programs.
+                                                              (line 131)
+* show print symbol-loading:             Symbols.             (line 368)
+* show print thread-events:              Threads.             (line 231)
+* show print type methods:               Symbols.             (line  53)
+* show print type typedefs:              Symbols.             (line  70)
+* show processor:                        Targets.             (line  31)
+* show procfs-file:                      SVR4 Process Information.
+                                                              (line  78)
+* show procfs-trace:                     SVR4 Process Information.
+                                                              (line  70)
+* show prompt:                           Prompt.              (line  19)
+* show radix:                            Numbers.             (line  43)
+* show range-stepping:                   Continuing and Stepping.
+                                                              (line 221)
+* show ravenscar task-switching:         Ravenscar Profile.   (line  22)
+* show record:                           Process Record and Replay.
+                                                              (line 359)
+* show record btrace:                    Process Record and Replay.
+                                                              (line 214)
+* show record full:                      Process Record and Replay.
+                                                              (line 166)
+* show remote:                           Remote Configuration.
+                                                              (line   6)
+* show remote system-call-allowed:       system.              (line  41)
+* show remote-mips64-transfers-32bit-regs: MIPS.              (line  96)
+* show remotecache:                      Caching Target Data. (line  25)
+* show remoteflow:                       Remote Configuration.
+                                                              (line  52)
+* show script-extension:                 Extending GDB.       (line  29)
+* show sh calling-convention:            Super-H.             (line  22)
+* show shell:                            Cygwin Native.       (line 112)
+* show signal-thread:                    Hurd Native.         (line  27)
+* show signals, Hurd command:            Hurd Native.         (line  17)
+* show sigs, Hurd command:               Hurd Native.         (line  17)
+* show sigthread:                        Hurd Native.         (line  27)
+* show solib-search-path:                Files.               (line 459)
+* show spu:                              SPU.                 (line  43)
+* show stack-cache:                      Caching Target Data. (line  33)
+* show stop-on-solib-events:             Files.               (line 355)
+* show stopped, Hurd command:            Hurd Native.         (line  36)
+* show struct-convention:                i386.                (line  15)
+* show substitute-path:                  Source Path.         (line 162)
+* show sysroot:                          Files.               (line 445)
+* show target-charset:                   Character Sets.      (line  58)
+* show target-file-system-kind:          Files.               (line 462)
+* show target-wide-charset:              Character Sets.      (line  67)
+* show task, Hurd commands:              Hurd Native.         (line  56)
+* show tcp:                              Remote Configuration.
+                                                              (line 123)
+* show thread, Hurd command:             Hurd Native.         (line 100)
+* show trace-buffer-size:                Starting and Stopping Trace Experiments.
+                                                              (line 114)
+* show trace-notes:                      Starting and Stopping Trace Experiments.
+                                                              (line 129)
+* show trace-stop-notes:                 Starting and Stopping Trace Experiments.
+                                                              (line 137)
+* show trace-user:                       Starting and Stopping Trace Experiments.
+                                                              (line 124)
+* show unwind-on-terminating-exception:  Calling.             (line  55)
+* show unwindonsignal:                   Calling.             (line  43)
+* show user:                             Define.              (line  84)
+* show values:                           Value History.       (line  47)
+* show verbose:                          Messages/Warnings.   (line  21)
+* show version:                          Help.                (line 128)
+* show warranty:                         Help.                (line 142)
+* show width:                            Screen Size.         (line  20)
+* show write:                            Patching.            (line  26)
+* show-all-if-ambiguous:                 Readline Init File Syntax.
+                                                              (line 212)
+* show-all-if-unmodified:                Readline Init File Syntax.
+                                                              (line 218)
+* si (stepi):                            Continuing and Stepping.
+                                                              (line 189)
+* signal:                                Signaling.           (line   6)
+* signal annotation:                     Annotations for Running.
+                                                              (line  42)
+* signal-event:                          Cygwin Native.       (line  35)
+* signal-name annotation:                Annotations for Running.
+                                                              (line  22)
+* signal-name-end annotation:            Annotations for Running.
+                                                              (line  22)
+* signal-string annotation:              Annotations for Running.
+                                                              (line  22)
+* signal-string-end annotation:          Annotations for Running.
+                                                              (line  22)
+* SignalEvent.stop_signal:               Events In Python.    (line  91)
+* signalled annotation:                  Annotations for Running.
+                                                              (line  22)
+* silent:                                Break Commands.      (line  43)
+* sim, a command:                        Embedded Processors. (line  13)
+* skip:                                  Skipping Over Functions and Files.
+                                                              (line  44)
+* skip delete:                           Skipping Over Functions and Files.
+                                                              (line 137)
+* skip disable:                          Skipping Over Functions and Files.
+                                                              (line 145)
+* skip enable:                           Skipping Over Functions and Files.
+                                                              (line 141)
+* skip file:                             Skipping Over Functions and Files.
+                                                              (line 100)
+* skip function:                         Skipping Over Functions and Files.
+                                                              (line  89)
+* skip-completed-text:                   Readline Init File Syntax.
+                                                              (line 227)
+* skip-csi-sequence ():                  Miscellaneous Commands.
+                                                              (line  51)
+* source:                                Command Files.       (line  17)
+* source annotation:                     Source Annotations.  (line   6)
+* start:                                 Starting.            (line  77)
+* start-kbd-macro (C-x ():               Keyboard Macros.     (line   6)
+* starting annotation:                   Annotations for Running.
+                                                              (line   6)
+* STDERR:                                Basic Python.        (line 146)
+* STDERR <1>:                            Basic Python.        (line 166)
+* stdio-port?:                           I/O Ports in Guile.  (line  15)
+* STDLOG:                                Basic Python.        (line 149)
+* STDLOG <1>:                            Basic Python.        (line 169)
+* STDOUT:                                Basic Python.        (line 143)
+* STDOUT <1>:                            Basic Python.        (line 163)
+* step:                                  Continuing and Stepping.
+                                                              (line  45)
+* step&:                                 Background Execution.
+                                                              (line  28)
+* stepi:                                 Continuing and Stepping.
+                                                              (line 189)
+* stepi&:                                Background Execution.
+                                                              (line  31)
+* stop, a pseudo-command:                Hooks.               (line  21)
+* stopping annotation:                   Annotations for Running.
+                                                              (line   6)
+* strace:                                Create and Delete Tracepoints.
+                                                              (line  75)
+* string->argv:                          Commands In Guile.   (line  73)
+* symbol-addr-class:                     Symbols In Guile.    (line  48)
+* symbol-argument?:                      Symbols In Guile.    (line  58)
+* symbol-constant?:                      Symbols In Guile.    (line  62)
+* symbol-file:                           Files.               (line  45)
+* symbol-function?:                      Symbols In Guile.    (line  65)
+* symbol-line:                           Symbols In Guile.    (line  32)
+* symbol-linkage-name:                   Symbols In Guile.    (line  39)
+* symbol-name:                           Symbols In Guile.    (line  36)
+* symbol-needs-frame?:                   Symbols In Guile.    (line  53)
+* symbol-print-name:                     Symbols In Guile.    (line  43)
+* symbol-symtab:                         Symbols In Guile.    (line  28)
+* symbol-type:                           Symbols In Guile.    (line  24)
+* symbol-valid?:                         Symbols In Guile.    (line  17)
+* symbol-value:                          Symbols In Guile.    (line  72)
+* symbol-variable?:                      Symbols In Guile.    (line  69)
+* Symbol.addr_class:                     Symbols In Python.   (line  74)
+* Symbol.is_argument:                    Symbols In Python.   (line  84)
+* Symbol.is_constant:                    Symbols In Python.   (line  87)
+* Symbol.is_function:                    Symbols In Python.   (line  90)
+* Symbol.is_valid:                       Symbols In Python.   (line  98)
+* Symbol.is_variable:                    Symbols In Python.   (line  93)
+* Symbol.line:                           Symbols In Python.   (line  57)
+* Symbol.linkage_name:                   Symbols In Python.   (line  65)
+* Symbol.name:                           Symbols In Python.   (line  61)
+* Symbol.needs_frame:                    Symbols In Python.   (line  79)
+* Symbol.print_name:                     Symbols In Python.   (line  69)
+* Symbol.symtab:                         Symbols In Python.   (line  52)
+* Symbol.type:                           Symbols In Python.   (line  47)
+* Symbol.value:                          Symbols In Python.   (line 105)
+* symbol?:                               Symbols In Guile.    (line  13)
+* SYMBOL_FUNCTIONS_DOMAIN:               Symbols In Python.   (line 134)
+* SYMBOL_FUNCTION_DOMAIN:                Symbols In Guile.    (line 133)
+* SYMBOL_LABEL_DOMAIN:                   Symbols In Python.   (line 127)
+* SYMBOL_LABEL_DOMAIN <1>:               Symbols In Guile.    (line 126)
+* SYMBOL_LOC_ARG:                        Symbols In Python.   (line 156)
+* SYMBOL_LOC_ARG <1>:                    Symbols In Guile.    (line 155)
+* SYMBOL_LOC_BLOCK:                      Symbols In Python.   (line 177)
+* SYMBOL_LOC_BLOCK <1>:                  Symbols In Guile.    (line 176)
+* SYMBOL_LOC_COMPUTED:                   Symbols In Python.   (line 191)
+* SYMBOL_LOC_COMPUTED <1>:               Symbols In Guile.    (line 190)
+* SYMBOL_LOC_CONST:                      Symbols In Python.   (line 147)
+* SYMBOL_LOC_CONST <1>:                  Symbols In Guile.    (line 146)
+* SYMBOL_LOC_CONST_BYTES:                Symbols In Python.   (line 180)
+* SYMBOL_LOC_CONST_BYTES <1>:            Symbols In Guile.    (line 179)
+* SYMBOL_LOC_LOCAL:                      Symbols In Python.   (line 170)
+* SYMBOL_LOC_LOCAL <1>:                  Symbols In Guile.    (line 169)
+* SYMBOL_LOC_OPTIMIZED_OUT:              Symbols In Python.   (line 188)
+* SYMBOL_LOC_OPTIMIZED_OUT <1>:          Symbols In Guile.    (line 187)
+* SYMBOL_LOC_REF_ARG:                    Symbols In Python.   (line 160)
+* SYMBOL_LOC_REF_ARG <1>:                Symbols In Guile.    (line 159)
+* SYMBOL_LOC_REGISTER:                   Symbols In Python.   (line 153)
+* SYMBOL_LOC_REGISTER <1>:               Symbols In Guile.    (line 152)
+* SYMBOL_LOC_REGPARM_ADDR:               Symbols In Python.   (line 165)
+* SYMBOL_LOC_REGPARM_ADDR <1>:           Symbols In Guile.    (line 164)
+* SYMBOL_LOC_STATIC:                     Symbols In Python.   (line 150)
+* SYMBOL_LOC_STATIC <1>:                 Symbols In Guile.    (line 149)
+* SYMBOL_LOC_TYPEDEF:                    Symbols In Python.   (line 173)
+* SYMBOL_LOC_TYPEDEF <1>:                Symbols In Guile.    (line 172)
+* SYMBOL_LOC_UNDEF:                      Symbols In Python.   (line 143)
+* SYMBOL_LOC_UNDEF <1>:                  Symbols In Guile.    (line 142)
+* SYMBOL_LOC_UNRESOLVED:                 Symbols In Python.   (line 183)
+* SYMBOL_LOC_UNRESOLVED <1>:             Symbols In Guile.    (line 182)
+* SYMBOL_STRUCT_DOMAIN:                  Symbols In Python.   (line 124)
+* SYMBOL_STRUCT_DOMAIN <1>:              Symbols In Guile.    (line 123)
+* SYMBOL_TYPES_DOMAIN:                   Symbols In Python.   (line 137)
+* SYMBOL_TYPES_DOMAIN <1>:               Symbols In Guile.    (line 136)
+* SYMBOL_UNDEF_DOMAIN:                   Symbols In Python.   (line 115)
+* SYMBOL_UNDEF_DOMAIN <1>:               Symbols In Guile.    (line 114)
+* SYMBOL_VARIABLES_DOMAIN:               Symbols In Python.   (line 130)
+* SYMBOL_VARIABLES_DOMAIN <1>:           Symbols In Guile.    (line 129)
+* SYMBOL_VAR_DOMAIN:                     Symbols In Python.   (line 120)
+* SYMBOL_VAR_DOMAIN <1>:                 Symbols In Guile.    (line 119)
+* symtab-filename:                       Symbol Tables In Guile.
+                                                              (line  28)
+* symtab-fullname:                       Symbol Tables In Guile.
+                                                              (line  31)
+* symtab-global-block:                   Symbol Tables In Guile.
+                                                              (line  38)
+* symtab-objfile:                        Symbol Tables In Guile.
+                                                              (line  34)
+* symtab-static-block:                   Symbol Tables In Guile.
+                                                              (line  42)
+* symtab-valid?:                         Symbol Tables In Guile.
+                                                              (line  21)
+* Symtab.filename:                       Symbol Tables In Python.
+                                                              (line  43)
+* Symtab.fullname:                       Symbol Tables In Python.
+                                                              (line  66)
+* Symtab.global_block:                   Symbol Tables In Python.
+                                                              (line  69)
+* Symtab.is_valid:                       Symbol Tables In Python.
+                                                              (line  59)
+* Symtab.linetable:                      Symbol Tables In Python.
+                                                              (line  77)
+* Symtab.objfile:                        Symbol Tables In Python.
+                                                              (line  47)
+* Symtab.producer:                       Symbol Tables In Python.
+                                                              (line  51)
+* Symtab.static_block:                   Symbol Tables In Python.
+                                                              (line  73)
+* symtab?:                               Symbol Tables In Guile.
+                                                              (line  17)
+* Symtab_and_line.is_valid:              Symbol Tables In Python.
+                                                              (line  34)
+* Symtab_and_line.last:                  Symbol Tables In Python.
+                                                              (line  24)
+* Symtab_and_line.line:                  Symbol Tables In Python.
+                                                              (line  28)
+* Symtab_and_line.pc:                    Symbol Tables In Python.
+                                                              (line  20)
+* Symtab_and_line.symtab:                Symbol Tables In Python.
+                                                              (line  16)
+* sysinfo:                               DJGPP Native.        (line  19)
+* tab-insert (M-<TAB>):                  Commands For Text.   (line  24)
+* tabset:                                TUI Commands.        (line 117)
+* target:                                Target Commands.     (line  49)
+* target ctf:                            Trace Files.         (line  28)
+* target record:                         Process Record and Replay.
+                                                              (line  38)
+* target record-btrace:                  Process Record and Replay.
+                                                              (line  38)
+* target record-full:                    Process Record and Replay.
+                                                              (line  38)
+* target tfile:                          Trace Files.         (line  28)
+* target-config:                         Guile Configuration. (line  24)
+* task (Ada):                            Ada Tasks.           (line 104)
+* tbreak:                                Set Breaks.          (line  54)
+* tcatch:                                Set Catchpoints.     (line 272)
+* tdump:                                 tdump.               (line   6)
+* teval (tracepoints):                   Tracepoint Actions.  (line 118)
+* tfile:                                 Trace Files.         (line  28)
+* tfind:                                 tfind.               (line   6)
+* thbreak:                               Set Breaks.          (line  80)
+* this, inside C++ member functions:     C Plus Plus Expressions.
+                                                              (line  20)
+* thread apply:                          Threads.             (line 187)
+* thread find:                           Threads.             (line 207)
+* thread name:                           Threads.             (line 196)
+* thread THREAD-ID:                      Threads.             (line 169)
+* thread-info:                           GDB/MI Support Commands.
+                                                              (line  86)
+* ThreadEvent.inferior_thread:           Events In Python.    (line  54)
+* throw-user-error:                      Commands In Guile.   (line  81)
+* tilde-expand (M-~):                    Miscellaneous Commands.
+                                                              (line  29)
+* trace:                                 Create and Delete Tracepoints.
+                                                              (line   6)
+* transpose-chars (C-t):                 Commands For Text.   (line  30)
+* transpose-words (M-t):                 Commands For Text.   (line  36)
+* tsave:                                 Trace Files.         (line  12)
+* tstart [ NOTES ]:                      Starting and Stopping Trace Experiments.
+                                                              (line   6)
+* tstatus:                               Starting and Stopping Trace Experiments.
+                                                              (line  27)
+* tstop [ NOTES ]:                       Starting and Stopping Trace Experiments.
+                                                              (line  16)
+* tty:                                   Input/Output.        (line  23)
+* tui disable:                           TUI Commands.        (line  23)
+* tui enable:                            TUI Commands.        (line  18)
+* tui reg:                               TUI Commands.        (line  80)
+* tvariable:                             Trace State Variables.
+                                                              (line  26)
+* type-array:                            Types In Guile.      (line  52)
+* type-code:                             Types In Guile.      (line  25)
+* type-const:                            Types In Guile.      (line  99)
+* type-field:                            Types In Guile.      (line 129)
+* type-fields:                           Types In Guile.      (line 115)
+* type-has-field-deep?:                  Guile Types Module.  (line  32)
+* type-has-field?:                       Types In Guile.      (line 142)
+* type-name:                             Types In Guile.      (line  34)
+* type-num-fields:                       Types In Guile.      (line 112)
+* type-pointer:                          Types In Guile.      (line  73)
+* type-print-name:                       Types In Guile.      (line  38)
+* type-range:                            Types In Guile.      (line  77)
+* type-reference:                        Types In Guile.      (line  81)
+* type-sizeof:                           Types In Guile.      (line  43)
+* type-strip-typedefs:                   Types In Guile.      (line  48)
+* type-tag:                              Types In Guile.      (line  29)
+* type-target:                           Types In Guile.      (line  85)
+* type-unqualified:                      Types In Guile.      (line 107)
+* type-vector:                           Types In Guile.      (line  60)
+* type-volatile:                         Types In Guile.      (line 103)
+* Type.array:                            Types In Python.     (line 102)
+* Type.code:                             Types In Python.     (line  32)
+* Type.const:                            Types In Python.     (line 123)
+* Type.fields:                           Types In Python.     (line  53)
+* Type.name:                             Types In Python.     (line  36)
+* Type.optimized_out:                    Types In Python.     (line 180)
+* Type.pointer:                          Types In Python.     (line 146)
+* Type.range:                            Types In Python.     (line 136)
+* Type.reference:                        Types In Python.     (line 142)
+* Type.sizeof:                           Types In Python.     (line  40)
+* Type.strip_typedefs:                   Types In Python.     (line 150)
+* Type.tag:                              Types In Python.     (line  45)
+* Type.target:                           Types In Python.     (line 154)
+* Type.template_argument:                Types In Python.     (line 168)
+* Type.unqualified:                      Types In Python.     (line 131)
+* Type.vector:                           Types In Python.     (line 110)
+* Type.volatile:                         Types In Python.     (line 127)
+* type?:                                 Types In Guile.      (line  11)
+* TYPE_CODE_ARRAY:                       Types In Python.     (line 192)
+* TYPE_CODE_ARRAY <1>:                   Types In Guile.      (line 153)
+* TYPE_CODE_BITSTRING:                   Types In Python.     (line 230)
+* TYPE_CODE_BITSTRING <1>:               Types In Guile.      (line 191)
+* TYPE_CODE_BOOL:                        Types In Python.     (line 251)
+* TYPE_CODE_BOOL <1>:                    Types In Guile.      (line 212)
+* TYPE_CODE_CHAR:                        Types In Python.     (line 248)
+* TYPE_CODE_CHAR <1>:                    Types In Guile.      (line 209)
+* TYPE_CODE_COMPLEX:                     Types In Python.     (line 254)
+* TYPE_CODE_COMPLEX <1>:                 Types In Guile.      (line 215)
+* TYPE_CODE_DECFLOAT:                    Types In Python.     (line 263)
+* TYPE_CODE_DECFLOAT <1>:                Types In Guile.      (line 224)
+* TYPE_CODE_ENUM:                        Types In Python.     (line 201)
+* TYPE_CODE_ENUM <1>:                    Types In Guile.      (line 162)
+* TYPE_CODE_ERROR:                       Types In Python.     (line 233)
+* TYPE_CODE_ERROR <1>:                   Types In Guile.      (line 194)
+* TYPE_CODE_FLAGS:                       Types In Python.     (line 204)
+* TYPE_CODE_FLAGS <1>:                   Types In Guile.      (line 165)
+* TYPE_CODE_FLT:                         Types In Python.     (line 213)
+* TYPE_CODE_FLT <1>:                     Types In Guile.      (line 174)
+* TYPE_CODE_FUNC:                        Types In Python.     (line 207)
+* TYPE_CODE_FUNC <1>:                    Types In Guile.      (line 168)
+* TYPE_CODE_INT:                         Types In Python.     (line 210)
+* TYPE_CODE_INT <1>:                     Types In Guile.      (line 171)
+* TYPE_CODE_INTERNAL_FUNCTION:           Types In Python.     (line 266)
+* TYPE_CODE_INTERNAL_FUNCTION <1>:       Types In Guile.      (line 227)
+* TYPE_CODE_MEMBERPTR:                   Types In Python.     (line 242)
+* TYPE_CODE_MEMBERPTR <1>:               Types In Guile.      (line 203)
+* TYPE_CODE_METHOD:                      Types In Python.     (line 236)
+* TYPE_CODE_METHOD <1>:                  Types In Guile.      (line 197)
+* TYPE_CODE_METHODPTR:                   Types In Python.     (line 239)
+* TYPE_CODE_METHODPTR <1>:               Types In Guile.      (line 200)
+* TYPE_CODE_NAMESPACE:                   Types In Python.     (line 260)
+* TYPE_CODE_NAMESPACE <1>:               Types In Guile.      (line 221)
+* TYPE_CODE_PTR:                         Types In Python.     (line 189)
+* TYPE_CODE_PTR <1>:                     Types In Guile.      (line 150)
+* TYPE_CODE_RANGE:                       Types In Python.     (line 222)
+* TYPE_CODE_RANGE <1>:                   Types In Guile.      (line 183)
+* TYPE_CODE_REF:                         Types In Python.     (line 245)
+* TYPE_CODE_REF <1>:                     Types In Guile.      (line 206)
+* TYPE_CODE_SET:                         Types In Python.     (line 219)
+* TYPE_CODE_SET <1>:                     Types In Guile.      (line 180)
+* TYPE_CODE_STRING:                      Types In Python.     (line 225)
+* TYPE_CODE_STRING <1>:                  Types In Guile.      (line 186)
+* TYPE_CODE_STRUCT:                      Types In Python.     (line 195)
+* TYPE_CODE_STRUCT <1>:                  Types In Guile.      (line 156)
+* TYPE_CODE_TYPEDEF:                     Types In Python.     (line 257)
+* TYPE_CODE_TYPEDEF <1>:                 Types In Guile.      (line 218)
+* TYPE_CODE_UNION:                       Types In Python.     (line 198)
+* TYPE_CODE_UNION <1>:                   Types In Guile.      (line 159)
+* TYPE_CODE_VOID:                        Types In Python.     (line 216)
+* TYPE_CODE_VOID <1>:                    Types In Guile.      (line 177)
+* u (SingleKey TUI key):                 TUI Single Key Mode. (line  31)
+* u (until):                             Continuing and Stepping.
+                                                              (line 117)
+* undefined-command-error-code:          GDB/MI Support Commands.
+                                                              (line 101)
+* undisplay:                             Auto Display.        (line  45)
+* undo (C-_ or C-x C-u):                 Miscellaneous Commands.
+                                                              (line  22)
+* universal-argument ():                 Numeric Arguments.   (line  10)
+* unix-filename-rubout ():               Commands For Killing.
+                                                              (line  32)
+* unix-line-discard (C-u):               Commands For Killing.
+                                                              (line  12)
+* unix-word-rubout (C-w):                Commands For Killing.
+                                                              (line  28)
+* unset environment:                     Environment.         (line  61)
+* unset substitute-path:                 Source Path.         (line 154)
+* until:                                 Continuing and Stepping.
+                                                              (line 117)
+* until&:                                Background Execution.
+                                                              (line  46)
+* unwind-stop-reason-string:             Frames In Guile.     (line 163)
+* up:                                    Selection.           (line  27)
+* Up:                                    TUI Keys.            (line  53)
+* up-silently:                           Selection.           (line  62)
+* upcase-word (M-u):                     Commands For Text.   (line  41)
+* update:                                TUI Commands.        (line 106)
+* v (SingleKey TUI key):                 TUI Single Key Mode. (line  34)
+* value->bool:                           Values From Inferior In Guile.
+                                                              (line 234)
+* value->bytevector:                     Values From Inferior In Guile.
+                                                              (line 246)
+* value->integer:                        Values From Inferior In Guile.
+                                                              (line 238)
+* value->lazy-string:                    Values From Inferior In Guile.
+                                                              (line 291)
+* value->real:                           Values From Inferior In Guile.
+                                                              (line 242)
+* value->string:                         Values From Inferior In Guile.
+                                                              (line 250)
+* value-abs:                             Arithmetic In Guile. (line  35)
+* value-add:                             Arithmetic In Guile. (line  15)
+* value-address:                         Values From Inferior In Guile.
+                                                              (line 106)
+* value-call:                            Values From Inferior In Guile.
+                                                              (line 228)
+* value-cast:                            Values From Inferior In Guile.
+                                                              (line 129)
+* value-dereference:                     Values From Inferior In Guile.
+                                                              (line 143)
+* value-div:                             Arithmetic In Guile. (line  21)
+* value-dynamic-cast:                    Values From Inferior In Guile.
+                                                              (line 135)
+* value-dynamic-type:                    Values From Inferior In Guile.
+                                                              (line 114)
+* value-fetch-lazy!:                     Values From Inferior In Guile.
+                                                              (line 333)
+* value-field:                           Values From Inferior In Guile.
+                                                              (line 221)
+* value-lazy?:                           Values From Inferior In Guile.
+                                                              (line 316)
+* value-logand:                          Arithmetic In Guile. (line  47)
+* value-logior:                          Arithmetic In Guile. (line  49)
+* value-lognot:                          Arithmetic In Guile. (line  45)
+* value-logxor:                          Arithmetic In Guile. (line  51)
+* value-lsh:                             Arithmetic In Guile. (line  37)
+* value-max:                             Arithmetic In Guile. (line  43)
+* value-min:                             Arithmetic In Guile. (line  41)
+* value-mod:                             Arithmetic In Guile. (line  25)
+* value-mul:                             Arithmetic In Guile. (line  19)
+* value-neg:                             Arithmetic In Guile. (line  31)
+* value-not:                             Arithmetic In Guile. (line  29)
+* value-optimized-out?:                  Values From Inferior In Guile.
+                                                              (line 102)
+* value-pos:                             Arithmetic In Guile. (line  33)
+* value-pow:                             Arithmetic In Guile. (line  27)
+* value-print:                           Values From Inferior In Guile.
+                                                              (line 342)
+* value-referenced-value:                Values From Inferior In Guile.
+                                                              (line 196)
+* value-reinterpret-cast:                Values From Inferior In Guile.
+                                                              (line 139)
+* value-rem:                             Arithmetic In Guile. (line  23)
+* value-rsh:                             Arithmetic In Guile. (line  39)
+* value-sub:                             Arithmetic In Guile. (line  17)
+* value-subscript:                       Values From Inferior In Guile.
+                                                              (line 224)
+* value-type:                            Values From Inferior In Guile.
+                                                              (line 110)
+* Value.address:                         Values From Inferior.
+                                                              (line  65)
+* Value.cast:                            Values From Inferior.
+                                                              (line 141)
+* Value.const_value:                     Values From Inferior.
+                                                              (line 229)
+* Value.dereference:                     Values From Inferior.
+                                                              (line 147)
+* Value.dynamic_cast:                    Values From Inferior.
+                                                              (line 233)
+* Value.dynamic_type:                    Values From Inferior.
+                                                              (line  79)
+* Value.fetch_lazy:                      Values From Inferior.
+                                                              (line 295)
+* Value.is_lazy:                         Values From Inferior.
+                                                              (line  94)
+* Value.is_optimized_out:                Values From Inferior.
+                                                              (line  70)
+* Value.lazy_string:                     Values From Inferior.
+                                                              (line 273)
+* Value.referenced_value:                Values From Inferior.
+                                                              (line 200)
+* Value.reference_value:                 Values From Inferior.
+                                                              (line 225)
+* Value.reinterpret_cast:                Values From Inferior.
+                                                              (line 237)
+* Value.string:                          Values From Inferior.
+                                                              (line 241)
+* Value.type:                            Values From Inferior.
+                                                              (line  75)
+* Value.__init__:                        Values From Inferior.
+                                                              (line 107)
+* value<=?:                              Arithmetic In Guile. (line  57)
+* value<?:                               Arithmetic In Guile. (line  55)
+* value=?:                               Arithmetic In Guile. (line  53)
+* value>=?:                              Arithmetic In Guile. (line  61)
+* value>?:                               Arithmetic In Guile. (line  59)
+* value?:                                Values From Inferior In Guile.
+                                                              (line  41)
+* vi-editing-mode (M-C-j):               Miscellaneous Commands.
+                                                              (line  91)
+* visible-stats:                         Readline Init File Syntax.
+                                                              (line 240)
+* w (SingleKey TUI key):                 TUI Single Key Mode. (line  37)
+* watch:                                 Set Watchpoints.     (line  42)
+* watchpoint annotation:                 Annotations for Running.
+                                                              (line  50)
+* whatis:                                Symbols.             (line 114)
+* where:                                 Backtrace.           (line  46)
+* while:                                 Command Files.       (line  85)
+* while-stepping (tracepoints):          Tracepoint Actions.  (line 126)
+* winheight:                             TUI Commands.        (line 110)
+* WP_ACCESS:                             Breakpoints In Python.
+                                                              (line  57)
+* WP_ACCESS <1>:                         Breakpoints In Guile.
+                                                              (line  84)
+* WP_READ:                               Breakpoints In Python.
+                                                              (line  51)
+* WP_READ <1>:                           Breakpoints In Guile.
+                                                              (line  78)
+* WP_WRITE:                              Breakpoints In Python.
+                                                              (line  54)
+* WP_WRITE <1>:                          Breakpoints In Guile.
+                                                              (line  81)
+* x (examine memory):                    Memory.              (line   9)
+* x(examine), and info line:             Machine Code.        (line  30)
+* XMethod.__init__:                      Xmethod API.         (line  38)
+* XMethodMatcher.match:                  Xmethod API.         (line  47)
+* XMethodMatcher.__init__:               Xmethod API.         (line  43)
+* XMethodWorker.get_arg_types:           Xmethod API.         (line  60)
+* XMethodWorker.get_result_type:         Xmethod API.         (line  67)
+* XMethodWorker.__call__:                Xmethod API.         (line  73)
+* yank (C-y):                            Commands For Killing.
+                                                              (line  59)
+* yank-last-arg (M-. or M-_):            Commands For History.
+                                                              (line  64)
+* yank-nth-arg (M-C-y):                  Commands For History.
+                                                              (line  55)
+* yank-pop (M-y):                        Commands For Killing.
+                                                              (line  62)
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-8 ./gdb/doc/gdb.info-8
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.info-8	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdb.info-8	1970-01-01 00:00:00.000000000 +0000
@@ -1,2846 +0,0 @@
-This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
-
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Gdb: (gdb).                     The GNU debugger.
-* gdbserver: (gdb) Server.        The GNU debugging server.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being "Free Software" and "Free Software Needs Free
-Documentation", with the Front-Cover Texts being "A GNU Manual," and
-with the Back-Cover Texts as in (a) below.
-
-   (a) The FSF's Back-Cover Text is: "You are free to copy and modify
-this GNU Manual.  Buying copies from GNU Press supports the FSF in
-developing GNU and promoting software freedom."
-
-   This file documents the GNU debugger GDB.
-
-   This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150706-cvs.
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being "Free Software" and "Free Software Needs Free
-Documentation", with the Front-Cover Texts being "A GNU Manual," and
-with the Back-Cover Texts as in (a) below.
-
-   (a) The FSF's Back-Cover Text is: "You are free to copy and modify
-this GNU Manual.  Buying copies from GNU Press supports the FSF in
-developing GNU and promoting software freedom."
-
-
-File: gdb.info,  Node: Command and Variable Index,  Prev: Concept Index,  Up: Top
-
-Command, Variable, and Function Index
-*************************************
-
-[index]
-* Menu:
-
-* !:                                     Shell Commands.      (line  10)
-* # (a comment):                         Command Syntax.      (line  38)
-* $_, convenience variable:              Convenience Vars.    (line  65)
-* $__, convenience variable:             Convenience Vars.    (line  74)
-* $_any_caller_is, convenience function: Convenience Funs.    (line 113)
-* $_any_caller_matches, convenience function: Convenience Funs.
-                                                              (line 125)
-* $_caller_is, convenience function:     Convenience Funs.    (line  83)
-* $_caller_matches, convenience function: Convenience Funs.   (line 106)
-* $_exception, convenience variable:     Set Catchpoints.     (line  21)
-* $_exitcode, convenience variable:      Convenience Vars.    (line  80)
-* $_exitsignal, convenience variable:    Convenience Vars.    (line  85)
-* $_isvoid, convenience function:        Convenience Funs.    (line  15)
-* $_memeq, convenience function:         Convenience Funs.    (line  66)
-* $_probe_arg, convenience variable:     Static Probe Points. (line  77)
-* $_regex, convenience function:         Convenience Funs.    (line  70)
-* $_sdata, collect:                      Tracepoint Actions.  (line  78)
-* $_sdata, inspect, convenience variable: Convenience Vars.   (line 142)
-* $_siginfo, convenience variable:       Convenience Vars.    (line 148)
-* $_streq, convenience function:         Convenience Funs.    (line  76)
-* $_strlen, convenience function:        Convenience Funs.    (line  80)
-* $_thread, convenience variable:        Threads.             (line 116)
-* $_tlb, convenience variable:           Convenience Vars.    (line 154)
-* $bpnum, convenience variable:          Set Breaks.          (line   6)
-* $cdir, convenience variable:           Source Path.         (line 108)
-* $cwd, convenience variable:            Source Path.         (line 108)
-* $tpnum:                                Create and Delete Tracepoints.
-                                                              (line 123)
-* $trace_file:                           Tracepoint Variables.
-                                                              (line  16)
-* $trace_frame:                          Tracepoint Variables.
-                                                              (line   6)
-* $trace_func:                           Tracepoint Variables.
-                                                              (line  19)
-* $trace_line:                           Tracepoint Variables.
-                                                              (line  13)
-* $tracepoint:                           Tracepoint Variables.
-                                                              (line  10)
-* ( <1>:                                 Parameters In Guile. (line  27)
-* (:                                     Commands In Guile.   (line  18)
-* -ada-task-info:                        GDB/MI Ada Tasking Commands.
-                                                              (line   9)
-* -add-inferior:                         GDB/MI Miscellaneous Commands.
-                                                              (line 298)
-* -break-after:                          GDB/MI Breakpoint Commands.
-                                                              (line  11)
-* -break-commands:                       GDB/MI Breakpoint Commands.
-                                                              (line  56)
-* -break-condition:                      GDB/MI Breakpoint Commands.
-                                                              (line  90)
-* -break-delete:                         GDB/MI Breakpoint Commands.
-                                                              (line 127)
-* -break-disable:                        GDB/MI Breakpoint Commands.
-                                                              (line 161)
-* -break-enable:                         GDB/MI Breakpoint Commands.
-                                                              (line 197)
-* -break-info:                           GDB/MI Breakpoint Commands.
-                                                              (line 232)
-* -break-insert:                         GDB/MI Breakpoint Commands.
-                                                              (line 256)
-* -break-list:                           GDB/MI Breakpoint Commands.
-                                                              (line 427)
-* -break-passcount:                      GDB/MI Breakpoint Commands.
-                                                              (line 506)
-* -break-watch:                          GDB/MI Breakpoint Commands.
-                                                              (line 518)
-* -catch-assert:                         Ada Exception GDB/MI Catchpoint Commands.
-                                                              (line  12)
-* -catch-exception:                      Ada Exception GDB/MI Catchpoint Commands.
-                                                              (line  48)
-* -catch-load:                           Shared Library GDB/MI Catchpoint Commands.
-                                                              (line   9)
-* -catch-unload:                         Shared Library GDB/MI Catchpoint Commands.
-                                                              (line  36)
-* -data-disassemble:                     GDB/MI Data Manipulation.
-                                                              (line  15)
-* -data-evaluate-expression:             GDB/MI Data Manipulation.
-                                                              (line 184)
-* -data-list-changed-registers:          GDB/MI Data Manipulation.
-                                                              (line 222)
-* -data-list-register-names:             GDB/MI Data Manipulation.
-                                                              (line 258)
-* -data-list-register-values:            GDB/MI Data Manipulation.
-                                                              (line 298)
-* -data-read-memory:                     GDB/MI Data Manipulation.
-                                                              (line 390)
-* -data-read-memory-bytes:               GDB/MI Data Manipulation.
-                                                              (line 497)
-* -data-write-memory-bytes:              GDB/MI Data Manipulation.
-                                                              (line 574)
-* -dprintf-insert:                       GDB/MI Breakpoint Commands.
-                                                              (line 352)
-* -enable-frame-filters:                 GDB/MI Stack Manipulation.
-                                                              (line   9)
-* -enable-pretty-printing:               GDB/MI Variable Objects.
-                                                              (line 116)
-* -enable-timings:                       GDB/MI Miscellaneous Commands.
-                                                              (line 394)
-* -environment-cd:                       GDB/MI Program Context.
-                                                              (line  33)
-* -environment-directory:                GDB/MI Program Context.
-                                                              (line  56)
-* -environment-path:                     GDB/MI Program Context.
-                                                              (line 100)
-* -environment-pwd:                      GDB/MI Program Context.
-                                                              (line 141)
-* -exec-arguments:                       GDB/MI Program Context.
-                                                              (line   9)
-* -exec-continue:                        GDB/MI Program Execution.
-                                                              (line  13)
-* -exec-finish:                          GDB/MI Program Execution.
-                                                              (line  56)
-* -exec-interrupt:                       GDB/MI Program Execution.
-                                                              (line  99)
-* -exec-jump:                            GDB/MI Program Execution.
-                                                              (line 149)
-* -exec-next:                            GDB/MI Program Execution.
-                                                              (line 173)
-* -exec-next-instruction:                GDB/MI Program Execution.
-                                                              (line 204)
-* -exec-return:                          GDB/MI Program Execution.
-                                                              (line 240)
-* -exec-run:                             GDB/MI Program Execution.
-                                                              (line 283)
-* -exec-step:                            GDB/MI Program Execution.
-                                                              (line 353)
-* -exec-step-instruction:                GDB/MI Program Execution.
-                                                              (line 395)
-* -exec-until:                           GDB/MI Program Execution.
-                                                              (line 436)
-* -file-exec-and-symbols:                GDB/MI File Commands.
-                                                              (line  12)
-* -file-exec-file:                       GDB/MI File Commands.
-                                                              (line  40)
-* -file-list-exec-source-file:           GDB/MI File Commands.
-                                                              (line  67)
-* -file-list-exec-source-files:          GDB/MI File Commands.
-                                                              (line  93)
-* -file-symbol-file:                     GDB/MI File Commands.
-                                                              (line 123)
-* -gdb-exit:                             GDB/MI Miscellaneous Commands.
-                                                              (line   9)
-* -gdb-set:                              GDB/MI Miscellaneous Commands.
-                                                              (line  31)
-* -gdb-show:                             GDB/MI Miscellaneous Commands.
-                                                              (line  54)
-* -gdb-version:                          GDB/MI Miscellaneous Commands.
-                                                              (line  77)
-* -inferior-tty-set:                     GDB/MI Miscellaneous Commands.
-                                                              (line 345)
-* -inferior-tty-show:                    GDB/MI Miscellaneous Commands.
-                                                              (line 368)
-* -info-ada-exceptions:                  GDB/MI Ada Exceptions Commands.
-                                                              (line   9)
-* -info-gdb-mi-command:                  GDB/MI Support Commands.
-                                                              (line  14)
-* -info-os:                              GDB/MI Miscellaneous Commands.
-                                                              (line 224)
-* -interpreter-exec:                     GDB/MI Miscellaneous Commands.
-                                                              (line 320)
-* -list-features:                        GDB/MI Support Commands.
-                                                              (line  58)
-* -list-target-features:                 GDB/MI Support Commands.
-                                                              (line 123)
-* -list-thread-groups:                   GDB/MI Miscellaneous Commands.
-                                                              (line 111)
-* -stack-info-depth:                     GDB/MI Stack Manipulation.
-                                                              (line  50)
-* -stack-info-frame:                     GDB/MI Stack Manipulation.
-                                                              (line  24)
-* -stack-list-arguments:                 GDB/MI Stack Manipulation.
-                                                              (line  88)
-* -stack-list-frames:                    GDB/MI Stack Manipulation.
-                                                              (line 182)
-* -stack-list-locals:                    GDB/MI Stack Manipulation.
-                                                              (line 287)
-* -stack-list-variables:                 GDB/MI Stack Manipulation.
-                                                              (line 333)
-* -stack-select-frame:                   GDB/MI Stack Manipulation.
-                                                              (line 361)
-* -symbol-list-lines:                    GDB/MI Symbol Query. (line   9)
-* -target-attach:                        GDB/MI Target Manipulation.
-                                                              (line   9)
-* -target-detach:                        GDB/MI Target Manipulation.
-                                                              (line  36)
-* -target-disconnect:                    GDB/MI Target Manipulation.
-                                                              (line  61)
-* -target-download:                      GDB/MI Target Manipulation.
-                                                              (line  85)
-* -target-file-delete:                   GDB/MI File Transfer Commands.
-                                                              (line  57)
-* -target-file-get:                      GDB/MI File Transfer Commands.
-                                                              (line  33)
-* -target-file-put:                      GDB/MI File Transfer Commands.
-                                                              (line   9)
-* -target-select:                        GDB/MI Target Manipulation.
-                                                              (line 198)
-* -thread-info:                          GDB/MI Thread Commands.
-                                                              (line   9)
-* -thread-list-ids:                      GDB/MI Thread Commands.
-                                                              (line  90)
-* -thread-select:                        GDB/MI Thread Commands.
-                                                              (line 118)
-* -trace-define-variable:                GDB/MI Tracepoint Commands.
-                                                              (line  83)
-* -trace-find:                           GDB/MI Tracepoint Commands.
-                                                              (line  12)
-* -trace-frame-collected:                GDB/MI Tracepoint Commands.
-                                                              (line 100)
-* -trace-list-variables:                 GDB/MI Tracepoint Commands.
-                                                              (line 209)
-* -trace-save:                           GDB/MI Tracepoint Commands.
-                                                              (line 252)
-* -trace-start:                          GDB/MI Tracepoint Commands.
-                                                              (line 269)
-* -trace-status:                         GDB/MI Tracepoint Commands.
-                                                              (line 285)
-* -trace-stop:                           GDB/MI Tracepoint Commands.
-                                                              (line 357)
-* -var-assign:                           GDB/MI Variable Objects.
-                                                              (line 491)
-* -var-create:                           GDB/MI Variable Objects.
-                                                              (line 134)
-* -var-delete:                           GDB/MI Variable Objects.
-                                                              (line 223)
-* -var-evaluate-expression:              GDB/MI Variable Objects.
-                                                              (line 470)
-* -var-info-expression:                  GDB/MI Variable Objects.
-                                                              (line 407)
-* -var-info-num-children:                GDB/MI Variable Objects.
-                                                              (line 272)
-* -var-info-path-expression:             GDB/MI Variable Objects.
-                                                              (line 432)
-* -var-info-type:                        GDB/MI Variable Objects.
-                                                              (line 394)
-* -var-list-children:                    GDB/MI Variable Objects.
-                                                              (line 288)
-* -var-set-format:                       GDB/MI Variable Objects.
-                                                              (line 236)
-* -var-set-frozen:                       GDB/MI Variable Objects.
-                                                              (line 635)
-* -var-set-update-range:                 GDB/MI Variable Objects.
-                                                              (line 661)
-* -var-set-visualizer:                   GDB/MI Variable Objects.
-                                                              (line 684)
-* -var-show-attributes:                  GDB/MI Variable Objects.
-                                                              (line 456)
-* -var-show-format:                      GDB/MI Variable Objects.
-                                                              (line 259)
-* -var-update:                           GDB/MI Variable Objects.
-                                                              (line 515)
-* <gdb:arch>:                            Architectures In Guile.
-                                                              (line   6)
-* <gdb:block>:                           Blocks In Guile.     (line   6)
-* <gdb:breakpoint>:                      Breakpoints In Guile.
-                                                              (line   6)
-* <gdb:iterator>:                        Iterators In Guile.  (line   6)
-* <gdb:lazy-string>:                     Lazy Strings In Guile.
-                                                              (line   6)
-* <gdb:objfile>:                         Objfiles In Guile.   (line   6)
-* <gdb:progspace>:                       Progspaces In Guile. (line   6)
-* <gdb:sal>:                             Symbol Tables In Guile.
-                                                              (line   6)
-* <gdb:symbol>:                          Symbols In Guile.    (line   6)
-* <gdb:symtab>:                          Symbol Tables In Guile.
-                                                              (line   6)
-* <gdb:type>:                            Types In Guile.      (line   6)
-* <gdb:value>:                           Values From Inferior In Guile.
-                                                              (line   6)
-* @, referencing memory as an array:     Arrays.              (line   6)
-* ^connected:                            GDB/MI Result Records.
-                                                              (line  22)
-* ^done:                                 GDB/MI Result Records.
-                                                              (line   9)
-* ^error:                                GDB/MI Result Records.
-                                                              (line  25)
-* ^exit:                                 GDB/MI Result Records.
-                                                              (line  36)
-* ^running:                              GDB/MI Result Records.
-                                                              (line  14)
-* __init__ on TypePrinter:               gdb.types.           (line  83)
-* abort (C-g):                           Miscellaneous Commands.
-                                                              (line  10)
-* accept-line (Newline or Return):       Commands For History.
-                                                              (line   6)
-* actions:                               Tracepoint Actions.  (line   6)
-* ada-task-info:                         GDB/MI Support Commands.
-                                                              (line 101)
-* add-auto-load-safe-path:               Auto-loading safe path.
-                                                              (line  50)
-* add-auto-load-scripts-directory:       objfile-gdbdotext file.
-                                                              (line  66)
-* add-inferior:                          Inferiors and Programs.
-                                                              (line  60)
-* add-symbol-file:                       Files.               (line 113)
-* add-symbol-file-from-memory:           Files.               (line 183)
-* advance LOCATION:                      Continuing and Stepping.
-                                                              (line 182)
-* alias:                                 Aliases.             (line  21)
-* append:                                Dump/Restore Files.  (line  38)
-* append-pretty-printer!:                Guile Printing Module.
-                                                              (line  19)
-* apropos:                               Help.                (line  62)
-* arch-bool-type:                        Architectures In Guile.
-                                                              (line  85)
-* arch-char-type:                        Architectures In Guile.
-                                                              (line  37)
-* arch-charset:                          Architectures In Guile.
-                                                              (line  24)
-* arch-disassemble:                      Disassembly In Guile.
-                                                              (line  12)
-* arch-double-type:                      Architectures In Guile.
-                                                              (line  77)
-* arch-float-type:                       Architectures In Guile.
-                                                              (line  73)
-* arch-int-type:                         Architectures In Guile.
-                                                              (line  45)
-* arch-int16-type:                       Architectures In Guile.
-                                                              (line 105)
-* arch-int32-type:                       Architectures In Guile.
-                                                              (line 113)
-* arch-int64-type:                       Architectures In Guile.
-                                                              (line 121)
-* arch-int8-type:                        Architectures In Guile.
-                                                              (line  97)
-* arch-long-type:                        Architectures In Guile.
-                                                              (line  49)
-* arch-longdouble-type:                  Architectures In Guile.
-                                                              (line  81)
-* arch-longlong-type:                    Architectures In Guile.
-                                                              (line  89)
-* arch-name:                             Architectures In Guile.
-                                                              (line  21)
-* arch-schar-type:                       Architectures In Guile.
-                                                              (line  53)
-* arch-short-type:                       Architectures In Guile.
-                                                              (line  41)
-* arch-uchar-type:                       Architectures In Guile.
-                                                              (line  57)
-* arch-uint-type:                        Architectures In Guile.
-                                                              (line  65)
-* arch-uint16-type:                      Architectures In Guile.
-                                                              (line 109)
-* arch-uint32-type:                      Architectures In Guile.
-                                                              (line 117)
-* arch-uint64-type:                      Architectures In Guile.
-                                                              (line 125)
-* arch-uint8-type:                       Architectures In Guile.
-                                                              (line 101)
-* arch-ulong-type:                       Architectures In Guile.
-                                                              (line  69)
-* arch-ulonglong-type:                   Architectures In Guile.
-                                                              (line  93)
-* arch-ushort-type:                      Architectures In Guile.
-                                                              (line  61)
-* arch-void-type:                        Architectures In Guile.
-                                                              (line  33)
-* arch-wide-charset:                     Architectures In Guile.
-                                                              (line  27)
-* arch?:                                 Architectures In Guile.
-                                                              (line  14)
-* Architecture.disassemble:              Architectures In Python.
-                                                              (line  16)
-* Architecture.name:                     Architectures In Python.
-                                                              (line  13)
-* attach:                                Attach.              (line   6)
-* attach&:                               Background Execution.
-                                                              (line  25)
-* awatch:                                Set Watchpoints.     (line  83)
-* b (break):                             Set Breaks.          (line   6)
-* backtrace:                             Backtrace.           (line  11)
-* backward-char (C-b):                   Commands For Moving. (line  15)
-* backward-delete-char (Rubout):         Commands For Text.   (line  11)
-* backward-kill-line (C-x Rubout):       Commands For Killing.
-                                                              (line   9)
-* backward-kill-word (M-<DEL>):          Commands For Killing.
-                                                              (line  24)
-* backward-word (M-b):                   Commands For Moving. (line  22)
-* beginning-of-history (M-<):            Commands For History.
-                                                              (line  19)
-* beginning-of-line (C-a):               Commands For Moving. (line   6)
-* bell-style:                            Readline Init File Syntax.
-                                                              (line  35)
-* bind-tty-special-chars:                Readline Init File Syntax.
-                                                              (line  42)
-* block-end:                             Blocks In Guile.     (line  71)
-* block-function:                        Blocks In Guile.     (line  74)
-* block-global-block:                    Blocks In Guile.     (line  88)
-* block-global?:                         Blocks In Guile.     (line  94)
-* block-start:                           Blocks In Guile.     (line  68)
-* block-static-block:                    Blocks In Guile.     (line  91)
-* block-static?:                         Blocks In Guile.     (line  98)
-* block-superblock:                      Blocks In Guile.     (line  84)
-* block-symbols:                         Blocks In Guile.     (line 102)
-* block-symbols-progress?:               Blocks In Guile.     (line 113)
-* block-valid?:                          Blocks In Guile.     (line  60)
-* Block.end:                             Blocks In Python.    (line  82)
-* Block.function:                        Blocks In Python.    (line  85)
-* Block.global_block:                    Blocks In Python.    (line 100)
-* Block.is_global:                       Blocks In Python.    (line 108)
-* Block.is_static:                       Blocks In Python.    (line 112)
-* Block.is_valid:                        Blocks In Python.    (line  69)
-* Block.start:                           Blocks In Python.    (line  79)
-* Block.static_block:                    Blocks In Python.    (line 104)
-* Block.superblock:                      Blocks In Python.    (line  95)
-* block?:                                Blocks In Guile.     (line  56)
-* BP_ACCESS_WATCHPOINT <1>:              Breakpoints In Guile.
-                                                              (line  71)
-* BP_ACCESS_WATCHPOINT:                  Breakpoints In Python.
-                                                              (line 154)
-* BP_BREAKPOINT <1>:                     Breakpoints In Guile.
-                                                              (line  57)
-* BP_BREAKPOINT:                         Breakpoints In Python.
-                                                              (line 142)
-* BP_HARDWARE_WATCHPOINT <1>:            Breakpoints In Guile.
-                                                              (line  63)
-* BP_HARDWARE_WATCHPOINT:                Breakpoints In Python.
-                                                              (line 148)
-* BP_READ_WATCHPOINT <1>:                Breakpoints In Guile.
-                                                              (line  67)
-* BP_READ_WATCHPOINT:                    Breakpoints In Python.
-                                                              (line 151)
-* BP_WATCHPOINT <1>:                     Breakpoints In Guile.
-                                                              (line  60)
-* BP_WATCHPOINT:                         Breakpoints In Python.
-                                                              (line 145)
-* break:                                 Set Breaks.          (line   6)
-* break ... task TASKNO (Ada):           Ada Tasks.           (line 135)
-* break ... thread THREADNO:             Thread-Specific Breakpoints.
-                                                              (line  10)
-* break, and Objective-C:                Method Names in Commands.
-                                                              (line   9)
-* break-range:                           PowerPC Embedded.    (line  41)
-* breakpoint annotation:                 Annotations for Running.
-                                                              (line  47)
-* breakpoint-commands:                   Breakpoints In Guile.
-                                                              (line 237)
-* breakpoint-condition:                  Breakpoints In Guile.
-                                                              (line 195)
-* breakpoint-enabled?:                   Breakpoints In Guile.
-                                                              (line 146)
-* breakpoint-expression:                 Breakpoints In Guile.
-                                                              (line 141)
-* breakpoint-hit-count:                  Breakpoints In Guile.
-                                                              (line 171)
-* breakpoint-ignore-count:               Breakpoints In Guile.
-                                                              (line 165)
-* breakpoint-location:                   Breakpoints In Guile.
-                                                              (line 136)
-* breakpoint-notifications:              GDB/MI Support Commands.
-                                                              (line  97)
-* breakpoint-number:                     Breakpoints In Guile.
-                                                              (line 124)
-* breakpoint-silent?:                    Breakpoints In Guile.
-                                                              (line 153)
-* breakpoint-stop:                       Breakpoints In Guile.
-                                                              (line 203)
-* breakpoint-task:                       Breakpoints In Guile.
-                                                              (line 186)
-* breakpoint-thread:                     Breakpoints In Guile.
-                                                              (line 178)
-* breakpoint-type:                       Breakpoints In Guile.
-                                                              (line 128)
-* breakpoint-valid?:                     Breakpoints In Guile.
-                                                              (line 114)
-* breakpoint-visible?:                   Breakpoints In Guile.
-                                                              (line 132)
-* Breakpoint.__init__:                   Breakpoints In Python.
-                                                              (line  10)
-* Breakpoint.commands:                   Breakpoints In Python.
-                                                              (line 180)
-* Breakpoint.condition:                  Breakpoints In Python.
-                                                              (line 175)
-* Breakpoint.delete:                     Breakpoints In Python.
-                                                              (line  83)
-* Breakpoint.enabled:                    Breakpoints In Python.
-                                                              (line  88)
-* Breakpoint.expression:                 Breakpoints In Python.
-                                                              (line 169)
-* Breakpoint.hit_count:                  Breakpoints In Python.
-                                                              (line 158)
-* Breakpoint.ignore_count:               Breakpoints In Python.
-                                                              (line 112)
-* Breakpoint.is_valid:                   Breakpoints In Python.
-                                                              (line  75)
-* Breakpoint.location:                   Breakpoints In Python.
-                                                              (line 163)
-* Breakpoint.number:                     Breakpoints In Python.
-                                                              (line 116)
-* Breakpoint.silent:                     Breakpoints In Python.
-                                                              (line  93)
-* Breakpoint.stop:                       Breakpoints In Python.
-                                                              (line  32)
-* Breakpoint.task:                       Breakpoints In Python.
-                                                              (line 106)
-* Breakpoint.temporary:                  Breakpoints In Python.
-                                                              (line 131)
-* Breakpoint.thread:                     Breakpoints In Python.
-                                                              (line 101)
-* Breakpoint.type:                       Breakpoints In Python.
-                                                              (line 121)
-* Breakpoint.visible:                    Breakpoints In Python.
-                                                              (line 126)
-* breakpoint?:                           Breakpoints In Guile.
-                                                              (line 110)
-* BreakpointEvent.breakpoint:            Events In Python.    (line 110)
-* BreakpointEvent.breakpoints:           Events In Python.    (line 105)
-* breakpoints:                           Breakpoints In Guile.
-                                                              (line 106)
-* breakpoints-invalid annotation:        Invalidation.        (line  13)
-* bt (backtrace):                        Backtrace.           (line  11)
-* c (continue):                          Continuing and Stepping.
-                                                              (line  16)
-* c (SingleKey TUI key):                 TUI Single Key Mode. (line  10)
-* C-L:                                   TUI Keys.            (line  65)
-* C-x 1:                                 TUI Keys.            (line  19)
-* C-x 2:                                 TUI Keys.            (line  26)
-* C-x A:                                 TUI Keys.            (line  12)
-* C-x a:                                 TUI Keys.            (line  11)
-* C-x C-a:                               TUI Keys.            (line  10)
-* C-x o:                                 TUI Keys.            (line  34)
-* C-x s:                                 TUI Keys.            (line  41)
-* call:                                  Calling.             (line  11)
-* call-last-kbd-macro (C-x e):           Keyboard Macros.     (line  13)
-* capitalize-word (M-c):                 Commands For Text.   (line  49)
-* catch:                                 Set Catchpoints.     (line  10)
-* catch assert:                          Set Catchpoints.     (line  88)
-* catch catch:                           Set Catchpoints.     (line  16)
-* catch exception:                       Set Catchpoints.     (line  67)
-* catch exception unhandled:             Set Catchpoints.     (line  84)
-* catch exec:                            Set Catchpoints.     (line  91)
-* catch fork:                            Set Catchpoints.     (line 213)
-* catch load:                            Set Catchpoints.     (line 222)
-* catch rethrow:                         Set Catchpoints.     (line  16)
-* catch signal:                          Set Catchpoints.     (line 227)
-* catch syscall:                         Set Catchpoints.     (line  96)
-* catch throw:                           Set Catchpoints.     (line  16)
-* catch unload:                          Set Catchpoints.     (line 222)
-* catch vfork:                           Set Catchpoints.     (line 217)
-* cd:                                    Working Directory.   (line  16)
-* cdir:                                  Source Path.         (line 108)
-* character-search (C-]):                Miscellaneous Commands.
-                                                              (line  41)
-* character-search-backward (M-C-]):     Miscellaneous Commands.
-                                                              (line  46)
-* checkpoint:                            Checkpoint/Restart.  (line  26)
-* clear:                                 Delete Breaks.       (line  21)
-* clear, and Objective-C:                Method Names in Commands.
-                                                              (line   9)
-* clear-screen (C-l):                    Commands For Moving. (line  26)
-* ClearObjFilesEvent.progspace:          Events In Python.    (line 130)
-* clone-inferior:                        Inferiors and Programs.
-                                                              (line  67)
-* collect (tracepoints):                 Tracepoint Actions.  (line  49)
-* colon-colon, in Modula-2:              M2 Scope.            (line   6)
-* Command.__init__:                      Commands In Python.  (line  12)
-* Command.complete:                      Commands In Python.  (line  73)
-* Command.dont_repeat:                   Commands In Python.  (line  44)
-* Command.invoke:                        Commands In Python.  (line  50)
-* command?:                              Commands In Guile.   (line  63)
-* COMMAND_BREAKPOINTS <1>:               Commands In Guile.   (line 178)
-* COMMAND_BREAKPOINTS:                   Commands In Python.  (line 145)
-* COMMAND_DATA <1>:                      Commands In Guile.   (line 148)
-* COMMAND_DATA:                          Commands In Python.  (line 115)
-* COMMAND_FILES <1>:                     Commands In Guile.   (line 159)
-* COMMAND_FILES:                         Commands In Python.  (line 126)
-* COMMAND_MAINTENANCE <1>:               Commands In Guile.   (line 202)
-* COMMAND_MAINTENANCE:                   Commands In Python.  (line 169)
-* COMMAND_NONE <1>:                      Commands In Guile.   (line 137)
-* COMMAND_NONE:                          Commands In Python.  (line 105)
-* COMMAND_OBSCURE <1>:                   Commands In Guile.   (line 196)
-* COMMAND_OBSCURE:                       Commands In Python.  (line 163)
-* COMMAND_RUNNING <1>:                   Commands In Guile.   (line 142)
-* COMMAND_RUNNING:                       Commands In Python.  (line 109)
-* COMMAND_STACK <1>:                     Commands In Guile.   (line 153)
-* COMMAND_STACK:                         Commands In Python.  (line 120)
-* COMMAND_STATUS <1>:                    Commands In Guile.   (line 172)
-* COMMAND_STATUS:                        Commands In Python.  (line 139)
-* COMMAND_SUPPORT <1>:                   Commands In Guile.   (line 165)
-* COMMAND_SUPPORT:                       Commands In Python.  (line 132)
-* COMMAND_TRACEPOINTS <1>:               Commands In Guile.   (line 184)
-* COMMAND_TRACEPOINTS:                   Commands In Python.  (line 151)
-* COMMAND_USER <1>:                      Commands In Guile.   (line 190)
-* COMMAND_USER:                          Commands In Python.  (line 157)
-* commands:                              Break Commands.      (line  11)
-* commands annotation:                   Prompting.           (line  27)
-* comment-begin:                         Readline Init File Syntax.
-                                                              (line  47)
-* compare-sections:                      Memory.              (line 139)
-* compile code:                          Compiling and Injecting Code.
-                                                              (line  11)
-* compile file:                          Compiling and Injecting Code.
-                                                              (line  56)
-* complete:                              Help.                (line  77)
-* complete (<TAB>):                      Commands For Completion.
-                                                              (line   6)
-* COMPLETE_COMMAND <1>:                  Commands In Guile.   (line 223)
-* COMPLETE_COMMAND:                      Commands In Python.  (line 190)
-* COMPLETE_EXPRESSION <1>:               Commands In Guile.   (line 231)
-* COMPLETE_EXPRESSION:                   Commands In Python.  (line 198)
-* COMPLETE_FILENAME <1>:                 Commands In Guile.   (line 216)
-* COMPLETE_FILENAME:                     Commands In Python.  (line 183)
-* COMPLETE_LOCATION <1>:                 Commands In Guile.   (line 219)
-* COMPLETE_LOCATION:                     Commands In Python.  (line 186)
-* COMPLETE_NONE <1>:                     Commands In Guile.   (line 213)
-* COMPLETE_NONE:                         Commands In Python.  (line 180)
-* COMPLETE_SYMBOL <1>:                   Commands In Guile.   (line 227)
-* COMPLETE_SYMBOL:                       Commands In Python.  (line 194)
-* completion-display-width:              Readline Init File Syntax.
-                                                              (line  52)
-* completion-ignore-case:                Readline Init File Syntax.
-                                                              (line  59)
-* completion-map-case:                   Readline Init File Syntax.
-                                                              (line  64)
-* completion-prefix-display-length:      Readline Init File Syntax.
-                                                              (line  70)
-* completion-query-items:                Readline Init File Syntax.
-                                                              (line  77)
-* condition:                             Conditions.          (line  58)
-* continue:                              Continuing and Stepping.
-                                                              (line  16)
-* continue&:                             Background Execution.
-                                                              (line  40)
-* convert-meta:                          Readline Init File Syntax.
-                                                              (line  87)
-* copy-backward-word ():                 Commands For Killing.
-                                                              (line  49)
-* copy-forward-word ():                  Commands For Killing.
-                                                              (line  54)
-* copy-region-as-kill ():                Commands For Killing.
-                                                              (line  45)
-* core-file:                             Files.               (line  97)
-* ctf:                                   Trace Files.         (line  28)
-* Ctrl-o (operate-and-get-next):         Command Syntax.      (line  42)
-* current-arch:                          Architectures In Guile.
-                                                              (line  18)
-* current-objfile:                       Objfiles In Guile.   (line  47)
-* current-progspace:                     Progspaces In Guile. (line  27)
-* cwd:                                   Source Path.         (line 108)
-* d (delete):                            Delete Breaks.       (line  41)
-* d (SingleKey TUI key):                 TUI Single Key Mode. (line  13)
-* data-directory:                        Guile Configuration. (line  10)
-* data-read-memory-bytes:                GDB/MI Support Commands.
-                                                              (line  93)
-* debug_chaos:                           M32R/D.              (line  50)
-* default-visualizer:                    Guile Pretty Printing API.
-                                                              (line 127)
-* define:                                Define.              (line  37)
-* delete:                                Delete Breaks.       (line  41)
-* delete checkpoint CHECKPOINT-ID:       Checkpoint/Restart.  (line  56)
-* delete display:                        Auto Display.        (line  45)
-* delete mem:                            Memory Region Attributes.
-                                                              (line  34)
-* delete tracepoint:                     Create and Delete Tracepoints.
-                                                              (line 126)
-* delete tvariable:                      Trace State Variables.
-                                                              (line  42)
-* delete-breakpoint!:                    Breakpoints In Guile.
-                                                              (line  97)
-* delete-char (C-d):                     Commands For Text.   (line   6)
-* delete-char-or-list ():                Commands For Completion.
-                                                              (line  39)
-* delete-horizontal-space ():            Commands For Killing.
-                                                              (line  37)
-* demangle:                              Symbols.             (line 104)
-* detach:                                Attach.              (line  36)
-* detach (remote):                       Connecting.          (line  95)
-* detach inferiors INFNO...:             Inferiors and Programs.
-                                                              (line  97)
-* digit-argument (M-0, M-1, ... M--):    Numeric Arguments.   (line   6)
-* dir:                                   Source Path.         (line  39)
-* directory:                             Source Path.         (line  39)
-* dis (disable):                         Disabling.           (line  41)
-* disable:                               Disabling.           (line  41)
-* disable display:                       Auto Display.        (line  56)
-* disable frame-filter:                  Frame Filter Management.
-                                                              (line  16)
-* disable mem:                           Memory Region Attributes.
-                                                              (line  38)
-* disable pretty-printer:                Pretty-Printer Commands.
-                                                              (line  20)
-* disable probes:                        Static Probe Points. (line  73)
-* disable tracepoint:                    Enable and Disable Tracepoints.
-                                                              (line   9)
-* disable type-printer:                  Symbols.             (line 257)
-* disable-completion:                    Readline Init File Syntax.
-                                                              (line  93)
-* disassemble:                           Machine Code.        (line  36)
-* disconnect:                            Connecting.          (line 102)
-* display:                               Auto Display.        (line  23)
-* do (down):                             Selection.           (line  40)
-* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
-                                                              (line  14)
-* document:                              Define.              (line  50)
-* dont-repeat <1>:                       Commands In Guile.   (line  67)
-* dont-repeat:                           Define.              (line  62)
-* Down:                                  TUI Keys.            (line  56)
-* down:                                  Selection.           (line  40)
-* down-silently:                         Selection.           (line  64)
-* downcase-word (M-l):                   Commands For Text.   (line  45)
-* dprintf:                               Dynamic Printf.      (line  26)
-* dprintf-style agent:                   Dynamic Printf.      (line  46)
-* dprintf-style call:                    Dynamic Printf.      (line  42)
-* dprintf-style gdb:                     Dynamic Printf.      (line  39)
-* dump:                                  Dump/Restore Files.  (line  13)
-* dump-functions ():                     Miscellaneous Commands.
-                                                              (line  70)
-* dump-macros ():                        Miscellaneous Commands.
-                                                              (line  82)
-* dump-variables ():                     Miscellaneous Commands.
-                                                              (line  76)
-* e (edit):                              Edit.                (line   6)
-* echo:                                  Output.              (line  12)
-* edit:                                  Edit.                (line   6)
-* editing-mode:                          Readline Init File Syntax.
-                                                              (line  98)
-* else:                                  Command Files.       (line  75)
-* enable:                                Disabling.           (line  48)
-* enable display:                        Auto Display.        (line  65)
-* enable frame-filter:                   Frame Filter Management.
-                                                              (line  26)
-* enable mem:                            Memory Region Attributes.
-                                                              (line  42)
-* enable pretty-printer:                 Pretty-Printer Commands.
-                                                              (line  25)
-* enable probes:                         Static Probe Points. (line  60)
-* enable tracepoint:                     Enable and Disable Tracepoints.
-                                                              (line  19)
-* enable type-printer:                   Symbols.             (line 257)
-* enable-keypad:                         Readline Init File Syntax.
-                                                              (line 109)
-* enabled <1>:                           Xmethod API.         (line  19)
-* enabled:                               Type Printing API.   (line  14)
-* end (breakpoint commands):             Break Commands.      (line  11)
-* end (if/else/while commands):          Command Files.       (line 104)
-* end (user-defined commands):           Define.              (line  50)
-* end-kbd-macro (C-x )):                 Keyboard Macros.     (line   9)
-* end-of-history (M->):                  Commands For History.
-                                                              (line  22)
-* end-of-iteration:                      Iterators In Guile.  (line  71)
-* end-of-iteration?:                     Iterators In Guile.  (line  74)
-* end-of-line (C-e):                     Commands For Moving. (line   9)
-* error annotation:                      Errors.              (line  10)
-* error-begin annotation:                Errors.              (line  22)
-* error-port:                            I/O Ports in Guile.  (line  13)
-* eval:                                  Output.              (line 117)
-* EventRegistry.connect:                 Events In Python.    (line  20)
-* EventRegistry.disconnect:              Events In Python.    (line  24)
-* exception-args:                        Guile Exception Handling.
-                                                              (line 105)
-* exception-key:                         Guile Exception Handling.
-                                                              (line 102)
-* exception?:                            Guile Exception Handling.
-                                                              (line  98)
-* exceptionHandler:                      Bootstrapping.       (line  38)
-* exchange-point-and-mark (C-x C-x):     Miscellaneous Commands.
-                                                              (line  36)
-* exec-file:                             Files.               (line  39)
-* exec-run-start-option:                 GDB/MI Support Commands.
-                                                              (line 116)
-* execute:                               Basic Guile.         (line  71)
-* exited annotation:                     Annotations for Running.
-                                                              (line  18)
-* ExitedEvent:                           Events In Python.    (line  76)
-* ExitedEvent.exit_code:                 Events In Python.    (line  70)
-* expand-tilde:                          Readline Init File Syntax.
-                                                              (line 120)
-* explore:                               Data.                (line  36)
-* f (frame):                             Selection.           (line  11)
-* f (SingleKey TUI key):                 TUI Single Key Mode. (line  16)
-* fg (resume foreground execution):      Continuing and Stepping.
-                                                              (line  16)
-* field-artificial?:                     Types In Guile.      (line 263)
-* field-base-class?:                     Types In Guile.      (line 268)
-* field-bitpos:                          Types In Guile.      (line 254)
-* field-bitsize:                         Types In Guile.      (line 258)
-* field-enumval:                         Types In Guile.      (line 251)
-* field-name:                            Types In Guile.      (line 244)
-* field-type:                            Types In Guile.      (line 247)
-* field?:                                Types In Guile.      (line 240)
-* file:                                  Files.               (line  16)
-* fin (finish):                          Continuing and Stepping.
-                                                              (line 111)
-* find:                                  Searching Memory.    (line   9)
-* find-pc-line:                          Symbol Tables In Guile.
-                                                              (line  73)
-* finish:                                Continuing and Stepping.
-                                                              (line 111)
-* finish&:                               Background Execution.
-                                                              (line  43)
-* FinishBreakpoint.__init__:             Finish Breakpoints in Python.
-                                                              (line  15)
-* FinishBreakpoint.out_of_scope:         Finish Breakpoints in Python.
-                                                              (line  22)
-* FinishBreakpoint.return_value:         Finish Breakpoints in Python.
-                                                              (line  39)
-* flush_i_cache:                         Bootstrapping.       (line  60)
-* flushregs:                             Maintenance Commands.
-                                                              (line 296)
-* fo (forward-search):                   Search.              (line   9)
-* focus:                                 TUI Commands.        (line  48)
-* forward-backward-delete-char ():       Commands For Text.   (line  15)
-* forward-char (C-f):                    Commands For Moving. (line  12)
-* forward-search:                        Search.              (line   9)
-* forward-search-history (C-s):          Commands For History.
-                                                              (line  30)
-* forward-word (M-f):                    Commands For Moving. (line  18)
-* frame, command:                        Frames.              (line  45)
-* frame, selecting:                      Selection.           (line  11)
-* frame-arch:                            Frames In Guile.     (line  37)
-* frame-block:                           Frames In Guile.     (line 123)
-* frame-function:                        Frames In Guile.     (line 127)
-* frame-name:                            Frames In Guile.     (line  34)
-* frame-newer:                           Frames In Guile.     (line 135)
-* frame-older:                           Frames In Guile.     (line 132)
-* frame-pc:                              Frames In Guile.     (line 120)
-* frame-read-register:                   Frames In Guile.     (line 142)
-* frame-read-var:                        Frames In Guile.     (line 146)
-* frame-sal:                             Frames In Guile.     (line 138)
-* frame-select:                          Frames In Guile.     (line 154)
-* frame-type:                            Frames In Guile.     (line  41)
-* frame-unwind-stop-reason:              Frames In Guile.     (line  69)
-* frame-valid?:                          Frames In Guile.     (line  27)
-* Frame.architecture:                    Frames In Python.    (line  47)
-* Frame.block:                           Frames In Python.    (line 134)
-* Frame.find_sal:                        Frames In Python.    (line 147)
-* Frame.function:                        Frames In Python.    (line 137)
-* Frame.is_valid:                        Frames In Python.    (line  37)
-* Frame.name:                            Frames In Python.    (line  43)
-* Frame.newer:                           Frames In Python.    (line 144)
-* Frame.older:                           Frames In Python.    (line 141)
-* Frame.pc:                              Frames In Python.    (line 131)
-* Frame.read_register:                   Frames In Python.    (line 151)
-* Frame.read_var:                        Frames In Python.    (line 156)
-* Frame.select:                          Frames In Python.    (line 164)
-* Frame.type:                            Frames In Python.    (line  51)
-* Frame.unwind_stop_reason:              Frames In Python.    (line  78)
-* frame?:                                Frames In Guile.     (line  23)
-* FrameDecorator.address:                Frame Decorator API. (line  56)
-* FrameDecorator.elided:                 Frame Decorator API. (line  27)
-* FrameDecorator.filename:               Frame Decorator API. (line  65)
-* FrameDecorator.frame_args:             Frame Decorator API. (line  84)
-* FrameDecorator.frame_locals:           Frame Decorator API. (line 135)
-* FrameDecorator.function:               Frame Decorator API. (line  46)
-* FrameDecorator.inferior_frame:         Frame Decorator API. (line 167)
-* FrameDecorator.line:                   Frame Decorator API. (line  75)
-* FrameFilter.enabled:                   Frame Filter API.    (line 125)
-* FrameFilter.filter:                    Frame Filter API.    (line  77)
-* FrameFilter.name:                      Frame Filter API.    (line 118)
-* FrameFilter.priority:                  Frame Filter API.    (line 134)
-* frames-invalid annotation:             Invalidation.        (line   9)
-* frozen-varobjs:                        GDB/MI Support Commands.
-                                                              (line  76)
-* ftrace:                                Create and Delete Tracepoints.
-                                                              (line  51)
-* Function:                              Functions In Python. (line   6)
-* Function.__init__:                     Functions In Python. (line  11)
-* Function.invoke:                       Functions In Python. (line  21)
-* gcore:                                 Core File Generation.
-                                                              (line  18)
-* gdb-object-kind:                       GDB Scheme Data Types.
-                                                              (line  11)
-* gdb-version:                           Guile Configuration. (line  18)
-* gdb.Block:                             Blocks In Python.    (line   6)
-* gdb.block_for_pc:                      Blocks In Python.    (line  61)
-* gdb.BP_ACCESS_WATCHPOINT:              Breakpoints In Python.
-                                                              (line 154)
-* gdb.BP_BREAKPOINT:                     Breakpoints In Python.
-                                                              (line 142)
-* gdb.BP_HARDWARE_WATCHPOINT:            Breakpoints In Python.
-                                                              (line 148)
-* gdb.BP_READ_WATCHPOINT:                Breakpoints In Python.
-                                                              (line 151)
-* gdb.BP_WATCHPOINT:                     Breakpoints In Python.
-                                                              (line 145)
-* gdb.Breakpoint:                        Breakpoints In Python.
-                                                              (line   6)
-* gdb.breakpoints:                       Basic Python.        (line  55)
-* gdb.COMMAND_BREAKPOINTS:               Commands In Python.  (line 145)
-* gdb.COMMAND_DATA:                      Commands In Python.  (line 115)
-* gdb.COMMAND_FILES:                     Commands In Python.  (line 126)
-* gdb.COMMAND_MAINTENANCE:               Commands In Python.  (line 169)
-* gdb.COMMAND_NONE:                      Commands In Python.  (line 105)
-* gdb.COMMAND_OBSCURE:                   Commands In Python.  (line 163)
-* gdb.COMMAND_RUNNING:                   Commands In Python.  (line 109)
-* gdb.COMMAND_STACK:                     Commands In Python.  (line 120)
-* gdb.COMMAND_STATUS:                    Commands In Python.  (line 139)
-* gdb.COMMAND_SUPPORT:                   Commands In Python.  (line 132)
-* gdb.COMMAND_TRACEPOINTS:               Commands In Python.  (line 151)
-* gdb.COMMAND_USER:                      Commands In Python.  (line 157)
-* gdb.COMPLETE_COMMAND:                  Commands In Python.  (line 190)
-* gdb.COMPLETE_EXPRESSION:               Commands In Python.  (line 198)
-* gdb.COMPLETE_FILENAME:                 Commands In Python.  (line 183)
-* gdb.COMPLETE_LOCATION:                 Commands In Python.  (line 186)
-* gdb.COMPLETE_NONE:                     Commands In Python.  (line 180)
-* gdb.COMPLETE_SYMBOL:                   Commands In Python.  (line 194)
-* gdb.current_objfile:                   Objfiles In Python.  (line  15)
-* gdb.current_progspace:                 Progspaces In Python.
-                                                              (line  14)
-* gdb.decode_line:                       Basic Python.        (line 189)
-* gdb.default_visualizer:                Pretty Printing API. (line  85)
-* gdb.error:                             Exception Handling.  (line  22)
-* gdb.execute:                           Basic Python.        (line  36)
-* gdb.find_pc_line:                      Basic Python.        (line  94)
-* gdb.FinishBreakpoint:                  Finish Breakpoints in Python.
-                                                              (line   6)
-* gdb.flush:                             Basic Python.        (line 153)
-* gdb.frame_stop_reason_string:          Frames In Python.    (line  30)
-* gdb.Function:                          Functions In Python. (line   6)
-* gdb.GdbError:                          Exception Handling.  (line  42)
-* gdb.history:                           Basic Python.        (line  70)
-* gdb.Inferior:                          Inferiors In Python. (line   6)
-* gdb.inferiors:                         Inferiors In Python. (line  15)
-* gdb.InferiorThread:                    Threads In Python.   (line   6)
-* gdb.LazyString:                        Lazy Strings In Python.
-                                                              (line   6)
-* gdb.LineTable:                         Line Tables In Python.
-                                                              (line   6)
-* gdb.lookup_global_symbol:              Symbols In Python.   (line  33)
-* gdb.lookup_objfile:                    Objfiles In Python.  (line  25)
-* gdb.lookup_symbol:                     Symbols In Python.   (line  13)
-* gdb.lookup_type:                       Types In Python.     (line  11)
-* gdb.MemoryError:                       Exception Handling.  (line  30)
-* gdb.newest_frame:                      Frames In Python.    (line  26)
-* gdb.Objfile:                           Objfiles In Python.  (line   6)
-* gdb.objfiles:                          Objfiles In Python.  (line  21)
-* gdb.PARAM_AUTO_BOOLEAN:                Parameters In Python.
-                                                              (line  93)
-* gdb.PARAM_BOOLEAN:                     Parameters In Python.
-                                                              (line  89)
-* gdb.PARAM_ENUM:                        Parameters In Python.
-                                                              (line 127)
-* gdb.PARAM_FILENAME:                    Parameters In Python.
-                                                              (line 119)
-* gdb.PARAM_INTEGER:                     Parameters In Python.
-                                                              (line 102)
-* gdb.PARAM_OPTIONAL_FILENAME:           Parameters In Python.
-                                                              (line 116)
-* gdb.PARAM_STRING:                      Parameters In Python.
-                                                              (line 106)
-* gdb.PARAM_STRING_NOESCAPE:             Parameters In Python.
-                                                              (line 112)
-* gdb.PARAM_UINTEGER:                    Parameters In Python.
-                                                              (line  98)
-* gdb.PARAM_ZINTEGER:                    Parameters In Python.
-                                                              (line 123)
-* gdb.Parameter:                         Parameters In Python.
-                                                              (line   6)
-* gdb.parameter:                         Basic Python.        (line  59)
-* gdb.parse_and_eval:                    Basic Python.        (line  83)
-* gdb.post_event:                        Basic Python.        (line 101)
-* gdb.Progspace:                         Progspaces In Python.
-                                                              (line   6)
-* gdb.progspaces:                        Progspaces In Python.
-                                                              (line  18)
-* gdb.prompt_hook:                       Basic Python.        (line 202)
-* gdb.PYTHONDIR:                         Basic Python.        (line  33)
-* gdb.search_memory:                     Inferiors In Python. (line  61)
-* gdb.selected_frame:                    Frames In Python.    (line  22)
-* gdb.selected_inferior:                 Inferiors In Python. (line  18)
-* gdb.selected_thread:                   Threads In Python.   (line  13)
-* gdb.solib_name:                        Basic Python.        (line 185)
-* gdb.STDERR:                            Basic Python.        (line 143)
-* gdb.STDLOG:                            Basic Python.        (line 146)
-* gdb.STDOUT:                            Basic Python.        (line 140)
-* gdb.string_to_argv:                    Commands In Python.  (line  62)
-* gdb.Symbol:                            Symbols In Python.   (line   6)
-* gdb.SYMBOL_FUNCTION_DOMAIN:            Symbols In Python.   (line 134)
-* gdb.SYMBOL_LABEL_DOMAIN:               Symbols In Python.   (line 127)
-* gdb.SYMBOL_LOC_ARG:                    Symbols In Python.   (line 156)
-* gdb.SYMBOL_LOC_BLOCK:                  Symbols In Python.   (line 177)
-* gdb.SYMBOL_LOC_COMPUTED:               Symbols In Python.   (line 191)
-* gdb.SYMBOL_LOC_CONST:                  Symbols In Python.   (line 147)
-* gdb.SYMBOL_LOC_CONST_BYTES:            Symbols In Python.   (line 180)
-* gdb.SYMBOL_LOC_LOCAL:                  Symbols In Python.   (line 170)
-* gdb.SYMBOL_LOC_OPTIMIZED_OUT:          Symbols In Python.   (line 188)
-* gdb.SYMBOL_LOC_REF_ARG:                Symbols In Python.   (line 160)
-* gdb.SYMBOL_LOC_REGISTER:               Symbols In Python.   (line 153)
-* gdb.SYMBOL_LOC_REGPARM_ADDR:           Symbols In Python.   (line 165)
-* gdb.SYMBOL_LOC_STATIC:                 Symbols In Python.   (line 150)
-* gdb.SYMBOL_LOC_TYPEDEF:                Symbols In Python.   (line 173)
-* gdb.SYMBOL_LOC_UNDEF:                  Symbols In Python.   (line 143)
-* gdb.SYMBOL_LOC_UNRESOLVED:             Symbols In Python.   (line 183)
-* gdb.SYMBOL_STRUCT_DOMAIN:              Symbols In Python.   (line 124)
-* gdb.SYMBOL_TYPES_DOMAIN:               Symbols In Python.   (line 137)
-* gdb.SYMBOL_UNDEF_DOMAIN:               Symbols In Python.   (line 115)
-* gdb.SYMBOL_VAR_DOMAIN:                 Symbols In Python.   (line 120)
-* gdb.SYMBOL_VARIABLES_DOMAIN:           Symbols In Python.   (line 130)
-* gdb.Symtab:                            Symbol Tables In Python.
-                                                              (line   6)
-* gdb.Symtab_and_line:                   Symbol Tables In Python.
-                                                              (line   6)
-* gdb.target_charset:                    Basic Python.        (line 174)
-* gdb.target_wide_charset:               Basic Python.        (line 179)
-* gdb.Type:                              Types In Python.     (line   6)
-* gdb.TYPE_CODE_ARRAY:                   Types In Python.     (line 192)
-* gdb.TYPE_CODE_BITSTRING:               Types In Python.     (line 230)
-* gdb.TYPE_CODE_BOOL:                    Types In Python.     (line 251)
-* gdb.TYPE_CODE_CHAR:                    Types In Python.     (line 248)
-* gdb.TYPE_CODE_COMPLEX:                 Types In Python.     (line 254)
-* gdb.TYPE_CODE_DECFLOAT:                Types In Python.     (line 263)
-* gdb.TYPE_CODE_ENUM:                    Types In Python.     (line 201)
-* gdb.TYPE_CODE_ERROR:                   Types In Python.     (line 233)
-* gdb.TYPE_CODE_FLAGS:                   Types In Python.     (line 204)
-* gdb.TYPE_CODE_FLT:                     Types In Python.     (line 213)
-* gdb.TYPE_CODE_FUNC:                    Types In Python.     (line 207)
-* gdb.TYPE_CODE_INT:                     Types In Python.     (line 210)
-* gdb.TYPE_CODE_INTERNAL_FUNCTION:       Types In Python.     (line 266)
-* gdb.TYPE_CODE_MEMBERPTR:               Types In Python.     (line 242)
-* gdb.TYPE_CODE_METHOD:                  Types In Python.     (line 236)
-* gdb.TYPE_CODE_METHODPTR:               Types In Python.     (line 239)
-* gdb.TYPE_CODE_NAMESPACE:               Types In Python.     (line 260)
-* gdb.TYPE_CODE_PTR:                     Types In Python.     (line 189)
-* gdb.TYPE_CODE_RANGE:                   Types In Python.     (line 222)
-* gdb.TYPE_CODE_REF:                     Types In Python.     (line 245)
-* gdb.TYPE_CODE_SET:                     Types In Python.     (line 219)
-* gdb.TYPE_CODE_STRING:                  Types In Python.     (line 225)
-* gdb.TYPE_CODE_STRUCT:                  Types In Python.     (line 195)
-* gdb.TYPE_CODE_TYPEDEF:                 Types In Python.     (line 257)
-* gdb.TYPE_CODE_UNION:                   Types In Python.     (line 198)
-* gdb.TYPE_CODE_VOID:                    Types In Python.     (line 216)
-* gdb.unwinder.register_unwinder:        Unwinding Frames in Python.
-                                                              (line 124)
-* gdb.UnwindInfo.add_saved_register:     Unwinding Frames in Python.
-                                                              (line  74)
-* gdb.WP_ACCESS:                         Breakpoints In Python.
-                                                              (line  71)
-* gdb.WP_READ:                           Breakpoints In Python.
-                                                              (line  65)
-* gdb.WP_WRITE:                          Breakpoints In Python.
-                                                              (line  68)
-* gdb.write:                             Basic Python.        (line 135)
-* gdb:error:                             Guile Exception Handling.
-                                                              (line  69)
-* gdb:invalid-object:                    Guile Exception Handling.
-                                                              (line  72)
-* gdb:memory-error:                      Guile Exception Handling.
-                                                              (line  80)
-* gdb:pp-type-error:                     Guile Exception Handling.
-                                                              (line  84)
-* gdb_init_reader:                       Writing JIT Debug Info Readers.
-                                                              (line  20)
-* gdbserver:                             Server.              (line   6)
-* generate-core-file:                    Core File Generation.
-                                                              (line  18)
-* get-basic-type:                        Guile Types Module.  (line  14)
-* getDebugChar:                          Bootstrapping.       (line  14)
-* gnu_debuglink_crc32:                   Separate Debug Files.
-                                                              (line 165)
-* gr:                                    Guile Commands.      (line   8)
-* gu:                                    Guile Commands.      (line  15)
-* guile:                                 Guile Commands.      (line  15)
-* guile-data-directory:                  Guile Configuration. (line  14)
-* guile-repl:                            Guile Commands.      (line   8)
-* h (help):                              Help.                (line   9)
-* handle:                                Signals.             (line  49)
-* handle_exception:                      Stub Contents.       (line  15)
-* hbreak:                                Set Breaks.          (line  62)
-* help:                                  Help.                (line   6)
-* help function:                         Convenience Funs.    (line 141)
-* help target:                           Target Commands.     (line  19)
-* help user-defined:                     Define.              (line  67)
-* history-append!:                       Basic Guile.         (line 109)
-* history-preserve-point:                Readline Init File Syntax.
-                                                              (line 124)
-* history-ref:                           Basic Guile.         (line  90)
-* history-search-backward ():            Commands For History.
-                                                              (line  50)
-* history-search-forward ():             Commands For History.
-                                                              (line  45)
-* history-size:                          Readline Init File Syntax.
-                                                              (line 130)
-* hook:                                  Hooks.               (line   6)
-* hookpost:                              Hooks.               (line  11)
-* horizontal-scroll-mode:                Readline Init File Syntax.
-                                                              (line 135)
-* host-config:                           Guile Configuration. (line  21)
-* i (info):                              Help.                (line 100)
-* if:                                    Command Files.       (line  75)
-* ignore:                                Conditions.          (line  90)
-* inferior INFNO:                        Inferiors and Programs.
-                                                              (line  49)
-* Inferior.is_valid:                     Inferiors In Python. (line  36)
-* Inferior.num:                          Inferiors In Python. (line  23)
-* Inferior.pid:                          Inferiors In Python. (line  26)
-* Inferior.read_memory:                  Inferiors In Python. (line  47)
-* Inferior.search_memory:                Inferiors In Python. (line  62)
-* Inferior.threads:                      Inferiors In Python. (line  43)
-* Inferior.was_attached:                 Inferiors In Python. (line  30)
-* Inferior.write_memory:                 Inferiors In Python. (line  54)
-* InferiorCallPostEvent.address:         Events In Python.    (line 151)
-* InferiorCallPostEvent.ptid:            Events In Python.    (line 148)
-* InferiorCallPreEvent.address:          Events In Python.    (line 141)
-* InferiorCallPreEvent.ptid:             Events In Python.    (line 138)
-* InferiorThread.is_exited:              Threads In Python.   (line  60)
-* InferiorThread.is_running:             Threads In Python.   (line  57)
-* InferiorThread.is_stopped:             Threads In Python.   (line  54)
-* InferiorThread.is_valid:               Threads In Python.   (line  43)
-* InferiorThread.name:                   Threads In Python.   (line  20)
-* InferiorThread.num:                    Threads In Python.   (line  30)
-* InferiorThread.ptid:                   Threads In Python.   (line  33)
-* InferiorThread.switch:                 Threads In Python.   (line  50)
-* info:                                  Help.                (line 100)
-* info address:                          Symbols.             (line  74)
-* info all-registers:                    Registers.           (line  15)
-* info args:                             Frame Info.          (line  51)
-* info auto-load:                        Auto-loading.        (line  60)
-* info auto-load gdb-scripts:            Auto-loading sequences.
-                                                              (line  21)
-* info auto-load guile-scripts:          Guile Auto-loading.  (line  23)
-* info auto-load libthread-db:           libthread_db.so.1 file.
-                                                              (line  30)
-* info auto-load local-gdbinit:          Init File in the Current Directory.
-                                                              (line  22)
-* info auto-load python-scripts:         Python Auto-loading. (line  23)
-* info auxv:                             OS Information.      (line  21)
-* info breakpoints:                      Set Breaks.          (line 128)
-* info checkpoints:                      Checkpoint/Restart.  (line  31)
-* info classes:                          Symbols.             (line 333)
-* info common:                           Special Fortran Commands.
-                                                              (line   9)
-* info copying:                          Help.                (line 137)
-* info dcache:                           Caching Target Data. (line  46)
-* info display:                          Auto Display.        (line  78)
-* info dll:                              Files.               (line 343)
-* info dos:                              DJGPP Native.        (line  15)
-* info exceptions:                       Ada Exceptions.      (line   8)
-* info extensions:                       Show.                (line  34)
-* info f (info frame):                   Frame Info.          (line  17)
-* info files:                            Files.               (line 202)
-* info float:                            Floating Point Hardware.
-                                                              (line   9)
-* info frame:                            Frame Info.          (line  17)
-* info frame, show the source language:  Show.                (line  15)
-* info frame-filter:                     Frame Filter Management.
-                                                              (line  12)
-* info functions:                        Symbols.             (line 312)
-* info handle:                           Signals.             (line  33)
-* info inferiors:                        Inferiors and Programs.
-                                                              (line  25)
-* info io_registers, AVR:                AVR.                 (line  10)
-* info line:                             Machine Code.        (line  14)
-* info line, and Objective-C:            Method Names in Commands.
-                                                              (line   9)
-* info locals:                           Frame Info.          (line  55)
-* info macro:                            Macros.              (line  47)
-* info macros:                           Macros.              (line  54)
-* info mem:                              Memory Region Attributes.
-                                                              (line  45)
-* info meminfo:                          SVR4 Process Information.
-                                                              (line  93)
-* info os:                               OS Information.      (line  38)
-* info os cpus:                          OS Information.      (line  43)
-* info os files:                         OS Information.      (line  51)
-* info os modules:                       OS Information.      (line  57)
-* info os msg:                           OS Information.      (line  64)
-* info os processes:                     OS Information.      (line  75)
-* info os procgroups:                    OS Information.      (line  84)
-* info os semaphores:                    OS Information.      (line  94)
-* info os shm:                           OS Information.      (line 102)
-* info os sockets:                       OS Information.      (line 112)
-* info os threads:                       OS Information.      (line 119)
-* info pidlist:                          SVR4 Process Information.
-                                                              (line  89)
-* info pretty-printer:                   Pretty-Printer Commands.
-                                                              (line   6)
-* info probes:                           Static Probe Points. (line  32)
-* info proc:                             SVR4 Process Information.
-                                                              (line  19)
-* info program:                          Stopping.            (line  18)
-* info record:                           Process Record and Replay.
-                                                              (line 261)
-* info registers:                        Registers.           (line  11)
-* info scope:                            Symbols.             (line 262)
-* info selectors:                        Symbols.             (line 339)
-* info serial:                           DJGPP Native.        (line 142)
-* info set:                              Help.                (line 120)
-* info share:                            Files.               (line 337)
-* info sharedlibrary:                    Files.               (line 337)
-* info signals:                          Signals.             (line  33)
-* info skip:                             Skipping Over Functions and Files.
-                                                              (line  56)
-* info source:                           Symbols.             (line 283)
-* info source, show the source language: Show.                (line  21)
-* info sources:                          Symbols.             (line 306)
-* info spu:                              SPU.                 (line  10)
-* info stack:                            Backtrace.           (line  46)
-* info static-tracepoint-markers:        Listing Static Tracepoint Markers.
-                                                              (line   6)
-* info symbol:                           Symbols.             (line  84)
-* info target:                           Files.               (line 202)
-* info task TASKNO:                      Ada Tasks.           (line  89)
-* info tasks:                            Ada Tasks.           (line   9)
-* info terminal:                         Input/Output.        (line  12)
-* info threads:                          Threads.             (line  66)
-* info tp [N...]:                        Listing Tracepoints. (line   6)
-* info tracepoints [N...]:               Listing Tracepoints. (line   6)
-* info tvariables:                       Trace State Variables.
-                                                              (line  37)
-* info type-printers:                    Symbols.             (line 249)
-* info types:                            Symbols.             (line 235)
-* info variables:                        Symbols.             (line 324)
-* info vector:                           Vector Unit.         (line   9)
-* info w32:                              Cygwin Native.       (line  19)
-* info warranty:                         Help.                (line 141)
-* info watchpoints [N...]:               Set Watchpoints.     (line  87)
-* info win:                              TUI Commands.        (line  26)
-* info-gdb-mi-command:                   GDB/MI Support Commands.
-                                                              (line 108)
-* init-if-undefined:                     Convenience Vars.    (line  42)
-* input-meta:                            Readline Init File Syntax.
-                                                              (line 142)
-* input-port:                            I/O Ports in Guile.  (line   7)
-* insert-comment (M-#):                  Miscellaneous Commands.
-                                                              (line  60)
-* insert-completions (M-*):              Commands For Completion.
-                                                              (line  18)
-* inspect:                               Data.                (line   6)
-* instantiate on type_printer:           Type Printing API.   (line  24)
-* interpreter-exec:                      Interpreters.        (line  43)
-* interrupt:                             Background Execution.
-                                                              (line  60)
-* isearch-terminators:                   Readline Init File Syntax.
-                                                              (line 149)
-* iterator->list:                        Iterators In Guile.  (line  84)
-* iterator-filter:                       Iterators In Guile.  (line  95)
-* iterator-for-each:                     Iterators In Guile.  (line  91)
-* iterator-map:                          Iterators In Guile.  (line  87)
-* iterator-next!:                        Iterators In Guile.  (line  64)
-* iterator-object:                       Iterators In Guile.  (line  54)
-* iterator-progress:                     Iterators In Guile.  (line  58)
-* iterator-until:                        Iterators In Guile.  (line  99)
-* iterator?:                             Iterators In Guile.  (line  50)
-* j (jump):                              Jumping.             (line  10)
-* jit-reader-load:                       Using JIT Debug Info Readers.
-                                                              (line   6)
-* jit-reader-unload:                     Using JIT Debug Info Readers.
-                                                              (line   6)
-* jump:                                  Jumping.             (line  10)
-* jump, and Objective-C:                 Method Names in Commands.
-                                                              (line   9)
-* KeyboardInterrupt:                     Exception Handling.  (line  34)
-* keymap:                                Readline Init File Syntax.
-                                                              (line 156)
-* kill:                                  Kill Process.        (line   6)
-* kill inferiors INFNO...:               Inferiors and Programs.
-                                                              (line 103)
-* kill-line (C-k):                       Commands For Killing.
-                                                              (line   6)
-* kill-region ():                        Commands For Killing.
-                                                              (line  41)
-* kill-whole-line ():                    Commands For Killing.
-                                                              (line  15)
-* kill-word (M-d):                       Commands For Killing.
-                                                              (line  19)
-* kvm:                                   BSD libkvm Interface.
-                                                              (line  24)
-* l (list):                              List.                (line   6)
-* language-option:                       GDB/MI Support Commands.
-                                                              (line 104)
-* layout:                                TUI Commands.        (line  29)
-* lazy-string->value:                    Lazy Strings In Guile.
-                                                              (line  47)
-* lazy-string-address:                   Lazy Strings In Guile.
-                                                              (line  27)
-* lazy-string-encoding:                  Lazy Strings In Guile.
-                                                              (line  35)
-* lazy-string-length:                    Lazy Strings In Guile.
-                                                              (line  30)
-* lazy-string-type:                      Lazy Strings In Guile.
-                                                              (line  41)
-* lazy-string?:                          Lazy Strings In Guile.
-                                                              (line  23)
-* LazyString.address:                    Lazy Strings In Python.
-                                                              (line  27)
-* LazyString.encoding:                   Lazy Strings In Python.
-                                                              (line  37)
-* LazyString.length:                     Lazy Strings In Python.
-                                                              (line  31)
-* LazyString.type:                       Lazy Strings In Python.
-                                                              (line  44)
-* LazyString.value:                      Lazy Strings In Python.
-                                                              (line  21)
-* Left:                                  TUI Keys.            (line  59)
-* LineTable.has_line:                    Line Tables In Python.
-                                                              (line  59)
-* LineTable.line:                        Line Tables In Python.
-                                                              (line  53)
-* LineTable.source_lines:                Line Tables In Python.
-                                                              (line  64)
-* LineTableEntry.line:                   Line Tables In Python.
-                                                              (line  18)
-* LineTableEntry.pc:                     Line Tables In Python.
-                                                              (line  23)
-* list:                                  List.                (line   6)
-* list, and Objective-C:                 Method Names in Commands.
-                                                              (line   9)
-* load FILENAME:                         Target Commands.     (line 115)
-* lookup-block:                          Blocks In Guile.     (line 118)
-* lookup-global-symbol:                  Symbols In Guile.    (line 100)
-* lookup-symbol:                         Symbols In Guile.    (line  81)
-* lookup-type:                           Types In Guile.      (line  16)
-* loop_break:                            Command Files.       (line  94)
-* loop_continue:                         Command Files.       (line  98)
-* macro define:                          Macros.              (line  59)
-* macro exp1:                            Macros.              (line  36)
-* macro expand:                          Macros.              (line  29)
-* macro list:                            Macros.              (line  80)
-* macro undef:                           Macros.              (line  74)
-* maint ada set ignore-descriptive-types: Ada Glitches.       (line  76)
-* maint ada show ignore-descriptive-types: Ada Glitches.      (line  80)
-* maint agent:                           Maintenance Commands.
-                                                              (line  12)
-* maint agent-eval:                      Maintenance Commands.
-                                                              (line  12)
-* maint agent-printf:                    Maintenance Commands.
-                                                              (line  27)
-* maint btrace clear:                    Maintenance Commands.
-                                                              (line 109)
-* maint btrace clear-packet-history:     Maintenance Commands.
-                                                              (line 104)
-* maint btrace packet-history:           Maintenance Commands.
-                                                              (line  71)
-* maint check-psymtabs:                  Maintenance Commands.
-                                                              (line 145)
-* maint check-symtabs:                   Maintenance Commands.
-                                                              (line 150)
-* maint cplus first_component:           Maintenance Commands.
-                                                              (line 165)
-* maint cplus namespace:                 Maintenance Commands.
-                                                              (line 168)
-* maint demangler-warning:               Maintenance Commands.
-                                                              (line 184)
-* maint deprecate:                       Maintenance Commands.
-                                                              (line 171)
-* maint dump-me:                         Maintenance Commands.
-                                                              (line 179)
-* maint expand-symtabs:                  Maintenance Commands.
-                                                              (line 153)
-* maint flush-symbol-cache:              Symbols.             (line 463)
-* maint info bfds:                       Maintenance Commands.
-                                                              (line  64)
-* maint info breakpoints:                Maintenance Commands.
-                                                              (line  33)
-* maint info btrace:                     Maintenance Commands.
-                                                              (line  68)
-* maint info program-spaces:             Inferiors and Programs.
-                                                              (line 138)
-* maint info psymtabs:                   Symbols.             (line 401)
-* maint info sections:                   Files.               (line 211)
-* maint info sol-threads:                Threads.             (line  98)
-* maint info symtabs:                    Symbols.             (line 401)
-* maint internal-error:                  Maintenance Commands.
-                                                              (line 184)
-* maint internal-warning:                Maintenance Commands.
-                                                              (line 184)
-* maint packet:                          Maintenance Commands.
-                                                              (line 230)
-* maint print architecture:              Maintenance Commands.
-                                                              (line 236)
-* maint print c-tdesc:                   Maintenance Commands.
-                                                              (line 240)
-* maint print cooked-registers:          Maintenance Commands.
-                                                              (line 261)
-* maint print dummy-frames:              Maintenance Commands.
-                                                              (line 245)
-* maint print msymbols:                  Symbols.             (line 382)
-* maint print objfiles:                  Maintenance Commands.
-                                                              (line 299)
-* maint print psymbols:                  Symbols.             (line 382)
-* maint print raw-registers:             Maintenance Commands.
-                                                              (line 261)
-* maint print reggroups:                 Maintenance Commands.
-                                                              (line 280)
-* maint print register-groups:           Maintenance Commands.
-                                                              (line 261)
-* maint print registers:                 Maintenance Commands.
-                                                              (line 261)
-* maint print remote-registers:          Maintenance Commands.
-                                                              (line 261)
-* maint print section-scripts:           Maintenance Commands.
-                                                              (line 314)
-* maint print statistics:                Maintenance Commands.
-                                                              (line 321)
-* maint print symbol-cache:              Symbols.             (line 455)
-* maint print symbol-cache-statistics:   Symbols.             (line 459)
-* maint print symbols:                   Symbols.             (line 382)
-* maint print target-stack:              Maintenance Commands.
-                                                              (line 334)
-* maint print type:                      Maintenance Commands.
-                                                              (line 346)
-* maint print unwind, HPPA:              HPPA.                (line  17)
-* maint print user-registers:            Maintenance Commands.
-                                                              (line 305)
-* maint set btrace pt skip-pad:          Maintenance Commands.
-                                                              (line 117)
-* maint set catch-demangler-crashes:     Maintenance Commands.
-                                                              (line 157)
-* maint set demangler-warning:           Maintenance Commands.
-                                                              (line 207)
-* maint set dwarf always-disassemble:    Maintenance Commands.
-                                                              (line 353)
-* maint set dwarf max-cache-age:         Maintenance Commands.
-                                                              (line 375)
-* maint set internal-error:              Maintenance Commands.
-                                                              (line 207)
-* maint set internal-warning:            Maintenance Commands.
-                                                              (line 207)
-* maint set per-command:                 Maintenance Commands.
-                                                              (line 427)
-* maint set profile:                     Maintenance Commands.
-                                                              (line 389)
-* maint set show-all-tib:                Maintenance Commands.
-                                                              (line 413)
-* maint set show-debug-regs:             Maintenance Commands.
-                                                              (line 405)
-* maint set symbol-cache-size:           Symbols.             (line 447)
-* maint set target-async:                Maintenance Commands.
-                                                              (line 419)
-* maint show btrace pt skip-pad:         Maintenance Commands.
-                                                              (line 118)
-* maint show catch-demangler-crashes:    Maintenance Commands.
-                                                              (line 157)
-* maint show demangler-warning:          Maintenance Commands.
-                                                              (line 207)
-* maint show dwarf always-disassemble:   Maintenance Commands.
-                                                              (line 353)
-* maint show dwarf max-cache-age:        Maintenance Commands.
-                                                              (line 375)
-* maint show internal-error:             Maintenance Commands.
-                                                              (line 207)
-* maint show internal-warning:           Maintenance Commands.
-                                                              (line 207)
-* maint show per-command:                Maintenance Commands.
-                                                              (line 427)
-* maint show profile:                    Maintenance Commands.
-                                                              (line 389)
-* maint show show-all-tib:               Maintenance Commands.
-                                                              (line 413)
-* maint show show-debug-regs:            Maintenance Commands.
-                                                              (line 405)
-* maint show symbol-cache-size:          Symbols.             (line 452)
-* maint show target-async:               Maintenance Commands.
-                                                              (line 419)
-* maint space:                           Maintenance Commands.
-                                                              (line 467)
-* maint time:                            Maintenance Commands.
-                                                              (line 471)
-* maint translate-address:               Maintenance Commands.
-                                                              (line 475)
-* maint undeprecate:                     Maintenance Commands.
-                                                              (line 171)
-* make:                                  Shell Commands.      (line  21)
-* make-block-symbols-iterator:           Blocks In Guile.     (line 106)
-* make-breakpoint:                       Breakpoints In Guile.
-                                                              (line  21)
-* make-enum-hashtable:                   Guile Types Module.  (line  38)
-* make-exception:                        Guile Exception Handling.
-                                                              (line  92)
-* make-field-iterator:                   Types In Guile.      (line 126)
-* make-iterator:                         Iterators In Guile.  (line  12)
-* make-lazy-value:                       Values From Inferior In Guile.
-                                                              (line 329)
-* make-list-iterator:                    Iterators In Guile.  (line  81)
-* make-pretty-printer:                   Guile Pretty Printing API.
-                                                              (line  16)
-* make-pretty-printer-worker:            Guile Pretty Printing API.
-                                                              (line  44)
-* make-value:                            Values From Inferior In Guile.
-                                                              (line  47)
-* mark-modified-lines:                   Readline Init File Syntax.
-                                                              (line 169)
-* mark-symlinked-directories:            Readline Init File Syntax.
-                                                              (line 174)
-* match-hidden-files:                    Readline Init File Syntax.
-                                                              (line 179)
-* may-insert-breakpoints:                Observer Mode.       (line  50)
-* may-insert-fast-tracepoints:           Observer Mode.       (line  69)
-* may-insert-tracepoints:                Observer Mode.       (line  59)
-* may-interrupt:                         Observer Mode.       (line  79)
-* may-write-memory:                      Observer Mode.       (line  41)
-* may-write-registers:                   Observer Mode.       (line  32)
-* mem:                                   Memory Region Attributes.
-                                                              (line  22)
-* memory-port-range:                     Memory Ports in Guile.
-                                                              (line  34)
-* memory-port-read-buffer-size:          Memory Ports in Guile.
-                                                              (line  38)
-* memory-port-write-buffer-size:         Memory Ports in Guile.
-                                                              (line  46)
-* memory-port?:                          Memory Ports in Guile.
-                                                              (line  30)
-* MemoryChangedEvent.address:            Events In Python.    (line 160)
-* MemoryChangedEvent.length:             Events In Python.    (line 163)
-* memset:                                Bootstrapping.       (line  70)
-* menu-complete ():                      Commands For Completion.
-                                                              (line  22)
-* menu-complete-backward ():             Commands For Completion.
-                                                              (line  34)
-* menu-complete-display-prefix:          Readline Init File Syntax.
-                                                              (line 186)
-* meta-flag:                             Readline Init File Syntax.
-                                                              (line 142)
-* methods:                               Xmethod API.         (line  23)
-* monitor:                               Connecting.          (line 109)
-* n (next):                              Continuing and Stepping.
-                                                              (line  79)
-* n (SingleKey TUI key):                 TUI Single Key Mode. (line  19)
-* name <1>:                              Xmethod API.         (line  16)
-* name:                                  Type Printing API.   (line  19)
-* newest-frame:                          Frames In Guile.     (line 162)
-* NewObjFileEvent.new_objfile:           Events In Python.    (line 120)
-* next:                                  Continuing and Stepping.
-                                                              (line  79)
-* next&:                                 Background Execution.
-                                                              (line  34)
-* next-history (C-n):                    Commands For History.
-                                                              (line  16)
-* nexti:                                 Continuing and Stepping.
-                                                              (line 204)
-* nexti&:                                Background Execution.
-                                                              (line  37)
-* ni (nexti):                            Continuing and Stepping.
-                                                              (line 204)
-* non-incremental-forward-search-history (M-n): Commands For History.
-                                                              (line  40)
-* non-incremental-reverse-search-history (M-p): Commands For History.
-                                                              (line  35)
-* nosharedlibrary:                       Files.               (line 355)
-* Objfile:                               Objfiles In Python.  (line   6)
-* objfile-filename:                      Objfiles In Guile.   (line  29)
-* objfile-pretty-printers:               Objfiles In Guile.   (line  37)
-* objfile-progspace:                     Objfiles In Guile.   (line  33)
-* objfile-valid?:                        Objfiles In Guile.   (line  22)
-* Objfile.add_separate_debug_file:       Objfiles In Python.  (line 126)
-* Objfile.build_id:                      Objfiles In Python.  (line  68)
-* Objfile.filename:                      Objfiles In Python.  (line  48)
-* Objfile.frame_filters:                 Objfiles In Python.  (line  94)
-* Objfile.is_valid:                      Objfiles In Python.  (line 119)
-* Objfile.owner:                         Objfiles In Python.  (line  61)
-* Objfile.pretty_printers:               Objfiles In Python.  (line  82)
-* Objfile.progspace:                     Objfiles In Python.  (line  78)
-* Objfile.type_printers:                 Objfiles In Python.  (line  90)
-* Objfile.username:                      Objfiles In Python.  (line  55)
-* objfile?:                              Objfiles In Guile.   (line  18)
-* objfiles:                              Objfiles In Guile.   (line  53)
-* observer:                              Observer Mode.       (line  22)
-* open-memory:                           Memory Ports in Guile.
-                                                              (line  13)
-* output:                                Output.              (line  35)
-* output-meta:                           Readline Init File Syntax.
-                                                              (line 191)
-* output-port:                           I/O Ports in Guile.  (line  10)
-* overlay:                               Overlay Commands.    (line  17)
-* overload-choice annotation:            Prompting.           (line  32)
-* overwrite-mode ():                     Commands For Text.   (line  53)
-* page-completions:                      Readline Init File Syntax.
-                                                              (line 196)
-* PARAM_AUTO_BOOLEAN <1>:                Parameters In Guile. (line 119)
-* PARAM_AUTO_BOOLEAN:                    Parameters In Python.
-                                                              (line  93)
-* PARAM_BOOLEAN <1>:                     Parameters In Guile. (line 115)
-* PARAM_BOOLEAN:                         Parameters In Python.
-                                                              (line  89)
-* PARAM_ENUM <1>:                        Parameters In Guile. (line 155)
-* PARAM_ENUM:                            Parameters In Python.
-                                                              (line 127)
-* PARAM_FILENAME <1>:                    Parameters In Guile. (line 151)
-* PARAM_FILENAME:                        Parameters In Python.
-                                                              (line 119)
-* PARAM_INTEGER:                         Parameters In Python.
-                                                              (line 102)
-* PARAM_OPTIONAL_FILENAME <1>:           Parameters In Guile. (line 148)
-* PARAM_OPTIONAL_FILENAME:               Parameters In Python.
-                                                              (line 116)
-* PARAM_STRING <1>:                      Parameters In Guile. (line 138)
-* PARAM_STRING:                          Parameters In Python.
-                                                              (line 106)
-* PARAM_STRING_NOESCAPE <1>:             Parameters In Guile. (line 144)
-* PARAM_STRING_NOESCAPE:                 Parameters In Python.
-                                                              (line 112)
-* PARAM_UINTEGER <1>:                    Parameters In Guile. (line 124)
-* PARAM_UINTEGER:                        Parameters In Python.
-                                                              (line  98)
-* PARAM_ZINTEGER <1>:                    Parameters In Guile. (line 128)
-* PARAM_ZINTEGER:                        Parameters In Python.
-                                                              (line 123)
-* PARAM_ZUINTEGER:                       Parameters In Guile. (line 131)
-* PARAM_ZUINTEGER_UNLIMITED:             Parameters In Guile. (line 134)
-* Parameter <1>:                         Parameters In Guile. (line   6)
-* Parameter:                             Parameters In Python.
-                                                              (line   6)
-* parameter-value:                       Parameters In Guile. (line 103)
-* Parameter.__init__:                    Parameters In Python.
-                                                              (line  20)
-* Parameter.get_set_string:              Parameters In Python.
-                                                              (line  74)
-* Parameter.get_show_string:             Parameters In Python.
-                                                              (line  80)
-* Parameter.set_doc:                     Parameters In Python.
-                                                              (line  54)
-* Parameter.show_doc:                    Parameters In Python.
-                                                              (line  60)
-* Parameter.value:                       Parameters In Python.
-                                                              (line  66)
-* parameter?:                            Parameters In Guile. (line  99)
-* parse-and-eval:                        Basic Guile.         (line 117)
-* passcount:                             Tracepoint Passcounts.
-                                                              (line   6)
-* path:                                  Environment.         (line  14)
-* pending-breakpoints:                   GDB/MI Support Commands.
-                                                              (line  81)
-* PendingFrame.create_unwind_info:       Unwinding Frames in Python.
-                                                              (line  47)
-* PendingFrame.read_register:            Unwinding Frames in Python.
-                                                              (line  37)
-* PgDn:                                  TUI Keys.            (line  50)
-* PgUp:                                  TUI Keys.            (line  47)
-* pi:                                    Python Commands.     (line   9)
-* pmon, MIPS remote:                     MIPS Embedded.       (line 132)
-* po (print-object):                     The Print Command with Objective-C.
-                                                              (line   6)
-* possible-completions (M-?):            Commands For Completion.
-                                                              (line  11)
-* post-commands annotation:              Prompting.           (line  27)
-* post-overload-choice annotation:       Prompting.           (line  32)
-* post-prompt annotation:                Prompting.           (line  24)
-* post-prompt-for-continue annotation:   Prompting.           (line  40)
-* post-query annotation:                 Prompting.           (line  36)
-* pre-commands annotation:               Prompting.           (line  27)
-* pre-overload-choice annotation:        Prompting.           (line  32)
-* pre-prompt annotation:                 Prompting.           (line  24)
-* pre-prompt-for-continue annotation:    Prompting.           (line  40)
-* pre-query annotation:                  Prompting.           (line  36)
-* prefix-meta (<ESC>):                   Miscellaneous Commands.
-                                                              (line  18)
-* prepend-pretty-printer!:               Guile Printing Module.
-                                                              (line  14)
-* pretty-printer-enabled?:               Guile Pretty Printing API.
-                                                              (line  29)
-* pretty-printer?:                       Guile Pretty Printing API.
-                                                              (line  25)
-* pretty-printers:                       Guile Pretty Printing API.
-                                                              (line  36)
-* pretty_printer.children:               Pretty Printing API. (line  12)
-* pretty_printer.display_hint:           Pretty Printing API. (line  25)
-* pretty_printer.to_string:              Pretty Printing API. (line  54)
-* previous-history (C-p):                Commands For History.
-                                                              (line  12)
-* print:                                 Data.                (line   6)
-* print-object:                          The Print Command with Objective-C.
-                                                              (line   6)
-* printf:                                Output.              (line  46)
-* proc-trace-entry:                      SVR4 Process Information.
-                                                              (line  85)
-* proc-trace-exit:                       SVR4 Process Information.
-                                                              (line  85)
-* proc-untrace-entry:                    SVR4 Process Information.
-                                                              (line  85)
-* proc-untrace-exit:                     SVR4 Process Information.
-                                                              (line  85)
-* Progspace:                             Progspaces In Python.
-                                                              (line   6)
-* progspace-filename:                    Progspaces In Guile. (line  35)
-* progspace-objfiles:                    Progspaces In Guile. (line  45)
-* progspace-pretty-printers:             Progspaces In Guile. (line  53)
-* progspace-valid?:                      Progspaces In Guile. (line  22)
-* Progspace.filename:                    Progspaces In Python.
-                                                              (line  25)
-* Progspace.frame_filters:               Progspaces In Python.
-                                                              (line  40)
-* Progspace.pretty_printers:             Progspaces In Python.
-                                                              (line  28)
-* Progspace.type_printers:               Progspaces In Python.
-                                                              (line  36)
-* progspace?:                            Progspaces In Guile. (line  18)
-* progspaces:                            Progspaces In Guile. (line  32)
-* prompt annotation:                     Prompting.           (line  24)
-* prompt-for-continue annotation:        Prompting.           (line  40)
-* ptype:                                 Symbols.             (line 170)
-* putDebugChar:                          Bootstrapping.       (line  20)
-* pwd:                                   Working Directory.   (line  20)
-* py:                                    Python Commands.     (line  23)
-* python <1>:                            GDB/MI Support Commands.
-                                                              (line  85)
-* python:                                Python Commands.     (line  23)
-* python-interactive:                    Python Commands.     (line   9)
-* q (quit):                              Quitting GDB.        (line   6)
-* q (SingleKey TUI key):                 TUI Single Key Mode. (line  22)
-* query annotation:                      Prompting.           (line  36)
-* queue-signal:                          Signaling.           (line  36)
-* quit [EXPRESSION]:                     Quitting GDB.        (line   6)
-* quit annotation:                       Errors.              (line   6)
-* quoted-insert (C-q or C-v):            Commands For Text.   (line  20)
-* r (run):                               Starting.            (line   6)
-* r (SingleKey TUI key):                 TUI Single Key Mode. (line  25)
-* rbreak:                                Set Breaks.          (line  92)
-* rc (reverse-continue):                 Reverse Execution.   (line  30)
-* rdilogenable:                          ARM.                 (line  95)
-* rdilogfile:                            ARM.                 (line  89)
-* re-read-init-file (C-x C-r):           Miscellaneous Commands.
-                                                              (line   6)
-* readnow:                               Files.               (line  90)
-* rec:                                   Process Record and Replay.
-                                                              (line  38)
-* rec btrace:                            Process Record and Replay.
-                                                              (line  38)
-* rec btrace bts:                        Process Record and Replay.
-                                                              (line  38)
-* rec btrace pt:                         Process Record and Replay.
-                                                              (line  38)
-* rec bts:                               Process Record and Replay.
-                                                              (line  38)
-* rec del:                               Process Record and Replay.
-                                                              (line 303)
-* rec full:                              Process Record and Replay.
-                                                              (line  38)
-* rec function-call-history:             Process Record and Replay.
-                                                              (line 351)
-* rec instruction-history:               Process Record and Replay.
-                                                              (line 310)
-* rec pt:                                Process Record and Replay.
-                                                              (line  38)
-* rec s:                                 Process Record and Replay.
-                                                              (line  97)
-* recognize on type_recognizer:          Type Printing API.   (line  44)
-* record:                                Process Record and Replay.
-                                                              (line  38)
-* record btrace:                         Process Record and Replay.
-                                                              (line  38)
-* record btrace bts:                     Process Record and Replay.
-                                                              (line  38)
-* record btrace pt:                      Process Record and Replay.
-                                                              (line  38)
-* record bts:                            Process Record and Replay.
-                                                              (line  38)
-* record delete:                         Process Record and Replay.
-                                                              (line 303)
-* record full:                           Process Record and Replay.
-                                                              (line  38)
-* record function-call-history:          Process Record and Replay.
-                                                              (line 351)
-* record goto:                           Process Record and Replay.
-                                                              (line 120)
-* record instruction-history:            Process Record and Replay.
-                                                              (line 310)
-* record pt:                             Process Record and Replay.
-                                                              (line  38)
-* record restore:                        Process Record and Replay.
-                                                              (line 141)
-* record save:                           Process Record and Replay.
-                                                              (line 134)
-* record stop:                           Process Record and Replay.
-                                                              (line  97)
-* redraw-current-line ():                Commands For Moving. (line  30)
-* refresh:                               TUI Commands.        (line  66)
-* register-breakpoint!:                  Breakpoints In Guile.
-                                                              (line  89)
-* register-command!:                     Commands In Guile.   (line  58)
-* register-parameter!:                   Parameters In Guile. (line  94)
-* register_xmethod_matcher:              Xmethod API.         (line  85)
-* RegisterChangedEvent.frame:            Events In Python.    (line 170)
-* RegisterChangedEvent.regnum:           Events In Python.    (line 174)
-* remote delete:                         File Transfer.       (line  23)
-* remote get:                            File Transfer.       (line  19)
-* remote put:                            File Transfer.       (line  15)
-* remotetimeout:                         Sparclet.            (line  12)
-* remove-inferiors:                      Inferiors and Programs.
-                                                              (line  86)
-* remove-symbol-file:                    Files.               (line 163)
-* restart CHECKPOINT-ID:                 Checkpoint/Restart.  (line  44)
-* restore:                               Dump/Restore Files.  (line  44)
-* RET (repeat last command):             Command Syntax.      (line  21)
-* return:                                Returning.           (line   6)
-* reverse-continue:                      Reverse Execution.   (line  30)
-* reverse-finish:                        Reverse Execution.   (line  77)
-* reverse-next:                          Reverse Execution.   (line  60)
-* reverse-nexti:                         Reverse Execution.   (line  69)
-* reverse-search:                        Search.              (line  16)
-* reverse-search-history (C-r):          Commands For History.
-                                                              (line  26)
-* reverse-step:                          Reverse Execution.   (line  37)
-* reverse-stepi:                         Reverse Execution.   (line  52)
-* revert-all-at-newline:                 Readline Init File Syntax.
-                                                              (line 206)
-* revert-line (M-r):                     Miscellaneous Commands.
-                                                              (line  25)
-* Right:                                 TUI Keys.            (line  62)
-* rn (reverse-next):                     Reverse Execution.   (line  60)
-* rni (reverse-nexti):                   Reverse Execution.   (line  69)
-* rs (step):                             Reverse Execution.   (line  37)
-* rsi (reverse-stepi):                   Reverse Execution.   (line  52)
-* run:                                   Starting.            (line   6)
-* run&:                                  Background Execution.
-                                                              (line  21)
-* rwatch:                                Set Watchpoints.     (line  79)
-* s (SingleKey TUI key):                 TUI Single Key Mode. (line  28)
-* s (step):                              Continuing and Stepping.
-                                                              (line  47)
-* sal-last:                              Symbol Tables In Guile.
-                                                              (line  70)
-* sal-line:                              Symbol Tables In Guile.
-                                                              (line  64)
-* sal-pc:                                Symbol Tables In Guile.
-                                                              (line  67)
-* sal-symtab:                            Symbol Tables In Guile.
-                                                              (line  61)
-* sal-valid?:                            Symbol Tables In Guile.
-                                                              (line  55)
-* sal?:                                  Symbol Tables In Guile.
-                                                              (line  51)
-* save breakpoints:                      Save Breakpoints.    (line   9)
-* save gdb-index:                        Index Files.         (line  19)
-* save tracepoints:                      save tracepoints.    (line   6)
-* save-tracepoints:                      save tracepoints.    (line   6)
-* sdireset:                              M32R/D.              (line  44)
-* sdistatus:                             M32R/D.              (line  47)
-* sds, a command:                        PowerPC Embedded.    (line  94)
-* search:                                Search.              (line   9)
-* section:                               Files.               (line 193)
-* select-frame:                          Frames.              (line  51)
-* selected-frame:                        Frames In Guile.     (line 158)
-* self:                                  Commands In Guile.   (line 101)
-* self-insert (a, b, A, 1, !, ...):      Commands For Text.   (line  27)
-* set:                                   Help.                (line 108)
-* set ada trust-PAD-over-XVS:            Ada Glitches.        (line  43)
-* set agent off:                         In-Process Agent.    (line  47)
-* set agent on:                          In-Process Agent.    (line  38)
-* set annotate:                          Annotations Overview.
-                                                              (line  29)
-* set architecture:                      Targets.             (line  21)
-* set args:                              Arguments.           (line  21)
-* set arm:                               ARM.                 (line  18)
-* set auto-connect-native-target:        Starting.            (line 160)
-* set auto-load gdb-scripts:             Auto-loading sequences.
-                                                              (line  13)
-* set auto-load guile-scripts:           Guile Auto-loading.  (line  17)
-* set auto-load libthread-db:            libthread_db.so.1 file.
-                                                              (line  22)
-* set auto-load local-gdbinit:           Init File in the Current Directory.
-                                                              (line  14)
-* set auto-load off:                     Auto-loading.        (line  32)
-* set auto-load python-scripts:          Python Auto-loading. (line  17)
-* set auto-load safe-path:               Auto-loading safe path.
-                                                              (line  32)
-* set auto-load scripts-directory:       objfile-gdbdotext file.
-                                                              (line  39)
-* set auto-solib-add:                    Files.               (line 314)
-* set backtrace:                         Backtrace.           (line 116)
-* set basenames-may-differ:              Files.               (line 543)
-* set board-address:                     M32R/D.              (line  21)
-* set breakpoint always-inserted:        Set Breaks.          (line 327)
-* set breakpoint auto-hw:                Set Breaks.          (line 307)
-* set breakpoint condition-evaluation:   Set Breaks.          (line 348)
-* set breakpoint pending:                Set Breaks.          (line 276)
-* set can-use-hw-watchpoints:            Set Watchpoints.     (line 116)
-* set case-sensitive:                    Symbols.             (line  27)
-* set charset:                           Character Sets.      (line  46)
-* set check range:                       Range Checking.      (line  34)
-* set check type:                        Type Checking.       (line  35)
-* set circular-trace-buffer:             Starting and Stopping Trace Experiments.
-                                                              (line  94)
-* set code-cache:                        Caching Target Data. (line  36)
-* set coerce-float-to-double:            ABI.                 (line  46)
-* set com1base:                          DJGPP Native.        (line 125)
-* set com1irq:                           DJGPP Native.        (line 125)
-* set com2base:                          DJGPP Native.        (line 125)
-* set com2irq:                           DJGPP Native.        (line 125)
-* set com3base:                          DJGPP Native.        (line 125)
-* set com3irq:                           DJGPP Native.        (line 125)
-* set com4base:                          DJGPP Native.        (line 125)
-* set com4irq:                           DJGPP Native.        (line 125)
-* set complaints:                        Messages/Warnings.   (line  29)
-* set confirm:                           Messages/Warnings.   (line  50)
-* set cp-abi:                            ABI.                 (line  58)
-* set cygwin-exceptions:                 Cygwin Native.       (line  35)
-* set data-directory:                    Data Files.          (line  12)
-* set dcache line-size:                  Caching Target Data. (line  60)
-* set dcache size:                       Caching Target Data. (line  57)
-* set debug:                             Debugging Output.    (line  18)
-* set debug aarch64:                     AArch64.             (line  10)
-* set debug auto-load:                   Auto-loading verbose mode.
-                                                              (line  27)
-* set debug darwin:                      Darwin.              (line   9)
-* set debug entry-values:                Tail Call Frames.    (line  48)
-* set debug hppa:                        HPPA.                (line  10)
-* set debug libthread-db:                Threads.             (line 218)
-* set debug mach-o:                      Darwin.              (line  16)
-* set debug mips:                        MIPS.                (line 106)
-* set debug monitor:                     Target Commands.     (line 108)
-* set debug nios2:                       Nios II.             (line  10)
-* set debug-file-directory:              Separate Debug Files.
-                                                              (line  70)
-* set debugevents:                       Cygwin Native.       (line  64)
-* set debugexceptions:                   Cygwin Native.       (line  75)
-* set debugexec:                         Cygwin Native.       (line  71)
-* set debugmemory:                       Cygwin Native.       (line  79)
-* set default-collect:                   Tracepoint Actions.  (line 135)
-* set demangle-style:                    Print Settings.      (line 429)
-* set detach-on-fork:                    Forks.               (line  58)
-* set directories:                       Source Path.         (line 120)
-* set disable-randomization:             Starting.            (line 203)
-* set disassemble-next-line:             Machine Code.        (line 144)
-* set disassembly-flavor:                Machine Code.        (line 132)
-* set disconnected-dprintf:              Dynamic Printf.      (line  83)
-* set disconnected-tracing:              Starting and Stopping Trace Experiments.
-                                                              (line  55)
-* set displaced-stepping:                Maintenance Commands.
-                                                              (line 123)
-* set download-path:                     M32R/D.              (line  15)
-* set editing:                           Editing.             (line  15)
-* set endian:                            Byte Order.          (line  13)
-* set environment:                       Environment.         (line  39)
-* set exceptions, Hurd command:          Hurd Native.         (line  40)
-* set exec-direction:                    Reverse Execution.   (line  83)
-* set exec-done-display:                 Debugging Output.    (line  11)
-* set exec-wrapper:                      Starting.            (line 112)
-* set extended-prompt:                   Prompt.              (line  25)
-* set extension-language:                Show.                (line  30)
-* set follow-exec-mode:                  Forks.               (line 104)
-* set follow-fork-mode:                  Forks.               (line  38)
-* set frame-filter priority:             Frame Filter Management.
-                                                              (line  84)
-* set gnutarget:                         Target Commands.     (line  28)
-* set guile print-stack:                 Guile Exception Handling.
-                                                              (line   6)
-* set hash, for remote monitors:         Target Commands.     (line  99)
-* set height:                            Screen Size.         (line  21)
-* set history expansion:                 Command History.     (line  84)
-* set history filename:                  Command History.     (line  26)
-* set history remove-duplicates:         Command History.     (line  55)
-* set history save:                      Command History.     (line  36)
-* set history size:                      Command History.     (line  45)
-* set host-charset:                      Character Sets.      (line  33)
-* set inferior-tty:                      Input/Output.        (line  49)
-* set input-radix:                       Numbers.             (line  14)
-* set interactive-mode:                  Other Misc Settings. (line   6)
-* set language:                          Manually.            (line   9)
-* set libthread-db-search-path:          Threads.             (line 179)
-* set listsize:                          List.                (line  33)
-* set logging:                           Logging Output.      (line   9)
-* set mach-exceptions:                   Darwin.              (line  27)
-* set max-completions:                   Completion.          (line  69)
-* set max-user-call-depth:               Define.              (line  79)
-* set mem inaccessible-by-default:       Memory Region Attributes.
-                                                              (line 130)
-* set mips abi:                          MIPS.                (line  32)
-* set mips compression:                  MIPS.                (line  55)
-* set mips mask-address:                 MIPS.                (line  86)
-* set mipsfpu:                           MIPS Embedded.       (line  60)
-* set monitor-prompt, MIPS remote:       MIPS Embedded.       (line 107)
-* set monitor-warnings, MIPS remote:     MIPS Embedded.       (line 123)
-* set mpx bound:                         i386.                (line  60)
-* set multiple-symbols:                  Ambiguous Expressions.
-                                                              (line  50)
-* set new-console:                       Cygwin Native.       (line  47)
-* set new-group:                         Cygwin Native.       (line  56)
-* set non-stop:                          Non-Stop Mode.       (line  35)
-* set opaque-type-resolution:            Symbols.             (line 345)
-* set osabi:                             ABI.                 (line  11)
-* set output-radix:                      Numbers.             (line  31)
-* set overload-resolution:               Debugging C Plus Plus.
-                                                              (line  59)
-* set pagination:                        Screen Size.         (line  40)
-* set powerpc:                           PowerPC Embedded.    (line  51)
-* set print:                             Print Settings.      (line  11)
-* set print entry-values:                Print Settings.      (line 207)
-* set print frame-arguments:             Print Settings.      (line 155)
-* set print inferior-events:             Inferiors and Programs.
-                                                              (line 117)
-* set print symbol-loading:              Symbols.             (line 363)
-* set print thread-events:               Threads.             (line 158)
-* set print type methods:                Symbols.             (line  44)
-* set print type typedefs:               Symbols.             (line  58)
-* set processor:                         Targets.             (line  31)
-* set procfs-file:                       SVR4 Process Information.
-                                                              (line  74)
-* set procfs-trace:                      SVR4 Process Information.
-                                                              (line  68)
-* set prompt:                            Prompt.              (line  16)
-* set python print-stack:                Python Commands.     (line  46)
-* set radix:                             Numbers.             (line  44)
-* set range-stepping:                    Continuing and Stepping.
-                                                              (line 225)
-* set ravenscar task-switching off:      Ravenscar Profile.   (line  14)
-* set ravenscar task-switching on:       Ravenscar Profile.   (line  10)
-* set rdiheartbeat:                      ARM.                 (line 112)
-* set rdiromatzero:                      ARM.                 (line 102)
-* set record:                            Process Record and Replay.
-                                                              (line 341)
-* set record btrace:                     Process Record and Replay.
-                                                              (line 196)
-* set record btrace bts:                 Process Record and Replay.
-                                                              (line 215)
-* set record btrace pt:                  Process Record and Replay.
-                                                              (line 238)
-* set record full:                       Process Record and Replay.
-                                                              (line 145)
-* set remote:                            Remote Configuration.
-                                                              (line   6)
-* set remote system-call-allowed:        system.              (line  38)
-* set remote-mips64-transfers-32bit-regs: MIPS.               (line  96)
-* set remotecache:                       Caching Target Data. (line  20)
-* set remoteflow:                        Remote Configuration.
-                                                              (line  48)
-* set retransmit-timeout:                MIPS Embedded.       (line  83)
-* set schedule-multiple:                 All-Stop Mode.       (line  65)
-* set script-extension:                  Extending GDB.       (line  29)
-* set sdstimeout:                        PowerPC Embedded.    (line  87)
-* set server-address:                    M32R/D.              (line  27)
-* set sh calling-convention:             Super-H.             (line   9)
-* set shell:                             Cygwin Native.       (line  83)
-* set signal-thread:                     Hurd Native.         (line  21)
-* set signals, Hurd command:             Hurd Native.         (line  11)
-* set sigs, Hurd command:                Hurd Native.         (line  11)
-* set sigthread:                         Hurd Native.         (line  21)
-* set solib-absolute-prefix:             Files.               (line 393)
-* set solib-search-path:                 Files.               (line 469)
-* set spu:                               SPU.                 (line  39)
-* set stack-cache:                       Caching Target Data. (line  28)
-* set startup-with-shell:                Starting.            (line 137)
-* set step-mode:                         Continuing and Stepping.
-                                                              (line  93)
-* set stop-on-solib-events:              Files.               (line 370)
-* set stopped, Hurd command:             Hurd Native.         (line  32)
-* set struct-convention:                 i386.                (line   7)
-* set substitute-path:                   Source Path.         (line 127)
-* set syn-garbage-limit, MIPS remote:    MIPS Embedded.       (line  98)
-* set sysroot:                           Files.               (line 393)
-* set target-charset:                    Character Sets.      (line  28)
-* set target-file-system-kind (unix|dos-based|auto): Files.   (line 483)
-* set target-wide-charset:               Character Sets.      (line  61)
-* set task, Hurd commands:               Hurd Native.         (line  49)
-* set tcp:                               Remote Configuration.
-                                                              (line 123)
-* set thread, Hurd command:              Hurd Native.         (line  91)
-* set timeout:                           MIPS Embedded.       (line  83)
-* set trace-buffer-size:                 Starting and Stopping Trace Experiments.
-                                                              (line 110)
-* set trace-commands:                    Messages/Warnings.   (line  67)
-* set trace-notes:                       Starting and Stopping Trace Experiments.
-                                                              (line 129)
-* set trace-stop-notes:                  Starting and Stopping Trace Experiments.
-                                                              (line 135)
-* set trace-user:                        Starting and Stopping Trace Experiments.
-                                                              (line 125)
-* set trust-readonly-sections:           Files.               (line 269)
-* set tui active-border-mode:            TUI Configuration.   (line  24)
-* set tui border-kind:                   TUI Configuration.   (line   9)
-* set tui border-mode:                   TUI Configuration.   (line  23)
-* set unwind-on-terminating-exception:   Calling.             (line  47)
-* set unwindonsignal:                    Calling.             (line  36)
-* set use-coredump-filter:               Core File Generation.
-                                                              (line  32)
-* set variable:                          Assignment.          (line  16)
-* set verbose:                           Messages/Warnings.   (line  15)
-* set watchdog:                          Maintenance Commands.
-                                                              (line 493)
-* set width:                             Screen Size.         (line  21)
-* set write:                             Patching.            (line  15)
-* set-breakpoint-condition!:             Breakpoints In Guile.
-                                                              (line 199)
-* set-breakpoint-enabled!:               Breakpoints In Guile.
-                                                              (line 149)
-* set-breakpoint-hit-count!:             Breakpoints In Guile.
-                                                              (line 174)
-* set-breakpoint-ignore-count!:          Breakpoints In Guile.
-                                                              (line 168)
-* set-breakpoint-silent!:                Breakpoints In Guile.
-                                                              (line 160)
-* set-breakpoint-stop!:                  Breakpoints In Guile.
-                                                              (line 207)
-* set-breakpoint-task!:                  Breakpoints In Guile.
-                                                              (line 191)
-* set-breakpoint-thread!:                Breakpoints In Guile.
-                                                              (line 182)
-* set-iterator-progress!:                Iterators In Guile.  (line  61)
-* set-mark (C-@):                        Miscellaneous Commands.
-                                                              (line  32)
-* set-memory-port-read-buffer-size!:     Memory Ports in Guile.
-                                                              (line  42)
-* set-memory-port-write-buffer-size!:    Memory Ports in Guile.
-                                                              (line  51)
-* set-objfile-pretty-printers!:          Objfiles In Guile.   (line  41)
-* set-parameter-value!:                  Parameters In Guile. (line 107)
-* set-pretty-printer-enabled!:           Guile Pretty Printing API.
-                                                              (line  32)
-* set-pretty-printers!:                  Guile Pretty Printing API.
-                                                              (line  39)
-* set-progspace-pretty-printers!:        Progspaces In Guile. (line  59)
-* set_debug_traps:                       Stub Contents.       (line  10)
-* share:                                 Files.               (line 346)
-* sharedlibrary:                         Files.               (line 346)
-* shell:                                 Shell Commands.      (line  10)
-* show:                                  Help.                (line 113)
-* show ada trust-PAD-over-XVS:           Ada Glitches.        (line  43)
-* show agent:                            In-Process Agent.    (line  51)
-* show annotate:                         Annotations Overview.
-                                                              (line  34)
-* show architecture:                     Targets.             (line  21)
-* show args:                             Arguments.           (line  28)
-* show arm:                              ARM.                 (line  22)
-* show auto-load:                        Auto-loading.        (line  45)
-* show auto-load gdb-scripts:            Auto-loading sequences.
-                                                              (line  17)
-* show auto-load guile-scripts:          Guile Auto-loading.  (line  20)
-* show auto-load libthread-db:           libthread_db.so.1 file.
-                                                              (line  26)
-* show auto-load local-gdbinit:          Init File in the Current Directory.
-                                                              (line  18)
-* show auto-load python-scripts:         Python Auto-loading. (line  20)
-* show auto-load safe-path:              Auto-loading safe path.
-                                                              (line  46)
-* show auto-load scripts-directory:      objfile-gdbdotext file.
-                                                              (line  63)
-* show auto-solib-add:                   Files.               (line 331)
-* show backtrace:                        Backtrace.           (line 123)
-* show basenames-may-differ:             Files.               (line 546)
-* show board-address:                    M32R/D.              (line  24)
-* show breakpoint always-inserted:       Set Breaks.          (line 327)
-* show breakpoint auto-hw:               Set Breaks.          (line 307)
-* show breakpoint condition-evaluation:  Set Breaks.          (line 348)
-* show breakpoint pending:               Set Breaks.          (line 276)
-* show can-use-hw-watchpoints:           Set Watchpoints.     (line 119)
-* show case-sensitive:                   Symbols.             (line  40)
-* show charset:                          Character Sets.      (line  52)
-* show check range:                      Range Checking.      (line  34)
-* show check type:                       Type Checking.       (line  35)
-* show circular-trace-buffer:            Starting and Stopping Trace Experiments.
-                                                              (line 101)
-* show code-cache:                       Caching Target Data. (line  42)
-* show coerce-float-to-double:           ABI.                 (line  55)
-* show com1base:                         DJGPP Native.        (line 137)
-* show com1irq:                          DJGPP Native.        (line 137)
-* show com2base:                         DJGPP Native.        (line 137)
-* show com2irq:                          DJGPP Native.        (line 137)
-* show com3base:                         DJGPP Native.        (line 137)
-* show com3irq:                          DJGPP Native.        (line 137)
-* show com4base:                         DJGPP Native.        (line 137)
-* show com4irq:                          DJGPP Native.        (line 137)
-* show commands:                         Command History.     (line  97)
-* show complaints:                       Messages/Warnings.   (line  35)
-* show configuration:                    Help.                (line 146)
-* show confirm:                          Messages/Warnings.   (line  58)
-* show convenience:                      Convenience Vars.    (line  37)
-* show copying:                          Help.                (line 137)
-* show cp-abi:                           ABI.                 (line  58)
-* show cygwin-exceptions:                Cygwin Native.       (line  43)
-* show data-directory:                   Data Files.          (line  16)
-* show dcache line-size:                 Caching Target Data. (line  68)
-* show dcache size:                      Caching Target Data. (line  64)
-* show debug:                            Debugging Output.    (line  22)
-* show debug auto-load:                  Auto-loading verbose mode.
-                                                              (line  30)
-* show debug darwin:                     Darwin.              (line  13)
-* show debug entry-values:               Tail Call Frames.    (line  56)
-* show debug libthread-db:               Threads.             (line 218)
-* show debug mach-o:                     Darwin.              (line  23)
-* show debug mips:                       MIPS.                (line 110)
-* show debug monitor:                    Target Commands.     (line 112)
-* show debug nios2:                      Nios II.             (line  14)
-* show debug-file-directory:             Separate Debug Files.
-                                                              (line  75)
-* show default-collect:                  Tracepoint Actions.  (line 144)
-* show detach-on-fork:                   Forks.               (line  74)
-* show directories:                      Source Path.         (line 124)
-* show disassemble-next-line:            Machine Code.        (line 144)
-* show disassembly-flavor:               Machine Code.        (line 141)
-* show disconnected-dprintf:             Dynamic Printf.      (line  88)
-* show disconnected-tracing:             Starting and Stopping Trace Experiments.
-                                                              (line  62)
-* show displaced-stepping:               Maintenance Commands.
-                                                              (line 123)
-* show download-path:                    M32R/D.              (line  18)
-* show editing:                          Editing.             (line  22)
-* show environment:                      Environment.         (line  33)
-* show exceptions, Hurd command:         Hurd Native.         (line  46)
-* show exec-done-display:                Debugging Output.    (line  14)
-* show extended-prompt:                  Prompt.              (line  39)
-* show follow-fork-mode:                 Forks.               (line  52)
-* show frame-filter priority:            Frame Filter Management.
-                                                              (line  91)
-* show gnutarget:                        Target Commands.     (line  40)
-* show hash, for remote monitors:        Target Commands.     (line 105)
-* show height:                           Screen Size.         (line  21)
-* show history:                          Command History.     (line  89)
-* show host-charset:                     Character Sets.      (line  55)
-* show inferior-tty:                     Input/Output.        (line  52)
-* show input-radix:                      Numbers.             (line  36)
-* show interactive-mode:                 Other Misc Settings. (line  21)
-* show language:                         Show.                (line  10)
-* show libthread-db-search-path:         Threads.             (line 215)
-* show listsize:                         List.                (line  39)
-* show logging:                          Logging Output.      (line  26)
-* show mach-exceptions:                  Darwin.              (line  34)
-* show max-completions:                  Completion.          (line  77)
-* show max-user-call-depth:              Define.              (line  79)
-* show mem inaccessible-by-default:      Memory Region Attributes.
-                                                              (line 136)
-* show mips abi:                         MIPS.                (line  52)
-* show mips compression:                 MIPS.                (line  78)
-* show mips mask-address:                MIPS.                (line  92)
-* show mipsfpu:                          MIPS Embedded.       (line  60)
-* show monitor-prompt, MIPS remote:      MIPS Embedded.       (line 119)
-* show monitor-warnings, MIPS remote:    MIPS Embedded.       (line 129)
-* show mpx bound:                        i386.                (line  57)
-* show multiple-symbols:                 Ambiguous Expressions.
-                                                              (line  70)
-* show new-console:                      Cygwin Native.       (line  52)
-* show new-group:                        Cygwin Native.       (line  61)
-* show non-stop:                         Non-Stop Mode.       (line  39)
-* show opaque-type-resolution:           Symbols.             (line 360)
-* show osabi:                            ABI.                 (line  11)
-* show output-radix:                     Numbers.             (line  39)
-* show overload-resolution:              Debugging C Plus Plus.
-                                                              (line  76)
-* show pagination:                       Screen Size.         (line  46)
-* show paths:                            Environment.         (line  29)
-* show print:                            Print Settings.      (line  39)
-* show print inferior-events:            Inferiors and Programs.
-                                                              (line 125)
-* show print symbol-loading:             Symbols.             (line 378)
-* show print thread-events:              Threads.             (line 168)
-* show print type methods:               Symbols.             (line  54)
-* show print type typedefs:              Symbols.             (line  70)
-* show processor:                        Targets.             (line  31)
-* show procfs-file:                      SVR4 Process Information.
-                                                              (line  79)
-* show procfs-trace:                     SVR4 Process Information.
-                                                              (line  71)
-* show prompt:                           Prompt.              (line  19)
-* show radix:                            Numbers.             (line  44)
-* show range-stepping:                   Continuing and Stepping.
-                                                              (line 225)
-* show ravenscar task-switching:         Ravenscar Profile.   (line  22)
-* show rdiheartbeat:                     ARM.                 (line 117)
-* show rdiromatzero:                     ARM.                 (line 109)
-* show record:                           Process Record and Replay.
-                                                              (line 347)
-* show record btrace:                    Process Record and Replay.
-                                                              (line 212)
-* show record full:                      Process Record and Replay.
-                                                              (line 163)
-* show remote:                           Remote Configuration.
-                                                              (line   6)
-* show remote system-call-allowed:       system.              (line  42)
-* show remote-mips64-transfers-32bit-regs: MIPS.              (line 102)
-* show remotecache:                      Caching Target Data. (line  25)
-* show remoteflow:                       Remote Configuration.
-                                                              (line  52)
-* show retransmit-timeout:               MIPS Embedded.       (line  83)
-* show script-extension:                 Extending GDB.       (line  29)
-* show sdstimeout:                       PowerPC Embedded.    (line  91)
-* show server-address:                   M32R/D.              (line  31)
-* show sh calling-convention:            Super-H.             (line  22)
-* show shell:                            Cygwin Native.       (line  87)
-* show signal-thread:                    Hurd Native.         (line  28)
-* show signals, Hurd command:            Hurd Native.         (line  17)
-* show sigs, Hurd command:               Hurd Native.         (line  17)
-* show sigthread:                        Hurd Native.         (line  28)
-* show solib-search-path:                Files.               (line 480)
-* show spu:                              SPU.                 (line  44)
-* show stack-cache:                      Caching Target Data. (line  33)
-* show stop-on-solib-events:             Files.               (line 376)
-* show stopped, Hurd command:            Hurd Native.         (line  37)
-* show struct-convention:                i386.                (line  15)
-* show substitute-path:                  Source Path.         (line 164)
-* show syn-garbage-limit, MIPS remote:   MIPS Embedded.       (line 103)
-* show sysroot:                          Files.               (line 466)
-* show target-charset:                   Character Sets.      (line  58)
-* show target-file-system-kind:          Files.               (line 483)
-* show target-wide-charset:              Character Sets.      (line  67)
-* show task, Hurd commands:              Hurd Native.         (line  57)
-* show tcp:                              Remote Configuration.
-                                                              (line 123)
-* show thread, Hurd command:             Hurd Native.         (line 101)
-* show timeout:                          MIPS Embedded.       (line  83)
-* show trace-buffer-size:                Starting and Stopping Trace Experiments.
-                                                              (line 117)
-* show trace-notes:                      Starting and Stopping Trace Experiments.
-                                                              (line 132)
-* show trace-stop-notes:                 Starting and Stopping Trace Experiments.
-                                                              (line 140)
-* show trace-user:                       Starting and Stopping Trace Experiments.
-                                                              (line 127)
-* show unwind-on-terminating-exception:  Calling.             (line  55)
-* show unwindonsignal:                   Calling.             (line  43)
-* show user:                             Define.              (line  72)
-* show values:                           Value History.       (line  47)
-* show verbose:                          Messages/Warnings.   (line  21)
-* show version:                          Help.                (line 127)
-* show warranty:                         Help.                (line 141)
-* show width:                            Screen Size.         (line  21)
-* show write:                            Patching.            (line  26)
-* show-all-if-ambiguous:                 Readline Init File Syntax.
-                                                              (line 212)
-* show-all-if-unmodified:                Readline Init File Syntax.
-                                                              (line 218)
-* si (stepi):                            Continuing and Stepping.
-                                                              (line 191)
-* signal:                                Signaling.           (line   6)
-* signal annotation:                     Annotations for Running.
-                                                              (line  42)
-* signal-name annotation:                Annotations for Running.
-                                                              (line  22)
-* signal-name-end annotation:            Annotations for Running.
-                                                              (line  22)
-* signal-string annotation:              Annotations for Running.
-                                                              (line  22)
-* signal-string-end annotation:          Annotations for Running.
-                                                              (line  22)
-* SignalEvent.stop_signal:               Events In Python.    (line  95)
-* signalled annotation:                  Annotations for Running.
-                                                              (line  22)
-* silent:                                Break Commands.      (line  43)
-* sim:                                   Z8000.               (line  15)
-* sim, a command:                        Embedded Processors. (line  13)
-* skip delete:                           Skipping Over Functions and Files.
-                                                              (line  86)
-* skip disable:                          Skipping Over Functions and Files.
-                                                              (line  94)
-* skip enable:                           Skipping Over Functions and Files.
-                                                              (line  90)
-* skip file:                             Skipping Over Functions and Files.
-                                                              (line  46)
-* skip function:                         Skipping Over Functions and Files.
-                                                              (line  34)
-* skip-completed-text:                   Readline Init File Syntax.
-                                                              (line 227)
-* skip-csi-sequence ():                  Miscellaneous Commands.
-                                                              (line  51)
-* source:                                Command Files.       (line  17)
-* source annotation:                     Source Annotations.  (line   6)
-* start:                                 Starting.            (line  79)
-* start-kbd-macro (C-x ():               Keyboard Macros.     (line   6)
-* starting annotation:                   Annotations for Running.
-                                                              (line   6)
-* STDERR:                                Basic Python.        (line 143)
-* stdio-port?:                           I/O Ports in Guile.  (line  16)
-* STDLOG:                                Basic Python.        (line 146)
-* STDOUT:                                Basic Python.        (line 140)
-* step:                                  Continuing and Stepping.
-                                                              (line  47)
-* step&:                                 Background Execution.
-                                                              (line  28)
-* stepi:                                 Continuing and Stepping.
-                                                              (line 191)
-* stepi&:                                Background Execution.
-                                                              (line  31)
-* stop, a pseudo-command:                Hooks.               (line  21)
-* stopping annotation:                   Annotations for Running.
-                                                              (line   6)
-* strace:                                Create and Delete Tracepoints.
-                                                              (line  76)
-* string->argv:                          Commands In Guile.   (line  73)
-* symbol-addr-class:                     Symbols In Guile.    (line  49)
-* symbol-argument?:                      Symbols In Guile.    (line  59)
-* symbol-constant?:                      Symbols In Guile.    (line  63)
-* symbol-file:                           Files.               (line  45)
-* symbol-function?:                      Symbols In Guile.    (line  66)
-* symbol-line:                           Symbols In Guile.    (line  33)
-* symbol-linkage-name:                   Symbols In Guile.    (line  40)
-* symbol-name:                           Symbols In Guile.    (line  37)
-* symbol-needs-frame?:                   Symbols In Guile.    (line  54)
-* symbol-print-name:                     Symbols In Guile.    (line  44)
-* symbol-symtab:                         Symbols In Guile.    (line  29)
-* symbol-type:                           Symbols In Guile.    (line  25)
-* symbol-valid?:                         Symbols In Guile.    (line  18)
-* symbol-value:                          Symbols In Guile.    (line  73)
-* symbol-variable?:                      Symbols In Guile.    (line  70)
-* Symbol.addr_class:                     Symbols In Python.   (line  75)
-* Symbol.is_argument:                    Symbols In Python.   (line  85)
-* Symbol.is_constant:                    Symbols In Python.   (line  88)
-* Symbol.is_function:                    Symbols In Python.   (line  91)
-* Symbol.is_valid:                       Symbols In Python.   (line  99)
-* Symbol.is_variable:                    Symbols In Python.   (line  94)
-* Symbol.line:                           Symbols In Python.   (line  58)
-* Symbol.linkage_name:                   Symbols In Python.   (line  66)
-* Symbol.name:                           Symbols In Python.   (line  62)
-* Symbol.needs_frame:                    Symbols In Python.   (line  80)
-* Symbol.print_name:                     Symbols In Python.   (line  70)
-* Symbol.symtab:                         Symbols In Python.   (line  53)
-* Symbol.type:                           Symbols In Python.   (line  48)
-* Symbol.value:                          Symbols In Python.   (line 106)
-* symbol?:                               Symbols In Guile.    (line  14)
-* SYMBOL_FUNCTION_DOMAIN:                Symbols In Guile.    (line 133)
-* SYMBOL_FUNCTIONS_DOMAIN:               Symbols In Python.   (line 134)
-* SYMBOL_LABEL_DOMAIN <1>:               Symbols In Guile.    (line 126)
-* SYMBOL_LABEL_DOMAIN:                   Symbols In Python.   (line 127)
-* SYMBOL_LOC_ARG <1>:                    Symbols In Guile.    (line 155)
-* SYMBOL_LOC_ARG:                        Symbols In Python.   (line 156)
-* SYMBOL_LOC_BLOCK <1>:                  Symbols In Guile.    (line 176)
-* SYMBOL_LOC_BLOCK:                      Symbols In Python.   (line 177)
-* SYMBOL_LOC_COMPUTED <1>:               Symbols In Guile.    (line 190)
-* SYMBOL_LOC_COMPUTED:                   Symbols In Python.   (line 191)
-* SYMBOL_LOC_CONST <1>:                  Symbols In Guile.    (line 146)
-* SYMBOL_LOC_CONST:                      Symbols In Python.   (line 147)
-* SYMBOL_LOC_CONST_BYTES <1>:            Symbols In Guile.    (line 179)
-* SYMBOL_LOC_CONST_BYTES:                Symbols In Python.   (line 180)
-* SYMBOL_LOC_LOCAL <1>:                  Symbols In Guile.    (line 169)
-* SYMBOL_LOC_LOCAL:                      Symbols In Python.   (line 170)
-* SYMBOL_LOC_OPTIMIZED_OUT <1>:          Symbols In Guile.    (line 187)
-* SYMBOL_LOC_OPTIMIZED_OUT:              Symbols In Python.   (line 188)
-* SYMBOL_LOC_REF_ARG <1>:                Symbols In Guile.    (line 159)
-* SYMBOL_LOC_REF_ARG:                    Symbols In Python.   (line 160)
-* SYMBOL_LOC_REGISTER <1>:               Symbols In Guile.    (line 152)
-* SYMBOL_LOC_REGISTER:                   Symbols In Python.   (line 153)
-* SYMBOL_LOC_REGPARM_ADDR <1>:           Symbols In Guile.    (line 164)
-* SYMBOL_LOC_REGPARM_ADDR:               Symbols In Python.   (line 165)
-* SYMBOL_LOC_STATIC <1>:                 Symbols In Guile.    (line 149)
-* SYMBOL_LOC_STATIC:                     Symbols In Python.   (line 150)
-* SYMBOL_LOC_TYPEDEF <1>:                Symbols In Guile.    (line 172)
-* SYMBOL_LOC_TYPEDEF:                    Symbols In Python.   (line 173)
-* SYMBOL_LOC_UNDEF <1>:                  Symbols In Guile.    (line 142)
-* SYMBOL_LOC_UNDEF:                      Symbols In Python.   (line 143)
-* SYMBOL_LOC_UNRESOLVED <1>:             Symbols In Guile.    (line 182)
-* SYMBOL_LOC_UNRESOLVED:                 Symbols In Python.   (line 183)
-* SYMBOL_STRUCT_DOMAIN <1>:              Symbols In Guile.    (line 123)
-* SYMBOL_STRUCT_DOMAIN:                  Symbols In Python.   (line 124)
-* SYMBOL_TYPES_DOMAIN <1>:               Symbols In Guile.    (line 136)
-* SYMBOL_TYPES_DOMAIN:                   Symbols In Python.   (line 137)
-* SYMBOL_UNDEF_DOMAIN <1>:               Symbols In Guile.    (line 114)
-* SYMBOL_UNDEF_DOMAIN:                   Symbols In Python.   (line 115)
-* SYMBOL_VAR_DOMAIN <1>:                 Symbols In Guile.    (line 119)
-* SYMBOL_VAR_DOMAIN:                     Symbols In Python.   (line 120)
-* SYMBOL_VARIABLES_DOMAIN <1>:           Symbols In Guile.    (line 129)
-* SYMBOL_VARIABLES_DOMAIN:               Symbols In Python.   (line 130)
-* symtab-filename:                       Symbol Tables In Guile.
-                                                              (line  30)
-* symtab-fullname:                       Symbol Tables In Guile.
-                                                              (line  33)
-* symtab-global-block:                   Symbol Tables In Guile.
-                                                              (line  40)
-* symtab-objfile:                        Symbol Tables In Guile.
-                                                              (line  36)
-* symtab-static-block:                   Symbol Tables In Guile.
-                                                              (line  44)
-* symtab-valid?:                         Symbol Tables In Guile.
-                                                              (line  23)
-* Symtab.filename:                       Symbol Tables In Python.
-                                                              (line  45)
-* Symtab.fullname:                       Symbol Tables In Python.
-                                                              (line  68)
-* Symtab.global_block:                   Symbol Tables In Python.
-                                                              (line  71)
-* Symtab.is_valid:                       Symbol Tables In Python.
-                                                              (line  61)
-* Symtab.linetable:                      Symbol Tables In Python.
-                                                              (line  79)
-* Symtab.objfile:                        Symbol Tables In Python.
-                                                              (line  49)
-* Symtab.producer:                       Symbol Tables In Python.
-                                                              (line  53)
-* Symtab.static_block:                   Symbol Tables In Python.
-                                                              (line  75)
-* symtab?:                               Symbol Tables In Guile.
-                                                              (line  19)
-* Symtab_and_line.is_valid:              Symbol Tables In Python.
-                                                              (line  35)
-* Symtab_and_line.last:                  Symbol Tables In Python.
-                                                              (line  25)
-* Symtab_and_line.line:                  Symbol Tables In Python.
-                                                              (line  29)
-* Symtab_and_line.pc:                    Symbol Tables In Python.
-                                                              (line  21)
-* Symtab_and_line.symtab:                Symbol Tables In Python.
-                                                              (line  17)
-* sysinfo:                               DJGPP Native.        (line  19)
-* tabset:                                TUI Commands.        (line 110)
-* target:                                Target Commands.     (line  49)
-* target array:                          MIPS Embedded.       (line  49)
-* target ctf:                            Trace Files.         (line  28)
-* target dbug:                           M68K.                (line   9)
-* target ddb PORT:                       MIPS Embedded.       (line  41)
-* target dink32:                         PowerPC Embedded.    (line  72)
-* target lsi PORT:                       MIPS Embedded.       (line  44)
-* target m32r:                           M32R/D.              (line   6)
-* target m32rsdi:                        M32R/D.              (line   9)
-* target mips PORT:                      MIPS Embedded.       (line  14)
-* target op50n:                          PA.                  (line   6)
-* target pmon PORT:                      MIPS Embedded.       (line  38)
-* target ppcbug:                         PowerPC Embedded.    (line  75)
-* target ppcbug1:                        PowerPC Embedded.    (line  76)
-* target r3900:                          MIPS Embedded.       (line  46)
-* target rdi:                            ARM.                 (line   6)
-* target rdp:                            ARM.                 (line  11)
-* target record:                         Process Record and Replay.
-                                                              (line  38)
-* target record-btrace:                  Process Record and Replay.
-                                                              (line  38)
-* target record-full:                    Process Record and Replay.
-                                                              (line  38)
-* target sds:                            PowerPC Embedded.    (line  80)
-* target sim, with Z8000:                Z8000.               (line  15)
-* target sparclite:                      Sparclite.           (line   6)
-* target tfile:                          Trace Files.         (line  28)
-* target w89k:                           PA.                  (line   9)
-* target-config:                         Guile Configuration. (line  25)
-* task (Ada):                            Ada Tasks.           (line 105)
-* tbreak:                                Set Breaks.          (line  55)
-* tcatch:                                Set Catchpoints.     (line 253)
-* tdump:                                 tdump.               (line   6)
-* teval (tracepoints):                   Tracepoint Actions.  (line 110)
-* tfile:                                 Trace Files.         (line  28)
-* tfind:                                 tfind.               (line   6)
-* thbreak:                               Set Breaks.          (line  82)
-* this, inside C++ member functions:     C Plus Plus Expressions.
-                                                              (line  20)
-* thread apply:                          Threads.             (line 122)
-* thread find:                           Threads.             (line 144)
-* thread name:                           Threads.             (line 133)
-* thread THREADNO:                       Threads.             (line 100)
-* thread-info:                           GDB/MI Support Commands.
-                                                              (line  90)
-* ThreadEvent.inferior_thread:           Events In Python.    (line  56)
-* throw-user-error:                      Commands In Guile.   (line  81)
-* tload, M32R:                           M32R/D.              (line  39)
-* trace:                                 Create and Delete Tracepoints.
-                                                              (line   6)
-* transpose-chars (C-t):                 Commands For Text.   (line  30)
-* transpose-words (M-t):                 Commands For Text.   (line  36)
-* tsave:                                 Trace Files.         (line  12)
-* tstart [ NOTES ]:                      Starting and Stopping Trace Experiments.
-                                                              (line   6)
-* tstatus:                               Starting and Stopping Trace Experiments.
-                                                              (line  27)
-* tstop [ NOTES ]:                       Starting and Stopping Trace Experiments.
-                                                              (line  16)
-* tty:                                   Input/Output.        (line  23)
-* tui disable:                           TUI Commands.        (line  23)
-* tui enable:                            TUI Commands.        (line  18)
-* tui reg:                               TUI Commands.        (line  69)
-* tvariable:                             Trace State Variables.
-                                                              (line  26)
-* type-array:                            Types In Guile.      (line  53)
-* type-code:                             Types In Guile.      (line  26)
-* type-const:                            Types In Guile.      (line 100)
-* type-field:                            Types In Guile.      (line 130)
-* type-fields:                           Types In Guile.      (line 116)
-* type-has-field-deep?:                  Guile Types Module.  (line  33)
-* type-has-field?:                       Types In Guile.      (line 143)
-* type-name:                             Types In Guile.      (line  35)
-* type-num-fields:                       Types In Guile.      (line 113)
-* type-pointer:                          Types In Guile.      (line  74)
-* type-print-name:                       Types In Guile.      (line  39)
-* type-range:                            Types In Guile.      (line  78)
-* type-reference:                        Types In Guile.      (line  82)
-* type-sizeof:                           Types In Guile.      (line  44)
-* type-strip-typedefs:                   Types In Guile.      (line  49)
-* type-tag:                              Types In Guile.      (line  30)
-* type-target:                           Types In Guile.      (line  86)
-* type-unqualified:                      Types In Guile.      (line 108)
-* type-vector:                           Types In Guile.      (line  61)
-* type-volatile:                         Types In Guile.      (line 104)
-* Type.array:                            Types In Python.     (line 103)
-* Type.code:                             Types In Python.     (line  33)
-* Type.const:                            Types In Python.     (line 124)
-* Type.fields:                           Types In Python.     (line  54)
-* Type.name:                             Types In Python.     (line  37)
-* Type.optimized_out:                    Types In Python.     (line 181)
-* Type.pointer:                          Types In Python.     (line 147)
-* Type.range:                            Types In Python.     (line 137)
-* Type.reference:                        Types In Python.     (line 143)
-* Type.sizeof:                           Types In Python.     (line  41)
-* Type.strip_typedefs:                   Types In Python.     (line 151)
-* Type.tag:                              Types In Python.     (line  46)
-* Type.target:                           Types In Python.     (line 155)
-* Type.template_argument:                Types In Python.     (line 169)
-* Type.unqualified:                      Types In Python.     (line 132)
-* Type.vector:                           Types In Python.     (line 111)
-* Type.volatile:                         Types In Python.     (line 128)
-* type?:                                 Types In Guile.      (line  12)
-* TYPE_CODE_ARRAY <1>:                   Types In Guile.      (line 153)
-* TYPE_CODE_ARRAY:                       Types In Python.     (line 192)
-* TYPE_CODE_BITSTRING <1>:               Types In Guile.      (line 191)
-* TYPE_CODE_BITSTRING:                   Types In Python.     (line 230)
-* TYPE_CODE_BOOL <1>:                    Types In Guile.      (line 212)
-* TYPE_CODE_BOOL:                        Types In Python.     (line 251)
-* TYPE_CODE_CHAR <1>:                    Types In Guile.      (line 209)
-* TYPE_CODE_CHAR:                        Types In Python.     (line 248)
-* TYPE_CODE_COMPLEX <1>:                 Types In Guile.      (line 215)
-* TYPE_CODE_COMPLEX:                     Types In Python.     (line 254)
-* TYPE_CODE_DECFLOAT <1>:                Types In Guile.      (line 224)
-* TYPE_CODE_DECFLOAT:                    Types In Python.     (line 263)
-* TYPE_CODE_ENUM <1>:                    Types In Guile.      (line 162)
-* TYPE_CODE_ENUM:                        Types In Python.     (line 201)
-* TYPE_CODE_ERROR <1>:                   Types In Guile.      (line 194)
-* TYPE_CODE_ERROR:                       Types In Python.     (line 233)
-* TYPE_CODE_FLAGS <1>:                   Types In Guile.      (line 165)
-* TYPE_CODE_FLAGS:                       Types In Python.     (line 204)
-* TYPE_CODE_FLT <1>:                     Types In Guile.      (line 174)
-* TYPE_CODE_FLT:                         Types In Python.     (line 213)
-* TYPE_CODE_FUNC <1>:                    Types In Guile.      (line 168)
-* TYPE_CODE_FUNC:                        Types In Python.     (line 207)
-* TYPE_CODE_INT <1>:                     Types In Guile.      (line 171)
-* TYPE_CODE_INT:                         Types In Python.     (line 210)
-* TYPE_CODE_INTERNAL_FUNCTION <1>:       Types In Guile.      (line 227)
-* TYPE_CODE_INTERNAL_FUNCTION:           Types In Python.     (line 266)
-* TYPE_CODE_MEMBERPTR <1>:               Types In Guile.      (line 203)
-* TYPE_CODE_MEMBERPTR:                   Types In Python.     (line 242)
-* TYPE_CODE_METHOD <1>:                  Types In Guile.      (line 197)
-* TYPE_CODE_METHOD:                      Types In Python.     (line 236)
-* TYPE_CODE_METHODPTR <1>:               Types In Guile.      (line 200)
-* TYPE_CODE_METHODPTR:                   Types In Python.     (line 239)
-* TYPE_CODE_NAMESPACE <1>:               Types In Guile.      (line 221)
-* TYPE_CODE_NAMESPACE:                   Types In Python.     (line 260)
-* TYPE_CODE_PTR <1>:                     Types In Guile.      (line 150)
-* TYPE_CODE_PTR:                         Types In Python.     (line 189)
-* TYPE_CODE_RANGE <1>:                   Types In Guile.      (line 183)
-* TYPE_CODE_RANGE:                       Types In Python.     (line 222)
-* TYPE_CODE_REF <1>:                     Types In Guile.      (line 206)
-* TYPE_CODE_REF:                         Types In Python.     (line 245)
-* TYPE_CODE_SET <1>:                     Types In Guile.      (line 180)
-* TYPE_CODE_SET:                         Types In Python.     (line 219)
-* TYPE_CODE_STRING <1>:                  Types In Guile.      (line 186)
-* TYPE_CODE_STRING:                      Types In Python.     (line 225)
-* TYPE_CODE_STRUCT <1>:                  Types In Guile.      (line 156)
-* TYPE_CODE_STRUCT:                      Types In Python.     (line 195)
-* TYPE_CODE_TYPEDEF <1>:                 Types In Guile.      (line 218)
-* TYPE_CODE_TYPEDEF:                     Types In Python.     (line 257)
-* TYPE_CODE_UNION <1>:                   Types In Guile.      (line 159)
-* TYPE_CODE_UNION:                       Types In Python.     (line 198)
-* TYPE_CODE_VOID <1>:                    Types In Guile.      (line 177)
-* TYPE_CODE_VOID:                        Types In Python.     (line 216)
-* u (SingleKey TUI key):                 TUI Single Key Mode. (line  31)
-* u (until):                             Continuing and Stepping.
-                                                              (line 119)
-* undefined-command-error-code:          GDB/MI Support Commands.
-                                                              (line 111)
-* undisplay:                             Auto Display.        (line  45)
-* undo (C-_ or C-x C-u):                 Miscellaneous Commands.
-                                                              (line  22)
-* universal-argument ():                 Numeric Arguments.   (line  10)
-* unix-filename-rubout ():               Commands For Killing.
-                                                              (line  32)
-* unix-line-discard (C-u):               Commands For Killing.
-                                                              (line  12)
-* unix-word-rubout (C-w):                Commands For Killing.
-                                                              (line  28)
-* unset environment:                     Environment.         (line  61)
-* unset substitute-path:                 Source Path.         (line 156)
-* until:                                 Continuing and Stepping.
-                                                              (line 119)
-* until&:                                Background Execution.
-                                                              (line  46)
-* unwind-stop-reason-string:             Frames In Guile.     (line 165)
-* Up:                                    TUI Keys.            (line  53)
-* up:                                    Selection.           (line  35)
-* up-silently:                           Selection.           (line  64)
-* upcase-word (M-u):                     Commands For Text.   (line  41)
-* update:                                TUI Commands.        (line  99)
-* upload, M32R:                          M32R/D.              (line  34)
-* use_dbt_break:                         M32R/D.              (line  64)
-* use_debug_dma:                         M32R/D.              (line  53)
-* use_ib_break:                          M32R/D.              (line  61)
-* use_mon_code:                          M32R/D.              (line  57)
-* v (SingleKey TUI key):                 TUI Single Key Mode. (line  34)
-* value->bool:                           Values From Inferior In Guile.
-                                                              (line 236)
-* value->bytevector:                     Values From Inferior In Guile.
-                                                              (line 248)
-* value->integer:                        Values From Inferior In Guile.
-                                                              (line 240)
-* value->lazy-string:                    Values From Inferior In Guile.
-                                                              (line 294)
-* value->real:                           Values From Inferior In Guile.
-                                                              (line 244)
-* value->string:                         Values From Inferior In Guile.
-                                                              (line 253)
-* value-abs:                             Arithmetic In Guile. (line  36)
-* value-add:                             Arithmetic In Guile. (line  16)
-* value-address:                         Values From Inferior In Guile.
-                                                              (line 108)
-* value-call:                            Values From Inferior In Guile.
-                                                              (line 230)
-* value-cast:                            Values From Inferior In Guile.
-                                                              (line 131)
-* value-dereference:                     Values From Inferior In Guile.
-                                                              (line 145)
-* value-div:                             Arithmetic In Guile. (line  22)
-* value-dynamic-cast:                    Values From Inferior In Guile.
-                                                              (line 137)
-* value-dynamic-type:                    Values From Inferior In Guile.
-                                                              (line 116)
-* value-fetch-lazy!:                     Values From Inferior In Guile.
-                                                              (line 335)
-* value-field:                           Values From Inferior In Guile.
-                                                              (line 223)
-* value-lazy?:                           Values From Inferior In Guile.
-                                                              (line 318)
-* value-logand:                          Arithmetic In Guile. (line  48)
-* value-logior:                          Arithmetic In Guile. (line  50)
-* value-lognot:                          Arithmetic In Guile. (line  46)
-* value-logxor:                          Arithmetic In Guile. (line  52)
-* value-lsh:                             Arithmetic In Guile. (line  38)
-* value-max:                             Arithmetic In Guile. (line  44)
-* value-min:                             Arithmetic In Guile. (line  42)
-* value-mod:                             Arithmetic In Guile. (line  26)
-* value-mul:                             Arithmetic In Guile. (line  20)
-* value-neg:                             Arithmetic In Guile. (line  32)
-* value-not:                             Arithmetic In Guile. (line  30)
-* value-optimized-out?:                  Values From Inferior In Guile.
-                                                              (line 104)
-* value-pos:                             Arithmetic In Guile. (line  34)
-* value-pow:                             Arithmetic In Guile. (line  28)
-* value-print:                           Values From Inferior In Guile.
-                                                              (line 344)
-* value-referenced-value:                Values From Inferior In Guile.
-                                                              (line 198)
-* value-reinterpret-cast:                Values From Inferior In Guile.
-                                                              (line 141)
-* value-rem:                             Arithmetic In Guile. (line  24)
-* value-rsh:                             Arithmetic In Guile. (line  40)
-* value-sub:                             Arithmetic In Guile. (line  18)
-* value-subscript:                       Values From Inferior In Guile.
-                                                              (line 226)
-* value-type:                            Values From Inferior In Guile.
-                                                              (line 112)
-* Value.__init__:                        Values From Inferior.
-                                                              (line 108)
-* Value.address:                         Values From Inferior.
-                                                              (line  66)
-* Value.cast:                            Values From Inferior.
-                                                              (line 142)
-* Value.const_value:                     Values From Inferior.
-                                                              (line 230)
-* Value.dereference:                     Values From Inferior.
-                                                              (line 148)
-* Value.dynamic_cast:                    Values From Inferior.
-                                                              (line 234)
-* Value.dynamic_type:                    Values From Inferior.
-                                                              (line  80)
-* Value.fetch_lazy:                      Values From Inferior.
-                                                              (line 296)
-* Value.is_lazy:                         Values From Inferior.
-                                                              (line  95)
-* Value.is_optimized_out:                Values From Inferior.
-                                                              (line  71)
-* Value.lazy_string:                     Values From Inferior.
-                                                              (line 274)
-* Value.reference_value:                 Values From Inferior.
-                                                              (line 226)
-* Value.referenced_value:                Values From Inferior.
-                                                              (line 201)
-* Value.reinterpret_cast:                Values From Inferior.
-                                                              (line 238)
-* Value.string:                          Values From Inferior.
-                                                              (line 242)
-* Value.type:                            Values From Inferior.
-                                                              (line  76)
-* value<=?:                              Arithmetic In Guile. (line  58)
-* value<?:                               Arithmetic In Guile. (line  56)
-* value=?:                               Arithmetic In Guile. (line  54)
-* value>=?:                              Arithmetic In Guile. (line  62)
-* value>?:                               Arithmetic In Guile. (line  60)
-* value?:                                Values From Inferior In Guile.
-                                                              (line  43)
-* visible-stats:                         Readline Init File Syntax.
-                                                              (line 240)
-* w (SingleKey TUI key):                 TUI Single Key Mode. (line  37)
-* watch:                                 Set Watchpoints.     (line  42)
-* watchpoint annotation:                 Annotations for Running.
-                                                              (line  50)
-* whatis:                                Symbols.             (line 115)
-* where:                                 Backtrace.           (line  46)
-* while:                                 Command Files.       (line  86)
-* while-stepping (tracepoints):          Tracepoint Actions.  (line 118)
-* winheight:                             TUI Commands.        (line 103)
-* WP_ACCESS <1>:                         Breakpoints In Guile.
-                                                              (line  84)
-* WP_ACCESS:                             Breakpoints In Python.
-                                                              (line  71)
-* WP_READ <1>:                           Breakpoints In Guile.
-                                                              (line  78)
-* WP_READ:                               Breakpoints In Python.
-                                                              (line  65)
-* WP_WRITE <1>:                          Breakpoints In Guile.
-                                                              (line  81)
-* WP_WRITE:                              Breakpoints In Python.
-                                                              (line  68)
-* x (examine memory):                    Memory.              (line   9)
-* x(examine), and info line:             Machine Code.        (line  30)
-* XMethod.__init__:                      Xmethod API.         (line  40)
-* XMethodMatcher.__init__:               Xmethod API.         (line  45)
-* XMethodMatcher.match:                  Xmethod API.         (line  49)
-* XMethodWorker.__call__:                Xmethod API.         (line  75)
-* XMethodWorker.get_arg_types:           Xmethod API.         (line  62)
-* XMethodWorker.get_result_type:         Xmethod API.         (line  69)
-* yank (C-y):                            Commands For Killing.
-                                                              (line  59)
-* yank-last-arg (M-. or M-_):            Commands For History.
-                                                              (line  64)
-* yank-nth-arg (M-C-y):                  Commands For History.
-                                                              (line  55)
-* yank-pop (M-y):                        Commands For Killing.
-                                                              (line  62)
-
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdbinit.5 ./gdb/doc/gdbinit.5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdbinit.5	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdbinit.5	2017-03-06 01:53:28.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBINIT 5"
-.TH GDBINIT 5 "2015-07-06" "gdb-7.9.50.20150706-cvs" "GNU Development Tools"
+.TH GDBINIT 5 "2017-03-06" "gdb-7.12.50.20170306-git" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -186,7 +186,7 @@ should give you access to the complete m
 Richard M. Stallman and Roland H. Pesch, July 1991.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (c) 1988\-2015 Free Software Foundation, Inc.
+Copyright (c) 1988\-2017 Free Software Foundation, Inc.
 .PP
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdbserver.1 ./gdb/doc/gdbserver.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdbserver.1	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/gdbserver.1	2017-03-06 01:53:28.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBSERVER 1"
-.TH GDBSERVER 1 "2015-07-06" "gdb-7.9.50.20150706-cvs" "GNU Development Tools"
+.TH GDBSERVER 1 "2017-03-06" "gdb-7.12.50.20170306-git" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -354,7 +354,7 @@ should give you access to the complete m
 Richard M. Stallman and Roland H. Pesch, July 1991.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (c) 1988\-2015 Free Software Foundation, Inc.
+Copyright (c) 1988\-2017 Free Software Foundation, Inc.
 .PP
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.texinfo ./gdb/doc/gdb.texinfo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/gdb.texinfo	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/gdb.texinfo	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 \input texinfo      @c -*-texinfo-*-
-@c Copyright (C) 1988-2015 Free Software Foundation, Inc.
+@c Copyright (C) 1988-2017 Free Software Foundation, Inc.
 @c
 @c %**start of header
 @c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
@@ -50,7 +50,7 @@
 
 @copying
 @c man begin COPYRIGHT
-Copyright @copyright{} 1988-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1988-2017 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -120,7 +120,7 @@ This is the @value{EDITION} Edition, for
 @end ifset
 Version @value{GDBVN}.
 
-Copyright (C) 1988-2015 Free Software Foundation, Inc.
+Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
 This edition of the GDB manual is dedicated to the memory of Fred
 Fish.  Fred was a long-standing contributor to GDB and to Free
@@ -541,6 +541,11 @@ Steve Tjiang, John Newlin, and Scott Foe
 Michael Eager and staff of Xilinx, Inc., contributed support for the
 Xilinx MicroBlaze architecture.
 
+Initial support for the FreeBSD/mips target and native configuration
+was developed by SRI International and the University of Cambridge
+Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+("CTSRD"), as part of the DARPA CRASH research programme.
+
 @node Sample Session
 @chapter A Sample @value{GDBN} Session
 
@@ -2499,9 +2504,11 @@ display the name of the terminal that wi
 program.
 
 @table @code
-@item set inferior-tty /dev/ttyb
+@item set inferior-tty [ @var{tty} ]
 @kindex set inferior-tty
-Set the tty for the program being debugged to /dev/ttyb.
+Set the tty for the program being debugged to @var{tty}.  Omitting @var{tty}
+restores the default behavior, which is to use the same terminal as
+@value{GDBN}.
 
 @item show inferior-tty
 @kindex show inferior-tty
@@ -2658,6 +2665,12 @@ Make inferior number @var{infno} the cur
 in the first field of the @samp{info inferiors} display.
 @end table
 
+@vindex $_inferior@r{, convenience variable}
+The debugger convenience variable @samp{$_inferior} contains the
+number of the current inferior.  You may find this useful in writing
+breakpoint conditional expressions, command scripts, and so forth.
+@xref{Convenience Vars,, Convenience Variables}, for general
+information on convenience variables.
 
 You can get multiple executables into a debugging session via the
 @code{add-inferior} and @w{@code{clone-inferior}} commands.  On some
@@ -2791,9 +2804,9 @@ example, the list of inferiors bound to 
 @smallexample
 (@value{GDBP}) maint info program-spaces
   Id   Executable
+* 1    hello
   2    goodbye
         Bound inferiors: ID 1 (process 21561)
-* 1    hello
 @end smallexample
 
 Here we can see that no inferior is running the program @code{hello},
@@ -2819,7 +2832,7 @@ space as a result of inferior 1 having e
 @cindex threads of execution
 @cindex multiple threads
 @cindex switching threads
-In some operating systems, such as HP-UX and Solaris, a single program
+In some operating systems, such as GNU/Linux and Solaris, a single program
 may have more than one @dfn{thread} of execution.  The precise semantics
 of threads differ from one operating system to another, but in general
 the threads of a single program are akin to multiple processes---except
@@ -2832,9 +2845,9 @@ programs:
 
 @itemize @bullet
 @item automatic notification of new threads
-@item @samp{thread @var{threadno}}, a command to switch among threads
+@item @samp{thread @var{thread-id}}, a command to switch among threads
 @item @samp{info threads}, a command to inquire about existing threads
-@item @samp{thread apply [@var{threadno}] [@var{all}] @var{args}},
+@item @samp{thread apply [@var{thread-id-list}] [@var{all}] @var{args}},
 a command to apply a command to a list of threads
 @item thread-specific breakpoints
 @item @samp{set print thread-events}, which controls printing of 
@@ -2844,24 +2857,6 @@ the user specify which @code{libthread_d
 isn't compatible with the program.
 @end itemize
 
-@quotation
-@emph{Warning:} These facilities are not yet available on every
-@value{GDBN} configuration where the operating system supports threads.
-If your @value{GDBN} does not support threads, these commands have no
-effect.  For example, a system without thread support shows no output
-from @samp{info threads}, and always rejects the @code{thread} command,
-like this:
-
-@smallexample
-(@value{GDBP}) info threads
-(@value{GDBP}) thread 1
-Thread ID 1 not known.  Use the "info threads" command to
-see the IDs of currently known threads.
-@end smallexample
-@c FIXME to implementors: how hard would it be to say "sorry, this GDB
-@c                        doesn't support threads"?
-@end quotation
-
 @cindex focus of debugging
 @cindex current thread
 The @value{GDBN} thread debugging facility allows you to observe all
@@ -2886,7 +2881,7 @@ whose form varies depending on the parti
 @end smallexample
 
 @noindent
-when @value{GDBN} notices a new thread.  In contrast, on an SGI system,
+when @value{GDBN} notices a new thread.  In contrast, on other systems,
 the @var{systag} is simply something like @samp{process 368}, with no
 further qualifier.
 
@@ -2898,22 +2893,116 @@ further qualifier.
 @c         multithread systems permit starting a program with multiple
 @c         threads ab initio?
 
-@cindex thread number
+@anchor{thread numbers}
+@cindex thread number, per inferior
 @cindex thread identifier (GDB)
-For debugging purposes, @value{GDBN} associates its own thread
-number---always a single integer---with each thread in your program.
+For debugging purposes, @value{GDBN} associates its own thread number
+---always a single integer---with each thread of an inferior.  This
+number is unique between all threads of an inferior, but not unique
+between threads of different inferiors.
+
+@cindex qualified thread ID
+You can refer to a given thread in an inferior using the qualified
+@var{inferior-num}.@var{thread-num} syntax, also known as
+@dfn{qualified thread ID}, with @var{inferior-num} being the inferior
+number and @var{thread-num} being the thread number of the given
+inferior.  For example, thread @code{2.3} refers to thread number 3 of
+inferior 2.  If you omit @var{inferior-num} (e.g., @code{thread 3}),
+then @value{GDBN} infers you're referring to a thread of the current
+inferior.
+
+Until you create a second inferior, @value{GDBN} does not show the
+@var{inferior-num} part of thread IDs, even though you can always use
+the full @var{inferior-num}.@var{thread-num} form to refer to threads
+of inferior 1, the initial inferior.
+
+@anchor{thread ID lists}
+@cindex thread ID lists
+Some commands accept a space-separated @dfn{thread ID list} as
+argument.  A list element can be:
+
+@enumerate
+@item
+A thread ID as shown in the first field of the @samp{info threads}
+display, with or without an inferior qualifier.  E.g., @samp{2.1} or
+@samp{1}.
+
+@item
+A range of thread numbers, again with or without an inferior
+qualifier, as in @var{inf}.@var{thr1}-@var{thr2} or
+@var{thr1}-@var{thr2}.  E.g., @samp{1.2-4} or @samp{2-4}.
+
+@item
+All threads of an inferior, specified with a star wildcard, with or
+without an inferior qualifier, as in @var{inf}.@code{*} (e.g.,
+@samp{1.*}) or @code{*}.  The former refers to all threads of the
+given inferior, and the latter form without an inferior qualifier
+refers to all threads of the current inferior.
+
+@end enumerate
+
+For example, if the current inferior is 1, and inferior 7 has one
+thread with ID 7.1, the thread list @samp{1 2-3 4.5 6.7-9 7.*}
+includes threads 1 to 3 of inferior 1, thread 5 of inferior 4, threads
+7 to 9 of inferior 6 and all threads of inferior 7.  That is, in
+expanded qualified form, the same as @samp{1.1 1.2 1.3 4.5 6.7 6.8 6.9
+7.1}.
+
+
+@anchor{global thread numbers}
+@cindex global thread number
+@cindex global thread identifier (GDB)
+In addition to a @emph{per-inferior} number, each thread is also
+assigned a unique @emph{global} number, also known as @dfn{global
+thread ID}, a single integer.  Unlike the thread number component of
+the thread ID, no two threads have the same global ID, even when
+you're debugging multiple inferiors.
+
+From @value{GDBN}'s perspective, a process always has at least one
+thread.  In other words, @value{GDBN} assigns a thread number to the
+program's ``main thread'' even if the program is not multi-threaded.
+
+@vindex $_thread@r{, convenience variable}
+@vindex $_gthread@r{, convenience variable}
+The debugger convenience variables @samp{$_thread} and
+@samp{$_gthread} contain, respectively, the per-inferior thread number
+and the global thread number of the current thread.  You may find this
+useful in writing breakpoint conditional expressions, command scripts,
+and so forth.  @xref{Convenience Vars,, Convenience Variables}, for
+general information on convenience variables.
+
+If @value{GDBN} detects the program is multi-threaded, it augments the
+usual message about stopping at a breakpoint with the ID and name of
+the thread that hit the breakpoint.
+
+@smallexample
+Thread 2 "client" hit Breakpoint 1, send_message () at client.c:68
+@end smallexample
+
+Likewise when the program receives a signal:
+
+@smallexample
+Thread 1 "main" received signal SIGINT, Interrupt.
+@end smallexample
 
 @table @code
 @kindex info threads
-@item info threads @r{[}@var{id}@dots{}@r{]}
-Display a summary of all threads currently in your program.  Optional 
-argument @var{id}@dots{} is one or more thread ids separated by spaces, and
-means to print information only about the specified thread or threads.
+@item info threads @r{[}@var{thread-id-list}@r{]}
+
+Display information about one or more threads.  With no arguments
+displays information about all threads.  You can specify the list of
+threads that you want to display using the thread ID list syntax
+(@pxref{thread ID lists}).
+
 @value{GDBN} displays for each thread (in this order):
 
 @enumerate
 @item
-the thread number assigned by @value{GDBN}
+the per-inferior thread number assigned by @value{GDBN}
+
+@item
+the global thread number assigned by @value{GDBN}, if the @samp{-gid}
+option was specified
 
 @item
 the target system's thread identifier (@var{systag})
@@ -2938,12 +3027,28 @@ For example,
 @smallexample
 (@value{GDBP}) info threads
   Id   Target Id         Frame
-  3    process 35 thread 27  0x34e5 in sigpause ()
-  2    process 35 thread 23  0x34e5 in sigpause ()
 * 1    process 35 thread 13  main (argc=1, argv=0x7ffffff8)
+  2    process 35 thread 23  0x34e5 in sigpause ()
+  3    process 35 thread 27  0x34e5 in sigpause ()
     at threadtest.c:68
 @end smallexample
 
+If you're debugging multiple inferiors, @value{GDBN} displays thread
+IDs using the qualified @var{inferior-num}.@var{thread-num} format.
+Otherwise, only @var{thread-num} is shown.
+
+If you specify the @samp{-gid} option, @value{GDBN} displays a column
+indicating each thread's global thread ID:
+
+@smallexample
+(@value{GDBP}) info threads
+  Id   GId  Target Id             Frame
+  1.1  1    process 35 thread 13  main (argc=1, argv=0x7ffffff8)
+  1.2  3    process 35 thread 23  0x34e5 in sigpause ()
+  1.3  4    process 35 thread 27  0x34e5 in sigpause ()
+* 2.1  2    process 65 thread 1   main (argc=1, argv=0x7ffffff8)
+@end smallexample
+
 On Solaris, you can display more information about user threads with a
 Solaris-specific command:
 
@@ -2955,13 +3060,15 @@ Display info on Solaris user threads.
 @end table
 
 @table @code
-@kindex thread @var{threadno}
-@item thread @var{threadno}
-Make thread number @var{threadno} the current thread.  The command
-argument @var{threadno} is the internal @value{GDBN} thread number, as
-shown in the first field of the @samp{info threads} display.
-@value{GDBN} responds by displaying the system identifier of the thread
-you selected, and its current stack frame summary:
+@kindex thread @var{thread-id}
+@item thread @var{thread-id}
+Make thread ID @var{thread-id} the current thread.  The command
+argument @var{thread-id} is the @value{GDBN} thread ID, as shown in
+the first field of the @samp{info threads} display, with or without an
+inferior qualifier (e.g., @samp{2.1} or @samp{1}).
+
+@value{GDBN} responds by displaying the system identifier of the
+thread you selected, and its current stack frame summary:
 
 @smallexample
 (@value{GDBP}) thread 2
@@ -2975,23 +3082,14 @@ As with the @samp{[New @dots{}]} message
 @samp{Switching to} depends on your system's conventions for identifying
 threads.
 
-@vindex $_thread@r{, convenience variable}
-The debugger convenience variable @samp{$_thread} contains the number
-of the current thread.  You may find this useful in writing breakpoint
-conditional expressions, command scripts, and so forth.  See
-@xref{Convenience Vars,, Convenience Variables}, for general
-information on convenience variables.
-
 @kindex thread apply
 @cindex apply command to several threads
-@item thread apply [@var{threadno} | all [-ascending]] @var{command}
+@item thread apply [@var{thread-id-list} | all [-ascending]] @var{command}
 The @code{thread apply} command allows you to apply the named
-@var{command} to one or more threads.  Specify the numbers of the
-threads that you want affected with the command argument
-@var{threadno}.  It can be a single thread number, one of the numbers
-shown in the first field of the @samp{info threads} display; or it
-could be a range of thread numbers, as in @code{2-4}.  To apply
-a command to all threads in descending order, type @kbd{thread apply all
+@var{command} to one or more threads.  Specify the threads that you
+want affected using the thread ID list syntax (@pxref{thread ID
+lists}), or specify @code{all} to apply to all threads.  To apply a
+command to all threads in descending order, type @kbd{thread apply all
 @var{command}}.  To apply a command to all threads in ascending order,
 type @kbd{thread apply all -ascending @var{command}}.
 
@@ -3130,13 +3228,14 @@ get its process ID.  Then tell @value{GD
 the child process (@pxref{Attach}).  From that point on you can debug
 the child process just like any other process which you attached to.
 
-On some systems, @value{GDBN} provides support for debugging programs that
-create additional processes using the @code{fork} or @code{vfork} functions.
-Currently, the only platforms with this feature are HP-UX (11.x and later
-only?) and @sc{gnu}/Linux (kernel version 2.5.60 and later).
-
-The fork debugging commands are supported in both native mode and when
-connected to @code{gdbserver} using @kbd{target extended-remote}.
+On some systems, @value{GDBN} provides support for debugging programs
+that create additional processes using the @code{fork} or @code{vfork}
+functions.  On @sc{gnu}/Linux platforms, this feature is supported
+with kernel version 2.5.46 and later.
+
+The fork debugging commands are supported in native mode and when
+connected to @code{gdbserver} in either @code{target remote} mode or
+@code{target extended-remote} mode.
 
 By default, when a program forks, @value{GDBN} will continue to debug
 the parent process and the child process will run unimpeded.
@@ -3254,8 +3353,8 @@ process 12020 is executing new program: 
 Program exited normally.
 (@value{GDBP}) info inferiors
   Id   Description   Executable
-* 2    <null>        prog2
   1    <null>        prog1
+* 2    <null>        prog2
 @end smallexample
 
 @item same
@@ -3282,6 +3381,9 @@ Program exited normally.
 @end table
 @end table
 
+@code{follow-exec-mode} is supported in native mode and
+@code{target extended-remote} mode.
+
 You can use the @code{catch} command to make @value{GDBN} stop whenever
 a @code{fork}, @code{vfork}, or @code{exec} call is made.  @xref{Set
 Catchpoints, ,Setting Catchpoints}.
@@ -3444,11 +3546,7 @@ should stop by line number, function nam
 program.
 
 On some systems, you can set breakpoints in shared libraries before
-the executable is run.  There is a minor limitation on HP-UX systems:
-you must wait until the executable is run in order to set breakpoints
-in shared library routines that are not called directly by the program
-(for example, routines that are arguments in a @code{pthread_create}
-call).
+the executable is run.
 
 @cindex watchpoints
 @cindex data breakpoints
@@ -3490,12 +3588,14 @@ breakpoint you want to change.  Each bre
 enable it again.
 
 @cindex breakpoint ranges
+@cindex breakpoint lists
 @cindex ranges of breakpoints
-Some @value{GDBN} commands accept a range of breakpoints on which to
-operate.  A breakpoint range is either a single breakpoint number, like
-@samp{5}, or two such numbers, in increasing order, separated by a
-hyphen, like @samp{5-7}.  When a breakpoint range is given to a command,
-all breakpoints in that range are operated on.
+@cindex lists of breakpoints
+Some @value{GDBN} commands accept a space-separated list of breakpoints
+on which to operate.  A list element can be either a single breakpoint number,
+like @samp{5}, or a range of such numbers, like @samp{5-7}.
+When a breakpoint list is given to a command, all breakpoints in that list
+are operated on.
 
 @menu
 * Set Breaks::                  Setting breakpoints
@@ -3660,8 +3760,8 @@ optionally be surrounded by spaces.
 
 @kindex info breakpoints
 @cindex @code{$_} and @code{info breakpoints}
-@item info breakpoints @r{[}@var{n}@dots{}@r{]}
-@itemx info break @r{[}@var{n}@dots{}@r{]}
+@item info breakpoints @r{[}@var{list}@dots{}@r{]}
+@itemx info break @r{[}@var{list}@dots{}@r{]}
 Print a table of all breakpoints, watchpoints, and catchpoints set and
 not deleted.  Optional argument @var{n} means print information only
 about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)).
@@ -3849,7 +3949,7 @@ breakpoints set by commands like @code{n
 breakpoints set with @code{hbreak}, @value{GDBN} will always use hardware
 breakpoints.
 
-You can control this automatic behaviour with the following commands::
+You can control this automatic behaviour with the following commands:
 
 @kindex set breakpoint auto-hw
 @kindex show breakpoint auto-hw
@@ -3985,13 +4085,13 @@ times slower than normal execution.  (Bu
 catch errors where you have no clue what part of your program is the
 culprit.)
 
-On some systems, such as HP-UX, PowerPC, @sc{gnu}/Linux and most other
-x86-based targets, @value{GDBN} includes support for hardware
-watchpoints, which do not slow down the running of your program.
+On some systems, such as most PowerPC or x86-based targets,
+@value{GDBN} includes support for hardware watchpoints, which do not
+slow down the running of your program.
 
 @table @code
 @kindex watch
-@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
+@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{thread-id}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint for an expression.  @value{GDBN} will break when the
 expression @var{expr} is written into by the program and its value
 changes.  The simplest (and the most popular) use of this command is
@@ -4001,9 +4101,9 @@ to watch the value of a single variable:
 (@value{GDBP}) watch foo
 @end smallexample
 
-If the command includes a @code{@r{[}thread @var{threadnum}@r{]}}
+If the command includes a @code{@r{[}thread @var{thread-id}@r{]}}
 argument, @value{GDBN} breaks only when the thread identified by
-@var{threadnum} changes the value of @var{expr}.  If any other threads
+@var{thread-id} changes the value of @var{expr}.  If any other threads
 change the value of @var{expr}, @value{GDBN} will not break.  Note
 that watchpoints restricted to a single thread in this way only work
 with Hardware Watchpoints.
@@ -4035,17 +4135,17 @@ Examples:
 @end smallexample
 
 @kindex rwatch
-@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
+@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{thread-id}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint that will break when the value of @var{expr} is read
 by the program.
 
 @kindex awatch
-@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
+@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{thread-id}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint that will break when @var{expr} is either read from
 or written into by the program.
 
-@kindex info watchpoints @r{[}@var{n}@dots{}@r{]}
-@item info watchpoints @r{[}@var{n}@dots{}@r{]}
+@kindex info watchpoints @r{[}@var{list}@dots{}@r{]}
+@item info watchpoints @r{[}@var{list}@dots{}@r{]}
 This command prints a list of watchpoints, using the same format as
 @code{info break} (@pxref{Set Breaks}).
 @end table
@@ -4281,11 +4381,10 @@ A failed Ada assertion.
 @item exec
 @kindex catch exec
 @cindex break on fork/exec
-A call to @code{exec}.  This is currently only available for HP-UX
-and @sc{gnu}/Linux.
+A call to @code{exec}.
 
 @item syscall
-@itemx syscall @r{[}@var{name} @r{|} @var{number}@r{]} @dots{} 
+@itemx syscall @r{[}@var{name} @r{|} @var{number} @r{|} @r{group:}@var{groupname} @r{|} @r{g:}@var{groupname}@r{]} @dots{}
 @kindex catch syscall
 @cindex break on a system call.
 A call to or return from a system call, a.k.a.@: @dfn{syscall}.  A
@@ -4320,6 +4419,15 @@ may be useful if @value{GDBN}'s database
 list of syscalls on your system (e.g., because @value{GDBN} lags
 behind the OS upgrades).
 
+You may specify a group of related syscalls to be caught at once using
+the @code{group:} syntax (@code{g:} is a shorter equivalent).  For
+instance, on some platforms @value{GDBN} allows you to catch all
+network related syscalls, by passing the argument @code{group:network}
+to @code{catch syscall}.  Note that not all syscall groups are
+available in every system.  You can use the command completion
+facilities (@pxref{Completion,, command completion}) to list the
+syscall groups available on your environment.
+
 The example below illustrates how this command works if you don't provide
 arguments to it:
 
@@ -4376,6 +4484,23 @@ Program exited normally.
 (@value{GDBP})
 @end smallexample
 
+Here is an example of catching a syscall group:
+
+@smallexample
+(@value{GDBP}) catch syscall group:process
+Catchpoint 1 (syscalls 'exit' [1] 'fork' [2] 'waitpid' [7]
+'execve' [11] 'wait4' [114] 'clone' [120] 'vfork' [190]
+'exit_group' [252] 'waitid' [284] 'unshare' [310])
+(@value{GDBP}) r
+Starting program: /tmp/catch-syscall
+
+Catchpoint 1 (call to syscall fork), 0x00007ffff7df4e27 in open64 ()
+   from /lib64/ld-linux-x86-64.so.2
+
+(@value{GDBP}) c
+Continuing.
+@end smallexample
+
 However, there can be situations when there is no corresponding name
 in XML file for that syscall number.  In this case, @value{GDBN} prints
 a warning message saying that it was not able to find the syscall name,
@@ -4418,13 +4543,11 @@ Again, in this case @value{GDBN} would n
 
 @item fork
 @kindex catch fork
-A call to @code{fork}.  This is currently only available for HP-UX
-and @sc{gnu}/Linux.
+A call to @code{fork}.
 
 @item vfork
 @kindex catch vfork
-A call to @code{vfork}.  This is currently only available for HP-UX
-and @sc{gnu}/Linux.
+A call to @code{vfork}.
 
 @item load @r{[}regexp@r{]}
 @itemx unload @r{[}regexp@r{]}
@@ -4518,9 +4641,9 @@ Delete any breakpoints set at or within 
 @cindex delete breakpoints
 @kindex delete
 @kindex d @r{(@code{delete})}
-@item delete @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
+@item delete @r{[}breakpoints@r{]} @r{[}@var{list}@dots{}@r{]}
 Delete the breakpoints, watchpoints, or catchpoints of the breakpoint
-ranges specified as arguments.  If no argument is specified, delete all
+list specified as argument.  If no argument is specified, delete all
 breakpoints (@value{GDBN} asks confirmation, unless you have @code{set
 confirm off}).  You can abbreviate this command as @code{d}.
 @end table
@@ -4570,7 +4693,7 @@ watchpoints, and catchpoints:
 @table @code
 @kindex disable
 @kindex dis @r{(@code{disable})}
-@item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
+@item disable @r{[}breakpoints@r{]} @r{[}@var{list}@dots{}@r{]}
 Disable the specified breakpoints---or all breakpoints, if none are
 listed.  A disabled breakpoint has no effect but is not forgotten.  All
 options such as ignore-counts, conditions and commands are remembered in
@@ -4578,15 +4701,15 @@ case the breakpoint is enabled again lat
 @code{disable} as @code{dis}.
 
 @kindex enable
-@item enable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
+@item enable @r{[}breakpoints@r{]} @r{[}@var{list}@dots{}@r{]}
 Enable the specified breakpoints (or all defined breakpoints).  They
 become effective once again in stopping your program.
 
-@item enable @r{[}breakpoints@r{]} once @var{range}@dots{}
+@item enable @r{[}breakpoints@r{]} once @var{list}@dots{}
 Enable the specified breakpoints temporarily.  @value{GDBN} disables any
 of these breakpoints immediately after stopping your program.
 
-@item enable @r{[}breakpoints@r{]} count @var{count} @var{range}@dots{}
+@item enable @r{[}breakpoints@r{]} count @var{count} @var{list}@dots{}
 Enable the specified breakpoints temporarily.  @value{GDBN} records
 @var{count} with each of the specified breakpoints, and decrements a
 breakpoint's count when it is hit.  When any count reaches 0,
@@ -4594,7 +4717,7 @@ breakpoint's count when it is hit.  When
 count (@pxref{Conditions, ,Break Conditions}), that will be
 decremented to 0 before @var{count} is affected.
 
-@item enable @r{[}breakpoints@r{]} delete @var{range}@dots{}
+@item enable @r{[}breakpoints@r{]} delete @var{list}@dots{}
 Enable the specified breakpoints to work once, then die.  @value{GDBN}
 deletes any of these breakpoints as soon as your program stops there.
 Breakpoints set by the @code{tbreak} command start out in this state.
@@ -4752,7 +4875,7 @@ enable other breakpoints.
 @table @code
 @kindex commands
 @kindex end@r{ (breakpoint commands)}
-@item commands @r{[}@var{range}@dots{}@r{]}
+@item commands @r{[}@var{list}@dots{}@r{]}
 @itemx @dots{} @var{command-list} @dots{}
 @itemx end
 Specify a list of commands for the given breakpoints.  The commands
@@ -4865,6 +4988,7 @@ dynamic printfs immediately.  (If you ne
 print commands, simply define normal breakpoints with
 explicitly-supplied command lists.)
 
+@table @code
 @item gdb
 @kindex dprintf-style gdb
 Handle the output using the @value{GDBN} @code{printf} command.
@@ -4879,6 +5003,7 @@ Handle the output by calling a function 
 Have the remote debugging agent (such as @code{gdbserver}) handle
 the output itself.  This style is only available for agents that
 support running commands on the target.
+@end table
 
 @item set dprintf-function @var{function}
 Set the function to call if the dprintf style is @code{call}.  By
@@ -5439,8 +5564,9 @@ default is @code{on}.
 @cindex skipping over functions and files
 
 The program you are debugging may contain some functions which are
-uninteresting to debug.  The @code{skip} comand lets you tell @value{GDBN} to
-skip a function or all functions in a file when stepping.
+uninteresting to debug.  The @code{skip} command lets you tell @value{GDBN} to
+skip a function, all functions in a file or a particular function in
+a particular file when stepping.
 
 For example, consider the following C function:
 
@@ -5467,13 +5593,75 @@ A more flexible solution is to execute @
 @code{step} at line 103, you'll step over @code{boring} and directly into
 @code{foo}.
 
-You can also instruct @value{GDBN} to skip all functions in a file, with, for
-example, @code{skip file boring.c}.
+Functions may be skipped by providing either a function name, linespec
+(@pxref{Specify Location}), regular expression that matches the function's
+name, file name or a @code{glob}-style pattern that matches the file name.
+
+On Posix systems the form of the regular expression is
+``Extended Regular Expressions''.  See for example @samp{man 7 regex}
+on @sc{gnu}/Linux systems.  On non-Posix systems the form of the regular
+expression is whatever is provided by the @code{regcomp} function of
+the underlying system.
+See for example @samp{man 7 glob} on @sc{gnu}/Linux systems for a
+description of @code{glob}-style patterns.
 
 @table @code
+@kindex skip
+@item skip @r{[}@var{options}@r{]}
+The basic form of the @code{skip} command takes zero or more options
+that specify what to skip.
+The @var{options} argument is any useful combination of the following:
+
+@table @code
+@item -file @var{file}
+@itemx -fi @var{file}
+Functions in @var{file} will be skipped over when stepping.
+
+@item -gfile @var{file-glob-pattern}
+@itemx -gfi @var{file-glob-pattern}
+@cindex skipping over files via glob-style patterns
+Functions in files matching @var{file-glob-pattern} will be skipped
+over when stepping.
+
+@smallexample
+(gdb) skip -gfi utils/*.c
+@end smallexample
+
+@item -function @var{linespec}
+@itemx -fu @var{linespec}
+Functions named by @var{linespec} or the function containing the line
+named by @var{linespec} will be skipped over when stepping.
+@xref{Specify Location}.
+
+@item -rfunction @var{regexp}
+@itemx -rfu @var{regexp}
+@cindex skipping over functions via regular expressions
+Functions whose name matches @var{regexp} will be skipped over when stepping.
+
+This form is useful for complex function names.
+For example, there is generally no need to step into C@t{++} @code{std::string}
+constructors or destructors.  Plus with C@t{++} templates it can be hard to
+write out the full name of the function, and often it doesn't matter what
+the template arguments are.  Specifying the function to be skipped as a
+regular expression makes this easier.
+
+@smallexample
+(gdb) skip -rfu ^std::(allocator|basic_string)<.*>::~?\1 *\(
+@end smallexample
+
+If you want to skip every templated C@t{++} constructor and destructor
+in the @code{std} namespace you can do:
+
+@smallexample
+(gdb) skip -rfu ^std::([a-zA-z0-9_]+)<.*>::~?\1 *\(
+@end smallexample
+@end table
+
+If no options are specified, the function you're currently debugging
+will be skipped.
+
 @kindex skip function
-@item skip @r{[}@var{linespec}@r{]}
-@itemx skip function @r{[}@var{linespec}@r{]}
+@item skip function @r{[}@var{linespec}@r{]}
 After running this command, the function named by @var{linespec} or the
 function containing the line named by @var{linespec} will be skipped over when
 stepping.  @xref{Specify Location}.
@@ -5489,6 +5677,11 @@ will be skipped.
 After running this command, any function whose source lives in @var{filename}
 will be skipped over when stepping.
 
+@smallexample
+(gdb) skip file boring.c
+File boring.c will be skipped when stepping.
+@end smallexample
+
 If you do not specify @var{filename}, functions whose source lives in the file
 you're currently debugging will be skipped.
 @end table
@@ -5506,20 +5699,21 @@ print a table with details about all fun
 @table @emph
 @item Identifier
 A number identifying this skip.
-@item Type
-The type of this skip, either @samp{function} or @samp{file}.
 @item Enabled or Disabled
-Enabled skips are marked with @samp{y}.  Disabled skips are marked with @samp{n}.
-@item Address
-For function skips, this column indicates the address in memory of the function
-being skipped.  If you've set a function skip on a function which has not yet
-been loaded, this field will contain @samp{<PENDING>}.  Once a shared library
-which has the function is loaded, @code{info skip} will show the function's
-address here.
-@item What
-For file skips, this field contains the filename being skipped.  For functions
-skips, this field contains the function name and its line number in the file
-where it is defined.
+Enabled skips are marked with @samp{y}.
+Disabled skips are marked with @samp{n}.
+@item Glob
+If the file name is a @samp{glob} pattern this is @samp{y}.
+Otherwise it is @samp{n}.
+@item File
+The name or @samp{glob} pattern of the file to be skipped.
+If no file is specified this is @samp{<none>}.
+@item RE
+If the function name is a @samp{regular expression} this is @samp{y}.
+Otherwise it is @samp{n}.
+@item Function
+The name or regular expression of the function to skip.
+If no function is specified this is @samp{<none>}.
 @end table
 
 @kindex skip delete
@@ -5764,6 +5958,33 @@ type = struct @{
 
 Depending on target support, @code{$_siginfo} may also be writable.
 
+@cindex Intel MPX boundary violations
+@cindex boundary violations, Intel MPX
+On some targets, a @code{SIGSEGV} can be caused by a boundary
+violation, i.e., accessing an address outside of the allowed range.
+In those cases @value{GDBN} may displays additional information,
+depending on how @value{GDBN} has been told to handle the signal.
+With @code{handle stop SIGSEGV}, @value{GDBN} displays the violation
+kind: "Upper" or "Lower", the memory address accessed and the
+bounds, while with @code{handle nostop SIGSEGV} no additional
+information is displayed.
+
+The usual output of a segfault is:
+@smallexample
+Program received signal SIGSEGV, Segmentation fault
+0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
+68        value = *(p + len);
+@end smallexample
+
+While a bound violation is presented as:
+@smallexample
+Program received signal SIGSEGV, Segmentation fault
+Upper bound violation while accessing address 0x7fffffffc3b3
+Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
+0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
+68        value = *(p + len);
+@end smallexample
+
 @node Thread Stops
 @section Stopping and Starting Multi-thread Programs
 
@@ -5836,17 +6057,20 @@ locking the OS scheduler to allow only a
 @item set scheduler-locking @var{mode}
 @cindex scheduler locking mode
 @cindex lock scheduler
-Set the scheduler locking mode.  If it is @code{off}, then there is no
-locking and any thread may run at any time.  If @code{on}, then only the
-current thread may run when the inferior is resumed.  The @code{step}
-mode optimizes for single-stepping; it prevents other threads 
-from preempting the current thread while you are stepping, so that 
-the focus of debugging does not change unexpectedly.
-Other threads never get a chance to run when you step, and they are
-completely free to run when you use commands
-like @samp{continue}, @samp{until}, or @samp{finish}.  However, unless another
-thread hits a breakpoint during its timeslice, @value{GDBN} does not change
-the current thread away from the thread that you are debugging.
+Set the scheduler locking mode.  It applies to normal execution,
+record mode, and replay mode.  If it is @code{off}, then there is no
+locking and any thread may run at any time.  If @code{on}, then only
+the current thread may run when the inferior is resumed.  The
+@code{step} mode optimizes for single-stepping; it prevents other
+threads from preempting the current thread while you are stepping, so
+that the focus of debugging does not change unexpectedly.  Other
+threads never get a chance to run when you step, and they are
+completely free to run when you use commands like @samp{continue},
+@samp{until}, or @samp{finish}.  However, unless another thread hits a
+breakpoint during its timeslice, @value{GDBN} does not change the
+current thread away from the thread that you are debugging.  The
+@code{replay} mode behaves like @code{off} in record mode and like
+@code{on} in replay mode.
 
 @item show scheduler-locking
 Display the current scheduler locking mode.
@@ -6059,25 +6283,25 @@ breakpoints on all threads, or on a part
 @table @code
 @cindex breakpoints and threads
 @cindex thread breakpoints
-@kindex break @dots{} thread @var{threadno}
-@item break @var{linespec} thread @var{threadno}
-@itemx break @var{linespec} thread @var{threadno} if @dots{}
-@var{linespec} specifies source lines; there are several ways of
+@kindex break @dots{} thread @var{thread-id}
+@item break @var{location} thread @var{thread-id}
+@itemx break @var{location} thread @var{thread-id} if @dots{}
+@var{location} specifies source lines; there are several ways of
 writing them (@pxref{Specify Location}), but the effect is always to
 specify some source line.
 
-Use the qualifier @samp{thread @var{threadno}} with a breakpoint command
+Use the qualifier @samp{thread @var{thread-id}} with a breakpoint command
 to specify that you only want @value{GDBN} to stop the program when a
-particular thread reaches this breakpoint.  The @var{threadno} specifier
-is one of the numeric thread identifiers assigned by @value{GDBN}, shown
+particular thread reaches this breakpoint.  The @var{thread-id} specifier
+is one of the thread identifiers assigned by @value{GDBN}, shown
 in the first column of the @samp{info threads} display.
 
-If you do not specify @samp{thread @var{threadno}} when you set a
+If you do not specify @samp{thread @var{thread-id}} when you set a
 breakpoint, the breakpoint applies to @emph{all} threads of your
 program.
 
 You can use the @code{thread} qualifier on conditional breakpoints as
-well; in this case, place @samp{thread @var{threadno}} before or
+well; in this case, place @samp{thread @var{thread-id}} before or
 after the breakpoint condition, like this:
 
 @smallexample
@@ -6444,7 +6668,9 @@ Hardware-supported instruction recording
 data.  Further, the data is collected in a ring buffer so old data will
 be overwritten when the buffer is full.  It allows limited reverse
 execution.  Variables and registers are not available during reverse
-execution.
+execution.  In remote debugging, recording continues on disconnect.
+Recorded data can be inspected after reconnecting.  The recording may
+be stopped using @code{record stop}.
 
 The recording format can be specified as parameter.  Without a parameter
 the command chooses the recording format.  The following recording
@@ -6458,8 +6684,8 @@ this format, the processor stores a from
 branch in the btrace ring buffer.
 
 @item pt
-@cindex Intel(R) Processor Trace
-Use the @dfn{Intel(R) Processor Trace} recording format.  In this
+@cindex Intel Processor Trace
+Use the @dfn{Intel Processor Trace} recording format.  In this
 format, the processor stores the execution trace in a compressed form
 that is afterwards decoded by @value{GDBN}.
 
@@ -6649,12 +6875,12 @@ tracing in @acronym{BTS} format.
 @kindex set record btrace pt
 @item set record btrace pt buffer-size @var{size}
 @itemx set record btrace pt buffer-size unlimited
-Set the requested ring buffer size for branch tracing in Intel(R)
+Set the requested ring buffer size for branch tracing in Intel
 Processor Trace format.  Default is 16KB.
 
 If @var{size} is a positive number, then @value{GDBN} will try to
 allocate a buffer of at least @var{size} bytes for each new thread
-that uses the btrace recording method and the Intel(R) Processor Trace
+that uses the btrace recording method and the Intel Processor Trace
 format.  The actually obtained buffer size may differ from the
 requested @var{size}.  Use the @code{info record} command to see the
 actual buffer size for each thread.
@@ -6667,7 +6893,7 @@ also need longer to process the branch t
 
 @item show record btrace pt buffer-size @var{size}
 Show the current setting of the requested ring buffer size for branch
-tracing in Intel(R) Processor Trace format.
+tracing in Intel Processor Trace format.
 
 @kindex info record
 @item info record
@@ -6736,8 +6962,27 @@ recorded ``future'' and begin recording 
 Disassembles instructions from the recorded execution log.  By
 default, ten instructions are disassembled.  This can be changed using
 the @code{set record instruction-history-size} command.  Instructions
-are printed in execution order.  There are several ways to specify
-what part of the execution log to disassemble:
+are printed in execution order.
+
+It can also print mixed source+disassembly if you specify the the
+@code{/m} or @code{/s} modifier, and print the raw instructions in hex
+as well as in symbolic form by specifying the @code{/r} modifier.
+
+The current position marker is printed for the instruction at the
+current program counter value.  This instruction can appear multiple
+times in the trace and the current position marker will be printed
+every time.  To omit the current position marker, specify the
+@code{/p} modifier.
+
+To better align the printed instructions when the trace contains
+instructions from more than one function, the function name may be
+omitted by specifying the @code{/f} modifier.
+
+Speculatively executed instructions are prefixed with @samp{?}.  This
+feature is not available for all recording formats.
+
+There are several ways to specify what part of the execution log to
+disassemble:
 
 @table @code
 @item record instruction-history @var{insn}
@@ -6757,7 +7002,7 @@ Disassembles ten more instructions after
 @item record instruction-history -
 Disassembles ten more instructions before the last disassembly.
 
-@item record instruction-history @var{begin} @var{end}
+@item record instruction-history @var{begin}, @var{end}
 Disassembles instructions beginning with instruction number
 @var{begin} until instruction number @var{end}.  The instruction
 number @var{end} is included.
@@ -6829,7 +7074,7 @@ Prints ten more functions after the last
 @item record function-call-history -
 Prints ten more functions before the last ten-line print.
 
-@item record function-call-history @var{begin} @var{end}
+@item record function-call-history @var{begin}, @var{end}
 Prints functions beginning with function number @var{begin} until
 function number @var{end}.  The function number @var{end} is included.
 @end table
@@ -6882,9 +7127,9 @@ currently executing frame and describes 
 @menu
 * Frames::                      Stack frames
 * Backtrace::                   Backtraces
-* Frame Filter Management::     Managing frame filters
 * Selection::                   Selecting a frame
 * Frame Info::                  Information on a frame
+* Frame Filter Management::     Managing frame filters
 
 @end menu
 
@@ -6943,23 +7188,6 @@ it had a separate frame, which is number
 correct tracing of the function call chain.  However, @value{GDBN} has
 no provision for frameless functions elsewhere in the stack.
 
-@table @code
-@kindex frame@r{, command}
-@cindex current stack frame
-@item frame @r{[}@var{framespec}@r{]}
-The @code{frame} command allows you to move from one stack frame to another,
-and to print the stack frame you select.  The @var{framespec} may be either the
-address of the frame or the stack frame number.  Without an argument,
-@code{frame} prints the current stack frame.
-
-@kindex select-frame
-@cindex selecting frame silently
-@item select-frame
-The @code{select-frame} command allows you to move from one stack frame
-to another without printing the frame.  This is the silent version of
-@code{frame}.
-@end table
-
 @node Backtrace
 @section Backtraces
 
@@ -7159,6 +7387,156 @@ Display an absolute filename.
 Show the current way to display filenames.
 @end table
 
+@node Selection
+@section Selecting a Frame
+
+Most commands for examining the stack and other data in your program work on
+whichever stack frame is selected at the moment.  Here are the commands for
+selecting a stack frame; all of them finish by printing a brief description
+of the stack frame just selected.
+
+@table @code
+@kindex frame@r{, selecting}
+@kindex f @r{(@code{frame})}
+@item frame @var{n}
+@itemx f @var{n}
+Select frame number @var{n}.  Recall that frame zero is the innermost
+(currently executing) frame, frame one is the frame that called the
+innermost one, and so on.  The highest-numbered frame is the one for
+@code{main}.
+
+@item frame @var{stack-addr} [ @var{pc-addr} ]
+@itemx f @var{stack-addr} [ @var{pc-addr} ]
+Select the frame at address @var{stack-addr}.  This is useful mainly if the
+chaining of stack frames has been damaged by a bug, making it
+impossible for @value{GDBN} to assign numbers properly to all frames.  In
+addition, this can be useful when your program has multiple stacks and
+switches between them.  The optional @var{pc-addr} can also be given to
+specify the value of PC for the stack frame.
+
+@kindex up
+@item up @var{n}
+Move @var{n} frames up the stack; @var{n} defaults to 1.  For positive
+numbers @var{n}, this advances toward the outermost frame, to higher
+frame numbers, to frames that have existed longer.
+
+@kindex down
+@kindex do @r{(@code{down})}
+@item down @var{n}
+Move @var{n} frames down the stack; @var{n} defaults to 1.  For
+positive numbers @var{n}, this advances toward the innermost frame, to
+lower frame numbers, to frames that were created more recently.
+You may abbreviate @code{down} as @code{do}.
+@end table
+
+All of these commands end by printing two lines of output describing the
+frame.  The first line shows the frame number, the function name, the
+arguments, and the source file and line number of execution in that
+frame.  The second line shows the text of that source line.
+
+@need 1000
+For example:
+
+@smallexample
+@group
+(@value{GDBP}) up
+#1  0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
+    at env.c:10
+10              read_input_file (argv[i]);
+@end group
+@end smallexample
+
+After such a printout, the @code{list} command with no arguments
+prints ten lines centered on the point of execution in the frame.
+You can also edit the program at the point of execution with your favorite
+editing program by typing @code{edit}.
+@xref{List, ,Printing Source Lines},
+for details.
+
+@table @code
+@kindex select-frame
+@item select-frame
+The @code{select-frame} command is a variant of @code{frame} that does
+not display the new frame after selecting it.  This command is
+intended primarily for use in @value{GDBN} command scripts, where the
+output might be unnecessary and distracting.
+
+@kindex down-silently
+@kindex up-silently
+@item up-silently @var{n}
+@itemx down-silently @var{n}
+These two commands are variants of @code{up} and @code{down},
+respectively; they differ in that they do their work silently, without
+causing display of the new frame.  They are intended primarily for use
+in @value{GDBN} command scripts, where the output might be unnecessary and
+distracting.
+@end table
+
+@node Frame Info
+@section Information About a Frame
+
+There are several other commands to print information about the selected
+stack frame.
+
+@table @code
+@item frame
+@itemx f
+When used without any argument, this command does not change which
+frame is selected, but prints a brief description of the currently
+selected stack frame.  It can be abbreviated @code{f}.  With an
+argument, this command is used to select a stack frame.
+@xref{Selection, ,Selecting a Frame}.
+
+@kindex info frame
+@kindex info f @r{(@code{info frame})}
+@item info frame
+@itemx info f
+This command prints a verbose description of the selected stack frame,
+including:
+
+@itemize @bullet
+@item
+the address of the frame
+@item
+the address of the next frame down (called by this frame)
+@item
+the address of the next frame up (caller of this frame)
+@item
+the language in which the source code corresponding to this frame is written
+@item
+the address of the frame's arguments
+@item
+the address of the frame's local variables
+@item
+the program counter saved in it (the address of execution in the caller frame)
+@item
+which registers were saved in the frame
+@end itemize
+
+@noindent The verbose description is useful when
+something has gone wrong that has made the stack format fail to fit
+the usual conventions.
+
+@item info frame @var{addr}
+@itemx info f @var{addr}
+Print a verbose description of the frame at address @var{addr}, without
+selecting that frame.  The selected frame remains unchanged by this
+command.  This requires the same kind of address (more than one for some
+architectures) that you specify in the @code{frame} command.
+@xref{Selection, ,Selecting a Frame}.
+
+@kindex info args
+@item info args
+Print the arguments of the selected frame, each on a separate line.
+
+@item info locals
+@kindex info locals
+Print the local variables of the selected frame, each on a separate
+line.  These are all variables (declared either static or automatic)
+accessible at the point of execution of the selected frame.
+
+@end table
+
 @node Frame Filter Management
 @section Management of Frame Filters.
 @cindex managing frame filters
@@ -7302,158 +7680,6 @@ objfile /build/test frame-filters:
 @end smallexample
 @end table
 
-@node Selection
-@section Selecting a Frame
-
-Most commands for examining the stack and other data in your program work on
-whichever stack frame is selected at the moment.  Here are the commands for
-selecting a stack frame; all of them finish by printing a brief description
-of the stack frame just selected.
-
-@table @code
-@kindex frame@r{, selecting}
-@kindex f @r{(@code{frame})}
-@item frame @var{n}
-@itemx f @var{n}
-Select frame number @var{n}.  Recall that frame zero is the innermost
-(currently executing) frame, frame one is the frame that called the
-innermost one, and so on.  The highest-numbered frame is the one for
-@code{main}.
-
-@item frame @var{addr}
-@itemx f @var{addr}
-Select the frame at address @var{addr}.  This is useful mainly if the
-chaining of stack frames has been damaged by a bug, making it
-impossible for @value{GDBN} to assign numbers properly to all frames.  In
-addition, this can be useful when your program has multiple stacks and
-switches between them.
-
-On the SPARC architecture, @code{frame} needs two addresses to
-select an arbitrary frame: a frame pointer and a stack pointer.
-
-On the @acronym{MIPS} and Alpha architecture, it needs two addresses: a stack
-pointer and a program counter.
-
-On the 29k architecture, it needs three addresses: a register stack
-pointer, a program counter, and a memory stack pointer.
-
-@kindex up
-@item up @var{n}
-Move @var{n} frames up the stack; @var{n} defaults to 1.  For positive
-numbers @var{n}, this advances toward the outermost frame, to higher
-frame numbers, to frames that have existed longer.
-
-@kindex down
-@kindex do @r{(@code{down})}
-@item down @var{n}
-Move @var{n} frames down the stack; @var{n} defaults to 1.  For
-positive numbers @var{n}, this advances toward the innermost frame, to
-lower frame numbers, to frames that were created more recently.
-You may abbreviate @code{down} as @code{do}.
-@end table
-
-All of these commands end by printing two lines of output describing the
-frame.  The first line shows the frame number, the function name, the
-arguments, and the source file and line number of execution in that
-frame.  The second line shows the text of that source line.
-
-@need 1000
-For example:
-
-@smallexample
-@group
-(@value{GDBP}) up
-#1  0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
-    at env.c:10
-10              read_input_file (argv[i]);
-@end group
-@end smallexample
-
-After such a printout, the @code{list} command with no arguments
-prints ten lines centered on the point of execution in the frame.
-You can also edit the program at the point of execution with your favorite
-editing program by typing @code{edit}.
-@xref{List, ,Printing Source Lines},
-for details.
-
-@table @code
-@kindex down-silently
-@kindex up-silently
-@item up-silently @var{n}
-@itemx down-silently @var{n}
-These two commands are variants of @code{up} and @code{down},
-respectively; they differ in that they do their work silently, without
-causing display of the new frame.  They are intended primarily for use
-in @value{GDBN} command scripts, where the output might be unnecessary and
-distracting.
-@end table
-
-@node Frame Info
-@section Information About a Frame
-
-There are several other commands to print information about the selected
-stack frame.
-
-@table @code
-@item frame
-@itemx f
-When used without any argument, this command does not change which
-frame is selected, but prints a brief description of the currently
-selected stack frame.  It can be abbreviated @code{f}.  With an
-argument, this command is used to select a stack frame.
-@xref{Selection, ,Selecting a Frame}.
-
-@kindex info frame
-@kindex info f @r{(@code{info frame})}
-@item info frame
-@itemx info f
-This command prints a verbose description of the selected stack frame,
-including:
-
-@itemize @bullet
-@item
-the address of the frame
-@item
-the address of the next frame down (called by this frame)
-@item
-the address of the next frame up (caller of this frame)
-@item
-the language in which the source code corresponding to this frame is written
-@item
-the address of the frame's arguments
-@item
-the address of the frame's local variables
-@item
-the program counter saved in it (the address of execution in the caller frame)
-@item
-which registers were saved in the frame
-@end itemize
-
-@noindent The verbose description is useful when
-something has gone wrong that has made the stack format fail to fit
-the usual conventions.
-
-@item info frame @var{addr}
-@itemx info f @var{addr}
-Print a verbose description of the frame at address @var{addr}, without
-selecting that frame.  The selected frame remains unchanged by this
-command.  This requires the same kind of address (more than one for some
-architectures) that you specify in the @code{frame} command.
-@xref{Selection, ,Selecting a Frame}.
-
-@kindex info args
-@item info args
-Print the arguments of the selected frame, each on a separate line.
-
-@item info locals
-@kindex info locals
-Print the local variables of the selected frame, each on a separate
-line.  These are all variables (declared either static or automatic)
-accessible at the point of execution of the selected frame.
-
-@end table
-
-
 @node Source
 @chapter Examining Source Files
 
@@ -7534,21 +7760,21 @@ argument of @samp{-}; that argument is p
 each repetition moves up in the source file.
 
 In general, the @code{list} command expects you to supply zero, one or two
-@dfn{linespecs}.  Linespecs specify source lines; there are several ways
+@dfn{locations}.  Locations specify source lines; there are several ways
 of writing them (@pxref{Specify Location}), but the effect is always
 to specify some source line.
 
 Here is a complete description of the possible arguments for @code{list}:
 
 @table @code
-@item list @var{linespec}
-Print lines centered around the line specified by @var{linespec}.
+@item list @var{location}
+Print lines centered around the line specified by @var{location}.
 
 @item list @var{first},@var{last}
 Print lines from @var{first} to @var{last}.  Both arguments are
-linespecs.  When a @code{list} command has two linespecs, and the
-source file of the second linespec is omitted, this refers to
-the same source file as the first linespec.
+locations.  When a @code{list} command has two locations, and the
+source file of the second location is omitted, this refers to
+the same source file as the first location.
 
 @item list ,@var{last}
 Print lines ending with @var{last}.
@@ -7569,15 +7795,28 @@ As described in the preceding table.
 @node Specify Location
 @section Specifying a Location
 @cindex specifying location
-@cindex linespec
+@cindex location
+@cindex source location
+
+@menu
+* Linespec Locations::                Linespec locations
+* Explicit Locations::                Explicit locations
+* Address Locations::                 Address locations
+@end menu
 
 Several @value{GDBN} commands accept arguments that specify a location
 of your program's code.  Since @value{GDBN} is a source-level
-debugger, a location usually specifies some line in the source code;
-for that reason, locations are also known as @dfn{linespecs}.
-
-Here are all the different ways of specifying a code location that
-@value{GDBN} understands:
+debugger, a location usually specifies some line in the source code.
+Locations may be specified using three different formats:
+linespec locations, explicit locations, or address locations.
+
+@node Linespec Locations
+@subsection Linespec Locations
+@cindex linespec locations
+
+A @dfn{linespec} is a colon-separated list of source location parameters such
+as file name, function name, etc.  Here are all the different ways of
+specifying a linespec:
 
 @table @code
 @item @var{linenum}
@@ -7616,25 +7855,93 @@ function name to avoid ambiguity when th
 functions in different source files.
 
 @item @var{label}
-Specifies the line at which the label named @var{label} appears.
-@value{GDBN} searches for the label in the function corresponding to
-the currently selected stack frame.  If there is no current selected
-stack frame (for instance, if the inferior is not running), then
-@value{GDBN} will not search for a label.
-
-@item *@var{address}
-Specifies the program address @var{address}.  For line-oriented
-commands, such as @code{list} and @code{edit}, this specifies a source
-line that contains @var{address}.  For @code{break} and other
-breakpoint oriented commands, this can be used to set breakpoints in
+Specifies the line at which the label named @var{label} appears
+in the function corresponding to the currently selected stack frame.
+If there is no current selected stack frame (for instance, if the inferior
+is not running), then @value{GDBN} will not search for a label.
+
+@cindex breakpoint at static probe point
+@item -pstap|-probe-stap @r{[}@var{objfile}:@r{[}@var{provider}:@r{]}@r{]}@var{name}
+The @sc{gnu}/Linux tool @code{SystemTap} provides a way for
+applications to embed static probes.  @xref{Static Probe Points}, for more
+information on finding and using static probes.  This form of linespec
+specifies the location of such a static probe.
+
+If @var{objfile} is given, only probes coming from that shared library
+or executable matching @var{objfile} as a regular expression are considered.
+If @var{provider} is given, then only probes from that provider are considered.
+If several probes match the spec, @value{GDBN} will insert a breakpoint at
+each one of those probes.
+@end table
+
+@node Explicit Locations
+@subsection Explicit Locations
+@cindex explicit locations
+
+@dfn{Explicit locations} allow the user to directly specify the source
+location's parameters using option-value pairs.
+
+Explicit locations are useful when several functions, labels, or
+file names have the same name (base name for files) in the program's
+sources.  In these cases, explicit locations point to the source
+line you meant more accurately and unambiguously.  Also, using
+explicit locations might be faster in large programs.
+
+For example, the linespec @samp{foo:bar} may refer to a function @code{bar}
+defined in the file named @file{foo} or the label @code{bar} in a function
+named @code{foo}.  @value{GDBN} must search either the file system or
+the symbol table to know.
+
+The list of valid explicit location options is summarized in the
+following table:
+
+@table @code
+@item -source @var{filename}
+The value specifies the source file name.  To differentiate between
+files with the same base name, prepend as many directories as is necessary
+to uniquely identify the desired file, e.g., @file{foo/bar/baz.c}.  Otherwise
+@value{GDBN} will use the first file it finds with the given base
+name.   This option requires the use of either @code{-function} or @code{-line}.
+
+@item -function @var{function}
+The value specifies the name of a function.  Operations
+on function locations unmodified by other options (such as @code{-label}
+or @code{-line}) refer to the line that begins the body of the function.
+In C, for example, this is the line with the open brace.
+
+@item -label @var{label}
+The value specifies the name of a label.  When the function
+name is not specified, the label is searched in the function of the currently
+selected stack frame.
+
+@item -line @var{number}
+The value specifies a line offset for the location.  The offset may either
+be absolute (@code{-line 3}) or relative (@code{-line +3}), depending on
+the command.  When specified without any other options, the line offset is
+relative to the current line.
+@end table
+
+Explicit location options may be abbreviated by omitting any non-unique
+trailing characters from the option name, e.g., @code{break -s main.c -li 3}.
+
+@node Address Locations
+@subsection Address Locations
+@cindex address locations
+
+@dfn{Address locations} indicate a specific program address.  They have
+the generalized form *@var{address}.
+
+For line-oriented commands, such as @code{list} and @code{edit}, this
+specifies a source line that contains @var{address}.  For @code{break} and
+other breakpoint-oriented commands, this can be used to set breakpoints in
 parts of your program which do not have debugging information or
 source files.
 
 Here @var{address} may be any expression valid in the current working
 language (@pxref{Languages, working language}) that specifies a code
 address.  In addition, as a convenience, @value{GDBN} extends the
-semantics of expressions used in locations to cover the situations
-that frequently happen during debugging.  Here are the various forms
+semantics of expressions used in locations to cover several situations
+that frequently occur during debugging.  Here are the various forms
 of @var{address}:
 
 @table @code
@@ -7643,7 +7950,7 @@ Any expression valid in the current work
 
 @item @var{funcaddr}
 An address of a function or procedure derived from its name.  In C,
-C@t{++}, Java, Objective-C, Fortran, minimal, and assembly, this is
+C@t{++}, Objective-C, Fortran, minimal, and assembly, this is
 simply the function's name @var{function} (and actually a special case
 of a valid expression).  In Pascal and Modula-2, this is
 @code{&@var{function}}.  In Ada, this is @code{@var{function}'Address}
@@ -7659,22 +7966,6 @@ specify the function unambiguously, e.g.
 functions with identical names in different source files.
 @end table
 
-@cindex breakpoint at static probe point
-@item -pstap|-probe-stap @r{[}@var{objfile}:@r{[}@var{provider}:@r{]}@r{]}@var{name}
-The @sc{gnu}/Linux tool @code{SystemTap} provides a way for
-applications to embed static probes.  @xref{Static Probe Points}, for more
-information on finding and using static probes.  This form of linespec
-specifies the location of such a static probe.
-
-If @var{objfile} is given, only probes coming from that shared library
-or executable matching @var{objfile} as a regular expression are considered.
-If @var{provider} is given, then only probes from that provider are considered.
-If several probes match the spec, @value{GDBN} will insert a breakpoint at
-each one of those probes.
-
-@end table
-
-
 @node Edit
 @section Editing Source Files
 @cindex editing source files
@@ -7918,11 +8209,11 @@ For example, if the file @file{/foo/bar/
 @file{/mnt/cross/baz.c}, then the command
 
 @smallexample
-(@value{GDBP}) set substitute-path /usr/src /mnt/cross
+(@value{GDBP}) set substitute-path /foo/bar /mnt/cross
 @end smallexample
 
 @noindent
-will tell @value{GDBN} to replace @samp{/usr/src} with
+will tell @value{GDBN} to replace @samp{/foo/bar} with
 @samp{/mnt/cross}, which will allow @value{GDBN} to find the file
 @file{baz.c} even though it was moved.
 
@@ -7992,9 +8283,9 @@ well as hex.
 
 @table @code
 @kindex info line
-@item info line @var{linespec}
+@item info line @var{location}
 Print the starting and ending addresses of the compiled code for
-source line @var{linespec}.  You can specify source lines in any of
+source line @var{location}.  You can specify source lines in any of
 the ways documented in @ref{Specify Location}.
 @end table
 
@@ -8012,7 +8303,7 @@ Line 895 of "builtin.c" starts at pc 0x6
 @noindent
 @cindex code address and its source line
 We can also inquire (using @code{*@var{addr}} as the form for
-@var{linespec}) what source line covers a particular address:
+@var{location}) what source line covers a particular address:
 @smallexample
 (@value{GDBP}) info line *0x63ff
 Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
@@ -8036,11 +8327,12 @@ Variables}).
 @cindex listing machine instructions
 @item disassemble
 @itemx disassemble /m
+@itemx disassemble /s
 @itemx disassemble /r
 This specialized command dumps a range of memory as machine
 instructions.  It can also print mixed source+disassembly by specifying
-the @code{/m} modifier and print the raw instructions in hex as well as
-in symbolic form by specifying the @code{/r}.
+the @code{/m} or @code{/s} modifier and print the raw instructions in hex
+as well as in symbolic form by specifying the @code{/r} modifier.
 The default memory range is the function surrounding the
 program counter of the selected frame.  A single argument to this
 command is a program counter value; @value{GDBN} dumps the function
@@ -8084,8 +8376,9 @@ Dump of assembler code from 0x32c4 to 0x
 End of assembler dump.
 @end smallexample
 
-Here is an example showing mixed source+assembly for Intel x86, when the
-program is stopped just after function prologue:
+Here is an example showing mixed source+assembly for Intel x86
+with @code{/m} or @code{/s}, when the program is stopped just after
+function prologue in a non-optimized function with no inline code.
 
 @smallexample
 (@value{GDBP}) disas /m main
@@ -8110,6 +8403,96 @@ Dump of assembler code for function main
 End of assembler dump.
 @end smallexample
 
+The @code{/m} option is deprecated as its output is not useful when
+there is either inlined code or re-ordered code.
+The @code{/s} option is the preferred choice.
+Here is an example for AMD x86-64 showing the difference between
+@code{/m} output and @code{/s} output.
+This example has one inline function defined in a header file,
+and the code is compiled with @samp{-O2} optimization.
+Note how the @code{/m} output is missing the disassembly of
+several instructions that are present in the @code{/s} output.
+
+@file{foo.h}:
+
+@smallexample
+int
+foo (int a)
+@{
+  if (a < 0)
+    return a * 2;
+  if (a == 0)
+    return 1;
+  return a + 10;
+@}
+@end smallexample
+
+@file{foo.c}:
+
+@smallexample
+#include "foo.h"
+volatile int x, y;
+int
+main ()
+@{
+  x = foo (y);
+  return 0;
+@}
+@end smallexample
+
+@smallexample
+(@value{GDBP}) disas /m main
+Dump of assembler code for function main:
+5	@{
+
+6	  x = foo (y);
+   0x0000000000400400 <+0>:	mov    0x200c2e(%rip),%eax # 0x601034 <y>
+   0x0000000000400417 <+23>:	mov    %eax,0x200c13(%rip) # 0x601030 <x>
+
+7	  return 0;
+8	@}
+   0x000000000040041d <+29>:	xor    %eax,%eax
+   0x000000000040041f <+31>:	retq
+   0x0000000000400420 <+32>:	add    %eax,%eax
+   0x0000000000400422 <+34>:	jmp    0x400417 <main+23>
+
+End of assembler dump.
+(@value{GDBP}) disas /s main
+Dump of assembler code for function main:
+foo.c:
+5	@{
+6	  x = foo (y);
+   0x0000000000400400 <+0>:	mov    0x200c2e(%rip),%eax # 0x601034 <y>
+
+foo.h:
+4	  if (a < 0)
+   0x0000000000400406 <+6>:	test   %eax,%eax
+   0x0000000000400408 <+8>:	js     0x400420 <main+32>
+
+6	  if (a == 0)
+7	    return 1;
+8	  return a + 10;
+   0x000000000040040a <+10>:	lea    0xa(%rax),%edx
+   0x000000000040040d <+13>:	test   %eax,%eax
+   0x000000000040040f <+15>:	mov    $0x1,%eax
+   0x0000000000400414 <+20>:	cmovne %edx,%eax
+
+foo.c:
+6	  x = foo (y);
+   0x0000000000400417 <+23>:	mov    %eax,0x200c13(%rip) # 0x601030 <x>
+
+7	  return 0;
+8	@}
+   0x000000000040041d <+29>:	xor    %eax,%eax
+   0x000000000040041f <+31>:	retq
+
+foo.h:
+5	    return a * 2;
+   0x0000000000400420 <+32>:	add    %eax,%eax
+   0x0000000000400422 <+34>:	jmp    0x400417 <main+23>
+End of assembler dump.
+@end smallexample
+
 Here is another example showing raw instructions in hex for AMD x86-64,
 
 @smallexample
@@ -8122,7 +8505,7 @@ Dump of assembler code from 0x400281 to 
 End of assembler dump.
 @end smallexample
 
-Addresses cannot be specified as a linespec (@pxref{Specify Location}).
+Addresses cannot be specified as a location (@pxref{Specify Location}).
 So, for example, if you want to disassemble function @code{bar}
 in file @file{foo.c}, you must type @samp{disassemble 'foo.c'::bar}
 and not @samp{disassemble foo.c:bar}.
@@ -8137,6 +8520,27 @@ location of the relocation table.  On so
 might be able to resolve these to actual function names.
 
 @table @code
+@kindex set disassembler-options
+@cindex disassembler options
+@item set disassembler-options @var{option1}[,@var{option2}@dots{}]
+This command controls the passing of target specific information to
+the disassembler.  For a list of valid options, please refer to the
+@code{-M}/@code{--disassembler-options} section of the @samp{objdump}
+manual and/or the output of @kbd{objdump --help}
+(@pxref{objdump,,objdump,binutils.info,The GNU Binary Utilities}).
+The default value is the empty string.
+
+If it is necessary to specify more than one disassembler option, then
+multiple options can be placed together into a comma separated list.
+Currently this command is only supported on targets ARM, PowerPC
+and S/390.
+
+@kindex show disassembler-options
+@item show disassembler-options
+Show the current setting of the disassembler options.
+@end table
+
+@table @code
 @kindex set disassembly-flavor
 @cindex Intel disassembly flavor
 @cindex AT&T disassembly flavor
@@ -8388,6 +8792,7 @@ being passed the type of @var{arg} as th
                                 character set than GDB does
 * Caching Target Data::         Data caching for targets
 * Searching Memory::            Searching memory for a sequence of bytes
+* Value Sizes::                 Managing memory allocated for values
 @end menu
 
 @node Expressions
@@ -8950,7 +9355,8 @@ Several commands set convenient defaults
 @table @r
 @item @var{n}, the repeat count
 The repeat count is a decimal integer; the default is 1.  It specifies
-how much memory (counting by units @var{u}) to display.
+how much memory (counting by units @var{u}) to display.  If a negative
+number is specified, memory is examined backward from @var{addr}.
 @c This really is **decimal**; unaffected by 'set radix' as of GDB
 @c 4.1.2.
 
@@ -9005,6 +9411,10 @@ starting at address @code{0x54320}.  @sa
 words (@samp{w}) of memory above the stack pointer (here, @samp{$sp};
 @pxref{Registers, ,Registers}) in hexadecimal (@samp{x}).
 
+You can also specify a negative repeat count to examine memory backward
+from the given address.  For example, @samp{x/-3uh 0x54320} prints three
+halfwords (@code{h}) at @code{0x54314}, @code{0x54328}, and @code{0x5431c}.
+
 Since the letters indicating unit sizes are all distinct from the
 letters specifying output formats, you do not have to remember whether
 unit size or format comes first; either order works.  The output
@@ -9021,6 +9431,13 @@ follow the last instruction that is with
 @code{disassemble} gives an alternative way of inspecting machine
 instructions; see @ref{Machine Code,,Source and Machine Code}.
 
+If a negative repeat count is specified for the formats @samp{s} or @samp{i},
+the command displays null-terminated strings or instructions before the given
+address as many as the absolute value of the given number.  For the @samp{i}
+format, we use line number information in the debug info to accurately locate
+instruction boundaries while disassembling backward.  If line info is not
+available, the command stops examining memory with an error message.
+
 All the defaults for the arguments to @code{x} are designed to make it
 easy to continue scanning memory with minimal specifications each time
 you use @code{x}.  For example, after you have inspected three machine
@@ -9461,7 +9878,7 @@ this feature will behave in the @code{de
 @code{no} setting.
 
 This functionality is currently supported only by DWARF 2 debugging format and
-the compiler has to produce @samp{DW_TAG_GNU_call_site} tags.  With
+the compiler has to produce @samp{DW_TAG_call_site} tags.  With
 @value{NGCC}, you need to specify @option{-O -g} during compilation, to get
 this information.
 
@@ -10239,11 +10656,17 @@ gdbserver that supports the @code{qGetTI
 @xref{General Query Packets}.
 This variable contains the address of the thread information block.
 
-@end table
+@item $_inferior
+The number of the current inferior.  @xref{Inferiors and
+Programs, ,Debugging Multiple Inferiors and Programs}.
+
+@item $_thread
+The thread number of the current thread.  @xref{thread numbers}.
 
-On HP-UX systems, if you refer to a function or variable name that
-begins with a dollar sign, @value{GDBN} searches for a user or system
-name first, before it searches for a convenience variable.
+@item $_gthread
+The global number of the current thread.  @xref{global thread numbers}.
+
+@end table
 
 @node Convenience Funs
 @section Convenience Functions
@@ -10409,6 +10832,19 @@ checks all stack frames from the immedia
 by @var{number_of_frames}, whereas @code{$_caller_matches} only checks the
 frame specified by @var{number_of_frames}.
 
+@item $_as_string(@var{value})
+@findex $_as_string@r{, convenience function}
+Return the string representation of @var{value}.
+
+This function is useful to obtain the textual label (enumerator) of an
+enumeration value.  For example, assuming the variable @var{node} is of
+an enumerated type:
+
+@smallexample
+(gdb) printf "Visiting node of type %s\n", $_as_string(node)
+Visiting node of type NODE_INTEGER
+@end smallexample
+
 @end table
 
 @value{GDBN} provides the ability to list and get help on
@@ -11457,6 +11893,47 @@ you get during debugging:
 $2 = (void *) 0x8049560
 @end smallexample
 
+@node Value Sizes
+@section Value Sizes
+
+Whenever @value{GDBN} prints a value memory will be allocated within
+@value{GDBN} to hold the contents of the value.  It is possible in
+some languages with dynamic typing systems, that an invalid program
+may indicate a value that is incorrectly large, this in turn may cause
+@value{GDBN} to try and allocate an overly large ammount of memory.
+
+@table @code
+@kindex set max-value-size
+@item set max-value-size @var{bytes}
+@itemx set max-value-size unlimited
+Set the maximum size of memory that @value{GDBN} will allocate for the
+contents of a value to @var{bytes}, trying to display a value that
+requires more memory than that will result in an error.
+
+Setting this variable does not effect values that have already been
+allocated within @value{GDBN}, only future allocations.
+
+There's a minimum size that @code{max-value-size} can be set to in
+order that @value{GDBN} can still operate correctly, this minimum is
+currently 16 bytes.
+
+The limit applies to the results of some subexpressions as well as to
+complete expressions.  For example, an expression denoting a simple
+integer component, such as @code{x.y.z}, may fail if the size of
+@var{x.y} is dynamic and exceeds @var{bytes}.  On the other hand,
+@value{GDBN} is sometimes clever; the expression @code{A[i]}, where
+@var{A} is an array variable with non-constant size, will generally
+succeed regardless of the bounds on @var{A}, as long as the component
+size is less than @var{bytes}.
+
+The default value of @code{max-value-size} is currently 64k.
+
+@kindex show max-value-size
+@item show max-value-size
+Show the maximum size of memory, in bytes, that @value{GDBN} will
+allocate for the contents of a value.
+@end table
+
 @node Optimized Code
 @chapter Debugging Optimized Code
 @cindex optimized code, debugging
@@ -11569,7 +12046,7 @@ some cases @value{GDBN} can determine th
 return address set up as if @code{B} called @code{C} normally.
 
 This functionality is currently supported only by DWARF 2 debugging format and
-the compiler has to produce @samp{DW_TAG_GNU_call_site} tags.  With
+the compiler has to produce @samp{DW_TAG_call_site} tags.  With
 @value{NGCC}, you need to specify @option{-O -g} during compilation, to get
 this information.
 
@@ -11622,8 +12099,8 @@ static void __attribute__((noinline, noc
 static void __attribute__((noinline, noclone)) c (void) @{ a (); @}
 int main (void) @{ x (); return 0; @}
 
-Breakpoint 1, DW_OP_GNU_entry_value resolving cannot find
-DW_TAG_GNU_call_site 0x40039a in main
+Breakpoint 1, DW_OP_entry_value resolving cannot find
+DW_TAG_call_site 0x40039a in main
 a () at t.c:3
 3	static void __attribute__((noinline, noclone)) a (void) @{ x++; @}
 (gdb) bt
@@ -11699,7 +12176,7 @@ int main (void) @{ a (5); return 0; @}
 
 (gdb) bt
 #0  c (i=i@@entry=0) at t.c:2
-#1  0x0000000000400428 in a (DW_OP_GNU_entry_value resolving has found
+#1  0x0000000000400428 in a (DW_OP_entry_value resolving has found
 function "a" at 0x400420 can call itself via tail calls
 i=<optimized out>) at t.c:6
 #2  0x000000000040036e in main () at t.c:7
@@ -11775,9 +12252,9 @@ argument processing and the beginning of
 the macro may begin with a hyphen.
 
 @kindex info macros
-@item info macros @var{linespec}
+@item info macros @var{location}
 Show all macro definitions that are in effect at the location specified
-by @var{linespec},  and describe the source location or compiler
+by @var{location},  and describe the source location or compiler
 command-line where those definitions were established.
 
 @kindex macro define
@@ -12082,12 +12559,11 @@ conditions and actions.
 @kindex trace
 @item trace @var{location}
 The @code{trace} command is very similar to the @code{break} command.
-Its argument @var{location} can be a source line, a function name, or
-an address in the target program.  @xref{Specify Location}.  The
-@code{trace} command defines a tracepoint, which is a point in the
-target program where the debugger will briefly stop, collect some
-data, and then allow the program to continue.  Setting a tracepoint or
-changing its actions takes effect immediately if the remote stub
+Its argument @var{location} can be any valid location.
+@xref{Specify Location}.  The @code{trace} command defines a tracepoint,
+which is a point in the target program where the debugger will briefly stop,
+collect some data, and then allow the program to continue.  Setting a tracepoint
+or changing its actions takes effect immediately if the remote stub
 supports the @samp{InstallInTrace} feature (@pxref{install tracepoint
 in tracing}).
 If remote stub doesn't support the @samp{InstallInTrace} feature, all
@@ -12474,6 +12950,13 @@ Collect all local variables.
 Collect the return address.  This is helpful if you want to see more
 of a backtrace.
 
+@emph{Note:} The return address location can not always be reliably
+determined up front, and the wrong address / registers may end up
+collected instead.  On some architectures the reliability is higher
+for tracepoints at function entry, while on others it's the opposite.
+When this happens, backtracing will stop because the return address is
+found unavailable (unless another collect rule happened to match it).
+
 @item $_probe_argc
 Collects the number of arguments from the static probe at which the
 tracepoint is located.
@@ -12974,7 +13457,8 @@ Stop debugging trace snapshots, resume @
 Same as @samp{tfind none}.
 
 @item tfind
-No argument means find the next trace snapshot.
+No argument means find the next trace snapshot or find the first
+one if no trace snapshot is selected.
 
 @item tfind -
 Find the previous trace snapshot before the current one.  This permits
@@ -13224,7 +13708,7 @@ the data directly into @var{filename} in
 more efficient if the trace buffer is very large.  (Note, however, that
 @code{target tfile} can only read from files accessible to the host.)
 By default, this command will save trace frame in tfile format.
-You can supply the optional argument @code{-ctf} to save date in CTF
+You can supply the optional argument @code{-ctf} to save data in CTF
 format.  The @dfn{Common Trace Format} (CTF) is proposed as a trace format
 that can be shared by multiple debugging and tracing tools.  Please go to
 @indicateurl{http://www.efficios.com/ctf} to get more information.
@@ -13986,8 +14470,8 @@ being set automatically by @value{GDBN}.
 @node Supported Languages
 @section Supported Languages
 
-@value{GDBN} supports C, C@t{++}, D, Go, Objective-C, Fortran, Java,
-OpenCL C, Pascal, assembly, Modula-2, and Ada.
+@value{GDBN} supports C, C@t{++}, D, Go, Objective-C, Fortran,
+OpenCL C, Pascal, Rust, assembly, Modula-2, and Ada.
 @c This is false ...
 Some @value{GDBN} features may be used in expressions regardless of the
 language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -14011,6 +14495,7 @@ language reference or tutorial.
 * OpenCL C::                    OpenCL C
 * Fortran::                     Fortran
 * Pascal::                      Pascal
+* Rust::                        Rust
 * Modula-2::                    Modula-2
 * Ada::                         Ada
 @end menu
@@ -14816,6 +15301,99 @@ The Pascal-specific command @code{set pr
 controls whether static members of Pascal objects are displayed.
 @xref{Print Settings, pascal_static-members}.
 
+@node Rust
+@subsection Rust
+
+@value{GDBN} supports the @url{https://www.rust-lang.org/, Rust
+Programming Language}.  Type- and value-printing, and expression
+parsing, are reasonably complete.  However, there are a few
+peculiarities and holes to be aware of.
+
+@itemize @bullet
+@item
+Linespecs (@pxref{Specify Location}) are never relative to the current
+crate.  Instead, they act as if there were a global namespace of
+crates, somewhat similar to the way @code{extern crate} behaves.
+
+That is, if @value{GDBN} is stopped at a breakpoint in a function in
+crate @samp{A}, module @samp{B}, then @code{break B::f} will attempt
+to set a breakpoint in a function named @samp{f} in a crate named
+@samp{B}.
+
+As a consequence of this approach, linespecs also cannot refer to
+items using @samp{self::} or @samp{super::}.
+
+@item
+Because @value{GDBN} implements Rust name-lookup semantics in
+expressions, it will sometimes prepend the current crate to a name.
+For example, if @value{GDBN} is stopped at a breakpoint in the crate
+@samp{K}, then @code{print ::x::y} will try to find the symbol
+@samp{K::x::y}.
+
+However, since it is useful to be able to refer to other crates when
+debugging, @value{GDBN} provides the @code{extern} extension to
+circumvent this.  To use the extension, just put @code{extern} before
+a path expression to refer to the otherwise unavailable ``global''
+scope.
+
+In the above example, if you wanted to refer to the symbol @samp{y} in
+the crate @samp{x}, you would use @code{print extern x::y}.
+
+@item
+The Rust expression evaluator does not support ``statement-like''
+expressions such as @code{if} or @code{match}, or lambda expressions.
+
+@item
+Tuple expressions are not implemented.
+
+@item
+The Rust expression evaluator does not currently implement the
+@code{Drop} trait.  Objects that may be created by the evaluator will
+never be destroyed.
+
+@item
+@value{GDBN} does not implement type inference for generics.  In order
+to call generic functions or otherwise refer to generic items, you
+will have to specify the type parameters manually.
+
+@item
+@value{GDBN} currently uses the C@t{++} demangler for Rust.  In most
+cases this does not cause any problems.  However, in an expression
+context, completing a generic function name will give syntactically
+invalid results.  This happens because Rust requires the @samp{::}
+operator between the function name and its generic arguments.  For
+example, @value{GDBN} might provide a completion like
+@code{crate::f<u32>}, where the parser would require
+@code{crate::f::<u32>}.
+
+@item
+As of this writing, the Rust compiler (version 1.8) has a few holes in
+the debugging information it generates.  These holes prevent certain
+features from being implemented by @value{GDBN}:
+@itemize @bullet
+
+@item
+Method calls cannot be made via traits.
+
+@item
+Trait objects cannot be created or inspected.
+
+@item
+Operator overloading is not implemented.
+
+@item
+When debugging in a monomorphized function, you cannot use the generic
+type names.
+
+@item
+The type @code{Self} is not available.
+
+@item
+@code{use} statements are not available, so some names may not be
+available in the crate.
+@end itemize
+@end itemize
+
 @node Modula-2
 @subsection Modula-2
 
@@ -15447,6 +16025,8 @@ to be difficult.
                                    in @value{GDBN}.
 * Omissions from Ada::          Restrictions on the Ada expression syntax.
 * Additions to Ada::            Extensions of the Ada expression syntax.
+* Overloading support for Ada:: Support for expressions involving overloaded
+                                   subprograms.
 * Stopping Before Main Program:: Debugging the program during elaboration.
 * Ada Exceptions::              Ada Exceptions
 * Ada Tasks::                   Listing and setting breakpoints in tasks.
@@ -15494,13 +16074,6 @@ mostly for documenting command files.  T
 (@samp{#}) still works at the beginning of a line in Ada mode, but not in the 
 middle (to allow based literals).
 
-The debugger supports limited overloading.  Given a subprogram call in which
-the function symbol has multiple definitions, it will use the number of 
-actual parameters and some information about their types to attempt to narrow
-the set of definitions.  It also makes very limited use of context, preferring
-procedures to functions in the context of the @code{call} command, and
-functions to procedures elsewhere. 
-
 @node Omissions from Ada
 @subsubsection Omissions from Ada
 @cindex Ada, omissions from
@@ -15761,6 +16334,53 @@ object.
 
 @end itemize
 
+@node Overloading support for Ada
+@subsubsection Overloading support for Ada
+@cindex overloading, Ada
+
+The debugger supports limited overloading.  Given a subprogram call in which
+the function symbol has multiple definitions, it will use the number of
+actual parameters and some information about their types to attempt to narrow
+the set of definitions.  It also makes very limited use of context, preferring
+procedures to functions in the context of the @code{call} command, and
+functions to procedures elsewhere.
+
+If, after narrowing, the set of matching definitions still contains more than
+one definition, @value{GDBN} will display a menu to query which one it should
+use, for instance:
+
+@smallexample
+(@value{GDBP}) print f(1)
+Multiple matches for f
+[0] cancel
+[1] foo.f (integer) return boolean at foo.adb:23
+[2] foo.f (foo.new_integer) return boolean at foo.adb:28
+> 
+@end smallexample
+
+In this case, just select one menu entry either to cancel expression evaluation
+(type @kbd{0} and press @key{RET}) or to continue evaluation with a specific
+instance (type the corresponding number and press @key{RET}).
+
+Here are a couple of commands to customize @value{GDBN}'s behavior in this
+case:
+
+@table @code
+
+@kindex set ada print-signatures
+@item set ada print-signatures
+Control whether parameter types and return types are displayed in overloads
+selection menus.  It is @code{on} by default.
+@xref{Overloading support for Ada}.
+
+@kindex show ada print-signatures
+@item show ada print-signatures
+Show the current setting for displaying parameter types and return types in
+overloads selection menu.
+@xref{Overloading support for Ada}.
+
+@end table
+
 @node Stopping Before Main Program
 @subsubsection Stopping at the Very Beginning
 
@@ -15944,7 +16564,7 @@ This command prints the ID of the curren
 
 @item task @var{taskno}
 @cindex Ada task switching
-This command is like the @code{thread @var{threadno}}
+This command is like the @code{thread @var{thread-id}}
 command (@pxref{Threads}).  It switches the context of debugging
 from the current task to the given task.
 
@@ -15967,14 +16587,14 @@ from the current task to the given task.
 #4  0x804aacc in un () at un.adb:5
 @end smallexample
 
-@item break @var{linespec} task @var{taskno}
-@itemx break @var{linespec} task @var{taskno} if @dots{}
+@item break @var{location} task @var{taskno}
+@itemx break @var{location} task @var{taskno} if @dots{}
 @cindex breakpoints and tasks, in Ada
 @cindex task breakpoints, in Ada
 @kindex break @dots{} task @var{taskno}@r{ (Ada)}
 These commands are like the @code{break @dots{} thread @dots{}}
 command (@pxref{Thread Stops}).  The
-@var{linespec} argument specifies source lines, as described
+@var{location} argument specifies source lines, as described
 in @ref{Specify Location}.
 
 Use the qualifier @samp{task @var{taskno}} with a breakpoint command
@@ -16653,21 +17273,32 @@ entered from the keyboard causes symbol 
 @cindex partial symbol dump
 @kindex maint print msymbols
 @cindex minimal symbol dump
-@item maint print symbols @var{filename}
-@itemx maint print psymbols @var{filename}
-@itemx maint print msymbols @var{filename}
-Write a dump of debugging symbol data into the file @var{filename}.
-These commands are used to debug the @value{GDBN} symbol-reading code.  Only
-symbols with debugging data are included.  If you use @samp{maint print
-symbols}, @value{GDBN} includes all the symbols for which it has already
-collected full details: that is, @var{filename} reflects symbols for
-only those files whose symbols @value{GDBN} has read.  You can use the
-command @code{info sources} to find out which files these are.  If you
-use @samp{maint print psymbols} instead, the dump shows information about
-symbols that @value{GDBN} only knows partially---that is, symbols defined in
-files that @value{GDBN} has skimmed, but not yet read completely.  Finally,
-@samp{maint print msymbols} dumps just the minimal symbol information
-required for each object file from which @value{GDBN} has read some symbols.
+@item maint print symbols @r{[}-pc @var{address}@r{]} @r{[}@var{filename}@r{]}
+@itemx maint print symbols @r{[}-objfile @var{objfile}@r{]} @r{[}-source @var{source}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]}
+@itemx maint print psymbols @r{[}-objfile @var{objfile}@r{]} @r{[}-pc @var{address}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]}
+@itemx maint print psymbols @r{[}-objfile @var{objfile}@r{]} @r{[}-source @var{source}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]}
+@itemx maint print msymbols @r{[}-objfile @var{objfile}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]}
+Write a dump of debugging symbol data into the file @var{filename} or
+the terminal if @var{filename} is unspecified.
+If @code{-objfile @var{objfile}} is specified, only dump symbols for
+that objfile.
+If @code{-pc @var{address}} is specified, only dump symbols for the file
+with code at that address.  Note that @var{address} may be a symbol like
+@code{main}.
+If @code{-source @var{source}} is specified, only dump symbols for that
+source file.
+
+These commands are used to debug the @value{GDBN} symbol-reading code.
+These commands do not modify internal @value{GDBN} state, therefore
+@samp{maint print symbols} will only print symbols for already expanded symbol
+tables.
+You can use the command @code{info sources} to find out which files these are.
+If you use @samp{maint print psymbols} instead, the dump shows information
+about symbols that @value{GDBN} only knows partially---that is, symbols
+defined in files that @value{GDBN} has skimmed, but not yet read completely.
+Finally, @samp{maint print msymbols} just dumps ``minimal symbols'', e.g.,
+``ELF symbols''.
+
 @xref{Files, ,Commands to Specify Files}, for a discussion of how
 @value{GDBN} reads symbols (in the description of @code{symbol-file}).
 
@@ -16729,6 +17360,15 @@ line 1574.
 (@value{GDBP})
 @end smallexample
 
+@kindex maint info line-table
+@cindex listing @value{GDBN}'s internal line tables
+@cindex line tables, listing @value{GDBN}'s internal
+@item maint info line-table @r{[} @var{regexp} @r{]}
+
+List the @code{struct linetable} from all @code{struct symtab}
+instances whose name matches @var{regexp}.  If @var{regexp} is not
+given, list the @code{struct linetable} from all @code{struct symtab}.
+
 @kindex maint set symbol-cache-size
 @cindex symbol cache size
 @item maint set symbol-cache-size @var{size}
@@ -16902,20 +17542,17 @@ an address of your own choosing, with th
 @table @code
 @kindex jump
 @kindex j @r{(@code{jump})}
-@item jump @var{linespec}
-@itemx j @var{linespec}
-@itemx jump @var{location}
+@item jump @var{location}
 @itemx j @var{location}
-Resume execution at line @var{linespec} or at address given by
-@var{location}.  Execution stops again immediately if there is a
-breakpoint there.  @xref{Specify Location}, for a description of the
-different forms of @var{linespec} and @var{location}.  It is common
+Resume execution at @var{location}.  Execution stops again immediately
+if there is a breakpoint there.  @xref{Specify Location}, for a description
+of the different forms of @var{location}.  It is common
 practice to use the @code{tbreak} command in conjunction with
 @code{jump}.  @xref{Set Breaks, ,Setting Breakpoints}.
 
 The @code{jump} command does not change the current stack frame, or
 the stack pointer, or the contents of any memory location or any
-register other than the program counter.  If line @var{linespec} is in
+register other than the program counter.  If @var{location} is in
 a different function from the one currently executing, the results may
 be bizarre if the two functions expect different patterns of arguments or
 of local variables.  For this reason, the @code{jump} command requests
@@ -16924,7 +17561,6 @@ executing.  However, even bizarre result
 well acquainted with the machine-language code of your program.
 @end table
 
-@c Doesn't work on HP-UX; have to set $pcoqh and $pcoqt.
 On many systems, you can get much the same effect as the @code{jump}
 command by storing a new value into the register @code{$pc}.  The
 difference is that this does not start your program running; it only
@@ -17543,6 +18179,7 @@ program.  To debug a core dump of a prev
 
 @menu
 * Files::                       Commands to specify files
+* File Caching::                Information about @value{GDBN}'s file caching
 * Separate Debug Files::        Debugging information in separate files
 * MiniDebugInfo::               Debugging information in a special section
 * Index Files::                 Index files speed up GDB
@@ -17870,8 +18507,9 @@ name and remembers it that way.
 
 @cindex shared libraries
 @anchor{Shared Libraries}
-@value{GDBN} supports @sc{gnu}/Linux, MS-Windows, HP-UX, SunOS, SVr4, Irix,
-and IBM RS/6000 AIX shared libraries.
+@value{GDBN} supports @sc{gnu}/Linux, MS-Windows, SunOS,
+Darwin/Mach-O, SVr4, IBM RS/6000 AIX, QNX Neutrino, FDPIC (FR-V), and
+DSBT (TIC6X) shared libraries.
 
 On MS-Windows @value{GDBN} must be linked with the Expat library to support
 shared libraries.  @xref{Expat}.
@@ -17882,9 +18520,6 @@ when you use the @code{run} command, or 
 references to a function in a shared library, however---unless you are
 debugging a core file).
 
-On HP-UX, if the program loads a library explicitly, @value{GDBN}
-automatically loads the symbols at the time of the @code{shl_load} call.
-
 @c FIXME: some @value{GDBN} release may permit some refs to undef
 @c FIXME...symbols---eg in a break cmd---assuming they are from a shared
 @c FIXME...lib; check this from time to time when updating manual
@@ -18193,6 +18828,46 @@ Set whether a source file may have multi
 Show whether a source file may have multiple base names.
 @end table
 
+@node File Caching
+@section File Caching
+@cindex caching of opened files
+@cindex caching of bfd objects
+
+To speed up file loading, and reduce memory usage, @value{GDBN} will
+reuse the @code{bfd} objects used to track open files.  @xref{Top, ,
+BFD, bfd, The Binary File Descriptor Library}.  The following commands
+allow visibility and control of the caching behavior.
+
+@table @code
+@kindex maint info bfds
+@item maint info bfds
+This prints information about each @code{bfd} object that is known to
+@value{GDBN}.
+
+@kindex maint set bfd-sharing
+@kindex maint show bfd-sharing
+@kindex bfd caching
+@item maint set bfd-sharing
+@item maint show bfd-sharing
+Control whether @code{bfd} objects can be shared.  When sharing is
+enabled @value{GDBN} reuses already open @code{bfd} objects rather
+than reopening the same file.  Turning sharing off does not cause
+already shared @code{bfd} objects to be unshared, but all future files
+that are opened will create a new @code{bfd} object.  Similarly,
+re-enabling sharing does not cause multiple existing @code{bfd}
+objects to be collapsed into a single shared @code{bfd} object.
+
+@kindex set debug bfd-cache @var{level}
+@kindex bfd caching
+@item set debug bfd-cache @var{level}
+Turns on debugging of the bfd cache, setting the level to @var{level}.
+
+@kindex show debug bfd-cache
+@kindex bfd caching
+@item show debug bfd-cache
+Show the current debugging level of the bfd cache.
+@end table
+
 @node Separate Debug Files
 @section Debugging Information in Separate Files
 @cindex separate debugging information files
@@ -18946,8 +19621,8 @@ Show the current status of displaying co
 
 @table @code
 
-@kindex load @var{filename}
-@item load @var{filename}
+@kindex load @var{filename} @var{offset}
+@item load @var{filename} @var{offset}
 @anchor{load}
 Depending on what remote debugging facilities are configured into
 @value{GDBN}, the @code{load} command may be available.  Where it exists, it
@@ -18966,12 +19641,26 @@ link the program; for other formats, lik
 specifies a fixed address.
 @c FIXME! This would be a good place for an xref to the GNU linker doc.
 
+It is also possible to tell @value{GDBN} to load the executable file at a
+specific offset described by the optional argument @var{offset}.  When
+@var{offset} is provided, @var{filename} must also be provided.
+
 Depending on the remote side capabilities, @value{GDBN} may be able to
 load programs into flash memory.
 
 @code{load} does not repeat if you press @key{RET} again after using it.
 @end table
 
+@table @code
+
+@kindex flash-erase
+@item flash-erase
+@anchor{flash-erase}
+
+Erases all known flash memory regions on the target.
+
+@end table
+
 @node Byte Order
 @section Choosing Target Byte Order
 
@@ -19037,28 +19726,148 @@ configuration of @value{GDBN}; use @code
 
 @node Connecting
 @section Connecting to a Remote Target
+@cindex remote debugging, connecting
+@cindex @code{gdbserver}, connecting
+@cindex remote debugging, types of connections
+@cindex @code{gdbserver}, types of connections
+@cindex @code{gdbserver}, @code{target remote} mode
+@cindex @code{gdbserver}, @code{target extended-remote} mode
+
+This section describes how to connect to a remote target, including the
+types of connections and their differences, how to set up executable and
+symbol files on the host and target, and the commands used for
+connecting to and disconnecting from the remote target.
+
+@subsection Types of Remote Connections
+
+@value{GDBN} supports two types of remote connections, @code{target remote}
+mode and @code{target extended-remote} mode.  Note that many remote targets
+support only @code{target remote} mode.  There are several major
+differences between the two types of connections, enumerated here:
+
+@table @asis
+
+@cindex remote debugging, detach and program exit
+@item Result of detach or program exit
+@strong{With target remote mode:} When the debugged program exits or you
+detach from it, @value{GDBN} disconnects from the target.  When using
+@code{gdbserver}, @code{gdbserver} will exit.
+
+@strong{With target extended-remote mode:} When the debugged program exits or
+you detach from it, @value{GDBN} remains connected to the target, even
+though no program is running.  You can rerun the program, attach to a
+running program, or use @code{monitor} commands specific to the target.
+
+When using @code{gdbserver} in this case, it does not exit unless it was
+invoked using the @option{--once} option.  If the @option{--once} option
+was not used, you can ask @code{gdbserver} to exit using the
+@code{monitor exit} command (@pxref{Monitor Commands for gdbserver}).
+
+@item Specifying the program to debug
+For both connection types you use the @code{file} command to specify the
+program on the host system.  If you are using @code{gdbserver} there are
+some differences in how to specify the location of the program on the
+target.
+
+@strong{With target remote mode:} You must either specify the program to debug
+on the @code{gdbserver} command line or use the @option{--attach} option
+(@pxref{Attaching to a program,,Attaching to a Running Program}).
 
-@value{GDBN} needs an unstripped copy of your program to access symbol
-and debugging information.  Some remote targets (@pxref{qXfer
-executable filename read}, and @pxref{Host I/O Packets}) allow
-@value{GDBN} to access program files over the same connection used to
-communicate with @value{GDBN}.  With such a target, if the remote
-program is unstripped, the only command you need is @code{target
-remote}.  Otherwise, start up @value{GDBN} using the name of the local
+@cindex @option{--multi}, @code{gdbserver} option
+@strong{With target extended-remote mode:} You may specify the program to debug
+on the @code{gdbserver} command line, or you can load the program or attach
+to it using @value{GDBN} commands after connecting to @code{gdbserver}.
+
+@anchor{--multi Option in Types of Remote Connnections}
+You can start @code{gdbserver} without supplying an initial command to run
+or process ID to attach.  To do this, use the @option{--multi} command line
+option.  Then you can connect using @code{target extended-remote} and start
+the program you want to debug (see below for details on using the
+@code{run} command in this scenario).  Note that the conditions under which
+@code{gdbserver} terminates depend on how @value{GDBN} connects to it
+(@code{target remote} or @code{target extended-remote}).  The
+@option{--multi} option to @code{gdbserver} has no influence on that.
+
+@item The @code{run} command
+@strong{With target remote mode:} The @code{run} command is not
+supported.  Once a connection has been established, you can use all
+the usual @value{GDBN} commands to examine and change data.  The
+remote program is already running, so you can use commands like
+@kbd{step} and @kbd{continue}.
+
+@strong{With target extended-remote mode:} The @code{run} command is
+supported.  The @code{run} command uses the value set by
+@code{set remote exec-file} (@pxref{set remote exec-file}) to select
+the program to run.  Command line arguments are supported, except for
+wildcard expansion and I/O redirection (@pxref{Arguments}).
+
+If you specify the program to debug on the command line, then the
+@code{run} command is not required to start execution, and you can
+resume using commands like @kbd{step} and @kbd{continue} as with
+@code{target remote} mode.
+
+@anchor{Attaching in Types of Remote Connections}
+@item Attaching
+@strong{With target remote mode:} The @value{GDBN} command @code{attach} is
+not supported.  To attach to a running program using @code{gdbserver}, you
+must use the @option{--attach} option (@pxref{Running gdbserver}).
+
+@strong{With target extended-remote mode:} To attach to a running program,
+you may use the @code{attach} command after the connection has been
+established.  If you are using @code{gdbserver}, you may also invoke
+@code{gdbserver} using the @option{--attach} option
+(@pxref{Running gdbserver}).
+
+@end table
+
+@anchor{Host and target files}
+@subsection Host and Target Files
+@cindex remote debugging, symbol files
+@cindex symbol files, remote debugging
+
+@value{GDBN}, running on the host, needs access to symbol and debugging
+information for your program running on the target.  This requires 
+access to an unstripped copy of your program, and possibly any associated
+symbol files.  Note that this section applies equally to both @code{target
+remote} mode and @code{target extended-remote} mode.
+
+Some remote targets (@pxref{qXfer executable filename read}, and
+@pxref{Host I/O Packets}) allow @value{GDBN} to access program files over
+the same connection used to communicate with @value{GDBN}.  With such a
+target, if the remote program is unstripped, the only command you need is
+@code{target remote} (or @code{target extended-remote}).
+
+If the remote program is stripped, or the target does not support remote
+program file access, start up @value{GDBN} using the name of the local
 unstripped copy of your program as the first argument, or use the
-@code{file} command.
+@code{file} command.  Use @code{set sysroot} to specify the location (on
+the host) of target libraries (unless your @value{GDBN} was compiled with
+the correct sysroot using @code{--with-sysroot}).  Alternatively, you
+may use @code{set solib-search-path} to specify how @value{GDBN} locates
+target libraries.
 
-@cindex @code{target remote}
+The symbol file and target libraries must exactly match the executable
+and libraries on the target, with one exception: the files on the host
+system should not be stripped, even if the files on the target system
+are.  Mismatched or missing files will lead to confusing results
+during debugging.  On @sc{gnu}/Linux targets, mismatched or missing
+files may also prevent @code{gdbserver} from debugging multi-threaded
+programs.
+
+@subsection Remote Connection Commands
+@cindex remote connection commands
 @value{GDBN} can communicate with the target over a serial line, or
 over an @acronym{IP} network using @acronym{TCP} or @acronym{UDP}.  In
 each case, @value{GDBN} uses the same protocol for debugging your
 program; only the medium carrying the debugging packets varies.  The
-@code{target remote} command establishes a connection to the target.
-Its arguments indicate which medium to use:
+@code{target remote} and @code{target extended-remote} commands
+establish a connection to the target.  Both commands accept the same
+arguments, which indicate the medium to use:
 
 @table @code
 
 @item target remote @var{serial-device}
+@itemx target extended-remote @var{serial-device}
 @cindex serial line, @code{target remote}
 Use @var{serial-device} to communicate with the target.  For example,
 to use a serial line connected to the device named @file{/dev/ttyb}:
@@ -19074,6 +19883,8 @@ If you're using a serial line, you may w
 
 @item target remote @code{@var{host}:@var{port}}
 @itemx target remote @code{tcp:@var{host}:@var{port}}
+@itemx target extended-remote @code{@var{host}:@var{port}}
+@itemx target extended-remote @code{tcp:@var{host}:@var{port}}
 @cindex @acronym{TCP} port, @code{target remote}
 Debug using a @acronym{TCP} connection to @var{port} on @var{host}.
 The @var{host} may be either a host name or a numeric @acronym{IP}
@@ -19102,6 +19913,7 @@ target remote :1234
 Note that the colon is still required here.
 
 @item target remote @code{udp:@var{host}:@var{port}}
+@itemx target extended-remote @code{udp:@var{host}:@var{port}}
 @cindex @acronym{UDP} port, @code{target remote}
 Debug using @acronym{UDP} packets to @var{port} on @var{host}.  For example, to
 connect to @acronym{UDP} port 2828 on a terminal server named @code{manyfarms}:
@@ -19116,6 +19928,7 @@ can silently drop packets on busy or unr
 cause havoc with your debugging session.
 
 @item target remote | @var{command}
+@itemx target extended-remote | @var{command}
 @cindex pipe, @code{target remote} to
 Run @var{command} in the background and communicate with it using a
 pipe.  The @var{command} is a shell command, to be parsed and expanded
@@ -19131,11 +19944,6 @@ program has already exited, this will ha
 
 @end table
 
-Once the connection has been established, you can use all the usual
-commands to examine and change data.  The remote program is already
-running; you can use @kbd{step} and @kbd{continue}, and you do not
-need to use @kbd{run}.
-
 @cindex interrupting remote programs
 @cindex remote programs, interrupting
 Whenever @value{GDBN} is waiting for the remote program, if you type the
@@ -19149,10 +19957,13 @@ Interrupted while waiting for the progra
 Give up (and stop debugging it)?  (y or n)
 @end smallexample
 
-If you type @kbd{y}, @value{GDBN} abandons the remote debugging session.
-(If you decide you want to try again later, you can use @samp{target
-remote} again to connect once more.)  If you type @kbd{n}, @value{GDBN}
-goes back to waiting.
+In @code{target remote} mode, if you type @kbd{y}, @value{GDBN} abandons
+the remote debugging session.  (If you decide you want to try again later,
+you can use @kbd{target remote} again to connect once more.)  If you type
+@kbd{n}, @value{GDBN} goes back to waiting.
+
+In @code{target extended-remote} mode, typing @kbd{n} will leave
+@value{GDBN} connected to the target.
 
 @table @code
 @kindex detach (remote)
@@ -19161,11 +19972,13 @@ When you have finished debugging the rem
 @code{detach} command to release it from @value{GDBN} control.
 Detaching from the target normally resumes its execution, but the results
 will depend on your particular remote stub.  After the @code{detach}
-command, @value{GDBN} is free to connect to another target.
+command in @code{target remote} mode, @value{GDBN} is free to connect to
+another target.  In @code{target extended-remote} mode, @value{GDBN} is
+still connected to the target.
 
 @kindex disconnect
 @item disconnect
-The @code{disconnect} command behaves like @code{detach}, except that
+The @code{disconnect} command closes the connection to the target, and
 the target is generally not resumed.  It will wait for @value{GDBN}
 (this instance or another one) to connect and continue debugging.  After
 the @code{disconnect} command, @value{GDBN} is again free to connect to
@@ -19222,7 +20035,8 @@ Delete @var{targetfile} from the target 
 @cindex remote connection without stubs
 @code{gdbserver} is a control program for Unix-like systems, which
 allows you to connect your program with a remote @value{GDBN} via
-@code{target remote}---but without linking in the usual debugging stub.
+@code{target remote} or @code{target extended-remote}---but without
+linking in the usual debugging stub.
 
 @code{gdbserver} is not a complete replacement for the debugging stubs,
 because it requires essentially the same operating-system facilities
@@ -19250,6 +20064,7 @@ target system with the same privileges a
 @code{gdbserver}.
 @end quotation
 
+@anchor{Running gdbserver}
 @subsection Running @code{gdbserver}
 @cindex arguments, to @code{gdbserver}
 @cindex @code{gdbserver}, command-line arguments
@@ -19317,6 +20132,7 @@ Programs started with stdio-connected gd
 display through a pipe connected to gdbserver.
 Both @code{stdout} and @code{stderr} use the same pipe.
 
+@anchor{Attaching to a program}
 @subsubsection Attaching to a Running Program
 @cindex attach to a program, @code{gdbserver}
 @cindex @option{--attach}, @code{gdbserver} option
@@ -19328,8 +20144,12 @@ This is accomplished via the @code{--att
 target> gdbserver --attach @var{comm} @var{pid}
 @end smallexample
 
-@var{pid} is the process ID of a currently running process.  It isn't necessary
-to point @code{gdbserver} at a binary for the running process.
+@var{pid} is the process ID of a currently running process.  It isn't
+necessary to point @code{gdbserver} at a binary for the running process.
+
+In @code{target extended-remote} mode, you can also attach using the
+@value{GDBN} attach command
+(@pxref{Attaching in Types of Remote Connections}).
 
 @pindex pidof
 You can debug processes by name instead of process ID if your target has the
@@ -19343,41 +20163,10 @@ In case more than one copy of @var{progr
 has multiple threads, most versions of @code{pidof} support the
 @code{-s} option to only return the first process ID.
 
-@subsubsection Multi-Process Mode for @code{gdbserver}
-@cindex @code{gdbserver}, multiple processes
-@cindex multiple processes with @code{gdbserver}
-
-When you connect to @code{gdbserver} using @code{target remote},
-@code{gdbserver} debugs the specified program only once.  When the
-program exits, or you detach from it, @value{GDBN} closes the connection
-and @code{gdbserver} exits.
-
-If you connect using @kbd{target extended-remote}, @code{gdbserver}
-enters multi-process mode.  When the debugged program exits, or you
-detach from it, @value{GDBN} stays connected to @code{gdbserver} even
-though no program is running.  The @code{run} and @code{attach}
-commands instruct @code{gdbserver} to run or attach to a new program.
-The @code{run} command uses @code{set remote exec-file} (@pxref{set
-remote exec-file}) to select the program to run.  Command line
-arguments are supported, except for wildcard expansion and I/O
-redirection (@pxref{Arguments}).
-
-@cindex @option{--multi}, @code{gdbserver} option
-To start @code{gdbserver} without supplying an initial command to run
-or process ID to attach, use the @option{--multi} command line option.
-Then you can connect using @kbd{target extended-remote} and start
-the program you want to debug.
-
-In multi-process mode @code{gdbserver} does not automatically exit unless you
-use the option @option{--once}.  You can terminate it by using
-@code{monitor exit} (@pxref{Monitor Commands for gdbserver}).  Note that the
-conditions under which @code{gdbserver} terminates depend on how @value{GDBN}
-connects to it (@kbd{target remote} or @kbd{target extended-remote}).  The
-@option{--multi} option to @code{gdbserver} has no influence on that.
-
 @subsubsection TCP port allocation lifecycle of @code{gdbserver}
 
-This section applies only when @code{gdbserver} is run to listen on a TCP port.
+This section applies only when @code{gdbserver} is run to listen on a TCP
+port.
 
 @code{gdbserver} normally terminates after all of its debugged processes have
 terminated in @kbd{target remote} mode.  On the other hand, for @kbd{target
@@ -19408,6 +20197,12 @@ instance closes its port after the first
 @anchor{Other Command-Line Arguments for gdbserver}
 @subsubsection Other Command-Line Arguments for @code{gdbserver}
 
+You can use the @option{--multi} option to start @code{gdbserver} without
+specifying a program to debug or a process to attach to.  Then you can
+attach in @code{target extended-remote} mode and run or attach to a
+program.  For more information,
+@pxref{--multi Option in Types of Remote Connnections}.
+
 @cindex @option{--debug}, @code{gdbserver} option
 The @option{--debug} option tells @code{gdbserver} to display extra
 status information about the debugging process.
@@ -19459,32 +20254,34 @@ environment:
 
 @subsection Connecting to @code{gdbserver}
 
-Run @value{GDBN} on the host system.
+The basic procedure for connecting to the remote target is:
+@itemize
 
-First make sure you have the necessary symbol files.  Load symbols for
-your application using the @code{file} command before you connect.  Use
-@code{set sysroot} to locate target libraries (unless your @value{GDBN}
-was compiled with the correct sysroot using @code{--with-sysroot}).
+@item
+Run @value{GDBN} on the host system.
 
-The symbol file and target libraries must exactly match the executable
-and libraries on the target, with one exception: the files on the host
-system should not be stripped, even if the files on the target system
-are.  Mismatched or missing files will lead to confusing results
-during debugging.  On @sc{gnu}/Linux targets, mismatched or missing
-files may also prevent @code{gdbserver} from debugging multi-threaded
-programs.
+@item
+Make sure you have the necessary symbol files
+(@pxref{Host and target files}).
+Load symbols for your application using the @code{file} command before you
+connect.  Use @code{set sysroot} to locate target libraries (unless your
+@value{GDBN} was compiled with the correct sysroot using
+@code{--with-sysroot}).
 
+@item
 Connect to your target (@pxref{Connecting,,Connecting to a Remote Target}).
 For TCP connections, you must start up @code{gdbserver} prior to using
-the @code{target remote} command.  Otherwise you may get an error whose
+the @code{target} command.  Otherwise you may get an error whose
 text depends on the host system, but which usually looks something like
 @samp{Connection refused}.  Don't use the @code{load}
-command in @value{GDBN} when using @code{gdbserver}, since the program is
-already on the target.
+command in @value{GDBN} when using @code{target remote} mode, since the
+program is already on the target.
+
+@end itemize
 
+@anchor{Monitor Commands for gdbserver}
 @subsection Monitor Commands for @code{gdbserver}
 @cindex monitor commands, for @code{gdbserver}
-@anchor{Monitor Commands for gdbserver}
 
 During a @value{GDBN} session using @code{gdbserver}, you can use the
 @code{monitor} command to send special requests to @code{gdbserver}.
@@ -19938,6 +20735,10 @@ are:
 @tab @code{qSupported}
 @tab Remote communications parameters
 
+@item @code{catch-syscalls}
+@tab @code{QCatchSyscalls}
+@tab @code{catch syscall}
+
 @item @code{pass-signals}
 @tab @code{QPassSignals}
 @tab @code{handle @var{signal}}
@@ -20014,6 +20815,10 @@ are:
 @tab @code{Z0 and Z1}
 @tab @code{Support for target-side breakpoint condition evaluation}
 
+@item @code{multiprocess-extensions}
+@tab @code{multiprocess extensions}
+@tab Debug multiple processes and remote process PID awareness
+
 @item @code{swbreak-feature}
 @tab @code{swbreak stop reason}
 @tab @code{break}
@@ -20030,6 +20835,18 @@ are:
 @tab @code{vfork stop reason}
 @tab @code{vfork}
 
+@item @code{exec-event-feature}
+@tab @code{exec stop reason}
+@tab @code{exec}
+
+@item @code{thread-events}
+@tab @code{QThreadEvents}
+@tab Tracking thread lifetime.
+
+@item @code{no-resumed-stop-reply}
+@tab @code{no resumed thread left stop reply}
+@tab Tracking thread lifetime.
+
 @end multitable
 
 @node Remote Stub
@@ -20375,7 +21192,6 @@ This section describes details specific 
 configurations.
 
 @menu
-* HP-UX::                       HP-UX
 * BSD libkvm Interface::	Debugging BSD kernel memory images
 * SVR4 Process Information::    SVR4 process information
 * DJGPP Native::                Features specific to the DJGPP port
@@ -20384,14 +21200,6 @@ configurations.
 * Darwin::			Features specific to Darwin
 @end menu
 
-@node HP-UX
-@subsection HP-UX
-
-On HP-UX systems, if you refer to a function or variable name that
-begins with a dollar sign, @value{GDBN} searches for a user or system
-name first, before it searches for a convenience variable.
-
-
 @node BSD libkvm Interface
 @subsection BSD libkvm Interface
 
@@ -20446,7 +21254,7 @@ If @value{GDBN} is configured for an ope
 facility, the command @code{info proc} is available to report
 information about the process running your program, or about any
 process running on your system.  This includes, as of this writing,
-@sc{gnu}/Linux and Solaris, but not HP-UX, for example.
+@sc{gnu}/Linux and Solaris, for example.
 
 This command may also work on core files that were created on a system
 that has the @samp{/proc} facility.
@@ -20797,6 +21605,35 @@ This command displays thread specific in
 Thread Information Block (readable on the X86 CPU family using @code{$fs}
 selector for 32-bit programs and @code{$gs} for 64-bit programs).
 
+@kindex signal-event
+@item signal-event @var{id}
+This command signals an event with user-provided @var{id}.  Used to resume
+crashing process when attached to it using MS-Windows JIT debugging (AeDebug).
+
+To use it, create or edit the following keys in
+@code{HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug} and/or
+@code{HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug}
+(for x86_64 versions):
+
+@itemize @minus
+@item
+@code{Debugger} (REG_SZ) --- a command to launch the debugger.
+Suggested command is: @code{@var{fully-qualified-path-to-gdb.exe} -ex
+"attach %ld" -ex "signal-event %ld" -ex "continue"}.
+
+The first @code{%ld} will be replaced by the process ID of the
+crashing process, the second @code{%ld} will be replaced by the ID of
+the event that blocks the crashing process, waiting for @value{GDBN}
+to attach.
+
+@item
+@code{Auto} (REG_SZ) --- either @code{1} or @code{0}.  @code{1} will
+make the system run debugger specified by the Debugger key
+automatically, @code{0} will cause a dialog box with ``OK'' and
+``Cancel'' buttons to appear, which allows the user to either
+terminate the crashing process (OK) or debug it (Cancel).
+@end itemize
+
 @kindex set cygwin-exceptions
 @cindex debugging the Cygwin DLL
 @cindex Cygwin DLL, debugging
@@ -21235,38 +22072,44 @@ acceptable commands.
 
 
 @menu
-* ARM::                         ARM RDI
-* M32R/D::                      Renesas M32R/D
+* ARC::                         Synopsys ARC
+* ARM::                         ARM
 * M68K::                        Motorola M68K
 * MicroBlaze::			Xilinx MicroBlaze
 * MIPS Embedded::               MIPS Embedded
 * PowerPC Embedded::            PowerPC Embedded
-* PA::                          HP PA Embedded
-* Sparclet::                    Tsqware Sparclet
-* Sparclite::                   Fujitsu Sparclite
-* Z8000::                       Zilog Z8000
 * AVR::                         Atmel AVR
 * CRIS::                        CRIS
 * Super-H::                     Renesas Super-H
 @end menu
 
-@node ARM
-@subsection ARM
-@cindex ARM RDI
+@node ARC
+@subsection Synopsys ARC
+@cindex Synopsys ARC
+@cindex ARC specific commands
+@cindex ARC600
+@cindex ARC700
+@cindex ARC EM
+@cindex ARC HS
+
+@value{GDBN} provides the following ARC-specific commands:
+
+@table @code
+@item set debug arc
+@kindex set debug arc
+Control the level of ARC specific debug messages.  Use 0 for no messages (the
+default) and 1 for debug messages.  At present higher values offer no further
+messages.
 
-@table @code
-@kindex target rdi
-@item target rdi @var{dev}
-ARM Angel monitor, via RDI library interface to ADP protocol.  You may
-use this target to communicate with both boards running the Angel
-monitor, or with the EmbeddedICE JTAG debug device.
-
-@kindex target rdp
-@item target rdp @var{dev}
-ARM Demon monitor.
+@item show debug arc
+@kindex show debug arc
+Show the level of ARC specific debugging in operation.
 
 @end table
 
+@node ARM
+@subsection ARM
+
 @value{GDBN} provides the following ARM-specific commands:
 
 @table @code
@@ -21341,50 +22184,6 @@ target support subsystem.
 Show whether ARM-specific debugging messages are enabled.
 @end table
 
-The following commands are available when an ARM target is debugged
-using the RDI interface:
-
-@table @code
-@item rdilogfile @r{[}@var{file}@r{]}
-@kindex rdilogfile
-@cindex ADP (Angel Debugger Protocol) logging
-Set the filename for the ADP (Angel Debugger Protocol) packet log.
-With an argument, sets the log file to the specified @var{file}.  With
-no argument, show the current log file name.  The default log file is
-@file{rdi.log}.
-
-@item rdilogenable @r{[}@var{arg}@r{]}
-@kindex rdilogenable
-Control logging of ADP packets.  With an argument of 1 or @code{"yes"}
-enables logging, with an argument 0 or @code{"no"} disables it.  With
-no arguments displays the current setting.  When logging is enabled,
-ADP packets exchanged between @value{GDBN} and the RDI target device
-are logged to a file.
-
-@item set rdiromatzero
-@kindex set rdiromatzero
-@cindex ROM at zero address, RDI
-Tell @value{GDBN} whether the target has ROM at address 0.  If on,
-vector catching is disabled, so that zero address can be used.  If off
-(the default), vector catching is enabled.  For this command to take
-effect, it needs to be invoked prior to the @code{target rdi} command.
-
-@item show rdiromatzero
-@kindex show rdiromatzero
-Show the current setting of ROM at zero address.
-
-@item set rdiheartbeat
-@kindex set rdiheartbeat
-@cindex RDI heartbeat
-Enable or disable RDI heartbeat packets.  It is not recommended to
-turn on this option, since it confuses ARM and EPI JTAG interface, as
-well as the Angel monitor.
-
-@item show rdiheartbeat
-@kindex show rdiheartbeat
-Show the setting of RDI heartbeat packets.
-@end table
-
 @table @code
 @item target sim @r{[}@var{simargs}@r{]} @dots{} 
 The @value{GDBN} ARM simulator accepts the following optional arguments.
@@ -21405,108 +22204,10 @@ The default value is @code{all}.
 @end table
 @end table
 
-@node M32R/D
-@subsection Renesas M32R/D and M32R/SDI
-
-@table @code
-@kindex target m32r
-@item target m32r @var{dev}
-Renesas M32R/D ROM monitor.
-
-@kindex target m32rsdi
-@item target m32rsdi @var{dev}
-Renesas M32R SDI server, connected via parallel port to the board.
-@end table
-
-The following @value{GDBN} commands are specific to the M32R monitor:
-
-@table @code
-@item set download-path @var{path}
-@kindex set download-path
-@cindex find downloadable @sc{srec} files (M32R)
-Set the default path for finding downloadable @sc{srec} files.
-
-@item show download-path
-@kindex show download-path
-Show the default path for downloadable @sc{srec} files.
-
-@item set board-address @var{addr}
-@kindex set board-address
-@cindex M32-EVA target board address
-Set the IP address for the M32R-EVA target board.
-
-@item show board-address
-@kindex show board-address
-Show the current IP address of the target board.
-
-@item set server-address @var{addr}
-@kindex set server-address
-@cindex download server address (M32R)
-Set the IP address for the download server, which is the @value{GDBN}'s
-host machine.
-
-@item show server-address
-@kindex show server-address
-Display the IP address of the download server.
-
-@item upload @r{[}@var{file}@r{]}
-@kindex upload@r{, M32R}
-Upload the specified @sc{srec} @var{file} via the monitor's Ethernet
-upload capability.  If no @var{file} argument is given, the current
-executable file is uploaded.
-
-@item tload @r{[}@var{file}@r{]}
-@kindex tload@r{, M32R}
-Test the @code{upload} command.
-@end table
-
-The following commands are available for M32R/SDI:
-
-@table @code
-@item sdireset
-@kindex sdireset
-@cindex reset SDI connection, M32R
-This command resets the SDI connection.
-
-@item sdistatus
-@kindex sdistatus
-This command shows the SDI connection status.
-
-@item debug_chaos
-@kindex debug_chaos
-@cindex M32R/Chaos debugging
-Instructs the remote that M32R/Chaos debugging is to be used.
-
-@item use_debug_dma
-@kindex use_debug_dma
-Instructs the remote to use the DEBUG_DMA method of accessing memory.
-
-@item use_mon_code
-@kindex use_mon_code
-Instructs the remote to use the MON_CODE method of accessing memory.
-
-@item use_ib_break
-@kindex use_ib_break
-Instructs the remote to set breakpoints by IB break.
-
-@item use_dbt_break
-@kindex use_dbt_break
-Instructs the remote to set breakpoints by DBT.
-@end table
-
 @node M68K
 @subsection M68k
 
-The Motorola m68k configuration includes ColdFire support, and a
-target command for the following ROM monitor.
-
-@table @code
-
-@kindex target dbug
-@item target dbug @var{dev}
-dBUG ROM monitor for Motorola ColdFire.
-
-@end table
+The Motorola m68k configuration includes ColdFire support.
 
 @node MicroBlaze
 @subsection MicroBlaze
@@ -21549,67 +22250,8 @@ Show MicroBlaze-specific debugging level
 @node MIPS Embedded
 @subsection @acronym{MIPS} Embedded
 
-@cindex @acronym{MIPS} boards
-@value{GDBN} can use the @acronym{MIPS} remote debugging protocol to talk to a
-@acronym{MIPS} board attached to a serial line.  This is available when
-you configure @value{GDBN} with @samp{--target=mips-elf}.
-
-@need 1000
-Use these @value{GDBN} commands to specify the connection to your target board:
-
-@table @code
-@item target mips @var{port}
-@kindex target mips @var{port}
-To run a program on the board, start up @code{@value{GDBP}} with the
-name of your program as the argument.  To connect to the board, use the
-command @samp{target mips @var{port}}, where @var{port} is the name of
-the serial port connected to the board.  If the program has not already
-been downloaded to the board, you may use the @code{load} command to
-download it.  You can then use all the usual @value{GDBN} commands.
-
-For example, this sequence connects to the target board through a serial
-port, and loads and runs a program called @var{prog} through the
-debugger:
-
-@smallexample
-host$ @value{GDBP} @var{prog}
-@value{GDBN} is free software and @dots{}
-(@value{GDBP}) target mips /dev/ttyb
-(@value{GDBP}) load @var{prog}
-(@value{GDBP}) run
-@end smallexample
-
-@item target mips @var{hostname}:@var{portnumber}
-On some @value{GDBN} host configurations, you can specify a TCP
-connection (for instance, to a serial line managed by a terminal
-concentrator) instead of a serial port, using the syntax
-@samp{@var{hostname}:@var{portnumber}}.
-
-@item target pmon @var{port}
-@kindex target pmon @var{port}
-PMON ROM monitor.
-
-@item target ddb @var{port}
-@kindex target ddb @var{port}
-NEC's DDB variant of PMON for Vr4300.
-
-@item target lsi @var{port}
-@kindex target lsi @var{port}
-LSI variant of PMON.
-
-@kindex target r3900
-@item target r3900 @var{dev}
-Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
-
-@kindex target array
-@item target array @var{dev}
-Array Tech LSI33K RAID controller board.
-
-@end table
-
-
 @noindent
-@value{GDBN} also supports these special commands for @acronym{MIPS} targets:
+@value{GDBN} supports these special commands for @acronym{MIPS} targets:
 
 @table @code
 @item set mipsfpu double
@@ -21639,78 +22281,6 @@ and @samp{set mipsfpu off} will select n
 
 As usual, you can inquire about the @code{mipsfpu} variable with
 @samp{show mipsfpu}.
-
-@item set timeout @var{seconds}
-@itemx set retransmit-timeout @var{seconds}
-@itemx show timeout
-@itemx show retransmit-timeout
-@cindex @code{timeout}, @acronym{MIPS} protocol
-@cindex @code{retransmit-timeout}, @acronym{MIPS} protocol
-@kindex set timeout
-@kindex show timeout
-@kindex set retransmit-timeout
-@kindex show retransmit-timeout
-You can control the timeout used while waiting for a packet, in the @acronym{MIPS}
-remote protocol, with the @code{set timeout @var{seconds}} command.  The
-default is 5 seconds.  Similarly, you can control the timeout used while
-waiting for an acknowledgment of a packet with the @code{set
-retransmit-timeout @var{seconds}} command.  The default is 3 seconds.
-You can inspect both values with @code{show timeout} and @code{show
-retransmit-timeout}.  (These commands are @emph{only} available when
-@value{GDBN} is configured for @samp{--target=mips-elf}.)
-
-The timeout set by @code{set timeout} does not apply when @value{GDBN}
-is waiting for your program to stop.  In that case, @value{GDBN} waits
-forever because it has no way of knowing how long the program is going
-to run before stopping.
-
-@item set syn-garbage-limit @var{num}
-@kindex set syn-garbage-limit@r{, @acronym{MIPS} remote}
-@cindex synchronize with remote @acronym{MIPS} target
-Limit the maximum number of characters @value{GDBN} should ignore when
-it tries to synchronize with the remote target.  The default is 10
-characters.  Setting the limit to -1 means there's no limit.
-
-@item show syn-garbage-limit
-@kindex show syn-garbage-limit@r{, @acronym{MIPS} remote}
-Show the current limit on the number of characters to ignore when
-trying to synchronize with the remote system.
-
-@item set monitor-prompt @var{prompt}
-@kindex set monitor-prompt@r{, @acronym{MIPS} remote}
-@cindex remote monitor prompt
-Tell @value{GDBN} to expect the specified @var{prompt} string from the
-remote monitor.  The default depends on the target:
-@table @asis
-@item pmon target
-@samp{PMON}
-@item ddb target
-@samp{NEC010}
-@item lsi target
-@samp{PMON>}
-@end table
-
-@item show monitor-prompt
-@kindex show monitor-prompt@r{, @acronym{MIPS} remote}
-Show the current strings @value{GDBN} expects as the prompt from the
-remote monitor.
-
-@item set monitor-warnings
-@kindex set monitor-warnings@r{, @acronym{MIPS} remote}
-Enable or disable monitor warnings about hardware breakpoints.  This
-has effect only for the @code{lsi} target.  When on, @value{GDBN} will
-display warning messages whose codes are returned by the @code{lsi}
-PMON monitor for breakpoint commands.
-
-@item show monitor-warnings
-@kindex show monitor-warnings@r{, @acronym{MIPS} remote}
-Show the current setting of printing monitor warnings.
-
-@item pmon @var{command}
-@kindex pmon@r{, @acronym{MIPS} remote}
-@cindex send PMON command
-This command allows sending an arbitrary @var{command} string to the
-monitor.  The monitor must be in debug mode for this to work.
 @end table
 
 @node PowerPC Embedded
@@ -21791,270 +22361,8 @@ Allow @value{GDBN} to use only one debug
 of scalar type, thus assuming that the variable is accessed through the
 address of its first byte.
 
-@kindex target dink32
-@item target dink32 @var{dev}
-DINK32 ROM monitor.
-
-@kindex target ppcbug
-@item target ppcbug @var{dev}
-@kindex target ppcbug1
-@item target ppcbug1 @var{dev}
-PPCBUG ROM monitor for PowerPC.
-
-@kindex target sds
-@item target sds @var{dev}
-SDS monitor, running on a PowerPC board (such as Motorola's ADS).
-@end table
-
-@cindex SDS protocol
-The following commands specific to the SDS protocol are supported
-by @value{GDBN}:
-
-@table @code
-@item set sdstimeout @var{nsec}
-@kindex set sdstimeout
-Set the timeout for SDS protocol reads to be @var{nsec} seconds.  The
-default is 2 seconds.
-
-@item show sdstimeout
-@kindex show sdstimeout
-Show the current value of the SDS timeout.
-
-@item sds @var{command}
-@kindex sds@r{, a command}
-Send the specified @var{command} string to the SDS monitor.
-@end table
-
-
-@node PA
-@subsection HP PA Embedded
-
-@table @code
-
-@kindex target op50n
-@item target op50n @var{dev}
-OP50N monitor, running on an OKI HPPA board.
-
-@kindex target w89k
-@item target w89k @var{dev}
-W89K monitor, running on a Winbond HPPA board.
-
-@end table
-
-@node Sparclet
-@subsection Tsqware Sparclet
-
-@cindex Sparclet
-
-@value{GDBN} enables developers to debug tasks running on
-Sparclet targets from a Unix host.
-@value{GDBN} uses code that runs on
-both the Unix host and on the Sparclet target.  The program
-@code{@value{GDBP}} is installed and executed on the Unix host.
-
-@table @code
-@item remotetimeout @var{args}
-@kindex remotetimeout
-@value{GDBN} supports the option @code{remotetimeout}.
-This option is set by the user, and @var{args} represents the number of
-seconds @value{GDBN} waits for responses.
-@end table
-
-@cindex compiling, on Sparclet
-When compiling for debugging, include the options @samp{-g} to get debug
-information and @samp{-Ttext} to relocate the program to where you wish to
-load it on the target.  You may also want to add the options @samp{-n} or
-@samp{-N} in order to reduce the size of the sections.  Example:
-
-@smallexample
-sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
-@end smallexample
-
-You can use @code{objdump} to verify that the addresses are what you intended:
-
-@smallexample
-sparclet-aout-objdump --headers --syms prog
-@end smallexample
-
-@cindex running, on Sparclet
-Once you have set
-your Unix execution search path to find @value{GDBN}, you are ready to
-run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}}
-(or @code{sparclet-aout-gdb}, depending on your installation).
-
-@value{GDBN} comes up showing the prompt:
-
-@smallexample
-(gdbslet)
-@end smallexample
-
-@menu
-* Sparclet File::                Setting the file to debug
-* Sparclet Connection::          Connecting to Sparclet
-* Sparclet Download::            Sparclet download
-* Sparclet Execution::           Running and debugging
-@end menu
-
-@node Sparclet File
-@subsubsection Setting File to Debug
-
-The @value{GDBN} command @code{file} lets you choose with program to debug.
-
-@smallexample
-(gdbslet) file prog
-@end smallexample
-
-@need 1000
-@value{GDBN} then attempts to read the symbol table of @file{prog}.
-@value{GDBN} locates
-the file by searching the directories listed in the command search
-path.
-If the file was compiled with debug information (option @samp{-g}), source
-files will be searched as well.
-@value{GDBN} locates
-the source files by searching the directories listed in the directory search
-path (@pxref{Environment, ,Your Program's Environment}).
-If it fails
-to find a file, it displays a message such as:
-
-@smallexample
-prog: No such file or directory.
-@end smallexample
-
-When this happens, add the appropriate directories to the search paths with
-the @value{GDBN} commands @code{path} and @code{dir}, and execute the
-@code{target} command again.
-
-@node Sparclet Connection
-@subsubsection Connecting to Sparclet
-
-The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
-To connect to a target on serial port ``@code{ttya}'', type:
-
-@smallexample
-(gdbslet) target sparclet /dev/ttya
-Remote target sparclet connected to /dev/ttya
-main () at ../prog.c:3
-@end smallexample
-
-@need 750
-@value{GDBN} displays messages like these:
-
-@smallexample
-Connected to ttya.
-@end smallexample
-
-@node Sparclet Download
-@subsubsection Sparclet Download
-
-@cindex download to Sparclet
-Once connected to the Sparclet target,
-you can use the @value{GDBN}
-@code{load} command to download the file from the host to the target.
-The file name and load offset should be given as arguments to the @code{load}
-command.
-Since the file format is aout, the program must be loaded to the starting
-address.  You can use @code{objdump} to find out what this value is.  The load
-offset is an offset which is added to the VMA (virtual memory address)
-of each of the file's sections.
-For instance, if the program
-@file{prog} was linked to text address 0x1201000, with data at 0x12010160
-and bss at 0x12010170, in @value{GDBN}, type:
-
-@smallexample
-(gdbslet) load prog 0x12010000
-Loading section .text, size 0xdb0 vma 0x12010000
-@end smallexample
-
-If the code is loaded at a different address then what the program was linked
-to, you may need to use the @code{section} and @code{add-symbol-file} commands
-to tell @value{GDBN} where to map the symbol table.
-
-@node Sparclet Execution
-@subsubsection Running and Debugging
-
-@cindex running and debugging Sparclet programs
-You can now begin debugging the task using @value{GDBN}'s execution control
-commands, @code{b}, @code{step}, @code{run}, etc.  See the @value{GDBN}
-manual for the list of commands.
-
-@smallexample
-(gdbslet) b main
-Breakpoint 1 at 0x12010000: file prog.c, line 3.
-(gdbslet) run
-Starting program: prog
-Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
-3        char *symarg = 0;
-(gdbslet) step
-4        char *execarg = "hello!";
-(gdbslet)
-@end smallexample
-
-@node Sparclite
-@subsection Fujitsu Sparclite
-
-@table @code
-
-@kindex target sparclite
-@item target sparclite @var{dev}
-Fujitsu sparclite boards, used only for the purpose of loading.
-You must use an additional command to debug the program.
-For example: target remote @var{dev} using @value{GDBN} standard
-remote protocol.
-
-@end table
-
-@node Z8000
-@subsection Zilog Z8000
-
-@cindex Z8000
-@cindex simulator, Z8000
-@cindex Zilog Z8000 simulator
-
-When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
-a Z8000 simulator.
-
-For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
-unsegmented variant of the Z8000 architecture) or the Z8001 (the
-segmented variant).  The simulator recognizes which architecture is
-appropriate by inspecting the object code.
-
-@table @code
-@item target sim @var{args}
-@kindex sim
-@kindex target sim@r{, with Z8000}
-Debug programs on a simulated CPU.  If the simulator supports setup
-options, specify them via @var{args}.
-@end table
-
-@noindent
-After specifying this target, you can debug programs for the simulated
-CPU in the same style as programs for your host computer; use the
-@code{file} command to load a new program image, the @code{run} command
-to run your program, and so on.
-
-As well as making available all the usual machine registers
-(@pxref{Registers, ,Registers}), the Z8000 simulator provides three
-additional items of information as specially named registers:
-
-@table @code
-
-@item cycles
-Counts clock-ticks in the simulator.
-
-@item insts
-Counts instructions run in the simulator.
-
-@item time
-Execution time in 60ths of a second.
-
 @end table
 
-You can refer to these values in @value{GDBN} expressions with the usual
-conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a
-conditional breakpoint that suspends only after at least 5000
-simulated clock ticks.
-
 @node AVR
 @subsection Atmel AVR
 @cindex AVR
@@ -22192,8 +22500,8 @@ from functions.
 @end table
 
 
-@subsubsection Intel(R) @dfn{Memory Protection Extensions} (MPX).
-@cindex Intel(R) Memory Protection Extensions (MPX).
+@subsubsection Intel @dfn{Memory Protection Extensions} (MPX).
+@cindex Intel Memory Protection Extensions (MPX).
 
 Memory Protection Extension (MPX) adds the bound registers @samp{BND0}
 @footnote{The register named with capital letters represent the architecture
@@ -23552,6 +23860,11 @@ expression parsing.  The default is off.
 @item show debug expression
 Displays the current state of displaying debugging info about
 @value{GDBN} expression parsing.
+@item set debug fbsd-lwp
+@cindex FreeBSD LWP debug messages
+Turns on or off debugging messages from the FreeBSD LWP debug support.
+@item show debug fbsd-lwp
+Show the current state of FreeBSD LWP debugging messages.
 @item set debug frame
 @cindex frame debugging info
 Turns on or off display of @value{GDBN} frame debugging info.  The
@@ -23561,7 +23874,7 @@ Displays the current state of displaying
 info.
 @item set debug gnu-nat
 @cindex @sc{gnu}/Hurd debug messages
-Turns on or off debugging messages from the @sc{gnu}/Hurd debug support.
+Turn on or off debugging messages from the @sc{gnu}/Hurd debug support.
 @item show debug gnu-nat
 Show the current state of @sc{gnu}/Hurd debugging messages.
 @item set debug infrun
@@ -23573,18 +23886,18 @@ for implementing operations such as sing
 Displays the current state of @value{GDBN} inferior debugging.
 @item set debug jit
 @cindex just-in-time compilation, debugging messages
-Turns on or off debugging messages from JIT debug support.
+Turn on or off debugging messages from JIT debug support.
 @item show debug jit
 Displays the current state of @value{GDBN} JIT debugging.
 @item set debug lin-lwp
 @cindex @sc{gnu}/Linux LWP debug messages
 @cindex Linux lightweight processes
-Turns on or off debugging messages from the Linux LWP debug support.
+Turn on or off debugging messages from the Linux LWP debug support.
 @item show debug lin-lwp
 Show the current state of Linux LWP debugging messages.
 @item set debug linux-namespaces
 @cindex @sc{gnu}/Linux namespaces debug messages
-Turns on or off debugging messages from the Linux namespaces debug support.
+Turn on or off debugging messages from the Linux namespaces debug support.
 @item show debug linux-namespaces
 Show the current state of Linux namespaces debugging messages.
 @item set debug mach-o
@@ -23596,7 +23909,7 @@ Displays the current state of displaying
 reading of COFF/PE exported symbols.
 @item set debug notification
 @cindex remote async notification debugging info
-Turns on or off debugging messages about remote async notification.
+Turn on or off debugging messages about remote async notification.
 The default is off.
 @item show debug notification
 Displays the current state of remote async notification debugging messages.
@@ -23642,7 +23955,7 @@ Displays the current state of displaying
 info.
 @item set debug solib-frv
 @cindex FR-V shared-library debugging
-Turns on or off debugging messages for FR-V shared-library code.
+Turn on or off debugging messages for FR-V shared-library code.
 @item show debug solib-frv
 Display the current state of FR-V shared-library code debugging
 messages.
@@ -23694,7 +24007,7 @@ Displays the current state of displaying
 debugging info.
 @item set debug xml
 @cindex XML parser debugging
-Turns on or off debugging messages for built-in XML parsers.
+Turn on or off debugging messages for built-in XML parsers.
 @item show debug xml
 Displays the current state of XML debugging messages.
 @end table
@@ -23799,9 +24112,9 @@ files.
 @cindex arguments, to user-defined commands
 A @dfn{user-defined command} is a sequence of @value{GDBN} commands to
 which you assign a new name as a command.  This is done with the
-@code{define} command.  User commands may accept up to 10 arguments
+@code{define} command.  User commands may accept an unlimited number of arguments
 separated by whitespace.  Arguments are accessed within the user command
-via @code{$arg0@dots{}$arg9}.  A trivial example:
+via @code{$arg0@dots{}$argN}.  A trivial example:
 
 @smallexample
 define adder
@@ -23825,7 +24138,7 @@ functions calls.
 @cindex argument count in user-defined commands
 @cindex how many arguments (user-defined commands)
 In addition, @code{$argc} may be used to find out how many arguments have
-been passed.  This expands to a number in the range 0@dots{}10.
+been passed.
 
 @smallexample
 define adder
@@ -23838,6 +24151,21 @@ define adder
 end
 @end smallexample
 
+Combining with the @code{eval} command (@pxref{eval}) makes it easier
+to process a variable number of arguments:
+
+@smallexample
+define adder
+  set $i = 0
+  set $sum = 0
+  while $i < $argc
+    eval "set $sum = $sum + $arg%d", $i
+    set $i = $i + 1
+  end
+  print $sum
+end
+@end smallexample
+
 @table @code
 
 @kindex define
@@ -24268,6 +24596,7 @@ Here's an example of printing DFP types 
 printf "D32: %Hf - D64: %Df - D128: %DDf\n",1.2345df,1.2E10dd,1.2E1dl
 @end smallexample
 
+@anchor{eval}
 @kindex eval
 @item eval @var{template}, @var{expressions}@dots{}
 Convert the values of one or more @var{expressions} under the control of
@@ -24737,18 +25066,11 @@ The @sc{gdb/mi} interface included in @v
 @end table
 
 @cindex invoke another interpreter
-The interpreter being used by @value{GDBN} may not be dynamically
-switched at runtime.  Although possible, this could lead to a very
-precarious situation.  Consider an IDE using @sc{gdb/mi}.  If a user
-enters the command "interpreter-set console" in a console view,
-@value{GDBN} would switch to using the console interpreter, rendering
-the IDE inoperable!
 
 @kindex interpreter-exec
-Although you may only choose a single interpreter at startup, you may execute
-commands in any interpreter from the current interpreter using the appropriate
-command.  If you are running the console interpreter, simply use the
-@code{interpreter-exec} command:
+You may execute commands in any interpreter from the current
+interpreter using the appropriate command.  If you are running the
+console interpreter, simply use the @code{interpreter-exec} command:
 
 @smallexample
 interpreter-exec mi "-data-list-register-names"
@@ -24757,6 +25079,49 @@ interpreter-exec mi "-data-list-register
 @sc{gdb/mi} has a similar command, although it is only available in versions of
 @value{GDBN} which support @sc{gdb/mi} version 2 (or greater).
 
+Note that @code{interpreter-exec} only changes the interpreter for the
+duration of the specified command.  It does not change the interpreter
+permanently.
+
+@cindex start a new independent interpreter
+
+Although you may only choose a single interpreter at startup, it is
+possible to run an independent interpreter on a specified input/output
+device (usually a tty).
+
+For example, consider a debugger GUI or IDE that wants to provide a
+@value{GDBN} console view.  It may do so by embedding a terminal
+emulator widget in its GUI, starting @value{GDBN} in the traditional
+command-line mode with stdin/stdout/stderr redirected to that
+terminal, and then creating an MI interpreter running on a specified
+input/output device.  The console interpreter created by @value{GDBN}
+at startup handles commands the user types in the terminal widget,
+while the GUI controls and synchronizes state with @value{GDBN} using
+the separate MI interpreter.
+
+To start a new secondary @dfn{user interface} running MI, use the
+@code{new-ui} command:
+
+@kindex new-ui
+@cindex new user interface
+@smallexample
+new-ui @var{interpreter} @var{tty}
+@end smallexample
+
+The @var{interpreter} parameter specifies the interpreter to run.
+This accepts the same values as the @code{interpreter-exec} command.
+For example, @samp{console}, @samp{mi}, @samp{mi2}, etc.  The
+@var{tty} parameter specifies the name of the bidirectional file the
+interpreter uses for input/output, usually the name of a
+pseudoterminal slave on Unix systems.  For example:
+
+@smallexample
+(@value{GDBP}) new-ui mi /dev/pts/9
+@end smallexample
+
+@noindent
+runs an MI interpreter on @file{/dev/pts/9}.
+
 @node TUI
 @chapter @value{GDBN} Text User Interface
 @cindex TUI
@@ -24781,7 +25146,7 @@ The TUI mode is enabled by default when 
 @samp{@value{GDBP} -tui}.
 You can also switch in and out of TUI mode while @value{GDBN} runs by
 using various TUI commands and key bindings, such as @command{tui
-enable} or @kbd{C-x C-a}.  @xref{TUI Commands, ,TUI Commands} and
+enable} or @kbd{C-x C-a}.  @xref{TUI Commands, ,TUI Commands}, and
 @ref{TUI Keys, ,TUI Key Bindings}.
 
 @node TUI Overview
@@ -25070,43 +25435,58 @@ Disable TUI mode, returning to the conso
 @kindex info win
 List and give the size of all displayed windows.
 
-@item layout next
+@item layout @var{name}
 @kindex layout
+Changes which TUI windows are displayed.  In each layout the command
+window is always displayed, the @var{name} parameter controls which
+additional windows are displayed, and can be any of the following:
+
+@table @code
+@item next
 Display the next layout.
 
-@item layout prev
+@item prev
 Display the previous layout.
 
-@item layout src
-Display the source window only.
+@item src
+Display the source and command windows.
 
-@item layout asm
-Display the assembly window only.
+@item asm
+Display the assembly and command windows.
 
-@item layout split
-Display the source and assembly window.
+@item split
+Display the source, assembly, and command windows.
 
-@item layout regs
-Display the register window together with the source or assembly window.
+@item regs
+When in @code{src} layout display the register, source, and command
+windows.  When in @code{asm} or @code{split} layout display the
+register, assembler, and command windows.
+@end table
 
-@item focus next
+@item focus @var{name}
 @kindex focus
+Changes which TUI window is currently active for scrolling.  The
+@var{name} parameter can be any of the following:
+
+@table @code
+@item next
 Make the next window active for scrolling.
 
-@item focus prev
+@item prev
 Make the previous window active for scrolling.
 
-@item focus src
+@item src
 Make the source window active for scrolling.
 
-@item focus asm
+@item asm
 Make the assembly window active for scrolling.
 
-@item focus regs
+@item regs
 Make the register window active for scrolling.
 
-@item focus cmd
+@item cmd
 Make the command window active for scrolling.
+@end table
 
 @item refresh
 @kindex refresh
@@ -25517,19 +25897,19 @@ increases the risk that by relying on im
 frontend may be operating on a wrong one.  Therefore, each MI command
 should explicitly specify which thread and frame to operate on.  To
 make it possible, each MI command accepts the @samp{--thread} and
-@samp{--frame} options, the value to each is @value{GDBN} identifier
-for thread and frame to operate on.
+@samp{--frame} options, the value to each is @value{GDBN} global
+identifier for thread and frame to operate on.
 
 Usually, each top-level window in a frontend allows the user to select
 a thread and a frame, and remembers the user selection for further
 operations.  However, in some cases @value{GDBN} may suggest that the
-current thread be changed.  For example, when stopping on a breakpoint
-it is reasonable to switch to the thread where breakpoint is hit.  For
-another example, if the user issues the CLI @samp{thread} command via
-the frontend, it is desirable to change the frontend's selected thread to the
-one specified by user.  @value{GDBN} communicates the suggestion to
-change current thread using the @samp{=thread-selected} notification.
-No such notification is available for the selected frame at the moment.
+current thread or frame be changed.  For example, when stopping on a
+breakpoint it is reasonable to switch to the thread where breakpoint is
+hit.  For another example, if the user issues the CLI @samp{thread} or
+@samp{frame} commands via the frontend, it is desirable to change the
+frontend's selection to the one specified by user.  @value{GDBN}
+communicates the suggestion to change current thread and frame using the
+@samp{=thread-selected} notification.
 
 Note that historically, MI shares the selected thread with CLI, so 
 frontends used the @code{-thread-select} to execute commands in the
@@ -26071,15 +26451,16 @@ The following is the list of possible as
 @table @code
 
 @item *running,thread-id="@var{thread}"
-The target is now running.  The @var{thread} field tells which
-specific thread is now running, and can be @samp{all} if all threads
-are running.  The frontend should assume that no interaction with a 
-running thread is possible after this notification is produced.
-The frontend should not assume that this notification is output
-only once for any command.  @value{GDBN} may emit this notification 
-several times, either for different threads, because it cannot resume
-all threads together, or even for a single thread, if the thread must
-be stepped though some code before letting it run freely.
+The target is now running.  The @var{thread} field can be the global
+thread ID of the the thread that is now running, and it can be
+@samp{all} if all threads are running.  The frontend should assume
+that no interaction with a running thread is possible after this
+notification is produced.  The frontend should not assume that this
+notification is output only once for any command.  @value{GDBN} may
+emit this notification several times, either for different threads,
+because it cannot resume all threads together, or even for a single
+thread, if the thread must be stepped though some code before letting
+it run freely.
 
 @item *stopped,reason="@var{reason}",thread-id="@var{id}",stopped-threads="@var{stopped}",core="@var{core}"
 The target has stopped.  The @var{reason} field can have one of the
@@ -26133,8 +26514,9 @@ The inferior called @code{exec}.  This i
 (@pxref{Set Catchpoints}) has been used.
 @end table
 
-The @var{id} field identifies the thread that directly caused the stop
--- for example by hitting a breakpoint.  Depending on whether all-stop
+The @var{id} field identifies the global thread ID of the thread
+that directly caused the stop -- for example by hitting a breakpoint.
+Depending on whether all-stop
 mode is in effect (@pxref{All-Stop Mode}), @value{GDBN} may either
 stop all threads, or only the thread that directly triggered the stop.
 If all threads are stopped, the @var{stopped} field will have the
@@ -26170,16 +26552,21 @@ only when the inferior exited with some 
 @item =thread-created,id="@var{id}",group-id="@var{gid}"
 @itemx =thread-exited,id="@var{id}",group-id="@var{gid}"
 A thread either was created, or has exited.  The @var{id} field
-contains the @value{GDBN} identifier of the thread.  The @var{gid}
+contains the global @value{GDBN} identifier of the thread.  The @var{gid}
 field identifies the thread group this thread belongs to.
 
-@item =thread-selected,id="@var{id}"
-Informs that the selected thread was changed as result of the last
-command.  This notification is not emitted as result of @code{-thread-select}
-command but is emitted whenever an MI command that is not documented
-to change the selected thread actually changes it.  In particular,
-invoking, directly or indirectly (via user-defined command), the CLI
-@code{thread} command, will generate this notification.
+@item =thread-selected,id="@var{id}"[,frame="@var{frame}"]
+Informs that the selected thread or frame were changed.  This notification
+is not emitted as result of the @code{-thread-select} or
+@code{-stack-select-frame} commands, but is emitted whenever an MI command
+that is not documented to change the selected thread and frame actually
+changes them.  In particular, invoking, directly or indirectly
+(via user-defined command), the CLI @code{thread} or @code{frame} commands,
+will generate this notification.  Changing the thread or frame from another
+user interface (see @ref{Interpreters}) will also generate this notification.
+
+The @var{frame} field is only present if the newly selected thread is
+stopped.  See @ref{GDB/MI Frame Information} for the format of its value.
 
 We suggest that in response to this notification, front ends
 highlight the selected thread and cause subsequent commands to apply to
@@ -26244,12 +26631,17 @@ breakpoint commands; @xref{GDB/MI Breakp
 Note that if a breakpoint is emitted in the result record of a
 command, then it will not also be emitted in an async record.
 
-@item =record-started,thread-group="@var{id}"
+@item =record-started,thread-group="@var{id}",method="@var{method}"[,format="@var{format}"]
 @itemx =record-stopped,thread-group="@var{id}"
 Execution log recording was either started or stopped on an
 inferior.  The @var{id} is the @value{GDBN} identifier of the thread
 group corresponding to the affected inferior.
 
+The @var{method} field indicates the method used to record execution.  If the
+method in use supports multiple recording formats, @var{format} will be present
+and contain the currently used format.  @xref{Process Record and Replay},
+for existing method and format values.
+
 @item =cmd-param-changed,param=@var{param},value=@var{value}
 Reports that a parameter of the command @code{set @var{param}} is
 changed to @var{value}.  In the multi-word @code{set} command,
@@ -26431,7 +26823,7 @@ uses a tuple with the following fields:
 
 @table @code
 @item id
-The numeric id assigned to the thread by @value{GDBN}.  This field is
+The global numeric id assigned to the thread by @value{GDBN}.  This field is
 always present.
 
 @item target-id
@@ -26839,6 +27231,7 @@ N.A.
 
 @subheading The @code{-break-insert} Command
 @findex -break-insert
+@anchor{-break-insert}
 
 @subsubheading Synopsis
 
@@ -26851,16 +27244,35 @@ N.A.
 @noindent
 If specified, @var{location}, can be one of:
 
-@itemize @bullet
-@item function
-@c @item +offset
-@c @item -offset
-@c @item linenum
-@item filename:linenum
-@item filename:function
-@item *address
-@end itemize
+@table @var
+@item linespec location
+A linespec location.  @xref{Linespec Locations}.
+
+@item explicit location
+An explicit location.  @sc{gdb/mi} explicit locations are
+analogous to the CLI's explicit locations using the option names
+listed below.  @xref{Explicit Locations}.
+
+@table @samp
+@item --source @var{filename}
+The source file name of the location.  This option requires the use
+of either @samp{--function} or @samp{--line}.
+
+@item --function @var{function}
+The name of a function or method.
+
+@item --label @var{label}
+The name of a label.
+
+@item --line @var{lineoffset}
+An absolute or relative line offset from the start of the location.
+@end table
+
+@item address location
+An address location, *@var{address}.  @xref{Address Locations}.
+@end table
 
+@noindent
 The possible optional parameters of this command are:
 
 @table @samp
@@ -26884,7 +27296,8 @@ Make the breakpoint conditional on @var{
 @item -i @var{ignore-count}
 Initialize the @var{ignore-count}.
 @item -p @var{thread-id}
-Restrict the breakpoint to the specified @var{thread-id}.
+Restrict the breakpoint to the thread with the specified global
+@var{thread-id}.
 @end table
 
 @subsubheading Result
@@ -26952,17 +27365,8 @@ times="0"@}]@}
 @end smallexample
 
 @noindent
-If specified, @var{location}, can be one of:
-
-@itemize @bullet
-@item @var{function}
-@c @item +offset
-@c @item -offset
-@c @item @var{linenum}
-@item @var{filename}:@var{linenum}
-@item @var{filename}:function
-@item *@var{address}
-@end itemize
+If supplied, @var{location} may be specified the same way as for
+the @code{-break-insert} command.  @xref{-break-insert}.
 
 The possible optional parameters of this command are:
 
@@ -26983,7 +27387,8 @@ Make the breakpoint conditional on @var{
 Set the ignore count of the breakpoint (@pxref{Conditions, ignore count})
 to @var{ignore-count}.
 @item -p @var{thread-id}
-Restrict the breakpoint to the specified @var{thread-id}.
+Restrict the breakpoint to the thread with the specified global
+@var{thread-id}.
 @end table
 
 @subsubheading Result
@@ -27633,10 +28038,11 @@ The corresponding @value{GDBN} command i
  -thread-info [ @var{thread-id} ]
 @end smallexample
 
-Reports information about either a specific thread, if 
-the @var{thread-id} parameter is present, or about all
-threads.  When printing information about all threads,
-also reports the current thread.
+Reports information about either a specific thread, if the
+@var{thread-id} parameter is present, or about all threads.
+@var{thread-id} is the thread's global thread ID.  When printing
+information about all threads, also reports the global ID of the
+current thread.
 
 @subsubheading @value{GDBN} Command
 
@@ -27653,7 +28059,7 @@ defined for a given thread:
 This field exists only for the current thread.  It has the value @samp{*}.
 
 @item id
-The identifier that @value{GDBN} uses to refer to the thread.
+The global identifier that @value{GDBN} uses to refer to the thread.
 
 @item target-id
 The identifier that the target uses to refer to the thread.
@@ -27719,8 +28125,9 @@ current-thread-id="1"
  -thread-list-ids
 @end smallexample
 
-Produces a list of the currently known @value{GDBN} thread ids.  At the
-end of the list it also prints the total number of such threads.
+Produces a list of the currently known global @value{GDBN} thread ids.
+At the end of the list it also prints the total number of such
+threads.
 
 This command is retained for historical reasons, the
 @code{-thread-info} command should be used instead.
@@ -27746,11 +28153,12 @@ current-thread-id="1",number-of-threads=
 @subsubheading Synopsis
 
 @smallexample
- -thread-select @var{threadnum}
+ -thread-select @var{thread-id}
 @end smallexample
 
-Make @var{threadnum} the current thread.  It prints the number of the new
-current thread, and the topmost frame for that thread.
+Make thread with global thread number @var{thread-id} the current
+thread.  It prints the number of the new current thread, and the
+topmost frame for that thread.
 
 This command is deprecated in favor of explicitly using the
 @samp{--thread} option to each command.
@@ -27819,7 +28227,8 @@ The identifier that @value{GDBN} uses to
 The identifier that the target uses to refer to the Ada task.
 
 @item thread-id
-The identifier of the thread corresponding to the Ada task.
+The global thread identifier of the thread corresponding to the Ada
+task.
 
 This field should always exist, as Ada tasks are always implemented
 on top of a thread.  But if @value{GDBN} cannot find this corresponding
@@ -29035,7 +29444,7 @@ would be printed by the @value{GDBN} CLI
 
 @item thread-id
 If a variable object is bound to a specific thread, then this is the
-thread's identifier.
+thread's global identifier.
 
 @item has_more
 For a dynamic varobj, this indicates whether there appear to be any
@@ -29092,13 +29501,18 @@ The syntax for the @var{format-spec} is 
 
 @smallexample
  @var{format-spec} @expansion{}
- @{binary | decimal | hexadecimal | octal | natural@}
+ @{binary | decimal | hexadecimal | octal | natural | zero-hexadecimal@}
 @end smallexample
 
 The natural format is the default format choosen automatically
 based on the variable type (like decimal for an @code{int}, hex
 for pointers, etc.).
 
+The zero-hexadecimal format has a representation similar to hexadecimal
+but with padding zeroes to the left of the value.  For example, a 32-bit
+hexadecimal value of 0x1234 would be represented as 0x00001234 in the
+zero-hexadecimal format.
+
 For a variable with children, the format is set only on the 
 variable itself, and the children are not affected.  
 
@@ -29211,8 +29625,8 @@ The type of the child.  If @samp{print o
 If values were requested, this is the value.
 
 @item thread-id
-If this variable object is associated with a thread, this is the thread id.  
-Otherwise this result is not present.
+If this variable object is associated with a thread, this is the
+thread's global thread id.  Otherwise this result is not present.
 
 @item frozen
 If the variable object is frozen, this variable will be present with a value of 1.
@@ -29698,9 +30112,20 @@ displayed; if @var{lines} is higher than
 @var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
 are displayed.
 @item @var{mode}
-is either 0 (meaning only disassembly), 1 (meaning mixed source and
-disassembly), 2 (meaning disassembly with raw opcodes), or 3 (meaning
-mixed source and disassembly with raw opcodes).
+is one of:
+@itemize @bullet
+@item 0 disassembly only
+@item 1 mixed source and disassembly (deprecated)
+@item 2 disassembly with raw opcodes
+@item 3 mixed source and disassembly with raw opcodes (deprecated)
+@item 4 mixed source and disassembly
+@item 5 mixed source and disassembly with raw opcodes
+@end itemize
+
+Modes 1 and 3 are deprecated.  The output is ``source centric''
+which hasn't proved useful in practice.
+@xref{Machine Code}, for a discussion of the difference between
+@code{/m} and @code{/s} output of the @code{disassemble} command.
 @end table
 
 @subsubheading Result
@@ -29726,12 +30151,12 @@ The decimal offset in bytes from the sta
 The text disassembly for this @samp{address}.
 
 @item opcodes
-This field is only present for mode 2.  This contains the raw opcode
+This field is only present for modes 2, 3 and 5.  This contains the raw opcode
 bytes for the @samp{inst} field.
 
 @end table
 
-For modes 1 and 3 the @samp{asm_insns} list contains tuples named
+For modes 1, 3, 4 and 5 the @samp{asm_insns} list contains tuples named
 @samp{src_and_asm_line}, each of which has the following fields:
 
 @table @code
@@ -30580,7 +31005,7 @@ body=[variable=@{name="$trace_timestamp"
 @subsubheading Synopsis
 
 @smallexample
- -trace-save [-r ] @var{filename}
+ -trace-save [ -r ] [ -ctf ] @var{filename}
 @end smallexample
 
 Saves the collected trace data to @var{filename}.  Without the
@@ -30588,6 +31013,10 @@ Saves the collected trace data to @var{f
 in a local file.  With the @samp{-r} option the target is asked
 to perform the save.
 
+By default, this command will save the trace in the tfile format.  You can
+supply the optional @samp{-ctf} argument to save it the CTF format. See
+@ref{Trace Files} for more information about CTF.
+
 @subsubheading @value{GDBN} Command
 
 The corresponding @value{GDBN} command is @samp{tsave}.
@@ -30602,7 +31031,7 @@ The corresponding @value{GDBN} command i
  -trace-start
 @end smallexample
 
-Starts a tracing experiments.  The result of this command does not
+Starts a tracing experiment.  The result of this command does not
 have any fields.
 
 @subsubheading @value{GDBN} Command
@@ -31469,6 +31898,28 @@ No equivalent.
 @subsubheading Example
 N.A.
 
+@subheading The @code{-target-flash-erase} Command
+@findex -target-flash-erase
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-flash-erase
+@end smallexample
+
+Erases all known flash memory regions on the target.
+
+The corresponding @value{GDBN} command is @samp{flash-erase}.
+
+The output is a list of flash regions that have been erased, with starting
+addresses and memory region sizes.
+
+@smallexample
+(gdb)
+-target-flash-erase
+^done,erased-regions=@{address="0x0",size="0x40000"@}
+(gdb)
+@end smallexample
 
 @subheading The @code{-target-select} Command
 @findex -target-select
@@ -33975,11 +34426,6 @@ Shared library events.
 
 @end table
 
-@kindex maint info bfds
-@item maint info bfds
-This prints information about each @code{bfd} object that is known to
-@value{GDBN}.  @xref{Top, , BFD, bfd, The Binary File Descriptor Library}.
-
 @kindex maint info btrace
 @item maint info btrace
 Pint information about raw branch tracing data.
@@ -34004,8 +34450,8 @@ Newer blocks have higher numbers.  The o
 @end table
 
 @item pt
-For the Intel(R) Processor Trace recording format, print a list of
-Intel(R) Processor Trace packets.  For each packet, the following
+For the Intel Processor Trace recording format, print a list of
+Intel Processor Trace packets.  For each packet, the following
 information is printed:
 
 @table @asis
@@ -34338,6 +34784,11 @@ that symbol is described.  The type chai
 a recursive definition of the data type as stored in @value{GDBN}'s
 data structures, including its flags and contained types.
 
+@kindex maint selftest
+@cindex self tests
+Run any self tests that were compiled in to @value{GDBN}.  This will
+print a message showing how many tests were run, and how many failed.
+
 @kindex maint set dwarf always-disassemble
 @kindex maint show dwarf always-disassemble
 @item maint set dwarf always-disassemble
@@ -34425,6 +34876,30 @@ asynchronous mode (@pxref{Background Exe
 default is asynchronous, if it is available; but this can be changed
 to more easily debug problems occurring only in synchronous mode.
 
+@kindex maint set target-non-stop @var{mode} [on|off|auto]
+@kindex maint show target-non-stop
+@item maint set target-non-stop
+@itemx maint show target-non-stop
+
+This controls whether @value{GDBN} targets always operate in non-stop
+mode even if @code{set non-stop} is @code{off} (@pxref{Non-Stop
+Mode}).  The default is @code{auto}, meaning non-stop mode is enabled
+if supported by the target.
+
+@table @code
+@item maint set target-non-stop auto
+This is the default mode.  @value{GDBN} controls the target in
+non-stop mode if the target supports it.
+
+@item maint set target-non-stop on
+@value{GDBN} controls the target in non-stop mode even if the target
+does not indicate support.
+
+@item maint set target-non-stop off
+@value{GDBN} does not control the target in non-stop mode even if the
+target supports it.
+@end table
+
 @kindex maint set per-command
 @kindex maint show per-command
 @item maint set per-command
@@ -34877,8 +35352,7 @@ Each byte of register data is described 
 with the register are transmitted in target byte order.  The size of
 each register and their position within the @samp{g} packet are
 determined by the @value{GDBN} internal gdbarch functions
-@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}.  The
-specification of several standard @samp{g} packets is specified below.
+@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}.
 
 When reading registers from a trace frame (@pxref{Analyze Collected
 Data,,Using the Collected Data}), the stub may also return a string of
@@ -35149,13 +35623,16 @@ for success in non-stop mode (@pxref{Rem
 @cindex @samp{vCont} packet
 @anchor{vCont packet}
 Resume the inferior, specifying different actions for each thread.
-If an action is specified with no @var{thread-id}, then it is applied to any
-threads that don't have a specific action specified; if no default action is
-specified then other threads should remain stopped in all-stop mode and
-in their current state in non-stop mode.
-Specifying multiple
-default actions is an error; specifying no actions is also an error.
-Thread IDs are specified using the syntax described in @ref{thread-id syntax}.
+
+For each inferior thread, the leftmost action with a matching
+@var{thread-id} is applied.  Threads that don't match any action
+remain in their current state.  Thread IDs are specified using the
+syntax described in @ref{thread-id syntax}.  If multiprocess
+extensions (@pxref{multiprocess extensions}) are supported, actions
+can be specified to match all threads in a process by using the
+@samp{p@var{pid}.-1} form of the @var{thread-id}.  An action with no
+@var{thread-id} matches all threads.  Specifying no actions is an
+error.
 
 Currently supported actions are:
 
@@ -35200,11 +35677,17 @@ the corresponding stop reply should indi
 signal @samp{0}, regardless of whether the target uses some other signal
 as an implementation detail.
 
+The server must ignore @samp{c}, @samp{C}, @samp{s}, @samp{S}, and
+@samp{r} actions for threads that are already running.  Conversely,
+the server must ignore @samp{t} actions for threads that are already
+stopped.
+
+@emph{Note:} In non-stop mode, a thread is considered running until
+@value{GDBN} acknowleges an asynchronous stop notification for it with
+the @samp{vStopped} packet (@pxref{Remote Non-Stop}).
+
 The stub must support @samp{vCont} if it reports support for
-multiprocess extensions (@pxref{multiprocess extensions}).  Note that in
-this case @samp{vCont} actions can be specified to apply to all threads
-in a process by using the @samp{p@var{pid}.-1} form of the
-@var{thread-id}.
+multiprocess extensions (@pxref{multiprocess extensions}).
 
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
@@ -35222,6 +35705,24 @@ command in the @samp{vCont} packet.
 The @samp{vCont} packet is not supported.
 @end table
 
+@anchor{vCtrlC packet}
+@item vCtrlC
+@cindex @samp{vCtrlC} packet
+Interrupt remote target as if a control-C was pressed on the remote
+terminal.  This is the equivalent to reacting to the @code{^C}
+(@samp{\003}, the control-C character) character in all-stop mode
+while the target is running, except this works in non-stop mode.
+@xref{interrupting remote targets}, for more info on the all-stop
+variant.
+
+Reply:
+@table @samp
+@item E @var{nn}
+for an error
+@item OK
+for success
+@end table
+
 @item vFile:@var{operation}:@var{parameter}@dots{}
 @cindex @samp{vFile} packet
 Perform a file operation on the target system.  For details,
@@ -35357,22 +35858,25 @@ be implemented in an idempotent way.}
 @itemx Z0,@var{addr},@var{kind}@r{[};@var{cond_list}@dots{}@r{]}@r{[};cmds:@var{persist},@var{cmd_list}@dots{}@r{]}
 @cindex @samp{z0} packet
 @cindex @samp{Z0} packet
-Insert (@samp{Z0}) or remove (@samp{z0}) a memory breakpoint at address
+Insert (@samp{Z0}) or remove (@samp{z0}) a software breakpoint at address
 @var{addr} of type @var{kind}.
 
-A memory breakpoint is implemented by replacing the instruction at
+A software breakpoint is implemented by replacing the instruction at
 @var{addr} with a software breakpoint or trap instruction.  The
-@var{kind} is target-specific and typically indicates the size of
-the breakpoint in bytes that should be inserted.  E.g., the @sc{arm}
-and @sc{mips} can insert either a 2 or 4 byte breakpoint.  Some
-architectures have additional meanings for @var{kind};
-@var{cond_list} is an optional list of conditional expressions in bytecode
-form that should be evaluated on the target's side.  These are the
-conditions that should be taken into consideration when deciding if
-the breakpoint trigger should be reported back to @var{GDBN}.
+@var{kind} is target-specific and typically indicates the size of the
+breakpoint in bytes that should be inserted.  E.g., the @sc{arm} and
+@sc{mips} can insert either a 2 or 4 byte breakpoint.  Some
+architectures have additional meanings for @var{kind}
+(@pxref{Architecture-Specific Protocol Details}); if no
+architecture-specific value is being used, it should be @samp{0}.
+@var{kind} is hex-encoded.  @var{cond_list} is an optional list of
+conditional expressions in bytecode form that should be evaluated on
+the target's side.  These are the conditions that should be taken into
+consideration when deciding if the breakpoint trigger should be
+reported back to @value{GDBN}.
 
 See also the @samp{swbreak} stop reason (@pxref{swbreak stop reason})
-for how to best report a memory breakpoint event to @value{GDBN}.
+for how to best report a software breakpoint event to @value{GDBN}.
 
 The @var{cond_list} parameter is comprised of a series of expressions,
 concatenated without separators. Each expression has the following form:
@@ -35401,10 +35905,8 @@ actual conditional expression in bytecod
 
 @end table
 
-see @ref{Architecture-Specific Protocol Details}.
-
 @emph{Implementation note: It is possible for a target to copy or move
-code that contains memory breakpoints (e.g., when implementing
+code that contains software breakpoints (e.g., when implementing
 overlays).  The behavior of this packet, in the presence of such a
 target, is not defined.}
 
@@ -35419,15 +35921,16 @@ for an error
 @end table
 
 @item z1,@var{addr},@var{kind}
-@itemx Z1,@var{addr},@var{kind}@r{[};@var{cond_list}@dots{}@r{]}
+@itemx Z1,@var{addr},@var{kind}@r{[};@var{cond_list}@dots{}@r{]}@r{[};cmds:@var{persist},@var{cmd_list}@dots{}@r{]}
 @cindex @samp{z1} packet
 @cindex @samp{Z1} packet
 Insert (@samp{Z1}) or remove (@samp{z1}) a hardware breakpoint at
 address @var{addr}.
 
 A hardware breakpoint is implemented using a mechanism that is not
-dependant on being able to modify the target's memory.  The @var{kind}
-and @var{cond_list} have the same meaning as in @samp{Z0} packets.
+dependent on being able to modify the target's memory.  The
+@var{kind}, @var{cond_list}, and @var{cmd_list} arguments have the
+same meaning as in @samp{Z0} packets.
 
 @emph{Implementation note: A hardware breakpoint is not affected by code
 movement.}
@@ -35507,6 +36010,10 @@ when the target halts.  In the below the
 number} is defined by the header @file{include/gdb/signals.h} in the
 @value{GDBN} source code.
 
+In non-stop mode, the server will simply reply @samp{OK} to commands
+such as @samp{vCont}; any stop will be the subject of a future
+notification.  @xref{Remote Non-Stop}.
+
 As in the description of request packets, we include spaces in the
 reply templates for clarity; these are not part of the reply packet's
 syntax.  No @value{GDBN} stop reply packet uses spaces to separate its
@@ -35564,6 +36071,11 @@ The currently defined stop reasons are:
 The packet indicates a watchpoint hit, and @var{r} is the data address, in
 hex.
 
+@item syscall_entry
+@itemx syscall_return
+The packet indicates a syscall entry or return, and @var{r} is the
+syscall number, in hex.
+
 @cindex shared library events, remote reply
 @item library
 The packet indicates that the loaded libraries have changed.
@@ -35580,7 +36092,7 @@ for more information.
 
 @item swbreak
 @anchor{swbreak stop reason}
-The packet indicates a memory breakpoint instruction was executed,
+The packet indicates a software breakpoint instruction was executed,
 irrespective of whether it was @value{GDBN} that planted the
 breakpoint or the breakpoint is hardcoded in the program.  The @var{r}
 part must be left empty.
@@ -35648,6 +36160,28 @@ appropriate @samp{qSupported} feature (@
 remote stub must also supply the appropriate @samp{qSupported} feature
 indicating support.
 
+@cindex exec events, remote reply
+@item exec
+The packet indicates that @code{execve} was called, and @var{r}
+is the absolute pathname of the file that was executed, in hex.
+This packet is only applicable to targets that support exec events.
+
+This packet should not be sent by default; older @value{GDBN} versions
+did not support it.  @value{GDBN} requests it, by supplying an
+appropriate @samp{qSupported} feature (@pxref{qSupported}).  The
+remote stub must also supply the appropriate @samp{qSupported} feature
+indicating support.
+
+@cindex thread create event, remote reply
+@anchor{thread create event}
+@item create
+The packet indicates that the thread was just created.  The new thread
+is stopped until @value{GDBN} sets it running with a resumption packet
+(@pxref{vCont packet}).  This packet should not be sent by default;
+@value{GDBN} requests it with the @ref{QThreadEvents} packet.  See
+also the @samp{w} (@pxref{thread exit event}) remote reply below.  The
+@var{r} part is ignored.
+
 @end table
 
 @item W @var{AA}
@@ -35655,10 +36189,11 @@ indicating support.
 The process exited, and @var{AA} is the exit status.  This is only
 applicable to certain targets.
 
-The second form of the response, including the process ID of the exited
-process, can be used only when @value{GDBN} has reported support for
-multiprocess protocol extensions; see @ref{multiprocess extensions}.
-The @var{pid} is formatted as a big-endian hex string.
+The second form of the response, including the process ID of the
+exited process, can be used only when @value{GDBN} has reported
+support for multiprocess protocol extensions; see @ref{multiprocess
+extensions}.  Both @var{AA} and @var{pid} are formatted as big-endian
+hex strings.
 
 @item X @var{AA}
 @itemx X @var{AA} ; process:@var{pid}
@@ -35667,7 +36202,32 @@ The process terminated with signal @var{
 The second form of the response, including the process ID of the
 terminated process, can be used only when @value{GDBN} has reported
 support for multiprocess protocol extensions; see @ref{multiprocess
-extensions}.  The @var{pid} is formatted as a big-endian hex string.
+extensions}.  Both @var{AA} and @var{pid} are formatted as big-endian
+hex strings.
+
+@anchor{thread exit event}
+@cindex thread exit event, remote reply
+@item w @var{AA} ; @var{tid}
+
+The thread exited, and @var{AA} is the exit status.  This response
+should not be sent by default; @value{GDBN} requests it with the
+@ref{QThreadEvents} packet.  See also @ref{thread create event} above.
+@var{AA} is formatted as a big-endian hex string.
+
+@item N
+There are no resumed threads left in the target.  In other words, even
+though the process is alive, the last resumed thread has exited.  For
+example, say the target process has two threads: thread 1 and thread
+2.  The client leaves thread 1 stopped, and resumes thread 2, which
+subsequently exits.  At this point, even though the process is still
+alive, and thus no @samp{W} stop reply is sent, no thread is actually
+executing either.  The @samp{N} stop reply thus informs the client
+that it can stop waiting for stop replies.  This packet should not be
+sent by default; older @value{GDBN} versions did not support it.
+@value{GDBN} requests it, by supplying an appropriate
+@samp{qSupported} feature (@pxref{qSupported}).  The remote stub must
+also supply the appropriate @samp{qSupported} feature indicating
+support.
 
 @item O @var{XX}@dots{}
 @samp{@var{XX}@dots{}} is hex encoding of @sc{ascii} data, to be
@@ -36012,6 +36572,49 @@ by supplying an appropriate @samp{qSuppo
 Use of this packet is controlled by the @code{set non-stop} command; 
 @pxref{Non-Stop Mode}.
 
+@item QCatchSyscalls:1 @r{[};@var{sysno}@r{]}@dots{}
+@itemx QCatchSyscalls:0
+@cindex catch syscalls from inferior, remote request
+@cindex @samp{QCatchSyscalls} packet
+@anchor{QCatchSyscalls}
+Enable (@samp{QCatchSyscalls:1}) or disable (@samp{QCatchSyscalls:0})
+catching syscalls from the inferior process.
+
+For @samp{QCatchSyscalls:1}, each listed syscall @var{sysno} (encoded
+in hex) should be reported to @value{GDBN}.  If no syscall @var{sysno}
+is listed, every system call should be reported.
+
+Note that if a syscall not in the list is reported, @value{GDBN} will
+still filter the event according to its own list from all corresponding
+@code{catch syscall} commands.  However, it is more efficient to only
+report the requested syscalls.
+
+Multiple @samp{QCatchSyscalls:1} packets do not combine; any earlier
+@samp{QCatchSyscalls:1} list is completely replaced by the new list.
+
+If the inferior process execs, the state of @samp{QCatchSyscalls} is
+kept for the new process too.  On targets where exec may affect syscall
+numbers, for example with exec between 32 and 64-bit processes, the
+client should send a new packet with the new syscall list.
+
+Reply:
+@table @samp
+@item OK
+The request succeeded.
+
+@item E @var{nn}
+An error occurred.  @var{nn} are hex digits.
+
+@item @w{}
+An empty reply indicates that @samp{QCatchSyscalls} is not supported by
+the stub.
+@end table
+
+Use of this packet is controlled by the @code{set remote catch-syscalls}
+command (@pxref{Remote Configuration, set remote catch-syscalls}).
+This packet is not probed by default; the remote stub must request it,
+by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
+
 @item QPassSignals: @var{signal} @r{[};@var{signal}@r{]}@dots{}
 @cindex pass signals to inferior, remote request
 @cindex @samp{QPassSignals} packet
@@ -36086,6 +36689,39 @@ command (@pxref{Remote Configuration, se
 This packet is not probed by default; the remote stub must request it,
 by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
 
+@anchor{QThreadEvents}
+@item QThreadEvents:1
+@itemx QThreadEvents:0
+@cindex thread create/exit events, remote request
+@cindex @samp{QThreadEvents} packet
+
+Enable (@samp{QThreadEvents:1}) or disable (@samp{QThreadEvents:0})
+reporting of thread create and exit events.  @xref{thread create
+event}, for the reply specifications.  For example, this is used in
+non-stop mode when @value{GDBN} stops a set of threads and
+synchronously waits for the their corresponding stop replies.  Without
+exit events, if one of the threads exits, @value{GDBN} would hang
+forever not knowing that it should no longer expect a stop for that
+same thread.  @value{GDBN} does not enable this feature unless the
+stub reports that it supports it by including @samp{QThreadEvents+} in
+its @samp{qSupported} reply.
+
+Reply:
+@table @samp
+@item OK
+The request succeeded.
+
+@item E @var{nn}
+An error occurred.  The error number @var{nn} is given as hex digits.
+
+@item @w{}
+An empty reply indicates that @samp{QThreadEvents} is not supported by
+the stub.
+@end table
+
+Use of this packet is controlled by the @code{set remote thread-events}
+command (@pxref{Remote Configuration, set remote thread-events}).
+
 @item qRcmd,@var{command}
 @cindex execute remote command, remote request
 @cindex @samp{qRcmd} packet
@@ -36252,6 +36888,16 @@ This feature indicates whether @value{GD
 extensions to the remote protocol.  @value{GDBN} does not use such
 extensions unless the stub also reports that it supports them by
 including @samp{vfork-events+} in its @samp{qSupported} reply.
+
+@item exec-events
+This feature indicates whether @value{GDBN} supports exec event
+extensions to the remote protocol.  @value{GDBN} does not use such
+extensions unless the stub also reports that it supports them by
+including @samp{exec-events+} in its @samp{qSupported} reply.
+
+@item vContSupported
+This feature indicates whether @value{GDBN} wants to know the
+supported actions in the reply to @samp{vCont?} packet.
 @end table
 
 Stubs should ignore any unknown values for
@@ -36420,6 +37066,11 @@ These are the currently defined stub fea
 @tab @samp{-}
 @tab Yes
 
+@item @samp{QCatchSyscalls}
+@tab No
+@tab @samp{-}
+@tab Yes
+
 @item @samp{QPassSignals}
 @tab No
 @tab @samp{-}
@@ -36515,6 +37166,21 @@ These are the currently defined stub fea
 @tab @samp{-}
 @tab No
 
+@item @samp{exec-events}
+@tab No
+@tab @samp{-}
+@tab No
+
+@item @samp{QThreadEvents}
+@tab No
+@tab @samp{-}
+@tab No
+
+@item @samp{no-resumed}
+@tab No
+@tab @samp{-}
+@tab No
+
 @end multitable
 
 These are the currently defined stub features, in more detail:
@@ -36608,6 +37274,10 @@ packet (@pxref{qXfer fdpic loadmap read}
 The remote stub understands the @samp{QNonStop} packet
 (@pxref{QNonStop}).
 
+@item QCatchSyscalls
+The remote stub understands the @samp{QCatchSyscalls} packet
+(@pxref{QCatchSyscalls}).
+
 @item QPassSignals
 The remote stub understands the @samp{QPassSignals} packet
 (@pxref{QPassSignals}).
@@ -36720,6 +37390,19 @@ The remote stub reports the @samp{fork} 
 The remote stub reports the @samp{vfork} stop reason for vfork events
 and vforkdone events.
 
+@item exec-events
+The remote stub reports the @samp{exec} stop reason for exec events.
+
+@item vContSupported
+The remote stub reports the supported actions in the reply to
+@samp{vCont?} packet.
+
+@item QThreadEvents
+The remote stub understands the @samp{QThreadEvents} packet.
+
+@item no-resumed
+The remote stub reports the @samp{N} stop reply.
+
 @end table
 
 @item qSymbol::
@@ -36825,9 +37508,40 @@ starting at @var{offset} bytes into the 
 encoding of @var{annex} is specific to @var{object}; it can supply
 additional details about what data to access.
 
-Here are the specific requests of this form defined so far.  All
+Reply:
+@table @samp
+@item m @var{data}
+Data @var{data} (@pxref{Binary Data}) has been read from the
+target.  There may be more data at a higher address (although
+it is permitted to return @samp{m} even for the last valid
+block of data, as long as at least one byte of data was read).
+It is possible for @var{data} to have fewer bytes than the @var{length} in the
+request.
+
+@item l @var{data}
+Data @var{data} (@pxref{Binary Data}) has been read from the target.
+There is no more data to be read.  It is possible for @var{data} to
+have fewer bytes than the @var{length} in the request.
+
+@item l
+The @var{offset} in the request is at the end of the data.
+There is no more data to be read.
+
+@item E00
+The request was malformed, or @var{annex} was invalid.
+
+@item E @var{nn}
+The offset was invalid, or there was an error encountered reading the data.
+The @var{nn} part is a hex-encoded @code{errno} value.
+
+@item @w{}
+An empty reply indicates the @var{object} string was not recognized by
+the stub, or that the object does not support reading.
+@end table
+
+Here are the specific requests of this form defined so far.  All the
 @samp{qXfer:@var{object}:read:@dots{}} requests use the same reply
-formats, listed below.
+formats, listed above.
 
 @table @samp
 @item qXfer:auxv:read::@var{offset},@var{length}
@@ -37032,50 +37746,37 @@ Access the target's @dfn{operating syste
 
 @end table
 
+@item qXfer:@var{object}:write:@var{annex}:@var{offset}:@var{data}@dots{}
+@cindex write data into object, remote request
+@anchor{qXfer write}
+Write uninterpreted bytes into the target's special data area
+identified by the keyword @var{object}, starting at @var{offset} bytes
+into the data.  The binary-encoded data (@pxref{Binary Data}) to be
+written is given by @var{data}@dots{}.  The content and encoding of @var{annex}
+is specific to @var{object}; it can supply additional details about what data
+to access.
+
 Reply:
 @table @samp
-@item m @var{data}
-Data @var{data} (@pxref{Binary Data}) has been read from the
-target.  There may be more data at a higher address (although
-it is permitted to return @samp{m} even for the last valid
-block of data, as long as at least one byte of data was read).
-It is possible for @var{data} to have fewer bytes than the @var{length} in the
-request.
-
-@item l @var{data}
-Data @var{data} (@pxref{Binary Data}) has been read from the target.
-There is no more data to be read.  It is possible for @var{data} to
-have fewer bytes than the @var{length} in the request.
-
-@item l
-The @var{offset} in the request is at the end of the data.
-There is no more data to be read.
+@item @var{nn}
+@var{nn} (hex encoded) is the number of bytes written.
+This may be fewer bytes than supplied in the request.
 
 @item E00
 The request was malformed, or @var{annex} was invalid.
 
 @item E @var{nn}
-The offset was invalid, or there was an error encountered reading the data.
+The offset was invalid, or there was an error encountered writing the data.
 The @var{nn} part is a hex-encoded @code{errno} value.
 
 @item @w{}
-An empty reply indicates the @var{object} string was not recognized by
-the stub, or that the object does not support reading.
+An empty reply indicates the @var{object} string was not
+recognized by the stub, or that the object does not support writing.
 @end table
 
-@item qXfer:@var{object}:write:@var{annex}:@var{offset}:@var{data}@dots{}
-@cindex write data into object, remote request
-@anchor{qXfer write}
-Write uninterpreted bytes into the target's special data area
-identified by the keyword @var{object}, starting at @var{offset} bytes
-into the data.  The binary-encoded data (@pxref{Binary Data}) to be
-written is given by @var{data}@dots{}.  The content and encoding of @var{annex}
-is specific to @var{object}; it can supply additional details about what data
-to access.
-
-Here are the specific requests of this form defined so far.  All
+Here are the specific requests of this form defined so far.  All the
 @samp{qXfer:@var{object}:write:@dots{}} requests use the same reply
-formats, listed below.
+formats, listed above.
 
 @table @samp
 @item qXfer:siginfo:write::@var{offset}:@var{data}@dots{}
@@ -37100,24 +37801,6 @@ This packet is not probed by default; th
 by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
 @end table
 
-Reply:
-@table @samp
-@item @var{nn}
-@var{nn} (hex encoded) is the number of bytes written.
-This may be fewer bytes than supplied in the request.
-
-@item E00
-The request was malformed, or @var{annex} was invalid.
-
-@item E @var{nn}
-The offset was invalid, or there was an error encountered writing the data.
-The @var{nn} part is a hex-encoded @code{errno} value.
-
-@item @w{}
-An empty reply indicates the @var{object} string was not
-recognized by the stub, or that the object does not support writing.
-@end table
-
 @item qXfer:@var{object}:@var{operation}:@dots{}
 Requests of this form may be added in the future.  When a stub does
 not recognize the @var{object} keyword, or its support for
@@ -37160,7 +37843,7 @@ A badly formed request or an error was e
 @end table
 
 @item Qbtrace:pt
-Enable branch tracing for the current thread using Intel(R) Processor Trace.
+Enable branch tracing for the current thread using Intel Processor Trace.
 
 Reply:
 @table @samp
@@ -37955,11 +38638,12 @@ operation.
 @node Interrupts
 @section Interrupts
 @cindex interrupts (remote protocol)
+@anchor{interrupting remote targets}
 
-When a program on the remote target is running, @value{GDBN} may
-attempt to interrupt it by sending a @samp{Ctrl-C}, @code{BREAK} or
-a @code{BREAK} followed by @code{g},
-control of which is specified via @value{GDBN}'s @samp{interrupt-sequence}.
+In all-stop mode, when a program on the remote target is running,
+@value{GDBN} may attempt to interrupt it by sending a @samp{Ctrl-C},
+@code{BREAK} or a @code{BREAK} followed by @code{g}, control of which
+is specified via @value{GDBN}'s @samp{interrupt-sequence}.
 
 The precise meaning of @code{BREAK} is defined by the transport
 mechanism and may, in fact, be undefined.  @value{GDBN} does not
@@ -37980,6 +38664,13 @@ and does @emph{not} represent an interru
 When Linux kernel receives this sequence from serial port,
 it stops execution and connects to gdb.
 
+In non-stop mode, because packet resumptions are asynchronous
+(@pxref{vCont packet}), @value{GDBN} is always free to send a remote
+command to the remote stub, even when the target is running.  For that
+reason, @value{GDBN} instead sends a regular packet (@pxref{vCtrlC
+packet}) with the usual packet framing instead of the single byte
+@code{0x03}.
+
 Stubs are not required to recognize these interrupt mechanisms and the
 precise meaning associated with receipt of the interrupt is
 implementation defined.  If the target supports debugging of multiple
@@ -37991,7 +38682,8 @@ reply packets (@pxref{Stop Reply Packets
 of successfully stopping the program in all-stop mode, and a stop reply
 for each stopped thread in non-stop mode.
 Interrupts received while the
-program is stopped are discarded.
+program is stopped are queued and the program will be interrupted when
+it is resumed next time.
 
 @node Notification Packets
 @section Notification Packets
@@ -38092,7 +38784,7 @@ the process shall be repeated.
 The process of asynchronous notification can be illustrated by the
 following example:
 @smallexample
-<- @code{%%Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;}
+<- @code{%Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;}
 @code{...}
 -> @code{vStopped}
 <- @code{T0505:68f37db7;04:40f37db7;08:63850408;thread:p7526.7528;core:0;}
@@ -39640,7 +40332,7 @@ the following structure:
 @smallexample
 <?xml version="1.0"?>
 <threads>
-    <thread id="id" core="0">
+    <thread id="id" core="0" name="name">
     ... description ...
     </thread>
 </threads>
@@ -39649,8 +40341,10 @@ the following structure:
 Each @samp{thread} element must have the @samp{id} attribute that
 identifies the thread (@pxref{thread-id syntax}).  The
 @samp{core} attribute, if present, specifies which processor core
-the thread was last executing on.  The content of the of @samp{thread}
-element is interpreted as human-readable auxilliary information.
+the thread was last executing on.  The @samp{name} attribute, if
+present, specifies the human-readable name of the thread.  The content
+of the of @samp{thread} element is interpreted as human-readable
+auxiliary information.
 
 @node Traceframe Info Format
 @section Traceframe Info Format
@@ -39795,11 +40489,11 @@ This thread uses the @dfn{Branch Trace S
 The size of the @acronym{BTS} ring buffer in bytes.
 @end table
 @item pt
-This thread uses the @dfn{Intel(R) Processor Trace} (@acronym{Intel(R)
+This thread uses the @dfn{Intel Processor Trace} (@acronym{Intel
 PT}) format.
 @table @code
 @item size
-The size of the @acronym{Intel(R) PT} ring buffer in bytes.
+The size of the @acronym{Intel PT} ring buffer in bytes.
 @end table
 @end table
 
@@ -39861,6 +40555,7 @@ target descriptions.  @xref{Expat}.
 * Target Description Format::       The contents of a target description.
 * Predefined Target Types::         Standard types available for target
                                     descriptions.
+* Enum Target Types::               How to define enum target types.
 * Standard Target Features::        Features @value{GDBN} knows about.
 @end menu
 
@@ -40061,7 +40756,8 @@ Any register's value is a collection of 
 interpret.  The default interpretation is a two's complement integer,
 but other types can be requested by name in the register description.
 Some predefined types are provided by @value{GDBN} (@pxref{Predefined
-Target Types}), and the description can define additional composite types.
+Target Types}), and the description can define additional composite
+and enum types.
 
 Each type element must have an @samp{id} attribute, which gives
 a unique (within the containing @samp{<feature>}) name to the type.
@@ -40091,46 +40787,81 @@ each of which has a @var{name} and a @va
 @end smallexample
 
 @cindex <struct>
+@cindex <flags>
 If a register's value is composed from several separate values, define
-it with a structure type.  There are two forms of the @samp{<struct>}
-element; a @samp{<struct>} element must either contain only bitfields
-or contain no bitfields.  If the structure contains only bitfields,
-its total size in bytes must be specified, each bitfield must have an
-explicit start and end, and bitfields are automatically assigned an
-integer type.  The field's @var{start} should be less than or
-equal to its @var{end}, and zero represents the least significant bit.
+it with either a structure type or a flags type.
+A flags type may only contain bitfields.
+A structure type may either contain only bitfields or contain no bitfields.
+If the value contains only bitfields, its total size in bytes must be
+specified.
+
+Non-bitfield values have a @var{name} and @var{type}.
 
 @smallexample
-<struct id="@var{id}" size="@var{size}">
-  <field name="@var{name}" start="@var{start}" end="@var{end}"/>
+<struct id="@var{id}">
+  <field name="@var{name}" type="@var{type}"/>
   @dots{}
 </struct>
 @end smallexample
 
-If the structure contains no bitfields, then each field has an
-explicit type, and no implicit padding is added.
+Both @var{name} and @var{type} values are required.
+No implicit padding is added.
+
+Bitfield values have a @var{name}, @var{start}, @var{end} and @var{type}.
 
 @smallexample
-<struct id="@var{id}">
-  <field name="@var{name}" type="@var{type}"/>
+<struct id="@var{id}" size="@var{size}">
+  <field name="@var{name}" start="@var{start}" end="@var{end}" type="@var{type}"/>
   @dots{}
 </struct>
 @end smallexample
 
-@cindex <flags>
-If a register's value is a series of single-bit flags, define it with
-a flags type.  The @samp{<flags>} element has an explicit @var{size}
-and contains one or more @samp{<field>} elements.  Each field has a
-@var{name}, a @var{start}, and an @var{end}.  Only single-bit flags
-are supported.
-
 @smallexample
 <flags id="@var{id}" size="@var{size}">
-  <field name="@var{name}" start="@var{start}" end="@var{end}"/>
+  <field name="@var{name}" start="@var{start}" end="@var{end}" type="@var{type}"/>
   @dots{}
 </flags>
 @end smallexample
 
+The @var{name} value is required.
+Bitfield values may be named with the empty string, @samp{""},
+in which case the field is ``filler'' and its value is not printed.
+Not all bits need to be specified, so ``filler'' fields are optional.
+
+The @var{start} and @var{end} values are required, and @var{type}
+is optional.
+The field's @var{start} must be less than or equal to its @var{end},
+and zero represents the least significant bit.
+
+The default value of @var{type} is @code{bool} for single bit fields,
+and an unsigned integer otherwise.
+
+Which to choose?  Structures or flags?
+
+Registers defined with @samp{flags} have these advantages over
+defining them with @samp{struct}:
+
+@itemize @bullet
+@item
+Arithmetic may be performed on them as if they were integers.
+@item
+They are printed in a more readable fashion.
+@end itemize
+
+Registers defined with @samp{struct} have one advantage over
+defining them with @samp{flags}:
+
+@itemize @bullet
+@item
+One can fetch individual fields like in @samp{C}.
+
+@smallexample
+(gdb) print $my_struct_reg.field3
+$1 = 42
+@end smallexample
+
+@end itemize
+
 @subsection Registers
 @cindex <reg>
 
@@ -40199,6 +40930,9 @@ types.  The currently supported types ar
 
 @table @code
 
+@item bool
+Boolean type, occupying a single bit.
+
 @item int8
 @itemx int16
 @itemx int32
@@ -40241,6 +40975,44 @@ The 10-byte extended precision format us
 
 @end table
 
+@node Enum Target Types
+@section Enum Target Types
+@cindex target descriptions, enum types
+
+Enum target types are useful in @samp{struct} and @samp{flags}
+register descriptions.  @xref{Target Description Format}.
+
+Enum types have a name, size and a list of name/value pairs.
+
+@smallexample
+<enum id="@var{id}" size="@var{size}">
+  <evalue name="@var{name}" value="@var{value}"/>
+  @dots{}
+</enum>
+@end smallexample
+
+Enums must be defined before they are used.
+
+@smallexample
+<enum id="levels_type" size="4">
+  <evalue name="low" value="0"/>
+  <evalue name="high" value="1"/>
+</enum>
+<flags id="flags_type" size="4">
+  <field name="X" start="0"/>
+  <field name="LEVEL" start="1" end="1" type="levels_type"/>
+</flags>
+<reg name="flags" bitsize="32" type="flags_type"/>
+@end smallexample
+
+Given that description, a value of 3 for the @samp{flags} register
+would be printed as:
+
+@smallexample
+(gdb) info register flags
+flags 0x3 [ X LEVEL=high ]
+@end smallexample
+
 @node Standard Target Features
 @section Standard Target Features
 @cindex target descriptions, standard features
@@ -40277,14 +41049,17 @@ registers using the capitalization used 
 
 @menu
 * AArch64 Features::
+* ARC Features::
 * ARM Features::
 * i386 Features::
 * MicroBlaze Features::
 * MIPS Features::
 * M68K Features::
+* NDS32 Features::
 * Nios II Features::
 * PowerPC Features::
 * S/390 and System z Features::
+* Sparc Features::
 * TIC6x Features::
 @end menu
 
@@ -40301,6 +41076,45 @@ The @samp{org.gnu.gdb.aarch64.fpu} featu
 it should contain registers @samp{v0} through @samp{v31}, @samp{fpsr},
 and @samp{fpcr}.
 
+@node ARC Features
+@subsection ARC Features
+@cindex target descriptions, ARC Features
+
+ARC processors are highly configurable, so even core registers and their number
+are not completely predetermined.  In addition flags and PC registers which are
+important to @value{GDBN} are not ``core'' registers in ARC.  It is required
+that one of the core registers features is present.
+@samp{org.gnu.gdb.arc.aux-minimal} feature is mandatory.
+
+The @samp{org.gnu.gdb.arc.core.v2} feature is required for ARC EM and ARC HS
+targets with a normal register file.  It should contain registers @samp{r0}
+through @samp{r25}, @samp{gp}, @samp{fp}, @samp{sp}, @samp{r30}, @samp{blink},
+@samp{lp_count} and @samp{pcl}.  This feature may contain register @samp{ilink}
+and any of extension core registers @samp{r32} through @samp{r59/acch}.
+@samp{ilink} and extension core registers are not available to read/write, when
+debugging GNU/Linux applications, thus @samp{ilink} is made optional.
+
+The @samp{org.gnu.gdb.arc.core-reduced.v2} feature is required for ARC EM and
+ARC HS targets with a reduced register file.  It should contain registers
+@samp{r0} through @samp{r3}, @samp{r10} through @samp{r15}, @samp{gp},
+@samp{fp}, @samp{sp}, @samp{r30}, @samp{blink}, @samp{lp_count} and @samp{pcl}.
+This feature may contain register @samp{ilink} and any of extension core
+registers @samp{r32} through @samp{r59/acch}.
+
+The @samp{org.gnu.gdb.arc.core.arcompact} feature is required for ARCompact
+targets with a normal register file.  It should contain registers @samp{r0}
+through @samp{r25}, @samp{gp}, @samp{fp}, @samp{sp}, @samp{r30}, @samp{blink},
+@samp{lp_count} and @samp{pcl}.  This feature may contain registers
+@samp{ilink1}, @samp{ilink2} and any of extension core registers @samp{r32}
+through @samp{r59/acch}.  @samp{ilink1} and @samp{ilink2} and extension core
+registers are not available when debugging GNU/Linux applications.  The only
+difference with @samp{org.gnu.gdb.arc.core.v2} feature is in the names of
+@samp{ilink1} and @samp{ilink2} registers and that @samp{r30} is mandatory in
+ARC v2, but @samp{ilink2} is optional on ARCompact.
+
+The @samp{org.gnu.gdb.arc.aux-minimal} feature is required for all ARC
+targets.  It should contain registers @samp{pc} and @samp{status32}.
+
 @node ARM Features
 @subsection ARM Features
 @cindex target descriptions, ARM features
@@ -40383,7 +41197,7 @@ describe the upper 128 bits of @sc{ymm} 
 @samp{ymm0h} through @samp{ymm15h} for amd64
 @end itemize
 
-The @samp{org.gnu.gdb.i386.mpx} is an optional feature representing Intel(R)
+The @samp{org.gnu.gdb.i386.mpx} is an optional feature representing Intel
 Memory Protection Extension (MPX).  It should describe the following registers:
 
 @itemize @minus
@@ -40396,6 +41210,9 @@ Memory Protection Extension (MPX).  It s
 The @samp{org.gnu.gdb.i386.linux} feature is optional.  It should
 describe a single register, @samp{orig_eax}.
 
+The @samp{org.gnu.gdb.i386.segments} feature is optional.  It should
+describe two system registers: @samp{fs_base} and @samp{gs_base}.
+
 The @samp{org.gnu.gdb.i386.avx512} feature is optional and requires the
 @samp{org.gnu.gdb.i386.avx} feature.  It should
 describe additional @sc{xmm} registers:
@@ -40430,6 +41247,10 @@ describe the additional @sc{zmm} registe
 @samp{zmm16h} through @samp{zmm31h}, only valid for amd64.
 @end itemize
 
+The @samp{org.gnu.gdb.i386.pkeys} feature is optional.  It should
+describe a single register, @samp{pkru}.  It is a 32-bit register
+valid for i386 and amd64.
+
 @node MicroBlaze Features
 @subsection MicroBlaze Features
 @cindex target descriptions, MicroBlaze features
@@ -40490,6 +41311,28 @@ This feature is optional.  If present, i
 @samp{fpiaddr}.
 @end table
 
+@node NDS32 Features
+@subsection NDS32 Features
+@cindex target descriptions, NDS32 features
+
+The @samp{org.gnu.gdb.nds32.core} feature is required for NDS32
+targets.  It should contain at least registers @samp{r0} through
+@samp{r10}, @samp{r15}, @samp{fp}, @samp{gp}, @samp{lp}, @samp{sp},
+and @samp{pc}.
+
+The @samp{org.gnu.gdb.nds32.fpu} feature is optional.  If present,
+it should contain 64-bit double-precision floating-point registers
+@samp{fd0} through @emph{fdN}, which should be @samp{fd3}, @samp{fd7},
+@samp{fd15}, or @samp{fd31} based on the FPU configuration implemented.
+
+@emph{Note:} The first sixteen 64-bit double-precision floating-point
+registers are overlapped with the thirty-two 32-bit single-precision
+floating-point registers.  The 32-bit single-precision registers, if
+not being listed explicitly, will be synthesized from halves of the
+overlapping 64-bit double-precision registers.  Listing 32-bit
+single-precision registers explicitly is deprecated, and the
+support to it could be totally removed some day.
+
 @node Nios II Features
 @subsection Nios II Features
 @cindex target descriptions, Nios II features
@@ -40572,6 +41415,48 @@ through @samp{f15} to present the 128-bi
 contain the 128-bit wide vector registers @samp{v16} through
 @samp{v31}.
 
+@node Sparc Features
+@subsection Sparc Features
+@cindex target descriptions, sparc32 features
+@cindex target descriptions, sparc64 features
+The @samp{org.gnu.gdb.sparc.cpu} feature is required for sparc32/sparc64
+targets.  It should describe the following registers:
+
+@itemize @minus
+@item
+@samp{g0} through @samp{g7}
+@item
+@samp{o0} through @samp{o7}
+@item
+@samp{l0} through @samp{l7}
+@item
+@samp{i0} through @samp{i7}
+@end itemize
+
+They may be 32-bit or 64-bit depending on the target.
+
+Also the @samp{org.gnu.gdb.sparc.fpu} feature is required for sparc32/sparc64
+targets.  It should describe the following registers:
+
+@itemize @minus
+@item
+@samp{f0} through @samp{f31}
+@item
+@samp{f32} through @samp{f62} for sparc64
+@end itemize
+
+The @samp{org.gnu.gdb.sparc.cp0} feature is required for sparc32/sparc64
+targets.  It should describe the following registers:
+
+@itemize @minus
+@item
+@samp{y}, @samp{psr}, @samp{wim}, @samp{tbr}, @samp{pc}, @samp{npc},
+@samp{fsr}, and @samp{csr} for sparc32
+@item
+@samp{pc}, @samp{npc}, @samp{state}, @samp{fsr}, @samp{fprs}, and @samp{y}
+for sparc64
+@end itemize
+
 @node TIC6x Features
 @subsection TMS320C6x Features
 @cindex target descriptions, TIC6x features
@@ -40658,7 +41543,38 @@ as tracepoint definitions or register se
 ignore any line that it does not recognize.  An empty line marks the end
 of this section.
 
-@c FIXME add some specific types of data
+@table @code
+@item R @var{size}
+Specifies the size of a register block in bytes.  This is equal to the
+size of a @code{g} packet payload in the remote protocol.  @var{size}
+is an ascii decimal number.  There should be only one such line in
+a single trace file.
+
+@item status @var{status}
+Trace status.  @var{status} has the same format as a @code{qTStatus}
+remote packet reply.  There should be only one such line in a single trace
+file.
+
+@item tp @var{payload}
+Tracepoint definition.  The @var{payload} has the same format as
+@code{qTfP}/@code{qTsP} remote packet reply payload.  A single tracepoint
+may take multiple lines of definition, corresponding to the multiple
+reply packets.
+
+@item tsv @var{payload}
+Trace state variable definition.  The @var{payload} has the same format as
+@code{qTfV}/@code{qTsV} remote packet reply payload.  A single variable
+may take multiple lines of definition, corresponding to the multiple
+reply packets.
+
+@item tdesc @var{payload}
+Target description in XML format.  The @var{payload} is a single line of
+the XML file.  All such lines should be concatenated together to get
+the original XML file.  This file is in the same format as @code{qXfer}
+@code{features} payload, and corresponds to the main @code{target.xml}
+file.  Includes are not allowed.
+
+@end table
 
 The trace frame section consists of a number of consecutive frames.
 Each frame begins with a two-byte tracepoint number, followed by a
@@ -40675,8 +41591,7 @@ endianness.
 @item R @var{bytes}
 Register block.  The number and ordering of bytes matches that of a
 @code{g} packet in the remote protocol.  Note that these are the
-actual bytes, in target order and @value{GDBN} register order, not a
-hexadecimal encoding.
+actual bytes, in target order, not a hexadecimal encoding.
 
 @item M @var{address} @var{length} @var{bytes}...
 Memory block.  This is a contiguous block of memory, at the 8-byte
@@ -40894,7 +41809,7 @@ switch (die->tag)
     break;
   case DW_TAG_enumerator:
     kind = VARIABLE;
-    is_static = (language != CPLUS && language != JAVA);
+    is_static = language != CPLUS;
     break;
   case DW_TAG_subprogram:
     kind = FUNCTION;
@@ -40918,7 +41833,7 @@ switch (die->tag)
   case DW_TAG_union_type:
   case DW_TAG_enumeration_type:
     kind = TYPE;
-    is_static = (language != CPLUS && language != JAVA);
+    is_static = language != CPLUS;
     break;
   default:
     assert (0);
@@ -41014,7 +41929,7 @@ Here are some of the most frequently nee
 
 @c pod2man highlights the right hand side of the @item lines.
 @table @env
-@item break [@var{file}:]@var{functiop}
+@item break [@var{file}:]@var{function}
 Set a breakpoint at @var{function} (in @var{file}).
 
 @item run [@var{arglist}]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/.gitignore ./gdb/doc/.gitignore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/doc/.gitignore	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1 @@
+/Makefile
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/guile.texi ./gdb/doc/guile.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/guile.texi	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/guile.texi	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-@c Copyright (C) 2008-2015 Free Software Foundation, Inc.
+@c Copyright (C) 2008-2017 Free Software Foundation, Inc.
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.3 or
 @c any later version published by the Free Software Foundation; with the
@@ -1258,7 +1258,7 @@ A string of bits.  It is deprecated.
 An unknown or erroneous type.
 
 @item TYPE_CODE_METHOD
-A method type, as found in C@t{++} or Java.
+A method type, as found in C@t{++}.
 
 @item TYPE_CODE_METHODPTR
 A pointer-to-member-function.
@@ -1322,7 +1322,7 @@ Return the enum value represented by @co
 @deffn {Scheme Procedure} field-bitpos field
 Return the bit position of @code{<gdb:field>} @var{field}.
 This attribute is not available for @code{static} fields (as in
-C@t{++} or Java).
+C@t{++}).
 @end deffn
 
 @deffn {Scheme Procedure} field-bitsize field
@@ -3127,13 +3127,14 @@ At present, @var{count} must be zero.
 @end deffn
 
 @deffn {Scheme Procedure} breakpoint-thread breakpoint
-Return the thread-id for thread-specific breakpoint @var{breakpoint}.
-Return #f if @var{breakpoint} is not thread-specific.
+Return the global-thread-id for thread-specific breakpoint
+@var{breakpoint}.  Return #f if @var{breakpoint} is not
+thread-specific.
 @end deffn
 
-@deffn {Scheme Procedure} set-breakpoint-thread! breakpoint thread-id|#f
-Set the thread-id for @var{breakpoint} to @var{thread-id}.
-If set to @code{#f}, the breakpoint is no longer thread-specific.
+@deffn {Scheme Procedure} set-breakpoint-thread! breakpoint global-thread-id|#f
+Set the thread-id for @var{breakpoint} to @var{global-thread-id} If
+set to @code{#f}, the breakpoint is no longer thread-specific.
 @end deffn
 
 @deffn {Scheme Procedure} breakpoint-task breakpoint
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Makefile.in ./gdb/doc/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-##Copyright (C) 1991-2015 Free Software Foundation, Inc.
+##Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
 # Makefile for GDB documentation.
 # This file is part of GDB.
@@ -143,7 +143,9 @@ GDB_DOC_FILES = \
 # Stabs manual: All files
 STABS_DOC_SOURCE_INCLUDES = \
 	$(srcdir)/fdl.texi
-STABS_DOC_BUILD_INCLUDES =
+STABS_DOC_BUILD_INCLUDES = \
+	gdb-cfg.texi \
+	GDBvn.texi
 STABS_DOC_FILES = \
 	$(srcdir)/stabs.texinfo \
 	$(STABS_DOC_SOURCE_INCLUDES) \
@@ -674,3 +676,6 @@ maintainer-clean realclean: distclean
 install: install-info install-man
 
 uninstall: uninstall-info uninstall-man
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/observer.texi ./gdb/doc/observer.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/observer.texi	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/observer.texi	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 @c This file is part of the GDB manual.
 @c
-@c Copyright (C) 2003-2015 Free Software Foundation, Inc.
+@c Copyright (C) 2003-2017 Free Software Foundation, Inc.
 @c
 @c See the file gdbint.texinfo for copying conditions.
 @c
@@ -141,11 +141,16 @@ at the entry-point instruction.  For @sa
 inferior, and before any information on the inferior has been printed.
 @end deftypefun
 
-@deftypefun void record_changed (struct inferior *@var{inferior}, int @var{started})
+@deftypefun void record_changed (struct inferior *@var{inferior}, int @var{started}, const char *@var{method}, const char *@var{format})
 The status of process record for inferior @var{inferior} in
 @value{GDBN} has changed.  The process record is started if
 @var{started} is true, and the process record is stopped if
 @var{started} is false.
+
+When @var{started} is true, @var{method} indicates the short name of the method
+used for recording.  If the method supports multiple formats, @var{format}
+indicates which one is being used, otherwise it is NULL.  When @var{started} is
+false, they are both NULL.
 @end deftypefun
 
 @deftypefun void solib_loaded (struct so_list *@var{solib})
@@ -302,3 +307,7 @@ This observer is used for internal testi
 See testsuite/gdb.gdb/observer.exp.
 @end deftypefun
 
+@deftypefun void user_selected_context_changed (user_selected_what @var{selection})
+The user-selected inferior, thread and/or frame has changed.  The user_select_what
+flag specifies if the inferior, thread and/or frame has changed.
+@end deftypefun
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/python.texi ./gdb/doc/python.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/python.texi	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/python.texi	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-@c Copyright (C) 2008-2015 Free Software Foundation, Inc.
+@c Copyright (C) 2008-2017 Free Software Foundation, Inc.
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.3 or
 @c any later version published by the Free Software Foundation; with the
@@ -151,6 +151,7 @@ optional arguments while skipping others
 * Inferiors In Python::         Python representation of inferiors (processes)
 * Events In Python::            Listening for events from @value{GDBN}.
 * Threads In Python::           Accessing inferior threads from Python.
+* Recordings In Python::        Accessing recordings from Python.
 * Commands In Python::          Implementing new commands in Python.
 * Parameters In Python::        Adding new @value{GDBN} parameters.
 * Functions In Python::         Writing new convenience functions.
@@ -236,7 +237,10 @@ and height, and its pagination will be d
 @findex gdb.breakpoints
 @defun gdb.breakpoints ()
 Return a sequence holding all of @value{GDBN}'s breakpoints.
-@xref{Breakpoints In Python}, for more information.
+@xref{Breakpoints In Python}, for more information.  In @value{GDBN}
+version 7.11 and earlier, this function returned @code{None} if there
+were no breakpoints.  This peculiarity was subsequently fixed, and now
+@code{gdb.breakpoints} returns an empty sequence in this case.
 @end defun
 
 @findex gdb.parameter
@@ -946,7 +950,7 @@ Each field is a @code{gdb.Field} object,
 @table @code
 @item bitpos
 This attribute is not available for @code{enum} or @code{static}
-(as in C@t{++} or Java) fields.  The value is the position, counting
+(as in C@t{++}) fields.  The value is the position, counting
 in bits, from the start of the containing type.
 
 @item enumval
@@ -1144,7 +1148,7 @@ An unknown or erroneous type.
 
 @vindex TYPE_CODE_METHOD
 @item gdb.TYPE_CODE_METHOD
-A method type, as found in C@t{++} or Java.
+A method type, as found in C@t{++}.
 
 @vindex TYPE_CODE_METHODPTR
 @item gdb.TYPE_CODE_METHODPTR
@@ -2855,7 +2859,7 @@ has returned.  (The exit code could be u
 @value{GDBN} detaches from the inferior.) If the exit code is unavailable,
 the attribute does not exist.
 @end defvar
-@defvar ExitedEvent inferior
+@defvar ExitedEvent.inferior
 A reference to the inferior which triggered the @code{exited} event.
 @end defvar
 
@@ -2962,6 +2966,25 @@ A gdb.Frame object representing the fram
 Denotes which register was modified.
 @end defvar
 
+@item events.breakpoint_created
+This is emitted when a new breakpoint has been created.  The argument
+that is passed is the new @code{gdb.Breakpoint} object.
+
+@item events.breakpoint_modified
+This is emitted when a breakpoint has been modified in some way.  The
+argument that is passed is the new @code{gdb.Breakpoint} object.
+
+@item events.breakpoint_deleted
+This is emitted when a breakpoint has been deleted.  The argument that
+is passed is the @code{gdb.Breakpoint} object.  When this event is
+emitted, the @code{gdb.Breakpoint} object will already be in its
+invalid state; that is, the @code{is_valid} method will return
+@code{False}.
+
+@item events.before_prompt
+This event carries no payload.  It is emitted each time @value{GDBN}
+presents a prompt to the user.
+
 @end table
 
 @node Threads In Python
@@ -2995,7 +3018,13 @@ user-specified thread name.
 @end defvar
 
 @defvar InferiorThread.num
-ID of the thread, as assigned by GDB.
+The per-inferior number of the thread, as assigned by GDB.
+@end defvar
+
+@defvar InferiorThread.global_num
+The global ID of the thread, as assigned by GDB.  You can use this to
+make Python breakpoints thread-specific, for example
+(@pxref{python_breakpoint_thread,,The Breakpoint.thread attribute}).
 @end defvar
 
 @defvar InferiorThread.ptid
@@ -3006,6 +3035,11 @@ Either the LWPID or TID may be 0, which 
 does not  use that identifier.
 @end defvar
 
+@defvar InferiorThread.inferior
+The inferior this thread belongs to.  This attribute is represented as
+a @code{gdb.Inferior} object.  This attribute is not writable.
+@end defvar
+
 A @code{gdb.InferiorThread} object has the following methods:
 
 @defun InferiorThread.is_valid ()
@@ -3033,6 +3067,250 @@ Return a Boolean indicating whether the 
 Return a Boolean indicating whether the thread is exited.
 @end defun
 
+@node Recordings In Python
+@subsubsection Recordings In Python
+@cindex recordings in python
+
+The following recordings-related functions
+(@pxref{Process Record and Replay}) are available in the @code{gdb}
+module:
+
+@defun gdb.start_recording (@r{[}method@r{]}, @r{[}format@r{]})
+Start a recording using the given @var{method} and @var{format}.  If
+no @var{format} is given, the default format for the recording method
+is used.  If no @var{method} is given, the default method will be used.
+Returns a @code{gdb.Record} object on success.  Throw an exception on
+failure.
+
+The following strings can be passed as @var{method}:
+
+@itemize @bullet
+@item
+@code{"full"}
+@item
+@code{"btrace"}: Possible values for @var{format}: @code{"pt"},
+@code{"bts"} or leave out for default format.
+@end itemize
+@end defun
+
+@defun gdb.current_recording ()
+Access a currently running recording.  Return a @code{gdb.Record}
+object on success.  Return @code{None} if no recording is currently
+active.
+@end defun
+
+@defun gdb.stop_recording ()
+Stop the current recording.  Throw an exception if no recording is
+currently active.  All record objects become invalid after this call.
+@end defun
+
+A @code{gdb.Record} object has the following attributes:
+
+@defvar Record.ptid
+ID of the thread associated with this object as a tuple of three integers.  The
+first is the Process ID (PID); the second is the Lightweight Process ID (LWPID),
+and the third is the Thread ID (TID). Either the LWPID or TID may be 0, which
+indicates that the operating system does not use that identifier.
+@end defvar
+
+@defvar Record.method
+A string with the current recording method, e.g.@: @code{full} or
+@code{btrace}.
+@end defvar
+
+@defvar Record.format
+A string with the current recording format, e.g.@: @code{bt}, @code{pts} or
+@code{None}.
+@end defvar
+
+@defvar Record.begin
+A method specific instruction object representing the first instruction
+in this recording.
+@end defvar
+
+@defvar Record.end
+A method specific instruction object representing the current
+instruction, that is not actually part of the recording.
+@end defvar
+
+@defvar Record.replay_position
+The instruction representing the current replay position.  If there is
+no replay active, this will be @code{None}.
+@end defvar
+
+@defvar Record.instruction_history
+A list with all recorded instructions.
+@end defvar
+
+@defvar Record.function_call_history
+A list with all recorded function call segments.
+@end defvar
+
+A @code{gdb.Record} object has the following methods:
+
+@defun Record.goto (instruction)
+Move the replay position to the given @var{instruction}.
+@end defun
+
+The attributes and methods of instruction objects depend on the current
+recording method.  Currently, only btrace instructions are supported.
+
+A @code{gdb.BtraceInstruction} object has the following attributes:
+
+@defvar BtraceInstruction.number
+An integer identifying this instruction.  @var{number} corresponds to
+the numbers seen in @code{record instruction-history}
+(@pxref{Process Record and Replay}).
+@end defvar
+
+@defvar BtraceInstruction.error
+An integer identifying the error code for gaps in the history.
+@code{None} for regular instructions.
+@end defvar
+
+@defvar BtraceInstruction.sal
+A @code{gdb.Symtab_and_line} object representing the associated symtab
+and line of this instruction.  May be @code{None} if the instruction
+is a gap.
+@end defvar
+
+@defvar BtraceInstruction.pc
+An integer representing this instruction's address.  May be @code{None}
+if the instruction is a gap or the debug symbols could not be read.
+@end defvar
+
+@defvar BtraceInstruction.data
+A buffer with the raw instruction data.  May be @code{None} if the
+instruction is a gap.
+@end defvar
+
+@defvar BtraceInstruction.decoded
+A human readable string with the disassembled instruction.  Contains the
+error message for gaps.
+@end defvar
+
+@defvar BtraceInstruction.size
+The size of the instruction in bytes.  Will be @code{None} if the
+instruction is a gap.
+@end defvar
+
+@defvar BtraceInstruction.is_speculative
+A boolean indicating whether the instruction was executed
+speculatively.  Will be @code{None} for gaps.
+@end defvar
+
+The attributes and methods of function call objects depend on the
+current recording format.  Currently, only btrace function calls are
+supported.
+
+A @code{gdb.BtraceFunctionCall} object has the following attributes:
+
+@defvar BtraceFunctionCall.number
+An integer identifying this function call.  @var{number} corresponds to
+the numbers seen in @code{record function-call-history}
+(@pxref{Process Record and Replay}).
+@end defvar
+
+@defvar BtraceFunctionCall.symbol
+A @code{gdb.Symbol} object representing the associated symbol.  May be
+@code{None} if the function call is a gap or the debug symbols could
+not be read.
+@end defvar
+
+@defvar BtraceFunctionCall.level
+An integer representing the function call's stack level.  May be
+@code{None} if the function call is a gap.
+@end defvar
+
+@defvar BtraceFunctionCall.instructions
+A list of @code{gdb.BtraceInstruction} objects associated with this function
+call.
+@end defvar
+
+@defvar BtraceFunctionCall.up
+A @code{gdb.BtraceFunctionCall} object representing the caller's
+function segment.  If the call has not been recorded, this will be the
+function segment to which control returns.  If neither the call nor the
+return have been recorded, this will be @code{None}.
+@end defvar
+
+@defvar BtraceFunctionCall.prev_sibling
+A @code{gdb.BtraceFunctionCall} object representing the previous
+segment of this function call.  May be @code{None}.
+@end defvar
+
+@defvar BtraceFunctionCall.next_sibling
+A @code{gdb.BtraceFunctionCall} object representing the next segment of
+this function call.  May be @code{None}.
+@end defvar
+
+The following example demonstrates the usage of these objects and
+functions to create a function that will rewind a record to the last
+time a function in a different file was executed.  This would typically
+be used to track the execution of user provided callback functions in a
+library which typically are not visible in a back trace.
+
+@smallexample
+def bringback ():
+    rec = gdb.current_recording ()
+    if not rec:
+        return
+
+    insn = rec.instruction_history
+    if len (insn) == 0:
+        return
+
+    try:
+        position = insn.index (rec.replay_position)
+    except:
+        position = -1
+    try:
+        filename = insn[position].sal.symtab.fullname ()
+    except:
+        filename = None
+
+    for i in reversed (insn[:position]):
+	try:
+            current = i.sal.symtab.fullname ()
+	except:
+            current = None
+
+        if filename == current:
+            continue
+
+        rec.goto (i)
+        return
+@end smallexample
+
+Another possible application is to write a function that counts the
+number of code executions in a given line range.  This line range can
+contain parts of functions or span across several functions and is not
+limited to be contiguous.
+
+@smallexample
+def countrange (filename, linerange):
+    count = 0
+
+    def filter_only (file_name):
+        for call in gdb.current_recording ().function_call_history:
+            try:
+                if file_name in call.symbol.symtab.fullname ():
+                    yield call
+            except:
+                pass
+
+    for c in filter_only (filename):
+        for i in c.instructions:
+            try:
+                if i.sal.line in linerange:
+                    count += 1
+                    break;
+            except:
+                    pass
+
+    return count
+@end smallexample
+
 @node Commands In Python
 @subsubsection Commands In Python
 
@@ -3824,6 +4102,15 @@ frames, as expressed by the given @var{r
 @code{unwind_stop_reason} method further down in this section).
 @end defun
 
+@findex gdb.invalidate_cached_frames
+@defun gdb.invalidate_cached_frames
+@value{GDBN} internally keeps a cache of the frames that have been
+unwound.  This function invalidates this cache.
+
+This function should not generally be called by ordinary Python code.
+It is documented for the sake of completeness.
+@end defun
+
 A @code{gdb.Frame} object has the following methods:
 
 @defun Frame.is_valid ()
@@ -4556,6 +4843,48 @@ the class of watchpoint to create, if @v
 is assumed to be a @code{gdb.WP_WRITE} class.
 @end defun
 
+The available types are represented by constants defined in the @code{gdb}
+module:
+
+@vtable @code
+@vindex BP_BREAKPOINT
+@item gdb.BP_BREAKPOINT
+Normal code breakpoint.
+
+@vindex BP_WATCHPOINT
+@item gdb.BP_WATCHPOINT
+Watchpoint breakpoint.
+
+@vindex BP_HARDWARE_WATCHPOINT
+@item gdb.BP_HARDWARE_WATCHPOINT
+Hardware assisted watchpoint.
+
+@vindex BP_READ_WATCHPOINT
+@item gdb.BP_READ_WATCHPOINT
+Hardware assisted read watchpoint.
+
+@vindex BP_ACCESS_WATCHPOINT
+@item gdb.BP_ACCESS_WATCHPOINT
+Hardware assisted access watchpoint.
+@end vtable
+
+The available watchpoint types represented by constants are defined in the
+@code{gdb} module:
+
+@vtable @code
+@vindex WP_READ
+@item gdb.WP_READ
+Read only watchpoint.
+
+@vindex WP_WRITE
+@item gdb.WP_WRITE
+Write only watchpoint.
+
+@vindex WP_ACCESS
+@item gdb.WP_ACCESS
+Read/Write watchpoint.
+@end vtable
+
 @defun Breakpoint.stop (self)
 The @code{gdb.Breakpoint} class can be sub-classed and, in
 particular, you may choose to implement the @code{stop} method.
@@ -4590,23 +4919,6 @@ class MyBreakpoint (gdb.Breakpoint):
 @end smallexample
 @end defun
 
-The available watchpoint types represented by constants are defined in the
-@code{gdb} module:
-
-@vtable @code
-@vindex WP_READ
-@item gdb.WP_READ
-Read only watchpoint.
-
-@vindex WP_WRITE
-@item gdb.WP_WRITE
-Write only watchpoint.
-
-@vindex WP_ACCESS
-@item gdb.WP_ACCESS
-Read/Write watchpoint.
-@end vtable
-
 @defun Breakpoint.is_valid ()
 Return @code{True} if this @code{Breakpoint} object is valid,
 @code{False} otherwise.  A @code{Breakpoint} object can become invalid
@@ -4637,10 +4949,17 @@ first command is @code{silent}.  This is
 @code{silent} attribute.
 @end defvar
 
+@defvar Breakpoint.pending
+This attribute is @code{True} if the breakpoint is pending, and
+@code{False} otherwise.  @xref{Set Breaks}.  This attribute is
+read-only.
+@end defvar
+
+@anchor{python_breakpoint_thread}
 @defvar Breakpoint.thread
-If the breakpoint is thread-specific, this attribute holds the thread
-id.  If the breakpoint is not thread-specific, this attribute is
-@code{None}.  This attribute is writable.
+If the breakpoint is thread-specific, this attribute holds the
+thread's global id.  If the breakpoint is not thread-specific, this
+attribute is @code{None}.  This attribute is writable.
 @end defvar
 
 @defvar Breakpoint.task
@@ -4682,31 +5001,6 @@ function, will result in an error after 
 writable.
 @end defvar
 
-The available types are represented by constants defined in the @code{gdb}
-module:
-
-@vtable @code
-@vindex BP_BREAKPOINT
-@item gdb.BP_BREAKPOINT
-Normal code breakpoint.
-
-@vindex BP_WATCHPOINT
-@item gdb.BP_WATCHPOINT
-Watchpoint breakpoint.
-
-@vindex BP_HARDWARE_WATCHPOINT
-@item gdb.BP_HARDWARE_WATCHPOINT
-Hardware assisted watchpoint.
-
-@vindex BP_READ_WATCHPOINT
-@item gdb.BP_READ_WATCHPOINT
-Hardware assisted read watchpoint.
-
-@vindex BP_ACCESS_WATCHPOINT
-@item gdb.BP_ACCESS_WATCHPOINT
-Hardware assisted access watchpoint.
-@end vtable
-
 @defvar Breakpoint.hit_count
 This attribute holds the hit count for the breakpoint, an integer.
 This attribute is writable, but currently it can only be set to zero.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/refcard.tex ./gdb/doc/refcard.tex
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/refcard.tex	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/refcard.tex	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 %%%%%%%%%%%%%%%% gdb-refcard.tex %%%%%%%%%%%%%%%%
 
 %This file is TeX source for a reference card describing GDB, the GNU debugger.
-%Copyright (C) 1991-2015 Free Software Foundation, Inc.
+%Copyright (C) 1991-2017 Free Software Foundation, Inc.
 %Permission is granted to make and distribute verbatim copies of
 %this reference provided the copyright notices and permission notices
 %are preserved on all copies.
@@ -307,7 +307,7 @@ shell {\it cmd}&execute arbitrary shell 
 \line{\smrm \opt{ } surround optional arguments \hfill $\ldots$ show
 one or more arguments}
 \vskip\baselineskip
-\centerline{\smrm \copyright 1998-2015 Free Software Foundation, Inc.\qquad Permissions on back}
+\centerline{\smrm \copyright 1998-2017 Free Software Foundation, Inc.\qquad Permissions on back}
 \eject
 \sec Breakpoints and Watchpoints;
 break \opt{\it file\tt:}{\it line}\par
@@ -632,7 +632,7 @@ statement.\cr 
 
 \vfill
 {\smrm\parskip=6pt
-Copyright \copyright 1991-2015 Free Software Foundation, Inc.
+Copyright \copyright 1991-2017 Free Software Foundation, Inc.
 Author: Roland H. Pesch
 
 The author assumes no responsibility for any errors on this card.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/stabs.info ./gdb/doc/stabs.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/stabs.info	2015-07-06 01:51:12.000000000 +0000
+++ ./gdb/doc/stabs.info	2017-03-06 01:53:27.000000000 +0000
@@ -1,13 +1,7 @@
-This is stabs.info, produced by makeinfo version 4.13 from
-./stabs.texinfo.
+This is stabs.info, produced by makeinfo version 6.3 from stabs.texinfo.
 
-INFO-DIR-SECTION Software development
-START-INFO-DIR-ENTRY
-* Stabs: (stabs).                 The "stabs" debugging information format.
-END-INFO-DIR-ENTRY
-
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.  Contributed
-by Cygnus Support.  Written by Julia Menapace, Jim Kingdon, and David
+Copyright (C) 1992-2017 Free Software Foundation, Inc.  Contributed by
+Cygnus Support.  Written by Julia Menapace, Jim Kingdon, and David
 MacKenzie.
 
    Permission is granted to copy, distribute and/or modify this document
@@ -16,10 +10,14 @@ any later version published by the Free 
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the section entitled "GNU
 Free Documentation License".
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Stabs: (stabs).                 The "stabs" debugging information format.
+END-INFO-DIR-ENTRY
 
    This document describes the stabs debugging symbol tables.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.  Contributed
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.  Contributed
 by Cygnus Support.  Written by Julia Menapace, Jim Kingdon, and David
 MacKenzie.
 
@@ -64,20 +62,20 @@ File: stabs.info,  Node: Overview,  Next
 1 Overview of Stabs
 *******************
 
-"Stabs" refers to a format for information that describes a program to
-a debugger.  This format was apparently invented by Peter Kessler at
-the University of California at Berkeley, for the `pdx' Pascal
-debugger; the format has spread widely since then.
+"Stabs" refers to a format for information that describes a program to a
+debugger.  This format was apparently invented by Peter Kessler at the
+University of California at Berkeley, for the 'pdx' Pascal debugger; the
+format has spread widely since then.
 
    This document is one of the few published sources of documentation on
-stabs.  It is believed to be comprehensive for stabs used by C.  The
+stabs.  It is believed to be comprehensive for stabs used by C. The
 lists of symbol descriptors (*note Symbol Descriptors::) and type
 descriptors (*note Type Descriptors::) are believed to be completely
 comprehensive.  Stabs for COBOL-specific features and for variant
 records (used by Pascal and Modula-2) are poorly documented here.
 
-   Other sources of information on stabs are `Dbx and Dbxtool
-Interfaces', 2nd edition, by Sun, 1988, and `AIX Version 3.2 Files
+   Other sources of information on stabs are 'Dbx and Dbxtool
+Interfaces', 2nd edition, by Sun, 1988, and 'AIX Version 3.2 Files
 Reference', Fourth Edition, September 1992, "dbx Stabstring Grammar" in
 the a.out section, page 2-31.  This document is believed to incorporate
 the information from those two sources except where it explicitly
@@ -97,16 +95,16 @@ File: stabs.info,  Node: Flow,  Next: St
 1.1 Overview of Debugging Information Flow
 ==========================================
 
-The GNU C compiler compiles C source in a `.c' file into assembly
-language in a `.s' file, which the assembler translates into a `.o'
-file, which the linker combines with other `.o' files and libraries to
+The GNU C compiler compiles C source in a '.c' file into assembly
+language in a '.s' file, which the assembler translates into a '.o'
+file, which the linker combines with other '.o' files and libraries to
 produce an executable file.
 
-   With the `-g' option, GCC puts in the `.s' file additional debugging
+   With the '-g' option, GCC puts in the '.s' file additional debugging
 information, which is slightly transformed by the assembler and linker,
 and carried through into the final executable.  This debugging
-information describes features of the source file like line numbers,
-the types and scopes of variables, and function names, parameters, and
+information describes features of the source file like line numbers, the
+types and scopes of variables, and function names, parameters, and
 scopes.
 
    For some object file formats, the debugging information is
@@ -118,7 +116,7 @@ in the COFF and ECOFF object file format
 
    The assembler adds the information from stabs to the symbol
 information it places by default in the symbol table and the string
-table of the `.o' file it is building.  The linker consolidates the `.o'
+table of the '.o' file it is building.  The linker consolidates the '.o'
 files into one executable file, with one symbol table and one string
 table.  Debuggers use the symbol and string tables in the executable as
 a source of debugging information about the program.
@@ -132,9 +130,9 @@ File: stabs.info,  Node: Stabs Format,  
 There are three overall formats for stab assembler directives,
 differentiated by the first word of the stab.  The name of the directive
 describes which combination of four possible data fields follows.  It is
-either `.stabs' (string), `.stabn' (number), or `.stabd' (dot).  IBM's
-XCOFF assembler uses `.stabx' (and some other directives such as
-`.file' and `.bi') instead of `.stabs', `.stabn' or `.stabd'.
+either '.stabs' (string), '.stabn' (number), or '.stabd' (dot).  IBM's
+XCOFF assembler uses '.stabx' (and some other directives such as '.file'
+and '.bi') instead of '.stabs', '.stabn' or '.stabd'.
 
    The overall format of each class of stab is:
 
@@ -143,19 +141,19 @@ XCOFF assembler uses `.stabx' (and some 
      .stabd TYPE,OTHER,DESC
      .stabx "STRING",VALUE,TYPE,SDB-TYPE
 
-   For `.stabn' and `.stabd', there is no STRING (the `n_strx' field is
-zero; see *note Symbol Tables::).  For `.stabd', the VALUE field is
-implicit and has the value of the current file location.  For `.stabx',
+   For '.stabn' and '.stabd', there is no STRING (the 'n_strx' field is
+zero; see *note Symbol Tables::).  For '.stabd', the VALUE field is
+implicit and has the value of the current file location.  For '.stabx',
 the SDB-TYPE field is unused for stabs and can always be set to zero.
 The OTHER field is almost always unused and can be set to zero.
 
-   The number in the TYPE field gives some basic information about
-which type of stab this is (or whether it _is_ a stab, as opposed to an
-ordinary symbol).  Each valid type number defines a different stab
-type; further, the stab type defines the exact interpretation of, and
-possible values for, any remaining STRING, DESC, or VALUE fields
-present in the stab.  *Note Stab Types::, for a list in numeric order
-of the valid TYPE field values for stab directives.
+   The number in the TYPE field gives some basic information about which
+type of stab this is (or whether it _is_ a stab, as opposed to an
+ordinary symbol).  Each valid type number defines a different stab type;
+further, the stab type defines the exact interpretation of, and possible
+values for, any remaining STRING, DESC, or VALUE fields present in the
+stab.  *Note Stab Types::, for a list in numeric order of the valid TYPE
+field values for stab directives.
 
 
 File: stabs.info,  Node: String Field,  Next: C Example,  Prev: Stabs Format,  Up: Overview
@@ -173,103 +171,102 @@ For other stab types the contents can be
      "NAME:SYMBOL-DESCRIPTOR TYPE-INFORMATION"
 
    NAME is the name of the symbol represented by the stab; it can
-contain a pair of colons (*note Nested Symbols::).  NAME can be
-omitted, which means the stab represents an unnamed object.  For
-example, `:t10=*2' defines type 10 as a pointer to type 2, but does not
-give the type a name.  Omitting the NAME field is supported by AIX dbx
-and GDB after about version 4.8, but not other debuggers.  GCC
-sometimes uses a single space as the name instead of omitting the name
-altogether; apparently that is supported by most debuggers.
+contain a pair of colons (*note Nested Symbols::).  NAME can be omitted,
+which means the stab represents an unnamed object.  For example,
+':t10=*2' defines type 10 as a pointer to type 2, but does not give the
+type a name.  Omitting the NAME field is supported by AIX dbx and GDB
+after about version 4.8, but not other debuggers.  GCC sometimes uses a
+single space as the name instead of omitting the name altogether;
+apparently that is supported by most debuggers.
 
-   The SYMBOL-DESCRIPTOR following the `:' is an alphabetic character
+   The SYMBOL-DESCRIPTOR following the ':' is an alphabetic character
 that tells more specifically what kind of symbol the stab represents.
 If the SYMBOL-DESCRIPTOR is omitted, but type information follows, then
-the stab represents a local variable.  For a list of symbol
-descriptors, see *note Symbol Descriptors::.  The `c' symbol descriptor
-is an exception in that it is not followed by type information.  *Note
+the stab represents a local variable.  For a list of symbol descriptors,
+see *note Symbol Descriptors::.  The 'c' symbol descriptor is an
+exception in that it is not followed by type information.  *Note
 Constants::.
 
-   TYPE-INFORMATION is either a TYPE-NUMBER, or `TYPE-NUMBER='.  A
-TYPE-NUMBER alone is a type reference, referring directly to a type
-that has already been defined.
-
-   The `TYPE-NUMBER=' form is a type definition, where the number
-represents a new type which is about to be defined.  The type
-definition may refer to other types by number, and those type numbers
-may be followed by `=' and nested definitions.  Also, the Lucid
-compiler will repeat `TYPE-NUMBER=' more than once if it wants to
-define several type numbers at once.
+   TYPE-INFORMATION is either a TYPE-NUMBER, or 'TYPE-NUMBER='.  A
+TYPE-NUMBER alone is a type reference, referring directly to a type that
+has already been defined.
+
+   The 'TYPE-NUMBER=' form is a type definition, where the number
+represents a new type which is about to be defined.  The type definition
+may refer to other types by number, and those type numbers may be
+followed by '=' and nested definitions.  Also, the Lucid compiler will
+repeat 'TYPE-NUMBER=' more than once if it wants to define several type
+numbers at once.
 
    In a type definition, if the character that follows the equals sign
-is non-numeric then it is a TYPE-DESCRIPTOR, and tells what kind of
-type is about to be defined.  Any other values following the
-TYPE-DESCRIPTOR vary, depending on the TYPE-DESCRIPTOR.  *Note Type
-Descriptors::, for a list of TYPE-DESCRIPTOR values.  If a number
-follows the `=' then the number is a TYPE-REFERENCE.  For a full
-description of types, *note Types::.
+is non-numeric then it is a TYPE-DESCRIPTOR, and tells what kind of type
+is about to be defined.  Any other values following the TYPE-DESCRIPTOR
+vary, depending on the TYPE-DESCRIPTOR.  *Note Type Descriptors::, for a
+list of TYPE-DESCRIPTOR values.  If a number follows the '=' then the
+number is a TYPE-REFERENCE.  For a full description of types, *note
+Types::.
 
    A TYPE-NUMBER is often a single number.  The GNU and Sun tools
 additionally permit a TYPE-NUMBER to be a pair
-(FILE-NUMBER,FILETYPE-NUMBER) (the parentheses appear in the string,
-and serve to distinguish the two cases).  The FILE-NUMBER is 0 for the
-base source file, 1 for the first included file, 2 for the next, and so
-on.  The FILETYPE-NUMBER is a number starting with 1 which is
-incremented for each new type defined in the file.  (Separating the
-file number and the type number permits the `N_BINCL' optimization to
-succeed more often; see *note Include Files::).
-
-   There is an AIX extension for type attributes.  Following the `='
-are any number of type attributes.  Each one starts with `@' and ends
-with `;'.  Debuggers, including AIX's dbx and GDB 4.10, skip any type
-attributes they do not recognize.  GDB 4.9 and other versions of dbx
-may not do this.  Because of a conflict with C++ (*note Cplusplus::),
-new attributes should not be defined which begin with a digit, `(', or
-`-'; GDB may be unable to distinguish those from the C++ type
-descriptor `@'.  The attributes are:
+(FILE-NUMBER,FILETYPE-NUMBER) (the parentheses appear in the string, and
+serve to distinguish the two cases).  The FILE-NUMBER is 0 for the base
+source file, 1 for the first included file, 2 for the next, and so on.
+The FILETYPE-NUMBER is a number starting with 1 which is incremented for
+each new type defined in the file.  (Separating the file number and the
+type number permits the 'N_BINCL' optimization to succeed more often;
+see *note Include Files::).
+
+   There is an AIX extension for type attributes.  Following the '=' are
+any number of type attributes.  Each one starts with '@' and ends with
+';'.  Debuggers, including AIX's dbx and GDB 4.10, skip any type
+attributes they do not recognize.  GDB 4.9 and other versions of dbx may
+not do this.  Because of a conflict with C++ (*note Cplusplus::), new
+attributes should not be defined which begin with a digit, '(', or '-';
+GDB may be unable to distinguish those from the C++ type descriptor '@'.
+The attributes are:
 
-`aBOUNDARY'
+'aBOUNDARY'
      BOUNDARY is an integer specifying the alignment.  I assume it
      applies to all variables of this type.
 
-`pINTEGER'
+'pINTEGER'
      Pointer class (for checking).  Not sure what this means, or how
      INTEGER is interpreted.
 
-`P'
+'P'
      Indicate this is a packed type, meaning that structure fields or
-     array elements are placed more closely in memory, to save memory
-     at the expense of speed.
+     array elements are placed more closely in memory, to save memory at
+     the expense of speed.
 
-`sSIZE'
+'sSIZE'
      Size in bits of a variable of this type.  This is fully supported
      by GDB 4.11 and later.
 
-`S'
+'S'
      Indicate that this type is a string instead of an array of
-     characters, or a bitstring instead of a set.  It doesn't change
-     the layout of the data being represented, but does enable the
-     debugger to know which type it is.
+     characters, or a bitstring instead of a set.  It doesn't change the
+     layout of the data being represented, but does enable the debugger
+     to know which type it is.
 
-`V'
+'V'
      Indicate that this type is a vector instead of an array.  The only
      major difference between vectors and arrays is that vectors are
      passed by value instead of by reference (vector coprocessor
      extension).
 
-
    All of this can make the string field quite long.  All versions of
-GDB, and some versions of dbx, can handle arbitrarily long strings.
-But many versions of dbx (or assemblers or linkers, I'm not sure which)
+GDB, and some versions of dbx, can handle arbitrarily long strings.  But
+many versions of dbx (or assemblers or linkers, I'm not sure which)
 cretinously limit the strings to about 80 characters, so compilers which
-must work with such systems need to split the `.stabs' directive into
-several `.stabs' directives.  Each stab duplicates every field except
+must work with such systems need to split the '.stabs' directive into
+several '.stabs' directives.  Each stab duplicates every field except
 the string field.  The string field of every stab except the last is
 marked as continued with a backslash at the end (in the assembly code
 this may be written as a double backslash, depending on the assembler).
 Removing the backslashes and concatenating the string fields of each
 stab produces the original, long string.  Just to be incompatible (or so
 they don't have to worry about what the assembler does with
-backslashes), AIX can use `?' instead of backslash.
+backslashes), AIX can use '?' instead of backslash.
 
 
 File: stabs.info,  Node: C Example,  Next: Assembly Code,  Prev: String Field,  Up: Overview
@@ -285,9 +282,9 @@ program, let's look at the simple progra
              printf("Hello world");
      }
 
-   When compiled with `-g', the program above yields the following `.s'
+   When compiled with '-g', the program above yields the following '.s'
 file.  Line numbers have been added to make it easier to refer to parts
-of the `.s' file in the description of the stabs that follows.
+of the '.s' file in the description of the stabs that follows.
 
 
 File: stabs.info,  Node: Assembly Code,  Prev: C Example,  Up: Overview
@@ -295,8 +292,8 @@ File: stabs.info,  Node: Assembly Code, 
 1.5 The Simple Example at the Assembly Level
 ============================================
 
-This simple "hello world" example demonstrates several of the stab
-types used to describe C language source files.
+This simple "hello world" example demonstrates several of the stab types
+used to describe C language source files.
 
      1  gcc2_compiled.:
      2  .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0
@@ -379,13 +376,13 @@ File: stabs.info,  Node: Main Program,  
 2.1 Main Program
 ================
 
-Most languages allow the main program to have any name.  The `N_MAIN'
+Most languages allow the main program to have any name.  The 'N_MAIN'
 stab type tells the debugger the name that is used in this program.
-Only the string field is significant; it is the name of a function
-which is the main program.  Most C compilers do not use this stab (they
-expect the debugger to assume that the name is `main'), but some C
-compilers emit an `N_MAIN' stab for the `main' function.  I'm not sure
-how XCOFF handles this.
+Only the string field is significant; it is the name of a function which
+is the main program.  Most C compilers do not use this stab (they expect
+the debugger to assume that the name is 'main'), but some C compilers
+emit an 'N_MAIN' stab for the 'main' function.  I'm not sure how XCOFF
+handles this.
 
 
 File: stabs.info,  Node: Source Files,  Next: Include Files,  Prev: Main Program,  Up: Program Structure
@@ -394,10 +391,10 @@ File: stabs.info,  Node: Source Files,  
 =======================================
 
 Before any other stabs occur, there must be a stab specifying the source
-file.  This information is contained in a symbol of stab type `N_SO';
-the string field contains the name of the file.  The value of the
-symbol is the start address of the portion of the text section
-corresponding to that file.
+file.  This information is contained in a symbol of stab type 'N_SO';
+the string field contains the name of the file.  The value of the symbol
+is the start address of the portion of the text section corresponding to
+that file.
 
    Some compilers use the desc field to indicate the language of the
 source file.  Sun's compilers started this usage, and the first
@@ -406,40 +403,32 @@ gcc/gdb start at 0x32 to avoid conflict 
 the future.  A desc field with a value 0 indicates that no language has
 been specified via this mechanism.
 
-`N_SO_AS' (0x1)
+'N_SO_AS' (0x1)
      Assembly language
-
-`N_SO_C'  (0x2)
+'N_SO_C' (0x2)
      K&R traditional C
-
-`N_SO_ANSI_C' (0x3)
+'N_SO_ANSI_C' (0x3)
      ANSI C
-
-`N_SO_CC'  (0x4)
+'N_SO_CC' (0x4)
      C++
-
-`N_SO_FORTRAN' (0x5)
+'N_SO_FORTRAN' (0x5)
      Fortran
-
-`N_SO_PASCAL' (0x6)
+'N_SO_PASCAL' (0x6)
      Pascal
-
-`N_SO_FORTRAN90' (0x7)
+'N_SO_FORTRAN90' (0x7)
      Fortran90
-
-`N_SO_OBJC' (0x32)
+'N_SO_OBJC' (0x32)
      Objective-C
-
-`N_SO_OBJCPLUS' (0x33)
+'N_SO_OBJCPLUS' (0x33)
      Objective-C++
 
-   Some compilers (for example, GCC2 and SunOS4 `/bin/cc') also include
-the directory in which the source was compiled, in a second `N_SO'
+   Some compilers (for example, GCC2 and SunOS4 '/bin/cc') also include
+the directory in which the source was compiled, in a second 'N_SO'
 symbol preceding the one containing the file name.  This symbol can be
 distinguished by the fact that it ends in a slash.  Code from the
-`cfront' C++ compiler can have additional `N_SO' symbols for
-nonexistent source files after the `N_SO' for the real source file;
-these are believed to contain no useful information.
+'cfront' C++ compiler can have additional 'N_SO' symbols for nonexistent
+source files after the 'N_SO' for the real source file; these are
+believed to contain no useful information.
 
    For example:
 
@@ -448,17 +437,17 @@ these are believed to contain no useful 
              .text
      Ltext0:
 
-   Instead of `N_SO' symbols, XCOFF uses a `.file' assembler directive
-which assembles to a `C_FILE' symbol; explaining this in detail is
+   Instead of 'N_SO' symbols, XCOFF uses a '.file' assembler directive
+which assembles to a 'C_FILE' symbol; explaining this in detail is
 outside the scope of this document.
 
    If it is useful to indicate the end of a source file, this is done
-with an `N_SO' symbol with an empty string for the name.  The value is
+with an 'N_SO' symbol with an empty string for the name.  The value is
 the address of the end of the text section for the file.  For some
 systems, there is no indication of the end of a source file, and you
-just need to figure it ended when you see an `N_SO' for a different
-source file, or a symbol ending in `.o' (which at least some linkers
-insert to mark the start of a new `.o' file).
+just need to figure it ended when you see an 'N_SO' for a different
+source file, or a symbol ending in '.o' (which at least some linkers
+insert to mark the start of a new '.o' file).
 
 
 File: stabs.info,  Node: Include Files,  Next: Line Numbers,  Prev: Source Files,  Up: Program Structure
@@ -467,50 +456,49 @@ File: stabs.info,  Node: Include Files, 
 ==========================
 
 There are several schemes for dealing with include files: the
-traditional `N_SOL' approach, Sun's `N_BINCL' approach, and the XCOFF
-`C_BINCL' approach (which despite the similar name has little in common
-with `N_BINCL').
+traditional 'N_SOL' approach, Sun's 'N_BINCL' approach, and the XCOFF
+'C_BINCL' approach (which despite the similar name has little in common
+with 'N_BINCL').
 
-   An `N_SOL' symbol specifies which include file subsequent symbols
+   An 'N_SOL' symbol specifies which include file subsequent symbols
 refer to.  The string field is the name of the file and the value is the
 text address corresponding to the end of the previous include file and
 the start of this one.  To specify the main source file again, use an
-`N_SOL' symbol with the name of the main source file.
+'N_SOL' symbol with the name of the main source file.
 
-   The `N_BINCL' approach works as follows.  An `N_BINCL' symbol
+   The 'N_BINCL' approach works as follows.  An 'N_BINCL' symbol
 specifies the start of an include file.  In an object file, only the
 string is significant; the linker puts data into some of the other
-fields.  The end of the include file is marked by an `N_EINCL' symbol
-(which has no string field).  In an object file, there is no
-significant data in the `N_EINCL' symbol.  `N_BINCL' and `N_EINCL' can
-be nested.
+fields.  The end of the include file is marked by an 'N_EINCL' symbol
+(which has no string field).  In an object file, there is no significant
+data in the 'N_EINCL' symbol.  'N_BINCL' and 'N_EINCL' can be nested.
 
    If the linker detects that two source files have identical stabs
-between an `N_BINCL' and `N_EINCL' pair (as will generally be the case
+between an 'N_BINCL' and 'N_EINCL' pair (as will generally be the case
 for a header file), then it only puts out the stabs once.  Each
-additional occurrence is replaced by an `N_EXCL' symbol.  I believe the
+additional occurrence is replaced by an 'N_EXCL' symbol.  I believe the
 GNU linker and the Sun (both SunOS4 and Solaris) linker are the only
 ones which supports this feature.
 
    A linker which supports this feature will set the value of a
-`N_BINCL' symbol to the total of all the characters in the stabs
-strings included in the header file, omitting any file numbers.  The
-value of an `N_EXCL' symbol is the same as the value of the `N_BINCL'
-symbol it replaces.  This information can be used to match up `N_EXCL'
-and `N_BINCL' symbols which have the same filename.  The `N_EINCL'
-value, and the values of the other and description fields for all
-three, appear to always be zero.
-
-   For the start of an include file in XCOFF, use the `.bi' assembler
-directive, which generates a `C_BINCL' symbol.  A `.ei' directive,
-which generates a `C_EINCL' symbol, denotes the end of the include
-file.  Both directives are followed by the name of the source file in
-quotes, which becomes the string for the symbol.  The value of each
-symbol, produced automatically by the assembler and linker, is the
-offset into the executable of the beginning (inclusive, as you'd
-expect) or end (inclusive, as you would not expect) of the portion of
-the COFF line table that corresponds to this include file.  `C_BINCL'
-and `C_EINCL' do not nest.
+'N_BINCL' symbol to the total of all the characters in the stabs strings
+included in the header file, omitting any file numbers.  The value of an
+'N_EXCL' symbol is the same as the value of the 'N_BINCL' symbol it
+replaces.  This information can be used to match up 'N_EXCL' and
+'N_BINCL' symbols which have the same filename.  The 'N_EINCL' value,
+and the values of the other and description fields for all three, appear
+to always be zero.
+
+   For the start of an include file in XCOFF, use the '.bi' assembler
+directive, which generates a 'C_BINCL' symbol.  A '.ei' directive, which
+generates a 'C_EINCL' symbol, denotes the end of the include file.  Both
+directives are followed by the name of the source file in quotes, which
+becomes the string for the symbol.  The value of each symbol, produced
+automatically by the assembler and linker, is the offset into the
+executable of the beginning (inclusive, as you'd expect) or end
+(inclusive, as you would not expect) of the portion of the COFF line
+table that corresponds to this include file.  'C_BINCL' and 'C_EINCL' do
+not nest.
 
 
 File: stabs.info,  Node: Line Numbers,  Next: Procedures,  Prev: Include Files,  Up: Program Structure
@@ -518,30 +506,29 @@ File: stabs.info,  Node: Line Numbers,  
 2.4 Line Numbers
 ================
 
-An `N_SLINE' symbol represents the start of a source line.  The desc
+An 'N_SLINE' symbol represents the start of a source line.  The desc
 field contains the line number and the value contains the code address
 for the start of that source line.  On most machines the address is
 absolute; for stabs in sections (*note Stab Sections::), it is relative
-to the function in which the `N_SLINE' symbol occurs.
+to the function in which the 'N_SLINE' symbol occurs.
 
-   GNU documents `N_DSLINE' and `N_BSLINE' symbols for line numbers in
-the data or bss segments, respectively.  They are identical to
-`N_SLINE' but are relocated differently by the linker.  They were
-intended to be used to describe the source location of a variable
-declaration, but I believe that GCC2 actually puts the line number in
-the desc field of the stab for the variable itself.  GDB has been
-ignoring these symbols (unless they contain a string field) since at
-least GDB 3.5.
+   GNU documents 'N_DSLINE' and 'N_BSLINE' symbols for line numbers in
+the data or bss segments, respectively.  They are identical to 'N_SLINE'
+but are relocated differently by the linker.  They were intended to be
+used to describe the source location of a variable declaration, but I
+believe that GCC2 actually puts the line number in the desc field of the
+stab for the variable itself.  GDB has been ignoring these symbols
+(unless they contain a string field) since at least GDB 3.5.
 
    For single source lines that generate discontiguous code, such as
-flow of control statements, there may be more than one line number
-entry for the same source line.  In this case there is a line number
-entry at the start of each code range, each with the same line number.
+flow of control statements, there may be more than one line number entry
+for the same source line.  In this case there is a line number entry at
+the start of each code range, each with the same line number.
 
    XCOFF does not use stabs for line numbers.  Instead, it uses COFF
 line numbers (which are outside the scope of this document).  Standard
 COFF line numbers cannot deal with include files, but in XCOFF this is
-fixed with the `C_BINCL' method of marking include files (*note Include
+fixed with the 'C_BINCL' method of marking include files (*note Include
 Files::).
 
 
@@ -550,87 +537,86 @@ File: stabs.info,  Node: Procedures,  Ne
 2.5 Procedures
 ==============
 
-All of the following stabs normally use the `N_FUN' symbol type.
-However, Sun's `acc' compiler on SunOS4 uses `N_GSYM' and `N_STSYM',
+All of the following stabs normally use the 'N_FUN' symbol type.
+However, Sun's 'acc' compiler on SunOS4 uses 'N_GSYM' and 'N_STSYM',
 which means that the value of the stab for the function is useless and
 the debugger must get the address of the function from the non-stab
 symbols instead.  On systems where non-stab symbols have leading
 underscores, the stabs will lack underscores and the debugger needs to
 know about the leading underscore to match up the stab and the non-stab
-symbol.  BSD Fortran is said to use `N_FNAME' with the same
-restriction; the value of the symbol is not useful (I'm not sure it
-really does use this, because GDB doesn't handle this and no one has
-complained).
+symbol.  BSD Fortran is said to use 'N_FNAME' with the same restriction;
+the value of the symbol is not useful (I'm not sure it really does use
+this, because GDB doesn't handle this and no one has complained).
 
-   A function is represented by an `F' symbol descriptor for a global
-(extern) function, and `f' for a static (local) function.  For a.out,
+   A function is represented by an 'F' symbol descriptor for a global
+(extern) function, and 'f' for a static (local) function.  For a.out,
 the value of the symbol is the address of the start of the function; it
 is already relocated.  For stabs in ELF, the SunPRO compiler version
-2.0.1 and GCC put out an address which gets relocated by the linker.
-In a future release SunPRO is planning to put out zero, in which case
-the address can be found from the ELF (non-stab) symbol.  Because
-looking things up in the ELF symbols would probably be slow, I'm not
-sure how to find which symbol of that name is the right one, and this
-doesn't provide any way to deal with nested functions, it would
-probably be better to make the value of the stab an address relative to
-the start of the file, or just absolute.  See *note ELF Linker
-Relocation:: for more information on linker relocation of stabs in ELF
-files.  For XCOFF, the stab uses the `C_FUN' storage class and the
-value of the stab is meaningless; the address of the function can be
-found from the csect symbol (XTY_LD/XMC_PR).
+2.0.1 and GCC put out an address which gets relocated by the linker.  In
+a future release SunPRO is planning to put out zero, in which case the
+address can be found from the ELF (non-stab) symbol.  Because looking
+things up in the ELF symbols would probably be slow, I'm not sure how to
+find which symbol of that name is the right one, and this doesn't
+provide any way to deal with nested functions, it would probably be
+better to make the value of the stab an address relative to the start of
+the file, or just absolute.  See *note ELF Linker Relocation:: for more
+information on linker relocation of stabs in ELF files.  For XCOFF, the
+stab uses the 'C_FUN' storage class and the value of the stab is
+meaningless; the address of the function can be found from the csect
+symbol (XTY_LD/XMC_PR).
 
    The type information of the stab represents the return type of the
-function; thus `foo:f5' means that foo is a function returning type 5.
+function; thus 'foo:f5' means that foo is a function returning type 5.
 There is no need to try to get the line number of the start of the
-function from the stab for the function; it is in the next `N_SLINE'
+function from the stab for the function; it is in the next 'N_SLINE'
 symbol.
 
    Some compilers (such as Sun's Solaris compiler) support an extension
 for specifying the types of the arguments.  I suspect this extension is
-not used for old (non-prototyped) function definitions in C.  If the
+not used for old (non-prototyped) function definitions in C. If the
 extension is in use, the type information of the stab for the function
 is followed by type information for each argument, with each argument
-preceded by `;'.  An argument type of 0 means that additional arguments
-are being passed, whose types and number may vary (`...' in ANSI C).
-GDB has tolerated this extension (parsed the syntax, if not necessarily
-used the information) since at least version 4.8; I don't know whether
-all versions of dbx tolerate it.  The argument types given here are not
+preceded by ';'.  An argument type of 0 means that additional arguments
+are being passed, whose types and number may vary ('...' in ANSI C). GDB
+has tolerated this extension (parsed the syntax, if not necessarily used
+the information) since at least version 4.8; I don't know whether all
+versions of dbx tolerate it.  The argument types given here are not
 redundant with the symbols for the formal parameters (*note
 Parameters::); they are the types of the arguments as they are passed,
 before any conversions might take place.  For example, if a C function
-which is declared without a prototype takes a `float' argument, the
-value is passed as a `double' but then converted to a `float'.
+which is declared without a prototype takes a 'float' argument, the
+value is passed as a 'double' but then converted to a 'float'.
 Debuggers need to use the types given in the arguments when printing
 values, but when calling the function they need to use the types given
 in the symbol defining the function.
 
    If the return type and types of arguments of a function which is
-defined in another source file are specified (i.e., a function
-prototype in ANSI C), traditionally compilers emit no stab; the only
-way for the debugger to find the information is if the source file
-where the function is defined was also compiled with debugging symbols.
-As an extension the Solaris compiler uses symbol descriptor `P'
-followed by the return type of the function, followed by the arguments,
-each preceded by `;', as in a stab with symbol descriptor `f' or `F'.
-This use of symbol descriptor `P' can be distinguished from its use for
+defined in another source file are specified (i.e., a function prototype
+in ANSI C), traditionally compilers emit no stab; the only way for the
+debugger to find the information is if the source file where the
+function is defined was also compiled with debugging symbols.  As an
+extension the Solaris compiler uses symbol descriptor 'P' followed by
+the return type of the function, followed by the arguments, each
+preceded by ';', as in a stab with symbol descriptor 'f' or 'F'.  This
+use of symbol descriptor 'P' can be distinguished from its use for
 register parameters (*note Register Parameters::) by the fact that it
-has symbol type `N_FUN'.
+has symbol type 'N_FUN'.
 
-   The AIX documentation also defines symbol descriptor `J' as an
+   The AIX documentation also defines symbol descriptor 'J' as an
 internal function.  I assume this means a function nested within another
-function.  It also says symbol descriptor `m' is a module in Modula-2
-or extended Pascal.
+function.  It also says symbol descriptor 'm' is a module in Modula-2 or
+extended Pascal.
 
    Procedures (functions which do not return values) are represented as
-functions returning the `void' type in C.  I don't see why this couldn't
-be used for all languages (inventing a `void' type for this purpose if
-necessary), but the AIX documentation defines `I', `P', and `Q' for
+functions returning the 'void' type in C. I don't see why this couldn't
+be used for all languages (inventing a 'void' type for this purpose if
+necessary), but the AIX documentation defines 'I', 'P', and 'Q' for
 internal, global, and static procedures, respectively.  These symbol
 descriptors are unusual in that they are not followed by type
 information.
 
-   The following example shows a stab for a function `main' which
-returns type number `1'.  The `_main' specified for the value is a
+   The following example shows a stab for a function 'main' which
+returns type number '1'.  The '_main' specified for the value is a
 reference to an assembler label which is used to fill in the start
 address of the function.
 
@@ -644,7 +630,7 @@ and its block structure.
 
    If functions can appear in different sections, then the debugger may
 not be able to find the end of a function.  Recent versions of GCC will
-mark the end of a function with an `N_FUN' symbol with an empty string
+mark the end of a function with an 'N_FUN' symbol with an empty string
 for the name.  The value is the address of the end of the current
 function.  Without such a symbol, there is no indication of the address
 of the end of a function, and you must assume that it ended at the
@@ -662,7 +648,7 @@ symbol descriptor and the type informati
 specifier.  This consists of a comma, the name of the procedure, another
 comma, and the name of the enclosing procedure.  The first name is local
 to the scope specified, and seems to be redundant with the name of the
-symbol (before the `:').  This feature is used by GCC, and presumably
+symbol (before the ':').  This feature is used by GCC, and presumably
 Pascal, Modula-2, etc., compilers, for nested functions.
 
    If procedures are nested more than one level deep, only the
@@ -694,29 +680,28 @@ File: stabs.info,  Node: Block Structure
 2.7 Block Structure
 ===================
 
-The program's block structure is represented by the `N_LBRAC' (left
-brace) and the `N_RBRAC' (right brace) stab types.  The variables
-defined inside a block precede the `N_LBRAC' symbol for most compilers,
-including GCC.  Other compilers, such as the Convex, Acorn RISC
-machine, and Sun `acc' compilers, put the variables after the `N_LBRAC'
-symbol.  The values of the `N_LBRAC' and `N_RBRAC' symbols are the
-start and end addresses of the code of the block, respectively.  For
-most machines, they are relative to the starting address of this source
-file.  For the Gould NP1, they are absolute.  For stabs in sections
-(*note Stab Sections::), they are relative to the function in which
-they occur.
+The program's block structure is represented by the 'N_LBRAC' (left
+brace) and the 'N_RBRAC' (right brace) stab types.  The variables
+defined inside a block precede the 'N_LBRAC' symbol for most compilers,
+including GCC. Other compilers, such as the Convex, Acorn RISC machine,
+and Sun 'acc' compilers, put the variables after the 'N_LBRAC' symbol.
+The values of the 'N_LBRAC' and 'N_RBRAC' symbols are the start and end
+addresses of the code of the block, respectively.  For most machines,
+they are relative to the starting address of this source file.  For the
+Gould NP1, they are absolute.  For stabs in sections (*note Stab
+Sections::), they are relative to the function in which they occur.
 
-   The `N_LBRAC' and `N_RBRAC' stabs that describe the block scope of a
-procedure are located after the `N_FUN' stab that represents the
+   The 'N_LBRAC' and 'N_RBRAC' stabs that describe the block scope of a
+procedure are located after the 'N_FUN' stab that represents the
 procedure itself.
 
-   Sun documents the desc field of `N_LBRAC' and `N_RBRAC' symbols as
+   Sun documents the desc field of 'N_LBRAC' and 'N_RBRAC' symbols as
 containing the nesting level of the block.  However, dbx seems to not
 care, and GCC always sets desc to zero.
 
-   For XCOFF, block scope is indicated with `C_BLOCK' symbols.  If the
-name of the symbol is `.bb', then it is the beginning of the block; if
-the name of the symbol is `.be'; it is the end of the block.
+   For XCOFF, block scope is indicated with 'C_BLOCK' symbols.  If the
+name of the symbol is '.bb', then it is the beginning of the block; if
+the name of the symbol is '.be'; it is the end of the block.
 
 
 File: stabs.info,  Node: Alternate Entry Points,  Prev: Block Structure,  Up: Program Structure
@@ -726,13 +711,13 @@ File: stabs.info,  Node: Alternate Entry
 
 Some languages, like Fortran, have the ability to enter procedures at
 some place other than the beginning.  One can declare an alternate entry
-point.  The `N_ENTRY' stab is for this; however, the Sun FORTRAN
+point.  The 'N_ENTRY' stab is for this; however, the Sun FORTRAN
 compiler doesn't use it.  According to AIX documentation, only the name
-of a `C_ENTRY' stab is significant; the address of the alternate entry
-point comes from the corresponding external symbol.  A previous
-revision of this document said that the value of an `N_ENTRY' stab was
-the address of the alternate entry point, but I don't know the source
-for that information.
+of a 'C_ENTRY' stab is significant; the address of the alternate entry
+point comes from the corresponding external symbol.  A previous revision
+of this document said that the value of an 'N_ENTRY' stab was the
+address of the alternate entry point, but I don't know the source for
+that information.
 
 
 File: stabs.info,  Node: Constants,  Next: Variables,  Prev: Program Structure,  Up: Top
@@ -740,49 +725,49 @@ File: stabs.info,  Node: Constants,  Nex
 3 Constants
 ***********
 
-The `c' symbol descriptor indicates that this stab represents a
+The 'c' symbol descriptor indicates that this stab represents a
 constant.  This symbol descriptor is an exception to the general rule
 that symbol descriptors are followed by type information.  Instead, it
-is followed by `=' and one of the following:
+is followed by '=' and one of the following:
 
-`b VALUE'
+'b VALUE'
      Boolean constant.  VALUE is a numeric value; I assume it is 0 for
      false or 1 for true.
 
-`c VALUE'
+'c VALUE'
      Character constant.  VALUE is the numeric value of the constant.
 
-`e TYPE-INFORMATION , VALUE'
+'e TYPE-INFORMATION , VALUE'
      Constant whose value can be represented as integral.
      TYPE-INFORMATION is the type of the constant, as it would appear
      after a symbol descriptor (*note String Field::).  VALUE is the
      numeric value of the constant.  GDB 4.9 does not actually get the
-     right value if VALUE does not fit in a host `int', but it does not
+     right value if VALUE does not fit in a host 'int', but it does not
      do anything violent, and future debuggers could be extended to
      accept integers of any size (whether unsigned or not).  This
      constant type is usually documented as being only for enumeration
-     constants, but GDB has never imposed that restriction; I don't
-     know about other debuggers.
+     constants, but GDB has never imposed that restriction; I don't know
+     about other debuggers.
 
-`i VALUE'
+'i VALUE'
      Integer constant.  VALUE is the numeric value.  The type is some
-     sort of generic integer type (for GDB, a host `int'); to specify
-     the type explicitly, use `e' instead.
+     sort of generic integer type (for GDB, a host 'int'); to specify
+     the type explicitly, use 'e' instead.
 
-`r VALUE'
-     Real constant.  VALUE is the real value, which can be `INF'
-     (optionally preceded by a sign) for infinity, `QNAN' for a quiet
-     NaN (not-a-number), or `SNAN' for a signalling NaN.  If it is a
+'r VALUE'
+     Real constant.  VALUE is the real value, which can be 'INF'
+     (optionally preceded by a sign) for infinity, 'QNAN' for a quiet
+     NaN (not-a-number), or 'SNAN' for a signalling NaN. If it is a
      normal number the format is that accepted by the C library function
-     `atof'.
+     'atof'.
 
-`s STRING'
-     String constant.  STRING is a string enclosed in either `'' (in
-     which case `'' characters within the string are represented as
-     `\'' or `"' (in which case `"' characters within the string are
-     represented as `\"').
+'s STRING'
+     String constant.  STRING is a string enclosed in either ''' (in
+     which case ''' characters within the string are represented as '\''
+     or '"' (in which case '"' characters within the string are
+     represented as '\"').
 
-`S TYPE-INFORMATION , ELEMENTS , BITS , PATTERN'
+'S TYPE-INFORMATION , ELEMENTS , BITS , PATTERN'
      Set constant.  TYPE-INFORMATION is the type of the constant, as it
      would appear after a symbol descriptor (*note String Field::).
      ELEMENTS is the number of elements in the set (does this means how
@@ -790,8 +775,8 @@ is followed by `=' and one of the follow
      with the type, or perhaps the number of bits set in PATTERN?  I
      don't get it), BITS is the number of bits in the constant (meaning
      it specifies the length of PATTERN, I think), and PATTERN is a
-     hexadecimal representation of the set.  AIX documentation refers
-     to a limit of 32 bytes, but I see no reason why this limit should
+     hexadecimal representation of the set.  AIX documentation refers to
+     a limit of 32 bytes, but I see no reason why this limit should
      exist.  This form could probably be used for arbitrary constants,
      not just sets; the only catch is that PATTERN should be understood
      to be target, not host, byte order and format.
@@ -801,7 +786,7 @@ by GDB 4.9, but it ignores them.  GDB 4.
 message and refused to read symbols from the file containing the
 constants.
 
-   The above information is followed by `;'.
+   The above information is followed by ';'.
 
 
 File: stabs.info,  Node: Variables,  Next: Types,  Prev: Constants,  Up: Top
@@ -836,12 +821,12 @@ stack.
 
    Each variable allocated on the stack has a stab with the symbol
 descriptor omitted.  Since type information should begin with a digit,
-`-', or `(', only those characters precluded from being used for symbol
+'-', or '(', only those characters precluded from being used for symbol
 descriptors.  However, the Acorn RISC machine (ARM) is said to get this
 wrong: it puts out a mere type definition here, without the preceding
-`TYPE-NUMBER='.  This is a bad idea; there is no guarantee that type
+'TYPE-NUMBER='.  This is a bad idea; there is no guarantee that type
 descriptors are distinct from symbol descriptors.  Stabs for stack
-variables use the `N_LSYM' stab type, or `C_LSYM' for XCOFF.
+variables use the 'N_LSYM' stab type, or 'C_LSYM' for XCOFF.
 
    The value of the stab is the offset of the variable within the local
 variables.  On most machines this is an offset from the frame pointer
@@ -863,9 +848,9 @@ defined in; see *note Block Structure::.
      .stabn 192,0,0,LBB2             # 192 is N_LBRAC
      .stabn 224,0,0,LBE2             # 224 is N_RBRAC
 
-   See *note Procedures:: for more information on the `N_FUN' stab, and
-*note Block Structure:: for more information on the `N_LBRAC' and
-`N_RBRAC' stabs.
+   See *note Procedures:: for more information on the 'N_FUN' stab, and
+*note Block Structure:: for more information on the 'N_LBRAC' and
+'N_RBRAC' stabs.
 
 
 File: stabs.info,  Node: Global Variables,  Next: Register Variables,  Prev: Stack Variables,  Up: Variables
@@ -874,8 +859,8 @@ File: stabs.info,  Node: Global Variable
 ====================
 
 A variable whose scope is not specific to just one source file is
-represented by the `G' symbol descriptor.  These stabs use the `N_GSYM'
-stab type (C_GSYM for XCOFF).  The type information for the stab (*note
+represented by the 'G' symbol descriptor.  These stabs use the 'N_GSYM'
+stab type (C_GSYM for XCOFF). The type information for the stab (*note
 String Field::) gives the type of the variable.
 
    For example, the following source code:
@@ -890,15 +875,15 @@ yields the following assembly code:
      _g_foo:
           .byte 99
 
-   The address of the variable represented by the `N_GSYM' is not
-contained in the `N_GSYM' stab.  The debugger gets this information
-from the external symbol for the global variable.  In the example above,
-the `.global _g_foo' and `_g_foo:' lines tell the assembler to produce
-an external symbol.
+   The address of the variable represented by the 'N_GSYM' is not
+contained in the 'N_GSYM' stab.  The debugger gets this information from
+the external symbol for the global variable.  In the example above, the
+'.global _g_foo' and '_g_foo:' lines tell the assembler to produce an
+external symbol.
 
-   Some compilers, like GCC, output `N_GSYM' stabs only once, where the
+   Some compilers, like GCC, output 'N_GSYM' stabs only once, where the
 variable is defined.  Other compilers, like SunOS4 /bin/cc, output a
-`N_GSYM' stab for each compilation unit which references the variable.
+'N_GSYM' stab for each compilation unit which references the variable.
 
 
 File: stabs.info,  Node: Register Variables,  Next: Common Blocks,  Prev: Global Variables,  Up: Variables
@@ -906,14 +891,14 @@ File: stabs.info,  Node: Register Variab
 4.3 Register Variables
 ======================
 
-Register variables have their own stab type, `N_RSYM' (`C_RSYM' for
-XCOFF), and their own symbol descriptor, `r'.  The stab's value is the
+Register variables have their own stab type, 'N_RSYM' ('C_RSYM' for
+XCOFF), and their own symbol descriptor, 'r'.  The stab's value is the
 number of the register where the variable data will be stored.
 
-   AIX defines a separate symbol descriptor `d' for floating point
+   AIX defines a separate symbol descriptor 'd' for floating point
 registers.  This seems unnecessary; why not just just give floating
 point registers different register numbers?  I have not verified whether
-the compiler actually uses `d'.
+the compiler actually uses 'd'.
 
    If the register is explicitly allocated to a global variable, but not
 initialized, as in:
@@ -933,21 +918,21 @@ A common block is a statically allocated
 referred to by several source files.  It may contain several variables.
 I believe Fortran is the only language with this feature.
 
-   A `N_BCOMM' stab begins a common block and an `N_ECOMM' stab ends
-it.  The only field that is significant in these two stabs is the
-string, which names a normal (non-debugging) symbol that gives the
-address of the common block.  According to IBM documentation, only the
-`N_BCOMM' has the name of the common block (even though their compiler
-actually puts it both places).
+   A 'N_BCOMM' stab begins a common block and an 'N_ECOMM' stab ends it.
+The only field that is significant in these two stabs is the string,
+which names a normal (non-debugging) symbol that gives the address of
+the common block.  According to IBM documentation, only the 'N_BCOMM'
+has the name of the common block (even though their compiler actually
+puts it both places).
 
    The stabs for the members of the common block are between the
-`N_BCOMM' and the `N_ECOMM'; the value of each stab is the offset
-within the common block of that variable.  IBM uses the `C_ECOML' stab
-type, and there is a corresponding `N_ECOML' stab type, but Sun's
-Fortran compiler uses `N_GSYM' instead.  The variables within a common
-block use the `V' symbol descriptor (I believe this is true of all
-Fortran variables).  Other stabs (at least type declarations using
-`C_DECL') can also be between the `N_BCOMM' and the `N_ECOMM'.
+'N_BCOMM' and the 'N_ECOMM'; the value of each stab is the offset within
+the common block of that variable.  IBM uses the 'C_ECOML' stab type,
+and there is a corresponding 'N_ECOML' stab type, but Sun's Fortran
+compiler uses 'N_GSYM' instead.  The variables within a common block use
+the 'V' symbol descriptor (I believe this is true of all Fortran
+variables).  Other stabs (at least type declarations using 'C_DECL') can
+also be between the 'N_BCOMM' and the 'N_ECOMM'.
 
 
 File: stabs.info,  Node: Statics,  Next: Based Variables,  Prev: Common Blocks,  Up: Variables
@@ -955,16 +940,16 @@ File: stabs.info,  Node: Statics,  Next:
 4.5 Static Variables
 ====================
 
-Initialized static variables are represented by the `S' and `V' symbol
-descriptors.  `S' means file scope static, and `V' means procedure
-scope static.  One exception: in XCOFF, IBM's xlc compiler always uses
-`V', and whether it is file scope or not is distinguished by whether
-the stab is located within a function.
+Initialized static variables are represented by the 'S' and 'V' symbol
+descriptors.  'S' means file scope static, and 'V' means procedure scope
+static.  One exception: in XCOFF, IBM's xlc compiler always uses 'V',
+and whether it is file scope or not is distinguished by whether the stab
+is located within a function.
 
-   In a.out files, `N_STSYM' means the data section, `N_FUN' means the
-text section, and `N_LCSYM' means the bss section.  For those systems
+   In a.out files, 'N_STSYM' means the data section, 'N_FUN' means the
+text section, and 'N_LCSYM' means the bss section.  For those systems
 with a read-only data section separate from the text section (Solaris),
-`N_ROSYM' means the read-only data section.
+'N_ROSYM' means the read-only data section.
 
    For example, the source lines:
 
@@ -981,27 +966,27 @@ yield the following stabs:
      .stabs "var_noinit:S1",40,0,0,_var_noinit    # 40 is N_LCSYM
 
    In XCOFF files, the stab type need not indicate the section;
-`C_STSYM' can be used for all statics.  Also, each static variable is
-enclosed in a static block.  A `C_BSTAT' (emitted with a `.bs'
-assembler directive) symbol begins the static block; its value is the
-symbol number of the csect symbol whose value is the address of the
-static block, its section is the section of the variables in that
-static block, and its name is `.bs'.  A `C_ESTAT' (emitted with a `.es'
-assembler directive) symbol ends the static block; its name is `.es'
-and its value and section are ignored.
+'C_STSYM' can be used for all statics.  Also, each static variable is
+enclosed in a static block.  A 'C_BSTAT' (emitted with a '.bs' assembler
+directive) symbol begins the static block; its value is the symbol
+number of the csect symbol whose value is the address of the static
+block, its section is the section of the variables in that static block,
+and its name is '.bs'.  A 'C_ESTAT' (emitted with a '.es' assembler
+directive) symbol ends the static block; its name is '.es' and its value
+and section are ignored.
 
    In ECOFF files, the storage class is used to specify the section, so
 the stab type need not indicate the section.
 
    In ELF files, for the SunPRO compiler version 2.0.1, symbol
-descriptor `S' means that the address is absolute (the linker relocates
-it) and symbol descriptor `V' means that the address is relative to the
+descriptor 'S' means that the address is absolute (the linker relocates
+it) and symbol descriptor 'V' means that the address is relative to the
 start of the relevant section for that compilation unit.  SunPRO has
 plans to have the linker stop relocating stabs; I suspect that their the
 debugger gets the address from the corresponding ELF (not stab) symbol.
 I'm not sure how to find which symbol of that name is the right one.
 The clean way to do all this would be to have the value of a symbol
-descriptor `S' symbol be an offset relative to the start of the file,
+descriptor 'S' symbol be an offset relative to the start of the file,
 just like everything else, but that introduces obvious compatibility
 problems.  For more information on linker stab relocation, *Note ELF
 Linker Relocation::.
@@ -1013,9 +998,9 @@ File: stabs.info,  Node: Based Variables
 ===========================
 
 Fortran (at least, the Sun and SGI dialects of FORTRAN-77) has a feature
-which allows allocating arrays with `malloc', but which avoids blurring
-the line between arrays and pointers the way that C does.  In stabs
-such a variable uses the `b' symbol descriptor.
+which allows allocating arrays with 'malloc', but which avoids blurring
+the line between arrays and pointers the way that C does.  In stabs such
+a variable uses the 'b' symbol descriptor.
 
    For example, the Fortran declarations
 
@@ -1030,16 +1015,16 @@ such a variable uses the `b' symbol desc
      foo10:bar3;1;10;6
      foo10_5:bar3;1;5;ar3;1;10;6
 
-   In this example, `real' is type 6 and type 3 is an integral type
-which is the type of the subscripts of the array (probably `integer').
+   In this example, 'real' is type 6 and type 3 is an integral type
+which is the type of the subscripts of the array (probably 'integer').
 
-   The `b' symbol descriptor is like `V' in that it denotes a
-statically allocated symbol whose scope is local to a function; see
-*Note Statics::.  The value of the symbol, instead of being the address
-of the variable itself, is the address of a pointer to that variable.
-So in the above example, the value of the `foo' stab is the address of
-a pointer to a real, the value of the `foo10' stab is the address of a
-pointer to a 10-element array of reals, and the value of the `foo10_5'
+   The 'b' symbol descriptor is like 'V' in that it denotes a statically
+allocated symbol whose scope is local to a function; see *Note
+Statics::.  The value of the symbol, instead of being the address of the
+variable itself, is the address of a pointer to that variable.  So in
+the above example, the value of the 'foo' stab is the address of a
+pointer to a real, the value of the 'foo10' stab is the address of a
+pointer to a 10-element array of reals, and the value of the 'foo10_5'
 stab is the address of a pointer to a 5-element array of 10-element
 arrays of reals.
 
@@ -1055,11 +1040,11 @@ the debugger should print the parameters
 parameters are declared in the source file).  The exact form of the stab
 depends on how the parameter is being passed.
 
-   Parameters passed on the stack use the symbol descriptor `p' and the
-`N_PSYM' symbol type (or `C_PSYM' for XCOFF).  The value of the symbol
-is an offset used to locate the parameter on the stack; its exact
-meaning is machine-dependent, but on most machines it is an offset from
-the frame pointer.
+   Parameters passed on the stack use the symbol descriptor 'p' and the
+'N_PSYM' symbol type (or 'C_PSYM' for XCOFF). The value of the symbol is
+an offset used to locate the parameter on the stack; its exact meaning
+is machine-dependent, but on most machines it is an offset from the
+frame pointer.
 
    As a simple example, the code:
 
@@ -1073,11 +1058,11 @@ the frame pointer.
      .stabs "argc:p1",160,0,0,68                   # 160 is N_PSYM
      .stabs "argv:p20=*21=*2",160,0,0,72
 
-   The type definition of `argv' is interesting because it contains
+   The type definition of 'argv' is interesting because it contains
 several type definitions.  Type 21 is pointer to type 2 (char) and
-`argv' (type 20) is pointer to type 21.
+'argv' (type 20) is pointer to type 21.
 
-   The following symbol descriptors are also said to go with `N_PSYM'.
+   The following symbol descriptors are also said to go with 'N_PSYM'.
 The value of the symbol is said to be an offset from the argument
 pointer (I'm not sure whether this is true or not).
 
@@ -1108,35 +1093,35 @@ two symbols for each argument:
 know that it is an argument.
 
    Because that approach is kind of ugly, some compilers use symbol
-descriptor `P' or `R' to indicate an argument which is in a register.
-Symbol type `C_RPSYM' is used in XCOFF and `N_RSYM' is used otherwise.
-The symbol's value is the register number.  `P' and `R' mean the same
-thing; the difference is that `P' is a GNU invention and `R' is an IBM
+descriptor 'P' or 'R' to indicate an argument which is in a register.
+Symbol type 'C_RPSYM' is used in XCOFF and 'N_RSYM' is used otherwise.
+The symbol's value is the register number.  'P' and 'R' mean the same
+thing; the difference is that 'P' is a GNU invention and 'R' is an IBM
 (XCOFF) invention.  As of version 4.9, GDB should handle either one.
 
-   There is at least one case where GCC uses a `p' and `r' pair rather
-than `P'; this is where the argument is passed in the argument list and
+   There is at least one case where GCC uses a 'p' and 'r' pair rather
+than 'P'; this is where the argument is passed in the argument list and
 then loaded into a register.
 
-   According to the AIX documentation, symbol descriptor `D' is for a
+   According to the AIX documentation, symbol descriptor 'D' is for a
 parameter passed in a floating point register.  This seems
-unnecessary--why not just use `R' with a register number which
-indicates that it's a floating point register?  I haven't verified
-whether the system actually does what the documentation indicates.
+unnecessary--why not just use 'R' with a register number which indicates
+that it's a floating point register?  I haven't verified whether the
+system actually does what the documentation indicates.
 
-   On the sparc and hppa, for a `P' symbol whose type is a structure or
+   On the sparc and hppa, for a 'P' symbol whose type is a structure or
 union, the register contains the address of the structure.  On the
-sparc, this is also true of a `p' and `r' pair (using Sun `cc') or a
-`p' symbol.  However, if a (small) structure is really in a register,
-`r' is used.  And, to top it all off, on the hppa it might be a
-structure which was passed on the stack and loaded into a register and
-for which there is a `p' and `r' pair!  I believe that symbol
-descriptor `i' is supposed to deal with this case (it is said to mean
-"value parameter by reference, indirect access"; I don't know the
-source for this information), but I don't know details or what
-compilers or debuggers use it, if any (not GDB or GCC).  It is not
-clear to me whether this case needs to be dealt with differently than
-parameters passed by reference (*note Reference Parameters::).
+sparc, this is also true of a 'p' and 'r' pair (using Sun 'cc') or a 'p'
+symbol.  However, if a (small) structure is really in a register, 'r' is
+used.  And, to top it all off, on the hppa it might be a structure which
+was passed on the stack and loaded into a register and for which there
+is a 'p' and 'r' pair!  I believe that symbol descriptor 'i' is supposed
+to deal with this case (it is said to mean "value parameter by
+reference, indirect access"; I don't know the source for this
+information), but I don't know details or what compilers or debuggers
+use it, if any (not GDB or GCC). It is not clear to me whether this case
+needs to be dealt with differently than parameters passed by reference
+(*note Reference Parameters::).
 
 
 File: stabs.info,  Node: Local Variable Parameters,  Next: Reference Parameters,  Prev: Register Parameters,  Up: Parameters
@@ -1151,10 +1136,10 @@ stores it as a local variable.  If possi
 that it's in a register, but this isn't always done.
 
    If a parameter is passed as one type and converted to a smaller type
-by the prologue (for example, the parameter is declared as a `float',
-but the calling conventions specify that it is passed as a `double'),
+by the prologue (for example, the parameter is declared as a 'float',
+but the calling conventions specify that it is passed as a 'double'),
 then GCC2 (sometimes) uses a pair of symbols.  The first symbol uses
-symbol descriptor `p' and the type which is passed.  The second symbol
+symbol descriptor 'p' and the type which is passed.  The second symbol
 has the type and location which the parameter actually has after the
 prologue.  For example, suppose the following C code appears with no
 prototypes involved:
@@ -1164,18 +1149,18 @@ prototypes involved:
           float f;
      {
 
-   if `f' is passed as a double at stack offset 8, and the prologue
+   if 'f' is passed as a double at stack offset 8, and the prologue
 converts it to a float in register number 0, then the stabs look like:
 
-     .stabs "f:p13",160,0,3,8   # 160 is `N_PSYM', here 13 is `double'
-     .stabs "f:r12",64,0,3,0    # 64 is `N_RSYM', here 12 is `float'
+     .stabs "f:p13",160,0,3,8   # 160 is 'N_PSYM', here 13 is 'double'
+     .stabs "f:r12",64,0,3,0    # 64 is 'N_RSYM', here 12 is 'float'
 
-   In both stabs 3 is the line number where `f' is declared (*note Line
+   In both stabs 3 is the line number where 'f' is declared (*note Line
 Numbers::).
 
    GCC, at least on the 960, has another solution to the same problem.
-It uses a single `p' symbol descriptor for an argument which is stored
-as a local variable but uses `N_LSYM' instead of `N_PSYM'.  In this
+It uses a single 'p' symbol descriptor for an argument which is stored
+as a local variable but uses 'N_LSYM' instead of 'N_PSYM'.  In this
 case, the value of the symbol is an offset relative to the local
 variables for that function, not relative to the arguments; on some
 machines those are the same thing, but not on all.
@@ -1190,15 +1175,15 @@ which it has printed because each one ha
      ...
      fprintf (stdout, "%d\n", x);
 
-   there are stabs for `stream' and `format'.  On most machines, the
+   there are stabs for 'stream' and 'format'.  On most machines, the
 debugger can only print those two arguments (because it has no way of
 knowing that additional arguments were passed), but on the VAX or other
 machines with a calling convention which indicates the number of words
-of arguments, the debugger can print all three arguments.  To do so,
-the parameter symbol (symbol descriptor `p') (not necessarily `r' or
-symbol descriptor omitted symbols) needs to contain the actual type as
-passed (for example, `double' not `float' if it is passed as a double
-and converted to a float).
+of arguments, the debugger can print all three arguments.  To do so, the
+parameter symbol (symbol descriptor 'p') (not necessarily 'r' or symbol
+descriptor omitted symbols) needs to contain the actual type as passed
+(for example, 'double' not 'float' if it is passed as a double and
+converted to a float).
 
 
 File: stabs.info,  Node: Reference Parameters,  Next: Conformant Arrays,  Prev: Local Variable Parameters,  Up: Parameters
@@ -1206,13 +1191,12 @@ File: stabs.info,  Node: Reference Param
 4.7.3 Passing Parameters by Reference
 -------------------------------------
 
-If the parameter is passed by reference (e.g., Pascal `VAR'
-parameters), then the symbol descriptor is `v' if it is in the argument
-list, or `a' if it in a register.  Other than the fact that these
-contain the address of the parameter rather than the parameter itself,
-they are identical to `p' and `R', respectively.  I believe `a' is an
-AIX invention; `v' is supported by all stabs-using systems as far as I
-know.
+If the parameter is passed by reference (e.g., Pascal 'VAR' parameters),
+then the symbol descriptor is 'v' if it is in the argument list, or 'a'
+if it in a register.  Other than the fact that these contain the address
+of the parameter rather than the parameter itself, they are identical to
+'p' and 'R', respectively.  I believe 'a' is an AIX invention; 'v' is
+supported by all stabs-using systems as far as I know.
 
 
 File: stabs.info,  Node: Conformant Arrays,  Prev: Reference Parameters,  Up: Parameters
@@ -1222,12 +1206,12 @@ File: stabs.info,  Node: Conformant Arra
 
 Conformant arrays are a feature of Modula-2, and perhaps other
 languages, in which the size of an array parameter is not known to the
-called function until run-time.  Such parameters have two stabs: a `x'
-for the array itself, and a `C', which represents the size of the
-array.  The value of the `x' stab is the offset in the argument list
-where the address of the array is stored (it this right?  it is a
-guess); the value of the `C' stab is the offset in the argument list
-where the size of the array (in elements? in bytes?) is stored.
+called function until run-time.  Such parameters have two stabs: a 'x'
+for the array itself, and a 'C', which represents the size of the array.
+The value of the 'x' stab is the offset in the argument list where the
+address of the array is stored (it this right?  it is a guess); the
+value of the 'C' stab is the offset in the argument list where the size
+of the array (in elements?  in bytes?)  is stored.
 
 
 File: stabs.info,  Node: Types,  Next: Macro define and undefine,  Prev: Variables,  Up: Top
@@ -1238,7 +1222,7 @@ File: stabs.info,  Node: Types,  Next: M
 The examples so far have described types as references to previously
 defined types, or defined in terms of subranges of or pointers to
 previously defined types.  This chapter describes the other type
-descriptors that may follow the `=' in a type definition.
+descriptors that may follow the '=' in a type definition.
 
 * Menu:
 
@@ -1260,16 +1244,16 @@ File: stabs.info,  Node: Builtin Types, 
 5.1 Builtin Types
 =================
 
-Certain types are built in (`int', `short', `void', `float', etc.); the
+Certain types are built in ('int', 'short', 'void', 'float', etc.); the
 debugger recognizes these types and knows how to handle them.  Thus,
 don't be surprised if some of the following ways of specifying builtin
-types do not specify everything that a debugger would need to know
-about the type--in some cases they merely specify enough information to
+types do not specify everything that a debugger would need to know about
+the type--in some cases they merely specify enough information to
 distinguish the type from other types.
 
    The traditional way to define builtin types is convoluted, so new
-ways have been invented to describe them.  Sun's `acc' uses special
-builtin type descriptors (`b' and `R'), and IBM uses negative type
+ways have been invented to describe them.  Sun's 'acc' uses special
+builtin type descriptors ('b' and 'R'), and IBM uses negative type
 numbers.  GDB accepts all three ways, as of version 4.8; dbx just
 accepts the traditional builtin types and perhaps one of the other two
 formats.  The following sections describe each of these formats.
@@ -1288,7 +1272,7 @@ File: stabs.info,  Node: Traditional Bui
 
 This is the traditional, convoluted method for defining builtin types.
 There are several classes of such type definitions: integer, floating
-point, and `void'.
+point, and 'void'.
 
 * Menu:
 
@@ -1302,19 +1286,19 @@ File: stabs.info,  Node: Traditional Int
 .................................
 
 Often types are defined as subranges of themselves.  If the bounding
-values fit within an `int', then they are given normally.  For example:
+values fit within an 'int', then they are given normally.  For example:
 
      .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0    # 128 is N_LSYM
      .stabs "char:t2=r2;0;127;",128,0,0,0
 
-   Builtin types can also be described as subranges of `int':
+   Builtin types can also be described as subranges of 'int':
 
      .stabs "unsigned short:t6=r1;0;65535;",128,0,0,0
 
    If the lower bound of a subrange is 0 and the upper bound is -1, the
 type is an unsigned integral type whose bounds are too big to describe
-in an `int'.  Traditionally this is only used for `unsigned int' and
-`unsigned long':
+in an 'int'.  Traditionally this is only used for 'unsigned int' and
+'unsigned long':
 
      .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
 
@@ -1335,12 +1319,12 @@ fields of the stabs for 64 bit integer t
    If the lower bound of a subrange is 0 and the upper bound is
 negative, the type is an unsigned integral type whose size in bytes is
 the absolute value of the upper bound.  I believe this is a Convex
-convention for `unsigned long long'.
+convention for 'unsigned long long'.
 
    If the lower bound of a subrange is negative and the upper bound is
 0, the type is a signed integral type whose size in bytes is the
 absolute value of the lower bound.  I believe this is a Convex
-convention for `long long'.  To distinguish this from a legitimate
+convention for 'long long'.  To distinguish this from a legitimate
 subrange, the type should be a subrange of itself.  I'm not sure whether
 this is the case for Convex.
 
@@ -1357,16 +1341,16 @@ indicates the number of bytes in the typ
      .stabs "float:t12=r1;4;0;",128,0,0,0
      .stabs "double:t13=r1;8;0;",128,0,0,0
 
-   However, GCC writes `long double' the same way it writes `double',
-so there is no way to distinguish.
+   However, GCC writes 'long double' the same way it writes 'double', so
+there is no way to distinguish.
 
      .stabs "long double:t14=r1;8;0;",128,0,0,0
 
-   Complex types are defined the same way as floating-point types;
-there is no way to distinguish a single-precision complex from a
+   Complex types are defined the same way as floating-point types; there
+is no way to distinguish a single-precision complex from a
 double-precision floating-point type.
 
-   The C `void' type is defined as itself:
+   The C 'void' type is defined as itself:
 
      .stabs "void:t15=15",128,0,0,0
 
@@ -1378,75 +1362,72 @@ File: stabs.info,  Node: Builtin Type De
 5.1.2 Defining Builtin Types Using Builtin Type Descriptors
 -----------------------------------------------------------
 
-This is the method used by Sun's `acc' for defining builtin types.
+This is the method used by Sun's 'acc' for defining builtin types.
 These are the type descriptors to define builtin types:
 
-`b SIGNED CHAR-FLAG WIDTH ; OFFSET ; NBITS ;'
-     Define an integral type.  SIGNED is `u' for unsigned or `s' for
-     signed.  CHAR-FLAG is `c' which indicates this is a character
-     type, or is omitted.  I assume this is to distinguish an integral
-     type from a character type of the same size, for example it might
-     make sense to set it for the C type `wchar_t' so the debugger can
-     print such variables differently (Solaris does not do this).  Sun
-     sets it on the C types `signed char' and `unsigned char' which
-     arguably is wrong.  WIDTH and OFFSET appear to be for small
-     objects stored in larger ones, for example a `short' in an `int'
-     register.  WIDTH is normally the number of bytes in the type.
-     OFFSET seems to always be zero.  NBITS is the number of bits in
-     the type.
+'b SIGNED CHAR-FLAG WIDTH ; OFFSET ; NBITS ;'
+     Define an integral type.  SIGNED is 'u' for unsigned or 's' for
+     signed.  CHAR-FLAG is 'c' which indicates this is a character type,
+     or is omitted.  I assume this is to distinguish an integral type
+     from a character type of the same size, for example it might make
+     sense to set it for the C type 'wchar_t' so the debugger can print
+     such variables differently (Solaris does not do this).  Sun sets it
+     on the C types 'signed char' and 'unsigned char' which arguably is
+     wrong.  WIDTH and OFFSET appear to be for small objects stored in
+     larger ones, for example a 'short' in an 'int' register.  WIDTH is
+     normally the number of bytes in the type.  OFFSET seems to always
+     be zero.  NBITS is the number of bits in the type.
 
-     Note that type descriptor `b' used for builtin types conflicts with
+     Note that type descriptor 'b' used for builtin types conflicts with
      its use for Pascal space types (*note Miscellaneous Types::); they
      can be distinguished because the character following the type
-     descriptor will be a digit, `(', or `-' for a Pascal space type, or
-     `u' or `s' for a builtin type.
+     descriptor will be a digit, '(', or '-' for a Pascal space type, or
+     'u' or 's' for a builtin type.
 
-`w'
+'w'
      Documented by AIX to define a wide character type, but their
      compiler actually uses negative type numbers (*note Negative Type
      Numbers::).
 
-`R FP-TYPE ; BYTES ;'
+'R FP-TYPE ; BYTES ;'
      Define a floating point type.  FP-TYPE has one of the following
      values:
 
-    `1 (NF_SINGLE)'
+     '1 (NF_SINGLE)'
           IEEE 32-bit (single precision) floating point format.
 
-    `2 (NF_DOUBLE)'
+     '2 (NF_DOUBLE)'
           IEEE 64-bit (double precision) floating point format.
 
-    `3 (NF_COMPLEX)'
-
-    `4 (NF_COMPLEX16)'
-
-    `5 (NF_COMPLEX32)'
+     '3 (NF_COMPLEX)'
+     '4 (NF_COMPLEX16)'
+     '5 (NF_COMPLEX32)'
           These are for complex numbers.  A comment in the GDB source
-          describes them as Fortran `complex', `double complex', and
-          `complex*16', respectively, but what does that mean?  (i.e.,
+          describes them as Fortran 'complex', 'double complex', and
+          'complex*16', respectively, but what does that mean?  (i.e.,
           Single precision?  Double precision?).
 
-    `6 (NF_LDOUBLE)'
+     '6 (NF_LDOUBLE)'
           Long double.  This should probably only be used for Sun format
-          `long double', and new codes should be used for other floating
-          point formats (`NF_DOUBLE' can be used if a `long double' is
+          'long double', and new codes should be used for other floating
+          point formats ('NF_DOUBLE' can be used if a 'long double' is
           really just an IEEE double, of course).
 
      BYTES is the number of bytes occupied by the type.  This allows a
      debugger to perform some operations with the type even if it
      doesn't understand FP-TYPE.
 
-`g TYPE-INFORMATION ; NBITS'
+'g TYPE-INFORMATION ; NBITS'
      Documented by AIX to define a floating type, but their compiler
      actually uses negative type numbers (*note Negative Type
      Numbers::).
 
-`c TYPE-INFORMATION ; NBITS'
+'c TYPE-INFORMATION ; NBITS'
      Documented by AIX to define a complex type, but their compiler
      actually uses negative type numbers (*note Negative Type
      Numbers::).
 
-   The C `void' type is defined as a signed integral type 0 bits long:
+   The C 'void' type is defined as a signed integral type 0 bits long:
      .stabs "void:t19=bs0;0;0",128,0,0,0
    The Solaris compiler seems to omit the trailing semicolon in this
 case.  Getting sloppy in this way is not a swift move because if a type
@@ -1462,24 +1443,24 @@ File: stabs.info,  Node: Negative Type N
 ---------------------------
 
 This is the method used in XCOFF for defining builtin types.  Since the
-debugger knows about the builtin types anyway, the idea of negative
-type numbers is simply to give a special type number which indicates
-the builtin type.  There is no stab defining these types.
+debugger knows about the builtin types anyway, the idea of negative type
+numbers is simply to give a special type number which indicates the
+builtin type.  There is no stab defining these types.
 
    There are several subtle issues with negative type numbers.
 
    One is the size of the type.  A builtin type (for example the C types
-`int' or `long') might have different sizes depending on compiler
-options, the target architecture, the ABI, etc.  This issue doesn't
-come up for IBM tools since (so far) they just target the RS/6000; the
-sizes indicated below for each size are what the IBM RS/6000 tools use.
-To deal with differing sizes, either define separate negative type
-numbers for each size (which works but requires changing the debugger,
-and, unless you get both AIX dbx and GDB to accept the change,
-introduces an incompatibility), or use a type attribute (*note String
-Field::) to define a new type with the appropriate size (which merely
-requires a debugger which understands type attributes, like AIX dbx or
-GDB).  For example,
+'int' or 'long') might have different sizes depending on compiler
+options, the target architecture, the ABI, etc.  This issue doesn't come
+up for IBM tools since (so far) they just target the RS/6000; the sizes
+indicated below for each size are what the IBM RS/6000 tools use.  To
+deal with differing sizes, either define separate negative type numbers
+for each size (which works but requires changing the debugger, and,
+unless you get both AIX dbx and GDB to accept the change, introduces an
+incompatibility), or use a type attribute (*note String Field::) to
+define a new type with the appropriate size (which merely requires a
+debugger which understands type attributes, like AIX dbx or GDB). For
+example,
 
      .stabs "boolean:t10=@s8;-16",128,0,0,0
 
@@ -1503,13 +1484,13 @@ bit, whether it is zero, etc., and diffe
 options to the same compiler) might provide different kinds of boolean.
 
    The last major issue is the names of the types.  The name of a given
-type depends _only_ on the negative type number given; these do not
-vary depending on the language, the target system, or anything else.
-One can always define separate type numbers--in the following list you
-will see for example separate `int' and `integer*4' types which are
-identical except for the name.  But compatibility can be maintained by
-not inventing new negative type numbers and instead just defining a new
-type with a new name.  For example:
+type depends _only_ on the negative type number given; these do not vary
+depending on the language, the target system, or anything else.  One can
+always define separate type numbers--in the following list you will see
+for example separate 'int' and 'integer*4' types which are identical
+except for the name.  But compatibility can be maintained by not
+inventing new negative type numbers and instead just defining a new type
+with a new name.  For example:
 
      .stabs "CARDINAL:t10=-8",128,0,0,0
 
@@ -1518,130 +1499,130 @@ type" is used to mean twos-complement (I
 machines which use stabs use twos-complement; most machines use
 twos-complement these days).
 
-`-1'
-     `int', 32 bit signed integral type.
+'-1'
+     'int', 32 bit signed integral type.
 
-`-2'
-     `char', 8 bit type holding a character.   Both GDB and dbx on AIX
-     treat this as signed.  GCC uses this type whether `char' is signed
-     or not, which seems like a bad idea.  The AIX compiler (`xlc')
-     seems to avoid this type; it uses -5 instead for `char'.
+'-2'
+     'char', 8 bit type holding a character.  Both GDB and dbx on AIX
+     treat this as signed.  GCC uses this type whether 'char' is signed
+     or not, which seems like a bad idea.  The AIX compiler ('xlc')
+     seems to avoid this type; it uses -5 instead for 'char'.
 
-`-3'
-     `short', 16 bit signed integral type.
+'-3'
+     'short', 16 bit signed integral type.
 
-`-4'
-     `long', 32 bit signed integral type.
+'-4'
+     'long', 32 bit signed integral type.
 
-`-5'
-     `unsigned char', 8 bit unsigned integral type.
+'-5'
+     'unsigned char', 8 bit unsigned integral type.
 
-`-6'
-     `signed char', 8 bit signed integral type.
+'-6'
+     'signed char', 8 bit signed integral type.
 
-`-7'
-     `unsigned short', 16 bit unsigned integral type.
+'-7'
+     'unsigned short', 16 bit unsigned integral type.
 
-`-8'
-     `unsigned int', 32 bit unsigned integral type.
+'-8'
+     'unsigned int', 32 bit unsigned integral type.
 
-`-9'
-     `unsigned', 32 bit unsigned integral type.
+'-9'
+     'unsigned', 32 bit unsigned integral type.
 
-`-10'
-     `unsigned long', 32 bit unsigned integral type.
+'-10'
+     'unsigned long', 32 bit unsigned integral type.
 
-`-11'
-     `void', type indicating the lack of a value.
+'-11'
+     'void', type indicating the lack of a value.
 
-`-12'
-     `float', IEEE single precision.
+'-12'
+     'float', IEEE single precision.
 
-`-13'
-     `double', IEEE double precision.
+'-13'
+     'double', IEEE double precision.
 
-`-14'
-     `long double', IEEE double precision.  The compiler claims the size
-     will increase in a future release, and for binary compatibility
-     you have to avoid using `long double'.  I hope when they increase
-     it they use a new negative type number.
+'-14'
+     'long double', IEEE double precision.  The compiler claims the size
+     will increase in a future release, and for binary compatibility you
+     have to avoid using 'long double'.  I hope when they increase it
+     they use a new negative type number.
 
-`-15'
-     `integer'.  32 bit signed integral type.
+'-15'
+     'integer'.  32 bit signed integral type.
 
-`-16'
-     `boolean'.  32 bit type.  GDB and GCC assume that zero is false,
+'-16'
+     'boolean'.  32 bit type.  GDB and GCC assume that zero is false,
      one is true, and other values have unspecified meaning.  I hope
      this agrees with how the IBM tools use the type.
 
-`-17'
-     `short real'.  IEEE single precision.
+'-17'
+     'short real'.  IEEE single precision.
 
-`-18'
-     `real'.  IEEE double precision.
+'-18'
+     'real'.  IEEE double precision.
 
-`-19'
-     `stringptr'.  *Note Strings::.
+'-19'
+     'stringptr'.  *Note Strings::.
 
-`-20'
-     `character', 8 bit unsigned character type.
+'-20'
+     'character', 8 bit unsigned character type.
 
-`-21'
-     `logical*1', 8 bit type.  This Fortran type has a split
-     personality in that it is used for boolean variables, but can also
-     be used for unsigned integers.  0 is false, 1 is true, and other
-     values are non-boolean.
+'-21'
+     'logical*1', 8 bit type.  This Fortran type has a split personality
+     in that it is used for boolean variables, but can also be used for
+     unsigned integers.  0 is false, 1 is true, and other values are
+     non-boolean.
 
-`-22'
-     `logical*2', 16 bit type.  This Fortran type has a split
+'-22'
+     'logical*2', 16 bit type.  This Fortran type has a split
      personality in that it is used for boolean variables, but can also
      be used for unsigned integers.  0 is false, 1 is true, and other
      values are non-boolean.
 
-`-23'
-     `logical*4', 32 bit type.  This Fortran type has a split
+'-23'
+     'logical*4', 32 bit type.  This Fortran type has a split
      personality in that it is used for boolean variables, but can also
      be used for unsigned integers.  0 is false, 1 is true, and other
      values are non-boolean.
 
-`-24'
-     `logical', 32 bit type.  This Fortran type has a split personality
+'-24'
+     'logical', 32 bit type.  This Fortran type has a split personality
      in that it is used for boolean variables, but can also be used for
      unsigned integers.  0 is false, 1 is true, and other values are
      non-boolean.
 
-`-25'
-     `complex'.  A complex type consisting of two IEEE single-precision
+'-25'
+     'complex'.  A complex type consisting of two IEEE single-precision
      floating point values.
 
-`-26'
-     `complex'.  A complex type consisting of two IEEE double-precision
+'-26'
+     'complex'.  A complex type consisting of two IEEE double-precision
      floating point values.
 
-`-27'
-     `integer*1', 8 bit signed integral type.
+'-27'
+     'integer*1', 8 bit signed integral type.
 
-`-28'
-     `integer*2', 16 bit signed integral type.
+'-28'
+     'integer*2', 16 bit signed integral type.
 
-`-29'
-     `integer*4', 32 bit signed integral type.
+'-29'
+     'integer*4', 32 bit signed integral type.
 
-`-30'
-     `wchar'.  Wide character, 16 bits wide, unsigned (what format?
+'-30'
+     'wchar'.  Wide character, 16 bits wide, unsigned (what format?
      Unicode?).
 
-`-31'
-     `long long', 64 bit signed integral type.
+'-31'
+     'long long', 64 bit signed integral type.
 
-`-32'
-     `unsigned long long', 64 bit unsigned integral type.
+'-32'
+     'unsigned long long', 64 bit unsigned integral type.
 
-`-33'
-     `logical*8', 64 bit unsigned integral type.
+'-33'
+     'logical*8', 64 bit unsigned integral type.
 
-`-34'
-     `integer*8', 64 bit signed integral type.
+'-34'
+     'integer*8', 64 bit signed integral type.
 
 
 File: stabs.info,  Node: Miscellaneous Types,  Next: Cross-References,  Prev: Builtin Types,  Up: Types
@@ -1649,47 +1630,47 @@ File: stabs.info,  Node: Miscellaneous T
 5.2 Miscellaneous Types
 =======================
 
-`b TYPE-INFORMATION ; BYTES'
+'b TYPE-INFORMATION ; BYTES'
      Pascal space type.  This is documented by IBM; what does it mean?
 
-     This use of the `b' type descriptor can be distinguished from its
+     This use of the 'b' type descriptor can be distinguished from its
      use for builtin integral types (*note Builtin Type Descriptors::)
      because the character following the type descriptor is always a
-     digit, `(', or `-'.
+     digit, '(', or '-'.
 
-`B TYPE-INFORMATION'
+'B TYPE-INFORMATION'
      A volatile-qualified version of TYPE-INFORMATION.  This is a Sun
      extension.  References and stores to a variable with a
      volatile-qualified type must not be optimized or cached; they must
      occur as the user specifies them.
 
-`d TYPE-INFORMATION'
+'d TYPE-INFORMATION'
      File of type TYPE-INFORMATION.  As far as I know this is only used
      by Pascal.
 
-`k TYPE-INFORMATION'
+'k TYPE-INFORMATION'
      A const-qualified version of TYPE-INFORMATION.  This is a Sun
      extension.  A variable with a const-qualified type cannot be
      modified.
 
-`M TYPE-INFORMATION ; LENGTH'
+'M TYPE-INFORMATION ; LENGTH'
      Multiple instance type.  The type seems to composed of LENGTH
-     repetitions of TYPE-INFORMATION, for example `character*3' is
-     represented by `M-2;3', where `-2' is a reference to a character
+     repetitions of TYPE-INFORMATION, for example 'character*3' is
+     represented by 'M-2;3', where '-2' is a reference to a character
      type (*note Negative Type Numbers::).  I'm not sure how this
      differs from an array.  This appears to be a Fortran feature.
      LENGTH is a bound, like those in range types; see *note
      Subranges::.
 
-`S TYPE-INFORMATION'
+'S TYPE-INFORMATION'
      Pascal set type.  TYPE-INFORMATION must be a small type such as an
      enumeration or a subrange, and the type is a bitmask whose length
      is specified by the number of elements in TYPE-INFORMATION.
 
-     In CHILL, if it is a bitstring instead of a set, also use the `S'
+     In CHILL, if it is a bitstring instead of a set, also use the 'S'
      type attribute (*note String Field::).
 
-`* TYPE-INFORMATION'
+'* TYPE-INFORMATION'
      Pointer to TYPE-INFORMATION.
 
 
@@ -1702,12 +1683,12 @@ A type can be used before it is defined;
 that situation is just to use a type reference to a type which has not
 yet been defined.
 
-   Another way is with the `x' type descriptor, which is followed by
-`s' for a structure tag, `u' for a union tag, or `e' for a enumerator
-tag, followed by the name of the tag, followed by `:'.  If the name
-contains `::' between a `<' and `>' pair (for C++ templates), such a
-`::' does not end the name--only a single `:' ends the name; see *note
-Nested Symbols::.
+   Another way is with the 'x' type descriptor, which is followed by 's'
+for a structure tag, 'u' for a union tag, or 'e' for a enumerator tag,
+followed by the name of the tag, followed by ':'.  If the name contains
+'::' between a '<' and '>' pair (for C++ templates), such a '::' does
+not end the name--only a single ':' ends the name; see *note Nested
+Symbols::.
 
    For example, the following C declarations:
 
@@ -1718,20 +1699,20 @@ produce:
 
      .stabs "bar:G16=*17=xsfoo:",32,0,0,0
 
-   Not all debuggers support the `x' type descriptor, so on some
+   Not all debuggers support the 'x' type descriptor, so on some
 machines GCC does not use it.  I believe that for the above example it
 would just emit a reference to type 17 and never define it, but I
 haven't verified that.
 
-   Modula-2 imported types, at least on AIX, use the `i' type
+   Modula-2 imported types, at least on AIX, use the 'i' type
 descriptor, which is followed by the name of the module from which the
-type is imported, followed by `:', followed by the name of the type.
+type is imported, followed by ':', followed by the name of the type.
 There is then optionally a comma followed by type information for the
 type.  This differs from merely naming the type (*note Typedefs::) in
 that it identifies the module; I don't understand whether the name of
 the type given here is always just the same as the name we are giving
 it, or whether this type descriptor is used with a nameless stab (*note
-String Field::), or what.  The symbol ends with `;'.
+String Field::), or what.  The symbol ends with ';'.
 
 
 File: stabs.info,  Node: Subranges,  Next: Arrays,  Prev: Cross-References,  Up: Types
@@ -1739,33 +1720,33 @@ File: stabs.info,  Node: Subranges,  Nex
 5.4 Subrange Types
 ==================
 
-The `r' type descriptor defines a type as a subrange of another type.
+The 'r' type descriptor defines a type as a subrange of another type.
 It is followed by type information for the type of which it is a
-subrange, a semicolon, an integral lower bound, a semicolon, an
-integral upper bound, and a semicolon.  The AIX documentation does not
-specify the trailing semicolon, in an effort to specify array indexes
-more cleanly, but a subrange which is not an array index has always
-included a trailing semicolon (*note Arrays::).
+subrange, a semicolon, an integral lower bound, a semicolon, an integral
+upper bound, and a semicolon.  The AIX documentation does not specify
+the trailing semicolon, in an effort to specify array indexes more
+cleanly, but a subrange which is not an array index has always included
+a trailing semicolon (*note Arrays::).
 
    Instead of an integer, either bound can be one of the following:
 
-`A OFFSET'
-     The bound is passed by reference on the stack at offset OFFSET
-     from the argument list.  *Note Parameters::, for more information
-     on such offsets.
-
-`T OFFSET'
-     The bound is passed by value on the stack at offset OFFSET from
-     the argument list.
+'A OFFSET'
+     The bound is passed by reference on the stack at offset OFFSET from
+     the argument list.  *Note Parameters::, for more information on
+     such offsets.
+
+'T OFFSET'
+     The bound is passed by value on the stack at offset OFFSET from the
+     argument list.
 
-`a REGISTER-NUMBER'
+'a REGISTER-NUMBER'
      The bound is passed by reference in register number
      REGISTER-NUMBER.
 
-`t REGISTER-NUMBER'
+'t REGISTER-NUMBER'
      The bound is passed by value in register number REGISTER-NUMBER.
 
-`J'
+'J'
      There is no bound.
 
    Subranges are also used for builtin types; see *note Traditional
@@ -1777,34 +1758,34 @@ File: stabs.info,  Node: Arrays,  Next: 
 5.5 Array Types
 ===============
 
-Arrays use the `a' type descriptor.  Following the type descriptor is
+Arrays use the 'a' type descriptor.  Following the type descriptor is
 the type of the index and the type of the array elements.  If the index
-type is a range type, it ends in a semicolon; otherwise (for example,
-if it is a type reference), there does not appear to be any way to tell
+type is a range type, it ends in a semicolon; otherwise (for example, if
+it is a type reference), there does not appear to be any way to tell
 where the types are separated.  In an effort to clean up this mess, IBM
 documents the two types as being separated by a semicolon, and a range
-type as not ending in a semicolon (but this is not right for range
-types which are not array indexes, *note Subranges::).  I think
-probably the best solution is to specify that a semicolon ends a range
-type, and that the index type and element type of an array are
-separated by a semicolon, but that if the index type is a range type,
-the extra semicolon can be omitted.  GDB (at least through version 4.9)
-doesn't support any kind of index type other than a range anyway; I'm
-not sure about dbx.
+type as not ending in a semicolon (but this is not right for range types
+which are not array indexes, *note Subranges::).  I think probably the
+best solution is to specify that a semicolon ends a range type, and that
+the index type and element type of an array are separated by a
+semicolon, but that if the index type is a range type, the extra
+semicolon can be omitted.  GDB (at least through version 4.9) doesn't
+support any kind of index type other than a range anyway; I'm not sure
+about dbx.
 
    It is well established, and widely used, that the type of the index,
 unlike most types found in the stabs, is merely a type definition, not
 type information (*note String Field::) (that is, it need not start with
-`TYPE-NUMBER=' if it is defining a new type).  According to a comment
-in GDB, this is also true of the type of the array elements; it gives
-`ar1;1;10;ar1;1;10;4' as a legitimate way to express a two dimensional
+'TYPE-NUMBER=' if it is defining a new type).  According to a comment in
+GDB, this is also true of the type of the array elements; it gives
+'ar1;1;10;ar1;1;10;4' as a legitimate way to express a two dimensional
 array.  According to AIX documentation, the element type must be type
 information.  GDB accepts either.
 
    The type of the index is often a range type, expressed as the type
-descriptor `r' and some parameters.  It defines the size of the array.
-In the example below, the range `r1;0;2;' defines an index type which
-is a subrange of type 1 (integer), with a lower bound of 0 and an upper
+descriptor 'r' and some parameters.  It defines the size of the array.
+In the example below, the range 'r1;0;2;' defines an index type which is
+a subrange of type 1 (integer), with a lower bound of 0 and an upper
 bound of 2.  This defines the valid range of subscripts of a
 three-element C array.
 
@@ -1823,15 +1804,14 @@ produces the output:
           .byte 99
 
    If an array is "packed", the elements are spaced more closely than
-normal, saving memory at the expense of speed.  For example, an array
-of 3-byte objects might, if unpacked, have each element aligned on a
-4-byte boundary, but if packed, have no padding.  One way to specify
-that something is packed is with type attributes (*note String
-Field::).  In the case of arrays, another is to use the `P' type
-descriptor instead of `a'.  Other than specifying a packed array, `P'
-is identical to `a'.
+normal, saving memory at the expense of speed.  For example, an array of
+3-byte objects might, if unpacked, have each element aligned on a 4-byte
+boundary, but if packed, have no padding.  One way to specify that
+something is packed is with type attributes (*note String Field::).  In
+the case of arrays, another is to use the 'P' type descriptor instead of
+'a'.  Other than specifying a packed array, 'P' is identical to 'a'.
 
-   An open array is represented by the `A' type descriptor followed by
+   An open array is represented by the 'A' type descriptor followed by
 type information specifying the type of the array elements.
 
    An N-dimensional dynamic array is represented by
@@ -1859,22 +1839,22 @@ they just have related things like array
 Pascals and various other languages have string types, which are
 indicated as follows:
 
-`n TYPE-INFORMATION ; BYTES'
+'n TYPE-INFORMATION ; BYTES'
      BYTES is the maximum length.  I'm not sure what TYPE-INFORMATION
      is; I suspect that it means that this is a string of
      TYPE-INFORMATION (thus allowing a string of integers, a string of
      wide characters, etc., as well as a string of characters).  Not
      sure what the format of this type is.  This is an AIX feature.
 
-`z TYPE-INFORMATION ; BYTES'
-     Just like `n' except that this is a gstring, not an ordinary
+'z TYPE-INFORMATION ; BYTES'
+     Just like 'n' except that this is a gstring, not an ordinary
      string.  I don't know the difference.
 
-`N'
+'N'
      Pascal Stringptr.  What is this?  This is an AIX feature.
 
    Languages, such as CHILL which have a string type which is basically
-just an array of characters use the `S' type attribute (*note String
+just an array of characters use the 'S' type attribute (*note String
 Field::).
 
 
@@ -1883,11 +1863,11 @@ File: stabs.info,  Node: Enumerations,  
 5.7 Enumerations
 ================
 
-Enumerations are defined with the `e' type descriptor.
+Enumerations are defined with the 'e' type descriptor.
 
    The source line below declares an enumeration type at file scope.
-The type definition is located after the `N_RBRAC' that marks the end of
-the previous procedure's block scope, and before the `N_FUN' that marks
+The type definition is located after the 'N_RBRAC' that marks the end of
+the previous procedure's block scope, and before the 'N_FUN' that marks
 the beginning of the next procedure's block scope.  Therefore it does
 not describe a block local symbol, but a file local one.
 
@@ -1899,17 +1879,16 @@ generates the following stab:
 
      .stabs "e_places:T22=efirst:0,second:3,last:4,;",128,0,0,0
 
-   The symbol descriptor (`T') says that the stab describes a
-structure, enumeration, or union tag.  The type descriptor `e',
-following the `22=' of the type definition narrows it down to an
-enumeration type.  Following the `e' is a list of the elements of the
-enumeration.  The format is `NAME:VALUE,'.  The list of elements ends
-with `;'.  The fact that VALUE is specified as an integer can cause
-problems if the value is large.  GCC 2.5.2 tries to output it in octal
-in that case with a leading zero, which is probably a good thing,
-although GDB 4.11 supports octal only in cases where decimal is
-perfectly good.  Negative decimal values are supported by both GDB and
-dbx.
+   The symbol descriptor ('T') says that the stab describes a structure,
+enumeration, or union tag.  The type descriptor 'e', following the '22='
+of the type definition narrows it down to an enumeration type.
+Following the 'e' is a list of the elements of the enumeration.  The
+format is 'NAME:VALUE,'.  The list of elements ends with ';'.  The fact
+that VALUE is specified as an integer can cause problems if the value is
+large.  GCC 2.5.2 tries to output it in octal in that case with a
+leading zero, which is probably a good thing, although GDB 4.11 supports
+octal only in cases where decimal is perfectly good.  Negative decimal
+values are supported by both GDB and dbx.
 
    There is no standard way to specify the size of an enumeration type;
 it is determined by the architecture (normally all enumerations types
@@ -1918,16 +1897,16 @@ type of another size for debuggers which
 Field::.
 
    Enumeration types are unusual in that they define symbols for the
-enumeration values (`first', `second', and `third' in the above
+enumeration values ('first', 'second', and 'third' in the above
 example), and even though these symbols are visible in the file as a
-whole (rather than being in a more local namespace like structure
-member names), they are defined in the type definition for the
-enumeration type rather than each having their own symbol.  In order to
-be fast, GDB will only get symbols from such types (in its initial scan
-of the stabs) if the type is the first thing defined after a `T' or `t'
-symbol descriptor (the above example fulfills this requirement).  If
-the type does not have a name, the compiler should emit it in a
-nameless stab (*note String Field::); GCC does this.
+whole (rather than being in a more local namespace like structure member
+names), they are defined in the type definition for the enumeration type
+rather than each having their own symbol.  In order to be fast, GDB will
+only get symbols from such types (in its initial scan of the stabs) if
+the type is the first thing defined after a 'T' or 't' symbol descriptor
+(the above example fulfills this requirement).  If the type does not
+have a name, the compiler should emit it in a nameless stab (*note
+String Field::); GCC does this.
 
 
 File: stabs.info,  Node: Structures,  Next: Typedefs,  Prev: Enumerations,  Up: Types
@@ -1938,13 +1917,13 @@ File: stabs.info,  Node: Structures,  Ne
 The encoding of structures in stabs can be shown with an example.
 
    The following source code declares a structure tag and defines an
-instance of the structure in global scope. Then a `typedef' equates the
+instance of the structure in global scope.  Then a 'typedef' equates the
 structure tag with a new type.  Separate stabs are generated for the
-structure tag, the structure `typedef', and the structure instance.  The
-stabs for the tag and the `typedef' are emitted when the definitions are
-encountered.  Since the structure elements are not initialized, the
-stab and code for the structure variable itself is located at the end
-of the program in the bss section.
+structure tag, the structure 'typedef', and the structure instance.  The
+stabs for the tag and the 'typedef' are emitted when the definitions are
+encountered.  Since the structure elements are not initialized, the stab
+and code for the structure variable itself is located at the end of the
+program in the bss section.
 
      struct s_tag {
        int   s_int;
@@ -1955,15 +1934,15 @@ of the program in the bss section.
 
      typedef struct s_tag s_typedef;
 
-   The structure tag has an `N_LSYM' stab type because, like the
+   The structure tag has an 'N_LSYM' stab type because, like the
 enumeration, the symbol has file scope.  Like the enumeration, the
-symbol descriptor is `T', for enumeration, structure, or tag type.  The
-type descriptor `s' following the `16=' of the type definition narrows
+symbol descriptor is 'T', for enumeration, structure, or tag type.  The
+type descriptor 's' following the '16=' of the type definition narrows
 the symbol type to structure.
 
-   Following the `s' type descriptor is the number of bytes the
+   Following the 's' type descriptor is the number of bytes the
 structure occupies, followed by a description of each structure element.
-The structure element descriptions are of the form `NAME:TYPE, BIT
+The structure element descriptions are of the form 'NAME:TYPE, BIT
 OFFSET FROM THE START OF THE STRUCT, NUMBER OF BITS IN THE ELEMENT'.
 
      # 128 is N_LSYM
@@ -1971,20 +1950,20 @@ OFFSET FROM THE START OF THE STRUCT, NUM
              s_char_vec:17=ar1;0;7;2,64,64;s_next:18=*16,128,32;;",128,0,0,0
 
    In this example, the first two structure elements are previously
-defined types.  For these, the type following the `NAME:' part of the
+defined types.  For these, the type following the 'NAME:' part of the
 element description is a simple type reference.  The other two structure
 elements are new types.  In this case there is a type definition
-embedded after the `NAME:'.  The type definition for the array element
-looks just like a type definition for a stand-alone array.  The
-`s_next' field is a pointer to the same kind of structure that the
-field is an element of.  So the definition of structure type 16
-contains a type definition for an element which is a pointer to type 16.
+embedded after the 'NAME:'.  The type definition for the array element
+looks just like a type definition for a stand-alone array.  The 's_next'
+field is a pointer to the same kind of structure that the field is an
+element of.  So the definition of structure type 16 contains a type
+definition for an element which is a pointer to type 16.
 
    If a field is a static member (this is a C++ feature in which a
 single variable appears to be a field of every structure of a given
 type) it still starts out with the field name, a colon, and the type,
-but then instead of a comma, bit position, comma, and bit size, there
-is a colon followed by the name of the variable which each such field
+but then instead of a comma, bit position, comma, and bit size, there is
+a colon followed by the name of the variable which each such field
 refers to.
 
    If the structure has methods (a C++ feature), they follow the
@@ -1996,29 +1975,29 @@ File: stabs.info,  Node: Typedefs,  Next
 5.9 Giving a Type a Name
 ========================
 
-To give a type a name, use the `t' symbol descriptor.  The type is
+To give a type a name, use the 't' symbol descriptor.  The type is
 specified by the type information (*note String Field::) for the stab.
 For example,
 
      .stabs "s_typedef:t16",128,0,0,0     # 128 is N_LSYM
 
-   specifies that `s_typedef' refers to type number 16.  Such stabs
-have symbol type `N_LSYM' (or `C_DECL' for XCOFF).  (The Sun
-documentation mentions using `N_GSYM' in some cases).
+   specifies that 's_typedef' refers to type number 16.  Such stabs have
+symbol type 'N_LSYM' (or 'C_DECL' for XCOFF). (The Sun documentation
+mentions using 'N_GSYM' in some cases).
 
    If you are specifying the tag name for a structure, union, or
-enumeration, use the `T' symbol descriptor instead.  I believe C is the
+enumeration, use the 'T' symbol descriptor instead.  I believe C is the
 only language with this feature.
 
    If the type is an opaque type (I believe this is a Modula-2 feature),
 AIX provides a type descriptor to specify it.  The type descriptor is
-`o' and is followed by a name.  I don't know what the name means--is it
-always the same as the name of the type, or is this type descriptor
-used with a nameless stab (*note String Field::)?  There optionally
-follows a comma followed by type information which defines the type of
-this type.  If omitted, a semicolon is used in place of the comma and
-the type information, and the type is much like a generic pointer
-type--it has a known size but little else about it is specified.
+'o' and is followed by a name.  I don't know what the name means--is it
+always the same as the name of the type, or is this type descriptor used
+with a nameless stab (*note String Field::)?  There optionally follows a
+comma followed by type information which defines the type of this type.
+If omitted, a semicolon is used in place of the comma and the type
+information, and the type is much like a generic pointer type--it has a
+known size but little else about it is specified.
 
 
 File: stabs.info,  Node: Unions,  Next: Function Types,  Prev: Typedefs,  Up: Types
@@ -2033,35 +2012,35 @@ File: stabs.info,  Node: Unions,  Next: 
      } an_u;
 
    This code generates a stab for a union tag and a stab for a union
-variable.  Both use the `N_LSYM' stab type.  If a union variable is
+variable.  Both use the 'N_LSYM' stab type.  If a union variable is
 scoped locally to the procedure in which it is defined, its stab is
-located immediately preceding the `N_LBRAC' for the procedure's block
+located immediately preceding the 'N_LBRAC' for the procedure's block
 start.
 
    The stab for the union tag, however, is located preceding the code
-for the procedure in which it is defined.  The stab type is `N_LSYM'.
+for the procedure in which it is defined.  The stab type is 'N_LSYM'.
 This would seem to imply that the union type is file scope, like the
-struct type `s_tag'.  This is not true.  The contents and position of
-the stab for `u_type' do not convey any information about its procedure
+struct type 's_tag'.  This is not true.  The contents and position of
+the stab for 'u_type' do not convey any information about its procedure
 local scope.
 
      # 128 is N_LSYM
      .stabs "u_tag:T23=u4u_int:1,0,32;u_float:12,0,32;u_char:21,0,32;;",
             128,0,0,0
 
-   The symbol descriptor `T', following the `name:' means that the stab
+   The symbol descriptor 'T', following the 'name:' means that the stab
 describes an enumeration, structure, or union tag.  The type descriptor
-`u', following the `23=' of the type definition, narrows it down to a
-union type definition.  Following the `u' is the number of bytes in the
+'u', following the '23=' of the type definition, narrows it down to a
+union type definition.  Following the 'u' is the number of bytes in the
 union.  After that is a list of union element descriptions.  Their
-format is `NAME:TYPE, BIT OFFSET INTO THE UNION, NUMBER OF BYTES FOR
-THE ELEMENT;'.
+format is 'NAME:TYPE, BIT OFFSET INTO THE UNION, NUMBER OF BYTES FOR THE
+ELEMENT;'.
 
    The stab for the union variable is:
 
      .stabs "an_u:23",128,0,0,-20     # 128 is N_LSYM
 
-   `-20' specifies where the variable is stored (*note Stack
+   '-20' specifies where the variable is stored (*note Stack
 Variables::).
 
 
@@ -2074,23 +2053,23 @@ Various types can be defined for functio
 not used in defining functions (*note Procedures::); they are used for
 things like pointers to functions.
 
-   The simple, traditional, type is type descriptor `f' is followed by
+   The simple, traditional, type is type descriptor 'f' is followed by
 type information for the return type of the function, followed by a
 semicolon.
 
    This does not deal with functions for which the number and types of
-the parameters are part of the type, as in Modula-2 or ANSI C.  AIX
-provides extensions to specify these, using the `f', `F', `p', and `R'
+the parameters are part of the type, as in Modula-2 or ANSI C. AIX
+provides extensions to specify these, using the 'f', 'F', 'p', and 'R'
 type descriptors.
 
-   First comes the type descriptor.  If it is `f' or `F', this type
+   First comes the type descriptor.  If it is 'f' or 'F', this type
 involves a function rather than a procedure, and the type information
 for the return type of the function follows, followed by a comma.  Then
 comes the number of parameters to the function and a semicolon.  Then,
 for each parameter, there is the name of the parameter followed by a
-colon (this is only present for type descriptors `R' and `F' which
-represent Pascal function or procedure parameters), type information
-for the parameter, a comma, 0 if passed by reference or 1 if passed by
+colon (this is only present for type descriptors 'R' and 'F' which
+represent Pascal function or procedure parameters), type information for
+the parameter, a comma, 0 if passed by reference or 1 if passed by
 value, and a semicolon.  The type definition ends with a semicolon.
 
    For example, this variable definition:
@@ -2103,7 +2082,7 @@ generates the following code:
          .common _g_pf,4,"bss"
 
    The variable defines a new type, 24, which is a pointer to another
-new type, 25, which is a function returning `int'.
+new type, 25, which is a function returning 'int'.
 
 
 File: stabs.info,  Node: Macro define and undefine,  Next: Symbol Tables,  Prev: Types,  Up: Top
@@ -2112,18 +2091,18 @@ File: stabs.info,  Node: Macro define an
 **************************************
 
 This section describes the stabs support for macro define and undefine
-information, supported on some systems.  (e.g., with `-g3' `-gstabs'
+information, supported on some systems.  (e.g., with '-g3' '-gstabs'
 when using GCC).
 
-   A `#define MACRO-NAME MACRO-BODY' is represented with an
-`N_MAC_DEFINE' stab with a string field of `MACRO-NAME MACRO-BODY'.  
+   A '#define MACRO-NAME MACRO-BODY' is represented with an
+'N_MAC_DEFINE' stab with a string field of 'MACRO-NAME MACRO-BODY'.
 
-   An `#undef MACRO-NAME' is represented with an `N_MAC_UNDEF' stabs
-with a string field of simply `MACRO-NAME'.  
+   An '#undef MACRO-NAME' is represented with an 'N_MAC_UNDEF' stabs
+with a string field of simply 'MACRO-NAME'.
 
-   For both `N_MAC_DEFINE' and `N_MAC_UNDEF', the desc field is the
-line number within the file where the corresponding `#define' or
-`#undef' occurred.
+   For both 'N_MAC_DEFINE' and 'N_MAC_UNDEF', the desc field is the line
+number within the file where the corresponding '#define' or '#undef'
+occurred.
 
    For example, the following C code:
 
@@ -2159,8 +2138,8 @@ produces the following stabs (as well as
          .stabs	"ONE",58,0,10,0
          .stabs	"ONE(c) (c + 23)",54,0,11,0
 
-NOTE: In the above example, `54' is `N_MAC_DEFINE' and `58' is
-`N_MAC_UNDEF'.
+NOTE: In the above example, '54' is 'N_MAC_DEFINE' and '58' is
+'N_MAC_UNDEF'.
 
 
 File: stabs.info,  Node: Symbol Tables,  Next: Cplusplus,  Prev: Macro define and undefine,  Up: Top
@@ -2169,8 +2148,8 @@ File: stabs.info,  Node: Symbol Tables, 
 *************************************
 
 This chapter describes the format of symbol table entries and how stab
-assembler directives map to them.  It also describes the
-transformations that the assembler and linker make on data from stabs.
+assembler directives map to them.  It also describes the transformations
+that the assembler and linker make on data from stabs.
 
 * Menu:
 
@@ -2186,9 +2165,9 @@ File: stabs.info,  Node: Symbol Table Fo
 Each time the assembler encounters a stab directive, it puts each field
 of the stab into a corresponding field in a symbol table entry of its
 output file.  If the stab contains a string field, the symbol table
-entry for that stab points to a string table entry containing the
-string data from the stab.  Assembler labels become relocatable
-addresses.  Symbol table entries in a.out have the format:
+entry for that stab points to a string table entry containing the string
+data from the stab.  Assembler labels become relocatable addresses.
+Symbol table entries in a.out have the format:
 
      struct internal_nlist {
        unsigned long n_strx;         /* index into string table of name */
@@ -2198,13 +2177,13 @@ addresses.  Symbol table entries in a.ou
        bfd_vma n_value;              /* value of symbol */
      };
 
-   If the stab has a string, the `n_strx' field holds the offset in
+   If the stab has a string, the 'n_strx' field holds the offset in
 bytes of the string within the string table.  The string is terminated
 by a NUL character.  If the stab lacks a string (for example, it was
-produced by a `.stabn' or `.stabd' directive), the `n_strx' field is
+produced by a '.stabn' or '.stabd' directive), the 'n_strx' field is
 zero.
 
-   Symbol table entries with `n_type' field values greater than 0x1f
+   Symbol table entries with 'n_type' field values greater than 0x1f
 originated as stabs generated by the compiler (with one random
 exception).  The other entries were placed in the symbol table of the
 executable by the assembler or the linker.
@@ -2220,15 +2199,15 @@ defined symbols.
 
    You can see the transformations made on stab data by the assembler
 and linker by examining the symbol table after each pass of the build.
-To do this, use `nm -ap', which dumps the symbol table, including
+To do this, use 'nm -ap', which dumps the symbol table, including
 debugging information, unsorted.  For stab entries the columns are:
-VALUE, OTHER, DESC, TYPE, STRING.  For assembler and linker symbols,
-the columns are: VALUE, TYPE, STRING.
+VALUE, OTHER, DESC, TYPE, STRING.  For assembler and linker symbols, the
+columns are: VALUE, TYPE, STRING.
 
    The low 5 bits of the stab type tell the linker how to relocate the
-value of the stab.  Thus for stab types like `N_RSYM' and `N_LSYM',
+value of the stab.  Thus for stab types like 'N_RSYM' and 'N_LSYM',
 where the value is an offset or a register number, the low 5 bits are
-`N_ABS', which tells the linker not to relocate the value.
+'N_ABS', which tells the linker not to relocate the value.
 
    Where the value of a stab contains an assembly language label, it is
 transformed by each build step.  The assembler turns it into a
@@ -2256,7 +2235,7 @@ The following stab describes the symbol:
      .stabs "s_g_repeat:S1",38,0,0,_s_g_repeat
 
 The assembler transforms the stab into this symbol table entry in the
-`.o' file.  The location is expressed as a data segment offset.
+'.o' file.  The location is expressed as a data segment offset.
 
      00000084 - 00 0000 STSYM s_g_repeat:S1
 
@@ -2271,9 +2250,9 @@ File: stabs.info,  Node: Transformations
 7.2.2 Transformations on Global Variables
 -----------------------------------------
 
-Stabs for global variables do not contain location information. In this
-case, the debugger finds location information in the assembler or
-linker symbol table entry describing the variable.  The source line:
+Stabs for global variables do not contain location information.  In this
+case, the debugger finds location information in the assembler or linker
+symbol table entry describing the variable.  The source line:
 
      char g_foo = 'c';
 
@@ -2283,9 +2262,9 @@ generates the stab:
 
    The variable is represented by two symbol table entries in the object
 file (see below).  The first one originated as a stab.  The second one
-is an external symbol.  The upper case `D' signifies that the `n_type'
-field of the symbol table contains 7, `N_DATA' with local linkage.  The
-stab's value is zero since the value is not used for `N_GSYM' stabs.
+is an external symbol.  The upper case 'D' signifies that the 'n_type'
+field of the symbol table contains 7, 'N_DATA' with local linkage.  The
+stab's value is zero since the value is not used for 'N_GSYM' stabs.
 The value of the linker symbol is the relocatable address corresponding
 to the variable.
 
@@ -2306,8 +2285,8 @@ File: stabs.info,  Node: Stab Section Tr
 ---------------------------------------------------
 
 For object file formats using stabs in separate sections (*note Stab
-Sections::), use `objdump --stabs' instead of `nm' to show the stabs in
-an object or executable file.  `objdump' is a GNU utility; Sun does not
+Sections::), use 'objdump --stabs' instead of 'nm' to show the stabs in
+an object or executable file.  'objdump' is a GNU utility; Sun does not
 provide any equivalent.
 
    The following example is for a stab whose value is an address is
@@ -2352,8 +2331,8 @@ File: stabs.info,  Node: Cplusplus,  Nex
 * Simple Classes::
 * Class Instance::
 * Methods::			Method definition
-* Method Type Descriptor::      The `#' type descriptor
-* Member Type Descriptor::      The `@' type descriptor
+* Method Type Descriptor::      The '#' type descriptor
+* Member Type Descriptor::      The '@' type descriptor
 * Protections::
 * Method Modifiers::
 * Virtual Methods::
@@ -2367,13 +2346,13 @@ File: stabs.info,  Node: Class Names,  N
 8.1 C++ Class Names
 ===================
 
-In C++, a class name which is declared with `class', `struct', or
-`union', is not only a tag, as in C, but also a type name.  Thus there
-should be stabs with both `t' and `T' symbol descriptors (*note
+In C++, a class name which is declared with 'class', 'struct', or
+'union', is not only a tag, as in C, but also a type name.  Thus there
+should be stabs with both 't' and 'T' symbol descriptors (*note
 Typedefs::).
 
    To save space, there is a special abbreviation for this case.  If the
-`T' symbol descriptor is followed by `t', then the stab defines both a
+'T' symbol descriptor is followed by 't', then the stab defines both a
 type name and a tag.
 
    For example, the C++ code
@@ -2399,15 +2378,15 @@ In C++, a symbol (such as a type name) c
 type.
 
    In stabs, this is sometimes represented by making the name of a
-symbol which contains `::'.  Such a pair of colons does not end the name
+symbol which contains '::'.  Such a pair of colons does not end the name
 of the symbol, the way a single colon would (*note String Field::).  I'm
 not sure how consistently used or well thought out this mechanism is.
-So that a pair of colons in this position always has this meaning, `:'
+So that a pair of colons in this position always has this meaning, ':'
 cannot be used as a symbol descriptor.
 
-   For example, if the string for a stab is `foo::bar::baz:t5=*6', then
-`foo::bar::baz' is the name of the symbol, `t' is the symbol
-descriptor, and `5=*6' is the type information.
+   For example, if the string for a stab is 'foo::bar::baz:t5=*6', then
+'foo::bar::baz' is the name of the symbol, 't' is the symbol descriptor,
+and '5=*6' is the type information.
 
 
 File: stabs.info,  Node: Basic Cplusplus Types,  Next: Simple Classes,  Prev: Nested Symbols,  Up: Cplusplus
@@ -2417,16 +2396,16 @@ File: stabs.info,  Node: Basic Cplusplus
 
 << the examples that follow are based on a01.C >>
 
-   C++ adds two more builtin types to the set defined for C.  These are
-the unknown type and the vtable record type.  The unknown type, type
-16, is defined in terms of itself like the void type.
+   C++ adds two more builtin types to the set defined for C. These are
+the unknown type and the vtable record type.  The unknown type, type 16,
+is defined in terms of itself like the void type.
 
    The vtable record type, type 17, is defined as a structure type and
 then as a structure tag.  The structure has four fields: delta, index,
 pfn, and delta2.  pfn is the function pointer.
 
    << In boilerplate $vtbl_ptr_type, what are the fields delta, index,
-and delta2 used for? >>
+and delta2 used for?  >>
 
    This basic type is present in all C++ programs even if there are no
 virtual methods defined.
@@ -2453,11 +2432,11 @@ File: stabs.info,  Node: Simple Classes,
 8.4 Simple Class Definition
 ===========================
 
-The stabs describing C++ language features are an extension of the
-stabs describing C.  Stabs representing C++ class types elaborate
-extensively on the stab format used to describe structure types in C.
-Stabs representing class type variables look just like stabs
-representing C language variables.
+The stabs describing C++ language features are an extension of the stabs
+describing C. Stabs representing C++ class types elaborate extensively
+on the stab format used to describe structure types in C. Stabs
+representing class type variables look just like stabs representing C
+language variables.
 
    Consider the following very simple class definition.
 
@@ -2467,12 +2446,12 @@ representing C language variables.
              int Ameth(int in, char other);
      };
 
-   The class `baseA' is represented by two stabs.  The first stab
+   The class 'baseA' is represented by two stabs.  The first stab
 describes the class as a structure type.  The second stab describes a
-structure tag of the class type.  Both stabs are of stab type `N_LSYM'.
-Since the stab is not located between an `N_FUN' and an `N_LBRAC' stab
+structure tag of the class type.  Both stabs are of stab type 'N_LSYM'.
+Since the stab is not located between an 'N_FUN' and an 'N_LBRAC' stab
 this indicates that the class is defined at file scope.  If it were,
-then the `N_LSYM' would signify a local variable.
+then the 'N_LSYM' would signify a local variable.
 
    A stab describing a C++ class type is similar in format to a stab
 describing a C struct, with each class member shown as a field in the
@@ -2488,40 +2467,40 @@ extended for member data.
 
    The field part of a C++ class stab representing a member function
 differs substantially from the field part of a C struct stab.  It still
-begins with `name:' but then goes on to define a new type number for
-the member function, describe its return type, its argument types, its
+begins with 'name:' but then goes on to define a new type number for the
+member function, describe its return type, its argument types, its
 protection level, any qualifiers applied to the method definition, and
-whether the method is virtual or not.  If the method is virtual then
-the method description goes on to give the vtable index of the method,
-and the type number of the first base class defining the method.
+whether the method is virtual or not.  If the method is virtual then the
+method description goes on to give the vtable index of the method, and
+the type number of the first base class defining the method.
 
    When the field name is a method name it is followed by two colons
 rather than one.  This is followed by a new type definition for the
 method.  This is a number followed by an equal sign and the type of the
-method.  Normally this will be a type declared using the `#' type
+method.  Normally this will be a type declared using the '#' type
 descriptor; see *note Method Type Descriptor::; static member functions
-are declared using the `f' type descriptor instead; see *note Function
+are declared using the 'f' type descriptor instead; see *note Function
 Types::.
 
    The format of an overloaded operator method name differs from that of
-other methods.  It is `op$::OPERATOR-NAME.' where OPERATOR-NAME is the
-operator name such as `+' or `+='.  The name ends with a period, and
-any characters except the period can occur in the OPERATOR-NAME string.
+other methods.  It is 'op$::OPERATOR-NAME.' where OPERATOR-NAME is the
+operator name such as '+' or '+='.  The name ends with a period, and any
+characters except the period can occur in the OPERATOR-NAME string.
 
    The next part of the method description represents the arguments to
-the method, preceded by a colon and ending with a semi-colon.  The
-types of the arguments are expressed in the same way argument types are
-expressed in C++ name mangling.  In this example an `int' and a `char'
-map to `ic'.
+the method, preceded by a colon and ending with a semi-colon.  The types
+of the arguments are expressed in the same way argument types are
+expressed in C++ name mangling.  In this example an 'int' and a 'char'
+map to 'ic'.
 
    This is followed by a number, a letter, and an asterisk or period,
 followed by another semicolon.  The number indicates the protections
-that apply to the member function.  Here the 2 means public.  The
-letter encodes any qualifier applied to the method definition.  In this
-case, `A' means that it is a normal function definition.  The dot shows
-that the method is not virtual.  The sections that follow elaborate
-further on these fields and describe the additional information present
-for virtual methods.
+that apply to the member function.  Here the 2 means public.  The letter
+encodes any qualifier applied to the method definition.  In this case,
+'A' means that it is a normal function definition.  The dot shows that
+the method is not virtual.  The sections that follow elaborate further
+on these fields and describe the additional information present for
+virtual methods.
 
      .stabs "class_name:sym_desc(type)type_def(20)=type_desc(struct)struct_bytes(4)
              field_name(Adat):type(int),bit_offset(0),field_bits(32);
@@ -2578,12 +2557,12 @@ defines Ameth:
    This method definition yields three stabs following the code of the
 method.  One stab describes the method itself and following two describe
 its parameters.  Although there is only one formal argument all methods
-have an implicit argument which is the `this' pointer.  The `this'
+have an implicit argument which is the 'this' pointer.  The 'this'
 pointer is a pointer to the object on which the method was called.  Note
 that the method name is mangled to encode the class name and argument
-types.  Name mangling is described in the ARM (`The Annotated C++
+types.  Name mangling is described in the ARM ('The Annotated C++
 Reference Manual', by Ellis and Stroustrup, ISBN 0-201-51459-1);
-`gpcompare.texi' in Cygnus GCC distributions describes the differences
+'gpcompare.texi' in Cygnus GCC distributions describes the differences
 between GNU mangling and ARM mangling.
 
      .stabs "name:symbol_descriptor(global function)return_type(int)",
@@ -2591,12 +2570,12 @@ between GNU mangling and ARM mangling.
 
      .stabs "Ameth__5baseAic:F1",36,0,0,_Ameth__5baseAic
 
-   Here is the stab for the `this' pointer implicit argument.  The name
-of the `this' pointer is always `this'.  Type 19, the `this' pointer is
-defined as a pointer to type 20, `baseA', but a stab defining `baseA'
+   Here is the stab for the 'this' pointer implicit argument.  The name
+of the 'this' pointer is always 'this'.  Type 19, the 'this' pointer is
+defined as a pointer to type 20, 'baseA', but a stab defining 'baseA'
 has not yet been emitted.  Since the compiler knows it will be emitted
-shortly, here it just outputs a cross reference to the undefined
-symbol, by prefixing the symbol name with `xs'.
+shortly, here it just outputs a cross reference to the undefined symbol,
+by prefixing the symbol name with 'xs'.
 
      .stabs "name:sym_desc(register param)type_def(19)=
              type_desc(ptr to)type_ref(baseA)=
@@ -2619,23 +2598,23 @@ frame pointer.
 
 File: stabs.info,  Node: Method Type Descriptor,  Next: Member Type Descriptor,  Prev: Methods,  Up: Cplusplus
 
-8.7 The `#' Type Descriptor
+8.7 The '#' Type Descriptor
 ===========================
 
 This is used to describe a class method.  This is a function which takes
-an extra argument as its first argument, for the `this' pointer.
+an extra argument as its first argument, for the 'this' pointer.
 
-   If the `#' is immediately followed by another `#', the second one
+   If the '#' is immediately followed by another '#', the second one
 will be followed by the return type and a semicolon.  The class and
 argument types are not specified, and must be determined by demangling
 the name of the method if it is available.
 
-   Otherwise, the single `#' is followed by the class type, a comma,
-the return type, a comma, and zero or more parameter types separated by
+   Otherwise, the single '#' is followed by the class type, a comma, the
+return type, a comma, and zero or more parameter types separated by
 commas.  The list of arguments is terminated by a semicolon.  In the
-debugging output generated by gcc, a final argument type of `void'
+debugging output generated by gcc, a final argument type of 'void'
 indicates a method which does not take a variable number of arguments.
-If the final argument type of `void' does not appear, the method was
+If the final argument type of 'void' does not appear, the method was
 declared with an ellipsis.
 
    Note that although such a type will normally be used to describe
@@ -2645,10 +2624,10 @@ the compiler it can also be used in othe
 
 File: stabs.info,  Node: Member Type Descriptor,  Next: Protections,  Prev: Method Type Descriptor,  Up: Cplusplus
 
-8.8 The `@' Type Descriptor
+8.8 The '@' Type Descriptor
 ===========================
 
-The `@' type descriptor is used for a pointer-to-non-static-member-data
+The '@' type descriptor is used for a pointer-to-non-static-member-data
 type.  It is followed by type information for the class (or union), a
 comma, and type information for the member data.
 
@@ -2660,10 +2639,10 @@ comma, and type information for the memb
 
      .stabs "int_in_a:t20=21=@19,1",128,0,0,0
 
-   Note that there is a conflict between this and type attributes
-(*note String Field::); both use type descriptor `@'.  Fortunately, the
-`@' type descriptor used in this C++ sense always will be followed by a
-digit, `(', or `-', and type attributes never start with those things.
+   Note that there is a conflict between this and type attributes (*note
+String Field::); both use type descriptor '@'.  Fortunately, the '@'
+type descriptor used in this C++ sense always will be followed by a
+digit, '(', or '-', and type attributes never start with those things.
 
 
 File: stabs.info,  Node: Protections,  Next: Method Modifiers,  Prev: Member Type Descriptor,  Up: Cplusplus
@@ -2671,20 +2650,20 @@ File: stabs.info,  Node: Protections,  N
 8.9 Protections
 ===============
 
-In the simple class definition shown above all member data and
-functions were publicly accessible.  The example that follows contrasts
-public, protected and privately accessible fields and shows how these
+In the simple class definition shown above all member data and functions
+were publicly accessible.  The example that follows contrasts public,
+protected and privately accessible fields and shows how these
 protections are encoded in C++ stabs.
 
-   If the character following the `FIELD-NAME:' part of the string is
-`/', then the next character is the visibility.  `0' means private, `1'
-means protected, and `2' means public.  Debuggers should ignore
+   If the character following the 'FIELD-NAME:' part of the string is
+'/', then the next character is the visibility.  '0' means private, '1'
+means protected, and '2' means public.  Debuggers should ignore
 visibility characters they do not recognize, and assume a reasonable
-default (such as public) (GDB 4.11 does not, but this should be fixed
-in the next GDB release).  If no visibility is specified the field is
-public.  The visibility `9' means that the field has been optimized out
+default (such as public) (GDB 4.11 does not, but this should be fixed in
+the next GDB release).  If no visibility is specified the field is
+public.  The visibility '9' means that the field has been optimized out
 and is public (there is no way to specify an optimized out field with a
-private or protected visibility).  Visibility `9' is not supported by
+private or protected visibility).  Visibility '9' is not supported by
 GDB 4.11; this should be fixed in the next GDB release.
 
    The following C++ source:
@@ -2703,11 +2682,11 @@ generates the following stab:
      # 128 is N_LSYM
      .stabs "vis:T19=s12priv:/01,0,32;prot:/12,32,8;pub:12,64,32;;",128,0,0,0
 
-   `vis:T19=s12' indicates that type number 19 is a 12 byte structure
-named `vis' The `priv' field has public visibility (`/0'), type int
-(`1'), and offset and size `,0,32;'.  The `prot' field has protected
-visibility (`/1'), type char (`2') and offset and size `,32,8;'.  The
-`pub' field has type float (`12'), and offset and size `,64,32;'.
+   'vis:T19=s12' indicates that type number 19 is a 12 byte structure
+named 'vis' The 'priv' field has public visibility ('/0'), type int
+('1'), and offset and size ',0,32;'.  The 'prot' field has protected
+visibility ('/1'), type char ('2') and offset and size ',32,8;'.  The
+'pub' field has type float ('12'), and offset and size ',64,32;'.
 
    Protections for member functions are signified by one digit embedded
 in the field part of the stab describing the method.  The digit is 0 if
@@ -2724,7 +2703,7 @@ definition below:
      };
 
    It generates the following stab.  The digit in question is to the
-left of an `A' in each case.  Notice also that in this case two symbol
+left of an 'A' in each case.  Notice also that in this case two symbol
 descriptors apply to the class name struct tag and struct type.
 
      .stabs "class_name:sym_desc(struct tag&type)type_def(21)=
@@ -2743,7 +2722,7 @@ descriptors apply to the class name stru
 
 File: stabs.info,  Node: Method Modifiers,  Next: Virtual Methods,  Prev: Protections,  Up: Cplusplus
 
-8.10 Method Modifiers (`const', `volatile', `const volatile')
+8.10 Method Modifiers ('const', 'volatile', 'const volatile')
 =============================================================
 
 << based on a6.C >>
@@ -2751,8 +2730,8 @@ File: stabs.info,  Node: Method Modifier
    In the class example described above all the methods have the normal
 modifier.  This method modifier information is located just after the
 protection information for the method.  This field has four possible
-character values.  Normal methods use `A', const methods use `B',
-volatile methods use `C', and const volatile methods use `D'.  Consider
+character values.  Normal methods use 'A', const methods use 'B',
+volatile methods use 'C', and const volatile methods use 'D'.  Consider
 the class definition below:
 
      class A {
@@ -2795,18 +2774,18 @@ description.  Consider the class definit
              virtual int A_virt (int arg) { return arg; };
      };
 
-   This results in the stab below describing class A.  It defines a new
+   This results in the stab below describing class A. It defines a new
 type (20) which is an 8 byte structure.  The first field of the class
-struct is `Adat', an integer, starting at structure offset 0 and
+struct is 'Adat', an integer, starting at structure offset 0 and
 occupying 32 bits.
 
    The second field in the class struct is not explicitly defined by the
 C++ class definition but is implied by the fact that the class contains
 a virtual method.  This field is the vtable pointer.  The name of the
-vtable pointer field starts with `$vf' and continues with a type
+vtable pointer field starts with '$vf' and continues with a type
 reference to the class it is part of.  In this example the type
 reference for class A is 20 so the name of its vtable pointer field is
-`$vf20', followed by the usual colon.
+'$vf20', followed by the usual colon.
 
    Next there is a type definition for the vtable pointer type (21).
 This is in turn defined as a pointer to another new type (22).
@@ -2820,9 +2799,9 @@ type definitions, as shown earlier.
 in the field are not specified when the field is a vtable pointer.
 
    Next is the method definition for the virtual member function
-`A_virt'.  Its description starts out using the same format as the
+'A_virt'.  Its description starts out using the same format as the
 non-virtual member functions described above, except instead of a dot
-after the `A' there is an asterisk, indicating that the function is
+after the 'A' there is an asterisk, indicating that the function is
 virtual.  Since is is virtual some addition information is appended to
 the end of the method description.
 
@@ -2834,8 +2813,8 @@ semi-colon.
 inheritance hierarchy defining the virtual member function.  In this
 case the class stab describes a base class so the virtual function is
 not overriding any other definition of the method.  Therefore the
-reference is to the type number of the class that the stab is
-describing (20).
+reference is to the type number of the class that the stab is describing
+(20).
 
    This is followed by three semi-colons.  One marks the end of the
 current sub-section, one marks the end of the method field, and the
@@ -2843,7 +2822,7 @@ third marks the end of the struct defini
 
    For classes containing virtual functions the very last section of the
 string part of the stab holds a type reference to the first base class.
-This is preceded by `~%' and followed by a final semi-colon.
+This is preceded by '~%' and followed by a final semi-colon.
 
      .stabs "class_name(A):type_def(20)=sym_desc(struct)struct_bytes(8)
              field_name(Adat):type_ref(int),bit_offset(0),field_bits(32);
@@ -2880,23 +2859,23 @@ appears bracketed by an exclamation poin
 a visibility character, a number, a comma, another number, and a
 semi-colon.
 
-   The virtual character is `1' if the base class is virtual and `0' if
-not.  The visibility character is `2' if the derivation is public, `1'
-if it is protected, and `0' if it is private.  Debuggers should ignore
+   The virtual character is '1' if the base class is virtual and '0' if
+not.  The visibility character is '2' if the derivation is public, '1'
+if it is protected, and '0' if it is private.  Debuggers should ignore
 virtual or visibility characters they do not recognize, and assume a
 reasonable default (such as public and non-virtual) (GDB 4.11 does not,
 but this should be fixed in the next GDB release).
 
    The number following the virtual and visibility characters is the
-offset from the start of the object to the part of the object
-pertaining to the base class.
+offset from the start of the object to the part of the object pertaining
+to the base class.
 
    After the comma, the second number is a type_descriptor for the base
-type.  Finally a semi-colon ends the series, which repeats for each
-base class.
+type.  Finally a semi-colon ends the series, which repeats for each base
+class.
 
-   The source below defines three base classes `A', `B', and `C' and
-the derived class `D'.
+   The source below defines three base classes 'A', 'B', and 'C' and the
+derived class 'D'.
 
      class A {
      public:
@@ -2937,7 +2916,7 @@ each base class.
      .stabs "C:Tt28=s8Cdat:1,0,32;$vf28:21,32;C_virt::29=##1;
              :i;2A*-2147483647;28;;;~%28;",128,0,0,0
 
-   In the stab describing derived class `D' below, the information about
+   In the stab describing derived class 'D' below, the information about
 the derivation of this class is encoded as follows.
 
      .stabs "derived_class_name:symbol_descriptors(struct tag&type)=
@@ -2963,22 +2942,22 @@ File: stabs.info,  Node: Virtual Base Cl
 A derived class object consists of a concatenation in memory of the data
 areas defined by each base class, starting with the leftmost and ending
 with the rightmost in the list of base classes.  The exception to this
-rule is for virtual inheritance.  In the example above, class `D'
-inherits virtually from base class `B'.  This means that an instance of
-a `D' object will not contain its own `B' part but merely a pointer to
-a `B' part, known as a virtual base pointer.
+rule is for virtual inheritance.  In the example above, class 'D'
+inherits virtually from base class 'B'.  This means that an instance of
+a 'D' object will not contain its own 'B' part but merely a pointer to a
+'B' part, known as a virtual base pointer.
 
    In a derived class stab, the base offset part of the derivation
 information, described above, shows how the base class parts are
 ordered.  The base offset for a virtual base class is always given as 0.
-Notice that the base offset for `B' is given as 0 even though `B' is
-not the first base class.  The first base class `A' starts at offset 0.
+Notice that the base offset for 'B' is given as 0 even though 'B' is not
+the first base class.  The first base class 'A' starts at offset 0.
 
-   The field information part of the stab for class `D' describes the
-field which is the pointer to the virtual base class `B'. The vbase
-pointer name is `$vb' followed by a type reference to the virtual base
-class.  Since the type id for `B' in this example is 25, the vbase
-pointer name is `$vb25'.
+   The field information part of the stab for class 'D' describes the
+field which is the pointer to the virtual base class 'B'.  The vbase
+pointer name is '$vb' followed by a type reference to the virtual base
+class.  Since the type id for 'B' in this example is 25, the vbase
+pointer name is '$vb25'.
 
      .stabs "D:Tt31=s32!3,000,20;100,25;0264,28;$vb25:24,128;Ddat:1,
             160,32;A_virt::32=##1;:i;2A*-2147483647;20;;B_virt::32:i;
@@ -2987,17 +2966,17 @@ pointer name is `$vb25'.
 
    Following the name and a semicolon is a type reference describing the
 type of the virtual base class pointer, in this case 24.  Type 24 was
-defined earlier as the type of the `B' class `this' pointer.  The
-`this' pointer for a class is a pointer to the class type.
+defined earlier as the type of the 'B' class 'this' pointer.  The 'this'
+pointer for a class is a pointer to the class type.
 
      .stabs "this:P24=*25=xsB:",64,0,0,8
 
    Finally the field offset part of the vbase pointer field description
-shows that the vbase pointer is the first field in the `D' object,
-before any data fields defined by the class.  The layout of a `D' class
-object is a follows, `Adat' at 0, the vtable pointer for `A' at 32,
-`Cdat' at 64, the vtable pointer for C at 96, the virtual base pointer
-for `B' at 128, and `Ddat' at 160.
+shows that the vbase pointer is the first field in the 'D' object,
+before any data fields defined by the class.  The layout of a 'D' class
+object is a follows, 'Adat' at 0, the vtable pointer for 'A' at 32,
+'Cdat' at 64, the vtable pointer for C at 96, the virtual base pointer
+for 'B' at 128, and 'Ddat' at 160.
 
 
 File: stabs.info,  Node: Static Members,  Prev: Virtual Base Classes,  Up: Cplusplus
@@ -3021,11 +3000,11 @@ Appendix A Table of Stab Types
 
 The following are all the possible values for the stab type field, for
 a.out files, in numeric order.  This does not apply to XCOFF, but it
-does apply to stabs in sections (*note Stab Sections::).  Stabs in
-ECOFF use these values but add 0x8f300 to distinguish them from non-stab
+does apply to stabs in sections (*note Stab Sections::).  Stabs in ECOFF
+use these values but add 0x8f300 to distinguish them from non-stab
 symbols.
 
-   The symbolic names are defined in the file `include/aout/stabs.def'.
+   The symbolic names are defined in the file 'include/aout/stabs.def'.
 
 * Menu:
 
@@ -3043,67 +3022,67 @@ directives.  Since this document does no
 object file format other than the debugging format, no details are
 given.
 
-`0x0     N_UNDF'
+'0x0 N_UNDF'
      Undefined symbol
 
-`0x2     N_ABS'
+'0x2 N_ABS'
      File scope absolute symbol
 
-`0x3     N_ABS | N_EXT'
+'0x3 N_ABS | N_EXT'
      External absolute symbol
 
-`0x4     N_TEXT'
+'0x4 N_TEXT'
      File scope text symbol
 
-`0x5     N_TEXT | N_EXT'
+'0x5 N_TEXT | N_EXT'
      External text symbol
 
-`0x6     N_DATA'
+'0x6 N_DATA'
      File scope data symbol
 
-`0x7     N_DATA | N_EXT'
+'0x7 N_DATA | N_EXT'
      External data symbol
 
-`0x8     N_BSS'
+'0x8 N_BSS'
      File scope BSS symbol
 
-`0x9     N_BSS | N_EXT'
+'0x9 N_BSS | N_EXT'
      External BSS symbol
 
-`0x0c    N_FN_SEQ'
-     Same as `N_FN', for Sequent compilers
+'0x0c N_FN_SEQ'
+     Same as 'N_FN', for Sequent compilers
 
-`0x0a    N_INDR'
+'0x0a N_INDR'
      Symbol is indirected to another symbol
 
-`0x12    N_COMM'
+'0x12 N_COMM'
      Common--visible after shared library dynamic link
 
-`0x14 N_SETA'
-`0x15 N_SETA | N_EXT'
+'0x14 N_SETA'
+'0x15 N_SETA | N_EXT'
      Absolute set element
 
-`0x16 N_SETT'
-`0x17 N_SETT | N_EXT'
+'0x16 N_SETT'
+'0x17 N_SETT | N_EXT'
      Text segment set element
 
-`0x18 N_SETD'
-`0x19 N_SETD | N_EXT'
+'0x18 N_SETD'
+'0x19 N_SETD | N_EXT'
      Data segment set element
 
-`0x1a N_SETB'
-`0x1b N_SETB | N_EXT'
+'0x1a N_SETB'
+'0x1b N_SETB | N_EXT'
      BSS segment set element
 
-`0x1c N_SETV'
-`0x1d N_SETV | N_EXT'
+'0x1c N_SETV'
+'0x1d N_SETV | N_EXT'
      Pointer to set vector
 
-`0x1e N_WARNING'
+'0x1e N_WARNING'
      Print a warning message during linking
 
-`0x1f    N_FN'
-     File name of a `.o' file
+'0x1f N_FN'
+     File name of a '.o' file
 
 
 File: stabs.info,  Node: Stab Symbol Types,  Prev: Non-Stab Symbol Types,  Up: Stab Types
@@ -3115,149 +3094,149 @@ The following symbol types indicate that
 full list of stab numbers, including stab types that are used in
 languages other than C.
 
-`0x20     N_GSYM'
+'0x20 N_GSYM'
      Global symbol; see *note Global Variables::.
 
-`0x22     N_FNAME'
+'0x22 N_FNAME'
      Function name (for BSD Fortran); see *note Procedures::.
 
-`0x24     N_FUN'
+'0x24 N_FUN'
      Function name (*note Procedures::) or text segment variable (*note
      Statics::).
 
-`0x26 N_STSYM'
+'0x26 N_STSYM'
      Data segment file-scope variable; see *note Statics::.
 
-`0x28 N_LCSYM'
+'0x28 N_LCSYM'
      BSS segment file-scope variable; see *note Statics::.
 
-`0x2a N_MAIN'
+'0x2a N_MAIN'
      Name of main routine; see *note Main Program::.
 
-`0x2c N_ROSYM'
-     Variable in `.rodata' section; see *note Statics::.
+'0x2c N_ROSYM'
+     Variable in '.rodata' section; see *note Statics::.
 
-`0x30     N_PC'
+'0x30 N_PC'
      Global symbol (for Pascal); see *note N_PC::.
 
-`0x32     N_NSYMS'
+'0x32 N_NSYMS'
      Number of symbols (according to Ultrix V4.0); see *note N_NSYMS::.
 
-`0x34     N_NOMAP'
+'0x34 N_NOMAP'
      No DST map; see *note N_NOMAP::.
 
-`0x36     N_MAC_DEFINE'
-     Name and body of a `#define'd macro; see *note Macro define and
+'0x36 N_MAC_DEFINE'
+     Name and body of a '#define'd macro; see *note Macro define and
      undefine::.
 
-`0x38 N_OBJ'
+'0x38 N_OBJ'
      Object file (Solaris2).
 
-`0x3a     N_MAC_UNDEF'
-     Name of an `#undef'ed macro; see *note Macro define and undefine::.
+'0x3a N_MAC_UNDEF'
+     Name of an '#undef'ed macro; see *note Macro define and undefine::.
 
-`0x3c N_OPT'
+'0x3c N_OPT'
      Debugger options (Solaris2).
 
-`0x40     N_RSYM'
+'0x40 N_RSYM'
      Register variable; see *note Register Variables::.
 
-`0x42     N_M2C'
+'0x42 N_M2C'
      Modula-2 compilation unit; see *note N_M2C::.
 
-`0x44     N_SLINE'
+'0x44 N_SLINE'
      Line number in text segment; see *note Line Numbers::.
 
-`0x46     N_DSLINE'
+'0x46 N_DSLINE'
      Line number in data segment; see *note Line Numbers::.
 
-`0x48     N_BSLINE'
+'0x48 N_BSLINE'
      Line number in bss segment; see *note Line Numbers::.
 
-`0x48     N_BROWS'
-     Sun source code browser, path to `.cb' file; see *note N_BROWS::.
+'0x48 N_BROWS'
+     Sun source code browser, path to '.cb' file; see *note N_BROWS::.
 
-`0x4a     N_DEFD'
+'0x4a N_DEFD'
      GNU Modula2 definition module dependency; see *note N_DEFD::.
 
-`0x4c N_FLINE'
+'0x4c N_FLINE'
      Function start/body/end line numbers (Solaris2).
 
-`0x50     N_EHDECL'
+'0x50 N_EHDECL'
      GNU C++ exception variable; see *note N_EHDECL::.
 
-`0x50     N_MOD2'
+'0x50 N_MOD2'
      Modula2 info "for imc" (according to Ultrix V4.0); see *note
      N_MOD2::.
 
-`0x54     N_CATCH'
-     GNU C++ `catch' clause; see *note N_CATCH::.
+'0x54 N_CATCH'
+     GNU C++ 'catch' clause; see *note N_CATCH::.
 
-`0x60     N_SSYM'
+'0x60 N_SSYM'
      Structure of union element; see *note N_SSYM::.
 
-`0x62 N_ENDM'
+'0x62 N_ENDM'
      Last stab for module (Solaris2).
 
-`0x64     N_SO'
+'0x64 N_SO'
      Path and name of source file; see *note Source Files::.
 
-`0x80 N_LSYM'
+'0x80 N_LSYM'
      Stack variable (*note Stack Variables::) or type (*note
      Typedefs::).
 
-`0x82     N_BINCL'
+'0x82 N_BINCL'
      Beginning of an include file (Sun only); see *note Include Files::.
 
-`0x84     N_SOL'
+'0x84 N_SOL'
      Name of include file; see *note Include Files::.
 
-`0xa0     N_PSYM'
+'0xa0 N_PSYM'
      Parameter variable; see *note Parameters::.
 
-`0xa2     N_EINCL'
+'0xa2 N_EINCL'
      End of an include file; see *note Include Files::.
 
-`0xa4     N_ENTRY'
+'0xa4 N_ENTRY'
      Alternate entry point; see *note Alternate Entry Points::.
 
-`0xc0     N_LBRAC'
+'0xc0 N_LBRAC'
      Beginning of a lexical block; see *note Block Structure::.
 
-`0xc2     N_EXCL'
+'0xc2 N_EXCL'
      Place holder for a deleted include file; see *note Include Files::.
 
-`0xc4     N_SCOPE'
+'0xc4 N_SCOPE'
      Modula2 scope information (Sun linker); see *note N_SCOPE::.
 
-`0xe0     N_RBRAC'
+'0xe0 N_RBRAC'
      End of a lexical block; see *note Block Structure::.
 
-`0xe2     N_BCOMM'
+'0xe2 N_BCOMM'
      Begin named common block; see *note Common Blocks::.
 
-`0xe4     N_ECOMM'
+'0xe4 N_ECOMM'
      End named common block; see *note Common Blocks::.
 
-`0xe8     N_ECOML'
+'0xe8 N_ECOML'
      Member of a common block; see *note Common Blocks::.
 
-`0xea N_WITH'
-     Pascal `with' statement: type,,0,0,offset (Solaris2).
+'0xea N_WITH'
+     Pascal 'with' statement: type,,0,0,offset (Solaris2).
 
-`0xf0     N_NBTEXT'
+'0xf0 N_NBTEXT'
      Gould non-base registers; see *note Gould::.
 
-`0xf2     N_NBDATA'
+'0xf2 N_NBDATA'
      Gould non-base registers; see *note Gould::.
 
-`0xf4     N_NBBSS'
+'0xf4 N_NBBSS'
      Gould non-base registers; see *note Gould::.
 
-`0xf6     N_NBSTS'
+'0xf6 N_NBSTS'
      Gould non-base registers; see *note Gould::.
 
-`0xf8     N_NBLCS'
+'0xf8 N_NBLCS'
      Gould non-base registers; see *note Gould::.
 
 
@@ -3270,110 +3249,110 @@ The symbol descriptor is the character w
 stabs, and which tells what kind of stab it is.  *Note String Field::,
 for more information about their use.
 
-`DIGIT'
-`('
-`-'
+'DIGIT'
+'('
+'-'
      Variable on the stack; see *note Stack Variables::.
 
-`:'
+':'
      C++ nested symbol; see *Note Nested Symbols::.
 
-`a'
+'a'
      Parameter passed by reference in register; see *note Reference
      Parameters::.
 
-`b'
+'b'
      Based variable; see *note Based Variables::.
 
-`c'
+'c'
      Constant; see *note Constants::.
 
-`C'
+'C'
      Conformant array bound (Pascal, maybe other languages); *note
      Conformant Arrays::.  Name of a caught exception (GNU C++).  These
-     can be distinguished because the latter uses `N_CATCH' and the
+     can be distinguished because the latter uses 'N_CATCH' and the
      former uses another symbol type.
 
-`d'
+'d'
      Floating point register variable; see *note Register Variables::.
 
-`D'
+'D'
      Parameter in floating point register; see *note Register
      Parameters::.
 
-`f'
+'f'
      File scope function; see *note Procedures::.
 
-`F'
+'F'
      Global function; see *note Procedures::.
 
-`G'
+'G'
      Global variable; see *note Global Variables::.
 
-`i'
+'i'
      *Note Register Parameters::.
 
-`I'
+'I'
      Internal (nested) procedure; see *note Nested Procedures::.
 
-`J'
+'J'
      Internal (nested) function; see *note Nested Procedures::.
 
-`L'
+'L'
      Label name (documented by AIX, no further information known).
 
-`m'
+'m'
      Module; see *note Procedures::.
 
-`p'
+'p'
      Argument list parameter; see *note Parameters::.
 
-`pP'
+'pP'
      *Note Parameters::.
 
-`pF'
+'pF'
      Fortran Function parameter; see *note Parameters::.
 
-`P'
+'P'
      Unfortunately, three separate meanings have been independently
-     invented for this symbol descriptor.  At least the GNU and Sun
-     uses can be distinguished by the symbol type.  Global Procedure
-     (AIX) (symbol type used unknown); see *note Procedures::.
-     Register parameter (GNU) (symbol type `N_PSYM'); see *note
-     Parameters::.  Prototype of function referenced by this file (Sun
-     `acc') (symbol type `N_FUN').
+     invented for this symbol descriptor.  At least the GNU and Sun uses
+     can be distinguished by the symbol type.  Global Procedure (AIX)
+     (symbol type used unknown); see *note Procedures::.  Register
+     parameter (GNU) (symbol type 'N_PSYM'); see *note Parameters::.
+     Prototype of function referenced by this file (Sun 'acc') (symbol
+     type 'N_FUN').
 
-`Q'
+'Q'
      Static Procedure; see *note Procedures::.
 
-`R'
+'R'
      Register parameter; see *note Register Parameters::.
 
-`r'
+'r'
      Register variable; see *note Register Variables::.
 
-`S'
+'S'
      File scope variable; see *note Statics::.
 
-`s'
+'s'
      Local variable (OS9000).
 
-`t'
+'t'
      Type name; see *note Typedefs::.
 
-`T'
+'T'
      Enumeration, structure, or union tag; see *note Typedefs::.
 
-`v'
+'v'
      Parameter passed by reference; see *note Reference Parameters::.
 
-`V'
+'V'
      Procedure scope static variable; see *note Statics::.
 
-`x'
+'x'
      Conformant array; see *note Conformant Arrays::.
 
-`X'
+'X'
      Function return variable; see *note Parameters::.
 
 
@@ -3383,136 +3362,136 @@ Appendix C Table of Type Descriptors
 ************************************
 
 The type descriptor is the character which follows the type number and
-an equals sign.  It specifies what kind of type is being defined.
-*Note String Field::, for more information about their use.
+an equals sign.  It specifies what kind of type is being defined.  *Note
+String Field::, for more information about their use.
 
-`DIGIT'
-`('
+'DIGIT'
+'('
      Type reference; see *note String Field::.
 
-`-'
+'-'
      Reference to builtin type; see *note Negative Type Numbers::.
 
-`#'
+'#'
      Method (C++); see *note Method Type Descriptor::.
 
-`*'
+'*'
      Pointer; see *note Miscellaneous Types::.
 
-`&'
+'&'
      Reference (C++).
 
-`@'
-     Type Attributes (AIX); see *note String Field::.  Member (class
-     and variable) type (GNU C++); see *note Member Type Descriptor::.
+'@'
+     Type Attributes (AIX); see *note String Field::.  Member (class and
+     variable) type (GNU C++); see *note Member Type Descriptor::.
 
-`a'
+'a'
      Array; see *note Arrays::.
 
-`A'
+'A'
      Open array; see *note Arrays::.
 
-`b'
+'b'
      Pascal space type (AIX); see *note Miscellaneous Types::.  Builtin
      integer type (Sun); see *note Builtin Type Descriptors::.  Const
      and volatile qualified type (OS9000).
 
-`B'
+'B'
      Volatile-qualified type; see *note Miscellaneous Types::.
 
-`c'
+'c'
      Complex builtin type (AIX); see *note Builtin Type Descriptors::.
      Const-qualified type (OS9000).
 
-`C'
+'C'
      COBOL Picture type.  See AIX documentation for details.
 
-`d'
+'d'
      File type; see *note Miscellaneous Types::.
 
-`D'
+'D'
      N-dimensional dynamic array; see *note Arrays::.
 
-`e'
+'e'
      Enumeration type; see *note Enumerations::.
 
-`E'
+'E'
      N-dimensional subarray; see *note Arrays::.
 
-`f'
+'f'
      Function type; see *note Function Types::.
 
-`F'
+'F'
      Pascal function parameter; see *note Function Types::
 
-`g'
+'g'
      Builtin floating point type; see *note Builtin Type Descriptors::.
 
-`G'
+'G'
      COBOL Group.  See AIX documentation for details.
 
-`i'
+'i'
      Imported type (AIX); see *note Cross-References::.
      Volatile-qualified type (OS9000).
 
-`k'
+'k'
      Const-qualified type; see *note Miscellaneous Types::.
 
-`K'
+'K'
      COBOL File Descriptor.  See AIX documentation for details.
 
-`M'
+'M'
      Multiple instance type; see *note Miscellaneous Types::.
 
-`n'
+'n'
      String type; see *note Strings::.
 
-`N'
+'N'
      Stringptr; see *note Strings::.
 
-`o'
+'o'
      Opaque type; see *note Typedefs::.
 
-`p'
+'p'
      Procedure; see *note Function Types::.
 
-`P'
+'P'
      Packed array; see *note Arrays::.
 
-`r'
+'r'
      Range type; see *note Subranges::.
 
-`R'
+'R'
      Builtin floating type; see *note Builtin Type Descriptors:: (Sun).
      Pascal subroutine parameter; see *note Function Types:: (AIX).
      Detecting this conflict is possible with careful parsing (hint: a
-     Pascal subroutine parameter type will always contain a comma, and
-     a builtin type descriptor never will).
+     Pascal subroutine parameter type will always contain a comma, and a
+     builtin type descriptor never will).
 
-`s'
+'s'
      Structure type; see *note Structures::.
 
-`S'
+'S'
      Set type; see *note Miscellaneous Types::.
 
-`u'
+'u'
      Union; see *note Unions::.
 
-`v'
+'v'
      Variant record.  This is a Pascal and Modula-2 feature which is
-     like a union within a struct in C.  See AIX documentation for
+     like a union within a struct in C. See AIX documentation for
      details.
 
-`w'
+'w'
      Wide character; see *note Builtin Type Descriptors::.
 
-`x'
+'x'
      Cross-reference; see *note Cross-References::.
 
-`Y'
+'Y'
      Used by IBM's xlC C++ compiler (for structures, I think).
 
-`z'
+'z'
      gstring; see *note Strings::.
 
 
@@ -3528,7 +3507,7 @@ eventually the information will all be i
 
    Format of an entry:
 
-   The first line is the symbol type (see `include/aout/stab.def').
+   The first line is the symbol type (see 'include/aout/stab.def').
 
    The second line describes the language constructs the symbol type
 represents.
@@ -3563,13 +3542,13 @@ File: stabs.info,  Node: N_PC,  Next: N_
 D.1 N_PC
 ========
 
- -- `.stabs': N_PC
+ -- '.stabs': N_PC
      Global symbol (for Pascal).
 
           "name" -> "symbol_name"  <<?>>
           value  -> supposedly the line number (stab.def is skeptical)
 
-          `stabdump.c' says:
+          'stabdump.c' says:
 
           global pascal symbol: name,,0,subtype,line
           << subtype? >>
@@ -3580,7 +3559,7 @@ File: stabs.info,  Node: N_NSYMS,  Next:
 D.2 N_NSYMS
 ===========
 
- -- `.stabn': N_NSYMS
+ -- '.stabn': N_NSYMS
      Number of symbols (according to Ultrix V4.0).
 
                   0, files,,funcs,lines (stab.def)
@@ -3591,7 +3570,7 @@ File: stabs.info,  Node: N_NOMAP,  Next:
 D.3 N_NOMAP
 ===========
 
- -- `.stabs': N_NOMAP
+ -- '.stabs': N_NOMAP
      No DST map for symbol (according to Ultrix V4.0).  I think this
      means a variable has been optimized out.
 
@@ -3603,7 +3582,7 @@ File: stabs.info,  Node: N_M2C,  Next: N
 D.4 N_M2C
 =========
 
- -- `.stabs': N_M2C
+ -- '.stabs': N_M2C
      Modula-2 compilation unit.
 
           "string" -> "unit_name,unit_time_stamp[,code_time_stamp]"
@@ -3611,20 +3590,19 @@ D.4 N_M2C
           value  -> 0 (main unit)
                     1 (any other unit)
 
-     See `Dbx and Dbxtool Interfaces', 2nd edition, by Sun, 1988, for
+     See 'Dbx and Dbxtool Interfaces', 2nd edition, by Sun, 1988, for
      more information.
 
-
 
 File: stabs.info,  Node: N_BROWS,  Next: N_DEFD,  Prev: N_M2C,  Up: Expanded Reference
 
 D.5 N_BROWS
 ===========
 
- -- `.stabs': N_BROWS
-     Sun source code browser, path to `.cb' file
+ -- '.stabs': N_BROWS
+     Sun source code browser, path to '.cb' file
 
-     <<?>> "path to associated `.cb' file"
+     <<?>> "path to associated '.cb' file"
 
      Note: N_BROWS has the same value as N_BSLINE.
 
@@ -3634,13 +3612,13 @@ File: stabs.info,  Node: N_DEFD,  Next: 
 D.6 N_DEFD
 ==========
 
- -- `.stabn': N_DEFD
+ -- '.stabn': N_DEFD
      GNU Modula2 definition module dependency.
 
      GNU Modula-2 definition module dependency.  The value is the
      modification time of the definition file.  The other field is
-     non-zero if it is imported with the GNU M2 keyword `%INITIALIZE'.
-     Perhaps `N_M2C' can be used if there are enough empty fields?
+     non-zero if it is imported with the GNU M2 keyword '%INITIALIZE'.
+     Perhaps 'N_M2C' can be used if there are enough empty fields?
 
 
 File: stabs.info,  Node: N_EHDECL,  Next: N_MOD2,  Prev: N_DEFD,  Up: Expanded Reference
@@ -3648,12 +3626,12 @@ File: stabs.info,  Node: N_EHDECL,  Next
 D.7 N_EHDECL
 ============
 
- -- `.stabs': N_EHDECL
+ -- '.stabs': N_EHDECL
      GNU C++ exception variable <<?>>.
 
      "STRING is variable name"
 
-     Note: conflicts with `N_MOD2'.
+     Note: conflicts with 'N_MOD2'.
 
 
 File: stabs.info,  Node: N_MOD2,  Next: N_CATCH,  Prev: N_EHDECL,  Up: Expanded Reference
@@ -3661,10 +3639,10 @@ File: stabs.info,  Node: N_MOD2,  Next: 
 D.8 N_MOD2
 ==========
 
- -- `.stab?': N_MOD2
+ -- '.stab?': N_MOD2
      Modula2 info "for imc" (according to Ultrix V4.0)
 
-     Note: conflicts with `N_EHDECL'  <<?>>
+     Note: conflicts with 'N_EHDECL' <<?>>
 
 
 File: stabs.info,  Node: N_CATCH,  Next: N_SSYM,  Prev: N_MOD2,  Up: Expanded Reference
@@ -3672,12 +3650,12 @@ File: stabs.info,  Node: N_CATCH,  Next:
 D.9 N_CATCH
 ===========
 
- -- `.stabn': N_CATCH
-     GNU C++ `catch' clause
+ -- '.stabn': N_CATCH
+     GNU C++ 'catch' clause
 
-     GNU C++ `catch' clause.  The value is its address.  The desc field
-     is nonzero if this entry is immediately followed by a `CAUGHT' stab
-     saying what exception was caught.  Multiple `CAUGHT' stabs means
+     GNU C++ 'catch' clause.  The value is its address.  The desc field
+     is nonzero if this entry is immediately followed by a 'CAUGHT' stab
+     saying what exception was caught.  Multiple 'CAUGHT' stabs means
      that multiple exceptions can be caught here.  If desc is 0, it
      means all exceptions are caught here.
 
@@ -3687,7 +3665,7 @@ File: stabs.info,  Node: N_SSYM,  Next: 
 D.10 N_SSYM
 ===========
 
- -- `.stabn': N_SSYM
+ -- '.stabn': N_SSYM
      Structure or union element.
 
      The value is the offset in the structure.
@@ -3700,7 +3678,7 @@ File: stabs.info,  Node: N_SCOPE,  Next:
 D.11 N_SCOPE
 ============
 
- -- `.stab?': N_SCOPE
+ -- '.stab?': N_SCOPE
      Modula2 scope information (Sun linker) <<?>>
 
 
@@ -3709,20 +3687,20 @@ File: stabs.info,  Node: Gould,  Next: N
 D.12 Non-base registers on Gould systems
 ========================================
 
- -- `.stab?': N_NBTEXT
- -- `.stab?': N_NBDATA
- -- `.stab?': N_NBBSS
- -- `.stab?': N_NBSTS
- -- `.stab?': N_NBLCS
+ -- '.stab?': N_NBTEXT
+ -- '.stab?': N_NBDATA
+ -- '.stab?': N_NBBSS
+ -- '.stab?': N_NBSTS
+ -- '.stab?': N_NBLCS
      These are used on Gould systems for non-base registers syms.
 
      However, the following values are not the values used by Gould;
-     they are the values which GNU has been documenting for these
-     values for a long time, without actually checking what Gould uses.
-     I include these values only because perhaps some someone actually
-     did something with the GNU information (I hope not, why GNU
-     knowingly assigned wrong values to these in the header file is a
-     complete mystery to me).
+     they are the values which GNU has been documenting for these values
+     for a long time, without actually checking what Gould uses.  I
+     include these values only because perhaps some someone actually did
+     something with the GNU information (I hope not, why GNU knowingly
+     assigned wrong values to these in the header file is a complete
+     mystery to me).
 
           240    0xf0     N_NBTEXT  ??
           242    0xf2     N_NBDATA  ??
@@ -3736,7 +3714,7 @@ File: stabs.info,  Node: N_LENG,  Prev: 
 D.13 N_LENG
 ===========
 
- -- `.stabn': N_LENG
+ -- '.stabn': N_LENG
      Second symbol entry containing a length-value for the preceding
      entry.  The value is the length.
 
@@ -3746,31 +3724,30 @@ File: stabs.info,  Node: Questions,  Nex
 Appendix E Questions and Anomalies
 **********************************
 
-   * For GNU C stabs defining local and global variables (`N_LSYM' and
-     `N_GSYM'), the desc field is supposed to contain the source line
-     number on which the variable is defined.  In reality the desc
-     field is always 0.  (This behavior is defined in `dbxout.c' and
-     putting a line number in desc is controlled by `#ifdef
-     WINNING_GDB', which defaults to false). GDB supposedly uses this
-     information if you say `list VAR'.  In reality, VAR can be a
-     variable defined in the program and GDB says `function VAR not
-     defined'.
+   * For GNU C stabs defining local and global variables ('N_LSYM' and
+     'N_GSYM'), the desc field is supposed to contain the source line
+     number on which the variable is defined.  In reality the desc field
+     is always 0.  (This behavior is defined in 'dbxout.c' and putting a
+     line number in desc is controlled by '#ifdef WINNING_GDB', which
+     defaults to false).  GDB supposedly uses this information if you
+     say 'list VAR'.  In reality, VAR can be a variable defined in the
+     program and GDB says 'function VAR not defined'.
 
    * In GNU C stabs, there seems to be no way to differentiate tag
-     types: structures, unions, and enums (symbol descriptor `T') and
-     typedefs (symbol descriptor `t') defined at file scope from types
-     defined locally to a procedure or other more local scope.  They
-     all use the `N_LSYM' stab type.  Types defined at procedure scope
-     are emitted after the `N_RBRAC' of the preceding function and
-     before the code of the procedure in which they are defined.  This
-     is exactly the same as types defined in the source file between
-     the two procedure bodies.  GDB over-compensates by placing all
-     types in block #1, the block for symbols of file scope.  This is
-     true for default, `-ansi' and `-traditional' compiler options.
-     (Bugs gcc/1063, gdb/1066.)
+     types: structures, unions, and enums (symbol descriptor 'T') and
+     typedefs (symbol descriptor 't') defined at file scope from types
+     defined locally to a procedure or other more local scope.  They all
+     use the 'N_LSYM' stab type.  Types defined at procedure scope are
+     emitted after the 'N_RBRAC' of the preceding function and before
+     the code of the procedure in which they are defined.  This is
+     exactly the same as types defined in the source file between the
+     two procedure bodies.  GDB over-compensates by placing all types in
+     block #1, the block for symbols of file scope.  This is true for
+     default, '-ansi' and '-traditional' compiler options.  (Bugs
+     gcc/1063, gdb/1066.)
 
-   * What ends the procedure scope?  Is it the proc block's `N_RBRAC'
-     or the next `N_FUN'?  (I believe its the first.)
+   * What ends the procedure scope?  Is it the proc block's 'N_RBRAC' or
+     the next 'N_FUN'?  (I believe its the first.)
 
 
 File: stabs.info,  Node: Stab Sections,  Next: GNU Free Documentation License,  Prev: Questions,  Up: Top
@@ -3795,70 +3772,70 @@ File: stabs.info,  Node: Stab Section Ba
 F.1 How to Embed Stabs in Sections
 ==================================
 
-The assembler creates two custom sections, a section named `.stab'
-which contains an array of fixed length structures, one struct per stab,
-and a section named `.stabstr' containing all the variable length
-strings that are referenced by stabs in the `.stab' section.  The byte
-order of the stabs binary data depends on the object file format.  For
-ELF, it matches the byte order of the ELF file itself, as determined
-from the `EI_DATA' field in the `e_ident' member of the ELF header.
-For SOM, it is always big-endian (is this true??? FIXME).  For COFF, it
-matches the byte order of the COFF headers.  The meaning of the fields
-is the same as for a.out (*note Symbol Table Format::), except that the
-`n_strx' field is relative to the strings for the current compilation
-unit (which can be found using the synthetic N_UNDF stab described
-below), rather than the entire string table.
+The assembler creates two custom sections, a section named '.stab' which
+contains an array of fixed length structures, one struct per stab, and a
+section named '.stabstr' containing all the variable length strings that
+are referenced by stabs in the '.stab' section.  The byte order of the
+stabs binary data depends on the object file format.  For ELF, it
+matches the byte order of the ELF file itself, as determined from the
+'EI_DATA' field in the 'e_ident' member of the ELF header.  For SOM, it
+is always big-endian (is this true???  FIXME). For COFF, it matches the
+byte order of the COFF headers.  The meaning of the fields is the same
+as for a.out (*note Symbol Table Format::), except that the 'n_strx'
+field is relative to the strings for the current compilation unit (which
+can be found using the synthetic N_UNDF stab described below), rather
+than the entire string table.
 
-   The first stab in the `.stab' section for each compilation unit is
+   The first stab in the '.stab' section for each compilation unit is
 synthetic, generated entirely by the assembler, with no corresponding
-`.stab' directive as input to the assembler.  This stab contains the
+'.stab' directive as input to the assembler.  This stab contains the
 following fields:
 
-`n_strx'
-     Offset in the `.stabstr' section to the source filename.
+'n_strx'
+     Offset in the '.stabstr' section to the source filename.
 
-`n_type'
-     `N_UNDF'.
+'n_type'
+     'N_UNDF'.
 
-`n_other'
+'n_other'
      Unused field, always zero.  This may eventually be used to hold
-     overflows from the count in the `n_desc' field.
+     overflows from the count in the 'n_desc' field.
 
-`n_desc'
+'n_desc'
      Count of upcoming symbols, i.e., the number of remaining stabs for
      this source file.
 
-`n_value'
-     Size of the string table fragment associated with this source
-     file, in bytes.
+'n_value'
+     Size of the string table fragment associated with this source file,
+     in bytes.
 
-   The `.stabstr' section always starts with a null byte (so that string
+   The '.stabstr' section always starts with a null byte (so that string
 offsets of zero reference a null string), followed by random length
 strings, each of which is null byte terminated.
 
-   The ELF section header for the `.stab' section has its `sh_link'
-member set to the section number of the `.stabstr' section, and the
-`.stabstr' section has its ELF section header `sh_type' member set to
-`SHT_STRTAB' to mark it as a string table.  SOM and COFF have no way of
+   The ELF section header for the '.stab' section has its 'sh_link'
+member set to the section number of the '.stabstr' section, and the
+'.stabstr' section has its ELF section header 'sh_type' member set to
+'SHT_STRTAB' to mark it as a string table.  SOM and COFF have no way of
 linking the sections together or marking them as string tables.
 
-   For COFF, the `.stab' and `.stabstr' sections may be simply
-concatenated by the linker.  GDB then uses the `n_desc' fields to
-figure out the extent of the original sections.  Similarly, the
-`n_value' fields of the header symbols are added together in order to
-get the actual position of the strings in a desired `.stabstr' section.
+   For COFF, the '.stab' and '.stabstr' sections may be simply
+concatenated by the linker.  GDB then uses the 'n_desc' fields to figure
+out the extent of the original sections.  Similarly, the 'n_value'
+fields of the header symbols are added together in order to get the
+actual position of the strings in a desired '.stabstr' section.
 Although this design obviates any need for the linker to relocate or
-otherwise manipulate `.stab' and `.stabstr' sections, it also requires
+otherwise manipulate '.stab' and '.stabstr' sections, it also requires
 some care to ensure that the offsets are calculated correctly.  For
-instance, if the linker were to pad in between the `.stabstr' sections
+instance, if the linker were to pad in between the '.stabstr' sections
 before concatenating, then the offsets to strings in the middle of the
-executable's `.stabstr' section would be wrong.
+executable's '.stabstr' section would be wrong.
 
    The GNU linker is able to optimize stabs information by merging
 duplicate strings and removing duplicate header file information (*note
 Include Files::).  When some versions of the GNU linker optimize stabs
-in sections, they remove the leading `N_UNDF' symbol and arranges for
-all the `n_strx' fields to be relative to the start of the `.stabstr'
+in sections, they remove the leading 'N_UNDF' symbol and arranges for
+all the 'n_strx' fields to be relative to the start of the '.stabstr'
 section.
 
 
@@ -3868,53 +3845,52 @@ F.2 Having the Linker Relocate Stabs in 
 ===========================================
 
 This section describes some Sun hacks for Stabs in ELF; it does not
-apply to COFF or SOM.  While {No value for `GDBN'} no longer supports
-this hack for Sun Stabs in ELF, this section is kept to document the
-issue.
+apply to COFF or SOM. While GDB no longer supports this hack for Sun
+Stabs in ELF, this section is kept to document the issue.
 
    To keep linking fast, you don't want the linker to have to relocate
-very many stabs.  Making sure this is done for `N_SLINE', `N_RBRAC',
-and `N_LBRAC' stabs is the most important thing (see the descriptions
-of those stabs for more information).  But Sun's stabs in ELF has taken
-this further, to make all addresses in the `n_value' field (functions
-and static variables) relative to the source file.  For the `N_SO'
+very many stabs.  Making sure this is done for 'N_SLINE', 'N_RBRAC', and
+'N_LBRAC' stabs is the most important thing (see the descriptions of
+those stabs for more information).  But Sun's stabs in ELF has taken
+this further, to make all addresses in the 'n_value' field (functions
+and static variables) relative to the source file.  For the 'N_SO'
 symbol itself, Sun simply omits the address.  To find the address of
-each section corresponding to a given source file, the compiler puts
-out symbols giving the address of each section for a given source file.
+each section corresponding to a given source file, the compiler puts out
+symbols giving the address of each section for a given source file.
 Since these are ELF (not stab) symbols, the linker relocates them
 correctly without having to touch the stabs section.  They are named
-`Bbss.bss' for the bss section, `Ddata.data' for the data section, and
-`Drodata.rodata' for the rodata section.  For the text section, there
-is no such symbol (but there should be, see below).  For an example of
-how these symbols work, *Note Stab Section Transformations::.  GCC does
-not provide these symbols; it instead relies on the stabs getting
-relocated.  Thus addresses which would normally be relative to
-`Bbss.bss', etc., are already relocated.  The Sun linker provided with
-Solaris 2.2 and earlier relocates stabs using normal ELF relocation
-information, as it would do for any section.  Sun has been threatening
-to kludge their linker to not do this (to speed up linking), even
-though the correct way to avoid having the linker do these relocations
-is to have the compiler no longer output relocatable values.  Last I
-heard they had been talked out of the linker kludge.  See Sun point
-patch 101052-01 and Sun bug 1142109.  With the Sun compiler this
-affects `S' symbol descriptor stabs (*note Statics::) and functions
-(*note Procedures::).  In the latter case, to adopt the clean solution
-(making the value of the stab relative to the start of the compilation
-unit), it would be necessary to invent a `Ttext.text' symbol, analogous
-to the `Bbss.bss', etc., symbols.  I recommend this rather than using a
-zero value and getting the address from the ELF symbols.
-
-   Finding the correct `Bbss.bss', etc., symbol is difficult, because
-the linker simply concatenates the `.stab' sections from each `.o' file
-without including any information about which part of a `.stab' section
-comes from which `.o' file.  The way GDB use to do this is to look for
-an ELF `STT_FILE' symbol which has the same name as the last component
-of the file name from the `N_SO' symbol in the stabs (for example, if
-the file name is `../../gdb/main.c', it looks for an ELF `STT_FILE'
-symbol named `main.c').  This loses if different files have the same
+'Bbss.bss' for the bss section, 'Ddata.data' for the data section, and
+'Drodata.rodata' for the rodata section.  For the text section, there is
+no such symbol (but there should be, see below).  For an example of how
+these symbols work, *Note Stab Section Transformations::.  GCC does not
+provide these symbols; it instead relies on the stabs getting relocated.
+Thus addresses which would normally be relative to 'Bbss.bss', etc., are
+already relocated.  The Sun linker provided with Solaris 2.2 and earlier
+relocates stabs using normal ELF relocation information, as it would do
+for any section.  Sun has been threatening to kludge their linker to not
+do this (to speed up linking), even though the correct way to avoid
+having the linker do these relocations is to have the compiler no longer
+output relocatable values.  Last I heard they had been talked out of the
+linker kludge.  See Sun point patch 101052-01 and Sun bug 1142109.  With
+the Sun compiler this affects 'S' symbol descriptor stabs (*note
+Statics::) and functions (*note Procedures::).  In the latter case, to
+adopt the clean solution (making the value of the stab relative to the
+start of the compilation unit), it would be necessary to invent a
+'Ttext.text' symbol, analogous to the 'Bbss.bss', etc., symbols.  I
+recommend this rather than using a zero value and getting the address
+from the ELF symbols.
+
+   Finding the correct 'Bbss.bss', etc., symbol is difficult, because
+the linker simply concatenates the '.stab' sections from each '.o' file
+without including any information about which part of a '.stab' section
+comes from which '.o' file.  The way GDB use to do this is to look for
+an ELF 'STT_FILE' symbol which has the same name as the last component
+of the file name from the 'N_SO' symbol in the stabs (for example, if
+the file name is '../../gdb/main.c', it looks for an ELF 'STT_FILE'
+symbol named 'main.c').  This loses if different files have the same
 name (they could be in different directories, a library could have been
 copied from one system to another, etc.).  It would be much cleaner to
-have the `Bbss.bss' symbols in the stabs themselves.  Having the linker
+have the 'Bbss.bss' symbols in the stabs themselves.  Having the linker
 relocate them there is no more work than having the linker relocate ELF
 symbols, and it solves the problem of having to associate the ELF and
 stab symbols.  However, no one has yet designed or implemented such a
@@ -3929,7 +3905,7 @@ Appendix G GNU Free Documentation Licens
                      Version 1.3, 3 November 2008
 
      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -3954,21 +3930,21 @@ Appendix G GNU Free Documentation Licens
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -3986,12 +3962,12 @@ Appendix G GNU Free Documentation Licens
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -4002,27 +3978,27 @@ Appendix G GNU Free Documentation Licens
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -4060,8 +4036,8 @@ Appendix G GNU Free Documentation Licens
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -4075,12 +4051,11 @@ Appendix G GNU Free Documentation Licens
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -4088,40 +4063,39 @@ Appendix G GNU Free Documentation Licens
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -4151,31 +4125,30 @@ Appendix G GNU Free Documentation Licens
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -4188,11 +4161,11 @@ Appendix G GNU Free Documentation Licens
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -4201,15 +4174,15 @@ Appendix G GNU Free Documentation Licens
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -4219,8 +4192,8 @@ Appendix G GNU Free Documentation Licens
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -4247,20 +4220,20 @@ Appendix G GNU Free Documentation Licens
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     a storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -4305,8 +4278,8 @@ Appendix G GNU Free Documentation Licens
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -4318,33 +4291,33 @@ Appendix G GNU Free Documentation Licens
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
+  10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
      proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
+  11. RELICENSING
 
      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
@@ -4374,7 +4347,6 @@ Appendix G GNU Free Documentation Licens
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -4391,7 +4363,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -4402,9 +4374,9 @@ combination of the three, merge those tw
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 
 File: stabs.info,  Node: Symbol Types Index,  Prev: GNU Free Documentation License,  Up: Top
@@ -4415,21 +4387,21 @@ Symbol Types Index
 [index]
 * Menu:
 
-* .bb:                                   Block Structure.      (line 26)
-* .be:                                   Block Structure.      (line 26)
+* .bb:                                   Block Structure.      (line 25)
+* .be:                                   Block Structure.      (line 25)
 * C_BCOMM:                               Common Blocks.        (line 10)
-* C_BINCL:                               Include Files.        (line 41)
-* C_BLOCK:                               Block Structure.      (line 26)
+* C_BINCL:                               Include Files.        (line 40)
+* C_BLOCK:                               Block Structure.      (line 25)
 * C_BSTAT:                               Statics.              (line 31)
 * C_DECL, for types:                     Typedefs.             (line  6)
 * C_ECOML:                               Common Blocks.        (line 17)
 * C_ECOMM:                               Common Blocks.        (line 10)
-* C_EINCL:                               Include Files.        (line 41)
+* C_EINCL:                               Include Files.        (line 40)
 * C_ENTRY:                               Alternate Entry Points.
                                                                (line  6)
 * C_ESTAT:                               Statics.              (line 31)
-* C_FILE:                                Source Files.         (line 61)
-* C_FUN:                                 Procedures.           (line 18)
+* C_FILE:                                Source Files.         (line 53)
+* C_FUN:                                 Procedures.           (line 17)
 * C_GSYM:                                Global Variables.     (line  6)
 * C_LSYM:                                Stack Variables.      (line 11)
 * C_PSYM:                                Parameters.           (line 12)
@@ -4438,14 +4410,18 @@ Symbol Types Index
 * C_STSYM:                               Statics.              (line 31)
 * N_BCOMM:                               Common Blocks.        (line 10)
 * N_BINCL:                               Include Files.        (line 17)
-* N_BROWS:                               N_BROWS.              (line  7)
+* N_BROWS:                               N_BROWS.              (line  6)
+* N_BROWS <1>:                           N_BROWS.              (line  7)
 * N_BSLINE:                              Line Numbers.         (line 12)
-* N_CATCH:                               N_CATCH.              (line  7)
-* N_DEFD:                                N_DEFD.               (line  7)
+* N_CATCH:                               N_CATCH.              (line  6)
+* N_CATCH <1>:                           N_CATCH.              (line  7)
+* N_DEFD:                                N_DEFD.               (line  6)
+* N_DEFD <1>:                            N_DEFD.               (line  7)
 * N_DSLINE:                              Line Numbers.         (line 12)
 * N_ECOML:                               Common Blocks.        (line 17)
 * N_ECOMM:                               Common Blocks.        (line 10)
-* N_EHDECL:                              N_EHDECL.             (line  7)
+* N_EHDECL:                              N_EHDECL.             (line  6)
+* N_EHDECL <1>:                          N_EHDECL.             (line  7)
 * N_EINCL:                               Include Files.        (line 17)
 * N_ENTRY:                               Alternate Entry Points.
                                                                (line  6)
@@ -4457,134 +4433,147 @@ Symbol Types Index
 * N_GSYM, for functions (Sun acc):       Procedures.           (line  6)
 * N_LBRAC:                               Block Structure.      (line  6)
 * N_LCSYM:                               Statics.              (line 12)
-* N_LENG:                                N_LENG.               (line  7)
+* N_LENG:                                N_LENG.               (line  6)
+* N_LENG <1>:                            N_LENG.               (line  7)
 * N_LSYM, for parameter:                 Local Variable Parameters.
                                                                (line 35)
 * N_LSYM, for stack variables:           Stack Variables.      (line 11)
 * N_LSYM, for types:                     Typedefs.             (line  6)
-* N_M2C:                                 N_M2C.                (line  7)
+* N_M2C:                                 N_M2C.                (line  6)
+* N_M2C <1>:                             N_M2C.                (line  7)
 * N_MAC_DEFINE:                          Macro define and undefine.
                                                                (line 11)
 * N_MAC_UNDEF:                           Macro define and undefine.
                                                                (line 14)
 * N_MAIN:                                Main Program.         (line  6)
-* N_MOD2:                                N_MOD2.               (line  7)
-* N_NBBSS:                               Gould.                (line  9)
-* N_NBDATA:                              Gould.                (line  8)
-* N_NBLCS:                               Gould.                (line 11)
-* N_NBSTS:                               Gould.                (line 10)
-* N_NBTEXT:                              Gould.                (line  7)
-* N_NOMAP:                               N_NOMAP.              (line  7)
-* N_NSYMS:                               N_NSYMS.              (line  7)
-* N_PC:                                  N_PC.                 (line  7)
+* N_MOD2:                                N_MOD2.               (line  6)
+* N_MOD2 <1>:                            N_MOD2.               (line  7)
+* N_NBBSS:                               Gould.                (line  8)
+* N_NBBSS <1>:                           Gould.                (line 11)
+* N_NBDATA:                              Gould.                (line  7)
+* N_NBDATA <1>:                          Gould.                (line 11)
+* N_NBLCS:                               Gould.                (line 10)
+* N_NBLCS <1>:                           Gould.                (line 11)
+* N_NBSTS:                               Gould.                (line  9)
+* N_NBSTS <1>:                           Gould.                (line 11)
+* N_NBTEXT:                              Gould.                (line  6)
+* N_NBTEXT <1>:                          Gould.                (line 11)
+* N_NOMAP:                               N_NOMAP.              (line  6)
+* N_NOMAP <1>:                           N_NOMAP.              (line  7)
+* N_NSYMS:                               N_NSYMS.              (line  6)
+* N_NSYMS <1>:                           N_NSYMS.              (line  7)
+* N_PC:                                  N_PC.                 (line  6)
+* N_PC <1>:                              N_PC.                 (line  7)
 * N_PSYM:                                Parameters.           (line 12)
 * N_RBRAC:                               Block Structure.      (line  6)
 * N_ROSYM:                               Statics.              (line 12)
 * N_RSYM:                                Register Variables.   (line  6)
 * N_RSYM, for parameters:                Register Parameters.  (line 15)
-* N_SCOPE:                               N_SCOPE.              (line  7)
+* N_SCOPE:                               N_SCOPE.              (line  6)
+* N_SCOPE <1>:                           N_SCOPE.              (line  7)
 * N_SLINE:                               Line Numbers.         (line  6)
 * N_SO:                                  Source Files.         (line  6)
 * N_SOL:                                 Include Files.        (line 11)
-* N_SSYM:                                N_SSYM.               (line  7)
+* N_SSYM:                                N_SSYM.               (line  6)
+* N_SSYM <1>:                            N_SSYM.               (line  7)
 * N_STSYM:                               Statics.              (line 12)
 * N_STSYM, for functions (Sun acc):      Procedures.           (line  6)
 
 
 
 Tag Table:
-Node: Top1367
-Node: Overview2414
-Node: Flow3829
-Node: Stabs Format5355
-Node: String Field6917
-Node: C Example12348
-Node: Assembly Code12893
-Node: Program Structure14864
-Node: Main Program15590
-Node: Source Files16151
-Node: Include Files18603
-Node: Line Numbers21268
-Node: Procedures22802
-Node: Nested Procedures28692
-Node: Block Structure29868
-Node: Alternate Entry Points31274
-Node: Constants32007
-Node: Variables35119
-Node: Stack Variables35807
-Node: Global Variables37508
-Node: Register Variables38664
-Node: Common Blocks39486
-Node: Statics40740
-Node: Based Variables43319
-Node: Parameters44704
-Node: Register Parameters46316
-Node: Local Variable Parameters48577
-Node: Reference Parameters51492
-Node: Conformant Arrays52112
-Node: Types52829
-Node: Builtin Types53776
-Node: Traditional Builtin Types54922
-Node: Traditional Integer Types55323
-Node: Traditional Other Types57631
-Node: Builtin Type Descriptors58545
-Node: Negative Type Numbers62045
-Node: Miscellaneous Types68400
-Node: Cross-References70286
-Node: Subranges71961
-Node: Arrays73200
-Node: Strings76425
-Node: Enumerations77487
-Node: Structures79872
-Node: Typedefs82579
-Node: Unions83903
-Node: Function Types85484
-Node: Macro define and undefine87066
-Node: Symbol Tables88643
-Node: Symbol Table Format89095
-Node: Transformations On Symbol Tables90543
-Node: Transformations On Static Variables91897
-Node: Transformations On Global Variables92633
-Node: Stab Section Transformations93876
-Node: Cplusplus95259
-Node: Class Names95842
-Node: Nested Symbols96587
-Node: Basic Cplusplus Types97433
-Node: Simple Classes98993
-Node: Class Instance103287
-Node: Methods104004
-Node: Method Type Descriptor106223
-Node: Member Type Descriptor107423
-Node: Protections108215
-Node: Method Modifiers111305
-Node: Virtual Methods112933
-Node: Inheritance116734
-Node: Virtual Base Classes120430
-Node: Static Members122674
-Node: Stab Types123144
-Node: Non-Stab Symbol Types123768
-Node: Stab Symbol Types125199
-Node: Symbol Descriptors129130
-Node: Type Descriptors131909
-Node: Expanded Reference135121
-Node: N_PC136539
-Node: N_NSYMS136907
-Node: N_NOMAP137148
-Node: N_M2C137454
-Node: N_BROWS137888
-Node: N_DEFD138171
-Node: N_EHDECL138628
-Node: N_MOD2138879
-Node: N_CATCH139117
-Node: N_SSYM139611
-Node: N_SCOPE139896
-Node: Gould140086
-Node: N_LENG141078
-Node: Questions141306
-Node: Stab Sections142950
-Node: Stab Section Basics143560
-Node: ELF Linker Relocation146901
-Node: GNU Free Documentation License150440
-Node: Symbol Types Index175619
+Node: Top1360
+Node: Overview2407
+Node: Flow3821
+Node: Stabs Format5347
+Node: String Field6909
+Node: C Example12338
+Node: Assembly Code12883
+Node: Program Structure14854
+Node: Main Program15580
+Node: Source Files16141
+Node: Include Files18583
+Node: Line Numbers21248
+Node: Procedures22782
+Node: Nested Procedures28673
+Node: Block Structure29849
+Node: Alternate Entry Points31253
+Node: Constants31986
+Node: Variables35097
+Node: Stack Variables35785
+Node: Global Variables37486
+Node: Register Variables38641
+Node: Common Blocks39463
+Node: Statics40716
+Node: Based Variables43295
+Node: Parameters44681
+Node: Register Parameters46292
+Node: Local Variable Parameters48552
+Node: Reference Parameters51467
+Node: Conformant Arrays52087
+Node: Types52805
+Node: Builtin Types53752
+Node: Traditional Builtin Types54898
+Node: Traditional Integer Types55299
+Node: Traditional Other Types57607
+Node: Builtin Type Descriptors58521
+Node: Negative Type Numbers62021
+Node: Miscellaneous Types68376
+Node: Cross-References70262
+Node: Subranges71937
+Node: Arrays73176
+Node: Strings76401
+Node: Enumerations77463
+Node: Structures79847
+Node: Typedefs82555
+Node: Unions83877
+Node: Function Types85458
+Node: Macro define and undefine87039
+Node: Symbol Tables88612
+Node: Symbol Table Format89064
+Node: Transformations On Symbol Tables90511
+Node: Transformations On Static Variables91865
+Node: Transformations On Global Variables92601
+Node: Stab Section Transformations93845
+Node: Cplusplus95228
+Node: Class Names95811
+Node: Nested Symbols96556
+Node: Basic Cplusplus Types97402
+Node: Simple Classes98962
+Node: Class Instance103255
+Node: Methods103972
+Node: Method Type Descriptor106191
+Node: Member Type Descriptor107391
+Node: Protections108183
+Node: Method Modifiers111273
+Node: Virtual Methods112901
+Node: Inheritance116701
+Node: Virtual Base Classes120397
+Node: Static Members122642
+Node: Stab Types123112
+Node: Non-Stab Symbol Types123736
+Node: Stab Symbol Types125119
+Node: Symbol Descriptors128902
+Node: Type Descriptors131681
+Node: Expanded Reference134893
+Node: N_PC136311
+Node: N_NSYMS136679
+Node: N_NOMAP136920
+Node: N_M2C137226
+Node: N_BROWS137659
+Node: N_DEFD137942
+Node: N_EHDECL138399
+Node: N_MOD2138650
+Node: N_CATCH138887
+Node: N_SSYM139381
+Node: N_SCOPE139666
+Node: Gould139856
+Node: N_LENG140849
+Node: Questions141077
+Node: Stab Sections142718
+Node: Stab Section Basics143328
+Node: ELF Linker Relocation146670
+Node: GNU Free Documentation License150189
+Node: Symbol Types Index175349
 
 End Tag Table
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/stabs.texinfo ./gdb/doc/stabs.texinfo
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doc/stabs.texinfo	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doc/stabs.texinfo	2017-03-06 01:49:07.000000000 +0000
@@ -3,6 +3,10 @@
 @setchapternewpage odd
 @settitle STABS
 
+@c man begin INCLUDE
+@include gdb-cfg.texi
+@c man end
+
 @c @finalout
 
 @c This is a dir.info fragment to support semi-automated addition of
@@ -13,7 +17,7 @@
 @end direntry
 
 @copying
-Copyright @copyright{} 1992-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 1992-2017 Free Software Foundation, Inc.
 Contributed by Cygnus Support.  Written by Julia Menapace, Jim Kingdon,
 and David MacKenzie.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doublest.c ./gdb/doublest.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doublest.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doublest.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Floating point routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "floatformat.h"
 #include "gdbtypes.h"
 #include <math.h>		/* ldexp */
+#include <algorithm>
 
 /* The odds that CHAR_BIT will be anything but 8 are low enough that I'm not
    going to bother with trying to muck around with whether it is defined in
@@ -183,7 +184,7 @@ convert_floatformat_to_doublest (const s
   /* For non-numbers, reuse libiberty's logic to find the correct
      format.  We do not lose any precision in this case by passing
      through a double.  */
-  kind = floatformat_classify (fmt, from);
+  kind = floatformat_classify (fmt, (const bfd_byte *) from);
   if (kind == float_infinite || kind == float_nan)
     {
       double dto;
@@ -255,7 +256,7 @@ convert_floatformat_to_doublest (const s
 
   while (mant_bits_left > 0)
     {
-      mant_bits = min (mant_bits_left, 32);
+      mant_bits = std::min (mant_bits_left, 32);
 
       mant = get_field (ufrom, order, fmt->totalsize, mant_off, mant_bits);
 
@@ -565,7 +566,7 @@ floatformat_classify (const struct float
   mant_zero = 1;
   while (mant_bits_left > 0)
     {
-      mant_bits = min (mant_bits_left, 32);
+      mant_bits = std::min (mant_bits_left, 32);
 
       mant = get_field (uval, order, fmt->totalsize, mant_off, mant_bits);
 
@@ -686,37 +687,55 @@ floatformat_mantissa (const struct float
    If the host and target formats agree, we just copy the raw data
    into the appropriate type of variable and return, letting the host
    increase precision as necessary.  Otherwise, we call the conversion
-   routine and let it do the dirty work.  */
+   routine and let it do the dirty work.  Note that even if the target
+   and host floating-point formats match, the length of the types
+   might still be different, so the conversion routines must make sure
+   to not overrun any buffers.  For example, on x86, long double is
+   the 80-bit extended precision type on both 32-bit and 64-bit ABIs,
+   but by default it is stored as 12 bytes on 32-bit, and 16 bytes on
+   64-bit, for alignment reasons.  See comment in store_typed_floating
+   for a discussion about zeroing out remaining bytes in the target
+   buffer.  */
 
 static const struct floatformat *host_float_format = GDB_HOST_FLOAT_FORMAT;
 static const struct floatformat *host_double_format = GDB_HOST_DOUBLE_FORMAT;
 static const struct floatformat *host_long_double_format
   = GDB_HOST_LONG_DOUBLE_FORMAT;
 
+/* See doublest.h.  */
+
+size_t
+floatformat_totalsize_bytes (const struct floatformat *fmt)
+{
+  return ((fmt->totalsize + FLOATFORMAT_CHAR_BIT - 1)
+	  / FLOATFORMAT_CHAR_BIT);
+}
+
 void
 floatformat_to_doublest (const struct floatformat *fmt,
 			 const void *in, DOUBLEST *out)
 {
   gdb_assert (fmt != NULL);
+
   if (fmt == host_float_format)
     {
-      float val;
+      float val = 0;
 
-      memcpy (&val, in, sizeof (val));
+      memcpy (&val, in, floatformat_totalsize_bytes (fmt));
       *out = val;
     }
   else if (fmt == host_double_format)
     {
-      double val;
+      double val = 0;
 
-      memcpy (&val, in, sizeof (val));
+      memcpy (&val, in, floatformat_totalsize_bytes (fmt));
       *out = val;
     }
   else if (fmt == host_long_double_format)
     {
-      long double val;
+      long double val = 0;
 
-      memcpy (&val, in, sizeof (val));
+      memcpy (&val, in, floatformat_totalsize_bytes (fmt));
       *out = val;
     }
   else
@@ -728,86 +747,44 @@ floatformat_from_doublest (const struct 
 			   const DOUBLEST *in, void *out)
 {
   gdb_assert (fmt != NULL);
+
   if (fmt == host_float_format)
     {
       float val = *in;
 
-      memcpy (out, &val, sizeof (val));
+      memcpy (out, &val, floatformat_totalsize_bytes (fmt));
     }
   else if (fmt == host_double_format)
     {
       double val = *in;
 
-      memcpy (out, &val, sizeof (val));
+      memcpy (out, &val, floatformat_totalsize_bytes (fmt));
     }
   else if (fmt == host_long_double_format)
     {
       long double val = *in;
 
-      memcpy (out, &val, sizeof (val));
+      memcpy (out, &val, floatformat_totalsize_bytes (fmt));
     }
   else
     convert_doublest_to_floatformat (fmt, in, out);
 }
 
 
-/* Return a floating-point format for a floating-point variable of
-   length LEN.  If no suitable floating-point format is found, an
-   error is thrown.
-
-   We need this functionality since information about the
-   floating-point format of a type is not always available to GDB; the
-   debug information typically only tells us the size of a
-   floating-point type.
-
-   FIXME: kettenis/2001-10-28: In many places, particularly in
-   target-dependent code, the format of floating-point types is known,
-   but not passed on by GDB.  This should be fixed.  */
-
-static const struct floatformat *
-floatformat_from_length (struct gdbarch *gdbarch, int len)
-{
-  const struct floatformat *format;
-
-  if (len * TARGET_CHAR_BIT == gdbarch_half_bit (gdbarch))
-    format = gdbarch_half_format (gdbarch)
-	       [gdbarch_byte_order (gdbarch)];
-  else if (len * TARGET_CHAR_BIT == gdbarch_float_bit (gdbarch))
-    format = gdbarch_float_format (gdbarch)
-	       [gdbarch_byte_order (gdbarch)];
-  else if (len * TARGET_CHAR_BIT == gdbarch_double_bit (gdbarch))
-    format = gdbarch_double_format (gdbarch)
-	       [gdbarch_byte_order (gdbarch)];
-  else if (len * TARGET_CHAR_BIT == gdbarch_long_double_bit (gdbarch))
-    format = gdbarch_long_double_format (gdbarch)
-	       [gdbarch_byte_order (gdbarch)];
-  /* On i386 the 'long double' type takes 96 bits,
-     while the real number of used bits is only 80,
-     both in processor and in memory.
-     The code below accepts the real bit size.  */ 
-  else if ((gdbarch_long_double_format (gdbarch) != NULL)
-	   && (len * TARGET_CHAR_BIT
-               == gdbarch_long_double_format (gdbarch)[0]->totalsize))
-    format = gdbarch_long_double_format (gdbarch)
-	       [gdbarch_byte_order (gdbarch)];
-  else
-    format = NULL;
-  if (format == NULL)
-    error (_("Unrecognized %d-bit floating-point type."),
-	   len * TARGET_CHAR_BIT);
-  return format;
-}
+/* Return the floating-point format for a floating-point variable of
+   type TYPE.  */
 
 const struct floatformat *
 floatformat_from_type (const struct type *type)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
+  const struct floatformat *fmt;
 
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
-  if (TYPE_FLOATFORMAT (type) != NULL)
-    return TYPE_FLOATFORMAT (type)[gdbarch_byte_order (gdbarch)];
-  else
-    return floatformat_from_length (gdbarch, TYPE_LENGTH (type));
+  gdb_assert (TYPE_FLOATFORMAT (type));
+  fmt = TYPE_FLOATFORMAT (type)[gdbarch_byte_order (gdbarch)];
+  gdb_assert (TYPE_LENGTH (type) >= floatformat_totalsize_bytes (fmt));
+  return fmt;
 }
 
 /* Extract a floating-point number of type TYPE from a target-order
@@ -886,7 +863,8 @@ convert_typed_floating (const void *from
          comment in store_typed_floating for a discussion about
          zeroing out remaining bytes in the target buffer.  */
       memset (to, 0, TYPE_LENGTH (to_type));
-      memcpy (to, from, min (TYPE_LENGTH (from_type), TYPE_LENGTH (to_type)));
+      memcpy (to, from, std::min (TYPE_LENGTH (from_type),
+				  TYPE_LENGTH (to_type)));
     }
   else
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doublest.h ./gdb/doublest.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/doublest.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/doublest.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Floating point definitions for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -89,6 +89,10 @@ extern const char *floatformat_mantissa 
 
 const struct floatformat *floatformat_from_type (const struct type *type);
 
+/* Return the floatformat's total size in host bytes.  */
+
+extern size_t floatformat_totalsize_bytes (const struct floatformat *fmt);
+
 extern DOUBLEST extract_typed_floating (const void *addr,
 					const struct type *type);
 extern void store_typed_floating (void *addr, const struct type *type,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dsrec.c ./gdb/dsrec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dsrec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dsrec.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,316 +0,0 @@
-/* S-record download support for GDB, the GNU debugger.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "serial.h"
-#include "srec.h"
-#include <sys/time.h>
-#include <time.h>
-#include "gdb_bfd.h"
-
-extern int remote_debug;
-
-static int make_srec (char *srec, CORE_ADDR targ_addr, bfd * abfd,
-		      asection * sect, int sectoff, int *maxrecsize,
-		      int flags);
-
-/* Download an executable by converting it to S records.  DESC is a
-   `struct serial *' to send the data to.  FILE is the name of the
-   file to be loaded.  LOAD_OFFSET is the offset into memory to load
-   data into.  It is usually specified by the user and is useful with
-   the a.out file format.  MAXRECSIZE is the length in chars of the
-   largest S-record the host can accomodate.  This is measured from
-   the starting `S' to the last char of the checksum.  FLAGS is
-   various random flags, and HASHMARK is non-zero to cause a `#' to be
-   printed out for each record loaded.  WAITACK, if non-NULL, is a
-   function that waits for an acknowledgement after each S-record, and
-   returns non-zero if the ack is read correctly.  */
-
-void
-load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
-	   int maxrecsize,
-	   int flags, int hashmark, int (*waitack) (void))
-{
-  bfd *abfd;
-  asection *s;
-  char *srec;
-  int i;
-  int reclen;
-  struct timeval start_time, end_time;
-  unsigned long data_count = 0;
-  struct cleanup *cleanup;
-
-  srec = (char *) alloca (maxrecsize + 1);
-
-  abfd = gdb_bfd_open (file, NULL, -1);
-  if (!abfd)
-    {
-      printf_filtered (_("Unable to open file %s\n"), file);
-      return;
-    }
-
-  cleanup = make_cleanup_bfd_unref (abfd);
-  if (bfd_check_format (abfd, bfd_object) == 0)
-    {
-      printf_filtered (_("File is not an object file\n"));
-      do_cleanups (cleanup);
-      return;
-    }
-
-  gettimeofday (&start_time, NULL);
-
-  /* Write a type 0 header record. no data for a type 0, and there
-     is no data, so len is 0.  */
-
-  reclen = maxrecsize;
-  make_srec (srec, 0, NULL, (asection *) 1, 0, &reclen, flags);
-  if (remote_debug)
-    {
-      srec[reclen] = '\0';
-      puts_debug ("sent -->", srec, "<--");
-    }
-  serial_write (desc, srec, reclen);
-
-  for (s = abfd->sections; s; s = s->next)
-    if (s->flags & SEC_LOAD)
-      {
-	int numbytes;
-
-	bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
-	bfd_size_type size = bfd_get_section_size (s);
-	char *section_name = (char *) bfd_get_section_name (abfd, s);
-	/* Both GDB and BFD have mechanisms for printing addresses.
-           In the below, GDB's is used so that the address is
-           consistent with the rest of GDB.  BFD's printf_vma() could
-           have also been used.  cagney 1999-09-01 */
-	printf_filtered ("%s\t: %s .. %s  ",
-			 section_name,
-			 paddress (target_gdbarch (), addr),
-			 paddress (target_gdbarch (), addr + size));
-	gdb_flush (gdb_stdout);
-
-	data_count += size;
-
-	for (i = 0; i < size; i += numbytes)
-	  {
-	    reclen = maxrecsize;
-	    numbytes = make_srec (srec, (CORE_ADDR) (addr + i), abfd, s,
-				  i, &reclen, flags);
-
-	    if (remote_debug)
-	      {
-		srec[reclen] = '\0';
-		puts_debug ("sent -->", srec, "<--");
-	      }
-
-	    /* Repeatedly send the S-record until a good
-	       acknowledgement is sent back.  */
-	    do
-	      {
-		serial_write (desc, srec, reclen);
-		if (deprecated_ui_load_progress_hook)
-		  if (deprecated_ui_load_progress_hook (section_name,
-							(unsigned long) i))
-		    error (_("Canceled the download"));
-	      }
-	    while (waitack != NULL && !waitack ());
-
-	    if (hashmark)
-	      {
-		putchar_unfiltered ('#');
-		gdb_flush (gdb_stdout);
-	      }
-	  }			/* Per-packet (or S-record) loop.  */
-
-	if (deprecated_ui_load_progress_hook)
-	  if (deprecated_ui_load_progress_hook (section_name,
-						(unsigned long) i))
-	    error (_("Canceled the download"));
-	putchar_unfiltered ('\n');
-      }
-
-  if (hashmark)
-    putchar_unfiltered ('\n');
-
-  gettimeofday (&end_time, NULL);
-
-  /* Write a terminator record.  */
-
-  reclen = maxrecsize;
-  make_srec (srec, abfd->start_address, NULL, NULL, 0, &reclen, flags);
-
-  if (remote_debug)
-    {
-      srec[reclen] = '\0';
-      puts_debug ("sent -->", srec, "<--");
-    }
-
-  serial_write (desc, srec, reclen);
-
-  /* Some monitors need these to wake up properly.  (Which ones? -sts)  */
-  serial_write (desc, "\r\r", 2);
-  if (remote_debug)
-    puts_debug ("sent -->", "\r\r", "<---");
-
-  serial_flush_input (desc);
-
-  print_transfer_performance (gdb_stdout, data_count, 0,
-			      &start_time, &end_time);
-  do_cleanups (cleanup);
-}
-
-/*
- * make_srec -- make an srecord.  This writes each line, one at a
- *      time, each with it's own header and trailer line.
- *      An srecord looks like this:
- *
- * byte count-+     address
- * start ---+ |        |       data        +- checksum
- *          | |        |                   |
- *        S01000006F6B692D746573742E73726563E4
- *        S315000448600000000000000000FC00005900000000E9
- *        S31A0004000023C1400037DE00F023604000377B009020825000348D
- *        S30B0004485A0000000000004E
- *        S70500040000F6
- *
- *      S<type><length><address><data><checksum>
- *
- *      Where
- *      - length
- *        is the number of bytes following upto the checksum.  Note
- *        that this is not the number of chars following, since it
- *        takes two chars to represent a byte.
- *      - type
- *        is one of:
- *        0) header record
- *        1) two byte address data record
- *        2) three byte address data record
- *        3) four byte address data record
- *        7) four byte address termination record
- *        8) three byte address termination record
- *        9) two byte address termination record
- *       
- *      - address
- *        is the start address of the data following, or in the case of
- *        a termination record, the start address of the image
- *      - data
- *        is the data.
- *      - checksum
- *        is the sum of all the raw byte data in the record, from the length
- *        upwards, modulo 256 and subtracted from 255.
- *
- * This routine returns the length of the S-record.
- *
- */
-
-static int
-make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
-	   int sectoff, int *maxrecsize, int flags)
-{
-  unsigned char checksum;
-  int tmp;
-  static const char hextab[] = "0123456789ABCDEF";
-  static const char data_code_table[] = "123";
-  static const char term_code_table[] = "987";
-  static const char header_code_table[] = "000";
-  char const *code_table;
-  int addr_size;
-  int payload_size;
-  char *binbuf;
-  char *p;
-
-  if (sect)
-    {
-      tmp = flags;		/* Data or header record */
-      code_table = abfd ? data_code_table : header_code_table;
-      binbuf = alloca (*maxrecsize / 2);
-    }
-  else
-    {
-      tmp = flags >> SREC_TERM_SHIFT;	/* Term record */
-      code_table = term_code_table;
-      binbuf = NULL;
-    }
-
-  if ((tmp & SREC_2_BYTE_ADDR) && (targ_addr <= 0xffff))
-    addr_size = 2;
-  else if ((tmp & SREC_3_BYTE_ADDR) && (targ_addr <= 0xffffff))
-    addr_size = 3;
-  else if (tmp & SREC_4_BYTE_ADDR)
-    addr_size = 4;
-  else
-    internal_error (__FILE__, __LINE__,
-		    _("make_srec:  Bad address (%s), or bad flags (0x%x)."),
-		    paddress (target_gdbarch (), targ_addr), flags);
-
-  /* Now that we know the address size, we can figure out how much
-     data this record can hold.  */
-
-  if (sect && abfd)
-    {
-      payload_size = (*maxrecsize - (1 + 1 + 2 + addr_size * 2 + 2)) / 2;
-      payload_size = min (payload_size, bfd_get_section_size (sect) - sectoff);
-
-      bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
-    }
-  else
-    payload_size = 0;		/* Term or header packets have no payload.  */
-
-  /* Output the header.  */
-  snprintf (srec, (*maxrecsize) + 1, "S%c%02X%0*X",
-	    code_table[addr_size - 2],
-	    addr_size + payload_size + 1,
-	    addr_size * 2, (int) targ_addr);
-
-  /* Note that the checksum is calculated on the raw data, not the
-     hexified data.  It includes the length, address and the data
-     portions of the packet.  */
-
-  checksum = 0;
-
-  checksum += (payload_size + addr_size + 1	/* Packet length */
-	       + (targ_addr & 0xff)		/* Address...  */
-	       + ((targ_addr >> 8) & 0xff)
-	       + ((targ_addr >> 16) & 0xff)
-	       + ((targ_addr >> 24) & 0xff));
-
-  /* NOTE: cagney/2003-08-10: The equation is old.  Check that the
-     recent snprintf changes match that equation.  */
-  gdb_assert (strlen (srec) == 1 + 1 + 2 + addr_size * 2);
-  p = srec + 1 + 1 + 2 + addr_size * 2;
-
-  /* Build the Srecord.  */
-  for (tmp = 0; tmp < payload_size; tmp++)
-    {
-      unsigned char k;
-
-      k = binbuf[tmp];
-      *p++ = hextab[k >> 4];
-      *p++ = hextab[k & 0xf];
-      checksum += k;
-    }
-
-  checksum = ~checksum;
-
-  *p++ = hextab[checksum >> 4];
-  *p++ = hextab[checksum & 0xf];
-  *p++ = '\r';
-
-  *maxrecsize = p - srec;
-  return payload_size;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dtrace-probe.c ./gdb/dtrace-probe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dtrace-probe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dtrace-probe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DTrace probe support for GDB.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    Contributed by Oracle, Inc.
 
@@ -386,8 +386,8 @@ dtrace_process_dof_probe (struct objfile
     {
       uint32_t probe_offset
 	= ((uint32_t *) offtab)[DOF_UINT (dof, probe->dofpr_offidx) + i];
-      struct dtrace_probe *ret
-	= obstack_alloc (&objfile->per_bfd->storage_obstack, sizeof (*ret));
+      struct dtrace_probe *ret =
+	XOBNEW (&objfile->per_bfd->storage_obstack, struct dtrace_probe);
 
       ret->p.pops = &dtrace_probe_ops;
       ret->p.arch = gdbarch;
@@ -413,7 +413,7 @@ dtrace_process_dof_probe (struct objfile
       for (j = 0; j < ret->probe_argc; j++)
 	{
 	  struct dtrace_probe_arg arg;
-	  struct expression *expr = NULL;
+	  expression_up expr;
 
 	  /* Set arg.expr to ensure all fields in expr are initialized and
 	     the compiler will not warn when arg is used.  */
@@ -434,7 +434,6 @@ dtrace_process_dof_probe (struct objfile
 	    }
 	  CATCH (ex, RETURN_MASK_ERROR)
 	    {
-	      expr = NULL;
 	    }
 	  END_CATCH
 
@@ -463,8 +462,6 @@ static void
 dtrace_process_dof (asection *sect, struct objfile *objfile,
 		    VEC (probe_p) **probesp, struct dtrace_dof_hdr *dof)
 {
-  bfd *abfd = objfile->obfd;
-  int size = bfd_get_arch_size (abfd) / 8;
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct dtrace_dof_sect *section;
   int i;
@@ -519,6 +516,14 @@ dtrace_process_dof (asection *sect, stru
 	unsigned int entsize = DOF_UINT (dof, probes_s->dofs_entsize);
 	int num_probes;
 
+	if (DOF_UINT (dof, section->dofs_size)
+	    < sizeof (struct dtrace_dof_provider))
+	  {
+	    /* The section is smaller than expected, so do not use it.
+	       This has been observed on x86-solaris 10.  */
+	    goto invalid_dof_data;
+	  }
+
 	/* Very, unlikely, but could crash gdb if not handled
 	   properly.  */
 	if (entsize == 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dummy-frame.c ./gdb/dummy-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dummy-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dummy-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code dealing with dummy stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -128,9 +128,9 @@ remove_dummy_frame (struct dummy_frame *
 static int
 pop_dummy_frame_bpt (struct breakpoint *b, void *dummy_voidp)
 {
-  struct dummy_frame *dummy = dummy_voidp;
+  struct dummy_frame *dummy = (struct dummy_frame *) dummy_voidp;
 
-  if (b->thread == pid_to_thread_id (dummy->id.ptid)
+  if (b->thread == ptid_to_global_thread_id (dummy->id.ptid)
       && b->disposition == disp_del && frame_id_eq (b->frame_id, dummy->id.id))
     {
       while (b->related_breakpoint != b)
@@ -241,7 +241,7 @@ register_dummy_frame_dtor (struct frame_
   dp = lookup_dummy_frame (&id);
   gdb_assert (dp != NULL);
   d = *dp;
-  list = xmalloc (sizeof (*list));
+  list = XNEW (struct dummy_frame_dtor_list);
   list->next = d->dtor_list;
   d->dtor_list = list;
   list->dtor = dtor;
@@ -337,7 +337,8 @@ dummy_frame_prev_register (struct frame_
 			   void **this_prologue_cache,
 			   int regnum)
 {
-  struct dummy_frame_cache *cache = (*this_prologue_cache);
+  struct dummy_frame_cache *cache
+    = (struct dummy_frame_cache *) *this_prologue_cache;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct value *reg_val;
 
@@ -367,7 +368,8 @@ dummy_frame_this_id (struct frame_info *
 		     struct frame_id *this_id)
 {
   /* The dummy-frame sniffer always fills in the cache.  */
-  struct dummy_frame_cache *cache = (*this_prologue_cache);
+  struct dummy_frame_cache *cache
+    = (struct dummy_frame_cache *) *this_prologue_cache;
 
   gdb_assert (cache != NULL);
   (*this_id) = cache->this_id;
@@ -407,14 +409,11 @@ maintenance_print_dummy_frames (char *ar
     fprint_dummy_frames (gdb_stdout);
   else
     {
-      struct cleanup *cleanups;
-      struct ui_file *file = gdb_fopen (args, "w");
+      stdio_file file;
 
-      if (file == NULL)
+      if (!file.open (args, "w"))
 	perror_with_name (_("maintenance print dummy-frames"));
-      cleanups = make_cleanup_ui_file_delete (file);
-      fprint_dummy_frames (file);    
-      do_cleanups (cleanups);
+      fprint_dummy_frames (&file);
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dummy-frame.h ./gdb/dummy-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dummy-frame.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dummy-frame.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code dealing with dummy stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-valprint.c ./gdb/d-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/d-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/d-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing D values for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,10 +28,10 @@
    TYPE is a dynamic array, non-zero otherwise.  */
 
 static int
-dynamic_array_type (struct type *type, const gdb_byte *valaddr,
-		    int embedded_offset, CORE_ADDR address,
+dynamic_array_type (struct type *type,
+		    LONGEST embedded_offset, CORE_ADDR address,
 		    struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct value *val,
 		    const struct value_print_options *options)
 {
   if (TYPE_NFIELDS (type) == 2
@@ -48,6 +48,7 @@ dynamic_array_type (struct type *type, c
       struct type *ptr_type;
       struct value *ival;
       int length;
+      const gdb_byte *valaddr = value_contents_for_printing (val);
 
       length = unpack_field_as_long (type, valaddr + embedded_offset, 0);
 
@@ -63,7 +64,6 @@ dynamic_array_type (struct type *type, c
       true_type = value_type (ival);
 
       d_val_print (true_type,
-		   value_contents_for_printing (ival),
 		   value_embedded_offset (ival), addr,
 		   stream, recurse + 1, ival, options);
       return 0;
@@ -73,23 +73,23 @@ dynamic_array_type (struct type *type, c
 
 /* Implements the la_val_print routine for language D.  */
 void
-d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+d_val_print (struct type *type, int embedded_offset,
              CORE_ADDR address, struct ui_file *stream, int recurse,
-	     const struct value *val,
+	     struct value *val,
              const struct value_print_options *options)
 {
   int ret;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
       case TYPE_CODE_STRUCT:
-        ret = dynamic_array_type (type, valaddr, embedded_offset, address,
+	ret = dynamic_array_type (type, embedded_offset, address,
 				  stream, recurse, val, options);
 	if (ret == 0)
 	  break;
       default:
-	c_val_print (type, valaddr, embedded_offset, address, stream,
+	c_val_print (type, embedded_offset, address, stream,
 		     recurse, val, options);
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2expr.c ./gdb/dwarf2expr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2expr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2expr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DWARF 2 Expression Evaluator.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin (dan@dberlin.org)
 
@@ -26,11 +26,7 @@
 #include "gdbcore.h"
 #include "dwarf2.h"
 #include "dwarf2expr.h"
-
-/* Local prototypes.  */
-
-static void execute_stack_op (struct dwarf_expr_context *,
-			      const gdb_byte *, const gdb_byte *);
+#include "dwarf2loc.h"
 
 /* Cookie for gdbarch data.  */
 
@@ -61,27 +57,28 @@ dwarf_gdbarch_types_init (struct gdbarch
    unspecified in the DWARF spec.  Only certain sizes are
    supported.  */
 
-static struct type *
-dwarf_expr_address_type (struct dwarf_expr_context *ctx)
+struct type *
+dwarf_expr_context::address_type () const
 {
-  struct dwarf_gdbarch_types *types = gdbarch_data (ctx->gdbarch,
-						    dwarf_arch_cookie);
+  struct dwarf_gdbarch_types *types
+    = (struct dwarf_gdbarch_types *) gdbarch_data (this->gdbarch,
+						   dwarf_arch_cookie);
   int ndx;
 
-  if (ctx->addr_size == 2)
+  if (this->addr_size == 2)
     ndx = 0;
-  else if (ctx->addr_size == 4)
+  else if (this->addr_size == 4)
     ndx = 1;
-  else if (ctx->addr_size == 8)
+  else if (this->addr_size == 8)
     ndx = 2;
   else
     error (_("Unsupported address size in DWARF expressions: %d bits"),
-	   8 * ctx->addr_size);
+	   8 * this->addr_size);
 
   if (types->dw_types[ndx] == NULL)
     types->dw_types[ndx]
-      = arch_integer_type (ctx->gdbarch,
-			   8 * ctx->addr_size,
+      = arch_integer_type (this->gdbarch,
+			   8 * this->addr_size,
 			   0, "<signed DWARF address type>");
 
   return types->dw_types[ndx];
@@ -89,109 +86,90 @@ dwarf_expr_address_type (struct dwarf_ex
 
 /* Create a new context for the expression evaluator.  */
 
-struct dwarf_expr_context *
-new_dwarf_expr_context (void)
-{
-  struct dwarf_expr_context *retval;
+dwarf_expr_context::dwarf_expr_context ()
+: stack (NULL),
+  stack_len (0),
+  stack_allocated (10),
+  gdbarch (NULL),
+  addr_size (0),
+  ref_addr_size (0),
+  offset (0),
+  recursion_depth (0),
+  max_recursion_depth (0x100),
+  location (DWARF_VALUE_MEMORY),
+  len (0),
+  data (NULL),
+  initialized (0),
+  num_pieces (0),
+  pieces (NULL)
+{
+  this->stack = XNEWVEC (struct dwarf_stack_value, this->stack_allocated);
+}
+
+/* Clean up a dwarf_expr_context.  */
 
-  retval = xcalloc (1, sizeof (struct dwarf_expr_context));
-  retval->stack_len = 0;
-  retval->stack_allocated = 10;
-  retval->stack = xmalloc (retval->stack_allocated
-			   * sizeof (struct dwarf_stack_value));
-  retval->num_pieces = 0;
-  retval->pieces = 0;
-  retval->max_recursion_depth = 0x100;
-  return retval;
-}
-
-/* Release the memory allocated to CTX.  */
-
-void
-free_dwarf_expr_context (struct dwarf_expr_context *ctx)
+dwarf_expr_context::~dwarf_expr_context ()
 {
-  xfree (ctx->stack);
-  xfree (ctx->pieces);
-  xfree (ctx);
+  xfree (this->stack);
+  xfree (this->pieces);
 }
 
-/* Helper for make_cleanup_free_dwarf_expr_context.  */
-
-static void
-free_dwarf_expr_context_cleanup (void *arg)
-{
-  free_dwarf_expr_context (arg);
-}
-
-/* Return a cleanup that calls free_dwarf_expr_context.  */
-
-struct cleanup *
-make_cleanup_free_dwarf_expr_context (struct dwarf_expr_context *ctx)
-{
-  return make_cleanup (free_dwarf_expr_context_cleanup, ctx);
-}
-
-/* Expand the memory allocated to CTX's stack to contain at least
+/* Expand the memory allocated stack to contain at least
    NEED more elements than are currently used.  */
 
-static void
-dwarf_expr_grow_stack (struct dwarf_expr_context *ctx, size_t need)
+void
+dwarf_expr_context::grow_stack (size_t need)
 {
-  if (ctx->stack_len + need > ctx->stack_allocated)
+  if (this->stack_len + need > this->stack_allocated)
     {
-      size_t newlen = ctx->stack_len + need + 10;
+      size_t newlen = this->stack_len + need + 10;
 
-      ctx->stack = xrealloc (ctx->stack,
-			     newlen * sizeof (struct dwarf_stack_value));
-      ctx->stack_allocated = newlen;
+      this->stack = XRESIZEVEC (struct dwarf_stack_value, this->stack, newlen);
+      this->stack_allocated = newlen;
     }
 }
 
-/* Push VALUE onto CTX's stack.  */
+/* Push VALUE onto the stack.  */
 
-static void
-dwarf_expr_push (struct dwarf_expr_context *ctx, struct value *value,
-		 int in_stack_memory)
+void
+dwarf_expr_context::push (struct value *value, int in_stack_memory)
 {
   struct dwarf_stack_value *v;
 
-  dwarf_expr_grow_stack (ctx, 1);
-  v = &ctx->stack[ctx->stack_len++];
+  grow_stack (1);
+  v = &this->stack[this->stack_len++];
   v->value = value;
   v->in_stack_memory = in_stack_memory;
 }
 
-/* Push VALUE onto CTX's stack.  */
+/* Push VALUE onto the stack.  */
 
 void
-dwarf_expr_push_address (struct dwarf_expr_context *ctx, CORE_ADDR value,
-			 int in_stack_memory)
+dwarf_expr_context::push_address (CORE_ADDR value, int in_stack_memory)
 {
-  dwarf_expr_push (ctx,
-		   value_from_ulongest (dwarf_expr_address_type (ctx), value),
-		   in_stack_memory);
+  push (value_from_ulongest (address_type (), value), in_stack_memory);
 }
 
-/* Pop the top item off of CTX's stack.  */
+/* Pop the top item off of the stack.  */
 
-static void
-dwarf_expr_pop (struct dwarf_expr_context *ctx)
+void
+dwarf_expr_context::pop ()
 {
-  if (ctx->stack_len <= 0)
+  if (this->stack_len <= 0)
     error (_("dwarf expression stack underflow"));
-  ctx->stack_len--;
+  this->stack_len--;
 }
 
-/* Retrieve the N'th item on CTX's stack.  */
+/* Retrieve the N'th item on the stack.  */
 
 struct value *
-dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
+dwarf_expr_context::fetch (int n)
 {
-  if (ctx->stack_len <= n)
+  if (this->stack_len <= n)
      error (_("Asked for position %d of stack, "
 	      "stack only has %d elements on it."),
-	    n, ctx->stack_len);
-  return ctx->stack[ctx->stack_len - (1 + n)].value;
+	    n, this->stack_len);
+  return this->stack[this->stack_len - (1 + n)].value;
 }
 
 /* Require that TYPE be an integral type; throw an exception if not.  */
@@ -249,13 +227,13 @@ get_signed_type (struct gdbarch *gdbarch
     }
 }
 
-/* Retrieve the N'th item on CTX's stack, converted to an address.  */
+/* Retrieve the N'th item on the stack, converted to an address.  */
 
 CORE_ADDR
-dwarf_expr_fetch_address (struct dwarf_expr_context *ctx, int n)
+dwarf_expr_context::fetch_address (int n)
 {
-  struct value *result_val = dwarf_expr_fetch (ctx, n);
-  enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch);
+  struct value *result_val = fetch (n);
+  enum bfd_endian byte_order = gdbarch_byte_order (this->gdbarch);
   ULONGEST result;
 
   dwarf_require_integral (value_type (result_val));
@@ -269,102 +247,99 @@ dwarf_expr_fetch_address (struct dwarf_e
      extract_unsigned_integer() will not produce a correct
      result.  Make sure we invoke gdbarch_integer_to_address()
      for those architectures which require it.  */
-  if (gdbarch_integer_to_address_p (ctx->gdbarch))
+  if (gdbarch_integer_to_address_p (this->gdbarch))
     {
-      gdb_byte *buf = alloca (ctx->addr_size);
-      struct type *int_type = get_unsigned_type (ctx->gdbarch,
+      gdb_byte *buf = (gdb_byte *) alloca (this->addr_size);
+      struct type *int_type = get_unsigned_type (this->gdbarch,
 						 value_type (result_val));
 
-      store_unsigned_integer (buf, ctx->addr_size, byte_order, result);
-      return gdbarch_integer_to_address (ctx->gdbarch, int_type, buf);
+      store_unsigned_integer (buf, this->addr_size, byte_order, result);
+      return gdbarch_integer_to_address (this->gdbarch, int_type, buf);
     }
 
   return (CORE_ADDR) result;
 }
 
-/* Retrieve the in_stack_memory flag of the N'th item on CTX's stack.  */
+/* Retrieve the in_stack_memory flag of the N'th item on the stack.  */
 
 int
-dwarf_expr_fetch_in_stack_memory (struct dwarf_expr_context *ctx, int n)
+dwarf_expr_context::fetch_in_stack_memory (int n)
 {
-  if (ctx->stack_len <= n)
+  if (this->stack_len <= n)
      error (_("Asked for position %d of stack, "
 	      "stack only has %d elements on it."),
-	    n, ctx->stack_len);
-  return ctx->stack[ctx->stack_len - (1 + n)].in_stack_memory;
+	    n, this->stack_len);
+  return this->stack[this->stack_len - (1 + n)].in_stack_memory;
 }
 
 /* Return true if the expression stack is empty.  */
 
-static int
-dwarf_expr_stack_empty_p (struct dwarf_expr_context *ctx)
+int
+dwarf_expr_context::stack_empty_p () const
 {
-  return ctx->stack_len == 0;
+  return this->stack_len == 0;
 }
 
-/* Add a new piece to CTX's piece list.  */
-static void
-add_piece (struct dwarf_expr_context *ctx, ULONGEST size, ULONGEST offset)
+/* Add a new piece to the dwarf_expr_context's piece list.  */
+void
+dwarf_expr_context::add_piece (ULONGEST size, ULONGEST offset)
 {
   struct dwarf_expr_piece *p;
 
-  ctx->num_pieces++;
+  this->num_pieces++;
 
-  ctx->pieces = xrealloc (ctx->pieces,
-			  (ctx->num_pieces
-			   * sizeof (struct dwarf_expr_piece)));
+  this->pieces
+    = XRESIZEVEC (struct dwarf_expr_piece, this->pieces, this->num_pieces);
 
-  p = &ctx->pieces[ctx->num_pieces - 1];
-  p->location = ctx->location;
+  p = &this->pieces[this->num_pieces - 1];
+  p->location = this->location;
   p->size = size;
   p->offset = offset;
 
   if (p->location == DWARF_VALUE_LITERAL)
     {
-      p->v.literal.data = ctx->data;
-      p->v.literal.length = ctx->len;
+      p->v.literal.data = this->data;
+      p->v.literal.length = this->len;
     }
-  else if (dwarf_expr_stack_empty_p (ctx))
+  else if (stack_empty_p ())
     {
       p->location = DWARF_VALUE_OPTIMIZED_OUT;
       /* Also reset the context's location, for our callers.  This is
 	 a somewhat strange approach, but this lets us avoid setting
 	 the location to DWARF_VALUE_MEMORY in all the individual
 	 cases in the evaluator.  */
-      ctx->location = DWARF_VALUE_OPTIMIZED_OUT;
+      this->location = DWARF_VALUE_OPTIMIZED_OUT;
     }
   else if (p->location == DWARF_VALUE_MEMORY)
     {
-      p->v.mem.addr = dwarf_expr_fetch_address (ctx, 0);
-      p->v.mem.in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
+      p->v.mem.addr = fetch_address (0);
+      p->v.mem.in_stack_memory = fetch_in_stack_memory (0);
     }
   else if (p->location == DWARF_VALUE_IMPLICIT_POINTER)
     {
-      p->v.ptr.die.sect_off = ctx->len;
-      p->v.ptr.offset = value_as_long (dwarf_expr_fetch (ctx, 0));
+      p->v.ptr.die.sect_off = this->len;
+      p->v.ptr.offset = value_as_long (fetch (0));
     }
   else if (p->location == DWARF_VALUE_REGISTER)
-    p->v.regno = value_as_long (dwarf_expr_fetch (ctx, 0));
+    p->v.regno = value_as_long (fetch (0));
   else
     {
-      p->v.value = dwarf_expr_fetch (ctx, 0);
+      p->v.value = fetch (0);
     }
 }
 
-/* Evaluate the expression at ADDR (LEN bytes long) using the context
-   CTX.  */
+/* Evaluate the expression at ADDR (LEN bytes long).  */
 
 void
-dwarf_expr_eval (struct dwarf_expr_context *ctx, const gdb_byte *addr,
-		 size_t len)
+dwarf_expr_context::eval (const gdb_byte *addr, size_t len)
 {
-  int old_recursion_depth = ctx->recursion_depth;
+  int old_recursion_depth = this->recursion_depth;
 
-  execute_stack_op (ctx, addr, addr + len);
+  execute_stack_op (addr, addr + len);
 
-  /* CTX RECURSION_DEPTH becomes invalid if an exception was thrown here.  */
+  /* RECURSION_DEPTH becomes invalid if an exception was thrown here.  */
 
-  gdb_assert (ctx->recursion_depth == old_recursion_depth);
+  gdb_assert (this->recursion_depth == old_recursion_depth);
 }
 
 /* Helper to read a uleb128 value or throw an error.  */
@@ -402,16 +377,15 @@ safe_skip_leb128 (const gdb_byte *buf, c
 
 
 /* Check that the current operator is either at the end of an
-   expression, or that it is followed by a composition operator.  */
+   expression, or that it is followed by a composition operator or by
+   DW_OP_GNU_uninit (which should terminate the expression).  */
 
 void
 dwarf_expr_require_composition (const gdb_byte *op_ptr, const gdb_byte *op_end,
 				const char *op_name)
 {
-  /* It seems like DW_OP_GNU_uninit should be handled here.  However,
-     it doesn't seem to make sense for DW_OP_*_value, and it was not
-     checked at the other place that this function is called.  */
-  if (op_ptr != op_end && *op_ptr != DW_OP_piece && *op_ptr != DW_OP_bit_piece)
+  if (op_ptr != op_end && *op_ptr != DW_OP_piece && *op_ptr != DW_OP_bit_piece
+      && *op_ptr != DW_OP_GNU_uninit)
     error (_("DWARF-2 expression error: `%s' operations must be "
 	     "used either alone or in conjunction with DW_OP_piece "
 	     "or DW_OP_bit_piece."),
@@ -432,31 +406,6 @@ base_types_equal_p (struct type *t1, str
   return TYPE_LENGTH (t1) == TYPE_LENGTH (t2);
 }
 
-/* A convenience function to call get_base_type on CTX and return the
-   result.  DIE is the DIE whose type we need.  SIZE is non-zero if
-   this function should verify that the resulting type has the correct
-   size.  */
-
-static struct type *
-dwarf_get_base_type (struct dwarf_expr_context *ctx, cu_offset die, int size)
-{
-  struct type *result;
-
-  if (ctx->funcs->get_base_type)
-    {
-      result = ctx->funcs->get_base_type (ctx, die);
-      if (result == NULL)
-	error (_("Could not find type for DW_OP_GNU_const_type"));
-      if (size != 0 && TYPE_LENGTH (result) != size)
-	error (_("DW_OP_GNU_const_type has different sizes for type and data"));
-    }
-  else
-    /* Anything will do.  */
-    result = builtin_type (ctx->gdbarch)->builtin_int;
-
-  return result;
-}
-
 /* If <BUF..BUF_END] contains DW_FORM_block* with single DW_OP_reg* return the
    DWARF register number.  Otherwise return -1.  */
 
@@ -474,7 +423,7 @@ dwarf_block_to_dwarf_reg (const gdb_byte
       return *buf - DW_OP_reg0;
     }
 
-  if (*buf == DW_OP_GNU_regval_type)
+  if (*buf == DW_OP_regval_type || *buf == DW_OP_GNU_regval_type)
     {
       buf++;
       buf = gdb_read_uleb128 (buf, buf_end, &dwarf_reg);
@@ -613,7 +562,7 @@ dwarf_block_to_sp_offset (struct gdbarch
 	return 0;
     }
 
-  if (gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_reg)
+  if (dwarf_reg_to_regnum (gdbarch, dwarf_reg)
       != gdbarch_sp_regnum (gdbarch))
     return 0;
 
@@ -627,14 +576,14 @@ dwarf_block_to_sp_offset (struct gdbarch
   return 1;
 }
 
-/* The engine for the expression evaluator.  Using the context in CTX,
-   evaluate the expression between OP_PTR and OP_END.  */
+/* The engine for the expression evaluator.  Using the context in this
+   object, evaluate the expression between OP_PTR and OP_END.  */
 
-static void
-execute_stack_op (struct dwarf_expr_context *ctx,
-		  const gdb_byte *op_ptr, const gdb_byte *op_end)
+void
+dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
+				      const gdb_byte *op_end)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch);
+  enum bfd_endian byte_order = gdbarch_byte_order (this->gdbarch);
   /* Old-style "untyped" DWARF values need special treatment in a
      couple of places, specifically DW_OP_mod and DW_OP_shr.  We need
      a special type for these values so we can distinguish them from
@@ -642,19 +591,19 @@ execute_stack_op (struct dwarf_expr_cont
      values do not need special treatment.  This special type must be
      different (in the `==' sense) from any base type coming from the
      CU.  */
-  struct type *address_type = dwarf_expr_address_type (ctx);
+  struct type *address_type = this->address_type ();
 
-  ctx->location = DWARF_VALUE_MEMORY;
-  ctx->initialized = 1;  /* Default is initialized.  */
+  this->location = DWARF_VALUE_MEMORY;
+  this->initialized = 1;  /* Default is initialized.  */
 
-  if (ctx->recursion_depth > ctx->max_recursion_depth)
+  if (this->recursion_depth > this->max_recursion_depth)
     error (_("DWARF-2 expression error: Loop detected (%d)."),
-	   ctx->recursion_depth);
-  ctx->recursion_depth++;
+	   this->recursion_depth);
+  this->recursion_depth++;
 
   while (op_ptr < op_end)
     {
-      enum dwarf_location_atom op = *op_ptr++;
+      enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr++;
       ULONGEST result;
       /* Assume the value is not in stack memory.
 	 Code that knows otherwise sets this to 1.
@@ -711,26 +660,26 @@ execute_stack_op (struct dwarf_expr_cont
 
 	case DW_OP_addr:
 	  result = extract_unsigned_integer (op_ptr,
-					     ctx->addr_size, byte_order);
-	  op_ptr += ctx->addr_size;
+					     this->addr_size, byte_order);
+	  op_ptr += this->addr_size;
 	  /* Some versions of GCC emit DW_OP_addr before
 	     DW_OP_GNU_push_tls_address.  In this case the value is an
 	     index, not an address.  We don't support things like
 	     branching between the address and the TLS op.  */
 	  if (op_ptr >= op_end || *op_ptr != DW_OP_GNU_push_tls_address)
-	    result += ctx->offset;
+	    result += this->offset;
 	  result_val = value_from_ulongest (address_type, result);
 	  break;
 
 	case DW_OP_GNU_addr_index:
 	  op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
-	  result = (ctx->funcs->get_addr_index) (ctx->baton, uoffset);
-	  result += ctx->offset;
+	  result = this->get_addr_index (uoffset);
+	  result += this->offset;
 	  result_val = value_from_ulongest (address_type, result);
 	  break;
 	case DW_OP_GNU_const_index:
 	  op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
-	  result = (ctx->funcs->get_addr_index) (ctx->baton, uoffset);
+	  result = this->get_addr_index (uoffset);
 	  result_val = value_from_ulongest (address_type, result);
 	  break;
 
@@ -819,17 +768,11 @@ execute_stack_op (struct dwarf_expr_cont
 	case DW_OP_reg29:
 	case DW_OP_reg30:
 	case DW_OP_reg31:
-	  if (op_ptr != op_end 
-	      && *op_ptr != DW_OP_piece
-	      && *op_ptr != DW_OP_bit_piece
-	      && *op_ptr != DW_OP_GNU_uninit)
-	    error (_("DWARF-2 expression error: DW_OP_reg operations must be "
-		     "used either alone or in conjunction with DW_OP_piece "
-		     "or DW_OP_bit_piece."));
+	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_reg");
 
 	  result = op - DW_OP_reg0;
 	  result_val = value_from_ulongest (address_type, result);
-	  ctx->location = DWARF_VALUE_REGISTER;
+	  this->location = DWARF_VALUE_REGISTER;
 	  break;
 
 	case DW_OP_regx:
@@ -838,7 +781,7 @@ execute_stack_op (struct dwarf_expr_cont
 
 	  result = reg;
 	  result_val = value_from_ulongest (address_type, result);
-	  ctx->location = DWARF_VALUE_REGISTER;
+	  this->location = DWARF_VALUE_REGISTER;
 	  break;
 
 	case DW_OP_implicit_value:
@@ -848,9 +791,9 @@ execute_stack_op (struct dwarf_expr_cont
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &len);
 	    if (op_ptr + len > op_end)
 	      error (_("DW_OP_implicit_value: too few bytes available."));
-	    ctx->len = len;
-	    ctx->data = op_ptr;
-	    ctx->location = DWARF_VALUE_LITERAL;
+	    this->len = len;
+	    this->data = op_ptr;
+	    this->location = DWARF_VALUE_LITERAL;
 	    op_ptr += len;
 	    dwarf_expr_require_composition (op_ptr, op_end,
 					    "DW_OP_implicit_value");
@@ -858,31 +801,32 @@ execute_stack_op (struct dwarf_expr_cont
 	  goto no_push;
 
 	case DW_OP_stack_value:
-	  ctx->location = DWARF_VALUE_STACK;
+	  this->location = DWARF_VALUE_STACK;
 	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_stack_value");
 	  goto no_push;
 
+	case DW_OP_implicit_pointer:
 	case DW_OP_GNU_implicit_pointer:
 	  {
 	    int64_t len;
 
-	    if (ctx->ref_addr_size == -1)
-	      error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer "
+	    if (this->ref_addr_size == -1)
+	      error (_("DWARF-2 expression error: DW_OP_implicit_pointer "
 		       "is not allowed in frame context"));
 
 	    /* The referred-to DIE of sect_offset kind.  */
-	    ctx->len = extract_unsigned_integer (op_ptr, ctx->ref_addr_size,
+	    this->len = extract_unsigned_integer (op_ptr, this->ref_addr_size,
 						 byte_order);
-	    op_ptr += ctx->ref_addr_size;
+	    op_ptr += this->ref_addr_size;
 
 	    /* The byte offset into the data.  */
 	    op_ptr = safe_read_sleb128 (op_ptr, op_end, &len);
 	    result = (ULONGEST) len;
 	    result_val = value_from_ulongest (address_type, result);
 
-	    ctx->location = DWARF_VALUE_IMPLICIT_POINTER;
+	    this->location = DWARF_VALUE_IMPLICIT_POINTER;
 	    dwarf_expr_require_composition (op_ptr, op_end,
-					    "DW_OP_GNU_implicit_pointer");
+					    "DW_OP_implicit_pointer");
 	  }
 	  break;
 
@@ -920,8 +864,7 @@ execute_stack_op (struct dwarf_expr_cont
 	case DW_OP_breg31:
 	  {
 	    op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
-	    result = (ctx->funcs->read_addr_from_reg) (ctx->baton,
-						       op - DW_OP_breg0);
+	    result = this->read_addr_from_reg (op - DW_OP_breg0);
 	    result += offset;
 	    result_val = value_from_ulongest (address_type, result);
 	  }
@@ -930,7 +873,7 @@ execute_stack_op (struct dwarf_expr_cont
 	  {
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &reg);
 	    op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
-	    result = (ctx->funcs->read_addr_from_reg) (ctx->baton, reg);
+	    result = this->read_addr_from_reg (reg);
 	    result += offset;
 	    result_val = value_from_ulongest (address_type, result);
 	  }
@@ -946,104 +889,103 @@ execute_stack_op (struct dwarf_expr_cont
 	       record the stack length before execution, then reset it
 	       afterwards, effectively erasing whatever the recursive
 	       call put there.  */
-	    before_stack_len = ctx->stack_len;
+	    before_stack_len = this->stack_len;
 	    /* FIXME: cagney/2003-03-26: This code should be using
                get_frame_base_address(), and then implement a dwarf2
                specific this_base method.  */
-	    (ctx->funcs->get_frame_base) (ctx->baton, &datastart, &datalen);
-	    dwarf_expr_eval (ctx, datastart, datalen);
-	    if (ctx->location == DWARF_VALUE_MEMORY)
-	      result = dwarf_expr_fetch_address (ctx, 0);
-	    else if (ctx->location == DWARF_VALUE_REGISTER)
-	      result = (ctx->funcs->read_addr_from_reg)
-			  (ctx->baton,
-			   value_as_long (dwarf_expr_fetch (ctx, 0)));
+	    this->get_frame_base (&datastart, &datalen);
+	    eval (datastart, datalen);
+	    if (this->location == DWARF_VALUE_MEMORY)
+	      result = fetch_address (0);
+	    else if (this->location == DWARF_VALUE_REGISTER)
+	      result = this->read_addr_from_reg (value_as_long (fetch (0)));
 	    else
 	      error (_("Not implemented: computing frame "
 		       "base using explicit value operator"));
 	    result = result + offset;
 	    result_val = value_from_ulongest (address_type, result);
 	    in_stack_memory = 1;
-	    ctx->stack_len = before_stack_len;
-	    ctx->location = DWARF_VALUE_MEMORY;
+	    this->stack_len = before_stack_len;
+	    this->location = DWARF_VALUE_MEMORY;
 	  }
 	  break;
 
 	case DW_OP_dup:
-	  result_val = dwarf_expr_fetch (ctx, 0);
-	  in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
+	  result_val = fetch (0);
+	  in_stack_memory = fetch_in_stack_memory (0);
 	  break;
 
 	case DW_OP_drop:
-	  dwarf_expr_pop (ctx);
+	  pop ();
 	  goto no_push;
 
 	case DW_OP_pick:
 	  offset = *op_ptr++;
-	  result_val = dwarf_expr_fetch (ctx, offset);
-	  in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, offset);
+	  result_val = fetch (offset);
+	  in_stack_memory = fetch_in_stack_memory (offset);
 	  break;
 	  
 	case DW_OP_swap:
 	  {
 	    struct dwarf_stack_value t1, t2;
 
-	    if (ctx->stack_len < 2)
+	    if (this->stack_len < 2)
 	       error (_("Not enough elements for "
 			"DW_OP_swap.  Need 2, have %d."),
-		      ctx->stack_len);
-	    t1 = ctx->stack[ctx->stack_len - 1];
-	    t2 = ctx->stack[ctx->stack_len - 2];
-	    ctx->stack[ctx->stack_len - 1] = t2;
-	    ctx->stack[ctx->stack_len - 2] = t1;
+		      this->stack_len);
+	    t1 = this->stack[this->stack_len - 1];
+	    t2 = this->stack[this->stack_len - 2];
+	    this->stack[this->stack_len - 1] = t2;
+	    this->stack[this->stack_len - 2] = t1;
 	    goto no_push;
 	  }
 
 	case DW_OP_over:
-	  result_val = dwarf_expr_fetch (ctx, 1);
-	  in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 1);
+	  result_val = fetch (1);
+	  in_stack_memory = fetch_in_stack_memory (1);
 	  break;
 
 	case DW_OP_rot:
 	  {
 	    struct dwarf_stack_value t1, t2, t3;
 
-	    if (ctx->stack_len < 3)
+	    if (this->stack_len < 3)
 	       error (_("Not enough elements for "
 			"DW_OP_rot.  Need 3, have %d."),
-		      ctx->stack_len);
-	    t1 = ctx->stack[ctx->stack_len - 1];
-	    t2 = ctx->stack[ctx->stack_len - 2];
-	    t3 = ctx->stack[ctx->stack_len - 3];
-	    ctx->stack[ctx->stack_len - 1] = t2;
-	    ctx->stack[ctx->stack_len - 2] = t3;
-	    ctx->stack[ctx->stack_len - 3] = t1;
+		      this->stack_len);
+	    t1 = this->stack[this->stack_len - 1];
+	    t2 = this->stack[this->stack_len - 2];
+	    t3 = this->stack[this->stack_len - 3];
+	    this->stack[this->stack_len - 1] = t2;
+	    this->stack[this->stack_len - 2] = t3;
+	    this->stack[this->stack_len - 3] = t1;
 	    goto no_push;
 	  }
 
 	case DW_OP_deref:
 	case DW_OP_deref_size:
+	case DW_OP_deref_type:
 	case DW_OP_GNU_deref_type:
 	  {
-	    int addr_size = (op == DW_OP_deref ? ctx->addr_size : *op_ptr++);
-	    gdb_byte *buf = alloca (addr_size);
-	    CORE_ADDR addr = dwarf_expr_fetch_address (ctx, 0);
+	    int addr_size = (op == DW_OP_deref ? this->addr_size : *op_ptr++);
+	    gdb_byte *buf = (gdb_byte *) alloca (addr_size);
+	    CORE_ADDR addr = fetch_address (0);
 	    struct type *type;
 
-	    dwarf_expr_pop (ctx);
+	    pop ();
 
-	    if (op == DW_OP_GNU_deref_type)
+	    if (op == DW_OP_deref_type || op == DW_OP_GNU_deref_type)
 	      {
 		cu_offset type_die;
 
 		op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
 		type_die.cu_off = uoffset;
-		type = dwarf_get_base_type (ctx, type_die, 0);
+		type = get_base_type (type_die, 0);
 	      }
 	    else
 	      type = address_type;
 
-	    (ctx->funcs->read_mem) (ctx->baton, buf, addr, addr_size);
+	    this->read_mem (buf, addr, addr_size);
 
 	    /* If the size of the object read from memory is different
 	       from the type length, we need to zero-extend it.  */
@@ -1052,7 +994,7 @@ execute_stack_op (struct dwarf_expr_cont
 		ULONGEST result =
 		  extract_unsigned_integer (buf, addr_size, byte_order);
 
-		buf = alloca (TYPE_LENGTH (type));
+		buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
 		store_unsigned_integer (buf, TYPE_LENGTH (type),
 					byte_order, result);
 	      }
@@ -1067,8 +1009,8 @@ execute_stack_op (struct dwarf_expr_cont
 	case DW_OP_plus_uconst:
 	  {
 	    /* Unary operations.  */
-	    result_val = dwarf_expr_fetch (ctx, 0);
-	    dwarf_expr_pop (ctx);
+	    result_val = fetch (0);
+	    pop ();
 
 	    switch (op)
 	      {
@@ -1116,11 +1058,11 @@ execute_stack_op (struct dwarf_expr_cont
 	    /* Binary operations.  */
 	    struct value *first, *second;
 
-	    second = dwarf_expr_fetch (ctx, 0);
-	    dwarf_expr_pop (ctx);
+	    second = fetch (0);
+	    pop ();
 
-	    first = dwarf_expr_fetch (ctx, 0);
-	    dwarf_expr_pop (ctx);
+	    first = fetch (0);
+	    pop ();
 
 	    if (! base_types_equal_p (value_type (first), value_type (second)))
 	      error (_("Incompatible types on DWARF stack"));
@@ -1149,7 +1091,7 @@ execute_stack_op (struct dwarf_expr_cont
 		  if (orig_type == address_type)
 		    {
 		      struct type *utype
-			= get_unsigned_type (ctx->gdbarch, orig_type);
+			= get_unsigned_type (this->gdbarch, orig_type);
 
 		      cast_back = 1;
 		      first = value_cast (utype, first);
@@ -1184,7 +1126,7 @@ execute_stack_op (struct dwarf_expr_cont
 		if (!TYPE_UNSIGNED (value_type (first)))
 		  {
 		    struct type *utype
-		      = get_unsigned_type (ctx->gdbarch, value_type (first));
+		      = get_unsigned_type (this->gdbarch, value_type (first));
 
 		    first = value_cast (utype, first);
 		  }
@@ -1201,7 +1143,7 @@ execute_stack_op (struct dwarf_expr_cont
 		if (TYPE_UNSIGNED (value_type (first)))
 		  {
 		    struct type *stype
-		      = get_signed_type (ctx->gdbarch, value_type (first));
+		      = get_signed_type (this->gdbarch, value_type (first));
 
 		    first = value_cast (stype, first);
 		  }
@@ -1252,12 +1194,13 @@ execute_stack_op (struct dwarf_expr_cont
 	  break;
 
 	case DW_OP_call_frame_cfa:
-	  result = (ctx->funcs->get_frame_cfa) (ctx->baton);
+	  result = this->get_frame_cfa ();
 	  result_val = value_from_ulongest (address_type, result);
 	  in_stack_memory = 1;
 	  break;
 
 	case DW_OP_GNU_push_tls_address:
+	case DW_OP_form_tls_address:
 	  /* Variable is at a constant offset in the thread-local
 	  storage block into the objfile for the current thread and
 	  the dynamic linker module containing this expression.  Here
@@ -1266,9 +1209,9 @@ execute_stack_op (struct dwarf_expr_cont
 	  control block at which the variable is located.  Nothing
 	  should follow this operator, so the top of stack would be
 	  returned.  */
-	  result = value_as_long (dwarf_expr_fetch (ctx, 0));
-	  dwarf_expr_pop (ctx);
-	  result = (ctx->funcs->get_tls_address) (ctx->baton, result);
+	  result = value_as_long (fetch (0));
+	  pop ();
+	  result = this->get_tls_address (result);
 	  result_val = value_from_ulongest (address_type, result);
 	  break;
 
@@ -1284,11 +1227,11 @@ execute_stack_op (struct dwarf_expr_cont
 
 	    offset = extract_signed_integer (op_ptr, 2, byte_order);
 	    op_ptr += 2;
-	    val = dwarf_expr_fetch (ctx, 0);
+	    val = fetch (0);
 	    dwarf_require_integral (value_type (val));
 	    if (value_as_long (val) != 0)
 	      op_ptr += offset;
-	    dwarf_expr_pop (ctx);
+	    pop ();
 	  }
 	  goto no_push;
 
@@ -1301,14 +1244,14 @@ execute_stack_op (struct dwarf_expr_cont
 
             /* Record the piece.  */
             op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
-	    add_piece (ctx, 8 * size, 0);
+	    add_piece (8 * size, 0);
 
             /* Pop off the address/regnum, and reset the location
 	       type.  */
-	    if (ctx->location != DWARF_VALUE_LITERAL
-		&& ctx->location != DWARF_VALUE_OPTIMIZED_OUT)
-	      dwarf_expr_pop (ctx);
-            ctx->location = DWARF_VALUE_MEMORY;
+	    if (this->location != DWARF_VALUE_LITERAL
+		&& this->location != DWARF_VALUE_OPTIMIZED_OUT)
+	      pop ();
+            this->location = DWARF_VALUE_MEMORY;
           }
           goto no_push;
 
@@ -1319,14 +1262,14 @@ execute_stack_op (struct dwarf_expr_cont
             /* Record the piece.  */
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &offset);
-	    add_piece (ctx, size, offset);
+	    add_piece (size, offset);
 
             /* Pop off the address/regnum, and reset the location
 	       type.  */
-	    if (ctx->location != DWARF_VALUE_LITERAL
-		&& ctx->location != DWARF_VALUE_OPTIMIZED_OUT)
-	      dwarf_expr_pop (ctx);
-            ctx->location = DWARF_VALUE_MEMORY;
+	    if (this->location != DWARF_VALUE_LITERAL
+		&& this->location != DWARF_VALUE_OPTIMIZED_OUT)
+	      pop ();
+            this->location = DWARF_VALUE_MEMORY;
 	  }
 	  goto no_push;
 
@@ -1335,7 +1278,7 @@ execute_stack_op (struct dwarf_expr_cont
 	    error (_("DWARF-2 expression error: DW_OP_GNU_uninit must always "
 		   "be the very last op."));
 
-	  ctx->initialized = 0;
+	  this->initialized = 0;
 	  goto no_push;
 
 	case DW_OP_call2:
@@ -1344,7 +1287,7 @@ execute_stack_op (struct dwarf_expr_cont
 
 	    offset.cu_off = extract_unsigned_integer (op_ptr, 2, byte_order);
 	    op_ptr += 2;
-	    ctx->funcs->dwarf_call (ctx, offset);
+	    this->dwarf_call (offset);
 	  }
 	  goto no_push;
 
@@ -1354,10 +1297,11 @@ execute_stack_op (struct dwarf_expr_cont
 
 	    offset.cu_off = extract_unsigned_integer (op_ptr, 4, byte_order);
 	    op_ptr += 4;
-	    ctx->funcs->dwarf_call (ctx, offset);
+	    this->dwarf_call (offset);
 	  }
 	  goto no_push;
 	
+	case DW_OP_entry_value:
 	case DW_OP_GNU_entry_value:
 	  {
 	    uint64_t len;
@@ -1366,16 +1310,15 @@ execute_stack_op (struct dwarf_expr_cont
 
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &len);
 	    if (op_ptr + len > op_end)
-	      error (_("DW_OP_GNU_entry_value: too few bytes available."));
+	      error (_("DW_OP_entry_value: too few bytes available."));
 
 	    kind_u.dwarf_reg = dwarf_block_to_dwarf_reg (op_ptr, op_ptr + len);
 	    if (kind_u.dwarf_reg != -1)
 	      {
 		op_ptr += len;
-		ctx->funcs->push_dwarf_reg_entry_value (ctx,
-						  CALL_SITE_PARAMETER_DWARF_REG,
-							kind_u,
-							-1 /* deref_size */);
+		this->push_dwarf_reg_entry_value (CALL_SITE_PARAMETER_DWARF_REG,
+						  kind_u,
+						  -1 /* deref_size */);
 		goto no_push;
 	      }
 
@@ -1385,15 +1328,14 @@ execute_stack_op (struct dwarf_expr_cont
 	    if (kind_u.dwarf_reg != -1)
 	      {
 		if (deref_size == -1)
-		  deref_size = ctx->addr_size;
+		  deref_size = this->addr_size;
 		op_ptr += len;
-		ctx->funcs->push_dwarf_reg_entry_value (ctx,
-						  CALL_SITE_PARAMETER_DWARF_REG,
-							kind_u, deref_size);
+		this->push_dwarf_reg_entry_value (CALL_SITE_PARAMETER_DWARF_REG,
+						  kind_u, deref_size);
 		goto no_push;
 	      }
 
-	    error (_("DWARF-2 expression error: DW_OP_GNU_entry_value is "
+	    error (_("DWARF-2 expression error: DW_OP_entry_value is "
 		     "supported only for single DW_OP_reg* "
 		     "or for DW_OP_breg*(0)+DW_OP_deref*"));
 	  }
@@ -1405,13 +1347,13 @@ execute_stack_op (struct dwarf_expr_cont
 	    kind_u.param_offset.cu_off = extract_unsigned_integer (op_ptr, 4,
 								   byte_order);
 	    op_ptr += 4;
-	    ctx->funcs->push_dwarf_reg_entry_value (ctx,
-					       CALL_SITE_PARAMETER_PARAM_OFFSET,
-						    kind_u,
-						    -1 /* deref_size */);
+	    this->push_dwarf_reg_entry_value (CALL_SITE_PARAMETER_PARAM_OFFSET,
+					      kind_u,
+					      -1 /* deref_size */);
 	  }
 	  goto no_push;
 
+	case DW_OP_const_type:
 	case DW_OP_GNU_const_type:
 	  {
 	    cu_offset type_die;
@@ -1425,11 +1367,12 @@ execute_stack_op (struct dwarf_expr_cont
 	    data = op_ptr;
 	    op_ptr += n;
 
-	    type = dwarf_get_base_type (ctx, type_die, n);
+	    type = get_base_type (type_die, n);
 	    result_val = value_from_contents (type, data);
 	  }
 	  break;
 
+	case DW_OP_regval_type:
 	case DW_OP_GNU_regval_type:
 	  {
 	    cu_offset type_die;
@@ -1439,12 +1382,14 @@ execute_stack_op (struct dwarf_expr_cont
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
 	    type_die.cu_off = uoffset;
 
-	    type = dwarf_get_base_type (ctx, type_die, 0);
-	    result_val = ctx->funcs->get_reg_value (ctx->baton, type, reg);
+	    type = get_base_type (type_die, 0);
+	    result_val = this->get_reg_value (type, reg);
 	  }
 	  break;
 
+	case DW_OP_convert:
 	case DW_OP_GNU_convert:
+	case DW_OP_reinterpret:
 	case DW_OP_GNU_reinterpret:
 	  {
 	    cu_offset type_die;
@@ -1456,12 +1401,12 @@ execute_stack_op (struct dwarf_expr_cont
 	    if (type_die.cu_off == 0)
 	      type = address_type;
 	    else
-	      type = dwarf_get_base_type (ctx, type_die, 0);
+	      type = get_base_type (type_die, 0);
 
-	    result_val = dwarf_expr_fetch (ctx, 0);
-	    dwarf_expr_pop (ctx);
+	    result_val = fetch (0);
+	    pop ();
 
-	    if (op == DW_OP_GNU_convert)
+	    if (op == DW_OP_convert || op == DW_OP_GNU_convert)
 	      result_val = value_cast (type, result_val);
 	    else if (type == value_type (result_val))
 	      {
@@ -1469,7 +1414,7 @@ execute_stack_op (struct dwarf_expr_cont
 	      }
 	    else if (TYPE_LENGTH (type)
 		     != TYPE_LENGTH (value_type (result_val)))
-	      error (_("DW_OP_GNU_reinterpret has wrong size"));
+	      error (_("DW_OP_reinterpret has wrong size"));
 	    else
 	      result_val
 		= value_from_contents (type,
@@ -1479,7 +1424,7 @@ execute_stack_op (struct dwarf_expr_cont
 
 	case DW_OP_push_object_address:
 	  /* Return the address of the object we are currently observing.  */
-	  result = (ctx->funcs->get_object_address) (ctx->baton);
+	  result = this->get_object_address ();
 	  result_val = value_from_ulongest (address_type, result);
 	  break;
 
@@ -1489,7 +1434,7 @@ execute_stack_op (struct dwarf_expr_cont
 
       /* Most things push a result value.  */
       gdb_assert (result_val != NULL);
-      dwarf_expr_push (ctx, result_val, in_stack_memory);
+      push (result_val, in_stack_memory);
     no_push:
       ;
     }
@@ -1497,81 +1442,12 @@ execute_stack_op (struct dwarf_expr_cont
   /* To simplify our main caller, if the result is an implicit
      pointer, then make a pieced value.  This is ok because we can't
      have implicit pointers in contexts where pieces are invalid.  */
-  if (ctx->location == DWARF_VALUE_IMPLICIT_POINTER)
-    add_piece (ctx, 8 * ctx->addr_size, 0);
+  if (this->location == DWARF_VALUE_IMPLICIT_POINTER)
+    add_piece (8 * this->addr_size, 0);
 
 abort_expression:
-  ctx->recursion_depth--;
-  gdb_assert (ctx->recursion_depth >= 0);
-}
-
-/* Stub dwarf_expr_context_funcs.get_frame_base implementation.  */
-
-void
-ctx_no_get_frame_base (void *baton, const gdb_byte **start, size_t *length)
-{
-  error (_("%s is invalid in this context"), "DW_OP_fbreg");
-}
-
-/* Stub dwarf_expr_context_funcs.get_frame_cfa implementation.  */
-
-CORE_ADDR
-ctx_no_get_frame_cfa (void *baton)
-{
-  error (_("%s is invalid in this context"), "DW_OP_call_frame_cfa");
-}
-
-/* Stub dwarf_expr_context_funcs.get_frame_pc implementation.  */
-
-CORE_ADDR
-ctx_no_get_frame_pc (void *baton)
-{
-  error (_("%s is invalid in this context"), "DW_OP_GNU_implicit_pointer");
-}
-
-/* Stub dwarf_expr_context_funcs.get_tls_address implementation.  */
-
-CORE_ADDR
-ctx_no_get_tls_address (void *baton, CORE_ADDR offset)
-{
-  error (_("%s is invalid in this context"), "DW_OP_GNU_push_tls_address");
-}
-
-/* Stub dwarf_expr_context_funcs.dwarf_call implementation.  */
-
-void
-ctx_no_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
-{
-  error (_("%s is invalid in this context"), "DW_OP_call*");
-}
-
-/* Stub dwarf_expr_context_funcs.get_base_type implementation.  */
-
-struct type *
-ctx_no_get_base_type (struct dwarf_expr_context *ctx, cu_offset die)
-{
-  error (_("Support for typed DWARF is not supported in this context"));
-}
-
-/* Stub dwarf_expr_context_funcs.push_dwarf_block_entry_value
-   implementation.  */
-
-void
-ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
-				   enum call_site_parameter_kind kind,
-				   union call_site_parameter_u kind_u,
-				   int deref_size)
-{
-  internal_error (__FILE__, __LINE__,
-		  _("Support for DW_OP_GNU_entry_value is unimplemented"));
-}
-
-/* Stub dwarf_expr_context_funcs.get_addr_index implementation.  */
-
-CORE_ADDR
-ctx_no_get_addr_index (void *baton, unsigned int index)
-{
-  error (_("%s is invalid in this context"), "DW_OP_GNU_addr_index");
+  this->recursion_depth--;
+  gdb_assert (this->recursion_depth >= 0);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2expr.h ./gdb/dwarf2expr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2expr.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2expr.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DWARF 2 Expression Evaluator.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin <dan@dberlin.org>.
 
@@ -25,69 +25,6 @@
 #include "leb128.h"
 #include "gdbtypes.h"
 
-struct dwarf_expr_context;
-
-/* Virtual method table for struct dwarf_expr_context below.  */
-
-struct dwarf_expr_context_funcs
-{
-  /* Return the value of register number REGNUM (a DWARF register number),
-     read as an address.  */
-  CORE_ADDR (*read_addr_from_reg) (void *baton, int regnum);
-
-  /* Return a value of type TYPE, stored in register number REGNUM
-     of the frame associated to the given BATON.
-
-     REGNUM is a DWARF register number.  */
-  struct value *(*get_reg_value) (void *baton, struct type *type, int regnum);
-
-  /* Read LENGTH bytes at ADDR into BUF.  */
-  void (*read_mem) (void *baton, gdb_byte *buf, CORE_ADDR addr, size_t length);
-
-  /* Return the location expression for the frame base attribute, in
-     START and LENGTH.  The result must be live until the current
-     expression evaluation is complete.  */
-  void (*get_frame_base) (void *baton, const gdb_byte **start, size_t *length);
-
-  /* Return the CFA for the frame.  */
-  CORE_ADDR (*get_frame_cfa) (void *baton);
-
-  /* Return the PC for the frame.  */
-  CORE_ADDR (*get_frame_pc) (void *baton);
-
-  /* Return the thread-local storage address for
-     DW_OP_GNU_push_tls_address.  */
-  CORE_ADDR (*get_tls_address) (void *baton, CORE_ADDR offset);
-
-  /* Execute DW_AT_location expression for the DWARF expression subroutine in
-     the DIE at DIE_OFFSET in the CU from CTX.  Do not touch STACK while it
-     being passed to and returned from the called DWARF subroutine.  */
-  void (*dwarf_call) (struct dwarf_expr_context *ctx, cu_offset die_offset);
-
-  /* Return the base type given by the indicated DIE.  This can throw
-     an exception if the DIE is invalid or does not represent a base
-     type.  If can also be NULL in the special case where the
-     callbacks are not performing evaluation, and thus it is
-     meaningful to substitute a stub type of the correct size.  */
-  struct type *(*get_base_type) (struct dwarf_expr_context *ctx, cu_offset die);
-
-  /* Push on DWARF stack an entry evaluated for DW_TAG_GNU_call_site's
-     parameter matching KIND and KIND_U at the caller of specified BATON.
-     If DEREF_SIZE is not -1 then use DW_AT_GNU_call_site_data_value instead of
-     DW_AT_GNU_call_site_value.  */
-  void (*push_dwarf_reg_entry_value) (struct dwarf_expr_context *ctx,
-				      enum call_site_parameter_kind kind,
-				      union call_site_parameter_u kind_u,
-				      int deref_size);
-
-  /* Return the address indexed by DW_OP_GNU_addr_index.
-     This can throw an exception if the index is out of range.  */
-  CORE_ADDR (*get_addr_index) (void *baton, unsigned int index);
-
-  /* Return the `object address' for DW_OP_push_object_address.  */
-  CORE_ADDR (*get_object_address) (void *baton);
-};
-
 /* The location of a value.  */
 enum dwarf_value_location
 {
@@ -130,6 +67,15 @@ struct dwarf_stack_value
    its current state and its callbacks.  */
 struct dwarf_expr_context
 {
+  dwarf_expr_context ();
+  virtual ~dwarf_expr_context ();
+
+  void push_address (CORE_ADDR value, int in_stack_memory);
+  void eval (const gdb_byte *addr, size_t len);
+  struct value *fetch (int n);
+  CORE_ADDR fetch_address (int n);
+  int fetch_in_stack_memory (int n);
+
   /* The stack of values, allocated with xmalloc.  */
   struct dwarf_stack_value *stack;
 
@@ -150,13 +96,6 @@ struct dwarf_expr_context
   /* Offset used to relocate DW_OP_addr and DW_OP_GNU_addr_index arguments.  */
   CORE_ADDR offset;
 
-  /* An opaque argument provided by the caller, which will be passed
-     to all of the callback functions.  */
-  void *baton;
-
-  /* Callback functions.  */
-  const struct dwarf_expr_context_funcs *funcs;
-
   /* The current depth of dwarf expression recursion, via DW_OP_call*,
      DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum
      depth we'll tolerate before raising an error.  */
@@ -200,6 +139,78 @@ struct dwarf_expr_context
      two cases need to be handled separately.)  */
   int num_pieces;
   struct dwarf_expr_piece *pieces;
+
+  /* Return the value of register number REGNUM (a DWARF register number),
+     read as an address.  */
+  virtual CORE_ADDR read_addr_from_reg (int regnum) = 0;
+
+  /* Return a value of type TYPE, stored in register number REGNUM
+     of the frame associated to the given BATON.
+
+     REGNUM is a DWARF register number.  */
+  virtual struct value *get_reg_value (struct type *type, int regnum) = 0;
+
+  /* Read LENGTH bytes at ADDR into BUF.  */
+  virtual void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t length) = 0;
+
+  /* Return the location expression for the frame base attribute, in
+     START and LENGTH.  The result must be live until the current
+     expression evaluation is complete.  */
+  virtual void get_frame_base (const gdb_byte **start, size_t *length) = 0;
+
+  /* Return the CFA for the frame.  */
+  virtual CORE_ADDR get_frame_cfa () = 0;
+
+  /* Return the PC for the frame.  */
+  virtual CORE_ADDR get_frame_pc ()
+  {
+    error (_("%s is invalid in this context"), "DW_OP_implicit_pointer");
+  }
+
+  /* Return the thread-local storage address for
+     DW_OP_GNU_push_tls_address or DW_OP_form_tls_address.  */
+  virtual CORE_ADDR get_tls_address (CORE_ADDR offset) = 0;
+
+  /* Execute DW_AT_location expression for the DWARF expression
+     subroutine in the DIE at DIE_OFFSET in the CU.  Do not touch
+     STACK while it being passed to and returned from the called DWARF
+     subroutine.  */
+  virtual void dwarf_call (cu_offset die_offset) = 0;
+
+  /* Return the base type given by the indicated DIE.  This can throw
+     an exception if the DIE is invalid or does not represent a base
+     type.  SIZE is non-zero if this function should verify that the
+     resulting type has the correct size.  */
+  virtual struct type *get_base_type (cu_offset die, int size)
+  {
+    /* Anything will do.  */
+    return builtin_type (this->gdbarch)->builtin_int;
+  }
+
+  /* Push on DWARF stack an entry evaluated for DW_TAG_call_site's
+     parameter matching KIND and KIND_U at the caller of specified BATON.
+     If DEREF_SIZE is not -1 then use DW_AT_call_data_value instead of
+     DW_AT_call_value.  */
+  virtual void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind,
+					   union call_site_parameter_u kind_u,
+					   int deref_size) = 0;
+
+  /* Return the address indexed by DW_OP_GNU_addr_index.
+     This can throw an exception if the index is out of range.  */
+  virtual CORE_ADDR get_addr_index (unsigned int index) = 0;
+
+  /* Return the `object address' for DW_OP_push_object_address.  */
+  virtual CORE_ADDR get_object_address () = 0;
+
+private:
+
+  struct type *address_type () const;
+  void grow_stack (size_t need);
+  void push (struct value *value, int in_stack_memory);
+  int stack_empty_p () const;
+  void add_piece (ULONGEST size, ULONGEST offset);
+  void execute_stack_op (const gdb_byte *op_ptr, const gdb_byte *op_end);
+  void pop ();
 };
 
 
@@ -237,7 +248,7 @@ struct dwarf_expr_piece
     /* Used for DWARF_VALUE_IMPLICIT_POINTER.  */
     struct
     {
-      /* The referent DIE from DW_OP_GNU_implicit_pointer.  */
+      /* The referent DIE from DW_OP_implicit_pointer.  */
       sect_offset die;
       /* The byte offset into the resulting data.  */
       LONGEST offset;
@@ -250,39 +261,9 @@ struct dwarf_expr_piece
   ULONGEST offset;
 };
 
-struct dwarf_expr_context *new_dwarf_expr_context (void);
-void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
-struct cleanup *
-    make_cleanup_free_dwarf_expr_context (struct dwarf_expr_context *ctx);
-
-void dwarf_expr_push_address (struct dwarf_expr_context *ctx,
-			      CORE_ADDR value,
-			      int in_stack_memory);
-void dwarf_expr_eval (struct dwarf_expr_context *ctx, const gdb_byte *addr,
-		      size_t len);
-struct value *dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n);
-CORE_ADDR dwarf_expr_fetch_address (struct dwarf_expr_context *ctx, int n);
-int dwarf_expr_fetch_in_stack_memory (struct dwarf_expr_context *ctx, int n);
-
 void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *,
 				     const char *);
 
-/* Stub dwarf_expr_context_funcs implementations.  */
-
-void ctx_no_get_frame_base (void *baton, const gdb_byte **start,
-			    size_t *length);
-CORE_ADDR ctx_no_get_frame_cfa (void *baton);
-CORE_ADDR ctx_no_get_frame_pc (void *baton);
-CORE_ADDR ctx_no_get_tls_address (void *baton, CORE_ADDR offset);
-void ctx_no_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset);
-struct type *ctx_no_get_base_type (struct dwarf_expr_context *ctx,
-				   cu_offset die);
-void ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
-					enum call_site_parameter_kind kind,
-					union call_site_parameter_u kind_u,
-					int deref_size);
-CORE_ADDR ctx_no_get_addr_index (void *baton, unsigned int index);
-
 int dwarf_block_to_dwarf_reg (const gdb_byte *buf, const gdb_byte *buf_end);
 
 int dwarf_block_to_dwarf_reg_deref (const gdb_byte *buf,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame.c ./gdb/dwarf2-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Frame unwinder for frames with DWARF Call Frame Information.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by Mark Kettenis.
 
@@ -275,7 +275,7 @@ dwarf2_frame_state_free_regs (struct dwa
 static void
 dwarf2_frame_state_free (void *p)
 {
-  struct dwarf2_frame_state *fs = p;
+  struct dwarf2_frame_state *fs = (struct dwarf2_frame_state *) p;
 
   dwarf2_frame_state_free_regs (fs->initial.prev);
   dwarf2_frame_state_free_regs (fs->regs.prev);
@@ -288,33 +288,14 @@ dwarf2_frame_state_free (void *p)
 /* Helper functions for execute_stack_op.  */
 
 static CORE_ADDR
-read_addr_from_reg (void *baton, int reg)
+read_addr_from_reg (struct frame_info *this_frame, int reg)
 {
-  struct frame_info *this_frame = (struct frame_info *) baton;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, reg);
+  int regnum = dwarf_reg_to_regnum_or_error (gdbarch, reg);
 
   return address_from_register (regnum, this_frame);
 }
 
-/* Implement struct dwarf_expr_context_funcs' "get_reg_value" callback.  */
-
-static struct value *
-get_reg_value (void *baton, struct type *type, int reg)
-{
-  struct frame_info *this_frame = (struct frame_info *) baton;
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, reg);
-
-  return value_from_register (type, regnum, this_frame);
-}
-
-static void
-read_mem (void *baton, gdb_byte *buf, CORE_ADDR addr, size_t len)
-{
-  read_memory (addr, buf, len);
-}
-
 /* Execute the required actions for both the DW_CFA_restore and
 DW_CFA_restore_extended instructions.  */
 static void
@@ -336,30 +317,84 @@ dwarf2_restore_rule (struct gdbarch *gdb
     fs->regs.reg[reg].how = DWARF2_FRAME_REG_UNSPECIFIED;
 
   if (fs->regs.reg[reg].how == DWARF2_FRAME_REG_UNSPECIFIED)
-    complaint (&symfile_complaints, _("\
+    {
+      int regnum = dwarf_reg_to_regnum (gdbarch, reg);
+
+      complaint (&symfile_complaints, _("\
 incomplete CFI data; DW_CFA_restore unspecified\n\
 register %s (#%d) at %s"),
-		       gdbarch_register_name
-		       (gdbarch, gdbarch_dwarf2_reg_to_regnum (gdbarch, reg)),
-		       gdbarch_dwarf2_reg_to_regnum (gdbarch, reg),
-		       paddress (gdbarch, fs->pc));
-}
-
-/* Virtual method table for execute_stack_op below.  */
-
-static const struct dwarf_expr_context_funcs dwarf2_frame_ctx_funcs =
-{
-  read_addr_from_reg,
-  get_reg_value,
-  read_mem,
-  ctx_no_get_frame_base,
-  ctx_no_get_frame_cfa,
-  ctx_no_get_frame_pc,
-  ctx_no_get_tls_address,
-  ctx_no_dwarf_call,
-  ctx_no_get_base_type,
-  ctx_no_push_dwarf_reg_entry_value,
-  ctx_no_get_addr_index
+		 gdbarch_register_name (gdbarch, regnum), regnum,
+		 paddress (gdbarch, fs->pc));
+    }
+}
+
+class dwarf_expr_executor : public dwarf_expr_context
+{
+ public:
+
+  struct frame_info *this_frame;
+
+  CORE_ADDR read_addr_from_reg (int reg) OVERRIDE
+  {
+    return ::read_addr_from_reg (this_frame, reg);
+  }
+
+  struct value *get_reg_value (struct type *type, int reg) OVERRIDE
+  {
+    struct gdbarch *gdbarch = get_frame_arch (this_frame);
+    int regnum = dwarf_reg_to_regnum_or_error (gdbarch, reg);
+
+    return value_from_register (type, regnum, this_frame);
+  }
+
+  void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t len) OVERRIDE
+  {
+    read_memory (addr, buf, len);
+  }
+
+  void get_frame_base (const gdb_byte **start, size_t *length) OVERRIDE
+  {
+    invalid ("DW_OP_fbreg");
+  }
+
+  void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind,
+				   union call_site_parameter_u kind_u,
+				   int deref_size) OVERRIDE
+  {
+    invalid ("DW_OP_entry_value");
+  }
+
+  CORE_ADDR get_object_address () OVERRIDE
+  {
+    invalid ("DW_OP_push_object_address");
+  }
+
+  CORE_ADDR get_frame_cfa () OVERRIDE
+  {
+    invalid ("DW_OP_call_frame_cfa");
+  }
+
+  CORE_ADDR get_tls_address (CORE_ADDR offset) OVERRIDE
+  {
+    invalid ("DW_OP_form_tls_address");
+  }
+
+  void dwarf_call (cu_offset die_offset) OVERRIDE
+  {
+    invalid ("DW_OP_call*");
+  }
+
+  CORE_ADDR get_addr_index (unsigned int index)
+  {
+    invalid ("DW_OP_GNU_addr_index");
+  }
+
+ private:
+
+  void invalid (const char *op) ATTRIBUTE_NORETURN
+  {
+    error (_("%s is invalid in this context"), op);
+  }
 };
 
 static CORE_ADDR
@@ -367,29 +402,24 @@ execute_stack_op (const gdb_byte *exp, U
 		  CORE_ADDR offset, struct frame_info *this_frame,
 		  CORE_ADDR initial, int initial_in_stack_memory)
 {
-  struct dwarf_expr_context *ctx;
   CORE_ADDR result;
-  struct cleanup *old_chain;
 
-  ctx = new_dwarf_expr_context ();
-  old_chain = make_cleanup_free_dwarf_expr_context (ctx);
-  make_cleanup_value_free_to_mark (value_mark ());
-
-  ctx->gdbarch = get_frame_arch (this_frame);
-  ctx->addr_size = addr_size;
-  ctx->ref_addr_size = -1;
-  ctx->offset = offset;
-  ctx->baton = this_frame;
-  ctx->funcs = &dwarf2_frame_ctx_funcs;
-
-  dwarf_expr_push_address (ctx, initial, initial_in_stack_memory);
-  dwarf_expr_eval (ctx, exp, len);
-
-  if (ctx->location == DWARF_VALUE_MEMORY)
-    result = dwarf_expr_fetch_address (ctx, 0);
-  else if (ctx->location == DWARF_VALUE_REGISTER)
-    result = read_addr_from_reg (this_frame,
-				 value_as_long (dwarf_expr_fetch (ctx, 0)));
+  dwarf_expr_executor ctx;
+  scoped_value_mark free_values;
+
+  ctx.this_frame = this_frame;
+  ctx.gdbarch = get_frame_arch (this_frame);
+  ctx.addr_size = addr_size;
+  ctx.ref_addr_size = -1;
+  ctx.offset = offset;
+
+  ctx.push_address (initial, initial_in_stack_memory);
+  ctx.eval (exp, len);
+
+  if (ctx.location == DWARF_VALUE_MEMORY)
+    result = ctx.fetch_address (0);
+  else if (ctx.location == DWARF_VALUE_REGISTER)
+    result = ctx.read_addr_from_reg (value_as_long (ctx.fetch (0)));
   else
     {
       /* This is actually invalid DWARF, but if we ever do run across
@@ -399,8 +429,6 @@ execute_stack_op (const gdb_byte *exp, U
 Not implemented: computing unwound register using explicit value operator"));
     }
 
-  do_cleanups (old_chain);
-
   return result;
 }
 
@@ -782,7 +810,8 @@ dwarf2_frame_set_init_reg (struct gdbarc
 					     struct dwarf2_frame_state_reg *,
 					     struct frame_info *))
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   ops->init_reg = init_reg;
 }
@@ -794,7 +823,8 @@ dwarf2_frame_init_reg (struct gdbarch *g
 		       struct dwarf2_frame_state_reg *reg,
 		       struct frame_info *this_frame)
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   ops->init_reg (gdbarch, regnum, reg, this_frame);
 }
@@ -807,7 +837,8 @@ dwarf2_frame_set_signal_frame_p (struct 
 				 int (*signal_frame_p) (struct gdbarch *,
 							struct frame_info *))
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   ops->signal_frame_p = signal_frame_p;
 }
@@ -819,7 +850,8 @@ static int
 dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
 			     struct frame_info *this_frame)
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   if (ops->signal_frame_p == NULL)
     return 0;
@@ -834,7 +866,8 @@ dwarf2_frame_set_adjust_regnum (struct g
 				int (*adjust_regnum) (struct gdbarch *,
 						      int, int))
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   ops->adjust_regnum = adjust_regnum;
 }
@@ -846,7 +879,8 @@ static int
 dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch,
 			    int regnum, int eh_frame_p)
 {
-  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+  struct dwarf2_frame_ops *ops
+    = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
 
   if (ops->adjust_regnum == NULL)
     return regnum;
@@ -900,7 +934,6 @@ dwarf2_fetch_cfa_info (struct gdbarch *g
   struct dwarf2_fde *fde;
   CORE_ADDR text_offset;
   struct dwarf2_frame_state fs;
-  int addr_size;
 
   memset (&fs, 0, sizeof (struct dwarf2_frame_state));
 
@@ -915,7 +948,6 @@ dwarf2_fetch_cfa_info (struct gdbarch *g
   fs.data_align = fde->cie->data_alignment_factor;
   fs.code_align = fde->cie->code_alignment_factor;
   fs.retaddr_column = fde->cie->return_address_register;
-  addr_size = fde->cie->addr_size;
 
   /* Check for "quirks" - known bugs in producers.  */
   dwarf2_frame_find_quirks (&fs, fde);
@@ -936,11 +968,7 @@ dwarf2_fetch_cfa_info (struct gdbarch *g
     {
     case CFA_REG_OFFSET:
       {
-	int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, fs.regs.cfa_reg);
-
-	if (regnum == -1)
-	  error (_("Unable to access DWARF register number %d"),
-		 (int) fs.regs.cfa_reg); /* FIXME */
+	int regnum = dwarf_reg_to_regnum_or_error (gdbarch, fs.regs.cfa_reg);
 
 	*regnum_out = regnum;
 	if (fs.armcc_cfa_offsets_reversed)
@@ -1010,7 +1038,7 @@ struct dwarf2_frame_cache
 static void
 clear_pointer_cleanup (void *arg)
 {
-  void **ptr = arg;
+  void **ptr = (void **) arg;
 
   *ptr = NULL;
 }
@@ -1029,7 +1057,7 @@ dwarf2_frame_cache (struct frame_info *t
   const gdb_byte *instr;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct dwarf2_frame_cache *) *this_cache;
 
   /* Allocate a new cache.  */
   cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
@@ -1087,7 +1115,7 @@ dwarf2_frame_cache (struct frame_info *t
 				   entry_pc, fs);
 
       if (fs->regs.cfa_how == CFA_REG_OFFSET
-	  && (gdbarch_dwarf2_reg_to_regnum (gdbarch, fs->regs.cfa_reg)
+	  && (dwarf_reg_to_regnum (gdbarch, fs->regs.cfa_reg)
 	      == gdbarch_sp_regnum (gdbarch)))
 	{
 	  cache->entry_cfa_sp_offset = fs->regs.cfa_offset;
@@ -1150,19 +1178,16 @@ dwarf2_frame_cache (struct frame_info *t
   /* Go through the DWARF2 CFI generated table and save its register
      location information in the cache.  Note that we don't skip the
      return address column; it's perfectly all right for it to
-     correspond to a real register.  If it doesn't correspond to a
-     real register, or if we shouldn't treat it as such,
-     gdbarch_dwarf2_reg_to_regnum should be defined to return a number outside
-     the range [0, gdbarch_num_regs).  */
+     correspond to a real register.  */
   {
     int column;		/* CFI speak for "register number".  */
 
     for (column = 0; column < fs->regs.num_regs; column++)
       {
 	/* Use the GDB register number as the destination index.  */
-	int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, column);
+	int regnum = dwarf_reg_to_regnum (gdbarch, column);
 
-	/* If there's no corresponding GDB register, ignore it.  */
+	/* Protect against a target returning a bad register.  */
 	if (regnum < 0 || regnum >= num_regs)
 	  continue;
 
@@ -1324,8 +1349,8 @@ dwarf2_frame_prev_register (struct frame
       return frame_unwind_got_memory (this_frame, regnum, addr);
 
     case DWARF2_FRAME_REG_SAVED_REG:
-      realnum
-	= gdbarch_dwarf2_reg_to_regnum (gdbarch, cache->reg[regnum].loc.reg);
+      realnum = dwarf_reg_to_regnum_or_error
+	(gdbarch, cache->reg[regnum].loc.reg);
       return frame_unwind_got_register (this_frame, regnum, realnum);
 
     case DWARF2_FRAME_REG_SAVED_EXP:
@@ -1368,7 +1393,7 @@ dwarf2_frame_prev_register (struct frame
 
     case DWARF2_FRAME_REG_RA_OFFSET:
       addr = cache->reg[regnum].loc.offset;
-      regnum = gdbarch_dwarf2_reg_to_regnum
+      regnum = dwarf_reg_to_regnum_or_error
 	(gdbarch, cache->retaddr_reg.loc.reg);
       addr += get_frame_register_unsigned (this_frame, regnum);
       return frame_unwind_got_address (this_frame, regnum, addr);
@@ -1720,8 +1745,9 @@ find_cie (struct dwarf2_cie_table *cie_t
       return NULL;
     }
 
-  p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
-                   sizeof (cie_table->entries[0]), bsearch_cie_cmp);
+  p_cie = ((struct dwarf2_cie **)
+	   bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
+		    sizeof (cie_table->entries[0]), bsearch_cie_cmp));
   if (p_cie != NULL)
     return *p_cie;
   return NULL;
@@ -1736,8 +1762,8 @@ add_cie (struct dwarf2_cie_table *cie_ta
   gdb_assert (n < 1
               || cie_table->entries[n - 1]->cie_pointer < cie->cie_pointer);
 
-  cie_table->entries =
-      xrealloc (cie_table->entries, (n + 1) * sizeof (cie_table->entries[0]));
+  cie_table->entries
+    = XRESIZEVEC (struct dwarf2_cie *, cie_table->entries, n + 1);
   cie_table->entries[n] = cie;
   cie_table->num_entries = n + 1;
 }
@@ -1770,11 +1796,13 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CO
       CORE_ADDR offset;
       CORE_ADDR seek_pc;
 
-      fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+      fde_table = ((struct dwarf2_fde_table *)
+		   objfile_data (objfile, dwarf2_frame_objfile_data));
       if (fde_table == NULL)
 	{
 	  dwarf2_build_frame_info (objfile);
-	  fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+	  fde_table = ((struct dwarf2_fde_table *)
+		       objfile_data (objfile, dwarf2_frame_objfile_data));
 	}
       gdb_assert (fde_table != NULL);
 
@@ -1789,8 +1817,9 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CO
         continue;
 
       seek_pc = *pc - offset;
-      p_fde = bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
-                       sizeof (fde_table->entries[0]), bsearch_fde_cmp);
+      p_fde = ((struct dwarf2_fde **)
+	       bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
+                        sizeof (fde_table->entries[0]), bsearch_fde_cmp));
       if (p_fde != NULL)
         {
           *pc = (*p_fde)->initial_location + offset;
@@ -1811,9 +1840,8 @@ add_fde (struct dwarf2_fde_table *fde_ta
     return;
 
   fde_table->num_entries += 1;
-  fde_table->entries =
-      xrealloc (fde_table->entries,
-                fde_table->num_entries * sizeof (fde_table->entries[0]));
+  fde_table->entries = XRESIZEVEC (struct dwarf2_fde *, fde_table->entries,
+				   fde_table->num_entries);
   fde_table->entries[fde_table->num_entries - 1] = fde;
 }
 
@@ -1908,9 +1936,7 @@ decode_frame_entry_1 (struct comp_unit *
       if (find_cie (cie_table, cie_pointer))
 	return end;
 
-      cie = (struct dwarf2_cie *)
-	obstack_alloc (&unit->objfile->objfile_obstack,
-		       sizeof (struct dwarf2_cie));
+      cie = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_cie);
       cie->initial_instructions = NULL;
       cie->cie_pointer = cie_pointer;
 
@@ -2089,9 +2115,7 @@ decode_frame_entry_1 (struct comp_unit *
       if (cie_pointer >= unit->dwarf_frame_size)
 	return NULL;
 
-      fde = (struct dwarf2_fde *)
-	obstack_alloc (&unit->objfile->objfile_obstack,
-		       sizeof (struct dwarf2_fde));
+      fde = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_fde);
       fde->cie = find_cie (cie_table, cie_pointer);
       if (fde->cie == NULL)
 	{
@@ -2375,9 +2399,9 @@ dwarf2_build_frame_info (struct objfile 
 		}
 	      else
 		{
-		  fde_table.entries = xrealloc (fde_table.entries,
-						fde_table.num_entries *
-						sizeof (fde_table.entries[0]));
+		  fde_table.entries
+		    = XRESIZEVEC (struct dwarf2_fde *, fde_table.entries,
+				  fde_table.num_entries);
 		}
 	    }
 	  fde_table.num_entries = num_old_fde_entries;
@@ -2395,8 +2419,7 @@ dwarf2_build_frame_info (struct objfile 
     }
 
   /* Copy fde_table to obstack: it is needed at runtime.  */
-  fde_table2 = (struct dwarf2_fde_table *)
-    obstack_alloc (&objfile->objfile_obstack, sizeof (*fde_table2));
+  fde_table2 = XOBNEW (&objfile->objfile_obstack, struct dwarf2_fde_table);
 
   if (fde_table.num_entries == 0)
     {
@@ -2459,7 +2482,8 @@ dwarf2_build_frame_info (struct objfile 
 	  ++fde_table2->num_entries;
 	  fde_prev = fde;
 	}
-      fde_table2->entries = obstack_finish (&objfile->objfile_obstack);
+      fde_table2->entries
+	= (struct dwarf2_fde **) obstack_finish (&objfile->objfile_obstack);
 
       /* Discard the original fde_table.  */
       xfree (fde_table.entries);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame.h ./gdb/dwarf2-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2-frame.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Frame unwinder for frames with DWARF Call Frame Information.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by Mark Kettenis.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame-tailcall.c ./gdb/dwarf2-frame-tailcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame-tailcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2-frame-tailcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Virtual tail call frames unwinder for GDB.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -68,7 +68,7 @@ struct tailcall_cache
 static hashval_t
 cache_hash (const void *arg)
 {
-  const struct tailcall_cache *cache = arg;
+  const struct tailcall_cache *cache = (const struct tailcall_cache *) arg;
 
   return htab_hash_pointer (cache->next_bottom_frame);
 }
@@ -78,8 +78,8 @@ cache_hash (const void *arg)
 static int
 cache_eq (const void *arg1, const void *arg2)
 {
-  const struct tailcall_cache *cache1 = arg1;
-  const struct tailcall_cache *cache2 = arg2;
+  const struct tailcall_cache *cache1 = (const struct tailcall_cache *) arg1;
+  const struct tailcall_cache *cache2 = (const struct tailcall_cache *) arg2;
 
   return cache1->next_bottom_frame == cache2->next_bottom_frame;
 }
@@ -91,11 +91,9 @@ cache_eq (const void *arg1, const void *
 static struct tailcall_cache *
 cache_new_ref1 (struct frame_info *next_bottom_frame)
 {
-  struct tailcall_cache *cache;
+  struct tailcall_cache *cache = XCNEW (struct tailcall_cache);
   void **slot;
 
-  cache = xzalloc (sizeof (*cache));
-
   cache->next_bottom_frame = next_bottom_frame;
   cache->refc = 1;
 
@@ -162,7 +160,7 @@ cache_find (struct frame_info *fi)
   if (slot == NULL)
     return NULL;
 
-  cache = *slot;
+  cache = (struct tailcall_cache *) *slot;
   gdb_assert (cache != NULL);
   return cache;
 }
@@ -211,7 +209,7 @@ static void
 tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache,
 			struct frame_id *this_id)
 {
-  struct tailcall_cache *cache = *this_cache;
+  struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
   struct frame_info *next_frame;
 
   /* Tail call does not make sense for a sentinel frame.  */
@@ -266,7 +264,7 @@ dwarf2_tailcall_prev_register_first (str
 				     void **tailcall_cachep, int regnum)
 {
   struct gdbarch *this_gdbarch = get_frame_arch (this_frame);
-  struct tailcall_cache *cache = *tailcall_cachep;
+  struct tailcall_cache *cache = (struct tailcall_cache *) *tailcall_cachep;
   CORE_ADDR addr;
 
   if (regnum == gdbarch_pc_regnum (this_gdbarch))
@@ -295,7 +293,7 @@ static struct value *
 tailcall_frame_prev_register (struct frame_info *this_frame,
 			       void **this_cache, int regnum)
 {
-  struct tailcall_cache *cache = *this_cache;
+  struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
   struct value *val;
 
   gdb_assert (this_frame != cache->next_bottom_frame);
@@ -388,13 +386,15 @@ dwarf2_tailcall_sniffer_first (struct fr
       /* call_site_find_chain can throw an exception.  */
       chain = call_site_find_chain (prev_gdbarch, prev_pc, this_pc);
 
-      if (entry_cfa_sp_offsetp == NULL)
-	break;
-      sp_regnum = gdbarch_sp_regnum (prev_gdbarch);
-      if (sp_regnum == -1)
-	break;
-      prev_sp = frame_unwind_register_unsigned (this_frame, sp_regnum);
-      prev_sp_p = 1;
+      if (entry_cfa_sp_offsetp != NULL)
+	{
+	  sp_regnum = gdbarch_sp_regnum (prev_gdbarch);
+	  if (sp_regnum != -1)
+	    {
+	      prev_sp = frame_unwind_register_unsigned (this_frame, sp_regnum);
+	      prev_sp_p = 1;
+	    }
+	}
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
@@ -432,7 +432,7 @@ dwarf2_tailcall_sniffer_first (struct fr
 static void
 tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache)
 {
-  struct tailcall_cache *cache = this_cache;
+  struct tailcall_cache *cache = (struct tailcall_cache *) this_cache;
 
   cache_unref (cache);
 }
@@ -444,7 +444,7 @@ static struct gdbarch *
 tailcall_frame_prev_arch (struct frame_info *this_frame,
 			  void **this_prologue_cache)
 {
-  struct tailcall_cache *cache = *this_prologue_cache;
+  struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache;
 
   return get_frame_arch (cache->next_bottom_frame);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame-tailcall.h ./gdb/dwarf2-frame-tailcall.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2-frame-tailcall.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2-frame-tailcall.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for virtual tail call frames unwinder for GDB.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2loc.c ./gdb/dwarf2loc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2loc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2loc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DWARF 2 location expression support for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by Daniel Jacobowitz, MontaVista Software, Inc.
 
@@ -32,17 +32,19 @@
 #include "objfiles.h"
 #include "block.h"
 #include "gdbcmd.h"
-
+#include "complaints.h"
 #include "dwarf2.h"
 #include "dwarf2expr.h"
 #include "dwarf2loc.h"
 #include "dwarf2-frame.h"
 #include "compile/compile.h"
+#include "selftest.h"
+#include <algorithm>
+#include <vector>
+#include <unordered_set>
 
 extern int dwarf_always_disassemble;
 
-extern const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
-
 static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
 						    struct frame_info *frame,
 						    const gdb_byte *data,
@@ -50,6 +52,12 @@ static struct value *dwarf2_evaluate_loc
 						    struct dwarf2_per_cu_data *per_cu,
 						    LONGEST byte_offset);
 
+static struct call_site_parameter *dwarf_expr_reg_to_entry_parameter
+    (struct frame_info *frame,
+     enum call_site_parameter_kind kind,
+     union call_site_parameter_u kind_u,
+     struct dwarf2_per_cu_data **per_cu_return);
+
 /* Until these have formal names, we define these here.
    ref: http://gcc.gnu.org/wiki/DebugFission
    Each entry in .debug_loc.dwo begins with a byte that describes the entry,
@@ -135,6 +143,57 @@ decode_debug_loc_addresses (const gdb_by
   return DEBUG_LOC_START_END;
 }
 
+/* Decode the addresses in .debug_loclists entry.
+   A pointer to the next byte to examine is returned in *NEW_PTR.
+   The encoded low,high addresses are return in *LOW,*HIGH.
+   The result indicates the kind of entry found.  */
+
+static enum debug_loc_kind
+decode_debug_loclists_addresses (struct dwarf2_per_cu_data *per_cu,
+				 const gdb_byte *loc_ptr,
+				 const gdb_byte *buf_end,
+				 const gdb_byte **new_ptr,
+				 CORE_ADDR *low, CORE_ADDR *high,
+				 enum bfd_endian byte_order,
+				 unsigned int addr_size,
+				 int signed_addr_p)
+{
+  uint64_t u64;
+
+  if (loc_ptr == buf_end)
+    return DEBUG_LOC_BUFFER_OVERFLOW;
+
+  switch (*loc_ptr++)
+    {
+    case DW_LLE_end_of_list:
+      *new_ptr = loc_ptr;
+      return DEBUG_LOC_END_OF_LIST;
+    case DW_LLE_base_address:
+      if (loc_ptr + addr_size > buf_end)
+	return DEBUG_LOC_BUFFER_OVERFLOW;
+      if (signed_addr_p)
+	*high = extract_signed_integer (loc_ptr, addr_size, byte_order);
+      else
+	*high = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
+      loc_ptr += addr_size;
+      *new_ptr = loc_ptr;
+      return DEBUG_LOC_BASE_ADDRESS;
+    case DW_LLE_offset_pair:
+      loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64);
+      if (loc_ptr == NULL)
+	return DEBUG_LOC_BUFFER_OVERFLOW;
+      *low = u64;
+      loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64);
+      if (loc_ptr == NULL)
+	return DEBUG_LOC_BUFFER_OVERFLOW;
+      *high = u64;
+      *new_ptr = loc_ptr;
+      return DEBUG_LOC_START_END;
+    default:
+      return DEBUG_LOC_INVALID_ENTRY;
+    }
+}
+
 /* Decode the addresses in .debug_loc.dwo entry.
    A pointer to the next byte to examine is returned in *NEW_PTR.
    The encoded low,high addresses are return in *LOW,*HIGH.
@@ -155,10 +214,10 @@ decode_debug_loc_dwo_addresses (struct d
 
   switch (*loc_ptr++)
     {
-    case DEBUG_LOC_END_OF_LIST:
+    case DW_LLE_GNU_end_of_list_entry:
       *new_ptr = loc_ptr;
       return DEBUG_LOC_END_OF_LIST;
-    case DEBUG_LOC_BASE_ADDRESS:
+    case DW_LLE_GNU_base_address_selection_entry:
       *low = 0;
       loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &high_index);
       if (loc_ptr == NULL)
@@ -166,7 +225,7 @@ decode_debug_loc_dwo_addresses (struct d
       *high = dwarf2_read_addr_index (per_cu, high_index);
       *new_ptr = loc_ptr;
       return DEBUG_LOC_BASE_ADDRESS;
-    case DEBUG_LOC_START_END:
+    case DW_LLE_GNU_start_end_entry:
       loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &low_index);
       if (loc_ptr == NULL)
 	return DEBUG_LOC_BUFFER_OVERFLOW;
@@ -177,7 +236,7 @@ decode_debug_loc_dwo_addresses (struct d
       *high = dwarf2_read_addr_index (per_cu, high_index);
       *new_ptr = loc_ptr;
       return DEBUG_LOC_START_END;
-    case DEBUG_LOC_START_LENGTH:
+    case DW_LLE_GNU_start_length_entry:
       loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &low_index);
       if (loc_ptr == NULL)
 	return DEBUG_LOC_BUFFER_OVERFLOW;
@@ -229,11 +288,17 @@ dwarf2_find_location_expression (struct 
 	kind = decode_debug_loc_dwo_addresses (baton->per_cu,
 					       loc_ptr, buf_end, &new_ptr,
 					       &low, &high, byte_order);
-      else
+      else if (dwarf2_version (baton->per_cu) < 5)
 	kind = decode_debug_loc_addresses (loc_ptr, buf_end, &new_ptr,
 					   &low, &high,
 					   byte_order, addr_size,
 					   signed_addr_p);
+      else
+	kind = decode_debug_loclists_addresses (baton->per_cu,
+						loc_ptr, buf_end, &new_ptr,
+						&low, &high, byte_order,
+						addr_size, signed_addr_p);
+
       loc_ptr = new_ptr;
       switch (kind)
 	{
@@ -255,16 +320,32 @@ dwarf2_find_location_expression (struct 
 	}
 
       /* Otherwise, a location expression entry.
-	 If the entry is from a DWO, don't add base address: the entry is
-	 from .debug_addr which has absolute addresses.  */
-      if (! baton->from_dwo)
+	 If the entry is from a DWO, don't add base address: the entry is from
+	 .debug_addr which already has the DWARF "base address".  We still add
+	 base_offset in case we're debugging a PIE executable.  */
+      if (baton->from_dwo)
+	{
+	  low += base_offset;
+	  high += base_offset;
+	}
+      else
 	{
 	  low += base_address;
 	  high += base_address;
 	}
 
-      length = extract_unsigned_integer (loc_ptr, 2, byte_order);
-      loc_ptr += 2;
+      if (dwarf2_version (baton->per_cu) < 5)
+	{
+	  length = extract_unsigned_integer (loc_ptr, 2, byte_order);
+	  loc_ptr += 2;
+	}
+      else
+	{
+	  unsigned int bytes_read;
+
+	  length = read_unsigned_leb128 (NULL, loc_ptr, &bytes_read);
+	  loc_ptr += bytes_read;
+	}
 
       if (low == high && pc == low)
 	{
@@ -303,71 +384,6 @@ struct dwarf_expr_baton
   CORE_ADDR obj_address;
 };
 
-/* Helper functions for dwarf2_evaluate_loc_desc.  */
-
-/* Using the frame specified in BATON, return the value of register
-   REGNUM, treated as a pointer.  */
-static CORE_ADDR
-dwarf_expr_read_addr_from_reg (void *baton, int dwarf_regnum)
-{
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
-  struct gdbarch *gdbarch = get_frame_arch (debaton->frame);
-  int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_regnum);
-
-  return address_from_register (regnum, debaton->frame);
-}
-
-/* Implement struct dwarf_expr_context_funcs' "get_reg_value" callback.  */
-
-static struct value *
-dwarf_expr_get_reg_value (void *baton, struct type *type, int dwarf_regnum)
-{
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
-  struct gdbarch *gdbarch = get_frame_arch (debaton->frame);
-  int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_regnum);
-
-  return value_from_register (type, regnum, debaton->frame);
-}
-
-/* Read memory at ADDR (length LEN) into BUF.  */
-
-static void
-dwarf_expr_read_mem (void *baton, gdb_byte *buf, CORE_ADDR addr, size_t len)
-{
-  read_memory (addr, buf, len);
-}
-
-/* Using the frame specified in BATON, find the location expression
-   describing the frame base.  Return a pointer to it in START and
-   its length in LENGTH.  */
-static void
-dwarf_expr_frame_base (void *baton, const gdb_byte **start, size_t * length)
-{
-  /* FIXME: cagney/2003-03-26: This code should be using
-     get_frame_base_address(), and then implement a dwarf2 specific
-     this_base method.  */
-  struct symbol *framefunc;
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
-  const struct block *bl = get_frame_block (debaton->frame, NULL);
-
-  if (bl == NULL)
-    error (_("frame address is not available."));
-
-  /* Use block_linkage_function, which returns a real (not inlined)
-     function, instead of get_frame_function, which may return an
-     inlined function.  */
-  framefunc = block_linkage_function (bl);
-
-  /* If we found a frame-relative symbol then it was certainly within
-     some function associated with a frame. If we can't find the frame,
-     something has gone wrong.  */
-  gdb_assert (framefunc != NULL);
-
-  func_get_frame_base_dwarf_block (framefunc,
-				   get_frame_address_in_block (debaton->frame),
-				   start, length);
-}
-
 /* Implement find_frame_base_location method for LOC_BLOCK functions using
    DWARF expression for its DW_AT_frame_base.  */
 
@@ -375,18 +391,55 @@ static void
 locexpr_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
 				  const gdb_byte **start, size_t *length)
 {
-  struct dwarf2_locexpr_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+  struct dwarf2_locexpr_baton *symbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
 
   *length = symbaton->size;
   *start = symbaton->data;
 }
 
+/* Implement the struct symbol_block_ops::get_frame_base method for
+   LOC_BLOCK functions using a DWARF expression as its DW_AT_frame_base.  */
+
+static CORE_ADDR
+locexpr_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
+{
+  struct gdbarch *gdbarch;
+  struct type *type;
+  struct dwarf2_locexpr_baton *dlbaton;
+  const gdb_byte *start;
+  size_t length;
+  struct value *result;
+
+  /* If this method is called, then FRAMEFUNC is supposed to be a DWARF block.
+     Thus, it's supposed to provide the find_frame_base_location method as
+     well.  */
+  gdb_assert (SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
+
+  gdbarch = get_frame_arch (frame);
+  type = builtin_type (gdbarch)->builtin_data_ptr;
+  dlbaton = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
+
+  SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
+    (framefunc, get_frame_pc (frame), &start, &length);
+  result = dwarf2_evaluate_loc_desc (type, frame, start, length,
+				     dlbaton->per_cu);
+
+  /* The DW_AT_frame_base attribute contains a location description which
+     computes the base address itself.  However, the call to
+     dwarf2_evaluate_loc_desc returns a value representing a variable at
+     that address.  The frame base address is thus this variable's
+     address.  */
+  return value_address (result);
+}
+
 /* Vector for inferior functions as represented by LOC_BLOCK, if the inferior
    function uses DWARF expression for its DW_AT_frame_base.  */
 
 const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs =
 {
-  locexpr_find_frame_base_location
+  locexpr_find_frame_base_location,
+  locexpr_get_frame_base
 };
 
 /* Implement find_frame_base_location method for LOC_BLOCK functions using
@@ -396,17 +449,54 @@ static void
 loclist_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
 				  const gdb_byte **start, size_t *length)
 {
-  struct dwarf2_loclist_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+  struct dwarf2_loclist_baton *symbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
 
   *start = dwarf2_find_location_expression (symbaton, length, pc);
 }
 
+/* Implement the struct symbol_block_ops::get_frame_base method for
+   LOC_BLOCK functions using a DWARF location list as its DW_AT_frame_base.  */
+
+static CORE_ADDR
+loclist_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
+{
+  struct gdbarch *gdbarch;
+  struct type *type;
+  struct dwarf2_loclist_baton *dlbaton;
+  const gdb_byte *start;
+  size_t length;
+  struct value *result;
+
+  /* If this method is called, then FRAMEFUNC is supposed to be a DWARF block.
+     Thus, it's supposed to provide the find_frame_base_location method as
+     well.  */
+  gdb_assert (SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
+
+  gdbarch = get_frame_arch (frame);
+  type = builtin_type (gdbarch)->builtin_data_ptr;
+  dlbaton = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
+
+  SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
+    (framefunc, get_frame_pc (frame), &start, &length);
+  result = dwarf2_evaluate_loc_desc (type, frame, start, length,
+				     dlbaton->per_cu);
+
+  /* The DW_AT_frame_base attribute contains a location description which
+     computes the base address itself.  However, the call to
+     dwarf2_evaluate_loc_desc returns a value representing a variable at
+     that address.  The frame base address is thus this variable's
+     address.  */
+  return value_address (result);
+}
+
 /* Vector for inferior functions as represented by LOC_BLOCK, if the inferior
    function uses DWARF location list for its DW_AT_frame_base.  */
 
 const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs =
 {
-  loclist_find_frame_base_location
+  loclist_find_frame_base_location,
+  loclist_get_frame_base
 };
 
 /* See dwarf2loc.h.  */
@@ -429,80 +519,203 @@ func_get_frame_base_dwarf_block (struct 
 	   SYMBOL_NATURAL_NAME (framefunc));
 }
 
-/* Helper function for dwarf2_evaluate_loc_desc.  Computes the CFA for
-   the frame in BATON.  */
-
 static CORE_ADDR
-dwarf_expr_frame_cfa (void *baton)
+get_frame_pc_for_per_cu_dwarf_call (void *baton)
 {
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
+  dwarf_expr_context *ctx = (dwarf_expr_context *) baton;
 
-  return dwarf2_frame_cfa (debaton->frame);
+  return ctx->get_frame_pc ();
 }
 
-/* Helper function for dwarf2_evaluate_loc_desc.  Computes the PC for
-   the frame in BATON.  */
-
-static CORE_ADDR
-dwarf_expr_frame_pc (void *baton)
+static void
+per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
+		   struct dwarf2_per_cu_data *per_cu)
 {
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
+  struct dwarf2_locexpr_baton block;
+
+  block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu,
+				       get_frame_pc_for_per_cu_dwarf_call,
+				       ctx);
+
+  /* DW_OP_call_ref is currently not supported.  */
+  gdb_assert (block.per_cu == per_cu);
 
-  return get_frame_address_in_block (debaton->frame);
+  ctx->eval (block.data, block.size);
 }
 
-/* Using the objfile specified in BATON, find the address for the
-   current thread's thread-local storage with offset OFFSET.  */
-static CORE_ADDR
-dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
+class dwarf_evaluate_loc_desc : public dwarf_expr_context
 {
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
-  struct objfile *objfile = dwarf2_per_cu_objfile (debaton->per_cu);
+ public:
 
-  return target_translate_tls_address (objfile, offset);
-}
+  struct frame_info *frame;
+  struct dwarf2_per_cu_data *per_cu;
+  CORE_ADDR obj_address;
 
-/* Call DWARF subroutine from DW_AT_location of DIE at DIE_OFFSET in
-   current CU (as is PER_CU).  State of the CTX is not affected by the
-   call and return.  */
+  /* Helper function for dwarf2_evaluate_loc_desc.  Computes the CFA for
+     the frame in BATON.  */
 
-static void
-per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
-		   struct dwarf2_per_cu_data *per_cu,
-		   CORE_ADDR (*get_frame_pc) (void *baton),
-		   void *baton)
-{
-  struct dwarf2_locexpr_baton block;
+  CORE_ADDR get_frame_cfa () OVERRIDE
+  {
+    return dwarf2_frame_cfa (frame);
+  }
 
-  block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu, get_frame_pc, baton);
+  /* Helper function for dwarf2_evaluate_loc_desc.  Computes the PC for
+     the frame in BATON.  */
 
-  /* DW_OP_call_ref is currently not supported.  */
-  gdb_assert (block.per_cu == per_cu);
+  CORE_ADDR get_frame_pc () OVERRIDE
+  {
+    return get_frame_address_in_block (frame);
+  }
 
-  dwarf_expr_eval (ctx, block.data, block.size);
-}
+  /* Using the objfile specified in BATON, find the address for the
+     current thread's thread-local storage with offset OFFSET.  */
+  CORE_ADDR get_tls_address (CORE_ADDR offset) OVERRIDE
+  {
+    struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
 
-/* Helper interface of per_cu_dwarf_call for dwarf2_evaluate_loc_desc.  */
+    return target_translate_tls_address (objfile, offset);
+  }
 
-static void
-dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
-{
-  struct dwarf_expr_baton *debaton = ctx->baton;
+  /* Helper interface of per_cu_dwarf_call for
+     dwarf2_evaluate_loc_desc.  */
 
-  per_cu_dwarf_call (ctx, die_offset, debaton->per_cu,
-		     ctx->funcs->get_frame_pc, ctx->baton);
-}
+  void dwarf_call (cu_offset die_offset) OVERRIDE
+  {
+    per_cu_dwarf_call (this, die_offset, per_cu);
+  }
+
+  struct type *get_base_type (cu_offset die_offset, int size) OVERRIDE
+  {
+    struct type *result = dwarf2_get_die_type (die_offset, per_cu);
+    if (result == NULL)
+      error (_("Could not find type for DW_OP_const_type"));
+    if (size != 0 && TYPE_LENGTH (result) != size)
+      error (_("DW_OP_const_type has different sizes for type and data"));
+    return result;
+  }
 
-/* Callback function for dwarf2_evaluate_loc_desc.  */
+  /* Callback function for dwarf2_evaluate_loc_desc.
+     Fetch the address indexed by DW_OP_GNU_addr_index.  */
 
-static struct type *
-dwarf_expr_get_base_type (struct dwarf_expr_context *ctx,
-			  cu_offset die_offset)
-{
-  struct dwarf_expr_baton *debaton = ctx->baton;
+  CORE_ADDR get_addr_index (unsigned int index) OVERRIDE
+  {
+    return dwarf2_read_addr_index (per_cu, index);
+  }
 
-  return dwarf2_get_die_type (die_offset, debaton->per_cu);
-}
+  /* Callback function for get_object_address. Return the address of the VLA
+     object.  */
+
+  CORE_ADDR get_object_address () OVERRIDE
+  {
+    if (obj_address == 0)
+      error (_("Location address is not set."));
+    return obj_address;
+  }
+
+  /* Execute DWARF block of call_site_parameter which matches KIND and
+     KIND_U.  Choose DEREF_SIZE value of that parameter.  Search
+     caller of this objects's frame.
+
+     The caller can be from a different CU - per_cu_dwarf_call
+     implementation can be more simple as it does not support cross-CU
+     DWARF executions.  */
+
+  void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind,
+				   union call_site_parameter_u kind_u,
+				   int deref_size) OVERRIDE
+  {
+    struct frame_info *caller_frame;
+    struct dwarf2_per_cu_data *caller_per_cu;
+    struct call_site_parameter *parameter;
+    const gdb_byte *data_src;
+    size_t size;
+
+    caller_frame = get_prev_frame (frame);
+
+    parameter = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u,
+						   &caller_per_cu);
+    data_src = deref_size == -1 ? parameter->value : parameter->data_value;
+    size = deref_size == -1 ? parameter->value_size : parameter->data_value_size;
+
+    /* DEREF_SIZE size is not verified here.  */
+    if (data_src == NULL)
+      throw_error (NO_ENTRY_VALUE_ERROR,
+		   _("Cannot resolve DW_AT_call_data_value"));
+
+    scoped_restore save_frame = make_scoped_restore (&this->frame,
+						     caller_frame);
+    scoped_restore save_per_cu = make_scoped_restore (&this->per_cu,
+						      caller_per_cu);
+    scoped_restore save_obj_addr = make_scoped_restore (&this->obj_address,
+							(CORE_ADDR) 0);
+
+    scoped_restore save_arch = make_scoped_restore (&this->gdbarch);
+    this->gdbarch
+      = get_objfile_arch (dwarf2_per_cu_objfile (per_cu));
+    scoped_restore save_addr_size = make_scoped_restore (&this->addr_size);
+    this->addr_size = dwarf2_per_cu_addr_size (per_cu);
+    scoped_restore save_offset = make_scoped_restore (&this->offset);
+    this->offset = dwarf2_per_cu_text_offset (per_cu);
+
+    this->eval (data_src, size);
+  }
+
+  /* Using the frame specified in BATON, find the location expression
+     describing the frame base.  Return a pointer to it in START and
+     its length in LENGTH.  */
+  void get_frame_base (const gdb_byte **start, size_t * length) OVERRIDE
+  {
+    /* FIXME: cagney/2003-03-26: This code should be using
+       get_frame_base_address(), and then implement a dwarf2 specific
+       this_base method.  */
+    struct symbol *framefunc;
+    const struct block *bl = get_frame_block (frame, NULL);
+
+    if (bl == NULL)
+      error (_("frame address is not available."));
+
+    /* Use block_linkage_function, which returns a real (not inlined)
+       function, instead of get_frame_function, which may return an
+       inlined function.  */
+    framefunc = block_linkage_function (bl);
+
+    /* If we found a frame-relative symbol then it was certainly within
+       some function associated with a frame. If we can't find the frame,
+       something has gone wrong.  */
+    gdb_assert (framefunc != NULL);
+
+    func_get_frame_base_dwarf_block (framefunc,
+				     get_frame_address_in_block (frame),
+				     start, length);
+  }
+
+  /* Read memory at ADDR (length LEN) into BUF.  */
+
+  void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t len) OVERRIDE
+  {
+    read_memory (addr, buf, len);
+  }
+
+  /* Using the frame specified in BATON, return the value of register
+     REGNUM, treated as a pointer.  */
+  CORE_ADDR read_addr_from_reg (int dwarf_regnum) OVERRIDE
+  {
+    struct gdbarch *gdbarch = get_frame_arch (frame);
+    int regnum = dwarf_reg_to_regnum_or_error (gdbarch, dwarf_regnum);
+
+    return address_from_register (regnum, frame);
+  }
+
+  /* Implement "get_reg_value" callback.  */
+
+  struct value *get_reg_value (struct type *type, int dwarf_regnum) OVERRIDE
+  {
+    struct gdbarch *gdbarch = get_frame_arch (frame);
+    int regnum = dwarf_reg_to_regnum_or_error (gdbarch, dwarf_regnum);
+
+    return value_from_register (type, regnum, frame);
+  }
+};
 
 /* See dwarf2loc.h.  */
 
@@ -519,7 +732,7 @@ show_entry_values_debug (struct ui_file 
 		    value);
 }
 
-/* Find DW_TAG_GNU_call_site's DW_AT_GNU_call_site_target address.
+/* Find DW_TAG_call_site's DW_AT_call_target address.
    CALLER_FRAME (for registers) can be NULL if it is not known.  This function
    always returns valid address or it throws NO_ENTRY_VALUE_ERROR.  */
 
@@ -544,8 +757,7 @@ call_site_to_target_addr (struct gdbarch
 	    
 	    msym = lookup_minimal_symbol_by_pc (call_site->pc - 1);
 	    throw_error (NO_ENTRY_VALUE_ERROR,
-			 _("DW_AT_GNU_call_site_target is not specified "
-			   "at %s in %s"),
+			 _("DW_AT_call_target is not specified at %s in %s"),
 			 paddress (call_site_gdbarch, call_site->pc),
 			 (msym.minsym == NULL ? "???"
 			  : MSYMBOL_PRINT_NAME (msym.minsym)));
@@ -557,7 +769,7 @@ call_site_to_target_addr (struct gdbarch
 	    
 	    msym = lookup_minimal_symbol_by_pc (call_site->pc - 1);
 	    throw_error (NO_ENTRY_VALUE_ERROR,
-			 _("DW_AT_GNU_call_site_target DWARF block resolving "
+			 _("DW_AT_call_target DWARF block resolving "
 			   "requires known frame which is currently not "
 			   "available at %s in %s"),
 			 paddress (call_site_gdbarch, call_site->pc),
@@ -570,8 +782,7 @@ call_site_to_target_addr (struct gdbarch
 	val = dwarf2_evaluate_loc_desc (caller_core_addr_type, caller_frame,
 					dwarf_block->data, dwarf_block->size,
 					dwarf_block->per_cu);
-	/* DW_AT_GNU_call_site_target is a DWARF expression, not a DWARF
-	   location.  */
+	/* DW_AT_call_target is a DWARF expression, not a DWARF location.  */
 	if (VALUE_LVAL (val) == lval_memory)
 	  return value_address (val);
 	else
@@ -621,7 +832,7 @@ func_addr_to_tail_call_list (struct gdba
 
   if (sym == NULL || BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) != addr)
     throw_error (NO_ENTRY_VALUE_ERROR,
-		 _("DW_TAG_GNU_call_site resolving failed to find function "
+		 _("DW_TAG_call_site resolving failed to find function "
 		   "name for address %s"),
 		 paddress (gdbarch, addr));
 
@@ -644,33 +855,23 @@ func_addr_to_tail_call_list (struct gdba
 static void
 func_verify_no_selftailcall (struct gdbarch *gdbarch, CORE_ADDR verify_addr)
 {
-  struct obstack addr_obstack;
-  struct cleanup *old_chain;
   CORE_ADDR addr;
 
-  /* Track here CORE_ADDRs which were already visited.  */
-  htab_t addr_hash;
-
   /* The verification is completely unordered.  Track here function addresses
      which still need to be iterated.  */
-  VEC (CORE_ADDR) *todo = NULL;
+  std::vector<CORE_ADDR> todo;
 
-  obstack_init (&addr_obstack);
-  old_chain = make_cleanup_obstack_free (&addr_obstack);   
-  addr_hash = htab_create_alloc_ex (64, core_addr_hash, core_addr_eq, NULL,
-				    &addr_obstack, hashtab_obstack_allocate,
-				    NULL);
-  make_cleanup_htab_delete (addr_hash);
-
-  make_cleanup (VEC_cleanup (CORE_ADDR), &todo);
+  /* Track here CORE_ADDRs which were already visited.  */
+  std::unordered_set<CORE_ADDR> addr_hash;
 
-  VEC_safe_push (CORE_ADDR, todo, verify_addr);
-  while (!VEC_empty (CORE_ADDR, todo))
+  todo.push_back (verify_addr);
+  while (!todo.empty ())
     {
       struct symbol *func_sym;
       struct call_site *call_site;
 
-      addr = VEC_pop (CORE_ADDR, todo);
+      addr = todo.back ();
+      todo.pop_back ();
 
       func_sym = func_addr_to_tail_call_list (gdbarch, addr);
 
@@ -678,7 +879,6 @@ func_verify_no_selftailcall (struct gdba
 	   call_site; call_site = call_site->tail_call_next)
 	{
 	  CORE_ADDR target_addr;
-	  void **slot;
 
 	  /* CALLER_FRAME with registers is not available for tail-call jumped
 	     frames.  */
@@ -690,7 +890,7 @@ func_verify_no_selftailcall (struct gdba
 	      
 	      msym = lookup_minimal_symbol_by_pc (verify_addr);
 	      throw_error (NO_ENTRY_VALUE_ERROR,
-			   _("DW_OP_GNU_entry_value resolving has found "
+			   _("DW_OP_entry_value resolving has found "
 			     "function \"%s\" at %s can call itself via tail "
 			     "calls"),
 			   (msym.minsym == NULL ? "???"
@@ -698,17 +898,10 @@ func_verify_no_selftailcall (struct gdba
 			   paddress (gdbarch, verify_addr));
 	    }
 
-	  slot = htab_find_slot (addr_hash, &target_addr, INSERT);
-	  if (*slot == NULL)
-	    {
-	      *slot = obstack_copy (&addr_obstack, &target_addr,
-				    sizeof (target_addr));
-	      VEC_safe_push (CORE_ADDR, todo, target_addr);
-	    }
+	  if (addr_hash.insert (target_addr).second)
+	    todo.push_back (target_addr);
 	}
     }
-
-  do_cleanups (old_chain);
 }
 
 /* Print user readable form of CALL_SITE->PC to gdb_stdlog.  Used only for
@@ -726,12 +919,6 @@ tailcall_dump (struct gdbarch *gdbarch, 
 
 }
 
-/* vec.h needs single word type name, typedef it.  */
-typedef struct call_site *call_sitep;
-
-/* Define VEC (call_sitep) functions.  */
-DEF_VEC_P (call_sitep);
-
 /* Intersect RESULTP with CHAIN to keep RESULTP unambiguous, keep in RESULTP
    only top callers and bottom callees which are present in both.  GDBARCH is
    used only for ENTRY_VALUES_DEBUG.  RESULTP is NULL after return if there are
@@ -740,25 +927,27 @@ DEF_VEC_P (call_sitep);
    responsible for xfree of any RESULTP data.  */
 
 static void
-chain_candidate (struct gdbarch *gdbarch, struct call_site_chain **resultp,
-		 VEC (call_sitep) *chain)
+chain_candidate (struct gdbarch *gdbarch,
+		 gdb::unique_xmalloc_ptr<struct call_site_chain> *resultp,
+		 std::vector<struct call_site *> *chain)
 {
-  struct call_site_chain *result = *resultp;
-  long length = VEC_length (call_sitep, chain);
+  long length = chain->size ();
   int callers, callees, idx;
 
-  if (result == NULL)
+  if (*resultp == NULL)
     {
       /* Create the initial chain containing all the passed PCs.  */
 
-      result = xmalloc (sizeof (*result) + sizeof (*result->call_site)
-					   * (length - 1));
+      struct call_site_chain *result
+	= ((struct call_site_chain *)
+	   xmalloc (sizeof (*result)
+		    + sizeof (*result->call_site) * (length - 1)));
       result->length = length;
       result->callers = result->callees = length;
-      if (!VEC_empty (call_sitep, chain))
-	memcpy (result->call_site, VEC_address (call_sitep, chain),
+      if (!chain->empty ())
+	memcpy (result->call_site, chain->data (),
 		sizeof (*result->call_site) * length);
-      *resultp = result;
+      resultp->reset (result);
 
       if (entry_values_debug)
 	{
@@ -775,58 +964,58 @@ chain_candidate (struct gdbarch *gdbarch
     {
       fprintf_unfiltered (gdb_stdlog, "tailcall: compare:");
       for (idx = 0; idx < length; idx++)
-	tailcall_dump (gdbarch, VEC_index (call_sitep, chain, idx));
+	tailcall_dump (gdbarch, chain->at (idx));
       fputc_unfiltered ('\n', gdb_stdlog);
     }
 
   /* Intersect callers.  */
 
-  callers = min (result->callers, length);
+  callers = std::min ((long) (*resultp)->callers, length);
   for (idx = 0; idx < callers; idx++)
-    if (result->call_site[idx] != VEC_index (call_sitep, chain, idx))
+    if ((*resultp)->call_site[idx] != chain->at (idx))
       {
-	result->callers = idx;
+	(*resultp)->callers = idx;
 	break;
       }
 
   /* Intersect callees.  */
 
-  callees = min (result->callees, length);
+  callees = std::min ((long) (*resultp)->callees, length);
   for (idx = 0; idx < callees; idx++)
-    if (result->call_site[result->length - 1 - idx]
-	!= VEC_index (call_sitep, chain, length - 1 - idx))
+    if ((*resultp)->call_site[(*resultp)->length - 1 - idx]
+	!= chain->at (length - 1 - idx))
       {
-	result->callees = idx;
+	(*resultp)->callees = idx;
 	break;
       }
 
   if (entry_values_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "tailcall: reduced:");
-      for (idx = 0; idx < result->callers; idx++)
-	tailcall_dump (gdbarch, result->call_site[idx]);
+      for (idx = 0; idx < (*resultp)->callers; idx++)
+	tailcall_dump (gdbarch, (*resultp)->call_site[idx]);
       fputs_unfiltered (" |", gdb_stdlog);
-      for (idx = 0; idx < result->callees; idx++)
-	tailcall_dump (gdbarch, result->call_site[result->length
-						  - result->callees + idx]);
+      for (idx = 0; idx < (*resultp)->callees; idx++)
+	tailcall_dump (gdbarch,
+		       (*resultp)->call_site[(*resultp)->length
+					     - (*resultp)->callees + idx]);
       fputc_unfiltered ('\n', gdb_stdlog);
     }
 
-  if (result->callers == 0 && result->callees == 0)
+  if ((*resultp)->callers == 0 && (*resultp)->callees == 0)
     {
       /* There are no common callers or callees.  It could be also a direct
 	 call (which has length 0) with ambiguous possibility of an indirect
 	 call - CALLERS == CALLEES == 0 is valid during the first allocation
 	 but any subsequence processing of such entry means ambiguity.  */
-      xfree (result);
-      *resultp = NULL;
+      resultp->reset (NULL);
       return;
     }
 
   /* See call_site_find_chain_1 why there is no way to reach the bottom callee
      PC again.  In such case there must be two different code paths to reach
      it.  CALLERS + CALLEES equal to LENGTH in the case of self tail-call.  */
-  gdb_assert (result->callers + result->callees <= result->length);
+  gdb_assert ((*resultp)->callers + (*resultp)->callees <= (*resultp)->length);
 }
 
 /* Create and return call_site_chain for CALLER_PC and CALLEE_PC.  All the
@@ -841,19 +1030,14 @@ call_site_find_chain_1 (struct gdbarch *
 			CORE_ADDR callee_pc)
 {
   CORE_ADDR save_callee_pc = callee_pc;
-  struct obstack addr_obstack;
-  struct cleanup *back_to_retval, *back_to_workdata;
-  struct call_site_chain *retval = NULL;
+  gdb::unique_xmalloc_ptr<struct call_site_chain> retval;
   struct call_site *call_site;
 
-  /* Mark CALL_SITEs so we do not visit the same ones twice.  */
-  htab_t addr_hash;
-
   /* CHAIN contains only the intermediate CALL_SITEs.  Neither CALLER_PC's
      call_site nor any possible call_site at CALLEE_PC's function is there.
      Any CALL_SITE in CHAIN will be iterated to its siblings - via
      TAIL_CALL_NEXT.  This is inappropriate for CALLER_PC's call_site.  */
-  VEC (call_sitep) *chain = NULL;
+  std::vector<struct call_site *> chain;
 
   /* We are not interested in the specific PC inside the callee function.  */
   callee_pc = get_pc_function_start (callee_pc);
@@ -861,16 +1045,8 @@ call_site_find_chain_1 (struct gdbarch *
     throw_error (NO_ENTRY_VALUE_ERROR, _("Unable to find function for PC %s"),
 		 paddress (gdbarch, save_callee_pc));
 
-  back_to_retval = make_cleanup (free_current_contents, &retval);
-
-  obstack_init (&addr_obstack);
-  back_to_workdata = make_cleanup_obstack_free (&addr_obstack);   
-  addr_hash = htab_create_alloc_ex (64, core_addr_hash, core_addr_eq, NULL,
-				    &addr_obstack, hashtab_obstack_allocate,
-				    NULL);
-  make_cleanup_htab_delete (addr_hash);
-
-  make_cleanup (VEC_cleanup (call_sitep), &chain);
+  /* Mark CALL_SITEs so we do not visit the same ones twice.  */
+  std::unordered_set<CORE_ADDR> addr_hash;
 
   /* Do not push CALL_SITE to CHAIN.  Push there only the first tail call site
      at the target's function.  All the possible tail call sites in the
@@ -889,7 +1065,7 @@ call_site_find_chain_1 (struct gdbarch *
 
       if (target_func_addr == callee_pc)
 	{
-	  chain_candidate (gdbarch, &retval, chain);
+	  chain_candidate (gdbarch, &retval, &chain);
 	  if (retval == NULL)
 	    break;
 
@@ -911,15 +1087,11 @@ call_site_find_chain_1 (struct gdbarch *
 
 	  if (target_call_site)
 	    {
-	      void **slot;
-
-	      slot = htab_find_slot (addr_hash, &target_call_site->pc, INSERT);
-	      if (*slot == NULL)
+	      if (addr_hash.insert (target_call_site->pc).second)
 		{
 		  /* Successfully entered TARGET_CALL_SITE.  */
 
-		  *slot = &target_call_site->pc;
-		  VEC_safe_push (call_sitep, chain, target_call_site);
+		  chain.push_back (target_call_site);
 		  break;
 		}
 	    }
@@ -929,13 +1101,13 @@ call_site_find_chain_1 (struct gdbarch *
 	     sibling etc.  */
 
 	  target_call_site = NULL;
-	  while (!VEC_empty (call_sitep, chain))
+	  while (!chain.empty ())
 	    {
-	      call_site = VEC_pop (call_sitep, chain);
+	      call_site = chain.back ();
+	      chain.pop_back ();
 
-	      gdb_assert (htab_find_slot (addr_hash, &call_site->pc,
-					  NO_INSERT) != NULL);
-	      htab_remove_elt (addr_hash, &call_site->pc);
+	      size_t removed = addr_hash.erase (call_site->pc);
+	      gdb_assert (removed == 1);
 
 	      target_call_site = call_site->tail_call_next;
 	      if (target_call_site)
@@ -944,10 +1116,10 @@ call_site_find_chain_1 (struct gdbarch *
 	}
       while (target_call_site);
 
-      if (VEC_empty (call_sitep, chain))
+      if (chain.empty ())
 	call_site = NULL;
       else
-	call_site = VEC_last (call_sitep, chain);
+	call_site = chain.back ();
     }
 
   if (retval == NULL)
@@ -968,9 +1140,7 @@ call_site_find_chain_1 (struct gdbarch *
 		   paddress (gdbarch, callee_pc));
     }
 
-  do_cleanups (back_to_workdata);
-  discard_cleanups (back_to_retval);
-  return retval;
+  return retval.release ();
 }
 
 /* Create and return call_site_chain for CALLER_PC and CALLEE_PC.  All the
@@ -1062,7 +1232,7 @@ dwarf_expr_reg_to_entry_parameter (struc
       struct gdbarch *caller_gdbarch = frame_unwind_arch (frame);
 
       throw_error (NO_ENTRY_VALUE_ERROR,
-		   _("DW_OP_GNU_entry_value resolving callee gdbarch %s "
+		   _("DW_OP_entry_value resolving callee gdbarch %s "
 		     "(of %s (%s)) does not match caller gdbarch %s"),
 		   gdbarch_bfd_arch_info (gdbarch)->printable_name,
 		   paddress (gdbarch, func_addr),
@@ -1076,7 +1246,7 @@ dwarf_expr_reg_to_entry_parameter (struc
       struct bound_minimal_symbol msym
 	= lookup_minimal_symbol_by_pc (func_addr);
 
-      throw_error (NO_ENTRY_VALUE_ERROR, _("DW_OP_GNU_entry_value resolving "
+      throw_error (NO_ENTRY_VALUE_ERROR, _("DW_OP_entry_value resolving "
 					   "requires caller of %s (%s)"),
 		   paddress (gdbarch, func_addr),
 		   (msym.minsym == NULL ? "???"
@@ -1093,7 +1263,7 @@ dwarf_expr_reg_to_entry_parameter (struc
       target_msym = lookup_minimal_symbol_by_pc (target_addr).minsym;
       func_msym = lookup_minimal_symbol_by_pc (func_addr).minsym;
       throw_error (NO_ENTRY_VALUE_ERROR,
-		   _("DW_OP_GNU_entry_value resolving expects callee %s at %s "
+		   _("DW_OP_entry_value resolving expects callee %s at %s "
 		     "but the called frame is for %s at %s"),
 		   (target_msym == NULL ? "???"
 					: MSYMBOL_PRINT_NAME (target_msym)),
@@ -1117,10 +1287,10 @@ dwarf_expr_reg_to_entry_parameter (struc
       struct minimal_symbol *msym
 	= lookup_minimal_symbol_by_pc (caller_pc).minsym;
 
-      /* DW_TAG_GNU_call_site_parameter will be missing just if GCC could not
+      /* DW_TAG_call_site_parameter will be missing just if GCC could not
 	 determine its value.  */
       throw_error (NO_ENTRY_VALUE_ERROR, _("Cannot find matching parameter "
-					   "at DW_TAG_GNU_call_site %s at %s"),
+					   "at DW_TAG_call_site %s at %s"),
 		   paddress (gdbarch, caller_pc),
 		   msym == NULL ? "???" : MSYMBOL_PRINT_NAME (msym)); 
     }
@@ -1130,8 +1300,8 @@ dwarf_expr_reg_to_entry_parameter (struc
 }
 
 /* Return value for PARAMETER matching DEREF_SIZE.  If DEREF_SIZE is -1, return
-   the normal DW_AT_GNU_call_site_value block.  Otherwise return the
-   DW_AT_GNU_call_site_data_value (dereferenced) block.
+   the normal DW_AT_call_value block.  Otherwise return the
+   DW_AT_call_data_value (dereferenced) block.
 
    TYPE and CALLER_FRAME specify how to evaluate the DWARF block into returned
    struct value.
@@ -1155,103 +1325,18 @@ dwarf_entry_parameter_to_value (struct c
   /* DEREF_SIZE size is not verified here.  */
   if (data_src == NULL)
     throw_error (NO_ENTRY_VALUE_ERROR,
-		 _("Cannot resolve DW_AT_GNU_call_site_data_value"));
+		 _("Cannot resolve DW_AT_call_data_value"));
 
-  /* DW_AT_GNU_call_site_value is a DWARF expression, not a DWARF
+  /* DW_AT_call_value is a DWARF expression, not a DWARF
      location.  Postprocessing of DWARF_VALUE_MEMORY would lose the type from
      DWARF block.  */
-  data = alloca (size + 1);
+  data = (gdb_byte *) alloca (size + 1);
   memcpy (data, data_src, size);
   data[size] = DW_OP_stack_value;
 
   return dwarf2_evaluate_loc_desc (type, caller_frame, data, size + 1, per_cu);
 }
 
-/* Execute DWARF block of call_site_parameter which matches KIND and KIND_U.
-   Choose DEREF_SIZE value of that parameter.  Search caller of the CTX's
-   frame.  CTX must be of dwarf_expr_ctx_funcs kind.
-
-   The CTX caller can be from a different CU - per_cu_dwarf_call implementation
-   can be more simple as it does not support cross-CU DWARF executions.  */
-
-static void
-dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
-				       enum call_site_parameter_kind kind,
-				       union call_site_parameter_u kind_u,
-				       int deref_size)
-{
-  struct dwarf_expr_baton *debaton;
-  struct frame_info *frame, *caller_frame;
-  struct dwarf2_per_cu_data *caller_per_cu;
-  struct dwarf_expr_baton baton_local;
-  struct dwarf_expr_context saved_ctx;
-  struct call_site_parameter *parameter;
-  const gdb_byte *data_src;
-  size_t size;
-
-  gdb_assert (ctx->funcs == &dwarf_expr_ctx_funcs);
-  debaton = ctx->baton;
-  frame = debaton->frame;
-  caller_frame = get_prev_frame (frame);
-
-  parameter = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u,
-						 &caller_per_cu);
-  data_src = deref_size == -1 ? parameter->value : parameter->data_value;
-  size = deref_size == -1 ? parameter->value_size : parameter->data_value_size;
-
-  /* DEREF_SIZE size is not verified here.  */
-  if (data_src == NULL)
-    throw_error (NO_ENTRY_VALUE_ERROR,
-		 _("Cannot resolve DW_AT_GNU_call_site_data_value"));
-
-  baton_local.frame = caller_frame;
-  baton_local.per_cu = caller_per_cu;
-  baton_local.obj_address = 0;
-
-  saved_ctx.gdbarch = ctx->gdbarch;
-  saved_ctx.addr_size = ctx->addr_size;
-  saved_ctx.offset = ctx->offset;
-  saved_ctx.baton = ctx->baton;
-  ctx->gdbarch = get_objfile_arch (dwarf2_per_cu_objfile (baton_local.per_cu));
-  ctx->addr_size = dwarf2_per_cu_addr_size (baton_local.per_cu);
-  ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu);
-  ctx->baton = &baton_local;
-
-  dwarf_expr_eval (ctx, data_src, size);
-
-  ctx->gdbarch = saved_ctx.gdbarch;
-  ctx->addr_size = saved_ctx.addr_size;
-  ctx->offset = saved_ctx.offset;
-  ctx->baton = saved_ctx.baton;
-}
-
-/* Callback function for dwarf2_evaluate_loc_desc.
-   Fetch the address indexed by DW_OP_GNU_addr_index.  */
-
-static CORE_ADDR
-dwarf_expr_get_addr_index (void *baton, unsigned int index)
-{
-  struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
-
-  return dwarf2_read_addr_index (debaton->per_cu, index);
-}
-
-/* Callback function for get_object_address. Return the address of the VLA
-   object.  */
-
-static CORE_ADDR
-dwarf_expr_get_obj_addr (void *baton)
-{
-  struct dwarf_expr_baton *debaton = baton;
-
-  gdb_assert (debaton != NULL);
-
-  if (debaton->obj_address == 0)
-    error (_("Location address is not set."));
-
-  return debaton->obj_address;
-}
-
 /* VALUE must be of type lval_computed with entry_data_value_funcs.  Perform
    the indirect method on it, that is use its stored target value, the sole
    purpose of entry_data_value_funcs..  */
@@ -1265,7 +1350,7 @@ entry_data_value_coerce_ref (const struc
   if (TYPE_CODE (checked_type) != TYPE_CODE_REF)
     return NULL;
 
-  target_val = value_computed_closure (value);
+  target_val = (struct value *) value_computed_closure (value);
   value_incref (target_val);
   return target_val;
 }
@@ -1275,7 +1360,7 @@ entry_data_value_coerce_ref (const struc
 static void *
 entry_data_value_copy_closure (const struct value *v)
 {
-  struct value *target_val = value_computed_closure (v);
+  struct value *target_val = (struct value *) value_computed_closure (v);
 
   value_incref (target_val);
   return target_val;
@@ -1286,14 +1371,14 @@ entry_data_value_copy_closure (const str
 static void
 entry_data_value_free_closure (struct value *v)
 {
-  struct value *target_val = value_computed_closure (v);
+  struct value *target_val = (struct value *) value_computed_closure (v);
 
   value_free (target_val);
 }
 
 /* Vector for methods for an entry value reference where the referenced value
    is stored in the caller.  On the first dereference use
-   DW_AT_GNU_call_site_data_value in the caller.  */
+   DW_AT_call_data_value in the caller.  */
 
 static const struct lval_funcs entry_data_value_funcs =
 {
@@ -1308,7 +1393,7 @@ static const struct lval_funcs entry_dat
 
 /* Read parameter of TYPE at (callee) FRAME's function entry.  KIND and KIND_U
    are used to match DW_AT_location at the caller's
-   DW_TAG_GNU_call_site_parameter.
+   DW_TAG_call_site_parameter.
 
    Function always returns non-NULL value.  It throws NO_ENTRY_VALUE_ERROR if it
    cannot resolve the parameter for any reason.  */
@@ -1332,7 +1417,7 @@ value_of_dwarf_reg_entry (struct type *t
 					      type, caller_frame,
 					      caller_per_cu);
 
-  /* Check if DW_AT_GNU_call_site_data_value cannot be used.  If it should be
+  /* Check if DW_AT_call_data_value cannot be used.  If it should be
      used and it is not available do not fall back to OUTER_VAL - dereferencing
      TYPE_CODE_REF with non-entry data value would give current value - not the
      entry value.  */
@@ -1360,7 +1445,7 @@ value_of_dwarf_reg_entry (struct type *t
 
 /* Read parameter of TYPE at (callee) FRAME's function entry.  DATA and
    SIZE are DWARF block used to match DW_AT_location at the caller's
-   DW_TAG_GNU_call_site_parameter.
+   DW_TAG_call_site_parameter.
 
    Function always returns non-NULL value.  It throws NO_ENTRY_VALUE_ERROR if it
    cannot resolve the parameter for any reason.  */
@@ -1384,7 +1469,7 @@ value_of_dwarf_block_entry (struct type 
      suppressed during normal operation.  The expression can be arbitrary if
      there is no caller-callee entry value binding expected.  */
   throw_error (NO_ENTRY_VALUE_ERROR,
-	       _("DWARF-2 expression error: DW_OP_GNU_entry_value is supported "
+	       _("DWARF-2 expression error: DW_OP_entry_value is supported "
 		 "only for single DW_OP_reg* or for DW_OP_fbreg(*)"));
 }
 
@@ -1404,6 +1489,10 @@ struct piece_closure
 
   /* The pieces themselves.  */
   struct dwarf_expr_piece *pieces;
+
+  /* Frame ID of frame to which a register value is relative, used
+     only by DWARF_VALUE_REGISTER.  */
+  struct frame_id frame_id;
 };
 
 /* Allocate a closure for a value formed from separately-described
@@ -1412,7 +1501,7 @@ struct piece_closure
 static struct piece_closure *
 allocate_piece_closure (struct dwarf2_per_cu_data *per_cu,
 			int n_pieces, struct dwarf_expr_piece *pieces,
-			int addr_size)
+			int addr_size, struct frame_info *frame)
 {
   struct piece_closure *c = XCNEW (struct piece_closure);
   int i;
@@ -1422,6 +1511,10 @@ allocate_piece_closure (struct dwarf2_pe
   c->n_pieces = n_pieces;
   c->addr_size = addr_size;
   c->pieces = XCNEWVEC (struct dwarf_expr_piece, n_pieces);
+  if (frame == NULL)
+    c->frame_id = null_frame_id;
+  else
+    c->frame_id = get_frame_id (frame);
 
   memcpy (c->pieces, pieces, n_pieces * sizeof (struct dwarf_expr_piece));
   for (i = 0; i < n_pieces; ++i)
@@ -1431,178 +1524,236 @@ allocate_piece_closure (struct dwarf2_pe
   return c;
 }
 
-/* The lowest-level function to extract bits from a byte buffer.
-   SOURCE is the buffer.  It is updated if we read to the end of a
-   byte.
-   SOURCE_OFFSET_BITS is the offset of the first bit to read.  It is
-   updated to reflect the number of bits actually read.
-   NBITS is the number of bits we want to read.  It is updated to
-   reflect the number of bits actually read.  This function may read
-   fewer bits.
-   BITS_BIG_ENDIAN is taken directly from gdbarch.
-   This function returns the extracted bits.  */
-
-static unsigned int
-extract_bits_primitive (const gdb_byte **source,
-			unsigned int *source_offset_bits,
-			int *nbits, int bits_big_endian)
-{
-  unsigned int avail, mask, datum;
-
-  gdb_assert (*source_offset_bits < 8);
-
-  avail = 8 - *source_offset_bits;
-  if (avail > *nbits)
-    avail = *nbits;
+/* Copy NBITS bits from SOURCE to DEST starting at the given bit
+   offsets.  Use the bit order as specified by BITS_BIG_ENDIAN.
+   Source and destination buffers must not overlap.  */
+
+static void
+copy_bitwise (gdb_byte *dest, ULONGEST dest_offset,
+	      const gdb_byte *source, ULONGEST source_offset,
+	      ULONGEST nbits, int bits_big_endian)
+{
+  unsigned int buf, avail;
+
+  if (nbits == 0)
+    return;
 
-  mask = (1 << avail) - 1;
-  datum = **source;
   if (bits_big_endian)
-    datum >>= 8 - (*source_offset_bits + *nbits);
+    {
+      /* Start from the end, then work backwards.  */
+      dest_offset += nbits - 1;
+      dest += dest_offset / 8;
+      dest_offset = 7 - dest_offset % 8;
+      source_offset += nbits - 1;
+      source += source_offset / 8;
+      source_offset = 7 - source_offset % 8;
+    }
   else
-    datum >>= *source_offset_bits;
-  datum &= mask;
-
-  *nbits -= avail;
-  *source_offset_bits += avail;
-  if (*source_offset_bits >= 8)
     {
-      *source_offset_bits -= 8;
-      ++*source;
+      dest += dest_offset / 8;
+      dest_offset %= 8;
+      source += source_offset / 8;
+      source_offset %= 8;
     }
 
-  return datum;
-}
+  /* Fill BUF with DEST_OFFSET bits from the destination and 8 -
+     SOURCE_OFFSET bits from the source.  */
+  buf = *(bits_big_endian ? source-- : source++) >> source_offset;
+  buf <<= dest_offset;
+  buf |= *dest & ((1 << dest_offset) - 1);
 
-/* Extract some bits from a source buffer and move forward in the
-   buffer.
-   
-   SOURCE is the source buffer.  It is updated as bytes are read.
-   SOURCE_OFFSET_BITS is the offset into SOURCE.  It is updated as
-   bits are read.
-   NBITS is the number of bits to read.
-   BITS_BIG_ENDIAN is taken directly from gdbarch.
-   
-   This function returns the bits that were read.  */
+  /* NBITS: bits yet to be written; AVAIL: BUF's fill level.  */
+  nbits += dest_offset;
+  avail = dest_offset + 8 - source_offset;
 
-static unsigned int
-extract_bits (const gdb_byte **source, unsigned int *source_offset_bits,
-	      int nbits, int bits_big_endian)
-{
-  unsigned int datum;
-
-  gdb_assert (nbits > 0 && nbits <= 8);
+  /* Flush 8 bits from BUF, if appropriate.  */
+  if (nbits >= 8 && avail >= 8)
+    {
+      *(bits_big_endian ? dest-- : dest++) = buf;
+      buf >>= 8;
+      avail -= 8;
+      nbits -= 8;
+    }
 
-  datum = extract_bits_primitive (source, source_offset_bits, &nbits,
-				  bits_big_endian);
-  if (nbits > 0)
+  /* Copy the middle part.  */
+  if (nbits >= 8)
     {
-      unsigned int more;
+      size_t len = nbits / 8;
 
-      more = extract_bits_primitive (source, source_offset_bits, &nbits,
-				     bits_big_endian);
-      if (bits_big_endian)
-	datum <<= nbits;
+      /* Use a faster method for byte-aligned copies.  */
+      if (avail == 0)
+	{
+	  if (bits_big_endian)
+	    {
+	      dest -= len;
+	      source -= len;
+	      memcpy (dest + 1, source + 1, len);
+	    }
+	  else
+	    {
+	      memcpy (dest, source, len);
+	      dest += len;
+	      source += len;
+	    }
+	}
       else
-	more <<= nbits;
-      datum |= more;
+	{
+	  while (len--)
+	    {
+	      buf |= *(bits_big_endian ? source-- : source++) << avail;
+	      *(bits_big_endian ? dest-- : dest++) = buf;
+	      buf >>= 8;
+	    }
+	}
+      nbits %= 8;
     }
 
-  return datum;
+  /* Write the last byte.  */
+  if (nbits)
+    {
+      if (avail < nbits)
+	buf |= *source << avail;
+
+      buf &= (1 << nbits) - 1;
+      *dest = (*dest & (~0 << nbits)) | buf;
+    }
 }
 
-/* Write some bits into a buffer and move forward in the buffer.
-   
-   DATUM is the bits to write.  The low-order bits of DATUM are used.
-   DEST is the destination buffer.  It is updated as bytes are
-   written.
-   DEST_OFFSET_BITS is the bit offset in DEST at which writing is
-   done.
-   NBITS is the number of valid bits in DATUM.
-   BITS_BIG_ENDIAN is taken directly from gdbarch.  */
+#if GDB_SELF_TEST
+
+namespace selftests {
+
+/* Helper function for the unit test of copy_bitwise.  Convert NBITS bits
+   out of BITS, starting at OFFS, to the respective '0'/'1'-string.  MSB0
+   specifies whether to assume big endian bit numbering.  Store the
+   resulting (not null-terminated) string at STR.  */
 
 static void
-insert_bits (unsigned int datum,
-	     gdb_byte *dest, unsigned int dest_offset_bits,
-	     int nbits, int bits_big_endian)
+bits_to_str (char *str, const gdb_byte *bits, ULONGEST offs,
+	     ULONGEST nbits, int msb0)
 {
-  unsigned int mask;
-
-  gdb_assert (dest_offset_bits + nbits <= 8);
+  unsigned int j;
+  size_t i;
 
-  mask = (1 << nbits) - 1;
-  if (bits_big_endian)
-    {
-      datum <<= 8 - (dest_offset_bits + nbits);
-      mask <<= 8 - (dest_offset_bits + nbits);
-    }
-  else
+  for (i = offs / 8, j = offs % 8; nbits; i++, j = 0)
     {
-      datum <<= dest_offset_bits;
-      mask <<= dest_offset_bits;
+      unsigned int ch = bits[i];
+      for (; j < 8 && nbits; j++, nbits--)
+	*str++ = (ch & (msb0 ? (1 << (7 - j)) : (1 << j))) ? '1' : '0';
     }
-
-  gdb_assert ((datum & ~mask) == 0);
-
-  *dest = (*dest & ~mask) | datum;
 }
 
-/* Copy bits from a source to a destination.
-   
-   DEST is where the bits should be written.
-   DEST_OFFSET_BITS is the bit offset into DEST.
-   SOURCE is the source of bits.
-   SOURCE_OFFSET_BITS is the bit offset into SOURCE.
-   BIT_COUNT is the number of bits to copy.
-   BITS_BIG_ENDIAN is taken directly from gdbarch.  */
+/* Check one invocation of copy_bitwise with the given parameters.  */
 
 static void
-copy_bitwise (gdb_byte *dest, unsigned int dest_offset_bits,
-	      const gdb_byte *source, unsigned int source_offset_bits,
-	      unsigned int bit_count,
-	      int bits_big_endian)
-{
-  unsigned int dest_avail;
-  int datum;
-
-  /* Reduce everything to byte-size pieces.  */
-  dest += dest_offset_bits / 8;
-  dest_offset_bits %= 8;
-  source += source_offset_bits / 8;
-  source_offset_bits %= 8;
+check_copy_bitwise (const gdb_byte *dest, unsigned int dest_offset,
+		    const gdb_byte *source, unsigned int source_offset,
+		    unsigned int nbits, int msb0)
+{
+  size_t len = align_up (dest_offset + nbits, 8);
+  char *expected = (char *) alloca (len + 1);
+  char *actual = (char *) alloca (len + 1);
+  gdb_byte *buf = (gdb_byte *) alloca (len / 8);
+
+  /* Compose a '0'/'1'-string that represents the expected result of
+     copy_bitwise below:
+      Bits from [0, DEST_OFFSET) are filled from DEST.
+      Bits from [DEST_OFFSET, DEST_OFFSET + NBITS) are filled from SOURCE.
+      Bits from [DEST_OFFSET + NBITS, LEN) are filled from DEST.
+
+     E.g., with:
+      dest_offset: 4
+      nbits:       2
+      len:         8
+      dest:        00000000
+      source:      11111111
+
+     We should end up with:
+      buf:         00001100
+                   DDDDSSDD (D=dest, S=source)
+  */
+  bits_to_str (expected, dest, 0, len, msb0);
+  bits_to_str (expected + dest_offset, source, source_offset, nbits, msb0);
+
+  /* Fill BUF with data from DEST, apply copy_bitwise, and convert the
+     result to a '0'/'1'-string.  */
+  memcpy (buf, dest, len / 8);
+  copy_bitwise (buf, dest_offset, source, source_offset, nbits, msb0);
+  bits_to_str (actual, buf, 0, len, msb0);
+
+  /* Compare the resulting strings.  */
+  expected[len] = actual[len] = '\0';
+  if (strcmp (expected, actual) != 0)
+    error (_("copy_bitwise %s != %s (%u+%u -> %u)"),
+	   expected, actual, source_offset, nbits, dest_offset);
+}
 
-  dest_avail = 8 - dest_offset_bits % 8;
+/* Unit test for copy_bitwise.  */
 
-  /* See if we can fill the first destination byte.  */
-  if (dest_avail < bit_count)
+static void
+copy_bitwise_tests (void)
+{
+  /* Data to be used as both source and destination buffers.  The two
+     arrays below represent the lsb0- and msb0- encoded versions of the
+     following bit string, respectively:
+       00000000 00011111 11111111 01001000 10100101 11110010
+     This pattern is chosen such that it contains:
+     - constant 0- and 1- chunks of more than a full byte;
+     - 0/1- and 1/0 transitions on all bit positions within a byte;
+     - several sufficiently asymmetric bytes.
+  */
+  static const gdb_byte data_lsb0[] = {
+    0x00, 0xf8, 0xff, 0x12, 0xa5, 0x4f
+  };
+  static const gdb_byte data_msb0[] = {
+    0x00, 0x1f, 0xff, 0x48, 0xa5, 0xf2
+  };
+
+  constexpr size_t data_nbits = 8 * sizeof (data_lsb0);
+  constexpr unsigned max_nbits = 24;
+
+  /* Try all combinations of:
+      lsb0/msb0 bit order (using the respective data array)
+       X [0, MAX_NBITS] copy bit width
+       X feasible source offsets for the given copy bit width
+       X feasible destination offsets
+  */
+  for (int msb0 = 0; msb0 < 2; msb0++)
     {
-      datum = extract_bits (&source, &source_offset_bits, dest_avail,
-			    bits_big_endian);
-      insert_bits (datum, dest, dest_offset_bits, dest_avail, bits_big_endian);
-      ++dest;
-      dest_offset_bits = 0;
-      bit_count -= dest_avail;
-    }
+      const gdb_byte *data = msb0 ? data_msb0 : data_lsb0;
 
-  /* Now, either DEST_OFFSET_BITS is byte-aligned, or we have fewer
-     than 8 bits remaining.  */
-  gdb_assert (dest_offset_bits % 8 == 0 || bit_count < 8);
-  for (; bit_count >= 8; bit_count -= 8)
-    {
-      datum = extract_bits (&source, &source_offset_bits, 8, bits_big_endian);
-      *dest++ = (gdb_byte) datum;
-    }
+      for (unsigned int nbits = 1; nbits <= max_nbits; nbits++)
+	{
+	  const unsigned int max_offset = data_nbits - nbits;
 
-  /* Finally, we may have a few leftover bits.  */
-  gdb_assert (bit_count <= 8 - dest_offset_bits % 8);
-  if (bit_count > 0)
-    {
-      datum = extract_bits (&source, &source_offset_bits, bit_count,
-			    bits_big_endian);
-      insert_bits (datum, dest, dest_offset_bits, bit_count, bits_big_endian);
+	  for (unsigned source_offset = 0;
+	       source_offset <= max_offset;
+	       source_offset++)
+	    {
+	      for (unsigned dest_offset = 0;
+		   dest_offset <= max_offset;
+		   dest_offset++)
+		{
+		  check_copy_bitwise (data + dest_offset / 8,
+				      dest_offset % 8,
+				      data + source_offset / 8,
+				      source_offset % 8,
+				      nbits, msb0);
+		}
+	    }
+	}
+
+      /* Special cases: copy all, copy nothing.  */
+      check_copy_bitwise (data_lsb0, 0, data_msb0, 0, data_nbits, msb0);
+      check_copy_bitwise (data_msb0, 0, data_lsb0, 0, data_nbits, msb0);
+      check_copy_bitwise (data, data_nbits - 7, data, 9, 0, msb0);
     }
 }
 
+} /* namespace selftests */
+
+#endif /* GDB_SELF_TEST */
+
 static void
 read_pieced_value (struct value *v)
 {
@@ -1612,11 +1763,9 @@ read_pieced_value (struct value *v)
   gdb_byte *contents;
   struct piece_closure *c
     = (struct piece_closure *) value_computed_closure (v);
-  struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v));
   size_t type_len;
   size_t buffer_size = 0;
-  gdb_byte *buffer = NULL;
-  struct cleanup *cleanup;
+  std::vector<gdb_byte> buffer;
   int bits_big_endian
     = gdbarch_bits_big_endian (get_type_arch (value_type (v)));
 
@@ -1625,8 +1774,6 @@ read_pieced_value (struct value *v)
 		    _("Should not be able to create a lazy value with "
 		      "an enclosing type"));
 
-  cleanup = make_cleanup (free_current_contents, &buffer);
-
   contents = value_contents_raw (v);
   bits_to_skip = 8 * value_offset (v);
   if (value_bitsize (v))
@@ -1672,50 +1819,42 @@ read_pieced_value (struct value *v)
       if (buffer_size < this_size)
 	{
 	  buffer_size = this_size;
-	  buffer = xrealloc (buffer, buffer_size);
+	  buffer.reserve (buffer_size);
 	}
-      intermediate_buffer = buffer;
+      intermediate_buffer = buffer.data ();
 
       /* Copy from the source to DEST_BUFFER.  */
       switch (p->location)
 	{
 	case DWARF_VALUE_REGISTER:
 	  {
+	    struct frame_info *frame = frame_find_by_id (c->frame_id);
 	    struct gdbarch *arch = get_frame_arch (frame);
-	    int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, p->v.regno);
+	    int gdb_regnum = dwarf_reg_to_regnum_or_error (arch, p->v.regno);
+	    int optim, unavail;
+	    LONGEST reg_offset = source_offset;
 
-	    if (gdb_regnum != -1)
+	    if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG
+		&& this_size < register_size (arch, gdb_regnum))
 	      {
-		int optim, unavail;
-		int reg_offset = source_offset;
-
-		if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG
-		    && this_size < register_size (arch, gdb_regnum))
-		  {
-		    /* Big-endian, and we want less than full size.  */
-		    reg_offset = register_size (arch, gdb_regnum) - this_size;
-		    /* We want the lower-order THIS_SIZE_BITS of the bytes
-		       we extract from the register.  */
-		    source_offset_bits += 8 * this_size - this_size_bits;
-		 }
-
-		if (!get_frame_register_bytes (frame, gdb_regnum, reg_offset,
-					       this_size, buffer,
-					       &optim, &unavail))
-		  {
-		    /* Just so garbage doesn't ever shine through.  */
-		    memset (buffer, 0, this_size);
-
-		    if (optim)
-		      mark_value_bits_optimized_out (v, offset, this_size_bits);
-		    if (unavail)
-		      mark_value_bits_unavailable (v, offset, this_size_bits);
-		  }
+		/* Big-endian, and we want less than full size.  */
+		reg_offset = register_size (arch, gdb_regnum) - this_size;
+		/* We want the lower-order THIS_SIZE_BITS of the bytes
+		   we extract from the register.  */
+		source_offset_bits += 8 * this_size - this_size_bits;
 	      }
-	    else
+
+	    if (!get_frame_register_bytes (frame, gdb_regnum, reg_offset,
+					   this_size, buffer.data (),
+					   &optim, &unavail))
 	      {
-		error (_("Unable to access DWARF register number %s"),
-		       paddress (arch, p->v.regno));
+		/* Just so garbage doesn't ever shine through.  */
+		memset (buffer.data (), 0, this_size);
+
+		if (optim)
+		  mark_value_bits_optimized_out (v, offset, this_size_bits);
+		if (unavail)
+		  mark_value_bits_unavailable (v, offset, this_size_bits);
 	      }
 	  }
 	  break;
@@ -1724,7 +1863,7 @@ read_pieced_value (struct value *v)
 	  read_value_memory (v, offset,
 			     p->v.mem.in_stack_memory,
 			     p->v.mem.addr + source_offset,
-			     buffer, this_size);
+			     buffer.data (), this_size);
 	  break;
 
 	case DWARF_VALUE_STACK:
@@ -1782,8 +1921,6 @@ read_pieced_value (struct value *v)
 
       offset += this_size_bits;
     }
-
-  do_cleanups (cleanup);
 }
 
 static void
@@ -1795,22 +1932,12 @@ write_pieced_value (struct value *to, st
   const gdb_byte *contents;
   struct piece_closure *c
     = (struct piece_closure *) value_computed_closure (to);
-  struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
   size_t type_len;
   size_t buffer_size = 0;
-  gdb_byte *buffer = NULL;
-  struct cleanup *cleanup;
+  std::vector<gdb_byte> buffer;
   int bits_big_endian
     = gdbarch_bits_big_endian (get_type_arch (value_type (to)));
 
-  if (frame == NULL)
-    {
-      mark_value_bytes_optimized_out (to, 0, TYPE_LENGTH (value_type (to)));
-      return;
-    }
-
-  cleanup = make_cleanup (free_current_contents, &buffer);
-
   contents = value_contents (from);
   bits_to_skip = 8 * value_offset (to);
   if (value_bitsize (to))
@@ -1863,9 +1990,9 @@ write_pieced_value (struct value *to, st
 	  if (buffer_size < this_size)
 	    {
 	      buffer_size = this_size;
-	      buffer = xrealloc (buffer, buffer_size);
+	      buffer.reserve (buffer_size);
 	    }
-	  source_buffer = buffer;
+	  source_buffer = buffer.data ();
 	  need_bitwise = 1;
 	}
 
@@ -1873,53 +2000,45 @@ write_pieced_value (struct value *to, st
 	{
 	case DWARF_VALUE_REGISTER:
 	  {
+	    struct frame_info *frame = frame_find_by_id (c->frame_id);
 	    struct gdbarch *arch = get_frame_arch (frame);
-	    int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, p->v.regno);
+	    int gdb_regnum = dwarf_reg_to_regnum_or_error (arch, p->v.regno);
+	    int reg_offset = dest_offset;
 
-	    if (gdb_regnum != -1)
+	    if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG
+		&& this_size <= register_size (arch, gdb_regnum))
 	      {
-		int reg_offset = dest_offset;
+		/* Big-endian, and we want less than full size.  */
+		reg_offset = register_size (arch, gdb_regnum) - this_size;
+	      }
 
-		if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG
-		    && this_size <= register_size (arch, gdb_regnum))
-		  {
-		    /* Big-endian, and we want less than full size.  */
-		    reg_offset = register_size (arch, gdb_regnum) - this_size;
-		  }
+	    if (need_bitwise)
+	      {
+		int optim, unavail;
 
-		if (need_bitwise)
+		if (!get_frame_register_bytes (frame, gdb_regnum, reg_offset,
+					       this_size, buffer.data (),
+					       &optim, &unavail))
 		  {
-		    int optim, unavail;
-
-		    if (!get_frame_register_bytes (frame, gdb_regnum, reg_offset,
-						   this_size, buffer,
-						   &optim, &unavail))
-		      {
-			if (optim)
-			  throw_error (OPTIMIZED_OUT_ERROR,
-				       _("Can't do read-modify-write to "
-					 "update bitfield; containing word "
-					 "has been optimized out"));
-			if (unavail)
-			  throw_error (NOT_AVAILABLE_ERROR,
-				       _("Can't do read-modify-write to update "
-					 "bitfield; containing word "
-					 "is unavailable"));
-		      }
-		    copy_bitwise (buffer, dest_offset_bits,
-				  contents, source_offset_bits,
-				  this_size_bits,
-				  bits_big_endian);
+		    if (optim)
+		      throw_error (OPTIMIZED_OUT_ERROR,
+				   _("Can't do read-modify-write to "
+				     "update bitfield; containing word "
+				     "has been optimized out"));
+		    if (unavail)
+		      throw_error (NOT_AVAILABLE_ERROR,
+				   _("Can't do read-modify-write to update "
+				     "bitfield; containing word "
+				     "is unavailable"));
 		  }
-
-		put_frame_register_bytes (frame, gdb_regnum, reg_offset, 
-					  this_size, source_buffer);
-	      }
-	    else
-	      {
-		error (_("Unable to write to DWARF register number %s"),
-		       paddress (arch, p->v.regno));
+		copy_bitwise (buffer.data (), dest_offset_bits,
+			      contents, source_offset_bits,
+			      this_size_bits,
+			      bits_big_endian);
 	      }
+
+	    put_frame_register_bytes (frame, gdb_regnum, reg_offset, 
+				      this_size, source_buffer);
 	  }
 	  break;
 	case DWARF_VALUE_MEMORY:
@@ -1927,10 +2046,10 @@ write_pieced_value (struct value *to, st
 	    {
 	      /* Only the first and last bytes can possibly have any
 		 bits reused.  */
-	      read_memory (p->v.mem.addr + dest_offset, buffer, 1);
+	      read_memory (p->v.mem.addr + dest_offset, buffer.data (), 1);
 	      read_memory (p->v.mem.addr + dest_offset + this_size - 1,
-			   buffer + this_size - 1, 1);
-	      copy_bitwise (buffer, dest_offset_bits,
+			   &buffer[this_size - 1], 1);
+	      copy_bitwise (buffer.data (), dest_offset_bits,
 			    contents, source_offset_bits,
 			    this_size_bits,
 			    bits_big_endian);
@@ -1945,15 +2064,13 @@ write_pieced_value (struct value *to, st
 	}
       offset += this_size_bits;
     }
-
-  do_cleanups (cleanup);
 }
 
 /* An implementation of an lval_funcs method to see whether a value is
    a synthetic pointer.  */
 
 static int
-check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
+check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset,
 				int bit_length)
 {
   struct piece_closure *c
@@ -1995,7 +2112,67 @@ check_pieced_synthetic_pointer (const st
 static CORE_ADDR
 get_frame_address_in_block_wrapper (void *baton)
 {
-  return get_frame_address_in_block (baton);
+  return get_frame_address_in_block ((struct frame_info *) baton);
+}
+
+/* Fetch a DW_AT_const_value through a synthetic pointer.  */
+
+static struct value *
+fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset,
+					  struct dwarf2_per_cu_data *per_cu,
+					  struct type *type)
+{
+  struct value *result = NULL;
+  struct obstack temp_obstack;
+  struct cleanup *cleanup;
+  const gdb_byte *bytes;
+  LONGEST len;
+
+  obstack_init (&temp_obstack);
+  cleanup = make_cleanup_obstack_free (&temp_obstack);
+  bytes = dwarf2_fetch_constant_bytes (die, per_cu, &temp_obstack, &len);
+
+  if (bytes != NULL)
+    {
+      if (byte_offset >= 0
+	  && byte_offset + TYPE_LENGTH (TYPE_TARGET_TYPE (type)) <= len)
+	{
+	  bytes += byte_offset;
+	  result = value_from_contents (TYPE_TARGET_TYPE (type), bytes);
+	}
+      else
+	invalid_synthetic_pointer ();
+    }
+  else
+    result = allocate_optimized_out_value (TYPE_TARGET_TYPE (type));
+
+  do_cleanups (cleanup);
+
+  return result;
+}
+
+/* Fetch the value pointed to by a synthetic pointer.  */
+
+static struct value *
+indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset,
+			    struct dwarf2_per_cu_data *per_cu,
+			    struct frame_info *frame, struct type *type)
+{
+  /* Fetch the location expression of the DIE we're pointing to.  */
+  struct dwarf2_locexpr_baton baton
+    = dwarf2_fetch_die_loc_sect_off (die, per_cu,
+				     get_frame_address_in_block_wrapper, frame);
+
+  /* If pointed-to DIE has a DW_AT_location, evaluate it and return the
+     resulting value.  Otherwise, it may have a DW_AT_const_value instead,
+     or it may've been optimized out.  */
+  if (baton.data != NULL)
+    return dwarf2_evaluate_loc_desc_full (TYPE_TARGET_TYPE (type), frame,
+					  baton.data, baton.size, baton.per_cu,
+					  byte_offset);
+  else
+    return fetch_const_value_from_synthetic_pointer (die, byte_offset, per_cu,
+						     type);
 }
 
 /* An implementation of an lval_funcs method to indirect through a
@@ -2009,7 +2186,8 @@ indirect_pieced_value (struct value *val
   struct type *type;
   struct frame_info *frame;
   struct dwarf2_locexpr_baton baton;
-  int i, bit_offset, bit_length;
+  int i, bit_length;
+  LONGEST bit_offset;
   struct dwarf_expr_piece *piece = NULL;
   LONGEST byte_offset;
   enum bfd_endian byte_order;
@@ -2046,12 +2224,13 @@ indirect_pieced_value (struct value *val
 	return NULL;
 
       if (bit_length != 0)
-	error (_("Invalid use of DW_OP_GNU_implicit_pointer"));
+	error (_("Invalid use of DW_OP_implicit_pointer"));
 
       piece = p;
       break;
     }
 
+  gdb_assert (piece != NULL);
   frame = get_selected_frame (_("No frame selected."));
 
   /* This is an offset requested by GDB, such as value subscripts.
@@ -2069,43 +2248,40 @@ indirect_pieced_value (struct value *val
 					TYPE_LENGTH (type), byte_order);
   byte_offset += piece->v.ptr.offset;
 
-  gdb_assert (piece);
-  baton
-    = dwarf2_fetch_die_loc_sect_off (piece->v.ptr.die, c->per_cu,
-				     get_frame_address_in_block_wrapper,
-				     frame);
+  return indirect_synthetic_pointer (piece->v.ptr.die, byte_offset, c->per_cu,
+				     frame, type);
+}
 
-  if (baton.data != NULL)
-    return dwarf2_evaluate_loc_desc_full (TYPE_TARGET_TYPE (type), frame,
-					  baton.data, baton.size, baton.per_cu,
-					  byte_offset);
+/* Implementation of the coerce_ref method of lval_funcs for synthetic C++
+   references.  */
 
-  {
-    struct obstack temp_obstack;
-    struct cleanup *cleanup;
-    const gdb_byte *bytes;
-    LONGEST len;
-    struct value *result;
-
-    obstack_init (&temp_obstack);
-    cleanup = make_cleanup_obstack_free (&temp_obstack);
-
-    bytes = dwarf2_fetch_constant_bytes (piece->v.ptr.die, c->per_cu,
-					 &temp_obstack, &len);
-    if (bytes == NULL)
-      result = allocate_optimized_out_value (TYPE_TARGET_TYPE (type));
-    else
-      {
-	if (byte_offset < 0
-	    || byte_offset + TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > len)
-	  invalid_synthetic_pointer ();
-	bytes += byte_offset;
-	result = value_from_contents (TYPE_TARGET_TYPE (type), bytes);
-      }
+static struct value *
+coerce_pieced_ref (const struct value *value)
+{
+  struct type *type = check_typedef (value_type (value));
 
-    do_cleanups (cleanup);
-    return result;
-  }
+  if (value_bits_synthetic_pointer (value, value_embedded_offset (value),
+				    TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+    {
+      const struct piece_closure *closure
+	= (struct piece_closure *) value_computed_closure (value);
+      struct frame_info *frame
+	= get_selected_frame (_("No frame selected."));
+
+      /* gdb represents synthetic pointers as pieced values with a single
+	 piece.  */
+      gdb_assert (closure != NULL);
+      gdb_assert (closure->n_pieces == 1);
+
+      return indirect_synthetic_pointer (closure->pieces->v.ptr.die,
+					 closure->pieces->v.ptr.offset,
+					 closure->per_cu, frame, type);
+    }
+  else
+    {
+      /* Else: not a synthetic reference; do nothing.  */
+      return NULL;
+    }
 }
 
 static void *
@@ -2143,30 +2319,12 @@ static const struct lval_funcs pieced_va
   read_pieced_value,
   write_pieced_value,
   indirect_pieced_value,
-  NULL,	/* coerce_ref */
+  coerce_pieced_ref,
   check_pieced_synthetic_pointer,
   copy_pieced_value_closure,
   free_pieced_value_closure
 };
 
-/* Virtual method table for dwarf2_evaluate_loc_desc_full below.  */
-
-const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
-{
-  dwarf_expr_read_addr_from_reg,
-  dwarf_expr_get_reg_value,
-  dwarf_expr_read_mem,
-  dwarf_expr_frame_base,
-  dwarf_expr_frame_cfa,
-  dwarf_expr_frame_pc,
-  dwarf_expr_tls_address,
-  dwarf_expr_dwarf_call,
-  dwarf_expr_get_base_type,
-  dwarf_expr_push_dwarf_reg_entry_value,
-  dwarf_expr_get_addr_index,
-  dwarf_expr_get_obj_addr
-};
-
 /* Evaluate a location description, starting at DATA and with length
    SIZE, to find the current location of variable of TYPE in the
    context of FRAME.  BYTE_OFFSET is applied after the contents are
@@ -2179,9 +2337,6 @@ dwarf2_evaluate_loc_desc_full (struct ty
 			       LONGEST byte_offset)
 {
   struct value *retval;
-  struct dwarf_expr_baton baton;
-  struct dwarf_expr_context *ctx;
-  struct cleanup *old_chain, *value_chain;
   struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
 
   if (byte_offset < 0)
@@ -2190,30 +2345,27 @@ dwarf2_evaluate_loc_desc_full (struct ty
   if (size == 0)
     return allocate_optimized_out_value (type);
 
-  baton.frame = frame;
-  baton.per_cu = per_cu;
-  baton.obj_address = 0;
-
-  ctx = new_dwarf_expr_context ();
-  old_chain = make_cleanup_free_dwarf_expr_context (ctx);
-  value_chain = make_cleanup_value_free_to_mark (value_mark ());
-
-  ctx->gdbarch = get_objfile_arch (objfile);
-  ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
-  ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
-  ctx->offset = dwarf2_per_cu_text_offset (per_cu);
-  ctx->baton = &baton;
-  ctx->funcs = &dwarf_expr_ctx_funcs;
+  dwarf_evaluate_loc_desc ctx;
+  ctx.frame = frame;
+  ctx.per_cu = per_cu;
+  ctx.obj_address = 0;
+
+  scoped_value_mark free_values;
+
+  ctx.gdbarch = get_objfile_arch (objfile);
+  ctx.addr_size = dwarf2_per_cu_addr_size (per_cu);
+  ctx.ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
+  ctx.offset = dwarf2_per_cu_text_offset (per_cu);
 
   TRY
     {
-      dwarf_expr_eval (ctx, data, size);
+      ctx.eval (data, size);
     }
   CATCH (ex, RETURN_MASK_ERROR)
     {
       if (ex.error == NOT_AVAILABLE_ERROR)
 	{
-	  do_cleanups (old_chain);
+	  free_values.free_to_mark ();
 	  retval = allocate_value (type);
 	  mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type));
 	  return retval;
@@ -2222,7 +2374,7 @@ dwarf2_evaluate_loc_desc_full (struct ty
 	{
 	  if (entry_values_debug)
 	    exception_print (gdb_stdout, ex);
-	  do_cleanups (old_chain);
+	  free_values.free_to_mark ();
 	  return allocate_optimized_out_value (type);
 	}
       else
@@ -2230,69 +2382,84 @@ dwarf2_evaluate_loc_desc_full (struct ty
     }
   END_CATCH
 
-  if (ctx->num_pieces > 0)
+  if (ctx.num_pieces > 0)
     {
       struct piece_closure *c;
-      struct frame_id frame_id = get_frame_id (frame);
       ULONGEST bit_size = 0;
       int i;
 
-      for (i = 0; i < ctx->num_pieces; ++i)
-	bit_size += ctx->pieces[i].size;
+      for (i = 0; i < ctx.num_pieces; ++i)
+	bit_size += ctx.pieces[i].size;
       if (8 * (byte_offset + TYPE_LENGTH (type)) > bit_size)
 	invalid_synthetic_pointer ();
 
-      c = allocate_piece_closure (per_cu, ctx->num_pieces, ctx->pieces,
-				  ctx->addr_size);
+      c = allocate_piece_closure (per_cu, ctx.num_pieces, ctx.pieces,
+				  ctx.addr_size, frame);
       /* We must clean up the value chain after creating the piece
 	 closure but before allocating the result.  */
-      do_cleanups (value_chain);
+      free_values.free_to_mark ();
       retval = allocate_computed_value (type, &pieced_value_funcs, c);
-      VALUE_FRAME_ID (retval) = frame_id;
       set_value_offset (retval, byte_offset);
     }
   else
     {
-      switch (ctx->location)
+      switch (ctx.location)
 	{
 	case DWARF_VALUE_REGISTER:
 	  {
 	    struct gdbarch *arch = get_frame_arch (frame);
 	    int dwarf_regnum
-	      = longest_to_int (value_as_long (dwarf_expr_fetch (ctx, 0)));
-	    int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, dwarf_regnum);
+	      = longest_to_int (value_as_long (ctx.fetch (0)));
+	    int gdb_regnum = dwarf_reg_to_regnum_or_error (arch, dwarf_regnum);
 
 	    if (byte_offset != 0)
 	      error (_("cannot use offset on synthetic pointer to register"));
-	    do_cleanups (value_chain);
-	   if (gdb_regnum == -1)
-	      error (_("Unable to access DWARF register number %d"),
-		     dwarf_regnum);
-	   retval = value_from_register (type, gdb_regnum, frame);
-	   if (value_optimized_out (retval))
-	     {
-	       struct value *tmp;
-
-	       /* This means the register has undefined value / was
-		  not saved.  As we're computing the location of some
-		  variable etc. in the program, not a value for
-		  inspecting a register ($pc, $sp, etc.), return a
-		  generic optimized out value instead, so that we show
-		  <optimized out> instead of <not saved>.  */
-	       do_cleanups (value_chain);
-	       tmp = allocate_value (type);
-	       value_contents_copy (tmp, 0, retval, 0, TYPE_LENGTH (type));
-	       retval = tmp;
-	     }
+	    free_values.free_to_mark ();
+	    retval = value_from_register (type, gdb_regnum, frame);
+	    if (value_optimized_out (retval))
+	      {
+		struct value *tmp;
+
+		/* This means the register has undefined value / was
+		   not saved.  As we're computing the location of some
+		   variable etc. in the program, not a value for
+		   inspecting a register ($pc, $sp, etc.), return a
+		   generic optimized out value instead, so that we show
+		   <optimized out> instead of <not saved>.  */
+		tmp = allocate_value (type);
+		value_contents_copy (tmp, 0, retval, 0, TYPE_LENGTH (type));
+		retval = tmp;
+	      }
 	  }
 	  break;
 
 	case DWARF_VALUE_MEMORY:
 	  {
-	    CORE_ADDR address = dwarf_expr_fetch_address (ctx, 0);
-	    int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
+	    struct type *ptr_type;
+	    CORE_ADDR address = ctx.fetch_address (0);
+	    int in_stack_memory = ctx.fetch_in_stack_memory (0);
+
+	    /* DW_OP_deref_size (and possibly other operations too) may
+	       create a pointer instead of an address.  Ideally, the
+	       pointer to address conversion would be performed as part
+	       of those operations, but the type of the object to
+	       which the address refers is not known at the time of
+	       the operation.  Therefore, we do the conversion here
+	       since the type is readily available.  */
 
-	    do_cleanups (value_chain);
+	    switch (TYPE_CODE (type))
+	      {
+		case TYPE_CODE_FUNC:
+		case TYPE_CODE_METHOD:
+		  ptr_type = builtin_type (ctx.gdbarch)->builtin_func_ptr;
+		  break;
+		default:
+		  ptr_type = builtin_type (ctx.gdbarch)->builtin_data_ptr;
+		  break;
+	      }
+	    address = value_as_address (value_from_pointer (ptr_type, address));
+
+	    free_values.free_to_mark ();
 	    retval = value_at_lazy (type, address + byte_offset);
 	    if (in_stack_memory)
 	      set_value_stack (retval, 1);
@@ -2301,10 +2468,11 @@ dwarf2_evaluate_loc_desc_full (struct ty
 
 	case DWARF_VALUE_STACK:
 	  {
-	    struct value *value = dwarf_expr_fetch (ctx, 0);
+	    struct value *value = ctx.fetch (0);
 	    gdb_byte *contents;
 	    const gdb_byte *val_bytes;
 	    size_t n = TYPE_LENGTH (value_type (value));
+	    struct cleanup *cleanup;
 
 	    if (byte_offset + TYPE_LENGTH (type) > n)
 	      invalid_synthetic_pointer ();
@@ -2317,8 +2485,8 @@ dwarf2_evaluate_loc_desc_full (struct ty
 	       to the mark, but we still need the value contents
 	       below.  */
 	    value_incref (value);
-	    do_cleanups (value_chain);
-	    make_cleanup_value_free (value);
+	    free_values.free_to_mark ();
+	    cleanup = make_cleanup_value_free (value);
 
 	    retval = allocate_value (type);
 	    contents = value_contents_raw (retval);
@@ -2331,39 +2499,28 @@ dwarf2_evaluate_loc_desc_full (struct ty
 		n = TYPE_LENGTH (type);
 	      }
 	    memcpy (contents, val_bytes, n);
+
+	    do_cleanups (cleanup);
 	  }
 	  break;
 
 	case DWARF_VALUE_LITERAL:
 	  {
 	    bfd_byte *contents;
-	    const bfd_byte *ldata;
-	    size_t n = ctx->len;
+	    size_t n = TYPE_LENGTH (type);
 
-	    if (byte_offset + TYPE_LENGTH (type) > n)
+	    if (byte_offset + n > ctx.len)
 	      invalid_synthetic_pointer ();
 
-	    do_cleanups (value_chain);
+	    free_values.free_to_mark ();
 	    retval = allocate_value (type);
 	    contents = value_contents_raw (retval);
-
-	    ldata = ctx->data + byte_offset;
-	    n -= byte_offset;
-
-	    if (n > TYPE_LENGTH (type))
-	      {
-		struct gdbarch *objfile_gdbarch = get_objfile_arch (objfile);
-
-		if (gdbarch_byte_order (objfile_gdbarch) == BFD_ENDIAN_BIG)
-		  ldata += n - TYPE_LENGTH (type);
-		n = TYPE_LENGTH (type);
-	      }
-	    memcpy (contents, ldata, n);
+	    memcpy (contents, ctx.data + byte_offset, n);
 	  }
 	  break;
 
 	case DWARF_VALUE_OPTIMIZED_OUT:
-	  do_cleanups (value_chain);
+	  free_values.free_to_mark ();
 	  retval = allocate_optimized_out_value (type);
 	  break;
 
@@ -2377,9 +2534,7 @@ dwarf2_evaluate_loc_desc_full (struct ty
 	}
     }
 
-  set_value_initialized (retval, ctx->initialized);
-
-  do_cleanups (old_chain);
+  set_value_initialized (retval, ctx.initialized);
 
   return retval;
 }
@@ -2396,56 +2551,49 @@ dwarf2_evaluate_loc_desc (struct type *t
 }
 
 /* Evaluates a dwarf expression and stores the result in VAL, expecting
-   that the dwarf expression only produces a single CORE_ADDR.  ADDR is a
-   context (location of a variable) and might be needed to evaluate the
-   location expression.
+   that the dwarf expression only produces a single CORE_ADDR.  FRAME is the
+   frame in which the expression is evaluated.  ADDR is a context (location of
+   a variable) and might be needed to evaluate the location expression.
    Returns 1 on success, 0 otherwise.   */
 
 static int
 dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
+			   struct frame_info *frame,
 			   CORE_ADDR addr,
 			   CORE_ADDR *valp)
 {
-  struct dwarf_expr_context *ctx;
-  struct dwarf_expr_baton baton;
   struct objfile *objfile;
-  struct cleanup *cleanup;
 
   if (dlbaton == NULL || dlbaton->size == 0)
     return 0;
 
-  ctx = new_dwarf_expr_context ();
-  cleanup = make_cleanup_free_dwarf_expr_context (ctx);
+  dwarf_evaluate_loc_desc ctx;
 
-  baton.frame = get_selected_frame (NULL);
-  baton.per_cu = dlbaton->per_cu;
-  baton.obj_address = addr;
+  ctx.frame = frame;
+  ctx.per_cu = dlbaton->per_cu;
+  ctx.obj_address = addr;
 
   objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
 
-  ctx->gdbarch = get_objfile_arch (objfile);
-  ctx->addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
-  ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (dlbaton->per_cu);
-  ctx->offset = dwarf2_per_cu_text_offset (dlbaton->per_cu);
-  ctx->funcs = &dwarf_expr_ctx_funcs;
-  ctx->baton = &baton;
+  ctx.gdbarch = get_objfile_arch (objfile);
+  ctx.addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
+  ctx.ref_addr_size = dwarf2_per_cu_ref_addr_size (dlbaton->per_cu);
+  ctx.offset = dwarf2_per_cu_text_offset (dlbaton->per_cu);
 
-  dwarf_expr_eval (ctx, dlbaton->data, dlbaton->size);
+  ctx.eval (dlbaton->data, dlbaton->size);
 
-  switch (ctx->location)
+  switch (ctx.location)
     {
     case DWARF_VALUE_REGISTER:
     case DWARF_VALUE_MEMORY:
     case DWARF_VALUE_STACK:
-      *valp = dwarf_expr_fetch_address (ctx, 0);
-      if (ctx->location == DWARF_VALUE_REGISTER)
-	*valp = dwarf_expr_read_addr_from_reg (&baton, *valp);
-      do_cleanups (cleanup);
+      *valp = ctx.fetch_address (0);
+      if (ctx.location == DWARF_VALUE_REGISTER)
+	*valp = ctx.read_addr_from_reg (*valp);
       return 1;
     case DWARF_VALUE_LITERAL:
-      *valp = extract_signed_integer (ctx->data, ctx->len,
-				      gdbarch_byte_order (ctx->gdbarch));
-      do_cleanups (cleanup);
+      *valp = extract_signed_integer (ctx.data, ctx.len,
+				      gdbarch_byte_order (ctx.gdbarch));
       return 1;
       /* Unsupported dwarf values.  */
     case DWARF_VALUE_OPTIMIZED_OUT:
@@ -2453,7 +2601,6 @@ dwarf2_locexpr_baton_eval (const struct 
       break;
     }
 
-  do_cleanups (cleanup);
   return 0;
 }
 
@@ -2461,19 +2608,25 @@ dwarf2_locexpr_baton_eval (const struct 
 
 int
 dwarf2_evaluate_property (const struct dynamic_prop *prop,
+			  struct frame_info *frame,
 			  struct property_addr_info *addr_stack,
 			  CORE_ADDR *value)
 {
   if (prop == NULL)
     return 0;
 
+  if (frame == NULL && has_stack_frames ())
+    frame = get_selected_frame (NULL);
+
   switch (prop->kind)
     {
     case PROP_LOCEXPR:
       {
-	const struct dwarf2_property_baton *baton = prop->data.baton;
+	const struct dwarf2_property_baton *baton
+	  = (const struct dwarf2_property_baton *) prop->data.baton;
 
-	if (dwarf2_locexpr_baton_eval (&baton->locexpr, addr_stack->addr,
+	if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame,
+				       addr_stack ? addr_stack->addr : 0,
 				       value))
 	  {
 	    if (baton->referenced_type)
@@ -2489,8 +2642,8 @@ dwarf2_evaluate_property (const struct d
 
     case PROP_LOCLIST:
       {
-	struct dwarf2_property_baton *baton = prop->data.baton;
-	struct frame_info *frame = get_selected_frame (NULL);
+	struct dwarf2_property_baton *baton
+	  = (struct dwarf2_property_baton *) prop->data.baton;
 	CORE_ADDR pc = get_frame_address_in_block (frame);
 	const gdb_byte *data;
 	struct value *val;
@@ -2516,7 +2669,8 @@ dwarf2_evaluate_property (const struct d
 
     case PROP_ADDR_OFFSET:
       {
-	struct dwarf2_property_baton *baton = prop->data.baton;
+	struct dwarf2_property_baton *baton
+	  = (struct dwarf2_property_baton *) prop->data.baton;
 	struct property_addr_info *pinfo;
 	struct value *val;
 
@@ -2543,7 +2697,7 @@ dwarf2_evaluate_property (const struct d
 /* See dwarf2loc.h.  */
 
 void
-dwarf2_compile_property_to_c (struct ui_file *stream,
+dwarf2_compile_property_to_c (string_file &stream,
 			      const char *result_name,
 			      struct gdbarch *gdbarch,
 			      unsigned char *registers_used,
@@ -2551,7 +2705,8 @@ dwarf2_compile_property_to_c (struct ui_
 			      CORE_ADDR pc,
 			      struct symbol *sym)
 {
-  struct dwarf2_property_baton *baton = prop->data.baton;
+  struct dwarf2_property_baton *baton
+    = (struct dwarf2_property_baton *) prop->data.baton;
   const gdb_byte *data;
   size_t size;
   struct dwarf2_per_cu_data *per_cu;
@@ -2577,184 +2732,146 @@ dwarf2_compile_property_to_c (struct ui_
 }
 
 
-/* Helper functions and baton for dwarf2_loc_desc_needs_frame.  */
+/* Helper functions and baton for dwarf2_loc_desc_get_symbol_read_needs.  */
 
-struct needs_frame_baton
+class symbol_needs_eval_context : public dwarf_expr_context
 {
-  int needs_frame;
-  struct dwarf2_per_cu_data *per_cu;
-};
+ public:
 
-/* Reads from registers do require a frame.  */
-static CORE_ADDR
-needs_frame_read_addr_from_reg (void *baton, int regnum)
-{
-  struct needs_frame_baton *nf_baton = baton;
-
-  nf_baton->needs_frame = 1;
-  return 1;
-}
-
-/* struct dwarf_expr_context_funcs' "get_reg_value" callback:
-   Reads from registers do require a frame.  */
-
-static struct value *
-needs_frame_get_reg_value (void *baton, struct type *type, int regnum)
-{
-  struct needs_frame_baton *nf_baton = baton;
-
-  nf_baton->needs_frame = 1;
-  return value_zero (type, not_lval);
-}
-
-/* Reads from memory do not require a frame.  */
-static void
-needs_frame_read_mem (void *baton, gdb_byte *buf, CORE_ADDR addr, size_t len)
-{
-  memset (buf, 0, len);
-}
-
-/* Frame-relative accesses do require a frame.  */
-static void
-needs_frame_frame_base (void *baton, const gdb_byte **start, size_t * length)
-{
-  static gdb_byte lit0 = DW_OP_lit0;
-  struct needs_frame_baton *nf_baton = baton;
-
-  *start = &lit0;
-  *length = 1;
-
-  nf_baton->needs_frame = 1;
-}
+  enum symbol_needs_kind needs;
+  struct dwarf2_per_cu_data *per_cu;
 
-/* CFA accesses require a frame.  */
+  /* Reads from registers do require a frame.  */
+  CORE_ADDR read_addr_from_reg (int regnum) OVERRIDE
+  {
+    needs = SYMBOL_NEEDS_FRAME;
+    return 1;
+  }
 
-static CORE_ADDR
-needs_frame_frame_cfa (void *baton)
-{
-  struct needs_frame_baton *nf_baton = baton;
+  /* "get_reg_value" callback: Reads from registers do require a
+     frame.  */
 
-  nf_baton->needs_frame = 1;
-  return 1;
-}
+  struct value *get_reg_value (struct type *type, int regnum) OVERRIDE
+  {
+    needs = SYMBOL_NEEDS_FRAME;
+    return value_zero (type, not_lval);
+  }
 
-/* Thread-local accesses do require a frame.  */
-static CORE_ADDR
-needs_frame_tls_address (void *baton, CORE_ADDR offset)
-{
-  struct needs_frame_baton *nf_baton = baton;
+  /* Reads from memory do not require a frame.  */
+  void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t len) OVERRIDE
+  {
+    memset (buf, 0, len);
+  }
 
-  nf_baton->needs_frame = 1;
-  return 1;
-}
+  /* Frame-relative accesses do require a frame.  */
+  void get_frame_base (const gdb_byte **start, size_t *length) OVERRIDE
+  {
+    static gdb_byte lit0 = DW_OP_lit0;
 
-/* Helper interface of per_cu_dwarf_call for dwarf2_loc_desc_needs_frame.  */
+    *start = &lit0;
+    *length = 1;
 
-static void
-needs_frame_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
-{
-  struct needs_frame_baton *nf_baton = ctx->baton;
-
-  per_cu_dwarf_call (ctx, die_offset, nf_baton->per_cu,
-		     ctx->funcs->get_frame_pc, ctx->baton);
-}
+    needs = SYMBOL_NEEDS_FRAME;
+  }
 
-/* DW_OP_GNU_entry_value accesses require a caller, therefore a frame.  */
+  /* CFA accesses require a frame.  */
+  CORE_ADDR get_frame_cfa () OVERRIDE
+  {
+    needs = SYMBOL_NEEDS_FRAME;
+    return 1;
+  }
 
-static void
-needs_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
-			     enum call_site_parameter_kind kind,
-			     union call_site_parameter_u kind_u, int deref_size)
-{
-  struct needs_frame_baton *nf_baton = ctx->baton;
+  CORE_ADDR get_frame_pc () OVERRIDE
+  {
+    needs = SYMBOL_NEEDS_FRAME;
+    return 1;
+  }
 
-  nf_baton->needs_frame = 1;
+  /* Thread-local accesses require registers, but not a frame.  */
+  CORE_ADDR get_tls_address (CORE_ADDR offset) OVERRIDE
+  {
+    if (needs <= SYMBOL_NEEDS_REGISTERS)
+      needs = SYMBOL_NEEDS_REGISTERS;
+    return 1;
+  }
 
-  /* The expression may require some stub values on DWARF stack.  */
-  dwarf_expr_push_address (ctx, 0, 0);
-}
+  /* Helper interface of per_cu_dwarf_call for
+     dwarf2_loc_desc_get_symbol_read_needs.  */
 
-/* DW_OP_GNU_addr_index doesn't require a frame.  */
+  void dwarf_call (cu_offset die_offset) OVERRIDE
+  {
+    per_cu_dwarf_call (this, die_offset, per_cu);
+  }
 
-static CORE_ADDR
-needs_get_addr_index (void *baton, unsigned int index)
-{
-  /* Nothing to do.  */
-  return 1;
-}
+  /* DW_OP_entry_value accesses require a caller, therefore a
+     frame.  */
 
-/* DW_OP_push_object_address has a frame already passed through.  */
+  void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind,
+				   union call_site_parameter_u kind_u,
+				   int deref_size) OVERRIDE
+  {
+    needs = SYMBOL_NEEDS_FRAME;
 
-static CORE_ADDR
-needs_get_obj_addr (void *baton)
-{
-  /* Nothing to do.  */
-  return 1;
-}
+    /* The expression may require some stub values on DWARF stack.  */
+    push_address (0, 0);
+  }
 
-/* Virtual method table for dwarf2_loc_desc_needs_frame below.  */
+  /* DW_OP_GNU_addr_index doesn't require a frame.  */
 
-static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs =
-{
-  needs_frame_read_addr_from_reg,
-  needs_frame_get_reg_value,
-  needs_frame_read_mem,
-  needs_frame_frame_base,
-  needs_frame_frame_cfa,
-  needs_frame_frame_cfa,	/* get_frame_pc */
-  needs_frame_tls_address,
-  needs_frame_dwarf_call,
-  NULL,				/* get_base_type */
-  needs_dwarf_reg_entry_value,
-  needs_get_addr_index,
-  needs_get_obj_addr
+   CORE_ADDR get_addr_index (unsigned int index) OVERRIDE
+   {
+     /* Nothing to do.  */
+     return 1;
+   }
+
+   /* DW_OP_push_object_address has a frame already passed through.  */
+
+   CORE_ADDR get_object_address () OVERRIDE
+   {
+     /* Nothing to do.  */
+     return 1;
+   }
 };
 
-/* Return non-zero iff the location expression at DATA (length SIZE)
-   requires a frame to evaluate.  */
+/* Compute the correct symbol_needs_kind value for the location
+   expression at DATA (length SIZE).  */
 
-static int
-dwarf2_loc_desc_needs_frame (const gdb_byte *data, size_t size,
-			     struct dwarf2_per_cu_data *per_cu)
+static enum symbol_needs_kind
+dwarf2_loc_desc_get_symbol_read_needs (const gdb_byte *data, size_t size,
+				       struct dwarf2_per_cu_data *per_cu)
 {
-  struct needs_frame_baton baton;
-  struct dwarf_expr_context *ctx;
   int in_reg;
-  struct cleanup *old_chain;
   struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
 
-  baton.needs_frame = 0;
-  baton.per_cu = per_cu;
+  scoped_value_mark free_values;
 
-  ctx = new_dwarf_expr_context ();
-  old_chain = make_cleanup_free_dwarf_expr_context (ctx);
-  make_cleanup_value_free_to_mark (value_mark ());
+  symbol_needs_eval_context ctx;
 
-  ctx->gdbarch = get_objfile_arch (objfile);
-  ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
-  ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
-  ctx->offset = dwarf2_per_cu_text_offset (per_cu);
-  ctx->baton = &baton;
-  ctx->funcs = &needs_frame_ctx_funcs;
+  ctx.needs = SYMBOL_NEEDS_NONE;
+  ctx.per_cu = per_cu;
+  ctx.gdbarch = get_objfile_arch (objfile);
+  ctx.addr_size = dwarf2_per_cu_addr_size (per_cu);
+  ctx.ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
+  ctx.offset = dwarf2_per_cu_text_offset (per_cu);
 
-  dwarf_expr_eval (ctx, data, size);
+  ctx.eval (data, size);
 
-  in_reg = ctx->location == DWARF_VALUE_REGISTER;
+  in_reg = ctx.location == DWARF_VALUE_REGISTER;
 
-  if (ctx->num_pieces > 0)
+  if (ctx.num_pieces > 0)
     {
       int i;
 
       /* If the location has several pieces, and any of them are in
          registers, then we will need a frame to fetch them from.  */
-      for (i = 0; i < ctx->num_pieces; i++)
-        if (ctx->pieces[i].location == DWARF_VALUE_REGISTER)
+      for (i = 0; i < ctx.num_pieces; i++)
+        if (ctx.pieces[i].location == DWARF_VALUE_REGISTER)
           in_reg = 1;
     }
 
-  do_cleanups (old_chain);
-
-  return baton.needs_frame || in_reg;
+  if (in_reg)
+    ctx.needs = SYMBOL_NEEDS_FRAME;
+  return ctx.needs;
 }
 
 /* A helper function that throws an unimplemented error mentioning a
@@ -2774,14 +2891,54 @@ unimplemented (unsigned int op)
 	   op);
 }
 
-/* See dwarf2loc.h.  */
+/* See dwarf2loc.h.
+
+   This is basically a wrapper on gdbarch_dwarf2_reg_to_regnum so that we
+   can issue a complaint, which is better than having every target's
+   implementation of dwarf2_reg_to_regnum do it.  */
 
 int
-dwarf2_reg_to_regnum_or_error (struct gdbarch *arch, int dwarf_reg)
+dwarf_reg_to_regnum (struct gdbarch *arch, int dwarf_reg)
 {
   int reg = gdbarch_dwarf2_reg_to_regnum (arch, dwarf_reg);
+
+  if (reg == -1)
+    {
+      complaint (&symfile_complaints,
+		 _("bad DWARF register number %d"), dwarf_reg);
+    }
+  return reg;
+}
+
+/* Subroutine of dwarf_reg_to_regnum_or_error to simplify it.
+   Throw an error because DWARF_REG is bad.  */
+
+static void
+throw_bad_regnum_error (ULONGEST dwarf_reg)
+{
+  /* Still want to print -1 as "-1".
+     We *could* have int and ULONGEST versions of dwarf2_reg_to_regnum_or_error
+     but that's overkill for now.  */
+  if ((int) dwarf_reg == dwarf_reg)
+    error (_("Unable to access DWARF register number %d"), (int) dwarf_reg);
+  error (_("Unable to access DWARF register number %s"),
+	 pulongest (dwarf_reg));
+}
+
+/* See dwarf2loc.h.  */
+
+int
+dwarf_reg_to_regnum_or_error (struct gdbarch *arch, ULONGEST dwarf_reg)
+{
+  int reg;
+
+  if (dwarf_reg > INT_MAX)
+    throw_bad_regnum_error (dwarf_reg);
+  /* Yes, we will end up issuing a complaint and an error if DWARF_REG is
+     bad, but that's ok.  */
+  reg = dwarf_reg_to_regnum (arch, (int) dwarf_reg);
   if (reg == -1)
-    error (_("Unable to access DWARF register number %d"), dwarf_reg);
+    throw_bad_regnum_error (dwarf_reg);
   return reg;
 }
 
@@ -2833,7 +2990,7 @@ access_memory (struct gdbarch *arch, str
 static CORE_ADDR
 get_ax_pc (void *baton)
 {
-  struct agent_expr *expr = baton;
+  struct agent_expr *expr = (struct agent_expr *) baton;
 
   return expr->scope;
 }
@@ -2857,9 +3014,8 @@ dwarf2_compile_expr_to_ax (struct agent_
 			   const gdb_byte *op_ptr, const gdb_byte *op_end,
 			   struct dwarf2_per_cu_data *per_cu)
 {
-  struct cleanup *cleanups;
-  int i, *offsets;
-  VEC(int) *dw_labels = NULL, *patches = NULL;
+  int i;
+  std::vector<int> dw_labels, patches;
   const gdb_byte * const base = op_ptr;
   const gdb_byte *previous_piece = op_ptr;
   enum bfd_endian byte_order = gdbarch_byte_order (arch);
@@ -2867,21 +3023,14 @@ dwarf2_compile_expr_to_ax (struct agent_
   unsigned int addr_size_bits = 8 * addr_size;
   int bits_big_endian = gdbarch_bits_big_endian (arch);
 
-  offsets = xmalloc ((op_end - op_ptr) * sizeof (int));
-  cleanups = make_cleanup (xfree, offsets);
-
-  for (i = 0; i < op_end - op_ptr; ++i)
-    offsets[i] = -1;
-
-  make_cleanup (VEC_cleanup (int), &dw_labels);
-  make_cleanup (VEC_cleanup (int), &patches);
+  std::vector<int> offsets (op_end - op_ptr, -1);
 
   /* By default we are making an address.  */
   loc->kind = axs_lvalue_memory;
 
   while (op_ptr < op_end)
     {
-      enum dwarf_location_atom op = *op_ptr;
+      enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr;
       uint64_t uoffset, reg;
       int64_t offset;
       int i;
@@ -3028,14 +3177,14 @@ dwarf2_compile_expr_to_ax (struct agent_
 	case DW_OP_reg30:
 	case DW_OP_reg31:
 	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_regx");
-	  loc->u.reg = dwarf2_reg_to_regnum_or_error (arch, op - DW_OP_reg0);
+	  loc->u.reg = dwarf_reg_to_regnum_or_error (arch, op - DW_OP_reg0);
 	  loc->kind = axs_lvalue_register;
 	  break;
 
 	case DW_OP_regx:
 	  op_ptr = safe_read_uleb128 (op_ptr, op_end, &reg);
 	  dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_regx");
-	  loc->u.reg = dwarf2_reg_to_regnum_or_error (arch, reg);
+	  loc->u.reg = dwarf_reg_to_regnum_or_error (arch, reg);
 	  loc->kind = axs_lvalue_register;
 	  break;
 
@@ -3098,7 +3247,7 @@ dwarf2_compile_expr_to_ax (struct agent_
 	case DW_OP_breg30:
 	case DW_OP_breg31:
 	  op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
-	  i = dwarf2_reg_to_regnum_or_error (arch, op - DW_OP_breg0);
+	  i = dwarf_reg_to_regnum_or_error (arch, op - DW_OP_breg0);
 	  ax_reg (expr, i);
 	  if (offset != 0)
 	    {
@@ -3110,7 +3259,7 @@ dwarf2_compile_expr_to_ax (struct agent_
 	  {
 	    op_ptr = safe_read_uleb128 (op_ptr, op_end, &reg);
 	    op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
-	    i = dwarf2_reg_to_regnum_or_error (arch, reg);
+	    i = dwarf_reg_to_regnum_or_error (arch, reg);
 	    ax_reg (expr, i);
 	    if (offset != 0)
 	      {
@@ -3375,6 +3524,7 @@ dwarf2_compile_expr_to_ax (struct agent_
 	  break;
 
 	case DW_OP_GNU_push_tls_address:
+	case DW_OP_form_tls_address:
 	  unimplemented (op);
 	  break;
 
@@ -3386,8 +3536,8 @@ dwarf2_compile_expr_to_ax (struct agent_
 	  offset = extract_signed_integer (op_ptr, 2, byte_order);
 	  op_ptr += 2;
 	  i = ax_goto (expr, aop_goto);
-	  VEC_safe_push (int, dw_labels, op_ptr + offset - base);
-	  VEC_safe_push (int, patches, i);
+	  dw_labels.push_back (op_ptr + offset - base);
+	  patches.push_back (i);
 	  break;
 
 	case DW_OP_bra:
@@ -3396,8 +3546,8 @@ dwarf2_compile_expr_to_ax (struct agent_
 	  /* Zero extend the operand.  */
 	  ax_zero_ext (expr, addr_size_bits);
 	  i = ax_goto (expr, aop_if_goto);
-	  VEC_safe_push (int, dw_labels, op_ptr + offset - base);
-	  VEC_safe_push (int, patches, i);
+	  dw_labels.push_back (op_ptr + offset - base);
+	  patches.push_back (i);
 	  break;
 
 	case DW_OP_nop:
@@ -3506,15 +3656,13 @@ dwarf2_compile_expr_to_ax (struct agent_
     }
 
   /* Patch all the branches we emitted.  */
-  for (i = 0; i < VEC_length (int, patches); ++i)
+  for (i = 0; i < patches.size (); ++i)
     {
-      int targ = offsets[VEC_index (int, dw_labels, i)];
+      int targ = offsets[dw_labels[i]];
       if (targ == -1)
 	internal_error (__FILE__, __LINE__, _("invalid label"));
-      ax_label (expr, VEC_index (int, patches, i), targ);
+      ax_label (expr, patches[i], targ);
     }
-
-  do_cleanups (cleanups);
 }
 
 
@@ -3523,7 +3671,8 @@ dwarf2_compile_expr_to_ax (struct agent_
 static struct value *
 locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
   struct value *val;
 
   val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, dlbaton->data,
@@ -3539,20 +3688,24 @@ locexpr_read_variable (struct symbol *sy
 static struct value *
 locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
 
   return value_of_dwarf_block_entry (SYMBOL_TYPE (symbol), frame, dlbaton->data,
 				     dlbaton->size);
 }
 
-/* Return non-zero iff we need a frame to evaluate SYMBOL.  */
-static int
-locexpr_read_needs_frame (struct symbol *symbol)
+/* Implementation of get_symbol_read_needs from
+   symbol_computed_ops.  */
+
+static enum symbol_needs_kind
+locexpr_get_symbol_read_needs (struct symbol *symbol)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
 
-  return dwarf2_loc_desc_needs_frame (dlbaton->data, dlbaton->size,
-				      dlbaton->per_cu);
+  return dwarf2_loc_desc_get_symbol_read_needs (dlbaton->data, dlbaton->size,
+						dlbaton->per_cu);
 }
 
 /* Return true if DATA points to the end of a piece.  END is one past
@@ -3572,7 +3725,17 @@ locexpr_regname (struct gdbarch *gdbarch
 {
   int regnum;
 
-  regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_regnum);
+  /* This doesn't use dwarf_reg_to_regnum_or_error on purpose.
+     We'd rather print *something* here than throw an error.  */
+  regnum = dwarf_reg_to_regnum (gdbarch, dwarf_regnum);
+  /* gdbarch_register_name may just return "", return something more
+     descriptive for bad register numbers.  */
+  if (regnum == -1)
+    {
+      /* The text is output as "$bad_register_number".
+	 That is why we use the underscores.  */
+      return _("bad_register_number");
+    }
   return gdbarch_register_name (gdbarch, regnum);
 }
 
@@ -3696,7 +3859,8 @@ locexpr_describe_location_piece (struct 
 	   && (data[0] == DW_OP_addr
 	       || (addr_size == 4 && data[0] == DW_OP_const4u)
 	       || (addr_size == 8 && data[0] == DW_OP_const8u))
-	   && data[1 + addr_size] == DW_OP_GNU_push_tls_address
+	   && (data[1 + addr_size] == DW_OP_GNU_push_tls_address
+	       || data[1 + addr_size] == DW_OP_form_tls_address)
 	   && piece_end_p (data + 2 + addr_size, end))
     {
       ULONGEST offset;
@@ -3719,7 +3883,8 @@ locexpr_describe_location_piece (struct 
 	   && data + 1 + (leb128_size = skip_leb128 (data + 1, end)) < end
 	   && data[0] == DW_OP_GNU_const_index
 	   && leb128_size > 0
-	   && data[1 + leb128_size] == DW_OP_GNU_push_tls_address
+	   && (data[1 + leb128_size] == DW_OP_GNU_push_tls_address
+	       || data[1 + leb128_size] == DW_OP_form_tls_address)
 	   && piece_end_p (data + 2 + leb128_size, end))
     {
       uint64_t offset;
@@ -3764,7 +3929,7 @@ disassemble_dwarf_expression (struct ui_
 	 && (all
 	     || (data[0] != DW_OP_piece && data[0] != DW_OP_bit_piece)))
     {
-      enum dwarf_location_atom op = *data++;
+      enum dwarf_location_atom op = (enum dwarf_location_atom) *data++;
       uint64_t ul;
       int64_t l;
       const char *name;
@@ -3995,6 +4160,7 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_implicit_pointer:
 	case DW_OP_GNU_implicit_pointer:
 	  {
 	    ul = extract_unsigned_integer (data, offset_size,
@@ -4009,6 +4175,7 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_deref_type:
 	case DW_OP_GNU_deref_type:
 	  {
 	    int addr_size = *data++;
@@ -4025,6 +4192,7 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_const_type:
 	case DW_OP_GNU_const_type:
 	  {
 	    cu_offset type_die;
@@ -4039,6 +4207,7 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_regval_type:
 	case DW_OP_GNU_regval_type:
 	  {
 	    uint64_t reg;
@@ -4058,7 +4227,9 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_convert:
 	case DW_OP_GNU_convert:
+	case DW_OP_reinterpret:
 	case DW_OP_GNU_reinterpret:
 	  {
 	    cu_offset type_die;
@@ -4080,6 +4251,7 @@ disassemble_dwarf_expression (struct ui_
 	  }
 	  break;
 
+	case DW_OP_entry_value:
 	case DW_OP_GNU_entry_value:
 	  data = safe_read_uleb128 (data, end, &ul);
 	  fputc_filtered ('\n', stream);
@@ -4214,7 +4386,8 @@ static void
 locexpr_describe_location (struct symbol *symbol, CORE_ADDR addr,
 			   struct ui_file *stream)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
   struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
   int offset_size = dwarf2_per_cu_offset_size (dlbaton->per_cu);
@@ -4232,7 +4405,8 @@ static void
 locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
 			    struct agent_expr *ax, struct axs_value *value)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
 
   if (dlbaton->size == 0)
@@ -4246,12 +4420,13 @@ locexpr_tracepoint_var_ref (struct symbo
 /* symbol_computed_ops 'generate_c_location' method.  */
 
 static void
-locexpr_generate_c_location (struct symbol *sym, struct ui_file *stream,
+locexpr_generate_c_location (struct symbol *sym, string_file &stream,
 			     struct gdbarch *gdbarch,
 			     unsigned char *registers_used,
 			     CORE_ADDR pc, const char *result_name)
 {
-  struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+  struct dwarf2_locexpr_baton *dlbaton
+    = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (sym);
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
 
   if (dlbaton->size == 0)
@@ -4268,7 +4443,7 @@ locexpr_generate_c_location (struct symb
 const struct symbol_computed_ops dwarf2_locexpr_funcs = {
   locexpr_read_variable,
   locexpr_read_variable_at_entry,
-  locexpr_read_needs_frame,
+  locexpr_get_symbol_read_needs,
   locexpr_describe_location,
   0,	/* location_has_loclist */
   locexpr_tracepoint_var_ref,
@@ -4284,7 +4459,8 @@ const struct symbol_computed_ops dwarf2_
 static struct value *
 loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
 {
-  struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_loclist_baton *dlbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
   struct value *val;
   const gdb_byte *data;
   size_t size;
@@ -4308,7 +4484,8 @@ loclist_read_variable (struct symbol *sy
 static struct value *
 loclist_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
 {
-  struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_loclist_baton *dlbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
   const gdb_byte *data;
   size_t size;
   CORE_ADDR pc;
@@ -4323,9 +4500,11 @@ loclist_read_variable_at_entry (struct s
   return value_of_dwarf_block_entry (SYMBOL_TYPE (symbol), frame, data, size);
 }
 
-/* Return non-zero iff we need a frame to evaluate SYMBOL.  */
-static int
-loclist_read_needs_frame (struct symbol *symbol)
+/* Implementation of get_symbol_read_needs from
+   symbol_computed_ops.  */
+
+static enum symbol_needs_kind
+loclist_symbol_needs (struct symbol *symbol)
 {
   /* If there's a location list, then assume we need to have a frame
      to choose the appropriate location expression.  With tracking of
@@ -4333,7 +4512,7 @@ loclist_read_needs_frame (struct symbol 
      is disabled in GCC at the moment until we figure out how to
      represent it.  */
 
-  return 1;
+  return SYMBOL_NEEDS_FRAME;
 }
 
 /* Print a natural-language description of SYMBOL to STREAM.  This
@@ -4344,7 +4523,8 @@ static void
 loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
 			   struct ui_file *stream)
 {
-  struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_loclist_baton *dlbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
   const gdb_byte *loc_ptr, *buf_end;
   struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -4433,7 +4613,8 @@ static void
 loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
 			    struct agent_expr *ax, struct axs_value *value)
 {
-  struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+  struct dwarf2_loclist_baton *dlbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
   const gdb_byte *data;
   size_t size;
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
@@ -4449,12 +4630,13 @@ loclist_tracepoint_var_ref (struct symbo
 /* symbol_computed_ops 'generate_c_location' method.  */
 
 static void
-loclist_generate_c_location (struct symbol *sym, struct ui_file *stream,
+loclist_generate_c_location (struct symbol *sym, string_file &stream,
 			     struct gdbarch *gdbarch,
 			     unsigned char *registers_used,
 			     CORE_ADDR pc, const char *result_name)
 {
-  struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+  struct dwarf2_loclist_baton *dlbaton
+    = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (sym);
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
   const gdb_byte *data;
   size_t size;
@@ -4474,7 +4656,7 @@ loclist_generate_c_location (struct symb
 const struct symbol_computed_ops dwarf2_loclist_funcs = {
   loclist_read_variable,
   loclist_read_variable_at_entry,
-  loclist_read_needs_frame,
+  loclist_symbol_needs,
   loclist_describe_location,
   1,	/* location_has_loclist */
   loclist_tracepoint_var_ref,
@@ -4499,4 +4681,8 @@ _initialize_dwarf2loc (void)
 			     NULL,
 			     show_entry_values_debug,
 			     &setdebuglist, &showdebuglist);
+
+#if GDB_SELF_TEST
+  register_self_test (selftests::copy_bitwise_tests);
+#endif
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2loc.h ./gdb/dwarf2loc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2loc.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2loc.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DWARF 2 location expression support for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -56,6 +56,8 @@ int dwarf2_per_cu_offset_size (struct dw
    offset in the parent objfile.  */
 CORE_ADDR dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu);
 
+short dwarf2_version (struct dwarf2_per_cu_data *per_cu);
+
 /* Find a particular location expression from a location list.  */
 const gdb_byte *dwarf2_find_location_expression
   (struct dwarf2_loclist_baton *baton,
@@ -122,12 +124,19 @@ struct property_addr_info
   struct property_addr_info *next;
 };
 
-/* Converts a dynamic property into a static one.  ADDR_STACK is the stack
-   of addresses that might be needed to evaluate the property.
+/* Converts a dynamic property into a static one.  FRAME is the frame in which
+   the property is evaluated; if NULL, the selected frame (if any) is used
+   instead.
+
+   ADDR_STACK is the stack of addresses that might be needed to evaluate the
+   property. When evaluating a property that is not related to a type, it can
+   be NULL.
+
    Returns 1 if PROP could be converted and the static value is passed back
    into VALUE, otherwise returns 0.  */
 
 int dwarf2_evaluate_property (const struct dynamic_prop *prop,
+			      struct frame_info *frame,
 			      struct property_addr_info *addr_stack,
 			      CORE_ADDR *value);
 
@@ -144,7 +153,7 @@ int dwarf2_evaluate_property (const stru
    evaluated.
    SYM the originating symbol, used for error reporting.  */
 
-void dwarf2_compile_property_to_c (struct ui_file *stream,
+void dwarf2_compile_property_to_c (string_file &stream,
 				   const char *result_name,
 				   struct gdbarch *gdbarch,
 				   unsigned char *registers_used,
@@ -286,9 +295,18 @@ extern struct call_site_chain *call_site
 /* A helper function to convert a DWARF register to an arch register.
    ARCH is the architecture.
    DWARF_REG is the register.
-   This will throw an exception if the DWARF register cannot be
-   translated to an architecture register.  */
+   If DWARF_REG is bad then a complaint is issued and -1 is returned.
+   Note: Some targets get this wrong.  */
+
+extern int dwarf_reg_to_regnum (struct gdbarch *arch, int dwarf_reg);
+
+/* A wrapper on dwarf_reg_to_regnum to throw an exception if the
+   DWARF register cannot be translated to an architecture register.
+   This takes a ULONGEST instead of an int because some callers actually have
+   a ULONGEST.  Negative values passed as ints will still be flagged as
+   invalid.  */
 
-extern int dwarf2_reg_to_regnum_or_error (struct gdbarch *arch, int dwarf_reg);
+extern int dwarf_reg_to_regnum_or_error (struct gdbarch *arch,
+					 ULONGEST dwarf_reg);
 
 #endif /* dwarf2loc.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2read.c ./gdb/dwarf2read.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/dwarf2read.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/dwarf2read.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* DWARF 2 debugging format support for GDB.
 
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
    Inc.  with support from Florida State University (under contract
@@ -53,7 +53,6 @@
 #include "block.h"
 #include "addrmap.h"
 #include "typeprint.h"
-#include "jv-lang.h"
 #include "psympriv.h"
 #include <sys/stat.h>
 #include "completer.h"
@@ -69,9 +68,13 @@
 #include "source.h"
 #include "filestuff.h"
 #include "build-id.h"
+#include "namespace.h"
+#include "common/gdb_unlinker.h"
+#include "common/function-view.h"
 
 #include <fcntl.h>
 #include <sys/types.h>
+#include <algorithm>
 
 typedef struct symbol *symbolp;
 DEF_VEC_P (symbolp);
@@ -123,7 +126,7 @@ struct dwarf2_section_info
   union
   {
     /* If this is a real section, the bfd section.  */
-    asection *asection;
+    asection *section;
     /* If this is a virtual section, pointer to the containing ("real")
        section.  */
     struct dwarf2_section_info *containing_section;
@@ -138,7 +141,7 @@ struct dwarf2_section_info
   /* True if we have tried to read this section.  */
   char readin;
   /* True if this is a virtual section, False otherwise.
-     This specifies which of s.asection and s.containing_section to use.  */
+     This specifies which of s.section and s.containing_section to use.  */
   char is_virtual;
 };
 
@@ -220,10 +223,13 @@ struct dwarf2_per_objfile
   struct dwarf2_section_info abbrev;
   struct dwarf2_section_info line;
   struct dwarf2_section_info loc;
+  struct dwarf2_section_info loclists;
   struct dwarf2_section_info macinfo;
   struct dwarf2_section_info macro;
   struct dwarf2_section_info str;
+  struct dwarf2_section_info line_str;
   struct dwarf2_section_info ranges;
+  struct dwarf2_section_info rnglists;
   struct dwarf2_section_info addr;
   struct dwarf2_section_info frame;
   struct dwarf2_section_info eh_frame;
@@ -331,10 +337,13 @@ static const struct dwarf2_debug_section
   { ".debug_abbrev", ".zdebug_abbrev" },
   { ".debug_line", ".zdebug_line" },
   { ".debug_loc", ".zdebug_loc" },
+  { ".debug_loclists", ".zdebug_loclists" },
   { ".debug_macinfo", ".zdebug_macinfo" },
   { ".debug_macro", ".zdebug_macro" },
   { ".debug_str", ".zdebug_str" },
+  { ".debug_line_str", ".zdebug_line_str" },
   { ".debug_ranges", ".zdebug_ranges" },
+  { ".debug_rnglists", ".zdebug_rnglists" },
   { ".debug_types", ".zdebug_types" },
   { ".debug_addr", ".zdebug_addr" },
   { ".debug_frame", ".zdebug_frame" },
@@ -351,6 +360,7 @@ static const struct dwop_section_names
   struct dwarf2_section_names info_dwo;
   struct dwarf2_section_names line_dwo;
   struct dwarf2_section_names loc_dwo;
+  struct dwarf2_section_names loclists_dwo;
   struct dwarf2_section_names macinfo_dwo;
   struct dwarf2_section_names macro_dwo;
   struct dwarf2_section_names str_dwo;
@@ -365,6 +375,7 @@ dwop_section_names =
   { ".debug_info.dwo", ".zdebug_info.dwo" },
   { ".debug_line.dwo", ".zdebug_line.dwo" },
   { ".debug_loc.dwo", ".zdebug_loc.dwo" },
+  { ".debug_loclists.dwo", ".zdebug_loclists.dwo" },
   { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo" },
   { ".debug_macro.dwo", ".zdebug_macro.dwo" },
   { ".debug_str.dwo", ".zdebug_str.dwo" },
@@ -392,6 +403,8 @@ struct comp_unit_head
   /* Size of the length field; either 4 or 12.  */
   unsigned int initial_length_size;
 
+  enum dwarf_unit_type unit_type;
+
   /* Offset to the first byte of this compilation unit header in the
      .debug_info section, for resolving relative reference dies.  */
   sect_offset offset;
@@ -399,6 +412,13 @@ struct comp_unit_head
   /* Offset to first die in this cu from the start of the cu.
      This will be the first byte following the compilation unit header.  */
   cu_offset first_die_offset;
+
+  /* 64-bit signature of this type unit - it is valid only for
+     UNIT_TYPE DW_UT_type.  */
+  ULONGEST signature;
+
+  /* For types, offset in the type's DIE of the type defined by this TU.  */
+  cu_offset type_offset_in_tu;
 };
 
 /* Type used for delaying computation of method physnames.
@@ -570,6 +590,9 @@ struct dwarf2_per_cu_data
   sect_offset offset;
   unsigned int length;
 
+  /* DWARF standard version this data has been read from (such as 4 or 5).  */
+  short dwarf_version;
+
   /* Flag indicating this compilation unit will be read in before
      any of the current compilation units are processed.  */
   unsigned int queued : 1;
@@ -610,7 +633,8 @@ struct dwarf2_per_cu_data
   struct dwarf2_section_info *section;
 
   /* Set to non-NULL iff this CU is currently loaded.  When it gets freed out
-     of the CU cache it gets reset to NULL again.  */
+     of the CU cache it gets reset to NULL again.  This is left as NULL for
+     dummy CUs (a CU header, but nothing else).  */
   struct dwarf2_cu *cu;
 
   /* The corresponding objfile.
@@ -753,6 +777,7 @@ struct dwo_sections
   struct dwarf2_section_info abbrev;
   struct dwarf2_section_info line;
   struct dwarf2_section_info loc;
+  struct dwarf2_section_info loclists;
   struct dwarf2_section_info macinfo;
   struct dwarf2_section_info macro;
   struct dwarf2_section_info str;
@@ -1103,6 +1128,9 @@ struct partial_die_info
     unsigned int has_pc_info : 1;
     unsigned int may_be_inlined : 1;
 
+    /* This DIE has been marked DW_AT_main_subprogram.  */
+    unsigned int main_subprogram : 1;
+
     /* Flag set if the SCOPE field of this structure has been
        computed.  */
     unsigned int scope_set : 1;
@@ -1182,6 +1210,9 @@ struct attr_abbrev
   {
     ENUM_BITFIELD(dwarf_attribute) name : 16;
     ENUM_BITFIELD(dwarf_form) form : 16;
+
+    /* It is valid only if FORM is DW_FORM_implicit_const.  */
+    LONGEST implicit_const;
   };
 
 /* Size of abbrev_table.abbrev_hash_table.  */
@@ -1501,9 +1532,11 @@ static const char *read_indirect_string 
 					 const struct comp_unit_head *,
 					 unsigned int *);
 
-static const char *read_indirect_string_from_dwz (struct dwz_file *, LONGEST);
+static const char *read_indirect_line_string (bfd *, const gdb_byte *,
+					      const struct comp_unit_head *,
+					      unsigned int *);
 
-static ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *);
+static const char *read_indirect_string_from_dwz (struct dwz_file *, LONGEST);
 
 static LONGEST read_signed_leb128 (bfd *, const gdb_byte *, unsigned int *);
 
@@ -1522,6 +1555,9 @@ static struct attribute *dwarf2_attr (st
 static struct attribute *dwarf2_attr_no_follow (struct die_info *,
 						unsigned int);
 
+static const char *dwarf2_string_attr (struct die_info *die, unsigned int name,
+                                       struct dwarf2_cu *cu);
+
 static int dwarf2_flag_true_p (struct die_info *die, unsigned name,
                                struct dwarf2_cu *cu);
 
@@ -1601,9 +1637,28 @@ static void read_call_site_scope (struct
 static int dwarf2_ranges_read (unsigned, CORE_ADDR *, CORE_ADDR *,
 			       struct dwarf2_cu *, struct partial_symtab *);
 
-static int dwarf2_get_pc_bounds (struct die_info *,
-				 CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *,
-				 struct partial_symtab *);
+/* How dwarf2_get_pc_bounds constructed its *LOWPC and *HIGHPC return
+   values.  Keep the items ordered with increasing constraints compliance.  */
+enum pc_bounds_kind
+{
+  /* No attribute DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges was found.  */
+  PC_BOUNDS_NOT_PRESENT,
+
+  /* Some of the attributes DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges
+     were present but they do not form a valid range of PC addresses.  */
+  PC_BOUNDS_INVALID,
+
+  /* Discontiguous range was found - that is DW_AT_ranges was found.  */
+  PC_BOUNDS_RANGES,
+
+  /* Contiguous range was found - DW_AT_low_pc and DW_AT_high_pc were found.  */
+  PC_BOUNDS_HIGH_LOW,
+};
+
+static enum pc_bounds_kind dwarf2_get_pc_bounds (struct die_info *,
+						 CORE_ADDR *, CORE_ADDR *,
+						 struct dwarf2_cu *,
+						 struct partial_symtab *);
 
 static void get_scope_pc_bounds (struct die_info *,
 				 CORE_ADDR *, CORE_ADDR *,
@@ -1634,6 +1689,8 @@ static void read_namespace (struct die_i
 
 static void read_module (struct die_info *die, struct dwarf2_cu *cu);
 
+static struct using_direct **using_directives (enum language);
+
 static void read_import_statement (struct die_info *die, struct dwarf2_cu *);
 
 static int read_namespace_alias (struct die_info *die, struct dwarf2_cu *cu);
@@ -1736,6 +1793,10 @@ static void load_full_type_unit (struct 
 
 static void read_signatured_type (struct signatured_type *);
 
+static int attr_to_dynamic_prop (const struct attribute *attr,
+				 struct die_info *die, struct dwarf2_cu *cu,
+				 struct dynamic_prop *prop);
+
 /* memory allocation interface */
 
 static struct dwarf_block *dwarf_alloc_block (struct dwarf2_cu *);
@@ -1831,11 +1892,14 @@ static void find_file_and_directory (str
 static char *file_full_name (int file, struct line_header *lh,
 			     const char *comp_dir);
 
+/* Expected enum dwarf_unit_type for read_comp_unit_head.  */
+enum class rcuh_kind { COMPILE, TYPE };
+
 static const gdb_byte *read_and_check_comp_unit_head
   (struct comp_unit_head *header,
    struct dwarf2_section_info *section,
    struct dwarf2_section_info *abbrev_section, const gdb_byte *info_ptr,
-   int is_debug_types_section);
+   rcuh_kind section_kind);
 
 static void init_cutu_and_read_dies
   (struct dwarf2_per_cu_data *this_cu, struct abbrev_table *abbrev_table,
@@ -1951,7 +2015,7 @@ line_header_hash (const struct line_head
 static hashval_t
 line_header_hash_voidp (const void *item)
 {
-  const struct line_header *ofs = item;
+  const struct line_header *ofs = (const struct line_header *) item;
 
   return line_header_hash (ofs);
 }
@@ -1961,8 +2025,8 @@ line_header_hash_voidp (const void *item
 static int
 line_header_eq_voidp (const void *item_lhs, const void *item_rhs)
 {
-  const struct line_header *ofs_lhs = item_lhs;
-  const struct line_header *ofs_rhs = item_rhs;
+  const struct line_header *ofs_lhs = (const struct line_header *) item_lhs;
+  const struct line_header *ofs_rhs = (const struct line_header *) item_rhs;
 
   return (ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off
 	  && ofs_lhs->offset_in_dwz == ofs_rhs->offset_in_dwz);
@@ -2032,12 +2096,13 @@ int
 dwarf2_has_info (struct objfile *objfile,
                  const struct dwarf2_debug_sections *names)
 {
-  dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+  dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+			objfile_data (objfile, dwarf2_objfile_data_key));
   if (!dwarf2_per_objfile)
     {
       /* Initialize per-objfile state.  */
       struct dwarf2_per_objfile *data
-	= obstack_alloc (&objfile->objfile_obstack, sizeof (*data));
+	= XOBNEW (&objfile->objfile_obstack, struct dwarf2_per_objfile);
 
       memset (data, 0, sizeof (*data));
       set_objfile_data (objfile, dwarf2_objfile_data_key, data);
@@ -2048,9 +2113,9 @@ dwarf2_has_info (struct objfile *objfile
       dwarf2_per_objfile->objfile = objfile;
     }
   return (!dwarf2_per_objfile->info.is_virtual
-	  && dwarf2_per_objfile->info.s.asection != NULL
+	  && dwarf2_per_objfile->info.s.section != NULL
 	  && !dwarf2_per_objfile->abbrev.is_virtual
-	  && dwarf2_per_objfile->abbrev.s.asection != NULL);
+	  && dwarf2_per_objfile->abbrev.s.section != NULL);
 }
 
 /* Return the containing section of virtual section SECTION.  */
@@ -2072,7 +2137,7 @@ get_section_bfd_owner (const struct dwar
       section = get_containing_section (section);
       gdb_assert (!section->is_virtual);
     }
-  return section->s.asection->owner;
+  return section->s.section->owner;
 }
 
 /* Return the bfd section of SECTION.
@@ -2086,7 +2151,7 @@ get_section_bfd_section (const struct dw
       section = get_containing_section (section);
       gdb_assert (!section->is_virtual);
     }
-  return section->s.asection;
+  return section->s.section;
 }
 
 /* Return the name of SECTION.  */
@@ -2171,65 +2236,80 @@ dwarf2_locate_sections (bfd *abfd, asect
     }
   else if (section_is_p (sectp->name, &names->info))
     {
-      dwarf2_per_objfile->info.s.asection = sectp;
+      dwarf2_per_objfile->info.s.section = sectp;
       dwarf2_per_objfile->info.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->abbrev))
     {
-      dwarf2_per_objfile->abbrev.s.asection = sectp;
+      dwarf2_per_objfile->abbrev.s.section = sectp;
       dwarf2_per_objfile->abbrev.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->line))
     {
-      dwarf2_per_objfile->line.s.asection = sectp;
+      dwarf2_per_objfile->line.s.section = sectp;
       dwarf2_per_objfile->line.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->loc))
     {
-      dwarf2_per_objfile->loc.s.asection = sectp;
+      dwarf2_per_objfile->loc.s.section = sectp;
       dwarf2_per_objfile->loc.size = bfd_get_section_size (sectp);
     }
+  else if (section_is_p (sectp->name, &names->loclists))
+    {
+      dwarf2_per_objfile->loclists.s.section = sectp;
+      dwarf2_per_objfile->loclists.size = bfd_get_section_size (sectp);
+    }
   else if (section_is_p (sectp->name, &names->macinfo))
     {
-      dwarf2_per_objfile->macinfo.s.asection = sectp;
+      dwarf2_per_objfile->macinfo.s.section = sectp;
       dwarf2_per_objfile->macinfo.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macro))
     {
-      dwarf2_per_objfile->macro.s.asection = sectp;
+      dwarf2_per_objfile->macro.s.section = sectp;
       dwarf2_per_objfile->macro.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->str))
     {
-      dwarf2_per_objfile->str.s.asection = sectp;
+      dwarf2_per_objfile->str.s.section = sectp;
       dwarf2_per_objfile->str.size = bfd_get_section_size (sectp);
     }
+  else if (section_is_p (sectp->name, &names->line_str))
+    {
+      dwarf2_per_objfile->line_str.s.section = sectp;
+      dwarf2_per_objfile->line_str.size = bfd_get_section_size (sectp);
+    }
   else if (section_is_p (sectp->name, &names->addr))
     {
-      dwarf2_per_objfile->addr.s.asection = sectp;
+      dwarf2_per_objfile->addr.s.section = sectp;
       dwarf2_per_objfile->addr.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->frame))
     {
-      dwarf2_per_objfile->frame.s.asection = sectp;
+      dwarf2_per_objfile->frame.s.section = sectp;
       dwarf2_per_objfile->frame.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->eh_frame))
     {
-      dwarf2_per_objfile->eh_frame.s.asection = sectp;
+      dwarf2_per_objfile->eh_frame.s.section = sectp;
       dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->ranges))
     {
-      dwarf2_per_objfile->ranges.s.asection = sectp;
+      dwarf2_per_objfile->ranges.s.section = sectp;
       dwarf2_per_objfile->ranges.size = bfd_get_section_size (sectp);
     }
+  else if (section_is_p (sectp->name, &names->rnglists))
+    {
+      dwarf2_per_objfile->rnglists.s.section = sectp;
+      dwarf2_per_objfile->rnglists.size = bfd_get_section_size (sectp);
+    }
   else if (section_is_p (sectp->name, &names->types))
     {
       struct dwarf2_section_info type_section;
 
       memset (&type_section, 0, sizeof (type_section));
-      type_section.s.asection = sectp;
+      type_section.s.section = sectp;
       type_section.size = bfd_get_section_size (sectp);
 
       VEC_safe_push (dwarf2_section_info_def, dwarf2_per_objfile->types,
@@ -2237,11 +2317,11 @@ dwarf2_locate_sections (bfd *abfd, asect
     }
   else if (section_is_p (sectp->name, &names->gdb_index))
     {
-      dwarf2_per_objfile->gdb_index.s.asection = sectp;
+      dwarf2_per_objfile->gdb_index.s.section = sectp;
       dwarf2_per_objfile->gdb_index.size = bfd_get_section_size (sectp);
     }
 
-  if ((bfd_get_section_flags (abfd, sectp) & SEC_LOAD)
+  if ((bfd_get_section_flags (abfd, sectp) & (SEC_LOAD | SEC_ALLOC))
       && bfd_section_vma (abfd, sectp) == 0)
     dwarf2_per_objfile->has_section_at_zero = 1;
 }
@@ -2254,7 +2334,7 @@ dwarf2_section_empty_p (const struct dwa
 {
   if (section->is_virtual)
     return section->size == 0;
-  return section->s.asection == NULL || section->size == 0;
+  return section->s.section == NULL || section->size == 0;
 }
 
 /* Read the contents of the section INFO.
@@ -2313,7 +2393,7 @@ dwarf2_read_section (struct objfile *obj
       return;
     }
 
-  buf = obstack_alloc (&objfile->objfile_obstack, info->size);
+  buf = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, info->size);
   info->buffer = buf;
 
   /* When debugging .o files, we may need to apply relocations; see
@@ -2365,7 +2445,8 @@ dwarf2_get_section_info (struct objfile 
                          bfd_size_type *sizep)
 {
   struct dwarf2_per_objfile *data
-    = objfile_data (objfile, dwarf2_objfile_data_key);
+    = (struct dwarf2_per_objfile *) objfile_data (objfile,
+						  dwarf2_objfile_data_key);
   struct dwarf2_section_info *info;
 
   /* We may see an objfile without any DWARF, in which case we just
@@ -2401,38 +2482,38 @@ dwarf2_get_section_info (struct objfile 
 static void
 locate_dwz_sections (bfd *abfd, asection *sectp, void *arg)
 {
-  struct dwz_file *dwz_file = arg;
+  struct dwz_file *dwz_file = (struct dwz_file *) arg;
 
   /* Note that we only support the standard ELF names, because .dwz
      is ELF-only (at the time of writing).  */
   if (section_is_p (sectp->name, &dwarf2_elf_names.abbrev))
     {
-      dwz_file->abbrev.s.asection = sectp;
+      dwz_file->abbrev.s.section = sectp;
       dwz_file->abbrev.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &dwarf2_elf_names.info))
     {
-      dwz_file->info.s.asection = sectp;
+      dwz_file->info.s.section = sectp;
       dwz_file->info.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &dwarf2_elf_names.str))
     {
-      dwz_file->str.s.asection = sectp;
+      dwz_file->str.s.section = sectp;
       dwz_file->str.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &dwarf2_elf_names.line))
     {
-      dwz_file->line.s.asection = sectp;
+      dwz_file->line.s.section = sectp;
       dwz_file->line.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &dwarf2_elf_names.macro))
     {
-      dwz_file->macro.s.asection = sectp;
+      dwz_file->macro.s.section = sectp;
       dwz_file->macro.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &dwarf2_elf_names.gdb_index))
     {
-      dwz_file->gdb_index.s.asection = sectp;
+      dwz_file->gdb_index.s.section = sectp;
       dwz_file->gdb_index.size = bfd_get_section_size (sectp);
     }
 }
@@ -2444,7 +2525,6 @@ locate_dwz_sections (bfd *abfd, asection
 static struct dwz_file *
 dwarf2_get_dwz_file (void)
 {
-  bfd *dwz_bfd;
   char *data;
   struct cleanup *cleanup;
   const char *filename;
@@ -2488,14 +2568,11 @@ dwarf2_get_dwz_file (void)
 
   /* First try the file name given in the section.  If that doesn't
      work, try to use the build-id instead.  */
-  dwz_bfd = gdb_bfd_open (filename, gnutarget, -1);
+  gdb_bfd_ref_ptr dwz_bfd (gdb_bfd_open (filename, gnutarget, -1));
   if (dwz_bfd != NULL)
     {
-      if (!build_id_verify (dwz_bfd, buildid_len, buildid))
-	{
-	  gdb_bfd_unref (dwz_bfd);
-	  dwz_bfd = NULL;
-	}
+      if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid))
+	dwz_bfd.release ();
     }
 
   if (dwz_bfd == NULL)
@@ -2507,13 +2584,13 @@ dwarf2_get_dwz_file (void)
 
   result = OBSTACK_ZALLOC (&dwarf2_per_objfile->objfile->objfile_obstack,
 			   struct dwz_file);
-  result->dwz_bfd = dwz_bfd;
+  result->dwz_bfd = dwz_bfd.release ();
 
-  bfd_map_over_sections (dwz_bfd, locate_dwz_sections, result);
+  bfd_map_over_sections (result->dwz_bfd, locate_dwz_sections, result);
 
   do_cleanups (cleanup);
 
-  gdb_bfd_record_inclusion (dwarf2_per_objfile->objfile->obfd, dwz_bfd);
+  gdb_bfd_record_inclusion (dwarf2_per_objfile->objfile->obfd, result->dwz_bfd);
   dwarf2_per_objfile->dwz_file = result;
   return result;
 }
@@ -2598,7 +2675,8 @@ eq_stmt_list_entry (const struct stmt_li
 static hashval_t
 hash_file_name_entry (const void *e)
 {
-  const struct quick_file_names *file_data = e;
+  const struct quick_file_names *file_data
+    = (const struct quick_file_names *) e;
 
   return hash_stmt_list_entry (&file_data->hash);
 }
@@ -2608,8 +2686,8 @@ hash_file_name_entry (const void *e)
 static int
 eq_file_name_entry (const void *a, const void *b)
 {
-  const struct quick_file_names *ea = a;
-  const struct quick_file_names *eb = b;
+  const struct quick_file_names *ea = (const struct quick_file_names *) a;
+  const struct quick_file_names *eb = (const struct quick_file_names *) b;
 
   return eq_stmt_list_entry (&ea->hash, &eb->hash);
 }
@@ -2619,7 +2697,7 @@ eq_file_name_entry (const void *a, const
 static void
 delete_file_name_entry (void *e)
 {
-  struct quick_file_names *file_data = e;
+  struct quick_file_names *file_data = (struct quick_file_names *) e;
   int i;
 
   for (i = 0; i < file_data->num_file_names; ++i)
@@ -2655,7 +2733,8 @@ load_cu (struct dwarf2_per_cu_data *per_
   else
     load_full_comp_unit (per_cu, language_minimal);
 
-  gdb_assert (per_cu->cu != NULL);
+  if (per_cu->cu == NULL)
+    return;  /* Dummy CU.  */
 
   dwarf2_find_base_address (per_cu->cu->dies, per_cu->cu);
 }
@@ -2685,6 +2764,7 @@ dw2_do_instantiate_symtab (struct dwarf2
 	 that may badly handle TUs, load all the TUs in that DWO as well.
 	 http://sourceware.org/bugzilla/show_bug.cgi?id=15021  */
       if (!per_cu->is_debug_types
+	  && per_cu->cu != NULL
 	  && per_cu->cu->dwo_unit != NULL
 	  && dwarf2_per_objfile->index_table != NULL
 	  && dwarf2_per_objfile->index_table->version <= 7
@@ -2806,10 +2886,9 @@ create_cus_from_index (struct objfile *o
   struct dwz_file *dwz;
 
   dwarf2_per_objfile->n_comp_units = (cu_list_elements + dwz_elements) / 2;
-  dwarf2_per_objfile->all_comp_units
-    = obstack_alloc (&objfile->objfile_obstack,
-		     dwarf2_per_objfile->n_comp_units
-		     * sizeof (struct dwarf2_per_cu_data *));
+  dwarf2_per_objfile->all_comp_units =
+    XOBNEWVEC (&objfile->objfile_obstack, struct dwarf2_per_cu_data *,
+	       dwarf2_per_objfile->n_comp_units);
 
   create_cus_from_index_list (objfile, cu_list, cu_list_elements,
 			      &dwarf2_per_objfile->info, 0, 0);
@@ -2836,9 +2915,8 @@ create_signatured_type_table_from_index 
   dwarf2_per_objfile->n_type_units
     = dwarf2_per_objfile->n_allocated_type_units
     = elements / 3;
-  dwarf2_per_objfile->all_type_units
-    = xmalloc (dwarf2_per_objfile->n_type_units
-	       * sizeof (struct signatured_type *));
+  dwarf2_per_objfile->all_type_units =
+    XNEWVEC (struct signatured_type *, dwarf2_per_objfile->n_type_units);
 
   sig_types_hash = allocate_signatured_type_table (objfile);
 
@@ -2973,8 +3051,8 @@ find_slot_in_mapped_hash (struct mapped_
   int (*cmp) (const char *, const char *);
 
   if (current_language->la_language == language_cplus
-      || current_language->la_language == language_java
-      || current_language->la_language == language_fortran)
+      || current_language->la_language == language_fortran
+      || current_language->la_language == language_d)
     {
       /* NAME is already canonical.  Drop any qualifiers as .gdb_index does
 	 not contain any.  */
@@ -3216,7 +3294,7 @@ dwarf2_read_index (struct objfile *objfi
 
   create_addrmap_from_index (objfile, &local_map);
 
-  map = obstack_alloc (&objfile->objfile_obstack, sizeof (struct mapped_index));
+  map = XOBNEW (&objfile->objfile_obstack, struct mapped_index);
   *map = local_map;
 
   dwarf2_per_objfile->index_table = map;
@@ -3233,7 +3311,8 @@ dwarf2_read_index (struct objfile *objfi
 static void
 dw2_setup (struct objfile *objfile)
 {
-  dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+  dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+		        objfile_data (objfile, dwarf2_objfile_data_key));
   gdb_assert (dwarf2_per_objfile);
 }
 
@@ -3288,7 +3367,7 @@ dw2_get_file_names_reader (const struct 
 			     &find_entry, INSERT);
       if (*slot != NULL)
 	{
-	  lh_cu->v.quick->file_names = *slot;
+	  lh_cu->v.quick->file_names = (struct quick_file_names *) *slot;
 	  return;
 	}
 
@@ -3300,7 +3379,7 @@ dw2_get_file_names_reader (const struct 
       return;
     }
 
-  qfn = obstack_alloc (&objfile->objfile_obstack, sizeof (*qfn));
+  qfn = XOBNEW (&objfile->objfile_obstack, struct quick_file_names);
   qfn->hash.dwo_unit = cu->dwo_unit;
   qfn->hash.line_offset.sect_off = line_offset;
   gdb_assert (slot != NULL);
@@ -3309,8 +3388,8 @@ dw2_get_file_names_reader (const struct 
   find_file_and_directory (comp_unit_die, cu, &name, &comp_dir);
 
   qfn->num_file_names = lh->num_file_names;
-  qfn->file_names = obstack_alloc (&objfile->objfile_obstack,
-				   lh->num_file_names * sizeof (char *));
+  qfn->file_names =
+    XOBNEWVEC (&objfile->objfile_obstack, const char *, lh->num_file_names);
   for (i = 0; i < lh->num_file_names; ++i)
     qfn->file_names[i] = file_full_name (i + 1, lh, comp_dir);
   qfn->real_names = NULL;
@@ -3412,8 +3491,7 @@ static int
 dw2_map_expand_apply (struct objfile *objfile,
 		      struct dwarf2_per_cu_data *per_cu,
 		      const char *name, const char *real_path,
-		      int (*callback) (struct symtab *, void *),
-		      void *data)
+		      gdb::function_view<bool (symtab *)> callback)
 {
   struct compunit_symtab *last_made = objfile->compunit_symtabs;
 
@@ -3425,17 +3503,16 @@ dw2_map_expand_apply (struct objfile *ob
      all of them.  */
   dw2_instantiate_symtab (per_cu);
 
-  return iterate_over_some_symtabs (name, real_path, callback, data,
-				    objfile->compunit_symtabs, last_made);
+  return iterate_over_some_symtabs (name, real_path, objfile->compunit_symtabs,
+				    last_made, callback);
 }
 
 /* Implementation of the map_symtabs_matching_filename method.  */
 
-static int
-dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
-				   const char *real_path,
-				   int (*callback) (struct symtab *, void *),
-				   void *data)
+static bool
+dw2_map_symtabs_matching_filename
+  (struct objfile *objfile, const char *name, const char *real_path,
+   gdb::function_view<bool (symtab *)> callback)
 {
   int i;
   const char *name_basename = lbasename (name);
@@ -3467,8 +3544,8 @@ dw2_map_symtabs_matching_filename (struc
 	  if (compare_filenames_for_search (this_name, name))
 	    {
 	      if (dw2_map_expand_apply (objfile, per_cu, name, real_path,
-					callback, data))
-		return 1;
+					callback))
+		return true;
 	      continue;
 	    }
 
@@ -3482,8 +3559,8 @@ dw2_map_symtabs_matching_filename (struc
 	  if (compare_filenames_for_search (this_real_name, name))
 	    {
 	      if (dw2_map_expand_apply (objfile, per_cu, name, real_path,
-					callback, data))
-		return 1;
+					callback))
+		return true;
 	      continue;
 	    }
 
@@ -3495,15 +3572,15 @@ dw2_map_symtabs_matching_filename (struc
 		  && FILENAME_CMP (real_path, this_real_name) == 0)
 		{
 		  if (dw2_map_expand_apply (objfile, per_cu, name, real_path,
-					    callback, data))
-		    return 1;
+					    callback))
+		    return true;
 		  continue;
 		}
 	    }
 	}
     }
 
-  return 0;
+  return false;
 }
 
 /* Struct used to manage iterating over all CUs looking for a symbol.  */
@@ -3841,11 +3918,10 @@ dw2_map_matching_symbols (struct objfile
 static void
 dw2_expand_symtabs_matching
   (struct objfile *objfile,
-   expand_symtabs_file_matcher_ftype *file_matcher,
-   expand_symtabs_symbol_matcher_ftype *symbol_matcher,
-   expand_symtabs_exp_notify_ftype *expansion_notify,
-   enum search_domain kind,
-   void *data)
+   gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+   enum search_domain kind)
 {
   int i;
   offset_type iter;
@@ -3860,17 +3936,12 @@ dw2_expand_symtabs_matching
 
   if (file_matcher != NULL)
     {
-      struct cleanup *cleanup;
-      htab_t visited_found, visited_not_found;
-
-      visited_found = htab_create_alloc (10,
-					 htab_hash_pointer, htab_eq_pointer,
-					 NULL, xcalloc, xfree);
-      cleanup = make_cleanup_htab_delete (visited_found);
-      visited_not_found = htab_create_alloc (10,
-					     htab_hash_pointer, htab_eq_pointer,
-					     NULL, xcalloc, xfree);
-      make_cleanup_htab_delete (visited_not_found);
+      htab_up visited_found (htab_create_alloc (10, htab_hash_pointer,
+						htab_eq_pointer,
+						NULL, xcalloc, xfree));
+      htab_up visited_not_found (htab_create_alloc (10, htab_hash_pointer,
+						    htab_eq_pointer,
+						    NULL, xcalloc, xfree));
 
       /* The rule is CUs specify all the files, including those used by
 	 any TU, so there's no need to scan TUs here.  */
@@ -3894,9 +3965,9 @@ dw2_expand_symtabs_matching
 	  if (file_data == NULL)
 	    continue;
 
-	  if (htab_find (visited_not_found, file_data) != NULL)
+	  if (htab_find (visited_not_found.get (), file_data) != NULL)
 	    continue;
-	  else if (htab_find (visited_found, file_data) != NULL)
+	  else if (htab_find (visited_found.get (), file_data) != NULL)
 	    {
 	      per_cu->v.quick->mark = 1;
 	      continue;
@@ -3906,7 +3977,7 @@ dw2_expand_symtabs_matching
 	    {
 	      const char *this_real_name;
 
-	      if (file_matcher (file_data->file_names[j], data, 0))
+	      if (file_matcher (file_data->file_names[j], false))
 		{
 		  per_cu->v.quick->mark = 1;
 		  break;
@@ -3916,11 +3987,11 @@ dw2_expand_symtabs_matching
 		 files are involved, do a quick comparison of the basenames.  */
 	      if (!basenames_may_differ
 		  && !file_matcher (lbasename (file_data->file_names[j]),
-				    data, 1))
+				    true))
 		continue;
 
 	      this_real_name = dw2_get_real_path (objfile, file_data, j);
-	      if (file_matcher (this_real_name, data, 0))
+	      if (file_matcher (this_real_name, false))
 		{
 		  per_cu->v.quick->mark = 1;
 		  break;
@@ -3928,13 +3999,11 @@ dw2_expand_symtabs_matching
 	    }
 
 	  slot = htab_find_slot (per_cu->v.quick->mark
-				 ? visited_found
-				 : visited_not_found,
+				 ? visited_found.get ()
+				 : visited_not_found.get (),
 				 file_data, INSERT);
 	  *slot = file_data;
 	}
-
-      do_cleanups (cleanup);
     }
 
   for (iter = 0; iter < index->symbol_table_slots; ++iter)
@@ -3951,7 +4020,7 @@ dw2_expand_symtabs_matching
 
       name = index->constant_pool + MAYBE_SWAP (index->symbol_table[idx]);
 
-      if (! (*symbol_matcher) (name, data))
+      if (!symbol_matcher (name))
 	continue;
 
       /* The name was matched, now expand corresponding CUs that were
@@ -4029,8 +4098,7 @@ dw2_expand_symtabs_matching
 		  && symtab_was_null
 		  && per_cu->v.quick->compunit_symtab != NULL)
 		{
-		  expansion_notify (per_cu->v.quick->compunit_symtab,
-				    data);
+		  expansion_notify (per_cu->v.quick->compunit_symtab);
 		}
 	    }
 	}
@@ -4080,7 +4148,8 @@ dw2_find_pc_sect_compunit_symtab (struct
   if (!objfile->psymtabs_addrmap)
     return NULL;
 
-  data = addrmap_find (objfile->psymtabs_addrmap, pc);
+  data = (struct dwarf2_per_cu_data *) addrmap_find (objfile->psymtabs_addrmap,
+						     pc);
   if (!data)
     return NULL;
 
@@ -4100,11 +4169,9 @@ dw2_map_symbol_filenames (struct objfile
 			  void *data, int need_fullname)
 {
   int i;
-  struct cleanup *cleanup;
-  htab_t visited = htab_create_alloc (10, htab_hash_pointer, htab_eq_pointer,
-				      NULL, xcalloc, xfree);
+  htab_up visited (htab_create_alloc (10, htab_hash_pointer, htab_eq_pointer,
+				      NULL, xcalloc, xfree));
 
-  cleanup = make_cleanup_htab_delete (visited);
   dw2_setup (objfile);
 
   /* The rule is CUs specify all the files, including those used by
@@ -4117,7 +4184,8 @@ dw2_map_symbol_filenames (struct objfile
 
       if (per_cu->v.quick->compunit_symtab)
 	{
-	  void **slot = htab_find_slot (visited, per_cu->v.quick->file_names,
+	  void **slot = htab_find_slot (visited.get (),
+					per_cu->v.quick->file_names,
 					INSERT);
 
 	  *slot = per_cu->v.quick->file_names;
@@ -4139,7 +4207,7 @@ dw2_map_symbol_filenames (struct objfile
       if (file_data == NULL)
 	continue;
 
-      slot = htab_find_slot (visited, file_data, INSERT);
+      slot = htab_find_slot (visited.get (), file_data, INSERT);
       if (*slot)
 	{
 	  /* Already visited.  */
@@ -4158,8 +4226,6 @@ dw2_map_symbol_filenames (struct objfile
 	  (*fun) (file_data->file_names[j], this_real_name, data);
 	}
     }
-
-  do_cleanups (cleanup);
 }
 
 static int
@@ -4246,10 +4312,9 @@ dwarf2_build_psymtabs (struct objfile *o
       /* This isn't really ideal: all the data we allocate on the
 	 objfile's obstack is still uselessly kept around.  However,
 	 freeing it seems unsafe.  */
-      struct cleanup *cleanups = make_cleanup_discard_psymtabs (objfile);
-
+      psymtab_discarder psymtabs (objfile);
       dwarf2_build_psymtabs_hard (objfile);
-      discard_cleanups (cleanups);
+      psymtabs.keep ();
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
@@ -4309,15 +4374,20 @@ dwarf2_find_base_address (struct die_inf
 }
 
 /* Read in the comp unit header information from the debug_info at info_ptr.
+   Use rcuh_kind::COMPILE as the default type if not known by the caller.
    NOTE: This leaves members offset, first_die_offset to be filled in
    by the caller.  */
 
 static const gdb_byte *
 read_comp_unit_head (struct comp_unit_head *cu_header,
-		     const gdb_byte *info_ptr, bfd *abfd)
+		     const gdb_byte *info_ptr,
+		     struct dwarf2_section_info *section,
+		     rcuh_kind section_kind)
 {
   int signed_addr;
   unsigned int bytes_read;
+  const char *filename = get_section_file_name (section);
+  bfd *abfd = get_section_bfd_owner (section);
 
   cu_header->length = read_initial_length (abfd, info_ptr, &bytes_read);
   cu_header->initial_length_size = bytes_read;
@@ -4325,17 +4395,74 @@ read_comp_unit_head (struct comp_unit_he
   info_ptr += bytes_read;
   cu_header->version = read_2_bytes (abfd, info_ptr);
   info_ptr += 2;
+  if (cu_header->version < 5)
+    switch (section_kind)
+      {
+      case rcuh_kind::COMPILE:
+	cu_header->unit_type = DW_UT_compile;
+	break;
+      case rcuh_kind::TYPE:
+	cu_header->unit_type = DW_UT_type;
+	break;
+      default:
+	internal_error (__FILE__, __LINE__,
+			_("read_comp_unit_head: invalid section_kind"));
+      }
+  else
+    {
+      cu_header->unit_type = static_cast<enum dwarf_unit_type>
+						 (read_1_byte (abfd, info_ptr));
+      info_ptr += 1;
+      switch (cu_header->unit_type)
+	{
+	case DW_UT_compile:
+	  if (section_kind != rcuh_kind::COMPILE)
+	    error (_("Dwarf Error: wrong unit_type in compilation unit header "
+		   "(is DW_UT_compile, should be DW_UT_type) [in module %s]"),
+		   filename);
+	  break;
+	case DW_UT_type:
+	  section_kind = rcuh_kind::TYPE;
+	  break;
+	default:
+	  error (_("Dwarf Error: wrong unit_type in compilation unit header "
+		 "(is %d, should be %d or %d) [in module %s]"),
+		 cu_header->unit_type, DW_UT_compile, DW_UT_type, filename);
+	}
+
+      cu_header->addr_size = read_1_byte (abfd, info_ptr);
+      info_ptr += 1;
+    }
   cu_header->abbrev_offset.sect_off = read_offset (abfd, info_ptr, cu_header,
 					     &bytes_read);
   info_ptr += bytes_read;
-  cu_header->addr_size = read_1_byte (abfd, info_ptr);
-  info_ptr += 1;
+  if (cu_header->version < 5)
+    {
+      cu_header->addr_size = read_1_byte (abfd, info_ptr);
+      info_ptr += 1;
+    }
   signed_addr = bfd_get_sign_extend_vma (abfd);
   if (signed_addr < 0)
     internal_error (__FILE__, __LINE__,
 		    _("read_comp_unit_head: dwarf from non elf file"));
   cu_header->signed_addr_p = signed_addr;
 
+  if (section_kind == rcuh_kind::TYPE)
+    {
+      LONGEST type_offset;
+
+      cu_header->signature = read_8_bytes (abfd, info_ptr);
+      info_ptr += 8;
+
+      type_offset = read_offset (abfd, info_ptr, cu_header, &bytes_read);
+      info_ptr += bytes_read;
+      cu_header->type_offset_in_tu.cu_off = type_offset;
+      if (cu_header->type_offset_in_tu.cu_off != type_offset)
+	error (_("Dwarf Error: Too big type_offset in compilation unit "
+	       "header (is %s) [in module %s]"), plongest (type_offset),
+	       filename);
+    }
+
   return info_ptr;
 }
 
@@ -4364,12 +4491,11 @@ error_check_comp_unit_head (struct comp_
 			    struct dwarf2_section_info *section,
 			    struct dwarf2_section_info *abbrev_section)
 {
-  bfd *abfd = get_section_bfd_owner (section);
   const char *filename = get_section_file_name (section);
 
-  if (header->version != 2 && header->version != 3 && header->version != 4)
+  if (header->version < 2 || header->version > 5)
     error (_("Dwarf Error: wrong version in compilation unit header "
-	   "(is %d, should be 2, 3, or 4) [in module %s]"), header->version,
+	   "(is %d, should be 2, 3, 4 or 5) [in module %s]"), header->version,
 	   filename);
 
   if (header->abbrev_offset.sect_off
@@ -4398,54 +4524,14 @@ read_and_check_comp_unit_head (struct co
 			       struct dwarf2_section_info *section,
 			       struct dwarf2_section_info *abbrev_section,
 			       const gdb_byte *info_ptr,
-			       int is_debug_types_section)
+			       rcuh_kind section_kind)
 {
   const gdb_byte *beg_of_comp_unit = info_ptr;
   bfd *abfd = get_section_bfd_owner (section);
 
   header->offset.sect_off = beg_of_comp_unit - section->buffer;
 
-  info_ptr = read_comp_unit_head (header, info_ptr, abfd);
-
-  /* If we're reading a type unit, skip over the signature and
-     type_offset fields.  */
-  if (is_debug_types_section)
-    info_ptr += 8 /*signature*/ + header->offset_size;
-
-  header->first_die_offset.cu_off = info_ptr - beg_of_comp_unit;
-
-  error_check_comp_unit_head (header, section, abbrev_section);
-
-  return info_ptr;
-}
-
-/* Read in the types comp unit header information from .debug_types entry at
-   types_ptr.  The result is a pointer to one past the end of the header.  */
-
-static const gdb_byte *
-read_and_check_type_unit_head (struct comp_unit_head *header,
-			       struct dwarf2_section_info *section,
-			       struct dwarf2_section_info *abbrev_section,
-			       const gdb_byte *info_ptr,
-			       ULONGEST *signature,
-			       cu_offset *type_offset_in_tu)
-{
-  const gdb_byte *beg_of_comp_unit = info_ptr;
-  bfd *abfd = get_section_bfd_owner (section);
-
-  header->offset.sect_off = beg_of_comp_unit - section->buffer;
-
-  info_ptr = read_comp_unit_head (header, info_ptr, abfd);
-
-  /* If we're reading a type unit, skip over the signature and
-     type_offset fields.  */
-  if (signature != NULL)
-    *signature = read_8_bytes (abfd, info_ptr);
-  info_ptr += 8;
-  if (type_offset_in_tu != NULL)
-    type_offset_in_tu->cu_off = read_offset_1 (abfd, info_ptr,
-					       header->offset_size);
-  info_ptr += header->offset_size;
+  info_ptr = read_comp_unit_head (header, info_ptr, section, section_kind);
 
   header->first_die_offset.cu_off = info_ptr - beg_of_comp_unit;
 
@@ -4462,14 +4548,24 @@ read_abbrev_offset (struct dwarf2_sectio
 {
   bfd *abfd = get_section_bfd_owner (section);
   const gdb_byte *info_ptr;
-  unsigned int length, initial_length_size, offset_size;
+  unsigned int initial_length_size, offset_size;
   sect_offset abbrev_offset;
+  uint16_t version;
 
   dwarf2_read_section (dwarf2_per_objfile->objfile, section);
   info_ptr = section->buffer + offset.sect_off;
-  length = read_initial_length (abfd, info_ptr, &initial_length_size);
+  read_initial_length (abfd, info_ptr, &initial_length_size);
   offset_size = initial_length_size == 4 ? 4 : 8;
-  info_ptr += initial_length_size + 2 /*version*/;
+  info_ptr += initial_length_size;
+
+  version = read_2_bytes (abfd, info_ptr);
+  info_ptr += 2;
+  if (version >= 5)
+    {
+      /* Skip unit type and address size.  */
+      info_ptr += 2;
+    }
+
   abbrev_offset.sect_off = read_offset_1 (abfd, info_ptr, offset_size);
   return abbrev_offset;
 }
@@ -4492,9 +4588,8 @@ dwarf2_create_include_psymtab (const cha
   subpst->textlow = 0;
   subpst->texthigh = 0;
 
-  subpst->dependencies = (struct partial_symtab **)
-    obstack_alloc (&objfile->objfile_obstack,
-                   sizeof (struct partial_symtab *));
+  subpst->dependencies
+    = XOBNEW (&objfile->objfile_obstack, struct partial_symtab *);
   subpst->dependencies[0] = pst;
   subpst->number_of_dependencies = 1;
 
@@ -4539,7 +4634,8 @@ dwarf2_build_include_psymtabs (struct dw
 static hashval_t
 hash_signatured_type (const void *item)
 {
-  const struct signatured_type *sig_type = item;
+  const struct signatured_type *sig_type
+    = (const struct signatured_type *) item;
 
   /* This drops the top 32 bits of the signature, but is ok for a hash.  */
   return sig_type->signature;
@@ -4548,8 +4644,8 @@ hash_signatured_type (const void *item)
 static int
 eq_signatured_type (const void *item_lhs, const void *item_rhs)
 {
-  const struct signatured_type *lhs = item_lhs;
-  const struct signatured_type *rhs = item_rhs;
+  const struct signatured_type *lhs = (const struct signatured_type *) item_lhs;
+  const struct signatured_type *rhs = (const struct signatured_type *) item_rhs;
 
   return lhs->signature == rhs->signature;
 }
@@ -4573,8 +4669,8 @@ allocate_signatured_type_table (struct o
 static int
 add_signatured_type_cu_to_table (void **slot, void *datum)
 {
-  struct signatured_type *sigt = *slot;
-  struct signatured_type ***datap = datum;
+  struct signatured_type *sigt = (struct signatured_type *) *slot;
+  struct signatured_type ***datap = (struct signatured_type ***) datum;
 
   **datap = sigt;
   ++*datap;
@@ -4582,165 +4678,178 @@ add_signatured_type_cu_to_table (void **
   return 1;
 }
 
-/* Create the hash table of all entries in the .debug_types
-   (or .debug_types.dwo) section(s).
-   If reading a DWO file, then DWO_FILE is a pointer to the DWO file object,
-   otherwise it is NULL.
-
-   The result is a pointer to the hash table or NULL if there are no types.
-
-   Note: This function processes DWO files only, not DWP files.  */
+/* A helper for create_debug_types_hash_table.  Read types from SECTION
+   and fill them into TYPES_HTAB.  It will process only type units,
+   therefore DW_UT_type.  */
 
-static htab_t
-create_debug_types_hash_table (struct dwo_file *dwo_file,
-			       VEC (dwarf2_section_info_def) *types)
+static void
+create_debug_type_hash_table (struct dwo_file *dwo_file,
+			      dwarf2_section_info *section, htab_t &types_htab,
+			      rcuh_kind section_kind)
 {
   struct objfile *objfile = dwarf2_per_objfile->objfile;
-  htab_t types_htab = NULL;
-  int ix;
-  struct dwarf2_section_info *section;
   struct dwarf2_section_info *abbrev_section;
-
-  if (VEC_empty (dwarf2_section_info_def, types))
-    return NULL;
+  bfd *abfd;
+  const gdb_byte *info_ptr, *end_ptr;
 
   abbrev_section = (dwo_file != NULL
 		    ? &dwo_file->sections.abbrev
 		    : &dwarf2_per_objfile->abbrev);
 
   if (dwarf_read_debug)
-    fprintf_unfiltered (gdb_stdlog, "Reading .debug_types%s for %s:\n",
-			dwo_file ? ".dwo" : "",
+    fprintf_unfiltered (gdb_stdlog, "Reading %s for %s:\n",
+			get_section_name (section),
 			get_section_file_name (abbrev_section));
 
-  for (ix = 0;
-       VEC_iterate (dwarf2_section_info_def, types, ix, section);
-       ++ix)
-    {
-      bfd *abfd;
-      const gdb_byte *info_ptr, *end_ptr;
+  dwarf2_read_section (objfile, section);
+  info_ptr = section->buffer;
 
-      dwarf2_read_section (objfile, section);
-      info_ptr = section->buffer;
+  if (info_ptr == NULL)
+    return;
 
-      if (info_ptr == NULL)
-	continue;
+  /* We can't set abfd until now because the section may be empty or
+     not present, in which case the bfd is unknown.  */
+  abfd = get_section_bfd_owner (section);
 
-      /* We can't set abfd until now because the section may be empty or
-	 not present, in which case the bfd is unknown.  */
-      abfd = get_section_bfd_owner (section);
-
-      /* We don't use init_cutu_and_read_dies_simple, or some such, here
-	 because we don't need to read any dies: the signature is in the
-	 header.  */
+  /* We don't use init_cutu_and_read_dies_simple, or some such, here
+     because we don't need to read any dies: the signature is in the
+     header.  */
 
-      end_ptr = info_ptr + section->size;
-      while (info_ptr < end_ptr)
-	{
-	  sect_offset offset;
-	  cu_offset type_offset_in_tu;
-	  ULONGEST signature;
-	  struct signatured_type *sig_type;
-	  struct dwo_unit *dwo_tu;
-	  void **slot;
-	  const gdb_byte *ptr = info_ptr;
-	  struct comp_unit_head header;
-	  unsigned int length;
+  end_ptr = info_ptr + section->size;
+  while (info_ptr < end_ptr)
+    {
+      sect_offset offset;
+      struct signatured_type *sig_type;
+      struct dwo_unit *dwo_tu;
+      void **slot;
+      const gdb_byte *ptr = info_ptr;
+      struct comp_unit_head header;
+      unsigned int length;
 
-	  offset.sect_off = ptr - section->buffer;
+      offset.sect_off = ptr - section->buffer;
 
-	  /* We need to read the type's signature in order to build the hash
-	     table, but we don't need anything else just yet.  */
+      /* Initialize it due to a false compiler warning.  */
+      header.signature = -1;
+      header.type_offset_in_tu.cu_off = -1;
 
-	  ptr = read_and_check_type_unit_head (&header, section,
-					       abbrev_section, ptr,
-					       &signature, &type_offset_in_tu);
+      /* We need to read the type's signature in order to build the hash
+	 table, but we don't need anything else just yet.  */
 
-	  length = get_cu_length (&header);
+      ptr = read_and_check_comp_unit_head (&header, section,
+					   abbrev_section, ptr, section_kind);
 
-	  /* Skip dummy type units.  */
-	  if (ptr >= info_ptr + length
-	      || peek_abbrev_code (abfd, ptr) == 0)
-	    {
-	      info_ptr += length;
-	      continue;
-	    }
+      length = get_cu_length (&header);
 
-	  if (types_htab == NULL)
-	    {
-	      if (dwo_file)
-		types_htab = allocate_dwo_unit_table (objfile);
-	      else
-		types_htab = allocate_signatured_type_table (objfile);
-	    }
+      /* Skip dummy type units.  */
+      if (ptr >= info_ptr + length
+	  || peek_abbrev_code (abfd, ptr) == 0
+	  || header.unit_type != DW_UT_type)
+	{
+	  info_ptr += length;
+	  continue;
+	}
+
+      if (types_htab == NULL)
+	{
+	  if (dwo_file)
+	    types_htab = allocate_dwo_unit_table (objfile);
+	  else
+	    types_htab = allocate_signatured_type_table (objfile);
+	}
+
+      if (dwo_file)
+	{
+	  sig_type = NULL;
+	  dwo_tu = OBSTACK_ZALLOC (&objfile->objfile_obstack,
+				   struct dwo_unit);
+	  dwo_tu->dwo_file = dwo_file;
+	  dwo_tu->signature = header.signature;
+	  dwo_tu->type_offset_in_tu = header.type_offset_in_tu;
+	  dwo_tu->section = section;
+	  dwo_tu->offset = offset;
+	  dwo_tu->length = length;
+	}
+      else
+	{
+	  /* N.B.: type_offset is not usable if this type uses a DWO file.
+	     The real type_offset is in the DWO file.  */
+	  dwo_tu = NULL;
+	  sig_type = OBSTACK_ZALLOC (&objfile->objfile_obstack,
+				     struct signatured_type);
+	  sig_type->signature = header.signature;
+	  sig_type->type_offset_in_tu = header.type_offset_in_tu;
+	  sig_type->per_cu.objfile = objfile;
+	  sig_type->per_cu.is_debug_types = 1;
+	  sig_type->per_cu.section = section;
+	  sig_type->per_cu.offset = offset;
+	  sig_type->per_cu.length = length;
+	}
+
+      slot = htab_find_slot (types_htab,
+			     dwo_file ? (void*) dwo_tu : (void *) sig_type,
+			     INSERT);
+      gdb_assert (slot != NULL);
+      if (*slot != NULL)
+	{
+	  sect_offset dup_offset;
 
 	  if (dwo_file)
 	    {
-	      sig_type = NULL;
-	      dwo_tu = OBSTACK_ZALLOC (&objfile->objfile_obstack,
-				       struct dwo_unit);
-	      dwo_tu->dwo_file = dwo_file;
-	      dwo_tu->signature = signature;
-	      dwo_tu->type_offset_in_tu = type_offset_in_tu;
-	      dwo_tu->section = section;
-	      dwo_tu->offset = offset;
-	      dwo_tu->length = length;
+	      const struct dwo_unit *dup_tu
+		= (const struct dwo_unit *) *slot;
+
+	      dup_offset = dup_tu->offset;
 	    }
 	  else
 	    {
-	      /* N.B.: type_offset is not usable if this type uses a DWO file.
-		 The real type_offset is in the DWO file.  */
-	      dwo_tu = NULL;
-	      sig_type = OBSTACK_ZALLOC (&objfile->objfile_obstack,
-					 struct signatured_type);
-	      sig_type->signature = signature;
-	      sig_type->type_offset_in_tu = type_offset_in_tu;
-	      sig_type->per_cu.objfile = objfile;
-	      sig_type->per_cu.is_debug_types = 1;
-	      sig_type->per_cu.section = section;
-	      sig_type->per_cu.offset = offset;
-	      sig_type->per_cu.length = length;
-	    }
-
-	  slot = htab_find_slot (types_htab,
-				 dwo_file ? (void*) dwo_tu : (void *) sig_type,
-				 INSERT);
-	  gdb_assert (slot != NULL);
-	  if (*slot != NULL)
-	    {
-	      sect_offset dup_offset;
+	      const struct signatured_type *dup_tu
+		= (const struct signatured_type *) *slot;
 
-	      if (dwo_file)
-		{
-		  const struct dwo_unit *dup_tu = *slot;
+	      dup_offset = dup_tu->per_cu.offset;
+	    }
 
-		  dup_offset = dup_tu->offset;
-		}
-	      else
-		{
-		  const struct signatured_type *dup_tu = *slot;
+	  complaint (&symfile_complaints,
+		     _("debug type entry at offset 0x%x is duplicate to"
+		       " the entry at offset 0x%x, signature %s"),
+		     offset.sect_off, dup_offset.sect_off,
+		     hex_string (header.signature));
+	}
+      *slot = dwo_file ? (void *) dwo_tu : (void *) sig_type;
+
+      if (dwarf_read_debug > 1)
+	fprintf_unfiltered (gdb_stdlog, "  offset 0x%x, signature %s\n",
+			    offset.sect_off,
+			    hex_string (header.signature));
 
-		  dup_offset = dup_tu->per_cu.offset;
-		}
+      info_ptr += length;
+    }
+}
 
-	      complaint (&symfile_complaints,
-			 _("debug type entry at offset 0x%x is duplicate to"
-			   " the entry at offset 0x%x, signature %s"),
-			 offset.sect_off, dup_offset.sect_off,
-			 hex_string (signature));
-	    }
-	  *slot = dwo_file ? (void *) dwo_tu : (void *) sig_type;
-
-	  if (dwarf_read_debug > 1)
-	    fprintf_unfiltered (gdb_stdlog, "  offset 0x%x, signature %s\n",
-				offset.sect_off,
-				hex_string (signature));
+/* Create the hash table of all entries in the .debug_types
+   (or .debug_types.dwo) section(s).
+   If reading a DWO file, then DWO_FILE is a pointer to the DWO file object,
+   otherwise it is NULL.
 
-	  info_ptr += length;
-	}
-    }
+   The result is a pointer to the hash table or NULL if there are no types.
+
+   Note: This function processes DWO files only, not DWP files.  */
 
-  return types_htab;
+static void
+create_debug_types_hash_table (struct dwo_file *dwo_file,
+			       VEC (dwarf2_section_info_def) *types,
+			       htab_t &types_htab)
+{
+  int ix;
+  struct dwarf2_section_info *section;
+
+  if (VEC_empty (dwarf2_section_info_def, types))
+    return;
+
+  for (ix = 0;
+       VEC_iterate (dwarf2_section_info_def, types, ix, section);
+       ++ix)
+    create_debug_type_hash_table (dwo_file, section, types_htab,
+				  rcuh_kind::TYPE);
 }
 
 /* Create the hash table of all entries in the .debug_types section,
@@ -4751,10 +4860,12 @@ create_debug_types_hash_table (struct dw
 static int
 create_all_type_units (struct objfile *objfile)
 {
-  htab_t types_htab;
+  htab_t types_htab = NULL;
   struct signatured_type **iter;
 
-  types_htab = create_debug_types_hash_table (NULL, dwarf2_per_objfile->types);
+  create_debug_type_hash_table (NULL, &dwarf2_per_objfile->info, types_htab,
+				rcuh_kind::COMPILE);
+  create_debug_types_hash_table (NULL, dwarf2_per_objfile->types, types_htab);
   if (types_htab == NULL)
     {
       dwarf2_per_objfile->signatured_types = NULL;
@@ -4766,9 +4877,8 @@ create_all_type_units (struct objfile *o
   dwarf2_per_objfile->n_type_units
     = dwarf2_per_objfile->n_allocated_type_units
     = htab_elements (types_htab);
-  dwarf2_per_objfile->all_type_units
-    = xmalloc (dwarf2_per_objfile->n_type_units
-	       * sizeof (struct signatured_type *));
+  dwarf2_per_objfile->all_type_units =
+    XNEWVEC (struct signatured_type *, dwarf2_per_objfile->n_type_units);
   iter = &dwarf2_per_objfile->all_type_units[0];
   htab_traverse_noresize (types_htab, add_signatured_type_cu_to_table, &iter);
   gdb_assert (iter - &dwarf2_per_objfile->all_type_units[0]
@@ -4796,9 +4906,9 @@ add_type_unit (ULONGEST sig, void **slot
 	dwarf2_per_objfile->n_allocated_type_units = 1;
       dwarf2_per_objfile->n_allocated_type_units *= 2;
       dwarf2_per_objfile->all_type_units
-	= xrealloc (dwarf2_per_objfile->all_type_units,
-		    dwarf2_per_objfile->n_allocated_type_units
-		    * sizeof (struct signatured_type *));
+	= XRESIZEVEC (struct signatured_type *,
+		      dwarf2_per_objfile->all_type_units,
+		      dwarf2_per_objfile->n_allocated_type_units);
       ++dwarf2_per_objfile->tu_stats.nr_all_type_units_reallocs;
     }
   dwarf2_per_objfile->n_type_units = n_type_units;
@@ -4898,7 +5008,7 @@ lookup_dwo_signatured_type (struct dwarf
   find_sig_entry.signature = sig;
   slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
 			 &find_sig_entry, INSERT);
-  sig_entry = *slot;
+  sig_entry = (struct signatured_type *) *slot;
 
   /* We can get here with the TU already read, *or* in the process of being
      read.  Don't reassign the global entry to point to this DWO if that's
@@ -4920,7 +5030,7 @@ lookup_dwo_signatured_type (struct dwarf
   if (dwo_file->tus == NULL)
     return NULL;
   find_dwo_entry.signature = sig;
-  dwo_entry = htab_find (dwo_file->tus, &find_dwo_entry);
+  dwo_entry = (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_entry);
   if (dwo_entry == NULL)
     return NULL;
 
@@ -4961,7 +5071,7 @@ lookup_dwp_signatured_type (struct dwarf
   find_sig_entry.signature = sig;
   slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
 			 &find_sig_entry, INSERT);
-  sig_entry = *slot;
+  sig_entry = (struct signatured_type *) *slot;
 
   /* Have we already tried to read this TU?
      Note: sig_entry can be NULL if the skeleton TU was removed (thus it
@@ -5006,7 +5116,8 @@ lookup_signatured_type (struct dwarf2_cu
       if (dwarf2_per_objfile->signatured_types == NULL)
 	return NULL;
       find_entry.signature = sig;
-      entry = htab_find (dwarf2_per_objfile->signatured_types, &find_entry);
+      entry = ((struct signatured_type *)
+	       htab_find (dwarf2_per_objfile->signatured_types, &find_entry));
       return entry;
     }
 }
@@ -5116,8 +5227,7 @@ read_cutu_die_from_dwo (struct dwarf2_pe
   else if (stub_comp_dir != NULL)
     {
       /* Reconstruct the comp_dir attribute to simplify the code below.  */
-      comp_dir = (struct attribute *)
-	obstack_alloc (&cu->comp_unit_obstack, sizeof (*comp_dir));
+      comp_dir = XOBNEW (&cu->comp_unit_obstack, struct attribute);
       comp_dir->name = DW_AT_comp_dir;
       comp_dir->form = DW_FORM_string;
       DW_STRING_IS_CANONICAL (comp_dir) = 0;
@@ -5135,22 +5245,18 @@ read_cutu_die_from_dwo (struct dwarf2_pe
 
   if (this_cu->is_debug_types)
     {
-      ULONGEST header_signature;
-      cu_offset type_offset_in_tu;
       struct signatured_type *sig_type = (struct signatured_type *) this_cu;
 
-      info_ptr = read_and_check_type_unit_head (&cu->header, section,
+      info_ptr = read_and_check_comp_unit_head (&cu->header, section,
 						dwo_abbrev_section,
-						info_ptr,
-						&header_signature,
-						&type_offset_in_tu);
+						info_ptr, rcuh_kind::TYPE);
       /* This is not an assert because it can be caused by bad debug info.  */
-      if (sig_type->signature != header_signature)
+      if (sig_type->signature != cu->header.signature)
 	{
 	  error (_("Dwarf Error: signature mismatch %s vs %s while reading"
 		   " TU at offset 0x%x [in module %s]"),
 		 hex_string (sig_type->signature),
-		 hex_string (header_signature),
+		 hex_string (cu->header.signature),
 		 dwo_unit->offset.sect_off,
 		 bfd_get_filename (abfd));
 	}
@@ -5158,7 +5264,7 @@ read_cutu_die_from_dwo (struct dwarf2_pe
       /* For DWOs coming from DWP files, we don't know the CU length
 	 nor the type's offset in the TU until now.  */
       dwo_unit->length = get_cu_length (&cu->header);
-      dwo_unit->type_offset_in_tu = type_offset_in_tu;
+      dwo_unit->type_offset_in_tu = cu->header.type_offset_in_tu;
 
       /* Establish the type offset that can be used to lookup the type.
 	 For DWO files, we don't know it until now.  */
@@ -5169,7 +5275,7 @@ read_cutu_die_from_dwo (struct dwarf2_pe
     {
       info_ptr = read_and_check_comp_unit_head (&cu->header, section,
 						dwo_abbrev_section,
-						info_ptr, 0);
+						info_ptr, rcuh_kind::COMPILE);
       gdb_assert (dwo_unit->offset.sect_off == cu->header.offset.sect_off);
       /* For DWOs coming from DWP files, we don't know the CU length
 	 until now.  */
@@ -5263,13 +5369,8 @@ lookup_dwo_unit (struct dwarf2_per_cu_da
   gdb_assert (cu != NULL);
 
   /* Yeah, we look dwo_name up again, but it simplifies the code.  */
-  attr = dwarf2_attr (comp_unit_die, DW_AT_GNU_dwo_name, cu);
-  gdb_assert (attr != NULL);
-  dwo_name = DW_STRING (attr);
-  comp_dir = NULL;
-  attr = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, cu);
-  if (attr)
-    comp_dir = DW_STRING (attr);
+  dwo_name = dwarf2_string_attr (comp_unit_die, DW_AT_GNU_dwo_name, cu);
+  comp_dir = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
 
   if (this_cu->is_debug_types)
     {
@@ -5340,7 +5441,7 @@ init_tu_and_read_dwo_dies (struct dwarf2
     {
       /* If !use_existing_cu, this_cu->cu must be NULL.  */
       gdb_assert (this_cu->cu == NULL);
-      cu = xmalloc (sizeof (*cu));
+      cu = XNEW (struct dwarf2_cu);
       init_one_comp_unit (cu, this_cu);
       /* If an error occurs while loading, release our storage.  */
       free_cu_cleanup = make_cleanup (free_heap_comp_unit, cu);
@@ -5477,7 +5578,7 @@ init_cutu_and_read_dies (struct dwarf2_p
     {
       /* If !use_existing_cu, this_cu->cu must be NULL.  */
       gdb_assert (this_cu->cu == NULL);
-      cu = xmalloc (sizeof (*cu));
+      cu = XNEW (struct dwarf2_cu);
       init_one_comp_unit (cu, this_cu);
       /* If an error occurs while loading, release our storage.  */
       free_cu_cleanup = make_cleanup (free_heap_comp_unit, cu);
@@ -5493,20 +5594,16 @@ init_cutu_and_read_dies (struct dwarf2_p
     {
       if (this_cu->is_debug_types)
 	{
-	  ULONGEST signature;
-	  cu_offset type_offset_in_tu;
-
-	  info_ptr = read_and_check_type_unit_head (&cu->header, section,
+	  info_ptr = read_and_check_comp_unit_head (&cu->header, section,
 						    abbrev_section, info_ptr,
-						    &signature,
-						    &type_offset_in_tu);
+						    rcuh_kind::TYPE);
 
 	  /* Since per_cu is the first member of struct signatured_type,
 	     we can go from a pointer to one to a pointer to the other.  */
 	  sig_type = (struct signatured_type *) this_cu;
-	  gdb_assert (sig_type->signature == signature);
+	  gdb_assert (sig_type->signature == cu->header.signature);
 	  gdb_assert (sig_type->type_offset_in_tu.cu_off
-		      == type_offset_in_tu.cu_off);
+		      == cu->header.type_offset_in_tu.cu_off);
 	  gdb_assert (this_cu->offset.sect_off == cu->header.offset.sect_off);
 
 	  /* LENGTH has not been set yet for type units if we're
@@ -5516,15 +5613,19 @@ init_cutu_and_read_dies (struct dwarf2_p
 	  /* Establish the type offset that can be used to lookup the type.  */
 	  sig_type->type_offset_in_section.sect_off =
 	    this_cu->offset.sect_off + sig_type->type_offset_in_tu.cu_off;
+
+	  this_cu->dwarf_version = cu->header.version;
 	}
       else
 	{
 	  info_ptr = read_and_check_comp_unit_head (&cu->header, section,
 						    abbrev_section,
-						    info_ptr, 0);
+						    info_ptr,
+						    rcuh_kind::COMPILE);
 
 	  gdb_assert (this_cu->offset.sect_off == cu->header.offset.sect_off);
 	  gdb_assert (this_cu->length == get_cu_length (&cu->header));
+	  this_cu->dwarf_version = cu->header.version;
 	}
     }
 
@@ -5686,7 +5787,9 @@ init_cutu_and_read_dies_no_follow (struc
   begin_info_ptr = info_ptr = section->buffer + this_cu->offset.sect_off;
   info_ptr = read_and_check_comp_unit_head (&cu.header, section,
 					    abbrev_section, info_ptr,
-					    this_cu->is_debug_types);
+					    (this_cu->is_debug_types
+					     ? rcuh_kind::TYPE
+					     : rcuh_kind::COMPILE));
 
   this_cu->length = get_cu_length (&cu.header);
 
@@ -5737,7 +5840,8 @@ init_cutu_and_read_dies_simple (struct d
 static hashval_t
 hash_type_unit_group (const void *item)
 {
-  const struct type_unit_group *tu_group = item;
+  const struct type_unit_group *tu_group
+    = (const struct type_unit_group *) item;
 
   return hash_stmt_list_entry (&tu_group->hash);
 }
@@ -5745,8 +5849,8 @@ hash_type_unit_group (const void *item)
 static int
 eq_type_unit_group (const void *item_lhs, const void *item_rhs)
 {
-  const struct type_unit_group *lhs = item_lhs;
-  const struct type_unit_group *rhs = item_rhs;
+  const struct type_unit_group *lhs = (const struct type_unit_group *) item_lhs;
+  const struct type_unit_group *rhs = (const struct type_unit_group *) item_rhs;
 
   return eq_stmt_list_entry (&lhs->hash, &rhs->hash);
 }
@@ -5860,7 +5964,7 @@ get_type_unit_group (struct dwarf2_cu *c
 			 &type_unit_group_for_lookup, INSERT);
   if (*slot != NULL)
     {
-      tu_group = *slot;
+      tu_group = (struct type_unit_group *) *slot;
       gdb_assert (tu_group != NULL);
     }
   else
@@ -5931,13 +6035,13 @@ process_psymtab_comp_unit_reader (const 
   struct objfile *objfile = cu->objfile;
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct dwarf2_per_cu_data *per_cu = cu->per_cu;
-  struct attribute *attr;
   CORE_ADDR baseaddr;
   CORE_ADDR best_lowpc = 0, best_highpc = 0;
   struct partial_symtab *pst;
-  int has_pc_info;
+  enum pc_bounds_kind cu_bounds_kind;
   const char *filename;
-  struct process_psymtab_comp_unit_data *info = data;
+  struct process_psymtab_comp_unit_data *info
+    = (struct process_psymtab_comp_unit_data *) data;
 
   if (comp_unit_die->tag == DW_TAG_partial_unit && !info->want_partial_unit)
     return;
@@ -5949,18 +6053,14 @@ process_psymtab_comp_unit_reader (const 
   cu->list_in_scope = &file_symbols;
 
   /* Allocate a new partial symbol table structure.  */
-  attr = dwarf2_attr (comp_unit_die, DW_AT_name, cu);
-  if (attr == NULL || !DW_STRING (attr))
+  filename = dwarf2_string_attr (comp_unit_die, DW_AT_name, cu);
+  if (filename == NULL)
     filename = "";
-  else
-    filename = DW_STRING (attr);
 
   pst = create_partial_symtab (per_cu, filename);
 
   /* This must be done before calling dwarf2_build_include_psymtabs.  */
-  attr = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, cu);
-  if (attr != NULL)
-    pst->dirname = DW_STRING (attr);
+  pst->dirname = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
 
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
@@ -5968,9 +6068,9 @@ process_psymtab_comp_unit_reader (const 
 
   /* Possibly set the default values of LOWPC and HIGHPC from
      `DW_AT_ranges'.  */
-  has_pc_info = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
-				      &best_highpc, cu, pst);
-  if (has_pc_info == 1 && best_lowpc < best_highpc)
+  cu_bounds_kind = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
+					 &best_highpc, cu, pst);
+  if (cu_bounds_kind == PC_BOUNDS_HIGH_LOW && best_lowpc < best_highpc)
     /* Store the contiguous range if it is not empty; it can be empty for
        CUs with no code.  */
     addrmap_set_empty (objfile->psymtabs_addrmap,
@@ -5994,7 +6094,7 @@ process_psymtab_comp_unit_reader (const 
       first_die = load_partial_dies (reader, info_ptr, 1);
 
       scan_partial_symbols (first_die, &lowpc, &highpc,
-			    ! has_pc_info, cu);
+			    cu_bounds_kind <= PC_BOUNDS_INVALID, cu);
 
       /* If we didn't find a lowpc, set it to highpc to avoid
 	 complaints from `maint check'.	 */
@@ -6003,7 +6103,7 @@ process_psymtab_comp_unit_reader (const 
 
       /* If the compilation unit didn't have an explicit address range,
 	 then use the information extracted from its child dies.  */
-      if (! has_pc_info)
+      if (cu_bounds_kind <= PC_BOUNDS_INVALID)
 	{
 	  best_lowpc = lowpc;
 	  best_highpc = highpc;
@@ -6012,11 +6112,7 @@ process_psymtab_comp_unit_reader (const 
   pst->textlow = gdbarch_adjust_dwarf2_addr (gdbarch, best_lowpc + baseaddr);
   pst->texthigh = gdbarch_adjust_dwarf2_addr (gdbarch, best_highpc + baseaddr);
 
-  pst->n_global_syms = objfile->global_psymbols.next -
-    (objfile->global_psymbols.list + pst->globals_offset);
-  pst->n_static_syms = objfile->static_psymbols.next -
-    (objfile->static_psymbols.list + pst->statics_offset);
-  sort_pst_symbols (objfile, pst);
+  end_psymtab_common (objfile, pst);
 
   if (!VEC_empty (dwarf2_per_cu_ptr, cu->per_cu->imported_symtabs))
     {
@@ -6027,8 +6123,8 @@ process_psymtab_comp_unit_reader (const 
       /* Fill in 'dependencies' here; we fill in 'users' in a
 	 post-pass.  */
       pst->number_of_dependencies = len;
-      pst->dependencies = obstack_alloc (&objfile->objfile_obstack,
-					 len * sizeof (struct symtab *));
+      pst->dependencies =
+	XOBNEWVEC (&objfile->objfile_obstack, struct partial_symtab *, len);
       for (i = 0;
 	   VEC_iterate (dwarf2_per_cu_ptr, cu->per_cu->imported_symtabs,
 			i, iter);
@@ -6128,11 +6224,7 @@ build_type_psymtabs_reader (const struct
   highpc = (CORE_ADDR) 0;
   scan_partial_symbols (first_die, &lowpc, &highpc, 0, cu);
 
-  pst->n_global_syms = objfile->global_psymbols.next -
-    (objfile->global_psymbols.list + pst->globals_offset);
-  pst->n_static_syms = objfile->static_psymbols.next -
-    (objfile->static_psymbols.list + pst->statics_offset);
-  sort_pst_symbols (objfile, pst);
+  end_psymtab_common (objfile, pst);
 }
 
 /* Struct used to sort TUs by their abbreviation table offset.  */
@@ -6148,8 +6240,10 @@ struct tu_abbrev_offset
 static int
 sort_tu_by_abbrev_offset (const void *ap, const void *bp)
 {
-  const struct tu_abbrev_offset * const *a = ap;
-  const struct tu_abbrev_offset * const *b = bp;
+  const struct tu_abbrev_offset * const *a
+    = (const struct tu_abbrev_offset * const*) ap;
+  const struct tu_abbrev_offset * const *b
+    = (const struct tu_abbrev_offset * const*) bp;
   unsigned int aoff = (*a)->abbrev_offset.sect_off;
   unsigned int boff = (*b)->abbrev_offset.sect_off;
 
@@ -6177,13 +6271,11 @@ sort_tu_by_abbrev_offset (const void *ap
 static void
 build_type_psymtabs_1 (void)
 {
-  struct objfile *objfile = dwarf2_per_objfile->objfile;
   struct tu_stats *tu_stats = &dwarf2_per_objfile->tu_stats;
   struct cleanup *cleanups;
   struct abbrev_table *abbrev_table;
   sect_offset abbrev_offset;
   struct tu_abbrev_offset *sorted_by_abbrev;
-  struct type_unit_group **iter;
   int i;
 
   /* It's up to the caller to not call us multiple times.  */
@@ -6303,8 +6395,8 @@ build_type_psymtab_dependencies (void **
   gdb_assert (IS_TYPE_UNIT_GROUP (per_cu));
 
   pst->number_of_dependencies = len;
-  pst->dependencies = obstack_alloc (&objfile->objfile_obstack,
-				     len * sizeof (struct psymtab *));
+  pst->dependencies =
+    XOBNEWVEC (&objfile->objfile_obstack, struct partial_symtab *, len);
   for (i = 0;
        VEC_iterate (sig_type_ptr, tu_group->tus, i, iter);
        ++i)
@@ -6338,7 +6430,7 @@ static int
 process_skeletonless_type_unit (void **slot, void *info)
 {
   struct dwo_unit *dwo_unit = (struct dwo_unit *) *slot;
-  struct objfile *objfile = info;
+  struct objfile *objfile = (struct objfile *) info;
   struct signatured_type find_entry, *entry;
 
   /* If this TU doesn't exist in the global table, add it and read it in.  */
@@ -6408,7 +6500,7 @@ process_skeletonless_type_units (struct 
 static void
 psymtabs_addrmap_cleanup (void *o)
 {
-  struct objfile *objfile = o;
+  struct objfile *objfile = (struct objfile *) o;
 
   objfile->psymtabs_addrmap = NULL;
 }
@@ -6569,8 +6661,7 @@ read_comp_units_from_section (struct obj
       length = read_initial_length (abfd, info_ptr, &initial_length_size);
 
       /* Save the compilation unit for later lookup.  */
-      this_cu = obstack_alloc (&objfile->objfile_obstack,
-			       sizeof (struct dwarf2_per_cu_data));
+      this_cu = XOBNEW (&objfile->objfile_obstack, struct dwarf2_per_cu_data);
       memset (this_cu, 0, sizeof (*this_cu));
       this_cu->offset = offset;
       this_cu->length = length + initial_length_size;
@@ -6581,9 +6672,8 @@ read_comp_units_from_section (struct obj
       if (*n_comp_units == *n_allocated)
 	{
 	  *n_allocated *= 2;
-	  *all_comp_units = xrealloc (*all_comp_units,
-				      *n_allocated
-				      * sizeof (struct dwarf2_per_cu_data *));
+	  *all_comp_units = XRESIZEVEC (struct dwarf2_per_cu_data *,
+					*all_comp_units, *n_allocated);
 	}
       (*all_comp_units)[*n_comp_units] = this_cu;
       ++*n_comp_units;
@@ -6605,8 +6695,7 @@ create_all_comp_units (struct objfile *o
 
   n_comp_units = 0;
   n_allocated = 10;
-  all_comp_units = xmalloc (n_allocated
-			    * sizeof (struct dwarf2_per_cu_data *));
+  all_comp_units = XNEWVEC (struct dwarf2_per_cu_data *, n_allocated);
 
   read_comp_units_from_section (objfile, &dwarf2_per_objfile->info, 0,
 				&n_allocated, &n_comp_units, &all_comp_units);
@@ -6617,9 +6706,9 @@ create_all_comp_units (struct objfile *o
 				  &n_allocated, &n_comp_units,
 				  &all_comp_units);
 
-  dwarf2_per_objfile->all_comp_units
-    = obstack_alloc (&objfile->objfile_obstack,
-		     n_comp_units * sizeof (struct dwarf2_per_cu_data *));
+  dwarf2_per_objfile->all_comp_units = XOBNEWVEC (&objfile->objfile_obstack,
+						  struct dwarf2_per_cu_data *,
+						  n_comp_units);
   memcpy (dwarf2_per_objfile->all_comp_units, all_comp_units,
 	  n_comp_units * sizeof (struct dwarf2_per_cu_data *));
   xfree (all_comp_units);
@@ -6678,6 +6767,9 @@ scan_partial_symbols (struct partial_die
 		{
 		  add_partial_symbol (pdi, cu);
 		}
+	      if (cu->language == language_rust && pdi->has_children)
+		scan_partial_symbols (pdi->die_child, lowpc, highpc,
+				      set_addrmap, cu);
 	      break;
 	    case DW_TAG_enumeration_type:
 	      if (!pdi->is_declaration)
@@ -6736,8 +6828,7 @@ scan_partial_symbols (struct partial_die
 /* Functions used to compute the fully scoped name of a partial DIE.
 
    Normally, this is simple.  For C++, the parent DIE's fully scoped
-   name is concatenated with "::" and the partial DIE's name.  For
-   Java, the same thing occurs except that "." is used instead of "::".
+   name is concatenated with "::" and the partial DIE's name.
    Enumerators are an exception; they use the scope of their parent
    enumeration type, i.e. the name of the enumeration type is not
    prepended to the enumerator.
@@ -6853,7 +6944,7 @@ partial_die_full_name (struct partial_di
 	  struct dwarf2_cu *ref_cu = cu;
 
 	  /* DW_FORM_ref_addr is using section offset.  */
-	  attr.name = 0;
+	  attr.name = (enum dwarf_attribute) 0;
 	  attr.form = DW_FORM_ref_addr;
 	  attr.u.unsnd = pdi->offset.sect_off;
 	  die = follow_die_ref (NULL, &attr, &ref_cu);
@@ -6898,24 +6989,23 @@ add_partial_symbol (struct partial_die_i
              of the global scope.  But in Ada, we want to be able to access
              nested procedures globally.  So all Ada subprograms are stored
              in the global scope.  */
-	  /* prim_record_minimal_symbol (actual_name, addr, mst_text,
-	     objfile); */
 	  add_psymbol_to_list (actual_name, strlen (actual_name),
 			       built_actual_name != NULL,
 			       VAR_DOMAIN, LOC_BLOCK,
 			       &objfile->global_psymbols,
-			       0, addr, cu->language, objfile);
+			       addr, cu->language, objfile);
 	}
       else
 	{
-	  /* prim_record_minimal_symbol (actual_name, addr, mst_file_text,
-	     objfile); */
 	  add_psymbol_to_list (actual_name, strlen (actual_name),
 			       built_actual_name != NULL,
 			       VAR_DOMAIN, LOC_BLOCK,
 			       &objfile->static_psymbols,
-			       0, addr, cu->language, objfile);
+			       addr, cu->language, objfile);
 	}
+
+      if (pdi->main_subprogram && actual_name != NULL)
+	set_objfile_main_name (objfile, actual_name, cu->language);
       break;
     case DW_TAG_constant:
       {
@@ -6927,7 +7017,7 @@ add_partial_symbol (struct partial_die_i
 	  list = &objfile->static_psymbols;
 	add_psymbol_to_list (actual_name, strlen (actual_name),
 			     built_actual_name != NULL, VAR_DOMAIN, LOC_STATIC,
-			     list, 0, 0, cu->language, objfile);
+			     list, 0, cu->language, objfile);
       }
       break;
     case DW_TAG_variable:
@@ -6963,7 +7053,7 @@ add_partial_symbol (struct partial_die_i
 				 built_actual_name != NULL,
 				 VAR_DOMAIN, LOC_STATIC,
 				 &objfile->global_psymbols,
-				 0, addr + baseaddr,
+				 addr + baseaddr,
 				 cu->language, objfile);
 	}
       else
@@ -6978,13 +7068,10 @@ add_partial_symbol (struct partial_die_i
 	      return;
 	    }
 
-	  /* prim_record_minimal_symbol (actual_name, addr + baseaddr,
-	     mst_file_data, objfile); */
 	  add_psymbol_to_list (actual_name, strlen (actual_name),
 			       built_actual_name != NULL,
 			       VAR_DOMAIN, LOC_STATIC,
 			       &objfile->static_psymbols,
-			       0,
 			       has_loc ? addr + baseaddr : (CORE_ADDR) 0,
 			       cu->language, objfile);
 	}
@@ -6996,7 +7083,7 @@ add_partial_symbol (struct partial_die_i
 			   built_actual_name != NULL,
 			   VAR_DOMAIN, LOC_TYPEDEF,
 			   &objfile->static_psymbols,
-			   0, (CORE_ADDR) 0, cu->language, objfile);
+			   0, cu->language, objfile);
       break;
     case DW_TAG_imported_declaration:
     case DW_TAG_namespace:
@@ -7004,14 +7091,14 @@ add_partial_symbol (struct partial_die_i
 			   built_actual_name != NULL,
 			   VAR_DOMAIN, LOC_TYPEDEF,
 			   &objfile->global_psymbols,
-			   0, (CORE_ADDR) 0, cu->language, objfile);
+			   0, cu->language, objfile);
       break;
     case DW_TAG_module:
       add_psymbol_to_list (actual_name, strlen (actual_name),
 			   built_actual_name != NULL,
 			   MODULE_DOMAIN, LOC_TYPEDEF,
 			   &objfile->global_psymbols,
-			   0, (CORE_ADDR) 0, cu->language, objfile);
+			   0, cu->language, objfile);
       break;
     case DW_TAG_class_type:
     case DW_TAG_interface_type:
@@ -7034,22 +7121,20 @@ add_partial_symbol (struct partial_die_i
       add_psymbol_to_list (actual_name, strlen (actual_name),
 			   built_actual_name != NULL,
 			   STRUCT_DOMAIN, LOC_TYPEDEF,
-			   (cu->language == language_cplus
-			    || cu->language == language_java)
+			   cu->language == language_cplus
 			   ? &objfile->global_psymbols
 			   : &objfile->static_psymbols,
-			   0, (CORE_ADDR) 0, cu->language, objfile);
+			   0, cu->language, objfile);
 
       break;
     case DW_TAG_enumerator:
       add_psymbol_to_list (actual_name, strlen (actual_name),
 			   built_actual_name != NULL,
 			   VAR_DOMAIN, LOC_CONST,
-			   (cu->language == language_cplus
-			    || cu->language == language_java)
+			   cu->language == language_cplus
 			   ? &objfile->global_psymbols
 			   : &objfile->static_psymbols,
-			   0, (CORE_ADDR) 0, cu->language, objfile);
+			   0, cu->language, objfile);
       break;
     default:
       break;
@@ -7264,7 +7349,6 @@ skip_one_die (const struct die_reader_sp
   struct dwarf2_cu *cu = reader->cu;
   const gdb_byte *buffer = reader->buffer;
   const gdb_byte *buffer_end = reader->buffer_end;
-  const gdb_byte *start_info_ptr = info_ptr;
   unsigned int form, i;
 
   for (i = 0; i < abbrev->num_attrs; i++)
@@ -7316,6 +7400,7 @@ skip_one_die (const struct die_reader_sp
 	  info_ptr += 1;
 	  break;
 	case DW_FORM_flag_present:
+	case DW_FORM_implicit_const:
 	  break;
 	case DW_FORM_data2:
 	case DW_FORM_ref2:
@@ -7330,6 +7415,9 @@ skip_one_die (const struct die_reader_sp
 	case DW_FORM_ref_sig8:
 	  info_ptr += 8;
 	  break;
+	case DW_FORM_data16:
+	  info_ptr += 16;
+	  break;
 	case DW_FORM_string:
 	  read_direct_string (abfd, info_ptr, &bytes_read);
 	  info_ptr += bytes_read;
@@ -7426,7 +7514,9 @@ dwarf2_read_symtab (struct partial_symta
 	}
 
       /* Restore our global data.  */
-      dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+      dwarf2_per_objfile
+	= (struct dwarf2_per_objfile *) objfile_data (objfile,
+						      dwarf2_objfile_data_key);
 
       /* If this psymtab is constructed from a debug-only objfile, the
 	 has_section_at_zero flag will not necessarily be correct.  We
@@ -7435,8 +7525,9 @@ dwarf2_read_symtab (struct partial_symta
       if (objfile->separate_debug_objfile_backlink)
 	{
 	  struct dwarf2_per_objfile *dpo_backlink
-	    = objfile_data (objfile->separate_debug_objfile_backlink,
-			    dwarf2_objfile_data_key);
+	    = ((struct dwarf2_per_objfile *)
+	       objfile_data (objfile->separate_debug_objfile_backlink,
+			     dwarf2_objfile_data_key));
 
 	  dwarf2_per_objfile->has_section_at_zero
 	    = dpo_backlink->has_section_at_zero;
@@ -7465,7 +7556,7 @@ queue_comp_unit (struct dwarf2_per_cu_da
   struct dwarf2_queue_item *item;
 
   per_cu->queued = 1;
-  item = xmalloc (sizeof (*item));
+  item = XNEW (struct dwarf2_queue_item);
   item->per_cu = per_cu;
   item->pretend_language = pretend_language;
   item->next = NULL;
@@ -7543,9 +7634,11 @@ process_queue (void)
      may load a new CU, adding it to the end of the queue.  */
   for (item = dwarf2_queue; item != NULL; dwarf2_queue = item = next_item)
     {
-      if (dwarf2_per_objfile->using_index
-	  ? !item->per_cu->v.quick->compunit_symtab
-	  : (item->per_cu->v.psymtab && !item->per_cu->v.psymtab->readin))
+      if ((dwarf2_per_objfile->using_index
+	   ? !item->per_cu->v.quick->compunit_symtab
+	   : (item->per_cu->v.psymtab && !item->per_cu->v.psymtab->readin))
+	  /* Skip dummy CUs.  */
+	  && item->per_cu->cu != NULL)
 	{
 	  struct dwarf2_per_cu_data *per_cu = item->per_cu;
 	  unsigned int debug_print_threshold;
@@ -7654,7 +7747,7 @@ psymtab_to_symtab_1 (struct partial_symt
         psymtab_to_symtab_1 (pst->dependencies[i]);
       }
 
-  per_cu = pst->read_symtab_private;
+  per_cu = (struct dwarf2_per_cu_data *) pst->read_symtab_private;
 
   if (per_cu == NULL)
     {
@@ -7673,7 +7766,7 @@ psymtab_to_symtab_1 (struct partial_symt
 static hashval_t
 die_hash (const void *item)
 {
-  const struct die_info *die = item;
+  const struct die_info *die = (const struct die_info *) item;
 
   return die->offset.sect_off;
 }
@@ -7684,8 +7777,8 @@ die_hash (const void *item)
 static int
 die_eq (const void *item_lhs, const void *item_rhs)
 {
-  const struct die_info *die_lhs = item_lhs;
-  const struct die_info *die_rhs = item_rhs;
+  const struct die_info *die_lhs = (const struct die_info *) item_lhs;
+  const struct die_info *die_rhs = (const struct die_info *) item_rhs;
 
   return die_lhs->offset.sect_off == die_rhs->offset.sect_off;
 }
@@ -7702,7 +7795,7 @@ load_full_comp_unit_reader (const struct
 			    void *data)
 {
   struct dwarf2_cu *cu = reader->cu;
-  enum language *language_ptr = data;
+  enum language *language_ptr = (enum language *) data;
 
   gdb_assert (cu->die_hash == NULL);
   cu->die_hash =
@@ -7845,11 +7938,11 @@ fixup_go_packaging (struct dwarf2_cu *cu
     {
       struct objfile *objfile = cu->objfile;
       const char *saved_package_name
-	= obstack_copy0 (&objfile->per_bfd->storage_obstack,
-			 package_name,
-			 strlen (package_name));
-      struct type *type = init_type (TYPE_CODE_MODULE, 0, 0,
-				     saved_package_name, objfile);
+	= (const char *) obstack_copy0 (&objfile->per_bfd->storage_obstack,
+					package_name,
+					strlen (package_name));
+      struct type *type = init_type (objfile, TYPE_CODE_MODULE, 0,
+				     saved_package_name);
       struct symbol *sym;
 
       TYPE_TAG_NAME (type) = TYPE_NAME (type);
@@ -7976,8 +8069,8 @@ compute_compunit_symtab_includes (struct
       /* Now we have a transitive closure of all the included symtabs.  */
       len = VEC_length (compunit_symtab_ptr, result_symtabs);
       cust->includes
-	= obstack_alloc (&dwarf2_per_objfile->objfile->objfile_obstack,
-			 (len + 1) * sizeof (struct symtab *));
+	= XOBNEWVEC (&dwarf2_per_objfile->objfile->objfile_obstack,
+		     struct compunit_symtab *, len + 1);
       for (ix = 0;
 	   VEC_iterate (compunit_symtab_ptr, result_symtabs, ix,
 			compunit_symtab_iter);
@@ -8079,7 +8172,7 @@ process_full_comp_unit (struct dwarf2_pe
 	 compilation is from a C file generated by language preprocessors, do
 	 not set the language if it was already deduced by start_subfile.  */
       if (!(cu->language == language_c
-	    && COMPUNIT_FILETABS (cust)->language != language_c))
+	    && COMPUNIT_FILETABS (cust)->language != language_unknown))
 	COMPUNIT_FILETABS (cust)->language = cu->language;
 
       /* GCC-4.0 has started to support -fvar-tracking.  GCC-3.x still can
@@ -8213,7 +8306,6 @@ process_imported_unit_die (struct die_in
   if (attr != NULL)
     {
       struct dwarf2_per_cu_data *per_cu;
-      struct symtab *imported_symtab;
       sect_offset offset;
       int is_dwz;
 
@@ -8235,7 +8327,7 @@ process_imported_unit_die (struct die_in
 static void
 reset_die_in_process (void *arg)
 {
-  struct die_info *die = arg;
+  struct die_info *die = (struct die_info *) arg;
 
   die->in_process = 0;
 }
@@ -8273,6 +8365,7 @@ process_die (struct die_info *die, struc
     case DW_TAG_catch_block:
       read_lexical_block_scope (die, cu);
       break;
+    case DW_TAG_call_site:
     case DW_TAG_GNU_call_site:
       read_call_site_scope (die, cu);
       break;
@@ -8405,22 +8498,10 @@ die_needs_namespace (struct die_info *di
     }
 }
 
-/* Retrieve the last character from a mem_file.  */
-
-static void
-do_ui_file_peek_last (void *object, const char *buffer, long length)
-{
-  char *last_char_p = (char *) object;
-
-  if (length > 0)
-    *last_char_p = buffer[length - 1];
-}
-
 /* Compute the fully qualified name of DIE in CU.  If PHYSNAME is nonzero,
    compute the physname for the object, which include a method's:
-   - formal parameters (C++/Java),
+   - formal parameters (C++),
    - receiver type (Go),
-   - return type (Java).
 
    The term "physname" is a bit confusing.
    For C++, for example, it is the demangled name.
@@ -8441,8 +8522,13 @@ dwarf2_compute_name (const char *name,
   if (name == NULL)
     name = dwarf2_name (die, cu);
 
-  /* For Fortran GDB prefers DW_AT_*linkage_name if present but otherwise
-     compute it by typename_concat inside GDB.  */
+  /* For Fortran GDB prefers DW_AT_*linkage_name for the physname if present
+     but otherwise compute it by typename_concat inside GDB.
+     FIXME: Actually this is not really true, or at least not always true.
+     It's all very confusing.  SYMBOL_SET_NAMES doesn't try to demangle
+     Fortran names because there is no mangling standard.  So new_symbol_full
+     will set the demangled name to the result of dwarf2_full_name, and it is
+     the demangled name that GDB uses if it exists.  */
   if (cu->language == language_ada
       || (cu->language == language_fortran && physname))
     {
@@ -8451,40 +8537,40 @@ dwarf2_compute_name (const char *name,
 	 to be able to reference.  Ideally, we want the user to be able
 	 to reference this entity using either natural or linkage name,
 	 but we haven't started looking at this enhancement yet.  */
-      struct attribute *attr;
+      const char *linkage_name;
 
-      attr = dwarf2_attr (die, DW_AT_linkage_name, cu);
-      if (attr == NULL)
-	attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
-      if (attr && DW_STRING (attr))
-	return DW_STRING (attr);
+      linkage_name = dwarf2_string_attr (die, DW_AT_linkage_name, cu);
+      if (linkage_name == NULL)
+	linkage_name = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu);
+      if (linkage_name != NULL)
+	return linkage_name;
     }
 
   /* These are the only languages we know how to qualify names in.  */
   if (name != NULL
-      && (cu->language == language_cplus || cu->language == language_java
-	  || cu->language == language_fortran))
+      && (cu->language == language_cplus
+	  || cu->language == language_fortran || cu->language == language_d
+	  || cu->language == language_rust))
     {
       if (die_needs_namespace (die, cu))
 	{
 	  long length;
 	  const char *prefix;
-	  struct ui_file *buf;
-	  char *intermediate_name;
 	  const char *canonical_name = NULL;
 
+	  string_file buf;
+
 	  prefix = determine_prefix (die, cu);
-	  buf = mem_fileopen ();
 	  if (*prefix != '\0')
 	    {
 	      char *prefixed_name = typename_concat (NULL, prefix, name,
 						     physname, cu);
 
-	      fputs_unfiltered (prefixed_name, buf);
+	      buf.puts (prefixed_name);
 	      xfree (prefixed_name);
 	    }
 	  else
-	    fputs_unfiltered (name, buf);
+	    buf.puts (name);
 
 	  /* Template parameters may be specified in the DIE's DW_AT_name, or
 	     as children with DW_TAG_template_type_param or
@@ -8529,25 +8615,25 @@ dwarf2_compute_name (const char *name,
 
 		  if (first)
 		    {
-		      fputs_unfiltered ("<", buf);
+		      buf.puts ("<");
 		      first = 0;
 		    }
 		  else
-		    fputs_unfiltered (", ", buf);
+		    buf.puts (", ");
 
 		  attr = dwarf2_attr (child, DW_AT_type, cu);
 		  if (attr == NULL)
 		    {
 		      complaint (&symfile_complaints,
 				 _("template parameter missing DW_AT_type"));
-		      fputs_unfiltered ("UNKNOWN_TYPE", buf);
+		      buf.puts ("UNKNOWN_TYPE");
 		      continue;
 		    }
 		  type = die_type (child, cu);
 
 		  if (child->tag == DW_TAG_template_type_param)
 		    {
-		      c_print_type (type, "", buf, -1, 0, &type_print_raw_options);
+		      c_print_type (type, "", &buf, -1, 0, &type_print_raw_options);
 		      continue;
 		    }
 
@@ -8557,7 +8643,7 @@ dwarf2_compute_name (const char *name,
 		      complaint (&symfile_complaints,
 				 _("template parameter missing "
 				   "DW_AT_const_value"));
-		      fputs_unfiltered ("UNKNOWN_VALUE", buf);
+		      buf.puts ("UNKNOWN_VALUE");
 		      continue;
 		    }
 
@@ -8568,7 +8654,7 @@ dwarf2_compute_name (const char *name,
 		  if (TYPE_NOSIGN (type))
 		    /* GDB prints characters as NUMBER 'CHAR'.  If that's
 		       changed, this can use value_print instead.  */
-		    c_printchar (value, type, buf);
+		    c_printchar (value, type, &buf);
 		  else
 		    {
 		      struct value_print_options opts;
@@ -8591,7 +8677,7 @@ dwarf2_compute_name (const char *name,
 			 the radix.  */
 		      get_formatted_print_options (&opts, 'd');
 		      opts.raw = 1;
-		      value_print (v, buf, &opts);
+		      value_print (v, &buf, &opts);
 		      release_value (v);
 		      value_free (v);
 		    }
@@ -8603,36 +8689,25 @@ dwarf2_compute_name (const char *name,
 		{
 		  /* Close the argument list, with a space if necessary
 		     (nested templates).  */
-		  char last_char = '\0';
-		  ui_file_put (buf, do_ui_file_peek_last, &last_char);
-		  if (last_char == '>')
-		    fputs_unfiltered (" >", buf);
+		  if (!buf.empty () && buf.string ().back () == '>')
+		    buf.puts (" >");
 		  else
-		    fputs_unfiltered (">", buf);
+		    buf.puts (">");
 		}
 	    }
 
-	  /* For Java and C++ methods, append formal parameter type
+	  /* For C++ methods, append formal parameter type
 	     information, if PHYSNAME.  */
 
 	  if (physname && die->tag == DW_TAG_subprogram
-	      && (cu->language == language_cplus
-		  || cu->language == language_java))
+	      && cu->language == language_cplus)
 	    {
 	      struct type *type = read_type_die (die, cu);
 
-	      c_type_print_args (type, buf, 1, cu->language,
+	      c_type_print_args (type, &buf, 1, cu->language,
 				 &type_print_raw_options);
 
-	      if (cu->language == language_java)
-		{
-		  /* For java, we must append the return type to method
-		     names.  */
-		  if (die->tag == DW_TAG_subprogram)
-		    java_print_type (TYPE_TARGET_TYPE (type), "", buf,
-				     0, 0, &type_print_raw_options);
-		}
-	      else if (cu->language == language_cplus)
+	      if (cu->language == language_cplus)
 		{
 		  /* Assume that an artificial first parameter is
 		     "this", but do not crash if it is not.  RealView
@@ -8644,29 +8719,27 @@ dwarf2_compute_name (const char *name,
 		      && TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_PTR
 		      && TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type,
 									0))))
-		    fputs_unfiltered (" const", buf);
+		    buf.puts (" const");
 		}
 	    }
 
-	  intermediate_name = ui_file_xstrdup (buf, &length);
-	  ui_file_delete (buf);
+	  const std::string &intermediate_name = buf.string ();
 
 	  if (cu->language == language_cplus)
 	    canonical_name
-	      = dwarf2_canonicalize_name (intermediate_name, cu,
+	      = dwarf2_canonicalize_name (intermediate_name.c_str (), cu,
 					  &objfile->per_bfd->storage_obstack);
 
 	  /* If we only computed INTERMEDIATE_NAME, or if
 	     INTERMEDIATE_NAME is already canonical, then we need to
 	     copy it to the appropriate obstack.  */
-	  if (canonical_name == NULL || canonical_name == intermediate_name)
-	    name = obstack_copy0 (&objfile->per_bfd->storage_obstack,
-				  intermediate_name,
-				  strlen (intermediate_name));
+	  if (canonical_name == NULL || canonical_name == intermediate_name.c_str ())
+	    name = ((const char *)
+		    obstack_copy0 (&objfile->per_bfd->storage_obstack,
+				   intermediate_name.c_str (),
+				   intermediate_name.length ()));
 	  else
 	    name = canonical_name;
-
-	  xfree (intermediate_name);
 	}
     }
 
@@ -8679,7 +8752,7 @@ dwarf2_compute_name (const char *name,
    not have a name.  NAME may either be from a previous call to
    dwarf2_name or NULL.
 
-   The output string will be canonicalized (if C++/Java).  */
+   The output string will be canonicalized (if C++).  */
 
 static const char *
 dwarf2_full_name (const char *name, struct die_info *die, struct dwarf2_cu *cu)
@@ -8692,13 +8765,12 @@ dwarf2_full_name (const char *name, stru
    allocated on the objfile_objstack or NULL if the DIE does not have a
    name.
 
-   The output string will be canonicalized (if C++/Java).  */
+   The output string will be canonicalized (if C++).  */
 
 static const char *
 dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  struct attribute *attr;
   const char *retval, *mangled = NULL, *canon = NULL;
   struct cleanup *back_to;
   int need_copy = 1;
@@ -8710,18 +8782,22 @@ dwarf2_physname (const char *name, struc
 
   back_to = make_cleanup (null_cleanup, NULL);
 
-  attr = dwarf2_attr (die, DW_AT_linkage_name, cu);
-  if (!attr)
-    attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
+  mangled = dwarf2_string_attr (die, DW_AT_linkage_name, cu);
+  if (mangled == NULL)
+    mangled = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu);
+
+  /* rustc emits invalid values for DW_AT_linkage_name.  Ignore these.
+     See https://github.com/rust-lang/rust/issues/32925.  */
+  if (cu->language == language_rust && mangled != NULL
+      && strchr (mangled, '{') != NULL)
+    mangled = NULL;
 
   /* DW_AT_linkage_name is missing in some cases - depend on what GDB
      has computed.  */
-  if (attr && DW_STRING (attr))
+  if (mangled != NULL)
     {
       char *demangled;
 
-      mangled = DW_STRING (attr);
-
       /* Use DMGL_RET_DROP for C++ template functions to suppress their return
 	 type.  It is easier for GDB users to search for such functions as
 	 `name(params)' than `long name(params)'.  In such case the minimal
@@ -8741,10 +8817,7 @@ dwarf2_physname (const char *name, struc
       else
 	{
 	  demangled = gdb_demangle (mangled,
-				    (DMGL_PARAMS | DMGL_ANSI
-				     | (cu->language == language_java
-					? DMGL_JAVA | DMGL_RET_POSTFIX
-					: DMGL_RET_DROP)));
+				    (DMGL_PARAMS | DMGL_ANSI | DMGL_RET_DROP));
 	}
       if (demangled)
 	{
@@ -8790,8 +8863,9 @@ dwarf2_physname (const char *name, struc
     retval = canon;
 
   if (need_copy)
-    retval = obstack_copy0 (&objfile->per_bfd->storage_obstack,
-			    retval, strlen (retval));
+    retval = ((const char *)
+	      obstack_copy0 (&objfile->per_bfd->storage_obstack,
+			     retval, strlen (retval)));
 
   do_cleanups (back_to);
   return retval;
@@ -8857,6 +8931,24 @@ read_namespace_alias (struct die_info *d
   return 0;
 }
 
+/* Return the using directives repository (global or local?) to use in the
+   current context for LANGUAGE.
+
+   For Ada, imported declarations can materialize renamings, which *may* be
+   global.  However it is impossible (for now?) in DWARF to distinguish
+   "external" imported declarations and "static" ones.  As all imported
+   declarations seem to be static in all other languages, make them all CU-wide
+   global only in Ada.  */
+
+static struct using_direct **
+using_directives (enum language language)
+{
+  if (language == language_ada && context_stack_depth == 0)
+    return &global_using_directives;
+  else
+    return &local_using_directives;
+}
+
 /* Read the import statement specified by the given die and record it.  */
 
 static void
@@ -8941,8 +9033,9 @@ read_import_statement (struct die_info *
     }
   else if (strlen (imported_name_prefix) > 0)
     canonical_name = obconcat (&objfile->objfile_obstack,
-			       imported_name_prefix, "::", imported_name,
-			       (char *) NULL);
+			       imported_name_prefix,
+			       (cu->language == language_d ? "." : "::"),
+			       imported_name, (char *) NULL);
   else
     canonical_name = imported_name;
 
@@ -8992,13 +9085,14 @@ read_import_statement (struct die_info *
 	process_die (child_die, cu);
       }
 
-  cp_add_using_directive (import_prefix,
-                          canonical_name,
-                          import_alias,
-                          imported_declaration,
-			  excludes,
-			  0,
-                          &objfile->objfile_obstack);
+  add_using_directive (using_directives (cu->language),
+		       import_prefix,
+		       canonical_name,
+		       import_alias,
+		       imported_declaration,
+		       excludes,
+		       0,
+		       &objfile->objfile_obstack);
 
   do_cleanups (cleanups);
 }
@@ -9008,7 +9102,7 @@ read_import_statement (struct die_info *
 static void
 free_cu_line_header (void *arg)
 {
-  struct dwarf2_cu *cu = arg;
+  struct dwarf2_cu *cu = (struct dwarf2_cu *) arg;
 
   free_line_header (cu->line_header);
   cu->line_header = NULL;
@@ -9031,24 +9125,14 @@ static void
 find_file_and_directory (struct die_info *die, struct dwarf2_cu *cu,
 			 const char **name, const char **comp_dir)
 {
-  struct attribute *attr;
-
-  *name = NULL;
-  *comp_dir = NULL;
-
   /* Find the filename.  Do not use dwarf2_name here, since the filename
      is not a source language identifier.  */
-  attr = dwarf2_attr (die, DW_AT_name, cu);
-  if (attr)
-    {
-      *name = DW_STRING (attr);
-    }
+  *name = dwarf2_string_attr (die, DW_AT_name, cu);
+  *comp_dir = dwarf2_string_attr (die, DW_AT_comp_dir, cu);
 
-  attr = dwarf2_attr (die, DW_AT_comp_dir, cu);
-  if (attr)
-    *comp_dir = DW_STRING (attr);
-  else if (producer_is_gcc_lt_4_3 (cu) && *name != NULL
-	   && IS_ABSOLUTE_PATH (*name))
+  if (*comp_dir == NULL
+      && producer_is_gcc_lt_4_3 (cu) && *name != NULL
+      && IS_ABSOLUTE_PATH (*name))
     {
       char *d = ldirname (*name);
 
@@ -9060,7 +9144,7 @@ find_file_and_directory (struct die_info
     {
       /* Irix 6.2 native cc prepends <machine>.: to the compilation
 	 directory, get rid of it.  */
-      char *cp = strchr (*comp_dir, ':');
+      const char *cp = strchr (*comp_dir, ':');
 
       if (cp && cp != *comp_dir && cp[-1] == '.' && cp[1] == '/')
 	*comp_dir = cp + 1;
@@ -9129,7 +9213,7 @@ handle_DW_AT_stmt_list (struct die_info 
       if (die->tag == DW_TAG_partial_unit && slot != NULL)
 	{
 	  gdb_assert (*slot != NULL);
-	  cu->line_header = *slot;
+	  cu->line_header = (struct line_header *) *slot;
 	  return;
 	}
     }
@@ -9184,7 +9268,6 @@ read_file_scope (struct die_info *die, s
   const char *name = NULL;
   const char *comp_dir = NULL;
   struct die_info *child_die;
-  bfd *abfd = objfile->obfd;
   CORE_ADDR baseaddr;
 
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
@@ -9233,12 +9316,14 @@ read_file_scope (struct die_info *die, s
      refers to information in the line number info statement program
      header, so we can only read it if we've read the header
      successfully.  */
-  attr = dwarf2_attr (die, DW_AT_GNU_macros, cu);
+  attr = dwarf2_attr (die, DW_AT_macros, cu);
+  if (attr == NULL)
+    attr = dwarf2_attr (die, DW_AT_GNU_macros, cu);
   if (attr && cu->line_header)
     {
       if (dwarf2_attr (die, DW_AT_macro_info, cu))
 	complaint (&symfile_complaints,
-		   _("CU refers to both DW_AT_GNU_macros and DW_AT_macro_info"));
+		   _("CU refers to both DW_AT_macros and DW_AT_macro_info"));
 
       dwarf_decode_macros (cu, DW_UNSND (attr), 1);
     }
@@ -9265,7 +9350,6 @@ read_file_scope (struct die_info *die, s
 static void
 setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = dwarf2_per_objfile->objfile;
   struct dwarf2_per_cu_data *per_cu = cu->per_cu;
   struct type_unit_group *tu_group;
   int first_time;
@@ -9318,6 +9402,11 @@ setup_type_unit_groups (struct die_info 
     {
       struct compunit_symtab *cust = dwarf2_start_symtab (cu, "", NULL, 0);
 
+      /* Note: We don't assign tu_group->compunit_symtab yet because we're
+	 still initializing it, and our caller (a few levels up)
+	 process_full_type_unit still needs to know if this is the first
+	 time.  */
+
       tu_group->num_symtabs = lh->num_file_names;
       tu_group->symtabs = XNEWVEC (struct symtab *, lh->num_file_names);
 
@@ -9403,7 +9492,7 @@ read_type_unit_scope (struct die_info *d
 static hashval_t
 hash_dwo_file (const void *item)
 {
-  const struct dwo_file *dwo_file = item;
+  const struct dwo_file *dwo_file = (const struct dwo_file *) item;
   hashval_t hash;
 
   hash = htab_hash_string (dwo_file->dwo_name);
@@ -9415,8 +9504,8 @@ hash_dwo_file (const void *item)
 static int
 eq_dwo_file (const void *item_lhs, const void *item_rhs)
 {
-  const struct dwo_file *lhs = item_lhs;
-  const struct dwo_file *rhs = item_rhs;
+  const struct dwo_file *lhs = (const struct dwo_file *) item_lhs;
+  const struct dwo_file *rhs = (const struct dwo_file *) item_rhs;
 
   if (strcmp (lhs->dwo_name, rhs->dwo_name) != 0)
     return 0;
@@ -9463,7 +9552,7 @@ lookup_dwo_file_slot (const char *dwo_na
 static hashval_t
 hash_dwo_unit (const void *item)
 {
-  const struct dwo_unit *dwo_unit = item;
+  const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
 
   /* This drops the top 32 bits of the id, but is ok for a hash.  */
   return dwo_unit->signature;
@@ -9472,8 +9561,8 @@ hash_dwo_unit (const void *item)
 static int
 eq_dwo_unit (const void *item_lhs, const void *item_rhs)
 {
-  const struct dwo_unit *lhs = item_lhs;
-  const struct dwo_unit *rhs = item_rhs;
+  const struct dwo_unit *lhs = (const struct dwo_unit *) item_lhs;
+  const struct dwo_unit *rhs = (const struct dwo_unit *) item_rhs;
 
   /* The signature is assumed to be unique within the DWO file.
      So while object file CU dwo_id's always have the value zero,
@@ -9517,10 +9606,9 @@ create_dwo_cu_reader (const struct die_r
 		      void *datap)
 {
   struct dwarf2_cu *cu = reader->cu;
-  struct objfile *objfile = dwarf2_per_objfile->objfile;
   sect_offset offset = cu->per_cu->offset;
   struct dwarf2_section_info *section = cu->per_cu->section;
-  struct create_dwo_cu_data *data = datap;
+  struct create_dwo_cu_data *data = (struct create_dwo_cu_data *) datap;
   struct dwo_file *dwo_file = data->dwo_file;
   struct dwo_unit *dwo_unit = &data->dwo_unit;
   struct attribute *attr;
@@ -9554,8 +9642,6 @@ create_dwo_cu (struct dwo_file *dwo_file
 {
   struct objfile *objfile = dwarf2_per_objfile->objfile;
   struct dwarf2_section_info *section = &dwo_file->sections.info;
-  bfd *abfd;
-  htab_t cu_htab;
   const gdb_byte *info_ptr, *end_ptr;
   struct create_dwo_cu_data create_dwo_cu_data;
   struct dwo_unit *dwo_unit;
@@ -9566,10 +9652,6 @@ create_dwo_cu (struct dwo_file *dwo_file
   if (info_ptr == NULL)
     return NULL;
 
-  /* We can't set abfd until now because the section may be empty or
-     not present, in which case section->asection will be NULL.  */
-  abfd = get_section_bfd_owner (section);
-
   if (dwarf_read_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "Reading %s for %s:\n",
@@ -9926,58 +10008,58 @@ locate_v1_virtual_dwo_sections (asection
   if (section_is_p (sectp->name, &names->abbrev_dwo))
     {
       /* There can be only one.  */
-      if (sections->abbrev.s.asection != NULL)
+      if (sections->abbrev.s.section != NULL)
 	return 0;
-      sections->abbrev.s.asection = sectp;
+      sections->abbrev.s.section = sectp;
       sections->abbrev.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->info_dwo)
 	   || section_is_p (sectp->name, &names->types_dwo))
     {
       /* There can be only one.  */
-      if (sections->info_or_types.s.asection != NULL)
+      if (sections->info_or_types.s.section != NULL)
 	return 0;
-      sections->info_or_types.s.asection = sectp;
+      sections->info_or_types.s.section = sectp;
       sections->info_or_types.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->line_dwo))
     {
       /* There can be only one.  */
-      if (sections->line.s.asection != NULL)
+      if (sections->line.s.section != NULL)
 	return 0;
-      sections->line.s.asection = sectp;
+      sections->line.s.section = sectp;
       sections->line.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->loc_dwo))
     {
       /* There can be only one.  */
-      if (sections->loc.s.asection != NULL)
+      if (sections->loc.s.section != NULL)
 	return 0;
-      sections->loc.s.asection = sectp;
+      sections->loc.s.section = sectp;
       sections->loc.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macinfo_dwo))
     {
       /* There can be only one.  */
-      if (sections->macinfo.s.asection != NULL)
+      if (sections->macinfo.s.section != NULL)
 	return 0;
-      sections->macinfo.s.asection = sectp;
+      sections->macinfo.s.section = sectp;
       sections->macinfo.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macro_dwo))
     {
       /* There can be only one.  */
-      if (sections->macro.s.asection != NULL)
+      if (sections->macro.s.section != NULL)
 	return 0;
-      sections->macro.s.asection = sectp;
+      sections->macro.s.section = sectp;
       sections->macro.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->str_offsets_dwo))
     {
       /* There can be only one.  */
-      if (sections->str_offsets.s.asection != NULL)
+      if (sections->str_offsets.s.section != NULL)
 	return 0;
-      sections->str_offsets.s.asection = sectp;
+      sections->str_offsets.s.section = sectp;
       sections->str_offsets.size = bfd_get_section_size (sectp);
     }
   else
@@ -10010,7 +10092,6 @@ create_dwo_unit_in_dwp_v1 (struct dwp_fi
   struct virtual_v1_dwo_sections sections;
   void **dwo_file_slot;
   char *virtual_dwo_name;
-  struct dwarf2_section_info *cutu;
   struct cleanup *cleanups;
   int i;
 
@@ -10108,9 +10189,10 @@ create_dwo_unit_in_dwp_v1 (struct dwp_fi
 			      virtual_dwo_name);
 	}
       dwo_file = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_file);
-      dwo_file->dwo_name = obstack_copy0 (&objfile->objfile_obstack,
-					  virtual_dwo_name,
-					  strlen (virtual_dwo_name));
+      dwo_file->dwo_name
+	= (const char *) obstack_copy0 (&objfile->objfile_obstack,
+					virtual_dwo_name,
+					strlen (virtual_dwo_name));
       dwo_file->comp_dir = comp_dir;
       dwo_file->sections.abbrev = sections.abbrev;
       dwo_file->sections.line = sections.line;
@@ -10136,15 +10218,15 @@ create_dwo_unit_in_dwp_v1 (struct dwp_fi
 	  fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
 			      virtual_dwo_name);
 	}
-      dwo_file = *dwo_file_slot;
+      dwo_file = (struct dwo_file *) *dwo_file_slot;
     }
   do_cleanups (cleanups);
 
   dwo_unit = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_unit);
   dwo_unit->dwo_file = dwo_file;
   dwo_unit->signature = signature;
-  dwo_unit->section = obstack_alloc (&objfile->objfile_obstack,
-				     sizeof (struct dwarf2_section_info));
+  dwo_unit->section =
+    XOBNEW (&objfile->objfile_obstack, struct dwarf2_section_info);
   *dwo_unit->section = sections.info_or_types;
   /* dwo_unit->{offset,length,type_offset_in_tu} are set later.  */
 
@@ -10215,7 +10297,6 @@ create_dwo_unit_in_dwp_v2 (struct dwp_fi
   struct virtual_v2_dwo_sections sections;
   void **dwo_file_slot;
   char *virtual_dwo_name;
-  struct dwarf2_section_info *cutu;
   struct cleanup *cleanups;
   int i;
 
@@ -10309,9 +10390,10 @@ create_dwo_unit_in_dwp_v2 (struct dwp_fi
 			      virtual_dwo_name);
 	}
       dwo_file = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_file);
-      dwo_file->dwo_name = obstack_copy0 (&objfile->objfile_obstack,
-					  virtual_dwo_name,
-					  strlen (virtual_dwo_name));
+      dwo_file->dwo_name
+	= (const char *) obstack_copy0 (&objfile->objfile_obstack,
+					virtual_dwo_name,
+					strlen (virtual_dwo_name));
       dwo_file->comp_dir = comp_dir;
       dwo_file->sections.abbrev =
 	create_dwp_v2_section (&dwp_file->sections.abbrev,
@@ -10350,15 +10432,15 @@ create_dwo_unit_in_dwp_v2 (struct dwp_fi
 	  fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
 			      virtual_dwo_name);
 	}
-      dwo_file = *dwo_file_slot;
+      dwo_file = (struct dwo_file *) *dwo_file_slot;
     }
   do_cleanups (cleanups);
 
   dwo_unit = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_unit);
   dwo_unit->dwo_file = dwo_file;
   dwo_unit->signature = signature;
-  dwo_unit->section = obstack_alloc (&objfile->objfile_obstack,
-				     sizeof (struct dwarf2_section_info));
+  dwo_unit->section =
+    XOBNEW (&objfile->objfile_obstack, struct dwarf2_section_info);
   *dwo_unit->section = create_dwp_v2_section (is_debug_types
 					      ? &dwp_file->sections.types
 					      : &dwp_file->sections.info,
@@ -10384,7 +10466,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file 
   uint32_t hash2 = ((signature >> 32) & mask) | 1;
   unsigned int i;
   void **slot;
-  struct dwo_unit find_dwo_cu, *dwo_cu;
+  struct dwo_unit find_dwo_cu;
 
   memset (&find_dwo_cu, 0, sizeof (find_dwo_cu));
   find_dwo_cu.signature = signature;
@@ -10394,7 +10476,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file 
 			 &find_dwo_cu, INSERT);
 
   if (*slot != NULL)
-    return *slot;
+    return (struct dwo_unit *) *slot;
 
   /* Use a for loop so that we don't loop forever on bad debug info.  */
   for (i = 0; i < dwp_htab->nr_slots; ++i)
@@ -10421,7 +10503,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file 
 						 comp_dir, signature,
 						 is_debug_types);
 	    }
-	  return *slot;
+	  return (struct dwo_unit *) *slot;
 	}
       if (signature_in_table == 0)
 	return NULL;
@@ -10445,10 +10527,9 @@ lookup_dwo_unit_in_dwp (struct dwp_file 
    If unable to find/open the file, return NULL.
    NOTE: This function is derived from symfile_bfd_open.  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 try_open_dwop_file (const char *file_name, int is_dwp, int search_cwd)
 {
-  bfd *sym_bfd;
   int desc, flags;
   char *absolute_name;
   /* Blech.  OPF_TRY_CWD_FIRST also disables searching the path list if
@@ -10461,7 +10542,7 @@ try_open_dwop_file (const char *file_nam
     {
       if (*debug_file_directory != '\0')
 	search_path = concat (".", dirname_separator_string,
-			      debug_file_directory, NULL);
+			      debug_file_directory, (char *) NULL);
       else
 	search_path = xstrdup (".");
     }
@@ -10477,23 +10558,20 @@ try_open_dwop_file (const char *file_nam
   if (desc < 0)
     return NULL;
 
-  sym_bfd = gdb_bfd_open (absolute_name, gnutarget, desc);
+  gdb_bfd_ref_ptr sym_bfd (gdb_bfd_open (absolute_name, gnutarget, desc));
   xfree (absolute_name);
   if (sym_bfd == NULL)
     return NULL;
-  bfd_set_cacheable (sym_bfd, 1);
+  bfd_set_cacheable (sym_bfd.get (), 1);
 
-  if (!bfd_check_format (sym_bfd, bfd_object))
-    {
-      gdb_bfd_unref (sym_bfd); /* This also closes desc.  */
-      return NULL;
-    }
+  if (!bfd_check_format (sym_bfd.get (), bfd_object))
+    return NULL;
 
   /* Success.  Record the bfd as having been included by the objfile's bfd.
      This is important because things like demangled_names_hash lives in the
      objfile's per_bfd space and may have references to things like symbol
      names that live in the DWO/DWP file's per_bfd space.  PR 16426.  */
-  gdb_bfd_record_inclusion (dwarf2_per_objfile->objfile->obfd, sym_bfd);
+  gdb_bfd_record_inclusion (dwarf2_per_objfile->objfile->obfd, sym_bfd.get ());
 
   return sym_bfd;
 }
@@ -10505,11 +10583,9 @@ try_open_dwop_file (const char *file_nam
    Upon success, the canonicalized path of the file is stored in the bfd,
    same as symfile_bfd_open.  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 open_dwo_file (const char *file_name, const char *comp_dir)
 {
-  bfd *abfd;
-
   if (IS_ABSOLUTE_PATH (file_name))
     return try_open_dwop_file (file_name, 0 /*is_dwp*/, 0 /*search_cwd*/);
 
@@ -10517,11 +10593,13 @@ open_dwo_file (const char *file_name, co
 
   if (comp_dir != NULL)
     {
-      char *path_to_try = concat (comp_dir, SLASH_STRING, file_name, NULL);
+      char *path_to_try = concat (comp_dir, SLASH_STRING,
+				  file_name, (char *) NULL);
 
       /* NOTE: If comp_dir is a relative path, this will also try the
 	 search path, which seems useful.  */
-      abfd = try_open_dwop_file (path_to_try, 0 /*is_dwp*/, 1 /*search_cwd*/);
+      gdb_bfd_ref_ptr abfd (try_open_dwop_file (path_to_try, 0 /*is_dwp*/,
+						1 /*search_cwd*/));
       xfree (path_to_try);
       if (abfd != NULL)
 	return abfd;
@@ -10542,47 +10620,47 @@ open_dwo_file (const char *file_name, co
 static void
 dwarf2_locate_dwo_sections (bfd *abfd, asection *sectp, void *dwo_sections_ptr)
 {
-  struct dwo_sections *dwo_sections = dwo_sections_ptr;
+  struct dwo_sections *dwo_sections = (struct dwo_sections *) dwo_sections_ptr;
   const struct dwop_section_names *names = &dwop_section_names;
 
   if (section_is_p (sectp->name, &names->abbrev_dwo))
     {
-      dwo_sections->abbrev.s.asection = sectp;
+      dwo_sections->abbrev.s.section = sectp;
       dwo_sections->abbrev.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->info_dwo))
     {
-      dwo_sections->info.s.asection = sectp;
+      dwo_sections->info.s.section = sectp;
       dwo_sections->info.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->line_dwo))
     {
-      dwo_sections->line.s.asection = sectp;
+      dwo_sections->line.s.section = sectp;
       dwo_sections->line.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->loc_dwo))
     {
-      dwo_sections->loc.s.asection = sectp;
+      dwo_sections->loc.s.section = sectp;
       dwo_sections->loc.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macinfo_dwo))
     {
-      dwo_sections->macinfo.s.asection = sectp;
+      dwo_sections->macinfo.s.section = sectp;
       dwo_sections->macinfo.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macro_dwo))
     {
-      dwo_sections->macro.s.asection = sectp;
+      dwo_sections->macro.s.section = sectp;
       dwo_sections->macro.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->str_dwo))
     {
-      dwo_sections->str.s.asection = sectp;
+      dwo_sections->str.s.section = sectp;
       dwo_sections->str.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->str_offsets_dwo))
     {
-      dwo_sections->str_offsets.s.asection = sectp;
+      dwo_sections->str_offsets.s.section = sectp;
       dwo_sections->str_offsets.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->types_dwo))
@@ -10590,7 +10668,7 @@ dwarf2_locate_dwo_sections (bfd *abfd, a
       struct dwarf2_section_info type_section;
 
       memset (&type_section, 0, sizeof (type_section));
-      type_section.s.asection = sectp;
+      type_section.s.section = sectp;
       type_section.size = bfd_get_section_size (sectp);
       VEC_safe_push (dwarf2_section_info_def, dwo_sections->types,
 		     &type_section);
@@ -10607,10 +10685,9 @@ open_and_init_dwo_file (struct dwarf2_pe
 {
   struct objfile *objfile = dwarf2_per_objfile->objfile;
   struct dwo_file *dwo_file;
-  bfd *dbfd;
   struct cleanup *cleanups;
 
-  dbfd = open_dwo_file (dwo_name, comp_dir);
+  gdb_bfd_ref_ptr dbfd (open_dwo_file (dwo_name, comp_dir));
   if (dbfd == NULL)
     {
       if (dwarf_read_debug)
@@ -10620,16 +10697,17 @@ open_and_init_dwo_file (struct dwarf2_pe
   dwo_file = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_file);
   dwo_file->dwo_name = dwo_name;
   dwo_file->comp_dir = comp_dir;
-  dwo_file->dbfd = dbfd;
+  dwo_file->dbfd = dbfd.release ();
 
   cleanups = make_cleanup (free_dwo_file_cleanup, dwo_file);
 
-  bfd_map_over_sections (dbfd, dwarf2_locate_dwo_sections, &dwo_file->sections);
+  bfd_map_over_sections (dwo_file->dbfd, dwarf2_locate_dwo_sections,
+			 &dwo_file->sections);
 
   dwo_file->cu = create_dwo_cu (dwo_file);
 
-  dwo_file->tus = create_debug_types_hash_table (dwo_file,
-						 dwo_file->sections.types);
+  create_debug_types_hash_table (dwo_file, dwo_file->sections.types,
+				 dwo_file->tus);
 
   discard_cleanups (cleanups);
 
@@ -10647,7 +10725,7 @@ static void
 dwarf2_locate_common_dwp_sections (bfd *abfd, asection *sectp,
 				   void *dwp_file_ptr)
 {
-  struct dwp_file *dwp_file = dwp_file_ptr;
+  struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
   const struct dwop_section_names *names = &dwop_section_names;
   unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
 
@@ -10659,17 +10737,17 @@ dwarf2_locate_common_dwp_sections (bfd *
   /* Look for specific sections that we need.  */
   if (section_is_p (sectp->name, &names->str_dwo))
     {
-      dwp_file->sections.str.s.asection = sectp;
+      dwp_file->sections.str.s.section = sectp;
       dwp_file->sections.str.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->cu_index))
     {
-      dwp_file->sections.cu_index.s.asection = sectp;
+      dwp_file->sections.cu_index.s.section = sectp;
       dwp_file->sections.cu_index.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->tu_index))
     {
-      dwp_file->sections.tu_index.s.asection = sectp;
+      dwp_file->sections.tu_index.s.section = sectp;
       dwp_file->sections.tu_index.size = bfd_get_section_size (sectp);
     }
 }
@@ -10682,7 +10760,7 @@ dwarf2_locate_common_dwp_sections (bfd *
 static void
 dwarf2_locate_v2_dwp_sections (bfd *abfd, asection *sectp, void *dwp_file_ptr)
 {
-  struct dwp_file *dwp_file = dwp_file_ptr;
+  struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
   const struct dwop_section_names *names = &dwop_section_names;
   unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
 
@@ -10694,42 +10772,42 @@ dwarf2_locate_v2_dwp_sections (bfd *abfd
   /* Look for specific sections that we need.  */
   if (section_is_p (sectp->name, &names->abbrev_dwo))
     {
-      dwp_file->sections.abbrev.s.asection = sectp;
+      dwp_file->sections.abbrev.s.section = sectp;
       dwp_file->sections.abbrev.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->info_dwo))
     {
-      dwp_file->sections.info.s.asection = sectp;
+      dwp_file->sections.info.s.section = sectp;
       dwp_file->sections.info.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->line_dwo))
     {
-      dwp_file->sections.line.s.asection = sectp;
+      dwp_file->sections.line.s.section = sectp;
       dwp_file->sections.line.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->loc_dwo))
     {
-      dwp_file->sections.loc.s.asection = sectp;
+      dwp_file->sections.loc.s.section = sectp;
       dwp_file->sections.loc.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macinfo_dwo))
     {
-      dwp_file->sections.macinfo.s.asection = sectp;
+      dwp_file->sections.macinfo.s.section = sectp;
       dwp_file->sections.macinfo.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->macro_dwo))
     {
-      dwp_file->sections.macro.s.asection = sectp;
+      dwp_file->sections.macro.s.section = sectp;
       dwp_file->sections.macro.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->str_offsets_dwo))
     {
-      dwp_file->sections.str_offsets.s.asection = sectp;
+      dwp_file->sections.str_offsets.s.section = sectp;
       dwp_file->sections.str_offsets.size = bfd_get_section_size (sectp);
     }
   else if (section_is_p (sectp->name, &names->types_dwo))
     {
-      dwp_file->sections.types.s.asection = sectp;
+      dwp_file->sections.types.s.section = sectp;
       dwp_file->sections.types.size = bfd_get_section_size (sectp);
     }
 }
@@ -10739,7 +10817,7 @@ dwarf2_locate_v2_dwp_sections (bfd *abfd
 static hashval_t
 hash_dwp_loaded_cutus (const void *item)
 {
-  const struct dwo_unit *dwo_unit = item;
+  const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
 
   /* This drops the top 32 bits of the signature, but is ok for a hash.  */
   return dwo_unit->signature;
@@ -10750,8 +10828,8 @@ hash_dwp_loaded_cutus (const void *item)
 static int
 eq_dwp_loaded_cutus (const void *a, const void *b)
 {
-  const struct dwo_unit *dua = a;
-  const struct dwo_unit *dub = b;
+  const struct dwo_unit *dua = (const struct dwo_unit *) a;
+  const struct dwo_unit *dub = (const struct dwo_unit *) b;
 
   return dua->signature == dub->signature;
 }
@@ -10776,12 +10854,11 @@ allocate_dwp_loaded_cutus_table (struct 
    Upon success, the canonicalized path of the file is stored in the bfd,
    same as symfile_bfd_open.  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 open_dwp_file (const char *file_name)
 {
-  bfd *abfd;
-
-  abfd = try_open_dwop_file (file_name, 1 /*is_dwp*/, 1 /*search_cwd*/);
+  gdb_bfd_ref_ptr abfd (try_open_dwop_file (file_name, 1 /*is_dwp*/,
+					    1 /*search_cwd*/));
   if (abfd != NULL)
     return abfd;
 
@@ -10815,15 +10892,28 @@ open_and_init_dwp_file (void)
   struct objfile *objfile = dwarf2_per_objfile->objfile;
   struct dwp_file *dwp_file;
   char *dwp_name;
-  bfd *dbfd;
-  struct cleanup *cleanups;
+  struct cleanup *cleanups = make_cleanup (null_cleanup, 0);
 
   /* Try to find first .dwp for the binary file before any symbolic links
      resolving.  */
-  dwp_name = xstrprintf ("%s.dwp", objfile->original_name);
-  cleanups = make_cleanup (xfree, dwp_name);
 
-  dbfd = open_dwp_file (dwp_name);
+  /* If the objfile is a debug file, find the name of the real binary
+     file and get the name of dwp file from there.  */
+  if (objfile->separate_debug_objfile_backlink != NULL)
+    {
+      struct objfile *backlink = objfile->separate_debug_objfile_backlink;
+      const char *backlink_basename = lbasename (backlink->original_name);
+      char *debug_dirname = ldirname (objfile->original_name);
+
+      make_cleanup (xfree, debug_dirname);
+      dwp_name = xstrprintf ("%s%s%s.dwp", debug_dirname,
+			     SLASH_STRING, backlink_basename);
+    }
+  else
+    dwp_name = xstrprintf ("%s.dwp", objfile->original_name);
+  make_cleanup (xfree, dwp_name);
+
+  gdb_bfd_ref_ptr dbfd (open_dwp_file (dwp_name));
   if (dbfd == NULL
       && strcmp (objfile->original_name, objfile_name (objfile)) != 0)
     {
@@ -10841,17 +10931,18 @@ open_and_init_dwp_file (void)
       return NULL;
     }
   dwp_file = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwp_file);
-  dwp_file->name = bfd_get_filename (dbfd);
-  dwp_file->dbfd = dbfd;
+  dwp_file->name = bfd_get_filename (dbfd.get ());
+  dwp_file->dbfd = dbfd.release ();
   do_cleanups (cleanups);
 
   /* +1: section 0 is unused */
-  dwp_file->num_sections = bfd_count_sections (dbfd) + 1;
+  dwp_file->num_sections = bfd_count_sections (dwp_file->dbfd) + 1;
   dwp_file->elf_sections =
     OBSTACK_CALLOC (&objfile->objfile_obstack,
 		    dwp_file->num_sections, asection *);
 
-  bfd_map_over_sections (dbfd, dwarf2_locate_common_dwp_sections, dwp_file);
+  bfd_map_over_sections (dwp_file->dbfd, dwarf2_locate_common_dwp_sections,
+			 dwp_file);
 
   dwp_file->cus = create_dwp_hash_table (dwp_file, 0);
 
@@ -10871,7 +10962,8 @@ open_and_init_dwp_file (void)
   dwp_file->version = dwp_file->cus->version;
 
   if (dwp_file->version == 2)
-    bfd_map_over_sections (dbfd, dwarf2_locate_v2_dwp_sections, dwp_file);
+    bfd_map_over_sections (dwp_file->dbfd, dwarf2_locate_v2_dwp_sections,
+			   dwp_file);
 
   dwp_file->loaded_cus = allocate_dwp_loaded_cutus_table (objfile);
   dwp_file->loaded_tus = allocate_dwp_loaded_cutus_table (objfile);
@@ -10969,7 +11061,7 @@ lookup_dwo_cutu (struct dwarf2_per_cu_da
 	  *dwo_file_slot = open_and_init_dwo_file (this_unit, dwo_name, comp_dir);
 	}
       /* NOTE: This will be NULL if unable to open the file.  */
-      dwo_file = *dwo_file_slot;
+      dwo_file = (struct dwo_file *) *dwo_file_slot;
 
       if (dwo_file != NULL)
 	{
@@ -10981,7 +11073,8 @@ lookup_dwo_cutu (struct dwarf2_per_cu_da
 
 	      memset (&find_dwo_cutu, 0, sizeof (find_dwo_cutu));
 	      find_dwo_cutu.signature = signature;
-	      dwo_cutu = htab_find (dwo_file->tus, &find_dwo_cutu);
+	      dwo_cutu
+		= (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_cutu);
 	    }
 	  else if (!is_debug_types && dwo_file->cu)
 	    {
@@ -11113,8 +11206,6 @@ queue_and_load_all_dwo_tus (struct dwarf
 static void
 free_dwo_file (struct dwo_file *dwo_file, struct objfile *objfile)
 {
-  int ix;
-  struct dwarf2_section_info *section;
 
   /* Note: dbfd is NULL for virtual DWO files.  */
   gdb_bfd_unref (dwo_file->dbfd);
@@ -11218,7 +11309,7 @@ inherit_abstract_dies (struct die_info *
       child_die = sibling_die (child_die);
       die_children_count++;
     }
-  offsets = xmalloc (sizeof (*offsets) * die_children_count);
+  offsets = XNEWVEC (sect_offset, die_children_count);
   cleanups = make_cleanup (xfree, offsets);
 
   offsets_end = offsets;
@@ -11230,11 +11321,12 @@ inherit_abstract_dies (struct die_info *
       struct dwarf2_cu *child_origin_cu;
 
       /* We are trying to process concrete instance entries:
-	 DW_TAG_GNU_call_site DIEs indeed have a DW_AT_abstract_origin tag, but
+	 DW_TAG_call_site DIEs indeed have a DW_AT_abstract_origin tag, but
 	 it's not relevant to our analysis here. i.e. detecting DIEs that are
 	 present in the abstract instance but not referenced in the concrete
 	 one.  */
-      if (child_die->tag == DW_TAG_GNU_call_site)
+      if (child_die->tag == DW_TAG_call_site
+          || child_die->tag == DW_TAG_GNU_call_site)
 	continue;
 
       /* For each CHILD_DIE, find the corresponding child of
@@ -11354,7 +11446,8 @@ read_func_scope (struct die_info *die, s
     }
 
   /* Ignore functions with missing or invalid low and high pc attributes.  */
-  if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
+  if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
+      <= PC_BOUNDS_INVALID)
     {
       attr = dwarf2_attr (die, DW_AT_external, cu);
       if (!attr || !DW_UNSND (attr))
@@ -11391,6 +11484,16 @@ read_func_scope (struct die_info *die, s
   if (attr)
     dwarf2_symbol_mark_computed (attr, newobj->name, cu, 1);
 
+  /* If there is a location for the static link, record it.  */
+  newobj->static_link = NULL;
+  attr = dwarf2_attr (die, DW_AT_static_link, cu);
+  if (attr)
+    {
+      newobj->static_link
+	= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
+      attr_to_dynamic_prop (attr, die, cu, newobj->static_link);
+    }
+
   cu->list_in_scope = &local_symbols;
 
   if (die->child != NULL)
@@ -11442,10 +11545,13 @@ read_func_scope (struct die_info *die, s
   newobj = pop_context ();
   /* Make a block for the local symbols within.  */
   block = finish_block (newobj->name, &local_symbols, newobj->old_blocks,
-                        lowpc, highpc);
+			newobj->static_link, lowpc, highpc);
 
   /* For C++, set the block's scope.  */
-  if ((cu->language == language_cplus || cu->language == language_fortran)
+  if ((cu->language == language_cplus
+       || cu->language == language_fortran
+       || cu->language == language_d
+       || cu->language == language_rust)
       && cu->processing_has_namespace_info)
     block_set_scope (block, determine_prefix (die, cu),
 		     &objfile->objfile_obstack);
@@ -11462,9 +11568,8 @@ read_func_scope (struct die_info *die, s
 
       templ_func->n_template_arguments = VEC_length (symbolp, template_args);
       templ_func->template_arguments
-	= obstack_alloc (&objfile->objfile_obstack,
-			 (templ_func->n_template_arguments
-			  * sizeof (struct symbol *)));
+        = XOBNEWVEC (&objfile->objfile_obstack, struct symbol *,
+		     templ_func->n_template_arguments);
       memcpy (templ_func->template_arguments,
 	      VEC_address (symbolp, template_args),
 	      (templ_func->n_template_arguments * sizeof (struct symbol *)));
@@ -11476,7 +11581,7 @@ read_func_scope (struct die_info *die, s
      when we finish processing a function scope, we may need to go
      back to building a containing block's symbol lists.  */
   local_symbols = newobj->locals;
-  using_directives = newobj->using_directives;
+  local_using_directives = newobj->local_using_directives;
 
   /* If we've finished processing a top-level function, subsequent
      symbols go in the file symbol list.  */
@@ -11504,8 +11609,20 @@ read_lexical_block_scope (struct die_inf
      as multiple lexical blocks?  Handling children in a sane way would
      be nasty.  Might be easier to properly extend generic blocks to
      describe ranges.  */
-  if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
-    return;
+  switch (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
+    {
+    case PC_BOUNDS_NOT_PRESENT:
+      /* DW_TAG_lexical_block has no attributes, process its children as if
+	 there was no wrapping by that DW_TAG_lexical_block.
+	 GCC does no longer produces such DWARF since GCC r224161.  */
+      for (child_die = die->child;
+	   child_die != NULL && child_die->tag;
+	   child_die = sibling_die (child_die))
+	process_die (child_die, cu);
+      return;
+    case PC_BOUNDS_INVALID:
+      return;
+    }
   lowpc = gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + baseaddr);
   highpc = gdbarch_adjust_dwarf2_addr (gdbarch, highpc + baseaddr);
 
@@ -11522,10 +11639,10 @@ read_lexical_block_scope (struct die_inf
   inherit_abstract_dies (die, cu);
   newobj = pop_context ();
 
-  if (local_symbols != NULL || using_directives != NULL)
+  if (local_symbols != NULL || local_using_directives != NULL)
     {
       struct block *block
-        = finish_block (0, &local_symbols, newobj->old_blocks,
+        = finish_block (0, &local_symbols, newobj->old_blocks, NULL,
 			newobj->start_addr, highpc);
 
       /* Note that recording ranges after traversing children, as we
@@ -11541,10 +11658,10 @@ read_lexical_block_scope (struct die_inf
       dwarf2_record_block_ranges (die, block, baseaddr, cu);
     }
   local_symbols = newobj->locals;
-  using_directives = newobj->using_directives;
+  local_using_directives = newobj->local_using_directives;
 }
 
-/* Read in DW_TAG_GNU_call_site and insert it to CU->call_site_htab.  */
+/* Read in DW_TAG_call_site and insert it to CU->call_site_htab.  */
 
 static void
 read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -11560,11 +11677,17 @@ read_call_site_scope (struct die_info *d
 
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
-  attr = dwarf2_attr (die, DW_AT_low_pc, cu);
+  attr = dwarf2_attr (die, DW_AT_call_return_pc, cu);
+  if (attr == NULL)
+    {
+      /* This was a pre-DWARF-5 GNU extension alias
+	 for DW_AT_call_return_pc.  */
+      attr = dwarf2_attr (die, DW_AT_low_pc, cu);
+    }
   if (!attr)
     {
       complaint (&symfile_complaints,
-		 _("missing DW_AT_low_pc for DW_TAG_GNU_call_site "
+		 _("missing DW_AT_call_return_pc for DW_TAG_call_site "
 		   "DIE 0x%x [in module %s]"),
 		 die->offset.sect_off, objfile_name (objfile));
       return;
@@ -11581,7 +11704,7 @@ read_call_site_scope (struct die_info *d
   if (*slot != NULL)
     {
       complaint (&symfile_complaints,
-		 _("Duplicate PC %s for DW_TAG_GNU_call_site "
+		 _("Duplicate PC %s for DW_TAG_call_site "
 		   "DIE 0x%x [in module %s]"),
 		 paddress (gdbarch, pc), die->offset.sect_off,
 		 objfile_name (objfile));
@@ -11594,11 +11717,12 @@ read_call_site_scope (struct die_info *d
   for (child_die = die->child; child_die && child_die->tag;
        child_die = sibling_die (child_die))
     {
-      if (child_die->tag != DW_TAG_GNU_call_site_parameter)
+      if (child_die->tag != DW_TAG_call_site_parameter
+          && child_die->tag != DW_TAG_GNU_call_site_parameter)
 	{
 	  complaint (&symfile_complaints,
-		     _("Tag %d is not DW_TAG_GNU_call_site_parameter in "
-		       "DW_TAG_GNU_call_site child DIE 0x%x [in module %s]"),
+		     _("Tag %d is not DW_TAG_call_site_parameter in "
+		       "DW_TAG_call_site child DIE 0x%x [in module %s]"),
 		     child_die->tag, child_die->offset.sect_off,
 		     objfile_name (objfile));
 	  continue;
@@ -11607,15 +11731,17 @@ read_call_site_scope (struct die_info *d
       nparams++;
     }
 
-  call_site = obstack_alloc (&objfile->objfile_obstack,
-			     (sizeof (*call_site)
-			      + (sizeof (*call_site->parameter)
-				 * (nparams - 1))));
+  call_site
+    = ((struct call_site *)
+       obstack_alloc (&objfile->objfile_obstack,
+		      sizeof (*call_site)
+		      + (sizeof (*call_site->parameter) * (nparams - 1))));
   *slot = call_site;
   memset (call_site, 0, sizeof (*call_site) - sizeof (*call_site->parameter));
   call_site->pc = pc;
 
-  if (dwarf2_flag_true_p (die, DW_AT_GNU_tail_call, cu))
+  if (dwarf2_flag_true_p (die, DW_AT_call_tail_call, cu)
+      || dwarf2_flag_true_p (die, DW_AT_GNU_tail_call, cu))
     {
       struct die_info *func_die;
 
@@ -11625,10 +11751,12 @@ read_call_site_scope (struct die_info *d
 	   && func_die->tag != DW_TAG_subroutine_type;
 	   func_die = func_die->parent);
 
-      /* DW_AT_GNU_all_call_sites is a superset
-	 of DW_AT_GNU_all_tail_call_sites.  */
+      /* DW_AT_call_all_calls is a superset
+	 of DW_AT_call_all_tail_calls.  */
       if (func_die
+          && !dwarf2_flag_true_p (func_die, DW_AT_call_all_calls, cu)
           && !dwarf2_flag_true_p (func_die, DW_AT_GNU_all_call_sites, cu)
+	  && !dwarf2_flag_true_p (func_die, DW_AT_call_all_tail_calls, cu)
 	  && !dwarf2_flag_true_p (func_die, DW_AT_GNU_all_tail_call_sites, cu))
 	{
 	  /* TYPE_TAIL_CALL_LIST is not interesting in functions where it is
@@ -11656,15 +11784,22 @@ read_call_site_scope (struct die_info *d
 	    }
 	  else
 	    complaint (&symfile_complaints,
-		       _("Cannot find function owning DW_TAG_GNU_call_site "
+		       _("Cannot find function owning DW_TAG_call_site "
 			 "DIE 0x%x [in module %s]"),
 		       die->offset.sect_off, objfile_name (objfile));
 	}
     }
 
-  attr = dwarf2_attr (die, DW_AT_GNU_call_site_target, cu);
+  attr = dwarf2_attr (die, DW_AT_call_target, cu);
+  if (attr == NULL)
+    attr = dwarf2_attr (die, DW_AT_GNU_call_site_target, cu);
+  if (attr == NULL)
+    attr = dwarf2_attr (die, DW_AT_call_origin, cu);
   if (attr == NULL)
-    attr = dwarf2_attr (die, DW_AT_abstract_origin, cu);
+    {
+      /* This was a pre-DWARF-5 GNU extension alias for DW_AT_call_origin.  */
+      attr = dwarf2_attr (die, DW_AT_abstract_origin, cu);
+    }
   SET_FIELD_DWARF_BLOCK (call_site->target, NULL);
   if (!attr || (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0))
     /* Keep NULL DWARF_BLOCK.  */;
@@ -11672,7 +11807,7 @@ read_call_site_scope (struct die_info *d
     {
       struct dwarf2_locexpr_baton *dlbaton;
 
-      dlbaton = obstack_alloc (&objfile->objfile_obstack, sizeof (*dlbaton));
+      dlbaton = XOBNEW (&objfile->objfile_obstack, struct dwarf2_locexpr_baton);
       dlbaton->data = DW_BLOCK (attr)->data;
       dlbaton->size = DW_BLOCK (attr)->size;
       dlbaton->per_cu = cu->per_cu;
@@ -11688,21 +11823,21 @@ read_call_site_scope (struct die_info *d
       gdb_assert (target_cu->objfile == objfile);
       if (die_is_declaration (target_die, target_cu))
 	{
-	  const char *target_physname = NULL;
-	  struct attribute *target_attr;
+	  const char *target_physname;
 
 	  /* Prefer the mangled name; otherwise compute the demangled one.  */
-	  target_attr = dwarf2_attr (target_die, DW_AT_linkage_name, target_cu);
-	  if (target_attr == NULL)
-	    target_attr = dwarf2_attr (target_die, DW_AT_MIPS_linkage_name,
-				       target_cu);
-	  if (target_attr != NULL && DW_STRING (target_attr) != NULL)
-	    target_physname = DW_STRING (target_attr);
-	  else
+	  target_physname = dwarf2_string_attr (target_die,
+						DW_AT_linkage_name,
+						target_cu);
+	  if (target_physname == NULL)
+	    target_physname = dwarf2_string_attr (target_die,
+						 DW_AT_MIPS_linkage_name,
+						 target_cu);
+	  if (target_physname == NULL)
 	    target_physname = dwarf2_physname (NULL, target_die, target_cu);
 	  if (target_physname == NULL)
 	    complaint (&symfile_complaints,
-		       _("DW_AT_GNU_call_site_target target DIE has invalid "
+		       _("DW_AT_call_target target DIE has invalid "
 		         "physname, for referencing DIE 0x%x [in module %s]"),
 		       die->offset.sect_off, objfile_name (objfile));
 	  else
@@ -11713,9 +11848,10 @@ read_call_site_scope (struct die_info *d
 	  CORE_ADDR lowpc;
 
 	  /* DW_AT_entry_pc should be preferred.  */
-	  if (!dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL))
+	  if (dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL)
+	      <= PC_BOUNDS_INVALID)
 	    complaint (&symfile_complaints,
-		       _("DW_AT_GNU_call_site_target target DIE has invalid "
+		       _("DW_AT_call_target target DIE has invalid "
 		         "low pc, for referencing DIE 0x%x [in module %s]"),
 		       die->offset.sect_off, objfile_name (objfile));
 	  else
@@ -11727,7 +11863,7 @@ read_call_site_scope (struct die_info *d
     }
   else
     complaint (&symfile_complaints,
-	       _("DW_TAG_GNU_call_site DW_AT_GNU_call_site_target is neither "
+	       _("DW_TAG_call_site DW_AT_call_target is neither "
 		 "block nor reference, for DIE 0x%x [in module %s]"),
 	       die->offset.sect_off, objfile_name (objfile));
 
@@ -11740,7 +11876,8 @@ read_call_site_scope (struct die_info *d
       struct call_site_parameter *parameter;
       struct attribute *loc, *origin;
 
-      if (child_die->tag != DW_TAG_GNU_call_site_parameter)
+      if (child_die->tag != DW_TAG_call_site_parameter
+          && child_die->tag != DW_TAG_GNU_call_site_parameter)
 	{
 	  /* Already printed the complaint above.  */
 	  continue;
@@ -11751,10 +11888,16 @@ read_call_site_scope (struct die_info *d
 
       /* DW_AT_location specifies the register number or DW_AT_abstract_origin
 	 specifies DW_TAG_formal_parameter.  Value of the data assumed for the
-	 register is contained in DW_AT_GNU_call_site_value.  */
+	 register is contained in DW_AT_call_value.  */
 
       loc = dwarf2_attr (child_die, DW_AT_location, cu);
-      origin = dwarf2_attr (child_die, DW_AT_abstract_origin, cu);
+      origin = dwarf2_attr (child_die, DW_AT_call_parameter, cu);
+      if (origin == NULL)
+	{
+	  /* This was a pre-DWARF-5 GNU extension alias
+	     for DW_AT_call_parameter.  */
+	  origin = dwarf2_attr (child_die, DW_AT_abstract_origin, cu);
+	}
       if (loc == NULL && origin != NULL && attr_form_is_ref (origin))
 	{
 	  sect_offset offset;
@@ -11767,9 +11910,8 @@ read_call_site_scope (struct die_info *d
 		 binding can be done only inside one CU.  Such referenced DIE
 		 therefore cannot be even moved to DW_TAG_partial_unit.  */
 	      complaint (&symfile_complaints,
-			 _("DW_AT_abstract_origin offset is not in CU for "
-			   "DW_TAG_GNU_call_site child DIE 0x%x "
-			   "[in module %s]"),
+			 _("DW_AT_call_parameter offset is not in CU for "
+			   "DW_TAG_call_site child DIE 0x%x [in module %s]"),
 			 child_die->offset.sect_off, objfile_name (objfile));
 	      continue;
 	    }
@@ -11780,7 +11922,7 @@ read_call_site_scope (struct die_info *d
 	{
 	  complaint (&symfile_complaints,
 		     _("No DW_FORM_block* DW_AT_location for "
-		       "DW_TAG_GNU_call_site child DIE 0x%x [in module %s]"),
+		       "DW_TAG_call_site child DIE 0x%x [in module %s]"),
 		     child_die->offset.sect_off, objfile_name (objfile));
 	  continue;
 	}
@@ -11799,19 +11941,21 @@ read_call_site_scope (struct die_info *d
 	      complaint (&symfile_complaints,
 			 _("Only single DW_OP_reg or DW_OP_fbreg is supported "
 			   "for DW_FORM_block* DW_AT_location is supported for "
-			   "DW_TAG_GNU_call_site child DIE 0x%x "
+			   "DW_TAG_call_site child DIE 0x%x "
 			   "[in module %s]"),
 			 child_die->offset.sect_off, objfile_name (objfile));
 	      continue;
 	    }
 	}
 
-      attr = dwarf2_attr (child_die, DW_AT_GNU_call_site_value, cu);
+      attr = dwarf2_attr (child_die, DW_AT_call_value, cu);
+      if (attr == NULL)
+	attr = dwarf2_attr (child_die, DW_AT_GNU_call_site_value, cu);
       if (!attr_form_is_block (attr))
 	{
 	  complaint (&symfile_complaints,
-		     _("No DW_FORM_block* DW_AT_GNU_call_site_value for "
-		       "DW_TAG_GNU_call_site child DIE 0x%x [in module %s]"),
+		     _("No DW_FORM_block* DW_AT_call_value for "
+		       "DW_TAG_call_site child DIE 0x%x [in module %s]"),
 		     child_die->offset.sect_off, objfile_name (objfile));
 	  continue;
 	}
@@ -11823,13 +11967,15 @@ read_call_site_scope (struct die_info *d
       parameter->data_value_size = 0;
       call_site->parameter_count++;
 
-      attr = dwarf2_attr (child_die, DW_AT_GNU_call_site_data_value, cu);
+      attr = dwarf2_attr (child_die, DW_AT_call_data_value, cu);
+      if (attr == NULL)
+	attr = dwarf2_attr (child_die, DW_AT_GNU_call_site_data_value, cu);
       if (attr)
 	{
 	  if (!attr_form_is_block (attr))
 	    complaint (&symfile_complaints,
-		       _("No DW_FORM_block* DW_AT_GNU_call_site_data_value for "
-			 "DW_TAG_GNU_call_site child DIE 0x%x [in module %s]"),
+		       _("No DW_FORM_block* DW_AT_call_data_value for "
+			 "DW_TAG_call_site child DIE 0x%x [in module %s]"),
 		       child_die->offset.sect_off, objfile_name (objfile));
 	  else
 	    {
@@ -11840,14 +11986,17 @@ read_call_site_scope (struct die_info *d
     }
 }
 
-/* Get low and high pc attributes from DW_AT_ranges attribute value OFFSET.
-   Return 1 if the attributes are present and valid, otherwise, return 0.
-   If RANGES_PST is not NULL we should setup `objfile->psymtabs_addrmap'.  */
-
-static int
-dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
-		    CORE_ADDR *high_return, struct dwarf2_cu *cu,
-		    struct partial_symtab *ranges_pst)
+/* Call CALLBACK from DW_AT_ranges attribute value OFFSET
+   reading .debug_rnglists.
+   Callback's type should be:
+    void (CORE_ADDR range_beginning, CORE_ADDR range_end)
+   Return true if the attributes are present and valid, otherwise,
+   return false.  */
+
+template <typename Callback>
+static bool
+dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
+			 Callback &&callback)
 {
   struct objfile *objfile = cu->objfile;
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -11860,11 +12009,183 @@ dwarf2_ranges_read (unsigned offset, COR
   int found_base;
   unsigned int dummy;
   const gdb_byte *buffer;
-  CORE_ADDR marker;
-  int low_set;
   CORE_ADDR low = 0;
   CORE_ADDR high = 0;
   CORE_ADDR baseaddr;
+  bool overflow = false;
+
+  found_base = cu->base_known;
+  base = cu->base_address;
+
+  dwarf2_read_section (objfile, &dwarf2_per_objfile->rnglists);
+  if (offset >= dwarf2_per_objfile->rnglists.size)
+    {
+      complaint (&symfile_complaints,
+		 _("Offset %d out of bounds for DW_AT_ranges attribute"),
+		 offset);
+      return false;
+    }
+  buffer = dwarf2_per_objfile->rnglists.buffer + offset;
+
+  baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+
+  while (1)
+    {
+      /* Initialize it due to a false compiler warning.  */
+      CORE_ADDR range_beginning = 0, range_end = 0;
+      const gdb_byte *buf_end = (dwarf2_per_objfile->rnglists.buffer
+				 + dwarf2_per_objfile->rnglists.size);
+      unsigned int bytes_read;
+
+      if (buffer == buf_end)
+	{
+	  overflow = true;
+	  break;
+	}
+      const auto rlet = static_cast<enum dwarf_range_list_entry>(*buffer++);
+      switch (rlet)
+	{
+	case DW_RLE_end_of_list:
+	  break;
+	case DW_RLE_base_address:
+	  if (buffer + cu->header.addr_size > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  base = read_address (obfd, buffer, cu, &bytes_read);
+	  found_base = 1;
+	  buffer += bytes_read;
+	  break;
+	case DW_RLE_start_length:
+	  if (buffer + cu->header.addr_size > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  range_beginning = read_address (obfd, buffer, cu, &bytes_read);
+	  buffer += bytes_read;
+	  range_end = (range_beginning
+		       + read_unsigned_leb128 (obfd, buffer, &bytes_read));
+	  buffer += bytes_read;
+	  if (buffer > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  break;
+	case DW_RLE_offset_pair:
+	  range_beginning = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+	  buffer += bytes_read;
+	  if (buffer > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  range_end = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+	  buffer += bytes_read;
+	  if (buffer > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  break;
+	case DW_RLE_start_end:
+	  if (buffer + 2 * cu->header.addr_size > buf_end)
+	    {
+	      overflow = true;
+	      break;
+	    }
+	  range_beginning = read_address (obfd, buffer, cu, &bytes_read);
+	  buffer += bytes_read;
+	  range_end = read_address (obfd, buffer, cu, &bytes_read);
+	  buffer += bytes_read;
+	  break;
+	default:
+	  complaint (&symfile_complaints,
+		     _("Invalid .debug_rnglists data (no base address)"));
+	  return false;
+	}
+      if (rlet == DW_RLE_end_of_list || overflow)
+	break;
+      if (rlet == DW_RLE_base_address)
+	continue;
+
+      if (!found_base)
+	{
+	  /* We have no valid base address for the ranges
+	     data.  */
+	  complaint (&symfile_complaints,
+		     _("Invalid .debug_rnglists data (no base address)"));
+	  return false;
+	}
+
+      if (range_beginning > range_end)
+	{
+	  /* Inverted range entries are invalid.  */
+	  complaint (&symfile_complaints,
+		     _("Invalid .debug_rnglists data (inverted range)"));
+	  return false;
+	}
+
+      /* Empty range entries have no effect.  */
+      if (range_beginning == range_end)
+	continue;
+
+      range_beginning += base;
+      range_end += base;
+
+      /* A not-uncommon case of bad debug info.
+	 Don't pollute the addrmap with bad data.  */
+      if (range_beginning + baseaddr == 0
+	  && !dwarf2_per_objfile->has_section_at_zero)
+	{
+	  complaint (&symfile_complaints,
+		     _(".debug_rnglists entry has start address of zero"
+		       " [in module %s]"), objfile_name (objfile));
+	  continue;
+	}
+
+      callback (range_beginning, range_end);
+    }
+
+  if (overflow)
+    {
+      complaint (&symfile_complaints,
+		 _("Offset %d is not terminated "
+		   "for DW_AT_ranges attribute"),
+		 offset);
+      return false;
+    }
+
+  return true;
+}
+
+/* Call CALLBACK from DW_AT_ranges attribute value OFFSET reading .debug_ranges.
+   Callback's type should be:
+    void (CORE_ADDR range_beginning, CORE_ADDR range_end)
+   Return 1 if the attributes are present and valid, otherwise, return 0.  */
+
+template <typename Callback>
+static int
+dwarf2_ranges_process (unsigned offset, struct dwarf2_cu *cu,
+		       Callback &&callback)
+{
+  struct objfile *objfile = cu->objfile;
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
+  struct comp_unit_head *cu_header = &cu->header;
+  bfd *obfd = objfile->obfd;
+  unsigned int addr_size = cu_header->addr_size;
+  CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
+  /* Base address selection entry.  */
+  CORE_ADDR base;
+  int found_base;
+  unsigned int dummy;
+  const gdb_byte *buffer;
+  CORE_ADDR baseaddr;
+
+  if (cu_header->version >= 5)
+    return dwarf2_rnglists_process (offset, cu, callback);
 
   found_base = cu->base_known;
   base = cu->base_address;
@@ -11879,20 +12200,6 @@ dwarf2_ranges_read (unsigned offset, COR
     }
   buffer = dwarf2_per_objfile->ranges.buffer + offset;
 
-  /* Read in the largest possible address.  */
-  marker = read_address (obfd, buffer, cu, &dummy);
-  if ((marker & mask) == mask)
-    {
-      /* If we found the largest possible address, then
-	 read the base address.  */
-      base = read_address (obfd, buffer + addr_size, cu, &dummy);
-      buffer += 2 * addr_size;
-      offset += 2 * addr_size;
-      found_base = 1;
-    }
-
-  low_set = 0;
-
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
   while (1)
@@ -11915,9 +12222,9 @@ dwarf2_ranges_read (unsigned offset, COR
 	 the base address.  Check for a base address here.  */
       if ((range_beginning & mask) == mask)
 	{
-	  /* If we found the largest possible address, then
-	     read the base address.  */
-	  base = read_address (obfd, buffer + addr_size, cu, &dummy);
+	  /* If we found the largest possible address, then we already
+	     have the base address in range_end.  */
+	  base = range_end;
 	  found_base = 1;
 	  continue;
 	}
@@ -11957,6 +12264,33 @@ dwarf2_ranges_read (unsigned offset, COR
 	  continue;
 	}
 
+      callback (range_beginning, range_end);
+    }
+
+  return 1;
+}
+
+/* Get low and high pc attributes from DW_AT_ranges attribute value OFFSET.
+   Return 1 if the attributes are present and valid, otherwise, return 0.
+   If RANGES_PST is not NULL we should setup `objfile->psymtabs_addrmap'.  */
+
+static int
+dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
+		    CORE_ADDR *high_return, struct dwarf2_cu *cu,
+		    struct partial_symtab *ranges_pst)
+{
+  struct objfile *objfile = cu->objfile;
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
+  const CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
+				       SECT_OFF_TEXT (objfile));
+  int low_set = 0;
+  CORE_ADDR low = 0;
+  CORE_ADDR high = 0;
+  int retval;
+
+  retval = dwarf2_ranges_process (offset, cu,
+    [&] (CORE_ADDR range_beginning, CORE_ADDR range_end)
+    {
       if (ranges_pst != NULL)
 	{
 	  CORE_ADDR lowpc;
@@ -11987,7 +12321,9 @@ dwarf2_ranges_read (unsigned offset, COR
 	  if (range_end > high)
 	    high = range_end;
 	}
-    }
+    });
+  if (!retval)
+    return 0;
 
   if (! low_set)
     /* If the first entry is an end-of-list marker, the range
@@ -12001,11 +12337,11 @@ dwarf2_ranges_read (unsigned offset, COR
   return 1;
 }
 
-/* Get low and high pc attributes from a die.  Return 1 if the attributes
-   are present and valid, otherwise, return 0.  Return -1 if the range is
-   discontinuous, i.e. derived from DW_AT_ranges information.  */
+/* Get low and high pc attributes from a die.  See enum pc_bounds_kind
+   definition for the return value.  *LOWPC and *HIGHPC are set iff
+   neither PC_BOUNDS_NOT_PRESENT nor PC_BOUNDS_INVALID are returned.  */
 
-static int
+static enum pc_bounds_kind
 dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
 		      CORE_ADDR *highpc, struct dwarf2_cu *cu,
 		      struct partial_symtab *pst)
@@ -12014,7 +12350,7 @@ dwarf2_get_pc_bounds (struct die_info *d
   struct attribute *attr_high;
   CORE_ADDR low = 0;
   CORE_ADDR high = 0;
-  int ret = 0;
+  enum pc_bounds_kind ret;
 
   attr_high = dwarf2_attr (die, DW_AT_high_pc, cu);
   if (attr_high)
@@ -12029,10 +12365,10 @@ dwarf2_get_pc_bounds (struct die_info *d
 	}
       else
 	/* Found high w/o low attribute.  */
-	return 0;
+	return PC_BOUNDS_INVALID;
 
       /* Found consecutive range of addresses.  */
-      ret = 1;
+      ret = PC_BOUNDS_HIGH_LOW;
     }
   else
     {
@@ -12051,15 +12387,17 @@ dwarf2_get_pc_bounds (struct die_info *d
 	  /* Value of the DW_AT_ranges attribute is the offset in the
 	     .debug_ranges section.  */
 	  if (!dwarf2_ranges_read (ranges_offset, &low, &high, cu, pst))
-	    return 0;
+	    return PC_BOUNDS_INVALID;
 	  /* Found discontinuous range of addresses.  */
-	  ret = -1;
+	  ret = PC_BOUNDS_RANGES;
 	}
+      else
+	return PC_BOUNDS_NOT_PRESENT;
     }
 
   /* read_partial_die has also the strict LOW < HIGH requirement.  */
   if (high <= low)
-    return 0;
+    return PC_BOUNDS_INVALID;
 
   /* When using the GNU linker, .gnu.linkonce. sections are used to
      eliminate duplicate copies of functions and vtables and such.
@@ -12070,7 +12408,7 @@ dwarf2_get_pc_bounds (struct die_info *d
      If this is a discarded function, mark the pc bounds as invalid,
      so that GDB will ignore it.  */
   if (low == 0 && !dwarf2_per_objfile->has_section_at_zero)
-    return 0;
+    return PC_BOUNDS_INVALID;
 
   *lowpc = low;
   if (highpc)
@@ -12091,10 +12429,10 @@ dwarf2_get_subprogram_pc_bounds (struct 
   CORE_ADDR low, high;
   struct die_info *child = die->child;
 
-  if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL))
+  if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL) >= PC_BOUNDS_RANGES)
     {
-      *lowpc = min (*lowpc, low);
-      *highpc = max (*highpc, high);
+      *lowpc = std::min (*lowpc, low);
+      *highpc = std::max (*highpc, high);
     }
 
   /* If the language does not allow nested subprograms (either inside
@@ -12128,7 +12466,8 @@ get_scope_pc_bounds (struct die_info *di
   CORE_ADDR best_high = (CORE_ADDR) 0;
   CORE_ADDR current_low, current_high;
 
-  if (dwarf2_get_pc_bounds (die, &current_low, &current_high, cu, NULL))
+  if (dwarf2_get_pc_bounds (die, &current_low, &current_high, cu, NULL)
+      >= PC_BOUNDS_RANGES)
     {
       best_low = current_low;
       best_high = current_high;
@@ -12157,8 +12496,8 @@ get_scope_pc_bounds (struct die_info *di
 
 	    if (current_low != ((CORE_ADDR) -1))
 	      {
-		best_low = min (best_low, current_low);
-		best_high = max (best_high, current_high);
+		best_low = std::min (best_low, current_low);
+		best_high = std::max (best_high, current_high);
 	      }
 	    break;
 	  default:
@@ -12236,79 +12575,15 @@ dwarf2_record_block_ranges (struct die_i
       CORE_ADDR base = cu->base_address;
       int base_known = cu->base_known;
 
-      dwarf2_read_section (objfile, &dwarf2_per_objfile->ranges);
-      if (offset >= dwarf2_per_objfile->ranges.size)
-        {
-          complaint (&symfile_complaints,
-                     _("Offset %lu out of bounds for DW_AT_ranges attribute"),
-                     offset);
-          return;
-        }
-      buffer = dwarf2_per_objfile->ranges.buffer + offset;
-
-      for (;;)
-        {
-          unsigned int bytes_read;
-          CORE_ADDR start, end;
-
-          start = read_address (obfd, buffer, cu, &bytes_read);
-          buffer += bytes_read;
-          end = read_address (obfd, buffer, cu, &bytes_read);
-          buffer += bytes_read;
-
-          /* Did we find the end of the range list?  */
-          if (start == 0 && end == 0)
-            break;
-
-          /* Did we find a base address selection entry?  */
-          else if ((start & base_select_mask) == base_select_mask)
-            {
-              base = end;
-              base_known = 1;
-            }
-
-          /* We found an ordinary address range.  */
-          else
-            {
-              if (!base_known)
-                {
-                  complaint (&symfile_complaints,
-			     _("Invalid .debug_ranges data "
-			       "(no base address)"));
-                  return;
-                }
-
-	      if (start > end)
-		{
-		  /* Inverted range entries are invalid.  */
-		  complaint (&symfile_complaints,
-			     _("Invalid .debug_ranges data "
-			       "(inverted range)"));
-		  return;
-		}
-
-	      /* Empty range entries have no effect.  */
-	      if (start == end)
-		continue;
-
-	      start += base + baseaddr;
-	      end += base + baseaddr;
-
-	      /* A not-uncommon case of bad debug info.
-		 Don't pollute the addrmap with bad data.  */
-	      if (start == 0 && !dwarf2_per_objfile->has_section_at_zero)
-		{
-		  complaint (&symfile_complaints,
-			     _(".debug_ranges entry has start address of zero"
-			       " [in module %s]"), objfile_name (objfile));
-		  continue;
-		}
-
-	      start = gdbarch_adjust_dwarf2_addr (gdbarch, start);
-	      end = gdbarch_adjust_dwarf2_addr (gdbarch, end);
-              record_block_range (block, start, end - 1);
-            }
-        }
+      dwarf2_ranges_process (offset, cu,
+	[&] (CORE_ADDR start, CORE_ADDR end)
+	{
+	  start += baseaddr;
+	  end += baseaddr;
+	  start = gdbarch_adjust_dwarf2_addr (gdbarch, start);
+	  end = gdbarch_adjust_dwarf2_addr (gdbarch, end);
+	  record_block_range (block, start, end - 1);
+	});
     }
 }
 
@@ -12318,7 +12593,6 @@ dwarf2_record_block_ranges (struct die_i
 static void
 check_producer (struct dwarf2_cu *cu)
 {
-  const char *cs;
   int major, minor;
 
   if (cu->producer == NULL)
@@ -12439,7 +12713,7 @@ dwarf2_add_field (struct field_info *fip
   const char *fieldname = "";
 
   /* Allocate a new field list entry and link it in.  */
-  new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield));
+  new_field = XNEW (struct nextfield);
   make_cleanup (xfree, new_field);
   memset (new_field, 0, sizeof (struct nextfield));
 
@@ -12541,6 +12815,10 @@ dwarf2_add_field (struct field_info *fip
 				 - bit_offset - FIELD_BITSIZE (*fp)));
 	    }
 	}
+      attr = dwarf2_attr (die, DW_AT_data_bit_offset, cu);
+      if (attr != NULL)
+	SET_FIELD_BITPOS (*fp, (FIELD_BITPOS (*fp)
+				+ dwarf2_get_attr_constant_value (attr, 0)));
 
       /* Get name of field.  */
       fieldname = dwarf2_name (die, cu);
@@ -12618,14 +12896,11 @@ static void
 dwarf2_add_typedef (struct field_info *fip, struct die_info *die,
 		    struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
   struct typedef_field_list *new_field;
-  struct attribute *attr;
   struct typedef_field *fp;
-  char *fieldname = "";
 
   /* Allocate a new field list entry and link it in.  */
-  new_field = xzalloc (sizeof (*new_field));
+  new_field = XCNEW (struct typedef_field_list);
   make_cleanup (xfree, new_field);
 
   gdb_assert (die->tag == DW_TAG_typedef);
@@ -12684,7 +12959,7 @@ dwarf2_attach_fields_to_type (struct fie
       unsigned char *pointer;
 
       ALLOCATE_CPLUS_STRUCT_TYPE (type);
-      pointer = TYPE_ALLOC (type, num_bytes);
+      pointer = (unsigned char *) TYPE_ALLOC (type, num_bytes);
       TYPE_FIELD_VIRTUAL_BITS (type) = pointer;
       B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses);
       TYPE_N_BASECLASSES (type) = fip->nbaseclasses;
@@ -12829,7 +13104,7 @@ dwarf2_add_member_fn (struct field_info 
 
   /* Create a new member function field and chain it to the field list
      entry.  */
-  new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield));
+  new_fnfield = XNEW (struct nextfnfield);
   make_cleanup (xfree, new_fnfield);
   memset (new_fnfield, 0, sizeof (struct nextfnfield));
   new_fnfield->next = flp->head;
@@ -12840,7 +13115,7 @@ dwarf2_add_member_fn (struct field_info 
   fnp = &new_fnfield->fnfield;
 
   /* Delay processing of the physname until later.  */
-  if (cu->language == language_cplus || cu->language == language_java)
+  if (cu->language == language_cplus)
     {
       add_to_method_list (type, i, flp->length - 1, fieldname,
 			  die, cu);
@@ -12888,7 +13163,7 @@ dwarf2_add_member_fn (struct field_info 
   /* Get accessibility.  */
   attr = dwarf2_attr (die, DW_AT_accessibility, cu);
   if (attr)
-    accessibility = DW_UNSND (attr);
+    accessibility = (enum dwarf_access_attribute) DW_UNSND (attr);
   else
     accessibility = dwarf2_default_access_attribute (die, cu);
   switch (accessibility)
@@ -12929,13 +13204,6 @@ dwarf2_add_member_fn (struct field_info 
 		       && DW_BLOCK (attr)->data[0] == DW_OP_deref_size
 		       && DW_BLOCK (attr)->data[1] == cu->header.addr_size))
 	    {
-	      struct dwarf_block blk;
-	      int offset;
-
-	      offset = (DW_BLOCK (attr)->data[0] == DW_OP_deref
-			? 1 : 2);
-	      blk.size = DW_BLOCK (attr)->size - offset;
-	      blk.data = DW_BLOCK (attr)->data + offset;
 	      fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu);
 	      if ((fnp->voffset % cu->header.addr_size) != 0)
 		dwarf2_complex_location_expr_complaint ();
@@ -13033,11 +13301,8 @@ is_vtable_name (const char *name, struct
   static const char vptr[] = "_vptr";
   static const char vtable[] = "vtable";
 
-  /* Look for the C++ and Java forms of the vtable.  */
-  if ((cu->language == language_java
-       && startswith (name, vtable))
-       || (startswith (name, vptr)
-       && is_cplus_marker (name[sizeof (vptr) - 1])))
+  /* Look for the C++ form of the vtable.  */
+  if (startswith (name, vptr) && is_cplus_marker (name[sizeof (vptr) - 1]))
     return 1;
 
   return 0;
@@ -13140,7 +13405,8 @@ read_structure_type (struct die_info *di
   if (name != NULL)
     {
       if (cu->language == language_cplus
-	  || cu->language == language_java)
+	  || cu->language == language_d
+	  || cu->language == language_rust)
 	{
 	  const char *full_name = dwarf2_full_name (name, die, cu);
 
@@ -13183,7 +13449,20 @@ read_structure_type (struct die_info *di
   attr = dwarf2_attr (die, DW_AT_byte_size, cu);
   if (attr)
     {
-      TYPE_LENGTH (type) = DW_UNSND (attr);
+      if (attr_form_is_constant (attr))
+        TYPE_LENGTH (type) = DW_UNSND (attr);
+      else
+	{
+	  /* For the moment, dynamic type sizes are not supported
+	     by GDB's struct type.  The actual size is determined
+	     on-demand when resolving the type of a given object,
+	     so set the type's length to zero for now.  Otherwise,
+	     we record an expression as the length, and that expression
+	     could lead to a very large value, which could eventually
+	     lead to us trying to allocate that much memory when creating
+	     a value of that type.  */
+          TYPE_LENGTH (type) = 0;
+	}
     }
   else
     {
@@ -13256,8 +13535,16 @@ process_structure_scope (struct die_info
 	    }
 	  else if (child_die->tag == DW_TAG_subprogram)
 	    {
-	      /* C++ member function.  */
-	      dwarf2_add_member_fn (&fi, child_die, type, cu);
+	      /* Rust doesn't have member functions in the C++ sense.
+		 However, it does emit ordinary functions as children
+		 of a struct DIE.  */
+	      if (cu->language == language_rust)
+		read_func_scope (child_die, cu);
+	      else
+		{
+		  /* C++ member function.  */
+		  dwarf2_add_member_fn (&fi, child_die, type, cu);
+		}
 	    }
 	  else if (child_die->tag == DW_TAG_inheritance)
 	    {
@@ -13285,9 +13572,9 @@ process_structure_scope (struct die_info
 	  TYPE_N_TEMPLATE_ARGUMENTS (type)
 	    = VEC_length (symbolp, template_args);
 	  TYPE_TEMPLATE_ARGUMENTS (type)
-	    = obstack_alloc (&objfile->objfile_obstack,
-			     (TYPE_N_TEMPLATE_ARGUMENTS (type)
-			      * sizeof (struct symbol *)));
+	    = XOBNEWVEC (&objfile->objfile_obstack,
+			 struct symbol *,
+			 TYPE_N_TEMPLATE_ARGUMENTS (type));
 	  memcpy (TYPE_TEMPLATE_ARGUMENTS (type),
 		  VEC_address (symbolp, template_args),
 		  (TYPE_N_TEMPLATE_ARGUMENTS (type)
@@ -13374,7 +13661,8 @@ process_structure_scope (struct die_info
 
 	  ALLOCATE_CPLUS_STRUCT_TYPE (type);
 	  TYPE_TYPEDEF_FIELD_ARRAY (type)
-	    = TYPE_ALLOC (type, sizeof (TYPE_TYPEDEF_FIELD (type, 0)) * i);
+	    = ((struct typedef_field *)
+	       TYPE_ALLOC (type, sizeof (TYPE_TYPEDEF_FIELD (type, 0)) * i));
 	  TYPE_TYPEDEF_FIELD_COUNT (type) = i;
 
 	  /* Reverse the list order to keep the debug info elements order.  */
@@ -13390,9 +13678,6 @@ process_structure_scope (struct die_info
 	}
 
       do_cleanups (back_to);
-
-      if (HAVE_CPLUS_STRUCT (type))
-	TYPE_CPLUS_REALLY_JAVA (type) = cu->language == language_java;
     }
 
   quirk_gcc_member_function_pointer (type, objfile);
@@ -13802,7 +14087,8 @@ read_array_order (struct die_info *die, 
 
   attr = dwarf2_attr (die, DW_AT_ordering, cu);
 
-  if (attr) return DW_SND (attr);
+  if (attr)
+    return (enum dwarf_array_dim_ordering) DW_SND (attr);
 
   /* GNU F77 is a special case, as at 08/2004 array type info is the
      opposite order to the dwarf2 specification, but data is still
@@ -13880,8 +14166,7 @@ mark_common_block_symbol_computed (struc
   gdb_assert (attr_form_is_block (member_loc)
 	      || attr_form_is_constant (member_loc));
 
-  baton = obstack_alloc (&objfile->objfile_obstack,
-			 sizeof (struct dwarf2_locexpr_baton));
+  baton = XOBNEW (&objfile->objfile_obstack, struct dwarf2_locexpr_baton);
   baton->per_cu = cu->per_cu;
   gdb_assert (baton->per_cu);
 
@@ -13895,7 +14180,7 @@ mark_common_block_symbol_computed (struc
   else
     baton->size += DW_BLOCK (member_loc)->size;
 
-  ptr = obstack_alloc (&objfile->objfile_obstack, baton->size);
+  ptr = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, baton->size);
   baton->data = ptr;
 
   *ptr++ = DW_OP_call4;
@@ -13971,7 +14256,9 @@ read_common_block (struct die_info *die,
 
       size = (sizeof (struct common_block)
 	      + (n_entries - 1) * sizeof (struct symbol *));
-      common_block = obstack_alloc (&objfile->objfile_obstack, size);
+      common_block
+	= (struct common_block *) obstack_alloc (&objfile->objfile_obstack,
+						 size);
       memset (common_block->contents, 0, n_entries * sizeof (struct symbol *));
       common_block->n_entries = 0;
 
@@ -14057,15 +14344,13 @@ read_namespace_type (struct die_info *di
 			    previous_prefix, name, 0, cu);
 
   /* Create the type.  */
-  type = init_type (TYPE_CODE_NAMESPACE, 0, 0, NULL,
-		    objfile);
-  TYPE_NAME (type) = name;
+  type = init_type (objfile, TYPE_CODE_NAMESPACE, 0, name);
   TYPE_TAG_NAME (type) = TYPE_NAME (type);
 
   return set_die_type (die, type, cu);
 }
 
-/* Read a C++ namespace.  */
+/* Read a namespace scope.  */
 
 static void
 read_namespace (struct die_info *die, struct dwarf2_cu *cu)
@@ -14089,8 +14374,9 @@ read_namespace (struct die_info *die, st
 	{
 	  const char *previous_prefix = determine_prefix (die, cu);
 
-	  cp_add_using_directive (previous_prefix, TYPE_NAME (type), NULL,
-				  NULL, NULL, 0, &objfile->objfile_obstack);
+	  add_using_directive (using_directives (cu->language),
+			       previous_prefix, TYPE_NAME (type), NULL,
+			       NULL, NULL, 0, &objfile->objfile_obstack);
 	}
     }
 
@@ -14122,7 +14408,7 @@ read_module_type (struct die_info *die, 
     complaint (&symfile_complaints,
 	       _("DW_TAG_module has no name, offset 0x%x"),
                die->offset.sect_off);
-  type = init_type (TYPE_CODE_MODULE, 0, 0, module_name, objfile);
+  type = init_type (objfile, TYPE_CODE_MODULE, 0, module_name);
 
   /* determine_prefix uses TYPE_TAG_NAME.  */
   TYPE_TAG_NAME (type) = TYPE_NAME (type);
@@ -14166,10 +14452,8 @@ namespace_name (struct die_info *die, in
     {
       /* We don't use dwarf2_name here so that we can detect the absence
 	 of a name -> anonymous namespace.  */
-      struct attribute *attr = dwarf2_attr (die, DW_AT_name, cu);
+      name = dwarf2_string_attr (die, DW_AT_name, cu);
 
-      if (attr != NULL)
-	name = DW_STRING (attr);
       if (name != NULL)
 	break;
     }
@@ -14598,19 +14882,7 @@ read_subroutine_type (struct die_info *d
 	      if (attr)
 		TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr);
 	      else
-		{
-		  TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
-
-		  /* GCC/43521: In java, the formal parameter
-		     "this" is sometimes not marked with DW_AT_artificial.  */
-		  if (cu->language == language_java)
-		    {
-		      const char *name = dwarf2_name (child_die, cu);
-
-		      if (name && !strcmp (name, "this"))
-			TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 1;
-		    }
-		}
+		TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
 	      arg_type = die_type (child_die, cu);
 
 	      /* RealView does not mark THIS as const, which the testsuite
@@ -14662,9 +14934,8 @@ read_typedef (struct die_info *die, stru
   struct type *this_type, *target_type;
 
   name = dwarf2_full_name (NULL, die, cu);
-  this_type = init_type (TYPE_CODE_TYPEDEF, 0,
-			 TYPE_FLAG_TARGET_STUB, NULL, objfile);
-  TYPE_NAME (this_type) = name;
+  this_type = init_type (objfile, TYPE_CODE_TYPEDEF, 0, name);
+  TYPE_TARGET_STUB (this_type) = 1;
   set_die_type (die, this_type, cu);
   target_type = die_type (die, cu);
   if (target_type != this_type)
@@ -14682,6 +14953,27 @@ read_typedef (struct die_info *die, stru
   return this_type;
 }
 
+/* Allocate a floating-point type of size BITS and name NAME.  Pass NAME_HINT
+   (which may be different from NAME) to the architecture back-end to allow
+   it to guess the correct format if necessary.  */
+
+static struct type *
+dwarf2_init_float_type (struct objfile *objfile, int bits, const char *name,
+			const char *name_hint)
+{
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
+  const struct floatformat **format;
+  struct type *type;
+
+  format = gdbarch_floatformat_for_type (gdbarch, name_hint, bits);
+  if (format)
+    type = init_float_type (objfile, bits, name, format);
+  else
+    type = init_type (objfile, TYPE_CODE_ERROR, bits / TARGET_CHAR_BIT, name);
+
+  return type;
+}
+
 /* Find a representation of a given base type and install
    it in the TYPE field of the die.  */
 
@@ -14691,11 +14983,8 @@ read_base_type (struct die_info *die, st
   struct objfile *objfile = cu->objfile;
   struct type *type;
   struct attribute *attr;
-  int encoding = 0, size = 0;
+  int encoding = 0, bits = 0;
   const char *name;
-  enum type_code code = TYPE_CODE_INT;
-  int type_flags = 0;
-  struct type *target_type = NULL;
 
   attr = dwarf2_attr (die, DW_AT_encoding, cu);
   if (attr)
@@ -14705,7 +14994,7 @@ read_base_type (struct die_info *die, st
   attr = dwarf2_attr (die, DW_AT_byte_size, cu);
   if (attr)
     {
-      size = DW_UNSND (attr);
+      bits = DW_UNSND (attr) * TARGET_CHAR_BIT;
     }
   name = dwarf2_name (die, cu);
   if (!name)
@@ -14718,61 +15007,64 @@ read_base_type (struct die_info *die, st
     {
       case DW_ATE_address:
 	/* Turn DW_ATE_address into a void * pointer.  */
-	code = TYPE_CODE_PTR;
-	type_flags |= TYPE_FLAG_UNSIGNED;
-	target_type = init_type (TYPE_CODE_VOID, 1, 0, NULL, objfile);
+	type = init_type (objfile, TYPE_CODE_VOID, 1, NULL);
+	type = init_pointer_type (objfile, bits, name, type);
 	break;
       case DW_ATE_boolean:
-	code = TYPE_CODE_BOOL;
-	type_flags |= TYPE_FLAG_UNSIGNED;
+	type = init_boolean_type (objfile, bits, 1, name);
 	break;
       case DW_ATE_complex_float:
-	code = TYPE_CODE_COMPLEX;
-	target_type = init_type (TYPE_CODE_FLT, size / 2, 0, NULL, objfile);
+	type = dwarf2_init_float_type (objfile, bits / 2, NULL, name);
+	type = init_complex_type (objfile, name, type);
 	break;
       case DW_ATE_decimal_float:
-	code = TYPE_CODE_DECFLOAT;
+	type = init_decfloat_type (objfile, bits, name);
 	break;
       case DW_ATE_float:
-	code = TYPE_CODE_FLT;
+	type = dwarf2_init_float_type (objfile, bits, name, name);
 	break;
       case DW_ATE_signed:
+	type = init_integer_type (objfile, bits, 0, name);
 	break;
       case DW_ATE_unsigned:
-	type_flags |= TYPE_FLAG_UNSIGNED;
 	if (cu->language == language_fortran
 	    && name
 	    && startswith (name, "character("))
-	  code = TYPE_CODE_CHAR;
+	  type = init_character_type (objfile, bits, 1, name);
+	else
+	  type = init_integer_type (objfile, bits, 1, name);
 	break;
       case DW_ATE_signed_char:
 	if (cu->language == language_ada || cu->language == language_m2
 	    || cu->language == language_pascal
 	    || cu->language == language_fortran)
-	  code = TYPE_CODE_CHAR;
+	  type = init_character_type (objfile, bits, 0, name);
+	else
+	  type = init_integer_type (objfile, bits, 0, name);
 	break;
       case DW_ATE_unsigned_char:
 	if (cu->language == language_ada || cu->language == language_m2
 	    || cu->language == language_pascal
-	    || cu->language == language_fortran)
-	  code = TYPE_CODE_CHAR;
-	type_flags |= TYPE_FLAG_UNSIGNED;
+	    || cu->language == language_fortran
+	    || cu->language == language_rust)
+	  type = init_character_type (objfile, bits, 1, name);
+	else
+	  type = init_integer_type (objfile, bits, 1, name);
 	break;
       case DW_ATE_UTF:
 	/* We just treat this as an integer and then recognize the
 	   type by name elsewhere.  */
+	type = init_integer_type (objfile, bits, 0, name);
 	break;
 
       default:
 	complaint (&symfile_complaints, _("unsupported DW_AT_encoding: '%s'"),
 		   dwarf_type_encoding_name (encoding));
+	type = init_type (objfile, TYPE_CODE_ERROR,
+			  bits / TARGET_CHAR_BIT, name);
 	break;
     }
 
-  type = init_type (code, size, type_flags, NULL, objfile);
-  TYPE_NAME (type) = name;
-  TYPE_TARGET_TYPE (type) = target_type;
-
   if (name && strcmp (name, "char") == 0)
     TYPE_NOSIGN (type) = 1;
 
@@ -14795,7 +15087,7 @@ attr_to_dynamic_prop (const struct attri
 
   if (attr_form_is_block (attr))
     {
-      baton = obstack_alloc (obstack, sizeof (*baton));
+      baton = XOBNEW (obstack, struct dwarf2_property_baton);
       baton->referenced_type = NULL;
       baton->locexpr.per_cu = cu->per_cu;
       baton->locexpr.size = DW_BLOCK (attr)->size;
@@ -14823,7 +15115,7 @@ attr_to_dynamic_prop (const struct attri
 	  case DW_AT_location:
 	    if (attr_form_is_section_offset (target_attr))
 	      {
-		baton = obstack_alloc (obstack, sizeof (*baton));
+		baton = XOBNEW (obstack, struct dwarf2_property_baton);
 		baton->referenced_type = die_type (target_die, target_cu);
 		fill_in_loclist_baton (cu, &baton->loclist, target_attr);
 		prop->data.baton = baton;
@@ -14832,7 +15124,7 @@ attr_to_dynamic_prop (const struct attri
 	      }
 	    else if (attr_form_is_block (target_attr))
 	      {
-		baton = obstack_alloc (obstack, sizeof (*baton));
+		baton = XOBNEW (obstack, struct dwarf2_property_baton);
 		baton->referenced_type = die_type (target_die, target_cu);
 		baton->locexpr.per_cu = cu->per_cu;
 		baton->locexpr.size = DW_BLOCK (target_attr)->size;
@@ -14856,7 +15148,7 @@ attr_to_dynamic_prop (const struct attri
 						&offset))
 		return 0;
 
-	      baton = obstack_alloc (obstack, sizeof (*baton));
+	      baton = XOBNEW (obstack, struct dwarf2_property_baton);
 	      baton->referenced_type = read_type_die (target_die->parent,
 						      target_cu);
 	      baton->offset_info.offset = offset;
@@ -14926,8 +15218,8 @@ read_subrange_type (struct die_info *die
       low_default_is_valid = 1;
       break;
     case language_d:
-    case language_java:
     case language_objc:
+    case language_rust:
       low.data.const_val = 0;
       low_default_is_valid = (cu->header.version >= 4);
       break;
@@ -15011,7 +15303,7 @@ read_subrange_type (struct die_info *die
      the bounds as signed, and thus sign-extend their values, when
      the base type is signed.  */
   negative_mask =
-    (LONGEST) -1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1);
+    -((LONGEST) 1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1));
   if (low.kind == PROP_CONST
       && !TYPE_UNSIGNED (base_type) && (low.data.const_val & negative_mask))
     low.data.const_val |= negative_mask;
@@ -15051,7 +15343,7 @@ read_unspecified_type (struct die_info *
 
   /* For now, we only support the C meaning of an unspecified type: void.  */
 
-  type = init_type (TYPE_CODE_VOID, 0, 0, NULL, cu->objfile);
+  type = init_type (cu->objfile, TYPE_CODE_VOID, 0, NULL);
   TYPE_NAME (type) = dwarf2_name (die, cu);
 
   return set_die_type (die, type, cu);
@@ -15253,9 +15545,9 @@ abbrev_table_alloc_abbrev (struct abbrev
 {
   struct abbrev_info *abbrev;
 
-  abbrev = (struct abbrev_info *)
-    obstack_alloc (&abbrev_table->abbrev_obstack, sizeof (struct abbrev_info));
+  abbrev = XOBNEW (&abbrev_table->abbrev_obstack, struct abbrev_info);
   memset (abbrev, 0, sizeof (struct abbrev_info));
+
   return abbrev;
 }
 
@@ -15314,9 +15606,9 @@ abbrev_table_read_table (struct dwarf2_s
   abbrev_table = XNEW (struct abbrev_table);
   abbrev_table->offset = offset;
   obstack_init (&abbrev_table->abbrev_obstack);
-  abbrev_table->abbrevs = obstack_alloc (&abbrev_table->abbrev_obstack,
-					 (ABBREV_HASH_SIZE
-					  * sizeof (struct abbrev_info *)));
+  abbrev_table->abbrevs =
+    XOBNEWVEC (&abbrev_table->abbrev_obstack, struct abbrev_info *,
+	       ABBREV_HASH_SIZE);
   memset (abbrev_table->abbrevs, 0,
 	  ABBREV_HASH_SIZE * sizeof (struct abbrev_info *));
 
@@ -15326,7 +15618,7 @@ abbrev_table_read_table (struct dwarf2_s
   abbrev_ptr += bytes_read;
 
   allocated_attrs = ATTR_ALLOC_CHUNK;
-  cur_attrs = xmalloc (allocated_attrs * sizeof (struct attr_abbrev));
+  cur_attrs = XNEWVEC (struct attr_abbrev, allocated_attrs);
 
   /* Loop until we reach an abbrev number of 0.  */
   while (abbrev_number)
@@ -15335,37 +15627,54 @@ abbrev_table_read_table (struct dwarf2_s
 
       /* read in abbrev header */
       cur_abbrev->number = abbrev_number;
-      cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+      cur_abbrev->tag
+	= (enum dwarf_tag) read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
       abbrev_ptr += bytes_read;
       cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
       abbrev_ptr += 1;
 
       /* now read in declarations */
-      abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-      abbrev_ptr += bytes_read;
-      abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-      abbrev_ptr += bytes_read;
-      while (abbrev_name)
+      for (;;)
 	{
+	  LONGEST implicit_const;
+
+	  abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+	  abbrev_ptr += bytes_read;
+	  abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+	  abbrev_ptr += bytes_read;
+	  if (abbrev_form == DW_FORM_implicit_const)
+	    {
+	      implicit_const = read_signed_leb128 (abfd, abbrev_ptr,
+						   &bytes_read);
+	      abbrev_ptr += bytes_read;
+	    }
+	  else
+	    {
+	      /* Initialize it due to a false compiler warning.  */
+	      implicit_const = -1;
+	    }
+
+	  if (abbrev_name == 0)
+	    break;
+
 	  if (cur_abbrev->num_attrs == allocated_attrs)
 	    {
 	      allocated_attrs += ATTR_ALLOC_CHUNK;
 	      cur_attrs
-		= xrealloc (cur_attrs, (allocated_attrs
-					* sizeof (struct attr_abbrev)));
+		= XRESIZEVEC (struct attr_abbrev, cur_attrs, allocated_attrs);
 	    }
 
-	  cur_attrs[cur_abbrev->num_attrs].name = abbrev_name;
-	  cur_attrs[cur_abbrev->num_attrs++].form = abbrev_form;
-	  abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-	  abbrev_ptr += bytes_read;
-	  abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-	  abbrev_ptr += bytes_read;
+	  cur_attrs[cur_abbrev->num_attrs].name
+	    = (enum dwarf_attribute) abbrev_name;
+	  cur_attrs[cur_abbrev->num_attrs].form
+	    = (enum dwarf_form) abbrev_form;
+	  cur_attrs[cur_abbrev->num_attrs].implicit_const = implicit_const;
+	  ++cur_abbrev->num_attrs;
 	}
 
-      cur_abbrev->attrs = obstack_alloc (&abbrev_table->abbrev_obstack,
-					 (cur_abbrev->num_attrs
-					  * sizeof (struct attr_abbrev)));
+      cur_abbrev->attrs =
+	XOBNEWVEC (&abbrev_table->abbrev_obstack, struct attr_abbrev,
+		   cur_abbrev->num_attrs);
       memcpy (cur_abbrev->attrs, cur_attrs,
 	      cur_abbrev->num_attrs * sizeof (struct attr_abbrev));
 
@@ -15407,7 +15716,7 @@ abbrev_table_free (struct abbrev_table *
 static void
 abbrev_table_free_cleanup (void *table_ptr)
 {
-  struct abbrev_table **abbrev_table_ptr = table_ptr;
+  struct abbrev_table **abbrev_table_ptr = (struct abbrev_table **) table_ptr;
 
   if (*abbrev_table_ptr != NULL)
     abbrev_table_free (*abbrev_table_ptr);
@@ -15429,7 +15738,7 @@ dwarf2_read_abbrevs (struct dwarf2_cu *c
 static void
 dwarf2_free_abbrev_table (void *ptr_to_cu)
 {
-  struct dwarf2_cu *cu = ptr_to_cu;
+  struct dwarf2_cu *cu = (struct dwarf2_cu *) ptr_to_cu;
 
   if (cu->abbrev_table != NULL)
     abbrev_table_free (cu->abbrev_table);
@@ -15501,8 +15810,7 @@ load_partial_dies (const struct die_read
 			    hashtab_obstack_allocate,
 			    dummy_obstack_deallocate);
 
-  part_die = obstack_alloc (&cu->comp_unit_obstack,
-			    sizeof (struct partial_die_info));
+  part_die = XOBNEW (&cu->comp_unit_obstack, struct partial_die_info);
 
   while (1)
     {
@@ -15607,7 +15915,7 @@ load_partial_dies (const struct die_read
 	    add_psymbol_to_list (part_die->name, strlen (part_die->name), 0,
 				 VAR_DOMAIN, LOC_TYPEDEF,
 				 &objfile->static_psymbols,
-				 0, (CORE_ADDR) 0, cu->language, objfile);
+				 0, cu->language, objfile);
 	  info_ptr = locate_pdi_sibling (reader, part_die, info_ptr);
 	  continue;
 	}
@@ -15642,11 +15950,10 @@ load_partial_dies (const struct die_read
 	  else if (building_psymtab)
 	    add_psymbol_to_list (part_die->name, strlen (part_die->name), 0,
 				 VAR_DOMAIN, LOC_CONST,
-				 (cu->language == language_cplus
-				  || cu->language == language_java)
+				 cu->language == language_cplus
 				 ? &objfile->global_psymbols
 				 : &objfile->static_psymbols,
-				 0, (CORE_ADDR) 0, cu->language, objfile);
+				 0, cu->language, objfile);
 
 	  info_ptr = locate_pdi_sibling (reader, part_die, info_ptr);
 	  continue;
@@ -15702,8 +16009,7 @@ load_partial_dies (const struct die_read
 	  *slot = part_die;
 	}
 
-      part_die = obstack_alloc (&cu->comp_unit_obstack,
-				sizeof (struct partial_die_info));
+      part_die = XOBNEW (&cu->comp_unit_obstack, struct partial_die_info);
 
       /* For some DIEs we want to follow their children (if any).  For C
 	 we have no reason to follow the children of structures; for other
@@ -15889,18 +16195,18 @@ read_partial_die (const struct die_reade
 	     to describe functions' calling conventions.
 
 	     However, because it's a necessary piece of information in
-	     Fortran, and because DW_CC_program is the only piece of debugging
-	     information whose definition refers to a 'main program' at all,
-	     several compilers have begun marking Fortran main programs with
-	     DW_CC_program --- even when those functions use the standard
-	     calling conventions.
-
-	     So until DWARF specifies a way to provide this information and
-	     compilers pick up the new representation, we'll support this
-	     practice.  */
+	     Fortran, and before DWARF 4 DW_CC_program was the only
+	     piece of debugging information whose definition refers to
+	     a 'main program' at all, several compilers marked Fortran
+	     main programs with DW_CC_program --- even when those
+	     functions use the standard calling conventions.
+
+	     Although DWARF now specifies a way to provide this
+	     information, we support this practice for backward
+	     compatibility.  */
 	  if (DW_UNSND (&attr) == DW_CC_program
 	      && cu->language == language_fortran)
-	    set_objfile_main_name (objfile, part_die->name, language_fortran);
+	    part_die->main_subprogram = 1;
 	  break;
 	case DW_AT_inline:
 	  if (DW_UNSND (&attr) == DW_INL_inlined
@@ -15917,6 +16223,10 @@ read_partial_die (const struct die_reade
 	    }
 	  break;
 
+	case DW_AT_main_subprogram:
+	  part_die->main_subprogram = DW_UNSND (&attr);
+	  break;
+
 	default:
 	  break;
 	}
@@ -15973,8 +16283,9 @@ find_partial_die_in_comp_unit (sect_offs
   struct partial_die_info part_die;
 
   part_die.offset = offset;
-  lookup_die = htab_find_with_hash (cu->partial_dies, &part_die,
-				    offset.sect_off);
+  lookup_die = ((struct partial_die_info *)
+		htab_find_with_hash (cu->partial_dies, &part_die,
+				     offset.sect_off));
 
   return lookup_die;
 }
@@ -16089,9 +16400,10 @@ guess_partial_die_structure_name (struct
 	  if (actual_class_name != NULL)
 	    {
 	      struct_pdi->name
-		= obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
-				 actual_class_name,
-				 strlen (actual_class_name));
+		= ((const char *)
+		   obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
+				  actual_class_name,
+				  strlen (actual_class_name)));
 	      xfree (actual_class_name);
 	    }
 	  break;
@@ -16176,8 +16488,9 @@ fixup_partial_die (struct partial_die_in
 	    base = demangled;
 
 	  part_die->name
-	    = obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
-			     base, strlen (base));
+	    = ((const char *)
+	       obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
+			      base, strlen (base)));
 	  xfree (demangled);
 	}
     }
@@ -16190,7 +16503,7 @@ fixup_partial_die (struct partial_die_in
 static const gdb_byte *
 read_attribute_value (const struct die_reader_specs *reader,
 		      struct attribute *attr, unsigned form,
-		      const gdb_byte *info_ptr)
+		      LONGEST implicit_const, const gdb_byte *info_ptr)
 {
   struct dwarf2_cu *cu = reader->cu;
   struct objfile *objfile = cu->objfile;
@@ -16200,7 +16513,7 @@ read_attribute_value (const struct die_r
   unsigned int bytes_read;
   struct dwarf_block *blk;
 
-  attr->form = form;
+  attr->form = (enum dwarf_form) form;
   switch (form)
     {
     case DW_FORM_ref_addr:
@@ -16248,6 +16561,13 @@ read_attribute_value (const struct die_r
       DW_UNSND (attr) = read_8_bytes (abfd, info_ptr);
       info_ptr += 8;
       break;
+    case DW_FORM_data16:
+      blk = dwarf_alloc_block (cu);
+      blk->size = 16;
+      blk->data = read_n_bytes (abfd, info_ptr, 16);
+      info_ptr += 16;
+      DW_BLOCK (attr) = blk;
+      break;
     case DW_FORM_sec_offset:
       DW_UNSND (attr) = read_offset (abfd, info_ptr, &cu->header, &bytes_read);
       info_ptr += bytes_read;
@@ -16267,6 +16587,16 @@ read_attribute_value (const struct die_r
 	  break;
 	}
       /* FALLTHROUGH */
+    case DW_FORM_line_strp:
+      if (!cu->per_cu->is_dwz)
+	{
+	  DW_STRING (attr) = read_indirect_line_string (abfd, info_ptr,
+							cu_header, &bytes_read);
+	  DW_STRING_IS_CANONICAL (attr) = 0;
+	  info_ptr += bytes_read;
+	  break;
+	}
+      /* FALLTHROUGH */
     case DW_FORM_GNU_strp_alt:
       {
 	struct dwz_file *dwz = dwarf2_get_dwz_file ();
@@ -16346,7 +16676,16 @@ read_attribute_value (const struct die_r
     case DW_FORM_indirect:
       form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;
-      info_ptr = read_attribute_value (reader, attr, form, info_ptr);
+      if (form == DW_FORM_implicit_const)
+	{
+	  implicit_const = read_signed_leb128 (abfd, info_ptr, &bytes_read);
+	  info_ptr += bytes_read;
+	}
+      info_ptr = read_attribute_value (reader, attr, form, implicit_const,
+				       info_ptr);
+      break;
+    case DW_FORM_implicit_const:
+      DW_SND (attr) = implicit_const;
       break;
     case DW_FORM_GNU_addr_index:
       if (reader->dwo_file == NULL)
@@ -16416,7 +16755,8 @@ read_attribute (const struct die_reader_
 		const gdb_byte *info_ptr)
 {
   attr->name = abbrev->name;
-  return read_attribute_value (reader, attr, abbrev->form, info_ptr);
+  return read_attribute_value (reader, attr, abbrev->form,
+			       abbrev->implicit_const, info_ptr);
 }
 
 /* Read dwarf information from a buffer.  */
@@ -16669,21 +17009,47 @@ read_direct_string (bfd *abfd, const gdb
   return (const char *) buf;
 }
 
+/* Return pointer to string at section SECT offset STR_OFFSET with error
+   reporting strings FORM_NAME and SECT_NAME.  */
+
 static const char *
-read_indirect_string_at_offset (bfd *abfd, LONGEST str_offset)
-{
-  dwarf2_read_section (dwarf2_per_objfile->objfile, &dwarf2_per_objfile->str);
-  if (dwarf2_per_objfile->str.buffer == NULL)
-    error (_("DW_FORM_strp used without .debug_str section [in module %s]"),
-	   bfd_get_filename (abfd));
-  if (str_offset >= dwarf2_per_objfile->str.size)
-    error (_("DW_FORM_strp pointing outside of "
-	     ".debug_str section [in module %s]"),
-	   bfd_get_filename (abfd));
+read_indirect_string_at_offset_from (bfd *abfd, LONGEST str_offset,
+				     struct dwarf2_section_info *sect,
+				     const char *form_name,
+				     const char *sect_name)
+{
+  dwarf2_read_section (dwarf2_per_objfile->objfile, sect);
+  if (sect->buffer == NULL)
+    error (_("%s used without %s section [in module %s]"),
+	   form_name, sect_name, bfd_get_filename (abfd));
+  if (str_offset >= sect->size)
+    error (_("%s pointing outside of %s section [in module %s]"),
+	   form_name, sect_name, bfd_get_filename (abfd));
   gdb_assert (HOST_CHAR_BIT == 8);
-  if (dwarf2_per_objfile->str.buffer[str_offset] == '\0')
+  if (sect->buffer[str_offset] == '\0')
     return NULL;
-  return (const char *) (dwarf2_per_objfile->str.buffer + str_offset);
+  return (const char *) (sect->buffer + str_offset);
+}
+
+/* Return pointer to string at .debug_str offset STR_OFFSET.  */
+
+static const char *
+read_indirect_string_at_offset (bfd *abfd, LONGEST str_offset)
+{
+  return read_indirect_string_at_offset_from (abfd, str_offset,
+					      &dwarf2_per_objfile->str,
+					      "DW_FORM_strp", ".debug_str");
+}
+
+/* Return pointer to string at .debug_line_str offset STR_OFFSET.  */
+
+static const char *
+read_indirect_line_string_at_offset (bfd *abfd, LONGEST str_offset)
+{
+  return read_indirect_string_at_offset_from (abfd, str_offset,
+					      &dwarf2_per_objfile->line_str,
+					      "DW_FORM_line_strp",
+					      ".debug_line_str");
 }
 
 /* Read a string at offset STR_OFFSET in the .debug_str section from
@@ -16710,6 +17076,10 @@ read_indirect_string_from_dwz (struct dw
   return (const char *) (dwz->str.buffer + str_offset);
 }
 
+/* Return pointer to string at .debug_str offset as read from BUF.
+   BUF is assumed to be in a compilation unit described by CU_HEADER.
+   Return *BYTES_READ_PTR count of bytes read from BUF.  */
+
 static const char *
 read_indirect_string (bfd *abfd, const gdb_byte *buf,
 		      const struct comp_unit_head *cu_header,
@@ -16720,19 +17090,32 @@ read_indirect_string (bfd *abfd, const g
   return read_indirect_string_at_offset (abfd, str_offset);
 }
 
-static ULONGEST
+/* Return pointer to string at .debug_line_str offset as read from BUF.
+   BUF is assumed to be in a compilation unit described by CU_HEADER.
+   Return *BYTES_READ_PTR count of bytes read from BUF.  */
+
+static const char *
+read_indirect_line_string (bfd *abfd, const gdb_byte *buf,
+			   const struct comp_unit_head *cu_header,
+			   unsigned int *bytes_read_ptr)
+{
+  LONGEST str_offset = read_offset (abfd, buf, cu_header, bytes_read_ptr);
+
+  return read_indirect_line_string_at_offset (abfd, str_offset);
+}
+
+ULONGEST
 read_unsigned_leb128 (bfd *abfd, const gdb_byte *buf,
-		      unsigned int *bytes_read_ptr)
+			  unsigned int *bytes_read_ptr)
 {
   ULONGEST result;
   unsigned int num_read;
-  int i, shift;
+  int shift;
   unsigned char byte;
 
   result = 0;
   shift = 0;
   num_read = 0;
-  i = 0;
   while (1)
     {
       byte = bfd_get_8 (abfd, buf);
@@ -16754,13 +17137,12 @@ read_signed_leb128 (bfd *abfd, const gdb
 		    unsigned int *bytes_read_ptr)
 {
   LONGEST result;
-  int i, shift, num_read;
+  int shift, num_read;
   unsigned char byte;
 
   result = 0;
   shift = 0;
   num_read = 0;
-  i = 0;
   while (1)
     {
       byte = bfd_get_8 (abfd, buf);
@@ -16977,6 +17359,7 @@ set_cu_language (unsigned int lang, stru
     case DW_LANG_UPC:
       cu->language = language_c;
       break;
+    case DW_LANG_Java:
     case DW_LANG_C_plus_plus:
     case DW_LANG_C_plus_plus_11:
     case DW_LANG_C_plus_plus_14:
@@ -16998,9 +17381,6 @@ set_cu_language (unsigned int lang, stru
     case DW_LANG_Mips_Assembler:
       cu->language = language_asm;
       break;
-    case DW_LANG_Java:
-      cu->language = language_java;
-      break;
     case DW_LANG_Ada83:
     case DW_LANG_Ada95:
       cu->language = language_ada;
@@ -17014,6 +17394,10 @@ set_cu_language (unsigned int lang, stru
     case DW_LANG_ObjC:
       cu->language = language_objc;
       break;
+    case DW_LANG_Rust:
+    case DW_LANG_Rust_old:
+      cu->language = language_rust;
+      break;
     case DW_LANG_Cobol74:
     case DW_LANG_Cobol85:
     default:
@@ -17069,6 +17453,33 @@ dwarf2_attr_no_follow (struct die_info *
   return NULL;
 }
 
+/* Return the string associated with a string-typed attribute, or NULL if it
+   is either not found or is of an incorrect type.  */
+
+static const char *
+dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu)
+{
+  struct attribute *attr;
+  const char *str = NULL;
+
+  attr = dwarf2_attr (die, name, cu);
+
+  if (attr != NULL)
+    {
+      if (attr->form == DW_FORM_strp || attr->form == DW_FORM_line_strp
+	  || attr->form == DW_FORM_string || attr->form == DW_FORM_GNU_strp_alt)
+	str = DW_STRING (attr);
+      else
+        complaint (&symfile_complaints,
+	           _("string type expected for attribute %s for "
+		     "DIE at 0x%x in module %s"),
+		   dwarf_attr_name (name), die->offset.sect_off,
+		   objfile_name (cu->objfile));
+    }
+
+  return str;
+}
+
 /* Return non-zero iff the attribute NAME is defined for the given DIE,
    and holds a non-zero value.  This function should only be used for
    DW_FORM_flag or DW_FORM_flag_present attributes.  */
@@ -17143,7 +17554,7 @@ free_line_header (struct line_header *lh
 static void
 free_line_header_voidp (void *arg)
 {
-  struct line_header *lh = arg;
+  struct line_header *lh = (struct line_header *) arg;
 
   free_line_header (lh);
 }
@@ -17161,15 +17572,13 @@ add_include_dir (struct line_header *lh,
   if (lh->include_dirs_size == 0)
     {
       lh->include_dirs_size = 1; /* for testing */
-      lh->include_dirs = xmalloc (lh->include_dirs_size
-                                  * sizeof (*lh->include_dirs));
+      lh->include_dirs = XNEWVEC (const char *, lh->include_dirs_size);
     }
   else if (lh->num_include_dirs >= lh->include_dirs_size)
     {
       lh->include_dirs_size *= 2;
-      lh->include_dirs = xrealloc (lh->include_dirs,
-                                   (lh->include_dirs_size
-                                    * sizeof (*lh->include_dirs)));
+      lh->include_dirs = XRESIZEVEC (const char *, lh->include_dirs,
+				     lh->include_dirs_size);
     }
 
   lh->include_dirs[lh->num_include_dirs++] = include_dir;
@@ -17194,15 +17603,13 @@ add_file_name (struct line_header *lh,
   if (lh->file_names_size == 0)
     {
       lh->file_names_size = 1; /* for testing */
-      lh->file_names = xmalloc (lh->file_names_size
-                                * sizeof (*lh->file_names));
+      lh->file_names = XNEWVEC (struct file_entry, lh->file_names_size);
     }
   else if (lh->num_file_names >= lh->file_names_size)
     {
       lh->file_names_size *= 2;
-      lh->file_names = xrealloc (lh->file_names,
-                                 (lh->file_names_size
-                                  * sizeof (*lh->file_names)));
+      lh->file_names
+	= XRESIZEVEC (struct file_entry, lh->file_names, lh->file_names_size);
     }
 
   fe = &lh->file_names[lh->num_file_names++];
@@ -17237,6 +17644,141 @@ get_debug_line_section (struct dwarf2_cu
   return section;
 }
 
+/* Forwarding function for read_formatted_entries.  */
+
+static void
+add_include_dir_stub (struct line_header *lh, const char *name,
+		      unsigned int dir_index, unsigned int mod_time,
+		      unsigned int length)
+{
+  add_include_dir (lh, name);
+}
+
+/* Read directory or file name entry format, starting with byte of
+   format count entries, ULEB128 pairs of entry formats, ULEB128 of
+   entries count and the entries themselves in the described entry
+   format.  */
+
+static void
+read_formatted_entries (bfd *abfd, const gdb_byte **bufp,
+			struct line_header *lh,
+			const struct comp_unit_head *cu_header,
+			void (*callback) (struct line_header *lh,
+					  const char *name,
+					  unsigned int dir_index,
+					  unsigned int mod_time,
+					  unsigned int length))
+{
+  gdb_byte format_count, formati;
+  ULONGEST data_count, datai;
+  const gdb_byte *buf = *bufp;
+  const gdb_byte *format_header_data;
+  int i;
+  unsigned int bytes_read;
+
+  format_count = read_1_byte (abfd, buf);
+  buf += 1;
+  format_header_data = buf;
+  for (formati = 0; formati < format_count; formati++)
+    {
+      read_unsigned_leb128 (abfd, buf, &bytes_read);
+      buf += bytes_read;
+      read_unsigned_leb128 (abfd, buf, &bytes_read);
+      buf += bytes_read;
+    }
+
+  data_count = read_unsigned_leb128 (abfd, buf, &bytes_read);
+  buf += bytes_read;
+  for (datai = 0; datai < data_count; datai++)
+    {
+      const gdb_byte *format = format_header_data;
+      struct file_entry fe;
+
+      memset (&fe, 0, sizeof (fe));
+
+      for (formati = 0; formati < format_count; formati++)
+	{
+	  ULONGEST content_type, form;
+	  const char *string_trash;
+	  const char **stringp = &string_trash;
+	  unsigned int uint_trash, *uintp = &uint_trash;
+
+	  content_type = read_unsigned_leb128 (abfd, format, &bytes_read);
+	  format += bytes_read;
+	  switch (content_type)
+	    {
+	    case DW_LNCT_path:
+	      stringp = &fe.name;
+	      break;
+	    case DW_LNCT_directory_index:
+	      uintp = &fe.dir_index;
+	      break;
+	    case DW_LNCT_timestamp:
+	      uintp = &fe.mod_time;
+	      break;
+	    case DW_LNCT_size:
+	      uintp = &fe.length;
+	      break;
+	    case DW_LNCT_MD5:
+	      break;
+	    default:
+	      complaint (&symfile_complaints,
+			 _("Unknown format content type %s"),
+			 pulongest (content_type));
+	    }
+
+	  form = read_unsigned_leb128 (abfd, format, &bytes_read);
+	  format += bytes_read;
+	  switch (form)
+	    {
+	    case DW_FORM_string:
+	      *stringp = read_direct_string (abfd, buf, &bytes_read);
+	      buf += bytes_read;
+	      break;
+
+	    case DW_FORM_line_strp:
+	      *stringp = read_indirect_line_string (abfd, buf, cu_header, &bytes_read);
+	      buf += bytes_read;
+	      break;
+
+	    case DW_FORM_data1:
+	      *uintp = read_1_byte (abfd, buf);
+	      buf += 1;
+	      break;
+
+	    case DW_FORM_data2:
+	      *uintp = read_2_bytes (abfd, buf);
+	      buf += 2;
+	      break;
+
+	    case DW_FORM_data4:
+	      *uintp = read_4_bytes (abfd, buf);
+	      buf += 4;
+	      break;
+
+	    case DW_FORM_data8:
+	      *uintp = read_8_bytes (abfd, buf);
+	      buf += 8;
+	      break;
+
+	    case DW_FORM_udata:
+	      *uintp = read_unsigned_leb128 (abfd, buf, &bytes_read);
+	      buf += bytes_read;
+	      break;
+
+	    case DW_FORM_block:
+	      /* It is valid only for DW_LNCT_timestamp which is ignored by
+		 current GDB.  */
+	      break;
+	    }
+	}
+
+      callback (lh, fe.name, fe.dir_index, fe.mod_time, fe.length);
+    }
+
+  *bufp = buf;
+}
+
 /* Read the statement program header starting at OFFSET in
    .debug_line, or .debug_line.dwo.  Return a pointer
    to a struct line_header, allocated using xmalloc.
@@ -17282,7 +17824,7 @@ dwarf_decode_line_header (unsigned int o
       return 0;
     }
 
-  lh = xmalloc (sizeof (*lh));
+  lh = XNEW (struct line_header);
   memset (lh, 0, sizeof (*lh));
   back_to = make_cleanup ((make_cleanup_ftype *) free_line_header,
                           (void *) lh);
@@ -17306,7 +17848,7 @@ dwarf_decode_line_header (unsigned int o
   lh->statement_program_end = line_ptr + lh->total_length;
   lh->version = read_2_bytes (abfd, line_ptr);
   line_ptr += 2;
-  if (lh->version > 4)
+  if (lh->version > 5)
     {
       /* This is a version we don't understand.  The format could have
 	 changed in ways we don't handle properly so just punt.  */
@@ -17314,6 +17856,25 @@ dwarf_decode_line_header (unsigned int o
 		 _("unsupported version in .debug_line section"));
       return NULL;
     }
+  if (lh->version >= 5)
+    {
+      gdb_byte segment_selector_size;
+
+      /* Skip address size.  */
+      read_1_byte (abfd, line_ptr);
+      line_ptr += 1;
+
+      segment_selector_size = read_1_byte (abfd, line_ptr);
+      line_ptr += 1;
+      if (segment_selector_size != 0)
+	{
+	  complaint (&symfile_complaints,
+		     _("unsupported segment selector size %u "
+		       "in .debug_line section"),
+		     segment_selector_size);
+	  return NULL;
+	}
+    }
   lh->header_length = read_offset_1 (abfd, line_ptr, offset_size);
   line_ptr += offset_size;
   lh->minimum_instruction_length = read_1_byte (abfd, line_ptr);
@@ -17342,8 +17903,7 @@ dwarf_decode_line_header (unsigned int o
   line_ptr += 1;
   lh->opcode_base = read_1_byte (abfd, line_ptr);
   line_ptr += 1;
-  lh->standard_opcode_lengths
-    = xmalloc (lh->opcode_base * sizeof (lh->standard_opcode_lengths[0]));
+  lh->standard_opcode_lengths = XNEWVEC (unsigned char, lh->opcode_base);
 
   lh->standard_opcode_lengths[0] = 1;  /* This should never be used anyway.  */
   for (i = 1; i < lh->opcode_base; ++i)
@@ -17352,30 +17912,42 @@ dwarf_decode_line_header (unsigned int o
       line_ptr += 1;
     }
 
-  /* Read directory table.  */
-  while ((cur_dir = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
+  if (lh->version >= 5)
     {
-      line_ptr += bytes_read;
-      add_include_dir (lh, cur_dir);
-    }
-  line_ptr += bytes_read;
+      /* Read directory table.  */
+      read_formatted_entries (abfd, &line_ptr, lh, &cu->header,
+			      add_include_dir_stub);
 
-  /* Read file name table.  */
-  while ((cur_file = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
+      /* Read file name table.  */
+      read_formatted_entries (abfd, &line_ptr, lh, &cu->header, add_file_name);
+    }
+  else
     {
-      unsigned int dir_index, mod_time, length;
-
-      line_ptr += bytes_read;
-      dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
-      line_ptr += bytes_read;
-      mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
-      line_ptr += bytes_read;
-      length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+      /* Read directory table.  */
+      while ((cur_dir = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
+	{
+	  line_ptr += bytes_read;
+	  add_include_dir (lh, cur_dir);
+	}
       line_ptr += bytes_read;
 
-      add_file_name (lh, cur_file, dir_index, mod_time, length);
+      /* Read file name table.  */
+      while ((cur_file = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
+	{
+	  unsigned int dir_index, mod_time, length;
+
+	  line_ptr += bytes_read;
+	  dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+	  line_ptr += bytes_read;
+	  mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+	  line_ptr += bytes_read;
+	  length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+	  line_ptr += bytes_read;
+
+	  add_file_name (lh, cur_file, dir_index, mod_time, length);
+	}
+      line_ptr += bytes_read;
     }
-  line_ptr += bytes_read;
   lh->statement_program_start = line_ptr;
 
   if (line_ptr > (section->buffer + section->size))
@@ -18443,7 +19015,7 @@ new_symbol_full (struct die_info *die, s
 		  if (cu->language == language_fortran && die->parent
 		      && die->parent->tag == DW_TAG_module
 		      && cu->producer
-		      && startswith (cu->producer, "GNU Fortran "))
+		      && startswith (cu->producer, "GNU Fortran"))
 		    SYMBOL_ACLASS_INDEX (sym) = LOC_UNRESOLVED;
 
 		  /* A variable with DW_AT_external is never static,
@@ -18533,7 +19105,7 @@ new_symbol_full (struct die_info *die, s
 	  SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
 
 	  {
-	    /* NOTE: carlton/2003-11-10: C++ and Java class symbols shouldn't
+	    /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't
 	       really ever be static objects: otherwise, if you try
 	       to, say, break of a class's method and you're in a file
 	       which doesn't mention that class, it won't work unless
@@ -18544,17 +19116,15 @@ new_symbol_full (struct die_info *die, s
 	    if (!suppress_add)
 	      {
 		list_to_add = (cu->list_in_scope == &file_symbols
-			       && (cu->language == language_cplus
-				   || cu->language == language_java)
+			       && cu->language == language_cplus
 			       ? &global_symbols : cu->list_in_scope);
 
 		/* The semantics of C++ state that "struct foo {
-		   ... }" also defines a typedef for "foo".  A Java
-		   class declaration also defines a typedef for the
-		   class.  */
+		   ... }" also defines a typedef for "foo".  */
 		if (cu->language == language_cplus
-		    || cu->language == language_java
-		    || cu->language == language_ada)
+		    || cu->language == language_ada
+		    || cu->language == language_d
+		    || cu->language == language_rust)
 		  {
 		    /* The symbol's name is already allocated along
 		       with this objfile, so we don't need to
@@ -18587,8 +19157,7 @@ new_symbol_full (struct die_info *die, s
 	       DW_TAG_class_type, etc. block.  */
 
 	    list_to_add = (cu->list_in_scope == &file_symbols
-			   && (cu->language == language_cplus
-			       || cu->language == language_java)
+			   && cu->language == language_cplus
 			   ? &global_symbols : cu->list_in_scope);
 	  }
 	  break;
@@ -18670,7 +19239,7 @@ dwarf2_const_value_data (const struct at
     *value = l;
   else
     {
-      gdb_byte *bytes = obstack_alloc (obstack, bits / 8);
+      gdb_byte *bytes = (gdb_byte *) obstack_alloc (obstack, bits / 8);
       store_unsigned_integer (bytes, bits / 8, byte_order, l);
       return bytes;
     }
@@ -18715,12 +19284,12 @@ dwarf2_const_value_attr (const struct at
 	/* Symbols of this form are reasonably rare, so we just
 	   piggyback on the existing location code rather than writing
 	   a new implementation of symbol_computed_ops.  */
-	*baton = obstack_alloc (obstack, sizeof (struct dwarf2_locexpr_baton));
+	*baton = XOBNEW (obstack, struct dwarf2_locexpr_baton);
 	(*baton)->per_cu = cu->per_cu;
 	gdb_assert ((*baton)->per_cu);
 
 	(*baton)->size = 2 + cu_header->addr_size;
-	data = obstack_alloc (obstack, (*baton)->size);
+	data = (gdb_byte *) obstack_alloc (obstack, (*baton)->size);
 	(*baton)->data = data;
 
 	data[0] = DW_OP_addr;
@@ -18742,6 +19311,7 @@ dwarf2_const_value_attr (const struct at
     case DW_FORM_block4:
     case DW_FORM_block:
     case DW_FORM_exprloc:
+    case DW_FORM_data16:
       blk = DW_BLOCK (attr);
       if (TYPE_LENGTH (type) != blk->size)
 	dwarf2_const_value_length_mismatch_complaint (name, blk->size,
@@ -18792,7 +19362,6 @@ dwarf2_const_value (const struct attribu
 		    struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  struct comp_unit_head *cu_header = &cu->header;
   LONGEST value;
   const gdb_byte *bytes;
   struct dwarf2_locexpr_baton *baton;
@@ -18914,11 +19483,11 @@ build_error_marker_type (struct dwarf2_c
 			objfile_name (objfile),
 			cu->header.offset.sect_off,
 			die->offset.sect_off);
-  saved = obstack_copy0 (&objfile->objfile_obstack,
-			 message, strlen (message));
+  saved = (char *) obstack_copy0 (&objfile->objfile_obstack,
+				  message, strlen (message));
   xfree (message);
 
-  return init_type (TYPE_CODE_ERROR, 0, 0, saved, objfile);
+  return init_type (objfile, TYPE_CODE_ERROR, 0, saved);
 }
 
 /* Look up the type of DIE in CU using its type attribute ATTR.
@@ -19125,16 +19694,17 @@ guess_full_die_structure_name (struct di
     {
       if (child->tag == DW_TAG_subprogram)
 	{
-	  struct attribute *attr;
+	  const char *linkage_name;
 
-	  attr = dwarf2_attr (child, DW_AT_linkage_name, cu);
-	  if (attr == NULL)
-	    attr = dwarf2_attr (child, DW_AT_MIPS_linkage_name, cu);
-	  if (attr != NULL)
+	  linkage_name = dwarf2_string_attr (child, DW_AT_linkage_name, cu);
+	  if (linkage_name == NULL)
+	    linkage_name = dwarf2_string_attr (child, DW_AT_MIPS_linkage_name,
+	                                       cu);
+	  if (linkage_name != NULL)
 	    {
 	      char *actual_name
 		= language_class_name_from_physname (cu->language_defn,
-						     DW_STRING (attr));
+						     linkage_name);
 	      char *name = NULL;
 
 	      if (actual_name != NULL)
@@ -19153,10 +19723,9 @@ guess_full_die_structure_name (struct di
 		      if (actual_name_len > die_name_len + 2
 			  && actual_name[actual_name_len
 					 - die_name_len - 1] == ':')
-			name =
-			  obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
-					 actual_name,
-					 actual_name_len - die_name_len - 2);
+			name = (char *) obstack_copy0 (
+			  &cu->objfile->per_bfd->storage_obstack,
+			  actual_name, actual_name_len - die_name_len - 2);
 		    }
 		}
 	      xfree (actual_name);
@@ -19176,14 +19745,13 @@ static char *
 anonymous_struct_prefix (struct die_info *die, struct dwarf2_cu *cu)
 {
   struct attribute *attr;
-  char *base;
+  const char *base;
 
   if (die->tag != DW_TAG_class_type && die->tag != DW_TAG_interface_type
       && die->tag != DW_TAG_structure_type && die->tag != DW_TAG_union_type)
     return NULL;
 
-  attr = dwarf2_attr (die, DW_AT_name, cu);
-  if (attr != NULL && DW_STRING (attr) != NULL)
+  if (dwarf2_string_attr (die, DW_AT_name, cu) != NULL)
     return NULL;
 
   attr = dwarf2_attr (die, DW_AT_linkage_name, cu);
@@ -19200,8 +19768,9 @@ anonymous_struct_prefix (struct die_info
   if (base == NULL || base == DW_STRING (attr) || base[-1] != ':')
     return "";
 
-  return obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
-			DW_STRING (attr), &base[-1] - DW_STRING (attr));
+  return (char *) obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
+				 DW_STRING (attr),
+				 &base[-1] - DW_STRING (attr));
 }
 
 /* Return the name of the namespace/class that DIE is defined within,
@@ -19227,8 +19796,9 @@ determine_prefix (struct die_info *die, 
   struct type *parent_type;
   char *retval;
 
-  if (cu->language != language_cplus && cu->language != language_java
-      && cu->language != language_fortran)
+  if (cu->language != language_cplus
+      && cu->language != language_fortran && cu->language != language_d
+      && cu->language != language_rust)
     return "";
 
   retval = anonymous_struct_prefix (die, cu);
@@ -19382,8 +19952,18 @@ typename_concat (struct obstack *obs, co
   if (suffix == NULL || suffix[0] == '\0'
       || prefix == NULL || prefix[0] == '\0')
     sep = "";
-  else if (cu->language == language_java)
-    sep = ".";
+  else if (cu->language == language_d)
+    {
+      /* For D, the 'main' function could be defined in any module, but it
+	 should never be prefixed.  */
+      if (strcmp (suffix, "D main") == 0)
+	{
+	  prefix = "";
+	  sep = "";
+	}
+      else
+	sep = ".";
+    }
   else if (cu->language == language_fortran && physname)
     {
       /* This is gfortran specific mangling.  Normally DW_AT_linkage_name or
@@ -19403,7 +19983,8 @@ typename_concat (struct obstack *obs, co
   if (obs == NULL)
     {
       char *retval
-	= xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
+	= ((char *)
+	   xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1));
 
       strcpy (retval, lead);
       strcat (retval, prefix);
@@ -19434,13 +20015,14 @@ dwarf2_canonicalize_name (const char *na
 {
   if (name && cu->language == language_cplus)
     {
-      char *canon_name = cp_canonicalize_string (name);
+      std::string canon_name = cp_canonicalize_string (name);
 
-      if (canon_name != NULL)
+      if (!canon_name.empty ())
 	{
-	  if (strcmp (canon_name, name) != 0)
-	    name = obstack_copy0 (obstack, canon_name, strlen (canon_name));
-	  xfree (canon_name);
+	  if (canon_name != name)
+	    name = (const char *) obstack_copy0 (obstack,
+						 canon_name.c_str (),
+						 canon_name.length ());
 	}
     }
 
@@ -19481,36 +20063,6 @@ dwarf2_name (struct die_info *die, struc
 	return DW_STRING (attr);
       return CP_ANONYMOUS_NAMESPACE_STR;
 
-    case DW_TAG_subprogram:
-      /* Java constructors will all be named "<init>", so return
-	 the class name when we see this special case.  */
-      if (cu->language == language_java
-	  && DW_STRING (attr) != NULL
-	  && strcmp (DW_STRING (attr), "<init>") == 0)
-	{
-	  struct dwarf2_cu *spec_cu = cu;
-	  struct die_info *spec_die;
-
-	  /* GCJ will output '<init>' for Java constructor names.
-	     For this special case, return the name of the parent class.  */
-
-	  /* GCJ may output subprogram DIEs with AT_specification set.
-	     If so, use the name of the specified DIE.  */
-	  spec_die = die_specification (die, &spec_cu);
-	  if (spec_die != NULL)
-	    return dwarf2_name (spec_die, spec_cu);
-
-	  do
-	    {
-	      die = die->parent;
-	      if (die->tag == DW_TAG_class_type)
-		return dwarf2_name (die, cu);
-	    }
-	  while (die->tag != DW_TAG_compile_unit
-		 && die->tag != DW_TAG_partial_unit);
-	}
-      break;
-
     case DW_TAG_class_type:
     case DW_TAG_interface_type:
     case DW_TAG_structure_type:
@@ -19544,12 +20096,13 @@ dwarf2_name (struct die_info *die, struc
 
 	  if (demangled)
 	    {
-	      char *base;
+	      const char *base;
 
 	      /* FIXME: we already did this for the partial symbol... */
 	      DW_STRING (attr)
-		= obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
-				 demangled, strlen (demangled));
+		= ((const char *)
+		   obstack_copy0 (&cu->objfile->per_bfd->storage_obstack,
+				  demangled, strlen (demangled)));
 	      DW_STRING_IS_CANONICAL (attr) = 1;
 	      xfree (demangled);
 
@@ -19713,6 +20266,9 @@ dump_die_shallow (struct ui_file *f, int
 	  fprintf_unfiltered (f, "expression: size %s",
 			      pulongest (DW_BLOCK (&die->attrs[i])->size));
 	  break;
+	case DW_FORM_data16:
+	  fprintf_unfiltered (f, "constant of 16 bytes");
+	  break;
 	case DW_FORM_ref_addr:
 	  fprintf_unfiltered (f, "ref address: ");
 	  fputs_filtered (hex_string (DW_UNSND (&die->attrs[i])), f);
@@ -19748,6 +20304,7 @@ dump_die_shallow (struct ui_file *f, int
 	  break;
 	case DW_FORM_string:
 	case DW_FORM_strp:
+	case DW_FORM_line_strp:
 	case DW_FORM_GNU_str_index:
 	case DW_FORM_GNU_strp_alt:
 	  fprintf_unfiltered (f, "string: \"%s\" (%s canonicalized)",
@@ -19873,6 +20430,7 @@ dwarf2_get_attr_constant_value (const st
     return DW_UNSND (attr);
   else
     {
+      /* For DW_FORM_data16 see attr_form_is_constant.  */
       complaint (&symfile_complaints,
 		 _("Attribute value is not a constant (%s)"),
                  dwarf_form_name (attr->form));
@@ -19951,7 +20509,8 @@ follow_die_offset (sect_offset offset, i
 
   *ref_cu = target_cu;
   temp_die.offset = offset;
-  return htab_find_with_hash (target_cu->die_hash, &temp_die, offset.sect_off);
+  return (struct die_info *) htab_find_with_hash (target_cu->die_hash,
+						  &temp_die, offset.sect_off);
 }
 
 /* Follow reference attribute ATTR of SRC_DIE.
@@ -19999,6 +20558,13 @@ dwarf2_fetch_die_loc_sect_off (sect_offs
   if (per_cu->cu == NULL)
     load_cu (per_cu);
   cu = per_cu->cu;
+  if (cu == NULL)
+    {
+      /* We shouldn't get here for a dummy CU, but don't crash on the user.
+	 Instead just throw an error, not much else we can do.  */
+      error (_("Dwarf Error: Dummy CU at 0x%x referenced in module %s"),
+	     offset.sect_off, objfile_name (per_cu->objfile));
+    }
 
   die = follow_die_offset (offset, per_cu->is_dwz, &cu);
   if (!die)
@@ -20070,7 +20636,7 @@ write_constant_as_bytes (struct obstack 
   gdb_byte *result;
 
   *len = TYPE_LENGTH (type);
-  result = obstack_alloc (obstack, *len);
+  result = (gdb_byte *) obstack_alloc (obstack, *len);
   store_unsigned_integer (result, *len, byte_order, value);
 
   return result;
@@ -20100,6 +20666,13 @@ dwarf2_fetch_constant_bytes (sect_offset
   if (per_cu->cu == NULL)
     load_cu (per_cu);
   cu = per_cu->cu;
+  if (cu == NULL)
+    {
+      /* We shouldn't get here for a dummy CU, but don't crash on the user.
+	 Instead just throw an error, not much else we can do.  */
+      error (_("Dwarf Error: Dummy CU at 0x%x referenced in module %s"),
+	     offset.sect_off, objfile_name (per_cu->objfile));
+    }
 
   die = follow_die_offset (offset, per_cu->is_dwz, &cu);
   if (!die)
@@ -20122,7 +20695,7 @@ dwarf2_fetch_constant_bytes (sect_offset
 	gdb_byte *tem;
 
 	*len = cu->header.addr_size;
-	tem = obstack_alloc (obstack, *len);
+	tem = (gdb_byte *) obstack_alloc (obstack, *len);
 	store_unsigned_integer (tem, *len, byte_order, DW_ADDR (attr));
 	result = tem;
       }
@@ -20141,6 +20714,7 @@ dwarf2_fetch_constant_bytes (sect_offset
     case DW_FORM_block4:
     case DW_FORM_block:
     case DW_FORM_exprloc:
+    case DW_FORM_data16:
       result = DW_BLOCK (attr)->data;
       *len = DW_BLOCK (attr)->size;
       break;
@@ -20225,7 +20799,6 @@ static struct die_info *
 follow_die_sig_1 (struct die_info *src_die, struct signatured_type *sig_type,
 		  struct dwarf2_cu **ref_cu)
 {
-  struct objfile *objfile = (*ref_cu)->objfile;
   struct die_info temp_die;
   struct dwarf2_cu *sig_cu;
   struct die_info *die;
@@ -20243,8 +20816,8 @@ follow_die_sig_1 (struct die_info *src_d
   gdb_assert (sig_cu != NULL);
   gdb_assert (sig_type->type_offset_in_section.sect_off != 0);
   temp_die.offset = sig_type->type_offset_in_section;
-  die = htab_find_with_hash (sig_cu->die_hash, &temp_die,
-			     temp_die.offset.sect_off);
+  die = (struct die_info *) htab_find_with_hash (sig_cu->die_hash, &temp_die,
+						 temp_die.offset.sect_off);
   if (die)
     {
       /* For .gdb_index version 7 keep track of included TUs.
@@ -20678,6 +21251,7 @@ decode_locdesc (struct dwarf_block *blk,
 	  break;
 
         case DW_OP_GNU_push_tls_address:
+	case DW_OP_form_tls_address:
 	  /* The top of the stack has the offset from the beginning
 	     of the thread control block at which the variable is located.  */
 	  /* Nothing should follow this operator, so the top of stack would
@@ -20740,11 +21314,7 @@ decode_locdesc (struct dwarf_block *blk,
 static struct dwarf_block *
 dwarf_alloc_block (struct dwarf2_cu *cu)
 {
-  struct dwarf_block *blk;
-
-  blk = (struct dwarf_block *)
-    obstack_alloc (&cu->comp_unit_obstack, sizeof (struct dwarf_block));
-  return (blk);
+  return XOBNEW (&cu->comp_unit_obstack, struct dwarf_block);
 }
 
 static struct die_info *
@@ -20781,7 +21351,7 @@ file_file_name (int file, struct line_he
 	  || lh->include_dirs == NULL)
         return xstrdup (fe->name);
       return concat (lh->include_dirs[fe->dir_index - 1], SLASH_STRING,
-		     fe->name, NULL);
+		     fe->name, (char *) NULL);
     }
   else
     {
@@ -20816,7 +21386,8 @@ file_full_name (int file, struct line_he
 
       if (IS_ABSOLUTE_PATH (relative) || comp_dir == NULL)
 	return relative;
-      return reconcat (relative, comp_dir, SLASH_STRING, relative, NULL);
+      return reconcat (relative, comp_dir, SLASH_STRING,
+		       relative, (char *) NULL);
     }
   else
     return file_file_name (file, lh);
@@ -20856,7 +21427,7 @@ macro_start_file (int file, int line,
 static char *
 copy_string (const char *buf, int len)
 {
-  char *s = xmalloc (len + 1);
+  char *s = (char *) xmalloc (len + 1);
 
   memcpy (s, buf, len);
   s[len] = '\0';
@@ -20944,7 +21515,7 @@ parse_macro_definition (struct macro_sou
       char *name = copy_string (body, p - body);
       int argc = 0;
       int argv_size = 1;
-      char **argv = xmalloc (argv_size * sizeof (*argv));
+      char **argv = XNEWVEC (char *, argv_size);
 
       p++;
 
@@ -20967,7 +21538,7 @@ parse_macro_definition (struct macro_sou
               if (argc >= argv_size)
                 {
                   argv_size *= 2;
-                  argv = xrealloc (argv, argv_size * sizeof (*argv));
+                  argv = XRESIZEVEC (char *, argv, argv_size);
                 }
 
               argv[argc++] = copy_string (arg_start, p - arg_start);
@@ -21052,6 +21623,10 @@ skip_form_bytes (bfd *abfd, const gdb_by
       bytes += 8;
       break;
 
+    case DW_FORM_data16:
+      bytes += 16;
+      break;
+
     case DW_FORM_string:
       read_direct_string (abfd, bytes, &bytes_read);
       bytes += bytes_read;
@@ -21133,7 +21708,8 @@ skip_unknown_opcode (unsigned int opcode
 
   for (i = 0; i < arg; ++i)
     {
-      mac_ptr = skip_form_bytes (abfd, mac_ptr, mac_end, defn[i], offset_size,
+      mac_ptr = skip_form_bytes (abfd, mac_ptr, mac_end,
+				 (enum dwarf_form) defn[i], offset_size,
 				 section);
       if (mac_ptr == NULL)
 	{
@@ -21164,7 +21740,7 @@ dwarf_parse_macro_header (const gdb_byte
       unsigned int version, flags;
 
       version = read_2_bytes (abfd, mac_ptr);
-      if (version != 4)
+      if (version != 4 && version != 5)
 	{
 	  complaint (&symfile_complaints,
 		     _("unrecognized version `%d' in .debug_macro section"),
@@ -21207,7 +21783,7 @@ dwarf_parse_macro_header (const gdb_byte
 }
 
 /* A helper for dwarf_decode_macros that handles the GNU extensions,
-   including DW_MACRO_GNU_transparent_include.  */
+   including DW_MACRO_import.  */
 
 static void
 dwarf_decode_macro_bytes (bfd *abfd,
@@ -21250,7 +21826,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	  break;
 	}
 
-      macinfo_type = read_1_byte (abfd, mac_ptr);
+      macinfo_type = (enum dwarf_macro_record_type) read_1_byte (abfd, mac_ptr);
       mac_ptr++;
 
       /* Note that we rely on the fact that the corresponding GNU and
@@ -21262,12 +21838,12 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	case 0:
 	  break;
 
-        case DW_MACRO_GNU_define:
-        case DW_MACRO_GNU_undef:
-	case DW_MACRO_GNU_define_indirect:
-	case DW_MACRO_GNU_undef_indirect:
-	case DW_MACRO_GNU_define_indirect_alt:
-	case DW_MACRO_GNU_undef_indirect_alt:
+        case DW_MACRO_define:
+        case DW_MACRO_undef:
+	case DW_MACRO_define_strp:
+	case DW_MACRO_undef_strp:
+	case DW_MACRO_define_sup:
+	case DW_MACRO_undef_sup:
           {
             unsigned int bytes_read;
             int line;
@@ -21277,8 +21853,8 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	    line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
 	    mac_ptr += bytes_read;
 
-	    if (macinfo_type == DW_MACRO_GNU_define
-		|| macinfo_type == DW_MACRO_GNU_undef)
+	    if (macinfo_type == DW_MACRO_define
+		|| macinfo_type == DW_MACRO_undef)
 	      {
 		body = read_direct_string (abfd, mac_ptr, &bytes_read);
 		mac_ptr += bytes_read;
@@ -21290,8 +21866,8 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		str_offset = read_offset_1 (abfd, mac_ptr, offset_size);
 		mac_ptr += offset_size;
 
-		if (macinfo_type == DW_MACRO_GNU_define_indirect_alt
-		    || macinfo_type == DW_MACRO_GNU_undef_indirect_alt
+		if (macinfo_type == DW_MACRO_define_sup
+		    || macinfo_type == DW_MACRO_undef_sup
 		    || section_is_dwz)
 		  {
 		    struct dwz_file *dwz = dwarf2_get_dwz_file ();
@@ -21302,9 +21878,9 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		  body = read_indirect_string_at_offset (abfd, str_offset);
 	      }
 
-	    is_define = (macinfo_type == DW_MACRO_GNU_define
-			 || macinfo_type == DW_MACRO_GNU_define_indirect
-			 || macinfo_type == DW_MACRO_GNU_define_indirect_alt);
+	    is_define = (macinfo_type == DW_MACRO_define
+			 || macinfo_type == DW_MACRO_define_strp
+			 || macinfo_type == DW_MACRO_define_sup);
             if (! current_file)
 	      {
 		/* DWARF violation as no main source is present.  */
@@ -21327,15 +21903,15 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	      parse_macro_definition (current_file, line, body);
 	    else
 	      {
-		gdb_assert (macinfo_type == DW_MACRO_GNU_undef
-			    || macinfo_type == DW_MACRO_GNU_undef_indirect
-			    || macinfo_type == DW_MACRO_GNU_undef_indirect_alt);
+		gdb_assert (macinfo_type == DW_MACRO_undef
+			    || macinfo_type == DW_MACRO_undef_strp
+			    || macinfo_type == DW_MACRO_undef_sup);
 		macro_undef (current_file, line, body);
 	      }
           }
           break;
 
-        case DW_MACRO_GNU_start_file:
+        case DW_MACRO_start_file:
           {
             unsigned int bytes_read;
             int line, file;
@@ -21355,7 +21931,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 
 	    if (at_commandline)
 	      {
-		/* This DW_MACRO_GNU_start_file was executed in the
+		/* This DW_MACRO_start_file was executed in the
 		   pass one.  */
 		at_commandline = 0;
 	      }
@@ -21364,7 +21940,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
           }
           break;
 
-        case DW_MACRO_GNU_end_file:
+        case DW_MACRO_end_file:
           if (! current_file)
 	    complaint (&symfile_complaints,
 		       _("macro debug info has an unmatched "
@@ -21390,7 +21966,9 @@ dwarf_decode_macro_bytes (bfd *abfd,
 
                   /* We don't increment mac_ptr here, so this is just
                      a look-ahead.  */
-                  next_type = read_1_byte (abfd, mac_ptr);
+                  next_type
+		    = (enum dwarf_macro_record_type) read_1_byte (abfd,
+								  mac_ptr);
                   if (next_type != 0)
 		    complaint (&symfile_complaints,
 			       _("no terminating 0-type entry for "
@@ -21401,14 +21979,13 @@ dwarf_decode_macro_bytes (bfd *abfd,
             }
           break;
 
-	case DW_MACRO_GNU_transparent_include:
-	case DW_MACRO_GNU_transparent_include_alt:
+	case DW_MACRO_import:
+	case DW_MACRO_import_sup:
 	  {
 	    LONGEST offset;
 	    void **slot;
 	    bfd *include_bfd = abfd;
 	    struct dwarf2_section_info *include_section = section;
-	    struct dwarf2_section_info alt_section;
 	    const gdb_byte *include_mac_end = mac_end;
 	    int is_dwz = section_is_dwz;
 	    const gdb_byte *new_mac_ptr;
@@ -21416,7 +21993,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	    offset = read_offset_1 (abfd, mac_ptr, offset_size);
 	    mac_ptr += offset_size;
 
-	    if (macinfo_type == DW_MACRO_GNU_transparent_include_alt)
+	    if (macinfo_type == DW_MACRO_import_sup)
 	      {
 		struct dwz_file *dwz = dwarf2_get_dwz_file ();
 
@@ -21436,7 +22013,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		/* This has actually happened; see
 		   http://sourceware.org/bugzilla/show_bug.cgi?id=13568.  */
 		complaint (&symfile_complaints,
-			   _("recursive DW_MACRO_GNU_transparent_include in "
+			   _("recursive DW_MACRO_import in "
 			     ".debug_macro section"));
 	      }
 	    else
@@ -21457,9 +22034,10 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	  if (!section_is_gnu)
 	    {
 	      unsigned int bytes_read;
-	      int constant;
 
-	      constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
+	      /* This reads the constant, but since we don't recognize
+		 any vendor extensions, we ignore it.  */
+	      read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
 	      mac_ptr += bytes_read;
 	      read_direct_string (abfd, mac_ptr, &bytes_read);
 	      mac_ptr += bytes_read;
@@ -21493,7 +22071,6 @@ dwarf_decode_macros (struct dwarf2_cu *c
   unsigned int offset_size = cu->header.offset_size;
   const gdb_byte *opcode_definitions[256];
   struct cleanup *cleanup;
-  htab_t include_hash;
   void **slot;
   struct dwarf2_section_info *section;
   const char *section_name;
@@ -21566,7 +22143,7 @@ dwarf_decode_macros (struct dwarf2_cu *c
 	  break;
         }
 
-      macinfo_type = read_1_byte (abfd, mac_ptr);
+      macinfo_type = (enum dwarf_macro_record_type) read_1_byte (abfd, mac_ptr);
       mac_ptr++;
 
       /* Note that we rely on the fact that the corresponding GNU and
@@ -21578,8 +22155,8 @@ dwarf_decode_macros (struct dwarf2_cu *c
         case 0:
 	  break;
 
-	case DW_MACRO_GNU_define:
-	case DW_MACRO_GNU_undef:
+	case DW_MACRO_define:
+	case DW_MACRO_undef:
 	  /* Only skip the data by MAC_PTR.  */
 	  {
 	    unsigned int bytes_read;
@@ -21591,7 +22168,7 @@ dwarf_decode_macros (struct dwarf2_cu *c
 	  }
 	  break;
 
-	case DW_MACRO_GNU_start_file:
+	case DW_MACRO_start_file:
 	  {
 	    unsigned int bytes_read;
 	    int line, file;
@@ -21605,14 +22182,14 @@ dwarf_decode_macros (struct dwarf2_cu *c
 	  }
 	  break;
 
-	case DW_MACRO_GNU_end_file:
+	case DW_MACRO_end_file:
 	  /* No data to skip by MAC_PTR.  */
 	  break;
 
-	case DW_MACRO_GNU_define_indirect:
-	case DW_MACRO_GNU_undef_indirect:
-	case DW_MACRO_GNU_define_indirect_alt:
-	case DW_MACRO_GNU_undef_indirect_alt:
+	case DW_MACRO_define_strp:
+	case DW_MACRO_undef_strp:
+	case DW_MACRO_define_sup:
+	case DW_MACRO_undef_sup:
 	  {
 	    unsigned int bytes_read;
 
@@ -21622,10 +22199,10 @@ dwarf_decode_macros (struct dwarf2_cu *c
 	  }
 	  break;
 
-	case DW_MACRO_GNU_transparent_include:
-	case DW_MACRO_GNU_transparent_include_alt:
+	case DW_MACRO_import:
+	case DW_MACRO_import_sup:
 	  /* Note that, according to the spec, a transparent include
-	     chain cannot call DW_MACRO_GNU_start_file.  So, we can just
+	     chain cannot call DW_MACRO_start_file.  So, we can just
 	     skip this opcode.  */
 	  mac_ptr += offset_size;
 	  break;
@@ -21659,16 +22236,16 @@ dwarf_decode_macros (struct dwarf2_cu *c
      command-line macro definitions/undefinitions.  This flag is unset when we
      reach the first DW_MACINFO_start_file entry.  */
 
-  include_hash = htab_create_alloc (1, htab_hash_pointer, htab_eq_pointer,
-				    NULL, xcalloc, xfree);
-  cleanup = make_cleanup_htab_delete (include_hash);
+  htab_up include_hash (htab_create_alloc (1, htab_hash_pointer,
+					   htab_eq_pointer,
+					   NULL, xcalloc, xfree));
   mac_ptr = section->buffer + offset;
-  slot = htab_find_slot (include_hash, mac_ptr, INSERT);
+  slot = htab_find_slot (include_hash.get (), mac_ptr, INSERT);
   *slot = (void *) mac_ptr;
   dwarf_decode_macro_bytes (abfd, mac_ptr, mac_end,
 			    current_file, lh, section,
-			    section_is_gnu, 0, offset_size, include_hash);
-  do_cleanups (cleanup);
+			    section_is_gnu, 0, offset_size,
+			    include_hash.get ());
 }
 
 /* Check if the attribute's form is a DW_FORM_block*
@@ -21713,7 +22290,10 @@ attr_form_is_section_offset (const struc
    (lineptr, loclistptr, macptr or rangelistptr).  The DWARF spec says
    that, if an attribute's can be either a constant or one of the
    section offset classes, DW_FORM_data4 and DW_FORM_data8 should be
-   taken as section offsets, not constants.  */
+   taken as section offsets, not constants.
+
+   DW_FORM_data16 is not considered as dwarf2_get_attr_constant_value
+   cannot handle that.  */
 
 static int
 attr_form_is_constant (const struct attribute *attr)
@@ -21761,8 +22341,13 @@ static struct dwarf2_section_info *
 cu_debug_loc_section (struct dwarf2_cu *cu)
 {
   if (cu->dwo_unit)
-    return &cu->dwo_unit->dwo_file->sections.loc;
-  return &dwarf2_per_objfile->loc;
+    {
+      struct dwo_sections *sections = &cu->dwo_unit->dwo_file->sections;
+      
+      return cu->header.version >= 5 ? &sections->loclists : &sections->loc;
+    }
+  return (cu->header.version >= 5 ? &dwarf2_per_objfile->loclists
+				  : &dwarf2_per_objfile->loc);
 }
 
 /* A helper function that fills in a dwarf2_loclist_baton.  */
@@ -21801,8 +22386,7 @@ dwarf2_symbol_mark_computed (const struc
     {
       struct dwarf2_loclist_baton *baton;
 
-      baton = obstack_alloc (&objfile->objfile_obstack,
-			     sizeof (struct dwarf2_loclist_baton));
+      baton = XOBNEW (&objfile->objfile_obstack, struct dwarf2_loclist_baton);
 
       fill_in_loclist_baton (cu, baton, attr);
 
@@ -21820,8 +22404,7 @@ dwarf2_symbol_mark_computed (const struc
     {
       struct dwarf2_locexpr_baton *baton;
 
-      baton = obstack_alloc (&objfile->objfile_obstack,
-			     sizeof (struct dwarf2_locexpr_baton));
+      baton = XOBNEW (&objfile->objfile_obstack, struct dwarf2_locexpr_baton);
       baton->per_cu = cu->per_cu;
       gdb_assert (baton->per_cu);
 
@@ -21882,7 +22465,8 @@ per_cu_header_read_in (struct comp_unit_
   info_ptr = per_cu->section->buffer + per_cu->offset.sect_off;
 
   memset (cu_headerp, 0, sizeof (*cu_headerp));
-  read_comp_unit_head (cu_headerp, info_ptr, per_cu->objfile->obfd);
+  read_comp_unit_head (cu_headerp, info_ptr, per_cu->section,
+		       rcuh_kind::COMPILE);
 
   return cu_headerp;
 }
@@ -21942,6 +22526,14 @@ dwarf2_per_cu_text_offset (struct dwarf2
   return ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 }
 
+/* Return DWARF version number of PER_CU.  */
+
+short
+dwarf2_version (struct dwarf2_per_cu_data *per_cu)
+{
+  return per_cu->dwarf_version;
+}
+
 /* Locate the .debug_info compilation unit from CU's objfile which contains
    the DIE at OFFSET.  Raises an error on failure.  */
 
@@ -22025,9 +22617,7 @@ prepare_one_comp_unit (struct dwarf2_cu 
       cu->language_defn = language_def (cu->language);
     }
 
-  attr = dwarf2_attr (comp_unit_die, DW_AT_producer, cu);
-  if (attr)
-    cu->producer = DW_STRING (attr);
+  cu->producer = dwarf2_string_attr (comp_unit_die, DW_AT_producer, cu);
 }
 
 /* Release one cached compilation unit, CU.  We unlink it from the tree
@@ -22039,7 +22629,7 @@ prepare_one_comp_unit (struct dwarf2_cu 
 static void
 free_heap_comp_unit (void *data)
 {
-  struct dwarf2_cu *cu = data;
+  struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
 
   gdb_assert (cu->per_cu != NULL);
   cu->per_cu->cu = NULL;
@@ -22057,7 +22647,7 @@ free_heap_comp_unit (void *data)
 static void
 free_stack_comp_unit (void *data)
 {
-  struct dwarf2_cu *cu = data;
+  struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
 
   gdb_assert (cu->per_cu != NULL);
   cu->per_cu->cu = NULL;
@@ -22161,7 +22751,9 @@ free_one_cached_comp_unit (struct dwarf2
 void
 dwarf2_free_objfile (struct objfile *objfile)
 {
-  dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+  dwarf2_per_objfile
+    = (struct dwarf2_per_objfile *) objfile_data (objfile,
+						  dwarf2_objfile_data_key);
 
   if (dwarf2_per_objfile == NULL)
     return;
@@ -22204,7 +22796,8 @@ struct dwarf2_per_cu_offset_and_type
 static hashval_t
 per_cu_offset_and_type_hash (const void *item)
 {
-  const struct dwarf2_per_cu_offset_and_type *ofs = item;
+  const struct dwarf2_per_cu_offset_and_type *ofs
+    = (const struct dwarf2_per_cu_offset_and_type *) item;
 
   return (uintptr_t) ofs->per_cu + ofs->offset.sect_off;
 }
@@ -22214,8 +22807,10 @@ per_cu_offset_and_type_hash (const void 
 static int
 per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
 {
-  const struct dwarf2_per_cu_offset_and_type *ofs_lhs = item_lhs;
-  const struct dwarf2_per_cu_offset_and_type *ofs_rhs = item_rhs;
+  const struct dwarf2_per_cu_offset_and_type *ofs_lhs
+    = (const struct dwarf2_per_cu_offset_and_type *) item_lhs;
+  const struct dwarf2_per_cu_offset_and_type *ofs_rhs
+    = (const struct dwarf2_per_cu_offset_and_type *) item_rhs;
 
   return (ofs_lhs->per_cu == ofs_rhs->per_cu
 	  && ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off);
@@ -22263,6 +22858,36 @@ set_die_type (struct die_info *die, stru
       && !HAVE_GNAT_AUX_INFO (type))
     INIT_GNAT_SPECIFIC (type);
 
+  /* Read DW_AT_allocated and set in type.  */
+  attr = dwarf2_attr (die, DW_AT_allocated, cu);
+  if (attr_form_is_block (attr))
+    {
+      if (attr_to_dynamic_prop (attr, die, cu, &prop))
+        add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile);
+    }
+  else if (attr != NULL)
+    {
+      complaint (&symfile_complaints,
+                _("DW_AT_allocated has the wrong form (%s) at DIE 0x%x"),
+                (attr != NULL ? dwarf_form_name (attr->form) : "n/a"),
+                die->offset.sect_off);
+    }
+
+  /* Read DW_AT_associated and set in type.  */
+  attr = dwarf2_attr (die, DW_AT_associated, cu);
+  if (attr_form_is_block (attr))
+    {
+      if (attr_to_dynamic_prop (attr, die, cu, &prop))
+        add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile);
+    }
+  else if (attr != NULL)
+    {
+      complaint (&symfile_complaints,
+                _("DW_AT_associated has the wrong form (%s) at DIE 0x%x"),
+                (attr != NULL ? dwarf_form_name (attr->form) : "n/a"),
+                die->offset.sect_off);
+    }
+
   /* Read DW_AT_data_location and set in type.  */
   attr = dwarf2_attr (die, DW_AT_data_location, cu);
   if (attr_to_dynamic_prop (attr, die, cu, &prop))
@@ -22289,7 +22914,8 @@ set_die_type (struct die_info *die, stru
     complaint (&symfile_complaints,
 	       _("A problem internal to GDB: DIE 0x%x has type already set"),
 	       die->offset.sect_off);
-  *slot = obstack_alloc (&objfile->objfile_obstack, sizeof (**slot));
+  *slot = XOBNEW (&objfile->objfile_obstack,
+		  struct dwarf2_per_cu_offset_and_type);
   **slot = ofs;
   return type;
 }
@@ -22308,7 +22934,8 @@ get_die_type_at_offset (sect_offset offs
 
   ofs.per_cu = per_cu;
   ofs.offset = offset;
-  slot = htab_find (dwarf2_per_objfile->die_type_hash, &ofs);
+  slot = ((struct dwarf2_per_cu_offset_and_type *)
+	  htab_find (dwarf2_per_objfile->die_type_hash, &ofs));
   if (slot)
     return slot->type;
   else
@@ -22400,7 +23027,8 @@ dwarf2_clear_marks (struct dwarf2_per_cu
 static hashval_t
 partial_die_hash (const void *item)
 {
-  const struct partial_die_info *part_die = item;
+  const struct partial_die_info *part_die
+    = (const struct partial_die_info *) item;
 
   return part_die->offset.sect_off;
 }
@@ -22411,8 +23039,10 @@ partial_die_hash (const void *item)
 static int
 partial_die_eq (const void *item_lhs, const void *item_rhs)
 {
-  const struct partial_die_info *part_die_lhs = item_lhs;
-  const struct partial_die_info *part_die_rhs = item_rhs;
+  const struct partial_die_info *part_die_lhs
+    = (const struct partial_die_info *) item_lhs;
+  const struct partial_die_info *part_die_rhs
+    = (const struct partial_die_info *) item_rhs;
 
   return part_die_lhs->offset.sect_off == part_die_rhs->offset.sect_off;
 }
@@ -22438,7 +23068,7 @@ show_dwarf_cmd (char *args, int from_tty
 static void
 dwarf2_per_objfile_free (struct objfile *objfile, void *d)
 {
-  struct dwarf2_per_objfile *data = d;
+  struct dwarf2_per_objfile *data = (struct dwarf2_per_objfile *) d;
   int ix;
 
   /* Make sure we don't accidentally use dwarf2_per_objfile while
@@ -22483,7 +23113,7 @@ struct strtab_entry
 static hashval_t
 hash_strtab_entry (const void *e)
 {
-  const struct strtab_entry *entry = e;
+  const struct strtab_entry *entry = (const struct strtab_entry *) e;
   return mapped_index_string_hash (INT_MAX, entry->str);
 }
 
@@ -22492,8 +23122,8 @@ hash_strtab_entry (const void *e)
 static int
 eq_strtab_entry (const void *a, const void *b)
 {
-  const struct strtab_entry *ea = a;
-  const struct strtab_entry *eb = b;
+  const struct strtab_entry *ea = (const struct strtab_entry *) a;
+  const struct strtab_entry *eb = (const struct strtab_entry *) b;
   return !strcmp (ea->str, eb->str);
 }
 
@@ -22519,7 +23149,7 @@ add_string (htab_t table, struct obstack
   entry.str = str;
   slot = htab_find_slot (table, &entry, INSERT);
   if (*slot)
-    result = *slot;
+    result = (struct strtab_entry *) *slot;
   else
     {
       result = XNEW (struct strtab_entry);
@@ -22556,7 +23186,8 @@ struct mapped_symtab
 static hashval_t
 hash_symtab_entry (const void *e)
 {
-  const struct symtab_index_entry *entry = e;
+  const struct symtab_index_entry *entry
+    = (const struct symtab_index_entry *) e;
   return iterative_hash (VEC_address (offset_type, entry->cu_indices),
 			 sizeof (offset_type) * VEC_length (offset_type,
 							    entry->cu_indices),
@@ -22568,8 +23199,8 @@ hash_symtab_entry (const void *e)
 static int
 eq_symtab_entry (const void *a, const void *b)
 {
-  const struct symtab_index_entry *ea = a;
-  const struct symtab_index_entry *eb = b;
+  const struct symtab_index_entry *ea = (const struct symtab_index_entry *) a;
+  const struct symtab_index_entry *eb = (const struct symtab_index_entry *) b;
   int len = VEC_length (offset_type, ea->cu_indices);
   if (len != VEC_length (offset_type, eb->cu_indices))
     return 0;
@@ -22583,7 +23214,7 @@ eq_symtab_entry (const void *a, const vo
 static void
 delete_symtab_entry (void *p)
 {
-  struct symtab_index_entry *entry = p;
+  struct symtab_index_entry *entry = (struct symtab_index_entry *) p;
   VEC_free (offset_type, entry->cu_indices);
   xfree (entry);
 }
@@ -22614,7 +23245,7 @@ create_mapped_symtab (void)
 static void
 cleanup_mapped_symtab (void *p)
 {
-  struct mapped_symtab *symtab = p;
+  struct mapped_symtab *symtab = (struct mapped_symtab *) p;
   /* The contents of the array are freed when the other hash table is
      destroyed.  */
   xfree (symtab->data);
@@ -22791,7 +23422,8 @@ add_indices_to_cpool (htab_t symbol_hash
     }
   else
     {
-      struct symtab_index_entry *old_entry = *slot;
+      struct symtab_index_entry *old_entry
+	= (struct symtab_index_entry *) *slot;
       entry->index_offset = old_entry->index_offset;
       entry = old_entry;
     }
@@ -22859,7 +23491,8 @@ struct psymtab_cu_index_map
 static hashval_t
 hash_psymtab_cu_index (const void *item)
 {
-  const struct psymtab_cu_index_map *map = item;
+  const struct psymtab_cu_index_map *map
+    = (const struct psymtab_cu_index_map *) item;
 
   return htab_hash_pointer (map->psymtab);
 }
@@ -22867,8 +23500,10 @@ hash_psymtab_cu_index (const void *item)
 static int
 eq_psymtab_cu_index (const void *item_lhs, const void *item_rhs)
 {
-  const struct psymtab_cu_index_map *lhs = item_lhs;
-  const struct psymtab_cu_index_map *rhs = item_rhs;
+  const struct psymtab_cu_index_map *lhs
+    = (const struct psymtab_cu_index_map *) item_lhs;
+  const struct psymtab_cu_index_map *rhs
+    = (const struct psymtab_cu_index_map *) item_rhs;
 
   return lhs->psymtab == rhs->psymtab;
 }
@@ -22915,8 +23550,8 @@ add_address_entry (struct objfile *objfi
 static int
 add_address_entry_worker (void *datap, CORE_ADDR start_addr, void *obj)
 {
-  struct addrmap_index_data *data = datap;
-  struct partial_symtab *pst = obj;
+  struct addrmap_index_data *data = (struct addrmap_index_data *) datap;
+  struct partial_symtab *pst = (struct partial_symtab *) obj;
 
   if (data->previous_valid)
     add_address_entry (data->objfile, data->addr_obstack,
@@ -22928,7 +23563,8 @@ add_address_entry_worker (void *datap, C
     {
       struct psymtab_cu_index_map find_map, *map;
       find_map.psymtab = pst;
-      map = htab_find (data->cu_index_htab, &find_map);
+      map = ((struct psymtab_cu_index_map *)
+	     htab_find (data->cu_index_htab, &find_map));
       gdb_assert (map != NULL);
       data->previous_cu_index = map->cu_index;
       data->previous_valid = 1;
@@ -23053,16 +23689,6 @@ write_obstack (FILE *file, struct obstac
     error (_("couldn't data write to file"));
 }
 
-/* Unlink a file if the argument is not NULL.  */
-
-static void
-unlink_if_set (void *p)
-{
-  char **filename = p;
-  if (*filename)
-    unlink (*filename);
-}
-
 /* A helper struct used when iterating over debug_types.  */
 struct signatured_type_index_data
 {
@@ -23079,7 +23705,8 @@ struct signatured_type_index_data
 static int
 write_one_signatured_type (void **slot, void *d)
 {
-  struct signatured_type_index_data *info = d;
+  struct signatured_type_index_data *info
+    = (struct signatured_type_index_data *) d;
   struct signatured_type *entry = (struct signatured_type *) *slot;
   struct partial_symtab *psymtab = entry->per_cu.v.psymtab;
   gdb_byte val[8];
@@ -23146,7 +23773,7 @@ static void
 write_psymtabs_to_index (struct objfile *objfile, const char *dir)
 {
   struct cleanup *cleanup;
-  char *filename, *cleanup_filename;
+  char *filename;
   struct obstack contents, addr_obstack, constant_pool, symtab_obstack;
   struct obstack cu_list, types_cu_list;
   int i;
@@ -23154,8 +23781,6 @@ write_psymtabs_to_index (struct objfile 
   struct mapped_symtab *symtab;
   offset_type val, size_of_contents, total_len;
   struct stat st;
-  htab_t psyms_seen;
-  htab_t cu_index_htab;
   struct psymtab_cu_index_map *psymtab_cu_index_map;
 
   if (dwarf2_per_objfile->using_index)
@@ -23178,8 +23803,7 @@ write_psymtabs_to_index (struct objfile 
   if (!out_file)
     error (_("Can't open `%s' for writing"), filename);
 
-  cleanup_filename = filename;
-  make_cleanup (unlink_if_set, &cleanup_filename);
+  gdb::unlinker unlink_file (filename);
 
   symtab = create_mapped_symtab ();
   make_cleanup (cleanup_mapped_symtab, symtab);
@@ -23193,22 +23817,20 @@ write_psymtabs_to_index (struct objfile 
   obstack_init (&types_cu_list);
   make_cleanup_obstack_free (&types_cu_list);
 
-  psyms_seen = htab_create_alloc (100, htab_hash_pointer, htab_eq_pointer,
-				  NULL, xcalloc, xfree);
-  make_cleanup_htab_delete (psyms_seen);
+  htab_up psyms_seen (htab_create_alloc (100, htab_hash_pointer,
+					 htab_eq_pointer,
+					 NULL, xcalloc, xfree));
 
   /* While we're scanning CU's create a table that maps a psymtab pointer
      (which is what addrmap records) to its index (which is what is recorded
      in the index file).  This will later be needed to write the address
      table.  */
-  cu_index_htab = htab_create_alloc (100,
-				     hash_psymtab_cu_index,
-				     eq_psymtab_cu_index,
-				     NULL, xcalloc, xfree);
-  make_cleanup_htab_delete (cu_index_htab);
-  psymtab_cu_index_map = (struct psymtab_cu_index_map *)
-    xmalloc (sizeof (struct psymtab_cu_index_map)
-	     * dwarf2_per_objfile->n_comp_units);
+  htab_up cu_index_htab (htab_create_alloc (100,
+					    hash_psymtab_cu_index,
+					    eq_psymtab_cu_index,
+					    NULL, xcalloc, xfree));
+  psymtab_cu_index_map = XNEWVEC (struct psymtab_cu_index_map,
+				  dwarf2_per_objfile->n_comp_units);
   make_cleanup (xfree, psymtab_cu_index_map);
 
   /* The CU list is already sorted, so we don't need to do additional
@@ -23230,12 +23852,13 @@ write_psymtabs_to_index (struct objfile 
 	continue;
 
       if (psymtab->user == NULL)
-	recursively_write_psymbols (objfile, psymtab, symtab, psyms_seen, i);
+	recursively_write_psymbols (objfile, psymtab, symtab,
+				    psyms_seen.get (), i);
 
       map = &psymtab_cu_index_map[i];
       map->psymtab = psymtab;
       map->cu_index = i;
-      slot = htab_find_slot (cu_index_htab, map, INSERT);
+      slot = htab_find_slot (cu_index_htab.get (), map, INSERT);
       gdb_assert (slot != NULL);
       gdb_assert (*slot == NULL);
       *slot = map;
@@ -23248,7 +23871,7 @@ write_psymtabs_to_index (struct objfile 
     }
 
   /* Dump the address map.  */
-  write_address_map (objfile, &addr_obstack, cu_index_htab);
+  write_address_map (objfile, &addr_obstack, cu_index_htab.get ());
 
   /* Write out the .debug_type entries, if any.  */
   if (dwarf2_per_objfile->signatured_types)
@@ -23258,7 +23881,7 @@ write_psymtabs_to_index (struct objfile 
       sig_data.objfile = objfile;
       sig_data.symtab = symtab;
       sig_data.types_list = &types_cu_list;
-      sig_data.psyms_seen = psyms_seen;
+      sig_data.psyms_seen = psyms_seen.get ();
       sig_data.cu_index = dwarf2_per_objfile->n_comp_units;
       htab_traverse_noresize (dwarf2_per_objfile->signatured_types,
 			      write_one_signatured_type, &sig_data);
@@ -23319,9 +23942,8 @@ write_psymtabs_to_index (struct objfile 
 
   fclose (out_file);
 
-  /* We want to keep the file, so we set cleanup_filename to NULL
-     here.  See unlink_if_set.  */
-  cleanup_filename = NULL;
+  /* We want to keep the file.  */
+  unlink_file.keep ();
 
   do_cleanups (cleanup);
 }
@@ -23347,7 +23969,9 @@ save_gdb_index_command (char *arg, int f
     if (stat (objfile_name (objfile), &st) < 0)
       continue;
 
-    dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+    dwarf2_per_objfile
+      = (struct dwarf2_per_objfile *) objfile_data (objfile,
+						    dwarf2_objfile_data_key);
     if (dwarf2_per_objfile)
       {
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/elfread.c ./gdb/elfread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/elfread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/elfread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Read ELF (Executable and Linking Format) object files for GDB.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -45,6 +45,8 @@
 #include "bcache.h"
 #include "gdb_bfd.h"
 #include "build-id.h"
+#include "location.h"
+#include "auxv.h"
 
 extern void _initialize_elfread (void);
 
@@ -88,13 +90,13 @@ elf_symfile_segments (bfd *abfd)
   if (phdrs_size == -1)
     return NULL;
 
-  phdrs = alloca (phdrs_size);
+  phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size);
   num_phdrs = bfd_get_elf_phdrs (abfd, phdrs);
   if (num_phdrs == -1)
     return NULL;
 
   num_segments = 0;
-  segments = alloca (sizeof (Elf_Internal_Phdr *) * num_phdrs);
+  segments = XALLOCAVEC (Elf_Internal_Phdr *, num_phdrs);
   for (i = 0; i < num_phdrs; i++)
     if (phdrs[i].p_type == PT_LOAD)
       segments[num_segments++] = &phdrs[i];
@@ -189,7 +191,8 @@ elf_locate_sections (bfd *ignore_abfd, a
 }
 
 static struct minimal_symbol *
-record_minimal_symbol (const char *name, int name_len, int copy_name,
+record_minimal_symbol (minimal_symbol_reader &reader,
+		       const char *name, int name_len, bool copy_name,
 		       CORE_ADDR address,
 		       enum minimal_symbol_type ms_type,
 		       asection *bfd_section, struct objfile *objfile)
@@ -200,11 +203,10 @@ record_minimal_symbol (const char *name,
       || ms_type == mst_text_gnu_ifunc)
     address = gdbarch_addr_bits_remove (gdbarch, address);
 
-  return prim_record_minimal_symbol_full (name, name_len, copy_name, address,
-					  ms_type,
-					  gdb_bfd_section_index (objfile->obfd,
-								 bfd_section),
-					  objfile);
+  return reader.record_full (name, name_len, copy_name, address,
+			     ms_type,
+			     gdb_bfd_section_index (objfile->obfd,
+						    bfd_section));
 }
 
 /* Read the symbol table of an ELF file.
@@ -224,15 +226,15 @@ record_minimal_symbol (const char *name,
 #define ST_SYNTHETIC 2
 
 static void
-elf_symtab_read (struct objfile *objfile, int type,
+elf_symtab_read (minimal_symbol_reader &reader,
+		 struct objfile *objfile, int type,
 		 long number_of_symbols, asymbol **symbol_table,
-		 int copy_names)
+		 bool copy_names)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   asymbol *sym;
   long i;
   CORE_ADDR symaddr;
-  CORE_ADDR offset;
   enum minimal_symbol_type ms_type;
   /* Name of the last file symbol.  This is either a constant string or is
      saved on the objfile's filename cache.  */
@@ -262,8 +264,6 @@ elf_symtab_read (struct objfile *objfile
 	  continue;
 	}
 
-      offset = ANOFFSET (objfile->section_offsets,
-			 gdb_bfd_section_index (objfile->obfd, sym->section));
       if (type == ST_DYNAMIC
 	  && sym->section == bfd_und_section_ptr
 	  && (sym->flags & BSF_FUNCTION))
@@ -319,7 +319,7 @@ elf_symtab_read (struct objfile *objfile
 	    continue;
 
 	  msym = record_minimal_symbol
-	    (sym->name, strlen (sym->name), copy_names,
+	    (reader, sym->name, strlen (sym->name), copy_names,
 	     symaddr, mst_solib_trampoline, sect, objfile);
 	  if (msym != NULL)
 	    {
@@ -337,8 +337,9 @@ elf_symtab_read (struct objfile *objfile
 	continue;
       if (sym->flags & BSF_FILE)
 	{
-	  filesymname = bcache (sym->name, strlen (sym->name) + 1,
-				objfile->per_bfd->filename_cache);
+	  filesymname
+	    = (const char *) bcache (sym->name, strlen (sym->name) + 1,
+				     objfile->per_bfd->filename_cache);
 	}
       else if (sym->flags & BSF_SECTION_SYM)
 	continue;
@@ -458,7 +459,7 @@ elf_symtab_read (struct objfile *objfile
 	      continue;	/* Skip this symbol.  */
 	    }
 	  msym = record_minimal_symbol
-	    (sym->name, strlen (sym->name), copy_names, symaddr,
+	    (reader, sym->name, strlen (sym->name), copy_names, symaddr,
 	     ms_type, sym->section, objfile);
 
 	  if (msym)
@@ -487,7 +488,7 @@ elf_symtab_read (struct objfile *objfile
 		{
 		  int len = atsign - sym->name;
 
-		  record_minimal_symbol (sym->name, len, 1, symaddr,
+		  record_minimal_symbol (reader, sym->name, len, true, symaddr,
 					 ms_type, sym->section, objfile);
 		}
 	    }
@@ -504,8 +505,8 @@ elf_symtab_read (struct objfile *objfile
 		{
 		  struct minimal_symbol *mtramp;
 
-		  mtramp = record_minimal_symbol (sym->name, len - 4, 1,
-						  symaddr,
+		  mtramp = record_minimal_symbol (reader, sym->name, len - 4,
+						  true, symaddr,
 						  mst_solib_trampoline,
 						  sym->section, objfile);
 		  if (mtramp)
@@ -531,7 +532,8 @@ elf_symtab_read (struct objfile *objfile
    DYN_SYMBOL_TABLE is no longer easily available for OBJFILE.  */
 
 static void
-elf_rel_plt_read (struct objfile *objfile, asymbol **dyn_symbol_table)
+elf_rel_plt_read (minimal_symbol_reader &reader,
+		  struct objfile *objfile, asymbol **dyn_symbol_table)
 {
   bfd *obfd = objfile->obfd;
   const struct elf_backend_data *bed = get_elf_backend_data (obfd);
@@ -602,14 +604,15 @@ elf_rel_plt_read (struct objfile *objfil
       if (string_buffer_size < name_len + got_suffix_len + 1)
 	{
 	  string_buffer_size = 2 * (name_len + got_suffix_len);
-	  string_buffer = xrealloc (string_buffer, string_buffer_size);
+	  string_buffer = (char *) xrealloc (string_buffer, string_buffer_size);
 	}
       memcpy (string_buffer, name, name_len);
       memcpy (&string_buffer[name_len], SYMBOL_GOT_PLT_SUFFIX,
 	      got_suffix_len + 1);
 
-      msym = record_minimal_symbol (string_buffer, name_len + got_suffix_len,
-                                    1, address, mst_slot_got_plt, got_plt,
+      msym = record_minimal_symbol (reader, string_buffer,
+				    name_len + got_suffix_len,
+                                    true, address, mst_slot_got_plt, got_plt,
 				    objfile);
       if (msym)
 	SET_MSYMBOL_SIZE (msym, ptr_size);
@@ -637,7 +640,8 @@ struct elf_gnu_ifunc_cache
 static hashval_t
 elf_gnu_ifunc_cache_hash (const void *a_voidp)
 {
-  const struct elf_gnu_ifunc_cache *a = a_voidp;
+  const struct elf_gnu_ifunc_cache *a
+    = (const struct elf_gnu_ifunc_cache *) a_voidp;
 
   return htab_hash_string (a->name);
 }
@@ -647,8 +651,10 @@ elf_gnu_ifunc_cache_hash (const void *a_
 static int
 elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
 {
-  const struct elf_gnu_ifunc_cache *a = a_voidp;
-  const struct elf_gnu_ifunc_cache *b = b_voidp;
+  const struct elf_gnu_ifunc_cache *a
+    = (const struct elf_gnu_ifunc_cache *) a_voidp;
+  const struct elf_gnu_ifunc_cache *b
+    = (const struct elf_gnu_ifunc_cache *) b_voidp;
 
   return strcmp (a->name, b->name) == 0;
 }
@@ -686,7 +692,7 @@ elf_gnu_ifunc_record_cache (const char *
   if (strcmp (bfd_get_section_name (objfile->obfd, sect), ".plt") == 0)
     return 0;
 
-  htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+  htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
   if (htab == NULL)
     {
       htab = htab_create_alloc_ex (1, elf_gnu_ifunc_cache_hash,
@@ -701,12 +707,14 @@ elf_gnu_ifunc_record_cache (const char *
   obstack_grow (&objfile->objfile_obstack, &entry_local,
 		offsetof (struct elf_gnu_ifunc_cache, name));
   obstack_grow_str0 (&objfile->objfile_obstack, name);
-  entry_p = obstack_finish (&objfile->objfile_obstack);
+  entry_p
+    = (struct elf_gnu_ifunc_cache *) obstack_finish (&objfile->objfile_obstack);
 
   slot = htab_find_slot (htab, entry_p, INSERT);
   if (*slot != NULL)
     {
-      struct elf_gnu_ifunc_cache *entry_found_p = *slot;
+      struct elf_gnu_ifunc_cache *entry_found_p
+	= (struct elf_gnu_ifunc_cache *) *slot;
       struct gdbarch *gdbarch = get_objfile_arch (objfile);
 
       if (entry_found_p->addr != addr)
@@ -745,17 +753,18 @@ elf_gnu_ifunc_resolve_by_cache (const ch
       struct elf_gnu_ifunc_cache *entry_p;
       void **slot;
 
-      htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+      htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
       if (htab == NULL)
 	continue;
 
-      entry_p = alloca (sizeof (*entry_p) + strlen (name));
+      entry_p = ((struct elf_gnu_ifunc_cache *)
+		 alloca (sizeof (*entry_p) + strlen (name)));
       strcpy (entry_p->name, name);
 
       slot = htab_find_slot (htab, entry_p, NO_INSERT);
       if (slot == NULL)
 	continue;
-      entry_p = *slot;
+      entry_p = (struct elf_gnu_ifunc_cache *) *slot;
       gdb_assert (entry_p != NULL);
 
       if (addr_p)
@@ -781,7 +790,7 @@ elf_gnu_ifunc_resolve_by_got (const char
   struct objfile *objfile;
   const size_t got_suffix_len = strlen (SYMBOL_GOT_PLT_SUFFIX);
 
-  name_got_plt = alloca (strlen (name) + got_suffix_len + 1);
+  name_got_plt = (char *) alloca (strlen (name) + got_suffix_len + 1);
   sprintf (name_got_plt, "%s" SYMBOL_GOT_PLT_SUFFIX, name);
 
   ALL_PSPACE_OBJFILES (current_program_space, objfile)
@@ -792,7 +801,7 @@ elf_gnu_ifunc_resolve_by_got (const char
       size_t ptr_size = TYPE_LENGTH (ptr_type);
       CORE_ADDR pointer_address, addr;
       asection *plt;
-      gdb_byte *buf = alloca (ptr_size);
+      gdb_byte *buf = (gdb_byte *) alloca (ptr_size);
       struct bound_minimal_symbol msym;
 
       msym = lookup_minimal_symbol (name_got_plt, NULL, objfile);
@@ -855,6 +864,8 @@ elf_gnu_ifunc_resolve_addr (struct gdbar
   CORE_ADDR start_at_pc, address;
   struct type *func_func_type = builtin_type (gdbarch)->builtin_func_func;
   struct value *function, *address_val;
+  CORE_ADDR hwcap = 0;
+  struct value *hwcap_val;
 
   /* Try first any non-intrusive methods without an inferior call.  */
 
@@ -868,12 +879,17 @@ elf_gnu_ifunc_resolve_addr (struct gdbar
     name_at_pc = NULL;
 
   function = allocate_value (func_func_type);
+  VALUE_LVAL (function) = lval_memory;
   set_value_address (function, pc);
 
-  /* STT_GNU_IFUNC resolver functions have no parameters.  FUNCTION is the
-     function entry address.  ADDRESS may be a function descriptor.  */
-
-  address_val = call_function_by_hand (function, 0, NULL);
+  /* STT_GNU_IFUNC resolver functions usually receive the HWCAP vector as
+     parameter.  FUNCTION is the function entry address.  ADDRESS may be a
+     function descriptor.  */
+
+  target_auxv_search (&current_target, AT_HWCAP, &hwcap);
+  hwcap_val = value_from_longest (builtin_type (gdbarch)
+				  ->builtin_unsigned_long, hwcap);
+  address_val = call_function_by_hand (function, 1, &hwcap_val);
   address = value_as_address (address_val);
   address = gdbarch_convert_from_func_ptr_addr (gdbarch, address,
 						&current_target);
@@ -894,7 +910,7 @@ elf_gnu_ifunc_resolver_stop (struct brea
   struct frame_info *prev_frame = get_prev_frame (get_current_frame ());
   struct frame_id prev_frame_id = get_stack_frame_id (prev_frame);
   CORE_ADDR prev_pc = get_frame_pc (prev_frame);
-  int thread_id = pid_to_thread_id (inferior_ptid);
+  int thread_id = ptid_to_global_thread_id (inferior_ptid);
 
   gdb_assert (b->type == bp_gnu_ifunc_resolver);
 
@@ -977,6 +993,7 @@ elf_gnu_ifunc_resolver_return_stop (stru
   gdb_assert (b->loc->next == NULL);
 
   func_func = allocate_value (func_func_type);
+  VALUE_LVAL (func_func) = lval_memory;
   set_value_address (func_func, b->loc->related_address);
 
   value = allocate_value (value_type);
@@ -989,7 +1006,8 @@ elf_gnu_ifunc_resolver_return_stop (stru
   resolved_pc = gdbarch_addr_bits_remove (gdbarch, resolved_pc);
 
   gdb_assert (current_program_space == b->pspace || b->pspace == NULL);
-  elf_gnu_ifunc_record_cache (b->addr_string, resolved_pc);
+  elf_gnu_ifunc_record_cache (event_location_to_string (b->location),
+			      resolved_pc);
 
   sal = find_pc_line (resolved_pc, 0);
   sals.nelts = 1;
@@ -997,7 +1015,7 @@ elf_gnu_ifunc_resolver_return_stop (stru
   sals_end.nelts = 0;
 
   b->type = bp_breakpoint;
-  update_breakpoint_locations (b, sals, sals_end);
+  update_breakpoint_locations (b, current_program_space, sals, sals_end);
 }
 
 /* A helper function for elf_symfile_read that reads the minimal
@@ -1008,7 +1026,6 @@ elf_read_minimal_symbols (struct objfile
 			  const struct elfinfo *ei)
 {
   bfd *synth_abfd, *abfd = objfile->obfd;
-  struct cleanup *back_to;
   long symcount = 0, dynsymcount = 0, synthcount, storage_needed;
   asymbol **symbol_table = NULL, **dyn_symbol_table = NULL;
   asymbol *synthsyms;
@@ -1036,8 +1053,7 @@ elf_read_minimal_symbols (struct objfile
       return;
     }
 
-  init_minimal_symbol_collection ();
-  back_to = make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   /* Allocate struct to keep track of the symfile.  */
   dbx = XCNEW (struct dbx_symfile_info);
@@ -1056,7 +1072,7 @@ elf_read_minimal_symbols (struct objfile
       /* Memory gets permanently referenced from ABFD after
 	 bfd_canonicalize_symtab so it must not get freed before ABFD gets.  */
 
-      symbol_table = bfd_alloc (abfd, storage_needed);
+      symbol_table = (asymbol **) bfd_alloc (abfd, storage_needed);
       symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
 
       if (symcount < 0)
@@ -1064,7 +1080,8 @@ elf_read_minimal_symbols (struct objfile
 	       bfd_get_filename (objfile->obfd),
 	       bfd_errmsg (bfd_get_error ()));
 
-      elf_symtab_read (objfile, ST_REGULAR, symcount, symbol_table, 0);
+      elf_symtab_read (reader, objfile, ST_REGULAR, symcount, symbol_table,
+		       false);
     }
 
   /* Add the dynamic symbols.  */
@@ -1080,7 +1097,7 @@ elf_read_minimal_symbols (struct objfile
 	 done by _bfd_elf_get_synthetic_symtab which is all a bfd
 	 implementation detail, though.  */
 
-      dyn_symbol_table = bfd_alloc (abfd, storage_needed);
+      dyn_symbol_table = (asymbol **) bfd_alloc (abfd, storage_needed);
       dynsymcount = bfd_canonicalize_dynamic_symtab (objfile->obfd,
 						     dyn_symbol_table);
 
@@ -1089,9 +1106,10 @@ elf_read_minimal_symbols (struct objfile
 	       bfd_get_filename (objfile->obfd),
 	       bfd_errmsg (bfd_get_error ()));
 
-      elf_symtab_read (objfile, ST_DYNAMIC, dynsymcount, dyn_symbol_table, 0);
+      elf_symtab_read (reader, objfile, ST_DYNAMIC, dynsymcount,
+		       dyn_symbol_table, false);
 
-      elf_rel_plt_read (objfile, dyn_symbol_table);
+      elf_rel_plt_read (reader, objfile, dyn_symbol_table);
     }
 
   /* Contrary to binutils --strip-debug/--only-keep-debug the strip command from
@@ -1118,16 +1136,14 @@ elf_read_minimal_symbols (struct objfile
 					 &synthsyms);
   if (synthcount > 0)
     {
-      asymbol **synth_symbol_table;
       long i;
 
-      make_cleanup (xfree, synthsyms);
-      synth_symbol_table = xmalloc (sizeof (asymbol *) * synthcount);
+      std::unique_ptr<asymbol *[]>
+	synth_symbol_table (new asymbol *[synthcount]);
       for (i = 0; i < synthcount; i++)
 	synth_symbol_table[i] = synthsyms + i;
-      make_cleanup (xfree, synth_symbol_table);
-      elf_symtab_read (objfile, ST_SYNTHETIC, synthcount,
-		       synth_symbol_table, 1);
+      elf_symtab_read (reader, objfile, ST_SYNTHETIC, synthcount,
+		       synth_symbol_table.get (), true);
     }
 
   /* Install any minimal symbols that have been collected as the current
@@ -1136,8 +1152,7 @@ elf_read_minimal_symbols (struct objfile
      responsibility to install them.  "mdebug" appears to be the only one
      which will do this.  */
 
-  install_minimal_symbols (objfile);
-  do_cleanups (back_to);
+  reader.install ();
 
   if (symtab_create_debug)
     fprintf_unfiltered (gdb_stdlog, "Done reading minimal symbols.\n");
@@ -1168,7 +1183,7 @@ elf_read_minimal_symbols (struct objfile
    capability even for files compiled without -g.  */
 
 static void
-elf_symfile_read (struct objfile *objfile, int symfile_flags)
+elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *abfd = objfile->obfd;
   struct elfinfo ei;
@@ -1250,21 +1265,18 @@ elf_symfile_read (struct objfile *objfil
 	   && objfile->separate_debug_objfile == NULL
 	   && objfile->separate_debug_objfile_backlink == NULL)
     {
-      char *debugfile;
-
-      debugfile = find_separate_debug_file_by_buildid (objfile);
+      gdb::unique_xmalloc_ptr<char> debugfile
+	(find_separate_debug_file_by_buildid (objfile));
 
       if (debugfile == NULL)
-	debugfile = find_separate_debug_file_by_debuglink (objfile);
+	debugfile.reset (find_separate_debug_file_by_debuglink (objfile));
 
-      if (debugfile)
+      if (debugfile != NULL)
 	{
-	  struct cleanup *cleanup = make_cleanup (xfree, debugfile);
-	  bfd *abfd = symfile_bfd_open (debugfile);
+	  gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile.get ()));
 
-	  make_cleanup_bfd_unref (abfd);
-	  symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
-	  do_cleanups (cleanup);
+	  symbol_file_add_separate (abfd.get (), debugfile.get (),
+				    symfile_flags, objfile);
 	}
     }
 }
@@ -1322,7 +1334,7 @@ elf_get_probes (struct objfile *objfile)
   VEC (probe_p) *probes_per_bfd;
 
   /* Have we parsed this objfile's probes already?  */
-  probes_per_bfd = bfd_data (objfile->obfd, probe_key);
+  probes_per_bfd = (VEC (probe_p) *) bfd_data (objfile->obfd, probe_key);
 
   if (!probes_per_bfd)
     {
@@ -1354,7 +1366,7 @@ static void
 probe_key_free (bfd *abfd, void *d)
 {
   int ix;
-  VEC (probe_p) *probes = d;
+  VEC (probe_p) *probes = (VEC (probe_p) *) d;
   struct probe *probe;
 
   for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/environ.c ./gdb/environ.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/environ.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/environ.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* environ.c -- library for manipulating environments for GNU.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,11 +15,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 #include "defs.h"
 #include "environ.h"
+#include <algorithm>
 
 
 /* Return a new environment object.  */
@@ -29,7 +27,7 @@ make_environ (void)
 {
   struct gdb_environ *e;
 
-  e = (struct gdb_environ *) xmalloc (sizeof (struct gdb_environ));
+  e = XNEW (struct gdb_environ);
 
   e->allocated = 10;
   e->vector = (char **) xmalloc ((e->allocated + 1) * sizeof (char *));
@@ -68,7 +66,7 @@ init_environ (struct gdb_environ *e)
 
   if (e->allocated < i)
     {
-      e->allocated = max (i, e->allocated + 10);
+      e->allocated = std::max (i, e->allocated + 10);
       e->vector = (char **) xrealloc ((char *) e->vector,
 				      (e->allocated + 1) * sizeof (char *));
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/environ.h ./gdb/environ.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/environ.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/environ.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header for environment manipulation library.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/eval.c ./gdb/eval.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/eval.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/eval.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Evaluate expressions for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -95,14 +95,9 @@ evaluate_subexp (struct type *expect_typ
 CORE_ADDR
 parse_and_eval_address (const char *exp)
 {
-  struct expression *expr = parse_expression (exp);
-  CORE_ADDR addr;
-  struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
-
-  addr = value_as_address (evaluate_expression (expr));
-  do_cleanups (old_chain);
-  return addr;
+  expression_up expr = parse_expression (exp);
+
+  return value_as_address (evaluate_expression (expr.get ()));
 }
 
 /* Like parse_and_eval_address, but treats the value of the expression
@@ -110,27 +105,17 @@ parse_and_eval_address (const char *exp)
 LONGEST
 parse_and_eval_long (const char *exp)
 {
-  struct expression *expr = parse_expression (exp);
-  LONGEST retval;
-  struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
-
-  retval = value_as_long (evaluate_expression (expr));
-  do_cleanups (old_chain);
-  return (retval);
+  expression_up expr = parse_expression (exp);
+
+  return value_as_long (evaluate_expression (expr.get ()));
 }
 
 struct value *
 parse_and_eval (const char *exp)
 {
-  struct expression *expr = parse_expression (exp);
-  struct value *val;
-  struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_expression (exp);
 
-  val = evaluate_expression (expr);
-  do_cleanups (old_chain);
-  return val;
+  return evaluate_expression (expr.get ());
 }
 
 /* Parse up to a comma (or to a closeparen)
@@ -140,14 +125,9 @@ parse_and_eval (const char *exp)
 struct value *
 parse_to_comma_and_eval (const char **expp)
 {
-  struct expression *expr = parse_exp_1 (expp, 0, (struct block *) 0, 1);
-  struct value *val;
-  struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_exp_1 (expp, 0, (struct block *) 0, 1);
 
-  val = evaluate_expression (expr);
-  do_cleanups (old_chain);
-  return val;
+  return evaluate_expression (expr.get ());
 }
 
 /* Evaluate an expression in internal prefix form
@@ -406,7 +386,8 @@ value_f90_subarray (struct value *array,
   int pc = (*pos) + 1;
   LONGEST low_bound, high_bound;
   struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array)));
-  enum f90_range_type range_type = longest_to_int (exp->elts[pc].longconst);
+  enum range_type range_type
+    = (enum range_type) longest_to_int (exp->elts[pc].longconst);
  
   *pos += 3;
 
@@ -997,7 +978,7 @@ evaluate_subexp_standard (struct type *e
 	  return set;
 	}
 
-      argvec = (struct value **) alloca (sizeof (struct value *) * nargs);
+      argvec = XALLOCAVEC (struct value *, nargs);
       for (tem = 0; tem < nargs; tem++)
 	{
 	  /* Ensure that array expressions are coerced into pointer
@@ -1063,7 +1044,7 @@ evaluate_subexp_standard (struct type *e
 	CORE_ADDR selector = 0;
 
 	int struct_return = 0;
-	int sub_no_side = 0;
+	enum noside sub_no_side = EVAL_NORMAL;
 
 	struct value *msg_send = NULL;
 	struct value *msg_send_stret = NULL;
@@ -1081,8 +1062,7 @@ evaluate_subexp_standard (struct type *e
 
 	selector = exp->elts[pc + 1].longconst;
 	nargs = exp->elts[pc + 2].longconst;
-	argvec = (struct value **) alloca (sizeof (struct value *) 
-					   * (nargs + 5));
+	argvec = XALLOCAVEC (struct value *, nargs + 5);
 
 	(*pos) += 3;
 
@@ -1226,7 +1206,7 @@ evaluate_subexp_standard (struct type *e
 
 	    block_for_pc (funaddr);
 
-	    CHECK_TYPEDEF (val_type);
+	    val_type = check_typedef (val_type);
 	  
 	    if ((val_type == NULL) 
 		|| (TYPE_CODE(val_type) == TYPE_CODE_ERROR))
@@ -1492,7 +1472,7 @@ evaluate_subexp_standard (struct type *e
 	      function = cp_lookup_symbol_namespace (TYPE_TAG_NAME (type),
 						     name,
 						     get_selected_block (0),
-						     VAR_DOMAIN);
+						     VAR_DOMAIN).symbol;
 	      if (function == NULL)
 		error (_("No symbol \"%s\" in namespace \"%s\"."), 
 		       name, TYPE_TAG_NAME (type));
@@ -1810,13 +1790,13 @@ evaluate_subexp_standard (struct type *e
       switch (code)
 	{
 	case TYPE_CODE_ARRAY:
-	  if (exp->elts[*pos].opcode == OP_F90_RANGE)
+	  if (exp->elts[*pos].opcode == OP_RANGE)
 	    return value_f90_subarray (arg1, exp, pos, noside);
 	  else
 	    goto multi_f77_subscript;
 
 	case TYPE_CODE_STRING:
-	  if (exp->elts[*pos].opcode == OP_F90_RANGE)
+	  if (exp->elts[*pos].opcode == OP_RANGE)
 	    return value_f90_subarray (arg1, exp, pos, noside);
 	  else
 	    {
@@ -1862,7 +1842,7 @@ evaluate_subexp_standard (struct type *e
       arg3 = value_struct_elt (&arg1, NULL, &exp->elts[pc + 2].string,
 			       NULL, "structure");
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	arg3 = value_zero (value_type (arg3), not_lval);
+	arg3 = value_zero (value_type (arg3), VALUE_LVAL (arg3));
       return arg3;
 
     case STRUCTOP_PTR:
@@ -1900,7 +1880,8 @@ evaluate_subexp_standard (struct type *e
       {
         struct type *type = value_type (arg1);
         struct type *real_type;
-        int full, top, using_enc;
+        int full, using_enc;
+        LONGEST top;
 	struct value_print_options opts;
 
 	get_user_print_options (&opts);
@@ -1917,7 +1898,7 @@ evaluate_subexp_standard (struct type *e
       arg3 = value_struct_elt (&arg1, NULL, &exp->elts[pc + 2].string,
 			       NULL, "structure pointer");
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	arg3 = value_zero (value_type (arg3), not_lval);
+	arg3 = value_zero (value_type (arg3), VALUE_LVAL (arg3));
       return arg3;
 
     case STRUCTOP_MEMBER:
@@ -2427,7 +2408,8 @@ evaluate_subexp_standard (struct type *e
       if (noside == EVAL_SKIP)
 	goto nosideret;
       type = check_typedef (value_type (arg2));
-      if (TYPE_CODE (type) != TYPE_CODE_INT)
+      if (TYPE_CODE (type) != TYPE_CODE_INT
+          && TYPE_CODE (type) != TYPE_CODE_ENUM)
 	error (_("Non-integral right operand for \"@\" operator."));
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	{
@@ -3089,7 +3071,7 @@ evaluate_subexp_for_sizeof (struct expre
   /* $5.3.3/2 of the C++ Standard (n3290 draft) says of sizeof:
      "When applied to a reference or a reference type, the result is
      the size of the referenced type."  */
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   if (exp->language_defn->la_language == language_cplus
       && TYPE_CODE (type) == TYPE_CODE_REF)
     type = check_typedef (TYPE_TARGET_TYPE (type));
@@ -3102,14 +3084,13 @@ struct type *
 parse_and_eval_type (char *p, int length)
 {
   char *tmp = (char *) alloca (length + 4);
-  struct expression *expr;
 
   tmp[0] = '(';
   memcpy (tmp + 1, p, length);
   tmp[length + 1] = ')';
   tmp[length + 2] = '0';
   tmp[length + 3] = '\0';
-  expr = parse_expression (tmp);
+  expression_up expr = parse_expression (tmp);
   if (expr->elts[0].opcode != UNOP_CAST)
     error (_("Internal error in eval_type."));
   return expr->elts[1].type;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-loop.c ./gdb/event-loop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-loop.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/event-loop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Event loop machinery for GDB, the GNU debugger.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -21,6 +21,7 @@
 #include "event-loop.h"
 #include "event-top.h"
 #include "queue.h"
+#include "ser-event.h"
 
 #ifdef HAVE_POLL
 #if defined (HAVE_POLL_H)
@@ -31,9 +32,10 @@
 #endif
 
 #include <sys/types.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #include "gdb_select.h"
 #include "observer.h"
+#include "top.h"
 
 /* Tell create_file_handler what events we are interested in.
    This is used by the select version of the event loop.  */
@@ -210,7 +212,7 @@ gdb_notifier;
    first occasion after WHEN.  */
 struct gdb_timer
   {
-    struct timeval when;
+    std::chrono::steady_clock::time_point when;
     int timer_id;
     struct gdb_timer *next;
     timer_handler_func *proc;	    /* Function to call to do the work.  */
@@ -262,6 +264,28 @@ static int update_wait_timeout (void);
 static int poll_timers (void);
 
 
+/* This event is signalled whenever an asynchronous handler needs to
+   defer an action to the event loop.  */
+static struct serial_event *async_signal_handlers_serial_event;
+
+/* Callback registered with ASYNC_SIGNAL_HANDLERS_SERIAL_EVENT.  */
+
+static void
+async_signals_handler (int error, gdb_client_data client_data)
+{
+  /* Do nothing.  Handlers are run by invoke_async_signal_handlers
+     from instead.  */
+}
+
+void
+initialize_async_signal_handlers (void)
+{
+  async_signal_handlers_serial_event = make_serial_event ();
+
+  add_file_handler (serial_event_fd (async_signal_handlers_serial_event),
+		    async_signals_handler, NULL);
+}
+
 /* Process one high level event.  If nothing is ready at this time,
    wait for something to happen (via gdb_wait_for_event), then process
    it.  Returns >0 if something was done otherwise returns <0 (this
@@ -357,6 +381,7 @@ start_event_loop (void)
 	  /* If we long-jumped out of do_one_event, we probably didn't
 	     get around to resetting the prompt, which leaves readline
 	     in a messed-up state.  Reset it here.  */
+	  current_ui->prompt_state = PROMPT_NEEDED;
 	  observer_notify_command_error ();
 	  /* This call looks bizarre, but it is required.  If the user
 	     entered a command that caused an error,
@@ -455,7 +480,7 @@ create_file_handler (int fd, int mask, h
      change the data associated with it.  */
   if (file_ptr == NULL)
     {
-      file_ptr = (file_handler *) xmalloc (sizeof (file_handler));
+      file_ptr = XNEW (file_handler);
       file_ptr->fd = fd;
       file_ptr->ready_mask = 0;
       file_ptr->next_file = gdb_notifier.first_file_handler;
@@ -472,7 +497,7 @@ create_file_handler (int fd, int mask, h
 					   * sizeof (struct pollfd)));
 	  else
 	    gdb_notifier.poll_fds =
-	      (struct pollfd *) xmalloc (sizeof (struct pollfd));
+	      XNEW (struct pollfd);
 	  (gdb_notifier.poll_fds + gdb_notifier.num_fds - 1)->fd = fd;
 	  (gdb_notifier.poll_fds + gdb_notifier.num_fds - 1)->events = mask;
 	  (gdb_notifier.poll_fds + gdb_notifier.num_fds - 1)->revents = 0;
@@ -875,8 +900,7 @@ create_async_signal_handler (sig_handler
 {
   async_signal_handler *async_handler_ptr;
 
-  async_handler_ptr =
-    (async_signal_handler *) xmalloc (sizeof (async_signal_handler));
+  async_handler_ptr = XNEW (async_signal_handler);
   async_handler_ptr->ready = 0;
   async_handler_ptr->next_handler = NULL;
   async_handler_ptr->proc = proc;
@@ -889,15 +913,6 @@ create_async_signal_handler (sig_handler
   return async_handler_ptr;
 }
 
-/* Call the handler from HANDLER immediately.  This function runs
-   signal handlers when returning to the event loop would be too
-   slow.  */
-void
-call_async_signal_handler (struct async_signal_handler *handler)
-{
-  (*handler->proc) (handler->client_data);
-}
-
 /* Mark the handler (ASYNC_HANDLER_PTR) as ready.  This information
    will be used when the handlers are invoked, after we have waited
    for some event.  The caller of this function is the interrupt
@@ -906,17 +921,40 @@ void
 mark_async_signal_handler (async_signal_handler * async_handler_ptr)
 {
   async_handler_ptr->ready = 1;
+  serial_event_set (async_signal_handlers_serial_event);
+}
+
+/* See event-loop.h.  */
+
+void
+clear_async_signal_handler (async_signal_handler *async_handler_ptr)
+{
+  async_handler_ptr->ready = 0;
+}
+
+/* See event-loop.h.  */
+
+int
+async_signal_handler_is_marked (async_signal_handler *async_handler_ptr)
+{
+  return async_handler_ptr->ready;
 }
 
 /* Call all the handlers that are ready.  Returns true if any was
    indeed ready.  */
+
 static int
 invoke_async_signal_handlers (void)
 {
   async_signal_handler *async_handler_ptr;
   int any_ready = 0;
 
-  /* Invoke ready handlers.  */
+  /* We're going to handle all pending signals, so no need to wake up
+     the event loop again the next time around.  Note this must be
+     cleared _before_ calling the callbacks, to avoid races.  */
+  serial_event_clear (async_signal_handlers_serial_event);
+
+  /* Invoke all ready handlers.  */
 
   while (1)
     {
@@ -931,6 +969,9 @@ invoke_async_signal_handlers (void)
 	break;
       any_ready = 1;
       async_handler_ptr->ready = 0;
+      /* Async signal handlers have no connection to whichever was the
+	 current UI, and thus always run on the main one.  */
+      current_ui = main_ui;
       (*async_handler_ptr->proc) (async_handler_ptr->client_data);
     }
 
@@ -974,7 +1015,7 @@ create_async_event_handler (async_event_
 {
   async_event_handler *h;
 
-  h = xmalloc (sizeof (*h));
+  h = XNEW (struct async_event_handler);
   h->ready = 0;
   h->next_handler = NULL;
   h->proc = proc;
@@ -1056,33 +1097,22 @@ delete_async_event_handler (async_event_
   *async_handler_ptr = NULL;
 }
 
-/* Create a timer that will expire in MILLISECONDS from now.  When the
-   timer is ready, PROC will be executed.  At creation, the timer is
-   aded to the timers queue.  This queue is kept sorted in order of
-   increasing timers.  Return a handle to the timer struct.  */
+/* Create a timer that will expire in MS milliseconds from now.  When
+   the timer is ready, PROC will be executed.  At creation, the timer
+   is added to the timers queue.  This queue is kept sorted in order
+   of increasing timers.  Return a handle to the timer struct.  */
+
 int
-create_timer (int milliseconds, timer_handler_func * proc, 
+create_timer (int ms, timer_handler_func *proc,
 	      gdb_client_data client_data)
 {
+  using namespace std::chrono;
   struct gdb_timer *timer_ptr, *timer_index, *prev_timer;
-  struct timeval time_now, delta;
 
-  /* Compute seconds.  */
-  delta.tv_sec = milliseconds / 1000;
-  /* Compute microseconds.  */
-  delta.tv_usec = (milliseconds % 1000) * 1000;
-
-  gettimeofday (&time_now, NULL);
-
-  timer_ptr = (struct gdb_timer *) xmalloc (sizeof (*timer_ptr));
-  timer_ptr->when.tv_sec = time_now.tv_sec + delta.tv_sec;
-  timer_ptr->when.tv_usec = time_now.tv_usec + delta.tv_usec;
-  /* Carry?  */
-  if (timer_ptr->when.tv_usec >= 1000000)
-    {
-      timer_ptr->when.tv_sec += 1;
-      timer_ptr->when.tv_usec -= 1000000;
-    }
+  steady_clock::time_point time_now = steady_clock::now ();
+
+  timer_ptr = new gdb_timer ();
+  timer_ptr->when = time_now + milliseconds (ms);
   timer_ptr->proc = proc;
   timer_ptr->client_data = client_data;
   timer_list.num_timers++;
@@ -1095,11 +1125,7 @@ create_timer (int milliseconds, timer_ha
        timer_index != NULL;
        timer_index = timer_index->next)
     {
-      /* If the seconds field is greater or if it is the same, but the
-         microsecond field is greater.  */
-      if ((timer_index->when.tv_sec > timer_ptr->when.tv_sec)
-	  || ((timer_index->when.tv_sec == timer_ptr->when.tv_sec)
-	      && (timer_index->when.tv_usec > timer_ptr->when.tv_usec)))
+      if (timer_index->when > timer_ptr->when)
 	break;
     }
 
@@ -1153,47 +1179,56 @@ delete_timer (int id)
 	;
       prev_timer->next = timer_ptr->next;
     }
-  xfree (timer_ptr);
+  delete timer_ptr;
 
   gdb_notifier.timeout_valid = 0;
 }
 
+/* Convert a std::chrono duration to a struct timeval.  */
+
+template<typename Duration>
+static struct timeval
+duration_cast_timeval (const Duration &d)
+{
+  using namespace std::chrono;
+  seconds sec = duration_cast<seconds> (d);
+  microseconds msec = duration_cast<microseconds> (d - sec);
+
+  struct timeval tv;
+  tv.tv_sec = sec.count ();
+  tv.tv_usec = msec.count ();
+  return tv;
+}
+
 /* Update the timeout for the select() or poll().  Returns true if the
    timer has already expired, false otherwise.  */
 
 static int
 update_wait_timeout (void)
 {
-  struct timeval time_now, delta;
-
   if (timer_list.first_timer != NULL)
     {
-      gettimeofday (&time_now, NULL);
-      delta.tv_sec = timer_list.first_timer->when.tv_sec - time_now.tv_sec;
-      delta.tv_usec = timer_list.first_timer->when.tv_usec - time_now.tv_usec;
-      /* Borrow?  */
-      if (delta.tv_usec < 0)
-	{
-	  delta.tv_sec -= 1;
-	  delta.tv_usec += 1000000;
-	}
+      using namespace std::chrono;
+      steady_clock::time_point time_now = steady_clock::now ();
+      struct timeval timeout;
 
-      /* Cannot simply test if delta.tv_sec is negative because time_t
-         might be unsigned.  */
-      if (timer_list.first_timer->when.tv_sec < time_now.tv_sec
-	  || (timer_list.first_timer->when.tv_sec == time_now.tv_sec
-	      && timer_list.first_timer->when.tv_usec < time_now.tv_usec))
+      if (timer_list.first_timer->when < time_now)
 	{
 	  /* It expired already.  */
-	  delta.tv_sec = 0;
-	  delta.tv_usec = 0;
+	  timeout.tv_sec = 0;
+	  timeout.tv_usec = 0;
+	}
+      else
+	{
+	  steady_clock::duration d = timer_list.first_timer->when - time_now;
+	  timeout = duration_cast_timeval (d);
 	}
 
       /* Update the timeout for select/ poll.  */
       if (use_poll)
 	{
 #ifdef HAVE_POLL
-	  gdb_notifier.poll_timeout = delta.tv_sec * 1000;
+	  gdb_notifier.poll_timeout = timeout.tv_sec * 1000;
 #else
 	  internal_error (__FILE__, __LINE__,
 			  _("use_poll without HAVE_POLL"));
@@ -1201,12 +1236,12 @@ update_wait_timeout (void)
 	}
       else
 	{
-	  gdb_notifier.select_timeout.tv_sec = delta.tv_sec;
-	  gdb_notifier.select_timeout.tv_usec = delta.tv_usec;
+	  gdb_notifier.select_timeout.tv_sec = timeout.tv_sec;
+	  gdb_notifier.select_timeout.tv_usec = timeout.tv_usec;
 	}
       gdb_notifier.timeout_valid = 1;
 
-      if (delta.tv_sec == 0 && delta.tv_usec == 0)
+      if (timer_list.first_timer->when < time_now)
 	return 1;
     }
   else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-loop.h ./gdb/event-loop.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-loop.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/event-loop.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Definitions used by the GDB event loop.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -91,27 +91,18 @@ extern int create_timer (int millisecond
 			 gdb_client_data client_data);
 extern void delete_timer (int id);
 
-/* Call the handler from HANDLER immediately.  This function
-   runs signal handlers when returning to the event loop would be too
-   slow.  Do not call this directly; use gdb_call_async_signal_handler,
-   below, with IMMEDIATE_P == 1.  */
-void call_async_signal_handler (struct async_signal_handler *handler);
-
-/* Call the handler from HANDLER the next time through the event loop.
-   Do not call this directly; use gdb_call_async_signal_handler,
-   below, with IMMEDIATE_P == 0.  */
-void mark_async_signal_handler (struct async_signal_handler *handler);
-
-/* Wrapper for the body of signal handlers.  Call this function from
-   any SIGINT handler which needs to access GDB data structures or
-   escape via longjmp.  If IMMEDIATE_P is set, this triggers either
-   immediately (for POSIX platforms), or from gdb_select (for
-   MinGW).  If IMMEDIATE_P is clear, the handler will run the next
-   time we return to the event loop and any current select calls
-   will be interrupted.  */
+/* Call the handler from HANDLER the next time through the event
+   loop.  */
+extern void mark_async_signal_handler (struct async_signal_handler *handler);
+
+/* Returns true if HANDLER is marked ready.  */
 
-void gdb_call_async_signal_handler (struct async_signal_handler *handler,
-				    int immediate_p);
+extern int
+  async_signal_handler_is_marked (struct async_signal_handler *handler);
+
+/* Mark HANDLER as NOT ready.  */
+
+extern void clear_async_signal_handler (struct async_signal_handler *handler);
 
 /* Create and register an asynchronous event source in the event loop,
    and set PROC as its callback.  CLIENT_DATA is passed as argument to
@@ -134,3 +125,5 @@ extern void mark_async_event_handler (st
 /* Mark the handler (ASYNC_HANDLER_PTR) as NOT ready.  */
 
 extern void clear_async_event_handler (struct async_event_handler *handler);
+
+extern void initialize_async_signal_handlers (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-top.c ./gdb/event-top.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-top.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/event-top.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Top level stuff for GDB, the GNU debugger.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
@@ -37,6 +37,9 @@
 #include "gdbcmd.h"		/* for dont_repeat() */
 #include "annotate.h"
 #include "maint.h"
+#include "buffer.h"
+#include "ser-event.h"
+#include "gdb_select.h"
 
 /* readline include files.  */
 #include "readline/readline.h"
@@ -45,10 +48,6 @@
 /* readline defines this.  */
 #undef savestring
 
-static void rl_callback_read_char_wrapper (gdb_client_data client_data);
-static void command_line_handler (char *rl);
-static void change_line_handler (void);
-static void command_handler (char *command);
 static char *top_level_prompt (void);
 
 /* Signal handlers.  */
@@ -74,28 +73,10 @@ static void async_stop_sig (gdb_client_d
 #endif
 static void async_sigterm_handler (gdb_client_data arg);
 
-/* Readline offers an alternate interface, via callback
-   functions.  These are all included in the file callback.c in the
-   readline distribution.  This file provides (mainly) a function, which
-   the event loop uses as callback (i.e. event handler) whenever an event
-   is detected on the standard input file descriptor.
-   readline_callback_read_char is called (by the GDB event loop) whenever
-   there is a new character ready on the input stream.  This function
-   incrementally builds a buffer internal to readline where it
-   accumulates the line read up to the point of invocation.  In the
-   special case in which the character read is newline, the function
-   invokes a GDB supplied callback routine, which does the processing of
-   a full command line.  This latter routine is the asynchronous analog
-   of the old command_line_input in gdb.  Instead of invoking (and waiting
-   for) readline to read the command line and pass it back to
-   command_loop for processing, the new command_line_handler function has
-   the command line already available as its parameter.  INPUT_HANDLER is
-   to be set to the function that readline will invoke when a complete
-   line of input is ready.  CALL_READLINE is to be set to the function
-   that readline offers as callback to the event_loop.  */
-
-void (*input_handler) (char *);
-void (*call_readline) (gdb_client_data);
+/* Instead of invoking (and waiting for) readline to read the command
+   line and pass it back for processing, we use readline's alternate
+   interface, via callback functions, so that the event loop can react
+   to other event sources while we wait for input.  */
 
 /* Important variables for the event loop.  */
 
@@ -105,20 +86,12 @@ void (*call_readline) (gdb_client_data);
    ezannoni: as of 1999-04-29 I expect that this
    variable will not be used after gdb is changed to use the event
    loop as default engine, and event-top.c is merged into top.c.  */
-int async_command_editing_p;
-
-/* This is the annotation suffix that will be used when the
-   annotation_level is 2.  */
-char *async_annotation_suffix;
+int set_editing_cmd_var;
 
 /* This is used to display the notification of the completion of an
    asynchronous execution command.  */
 int exec_done_display_p = 0;
 
-/* This is the file descriptor for the input stream that GDB uses to
-   read commands from.  */
-int input_fd;
-
 /* Used by the stdin event handler to compensate for missed stdin events.
    Setting this to a non-zero value inside an stdin callback makes the callback
    run again.  */
@@ -143,80 +116,163 @@ static struct async_signal_handler *sigt
 #endif
 static struct async_signal_handler *async_sigterm_token;
 
-/* Structure to save a partially entered command.  This is used when
-   the user types '\' at the end of a command line.  This is necessary
-   because each line of input is handled by a different call to
-   command_line_handler, and normally there is no state retained
-   between different calls.  */
-static int more_to_come = 0;
-
-struct readline_input_state
-  {
-    char *linebuffer;
-    char *linebuffer_ptr;
-  }
-readline_input_state;
-
-/* This hook is called by rl_callback_read_char_wrapper after each
+/* This hook is called by gdb_rl_callback_read_char_wrapper after each
    character is processed.  */
 void (*after_char_processing_hook) (void);
 
 
-/* Wrapper function for calling into the readline library.  The event
-   loop expects the callback function to have a paramter, while
-   readline expects none.  */
+/* Wrapper function for calling into the readline library.  This takes
+   care of a couple things:
+
+   - The event loop expects the callback function to have a parameter,
+     while readline expects none.
+
+   - Propagation of GDB exceptions/errors thrown from INPUT_HANDLER
+     across readline requires special handling.
+
+   On the exceptions issue:
+
+   DWARF-based unwinding cannot cross code built without -fexceptions.
+   Any exception that tries to propagate through such code will fail
+   and the result is a call to std::terminate.  While some ABIs, such
+   as x86-64, require all code to be built with exception tables,
+   others don't.
+
+   This is a problem when GDB calls some non-EH-aware C library code,
+   that calls into GDB again through a callback, and that GDB callback
+   code throws a C++ exception.  Turns out this is exactly what
+   happens with GDB's readline callback.
+
+   In such cases, we must catch and save any C++ exception that might
+   be thrown from the GDB callback before returning to the
+   non-EH-aware code.  When the non-EH-aware function itself returns
+   back to GDB, we then rethrow the original C++ exception.
+
+   In the readline case however, the right thing to do is to longjmp
+   out of the callback, rather than do a normal return -- there's no
+   way for the callback to return to readline an indication that an
+   error happened, so a normal return would have rl_callback_read_char
+   potentially continue processing further input, redisplay the
+   prompt, etc.  Instead of raw setjmp/longjmp however, we use our
+   sjlj-based TRY/CATCH mechanism, which knows to handle multiple
+   levels of active setjmp/longjmp frames, needed in order to handle
+   the readline callback recursing, as happens with e.g., secondary
+   prompts / queries, through gdb_readline_wrapper.  This must be
+   noexcept in order to avoid problems with mixing sjlj and
+   (sjlj-based) C++ exceptions.  */
+
+static struct gdb_exception
+gdb_rl_callback_read_char_wrapper_noexcept () noexcept
+{
+  struct gdb_exception gdb_expt = exception_none;
+
+  /* C++ exceptions can't normally be thrown across readline (unless
+     it is built with -fexceptions, but it won't by default on many
+     ABIs).  So we instead wrap the readline call with a sjlj-based
+     TRY/CATCH, and rethrow the GDB exception once back in GDB.  */
+  TRY_SJLJ
+    {
+      rl_callback_read_char ();
+      if (after_char_processing_hook)
+	(*after_char_processing_hook) ();
+    }
+  CATCH_SJLJ (ex, RETURN_MASK_ALL)
+    {
+      gdb_expt = ex;
+    }
+  END_CATCH_SJLJ
+
+  return gdb_expt;
+}
+
 static void
-rl_callback_read_char_wrapper (gdb_client_data client_data)
+gdb_rl_callback_read_char_wrapper (gdb_client_data client_data)
 {
-  rl_callback_read_char ();
-  if (after_char_processing_hook)
-    (*after_char_processing_hook) ();
+  struct gdb_exception gdb_expt
+    = gdb_rl_callback_read_char_wrapper_noexcept ();
+
+  /* Rethrow using the normal EH mechanism.  */
+  if (gdb_expt.reason < 0)
+    throw_exception (gdb_expt);
 }
 
-/* Initialize all the necessary variables, start the event loop,
-   register readline, and stdin, start the loop.  The DATA is the
-   interpreter data cookie, ignored for now.  */
+/* GDB's readline callback handler.  Calls the current INPUT_HANDLER,
+   and propagates GDB exceptions/errors thrown from INPUT_HANDLER back
+   across readline.  See gdb_rl_callback_read_char_wrapper.  This must
+   be noexcept in order to avoid problems with mixing sjlj and
+   (sjlj-based) C++ exceptions.  */
 
-void
-cli_command_loop (void *data)
+static void
+gdb_rl_callback_handler (char *rl) noexcept
 {
-  display_gdb_prompt (0);
+  struct gdb_exception gdb_rl_expt = exception_none;
+  struct ui *ui = current_ui;
 
-  /* Now it's time to start the event loop.  */
-  start_event_loop ();
+  TRY
+    {
+      ui->input_handler (rl);
+    }
+  CATCH (ex, RETURN_MASK_ALL)
+    {
+      gdb_rl_expt = ex;
+    }
+  END_CATCH
+
+  /* If we caught a GDB exception, longjmp out of the readline
+     callback.  There's no other way for the callback to signal to
+     readline that an error happened.  A normal return would have
+     readline potentially continue processing further input, redisplay
+     the prompt, etc.  (This is what GDB historically did when it was
+     a C program.)  Note that since we're long jumping, local variable
+     dtors are NOT run automatically.  */
+  if (gdb_rl_expt.reason < 0)
+    throw_exception_sjlj (gdb_rl_expt);
 }
 
 /* Change the function to be invoked every time there is a character
    ready on stdin.  This is used when the user sets the editing off,
    therefore bypassing readline, and letting gdb handle the input
-   itself, via gdb_readline2.  Also it is used in the opposite case in
-   which the user sets editing on again, by restoring readline
-   handling of the input.  */
-static void
-change_line_handler (void)
+   itself, via gdb_readline_no_editing_callback.  Also it is used in
+   the opposite case in which the user sets editing on again, by
+   restoring readline handling of the input.
+
+   NOTE: this operates on input_fd, not instream.  If we are reading
+   commands from a file, instream will point to the file.  However, we
+   always read commands from a file with editing off.  This means that
+   the 'set editing on/off' will have effect only on the interactive
+   session.  */
+
+void
+change_line_handler (int editing)
 {
-  /* NOTE: this operates on input_fd, not instream.  If we are reading
-     commands from a file, instream will point to the file.  However in
-     async mode, we always read commands from a file with editing
-     off.  This means that the 'set editing on/off' will have effect
-     only on the interactive session.  */
+  struct ui *ui = current_ui;
+
+  /* We can only have one instance of readline, so we only allow
+     editing on the main UI.  */
+  if (ui != main_ui)
+    return;
 
-  if (async_command_editing_p)
+  /* Don't try enabling editing if the interpreter doesn't support it
+     (e.g., MI).  */
+  if (!interp_supports_command_editing (top_level_interpreter ())
+      || !interp_supports_command_editing (command_interp ()))
+    return;
+
+  if (editing)
     {
+      gdb_assert (ui == main_ui);
+
       /* Turn on editing by using readline.  */
-      call_readline = rl_callback_read_char_wrapper;
-      input_handler = command_line_handler;
+      ui->call_readline = gdb_rl_callback_read_char_wrapper;
     }
   else
     {
-      /* Turn off editing by using gdb_readline2.  */
-      gdb_rl_callback_handler_remove ();
-      call_readline = gdb_readline2;
-
-      /* Set up the command handler as well, in case we are called as
-         first thing from .gdbinit.  */
-      input_handler = command_line_handler;
+      /* Turn off editing by using gdb_readline_no_editing_callback.  */
+      if (ui->command_editing)
+	gdb_rl_callback_handler_remove ();
+      ui->call_readline = gdb_readline_no_editing_callback;
     }
+  ui->command_editing = editing;
 }
 
 /* The functions below are wrappers for rl_callback_handler_remove and
@@ -237,6 +293,8 @@ static int callback_handler_installed;
 void
 gdb_rl_callback_handler_remove (void)
 {
+  gdb_assert (current_ui == main_ui);
+
   rl_callback_handler_remove ();
   callback_handler_installed = 0;
 }
@@ -248,12 +306,14 @@ gdb_rl_callback_handler_remove (void)
 void
 gdb_rl_callback_handler_install (const char *prompt)
 {
+  gdb_assert (current_ui == main_ui);
+
   /* Calling rl_callback_handler_install resets readline's input
      buffer.  Calling this when we were already processing input
      therefore loses input.  */
   gdb_assert (!callback_handler_installed);
 
-  rl_callback_handler_install (prompt, input_handler);
+  rl_callback_handler_install (prompt, gdb_rl_callback_handler);
   callback_handler_installed = 1;
 }
 
@@ -262,6 +322,8 @@ gdb_rl_callback_handler_install (const c
 void
 gdb_rl_callback_handler_reinstall (void)
 {
+  gdb_assert (current_ui == main_ui);
+
   if (!callback_handler_installed)
     {
       /* Passing NULL as prompt argument tells readline to not display
@@ -305,7 +367,11 @@ display_gdb_prompt (const char *new_prom
      IE, displayed but not set.  */
   if (! new_prompt)
     {
-      if (sync_execution)
+      struct ui *ui = current_ui;
+
+      if (ui->prompt_state == PROMPTED)
+	internal_error (__FILE__, __LINE__, _("double prompt"));
+      else if (ui->prompt_state == PROMPT_BLOCKED)
 	{
 	  /* This is to trick readline into not trying to display the
 	     prompt.  Even though we display the prompt using this
@@ -323,20 +389,22 @@ display_gdb_prompt (const char *new_prom
 	     the above two functions.  Calling
 	     rl_callback_handler_remove(), does the job.  */
 
-	  gdb_rl_callback_handler_remove ();
+	  if (current_ui->command_editing)
+	    gdb_rl_callback_handler_remove ();
 	  do_cleanups (old_chain);
 	  return;
 	}
-      else
+      else if (ui->prompt_state == PROMPT_NEEDED)
 	{
 	  /* Display the top level prompt.  */
 	  actual_gdb_prompt = top_level_prompt ();
+	  ui->prompt_state = PROMPTED;
 	}
     }
   else
     actual_gdb_prompt = xstrdup (new_prompt);
 
-  if (async_command_editing_p)
+  if (current_ui->command_editing)
     {
       gdb_rl_callback_handler_remove ();
       gdb_rl_callback_handler_install (actual_gdb_prompt);
@@ -363,77 +431,112 @@ display_gdb_prompt (const char *new_prom
 static char *
 top_level_prompt (void)
 {
-  char *prefix;
-  char *prompt = NULL;
-  char *suffix;
-  char *composed_prompt;
-  size_t prompt_length;
+  char *prompt;
 
   /* Give observers a chance of changing the prompt.  E.g., the python
      `gdb.prompt_hook' is installed as an observer.  */
   observer_notify_before_prompt (get_prompt ());
 
-  prompt = xstrdup (get_prompt ());
+  prompt = get_prompt ();
 
   if (annotation_level >= 2)
     {
       /* Prefix needs to have new line at end.  */
-      prefix = (char *) alloca (strlen (async_annotation_suffix) + 10);
-      strcpy (prefix, "\n\032\032pre-");
-      strcat (prefix, async_annotation_suffix);
-      strcat (prefix, "\n");
+      const char prefix[] = "\n\032\032pre-prompt\n";
 
       /* Suffix needs to have a new line at end and \032 \032 at
 	 beginning.  */
-      suffix = (char *) alloca (strlen (async_annotation_suffix) + 6);
-      strcpy (suffix, "\n\032\032");
-      strcat (suffix, async_annotation_suffix);
-      strcat (suffix, "\n");
-    }
-  else
-    {
-      prefix = "";
-      suffix = "";
+      const char suffix[] = "\n\032\032prompt\n";
+
+      return concat (prefix, prompt, suffix, (char *) NULL);
     }
 
-  prompt_length = strlen (prefix) + strlen (prompt) + strlen (suffix);
-  composed_prompt = xmalloc (prompt_length + 1);
+  return xstrdup (prompt);
+}
+
+/* See top.h.  */
 
-  strcpy (composed_prompt, prefix);
-  strcat (composed_prompt, prompt);
-  strcat (composed_prompt, suffix);
+struct ui *main_ui;
+struct ui *current_ui;
+struct ui *ui_list;
 
-  xfree (prompt);
+/* Get a pointer to the current UI's line buffer.  This is used to
+   construct a whole line of input from partial input.  */
 
-  return composed_prompt;
+static struct buffer *
+get_command_line_buffer (void)
+{
+  return &current_ui->line_buffer;
 }
 
-/* When there is an event ready on the stdin file desriptor, instead
+/* When there is an event ready on the stdin file descriptor, instead
    of calling readline directly throught the callback function, or
-   instead of calling gdb_readline2, give gdb a chance to detect
-   errors and do something.  */
+   instead of calling gdb_readline_no_editing_callback, give gdb a
+   chance to detect errors and do something.  */
+
 void
 stdin_event_handler (int error, gdb_client_data client_data)
 {
+  struct ui *ui = (struct ui *) client_data;
+
   if (error)
     {
-      printf_unfiltered (_("error detected on stdin\n"));
-      delete_file_handler (input_fd);
-      discard_all_continuations ();
-      discard_all_intermediate_continuations ();
-      /* If stdin died, we may as well kill gdb.  */
-      quit_command ((char *) 0, stdin == instream);
+      /* Switch to the main UI, so diagnostics always go there.  */
+      current_ui = main_ui;
+
+      delete_file_handler (ui->input_fd);
+      if (main_ui == ui)
+	{
+	  /* If stdin died, we may as well kill gdb.  */
+	  printf_unfiltered (_("error detected on stdin\n"));
+	  quit_command ((char *) 0, 0);
+	}
+      else
+	{
+	  /* Simply delete the UI.  */
+	  delete_ui (ui);
+	}
     }
   else
     {
+      /* Switch to the UI whose input descriptor woke up the event
+	 loop.  */
+      current_ui = ui;
+
+      /* This makes sure a ^C immediately followed by further input is
+	 always processed in that order.  E.g,. with input like
+	 "^Cprint 1\n", the SIGINT handler runs, marks the async
+	 signal handler, and then select/poll may return with stdin
+	 ready, instead of -1/EINTR.  The
+	 gdb.base/double-prompt-target-event-error.exp test exercises
+	 this.  */
+      QUIT;
+
       do
 	{
 	  call_stdin_event_handler_again_p = 0;
-	  (*call_readline) (client_data);
-	} while (call_stdin_event_handler_again_p != 0);
+	  ui->call_readline (client_data);
+	}
+      while (call_stdin_event_handler_again_p != 0);
     }
 }
 
+/* See top.h.  */
+
+void
+ui_register_input_event_handler (struct ui *ui)
+{
+  add_file_handler (ui->input_fd, stdin_event_handler, ui);
+}
+
+/* See top.h.  */
+
+void
+ui_unregister_input_event_handler (struct ui *ui)
+{
+  delete_file_handler (ui->input_fd);
+}
+
 /* Re-enable stdin after the end of an execution command in
    synchronous mode, or after an error from the target, and we aborted
    the exec operation.  */
@@ -441,14 +544,13 @@ stdin_event_handler (int error, gdb_clie
 void
 async_enable_stdin (void)
 {
-  if (sync_execution)
+  struct ui *ui = current_ui;
+
+  if (ui->prompt_state == PROMPT_BLOCKED)
     {
-      /* See NOTE in async_disable_stdin().  */
-      /* FIXME: cagney/1999-09-27: Call this before clearing
-	 sync_execution.  Current target_terminal_ours() implementations
-	 check for sync_execution before switching the terminal.  */
       target_terminal_ours ();
-      sync_execution = 0;
+      ui_register_input_event_handler (ui);
+      ui->prompt_state = PROMPT_NEEDED;
     }
 }
 
@@ -458,174 +560,141 @@ async_enable_stdin (void)
 void
 async_disable_stdin (void)
 {
-  sync_execution = 1;
+  struct ui *ui = current_ui;
+
+  ui->prompt_state = PROMPT_BLOCKED;
+  delete_file_handler (ui->input_fd);
 }
 
 
-/* Handles a gdb command.  This function is called by
-   command_line_handler, which has processed one or more input lines
-   into COMMAND.  */
-/* NOTE: 1999-04-30 This is the asynchronous version of the command_loop
-   function.  The command_loop function will be obsolete when we
-   switch to use the event loop at every execution of gdb.  */
-static void
+/* Handle a gdb command line.  This function is called when
+   handle_line_of_input has concatenated one or more input lines into
+   a whole command.  */
+
+void
 command_handler (char *command)
 {
-  int stdin_is_tty = ISATTY (stdin);
-  struct cleanup *stat_chain;
+  struct ui *ui = current_ui;
+  char *c;
 
-  clear_quit_flag ();
-  if (instream == stdin && stdin_is_tty)
+  if (ui->instream == ui->stdin_stream)
     reinitialize_more_filter ();
 
-  /* If readline returned a NULL command, it means that the connection
-     with the terminal is gone.  This happens at the end of a
-     testsuite run, after Expect has hung up but GDB is still alive.
-     In such a case, we just quit gdb killing the inferior program
-     too.  */
-  if (command == 0)
-    {
-      printf_unfiltered ("quit\n");
-      execute_command ("quit", stdin == instream);
-    }
-
-  stat_chain = make_command_stats_cleanup (1);
-
-  execute_command (command, instream == stdin);
+  scoped_command_stats stat_reporter (true);
 
-  /* Do any commands attached to breakpoint we stopped at.  */
-  bpstat_do_actions ();
+  /* Do not execute commented lines.  */
+  for (c = command; *c == ' ' || *c == '\t'; c++)
+    ;
+  if (c[0] != '#')
+    {
+      execute_command (command, ui->instream == ui->stdin_stream);
 
-  do_cleanups (stat_chain);
+      /* Do any commands attached to breakpoint we stopped at.  */
+      bpstat_do_actions ();
+    }
 }
 
-/* Handle a complete line of input.  This is called by the callback
-   mechanism within the readline library.  Deal with incomplete
-   commands as well, by saving the partial input in a global
-   buffer.  */
+/* Append RL, an input line returned by readline or one of its
+   emulations, to CMD_LINE_BUFFER.  Returns the command line if we
+   have a whole command line ready to be processed by the command
+   interpreter or NULL if the command line isn't complete yet (input
+   line ends in a backslash).  Takes ownership of RL.  */
 
-/* NOTE: 1999-04-30 This is the asynchronous version of the
-   command_line_input function; command_line_input will become
-   obsolete once we use the event loop as the default mechanism in
-   GDB.  */
-static void
-command_line_handler (char *rl)
+static char *
+command_line_append_input_line (struct buffer *cmd_line_buffer, char *rl)
 {
-  static char *linebuffer = 0;
-  static unsigned linelength = 0;
-  char *p;
-  char *p1;
-  char *nline;
-  int repeat = (instream == stdin);
+  char *cmd;
+  size_t len;
+
+  len = strlen (rl);
 
-  if (annotation_level > 1 && instream == stdin)
+  if (len > 0 && rl[len - 1] == '\\')
     {
-      printf_unfiltered (("\n\032\032post-"));
-      puts_unfiltered (async_annotation_suffix);
-      printf_unfiltered (("\n"));
+      /* Don't copy the backslash and wait for more.  */
+      buffer_grow (cmd_line_buffer, rl, len - 1);
+      cmd = NULL;
     }
-
-  if (linebuffer == 0)
+  else
     {
-      linelength = 80;
-      linebuffer = (char *) xmalloc (linelength);
-      linebuffer[0] = '\0';
+      /* Copy whole line including terminating null, and we're
+	 done.  */
+      buffer_grow (cmd_line_buffer, rl, len + 1);
+      cmd = cmd_line_buffer->buffer;
     }
 
-  p = linebuffer;
+  /* Allocated in readline.  */
+  xfree (rl);
 
-  if (more_to_come)
-    {
-      strcpy (linebuffer, readline_input_state.linebuffer);
-      p = readline_input_state.linebuffer_ptr;
-      xfree (readline_input_state.linebuffer);
-      more_to_come = 0;
-    }
+  return cmd;
+}
 
-#ifdef STOP_SIGNAL
-  if (job_control)
-    signal (STOP_SIGNAL, handle_stop_sig);
-#endif
+/* Handle a line of input coming from readline.
 
-  /* Make sure that all output has been output.  Some machines may let
-     you get away with leaving out some of the gdb_flush, but not
-     all.  */
-  wrap_here ("");
-  gdb_flush (gdb_stdout);
-  gdb_flush (gdb_stderr);
+   If the read line ends with a continuation character (backslash),
+   save the partial input in CMD_LINE_BUFFER (except the backslash),
+   and return NULL.  Otherwise, save the partial input and return a
+   pointer to CMD_LINE_BUFFER's buffer (null terminated), indicating a
+   whole command line is ready to be executed.
 
-  if (source_file_name != NULL)
-    ++source_line_number;
+   Returns EOF on end of file.
 
-  /* If we are in this case, then command_handler will call quit 
-     and exit from gdb.  */
-  if (!rl || rl == (char *) EOF)
-    {
-      command_handler (0);
-      return;			/* Lint.  */
-    }
-  if (strlen (rl) + 1 + (p - linebuffer) > linelength)
-    {
-      linelength = strlen (rl) + 1 + (p - linebuffer);
-      nline = (char *) xrealloc (linebuffer, linelength);
-      p += nline - linebuffer;
-      linebuffer = nline;
-    }
-  p1 = rl;
-  /* Copy line.  Don't copy null at end.  (Leaves line alone
-     if this was just a newline).  */
-  while (*p1)
-    *p++ = *p1++;
+   If REPEAT, handle command repetitions:
 
-  xfree (rl);			/* Allocated in readline.  */
+     - If the input command line is NOT empty, the command returned is
+       copied into the global 'saved_command_line' var so that it can
+       be repeated later.
 
-  if (p > linebuffer && *(p - 1) == '\\')
-    {
-      *p = '\0';
-      p--;			/* Put on top of '\'.  */
+     - OTOH, if the input command line IS empty, return the previously
+       saved command instead of the empty input line.
+*/
 
-      readline_input_state.linebuffer = xstrdup (linebuffer);
-      readline_input_state.linebuffer_ptr = p;
+char *
+handle_line_of_input (struct buffer *cmd_line_buffer,
+		      char *rl, int repeat, char *annotation_suffix)
+{
+  struct ui *ui = current_ui;
+  int from_tty = ui->instream == ui->stdin_stream;
+  char *p1;
+  char *cmd;
 
-      /* We will not invoke a execute_command if there is more
-	 input expected to complete the command.  So, we need to
-	 print an empty prompt here.  */
-      more_to_come = 1;
-      display_gdb_prompt ("");
-      return;
-    }
+  if (rl == NULL)
+    return (char *) EOF;
 
-#ifdef STOP_SIGNAL
-  if (job_control)
-    signal (STOP_SIGNAL, SIG_DFL);
-#endif
+  cmd = command_line_append_input_line (cmd_line_buffer, rl);
+  if (cmd == NULL)
+    return NULL;
+
+  /* We have a complete command line now.  Prepare for the next
+     command, but leave ownership of memory to the buffer .  */
+  cmd_line_buffer->used_size = 0;
+
+  if (from_tty && annotation_level > 1)
+    {
+      printf_unfiltered (("\n\032\032post-"));
+      puts_unfiltered (annotation_suffix);
+      printf_unfiltered (("\n"));
+    }
 
-#define SERVER_COMMAND_LENGTH 7
-  server_command =
-    (p - linebuffer > SERVER_COMMAND_LENGTH)
-    && strncmp (linebuffer, "server ", SERVER_COMMAND_LENGTH) == 0;
-  if (server_command)
-    {
-      /* Note that we don't set `line'.  Between this and the check in
-         dont_repeat, this insures that repeating will still do the
-         right thing.  */
-      *p = '\0';
-      command_handler (linebuffer + SERVER_COMMAND_LENGTH);
-      display_gdb_prompt (0);
-      return;
+#define SERVER_COMMAND_PREFIX "server "
+  if (startswith (cmd, SERVER_COMMAND_PREFIX))
+    {
+      /* Note that we don't set `saved_command_line'.  Between this
+         and the check in dont_repeat, this insures that repeating
+         will still do the right thing.  */
+      return cmd + strlen (SERVER_COMMAND_PREFIX);
     }
 
   /* Do history expansion if that is wished.  */
-  if (history_expansion_p && instream == stdin
-      && ISATTY (instream))
+  if (history_expansion_p && from_tty && input_interactive_p (current_ui))
     {
       char *history_value;
       int expanded;
 
-      *p = '\0';		/* Insert null now.  */
-      expanded = history_expand (linebuffer, &history_value);
+      expanded = history_expand (cmd, &history_value);
       if (expanded)
 	{
+	  size_t len;
+
 	  /* Print the changes.  */
 	  printf_unfiltered ("%s\n", history_value);
 
@@ -633,87 +702,102 @@ command_line_handler (char *rl)
 	  if (expanded < 0)
 	    {
 	      xfree (history_value);
-	      return;
+	      return cmd;
 	    }
-	  if (strlen (history_value) > linelength)
-	    {
-	      linelength = strlen (history_value) + 1;
-	      linebuffer = (char *) xrealloc (linebuffer, linelength);
-	    }
-	  strcpy (linebuffer, history_value);
-	  p = linebuffer + strlen (linebuffer);
+
+	  /* history_expand returns an allocated string.  Just replace
+	     our buffer with it.  */
+	  len = strlen (history_value);
+	  xfree (buffer_finish (cmd_line_buffer));
+	  cmd_line_buffer->buffer = history_value;
+	  cmd_line_buffer->buffer_size = len + 1;
+	  cmd = history_value;
 	}
-      xfree (history_value);
     }
 
   /* If we just got an empty line, and that is supposed to repeat the
-     previous command, return the value in the global buffer.  */
-  if (repeat && p == linebuffer && *p != '\\')
-    {
-      command_handler (saved_command_line);
-      display_gdb_prompt (0);
-      return;
-    }
+     previous command, return the previously saved command.  */
+  for (p1 = cmd; *p1 == ' ' || *p1 == '\t'; p1++)
+    ;
+  if (repeat && *p1 == '\0')
+    return saved_command_line;
+
+  /* Add command to history if appropriate.  Note: lines consisting
+     solely of comments are also added to the command history.  This
+     is useful when you type a command, and then realize you don't
+     want to execute it quite yet.  You can comment out the command
+     and then later fetch it from the value history and remove the
+     '#'.  The kill ring is probably better, but some people are in
+     the habit of commenting things out.  */
+  if (*cmd != '\0' && from_tty && input_interactive_p (current_ui))
+    gdb_add_history (cmd);
 
-  for (p1 = linebuffer; *p1 == ' ' || *p1 == '\t'; p1++);
-  if (repeat && !*p1)
+  /* Save into global buffer if appropriate.  */
+  if (repeat)
     {
-      command_handler (saved_command_line);
-      display_gdb_prompt (0);
-      return;
+      xfree (saved_command_line);
+      saved_command_line = xstrdup (cmd);
+      return saved_command_line;
     }
+  else
+    return cmd;
+}
 
-  *p = 0;
-
-  /* Add line to history if appropriate.  */
-  if (*linebuffer && input_from_terminal_p ())
-    gdb_add_history (linebuffer);
+/* Handle a complete line of input.  This is called by the callback
+   mechanism within the readline library.  Deal with incomplete
+   commands as well, by saving the partial input in a global
+   buffer.
 
-  /* Note: lines consisting solely of comments are added to the command
-     history.  This is useful when you type a command, and then
-     realize you don't want to execute it quite yet.  You can comment
-     out the command and then later fetch it from the value history
-     and remove the '#'.  The kill ring is probably better, but some
-     people are in the habit of commenting things out.  */
-  if (*p1 == '#')
-    *p1 = '\0';			/* Found a comment.  */
+   NOTE: This is the asynchronous version of the command_line_input
+   function.  */
 
-  /* Save into global buffer if appropriate.  */
-  if (repeat)
+void
+command_line_handler (char *rl)
+{
+  struct buffer *line_buffer = get_command_line_buffer ();
+  struct ui *ui = current_ui;
+  char *cmd;
+
+  cmd = handle_line_of_input (line_buffer, rl, 1, "prompt");
+  if (cmd == (char *) EOF)
+    {
+      /* stdin closed.  The connection with the terminal is gone.
+	 This happens at the end of a testsuite run, after Expect has
+	 hung up but GDB is still alive.  In such a case, we just quit
+	 gdb killing the inferior program too.  */
+      printf_unfiltered ("quit\n");
+      execute_command ("quit", 1);
+    }
+  else if (cmd == NULL)
     {
-      if (linelength > saved_command_line_size)
-	{
-	  saved_command_line = xrealloc (saved_command_line, linelength);
-	  saved_command_line_size = linelength;
-	}
-      strcpy (saved_command_line, linebuffer);
-      if (!more_to_come)
-	{
-	  command_handler (saved_command_line);
-	  display_gdb_prompt (0);
-	}
-      return;
+      /* We don't have a full line yet.  Print an empty prompt.  */
+      display_gdb_prompt ("");
     }
+  else
+    {
+      ui->prompt_state = PROMPT_NEEDED;
+
+      command_handler (cmd);
 
-  command_handler (linebuffer);
-  display_gdb_prompt (0);
-  return;
+      if (ui->prompt_state != PROMPTED)
+	display_gdb_prompt (0);
+    }
 }
 
 /* Does reading of input from terminal w/o the editing features
-   provided by the readline library.  */
+   provided by the readline library.  Calls the line input handler
+   once we have a whole input line.  */
 
-/* NOTE: 1999-04-30 Asynchronous version of gdb_readline; gdb_readline
-   will become obsolete when the event loop is made the default
-   execution for gdb.  */
 void
-gdb_readline2 (gdb_client_data client_data)
+gdb_readline_no_editing_callback (gdb_client_data client_data)
 {
   int c;
   char *result;
-  int input_index = 0;
-  int result_size = 80;
+  struct buffer line_buffer;
   static int done_once = 0;
+  struct ui *ui = current_ui;
+
+  buffer_init (&line_buffer);
 
   /* Unbuffer the input stream, so that, later on, the calls to fgetc
      fetch only one char at the time from the stream.  The fgetc's will
@@ -721,59 +805,63 @@ gdb_readline2 (gdb_client_data client_da
      stream after '\n'.  If we buffer the input and fgetc drains the
      stream, getting stuff beyond the newline as well, a select, done
      afterwards will not trigger.  */
-  if (!done_once && !ISATTY (instream))
+  if (!done_once && !ISATTY (ui->instream))
     {
-      setbuf (instream, NULL);
+      setbuf (ui->instream, NULL);
       done_once = 1;
     }
 
-  result = (char *) xmalloc (result_size);
-
   /* We still need the while loop here, even though it would seem
-     obvious to invoke gdb_readline2 at every character entered.  If
-     not using the readline library, the terminal is in cooked mode,
-     which sends the characters all at once.  Poll will notice that the
-     input fd has changed state only after enter is pressed.  At this
-     point we still need to fetch all the chars entered.  */
+     obvious to invoke gdb_readline_no_editing_callback at every
+     character entered.  If not using the readline library, the
+     terminal is in cooked mode, which sends the characters all at
+     once.  Poll will notice that the input fd has changed state only
+     after enter is pressed.  At this point we still need to fetch all
+     the chars entered.  */
 
   while (1)
     {
       /* Read from stdin if we are executing a user defined command.
          This is the right thing for prompt_for_continue, at least.  */
-      c = fgetc (instream ? instream : stdin);
+      c = fgetc (ui->instream != NULL ? ui->instream : ui->stdin_stream);
 
       if (c == EOF)
 	{
-	  if (input_index > 0)
-	    /* The last line does not end with a newline.  Return it,
-	       and if we are called again fgetc will still return EOF
-	       and we'll return NULL then.  */
-	    break;
-	  xfree (result);
-	  (*input_handler) (0);
+	  if (line_buffer.used_size > 0)
+	    {
+	      /* The last line does not end with a newline.  Return it, and
+		 if we are called again fgetc will still return EOF and
+		 we'll return NULL then.  */
+	      break;
+	    }
+	  xfree (buffer_finish (&line_buffer));
+	  ui->input_handler (NULL);
 	  return;
 	}
 
       if (c == '\n')
 	{
-	  if (input_index > 0 && result[input_index - 1] == '\r')
-	    input_index--;
+	  if (line_buffer.used_size > 0
+	      && line_buffer.buffer[line_buffer.used_size - 1] == '\r')
+	    line_buffer.used_size--;
 	  break;
 	}
 
-      result[input_index++] = c;
-      while (input_index >= result_size)
-	{
-	  result_size *= 2;
-	  result = (char *) xrealloc (result, result_size);
-	}
+      buffer_grow_char (&line_buffer, c);
     }
 
-  result[input_index++] = '\0';
-  (*input_handler) (result);
+  buffer_grow_char (&line_buffer, '\0');
+  result = buffer_finish (&line_buffer);
+  ui->input_handler (result);
 }
 
 
+/* The serial event associated with the QUIT flag.  set_quit_flag sets
+   this, and check_quit_flag clears it.  Used by interruptible_select
+   to be able to do interruptible I/O with no race with the SIGINT
+   handler.  */
+static struct serial_event *quit_serial_event;
+
 /* Initialization of signal handlers and tokens.  There is a function
    handle_sig* for each of the signals GDB cares about.  Specifically:
    SIGINT, SIGFPE, SIGQUIT, SIGTSTP, SIGHUP, SIGWINCH.  These
@@ -789,6 +877,10 @@ gdb_readline2 (gdb_client_data client_da
 void
 async_init_signals (void)
 {
+  initialize_async_signal_handlers ();
+
+  quit_serial_event = make_serial_event ();
+
   signal (SIGINT, handle_sigint);
   sigint_token =
     create_async_signal_handler (async_request_quit, NULL);
@@ -833,8 +925,95 @@ async_init_signals (void)
 #endif
 }
 
-/* Tell the event loop what to do if SIGINT is received.
-   See event-signal.c.  */
+/* See defs.h.  */
+
+void
+quit_serial_event_set (void)
+{
+  serial_event_set (quit_serial_event);
+}
+
+/* See defs.h.  */
+
+void
+quit_serial_event_clear (void)
+{
+  serial_event_clear (quit_serial_event);
+}
+
+/* Return the selectable file descriptor of the serial event
+   associated with the quit flag.  */
+
+static int
+quit_serial_event_fd (void)
+{
+  return serial_event_fd (quit_serial_event);
+}
+
+/* See defs.h.  */
+
+void
+default_quit_handler (void)
+{
+  if (check_quit_flag ())
+    {
+      if (target_terminal_is_ours ())
+	quit ();
+      else
+	target_pass_ctrlc ();
+    }
+}
+
+/* See defs.h.  */
+quit_handler_ftype *quit_handler = default_quit_handler;
+
+/* Data for make_cleanup_override_quit_handler.  Wrap the previous
+   handler pointer in a data struct because it's not portable to cast
+   a function pointer to a data pointer, which is what make_cleanup
+   expects.  */
+struct quit_handler_cleanup_data
+{
+  /* The previous quit handler.  */
+  quit_handler_ftype *prev_handler;
+};
+
+/* Cleanup call that restores the previous quit handler.  */
+
+static void
+restore_quit_handler (void *arg)
+{
+  struct quit_handler_cleanup_data *data
+    = (struct quit_handler_cleanup_data *) arg;
+
+  quit_handler = data->prev_handler;
+}
+
+/* Destructor for the quit handler cleanup.  */
+
+static void
+restore_quit_handler_dtor (void *arg)
+{
+  xfree (arg);
+}
+
+/* See defs.h.  */
+
+struct cleanup *
+make_cleanup_override_quit_handler (quit_handler_ftype *new_quit_handler)
+{
+  struct cleanup *old_chain;
+  struct quit_handler_cleanup_data *data;
+
+  data = XNEW (struct quit_handler_cleanup_data);
+  data->prev_handler = quit_handler;
+  old_chain = make_cleanup_dtor (restore_quit_handler, data,
+				 restore_quit_handler_dtor);
+  quit_handler = new_quit_handler;
+  return old_chain;
+}
+
+/* Handle a SIGINT.  */
+
 void
 handle_sigint (int sig)
 {
@@ -844,18 +1023,47 @@ handle_sigint (int sig)
      it may be quite a while before we get back to the event loop.  So
      set quit_flag to 1 here.  Then if QUIT is called before we get to
      the event loop, we will unwind as expected.  */
-
   set_quit_flag ();
 
-  /* If immediate_quit is set, we go ahead and process the SIGINT right
-     away, even if we usually would defer this to the event loop.  The
-     assumption here is that it is safe to process ^C immediately if
-     immediate_quit is set.  If we didn't, SIGINT would be really
-     processed only the next time through the event loop.  To get to
-     that point, though, the command that we want to interrupt needs to
-     finish first, which is unacceptable.  If immediate quit is not set,
-     we process SIGINT the next time through the loop, which is fine.  */
-  gdb_call_async_signal_handler (sigint_token, immediate_quit);
+  /* In case nothing calls QUIT before the event loop is reached, the
+     event loop handles it.  */
+  mark_async_signal_handler (sigint_token);
+}
+
+/* See gdb_select.h.  */
+
+int
+interruptible_select (int n,
+		      fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+		      struct timeval *timeout)
+{
+  fd_set my_readfds;
+  int fd;
+  int res;
+
+  if (readfds == NULL)
+    {
+      readfds = &my_readfds;
+      FD_ZERO (&my_readfds);
+    }
+
+  fd = quit_serial_event_fd ();
+  FD_SET (fd, readfds);
+  if (n <= fd)
+    n = fd + 1;
+
+  do
+    {
+      res = gdb_select (n, readfds, writefds, exceptfds, timeout);
+    }
+  while (res == -1 && errno == EINTR);
+
+  if (res == 1 && FD_ISSET (fd, readfds))
+    {
+      errno = EINTR;
+      return -1;
+    }
+  return res;
 }
 
 /* Handle GDB exit upon receiving SIGTERM if target_can_async_p ().  */
@@ -863,7 +1071,7 @@ handle_sigint (int sig)
 static void
 async_sigterm_handler (gdb_client_data arg)
 {
-  quit_force (NULL, stdin == instream);
+  quit_force (NULL, 0);
 }
 
 /* See defs.h.  */
@@ -876,15 +1084,10 @@ handle_sigterm (int sig)
 {
   signal (sig, handle_sigterm);
 
-  /* Call quit_force in a signal safe way.
-     quit_force itself is not signal safe.  */
-  if (target_can_async_p ())
-    mark_async_signal_handler (async_sigterm_token);
-  else
-    {
-      sync_quit_force_run = 1;
-      set_quit_flag ();
-    }
+  sync_quit_force_run = 1;
+  set_quit_flag ();
+
+  mark_async_signal_handler (async_sigterm_token);
 }
 
 /* Do the quit.  All the checks have been done by the caller.  */
@@ -895,9 +1098,7 @@ async_request_quit (gdb_client_data arg)
      back here, that means that an exception was thrown to unwind the
      current command before we got back to the event loop.  So there
      is no reason to call quit again here.  */
-
-  if (check_quit_flag ())
-    quit ();
+  QUIT;
 }
 
 #ifdef SIGQUIT
@@ -1021,78 +1222,66 @@ async_float_handler (gdb_client_data arg
 }
 
 
-/* Called by do_setshow_command.  */
-void
-set_async_editing_command (char *args, int from_tty,
-			   struct cmd_list_element *c)
-{
-  change_line_handler ();
-}
-
 /* Set things up for readline to be invoked via the alternate
-   interface, i.e. via a callback function (rl_callback_read_char),
-   and hook up instream to the event loop.  */
+   interface, i.e. via a callback function
+   (gdb_rl_callback_read_char), and hook up instream to the event
+   loop.  */
+
 void
-gdb_setup_readline (void)
+gdb_setup_readline (int editing)
 {
+  struct ui *ui = current_ui;
+
   /* This function is a noop for the sync case.  The assumption is
      that the sync setup is ALL done in gdb_init, and we would only
      mess it up here.  The sync stuff should really go away over
      time.  */
   if (!batch_silent)
-    gdb_stdout = stdio_fileopen (stdout);
-  gdb_stderr = stderr_fileopen ();
+    gdb_stdout = new stdio_file (ui->outstream);
+  gdb_stderr = new stderr_file (ui->errstream);
   gdb_stdlog = gdb_stderr;  /* for moment */
   gdb_stdtarg = gdb_stderr; /* for moment */
   gdb_stdtargerr = gdb_stderr; /* for moment */
 
-  /* If the input stream is connected to a terminal, turn on
-     editing.  */
-  if (ISATTY (instream))
+  /* If the input stream is connected to a terminal, turn on editing.
+     However, that is only allowed on the main UI, as we can only have
+     one instance of readline.  */
+  if (ISATTY (ui->instream) && editing && ui == main_ui)
     {
       /* Tell gdb that we will be using the readline library.  This
 	 could be overwritten by a command in .gdbinit like 'set
 	 editing on' or 'off'.  */
-      async_command_editing_p = 1;
-	  
+      ui->command_editing = 1;
+
       /* When a character is detected on instream by select or poll,
 	 readline will be invoked via this callback function.  */
-      call_readline = rl_callback_read_char_wrapper;
+      ui->call_readline = gdb_rl_callback_read_char_wrapper;
+
+      /* Tell readline to use the same input stream that gdb uses.  */
+      rl_instream = ui->instream;
     }
   else
     {
-      async_command_editing_p = 0;
-      call_readline = gdb_readline2;
+      ui->command_editing = 0;
+      ui->call_readline = gdb_readline_no_editing_callback;
     }
-  
-  /* When readline has read an end-of-line character, it passes the
-     complete line to gdb for processing; command_line_handler is the
-     function that does this.  */
-  input_handler = command_line_handler;
-      
-  /* Tell readline to use the same input stream that gdb uses.  */
-  rl_instream = instream;
-
-  /* Get a file descriptor for the input stream, so that we can
-     register it with the event loop.  */
-  input_fd = fileno (instream);
-
-  /* Now we need to create the event sources for the input file
-     descriptor.  */
-  /* At this point in time, this is the only event source that we
-     register with the even loop.  Another source is going to be the
-     target program (inferior), but that must be registered only when
-     it actually exists (I.e. after we say 'run' or after we connect
-     to a remote target.  */
-  add_file_handler (input_fd, stdin_event_handler, 0);
+
+  /* Now create the event source for this UI's input file descriptor.
+     Another source is going to be the target program (inferior), but
+     that must be registered only when it actually exists (I.e. after
+     we say 'run' or after we connect to a remote target.  */
+  ui_register_input_event_handler (ui);
 }
 
 /* Disable command input through the standard CLI channels.  Used in
    the suspend proc for interpreters that use the standard gdb readline
    interface, like the cli & the mi.  */
+
 void
 gdb_disable_readline (void)
 {
+  struct ui *ui = current_ui;
+
   /* FIXME - It is too heavyweight to delete and remake these every
      time you run an interpreter that needs readline.  It is probably
      better to have the interpreters cache these, which in turn means
@@ -1106,6 +1295,7 @@ gdb_disable_readline (void)
   gdb_stdtargerr = NULL;
 #endif
 
-  gdb_rl_callback_handler_remove ();
-  delete_file_handler (input_fd);
+  if (ui->command_editing)
+    gdb_rl_callback_handler_remove ();
+  delete_file_handler (ui->input_fd);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-top.h ./gdb/event-top.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/event-top.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/event-top.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions used by event-top.c, for GDB, the GNU debugger.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
@@ -28,11 +28,13 @@ struct cmd_list_element;
    FIXME: these should really go into top.h.  */
 
 extern void display_gdb_prompt (const char *new_prompt);
-void gdb_setup_readline (void);
-void gdb_disable_readline (void);
+extern void gdb_setup_readline (int);
+extern void gdb_disable_readline (void);
 extern void async_init_signals (void);
-extern void set_async_editing_command (char *args, int from_tty,
-				       struct cmd_list_element *c);
+extern void change_line_handler (int);
+
+extern void command_line_handler (char *rl);
+extern void command_handler (char *command);
 
 /* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT.  */
 #ifndef STOP_SIGNAL
@@ -44,7 +46,6 @@ extern void handle_stop_sig (int sig);
 #endif
 extern void handle_sigint (int sig);
 extern void handle_sigterm (int sig);
-extern void gdb_readline2 (void *client_data);
 extern void async_request_quit (void *arg);
 extern void stdin_event_handler (int error, void *client_data);
 extern void async_disable_stdin (void);
@@ -53,15 +54,12 @@ extern void async_enable_stdin (void);
 /* Exported variables from event-top.c.
    FIXME: these should really go into top.h.  */
 
-extern int async_command_editing_p;
+extern int set_editing_cmd_var;
 extern int exec_done_display_p;
-extern char *async_annotation_suffix;
 extern struct prompts the_prompts;
-extern void (*call_readline) (void *);
-extern void (*input_handler) (char *);
-extern int input_fd;
 extern void (*after_char_processing_hook) (void);
 extern int call_stdin_event_handler_again_p;
+extern void gdb_readline_no_editing_callback (void *client_data);
 
 /* Wrappers for rl_callback_handler_remove and
    rl_callback_handler_install that keep track of whether the callback
@@ -74,6 +72,4 @@ extern void gdb_rl_callback_handler_inst
    currently installed.  */
 extern void gdb_rl_callback_handler_reinstall (void);
 
-extern void cli_command_loop (void *);
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exceptions.c ./gdb/exceptions.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exceptions.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/exceptions.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Exception (throw catch) mechanism, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,24 +26,23 @@
 #include "ui-out.h"
 #include "serial.h"
 #include "gdbthread.h"
-
-void
-prepare_to_throw_exception (void)
-{
-  clear_quit_flag ();
-  immediate_quit = 0;
-}
+#include "top.h"
 
 static void
 print_flush (void)
 {
+  struct ui *ui = current_ui;
   struct serial *gdb_stdout_serial;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 
   if (deprecated_error_begin_hook)
     deprecated_error_begin_hook ();
 
   if (target_supports_terminal_ours ())
-    target_terminal_ours ();
+    {
+      make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+    }
 
   /* We want all output to appear now, before we print the error.  We
      have 3 levels of buffering we have to flush (it's possible that
@@ -59,7 +58,7 @@ print_flush (void)
   gdb_flush (gdb_stderr);
 
   /* 3.  The system-level buffer.  */
-  gdb_stdout_serial = serial_fdopen (1);
+  gdb_stdout_serial = serial_fdopen (fileno (ui->outstream));
   if (gdb_stdout_serial)
     {
       serial_drain_output (gdb_stdout_serial);
@@ -67,6 +66,8 @@ print_flush (void)
     }
 
   annotate_error_begin ();
+
+  do_cleanups (old_chain);
 }
 
 static void
@@ -143,12 +144,7 @@ exception_fprintf (struct ui_file *file,
    returned by catch_exceptions().  It is an internal_error() for
    FUNC() to return a negative value.
 
-   See exceptions.h for further usage details.
-
-   Must not be called with immediate_quit in effect (bad things might
-   happen, say we got a signal in the middle of a memcpy to quit_return).
-   This is an OK restriction; with very few exceptions immediate_quit can
-   be replaced by judicious use of QUIT.  */
+   See exceptions.h for further usage details.  */
 
 /* MAYBE: cagney/1999-11-05: catch_errors() in conjunction with
    error() et al. could maintain a set of flags that indicate the
@@ -260,3 +256,21 @@ catch_errors (catch_errors_ftype *func, 
     return 0;
   return val;
 }
+
+/* See exceptions.h.  */
+
+int
+exception_print_same (struct gdb_exception e1, struct gdb_exception e2)
+{
+  const char *msg1 = e1.message;
+  const char *msg2 = e2.message;
+
+  if (msg1 == NULL)
+    msg1 = "";
+  if (msg2 == NULL)
+    msg2 = "";
+
+  return (e1.reason == e2.reason
+	  && e1.error == e2.error
+	  && strcmp (msg1, msg2) == 0);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exceptions.h ./gdb/exceptions.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exceptions.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/exceptions.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Exception (throw catch) mechanism, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -88,4 +88,7 @@ extern int catch_exceptions_with_msg (st
 typedef int (catch_errors_ftype) (void *);
 extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
 
+/* Compare two exception objects for print equality.  */
+extern int exception_print_same (struct gdb_exception e1,
+				 struct gdb_exception e2);
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exec.c ./gdb/exec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/exec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Work with executable files, for GDB. 
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,6 +43,7 @@
 #include <ctype.h>
 #include <sys/stat.h>
 #include "solist.h"
+#include <algorithm>
 
 void (*deprecated_file_changed_hook) (char *);
 
@@ -135,43 +136,100 @@ exec_file_clear (int from_tty)
     printf_unfiltered (_("No executable file now.\n"));
 }
 
+/* See exec.h.  */
+
+void
+try_open_exec_file (const char *exec_file_host, struct inferior *inf,
+		    symfile_add_flags add_flags)
+{
+  struct cleanup *old_chain;
+  struct gdb_exception prev_err = exception_none;
+
+  old_chain = make_cleanup (free_current_contents, &prev_err.message);
+
+  /* exec_file_attach and symbol_file_add_main may throw an error if the file
+     cannot be opened either locally or remotely.
+
+     This happens for example, when the file is first found in the local
+     sysroot (above), and then disappears (a TOCTOU race), or when it doesn't
+     exist in the target filesystem, or when the file does exist, but
+     is not readable.
+
+     Even without a symbol file, the remote-based debugging session should
+     continue normally instead of ending abruptly.  Hence we catch thrown
+     errors/exceptions in the following code.  */
+  TRY
+    {
+      /* We must do this step even if exec_file_host is NULL, so that
+	 exec_file_attach will clear state.  */
+      exec_file_attach (exec_file_host, add_flags & SYMFILE_VERBOSE);
+    }
+  CATCH (err, RETURN_MASK_ERROR)
+    {
+      if (err.message != NULL)
+	warning ("%s", err.message);
+
+      prev_err = err;
+
+      /* Save message so it doesn't get trashed by the catch below.  */
+      if (err.message != NULL)
+	prev_err.message = xstrdup (err.message);
+    }
+  END_CATCH
+
+  if (exec_file_host != NULL)
+    {
+      TRY
+	{
+	  symbol_file_add_main (exec_file_host, add_flags);
+	}
+      CATCH (err, RETURN_MASK_ERROR)
+	{
+	  if (!exception_print_same (prev_err, err))
+	    warning ("%s", err.message);
+	}
+      END_CATCH
+    }
+
+  do_cleanups (old_chain);
+}
+
 /* See gdbcore.h.  */
 
 void
-exec_file_locate_attach (int pid, int from_tty)
+exec_file_locate_attach (int pid, int defer_bp_reset, int from_tty)
 {
-  char *exec_file, *full_exec_path = NULL;
+  char *exec_file_target, *exec_file_host;
+  struct cleanup *old_chain;
+  symfile_add_flags add_flags = 0;
 
   /* Do nothing if we already have an executable filename.  */
-  exec_file = (char *) get_exec_file (0);
-  if (exec_file != NULL)
+  if (get_exec_file (0) != NULL)
     return;
 
   /* Try to determine a filename from the process itself.  */
-  exec_file = target_pid_to_exec_file (pid);
-  if (exec_file == NULL)
-    return;
-
-  /* If gdb_sysroot is not empty and the discovered filename
-     is absolute then prefix the filename with gdb_sysroot.  */
-  if (*gdb_sysroot != '\0' && IS_ABSOLUTE_PATH (exec_file))
-    full_exec_path = exec_file_find (exec_file, NULL);
-
-  if (full_exec_path == NULL)
-    {
-      /* It's possible we don't have a full path, but rather just a
-	 filename.  Some targets, such as HP-UX, don't provide the
-	 full path, sigh.
-
-	 Attempt to qualify the filename against the source path.
-	 (If that fails, we'll just fall back on the original
-	 filename.  Not much more we can do...)  */
-      if (!source_full_path_of (exec_file, &full_exec_path))
-	full_exec_path = xstrdup (exec_file);
+  exec_file_target = target_pid_to_exec_file (pid);
+  if (exec_file_target == NULL)
+    {
+      warning (_("No executable has been specified and target does not "
+		 "support\n"
+		 "determining executable automatically.  "
+		 "Try using the \"file\" command."));
+      return;
     }
 
-  exec_file_attach (full_exec_path, from_tty);
-  symbol_file_add_main (full_exec_path, from_tty);
+  exec_file_host = exec_file_find (exec_file_target, NULL);
+  old_chain = make_cleanup (xfree, exec_file_host);
+
+  if (defer_bp_reset)
+    add_flags |= SYMFILE_DEFER_BP_RESET;
+
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
+
+  /* Attempt to open the exec file.  */
+  try_open_exec_file (exec_file_host, current_inferior (), add_flags);
+  do_cleanups (old_chain);
 }
 
 /* Set FILENAME as the new exec file.
@@ -200,7 +258,9 @@ exec_file_attach (const char *filename, 
      this at the end of the function; but acquiring it now lets the
      BFD cache return it if this call refers to the same file.  */
   gdb_bfd_ref (exec_bfd);
-  cleanups = make_cleanup_bfd_unref (exec_bfd);
+  gdb_bfd_ref_ptr exec_bfd_holder (exec_bfd);
+
+  cleanups = make_cleanup (null_cleanup, NULL);
 
   /* Remove any previous exec file.  */
   exec_close ();
@@ -254,7 +314,7 @@ exec_file_attach (const char *filename, 
 #if defined(__GO32__) || defined(_WIN32) || defined(__CYGWIN__)
 	  if (scratch_chan < 0)
 	    {
-	      char *exename = alloca (strlen (filename) + 5);
+	      char *exename = (char *) alloca (strlen (filename) + 5);
 
 	      strcat (strcpy (exename, filename), ".exe");
 	      scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST,
@@ -275,15 +335,17 @@ exec_file_attach (const char *filename, 
 	  make_cleanup (xfree, canonical_pathname);
 	}
 
+      gdb_bfd_ref_ptr temp;
       if (write_files && !load_via_target)
-	exec_bfd = gdb_bfd_fopen (canonical_pathname, gnutarget,
-				  FOPEN_RUB, scratch_chan);
+	temp = gdb_bfd_fopen (canonical_pathname, gnutarget,
+			      FOPEN_RUB, scratch_chan);
       else
-	exec_bfd = gdb_bfd_open (canonical_pathname, gnutarget, scratch_chan);
+	temp = gdb_bfd_open (canonical_pathname, gnutarget, scratch_chan);
+      exec_bfd = temp.release ();
 
       if (!exec_bfd)
 	{
-	  error (_("\"%s\": could not open as an executable file: %s"),
+	  error (_("\"%s\": could not open as an executable file: %s."),
 		 scratch_pathname, bfd_errmsg (bfd_get_error ()));
 	}
 
@@ -453,8 +515,8 @@ resize_section_table (struct target_sect
 
   if (new_count)
     {
-      table->sections = xrealloc (table->sections,
-				  sizeof (struct target_section) * new_count);
+      table->sections = XRESIZEVEC (struct target_section, table->sections,
+				    new_count);
       table->sections_end = table->sections + new_count;
     }
   else
@@ -475,7 +537,7 @@ build_section_table (struct bfd *some_bf
   count = bfd_count_sections (some_bfd);
   if (*start)
     xfree (* start);
-  *start = (struct target_section *) xmalloc (count * sizeof (**start));
+  *start = XNEWVEC (struct target_section, count);
   *end = *start;
   bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
   if (*end > *start + count)
@@ -688,8 +750,8 @@ section_table_available_memory (VEC(mem_
 
 	  r = VEC_safe_push (mem_range_s, memory, NULL);
 
-	  r->start = max (lo1, lo2);
-	  r->length = min (hi1, hi2) - r->start;
+	  r->start = std::max (lo1, lo2);
+	  r->length = std::min (hi1, hi2) - r->start;
 	}
     }
 
@@ -727,7 +789,7 @@ section_table_read_available_memory (gdb
 	  enum target_xfer_status status;
 
 	  /* Get the intersection window.  */
-	  end = min (offset + len, r->start + r->length);
+	  end = std::min<CORE_ADDR> (offset + len, r->start + r->length);
 
 	  gdb_assert (end - offset <= len);
 
@@ -1005,6 +1067,16 @@ ignore (struct target_ops *ops, struct g
   return 0;
 }
 
+/* Implement the to_remove_breakpoint method.  */
+
+static int
+exec_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
+			struct bp_target_info *bp_tgt,
+			enum remove_bp_reason reason)
+{
+  return 0;
+}
+
 static int
 exec_has_memory (struct target_ops *ops)
 {
@@ -1036,7 +1108,7 @@ Specify the filename of the executable f
   exec_ops.to_get_section_table = exec_get_section_table;
   exec_ops.to_files_info = exec_files_info;
   exec_ops.to_insert_breakpoint = ignore;
-  exec_ops.to_remove_breakpoint = ignore;
+  exec_ops.to_remove_breakpoint = exec_remove_breakpoint;
   exec_ops.to_stratum = file_stratum;
   exec_ops.to_has_memory = exec_has_memory;
   exec_ops.to_make_corefile_notes = exec_make_note_section;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exec.h ./gdb/exec.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/exec.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/exec.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Work with executable files, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 #include "target.h"
 #include "progspace.h"
 #include "memrange.h"
+#include "symfile-add-flags.h"
 
 struct target_section;
 struct target_ops;
@@ -113,4 +114,11 @@ extern void print_section_info (struct t
 
 extern void exec_close (void);
 
+/* Helper function that attempts to open the symbol file at EXEC_FILE_HOST.
+   If successful, it proceeds to add the symbol file as the main symbol file.
+
+   ADD_FLAGS is passed on to the function adding the symbol file.  */
+extern void try_open_exec_file (const char *exec_file_host,
+				struct inferior *inf,
+				symfile_add_flags add_flags);
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/expprint.c ./gdb/expprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/expprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/expprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Print in infix form a struct expression.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -240,7 +240,7 @@ print_subexp_standard (struct expression
 	  {
 	    char *s, *nextS;
 
-	    s = alloca (strlen (selector) + 1);
+	    s = (char *) alloca (strlen (selector) + 1);
 	    strcpy (s, selector);
 	    for (tem = 0; tem < nargs; tem++)
 	      {
@@ -280,7 +280,7 @@ print_subexp_standard (struct expression
 	     a simple string, revert back to array printing.  Note that
 	     the last expression element is an explicit null terminator
 	     byte, which doesn't get printed.  */
-	  tempstr = alloca (nargs);
+	  tempstr = (char *) alloca (nargs);
 	  pc += 4;
 	  while (tem < nargs)
 	    {
@@ -559,6 +559,26 @@ print_subexp_standard (struct expression
 	return;
       }
 
+    case OP_RANGE:
+      {
+	enum range_type range_type;
+
+	range_type = (enum range_type)
+	  longest_to_int (exp->elts[pc + 1].longconst);
+	*pos += 2;
+
+	fputs_filtered ("RANGE(", stream);
+	if (range_type == HIGH_BOUND_DEFAULT
+	    || range_type == NONE_BOUND_DEFAULT)
+	  print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
+	fputs_filtered ("..", stream);
+	if (range_type == LOW_BOUND_DEFAULT
+	    || range_type == NONE_BOUND_DEFAULT)
+	  print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
+	fputs_filtered (")", stream);
+	return;
+      }
+
       /* Default ops */
 
     default:
@@ -1025,6 +1045,42 @@ dump_subexp_body_standard (struct expres
 	elt += 2;
       }
       break;
+    case OP_RANGE:
+      {
+	enum range_type range_type;
+
+	range_type = (enum range_type)
+	  longest_to_int (exp->elts[elt].longconst);
+	elt += 2;
+
+	switch (range_type)
+	  {
+	  case BOTH_BOUND_DEFAULT:
+	    fputs_filtered ("Range '..'", stream);
+	    break;
+	  case LOW_BOUND_DEFAULT:
+	    fputs_filtered ("Range '..EXP'", stream);
+	    break;
+	  case HIGH_BOUND_DEFAULT:
+	    fputs_filtered ("Range 'EXP..'", stream);
+	    break;
+	  case NONE_BOUND_DEFAULT:
+	    fputs_filtered ("Range 'EXP..EXP'", stream);
+	    break;
+	  default:
+	    fputs_filtered ("Invalid Range!", stream);
+	    break;
+	  }
+
+	if (range_type == HIGH_BOUND_DEFAULT
+	    || range_type == NONE_BOUND_DEFAULT)
+	  elt = dump_subexp (exp, stream, elt);
+	if (range_type == LOW_BOUND_DEFAULT
+	    || range_type == NONE_BOUND_DEFAULT)
+	  elt = dump_subexp (exp, stream, elt);
+      }
+      break;
+
     default:
     case OP_NULL:
     case MULTI_SUBSCRIPT:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/expression.h ./gdb/expression.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/expression.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/expression.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for expressions stored in reversed prefix form, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -85,6 +85,8 @@ struct expression
     union exp_element elts[1];
   };
 
+typedef gdb::unique_xmalloc_ptr<expression> expression_up;
+
 /* Macros for converting between number of expression elements and bytes
    to store that many expression elements.  */
 
@@ -95,16 +97,16 @@ struct expression
 
 /* From parse.c */
 
-extern struct expression *parse_expression (const char *);
+extern expression_up parse_expression (const char *);
 
-extern struct expression *parse_expression_with_language (const char *string,
-							  enum language lang);
+extern expression_up parse_expression_with_language (const char *string,
+						     enum language lang);
 
 extern struct type *parse_expression_for_completion (const char *, char **,
 						     enum type_code *);
 
-extern struct expression *parse_exp_1 (const char **, CORE_ADDR pc,
-				       const struct block *, int);
+extern expression_up parse_exp_1 (const char **, CORE_ADDR pc,
+				  const struct block *, int);
 
 /* For use by parsers; set if we want to parse an expression and
    attempt completion.  */
@@ -152,4 +154,17 @@ extern void dump_raw_expression (struct 
 				 struct ui_file *, char *);
 extern void dump_prefix_expression (struct expression *, struct ui_file *);
 
+/* In an OP_RANGE expression, either bound could be empty, indicating
+   that its value is by default that of the corresponding bound of the
+   array or string.  So we have four sorts of subrange.  This
+   enumeration type is to identify this.  */
+   
+enum range_type
+  {
+    BOTH_BOUND_DEFAULT,		/* "(:)"  */
+    LOW_BOUND_DEFAULT,		/* "(:high)"  */
+    HIGH_BOUND_DEFAULT,		/* "(low:)"  */
+    NONE_BOUND_DEFAULT		/* "(low:high)"  */
+  };
+
 #endif /* !defined (EXPRESSION_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension.c ./gdb/extension.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/extension.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between gdb and its extension languages.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 
 #include "defs.h"
 #include <signal.h>
+#include "target.h"
 #include "auto-load.h"
 #include "breakpoint.h"
 #include "event-top.h"
@@ -477,11 +478,11 @@ free_ext_lang_type_printers (struct ext_
   xfree (printers);
 }
 
-/* Try to pretty-print a value of type TYPE located at VALADDR
-   + EMBEDDED_OFFSET, which came from the inferior at address ADDRESS
-   + EMBEDDED_OFFSET, onto stdio stream STREAM according to OPTIONS.
-   VAL is the whole object that came from ADDRESS.  VALADDR must point to
-   the head of VAL's contents buffer.
+/* Try to pretty-print a value of type TYPE located at VAL's contents
+   buffer + EMBEDDED_OFFSET, which came from the inferior at address
+   ADDRESS + EMBEDDED_OFFSET, onto stdio stream STREAM according to
+   OPTIONS.
+   VAL is the whole object that came from ADDRESS.
    Returns non-zero if the value was successfully pretty-printed.
 
    Extension languages are tried in the order specified by
@@ -495,10 +496,10 @@ free_ext_lang_type_printers (struct ext_
    errors that trigger an exception in the extension language.  */
 
 int
-apply_ext_lang_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
-				   int embedded_offset, CORE_ADDR address,
+apply_ext_lang_val_pretty_printer (struct type *type,
+				   LONGEST embedded_offset, CORE_ADDR address,
 				   struct ui_file *stream, int recurse,
-				   const struct value *val,
+				   struct value *val,
 				   const struct value_print_options *options,
 				   const struct language_defn *language)
 {
@@ -511,7 +512,7 @@ apply_ext_lang_val_pretty_printer (struc
 
       if (extlang->ops->apply_val_pretty_printer == NULL)
 	continue;
-      rc = extlang->ops->apply_val_pretty_printer (extlang, type, valaddr,
+      rc = extlang->ops->apply_val_pretty_printer (extlang, type,
 						   embedded_offset, address,
 						   stream, recurse, val,
 						   options, language);
@@ -707,7 +708,7 @@ static void
 install_gdb_sigint_handler (struct signal_handler *previous)
 {
   /* Save here to simplify comparison.  */
-  RETSIGTYPE (*handle_sigint_for_compare) () = handle_sigint;
+  sighandler_t handle_sigint_for_compare = handle_sigint;
 
   previous->handler = signal (SIGINT, handle_sigint);
   if (previous->handler != handle_sigint_for_compare)
@@ -746,19 +747,24 @@ set_active_ext_lang (const struct extens
     = XCNEW (struct active_ext_lang_state);
 
   previous->ext_lang = active_ext_lang;
+  previous->sigint_handler.handler_saved = 0;
   active_ext_lang = now_active;
 
-  /* If the newly active extension language uses cooperative SIGINT handling
-     then ensure GDB's SIGINT handler is installed.  */
-  if (now_active->language == EXT_LANG_GDB
-      || now_active->ops->check_quit_flag != NULL)
-    install_gdb_sigint_handler (&previous->sigint_handler);
-
-  /* If there's a SIGINT recorded in the cooperative extension languages,
-     move it to the new language, or save it in GDB's global flag if the newly
-     active extension language doesn't use cooperative SIGINT handling.  */
-  if (check_quit_flag ())
-    set_quit_flag ();
+  if (target_terminal_is_ours ())
+    {
+      /* If the newly active extension language uses cooperative SIGINT
+	 handling then ensure GDB's SIGINT handler is installed.  */
+      if (now_active->language == EXT_LANG_GDB
+	  || now_active->ops->check_quit_flag != NULL)
+	install_gdb_sigint_handler (&previous->sigint_handler);
+
+      /* If there's a SIGINT recorded in the cooperative extension languages,
+	 move it to the new language, or save it in GDB's global flag if the
+	 newly active extension language doesn't use cooperative SIGINT
+	 handling.  */
+      if (check_quit_flag ())
+	set_quit_flag ();
+    }
 
   return previous;
 }
@@ -768,40 +774,22 @@ set_active_ext_lang (const struct extens
 void
 restore_active_ext_lang (struct active_ext_lang_state *previous)
 {
-  const struct extension_language_defn *current = active_ext_lang;
-
   active_ext_lang = previous->ext_lang;
 
-  /* Restore the previous SIGINT handler if one was saved.  */
-  if (previous->sigint_handler.handler_saved)
-    install_sigint_handler (&previous->sigint_handler);
-
-  /* If there's a SIGINT recorded in the cooperative extension languages,
-     move it to the new language, or save it in GDB's global flag if the newly
-     active extension language doesn't use cooperative SIGINT handling.  */
-  if (check_quit_flag ())
-    set_quit_flag ();
-
-  xfree (previous);
-}
-
-/* Clear the quit flag.
-   The flag is cleared in all extension languages,
-   not just the currently active one.  */
-
-void
-clear_quit_flag (void)
-{
-  int i;
-  const struct extension_language_defn *extlang;
-
-  ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
+  if (target_terminal_is_ours ())
     {
-      if (extlang->ops->clear_quit_flag != NULL)
-	extlang->ops->clear_quit_flag (extlang);
+      /* Restore the previous SIGINT handler if one was saved.  */
+      if (previous->sigint_handler.handler_saved)
+	install_sigint_handler (&previous->sigint_handler);
+
+      /* If there's a SIGINT recorded in the cooperative extension languages,
+	 move it to the new language, or save it in GDB's global flag if the
+	 newly active extension language doesn't use cooperative SIGINT
+	 handling.  */
+      if (check_quit_flag ())
+	set_quit_flag ();
     }
-
-  quit_flag = 0;
+  xfree (previous);
 }
 
 /* Set the quit flag.
@@ -819,7 +807,16 @@ set_quit_flag (void)
       && active_ext_lang->ops->set_quit_flag != NULL)
     active_ext_lang->ops->set_quit_flag (active_ext_lang);
   else
-    quit_flag = 1;
+    {
+      quit_flag = 1;
+
+      /* Now wake up the event loop, or any interruptible_select.  Do
+	 this after setting the flag, because signals on Windows
+	 actually run on a separate thread, and thus otherwise the
+	 main code could be woken up and find quit_flag still
+	 clear.  */
+      quit_serial_event_set ();
+    }
 }
 
 /* Return true if the quit flag has been set, false otherwise.
@@ -843,6 +840,10 @@ check_quit_flag (void)
   /* This is written in a particular way to avoid races.  */
   if (quit_flag)
     {
+      /* No longer need to wake up the event loop or any
+	 interruptible_select.  The caller handles the quit
+	 request.  */
+      quit_serial_event_clear ();
       quit_flag = 0;
       result = 1;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension.h ./gdb/extension.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/extension.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between gdb and its extension languages.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -225,10 +225,10 @@ extern char *apply_ext_lang_type_printer
 extern void free_ext_lang_type_printers (struct ext_lang_type_printers *);
 
 extern int apply_ext_lang_val_pretty_printer
-  (struct type *type, const gdb_byte *valaddr,
-   int embedded_offset, CORE_ADDR address,
+  (struct type *type,
+   LONGEST embedded_offset, CORE_ADDR address,
    struct ui_file *stream, int recurse,
-   const struct value *val, const struct value_print_options *options,
+   struct value *val, const struct value_print_options *options,
    const struct language_defn *language);
 
 extern enum ext_lang_bt_status apply_ext_lang_frame_filter
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension-priv.h ./gdb/extension-priv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/extension-priv.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/extension-priv.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Private implementation details of interface between gdb and its
    extension languages.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #define EXTENSION_PRIV_H
 
 #include "extension.h"
+#include <signal.h>
 
 /* The return code for some API calls.  */
 
@@ -170,19 +171,19 @@ struct extension_language_ops
   void (*free_type_printers) (const struct extension_language_defn *,
 			      struct ext_lang_type_printers *);
 
-  /* Try to pretty-print a value of type TYPE located at VALADDR
-     + EMBEDDED_OFFSET, which came from the inferior at address ADDRESS
-     + EMBEDDED_OFFSET, onto stdio stream STREAM according to OPTIONS.
-     VAL is the whole object that came from ADDRESS.  VALADDR must point to
-     the head of VAL's contents buffer.
+  /* Try to pretty-print a value of type TYPE located at VAL's contents
+     buffer + EMBEDDED_OFFSET, which came from the inferior at address
+     ADDRESS + EMBEDDED_OFFSET, onto stdio stream STREAM according to
+     OPTIONS.
+     VAL is the whole object that came from ADDRESS.
      Returns EXT_LANG_RC_OK upon success, EXT_LANG_RC_NOP if the value
      is not recognized, and EXT_LANG_RC_ERROR if an error was encountered.  */
   enum ext_lang_rc (*apply_val_pretty_printer)
     (const struct extension_language_defn *,
-     struct type *type, const gdb_byte *valaddr,
-     int embedded_offset, CORE_ADDR address,
+     struct type *type,
+     LONGEST embedded_offset, CORE_ADDR address,
      struct ui_file *stream, int recurse,
-     const struct value *val, const struct value_print_options *options,
+     struct value *val, const struct value_print_options *options,
      const struct language_defn *language);
 
   /* GDB access to the "frame filter" feature.
@@ -231,7 +232,7 @@ struct extension_language_ops
   enum ext_lang_bp_stop (*breakpoint_cond_says_stop)
     (const struct extension_language_defn *, struct breakpoint *);
 
-  /* The next three are used to connect GDB's SIGINT handling with the
+  /* The next two are used to connect GDB's SIGINT handling with the
      extension language's.
 
      Terminology: If an extension language can use GDB's SIGINT handling then
@@ -241,9 +242,6 @@ struct extension_language_ops
      These need not be implemented, but if one of them is implemented
      then they all must be.  */
 
-  /* Clear the SIGINT indicator.  */
-  void (*clear_quit_flag) (const struct extension_language_defn *);
-
   /* Set the SIGINT indicator.
      This is called by GDB's SIGINT handler and must be async-safe.  */
   void (*set_quit_flag) (const struct extension_language_defn *);
@@ -329,7 +327,7 @@ struct signal_handler
   int handler_saved;
 
   /* The signal handler.  */
-  RETSIGTYPE (*handler) ();
+  sighandler_t handler;
 };
 
 /* State necessary to restore the currently active extension language
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-nat.c ./gdb/fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for FreeBSD.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "regset.h"
+#include "gdbcmd.h"
 #include "gdbthread.h"
 #include "gdb_wait.h"
 #include <sys/types.h>
@@ -42,18 +43,20 @@
 static char *
 fbsd_pid_to_exec_file (struct target_ops *self, int pid)
 {
-  ssize_t len = PATH_MAX;
+  ssize_t len;
   static char buf[PATH_MAX];
   char name[PATH_MAX];
 
 #ifdef KERN_PROC_PATHNAME
+  size_t buflen;
   int mib[4];
 
   mib[0] = CTL_KERN;
   mib[1] = KERN_PROC;
   mib[2] = KERN_PROC_PATHNAME;
   mib[3] = pid;
-  if (sysctl (mib, 4, buf, &len, NULL, 0) == 0)
+  buflen = sizeof buf;
+  if (sysctl (mib, 4, buf, &buflen, NULL, 0) == 0)
     return buf;
 #endif
 
@@ -203,12 +206,320 @@ fbsd_find_memory_regions (struct target_
 }
 #endif
 
+#ifdef KERN_PROC_AUXV
+static enum target_xfer_status (*super_xfer_partial) (struct target_ops *ops,
+						      enum target_object object,
+						      const char *annex,
+						      gdb_byte *readbuf,
+						      const gdb_byte *writebuf,
+						      ULONGEST offset,
+						      ULONGEST len,
+						      ULONGEST *xfered_len);
+
+/* Implement the "to_xfer_partial target_ops" method.  */
+
+static enum target_xfer_status
+fbsd_xfer_partial (struct target_ops *ops, enum target_object object,
+		   const char *annex, gdb_byte *readbuf,
+		   const gdb_byte *writebuf,
+		   ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
+{
+  pid_t pid = ptid_get_pid (inferior_ptid);
+
+  switch (object)
+    {
+    case TARGET_OBJECT_AUXV:
+      {
+	struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
+	unsigned char *buf;
+	size_t buflen;
+	int mib[4];
+
+	if (writebuf != NULL)
+	  return TARGET_XFER_E_IO;
+	mib[0] = CTL_KERN;
+	mib[1] = KERN_PROC;
+	mib[2] = KERN_PROC_AUXV;
+	mib[3] = pid;
+	if (offset == 0)
+	  {
+	    buf = readbuf;
+	    buflen = len;
+	  }
+	else
+	  {
+	    buflen = offset + len;
+	    buf = XCNEWVEC (unsigned char, buflen);
+	    cleanup = make_cleanup (xfree, buf);
+	  }
+	if (sysctl (mib, 4, buf, &buflen, NULL, 0) == 0)
+	  {
+	    if (offset != 0)
+	      {
+		if (buflen > offset)
+		  {
+		    buflen -= offset;
+		    memcpy (readbuf, buf + offset, buflen);
+		  }
+		else
+		  buflen = 0;
+	      }
+	    do_cleanups (cleanup);
+	    *xfered_len = buflen;
+	    return (buflen == 0) ? TARGET_XFER_EOF : TARGET_XFER_OK;
+	  }
+	do_cleanups (cleanup);
+	return TARGET_XFER_E_IO;
+      }
+    default:
+      return super_xfer_partial (ops, object, annex, readbuf, writebuf, offset,
+				 len, xfered_len);
+    }
+}
+#endif
+
 #ifdef PT_LWPINFO
+static int debug_fbsd_lwp;
+
+static void (*super_resume) (struct target_ops *,
+			     ptid_t,
+			     int,
+			     enum gdb_signal);
 static ptid_t (*super_wait) (struct target_ops *,
 			     ptid_t,
 			     struct target_waitstatus *,
 			     int);
 
+static void
+show_fbsd_lwp_debug (struct ui_file *file, int from_tty,
+		     struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("Debugging of FreeBSD lwp module is %s.\n"), value);
+}
+
+#if defined(TDP_RFPPWAIT) || defined(HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME)
+/* Fetch the external variant of the kernel's internal process
+   structure for the process PID into KP.  */
+
+static void
+fbsd_fetch_kinfo_proc (pid_t pid, struct kinfo_proc *kp)
+{
+  size_t len;
+  int mib[4];
+
+  len = sizeof *kp;
+  mib[0] = CTL_KERN;
+  mib[1] = KERN_PROC;
+  mib[2] = KERN_PROC_PID;
+  mib[3] = pid;
+  if (sysctl (mib, 4, kp, &len, NULL, 0) == -1)
+    perror_with_name (("sysctl"));
+}
+#endif
+
+/*
+  FreeBSD's first thread support was via a "reentrant" version of libc
+  (libc_r) that first shipped in 2.2.7.  This library multiplexed all
+  of the threads in a process onto a single kernel thread.  This
+  library is supported via the bsd-uthread target.
+
+  FreeBSD 5.1 introduced two new threading libraries that made use of
+  multiple kernel threads.  The first (libkse) scheduled M user
+  threads onto N (<= M) kernel threads (LWPs).  The second (libthr)
+  bound each user thread to a dedicated kernel thread.  libkse shipped
+  as the default threading library (libpthread).
+
+  FreeBSD 5.3 added a libthread_db to abstract the interface across
+  the various thread libraries (libc_r, libkse, and libthr).
+
+  FreeBSD 7.0 switched the default threading library from from libkse
+  to libpthread and removed libc_r.
+
+  FreeBSD 8.0 removed libkse and the in-kernel support for it.  The
+  only threading library supported by 8.0 and later is libthr which
+  ties each user thread directly to an LWP.  To simplify the
+  implementation, this target only supports LWP-backed threads using
+  ptrace directly rather than libthread_db.
+
+  FreeBSD 11.0 introduced LWP event reporting via PT_LWP_EVENTS.
+*/
+
+/* Return true if PTID is still active in the inferior.  */
+
+static int
+fbsd_thread_alive (struct target_ops *ops, ptid_t ptid)
+{
+  if (ptid_lwp_p (ptid))
+    {
+      struct ptrace_lwpinfo pl;
+
+      if (ptrace (PT_LWPINFO, ptid_get_lwp (ptid), (caddr_t) &pl, sizeof pl)
+	  == -1)
+	return 0;
+#ifdef PL_FLAG_EXITED
+      if (pl.pl_flags & PL_FLAG_EXITED)
+	return 0;
+#endif
+    }
+
+  return 1;
+}
+
+/* Convert PTID to a string.  Returns the string in a static
+   buffer.  */
+
+static char *
+fbsd_pid_to_str (struct target_ops *ops, ptid_t ptid)
+{
+  lwpid_t lwp;
+
+  lwp = ptid_get_lwp (ptid);
+  if (lwp != 0)
+    {
+      static char buf[64];
+      int pid = ptid_get_pid (ptid);
+
+      xsnprintf (buf, sizeof buf, "LWP %d of process %d", lwp, pid);
+      return buf;
+    }
+
+  return normal_pid_to_str (ptid);
+}
+
+#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME
+/* Return the name assigned to a thread by an application.  Returns
+   the string in a static buffer.  */
+
+static const char *
+fbsd_thread_name (struct target_ops *self, struct thread_info *thr)
+{
+  struct ptrace_lwpinfo pl;
+  struct kinfo_proc kp;
+  int pid = ptid_get_pid (thr->ptid);
+  long lwp = ptid_get_lwp (thr->ptid);
+  static char buf[sizeof pl.pl_tdname + 1];
+
+  /* Note that ptrace_lwpinfo returns the process command in pl_tdname
+     if a name has not been set explicitly.  Return a NULL name in
+     that case.  */
+  fbsd_fetch_kinfo_proc (pid, &kp);
+  if (ptrace (PT_LWPINFO, lwp, (caddr_t) &pl, sizeof pl) == -1)
+    perror_with_name (("ptrace"));
+  if (strcmp (kp.ki_comm, pl.pl_tdname) == 0)
+    return NULL;
+  xsnprintf (buf, sizeof buf, "%s", pl.pl_tdname);
+  return buf;
+}
+#endif
+
+/* Enable additional event reporting on new processes.
+
+   To catch fork events, PTRACE_FORK is set on every traced process
+   to enable stops on returns from fork or vfork.  Note that both the
+   parent and child will always stop, even if system call stops are
+   not enabled.
+
+   To catch LWP events, PTRACE_EVENTS is set on every traced process.
+   This enables stops on the birth for new LWPs (excluding the "main" LWP)
+   and the death of LWPs (excluding the last LWP in a process).  Note
+   that unlike fork events, the LWP that creates a new LWP does not
+   report an event.  */
+
+static void
+fbsd_enable_proc_events (pid_t pid)
+{
+#ifdef PT_GET_EVENT_MASK
+  int events;
+
+  if (ptrace (PT_GET_EVENT_MASK, pid, (PTRACE_TYPE_ARG3)&events,
+	      sizeof (events)) == -1)
+    perror_with_name (("ptrace"));
+  events |= PTRACE_FORK | PTRACE_LWP;
+#ifdef PTRACE_VFORK
+  events |= PTRACE_VFORK;
+#endif
+  if (ptrace (PT_SET_EVENT_MASK, pid, (PTRACE_TYPE_ARG3)&events,
+	      sizeof (events)) == -1)
+    perror_with_name (("ptrace"));
+#else
+#ifdef TDP_RFPPWAIT
+  if (ptrace (PT_FOLLOW_FORK, pid, (PTRACE_TYPE_ARG3)0, 1) == -1)
+    perror_with_name (("ptrace"));
+#endif
+#ifdef PT_LWP_EVENTS
+  if (ptrace (PT_LWP_EVENTS, pid, (PTRACE_TYPE_ARG3)0, 1) == -1)
+    perror_with_name (("ptrace"));
+#endif
+#endif
+}
+
+/* Add threads for any new LWPs in a process.
+
+   When LWP events are used, this function is only used to detect existing
+   threads when attaching to a process.  On older systems, this function is
+   called to discover new threads each time the thread list is updated.  */
+
+static void
+fbsd_add_threads (pid_t pid)
+{
+  struct cleanup *cleanup;
+  lwpid_t *lwps;
+  int i, nlwps;
+
+  gdb_assert (!in_thread_list (pid_to_ptid (pid)));
+  nlwps = ptrace (PT_GETNUMLWPS, pid, NULL, 0);
+  if (nlwps == -1)
+    perror_with_name (("ptrace"));
+
+  lwps = XCNEWVEC (lwpid_t, nlwps);
+  cleanup = make_cleanup (xfree, lwps);
+
+  nlwps = ptrace (PT_GETLWPLIST, pid, (caddr_t) lwps, nlwps);
+  if (nlwps == -1)
+    perror_with_name (("ptrace"));
+
+  for (i = 0; i < nlwps; i++)
+    {
+      ptid_t ptid = ptid_build (pid, lwps[i], 0);
+
+      if (!in_thread_list (ptid))
+	{
+#ifdef PT_LWP_EVENTS
+	  struct ptrace_lwpinfo pl;
+
+	  /* Don't add exited threads.  Note that this is only called
+	     when attaching to a multi-threaded process.  */
+	  if (ptrace (PT_LWPINFO, lwps[i], (caddr_t) &pl, sizeof pl) == -1)
+	    perror_with_name (("ptrace"));
+	  if (pl.pl_flags & PL_FLAG_EXITED)
+	    continue;
+#endif
+	  if (debug_fbsd_lwp)
+	    fprintf_unfiltered (gdb_stdlog,
+				"FLWP: adding thread for LWP %u\n",
+				lwps[i]);
+	  add_thread (ptid);
+	}
+    }
+  do_cleanups (cleanup);
+}
+
+/* Implement the "to_update_thread_list" target_ops method.  */
+
+static void
+fbsd_update_thread_list (struct target_ops *ops)
+{
+#ifdef PT_LWP_EVENTS
+  /* With support for thread events, threads are added/deleted from the
+     list as events are reported, so just try deleting exited threads.  */
+  delete_exited_threads ();
+#else
+  prune_threads ();
+
+  fbsd_add_threads (ptid_get_pid (inferior_ptid));
+#endif
+}
+
 #ifdef TDP_RFPPWAIT
 /*
   To catch fork events, PT_FOLLOW_FORK is set on every traced process
@@ -243,72 +554,175 @@ static ptid_t (*super_wait) (struct targ
   sake.  FreeBSD versions newer than 9.1 contain both fixes.
 */
 
-struct fbsd_fork_child_info
+struct fbsd_fork_info
 {
-  struct fbsd_fork_child_info *next;
-  pid_t child;			/* Pid of new child.  */
+  struct fbsd_fork_info *next;
+  ptid_t ptid;
 };
 
-static struct fbsd_fork_child_info *fbsd_pending_children;
+static struct fbsd_fork_info *fbsd_pending_children;
 
 /* Record a new child process event that is reported before the
    corresponding fork event in the parent.  */
 
 static void
-fbsd_remember_child (pid_t pid)
+fbsd_remember_child (ptid_t pid)
 {
-  struct fbsd_fork_child_info *info;
+  struct fbsd_fork_info *info = XCNEW (struct fbsd_fork_info);
 
-  info = xcalloc (1, sizeof *info);
-
-  info->child = pid;
+  info->ptid = pid;
   info->next = fbsd_pending_children;
   fbsd_pending_children = info;
 }
 
 /* Check for a previously-recorded new child process event for PID.
-   If one is found, remove it from the list.  */
+   If one is found, remove it from the list and return the PTID.  */
 
-static int
+static ptid_t
 fbsd_is_child_pending (pid_t pid)
 {
-  struct fbsd_fork_child_info *info, *prev;
+  struct fbsd_fork_info *info, *prev;
+  ptid_t ptid;
 
   prev = NULL;
   for (info = fbsd_pending_children; info; prev = info, info = info->next)
     {
-      if (info->child == pid)
+      if (ptid_get_pid (info->ptid) == pid)
 	{
 	  if (prev == NULL)
 	    fbsd_pending_children = info->next;
 	  else
 	    prev->next = info->next;
+	  ptid = info->ptid;
 	  xfree (info);
-	  return 1;
+	  return ptid;
 	}
     }
-  return 0;
+  return null_ptid;
 }
 
-/* Fetch the external variant of the kernel's internal process
-   structure for the process PID into KP.  */
+#ifndef PTRACE_VFORK
+static struct fbsd_fork_info *fbsd_pending_vfork_done;
+
+/* Record a pending vfork done event.  */
 
 static void
-fbsd_fetch_kinfo_proc (pid_t pid, struct kinfo_proc *kp)
+fbsd_add_vfork_done (ptid_t pid)
 {
-  size_t len;
-  int mib[4];
+  struct fbsd_fork_info *info = XCNEW (struct fbsd_fork_info);
 
-  len = sizeof *kp;
-  mib[0] = CTL_KERN;
-  mib[1] = KERN_PROC;
-  mib[2] = KERN_PROC_PID;
-  mib[3] = pid;
-  if (sysctl (mib, 4, kp, &len, NULL, 0) == -1)
-    perror_with_name (("sysctl"));
+  info->ptid = pid;
+  info->next = fbsd_pending_vfork_done;
+  fbsd_pending_vfork_done = info;
+}
+
+/* Check for a pending vfork done event for a specific PID.  */
+
+static int
+fbsd_is_vfork_done_pending (pid_t pid)
+{
+  struct fbsd_fork_info *info;
+
+  for (info = fbsd_pending_vfork_done; info != NULL; info = info->next)
+    {
+      if (ptid_get_pid (info->ptid) == pid)
+	return 1;
+    }
+  return 0;
+}
+
+/* Check for a pending vfork done event.  If one is found, remove it
+   from the list and return the PTID.  */
+
+static ptid_t
+fbsd_next_vfork_done (void)
+{
+  struct fbsd_fork_info *info;
+  ptid_t ptid;
+
+  if (fbsd_pending_vfork_done != NULL)
+    {
+      info = fbsd_pending_vfork_done;
+      fbsd_pending_vfork_done = info->next;
+      ptid = info->ptid;
+      xfree (info);
+      return ptid;
+    }
+  return null_ptid;
+}
+#endif
+#endif
+
+static int
+resume_one_thread_cb (struct thread_info *tp, void *data)
+{
+  ptid_t *ptid = (ptid_t *) data;
+  int request;
+
+  if (ptid_get_pid (tp->ptid) != ptid_get_pid (*ptid))
+    return 0;
+
+  if (ptid_get_lwp (tp->ptid) == ptid_get_lwp (*ptid))
+    request = PT_RESUME;
+  else
+    request = PT_SUSPEND;
+
+  if (ptrace (request, ptid_get_lwp (tp->ptid), NULL, 0) == -1)
+    perror_with_name (("ptrace"));
+  return 0;
+}
+
+static int
+resume_all_threads_cb (struct thread_info *tp, void *data)
+{
+  ptid_t *filter = (ptid_t *) data;
+
+  if (!ptid_match (tp->ptid, *filter))
+    return 0;
+
+  if (ptrace (PT_RESUME, ptid_get_lwp (tp->ptid), NULL, 0) == -1)
+    perror_with_name (("ptrace"));
+  return 0;
 }
+
+/* Implement the "to_resume" target_ops method.  */
+
+static void
+fbsd_resume (struct target_ops *ops,
+	     ptid_t ptid, int step, enum gdb_signal signo)
+{
+#if defined(TDP_RFPPWAIT) && !defined(PTRACE_VFORK)
+  pid_t pid;
+
+  /* Don't PT_CONTINUE a process which has a pending vfork done event.  */
+  if (ptid_equal (minus_one_ptid, ptid))
+    pid = ptid_get_pid (inferior_ptid);
+  else
+    pid = ptid_get_pid (ptid);
+  if (fbsd_is_vfork_done_pending (pid))
+    return;
 #endif
 
+  if (debug_fbsd_lwp)
+    fprintf_unfiltered (gdb_stdlog,
+			"FLWP: fbsd_resume for ptid (%d, %ld, %ld)\n",
+			ptid_get_pid (ptid), ptid_get_lwp (ptid),
+			ptid_get_tid (ptid));
+  if (ptid_lwp_p (ptid))
+    {
+      /* If ptid is a specific LWP, suspend all other LWPs in the process.  */
+      iterate_over_threads (resume_one_thread_cb, &ptid);
+    }
+  else
+    {
+      /* If ptid is a wildcard, resume all matching threads (they won't run
+	 until the process is continued however).  */
+      iterate_over_threads (resume_all_threads_cb, &ptid);
+      ptid = inferior_ptid;
+    }
+  super_resume (ops, ptid, step, signo);
+}
+
 /* Wait for the child specified by PTID to do something.  Return the
    process ID of the child, or MINUS_ONE_PTID in case of error; store
    the status in *OURSTATUS.  */
@@ -322,6 +736,14 @@ fbsd_wait (struct target_ops *ops,
 
   while (1)
     {
+#ifndef PTRACE_VFORK
+      wptid = fbsd_next_vfork_done ();
+      if (!ptid_equal (wptid, null_ptid))
+	{
+	  ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
+	  return wptid;
+	}
+#endif
       wptid = super_wait (ops, ptid, ourstatus, target_options);
       if (ourstatus->kind == TARGET_WAITKIND_STOPPED)
 	{
@@ -330,21 +752,89 @@ fbsd_wait (struct target_ops *ops,
 	  int status;
 
 	  pid = ptid_get_pid (wptid);
-	  if (ptrace (PT_LWPINFO, pid, (caddr_t)&pl, sizeof pl) == -1)
+	  if (ptrace (PT_LWPINFO, pid, (caddr_t) &pl, sizeof pl) == -1)
 	    perror_with_name (("ptrace"));
 
+	  wptid = ptid_build (pid, pl.pl_lwpid, 0);
+
+#ifdef PT_LWP_EVENTS
+	  if (pl.pl_flags & PL_FLAG_EXITED)
+	    {
+	      /* If GDB attaches to a multi-threaded process, exiting
+		 threads might be skipped during fbsd_post_attach that
+		 have not yet reported their PL_FLAG_EXITED event.
+		 Ignore EXITED events for an unknown LWP.  */
+	      if (in_thread_list (wptid))
+		{
+		  if (debug_fbsd_lwp)
+		    fprintf_unfiltered (gdb_stdlog,
+					"FLWP: deleting thread for LWP %u\n",
+					pl.pl_lwpid);
+		  if (print_thread_events)
+		    printf_unfiltered (_("[%s exited]\n"), target_pid_to_str
+				       (wptid));
+		  delete_thread (wptid);
+		}
+	      if (ptrace (PT_CONTINUE, pid, (caddr_t) 1, 0) == -1)
+		perror_with_name (("ptrace"));
+	      continue;
+	    }
+#endif
+
+	  /* Switch to an LWP PTID on the first stop in a new process.
+	     This is done after handling PL_FLAG_EXITED to avoid
+	     switching to an exited LWP.  It is done before checking
+	     PL_FLAG_BORN in case the first stop reported after
+	     attaching to an existing process is a PL_FLAG_BORN
+	     event.  */
+	  if (in_thread_list (pid_to_ptid (pid)))
+	    {
+	      if (debug_fbsd_lwp)
+		fprintf_unfiltered (gdb_stdlog,
+				    "FLWP: using LWP %u for first thread\n",
+				    pl.pl_lwpid);
+	      thread_change_ptid (pid_to_ptid (pid), wptid);
+	    }
+
+#ifdef PT_LWP_EVENTS
+	  if (pl.pl_flags & PL_FLAG_BORN)
+	    {
+	      /* If GDB attaches to a multi-threaded process, newborn
+		 threads might be added by fbsd_add_threads that have
+		 not yet reported their PL_FLAG_BORN event.  Ignore
+		 BORN events for an already-known LWP.  */
+	      if (!in_thread_list (wptid))
+		{
+		  if (debug_fbsd_lwp)
+		    fprintf_unfiltered (gdb_stdlog,
+					"FLWP: adding thread for LWP %u\n",
+					pl.pl_lwpid);
+		  add_thread (wptid);
+		}
+	      ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
+	      return wptid;
+	    }
+#endif
+
 #ifdef TDP_RFPPWAIT
 	  if (pl.pl_flags & PL_FLAG_FORKED)
 	    {
+#ifndef PTRACE_VFORK
 	      struct kinfo_proc kp;
+#endif
+	      ptid_t child_ptid;
 	      pid_t child;
 
 	      child = pl.pl_child_pid;
 	      ourstatus->kind = TARGET_WAITKIND_FORKED;
-	      ourstatus->value.related_pid = pid_to_ptid (child);
+#ifdef PTRACE_VFORK
+	      if (pl.pl_flags & PL_FLAG_VFORKED)
+		ourstatus->kind = TARGET_WAITKIND_VFORKED;
+#endif
 
 	      /* Make sure the other end of the fork is stopped too.  */
-	      if (!fbsd_is_child_pending (child))
+	      child_ptid = fbsd_is_child_pending (child);
+	      if (ptid_equal (child_ptid, null_ptid))
 		{
 		  pid = waitpid (child, &status, 0);
 		  if (pid == -1)
@@ -356,13 +846,20 @@ fbsd_wait (struct target_ops *ops,
 		    perror_with_name (("ptrace"));
 
 		  gdb_assert (pl.pl_flags & PL_FLAG_CHILD);
+		  child_ptid = ptid_build (child, pl.pl_lwpid, 0);
 		}
 
+	      /* Enable additional events on the child process.  */
+	      fbsd_enable_proc_events (ptid_get_pid (child_ptid));
+
+#ifndef PTRACE_VFORK
 	      /* For vfork, the child process will have the P_PPWAIT
 		 flag set.  */
 	      fbsd_fetch_kinfo_proc (child, &kp);
 	      if (kp.ki_flag & P_PPWAIT)
 		ourstatus->kind = TARGET_WAITKIND_VFORKED;
+#endif
+	      ourstatus->value.related_pid = child_ptid;
 
 	      return wptid;
 	    }
@@ -372,9 +869,17 @@ fbsd_wait (struct target_ops *ops,
 	      /* Remember that this child forked, but do not report it
 		 until the parent reports its corresponding fork
 		 event.  */
-	      fbsd_remember_child (ptid_get_pid (wptid));
+	      fbsd_remember_child (wptid);
 	      continue;
 	    }
+
+#ifdef PTRACE_VFORK
+	  if (pl.pl_flags & PL_FLAG_VFORK_DONE)
+	    {
+	      ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
+	      return wptid;
+	    }
+#endif
 #endif
 
 #ifdef PL_FLAG_EXEC
@@ -386,6 +891,40 @@ fbsd_wait (struct target_ops *ops,
 	      return wptid;
 	    }
 #endif
+
+	  /* Note that PL_FLAG_SCE is set for any event reported while
+	     a thread is executing a system call in the kernel.  In
+	     particular, signals that interrupt a sleep in a system
+	     call will report this flag as part of their event.  Stops
+	     explicitly for system call entry and exit always use
+	     SIGTRAP, so only treat SIGTRAP events as system call
+	     entry/exit events.  */
+	  if (pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)
+	      && ourstatus->value.sig == SIGTRAP)
+	    {
+#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
+	      if (catch_syscall_enabled ())
+		{
+		  if (catching_syscall_number (pl.pl_syscall_code))
+		    {
+		      if (pl.pl_flags & PL_FLAG_SCE)
+			ourstatus->kind = TARGET_WAITKIND_SYSCALL_ENTRY;
+		      else
+			ourstatus->kind = TARGET_WAITKIND_SYSCALL_RETURN;
+		      ourstatus->value.syscall_number = pl.pl_syscall_code;
+		      return wptid;
+		    }
+		}
+#endif
+	      /* If the core isn't interested in this event, just
+		 continue the process explicitly and wait for another
+		 event.  Note that PT_SYSCALL is "sticky" on FreeBSD
+		 and once system call stops are enabled on a process
+		 it stops for all system call entries and exits.  */
+	      if (ptrace (PT_CONTINUE, pid, (caddr_t) 1, 0) == -1)
+		perror_with_name (("ptrace"));
+	      continue;
+	    }
 	}
       return wptid;
     }
@@ -399,7 +938,7 @@ static int
 fbsd_follow_fork (struct target_ops *ops, int follow_child,
 			int detach_fork)
 {
-  if (!follow_child)
+  if (!follow_child && detach_fork)
     {
       struct thread_info *tp = inferior_thread ();
       pid_t child_pid = ptid_get_pid (tp->pending_follow.value.related_pid);
@@ -409,6 +948,35 @@ fbsd_follow_fork (struct target_ops *ops
 
       if (ptrace (PT_DETACH, child_pid, (PTRACE_TYPE_ARG3)1, 0) == -1)
 	perror_with_name (("ptrace"));
+
+#ifndef PTRACE_VFORK
+      if (tp->pending_follow.kind == TARGET_WAITKIND_VFORKED)
+	{
+	  /* We can't insert breakpoints until the child process has
+	     finished with the shared memory region.  The parent
+	     process doesn't wait for the child process to exit or
+	     exec until after it has been resumed from the ptrace stop
+	     to report the fork.  Once it has been resumed it doesn't
+	     stop again before returning to userland, so there is no
+	     reliable way to wait on the parent.
+
+	     We can't stay attached to the child to wait for an exec
+	     or exit because it may invoke ptrace(PT_TRACE_ME)
+	     (e.g. if the parent process is a debugger forking a new
+	     child process).
+
+	     In the end, the best we can do is to make sure it runs
+	     for a little while.  Hopefully it will be out of range of
+	     any breakpoints we reinsert.  Usually this is only the
+	     single-step breakpoint at vfork's return point.  */
+
+	  usleep (10000);
+
+	  /* Schedule a fake VFORK_DONE event to report on the next
+	     wait.  */
+	  fbsd_add_vfork_done (inferior_ptid);
+	}
+#endif
     }
 
   return 0;
@@ -437,27 +1005,14 @@ fbsd_remove_vfork_catchpoint (struct tar
 {
   return 0;
 }
-
-/* Enable fork tracing for a specific process.
-   
-   To catch fork events, PT_FOLLOW_FORK is set on every traced process
-   to enable stops on returns from fork or vfork.  Note that both the
-   parent and child will always stop, even if system call stops are
-   not enabled.  */
-
-static void
-fbsd_enable_follow_fork (pid_t pid)
-{
-  if (ptrace (PT_FOLLOW_FORK, pid, (PTRACE_TYPE_ARG3)0, 1) == -1)
-    perror_with_name (("ptrace"));
-}
+#endif
 
 /* Implement the "to_post_startup_inferior" target_ops method.  */
 
 static void
 fbsd_post_startup_inferior (struct target_ops *self, ptid_t pid)
 {
-  fbsd_enable_follow_fork (ptid_get_pid (pid));
+  fbsd_enable_proc_events (ptid_get_pid (pid));
 }
 
 /* Implement the "to_post_attach" target_ops method.  */
@@ -465,9 +1020,9 @@ fbsd_post_startup_inferior (struct targe
 static void
 fbsd_post_attach (struct target_ops *self, int pid)
 {
-  fbsd_enable_follow_fork (pid);
+  fbsd_enable_proc_events (pid);
+  fbsd_add_threads (pid);
 }
-#endif
 
 #ifdef PL_FLAG_EXEC
 /* If the FreeBSD kernel supports PL_FLAG_EXEC, then traced processes
@@ -485,6 +1040,19 @@ fbsd_remove_exec_catchpoint (struct targ
   return 0;
 }
 #endif
+
+#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
+static int
+fbsd_set_syscall_catchpoint (struct target_ops *self, int pid, int needed,
+			     int any_count, int table_size, int *table)
+{
+
+  /* Ignore the arguments.  inf-ptrace.c will use PT_SYSCALL which
+     will catch all system call entries and exits.  The system calls
+     are filtered by GDB rather than the kernel.  */
+  return 0;
+}
+#endif
 #endif
 
 void
@@ -492,22 +1060,56 @@ fbsd_nat_add_target (struct target_ops *
 {
   t->to_pid_to_exec_file = fbsd_pid_to_exec_file;
   t->to_find_memory_regions = fbsd_find_memory_regions;
+#ifdef KERN_PROC_AUXV
+  super_xfer_partial = t->to_xfer_partial;
+  t->to_xfer_partial = fbsd_xfer_partial;
+#endif
 #ifdef PT_LWPINFO
+  t->to_thread_alive = fbsd_thread_alive;
+  t->to_pid_to_str = fbsd_pid_to_str;
+#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME
+  t->to_thread_name = fbsd_thread_name;
+#endif
+  t->to_update_thread_list = fbsd_update_thread_list;
+  t->to_has_thread_control = tc_schedlock;
+  super_resume = t->to_resume;
+  t->to_resume = fbsd_resume;
   super_wait = t->to_wait;
   t->to_wait = fbsd_wait;
+  t->to_post_startup_inferior = fbsd_post_startup_inferior;
+  t->to_post_attach = fbsd_post_attach;
 #ifdef TDP_RFPPWAIT
   t->to_follow_fork = fbsd_follow_fork;
   t->to_insert_fork_catchpoint = fbsd_insert_fork_catchpoint;
   t->to_remove_fork_catchpoint = fbsd_remove_fork_catchpoint;
   t->to_insert_vfork_catchpoint = fbsd_insert_vfork_catchpoint;
   t->to_remove_vfork_catchpoint = fbsd_remove_vfork_catchpoint;
-  t->to_post_startup_inferior = fbsd_post_startup_inferior;
-  t->to_post_attach = fbsd_post_attach;
 #endif
 #ifdef PL_FLAG_EXEC
   t->to_insert_exec_catchpoint = fbsd_insert_exec_catchpoint;
   t->to_remove_exec_catchpoint = fbsd_remove_exec_catchpoint;
 #endif
+#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
+  t->to_set_syscall_catchpoint = fbsd_set_syscall_catchpoint;
+#endif
 #endif
   add_target (t);
 }
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_fbsd_nat;
+
+void
+_initialize_fbsd_nat (void)
+{
+#ifdef PT_LWPINFO
+  add_setshow_boolean_cmd ("fbsd-lwp", class_maintenance,
+			   &debug_fbsd_lwp, _("\
+Set debugging of FreeBSD lwp module."), _("\
+Show debugging of FreeBSD lwp module."), _("\
+Enables printf debugging output."),
+			   NULL,
+			   &show_fbsd_lwp_debug,
+			   &setdebuglist, &showdebuglist);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-nat.h ./gdb/fbsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/fbsd-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for FreeBSD.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-tdep.c ./gdb/fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for FreeBSD, architecture-independent.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,16 +18,82 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "auxv.h"
 #include "gdbcore.h"
 #include "inferior.h"
 #include "regcache.h"
 #include "regset.h"
 #include "gdbthread.h"
+#include "xml-syscall.h"
 
 #include "elf-bfd.h"
 #include "fbsd-tdep.h"
 
 
+/* This is how we want PTIDs from core files to be printed.  */
+
+static char *
+fbsd_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
+{
+  static char buf[80];
+
+  if (ptid_get_lwp (ptid) != 0)
+    {
+      xsnprintf (buf, sizeof buf, "LWP %ld", ptid_get_lwp (ptid));
+      return buf;
+    }
+
+  return normal_pid_to_str (ptid);
+}
+
+/* Extract the name assigned to a thread from a core.  Returns the
+   string in a static buffer.  */
+
+static const char *
+fbsd_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
+{
+  static char buf[80];
+  struct bfd_section *section;
+  bfd_size_type size;
+  char sectionstr[32];
+
+  if (ptid_get_lwp (thr->ptid) != 0)
+    {
+      /* FreeBSD includes a NT_FREEBSD_THRMISC note for each thread
+	 whose contents are defined by a "struct thrmisc" declared in
+	 <sys/procfs.h> on FreeBSD.  The per-thread name is stored as
+	 a null-terminated string as the first member of the
+	 structure.  Rather than define the full structure here, just
+	 extract the null-terminated name from the start of the
+	 note.  */
+      xsnprintf (sectionstr, sizeof sectionstr, ".thrmisc/%ld",
+		ptid_get_lwp (thr->ptid));
+      section = bfd_get_section_by_name (core_bfd, sectionstr);
+      if (section != NULL && bfd_section_size (core_bfd, section) > 0)
+	{
+	  /* Truncate the name if it is longer than "buf".  */
+	  size = bfd_section_size (core_bfd, section);
+	  if (size > sizeof buf - 1)
+	    size = sizeof buf - 1;
+	  if (bfd_get_section_contents (core_bfd, section, buf, (file_ptr) 0,
+					size)
+	      && buf[0] != '\0')
+	    {
+	      buf[size] = '\0';
+
+	      /* Note that each thread will report the process command
+		 as its thread name instead of an empty name if a name
+		 has not been set explicitly.  Return a NULL name in
+		 that case.  */
+	      if (strcmp (buf, elf_tdata (core_bfd)->core->program) != 0)
+		return buf;
+	    }
+	}
+    }
+
+  return NULL;
+}
+
 static int
 find_signalled_thread (struct thread_info *info, void *data)
 {
@@ -38,17 +104,9 @@ find_signalled_thread (struct thread_inf
   return 0;
 }
 
-static enum gdb_signal
-find_stop_signal (void)
-{
-  struct thread_info *info =
-    iterate_over_threads (find_signalled_thread, NULL);
-
-  if (info)
-    return info->suspend.stop_signal;
-  else
-    return GDB_SIGNAL_0;
-}
+/* Structure for passing information from
+   fbsd_collect_thread_registers via an iterator to
+   fbsd_collect_regset_section_cb. */
 
 struct fbsd_collect_regset_section_cb_data
 {
@@ -56,6 +114,9 @@ struct fbsd_collect_regset_section_cb_da
   bfd *obfd;
   char *note_data;
   int *note_size;
+  unsigned long lwp;
+  enum gdb_signal stop_signal;
+  int abort_iteration;
 };
 
 static void
@@ -64,23 +125,87 @@ fbsd_collect_regset_section_cb (const ch
 				const char *human_name, void *cb_data)
 {
   char *buf;
-  struct fbsd_collect_regset_section_cb_data *data = cb_data;
+  struct fbsd_collect_regset_section_cb_data *data
+    = (struct fbsd_collect_regset_section_cb_data *) cb_data;
+
+  if (data->abort_iteration)
+    return;
 
   gdb_assert (regset->collect_regset);
 
-  buf = xmalloc (size);
+  buf = (char *) xmalloc (size);
   regset->collect_regset (regset, data->regcache, -1, buf, size);
 
   /* PRSTATUS still needs to be treated specially.  */
   if (strcmp (sect_name, ".reg") == 0)
     data->note_data = (char *) elfcore_write_prstatus
-      (data->obfd, data->note_data, data->note_size,
-       ptid_get_pid (inferior_ptid), find_stop_signal (), buf);
+      (data->obfd, data->note_data, data->note_size, data->lwp,
+       gdb_signal_to_host (data->stop_signal), buf);
   else
     data->note_data = (char *) elfcore_write_register_note
       (data->obfd, data->note_data, data->note_size,
        sect_name, buf, size);
   xfree (buf);
+
+  if (data->note_data == NULL)
+    data->abort_iteration = 1;
+}
+
+/* Records the thread's register state for the corefile note
+   section.  */
+
+static char *
+fbsd_collect_thread_registers (const struct regcache *regcache,
+			       ptid_t ptid, bfd *obfd,
+			       char *note_data, int *note_size,
+			       enum gdb_signal stop_signal)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct fbsd_collect_regset_section_cb_data data;
+
+  data.regcache = regcache;
+  data.obfd = obfd;
+  data.note_data = note_data;
+  data.note_size = note_size;
+  data.stop_signal = stop_signal;
+  data.abort_iteration = 0;
+  data.lwp = ptid_get_lwp (ptid);
+
+  gdbarch_iterate_over_regset_sections (gdbarch,
+					fbsd_collect_regset_section_cb,
+					&data, regcache);
+  return data.note_data;
+}
+
+struct fbsd_corefile_thread_data
+{
+  struct gdbarch *gdbarch;
+  bfd *obfd;
+  char *note_data;
+  int *note_size;
+  enum gdb_signal stop_signal;
+};
+
+/* Records the thread's register state for the corefile note
+   section.  */
+
+static void
+fbsd_corefile_thread (struct thread_info *info,
+		      struct fbsd_corefile_thread_data *args)
+{
+  struct cleanup *old_chain;
+  struct regcache *regcache;
+
+  regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
+
+  old_chain = save_inferior_ptid ();
+  inferior_ptid = info->ptid;
+  target_fetch_registers (regcache, -1);
+  do_cleanups (old_chain);
+
+  args->note_data = fbsd_collect_thread_registers
+    (regcache, info->ptid, args->obfd, args->note_data,
+     args->note_size, args->stop_signal);
 }
 
 /* Create appropriate note sections for a corefile, returning them in
@@ -89,10 +214,10 @@ fbsd_collect_regset_section_cb (const ch
 static char *
 fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
 {
-  struct regcache *regcache = get_current_regcache ();
-  char *note_data;
+  struct fbsd_corefile_thread_data thread_args;
+  char *note_data = NULL;
   Elf_Internal_Ehdr *i_ehdrp;
-  struct fbsd_collect_regset_section_cb_data data;
+  struct thread_info *curr_thr, *signalled_thr, *thr;
 
   /* Put a "FreeBSD" label in the ELF header.  */
   i_ehdrp = elf_elfheader (obfd);
@@ -100,16 +225,6 @@ fbsd_make_corefile_notes (struct gdbarch
 
   gdb_assert (gdbarch_iterate_over_regset_sections_p (gdbarch));
 
-  data.regcache = regcache;
-  data.obfd = obfd;
-  data.note_data = NULL;
-  data.note_size = note_size;
-  target_fetch_registers (regcache, -1);
-  gdbarch_iterate_over_regset_sections (gdbarch,
-					fbsd_collect_regset_section_cb,
-					&data, regcache);
-  note_data = data.note_data;
-
   if (get_exec_file (0))
     {
       const char *fname = lbasename (get_exec_file (0));
@@ -123,13 +238,113 @@ fbsd_make_corefile_notes (struct gdbarch
 					  fname, psargs);
     }
 
+  /* Thread register information.  */
+  TRY
+    {
+      update_thread_list ();
+    }
+  CATCH (e, RETURN_MASK_ERROR)
+    {
+      exception_print (gdb_stderr, e);
+    }
+  END_CATCH
+
+  /* Like the kernel, prefer dumping the signalled thread first.
+     "First thread" is what tools use to infer the signalled thread.
+     In case there's more than one signalled thread, prefer the
+     current thread, if it is signalled.  */
+  curr_thr = inferior_thread ();
+  if (curr_thr->suspend.stop_signal != GDB_SIGNAL_0)
+    signalled_thr = curr_thr;
+  else
+    {
+      signalled_thr = iterate_over_threads (find_signalled_thread, NULL);
+      if (signalled_thr == NULL)
+	signalled_thr = curr_thr;
+    }
+
+  thread_args.gdbarch = gdbarch;
+  thread_args.obfd = obfd;
+  thread_args.note_data = note_data;
+  thread_args.note_size = note_size;
+  thread_args.stop_signal = signalled_thr->suspend.stop_signal;
+
+  fbsd_corefile_thread (signalled_thr, &thread_args);
+  ALL_NON_EXITED_THREADS (thr)
+    {
+      if (thr == signalled_thr)
+	continue;
+      if (ptid_get_pid (thr->ptid) != ptid_get_pid (inferior_ptid))
+	continue;
+
+      fbsd_corefile_thread (thr, &thread_args);
+    }
+
+  note_data = thread_args.note_data;
+
   return note_data;
 }
 
-/* To be called from GDB_OSABI_FREEBSD_ELF handlers. */
+/* Print descriptions of FreeBSD-specific AUXV entries to FILE.  */
+
+static void
+fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
+		       CORE_ADDR type, CORE_ADDR val)
+{
+  const char *name;
+  const char *description;
+  enum auxv_format format;
+
+  switch (type)
+    {
+#define _TAGNAME(tag) #tag
+#define TAGNAME(tag) _TAGNAME(AT_##tag)
+#define TAG(tag, text, kind) \
+      case AT_FREEBSD_##tag: name = TAGNAME(tag); description = text; format = kind; break
+      TAG (EXECPATH, _("Executable path"), AUXV_FORMAT_STR);
+      TAG (CANARY, _("Canary for SSP"), AUXV_FORMAT_HEX);
+      TAG (CANARYLEN, ("Length of the SSP canary"), AUXV_FORMAT_DEC);
+      TAG (OSRELDATE, _("OSRELDATE"), AUXV_FORMAT_DEC);
+      TAG (NCPUS, _("Number of CPUs"), AUXV_FORMAT_DEC);
+      TAG (PAGESIZES, _("Pagesizes"), AUXV_FORMAT_HEX);
+      TAG (PAGESIZESLEN, _("Number of pagesizes"), AUXV_FORMAT_DEC);
+      TAG (TIMEKEEP, _("Pointer to timehands"), AUXV_FORMAT_HEX);
+      TAG (STACKPROT, _("Initial stack protection"), AUXV_FORMAT_HEX);
+    default:
+      default_print_auxv_entry (gdbarch, file, type, val);
+      return;
+    }
+
+  fprint_auxv_entry (file, name, description, format, type, val);
+}
+
+/* Implement the "get_syscall_number" gdbarch method.  */
+
+static LONGEST
+fbsd_get_syscall_number (struct gdbarch *gdbarch,
+			 ptid_t ptid)
+{
+
+  /* FreeBSD doesn't use gdbarch_get_syscall_number since FreeBSD
+     native targets fetch the system call number from the
+     'pl_syscall_code' member of struct ptrace_lwpinfo in fbsd_wait.
+     However, system call catching requires this function to be
+     set.  */
+
+  internal_error (__FILE__, __LINE__, _("fbsd_get_sycall_number called"));
+}
+
+/* To be called from GDB_OSABI_FREEBSD handlers. */
 
 void
 fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
+  set_gdbarch_core_pid_to_str (gdbarch, fbsd_core_pid_to_str);
+  set_gdbarch_core_thread_name (gdbarch, fbsd_core_thread_name);
   set_gdbarch_make_corefile_notes (gdbarch, fbsd_make_corefile_notes);
+  set_gdbarch_print_auxv_entry (gdbarch, fbsd_print_auxv_entry);
+
+  /* `catch syscall' */
+  set_xml_syscall_file_name (gdbarch, "syscalls/freebsd.xml");
+  set_gdbarch_get_syscall_number (gdbarch, fbsd_get_syscall_number);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-tdep.h ./gdb/fbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/fbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for FreeBSD, architecture independent.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64.c ./gdb/features/aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/aarch64.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,6 +17,23 @@ initialize_tdesc_aarch64 (void)
   set_tdesc_architecture (result, bfd_scan_arch ("aarch64"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core");
+  type = tdesc_create_flags (feature, "cpsr_flags", 4);
+  tdesc_add_flag (type, 0, "SP");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_bitfield (type, "EL", 2, 3);
+  tdesc_add_flag (type, 4, "nRW");
+  tdesc_add_flag (type, 5, "");
+  tdesc_add_flag (type, 6, "F");
+  tdesc_add_flag (type, 7, "I");
+  tdesc_add_flag (type, 8, "A");
+  tdesc_add_flag (type, 9, "D");
+  tdesc_add_flag (type, 20, "IL");
+  tdesc_add_flag (type, 21, "SS");
+  tdesc_add_flag (type, 28, "V");
+  tdesc_add_flag (type, 29, "C");
+  tdesc_add_flag (type, 30, "Z");
+  tdesc_add_flag (type, 31, "N");
+
   tdesc_create_reg (feature, "x0", 0, 1, NULL, 64, "int");
   tdesc_create_reg (feature, "x1", 1, 1, NULL, 64, "int");
   tdesc_create_reg (feature, "x2", 2, 1, NULL, 64, "int");
@@ -50,7 +67,7 @@ initialize_tdesc_aarch64 (void)
   tdesc_create_reg (feature, "x30", 30, 1, NULL, 64, "int");
   tdesc_create_reg (feature, "sp", 31, 1, NULL, 64, "data_ptr");
   tdesc_create_reg (feature, "pc", 32, 1, NULL, 64, "code_ptr");
-  tdesc_create_reg (feature, "cpsr", 33, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "cpsr", 33, 1, NULL, 32, "cpsr_flags");
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpu");
   field_type = tdesc_named_type (feature, "ieee_double");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64-core.xml ./gdb/features/aarch64-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/aarch64-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
      Contributed by ARM Ltd.
 
      Copying and distribution of this file, with or without modification,
@@ -42,5 +42,26 @@
   <reg name="sp" bitsize="64" type="data_ptr"/>
 
   <reg name="pc" bitsize="64" type="code_ptr"/>
-  <reg name="cpsr" bitsize="32"/>
+
+  <flags id="cpsr_flags" size="4">
+    <field name="SP" start="0" end="0"/>
+    <field name="" start="1" end="1"/>
+    <field name="EL" start="2" end="3"/>
+    <field name="nRW" start="4" end="4"/>
+    <field name="" start="5" end="5"/>
+    <field name="F" start="6" end="6"/>
+    <field name="I" start="7" end="7"/>
+    <field name="A" start="8" end="8"/>
+    <field name="D" start="9" end="9"/>
+
+    <field name="IL" start="20" end="20"/>
+    <field name="SS" start="21" end="21"/>
+
+    <field name="V" start="28" end="28"/>
+    <field name="C" start="29" end="29"/>
+    <field name="Z" start="30" end="30"/>
+    <field name="N" start="31" end="31"/>
+  </flags>
+  <reg name="cpsr" bitsize="32" type="cpsr_flags"/>
+
 </feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64-fpu.xml ./gdb/features/aarch64-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64-fpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/aarch64-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
      Contributed by ARM Ltd.
 
      Copying and distribution of this file, with or without modification,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64.xml ./gdb/features/aarch64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/aarch64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/aarch64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
      Contributed by ARM Ltd.
 
      Copying and distribution of this file, with or without modification,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-arcompact.c ./gdb/features/arc-arcompact.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-arcompact.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arc-arcompact.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,75 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arc-arcompact.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arc_arcompact;
+static void
+initialize_tdesc_arc_arcompact (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("ARC700"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arc.core.arcompact");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "fp", 27, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "sp", 28, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ilink1", 29, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "ilink2", 30, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
+  type = tdesc_create_flags (feature, "status32_type", 4);
+  tdesc_add_flag (type, 0, "H");
+  tdesc_add_bitfield (type, "E", 1, 2);
+  tdesc_add_bitfield (type, "A", 3, 4);
+  tdesc_add_flag (type, 5, "AE");
+  tdesc_add_flag (type, 6, "DE");
+  tdesc_add_flag (type, 7, "U");
+  tdesc_add_flag (type, 8, "V");
+  tdesc_add_flag (type, 9, "C");
+  tdesc_add_flag (type, 10, "N");
+  tdesc_add_flag (type, 11, "Z");
+  tdesc_add_flag (type, 12, "L");
+  tdesc_add_flag (type, 13, "R");
+  tdesc_add_flag (type, 14, "SE");
+
+  tdesc_create_reg (feature, "pc", 34, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "status32", 35, 1, NULL, 32, "status32_type");
+
+  tdesc_arc_arcompact = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-arcompact.xml ./gdb/features/arc-arcompact.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-arcompact.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arc-arcompact.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arc:ARC700</architecture>
+  <!-- No OSABI for bare metal.  -->
+  <!-- No compatibility for ARC.  -->
+
+  <feature name="org.gnu.gdb.arc.core.arcompact">
+    <reg name="r0"  bitsize="32"/>
+    <reg name="r1"  bitsize="32"/>
+    <reg name="r2"  bitsize="32"/>
+    <reg name="r3"  bitsize="32"/>
+    <reg name="r4"  bitsize="32"/>
+    <reg name="r5"  bitsize="32"/>
+    <reg name="r6"  bitsize="32"/>
+    <reg name="r7"  bitsize="32"/>
+    <reg name="r8"  bitsize="32"/>
+    <reg name="r9"  bitsize="32"/>
+    <reg name="r10" bitsize="32"/>
+    <reg name="r11" bitsize="32"/>
+    <reg name="r12" bitsize="32"/>
+    <reg name="r13" bitsize="32"/>
+    <reg name="r14" bitsize="32"/>
+    <reg name="r15" bitsize="32"/>
+    <reg name="r16" bitsize="32"/>
+    <reg name="r17" bitsize="32"/>
+    <reg name="r18" bitsize="32"/>
+    <reg name="r19" bitsize="32"/>
+    <reg name="r20" bitsize="32"/>
+    <reg name="r21" bitsize="32"/>
+    <reg name="r22" bitsize="32"/>
+    <reg name="r23" bitsize="32"/>
+    <reg name="r24" bitsize="32"/>
+    <reg name="r25" bitsize="32"/>
+
+    <!-- ARC core data pointer registers.  -->
+    <reg name="gp"  bitsize="32" type="data_ptr"/>
+    <reg name="fp"  bitsize="32" type="data_ptr"/>
+    <reg name="sp"  bitsize="32" type="data_ptr"/>
+
+    <!-- Code pointers.  -->
+    <reg name="ilink1" bitsize="32" type="code_ptr"/>
+    <reg name="ilink2" bitsize="32" type="code_ptr"/>
+    <reg name="blink"  bitsize="32" type="code_ptr"/>
+
+    <!-- Here goes extension core registers: r32 - r59 -->
+
+    <!-- Loop counter.  -->
+    <reg name="lp_count" bitsize="32" type="uint32"/>
+
+    <!-- r61 is a reserved register address.  -->
+
+    <!-- r62 is a long immediate value, not a real register.  -->
+
+    <!-- 4-byte aligned read-only program counter.  -->
+    <reg name="pcl" bitsize="32" type="code_ptr" group=""/>
+  </feature>
+
+  <feature name="org.gnu.gdb.arc.aux-minimal">
+    <flags id="status32_type" size="4">
+	<field name="H"   start="0" end="0"/>
+	<field name="E"   start="1" end="2"/>
+	<field name="A"   start="3" end="4"/>
+	<field name="AE"  start="5" end="5"/>
+	<field name="DE"  start="6" end="6"/>
+	<field name="U"   start="7" end="7"/>
+	<field name="V"   start="8" end="8"/>
+	<field name="C"   start="9" end="9"/>
+	<field name="N"   start="10" end="10"/>
+	<field name="Z"   start="11" end="11"/>
+	<field name="L"   start="12" end="12"/>
+	<field name="R"  start="13" end="13"/>
+	<field name="SE"  start="14" end="14"/>
+    </flags>
+
+    <reg name="pc"       bitsize="32" type="code_ptr"/>
+    <reg name="status32" bitsize="32" type="status32_type"/>
+  </feature>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-v2.c ./gdb/features/arc-v2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-v2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arc-v2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,79 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arc-v2.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arc_v2;
+static void
+initialize_tdesc_arc_v2 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("ARCv2"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arc.core.v2");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "fp", 27, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "sp", 28, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ilink", 29, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "r30", 30, 1, "", 32, "int");
+  tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
+  type = tdesc_create_flags (feature, "status32_type", 4);
+  tdesc_add_flag (type, 0, "H");
+  tdesc_add_bitfield (type, "E", 1, 4);
+  tdesc_add_flag (type, 5, "AE");
+  tdesc_add_flag (type, 6, "DE");
+  tdesc_add_flag (type, 7, "U");
+  tdesc_add_flag (type, 8, "V");
+  tdesc_add_flag (type, 9, "C");
+  tdesc_add_flag (type, 10, "N");
+  tdesc_add_flag (type, 11, "Z");
+  tdesc_add_flag (type, 12, "L");
+  tdesc_add_flag (type, 13, "DZ");
+  tdesc_add_flag (type, 14, "SC");
+  tdesc_add_flag (type, 15, "ES");
+  tdesc_add_bitfield (type, "RB", 16, 18);
+  tdesc_add_flag (type, 19, "AD");
+  tdesc_add_flag (type, 20, "US");
+  tdesc_add_flag (type, 31, "IE");
+
+  tdesc_create_reg (feature, "pc", 34, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "status32", 35, 1, NULL, 32, "status32_type");
+
+  tdesc_arc_v2 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-v2.xml ./gdb/features/arc-v2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arc-v2.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arc-v2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arc:ARCv2</architecture>
+  <!-- No OSABI for bare metal.  -->
+  <!-- No compatibility for ARC.  -->
+
+  <feature name="org.gnu.gdb.arc.core.v2">
+    <reg name="r0"  bitsize="32"/>
+    <reg name="r1"  bitsize="32"/>
+    <reg name="r2"  bitsize="32"/>
+    <reg name="r3"  bitsize="32"/>
+    <reg name="r4"  bitsize="32"/>
+    <reg name="r5"  bitsize="32"/>
+    <reg name="r6"  bitsize="32"/>
+    <reg name="r7"  bitsize="32"/>
+    <reg name="r8"  bitsize="32"/>
+    <reg name="r9"  bitsize="32"/>
+    <reg name="r10" bitsize="32"/>
+    <reg name="r11" bitsize="32"/>
+    <reg name="r12" bitsize="32"/>
+    <reg name="r13" bitsize="32"/>
+    <reg name="r14" bitsize="32"/>
+    <reg name="r15" bitsize="32"/>
+    <reg name="r16" bitsize="32"/>
+    <reg name="r17" bitsize="32"/>
+    <reg name="r18" bitsize="32"/>
+    <reg name="r19" bitsize="32"/>
+    <reg name="r20" bitsize="32"/>
+    <reg name="r21" bitsize="32"/>
+    <reg name="r22" bitsize="32"/>
+    <reg name="r23" bitsize="32"/>
+    <reg name="r24" bitsize="32"/>
+    <reg name="r25" bitsize="32"/>
+
+    <!-- ARC core data pointer registers.  -->
+    <reg name="gp"  bitsize="32" type="data_ptr"/>
+    <reg name="fp"  bitsize="32" type="data_ptr"/>
+    <reg name="sp"  bitsize="32" type="data_ptr"/>
+
+    <!-- Code pointers.  R30 is general purpose, but it used to be ILINK2 in
+    ARCompact, thus its odd position in between of special purpose registers.
+    GCC does't use this register, so it isn't a member of a general group. -->
+    <reg name="ilink" bitsize="32" type="code_ptr"/>
+    <reg name="r30"   bitsize="32" group=""/>
+    <reg name="blink" bitsize="32" type="code_ptr"/>
+
+    <!-- Here goes extension core registers: r32 - r57.  -->
+    <!-- Here goes ACCL/ACCH registers, r58, r59.  -->
+
+    <!-- Loop counter.  -->
+    <reg name="lp_count" bitsize="32" type="uint32"/>
+
+    <!-- r61 is a reserved register address.  -->
+
+    <!-- r62 is a long immediate value, not a real register.  -->
+
+    <!-- 4-byte aligned read-only program counter.  -->
+    <reg name="pcl" bitsize="32" type="code_ptr" group=""/>
+  </feature>
+
+  <feature name="org.gnu.gdb.arc.aux-minimal">
+    <flags id="status32_type" size="4">
+	<field name="H"   start="0" end="0"/>
+	<field name="E"   start="1" end="4"/>
+	<field name="AE"  start="5" end="5"/>
+	<field name="DE"  start="6" end="6"/>
+	<field name="U"   start="7" end="7"/>
+	<field name="V"   start="8" end="8"/>
+	<field name="C"   start="9" end="9"/>
+	<field name="N"   start="10" end="10"/>
+	<field name="Z"   start="11" end="11"/>
+	<field name="L"   start="12" end="12"/>
+	<field name="DZ"  start="13" end="13"/>
+	<field name="SC"  start="14" end="14"/>
+	<field name="ES"  start="15" end="15"/>
+	<field name="RB"  start="16" end="18"/>
+	<field name="AD"  start="19" end="19"/>
+	<field name="US"  start="20" end="20"/>
+	<field name="IE"  start="31" end="31"/>
+    </flags>
+
+    <reg name="pc"       bitsize="32" type="code_ptr"/>
+    <reg name="status32" bitsize="32" type="status32_type"/>
+  </feature>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-core.xml ./gdb/features/arm/arm-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-core.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.arm.core">
+  <reg name="r0" bitsize="32" type="uint32"/>
+  <reg name="r1" bitsize="32" type="uint32"/>
+  <reg name="r2" bitsize="32" type="uint32"/>
+  <reg name="r3" bitsize="32" type="uint32"/>
+  <reg name="r4" bitsize="32" type="uint32"/>
+  <reg name="r5" bitsize="32" type="uint32"/>
+  <reg name="r6" bitsize="32" type="uint32"/>
+  <reg name="r7" bitsize="32" type="uint32"/>
+  <reg name="r8" bitsize="32" type="uint32"/>
+  <reg name="r9" bitsize="32" type="uint32"/>
+  <reg name="r10" bitsize="32" type="uint32"/>
+  <reg name="r11" bitsize="32" type="uint32"/>
+  <reg name="r12" bitsize="32" type="uint32"/>
+  <reg name="sp" bitsize="32" type="data_ptr"/>
+  <reg name="lr" bitsize="32"/>
+  <reg name="pc" bitsize="32" type="code_ptr"/>
+
+  <!-- The CPSR is register 25, rather than register 16, because
+       the FPA registers historically were placed between the PC
+       and the CPSR in the "g" packet.  -->
+  <reg name="cpsr" bitsize="32" regnum="25"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-fpa.xml ./gdb/features/arm/arm-fpa.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-fpa.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-fpa.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.arm.fpa">
+  <!-- f0's regnum is set explicitly, because the FPA registers
+       historically were placed between the PC and the CPSR in the "g"
+       packet - in the middle of org.gnu.gdb.arm.core.  -->
+  <reg name="f0" bitsize="96" type="arm_fpa_ext" regnum="16"/>
+  <reg name="f1" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f2" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f3" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f4" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f5" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f6" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="f7" bitsize="96" type="arm_fpa_ext"/>
+
+  <reg name="fps" bitsize="32"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-m-profile.xml ./gdb/features/arm/arm-m-profile.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-m-profile.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-m-profile.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.arm.m-profile">
+  <reg name="r0" bitsize="32"/>
+  <reg name="r1" bitsize="32"/>
+  <reg name="r2" bitsize="32"/>
+  <reg name="r3" bitsize="32"/>
+  <reg name="r4" bitsize="32"/>
+  <reg name="r5" bitsize="32"/>
+  <reg name="r6" bitsize="32"/>
+  <reg name="r7" bitsize="32"/>
+  <reg name="r8" bitsize="32"/>
+  <reg name="r9" bitsize="32"/>
+  <reg name="r10" bitsize="32"/>
+  <reg name="r11" bitsize="32"/>
+  <reg name="r12" bitsize="32"/>
+  <reg name="sp" bitsize="32" type="data_ptr"/>
+  <reg name="lr" bitsize="32"/>
+  <reg name="pc" bitsize="32" type="code_ptr"/>
+  <reg name="xpsr" bitsize="32" regnum="25"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-vfpv2.xml ./gdb/features/arm/arm-vfpv2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-vfpv2.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-vfpv2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.arm.vfp">
+  <reg name="d0" bitsize="64" type="ieee_double"/>
+  <reg name="d1" bitsize="64" type="ieee_double"/>
+  <reg name="d2" bitsize="64" type="ieee_double"/>
+  <reg name="d3" bitsize="64" type="ieee_double"/>
+  <reg name="d4" bitsize="64" type="ieee_double"/>
+  <reg name="d5" bitsize="64" type="ieee_double"/>
+  <reg name="d6" bitsize="64" type="ieee_double"/>
+  <reg name="d7" bitsize="64" type="ieee_double"/>
+  <reg name="d8" bitsize="64" type="ieee_double"/>
+  <reg name="d9" bitsize="64" type="ieee_double"/>
+  <reg name="d10" bitsize="64" type="ieee_double"/>
+  <reg name="d11" bitsize="64" type="ieee_double"/>
+  <reg name="d12" bitsize="64" type="ieee_double"/>
+  <reg name="d13" bitsize="64" type="ieee_double"/>
+  <reg name="d14" bitsize="64" type="ieee_double"/>
+  <reg name="d15" bitsize="64" type="ieee_double"/>
+
+  <reg name="fpscr" bitsize="32" type="int" group="float"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-vfpv3.xml ./gdb/features/arm/arm-vfpv3.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-vfpv3.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-vfpv3.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.arm.vfp">
+  <reg name="d0" bitsize="64" type="ieee_double"/>
+  <reg name="d1" bitsize="64" type="ieee_double"/>
+  <reg name="d2" bitsize="64" type="ieee_double"/>
+  <reg name="d3" bitsize="64" type="ieee_double"/>
+  <reg name="d4" bitsize="64" type="ieee_double"/>
+  <reg name="d5" bitsize="64" type="ieee_double"/>
+  <reg name="d6" bitsize="64" type="ieee_double"/>
+  <reg name="d7" bitsize="64" type="ieee_double"/>
+  <reg name="d8" bitsize="64" type="ieee_double"/>
+  <reg name="d9" bitsize="64" type="ieee_double"/>
+  <reg name="d10" bitsize="64" type="ieee_double"/>
+  <reg name="d11" bitsize="64" type="ieee_double"/>
+  <reg name="d12" bitsize="64" type="ieee_double"/>
+  <reg name="d13" bitsize="64" type="ieee_double"/>
+  <reg name="d14" bitsize="64" type="ieee_double"/>
+  <reg name="d15" bitsize="64" type="ieee_double"/>
+  <reg name="d16" bitsize="64" type="ieee_double"/>
+  <reg name="d17" bitsize="64" type="ieee_double"/>
+  <reg name="d18" bitsize="64" type="ieee_double"/>
+  <reg name="d19" bitsize="64" type="ieee_double"/>
+  <reg name="d20" bitsize="64" type="ieee_double"/>
+  <reg name="d21" bitsize="64" type="ieee_double"/>
+  <reg name="d22" bitsize="64" type="ieee_double"/>
+  <reg name="d23" bitsize="64" type="ieee_double"/>
+  <reg name="d24" bitsize="64" type="ieee_double"/>
+  <reg name="d25" bitsize="64" type="ieee_double"/>
+  <reg name="d26" bitsize="64" type="ieee_double"/>
+  <reg name="d27" bitsize="64" type="ieee_double"/>
+  <reg name="d28" bitsize="64" type="ieee_double"/>
+  <reg name="d29" bitsize="64" type="ieee_double"/>
+  <reg name="d30" bitsize="64" type="ieee_double"/>
+  <reg name="d31" bitsize="64" type="ieee_double"/>
+
+  <reg name="fpscr" bitsize="32" type="int" group="float"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-iwmmxt.c ./gdb/features/arm/arm-with-iwmmxt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-iwmmxt.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-iwmmxt.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,82 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-iwmmxt.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_iwmmxt;
+static void
+initialize_tdesc_arm_with_iwmmxt (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("iwmmxt"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.xscale.iwmmxt");
+  field_type = tdesc_named_type (feature, "uint8");
+  tdesc_create_vector (feature, "iwmmxt_v8u8", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "uint16");
+  tdesc_create_vector (feature, "iwmmxt_v4u16", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "uint32");
+  tdesc_create_vector (feature, "iwmmxt_v2u32", field_type, 2);
+
+  type = tdesc_create_union (feature, "iwmmxt_vec64i");
+  field_type = tdesc_named_type (feature, "iwmmxt_v8u8");
+  tdesc_add_field (type, "u8", field_type);
+  field_type = tdesc_named_type (feature, "iwmmxt_v4u16");
+  tdesc_add_field (type, "u16", field_type);
+  field_type = tdesc_named_type (feature, "iwmmxt_v2u32");
+  tdesc_add_field (type, "u32", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "u64", field_type);
+
+  tdesc_create_reg (feature, "wR0", 26, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR1", 27, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR2", 28, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR3", 29, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR4", 30, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR5", 31, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR6", 32, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR7", 33, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR8", 34, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR9", 35, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR10", 36, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR11", 37, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR12", 38, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR13", 39, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR14", 40, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wR15", 41, 1, NULL, 64, "iwmmxt_vec64i");
+  tdesc_create_reg (feature, "wCSSF", 42, 1, "vector", 32, "int");
+  tdesc_create_reg (feature, "wCASF", 43, 1, "vector", 32, "int");
+  tdesc_create_reg (feature, "wCGR0", 44, 1, "vector", 32, "int");
+  tdesc_create_reg (feature, "wCGR1", 45, 1, "vector", 32, "int");
+  tdesc_create_reg (feature, "wCGR2", 46, 1, "vector", 32, "int");
+  tdesc_create_reg (feature, "wCGR3", 47, 1, "vector", 32, "int");
+
+  tdesc_arm_with_iwmmxt = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-iwmmxt.xml ./gdb/features/arm/arm-with-iwmmxt.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-iwmmxt.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-iwmmxt.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>iwmmxt</architecture>
+  <xi:include href="arm-core.xml"/>
+  <xi:include href="xscale-iwmmxt.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m.c ./gdb/features/arm/arm-with-m.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,37 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-m.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_m;
+static void
+initialize_tdesc_arm_with_m (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
+
+  tdesc_arm_with_m = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-fpa-layout.c ./gdb/features/arm/arm-with-m-fpa-layout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-fpa-layout.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m-fpa-layout.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-m-fpa-layout.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_m_fpa_layout;
+static void
+initialize_tdesc_arm_with_m_fpa_layout (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "", 16, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 17, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 18, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 19, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 20, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 21, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 22, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 23, 1, NULL, 96, "arm_fpa_ext");
+  tdesc_create_reg (feature, "", 24, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
+
+  tdesc_arm_with_m_fpa_layout = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-fpa-layout.xml ./gdb/features/arm/arm-with-m-fpa-layout.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-fpa-layout.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m-fpa-layout.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- A target description for an M-profile device, for stubs that
+     transfer registers using the historical fpa layout.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+<architecture>arm</architecture>
+<feature name="org.gnu.gdb.arm.m-profile">
+  <reg name="r0" bitsize="32"/>
+  <reg name="r1" bitsize="32"/>
+  <reg name="r2" bitsize="32"/>
+  <reg name="r3" bitsize="32"/>
+  <reg name="r4" bitsize="32"/>
+  <reg name="r5" bitsize="32"/>
+  <reg name="r6" bitsize="32"/>
+  <reg name="r7" bitsize="32"/>
+  <reg name="r8" bitsize="32"/>
+  <reg name="r9" bitsize="32"/>
+  <reg name="r10" bitsize="32"/>
+  <reg name="r11" bitsize="32"/>
+  <reg name="r12" bitsize="32"/>
+  <reg name="sp" bitsize="32" type="data_ptr"/>
+  <reg name="lr" bitsize="32"/>
+  <reg name="pc" bitsize="32" type="code_ptr"/>
+
+  <!-- Slack for unused FPA registers (f0-f7 + fps).
+       See arm-fpa.xml.  -->
+  <reg name="" bitsize="96" type="arm_fpa_ext" regnum="16"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="96" type="arm_fpa_ext"/>
+  <reg name="" bitsize="32"/>
+
+  <reg name="xpsr" bitsize="32" regnum="25"/>
+</feature>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-vfp-d16.c ./gdb/features/arm/arm-with-m-vfp-d16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-vfp-d16.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m-vfp-d16.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-m-vfp-d16.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_m_vfp_d16;
+static void
+initialize_tdesc_arm_with_m_vfp_d16 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
+  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "fpscr", 42, 1, "float", 32, "int");
+
+  tdesc_arm_with_m_vfp_d16 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-vfp-d16.xml ./gdb/features/arm/arm-with-m-vfp-d16.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m-vfp-d16.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m-vfp-d16.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arm</architecture>
+  <xi:include href="arm-m-profile.xml"/>
+  <!-- Layout of vfpv4-sp-d16 is identical to vfpv2 -->
+  <xi:include href="arm-vfpv2.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m.xml ./gdb/features/arm/arm-with-m.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-m.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-m.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arm</architecture>
+  <xi:include href="arm-m-profile.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-neon.c ./gdb/features/arm/arm-with-neon.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-neon.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-neon.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,74 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-neon.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_neon;
+static void
+initialize_tdesc_arm_with_neon (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
+  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d16", 42, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d17", 43, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d18", 44, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d19", 45, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d20", 46, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d21", 47, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d22", 48, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d23", 49, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d24", 50, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d25", 51, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d26", 52, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d27", 53, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d28", 54, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d29", 55, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d30", 56, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d31", 57, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "fpscr", 58, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.neon");
+
+  tdesc_arm_with_neon = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-neon.xml ./gdb/features/arm/arm-with-neon.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-neon.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-neon.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arm</architecture>
+  <xi:include href="arm-core.xml"/>
+  <xi:include href="arm-vfpv3.xml"/>
+  <feature name="org.gnu.gdb.arm.neon"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv2.c ./gdb/features/arm/arm-with-vfpv2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-vfpv2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-vfpv2.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_vfpv2;
+static void
+initialize_tdesc_arm_with_vfpv2 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
+  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "fpscr", 42, 1, "float", 32, "int");
+
+  tdesc_arm_with_vfpv2 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv2.xml ./gdb/features/arm/arm-with-vfpv2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv2.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-vfpv2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arm</architecture>
+  <xi:include href="arm-core.xml"/>
+  <xi:include href="arm-vfpv2.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv3.c ./gdb/features/arm/arm-with-vfpv3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv3.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-vfpv3.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,72 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: arm-with-vfpv3.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_arm_with_vfpv3;
+static void
+initialize_tdesc_arm_with_vfpv3 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("arm"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
+  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d16", 42, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d17", 43, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d18", 44, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d19", 45, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d20", 46, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d21", 47, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d22", 48, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d23", 49, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d24", 50, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d25", 51, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d26", 52, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d27", 53, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d28", 54, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d29", 55, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d30", 56, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "d31", 57, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "fpscr", 58, 1, "float", 32, "int");
+
+  tdesc_arm_with_vfpv3 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv3.xml ./gdb/features/arm/arm-with-vfpv3.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/arm-with-vfpv3.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/arm-with-vfpv3.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>arm</architecture>
+  <xi:include href="arm-core.xml"/>
+  <xi:include href="arm-vfpv3.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/xscale-iwmmxt.xml ./gdb/features/arm/xscale-iwmmxt.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm/xscale-iwmmxt.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/arm/xscale-iwmmxt.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.xscale.iwmmxt">
+  <vector id="iwmmxt_v8u8" type="uint8" count="8"/>
+  <vector id="iwmmxt_v4u16" type="uint16" count="4"/>
+  <vector id="iwmmxt_v2u32" type="uint32" count="2"/>
+  <union id="iwmmxt_vec64i">
+    <field name="u8" type="iwmmxt_v8u8"/>
+    <field name="u16" type="iwmmxt_v4u16"/>
+    <field name="u32" type="iwmmxt_v2u32"/>
+    <field name="u64" type="uint64"/>
+  </union>
+
+  <reg name="wR0" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR1" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR2" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR3" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR4" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR5" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR6" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR7" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR8" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR9" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR10" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR11" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR12" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR13" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR14" bitsize="64" type="iwmmxt_vec64i"/>
+  <reg name="wR15" bitsize="64" type="iwmmxt_vec64i"/>
+
+  <reg name="wCSSF" bitsize="32" type="int" group="vector"/>
+  <reg name="wCASF" bitsize="32" type="int" group="vector"/>
+
+  <reg name="wCGR0" bitsize="32" type="int" group="vector"/>
+  <reg name="wCGR1" bitsize="32" type="int" group="vector"/>
+  <reg name="wCGR2" bitsize="32" type="int" group="vector"/>
+  <reg name="wCGR3" bitsize="32" type="int" group="vector"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-core.xml ./gdb/features/arm-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-core.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.arm.core">
-  <reg name="r0" bitsize="32" type="uint32"/>
-  <reg name="r1" bitsize="32" type="uint32"/>
-  <reg name="r2" bitsize="32" type="uint32"/>
-  <reg name="r3" bitsize="32" type="uint32"/>
-  <reg name="r4" bitsize="32" type="uint32"/>
-  <reg name="r5" bitsize="32" type="uint32"/>
-  <reg name="r6" bitsize="32" type="uint32"/>
-  <reg name="r7" bitsize="32" type="uint32"/>
-  <reg name="r8" bitsize="32" type="uint32"/>
-  <reg name="r9" bitsize="32" type="uint32"/>
-  <reg name="r10" bitsize="32" type="uint32"/>
-  <reg name="r11" bitsize="32" type="uint32"/>
-  <reg name="r12" bitsize="32" type="uint32"/>
-  <reg name="sp" bitsize="32" type="data_ptr"/>
-  <reg name="lr" bitsize="32"/>
-  <reg name="pc" bitsize="32" type="code_ptr"/>
-
-  <!-- The CPSR is register 25, rather than register 16, because
-       the FPA registers historically were placed between the PC
-       and the CPSR in the "g" packet.  -->
-  <reg name="cpsr" bitsize="32" regnum="25"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-fpa.xml ./gdb/features/arm-fpa.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-fpa.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-fpa.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.arm.fpa">
-  <!-- f0's regnum is set explicitly, because the FPA registers
-       historically were placed between the PC and the CPSR in the "g"
-       packet - in the middle of org.gnu.gdb.arm.core.  -->
-  <reg name="f0" bitsize="96" type="arm_fpa_ext" regnum="16"/>
-  <reg name="f1" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f2" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f3" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f4" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f5" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f6" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="f7" bitsize="96" type="arm_fpa_ext"/>
-
-  <reg name="fps" bitsize="32"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-m-profile.xml ./gdb/features/arm-m-profile.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-m-profile.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-m-profile.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.arm.m-profile">
-  <reg name="r0" bitsize="32"/>
-  <reg name="r1" bitsize="32"/>
-  <reg name="r2" bitsize="32"/>
-  <reg name="r3" bitsize="32"/>
-  <reg name="r4" bitsize="32"/>
-  <reg name="r5" bitsize="32"/>
-  <reg name="r6" bitsize="32"/>
-  <reg name="r7" bitsize="32"/>
-  <reg name="r8" bitsize="32"/>
-  <reg name="r9" bitsize="32"/>
-  <reg name="r10" bitsize="32"/>
-  <reg name="r11" bitsize="32"/>
-  <reg name="r12" bitsize="32"/>
-  <reg name="sp" bitsize="32" type="data_ptr"/>
-  <reg name="lr" bitsize="32"/>
-  <reg name="pc" bitsize="32" type="code_ptr"/>
-  <reg name="xpsr" bitsize="32" regnum="25"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-vfpv2.xml ./gdb/features/arm-vfpv2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-vfpv2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-vfpv2.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.arm.vfp">
-  <reg name="d0" bitsize="64" type="ieee_double"/>
-  <reg name="d1" bitsize="64" type="ieee_double"/>
-  <reg name="d2" bitsize="64" type="ieee_double"/>
-  <reg name="d3" bitsize="64" type="ieee_double"/>
-  <reg name="d4" bitsize="64" type="ieee_double"/>
-  <reg name="d5" bitsize="64" type="ieee_double"/>
-  <reg name="d6" bitsize="64" type="ieee_double"/>
-  <reg name="d7" bitsize="64" type="ieee_double"/>
-  <reg name="d8" bitsize="64" type="ieee_double"/>
-  <reg name="d9" bitsize="64" type="ieee_double"/>
-  <reg name="d10" bitsize="64" type="ieee_double"/>
-  <reg name="d11" bitsize="64" type="ieee_double"/>
-  <reg name="d12" bitsize="64" type="ieee_double"/>
-  <reg name="d13" bitsize="64" type="ieee_double"/>
-  <reg name="d14" bitsize="64" type="ieee_double"/>
-  <reg name="d15" bitsize="64" type="ieee_double"/>
-
-  <reg name="fpscr" bitsize="32" type="int" group="float"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-vfpv3.xml ./gdb/features/arm-vfpv3.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-vfpv3.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-vfpv3.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.arm.vfp">
-  <reg name="d0" bitsize="64" type="ieee_double"/>
-  <reg name="d1" bitsize="64" type="ieee_double"/>
-  <reg name="d2" bitsize="64" type="ieee_double"/>
-  <reg name="d3" bitsize="64" type="ieee_double"/>
-  <reg name="d4" bitsize="64" type="ieee_double"/>
-  <reg name="d5" bitsize="64" type="ieee_double"/>
-  <reg name="d6" bitsize="64" type="ieee_double"/>
-  <reg name="d7" bitsize="64" type="ieee_double"/>
-  <reg name="d8" bitsize="64" type="ieee_double"/>
-  <reg name="d9" bitsize="64" type="ieee_double"/>
-  <reg name="d10" bitsize="64" type="ieee_double"/>
-  <reg name="d11" bitsize="64" type="ieee_double"/>
-  <reg name="d12" bitsize="64" type="ieee_double"/>
-  <reg name="d13" bitsize="64" type="ieee_double"/>
-  <reg name="d14" bitsize="64" type="ieee_double"/>
-  <reg name="d15" bitsize="64" type="ieee_double"/>
-  <reg name="d16" bitsize="64" type="ieee_double"/>
-  <reg name="d17" bitsize="64" type="ieee_double"/>
-  <reg name="d18" bitsize="64" type="ieee_double"/>
-  <reg name="d19" bitsize="64" type="ieee_double"/>
-  <reg name="d20" bitsize="64" type="ieee_double"/>
-  <reg name="d21" bitsize="64" type="ieee_double"/>
-  <reg name="d22" bitsize="64" type="ieee_double"/>
-  <reg name="d23" bitsize="64" type="ieee_double"/>
-  <reg name="d24" bitsize="64" type="ieee_double"/>
-  <reg name="d25" bitsize="64" type="ieee_double"/>
-  <reg name="d26" bitsize="64" type="ieee_double"/>
-  <reg name="d27" bitsize="64" type="ieee_double"/>
-  <reg name="d28" bitsize="64" type="ieee_double"/>
-  <reg name="d29" bitsize="64" type="ieee_double"/>
-  <reg name="d30" bitsize="64" type="ieee_double"/>
-  <reg name="d31" bitsize="64" type="ieee_double"/>
-
-  <reg name="fpscr" bitsize="32" type="int" group="float"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-iwmmxt.c ./gdb/features/arm-with-iwmmxt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-iwmmxt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-iwmmxt.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,82 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-iwmmxt.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_iwmmxt;
-static void
-initialize_tdesc_arm_with_iwmmxt (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("iwmmxt"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.xscale.iwmmxt");
-  field_type = tdesc_named_type (feature, "uint8");
-  tdesc_create_vector (feature, "iwmmxt_v8u8", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "uint16");
-  tdesc_create_vector (feature, "iwmmxt_v4u16", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "uint32");
-  tdesc_create_vector (feature, "iwmmxt_v2u32", field_type, 2);
-
-  type = tdesc_create_union (feature, "iwmmxt_vec64i");
-  field_type = tdesc_named_type (feature, "iwmmxt_v8u8");
-  tdesc_add_field (type, "u8", field_type);
-  field_type = tdesc_named_type (feature, "iwmmxt_v4u16");
-  tdesc_add_field (type, "u16", field_type);
-  field_type = tdesc_named_type (feature, "iwmmxt_v2u32");
-  tdesc_add_field (type, "u32", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "u64", field_type);
-
-  tdesc_create_reg (feature, "wR0", 26, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR1", 27, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR2", 28, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR3", 29, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR4", 30, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR5", 31, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR6", 32, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR7", 33, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR8", 34, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR9", 35, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR10", 36, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR11", 37, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR12", 38, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR13", 39, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR14", 40, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wR15", 41, 1, NULL, 64, "iwmmxt_vec64i");
-  tdesc_create_reg (feature, "wCSSF", 42, 1, "vector", 32, "int");
-  tdesc_create_reg (feature, "wCASF", 43, 1, "vector", 32, "int");
-  tdesc_create_reg (feature, "wCGR0", 44, 1, "vector", 32, "int");
-  tdesc_create_reg (feature, "wCGR1", 45, 1, "vector", 32, "int");
-  tdesc_create_reg (feature, "wCGR2", 46, 1, "vector", 32, "int");
-  tdesc_create_reg (feature, "wCGR3", 47, 1, "vector", 32, "int");
-
-  tdesc_arm_with_iwmmxt = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-iwmmxt.xml ./gdb/features/arm-with-iwmmxt.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-iwmmxt.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-iwmmxt.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>iwmmxt</architecture>
-  <xi:include href="arm-core.xml"/>
-  <xi:include href="xscale-iwmmxt.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m.c ./gdb/features/arm-with-m.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-m.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_m;
-static void
-initialize_tdesc_arm_with_m (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
-
-  tdesc_arm_with_m = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-fpa-layout.c ./gdb/features/arm-with-m-fpa-layout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-fpa-layout.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m-fpa-layout.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-m-fpa-layout.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_m_fpa_layout;
-static void
-initialize_tdesc_arm_with_m_fpa_layout (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "", 16, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 17, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 18, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 19, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 20, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 21, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 22, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 23, 1, NULL, 96, "arm_fpa_ext");
-  tdesc_create_reg (feature, "", 24, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
-
-  tdesc_arm_with_m_fpa_layout = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-fpa-layout.xml ./gdb/features/arm-with-m-fpa-layout.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-fpa-layout.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m-fpa-layout.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- A target description for an M-profile device, for stubs that
-     transfer registers using the historical fpa layout.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-<feature name="org.gnu.gdb.arm.m-profile">
-  <reg name="r0" bitsize="32"/>
-  <reg name="r1" bitsize="32"/>
-  <reg name="r2" bitsize="32"/>
-  <reg name="r3" bitsize="32"/>
-  <reg name="r4" bitsize="32"/>
-  <reg name="r5" bitsize="32"/>
-  <reg name="r6" bitsize="32"/>
-  <reg name="r7" bitsize="32"/>
-  <reg name="r8" bitsize="32"/>
-  <reg name="r9" bitsize="32"/>
-  <reg name="r10" bitsize="32"/>
-  <reg name="r11" bitsize="32"/>
-  <reg name="r12" bitsize="32"/>
-  <reg name="sp" bitsize="32" type="data_ptr"/>
-  <reg name="lr" bitsize="32"/>
-  <reg name="pc" bitsize="32" type="code_ptr"/>
-
-  <!-- Slack for unused FPA registers (f0-f7 + fps).
-       See arm-fpa.xml.  -->
-  <reg name="" bitsize="96" type="arm_fpa_ext" regnum="16"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="96" type="arm_fpa_ext"/>
-  <reg name="" bitsize="32"/>
-
-  <reg name="xpsr" bitsize="32" regnum="25"/>
-</feature>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-vfp-d16.c ./gdb/features/arm-with-m-vfp-d16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-vfp-d16.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m-vfp-d16.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-m-vfp-d16.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_m_vfp_d16;
-static void
-initialize_tdesc_arm_with_m_vfp_d16 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
-  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "fpscr", 42, 1, "float", 32, "int");
-
-  tdesc_arm_with_m_vfp_d16 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-vfp-d16.xml ./gdb/features/arm-with-m-vfp-d16.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m-vfp-d16.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m-vfp-d16.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <xi:include href="arm-m-profile.xml"/>
-  <!-- Layout of vfpv4-sp-d16 is identical to vfpv2 -->
-  <xi:include href="arm-vfpv2.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m.xml ./gdb/features/arm-with-m.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-m.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-m.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <xi:include href="arm-m-profile.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-neon.c ./gdb/features/arm-with-neon.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-neon.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-neon.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,72 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-neon.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_neon;
-static void
-initialize_tdesc_arm_with_neon (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
-  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d16", 42, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d17", 43, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d18", 44, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d19", 45, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d20", 46, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d21", 47, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d22", 48, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d23", 49, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d24", 50, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d25", 51, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d26", 52, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d27", 53, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d28", 54, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d29", 55, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d30", 56, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d31", 57, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "fpscr", 58, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.neon");
-
-  tdesc_arm_with_neon = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-neon.xml ./gdb/features/arm-with-neon.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-neon.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-neon.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <xi:include href="arm-core.xml"/>
-  <xi:include href="arm-vfpv3.xml"/>
-  <feature name="org.gnu.gdb.arm.neon"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv2.c ./gdb/features/arm-with-vfpv2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-vfpv2.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-vfpv2.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_vfpv2;
-static void
-initialize_tdesc_arm_with_vfpv2 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
-  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "fpscr", 42, 1, "float", 32, "int");
-
-  tdesc_arm_with_vfpv2 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv2.xml ./gdb/features/arm-with-vfpv2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-vfpv2.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <xi:include href="arm-core.xml"/>
-  <xi:include href="arm-vfpv2.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv3.c ./gdb/features/arm-with-vfpv3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv3.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-vfpv3.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,70 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: arm-with-vfpv3.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_arm_with_vfpv3;
-static void
-initialize_tdesc_arm_with_vfpv3 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core");
-  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int");
-  tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "cpsr", 25, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp");
-  tdesc_create_reg (feature, "d0", 26, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d1", 27, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d2", 28, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d3", 29, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d4", 30, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d5", 31, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d6", 32, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d7", 33, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d8", 34, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d9", 35, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d10", 36, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d11", 37, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d12", 38, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d13", 39, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d14", 40, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d15", 41, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d16", 42, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d17", 43, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d18", 44, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d19", 45, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d20", 46, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d21", 47, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d22", 48, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d23", 49, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d24", 50, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d25", 51, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d26", 52, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d27", 53, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d28", 54, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d29", 55, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d30", 56, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "d31", 57, 1, NULL, 64, "ieee_double");
-  tdesc_create_reg (feature, "fpscr", 58, 1, "float", 32, "int");
-
-  tdesc_arm_with_vfpv3 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv3.xml ./gdb/features/arm-with-vfpv3.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/arm-with-vfpv3.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/arm-with-vfpv3.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <xi:include href="arm-core.xml"/>
-  <xi:include href="arm-vfpv3.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/btrace-conf.dtd ./gdb/features/btrace-conf.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/btrace-conf.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/btrace-conf.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/btrace.dtd ./gdb/features/btrace.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/btrace.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/btrace.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/feature_to_c.sh ./gdb/features/feature_to_c.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/feature_to_c.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/feature_to_c.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # Convert text files to compilable C arrays.
 #
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -19,14 +19,14 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-output=$1
-shift
-
-if test -z "$output" || test -z "$1"; then
+if test -z "$1" || test -z "$2"; then
   echo "Usage: $0 OUTPUTFILE INPUTFILE..."
   exit 1
 fi
 
+output=$1
+shift
+
 if test -e "$output"; then
   echo "Output file \"$output\" already exists; refusing to overwrite."
   exit 1
@@ -64,12 +64,7 @@ done
 
 echo >> $output
 
-echo "#ifdef __cplusplus"                    >> $output
-echo "#  define EXPORTED_CONST extern const" >> $output
-echo "#else"                                 >> $output
-echo "#  define EXPORTED_CONST const"        >> $output
-echo "#endif"                                >> $output
-echo "EXPORTED_CONST char *const xml_builtin[][2] = {" >> $output
+echo "extern const char *const xml_builtin[][2] = {" >> $output
 
 for input; do
   basename=`echo $input | sed 's,.*/,,'`
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/gdb-target.dtd ./gdb/features/gdb-target.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/gdb-target.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/gdb-target.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -45,6 +45,11 @@
 	id		CDATA	#REQUIRED
 	size		CDATA	#REQUIRED>
 
+<!ELEMENT enum		(evalue+)>
+<!ATTLIST enum
+	id		CDATA	#REQUIRED
+	size		CDATA	#REQUIRED>
+
 <!ELEMENT struct	(field+)>
 <!ATTLIST struct
 	id		CDATA	#REQUIRED
@@ -61,5 +66,10 @@
 	start		CDATA	#IMPLIED
 	end		CDATA	#IMPLIED>
 
+<!ELEMENT evalue	EMPTY>
+<!ATTLIST evalue
+	name		CDATA	#REQUIRED
+	value		CDATA	#REQUIRED>
+
 <!ENTITY % xinclude SYSTEM "xinclude.dtd">
 %xinclude;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-avx512.xml ./gdb/features/i386/32bit-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-avx512.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-avx512.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-avx.xml ./gdb/features/i386/32bit-avx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-avx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-avx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-core.xml ./gdb/features/i386/32bit-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-linux.xml ./gdb/features/i386/32bit-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-mpx.xml ./gdb/features/i386/32bit-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-mpx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -25,8 +25,10 @@
   <struct id="_bndcfgu" size="8">
     <field name="base" start="12" end="31" />
     <field name="reserved" start="2" end="11"/>
-    <field name="preserved" start="1" end="1"/>
-    <field name="enabled" start="0" end="1"/>
+    <!-- Explicitly set the type here, otherwise it defaults to bool.
+         Perhaps this should be uint32, but the container type has size 8.  -->
+    <field name="preserved" start="1" end="1" type="uint64"/>
+    <field name="enabled" start="0" end="0" type="uint64"/>
   </struct>
 
    <union id="cfgu">
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-pkeys.xml ./gdb/features/i386/32bit-pkeys.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-pkeys.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/32bit-pkeys.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.i386.pkeys">
+
+  <reg name="pkru" bitsize="32" type="uint32"/>
+
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-sse.xml ./gdb/features/i386/32bit-sse.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/32bit-sse.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/32bit-sse.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-avx512.xml ./gdb/features/i386/64bit-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-avx512.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-avx512.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-avx.xml ./gdb/features/i386/64bit-avx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-avx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-avx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-core.xml ./gdb/features/i386/64bit-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-linux.xml ./gdb/features/i386/64bit-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-mpx.xml ./gdb/features/i386/64bit-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-mpx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -25,8 +25,9 @@
   <struct id="_bndcfgu" size="8">
     <field name="base" start="12" end="63"/>
     <field name="reserved" start="2" end="11"/>
-    <field name="preserved" start="1" end="1"/>
-    <field name="enabled" start="0" end="0"/>
+    <!-- Explicitly set the type here, otherwise it defaults to bool.  -->
+    <field name="preserved" start="1" end="1" type="uint64"/>
+    <field name="enabled" start="0" end="0" type="uint64"/>
   </struct>
 
    <union id="cfgu">
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-pkeys.xml ./gdb/features/i386/64bit-pkeys.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-pkeys.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/64bit-pkeys.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.i386.pkeys">
+
+  <reg name="pkru" bitsize="32" type="uint32"/>
+
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-segments.xml ./gdb/features/i386/64bit-segments.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-segments.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/64bit-segments.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.i386.segments">
+  <reg name="fs_base" bitsize="64" type="int"/>
+  <reg name="gs_base" bitsize="64" type="int"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-sse.xml ./gdb/features/i386/64bit-sse.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/64bit-sse.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/64bit-sse.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512.c ./gdb/features/i386/amd64-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx512.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,317 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: amd64-avx512.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_amd64_avx512;
-static void
-initialize_tdesc_amd64_avx512 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
-  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
-  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 63);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 63);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 0);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "xmm16", 79, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm17", 80, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm18", 81, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm19", 82, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm20", 83, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm21", 84, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm22", 85, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm23", 86, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm24", 87, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm25", 88, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm26", 89, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm27", 90, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm28", 91, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm29", 92, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm30", 93, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm31", 94, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "ymm16h", 95, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm17h", 96, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm18h", 97, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm19h", 98, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm20h", 99, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm21h", 100, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm22h", 101, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm23h", 102, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm24h", 103, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm25h", 104, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm26h", 105, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm27h", 106, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm28h", 107, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm29h", 108, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm30h", 109, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm31h", 110, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "k0", 111, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 112, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 113, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 114, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 115, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 116, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 117, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 118, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 119, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 120, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 121, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 122, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 123, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 124, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 125, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 126, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm8h", 127, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm9h", 128, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm10h", 129, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm11h", 130, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm12h", 131, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm13h", 132, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm14h", 133, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm15h", 134, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm16h", 135, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm17h", 136, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm18h", 137, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm19h", 138, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm20h", 139, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm21h", 140, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm22h", 141, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm23h", 142, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm24h", 143, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm25h", 144, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm26h", 145, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm27h", 146, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm28h", 147, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm29h", 148, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm30h", 149, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm31h", 150, 1, NULL, 256, "v2ui128");
-
-  tdesc_amd64_avx512 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512-linux.c ./gdb/features/i386/amd64-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,322 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: amd64-avx512-linux.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_amd64_avx512_linux;
-static void
-initialize_tdesc_amd64_avx512_linux (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
-
-  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
-  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
-  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
-  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 63);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 63);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 0);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "xmm16", 80, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm17", 81, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm18", 82, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm19", 83, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm20", 84, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm21", 85, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm22", 86, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm23", 87, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm24", 88, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm25", 89, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm26", 90, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm27", 91, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm28", 92, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm29", 93, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm30", 94, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm31", 95, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "ymm16h", 96, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm17h", 97, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm18h", 98, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm19h", 99, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm20h", 100, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm21h", 101, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm22h", 102, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm23h", 103, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm24h", 104, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm25h", 105, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm26h", 106, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm27h", 107, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm28h", 108, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm29h", 109, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm30h", 110, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm31h", 111, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "k0", 112, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 113, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 114, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 115, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 116, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 117, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 118, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 119, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 120, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 121, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 122, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 123, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 124, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 125, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 126, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 127, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm8h", 128, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm9h", 129, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm10h", 130, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm11h", 131, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm12h", 132, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm13h", 133, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm14h", 134, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm15h", 135, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm16h", 136, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm17h", 137, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm18h", 138, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm19h", 139, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm20h", 140, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm21h", 141, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm22h", 142, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm23h", 143, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm24h", 144, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm25h", 145, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm26h", 146, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm27h", 147, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm28h", 148, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm29h", 149, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm30h", 150, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm31h", 151, 1, NULL, 256, "v2ui128");
-
-  tdesc_amd64_avx512_linux = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512-linux.xml ./gdb/features/i386/amd64-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- AMD64 with AVX512 - Includes Linux-only special "register".  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386:x86-64</architecture>
-  <osabi>GNU/Linux</osabi>
-  <xi:include href="64bit-core.xml"/>
-  <xi:include href="64bit-sse.xml"/>
-  <xi:include href="64bit-linux.xml"/>
-  <xi:include href="64bit-avx.xml"/>
-  <xi:include href="64bit-mpx.xml"/>
-  <xi:include href="64bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512.xml ./gdb/features/i386/amd64-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx512.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx512.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- AMD64 with AVX512 -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386:x86-64</architecture>
-  <xi:include href="64bit-core.xml"/>
-  <xi:include href="64bit-sse.xml"/>
-  <xi:include href="64bit-avx.xml"/>
-  <xi:include href="64bit-mpx.xml"/>
-  <xi:include href="64bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512.c ./gdb/features/i386/amd64-avx-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-avx512.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,279 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-avx512.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_avx512;
+static void
+initialize_tdesc_amd64_avx_avx512 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 73, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 74, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 75, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 76, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 77, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 78, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 79, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 80, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 81, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 89, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 90, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 91, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 92, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 93, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 94, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 95, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 96, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 97, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 105, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 106, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 107, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 108, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 109, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 110, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 111, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 112, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 113, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 114, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 115, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 116, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 117, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 118, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 119, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 120, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 121, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 144, 1, NULL, 256, "v2ui128");
+
+  tdesc_amd64_avx_avx512 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512-linux.c ./gdb/features/i386/amd64-avx-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-avx512-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,288 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-avx512-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_avx512_linux;
+static void
+initialize_tdesc_amd64_avx_avx512_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 76, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 77, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 78, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 79, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 80, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 81, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 89, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 90, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 91, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 92, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 93, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 94, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 95, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 96, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 97, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 105, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 106, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 107, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 108, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 109, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 110, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 111, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 112, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 113, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 114, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 115, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 116, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 117, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 118, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 119, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 120, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 121, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 144, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 145, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 146, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 146, 1, NULL, 256, "v2ui128");
+
+  tdesc_amd64_avx_avx512_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512-linux.xml ./gdb/features/i386/amd64-avx-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-avx512-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX, AVX512 - Includes Linux-only special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512.xml ./gdb/features/i386/amd64-avx-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-avx512.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-avx512.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX, AVX512 -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx.c ./gdb/features/i386/amd64-avx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_amd64_avx (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -112,21 +112,21 @@ initialize_tdesc_amd64_avx (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-linux.c ./gdb/features/i386/amd64-avx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_amd64_avx_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -114,21 +114,21 @@ initialize_tdesc_amd64_avx_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -151,23 +151,27 @@ initialize_tdesc_amd64_avx_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
 
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
 
   tdesc_amd64_avx_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-linux.xml ./gdb/features/i386/amd64-avx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,5 +14,6 @@
   <xi:include href="64bit-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
   <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
   <xi:include href="64bit-avx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku.c ./gdb/features/i386/amd64-avx-mpx-avx512-pku.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-avx512-pku.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,320 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-mpx-avx512-pku.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_mpx_avx512_pku;
+static void
+initialize_tdesc_amd64_avx_mpx_avx512_pku (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 63);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 63);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 79, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 80, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 81, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 89, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 90, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 91, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 92, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 93, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 94, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 95, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 96, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 97, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 105, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 106, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 107, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 108, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 109, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 110, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 111, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 112, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 113, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 114, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 115, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 116, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 117, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 118, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 119, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 120, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 121, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 144, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 145, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 146, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 147, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 148, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 149, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 150, 1, NULL, 256, "v2ui128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
+  tdesc_create_reg (feature, "pkru", 151, 1, NULL, 32, "uint32");
+
+  tdesc_amd64_avx_mpx_avx512_pku = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.c ./gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,329 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-mpx-avx512-pku-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_mpx_avx512_pku_linux;
+static void
+initialize_tdesc_amd64_avx_mpx_avx512_pku_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 63);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 63);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 76, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 77, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 78, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 79, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 80, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 81, 1, NULL, 64, "status");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 89, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 90, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 91, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 92, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 93, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 94, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 95, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 96, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 97, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 105, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 106, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 107, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 108, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 109, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 110, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 111, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 112, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 113, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 114, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 115, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 116, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 117, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 118, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 119, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 120, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 121, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 144, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 145, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 146, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 147, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 148, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 149, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 150, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 151, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 152, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 153, 1, NULL, 256, "v2ui128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
+  tdesc_create_reg (feature, "pkru", 152, 1, NULL, 32, "uint32");
+
+  tdesc_amd64_avx_mpx_avx512_pku_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.xml ./gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-avx512-pku-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX, MPX, AVX512, PKEYS - Includes Linux-only
+     special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-mpx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+  <xi:include href="64bit-pkeys.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku.xml ./gdb/features/i386/amd64-avx-mpx-avx512-pku.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-avx512-pku.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-avx512-pku.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX, MPX, AVX512, PKEYS -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-mpx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+  <xi:include href="64bit-pkeys.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx.c ./gdb/features/i386/amd64-avx-mpx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,206 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-mpx.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_mpx;
+static void
+initialize_tdesc_amd64_avx_mpx (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 63);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 63);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
+
+  tdesc_amd64_avx_mpx = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-linux.c ./gdb/features/i386/amd64-avx-mpx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,215 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: amd64-avx-mpx-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_amd64_avx_mpx_linux;
+static void
+initialize_tdesc_amd64_avx_mpx_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 63);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 63);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 76, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 77, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 78, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 79, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 80, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 81, 1, NULL, 64, "status");
+
+  tdesc_amd64_avx_mpx_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-linux.xml ./gdb/features/i386/amd64-avx-mpx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX and MPX - Includes Linux-only special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-mpx.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx.xml ./gdb/features/i386/amd64-avx-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx-mpx.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/amd64-avx-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- AMD64 with AVX and MPX -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x86-64</architecture>
+  <xi:include href="64bit-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-mpx.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx.xml ./gdb/features/i386/amd64-avx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-avx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-avx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64.c ./gdb/features/i386/amd64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_amd64 (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -112,21 +112,21 @@ initialize_tdesc_amd64 (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-linux.c ./gdb/features/i386/amd64-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_amd64_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -114,21 +114,21 @@ initialize_tdesc_amd64_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -151,5 +151,9 @@ initialize_tdesc_amd64_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
 
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
   tdesc_amd64_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-linux.xml ./gdb/features/i386/amd64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,4 +14,5 @@
   <xi:include href="64bit-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
   <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx.c ./gdb/features/i386/amd64-mpx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-mpx.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_amd64_mpx (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -112,21 +112,21 @@ initialize_tdesc_amd64_mpx (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void)
   tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
-
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   type = tdesc_create_struct (feature, "br128");
   field_type = tdesc_named_type (feature, "uint64");
@@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void)
   field_type = tdesc_named_type (feature, "_bndcfgu");
   tdesc_add_field (type, "config", field_type);
 
-  tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
+  tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status");
 
   tdesc_amd64_mpx = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx-linux.c ./gdb/features/i386/amd64-mpx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-mpx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_amd64_mpx_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -114,21 +114,21 @@ initialize_tdesc_amd64_mpx_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -151,23 +151,9 @@ initialize_tdesc_amd64_mpx_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   type = tdesc_create_struct (feature, "br128");
@@ -200,12 +186,12 @@ initialize_tdesc_amd64_mpx_linux (void)
   field_type = tdesc_named_type (feature, "_bndcfgu");
   tdesc_add_field (type, "config", field_type);
 
-  tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
+  tdesc_create_reg (feature, "bnd0raw", 60, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 61, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 62, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 63, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 64, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 65, 1, NULL, 64, "status");
 
   tdesc_amd64_mpx_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx-linux.xml ./gdb/features/i386/amd64-mpx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-mpx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,6 +14,6 @@
   <xi:include href="64bit-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
   <xi:include href="64bit-linux.xml"/>
-  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-segments.xml"/>
   <xi:include href="64bit-mpx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx.xml ./gdb/features/i386/amd64-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64-mpx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -12,6 +12,5 @@
   <architecture>i386:x86-64</architecture>
   <xi:include href="64bit-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
-  <xi:include href="64bit-avx.xml"/>
   <xi:include href="64bit-mpx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64.xml ./gdb/features/i386/amd64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/amd64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/amd64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512.c ./gdb/features/i386/i386-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx512.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,203 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: i386-avx512.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_i386_avx512;
-static void
-initialize_tdesc_i386_avx512 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 31);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 31);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 1);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "k0", 55, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 56, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 57, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 58, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 59, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 60, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 61, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 62, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 63, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 64, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 65, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 66, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 67, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 68, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 69, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 70, 1, NULL, 256, "v2ui128");
-
-  tdesc_i386_avx512 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512-linux.c ./gdb/features/i386/i386-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,208 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: i386-avx512-linux.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_i386_avx512_linux;
-static void
-initialize_tdesc_i386_avx512_linux (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
-
-  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
-  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
-  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
-  tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 31);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 31);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 1);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "k0", 56, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 57, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 58, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 59, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 60, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 61, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 62, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 63, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 64, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 65, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 66, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 67, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 68, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 69, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 70, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 71, 1, NULL, 256, "v2ui128");
-
-  tdesc_i386_avx512_linux = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512-linux.xml ./gdb/features/i386/i386-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- I386 with AVX512 - Includes Linux-only special "register".  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386</architecture>
-  <osabi>GNU/Linux</osabi>
-  <xi:include href="32bit-core.xml"/>
-  <xi:include href="32bit-sse.xml"/>
-  <xi:include href="32bit-linux.xml"/>
-  <xi:include href="32bit-avx.xml"/>
-  <xi:include href="32bit-mpx.xml"/>
-  <xi:include href="32bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512.xml ./gdb/features/i386/i386-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx512.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx512.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- I386 with AVX512 -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386</architecture>
-  <xi:include href="32bit-core.xml"/>
-  <xi:include href="32bit-sse.xml"/>
-  <xi:include href="32bit-avx.xml"/>
-  <xi:include href="32bit-mpx.xml"/>
-  <xi:include href="32bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512.c ./gdb/features/i386/i386-avx-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-avx512.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,165 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-avx512.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_avx512;
+static void
+initialize_tdesc_i386_avx_avx512 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "k0", 49, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 50, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 51, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 52, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 53, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 54, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 55, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 56, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 57, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 58, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 59, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 60, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 61, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 62, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 63, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 64, 1, NULL, 256, "v2ui128");
+
+  tdesc_i386_avx_avx512 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512-linux.c ./gdb/features/i386/i386-avx-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-avx512-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,170 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-avx512-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_avx512_linux;
+static void
+initialize_tdesc_i386_avx_avx512_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "k0", 50, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 51, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 52, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 53, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 54, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 55, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 56, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 57, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 58, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 59, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 60, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 61, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 62, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 63, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 64, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 65, 1, NULL, 256, "v2ui128");
+
+  tdesc_i386_avx_avx512_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512-linux.xml ./gdb/features/i386/i386-avx-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-avx512-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX, AVX512 - Includes Linux-only special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-linux.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512.xml ./gdb/features/i386/i386-avx-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-avx512.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-avx512.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX, AVX512 -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx.c ./gdb/features/i386/i386-avx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_i386_avx (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -104,21 +104,21 @@ initialize_tdesc_i386_avx (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-linux.c ./gdb/features/i386/i386-avx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_i386_avx_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -106,21 +106,21 @@ initialize_tdesc_i386_avx_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-linux.xml ./gdb/features/i386/i386-avx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku.c ./gdb/features/i386/i386-avx-mpx-avx512-pku.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-avx512-pku.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,206 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-mpx-avx512-pku.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_mpx_avx512_pku;
+static void
+initialize_tdesc_i386_avx_mpx_avx512_pku (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 31);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 31);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "k0", 55, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 56, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 57, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 58, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 59, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 60, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 61, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 62, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 63, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 64, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 65, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 66, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 67, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 68, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 69, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 70, 1, NULL, 256, "v2ui128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
+  tdesc_create_reg (feature, "pkru", 71, 1, NULL, 32, "uint32");
+
+  tdesc_i386_avx_mpx_avx512_pku = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku-linux.c ./gdb/features/i386/i386-avx-mpx-avx512-pku-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-avx512-pku-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,211 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-mpx-avx512-pku-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_mpx_avx512_pku_linux;
+static void
+initialize_tdesc_i386_avx_mpx_avx512_pku_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 31);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 31);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "k0", 56, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 57, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 58, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 59, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 60, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 61, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 62, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 63, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 64, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 65, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 66, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 67, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 68, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 69, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 70, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 71, 1, NULL, 256, "v2ui128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
+  tdesc_create_reg (feature, "pkru", 72, 1, NULL, 32, "uint32");
+
+  tdesc_i386_avx_mpx_avx512_pku_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku-linux.xml ./gdb/features/i386/i386-avx-mpx-avx512-pku-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-avx512-pku-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX, MPX, AVX512, PKEYS - Includes Linux-only
+     special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-linux.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-mpx.xml"/>
+  <xi:include href="32bit-avx512.xml"/>
+  <xi:include href="32bit-pkeys.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku.xml ./gdb/features/i386/i386-avx-mpx-avx512-pku.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-avx512-pku.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-avx512-pku.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX, MPX, AVX512, PKEYS -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-mpx.xml"/>
+  <xi:include href="32bit-avx512.xml"/>
+  <xi:include href="32bit-pkeys.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx.c ./gdb/features/i386/i386-avx-mpx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,182 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-mpx.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_mpx;
+static void
+initialize_tdesc_i386_avx_mpx (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 31);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 31);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
+
+  tdesc_i386_avx_mpx = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-linux.c ./gdb/features/i386/i386-avx-mpx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,187 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: i386-avx-mpx-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_i386_avx_mpx_linux;
+static void
+initialize_tdesc_i386_avx_mpx_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+  type = tdesc_create_struct (feature, "br128");
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "lbound", field_type);
+  field_type = tdesc_named_type (feature, "uint64");
+  tdesc_add_field (type, "ubound_raw", field_type);
+
+  type = tdesc_create_struct (feature, "_bndstatus");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "bde", 2, 31);
+  tdesc_add_bitfield (type, "error", 0, 1);
+
+  type = tdesc_create_union (feature, "status");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndstatus");
+  tdesc_add_field (type, "status", field_type);
+
+  type = tdesc_create_struct (feature, "_bndcfgu");
+  tdesc_set_struct_size (type, 8);
+  tdesc_add_bitfield (type, "base", 12, 31);
+  tdesc_add_bitfield (type, "reserved", 2, 11);
+  tdesc_add_bitfield (type, "preserved", 1, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
+
+  type = tdesc_create_union (feature, "cfgu");
+  field_type = tdesc_named_type (feature, "data_ptr");
+  tdesc_add_field (type, "raw", field_type);
+  field_type = tdesc_named_type (feature, "_bndcfgu");
+  tdesc_add_field (type, "config", field_type);
+
+  tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
+
+  tdesc_i386_avx_mpx_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-linux.xml ./gdb/features/i386/i386-avx-mpx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX and MPX- Includes Linux-only special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-linux.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-mpx.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx.xml ./gdb/features/i386/i386-avx-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx-mpx.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/i386-avx-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- I386 with AVX and MPX -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386</architecture>
+  <xi:include href="32bit-core.xml"/>
+  <xi:include href="32bit-sse.xml"/>
+  <xi:include href="32bit-avx.xml"/>
+  <xi:include href="32bit-mpx.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx.xml ./gdb/features/i386/i386-avx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-avx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-avx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386.c ./gdb/features/i386/i386.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_i386 (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -104,21 +104,21 @@ initialize_tdesc_i386 (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-linux.c ./gdb/features/i386/i386-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_i386_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -109,21 +109,21 @@ initialize_tdesc_i386_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-linux.xml ./gdb/features/i386/i386-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx.c ./gdb/features/i386/i386-mmx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mmx.c	2017-03-06 01:49:07.000000000 +0000
@@ -12,28 +12,29 @@ initialize_tdesc_i386_mmx (void)
   struct target_desc *result = allocate_target_description ();
   struct tdesc_feature *feature;
   struct tdesc_type *field_type;
+  struct tdesc_type *type;
 
   set_tdesc_architecture (result, bfd_scan_arch ("i386"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx-linux.c ./gdb/features/i386/i386-mmx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mmx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -12,30 +12,31 @@ initialize_tdesc_i386_mmx_linux (void)
   struct target_desc *result = allocate_target_description ();
   struct tdesc_feature *feature;
   struct tdesc_type *field_type;
+  struct tdesc_type *type;
 
   set_tdesc_architecture (result, bfd_scan_arch ("i386"));
 
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx-linux.xml ./gdb/features/i386/i386-mmx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mmx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx.xml ./gdb/features/i386/i386-mmx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mmx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mmx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx.c ./gdb/features/i386/i386-mpx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mpx.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_i386_mpx (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -104,21 +104,21 @@ initialize_tdesc_i386_mpx (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
@@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void)
   tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
-
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   type = tdesc_create_struct (feature, "br128");
   field_type = tdesc_named_type (feature, "uint64");
@@ -163,7 +153,7 @@ initialize_tdesc_i386_mpx (void)
   tdesc_add_bitfield (type, "base", 12, 31);
   tdesc_add_bitfield (type, "reserved", 2, 11);
   tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
 
   type = tdesc_create_union (feature, "cfgu");
   field_type = tdesc_named_type (feature, "data_ptr");
@@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void)
   field_type = tdesc_named_type (feature, "_bndcfgu");
   tdesc_add_field (type, "config", field_type);
 
-  tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
+  tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status");
 
   tdesc_i386_mpx = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx-linux.c ./gdb/features/i386/i386-mpx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mpx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_i386_mpx_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
   tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
@@ -106,21 +106,21 @@ initialize_tdesc_i386_mpx_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
@@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
-
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   type = tdesc_create_struct (feature, "br128");
   field_type = tdesc_named_type (feature, "uint64");
@@ -168,7 +158,7 @@ initialize_tdesc_i386_mpx_linux (void)
   tdesc_add_bitfield (type, "base", 12, 31);
   tdesc_add_bitfield (type, "reserved", 2, 11);
   tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 1);
+  tdesc_add_bitfield (type, "enabled", 0, 0);
 
   type = tdesc_create_union (feature, "cfgu");
   field_type = tdesc_named_type (feature, "data_ptr");
@@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void)
   field_type = tdesc_named_type (feature, "_bndcfgu");
   tdesc_add_field (type, "config", field_type);
 
-  tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
+  tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128");
+  tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu");
+  tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status");
 
   tdesc_i386_mpx_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx-linux.xml ./gdb/features/i386/i386-mpx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mpx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,6 +14,5 @@
   <xi:include href="32bit-core.xml"/>
   <xi:include href="32bit-sse.xml"/>
   <xi:include href="32bit-linux.xml"/>
-  <xi:include href="32bit-avx.xml"/>
   <xi:include href="32bit-mpx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx.xml ./gdb/features/i386/i386-mpx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386-mpx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386-mpx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -12,6 +12,5 @@
   <architecture>i386</architecture>
   <xi:include href="32bit-core.xml"/>
   <xi:include href="32bit-sse.xml"/>
-  <xi:include href="32bit-avx.xml"/>
   <xi:include href="32bit-mpx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386.xml ./gdb/features/i386/i386.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/i386.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/i386.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512.c ./gdb/features/i386/x32-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx512.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,317 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: x32-avx512.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_x32_avx512;
-static void
-initialize_tdesc_x32_avx512 (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 63);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 63);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 0);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "xmm16", 79, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm17", 80, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm18", 81, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm19", 82, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm20", 83, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm21", 84, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm22", 85, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm23", 86, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm24", 87, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm25", 88, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm26", 89, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm27", 90, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm28", 91, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm29", 92, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm30", 93, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm31", 94, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "ymm16h", 95, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm17h", 96, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm18h", 97, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm19h", 98, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm20h", 99, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm21h", 100, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm22h", 101, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm23h", 102, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm24h", 103, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm25h", 104, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm26h", 105, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm27h", 106, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm28h", 107, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm29h", 108, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm30h", 109, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm31h", 110, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "k0", 111, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 112, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 113, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 114, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 115, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 116, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 117, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 118, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 119, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 120, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 121, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 122, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 123, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 124, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 125, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 126, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm8h", 127, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm9h", 128, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm10h", 129, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm11h", 130, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm12h", 131, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm13h", 132, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm14h", 133, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm15h", 134, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm16h", 135, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm17h", 136, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm18h", 137, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm19h", 138, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm20h", 139, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm21h", 140, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm22h", 141, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm23h", 142, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm24h", 143, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm25h", 144, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm26h", 145, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm27h", 146, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm28h", 147, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm29h", 148, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm30h", 149, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm31h", 150, 1, NULL, 256, "v2ui128");
-
-  tdesc_x32_avx512 = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512-linux.c ./gdb/features/i386/x32-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,322 +0,0 @@
-/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
-  Original: x32-avx512-linux.xml */
-
-#include "defs.h"
-#include "osabi.h"
-#include "target-descriptions.h"
-
-struct target_desc *tdesc_x32_avx512_linux;
-static void
-initialize_tdesc_x32_avx512_linux (void)
-{
-  struct target_desc *result = allocate_target_description ();
-  struct tdesc_feature *feature;
-  struct tdesc_type *field_type;
-  struct tdesc_type *type;
-
-  set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
-
-  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
-
-  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
-  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
-  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
-  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
-  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
-  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
-
-  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
-  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
-  type = tdesc_create_struct (feature, "br128");
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "lbound", field_type);
-  field_type = tdesc_named_type (feature, "uint64");
-  tdesc_add_field (type, "ubound_raw", field_type);
-
-  type = tdesc_create_struct (feature, "_bndstatus");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "bde", 2, 63);
-  tdesc_add_bitfield (type, "error", 0, 1);
-
-  type = tdesc_create_union (feature, "status");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndstatus");
-  tdesc_add_field (type, "status", field_type);
-
-  type = tdesc_create_struct (feature, "_bndcfgu");
-  tdesc_set_struct_size (type, 8);
-  tdesc_add_bitfield (type, "base", 12, 63);
-  tdesc_add_bitfield (type, "reserved", 2, 11);
-  tdesc_add_bitfield (type, "preserved", 1, 1);
-  tdesc_add_bitfield (type, "enabled", 0, 0);
-
-  type = tdesc_create_union (feature, "cfgu");
-  field_type = tdesc_named_type (feature, "data_ptr");
-  tdesc_add_field (type, "raw", field_type);
-  field_type = tdesc_named_type (feature, "_bndcfgu");
-  tdesc_add_field (type, "config", field_type);
-
-  tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
-  tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
-  tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
-
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
-  field_type = tdesc_named_type (feature, "ieee_single");
-  tdesc_create_vector (feature, "v4f", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "ieee_double");
-  tdesc_create_vector (feature, "v2d", field_type, 2);
-
-  field_type = tdesc_named_type (feature, "int8");
-  tdesc_create_vector (feature, "v16i8", field_type, 16);
-
-  field_type = tdesc_named_type (feature, "int16");
-  tdesc_create_vector (feature, "v8i16", field_type, 8);
-
-  field_type = tdesc_named_type (feature, "int32");
-  tdesc_create_vector (feature, "v4i32", field_type, 4);
-
-  field_type = tdesc_named_type (feature, "int64");
-  tdesc_create_vector (feature, "v2i64", field_type, 2);
-
-  type = tdesc_create_union (feature, "vec128");
-  field_type = tdesc_named_type (feature, "v4f");
-  tdesc_add_field (type, "v4_float", field_type);
-  field_type = tdesc_named_type (feature, "v2d");
-  tdesc_add_field (type, "v2_double", field_type);
-  field_type = tdesc_named_type (feature, "v16i8");
-  tdesc_add_field (type, "v16_int8", field_type);
-  field_type = tdesc_named_type (feature, "v8i16");
-  tdesc_add_field (type, "v8_int16", field_type);
-  field_type = tdesc_named_type (feature, "v4i32");
-  tdesc_add_field (type, "v4_int32", field_type);
-  field_type = tdesc_named_type (feature, "v2i64");
-  tdesc_add_field (type, "v2_int64", field_type);
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_add_field (type, "uint128", field_type);
-
-  field_type = tdesc_named_type (feature, "uint128");
-  tdesc_create_vector (feature, "v2ui128", field_type, 2);
-
-  tdesc_create_reg (feature, "xmm16", 80, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm17", 81, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm18", 82, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm19", 83, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm20", 84, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm21", 85, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm22", 86, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm23", 87, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm24", 88, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm25", 89, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm26", 90, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm27", 91, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm28", 92, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm29", 93, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm30", 94, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "xmm31", 95, 1, NULL, 128, "vec128");
-  tdesc_create_reg (feature, "ymm16h", 96, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm17h", 97, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm18h", 98, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm19h", 99, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm20h", 100, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm21h", 101, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm22h", 102, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm23h", 103, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm24h", 104, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm25h", 105, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm26h", 106, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm27h", 107, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm28h", 108, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm29h", 109, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm30h", 110, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm31h", 111, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "k0", 112, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k1", 113, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k2", 114, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k3", 115, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k4", 116, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k5", 117, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k6", 118, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "k7", 119, 1, NULL, 64, "uint64");
-  tdesc_create_reg (feature, "zmm0h", 120, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm1h", 121, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm2h", 122, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm3h", 123, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm4h", 124, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm5h", 125, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm6h", 126, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm7h", 127, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm8h", 128, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm9h", 129, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm10h", 130, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm11h", 131, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm12h", 132, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm13h", 133, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm14h", 134, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm15h", 135, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm16h", 136, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm17h", 137, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm18h", 138, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm19h", 139, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm20h", 140, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm21h", 141, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm22h", 142, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm23h", 143, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm24h", 144, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm25h", 145, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm26h", 146, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm27h", 147, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm28h", 148, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm29h", 149, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm30h", 150, 1, NULL, 256, "v2ui128");
-  tdesc_create_reg (feature, "zmm31h", 151, 1, NULL, 256, "v2ui128");
-
-  tdesc_x32_avx512_linux = result;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512-linux.xml ./gdb/features/i386/x32-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- X32 with AVX512 - Includes Linux-only special "register".  -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386:x64-32</architecture>
-  <osabi>GNU/Linux</osabi>
-  <xi:include href="x32-core.xml"/>
-  <xi:include href="64bit-sse.xml"/>
-  <xi:include href="64bit-linux.xml"/>
-  <xi:include href="64bit-avx.xml"/>
-  <xi:include href="64bit-mpx.xml"/>
-  <xi:include href="64bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512.xml ./gdb/features/i386/x32-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx512.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx512.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- X32 with AVX512 -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
-  <architecture>i386:x64-32</architecture>
-  <xi:include href="x32-core.xml"/>
-  <xi:include href="64bit-sse.xml"/>
-  <xi:include href="64bit-avx.xml"/>
-  <xi:include href="64bit-mpx.xml"/>
-  <xi:include href="64bit-avx512.xml"/>
-</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512.c ./gdb/features/i386/x32-avx-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/x32-avx-avx512.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,279 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: x32-avx-avx512.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32_avx_avx512;
+static void
+initialize_tdesc_x32_avx_avx512 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 73, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 74, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 75, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 76, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 77, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 78, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 79, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 80, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 81, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 89, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 90, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 91, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 92, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 93, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 94, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 95, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 96, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 97, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 105, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 106, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 107, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 108, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 109, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 110, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 111, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 112, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 113, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 114, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 115, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 116, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 117, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 118, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 119, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 120, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 121, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 144, 1, NULL, 256, "v2ui128");
+
+  tdesc_x32_avx_avx512 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512-linux.c ./gdb/features/i386/x32-avx-avx512-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/x32-avx-avx512-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,288 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: x32-avx-avx512-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32_avx_avx512_linux;
+static void
+initialize_tdesc_x32_avx_avx512_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+  struct tdesc_type *field_type;
+  struct tdesc_type *type;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
+
+  tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+  tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+  tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+  tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+  tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+  tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
+
+  tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+  tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
+  field_type = tdesc_named_type (feature, "ieee_single");
+  tdesc_create_vector (feature, "v4f", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "ieee_double");
+  tdesc_create_vector (feature, "v2d", field_type, 2);
+
+  field_type = tdesc_named_type (feature, "int8");
+  tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+  field_type = tdesc_named_type (feature, "int16");
+  tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+  field_type = tdesc_named_type (feature, "int32");
+  tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+  field_type = tdesc_named_type (feature, "int64");
+  tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+  type = tdesc_create_union (feature, "vec128");
+  field_type = tdesc_named_type (feature, "v4f");
+  tdesc_add_field (type, "v4_float", field_type);
+  field_type = tdesc_named_type (feature, "v2d");
+  tdesc_add_field (type, "v2_double", field_type);
+  field_type = tdesc_named_type (feature, "v16i8");
+  tdesc_add_field (type, "v16_int8", field_type);
+  field_type = tdesc_named_type (feature, "v8i16");
+  tdesc_add_field (type, "v8_int16", field_type);
+  field_type = tdesc_named_type (feature, "v4i32");
+  tdesc_add_field (type, "v4_int32", field_type);
+  field_type = tdesc_named_type (feature, "v2i64");
+  tdesc_add_field (type, "v2_int64", field_type);
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_add_field (type, "uint128", field_type);
+
+  field_type = tdesc_named_type (feature, "uint128");
+  tdesc_create_vector (feature, "v2ui128", field_type, 2);
+
+  tdesc_create_reg (feature, "xmm16", 76, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm17", 77, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm18", 78, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm19", 79, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm20", 80, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm21", 81, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm22", 82, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm23", 83, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm24", 84, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm25", 85, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm26", 86, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm27", 87, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm28", 88, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm29", 89, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm30", 90, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "xmm31", 91, 1, NULL, 128, "vec128");
+  tdesc_create_reg (feature, "ymm16h", 92, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm17h", 93, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm18h", 94, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm19h", 95, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm20h", 96, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm21h", 97, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm22h", 98, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm23h", 99, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm24h", 100, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm25h", 101, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm26h", 102, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm27h", 103, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm28h", 104, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm29h", 105, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm30h", 106, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm31h", 107, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "k0", 108, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k1", 109, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k2", 110, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k3", 111, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k4", 112, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k5", 113, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k6", 114, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "k7", 115, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "zmm0h", 116, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm1h", 117, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm2h", 118, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm3h", 119, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm4h", 120, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm5h", 121, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm6h", 122, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm7h", 123, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm8h", 124, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm9h", 125, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm10h", 126, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm11h", 127, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm12h", 128, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm13h", 129, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm14h", 130, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm15h", 131, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm16h", 132, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm17h", 133, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm18h", 134, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm19h", 135, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm20h", 136, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm21h", 137, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm22h", 138, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm23h", 139, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm24h", 140, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm25h", 141, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm26h", 142, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm27h", 143, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm28h", 144, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm29h", 145, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm30h", 146, 1, NULL, 256, "v2ui128");
+  tdesc_create_reg (feature, "zmm31h", 147, 1, NULL, 256, "v2ui128");
+
+  tdesc_x32_avx_avx512_linux = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512-linux.xml ./gdb/features/i386/x32-avx-avx512-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512-linux.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/x32-avx-avx512-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- X32 with AVX, AVX512 - Includes Linux-only special "register".  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x64-32</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="x32-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512.xml ./gdb/features/i386/x32-avx-avx512.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-avx512.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/i386/x32-avx-avx512.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- X32 with AVX, AVX512 -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>i386:x64-32</architecture>
+  <xi:include href="x32-core.xml"/>
+  <xi:include href="64bit-sse.xml"/>
+  <xi:include href="64bit-avx.xml"/>
+  <xi:include href="64bit-avx512.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx.c ./gdb/features/i386/x32-avx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_x32_avx (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -112,21 +112,21 @@ initialize_tdesc_x32_avx (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-linux.c ./gdb/features/i386/x32-avx-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_x32_avx_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -114,21 +114,21 @@ initialize_tdesc_x32_avx_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -151,23 +151,27 @@ initialize_tdesc_x32_avx_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
 
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
-  tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
-  tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm0h", 60, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm1h", 61, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm2h", 62, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm3h", 63, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm4h", 64, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm5h", 65, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm6h", 66, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm7h", 67, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm8h", 68, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm9h", 69, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm10h", 70, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm11h", 71, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm12h", 72, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm13h", 73, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm14h", 74, 1, NULL, 128, "uint128");
+  tdesc_create_reg (feature, "ymm15h", 75, 1, NULL, 128, "uint128");
 
   tdesc_x32_avx_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-linux.xml ./gdb/features/i386/x32-avx-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,5 +14,6 @@
   <xi:include href="x32-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
   <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
   <xi:include href="64bit-avx.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx.xml ./gdb/features/i386/x32-avx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-avx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-avx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32.c ./gdb/features/i386/x32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32.c	2017-03-06 01:49:07.000000000 +0000
@@ -17,24 +17,24 @@ initialize_tdesc_x32 (void)
   set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -112,21 +112,21 @@ initialize_tdesc_x32 (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-core.xml ./gdb/features/i386/x32-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-linux.c ./gdb/features/i386/x32-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -19,24 +19,24 @@ initialize_tdesc_x32_linux (void)
   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
 
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
-  field_type = tdesc_create_flags (feature, "i386_eflags", 4);
-  tdesc_add_flag (field_type, 0, "CF");
-  tdesc_add_flag (field_type, 1, "");
-  tdesc_add_flag (field_type, 2, "PF");
-  tdesc_add_flag (field_type, 4, "AF");
-  tdesc_add_flag (field_type, 6, "ZF");
-  tdesc_add_flag (field_type, 7, "SF");
-  tdesc_add_flag (field_type, 8, "TF");
-  tdesc_add_flag (field_type, 9, "IF");
-  tdesc_add_flag (field_type, 10, "DF");
-  tdesc_add_flag (field_type, 11, "OF");
-  tdesc_add_flag (field_type, 14, "NT");
-  tdesc_add_flag (field_type, 16, "RF");
-  tdesc_add_flag (field_type, 17, "VM");
-  tdesc_add_flag (field_type, 18, "AC");
-  tdesc_add_flag (field_type, 19, "VIF");
-  tdesc_add_flag (field_type, 20, "VIP");
-  tdesc_add_flag (field_type, 21, "ID");
+  type = tdesc_create_flags (feature, "i386_eflags", 4);
+  tdesc_add_flag (type, 0, "CF");
+  tdesc_add_flag (type, 1, "");
+  tdesc_add_flag (type, 2, "PF");
+  tdesc_add_flag (type, 4, "AF");
+  tdesc_add_flag (type, 6, "ZF");
+  tdesc_add_flag (type, 7, "SF");
+  tdesc_add_flag (type, 8, "TF");
+  tdesc_add_flag (type, 9, "IF");
+  tdesc_add_flag (type, 10, "DF");
+  tdesc_add_flag (type, 11, "OF");
+  tdesc_add_flag (type, 14, "NT");
+  tdesc_add_flag (type, 16, "RF");
+  tdesc_add_flag (type, 17, "VM");
+  tdesc_add_flag (type, 18, "AC");
+  tdesc_add_flag (type, 19, "VIF");
+  tdesc_add_flag (type, 20, "VIP");
+  tdesc_add_flag (type, 21, "ID");
 
   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
@@ -114,21 +114,21 @@ initialize_tdesc_x32_linux (void)
   field_type = tdesc_named_type (feature, "uint128");
   tdesc_add_field (type, "uint128", field_type);
 
-  field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
-  tdesc_add_flag (field_type, 0, "IE");
-  tdesc_add_flag (field_type, 1, "DE");
-  tdesc_add_flag (field_type, 2, "ZE");
-  tdesc_add_flag (field_type, 3, "OE");
-  tdesc_add_flag (field_type, 4, "UE");
-  tdesc_add_flag (field_type, 5, "PE");
-  tdesc_add_flag (field_type, 6, "DAZ");
-  tdesc_add_flag (field_type, 7, "IM");
-  tdesc_add_flag (field_type, 8, "DM");
-  tdesc_add_flag (field_type, 9, "ZM");
-  tdesc_add_flag (field_type, 10, "OM");
-  tdesc_add_flag (field_type, 11, "UM");
-  tdesc_add_flag (field_type, 12, "PM");
-  tdesc_add_flag (field_type, 15, "FZ");
+  type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+  tdesc_add_flag (type, 0, "IE");
+  tdesc_add_flag (type, 1, "DE");
+  tdesc_add_flag (type, 2, "ZE");
+  tdesc_add_flag (type, 3, "OE");
+  tdesc_add_flag (type, 4, "UE");
+  tdesc_add_flag (type, 5, "PE");
+  tdesc_add_flag (type, 6, "DAZ");
+  tdesc_add_flag (type, 7, "IM");
+  tdesc_add_flag (type, 8, "DM");
+  tdesc_add_flag (type, 9, "ZM");
+  tdesc_add_flag (type, 10, "OM");
+  tdesc_add_flag (type, 11, "UM");
+  tdesc_add_flag (type, 12, "PM");
+  tdesc_add_flag (type, 15, "FZ");
 
   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
@@ -151,5 +151,9 @@ initialize_tdesc_x32_linux (void)
   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
 
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
+  tdesc_create_reg (feature, "fs_base", 58, 1, NULL, 64, "int");
+  tdesc_create_reg (feature, "gs_base", 59, 1, NULL, 64, "int");
+
   tdesc_x32_linux = result;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-linux.xml ./gdb/features/i386/x32-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -14,4 +14,5 @@
   <xi:include href="x32-core.xml"/>
   <xi:include href="64bit-sse.xml"/>
   <xi:include href="64bit-linux.xml"/>
+  <xi:include href="64bit-segments.xml"/>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32.xml ./gdb/features/i386/x32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/i386/x32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/i386/x32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list-aix.dtd ./gdb/features/library-list-aix.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list-aix.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/library-list-aix.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list.dtd ./gdb/features/library-list.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/library-list.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list-svr4.dtd ./gdb/features/library-list-svr4.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/library-list-svr4.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/library-list-svr4.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2011-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/Makefile ./gdb/features/Makefile
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/Makefile	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/Makefile	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -44,19 +44,24 @@
 #   make GDB=/path/to/gdb XMLTOC="xml files" cfiles
 
 WHICH = aarch64 \
-	arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
+	arm/arm-with-iwmmxt arm/arm-with-vfpv2 arm/arm-with-vfpv3 \
+	arm/arm-with-neon \
 	i386/i386 i386/i386-linux \
 	i386/i386-mmx i386/i386-mmx-linux \
 	i386/amd64 i386/amd64-linux \
 	i386/i386-avx i386/i386-avx-linux \
 	i386/i386-mpx i386/i386-mpx-linux \
-	i386/i386-avx512 i386/i386-avx512-linux \
+	i386/i386-avx-mpx i386/i386-avx-mpx-linux \
+	i386/i386-avx-avx512 i386/i386-avx-avx512-linux \
+	i386/i386-avx-mpx-avx512-pku i386/i386-avx-mpx-avx512-pku-linux \
 	i386/amd64-avx i386/amd64-avx-linux \
 	i386/amd64-mpx i386/amd64-mpx-linux \
-	i386/amd64-avx512 i386/amd64-avx512-linux \
+	i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
+	i386/amd64-avx-avx512 i386/amd64-avx-avx512-linux \
+	i386/amd64-avx-mpx-avx512-pku i386/amd64-avx-mpx-avx512-pku-linux \
 	i386/x32 i386/x32-linux \
 	i386/x32-avx i386/x32-avx-linux \
-	i386/x32-avx512 i386/x32-avx512-linux \
+	i386/x32-avx-avx512 i386/x32-avx-avx512-linux \
 	mips-linux mips-dsp-linux \
 	microblaze-with-stack-protect \
 	mips64-linux mips64-dsp-linux \
@@ -65,6 +70,9 @@ WHICH = aarch64 \
 	rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
 	rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
 	rs6000/powerpc-vsx64l rs6000/powerpc-cell32l rs6000/powerpc-cell64l \
+	rs6000/powerpc-isa205-32l rs6000/powerpc-isa205-64l \
+	rs6000/powerpc-isa205-altivec32l rs6000/powerpc-isa205-altivec64l \
+	rs6000/powerpc-isa205-vsx32l rs6000/powerpc-isa205-vsx64l \
 	s390-linux32 s390-linux64 s390x-linux64 \
 	s390-linux32v1 s390-linux64v1 s390x-linux64v1 \
 	s390-linux32v2 s390-linux64v2 s390x-linux64v2 \
@@ -76,30 +84,9 @@ WHICH = aarch64 \
 # Record which registers should be sent to GDB by default after stop.
 aarch64-expedite = x29,sp,pc
 arm-expedite = r11,sp,pc
-i386/i386-expedite = ebp,esp,eip
-i386/i386-linux-expedite = ebp,esp,eip
-i386/amd64-expedite = rbp,rsp,rip
-i386/amd64-linux-expedite = rbp,rsp,rip
-i386/i386-avx-expedite = ebp,esp,eip
-i386/i386-avx-linux-expedite = ebp,esp,eip
-i386/i386-mpx-expedite = ebp,esp,eip
-i386/i386-mpx-linux-expedite = ebp,esp,eip
-i386/i386-avx512-expedite = ebp,esp,eip
-i386/i386-avx512-linux-expedite = ebp,esp,eip
-i386/i386-mmx-expedite = ebp,esp,eip
-i386/i386-mmx-linux-expedite = ebp,esp,eip
-i386/amd64-avx-expedite = rbp,rsp,rip
-i386/amd64-avx-linux-expedite = rbp,rsp,rip
-i386/amd64-mpx-expedite = rbp,rsp,rip
-i386/amd64-mpx-linux-expedite = rbp,rsp,rip
-i386/amd64-avx512-expedite = rbp,rsp,rip
-i386/amd64-avx512-linux-expedite = rbp,rsp,rip
-i386/x32-expedite = rbp,rsp,rip
-i386/x32-linux-expedite = rbp,rsp,rip
-i386/x32-avx-expedite = rbp,rsp,rip
-i386/x32-avx-linux-expedite = rbp,rsp,rip
-i386/x32-avx512-expedite = rbp,rsp,rip
-i386/x32-avx512-linux-expedite = rbp,rsp,rip
+i386-expedite = ebp,esp,eip
+amd64-expedite = rbp,rsp,rip
+x32-expedite = rbp,rsp,rip
 mips-expedite = r29,pc
 mips-dsp-expedite = r29,pc
 mips64-expedite = r29,pc
@@ -142,35 +129,45 @@ OUTPUTS = $(patsubst %,$(outdir)/%.dat,$
 # to make on the command line.
 XMLTOC = \
 	aarch64.xml \
-	arm-with-iwmmxt.xml \
-	arm-with-m-fpa-layout.xml \
-	arm-with-m-vfp-d16.xml \
-	arm-with-m.xml \
-	arm-with-neon.xml \
-	arm-with-vfpv2.xml \
-	arm-with-vfpv3.xml \
+	arc-v2.xml \
+	arc-arcompact.xml \
+	arm/arm-with-iwmmxt.xml \
+	arm/arm-with-m-fpa-layout.xml \
+	arm/arm-with-m-vfp-d16.xml \
+	arm/arm-with-m.xml \
+	arm/arm-with-neon.xml \
+	arm/arm-with-vfpv2.xml \
+	arm/arm-with-vfpv3.xml \
 	i386/amd64-avx-linux.xml \
 	i386/amd64-avx.xml \
-	i386/amd64-avx512-linux.xml \
-	i386/amd64-avx512.xml \
+	i386/amd64-avx-avx512-linux.xml \
+	i386/amd64-avx-avx512.xml \
+	i386/amd64-avx-mpx-avx512-pku-linux.xml \
+	i386/amd64-avx-mpx-avx512-pku.xml \
 	i386/amd64-linux.xml \
 	i386/amd64-mpx-linux.xml \
 	i386/amd64-mpx.xml \
+	i386/amd64-avx-mpx-linux.xml \
+	i386/amd64-avx-mpx.xml \
 	i386/amd64.xml \
 	i386/i386-avx-linux.xml \
 	i386/i386-avx.xml \
-	i386/i386-avx512-linux.xml \
-	i386/i386-avx512.xml \
+	i386/i386-avx-avx512-linux.xml \
+	i386/i386-avx-avx512.xml \
+	i386/i386-avx-mpx-avx512-pku-linux.xml \
+	i386/i386-avx-mpx-avx512-pku.xml \
 	i386/i386-linux.xml \
 	i386/i386-mmx-linux.xml \
 	i386/i386-mmx.xml \
 	i386/i386-mpx-linux.xml \
 	i386/i386-mpx.xml \
+	i386/i386-avx-mpx-linux.xml \
+	i386/i386-avx-mpx.xml \
 	i386/i386.xml \
 	i386/x32-avx-linux.xml \
 	i386/x32-avx.xml \
-	i386/x32-avx512-linux.xml \
-	i386/x32-avx512.xml \
+	i386/x32-avx-avx512-linux.xml \
+	i386/x32-avx-avx512.xml \
 	i386/x32-linux.xml \
 	i386/x32.xml \
 	microblaze-with-stack-protect.xml \
@@ -179,6 +176,7 @@ XMLTOC = \
 	mips-linux.xml \
 	mips64-dsp-linux.xml \
 	mips64-linux.xml \
+	nds32.xml \
 	nios2-linux.xml \
 	nios2.xml \
 	rs6000/powerpc-32.xml \
@@ -226,6 +224,10 @@ XMLTOC = \
 	s390x-linux64v1.xml \
 	s390x-linux64v2.xml \
 	s390x-te-linux64.xml \
+	s390-tevx-linux64.xml \
+	s390-vx-linux64.xml \
+	s390x-tevx-linux64.xml \
+	s390x-vx-linux64.xml \
 	tic6x-c62x-linux.xml \
 	tic6x-c62x.xml \
 	tic6x-c64x-linux.xml \
@@ -257,13 +259,13 @@ cfiles: $(CFILES)
 	sh ../../move-if-change $@.tmp $@
 
 # Other dependencies.
-$(outdir)/arm-with-iwmmxt.dat: arm-core.xml xscale-iwmmxt.xml
+$(outdir)/arm/arm-with-iwmmxt.dat: arm/arm-core.xml arm/xscale-iwmmxt.xml
 $(outdir)/i386/i386.dat: i386/32bit-core.xml i386/32bit-sse.xml
 $(outdir)/i386/i386-linux.dat: i386/32bit-core.xml i386/32bit-sse.xml \
 			       i386/32bit-linux.xml
 $(outdir)/i386/amd64.dat: i386/64bit-core.xml i386/64bit-sse.xml
 $(outdir)/i386/amd64-linux.dat: i386/64bit-core.xml i386/64bit-sse.xml \
-			        i386/64bit-linux.xml
+			       i386/64bit-linux.xml i386/64bit-segments.xml
 $(outdir)/i386/i386-avx.dat: i386/32bit-core.xml i386/32bit-avx.xml
 $(outdir)/i386/i386-avx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
 			       i386/32bit-linux.xml
@@ -271,34 +273,55 @@ cfiles: $(CFILES)
 			       i386/32bit-mpx.xml
 $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml 	i386/32bit-avx.xml \
 			       i386/32bit-linux.xml i386/32bit-mpx.xml
-$(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
-			       i386/32bit-mpx.xml i386/32bit-avx512.xml
-$(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
-			       i386/32bit-linux.xml i386/32bit-mpx.xml i386/32bit-avx512.xml
+$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
+			       i386/32bit-linux.xml i386/32bit-mpx.xml
+$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
+			       i386/32bit-linux.xml i386/32bit-mpx.xml
+$(outdir)/i386/i386-avx-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+			       i386/32bit-avx512.xml
+$(outdir)/i386/i386-avx-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+			       i386/32bit-linux.xml i386/32bit-avx512.xml
+$(outdir)/i386/i386-avx-mpx-avx512-pku.dat: i386/32bit-core.xml
+			       i386/32bit-avx.xml i386/32bit-mpx.xml i386/32bit-avx512.xml \
+			       i386/32bit-pkeys.xml
+$(outdir)/i386/i386-avx-mpx-avx512-pku-linux.dat: i386/32bit-core.xml \
+			       i386/32bit-avx.xml i386/32bit-mpx.xml i386/32bit-avx512.xml \
+			       i386/32bit-pkeys.xml i386/32bit-linux.xml
 $(outdir)/i386/i386-mmx.dat: i386/32bit-core.xml 
 $(outdir)/i386/i386-mmx-linux.dat: i386/32bit-core.xml i386/32bit-linux.xml
 $(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
 $(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
-				    i386/64bit-linux.xml
+			       i386/64bit-linux.xml i386/64bit-segments.xml
 $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
-			       i386/64bit-linux.xml i386/64bit-mpx.xml
+			       i386/64bit-linux.xml i386/64bit-segments.xml i386/64bit-mpx.xml
+$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
+			       i386/64bit-linux.xml i386/64bit-segments.xml i386/64bit-mpx.xml
 $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
 			       i386/64bit-mpx.xml
-$(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
-			       i386/64bit-mpx.xml i386/64bit-avx512.xml
-$(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
-			       i386/64bit-mpx.xml i386/64bit-avx512.xml \
-			       i386/64bit-linux.xml
+$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
+			       i386/64bit-mpx.xml
+$(outdir)/i386/amd64-avx-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+			       i386/64bit-avx512.xml
+$(outdir)/i386/amd64-avx-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+			       i386/64bit-avx512.xml i386/64bit-linux.xml
+$(outdir)/i386/amd64-avx-mpx-avx512-pku.dat: i386/64bit-core.xml \
+			       i386/64bit-avx.xml i386/64bit-mpx.xml i386/64bit-avx512.xml \
+			       i386/64bit-pkeys.xml
+$(outdir)/i386/amd64-avx-mpx-avx512-pku-linux.dat: i386/64bit-core.xml \
+			       i386/64bit-avx.xml i386/64bit-mpx.xml i386/64bit-avx512.xml \
+			       i386/64bit-linux.xml i386/64bit-segments.xml \
+			       i386/64bit-pkeys.xml
 $(outdir)/i386/x32.dat: i386/x32-core.xml i386/64bit-sse.xml
 $(outdir)/i386/x32-linux.dat: i386/x32-core.xml i386/64bit-sse.xml \
-			      i386/64bit-linux.xml
+			       i386/64bit-linux.xml i386/64bit-segments.xml
 $(outdir)/i386/x32-avx.dat: i386/x32-core.xml i386/64bit-avx.xml
 $(outdir)/i386/x32-avx-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
-				  i386/64bit-linux.xml
-$(outdir)/i386/x32-avx512.dat: i386/x32-core.xml i386/64bit-avx.xml \
-			       i386/64bit-mpx.xml i386/64bit-avx512.xml
-$(outdir)/i386/x32-avx512-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
-			       i386/64bit-mpx.xml i386/64bit-avx512.xml i386/64bit-linux.xml
+			       i386/64bit-linux.xml i386/64bit-segments.xml
+$(outdir)/i386/x32-avx-avx512.dat: i386/x32-core.xml i386/64bit-avx.xml \
+			       i386/64bit-avx512.xml
+$(outdir)/i386/x32-avx-avx512-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
+			       i386/64bit-avx512.xml i386/64bit-linux.xml \
+			       i386/64bit-segments.xml
 
 # 'all' doesn't build the C files, so don't delete them in 'clean'
 # either.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-core.xml ./gdb/features/microblaze-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/microblaze-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-stack-protect.xml ./gdb/features/microblaze-stack-protect.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-stack-protect.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/microblaze-stack-protect.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-with-stack-protect.xml ./gdb/features/microblaze-with-stack-protect.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze-with-stack-protect.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/microblaze-with-stack-protect.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze.xml ./gdb/features/microblaze.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/microblaze.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/microblaze.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-cp0.xml ./gdb/features/mips64-cp0.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-cp0.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-cp0.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-cpu.xml ./gdb/features/mips64-cpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-cpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-cpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-dsp-linux.xml ./gdb/features/mips64-dsp-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-dsp-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-dsp-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-dsp.xml ./gdb/features/mips64-dsp.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-dsp.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-dsp.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-fpu.xml ./gdb/features/mips64-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-fpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-linux.xml ./gdb/features/mips64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-cp0.xml ./gdb/features/mips-cp0.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-cp0.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-cp0.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-cpu.xml ./gdb/features/mips-cpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-cpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-cpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-dsp-linux.xml ./gdb/features/mips-dsp-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-dsp-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-dsp-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-dsp.xml ./gdb/features/mips-dsp.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-dsp.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-dsp.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-fpu.xml ./gdb/features/mips-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-fpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-linux.xml ./gdb/features/mips-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/mips-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/mips-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32.c ./gdb/features/nds32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/nds32.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,92 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: nds32.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_nds32;
+static void
+initialize_tdesc_nds32 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("n1h"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.core");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "gp", 29, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "lp", 30, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "sp", 31, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.fpu");
+  tdesc_create_reg (feature, "fd0", 33, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd1", 34, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd2", 35, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd3", 36, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd4", 37, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd5", 38, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd6", 39, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd7", 40, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd8", 41, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd9", 42, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd10", 43, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd11", 44, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd12", 45, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd13", 46, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd14", 47, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd15", 48, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd16", 49, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd17", 50, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd18", 51, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd19", 52, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd20", 53, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd21", 54, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd22", 55, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd23", 56, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd24", 57, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd25", 58, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd26", 59, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd27", 60, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd28", 61, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd29", 62, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd30", 63, 1, "float", 64, "ieee_double");
+  tdesc_create_reg (feature, "fd31", 64, 1, "float", 64, "ieee_double");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.system");
+  tdesc_create_reg (feature, "ir0", 65, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "itb", 66, 1, NULL, 32, "int");
+  tdesc_create_reg (feature, "ifc_lp", 67, 1, NULL, 32, "int");
+
+  tdesc_nds32 = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-core.xml ./gdb/features/nds32-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-core.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/nds32-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.nds32.core">
+  <reg name="r0" bitsize="32" regnum="0"/>
+  <reg name="r1" bitsize="32"/>
+  <reg name="r2" bitsize="32"/>
+  <reg name="r3" bitsize="32"/>
+  <reg name="r4" bitsize="32"/>
+  <reg name="r5" bitsize="32"/>
+  <reg name="r6" bitsize="32"/>
+  <reg name="r7" bitsize="32"/>
+  <reg name="r8" bitsize="32"/>
+  <reg name="r9" bitsize="32"/>
+  <reg name="r10" bitsize="32"/>
+  <reg name="r11" bitsize="32"/>
+  <reg name="r12" bitsize="32"/>
+  <reg name="r13" bitsize="32"/>
+  <reg name="r14" bitsize="32"/>
+  <reg name="r15" bitsize="32"/>
+  <reg name="r16" bitsize="32"/>
+  <reg name="r17" bitsize="32"/>
+  <reg name="r18" bitsize="32"/>
+  <reg name="r19" bitsize="32"/>
+  <reg name="r20" bitsize="32"/>
+  <reg name="r21" bitsize="32"/>
+  <reg name="r22" bitsize="32"/>
+  <reg name="r23" bitsize="32"/>
+  <reg name="r24" bitsize="32"/>
+  <reg name="r25" bitsize="32"/>
+  <reg name="r26" bitsize="32"/>
+  <reg name="r27" bitsize="32"/>
+  <reg name="fp" bitsize="32" type="data_ptr"/>
+  <reg name="gp" bitsize="32" type="data_ptr"/>
+  <reg name="lp" bitsize="32" type="code_ptr"/>
+  <reg name="sp" bitsize="32" type="data_ptr"/>
+
+  <reg name="pc" bitsize="32" type="code_ptr"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-fpu.xml ./gdb/features/nds32-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-fpu.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/nds32-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.nds32.fpu">
+  <reg name="fd0" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd1" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd2" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd3" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd4" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd5" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd6" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd7" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd8" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd9" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd10" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd11" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd12" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd13" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd14" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd15" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd16" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd17" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd18" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd19" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd20" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd21" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd22" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd23" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd24" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd25" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd26" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd27" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd28" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd29" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd30" bitsize="64" type="ieee_double" group="float"/>
+  <reg name="fd31" bitsize="64" type="ieee_double" group="float"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-system.xml ./gdb/features/nds32-system.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32-system.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/nds32-system.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.nds32.system">
+  <reg name="ir0" bitsize="32"/>
+
+  <reg name="itb" bitsize="32"/>
+  <reg name="ifc_lp" bitsize="32"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32.xml ./gdb/features/nds32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nds32.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/nds32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>nds32</architecture>
+  <xi:include href="nds32-core.xml"/>
+  <xi:include href="nds32-fpu.xml"/>
+  <xi:include href="nds32-system.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2-cpu.xml ./gdb/features/nios2-cpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2-cpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/nios2-cpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2-linux.xml ./gdb/features/nios2-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/nios2-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2.xml ./gdb/features/nios2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/nios2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/nios2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/osdata.dtd ./gdb/features/osdata.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/osdata.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/osdata.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power64-core.xml ./gdb/features/rs6000/power64-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power64-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power64-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power64-linux.xml ./gdb/features/rs6000/power64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-altivec.xml ./gdb/features/rs6000/power-altivec.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-altivec.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-altivec.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-core.xml ./gdb/features/rs6000/power-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-fpu-isa205.xml ./gdb/features/rs6000/power-fpu-isa205.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-fpu-isa205.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-fpu-isa205.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-fpu.xml ./gdb/features/rs6000/power-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-fpu.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-linux.xml ./gdb/features/rs6000/power-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-oea.xml ./gdb/features/rs6000/power-oea.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-oea.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-oea.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-32l.xml ./gdb/features/rs6000/powerpc-32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-32.xml ./gdb/features/rs6000/powerpc-32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-403gc.xml ./gdb/features/rs6000/powerpc-403gc.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-403gc.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-403gc.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-403.xml ./gdb/features/rs6000/powerpc-403.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-403.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-403.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-405.xml ./gdb/features/rs6000/powerpc-405.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-405.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-405.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-505.xml ./gdb/features/rs6000/powerpc-505.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-505.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-505.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-601.xml ./gdb/features/rs6000/powerpc-601.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-601.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-601.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-602.xml ./gdb/features/rs6000/powerpc-602.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-602.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-602.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-603.xml ./gdb/features/rs6000/powerpc-603.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-603.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-603.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-604.xml ./gdb/features/rs6000/powerpc-604.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-604.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-604.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-64l.xml ./gdb/features/rs6000/powerpc-64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-64.xml ./gdb/features/rs6000/powerpc-64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-7400.xml ./gdb/features/rs6000/powerpc-7400.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-7400.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-7400.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-750.xml ./gdb/features/rs6000/powerpc-750.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-750.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-750.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-860.xml ./gdb/features/rs6000/powerpc-860.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-860.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-860.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec32l.xml ./gdb/features/rs6000/powerpc-altivec32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-altivec32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec32.xml ./gdb/features/rs6000/powerpc-altivec32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-altivec32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec64l.xml ./gdb/features/rs6000/powerpc-altivec64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-altivec64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec64.xml ./gdb/features/rs6000/powerpc-altivec64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-altivec64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-altivec64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-cell32l.xml ./gdb/features/rs6000/powerpc-cell32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-cell32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-cell32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-cell64l.xml ./gdb/features/rs6000/powerpc-cell64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-cell64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-cell64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-e500l.xml ./gdb/features/rs6000/powerpc-e500l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-e500l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-e500l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-e500.xml ./gdb/features/rs6000/powerpc-e500.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-e500.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-e500.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-32l.xml ./gdb/features/rs6000/powerpc-isa205-32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-64l.xml ./gdb/features/rs6000/powerpc-isa205-64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-altivec32l.xml ./gdb/features/rs6000/powerpc-isa205-altivec32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-altivec32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-altivec32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-altivec64l.xml ./gdb/features/rs6000/powerpc-isa205-altivec64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-altivec64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-altivec64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-vsx32l.xml ./gdb/features/rs6000/powerpc-isa205-vsx32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-vsx32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-vsx32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-vsx64l.xml ./gdb/features/rs6000/powerpc-isa205-vsx64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-isa205-vsx64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-isa205-vsx64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx32l.xml ./gdb/features/rs6000/powerpc-vsx32l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx32l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-vsx32l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx32.xml ./gdb/features/rs6000/powerpc-vsx32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-vsx32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx64l.xml ./gdb/features/rs6000/powerpc-vsx64l.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx64l.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-vsx64l.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx64.xml ./gdb/features/rs6000/powerpc-vsx64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/powerpc-vsx64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/powerpc-vsx64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-spe.xml ./gdb/features/rs6000/power-spe.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-spe.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-spe.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-vsx.xml ./gdb/features/rs6000/power-vsx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/power-vsx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/power-vsx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/rs6000.xml ./gdb/features/rs6000/rs6000.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/rs6000/rs6000.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/rs6000/rs6000.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-acr.xml ./gdb/features/s390-acr.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-acr.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-acr.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-core32.xml ./gdb/features/s390-core32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-core32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-core32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-core64.xml ./gdb/features/s390-core64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-core64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-core64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-fpr.xml ./gdb/features/s390-fpr.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-fpr.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-fpr.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32v1.xml ./gdb/features/s390-linux32v1.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32v1.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux32v1.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32v2.xml ./gdb/features/s390-linux32v2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32v2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux32v2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32.xml ./gdb/features/s390-linux32.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux32.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux32.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64v1.xml ./gdb/features/s390-linux64v1.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64v1.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux64v1.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64v2.xml ./gdb/features/s390-linux64v2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64v2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux64v2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64.xml ./gdb/features/s390-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-tdb.xml ./gdb/features/s390-tdb.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-tdb.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-tdb.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-te-linux64.xml ./gdb/features/s390-te-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-te-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-te-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-tevx-linux64.xml ./gdb/features/s390-tevx-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-tevx-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-tevx-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-vx-linux64.xml ./gdb/features/s390-vx-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-vx-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-vx-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-vx.xml ./gdb/features/s390-vx.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390-vx.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390-vx.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-core64.xml ./gdb/features/s390x-core64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-core64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-core64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64v1.xml ./gdb/features/s390x-linux64v1.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64v1.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-linux64v1.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64v2.xml ./gdb/features/s390x-linux64v2.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64v2.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-linux64v2.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64.xml ./gdb/features/s390x-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-te-linux64.xml ./gdb/features/s390x-te-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-te-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-te-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-tevx-linux64.xml ./gdb/features/s390x-tevx-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-tevx-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-tevx-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-vx-linux64.xml ./gdb/features/s390x-vx-linux64.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/s390x-vx-linux64.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/s390x-vx-linux64.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-cp0.xml ./gdb/features/sparc/sparc32-cp0.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-cp0.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc32-cp0.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.cp0">
+  <reg name="y" bitsize="32" type="uint32" regnum="64"/>
+  <reg name="psr" bitsize="32" type="uint32" regnum="65"/>
+  <reg name="wim" bitsize="32" type="uint32" regnum="66"/>
+  <reg name="tbr" bitsize="32" type="uint32" regnum="67"/>
+  <reg name="pc" bitsize="32" type="code_ptr" regnum="68"/>
+  <reg name="npc" bitsize="32" type="code_ptr" regnum="69"/>
+  <reg name="fsr" bitsize="32" type="uint32" regnum="70"/>
+  <reg name="csr" bitsize="32" type="uint32" regnum="71"/>
+</feature>
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-cpu.xml ./gdb/features/sparc/sparc32-cpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-cpu.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc32-cpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.cpu">
+  <reg name="g0" bitsize="32" type="uint32" regnum="0"/>
+  <reg name="g1" bitsize="32" type="uint32" regnum="1"/>
+  <reg name="g2" bitsize="32" type="uint32" regnum="2"/>
+  <reg name="g3" bitsize="32" type="uint32" regnum="3"/>
+  <reg name="g4" bitsize="32" type="uint32" regnum="4"/>
+  <reg name="g5" bitsize="32" type="uint32" regnum="5"/>
+  <reg name="g6" bitsize="32" type="uint32" regnum="6"/>
+  <reg name="g7" bitsize="32" type="uint32" regnum="7"/>
+  <reg name="o0" bitsize="32" type="uint32" regnum="8"/>
+  <reg name="o1" bitsize="32" type="uint32" regnum="9"/>
+  <reg name="o2" bitsize="32" type="uint32" regnum="10"/>
+  <reg name="o3" bitsize="32" type="uint32" regnum="11"/>
+  <reg name="o4" bitsize="32" type="uint32" regnum="12"/>
+  <reg name="o5" bitsize="32" type="uint32" regnum="13"/>
+  <reg name="sp" bitsize="32" type="uint32" regnum="14"/>
+  <reg name="o7" bitsize="32" type="uint32" regnum="15"/>
+  <reg name="l0" bitsize="32" type="uint32" regnum="16"/>
+  <reg name="l1" bitsize="32" type="uint32" regnum="17"/>
+  <reg name="l2" bitsize="32" type="uint32" regnum="18"/>
+  <reg name="l3" bitsize="32" type="uint32" regnum="19"/>
+  <reg name="l4" bitsize="32" type="uint32" regnum="20"/>
+  <reg name="l5" bitsize="32" type="uint32" regnum="21"/>
+  <reg name="l6" bitsize="32" type="uint32" regnum="22"/>
+  <reg name="l7" bitsize="32" type="uint32" regnum="23"/>
+  <reg name="i0" bitsize="32" type="uint32" regnum="24"/>
+  <reg name="i1" bitsize="32" type="uint32" regnum="25"/>
+  <reg name="i2" bitsize="32" type="uint32" regnum="26"/>
+  <reg name="i3" bitsize="32" type="uint32" regnum="27"/>
+  <reg name="i4" bitsize="32" type="uint32" regnum="28"/>
+  <reg name="i5" bitsize="32" type="uint32" regnum="29"/>
+  <reg name="fp" bitsize="32" type="uint32" regnum="30"/>
+  <reg name="i7" bitsize="32" type="uint32" regnum="31"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-fpu.xml ./gdb/features/sparc/sparc32-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-fpu.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc32-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.fpu">
+  <reg name="f0" bitsize="32" type="ieee_single" regnum="32"/>
+  <reg name="f1" bitsize="32" type="ieee_single" regnum="33"/>
+  <reg name="f2" bitsize="32" type="ieee_single" regnum="34"/>
+  <reg name="f3" bitsize="32" type="ieee_single" regnum="35"/>
+  <reg name="f4" bitsize="32" type="ieee_single" regnum="36"/>
+  <reg name="f5" bitsize="32" type="ieee_single" regnum="37"/>
+  <reg name="f6" bitsize="32" type="ieee_single" regnum="38"/>
+  <reg name="f7" bitsize="32" type="ieee_single" regnum="39"/>
+  <reg name="f8" bitsize="32" type="ieee_single" regnum="40"/>
+  <reg name="f9" bitsize="32" type="ieee_single" regnum="41"/>
+  <reg name="f10" bitsize="32" type="ieee_single" regnum="42"/>
+  <reg name="f11" bitsize="32" type="ieee_single" regnum="43"/>
+  <reg name="f12" bitsize="32" type="ieee_single" regnum="44"/>
+  <reg name="f13" bitsize="32" type="ieee_single" regnum="45"/>
+  <reg name="f14" bitsize="32" type="ieee_single" regnum="46"/>
+  <reg name="f15" bitsize="32" type="ieee_single" regnum="47"/>
+  <reg name="f16" bitsize="32" type="ieee_single" regnum="48"/>
+  <reg name="f17" bitsize="32" type="ieee_single" regnum="49"/>
+  <reg name="f18" bitsize="32" type="ieee_single" regnum="50"/>
+  <reg name="f19" bitsize="32" type="ieee_single" regnum="51"/>
+  <reg name="f20" bitsize="32" type="ieee_single" regnum="52"/>
+  <reg name="f21" bitsize="32" type="ieee_single" regnum="53"/>
+  <reg name="f22" bitsize="32" type="ieee_single" regnum="54"/>
+  <reg name="f23" bitsize="32" type="ieee_single" regnum="55"/>
+  <reg name="f24" bitsize="32" type="ieee_single" regnum="56"/>
+  <reg name="f25" bitsize="32" type="ieee_single" regnum="57"/>
+  <reg name="f26" bitsize="32" type="ieee_single" regnum="58"/>
+  <reg name="f27" bitsize="32" type="ieee_single" regnum="59"/>
+  <reg name="f28" bitsize="32" type="ieee_single" regnum="60"/>
+  <reg name="f29" bitsize="32" type="ieee_single" regnum="61"/>
+  <reg name="f30" bitsize="32" type="ieee_single" regnum="62"/>
+  <reg name="f31" bitsize="32" type="ieee_single" regnum="63"/>
+</feature>
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-solaris.c ./gdb/features/sparc/sparc32-solaris.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-solaris.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc32-solaris.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,98 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: sparc32-solaris.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_sparc32_solaris;
+static void
+initialize_tdesc_sparc32_solaris (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("sparc"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("Solaris"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.cpu");
+  tdesc_create_reg (feature, "g0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "g7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o0", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o1", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o2", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o3", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o4", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o5", 13, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sp", 14, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "o7", 15, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l0", 16, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l1", 17, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l2", 18, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l3", 19, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l4", 20, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l5", 21, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l6", 22, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "l7", 23, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i0", 24, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i1", 25, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i2", 26, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i3", 27, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i4", 28, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i5", 29, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "fp", 30, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "i7", 31, 1, NULL, 32, "uint32");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.cp0");
+  tdesc_create_reg (feature, "y", 64, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "psr", 65, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "wim", 66, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "tbr", 67, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "pc", 68, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "npc", 69, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "fsr", 70, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "csr", 71, 1, NULL, 32, "uint32");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.fpu");
+  tdesc_create_reg (feature, "f0", 32, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f1", 33, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f2", 34, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f3", 35, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f4", 36, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f5", 37, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f6", 38, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f7", 39, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f8", 40, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f9", 41, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f10", 42, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f11", 43, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f12", 44, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f13", 45, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f14", 46, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f15", 47, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f16", 48, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f17", 49, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f18", 50, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f19", 51, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f20", 52, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f21", 53, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f22", 54, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f23", 55, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f24", 56, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f25", 57, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f26", 58, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f27", 59, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f28", 60, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f29", 61, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f30", 62, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f31", 63, 1, NULL, 32, "ieee_single");
+
+  tdesc_sparc_solaris = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-solaris.xml ./gdb/features/sparc/sparc32-solaris.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc32-solaris.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc32-solaris.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>sparc</architecture>
+  <osabi>Solaris</osabi>
+  <xi:include href="sparc32-cpu.xml"/>
+  <xi:include href="sparc32-cp0.xml"/>
+  <xi:include href="sparc32-fpu.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-cp0.xml ./gdb/features/sparc/sparc64-cp0.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-cp0.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc64-cp0.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.cp0">
+  <reg name="pc" bitsize="64" type="code_ptr" regnum="80"/>
+  <reg name="npc" bitsize="64" type="code_ptr" regnum="81"/>
+  <reg name="state" bitsize="64" type="uint64" regnum="82"/>
+  <reg name="fsr" bitsize="64" type="uint64" regnum="83"/>
+  <reg name="fprs" bitsize="64" type="uint64" regnum="84"/>
+  <reg name="y" bitsize="64" type="uint64" regnum="85"/>
+</feature>
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-cpu.xml ./gdb/features/sparc/sparc64-cpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-cpu.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc64-cpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.cpu">
+  <reg name="g0" bitsize="64" type="uint64" regnum="0"/>
+  <reg name="g1" bitsize="64" type="uint64" regnum="1"/>
+  <reg name="g2" bitsize="64" type="uint64" regnum="2"/>
+  <reg name="g3" bitsize="64" type="uint64" regnum="3"/>
+  <reg name="g4" bitsize="64" type="uint64" regnum="4"/>
+  <reg name="g5" bitsize="64" type="uint64" regnum="5"/>
+  <reg name="g6" bitsize="64" type="uint64" regnum="6"/>
+  <reg name="g7" bitsize="64" type="uint64" regnum="7"/>
+  <reg name="o0" bitsize="64" type="uint64" regnum="8"/>
+  <reg name="o1" bitsize="64" type="uint64" regnum="9"/>
+  <reg name="o2" bitsize="64" type="uint64" regnum="10"/>
+  <reg name="o3" bitsize="64" type="uint64" regnum="11"/>
+  <reg name="o4" bitsize="64" type="uint64" regnum="12"/>
+  <reg name="o5" bitsize="64" type="uint64" regnum="13"/>
+  <reg name="sp" bitsize="64" type="uint64" regnum="14"/>
+  <reg name="o7" bitsize="64" type="uint64" regnum="15"/>
+  <reg name="l0" bitsize="64" type="uint64" regnum="16"/>
+  <reg name="l1" bitsize="64" type="uint64" regnum="17"/>
+  <reg name="l2" bitsize="64" type="uint64" regnum="18"/>
+  <reg name="l3" bitsize="64" type="uint64" regnum="19"/>
+  <reg name="l4" bitsize="64" type="uint64" regnum="20"/>
+  <reg name="l5" bitsize="64" type="uint64" regnum="21"/>
+  <reg name="l6" bitsize="64" type="uint64" regnum="22"/>
+  <reg name="l7" bitsize="64" type="uint64" regnum="23"/>
+  <reg name="i0" bitsize="64" type="uint64" regnum="24"/>
+  <reg name="i1" bitsize="64" type="uint64" regnum="25"/>
+  <reg name="i2" bitsize="64" type="uint64" regnum="26"/>
+  <reg name="i3" bitsize="64" type="uint64" regnum="27"/>
+  <reg name="i4" bitsize="64" type="uint64" regnum="28"/>
+  <reg name="i5" bitsize="64" type="uint64" regnum="29"/>
+  <reg name="fp" bitsize="64" type="uint64" regnum="30"/>
+  <reg name="i7" bitsize="64" type="uint64" regnum="31"/>
+</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-fpu.xml ./gdb/features/sparc/sparc64-fpu.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-fpu.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc64-fpu.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.sparc.fpu">
+  <reg name="f0" bitsize="32" type="ieee_single" regnum="32"/>
+  <reg name="f1" bitsize="32" type="ieee_single" regnum="33"/>
+  <reg name="f2" bitsize="32" type="ieee_single" regnum="34"/>
+  <reg name="f3" bitsize="32" type="ieee_single" regnum="35"/>
+  <reg name="f4" bitsize="32" type="ieee_single" regnum="36"/>
+  <reg name="f5" bitsize="32" type="ieee_single" regnum="37"/>
+  <reg name="f6" bitsize="32" type="ieee_single" regnum="38"/>
+  <reg name="f7" bitsize="32" type="ieee_single" regnum="39"/>
+  <reg name="f8" bitsize="32" type="ieee_single" regnum="40"/>
+  <reg name="f9" bitsize="32" type="ieee_single" regnum="41"/>
+  <reg name="f10" bitsize="32" type="ieee_single" regnum="42"/>
+  <reg name="f11" bitsize="32" type="ieee_single" regnum="43"/>
+  <reg name="f12" bitsize="32" type="ieee_single" regnum="44"/>
+  <reg name="f13" bitsize="32" type="ieee_single" regnum="45"/>
+  <reg name="f14" bitsize="32" type="ieee_single" regnum="46"/>
+  <reg name="f15" bitsize="32" type="ieee_single" regnum="47"/>
+  <reg name="f16" bitsize="32" type="ieee_single" regnum="48"/>
+  <reg name="f17" bitsize="32" type="ieee_single" regnum="49"/>
+  <reg name="f18" bitsize="32" type="ieee_single" regnum="50"/>
+  <reg name="f19" bitsize="32" type="ieee_single" regnum="51"/>
+  <reg name="f20" bitsize="32" type="ieee_single" regnum="52"/>
+  <reg name="f21" bitsize="32" type="ieee_single" regnum="53"/>
+  <reg name="f22" bitsize="32" type="ieee_single" regnum="54"/>
+  <reg name="f23" bitsize="32" type="ieee_single" regnum="55"/>
+  <reg name="f24" bitsize="32" type="ieee_single" regnum="56"/>
+  <reg name="f25" bitsize="32" type="ieee_single" regnum="57"/>
+  <reg name="f26" bitsize="32" type="ieee_single" regnum="58"/>
+  <reg name="f27" bitsize="32" type="ieee_single" regnum="59"/>
+  <reg name="f28" bitsize="32" type="ieee_single" regnum="60"/>
+  <reg name="f29" bitsize="32" type="ieee_single" regnum="61"/>
+  <reg name="f30" bitsize="32" type="ieee_single" regnum="62"/>
+  <reg name="f31" bitsize="32" type="ieee_single" regnum="63"/>
+
+  <reg name="f32" bitsize="64" type="ieee_double" regnum="64"/>
+  <reg name="f34" bitsize="64" type="ieee_double" regnum="65"/>
+  <reg name="f36" bitsize="64" type="ieee_double" regnum="66"/>
+  <reg name="f38" bitsize="64" type="ieee_double" regnum="67"/>
+  <reg name="f40" bitsize="64" type="ieee_double" regnum="68"/>
+  <reg name="f42" bitsize="64" type="ieee_double" regnum="69"/>
+  <reg name="f44" bitsize="64" type="ieee_double" regnum="70"/>
+  <reg name="f46" bitsize="64" type="ieee_double" regnum="71"/>
+  <reg name="f48" bitsize="64" type="ieee_double" regnum="72"/>
+  <reg name="f50" bitsize="64" type="ieee_double" regnum="73"/>
+  <reg name="f52" bitsize="64" type="ieee_double" regnum="74"/>
+  <reg name="f54" bitsize="64" type="ieee_double" regnum="75"/>
+  <reg name="f56" bitsize="64" type="ieee_double" regnum="76"/>
+  <reg name="f58" bitsize="64" type="ieee_double" regnum="77"/>
+  <reg name="f60" bitsize="64" type="ieee_double" regnum="78"/>
+  <reg name="f62" bitsize="64" type="ieee_double" regnum="79"/>
+</feature>
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-solaris.c ./gdb/features/sparc/sparc64-solaris.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-solaris.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc64-solaris.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,112 @@
+/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
+  Original: sparc64-solaris.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_sparc64_solaris;
+static void
+initialize_tdesc_sparc64_solaris (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("sparc"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("Solaris"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.cpu");
+  tdesc_create_reg (feature, "g0", 0, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g1", 1, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g2", 2, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g3", 3, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g4", 4, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g5", 5, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g6", 6, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "g7", 7, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o0", 8, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o1", 9, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o2", 10, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o3", 11, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o4", 12, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o5", 13, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "sp", 14, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "o7", 15, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l0", 16, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l1", 17, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l2", 18, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l3", 19, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l4", 20, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l5", 21, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l6", 22, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "l7", 23, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i0", 24, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i1", 25, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i2", 26, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i3", 27, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i4", 28, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "i5", 29, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "fp", 30, 1, NULL, 32, "uint64");
+  tdesc_create_reg (feature, "i7", 31, 1, NULL, 64, "uint64");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.cp0");
+  tdesc_create_reg (feature, "pc", 80, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "npc", 81, 1, NULL, 64, "code_ptr");
+  tdesc_create_reg (feature, "state", 82, 1, NULL, 64, "uint64");
+  tdesc_create_reg (feature, "fsr", 83, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "fprs", 84, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "y", 85, 1, NULL, 64, "uint64");
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.sparc.fpu");
+  tdesc_create_reg (feature, "f0", 32, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f1", 33, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f2", 34, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f3", 35, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f4", 36, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f5", 37, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f6", 38, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f7", 39, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f8", 40, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f9", 41, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f10", 42, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f11", 43, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f12", 44, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f13", 45, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f14", 46, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f15", 47, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f16", 48, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f17", 49, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f18", 50, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f19", 51, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f20", 52, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f21", 53, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f22", 54, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f23", 55, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f24", 56, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f25", 57, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f26", 58, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f27", 59, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f28", 60, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f29", 61, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f30", 62, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f31", 63, 1, NULL, 32, "ieee_single");
+  tdesc_create_reg (feature, "f32", 64, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f34", 65, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f36", 66, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f38", 67, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f40", 68, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f42", 69, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f44", 70, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f46", 71, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f48", 72, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f50", 73, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f52", 74, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f54", 75, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f56", 76, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f58", 77, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f60", 78, 1, NULL, 64, "ieee_double");
+  tdesc_create_reg (feature, "f62", 79, 1, NULL, 64, "ieee_double");
+
+  tdesc_sparc64_solaris = result;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-solaris.xml ./gdb/features/sparc/sparc64-solaris.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/sparc/sparc64-solaris.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/features/sparc/sparc64-solaris.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+  <architecture>sparc:v9</architecture>
+  <osabi>Solaris</osabi>
+  <xi:include href="sparc64-cpu.xml"/>
+  <xi:include href="sparc64-cp0.xml"/>
+  <xi:include href="sparc64-fpu.xml"/>
+</target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/threads.dtd ./gdb/features/threads.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/threads.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/threads.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c62x-linux.xml ./gdb/features/tic6x-c62x-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c62x-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c62x-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c62x.xml ./gdb/features/tic6x-c62x.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c62x.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c62x.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64x-linux.xml ./gdb/features/tic6x-c64x-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64x-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c64x-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64xp-linux.xml ./gdb/features/tic6x-c64xp-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64xp-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c64xp-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64xp.xml ./gdb/features/tic6x-c64xp.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64xp.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c64xp.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64x.xml ./gdb/features/tic6x-c64x.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c64x.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c64x.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c6xp.xml ./gdb/features/tic6x-c6xp.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-c6xp.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-c6xp.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-core.xml ./gdb/features/tic6x-core.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-core.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-core.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-gp.xml ./gdb/features/tic6x-gp.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/tic6x-gp.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/tic6x-gp.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/traceframe-info.dtd ./gdb/features/traceframe-info.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/traceframe-info.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/traceframe-info.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/xinclude.dtd ./gdb/features/xinclude.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/xinclude.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/xinclude.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/xscale-iwmmxt.xml ./gdb/features/xscale-iwmmxt.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/features/xscale-iwmmxt.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/features/xscale-iwmmxt.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2007-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.xscale.iwmmxt">
-  <vector id="iwmmxt_v8u8" type="uint8" count="8"/>
-  <vector id="iwmmxt_v4u16" type="uint16" count="4"/>
-  <vector id="iwmmxt_v2u32" type="uint32" count="2"/>
-  <union id="iwmmxt_vec64i">
-    <field name="u8" type="iwmmxt_v8u8"/>
-    <field name="u16" type="iwmmxt_v4u16"/>
-    <field name="u32" type="iwmmxt_v2u32"/>
-    <field name="u64" type="uint64"/>
-  </union>
-
-  <reg name="wR0" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR1" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR2" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR3" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR4" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR5" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR6" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR7" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR8" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR9" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR10" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR11" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR12" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR13" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR14" bitsize="64" type="iwmmxt_vec64i"/>
-  <reg name="wR15" bitsize="64" type="iwmmxt_vec64i"/>
-
-  <reg name="wCSSF" bitsize="32" type="int" group="vector"/>
-  <reg name="wCASF" bitsize="32" type="int" group="vector"/>
-
-  <reg name="wCGR0" bitsize="32" type="int" group="vector"/>
-  <reg name="wCGR1" bitsize="32" type="int" group="vector"/>
-  <reg name="wCGR2" bitsize="32" type="int" group="vector"/>
-  <reg name="wCGR3" bitsize="32" type="int" group="vector"/>
-</feature>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-exp.c ./gdb/f-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/f-exp.c	2017-03-06 01:53:00.000000000 +0000
@@ -82,69 +82,15 @@
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "block.h"
 #include <ctype.h>
+#include <algorithm>
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_f_type(ps) builtin_f_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth f_maxdepth
-#define	yyparse f_parse_internal
-#define	yylex	f_lex
-#define	yyerror	f_error
-#define	yylval	f_lval
-#define	yychar	f_char
-#define	yydebug	f_debug
-#define	yypact	f_pact	
-#define	yyr1	f_r1			
-#define	yyr2	f_r2			
-#define	yydef	f_def		
-#define	yychk	f_chk		
-#define	yypgo	f_pgo		
-#define	yyact	f_act		
-#define	yyexca	f_exca
-#define yyerrflag f_errflag
-#define yynerrs	f_nerrs
-#define	yyps	f_ps
-#define	yypv	f_pv
-#define	yys	f_s
-#define	yy_yys	f_yys
-#define	yystate	f_state
-#define	yytmp	f_tmp
-#define	yyv	f_v
-#define	yy_yyv	f_yyv
-#define	yyval	f_val
-#define	yylloc	f_lloc
-#define yyreds	f_reds		/* With YYDEBUG defined */
-#define yytoks	f_toks		/* With YYDEBUG defined */
-#define yyname	f_name		/* With YYDEBUG defined */
-#define yyrule	f_rule		/* With YYDEBUG defined */
-#define yylhs	f_yylhs
-#define yylen	f_yylen
-#define yydefred f_yydefred
-#define yydgoto	f_yydgoto
-#define yysindex f_yysindex
-#define yyrindex f_yyrindex
-#define yygindex f_yygindex
-#define yytable	 f_yytable
-#define yycheck	 f_yycheck
-#define yyss	f_yyss
-#define yysslim	f_yysslim
-#define yyssp	f_yyssp
-#define yystacksize f_yystacksize
-#define yyvs	f_yyvs
-#define yyvsp	f_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG	1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX f_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -164,7 +110,7 @@ static int match_string_literal (void);
 
 
 /* Line 189 of yacc.c  */
-#line 168 "f-exp.c"
+#line 114 "f-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -279,7 +225,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 142 "f-exp.y"
+#line 88 "f-exp.y"
 
     LONGEST lval;
     struct {
@@ -303,7 +249,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 307 "f-exp.c"
+#line 253 "f-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -314,7 +260,7 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 /* Line 264 of yacc.c  */
-#line 163 "f-exp.y"
+#line 109 "f-exp.y"
 
 /* YYSTYPE gets defined by %union */
 static int parse_number (struct parser_state *, const char *, int,
@@ -322,7 +268,7 @@ static int parse_number (struct parser_s
 
 
 /* Line 264 of yacc.c  */
-#line 326 "f-exp.c"
+#line 272 "f-exp.c"
 
 #ifdef short
 # undef short
@@ -639,15 +585,15 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   243,   243,   244,   247,   253,   258,   262,   266,   270,
-     274,   278,   288,   287,   298,   301,   305,   309,   315,   321,
-     327,   333,   339,   343,   351,   357,   365,   369,   373,   377,
-     381,   385,   389,   393,   397,   401,   405,   409,   413,   417,
-     421,   425,   429,   433,   438,   442,   446,   452,   459,   470,
-     479,   482,   485,   496,   503,   511,   551,   554,   555,   599,
-     601,   603,   605,   607,   610,   612,   614,   618,   620,   625,
-     627,   629,   631,   633,   635,   637,   639,   641,   643,   645,
-     647,   649,   651,   656,   661,   668,   672
+       0,   189,   189,   190,   193,   199,   204,   208,   212,   216,
+     220,   224,   234,   233,   244,   247,   251,   255,   261,   267,
+     273,   279,   285,   289,   297,   303,   311,   315,   319,   323,
+     327,   331,   335,   339,   343,   347,   351,   355,   359,   363,
+     367,   371,   375,   379,   384,   388,   392,   398,   405,   416,
+     425,   428,   431,   442,   449,   457,   494,   497,   498,   542,
+     544,   546,   548,   550,   553,   555,   557,   561,   563,   568,
+     570,   572,   574,   576,   578,   580,   582,   584,   586,   588,
+     590,   592,   594,   599,   604,   611,   615
 };
 #endif
 
@@ -1721,7 +1667,7 @@ yyreduce:
         case 4:
 
 /* Line 1455 of yacc.c  */
-#line 248 "f-exp.y"
+#line 194 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
 			  write_exp_elt_opcode (pstate, OP_TYPE); }
@@ -1730,63 +1676,63 @@ yyreduce:
   case 5:
 
 /* Line 1455 of yacc.c  */
-#line 254 "f-exp.y"
+#line 200 "f-exp.y"
     { }
     break;
 
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 259 "f-exp.y"
+#line 205 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 7:
 
 /* Line 1455 of yacc.c  */
-#line 263 "f-exp.y"
+#line 209 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 267 "f-exp.y"
+#line 213 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 271 "f-exp.y"
+#line 217 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 10:
 
 /* Line 1455 of yacc.c  */
-#line 275 "f-exp.y"
+#line 221 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
     break;
 
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 279 "f-exp.y"
+#line 225 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
     break;
 
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 288 "f-exp.y"
+#line 234 "f-exp.y"
     { start_arglist (); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 290 "f-exp.y"
+#line 236 "f-exp.y"
     { write_exp_elt_opcode (pstate,
 						OP_F77_UNDETERMINED_ARGLIST);
 			  write_exp_elt_longcst (pstate,
@@ -1798,71 +1744,71 @@ yyreduce:
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 302 "f-exp.y"
+#line 248 "f-exp.y"
     { arglist_len = 1; }
     break;
 
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 306 "f-exp.y"
+#line 252 "f-exp.y"
     { arglist_len = 1; }
     break;
 
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 310 "f-exp.y"
+#line 256 "f-exp.y"
     { arglist_len++; }
     break;
 
   case 18:
 
 /* Line 1455 of yacc.c  */
-#line 316 "f-exp.y"
-    { write_exp_elt_opcode (pstate, OP_F90_RANGE); 
+#line 262 "f-exp.y"
+    { write_exp_elt_opcode (pstate, OP_RANGE); 
 			  write_exp_elt_longcst (pstate, NONE_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
     break;
 
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 322 "f-exp.y"
-    { write_exp_elt_opcode (pstate, OP_F90_RANGE);
+#line 268 "f-exp.y"
+    { write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, HIGH_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
     break;
 
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 328 "f-exp.y"
-    { write_exp_elt_opcode (pstate, OP_F90_RANGE);
+#line 274 "f-exp.y"
+    { write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, LOW_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
     break;
 
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 334 "f-exp.y"
-    { write_exp_elt_opcode (pstate, OP_F90_RANGE);
+#line 280 "f-exp.y"
+    { write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, BOTH_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
     break;
 
   case 22:
 
 /* Line 1455 of yacc.c  */
-#line 340 "f-exp.y"
+#line 286 "f-exp.y"
     { }
     break;
 
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 344 "f-exp.y"
+#line 290 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_COMPLEX);
 			  write_exp_elt_type (pstate,
 					      parse_f_type (pstate)
@@ -1873,7 +1819,7 @@ yyreduce:
   case 24:
 
 /* Line 1455 of yacc.c  */
-#line 352 "f-exp.y"
+#line 298 "f-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAST);
 			  write_exp_elt_type (pstate, (yyvsp[(2) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_CAST); }
@@ -1882,7 +1828,7 @@ yyreduce:
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 358 "f-exp.y"
+#line 304 "f-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
                           write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
                           write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
@@ -1891,147 +1837,147 @@ yyreduce:
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 366 "f-exp.y"
+#line 312 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
     break;
 
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 370 "f-exp.y"
+#line 316 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EXP); }
     break;
 
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 374 "f-exp.y"
+#line 320 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 378 "f-exp.y"
+#line 324 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 382 "f-exp.y"
+#line 328 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 386 "f-exp.y"
+#line 332 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 390 "f-exp.y"
+#line 336 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LSH); }
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 394 "f-exp.y"
+#line 340 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_RSH); }
     break;
 
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 398 "f-exp.y"
+#line 344 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 402 "f-exp.y"
+#line 348 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 406 "f-exp.y"
+#line 352 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 410 "f-exp.y"
+#line 356 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 414 "f-exp.y"
+#line 360 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 418 "f-exp.y"
+#line 364 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 422 "f-exp.y"
+#line 368 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 41:
 
 /* Line 1455 of yacc.c  */
-#line 426 "f-exp.y"
+#line 372 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 430 "f-exp.y"
+#line 376 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 434 "f-exp.y"
+#line 380 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 439 "f-exp.y"
+#line 385 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 443 "f-exp.y"
+#line 389 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 447 "f-exp.y"
+#line 393 "f-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 			  write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
 			  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
@@ -2040,7 +1986,7 @@ yyreduce:
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 453 "f-exp.y"
+#line 399 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val).type);
 			  write_exp_elt_longcst (pstate, (LONGEST) ((yyvsp[(1) - (1)].typed_val).val));
@@ -2050,7 +1996,7 @@ yyreduce:
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 460 "f-exp.y"
+#line 406 "f-exp.y"
     { YYSTYPE val;
 			  parse_number (pstate, (yyvsp[(1) - (1)].ssym).stoken.ptr,
 					(yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
@@ -2064,7 +2010,7 @@ yyreduce:
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 471 "f-exp.y"
+#line 417 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate,
 					      parse_f_type (pstate)
@@ -2076,12 +2022,12 @@ yyreduce:
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 486 "f-exp.y"
+#line 432 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
 					      parse_f_type (pstate)
 					      ->builtin_integer);
-			  CHECK_TYPEDEF ((yyvsp[(3) - (4)].tval));
+			  (yyvsp[(3) - (4)].tval) = check_typedef ((yyvsp[(3) - (4)].tval));
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ((yyvsp[(3) - (4)].tval)));
 			  write_exp_elt_opcode (pstate, OP_LONG); }
@@ -2090,7 +2036,7 @@ yyreduce:
   case 53:
 
 /* Line 1455 of yacc.c  */
-#line 497 "f-exp.y"
+#line 443 "f-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].lval));
 			  write_exp_elt_opcode (pstate, OP_BOOL);
@@ -2100,7 +2046,7 @@ yyreduce:
   case 54:
 
 /* Line 1455 of yacc.c  */
-#line 504 "f-exp.y"
+#line 450 "f-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_STRING);
 			  write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
@@ -2111,24 +2057,21 @@ yyreduce:
   case 55:
 
 /* Line 1455 of yacc.c  */
-#line 512 "f-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
+#line 458 "f-exp.y"
+    { struct block_symbol sym = (yyvsp[(1) - (1)].ssym).sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found, 
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			      break;
 			    }
@@ -2153,7 +2096,7 @@ yyreduce:
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 556 "f-exp.y"
+#line 499 "f-exp.y"
     {
 		  /* This is where the interesting stuff happens.  */
 		  int done = 0;
@@ -2200,168 +2143,168 @@ yyreduce:
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 600 "f-exp.y"
+#line 543 "f-exp.y"
     { push_type (tp_pointer); (yyval.voidval) = 0; }
     break;
 
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 602 "f-exp.y"
+#line 545 "f-exp.y"
     { push_type (tp_pointer); (yyval.voidval) = (yyvsp[(2) - (2)].voidval); }
     break;
 
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 604 "f-exp.y"
+#line 547 "f-exp.y"
     { push_type (tp_reference); (yyval.voidval) = 0; }
     break;
 
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 606 "f-exp.y"
+#line 549 "f-exp.y"
     { push_type (tp_reference); (yyval.voidval) = (yyvsp[(2) - (2)].voidval); }
     break;
 
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 611 "f-exp.y"
+#line 554 "f-exp.y"
     { (yyval.voidval) = (yyvsp[(2) - (3)].voidval); }
     break;
 
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 613 "f-exp.y"
+#line 556 "f-exp.y"
     { push_type (tp_function); }
     break;
 
   case 66:
 
 /* Line 1455 of yacc.c  */
-#line 615 "f-exp.y"
+#line 558 "f-exp.y"
     { push_type (tp_function); }
     break;
 
   case 67:
 
 /* Line 1455 of yacc.c  */
-#line 619 "f-exp.y"
+#line 562 "f-exp.y"
     { (yyval.voidval) = 0; }
     break;
 
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 621 "f-exp.y"
+#line 564 "f-exp.y"
     { xfree ((yyvsp[(2) - (3)].tvec)); (yyval.voidval) = 0; }
     break;
 
   case 69:
 
 /* Line 1455 of yacc.c  */
-#line 626 "f-exp.y"
+#line 569 "f-exp.y"
     { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
     break;
 
   case 70:
 
 /* Line 1455 of yacc.c  */
-#line 628 "f-exp.y"
+#line 571 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_integer; }
     break;
 
   case 71:
 
 /* Line 1455 of yacc.c  */
-#line 630 "f-exp.y"
+#line 573 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_integer_s2; }
     break;
 
   case 72:
 
 /* Line 1455 of yacc.c  */
-#line 632 "f-exp.y"
+#line 575 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_character; }
     break;
 
   case 73:
 
 /* Line 1455 of yacc.c  */
-#line 634 "f-exp.y"
+#line 577 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s8; }
     break;
 
   case 74:
 
 /* Line 1455 of yacc.c  */
-#line 636 "f-exp.y"
+#line 579 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_logical; }
     break;
 
   case 75:
 
 /* Line 1455 of yacc.c  */
-#line 638 "f-exp.y"
+#line 581 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s2; }
     break;
 
   case 76:
 
 /* Line 1455 of yacc.c  */
-#line 640 "f-exp.y"
+#line 583 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s1; }
     break;
 
   case 77:
 
 /* Line 1455 of yacc.c  */
-#line 642 "f-exp.y"
+#line 585 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_real; }
     break;
 
   case 78:
 
 /* Line 1455 of yacc.c  */
-#line 644 "f-exp.y"
+#line 587 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_real_s8; }
     break;
 
   case 79:
 
 /* Line 1455 of yacc.c  */
-#line 646 "f-exp.y"
+#line 589 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_real_s16; }
     break;
 
   case 80:
 
 /* Line 1455 of yacc.c  */
-#line 648 "f-exp.y"
+#line 591 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s8; }
     break;
 
   case 81:
 
 /* Line 1455 of yacc.c  */
-#line 650 "f-exp.y"
+#line 593 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s16; }
     break;
 
   case 82:
 
 /* Line 1455 of yacc.c  */
-#line 652 "f-exp.y"
+#line 595 "f-exp.y"
     { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s32; }
     break;
 
   case 83:
 
 /* Line 1455 of yacc.c  */
-#line 657 "f-exp.y"
+#line 600 "f-exp.y"
     { (yyval.tvec) = (struct type **) xmalloc (sizeof (struct type *) * 2);
 		  (yyval.ivec)[0] = 1;	/* Number of types in vector */
 		  (yyval.tvec)[1] = (yyvsp[(1) - (1)].tval);
@@ -2371,7 +2314,7 @@ yyreduce:
   case 84:
 
 /* Line 1455 of yacc.c  */
-#line 662 "f-exp.y"
+#line 605 "f-exp.y"
     { int len = sizeof (struct type *) * (++((yyvsp[(1) - (3)].ivec)[0]) + 1);
 		  (yyval.tvec) = (struct type **) xrealloc ((char *) (yyvsp[(1) - (3)].tvec), len);
 		  (yyval.tvec)[(yyval.ivec)[0]] = (yyvsp[(3) - (3)].tval);
@@ -2381,14 +2324,14 @@ yyreduce:
   case 85:
 
 /* Line 1455 of yacc.c  */
-#line 669 "f-exp.y"
+#line 612 "f-exp.y"
     {  (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
 
 
 /* Line 1455 of yacc.c  */
-#line 2393 "f-exp.c"
+#line 2336 "f-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2600,7 +2543,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 682 "f-exp.y"
+#line 625 "f-exp.y"
 
 
 /* Take care of parsing a number (anything that starts with a digit).
@@ -2781,7 +2724,7 @@ static const struct token dot_ops[] =
   { ".GT.", GREATERTHAN, BINOP_END },
   { ".lt.", LESSTHAN, BINOP_END },
   { ".LT.", LESSTHAN, BINOP_END },
-  { NULL, 0, 0 }
+  { NULL, 0, BINOP_END }
 };
 
 struct f77_boolean_val 
@@ -2816,7 +2759,7 @@ static const struct token f77_keywords[]
   { "sizeof", SIZEOF, BINOP_END },
   { "real_8", REAL_S8_KEYWORD, BINOP_END },
   { "real", REAL_KEYWORD, BINOP_END },
-  { NULL, 0, 0 }
+  { NULL, 0, BINOP_END }
 }; 
 
 /* Implementation of a dynamically expandable buffer for processing input
@@ -2846,7 +2789,7 @@ growbuf_by_size (int count)
 {
   int growby;
 
-  growby = max (count, GROWBY_MIN_SIZE);
+  growby = std::max (count, GROWBY_MIN_SIZE);
   tempbufsize += growby;
   if (tempbuf == NULL)
     tempbuf = (char *) xmalloc (tempbufsize);
@@ -3120,7 +3063,7 @@ yylex (void)
      The caller is not constrained to care about the distinction.  */
   {
     char *tmp = copy_name (yylval.sval);
-    struct symbol *sym;
+    struct block_symbol result;
     struct field_of_this_result is_a_field_of_this;
     enum domain_enum_tag lookup_domains[] =
     {
@@ -3137,17 +3080,18 @@ yylex (void)
 	   way we can refer to it unconditionally below.  */
 	memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
 
-	sym = lookup_symbol (tmp, expression_context_block,
-			     lookup_domains[i],
-			     parse_language (pstate)->la_language
-			     == language_cplus ? &is_a_field_of_this : NULL);
-	if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+	result = lookup_symbol (tmp, expression_context_block,
+				lookup_domains[i],
+				parse_language (pstate)->la_language
+				== language_cplus
+				  ? &is_a_field_of_this : NULL);
+	if (result.symbol && SYMBOL_CLASS (result.symbol) == LOC_TYPEDEF)
 	  {
-	    yylval.tsym.type = SYMBOL_TYPE (sym);
+	    yylval.tsym.type = SYMBOL_TYPE (result.symbol);
 	    return TYPENAME;
 	  }
 
-	if (sym)
+	if (result.symbol)
 	  break;
       }
 
@@ -3160,7 +3104,7 @@ yylex (void)
     /* Input names that aren't symbols but ARE valid hex numbers,
        when the input radix permits them, can be names or numbers
        depending on the parse.  Note we support radixes > 16 here.  */
-    if (!sym
+    if (!result.symbol
 	&& ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
 	    || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
       {
@@ -3168,14 +3112,14 @@ yylex (void)
 	hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
 	if (hextype == INT)
 	  {
-	    yylval.ssym.sym = sym;
+	    yylval.ssym.sym = result;
 	    yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	    return NAME_OR_INT;
 	  }
       }
     
     /* Any other kind of symbol */
-    yylval.ssym.sym = sym;
+    yylval.ssym.sym = result;
     yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
     return NAME;
   }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-exp.y ./gdb/f-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/f-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 
 /* YACC parser for Fortran expressions, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C parser by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -53,69 +53,15 @@
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "block.h"
 #include <ctype.h>
+#include <algorithm>
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_f_type(ps) builtin_f_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth f_maxdepth
-#define	yyparse f_parse_internal
-#define	yylex	f_lex
-#define	yyerror	f_error
-#define	yylval	f_lval
-#define	yychar	f_char
-#define	yydebug	f_debug
-#define	yypact	f_pact	
-#define	yyr1	f_r1			
-#define	yyr2	f_r2			
-#define	yydef	f_def		
-#define	yychk	f_chk		
-#define	yypgo	f_pgo		
-#define	yyact	f_act		
-#define	yyexca	f_exca
-#define yyerrflag f_errflag
-#define yynerrs	f_nerrs
-#define	yyps	f_ps
-#define	yypv	f_pv
-#define	yys	f_s
-#define	yy_yys	f_yys
-#define	yystate	f_state
-#define	yytmp	f_tmp
-#define	yyv	f_v
-#define	yy_yyv	f_yyv
-#define	yyval	f_val
-#define	yylloc	f_lloc
-#define yyreds	f_reds		/* With YYDEBUG defined */
-#define yytoks	f_toks		/* With YYDEBUG defined */
-#define yyname	f_name		/* With YYDEBUG defined */
-#define yyrule	f_rule		/* With YYDEBUG defined */
-#define yylhs	f_yylhs
-#define yylen	f_yylen
-#define yydefred f_yydefred
-#define yydgoto	f_yydgoto
-#define yysindex f_yysindex
-#define yyrindex f_yyrindex
-#define yygindex f_yygindex
-#define yytable	 f_yytable
-#define yycheck	 f_yycheck
-#define yyss	f_yyss
-#define yysslim	f_yysslim
-#define yyssp	f_yyssp
-#define yystacksize f_yystacksize
-#define yyvs	f_yyvs
-#define yyvsp	f_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG	1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX f_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -313,27 +259,27 @@ arglist	:	arglist ',' exp   %prec ABOVE_
 /* There are four sorts of subrange types in F90.  */
 
 subrange:	exp ':' exp	%prec ABOVE_COMMA
-			{ write_exp_elt_opcode (pstate, OP_F90_RANGE); 
+			{ write_exp_elt_opcode (pstate, OP_RANGE); 
 			  write_exp_elt_longcst (pstate, NONE_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
 	;
 
 subrange:	exp ':'	%prec ABOVE_COMMA
-			{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
+			{ write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, HIGH_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
 	;
 
 subrange:	':' exp	%prec ABOVE_COMMA
-			{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
+			{ write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, LOW_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
 	;
 
 subrange:	':'	%prec ABOVE_COMMA
-			{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
+			{ write_exp_elt_opcode (pstate, OP_RANGE);
 			  write_exp_elt_longcst (pstate, BOTH_BOUND_DEFAULT);
-			  write_exp_elt_opcode (pstate, OP_F90_RANGE); }
+			  write_exp_elt_opcode (pstate, OP_RANGE); }
 	;
 
 complexnum:     exp ',' exp 
@@ -487,7 +433,7 @@ exp	:	SIZEOF '(' type ')'	%prec UNARY
 			  write_exp_elt_type (pstate,
 					      parse_f_type (pstate)
 					      ->builtin_integer);
-			  CHECK_TYPEDEF ($3);
+			  $3 = check_typedef ($3);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ($3));
 			  write_exp_elt_opcode (pstate, OP_LONG); }
@@ -509,23 +455,20 @@ exp	:	STRING_LITERAL
 	;
 
 variable:	name_not_typename
-			{ struct symbol *sym = $1.sym;
+			{ struct block_symbol sym = $1.sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found, 
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			      break;
 			    }
@@ -859,7 +802,7 @@ static const struct token dot_ops[] =
   { ".GT.", GREATERTHAN, BINOP_END },
   { ".lt.", LESSTHAN, BINOP_END },
   { ".LT.", LESSTHAN, BINOP_END },
-  { NULL, 0, 0 }
+  { NULL, 0, BINOP_END }
 };
 
 struct f77_boolean_val 
@@ -894,7 +837,7 @@ static const struct token f77_keywords[]
   { "sizeof", SIZEOF, BINOP_END },
   { "real_8", REAL_S8_KEYWORD, BINOP_END },
   { "real", REAL_KEYWORD, BINOP_END },
-  { NULL, 0, 0 }
+  { NULL, 0, BINOP_END }
 }; 
 
 /* Implementation of a dynamically expandable buffer for processing input
@@ -924,7 +867,7 @@ growbuf_by_size (int count)
 {
   int growby;
 
-  growby = max (count, GROWBY_MIN_SIZE);
+  growby = std::max (count, GROWBY_MIN_SIZE);
   tempbufsize += growby;
   if (tempbuf == NULL)
     tempbuf = (char *) malloc (tempbufsize);
@@ -1198,7 +1141,7 @@ yylex (void)
      The caller is not constrained to care about the distinction.  */
   {
     char *tmp = copy_name (yylval.sval);
-    struct symbol *sym;
+    struct block_symbol result;
     struct field_of_this_result is_a_field_of_this;
     enum domain_enum_tag lookup_domains[] =
     {
@@ -1215,17 +1158,18 @@ yylex (void)
 	   way we can refer to it unconditionally below.  */
 	memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
 
-	sym = lookup_symbol (tmp, expression_context_block,
-			     lookup_domains[i],
-			     parse_language (pstate)->la_language
-			     == language_cplus ? &is_a_field_of_this : NULL);
-	if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+	result = lookup_symbol (tmp, expression_context_block,
+				lookup_domains[i],
+				parse_language (pstate)->la_language
+				== language_cplus
+				  ? &is_a_field_of_this : NULL);
+	if (result.symbol && SYMBOL_CLASS (result.symbol) == LOC_TYPEDEF)
 	  {
-	    yylval.tsym.type = SYMBOL_TYPE (sym);
+	    yylval.tsym.type = SYMBOL_TYPE (result.symbol);
 	    return TYPENAME;
 	  }
 
-	if (sym)
+	if (result.symbol)
 	  break;
       }
 
@@ -1238,7 +1182,7 @@ yylex (void)
     /* Input names that aren't symbols but ARE valid hex numbers,
        when the input radix permits them, can be names or numbers
        depending on the parse.  Note we support radixes > 16 here.  */
-    if (!sym
+    if (!result.symbol
 	&& ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
 	    || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
       {
@@ -1246,14 +1190,14 @@ yylex (void)
 	hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
 	if (hextype == INT)
 	  {
-	    yylval.ssym.sym = sym;
+	    yylval.ssym.sym = result;
 	    yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	    return NAME_OR_INT;
 	  }
       }
     
     /* Any other kind of symbol */
-    yylval.ssym.sym = sym;
+    yylval.ssym.sym = result;
     yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
     return NAME;
   }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/filesystem.c ./gdb/filesystem.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/filesystem.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/filesystem.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle different target file systems for GDB, the GNU Debugger.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/filesystem.h ./gdb/filesystem.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/filesystem.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/filesystem.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Handle different target file systems for GDB, the GNU Debugger.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/findcmd.c ./gdb/findcmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/findcmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/findcmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* The find command.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "value.h"
 #include "target.h"
 #include "cli/cli-utils.h"
+#include <algorithm>
 
 /* Copied from bfd_put_bits.  */
 
@@ -75,7 +76,7 @@ parse_find_args (char *args, ULONGEST *m
   if (args == NULL)
     error (_("Missing search parameters."));
 
-  pattern_buf = xmalloc (pattern_buf_size);
+  pattern_buf = (gdb_byte *) xmalloc (pattern_buf_size);
   pattern_buf_end = pattern_buf;
   old_cleanups = make_cleanup (free_current_contents, &pattern_buf);
 
@@ -178,13 +179,14 @@ parse_find_args (char *args, ULONGEST *m
       /* Keep it simple and assume size == 'g' when watching for when we
 	 need to grow the pattern buf.  */
       pattern_buf_size_need = (pattern_buf_end - pattern_buf
-			       + max (TYPE_LENGTH (t), sizeof (int64_t)));
+			       + std::max (TYPE_LENGTH (t),
+					   (unsigned) sizeof (int64_t)));
       if (pattern_buf_size_need > pattern_buf_size)
 	{
 	  size_t current_offset = pattern_buf_end - pattern_buf;
 
 	  pattern_buf_size = pattern_buf_size_need * 2;
-	  pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
+	  pattern_buf = (gdb_byte *) xrealloc (pattern_buf, pattern_buf_size);
 	  pattern_buf_end = pattern_buf + current_offset;
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/findvar.c ./gdb/findvar.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/findvar.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/findvar.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Find a variable's value in memory, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,6 +32,7 @@
 #include "block.h"
 #include "objfiles.h"
 #include "language.h"
+#include "dwarf2loc.h"
 
 /* Basic byte-swapping routines.  All 'extract' functions return a
    host-format integer from a target-format integer at ADDR which is
@@ -282,17 +283,23 @@ value_of_register_lazy (struct frame_inf
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct value *reg_val;
+  struct frame_info *next_frame;
 
   gdb_assert (regnum < (gdbarch_num_regs (gdbarch)
 			+ gdbarch_num_pseudo_regs (gdbarch)));
 
-  /* We should have a valid (i.e. non-sentinel) frame.  */
-  gdb_assert (frame_id_p (get_frame_id (frame)));
+  gdb_assert (frame != NULL);
+
+  next_frame = get_next_frame_sentinel_okay (frame);
+
+  /* We should have a valid next frame.  */
+  gdb_assert (frame_id_p (get_frame_id (next_frame)));
 
   reg_val = allocate_value_lazy (register_type (gdbarch, regnum));
   VALUE_LVAL (reg_val) = lval_register;
   VALUE_REGNUM (reg_val) = regnum;
-  VALUE_FRAME_ID (reg_val) = get_frame_id (frame);
+  VALUE_NEXT_FRAME_ID (reg_val) = get_frame_id (next_frame);
+
   return reg_val;
 }
 
@@ -336,14 +343,13 @@ address_to_signed_pointer (struct gdbarc
   store_signed_integer (buf, TYPE_LENGTH (type), byte_order, addr);
 }
 
-/* Will calling read_var_value or locate_var_value on SYM end
-   up caring what frame it is being evaluated relative to?  SYM must
-   be non-NULL.  */
-int
-symbol_read_needs_frame (struct symbol *sym)
+/* See value.h.  */
+
+enum symbol_needs_kind
+symbol_read_needs (struct symbol *sym)
 {
   if (SYMBOL_COMPUTED_OPS (sym) != NULL)
-    return SYMBOL_COMPUTED_OPS (sym)->read_needs_frame (sym);
+    return SYMBOL_COMPUTED_OPS (sym)->get_symbol_read_needs (sym);
 
   switch (SYMBOL_CLASS (sym))
     {
@@ -357,7 +363,7 @@ symbol_read_needs_frame (struct symbol *
     case LOC_REF_ARG:
     case LOC_REGPARM_ADDR:
     case LOC_LOCAL:
-      return 1;
+      return SYMBOL_NEEDS_FRAME;
 
     case LOC_UNDEF:
     case LOC_CONST:
@@ -373,9 +379,17 @@ symbol_read_needs_frame (struct symbol *
     case LOC_CONST_BYTES:
     case LOC_UNRESOLVED:
     case LOC_OPTIMIZED_OUT:
-      return 0;
+      return SYMBOL_NEEDS_NONE;
     }
-  return 1;
+  return SYMBOL_NEEDS_FRAME;
+}
+
+/* See value.h.  */
+
+int
+symbol_read_needs_frame (struct symbol *sym)
+{
+  return symbol_read_needs (sym) == SYMBOL_NEEDS_FRAME;
 }
 
 /* Private data to be used with minsym_lookup_iterator_cb.  */
@@ -409,15 +423,172 @@ minsym_lookup_iterator_cb (struct objfil
   return (data->result.minsym != NULL);
 }
 
+/* Given static link expression and the frame it lives in, look for the frame
+   the static links points to and return it.  Return NULL if we could not find
+   such a frame.   */
+
+static struct frame_info *
+follow_static_link (struct frame_info *frame,
+		    const struct dynamic_prop *static_link)
+{
+  CORE_ADDR upper_frame_base;
+
+  if (!dwarf2_evaluate_property (static_link, frame, NULL, &upper_frame_base))
+    return NULL;
+
+  /* Now climb up the stack frame until we reach the frame we are interested
+     in.  */
+  for (; frame != NULL; frame = get_prev_frame (frame))
+    {
+      struct symbol *framefunc = get_frame_function (frame);
+
+      /* Stacks can be quite deep: give the user a chance to stop this.  */
+      QUIT;
+
+      /* If we don't know how to compute FRAME's base address, don't give up:
+	 maybe the frame we are looking for is upper in the stace frame.  */
+      if (framefunc != NULL
+	  && SYMBOL_BLOCK_OPS (framefunc) != NULL
+	  && SYMBOL_BLOCK_OPS (framefunc)->get_frame_base != NULL
+	  && (SYMBOL_BLOCK_OPS (framefunc)->get_frame_base (framefunc, frame)
+	      == upper_frame_base))
+	break;
+    }
+
+  return frame;
+}
+
+/* Assuming VAR is a symbol that can be reached from FRAME thanks to lexical
+   rules, look for the frame that is actually hosting VAR and return it.  If,
+   for some reason, we found no such frame, return NULL.
+
+   This kind of computation is necessary to correctly handle lexically nested
+   functions.
+
+   Note that in some cases, we know what scope VAR comes from but we cannot
+   reach the specific frame that hosts the instance of VAR we are looking for.
+   For backward compatibility purposes (with old compilers), we then look for
+   the first frame that can host it.  */
+
+static struct frame_info *
+get_hosting_frame (struct symbol *var, const struct block *var_block,
+		   struct frame_info *frame)
+{
+  const struct block *frame_block = NULL;
+
+  if (!symbol_read_needs_frame (var))
+    return NULL;
+
+  /* Some symbols for local variables have no block: this happens when they are
+     not produced by a debug information reader, for instance when GDB creates
+     synthetic symbols.  Without block information, we must assume they are
+     local to FRAME. In this case, there is nothing to do.  */
+  else if (var_block == NULL)
+    return frame;
+
+  /* We currently assume that all symbols with a location list need a frame.
+     This is true in practice because selecting the location description
+     requires to compute the CFA, hence requires a frame.  However we have
+     tests that embed global/static symbols with null location lists.
+     We want to get <optimized out> instead of <frame required> when evaluating
+     them so return a frame instead of raising an error.  */
+  else if (var_block == block_global_block (var_block)
+	   || var_block == block_static_block (var_block))
+    return frame;
+
+  /* We have to handle the "my_func::my_local_var" notation.  This requires us
+     to look for upper frames when we find no block for the current frame: here
+     and below, handle when frame_block == NULL.  */
+  if (frame != NULL)
+    frame_block = get_frame_block (frame, NULL);
+
+  /* Climb up the call stack until reaching the frame we are looking for.  */
+  while (frame != NULL && frame_block != var_block)
+    {
+      /* Stacks can be quite deep: give the user a chance to stop this.  */
+      QUIT;
+
+      if (frame_block == NULL)
+	{
+	  frame = get_prev_frame (frame);
+	  if (frame == NULL)
+	    break;
+	  frame_block = get_frame_block (frame, NULL);
+	}
+
+      /* If we failed to find the proper frame, fallback to the heuristic
+	 method below.  */
+      else if (frame_block == block_global_block (frame_block))
+	{
+	  frame = NULL;
+	  break;
+	}
+
+      /* Assuming we have a block for this frame: if we are at the function
+	 level, the immediate upper lexical block is in an outer function:
+	 follow the static link.  */
+      else if (BLOCK_FUNCTION (frame_block))
+	{
+	  const struct dynamic_prop *static_link
+	    = block_static_link (frame_block);
+	  int could_climb_up = 0;
+
+	  if (static_link != NULL)
+	    {
+	      frame = follow_static_link (frame, static_link);
+	      if (frame != NULL)
+		{
+		  frame_block = get_frame_block (frame, NULL);
+		  could_climb_up = frame_block != NULL;
+		}
+	    }
+	  if (!could_climb_up)
+	    {
+	      frame = NULL;
+	      break;
+	    }
+	}
+
+      else
+	/* We must be in some function nested lexical block.  Just get the
+	   outer block: both must share the same frame.  */
+	frame_block = BLOCK_SUPERBLOCK (frame_block);
+    }
+
+  /* Old compilers may not provide a static link, or they may provide an
+     invalid one.  For such cases, fallback on the old way to evaluate
+     non-local references: just climb up the call stack and pick the first
+     frame that contains the variable we are looking for.  */
+  if (frame == NULL)
+    {
+      frame = block_innermost_frame (var_block);
+      if (frame == NULL)
+	{
+	  if (BLOCK_FUNCTION (var_block)
+	      && !block_inlined_p (var_block)
+	      && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (var_block)))
+	    error (_("No frame is currently executing in block %s."),
+		   SYMBOL_PRINT_NAME (BLOCK_FUNCTION (var_block)));
+	  else
+	    error (_("No frame is currently executing in specified"
+		     " block"));
+	}
+    }
+
+  return frame;
+}
+
 /* A default implementation for the "la_read_var_value" hook in
    the language vector which should work in most situations.  */
 
 struct value *
-default_read_var_value (struct symbol *var, struct frame_info *frame)
+default_read_var_value (struct symbol *var, const struct block *var_block,
+			struct frame_info *frame)
 {
   struct value *v;
   struct type *type = SYMBOL_TYPE (var);
   CORE_ADDR addr;
+  enum symbol_needs_kind sym_need;
 
   /* Call check_typedef on our type to make sure that, if TYPE is
      a TYPE_CODE_TYPEDEF, its length is set to the length of the target type
@@ -426,8 +597,14 @@ default_read_var_value (struct symbol *v
      set the returned value type description correctly.  */
   check_typedef (type);
 
-  if (symbol_read_needs_frame (var))
-    gdb_assert (frame);
+  sym_need = symbol_read_needs (var);
+  if (sym_need == SYMBOL_NEEDS_FRAME)
+    gdb_assert (frame != NULL);
+  else if (sym_need == SYMBOL_NEEDS_REGISTERS && !target_has_registers)
+    error (_("Cannot read `%s' without registers"), SYMBOL_PRINT_NAME (var));
+
+  if (frame != NULL)
+    frame = get_hosting_frame (var, var_block, frame);
 
   if (SYMBOL_COMPUTED_OPS (var) != NULL)
     return SYMBOL_COMPUTED_OPS (var)->read_variable (var, frame);
@@ -578,16 +755,31 @@ default_read_var_value (struct symbol *v
 	   symbol_objfile (var));
 	msym = lookup_data.result.minsym;
 
+	/* If we can't find the minsym there's a problem in the symbol info.
+	   The symbol exists in the debug info, but it's missing in the minsym
+	   table.  */
 	if (msym == NULL)
-	  error (_("No global symbol \"%s\"."), SYMBOL_LINKAGE_NAME (var));
-	if (overlay_debugging)
-	  addr = symbol_overlayed_address (BMSYMBOL_VALUE_ADDRESS (lookup_data.result),
-					   MSYMBOL_OBJ_SECTION (lookup_data.result.objfile,
-								msym));
-	else
-	  addr = BMSYMBOL_VALUE_ADDRESS (lookup_data.result);
+	  {
+	    const char *flavour_name
+	      = objfile_flavour_name (symbol_objfile (var));
 
+	    /* We can't get here unless we've opened the file, so flavour_name
+	       can't be NULL.  */
+	    gdb_assert (flavour_name != NULL);
+	    error (_("Missing %s symbol \"%s\"."),
+		   flavour_name, SYMBOL_LINKAGE_NAME (var));
+	  }
 	obj_section = MSYMBOL_OBJ_SECTION (lookup_data.result.objfile, msym);
+	/* Relocate address, unless there is no section or the variable is
+	   a TLS variable. */
+	if (obj_section == NULL
+	    || (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
+	   addr = MSYMBOL_VALUE_RAW_ADDRESS (msym);
+	else
+	   addr = BMSYMBOL_VALUE_ADDRESS (lookup_data.result);
+	if (overlay_debugging)
+	  addr = symbol_overlayed_address (addr, obj_section);
+	/* Determine address of TLS variable. */
 	if (obj_section
 	    && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
 	  addr = target_translate_tls_address (obj_section->objfile, addr);
@@ -610,14 +802,15 @@ default_read_var_value (struct symbol *v
 /* Calls VAR's language la_read_var_value hook with the given arguments.  */
 
 struct value *
-read_var_value (struct symbol *var, struct frame_info *frame)
+read_var_value (struct symbol *var, const struct block *var_block,
+		struct frame_info *frame)
 {
   const struct language_defn *lang = language_def (SYMBOL_LANGUAGE (var));
 
   gdb_assert (lang != NULL);
   gdb_assert (lang->la_read_var_value != NULL);
 
-  return lang->la_read_var_value (var, frame);
+  return lang->la_read_var_value (var, var_block, frame);
 }
 
 /* Install default attributes for register values.  */
@@ -628,9 +821,17 @@ default_value_from_register (struct gdba
 {
   int len = TYPE_LENGTH (type);
   struct value *value = allocate_value (type);
+  struct frame_info *frame;
 
   VALUE_LVAL (value) = lval_register;
-  VALUE_FRAME_ID (value) = frame_id;
+  frame = frame_find_by_id (frame_id);
+
+  if (frame == NULL)
+    frame_id = null_frame_id;
+  else
+    frame_id = get_frame_id (get_next_frame_sentinel_okay (frame));
+
+  VALUE_NEXT_FRAME_ID (value) = frame_id;
   VALUE_REGNUM (value) = regnum;
 
   /* Any structure stored in more than one register will always be
@@ -659,10 +860,10 @@ void
 read_frame_register_value (struct value *value, struct frame_info *frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
-  int offset = 0;
-  int reg_offset = value_offset (value);
+  LONGEST offset = 0;
+  LONGEST reg_offset = value_offset (value);
   int regnum = VALUE_REGNUM (value);
-  int len = TYPE_LENGTH (check_typedef (value_type (value)));
+  int len = type_length_units (check_typedef (value_type (value)));
 
   gdb_assert (VALUE_LVAL (value) == lval_register);
 
@@ -677,7 +878,7 @@ read_frame_register_value (struct value 
   while (len > 0)
     {
       struct value *regval = get_frame_register_value (frame, regnum);
-      int reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset;
+      int reg_len = type_length_units (value_type (regval)) - reg_offset;
 
       /* If the register length is larger than the number of bytes
          remaining to copy, then only copy the appropriate bytes.  */
@@ -715,7 +916,7 @@ value_from_register (struct type *type, 
          including the location.  */
       v = allocate_value (type);
       VALUE_LVAL (v) = lval_register;
-      VALUE_FRAME_ID (v) = get_frame_id (frame);
+      VALUE_NEXT_FRAME_ID (v) = get_frame_id (get_next_frame_sentinel_okay (frame));
       VALUE_REGNUM (v) = regnum;
       ok = gdbarch_register_to_value (gdbarch, frame, regnum, type1,
 				      value_contents_raw (v), &optim,
@@ -752,19 +953,25 @@ address_from_register (int regnum, struc
   struct type *type = builtin_type (gdbarch)->builtin_data_ptr;
   struct value *value;
   CORE_ADDR result;
+  int regnum_max_excl = (gdbarch_num_regs (gdbarch)
+			 + gdbarch_num_pseudo_regs (gdbarch));
+
+  if (regnum < 0 || regnum >= regnum_max_excl)
+    error (_("Invalid register #%d, expecting 0 <= # < %d"), regnum,
+	   regnum_max_excl);
 
   /* This routine may be called during early unwinding, at a time
      where the ID of FRAME is not yet known.  Calling value_from_register
      would therefore abort in get_frame_id.  However, since we only need
      a temporary value that is never used as lvalue, we actually do not
-     really need to set its VALUE_FRAME_ID.  Therefore, we re-implement
+     really need to set its VALUE_NEXT_FRAME_ID.  Therefore, we re-implement
      the core of value_from_register, but use the null_frame_id.  */
 
   /* Some targets require a special conversion routine even for plain
      pointer types.  Avoid constructing a value object in those cases.  */
   if (gdbarch_convert_register_p (gdbarch, regnum, type))
     {
-      gdb_byte *buf = alloca (TYPE_LENGTH (type));
+      gdb_byte *buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
       int optim, unavail, ok;
 
       ok = gdbarch_register_to_value (gdbarch, frame, regnum, type,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-lang.c ./gdb/f-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/f-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Fortran language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C parser by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -143,7 +143,7 @@ static const struct op_print f_op_print_
   {".LT.", BINOP_LESS, PREC_ORDER, 0},
   {"**", UNOP_IND, PREC_PREFIX, 0},
   {"@", BINOP_REPEAT, PREC_REPEAT, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_REPEAT, 0}
 };
 
 enum f_primitive_types {
@@ -235,6 +235,13 @@ f_make_symbol_completion_list (const cha
   return default_make_symbol_completion_list_break_on (text, word, ":", code);
 }
 
+static const char *f_extensions[] =
+{
+  ".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
+  ".f90", ".F90", ".f95", ".F95", ".f03", ".F03", ".f08", ".F08",
+  NULL
+};
+
 const struct language_defn f_language_defn =
 {
   "fortran",
@@ -244,9 +251,10 @@ const struct language_defn f_language_de
   case_sensitive_off,
   array_column_major,
   macro_expansion_no,
+  f_extensions,
   &exp_descriptor_standard,
   f_parse,			/* parser */
-  f_error,			/* parser error function */
+  f_yyerror,			/* parser error function */
   null_post_parser,
   f_printchar,			/* Print character constant */
   f_printstr,			/* function to print string constant */
@@ -260,7 +268,14 @@ const struct language_defn f_language_de
   NULL,                    	/* name_of_this */
   cp_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
+
+  /* We could support demangling here to provide module namespaces
+     also for inferiors with only minimal symbol table (ELF symbols).
+     Just the mangling standard is not standardized across compilers
+     and there is no DW_AT_producer available for inferiors with only
+     the ELF symbols to check the mangling kind.  */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   f_op_print_tab,		/* expression operators for printing */
@@ -317,13 +332,13 @@ build_fortran_types (struct gdbarch *gdb
 
   builtin_f_type->builtin_real
     = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
-		       "real", NULL);
+		       "real", gdbarch_float_format (gdbarch));
   builtin_f_type->builtin_real_s8
     = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
-		       "real*8", NULL);
+		       "real*8", gdbarch_double_format (gdbarch));
   builtin_f_type->builtin_real_s16
     = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
-		       "real*16", NULL);
+		       "real*16", gdbarch_long_double_format (gdbarch));
 
   builtin_f_type->builtin_complex_s8
     = arch_complex_type (gdbarch, "complex*8",
@@ -343,7 +358,7 @@ static struct gdbarch_data *f_type_data;
 const struct builtin_f_type *
 builtin_f_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, f_type_data);
+  return (const struct builtin_f_type *) gdbarch_data (gdbarch, f_type_data);
 }
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-lang.h ./gdb/f-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/f-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Fortran language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -25,31 +25,18 @@ struct parser_state;
 
 extern int f_parse (struct parser_state *);
 
-extern void f_error (char *);	/* Defined in f-exp.y */
+extern void f_yyerror (char *);	/* Defined in f-exp.y */
 
 extern void f_print_type (struct type *, const char *, struct ui_file *, int,
 			  int, const struct type_print_options *);
 
-extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+extern void f_val_print (struct type *, int, CORE_ADDR,
 			 struct ui_file *, int,
-			 const struct value *,
+			 struct value *,
 			 const struct value_print_options *);
 
 /* Language-specific data structures */
 
-/* In F90 subrange expression, either bound could be empty, indicating that
-   its value is by default that of the corresponding bound of the array or
-   string.  So we have four sorts of subrange in F90.  This enumeration type
-   is to identify this.  */
-   
-enum f90_range_type
-  {
-    BOTH_BOUND_DEFAULT,		/* "(:)"  */
-    LOW_BOUND_DEFAULT,		/* "(:high)"  */
-    HIGH_BOUND_DEFAULT,		/* "(low:)"  */
-    NONE_BOUND_DEFAULT		/* "(low:high)"  */
-  };
-
 /* A common block.  */
 
 struct common_block
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fork-child.c ./gdb/fork-child.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/fork-child.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/fork-child.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Fork a Unix child process, and set up to debug it, for GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -31,7 +31,8 @@
 #include "gdbcmd.h"
 #include "solib.h"
 #include "filestuff.h"
-
+#include "top.h"
+#include "signals-state-save-restore.h"
 #include <signal.h>
 
 /* This just gets used as a default if we can't find SHELL.  */
@@ -108,6 +109,31 @@ escape_bang_in_quoted_argument (const ch
   return 0;
 }
 
+/* See inferior.h.  */
+
+void
+trace_start_error (const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start (ap, fmt);
+  fprintf_unfiltered (gdb_stderr, "Could not trace the inferior "
+		                  "process.\nError: ");
+  vfprintf_unfiltered (gdb_stderr, fmt, ap);
+  va_end (ap);
+
+  gdb_flush (gdb_stderr);
+  _exit (0177);
+}
+
+/* See inferior.h.  */
+
+void
+trace_start_error_with_name (const char *string)
+{
+  trace_start_error ("%s: %s", string, safe_strerror (errno));
+}
+
 /* Start an inferior Unix child process and sets inferior_ptid to its
    pid.  EXEC_FILE is the file to run.  ALLARGS is a string containing
    the arguments to the program.  ENV is the environment vector to
@@ -141,6 +167,7 @@ fork_inferior (char *exec_file_arg, char
   struct inferior *inf;
   int i;
   int save_errno;
+  struct ui *save_ui;
 
   /* If no exec file handed to us, get it from the exec-file command
      -- with a good, common error message if none is specified.  */
@@ -170,7 +197,7 @@ fork_inferior (char *exec_file_arg, char
 	 argument.  */
       int argc = (strlen (allargs) + 1) / 2 + 2;
 
-      argv = (char **) alloca (argc * sizeof (*argv));
+      argv = XALLOCAVEC (char *, argc);
       argv[0] = exec_file;
       breakup_args (allargs, &argv[1]);
     }
@@ -275,6 +302,9 @@ fork_inferior (char *exec_file_arg, char
      restore it.  */
   save_our_env = environ;
 
+  /* Likewise the current UI.  */
+  save_ui = current_ui;
+
   /* Tell the terminal handling subsystem what tty we plan to run on;
      it will just record the information for later.  */
   new_tty_prefork (inferior_io_terminal);
@@ -282,8 +312,8 @@ fork_inferior (char *exec_file_arg, char
   /* It is generally good practice to flush any possible pending stdio
      output prior to doing a fork, to avoid the possibility of both
      the parent and child flushing the same data after the fork.  */
-  gdb_flush (gdb_stdout);
-  gdb_flush (gdb_stderr);
+  gdb_flush (main_ui->m_gdb_stdout);
+  gdb_flush (main_ui->m_gdb_stderr);
 
   /* If there's any initialization of the target layers that must
      happen to prepare to handle the child we're about fork, do it
@@ -312,6 +342,16 @@ fork_inferior (char *exec_file_arg, char
 
   if (pid == 0)
     {
+      /* Switch to the main UI, so that gdb_std{in/out/err} in the
+	 child are mapped to std{in/out/err}.  This makes it possible
+	 to use fprintf_unfiltered/warning/error/etc. in the child
+	 from here on.  */
+      current_ui = main_ui;
+
+      /* Close all file descriptors except those that gdb inherited
+	 (usually 0/1/2), so they don't leak to the inferior.  Note
+	 that this closes the file descriptors of all secondary
+	 UIs.  */
       close_most_fds ();
 
       if (debug_fork)
@@ -351,6 +391,8 @@ fork_inferior (char *exec_file_arg, char
         saying "not parent".  Sorry; you'll have to use print
         statements!  */
 
+      restore_original_signals_state ();
+
       /* There is no execlpe call, so we have to set the environment
          for our child in the global variable.  If we've vforked, this
          clobbers the parent, but environ is restored a few lines down
@@ -365,7 +407,7 @@ fork_inferior (char *exec_file_arg, char
 
       /* If we get here, it's an error.  */
       save_errno = errno;
-      fprintf_unfiltered (gdb_stderr, "Cannot exec %s", exec_file);
+      fprintf_unfiltered (gdb_stderr, "Cannot exec %s", argv[0]);
       for (i = 1; argv[i] != NULL; i++)
 	fprintf_unfiltered (gdb_stderr, " %s", argv[i]);
       fprintf_unfiltered (gdb_stderr, ".\n");
@@ -378,6 +420,9 @@ fork_inferior (char *exec_file_arg, char
   /* Restore our environment in case a vforked child clob'd it.  */
   environ = save_our_env;
 
+  /* Likewise the current UI.  */
+  current_ui = save_ui;
+
   if (!have_inferiors ())
     init_thread_list ();
 
@@ -462,7 +507,7 @@ startup_inferior (int ntraps)
 
 	  case TARGET_WAITKIND_SIGNALLED:
 	    target_terminal_ours ();
-	    target_mourn_inferior ();
+	    target_mourn_inferior (event_ptid);
 	    error (_("During startup program terminated with signal %s, %s."),
 		   gdb_signal_to_name (ws.value.sig),
 		   gdb_signal_to_string (ws.value.sig));
@@ -470,7 +515,7 @@ startup_inferior (int ntraps)
 
 	  case TARGET_WAITKIND_EXITED:
 	    target_terminal_ours ();
-	    target_mourn_inferior ();
+	    target_mourn_inferior (event_ptid);
 	    if (ws.value.integer)
 	      error (_("During startup program exited with code %d."),
 		     ws.value.integer);
@@ -494,7 +539,7 @@ startup_inferior (int ntraps)
       if (resume_signal != GDB_SIGNAL_TRAP)
 	{
 	  /* Let shell child handle its own signals in its own way.  */
-	  target_resume (resume_ptid, 0, resume_signal);
+	  target_continue (resume_ptid, resume_signal);
 	}
       else
 	{
@@ -520,7 +565,7 @@ startup_inferior (int ntraps)
 	    break;
 
 	  /* Just make it go on.  */
-	  target_resume (resume_ptid, 0, GDB_SIGNAL_0);
+	  target_continue_no_signal (resume_ptid);
 	}
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-base.c ./gdb/frame-base.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-base.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame-base.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for frame address handler, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -82,7 +82,8 @@ void
 frame_base_append_sniffer (struct gdbarch *gdbarch,
 			   frame_base_sniffer_ftype *sniffer)
 {
-  struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+  struct frame_base_table *table
+    = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
 
   (*table->tail)
     = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
@@ -94,7 +95,8 @@ void
 frame_base_set_default (struct gdbarch *gdbarch,
 			const struct frame_base *default_base)
 {
-  struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+  struct frame_base_table *table
+    = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
 
   table->default_base = default_base;
 }
@@ -103,7 +105,8 @@ const struct frame_base *
 frame_base_find_by_frame (struct frame_info *this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+  struct frame_base_table *table
+    = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
   struct frame_base_table_entry *entry;
 
   for (entry = table->head; entry != NULL; entry = entry->next)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-base.h ./gdb/frame-base.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-base.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame-base.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for a frame base, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame.c ./gdb/frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cache and manage frames for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,6 +43,15 @@
 #include "hashtab.h"
 #include "valprint.h"
 
+/* The sentinel frame terminates the innermost end of the frame chain.
+   If unwound, it returns the information needed to construct an
+   innermost frame.
+
+   The current frame, which is the innermost frame, can be found at
+   sentinel_frame->prev.  */
+
+static struct frame_info *sentinel_frame;
+
 static struct frame_info *get_prev_frame_raw (struct frame_info *this_frame);
 static const char *frame_stop_reason_symbol_string (enum unwind_stop_reason reason);
 
@@ -65,7 +74,7 @@ enum cached_copy_status
 
 /* We keep a cache of stack frames, each of which is a "struct
    frame_info".  The innermost one gets allocated (in
-   wait_for_inferior) each time the inferior stops; current_frame
+   wait_for_inferior) each time the inferior stops; sentinel_frame
    points to it.  Additional frames get allocated (in get_prev_frame)
    as needed, and are chained through the next and prev fields.  Any
    time that the frame cache becomes invalid (most notably when we
@@ -162,7 +171,7 @@ static htab_t frame_stash;
 static hashval_t
 frame_addr_hash (const void *ap)
 {
-  const struct frame_info *frame = ap;
+  const struct frame_info *frame = (const struct frame_info *) ap;
   const struct frame_id f_id = frame->this_id.value;
   hashval_t hash = 0;
 
@@ -189,8 +198,8 @@ frame_addr_hash (const void *ap)
 static int
 frame_addr_hash_eq (const void *a, const void *b)
 {
-  const struct frame_info *f_entry = a;
-  const struct frame_info *f_element = b;
+  const struct frame_info *f_entry = (const struct frame_info *) a;
+  const struct frame_info *f_element = (const struct frame_info *) b;
 
   return frame_id_eq (f_entry->this_id.value,
 		      f_element->this_id.value);
@@ -246,7 +255,7 @@ frame_stash_find (struct frame_id id)
   struct frame_info *frame;
 
   dummy.this_id.value = id;
-  frame = htab_find (frame_stash, &dummy);
+  frame = (struct frame_info *) htab_find (frame_stash, &dummy);
   return frame;
 }
 
@@ -323,6 +332,8 @@ fprint_frame_id (struct ui_file *file, s
     fprintf_unfiltered (file, "!stack");
   else if (id.stack_status == FID_STACK_UNAVAILABLE)
     fprintf_unfiltered (file, "stack=<unavailable>");
+  else if (id.stack_status == FID_STACK_SENTINEL)
+    fprintf_unfiltered (file, "stack=<sentinel>");
   else
     fprintf_unfiltered (file, "stack=%s", hex_string (id.stack_addr));
   fprintf_unfiltered (file, ",");
@@ -420,7 +431,8 @@ fprint_frame (struct ui_file *file, stru
 
 /* Given FRAME, return the enclosing frame as found in real frames read-in from
    inferior memory.  Skip any previous frames which were made up by GDB.
-   Return the original frame if no immediate previous frames exist.  */
+   Return FRAME if FRAME is a non-artificial frame.
+   Return NULL if FRAME is the start of an artificial-only chain.  */
 
 static struct frame_info *
 skip_artificial_frames (struct frame_info *frame)
@@ -428,12 +440,47 @@ skip_artificial_frames (struct frame_inf
   /* Note we use get_prev_frame_always, and not get_prev_frame.  The
      latter will truncate the frame chain, leading to this function
      unintentionally returning a null_frame_id (e.g., when the user
-     sets a backtrace limit).  This is safe, because as these frames
-     are made up by GDB, there must be a real frame in the chain
-     below.  */
+     sets a backtrace limit).
+
+     Note that for record targets we may get a frame chain that consists
+     of artificial frames only.  */
   while (get_frame_type (frame) == INLINE_FRAME
 	 || get_frame_type (frame) == TAILCALL_FRAME)
-    frame = get_prev_frame_always (frame);
+    {
+      frame = get_prev_frame_always (frame);
+      if (frame == NULL)
+	break;
+    }
+
+  return frame;
+}
+
+struct frame_info *
+skip_unwritable_frames (struct frame_info *frame)
+{
+  while (gdbarch_code_of_frame_writable (get_frame_arch (frame), frame) == 0)
+    {
+      frame = get_prev_frame (frame);
+      if (frame == NULL)
+	break;
+    }
+
+  return frame;
+}
+
+/* See frame.h.  */
+
+struct frame_info *
+skip_tailcall_frames (struct frame_info *frame)
+{
+  while (get_frame_type (frame) == TAILCALL_FRAME)
+    {
+      /* Note that for record targets we may get a frame chain that consists of
+	 tailcall frames only.  */
+      frame = get_prev_frame (frame);
+      if (frame == NULL)
+	break;
+    }
 
   return frame;
 }
@@ -475,7 +522,26 @@ get_frame_id (struct frame_info *fi)
   if (fi == NULL)
     return null_frame_id;
 
-  gdb_assert (fi->this_id.p);
+  if (!fi->this_id.p)
+    {
+      int stashed;
+
+      /* If we haven't computed the frame id yet, then it must be that
+	 this is the current frame.  Compute it now, and stash the
+	 result.  The IDs of other frames are computed as soon as
+	 they're created, in order to detect cycles.  See
+	 get_prev_frame_if_no_cycle.  */
+      gdb_assert (fi->level == 0);
+
+      /* Compute.  */
+      compute_frame_id (fi);
+
+      /* Since this is the first frame in the chain, this should
+	 always succeed.  */
+      stashed = frame_stash_add (fi);
+      gdb_assert (stashed);
+    }
+
   return fi->this_id.value;
 }
 
@@ -496,6 +562,9 @@ frame_unwind_caller_id (struct frame_inf
      requests the frame ID of "main()"s caller.  */
 
   next_frame = skip_artificial_frames (next_frame);
+  if (next_frame == NULL)
+    return null_frame_id;
+
   this_frame = get_prev_frame_always (next_frame);
   if (this_frame)
     return get_frame_id (skip_artificial_frames (this_frame));
@@ -503,7 +572,8 @@ frame_unwind_caller_id (struct frame_inf
     return null_frame_id;
 }
 
-const struct frame_id null_frame_id; /* All zeros.  */
+const struct frame_id null_frame_id = { 0 }; /* All zeros.  */
+const struct frame_id sentinel_frame_id = { 0, 0, 0, FID_STACK_SENTINEL, 0, 1, 0 };
 const struct frame_id outer_frame_id = { 0, 0, 0, FID_STACK_INVALID, 0, 1, 0 };
 
 struct frame_id
@@ -739,6 +809,10 @@ frame_find_by_id (struct frame_id id)
   if (!frame_id_p (id))
     return NULL;
 
+  /* Check for the sentinel frame.  */
+  if (frame_id_eq (id, sentinel_frame_id))
+    return sentinel_frame;
+
   /* Try using the frame stash first.  Finding it there removes the need
      to perform the search by looping over all frames, which can be very
      CPU-intensive if the number of frames is very high (the loop is O(n)
@@ -869,7 +943,14 @@ frame_unwind_pc (struct frame_info *this
 CORE_ADDR
 frame_unwind_caller_pc (struct frame_info *this_frame)
 {
-  return frame_unwind_pc (skip_artificial_frames (this_frame));
+  this_frame = skip_artificial_frames (this_frame);
+
+  /* We must have a non-artificial frame.  The caller is supposed to check
+     the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID
+     in this case.  */
+  gdb_assert (this_frame != NULL);
+
+  return frame_unwind_pc (this_frame);
 }
 
 int
@@ -930,7 +1011,7 @@ get_frame_func (struct frame_info *this_
 static enum register_status
 do_frame_register_read (void *src, int regnum, gdb_byte *buf)
 {
-  if (!deprecated_frame_register_read (src, regnum, buf))
+  if (!deprecated_frame_register_read ((struct frame_info *) src, regnum, buf))
     return REG_UNAVAILABLE;
   else
     return REG_VALID;
@@ -972,8 +1053,10 @@ frame_pop (struct frame_info *this_frame
 
   /* Ignore TAILCALL_FRAME type frames, they were executed already before
      entering THISFRAME.  */
-  while (get_frame_type (prev_frame) == TAILCALL_FRAME)
-    prev_frame = get_prev_frame (prev_frame);
+  prev_frame = skip_tailcall_frames (prev_frame);
+
+  if (prev_frame == NULL)
+    error (_("Cannot find the caller frame."));
 
   /* Make a copy of all the register values unwound from this frame.
      Save them in a scratch buffer so that there isn't a race between
@@ -1024,7 +1107,10 @@ frame_register_unwind (struct frame_info
   *unavailablep = !value_entirely_available (value);
   *lvalp = VALUE_LVAL (value);
   *addrp = value_address (value);
-  *realnump = VALUE_REGNUM (value);
+  if (*lvalp == lval_register)
+    *realnump = VALUE_REGNUM (value);
+  else
+    *realnump = -1;
 
   if (bufferp)
     {
@@ -1407,10 +1493,9 @@ create_sentinel_frame (struct program_sp
   /* Link this frame back to itself.  The frame is self referential
      (the unwound PC is the same as the pc), so make it so.  */
   frame->next = frame;
-  /* Make the sentinel frame's ID valid, but invalid.  That way all
-     comparisons with it should fail.  */
+  /* The sentinel frame has a special ID.  */
   frame->this_id.p = 1;
-  frame->this_id.value = null_frame_id;
+  frame->this_id.value = sentinel_frame_id;
   if (frame_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "{ create_sentinel_frame (...) -> ");
@@ -1420,10 +1505,6 @@ create_sentinel_frame (struct program_sp
   return frame;
 }
 
-/* Info about the innermost stack frame (contents of FP register).  */
-
-static struct frame_info *current_frame;
-
 /* Cache for frame addresses already read by gdb.  Valid only while
    inferior is stopped.  Control variables for the frame cache should
    be local to this module.  */
@@ -1439,27 +1520,13 @@ frame_obstack_zalloc (unsigned long size
   return data;
 }
 
-/* Return the innermost (currently executing) stack frame.  This is
-   split into two functions.  The function unwind_to_current_frame()
-   is wrapped in catch exceptions so that, even when the unwind of the
-   sentinel frame fails, the function still returns a stack frame.  */
-
-static int
-unwind_to_current_frame (struct ui_out *ui_out, void *args)
-{
-  struct frame_info *frame = get_prev_frame (args);
-
-  /* A sentinel frame can fail to unwind, e.g., because its PC value
-     lands in somewhere like start.  */
-  if (frame == NULL)
-    return 1;
-  current_frame = frame;
-  return 0;
-}
+static struct frame_info *get_prev_frame_always_1 (struct frame_info *this_frame);
 
 struct frame_info *
 get_current_frame (void)
 {
+  struct frame_info *current_frame;
+
   /* First check, and report, the lack of registers.  Having GDB
      report "No stack!" or "No memory" when the target doesn't even
      have registers is very confusing.  Besides, "printcmd.exp"
@@ -1473,27 +1540,26 @@ get_current_frame (void)
     error (_("No memory."));
   /* Traceframes are effectively a substitute for the live inferior.  */
   if (get_traceframe_number () < 0)
-    {
-      if (ptid_equal (inferior_ptid, null_ptid))
-	error (_("No selected thread."));
-      if (is_exited (inferior_ptid))
-	error (_("Invalid selected thread."));
-      if (is_executing (inferior_ptid))
-	error (_("Target is executing."));
-    }
+    validate_registers_access ();
+
+  if (sentinel_frame == NULL)
+    sentinel_frame =
+      create_sentinel_frame (current_program_space, get_current_regcache ());
+
+  /* Set the current frame before computing the frame id, to avoid
+     recursion inside compute_frame_id, in case the frame's
+     unwinder decides to do a symbol lookup (which depends on the
+     selected frame's block).
+
+     This call must always succeed.  In particular, nothing inside
+     get_prev_frame_always_1 should try to unwind from the
+     sentinel frame, because that could fail/throw, and we always
+     want to leave with the current frame created and linked in --
+     we should never end up with the sentinel frame as outermost
+     frame.  */
+  current_frame = get_prev_frame_always_1 (sentinel_frame);
+  gdb_assert (current_frame != NULL);
 
-  if (current_frame == NULL)
-    {
-      struct frame_info *sentinel_frame =
-	create_sentinel_frame (current_program_space, get_current_regcache ());
-      if (catch_exceptions (current_uiout, unwind_to_current_frame,
-			    sentinel_frame, RETURN_MASK_ERROR) != 0)
-	{
-	  /* Oops! Fake a current frame?  Is this useful?  It has a PC
-             of zero, for instance.  */
-	  current_frame = sentinel_frame;
-	}
-    }
   return current_frame;
 }
 
@@ -1673,6 +1739,25 @@ get_next_frame (struct frame_info *this_
     return NULL;
 }
 
+/* Return the frame that THIS_FRAME calls.  If THIS_FRAME is the
+   innermost (i.e. current) frame, return the sentinel frame.  Thus,
+   unlike get_next_frame(), NULL will never be returned.  */
+
+struct frame_info *
+get_next_frame_sentinel_okay (struct frame_info *this_frame)
+{
+  gdb_assert (this_frame != NULL);
+
+  /* Note that, due to the manner in which the sentinel frame is
+     constructed, this_frame->next still works even when this_frame
+     is the sentinel frame.  But we disallow it here anyway because
+     calling get_next_frame_sentinel_okay() on the sentinel frame
+     is likely a coding error.  */
+  gdb_assert (this_frame != sentinel_frame);
+
+  return this_frame->next;
+}
+
 /* Observer for the target_changed event.  */
 
 static void
@@ -1689,7 +1774,7 @@ reinit_frame_cache (void)
   struct frame_info *fi;
 
   /* Tear down all frame caches.  */
-  for (fi = current_frame; fi != NULL; fi = fi->prev)
+  for (fi = sentinel_frame; fi != NULL; fi = fi->prev)
     {
       if (fi->prologue_cache && fi->unwind->dealloc_cache)
 	fi->unwind->dealloc_cache (fi, fi->prologue_cache);
@@ -1701,10 +1786,10 @@ reinit_frame_cache (void)
   obstack_free (&frame_cache_obstack, 0);
   obstack_init (&frame_cache_obstack);
 
-  if (current_frame != NULL)
+  if (sentinel_frame != NULL)
     annotate_frames_invalid ();
 
-  current_frame = NULL;		/* Invalidate cache */
+  sentinel_frame = NULL;		/* Invalidate cache */
   select_frame (NULL);
   frame_stash_invalidate ();
   if (frame_debug)
@@ -1771,8 +1856,18 @@ get_prev_frame_if_no_cycle (struct frame
   struct cleanup *prev_frame_cleanup;
 
   prev_frame = get_prev_frame_raw (this_frame);
-  if (prev_frame == NULL)
-    return NULL;
+
+  /* Don't compute the frame id of the current frame yet.  Unwinding
+     the sentinel frame can fail (e.g., if the thread is gone and we
+     can't thus read its registers).  If we let the cycle detection
+     code below try to compute a frame ID, then an error thrown from
+     within the frame ID computation would result in the sentinel
+     frame as outermost frame, which is bogus.  Instead, we'll compute
+     the current frame's ID lazily in get_frame_id.  Note that there's
+     no point in doing cycle detection when there's only one frame, so
+     nothing is lost here.  */
+  if (prev_frame->level == 0)
+    return prev_frame;
 
   /* The cleanup will remove the previous frame that get_prev_frame_raw
      linked onto THIS_FRAME.  */
@@ -1985,7 +2080,7 @@ get_prev_frame_always (struct frame_info
 	         pointer to the frame, this allows the STOP_STRING on the
 	         frame to be of type 'const char *'.  */
 	      size = strlen (ex.message) + 1;
-	      stop_string = frame_obstack_zalloc (size);
+	      stop_string = (char *) frame_obstack_zalloc (size);
 	      memcpy (stop_string, ex.message, size);
 	      this_frame->stop_string = stop_string;
 	    }
@@ -2128,6 +2223,17 @@ get_prev_frame (struct frame_info *this_
      something should be calling get_selected_frame() or
      get_current_frame().  */
   gdb_assert (this_frame != NULL);
+  
+  /* If this_frame is the current frame, then compute and stash
+     its frame id prior to fetching and computing the frame id of the
+     previous frame.  Otherwise, the cycle detection code in
+     get_prev_frame_if_no_cycle() will not work correctly.  When
+     get_frame_id() is called later on, an assertion error will
+     be triggered in the event of a cycle between the current
+     frame and its previous frame.  */
+  if (this_frame->level == 0)
+    get_frame_id (this_frame);
+
   frame_pc_p = get_frame_pc_if_available (this_frame, &frame_pc);
 
   /* tausq/2004-12-07: Dummy frames are skipped because it doesn't make much
@@ -2213,6 +2319,22 @@ get_prev_frame (struct frame_info *this_
   return get_prev_frame_always (this_frame);
 }
 
+struct frame_id
+get_prev_frame_id_by_id (struct frame_id id)
+{
+  struct frame_id prev_id;
+  struct frame_info *frame;
+  
+  frame = frame_find_by_id (id);
+
+  if (frame != NULL)
+    prev_id = get_frame_id (get_prev_frame (frame));
+  else
+    prev_id = null_frame_id;
+
+  return prev_id;
+}
+
 CORE_ADDR
 get_frame_pc (struct frame_info *frame)
 {
@@ -2568,7 +2690,56 @@ frame_unwind_arch (struct frame_info *ne
 struct gdbarch *
 frame_unwind_caller_arch (struct frame_info *next_frame)
 {
-  return frame_unwind_arch (skip_artificial_frames (next_frame));
+  next_frame = skip_artificial_frames (next_frame);
+
+  /* We must have a non-artificial frame.  The caller is supposed to check
+     the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID
+     in this case.  */
+  gdb_assert (next_frame != NULL);
+
+  return frame_unwind_arch (next_frame);
+}
+
+/* Gets the language of FRAME.  */
+
+enum language
+get_frame_language (struct frame_info *frame)
+{
+  CORE_ADDR pc = 0;
+  int pc_p = 0;
+
+  gdb_assert (frame!= NULL);
+
+    /* We determine the current frame language by looking up its
+       associated symtab.  To retrieve this symtab, we use the frame
+       PC.  However we cannot use the frame PC as is, because it
+       usually points to the instruction following the "call", which
+       is sometimes the first instruction of another function.  So
+       we rely on get_frame_address_in_block(), it provides us with
+       a PC that is guaranteed to be inside the frame's code
+       block.  */
+
+  TRY
+    {
+      pc = get_frame_address_in_block (frame);
+      pc_p = 1;
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error != NOT_AVAILABLE_ERROR)
+	throw_exception (ex);
+    }
+  END_CATCH
+
+  if (pc_p)
+    {
+      struct compunit_symtab *cust = find_pc_compunit_symtab (pc);
+
+      if (cust != NULL)
+	return compunit_language (cust);
+    }
+
+  return language_unknown;
 }
 
 /* Stack pointer methods.  */
@@ -2661,7 +2832,7 @@ frame_stop_reason_symbol_string (enum un
 static void
 frame_cleanup_after_sniffer (void *arg)
 {
-  struct frame_info *frame = arg;
+  struct frame_info *frame = (struct frame_info *) arg;
 
   /* The sniffer should not allocate a prologue cache if it did not
      match this frame.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame.h ./gdb/frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for dealing with stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -69,12 +69,15 @@
 
    */
 
+#include "language.h"
+
 struct symtab_and_line;
 struct frame_unwind;
 struct frame_base;
 struct block;
 struct gdbarch;
 struct ui_file;
+struct ui_out;
 
 /* Status of a given frame's stack.  */
 
@@ -87,6 +90,9 @@ enum frame_id_stack_status
   /* Stack address is valid, and is found in the stack_addr field.  */
   FID_STACK_VALID = 1,
 
+  /* Sentinel frame.  */
+  FID_STACK_SENTINEL = 2,
+
   /* Stack address is unavailable.  I.e., there's a valid stack, but
      we don't know where it is (because memory or registers we'd
      compute it from were not collected).  */
@@ -147,7 +153,7 @@ struct frame_id
   CORE_ADDR special_addr;
 
   /* Flags to indicate the above fields have valid contents.  */
-  ENUM_BITFIELD(frame_id_stack_status) stack_status : 2;
+  ENUM_BITFIELD(frame_id_stack_status) stack_status : 3;
   unsigned int code_addr_p : 1;
   unsigned int special_addr_p : 1;
 
@@ -163,6 +169,9 @@ struct frame_id
 /* For convenience.  All fields are zero.  This means "there is no frame".  */
 extern const struct frame_id null_frame_id;
 
+/* Sentinel frame.  */
+extern const struct frame_id sentinel_frame_id;
+
 /* This means "there is no frame ID, but there is a frame".  It should be
    replaced by best-effort frame IDs for the outermost frame, somehow.
    The implementation is only special_addr_p set.  */
@@ -307,6 +316,10 @@ extern void select_frame (struct frame_i
 extern struct frame_info *get_prev_frame (struct frame_info *);
 extern struct frame_info *get_next_frame (struct frame_info *);
 
+/* Like get_next_frame(), but allows return of the sentinel frame.  NULL
+   is never returned.  */
+extern struct frame_info *get_next_frame_sentinel_okay (struct frame_info *);
+
 /* Return a "struct frame_info" corresponding to the frame that called
    THIS_FRAME.  Returns NULL if there is no such frame.
 
@@ -318,6 +331,10 @@ extern struct frame_info *get_prev_frame
    is not found.  */
 extern struct frame_info *frame_find_by_id (struct frame_id id);
 
+/* Given a frame's ID, find the previous frame's ID.  Returns null_frame_id
+   if the frame is not found.  */
+extern struct frame_id get_prev_frame_id_by_id (struct frame_id id);
+
 /* Base attributes of a frame: */
 
 /* The frame's `resume' address.  Where the program will resume in
@@ -702,6 +719,14 @@ extern CORE_ADDR get_pc_function_start (
 
 extern struct frame_info *find_relative_frame (struct frame_info *, int *);
 
+/* Wrapper over print_stack_frame modifying current_uiout with UIOUT for
+   the function call.  */
+
+extern void print_stack_frame_to_uiout (struct ui_out *uiout,
+					struct frame_info *, int print_level,
+					enum print_what print_what,
+					int set_current_sal);
+
 extern void print_stack_frame (struct frame_info *, int print_level,
 			       enum print_what print_what,
 			       int set_current_sal);
@@ -814,4 +839,19 @@ extern struct frame_info *create_new_fra
 extern int frame_unwinder_is (struct frame_info *fi,
 			      const struct frame_unwind *unwinder);
 
+/* Return the language of FRAME.  */
+
+extern enum language get_frame_language (struct frame_info *frame);
+
+/* Return the first non-tailcall frame above FRAME or FRAME if it is not a
+   tailcall frame.  Return NULL if FRAME is the start of a tailcall-only
+   chain.  */
+
+extern struct frame_info *skip_tailcall_frames (struct frame_info *frame);
+
+/* Return the first frame above FRAME or FRAME of which the code is
+   writable.  */
+
+extern struct frame_info *skip_unwritable_frames (struct frame_info *frame);
+
 #endif /* !defined (FRAME_H)  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-unwind.c ./gdb/frame-unwind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-unwind.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame-unwind.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for frame unwinder, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,7 +64,8 @@ void
 frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
 				const struct frame_unwind *unwinder)
 {
-  struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+  struct frame_unwind_table *table
+    = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
   struct frame_unwind_table_entry *entry;
 
   /* Insert the new entry at the start of the list.  */
@@ -78,7 +79,8 @@ void
 frame_unwind_append_unwinder (struct gdbarch *gdbarch,
 			      const struct frame_unwind *unwinder)
 {
-  struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+  struct frame_unwind_table *table
+    = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
   struct frame_unwind_table_entry **ip;
 
   /* Find the end of the list and insert the new entry there.  */
@@ -140,7 +142,8 @@ void
 frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+  struct frame_unwind_table *table
+    = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
   struct frame_unwind_table_entry *entry;
   const struct frame_unwind *unwinder_from_target;
 
@@ -207,7 +210,8 @@ frame_unwind_got_optimized (struct frame
   mark_value_bytes_optimized_out (val, 0, TYPE_LENGTH (type));
   VALUE_LVAL (val) = lval_register;
   VALUE_REGNUM (val) = regnum;
-  VALUE_FRAME_ID (val) = get_frame_id (frame);
+  VALUE_NEXT_FRAME_ID (val)
+    = get_frame_id (get_next_frame_sentinel_okay (frame));
   return val;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-unwind.h ./gdb/frame-unwind.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frame-unwind.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frame-unwind.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for a frame unwinder, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-linux-tdep.c ./gdb/frv-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frv-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for GNU/Linux running on the Fujitsu FR-V,
    for GDB.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -261,7 +261,6 @@ frv_linux_sigtramp_frame_cache (struct f
 				void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct trad_frame_cache *cache;
   CORE_ADDR addr;
@@ -271,7 +270,7 @@ frv_linux_sigtramp_frame_cache (struct f
   struct frame_id this_id;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
 
   cache = trad_frame_cache_zalloc (this_frame);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-tdep.c ./gdb/frv-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frv-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -136,9 +136,8 @@ new_variant (void)
   struct gdbarch_tdep *var;
   int r;
 
-  var = xmalloc (sizeof (*var));
-  memset (var, 0, sizeof (*var));
-  
+  var = XCNEW (struct gdbarch_tdep);
+
   var->frv_abi = FRV_ABI_EABI;
   var->num_gprs = 64;
   var->num_fprs = 64;
@@ -425,13 +424,9 @@ frv_register_sim_regno (struct gdbarch *
   internal_error (__FILE__, __LINE__, _("Bad register number %d"), reg);
 }
 
-static const unsigned char *
-frv_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenp)
-{
-  static unsigned char breakpoint[] = {0xc0, 0x70, 0x00, 0x01};
-  *lenp = sizeof (breakpoint);
-  return breakpoint;
-}
+constexpr gdb_byte frv_break_insn[] = {0xc0, 0x70, 0x00, 0x01};
+
+typedef BP_MANIPULATION (frv_break_insn) frv_breakpoint;
 
 /* Define the maximum number of instructions which may be packed into a
    bundle (VLIW instruction).  */
@@ -1100,7 +1095,7 @@ frv_frame_unwind_cache (struct frame_inf
   struct frv_unwind_cache *info;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct frv_unwind_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct frv_unwind_cache);
   (*this_prologue_cache) = info;
@@ -1482,6 +1477,7 @@ frv_gdbarch_init (struct gdbarch_info in
     {
     case bfd_mach_frv:
     case bfd_mach_frvsimple:
+    case bfd_mach_fr300:
     case bfd_mach_fr500:
     case bfd_mach_frvtomcat:
     case bfd_mach_fr550:
@@ -1537,7 +1533,8 @@ frv_gdbarch_init (struct gdbarch_info in
 
   set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
   set_gdbarch_skip_main_prologue (gdbarch, frv_skip_main_prologue);
-  set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, frv_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, frv_breakpoint::bp_from_kind);
   set_gdbarch_adjust_breakpoint_address
     (gdbarch, frv_adjust_breakpoint_address);
 
@@ -1563,6 +1560,7 @@ frv_gdbarch_init (struct gdbarch_info in
     {
     case bfd_mach_frv:
     case bfd_mach_frvsimple:
+    case bfd_mach_fr300:
     case bfd_mach_fr500:
     case bfd_mach_frvtomcat:
       /* fr500-style hardware debugging support.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-tdep.h ./gdb/frv-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/frv-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/frv-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ft32-tdep.c ./gdb/ft32-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ft32-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ft32-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for FT32.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,8 +37,11 @@
 #include "dis-asm.h"
 #include "record.h"
 
+#include "opcode/ft32.h"
+
 #include "ft32-tdep.h"
 #include "gdb/sim-ft32.h"
+#include <algorithm>
 
 #define RAM_BIAS  0x800000  /* Bias added to RAM addresses.  */
 
@@ -75,17 +78,10 @@ ft32_frame_align (struct gdbarch *gdbarc
   return sp & ~1;
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
 
-static const unsigned char *
-ft32_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
-{
-  static const gdb_byte breakpoint[] = { 0x02, 0x00, 0x34, 0x00 };
+constexpr gdb_byte ft32_break_insn[] = { 0x02, 0x00, 0x34, 0x00 };
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+typedef BP_MANIPULATION (ft32_break_insn) ft32_breakpoint;
 
 /* FT32 register names.  */
 
@@ -117,7 +113,7 @@ static struct type *
 ft32_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   if (reg_nr == FT32_PC_REGNUM)
-    return builtin_type (gdbarch)->builtin_func_ptr;
+    return gdbarch_tdep (gdbarch)->pc_type;
   else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
     return builtin_type (gdbarch)->builtin_data_ptr;
   else
@@ -153,11 +149,6 @@ ft32_store_return_value (struct type *ty
 
    Returns the address of the first instruction after the prologue.  */
 
-#define IS_PUSH(inst)   (((inst) & 0xfff00000) == 0x84000000)
-#define PUSH_REG(inst)  (FT32_R0_REGNUM + (((inst) >> 15) & 0x1f))
-#define IS_LINK(inst)   (((inst) & 0xffff0000) == 0x95d00000)
-#define LINK_SIZE(inst) ((inst) & 0xffff)
-
 static CORE_ADDR
 ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
 		       struct ft32_frame_cache *cache,
@@ -165,35 +156,77 @@ ft32_analyze_prologue (CORE_ADDR start_a
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR next_addr;
-  ULONGEST inst, inst2;
-  LONGEST offset;
-  int regnum;
+  ULONGEST inst;
+  int regnum, pushreg;
+  struct bound_minimal_symbol msymbol;
+  const int first_saved_reg = 13;	/* The first saved register.  */
+  /* PROLOGS are addresses of the subroutine prologs, PROLOGS[n]
+     is the address of __prolog_$rN.
+     __prolog_$rN pushes registers from 13 through n inclusive.
+     So for example CALL __prolog_$r15 is equivalent to:
+       PUSH $r13 
+       PUSH $r14 
+       PUSH $r15 
+     Note that PROLOGS[0] through PROLOGS[12] are unused.  */
+  CORE_ADDR prologs[32];
 
   cache->saved_regs[FT32_PC_REGNUM] = 0;
   cache->framesize = 0;
 
+  for (regnum = first_saved_reg; regnum < 32; regnum++)
+    {
+      char prolog_symbol[32];
+
+      snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
+		regnum);
+      msymbol = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
+      if (msymbol.minsym)
+	prologs[regnum] = BMSYMBOL_VALUE_ADDRESS (msymbol);
+      else
+	prologs[regnum] = 0;
+    }
+
   if (start_addr >= end_addr)
-      return end_addr;
+    return end_addr;
 
   cache->established = 0;
-  for (next_addr = start_addr; next_addr < end_addr; )
+  for (next_addr = start_addr; next_addr < end_addr;)
     {
       inst = read_memory_unsigned_integer (next_addr, 4, byte_order);
 
-      if (IS_PUSH (inst))
+      if (FT32_IS_PUSH (inst))
 	{
-	  regnum = PUSH_REG (inst);
+	  pushreg = FT32_PUSH_REG (inst);
 	  cache->framesize += 4;
-	  cache->saved_regs[regnum] = cache->framesize;
+	  cache->saved_regs[FT32_R0_REGNUM + pushreg] = cache->framesize;
 	  next_addr += 4;
 	}
+      else if (FT32_IS_CALL (inst))
+	{
+	  for (regnum = first_saved_reg; regnum < 32; regnum++)
+	    {
+	      if ((4 * (inst & 0x3ffff)) == prologs[regnum])
+		{
+		  for (pushreg = first_saved_reg; pushreg <= regnum;
+		       pushreg++)
+		    {
+		      cache->framesize += 4;
+		      cache->saved_regs[FT32_R0_REGNUM + pushreg] =
+			cache->framesize;
+		    }
+		  next_addr += 4;
+		}
+	    }
+	  break;
+	}
       else
 	break;
     }
   for (regnum = FT32_R0_REGNUM; regnum < FT32_PC_REGNUM; regnum++)
     {
       if (cache->saved_regs[regnum] != REG_UNAVAIL)
-	cache->saved_regs[regnum] = cache->framesize - cache->saved_regs[regnum];
+	cache->saved_regs[regnum] =
+	  cache->framesize - cache->saved_regs[regnum];
     }
   cache->saved_regs[FT32_PC_REGNUM] = cache->framesize;
 
@@ -201,7 +234,7 @@ ft32_analyze_prologue (CORE_ADDR start_a
   if (next_addr < end_addr)
     {
       inst = read_memory_unsigned_integer (next_addr, 4, byte_order);
-      if (IS_LINK (inst))
+      if (FT32_IS_LINK (inst))
 	{
 	  cache->established = 1;
 	  for (regnum = FT32_R0_REGNUM; regnum < FT32_PC_REGNUM; regnum++)
@@ -211,7 +244,7 @@ ft32_analyze_prologue (CORE_ADDR start_a
 	    }
 	  cache->saved_regs[FT32_PC_REGNUM] = cache->framesize + 4;
 	  cache->saved_regs[FT32_FP_REGNUM] = 0;
-	  cache->framesize += LINK_SIZE (inst);
+	  cache->framesize += FT32_LINK_SIZE (inst);
 	  next_addr += 4;
 	}
     }
@@ -235,7 +268,7 @@ ft32_skip_prologue (struct gdbarch *gdba
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
       else
 	{
 	  /* Can't determine prologue from the symbol table, need to examine
@@ -250,7 +283,7 @@ ft32_skip_prologue (struct gdbarch *gdba
 	  plg_end = ft32_analyze_prologue (func_addr,
 					   func_end, &cache, gdbarch);
 	  /* Found a function.  */
-	  sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+	  sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
 	  /* Don't use line number debug info for assembly source files.  */
 	  if ((sym != NULL) && SYMBOL_LANGUAGE (sym) != language_asm)
 	    {
@@ -270,6 +303,73 @@ ft32_skip_prologue (struct gdbarch *gdba
   return pc;
 }
 
+/* Implementation of `pointer_to_address' gdbarch method.
+
+   On FT32 address space zero is RAM, address space 1 is flash.
+   RAM appears at address RAM_BIAS, flash at address 0.  */
+
+static CORE_ADDR
+ft32_pointer_to_address (struct gdbarch *gdbarch,
+			 struct type *type, const gdb_byte *buf)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR addr
+    = extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
+
+  if (TYPE_ADDRESS_CLASS_1 (type))
+    return addr;
+  else
+    return addr | RAM_BIAS;
+}
+
+/* Implementation of `address_class_type_flags' gdbarch method.
+
+   This method maps DW_AT_address_class attributes to a
+   type_instance_flag_value.  */
+
+static int
+ft32_address_class_type_flags (int byte_size, int dwarf2_addr_class)
+{
+  /* The value 1 of the DW_AT_address_class attribute corresponds to the
+     __flash__ qualifier, meaning pointer to data in FT32 program memory.
+   */
+  if (dwarf2_addr_class == 1)
+    return TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
+  return 0;
+}
+
+/* Implementation of `address_class_type_flags_to_name' gdbarch method.
+
+   Convert a type_instance_flag_value to an address space qualifier.  */
+
+static const char*
+ft32_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
+{
+  if (type_flags & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1)
+    return "flash";
+  else
+    return NULL;
+}
+
+/* Implementation of `address_class_name_to_type_flags' gdbarch method.
+
+   Convert an address space qualifier to a type_instance_flag_value.  */
+
+static int
+ft32_address_class_name_to_type_flags (struct gdbarch *gdbarch,
+				       const char* name,
+				       int *type_flags_ptr)
+{
+  if (strcmp (name, "flash") == 0)
+    {
+      *type_flags_ptr = TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
 /* Implement the "read_pc" gdbarch method.  */
 
 static CORE_ADDR
@@ -369,7 +469,7 @@ ft32_frame_cache (struct frame_info *thi
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct ft32_frame_cache *) *this_cache;
 
   cache = ft32_alloc_frame_cache ();
   *this_cache = cache;
@@ -488,6 +588,8 @@ ft32_gdbarch_init (struct gdbarch_info i
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
+  struct type *void_type;
+  struct type *func_void_type;
 
   /* If there is already a candidate, use it.  */
   arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -498,6 +600,14 @@ ft32_gdbarch_init (struct gdbarch_info i
   tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
+  /* Create a type for PC.  We can't use builtin types here, as they may not
+     be defined.  */
+  void_type = arch_type (gdbarch, TYPE_CODE_VOID, 1, "void");
+  func_void_type = make_function_type (void_type, NULL);
+  tdep->pc_type = arch_pointer_type (gdbarch, 4 * TARGET_CHAR_BIT, NULL,
+				     func_void_type);
+  TYPE_INSTANCE_FLAGS (tdep->pc_type) |= TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
+
   set_gdbarch_read_pc (gdbarch, ft32_read_pc);
   set_gdbarch_write_pc (gdbarch, ft32_write_pc);
   set_gdbarch_unwind_sp (gdbarch, ft32_unwind_sp);
@@ -510,9 +620,12 @@ ft32_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_return_value (gdbarch, ft32_return_value);
 
+  set_gdbarch_pointer_to_address (gdbarch, ft32_pointer_to_address);
+
   set_gdbarch_skip_prologue (gdbarch, ft32_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, ft32_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, ft32_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, ft32_breakpoint::bp_from_kind);
   set_gdbarch_frame_align (gdbarch, ft32_frame_align);
 
   frame_base_set_default (gdbarch, &ft32_frame_base);
@@ -535,6 +648,12 @@ ft32_gdbarch_init (struct gdbarch_info i
   /* Support simple overlay manager.  */
   set_gdbarch_overlay_update (gdbarch, simple_overlay_update);
 
+  set_gdbarch_address_class_type_flags (gdbarch, ft32_address_class_type_flags);
+  set_gdbarch_address_class_name_to_type_flags
+    (gdbarch, ft32_address_class_name_to_type_flags);
+  set_gdbarch_address_class_type_flags_to_name
+    (gdbarch, ft32_address_class_type_flags_to_name);
+
   return gdbarch;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ft32-tdep.h ./gdb/ft32-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ft32-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ft32-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the FT32.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,8 @@
 
 struct gdbarch_tdep
 {
-  /* gdbarch target dependent data here.  Currently unused for FT32.  */
+  /* Type for a pointer to a function.  Used for the type of PC.  */
+  struct type *pc_type;
 };
 
 #endif /* FT32_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-typeprint.c ./gdb/f-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/f-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Fortran types for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C version by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -30,6 +30,7 @@
 #include "gdbcore.h"
 #include "target.h"
 #include "f-lang.h"
+#include "typeprint.h"
 
 #if 0				/* Currently unused.  */
 static void f_type_print_args (struct type *, struct ui_file *);
@@ -51,7 +52,18 @@ f_print_type (struct type *type, const c
 	      int show, int level, const struct type_print_options *flags)
 {
   enum type_code code;
-  int demangled_args;
+
+  if (type_not_associated (type))
+    {
+      val_print_not_associated (stream);
+      return;
+    }
+
+  if (type_not_allocated (type))
+    {
+      val_print_not_allocated (stream);
+      return;
+    }
 
   f_type_print_base (type, stream, show, level);
   code = TYPE_CODE (type);
@@ -68,12 +80,15 @@ f_print_type (struct type *type, const c
 
   if (varstring != NULL)
     {
+      int demangled_args;
+
       fputs_filtered (varstring, stream);
 
       /* For demangled function names, we have the arglist as part of the name,
          so don't print an additional pair of ()'s.  */
 
-      demangled_args = varstring[strlen (varstring) - 1] == ')'; 
+      demangled_args = (*varstring != '\0'
+			&& varstring[strlen (varstring) - 1] == ')');
       f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
    }
 }
@@ -167,28 +182,35 @@ f_type_print_varspec_suffix (struct type
       if (arrayprint_recurse_level == 1)
 	fprintf_filtered (stream, "(");
 
-      if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
-	f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0,
-				     arrayprint_recurse_level);
-
-      lower_bound = f77_get_lowerbound (type);
-      if (lower_bound != 1)	/* Not the default.  */
-	fprintf_filtered (stream, "%d:", lower_bound);
-
-      /* Make sure that, if we have an assumed size array, we
-         print out a warning and print the upperbound as '*'.  */
-
-      if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
-	fprintf_filtered (stream, "*");
+      if (type_not_associated (type))
+        val_print_not_associated (stream);
+      else if (type_not_allocated (type))
+        val_print_not_allocated (stream);
       else
-	{
-	  upper_bound = f77_get_upperbound (type);
-	  fprintf_filtered (stream, "%d", upper_bound);
-	}
-
-      if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
-	f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0,
-				     arrayprint_recurse_level);
+        {
+          if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
+            f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
+                                        0, 0, arrayprint_recurse_level);
+
+          lower_bound = f77_get_lowerbound (type);
+          if (lower_bound != 1)	/* Not the default.  */
+            fprintf_filtered (stream, "%d:", lower_bound);
+
+          /* Make sure that, if we have an assumed size array, we
+             print out a warning and print the upperbound as '*'.  */
+
+          if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
+            fprintf_filtered (stream, "*");
+          else
+            {
+              upper_bound = f77_get_upperbound (type);
+              fprintf_filtered (stream, "%d", upper_bound);
+            }
+
+          if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
+            f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
+                                        0, 0, arrayprint_recurse_level);
+        }
       if (arrayprint_recurse_level == 1)
 	fprintf_filtered (stream, ")");
       else
@@ -268,12 +290,12 @@ f_type_print_base (struct type *type, st
 
   if ((show <= 0) && (TYPE_NAME (type) != NULL))
     {
-      fputs_filtered (TYPE_NAME (type), stream);
+      fprintfi_filtered (level, stream, "%s", TYPE_NAME (type));
       return;
     }
 
   if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
-    CHECK_TYPEDEF (type);
+    type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -288,12 +310,12 @@ f_type_print_base (struct type *type, st
 
     case TYPE_CODE_PTR:
       fprintf_filtered (stream, "PTR TO -> ( ");
-      f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+      f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
       break;
 
     case TYPE_CODE_REF:
       fprintf_filtered (stream, "REF TO -> ( ");
-      f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+      f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
       break;
 
     case TYPE_CODE_VOID:
@@ -344,19 +366,24 @@ f_type_print_base (struct type *type, st
       else
 	fprintfi_filtered (level, stream, "Type ");
       fputs_filtered (TYPE_TAG_NAME (type), stream);
-      fputs_filtered ("\n", stream);
-      for (index = 0; index < TYPE_NFIELDS (type); index++)
+      /* According to the definition,
+         we only print structure elements in case show > 0.  */
+      if (show > 0)
 	{
-	  f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show,
-			     level + 4);
-	  fputs_filtered (" :: ", stream);
-	  fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
-	  f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
-				       stream, 0, 0, 0, 0);
 	  fputs_filtered ("\n", stream);
-	} 
-      fprintfi_filtered (level, stream, "End Type ");
-      fputs_filtered (TYPE_TAG_NAME (type), stream);
+	  for (index = 0; index < TYPE_NFIELDS (type); index++)
+	    {
+	      f_type_print_base (TYPE_FIELD_TYPE (type, index), stream,
+				 show - 1, level + 4);
+	      fputs_filtered (" :: ", stream);
+	      fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
+	      f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
+					   stream, show - 1, 0, 0, 0);
+	      fputs_filtered ("\n", stream);
+	    }
+	  fprintfi_filtered (level, stream, "End Type ");
+	  fputs_filtered (TYPE_TAG_NAME (type), stream);
+	}
       break;
 
     case TYPE_CODE_MODULE:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-valprint.c ./gdb/f-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/f-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/f-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Fortran values for GDB, the GNU debugger.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
@@ -36,8 +36,6 @@
 
 extern void _initialize_f_valprint (void);
 static void info_common_command (char *, int);
-static void f77_create_arrayprint_offset_tbl (struct type *,
-					      struct ui_file *);
 static void f77_get_dynamic_length_of_aggregate (struct type *);
 
 int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
@@ -45,15 +43,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM
 /* Array which holds offsets to be applied to get a row's elements
    for a given array.  Array also holds the size of each subarray.  */
 
-/* The following macro gives us the size of the nth dimension, Where 
-   n is 1 based.  */
-
-#define F77_DIM_SIZE(n) (f77_array_offset_tbl[n][1])
-
-/* The following gives us the offset for row n where n is 1-based.  */
-
-#define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0])
-
 int
 f77_get_lowerbound (struct type *type)
 {
@@ -111,47 +100,6 @@ f77_get_dynamic_length_of_aggregate (str
     * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type)));
 }
 
-/* Function that sets up the array offset,size table for the array 
-   type "type".  */
-
-static void
-f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
-{
-  struct type *tmp_type;
-  int eltlen;
-  int ndimen = 1;
-  int upper, lower;
-
-  tmp_type = type;
-
-  while (TYPE_CODE (tmp_type) == TYPE_CODE_ARRAY)
-    {
-      upper = f77_get_upperbound (tmp_type);
-      lower = f77_get_lowerbound (tmp_type);
-
-      F77_DIM_SIZE (ndimen) = upper - lower + 1;
-
-      tmp_type = TYPE_TARGET_TYPE (tmp_type);
-      ndimen++;
-    }
-
-  /* Now we multiply eltlen by all the offsets, so that later we 
-     can print out array elements correctly.  Up till now we 
-     know an offset to apply to get the item but we also 
-     have to know how much to add to get to the next item.  */
-
-  ndimen--;
-  eltlen = TYPE_LENGTH (tmp_type);
-  F77_DIM_OFFSET (ndimen) = eltlen;
-  while (--ndimen > 0)
-    {
-      eltlen *= F77_DIM_SIZE (ndimen + 1);
-      F77_DIM_OFFSET (ndimen) = eltlen;
-    }
-}
-
-
-
 /* Actual function which prints out F77 arrays, Valaddr == address in 
    the superior.  Address == the address in the inferior.  */
 
@@ -164,41 +112,55 @@ f77_print_array_1 (int nss, int ndimensi
 		   const struct value_print_options *options,
 		   int *elts)
 {
+  struct type *range_type = TYPE_INDEX_TYPE (check_typedef (type));
+  CORE_ADDR addr = address + embedded_offset;
+  LONGEST lowerbound, upperbound;
   int i;
 
+  get_discrete_bounds (range_type, &lowerbound, &upperbound);
+
   if (nss != ndimensions)
     {
-      for (i = 0;
-	   (i < F77_DIM_SIZE (nss) && (*elts) < options->print_max);
+      size_t dim_size = TYPE_LENGTH (TYPE_TARGET_TYPE (type));
+      size_t offs = 0;
+
+      for (i = lowerbound;
+	   (i < upperbound + 1 && (*elts) < options->print_max);
 	   i++)
 	{
+	  struct value *subarray = value_from_contents_and_address
+	    (TYPE_TARGET_TYPE (type), value_contents_for_printing_const (val)
+	     + offs, addr + offs);
+
 	  fprintf_filtered (stream, "( ");
-	  f77_print_array_1 (nss + 1, ndimensions, TYPE_TARGET_TYPE (type),
-			     valaddr,
-			     embedded_offset + i * F77_DIM_OFFSET (nss),
-			     address,
-			     stream, recurse, val, options, elts);
+	  f77_print_array_1 (nss + 1, ndimensions, value_type (subarray),
+			     value_contents_for_printing (subarray),
+			     value_embedded_offset (subarray),
+			     value_address (subarray),
+			     stream, recurse, subarray, options, elts);
+	  offs += dim_size;
 	  fprintf_filtered (stream, ") ");
 	}
-      if (*elts >= options->print_max && i < F77_DIM_SIZE (nss)) 
+      if (*elts >= options->print_max && i < upperbound)
 	fprintf_filtered (stream, "...");
     }
   else
     {
-      for (i = 0; i < F77_DIM_SIZE (nss) && (*elts) < options->print_max;
+      for (i = lowerbound; i < upperbound + 1 && (*elts) < options->print_max;
 	   i++, (*elts)++)
 	{
-	  val_print (TYPE_TARGET_TYPE (type),
-		     valaddr,
-		     embedded_offset + i * F77_DIM_OFFSET (ndimensions),
-		     address, stream, recurse,
-		     val, options, current_language);
+	  struct value *elt = value_subscript ((struct value *)val, i);
 
-	  if (i != (F77_DIM_SIZE (nss) - 1))
+	  val_print (value_type (elt),
+		     value_embedded_offset (elt),
+		     value_address (elt), stream, recurse,
+		     elt, options, current_language);
+
+	  if (i != upperbound)
 	    fprintf_filtered (stream, ", ");
 
 	  if ((*elts == options->print_max - 1)
-	      && (i != (F77_DIM_SIZE (nss) - 1)))
+	      && (i != upperbound))
 	    fprintf_filtered (stream, "...");
 	}
     }
@@ -225,12 +187,6 @@ f77_print_array (struct type *type, cons
 Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
 	   ndimensions, MAX_FORTRAN_DIMS);
 
-  /* Since F77 arrays are stored column-major, we set up an 
-     offset table to get at the various row's elements.  The 
-     offset table contains entries for both offset and subarray size.  */
-
-  f77_create_arrayprint_offset_tbl (type, stream);
-
   f77_print_array_1 (1, ndimensions, type, valaddr, embedded_offset,
 		     address, stream, recurse, val, options, &elts);
 }
@@ -246,25 +202,28 @@ static const struct generic_val_print_de
   ".TRUE.",
   ".FALSE.",
   "VOID",
+  "{",
+  "}"
 };
 
 /* See val_print for a description of the various parameters of this
    function; they are identical.  */
 
 void
-f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+f_val_print (struct type *type, int embedded_offset,
 	     CORE_ADDR address, struct ui_file *stream, int recurse,
-	     const struct value *original_value,
+	     struct value *original_value,
 	     const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  unsigned int i = 0;	/* Number of characters printed.  */
+  int printed_field = 0; /* Number of fields printed.  */
   struct type *elttype;
   CORE_ADDR addr;
   int index;
+  const gdb_byte *valaddr =value_contents_for_printing (original_value);
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_STRING:
@@ -297,7 +256,7 @@ f_val_print (struct type *type, const gd
     case TYPE_CODE_PTR:
       if (options->format && options->format != 's')
 	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
+	  val_print_scalar_formatted (type, embedded_offset,
 				      original_value, options, 0, stream);
 	  break;
 	}
@@ -333,8 +292,8 @@ f_val_print (struct type *type, const gd
 	    {
 	      if (want_space)
 		fputs_filtered (" ", stream);
-	      i = val_print_string (TYPE_TARGET_TYPE (type), NULL, addr, -1,
-				    stream, options);
+	      val_print_string (TYPE_TARGET_TYPE (type), NULL, addr, -1,
+				stream, options);
 	    }
 	  return;
 	}
@@ -347,7 +306,7 @@ f_val_print (struct type *type, const gd
 
 	  opts.format = (options->format ? options->format
 			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
+	  val_print_scalar_formatted (type, embedded_offset,
 				      original_value, &opts, 0, stream);
 	}
       else
@@ -375,15 +334,34 @@ f_val_print (struct type *type, const gd
       fprintf_filtered (stream, "( ");
       for (index = 0; index < TYPE_NFIELDS (type); index++)
         {
-          int offset = TYPE_FIELD_BITPOS (type, index) / 8;
+	  struct value *field = value_field
+	    ((struct value *)original_value, index);
+
+	  struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, index));
+
+
+	  if (TYPE_CODE (field_type) != TYPE_CODE_FUNC)
+	    {
+	      const char *field_name;
+
+	      if (printed_field > 0)
+		fputs_filtered (", ", stream);
 
-          val_print (TYPE_FIELD_TYPE (type, index), valaddr,
-		     embedded_offset + offset,
-		     address, stream, recurse + 1,
-		     original_value, options, current_language);
-          if (index != TYPE_NFIELDS (type) - 1)
-            fputs_filtered (", ", stream);
-        }
+	      field_name = TYPE_FIELD_NAME (type, index);
+	      if (field_name != NULL)
+		{
+		  fputs_filtered (field_name, stream);
+		  fputs_filtered (" = ", stream);
+		}
+
+	      val_print (value_type (field),
+			 value_embedded_offset (field),
+			 value_address (field), stream, recurse + 1,
+			 field, options, current_language);
+
+	      ++printed_field;
+	    }
+	 }
       fprintf_filtered (stream, " )");
       break;     
 
@@ -399,7 +377,7 @@ f_val_print (struct type *type, const gd
     case TYPE_CODE_BOOL:
     case TYPE_CODE_CHAR:
     default:
-      generic_val_print (type, valaddr, embedded_offset, address,
+      generic_val_print (type, embedded_offset, address,
 			 stream, recurse, original_value, options,
 			 &f_decorations);
       break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore ./gdb/gcore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore	2015-07-06 01:51:06.000000000 +0000
+++ ./gdb/gcore	2017-03-06 01:52:56.000000000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.c ./gdb/gcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gcore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generate a core file for the inferior process.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,6 +34,8 @@
 #include "regset.h"
 #include "gdb_bfd.h"
 #include "readline/tilde.h"
+#include <algorithm>
+#include "common/gdb_unlinker.h"
 
 /* The largest amount of memory to read from the target at once.  We
    must throttle it to limit the amount of memory used by GDB during
@@ -48,15 +50,15 @@ static int gcore_memory_sections (bfd *)
 /* create_gcore_bfd -- helper for gcore_command (exported).
    Open a new bfd core file for output, and return the handle.  */
 
-bfd *
+gdb_bfd_ref_ptr
 create_gcore_bfd (const char *filename)
 {
-  bfd *obfd = gdb_bfd_openw (filename, default_gcore_target ());
+  gdb_bfd_ref_ptr obfd (gdb_bfd_openw (filename, default_gcore_target ()));
 
-  if (!obfd)
+  if (obfd == NULL)
     error (_("Failed to open '%s' for output."), filename);
-  bfd_set_format (obfd, bfd_core);
-  bfd_set_arch_mach (obfd, default_gcore_arch (), default_gcore_mach ());
+  bfd_set_format (obfd.get (), bfd_core);
+  bfd_set_arch_mach (obfd.get (), default_gcore_arch (), default_gcore_mach ());
   return obfd;
 }
 
@@ -134,59 +136,44 @@ write_gcore_file (bfd *obfd)
     throw_exception (except);
 }
 
-static void
-do_bfd_delete_cleanup (void *arg)
-{
-  bfd *obfd = arg;
-  const char *filename = obfd->filename;
-
-  gdb_bfd_unref (arg);
-  unlink (filename);
-}
-
 /* gcore_command -- implements the 'gcore' command.
    Generate a core file from the inferior process.  */
 
 static void
 gcore_command (char *args, int from_tty)
 {
-  struct cleanup *filename_chain;
-  struct cleanup *bfd_chain;
-  char *corefilename;
-  bfd *obfd;
+  gdb::unique_xmalloc_ptr<char> corefilename;
 
   /* No use generating a corefile without a target process.  */
   if (!target_has_execution)
     noprocess ();
 
   if (args && *args)
-    corefilename = tilde_expand (args);
+    corefilename.reset (tilde_expand (args));
   else
     {
       /* Default corefile name is "core.PID".  */
-      corefilename = xstrprintf ("core.%d", ptid_get_pid (inferior_ptid));
+      corefilename.reset (xstrprintf ("core.%d", ptid_get_pid (inferior_ptid)));
     }
-  filename_chain = make_cleanup (xfree, corefilename);
 
   if (info_verbose)
     fprintf_filtered (gdb_stdout,
-		      "Opening corefile '%s' for output.\n", corefilename);
+		      "Opening corefile '%s' for output.\n",
+		      corefilename.get ());
 
   /* Open the output file.  */
-  obfd = create_gcore_bfd (corefilename);
+  gdb_bfd_ref_ptr obfd (create_gcore_bfd (corefilename.get ()));
 
-  /* Need a cleanup that will close and delete the file.  */
-  bfd_chain = make_cleanup (do_bfd_delete_cleanup, obfd);
+  /* Arrange to unlink the file on failure.  */
+  gdb::unlinker unlink_file (corefilename.get ());
 
   /* Call worker function.  */
-  write_gcore_file (obfd);
+  write_gcore_file (obfd.get ());
 
   /* Succeeded.  */
-  discard_cleanups (bfd_chain);
-  gdb_bfd_unref (obfd);
+  unlink_file.keep ();
 
-  fprintf_filtered (gdb_stdout, "Saved corefile %s\n", corefilename);
-  do_cleanups (filename_chain);
+  fprintf_filtered (gdb_stdout, "Saved corefile %s\n", corefilename.get ());
 }
 
 static unsigned long
@@ -417,7 +404,7 @@ static int
 gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
 		       int write, int exec, int modified, void *data)
 {
-  bfd *obfd = data;
+  bfd *obfd = (bfd *) data;
   asection *osec;
   flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
 
@@ -562,7 +549,7 @@ gcore_copy_callback (bfd *obfd, asection
   bfd_size_type size, total_size = bfd_section_size (obfd, osec);
   file_ptr offset = 0;
   struct cleanup *old_chain = NULL;
-  void *memhunk;
+  gdb_byte *memhunk;
 
   /* Read-only sections are marked; we don't have to copy their contents.  */
   if ((bfd_get_section_flags (obfd, osec) & SEC_LOAD) == 0)
@@ -572,8 +559,8 @@ gcore_copy_callback (bfd *obfd, asection
   if (!startswith (bfd_section_name (obfd, osec), "load"))
     return;
 
-  size = min (total_size, MAX_COPY_BYTES);
-  memhunk = xmalloc (size);
+  size = std::min (total_size, (bfd_size_type) MAX_COPY_BYTES);
+  memhunk = (gdb_byte *) xmalloc (size);
   old_chain = make_cleanup (xfree, memhunk);
 
   while (total_size > 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.h ./gdb/gcore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gcore.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for reading/writing gcore files.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,9 @@
 #if !defined (GCORE_H)
 #define GCORE_H 1
 
-extern bfd *create_gcore_bfd (const char *filename);
+#include "gdb_bfd.h"
+
+extern gdb_bfd_ref_ptr create_gcore_bfd (const char *filename);
 extern void write_gcore_file (bfd *obfd);
 extern bfd *load_corefile (char *filename, int from_tty);
 extern int objfile_find_memory_regions (struct target_ops *self,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.in ./gdb/gcore.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gcore.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gcore.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.c ./gdb/gdbarch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbarch.c	2017-03-06 01:49:07.000000000 +0000
@@ -3,7 +3,7 @@
 
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -11,12 +11,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-  
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-  
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -47,6 +47,7 @@
 #include "observer.h"
 #include "regcache.h"
 #include "objfiles.h"
+#include "auxv.h"
 
 /* Static function declarations */
 
@@ -175,6 +176,7 @@ struct gdbarch
   const struct floatformat ** double_format;
   int long_double_bit;
   const struct floatformat ** long_double_format;
+  gdbarch_floatformat_for_type_ftype *floatformat_for_type;
   int ptr_bit;
   int addr_bit;
   int dwarf2_addr_size;
@@ -189,6 +191,7 @@ struct gdbarch
   int num_pseudo_regs;
   gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
   gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
+  gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
   int sp_regnum;
   int pc_regnum;
   int ps_regnum;
@@ -204,6 +207,7 @@ struct gdbarch
   gdbarch_push_dummy_call_ftype *push_dummy_call;
   int call_dummy_location;
   gdbarch_push_dummy_code_ftype *push_dummy_code;
+  gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
   gdbarch_print_registers_info_ftype *print_registers_info;
   gdbarch_print_float_info_ftype *print_float_info;
   gdbarch_print_vector_info_ftype *print_vector_info;
@@ -226,7 +230,9 @@ struct gdbarch
   gdbarch_skip_entrypoint_ftype *skip_entrypoint;
   gdbarch_inner_than_ftype *inner_than;
   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
-  gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
+  gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
+  gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
+  gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state;
   gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
@@ -269,6 +275,7 @@ struct gdbarch
   gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
   gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
   gdbarch_core_pid_to_str_ftype *core_pid_to_str;
+  gdbarch_core_thread_name_ftype *core_thread_name;
   const char * gcore_bfd_target;
   int vtable_function_descriptors;
   int vbit_in_delta;
@@ -311,6 +318,7 @@ struct gdbarch
   int has_global_breakpoints;
   gdbarch_has_shared_address_space_ftype *has_shared_address_space;
   gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
+  gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
   gdbarch_auto_charset_ftype *auto_charset;
   gdbarch_auto_wide_charset_ftype *auto_wide_charset;
   const char * solib_symbols_extension;
@@ -324,12 +332,15 @@ struct gdbarch
   gdbarch_insn_is_ret_ftype *insn_is_ret;
   gdbarch_insn_is_jump_ftype *insn_is_jump;
   gdbarch_auxv_parse_ftype *auxv_parse;
+  gdbarch_print_auxv_entry_ftype *print_auxv_entry;
   gdbarch_vsyscall_range_ftype *vsyscall_range;
   gdbarch_infcall_mmap_ftype *infcall_mmap;
   gdbarch_infcall_munmap_ftype *infcall_munmap;
   gdbarch_gcc_target_options_ftype *gcc_target_options;
   gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
   gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
+  char ** disassembler_options;
+  const disasm_options_t * valid_disassembler_options;
 };
 
 /* Create a new ``struct gdbarch'' based on information provided by
@@ -345,7 +356,7 @@ gdbarch_alloc (const struct gdbarch_info
      then use that to allocate the architecture vector.  */
   struct obstack *obstack = XNEW (struct obstack);
   obstack_init (obstack);
-  gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
+  gdbarch = XOBNEW (obstack, struct gdbarch);
   memset (gdbarch, 0, sizeof (*gdbarch));
   gdbarch->obstack = obstack;
 
@@ -370,6 +381,7 @@ gdbarch_alloc (const struct gdbarch_info
   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
   gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
+  gdbarch->floatformat_for_type = default_floatformat_for_type;
   gdbarch->ptr_bit = gdbarch->int_bit;
   gdbarch->char_signed = -1;
   gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
@@ -384,6 +396,7 @@ gdbarch_alloc (const struct gdbarch_info
   gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
   gdbarch->deprecated_fp_regnum = -1;
   gdbarch->call_dummy_location = AT_ENTRY_POINT;
+  gdbarch->code_of_frame_writable = default_code_of_frame_writable;
   gdbarch->print_registers_info = default_print_registers_info;
   gdbarch->print_float_info = default_print_float_info;
   gdbarch->register_sim_regno = legacy_register_sim_regno;
@@ -394,7 +407,9 @@ gdbarch_alloc (const struct gdbarch_info
   gdbarch->pointer_to_address = unsigned_pointer_to_address;
   gdbarch->address_to_pointer = unsigned_address_to_pointer;
   gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
-  gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
+  gdbarch->breakpoint_from_pc = default_breakpoint_from_pc;
+  gdbarch->sw_breakpoint_from_kind = NULL;
+  gdbarch->breakpoint_kind_from_current_state = default_breakpoint_kind_from_current_state;
   gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
   gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
   gdbarch->remote_register_number = default_remote_register_number;
@@ -418,6 +433,7 @@ gdbarch_alloc (const struct gdbarch_info
   gdbarch->relocate_instruction = NULL;
   gdbarch->has_shared_address_space = default_has_shared_address_space;
   gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
+  gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
   gdbarch->auto_charset = default_auto_charset;
   gdbarch->auto_wide_charset = default_auto_wide_charset;
   gdbarch->gen_return_address = default_gen_return_address;
@@ -426,6 +442,7 @@ gdbarch_alloc (const struct gdbarch_info
   gdbarch->insn_is_call = default_insn_is_call;
   gdbarch->insn_is_ret = default_insn_is_ret;
   gdbarch->insn_is_jump = default_insn_is_jump;
+  gdbarch->print_auxv_entry = default_print_auxv_entry;
   gdbarch->vsyscall_range = default_vsyscall_range;
   gdbarch->infcall_mmap = default_infcall_mmap;
   gdbarch->infcall_munmap = default_infcall_munmap;
@@ -449,6 +466,14 @@ gdbarch_obstack_zalloc (struct gdbarch *
   return data;
 }
 
+/* See gdbarch.h.  */
+
+char *
+gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
+{
+  return obstack_strdup (arch->obstack, string);
+}
+
 
 /* Free a gdbarch struct.  This should never happen in normal
    operation --- once you've created a gdbarch, you keep it around.
@@ -474,18 +499,13 @@ gdbarch_free (struct gdbarch *arch)
 static void
 verify_gdbarch (struct gdbarch *gdbarch)
 {
-  struct ui_file *log;
-  struct cleanup *cleanups;
-  long length;
-  char *buf;
+  string_file log;
 
-  log = mem_fileopen ();
-  cleanups = make_cleanup_ui_file_delete (log);
   /* fundamental */
   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
-    fprintf_unfiltered (log, "\n\tbyte-order");
+    log.puts ("\n\tbyte-order");
   if (gdbarch->bfd_arch_info == NULL)
-    fprintf_unfiltered (log, "\n\tbfd_arch_info");
+    log.puts ("\n\tbfd_arch_info");
   /* Check those that need to be defined for the given multi-arch level.  */
   /* Skip verify of bits_big_endian, invalid_p == 0 */
   /* Skip verify of short_bit, invalid_p == 0 */
@@ -505,6 +525,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of long_double_bit, invalid_p == 0 */
   if (gdbarch->long_double_format == 0)
     gdbarch->long_double_format = floatformats_ieee_double;
+  /* Skip verify of floatformat_for_type, invalid_p == 0 */
   /* Skip verify of ptr_bit, invalid_p == 0 */
   if (gdbarch->addr_bit == 0)
     gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
@@ -519,10 +540,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of pseudo_register_read_value, has predicate.  */
   /* Skip verify of pseudo_register_write, has predicate.  */
   if (gdbarch->num_regs == -1)
-    fprintf_unfiltered (log, "\n\tnum_regs");
+    log.puts ("\n\tnum_regs");
   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
   /* Skip verify of ax_pseudo_register_collect, has predicate.  */
   /* Skip verify of ax_pseudo_register_push_stack, has predicate.  */
+  /* Skip verify of handle_segmentation_fault, has predicate.  */
   /* Skip verify of sp_regnum, invalid_p == 0 */
   /* Skip verify of pc_regnum, invalid_p == 0 */
   /* Skip verify of ps_regnum, invalid_p == 0 */
@@ -532,13 +554,14 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
   if (gdbarch->register_name == 0)
-    fprintf_unfiltered (log, "\n\tregister_name");
+    log.puts ("\n\tregister_name");
   /* Skip verify of register_type, has predicate.  */
   /* Skip verify of dummy_id, has predicate.  */
   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
   /* Skip verify of push_dummy_call, has predicate.  */
   /* Skip verify of call_dummy_location, invalid_p == 0 */
   /* Skip verify of push_dummy_code, has predicate.  */
+  /* Skip verify of code_of_frame_writable, invalid_p == 0 */
   /* Skip verify of print_registers_info, invalid_p == 0 */
   /* Skip verify of print_float_info, invalid_p == 0 */
   /* Skip verify of print_vector_info, has predicate.  */
@@ -554,14 +577,16 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of return_value, has predicate.  */
   /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
   if (gdbarch->skip_prologue == 0)
-    fprintf_unfiltered (log, "\n\tskip_prologue");
+    log.puts ("\n\tskip_prologue");
   /* Skip verify of skip_main_prologue, has predicate.  */
   /* Skip verify of skip_entrypoint, has predicate.  */
   if (gdbarch->inner_than == 0)
-    fprintf_unfiltered (log, "\n\tinner_than");
-  if (gdbarch->breakpoint_from_pc == 0)
-    fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
-  /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
+    log.puts ("\n\tinner_than");
+  /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
+  if (gdbarch->breakpoint_kind_from_pc == 0)
+    log.puts ("\n\tbreakpoint_kind_from_pc");
+  /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
+  /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
   /* Skip verify of adjust_breakpoint_address, has predicate.  */
   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
@@ -580,7 +605,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of software_single_step, has predicate.  */
   /* Skip verify of single_step_through_delay, has predicate.  */
   if (gdbarch->print_insn == 0)
-    fprintf_unfiltered (log, "\n\tprint_insn");
+    log.puts ("\n\tprint_insn");
   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
@@ -604,6 +629,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of core_xfer_shared_libraries, has predicate.  */
   /* Skip verify of core_xfer_shared_libraries_aix, has predicate.  */
   /* Skip verify of core_pid_to_str, has predicate.  */
+  /* Skip verify of core_thread_name, has predicate.  */
   /* Skip verify of gcore_bfd_target, has predicate.  */
   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
   /* Skip verify of vbit_in_delta, invalid_p == 0 */
@@ -613,9 +639,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
   /* Skip verify of displaced_step_fixup, has predicate.  */
   if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
-    fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
+    log.puts ("\n\tdisplaced_step_free_closure");
   if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
-    fprintf_unfiltered (log, "\n\tdisplaced_step_location");
+    log.puts ("\n\tdisplaced_step_location");
   /* Skip verify of relocate_instruction, has predicate.  */
   /* Skip verify of overlay_update, has predicate.  */
   /* Skip verify of core_read_description, has predicate.  */
@@ -648,6 +674,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
   /* Skip verify of has_shared_address_space, invalid_p == 0 */
   /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
+  /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
   /* Skip verify of auto_charset, invalid_p == 0 */
   /* Skip verify of auto_wide_charset, invalid_p == 0 */
   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
@@ -660,19 +687,19 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of insn_is_ret, invalid_p == 0 */
   /* Skip verify of insn_is_jump, invalid_p == 0 */
   /* Skip verify of auxv_parse, has predicate.  */
+  /* Skip verify of print_auxv_entry, invalid_p == 0 */
   /* Skip verify of vsyscall_range, invalid_p == 0 */
   /* Skip verify of infcall_mmap, invalid_p == 0 */
   /* Skip verify of infcall_munmap, invalid_p == 0 */
   /* Skip verify of gcc_target_options, invalid_p == 0 */
   /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
   /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
-  buf = ui_file_xstrdup (log, &length);
-  make_cleanup (xfree, buf);
-  if (length > 0)
+  /* Skip verify of disassembler_options, invalid_p == 0 */
+  /* Skip verify of valid_disassembler_options, invalid_p == 0 */
+  if (!log.empty ())
     internal_error (__FILE__, __LINE__,
                     _("verify_gdbarch: the following are invalid ...%s"),
-                    buf);
-  do_cleanups (cleanups);
+                    log.c_str ());
 }
 
 
@@ -768,6 +795,12 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: breakpoint_from_pc = <%s>\n",
                       host_address_to_string (gdbarch->breakpoint_from_pc));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
+                      host_address_to_string (gdbarch->breakpoint_kind_from_current_state));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
+                      host_address_to_string (gdbarch->breakpoint_kind_from_pc));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: byte_order = %s\n",
                       plongest (gdbarch->byte_order));
   fprintf_unfiltered (file,
@@ -789,6 +822,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: char_signed = %s\n",
                       plongest (gdbarch->char_signed));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: code_of_frame_writable = <%s>\n",
+                      host_address_to_string (gdbarch->code_of_frame_writable));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
                       host_address_to_string (gdbarch->coff_make_msymbol_special));
   fprintf_unfiltered (file,
@@ -816,6 +852,12 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: core_read_description = <%s>\n",
                       host_address_to_string (gdbarch->core_read_description));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
+                      gdbarch_core_thread_name_p (gdbarch));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: core_thread_name = <%s>\n",
+                      host_address_to_string (gdbarch->core_thread_name));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
                       gdbarch_core_xfer_shared_libraries_p (gdbarch));
   fprintf_unfiltered (file,
@@ -837,6 +879,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: deprecated_function_start_offset = %s\n",
                       core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: disassembler_options = %s\n",
+                      pstring (*gdbarch->disassembler_options));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
                       gdbarch_displaced_step_copy_insn_p (gdbarch));
   fprintf_unfiltered (file,
@@ -942,6 +987,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: float_format = %s\n",
                       pformat (gdbarch->float_format));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: floatformat_for_type = <%s>\n",
+                      host_address_to_string (gdbarch->floatformat_for_type));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: fp0_regnum = %s\n",
                       plongest (gdbarch->fp0_regnum));
   fprintf_unfiltered (file,
@@ -1008,12 +1056,21 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
                       host_address_to_string (gdbarch->gnu_triplet_regexp));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
+                      host_address_to_string (gdbarch->guess_tracepoint_registers));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: half_bit = %s\n",
                       plongest (gdbarch->half_bit));
   fprintf_unfiltered (file,
                       "gdbarch_dump: half_format = %s\n",
                       pformat (gdbarch->half_format));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
+                      gdbarch_handle_segmentation_fault_p (gdbarch));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: handle_segmentation_fault = <%s>\n",
+                      host_address_to_string (gdbarch->handle_segmentation_fault));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: has_dos_based_file_system = %s\n",
                       plongest (gdbarch->has_dos_based_file_system));
   fprintf_unfiltered (file,
@@ -1131,6 +1188,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: pointer_to_address = <%s>\n",
                       host_address_to_string (gdbarch->pointer_to_address));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: print_auxv_entry = <%s>\n",
+                      host_address_to_string (gdbarch->print_auxv_entry));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: print_float_info = <%s>\n",
                       host_address_to_string (gdbarch->print_float_info));
   fprintf_unfiltered (file,
@@ -1233,9 +1293,6 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: relocate_instruction = <%s>\n",
                       host_address_to_string (gdbarch->relocate_instruction));
   fprintf_unfiltered (file,
-                      "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
-                      host_address_to_string (gdbarch->remote_breakpoint_from_pc));
-  fprintf_unfiltered (file,
                       "gdbarch_dump: remote_register_number = <%s>\n",
                       host_address_to_string (gdbarch->remote_register_number));
   fprintf_unfiltered (file,
@@ -1350,6 +1407,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: static_transform_name = <%s>\n",
                       host_address_to_string (gdbarch->static_transform_name));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
+                      host_address_to_string (gdbarch->sw_breakpoint_from_kind));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: syscalls_info = %s\n",
                       host_address_to_string (gdbarch->syscalls_info));
   fprintf_unfiltered (file,
@@ -1368,6 +1428,9 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: unwind_sp = <%s>\n",
                       host_address_to_string (gdbarch->unwind_sp));
   fprintf_unfiltered (file,
+                      "gdbarch_dump: valid_disassembler_options = %s\n",
+                      host_address_to_string (gdbarch->valid_disassembler_options->name));
+  fprintf_unfiltered (file,
                       "gdbarch_dump: value_from_register = <%s>\n",
                       host_address_to_string (gdbarch->value_from_register));
   fprintf_unfiltered (file,
@@ -1686,6 +1749,23 @@ set_gdbarch_long_double_format (struct g
   gdbarch->long_double_format = long_double_format;
 }
 
+const struct floatformat **
+gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->floatformat_for_type != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n");
+  return gdbarch->floatformat_for_type (gdbarch, name, length);
+}
+
+void
+set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
+                                  gdbarch_floatformat_for_type_ftype floatformat_for_type)
+{
+  gdbarch->floatformat_for_type = floatformat_for_type;
+}
+
 int
 gdbarch_ptr_bit (struct gdbarch *gdbarch)
 {
@@ -1978,6 +2058,30 @@ set_gdbarch_ax_pseudo_register_push_stac
 }
 
 int
+gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->handle_segmentation_fault != NULL;
+}
+
+void
+gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->handle_segmentation_fault != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
+  gdbarch->handle_segmentation_fault (gdbarch, uiout);
+}
+
+void
+set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
+                                       gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
+{
+  gdbarch->handle_segmentation_fault = handle_segmentation_fault;
+}
+
+int
 gdbarch_sp_regnum (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -2260,6 +2364,23 @@ set_gdbarch_push_dummy_code (struct gdba
   gdbarch->push_dummy_code = push_dummy_code;
 }
 
+int
+gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->code_of_frame_writable != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
+  return gdbarch->code_of_frame_writable (gdbarch, frame);
+}
+
+void
+set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
+                                    gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
+{
+  gdbarch->code_of_frame_writable = code_of_frame_writable;
+}
+
 void
 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
 {
@@ -2675,21 +2796,55 @@ set_gdbarch_breakpoint_from_pc (struct g
   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
 }
 
+int
+gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
+  return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
+}
+
+void
+set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
+                                     gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
+{
+  gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
+}
+
+const gdb_byte *
+gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
+  return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
+}
+
 void
-gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
+set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
+                                     gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
+{
+  gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
+}
+
+int
+gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
 {
   gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
+  gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL);
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
-  gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n");
+  return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr);
 }
 
 void
-set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
-                                       gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
+set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
+                                                gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state)
 {
-  gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
+  gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state;
 }
 
 int
@@ -3012,14 +3167,14 @@ gdbarch_software_single_step_p (struct g
   return gdbarch->software_single_step != NULL;
 }
 
-int
-gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
+VEC (CORE_ADDR) *
+gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->software_single_step != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
-  return gdbarch->software_single_step (frame);
+  return gdbarch->software_single_step (regcache);
 }
 
 void
@@ -3546,6 +3701,30 @@ set_gdbarch_core_pid_to_str (struct gdba
 }
 
 int
+gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->core_thread_name != NULL;
+}
+
+const char *
+gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->core_thread_name != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
+  return gdbarch->core_thread_name (gdbarch, thr);
+}
+
+void
+set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
+                              gdbarch_core_thread_name_ftype core_thread_name)
+{
+  gdbarch->core_thread_name = core_thread_name;
+}
+
+int
 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -4394,13 +4573,13 @@ set_gdbarch_has_shared_address_space (st
 }
 
 int
-gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
+gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
-  return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
+  return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
 }
 
 void
@@ -4410,6 +4589,23 @@ set_gdbarch_fast_tracepoint_valid_at (st
   gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
 }
 
+void
+gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
+  gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
+}
+
+void
+set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
+                                        gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
+{
+  gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
+}
+
 const char *
 gdbarch_auto_charset (struct gdbarch *gdbarch)
 {
@@ -4651,6 +4847,23 @@ set_gdbarch_auxv_parse (struct gdbarch *
   gdbarch->auxv_parse = auxv_parse;
 }
 
+void
+gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
+{
+  gdb_assert (gdbarch != NULL);
+  gdb_assert (gdbarch->print_auxv_entry != NULL);
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n");
+  gdbarch->print_auxv_entry (gdbarch, file, type, val);
+}
+
+void
+set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
+                              gdbarch_print_auxv_entry_ftype print_auxv_entry)
+{
+  gdbarch->print_auxv_entry = print_auxv_entry;
+}
+
 int
 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
 {
@@ -4753,6 +4966,40 @@ set_gdbarch_addressable_memory_unit_size
   gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
 }
 
+char **
+gdbarch_disassembler_options (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  /* Skip verify of disassembler_options, invalid_p == 0 */
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options called\n");
+  return gdbarch->disassembler_options;
+}
+
+void
+set_gdbarch_disassembler_options (struct gdbarch *gdbarch,
+                                  char ** disassembler_options)
+{
+  gdbarch->disassembler_options = disassembler_options;
+}
+
+const disasm_options_t *
+gdbarch_valid_disassembler_options (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  /* Skip verify of valid_disassembler_options, invalid_p == 0 */
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_valid_disassembler_options called\n");
+  return gdbarch->valid_disassembler_options;
+}
+
+void
+set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch,
+                                        const disasm_options_t * valid_disassembler_options)
+{
+  gdbarch->valid_disassembler_options = valid_disassembler_options;
+}
+
 
 /* Keep a registry of per-architecture data-pointers required by GDB
    modules.  */
@@ -4894,7 +5141,7 @@ static struct gdbarch_registration *gdba
 static void
 append_name (const char ***buf, int *nr, const char *name)
 {
-  *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
+  *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
   (*buf)[*nr] = name;
   *nr += 1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.h ./gdb/gdbarch.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbarch.h	2017-03-06 01:49:07.000000000 +0000
@@ -3,7 +3,7 @@
 
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -11,12 +11,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-  
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-  
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -36,6 +36,7 @@
 #define GDBARCH_H
 
 #include "frame.h"
+#include "dis-asm.h"
 
 struct floatformat;
 struct ui_file;
@@ -54,7 +55,6 @@ struct target_desc;
 struct objfile;
 struct symbol;
 struct displaced_step_closure;
-struct core_regset_section;
 struct syscall;
 struct agent_expr;
 struct axs_value;
@@ -64,6 +64,8 @@ struct ravenscar_arch_ops;
 struct elf_internal_linux_prpsinfo;
 struct mem_range;
 struct syscalls_info;
+struct thread_info;
+struct ui_out;
 
 #include "regcache.h"
 
@@ -186,6 +188,14 @@ extern void set_gdbarch_long_double_bit 
 extern const struct floatformat ** gdbarch_long_double_format (struct gdbarch *gdbarch);
 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat ** long_double_format);
 
+/* Returns the floating-point format to be used for values of length LENGTH.
+   NAME, if non-NULL, is the type name, which may be used to distinguish
+   different target formats of the same length. */
+
+typedef const struct floatformat ** (gdbarch_floatformat_for_type_ftype) (struct gdbarch *gdbarch, const char *name, int length);
+extern const struct floatformat ** gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length);
+extern void set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch, gdbarch_floatformat_for_type_ftype *floatformat_for_type);
+
 /* For most targets, a pointer on the target and its representation as an
    address in GDB have the same size and "look the same".  For such a
    target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
@@ -300,6 +310,17 @@ typedef int (gdbarch_ax_pseudo_register_
 extern int gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg);
 extern void set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack);
 
+/* Some targets/architectures can do extra processing/display of
+   segmentation faults.  E.g., Intel MPX boundary faults.
+   Call the architecture dependent function to handle the fault.
+   UIOUT is the output stream where the handler will place information. */
+
+extern int gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_handle_segmentation_fault_ftype) (struct gdbarch *gdbarch, struct ui_out *uiout);
+extern void gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout);
+extern void set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault);
+
 /* GDB's standard (or well known) register numbers.  These can map onto
    a real register or a pseudo (computed) register or not be defined at
    all (-1).
@@ -335,7 +356,8 @@ typedef int (gdbarch_sdb_reg_to_regnum_f
 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
 
-/* Provide a default mapping from a DWARF2 register number to a gdb REGNUM. */
+/* Provide a default mapping from a DWARF2 register number to a gdb REGNUM.
+   Return -1 for bad REGNUM.  Note: Several targets get this wrong. */
 
 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int dwarf2_regnr);
 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
@@ -382,6 +404,12 @@ typedef CORE_ADDR (gdbarch_push_dummy_co
 extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
 
+/* Return true if the code of FRAME is writable. */
+
+typedef int (gdbarch_code_of_frame_writable_ftype) (struct gdbarch *gdbarch, struct frame_info *frame);
+extern int gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame);
+extern void set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, gdbarch_code_of_frame_writable_ftype *code_of_frame_writable);
+
 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
 extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
@@ -523,13 +551,27 @@ typedef const gdb_byte * (gdbarch_breakp
 extern const gdb_byte * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
 
-/* Return the adjusted address and kind to use for Z0/Z1 packets.
-   KIND is usually the memory length of the breakpoint, but may have a
-   different target-specific meaning. */
-
-typedef void (gdbarch_remote_breakpoint_from_pc_ftype) (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr);
-extern void gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr);
-extern void set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc);
+/* Return the breakpoint kind for this target based on *PCPTR. */
+
+typedef int (gdbarch_breakpoint_kind_from_pc_ftype) (struct gdbarch *gdbarch, CORE_ADDR *pcptr);
+extern int gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr);
+extern void set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc);
+
+/* Return the software breakpoint from KIND.  KIND can have target
+   specific meaning like the Z0 kind parameter.
+   SIZE is set to the software breakpoint's length in memory. */
+
+typedef const gdb_byte * (gdbarch_sw_breakpoint_from_kind_ftype) (struct gdbarch *gdbarch, int kind, int *size);
+extern const gdb_byte * gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size);
+extern void set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind);
+
+/* Return the breakpoint kind for this target based on the current
+   processor state (e.g. the current instruction mode on ARM) and the
+   *PCPTR.  In default, it is gdbarch->breakpoint_kind_from_pc. */
+
+typedef int (gdbarch_breakpoint_kind_from_current_state_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr);
+extern int gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr);
+extern void set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state);
 
 extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch);
 
@@ -633,20 +675,22 @@ extern void set_gdbarch_addr_bits_remove
    indicates if the target needs software single step.  An ISA method to
    implement it.
   
-   FIXME/cagney/2001-01-18: This should be replaced with something that inserts
-   breakpoints using the breakpoint system instead of blatting memory directly
-   (as with rs6000).
-  
    FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the
    target can single step.  If not, then implement single step using breakpoints.
   
-   A return value of 1 means that the software_single_step breakpoints
-   were inserted; 0 means they were not. */
+   Return a vector of addresses on which the software single step
+   breakpoints should be inserted.  NULL means software single step is
+   not used.
+   Multiple breakpoints may be inserted for some instructions such as
+   conditional branch.  However, each implementation must always evaluate
+   the condition and only put the breakpoint at the branch destination if
+   the condition is true, so that we ensure forward progress when stepping
+   past a conditional branch to self. */
 
 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
 
-typedef int (gdbarch_software_single_step_ftype) (struct frame_info *frame);
-extern int gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame);
+typedef VEC (CORE_ADDR) * (gdbarch_software_single_step_ftype) (struct regcache *regcache);
+extern VEC (CORE_ADDR) * gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache);
 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
 
 /* Return non-zero if the processor is executing a delay slot and a
@@ -866,6 +910,14 @@ typedef char * (gdbarch_core_pid_to_str_
 extern char * gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid);
 extern void set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, gdbarch_core_pid_to_str_ftype *core_pid_to_str);
 
+/* How the core target extracts the name of a thread from a core file. */
+
+extern int gdbarch_core_thread_name_p (struct gdbarch *gdbarch);
+
+typedef const char * (gdbarch_core_thread_name_ftype) (struct gdbarch *gdbarch, struct thread_info *thr);
+extern const char * gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr);
+extern void set_gdbarch_core_thread_name (struct gdbarch *gdbarch, gdbarch_core_thread_name_ftype *core_thread_name);
+
 /* BFD target to use when generating a core file. */
 
 extern int gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch);
@@ -923,7 +975,11 @@ extern void set_gdbarch_max_insn_length 
   
    If your architecture doesn't need to adjust instructions before
    single-stepping them, consider using simple_displaced_step_copy_insn
-   here. */
+   here.
+  
+   If the instruction cannot execute out of line, return NULL.  The
+   core falls back to stepping past the instruction in-line instead in
+   that case. */
 
 extern int gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch);
 
@@ -1310,10 +1366,19 @@ extern void set_gdbarch_has_shared_addre
 
 /* True if a fast tracepoint can be set at an address. */
 
-typedef int (gdbarch_fast_tracepoint_valid_at_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg);
-extern int gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg);
+typedef int (gdbarch_fast_tracepoint_valid_at_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg);
+extern int gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg);
 extern void set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at);
 
+/* Guess register state based on tracepoint location.  Used for tracepoints
+   where no registers have been collected, but there's only one location,
+   allowing us to guess the PC value, and perhaps some other registers.
+   On entry, regcache has all registers marked as unavailable. */
+
+typedef void (gdbarch_guess_tracepoint_registers_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr);
+extern void gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr);
+extern void set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers);
+
 /* Return the "auto" target charset. */
 
 typedef const char * (gdbarch_auto_charset_ftype) (void);
@@ -1423,6 +1488,13 @@ typedef int (gdbarch_auxv_parse_ftype) (
 extern int gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp);
 extern void set_gdbarch_auxv_parse (struct gdbarch *gdbarch, gdbarch_auxv_parse_ftype *auxv_parse);
 
+/* Print the description of a single auxv entry described by TYPE and VAL
+   to FILE. */
+
+typedef void (gdbarch_print_auxv_entry_ftype) (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val);
+extern void gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val);
+extern void set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch, gdbarch_print_auxv_entry_ftype *print_auxv_entry);
+
 /* Find the address range of the current inferior's vsyscall/vDSO, and
    write it to *RANGE.  If the vsyscall's length can't be determined, a
    range with zero length is returned.  Returns true if the vsyscall is
@@ -1474,6 +1546,14 @@ typedef int (gdbarch_addressable_memory_
 extern int gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch);
 extern void set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch, gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size);
 
+/* Functions for allowing a target to modify its disassembler options. */
+
+extern char ** gdbarch_disassembler_options (struct gdbarch *gdbarch);
+extern void set_gdbarch_disassembler_options (struct gdbarch *gdbarch, char ** disassembler_options);
+
+extern const disasm_options_t * gdbarch_valid_disassembler_options (struct gdbarch *gdbarch);
+extern void set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch, const disasm_options_t * valid_disassembler_options);
+
 /* Definition for an unknown syscall, used basically in error-cases.  */
 #define UNKNOWN_SYSCALL (-1)
 
@@ -1557,7 +1637,7 @@ struct gdbarch_info
   bfd *abfd;
 
   /* Use default: NULL (ZERO).  */
-  struct gdbarch_tdep_info *tdep_info;
+  void *tdep_info;
 
   /* Use default: GDB_OSABI_UNINITIALIZED (-1).  */
   enum gdb_osabi osabi;
@@ -1614,6 +1694,11 @@ extern void *gdbarch_obstack_zalloc (str
 #define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
 #define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
 
+/* Duplicate STRING, returning an equivalent string that's allocated on the
+   obstack associated with GDBARCH.  The string is freed when the corresponding
+   architecture is also freed.  */
+
+extern char *gdbarch_obstack_strdup (struct gdbarch *arch, const char *string);
 
 /* Helper function.  Force an update of the current architecture.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.sh ./gdb/gdbarch.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbarch.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbarch.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # Architecture commands for GDB, the GNU debugger.
 #
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -383,6 +383,11 @@ v:const struct floatformat **:double_for
 v:int:long_double_bit:::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
 v:const struct floatformat **:long_double_format:::::floatformats_ieee_double::pformat (gdbarch->long_double_format)
 
+# Returns the floating-point format to be used for values of length LENGTH.
+# NAME, if non-NULL, is the type name, which may be used to distinguish
+# different target formats of the same length.
+m:const struct floatformat **:floatformat_for_type:const char *name, int length:name, length:0:default_floatformat_for_type::0
+
 # For most targets, a pointer on the target and its representation as an
 # address in GDB have the same size and "look the same".  For such a
 # target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
@@ -446,6 +451,12 @@ M:int:ax_pseudo_register_collect:struct 
 # Return -1 if something goes wrong, 0 otherwise.
 M:int:ax_pseudo_register_push_stack:struct agent_expr *ax, int reg:ax, reg
 
+# Some targets/architectures can do extra processing/display of
+# segmentation faults.  E.g., Intel MPX boundary faults.
+# Call the architecture dependent function to handle the fault.
+# UIOUT is the output stream where the handler will place information.
+M:void:handle_segmentation_fault:struct ui_out *uiout:uiout
+
 # GDB's standard (or well known) register numbers.  These can map onto
 # a real register or a pseudo (computed) register or not be defined at
 # all (-1).
@@ -461,6 +472,7 @@ m:int:ecoff_reg_to_regnum:int ecoff_regn
 # Convert from an sdb register number to an internal gdb register number.
 m:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0
 # Provide a default mapping from a DWARF2 register number to a gdb REGNUM.
+# Return -1 for bad REGNUM.  Note: Several targets get this wrong.
 m:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0
 m:const char *:register_name:int regnr:regnr::0
 
@@ -478,6 +490,9 @@ M:CORE_ADDR:push_dummy_call:struct value
 v:int:call_dummy_location::::AT_ENTRY_POINT::0
 M:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache
 
+# Return true if the code of FRAME is writable.
+m:int:code_of_frame_writable:struct frame_info *frame:frame::default_code_of_frame_writable::0
+
 m:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
 m:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args::default_print_float_info::0
 M:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -544,11 +559,21 @@ M:CORE_ADDR:skip_main_prologue:CORE_ADDR
 M:CORE_ADDR:skip_entrypoint:CORE_ADDR ip:ip
 
 f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
-m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
-# Return the adjusted address and kind to use for Z0/Z1 packets.
-# KIND is usually the memory length of the breakpoint, but may have a
-# different target-specific meaning.
-m:void:remote_breakpoint_from_pc:CORE_ADDR *pcptr, int *kindptr:pcptr, kindptr:0:default_remote_breakpoint_from_pc::0
+m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:0:default_breakpoint_from_pc::0
+
+# Return the breakpoint kind for this target based on *PCPTR.
+m:int:breakpoint_kind_from_pc:CORE_ADDR *pcptr:pcptr::0:
+
+# Return the software breakpoint from KIND.  KIND can have target
+# specific meaning like the Z0 kind parameter.
+# SIZE is set to the software breakpoint's length in memory.
+m:const gdb_byte *:sw_breakpoint_from_kind:int kind, int *size:kind, size::NULL::0
+
+# Return the breakpoint kind for this target based on the current
+# processor state (e.g. the current instruction mode on ARM) and the
+# *PCPTR.  In default, it is gdbarch->breakpoint_kind_from_pc.
+m:int:breakpoint_kind_from_current_state:struct regcache *regcache, CORE_ADDR *pcptr:regcache, pcptr:0:default_breakpoint_kind_from_current_state::0
+
 M:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
 m:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
 m:int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0
@@ -598,16 +623,18 @@ m:CORE_ADDR:addr_bits_remove:CORE_ADDR a
 # indicates if the target needs software single step.  An ISA method to
 # implement it.
 #
-# FIXME/cagney/2001-01-18: This should be replaced with something that inserts
-# breakpoints using the breakpoint system instead of blatting memory directly
-# (as with rs6000).
-#
 # FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the
 # target can single step.  If not, then implement single step using breakpoints.
 #
-# A return value of 1 means that the software_single_step breakpoints
-# were inserted; 0 means they were not.
-F:int:software_single_step:struct frame_info *frame:frame
+# Return a vector of addresses on which the software single step
+# breakpoints should be inserted.  NULL means software single step is
+# not used.
+# Multiple breakpoints may be inserted for some instructions such as
+# conditional branch.  However, each implementation must always evaluate
+# the condition and only put the breakpoint at the branch destination if
+# the condition is true, so that we ensure forward progress when stepping
+# past a conditional branch to self.
+F:VEC (CORE_ADDR) *:software_single_step:struct regcache *regcache:regcache
 
 # Return non-zero if the processor is executing a delay slot and a
 # further single-step is needed before the instruction finishes.
@@ -720,6 +747,9 @@ M:ULONGEST:core_xfer_shared_libraries_ai
 # How the core target converts a PTID from a core file to a string.
 M:char *:core_pid_to_str:ptid_t ptid:ptid
 
+# How the core target extracts the name of a thread from a core file.
+M:const char *:core_thread_name:struct thread_info *thr:thr
+
 # BFD target to use when generating a core file.
 V:const char *:gcore_bfd_target:::0:0:::pstring (gdbarch->gcore_bfd_target)
 
@@ -763,6 +793,10 @@ V:ULONGEST:max_insn_length:::0:0
 # If your architecture doesn't need to adjust instructions before
 # single-stepping them, consider using simple_displaced_step_copy_insn
 # here.
+#
+# If the instruction cannot execute out of line, return NULL.  The
+# core falls back to stepping past the instruction in-line instead in
+# that case.
 M:struct displaced_step_closure *:displaced_step_copy_insn:CORE_ADDR from, CORE_ADDR to, struct regcache *regs:from, to, regs
 
 # Return true if GDB should use hardware single-stepping to execute
@@ -1018,7 +1052,13 @@ v:int:has_global_breakpoints:::0:0::0
 m:int:has_shared_address_space:void:::default_has_shared_address_space::0
 
 # True if a fast tracepoint can be set at an address.
-m:int:fast_tracepoint_valid_at:CORE_ADDR addr, int *isize, char **msg:addr, isize, msg::default_fast_tracepoint_valid_at::0
+m:int:fast_tracepoint_valid_at:CORE_ADDR addr, char **msg:addr, msg::default_fast_tracepoint_valid_at::0
+
+# Guess register state based on tracepoint location.  Used for tracepoints
+# where no registers have been collected, but there's only one location,
+# allowing us to guess the PC value, and perhaps some other registers.
+# On entry, regcache has all registers marked as unavailable.
+m:void:guess_tracepoint_registers:struct regcache *regcache, CORE_ADDR addr:regcache, addr::default_guess_tracepoint_registers::0
 
 # Return the "auto" target charset.
 f:const char *:auto_charset:void::default_auto_charset:default_auto_charset::0
@@ -1086,6 +1126,10 @@ m:int:insn_is_jump:CORE_ADDR addr:addr::
 # Return 1 if an entry was read into *TYPEP and *VALP.
 M:int:auxv_parse:gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp:readptr, endptr, typep, valp
 
+# Print the description of a single auxv entry described by TYPE and VAL
+# to FILE.
+m:void:print_auxv_entry:struct ui_file *file, CORE_ADDR type, CORE_ADDR val:file, type, val::default_print_auxv_entry::0
+
 # Find the address range of the current inferior's vsyscall/vDSO, and
 # write it to *RANGE.  If the vsyscall's length can't be determined, a
 # range with zero length is returned.  Returns true if the vsyscall is
@@ -1119,6 +1163,10 @@ m:const char *:gnu_triplet_regexp:void::
 # each address in memory.
 m:int:addressable_memory_unit_size:void:::default_addressable_memory_unit_size::0
 
+# Functions for allowing a target to modify its disassembler options.
+v:char **:disassembler_options:::0:0::0:pstring (*gdbarch->disassembler_options)
+v:const disasm_options_t *:valid_disassembler_options:::0:0::0:host_address_to_string (gdbarch->valid_disassembler_options->name)
+
 EOF
 }
 
@@ -1172,7 +1220,7 @@ cat <<EOF
 
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1180,12 +1228,12 @@ cat <<EOF
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-  
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-  
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -1215,6 +1263,7 @@ cat <<EOF
 #define GDBARCH_H
 
 #include "frame.h"
+#include "dis-asm.h"
 
 struct floatformat;
 struct ui_file;
@@ -1233,7 +1282,6 @@ struct target_desc;
 struct objfile;
 struct symbol;
 struct displaced_step_closure;
-struct core_regset_section;
 struct syscall;
 struct agent_expr;
 struct axs_value;
@@ -1243,6 +1291,8 @@ struct ravenscar_arch_ops;
 struct elf_internal_linux_prpsinfo;
 struct mem_range;
 struct syscalls_info;
+struct thread_info;
+struct ui_out;
 
 #include "regcache.h"
 
@@ -1425,7 +1475,7 @@ struct gdbarch_info
   bfd *abfd;
 
   /* Use default: NULL (ZERO).  */
-  struct gdbarch_tdep_info *tdep_info;
+  void *tdep_info;
 
   /* Use default: GDB_OSABI_UNINITIALIZED (-1).  */
   enum gdb_osabi osabi;
@@ -1482,6 +1532,11 @@ extern void *gdbarch_obstack_zalloc (str
 #define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
 #define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
 
+/* Duplicate STRING, returning an equivalent string that's allocated on the
+   obstack associated with GDBARCH.  The string is freed when the corresponding
+   architecture is also freed.  */
+
+extern char *gdbarch_obstack_strdup (struct gdbarch *arch, const char *string);
 
 /* Helper function.  Force an update of the current architecture.
 
@@ -1586,6 +1641,7 @@ cat <<EOF
 #include "observer.h"
 #include "regcache.h"
 #include "objfiles.h"
+#include "auxv.h"
 
 /* Static function declarations */
 
@@ -1737,7 +1793,7 @@ gdbarch_alloc (const struct gdbarch_info
      then use that to allocate the architecture vector.  */
   struct obstack *obstack = XNEW (struct obstack);
   obstack_init (obstack);
-  gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
+  gdbarch = XOBNEW (obstack, struct gdbarch);
   memset (gdbarch, 0, sizeof (*gdbarch));
   gdbarch->obstack = obstack;
 
@@ -1787,6 +1843,14 @@ gdbarch_obstack_zalloc (struct gdbarch *
   return data;
 }
 
+/* See gdbarch.h.  */
+
+char *
+gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
+{
+  return obstack_strdup (arch->obstack, string);
+}
+
 
 /* Free a gdbarch struct.  This should never happen in normal
    operation --- once you've created a gdbarch, you keep it around.
@@ -1816,18 +1880,13 @@ cat <<EOF
 static void
 verify_gdbarch (struct gdbarch *gdbarch)
 {
-  struct ui_file *log;
-  struct cleanup *cleanups;
-  long length;
-  char *buf;
+  string_file log;
 
-  log = mem_fileopen ();
-  cleanups = make_cleanup_ui_file_delete (log);
   /* fundamental */
   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
-    fprintf_unfiltered (log, "\n\tbyte-order");
+    log.puts ("\n\tbyte-order");
   if (gdbarch->bfd_arch_info == NULL)
-    fprintf_unfiltered (log, "\n\tbfd_arch_info");
+    log.puts ("\n\tbfd_arch_info");
   /* Check those that need to be defined for the given multi-arch level.  */
 EOF
 function_list | while do_read
@@ -1856,22 +1915,19 @@ do
 	elif [ -n "${invalid_p}" ]
 	then
 	    printf "  if (${invalid_p})\n"
-	    printf "    fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
+	    printf "    log.puts (\"\\\\n\\\\t${function}\");\n"
 	elif [ -n "${predefault}" ]
 	then
 	    printf "  if (gdbarch->${function} == ${predefault})\n"
-	    printf "    fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
+	    printf "    log.puts (\"\\\\n\\\\t${function}\");\n"
 	fi
     fi
 done
 cat <<EOF
-  buf = ui_file_xstrdup (log, &length);
-  make_cleanup (xfree, buf);
-  if (length > 0)
+  if (!log.empty ())
     internal_error (__FILE__, __LINE__,
                     _("verify_gdbarch: the following are invalid ...%s"),
-                    buf);
-  do_cleanups (cleanups);
+                    log.c_str ());
 }
 EOF
 
@@ -2197,7 +2253,7 @@ static struct gdbarch_registration *gdba
 static void
 append_name (const char ***buf, int *nr, const char *name)
 {
-  *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
+  *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
   (*buf)[*nr] = name;
   *nr += 1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_bfd.c ./gdb/gdb_bfd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_bfd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_bfd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for BFD wrappers used by GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -69,6 +69,15 @@ struct gdb_bfd_data
   /* The mtime of the BFD at the point the cache entry was made.  */
   time_t mtime;
 
+  /* The file size (in bytes) at the point the cache entry was made.  */
+  off_t size;
+
+  /* The inode of the file at the point the cache entry was made.  */
+  ino_t inode;
+
+  /* The device id of the file at the point the cache entry was made.  */
+  dev_t device_id;
+
   /* This is true if we have determined whether this BFD has any
      sections requiring relocation.  */
   unsigned int relocation_computed : 1;
@@ -102,6 +111,27 @@ DEFINE_REGISTRY (bfd, GDB_BFD_DATA_ACCES
 
 static htab_t gdb_bfd_cache;
 
+/* When true gdb will reuse an existing bfd object if the filename,
+   modification time, and file size all match.  */
+
+static int bfd_sharing = 1;
+static void
+show_bfd_sharing  (struct ui_file *file, int from_tty,
+		   struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("BFD sharing is %s.\n"), value);
+}
+
+/* When non-zero debugging of the bfd caches is enabled.  */
+
+static unsigned int debug_bfd_cache;
+static void
+show_bfd_cache_debug (struct ui_file *file, int from_tty,
+		      struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("BFD cache debugging is %s.\n"), value);
+}
+
 /* The type of an object being looked up in gdb_bfd_cache.  We use
    htab's capability of storing one kind of object (BFD in this case)
    and using a different sort of object for searching.  */
@@ -112,6 +142,12 @@ struct gdb_bfd_cache_search
   const char *filename;
   /* The mtime.  */
   time_t mtime;
+  /* The file size (in bytes).  */
+  off_t size;
+  /* The inode of the file.  */
+  ino_t inode;
+  /* The device id of the file.  */
+  dev_t device_id;
 };
 
 /* A hash function for BFDs.  */
@@ -119,7 +155,7 @@ struct gdb_bfd_cache_search
 static hashval_t
 hash_bfd (const void *b)
 {
-  const bfd *abfd = b;
+  const bfd *abfd = (const struct bfd *) b;
 
   /* It is simplest to just hash the filename.  */
   return htab_hash_string (bfd_get_filename (abfd));
@@ -131,11 +167,15 @@ hash_bfd (const void *b)
 static int
 eq_bfd (const void *a, const void *b)
 {
-  const bfd *abfd = a;
-  const struct gdb_bfd_cache_search *s = b;
-  struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+  const bfd *abfd = (const struct bfd *) a;
+  const struct gdb_bfd_cache_search *s
+    = (const struct gdb_bfd_cache_search *) b;
+  struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
 
   return (gdata->mtime == s->mtime
+	  && gdata->size == s->size
+	  && gdata->inode == s->inode
+	  && gdata->device_id == s->device_id
 	  && strcmp (bfd_get_filename (abfd), s->filename) == 0);
 }
 
@@ -222,10 +262,11 @@ gdb_bfd_iovec_fileio_open (struct bfd *a
 
   gdb_assert (is_target_filename (filename));
 
-  fd = target_fileio_open ((struct inferior *) inferior,
-			   filename + strlen (TARGET_SYSROOT_PREFIX),
-			   FILEIO_O_RDONLY, 0,
-			   &target_errno);
+  fd = target_fileio_open_warn_if_slow ((struct inferior *) inferior,
+					filename
+					+ strlen (TARGET_SYSROOT_PREFIX),
+					FILEIO_O_RDONLY, 0,
+					&target_errno);
   if (fd == -1)
     {
       errno = fileio_errno_to_host (target_errno);
@@ -252,6 +293,8 @@ gdb_bfd_iovec_fileio_pread (struct bfd *
   pos = 0;
   while (nbytes > pos)
     {
+      QUIT;
+
       bytes = target_fileio_pread (fd, (gdb_byte *) buf + pos,
 				   nbytes - pos, offset + pos,
 				   &target_errno);
@@ -313,7 +356,7 @@ gdb_bfd_iovec_fileio_fstat (struct bfd *
 
 /* See gdb_bfd.h.  */
 
-struct bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_open (const char *name, const char *target, int fd)
 {
   hashval_t hash;
@@ -358,33 +401,55 @@ gdb_bfd_open (const char *name, const ch
     {
       /* Weird situation here.  */
       search.mtime = 0;
+      search.size = 0;
+      search.inode = 0;
+      search.device_id = 0;
     }
   else
-    search.mtime = st.st_mtime;
+    {
+      search.mtime = st.st_mtime;
+      search.size = st.st_size;
+      search.inode = st.st_ino;
+      search.device_id = st.st_dev;
+    }
 
   /* Note that this must compute the same result as hash_bfd.  */
   hash = htab_hash_string (name);
   /* Note that we cannot use htab_find_slot_with_hash here, because
      opening the BFD may fail; and this would violate hashtab
      invariants.  */
-  abfd = htab_find_with_hash (gdb_bfd_cache, &search, hash);
-  if (abfd != NULL)
+  abfd = (struct bfd *) htab_find_with_hash (gdb_bfd_cache, &search, hash);
+  if (bfd_sharing && abfd != NULL)
     {
+      if (debug_bfd_cache)
+	fprintf_unfiltered (gdb_stdlog,
+			    "Reusing cached bfd %s for %s\n",
+			    host_address_to_string (abfd),
+			    bfd_get_filename (abfd));
       close (fd);
       gdb_bfd_ref (abfd);
-      return abfd;
+      return gdb_bfd_ref_ptr (abfd);
     }
 
   abfd = bfd_fopen (name, target, FOPEN_RB, fd);
   if (abfd == NULL)
     return NULL;
 
-  slot = htab_find_slot_with_hash (gdb_bfd_cache, &search, hash, INSERT);
-  gdb_assert (!*slot);
-  *slot = abfd;
+  if (debug_bfd_cache)
+    fprintf_unfiltered (gdb_stdlog,
+			"Creating new bfd %s for %s\n",
+			host_address_to_string (abfd),
+			bfd_get_filename (abfd));
+
+  if (bfd_sharing)
+    {
+      slot = htab_find_slot_with_hash (gdb_bfd_cache, &search, hash, INSERT);
+      gdb_assert (!*slot);
+      *slot = abfd;
+    }
 
   gdb_bfd_ref (abfd);
-  return abfd;
+  return gdb_bfd_ref_ptr (abfd);
 }
 
 /* A helper function that releases any section data attached to the
@@ -393,7 +458,8 @@ gdb_bfd_open (const char *name, const ch
 static void
 free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
 {
-  struct gdb_bfd_section_data *sect = bfd_get_section_userdata (abfd, sectp);
+  struct gdb_bfd_section_data *sect
+    = (struct gdb_bfd_section_data *) bfd_get_section_userdata (abfd, sectp);
 
   if (sect != NULL && sect->data != NULL)
     {
@@ -435,13 +501,20 @@ gdb_bfd_close_or_warn (struct bfd *abfd)
 void
 gdb_bfd_ref (struct bfd *abfd)
 {
+  struct stat buf;
   struct gdb_bfd_data *gdata;
   void **slot;
 
   if (abfd == NULL)
     return;
 
-  gdata = bfd_usrdata (abfd);
+  gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
+
+  if (debug_bfd_cache)
+    fprintf_unfiltered (gdb_stdlog,
+			"Increase reference count on bfd %s (%s)\n",
+			host_address_to_string (abfd),
+			bfd_get_filename (abfd));
 
   if (gdata != NULL)
     {
@@ -452,10 +525,23 @@ gdb_bfd_ref (struct bfd *abfd)
   /* Ask BFD to decompress sections in bfd_get_full_section_contents.  */
   abfd->flags |= BFD_DECOMPRESS;
 
-  gdata = bfd_zalloc (abfd, sizeof (struct gdb_bfd_data));
+  gdata
+    = (struct gdb_bfd_data *) bfd_zalloc (abfd, sizeof (struct gdb_bfd_data));
   gdata->refc = 1;
   gdata->mtime = bfd_get_mtime (abfd);
+  gdata->size = bfd_get_size (abfd);
   gdata->archive_bfd = NULL;
+  if (bfd_stat (abfd, &buf) == 0)
+    {
+      gdata->inode = buf.st_ino;
+      gdata->device_id = buf.st_dev;
+    }
+  else
+    {
+      /* The stat failed.  */
+      gdata->inode = 0;
+      gdata->device_id = 0;
+    }
   bfd_usrdata (abfd) = gdata;
 
   bfd_alloc_data (abfd);
@@ -479,12 +565,25 @@ gdb_bfd_unref (struct bfd *abfd)
   if (abfd == NULL)
     return;
 
-  gdata = bfd_usrdata (abfd);
+  gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
   gdb_assert (gdata->refc >= 1);
 
   gdata->refc -= 1;
   if (gdata->refc > 0)
-    return;
+    {
+      if (debug_bfd_cache)
+	fprintf_unfiltered (gdb_stdlog,
+			    "Decrease reference count on bfd %s (%s)\n",
+			    host_address_to_string (abfd),
+			    bfd_get_filename (abfd));
+      return;
+    }
+
+  if (debug_bfd_cache)
+    fprintf_unfiltered (gdb_stdlog,
+			"Delete final reference count on bfd %s (%s)\n",
+			host_address_to_string (abfd),
+			bfd_get_filename (abfd));
 
   archive_bfd = gdata->archive_bfd;
   search.filename = bfd_get_filename (abfd);
@@ -495,6 +594,9 @@ gdb_bfd_unref (struct bfd *abfd)
       void **slot;
 
       search.mtime = gdata->mtime;
+      search.size = gdata->size;
+      search.inode = gdata->inode;
+      search.device_id = gdata->device_id;
       slot = htab_find_slot_with_hash (gdb_bfd_cache, &search, hash,
 				       NO_INSERT);
 
@@ -527,11 +629,13 @@ get_section_descriptor (asection *sectio
 {
   struct gdb_bfd_section_data *result;
 
-  result = bfd_get_section_userdata (section->owner, section);
+  result = ((struct gdb_bfd_section_data *)
+	    bfd_get_section_userdata (section->owner, section));
 
   if (result == NULL)
     {
-      result = bfd_zalloc (section->owner, sizeof (*result));
+      result = ((struct gdb_bfd_section_data *)
+		bfd_zalloc (section->owner, sizeof (*result)));
       bfd_set_section_userdata (section->owner, section, result);
     }
 
@@ -609,7 +713,7 @@ gdb_bfd_map_section (asection *sectp, bf
  done:
   gdb_assert (descriptor->data != NULL);
   *size = descriptor->size;
-  return descriptor->data;
+  return (const gdb_byte *) descriptor->data;
 }
 
 /* Return 32-bit CRC for ABFD.  If successful store it to *FILE_CRC_RETURN and
@@ -654,7 +758,7 @@ get_file_crc (bfd *abfd, unsigned long *
 int
 gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out)
 {
-  struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+  struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
 
   if (!gdata->crc_computed)
     gdata->crc_computed = get_file_crc (abfd, &gdata->crc);
@@ -668,7 +772,7 @@ gdb_bfd_crc (struct bfd *abfd, unsigned 
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_fopen (const char *filename, const char *target, const char *mode,
 	       int fd)
 {
@@ -677,12 +781,12 @@ gdb_bfd_fopen (const char *filename, con
   if (result)
     gdb_bfd_ref (result);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_openr (const char *filename, const char *target)
 {
   bfd *result = bfd_openr (filename, target);
@@ -690,12 +794,12 @@ gdb_bfd_openr (const char *filename, con
   if (result)
     gdb_bfd_ref (result);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_openw (const char *filename, const char *target)
 {
   bfd *result = bfd_openw (filename, target);
@@ -703,12 +807,12 @@ gdb_bfd_openw (const char *filename, con
   if (result)
     gdb_bfd_ref (result);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_openr_iovec (const char *filename, const char *target,
 		     void *(*open_func) (struct bfd *nbfd,
 					 void *open_closure),
@@ -731,7 +835,7 @@ gdb_bfd_openr_iovec (const char *filenam
   if (result)
     gdb_bfd_ref (result);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* See gdb_bfd.h.  */
@@ -745,7 +849,7 @@ gdb_bfd_mark_parent (bfd *child, bfd *pa
   /* No need to stash the filename here, because we also keep a
      reference on the parent archive.  */
 
-  gdata = bfd_usrdata (child);
+  gdata = (struct gdb_bfd_data *) bfd_usrdata (child);
   if (gdata->archive_bfd == NULL)
     {
       gdata->archive_bfd = parent;
@@ -757,7 +861,7 @@ gdb_bfd_mark_parent (bfd *child, bfd *pa
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous)
 {
   bfd *result = bfd_openr_next_archived_file (archive, previous);
@@ -765,7 +869,7 @@ gdb_bfd_openr_next_archived_file (bfd *a
   if (result)
     gdb_bfd_mark_parent (result, archive);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* See gdb_bfd.h.  */
@@ -776,13 +880,13 @@ gdb_bfd_record_inclusion (bfd *includer,
   struct gdb_bfd_data *gdata;
 
   gdb_bfd_ref (includee);
-  gdata = bfd_usrdata (includer);
+  gdata = (struct gdb_bfd_data *) bfd_usrdata (includer);
   VEC_safe_push (bfdp, gdata->included_bfds, includee);
 }
 
 /* See gdb_bfd.h.  */
 
-bfd *
+gdb_bfd_ref_ptr
 gdb_bfd_fdopenr (const char *filename, const char *target, int fd)
 {
   bfd *result = bfd_fdopenr (filename, target, fd);
@@ -790,7 +894,7 @@ gdb_bfd_fdopenr (const char *filename, c
   if (result)
     gdb_bfd_ref (result);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 
@@ -828,7 +932,7 @@ gdb_bfd_count_sections (bfd *abfd)
 int
 gdb_bfd_requires_relocations (bfd *abfd)
 {
-  struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+  struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
 
   if (gdata->relocation_computed == 0)
     {
@@ -854,16 +958,16 @@ gdb_bfd_requires_relocations (bfd *abfd)
 static int
 print_one_bfd (void **slot, void *data)
 {
-  bfd *abfd = *slot;
-  struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
-  struct ui_out *uiout = data;
+  bfd *abfd = (struct bfd *) *slot;
+  struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
+  struct ui_out *uiout = (struct ui_out *) data;
   struct cleanup *inner;
 
   inner = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-  ui_out_field_int (uiout, "refcount", gdata->refc);
-  ui_out_field_string (uiout, "addr", host_address_to_string (abfd));
-  ui_out_field_string (uiout, "filename", bfd_get_filename (abfd));
-  ui_out_text (uiout, "\n");
+  uiout->field_int ("refcount", gdata->refc);
+  uiout->field_string ("addr", host_address_to_string (abfd));
+  uiout->field_string ("filename", bfd_get_filename (abfd));
+  uiout->text ("\n");
   do_cleanups (inner);
 
   return 1;
@@ -878,11 +982,11 @@ maintenance_info_bfds (char *arg, int fr
   struct ui_out *uiout = current_uiout;
 
   cleanup = make_cleanup_ui_out_table_begin_end (uiout, 3, -1, "bfds");
-  ui_out_table_header (uiout, 10, ui_left, "refcount", "Refcount");
-  ui_out_table_header (uiout, 18, ui_left, "addr", "Address");
-  ui_out_table_header (uiout, 40, ui_left, "filename", "Filename");
+  uiout->table_header (10, ui_left, "refcount", "Refcount");
+  uiout->table_header (18, ui_left, "addr", "Address");
+  uiout->table_header (40, ui_left, "filename", "Filename");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
   htab_traverse (all_bfds, print_one_bfd, uiout);
 
   do_cleanups (cleanup);
@@ -900,4 +1004,25 @@ _initialize_gdb_bfd (void)
   add_cmd ("bfds", class_maintenance, maintenance_info_bfds, _("\
 List the BFDs that are currently open."),
 	   &maintenanceinfolist);
+
+  add_setshow_boolean_cmd ("bfd-sharing", no_class,
+			   &bfd_sharing, _("\
+Set whether gdb will share bfds that appear to be the same file."), _("\
+Show whether gdb will share bfds that appear to be the same file."), _("\
+When enabled gdb will reuse existing bfds rather than reopening the\n\
+same file.  To decide if two files are the same then gdb compares the\n\
+filename, file size, file modification time, and file inode."),
+			   NULL,
+			   &show_bfd_sharing,
+			   &maintenance_set_cmdlist,
+			   &maintenance_show_cmdlist);
+
+  add_setshow_zuinteger_cmd ("bfd-cache", class_maintenance,
+			     &debug_bfd_cache, _("\
+Set bfd cache debugging."), _("\
+Show bfd cache debugging."), _("\
+When non-zero, bfd cache specific debugging is enabled."),
+			     NULL,
+			     &show_bfd_cache_debug,
+			     &setdebuglist, &showdebuglist);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_bfd.h ./gdb/gdb_bfd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_bfd.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_bfd.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for BFD wrappers used by GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 #define GDB_BFD_H
 
 #include "registry.h"
+#include "common/gdb_ref_ptr.h"
 
 DECLARE_REGISTRY (bfd);
 
@@ -39,6 +40,34 @@ int is_target_filename (const char *name
 
 int gdb_bfd_has_target_filename (struct bfd *abfd);
 
+/* Increment the reference count of ABFD.  It is fine for ABFD to be
+   NULL; in this case the function does nothing.  */
+
+void gdb_bfd_ref (struct bfd *abfd);
+
+/* Decrement the reference count of ABFD.  If this is the last
+   reference, ABFD will be freed.  If ABFD is NULL, this function does
+   nothing.  */
+
+void gdb_bfd_unref (struct bfd *abfd);
+
+/* A policy class for gdb::ref_ptr for BFD reference counting.  */
+struct gdb_bfd_ref_policy
+{
+  static void incref (struct bfd *abfd)
+  {
+    gdb_bfd_ref (abfd);
+  }
+
+  static void decref (struct bfd *abfd)
+  {
+    gdb_bfd_unref (abfd);
+  }
+};
+
+/* A gdb::ref_ptr that has been specialized for BFD objects.  */
+typedef gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy> gdb_bfd_ref_ptr;
+
 /* Open a read-only (FOPEN_RB) BFD given arguments like bfd_fopen.
    If NAME starts with TARGET_SYSROOT_PREFIX then the BFD will be
    opened using target fileio operations if necessary.  Returns NULL
@@ -51,18 +80,7 @@ int gdb_bfd_has_target_filename (struct 
    not be exactly NAME but rather NAME with TARGET_SYSROOT_PREFIX
    stripped.  */
 
-struct bfd *gdb_bfd_open (const char *name, const char *target, int fd);
-
-/* Increment the reference count of ABFD.  It is fine for ABFD to be
-   NULL; in this case the function does nothing.  */
-
-void gdb_bfd_ref (struct bfd *abfd);
-
-/* Decrement the reference count of ABFD.  If this is the last
-   reference, ABFD will be freed.  If ABFD is NULL, this function does
-   nothing.  */
-
-void gdb_bfd_unref (struct bfd *abfd);
+gdb_bfd_ref_ptr gdb_bfd_open (const char *name, const char *target, int fd);
 
 /* Mark the CHILD BFD as being a member of PARENT.  Also, increment
    the reference count of CHILD.  Calling this function ensures that
@@ -110,45 +128,46 @@ int gdb_bfd_crc (struct bfd *abfd, unsig
 /* A wrapper for bfd_fopen that initializes the gdb-specific reference
    count.  */
 
-bfd *gdb_bfd_fopen (const char *, const char *, const char *, int);
+gdb_bfd_ref_ptr gdb_bfd_fopen (const char *, const char *, const char *, int);
 
 /* A wrapper for bfd_openr that initializes the gdb-specific reference
    count.  */
 
-bfd *gdb_bfd_openr (const char *, const char *);
+gdb_bfd_ref_ptr gdb_bfd_openr (const char *, const char *);
 
 /* A wrapper for bfd_openw that initializes the gdb-specific reference
    count.  */
 
-bfd *gdb_bfd_openw (const char *, const char *);
+gdb_bfd_ref_ptr gdb_bfd_openw (const char *, const char *);
 
 /* A wrapper for bfd_openr_iovec that initializes the gdb-specific
    reference count.  */
 
-bfd *gdb_bfd_openr_iovec (const char *filename, const char *target,
-			  void *(*open_func) (struct bfd *nbfd,
-					      void *open_closure),
-			  void *open_closure,
-			  file_ptr (*pread_func) (struct bfd *nbfd,
-						  void *stream,
-						  void *buf,
-						  file_ptr nbytes,
-						  file_ptr offset),
-			  int (*close_func) (struct bfd *nbfd,
-					     void *stream),
-			  int (*stat_func) (struct bfd *abfd,
-					    void *stream,
-					    struct stat *sb));
+gdb_bfd_ref_ptr gdb_bfd_openr_iovec (const char *filename, const char *target,
+				     void *(*open_func) (struct bfd *nbfd,
+							 void *open_closure),
+				     void *open_closure,
+				     file_ptr (*pread_func) (struct bfd *nbfd,
+							     void *stream,
+							     void *buf,
+							     file_ptr nbytes,
+							     file_ptr offset),
+				     int (*close_func) (struct bfd *nbfd,
+							void *stream),
+				     int (*stat_func) (struct bfd *abfd,
+						       void *stream,
+						       struct stat *sb));
 
 /* A wrapper for bfd_openr_next_archived_file that initializes the
    gdb-specific reference count.  */
 
-bfd *gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous);
+gdb_bfd_ref_ptr gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous);
 
 /* A wrapper for bfd_fdopenr that initializes the gdb-specific
    reference count.  */
 
-bfd *gdb_bfd_fdopenr (const char *filename, const char *target, int fd);
+gdb_bfd_ref_ptr gdb_bfd_fdopenr (const char *filename, const char *target,
+				 int fd);
 
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_buildall.sh ./gdb/gdb_buildall.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_buildall.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_buildall.sh	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 # Build script to build GDB with all targets enabled.
 
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -103,7 +103,7 @@ builddir=`cd $2 && /bin/pwd` || exit 1
 make=${MAKE:-make}
 MAKE=${make}
 export MAKE
-# We dont want GDB do dump cores.
+# We don't want GDB do dump cores.
 ulimit -c 0
 
 # Just make sure we're in the right directory.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb.c ./gdb/gdb.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Main function for CLI gdb.  
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbcmd.h ./gdb/gdbcmd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbcmd.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbcmd.h	2017-03-06 01:49:07.000000000 +0000
@@ -6,7 +6,7 @@
    fnasser@redhat.com    */
 
 /* Header file for GDB-specific command-line stuff.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -128,7 +128,7 @@ extern struct cmd_list_element *showchec
 extern struct cmd_list_element *save_cmdlist;
 
 extern void execute_command (char *, int);
-extern char *execute_command_to_string (char *p, int from_tty);
+extern std::string execute_command_to_string (char *p, int from_tty);
 
 enum command_control_type execute_control_command (struct command_line *);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-code-style.el ./gdb/gdb-code-style.el
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-code-style.el	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-code-style.el	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;;; gdb-code-style.el --- code style checker for GDB contributors
 
-;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 ;; Author: Yao Qi <yao@codesourcery.com>
 ;; Created: 17 April 2012
@@ -74,4 +74,9 @@
   )
 (add-hook 'c-mode-common-hook 'gdb-comment-hook)
 
+;; Set c-set-offset 'innamespace as a safe value to be used in .dir-locals.el.
+(setq safe-local-variable-values
+      (cons safe-local-variable-values
+	    '((eval c-set-offset 'innamespace 0)
+	      (c-offsets-alist (innamespace . 0)))))
 ;;; gdb-code-style.el ends here
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbcore.h ./gdb/gdbcore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbcore.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbcore.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine independent variables that describe the core file under GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -76,6 +76,9 @@ extern int safe_read_memory_integer (COR
 extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr,
 					      int len,
 					      enum bfd_endian byte_order);
+extern int safe_read_memory_unsigned_integer (CORE_ADDR memaddr, int len,
+					      enum bfd_endian byte_order,
+					      ULONGEST *return_value);
 
 /* Read an integer from debugged code memory, given address,
    number of bytes, and byte order for code.  */
@@ -151,9 +154,10 @@ extern void exec_file_attach (const char
 /* If the filename of the main executable is unknown, attempt to
    determine it.  If a filename is determined, proceed as though
    it was just specified with the "file" command.  Do nothing if
-   the filename of the main executable is already known.  */
+   the filename of the main executable is already known.
+   DEFER_BP_RESET uses SYMFILE_DEFER_BP_RESET for the main symbol file.  */
 
-extern void exec_file_locate_attach (int pid, int from_tty);
+extern void exec_file_locate_attach (int pid, int defer_bp_reset, int from_tty);
 
 extern void exec_file_clear (int from_tty);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_curses.h ./gdb/gdb_curses.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_curses.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_curses.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Portable <curses.h>.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-demangle.h ./gdb/gdb-demangle.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-demangle.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-demangle.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Basic C++ demangling support for GDB.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-dlfcn.c ./gdb/gdb-dlfcn.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-dlfcn.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-dlfcn.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Platform independent shared object routines for GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -102,7 +102,7 @@ gdb_dlsym (void *handle, const char *sym
 #ifdef HAVE_DLFCN_H
   return dlsym (handle, symbol);
 #elif __MINGW32__
-  return (void *) GetProcAddress (handle, symbol);
+  return (void *) GetProcAddress ((HMODULE) handle, symbol);
 #endif
 }
 
@@ -112,7 +112,7 @@ gdb_dlclose (void *handle)
 #ifdef HAVE_DLFCN_H
   return dlclose (handle);
 #elif __MINGW32__
-  return !((int) FreeLibrary (handle));
+  return !((int) FreeLibrary ((HMODULE) handle));
 #endif
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-dlfcn.h ./gdb/gdb-dlfcn.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-dlfcn.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-dlfcn.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Platform independent shared object routines for GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_expat.h ./gdb/gdb_expat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_expat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_expat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Slightly more portable version of <expat.h>.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-gdb.py ./gdb/gdb-gdb.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-gdb.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-gdb.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -24,29 +24,26 @@ class TypeFlag:
 
     In the GDB sources, struct type has a component called instance_flags
     in which the value is the addition of various flags.  These flags are
-    defined by two enumerates: type_flag_value, and type_instance_flag_value.
-    This class helps us recreate a list with all these flags that is
-    easy to manipulate and sort.  Because all flag names start with either
-    TYPE_FLAG_ or TYPE_INSTANCE_FLAG_, a short_name attribute is provided
-    that strips this prefix.
+    defined by the enumerates type_instance_flag_value.  This class helps us
+    recreate a list with all these flags that is easy to manipulate and sort.
+    Because all flag names start with TYPE_INSTANCE_FLAG_, a short_name
+    attribute is provided that strips this prefix.
 
     ATTRIBUTES
-      name:  The enumeration name (eg: "TYPE_FLAG_UNSIGNED").
+      name:  The enumeration name (eg: "TYPE_INSTANCE_FLAG_CONST").
       value: The associated value.
       short_name: The enumeration name, with the suffix stripped.
     """
     def __init__(self, name, value):
         self.name = name
         self.value = value
-        self.short_name = name.replace("TYPE_FLAG_", '')
-        if self.short_name == name:
-            self.short_name = name.replace("TYPE_INSTANCE_FLAG_", '')
+        self.short_name = name.replace("TYPE_INSTANCE_FLAG_", '')
     def __cmp__(self, other):
         """Sort by value order."""
         return self.value.__cmp__(other.value)
 
-# A list of all existing TYPE_FLAGS_* and TYPE_INSTANCE_FLAGS_*
-# enumerations, stored as TypeFlags objects.  Lazy-initialized.
+# A list of all existing TYPE_INSTANCE_FLAGS_* enumerations,
+# stored as TypeFlags objects.  Lazy-initialized.
 TYPE_FLAGS = None
 
 class TypeFlagsPrinter:
@@ -86,24 +83,13 @@ class TypeFlagsPrinter:
         global TYPE_FLAGS
         TYPE_FLAGS = []
         try:
-            flags = gdb.lookup_type("enum type_flag_value")
-        except:
-            print "Warning: Cannot find enum type_flag_value type."
-            print "         `struct type' pretty-printer will be degraded"
-            return
-        try:
             iflags = gdb.lookup_type("enum type_instance_flag_value")
         except:
-            print "Warning: Cannot find enum type_instance_flag_value type."
-            print "         `struct type' pretty-printer will be degraded"
+            print("Warning: Cannot find enum type_instance_flag_value type.")
+            print("         `struct type' pretty-printer will be degraded")
             return
-        # Note: TYPE_FLAG_MIN is a duplicate of TYPE_FLAG_UNSIGNED,
-        # so exclude it from the list we are building.
         TYPE_FLAGS = [TypeFlag(field.name, field.enumval)
-                      for field in flags.fields()
-                      if field.name != 'TYPE_FLAG_MIN']
-        TYPE_FLAGS += [TypeFlag(field.name, field.enumval)
-                       for field in iflags.fields()]
+                      for field in iflags.fields()]
         TYPE_FLAGS.sort()
 
 class StructTypePrettyPrinter:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb.h ./gdb/gdb.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Library interface into GDB.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_mbuild.sh ./gdb/gdb_mbuild.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_mbuild.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_mbuild.sh	2017-03-06 01:49:07.000000000 +0000
@@ -3,7 +3,7 @@
 #  Multi-build script for testing compilation of all maintained
 #  configs of GDB.
 
-#  Copyright (C) 2002-2015 Free Software Foundation, Inc.
+#  Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
 #  Contributed by Richard Earnshaw  (rearnsha@arm.com)
 
@@ -195,7 +195,7 @@ log ()
 
 
 
-# Warn the user of what is comming, print the list of targets
+# Warn the user of what is coming, print the list of targets
 
 echo "$alltarg"
 echo ""
@@ -273,7 +273,7 @@ do
     then
 	# Iff the build fails remove the final build target so that
 	# the follow-on code knows things failed.  Stops the follow-on
-	# code thinking that a failed rebuild succedded (executable
+	# code thinking that a failed rebuild succeeded (executable
 	# left around from previous build).
 	echo ... ${make} ${keepgoing} ${makejobs} ${target}
 	( ${make} ${keepgoing} ${makejobs} all-gdb || rm -f gdb/gdb gdb/gdb.exe
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_obstack.c ./gdb/gdb_obstack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_obstack.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_obstack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Obstack wrapper for GDB.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,5 +43,15 @@ obconcat (struct obstack *obstackp, ...)
   va_end (ap);
   obstack_1grow (obstackp, 0);
 
-  return obstack_finish (obstackp);
+  return (char *) obstack_finish (obstackp);
+}
+
+/* See gdb_obstack.h.  */
+
+char *
+obstack_strdup (struct obstack *obstackp, const char *string)
+{
+  char *obstring = (char *) obstack_alloc (obstackp, strlen (string) + 1);
+  strcpy (obstring, string);
+  return obstring;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_obstack.h ./gdb/gdb_obstack.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_obstack.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_obstack.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Obstack wrapper for GDB.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,4 +58,9 @@
 
 extern char *obconcat (struct obstack *obstackp, ...) ATTRIBUTE_SENTINEL;
 
+/* Duplicate STRING, returning an equivalent string that's allocated on the
+   obstack OBSTACKP.  */
+
+extern char *obstack_strdup (struct obstack *obstackp, const char *string);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_proc_service.h ./gdb/gdb_proc_service.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_proc_service.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_proc_service.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* <proc_service.h> replacement for systems that don't have it.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,8 @@
 
 #include <sys/types.h>
 
+#include "gregset.h"
+
 #ifdef HAVE_PROC_SERVICE_H
 
 /* glibc's proc_service.h doesn't wrap itself with extern "C".  Need
@@ -60,8 +62,6 @@ EXTERN_C_POP
 #include <sys/procfs.h>
 #endif
 
-#include "gregset.h"
-
 EXTERN_C_PUSH
 
 /* Functions in this interface return one of these status codes.  */
@@ -124,7 +124,7 @@ extern pid_t ps_getpid (struct ps_procha
 /* Fetch the special per-thread address associated with the given LWP.
    This call is only used on a few platforms (most use a normal register).
    The meaning of the `int' parameter is machine-dependent.  */
-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
 				    lwpid_t, int, psaddr_t *);
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_ptrace.h ./gdb/gdb_ptrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_ptrace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_ptrace.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,149 +0,0 @@
-/* Portable <sys/ptrace.h>
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-   
-#ifndef GDB_PTRACE_H
-#define GDB_PTRACE_H
-
-/* The <sys/ptrace.h> header was introduced with 4.4BSD, and provided
-   the PT_* symbolic constants for the ptrace(2) request numbers.  The
-   ptrace(2) prototype was added later to the same header on BSD.
-   SunOS and GNU/Linux have slightly different symbolic names for the
-   constants that start with PTRACE_*.  System V still doesn't have
-   (and probably never will have) a <sys/ptrace.h> with symbolic
-   constants; the ptrace(2) prototype can be found in <unistd.h>.
-   Fortunately all systems use the same numerical constants for the
-   common ptrace requests.  */
-
-#ifdef HAVE_PTRACE_H
-# include <ptrace.h>
-#elif defined(HAVE_SYS_PTRACE_H)
-# include <sys/ptrace.h>
-#endif
-
-/* No need to include <unistd.h> since it's already included by
-   "defs.h".  */
-
-#ifndef PT_TRACE_ME
-# define PT_TRACE_ME	0
-#endif
-
-#ifndef PT_READ_I
-# define PT_READ_I	1	/* Read word in child's I space.  */
-#endif
-
-#ifndef PT_READ_D
-# define PT_READ_D	2	/* Read word in child's D space.  */
-#endif
-
-#ifndef PT_READ_U
-# define PT_READ_U	3	/* Read word in child's U space.  */
-#endif
-
-#ifndef PT_WRITE_I
-# define PT_WRITE_I	4	/* Write word in child's I space.  */
-#endif
-
-#ifndef PT_WRITE_D
-# define PT_WRITE_D	5	/* Write word in child's D space.  */
-#endif
-
-#ifndef PT_WRITE_U
-# define PT_WRITE_U	6	/* Write word in child's U space.  */
-#endif
-
-/* HP-UX doesn't define PT_CONTINUE and PT_STEP.  Instead of those two
-   ptrace requests, it has PT_CONTIN, PT_CONTIN1, PT_SINGLE and
-   PT_SINGLE1.  PT_CONTIN1 and PT_SINGLE1 preserve pending signals,
-   which apparently is what is wanted by the HP-UX native code.  */
-
-#ifndef PT_CONTINUE
-# ifdef PT_CONTIN1
-#  define PT_CONTINUE	PT_CONTIN1
-# else
-#  define PT_CONTINUE	7	/* Continue the child.  */
-# endif
-#endif
-
-#ifndef PT_KILL
-# define PT_KILL	8	/* Kill the child process.  */
-#endif
-
-#ifndef PT_STEP
-# ifdef PT_SINGLE1
-#  define PT_STEP	PT_SINGLE1
-# else
-#  define PT_STEP	9	/* Single step the child.   */
-# endif
-#endif
-
-/* Not all systems support attaching and detaching.   */
-
-#ifndef PT_ATTACH
-# ifdef PTRACE_ATTACH
-#  define PT_ATTACH PTRACE_ATTACH
-# endif
-#endif
-
-#ifndef PT_DETACH
-# ifdef PTRACE_DETACH
-#  define PT_DETACH PTRACE_DETACH
-# endif
-#endif
-
-/* For systems such as HP/UX that do not provide PT_SYSCALL, define it
-   here as an alias for PT_CONTINUE.  This is what the PT_SYSCALL
-   request is expected to do, in addition to stopping when entering/
-   exiting a system call.  Chances are, if the system supports system
-   call tracing, enabling this feature is probably done separately;
-   and there is probably no special request that we would be required
-   to use when resuming the execution of our program.  */
-#ifndef PT_SYSCALL
-# ifdef PTRACE_SYSCALL
-#  define PT_SYSCALL PTRACE_SYSCALL
-#else
-#  define PT_SYSCALL PT_CONTINUE
-# endif
-#endif
-
-/* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64
-   or whatever it's called these days, don't provide a prototype for
-   ptrace.  Provide one to silence compiler warnings.  */
-
-#ifndef HAVE_DECL_PTRACE
-extern PTRACE_TYPE_RET ptrace();
-#endif
-
-/* Some systems, at least AIX and HP-UX have a ptrace with five
-   arguments.  Since we never use the fifth argument, define a ptrace
-   macro that calls the real ptrace with the last argument set to
-   zero.  */
-
-#ifdef PTRACE_TYPE_ARG5
-# ifdef HAVE_PTRACE64
-#  define ptrace(request, pid, addr, data) \
-          ptrace64 (request, pid, addr, data, 0)
-#  undef PTRACE_TYPE_ARG3
-#  define PTRACE_TYPE_ARG3 long long
-# else
-#  define ptrace(request, pid, addr, data) \
-          ptrace (request, pid, addr, data, 0)
-# endif
-#endif
-
-#endif /* gdb_ptrace.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_regex.h ./gdb/gdb_regex.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_regex.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_regex.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Portable <regex.h>.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_select.h ./gdb/gdb_select.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_select.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_select.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Slightly more portable version of <sys/select.h>.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #else
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #endif
 
 #ifdef USE_WIN32API
@@ -33,4 +33,19 @@
 extern int gdb_select (int n, fd_set *readfds, fd_set *writefds,
 		       fd_set *exceptfds, struct timeval *timeout);
 
+/* Convenience wrapper around gdb_select that returns -1/EINTR if
+   set_quit_flag is set, either on entry or from a signal handler or
+   from a different thread while select is blocked.  The quit flag is
+   not cleared on exit -- the caller is responsible to check it with
+   check_quit_flag or QUIT.
+
+   Note this does NOT return -1/EINTR if any signal handler other than
+   SIGINT runs, nor if the current SIGINT handler does not call
+   set_quit_flag.  */
+extern int interruptible_select (int n,
+				 fd_set *readfds,
+				 fd_set *writefds,
+				 fd_set *exceptfds,
+				 struct timeval *timeout);
+
 #endif /* !defined(GDB_SELECT_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/acinclude.m4 ./gdb/gdbserver/acinclude.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/acinclude.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/acinclude.m4	2017-03-06 01:49:07.000000000 +0000
@@ -6,6 +6,9 @@ sinclude(../acx_configure_dir.m4)
 # This gets GDB_AC_LIBMCHECK.
 sinclude(../libmcheck.m4)
 
+# This gets AM_GDB_WARNINGS.
+sinclude(../warning.m4)
+
 dnl This gets autoconf bugfixes
 sinclude(../../config/override.m4)
 
@@ -23,8 +26,10 @@ m4_include(../common/common.m4)
 dnl For libiberty_INIT.
 m4_include(../libiberty.m4)
 
-dnl For --enable-build-with-cxx and COMPILER.
-m4_include(../build-with-cxx.m4)
+dnl For GDB_AC_PTRACE.
+m4_include(../ptrace.m4)
+
+m4_include(../ax_cxx_compile_stdcxx.m4)
 
 dnl Check for existence of a type $1 in libthread_db.h
 dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ax.c ./gdb/gdbserver/ax.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ax.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/ax.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Agent expression code for remote server.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -69,6 +69,7 @@ static const char *gdb_agent_op_names [g
 #undef DEFOP
   };
 
+#ifndef IN_PROCESS_AGENT
 static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] =
   {
     0
@@ -76,6 +77,7 @@ static const unsigned char gdb_agent_op_
 #include "ax.def"
 #undef DEFOP
   };
+#endif
 
 /* A wrapper for gdb_agent_op_names that does some bounds-checking.  */
 
@@ -102,9 +104,9 @@ gdb_parse_agent_expr (char **actparm)
   ++act;  /* skip the X */
   act = unpack_varlen_hex (act, &xlen);
   ++act;  /* skip a comma */
-  aexpr = xmalloc (sizeof (struct agent_expr));
+  aexpr = XNEW (struct agent_expr);
   aexpr->length = xlen;
-  aexpr->bytes = xmalloc (xlen);
+  aexpr->bytes = (unsigned char *) xmalloc (xlen);
   hex2bin (act, aexpr->bytes, xlen);
   *actparm = act + (xlen * 2);
   return aexpr;
@@ -129,7 +131,7 @@ gdb_unparse_agent_expr (struct agent_exp
 {
   char *rslt;
 
-  rslt = xmalloc (2 * aexpr->length + 1);
+  rslt = (char *) xmalloc (2 * aexpr->length + 1);
   bin2hex (aexpr->bytes, rslt, aexpr->length);
   return rslt;
 }
@@ -373,7 +375,7 @@ emit_le_goto (int *offset_p, int *size_p
 /* Scan an agent expression for any evidence that the given PC is the
    target of a jump bytecode in the expression.  */
 
-int
+static int
 is_goto_target (struct agent_expr *aexpr, int pc)
 {
   int i;
@@ -430,7 +432,7 @@ compile_bytecodes (struct agent_expr *ae
 
       /* Record the compiled-code address of the bytecode, for use by
 	 jump instructions.  */
-      aentry = xmalloc (sizeof (struct bytecode_address));
+      aentry = XNEW (struct bytecode_address);
       aentry->pc = pc;
       aentry->address = current_insn_ptr;
       aentry->goto_pc = -1;
@@ -1332,7 +1334,7 @@ gdb_eval_agent_expr (struct eval_agent_e
 		    op);
 	  /* If ever GDB generates any of these, we don't have the
 	     option of ignoring.  */
-	  return 1;
+	  return expr_eval_unhandled_opcode;
 
 	default:
 	  ax_debug ("Agent expression op 0x%x not recognized", op);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ax.h ./gdb/gdbserver/ax.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ax.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/ax.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Data structures and functions associated with agent expressions in GDB.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ChangeLog ./gdb/gdbserver/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/ChangeLog	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/ChangeLog	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,3256 @@
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* configure.ac: Check if the fs_base and gs_base members of
+	`struct user_regs_struct' exist.
+	* config.in: Regenerated.
+	* configure: Likewise.
+
+2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
+	target_read_memory.
+	* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
+	(get_next_pcs_syscall_next_pc): Likewise.
+
+2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
+
+	* win32-i386-low.c: Fix incorrect reference to a couple source files.
+	* nto-x86-low.c: Likewise.
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Include disable-implicit-rules.mk.
+
+2016-11-23  Pedro Alves  <palves@redhat.com>
+
+	* debug.c: Include <chrono> instead of "gdb_sys_time.h".
+	(debug_vprintf): Use std::chrono::steady_clock instead of
+	gettimeofday.  Use '.' instead of ':'.
+	* tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
+	(get_timestamp): Use std::chrono::steady_clock instead of
+	gettimeofday.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Fix whitespace formatting.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in (SFILES, OBS): Flatten list and order
+	alphabetically.
+
+2016-11-23  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c (handle_file_event): Use warning.
+	* linux-low.c (linux_resume_one_lwp_throw): Use warning.
+	* mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
+	Use warning.
+
+2016-11-23  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (check_zombie_leaders): Use debug_printf for debug
+	output.
+	* notif.c (handle_notif_ack, notif_event_enque): Likewise.
+	* remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
+	debug_printf and debug_flush for debug output.
+	* server.c (handle_general_set): Likewise.
+	* thread-db.c (try_thread_db_load): Use debug_printf for debug
+	output.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in (.c.o): Replace rule with ...
+	(%.o: %.c): ... this one.
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
+	prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
+	make.
+	* configure.ac: Remove checks for the make program.
+	* configure: Re-generate.
+
+2016-10-28  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (CXX_DIALECT): Get from configure.
+	(COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
+	* acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
+	* configure.ac: Call AX_CXX_COMPILE_STDCXX.
+	* config.in: Regenerate.
+	* configure: Regenerate.
+
+2016-10-27  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_supports_range_stepping): Return true if
+	can_software_single_step return true.
+
+2016-10-27  Yao Qi  <yao.qi@linaro.org>
+
+	* inferiors.c (find_inferior_in_random): New function.
+	* inferiors.h (find_inferior_in_random): Declare.
+	* linux-low.c (linux_wait_for_event_filtered): Call
+	find_inferior_in_random instead of find_inferior.
+
+2016-10-27  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_wait_1): If single-step breakpoints are
+	inserted, remove them.
+
+2016-10-26  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (handle_extended_wait): Link parent/child fork
+	threads.
+	(linux_wait_1): Unlink them.
+	(linux_set_resume_request): Ignore resume requests for
+	already-resumed and unhandled fork child threads.
+	* linux-low.h (struct lwp_info) <fork_relative>: New field.
+	* server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
+	New functions.
+	(handle_v_requests) <vCont>: Don't call require_running.
+	* server.h (in_queued_stop_replies): New declaration.
+
+2016-10-24  Yao Qi  <yao.qi@linaro.org>
+
+	PR server/20733
+	* linux-aarch64-low.c (append_insns): Cast the return value to
+	'uint32_t *'.
+
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
+
+2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* target.c (target_supports_multi_process): New function, moved
+	from...
+	* target.h (target_supports_multi_process): ... here.  Remove
+	macro.
+
+2016-10-05  Tom Tromey  <tom@tromey.com>
+
+	PR remote/20655:
+	* tracepoint.c (handle_tracepoint_bkpts): Check
+	ipa_error_tracepoint, not ipa_stopping_tracepoint.
+
+2016-10-05  Yao Qi  <yao.qi@linaro.org>
+
+	* configure.srv: Update the path of arm-*.xml files.
+
+2016-10-05  Terry Guo  <terry.guo@arm.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in: Adjust the path of rules.
+	* configure.srv: Update the path of xml files.
+	* regformats/arm-with-iwmmxt.dat: Regenerated.
+	* regformats/arm-with-neon.dat: Likewise.
+	* regformats/arm-with-vfpv2.dat: Likewise.
+	* regformats/arm-with-vfpv3.dat Likewise.
+
+2016-09-30  Yao Qi  <yao.qi@linaro.org>
+
+	PR gdbserver/20627
+	* target.c (target_stop_and_wait): Don't call
+	target_continue_no_signal, use resume_stop instead.
+
+2016-09-26  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_wait_1): Call debug_exit.
+
+2016-09-23  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (SFILES): Add common/new-op.c.
+	(OBS): Add common/new-op.o.
+	(new-op.o): New rule.
+
+2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* .gitinore: Ignore more files.
+
+2016-09-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
+	23.
+
+2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* server.c (start_inferior): Call target_mourn_inferior instead of
+	mourn_inferior; pass ptid_t argument to it.
+	(resume): Likewise.
+	(handle_target_event): Likewise.
+	* target.c (target_mourn_inferior): New function.
+	* target.h (mourn_inferior): Delete macro.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-low.c (lwp_is_stepping): New function.
+
+2016-09-06  Carl Love  <cel@us.ibm.com>
+
+	* server.c (start_inferior):  Fixed comment, requested comment change
+	didn't get updated correctly.  Removed reference to ptrace () call as
+	it is only true on Linux systems.
+
+2016-09-06  Carl Love  <cel@us.ibm.com>
+
+	* server.c (start_inferior):  Do not call
+	function target_post_create_inferior () if the
+	inferior process has already exited.
+
+2016-09-05  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
+	(COMPILE.pre, CC_LD): Use CXX directly.
+	(INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
+	* acinclude.m4: Don't include build-with-cxx.m4.
+	* configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
+	* configure: Regenerate.
+
+2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
+
+	PR gdb/19495
+	* remote-utils.c (relocate_instruction): Remove redundant strcpy()
+	call writing data to own_buf.
+
+2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* target.c (mywait): Call target_wait instead of
+	the_target->wait.
+	(target_wait): New function.
+
+2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* server.c (start_inferior): New variable 'ptid'.  Replace calls
+	to the_target->resume by target_continue{,_no_signal}, depending
+	on the case.
+	* target.c (target_stop_and_wait): Call target_continue_no_signal
+	instead of the_target->resume.
+	(target_continue): New function.
+
+2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
+
+2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	PR server/20491
+	* gdb_proc_service.h (ps_get_thread_area): Remove const from struct
+	ps_prochandle.
+	* linux-aarch64-low.c (ps_get_thread_area): Likewise.
+	* linux-arm-low.c (ps_get_thread_area): Likewise.
+	* linux-crisv32-low.c (ps_get_thread_area): Likewise.
+	* linux-m68k-low.c (ps_get_thread_area): Likewise.
+	* linux-mips-low.c (ps_get_thread_area): Likewise.
+	* linux-nios2-low.c (ps_get_thread_area): Likewise.
+	* linux-tic6x-low.c (ps_get_thread_area): Likewise.
+	* linux-x86-low.c (ps_get_thread_area): Likewise.
+	* linux-xtensa-low.c (ps_get_thread_area): Likewise.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
+	comment.  Use memcpy instead of casting through unsigned long.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
+	allocating around 0x80000000.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20415
+	* Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
+	(x32-avx512-linux-ipa.o): New rules.
+	* configure.ac (x86_64-*-linux*): New x32 check.
+	* configure.srv (ipa_x32_linux_regobj): New.
+	(x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
+	* linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
+	descriptions.
+	(initialize_low_tracepoint) [__ILP32__]: Initialize x32
+	descriptions.
+	* configure: Regenerate.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18653
+	* Makefile.in (OBS): Add signals-state-save-restore.o.
+	(signals-state-save-restore.o): New rule.
+	* config.in: Regenerate.
+	* configure: Regenerate.
+	* linux-low.c: Include "signals-state-save-restore.h".
+	(linux_create_inferior): Call
+	restore_original_signals_state.
+	* server.c: Include "dispositions-save-restore.h".
+	(captured_main): Call save_original_signals_state.
+
+2016-08-05  Pedro Alves  <palves@redhat.com>
+
+	* configure: Regenerate.
+
+2016-08-04  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (regsets_fetch_inferior_registers): Check
+	errno is ESRCH or not.
+
+2016-08-02  Yao Qi  <yao.qi@linaro.org>
+
+	* thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
+	<td_ta_set_event_p, td_ta_event_addr_p>: Remove.
+	(thread_db_load_search): Update.
+	(try_thread_db_load_1): Don't look for td_ta_event_addr,
+	td_ta_set_event and td_ta_event_getmsg.
+
+2016-07-26  Pedro Alves  <palves@redhat.com>
+
+	PR server/20414
+	* linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
+	of unsigned long for 64-bit registers and use uint32_t instead of
+	unsigned int for 32-bit registers.
+
+2016-07-26  Pedro Alves  <palves@redhat.com>
+
+	* linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
+	to 'ptrace'.
+
+2016-07-21  Tom Tromey  <tom@tromey.com>
+
+	* configure: Rebuild.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (find_gdb_breakpoint): Cast bp to
+	'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* server.c (handle_v_requests): Support s and S actions
+	if target_supports_software_single_step return true.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (resume_stopped_resumed_lwps): If resume request
+	is resume_step, call maybe_hw_step.
+	(linux_wait_1): Stop all threads, remove reinsert breakpoints,
+	and unstop them.
+	(linux_resume_one_lwp_throw): Don't assert the thread has reinsert
+	breakpoints or not.
+	(proceed_one_lwp): If resume request is resume_step, install
+	reinsert breakpoints and call maybe_hw_step.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (proceed_one_lwp): Declare.
+	(linux_resume_one_thread): Remove local variable 'step'.
+	Lift code enqueue signal.  Call proceed_one_lwp instead of
+	linux_resume_one_lwp.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_resume_one_thread): Call
+	enqueue_pending_signal.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* gdbthread.h (make_cleanup_restore_current_thread): Declare.
+	* inferiors.c (do_restore_current_thread_cleanup): New function.
+	(make_cleanup_restore_current_thread): Likewise.
+	* linux-low.c (install_software_single_step_breakpoints): Call
+	make_cleanup_restore_current_thread.  Switch current_thread to
+	thread.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
+	(set_reinsert_breakpoint): New parameter ptid.  Callers updated.
+	(clone_one_breakpoint): Likewise.
+	(delete_reinsert_breakpoints): Change parameter to thread.
+	Callers updated.
+	(has_reinsert_breakpoints): Likewise.
+	(uninsert_reinsert_breakpoints): Likewise.
+	(reinsert_reinsert_breakpoints): Likewise.
+	* mem-break.h (set_reinsert_breakpoint): Update declaration.
+	(delete_reinsert_breakpoints): Likewise.
+	(reinsert_reinsert_breakpoints): Likewise.
+	(uninsert_reinsert_breakpoints): Likewise.
+	(has_reinsert_breakpoints): Likewise.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* inferiors.c (get_thread_process): Make parameter const.
+	* inferiors.h (get_thread_process): Update declaration.
+	* mem-break.c (clone_all_breakpoints): Remove all parameters.
+	Add new parameters child_thread and parent_thread.  Callers
+	updated.
+	* mem-break.h (clone_all_breakpoints): Update declaration.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (struct breakpoint) <cond_list>: Remove.
+	<command_list, handler>: Remove.
+	(struct gdb_breakpoint): New.
+	(struct other_breakpoint): New.
+	(struct reinsert_breakpoint): New.
+	(is_gdb_breakpoint): New function.
+	(any_persistent_commands): Update command_list if
+	is_gdb_breakpoint returns true.
+	(set_breakpoint): Create breakpoints according to their types.
+	(find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
+	(set_gdb_breakpoint_1): Likewise.
+	(set_gdb_breakpoint): Likewise.
+	(clear_breakpoint_conditions): Change parameter type to
+	'struct gdb_breakpoint *'.
+	(clear_breakpoint_commands): Likewise.
+	(clear_breakpoint_conditions_and_commands): Likewise.
+	(add_condition_to_breakpoint): Likewise.
+	(add_breakpoint_condition): Likewise.
+	(add_commands_to_breakpoint): Likewise.
+	(check_breakpoints): Check other_breakpoint.
+	(clone_one_breakpoint): Clone breakpopint according to its type.
+	* mem-break.h (struct gdb_breakpoint): Declare.
+	(set_gdb_breakpoint): Update declaration.
+	(clear_breakpoint_conditions_and_commands): Likewise.
+	(add_breakpoint_condition): Likewise.
+	(add_breakpoint_commands): Likewise.
+	* server.c (process_point_options): Change parameter type to
+	'struct gdb_breakpoint *'.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* mem-break.c (set_breakpoint_at): Rename it to ...
+	(set_breakpoint_type_at): ... it.
+	(set_breakpoint_at): Call set_breakpoint_type_at.
+	(set_reinsert_breakpoint): Call set_breakpoint_type_at.
+	* mem-break.h (set_breakpoint_at): Update comments.
+
+2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
+
+	* linux-nios2-low.c (nios2_fill_gregset): Add type cast
+	to buf parameter.
+	(nios2_store_gregset): Likewise.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+	    Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c: Change interface to take the target lwp_info
+	pointer directly and return void.  Handle detaching from a zombie
+	thread.
+	(linux_detach_lwp_callback): New function.
+	(linux_detach): Detach from the leader thread after detaching from
+	the clone threads.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
+	for variable new_offset.
+	(aarch64_ftrace_insn_reloc_b_cond): Likewise.
+	(aarch64_ftrace_insn_reloc_cb): Likewise.
+	(aarch64_ftrace_insn_reloc_tb): Likewise.
+	(aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
+	PRIx64 instead of PRIx32.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_get_syscall_trapinfo): New function.
+	(the_low_target): Install arm_get_syscall_trapinfo.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
+	function.
+	(the_low_target): Install aarch64_get_syscall_trapinfo.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
+	Callers updated.
+	* linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
+	Remove parameter sysno.
+	* linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
+	sysret.
+
+2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* linux-s390-low.c (s390_emit_eq_goto): Mark function static.
+	(s390_emit_ne_goto): Likewise.
+	(s390_emit_lt_goto): Likewise.
+	(s390_emit_le_goto): Likewise.
+	(s390_emit_gt_goto): Likewise.
+	(s390_emit_ge_goto): Likewise.
+	(s390x_emit_eq_goto): Likewise.
+	(s390x_emit_ne_goto): Likewise.
+	(s390x_emit_lt_goto): Likewise.
+	(s390x_emit_le_goto): Likewise.
+	(s390x_emit_gt_goto): Likewise.
+	(s390x_emit_ge_goto): Likewise.
+	(s390_emit_ops_impl): Mark variable static.
+	(s390x_emit_ops): Likewise.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (handle_extended_wait): Call
+	uninsert_reinsert_breakpoints for the parent process.  Remove
+	reinsert breakpoints from the child process.  Reinsert them to
+	the parent process when vfork is done.
+	* mem-break.c (uninsert_reinsert_breakpoints): New function.
+	(reinsert_reinsert_breakpoints): New function.
+	* mem-break.h (uninsert_reinsert_breakpoints): Declare
+	(reinsert_reinsert_breakpoints): Declare.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (handle_extended_wait): If the parent is doing
+	step-over, remove the reinsert breakpoints from the forked child.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (unsuspend_all_lwps): Declare.
+	(linux_low_filter_event): If thread exited, call finish_step_over.
+	If step-over is finished, unsuspend other threads.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_resume_one_lwp_throw): Assert
+	has_reinsert_breakpoints returns false.
+	* mem-break.c (delete_disabled_breakpoints): Assert
+	bp type isn't reinsert_breakpoint.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (maybe_hw_step): New function.
+	(linux_resume_one_lwp_throw): Call maybe_hw_step.
+	(finish_step_over): Switch current_thread to lwp temporarily,
+	and assert has_reinsert_breakpoints returns true.
+	(proceed_one_lwp): Call maybe_hw_step.
+	* mem-break.c (has_reinsert_breakpoints): New function.
+	* mem-break.h (has_reinsert_breakpoints): Declare.
+
+2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* win32-low.c (win32_create_inferior): Add pointer casts for C++.
+
+2016-05-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
+	instead of find_inferior.
+
+2016-05-05  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
+	Initialize res to zero.
+
+2016-05-05  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
+	to uint32_t.
+
+2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+	* spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
+	used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
+	(fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
+
+2016-04-28  Par Olsson  <par.olsson@windriver.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	* tracepoint.c (write_inferior_int8): New function.
+	(cmd_qtenable_disable): Write enable flag using
+	write_inferior_int8.
+
+2016-04-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (lwp_signal_can_be_delivered): Adjust.
+	(need_step_over_p): Return zero if the LWP has pending signals
+	can be delivered on software single step target.
+
+2016-04-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
+	return instead of error.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
+	to 23.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (lwp_signal_can_be_delivered): Don't deliver
+	signal when stepping over breakpoint with software single
+	step.
+
+2016-04-21  Pedro Alves  <palves@redhat.com>
+
+	* linux-s390-low.c (s390_collect_ptrace_register)
+	(s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
+	add casts.
+	(s390_check_regset): Use void * instead of gdb_byte *.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
+	* configure: Renegerate.
+
+2016-04-20  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c: Include "arch/arm-linux.h".
+	(arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
+	number 16.
+	(arm_store_gregset): Likewise.
+
+2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* Makefile.in (clean): Add removal for i386-avx-mpx.c,
+	i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
+	(i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
+	(amd64-avx-mpx-linux.c): New rules.
+	(amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
+	* configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
+	(srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
+	(srv_amd64_regobj): Add amd64-avx-mpx.o.
+	(srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
+	(srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
+	(srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
+	(srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
+	(srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
+	(ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
+	(ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
+	* linux-x86-low.c (x86_linux_read_description): Add case for
+	X86_XSTATE_AVX_MPX_MASK.
+	(x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
+	(initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
+	init_registers_i386_avx_mpx_linux.
+	* linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
+	(initialize_low_tracepoint): Call
+	init_registers_i386_avx_mpx_linux.
+	* linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
+	(initialize_low_tracepoint): Call
+	init_registers_amd64_avx_mpx_linux.
+	* linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
+	(init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
+	(init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
+	declarations.
+
+2016-04-18  Pedro Alves  <palves@redhat.com>
+
+	* configure: Regenerate.
+
+2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
+	(aarch64_emit_sub): Likewise.
+
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+	* utils.c (prepare_to_throw_exception): Delete.
+
+2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
+
+2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
+
+2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-aarch64-ipa.c: Add <elf.h> include.
+	* linux-ppc-ipa.c: Add <elf.h> include.
+	* linux-s390-ipa.c: Add <elf.h> include.
+
+2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (gdb_collect_ptr): Remove const qualifier.
+	(get_raw_reg_ptr): Likewise.
+	(get_trace_state_variable_value_ptr): Likewise.
+	(set_trace_state_variable_value_ptr): Likewise.
+	(initialize_tracepoint): Cast alloc_jump_pad_buffer result to
+	char *.
+
+2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
+	    Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR/17221
+	* linux-ppc-low.c (emit_insns): New function.
+	(__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
+	(ppc_emit_prologue): New function.
+	(ppc_emit_epilogue): New function.
+	(ppc_emit_add): New function.
+	(ppc_emit_sub): New function.
+	(ppc_emit_mul): New function.
+	(ppc_emit_lsh): New function.
+	(ppc_emit_rsh_signed): New function.
+	(ppc_emit_rsh_unsigned): New function.
+	(ppc_emit_ext): New function.
+	(ppc_emit_zero_ext): New function.
+	(ppc_emit_log_not): New function.
+	(ppc_emit_bit_and): New function.
+	(ppc_emit_bit_or): New function.
+	(ppc_emit_bit_xor): New function.
+	(ppc_emit_bit_not): New function.
+	(ppc_emit_equal): New function.
+	(ppc_emit_less_signed): New function.
+	(ppc_emit_less_unsigned): New function.
+	(ppc_emit_ref): New function.
+	(ppc_emit_const): New function.
+	(ppc_emit_reg): New function.
+	(ppc_emit_pop): New function.
+	(ppc_emit_stack_flush): New function.
+	(ppc_emit_swap): New function.
+	(ppc_emit_stack_adjust): New function.
+	(ppc_emit_call): New function.
+	(ppc_emit_int_call_1): New function.
+	(ppc_emit_void_call_2): New function.
+	(ppc_emit_if_goto): New function.
+	(ppc_emit_goto): New function.
+	(ppc_emit_eq_goto): New function.
+	(ppc_emit_ne_goto): New function.
+	(ppc_emit_lt_goto): New function.
+	(ppc_emit_le_goto): New function.
+	(ppc_emit_gt_goto): New function.
+	(ppc_emit_ge_goto): New function.
+	(ppc_write_goto_address): New function.
+	(ppc_emit_ops_impl): New static variable.
+	(ppc64v1_emit_prologue): New function.
+	(ppc64v2_emit_prologue): New function.
+	(ppc64_emit_epilogue): New function.
+	(ppc64_emit_add): New function.
+	(ppc64_emit_sub): New function.
+	(ppc64_emit_mul): New function.
+	(ppc64_emit_lsh): New function.
+	(ppc64_emit_rsh_signed): New function.
+	(ppc64_emit_rsh_unsigned): New function.
+	(ppc64_emit_ext): New function.
+	(ppc64_emit_zero_ext): New function.
+	(ppc64_emit_log_not): New function.
+	(ppc64_emit_bit_and): New function.
+	(ppc64_emit_bit_or): New function.
+	(ppc64_emit_bit_xor): New function.
+	(ppc64_emit_bit_not): New function.
+	(ppc64_emit_equal): New function.
+	(ppc64_emit_less_signed): New function.
+	(ppc64_emit_less_unsigned): New function.
+	(ppc64_emit_ref): New function.
+	(ppc64_emit_const): New function.
+	(ppc64v1_emit_reg): New function.
+	(ppc64v2_emit_reg): New function.
+	(ppc64_emit_pop): New function.
+	(ppc64_emit_stack_flush): New function.
+	(ppc64_emit_swap): New function.
+	(ppc64v1_emit_call): New function.
+	(ppc64v2_emit_call): New function.
+	(ppc64v1_emit_int_call_1): New function.
+	(ppc64v2_emit_int_call_1): New function.
+	(ppc64v1_emit_void_call_2): New function.
+	(ppc64v2_emit_void_call_2): New function.
+	(ppc64_emit_if_goto): New function.
+	(ppc64_emit_eq_goto): New function.
+	(ppc64_emit_ne_goto): New function.
+	(ppc64_emit_lt_goto): New function.
+	(ppc64_emit_le_goto): New function.
+	(ppc64_emit_gt_goto): New function.
+	(ppc64_emit_ge_goto): New function.
+	(ppc64v1_emit_ops_impl): New static variable.
+	(ppc64v2_emit_ops_impl): New static variable.
+	(ppc_emit_ops): New function.
+	(linux_low_target): Wire in ppc_emit_ops.
+
+2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
+	    Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR/17221
+	* Makefile.in: Add powerpc-*-ipa.o
+	* configure.srv: Add ipa_obj for powerpc*-linux.
+	* linux-ppc-ipa.c: New file.
+	* linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
+	includes.
+	(PPC_FIELD): New macro.
+	(PPC_SEXT): New macro.
+	(PPC_OP6): New macro.
+	(PPC_BO): New macro.
+	(PPC_LI): New macro.
+	(PPC_BD): New macro.
+	(init_registers_*): Move prototype to linux-ppc-tdesc.h.
+	(tdesc_*): Move declaration to linux-ppc-tdesc.h.
+	(ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
+	(ppc_get_thread_area): New function.
+	(is_elfv2_inferior): New function.
+	(gen_ds_form): New function.
+	(GEN_STD): New macro.
+	(GEN_STDU): New macro.
+	(GEN_LD): New macro.
+	(GEN_LDU): New macro.
+	(gen_d_form): New function.
+	(GEN_ADDI): New macro.
+	(GEN_ADDIS): New macro.
+	(GEN_LI): New macro.
+	(GEN_LIS): New macro.
+	(GEN_ORI): New macro.
+	(GEN_ORIS): New macro.
+	(GEN_LWZ): New macro.
+	(GEN_STW): New macro.
+	(GEN_STWU): New macro.
+	(gen_xfx_form): New function.
+	(GEN_MFSPR): New macro.
+	(GEN_MTSPR): New macro.
+	(GEN_MFCR): New macro.
+	(GEN_MTCR): New macro.
+	(GEN_SYNC): New macro.
+	(GEN_LWSYNC): New macro.
+	(gen_x_form): New function.
+	(GEN_OR): New macro.
+	(GEN_MR): New macro.
+	(GEN_LWARX): New macro.
+	(GEN_STWCX): New macro.
+	(GEN_CMPW): New macro.
+	(gen_md_form): New function.
+	(GEN_RLDICL): New macro.
+	(GEN_RLDICR): New macro.
+	(gen_i_form): New function.
+	(GEN_B): New macro.
+	(GEN_BL): New macro.
+	(gen_b_form): New function.
+	(GEN_BNE): New macro.
+	(GEN_LOAD): New macro.
+	(GEN_STORE): New macro.
+	(gen_limm): New function.
+	(gen_atomic_xchg): New function.
+	(gen_call): New function.
+	(ppc_relocate_instruction): New function.
+	(ppc_install_fast_tracepoint_jump_pad): New function.
+	(ppc_get_min_fast_tracepoint_insn_len): New function.
+	(ppc_get_ipa_tdesc_idx): New function.
+	(the_low_target): Wire in the new functions.
+	(initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
+	tdescs.
+	* linux-ppc-tdesc.h: New file.
+
+2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
+	(alloc_jump_pad_buffer): New function.
+	* linux-amd64-ipa.c: Add <sys/mman.h> include.
+	(alloc_jump_pad_buffer): New function.
+	* linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
+	* linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
+	(alloc_jump_pad_buffer): New function.
+	* tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
+	(initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
+	* tracepoint.h (alloc_jump_pad_buffer): New prototype.
+	(getauxval) [!HAVE_GETAUXVAL]: New prototype.
+
+2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
+	* linux-amd64-ipa.c: Likewise.
+	* linux-i386-ipa.c: Likewise.
+	* linux-s390-ipa.c: Likewise.
+	* tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
+	ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
+	set_trace_state_variable_value_ptr.
+	(struct ipa_sym_addresses): Likewise.
+	(symbol_list): Likewise.
+	(install_fast_tracepoint): Dereference gdb_collect_ptr instead of
+	accessing gdb_collect directly.
+	(gdb_collect_ptr_type): New typedef.
+	(get_raw_reg_ptr_type): New typedef.
+	(get_trace_state_variable_value_ptr_type): New typedef.
+	(set_trace_state_variable_value_ptr_type): New typedef.
+	(gdb_collect_ptr): New global.
+	(get_raw_reg_ptr): New global.
+	(get_trace_state_variable_value_ptr): New global.
+	(set_trace_state_variable_value_ptr): New global.
+	(get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
+	accessing get_raw_reg directly.
+	(get_get_tsv_func_addr): Likewise for
+	get_trace_state_variable_value_ptr.
+	(get_set_tsv_func_addr): Likewise for
+	set_trace_state_variable_value_ptr.
+	* tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
+
+2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* tracepoint.c (cmd_qtenable_disable): Remove whitespace.
+
+2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
+	packets.
+	(relocate_instruction): Remove own_buf.
+	* server.c (own_buf): Make global.
+	(handle_v_requests): Make global.
+	* server.h (own_buf): New declaration.
+	(handle_v_requests): New prototype.
+
+2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR 18377
+	* linux-s390-low.c (add_insns): New function.
+	(s390_emit_prologue): New function.
+	(s390_emit_epilogue): New function.
+	(s390_emit_add): New function.
+	(s390_emit_sub): New function.
+	(s390_emit_mul): New function.
+	(s390_emit_lsh): New function.
+	(s390_emit_rsh_signed): New function.
+	(s390_emit_rsh_unsigned): New function.
+	(s390_emit_ext): New function.
+	(s390_emit_log_not): New function.
+	(s390_emit_bit_and): New function.
+	(s390_emit_bit_or): New function.
+	(s390_emit_bit_xor): New function.
+	(s390_emit_bit_not): New function.
+	(s390_emit_equal): New function.
+	(s390_emit_less_signed): New function.
+	(s390_emit_less_unsigned): New function.
+	(s390_emit_ref): New function.
+	(s390_emit_if_goto): New function.
+	(s390_emit_goto): New function.
+	(s390_write_goto_address): New function.
+	(s390_emit_litpool): New function.
+	(s390_emit_const): New function.
+	(s390_emit_call): New function.
+	(s390_emit_reg): New function.
+	(s390_emit_pop): New function.
+	(s390_emit_stack_flush): New function.
+	(s390_emit_zero_ext): New function.
+	(s390_emit_swap): New function.
+	(s390_emit_stack_adjust): New function.
+	(s390_emit_set_r2): New function.
+	(s390_emit_int_call_1): New function.
+	(s390_emit_void_call_2): New function.
+	(s390_emit_eq_goto): New function.
+	(s390_emit_ne_goto): New function.
+	(s390_emit_lt_goto): New function.
+	(s390_emit_le_goto): New function.
+	(s390_emit_gt_goto): New function.
+	(s390_emit_ge_goto): New function.
+	(s390x_emit_prologue): New function.
+	(s390x_emit_epilogue): New function.
+	(s390x_emit_add): New function.
+	(s390x_emit_sub): New function.
+	(s390x_emit_mul): New function.
+	(s390x_emit_lsh): New function.
+	(s390x_emit_rsh_signed): New function.
+	(s390x_emit_rsh_unsigned): New function.
+	(s390x_emit_ext): New function.
+	(s390x_emit_log_not): New function.
+	(s390x_emit_bit_and): New function.
+	(s390x_emit_bit_or): New function.
+	(s390x_emit_bit_xor): New function.
+	(s390x_emit_bit_not): New function.
+	(s390x_emit_equal): New function.
+	(s390x_emit_less_signed): New function.
+	(s390x_emit_less_unsigned): New function.
+	(s390x_emit_ref): New function.
+	(s390x_emit_if_goto): New function.
+	(s390x_emit_const): New function.
+	(s390x_emit_call): New function.
+	(s390x_emit_reg): New function.
+	(s390x_emit_pop): New function.
+	(s390x_emit_stack_flush): New function.
+	(s390x_emit_zero_ext): New function.
+	(s390x_emit_swap): New function.
+	(s390x_emit_stack_adjust): New function.
+	(s390x_emit_int_call_1): New function.
+	(s390x_emit_void_call_2): New function.
+	(s390x_emit_eq_goto): New function.
+	(s390x_emit_ne_goto): New function.
+	(s390x_emit_lt_goto): New function.
+	(s390x_emit_le_goto): New function.
+	(s390x_emit_gt_goto): New function.
+	(s390x_emit_ge_goto): New function.
+	(s390_emit_ops): New function.
+	(struct linux_target_ops): Fill in emit_ops hook.
+
+2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR 18377
+	* Makefile.in: Add s390 IPA files.
+	* configure.srv: Build IPA for s390.
+	* linux-s390-ipa.c: New file.
+	* linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
+	(init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
+	(tdesc_s390_linux32): Likewise.
+	(init_registers_s390_linux32v1): Likewise.
+	(tdesc_s390_linux32v1): Likewise.
+	(init_registers_s390_linux32v2): Likewise.
+	(tdesc_s390_linux32v2): Likewise.
+	(init_registers_s390_linux64): Likewise.
+	(tdesc_s390_linux64): Likewise.
+	(init_registers_s390_linux64v1): Likewise.
+	(tdesc_s390_linux64v1): Likewise.
+	(init_registers_s390_linux64v2): Likewise.
+	(tdesc_s390_linux64v2): Likewise.
+	(init_registers_s390_te_linux64): Likewise.
+	(tdesc_s390_te_linux64): Likewise.
+	(init_registers_s390_vx_linux64): Likewise.
+	(tdesc_s390_vx_linux64): Likewise.
+	(init_registers_s390_tevx_linux64): Likewise.
+	(tdesc_s390_tevx_linux64): Likewise.
+	(init_registers_s390x_linux64): Likewise.
+	(tdesc_s390x_linux64): Likewise.
+	(init_registers_s390x_linux64v1): Likewise.
+	(tdesc_s390x_linux64v1): Likewise.
+	(init_registers_s390x_linux64v2): Likewise.
+	(tdesc_s390x_linux64v2): Likewise.
+	(init_registers_s390x_te_linux64): Likewise.
+	(tdesc_s390x_te_linux64): Likewise.
+	(init_registers_s390x_vx_linux64): Likewise.
+	(tdesc_s390x_vx_linux64): Likewise.
+	(init_registers_s390x_tevx_linux64): Likewise.
+	(tdesc_s390x_tevx_linux64): Likewise.
+	(have_hwcap_s390_vx): New static variable.
+	(s390_arch_setup): Fill have_hwcap_s390_vx.
+	(s390_get_thread_area): New function.
+	(s390_ft_entry_gpr_esa): New const.
+	(s390_ft_entry_gpr_zarch): New const.
+	(s390_ft_entry_misc): New const.
+	(s390_ft_entry_fr): New const.
+	(s390_ft_entry_vr): New const.
+	(s390_ft_main_31): New const.
+	(s390_ft_main_64): New const.
+	(s390_ft_exit_fr): New const.
+	(s390_ft_exit_vr): New const.
+	(s390_ft_exit_misc): New const.
+	(s390_ft_exit_gpr_esa): New const.
+	(s390_ft_exit_gpr_zarch): New const.
+	(append_insns): New function.
+	(s390_relocate_instruction): New function.
+	(s390_install_fast_tracepoint_jump_pad): New function.
+	(s390_get_min_fast_tracepoint_insn_len): New function.
+	(s390_get_ipa_tdesc_idx): New function.
+	(struct linux_target_ops): Wire in the above functions.
+	(initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
+	* linux-s390-tdesc.h: New file.
+
+2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-s390-low.c (s390_supports_tracepoints): New function.
+	(struct linux_target_ops): Fill supports_tracepoints hook.
+
+2016-03-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (lwp_signal_can_be_delivered): New function.
+	(linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
+
+2016-03-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
+	0 if signal is enqueued.  Remove 'signal' from one debugging
+	message.  Move one debugging message to some lines below.
+	Remove code setting 'signal' to 0.
+
+2016-03-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_low_filter_event): Remove redundant
+	WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-ppc-low.c (ppc_supports_tracepoints): New function.
+	(struct linux_target_ops): Wire in the above.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c: Update comments to start_step_over.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	PR server/19736
+	* linux-low.c (handle_extended_wait): Set child suspended
+	if event_lwp->bp_reinsert isn't zero.
+
+2016-03-02  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_resume_one_lwp_throw): Replace code with
+	enqueue_pending_signal.
+
+2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
+	is actually loaded.
+
+2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
+	(s390_regmap_3264) [!__s390x__]: New global.
+	(s390_collect_ptrace_register): Skip map entries containing -1.
+	(s390_supply_ptrace_register): Ditto.
+	(s390_fill_gprs_high): New function.
+	(s390_store_gprs_high): New function.
+	(s390_regsets): Add NT_S390_HIGH_GPRS.
+	(s390_get_hwcap): Enable on 31-bit.
+	(have_hwcap_s390_high_gprs): Enable on 31-bit.
+	(s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
+	Detect NT_S390_HIGH_GPRS.
+	(s390_usrregs_info_3264): Enable on 31-bit.
+	(s390_regs_info): Enable regs_info_3264 on 31-bit.
+	(initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
+
+2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR gdb/13808
+	* Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
+	* configure.srv: Ditto.
+	* linux-aarch64-ipa.c (get_ipa_tdesc): New function.
+	(initialize_low_tracepoint): Remove ipa_tdesc assignment.
+	* linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
+	(init_registers_amd64_linux): Remove prototype.
+	(tdesc_amd64_linux): Remove declaration.
+	(get_ipa_tdesc): New function.
+	(initialize_low_tracepoint): Remove ipa_tdesc assignment,
+	initialize remaining tdescs.
+	* linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
+	(init_registers_i386_linux): Remove prototype.
+	(tdesc_i386_linux): Remove declaration.
+	(get_ipa_tdesc): New function.
+	(initialize_low_tracepoint): Remove ipa_tdesc assignment,
+	initialize remaining tdescs.
+	* linux-low.c (linux_get_ipa_tdesc_idx): New function.
+	(linux_target_ops): wire in linux_get_ipa_tdesc_idx.
+	* linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
+	* linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
+	(x86_get_ipa_tdesc_idx): New function.
+	(the_low_target): Wire in x86_get_ipa_tdesc_idx.
+	* linux-x86-tdesc.h: New file.
+	* target.h (struct target_ops): Add get_ipa_tdesc_idx.
+	(target_get_ipa_tdesc_idx): New macro.
+	* tracepoint.c (ipa_tdesc_idx): New macro.
+	(struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
+	(symbol_list): Add ipa_tdesc_idx.
+	(cmd_qtstart): Write ipa_tdesc_idx in the target.
+	(ipa_tdesc): Remove.
+	(ipa_tdesc_idx): New variable.
+	(get_context_regcache): Use get_ipa_tdesc.
+	(gdb_collect): Ditto.
+	(gdb_probe): Ditto.
+	* tracepoint.h (get_ipa_tdesc): New prototype.
+	(ipa_tdesc): Remove.
+
+2016-02-24  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (check_stopped_by_breakpoint): Rename to ...
+	(save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
+	handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
+	Factor out common code between the USE_SIGTRAP_SIGINFO and
+	!USE_SIGTRAP_SIGINFO blocks.
+	(linux_low_filter_event): Call save_stop_reason instead of
+	check_stopped_by_breakpoint and check_stopped_by_watchpoint.
+	Update comments.
+	(linux_wait_1): Update comments.
+
+2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
+
+	* linux-ppc-low.c (ppc_supports_z_point_type): New function:
+	(ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
+	(ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
+	ppc_insert_point, ppc_remove_point.
+
+2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* linux-s390-low.c (s390_supports_z_point_type): New function.
+	(struct linux_target_ops): Wire s390_supports_z_point_type in.
+
+2016-02-16  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
+	PC.  Get pc from regcache_read_pc.
+
+2016-02-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
+	or linux_get_pc_32bit.
+	(aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
+
+2016-02-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (get_next_pcs_ops): Initialize it with
+	arm_linux_get_next_pcs_fixup.
+
+2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (x_tracepoint_action_download): Change
+	write_inferior_data_ptr to write_inferior_data_pointer.
+	(cmd_qtstart): Likewise.
+	(write_inferior_data_ptr): Remove.
+	(download_agent_expr): Change write_inferior_data_ptr to
+	write_inferior_data_pointer.
+	(download_tracepoint_1): Likewise.
+	(download_tracepoint): Likewise.
+	(download_trace_state_variables): Likewise.
+
+2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
+	    Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (struct tracepoint_action_ops): Remove.
+	(struct tracepoint_action): Remove ops.
+	(m_tracepoint_action_download, r_tracepoint_action_download)
+	(x_tracepoint_action_download, l_tracepoint_action_download): Adjust
+	size and offset accordingly.
+	(m_tracepoint_action_ops, r_tracepoint_action_ops)
+	(x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
+	(tracepoint_action_send, tracepoint_action_download): New functions.
+	Helpers for trace action handlers.
+	(add_tracepoint_action): Remove setup actions ops.
+	(download_tracepoint_1, tracepoint_send_agent): Call helper functions.
+
+2016-02-10  Yao Qi  <yao.qi@linaro.org>
+
+	* regcache.c (regcache_raw_read_unsigned): Clear *VAL.
+
+2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
+	to AC_OUTPUT.
+	* configure: Regenerate.
+
+2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
+	void * to gdb_byte *.
+	* linux-low.c (siginfo_fixup): Likewise.
+	(linux_xfer_siginfo): Likewise.
+	* linux-low.h (struct linux_target_ops) <siginfo_fixup>:
+	Likewise.
+	* linux-x86-low.c (x86_siginfo_fixup): Likewise.
+
+2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
+	to srv_tgtobj.
+	(i[34567]86-*-linux*): Add amd64-linux-siginfo.o
+	to srv_tgtobj.
+	* linux-x86-low.c [__x86_64__]: Include
+	"nat/amd64-linux-siginfo.h".
+	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
+	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
+	(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
+	(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
+	(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
+	(cpt_si_fd, si_timerid, si_overrun): Move from
+	nat/amd64-linux-siginfo.c.
+	* Makefile.in (amd64-linux-siginfo.o:): New rule.
+
+2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* server.c (skip_to_semicolon):  Remove.
+	(process_point_options): Use strchrnul instead of
+	skip_to_semicolon.
+
+2016-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
+	* linux-low.c (install_software_single_step_breakpoints): Don't
+	call regcache_read_pc.
+	* linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
+	argument pc.
+
+2016-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (install_software_single_step_breakpoints): Call
+	regcache_read_pc instead of get_pc.
+
+2016-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
+	(unblock_async_io): Rename to ...
+	(block_unblock_async_io): ... it.  New function.
+	(enable_async_io): Don't install SIGIO handler.  Unblock it
+	instead.
+	(disable_async_io): Don't ignore SIGIO.  Block it instead.
+	(initialize_async_io): Install SIGIO handler.  Don't call
+	unblock_async_io.
+
+2016-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* remote-utils.c (getpkt): If the buffer isn't empty, and the
+	first character is '\003', call *the_target->request_interrupt.
+
+2016-01-25  Yao Qi  <yao.qi@linaro.org>
+
+	* remote-utils.c (new_thread_notify): Remove.
+	(dead_thread_notify): Likewise.
+	* remote-utils.h (new_thread_notify): Remove declaration.
+	(dead_thread_notify): Likewise.
+
+2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/pending.exp: Fix expected message on continue.
+
+2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
+	it works properly on big-endian machines where sizeof (CORE_ADDR)
+	!= sizeof (void *).
+
+2016-01-21  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
+	(INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
+	* configure: Regenerate.
+
+2016-01-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
+	is_thumb and set it according to CPSR saved on the stack.
+	(get_next_pcs_syscall_next_pc): Pass is_thumb to
+	arm_sigreturn_next_pc.
+
+2016-01-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_set_pc_64bit): New function.
+	(linux_get_pc_64bit): New function.
+	* linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
+	Declare.
+	* linux-sparc-low.c (debug_threads): Remove declaration.
+	(sparc_get_pc): Remove.
+	(the_low_target): Use linux_get_pc_64bit instead of
+	sparc_get_pc.
+	* linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_64bit and
+	linux_set_pc_64bit.
+
+2016-01-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (debug_threads): Remove declaration.
+	(arm_get_pc, arm_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-cris-low.c (debug_threads): Remove declaration.
+	(cris_get_pc, cris_set_pc,): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-crisv32-low.c (debug_threads): Remove declaration.
+	(cris_get_pc, cris_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-low.c: Include inttypes.h.
+	(linux_get_pc_32bit, linux_set_pc_32bit): New functions.
+	* linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
+	* linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+	* linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
+	(the_low_target): Use linux_get_pc_32bit and
+	linux_set_pc_32bit.
+
+2016-01-18  Gary Benson  <gbenson@redhat.com>
+
+	* configure.ac (AC_FUNC_FORK): New check.
+	* config.in: Regenerate.
+	* configure: Likewise.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c (thumb2_breakpoint): Make it static.
+	* linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
+	* linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
+	arm_get_next_pcs_ctor.
+
+2016-01-12  Josh Stone  <jistone@redhat.com>
+	    Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* inferiors.h: Include "gdb_vecs.h".
+	(struct process_info): Add syscalls_to_catch.
+	* inferiors.c (remove_process): Free syscalls_to_catch.
+	* remote-utils.c (prepare_resume_reply): Report syscall_entry and
+	syscall_return stops.
+	* server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
+	* server.c (handle_general_set): Handle QCatchSyscalls.
+	(handle_query): Report support for QCatchSyscalls.
+	* target.h (struct target_ops): Add supports_catch_syscall.
+	(target_supports_catch_syscall): New macro.
+	* linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
+	(struct lwp_info): Add syscall_state.
+	* linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
+	Maintain syscall_state and syscalls_to_catch across exec.
+	(get_syscall_trapinfo): New function, proxy to the_low_target.
+	(linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
+	(linux_low_filter_event): Toggle syscall_state entry/return for
+	syscall traps, and set it ignored for all others.
+	(gdb_catching_syscalls_p): New function.
+	(gdb_catch_this_syscall_p): New function.
+	(linux_wait_1): Handle SYSCALL_SIGTRAP.
+	(linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
+	(linux_supports_catch_syscall): New function.
+	(linux_target_ops): Install it.
+	* linux-x86-low.c (x86_get_syscall_trapinfo): New function.
+	(the_low_target): Install it.
+
+2016-01-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* acinclude.m4: Include new ../warning.m4 file.
+	* configure: Regenerated.
+	* configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
+
+2016-01-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* ax.c (is_goto_target): Mark static.
+	* linux-low.c (register_addr): Likewise.
+	(linux_fetch_registers, linux_store_registers): Likewise.
+	* mem-break.c (any_persistent_commands): Fix old prototype.
+	(add_commands_to_breakpoint): Mark static.
+	* regcache.c (find_register_by_name): Delete unused func.
+	* remote-utils.c (hex_or_minus_one): Mark static.
+	* server.c (monitor_show_help): Mark static.
+	(handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
+	handle_v_requests): Likewise.
+
+2016-01-12  Pedro Alves  <palves@redhat.com>
+
+	Remove use of the registered trademark symbol throughout.
+
+2016-01-08  Yao Qi  <yao.qi@linaro.org>
+
+	* remote-utils.c (getpkt): If c is '\003', call target hook
+	request_interrupt.
+
+2016-01-06  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.h (arm_abi_breakpoint): Move to
+	linux-aarch32-low.c.
+	(arm_eabi_breakpoint, arm_breakpoint): Likewise.
+	(arm_breakpoint_len, thumb_breakpoint_len): Likewise.
+	(thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
+	(thumb2_breakpoint): Declare.
+	* linux-aarch32-low.c (arm_abi_breakpoint): Moved from
+	linux-aarch32-low.h.
+	(arm_eabi_breakpoint, arm_breakpoint): Likewise.
+	(arm_breakpoint_len, thumb_breakpoint_len): Likewise.
+	(thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
+
+2016-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdbreplay.c (gdbreplay_version): Change copyright year in
+	version message.
+	* server.c (gdbserver_version): Likewise.
+
+2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* server.c (crc32_table): Delete.
+	(crc32): Use libiberty's xcrc32 function.
+
+2015-12-22  Joel Brobecker  <brobecker@adacore.com>
+
+	* lynx-low.c (lynx_delete_thread_callback): New function.
+	(lynx_mourn): Properly delete our process and all of its
+	threads.  Remove call to clear_inferiors.
+
+2015-12-22  Joel Brobecker  <brobecker@adacore.com>
+
+	* target.c (thread_search_callback): Add check that
+	the thread_stopped target callback is not NULL before
+	calling it.
+
+2015-12-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
+	arm breakpoint.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* server.c (handle_query): Call target_supports_software_single_step.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (single_step): New function.
+	(linux_resume_one_lwp_throw): Call single_step.
+	(start_step_over): Likewise.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in (SFILES): Append arch/arm-linux.c,
+	arch/arm-get-next-pcs.c.
+	(arm-linux.o): New rule.
+	(arm-get-next-pcs.o): New rule.
+	* configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
+	arm-linux.o.
+	* linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
+	to linux-aarch32-low.c.
+	(arm_eabi_breakpoint, arm_breakpoint): Likewise.
+	(arm_breakpoint_len, thumb_breakpoint): Likewise.
+	(thumb_breakpoint_len, thumb2_breakpoint): Likewise.
+	(thumb2_breakpoint_len): Likewise.
+	(arm_is_thumb_mode): Make non-static.
+	* linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
+	from linux-aarch32-low.c.
+	(arm_eabi_breakpoint, arm_breakpoint): Likewise.
+	(arm_breakpoint_len, thumb_breakpoint): Likewise.
+	(thumb_breakpoint_len, thumb2_breakpoint): Likewise.
+	(thumb2_breakpoint_len): Likewise.
+	(arm_is_thumb_mode): New declaration.
+	* linux-arm-low.c: Include arch/arm-linux.h
+	aarch/arm-get-next-pcs.h, sys/syscall.h.
+	(get_next_pcs_ops): New struct.
+	(get_next_pcs_addr_bits_remove): New function.
+	(get_next_pcs_is_thumb): New function.
+	(get_next_pcs_read_memory_unsigned_integer): Likewise.
+	(arm_sigreturn_next_pc): Likewise.
+	(get_next_pcs_syscall_next_pc): Likewise.
+	(arm_gdbserver_get_next_pcs): Likewise.
+	(struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
+	Initialize.
+	* linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
+	* server.h: Include gdb_vecs.h.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in (SFILES): Append common/common-regcache.c.
+	(OBS): Append common-regcache.o.
+	(common-regcache.o): New rule.
+	* regcache.c (init_register_cache): Initialize cache to
+	REG_UNAVAILABLE.
+	(regcache_raw_read_unsigned): New function.
+	* regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
+	register_status enum.
+
+2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-aarch64-low.c (the_low_targets): Rename
+	breakpoint_reinsert_addr to get_next_pcs.
+	* linux-arm-low.c (the_low_targets): Likewise.
+	* linux-bfin-low.c (the_low_targets): Likewise.
+	* linux-cris-low.c (the_low_targets): Likewise.
+	* linux-crisv32-low.c (the_low_targets): Likewise.
+	* linux-low.c (can_software_single_step): Likewise.
+	(install_software_single_step_breakpoints): New function.
+	(start_step_over): Use install_software_single_step_breakpoints.
+	* linux-low.h: New CORE_ADDR vector.
+	(struct linux_target_ops) Rename breakpoint_reinsert_addr to
+	get_next_pcs.
+	* linux-mips-low.c (the_low_targets): Likewise.
+	* linux-nios2-low.c (the_low_targets): Likewise.
+	* linux-sparc-low.c (the_low_targets): Likewise.
+
+2015-12-17  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (linux_kill_one_lwp): Remove references to
+	LinuxThreads.
+	(kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
+	to 'kill'.
+	(linux_init_signals): Delete.
+	(initialize_low): Adjust.
+	* thread-db.c (thread_db_init): Remove LinuxThreads reference.
+
+2015-12-16  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (compiler warning flags): When testing a
+	-Wno-foo option, check whether -Wfoo works instead.
+	* configure: Regenerate.
+
+2015-12-11  Don Breazeal  <donb@codesourcery.com>
+
+	* server.c (process_serial_event): Don't exit from gdbserver
+	in remote mode if there are still active inferiors.
+
+2015-12-11  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_breakpoint_at): Call
+	arm_breakpoint_at if the process is 32-bit.
+
+2015-12-11  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
+	arm breakpoint.
+
+2015-12-07  Yao Qi  <yao.qi@linaro.org>
+
+	* configure.srv: Append arm.o to srv_tgtobj for
+	aarch64*-*-linux* target.
+	* linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
+	from linux-arm-low.c.
+	(arm_eabi_breakpoint, arm_breakpoint): Likewise.
+	(arm_breakpoint_len, thumb_breakpoint): Likewise.
+	(thumb_breakpoint_len, thumb2_breakpoint): Likewise.
+	(thumb2_breakpoint_len): Likewise.
+	(arm_is_thumb_mode, arm_breakpoint_at): Likewise.
+	(arm_breakpoint_kinds): Likewise.
+	(arm_breakpoint_kind_from_pc): Likewise.
+	(arm_sw_breakpoint_from_kind): Likewise.
+	(arm_breakpoint_kind_from_current_state): Likewise.
+	* linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
+	(arm_sw_breakpoint_from_kind): Declare.
+	(arm_breakpoint_kind_from_current_state): Declare.
+	(arm_breakpoint_at): Declare.
+	* linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
+	arm_sw_breakpoint_from_kind if process is 32-bit.
+	(aarch64_breakpoint_kind_from_pc): New function.
+	(aarch64_breakpoint_kind_from_current_state): New function.
+	(the_low_target): Initialize fields breakpoint_kind_from_pc
+	and breakpoint_kind_from_current_state.
+	* linux-arm-low.c (arm_breakpoint_kinds): Move to
+	linux-aarch32-low.c.
+	(arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
+	(arm_breakpoint, arm_breakpoint_len): Likewise.
+	(thumb_breakpoint, thumb_breakpoint_len): Likewise.
+	(thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
+	(arm_is_thumb_mode): Likewise.
+	(arm_breakpoint_at): Likewise.
+	(arm_breakpoint_kind_from_pc): Likewise.
+	(arm_sw_breakpoint_from_kind): Likewise.
+	(arm_breakpoint_kind_from_current_state): Likewise.
+
+	Revert:
+	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.
+
+2015-12-04  Josh Stone  <jistone@redhat.com>
+
+	* target.h (struct target_ops) <arch_setup>: Rename to ...
+	(struct target_ops) <post_create_inferior>: ... this.
+	(target_arch_setup): Rename to ...
+	(target_post_create_inferior): ... this, calling post_create_inferior.
+	* server.c (start_inferior): Update target_arch_setup calls to
+	target_post_create_inferior.
+	* linux-low.c (linux_low_ptrace_options): Forward declare.
+	(linux_arch_setup): Update its comment for general use.
+	(linux_post_create_inferior): New, run arch_setup and setup ptrace.
+	(struct linux_target_ops): Use linux_post_create_inferior.
+	* lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
+	to post_create_inferior.
+	* nto-low.c (struct nto_target_ops): Likewise.
+	* spu-low.c (struct spu_target_ops): Likewise.
+	* win32-low.c (struct win32_target_ops): Likewise.
+
+2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-arm-low.c: Remove duplicate arch/arm.h include.
+
+2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-arm-low.c (arm_reinsert_addr): Remove function.
+	(struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
+	* linux-cris-low.c (cris_reinsert_addr> Remove function.
+	(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
+	* linux-crisv32-low.c (cris_reinsert_addr): Remove function.
+	(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
+	* linux-mips-low.c (mips_reinsert_addr): Remove function.
+	(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
+	* linux-nios2-low.c (nios2_reinsert_addr): Remove function.
+	(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
+	* linux-sparc-low.c (sparc_reinsert_addr): Remove function.
+	(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
+
+2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (linux_look_up_symbols): Don't call
+	linux_supports_traceclone.
+	* linux-low.h (thread_db_init): Remove use_events argument.
+	* thread-db.c (thread_db_use_event): Remove global variable.
+	(struct thread_db) <td_thr_event_enable_p>: Remove field.
+	(struct thread_db) <td_create_bp>: Remove field.
+	(thread_db_create_event): Remove function.
+	(thread_db_enable_reporting): Likewise.
+	(find_one_thread): Don't check for thread_db_use_events.
+	(attach_thread): Likewise.
+	(thread_db_load_search): Remove td_thr_event_enable_p initialization.
+	(try_thread_db_load_1): Don't check for thread_db_use_events.
+	(thread_db_init): Remove use_events argument and thread events
+	handling.
+	(remove_thread_event_breakpoints): Remove function.
+	(thread_db_detach): Remove call to remove_thred_event_breakpoints.
+
+2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-aarch64-low.c (aarch64_supports_hardware_single_step):
+	New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-arm-low.c (arm_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <bfin_supports_hardware_single_step>:
+	Initialize.
+	* linux-crisv32-low.c (cris_supports_hardware_single_step):
+	New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-low.c (can_hardware_single_step): Use
+	supports_hardware_single_step.
+	(can_software_single_step): New function.
+	(start_step_over): Call can_software_single_step.
+	(linux_supports_hardware_single_step): New function.
+	(struct target_ops) <supports_software_single_step>: Initialize.
+	* linux-low.h (struct linux_target_ops)
+	<supports_hardware_single_step>: Initialize.
+	* linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <supports_hardware_single_step> Initialize.
+	* linux-s390-low.c (s390_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-sh-low.c (sh_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <tic6x_supports_hardware_single_step>:
+	Initialize.
+	* linux-tile-low.c (tile_supports_hardware_single_step): New function.
+	(struct linux_target_ops) <tile_supports_hardware_single_step>:
+	Initialize.
+	* linux-x86-low.c (x86_supports_hardware_single_step) New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* linux-xtensa-low.c (xtensa_supports_hardware_single_step):
+	New function.
+	(struct linux_target_ops) <supports_hardware_single_step>: Initialize.
+	* target.h (struct target_ops): <supports_software_single_step>:
+	New field.
+	(target_supports_software_single_step): New macro.
+
+2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (linux_wait_1): Fix pc advance condition.
+	* mem-break.c (reinsert_breakpoint_inserted_here): New function.
+	* mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
+
+2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-arm-low.c (arm_is_thumb_mode): New function.
+	(arm_breakpoint_at): Use arm_is_thumb_mode.
+	(arm_breakpoint_kind_from_current_state): New function.
+	(struct linux_target_ops) <breakpoint_kind_from_current_state>:
+	Initialize.
+	* linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
+	(linux_breakpoint_kind_from_current_state): New function.
+	(struct target_ops <breakpoint_kind_from_current_state>: Initialize.
+	* linux-low.h (struct linux_target_ops)
+	<breakpoint_kind_from_current_state>: New field.
+	* target.h (struct target_ops): Likewise.
+	(target_breakpoint_kind_from_current_state): New macro.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (linux_resume): Wake up the event loop before
+	returning.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* mem-break.c (check_gdb_bp_preconditions): Remove current_thread
+	check.
+	(set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
+	to -1.
+	* target.c (struct thread_search): New structure.
+	(thread_search_callback): New function.
+	(prev_general_thread): New global.
+	(prepare_to_access_memory, done_accessing_memory): New functions.
+	* target.h (prepare_to_access_memory, done_accessing_memory):
+	Replace macros with function declarations.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	PR 14618
+	* linux-low.c (linux_wait_1): If the last resumed thread is gone,
+	report TARGET_WAITKIND_NO_RESUMED.
+	* remote-utils.c (prepare_resume_reply): Handle
+	TARGET_WAITKIND_NO_RESUMED.
+	* server.c (report_no_resumed): New global.
+	(handle_query) <qSupported>: Handle "no-resumed+".  Report
+	"no-resumed+" support.
+	(resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
+	return error if the client doesn't support no-resumed events.
+	(push_stop_notification): New function.
+	(handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
+	events if the client supports them.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (thread_still_has_status_pending_p): Don't check
+	vCont;t here.
+	(lwp_resumed): New function.
+	(status_pending_p_callback): Return early if the LWP is not
+	supposed to be resumed.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (handle_extended_wait): Assert that the LWP's
+	waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
+	thread create events, leave the new child's status pending.
+	(linux_low_filter_event): If GDB wants to hear about thread exit
+	events, leave the LWP marked dead and don't delete it.
+	(linux_wait_for_event_filtered): Don't check for thread exit.
+	(filter_exit_event): New function.
+	(linux_wait_1): Use it, when returning an exit event.
+	(linux_resume_one_lwp_throw): Assert that the LWP's
+	waitstatus is TARGET_WAITKIND_IGNORE.
+	* remote-utils.c (prepare_resume_reply): Handle
+	TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
+	* server.c (report_thread_events): New global.
+	(handle_general_set): Handle QThreadEvents.
+	(handle_query) <qSupported>: Handle and report QThreadEvents+;
+	(handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
+	TARGET_WAITKIND_THREAD_EXITED.
+	* server.h (report_thread_events): Declare.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (resume_stopped_resumed_lwps): Don't check whether
+	the thread's last_resume_kind was resume_stop.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (linux_attach): In non-stop mode, wait for one stop
+	before returning.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* server.c (handle_v_requests): Handle vCtrlC.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdbthread.h (find_any_thread_of_pid): Declare.
+	* inferiors.c (thread_of_pid, find_any_thread_of_pid): New
+	functions.
+	* server.c (handle_query): If current_thread is NULL, look for
+	another thread of the selected process.
+
+2015-11-26  Daniel Colascione  <dancol@dancol.org>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
+	* server.c (handle_qxfer_threads_worker): Refactor to include thread
+	name in reply.
+	* target.h (struct target_ops) <thread_name>: New field.
+	(target_thread_name): New macro.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* regcache.h (regcache_invalidate_pid): Add declaration.
+	* regcache.c (regcache_invalidate_pid): New function, extracted
+	from regcache_invalidate.
+	(regcache_invalidate): Reimplement using regcache_invalidate_pid.
+	Add trivial documentation comment.
+	* lynx-low.c: Use regcache_invalidate_pid instead of
+	regcache_invalidate.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
+	and Elf64_auxv_t if the target is Android.
+
+2015-11-22  Doug Evans  <xdje42@gmail.com>
+
+	* target.h: #include <sys/types.h>.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (linux_process_qsupported): Change prototype.
+	Adjust.
+	* linux-low.h (struct linux_target_ops) <process_qsupported>:
+	Change prototype.
+	* linux-x86-low.c (x86_linux_process_qsupported): Change prototype
+	and adjust to loop over all features.
+	* server.c (handle_query) <qSupported>: Adjust to call
+	target_process_qsupported once, passing it a vector of unprocessed
+	features.
+	* target.h (struct target_ops) <process_qsupported>: Change
+	prototype.
+	(target_process_qsupported): Adjust.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac (ERROR_ON_WARNING): Don't check whether in C++
+	mode.
+	* configure: Regenerate.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
+	* configure: Regenerate.
+
+2015-11-19  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (emit_data_processing_reg): Change opcode
+	type to uint32_t.
+
+2015-11-19  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (enum aarch64_operand_type): New.
+	(struct aarch64_operand): Move enum out.
+
+2015-11-19  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
+	struct user_fpsimd_state *.
+	(aarch64_store_fpregset): Likewise.
+
+2015-11-19  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
+	struct user_pt_regs *.
+	(aarch64_store_gregset): Likewise.
+
+2015-11-18  Pedro Alves  <palves@redhat.com>
+
+	* Makefile.in (all_object_files): Add $IPA_OBJS.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* win32-low.c (win32_resume): Use gdb_signal_from_host,
+	GDB_SIGNAL_0 and gdb_signal_to_string.
+
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+	* win32-low.c (handle_output_debug_string): Remove parameter.
+	(win32_kill): Remove our_status local and adjust call to
+	handle_output_debug_string.
+	(get_child_debug_event): Adjust call to
+	handle_output_debug_string.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-mips-low.c (mips_fill_gregset): Add cast.
+	(mips_store_gregset): Likewise.
+	(mips_fill_fpregset): Likewise.
+	(mips_store_fpregset): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-mips-low.c (mips_add_watchpoint): Rename private to
+	priv.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-mips-low.c (mips_linux_new_thread): Change type of
+	watch_type to enum target_hw_bp_type.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+		* linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
+		Change return type to arm_hwbp_type.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-aarch32-low.c (arm_fill_gregset): Add cast.
+	(arm_store_gregset): Likewise.
+	* linux-arm-low.c (arm_get_hwcap): Likewise.
+	(arm_read_description): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-ppc-low.c (ppc_get_hwcap): Add cast.
+	(ppc_fill_vsxregset): Likewise.
+	(ppc_store_vsxregset): Likewise.
+	(ppc_fill_vrregset): Likewise.
+	(ppc_store_vrregset): Likewise.
+	(ppc_fill_evrregset): Likewise.
+	(ppc_store_evrregset): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* linux-ppc-low.c (ppc_usrregs_info): Remove
+	forward-declaration.
+	(ppc_arch_setup): Move lower in file.
+
+2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
+	(ps_pdwrite): Likewise.
+
+2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
+
+	* linux-arm-low.c (arm_new_thread): Move pointer dereference
+	to after assert checks.
+
+2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* proc-service.c (ps_pdread): Add/adjust casts.
+	(ps_pdwrite): Add/adjust casts.
+
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* server.c (handle_search_memory_1): Cast return value of
+	memmem.
+
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* server.c (write_qxfer_response): Change type of data to
+	gdb_byte *.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* mem-break.c (Z_packet_to_bkpt_type): Add cast.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* tracepoint.c (clear_installed_tracepoints): Add casts.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* server.c (handle_v_cont, process_serial_event): Add enum
+	gdb_signal casts to signal parsing code.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.h (NULL_REGSET): Define.
+	* linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
+	* linux-arm-low.c (arm_regsets): Likewise.
+	* linux-crisv32-low.c (cris_regsets): Likewise.
+	* linux-m68k-low.c (m68k_regsets): Likewise.
+	* linux-mips-low.c (mips_regsets): Likewise.
+	* linux-nios2-low.c (nios2_regsets): Likewise.
+	* linux-ppc-low.c (ppc_regsets): Likewise.
+	* linux-s390-low.c (s390_regsets): Likewise.
+	* linux-sh-low.c (sh_regsets): Likewise.
+	* linux-sparc-low.c (sparc_regsets): Likewise.
+	* linux-tic6x-low.c (tic6x_regsets): Likewise.
+	* linux-tile-low.c (tile_regsets): Likewise.
+	* linux-x86-low.c (x86_regsets): Likewise.
+	* linux-xtensa-low.c (xtensa_regsets): Likewise.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.h (NULL_REGSET): Define.
+	* linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
+	* linux-arm-low.c (arm_regsets): Likewise.
+	* linux-crisv32-low.c (cris_regsets): Likewise.
+	* linux-m68k-low.c (m68k_regsets): Likewise.
+	* linux-mips-low.c (mips_regsets): Likewise.
+	* linux-nios2-low.c (nios2_regsets): Likewise.
+	* linux-ppc-low.c (ppc_regsets): Likewise.
+	* linux-s390-low.c (s390_regsets): Likewise.
+	* linux-sh-low.c (sh_regsets): Likewise.
+	* linux-sparc-low.c (sparc_regsets): Likewise.
+	* linux-tic6x-low.c (tic6x_regsets): Likewise.
+	* linux-tile-low.c (tile_regsets): Likewise.
+	* linux-x86-low.c (x86_regsets): Likewise.
+	* linux-xtensa-low.c (xtensa_regsets): Likewise.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	* thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
+	for debug_printf.
+	(attach_thread, find_new_threads_callback): Ditto.
+
+2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* mem-break.h (set_breakpoint_data): Remove.
+
+2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* nto-low.c (nto_sw_breakpoint_from_kind): New function.
+	(struct target_ops) <sw_breakpoint_from_kind>: Initialize.
+	(initialize_low): Remove set_breakpoint_data call.
+	* spu-low.c (spu_sw_breakpoint_from_kind): New function.
+	(struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
+	(initialize_low): Remove set_breakpoint_data call.
+	* win32-low.c (win32_sw_breakpoint_from_kind): New function.
+	(struct target_ops) <sw_breakpoint_from_kind>: Initialize.
+	(initialize_low): Remove set_breakpoint_data call.
+
+2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
+	* mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
+	* target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
+	* target.h (target_breakpoint_kind_from_pc): New macro.
+
+2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (default_breakpoint_kind_from_pc): New function.
+	(linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
+	the default breakpoint kind.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-arm-low.c (arm_supports_z_point_type): Add software
+	breakpoint support.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-arm-low.c: Refactor breakpoint definitions.
+	(arm_breakpoint_at): Adjust for arm_abi_breakpoint.
+	(arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* Makefile.in: Add arm.c/o.
+	* configure.srv: Likewise.
+	* linux-arm-low.c (arm_breakpoint_kinds): New enum.
+	(arm_breakpoint_kind_from_pc): New function.
+	(arm_sw_breakpoint_from_kind): Return proper kind.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-low.c (initialize_low): Ajdust for breakpoint global variables
+	removal.
+	* mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
+	(struct raw_breakpoint) <size>: Remove.
+	(struct raw_breakpoint) <kind>: Add.
+	(bp_size): New function.
+	(bp_opcode): Likewise.
+	(find_raw_breakpoint_at): Adjust for kind.
+	(insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
+	(remove_memory_breakpoint): Adjust for kind call bp_size.
+	(set_raw_breakpoint_at): Adjust for kind.
+	(set_breakpoint): Likewise.
+	(set_breakpoint_at): Call breakpoint_kind_from_pc.
+	(delete_raw_breakpoint): Adjust for kind.
+	(delete_breakpoint): Likewise.
+	(find_gdb_breakpoint): Likewise.
+	(set_gdb_breakpoint_1): Likewise.
+	(set_gdb_breakpoint): Likewise.
+	(delete_gdb_breakpoint_1): Likewise.
+	(delete_gdb_breakpoint): Likewise.
+	(uninsert_raw_breakpoint): Likewise.
+	(reinsert_raw_breakpoint): Likewise.
+	(set_breakpoint_data): Remove.
+	(validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
+	(check_mem_read): Adjust for kind call bp_size.
+	(check_mem_write): Adjust for kind call bp_size,bp_opcode.
+	(clone_one_breakpoint): Adjust for kind.
+	* mem-break.h (set_gdb_breakpoint): Likewise.
+	(delete_gdb_breakpoint): Likewise.
+	* server.c (process_serial_event): Likewise.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
+	(arm_sw_breakpoint_from_kind): New function.
+	* linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
+	and sw_breakpoint_from_kind to increment the pc.
+	(linux_breakpoint_kind_from_pc): New function.
+	(linux_sw_breakpoint_from_kind): New function.
+	(struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	(initialize_low): Call breakpoint_kind_from_pc and
+	sw_breakpoint_from_kind to replace breakpoint_data/len.
+	* linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
+	New field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
+	* linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
+	* linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+	* linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
+	(struct linux_target_ops) <breakpoint>: Remove.
+	(struct linux_target_ops) <breakpoint_len>: Remove.
+	(struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
+	(struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
+
+2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* linux-cris-low.c (cris_get_pc): Remove void arg.
+
+2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
+	variable name.
+
+2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
+
+	* inferiors.c (thread_pid_matches_callback): New function.
+	(find_thread_process): New function.
+	(remove_thread): Reset current_thread.
+	(remove_process): Assert threads have been removed first.
+
+2015-10-15  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_insert_point): Set len to 2
+	if it is 3.
+	(aarch64_remove_point): Likewise.
+	* regcache.c (regcache_register_size): New function.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c: Update all callers as emit_load_store
+	is renamed to aarch64_emit_load_store.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c: Update all callers of function renaming
+	from emit_insn to aarch64_emit_insn.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (enum aarch64_opcodes): Move to
+	arch/aarch64-insn.h.
+	(struct aarch64_memory_operand): Likewise.
+	(ENCODE): Likewise.
+	(emit_insn): Move to arch/aarch64-insn.c.
+	(emit_b, emit_bcond, emit_cb, emit_tb): Remove.
+	(emit_load_store): Move to arch/aarch64-insn.c.
+	(emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
+	(can_encode_int32): Remove.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (extract_signed_bitfield): Remove.
+	(aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
+	(aarch64_relocate_instruction): Likewise.
+	(struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
+	(struct aarch64_insn_visitor): Likewise.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (struct aarch64_insn_data): New.
+	(struct aarch64_insn_visitor): New.
+	(struct aarch64_insn_relocation_data): New.
+	(aarch64_ftrace_insn_reloc_b): New function.
+	(aarch64_ftrace_insn_reloc_b_cond): Likewise.
+	(aarch64_ftrace_insn_reloc_cb): Likewise.
+	(aarch64_ftrace_insn_reloc_tb): Likewise.
+	(aarch64_ftrace_insn_reloc_adr): Likewise.
+	(aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
+	(aarch64_ftrace_insn_reloc_others): Likewise.
+	(visitor): New.
+	(aarch64_relocate_instruction): Use visitor.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_relocate_instruction): Return
+	int.  Add argument buf.
+	(aarch64_install_fast_tracepoint_jump_pad): Pass buf to
+	aarch64_relocate_instruction.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_relocate_instruction): Add
+	argument insn.  Remove local variable insn.  Don't call
+	target_read_uint32.
+	(aarch64_install_fast_tracepoint_jump_pad): Call
+	target_read_uint32.
+
+2015-09-30  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (emit_movk): Shorten a long line.
+	(emit_load_store_pair): Likewise.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* dll.c (match_dll): Add cast(s).
+	(unloaded_dll): Likewise.
+	* linux-low.c (second_thread_of_pid_p): Likewise.
+	(delete_lwp_callback): Likewise.
+	(count_events_callback): Likewise.
+	(select_event_lwp_callback): Likewise.
+	(linux_set_resume_request): Likewise.
+	* server.c (accumulate_file_name_length): Likewise.
+	(emit_dll_description): Likewise.
+	(handle_qxfer_threads_worker): Likewise.
+	(visit_actioned_threads): Likewise.
+	* thread-db.c (any_thread_of): Likewise.
+	* tracepoint.c (same_process_p): Likewise.
+	(match_blocktype): Likewise.
+	(build_traceframe_info_xml): Likewise.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ax.c (gdb_parse_agent_expr): Add cast to allocation result
+	assignment.
+	(gdb_unparse_agent_expr): Likewise.
+	* hostio.c (require_data): Likewise.
+	(handle_pread): Likewise.
+	* linux-low.c (disable_regset): Likewise.
+	(fetch_register): Likewise.
+	(store_register): Likewise.
+	(get_dynamic): Likewise.
+	(linux_qxfer_libraries_svr4): Likewise.
+	* mem-break.c (delete_fast_tracepoint_jump): Likewise.
+	(set_fast_tracepoint_jump): Likewise.
+	(uninsert_fast_tracepoint_jumps_at): Likewise.
+	(reinsert_fast_tracepoint_jumps_at): Likewise.
+	(validate_inserted_breakpoint): Likewise.
+	(clone_agent_expr): Likewise.
+	* regcache.c (init_register_cache): Likewise.
+	* remote-utils.c (putpkt_binary_1): Likewise.
+	(decode_M_packet): Likewise.
+	(decode_X_packet): Likewise.
+	(look_up_one_symbol): Likewise.
+	(relocate_instruction): Likewise.
+	(monitor_output): Likewise.
+	* server.c (handle_search_memory): Likewise.
+	(handle_qxfer_exec_file): Likewise.
+	(handle_qxfer_libraries): Likewise.
+	(handle_qxfer): Likewise.
+	(handle_query): Likewise.
+	(handle_v_cont): Likewise.
+	(handle_v_run): Likewise.
+	(captured_main): Likewise.
+	* target.c (write_inferior_memory): Likewise.
+	* thread-db.c (try_thread_db_load_from_dir): Likewise.
+	* tracepoint.c (init_trace_buffer): Likewise.
+	(add_tracepoint_action): Likewise.
+	(add_traceframe): Likewise.
+	(add_traceframe_block): Likewise.
+	(cmd_qtdpsrc): Likewise.
+	(cmd_qtdv): Likewise.
+	(cmd_qtstatus): Likewise.
+	(response_source): Likewise.
+	(response_tsv): Likewise.
+	(cmd_qtnotes): Likewise.
+	(gdb_collect): Likewise.
+	(initialize_tracepoint): Likewise.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* linux-aarch64-low-.c: Include ax.h and tracepoint.h.
+	(enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
+	<EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
+	<NOP>: New.
+	(enum aarch64_condition_codes): New enum.
+	(w0): New static global.
+	(fp): Likewise.
+	(lr): Likewise.
+	(struct aarch64_memory_operand) <type>: New
+	MEMORY_OPERAND_POSTINDEX type.
+	(postindex_memory_operand): New helper function.
+	(emit_ret): New function.
+	(emit_load_store_pair): New function, factored out of emit_stp
+	with support for MEMORY_OPERAND_POSTINDEX.
+	(emit_stp): Rewrite using emit_load_store_pair.
+	(emit_ldp): New function.
+	(emit_load_store): Likewise.
+	(emit_ldr): Mention post-index instruction in comment.
+	(emit_ldrh): New function.
+	(emit_ldrb): New function.
+	(emit_ldrsw): Mention post-index instruction in comment.
+	(emit_str): Likewise.
+	(emit_subs): New function.
+	(emit_cmp): Likewise.
+	(emit_and): Likewise.
+	(emit_orr): Likewise.
+	(emit_orn): Likewise.
+	(emit_eor): Likewise.
+	(emit_mvn): Likewise.
+	(emit_lslv): Likewise.
+	(emit_lsrv): Likewise.
+	(emit_asrv): Likewise.
+	(emit_mul): Likewise.
+	(emit_sbfm): Likewise.
+	(emit_sbfx): Likewise.
+	(emit_ubfm): Likewise.
+	(emit_ubfx): Likewise.
+	(emit_csinc): Likewise.
+	(emit_cset): Likewise.
+	(emit_nop): Likewise.
+	(emit_ops_insns): New helper function.
+	(emit_pop): Likewise.
+	(emit_push): Likewise.
+	(aarch64_emit_prologue): New function.
+	(aarch64_emit_epilogue): Likewise.
+	(aarch64_emit_add): Likewise.
+	(aarch64_emit_sub): Likewise.
+	(aarch64_emit_mul): Likewise.
+	(aarch64_emit_lsh): Likewise.
+	(aarch64_emit_rsh_signed): Likewise.
+	(aarch64_emit_rsh_unsigned): Likewise.
+	(aarch64_emit_ext): Likewise.
+	(aarch64_emit_log_not): Likewise.
+	(aarch64_emit_bit_and): Likewise.
+	(aarch64_emit_bit_or): Likewise.
+	(aarch64_emit_bit_xor): Likewise.
+	(aarch64_emit_bit_not): Likewise.
+	(aarch64_emit_equal): Likewise.
+	(aarch64_emit_less_signed): Likewise.
+	(aarch64_emit_less_unsigned): Likewise.
+	(aarch64_emit_ref): Likewise.
+	(aarch64_emit_if_goto): Likewise.
+	(aarch64_emit_goto): Likewise.
+	(aarch64_write_goto_address): Likewise.
+	(aarch64_emit_const): Likewise.
+	(aarch64_emit_call): Likewise.
+	(aarch64_emit_reg): Likewise.
+	(aarch64_emit_pop): Likewise.
+	(aarch64_emit_stack_flush): Likewise.
+	(aarch64_emit_zero_ext): Likewise.
+	(aarch64_emit_swap): Likewise.
+	(aarch64_emit_stack_adjust): Likewise.
+	(aarch64_emit_int_call_1): Likewise.
+	(aarch64_emit_void_call_2): Likewise.
+	(aarch64_emit_eq_goto): Likewise.
+	(aarch64_emit_ne_goto): Likewise.
+	(aarch64_emit_lt_goto): Likewise.
+	(aarch64_emit_le_goto): Likewise.
+	(aarch64_emit_gt_goto): Likewise.
+	(aarch64_emit_ge_got): Likewise.
+	(aarch64_emit_ops_impl): New static global variable.
+	(aarch64_emit_ops): New target function, return
+	&aarch64_emit_ops_impl.
+	(struct linux_target_ops): Install it.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
+	* configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
+	aarch64-ipa.o.
+	* linux-aarch64-ipa.c: New file.
+	* linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
+	and endian.h.
+	(aarch64_get_thread_area): New target method.
+	(extract_signed_bitfield): New helper function.
+	(aarch64_decode_ldr_literal): New function.
+	(enum aarch64_opcodes): New enum.
+	(struct aarch64_register): New struct.
+	(struct aarch64_operand): New struct.
+	(x0): New static global.
+	(x1): Likewise.
+	(x2): Likewise.
+	(x3): Likewise.
+	(x4): Likewise.
+	(w2): Likewise.
+	(ip0): Likewise.
+	(sp): Likewise.
+	(xzr): Likewise.
+	(aarch64_register): New helper function.
+	(register_operand): Likewise.
+	(immediate_operand): Likewise.
+	(struct aarch64_memory_operand): New struct.
+	(offset_memory_operand): New helper function.
+	(preindex_memory_operand): Likewise.
+	(enum aarch64_system_control_registers): New enum.
+	(ENCODE): New macro.
+	(emit_insn): New helper function.
+	(emit_b): New function.
+	(emit_bcond): Likewise.
+	(emit_cb): Likewise.
+	(emit_tb): Likewise.
+	(emit_blr): Likewise.
+	(emit_stp): Likewise.
+	(emit_ldp_q_offset): Likewise.
+	(emit_stp_q_offset): Likewise.
+	(emit_load_store): Likewise.
+	(emit_ldr): Likewise.
+	(emit_ldrsw): Likewise.
+	(emit_str): Likewise.
+	(emit_ldaxr): Likewise.
+	(emit_stxr): Likewise.
+	(emit_stlr): Likewise.
+	(emit_data_processing_reg): Likewise.
+	(emit_data_processing): Likewise.
+	(emit_add): Likewise.
+	(emit_sub): Likewise.
+	(emit_mov): Likewise.
+	(emit_movk): Likewise.
+	(emit_mov_addr): Likewise.
+	(emit_mrs): Likewise.
+	(emit_msr): Likewise.
+	(emit_sevl): Likewise.
+	(emit_wfe): Likewise.
+	(append_insns): Likewise.
+	(can_encode_int32_in): New helper function.
+	(aarch64_relocate_instruction): New function.
+	(aarch64_install_fast_tracepoint_jump_pad): Likewise.
+	(aarch64_get_min_fast_tracepoint_insn_len): Likewise.
+	(struct linux_target_ops): Install aarch64_get_thread_area,
+	aarch64_install_fast_tracepoint_jump_pad and
+	aarch64_get_min_fast_tracepoint_insn_len.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* Makefile.in (aarch64-insn.o): New rule.
+	* configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
+
+2015-09-21  Yao Qi  <yao.qi@linaro.org>
+
+	* ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
+
+2015-09-21  Yao Qi  <yao.qi@linaro.org>
+
+	* tracepoint.c (max_jump_pad_size): Remove.
+
+2015-09-18  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c: Don't include sys/uio.h.
+	(ps_get_thread_area): Call aarch64_ps_get_thread_area.
+
+2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
+
+	* tracepoint.c (eval_result_type): Change prototype.
+	(condition_true_at_tracepoint): Fix argument to compiled_cond.
+
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	* remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
+	Check whether to report exec events instead of checking whether
+	multiprocess is enabled.
+
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	PR remote/18965
+	* remote-utils.c (prepare_resume_reply): Merge
+	TARGET_WAITKIND_VFORK_DONE switch case with the
+	TARGET_WAITKIND_FORKED case.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* server.c (handle_query): Check string comparison using
+	"else if" instead of "if".
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* server.c (vCont_supported): New global variable.
+	(handle_query): Set vCont_supported to 1 if "vContSupported+"
+	matches.  Append ";vContSupported+" to own_buf.
+	(handle_v_requests): Append ";s;S" to own_buf if target supports
+	hardware single step or vCont_supported is false.
+	(capture_main): Set vCont_supported to zero.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_supports_conditional_breakpoints): Rename
+	it to ...
+	(linux_supports_hardware_single_step): ... New function.
+	(linux_target_ops): Update.
+	* lynx-low.c (lynx_target_ops): Set field
+	supports_hardware_single_step to target_can_do_hardware_single_step.
+	* nto-low.c (nto_target_ops): Likewise.
+	* spu-low.c (spu_target_ops): Likewise.
+	* win32-low.c (win32_target_ops): Likewise.
+	* target.c (target_can_do_hardware_single_step): New function.
+	* target.h (struct target_ops) <supports_conditional_breakpoints>:
+	Remove.  <supports_hardware_single_step>: New field.
+	(target_supports_conditional_breakpoints): Remove.
+	(target_supports_hardware_single_step): New macro.
+	(target_can_do_hardware_single_step): Declare.
+	* server.c (handle_query): Use target_supports_hardware_single_step
+	instead of target_supports_conditional_breakpoints.
+
+2015-09-15  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
+	function.
+	(struct linux_target_ops the_low_target): Install
+	aarch64_linux_siginfo_fixup.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+	    Luis Machado  <lgustavo@codesourcery.com>
+
+	* linux-low.c (linux_mourn): Static declaration.
+	(linux_arch_setup): Move in front of
+	handle_extended_wait.
+	(linux_arch_setup_thread): New function.
+	(handle_extended_wait): Handle exec events.  Call
+	linux_arch_setup_thread.  Make event_lwp argument a
+	pointer-to-a-pointer.
+	(check_zombie_leaders): Do not check stopped threads.
+	(linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
+	(linux_low_filter_event): Add lwp and thread for exec'ing
+	non-leader thread if leader thread has been deleted.
+	Refactor code into linux_arch_setup_thread and call it.
+	Pass child lwp pointer by reference to handle_extended_wait.
+	(linux_wait_for_event_filtered): Update comment.
+	(linux_wait_1): Prevent clobbering exec event status.
+	(linux_supports_exec_events): New function.
+	(linux_target_ops) <supports_exec_events>: Initialize new member.
+	* lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
+	new member.
+	* remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
+	* server.c (report_exec_events): New global variable.
+	(handle_query): Handle qSupported query for exec-events feature.
+	(captured_main): Initialize report_exec_events.
+	* server.h (report_exec_events): Declare new global variable.
+	* target.h (struct target_ops) <supports_exec_events>: New
+	member.
+	(target_supports_exec_events): New macro.
+	* win32-low.c (win32_target_ops) <supports_exec_events>:
+	Initialize new member.
+
+2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* linux-low.c (linux_low_enable_btrace): Remove.
+	(linux_target_ops): Replace linux_low_enable_btrace with
+	linux_enable_btrace.
+
+2015-09-03  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_insert_point): Call
+	aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
+	returns true.
+
+2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+	* linux-low.c (check_stopped_by_breakpoint): Use
+	GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
+
+2015-08-27  Pedro Alves  <palves@redhat.com>
+
+	* proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
+
+2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
+	the XNEW-family equivalent.
+	(compile_bytecodes): Likewise.
+	* dll.c (loaded_dll): Likewise.
+	* event-loop.c (append_callback_event): Likewise.
+	(create_file_handler): Likewise.
+	(create_file_event): Likewise.
+	* hostio.c (handle_open): Likewise.
+	* inferiors.c (add_thread): Likewise.
+	(add_process): Likewise.
+	* linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
+	* linux-arm-low.c (arm_new_process): Likewise.
+	(arm_new_thread): Likewise.
+	* linux-low.c (add_to_pid_list): Likewise.
+	(linux_add_process): Likewise.
+	(handle_extended_wait): Likewise.
+	(add_lwp): Likewise.
+	(enqueue_one_deferred_signal): Likewise.
+	(enqueue_pending_signal): Likewise.
+	(linux_resume_one_lwp_throw): Likewise.
+	(linux_resume_one_thread): Likewise.
+	(linux_read_memory): Likewise.
+	(linux_write_memory): Likewise.
+	* linux-mips-low.c (mips_linux_new_process): Likewise.
+	(mips_linux_new_thread): Likewise.
+	(mips_add_watchpoint): Likewise.
+	* linux-x86-low.c (initialize_low_arch): Likewise.
+	* lynx-low.c (lynx_add_process): Likewise.
+	* mem-break.c (set_raw_breakpoint_at): Likewise.
+	(set_breakpoint): Likewise.
+	(add_condition_to_breakpoint): Likewise.
+	(add_commands_to_breakpoint): Likewise.
+	(clone_agent_expr): Likewise.
+	(clone_one_breakpoint): Likewise.
+	* regcache.c (new_register_cache): Likewise.
+	* remote-utils.c (look_up_one_symbol): Likewise.
+	* server.c (queue_stop_reply): Likewise.
+	(start_inferior): Likewise.
+	(queue_stop_reply_callback): Likewise.
+	(handle_target_event): Likewise.
+	* spu-low.c (fetch_ppc_memory): Likewise.
+	(store_ppc_memory): Likewise.
+	* target.c (set_target_ops): Likewise.
+	* thread-db.c (thread_db_load_search): Likewise.
+	(try_thread_db_load_1): Likewise.
+	* tracepoint.c (add_tracepoint): Likewise.
+	(add_tracepoint_action): Likewise.
+	(create_trace_state_variable): Likewise.
+	(cmd_qtdpsrc): Likewise.
+	(cmd_qtro): Likewise.
+	(add_while_stepping_state): Likewise.
+	* win32-low.c (child_add_thread): Likewise.
+	(get_image_name): Likewise.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (aarch64-linux.o): New rule.
+	* configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
+	srv_tgtobj.
+	* linux-aarch64-low.c: Include nat/aarch64-linux.h.
+	(aarch64_init_debug_reg_state): Make it extern.
+	(aarch64_linux_prepare_to_resume): Remove.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
+	lwp_arch_private_info and ptid_of_lwp.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
+	Find proc_info by find_process_pid.  All callers updated.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (struct arch64_dr_update_callback_param):
+	Remove.
+	(debug_reg_change_callback): Remove.
+	(aarch64_notify_debug_reg_change): Remove.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_notify_debug_reg_change):
+	Call current_lwp_ptid.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (debug_reg_change_callback): Use
+	debug_printf.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (debug_reg_change_callback): Use phex.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (debug_reg_change_callback): Re-indent
+	the code.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
+	Remove.
+	(debug_reg_change_callback): Remove argument entry and add argument
+	lwp.  Remove local variable thread.  Don't print thread id in the
+	debugging output.  Don't check whether pid of thread equals to pid.
+	(aarch64_notify_debug_reg_change): Don't set param.pid.  Call
+	iterate_over_lwps instead find_inferior.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* inferiors.c (get_first_process): New function.
+	* inferiors.h (get_first_process): New declaration.
+	* remote-utils.c (read_ptid): Default to the first process in the
+	list, instead of to the current thread's process.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* debug.c: Include gdb_sys_time.h instead of sys/time.h.
+	* event-loop.c: Likewise.
+	* remote-utils.c: Likewise.
+	* tracepoint.c: Likewise.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* spu-low.c (spu_request_interrupt): Use lwpid_of instead of
+	ptid_get_lwp.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	* ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
+	instead of literal 1.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	* tdesc.c (default_description): Explicitly zero-initialize.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18749
+	* inferiors.c (remove_thread): Discard any pending stop reply for
+	this thread.
+	* server.c (remove_all_on_match_pid): Rename to ...
+	(remove_all_on_match_ptid): ... this.  Work with a filter ptid
+	instead of a pid.
+	(discard_queued_stop_replies): Change parameter to a ptid.  Now
+	extern.
+	(handle_v_kill, kill_inferior_callback, captured_main)
+	(process_serial_event): Adjust.
+	* server.h (discard_queued_stop_replies): Declare.
+
+2015-08-21  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (wait_for_sigstop): Always switch to no thread
+	selected if the previously current thread dies.
+	* lynx-low.c (lynx_request_interrupt): Use the first thread's
+	process instead of the current thread's.
+	* remote-utils.c (input_interrupt): Don't check if there's no
+	current thread.
+	* server.c (gdb_read_memory, gdb_write_memory): If setting the
+	current thread to the general thread fails, error out.
+	(handle_qxfer_auxv, handle_qxfer_libraries)
+	(handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
+	(handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
+	(handle_query): Check if there's a thread selected instead of
+	checking whether there's any thread in the thread list.
+	(handle_qxfer_threads, handle_qxfer_btrace)
+	(handle_qxfer_btrace_conf): Don't error out early if there's no
+	thread in the thread list.
+	(handle_v_cont, myresume): Don't set the current thread to the
+	continue thread.
+	(process_serial_event) <Hg handling>: Also set thread_id if the
+	previous general thread is still alive.
+	(process_serial_event) <g/G handling>: If setting the current
+	thread to the general thread fails, error out.
+	* spu-low.c (spu_resume, spu_request_interrupt): Use the first
+	thread's lwp instead of the current thread's.
+	* target.c (set_desired_thread): If the desired thread was not
+	found, leave the current thread pointing to NULL.  Return an int
+	(boolean) indicating success.
+	* target.h (set_desired_thread): Change return type to int.
+
+2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
+
+	* configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
+	* linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
+	#includes.
+	(ps_get_thread_area): New function.
+
+2015-08-19  Gary Benson  <gbenson@redhat.com>
+
+	* hostio.c (handle_pread): Do not attempt to read more data
+	than hostio_reply_with_data can fit in a packet.
+
+2015-08-18  Joel Brobecker  <brobecker@adacore.com>
+
+	* linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
+
+2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
+
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+	* tracepoint.c (expr_eval_result): Now an int.
+
+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.
+
+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.
+
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
+	the current thread.
+
+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.
+
+2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* tracepoint.c (symbol_list) <required>: Remove.
+
+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.
+
+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.
+
+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.
+
+2015-08-04  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
+	if current_thread is 32 bit.
+
+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.
+
+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.
+
+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.
+
+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): Call 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.
+
+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.
+
+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.
+
+2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* 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.
+
+2015-07-30  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_hwcap): Remove it.
+	(arm_read_description): New local variable arm_hwcap.  Don't
+	set arm_hwcap to zero.
+
+2015-07-30  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
+	Use regcache->tdesc instead.
+	(arm_store_wmmxregset): Likewise.
+	(arm_fill_vfpregset): Likewise.
+	(arm_store_vfpregset): Likewise.
+
+2015-07-30  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-arm-low.c: Include arch/arm.h.
+	(arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
+	(arm_store_gregset): Likewise.
+
+2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
+	ptrace's 4th parameter.
+
+2015-07-27  Yao Qi  <yao.qi@linaro.org>
+
+	* configure.srv (case aarch64*-*-linux*): Don't set
+	srv_linux_usrregs.
+
+2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
+
+	* linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
+	sys/ptrace.h.
+	* linux-arm-low.c: Likewise.
+	* linux-cris-low.c: Likewise.
+	* linux-crisv32-low.c: Likewise.
+	* linux-low.c: Likewise.
+	* linux-m68k-low.c: Likewise.
+	* linux-mips-low.c: Likewise.
+	* linux-nios2-low.c: Likewise.
+	* linux-s390-low.c: Likewise.
+	* linux-sparc-low.c: Likewise.
+	* linux-tic6x-low.c: Likewise.
+	* linux-tile-low.c: Likewise.
+	* linux-x86-low.c: Likewise.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* config.in: Regenerate.
+	* configure: Regenerate.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* acinclude.m4: Include ../ptrace.m4.
+	* configure.ac: Call GDB_AC_PTRACE.
+	* config.in, configure: Regenerate.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_create_inferior): Remove setting to
+	proc->priv->new_inferior.
+	(linux_attach): Likewise.
+	(linux_low_filter_event): Likewise.
+	* linux-low.h (struct process_info_private) <new_inferior>: Remove.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_arch_setup): New function.
+	(linux_low_filter_event): If proc->tdesc is NULL and
+	proc->attached is true, call the_low_target.arch_setup.
+	Otherwise, keep status pending, and return.
+	(linux_resume_one_lwp_throw): Don't call get_pc if
+	thread->while_stepping isn't NULL.  Don't call
+	get_thread_regcache if proc->tdesc is NULL.
+	(need_step_over_p): Return 0 if proc->tdesc is NULL.
+	(linux_target_ops): Install arch_setup.
+	* server.c (start_inferior): Call the_target->arch_setup.
+	* target.h (struct target_ops) <arch_setup>: New field.
+	(target_arch_setup): New marco.
+	* lynx-low.c (lynx_target_ops): Update.
+	* nto-low.c (nto_target_ops): Update.
+	* spu-low.c (spu_target_ops): Update.
+	* win32-low.c (win32_target_ops): Update.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-low.c (linux_add_process): Don't set
+	proc->priv->new_inferior.
+	(linux_create_inferior): Set proc->priv->new_inferior to 1.
+	(linux_attach): Likewise.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* server.c (start_inferior): Code refactor.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* server.c (process_serial_event): Set general_thread.
+
+2015-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
+	aarch64_linux_get_debug_reg_capacity.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* Makefile.in (aarch64-linux-hw-point.o): New rule.
+	* configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
+	* linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
+	(AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
+	(AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
+	(AARCH64_HWP_ALIGNMENT): Likewise.
+	(AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
+	(AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
+	(aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
+	(AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
+	(DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
+	(DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
+	(struct aarch64_debug_reg_state): Likewise.
+	(struct arch_lwp_info):	Likewise.
+	(aarch64_align_watchpoint): Likewise.
+	(DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
+	(aarch64_watchpoint_length): Likewise.
+	(aarch64_point_encode_ctrl_reg): Likewise
+	(aarch64_point_is_aligned): Likewise.
+	(aarch64_align_watchpoint): Likewise.
+	(aarch64_linux_set_debug_regs):
+	(aarch64_dr_state_insert_one_point): Likewise.
+	(aarch64_dr_state_remove_one_point): Likewise.
+	(aarch64_handle_breakpoint): Likewise.
+	(aarch64_handle_aligned_watchpoint): Likewise.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+	(aarch64_handle_watchpoint): Likewise.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
+	and don't aarch64_get_debug_reg_state.  All callers update.
+	(aarch64_handle_aligned_watchpoint): Likewise.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+	(aarch64_handle_watchpoint): Likewise.
+	(aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
+	(aarch64_remove_point): Likewise.
+
+2015-07-17  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
+	debug_printf.
+	(aarch64_handle_unaligned_watchpoint): Likewise.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert the previous 3 commits:
+	Move gdb_regex* to common/
+	Move linux_find_memory_regions_full & co.
+	gdbserver build-id attribute generator
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	gdbserver build-id attribute generator.
+	* linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
+	(ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
+	(ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
+	(find_phdr): New.
+	(get_dynamic): Use find_pdhr to traverse program headers.
+	(struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
+	(compare_mapping_entry_range, struct find_memory_region_callback_data)
+	(read_build_id, find_memory_region_callback, lrfind_mapping_entry)
+	(get_hex_build_id): New.
+	(linux_qxfer_libraries_svr4): Add optional build-id attribute
+	to reply XML document.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* target.c: Include target/target-utils.h and fcntl.h.
+	(target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
+	(target_fileio_read_stralloc): New functions.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* Makefile.in (OBS): Add gdb_regex.o.
+	(gdb_regex.o): New.
+	* config.in: Rebuilt.
+	* configure: Rebuilt.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
+	* Makefile.in (OBS): Add target-utils.o.
+	(linux-maps.o, target-utils.o): New.
+	* configure.srv (srv_linux_obj): Add linux-maps.o.
+
+2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* linux-aarch64-low.c (aarch64_supports_range_stepping): New
+	function, return 1.
+	(the_low_target): Install it.
+
+2015-07-14  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
+	Instead, ignore ECHILD, and throw an error for other errnos.
+
+2015-07-10  Pedro Alves  <palves@redhat.com>
+
+	* event-loop.c (struct callback_event) <data>: Change type to
+	gdb_client_data instance instead of gdb_client_data pointer.
+	(append_callback_event): Adjust.
+
+2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* linux-aarch64-low.c: Add comments for each linux_target_ops
+	method.  Remove comments already covered in target_ops and
+	linux_target_ops definitions.
+	(the_low_target): Add comments for each unimplemented method.
+
+2015-07-09  Yao Qi  <yao.qi@linaro.org>
+
+	* linux-aarch64-low.c (aarch64_regmap): Remove.
+	(aarch64_usrregs_info): Remove.
+	(regs_info): Set field usrregs to NULL.
+
 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
 
 	* linux-low.c: Include "rsp-low.h"
@@ -516,20 +3769,20 @@
 
 2015-03-04  Pedro Alves  <palves@redhat.com>
 
-        * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
+	* linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
 	Decide whether a breakpoint triggered based on the SIGTRAP's
 	siginfo.si_code.
-        (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
-        breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
+	(thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
+	breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
 	(linux_low_filter_event): Check for breakpoints before checking
 	watchpoints.
 	(linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
 	siginfo.si_code.
-        (linux_stopped_by_sw_breakpoint)
-        (linux_supports_stopped_by_sw_breakpoint)
-        (linux_stopped_by_hw_breakpoint)
-        (linux_supports_stopped_by_hw_breakpoint): New functions.
-        (linux_target_ops): Install new target methods.
+	(linux_stopped_by_sw_breakpoint)
+	(linux_supports_stopped_by_sw_breakpoint)
+	(linux_stopped_by_hw_breakpoint)
+	(linux_supports_stopped_by_hw_breakpoint): New functions.
+	(linux_target_ops): Install new target methods.
 
 2015-03-04  Pedro Alves  <palves@redhat.com>
 
@@ -2759,7 +6012,7 @@
 
 	* server.h (struct emit_ops, current_insn_ptr, emit_error):
 	Move ...
-        * ax.h: ... here.
+	* ax.h: ... here.
 
 2013-09-05  Pedro Alves  <palves@redhat.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/config.in ./gdb/gdbserver/config.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/config.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/config.in	2017-03-06 01:49:07.000000000 +0000
@@ -18,6 +18,9 @@
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
+/* define if the compiler supports basic C++11 syntax */
+#undef HAVE_CXX11
+
 /* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
    you don't. */
 #undef HAVE_DECL_ADDR_NO_RANDOMIZE
@@ -37,6 +40,10 @@
    */
 #undef HAVE_DECL_PERROR
 
+/* Define to 1 if you have the declaration of `ptrace', and to 0 if you don't.
+   */
+#undef HAVE_DECL_PTRACE
+
 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
    don't. */
 #undef HAVE_DECL_SNPRINTF
@@ -95,6 +102,9 @@
 /* Define to 1 if you have the `fdwalk' function. */
 #undef HAVE_FDWALK
 
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
 /* Define to 1 if you have the `getauxval' function. */
 #undef HAVE_GETAUXVAL
 
@@ -183,6 +193,9 @@
 /* Define if the target supports PTRACE_GETREGS for register access. */
 #undef HAVE_PTRACE_GETREGS
 
+/* Define to 1 if you have the <ptrace.h> header file. */
+#undef HAVE_PTRACE_H
+
 /* Define to 1 if you have the `pwrite' function. */
 #undef HAVE_PWRITE
 
@@ -192,6 +205,9 @@
 /* Define to 1 if you have the <sgtty.h> header file. */
 #undef HAVE_SGTTY_H
 
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
 /* Define to 1 if you have the <signal.h> header file. */
 #undef HAVE_SIGNAL_H
 
@@ -222,6 +238,12 @@
 /* Define to 1 if `struct stat' is a member of `st_blocks'. */
 #undef HAVE_STRUCT_STAT_ST_BLOCKS
 
+/* Define to 1 if `struct user_regs_struct' is a member of `fs_base'. */
+#undef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+
+/* Define to 1 if `struct user_regs_struct' is a member of `gs_base'. */
+#undef HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE
+
 /* Define to 1 if the target supports __sync_*_compare_and_swap */
 #undef HAVE_SYNC_BUILTINS
 
@@ -234,6 +256,9 @@
 /* Define to 1 if you have the <sys/procfs.h> header file. */
 #undef HAVE_SYS_PROCFS_H
 
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#undef HAVE_SYS_PTRACE_H
+
 /* Define to 1 if you have the <sys/reg.h> header file. */
 #undef HAVE_SYS_REG_H
 
@@ -276,9 +301,21 @@
 /* Define if UST is available */
 #undef HAVE_UST
 
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
 /* Define to 1 if you have the <wait.h> header file. */
 #undef HAVE_WAIT_H
 
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
@@ -300,6 +337,21 @@
 /* Additional package description */
 #undef PKGVERSION
 
+/* Define to the type of arg 1 for ptrace. */
+#undef PTRACE_TYPE_ARG1
+
+/* Define to the type of arg 3 for ptrace. */
+#undef PTRACE_TYPE_ARG3
+
+/* Define to the type of arg 4 for ptrace. */
+#undef PTRACE_TYPE_ARG4
+
+/* Define to the type of arg 5 for ptrace. */
+#undef PTRACE_TYPE_ARG5
+
+/* Define as the return type of ptrace. */
+#undef PTRACE_TYPE_RET
+
 /* Bug reporting address */
 #undef REPORT_BUGS_TO
 
@@ -368,3 +420,9 @@
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */
 #undef _POSIX_SOURCE
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure ./gdb/gdbserver/configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/configure	2017-03-06 01:49:07.000000000 +0000
@@ -606,16 +606,13 @@ WARN_CFLAGS
 ustinc
 ustlibs
 ALLOCA
-SET_MAKE
-GMAKE_FALSE
-GMAKE_TRUE
-MAKE
 CCDEPMODE
 DEPDIR
 am__leading_dot
 host_noncanonical
 target_noncanonical
-COMPILER
+CXX_DIALECT
+HAVE_CXX11
 RANLIB
 AR
 INSTALL_DATA
@@ -692,12 +689,13 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_largefile
-enable_build_with_cxx
 enable_libmcheck
 with_ust
 with_ust_include
 with_ust_lib
 enable_werror
+enable_build_warnings
+enable_gdb_build_warnings
 with_pkgversion
 with_bugurl
 with_libthread_db
@@ -1336,9 +1334,12 @@ Optional Features:
   --enable-maintainer-mode  enable make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer
   --disable-largefile     omit support for large files
-  --enable-build-with-cxx build with C++ compiler instead of C compiler
   --enable-libmcheck      Try linking with -lmcheck if available
   --enable-werror         treat compile warnings as errors
+  --enable-build-warnings enable build-time compiler warnings if gcc is used
+  --enable-gdb-build-warnings
+                          enable GDB specific build-time compiler warnings if
+                          gcc is used
   --enable-inprocess-agent
                           inprocess agent
 
@@ -1766,6 +1767,60 @@ fi
 
 } # ac_fn_c_try_link
 
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_type
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -1878,60 +1933,6 @@ eval ac_res=\$$3
 
 } # ac_fn_c_check_decl
 
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-	 return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
-
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -4653,172 +4654,1126 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+# We require a C++11 compiler.  Check if one is available, and if
+# necessary, set CXX_DIALECT to some -std=xxx switch.
+
+      ax_cxx_compile_cxx11_required=true
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  CXX_DIALECT=""
+  ac_success=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
+if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
+#ifndef __cplusplus
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
+#error "This is not a C++ compiler"
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+#elif __cplusplus < 201103L
 
-fi
+#error "This is not a C++11 compiler"
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
+#else
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+namespace cxx11
+{
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+  namespace test_static_assert
+  {
 
-fi
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+  }
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+  namespace test_final_override
+  {
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+    struct Base
+    {
+      virtual void f() {}
+    };
 
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+  }
 
-fi
+  namespace test_double_right_angle_brackets
+  {
 
+    template < typename T >
+    struct check {};
 
-# See if we are building with C++, and substitute COMPILER.
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
-  # Check whether --enable-build-with-cxx was given.
-if test "${enable_build_with_cxx+set}" = set; then :
-  enableval=$enable_build_with_cxx; case $enableval in
-      yes | no)
-	  ;;
-      *)
-	  as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
-    esac
-else
-  enable_build_with_cxx=no
-fi
+  }
 
+  namespace test_decltype
+  {
 
-  if test "$enable_build_with_cxx" = "yes"; then
-    # We're using -fpermissive as shortcut for now.
-    COMPILER='$(CXX) -fpermissive'
-   else
-    COMPILER='$(CC)'
-  fi
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
+  }
 
+  namespace test_type_deduction
+  {
 
-# Set the 'development' global.
-. $srcdir/../../bfd/development.sh
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
-# Enable -lmcheck by default (it provides cheap-enough memory
-# mangling), but turn it off for releases.
-if $development; then
-  libmcheck_default=yes
-else
-  libmcheck_default=no
-fi
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
-  # Check whether --enable-libmcheck was given.
-if test "${enable_libmcheck+set}" = set; then :
-  enableval=$enable_libmcheck; case "${enableval}" in
-      yes | y) ENABLE_LIBMCHECK="yes" ;;
-      no | n)  ENABLE_LIBMCHECK="no" ;;
-      *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
-    esac
-fi
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
 
-  if test -z "${ENABLE_LIBMCHECK}"; then
-    ENABLE_LIBMCHECK=${libmcheck_default}
-  fi
+  }
 
-  if test "$ENABLE_LIBMCHECK" = "yes" ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
-$as_echo_n "checking for main in -lmcheck... " >&6; }
-if test "${ac_cv_lib_mcheck_main+set}" = set; then :
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx11=yes
+else
+  ax_cv_cxx_compile_cxx11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+    if test x$ac_success = xno; then
+    for switch in -std=gnu++11 -std=gnu++0x; do
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+
+    if test x$ac_success = xno; then
+                for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX_DIALECT="$switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX11=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
+  else
+    HAVE_CXX11=1
+
+$as_echo "#define HAVE_CXX11 1" >>confdefs.h
+
+  fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+# Set the 'development' global.
+. $srcdir/../../bfd/development.sh
+
+# Enable -lmcheck by default (it provides cheap-enough memory
+# mangling), but turn it off for releases.
+if $development; then
+  libmcheck_default=yes
+else
+  libmcheck_default=no
+fi
+
+  # Check whether --enable-libmcheck was given.
+if test "${enable_libmcheck+set}" = set; then :
+  enableval=$enable_libmcheck; case "${enableval}" in
+      yes | y) ENABLE_LIBMCHECK="yes" ;;
+      no | n)  ENABLE_LIBMCHECK="no" ;;
+      *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
+    esac
+fi
+
+
+  if test -z "${ENABLE_LIBMCHECK}"; then
+    ENABLE_LIBMCHECK=${libmcheck_default}
+  fi
+
+  if test "$ENABLE_LIBMCHECK" = "yes" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
+$as_echo_n "checking for main in -lmcheck... " >&6; }
+if test "${ac_cv_lib_mcheck_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -4990,95 +5945,6 @@ else CCDEPMODE=depmode=$am_cv_CC_depende
 fi
 
 
-# Check for the 'make' the user wants to use.
-for ac_prog in make
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MAKE"; then
-  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_MAKE="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-MAKE=$ac_cv_prog_MAKE
-if test -n "$MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-$as_echo "$MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$MAKE" && break
-done
-
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
- if test "$MAKE_IS_GNU" = yes; then
-  GMAKE_TRUE=
-  GMAKE_FALSE='#'
-else
-  GMAKE_TRUE='#'
-  GMAKE_FALSE=
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
 gnulib_extra_configure_args=
 # If large-file support is disabled, make sure gnulib does the same.
 if test "$enable_largefile" = no; then
@@ -5255,60 +6121,285 @@ fi
   # different subdirs can have different --enable and --with options.
   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
 
-  ac_popdir=`pwd`
-  ac_dir=$in_build
+  ac_popdir=`pwd`
+  ac_dir=$in_build
+
+  ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+  $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+  $as_echo "$ac_msg" >&6
+  as_dir="$ac_dir"; as_fn_mkdir_p
+
+  case $srcdir in
+  [\\/]* | ?:[\\/]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
+
+  cd "$ac_dir"
+
+  ac_sub_configure=$ac_srcdir/configure
+
+  # Make the cache file name correct relative to the subdirectory.
+  case $cache_file in
+  [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+  *) # Relative name.
+    ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+  esac
+
+  if test -n "$in_extra_args"; then
+    # Add the extra args at the end.
+    ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+  # The eval makes quoting arguments work.
+  eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+       --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+    as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+
+  cd "$ac_popdir"
+
+
+for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h 		 proc_service.h sys/procfs.h linux/elf.h 		 fcntl.h signal.h sys/file.h 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h 		 netinet/tcp.h arpa/inet.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+for ac_header in vfork.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in fork vfork
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if test "${ac_cv_func_fork_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_fork_works=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	  /* By Ruediger Kuhlmann. */
+	  return fork () < 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_fork_works=yes
+else
+  ac_cv_func_fork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+
+else
+  ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)
+      # Override, as these systems have only a dummy fork() stub
+      ac_cv_func_fork_works=no
+      ;;
+    *)
+      ac_cv_func_fork_works=yes
+      ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if test "${ac_cv_func_vfork_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_vfork_works=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Thanks to Paul Eggert for this test.  */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.  The compiler
+   is told about this with #include <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+   static variable whose address is put into a register that is
+   clobbered by the vfork.  */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+
+int
+main ()
+{
+  pid_t parent = getpid ();
+  pid_t child;
 
-  ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-  $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
-  $as_echo "$ac_msg" >&6
-  as_dir="$ac_dir"; as_fn_mkdir_p
+  sparc_address_test (0);
 
-  case $srcdir in
-  [\\/]* | ?:[\\/]* )
-    ac_srcdir=$srcdir/$in_src ;;
-  *) # Relative name.
-    ac_srcdir=../$srcdir/$in_src ;;
-  esac
+  child = vfork ();
 
-  cd "$ac_dir"
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.  This
+       test uses lots of local variables, at least as many local
+       variables as main has allocated so far including compiler
+       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+       reuse the register of parent for one of the local variables,
+       since it will think that parent can't possibly be used any more
+       in this routine.  Assigning to the local variable will thus
+       munge parent in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+	|| p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+       from child file descriptors.  If the child closes a descriptor
+       before it execs or exits, this munges the parent's descriptor
+       as well.  Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
 
-  ac_sub_configure=$ac_srcdir/configure
+    while (wait(&status) != child)
+      ;
+    return (
+	 /* Was there some problem with vforking?  */
+	 child < 0
+
+	 /* Did the child fail?  (This shouldn't happen.)  */
+	 || status
+
+	 /* Did the vfork/compiler bug occur?  */
+	 || parent != getpid()
+
+	 /* Did the file descriptor bug occur?  */
+	 || fstat(fileno(stdout), &st) != 0
+	 );
+  }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_vfork_works=yes
+else
+  ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-  # Make the cache file name correct relative to the subdirectory.
-  case $cache_file in
-  [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-  *) # Relative name.
-    ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-  esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
 
-  if test -n "$in_extra_args"; then
-    # Add the extra args at the end.
-    ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
-  fi
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+  ac_cv_func_vfork_works=$ac_cv_func_vfork
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
-  # The eval makes quoting arguments work.
-  eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-       --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-    as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+if test "x$ac_cv_func_vfork_works" = xyes; then
 
-  cd "$ac_popdir"
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
 
+else
 
-for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h 		 proc_service.h sys/procfs.h linux/elf.h 		 fcntl.h signal.h sys/file.h 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h 		 netinet/tcp.h arpa/inet.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+$as_echo "#define vfork fork" >>confdefs.h
 
 fi
+if test "x$ac_cv_func_fork_works" = xyes; then
 
-done
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
 
 for ac_func in getauxval pread pwrite pread64 setns
 do :
@@ -5678,7 +6769,7 @@ fi
 done
 
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair
+  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -5748,6 +6839,209 @@ if test $gdb_cv_func_sigsetjmp = yes; th
 fi
 
 
+# Check the return and argument types of ptrace.
+
+
+for ac_header in sys/ptrace.h ptrace.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+gdb_ptrace_headers='
+#include <sys/types.h>
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
+"
+if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PTRACE $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+
+else
+
+  : ${gdb_cv_func_ptrace_ret='int'}
+  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
+fi
+
+# Check return type.  Varargs (used on GNU/Linux) conflict with the
+# empty argument list, so check for that explicitly.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
+$as_echo_n "checking return type of ptrace... " >&6; }
+if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$gdb_ptrace_headers
+int
+main ()
+{
+extern long ptrace (enum __ptrace_request, ...);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gdb_cv_func_ptrace_ret='long'
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$gdb_ptrace_headers
+int
+main ()
+{
+extern int ptrace ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gdb_cv_func_ptrace_ret='int'
+else
+  gdb_cv_func_ptrace_ret='long'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
+$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
+_ACEOF
+
+# Check argument types.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
+$as_echo_n "checking types of arguments for ptrace... " >&6; }
+if test "${gdb_cv_func_ptrace_args+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$gdb_ptrace_headers
+int
+main ()
+{
+extern long ptrace (enum __ptrace_request, ...);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
+else
+
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
+   for gdb_arg4 in 'int' 'long' 'void *'; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$gdb_ptrace_headers
+int
+main ()
+{
+
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+    break 4;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    for gdb_arg5 in 'int *' 'int' 'long'; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$gdb_ptrace_headers
+int
+main ()
+{
+
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+    break 5;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    done
+   done
+  done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
+$as_echo "$gdb_cv_func_ptrace_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG3 $3
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG4 $4
+_ACEOF
+
+if test -n "$5"; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG5 $5
+_ACEOF
+
+fi
+
+
 # Check for UST
 ustlibs=""
 ustinc=""
@@ -5828,6 +7122,7 @@ fi
 
 
 
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -5838,11 +7133,8 @@ if test "${enable_werror+set}" = set; th
 fi
 
 
-# Enable -Werror by default when using gcc in C mode.  Leave it off
-# for C++ until we're warning clean.  Turn it off for releases.
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
-   && test x"$enable_build_with_cxx" != x"yes" \
-   && $development; then
+# Enable -Werror by default when using gcc.  Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
     ERROR_ON_WARNING=yes
 fi
 
@@ -5851,46 +7143,86 @@ if test "${ERROR_ON_WARNING}" = yes ; th
     WERROR_CFLAGS="-Werror"
 fi
 
+# The options we'll try to enable.
 build_warnings="-Wall -Wpointer-arith \
--Wformat-nonliteral -Wno-char-subscripts -Wempty-body"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
-   build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
-   build_warnings="$build_warnings -Wdeclaration-after-statement"
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts \
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
+-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+  *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+  enableval=$enable_build_warnings; case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-gdb-build-warnings was given.
+if test "${enable_gdb_build_warnings+set}" = set; then :
+  enableval=$enable_gdb_build_warnings; case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 
 # The set of warnings supported by a C++ compiler is not the same as
 # of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
-    ac_ext=cpp
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
 
 WARN_CFLAGS=""
-if test "x$GCC" = xyes
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
 $as_echo_n "checking compiler warning flags... " >&6; }
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
+	# GCC does not complain about -Wno-unknown-warning.  Invert
+	# and test -Wunknown-warning instead.
+	case $w in
+	-Wno-*)
+		wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+	*)
+		wtest=$w ;;
+	esac
+
 	case $w in
 	-Werr*) WERROR_CFLAGS=-Werror ;;
 	*)
 	    # Check whether GCC accepts it.
 	    saved_CFLAGS="$CFLAGS"
-	    CFLAGS="$CFLAGS $w"
+	    CFLAGS="$CFLAGS $wtest"
 	    saved_CXXFLAGS="$CXXFLAGS"
-	    CXXFLAGS="$CXXFLAGS $w"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	    CXXFLAGS="$CXXFLAGS $wtest"
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5915,14 +7247,18 @@ fi
 
 
 
-if test "$enable_build_with_cxx" = "yes"; then
-   ac_ext=c
+ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
+
+case " $WARN_CFLAGS " in
+*" -Wmissing-prototypes "*)
+  WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-prototypes"
+  ;;
+esac
 
 old_LIBS="$LIBS"
 LIBS="$LIBS -ldl"
@@ -6162,6 +7498,32 @@ _ACEOF
 fi
 
 
+# See if <sys/user.h> supports the %fs_base and %gs_base amd64 segment
+# registers.  Older amd64 Linux's don't have the fs_base and gs_base
+# members of `struct user_regs_struct'.
+ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
+"
+if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
+"
+if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
+_ACEOF
+
+
+fi
+
+
+
 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
 #include <sys/socket.h>
 
@@ -6176,7 +7538,20 @@ _ACEOF
 fi
 
 
-ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
+case "${target}" in
+  *-android*)
+    # Starting with NDK version 9, <elf.h> actually includes definitions
+    # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
+    # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
+    # leading to conflicts with the defintions from <linux/elf.h>.
+    # This makes it impossible for us to include both <elf.h> and
+    # <linux/elf.h>, which means that, in practice, we do not have
+    # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
+    # Therefore, do not try to auto-detect availability, as it would
+    # get it wrong on this platform.
+    ;;
+  *)
+    ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
 
 "
 if test "x$ac_cv_type_Elf32_auxv_t" = x""yes; then :
@@ -6199,6 +7574,7 @@ _ACEOF
 
 fi
 
+esac
 
 
 
@@ -6288,6 +7664,37 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
 $as_echo "$gdb_cv_i386_is_x86_64" >&6; }
     ;;
+
+  x86_64-*-linux*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
+$as_echo_n "checking if building for x32... " >&6; }
+if test "${gdb_cv_x86_is_x32+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CPPFLAGS="$CPPFLAGS"
+		    CPPFLAGS="$CPPFLAGS $CFLAGS"
+		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if __x86_64__ && __ILP32__
+got it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "got it" >/dev/null 2>&1; then :
+  gdb_cv_x86_is_x32=yes
+else
+  gdb_cv_x86_is_x32=no
+fi
+rm -f conftest*
+
+		    CPPFLAGS="$save_CPPFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
+$as_echo "$gdb_cv_x86_is_x32" >&6; }
+    ;;
+
   m68k-*-*)
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
 $as_echo_n "checking if building for Coldfire... " >&6; }
@@ -7039,7 +8446,6 @@ fi
 
 ac_config_files="$ac_config_files Makefile"
 
-ac_config_commands="$ac_config_commands default"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -7142,10 +8548,6 @@ if test -z "${MAINTAINER_MODE_TRUE}" && 
   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
-  as_fn_error "conditional \"GMAKE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -7740,7 +9142,6 @@ do
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -8286,7 +9687,7 @@ which seems to be undefined.  Please mak
 
   case $ac_file$ac_mode in
     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
-    "default":C) case x$CONFIG_HEADERS in
+    "Makefile":F) case x$CONFIG_HEADERS in
 xconfig.h:config.in)
 echo > stamp-h ;;
 esac
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure.ac ./gdb/gdbserver/configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure.ac	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/configure.ac	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB server.
-dnl Copyright (C) 2000-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
@@ -38,10 +38,11 @@ AC_PROG_RANLIB
 
 AC_ARG_PROGRAM
 
-AC_HEADER_STDC
+# We require a C++11 compiler.  Check if one is available, and if
+# necessary, set CXX_DIALECT to some -std=xxx switch.
+AX_CXX_COMPILE_STDCXX(11, , mandatory)
 
-# See if we are building with C++, and substitute COMPILER.
-GDB_AC_BUILD_WITH_CXX
+AC_HEADER_STDC
 
 # Set the 'development' global.
 . $srcdir/../../bfd/development.sh
@@ -62,17 +63,6 @@ ACX_NONCANONICAL_HOST
 ZW_CREATE_DEPDIR
 ZW_PROG_COMPILER_DEPENDENCIES([CC])
 
-# Check for the 'make' the user wants to use.
-AC_CHECK_PROGS(MAKE, make)
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
-AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
-AC_PROG_MAKE_SET
-
 gnulib_extra_configure_args=
 # If large-file support is disabled, make sure gnulib does the same.
 if test "$enable_largefile" = no; then
@@ -94,10 +84,14 @@ AC_CHECK_HEADERS(sgtty.h termio.h termio
 		 fcntl.h signal.h sys/file.h dnl
 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
 		 netinet/tcp.h arpa/inet.h)
+AC_FUNC_FORK
 AC_CHECK_FUNCS(getauxval pread pwrite pread64 setns)
 
 GDB_AC_COMMON
 
+# Check the return and argument types of ptrace.
+GDB_AC_PTRACE
+
 # Check for UST
 ustlibs=""
 ustinc=""
@@ -146,72 +140,13 @@ fi
 AC_SUBST(ustlibs)
 AC_SUBST(ustinc)
 
-AC_ARG_ENABLE(werror,
-  AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
-  [case "${enableval}" in
-     yes | y) ERROR_ON_WARNING="yes" ;;
-     no | n)  ERROR_ON_WARNING="no" ;;
-     *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
-   esac])
-
-# Enable -Werror by default when using gcc in C mode.  Leave it off
-# for C++ until we're warning clean.  Turn it off for releases.
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
-   && test x"$enable_build_with_cxx" != x"yes" \
-   && $development; then
-    ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-    WERROR_CFLAGS="-Werror"
-fi
-
-build_warnings="-Wall -Wpointer-arith \
--Wformat-nonliteral -Wno-char-subscripts -Wempty-body"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
-   build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
-   build_warnings="$build_warnings -Wdeclaration-after-statement"
-fi
-
-# The set of warnings supported by a C++ compiler is not the same as
-# of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
-    AC_LANG_PUSH([C++])
-fi
-
-WARN_CFLAGS=""
-if test "x$GCC" = xyes
-then
-    AC_MSG_CHECKING(compiler warning flags)
-    # Separate out the -Werror flag as some files just cannot be
-    # compiled with it enabled.
-    for w in ${build_warnings}; do
-	case $w in
-	-Werr*) WERROR_CFLAGS=-Werror ;;
-	*)
-	    # Check whether GCC accepts it.
-	    saved_CFLAGS="$CFLAGS"
-	    CFLAGS="$CFLAGS $w"
-	    saved_CXXFLAGS="$CXXFLAGS"
-	    CXXFLAGS="$CXXFLAGS $w"
-	    AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
-	    CFLAGS="$saved_CFLAGS"
-	    CXXFLAGS="$saved_CXXFLAGS"
-	esac
-    done
-    AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS})
-fi
-AC_SUBST(WARN_CFLAGS)
-AC_SUBST(WERROR_CFLAGS)
-
-if test "$enable_build_with_cxx" = "yes"; then
-   AC_LANG_POP([C++])
-fi
+AM_GDB_WARNINGS
+dnl The codebase isn't clean yet with this flag.
+case " $WARN_CFLAGS " in
+*" -Wmissing-prototypes "*)
+  WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-prototypes"
+  ;;
+esac
 
 dnl dladdr is glibc-specific.  It is used by thread-db.c but only for
 dnl debugging messages.  It lives in -ldl which is handled below so we don't
@@ -228,14 +163,35 @@ AC_CHECK_DECLS([strerror, perror, vaspri
 
 AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize])
 
+# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
+# Older amd64 Linux's don't have the fs_base and gs_base members of
+# `struct user_regs_struct'.
+AC_CHECK_MEMBERS([struct user_regs_struct.fs_base, struct user_regs_struct.gs_base],
+		 [], [], [#include <sys/user.h>])
+
+
 AC_CHECK_TYPES(socklen_t, [], [],
 [#include <sys/types.h>
 #include <sys/socket.h>
 ])
 
-AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [],
-#include <elf.h>
-)
+case "${target}" in
+  *-android*)
+    # Starting with NDK version 9, <elf.h> actually includes definitions
+    # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
+    # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
+    # leading to conflicts with the defintions from <linux/elf.h>.
+    # This makes it impossible for us to include both <elf.h> and
+    # <linux/elf.h>, which means that, in practice, we do not have
+    # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
+    # Therefore, do not try to auto-detect availability, as it would
+    # get it wrong on this platform.
+    ;;
+  *)
+    AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [],
+    #include <elf.h>
+    )
+esac
 
 ACX_PKGVERSION([GDB])
 ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
@@ -259,6 +215,20 @@ got it
                     [gdb_cv_i386_is_x86_64=no])
                     CPPFLAGS="$save_CPPFLAGS"])
     ;;
+
+  x86_64-*-linux*)
+    AC_CACHE_CHECK([if building for x32], [gdb_cv_x86_is_x32],
+		   [save_CPPFLAGS="$CPPFLAGS"
+		    CPPFLAGS="$CPPFLAGS $CFLAGS"
+		    AC_EGREP_CPP([got it], [
+#if __x86_64__ && __ILP32__
+got it
+#endif
+		 ], [gdb_cv_x86_is_x32=yes],
+		    [gdb_cv_x86_is_x32=no])
+		    CPPFLAGS="$save_CPPFLAGS"])
+    ;;
+
   m68k-*-*)
     AC_CACHE_CHECK([if building for Coldfire], [gdb_cv_m68k_is_coldfire],
       	           [save_CPPFLAGS="$CPPFLAGS"
@@ -514,9 +484,11 @@ if test x"$STDINT_H" != x; then
 fi
 AC_SUBST(GNULIB_STDINT_H)
 
-AC_OUTPUT(Makefile,
+AC_CONFIG_FILES([Makefile],
 [case x$CONFIG_HEADERS in
 xconfig.h:config.in)
 echo > stamp-h ;;
 esac
 ])
+
+AC_OUTPUT
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure.srv ./gdb/gdbserver/configure.srv
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/configure.srv	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/configure.srv	2017-03-06 01:49:07.000000000 +0000
@@ -24,20 +24,21 @@
 # Default hostio_last_error implementation
 srv_hostio_err_objs="hostio-errno.o"
 
-srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o"
-srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o"
-srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o"
-srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
+srv_i386_regobj="i386.o i386-avx.o i386-avx-avx512.o i386-avx-mpx-avx512-pku.o i386-mpx.o i386-avx-mpx.o i386-mmx.o"
+srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx-avx512-linux.o i386-avx-mpx-avx512-pku-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o"
+srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx-avx512.o amd64-avx-mpx-avx512-pku.o amd64-mpx.o amd64-avx-mpx.o x32.o x32-avx.o x32-avx-avx512.o"
+srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o amd64-avx-mpx-avx512-pku-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx-avx512-linux.o"
 
-ipa_i386_linux_regobj=i386-linux-ipa.o
-ipa_amd64_linux_regobj=amd64-linux-ipa.o
+ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o  i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
+ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o"
+ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o"
 
-srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml"
-srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml"
-srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
-srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml $srv_i386_64bit_xmlfiles"
-srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml $srv_i386_32bit_xmlfiles"
-srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
+srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml"
+srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-segments.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml i386/64bit-pkeys.xml"
+srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx-avx512.xml i386/i386-avx-mpx-avx512-pku.xml i386/i386-mpx.xml i386/i386-avx-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
+srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx-avx512.xml i386/amd64-avx-mpx-avx512-pku.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx-avx512.xml i386/amd64-mpx.xml i386/amd64-avx-mpx.xml  $srv_i386_64bit_xmlfiles"
+srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx-avx512-linux.xml i386/i386-avx-mpx-avx512-pku-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml i386/i386-avx-mpx-linux.xml $srv_i386_32bit_xmlfiles"
+srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx-avx512.xml i386/amd64-avx-mpx-avx512-pku-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/amd64-avx-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx-avx512-linux.xml $srv_i386_64bit_xmlfiles"
 
 
 # Linux object files.  This is so we don't have to repeat
@@ -49,28 +50,39 @@ srv_linux_obj="linux-low.o linux-osdata.
 case "${target}" in
   aarch64*-*-linux*)
 			srv_regobj="aarch64.o"
-			srv_tgtobj="linux-aarch64-low.o"
+			srv_regobj="${srv_regobj} arm-with-neon.o"
+			srv_tgtobj="linux-aarch64-low.o aarch64-linux-hw-point.o"
+			srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
+			srv_tgtobj="${srv_tgtobj} arm.o"
+			srv_tgtobj="$srv_tgtobj aarch64-linux.o"
+			srv_tgtobj="$srv_tgtobj aarch64-insn.o"
 			srv_tgtobj="${srv_tgtobj} $srv_linux_obj"
 			srv_xmlfiles="aarch64.xml"
 			srv_xmlfiles="${srv_xmlfiles} aarch64-core.xml"
 			srv_xmlfiles="${srv_xmlfiles} aarch64-fpu.xml"
-			srv_linux_usrregs=yes
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-core.xml arm/arm-vfpv3.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-with-neon.xml"
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
+			ipa_obj="linux-aarch64-ipa.o aarch64-ipa.o"
 			;;
   arm*-*-linux*)	srv_regobj="reg-arm.o arm-with-iwmmxt.o"
 			srv_regobj="${srv_regobj} arm-with-vfpv2.o"
 			srv_regobj="${srv_regobj} arm-with-vfpv3.o"
 			srv_regobj="${srv_regobj} arm-with-neon.o"
 			srv_tgtobj="$srv_linux_obj linux-arm-low.o"
-			srv_xmlfiles="arm-with-iwmmxt.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-with-vfpv2.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-with-vfpv3.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-with-neon.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-core.xml"
-			srv_xmlfiles="${srv_xmlfiles} xscale-iwmmxt.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-vfpv2.xml"
-			srv_xmlfiles="${srv_xmlfiles} arm-vfpv3.xml"
+			srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
+			srv_tgtobj="${srv_tgtobj} arm.o"
+			srv_tgtobj="${srv_tgtobj} arm-linux.o"
+			srv_tgtobj="${srv_tgtobj} arm-get-next-pcs.o"
+			srv_xmlfiles="arm/arm-with-iwmmxt.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-with-vfpv2.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-with-vfpv3.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-with-neon.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-core.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/xscale-iwmmxt.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-vfpv2.xml"
+			srv_xmlfiles="${srv_xmlfiles} arm/arm-vfpv3.xml"
 			srv_linux_usrregs=yes
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
@@ -107,8 +119,9 @@ case "${target}" in
 			if test "$gdb_cv_i386_is_x86_64" = yes ; then
 			    srv_regobj="$srv_regobj $srv_amd64_linux_regobj"
 			    srv_xmlfiles="${srv_xmlfiles} $srv_amd64_linux_xmlfiles"
+			    srv_tgtobj="amd64-linux-siginfo.o"
 			fi
-			srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
+			srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
 			srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
 			srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
 			srv_linux_usrregs=yes
@@ -246,6 +259,7 @@ case "${target}" in
 			srv_linux_usrregs=yes
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
+			ipa_obj="${ipa_ppc_linux_regobj} linux-ppc-ipa.o"
 			;;
   powerpc-*-lynxos*)	srv_regobj="powerpc-32.o"
 			srv_tgtobj="lynx-low.o lynx-ppc-low.o"
@@ -295,6 +309,22 @@ case "${target}" in
 			srv_linux_usrregs=yes
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
+			ipa_obj="linux-s390-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux32-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux32v1-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux32v2-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux64v1-ipa.o"
+			ipa_obj="${ipa_obj} s390-linux64v2-ipa.o"
+			ipa_obj="${ipa_obj} s390-vx-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390-te-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390-tevx-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390x-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390x-linux64v1-ipa.o"
+			ipa_obj="${ipa_obj} s390x-linux64v2-ipa.o"
+			ipa_obj="${ipa_obj} s390x-vx-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390x-te-linux64-ipa.o"
+			ipa_obj="${ipa_obj} s390x-tevx-linux64-ipa.o"
 			;;
   sh*-*-linux*)		srv_regobj=reg-sh.o
 			srv_tgtobj="$srv_linux_obj linux-sh-low.o"
@@ -328,12 +358,18 @@ case "${target}" in
 			srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
 			srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
 			srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
+			srv_tgtobj="${srv_tgtobj} amd64-linux-siginfo.o"
 			srv_xmlfiles="$srv_i386_linux_xmlfiles $srv_amd64_linux_xmlfiles"
 			srv_linux_usrregs=yes # This is for i386 progs.
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
 			srv_linux_btrace=yes
-			ipa_obj="${ipa_amd64_linux_regobj} linux-amd64-ipa.o"
+			if test "$gdb_cv_x86_is_x32" = yes ; then
+			    ipa_obj="${ipa_x32_linux_regobj}"
+			else
+			    ipa_obj="${ipa_amd64_linux_regobj}"
+			fi
+			ipa_obj="${ipa_obj} linux-amd64-ipa.o"
 			;;
   x86_64-*-mingw*)	srv_regobj="$srv_amd64_regobj"
 			srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
@@ -348,6 +384,7 @@ case "${target}" in
   xtensa*-*-linux*)	srv_regobj=reg-xtensa.o
 			srv_tgtobj="$srv_linux_obj linux-xtensa-low.o"
 			srv_linux_regsets=yes
+			srv_linux_thread_db=yes
 			;;
   tilegx-*-linux*)	srv_regobj=reg-tilegx.o
 			srv_regobj="${srv_regobj} reg-tilegx32.o"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/debug.c ./gdb/gdbserver/debug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/debug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/debug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Debugging routines for the remote server for GDB.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "server.h"
-#include <sys/time.h>
+#include <chrono>
 
 /* Enable miscellaneous debugging output.  The name is historical - it
    was originally used to debug LinuxThreads support.  */
@@ -27,8 +27,7 @@ int debug_threads;
 int debug_timestamp;
 
 /* Print a debugging message.
-   If the text begins a new line it is preceded by a timestamp, if the
-   system has gettimeofday.
+   If the text begins a new line it is preceded by a timestamp.
    We don't get fancy with newline checking, we just check whether the
    previous call ended with "\n".  */
 
@@ -41,14 +40,13 @@ debug_vprintf (const char *format, va_li
 
   if (debug_timestamp && new_line)
     {
-      struct timeval tm;
+      using namespace std::chrono;
 
-      gettimeofday (&tm, NULL);
+      steady_clock::time_point now = steady_clock::now ();
+      seconds s = duration_cast<seconds> (now.time_since_epoch ());
+      microseconds us = duration_cast<microseconds> (now.time_since_epoch ()) - s;
 
-      /* If gettimeofday doesn't exist, and as a portability solution it has
-	 been replaced with, e.g., time, then it doesn't make sense to print
-	 the microseconds field.  Is there a way to check for that?  */
-      fprintf (stderr, "%ld:%06ld ", (long) tm.tv_sec, (long) tm.tv_usec);
+      fprintf (stderr, "%ld.%06ld ", (long) s.count (), (long) us.count ());
     }
 #endif
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/debug.h ./gdb/gdbserver/debug.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/debug.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/debug.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Debugging routines for the remote server for GDB.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/dll.c ./gdb/gdbserver/dll.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/dll.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/dll.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -41,8 +41,8 @@ free_one_dll (struct inferior_list_entry
 static int
 match_dll (struct inferior_list_entry *inf, void *arg)
 {
-  struct dll_info *iter = (void *) inf;
-  struct dll_info *key = arg;
+  struct dll_info *iter = (struct dll_info *) inf;
+  struct dll_info *key = (struct dll_info *) arg;
 
   if (key->base_addr != UNSPECIFIED_CORE_ADDR
       && iter->base_addr == key->base_addr)
@@ -60,8 +60,7 @@ match_dll (struct inferior_list_entry *i
 void
 loaded_dll (const char *name, CORE_ADDR base_addr)
 {
-  struct dll_info *new_dll = xmalloc (sizeof (*new_dll));
-  memset (new_dll, 0, sizeof (*new_dll));
+  struct dll_info *new_dll = XCNEW (struct dll_info);
 
   new_dll->entry.id = minus_one_ptid;
 
@@ -84,7 +83,7 @@ unloaded_dll (const char *name, CORE_ADD
   key_dll.name = (char *) name;
   key_dll.base_addr = base_addr;
 
-  dll = (void *) find_inferior (&all_dlls, match_dll, &key_dll);
+  dll = (struct dll_info *) find_inferior (&all_dlls, match_dll, &key_dll);
 
   if (dll == NULL)
     /* For some inferiors we might get unloaded_dll events without having
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/dll.h ./gdb/gdbserver/dll.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/dll.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/dll.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/event-loop.c ./gdb/gdbserver/event-loop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/event-loop.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/event-loop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Event loop machinery for the remote server for GDB.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,7 @@
 #include "queue.h"
 
 #include <sys/types.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 #ifdef USE_WIN32API
 #include <windows.h>
@@ -130,7 +130,7 @@ struct callback_event
   {
     int id;
     callback_handler_func *proc;
-    gdb_client_data *data;
+    gdb_client_data data;
     struct callback_event *next;
   };
 
@@ -197,9 +197,8 @@ process_event (void)
 int
 append_callback_event (callback_handler_func *proc, gdb_client_data data)
 {
-  struct callback_event *event_ptr;
+  struct callback_event *event_ptr = XNEW (struct callback_event);
 
-  event_ptr = xmalloc (sizeof (*event_ptr));
   event_ptr->id = callback_list.num_callbacks++;
   event_ptr->proc = proc;
   event_ptr->data = data;
@@ -249,7 +248,7 @@ process_callback (void)
   if (event_ptr != NULL)
     {
       callback_handler_func *proc = event_ptr->proc;
-      gdb_client_data *data = event_ptr->data;
+      gdb_client_data data = event_ptr->data;
 
       /* Remove the event before calling PROC,
 	 more events may get added by PROC.  */
@@ -289,7 +288,7 @@ create_file_handler (gdb_fildes_t fd, in
      just change the data associated with it.  */
   if (file_ptr == NULL)
     {
-      file_ptr = xmalloc (sizeof (*file_ptr));
+      file_ptr = XNEW (struct file_handler);
       file_ptr->fd = fd;
       file_ptr->ready_mask = 0;
       file_ptr->next_file = gdb_notifier.first_file_handler;
@@ -412,7 +411,7 @@ handle_file_event (gdb_fildes_t event_fi
 
 	  if (file_ptr->ready_mask & GDB_EXCEPTION)
 	    {
-	      fprintf (stderr, "Exception condition detected on fd %s\n",
+	      warning ("Exception condition detected on fd %s",
 		       pfildes (file_ptr->fd));
 	      file_ptr->error = 1;
 	    }
@@ -447,9 +446,10 @@ create_file_event (gdb_fildes_t fd)
 {
   gdb_event *file_event_ptr;
 
-  file_event_ptr = xmalloc (sizeof (gdb_event));
+  file_event_ptr = XNEW (gdb_event);
   file_event_ptr->proc = handle_file_event;
   file_event_ptr->fd = fd;
+
   return file_event_ptr;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/event-loop.h ./gdb/gdbserver/event-loop.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/event-loop.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/event-loop.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Event loop machinery for the remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdb_proc_service.h ./gdb/gdbserver/gdb_proc_service.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdb_proc_service.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/gdb_proc_service.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* <proc_service.h> replacement for systems that don't have it.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -107,7 +107,7 @@ extern pid_t ps_getpid (struct ps_procha
 /* Fetch the special per-thread address associated with the given LWP.
    This call is only used on a few platforms (most use a normal register).
    The meaning of the `int' parameter is machine-dependent.  */
-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
 				    lwpid_t, int, psaddr_t *);
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdbreplay.c ./gdb/gdbserver/gdbreplay.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdbreplay.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/gdbreplay.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Replay a remote debug session logfile for GDB.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Fred Fish (fnf@cygnus.com) from pieces of gdbserver.
 
    This file is part of GDB.
@@ -407,7 +407,7 @@ static void
 gdbreplay_version (void)
 {
   printf ("GNU gdbreplay %s%s\n"
-	  "Copyright (C) 2015 Free Software Foundation, Inc.\n"
+	  "Copyright (C) 2017 Free Software Foundation, Inc.\n"
 	  "gdbreplay is free software, covered by "
 	  "the GNU General Public License.\n"
 	  "This gdbreplay was configured as \"%s\"\n",
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdbthread.h ./gdb/gdbserver/gdbthread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/gdbthread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/gdbthread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Multi-thread control defs for remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #include "inferiors.h"
 
 struct btrace_target_info;
+struct regcache;
 
 struct thread_info
 {
@@ -30,7 +31,7 @@ struct thread_info
   struct inferior_list_entry entry;
 
   void *target_data;
-  void *regcache_data;
+  struct regcache *regcache_data;
 
   /* The last resume GDB requested on this thread.  */
   enum resume_kind last_resume_kind;
@@ -79,7 +80,14 @@ struct thread_info *get_first_thread (vo
 
 struct thread_info *find_thread_ptid (ptid_t ptid);
 
+/* Find any thread of the PID process.  Returns NULL if none is
+   found.  */
+struct thread_info *find_any_thread_of_pid (int pid);
+
 /* Get current thread ID (Linux task ID).  */
 #define current_ptid (current_thread->entry.id)
 
+/* Create a cleanup to restore current_thread.  */
+struct cleanup *make_cleanup_restore_current_thread (void);
+
 #endif /* GDB_THREAD_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/.gitignore ./gdb/gdbserver/.gitignore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/.gitignore	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/.gitignore	2017-03-06 01:49:07.000000000 +0000
@@ -1,12 +1,26 @@
+/Makefile
+
 gdbreplay
 gdbserver
 libinproctrace.so
 
+build-gnulib-gdbserver
+build-libiberty-gdbserver
+
 amd64-avx-linux.c
+amd64-avx-mpx-linux.c
+amd64-avx512-linux.c
 amd64-linux.c
+amd64-mpx-linux.c
 i386-avx-linux.c
+i386-avx-mpx-linux.c
+i386-avx512-linux.c
 i386-linux.c
 i386-mmx-linux.c
+i386-mpx-linux.c
 reg-*.c
 version.c
+x32-avx-linux.c
+x32-avx512-linux.c
+x32-linux.c
 xml-builtin.c
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio.c ./gdb/gdbserver/hostio.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/hostio.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Host file transfer support for gdbserver.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -126,7 +126,7 @@ require_data (char *p, int p_len, char *
 {
   int input_index, output_index, escaped;
 
-  *data = xmalloc (p_len);
+  *data = (char *) xmalloc (p_len);
 
   output_index = 0;
   escaped = 0;
@@ -331,7 +331,7 @@ handle_open (char *own_buf)
     }
 
   /* Record the new file descriptor.  */
-  new_fd = xmalloc (sizeof (struct fd_list));
+  new_fd = XNEW (struct fd_list);
   new_fd->fd = fd;
   new_fd->next = open_fds;
   open_fds = new_fd;
@@ -344,6 +344,7 @@ handle_pread (char *own_buf, int *new_pa
 {
   int fd, ret, len, offset, bytes_sent;
   char *p, *data;
+  static int max_reply_size = -1;
 
   p = own_buf + strlen ("vFile:pread:");
 
@@ -359,7 +360,18 @@ handle_pread (char *own_buf, int *new_pa
       return;
     }
 
-  data = xmalloc (len);
+  /* Do not attempt to read more than the maximum number of bytes
+     hostio_reply_with_data can fit in a packet.  We may still read
+     too much because of escaping, but this is handled below.  */
+  if (max_reply_size == -1)
+    {
+      sprintf (own_buf, "F%x;", PBUFSIZ);
+      max_reply_size = PBUFSIZ - strlen (own_buf);
+    }
+  if (len > max_reply_size)
+    len = max_reply_size;
+
+  data = (char *) xmalloc (len);
 #ifdef HAVE_PREAD
   ret = pread (fd, data, len, offset);
 #else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio-errno.c ./gdb/gdbserver/hostio-errno.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio-errno.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/hostio-errno.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Host file transfer support for gdbserver.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio.h ./gdb/gdbserver/hostio.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/hostio.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/hostio.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Host file transfer support for gdbserver.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/i387-fp.c ./gdb/gdbserver/i387-fp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/i387-fp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/i387-fp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* i387-specific utility functions, for the remote server for GDB.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@ static const int num_avx512_zmmh_low_reg
 static const int num_avx512_zmmh_high_registers = 16;
 static const int num_avx512_ymmh_registers = 16;
 static const int num_avx512_xmm_registers = 16;
+static const int num_pkeys_registers = 1;
 
 /* Note: These functions preserve the reserved bits in control registers.
    However, gdbserver promptly throws away that information.  */
@@ -136,6 +137,10 @@ struct i387_xsave {
 
   /* Space for 16 512-bit zmm16-31 values.  */
   unsigned char zmmh_high_space[1024];
+
+  /* Space for 1 32-bit PKRU register.  The HW XSTATE size for this feature is
+     actually 64 bits, but WRPKRU/RDPKRU instructions ignore upper 32 bits.  */
+  unsigned char pkru_space[8];
 };
 
 void
@@ -273,14 +278,14 @@ i387_cache_to_xsave (struct regcache *re
   struct i387_xsave *fp = (struct i387_xsave *) buf;
   int i;
   unsigned long val, val2;
-  unsigned int clear_bv;
   unsigned long long xstate_bv = 0;
+  unsigned long long clear_bv = 0;
   char raw[64];
   char *p;
   /* Amd64 has 16 xmm regs; I386 has 8 xmm regs.  */
   int num_xmm_registers = register_size (regcache->tdesc, 0) == 8 ? 16 : 8;
 
-  /* The supported bits in `xstat_bv' are 1 byte.  Clear part in
+  /* The supported bits in `xstat_bv' are 8 bytes.  Clear part in
      vector registers if its bit in xstat_bv is zero.  */
   clear_bv = (~fp->xstate_bv) & x86_xcr0;
 
@@ -325,6 +330,10 @@ i387_cache_to_xsave (struct regcache *re
 	  for (i = 0; i < num_avx512_ymmh_registers; i++)
 	    memset (((char *) &fp->zmmh_high_space[0]) + 16 + i * 64, 0, 16);
 	}
+
+      if ((clear_bv & X86_XSTATE_PKRU))
+	for (i = 0; i < num_pkeys_registers; i++)
+	  memset (((char *) &fp->pkru_space[0]) + i * 4, 0, 4);
     }
 
   /* Check if any x87 registers are changed.  */
@@ -497,6 +506,23 @@ i387_cache_to_xsave (struct regcache *re
 	}
     }
 
+  /* Check if any PKEYS registers are changed.  */
+  if ((x86_xcr0 & X86_XSTATE_PKRU))
+    {
+      int pkru_regnum = find_regno (regcache->tdesc, "pkru");
+
+      for (i = 0; i < num_pkeys_registers; i++)
+	{
+	  collect_register (regcache, i + pkru_regnum, raw);
+	  p = ((char *) &fp->pkru_space[0]) + i * 4;
+	  if (memcmp (raw, p, 4) != 0)
+	    {
+	      xstate_bv |= X86_XSTATE_PKRU;
+	      memcpy (p, raw, 4);
+	    }
+	}
+    }
+
   /* Update the corresponding bits in xstate_bv if any SSE/AVX
      registers are changed.  */
   fp->xstate_bv |= xstate_bv;
@@ -643,12 +669,12 @@ i387_xsave_to_cache (struct regcache *re
   struct i387_fxsave *fxp = (struct i387_fxsave *) buf;
   int i, top;
   unsigned long val;
-  unsigned int clear_bv;
+  unsigned long long clear_bv;
   gdb_byte *p;
   /* Amd64 has 16 xmm regs; I386 has 8 xmm regs.  */
   int num_xmm_registers = register_size (regcache->tdesc, 0) == 8 ? 16 : 8;
 
-  /* The supported bits in `xstat_bv' are 1 byte.  Clear part in
+  /* The supported bits in `xstat_bv' are 8 bytes.  Clear part in
      vector registers if its bit in xstat_bv is zero.  */
   clear_bv = (~fp->xstate_bv) & x86_xcr0;
 
@@ -801,6 +827,23 @@ i387_xsave_to_cache (struct regcache *re
 	}
     }
 
+  if ((x86_xcr0 & X86_XSTATE_PKRU) != 0)
+    {
+      int pkru_regnum = find_regno (regcache->tdesc, "pkru");
+
+      if ((clear_bv & X86_XSTATE_PKRU) != 0)
+	{
+	  for (i = 0; i < num_pkeys_registers; i++)
+	    supply_register_zeroed (regcache, i + pkru_regnum);
+	}
+      else
+	{
+	  p = (gdb_byte *) &fp->pkru_space[0];
+	  for (i = 0; i < num_pkeys_registers; i++)
+	    supply_register (regcache, i + pkru_regnum, p + i * 4);
+	}
+    }
+
   supply_register_by_name (regcache, "fioff", &fp->fioff);
   supply_register_by_name (regcache, "fooff", &fp->fooff);
   supply_register_by_name (regcache, "mxcsr", &fp->mxcsr);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/i387-fp.h ./gdb/gdbserver/i387-fp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/i387-fp.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/i387-fp.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* i387-specific utility functions, for the remote server for GDB.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/inferiors.c ./gdb/gdbserver/inferiors.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/inferiors.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/inferiors.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Inferior process information for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -105,9 +105,7 @@ remove_inferior (struct inferior_list *l
 struct thread_info *
 add_thread (ptid_t thread_id, void *target_data)
 {
-  struct thread_info *new_thread = xmalloc (sizeof (*new_thread));
-
-  memset (new_thread, 0, sizeof (*new_thread));
+  struct thread_info *new_thread = XCNEW (struct thread_info);
 
   new_thread->entry.id = thread_id;
   new_thread->last_resume_kind = resume_continue;
@@ -143,6 +141,50 @@ find_thread_ptid (ptid_t ptid)
   return (struct thread_info *) find_inferior_id (&all_threads, ptid);
 }
 
+/* Predicate function for matching thread entry's pid to the given
+   pid value passed by address in ARGS.  */
+
+static int
+thread_pid_matches_callback (struct inferior_list_entry *entry, void *args)
+{
+  return (ptid_get_pid (entry->id) == *(pid_t *)args);
+}
+
+/* Find a thread associated with the given PROCESS, or NULL if no
+   such thread exists.  */
+
+static struct thread_info *
+find_thread_process (const struct process_info *const process)
+{
+  pid_t pid = ptid_get_pid (ptid_of (process));
+
+  return (struct thread_info *)
+    find_inferior (&all_threads, thread_pid_matches_callback, &pid);
+}
+
+/* Helper for find_any_thread_of_pid.  Returns true if a thread
+   matches a PID.  */
+
+static int
+thread_of_pid (struct inferior_list_entry *entry, void *pid_p)
+{
+  int pid = *(int *) pid_p;
+
+  return (ptid_get_pid (entry->id) == pid);
+}
+
+/* See gdbthread.h.  */
+
+struct thread_info *
+find_any_thread_of_pid (int pid)
+{
+  struct inferior_list_entry *entry;
+
+  entry = find_inferior (&all_threads, thread_of_pid, &pid);
+
+  return (struct thread_info *) entry;
+}
+
 ptid_t
 gdb_id_to_thread_id (ptid_t gdb_id)
 {
@@ -165,8 +207,11 @@ remove_thread (struct thread_info *threa
   if (thread->btrace != NULL)
     target_disable_btrace (thread->btrace);
 
+  discard_queued_stop_replies (ptid_of (thread));
   remove_inferior (&all_threads, (struct inferior_list_entry *) thread);
   free_one_thread (&thread->entry);
+  if (current_thread == thread)
+    current_thread = NULL;
 }
 
 /* Return a pointer to the first inferior in LIST, or NULL if there isn't one.
@@ -203,6 +248,51 @@ find_inferior (struct inferior_list *lis
   return NULL;
 }
 
+/* Find the random inferior_list_entry E in LIST for which FUNC (E, ARG)
+   returns non-zero.  If no entry is found then return NULL.  */
+
+struct inferior_list_entry *
+find_inferior_in_random (struct inferior_list *list,
+			 int (*func) (struct inferior_list_entry *, void *),
+			 void *arg)
+{
+  struct inferior_list_entry *inf = list->head;
+  int count = 0;
+  int random_selector;
+
+  /* First count how many interesting entries we have.  */
+  while (inf != NULL)
+    {
+      struct inferior_list_entry *next;
+
+      next = inf->next;
+      if ((*func) (inf, arg))
+	count++;
+      inf = next;
+    }
+
+  if (count == 0)
+    return NULL;
+
+  /* Now randomly pick an entry out of those.  */
+  random_selector = (int)
+    ((count * (double) rand ()) / (RAND_MAX + 1.0));
+
+  inf = list->head;
+  while (inf != NULL)
+    {
+      struct inferior_list_entry *next;
+
+      next = inf->next;
+      if ((*func) (inf, arg) && (random_selector-- == 0))
+	return inf;
+      inf = next;
+    }
+
+  gdb_assert_not_reached ("failed to find an inferior in random.");
+  return NULL;
+}
+
 struct inferior_list_entry *
 find_inferior_id (struct inferior_list *list, ptid_t id)
 {
@@ -230,14 +320,14 @@ set_inferior_target_data (struct thread_
   inferior->target_data = data;
 }
 
-void *
+struct regcache *
 inferior_regcache_data (struct thread_info *inferior)
 {
   return inferior->regcache_data;
 }
 
 void
-set_inferior_regcache_data (struct thread_info *inferior, void *data)
+set_inferior_regcache_data (struct thread_info *inferior, struct regcache *data)
 {
   inferior->regcache_data = data;
 }
@@ -273,9 +363,7 @@ clear_inferiors (void)
 struct process_info *
 add_process (int pid, int attached)
 {
-  struct process_info *process;
-
-  process = xcalloc (1, sizeof (*process));
+  struct process_info *process = XCNEW (struct process_info);
 
   process->entry.id = pid_to_ptid (pid);
   process->attached = attached;
@@ -294,7 +382,9 @@ remove_process (struct process_info *pro
 {
   clear_symbol_cache (&process->symbol_cache);
   free_all_breakpoints (process);
+  gdb_assert (find_thread_process (process) == NULL);
   remove_inferior (&all_processes, &process->entry);
+  VEC_free (int, process->syscalls_to_catch);
   free (process);
 }
 
@@ -305,6 +395,14 @@ find_process_pid (int pid)
     find_inferior_id (&all_processes, pid_to_ptid (pid));
 }
 
+/* Wrapper around get_first_inferior to return a struct process_info *.  */
+
+struct process_info *
+get_first_process (void)
+{
+  return (struct process_info *) get_first_inferior (&all_processes);
+}
+
 /* Return non-zero if INF, a struct process_info, was started by us,
    i.e. not attached to.  */
 
@@ -346,7 +444,7 @@ have_attached_inferiors_p (void)
 }
 
 struct process_info *
-get_thread_process (struct thread_info *thread)
+get_thread_process (const struct thread_info *thread)
 {
   int pid = ptid_get_pid (thread->entry.id);
   return find_process_pid (pid);
@@ -358,3 +456,15 @@ current_process (void)
   gdb_assert (current_thread != NULL);
   return get_thread_process (current_thread);
 }
+
+static void
+do_restore_current_thread_cleanup (void *arg)
+{
+  current_thread = (struct thread_info *) arg;
+}
+
+struct cleanup *
+make_cleanup_restore_current_thread (void)
+{
+  return make_cleanup (do_restore_current_thread_cleanup, current_thread);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/inferiors.h ./gdb/gdbserver/inferiors.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/inferiors.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/inferiors.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Inferior process information for the remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,8 @@
 #ifndef INFERIORS_H
 #define INFERIORS_H
 
+#include "gdb_vecs.h"
+
 /* Generic information for tracking a list of ``inferiors'' - threads,
    processes, etc.  */
 struct inferior_list
@@ -33,6 +35,7 @@ struct inferior_list_entry
 };
 
 struct thread_info;
+struct regcache;
 struct target_desc;
 struct sym_cache;
 struct breakpoint;
@@ -66,6 +69,10 @@ struct process_info
   /* The list of installed fast tracepoints.  */
   struct fast_tracepoint_jump *fast_tracepoint_jumps;
 
+  /* The list of syscalls to report, or just a single element, ANY_SYSCALL,
+     for unfiltered syscall reporting.  */
+  VEC (int) *syscalls_to_catch;
+
   const struct target_desc *tdesc;
 
   /* Private target data.  */
@@ -81,7 +88,7 @@ struct process_info
    no current thread selected.  */
 
 struct process_info *current_process (void);
-struct process_info *get_thread_process (struct thread_info *);
+struct process_info *get_thread_process (const struct thread_info *);
 
 extern struct inferior_list all_processes;
 
@@ -127,6 +134,9 @@ void remove_inferior (struct inferior_li
 
 struct inferior_list_entry *get_first_inferior (struct inferior_list *list);
 
+/* Return the first process in the processes list.  */
+struct process_info *get_first_process (void);
+
 struct process_info *add_process (int pid, int attached);
 void remove_process (struct process_info *process);
 struct process_info *find_process_pid (int pid);
@@ -144,10 +154,15 @@ struct inferior_list_entry *find_inferio
       void *arg);
 struct inferior_list_entry *find_inferior_id (struct inferior_list *list,
 					      ptid_t id);
+struct inferior_list_entry *
+  find_inferior_in_random (struct inferior_list *,
+			   int (*func) (struct inferior_list_entry *,
+					void *),
+			   void *arg);
 
 void *inferior_target_data (struct thread_info *);
 void set_inferior_target_data (struct thread_info *, void *);
-void *inferior_regcache_data (struct thread_info *);
-void set_inferior_regcache_data (struct thread_info *, void *);
+struct regcache *inferior_regcache_data (struct thread_info *);
+void set_inferior_regcache_data (struct thread_info *, struct regcache *);
 
 #endif /* INFERIORS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch32-low.c ./gdb/gdbserver/linux-aarch32-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch32-low.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-aarch32-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,305 @@
+/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "server.h"
+#include "arch/arm.h"
+#include "arch/arm-linux.h"
+#include "linux-low.h"
+#include "linux-aarch32-low.h"
+
+#include <sys/ptrace.h>
+/* Don't include elf.h if linux/elf.h got included by gdb_proc_service.h.
+   On Bionic elf.h and linux/elf.h have conflicting definitions.  */
+#ifndef ELFMAG0
+#include <elf.h>
+#endif
+
+/* Correct in either endianness.  */
+#define arm_abi_breakpoint 0xef9f0001UL
+
+/* For new EABI binaries.  We recognize it regardless of which ABI
+   is used for gdbserver, so single threaded debugging should work
+   OK, but for multi-threaded debugging we only insert the current
+   ABI's breakpoint instruction.  For now at least.  */
+#define arm_eabi_breakpoint 0xe7f001f0UL
+
+#if (defined __ARM_EABI__ || defined __aarch64__)
+static const unsigned long arm_breakpoint = arm_eabi_breakpoint;
+#else
+static const unsigned long arm_breakpoint = arm_abi_breakpoint;
+#endif
+
+#define arm_breakpoint_len 4
+static const unsigned short thumb_breakpoint = 0xde01;
+#define thumb_breakpoint_len 2
+static const unsigned short thumb2_breakpoint[] = { 0xf7f0, 0xa000 };
+#define thumb2_breakpoint_len 4
+
+/* Some older versions of GNU/Linux and Android do not define
+   the following macros.  */
+#ifndef NT_ARM_VFP
+#define NT_ARM_VFP 0x400
+#endif
+
+/* Collect GP registers from REGCACHE to buffer BUF.  */
+
+void
+arm_fill_gregset (struct regcache *regcache, void *buf)
+{
+  int i;
+  uint32_t *regs = (uint32_t *) buf;
+  uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
+
+  for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
+    collect_register (regcache, i, &regs[i]);
+
+  collect_register (regcache, ARM_PS_REGNUM, &regs[ARM_CPSR_GREGNUM]);
+  /* Keep reserved bits bit 20 to bit 23.  */
+  regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
+			    | (cpsr & 0x00f00000));
+}
+
+/* Supply GP registers contents, stored in BUF, to REGCACHE.  */
+
+void
+arm_store_gregset (struct regcache *regcache, const void *buf)
+{
+  int i;
+  char zerobuf[8];
+  const uint32_t *regs = (const uint32_t *) buf;
+  uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
+
+  memset (zerobuf, 0, 8);
+  for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
+    supply_register (regcache, i, &regs[i]);
+
+  for (; i < ARM_PS_REGNUM; i++)
+    supply_register (regcache, i, zerobuf);
+
+  /* Clear reserved bits bit 20 to bit 23.  */
+  cpsr &= 0xff0fffff;
+  supply_register (regcache, ARM_PS_REGNUM, &cpsr);
+}
+
+/* Collect NUM number of VFP registers from REGCACHE to buffer BUF.  */
+
+void
+arm_fill_vfpregset_num (struct regcache *regcache, void *buf, int num)
+{
+  int i, base;
+
+  gdb_assert (num == 16 || num == 32);
+
+  base = find_regno (regcache->tdesc, "d0");
+  for (i = 0; i < num; i++)
+    collect_register (regcache, base + i, (char *) buf + i * 8);
+
+  collect_register_by_name (regcache, "fpscr", (char *) buf + 32 * 8);
+}
+
+/* Supply NUM number of VFP registers contents, stored in BUF, to
+   REGCACHE.  */
+
+void
+arm_store_vfpregset_num (struct regcache *regcache, const void *buf, int num)
+{
+  int i, base;
+
+  gdb_assert (num == 16 || num == 32);
+
+  base = find_regno (regcache->tdesc, "d0");
+  for (i = 0; i < num; i++)
+    supply_register (regcache, base + i, (char *) buf + i * 8);
+
+  supply_register_by_name (regcache, "fpscr", (char *) buf + 32 * 8);
+}
+
+static void
+arm_fill_vfpregset (struct regcache *regcache, void *buf)
+{
+  arm_fill_vfpregset_num (regcache, buf, 32);
+}
+
+static void
+arm_store_vfpregset (struct regcache *regcache, const void *buf)
+{
+  arm_store_vfpregset_num (regcache, buf, 32);
+}
+
+/* Register sets with using PTRACE_GETREGSET.  */
+
+static struct regset_info aarch32_regsets[] = {
+  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS, 18 * 4,
+    GENERAL_REGS,
+    arm_fill_gregset, arm_store_gregset },
+  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_VFP, 32 * 8 + 4,
+    EXTENDED_REGS,
+    arm_fill_vfpregset, arm_store_vfpregset },
+  NULL_REGSET
+};
+
+static struct regsets_info aarch32_regsets_info =
+  {
+    aarch32_regsets, /* regsets */
+    0, /* num_regsets */
+    NULL, /* disabled_regsets */
+  };
+
+struct regs_info regs_info_aarch32 =
+  {
+    NULL, /* regset_bitmap */
+    NULL, /* usrregs */
+    &aarch32_regsets_info
+  };
+
+/* Returns 1 if the current instruction set is thumb, 0 otherwise.  */
+
+int
+arm_is_thumb_mode (void)
+{
+  struct regcache *regcache = get_thread_regcache (current_thread, 1);
+  unsigned long cpsr;
+
+  collect_register_by_name (regcache, "cpsr", &cpsr);
+
+  if (cpsr & 0x20)
+    return 1;
+  else
+    return 0;
+}
+
+/* Returns 1 if there is a software breakpoint at location.  */
+
+int
+arm_breakpoint_at (CORE_ADDR where)
+{
+  if (arm_is_thumb_mode ())
+    {
+      /* Thumb mode.  */
+      unsigned short insn;
+
+      (*the_target->read_memory) (where, (unsigned char *) &insn, 2);
+      if (insn == thumb_breakpoint)
+	return 1;
+
+      if (insn == thumb2_breakpoint[0])
+	{
+	  (*the_target->read_memory) (where + 2, (unsigned char *) &insn, 2);
+	  if (insn == thumb2_breakpoint[1])
+	    return 1;
+	}
+    }
+  else
+    {
+      /* ARM mode.  */
+      unsigned long insn;
+
+      (*the_target->read_memory) (where, (unsigned char *) &insn, 4);
+      if (insn == arm_abi_breakpoint)
+	return 1;
+
+      if (insn == arm_eabi_breakpoint)
+	return 1;
+    }
+
+  return 0;
+}
+
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc".
+
+   Determine the type and size of breakpoint to insert at PCPTR.  Uses the
+   program counter value to determine whether a 16-bit or 32-bit breakpoint
+   should be used.  It returns the breakpoint's kind, and adjusts the program
+   counter (if necessary) to point to the actual memory location where the
+   breakpoint should be inserted.  */
+
+int
+arm_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+  if (IS_THUMB_ADDR (*pcptr))
+    {
+      gdb_byte buf[2];
+
+      *pcptr = UNMAKE_THUMB_ADDR (*pcptr);
+
+      /* Check whether we are replacing a thumb2 32-bit instruction.  */
+      if (target_read_memory (*pcptr, buf, 2) == 0)
+	{
+	  unsigned short inst1 = 0;
+
+	  target_read_memory (*pcptr, (gdb_byte *) &inst1, 2);
+	  if (thumb_insn_size (inst1) == 4)
+	    return ARM_BP_KIND_THUMB2;
+	}
+      return ARM_BP_KIND_THUMB;
+    }
+  else
+    return ARM_BP_KIND_ARM;
+}
+
+/*  Implementation of the linux_target_ops method "sw_breakpoint_from_kind".  */
+
+const gdb_byte *
+arm_sw_breakpoint_from_kind (int kind , int *size)
+{
+  *size = arm_breakpoint_len;
+  /* Define an ARM-mode breakpoint; we only set breakpoints in the C
+     library, which is most likely to be ARM.  If the kernel supports
+     clone events, we will never insert a breakpoint, so even a Thumb
+     C library will work; so will mixing EABI/non-EABI gdbserver and
+     application.  */
+  switch (kind)
+    {
+      case ARM_BP_KIND_THUMB:
+	*size = thumb_breakpoint_len;
+	return (gdb_byte *) &thumb_breakpoint;
+      case ARM_BP_KIND_THUMB2:
+	*size = thumb2_breakpoint_len;
+	return (gdb_byte *) &thumb2_breakpoint;
+      case ARM_BP_KIND_ARM:
+	*size = arm_breakpoint_len;
+	return (const gdb_byte *) &arm_breakpoint;
+      default:
+       return NULL;
+    }
+  return NULL;
+}
+
+/* Implementation of the linux_target_ops method
+   "breakpoint_kind_from_current_state".  */
+
+int
+arm_breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
+{
+  if (arm_is_thumb_mode ())
+    {
+      *pcptr = MAKE_THUMB_ADDR (*pcptr);
+      return arm_breakpoint_kind_from_pc (pcptr);
+    }
+  else
+    {
+      return arm_breakpoint_kind_from_pc (pcptr);
+    }
+}
+
+void
+initialize_low_arch_aarch32 (void)
+{
+  init_registers_arm_with_neon ();
+
+  initialize_regsets_info (&aarch32_regsets_info);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch32-low.h ./gdb/gdbserver/linux-aarch32-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch32-low.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-aarch32-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern struct regs_info regs_info_aarch32;
+
+void arm_fill_gregset (struct regcache *regcache, void *buf);
+void arm_store_gregset (struct regcache *regcache, const void *buf);
+void arm_fill_vfpregset_num (struct regcache *regcache, void *buf, int num);
+void arm_store_vfpregset_num (struct regcache *regcache, const void *buf,
+			      int num);
+
+int arm_breakpoint_kind_from_pc (CORE_ADDR *pcptr);
+const gdb_byte *arm_sw_breakpoint_from_kind (int kind , int *size);
+int arm_breakpoint_kind_from_current_state (CORE_ADDR *pcptr);
+int arm_breakpoint_at (CORE_ADDR where);
+
+void initialize_low_arch_aarch32 (void);
+
+void init_registers_arm_with_neon (void);
+int arm_is_thumb_mode (void);
+
+extern const struct target_desc *tdesc_arm_with_neon;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch64-ipa.c ./gdb/gdbserver/linux-aarch64-ipa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch64-ipa.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-aarch64-ipa.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,211 @@
+/* GNU/Linux/AArch64 specific low level interface, for the in-process
+   agent library for GDB.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "server.h"
+#include <sys/mman.h>
+#include "tracepoint.h"
+#include <elf.h>
+#ifdef HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
+/* Defined in auto-generated file aarch64.c.  */
+void init_registers_aarch64 (void);
+extern const struct target_desc *tdesc_aarch64;
+
+/* Each register saved by the jump pad is in a 16 byte cell.  */
+#define FT_CR_SIZE 16
+
+#define FT_CR_FPCR	0
+#define FT_CR_FPSR	1
+#define FT_CR_CPSR	2
+#define FT_CR_PC	3
+#define FT_CR_SP	4
+#define FT_CR_X0	5
+#define FT_CR_GPR(n)	(FT_CR_X0 + (n))
+#define FT_CR_FPR(n)	(FT_CR_GPR (31) + (n))
+
+/* Mapping between registers collected by the jump pad and GDB's register
+   array layout used by regcache.
+
+   See linux-aarch64-low.c (aarch64_install_fast_tracepoint_jump_pad) for
+   more details.  */
+
+static const int aarch64_ft_collect_regmap[] = {
+  FT_CR_GPR (0),
+  FT_CR_GPR (1),
+  FT_CR_GPR (2),
+  FT_CR_GPR (3),
+  FT_CR_GPR (4),
+  FT_CR_GPR (5),
+  FT_CR_GPR (6),
+  FT_CR_GPR (7),
+  FT_CR_GPR (8),
+  FT_CR_GPR (9),
+  FT_CR_GPR (10),
+  FT_CR_GPR (11),
+  FT_CR_GPR (12),
+  FT_CR_GPR (13),
+  FT_CR_GPR (14),
+  FT_CR_GPR (15),
+  FT_CR_GPR (16),
+  FT_CR_GPR (17),
+  FT_CR_GPR (18),
+  FT_CR_GPR (19),
+  FT_CR_GPR (20),
+  FT_CR_GPR (21),
+  FT_CR_GPR (22),
+  FT_CR_GPR (23),
+  FT_CR_GPR (24),
+  FT_CR_GPR (25),
+  FT_CR_GPR (26),
+  FT_CR_GPR (27),
+  FT_CR_GPR (28),
+  /* FP */
+  FT_CR_GPR (29),
+  /* LR */
+  FT_CR_GPR (30),
+  FT_CR_SP,
+  FT_CR_PC,
+  FT_CR_CPSR,
+  FT_CR_FPR (0),
+  FT_CR_FPR (1),
+  FT_CR_FPR (2),
+  FT_CR_FPR (3),
+  FT_CR_FPR (4),
+  FT_CR_FPR (5),
+  FT_CR_FPR (6),
+  FT_CR_FPR (7),
+  FT_CR_FPR (8),
+  FT_CR_FPR (9),
+  FT_CR_FPR (10),
+  FT_CR_FPR (11),
+  FT_CR_FPR (12),
+  FT_CR_FPR (13),
+  FT_CR_FPR (14),
+  FT_CR_FPR (15),
+  FT_CR_FPR (16),
+  FT_CR_FPR (17),
+  FT_CR_FPR (18),
+  FT_CR_FPR (19),
+  FT_CR_FPR (20),
+  FT_CR_FPR (21),
+  FT_CR_FPR (22),
+  FT_CR_FPR (23),
+  FT_CR_FPR (24),
+  FT_CR_FPR (25),
+  FT_CR_FPR (26),
+  FT_CR_FPR (27),
+  FT_CR_FPR (28),
+  FT_CR_FPR (29),
+  FT_CR_FPR (30),
+  FT_CR_FPR (31),
+  FT_CR_FPSR,
+  FT_CR_FPCR
+};
+
+#define AARCH64_NUM_FT_COLLECT_GREGS \
+  (sizeof (aarch64_ft_collect_regmap) / sizeof(aarch64_ft_collect_regmap[0]))
+
+/* Fill in REGCACHE with registers saved by the jump pad in BUF.  */
+
+void
+supply_fast_tracepoint_registers (struct regcache *regcache,
+				  const unsigned char *buf)
+{
+  int i;
+
+  for (i = 0; i < AARCH64_NUM_FT_COLLECT_GREGS; i++)
+    supply_register (regcache, i,
+		     ((char *) buf)
+		     + (aarch64_ft_collect_regmap[i] * FT_CR_SIZE));
+}
+
+ULONGEST
+get_raw_reg (const unsigned char *raw_regs, int regnum)
+{
+  if (regnum >= AARCH64_NUM_FT_COLLECT_GREGS)
+    return 0;
+
+  return *(ULONGEST *) (raw_regs
+			+ aarch64_ft_collect_regmap[regnum] * FT_CR_SIZE);
+}
+
+/* Return target_desc to use for IPA, given the tdesc index passed by
+   gdbserver.  Index is ignored, since we have only one tdesc
+   at the moment.  */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+  return tdesc_aarch64;
+}
+
+/* Allocate buffer for the jump pads.  The branch instruction has a reach
+   of +/- 128MiB, and the executable is loaded at 0x400000 (4MiB).
+   To maximize the area of executable that can use tracepoints, try
+   allocating at 0x400000 - size initially, decreasing until we hit
+   a free area.  */
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+  uintptr_t addr;
+  uintptr_t exec_base = getauxval (AT_PHDR);
+  int pagesize;
+  void *res;
+
+  if (exec_base == 0)
+    exec_base = 0x400000;
+
+  pagesize = sysconf (_SC_PAGE_SIZE);
+  if (pagesize == -1)
+    perror_with_name ("sysconf");
+
+  addr = exec_base - size;
+
+  /* size should already be page-aligned, but this can't hurt.  */
+  addr &= ~(pagesize - 1);
+
+  /* Search for a free area.  If we hit 0, we're out of luck.  */
+  for (; addr; addr -= pagesize)
+    {
+      /* No MAP_FIXED - we don't want to zap someone's mapping.  */
+      res = mmap ((void *) addr, size,
+		  PROT_READ | PROT_WRITE | PROT_EXEC,
+		  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+      /* If we got what we wanted, return.  */
+      if ((uintptr_t) res == addr)
+	return res;
+
+      /* If we got a mapping, but at a wrong address, undo it.  */
+      if (res != MAP_FAILED)
+	munmap (res, size);
+    }
+
+  return NULL;
+}
+
+void
+initialize_low_tracepoint (void)
+{
+  init_registers_aarch64 ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch64-low.c ./gdb/gdbserver/linux-aarch64-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-aarch64-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-aarch64-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* GNU/Linux/AArch64 specific low level interface, for the remote server for
    GDB.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GDB.
@@ -21,12 +21,20 @@
 
 #include "server.h"
 #include "linux-low.h"
+#include "nat/aarch64-linux.h"
+#include "nat/aarch64-linux-hw-point.h"
+#include "arch/aarch64-insn.h"
+#include "linux-aarch32-low.h"
 #include "elf/common.h"
+#include "ax.h"
+#include "tracepoint.h"
 
 #include <signal.h>
 #include <sys/user.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/ptrace.h>
+#include <inttypes.h>
+#include <endian.h>
 #include <sys/uio.h>
 
 #include "gdb_proc_service.h"
@@ -51,131 +59,6 @@ extern const struct target_desc *tdesc_a
 
 #define AARCH64_NUM_REGS (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM + 2)
 
-static int
-aarch64_regmap [] =
-{
-  /* These offsets correspond to GET/SETREGSET */
-  /* x0...  */
-   0*8,  1*8,  2*8,  3*8,  4*8,  5*8,  6*8,  7*8,
-   8*8,  9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8,
-  16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8,
-  24*8, 25*8, 26*8, 27*8, 28*8,
-  29*8,
-  30*8,				/* x30 lr */
-  31*8,				/* x31 sp */
-  32*8,				/*     pc */
-  33*8,				/*     cpsr    4 bytes!*/
-
-  /* FP register offsets correspond to GET/SETFPREGSET */
-   0*16,  1*16,  2*16,  3*16,  4*16,  5*16,  6*16,  7*16,
-   8*16,  9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16,
-  16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16,
-  24*16, 25*16, 26*16, 27*16, 28*16, 29*16, 30*16, 31*16
-};
-
-/* Here starts the macro definitions, data structures, and code for
-   the hardware breakpoint and hardware watchpoint support.  The
-   following is the abbreviations that are used frequently in the code
-   and comment:
-
-   hw - hardware
-   bp - breakpoint
-   wp - watchpoint  */
-
-/* Maximum number of hardware breakpoint and watchpoint registers.
-   Neither of these values may exceed the width of dr_changed_t
-   measured in bits.  */
-
-#define AARCH64_HBP_MAX_NUM 16
-#define AARCH64_HWP_MAX_NUM 16
-
-/* Alignment requirement in bytes of hardware breakpoint and
-   watchpoint address.  This is the requirement for the addresses that
-   can be written to the hardware breakpoint/watchpoint value
-   registers.  The kernel currently does not do any alignment on
-   addresses when receiving a writing request (via ptrace call) to
-   these debug registers, and it will reject any address that is
-   unaligned.
-   Some limited support has been provided in this gdbserver port for
-   unaligned watchpoints, so that from a gdb user point of view, an
-   unaligned watchpoint can still be set.  This is achieved by
-   minimally enlarging the watched area to meet the alignment
-   requirement, and if necessary, splitting the watchpoint over
-   several hardware watchpoint registers.  */
-
-#define AARCH64_HBP_ALIGNMENT 4
-#define AARCH64_HWP_ALIGNMENT 8
-
-/* The maximum length of a memory region that can be watched by one
-   hardware watchpoint register.  */
-
-#define AARCH64_HWP_MAX_LEN_PER_REG 8
-
-/* Each bit of a variable of this type is used to indicate whether a
-   hardware breakpoint or watchpoint setting has been changed since
-   the last updating.  Bit N corresponds to the Nth hardware
-   breakpoint or watchpoint setting which is managed in
-   aarch64_debug_reg_state.  Where N is valid between 0 and the total
-   number of the hardware breakpoint or watchpoint debug registers
-   minus 1.  When the bit N is 1, it indicates the corresponding
-   breakpoint or watchpoint setting is changed, and thus the
-   corresponding hardware debug register needs to be updated via the
-   ptrace interface.
-
-   In the per-thread arch-specific data area, we define two such
-   variables for per-thread hardware breakpoint and watchpoint
-   settings respectively.
-
-   This type is part of the mechanism which helps reduce the number of
-   ptrace calls to the kernel, i.e. avoid asking the kernel to write
-   to the debug registers with unchanged values.  */
-
-typedef unsigned long long dr_changed_t;
-
-/* Set each of the lower M bits of X to 1; assert X is wide enough.  */
-
-#define DR_MARK_ALL_CHANGED(x, m)					\
-  do									\
-    {									\
-      gdb_assert (sizeof ((x)) * 8 >= (m));				\
-      (x) = (((dr_changed_t)1 << (m)) - 1);				\
-    } while (0)
-
-#define DR_MARK_N_CHANGED(x, n)						\
-  do									\
-    {									\
-      (x) |= ((dr_changed_t)1 << (n));					\
-    } while (0)
-
-#define DR_CLEAR_CHANGED(x)						\
-  do									\
-    {									\
-      (x) = 0;								\
-    } while (0)
-
-#define DR_HAS_CHANGED(x) ((x) != 0)
-#define DR_N_HAS_CHANGED(x, n) ((x) & ((dr_changed_t)1 << (n)))
-
-/* Structure for managing the hardware breakpoint/watchpoint resources.
-   DR_ADDR_* stores the address, DR_CTRL_* stores the control register
-   content, and DR_REF_COUNT_* counts the numbers of references to the
-   corresponding bp/wp, by which way the limited hardware resources
-   are not wasted on duplicated bp/wp settings (though so far gdb has
-   done a good job by not sending duplicated bp/wp requests).  */
-
-struct aarch64_debug_reg_state
-{
-  /* hardware breakpoint */
-  CORE_ADDR dr_addr_bp[AARCH64_HBP_MAX_NUM];
-  unsigned int dr_ctrl_bp[AARCH64_HBP_MAX_NUM];
-  unsigned int dr_ref_count_bp[AARCH64_HBP_MAX_NUM];
-
-  /* hardware watchpoint */
-  CORE_ADDR dr_addr_wp[AARCH64_HWP_MAX_NUM];
-  unsigned int dr_ctrl_wp[AARCH64_HWP_MAX_NUM];
-  unsigned int dr_ref_count_wp[AARCH64_HWP_MAX_NUM];
-};
-
 /* Per-process arch-specific data we want to keep.  */
 
 struct arch_process_info
@@ -193,23 +76,17 @@ struct arch_process_info
   struct aarch64_debug_reg_state debug_reg_state;
 };
 
-/* Per-thread arch-specific data we want to keep.  */
+/* Return true if the size of register 0 is 8 byte.  */
 
-struct arch_lwp_info
+static int
+is_64bit_tdesc (void)
 {
-  /* When bit N is 1, it indicates the Nth hardware breakpoint or
-     watchpoint register pair needs to be updated when the thread is
-     resumed; see aarch64_linux_prepare_to_resume.  */
-  dr_changed_t dr_changed_bp;
-  dr_changed_t dr_changed_wp;
-};
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
 
-/* Number of hardware breakpoints/watchpoints the target supports.
-   They are initialized with values obtained via the ptrace calls
-   with NT_ARM_HW_BREAK and NT_ARM_HW_WATCH respectively.  */
+  return register_size (regcache->tdesc, 0) == 8;
+}
 
-static int aarch64_num_bp_regs;
-static int aarch64_num_wp_regs;
+/* Implementation of linux_target_ops method "cannot_store_register".  */
 
 static int
 aarch64_cannot_store_register (int regno)
@@ -217,6 +94,8 @@ aarch64_cannot_store_register (int regno
   return regno >= AARCH64_NUM_REGS;
 }
 
+/* Implementation of linux_target_ops method "cannot_fetch_register".  */
+
 static int
 aarch64_cannot_fetch_register (int regno)
 {
@@ -226,7 +105,7 @@ aarch64_cannot_fetch_register (int regno
 static void
 aarch64_fill_gregset (struct regcache *regcache, void *buf)
 {
-  struct user_pt_regs *regset = buf;
+  struct user_pt_regs *regset = (struct user_pt_regs *) buf;
   int i;
 
   for (i = 0; i < AARCH64_X_REGS_NUM; i++)
@@ -239,7 +118,7 @@ aarch64_fill_gregset (struct regcache *r
 static void
 aarch64_store_gregset (struct regcache *regcache, const void *buf)
 {
-  const struct user_pt_regs *regset = buf;
+  const struct user_pt_regs *regset = (const struct user_pt_regs *) buf;
   int i;
 
   for (i = 0; i < AARCH64_X_REGS_NUM; i++)
@@ -252,7 +131,7 @@ aarch64_store_gregset (struct regcache *
 static void
 aarch64_fill_fpregset (struct regcache *regcache, void *buf)
 {
-  struct user_fpsimd_state *regset = buf;
+  struct user_fpsimd_state *regset = (struct user_fpsimd_state *) buf;
   int i;
 
   for (i = 0; i < AARCH64_V_REGS_NUM; i++)
@@ -264,7 +143,8 @@ aarch64_fill_fpregset (struct regcache *
 static void
 aarch64_store_fpregset (struct regcache *regcache, const void *buf)
 {
-  const struct user_fpsimd_state *regset = buf;
+  const struct user_fpsimd_state *regset
+    = (const struct user_fpsimd_state *) buf;
   int i;
 
   for (i = 0; i < AARCH64_V_REGS_NUM; i++)
@@ -277,22 +157,26 @@ aarch64_store_fpregset (struct regcache 
    was originally used to debug LinuxThreads support.  */
 extern int debug_threads;
 
+/* Implementation of linux_target_ops method "get_pc".  */
+
 static CORE_ADDR
 aarch64_get_pc (struct regcache *regcache)
 {
-  unsigned long pc;
-
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
+  if (register_size (regcache->tdesc, 0) == 8)
+    return linux_get_pc_64bit (regcache);
+  else
+    return linux_get_pc_32bit (regcache);
 }
 
+/* Implementation of linux_target_ops method "set_pc".  */
+
 static void
 aarch64_set_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  if (register_size (regcache->tdesc, 0) == 8)
+    linux_set_pc_64bit (regcache, pc);
+  else
+    linux_set_pc_32bit (regcache, pc);
 }
 
 #define aarch64_breakpoint_len 4
@@ -302,51 +186,24 @@ aarch64_set_pc (struct regcache *regcach
    (aarch64_default_breakpoint).  */
 static const gdb_byte aarch64_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
 
+/* Implementation of linux_target_ops method "breakpoint_at".  */
+
 static int
 aarch64_breakpoint_at (CORE_ADDR where)
 {
-  gdb_byte insn[aarch64_breakpoint_len];
-
-  (*the_target->read_memory) (where, (unsigned char *) &insn,
-			      aarch64_breakpoint_len);
-  if (memcmp (insn, aarch64_breakpoint, aarch64_breakpoint_len) == 0)
-    return 1;
-
-  return 0;
-}
-
-/* Print the values of the cached breakpoint/watchpoint registers.
-   This is enabled via the "set debug-hw-points" monitor command.  */
+  if (is_64bit_tdesc ())
+    {
+      gdb_byte insn[aarch64_breakpoint_len];
 
-static void
-aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
-			      const char *func, CORE_ADDR addr,
-			      int len, enum target_hw_bp_type type)
-{
-  int i;
+      (*the_target->read_memory) (where, (unsigned char *) &insn,
+				  aarch64_breakpoint_len);
+      if (memcmp (insn, aarch64_breakpoint, aarch64_breakpoint_len) == 0)
+	return 1;
 
-  fprintf (stderr, "%s", func);
-  if (addr || len)
-    fprintf (stderr, " (addr=0x%08lx, len=%d, type=%s)",
-	     (unsigned long) addr, len,
-	     type == hw_write ? "hw-write-watchpoint"
-	     : (type == hw_read ? "hw-read-watchpoint"
-		: (type == hw_access ? "hw-access-watchpoint"
-		   : (type == hw_execute ? "hw-breakpoint"
-		      : "??unknown??"))));
-  fprintf (stderr, ":\n");
-
-  fprintf (stderr, "\tBREAKPOINTs:\n");
-  for (i = 0; i < aarch64_num_bp_regs; i++)
-    fprintf (stderr, "\tBP%d: addr=0x%s, ctrl=0x%08x, ref.count=%d\n",
-	     i, paddress (state->dr_addr_bp[i]),
-	     state->dr_ctrl_bp[i], state->dr_ref_count_bp[i]);
-
-  fprintf (stderr, "\tWATCHPOINTs:\n");
-  for (i = 0; i < aarch64_num_wp_regs; i++)
-    fprintf (stderr, "\tWP%d: addr=0x%s, ctrl=0x%08x, ref.count=%d\n",
-	     i, paddress (state->dr_addr_wp[i]),
-	     state->dr_ctrl_wp[i], state->dr_ref_count_wp[i]);
+      return 0;
+    }
+  else
+    return arm_breakpoint_at (where);
 }
 
 static void
@@ -369,583 +226,18 @@ aarch64_init_debug_reg_state (struct aar
     }
 }
 
-/* ptrace expects control registers to be formatted as follows:
-
-   31                             13          5      3      1     0
-   +--------------------------------+----------+------+------+----+
-   |         RESERVED (SBZ)         |  LENGTH  | TYPE | PRIV | EN |
-   +--------------------------------+----------+------+------+----+
-
-   The TYPE field is ignored for breakpoints.  */
-
-#define DR_CONTROL_ENABLED(ctrl)	(((ctrl) & 0x1) == 1)
-#define DR_CONTROL_LENGTH(ctrl)		(((ctrl) >> 5) & 0xff)
-
-/* Utility function that returns the length in bytes of a watchpoint
-   according to the content of a hardware debug control register CTRL.
-   Note that the kernel currently only supports the following Byte
-   Address Select (BAS) values: 0x1, 0x3, 0xf and 0xff, which means
-   that for a hardware watchpoint, its valid length can only be 1
-   byte, 2 bytes, 4 bytes or 8 bytes.  */
-
-static inline unsigned int
-aarch64_watchpoint_length (unsigned int ctrl)
-{
-  switch (DR_CONTROL_LENGTH (ctrl))
-    {
-    case 0x01:
-      return 1;
-    case 0x03:
-      return 2;
-    case 0x0f:
-      return 4;
-    case 0xff:
-      return 8;
-    default:
-      return 0;
-    }
-}
-
-/* Given the hardware breakpoint or watchpoint type TYPE and its
-   length LEN, return the expected encoding for a hardware
-   breakpoint/watchpoint control register.  */
-
-static unsigned int
-aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len)
-{
-  unsigned int ctrl, ttype;
-
-  /* type */
-  switch (type)
-    {
-    case hw_write:
-      ttype = 2;
-      break;
-    case hw_read:
-      ttype = 1;
-      break;
-    case hw_access:
-      ttype = 3;
-      break;
-    case hw_execute:
-      ttype = 0;
-      break;
-    default:
-      perror_with_name (_("Unrecognized breakpoint/watchpoint type"));
-    }
-
-  /* type */
-  ctrl = ttype << 3;
-  /* length bitmask */
-  ctrl |= ((1 << len) - 1) << 5;
-  /* enabled at el0 */
-  ctrl |= (2 << 1) | 1;
-
-  return ctrl;
-}
-
-/* Addresses to be written to the hardware breakpoint and watchpoint
-   value registers need to be aligned; the alignment is 4-byte and
-   8-type respectively.  Linux kernel rejects any non-aligned address
-   it receives from the related ptrace call.  Furthermore, the kernel
-   currently only supports the following Byte Address Select (BAS)
-   values: 0x1, 0x3, 0xf and 0xff, which means that for a hardware
-   watchpoint to be accepted by the kernel (via ptrace call), its
-   valid length can only be 1 byte, 2 bytes, 4 bytes or 8 bytes.
-   Despite these limitations, the unaligned watchpoint is supported in
-   this gdbserver port.
-
-   Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise.  */
-
-static int
-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
-{
-  unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT
-    : AARCH64_HBP_ALIGNMENT;
-
-  if (addr & (alignment - 1))
-    return 0;
-
-  if (len != 8 && len != 4 && len != 2 && len != 1)
-    return 0;
-
-  return 1;
-}
-
-/* Given the (potentially unaligned) watchpoint address in ADDR and
-   length in LEN, return the aligned address and aligned length in
-   *ALIGNED_ADDR_P and *ALIGNED_LEN_P, respectively.  The returned
-   aligned address and length will be valid to be written to the
-   hardware watchpoint value and control registers.  See the comment
-   above aarch64_point_is_aligned for the information about the
-   alignment requirement.  The given watchpoint may get truncated if
-   more than one hardware register is needed to cover the watched
-   region.  *NEXT_ADDR_P and *NEXT_LEN_P, if non-NULL, will return the
-   address and length of the remaining part of the watchpoint (which
-   can be processed by calling this routine again to generate another
-   aligned address and length pair.
-
-   Essentially, unaligned watchpoint is achieved by minimally
-   enlarging the watched area to meet the alignment requirement, and
-   if necessary, splitting the watchpoint over several hardware
-   watchpoint registers.  The trade-off is that there will be
-   false-positive hits for the read-type or the access-type hardware
-   watchpoints; for the write type, which is more commonly used, there
-   will be no such issues, as the higher-level breakpoint management
-   in gdb always examines the exact watched region for any content
-   change, and transparently resumes a thread from a watchpoint trap
-   if there is no change to the watched region.
-
-   Another limitation is that because the watched region is enlarged,
-   the watchpoint fault address returned by
-   aarch64_stopped_data_address may be outside of the original watched
-   region, especially when the triggering instruction is accessing a
-   larger region.  When the fault address is not within any known
-   range, watchpoints_triggered in gdb will get confused, as the
-   higher-level watchpoint management is only aware of original
-   watched regions, and will think that some unknown watchpoint has
-   been triggered.  In such a case, gdb may stop without displaying
-   any detailed information.
-
-   Once the kernel provides the full support for Byte Address Select
-   (BAS) in the hardware watchpoint control register, these
-   limitations can be largely relaxed with some further work.  */
-
-static void
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
-			  int *aligned_len_p, CORE_ADDR *next_addr_p,
-			  int *next_len_p)
-{
-  int aligned_len;
-  unsigned int offset;
-  CORE_ADDR aligned_addr;
-  const unsigned int alignment = AARCH64_HWP_ALIGNMENT;
-  const unsigned int max_wp_len = AARCH64_HWP_MAX_LEN_PER_REG;
-
-  /* As assumed by the algorithm.  */
-  gdb_assert (alignment == max_wp_len);
-
-  if (len <= 0)
-    return;
-
-  /* Address to be put into the hardware watchpoint value register
-     must be aligned.  */
-  offset = addr & (alignment - 1);
-  aligned_addr = addr - offset;
-
-  gdb_assert (offset >= 0 && offset < alignment);
-  gdb_assert (aligned_addr >= 0 && aligned_addr <= addr);
-  gdb_assert ((offset + len) > 0);
-
-  if (offset + len >= max_wp_len)
-    {
-      /* Need more than one watchpoint registers; truncate it at the
-	 alignment boundary.  */
-      aligned_len = max_wp_len;
-      len -= (max_wp_len - offset);
-      addr += (max_wp_len - offset);
-      gdb_assert ((addr & (alignment - 1)) == 0);
-    }
-  else
-    {
-      /* Find the smallest valid length that is large enough to
-	 accommodate this watchpoint.  */
-      static const unsigned char
-	aligned_len_array[AARCH64_HWP_MAX_LEN_PER_REG] =
-	{ 1, 2, 4, 4, 8, 8, 8, 8 };
-
-      aligned_len = aligned_len_array[offset + len - 1];
-      addr += len;
-      len = 0;
-    }
-
-  if (aligned_addr_p != NULL)
-    *aligned_addr_p = aligned_addr;
-  if (aligned_len_p != NULL)
-    *aligned_len_p = aligned_len;
-  if (next_addr_p != NULL)
-    *next_addr_p = addr;
-  if (next_len_p != NULL)
-    *next_len_p = len;
-}
-
-/* Call ptrace to set the thread TID's hardware breakpoint/watchpoint
-   registers with data from *STATE.  */
-
-static void
-aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
-			      int tid, int watchpoint)
-{
-  int i, count;
-  struct iovec iov;
-  struct user_hwdebug_state regs;
-  const CORE_ADDR *addr;
-  const unsigned int *ctrl;
-
-  memset (&regs, 0, sizeof (regs));
-  iov.iov_base = &regs;
-  count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;
-  addr = watchpoint ? state->dr_addr_wp : state->dr_addr_bp;
-  ctrl = watchpoint ? state->dr_ctrl_wp : state->dr_ctrl_bp;
-  if (count == 0)
-    return;
-  iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs[count - 1])
-		 + sizeof (regs.dbg_regs [count - 1]));
-
-  for (i = 0; i < count; i++)
-    {
-      regs.dbg_regs[i].addr = addr[i];
-      regs.dbg_regs[i].ctrl = ctrl[i];
-    }
-
-  if (ptrace (PTRACE_SETREGSET, tid,
-	      watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK,
-	      (void *) &iov))
-    error (_("Unexpected error setting hardware debug registers"));
-}
-
-struct aarch64_dr_update_callback_param
-{
-  int pid;
-  int is_watchpoint;
-  unsigned int idx;
-};
-
-/* Callback function which records the information about the change of
-   one hardware breakpoint/watchpoint setting for the thread ENTRY.
-   The information is passed in via PTR.
-   N.B.  The actual updating of hardware debug registers is not
-   carried out until the moment the thread is resumed.  */
-
-static int
-debug_reg_change_callback (struct inferior_list_entry *entry, void *ptr)
-{
-  struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lwp = get_thread_lwp (thread);
-  struct aarch64_dr_update_callback_param *param_p
-    = (struct aarch64_dr_update_callback_param *) ptr;
-  int pid = param_p->pid;
-  int idx = param_p->idx;
-  int is_watchpoint = param_p->is_watchpoint;
-  struct arch_lwp_info *info = lwp->arch_private;
-  dr_changed_t *dr_changed_ptr;
-  dr_changed_t dr_changed;
-
-  if (show_debug_regs)
-    {
-      fprintf (stderr, "debug_reg_change_callback: \n\tOn entry:\n");
-      fprintf (stderr, "\tpid%d, tid: %ld, dr_changed_bp=0x%llx, "
-	       "dr_changed_wp=0x%llx\n",
-	       pid, lwpid_of (thread), info->dr_changed_bp,
-	       info->dr_changed_wp);
-    }
-
-  dr_changed_ptr = is_watchpoint ? &info->dr_changed_wp
-    : &info->dr_changed_bp;
-  dr_changed = *dr_changed_ptr;
-
-  /* Only update the threads of this process.  */
-  if (pid_of (thread) == pid)
-    {
-      gdb_assert (idx >= 0
-		  && (idx <= (is_watchpoint ? aarch64_num_wp_regs
-			      : aarch64_num_bp_regs)));
-
-      /* The following assertion is not right, as there can be changes
-	 that have not been made to the hardware debug registers
-	 before new changes overwrite the old ones.  This can happen,
-	 for instance, when the breakpoint/watchpoint hit one of the
-	 threads and the user enters continue; then what happens is:
-	 1) all breakpoints/watchpoints are removed for all threads;
-	 2) a single step is carried out for the thread that was hit;
-	 3) all of the points are inserted again for all threads;
-	 4) all threads are resumed.
-	 The 2nd step will only affect the one thread in which the
-	 bp/wp was hit, which means only that one thread is resumed;
-	 remember that the actual updating only happen in
-	 aarch64_linux_prepare_to_resume, so other threads remain
-	 stopped during the removal and insertion of bp/wp.  Therefore
-	 for those threads, the change of insertion of the bp/wp
-	 overwrites that of the earlier removals.  (The situation may
-	 be different when bp/wp is steppable, or in the non-stop
-	 mode.)  */
-      /* gdb_assert (DR_N_HAS_CHANGED (dr_changed, idx) == 0);  */
-
-      /* The actual update is done later just before resuming the lwp,
-         we just mark that one register pair needs updating.  */
-      DR_MARK_N_CHANGED (dr_changed, idx);
-      *dr_changed_ptr = dr_changed;
-
-      /* If the lwp isn't stopped, force it to momentarily pause, so
-         we can update its debug registers.  */
-      if (!lwp->stopped)
-	linux_stop_lwp (lwp);
-    }
-
-  if (show_debug_regs)
-    {
-      fprintf (stderr, "\tOn exit:\n\tpid%d, tid: %ld, dr_changed_bp=0x%llx, "
-	       "dr_changed_wp=0x%llx\n",
-	       pid, lwpid_of (thread), info->dr_changed_bp,
-	       info->dr_changed_wp);
-    }
-
-  return 0;
-}
-
-/* Notify each thread that their IDXth breakpoint/watchpoint register
-   pair needs to be updated.  The message will be recorded in each
-   thread's arch-specific data area, the actual updating will be done
-   when the thread is resumed.  */
-
-void
-aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state,
-				 int is_watchpoint, unsigned int idx)
-{
-  struct aarch64_dr_update_callback_param param;
-
-  /* Only update the threads of this process.  */
-  param.pid = pid_of (current_thread);
-
-  param.is_watchpoint = is_watchpoint;
-  param.idx = idx;
-
-  find_inferior (&all_threads, debug_reg_change_callback, (void *) &param);
-}
-
-
 /* Return the pointer to the debug register state structure in the
    current process' arch-specific data area.  */
 
-static struct aarch64_debug_reg_state *
-aarch64_get_debug_reg_state ()
+struct aarch64_debug_reg_state *
+aarch64_get_debug_reg_state (pid_t pid)
 {
-  struct process_info *proc;
+  struct process_info *proc = find_process_pid (pid);
 
-  proc = current_process ();
   return &proc->priv->arch_private->debug_reg_state;
 }
 
-/* Record the insertion of one breakpoint/watchpoint, as represented
-   by ADDR and CTRL, in the process' arch-specific data area *STATE.  */
-
-static int
-aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state,
-				   enum target_hw_bp_type type,
-				   CORE_ADDR addr, int len)
-{
-  int i, idx, num_regs, is_watchpoint;
-  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
-  CORE_ADDR *dr_addr_p;
-
-  /* Set up state pointers.  */
-  is_watchpoint = (type != hw_execute);
-  gdb_assert (aarch64_point_is_aligned (is_watchpoint, addr, len));
-  if (is_watchpoint)
-    {
-      num_regs = aarch64_num_wp_regs;
-      dr_addr_p = state->dr_addr_wp;
-      dr_ctrl_p = state->dr_ctrl_wp;
-      dr_ref_count = state->dr_ref_count_wp;
-    }
-  else
-    {
-      num_regs = aarch64_num_bp_regs;
-      dr_addr_p = state->dr_addr_bp;
-      dr_ctrl_p = state->dr_ctrl_bp;
-      dr_ref_count = state->dr_ref_count_bp;
-    }
-
-  ctrl = aarch64_point_encode_ctrl_reg (type, len);
-
-  /* Find an existing or free register in our cache.  */
-  idx = -1;
-  for (i = 0; i < num_regs; ++i)
-    {
-      if ((dr_ctrl_p[i] & 1) == 0)
-	{
-	  gdb_assert (dr_ref_count[i] == 0);
-	  idx = i;
-	  /* no break; continue hunting for an exising one.  */
-	}
-      else if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
-	{
-	  gdb_assert (dr_ref_count[i] != 0);
-	  idx = i;
-	  break;
-	}
-    }
-
-  /* No space.  */
-  if (idx == -1)
-    return -1;
-
-  /* Update our cache.  */
-  if ((dr_ctrl_p[idx] & 1) == 0)
-    {
-      /* new entry */
-      dr_addr_p[idx] = addr;
-      dr_ctrl_p[idx] = ctrl;
-      dr_ref_count[idx] = 1;
-      /* Notify the change.  */
-      aarch64_notify_debug_reg_change (state, is_watchpoint, idx);
-    }
-  else
-    {
-      /* existing entry */
-      dr_ref_count[idx]++;
-    }
-
-  return 0;
-}
-
-/* Record the removal of one breakpoint/watchpoint, as represented by
-   ADDR and CTRL, in the process' arch-specific data area *STATE.  */
-
-static int
-aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state,
-				   enum target_hw_bp_type type,
-				   CORE_ADDR addr, int len)
-{
-  int i, num_regs, is_watchpoint;
-  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
-  CORE_ADDR *dr_addr_p;
-
-  /* Set up state pointers.  */
-  is_watchpoint = (type != hw_execute);
-  gdb_assert (aarch64_point_is_aligned (is_watchpoint, addr, len));
-  if (is_watchpoint)
-    {
-      num_regs = aarch64_num_wp_regs;
-      dr_addr_p = state->dr_addr_wp;
-      dr_ctrl_p = state->dr_ctrl_wp;
-      dr_ref_count = state->dr_ref_count_wp;
-    }
-  else
-    {
-      num_regs = aarch64_num_bp_regs;
-      dr_addr_p = state->dr_addr_bp;
-      dr_ctrl_p = state->dr_ctrl_bp;
-      dr_ref_count = state->dr_ref_count_bp;
-    }
-
-  ctrl = aarch64_point_encode_ctrl_reg (type, len);
-
-  /* Find the entry that matches the ADDR and CTRL.  */
-  for (i = 0; i < num_regs; ++i)
-    if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
-      {
-	gdb_assert (dr_ref_count[i] != 0);
-	break;
-      }
-
-  /* Not found.  */
-  if (i == num_regs)
-    return -1;
-
-  /* Clear our cache.  */
-  if (--dr_ref_count[i] == 0)
-    {
-      /* Clear the enable bit.  */
-      ctrl &= ~1;
-      dr_addr_p[i] = 0;
-      dr_ctrl_p[i] = ctrl;
-      /* Notify the change.  */
-      aarch64_notify_debug_reg_change (state, is_watchpoint, i);
-    }
-
-  return 0;
-}
-
-static int
-aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
-			   int len, int is_insert)
-{
-  struct aarch64_debug_reg_state *state;
-
-  /* The hardware breakpoint on AArch64 should always be 4-byte
-     aligned.  */
-  if (!aarch64_point_is_aligned (0 /* is_watchpoint */ , addr, len))
-    return -1;
-
-  state = aarch64_get_debug_reg_state ();
-
-  if (is_insert)
-    return aarch64_dr_state_insert_one_point (state, type, addr, len);
-  else
-    return aarch64_dr_state_remove_one_point (state, type, addr, len);
-}
-
-/* This is essentially the same as aarch64_handle_breakpoint, apart
-   from that it is an aligned watchpoint to be handled.  */
-
-static int
-aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type,
-				   CORE_ADDR addr, int len, int is_insert)
-{
-  struct aarch64_debug_reg_state *state;
-
-  state = aarch64_get_debug_reg_state ();
-
-  if (is_insert)
-    return aarch64_dr_state_insert_one_point (state, type, addr, len);
-  else
-    return aarch64_dr_state_remove_one_point (state, type, addr, len);
-}
-
-/* Insert/remove unaligned watchpoint by calling
-   aarch64_align_watchpoint repeatedly until the whole watched region,
-   as represented by ADDR and LEN, has been properly aligned and ready
-   to be written to one or more hardware watchpoint registers.
-   IS_INSERT indicates whether this is an insertion or a deletion.
-   Return 0 if succeed.  */
-
-static int
-aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
-				     CORE_ADDR addr, int len, int is_insert)
-{
-  struct aarch64_debug_reg_state *state
-    = aarch64_get_debug_reg_state ();
-
-  while (len > 0)
-    {
-      CORE_ADDR aligned_addr;
-      int aligned_len, ret;
-
-      aarch64_align_watchpoint (addr, len, &aligned_addr, &aligned_len,
-				&addr, &len);
-
-      if (is_insert)
-	ret = aarch64_dr_state_insert_one_point (state, type, aligned_addr,
-						 aligned_len);
-      else
-	ret = aarch64_dr_state_remove_one_point (state, type, aligned_addr,
-						 aligned_len);
-
-      if (show_debug_regs)
-	fprintf (stderr,
- "handle_unaligned_watchpoint: is_insert: %d\n"
- "                             aligned_addr: 0x%s, aligned_len: %d\n"
- "                                next_addr: 0x%s,    next_len: %d\n",
-		 is_insert, paddress (aligned_addr), aligned_len,
-		 paddress (addr), len);
-
-      if (ret != 0)
-	return ret;
-    }
-
-  return 0;
-}
-
-static int
-aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
-			   int len, int is_insert)
-{
-  if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
-    return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert);
-  else
-    return aarch64_handle_unaligned_watchpoint (type, addr, len, is_insert);
-}
+/* Implementation of linux_target_ops method "supports_z_point_type".  */
 
 static int
 aarch64_supports_z_point_type (char z_type)
@@ -963,13 +255,10 @@ aarch64_supports_z_point_type (char z_ty
     }
 }
 
-/* Insert a hardware breakpoint/watchpoint.
-   It actually only records the info of the to-be-inserted bp/wp;
-   the actual insertion will happen when threads are resumed.
+/* Implementation of linux_target_ops method "insert_point".
 
-   Return 0 if succeed;
-   Return 1 if TYPE is unsupported type;
-   Return -1 if an error occurs.  */
+   It actually only records the info of the to-be-inserted bp/wp;
+   the actual insertion will happen when threads are resumed.  */
 
 static int
 aarch64_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
@@ -977,6 +266,8 @@ aarch64_insert_point (enum raw_bkpt_type
 {
   int ret;
   enum target_hw_bp_type targ_type;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (pid_of (current_thread));
 
   if (show_debug_regs)
     fprintf (stderr, "insert_point on entry (addr=0x%08lx, len=%d)\n",
@@ -986,26 +277,37 @@ aarch64_insert_point (enum raw_bkpt_type
   targ_type = raw_bkpt_type_to_target_hw_bp_type (type);
 
   if (targ_type != hw_execute)
-    ret =
-      aarch64_handle_watchpoint (targ_type, addr, len, 1 /* is_insert */);
+    {
+      if (aarch64_linux_region_ok_for_watchpoint (addr, len))
+	ret = aarch64_handle_watchpoint (targ_type, addr, len,
+					 1 /* is_insert */, state);
+      else
+	ret = -1;
+    }
   else
-    ret =
-      aarch64_handle_breakpoint (targ_type, addr, len, 1 /* is_insert */);
+    {
+      if (len == 3)
+	{
+	  /* LEN is 3 means the breakpoint is set on a 32-bit thumb
+	     instruction.   Set it to 2 to correctly encode length bit
+	     mask in hardware/watchpoint control register.  */
+	  len = 2;
+	}
+      ret = aarch64_handle_breakpoint (targ_type, addr, len,
+				       1 /* is_insert */, state);
+    }
 
   if (show_debug_regs)
-    aarch64_show_debug_reg_state (aarch64_get_debug_reg_state (),
-				  "insert_point", addr, len, targ_type);
+    aarch64_show_debug_reg_state (state, "insert_point", addr, len,
+				  targ_type);
 
   return ret;
 }
 
-/* Remove a hardware breakpoint/watchpoint.
-   It actually only records the info of the to-be-removed bp/wp,
-   the actual removal will be done when threads are resumed.
+/* Implementation of linux_target_ops method "remove_point".
 
-   Return 0 if succeed;
-   Return 1 if TYPE is an unsupported type;
-   Return -1 if an error occurs.  */
+   It actually only records the info of the to-be-removed bp/wp,
+   the actual removal will be done when threads are resumed.  */
 
 static int
 aarch64_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
@@ -1013,6 +315,8 @@ aarch64_remove_point (enum raw_bkpt_type
 {
   int ret;
   enum target_hw_bp_type targ_type;
+  struct aarch64_debug_reg_state *state
+    = aarch64_get_debug_reg_state (pid_of (current_thread));
 
   if (show_debug_regs)
     fprintf (stderr, "remove_point on entry (addr=0x%08lx, len=%d)\n",
@@ -1024,20 +328,29 @@ aarch64_remove_point (enum raw_bkpt_type
   /* Set up state pointers.  */
   if (targ_type != hw_execute)
     ret =
-      aarch64_handle_watchpoint (targ_type, addr, len, 0 /* is_insert */);
+      aarch64_handle_watchpoint (targ_type, addr, len, 0 /* is_insert */,
+				 state);
   else
-    ret =
-      aarch64_handle_breakpoint (targ_type, addr, len, 0 /* is_insert */);
+    {
+      if (len == 3)
+	{
+	  /* LEN is 3 means the breakpoint is set on a 32-bit thumb
+	     instruction.   Set it to 2 to correctly encode length bit
+	     mask in hardware/watchpoint control register.  */
+	  len = 2;
+	}
+      ret = aarch64_handle_breakpoint (targ_type, addr, len,
+				       0 /* is_insert */,  state);
+    }
 
   if (show_debug_regs)
-    aarch64_show_debug_reg_state (aarch64_get_debug_reg_state (),
-				  "remove_point", addr, len, targ_type);
+    aarch64_show_debug_reg_state (state, "remove_point", addr, len,
+				  targ_type);
 
   return ret;
 }
 
-/* Returns the address associated with the watchpoint that hit, if
-   any; returns 0 otherwise.  */
+/* Implementation of linux_target_ops method "stopped_data_address".  */
 
 static CORE_ADDR
 aarch64_stopped_data_address (void)
@@ -1058,7 +371,7 @@ aarch64_stopped_data_address (void)
     return (CORE_ADDR) 0;
 
   /* Check if the address matches any watched address.  */
-  state = aarch64_get_debug_reg_state ();
+  state = aarch64_get_debug_reg_state (pid_of (current_thread));
   for (i = aarch64_num_wp_regs - 1; i >= 0; --i)
     {
       const unsigned int len = aarch64_watchpoint_length (state->dr_ctrl_wp[i]);
@@ -1074,8 +387,7 @@ aarch64_stopped_data_address (void)
   return (CORE_ADDR) 0;
 }
 
-/* Returns 1 if target was stopped due to a watchpoint hit, 0
-   otherwise.  */
+/* Implementation of linux_target_ops method "stopped_by_watchpoint".  */
 
 static int
 aarch64_stopped_by_watchpoint (void)
@@ -1089,53 +401,47 @@ aarch64_stopped_by_watchpoint (void)
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
-  struct iovec iovec;
-  uint64_t reg;
+  return aarch64_ps_get_thread_area (ph, lwpid, idx, base,
+				     is_64bit_tdesc ());
+}
 
-  iovec.iov_base = &reg;
-  iovec.iov_len = sizeof (reg);
+/* Implementation of linux_target_ops method "siginfo_fixup".  */
 
-  if (ptrace (PTRACE_GETREGSET, lwpid, NT_ARM_TLS, &iovec) != 0)
-    return PS_ERR;
+static int
+aarch64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
+{
+  /* Is the inferior 32-bit?  If so, then fixup the siginfo object.  */
+  if (!is_64bit_tdesc ())
+    {
+      if (direction == 0)
+	aarch64_compat_siginfo_from_siginfo ((struct compat_siginfo *) inf,
+					     native);
+      else
+	aarch64_siginfo_from_compat_siginfo (native,
+					     (struct compat_siginfo *) inf);
 
-  /* IDX is the bias from the thread pointer to the beginning of the
-     thread descriptor.  It has to be subtracted due to implementation
-     quirks in libthread_db.  */
-  *base = (void *) (reg - idx);
+      return 1;
+    }
 
-  return PS_OK;
+  return 0;
 }
 
-/* Called when a new process is created.  */
+/* Implementation of linux_target_ops method "linux_new_process".  */
 
 static struct arch_process_info *
 aarch64_linux_new_process (void)
 {
-  struct arch_process_info *info = xcalloc (1, sizeof (*info));
+  struct arch_process_info *info = XCNEW (struct arch_process_info);
 
   aarch64_init_debug_reg_state (&info->debug_reg_state);
 
   return info;
 }
 
-/* Called when a new thread is detected.  */
-
-static void
-aarch64_linux_new_thread (struct lwp_info *lwp)
-{
-  struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
-
-  /* Mark that all the hardware breakpoint/watchpoint register pairs
-     for this thread need to be initialized (with data from
-     aarch_process_info.debug_reg_state).  */
-  DR_MARK_ALL_CHANGED (info->dr_changed_bp, aarch64_num_bp_regs);
-  DR_MARK_ALL_CHANGED (info->dr_changed_wp, aarch64_num_wp_regs);
-
-  lwp->arch_private = info;
-}
+/* Implementation of linux_target_ops method "linux_new_fork".  */
 
 static void
 aarch64_linux_new_fork (struct process_info *parent,
@@ -1164,106 +470,34 @@ aarch64_linux_new_fork (struct process_i
   *child->priv->arch_private = *parent->priv->arch_private;
 }
 
-/* Called when resuming a thread.
-   If the debug regs have changed, update the thread's copies.  */
+/* Return the right target description according to the ELF file of
+   current thread.  */
 
-static void
-aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
+static const struct target_desc *
+aarch64_linux_read_description (void)
 {
-  struct thread_info *thread = get_lwp_thread (lwp);
-  ptid_t ptid = ptid_of (thread);
-  struct arch_lwp_info *info = lwp->arch_private;
-
-  if (DR_HAS_CHANGED (info->dr_changed_bp)
-      || DR_HAS_CHANGED (info->dr_changed_wp))
-    {
-      int tid = ptid_get_lwp (ptid);
-      struct process_info *proc = find_process_pid (ptid_get_pid (ptid));
-      struct aarch64_debug_reg_state *state
-	= &proc->priv->arch_private->debug_reg_state;
+  unsigned int machine;
+  int is_elf64;
+  int tid;
 
-      if (show_debug_regs)
-	fprintf (stderr, "prepare_to_resume thread %ld\n", lwpid_of (thread));
+  tid = lwpid_of (current_thread);
 
-      /* Watchpoints.  */
-      if (DR_HAS_CHANGED (info->dr_changed_wp))
-	{
-	  aarch64_linux_set_debug_regs (state, tid, 1);
-	  DR_CLEAR_CHANGED (info->dr_changed_wp);
-	}
+  is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
 
-      /* Breakpoints.  */
-      if (DR_HAS_CHANGED (info->dr_changed_bp))
-	{
-	  aarch64_linux_set_debug_regs (state, tid, 0);
-	  DR_CLEAR_CHANGED (info->dr_changed_bp);
-	}
-    }
+  if (is_elf64)
+    return tdesc_aarch64;
+  else
+    return tdesc_arm_with_neon;
 }
 
-/* ptrace hardware breakpoint resource info is formatted as follows:
-
-   31             24             16               8              0
-   +---------------+--------------+---------------+---------------+
-   |   RESERVED    |   RESERVED   |   DEBUG_ARCH  |  NUM_SLOTS    |
-   +---------------+--------------+---------------+---------------+  */
-
-#define AARCH64_DEBUG_NUM_SLOTS(x) ((x) & 0xff)
-#define AARCH64_DEBUG_ARCH(x) (((x) >> 8) & 0xff)
-#define AARCH64_DEBUG_ARCH_V8 0x6
+/* Implementation of linux_target_ops method "arch_setup".  */
 
 static void
 aarch64_arch_setup (void)
 {
-  int pid;
-  struct iovec iov;
-  struct user_hwdebug_state dreg_state;
-
-  current_process ()->tdesc = tdesc_aarch64;
-
-  pid = lwpid_of (current_thread);
-  iov.iov_base = &dreg_state;
-  iov.iov_len = sizeof (dreg_state);
-
-  /* Get hardware watchpoint register info.  */
-  if (ptrace (PTRACE_GETREGSET, pid, NT_ARM_HW_WATCH, &iov) == 0
-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
-    {
-      aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
-      if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
-	{
-	  warning ("Unexpected number of hardware watchpoint registers reported"
-		   " by ptrace, got %d, expected %d.",
-		   aarch64_num_wp_regs, AARCH64_HWP_MAX_NUM);
-	  aarch64_num_wp_regs = AARCH64_HWP_MAX_NUM;
-	}
-    }
-  else
-    {
-      warning ("Unable to determine the number of hardware watchpoints"
-	       " available.");
-      aarch64_num_wp_regs = 0;
-    }
+  current_process ()->tdesc = aarch64_linux_read_description ();
 
-  /* Get hardware breakpoint register info.  */
-  if (ptrace (PTRACE_GETREGSET, pid, NT_ARM_HW_BREAK, &iov) == 0
-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
-    {
-      aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
-      if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
-	{
-	  warning ("Unexpected number of hardware breakpoint registers reported"
-		   " by ptrace, got %d, expected %d.",
-		   aarch64_num_bp_regs, AARCH64_HBP_MAX_NUM);
-	  aarch64_num_bp_regs = AARCH64_HBP_MAX_NUM;
-	}
-    }
-  else
-    {
-      warning ("Unable to determine the number of hardware breakpoints"
-	       " available.");
-      aarch64_num_bp_regs = 0;
-    }
+  aarch64_linux_get_debug_reg_capacity (lwpid_of (current_thread));
 }
 
 static struct regset_info aarch64_regsets[] =
@@ -1275,7 +509,7 @@ static struct regset_info aarch64_regset
     sizeof (struct user_fpsimd_state), FP_REGS,
     aarch64_fill_fpregset, aarch64_store_fpregset
   },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info aarch64_regsets_info =
@@ -1285,23 +519,2452 @@ static struct regsets_info aarch64_regse
     NULL, /* disabled_regsets */
   };
 
-static struct usrregs_info aarch64_usrregs_info =
-  {
-    AARCH64_NUM_REGS,
-    aarch64_regmap,
-  };
-
-static struct regs_info regs_info =
+static struct regs_info regs_info_aarch64 =
   {
     NULL, /* regset_bitmap */
-    &aarch64_usrregs_info,
+    NULL, /* usrregs */
     &aarch64_regsets_info,
   };
 
+/* Implementation of linux_target_ops method "regs_info".  */
+
 static const struct regs_info *
 aarch64_regs_info (void)
 {
-  return &regs_info;
+  if (is_64bit_tdesc ())
+    return &regs_info_aarch64;
+  else
+    return &regs_info_aarch32;
+}
+
+/* Implementation of linux_target_ops method "supports_tracepoints".  */
+
+static int
+aarch64_supports_tracepoints (void)
+{
+  if (current_thread == NULL)
+    return 1;
+  else
+    {
+      /* We don't support tracepoints on aarch32 now.  */
+      return is_64bit_tdesc ();
+    }
+}
+
+/* Implementation of linux_target_ops method "get_thread_area".  */
+
+static int
+aarch64_get_thread_area (int lwpid, CORE_ADDR *addrp)
+{
+  struct iovec iovec;
+  uint64_t reg;
+
+  iovec.iov_base = &reg;
+  iovec.iov_len = sizeof (reg);
+
+  if (ptrace (PTRACE_GETREGSET, lwpid, NT_ARM_TLS, &iovec) != 0)
+    return -1;
+
+  *addrp = reg;
+
+  return 0;
+}
+
+/* Implementation of linux_target_ops method "get_syscall_trapinfo".  */
+
+static void
+aarch64_get_syscall_trapinfo (struct regcache *regcache, int *sysno)
+{
+  int use_64bit = register_size (regcache->tdesc, 0) == 8;
+
+  if (use_64bit)
+    {
+      long l_sysno;
+
+      collect_register_by_name (regcache, "x8", &l_sysno);
+      *sysno = (int) l_sysno;
+    }
+  else
+    collect_register_by_name (regcache, "r7", sysno);
+}
+
+/* List of condition codes that we need.  */
+
+enum aarch64_condition_codes
+{
+  EQ = 0x0,
+  NE = 0x1,
+  LO = 0x3,
+  GE = 0xa,
+  LT = 0xb,
+  GT = 0xc,
+  LE = 0xd,
+};
+
+enum aarch64_operand_type
+{
+  OPERAND_IMMEDIATE,
+  OPERAND_REGISTER,
+};
+
+/* Representation of an operand.  At this time, it only supports register
+   and immediate types.  */
+
+struct aarch64_operand
+{
+  /* Type of the operand.  */
+  enum aarch64_operand_type type;
+
+  /* Value of the operand according to the type.  */
+  union
+    {
+      uint32_t imm;
+      struct aarch64_register reg;
+    };
+};
+
+/* List of registers that we are currently using, we can add more here as
+   we need to use them.  */
+
+/* General purpose scratch registers (64 bit).  */
+static const struct aarch64_register x0 = { 0, 1 };
+static const struct aarch64_register x1 = { 1, 1 };
+static const struct aarch64_register x2 = { 2, 1 };
+static const struct aarch64_register x3 = { 3, 1 };
+static const struct aarch64_register x4 = { 4, 1 };
+
+/* General purpose scratch registers (32 bit).  */
+static const struct aarch64_register w0 = { 0, 0 };
+static const struct aarch64_register w2 = { 2, 0 };
+
+/* Intra-procedure scratch registers.  */
+static const struct aarch64_register ip0 = { 16, 1 };
+
+/* Special purpose registers.  */
+static const struct aarch64_register fp = { 29, 1 };
+static const struct aarch64_register lr = { 30, 1 };
+static const struct aarch64_register sp = { 31, 1 };
+static const struct aarch64_register xzr = { 31, 1 };
+
+/* Dynamically allocate a new register.  If we know the register
+   statically, we should make it a global as above instead of using this
+   helper function.  */
+
+static struct aarch64_register
+aarch64_register (unsigned num, int is64)
+{
+  return (struct aarch64_register) { num, is64 };
+}
+
+/* Helper function to create a register operand, for instructions with
+   different types of operands.
+
+   For example:
+   p += emit_mov (p, x0, register_operand (x1));  */
+
+static struct aarch64_operand
+register_operand (struct aarch64_register reg)
+{
+  struct aarch64_operand operand;
+
+  operand.type = OPERAND_REGISTER;
+  operand.reg = reg;
+
+  return operand;
+}
+
+/* Helper function to create an immediate operand, for instructions with
+   different types of operands.
+
+   For example:
+   p += emit_mov (p, x0, immediate_operand (12));  */
+
+static struct aarch64_operand
+immediate_operand (uint32_t imm)
+{
+  struct aarch64_operand operand;
+
+  operand.type = OPERAND_IMMEDIATE;
+  operand.imm = imm;
+
+  return operand;
+}
+
+/* Helper function to create an offset memory operand.
+
+   For example:
+   p += emit_ldr (p, x0, sp, offset_memory_operand (16));  */
+
+static struct aarch64_memory_operand
+offset_memory_operand (int32_t offset)
+{
+  return (struct aarch64_memory_operand) { MEMORY_OPERAND_OFFSET, offset };
+}
+
+/* Helper function to create a pre-index memory operand.
+
+   For example:
+   p += emit_ldr (p, x0, sp, preindex_memory_operand (16));  */
+
+static struct aarch64_memory_operand
+preindex_memory_operand (int32_t index)
+{
+  return (struct aarch64_memory_operand) { MEMORY_OPERAND_PREINDEX, index };
+}
+
+/* Helper function to create a post-index memory operand.
+
+   For example:
+   p += emit_ldr (p, x0, sp, postindex_memory_operand (16));  */
+
+static struct aarch64_memory_operand
+postindex_memory_operand (int32_t index)
+{
+  return (struct aarch64_memory_operand) { MEMORY_OPERAND_POSTINDEX, index };
+}
+
+/* System control registers.  These special registers can be written and
+   read with the MRS and MSR instructions.
+
+   - NZCV: Condition flags.  GDB refers to this register under the CPSR
+	   name.
+   - FPSR: Floating-point status register.
+   - FPCR: Floating-point control registers.
+   - TPIDR_EL0: Software thread ID register.  */
+
+enum aarch64_system_control_registers
+{
+  /*          op0           op1           crn          crm          op2  */
+  NZCV =      (0x1 << 14) | (0x3 << 11) | (0x4 << 7) | (0x2 << 3) | 0x0,
+  FPSR =      (0x1 << 14) | (0x3 << 11) | (0x4 << 7) | (0x4 << 3) | 0x1,
+  FPCR =      (0x1 << 14) | (0x3 << 11) | (0x4 << 7) | (0x4 << 3) | 0x0,
+  TPIDR_EL0 = (0x1 << 14) | (0x3 << 11) | (0xd << 7) | (0x0 << 3) | 0x2
+};
+
+/* Write a BLR instruction into *BUF.
+
+     BLR rn
+
+   RN is the register to branch to.  */
+
+static int
+emit_blr (uint32_t *buf, struct aarch64_register rn)
+{
+  return aarch64_emit_insn (buf, BLR | ENCODE (rn.num, 5, 5));
+}
+
+/* Write a RET instruction into *BUF.
+
+     RET xn
+
+   RN is the register to branch to.  */
+
+static int
+emit_ret (uint32_t *buf, struct aarch64_register rn)
+{
+  return aarch64_emit_insn (buf, RET | ENCODE (rn.num, 5, 5));
+}
+
+static int
+emit_load_store_pair (uint32_t *buf, enum aarch64_opcodes opcode,
+		      struct aarch64_register rt,
+		      struct aarch64_register rt2,
+		      struct aarch64_register rn,
+		      struct aarch64_memory_operand operand)
+{
+  uint32_t opc;
+  uint32_t pre_index;
+  uint32_t write_back;
+
+  if (rt.is64)
+    opc = ENCODE (2, 2, 30);
+  else
+    opc = ENCODE (0, 2, 30);
+
+  switch (operand.type)
+    {
+    case MEMORY_OPERAND_OFFSET:
+      {
+	pre_index = ENCODE (1, 1, 24);
+	write_back = ENCODE (0, 1, 23);
+	break;
+      }
+    case MEMORY_OPERAND_POSTINDEX:
+      {
+	pre_index = ENCODE (0, 1, 24);
+	write_back = ENCODE (1, 1, 23);
+	break;
+      }
+    case MEMORY_OPERAND_PREINDEX:
+      {
+	pre_index = ENCODE (1, 1, 24);
+	write_back = ENCODE (1, 1, 23);
+	break;
+      }
+    default:
+      return 0;
+    }
+
+  return aarch64_emit_insn (buf, opcode | opc | pre_index | write_back
+			    | ENCODE (operand.index >> 3, 7, 15)
+			    | ENCODE (rt2.num, 5, 10)
+			    | ENCODE (rn.num, 5, 5) | ENCODE (rt.num, 5, 0));
+}
+
+/* Write a STP instruction into *BUF.
+
+     STP rt, rt2, [rn, #offset]
+     STP rt, rt2, [rn, #index]!
+     STP rt, rt2, [rn], #index
+
+   RT and RT2 are the registers to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to a
+   -512 .. 504 range (7 bits << 3).  */
+
+static int
+emit_stp (uint32_t *buf, struct aarch64_register rt,
+	  struct aarch64_register rt2, struct aarch64_register rn,
+	  struct aarch64_memory_operand operand)
+{
+  return emit_load_store_pair (buf, STP, rt, rt2, rn, operand);
+}
+
+/* Write a LDP instruction into *BUF.
+
+     LDP rt, rt2, [rn, #offset]
+     LDP rt, rt2, [rn, #index]!
+     LDP rt, rt2, [rn], #index
+
+   RT and RT2 are the registers to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to a
+   -512 .. 504 range (7 bits << 3).  */
+
+static int
+emit_ldp (uint32_t *buf, struct aarch64_register rt,
+	  struct aarch64_register rt2, struct aarch64_register rn,
+	  struct aarch64_memory_operand operand)
+{
+  return emit_load_store_pair (buf, LDP, rt, rt2, rn, operand);
+}
+
+/* Write a LDP (SIMD&VFP) instruction using Q registers into *BUF.
+
+     LDP qt, qt2, [rn, #offset]
+
+   RT and RT2 are the Q registers to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   -1024 .. 1008 range (7 bits << 4).  */
+
+static int
+emit_ldp_q_offset (uint32_t *buf, unsigned rt, unsigned rt2,
+		   struct aarch64_register rn, int32_t offset)
+{
+  uint32_t opc = ENCODE (2, 2, 30);
+  uint32_t pre_index = ENCODE (1, 1, 24);
+
+  return aarch64_emit_insn (buf, LDP_SIMD_VFP | opc | pre_index
+			    | ENCODE (offset >> 4, 7, 15)
+			    | ENCODE (rt2, 5, 10)
+			    | ENCODE (rn.num, 5, 5) | ENCODE (rt, 5, 0));
+}
+
+/* Write a STP (SIMD&VFP) instruction using Q registers into *BUF.
+
+     STP qt, qt2, [rn, #offset]
+
+   RT and RT2 are the Q registers to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   -1024 .. 1008 range (7 bits << 4).  */
+
+static int
+emit_stp_q_offset (uint32_t *buf, unsigned rt, unsigned rt2,
+		   struct aarch64_register rn, int32_t offset)
+{
+  uint32_t opc = ENCODE (2, 2, 30);
+  uint32_t pre_index = ENCODE (1, 1, 24);
+
+  return aarch64_emit_insn (buf, STP_SIMD_VFP | opc | pre_index
+			    | ENCODE (offset >> 4, 7, 15)
+			    | ENCODE (rt2, 5, 10)
+			    | ENCODE (rn.num, 5, 5) | ENCODE (rt, 5, 0));
+}
+
+/* Write a LDRH instruction into *BUF.
+
+     LDRH wt, [xn, #offset]
+     LDRH wt, [xn, #index]!
+     LDRH wt, [xn], #index
+
+   RT is the register to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   0 .. 32760 range (12 bits << 3).  */
+
+static int
+emit_ldrh (uint32_t *buf, struct aarch64_register rt,
+	   struct aarch64_register rn,
+	   struct aarch64_memory_operand operand)
+{
+  return aarch64_emit_load_store (buf, 1, LDR, rt, rn, operand);
+}
+
+/* Write a LDRB instruction into *BUF.
+
+     LDRB wt, [xn, #offset]
+     LDRB wt, [xn, #index]!
+     LDRB wt, [xn], #index
+
+   RT is the register to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   0 .. 32760 range (12 bits << 3).  */
+
+static int
+emit_ldrb (uint32_t *buf, struct aarch64_register rt,
+	   struct aarch64_register rn,
+	   struct aarch64_memory_operand operand)
+{
+  return aarch64_emit_load_store (buf, 0, LDR, rt, rn, operand);
+}
+
+
+
+/* Write a STR instruction into *BUF.
+
+     STR rt, [rn, #offset]
+     STR rt, [rn, #index]!
+     STR rt, [rn], #index
+
+   RT is the register to store.
+   RN is the base address register.
+   OFFSET is the immediate to add to the base address.  It is limited to
+   0 .. 32760 range (12 bits << 3).  */
+
+static int
+emit_str (uint32_t *buf, struct aarch64_register rt,
+	  struct aarch64_register rn,
+	  struct aarch64_memory_operand operand)
+{
+  return aarch64_emit_load_store (buf, rt.is64 ? 3 : 2, STR, rt, rn, operand);
+}
+
+/* Helper function emitting an exclusive load or store instruction.  */
+
+static int
+emit_load_store_exclusive (uint32_t *buf, uint32_t size,
+			   enum aarch64_opcodes opcode,
+			   struct aarch64_register rs,
+			   struct aarch64_register rt,
+			   struct aarch64_register rt2,
+			   struct aarch64_register rn)
+{
+  return aarch64_emit_insn (buf, opcode | ENCODE (size, 2, 30)
+			    | ENCODE (rs.num, 5, 16) | ENCODE (rt2.num, 5, 10)
+			    | ENCODE (rn.num, 5, 5) | ENCODE (rt.num, 5, 0));
+}
+
+/* Write a LAXR instruction into *BUF.
+
+     LDAXR rt, [xn]
+
+   RT is the destination register.
+   RN is the base address register.  */
+
+static int
+emit_ldaxr (uint32_t *buf, struct aarch64_register rt,
+	    struct aarch64_register rn)
+{
+  return emit_load_store_exclusive (buf, rt.is64 ? 3 : 2, LDAXR, xzr, rt,
+				    xzr, rn);
+}
+
+/* Write a STXR instruction into *BUF.
+
+     STXR ws, rt, [xn]
+
+   RS is the result register, it indicates if the store succeeded or not.
+   RT is the destination register.
+   RN is the base address register.  */
+
+static int
+emit_stxr (uint32_t *buf, struct aarch64_register rs,
+	   struct aarch64_register rt, struct aarch64_register rn)
+{
+  return emit_load_store_exclusive (buf, rt.is64 ? 3 : 2, STXR, rs, rt,
+				    xzr, rn);
+}
+
+/* Write a STLR instruction into *BUF.
+
+     STLR rt, [xn]
+
+   RT is the register to store.
+   RN is the base address register.  */
+
+static int
+emit_stlr (uint32_t *buf, struct aarch64_register rt,
+	   struct aarch64_register rn)
+{
+  return emit_load_store_exclusive (buf, rt.is64 ? 3 : 2, STLR, xzr, rt,
+				    xzr, rn);
+}
+
+/* Helper function for data processing instructions with register sources.  */
+
+static int
+emit_data_processing_reg (uint32_t *buf, uint32_t opcode,
+			  struct aarch64_register rd,
+			  struct aarch64_register rn,
+			  struct aarch64_register rm)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+
+  return aarch64_emit_insn (buf, opcode | size | ENCODE (rm.num, 5, 16)
+			    | ENCODE (rn.num, 5, 5) | ENCODE (rd.num, 5, 0));
+}
+
+/* Helper function for data processing instructions taking either a register
+   or an immediate.  */
+
+static int
+emit_data_processing (uint32_t *buf, enum aarch64_opcodes opcode,
+		      struct aarch64_register rd,
+		      struct aarch64_register rn,
+		      struct aarch64_operand operand)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+  /* The opcode is different for register and immediate source operands.  */
+  uint32_t operand_opcode;
+
+  if (operand.type == OPERAND_IMMEDIATE)
+    {
+      /* xxx1 000x xxxx xxxx xxxx xxxx xxxx xxxx */
+      operand_opcode = ENCODE (8, 4, 25);
+
+      return aarch64_emit_insn (buf, opcode | operand_opcode | size
+				| ENCODE (operand.imm, 12, 10)
+				| ENCODE (rn.num, 5, 5)
+				| ENCODE (rd.num, 5, 0));
+    }
+  else
+    {
+      /* xxx0 101x xxxx xxxx xxxx xxxx xxxx xxxx */
+      operand_opcode = ENCODE (5, 4, 25);
+
+      return emit_data_processing_reg (buf, opcode | operand_opcode, rd,
+				       rn, operand.reg);
+    }
+}
+
+/* Write an ADD instruction into *BUF.
+
+     ADD rd, rn, #imm
+     ADD rd, rn, rm
+
+   This function handles both an immediate and register add.
+
+   RD is the destination register.
+   RN is the input register.
+   OPERAND is the source operand, either of type OPERAND_IMMEDIATE or
+   OPERAND_REGISTER.  */
+
+static int
+emit_add (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_operand operand)
+{
+  return emit_data_processing (buf, ADD, rd, rn, operand);
+}
+
+/* Write a SUB instruction into *BUF.
+
+     SUB rd, rn, #imm
+     SUB rd, rn, rm
+
+   This function handles both an immediate and register sub.
+
+   RD is the destination register.
+   RN is the input register.
+   IMM is the immediate to substract to RN.  */
+
+static int
+emit_sub (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_operand operand)
+{
+  return emit_data_processing (buf, SUB, rd, rn, operand);
+}
+
+/* Write a MOV instruction into *BUF.
+
+     MOV rd, #imm
+     MOV rd, rm
+
+   This function handles both a wide immediate move and a register move,
+   with the condition that the source register is not xzr.  xzr and the
+   stack pointer share the same encoding and this function only supports
+   the stack pointer.
+
+   RD is the destination register.
+   OPERAND is the source operand, either of type OPERAND_IMMEDIATE or
+   OPERAND_REGISTER.  */
+
+static int
+emit_mov (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_operand operand)
+{
+  if (operand.type == OPERAND_IMMEDIATE)
+    {
+      uint32_t size = ENCODE (rd.is64, 1, 31);
+      /* Do not shift the immediate.  */
+      uint32_t shift = ENCODE (0, 2, 21);
+
+      return aarch64_emit_insn (buf, MOV | size | shift
+				| ENCODE (operand.imm, 16, 5)
+				| ENCODE (rd.num, 5, 0));
+    }
+  else
+    return emit_add (buf, rd, operand.reg, immediate_operand (0));
+}
+
+/* Write a MOVK instruction into *BUF.
+
+     MOVK rd, #imm, lsl #shift
+
+   RD is the destination register.
+   IMM is the immediate.
+   SHIFT is the logical shift left to apply to IMM.   */
+
+static int
+emit_movk (uint32_t *buf, struct aarch64_register rd, uint32_t imm,
+	   unsigned shift)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+
+  return aarch64_emit_insn (buf, MOVK | size | ENCODE (shift, 2, 21) |
+			    ENCODE (imm, 16, 5) | ENCODE (rd.num, 5, 0));
+}
+
+/* Write instructions into *BUF in order to move ADDR into a register.
+   ADDR can be a 64-bit value.
+
+   This function will emit a series of MOV and MOVK instructions, such as:
+
+     MOV  xd, #(addr)
+     MOVK xd, #(addr >> 16), lsl #16
+     MOVK xd, #(addr >> 32), lsl #32
+     MOVK xd, #(addr >> 48), lsl #48  */
+
+static int
+emit_mov_addr (uint32_t *buf, struct aarch64_register rd, CORE_ADDR addr)
+{
+  uint32_t *p = buf;
+
+  /* The MOV (wide immediate) instruction clears to top bits of the
+     register.  */
+  p += emit_mov (p, rd, immediate_operand (addr & 0xffff));
+
+  if ((addr >> 16) != 0)
+    p += emit_movk (p, rd, (addr >> 16) & 0xffff, 1);
+  else
+    return p - buf;
+
+  if ((addr >> 32) != 0)
+    p += emit_movk (p, rd, (addr >> 32) & 0xffff, 2);
+  else
+    return p - buf;
+
+  if ((addr >> 48) != 0)
+    p += emit_movk (p, rd, (addr >> 48) & 0xffff, 3);
+
+  return p - buf;
+}
+
+/* Write a SUBS instruction into *BUF.
+
+     SUBS rd, rn, rm
+
+   This instruction update the condition flags.
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_subs (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, struct aarch64_operand operand)
+{
+  return emit_data_processing (buf, SUBS, rd, rn, operand);
+}
+
+/* Write a CMP instruction into *BUF.
+
+     CMP rn, rm
+
+   This instruction is an alias of SUBS xzr, rn, rm.
+
+   RN and RM are the registers to compare.  */
+
+static int
+emit_cmp (uint32_t *buf, struct aarch64_register rn,
+	      struct aarch64_operand operand)
+{
+  return emit_subs (buf, xzr, rn, operand);
+}
+
+/* Write a AND instruction into *BUF.
+
+     AND rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_and (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, AND, rd, rn, rm);
+}
+
+/* Write a ORR instruction into *BUF.
+
+     ORR rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_orr (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, ORR, rd, rn, rm);
+}
+
+/* Write a ORN instruction into *BUF.
+
+     ORN rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_orn (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, ORN, rd, rn, rm);
+}
+
+/* Write a EOR instruction into *BUF.
+
+     EOR rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_eor (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, EOR, rd, rn, rm);
+}
+
+/* Write a MVN instruction into *BUF.
+
+     MVN rd, rm
+
+   This is an alias for ORN rd, xzr, rm.
+
+   RD is the destination register.
+   RM is the source register.  */
+
+static int
+emit_mvn (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rm)
+{
+  return emit_orn (buf, rd, xzr, rm);
+}
+
+/* Write a LSLV instruction into *BUF.
+
+     LSLV rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_lslv (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, LSLV, rd, rn, rm);
+}
+
+/* Write a LSRV instruction into *BUF.
+
+     LSRV rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_lsrv (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, LSRV, rd, rn, rm);
+}
+
+/* Write a ASRV instruction into *BUF.
+
+     ASRV rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_asrv (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, ASRV, rd, rn, rm);
+}
+
+/* Write a MUL instruction into *BUF.
+
+     MUL rd, rn, rm
+
+   RD is the destination register.
+   RN and RM are the source registers.  */
+
+static int
+emit_mul (uint32_t *buf, struct aarch64_register rd,
+	  struct aarch64_register rn, struct aarch64_register rm)
+{
+  return emit_data_processing_reg (buf, MUL, rd, rn, rm);
+}
+
+/* Write a MRS instruction into *BUF.  The register size is 64-bit.
+
+     MRS xt, system_reg
+
+   RT is the destination register.
+   SYSTEM_REG is special purpose register to read.  */
+
+static int
+emit_mrs (uint32_t *buf, struct aarch64_register rt,
+	  enum aarch64_system_control_registers system_reg)
+{
+  return aarch64_emit_insn (buf, MRS | ENCODE (system_reg, 15, 5)
+			    | ENCODE (rt.num, 5, 0));
+}
+
+/* Write a MSR instruction into *BUF.  The register size is 64-bit.
+
+     MSR system_reg, xt
+
+   SYSTEM_REG is special purpose register to write.
+   RT is the input register.  */
+
+static int
+emit_msr (uint32_t *buf, enum aarch64_system_control_registers system_reg,
+	  struct aarch64_register rt)
+{
+  return aarch64_emit_insn (buf, MSR | ENCODE (system_reg, 15, 5)
+			    | ENCODE (rt.num, 5, 0));
+}
+
+/* Write a SEVL instruction into *BUF.
+
+   This is a hint instruction telling the hardware to trigger an event.  */
+
+static int
+emit_sevl (uint32_t *buf)
+{
+  return aarch64_emit_insn (buf, SEVL);
+}
+
+/* Write a WFE instruction into *BUF.
+
+   This is a hint instruction telling the hardware to wait for an event.  */
+
+static int
+emit_wfe (uint32_t *buf)
+{
+  return aarch64_emit_insn (buf, WFE);
+}
+
+/* Write a SBFM instruction into *BUF.
+
+     SBFM rd, rn, #immr, #imms
+
+   This instruction moves the bits from #immr to #imms into the
+   destination, sign extending the result.
+
+   RD is the destination register.
+   RN is the source register.
+   IMMR is the bit number to start at (least significant bit).
+   IMMS is the bit number to stop at (most significant bit).  */
+
+static int
+emit_sbfm (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, uint32_t immr, uint32_t imms)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+  uint32_t n = ENCODE (rd.is64, 1, 22);
+
+  return aarch64_emit_insn (buf, SBFM | size | n | ENCODE (immr, 6, 16)
+			    | ENCODE (imms, 6, 10) | ENCODE (rn.num, 5, 5)
+			    | ENCODE (rd.num, 5, 0));
+}
+
+/* Write a SBFX instruction into *BUF.
+
+     SBFX rd, rn, #lsb, #width
+
+   This instruction moves #width bits from #lsb into the destination, sign
+   extending the result.  This is an alias for:
+
+     SBFM rd, rn, #lsb, #(lsb + width - 1)
+
+   RD is the destination register.
+   RN is the source register.
+   LSB is the bit number to start at (least significant bit).
+   WIDTH is the number of bits to move.  */
+
+static int
+emit_sbfx (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, uint32_t lsb, uint32_t width)
+{
+  return emit_sbfm (buf, rd, rn, lsb, lsb + width - 1);
+}
+
+/* Write a UBFM instruction into *BUF.
+
+     UBFM rd, rn, #immr, #imms
+
+   This instruction moves the bits from #immr to #imms into the
+   destination, extending the result with zeros.
+
+   RD is the destination register.
+   RN is the source register.
+   IMMR is the bit number to start at (least significant bit).
+   IMMS is the bit number to stop at (most significant bit).  */
+
+static int
+emit_ubfm (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, uint32_t immr, uint32_t imms)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+  uint32_t n = ENCODE (rd.is64, 1, 22);
+
+  return aarch64_emit_insn (buf, UBFM | size | n | ENCODE (immr, 6, 16)
+			    | ENCODE (imms, 6, 10) | ENCODE (rn.num, 5, 5)
+			    | ENCODE (rd.num, 5, 0));
+}
+
+/* Write a UBFX instruction into *BUF.
+
+     UBFX rd, rn, #lsb, #width
+
+   This instruction moves #width bits from #lsb into the destination,
+   extending the result with zeros.  This is an alias for:
+
+     UBFM rd, rn, #lsb, #(lsb + width - 1)
+
+   RD is the destination register.
+   RN is the source register.
+   LSB is the bit number to start at (least significant bit).
+   WIDTH is the number of bits to move.  */
+
+static int
+emit_ubfx (uint32_t *buf, struct aarch64_register rd,
+	   struct aarch64_register rn, uint32_t lsb, uint32_t width)
+{
+  return emit_ubfm (buf, rd, rn, lsb, lsb + width - 1);
+}
+
+/* Write a CSINC instruction into *BUF.
+
+     CSINC rd, rn, rm, cond
+
+   This instruction conditionally increments rn or rm and places the result
+   in rd.  rn is chosen is the condition is true.
+
+   RD is the destination register.
+   RN and RM are the source registers.
+   COND is the encoded condition.  */
+
+static int
+emit_csinc (uint32_t *buf, struct aarch64_register rd,
+	    struct aarch64_register rn, struct aarch64_register rm,
+	    unsigned cond)
+{
+  uint32_t size = ENCODE (rd.is64, 1, 31);
+
+  return aarch64_emit_insn (buf, CSINC | size | ENCODE (rm.num, 5, 16)
+			    | ENCODE (cond, 4, 12) | ENCODE (rn.num, 5, 5)
+			    | ENCODE (rd.num, 5, 0));
+}
+
+/* Write a CSET instruction into *BUF.
+
+     CSET rd, cond
+
+   This instruction conditionally write 1 or 0 in the destination register.
+   1 is written if the condition is true.  This is an alias for:
+
+     CSINC rd, xzr, xzr, !cond
+
+   Note that the condition needs to be inverted.
+
+   RD is the destination register.
+   RN and RM are the source registers.
+   COND is the encoded condition.  */
+
+static int
+emit_cset (uint32_t *buf, struct aarch64_register rd, unsigned cond)
+{
+  /* The least significant bit of the condition needs toggling in order to
+     invert it.  */
+  return emit_csinc (buf, rd, xzr, xzr, cond ^ 0x1);
+}
+
+/* Write LEN instructions from BUF into the inferior memory at *TO.
+
+   Note instructions are always little endian on AArch64, unlike data.  */
+
+static void
+append_insns (CORE_ADDR *to, size_t len, const uint32_t *buf)
+{
+  size_t byte_len = len * sizeof (uint32_t);
+#if (__BYTE_ORDER == __BIG_ENDIAN)
+  uint32_t *le_buf = (uint32_t *) xmalloc (byte_len);
+  size_t i;
+
+  for (i = 0; i < len; i++)
+    le_buf[i] = htole32 (buf[i]);
+
+  write_inferior_memory (*to, (const unsigned char *) le_buf, byte_len);
+
+  xfree (le_buf);
+#else
+  write_inferior_memory (*to, (const unsigned char *) buf, byte_len);
+#endif
+
+  *to += byte_len;
+}
+
+/* Sub-class of struct aarch64_insn_data, store information of
+   instruction relocation for fast tracepoint.  Visitor can
+   relocate an instruction from BASE.INSN_ADDR to NEW_ADDR and save
+   the relocated instructions in buffer pointed by INSN_PTR.  */
+
+struct aarch64_insn_relocation_data
+{
+  struct aarch64_insn_data base;
+
+  /* The new address the instruction is relocated to.  */
+  CORE_ADDR new_addr;
+  /* Pointer to the buffer of relocated instruction(s).  */
+  uint32_t *insn_ptr;
+};
+
+/* Implementation of aarch64_insn_visitor method "b".  */
+
+static void
+aarch64_ftrace_insn_reloc_b (const int is_bl, const int32_t offset,
+			     struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  int64_t new_offset
+    = insn_reloc->base.insn_addr - insn_reloc->new_addr + offset;
+
+  if (can_encode_int32 (new_offset, 28))
+    insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, is_bl, new_offset);
+}
+
+/* Implementation of aarch64_insn_visitor method "b_cond".  */
+
+static void
+aarch64_ftrace_insn_reloc_b_cond (const unsigned cond, const int32_t offset,
+				  struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  int64_t new_offset
+    = insn_reloc->base.insn_addr - insn_reloc->new_addr + offset;
+
+  if (can_encode_int32 (new_offset, 21))
+    {
+      insn_reloc->insn_ptr += emit_bcond (insn_reloc->insn_ptr, cond,
+					  new_offset);
+    }
+  else if (can_encode_int32 (new_offset, 28))
+    {
+      /* The offset is out of range for a conditional branch
+	 instruction but not for a unconditional branch.  We can use
+	 the following instructions instead:
+
+	 B.COND TAKEN    ; If cond is true, then jump to TAKEN.
+	 B NOT_TAKEN     ; Else jump over TAKEN and continue.
+	 TAKEN:
+	 B #(offset - 8)
+	 NOT_TAKEN:
+
+      */
+
+      insn_reloc->insn_ptr += emit_bcond (insn_reloc->insn_ptr, cond, 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0, 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0, new_offset - 8);
+    }
+}
+
+/* Implementation of aarch64_insn_visitor method "cb".  */
+
+static void
+aarch64_ftrace_insn_reloc_cb (const int32_t offset, const int is_cbnz,
+			      const unsigned rn, int is64,
+			      struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  int64_t new_offset
+    = insn_reloc->base.insn_addr - insn_reloc->new_addr + offset;
+
+  if (can_encode_int32 (new_offset, 21))
+    {
+      insn_reloc->insn_ptr += emit_cb (insn_reloc->insn_ptr, is_cbnz,
+				       aarch64_register (rn, is64), new_offset);
+    }
+  else if (can_encode_int32 (new_offset, 28))
+    {
+      /* The offset is out of range for a compare and branch
+	 instruction but not for a unconditional branch.  We can use
+	 the following instructions instead:
+
+	 CBZ xn, TAKEN   ; xn == 0, then jump to TAKEN.
+	 B NOT_TAKEN     ; Else jump over TAKEN and continue.
+	 TAKEN:
+	 B #(offset - 8)
+	 NOT_TAKEN:
+
+      */
+      insn_reloc->insn_ptr += emit_cb (insn_reloc->insn_ptr, is_cbnz,
+				       aarch64_register (rn, is64), 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0, 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0, new_offset - 8);
+    }
+}
+
+/* Implementation of aarch64_insn_visitor method "tb".  */
+
+static void
+aarch64_ftrace_insn_reloc_tb (const int32_t offset, int is_tbnz,
+			      const unsigned rt, unsigned bit,
+			      struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  int64_t new_offset
+    = insn_reloc->base.insn_addr - insn_reloc->new_addr + offset;
+
+  if (can_encode_int32 (new_offset, 16))
+    {
+      insn_reloc->insn_ptr += emit_tb (insn_reloc->insn_ptr, is_tbnz, bit,
+				       aarch64_register (rt, 1), new_offset);
+    }
+  else if (can_encode_int32 (new_offset, 28))
+    {
+      /* The offset is out of range for a test bit and branch
+	 instruction but not for a unconditional branch.  We can use
+	 the following instructions instead:
+
+	 TBZ xn, #bit, TAKEN ; xn[bit] == 0, then jump to TAKEN.
+	 B NOT_TAKEN         ; Else jump over TAKEN and continue.
+	 TAKEN:
+	 B #(offset - 8)
+	 NOT_TAKEN:
+
+      */
+      insn_reloc->insn_ptr += emit_tb (insn_reloc->insn_ptr, is_tbnz, bit,
+				       aarch64_register (rt, 1), 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0, 8);
+      insn_reloc->insn_ptr += emit_b (insn_reloc->insn_ptr, 0,
+				      new_offset - 8);
+    }
+}
+
+/* Implementation of aarch64_insn_visitor method "adr".  */
+
+static void
+aarch64_ftrace_insn_reloc_adr (const int32_t offset, const unsigned rd,
+			       const int is_adrp,
+			       struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  /* We know exactly the address the ADR{P,} instruction will compute.
+     We can just write it to the destination register.  */
+  CORE_ADDR address = data->insn_addr + offset;
+
+  if (is_adrp)
+    {
+      /* Clear the lower 12 bits of the offset to get the 4K page.  */
+      insn_reloc->insn_ptr += emit_mov_addr (insn_reloc->insn_ptr,
+					     aarch64_register (rd, 1),
+					     address & ~0xfff);
+    }
+  else
+    insn_reloc->insn_ptr += emit_mov_addr (insn_reloc->insn_ptr,
+					   aarch64_register (rd, 1), address);
+}
+
+/* Implementation of aarch64_insn_visitor method "ldr_literal".  */
+
+static void
+aarch64_ftrace_insn_reloc_ldr_literal (const int32_t offset, const int is_sw,
+				       const unsigned rt, const int is64,
+				       struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+  CORE_ADDR address = data->insn_addr + offset;
+
+  insn_reloc->insn_ptr += emit_mov_addr (insn_reloc->insn_ptr,
+					 aarch64_register (rt, 1), address);
+
+  /* We know exactly what address to load from, and what register we
+     can use:
+
+     MOV xd, #(oldloc + offset)
+     MOVK xd, #((oldloc + offset) >> 16), lsl #16
+     ...
+
+     LDR xd, [xd] ; or LDRSW xd, [xd]
+
+  */
+
+  if (is_sw)
+    insn_reloc->insn_ptr += emit_ldrsw (insn_reloc->insn_ptr,
+					aarch64_register (rt, 1),
+					aarch64_register (rt, 1),
+					offset_memory_operand (0));
+  else
+    insn_reloc->insn_ptr += emit_ldr (insn_reloc->insn_ptr,
+				      aarch64_register (rt, is64),
+				      aarch64_register (rt, 1),
+				      offset_memory_operand (0));
+}
+
+/* Implementation of aarch64_insn_visitor method "others".  */
+
+static void
+aarch64_ftrace_insn_reloc_others (const uint32_t insn,
+				  struct aarch64_insn_data *data)
+{
+  struct aarch64_insn_relocation_data *insn_reloc
+    = (struct aarch64_insn_relocation_data *) data;
+
+  /* The instruction is not PC relative.  Just re-emit it at the new
+     location.  */
+  insn_reloc->insn_ptr += aarch64_emit_insn (insn_reloc->insn_ptr, insn);
+}
+
+static const struct aarch64_insn_visitor visitor =
+{
+  aarch64_ftrace_insn_reloc_b,
+  aarch64_ftrace_insn_reloc_b_cond,
+  aarch64_ftrace_insn_reloc_cb,
+  aarch64_ftrace_insn_reloc_tb,
+  aarch64_ftrace_insn_reloc_adr,
+  aarch64_ftrace_insn_reloc_ldr_literal,
+  aarch64_ftrace_insn_reloc_others,
+};
+
+/* Implementation of linux_target_ops method
+   "install_fast_tracepoint_jump_pad".  */
+
+static int
+aarch64_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
+					  CORE_ADDR tpaddr,
+					  CORE_ADDR collector,
+					  CORE_ADDR lockaddr,
+					  ULONGEST orig_size,
+					  CORE_ADDR *jump_entry,
+					  CORE_ADDR *trampoline,
+					  ULONGEST *trampoline_size,
+					  unsigned char *jjump_pad_insn,
+					  ULONGEST *jjump_pad_insn_size,
+					  CORE_ADDR *adjusted_insn_addr,
+					  CORE_ADDR *adjusted_insn_addr_end,
+					  char *err)
+{
+  uint32_t buf[256];
+  uint32_t *p = buf;
+  int64_t offset;
+  int i;
+  uint32_t insn;
+  CORE_ADDR buildaddr = *jump_entry;
+  struct aarch64_insn_relocation_data insn_data;
+
+  /* We need to save the current state on the stack both to restore it
+     later and to collect register values when the tracepoint is hit.
+
+     The saved registers are pushed in a layout that needs to be in sync
+     with aarch64_ft_collect_regmap (see linux-aarch64-ipa.c).  Later on
+     the supply_fast_tracepoint_registers function will fill in the
+     register cache from a pointer to saved registers on the stack we build
+     here.
+
+     For simplicity, we set the size of each cell on the stack to 16 bytes.
+     This way one cell can hold any register type, from system registers
+     to the 128 bit SIMD&FP registers.  Furthermore, the stack pointer
+     has to be 16 bytes aligned anyway.
+
+     Note that the CPSR register does not exist on AArch64.  Instead we
+     can access system bits describing the process state with the
+     MRS/MSR instructions, namely the condition flags.  We save them as
+     if they are part of a CPSR register because that's how GDB
+     interprets these system bits.  At the moment, only the condition
+     flags are saved in CPSR (NZCV).
+
+     Stack layout, each cell is 16 bytes (descending):
+
+     High *-------- SIMD&FP registers from 31 down to 0. --------*
+	  | q31                                                  |
+	  .                                                      .
+	  .                                                      . 32 cells
+	  .                                                      .
+	  | q0                                                   |
+	  *---- General purpose registers from 30 down to 0. ----*
+	  | x30                                                  |
+	  .                                                      .
+	  .                                                      . 31 cells
+	  .                                                      .
+	  | x0                                                   |
+	  *------------- Special purpose registers. -------------*
+	  | SP                                                   |
+	  | PC                                                   |
+	  | CPSR (NZCV)                                          | 5 cells
+	  | FPSR                                                 |
+	  | FPCR                                                 | <- SP + 16
+	  *------------- collecting_t object --------------------*
+	  | TPIDR_EL0               | struct tracepoint *        |
+     Low  *------------------------------------------------------*
+
+     After this stack is set up, we issue a call to the collector, passing
+     it the saved registers at (SP + 16).  */
+
+  /* Push SIMD&FP registers on the stack:
+
+       SUB sp, sp, #(32 * 16)
+
+       STP q30, q31, [sp, #(30 * 16)]
+       ...
+       STP q0, q1, [sp]
+
+     */
+  p += emit_sub (p, sp, sp, immediate_operand (32 * 16));
+  for (i = 30; i >= 0; i -= 2)
+    p += emit_stp_q_offset (p, i, i + 1, sp, i * 16);
+
+  /* Push general puspose registers on the stack.  Note that we do not need
+     to push x31 as it represents the xzr register and not the stack
+     pointer in a STR instruction.
+
+       SUB sp, sp, #(31 * 16)
+
+       STR x30, [sp, #(30 * 16)]
+       ...
+       STR x0, [sp]
+
+     */
+  p += emit_sub (p, sp, sp, immediate_operand (31 * 16));
+  for (i = 30; i >= 0; i -= 1)
+    p += emit_str (p, aarch64_register (i, 1), sp,
+		   offset_memory_operand (i * 16));
+
+  /* Make space for 5 more cells.
+
+       SUB sp, sp, #(5 * 16)
+
+     */
+  p += emit_sub (p, sp, sp, immediate_operand (5 * 16));
+
+
+  /* Save SP:
+
+       ADD x4, sp, #((32 + 31 + 5) * 16)
+       STR x4, [sp, #(4 * 16)]
+
+     */
+  p += emit_add (p, x4, sp, immediate_operand ((32 + 31 + 5) * 16));
+  p += emit_str (p, x4, sp, offset_memory_operand (4 * 16));
+
+  /* Save PC (tracepoint address):
+
+       MOV  x3, #(tpaddr)
+       ...
+
+       STR x3, [sp, #(3 * 16)]
+
+     */
+
+  p += emit_mov_addr (p, x3, tpaddr);
+  p += emit_str (p, x3, sp, offset_memory_operand (3 * 16));
+
+  /* Save CPSR (NZCV), FPSR and FPCR:
+
+       MRS x2, nzcv
+       MRS x1, fpsr
+       MRS x0, fpcr
+
+       STR x2, [sp, #(2 * 16)]
+       STR x1, [sp, #(1 * 16)]
+       STR x0, [sp, #(0 * 16)]
+
+     */
+  p += emit_mrs (p, x2, NZCV);
+  p += emit_mrs (p, x1, FPSR);
+  p += emit_mrs (p, x0, FPCR);
+  p += emit_str (p, x2, sp, offset_memory_operand (2 * 16));
+  p += emit_str (p, x1, sp, offset_memory_operand (1 * 16));
+  p += emit_str (p, x0, sp, offset_memory_operand (0 * 16));
+
+  /* Push the collecting_t object.  It consist of the address of the
+     tracepoint and an ID for the current thread.  We get the latter by
+     reading the tpidr_el0 system register.  It corresponds to the
+     NT_ARM_TLS register accessible with ptrace.
+
+       MOV x0, #(tpoint)
+       ...
+
+       MRS x1, tpidr_el0
+
+       STP x0, x1, [sp, #-16]!
+
+     */
+
+  p += emit_mov_addr (p, x0, tpoint);
+  p += emit_mrs (p, x1, TPIDR_EL0);
+  p += emit_stp (p, x0, x1, sp, preindex_memory_operand (-16));
+
+  /* Spin-lock:
+
+     The shared memory for the lock is at lockaddr.  It will hold zero
+     if no-one is holding the lock, otherwise it contains the address of
+     the collecting_t object on the stack of the thread which acquired it.
+
+     At this stage, the stack pointer points to this thread's collecting_t
+     object.
+
+     We use the following registers:
+     - x0: Address of the lock.
+     - x1: Pointer to collecting_t object.
+     - x2: Scratch register.
+
+       MOV x0, #(lockaddr)
+       ...
+       MOV x1, sp
+
+       ; Trigger an event local to this core.  So the following WFE
+       ; instruction is ignored.
+       SEVL
+     again:
+       ; Wait for an event.  The event is triggered by either the SEVL
+       ; or STLR instructions (store release).
+       WFE
+
+       ; Atomically read at lockaddr.  This marks the memory location as
+       ; exclusive.  This instruction also has memory constraints which
+       ; make sure all previous data reads and writes are done before
+       ; executing it.
+       LDAXR x2, [x0]
+
+       ; Try again if another thread holds the lock.
+       CBNZ x2, again
+
+       ; We can lock it!  Write the address of the collecting_t object.
+       ; This instruction will fail if the memory location is not marked
+       ; as exclusive anymore.  If it succeeds, it will remove the
+       ; exclusive mark on the memory location.  This way, if another
+       ; thread executes this instruction before us, we will fail and try
+       ; all over again.
+       STXR w2, x1, [x0]
+       CBNZ w2, again
+
+     */
+
+  p += emit_mov_addr (p, x0, lockaddr);
+  p += emit_mov (p, x1, register_operand (sp));
+
+  p += emit_sevl (p);
+  p += emit_wfe (p);
+  p += emit_ldaxr (p, x2, x0);
+  p += emit_cb (p, 1, w2, -2 * 4);
+  p += emit_stxr (p, w2, x1, x0);
+  p += emit_cb (p, 1, x2, -4 * 4);
+
+  /* Call collector (struct tracepoint *, unsigned char *):
+
+       MOV x0, #(tpoint)
+       ...
+
+       ; Saved registers start after the collecting_t object.
+       ADD x1, sp, #16
+
+       ; We use an intra-procedure-call scratch register.
+       MOV ip0, #(collector)
+       ...
+
+       ; And call back to C!
+       BLR ip0
+
+     */
+
+  p += emit_mov_addr (p, x0, tpoint);
+  p += emit_add (p, x1, sp, immediate_operand (16));
+
+  p += emit_mov_addr (p, ip0, collector);
+  p += emit_blr (p, ip0);
+
+  /* Release the lock.
+
+       MOV x0, #(lockaddr)
+       ...
+
+       ; This instruction is a normal store with memory ordering
+       ; constraints.  Thanks to this we do not have to put a data
+       ; barrier instruction to make sure all data read and writes are done
+       ; before this instruction is executed.  Furthermore, this instrucion
+       ; will trigger an event, letting other threads know they can grab
+       ; the lock.
+       STLR xzr, [x0]
+
+     */
+  p += emit_mov_addr (p, x0, lockaddr);
+  p += emit_stlr (p, xzr, x0);
+
+  /* Free collecting_t object:
+
+       ADD sp, sp, #16
+
+     */
+  p += emit_add (p, sp, sp, immediate_operand (16));
+
+  /* Restore CPSR (NZCV), FPSR and FPCR.  And free all special purpose
+     registers from the stack.
+
+       LDR x2, [sp, #(2 * 16)]
+       LDR x1, [sp, #(1 * 16)]
+       LDR x0, [sp, #(0 * 16)]
+
+       MSR NZCV, x2
+       MSR FPSR, x1
+       MSR FPCR, x0
+
+       ADD sp, sp #(5 * 16)
+
+     */
+  p += emit_ldr (p, x2, sp, offset_memory_operand (2 * 16));
+  p += emit_ldr (p, x1, sp, offset_memory_operand (1 * 16));
+  p += emit_ldr (p, x0, sp, offset_memory_operand (0 * 16));
+  p += emit_msr (p, NZCV, x2);
+  p += emit_msr (p, FPSR, x1);
+  p += emit_msr (p, FPCR, x0);
+
+  p += emit_add (p, sp, sp, immediate_operand (5 * 16));
+
+  /* Pop general purpose registers:
+
+       LDR x0, [sp]
+       ...
+       LDR x30, [sp, #(30 * 16)]
+
+       ADD sp, sp, #(31 * 16)
+
+     */
+  for (i = 0; i <= 30; i += 1)
+    p += emit_ldr (p, aarch64_register (i, 1), sp,
+		   offset_memory_operand (i * 16));
+  p += emit_add (p, sp, sp, immediate_operand (31 * 16));
+
+  /* Pop SIMD&FP registers:
+
+       LDP q0, q1, [sp]
+       ...
+       LDP q30, q31, [sp, #(30 * 16)]
+
+       ADD sp, sp, #(32 * 16)
+
+     */
+  for (i = 0; i <= 30; i += 2)
+    p += emit_ldp_q_offset (p, i, i + 1, sp, i * 16);
+  p += emit_add (p, sp, sp, immediate_operand (32 * 16));
+
+  /* Write the code into the inferior memory.  */
+  append_insns (&buildaddr, p - buf, buf);
+
+  /* Now emit the relocated instruction.  */
+  *adjusted_insn_addr = buildaddr;
+  target_read_uint32 (tpaddr, &insn);
+
+  insn_data.base.insn_addr = tpaddr;
+  insn_data.new_addr = buildaddr;
+  insn_data.insn_ptr = buf;
+
+  aarch64_relocate_instruction (insn, &visitor,
+				(struct aarch64_insn_data *) &insn_data);
+
+  /* We may not have been able to relocate the instruction.  */
+  if (insn_data.insn_ptr == buf)
+    {
+      sprintf (err,
+	       "E.Could not relocate instruction from %s to %s.",
+	       core_addr_to_string_nz (tpaddr),
+	       core_addr_to_string_nz (buildaddr));
+      return 1;
+    }
+  else
+    append_insns (&buildaddr, insn_data.insn_ptr - buf, buf);
+  *adjusted_insn_addr_end = buildaddr;
+
+  /* Go back to the start of the buffer.  */
+  p = buf;
+
+  /* Emit a branch back from the jump pad.  */
+  offset = (tpaddr + orig_size - buildaddr);
+  if (!can_encode_int32 (offset, 28))
+    {
+      sprintf (err,
+	       "E.Jump back from jump pad too far from tracepoint "
+	       "(offset 0x%" PRIx64 " cannot be encoded in 28 bits).",
+	       offset);
+      return 1;
+    }
+
+  p += emit_b (p, 0, offset);
+  append_insns (&buildaddr, p - buf, buf);
+
+  /* Give the caller a branch instruction into the jump pad.  */
+  offset = (*jump_entry - tpaddr);
+  if (!can_encode_int32 (offset, 28))
+    {
+      sprintf (err,
+	       "E.Jump pad too far from tracepoint "
+	       "(offset 0x%" PRIx64 " cannot be encoded in 28 bits).",
+	       offset);
+      return 1;
+    }
+
+  emit_b ((uint32_t *) jjump_pad_insn, 0, offset);
+  *jjump_pad_insn_size = 4;
+
+  /* Return the end address of our pad.  */
+  *jump_entry = buildaddr;
+
+  return 0;
+}
+
+/* Helper function writing LEN instructions from START into
+   current_insn_ptr.  */
+
+static void
+emit_ops_insns (const uint32_t *start, int len)
+{
+  CORE_ADDR buildaddr = current_insn_ptr;
+
+  if (debug_threads)
+    debug_printf ("Adding %d instrucions at %s\n",
+		  len, paddress (buildaddr));
+
+  append_insns (&buildaddr, len, start);
+  current_insn_ptr = buildaddr;
+}
+
+/* Pop a register from the stack.  */
+
+static int
+emit_pop (uint32_t *buf, struct aarch64_register rt)
+{
+  return emit_ldr (buf, rt, sp, postindex_memory_operand (1 * 16));
+}
+
+/* Push a register on the stack.  */
+
+static int
+emit_push (uint32_t *buf, struct aarch64_register rt)
+{
+  return emit_str (buf, rt, sp, preindex_memory_operand (-1 * 16));
+}
+
+/* Implementation of emit_ops method "emit_prologue".  */
+
+static void
+aarch64_emit_prologue (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* This function emit a prologue for the following function prototype:
+
+     enum eval_result_type f (unsigned char *regs,
+			      ULONGEST *value);
+
+     The first argument is a buffer of raw registers.  The second
+     argument is the result of
+     evaluating the expression, which will be set to whatever is on top of
+     the stack at the end.
+
+     The stack set up by the prologue is as such:
+
+     High *------------------------------------------------------*
+	  | LR                                                   |
+	  | FP                                                   | <- FP
+	  | x1  (ULONGEST *value)                                |
+	  | x0  (unsigned char *regs)                            |
+     Low  *------------------------------------------------------*
+
+     As we are implementing a stack machine, each opcode can expand the
+     stack so we never know how far we are from the data saved by this
+     prologue.  In order to be able refer to value and regs later, we save
+     the current stack pointer in the frame pointer.  This way, it is not
+     clobbered when calling C functions.
+
+     Finally, throughtout every operation, we are using register x0 as the
+     top of the stack, and x1 as a scratch register.  */
+
+  p += emit_stp (p, x0, x1, sp, preindex_memory_operand (-2 * 16));
+  p += emit_str (p, lr, sp, offset_memory_operand (3 * 8));
+  p += emit_str (p, fp, sp, offset_memory_operand (2 * 8));
+
+  p += emit_add (p, fp, sp, immediate_operand (2 * 8));
+
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_epilogue".  */
+
+static void
+aarch64_emit_epilogue (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* Store the result of the expression (x0) in *value.  */
+  p += emit_sub (p, x1, fp, immediate_operand (1 * 8));
+  p += emit_ldr (p, x1, x1, offset_memory_operand (0));
+  p += emit_str (p, x0, x1, offset_memory_operand (0));
+
+  /* Restore the previous state.  */
+  p += emit_add (p, sp, fp, immediate_operand (2 * 8));
+  p += emit_ldp (p, fp, lr, fp, offset_memory_operand (0));
+
+  /* Return expr_eval_no_error.  */
+  p += emit_mov (p, x0, immediate_operand (expr_eval_no_error));
+  p += emit_ret (p, lr);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_add".  */
+
+static void
+aarch64_emit_add (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_add (p, x0, x1, register_operand (x0));
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_sub".  */
+
+static void
+aarch64_emit_sub (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_sub (p, x0, x1, register_operand (x0));
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_mul".  */
+
+static void
+aarch64_emit_mul (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_mul (p, x0, x1, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_lsh".  */
+
+static void
+aarch64_emit_lsh (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_lslv (p, x0, x1, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_rsh_signed".  */
+
+static void
+aarch64_emit_rsh_signed (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_asrv (p, x0, x1, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_rsh_unsigned".  */
+
+static void
+aarch64_emit_rsh_unsigned (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_lsrv (p, x0, x1, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_ext".  */
+
+static void
+aarch64_emit_ext (int arg)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_sbfx (p, x0, x0, 0, arg);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_log_not".  */
+
+static void
+aarch64_emit_log_not (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* If the top of the stack is 0, replace it with 1.  Else replace it with
+     0.  */
+
+  p += emit_cmp (p, x0, immediate_operand (0));
+  p += emit_cset (p, x0, EQ);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_bit_and".  */
+
+static void
+aarch64_emit_bit_and (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_and (p, x0, x0, x1);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_bit_or".  */
+
+static void
+aarch64_emit_bit_or (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_orr (p, x0, x0, x1);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_bit_xor".  */
+
+static void
+aarch64_emit_bit_xor (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_eor (p, x0, x0, x1);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_bit_not".  */
+
+static void
+aarch64_emit_bit_not (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_mvn (p, x0, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_equal".  */
+
+static void
+aarch64_emit_equal (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x0, register_operand (x1));
+  p += emit_cset (p, x0, EQ);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_less_signed".  */
+
+static void
+aarch64_emit_less_signed (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  p += emit_cset (p, x0, LT);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_less_unsigned".  */
+
+static void
+aarch64_emit_less_unsigned (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  p += emit_cset (p, x0, LO);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_ref".  */
+
+static void
+aarch64_emit_ref (int size)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  switch (size)
+    {
+    case 1:
+      p += emit_ldrb (p, w0, x0, offset_memory_operand (0));
+      break;
+    case 2:
+      p += emit_ldrh (p, w0, x0, offset_memory_operand (0));
+      break;
+    case 4:
+      p += emit_ldr (p, w0, x0, offset_memory_operand (0));
+      break;
+    case 8:
+      p += emit_ldr (p, x0, x0, offset_memory_operand (0));
+      break;
+    default:
+      /* Unknown size, bail on compilation.  */
+      emit_error = 1;
+      break;
+    }
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_if_goto".  */
+
+static void
+aarch64_emit_if_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* The Z flag is set or cleared here.  */
+  p += emit_cmp (p, x0, immediate_operand (0));
+  /* This instruction must not change the Z flag.  */
+  p += emit_pop (p, x0);
+  /* Branch over the next instruction if x0 == 0.  */
+  p += emit_bcond (p, EQ, 8);
+
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_goto".  */
+
+static void
+aarch64_emit_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = 0;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "write_goto_address".  */
+
+void
+aarch64_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
+{
+  uint32_t insn;
+
+  emit_b (&insn, 0, to - from);
+  append_insns (&from, 1, &insn);
+}
+
+/* Implementation of emit_ops method "emit_const".  */
+
+static void
+aarch64_emit_const (LONGEST num)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_mov_addr (p, x0, num);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_call".  */
+
+static void
+aarch64_emit_call (CORE_ADDR fn)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_mov_addr (p, ip0, fn);
+  p += emit_blr (p, ip0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_reg".  */
+
+static void
+aarch64_emit_reg (int reg)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* Set x0 to unsigned char *regs.  */
+  p += emit_sub (p, x0, fp, immediate_operand (2 * 8));
+  p += emit_ldr (p, x0, x0, offset_memory_operand (0));
+  p += emit_mov (p, x1, immediate_operand (reg));
+
+  emit_ops_insns (buf, p - buf);
+
+  aarch64_emit_call (get_raw_reg_func_addr ());
+}
+
+/* Implementation of emit_ops method "emit_pop".  */
+
+static void
+aarch64_emit_pop (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_stack_flush".  */
+
+static void
+aarch64_emit_stack_flush (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_push (p, x0);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_zero_ext".  */
+
+static void
+aarch64_emit_zero_ext (int arg)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_ubfx (p, x0, x0, 0, arg);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_swap".  */
+
+static void
+aarch64_emit_swap (void)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_ldr (p, x1, sp, offset_memory_operand (0 * 16));
+  p += emit_str (p, x0, sp, offset_memory_operand (0 * 16));
+  p += emit_mov (p, x0, register_operand (x1));
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_stack_adjust".  */
+
+static void
+aarch64_emit_stack_adjust (int n)
+{
+  /* This is not needed with our design.  */
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_add (p, sp, sp, immediate_operand (n * 16));
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_int_call_1".  */
+
+static void
+aarch64_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_mov (p, x0, immediate_operand (arg1));
+
+  emit_ops_insns (buf, p - buf);
+
+  aarch64_emit_call (fn);
+}
+
+/* Implementation of emit_ops method "emit_void_call_2".  */
+
+static void
+aarch64_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  /* Push x0 on the stack.  */
+  aarch64_emit_stack_flush ();
+
+  /* Setup arguments for the function call:
+
+     x0: arg1
+     x1: top of the stack
+
+       MOV x1, x0
+       MOV x0, #arg1  */
+
+  p += emit_mov (p, x1, register_operand (x0));
+  p += emit_mov (p, x0, immediate_operand (arg1));
+
+  emit_ops_insns (buf, p - buf);
+
+  aarch64_emit_call (fn);
+
+  /* Restore x0.  */
+  aarch64_emit_pop ();
+}
+
+/* Implementation of emit_ops method "emit_eq_goto".  */
+
+static void
+aarch64_emit_eq_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 != x1.  */
+  p += emit_bcond (p, NE, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_ne_goto".  */
+
+static void
+aarch64_emit_ne_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 == x1.  */
+  p += emit_bcond (p, EQ, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_lt_goto".  */
+
+static void
+aarch64_emit_lt_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 >= x1.  */
+  p += emit_bcond (p, GE, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_le_goto".  */
+
+static void
+aarch64_emit_le_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 > x1.  */
+  p += emit_bcond (p, GT, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_gt_goto".  */
+
+static void
+aarch64_emit_gt_goto (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 <= x1.  */
+  p += emit_bcond (p, LE, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+/* Implementation of emit_ops method "emit_ge_got".  */
+
+static void
+aarch64_emit_ge_got (int *offset_p, int *size_p)
+{
+  uint32_t buf[16];
+  uint32_t *p = buf;
+
+  p += emit_pop (p, x1);
+  p += emit_cmp (p, x1, register_operand (x0));
+  /* Branch over the next instruction if x0 <= x1.  */
+  p += emit_bcond (p, LT, 8);
+  /* The NOP instruction will be patched with an unconditional branch.  */
+  if (offset_p)
+    *offset_p = (p - buf) * 4;
+  if (size_p)
+    *size_p = 4;
+  p += emit_nop (p);
+
+  emit_ops_insns (buf, p - buf);
+}
+
+static struct emit_ops aarch64_emit_ops_impl =
+{
+  aarch64_emit_prologue,
+  aarch64_emit_epilogue,
+  aarch64_emit_add,
+  aarch64_emit_sub,
+  aarch64_emit_mul,
+  aarch64_emit_lsh,
+  aarch64_emit_rsh_signed,
+  aarch64_emit_rsh_unsigned,
+  aarch64_emit_ext,
+  aarch64_emit_log_not,
+  aarch64_emit_bit_and,
+  aarch64_emit_bit_or,
+  aarch64_emit_bit_xor,
+  aarch64_emit_bit_not,
+  aarch64_emit_equal,
+  aarch64_emit_less_signed,
+  aarch64_emit_less_unsigned,
+  aarch64_emit_ref,
+  aarch64_emit_if_goto,
+  aarch64_emit_goto,
+  aarch64_write_goto_address,
+  aarch64_emit_const,
+  aarch64_emit_call,
+  aarch64_emit_reg,
+  aarch64_emit_pop,
+  aarch64_emit_stack_flush,
+  aarch64_emit_zero_ext,
+  aarch64_emit_swap,
+  aarch64_emit_stack_adjust,
+  aarch64_emit_int_call_1,
+  aarch64_emit_void_call_2,
+  aarch64_emit_eq_goto,
+  aarch64_emit_ne_goto,
+  aarch64_emit_lt_goto,
+  aarch64_emit_le_goto,
+  aarch64_emit_gt_goto,
+  aarch64_emit_ge_got,
+};
+
+/* Implementation of linux_target_ops method "emit_ops".  */
+
+static struct emit_ops *
+aarch64_emit_ops (void)
+{
+  return &aarch64_emit_ops_impl;
+}
+
+/* Implementation of linux_target_ops method
+   "get_min_fast_tracepoint_insn_len".  */
+
+static int
+aarch64_get_min_fast_tracepoint_insn_len (void)
+{
+  return 4;
+}
+
+/* Implementation of linux_target_ops method "supports_range_stepping".  */
+
+static int
+aarch64_supports_range_stepping (void)
+{
+  return 1;
+}
+
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+aarch64_sw_breakpoint_from_kind (int kind, int *size)
+{
+  if (is_64bit_tdesc ())
+    {
+      *size = aarch64_breakpoint_len;
+      return aarch64_breakpoint;
+    }
+  else
+    return arm_sw_breakpoint_from_kind (kind, size);
+}
+
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc".  */
+
+static int
+aarch64_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+  if (is_64bit_tdesc ())
+    return aarch64_breakpoint_len;
+  else
+    return arm_breakpoint_kind_from_pc (pcptr);
+}
+
+/* Implementation of the linux_target_ops method
+   "breakpoint_kind_from_current_state".  */
+
+static int
+aarch64_breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
+{
+  if (is_64bit_tdesc ())
+    return aarch64_breakpoint_len;
+  else
+    return arm_breakpoint_kind_from_current_state (pcptr);
+}
+
+/* Support for hardware single step.  */
+
+static int
+aarch64_supports_hardware_single_step (void)
+{
+  return 1;
 }
 
 struct linux_target_ops the_low_target =
@@ -1310,26 +2973,36 @@ struct linux_target_ops the_low_target =
   aarch64_regs_info,
   aarch64_cannot_fetch_register,
   aarch64_cannot_store_register,
-  NULL,
+  NULL, /* fetch_register */
   aarch64_get_pc,
   aarch64_set_pc,
-  (const unsigned char *) &aarch64_breakpoint,
-  aarch64_breakpoint_len,
-  NULL,
-  0,
+  aarch64_breakpoint_kind_from_pc,
+  aarch64_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
+  0,    /* decr_pc_after_break */
   aarch64_breakpoint_at,
   aarch64_supports_z_point_type,
   aarch64_insert_point,
   aarch64_remove_point,
   aarch64_stopped_by_watchpoint,
   aarch64_stopped_data_address,
-  NULL,
-  NULL,
-  NULL,
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  aarch64_linux_siginfo_fixup,
   aarch64_linux_new_process,
   aarch64_linux_new_thread,
   aarch64_linux_new_fork,
   aarch64_linux_prepare_to_resume,
+  NULL, /* process_qsupported */
+  aarch64_supports_tracepoints,
+  aarch64_get_thread_area,
+  aarch64_install_fast_tracepoint_jump_pad,
+  aarch64_emit_ops,
+  aarch64_get_min_fast_tracepoint_insn_len,
+  aarch64_supports_range_stepping,
+  aarch64_breakpoint_kind_from_current_state,
+  aarch64_supports_hardware_single_step,
+  aarch64_get_syscall_trapinfo,
 };
 
 void
@@ -1337,5 +3010,7 @@ initialize_low_arch (void)
 {
   init_registers_aarch64 ();
 
+  initialize_low_arch_aarch32 ();
+
   initialize_regsets_info (&aarch64_regsets_info);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-amd64-ipa.c ./gdb/gdbserver/linux-amd64-ipa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-amd64-ipa.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-amd64-ipa.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* GNU/Linux/x86-64 specific low level interface, for the in-process
    agent library for GDB.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "server.h"
+#include <sys/mman.h>
 #include "tracepoint.h"
+#include "linux-x86-tdesc.h"
 
 /* Defined in auto-generated file amd64-linux.c.  */
 void init_registers_amd64_linux (void);
@@ -68,8 +70,8 @@ supply_fast_tracepoint_registers (struct
 		     ((char *) buf) + x86_64_ft_collect_regmap[i]);
 }
 
-IP_AGENT_EXPORT_FUNC ULONGEST
-gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
+ULONGEST
+get_raw_reg (const unsigned char *raw_regs, int regnum)
 {
   if (regnum >= X86_64_NUM_FT_COLLECT_GREGS)
     return 0;
@@ -166,9 +168,124 @@ supply_static_tracepoint_registers (stru
 
 #endif /* HAVE_UST */
 
+/* Return target_desc to use for IPA, given the tdesc index passed by
+   gdbserver.  */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+#if defined __ILP32__
+  switch (idx)
+    {
+    case X86_TDESC_SSE:
+      return tdesc_x32_linux;
+    case X86_TDESC_AVX:
+      return tdesc_x32_avx_linux;
+    case X86_TDESC_AVX512:
+      return tdesc_x32_avx512_linux;
+    default:
+      break;
+    }
+#else
+  switch (idx)
+    {
+    case X86_TDESC_SSE:
+      return tdesc_amd64_linux;
+    case X86_TDESC_AVX:
+      return tdesc_amd64_avx_linux;
+    case X86_TDESC_MPX:
+      return tdesc_amd64_mpx_linux;
+    case X86_TDESC_AVX_MPX:
+      return tdesc_amd64_avx_mpx_linux;
+    case X86_TDESC_AVX_MPX_AVX512_PKU:
+      return tdesc_amd64_avx_mpx_avx512_pku_linux;
+    case X86_TDESC_AVX_AVX512:
+      return tdesc_amd64_avx_avx512_linux;
+    default:
+      internal_error (__FILE__, __LINE__,
+		      "unknown ipa tdesc index: %d", idx);
+      return tdesc_amd64_linux;
+    }
+#endif
+
+  internal_error (__FILE__, __LINE__,
+		  "unknown ipa tdesc index: %d", idx);
+}
+
+/* Allocate buffer for the jump pads.  The branch instruction has a
+   reach of +/- 31-bit, and the executable is loaded at low addresses.
+
+   64-bit: Use MAP_32BIT to allocate in the first 2GB.  Shared
+   libraries, being allocated at the top, are unfortunately out of
+   luck.
+
+   x32: Since MAP_32BIT is 64-bit only, do the placement manually.
+   Try allocating at '0x80000000 - SIZE' initially, decreasing until
+   we hit a free area.  This ensures the executable is fully covered,
+   and is as close as possible to the shared libraries, which are
+   usually mapped at the top of the first 4GB of the address space.
+*/
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+#if __ILP32__
+  uintptr_t addr;
+  int pagesize;
+
+  pagesize = sysconf (_SC_PAGE_SIZE);
+  if (pagesize == -1)
+    perror_with_name ("sysconf");
+
+  addr = 0x80000000 - size;
+
+  /* size should already be page-aligned, but this can't hurt.  */
+  addr &= ~(pagesize - 1);
+
+  /* Search for a free area.  If we hit 0, we're out of luck.  */
+  for (; addr; addr -= pagesize)
+    {
+      void *res;
+
+      /* No MAP_FIXED - we don't want to zap someone's mapping.  */
+      res = mmap ((void *) addr, size,
+		  PROT_READ | PROT_WRITE | PROT_EXEC,
+		  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+      /* If we got what we wanted, return.  */
+      if ((uintptr_t) res == addr)
+	return res;
+
+      /* If we got a mapping, but at a wrong address, undo it.  */
+      if (res != MAP_FAILED)
+	munmap (res, size);
+    }
+
+  return NULL;
+#else
+  void *res = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
+		    MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
+
+  if (res == MAP_FAILED)
+    return NULL;
+
+  return res;
+#endif
+}
+
 void
 initialize_low_tracepoint (void)
 {
+#if defined __ILP32__
+  init_registers_x32_linux ();
+  init_registers_x32_avx_linux ();
+  init_registers_x32_avx512_linux ();
+#else
   init_registers_amd64_linux ();
-  ipa_tdesc = tdesc_amd64_linux;
+  init_registers_amd64_avx_linux ();
+  init_registers_amd64_mpx_linux ();
+  init_registers_amd64_avx_mpx_linux ();
+  init_registers_amd64_avx_avx512_linux ();
+  init_registers_amd64_avx_mpx_avx512_pku_linux ();
+#endif
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-arm-low.c ./gdb/gdbserver/linux-arm-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-arm-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-arm-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/ARM specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,14 +18,20 @@
 
 #include "server.h"
 #include "linux-low.h"
+#include "arch/arm.h"
+#include "arch/arm-linux.h"
+#include "arch/arm-get-next-pcs.h"
+#include "linux-aarch32-low.h"
 
+#include <sys/uio.h>
 /* Don't include elf.h if linux/elf.h got included by gdb_proc_service.h.
    On Bionic elf.h and linux/elf.h have conflicting definitions.  */
 #ifndef ELFMAG0
 #include <elf.h>
 #endif
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <signal.h>
+#include <sys/syscall.h>
 
 /* Defined in auto-generated files.  */
 void init_registers_arm (void);
@@ -40,9 +46,6 @@ extern const struct target_desc *tdesc_a
 void init_registers_arm_with_vfpv3 (void);
 extern const struct target_desc *tdesc_arm_with_vfpv3;
 
-void init_registers_arm_with_neon (void);
-extern const struct target_desc *tdesc_arm_with_neon;
-
 #ifndef PTRACE_GET_THREAD_AREA
 #define PTRACE_GET_THREAD_AREA 22
 #endif
@@ -116,8 +119,6 @@ struct arch_lwp_info
   CORE_ADDR stopped_data_address;
 };
 
-static unsigned long arm_hwcap;
-
 /* These are in <asm/elf.h> in current kernels.  */
 #define HWCAP_VFP       64
 #define HWCAP_IWMMXT    512
@@ -138,6 +139,27 @@ static int arm_regmap[] = {
   64
 };
 
+/* Forward declarations needed for get_next_pcs ops.  */
+static ULONGEST get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
+							   int len,
+							   int byte_order);
+
+static CORE_ADDR get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
+						CORE_ADDR val);
+
+static CORE_ADDR get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self);
+
+static int get_next_pcs_is_thumb (struct arm_get_next_pcs *self);
+
+/* get_next_pcs operations.  */
+static struct arm_get_next_pcs_ops get_next_pcs_ops = {
+  get_next_pcs_read_memory_unsigned_integer,
+  get_next_pcs_syscall_next_pc,
+  get_next_pcs_addr_bits_remove,
+  get_next_pcs_is_thumb,
+  arm_linux_get_next_pcs_fixup,
+};
+
 static int
 arm_cannot_store_register (int regno)
 {
@@ -151,35 +173,11 @@ arm_cannot_fetch_register (int regno)
 }
 
 static void
-arm_fill_gregset (struct regcache *regcache, void *buf)
-{
-  int i;
-
-  for (i = 0; i < arm_num_regs; i++)
-    if (arm_regmap[i] != -1)
-      collect_register (regcache, i, ((char *) buf) + arm_regmap[i]);
-}
-
-static void
-arm_store_gregset (struct regcache *regcache, const void *buf)
-{
-  int i;
-  char zerobuf[8];
-
-  memset (zerobuf, 0, 8);
-  for (i = 0; i < arm_num_regs; i++)
-    if (arm_regmap[i] != -1)
-      supply_register (regcache, i, ((char *) buf) + arm_regmap[i]);
-    else
-      supply_register (regcache, i, zerobuf);
-}
-
-static void
 arm_fill_wmmxregset (struct regcache *regcache, void *buf)
 {
   int i;
 
-  if (!(arm_hwcap & HWCAP_IWMMXT))
+  if (regcache->tdesc != tdesc_arm_with_iwmmxt)
     return;
 
   for (i = 0; i < 16; i++)
@@ -196,7 +194,7 @@ arm_store_wmmxregset (struct regcache *r
 {
   int i;
 
-  if (!(arm_hwcap & HWCAP_IWMMXT))
+  if (regcache->tdesc != tdesc_arm_with_iwmmxt)
     return;
 
   for (i = 0; i < 16; i++)
@@ -211,130 +209,69 @@ arm_store_wmmxregset (struct regcache *r
 static void
 arm_fill_vfpregset (struct regcache *regcache, void *buf)
 {
-  int i, num, base;
+  int num;
 
-  if (!(arm_hwcap & HWCAP_VFP))
-    return;
-
-  if ((arm_hwcap & (HWCAP_VFPv3 | HWCAP_VFPv3D16)) == HWCAP_VFPv3)
+  if (regcache->tdesc == tdesc_arm_with_neon
+      || regcache->tdesc == tdesc_arm_with_vfpv3)
     num = 32;
-  else
+  else if (regcache->tdesc == tdesc_arm_with_vfpv2)
     num = 16;
+  else
+    return;
 
-  base = find_regno (regcache->tdesc, "d0");
-  for (i = 0; i < num; i++)
-    collect_register (regcache, base + i, (char *) buf + i * 8);
+  arm_fill_vfpregset_num (regcache, buf, num);
+}
 
-  collect_register_by_name (regcache, "fpscr", (char *) buf + 32 * 8);
+/* Wrapper of UNMAKE_THUMB_ADDR for get_next_pcs.  */
+static CORE_ADDR
+get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self, CORE_ADDR val)
+{
+  return UNMAKE_THUMB_ADDR (val);
 }
 
 static void
 arm_store_vfpregset (struct regcache *regcache, const void *buf)
 {
-  int i, num, base;
-
-  if (!(arm_hwcap & HWCAP_VFP))
-    return;
+  int num;
 
-  if ((arm_hwcap & (HWCAP_VFPv3 | HWCAP_VFPv3D16)) == HWCAP_VFPv3)
+  if (regcache->tdesc == tdesc_arm_with_neon
+      || regcache->tdesc == tdesc_arm_with_vfpv3)
     num = 32;
-  else
+  else if (regcache->tdesc == tdesc_arm_with_vfpv2)
     num = 16;
+  else
+    return;
 
-  base = find_regno (regcache->tdesc, "d0");
-  for (i = 0; i < num; i++)
-    supply_register (regcache, base + i, (char *) buf + i * 8);
-
-  supply_register_by_name (regcache, "fpscr", (char *) buf + 32 * 8);
-}
-
-extern int debug_threads;
-
-static CORE_ADDR
-arm_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
+  arm_store_vfpregset_num (regcache, buf, num);
 }
 
-static void
-arm_set_pc (struct regcache *regcache, CORE_ADDR pc)
+/* Wrapper of arm_is_thumb_mode for get_next_pcs.  */
+static int
+get_next_pcs_is_thumb (struct arm_get_next_pcs *self)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  return arm_is_thumb_mode ();
 }
 
-/* Correct in either endianness.  */
-static const unsigned long arm_breakpoint = 0xef9f0001;
-#define arm_breakpoint_len 4
-static const unsigned short thumb_breakpoint = 0xde01;
-static const unsigned short thumb2_breakpoint[] = { 0xf7f0, 0xa000 };
-
-/* For new EABI binaries.  We recognize it regardless of which ABI
-   is used for gdbserver, so single threaded debugging should work
-   OK, but for multi-threaded debugging we only insert the current
-   ABI's breakpoint instruction.  For now at least.  */
-static const unsigned long arm_eabi_breakpoint = 0xe7f001f0;
-
-static int
-arm_breakpoint_at (CORE_ADDR where)
+/* Read memory from the inferiror.
+   BYTE_ORDER is ignored and there to keep compatiblity with GDB's
+   read_memory_unsigned_integer. */
+static ULONGEST
+get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
+					   int len,
+					   int byte_order)
 {
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  unsigned long cpsr;
+  ULONGEST res;
 
-  collect_register_by_name (regcache, "cpsr", &cpsr);
-
-  if (cpsr & 0x20)
-    {
-      /* Thumb mode.  */
-      unsigned short insn;
-
-      (*the_target->read_memory) (where, (unsigned char *) &insn, 2);
-      if (insn == thumb_breakpoint)
-	return 1;
-
-      if (insn == thumb2_breakpoint[0])
-	{
-	  (*the_target->read_memory) (where + 2, (unsigned char *) &insn, 2);
-	  if (insn == thumb2_breakpoint[1])
-	    return 1;
-	}
-    }
-  else
-    {
-      /* ARM mode.  */
-      unsigned long insn;
+  res = 0;
+  target_read_memory (memaddr, (unsigned char *) &res, len);
 
-      (*the_target->read_memory) (where, (unsigned char *) &insn, 4);
-      if (insn == arm_breakpoint)
-	return 1;
-
-      if (insn == arm_eabi_breakpoint)
-	return 1;
-    }
-
-  return 0;
-}
-
-/* We only place breakpoints in empty marker functions, and thread locking
-   is outside of the function.  So rather than importing software single-step,
-   we can just run until exit.  */
-static CORE_ADDR
-arm_reinsert_addr (void)
-{
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  unsigned long pc;
-  collect_register_by_name (regcache, "lr", &pc);
-  return pc;
+  return res;
 }
 
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -441,7 +378,7 @@ arm_linux_hw_breakpoint_equal (const str
 
 /* Convert a raw breakpoint type to an enum arm_hwbp_type.  */
 
-static int
+static arm_hwbp_type
 raw_bkpt_type_to_arm_hwbp_type (enum raw_bkpt_type raw_type)
 {
   switch (raw_type)
@@ -560,6 +497,7 @@ arm_supports_z_point_type (char z_type)
 {
   switch (z_type)
     {
+    case Z_PACKET_SW_BP:
     case Z_PACKET_HW_BP:
     case Z_PACKET_WRITE_WP:
     case Z_PACKET_READ_WP:
@@ -698,7 +636,7 @@ arm_stopped_data_address (void)
 static struct arch_process_info *
 arm_new_process (void)
 {
-  struct arch_process_info *info = xcalloc (1, sizeof (*info));
+  struct arch_process_info *info = XCNEW (struct arch_process_info);
   return info;
 }
 
@@ -706,7 +644,7 @@ arm_new_process (void)
 static void
 arm_new_thread (struct lwp_info *lwp)
 {
-  struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
+  struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
   int i;
 
   for (i = 0; i < MAX_BPTS; i++)
@@ -720,8 +658,8 @@ arm_new_thread (struct lwp_info *lwp)
 static void
 arm_new_fork (struct process_info *parent, struct process_info *child)
 {
-  struct arch_process_info *parent_proc_info = parent->priv->arch_private;
-  struct arch_process_info *child_proc_info = child->priv->arch_private;
+  struct arch_process_info *parent_proc_info;
+  struct arch_process_info *child_proc_info;
   struct lwp_info *child_lwp;
   struct arch_lwp_info *child_lwp_info;
   int i;
@@ -732,6 +670,9 @@ arm_new_fork (struct process_info *paren
   gdb_assert (child->priv != NULL
 	      && child->priv->arch_private != NULL);
 
+  parent_proc_info = parent->priv->arch_private;
+  child_proc_info = child->priv->arch_private;
+
   /* Linux kernel before 2.6.33 commit
      72f674d203cd230426437cdcf7dd6f681dad8b0d
      will inherit hardware debug registers from parent
@@ -811,11 +752,93 @@ arm_prepare_to_resume (struct lwp_info *
       }
 }
 
+/* Find the next pc for a sigreturn or rt_sigreturn syscall.  In
+   addition, set IS_THUMB depending on whether we will return to ARM
+   or Thumb code.
+   See arm-linux.h for stack layout details.  */
+static CORE_ADDR
+arm_sigreturn_next_pc (struct regcache *regcache, int svc_number,
+		       int *is_thumb)
+{
+  unsigned long sp;
+  unsigned long sp_data;
+  /* Offset of PC register.  */
+  int pc_offset = 0;
+  CORE_ADDR next_pc = 0;
+  uint32_t cpsr;
+
+  gdb_assert (svc_number == __NR_sigreturn || svc_number == __NR_rt_sigreturn);
+
+  collect_register_by_name (regcache, "sp", &sp);
+  (*the_target->read_memory) (sp, (unsigned char *) &sp_data, 4);
+
+  pc_offset = arm_linux_sigreturn_next_pc_offset
+    (sp, sp_data, svc_number, __NR_sigreturn == svc_number ? 1 : 0);
+
+  (*the_target->read_memory) (sp + pc_offset, (unsigned char *) &next_pc, 4);
+
+  /* Set IS_THUMB according the CPSR saved on the stack.  */
+  (*the_target->read_memory) (sp + pc_offset + 4, (unsigned char *) &cpsr, 4);
+  *is_thumb = ((cpsr & CPSR_T) != 0);
+
+  return next_pc;
+}
+
+/* When PC is at a syscall instruction, return the PC of the next
+   instruction to be executed.  */
+static CORE_ADDR
+get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
+{
+  CORE_ADDR next_pc = 0;
+  CORE_ADDR pc = regcache_read_pc (self->regcache);
+  int is_thumb = arm_is_thumb_mode ();
+  ULONGEST svc_number = 0;
+  struct regcache *regcache = self->regcache;
+
+  if (is_thumb)
+    {
+      collect_register (regcache, 7, &svc_number);
+      next_pc = pc + 2;
+    }
+  else
+    {
+      unsigned long this_instr;
+      unsigned long svc_operand;
+
+      target_read_memory (pc, (unsigned char *) &this_instr, 4);
+      svc_operand = (0x00ffffff & this_instr);
+
+      if (svc_operand)  /* OABI.  */
+	{
+	  svc_number = svc_operand - 0x900000;
+	}
+      else /* EABI.  */
+	{
+	  collect_register (regcache, 7, &svc_number);
+	}
+
+      next_pc = pc + 4;
+    }
+
+  /* This is a sigreturn or sigreturn_rt syscall.  */
+  if (svc_number == __NR_sigreturn || svc_number == __NR_rt_sigreturn)
+    {
+      /* SIGRETURN or RT_SIGRETURN may affect the arm thumb mode, so
+	 update IS_THUMB.   */
+      next_pc = arm_sigreturn_next_pc (regcache, svc_number, &is_thumb);
+    }
+
+  /* Addresses for calling Thumb functions have the bit 0 set.  */
+  if (is_thumb)
+    next_pc = MAKE_THUMB_ADDR (next_pc);
+
+  return next_pc;
+}
 
 static int
 arm_get_hwcap (unsigned long *valp)
 {
-  unsigned char *data = alloca (8);
+  unsigned char *data = (unsigned char *) alloca (8);
   int offset = 0;
 
   while ((*the_target->read_auxv) (offset, data, 8) == 8)
@@ -838,11 +861,11 @@ static const struct target_desc *
 arm_read_description (void)
 {
   int pid = lwpid_of (current_thread);
+  unsigned long arm_hwcap = 0;
 
   /* Query hardware watchpoint/breakpoint capabilities.  */
   arm_linux_init_hwbp_cap (pid);
 
-  arm_hwcap = 0;
   if (arm_get_hwcap (&arm_hwcap) == 0)
     return tdesc_arm;
 
@@ -866,13 +889,11 @@ arm_read_description (void)
       /* Now make sure that the kernel supports reading these
 	 registers.  Support was added in 2.6.30.  */
       errno = 0;
-      buf = xmalloc (32 * 8 + 4);
+      buf = (char *) xmalloc (32 * 8 + 4);
       if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
 	  && errno == EIO)
-	{
-	  arm_hwcap = 0;
-	  result = tdesc_arm;
-	}
+	result = tdesc_arm;
+
       free (buf);
 
       return result;
@@ -886,9 +907,87 @@ arm_read_description (void)
 static void
 arm_arch_setup (void)
 {
+  int tid = lwpid_of (current_thread);
+  int gpregs[18];
+  struct iovec iov;
+
   current_process ()->tdesc = arm_read_description ();
+
+  iov.iov_base = gpregs;
+  iov.iov_len = sizeof (gpregs);
+
+  /* Check if PTRACE_GETREGSET works.  */
+  if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iov) == 0)
+    have_ptrace_getregset = 1;
+  else
+    have_ptrace_getregset = 0;
+}
+
+/* Fetch the next possible PCs after the current instruction executes.  */
+
+static VEC (CORE_ADDR) *
+arm_gdbserver_get_next_pcs (struct regcache *regcache)
+{
+  struct arm_get_next_pcs next_pcs_ctx;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  arm_get_next_pcs_ctor (&next_pcs_ctx,
+			 &get_next_pcs_ops,
+			 /* Byte order is ignored assumed as host.  */
+			 0,
+			 0,
+			 1,
+			 regcache);
+
+  next_pcs = arm_get_next_pcs (&next_pcs_ctx);
+
+  return next_pcs;
 }
 
+/* Support for hardware single step.  */
+
+static int
+arm_supports_hardware_single_step (void)
+{
+  return 0;
+}
+
+/* Implementation of linux_target_ops method "get_syscall_trapinfo".  */
+
+static void
+arm_get_syscall_trapinfo (struct regcache *regcache, int *sysno)
+{
+  if (arm_is_thumb_mode ())
+    collect_register_by_name (regcache, "r7", sysno);
+  else
+    {
+      unsigned long pc;
+      unsigned long insn;
+
+      collect_register_by_name (regcache, "pc", &pc);
+
+      if ((*the_target->read_memory) (pc - 4, (unsigned char *) &insn, 4))
+	*sysno = UNKNOWN_SYSCALL;
+      else
+	{
+	  unsigned long svc_operand = (0x00ffffff & insn);
+
+	  if (svc_operand)
+	    {
+	      /* OABI */
+	      *sysno = svc_operand - 0x900000;
+	    }
+	  else
+	    {
+	      /* EABI */
+	      collect_register_by_name (regcache, "r7", sysno);
+	    }
+	}
+    }
+}
+
+/* Register sets without using PTRACE_GETREGSET.  */
+
 static struct regset_info arm_regsets[] = {
   { PTRACE_GETREGS, PTRACE_SETREGS, 0, 18 * 4,
     GENERAL_REGS,
@@ -899,7 +998,7 @@ static struct regset_info arm_regsets[] 
   { PTRACE_GETVFPREGS, PTRACE_SETVFPREGS, 0, 32 * 8 + 4,
     EXTENDED_REGS,
     arm_fill_vfpregset, arm_store_vfpregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info arm_regsets_info =
@@ -915,7 +1014,7 @@ static struct usrregs_info arm_usrregs_i
     arm_regmap,
   };
 
-static struct regs_info regs_info =
+static struct regs_info regs_info_arm =
   {
     NULL, /* regset_bitmap */
     &arm_usrregs_info,
@@ -925,7 +1024,13 @@ static struct regs_info regs_info =
 static const struct regs_info *
 arm_regs_info (void)
 {
-  return &regs_info;
+  const struct target_desc *tdesc = current_process ()->tdesc;
+
+  if (have_ptrace_getregset == 1
+      && (tdesc == tdesc_arm_with_neon || tdesc == tdesc_arm_with_vfpv3))
+    return &regs_info_aarch32;
+  else
+    return &regs_info_arm;
 }
 
 struct linux_target_ops the_low_target = {
@@ -934,21 +1039,11 @@ struct linux_target_ops the_low_target =
   arm_cannot_fetch_register,
   arm_cannot_store_register,
   NULL, /* fetch_register */
-  arm_get_pc,
-  arm_set_pc,
-
-  /* Define an ARM-mode breakpoint; we only set breakpoints in the C
-     library, which is most likely to be ARM.  If the kernel supports
-     clone events, we will never insert a breakpoint, so even a Thumb
-     C library will work; so will mixing EABI/non-EABI gdbserver and
-     application.  */
-#ifndef __ARM_EABI__
-  (const unsigned char *) &arm_breakpoint,
-#else
-  (const unsigned char *) &arm_eabi_breakpoint,
-#endif
-  arm_breakpoint_len,
-  arm_reinsert_addr,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  arm_breakpoint_kind_from_pc,
+  arm_sw_breakpoint_from_kind,
+  arm_gdbserver_get_next_pcs,
   0,
   arm_breakpoint_at,
   arm_supports_z_point_type,
@@ -963,6 +1058,16 @@ struct linux_target_ops the_low_target =
   arm_new_thread,
   arm_new_fork,
   arm_prepare_to_resume,
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  arm_breakpoint_kind_from_current_state,
+  arm_supports_hardware_single_step,
+  arm_get_syscall_trapinfo,
 };
 
 void
@@ -973,7 +1078,8 @@ initialize_low_arch (void)
   init_registers_arm_with_iwmmxt ();
   init_registers_arm_with_vfpv2 ();
   init_registers_arm_with_vfpv3 ();
-  init_registers_arm_with_neon ();
+
+  initialize_low_arch_aarch32 ();
 
   initialize_regsets_info (&arm_regsets_info);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-bfin-low.c ./gdb/gdbserver/linux-bfin-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-bfin-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-bfin-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux/BFIN specific low level interface, for the remote server for GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    Contributed by Analog Devices, Inc.
 
@@ -54,27 +54,18 @@ bfin_cannot_fetch_register (int regno)
   return (regno >= bfin_num_regs);
 }
 
-static CORE_ADDR
-bfin_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-
-  collect_register_by_name (regcache, "pc", &pc);
+#define bfin_breakpoint_len 2
+static const gdb_byte bfin_breakpoint[bfin_breakpoint_len] = {0xa1, 0x00};
 
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-bfin_set_pc (struct regcache *regcache, CORE_ADDR pc)
+static const gdb_byte *
+bfin_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = bfin_breakpoint_len;
+  return bfin_breakpoint;
 }
 
-#define bfin_breakpoint_len 2
-static const unsigned char bfin_breakpoint[bfin_breakpoint_len] = {0xa1, 0x00};
-
 static int
 bfin_breakpoint_at (CORE_ADDR where)
 {
@@ -96,6 +87,14 @@ bfin_arch_setup (void)
   current_process ()->tdesc = tdesc_bfin;
 }
 
+/* Support for hardware single step.  */
+
+static int
+bfin_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct usrregs_info bfin_usrregs_info =
   {
     bfin_num_regs,
@@ -120,13 +119,34 @@ struct linux_target_ops the_low_target =
   bfin_cannot_fetch_register,
   bfin_cannot_store_register,
   NULL, /* fetch_register */
-  bfin_get_pc,
-  bfin_set_pc,
-  bfin_breakpoint,
-  bfin_breakpoint_len,
-  NULL, /* breakpoint_reinsert_addr */
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  bfin_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   2,
   bfin_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  bfin_supports_hardware_single_step,
 };
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-cris-low.c ./gdb/gdbserver/linux-cris-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-cris-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-cris-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/CRIS specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,7 +18,7 @@
 
 #include "server.h"
 #include "linux-low.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 /* Defined in auto-generated file reg-cris.c.  */
 void init_registers_cris (void);
@@ -59,28 +59,18 @@ cris_cannot_fetch_register (int regno)
   return (regno >= cris_num_regs);
 }
 
-extern int debug_threads;
+static const unsigned short cris_breakpoint = 0xe938;
+#define cris_breakpoint_len 2
 
-static CORE_ADDR
-cris_get_pc (struct regcache *regcache, void)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-cris_set_pc (struct regcache *regcache, CORE_ADDR pc)
+static const gdb_byte *
+cris_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = cris_breakpoint_len;
+  return (const gdb_byte *) &cris_breakpoint;
 }
 
-static const unsigned short cris_breakpoint = 0xe938;
-#define cris_breakpoint_len 2
-
 static int
 cris_breakpoint_at (CORE_ADDR where)
 {
@@ -96,18 +86,6 @@ cris_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
-/* We only place breakpoints in empty marker functions, and thread locking
-   is outside of the function.  So rather than importing software single-step,
-   we can just run until exit.  */
-static CORE_ADDR
-cris_reinsert_addr (void)
-{
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  unsigned long pc;
-  collect_register_by_name (regcache, "srp", &pc);
-  return pc;
-}
-
 static void
 cris_arch_setup (void)
 {
@@ -138,17 +116,13 @@ struct linux_target_ops the_low_target =
   cris_cannot_fetch_register,
   cris_cannot_store_register,
   NULL, /* fetch_register */
-  cris_get_pc,
-  cris_set_pc,
-  (const unsigned char *) &cris_breakpoint,
-  cris_breakpoint_len,
-  cris_reinsert_addr,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  cris_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   0,
   cris_breakpoint_at,
-  0,
-  0,
-  0,
-  0,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-crisv32-low.c ./gdb/gdbserver/linux-crisv32-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-crisv32-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-crisv32-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/CRIS specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,7 +18,7 @@
 
 #include "server.h"
 #include "linux-low.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 /* Defined in auto-generated file reg-crisv32.c.  */
 void init_registers_crisv32 (void);
@@ -55,28 +55,18 @@ static int cris_regmap[] = {
 
 };
 
-extern int debug_threads;
+static const unsigned short cris_breakpoint = 0xe938;
+#define cris_breakpoint_len 2
 
-static CORE_ADDR
-cris_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-cris_set_pc (struct regcache *regcache, CORE_ADDR pc)
+static const gdb_byte *
+cris_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = cris_breakpoint_len;
+  return (const gdb_byte *) &cris_breakpoint;
 }
 
-static const unsigned short cris_breakpoint = 0xe938;
-#define cris_breakpoint_len 2
-
 static int
 cris_breakpoint_at (CORE_ADDR where)
 {
@@ -92,23 +82,6 @@ cris_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
-/* We only place breakpoints in empty marker functions, and thread locking
-   is outside of the function.  So rather than importing software single-step,
-   we can just run until exit.  */
-
-/* FIXME: This function should not be needed, since we have PTRACE_SINGLESTEP
-   for CRISv32.  Without it, td_ta_event_getmsg in thread_db_create_event
-   will fail when debugging multi-threaded applications.  */
-
-static CORE_ADDR
-cris_reinsert_addr (void)
-{
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  unsigned long pc;
-  collect_register_by_name (regcache, "srp", &pc);
-  return pc;
-}
-
 static void
 cris_write_data_breakpoint (struct regcache *regcache,
 			    int bp, unsigned long start, unsigned long end)
@@ -336,7 +309,7 @@ cris_stopped_data_address (void)
 }
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
                     lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -379,10 +352,18 @@ cris_arch_setup (void)
   current_process ()->tdesc = tdesc_crisv32;
 }
 
+/* Support for hardware single step.  */
+
+static int
+cris_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct regset_info cris_regsets[] = {
   { PTRACE_GETREGS, PTRACE_SETREGS, 0, cris_num_regs * 4,
     GENERAL_REGS, cris_fill_gregset, cris_store_gregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 
@@ -418,11 +399,11 @@ struct linux_target_ops the_low_target =
   NULL,
   NULL,
   NULL, /* fetch_register */
-  cris_get_pc,
-  cris_set_pc,
-  (const unsigned char *) &cris_breakpoint,
-  cris_breakpoint_len,
-  cris_reinsert_addr,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  cris_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   0,
   cris_breakpoint_at,
   cris_supports_z_point_type,
@@ -430,6 +411,22 @@ struct linux_target_ops the_low_target =
   cris_remove_point,
   cris_stopped_by_watchpoint,
   cris_stopped_data_address,
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  cris_supports_hardware_single_step,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-i386-ipa.c ./gdb/gdbserver/linux-i386-ipa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-i386-ipa.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-i386-ipa.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* GNU/Linux/x86 specific low level interface, for the in-process
    agent library for GDB.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 #include "server.h"
 #include <sys/mman.h>
 #include "tracepoint.h"
+#include "linux-x86-tdesc.h"
 
 /* GDB register numbers.  */
 
@@ -47,10 +48,6 @@ enum i386_gdb_regnum
 
 #define i386_num_regs 16
 
-/* Defined in auto-generated file i386-linux.c.  */
-void init_registers_i386_linux (void);
-extern const struct target_desc *tdesc_i386_linux;
-
 #define FT_CR_EAX 15
 #define FT_CR_ECX 14
 #define FT_CR_EDX 13
@@ -98,8 +95,8 @@ supply_fast_tracepoint_registers (struct
     }
 }
 
-IP_AGENT_EXPORT_FUNC ULONGEST
-gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
+ULONGEST
+get_raw_reg (const unsigned char *raw_regs, int regnum)
 {
   /* This should maybe be allowed to return an error code, or perhaps
      better, have the emit_reg detect this, and emit a constant zero,
@@ -247,10 +244,59 @@ initialize_fast_tracepoint_trampoline_bu
     }
 }
 
+/* Return target_desc to use for IPA, given the tdesc index passed by
+   gdbserver.  */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+  switch (idx)
+    {
+    case X86_TDESC_MMX:
+      return tdesc_i386_mmx_linux;
+    case X86_TDESC_SSE:
+      return tdesc_i386_linux;
+    case X86_TDESC_AVX:
+      return tdesc_i386_avx_linux;
+    case X86_TDESC_MPX:
+      return tdesc_i386_mpx_linux;
+    case X86_TDESC_AVX_MPX:
+      return tdesc_i386_avx_mpx_linux;
+    case X86_TDESC_AVX_AVX512:
+      return tdesc_i386_avx_avx512_linux;
+    case X86_TDESC_AVX_MPX_AVX512_PKU:
+      return tdesc_i386_avx_mpx_avx512_pku_linux;
+    default:
+      internal_error (__FILE__, __LINE__,
+		      "unknown ipa tdesc index: %d", idx);
+      return tdesc_i386_linux;
+    }
+}
+
+/* Allocate buffer for the jump pads.  On i386, we can reach an arbitrary
+   address with a jump instruction, so just allocate normally.  */
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+  void *res = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
+		    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+  if (res == MAP_FAILED)
+    return NULL;
+
+  return res;
+}
+
 void
 initialize_low_tracepoint (void)
 {
+  init_registers_i386_mmx_linux ();
   init_registers_i386_linux ();
-  ipa_tdesc = tdesc_i386_linux;
+  init_registers_i386_avx_linux ();
+  init_registers_i386_mpx_linux ();
+  init_registers_i386_avx_avx512_linux ();
+  init_registers_i386_avx_mpx_avx512_pku_linux ();
+
   initialize_fast_tracepoint_trampoline_buffer ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ia64-low.c ./gdb/gdbserver/linux-ia64-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ia64-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-ia64-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/IA64 specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-low.c ./gdb/gdbserver/linux-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level interface to ptrace, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,11 +22,11 @@
 #include "agent.h"
 #include "tdesc.h"
 #include "rsp-low.h"
-
+#include "signals-state-save-restore.h"
 #include "nat/linux-nat.h"
 #include "nat/linux-waitpid.h"
 #include "gdb_wait.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include "nat/linux-ptrace.h"
 #include "nat/linux-procfs.h"
 #include "nat/linux-personality.h"
@@ -46,6 +46,7 @@
 #include "filestuff.h"
 #include "tracepoint.h"
 #include "hostio.h"
+#include <inttypes.h>
 #ifndef ELFMAG0
 /* Don't include <linux/elf.h> here.  If it got included by gdb_proc_service.h
    then ELFMAG0 will have been defined.  If it didn't get included by
@@ -70,16 +71,6 @@
 #define O_LARGEFILE 0
 #endif
 
-#ifndef W_STOPCODE
-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-#endif
-
-/* This is the kernel's hard limit.  Not to be confused with
-   SIGRTMIN.  */
-#ifndef __SIGRTMIN
-#define __SIGRTMIN 32
-#endif
-
 /* Some targets did not define these ptrace constants from the start,
    so gdbserver defines them locally here.  In the future, these may
    be removed after they are added to asm/ptrace.h.  */
@@ -139,6 +130,9 @@ typedef struct
 } Elf64_auxv_t;
 #endif
 
+/* Does the current host support PTRACE_GETREGSET?  */
+int have_ptrace_getregset = -1;
+
 /* LWP accessors.  */
 
 /* See nat/linux-nat.h.  */
@@ -182,6 +176,14 @@ lwp_stop_reason (struct lwp_info *lwp)
   return lwp->stop_reason;
 }
 
+/* See nat/linux-nat.h.  */
+
+int
+lwp_is_stepping (struct lwp_info *lwp)
+{
+  return lwp->stepping;
+}
+
 /* A list of all unknown processes which receive stop signals.  Some
    other process will presumably claim each of these as forked
    children momentarily.  */
@@ -205,7 +207,7 @@ struct simple_pid_list *stopped_pids;
 static void
 add_to_pid_list (struct simple_pid_list **listp, int pid, int status)
 {
-  struct simple_pid_list *new_pid = xmalloc (sizeof (struct simple_pid_list));
+  struct simple_pid_list *new_pid = XNEW (struct simple_pid_list);
 
   new_pid->pid = pid;
   new_pid->status = status;
@@ -258,27 +260,46 @@ static void linux_resume_one_lwp (struct
 static void linux_resume (struct thread_resume *resume_info, size_t n);
 static void stop_all_lwps (int suspend, struct lwp_info *except);
 static void unstop_all_lwps (int unsuspend, struct lwp_info *except);
+static void unsuspend_all_lwps (struct lwp_info *except);
 static int linux_wait_for_event_filtered (ptid_t wait_ptid, ptid_t filter_ptid,
 					  int *wstat, int options);
 static int linux_wait_for_event (ptid_t ptid, int *wstat, int options);
 static struct lwp_info *add_lwp (ptid_t ptid);
+static void linux_mourn (struct process_info *process);
 static int linux_stopped_by_watchpoint (void);
 static void mark_lwp_dead (struct lwp_info *lwp, int wstat);
+static int lwp_is_marked_dead (struct lwp_info *lwp);
 static void proceed_all_lwps (void);
 static int finish_step_over (struct lwp_info *lwp);
 static int kill_lwp (unsigned long lwpid, int signo);
+static void enqueue_pending_signal (struct lwp_info *lwp, int signal, siginfo_t *info);
+static void complete_ongoing_step_over (void);
+static int linux_low_ptrace_options (int attached);
+static int check_ptrace_stopped_lwp_gone (struct lwp_info *lp);
+static int proceed_one_lwp (struct inferior_list_entry *entry, void *except);
 
 /* When the event-loop is doing a step-over, this points at the thread
    being stepped.  */
 ptid_t step_over_bkpt;
 
-/* True if the low target can hardware single-step.  Such targets
-   don't need a BREAKPOINT_REINSERT_ADDR callback.  */
+/* True if the low target can hardware single-step.  */
 
 static int
 can_hardware_single_step (void)
 {
-  return (the_low_target.breakpoint_reinsert_addr == NULL);
+  if (the_low_target.supports_hardware_single_step != NULL)
+    return the_low_target.supports_hardware_single_step ();
+  else
+    return 0;
+}
+
+/* True if the low target can software single-step.  Such targets
+   implement the GET_NEXT_PCS callback.  */
+
+static int
+can_software_single_step (void)
+{
+  return (the_low_target.get_next_pcs != NULL);
 }
 
 /* True if the low target supports memory breakpoints.  If so, we'll
@@ -403,10 +424,7 @@ linux_add_process (int pid, int attached
   struct process_info *proc;
 
   proc = add_process (pid, attached);
-  proc->priv = xcalloc (1, sizeof (*proc->priv));
-
-  /* Set the arch when the first LWP stops.  */
-  proc->priv->new_inferior = 1;
+  proc->priv = XCNEW (struct process_info_private);
 
   if (the_low_target.new_process != NULL)
     proc->priv->arch_private = the_low_target.new_process ();
@@ -416,17 +434,50 @@ linux_add_process (int pid, int attached
 
 static CORE_ADDR get_pc (struct lwp_info *lwp);
 
-/* Handle a GNU/Linux extended wait response.  If we see a clone
-   event, we need to add the new LWP to our list (and return 0 so as
-   not to report the trap to higher layers).  */
+/* Call the target arch_setup function on the current thread.  */
+
+static void
+linux_arch_setup (void)
+{
+  the_low_target.arch_setup ();
+}
+
+/* Call the target arch_setup function on THREAD.  */
+
+static void
+linux_arch_setup_thread (struct thread_info *thread)
+{
+  struct thread_info *saved_thread;
+
+  saved_thread = current_thread;
+  current_thread = thread;
+
+  linux_arch_setup ();
+
+  current_thread = saved_thread;
+}
+
+/* Handle a GNU/Linux extended wait response.  If we see a clone,
+   fork, or vfork event, we need to add the new LWP to our list
+   (and return 0 so as not to report the trap to higher layers).
+   If we see an exec event, we will modify ORIG_EVENT_LWP to point
+   to a new LWP representing the new program.  */
 
 static int
-handle_extended_wait (struct lwp_info *event_lwp, int wstat)
+handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
 {
+  struct lwp_info *event_lwp = *orig_event_lwp;
   int event = linux_ptrace_get_extended_event (wstat);
   struct thread_info *event_thr = get_lwp_thread (event_lwp);
   struct lwp_info *new_lwp;
 
+  gdb_assert (event_lwp->waitstatus.kind == TARGET_WAITKIND_IGNORE);
+
+  /* All extended events we currently use are mid-syscall.  Only
+     PTRACE_EVENT_STOP is delivered more like a signal-stop, but
+     you have to be using PTRACE_SEIZE to get that.  */
+  event_lwp->syscall_state = TARGET_WAITKIND_SYSCALL_ENTRY;
+
   if ((event == PTRACE_EVENT_FORK) || (event == PTRACE_EVENT_VFORK)
       || (event == PTRACE_EVENT_CLONE))
     {
@@ -486,13 +537,37 @@ handle_extended_wait (struct lwp_info *e
 	  child_lwp->status_pending_p = 0;
 	  child_thr = get_lwp_thread (child_lwp);
 	  child_thr->last_resume_kind = resume_stop;
+	  child_thr->last_status.kind = TARGET_WAITKIND_STOPPED;
+
+	  /* If we're suspending all threads, leave this one suspended
+	     too.  If the fork/clone parent is stepping over a breakpoint,
+	     all other threads have been suspended already.  Leave the
+	     child suspended too.  */
+	  if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS
+	      || event_lwp->bp_reinsert != 0)
+	    {
+	      if (debug_threads)
+		debug_printf ("HEW: leaving child suspended\n");
+	      child_lwp->suspended = 1;
+	    }
+
 	  parent_proc = get_thread_process (event_thr);
 	  child_proc->attached = parent_proc->attached;
-	  clone_all_breakpoints (&child_proc->breakpoints,
-				 &child_proc->raw_breakpoints,
-				 parent_proc->breakpoints);
 
-	  tdesc = xmalloc (sizeof (struct target_desc));
+	  if (event_lwp->bp_reinsert != 0
+	      && can_software_single_step ()
+	      && event == PTRACE_EVENT_VFORK)
+	    {
+	      /* If we leave single-step breakpoints there, child will
+		 hit it, so uninsert single-step breakpoints from parent
+		 (and child).  Once vfork child is done, reinsert
+		 them back to parent.  */
+	      uninsert_single_step_breakpoints (event_thr);
+	    }
+
+	  clone_all_breakpoints (child_thr, event_thr);
+
+	  tdesc = XNEW (struct target_desc);
 	  copy_target_description (tdesc, parent_proc->tdesc);
 	  child_proc->tdesc = tdesc;
 
@@ -514,6 +589,28 @@ handle_extended_wait (struct lwp_info *e
 	  event_lwp->status_pending_p = 1;
 	  event_lwp->status_pending = wstat;
 
+	  /* Link the threads until the parent event is passed on to
+	     higher layers.  */
+	  event_lwp->fork_relative = child_lwp;
+	  child_lwp->fork_relative = event_lwp;
+
+	  /* If the parent thread is doing step-over with single-step
+	     breakpoints, the list of single-step breakpoints are cloned
+	     from the parent's.  Remove them from the child process.
+	     In case of vfork, we'll reinsert them back once vforked
+	     child is done.  */
+	  if (event_lwp->bp_reinsert != 0
+	      && can_software_single_step ())
+	    {
+	      /* The child process is forked and stopped, so it is safe
+		 to access its memory without stopping all other threads
+		 from other processes.  */
+	      delete_single_step_breakpoints (child_thr);
+
+	      gdb_assert (has_single_step_breakpoints (event_thr));
+	      gdb_assert (!has_single_step_breakpoints (child_thr));
+	    }
+
 	  /* Report the event.  */
 	  return 0;
 	}
@@ -532,9 +629,12 @@ handle_extended_wait (struct lwp_info *e
 	 before calling linux_resume_one_lwp.  */
       new_lwp->stopped = 1;
 
-     /* If we're suspending all threads, leave this one suspended
-	too.  */
-      if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS)
+      /* If we're suspending all threads, leave this one suspended
+	 too.  If the fork/clone parent is stepping over a breakpoint,
+	 all other threads have been suspended already.  Leave the
+	 child suspended too.  */
+      if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS
+	  || event_lwp->bp_reinsert != 0)
 	new_lwp->suspended = 1;
 
       /* Normally we will get the pending SIGSTOP.  But in some cases
@@ -546,6 +646,12 @@ handle_extended_wait (struct lwp_info *e
 	  new_lwp->status_pending_p = 1;
 	  new_lwp->status_pending = status;
 	}
+      else if (report_thread_events)
+	{
+	  new_lwp->waitstatus.kind = TARGET_WAITKIND_THREAD_CREATED;
+	  new_lwp->status_pending_p = 1;
+	  new_lwp->status_pending = status;
+	}
 
       /* Don't report the event.  */
       return 1;
@@ -554,7 +660,71 @@ handle_extended_wait (struct lwp_info *e
     {
       event_lwp->waitstatus.kind = TARGET_WAITKIND_VFORK_DONE;
 
+      if (event_lwp->bp_reinsert != 0 && can_software_single_step ())
+	{
+	  reinsert_single_step_breakpoints (event_thr);
+
+	  gdb_assert (has_single_step_breakpoints (event_thr));
+	}
+
+      /* Report the event.  */
+      return 0;
+    }
+  else if (event == PTRACE_EVENT_EXEC && report_exec_events)
+    {
+      struct process_info *proc;
+      VEC (int) *syscalls_to_catch;
+      ptid_t event_ptid;
+      pid_t event_pid;
+
+      if (debug_threads)
+	{
+	  debug_printf ("HEW: Got exec event from LWP %ld\n",
+			lwpid_of (event_thr));
+	}
+
+      /* Get the event ptid.  */
+      event_ptid = ptid_of (event_thr);
+      event_pid = ptid_get_pid (event_ptid);
+
+      /* Save the syscall list from the execing process.  */
+      proc = get_thread_process (event_thr);
+      syscalls_to_catch = proc->syscalls_to_catch;
+      proc->syscalls_to_catch = NULL;
+
+      /* Delete the execing process and all its threads.  */
+      linux_mourn (proc);
+      current_thread = NULL;
+
+      /* Create a new process/lwp/thread.  */
+      proc = linux_add_process (event_pid, 0);
+      event_lwp = add_lwp (event_ptid);
+      event_thr = get_lwp_thread (event_lwp);
+      gdb_assert (current_thread == event_thr);
+      linux_arch_setup_thread (event_thr);
+
+      /* Set the event status.  */
+      event_lwp->waitstatus.kind = TARGET_WAITKIND_EXECD;
+      event_lwp->waitstatus.value.execd_pathname
+	= xstrdup (linux_proc_pid_to_exec_file (lwpid_of (event_thr)));
+
+      /* Mark the exec status as pending.  */
+      event_lwp->stopped = 1;
+      event_lwp->status_pending_p = 1;
+      event_lwp->status_pending = wstat;
+      event_thr->last_resume_kind = resume_continue;
+      event_thr->last_status.kind = TARGET_WAITKIND_IGNORE;
+
+      /* Update syscall state in the new lwp, effectively mid-syscall too.  */
+      event_lwp->syscall_state = TARGET_WAITKIND_SYSCALL_ENTRY;
+
+      /* Restore the list to catch.  Don't rely on the client, which is free
+	 to avoid sending a new list when the architecture doesn't change.
+	 Also, for ANY_SYSCALL, the architecture doesn't really matter.  */
+      proc->syscalls_to_catch = syscalls_to_catch;
+
       /* Report the event.  */
+      *orig_event_lwp = event_lwp;
       return 0;
     }
 
@@ -587,32 +757,45 @@ get_pc (struct lwp_info *lwp)
   return pc;
 }
 
-/* This function should only be called if LWP got a SIGTRAP.
-   The SIGTRAP could mean several things.
+/* This function should only be called if LWP got a SYSCALL_SIGTRAP.
+   Fill *SYSNO with the syscall nr trapped.  */
+
+static void
+get_syscall_trapinfo (struct lwp_info *lwp, int *sysno)
+{
+  struct thread_info *saved_thread;
+  struct regcache *regcache;
+
+  if (the_low_target.get_syscall_trapinfo == NULL)
+    {
+      /* If we cannot get the syscall trapinfo, report an unknown
+	 system call number.  */
+      *sysno = UNKNOWN_SYSCALL;
+      return;
+    }
+
+  saved_thread = current_thread;
+  current_thread = get_lwp_thread (lwp);
 
-   On i386, where decr_pc_after_break is non-zero:
+  regcache = get_thread_regcache (current_thread, 1);
+  (*the_low_target.get_syscall_trapinfo) (regcache, sysno);
 
-   If we were single-stepping this process using PTRACE_SINGLESTEP, we
-   will get only the one SIGTRAP.  The value of $eip will be the next
-   instruction.  If the instruction we stepped over was a breakpoint,
-   we need to decrement the PC.
+  if (debug_threads)
+    debug_printf ("get_syscall_trapinfo sysno %d\n", *sysno);
 
-   If we continue the process using PTRACE_CONT, we will get a
-   SIGTRAP when we hit a breakpoint.  The value of $eip will be
-   the instruction after the breakpoint (i.e. needs to be
-   decremented).  If we report the SIGTRAP to GDB, we must also
-   report the undecremented PC.  If the breakpoint is removed, we
-   must resume at the decremented PC.
+  current_thread = saved_thread;
+}
 
-   On a non-decr_pc_after_break machine with hardware or kernel
-   single-step:
+static int check_stopped_by_watchpoint (struct lwp_info *child);
 
-   If we either single-step a breakpoint instruction, or continue and
-   hit a breakpoint instruction, our PC will point at the breakpoint
-   instruction.  */
+/* Called when the LWP stopped for a signal/trap.  If it stopped for a
+   trap check what caused it (breakpoint, watchpoint, trace, etc.),
+   and save the result in the LWP's stop_reason field.  If it stopped
+   for a breakpoint, decrement the PC if necessary on the lwp's
+   architecture.  Returns true if we now have the LWP's stop PC.  */
 
 static int
-check_stopped_by_breakpoint (struct lwp_info *lwp)
+save_stop_reason (struct lwp_info *lwp)
 {
   CORE_ADDR pc;
   CORE_ADDR sw_breakpoint_pc;
@@ -637,54 +820,39 @@ check_stopped_by_breakpoint (struct lwp_
     {
       if (siginfo.si_signo == SIGTRAP)
 	{
-	  if (siginfo.si_code == GDB_ARCH_TRAP_BRKPT)
+	  if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code)
+	      && GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
 	    {
-	      if (debug_threads)
-		{
-		  struct thread_info *thr = get_lwp_thread (lwp);
-
-		  debug_printf ("CSBB: %s stopped by software breakpoint\n",
-				target_pid_to_str (ptid_of (thr)));
-		}
-
-	      /* Back up the PC if necessary.  */
-	      if (pc != sw_breakpoint_pc)
-		{
-		  struct regcache *regcache
-		    = get_thread_regcache (current_thread, 1);
-		  (*the_low_target.set_pc) (regcache, sw_breakpoint_pc);
-		}
-
-	      lwp->stop_pc = sw_breakpoint_pc;
+	      /* The si_code is ambiguous on this arch -- check debug
+		 registers.  */
+	      if (!check_stopped_by_watchpoint (lwp))
+		lwp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
+	    }
+	  else if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code))
+	    {
+	      /* If we determine the LWP stopped for a SW breakpoint,
+		 trust it.  Particularly don't check watchpoint
+		 registers, because at least on s390, we'd find
+		 stopped-by-watchpoint as long as there's a watchpoint
+		 set.  */
 	      lwp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
-	      current_thread = saved_thread;
-	      return 1;
 	    }
-	  else if (siginfo.si_code == TRAP_HWBKPT)
+	  else if (GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
 	    {
-	      if (debug_threads)
-		{
-		  struct thread_info *thr = get_lwp_thread (lwp);
-
-		  debug_printf ("CSBB: %s stopped by hardware "
-				"breakpoint/watchpoint\n",
-				target_pid_to_str (ptid_of (thr)));
-		}
-
-	      lwp->stop_pc = pc;
-	      lwp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
-	      current_thread = saved_thread;
-	      return 1;
+	      /* This can indicate either a hardware breakpoint or
+		 hardware watchpoint.  Check debug registers.  */
+	      if (!check_stopped_by_watchpoint (lwp))
+		lwp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
 	    }
 	  else if (siginfo.si_code == TRAP_TRACE)
 	    {
-	      if (debug_threads)
-		{
-		  struct thread_info *thr = get_lwp_thread (lwp);
-
-		  debug_printf ("CSBB: %s stopped by trace\n",
-				target_pid_to_str (ptid_of (thr)));
-		}
+	      /* We may have single stepped an instruction that
+		 triggered a watchpoint.  In that case, on some
+		 architectures (such as x86), instead of TRAP_HWBKPT,
+		 si_code indicates TRAP_TRACE, and we need to check
+		 the debug registers separately.  */
+	      if (!check_stopped_by_watchpoint (lwp))
+		lwp->stop_reason = TARGET_STOPPED_BY_SINGLE_STEP;
 	    }
 	}
     }
@@ -695,6 +863,16 @@ check_stopped_by_breakpoint (struct lwp_
      case we need to report the breakpoint PC.  */
   if ((!lwp->stepping || lwp->stop_pc == sw_breakpoint_pc)
       && (*the_low_target.breakpoint_at) (sw_breakpoint_pc))
+    lwp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
+
+  if (hardware_breakpoint_inserted_here (pc))
+    lwp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
+
+  if (lwp->stop_reason == TARGET_STOPPED_BY_NO_REASON)
+    check_stopped_by_watchpoint (lwp);
+#endif
+
+  if (lwp->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT)
     {
       if (debug_threads)
 	{
@@ -706,19 +884,16 @@ check_stopped_by_breakpoint (struct lwp_
 
       /* Back up the PC if necessary.  */
       if (pc != sw_breakpoint_pc)
-        {
+	{
 	  struct regcache *regcache
 	    = get_thread_regcache (current_thread, 1);
 	  (*the_low_target.set_pc) (regcache, sw_breakpoint_pc);
 	}
 
-      lwp->stop_pc = sw_breakpoint_pc;
-      lwp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
-      current_thread = saved_thread;
-      return 1;
+      /* Update this so we record the correct stop PC below.  */
+      pc = sw_breakpoint_pc;
     }
-
-  if (hardware_breakpoint_inserted_here (pc))
+  else if (lwp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
     {
       if (debug_threads)
 	{
@@ -727,16 +902,31 @@ check_stopped_by_breakpoint (struct lwp_
 	  debug_printf ("CSBB: %s stopped by hardware breakpoint\n",
 			target_pid_to_str (ptid_of (thr)));
 	}
+    }
+  else if (lwp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT)
+    {
+      if (debug_threads)
+	{
+	  struct thread_info *thr = get_lwp_thread (lwp);
 
-      lwp->stop_pc = pc;
-      lwp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
-      current_thread = saved_thread;
-      return 1;
+	  debug_printf ("CSBB: %s stopped by hardware watchpoint\n",
+			target_pid_to_str (ptid_of (thr)));
+	}
+    }
+  else if (lwp->stop_reason == TARGET_STOPPED_BY_SINGLE_STEP)
+    {
+      if (debug_threads)
+	{
+	  struct thread_info *thr = get_lwp_thread (lwp);
+
+	  debug_printf ("CSBB: %s stopped by trace\n",
+			target_pid_to_str (ptid_of (thr)));
+	}
     }
-#endif
 
+  lwp->stop_pc = pc;
   current_thread = saved_thread;
-  return 0;
+  return 1;
 }
 
 static struct lwp_info *
@@ -744,8 +934,9 @@ add_lwp (ptid_t ptid)
 {
   struct lwp_info *lwp;
 
-  lwp = (struct lwp_info *) xmalloc (sizeof (*lwp));
-  memset (lwp, 0, sizeof (*lwp));
+  lwp = XCNEW (struct lwp_info);
+
+  lwp->waitstatus.kind = TARGET_WAITKIND_IGNORE;
 
   if (the_low_target.new_thread != NULL)
     the_low_target.new_thread (lwp);
@@ -780,10 +971,6 @@ linux_create_inferior (char *program, ch
       close_most_fds ();
       ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
 
-#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does.  */
-      signal (__SIGRTMIN + 1, SIG_DFL);
-#endif
-
       setpgid (0, 0);
 
       /* If gdbserver is connected to gdb via stdio, redirect the inferior's
@@ -801,6 +988,8 @@ linux_create_inferior (char *program, ch
 	    }
 	}
 
+      restore_original_signals_state ();
+
       execv (program, allargs);
       if (errno == ENOENT)
 	execvp (program, allargs);
@@ -822,6 +1011,25 @@ linux_create_inferior (char *program, ch
   return pid;
 }
 
+/* Implement the post_create_inferior target_ops method.  */
+
+static void
+linux_post_create_inferior (void)
+{
+  struct lwp_info *lwp = get_thread_lwp (current_thread);
+
+  linux_arch_setup ();
+
+  if (lwp->must_set_ptrace_flags)
+    {
+      struct process_info *proc = current_process ();
+      int options = linux_low_ptrace_options (proc->attached);
+
+      linux_enable_event_reporting (lwpid_of (current_thread), options);
+      lwp->must_set_ptrace_flags = 0;
+    }
+}
+
 /* Attach to an inferior process.  Returns 0 on success, ERRNO on
    error.  */
 
@@ -951,12 +1159,16 @@ attach_proc_task_lwp_callback (ptid_t pt
   return 0;
 }
 
+static void async_file_mark (void);
+
 /* Attach to PID.  If PID is the tgid, attach to it and all
    of its threads.  */
 
 static int
 linux_attach (unsigned long pid)
 {
+  struct process_info *proc;
+  struct thread_info *initial_thread;
   ptid_t ptid = ptid_build (pid, pid, 0);
   int err;
 
@@ -967,17 +1179,12 @@ linux_attach (unsigned long pid)
     error ("Cannot attach to process %ld: %s",
 	   pid, linux_ptrace_attach_fail_reason_string (ptid, err));
 
-  linux_add_process (pid, 1);
-
-  if (!non_stop)
-    {
-      struct thread_info *thread;
+  proc = linux_add_process (pid, 1);
 
-     /* Don't ignore the initial SIGSTOP if we just attached to this
-	process.  It will be collected by wait shortly.  */
-      thread = find_thread_ptid (ptid_build (pid, pid, 0));
-      thread->last_resume_kind = resume_stop;
-    }
+  /* Don't ignore the initial SIGSTOP if we just attached to this
+     process.  It will be collected by wait shortly.  */
+  initial_thread = find_thread_ptid (ptid_build (pid, pid, 0));
+  initial_thread->last_resume_kind = resume_stop;
 
   /* We must attach to every LWP.  If /proc is mounted, use that to
      find them now.  On the one hand, the inferior may be using raw
@@ -989,6 +1196,38 @@ linux_attach (unsigned long pid)
      that once thread_db is loaded, we'll still use it to list threads
      and associate pthread info with each LWP.  */
   linux_proc_attach_tgid_threads (pid, attach_proc_task_lwp_callback);
+
+  /* GDB will shortly read the xml target description for this
+     process, to figure out the process' architecture.  But the target
+     description is only filled in when the first process/thread in
+     the thread group reports its initial PTRACE_ATTACH SIGSTOP.  Do
+     that now, otherwise, if GDB is fast enough, it could read the
+     target description _before_ that initial stop.  */
+  if (non_stop)
+    {
+      struct lwp_info *lwp;
+      int wstat, lwpid;
+      ptid_t pid_ptid = pid_to_ptid (pid);
+
+      lwpid = linux_wait_for_event_filtered (pid_ptid, pid_ptid,
+					     &wstat, __WALL);
+      gdb_assert (lwpid > 0);
+
+      lwp = find_lwp_pid (pid_to_ptid (lwpid));
+
+      if (!WIFSTOPPED (wstat) || WSTOPSIG (wstat) != SIGSTOP)
+	{
+	  lwp->status_pending_p = 1;
+	  lwp->status_pending = wstat;
+	}
+
+      initial_thread->last_resume_kind = resume_continue;
+
+      async_file_mark ();
+
+      gdb_assert (proc->tdesc != NULL);
+    }
+
   return 0;
 }
 
@@ -1001,7 +1240,7 @@ struct counter
 static int
 second_thread_of_pid_p (struct inferior_list_entry *entry, void *args)
 {
-  struct counter *counter = args;
+  struct counter *counter = (struct counter *) args;
 
   if (ptid_get_pid (entry->id) == counter->pid)
     {
@@ -1035,13 +1274,12 @@ linux_kill_one_lwp (struct lwp_info *lwp
      ptrace(CONT, pid, 0,0) and just resumes the tracee.  A better
      alternative is to kill with SIGKILL.  We only need one SIGKILL
      per process, not one for each thread.  But since we still support
-     linuxthreads, and we also support debugging programs using raw
-     clone without CLONE_THREAD, we send one for each thread.  For
-     years, we used PTRACE_KILL only, so we're being a bit paranoid
-     about some old kernels where PTRACE_KILL might work better
-     (dubious if there are any such, but that's why it's paranoia), so
-     we try SIGKILL first, PTRACE_KILL second, and so we're fine
-     everywhere.  */
+     support debugging programs using raw clone without CLONE_THREAD,
+     we send one for each thread.  For years, we used PTRACE_KILL
+     only, so we're being a bit paranoid about some old kernels where
+     PTRACE_KILL might work better (dubious if there are any such, but
+     that's why it's paranoia), so we try SIGKILL first, PTRACE_KILL
+     second, and so we're fine everywhere.  */
 
   errno = 0;
   kill_lwp (pid, SIGKILL);
@@ -1103,7 +1341,10 @@ kill_wait_lwp (struct lwp_info *lwp)
 	res = my_waitpid (lwpid, &wstat, __WCLONE);
     } while (res > 0 && WIFSTOPPED (wstat));
 
-  gdb_assert (res > 0);
+  /* Even if it was stopped, the child may have already disappeared.
+     E.g., if it was killed by SIGKILL.  */
+  if (res < 0 && errno != ECHILD)
+    perror_with_name ("kill_wait_lwp");
 }
 
 /* Callback for `find_inferior'.  Kills an lwp of a given process,
@@ -1253,16 +1494,14 @@ get_detach_signal (struct thread_info *t
     }
 }
 
-static int
-linux_detach_one_lwp (struct inferior_list_entry *entry, void *args)
+/* Detach from LWP.  */
+
+static void
+linux_detach_one_lwp (struct lwp_info *lwp)
 {
-  struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lwp = get_thread_lwp (thread);
-  int pid = * (int *) args;
+  struct thread_info *thread = get_lwp_thread (lwp);
   int sig;
-
-  if (ptid_get_pid (entry->id) != pid)
-    return 0;
+  int lwpid;
 
   /* If there is a pending SIGSTOP, get rid of it.  */
   if (lwp->stop_expected)
@@ -1275,22 +1514,94 @@ linux_detach_one_lwp (struct inferior_li
       lwp->stop_expected = 0;
     }
 
-  /* Flush any pending changes to the process's registers.  */
-  regcache_invalidate_thread (thread);
-
   /* Pass on any pending signal for this thread.  */
   sig = get_detach_signal (thread);
 
-  /* Finally, let it resume.  */
-  if (the_low_target.prepare_to_resume != NULL)
-    the_low_target.prepare_to_resume (lwp);
-  if (ptrace (PTRACE_DETACH, lwpid_of (thread), (PTRACE_TYPE_ARG3) 0,
+  /* Preparing to resume may try to write registers, and fail if the
+     lwp is zombie.  If that happens, ignore the error.  We'll handle
+     it below, when detach fails with ESRCH.  */
+  TRY
+    {
+      /* Flush any pending changes to the process's registers.  */
+      regcache_invalidate_thread (thread);
+
+      /* Finally, let it resume.  */
+      if (the_low_target.prepare_to_resume != NULL)
+	the_low_target.prepare_to_resume (lwp);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (!check_ptrace_stopped_lwp_gone (lwp))
+	throw_exception (ex);
+    }
+  END_CATCH
+
+  lwpid = lwpid_of (thread);
+  if (ptrace (PTRACE_DETACH, lwpid, (PTRACE_TYPE_ARG3) 0,
 	      (PTRACE_TYPE_ARG4) (long) sig) < 0)
-    error (_("Can't detach %s: %s"),
-	   target_pid_to_str (ptid_of (thread)),
-	   strerror (errno));
+    {
+      int save_errno = errno;
+
+      /* We know the thread exists, so ESRCH must mean the lwp is
+	 zombie.  This can happen if one of the already-detached
+	 threads exits the whole thread group.  In that case we're
+	 still attached, and must reap the lwp.  */
+      if (save_errno == ESRCH)
+	{
+	  int ret, status;
+
+	  ret = my_waitpid (lwpid, &status, __WALL);
+	  if (ret == -1)
+	    {
+	      warning (_("Couldn't reap LWP %d while detaching: %s"),
+		       lwpid, strerror (errno));
+	    }
+	  else if (!WIFEXITED (status) && !WIFSIGNALED (status))
+	    {
+	      warning (_("Reaping LWP %d while detaching "
+			 "returned unexpected status 0x%x"),
+		       lwpid, status);
+	    }
+	}
+      else
+	{
+	  error (_("Can't detach %s: %s"),
+		 target_pid_to_str (ptid_of (thread)),
+		 strerror (save_errno));
+	}
+    }
+  else if (debug_threads)
+    {
+      debug_printf ("PTRACE_DETACH (%s, %s, 0) (OK)\n",
+		    target_pid_to_str (ptid_of (thread)),
+		    strsignal (sig));
+    }
 
   delete_lwp (lwp);
+}
+
+/* Callback for find_inferior.  Detaches from non-leader threads of a
+   given process.  */
+
+static int
+linux_detach_lwp_callback (struct inferior_list_entry *entry, void *args)
+{
+  struct thread_info *thread = (struct thread_info *) entry;
+  struct lwp_info *lwp = get_thread_lwp (thread);
+  int pid = *(int *) args;
+  int lwpid = lwpid_of (thread);
+
+  /* Skip other processes.  */
+  if (ptid_get_pid (entry->id) != pid)
+    return 0;
+
+  /* We don't actually detach from the thread group leader just yet.
+     If the thread group exits, we must reap the zombie clone lwps
+     before we're able to reap the leader.  */
+  if (ptid_get_pid (entry->id) == lwpid)
+    return 0;
+
+  linux_detach_one_lwp (lwp);
   return 0;
 }
 
@@ -1298,11 +1609,17 @@ static int
 linux_detach (int pid)
 {
   struct process_info *process;
+  struct lwp_info *main_lwp;
 
   process = find_process_pid (pid);
   if (process == NULL)
     return -1;
 
+  /* As there's a step over already in progress, let it finish first,
+     otherwise nesting a stabilize_threads operation on top gets real
+     messy.  */
+  complete_ongoing_step_over ();
+
   /* Stop all threads before detaching.  First, ptrace requires that
      the thread is stopped to sucessfully detach.  Second, thread_db
      may need to uninstall thread event breakpoints from memory, which
@@ -1316,7 +1633,13 @@ linux_detach (int pid)
   /* Stabilize threads (move out of jump pads).  */
   stabilize_threads ();
 
-  find_inferior (&all_threads, linux_detach_one_lwp, &pid);
+  /* Detach from the clone lwps first.  If the thread group exits just
+     while we're detaching, we must reap the clone lwps before we're
+     able to reap the leader.  */
+  find_inferior (&all_threads, linux_detach_lwp_callback, &pid);
+
+  main_lwp = find_lwp_pid (pid_to_ptid (pid));
+  linux_detach_one_lwp (main_lwp);
 
   the_target->mourn (process);
 
@@ -1333,7 +1656,7 @@ delete_lwp_callback (struct inferior_lis
 {
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lwp = get_thread_lwp (thread);
-  struct process_info *process = proc;
+  struct process_info *process = (struct process_info *) proc;
 
   if (pid_of (thread) == pid_of (process))
     delete_lwp (lwp);
@@ -1383,7 +1706,7 @@ linux_thread_alive (ptid_t ptid)
      exited but we still haven't been able to report it to GDB, we'll
      hold on to the last lwp of the dead process.  */
   if (lwp != NULL)
-    return !lwp->dead;
+    return !lwp_is_marked_dead (lwp);
   else
     return 0;
 }
@@ -1400,12 +1723,6 @@ thread_still_has_status_pending_p (struc
   if (!lp->status_pending_p)
     return 0;
 
-  /* If we got a `vCont;t', but we haven't reported a stop yet, do
-     report any status pending the LWP may have.  */
-  if (thread->last_resume_kind == resume_stop
-      && thread->last_status.kind != TARGET_WAITKIND_IGNORE)
-    return 0;
-
   if (thread->last_resume_kind != resume_stop
       && (lp->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
 	  || lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT))
@@ -1462,6 +1779,26 @@ thread_still_has_status_pending_p (struc
   return 1;
 }
 
+/* Returns true if LWP is resumed from the client's perspective.  */
+
+static int
+lwp_resumed (struct lwp_info *lwp)
+{
+  struct thread_info *thread = get_lwp_thread (lwp);
+
+  if (thread->last_resume_kind != resume_stop)
+    return 1;
+
+  /* Did gdb send us a `vCont;t', but we haven't reported the
+     corresponding stop to gdb yet?  If so, the thread is still
+     resumed/running from gdb's perspective.  */
+  if (thread->last_resume_kind == resume_stop
+      && thread->last_status.kind == TARGET_WAITKIND_IGNORE)
+    return 1;
+
+  return 0;
+}
+
 /* Return 1 if this lwp has an interesting status pending.  */
 static int
 status_pending_p_callback (struct inferior_list_entry *entry, void *arg)
@@ -1475,6 +1812,9 @@ status_pending_p_callback (struct inferi
   if (!ptid_match (ptid_of (thread), ptid))
     return 0;
 
+  if (!lwp_resumed (lp))
+    return 0;
+
   if (lp->status_pending_p
       && !thread_still_has_status_pending_p (thread))
     {
@@ -1606,7 +1946,7 @@ check_zombie_leaders (void)
 		      leader_pid, leader_lp!= NULL, num_lwps (leader_pid),
 		      linux_proc_pid_is_zombie (leader_pid));
 
-      if (leader_lp != NULL
+      if (leader_lp != NULL && !leader_lp->stopped
 	  /* Check if there are other threads in the group, as we may
 	     have raced with the inferior simply exiting.  */
 	  && !last_thread_of_process_p (leader_pid)
@@ -1641,10 +1981,9 @@ check_zombie_leaders (void)
 	     thread execs).  */
 
 	  if (debug_threads)
-	    fprintf (stderr,
-		     "CZL: Thread group leader %d zombie "
-		     "(it exited, or another thread execd).\n",
-		     leader_pid);
+	    debug_printf ("CZL: Thread group leader %d zombie "
+			  "(it exited, or another thread execd).\n",
+			  leader_pid);
 
 	  delete_lwp (leader_lp);
 	}
@@ -1671,9 +2010,42 @@ not_stopped_callback (struct inferior_li
   return 0;
 }
 
-/* This function should only be called if the LWP got a SIGTRAP.
+/* Increment LWP's suspend count.  */
 
-   Handle any tracepoint steps or hits.  Return true if a tracepoint
+static void
+lwp_suspended_inc (struct lwp_info *lwp)
+{
+  lwp->suspended++;
+
+  if (debug_threads && lwp->suspended > 4)
+    {
+      struct thread_info *thread = get_lwp_thread (lwp);
+
+      debug_printf ("LWP %ld has a suspiciously high suspend count,"
+		    " suspended=%d\n", lwpid_of (thread), lwp->suspended);
+    }
+}
+
+/* Decrement LWP's suspend count.  */
+
+static void
+lwp_suspended_decr (struct lwp_info *lwp)
+{
+  lwp->suspended--;
+
+  if (lwp->suspended < 0)
+    {
+      struct thread_info *thread = get_lwp_thread (lwp);
+
+      internal_error (__FILE__, __LINE__,
+		      "unsuspend LWP %ld, suspended=%d\n", lwpid_of (thread),
+		      lwp->suspended);
+    }
+}
+
+/* This function should only be called if the LWP got a SIGTRAP.
+
+   Handle any tracepoint steps or hits.  Return true if a tracepoint
    event was handled, 0 otherwise.  */
 
 static int
@@ -1688,7 +2060,7 @@ handle_tracepoints (struct lwp_info *lwp
      uninsert tracepoints.  To do this, we temporarily pause all
      threads, unpatch away, and then unpause threads.  We need to make
      sure the unpausing doesn't resume LWP too.  */
-  lwp->suspended++;
+  lwp_suspended_inc (lwp);
 
   /* And we need to be sure that any all-threads-stopping doesn't try
      to move threads out of the jump pads, as it could deadlock the
@@ -1704,7 +2076,7 @@ handle_tracepoints (struct lwp_info *lwp
      actions.  */
   tpoint_related_event |= tracepoint_was_hit (tinfo, lwp->stop_pc);
 
-  lwp->suspended--;
+  lwp_suspended_decr (lwp);
 
   gdb_assert (lwp->suspended == 0);
   gdb_assert (!stabilizing_threads || lwp->collecting_fast_tracepoint);
@@ -1918,10 +2290,10 @@ enqueue_one_deferred_signal (struct lwp_
 	}
     }
 
-  p_sig = xmalloc (sizeof (*p_sig));
+  p_sig = XCNEW (struct pending_signals);
   p_sig->prev = lwp->pending_signals_to_report;
   p_sig->signal = WSTOPSIG (*wstat);
-  memset (&p_sig->info, 0, sizeof (siginfo_t));
+
   ptrace (PTRACE_GETSIGINFO, lwpid_of (thread), (PTRACE_TYPE_ARG3) 0,
 	  &p_sig->info);
 
@@ -2032,6 +2404,11 @@ linux_low_ptrace_options (int attached)
   if (report_vfork_events)
     options |= (PTRACE_O_TRACEVFORK | PTRACE_O_TRACEVFORKDONE);
 
+  if (report_exec_events)
+    options |= PTRACE_O_TRACEEXEC;
+
+  options |= PTRACE_O_TRACESYSGOOD;
+
   return options;
 }
 
@@ -2048,6 +2425,38 @@ linux_low_filter_event (int lwpid, int w
 
   child = find_lwp_pid (pid_to_ptid (lwpid));
 
+  /* Check for stop events reported by a process we didn't already
+     know about - anything not already in our LWP list.
+
+     If we're expecting to receive stopped processes after
+     fork, vfork, and clone events, then we'll just add the
+     new one to our list and go back to waiting for the event
+     to be reported - the stopped process might be returned
+     from waitpid before or after the event is.
+
+     But note the case of a non-leader thread exec'ing after the
+     leader having exited, and gone from our lists (because
+     check_zombie_leaders deleted it).  The non-leader thread
+     changes its tid to the tgid.  */
+
+  if (WIFSTOPPED (wstat) && child == NULL && WSTOPSIG (wstat) == SIGTRAP
+      && linux_ptrace_get_extended_event (wstat) == PTRACE_EVENT_EXEC)
+    {
+      ptid_t child_ptid;
+
+      /* A multi-thread exec after we had seen the leader exiting.  */
+      if (debug_threads)
+	{
+	  debug_printf ("LLW: Re-adding thread group leader LWP %d"
+			"after exec.\n", lwpid);
+	}
+
+      child_ptid = ptid_build (lwpid, lwpid, 0);
+      child = add_lwp (child_ptid);
+      child->stopped = 1;
+      current_thread = child->thread;
+    }
+
   /* If we didn't find a process, one of two things presumably happened:
      - A process we started and then detached from has exited.  Ignore it.
      - A process we are controlling has forked and the new child's stop
@@ -2071,26 +2480,30 @@ linux_low_filter_event (int lwpid, int w
     {
       if (debug_threads)
 	debug_printf ("LLFE: %d exited.\n", lwpid);
-      if (num_lwps (pid_of (thread)) > 1)
-	{
 
-	  /* If there is at least one more LWP, then the exit signal was
-	     not the end of the debugged application and should be
-	     ignored.  */
-	  delete_lwp (child);
-	  return NULL;
+      if (finish_step_over (child))
+	{
+	  /* Unsuspend all other LWPs, and set them back running again.  */
+	  unsuspend_all_lwps (child);
 	}
-      else
+
+      /* If there is at least one more LWP, then the exit signal was
+	 not the end of the debugged application and should be
+	 ignored, unless GDB wants to hear about thread exits.  */
+      if (report_thread_events
+	  || last_thread_of_process_p (pid_of (thread)))
 	{
-	  /* This was the last lwp in the process.  Since events are
-	     serialized to GDB core, and we can't report this one
-	     right now, but GDB core and the other target layers will
-	     want to be notified about the exit code/signal, leave the
-	     status pending for the next time we're able to report
-	     it.  */
+	  /* Since events are serialized to GDB core, and we can't
+	     report this one right now.  Leave the status pending for
+	     the next time we're able to report it.  */
 	  mark_lwp_dead (child, wstat);
 	  return child;
 	}
+      else
+	{
+	  delete_lwp (child);
+	  return NULL;
+	}
     }
 
   gdb_assert (WIFSTOPPED (wstat));
@@ -2099,23 +2512,26 @@ linux_low_filter_event (int lwpid, int w
     {
       struct process_info *proc;
 
-      /* Architecture-specific setup after inferior is running.  This
-	 needs to happen after we have attached to the inferior and it
-	 is stopped for the first time, but before we access any
-	 inferior registers.  */
+      /* Architecture-specific setup after inferior is running.  */
       proc = find_process_pid (pid_of (thread));
-      if (proc->priv->new_inferior)
+      if (proc->tdesc == NULL)
 	{
-	  struct thread_info *saved_thread;
-
-	  saved_thread = current_thread;
-	  current_thread = thread;
-
-	  the_low_target.arch_setup ();
-
-	  current_thread = saved_thread;
-
-	  proc->priv->new_inferior = 0;
+	  if (proc->attached)
+	    {
+	      /* This needs to happen after we have attached to the
+		 inferior and it is stopped for the first time, but
+		 before we access any inferior registers.  */
+	      linux_arch_setup_thread (thread);
+	    }
+	  else
+	    {
+	      /* The process is started, but GDBserver will do
+		 architecture-specific setup after the program stops at
+		 the first instruction.  */
+	      child->status_pending_p = 1;
+	      child->status_pending = wstat;
+	      return child;
+	    }
 	}
     }
 
@@ -2128,13 +2544,28 @@ linux_low_filter_event (int lwpid, int w
       child->must_set_ptrace_flags = 0;
     }
 
-  /* Be careful to not overwrite stop_pc until
-     check_stopped_by_breakpoint is called.  */
+  /* Always update syscall_state, even if it will be filtered later.  */
+  if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SYSCALL_SIGTRAP)
+    {
+      child->syscall_state
+	= (child->syscall_state == TARGET_WAITKIND_SYSCALL_ENTRY
+	   ? TARGET_WAITKIND_SYSCALL_RETURN
+	   : TARGET_WAITKIND_SYSCALL_ENTRY);
+    }
+  else
+    {
+      /* Almost all other ptrace-stops are known to be outside of system
+	 calls, with further exceptions in handle_extended_wait.  */
+      child->syscall_state = TARGET_WAITKIND_IGNORE;
+    }
+
+  /* Be careful to not overwrite stop_pc until save_stop_reason is
+     called.  */
   if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGTRAP
       && linux_is_extended_waitstatus (wstat))
     {
       child->stop_pc = get_pc (child);
-      if (handle_extended_wait (child, wstat))
+      if (handle_extended_wait (&child, wstat))
 	{
 	  /* The event has been handled, so just return without
 	     reporting it.  */
@@ -2142,24 +2573,12 @@ linux_low_filter_event (int lwpid, int w
 	}
     }
 
-  /* Check first whether this was a SW/HW breakpoint before checking
-     watchpoints, because at least s390 can't tell the data address of
-     hardware watchpoint hits, and returns stopped-by-watchpoint as
-     long as there's a watchpoint set.  */
-  if (WIFSTOPPED (wstat) && linux_wstatus_maybe_breakpoint (wstat))
+  if (linux_wstatus_maybe_breakpoint (wstat))
     {
-      if (check_stopped_by_breakpoint (child))
+      if (save_stop_reason (child))
 	have_stop_pc = 1;
     }
 
-  /* Note that TRAP_HWBKPT can indicate either a hardware breakpoint
-     or hardware watchpoint.  Check which is which if we got
-     TARGET_STOPPED_BY_HW_BREAKPOINT.  */
-  if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGTRAP
-      && (child->stop_reason == TARGET_STOPPED_BY_NO_REASON
-	  || child->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT))
-    check_stopped_by_watchpoint (child);
-
   if (!have_stop_pc)
     child->stop_pc = get_pc (child);
 
@@ -2206,6 +2625,22 @@ linux_low_filter_event (int lwpid, int w
   return child;
 }
 
+/* Return true if THREAD is doing hardware single step.  */
+
+static int
+maybe_hw_step (struct thread_info *thread)
+{
+  if (can_hardware_single_step ())
+    return 1;
+  else
+    {
+      /* GDBserver must insert single-step breakpoint for software
+	 single step.  */
+      gdb_assert (has_single_step_breakpoints (thread));
+      return 0;
+    }
+}
+
 /* Resume LWPs that are currently stopped without any pending status
    to report, but are resumed from the core's perspective.  */
 
@@ -2216,11 +2651,14 @@ resume_stopped_resumed_lwps (struct infe
   struct lwp_info *lp = get_thread_lwp (thread);
 
   if (lp->stopped
+      && !lp->suspended
       && !lp->status_pending_p
-      && thread->last_resume_kind != resume_stop
       && thread->last_status.kind == TARGET_WAITKIND_IGNORE)
     {
-      int step = thread->last_resume_kind == resume_step;
+      int step = 0;
+
+      if (thread->last_resume_kind == resume_step)
+	step = maybe_hw_step (thread);
 
       if (debug_threads)
 	debug_printf ("RSRL: resuming stopped-resumed LWP %s at %s: step=%d\n",
@@ -2261,7 +2699,8 @@ linux_wait_for_event_filtered (ptid_t wa
   if (ptid_equal (filter_ptid, minus_one_ptid) || ptid_is_pid (filter_ptid))
     {
       event_thread = (struct thread_info *)
-	find_inferior (&all_threads, status_pending_p_callback, &filter_ptid);
+	find_inferior_in_random (&all_threads, status_pending_p_callback,
+				 &filter_ptid);
       if (event_thread != NULL)
 	event_child = get_thread_lwp (event_thread);
       if (debug_threads && event_thread)
@@ -2339,8 +2778,7 @@ linux_wait_for_event_filtered (ptid_t wa
 	 - When a non-leader thread execs, that thread just vanishes
 	   without reporting an exit (so we'd hang if we waited for it
 	   explicitly in that case).  The exec event is reported to
-	   the TGID pid (although we don't currently enable exec
-	   events).  */
+	   the TGID pid.  */
       errno = 0;
       ret = my_waitpid (-1, wstatp, options | WNOHANG);
 
@@ -2373,7 +2811,8 @@ linux_wait_for_event_filtered (ptid_t wa
       /* ... and find an LWP with a status to report to the core, if
 	 any.  */
       event_thread = (struct thread_info *)
-	find_inferior (&all_threads, status_pending_p_callback, &filter_ptid);
+	find_inferior_in_random (&all_threads, status_pending_p_callback,
+				 &filter_ptid);
       if (event_thread != NULL)
 	{
 	  event_child = get_thread_lwp (event_thread);
@@ -2427,18 +2866,6 @@ linux_wait_for_event_filtered (ptid_t wa
 
   current_thread = event_thread;
 
-  /* Check for thread exit.  */
-  if (! WIFSTOPPED (*wstatp))
-    {
-      gdb_assert (last_thread_of_process_p (pid_of (event_thread)));
-
-      if (debug_threads)
-	debug_printf ("LWP %d is the last lwp of process.  "
-		      "Process %ld exiting.\n",
-		      pid_of (event_thread), lwpid_of (event_thread));
-      return lwpid_of (event_thread);
-    }
-
   return lwpid_of (event_thread);
 }
 
@@ -2463,7 +2890,7 @@ count_events_callback (struct inferior_l
 {
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lp = get_thread_lwp (thread);
-  int *count = data;
+  int *count = (int *) data;
 
   gdb_assert (count != NULL);
 
@@ -2498,7 +2925,7 @@ select_event_lwp_callback (struct inferi
 {
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lp = get_thread_lwp (thread);
-  int *selector = data;
+  int *selector = (int *) data;
 
   gdb_assert (selector != NULL);
 
@@ -2586,9 +3013,7 @@ unsuspend_one_lwp (struct inferior_list_
   if (lwp == except)
     return 0;
 
-  lwp->suspended--;
-
-  gdb_assert (lwp->suspended >= 0);
+  lwp_suspended_decr (lwp);
   return 0;
 }
 
@@ -2681,7 +3106,7 @@ linux_stabilize_threads (void)
 	  lwp = get_thread_lwp (current_thread);
 
 	  /* Lock it.  */
-	  lwp->suspended++;
+	  lwp_suspended_inc (lwp);
 
 	  if (ourstatus.value.sig != GDB_SIGNAL_0
 	      || current_thread->last_resume_kind == resume_stop)
@@ -2692,7 +3117,7 @@ linux_stabilize_threads (void)
 	}
     }
 
-  find_inferior (&all_threads, unsuspend_one_lwp, NULL);
+  unsuspend_all_lwps (NULL);
 
   stabilizing_threads = 0;
 
@@ -2710,8 +3135,6 @@ linux_stabilize_threads (void)
     }
 }
 
-static void async_file_mark (void);
-
 /* Convenience function that is called when the kernel reports an
    event that is not passed out to GDB.  */
 
@@ -2727,18 +3150,66 @@ ignore_event (struct target_waitstatus *
   return null_ptid;
 }
 
-/* Return non-zero if WAITSTATUS reflects an extended linux
-   event.  Otherwise, return zero.  */
+/* Convenience function that is called when the kernel reports an exit
+   event.  This decides whether to report the event to GDB as a
+   process exit event, a thread exit event, or to suppress the
+   event.  */
+
+static ptid_t
+filter_exit_event (struct lwp_info *event_child,
+		   struct target_waitstatus *ourstatus)
+{
+  struct thread_info *thread = get_lwp_thread (event_child);
+  ptid_t ptid = ptid_of (thread);
+
+  if (!last_thread_of_process_p (pid_of (thread)))
+    {
+      if (report_thread_events)
+	ourstatus->kind = TARGET_WAITKIND_THREAD_EXITED;
+      else
+	ourstatus->kind = TARGET_WAITKIND_IGNORE;
+
+      delete_lwp (event_child);
+    }
+  return ptid;
+}
+
+/* Returns 1 if GDB is interested in any event_child syscalls.  */
 
 static int
-extended_event_reported (const struct target_waitstatus *waitstatus)
+gdb_catching_syscalls_p (struct lwp_info *event_child)
 {
-  if (waitstatus == NULL)
+  struct thread_info *thread = get_lwp_thread (event_child);
+  struct process_info *proc = get_thread_process (thread);
+
+  return !VEC_empty (int, proc->syscalls_to_catch);
+}
+
+/* Returns 1 if GDB is interested in the event_child syscall.
+   Only to be called when stopped reason is SYSCALL_SIGTRAP.  */
+
+static int
+gdb_catch_this_syscall_p (struct lwp_info *event_child)
+{
+  int i, iter;
+  int sysno;
+  struct thread_info *thread = get_lwp_thread (event_child);
+  struct process_info *proc = get_thread_process (thread);
+
+  if (VEC_empty (int, proc->syscalls_to_catch))
     return 0;
 
-  return (waitstatus->kind == TARGET_WAITKIND_FORKED
-	  || waitstatus->kind == TARGET_WAITKIND_VFORKED
-	  || waitstatus->kind == TARGET_WAITKIND_VFORK_DONE);
+  if (VEC_index (int, proc->syscalls_to_catch, 0) == ANY_SYSCALL)
+    return 1;
+
+  get_syscall_trapinfo (event_child, &sysno);
+  for (i = 0;
+       VEC_iterate (int, proc->syscalls_to_catch, i, iter);
+       i++)
+    if (iter == sysno)
+      return 1;
+
+  return 0;
 }
 
 /* Wait for process, returns status.  */
@@ -2757,6 +3228,7 @@ linux_wait_1 (ptid_t ptid,
   int report_to_gdb;
   int trace_event;
   int in_step_range;
+  int any_resumed;
 
   if (debug_threads)
     {
@@ -2774,6 +3246,18 @@ linux_wait_1 (ptid_t ptid,
   in_step_range = 0;
   ourstatus->kind = TARGET_WAITKIND_IGNORE;
 
+  /* Find a resumed LWP, if any.  */
+  if (find_inferior (&all_threads,
+		     status_pending_p_callback,
+		     &minus_one_ptid) != NULL)
+    any_resumed = 1;
+  else if ((find_inferior (&all_threads,
+			   not_stopped_callback,
+			   &minus_one_ptid) != NULL))
+    any_resumed = 1;
+  else
+    any_resumed = 0;
+
   if (ptid_equal (step_over_bkpt, null_ptid))
     pid = linux_wait_for_event (ptid, &w, options);
   else
@@ -2784,7 +3268,7 @@ linux_wait_1 (ptid_t ptid,
       pid = linux_wait_for_event (step_over_bkpt, &w, options & ~WNOHANG);
     }
 
-  if (pid == 0)
+  if (pid == 0 || (pid == -1 && !any_resumed))
     {
       gdb_assert (target_options & TARGET_WNOHANG);
 
@@ -2846,19 +3330,35 @@ linux_wait_1 (ptid_t ptid,
 	    }
 	}
 
+      if (ourstatus->kind == TARGET_WAITKIND_EXITED)
+	return filter_exit_event (event_child, ourstatus);
+
       return ptid_of (current_thread);
     }
 
-  /* If step-over executes a breakpoint instruction, it means a
-     gdb/gdbserver breakpoint had been planted on top of a permanent
-     breakpoint.  The PC has been adjusted by
-     check_stopped_by_breakpoint to point at the breakpoint address.
-     Advance the PC manually past the breakpoint, otherwise the
-     program would keep trapping the permanent breakpoint forever.  */
+  /* If step-over executes a breakpoint instruction, in the case of a
+     hardware single step it means a gdb/gdbserver breakpoint had been
+     planted on top of a permanent breakpoint, in the case of a software
+     single step it may just mean that gdbserver hit the reinsert breakpoint.
+     The PC has been adjusted by save_stop_reason to point at
+     the breakpoint address.
+     So in the case of the hardware single step advance the PC manually
+     past the breakpoint and in the case of software single step advance only
+     if it's not the single_step_breakpoint we are hitting.
+     This avoids that a program would keep trapping a permanent breakpoint
+     forever.  */
   if (!ptid_equal (step_over_bkpt, null_ptid)
-      && event_child->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT)
-    {
-      unsigned int increment_pc = the_low_target.breakpoint_len;
+      && event_child->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
+      && (event_child->stepping
+	  || !single_step_breakpoint_inserted_here (event_child->stop_pc)))
+    {
+      int increment_pc = 0;
+      int breakpoint_kind = 0;
+      CORE_ADDR stop_pc = event_child->stop_pc;
+
+      breakpoint_kind =
+	the_target->breakpoint_kind_from_current_state (&stop_pc);
+      the_target->sw_breakpoint_from_kind (breakpoint_kind, &increment_pc);
 
       if (debug_threads)
 	{
@@ -2904,8 +3404,8 @@ linux_wait_1 (ptid_t ptid,
 
       /* We have a SIGTRAP, possibly a step-over dance has just
 	 finished.  If so, tweak the state machine accordingly,
-	 reinsert breakpoints and delete any reinsert (software
-	 single-step) breakpoints.  */
+	 reinsert breakpoints and delete any single-step
+	 breakpoints.  */
       step_over_finished = finish_step_over (event_child);
 
       /* Now invoke the callbacks of any internal breakpoints there.  */
@@ -2918,14 +3418,8 @@ linux_wait_1 (ptid_t ptid,
 
       if (bp_explains_trap)
 	{
-	  /* If we stepped or ran into an internal breakpoint, we've
-	     already handled it.  So next time we resume (from this
-	     PC), we should step over it.  */
 	  if (debug_threads)
 	    debug_printf ("Hit a gdbserver breakpoint.\n");
-
-	  if (breakpoint_here (event_child->stop_pc))
-	    event_child->need_step_over = 1;
 	}
     }
   else
@@ -2964,6 +3458,8 @@ linux_wait_1 (ptid_t ptid,
 
 	  linux_resume_one_lwp (event_child, 0, 0, NULL);
 
+	  if (debug_threads)
+	    debug_exit ();
 	  return ignore_event (ourstatus);
 	}
     }
@@ -3046,6 +3542,25 @@ linux_wait_1 (ptid_t ptid,
 
   /* Check whether GDB would be interested in this event.  */
 
+  /* Check if GDB is interested in this syscall.  */
+  if (WIFSTOPPED (w)
+      && WSTOPSIG (w) == SYSCALL_SIGTRAP
+      && !gdb_catch_this_syscall_p (event_child))
+    {
+      if (debug_threads)
+	{
+	  debug_printf ("Ignored syscall for LWP %ld.\n",
+			lwpid_of (current_thread));
+	}
+
+      linux_resume_one_lwp (event_child, event_child->stepping,
+			    0, NULL);
+
+      if (debug_threads)
+	debug_exit ();
+      return ignore_event (ourstatus);
+    }
+
   /* If GDB is not interested in this signal, don't stop other
      threads, and don't report it to GDB.  Just resume the inferior
      right away.  We do this for threading-related signals as well as
@@ -3054,8 +3569,6 @@ linux_wait_1 (ptid_t ptid,
      stepping - they may require special handling to skip the signal
      handler. Also never ignore signals that could be caused by a
      breakpoint.  */
-  /* FIXME drow/2002-06-09: Get signal numbers from the inferior's
-     thread library?  */
   if (WIFSTOPPED (w)
       && current_thread->last_resume_kind != resume_step
       && (
@@ -3081,8 +3594,29 @@ linux_wait_1 (ptid_t ptid,
 	info_p = &info;
       else
 	info_p = NULL;
-      linux_resume_one_lwp (event_child, event_child->stepping,
-			    WSTOPSIG (w), info_p);
+
+      if (step_over_finished)
+	{
+	  /* We cancelled this thread's step-over above.  We still
+	     need to unsuspend all other LWPs, and set them back
+	     running again while the signal handler runs.  */
+	  unsuspend_all_lwps (event_child);
+
+	  /* Enqueue the pending signal info so that proceed_all_lwps
+	     doesn't lose it.  */
+	  enqueue_pending_signal (event_child, WSTOPSIG (w), info_p);
+
+	  proceed_all_lwps ();
+	}
+      else
+	{
+	  linux_resume_one_lwp (event_child, event_child->stepping,
+				WSTOPSIG (w), info_p);
+	}
+
+      if (debug_threads)
+	debug_exit ();
+
       return ignore_event (ourstatus);
     }
 
@@ -3098,17 +3632,25 @@ linux_wait_1 (ptid_t ptid,
      do, we're be able to handle GDB breakpoints on top of internal
      breakpoints, by handling the internal breakpoint and still
      reporting the event to GDB.  If we don't, we're out of luck, GDB
-     won't see the breakpoint hit.  */
+     won't see the breakpoint hit.  If we see a single-step event but
+     the thread should be continuing, don't pass the trap to gdb.
+     That indicates that we had previously finished a single-step but
+     left the single-step pending -- see
+     complete_ongoing_step_over.  */
   report_to_gdb = (!maybe_internal_trap
 		   || (current_thread->last_resume_kind == resume_step
 		       && !in_step_range)
 		   || event_child->stop_reason == TARGET_STOPPED_BY_WATCHPOINT
-		   || (!step_over_finished && !in_step_range
-		       && !bp_explains_trap && !trace_event)
+		   || (!in_step_range
+		       && !bp_explains_trap
+		       && !trace_event
+		       && !step_over_finished
+		       && !(current_thread->last_resume_kind == resume_continue
+			    && event_child->stop_reason == TARGET_STOPPED_BY_SINGLE_STEP))
 		   || (gdb_breakpoint_here (event_child->stop_pc)
 		       && gdb_condition_true_at_breakpoint (event_child->stop_pc)
 		       && gdb_no_commands_at_breakpoint (event_child->stop_pc))
-		   || extended_event_reported (&event_child->waitstatus));
+		   || event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE);
 
   run_breakpoint_commands (event_child->stop_pc);
 
@@ -3130,13 +3672,6 @@ linux_wait_1 (ptid_t ptid,
 			  paddress (event_child->stop_pc),
 			  paddress (event_child->step_range_start),
 			  paddress (event_child->step_range_end));
-	  if (extended_event_reported (&event_child->waitstatus))
-	    {
-	      char *str = target_waitstatus_to_string (ourstatus);
-	      debug_printf ("LWP %ld: extended event with waitstatus %s\n",
-			    lwpid_of (get_lwp_thread (event_child)), str);
-	      xfree (str);
-	    }
 	}
 
       /* We're not reporting this breakpoint to GDB, so apply the
@@ -3150,23 +3685,50 @@ linux_wait_1 (ptid_t ptid,
 	  (*the_low_target.set_pc) (regcache, event_child->stop_pc);
 	}
 
-      /* We may have finished stepping over a breakpoint.  If so,
-	 we've stopped and suspended all LWPs momentarily except the
-	 stepping one.  This is where we resume them all again.  We're
-	 going to keep waiting, so use proceed, which handles stepping
-	 over the next breakpoint.  */
+      if (step_over_finished)
+	{
+	  /* If we have finished stepping over a breakpoint, we've
+	     stopped and suspended all LWPs momentarily except the
+	     stepping one.  This is where we resume them all again.
+	     We're going to keep waiting, so use proceed, which
+	     handles stepping over the next breakpoint.  */
+	  unsuspend_all_lwps (event_child);
+	}
+      else
+	{
+	  /* Remove the single-step breakpoints if any.  Note that
+	     there isn't single-step breakpoint if we finished stepping
+	     over.  */
+	  if (can_software_single_step ()
+	      && has_single_step_breakpoints (current_thread))
+	    {
+	      stop_all_lwps (0, event_child);
+	      delete_single_step_breakpoints (current_thread);
+	      unstop_all_lwps (0, event_child);
+	    }
+	}
+
       if (debug_threads)
 	debug_printf ("proceeding all threads.\n");
+      proceed_all_lwps ();
 
-      if (step_over_finished)
-	unsuspend_all_lwps (event_child);
+      if (debug_threads)
+	debug_exit ();
 
-      proceed_all_lwps ();
       return ignore_event (ourstatus);
     }
 
   if (debug_threads)
     {
+      if (event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE)
+	{
+	  char *str;
+
+	  str = target_waitstatus_to_string (&event_child->waitstatus);
+	  debug_printf ("LWP %ld: extended event with waitstatus %s\n",
+			lwpid_of (get_lwp_thread (event_child)), str);
+	  xfree (str);
+	}
       if (current_thread->last_resume_kind == resume_step)
 	{
 	  if (event_child->step_range_start == event_child->step_range_end)
@@ -3184,29 +3746,71 @@ linux_wait_1 (ptid_t ptid,
 
   /* Alright, we're going to report a stop.  */
 
-  if (!stabilizing_threads)
+  /* Remove single-step breakpoints.  */
+  if (can_software_single_step ())
     {
-      /* In all-stop, stop all threads.  */
-      if (!non_stop)
-	stop_all_lwps (0, NULL);
+      /* Remove single-step breakpoints or not.  It it is true, stop all
+	 lwps, so that other threads won't hit the breakpoint in the
+	 staled memory.  */
+      int remove_single_step_breakpoints_p = 0;
 
-      /* If we're not waiting for a specific LWP, choose an event LWP
-	 from among those that have had events.  Giving equal priority
-	 to all LWPs that have had events helps prevent
-	 starvation.  */
-      if (ptid_equal (ptid, minus_one_ptid))
+      if (non_stop)
 	{
-	  event_child->status_pending_p = 1;
-	  event_child->status_pending = w;
+	  remove_single_step_breakpoints_p
+	    = has_single_step_breakpoints (current_thread);
+	}
+      else
+	{
+	  /* In all-stop, a stop reply cancels all previous resume
+	     requests.  Delete all single-step breakpoints.  */
+	  struct inferior_list_entry *inf, *tmp;
 
-	  select_event_lwp (&event_child);
+	  ALL_INFERIORS (&all_threads, inf, tmp)
+	    {
+	      struct thread_info *thread = (struct thread_info *) inf;
 
-	  /* current_thread and event_child must stay in sync.  */
-	  current_thread = get_lwp_thread (event_child);
+	      if (has_single_step_breakpoints (thread))
+		{
+		  remove_single_step_breakpoints_p = 1;
+		  break;
+		}
+	    }
+	}
 
-	  event_child->status_pending_p = 0;
-	  w = event_child->status_pending;
+      if (remove_single_step_breakpoints_p)
+	{
+	  /* If we remove single-step breakpoints from memory, stop all lwps,
+	     so that other threads won't hit the breakpoint in the staled
+	     memory.  */
+	  stop_all_lwps (0, event_child);
+
+	  if (non_stop)
+	    {
+	      gdb_assert (has_single_step_breakpoints (current_thread));
+	      delete_single_step_breakpoints (current_thread);
+	    }
+	  else
+	    {
+	      struct inferior_list_entry *inf, *tmp;
+
+	      ALL_INFERIORS (&all_threads, inf, tmp)
+		{
+		  struct thread_info *thread = (struct thread_info *) inf;
+
+		  if (has_single_step_breakpoints (thread))
+		    delete_single_step_breakpoints (thread);
+		}
+	    }
+
+	  unstop_all_lwps (0, event_child);
 	}
+    }
+
+  if (!stabilizing_threads)
+    {
+      /* In all-stop, stop all threads.  */
+      if (!non_stop)
+	stop_all_lwps (0, NULL);
 
       if (step_over_finished)
 	{
@@ -3232,6 +3836,25 @@ linux_wait_1 (ptid_t ptid,
 	    }
 	}
 
+      /* If we're not waiting for a specific LWP, choose an event LWP
+	 from among those that have had events.  Giving equal priority
+	 to all LWPs that have had events helps prevent
+	 starvation.  */
+      if (ptid_equal (ptid, minus_one_ptid))
+	{
+	  event_child->status_pending_p = 1;
+	  event_child->status_pending = w;
+
+	  select_event_lwp (&event_child);
+
+	  /* current_thread and event_child must stay in sync.  */
+	  current_thread = get_lwp_thread (event_child);
+
+	  event_child->status_pending_p = 0;
+	  w = event_child->status_pending;
+	}
+
+
       /* Stabilize threads (move out of jump pads).  */
       if (!non_stop)
 	stabilize_threads ();
@@ -3246,12 +3869,20 @@ linux_wait_1 (ptid_t ptid,
 	unstop_all_lwps (1, event_child);
     }
 
-  if (extended_event_reported (&event_child->waitstatus))
+  if (event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE)
     {
-      /* If the reported event is a fork, vfork or exec, let GDB know.  */
-      ourstatus->kind = event_child->waitstatus.kind;
-      ourstatus->value = event_child->waitstatus.value;
+      /* If the reported event is an exit, fork, vfork or exec, let
+	 GDB know.  */
 
+      /* Break the unreported fork relationship chain.  */
+      if (event_child->waitstatus.kind == TARGET_WAITKIND_FORKED
+	  || event_child->waitstatus.kind == TARGET_WAITKIND_VFORKED)
+	{
+	  event_child->fork_relative->fork_relative = NULL;
+	  event_child->fork_relative = NULL;
+	}
+
+      *ourstatus = event_child->waitstatus;
       /* Clear the event lwp's waitstatus since we handled it already.  */
       event_child->waitstatus.kind = TARGET_WAITKIND_IGNORE;
     }
@@ -3274,8 +3905,14 @@ linux_wait_1 (ptid_t ptid,
 	}
     }
 
-  if (current_thread->last_resume_kind == resume_stop
-      && WSTOPSIG (w) == SIGSTOP)
+  if (WSTOPSIG (w) == SYSCALL_SIGTRAP)
+    {
+      get_syscall_trapinfo (event_child,
+			    &ourstatus->value.syscall_number);
+      ourstatus->kind = event_child->syscall_state;
+    }
+  else if (current_thread->last_resume_kind == resume_stop
+	   && WSTOPSIG (w) == SIGSTOP)
     {
       /* A thread that has been requested to stop by GDB with vCont;t,
 	 and it stopped cleanly, so report as SIG0.  The use of
@@ -3304,6 +3941,9 @@ linux_wait_1 (ptid_t ptid,
       debug_exit ();
     }
 
+  if (ourstatus->kind == TARGET_WAITKIND_EXITED)
+    return filter_exit_event (event_child, ourstatus);
+
   return ptid_of (current_thread);
 }
 
@@ -3368,27 +4008,17 @@ linux_wait (ptid_t ptid,
 static int
 kill_lwp (unsigned long lwpid, int signo)
 {
-  /* Use tkill, if possible, in case we are using nptl threads.  If tkill
-     fails, then we are not using nptl threads and we should be using kill.  */
-
-#ifdef __NR_tkill
-  {
-    static int tkill_failed;
-
-    if (!tkill_failed)
-      {
-	int ret;
-
-	errno = 0;
-	ret = syscall (__NR_tkill, lwpid, signo);
-	if (errno != ENOSYS)
-	  return ret;
-	tkill_failed = 1;
-      }
-  }
-#endif
+  int ret;
 
-  return kill (lwpid, signo);
+  errno = 0;
+  ret = syscall (__NR_tkill, lwpid, signo);
+  if (errno == ENOSYS)
+    {
+      /* If tkill fails, then we are not using nptl threads, a
+	 configuration we no longer support.  */
+      perror_with_name (("tkill"));
+    }
+  return ret;
 }
 
 void
@@ -3451,7 +4081,7 @@ suspend_and_send_sigstop_callback (struc
   if (lwp == except)
     return 0;
 
-  lwp->suspended++;
+  lwp_suspended_inc (lwp);
 
   return send_sigstop_callback (entry, except);
 }
@@ -3459,13 +4089,23 @@ suspend_and_send_sigstop_callback (struc
 static void
 mark_lwp_dead (struct lwp_info *lwp, int wstat)
 {
-  /* It's dead, really.  */
-  lwp->dead = 1;
-
   /* Store the exit status for later.  */
   lwp->status_pending_p = 1;
   lwp->status_pending = wstat;
 
+  /* Store in waitstatus as well, as there's nothing else to process
+     for this event.  */
+  if (WIFEXITED (wstat))
+    {
+      lwp->waitstatus.kind = TARGET_WAITKIND_EXITED;
+      lwp->waitstatus.value.integer = WEXITSTATUS (wstat);
+    }
+  else if (WIFSIGNALED (wstat))
+    {
+      lwp->waitstatus.kind = TARGET_WAITKIND_SIGNALLED;
+      lwp->waitstatus.value.sig = gdb_signal_from_host (WTERMSIG (wstat));
+    }
+
   /* Prevent trying to stop it.  */
   lwp->stopped = 1;
 
@@ -3473,6 +4113,17 @@ mark_lwp_dead (struct lwp_info *lwp, int
   lwp->stop_expected = 0;
 }
 
+/* Return true if LWP has exited already, and has a pending exit event
+   to report to GDB.  */
+
+static int
+lwp_is_marked_dead (struct lwp_info *lwp)
+{
+  return (lwp->status_pending_p
+	  && (WIFEXITED (lwp->status_pending)
+	      || WIFSIGNALED (lwp->status_pending)));
+}
+
 /* Wait for all children to stop for the SIGSTOPs we just queued.  */
 
 static void
@@ -3506,18 +4157,10 @@ wait_for_sigstop (void)
       if (debug_threads)
 	debug_printf ("Previously current thread died.\n");
 
-      if (non_stop)
-	{
-	  /* We can't change the current inferior behind GDB's back,
-	     otherwise, a subsequent command may apply to the wrong
-	     process.  */
-	  current_thread = NULL;
-	}
-      else
-	{
-	  /* Set a valid thread as current.  */
-	  set_desired_thread (0);
-	}
+      /* We can't change the current inferior behind GDB's back,
+	 otherwise, a subsequent command may apply to the wrong
+	 process.  */
+      current_thread = NULL;
     }
 }
 
@@ -3532,7 +4175,12 @@ stuck_in_jump_pad_callback (struct infer
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lwp = get_thread_lwp (thread);
 
-  gdb_assert (lwp->suspended == 0);
+  if (lwp->suspended != 0)
+    {
+      internal_error (__FILE__, __LINE__,
+		      "LWP %ld is suspended, suspended=%d\n",
+		      lwpid_of (thread), lwp->suspended);
+    }
   gdb_assert (lwp->stopped);
 
   /* Allow debugging the jump pad, gdb_collect, etc..  */
@@ -3548,12 +4196,22 @@ static void
 move_out_of_jump_pad_callback (struct inferior_list_entry *entry)
 {
   struct thread_info *thread = (struct thread_info *) entry;
+  struct thread_info *saved_thread;
   struct lwp_info *lwp = get_thread_lwp (thread);
   int *wstat;
 
-  gdb_assert (lwp->suspended == 0);
+  if (lwp->suspended != 0)
+    {
+      internal_error (__FILE__, __LINE__,
+		      "LWP %ld is suspended, suspended=%d\n",
+		      lwpid_of (thread), lwp->suspended);
+    }
   gdb_assert (lwp->stopped);
 
+  /* For gdb_breakpoint_here.  */
+  saved_thread = current_thread;
+  current_thread = thread;
+
   wstat = lwp->status_pending_p ? &lwp->status_pending : NULL;
 
   /* Allow debugging the jump pad, gdb_collect, etc.  */
@@ -3580,7 +4238,9 @@ move_out_of_jump_pad_callback (struct in
       linux_resume_one_lwp (lwp, 0, 0, NULL);
     }
   else
-    lwp->suspended++;
+    lwp_suspended_inc (lwp);
+
+  current_thread = saved_thread;
 }
 
 static int
@@ -3589,7 +4249,7 @@ lwp_running (struct inferior_list_entry 
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lwp = get_thread_lwp (thread);
 
-  if (lwp->dead)
+  if (lwp_is_marked_dead (lwp))
     return 0;
   if (lwp->stopped)
     return 0;
@@ -3623,16 +4283,95 @@ stop_all_lwps (int suspend, struct lwp_i
   if (suspend)
     find_inferior (&all_threads, suspend_and_send_sigstop_callback, except);
   else
-    find_inferior (&all_threads, send_sigstop_callback, except);
-  wait_for_sigstop ();
-  stopping_threads = NOT_STOPPING_THREADS;
-
-  if (debug_threads)
+    find_inferior (&all_threads, send_sigstop_callback, except);
+  wait_for_sigstop ();
+  stopping_threads = NOT_STOPPING_THREADS;
+
+  if (debug_threads)
+    {
+      debug_printf ("stop_all_lwps done, setting stopping_threads "
+		    "back to !stopping\n");
+      debug_exit ();
+    }
+}
+
+/* Enqueue one signal in the chain of signals which need to be
+   delivered to this process on next resume.  */
+
+static void
+enqueue_pending_signal (struct lwp_info *lwp, int signal, siginfo_t *info)
+{
+  struct pending_signals *p_sig = XNEW (struct pending_signals);
+
+  p_sig->prev = lwp->pending_signals;
+  p_sig->signal = signal;
+  if (info == NULL)
+    memset (&p_sig->info, 0, sizeof (siginfo_t));
+  else
+    memcpy (&p_sig->info, info, sizeof (siginfo_t));
+  lwp->pending_signals = p_sig;
+}
+
+/* Install breakpoints for software single stepping.  */
+
+static void
+install_software_single_step_breakpoints (struct lwp_info *lwp)
+{
+  int i;
+  CORE_ADDR pc;
+  struct thread_info *thread = get_lwp_thread (lwp);
+  struct regcache *regcache = get_thread_regcache (thread, 1);
+  VEC (CORE_ADDR) *next_pcs = NULL;
+  struct cleanup *old_chain = make_cleanup_restore_current_thread ();
+
+  make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs);
+
+  current_thread = thread;
+  next_pcs = (*the_low_target.get_next_pcs) (regcache);
+
+  for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); ++i)
+    set_single_step_breakpoint (pc, current_ptid);
+
+  do_cleanups (old_chain);
+}
+
+/* Single step via hardware or software single step.
+   Return 1 if hardware single stepping, 0 if software single stepping
+   or can't single step.  */
+
+static int
+single_step (struct lwp_info* lwp)
+{
+  int step = 0;
+
+  if (can_hardware_single_step ())
+    {
+      step = 1;
+    }
+  else if (can_software_single_step ())
+    {
+      install_software_single_step_breakpoints (lwp);
+      step = 0;
+    }
+  else
     {
-      debug_printf ("stop_all_lwps done, setting stopping_threads "
-		    "back to !stopping\n");
-      debug_exit ();
+      if (debug_threads)
+	debug_printf ("stepping is not implemented on this target");
     }
+
+  return step;
+}
+
+/* The signal can be delivered to the inferior if we are not trying to
+   finish a fast tracepoint collect.  Since signal can be delivered in
+   the step-over, the program may go to signal handler and trap again
+   after return from the signal handler.  We can live with the spurious
+   double traps.  */
+
+static int
+lwp_signal_can_be_delivered (struct lwp_info *lwp)
+{
+  return !lwp->collecting_fast_tracepoint;
 }
 
 /* Resume execution of LWP.  If STEP is nonzero, single-step it.  If
@@ -3645,17 +4384,28 @@ linux_resume_one_lwp_throw (struct lwp_i
   struct thread_info *thread = get_lwp_thread (lwp);
   struct thread_info *saved_thread;
   int fast_tp_collecting;
+  int ptrace_request;
+  struct process_info *proc = get_thread_process (thread);
+
+  /* Note that target description may not be initialised
+     (proc->tdesc == NULL) at this point because the program hasn't
+     stopped at the first instruction yet.  It means GDBserver skips
+     the extra traps from the wrapper program (see option --wrapper).
+     Code in this function that requires register access should be
+     guarded by proc->tdesc == NULL or something else.  */
 
   if (lwp->stopped == 0)
     return;
 
+  gdb_assert (lwp->waitstatus.kind == TARGET_WAITKIND_IGNORE);
+
   fast_tp_collecting = lwp->collecting_fast_tracepoint;
 
   gdb_assert (!stabilizing_threads || fast_tp_collecting);
 
   /* Cancel actions that rely on GDB not changing the PC (e.g., the
      user used the "jump" command, or "set $pc = foo").  */
-  if (lwp->stop_pc != get_pc (lwp))
+  if (thread->while_stepping != NULL && lwp->stop_pc != get_pc (lwp))
     {
       /* Collecting 'while-stepping' actions doesn't make sense
 	 anymore.  */
@@ -3663,31 +4413,25 @@ linux_resume_one_lwp_throw (struct lwp_i
     }
 
   /* If we have pending signals or status, and a new signal, enqueue the
-     signal.  Also enqueue the signal if we are waiting to reinsert a
-     breakpoint; it will be picked up again below.  */
+     signal.  Also enqueue the signal if it can't be delivered to the
+     inferior right now.  */
   if (signal != 0
       && (lwp->status_pending_p
 	  || lwp->pending_signals != NULL
-	  || lwp->bp_reinsert != 0
-	  || fast_tp_collecting))
+	  || !lwp_signal_can_be_delivered (lwp)))
     {
-      struct pending_signals *p_sig;
-      p_sig = xmalloc (sizeof (*p_sig));
-      p_sig->prev = lwp->pending_signals;
-      p_sig->signal = signal;
-      if (info == NULL)
-	memset (&p_sig->info, 0, sizeof (siginfo_t));
-      else
-	memcpy (&p_sig->info, info, sizeof (siginfo_t));
-      lwp->pending_signals = p_sig;
+      enqueue_pending_signal (lwp, signal, info);
+
+      /* Postpone any pending signal.  It was enqueued above.  */
+      signal = 0;
     }
 
   if (lwp->status_pending_p)
     {
       if (debug_threads)
-	debug_printf ("Not resuming lwp %ld (%s, signal %d, stop %s);"
+	debug_printf ("Not resuming lwp %ld (%s, stop %s);"
 		      " has pending status\n",
-		      lwpid_of (thread), step ? "step" : "continue", signal,
+		      lwpid_of (thread), step ? "step" : "continue",
 		      lwp->stop_expected ? "expected" : "not expected");
       return;
     }
@@ -3695,11 +4439,6 @@ linux_resume_one_lwp_throw (struct lwp_i
   saved_thread = current_thread;
   current_thread = thread;
 
-  if (debug_threads)
-    debug_printf ("Resuming lwp %ld (%s, signal %d, stop %s)\n",
-		  lwpid_of (thread), step ? "step" : "continue", signal,
-		  lwp->stop_expected ? "expected" : "not expected");
-
   /* This bit needs some thinking about.  If we get a signal that
      we must report while a single-step reinsert is still pending,
      we often end up resuming the thread.  It might be better to
@@ -3721,17 +4460,14 @@ linux_resume_one_lwp_throw (struct lwp_i
 	  if (fast_tp_collecting == 0)
 	    {
 	      if (step == 0)
-		fprintf (stderr, "BAD - reinserting but not stepping.\n");
+		warning ("BAD - reinserting but not stepping.");
 	      if (lwp->suspended)
-		fprintf (stderr, "BAD - reinserting and suspended(%d).\n",
-			 lwp->suspended);
+		warning ("BAD - reinserting and suspended(%d).",
+				 lwp->suspended);
 	    }
-
-	  step = 1;
 	}
 
-      /* Postpone any pending signal.  It was enqueued above.  */
-      signal = 0;
+      step = maybe_hw_step (thread);
     }
 
   if (fast_tp_collecting == 1)
@@ -3740,9 +4476,6 @@ linux_resume_one_lwp_throw (struct lwp_i
 	debug_printf ("lwp %ld wants to get out of fast tracepoint jump pad"
 		      " (exit-jump-pad-bkpt)\n",
 		      lwpid_of (thread));
-
-      /* Postpone any pending signal.  It was enqueued above.  */
-      signal = 0;
     }
   else if (fast_tp_collecting == 2)
     {
@@ -3759,9 +4492,6 @@ linux_resume_one_lwp_throw (struct lwp_i
 			  "moving out of jump pad single-stepping"
 			  " not implemented on this target");
 	}
-
-      /* Postpone any pending signal.  It was enqueued above.  */
-      signal = 0;
     }
 
   /* If we have while-stepping actions in this thread set it stepping.
@@ -3772,16 +4502,16 @@ linux_resume_one_lwp_throw (struct lwp_i
      address, continue, and carry on catching this while-stepping
      action only when that breakpoint is hit.  A future
      enhancement.  */
-  if (thread->while_stepping != NULL
-      && can_hardware_single_step ())
+  if (thread->while_stepping != NULL)
     {
       if (debug_threads)
 	debug_printf ("lwp %ld has a while-stepping action -> forcing step.\n",
 		      lwpid_of (thread));
-      step = 1;
+
+      step = single_step (lwp);
     }
 
-  if (the_low_target.get_pc != NULL)
+  if (proc->tdesc != NULL && the_low_target.get_pc != NULL)
     {
       struct regcache *regcache = get_thread_regcache (current_thread, 1);
 
@@ -3794,12 +4524,9 @@ linux_resume_one_lwp_throw (struct lwp_i
 	}
     }
 
-  /* If we have pending signals, consume one unless we are trying to
-     reinsert a breakpoint or we're trying to finish a fast tracepoint
-     collect.  */
-  if (lwp->pending_signals != NULL
-      && lwp->bp_reinsert == 0
-      && fast_tp_collecting == 0)
+  /* If we have pending signals, consume one if it can be delivered to
+     the inferior.  */
+  if (lwp->pending_signals != NULL && lwp_signal_can_be_delivered (lwp))
     {
       struct pending_signals **p_sig;
 
@@ -3816,13 +4543,25 @@ linux_resume_one_lwp_throw (struct lwp_i
       *p_sig = NULL;
     }
 
+  if (debug_threads)
+    debug_printf ("Resuming lwp %ld (%s, signal %d, stop %s)\n",
+		  lwpid_of (thread), step ? "step" : "continue", signal,
+		  lwp->stop_expected ? "expected" : "not expected");
+
   if (the_low_target.prepare_to_resume != NULL)
     the_low_target.prepare_to_resume (lwp);
 
   regcache_invalidate_thread (thread);
   errno = 0;
   lwp->stepping = step;
-  ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, lwpid_of (thread),
+  if (step)
+    ptrace_request = PTRACE_SINGLESTEP;
+  else if (gdb_catching_syscalls_p (lwp))
+    ptrace_request = PTRACE_SYSCALL;
+  else
+    ptrace_request = PTRACE_CONT;
+  ptrace (ptrace_request,
+	  lwpid_of (thread),
 	  (PTRACE_TYPE_ARG3) 0,
 	  /* Coerce to a uintptr_t first to avoid potential gcc warning
 	     of coercing an 8 byte integer to a 4 byte pointer.  */
@@ -3917,7 +4656,7 @@ linux_set_resume_request (struct inferio
   int ndx;
   struct thread_resume_array *r;
 
-  r = arg;
+  r = (struct thread_resume_array *) arg;
 
   for (ndx = 0; ndx < r->n; ndx++)
     {
@@ -3944,6 +4683,51 @@ linux_set_resume_request (struct inferio
 	      continue;
 	    }
 
+	  /* Ignore (wildcard) resume requests for already-resumed
+	     threads.  */
+	  if (r->resume[ndx].kind != resume_stop
+	      && thread->last_resume_kind != resume_stop)
+	    {
+	      if (debug_threads)
+		debug_printf ("already %s LWP %ld at GDB's request\n",
+			      (thread->last_resume_kind
+			       == resume_step)
+			      ? "stepping"
+			      : "continuing",
+			      lwpid_of (thread));
+	      continue;
+	    }
+
+	  /* Don't let wildcard resumes resume fork children that GDB
+	     does not yet know are new fork children.  */
+	  if (lwp->fork_relative != NULL)
+	    {
+	      struct inferior_list_entry *inf, *tmp;
+	      struct lwp_info *rel = lwp->fork_relative;
+
+	      if (rel->status_pending_p
+		  && (rel->waitstatus.kind == TARGET_WAITKIND_FORKED
+		      || rel->waitstatus.kind == TARGET_WAITKIND_VFORKED))
+		{
+		  if (debug_threads)
+		    debug_printf ("not resuming LWP %ld: has queued stop reply\n",
+				  lwpid_of (thread));
+		  continue;
+		}
+	    }
+
+	  /* If the thread has a pending event that has already been
+	     reported to GDBserver core, but GDB has not pulled the
+	     event out of the vStopped queue yet, likewise, ignore the
+	     (wildcard) resume request.  */
+	  if (in_queued_stop_replies (entry->id))
+	    {
+	      if (debug_threads)
+		debug_printf ("not resuming LWP %ld: has queued stop reply\n",
+			      lwpid_of (thread));
+	      continue;
+	    }
+
 	  lwp->resume = &r->resume[ndx];
 	  thread->last_resume_kind = lwp->resume->kind;
 
@@ -4008,6 +4792,12 @@ need_step_over_p (struct inferior_list_e
   struct lwp_info *lwp = get_thread_lwp (thread);
   struct thread_info *saved_thread;
   CORE_ADDR pc;
+  struct process_info *proc = get_thread_process (thread);
+
+  /* GDBserver is skipping the extra traps from the wrapper program,
+     don't have to do step over.  */
+  if (proc->tdesc == NULL)
+    return 0;
 
   /* LWPs which will not be resumed are not interesting, because we
      might not wait for them next time through linux_wait.  */
@@ -4039,12 +4829,6 @@ need_step_over_p (struct inferior_list_e
       return 0;
     }
 
-  if (!lwp->need_step_over)
-    {
-      if (debug_threads)
-	debug_printf ("Need step over [LWP %ld]? No\n", lwpid_of (thread));
-    }
-
   if (lwp->status_pending_p)
     {
       if (debug_threads)
@@ -4070,8 +4854,20 @@ need_step_over_p (struct inferior_list_e
 		      "Old stop_pc was 0x%s, PC is now 0x%s\n",
 		      lwpid_of (thread),
 		      paddress (lwp->stop_pc), paddress (pc));
+      return 0;
+    }
+
+  /* On software single step target, resume the inferior with signal
+     rather than stepping over.  */
+  if (can_software_single_step ()
+      && lwp->pending_signals != NULL
+      && lwp_signal_can_be_delivered (lwp))
+    {
+      if (debug_threads)
+	debug_printf ("Need step over [LWP %ld]? Ignoring, has pending"
+		      " signals.\n",
+		      lwpid_of (thread));
 
-      lwp->need_step_over = 0;
       return 0;
     }
 
@@ -4107,8 +4903,6 @@ need_step_over_p (struct inferior_list_e
 	     that find_inferior stops looking.  */
 	  current_thread = saved_thread;
 
-	  /* If the step over is cancelled, this is set again.  */
-	  lwp->need_step_over = 0;
 	  return 1;
 	}
     }
@@ -4128,18 +4922,10 @@ need_step_over_p (struct inferior_list_e
    of the way.  If we let other threads run while we do that, they may
    pass by the breakpoint location and miss hitting it.  To avoid
    that, a step-over momentarily stops all threads while LWP is
-   single-stepped while the breakpoint is temporarily uninserted from
-   the inferior.  When the single-step finishes, we reinsert the
-   breakpoint, and let all threads that are supposed to be running,
-   run again.
-
-   On targets that don't support hardware single-step, we don't
-   currently support full software single-stepping.  Instead, we only
-   support stepping over the thread event breakpoint, by asking the
-   low target where to place a reinsert breakpoint.  Since this
-   routine assumes the breakpoint being stepped over is a thread event
-   breakpoint, it usually assumes the return address of the current
-   function is a good enough place to set the reinsert breakpoint.  */
+   single-stepped by either hardware or software while the breakpoint
+   is temporarily uninserted from the inferior.  When the single-step
+   finishes, we reinsert the breakpoint, and let all threads that are
+   supposed to be running, run again.  */
 
 static int
 start_step_over (struct lwp_info *lwp)
@@ -4154,7 +4940,13 @@ start_step_over (struct lwp_info *lwp)
 		  lwpid_of (thread));
 
   stop_all_lwps (1, lwp);
-  gdb_assert (lwp->suspended == 0);
+
+  if (lwp->suspended != 0)
+    {
+      internal_error (__FILE__, __LINE__,
+		      "LWP %ld suspended=%d\n", lwpid_of (thread),
+		      lwp->suspended);
+    }
 
   if (debug_threads)
     debug_printf ("Done stopping all threads for step-over.\n");
@@ -4172,16 +4964,7 @@ start_step_over (struct lwp_info *lwp)
   uninsert_breakpoints_at (pc);
   uninsert_fast_tracepoint_jumps_at (pc);
 
-  if (can_hardware_single_step ())
-    {
-      step = 1;
-    }
-  else
-    {
-      CORE_ADDR raddr = (*the_low_target.breakpoint_reinsert_addr) ();
-      set_reinsert_breakpoint (raddr);
-      step = 0;
-    }
+  step = single_step (lwp);
 
   current_thread = saved_thread;
 
@@ -4193,7 +4976,7 @@ start_step_over (struct lwp_info *lwp)
 }
 
 /* Finish a step-over.  Reinsert the breakpoint we had uninserted in
-   start_step_over, if still there, and delete any reinsert
+   start_step_over, if still there, and delete any single-step
    breakpoints we've set, on non hardware single-step targets.  */
 
 static int
@@ -4201,9 +4984,13 @@ finish_step_over (struct lwp_info *lwp)
 {
   if (lwp->bp_reinsert != 0)
     {
+      struct thread_info *saved_thread = current_thread;
+
       if (debug_threads)
 	debug_printf ("Finished step over.\n");
 
+      current_thread = get_lwp_thread (lwp);
+
       /* Reinsert any breakpoint at LWP->BP_REINSERT.  Note that there
 	 may be no breakpoint to reinsert there by now.  */
       reinsert_breakpoints_at (lwp->bp_reinsert);
@@ -4211,21 +4998,58 @@ finish_step_over (struct lwp_info *lwp)
 
       lwp->bp_reinsert = 0;
 
-      /* Delete any software-single-step reinsert breakpoints.  No
-	 longer needed.  We don't have to worry about other threads
-	 hitting this trap, and later not being able to explain it,
-	 because we were stepping over a breakpoint, and we hold all
-	 threads but LWP stopped while doing that.  */
+      /* Delete any single-step breakpoints.  No longer needed.  We
+	 don't have to worry about other threads hitting this trap,
+	 and later not being able to explain it, because we were
+	 stepping over a breakpoint, and we hold all threads but
+	 LWP stopped while doing that.  */
       if (!can_hardware_single_step ())
-	delete_reinsert_breakpoints ();
+	{
+	  gdb_assert (has_single_step_breakpoints (current_thread));
+	  delete_single_step_breakpoints (current_thread);
+	}
 
       step_over_bkpt = null_ptid;
+      current_thread = saved_thread;
       return 1;
     }
   else
     return 0;
 }
 
+/* If there's a step over in progress, wait until all threads stop
+   (that is, until the stepping thread finishes its step), and
+   unsuspend all lwps.  The stepping thread ends with its status
+   pending, which is processed later when we get back to processing
+   events.  */
+
+static void
+complete_ongoing_step_over (void)
+{
+  if (!ptid_equal (step_over_bkpt, null_ptid))
+    {
+      struct lwp_info *lwp;
+      int wstat;
+      int ret;
+
+      if (debug_threads)
+	debug_printf ("detach: step over in progress, finish it first\n");
+
+      /* Passing NULL_PTID as filter indicates we want all events to
+	 be left pending.  Eventually this returns when there are no
+	 unwaited-for children left.  */
+      ret = linux_wait_for_event_filtered (minus_one_ptid, null_ptid,
+					   &wstat, __WALL);
+      gdb_assert (ret == -1);
+
+      lwp = find_lwp_pid (step_over_bkpt);
+      if (lwp != NULL)
+	finish_step_over (lwp);
+      step_over_bkpt = null_ptid;
+      unsuspend_all_lwps (lwp);
+    }
+}
+
 /* This function is called once per thread.  We check the thread's resume
    request, which will tell us whether to resume, step, or leave the thread
    stopped; and what signal, if any, it should be sent.
@@ -4244,7 +5068,6 @@ linux_resume_one_thread (struct inferior
 {
   struct thread_info *thread = (struct thread_info *) entry;
   struct lwp_info *lwp = get_thread_lwp (thread);
-  int step;
   int leave_all_stopped = * (int *) arg;
   int leave_pending;
 
@@ -4300,47 +5123,46 @@ linux_resume_one_thread (struct inferior
     }
 
   /* If this thread which is about to be resumed has a pending status,
-     then don't resume any threads - we can just report the pending
-     status.  Make sure to queue any signals that would otherwise be
-     sent.  In all-stop mode, we do this decision based on if *any*
-     thread has a pending status.  If there's a thread that needs the
-     step-over-breakpoint dance, then don't resume any other thread
-     but that particular one.  */
-  leave_pending = (lwp->status_pending_p || leave_all_stopped);
+     then don't resume it - we can just report the pending status.
+     Likewise if it is suspended, because e.g., another thread is
+     stepping past a breakpoint.  Make sure to queue any signals that
+     would otherwise be sent.  In all-stop mode, we do this decision
+     based on if *any* thread has a pending status.  If there's a
+     thread that needs the step-over-breakpoint dance, then don't
+     resume any other thread but that particular one.  */
+  leave_pending = (lwp->suspended
+		   || lwp->status_pending_p
+		   || leave_all_stopped);
+
+  /* If we have a new signal, enqueue the signal.  */
+  if (lwp->resume->sig != 0)
+    {
+      siginfo_t info, *info_p;
+
+      /* If this is the same signal we were previously stopped by,
+	 make sure to queue its siginfo.  */
+      if (WIFSTOPPED (lwp->last_status)
+	  && WSTOPSIG (lwp->last_status) == lwp->resume->sig
+	  && ptrace (PTRACE_GETSIGINFO, lwpid_of (thread),
+		     (PTRACE_TYPE_ARG3) 0, &info) == 0)
+	info_p = &info;
+      else
+	info_p = NULL;
+
+      enqueue_pending_signal (lwp, lwp->resume->sig, info_p);
+    }
 
   if (!leave_pending)
     {
       if (debug_threads)
 	debug_printf ("resuming LWP %ld\n", lwpid_of (thread));
 
-      step = (lwp->resume->kind == resume_step);
-      linux_resume_one_lwp (lwp, step, lwp->resume->sig, NULL);
+      proceed_one_lwp (entry, NULL);
     }
   else
     {
       if (debug_threads)
 	debug_printf ("leaving LWP %ld stopped\n", lwpid_of (thread));
-
-      /* If we have a new signal, enqueue the signal.  */
-      if (lwp->resume->sig != 0)
-	{
-	  struct pending_signals *p_sig;
-	  p_sig = xmalloc (sizeof (*p_sig));
-	  p_sig->prev = lwp->pending_signals;
-	  p_sig->signal = lwp->resume->sig;
-	  memset (&p_sig->info, 0, sizeof (siginfo_t));
-
-	  /* If this is the same signal we were previously stopped by,
-	     make sure to queue its siginfo.  We can ignore the return
-	     value of ptrace; if it fails, we'll skip
-	     PTRACE_SETSIGINFO.  */
-	  if (WIFSTOPPED (lwp->last_status)
-	      && WSTOPSIG (lwp->last_status) == lwp->resume->sig)
-	    ptrace (PTRACE_GETSIGINFO, lwpid_of (thread), (PTRACE_TYPE_ARG3) 0,
-		    &p_sig->info);
-
-	  lwp->pending_signals = p_sig;
-	}
     }
 
   thread->last_status.kind = TARGET_WAITKIND_IGNORE;
@@ -4410,6 +5232,11 @@ linux_resume (struct thread_resume *resu
       debug_printf ("linux_resume done\n");
       debug_exit ();
     }
+
+  /* We may have events that were pending that can/should be sent to
+     the client now.  Trigger a linux_wait call.  */
+  if (target_is_async_p ())
+    async_file_mark ();
 }
 
 /* This function is called once per thread.  We check the thread's
@@ -4489,7 +5316,32 @@ proceed_one_lwp (struct inferior_list_en
       send_sigstop (lwp);
     }
 
-  step = thread->last_resume_kind == resume_step;
+  if (thread->last_resume_kind == resume_step)
+    {
+      if (debug_threads)
+	debug_printf ("   stepping LWP %ld, client wants it stepping\n",
+		      lwpid_of (thread));
+
+      /* If resume_step is requested by GDB, install single-step
+	 breakpoints when the thread is about to be actually resumed if
+	 the single-step breakpoints weren't removed.  */
+      if (can_software_single_step ()
+	  && !has_single_step_breakpoints (thread))
+	install_software_single_step_breakpoints (lwp);
+
+      step = maybe_hw_step (thread);
+    }
+  else if (lwp->bp_reinsert != 0)
+    {
+      if (debug_threads)
+	debug_printf ("   stepping LWP %ld, reinsert set\n",
+		      lwpid_of (thread));
+
+      step = maybe_hw_step (thread);
+    }
+  else
+    step = 0;
+
   linux_resume_one_lwp (lwp, step, 0, NULL);
   return 0;
 }
@@ -4503,8 +5355,7 @@ unsuspend_and_proceed_one_lwp (struct in
   if (lwp == except)
     return 0;
 
-  lwp->suspended--;
-  gdb_assert (lwp->suspended >= 0);
+  lwp_suspended_decr (lwp);
 
   return proceed_one_lwp (entry, except);
 }
@@ -4599,7 +5450,7 @@ disable_regset (struct regsets_info *inf
 
   dr_offset = regset - info->regsets;
   if (info->disabled_regsets == NULL)
-    info->disabled_regsets = xcalloc (1, info->num_regsets);
+    info->disabled_regsets = (char *) xcalloc (1, info->num_regsets);
   info->disabled_regsets[dr_offset] = 1;
 }
 
@@ -4653,6 +5504,12 @@ regsets_fetch_inferior_registers (struct
 		 not "active".  This can happen in normal operation,
 		 so suppress the warning in this case.  */
 	    }
+	  else if (errno == ESRCH)
+	    {
+	      /* At this point, ESRCH should mean the process is
+		 already gone, in which case we simply ignore attempts
+		 to read its registers.  */
+	    }
 	  else
 	    {
 	      char s[256];
@@ -4787,7 +5644,7 @@ linux_register_in_regsets (const struct 
 
 #ifdef HAVE_LINUX_USRREGS
 
-int
+static int
 register_addr (const struct usrregs_info *usrregs, int regnum)
 {
   int addr;
@@ -4822,7 +5679,7 @@ fetch_register (const struct usrregs_inf
   size = ((register_size (regcache->tdesc, regno)
 	   + sizeof (PTRACE_XFER_TYPE) - 1)
 	  & -sizeof (PTRACE_XFER_TYPE));
-  buf = alloca (size);
+  buf = (char *) alloca (size);
 
   pid = lwpid_of (current_thread);
   for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE))
@@ -4866,7 +5723,7 @@ store_register (const struct usrregs_inf
   size = ((register_size (regcache->tdesc, regno)
 	   + sizeof (PTRACE_XFER_TYPE) - 1)
 	  & -sizeof (PTRACE_XFER_TYPE));
-  buf = alloca (size);
+  buf = (char *) alloca (size);
   memset (buf, 0, size);
 
   if (the_low_target.collect_ptrace_register)
@@ -4949,7 +5806,7 @@ usr_store_inferior_registers (const stru
 #endif
 
 
-void
+static void
 linux_fetch_registers (struct regcache *regcache, int regno)
 {
   int use_regsets;
@@ -4982,7 +5839,7 @@ linux_fetch_registers (struct regcache *
     }
 }
 
-void
+static void
 linux_store_registers (struct regcache *regcache, int regno)
 {
   int use_regsets;
@@ -5067,7 +5924,7 @@ linux_read_memory (CORE_ADDR memaddr, un
   count = ((((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1)
 	   / sizeof (PTRACE_XFER_TYPE));
   /* Allocate buffer of that many longwords.  */
-  buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
+  buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count);
 
   /* Read all the longwords */
   errno = 0;
@@ -5112,8 +5969,7 @@ linux_write_memory (CORE_ADDR memaddr, c
     / sizeof (PTRACE_XFER_TYPE);
 
   /* Allocate buffer of that many longwords.  */
-  register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *)
-    alloca (count * sizeof (PTRACE_XFER_TYPE));
+  register PTRACE_XFER_TYPE *buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count);
 
   int pid = lwpid_of (current_thread);
 
@@ -5126,15 +5982,19 @@ linux_write_memory (CORE_ADDR memaddr, c
   if (debug_threads)
     {
       /* Dump up to four bytes.  */
-      unsigned int val = * (unsigned int *) myaddr;
-      if (len == 1)
-	val = val & 0xff;
-      else if (len == 2)
-	val = val & 0xffff;
-      else if (len == 3)
-	val = val & 0xffffff;
-      debug_printf ("Writing %0*x to 0x%08lx in process %d\n",
-		    2 * ((len < 4) ? len : 4), val, (long)memaddr, pid);
+      char str[4 * 2 + 1];
+      char *p = str;
+      int dump = len < 4 ? len : 4;
+
+      for (i = 0; i < dump; i++)
+	{
+	  sprintf (p, "%02x", myaddr[i]);
+	  p += 2;
+	}
+      *p = '\0';
+
+      debug_printf ("Writing %s to 0x%08lx in process %d\n",
+		    str, (long) memaddr, pid);
     }
 
   /* Fill start and end extra bytes of buffer with existing memory data.  */
@@ -5193,10 +6053,7 @@ linux_look_up_symbols (void)
   if (proc->priv->thread_db != NULL)
     return;
 
-  /* If the kernel supports tracing clones, then we don't need to
-     use the magic thread event breakpoint to learn about
-     threads.  */
-  thread_db_init (!linux_supports_traceclone ());
+  thread_db_init ();
 #endif
 }
 
@@ -5314,20 +6171,21 @@ linux_supports_stopped_by_hw_breakpoint 
   return USE_SIGTRAP_SIGINFO;
 }
 
-/* Implement the supports_conditional_breakpoints target_ops
-   method.  */
+/* Implement the supports_hardware_single_step target_ops method.  */
 
 static int
-linux_supports_conditional_breakpoints (void)
+linux_supports_hardware_single_step (void)
 {
-  /* GDBserver needs to step over the breakpoint if the condition is
-     false.  GDBserver software single step is too simple, so disable
-     conditional breakpoints if the target doesn't have hardware single
-     step.  */
   return can_hardware_single_step ();
 }
 
 static int
+linux_supports_software_single_step (void)
+{
+  return can_software_single_step ();
+}
+
+static int
 linux_stopped_by_watchpoint (void)
 {
   struct lwp_info *lwp = get_thread_lwp (current_thread);
@@ -5402,7 +6260,7 @@ linux_qxfer_osdata (const char *annex,
    layout of the inferiors' architecture.  */
 
 static void
-siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction)
+siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
 {
   int done = 0;
 
@@ -5426,7 +6284,7 @@ linux_xfer_siginfo (const char *annex, u
 {
   int pid;
   siginfo_t siginfo;
-  char inf_siginfo[sizeof (siginfo_t)];
+  gdb_byte inf_siginfo[sizeof (siginfo_t)];
 
   if (current_thread == NULL)
     return -1;
@@ -5591,6 +6449,14 @@ linux_supports_vfork_events (void)
   return linux_supports_tracefork ();
 }
 
+/* Check if exec events are supported.  */
+
+static int
+linux_supports_exec_events (void)
+{
+  return linux_supports_traceexec ();
+}
+
 /* Callback for 'find_inferior'.  Set the (possibly changed) ptrace
    options for the specified lwp.  */
 
@@ -5652,6 +6518,8 @@ linux_supports_agent (void)
 static int
 linux_supports_range_stepping (void)
 {
+  if (can_software_single_step ())
+    return 1;
   if (*the_low_target.supports_range_stepping == NULL)
     return 0;
 
@@ -5830,10 +6698,26 @@ linux_read_loadmap (const char *annex, C
 #endif /* defined PT_GETDSBT || defined PTRACE_GETFDPIC */
 
 static void
-linux_process_qsupported (const char *query)
+linux_process_qsupported (char **features, int count)
 {
   if (the_low_target.process_qsupported != NULL)
-    the_low_target.process_qsupported (query);
+    the_low_target.process_qsupported (features, count);
+}
+
+static int
+linux_supports_catch_syscall (void)
+{
+  return (the_low_target.get_syscall_trapinfo != NULL
+	  && linux_supports_tracesysgood ());
+}
+
+static int
+linux_get_ipa_tdesc_idx (void)
+{
+  if (the_low_target.get_ipa_tdesc_idx == NULL)
+    return 0;
+
+  return (*the_low_target.get_ipa_tdesc_idx) ();
 }
 
 static int
@@ -6021,7 +6905,7 @@ get_dynamic (const int pid, const int is
     return 0;
 
   gdb_assert (num_phdr < 100);  /* Basic sanity check.  */
-  phdr_buf = alloca (num_phdr * phdr_size);
+  phdr_buf = (unsigned char *) alloca (num_phdr * phdr_size);
 
   if (linux_read_memory (phdr_memaddr, phdr_buf, num_phdr * phdr_size))
     return 0;
@@ -6103,14 +6987,15 @@ get_r_debug (const int pid, const int is
       if (is_elf64)
 	{
 	  Elf64_Dyn *const dyn = (Elf64_Dyn *) buf;
-#ifdef DT_MIPS_RLD_MAP
+#if defined DT_MIPS_RLD_MAP || defined DT_MIPS_RLD_MAP_REL
 	  union
 	    {
 	      Elf64_Xword map;
 	      unsigned char buf[sizeof (Elf64_Xword)];
 	    }
 	  rld_map;
-
+#endif
+#ifdef DT_MIPS_RLD_MAP
 	  if (dyn->d_tag == DT_MIPS_RLD_MAP)
 	    {
 	      if (linux_read_memory (dyn->d_un.d_val,
@@ -6120,6 +7005,16 @@ get_r_debug (const int pid, const int is
 		break;
 	    }
 #endif	/* DT_MIPS_RLD_MAP */
+#ifdef DT_MIPS_RLD_MAP_REL
+	  if (dyn->d_tag == DT_MIPS_RLD_MAP_REL)
+	    {
+	      if (linux_read_memory (dyn->d_un.d_val + dynamic_memaddr,
+				     rld_map.buf, sizeof (rld_map.buf)) == 0)
+		return rld_map.map;
+	      else
+		break;
+	    }
+#endif	/* DT_MIPS_RLD_MAP_REL */
 
 	  if (dyn->d_tag == DT_DEBUG && map == -1)
 	    map = dyn->d_un.d_val;
@@ -6130,14 +7025,15 @@ get_r_debug (const int pid, const int is
       else
 	{
 	  Elf32_Dyn *const dyn = (Elf32_Dyn *) buf;
-#ifdef DT_MIPS_RLD_MAP
+#if defined DT_MIPS_RLD_MAP || defined DT_MIPS_RLD_MAP_REL
 	  union
 	    {
 	      Elf32_Word map;
 	      unsigned char buf[sizeof (Elf32_Word)];
 	    }
 	  rld_map;
-
+#endif
+#ifdef DT_MIPS_RLD_MAP
 	  if (dyn->d_tag == DT_MIPS_RLD_MAP)
 	    {
 	      if (linux_read_memory (dyn->d_un.d_val,
@@ -6147,6 +7043,16 @@ get_r_debug (const int pid, const int is
 		break;
 	    }
 #endif	/* DT_MIPS_RLD_MAP */
+#ifdef DT_MIPS_RLD_MAP_REL
+	  if (dyn->d_tag == DT_MIPS_RLD_MAP_REL)
+	    {
+	      if (linux_read_memory (dyn->d_un.d_val + dynamic_memaddr,
+				     rld_map.buf, sizeof (rld_map.buf)) == 0)
+		return rld_map.map;
+	      else
+		break;
+	    }
+#endif	/* DT_MIPS_RLD_MAP_REL */
 
 	  if (dyn->d_tag == DT_DEBUG && map == -1)
 	    map = dyn->d_un.d_val;
@@ -6328,7 +7234,7 @@ linux_qxfer_libraries_svr4 (const char *
 	}
     }
 
-  document = xmalloc (allocated);
+  document = (char *) xmalloc (allocated);
   strcpy (document, "<library-list-svr4 version=\"1.0\"");
   p = document + strlen (document);
 
@@ -6389,7 +7295,7 @@ linux_qxfer_libraries_svr4 (const char *
 		  /* Expand to guarantee sufficient storage.  */
 		  uintptr_t document_len = p - document;
 
-		  document = xrealloc (document, 2 * allocated);
+		  document = (char *) xrealloc (document, 2 * allocated);
 		  allocated *= 2;
 		  p = document + document_len;
 		}
@@ -6431,26 +7337,6 @@ linux_qxfer_libraries_svr4 (const char *
 
 #ifdef HAVE_LINUX_BTRACE
 
-/* See to_enable_btrace target method.  */
-
-static struct btrace_target_info *
-linux_low_enable_btrace (ptid_t ptid, const struct btrace_config *conf)
-{
-  struct btrace_target_info *tinfo;
-
-  tinfo = linux_enable_btrace (ptid, conf);
-
-  if (tinfo != NULL && tinfo->ptr_bits == 0)
-    {
-      struct thread_info *thread = find_thread_ptid (ptid);
-      struct regcache *regcache = get_thread_regcache (thread, 0);
-
-      tinfo->ptr_bits = register_size (regcache->tdesc, 0) * 8;
-    }
-
-  return tinfo;
-}
-
 /* See to_disable_btrace target method.  */
 
 static int
@@ -6462,7 +7348,7 @@ linux_low_disable_btrace (struct btrace_
   return (err == BTRACE_ERR_NONE ? 0 : -1);
 }
 
-/* Encode an Intel(R) Processor Trace configuration.  */
+/* Encode an Intel Processor Trace configuration.  */
 
 static void
 linux_low_encode_pt_config (struct buffer *buffer,
@@ -6515,7 +7401,7 @@ linux_low_encode_raw (struct buffer *buf
 
 static int
 linux_low_read_btrace (struct btrace_target_info *tinfo, struct buffer *buffer,
-		       int type)
+		       enum btrace_read_type type)
 {
   struct btrace_data btrace;
   struct btrace_block *block;
@@ -6627,8 +7513,93 @@ current_lwp_ptid (void)
   return ptid_of (current_thread);
 }
 
+/* Implementation of the target_ops method "breakpoint_kind_from_pc".  */
+
+static int
+linux_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+  if (the_low_target.breakpoint_kind_from_pc != NULL)
+    return (*the_low_target.breakpoint_kind_from_pc) (pcptr);
+  else
+    return default_breakpoint_kind_from_pc (pcptr);
+}
+
+/* Implementation of the target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+linux_sw_breakpoint_from_kind (int kind, int *size)
+{
+  gdb_assert (the_low_target.sw_breakpoint_from_kind != NULL);
+
+  return (*the_low_target.sw_breakpoint_from_kind) (kind, size);
+}
+
+/* Implementation of the target_ops method
+   "breakpoint_kind_from_current_state".  */
+
+static int
+linux_breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
+{
+  if (the_low_target.breakpoint_kind_from_current_state != NULL)
+    return (*the_low_target.breakpoint_kind_from_current_state) (pcptr);
+  else
+    return linux_breakpoint_kind_from_pc (pcptr);
+}
+
+/* Default implementation of linux_target_ops method "set_pc" for
+   32-bit pc register which is literally named "pc".  */
+
+void
+linux_set_pc_32bit (struct regcache *regcache, CORE_ADDR pc)
+{
+  uint32_t newpc = pc;
+
+  supply_register_by_name (regcache, "pc", &newpc);
+}
+
+/* Default implementation of linux_target_ops method "get_pc" for
+   32-bit pc register which is literally named "pc".  */
+
+CORE_ADDR
+linux_get_pc_32bit (struct regcache *regcache)
+{
+  uint32_t pc;
+
+  collect_register_by_name (regcache, "pc", &pc);
+  if (debug_threads)
+    debug_printf ("stop pc is 0x%" PRIx32 "\n", pc);
+  return pc;
+}
+
+/* Default implementation of linux_target_ops method "set_pc" for
+   64-bit pc register which is literally named "pc".  */
+
+void
+linux_set_pc_64bit (struct regcache *regcache, CORE_ADDR pc)
+{
+  uint64_t newpc = pc;
+
+  supply_register_by_name (regcache, "pc", &newpc);
+}
+
+/* Default implementation of linux_target_ops method "get_pc" for
+   64-bit pc register which is literally named "pc".  */
+
+CORE_ADDR
+linux_get_pc_64bit (struct regcache *regcache)
+{
+  uint64_t pc;
+
+  collect_register_by_name (regcache, "pc", &pc);
+  if (debug_threads)
+    debug_printf ("stop pc is 0x%" PRIx64 "\n", pc);
+  return pc;
+}
+
+
 static struct target_ops linux_target_ops = {
   linux_create_inferior,
+  linux_post_create_inferior,
   linux_attach,
   linux_kill,
   linux_detach,
@@ -6653,7 +7624,7 @@ static struct target_ops linux_target_op
   linux_supports_stopped_by_sw_breakpoint,
   linux_stopped_by_hw_breakpoint,
   linux_supports_stopped_by_hw_breakpoint,
-  linux_supports_conditional_breakpoints,
+  linux_supports_hardware_single_step,
   linux_stopped_by_watchpoint,
   linux_stopped_data_address,
 #if defined(__UCLIBC__) && defined(HAS_NOMMU)	      \
@@ -6678,6 +7649,7 @@ static struct target_ops linux_target_op
   linux_supports_multi_process,
   linux_supports_fork_events,
   linux_supports_vfork_events,
+  linux_supports_exec_events,
   linux_handle_new_gdb_connection,
 #ifdef USE_THREAD_DB
   thread_db_handle_monitor_command,
@@ -6703,7 +7675,7 @@ static struct target_ops linux_target_op
   linux_supports_agent,
 #ifdef HAVE_LINUX_BTRACE
   linux_supports_btrace,
-  linux_low_enable_btrace,
+  linux_enable_btrace,
   linux_low_disable_btrace,
   linux_low_read_btrace,
   linux_low_btrace_conf,
@@ -6719,18 +7691,15 @@ static struct target_ops linux_target_op
   linux_mntns_open_cloexec,
   linux_mntns_unlink,
   linux_mntns_readlink,
+  linux_breakpoint_kind_from_pc,
+  linux_sw_breakpoint_from_kind,
+  linux_proc_tid_get_name,
+  linux_breakpoint_kind_from_current_state,
+  linux_supports_software_single_step,
+  linux_supports_catch_syscall,
+  linux_get_ipa_tdesc_idx,
 };
 
-static void
-linux_init_signals ()
-{
-  /* FIXME drow/2002-06-09: As above, we should check with LinuxThreads
-     to find what the cancel signal actually is.  */
-#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does.  */
-  signal (__SIGRTMIN+1, SIG_IGN);
-#endif
-}
-
 #ifdef HAVE_LINUX_REGSETS
 void
 initialize_regsets_info (struct regsets_info *info)
@@ -6746,11 +7715,10 @@ void
 initialize_low (void)
 {
   struct sigaction sigchld_action;
+
   memset (&sigchld_action, 0, sizeof (sigchld_action));
   set_target_ops (&linux_target_ops);
-  set_breakpoint_data (the_low_target.breakpoint,
-		       the_low_target.breakpoint_len);
-  linux_init_signals ();
+
   linux_ptrace_init_warnings ();
 
   sigchld_action.sa_handler = sigchld_handler;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-low.h ./gdb/gdbserver/linux-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Internal interfaces for the GNU/Linux specific target code for gdbserver.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,6 +38,11 @@ enum regset_type {
   EXTENDED_REGS,
 };
 
+/* The arch's regsets array initializer must be terminated with a NULL
+   regset.  */
+#define NULL_REGSET \
+  { 0, 0, 0, -1, (enum regset_type) -1, NULL, NULL }
+
 struct regset_info
 {
   int get_request, set_request;
@@ -115,11 +120,6 @@ struct process_info_private
 
   /* &_r_debug.  0 if not yet determined.  -1 if no PT_DYNAMIC in Phdrs.  */
   CORE_ADDR r_debug;
-
-  /* This flag is true iff we've just created or attached to the first
-     LWP of this process but it has not stopped yet.  As soon as it
-     does, we need to call the low target's arch_setup callback.  */
-  int new_inferior;
 };
 
 struct lwp_info;
@@ -146,9 +146,15 @@ struct linux_target_ops
 
   CORE_ADDR (*get_pc) (struct regcache *regcache);
   void (*set_pc) (struct regcache *regcache, CORE_ADDR newpc);
-  const unsigned char *breakpoint;
-  int breakpoint_len;
-  CORE_ADDR (*breakpoint_reinsert_addr) (void);
+
+  /* See target.h for details.  */
+  int (*breakpoint_kind_from_pc) (CORE_ADDR *pcptr);
+
+  /* See target.h for details.  */
+  const gdb_byte *(*sw_breakpoint_from_kind) (int kind, int *size);
+
+  /* Find the next possible PCs after the current instruction executes.  */
+  VEC (CORE_ADDR) *(*get_next_pcs) (struct regcache *regcache);
 
   int decr_pc_after_break;
   int (*breakpoint_at) (CORE_ADDR pc);
@@ -175,7 +181,7 @@ struct linux_target_ops
      Returns true if any conversion was done; false otherwise.
      If DIRECTION is 1, then copy from INF to NATIVE.
      If DIRECTION is 0, copy from NATIVE to INF.  */
-  int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction);
+  int (*siginfo_fixup) (siginfo_t *native, gdb_byte *inf, int direction);
 
   /* Hook to call when a new process is created or attached to.
      If extra per-process architecture-specific data is needed,
@@ -194,7 +200,7 @@ struct linux_target_ops
   void (*prepare_to_resume) (struct lwp_info *);
 
   /* Hook to support target specific qSupported.  */
-  void (*process_qsupported) (const char *);
+  void (*process_qsupported) (char **, int count);
 
   /* Returns true if the low target supports tracepoints.  */
   int (*supports_tracepoints) (void);
@@ -228,6 +234,19 @@ struct linux_target_ops
 
   /* Returns true if the low target supports range stepping.  */
   int (*supports_range_stepping) (void);
+
+  /* See target.h.  */
+  int (*breakpoint_kind_from_current_state) (CORE_ADDR *pcptr);
+
+  /* See target.h.  */
+  int (*supports_hardware_single_step) (void);
+
+  /* Fill *SYSNO with the syscall nr trapped.  Only to be called when
+     inferior is stopped due to SYSCALL_SIGTRAP.  */
+  void (*get_syscall_trapinfo) (struct regcache *regcache, int *sysno);
+
+  /* See target.h.  */
+  int (*get_ipa_tdesc_idx) (void);
 };
 
 extern struct linux_target_ops the_low_target;
@@ -266,18 +285,28 @@ struct lwp_info
      event already received in a wait()).  */
   int stopped;
 
-  /* If this flag is set, the lwp is known to be dead already (exit
-     event already received in a wait(), and is cached in
-     status_pending).  */
-  int dead;
+  /* Signal whether we are in a SYSCALL_ENTRY or
+     in a SYSCALL_RETURN event.
+     Values:
+     - TARGET_WAITKIND_SYSCALL_ENTRY
+     - TARGET_WAITKIND_SYSCALL_RETURN */
+  enum target_waitkind syscall_state;
 
   /* When stopped is set, the last wait status recorded for this lwp.  */
   int last_status;
 
-  /* This is used to store extended ptrace event information until
-     it is reported to GDB.  */
+  /* If WAITSTATUS->KIND != TARGET_WAITKIND_IGNORE, the waitstatus for
+     this LWP's last event, to pass to GDB without any further
+     processing.  This is used to store extended ptrace event
+     information or exit status until it can be reported to GDB.  */
   struct target_waitstatus waitstatus;
 
+  /* A pointer to the fork child/parent relative.  Valid only while
+     the parent fork event is not reported to higher layers.  Used to
+     avoid wildcard vCont actions resuming a fork child before GDB is
+     notified about the parent's fork event.  */
+  struct lwp_info *fork_relative;
+
   /* When stopped is set, this is where the lwp last stopped, with
      decr_pc_after_break already accounted for.  If the LWP is
      running, this is the address at which the lwp was resumed.  */
@@ -340,10 +369,6 @@ struct lwp_info
      a exit-jump-pad-quickly breakpoint.  This is it.  */
   struct breakpoint *exit_jump_pad_bkpt;
 
-  /* True if the LWP was seen stop at an internal breakpoint and needs
-     stepping over later when it is resumed.  */
-  int need_step_over;
-
 #ifdef USE_THREAD_DB
   int thread_known;
   /* The thread handle, used for e.g. TLS access.  Only valid if
@@ -370,11 +395,19 @@ void initialize_regsets_info (struct reg
 
 void initialize_low_arch (void);
 
+void linux_set_pc_32bit (struct regcache *regcache, CORE_ADDR pc);
+CORE_ADDR linux_get_pc_32bit (struct regcache *regcache);
+
+void linux_set_pc_64bit (struct regcache *regcache, CORE_ADDR pc);
+CORE_ADDR linux_get_pc_64bit (struct regcache *regcache);
+
 /* From thread-db.c  */
-int thread_db_init (int use_events);
+int thread_db_init (void);
 void thread_db_detach (struct process_info *);
 void thread_db_mourn (struct process_info *);
 int thread_db_handle_monitor_command (char *);
 int thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset,
 			       CORE_ADDR load_module, CORE_ADDR *address);
 int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp);
+
+extern int have_ptrace_getregset;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-m32r-low.c ./gdb/gdbserver/linux-m32r-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-m32r-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-m32r-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/m32r specific low level interface, for the remote server for GDB.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,26 +53,18 @@ m32r_cannot_fetch_register (int regno)
   return (regno >= m32r_num_regs);
 }
 
-static CORE_ADDR
-m32r_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
-}
+static const unsigned short m32r_breakpoint = 0x10f1;
+#define m32r_breakpoint_len 2
 
-static void
-m32r_set_pc (struct regcache *regcache, CORE_ADDR pc)
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+m32r_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = m32r_breakpoint_len;
+  return (const gdb_byte *) &m32r_breakpoint;
 }
 
-static const unsigned short m32r_breakpoint = 0x10f1;
-#define m32r_breakpoint_len 2
-
 static int
 m32r_breakpoint_at (CORE_ADDR where)
 {
@@ -94,6 +86,14 @@ m32r_arch_setup (void)
   current_process ()->tdesc = tdesc_m32r;
 }
 
+/* Support for hardware single step.  */
+
+static int
+m32r_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct usrregs_info m32r_usrregs_info =
   {
     m32r_num_regs,
@@ -118,13 +118,34 @@ struct linux_target_ops the_low_target =
   m32r_cannot_fetch_register,
   m32r_cannot_store_register,
   NULL, /* fetch_register */
-  m32r_get_pc,
-  m32r_set_pc,
-  (const unsigned char *) &m32r_breakpoint,
-  m32r_breakpoint_len,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_from_pc */
+  m32r_sw_breakpoint_from_kind,
   NULL,
   0,
   m32r_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  m32r_supports_hardware_single_step,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-m68k-low.c ./gdb/gdbserver/linux-m68k-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-m68k-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-m68k-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/m68k specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -68,7 +68,7 @@ m68k_cannot_fetch_register (int regno)
 
 #ifdef HAVE_PTRACE_GETREGS
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 static void
 m68k_fill_gregset (struct regcache *regcache, void *buf)
@@ -119,27 +119,19 @@ static struct regset_info m68k_regsets[]
     FP_REGS,
     m68k_fill_fpregset, m68k_store_fpregset },
 #endif /* HAVE_PTRACE_GETREGS */
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
-static const unsigned char m68k_breakpoint[] = { 0x4E, 0x4F };
+static const gdb_byte m68k_breakpoint[] = { 0x4E, 0x4F };
 #define m68k_breakpoint_len 2
 
-static CORE_ADDR
-m68k_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-
-  collect_register_by_name (regcache, "pc", &pc);
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-m68k_set_pc (struct regcache *regcache, CORE_ADDR value)
+static const gdb_byte *
+m68k_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = value;
-
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = m68k_breakpoint_len;
+  return m68k_breakpoint;
 }
 
 static int
@@ -160,7 +152,7 @@ m68k_breakpoint_at (CORE_ADDR pc)
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -213,10 +205,10 @@ struct linux_target_ops the_low_target =
   m68k_cannot_fetch_register,
   m68k_cannot_store_register,
   NULL, /* fetch_register */
-  m68k_get_pc,
-  m68k_set_pc,
-  m68k_breakpoint,
-  m68k_breakpoint_len,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  m68k_sw_breakpoint_from_kind,
   NULL,
   2,
   m68k_breakpoint_at,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-mips-low.c ./gdb/gdbserver/linux-mips-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-mips-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-mips-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/MIPS specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,7 @@
 #include "server.h"
 #include "linux-low.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <endian.h>
 
 #include "nat/mips-linux-watch.h"
@@ -266,16 +266,13 @@ mips_set_pc (struct regcache *regcache, 
 static const unsigned int mips_breakpoint = 0x0005000d;
 #define mips_breakpoint_len 4
 
-/* We only place breakpoints in empty marker functions, and thread locking
-   is outside of the function.  So rather than importing software single-step,
-   we can just run until exit.  */
-static CORE_ADDR
-mips_reinsert_addr (void)
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+mips_sw_breakpoint_from_kind (int kind, int *size)
 {
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  union mips_register ra;
-  collect_register_by_name (regcache, "r31", ra.buf);
-  return register_size (regcache->tdesc, 0) == 4 ? ra.reg32 : ra.reg64;
+  *size = mips_breakpoint_len;
+  return (const gdb_byte *) &mips_breakpoint;
 }
 
 static int
@@ -325,7 +322,7 @@ update_watch_registers_callback (struct 
 static struct arch_process_info *
 mips_linux_new_process (void)
 {
-  struct arch_process_info *info = xcalloc (1, sizeof (*info));
+  struct arch_process_info *info = XCNEW (struct arch_process_info);
 
   return info;
 }
@@ -337,7 +334,7 @@ mips_linux_new_process (void)
 static void
 mips_linux_new_thread (struct lwp_info *lwp)
 {
-  struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
+  struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
 
   info->watch_registers_changed = 1;
 
@@ -347,19 +344,19 @@ mips_linux_new_thread (struct lwp_info *
 /* Create a new mips_watchpoint and add it to the list.  */
 
 static void
-mips_add_watchpoint (struct arch_process_info *private, CORE_ADDR addr,
-		     int len, int watch_type)
+mips_add_watchpoint (struct arch_process_info *priv, CORE_ADDR addr, int len,
+		     enum target_hw_bp_type watch_type)
 {
   struct mips_watchpoint *new_watch;
   struct mips_watchpoint **pw;
 
-  new_watch = xmalloc (sizeof (struct mips_watchpoint));
+  new_watch = XNEW (struct mips_watchpoint);
   new_watch->addr = addr;
   new_watch->len = len;
   new_watch->type = watch_type;
   new_watch->next = NULL;
 
-  pw = &private->current_watches;
+  pw = &priv->current_watches;
   while (*pw != NULL)
     pw = &(*pw)->next;
   *pw = new_watch;
@@ -427,7 +424,7 @@ mips_linux_prepare_to_resume (struct lwp
 	  int tid = ptid_get_lwp (ptid);
 
 	  if (-1 == ptrace (PTRACE_SET_WATCH_REGS, tid,
-			    &priv->watch_mirror))
+			    &priv->watch_mirror, NULL))
 	    perror_with_name ("Couldn't write watch register");
 	}
 
@@ -640,7 +637,7 @@ mips_stopped_data_address (void)
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -715,7 +712,7 @@ mips_supply_register_32bit (struct regca
 static void
 mips_fill_gregset (struct regcache *regcache, void *buf)
 {
-  union mips_register *regset = buf;
+  union mips_register *regset = (union mips_register *) buf;
   int i, use_64bit;
   const struct target_desc *tdesc = regcache->tdesc;
 
@@ -744,7 +741,7 @@ mips_fill_gregset (struct regcache *regc
 static void
 mips_store_gregset (struct regcache *regcache, const void *buf)
 {
-  const union mips_register *regset = buf;
+  const union mips_register *regset = (const union mips_register *) buf;
   int i, use_64bit;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -772,7 +769,7 @@ mips_store_gregset (struct regcache *reg
 static void
 mips_fill_fpregset (struct regcache *regcache, void *buf)
 {
-  union mips_register *regset = buf;
+  union mips_register *regset = (union mips_register *) buf;
   int i, use_64bit, first_fp, big_endian;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -797,7 +794,7 @@ mips_fill_fpregset (struct regcache *reg
 static void
 mips_store_fpregset (struct regcache *regcache, const void *buf)
 {
-  const union mips_register *regset = buf;
+  const union mips_register *regset = (const union mips_register *) buf;
   int i, use_64bit, first_fp, big_endian;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -828,7 +825,7 @@ static struct regset_info mips_regsets[]
   { PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0, 33 * 8, FP_REGS,
     mips_fill_fpregset, mips_store_fpregset },
 #endif /* HAVE_PTRACE_GETREGS */
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info mips_regsets_info =
@@ -881,9 +878,9 @@ struct linux_target_ops the_low_target =
   NULL, /* fetch_register */
   mips_get_pc,
   mips_set_pc,
-  (const unsigned char *) &mips_breakpoint,
-  mips_breakpoint_len,
-  mips_reinsert_addr,
+  NULL, /* breakpoint_kind_from_pc */
+  mips_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   0,
   mips_breakpoint_at,
   mips_supports_z_point_type,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-nios2-low.c ./gdb/gdbserver/linux-nios2-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-nios2-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-nios2-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux/Nios II specific low level interface, for the remote server for
    GDB.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    Contributed by Mentor Graphics, Inc.
 
@@ -22,7 +22,7 @@
 #include "server.h"
 #include "linux-low.h"
 #include "elf/common.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <endian.h>
 #include "gdb_proc_service.h"
 #include <asm/ptrace.h>
@@ -95,43 +95,31 @@ nios2_cannot_store_register (int regno)
   return 0;
 }
 
-/* Implement the get_pc linux_target_ops method.  */
+/* Breakpoint support.  Also see comments on nios2_breakpoint_from_pc
+   in nios2-tdep.c.  */
 
-static CORE_ADDR
-nios2_get_pc (struct regcache *regcache)
-{
-  union nios2_register pc;
-
-  collect_register_by_name (regcache, "pc", pc.buf);
-  return pc.reg32;
-}
-
-/* Implement the set_pc linux_target_ops method.  */
-
-static void
-nios2_set_pc (struct regcache *regcache, CORE_ADDR pc)
-{
-  union nios2_register newpc;
-
-  newpc.reg32 = pc;
-  supply_register_by_name (regcache, "pc", newpc.buf);
-}
-
-/* Breakpoint support.  */
+#if defined(__nios2_arch__) && __nios2_arch__ == 2
+#define NIOS2_BREAKPOINT 0xb7fd0020
+#define CDX_BREAKPOINT 0xd7c9
+#else
+#define NIOS2_BREAKPOINT 0x003b6ffa
+#endif
 
-static const unsigned int nios2_breakpoint = 0x003b6ffa;
+/* We only register the 4-byte breakpoint, even on R2 targets which also
+   support 2-byte breakpoints.  Since there is no supports_z_point_type
+   function provided, gdbserver never inserts software breakpoints itself
+   and instead relies on GDB to insert the breakpoint of the correct length
+   via a memory write.  */
+static const unsigned int nios2_breakpoint = NIOS2_BREAKPOINT;
 #define nios2_breakpoint_len 4
 
-/* Implement the breakpoint_reinsert_addr linux_target_ops method.  */
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static CORE_ADDR
-nios2_reinsert_addr (void)
+static const gdb_byte *
+nios2_sw_breakpoint_from_kind (int kind, int *size)
 {
-  union nios2_register ra;
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-
-  collect_register_by_name (regcache, "ra", ra.buf);
-  return ra.reg32;
+  *size = nios2_breakpoint_len;
+  return (const gdb_byte *) &nios2_breakpoint;
 }
 
 /* Implement the breakpoint_at linux_target_ops method.  */
@@ -141,6 +129,13 @@ nios2_breakpoint_at (CORE_ADDR where)
 {
   unsigned int insn;
 
+  /* For R2, first check for the 2-byte CDX trap.n breakpoint encoding.  */
+#if defined(__nios2_arch__) && __nios2_arch__ == 2
+  (*the_target->read_memory) (where, (unsigned char *) &insn, 2);
+  if (insn == CDX_BREAKPOINT)
+    return 1;
+#endif
+
   (*the_target->read_memory) (where, (unsigned char *) &insn, 4);
   if (insn == nios2_breakpoint)
     return 1;
@@ -150,7 +145,7 @@ nios2_breakpoint_at (CORE_ADDR where)
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
                     lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -188,7 +183,7 @@ nios2_supply_register (struct regcache *
 static void
 nios2_fill_gregset (struct regcache *regcache, void *buf)
 {
-  union nios2_register *regset = buf;
+  union nios2_register *regset = (union nios2_register *) buf;
   int i;
 
   for (i = 1; i < nios2_num_regs; i++)
@@ -198,7 +193,7 @@ nios2_fill_gregset (struct regcache *reg
 static void
 nios2_store_gregset (struct regcache *regcache, const void *buf)
 {
-  const union nios2_register *regset = buf;
+  const union nios2_register *regset = (union nios2_register *) buf;
   int i;
 
   for (i = 0; i < nios2_num_regs; i++)
@@ -210,7 +205,7 @@ static struct regset_info nios2_regsets[
   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS,
     nios2_num_regs * 4, GENERAL_REGS,
     nios2_fill_gregset, nios2_store_gregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info nios2_regsets_info =
@@ -246,11 +241,11 @@ struct linux_target_ops the_low_target =
   nios2_cannot_fetch_register,
   nios2_cannot_store_register,
   NULL,
-  nios2_get_pc,
-  nios2_set_pc,
-  (const unsigned char *) &nios2_breakpoint,
-  nios2_breakpoint_len,
-  nios2_reinsert_addr,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  nios2_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   0,
   nios2_breakpoint_at,
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-ipa.c ./gdb/gdbserver/linux-ppc-ipa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-ipa.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-ppc-ipa.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,246 @@
+/* GNU/Linux/PowerPC specific low level interface, for the in-process
+   agent library for GDB.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "server.h"
+#include <sys/mman.h>
+#include "tracepoint.h"
+#include "linux-ppc-tdesc.h"
+#include <elf.h>
+#ifdef HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
+/* These macros define the position of registers in the buffer collected
+   by the fast tracepoint jump pad.  */
+#define FT_CR_R0	0
+#define FT_CR_CR	32
+#define FT_CR_XER	33
+#define FT_CR_LR	34
+#define FT_CR_CTR	35
+#define FT_CR_PC	36
+#define FT_CR_GPR(n)	(FT_CR_R0 + (n))
+
+static const int ppc_ft_collect_regmap[] = {
+  /* GPRs */
+  FT_CR_GPR (0), FT_CR_GPR (1), FT_CR_GPR (2),
+  FT_CR_GPR (3), FT_CR_GPR (4), FT_CR_GPR (5),
+  FT_CR_GPR (6), FT_CR_GPR (7), FT_CR_GPR (8),
+  FT_CR_GPR (9), FT_CR_GPR (10), FT_CR_GPR (11),
+  FT_CR_GPR (12), FT_CR_GPR (13), FT_CR_GPR (14),
+  FT_CR_GPR (15), FT_CR_GPR (16), FT_CR_GPR (17),
+  FT_CR_GPR (18), FT_CR_GPR (19), FT_CR_GPR (20),
+  FT_CR_GPR (21), FT_CR_GPR (22), FT_CR_GPR (23),
+  FT_CR_GPR (24), FT_CR_GPR (25), FT_CR_GPR (26),
+  FT_CR_GPR (27), FT_CR_GPR (28), FT_CR_GPR (29),
+  FT_CR_GPR (30), FT_CR_GPR (31),
+  /* FPRs - not collected.  */
+  -1, -1, -1, -1, -1, -1, -1, -1,
+  -1, -1, -1, -1, -1, -1, -1, -1,
+  -1, -1, -1, -1, -1, -1, -1, -1,
+  -1, -1, -1, -1, -1, -1, -1, -1,
+  FT_CR_PC, /* PC */
+  -1, /* MSR */
+  FT_CR_CR, /* CR */
+  FT_CR_LR, /* LR */
+  FT_CR_CTR, /* CTR */
+  FT_CR_XER, /* XER */
+  -1, /* FPSCR */
+};
+
+#define PPC_NUM_FT_COLLECT_GREGS \
+  (sizeof (ppc_ft_collect_regmap) / sizeof(ppc_ft_collect_regmap[0]))
+
+/* Supply registers collected by the fast tracepoint jump pad.
+   BUF is the second argument we pass to gdb_collect in jump pad.  */
+
+void
+supply_fast_tracepoint_registers (struct regcache *regcache,
+				  const unsigned char *buf)
+{
+  int i;
+
+  for (i = 0; i < PPC_NUM_FT_COLLECT_GREGS; i++)
+    {
+      if (ppc_ft_collect_regmap[i] == -1)
+	continue;
+      supply_register (regcache, i,
+		       ((char *) buf)
+			+ ppc_ft_collect_regmap[i] * sizeof (long));
+    }
+}
+
+/* Return the value of register REGNUM.  RAW_REGS is collected buffer
+   by jump pad.  This function is called by emit_reg.  */
+
+ULONGEST
+get_raw_reg (const unsigned char *raw_regs, int regnum)
+{
+  if (regnum >= PPC_NUM_FT_COLLECT_GREGS)
+    return 0;
+  if (ppc_ft_collect_regmap[regnum] == -1)
+    return 0;
+
+  return *(unsigned long *) (raw_regs
+			     + ppc_ft_collect_regmap[regnum] * sizeof (long));
+}
+
+/* Allocate buffer for the jump pads.  The branch instruction has a reach
+   of +/- 32MiB, and the executable is loaded at 0x10000000 (256MiB).
+
+   64-bit: To maximize the area of executable that can use tracepoints,
+   try allocating at 0x10000000 - size initially, decreasing until we hit
+   a free area.
+
+   32-bit: ld.so loads dynamic libraries right below the executable, so
+   we cannot depend on that area (dynamic libraries can be quite large).
+   Instead, aim right after the executable - at sbrk(0).  This will
+   cause future brk to fail, and malloc will fallback to mmap.  */
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+#ifdef __powerpc64__
+  uintptr_t addr;
+  uintptr_t exec_base = getauxval (AT_PHDR);
+  int pagesize;
+  void *res;
+
+  if (exec_base == 0)
+    exec_base = 0x10000000;
+
+  pagesize = sysconf (_SC_PAGE_SIZE);
+  if (pagesize == -1)
+    perror_with_name ("sysconf");
+
+  addr = exec_base - size;
+
+  /* size should already be page-aligned, but this can't hurt.  */
+  addr &= ~(pagesize - 1);
+
+  /* Search for a free area.  If we hit 0, we're out of luck.  */
+  for (; addr; addr -= pagesize)
+    {
+      /* No MAP_FIXED - we don't want to zap someone's mapping.  */
+      res = mmap ((void *) addr, size,
+		  PROT_READ | PROT_WRITE | PROT_EXEC,
+		  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+      /* If we got what we wanted, return.  */
+      if ((uintptr_t) res == addr)
+	return res;
+
+      /* If we got a mapping, but at a wrong address, undo it.  */
+      if (res != MAP_FAILED)
+	munmap (res, size);
+    }
+
+  return NULL;
+#else
+  void *target = sbrk (0);
+  void *res = mmap (target, size, PROT_READ | PROT_WRITE | PROT_EXEC,
+		    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+  if (res == target)
+    return res;
+
+  if (res != MAP_FAILED)
+    munmap (res, size);
+
+  return NULL;
+#endif
+}
+
+/* Return target_desc to use for IPA, given the tdesc index passed by
+   gdbserver.  */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+  switch (idx)
+    {
+#ifdef __powerpc64__
+    case PPC_TDESC_BASE:
+      return tdesc_powerpc_64l;
+    case PPC_TDESC_ALTIVEC:
+      return tdesc_powerpc_altivec64l;
+    case PPC_TDESC_CELL:
+      return tdesc_powerpc_cell64l;
+    case PPC_TDESC_VSX:
+      return tdesc_powerpc_vsx64l;
+    case PPC_TDESC_ISA205:
+      return tdesc_powerpc_isa205_64l;
+    case PPC_TDESC_ISA205_ALTIVEC:
+      return tdesc_powerpc_isa205_altivec64l;
+    case PPC_TDESC_ISA205_VSX:
+      return tdesc_powerpc_isa205_vsx64l;
+#else
+    case PPC_TDESC_BASE:
+      return tdesc_powerpc_32l;
+    case PPC_TDESC_ALTIVEC:
+      return tdesc_powerpc_altivec32l;
+    case PPC_TDESC_CELL:
+      return tdesc_powerpc_cell32l;
+    case PPC_TDESC_VSX:
+      return tdesc_powerpc_vsx32l;
+    case PPC_TDESC_ISA205:
+      return tdesc_powerpc_isa205_32l;
+    case PPC_TDESC_ISA205_ALTIVEC:
+      return tdesc_powerpc_isa205_altivec32l;
+    case PPC_TDESC_ISA205_VSX:
+      return tdesc_powerpc_isa205_vsx32l;
+    case PPC_TDESC_E500:
+      return tdesc_powerpc_e500l;
+#endif
+    default:
+      internal_error (__FILE__, __LINE__,
+                     "unknown ipa tdesc index: %d", idx);
+#ifdef __powerpc64__
+      return tdesc_powerpc_64l;
+#else
+      return tdesc_powerpc_32l;
+#endif
+    }
+}
+
+
+/* Initialize ipa_tdesc and others.  */
+
+void
+initialize_low_tracepoint (void)
+{
+#ifdef __powerpc64__
+  init_registers_powerpc_64l ();
+  init_registers_powerpc_altivec64l ();
+  init_registers_powerpc_cell64l ();
+  init_registers_powerpc_vsx64l ();
+  init_registers_powerpc_isa205_64l ();
+  init_registers_powerpc_isa205_altivec64l ();
+  init_registers_powerpc_isa205_vsx64l ();
+#else
+  init_registers_powerpc_32l ();
+  init_registers_powerpc_altivec32l ();
+  init_registers_powerpc_cell32l ();
+  init_registers_powerpc_vsx32l ();
+  init_registers_powerpc_isa205_32l ();
+  init_registers_powerpc_isa205_altivec32l ();
+  init_registers_powerpc_isa205_vsx32l ();
+  init_registers_powerpc_e500l ();
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-low.c ./gdb/gdbserver/linux-ppc-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-ppc-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux/PowerPC specific low level interface, for the remote server for
    GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,70 +24,24 @@
 #include <asm/ptrace.h>
 
 #include "nat/ppc-linux.h"
+#include "linux-ppc-tdesc.h"
+#include "ax.h"
+#include "tracepoint.h"
+
+#define PPC_FIELD(value, from, len) \
+	(((value) >> (32 - (from) - (len))) & ((1 << (len)) - 1))
+#define PPC_SEXT(v, bs) \
+	((((CORE_ADDR) (v) & (((CORE_ADDR) 1 << (bs)) - 1)) \
+	  ^ ((CORE_ADDR) 1 << ((bs) - 1))) \
+	 - ((CORE_ADDR) 1 << ((bs) - 1)))
+#define PPC_OP6(insn)	PPC_FIELD (insn, 0, 6)
+#define PPC_BO(insn)	PPC_FIELD (insn, 6, 5)
+#define PPC_LI(insn)	(PPC_SEXT (PPC_FIELD (insn, 6, 24), 24) << 2)
+#define PPC_BD(insn)	(PPC_SEXT (PPC_FIELD (insn, 16, 14), 14) << 2)
 
 static unsigned long ppc_hwcap;
 
 
-/* Defined in auto-generated file powerpc-32l.c.  */
-void init_registers_powerpc_32l (void);
-extern const struct target_desc *tdesc_powerpc_32l;
-
-/* Defined in auto-generated file powerpc-altivec32l.c.  */
-void init_registers_powerpc_altivec32l (void);
-extern const struct target_desc *tdesc_powerpc_altivec32l;
-
-/* Defined in auto-generated file powerpc-cell32l.c.  */
-void init_registers_powerpc_cell32l (void);
-extern const struct target_desc *tdesc_powerpc_cell32l;
-
-/* Defined in auto-generated file powerpc-vsx32l.c.  */
-void init_registers_powerpc_vsx32l (void);
-extern const struct target_desc *tdesc_powerpc_vsx32l;
-
-/* Defined in auto-generated file powerpc-isa205-32l.c.  */
-void init_registers_powerpc_isa205_32l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_32l;
-
-/* Defined in auto-generated file powerpc-isa205-altivec32l.c.  */
-void init_registers_powerpc_isa205_altivec32l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_altivec32l;
-
-/* Defined in auto-generated file powerpc-isa205-vsx32l.c.  */
-void init_registers_powerpc_isa205_vsx32l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_vsx32l;
-
-/* Defined in auto-generated file powerpc-e500l.c.  */
-void init_registers_powerpc_e500l (void);
-extern const struct target_desc *tdesc_powerpc_e500l;
-
-/* Defined in auto-generated file powerpc-64l.c.  */
-void init_registers_powerpc_64l (void);
-extern const struct target_desc *tdesc_powerpc_64l;
-
-/* Defined in auto-generated file powerpc-altivec64l.c.  */
-void init_registers_powerpc_altivec64l (void);
-extern const struct target_desc *tdesc_powerpc_altivec64l;
-
-/* Defined in auto-generated file powerpc-cell64l.c.  */
-void init_registers_powerpc_cell64l (void);
-extern const struct target_desc *tdesc_powerpc_cell64l;
-
-/* Defined in auto-generated file powerpc-vsx64l.c.  */
-void init_registers_powerpc_vsx64l (void);
-extern const struct target_desc *tdesc_powerpc_vsx64l;
-
-/* Defined in auto-generated file powerpc-isa205-64l.c.  */
-void init_registers_powerpc_isa205_64l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_64l;
-
-/* Defined in auto-generated file powerpc-isa205-altivec64l.c.  */
-void init_registers_powerpc_isa205_altivec64l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_altivec64l;
-
-/* Defined in auto-generated file powerpc-isa205-vsx64l.c.  */
-void init_registers_powerpc_isa205_vsx64l (void);
-extern const struct target_desc *tdesc_powerpc_isa205_vsx64l;
-
 #define ppc_num_regs 73
 
 #ifdef __powerpc64__
@@ -342,11 +296,11 @@ ppc_set_pc (struct regcache *regcache, C
 
 
 static int
-ppc_get_hwcap (unsigned long *valp)
+ppc_get_auxv (unsigned long type, unsigned long *valp)
 {
   const struct target_desc *tdesc = current_process ()->tdesc;
   int wordsize = register_size (tdesc, 0);
-  unsigned char *data = alloca (2 * wordsize);
+  unsigned char *data = (unsigned char *) alloca (2 * wordsize);
   int offset = 0;
 
   while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
@@ -354,7 +308,7 @@ ppc_get_hwcap (unsigned long *valp)
       if (wordsize == 4)
 	{
 	  unsigned int *data_p = (unsigned int *)data;
-	  if (data_p[0] == AT_HWCAP)
+	  if (data_p[0] == type)
 	    {
 	      *valp = data_p[1];
 	      return 1;
@@ -363,7 +317,7 @@ ppc_get_hwcap (unsigned long *valp)
       else
 	{
 	  unsigned long *data_p = (unsigned long *)data;
-	  if (data_p[0] == AT_HWCAP)
+	  if (data_p[0] == type)
 	    {
 	      *valp = data_p[1];
 	      return 1;
@@ -377,108 +331,10 @@ ppc_get_hwcap (unsigned long *valp)
   return 0;
 }
 
-/* Forward declaration.  */
-static struct usrregs_info ppc_usrregs_info;
 #ifndef __powerpc64__
 static int ppc_regmap_adjusted;
 #endif
 
-static void
-ppc_arch_setup (void)
-{
-  const struct target_desc *tdesc;
-#ifdef __powerpc64__
-  long msr;
-  struct regcache *regcache;
-
-  /* On a 64-bit host, assume 64-bit inferior process with no
-     AltiVec registers.  Reset ppc_hwcap to ensure that the
-     collect_register call below does not fail.  */
-  tdesc = tdesc_powerpc_64l;
-  current_process ()->tdesc = tdesc;
-  ppc_hwcap = 0;
-
-  regcache = new_register_cache (tdesc);
-  fetch_inferior_registers (regcache, find_regno (tdesc, "msr"));
-  collect_register_by_name (regcache, "msr", &msr);
-  free_register_cache (regcache);
-  if (ppc64_64bit_inferior_p (msr))
-    {
-      ppc_get_hwcap (&ppc_hwcap);
-      if (ppc_hwcap & PPC_FEATURE_CELL)
-	tdesc = tdesc_powerpc_cell64l;
-      else if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
-	{
-	  /* Power ISA 2.05 (implemented by Power 6 and newer processors)
-	     increases the FPSCR from 32 bits to 64 bits. Even though Power 7
-	     supports this ISA version, it doesn't have PPC_FEATURE_ARCH_2_05
-	     set, only PPC_FEATURE_ARCH_2_06.  Since for now the only bits
-	     used in the higher half of the register are for Decimal Floating
-	     Point, we check if that feature is available to decide the size
-	     of the FPSCR.  */
-	  if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
-	    tdesc = tdesc_powerpc_isa205_vsx64l;
-	  else
-	    tdesc = tdesc_powerpc_vsx64l;
-	}
-      else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
-	{
-	  if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
-	    tdesc = tdesc_powerpc_isa205_altivec64l;
-	  else
-	    tdesc = tdesc_powerpc_altivec64l;
-	}
-
-      current_process ()->tdesc = tdesc;
-      return;
-    }
-#endif
-
-  /* OK, we have a 32-bit inferior.  */
-  tdesc = tdesc_powerpc_32l;
-  current_process ()->tdesc = tdesc;
-
-  ppc_get_hwcap (&ppc_hwcap);
-  if (ppc_hwcap & PPC_FEATURE_CELL)
-    tdesc = tdesc_powerpc_cell32l;
-  else if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
-    {
-      if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
-	tdesc = tdesc_powerpc_isa205_vsx32l;
-      else
-	tdesc = tdesc_powerpc_vsx32l;
-    }
-  else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
-    {
-      if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
-	tdesc = tdesc_powerpc_isa205_altivec32l;
-      else
-	tdesc = tdesc_powerpc_altivec32l;
-    }
-
-  /* On 32-bit machines, check for SPE registers.
-     Set the low target's regmap field as appropriately.  */
-#ifndef __powerpc64__
-  if (ppc_hwcap & PPC_FEATURE_HAS_SPE)
-    tdesc = tdesc_powerpc_e500l;
-
-  if (!ppc_regmap_adjusted)
-    {
-      if (ppc_hwcap & PPC_FEATURE_HAS_SPE)
-	ppc_usrregs_info.regmap = ppc_regmap_e500;
-
-      /* If the FPSCR is 64-bit wide, we need to fetch the whole
-	 64-bit slot and not just its second word.  The PT_FPSCR
-	 supplied in a 32-bit GDB compilation doesn't reflect
-	 this.  */
-      if (register_size (tdesc, 70) == 8)
-	ppc_regmap[70] = (48 + 2*32) * sizeof (long);
-
-      ppc_regmap_adjusted = 1;
-   }
-#endif
-  current_process ()->tdesc = tdesc;
-}
 
 /* Correct in either endianness.
    This instruction is "twge r2, r2", which GDB uses as a software
@@ -486,6 +342,15 @@ ppc_arch_setup (void)
 static const unsigned int ppc_breakpoint = 0x7d821008;
 #define ppc_breakpoint_len 4
 
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+ppc_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = ppc_breakpoint_len;
+  return (const gdb_byte *) &ppc_breakpoint;
+}
+
 static int
 ppc_breakpoint_at (CORE_ADDR where)
 {
@@ -512,6 +377,69 @@ ppc_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
+/* Implement supports_z_point_type target-ops.
+   Returns true if type Z_TYPE breakpoint is supported.
+
+   Handling software breakpoint at server side, so tracepoints
+   and breakpoints can be inserted at the same location.  */
+
+static int
+ppc_supports_z_point_type (char z_type)
+{
+  switch (z_type)
+    {
+    case Z_PACKET_SW_BP:
+      return 1;
+    case Z_PACKET_HW_BP:
+    case Z_PACKET_WRITE_WP:
+    case Z_PACKET_ACCESS_WP:
+    default:
+      return 0;
+    }
+}
+
+/* Implement insert_point target-ops.
+   Returns 0 on success, -1 on failure and 1 on unsupported.  */
+
+static int
+ppc_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
+		  int size, struct raw_breakpoint *bp)
+{
+  switch (type)
+    {
+    case raw_bkpt_type_sw:
+      return insert_memory_breakpoint (bp);
+
+    case raw_bkpt_type_hw:
+    case raw_bkpt_type_write_wp:
+    case raw_bkpt_type_access_wp:
+    default:
+      /* Unsupported.  */
+      return 1;
+    }
+}
+
+/* Implement remove_point target-ops.
+   Returns 0 on success, -1 on failure and 1 on unsupported.  */
+
+static int
+ppc_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
+		  int size, struct raw_breakpoint *bp)
+{
+  switch (type)
+    {
+    case raw_bkpt_type_sw:
+      return remove_memory_breakpoint (bp);
+
+    case raw_bkpt_type_hw:
+    case raw_bkpt_type_write_wp:
+    case raw_bkpt_type_access_wp:
+    default:
+      /* Unsupported.  */
+      return 1;
+    }
+}
+
 /* Provide only a fill function for the general register set.  ps_lgetregs
    will use this for NPTL support.  */
 
@@ -535,7 +463,7 @@ static void
 ppc_fill_vsxregset (struct regcache *regcache, void *buf)
 {
   int i, base;
-  char *regset = buf;
+  char *regset = (char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
     return;
@@ -549,7 +477,7 @@ static void
 ppc_store_vsxregset (struct regcache *regcache, const void *buf)
 {
   int i, base;
-  const char *regset = buf;
+  const char *regset = (const char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
     return;
@@ -565,7 +493,7 @@ static void
 ppc_fill_vrregset (struct regcache *regcache, void *buf)
 {
   int i, base;
-  char *regset = buf;
+  char *regset = (char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
     return;
@@ -582,7 +510,7 @@ static void
 ppc_store_vrregset (struct regcache *regcache, const void *buf)
 {
   int i, base;
-  const char *regset = buf;
+  const char *regset = (const char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
     return;
@@ -606,7 +534,7 @@ static void
 ppc_fill_evrregset (struct regcache *regcache, void *buf)
 {
   int i, ev0;
-  struct gdb_evrregset_t *regset = buf;
+  struct gdb_evrregset_t *regset = (struct gdb_evrregset_t *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
     return;
@@ -623,7 +551,7 @@ static void
 ppc_store_evrregset (struct regcache *regcache, const void *buf)
 {
   int i, ev0;
-  const struct gdb_evrregset_t *regset = buf;
+  const struct gdb_evrregset_t *regset = (const struct gdb_evrregset_t *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
     return;
@@ -636,6 +564,14 @@ ppc_store_evrregset (struct regcache *re
   supply_register_by_name (regcache, "spefscr", &regset->spefscr);
 }
 
+/* Support for hardware single step.  */
+
+static int
+ppc_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct regset_info ppc_regsets[] = {
   /* List the extra register sets before GENERAL_REGS.  That way we will
      fetch them every time, but still fall back to PTRACE_PEEKUSER for the
@@ -648,7 +584,7 @@ static struct regset_info ppc_regsets[] 
   { PTRACE_GETEVRREGS, PTRACE_SETEVRREGS, 0, 32 * 4 + 8 + 4, EXTENDED_REGS,
     ppc_fill_evrregset, ppc_store_evrregset },
   { 0, 0, 0, 0, GENERAL_REGS, ppc_fill_gregset, NULL },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct usrregs_info ppc_usrregs_info =
@@ -677,41 +613,2547 @@ ppc_regs_info (void)
   return &regs_info;
 }
 
-struct linux_target_ops the_low_target = {
-  ppc_arch_setup,
-  ppc_regs_info,
-  ppc_cannot_fetch_register,
-  ppc_cannot_store_register,
-  NULL, /* fetch_register */
-  ppc_get_pc,
-  ppc_set_pc,
-  (const unsigned char *) &ppc_breakpoint,
-  ppc_breakpoint_len,
-  NULL,
-  0,
-  ppc_breakpoint_at,
-  NULL, /* supports_z_point_type */
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  ppc_collect_ptrace_register,
-  ppc_supply_ptrace_register,
-};
+static void
+ppc_arch_setup (void)
+{
+  const struct target_desc *tdesc;
+#ifdef __powerpc64__
+  long msr;
+  struct regcache *regcache;
 
-void
-initialize_low_arch (void)
+  /* On a 64-bit host, assume 64-bit inferior process with no
+     AltiVec registers.  Reset ppc_hwcap to ensure that the
+     collect_register call below does not fail.  */
+  tdesc = tdesc_powerpc_64l;
+  current_process ()->tdesc = tdesc;
+  ppc_hwcap = 0;
+
+  regcache = new_register_cache (tdesc);
+  fetch_inferior_registers (regcache, find_regno (tdesc, "msr"));
+  collect_register_by_name (regcache, "msr", &msr);
+  free_register_cache (regcache);
+  if (ppc64_64bit_inferior_p (msr))
+    {
+      ppc_get_auxv (AT_HWCAP, &ppc_hwcap);
+      if (ppc_hwcap & PPC_FEATURE_CELL)
+	tdesc = tdesc_powerpc_cell64l;
+      else if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
+	{
+	  /* Power ISA 2.05 (implemented by Power 6 and newer processors)
+	     increases the FPSCR from 32 bits to 64 bits. Even though Power 7
+	     supports this ISA version, it doesn't have PPC_FEATURE_ARCH_2_05
+	     set, only PPC_FEATURE_ARCH_2_06.  Since for now the only bits
+	     used in the higher half of the register are for Decimal Floating
+	     Point, we check if that feature is available to decide the size
+	     of the FPSCR.  */
+	  if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
+	    tdesc = tdesc_powerpc_isa205_vsx64l;
+	  else
+	    tdesc = tdesc_powerpc_vsx64l;
+	}
+      else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
+	{
+	  if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
+	    tdesc = tdesc_powerpc_isa205_altivec64l;
+	  else
+	    tdesc = tdesc_powerpc_altivec64l;
+	}
+
+      current_process ()->tdesc = tdesc;
+      return;
+    }
+#endif
+
+  /* OK, we have a 32-bit inferior.  */
+  tdesc = tdesc_powerpc_32l;
+  current_process ()->tdesc = tdesc;
+
+  ppc_get_auxv (AT_HWCAP, &ppc_hwcap);
+  if (ppc_hwcap & PPC_FEATURE_CELL)
+    tdesc = tdesc_powerpc_cell32l;
+  else if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
+    {
+      if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
+	tdesc = tdesc_powerpc_isa205_vsx32l;
+      else
+	tdesc = tdesc_powerpc_vsx32l;
+    }
+  else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
+    {
+      if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
+	tdesc = tdesc_powerpc_isa205_altivec32l;
+      else
+	tdesc = tdesc_powerpc_altivec32l;
+    }
+
+  /* On 32-bit machines, check for SPE registers.
+     Set the low target's regmap field as appropriately.  */
+#ifndef __powerpc64__
+  if (ppc_hwcap & PPC_FEATURE_HAS_SPE)
+    tdesc = tdesc_powerpc_e500l;
+
+  if (!ppc_regmap_adjusted)
+    {
+      if (ppc_hwcap & PPC_FEATURE_HAS_SPE)
+	ppc_usrregs_info.regmap = ppc_regmap_e500;
+
+      /* If the FPSCR is 64-bit wide, we need to fetch the whole
+	 64-bit slot and not just its second word.  The PT_FPSCR
+	 supplied in a 32-bit GDB compilation doesn't reflect
+	 this.  */
+      if (register_size (tdesc, 70) == 8)
+	ppc_regmap[70] = (48 + 2*32) * sizeof (long);
+
+      ppc_regmap_adjusted = 1;
+   }
+#endif
+  current_process ()->tdesc = tdesc;
+}
+
+/* Implementation of linux_target_ops method "supports_tracepoints".  */
+
+static int
+ppc_supports_tracepoints (void)
 {
-  /* Initialize the Linux target descriptions.  */
+  return 1;
+}
 
-  init_registers_powerpc_32l ();
-  init_registers_powerpc_altivec32l ();
-  init_registers_powerpc_cell32l ();
-  init_registers_powerpc_vsx32l ();
-  init_registers_powerpc_isa205_32l ();
-  init_registers_powerpc_isa205_altivec32l ();
-  init_registers_powerpc_isa205_vsx32l ();
-  init_registers_powerpc_e500l ();
+/* Get the thread area address.  This is used to recognize which
+   thread is which when tracing with the in-process agent library.  We
+   don't read anything from the address, and treat it as opaque; it's
+   the address itself that we assume is unique per-thread.  */
+
+static int
+ppc_get_thread_area (int lwpid, CORE_ADDR *addr)
+{
+  struct lwp_info *lwp = find_lwp_pid (pid_to_ptid (lwpid));
+  struct thread_info *thr = get_lwp_thread (lwp);
+  struct regcache *regcache = get_thread_regcache (thr, 1);
+  ULONGEST tp = 0;
+
+#ifdef __powerpc64__
+  if (register_size (regcache->tdesc, 0) == 8)
+    collect_register_by_name (regcache, "r13", &tp);
+  else
+#endif
+    collect_register_by_name (regcache, "r2", &tp);
+
+  *addr = tp;
+
+  return 0;
+}
+
+#ifdef __powerpc64__
+
+/* Older glibc doesn't provide this.  */
+
+#ifndef EF_PPC64_ABI
+#define EF_PPC64_ABI 3
+#endif
+
+/* Returns 1 if inferior is using ELFv2 ABI.  Undefined for 32-bit
+   inferiors.  */
+
+static int
+is_elfv2_inferior (void)
+{
+  /* To be used as fallback if we're unable to determine the right result -
+     assume inferior uses the same ABI as gdbserver.  */
+#if _CALL_ELF == 2
+  const int def_res = 1;
+#else
+  const int def_res = 0;
+#endif
+  unsigned long phdr;
+  Elf64_Ehdr ehdr;
+
+  if (!ppc_get_auxv (AT_PHDR, &phdr))
+    return def_res;
+
+  /* Assume ELF header is at the beginning of the page where program headers
+     are located.  If it doesn't look like one, bail.  */
+
+  read_inferior_memory (phdr & ~0xfff, (unsigned char *) &ehdr, sizeof ehdr);
+  if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG))
+    return def_res;
+
+  return (ehdr.e_flags & EF_PPC64_ABI) == 2;
+}
+
+#endif
+
+/* Generate a ds-form instruction in BUF and return the number of bytes written
+
+   0      6     11   16          30 32
+   | OPCD | RST | RA |     DS    |XO|  */
+
+__attribute__((unused)) /* Maybe unused due to conditional compilation.  */
+static int
+gen_ds_form (uint32_t *buf, int opcd, int rst, int ra, int ds, int xo)
+{
+  uint32_t insn;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((rst & ~0x1f) == 0);
+  gdb_assert ((ra & ~0x1f) == 0);
+  gdb_assert ((xo & ~0x3) == 0);
+
+  insn = (rst << 21) | (ra << 16) | (ds & 0xfffc) | (xo & 0x3);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* Followings are frequently used ds-form instructions.  */
+
+#define GEN_STD(buf, rs, ra, offset)	gen_ds_form (buf, 62, rs, ra, offset, 0)
+#define GEN_STDU(buf, rs, ra, offset)	gen_ds_form (buf, 62, rs, ra, offset, 1)
+#define GEN_LD(buf, rt, ra, offset)	gen_ds_form (buf, 58, rt, ra, offset, 0)
+#define GEN_LDU(buf, rt, ra, offset)	gen_ds_form (buf, 58, rt, ra, offset, 1)
+
+/* Generate a d-form instruction in BUF.
+
+   0      6     11   16             32
+   | OPCD | RST | RA |       D      |  */
+
+static int
+gen_d_form (uint32_t *buf, int opcd, int rst, int ra, int si)
+{
+  uint32_t insn;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((rst & ~0x1f) == 0);
+  gdb_assert ((ra & ~0x1f) == 0);
+
+  insn = (rst << 21) | (ra << 16) | (si & 0xffff);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* Followings are frequently used d-form instructions.  */
+
+#define GEN_ADDI(buf, rt, ra, si)	gen_d_form (buf, 14, rt, ra, si)
+#define GEN_ADDIS(buf, rt, ra, si)	gen_d_form (buf, 15, rt, ra, si)
+#define GEN_LI(buf, rt, si)		GEN_ADDI (buf, rt, 0, si)
+#define GEN_LIS(buf, rt, si)		GEN_ADDIS (buf, rt, 0, si)
+#define GEN_ORI(buf, rt, ra, si)	gen_d_form (buf, 24, rt, ra, si)
+#define GEN_ORIS(buf, rt, ra, si)	gen_d_form (buf, 25, rt, ra, si)
+#define GEN_LWZ(buf, rt, ra, si)	gen_d_form (buf, 32, rt, ra, si)
+#define GEN_STW(buf, rt, ra, si)	gen_d_form (buf, 36, rt, ra, si)
+#define GEN_STWU(buf, rt, ra, si)	gen_d_form (buf, 37, rt, ra, si)
+
+/* Generate a xfx-form instruction in BUF and return the number of bytes
+   written.
+
+   0      6     11         21        31 32
+   | OPCD | RST |    RI    |    XO   |/|  */
+
+static int
+gen_xfx_form (uint32_t *buf, int opcd, int rst, int ri, int xo)
+{
+  uint32_t insn;
+  unsigned int n = ((ri & 0x1f) << 5) | ((ri >> 5) & 0x1f);
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((rst & ~0x1f) == 0);
+  gdb_assert ((xo & ~0x3ff) == 0);
+
+  insn = (rst << 21) | (n << 11) | (xo << 1);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* Followings are frequently used xfx-form instructions.  */
+
+#define GEN_MFSPR(buf, rt, spr)		gen_xfx_form (buf, 31, rt, spr, 339)
+#define GEN_MTSPR(buf, rt, spr)		gen_xfx_form (buf, 31, rt, spr, 467)
+#define GEN_MFCR(buf, rt)		gen_xfx_form (buf, 31, rt, 0, 19)
+#define GEN_MTCR(buf, rt)		gen_xfx_form (buf, 31, rt, 0x3cf, 144)
+#define GEN_SYNC(buf, L, E)             gen_xfx_form (buf, 31, L & 0x3, \
+						      E & 0xf, 598)
+#define GEN_LWSYNC(buf)			GEN_SYNC (buf, 1, 0)
+
+
+/* Generate a x-form instruction in BUF and return the number of bytes written.
+
+   0      6     11   16   21       31 32
+   | OPCD | RST | RA | RB |   XO   |RC|  */
+
+static int
+gen_x_form (uint32_t *buf, int opcd, int rst, int ra, int rb, int xo, int rc)
+{
+  uint32_t insn;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((rst & ~0x1f) == 0);
+  gdb_assert ((ra & ~0x1f) == 0);
+  gdb_assert ((rb & ~0x1f) == 0);
+  gdb_assert ((xo & ~0x3ff) == 0);
+  gdb_assert ((rc & ~1) == 0);
+
+  insn = (rst << 21) | (ra << 16) | (rb << 11) | (xo << 1) | rc;
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* Followings are frequently used x-form instructions.  */
+
+#define GEN_OR(buf, ra, rs, rb)		gen_x_form (buf, 31, rs, ra, rb, 444, 0)
+#define GEN_MR(buf, ra, rs)		GEN_OR (buf, ra, rs, rs)
+#define GEN_LWARX(buf, rt, ra, rb)	gen_x_form (buf, 31, rt, ra, rb, 20, 0)
+#define GEN_STWCX(buf, rs, ra, rb)	gen_x_form (buf, 31, rs, ra, rb, 150, 1)
+/* Assume bf = cr7.  */
+#define GEN_CMPW(buf, ra, rb)		gen_x_form (buf, 31, 28, ra, rb, 0, 0)
+
+
+/* Generate a md-form instruction in BUF and return the number of bytes written.
+
+   0      6    11   16   21   27   30 31 32
+   | OPCD | RS | RA | sh | mb | XO |sh|Rc|  */
+
+static int
+gen_md_form (uint32_t *buf, int opcd, int rs, int ra, int sh, int mb,
+	     int xo, int rc)
+{
+  uint32_t insn;
+  unsigned int n = ((mb & 0x1f) << 1) | ((mb >> 5) & 0x1);
+  unsigned int sh0_4 = sh & 0x1f;
+  unsigned int sh5 = (sh >> 5) & 1;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((rs & ~0x1f) == 0);
+  gdb_assert ((ra & ~0x1f) == 0);
+  gdb_assert ((sh & ~0x3f) == 0);
+  gdb_assert ((mb & ~0x3f) == 0);
+  gdb_assert ((xo & ~0x7) == 0);
+  gdb_assert ((rc & ~0x1) == 0);
+
+  insn = (rs << 21) | (ra << 16) | (sh0_4 << 11) | (n << 5)
+	 | (sh5 << 1) | (xo << 2) | (rc & 1);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* The following are frequently used md-form instructions.  */
+
+#define GEN_RLDICL(buf, ra, rs ,sh, mb) \
+				gen_md_form (buf, 30, rs, ra, sh, mb, 0, 0)
+#define GEN_RLDICR(buf, ra, rs ,sh, mb) \
+				gen_md_form (buf, 30, rs, ra, sh, mb, 1, 0)
+
+/* Generate a i-form instruction in BUF and return the number of bytes written.
+
+   0      6                          30 31 32
+   | OPCD |            LI            |AA|LK|  */
+
+static int
+gen_i_form (uint32_t *buf, int opcd, int li, int aa, int lk)
+{
+  uint32_t insn;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+
+  insn = (li & 0x3fffffc) | (aa & 1) | (lk & 1);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* The following are frequently used i-form instructions.  */
+
+#define GEN_B(buf, li)		gen_i_form (buf, 18, li, 0, 0)
+#define GEN_BL(buf, li)		gen_i_form (buf, 18, li, 0, 1)
+
+/* Generate a b-form instruction in BUF and return the number of bytes written.
+
+   0      6    11   16               30 31 32
+   | OPCD | BO | BI |      BD        |AA|LK|  */
+
+static int
+gen_b_form (uint32_t *buf, int opcd, int bo, int bi, int bd,
+	    int aa, int lk)
+{
+  uint32_t insn;
+
+  gdb_assert ((opcd & ~0x3f) == 0);
+  gdb_assert ((bo & ~0x1f) == 0);
+  gdb_assert ((bi & ~0x1f) == 0);
+
+  insn = (bo << 21) | (bi << 16) | (bd & 0xfffc) | (aa & 1) | (lk & 1);
+  *buf = (opcd << 26) | insn;
+  return 1;
+}
+
+/* The following are frequently used b-form instructions.  */
+/* Assume bi = cr7.  */
+#define GEN_BNE(buf, bd)  gen_b_form (buf, 16, 0x4, (7 << 2) | 2, bd, 0 ,0)
+
+/* GEN_LOAD and GEN_STORE generate 64- or 32-bit load/store for ppc64 or ppc32
+   respectively.  They are primary used for save/restore GPRs in jump-pad,
+   not used for bytecode compiling.  */
+
+#ifdef __powerpc64__
+#define GEN_LOAD(buf, rt, ra, si, is_64)	(is_64 ? \
+						 GEN_LD (buf, rt, ra, si) : \
+						 GEN_LWZ (buf, rt, ra, si))
+#define GEN_STORE(buf, rt, ra, si, is_64)	(is_64 ? \
+						 GEN_STD (buf, rt, ra, si) : \
+						 GEN_STW (buf, rt, ra, si))
+#else
+#define GEN_LOAD(buf, rt, ra, si, is_64)	GEN_LWZ (buf, rt, ra, si)
+#define GEN_STORE(buf, rt, ra, si, is_64)	GEN_STW (buf, rt, ra, si)
+#endif
+
+/* Generate a sequence of instructions to load IMM in the register REG.
+   Write the instructions in BUF and return the number of bytes written.  */
+
+static int
+gen_limm (uint32_t *buf, int reg, uint64_t imm, int is_64)
+{
+  uint32_t *p = buf;
+
+  if ((imm + 32768) < 65536)
+    {
+      /* li	reg, imm[15:0] */
+      p += GEN_LI (p, reg, imm);
+    }
+  else if ((imm >> 32) == 0)
+    {
+      /* lis	reg, imm[31:16]
+	 ori	reg, reg, imm[15:0]
+	 rldicl reg, reg, 0, 32 */
+      p += GEN_LIS (p, reg, (imm >> 16) & 0xffff);
+      if ((imm & 0xffff) != 0)
+	p += GEN_ORI (p, reg, reg, imm & 0xffff);
+      /* Clear upper 32-bit if sign-bit is set.  */
+      if (imm & (1u << 31) && is_64)
+	p += GEN_RLDICL (p, reg, reg, 0, 32);
+    }
+  else
+    {
+      gdb_assert (is_64);
+      /* lis    reg, <imm[63:48]>
+	 ori    reg, reg, <imm[48:32]>
+	 rldicr reg, reg, 32, 31
+	 oris   reg, reg, <imm[31:16]>
+	 ori    reg, reg, <imm[15:0]> */
+      p += GEN_LIS (p, reg, ((imm >> 48) & 0xffff));
+      if (((imm >> 32) & 0xffff) != 0)
+        p += GEN_ORI (p, reg, reg, ((imm >> 32) & 0xffff));
+      p += GEN_RLDICR (p, reg, reg, 32, 31);
+      if (((imm >> 16) & 0xffff) != 0)
+        p += GEN_ORIS (p, reg, reg, ((imm >> 16) & 0xffff));
+      if ((imm & 0xffff) != 0)
+        p += GEN_ORI (p, reg, reg, (imm & 0xffff));
+    }
+
+  return p - buf;
+}
+
+/* Generate a sequence for atomically exchange at location LOCK.
+   This code sequence clobbers r6, r7, r8.  LOCK is the location for
+   the atomic-xchg, OLD_VALUE is expected old value stored in the
+   location, and R_NEW is a register for the new value.  */
+
+static int
+gen_atomic_xchg (uint32_t *buf, CORE_ADDR lock, int old_value, int r_new,
+		 int is_64)
+{
+  const int r_lock = 6;
+  const int r_old = 7;
+  const int r_tmp = 8;
+  uint32_t *p = buf;
+
+  /*
+  1: lwarx   TMP, 0, LOCK
+     cmpwi   TMP, OLD
+     bne     1b
+     stwcx.  NEW, 0, LOCK
+     bne     1b */
+
+  p += gen_limm (p, r_lock, lock, is_64);
+  p += gen_limm (p, r_old, old_value, is_64);
+
+  p += GEN_LWARX (p, r_tmp, 0, r_lock);
+  p += GEN_CMPW (p, r_tmp, r_old);
+  p += GEN_BNE (p, -8);
+  p += GEN_STWCX (p, r_new, 0, r_lock);
+  p += GEN_BNE (p, -16);
+
+  return p - buf;
+}
+
+/* Generate a sequence of instructions for calling a function
+   at address of FN.  Return the number of bytes are written in BUF.  */
+
+static int
+gen_call (uint32_t *buf, CORE_ADDR fn, int is_64, int is_opd)
+{
+  uint32_t *p = buf;
+
+  /* Must be called by r12 for caller to calculate TOC address. */
+  p += gen_limm (p, 12, fn, is_64);
+  if (is_opd)
+    {
+      p += GEN_LOAD (p, 11, 12, 16, is_64);
+      p += GEN_LOAD (p, 2, 12, 8, is_64);
+      p += GEN_LOAD (p, 12, 12, 0, is_64);
+    }
+  p += GEN_MTSPR (p, 12, 9);		/* mtctr  r12 */
+  *p++ = 0x4e800421;			/* bctrl */
+
+  return p - buf;
+}
+
+/* Copy the instruction from OLDLOC to *TO, and update *TO to *TO + size
+   of instruction.  This function is used to adjust pc-relative instructions
+   when copying.  */
+
+static void
+ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
+{
+  uint32_t insn, op6;
+  long rel, newrel;
+
+  read_inferior_memory (oldloc, (unsigned char *) &insn, 4);
+  op6 = PPC_OP6 (insn);
+
+  if (op6 == 18 && (insn & 2) == 0)
+    {
+      /* branch && AA = 0 */
+      rel = PPC_LI (insn);
+      newrel = (oldloc - *to) + rel;
+
+      /* Out of range. Cannot relocate instruction.  */
+      if (newrel >= (1 << 25) || newrel < -(1 << 25))
+	return;
+
+      insn = (insn & ~0x3fffffc) | (newrel & 0x3fffffc);
+    }
+  else if (op6 == 16 && (insn & 2) == 0)
+    {
+      /* conditional branch && AA = 0 */
+
+      /* If the new relocation is too big for even a 26-bit unconditional
+	 branch, there is nothing we can do.  Just abort.
+
+	 Otherwise, if it can be fit in 16-bit conditional branch, just
+	 copy the instruction and relocate the address.
+
+	 If the it's  big for conditional-branch (16-bit), try to invert the
+	 condition and jump with 26-bit branch.  For example,
+
+	 beq  .Lgoto
+	 INSN1
+
+	 =>
+
+	 bne  1f (+8)
+	 b    .Lgoto
+       1:INSN1
+
+	 After this transform, we are actually jump from *TO+4 instead of *TO,
+	 so check the relocation again because it will be 1-insn farther then
+	 before if *TO is after OLDLOC.
+
+
+	 For BDNZT (or so) is transformed from
+
+	 bdnzt  eq, .Lgoto
+	 INSN1
+
+	 =>
+
+	 bdz    1f (+12)
+	 bf     eq, 1f (+8)
+	 b      .Lgoto
+       1:INSN1
+
+	 See also "BO field encodings".  */
+
+      rel = PPC_BD (insn);
+      newrel = (oldloc - *to) + rel;
+
+      if (newrel < (1 << 15) && newrel >= -(1 << 15))
+	insn = (insn & ~0xfffc) | (newrel & 0xfffc);
+      else if ((PPC_BO (insn) & 0x14) == 0x4 || (PPC_BO (insn) & 0x14) == 0x10)
+	{
+	  newrel -= 4;
+
+	  /* Out of range. Cannot relocate instruction.  */
+	  if (newrel >= (1 << 25) || newrel < -(1 << 25))
+	    return;
+
+	  if ((PPC_BO (insn) & 0x14) == 0x4)
+	    insn ^= (1 << 24);
+	  else if ((PPC_BO (insn) & 0x14) == 0x10)
+	    insn ^= (1 << 22);
+
+	  /* Jump over the unconditional branch.  */
+	  insn = (insn & ~0xfffc) | 0x8;
+	  write_inferior_memory (*to, (unsigned char *) &insn, 4);
+	  *to += 4;
+
+	  /* Build a unconditional branch and copy LK bit.  */
+	  insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
+	  write_inferior_memory (*to, (unsigned char *) &insn, 4);
+	  *to += 4;
+
+	  return;
+	}
+      else if ((PPC_BO (insn) & 0x14) == 0)
+	{
+	  uint32_t bdnz_insn = (16 << 26) | (0x10 << 21) | 12;
+	  uint32_t bf_insn = (16 << 26) | (0x4 << 21) | 8;
+
+	  newrel -= 8;
+
+	  /* Out of range. Cannot relocate instruction.  */
+	  if (newrel >= (1 << 25) || newrel < -(1 << 25))
+	    return;
+
+	  /* Copy BI field.  */
+	  bf_insn |= (insn & 0x1f0000);
+
+	  /* Invert condition.  */
+	  bdnz_insn |= (insn ^ (1 << 22)) & (1 << 22);
+	  bf_insn |= (insn ^ (1 << 24)) & (1 << 24);
+
+	  write_inferior_memory (*to, (unsigned char *) &bdnz_insn, 4);
+	  *to += 4;
+	  write_inferior_memory (*to, (unsigned char *) &bf_insn, 4);
+	  *to += 4;
+
+	  /* Build a unconditional branch and copy LK bit.  */
+	  insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
+	  write_inferior_memory (*to, (unsigned char *) &insn, 4);
+	  *to += 4;
+
+	  return;
+	}
+      else /* (BO & 0x14) == 0x14, branch always.  */
+	{
+	  /* Out of range. Cannot relocate instruction.  */
+	  if (newrel >= (1 << 25) || newrel < -(1 << 25))
+	    return;
+
+	  /* Build a unconditional branch and copy LK bit.  */
+	  insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
+	  write_inferior_memory (*to, (unsigned char *) &insn, 4);
+	  *to += 4;
+
+	  return;
+	}
+    }
+
+  write_inferior_memory (*to, (unsigned char *) &insn, 4);
+  *to += 4;
+}
+
+/* Implement install_fast_tracepoint_jump_pad of target_ops.
+   See target.h for details.  */
+
+static int
+ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
+				      CORE_ADDR collector,
+				      CORE_ADDR lockaddr,
+				      ULONGEST orig_size,
+				      CORE_ADDR *jump_entry,
+				      CORE_ADDR *trampoline,
+				      ULONGEST *trampoline_size,
+				      unsigned char *jjump_pad_insn,
+				      ULONGEST *jjump_pad_insn_size,
+				      CORE_ADDR *adjusted_insn_addr,
+				      CORE_ADDR *adjusted_insn_addr_end,
+				      char *err)
+{
+  uint32_t buf[256];
+  uint32_t *p = buf;
+  int j, offset;
+  CORE_ADDR buildaddr = *jump_entry;
+  const CORE_ADDR entryaddr = *jump_entry;
+  int rsz, min_frame, frame_size, tp_reg;
+#ifdef __powerpc64__
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+  int is_64 = register_size (regcache->tdesc, 0) == 8;
+  int is_opd = is_64 && !is_elfv2_inferior ();
+#else
+  int is_64 = 0, is_opd = 0;
+#endif
+
+#ifdef __powerpc64__
+  if (is_64)
+    {
+      /* Minimum frame size is 32 bytes for ELFv2, and 112 bytes for ELFv1.  */
+      rsz = 8;
+      min_frame = 112;
+      frame_size = (40 * rsz) + min_frame;
+      tp_reg = 13;
+    }
+  else
+    {
+#endif
+      rsz = 4;
+      min_frame = 16;
+      frame_size = (40 * rsz) + min_frame;
+      tp_reg = 2;
+#ifdef __powerpc64__
+    }
+#endif
+
+  /* Stack frame layout for this jump pad,
+
+     High	thread_area (r13/r2)    |
+		tpoint			- collecting_t obj
+		PC/<tpaddr>		| +36
+		CTR			| +35
+		LR			| +34
+		XER			| +33
+		CR			| +32
+		R31			|
+		R29			|
+		...			|
+		R1			| +1
+		R0			- collected registers
+		...			|
+		...			|
+     Low	Back-chain		-
+
+
+     The code flow of this jump pad,
+
+     1. Adjust SP
+     2. Save GPR and SPR
+     3. Prepare argument
+     4. Call gdb_collector
+     5. Restore GPR and SPR
+     6. Restore SP
+     7. Build a jump for back to the program
+     8. Copy/relocate original instruction
+     9. Build a jump for replacing orignal instruction.  */
+
+  /* Adjust stack pointer.  */
+  if (is_64)
+    p += GEN_STDU (p, 1, 1, -frame_size);		/* stdu   r1,-frame_size(r1) */
+  else
+    p += GEN_STWU (p, 1, 1, -frame_size);		/* stwu   r1,-frame_size(r1) */
+
+  /* Store GPRs.  Save R1 later, because it had just been modified, but
+     we want the original value.  */
+  for (j = 2; j < 32; j++)
+    p += GEN_STORE (p, j, 1, min_frame + j * rsz, is_64);
+  p += GEN_STORE (p, 0, 1, min_frame + 0 * rsz, is_64);
+  /* Set r0 to the original value of r1 before adjusting stack frame,
+     and then save it.  */
+  p += GEN_ADDI (p, 0, 1, frame_size);
+  p += GEN_STORE (p, 0, 1, min_frame + 1 * rsz, is_64);
+
+  /* Save CR, XER, LR, and CTR.  */
+  p += GEN_MFCR (p, 3);					/* mfcr   r3 */
+  p += GEN_MFSPR (p, 4, 1);				/* mfxer  r4 */
+  p += GEN_MFSPR (p, 5, 8);				/* mflr   r5 */
+  p += GEN_MFSPR (p, 6, 9);				/* mfctr  r6 */
+  p += GEN_STORE (p, 3, 1, min_frame + 32 * rsz, is_64);/* std    r3, 32(r1) */
+  p += GEN_STORE (p, 4, 1, min_frame + 33 * rsz, is_64);/* std    r4, 33(r1) */
+  p += GEN_STORE (p, 5, 1, min_frame + 34 * rsz, is_64);/* std    r5, 34(r1) */
+  p += GEN_STORE (p, 6, 1, min_frame + 35 * rsz, is_64);/* std    r6, 35(r1) */
+
+  /* Save PC<tpaddr>  */
+  p += gen_limm (p, 3, tpaddr, is_64);
+  p += GEN_STORE (p, 3, 1, min_frame + 36 * rsz, is_64);
+
+
+  /* Setup arguments to collector.  */
+  /* Set r4 to collected registers.  */
+  p += GEN_ADDI (p, 4, 1, min_frame);
+  /* Set r3 to TPOINT.  */
+  p += gen_limm (p, 3, tpoint, is_64);
+
+  /* Prepare collecting_t object for lock.  */
+  p += GEN_STORE (p, 3, 1, min_frame + 37 * rsz, is_64);
+  p += GEN_STORE (p, tp_reg, 1, min_frame + 38 * rsz, is_64);
+  /* Set R5 to collecting object.  */
+  p += GEN_ADDI (p, 5, 1, 37 * rsz);
+
+  p += GEN_LWSYNC (p);
+  p += gen_atomic_xchg (p, lockaddr, 0, 5, is_64);
+  p += GEN_LWSYNC (p);
+
+  /* Call to collector.  */
+  p += gen_call (p, collector, is_64, is_opd);
+
+  /* Simply write 0 to release the lock.  */
+  p += gen_limm (p, 3, lockaddr, is_64);
+  p += gen_limm (p, 4, 0, is_64);
+  p += GEN_LWSYNC (p);
+  p += GEN_STORE (p, 4, 3, 0, is_64);
+
+  /* Restore stack and registers.  */
+  p += GEN_LOAD (p, 3, 1, min_frame + 32 * rsz, is_64);	/* ld	r3, 32(r1) */
+  p += GEN_LOAD (p, 4, 1, min_frame + 33 * rsz, is_64);	/* ld	r4, 33(r1) */
+  p += GEN_LOAD (p, 5, 1, min_frame + 34 * rsz, is_64);	/* ld	r5, 34(r1) */
+  p += GEN_LOAD (p, 6, 1, min_frame + 35 * rsz, is_64);	/* ld	r6, 35(r1) */
+  p += GEN_MTCR (p, 3);					/* mtcr	  r3 */
+  p += GEN_MTSPR (p, 4, 1);				/* mtxer  r4 */
+  p += GEN_MTSPR (p, 5, 8);				/* mtlr   r5 */
+  p += GEN_MTSPR (p, 6, 9);				/* mtctr  r6 */
+
+  /* Restore GPRs.  */
+  for (j = 2; j < 32; j++)
+    p += GEN_LOAD (p, j, 1, min_frame + j * rsz, is_64);
+  p += GEN_LOAD (p, 0, 1, min_frame + 0 * rsz, is_64);
+  /* Restore SP.  */
+  p += GEN_ADDI (p, 1, 1, frame_size);
+
+  /* Flush instructions to inferior memory.  */
+  write_inferior_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
+
+  /* Now, insert the original instruction to execute in the jump pad.  */
+  *adjusted_insn_addr = buildaddr + (p - buf) * 4;
+  *adjusted_insn_addr_end = *adjusted_insn_addr;
+  ppc_relocate_instruction (adjusted_insn_addr_end, tpaddr);
+
+  /* Verify the relocation size.  If should be 4 for normal copy,
+     8 or 12 for some conditional branch.  */
+  if ((*adjusted_insn_addr_end - *adjusted_insn_addr == 0)
+      || (*adjusted_insn_addr_end - *adjusted_insn_addr > 12))
+    {
+      sprintf (err, "E.Unexpected instruction length = %d"
+		    "when relocate instruction.",
+		    (int) (*adjusted_insn_addr_end - *adjusted_insn_addr));
+      return 1;
+    }
+
+  buildaddr = *adjusted_insn_addr_end;
+  p = buf;
+  /* Finally, write a jump back to the program.  */
+  offset = (tpaddr + 4) - buildaddr;
+  if (offset >= (1 << 25) || offset < -(1 << 25))
+    {
+      sprintf (err, "E.Jump back from jump pad too far from tracepoint "
+		    "(offset 0x%x > 26-bit).", offset);
+      return 1;
+    }
+  /* b <tpaddr+4> */
+  p += GEN_B (p, offset);
+  write_inferior_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
+  *jump_entry = buildaddr + (p - buf) * 4;
+
+  /* The jump pad is now built.  Wire in a jump to our jump pad.  This
+     is always done last (by our caller actually), so that we can
+     install fast tracepoints with threads running.  This relies on
+     the agent's atomic write support.  */
+  offset = entryaddr - tpaddr;
+  if (offset >= (1 << 25) || offset < -(1 << 25))
+    {
+      sprintf (err, "E.Jump back from jump pad too far from tracepoint "
+		    "(offset 0x%x > 26-bit).", offset);
+      return 1;
+    }
+  /* b <jentry> */
+  GEN_B ((uint32_t *) jjump_pad_insn, offset);
+  *jjump_pad_insn_size = 4;
+
+  return 0;
+}
+
+/* Returns the minimum instruction length for installing a tracepoint.  */
+
+static int
+ppc_get_min_fast_tracepoint_insn_len (void)
+{
+  return 4;
+}
+
+/* Emits a given buffer into the target at current_insn_ptr.  Length
+   is in units of 32-bit words.  */
+
+static void
+emit_insns (uint32_t *buf, int n)
+{
+  n = n * sizeof (uint32_t);
+  write_inferior_memory (current_insn_ptr, (unsigned char *) buf, n);
+  current_insn_ptr += n;
+}
+
+#define __EMIT_ASM(NAME, INSNS)					\
+  do								\
+    {								\
+      extern uint32_t start_bcax_ ## NAME [];			\
+      extern uint32_t end_bcax_ ## NAME [];			\
+      emit_insns (start_bcax_ ## NAME,				\
+		  end_bcax_ ## NAME - start_bcax_ ## NAME);	\
+      __asm__ (".section .text.__ppcbcax\n\t"			\
+	       "start_bcax_" #NAME ":\n\t"			\
+	       INSNS "\n\t"					\
+	       "end_bcax_" #NAME ":\n\t"			\
+	       ".previous\n\t");				\
+    } while (0)
+
+#define _EMIT_ASM(NAME, INSNS)		__EMIT_ASM (NAME, INSNS)
+#define EMIT_ASM(INSNS)			_EMIT_ASM (__LINE__, INSNS)
+
+/*
+
+  Bytecode execution stack frame - 32-bit
+
+	|  LR save area           (SP + 4)
+ SP' -> +- Back chain             (SP + 0)
+	|  Save r31   for access saved arguments
+	|  Save r30   for bytecode stack pointer
+	|  Save r4    for incoming argument *value
+	|  Save r3    for incoming argument regs
+ r30 -> +- Bytecode execution stack
+	|
+	|  64-byte (8 doublewords) at initial.
+	|  Expand stack as needed.
+	|
+	+-
+        |  Some padding for minimum stack frame and 16-byte alignment.
+        |  16 bytes.
+ SP     +- Back-chain (SP')
+
+  initial frame size
+  = 16 + (4 * 4) + 64
+  = 96
+
+   r30 is the stack-pointer for bytecode machine.
+       It should point to next-empty, so we can use LDU for pop.
+   r3  is used for cache of the high part of TOP value.
+       It was the first argument, pointer to regs.
+   r4  is used for cache of the low part of TOP value.
+       It was the second argument, pointer to the result.
+       We should set *result = TOP after leaving this function.
+
+ Note:
+ * To restore stack at epilogue
+   => sp = r31
+ * To check stack is big enough for bytecode execution.
+   => r30 - 8 > SP + 8
+ * To return execution result.
+   => 0(r4) = TOP
+
+ */
+
+/* Regardless of endian, register 3 is always high part, 4 is low part.
+   These defines are used when the register pair is stored/loaded.
+   Likewise, to simplify code, have a similiar define for 5:6. */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define TOP_FIRST	"4"
+#define TOP_SECOND	"3"
+#define TMP_FIRST	"6"
+#define TMP_SECOND	"5"
+#else
+#define TOP_FIRST	"3"
+#define TOP_SECOND	"4"
+#define TMP_FIRST	"5"
+#define TMP_SECOND	"6"
+#endif
+
+/* Emit prologue in inferior memory.  See above comments.  */
+
+static void
+ppc_emit_prologue (void)
+{
+  EMIT_ASM (/* Save return address.  */
+	    "mflr  0		\n"
+	    "stw   0, 4(1)	\n"
+	    /* Adjust SP.  96 is the initial frame size.  */
+	    "stwu  1, -96(1)	\n"
+	    /* Save r30 and incoming arguments.  */
+	    "stw   31, 96-4(1)	\n"
+	    "stw   30, 96-8(1)	\n"
+	    "stw   4, 96-12(1)	\n"
+	    "stw   3, 96-16(1)	\n"
+	    /* Point r31 to original r1 for access arguments.  */
+	    "addi  31, 1, 96	\n"
+	    /* Set r30 to pointing stack-top.  */
+	    "addi  30, 1, 64	\n"
+	    /* Initial r3/TOP to 0.  */
+	    "li    3, 0		\n"
+	    "li    4, 0		\n");
+}
+
+/* Emit epilogue in inferior memory.  See above comments.  */
+
+static void
+ppc_emit_epilogue (void)
+{
+  EMIT_ASM (/* *result = TOP */
+	    "lwz   5, -12(31)	\n"
+	    "stw   " TOP_FIRST ", 0(5)	\n"
+	    "stw   " TOP_SECOND ", 4(5)	\n"
+	    /* Restore registers.  */
+	    "lwz   31, -4(31)	\n"
+	    "lwz   30, -8(31)	\n"
+	    /* Restore SP.  */
+	    "lwz   1, 0(1)      \n"
+	    /* Restore LR.  */
+	    "lwz   0, 4(1)	\n"
+	    /* Return 0 for no-error.  */
+	    "li    3, 0		\n"
+	    "mtlr  0		\n"
+	    "blr		\n");
+}
+
+/* TOP = stack[--sp] + TOP  */
+
+static void
+ppc_emit_add (void)
+{
+  EMIT_ASM ("lwzu  " TMP_FIRST ", 8(30)	\n"
+	    "lwz   " TMP_SECOND ", 4(30)\n"
+	    "addc  4, 6, 4	\n"
+	    "adde  3, 5, 3	\n");
+}
+
+/* TOP = stack[--sp] - TOP  */
+
+static void
+ppc_emit_sub (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "subfc  4, 4, 6	\n"
+	    "subfe  3, 3, 5	\n");
+}
+
+/* TOP = stack[--sp] * TOP  */
+
+static void
+ppc_emit_mul (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "mulhwu 7, 6, 4	\n"
+	    "mullw  3, 6, 3	\n"
+	    "mullw  5, 4, 5	\n"
+	    "mullw  4, 6, 4	\n"
+	    "add    3, 5, 3	\n"
+	    "add    3, 7, 3	\n");
+}
+
+/* TOP = stack[--sp] << TOP  */
+
+static void
+ppc_emit_lsh (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "subfic 3, 4, 32\n"		/* r3 = 32 - TOP */
+	    "addi   7, 4, -32\n"	/* r7 = TOP - 32 */
+	    "slw    5, 5, 4\n"		/* Shift high part left */
+	    "slw    4, 6, 4\n"		/* Shift low part left */
+	    "srw    3, 6, 3\n"		/* Shift low to high if shift < 32 */
+	    "slw    7, 6, 7\n"		/* Shift low to high if shift >= 32 */
+	    "or     3, 5, 3\n"
+	    "or     3, 7, 3\n");	/* Assemble high part */
+}
+
+/* Top = stack[--sp] >> TOP
+   (Arithmetic shift right)  */
+
+static void
+ppc_emit_rsh_signed (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "addi   7, 4, -32\n"	/* r7 = TOP - 32 */
+	    "sraw   3, 5, 4\n"		/* Shift high part right */
+	    "cmpwi  7, 1\n"
+	    "blt    0, 1f\n"		/* If shift <= 32, goto 1: */
+	    "sraw   4, 5, 7\n"		/* Shift high to low */
+	    "b      2f\n"
+	    "1:\n"
+	    "subfic 7, 4, 32\n"		/* r7 = 32 - TOP */
+	    "srw    4, 6, 4\n"		/* Shift low part right */
+	    "slw    5, 5, 7\n"		/* Shift high to low */
+	    "or     4, 4, 5\n"		/* Assemble low part */
+	    "2:\n");
+}
+
+/* Top = stack[--sp] >> TOP
+   (Logical shift right)  */
+
+static void
+ppc_emit_rsh_unsigned (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "subfic 3, 4, 32\n"		/* r3 = 32 - TOP */
+	    "addi   7, 4, -32\n"	/* r7 = TOP - 32 */
+	    "srw    6, 6, 4\n"		/* Shift low part right */
+	    "slw    3, 5, 3\n"		/* Shift high to low if shift < 32 */
+	    "srw    7, 5, 7\n"		/* Shift high to low if shift >= 32 */
+	    "or     6, 6, 3\n"
+	    "srw    3, 5, 4\n"		/* Shift high part right */
+	    "or     4, 6, 7\n");	/* Assemble low part */
+}
+
+/* Emit code for signed-extension specified by ARG.  */
+
+static void
+ppc_emit_ext (int arg)
+{
+  switch (arg)
+    {
+    case 8:
+      EMIT_ASM ("extsb  4, 4\n"
+		"srawi 3, 4, 31");
+      break;
+    case 16:
+      EMIT_ASM ("extsh  4, 4\n"
+		"srawi 3, 4, 31");
+      break;
+    case 32:
+      EMIT_ASM ("srawi 3, 4, 31");
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* Emit code for zero-extension specified by ARG.  */
+
+static void
+ppc_emit_zero_ext (int arg)
+{
+  switch (arg)
+    {
+    case 8:
+      EMIT_ASM ("clrlwi 4,4,24\n"
+		"li 3, 0\n");
+      break;
+    case 16:
+      EMIT_ASM ("clrlwi 4,4,16\n"
+		"li 3, 0\n");
+      break;
+    case 32:
+      EMIT_ASM ("li 3, 0");
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* TOP = !TOP
+   i.e., TOP = (TOP == 0) ? 1 : 0;  */
+
+static void
+ppc_emit_log_not (void)
+{
+  EMIT_ASM ("or      4, 3, 4	\n"
+	    "cntlzw  4, 4	\n"
+	    "srwi    4, 4, 5	\n"
+	    "li      3, 0	\n");
+}
+
+/* TOP = stack[--sp] & TOP  */
+
+static void
+ppc_emit_bit_and (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "and  4, 6, 4	\n"
+	    "and  3, 5, 3	\n");
+}
+
+/* TOP = stack[--sp] | TOP  */
+
+static void
+ppc_emit_bit_or (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "or  4, 6, 4	\n"
+	    "or  3, 5, 3	\n");
+}
+
+/* TOP = stack[--sp] ^ TOP  */
+
+static void
+ppc_emit_bit_xor (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "xor  4, 6, 4	\n"
+	    "xor  3, 5, 3	\n");
+}
+
+/* TOP = ~TOP
+   i.e., TOP = ~(TOP | TOP)  */
+
+static void
+ppc_emit_bit_not (void)
+{
+  EMIT_ASM ("nor  3, 3, 3	\n"
+	    "nor  4, 4, 4	\n");
+}
+
+/* TOP = stack[--sp] == TOP  */
+
+static void
+ppc_emit_equal (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "xor     4, 6, 4	\n"
+	    "xor     3, 5, 3	\n"
+	    "or      4, 3, 4	\n"
+	    "cntlzw  4, 4	\n"
+	    "srwi    4, 4, 5	\n"
+	    "li      3, 0	\n");
+}
+
+/* TOP = stack[--sp] < TOP
+   (Signed comparison)  */
+
+static void
+ppc_emit_less_signed (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmpw    7, 5, 3		\n"
+	    /* CR6 bit 0 = low less and high equal */
+	    "crand   6*4+0, 6*4+0, 7*4+2\n"
+	    /* CR7 bit 0 = (low less and high equal) or high less */
+	    "cror    7*4+0, 7*4+0, 6*4+0\n"
+	    "mfcr    4			\n"
+	    "rlwinm  4, 4, 29, 31, 31	\n"
+	    "li      3, 0		\n");
+}
+
+/* TOP = stack[--sp] < TOP
+   (Unsigned comparison)  */
+
+static void
+ppc_emit_less_unsigned (void)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmplw   7, 5, 3		\n"
+	    /* CR6 bit 0 = low less and high equal */
+	    "crand   6*4+0, 6*4+0, 7*4+2\n"
+	    /* CR7 bit 0 = (low less and high equal) or high less */
+	    "cror    7*4+0, 7*4+0, 6*4+0\n"
+	    "mfcr    4			\n"
+	    "rlwinm  4, 4, 29, 31, 31	\n"
+	    "li      3, 0		\n");
+}
+
+/* Access the memory address in TOP in size of SIZE.
+   Zero-extend the read value.  */
+
+static void
+ppc_emit_ref (int size)
+{
+  switch (size)
+    {
+    case 1:
+      EMIT_ASM ("lbz   4, 0(4)\n"
+		"li    3, 0");
+      break;
+    case 2:
+      EMIT_ASM ("lhz   4, 0(4)\n"
+		"li    3, 0");
+      break;
+    case 4:
+      EMIT_ASM ("lwz   4, 0(4)\n"
+		"li    3, 0");
+      break;
+    case 8:
+      if (__BYTE_ORDER == __LITTLE_ENDIAN)
+	EMIT_ASM ("lwz   3, 4(4)\n"
+		  "lwz   4, 0(4)");
+      else
+	EMIT_ASM ("lwz   3, 0(4)\n"
+		  "lwz   4, 4(4)");
+      break;
+    }
+}
+
+/* TOP = NUM  */
+
+static void
+ppc_emit_const (LONGEST num)
+{
+  uint32_t buf[10];
+  uint32_t *p = buf;
+
+  p += gen_limm (p, 3, num >> 32 & 0xffffffff, 0);
+  p += gen_limm (p, 4, num & 0xffffffff, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Set TOP to the value of register REG by calling get_raw_reg function
+   with two argument, collected buffer and register number.  */
+
+static void
+ppc_emit_reg (int reg)
+{
+  uint32_t buf[13];
+  uint32_t *p = buf;
+
+  /* fctx->regs is passed in r3 and then saved in -16(31).  */
+  p += GEN_LWZ (p, 3, 31, -16);
+  p += GEN_LI (p, 4, reg);	/* li	r4, reg */
+  p += gen_call (p, get_raw_reg_func_addr (), 0, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+
+  if (__BYTE_ORDER == __LITTLE_ENDIAN)
+    {
+      EMIT_ASM ("mr 5, 4\n"
+		"mr 4, 3\n"
+		"mr 3, 5\n");
+    }
+}
+
+/* TOP = stack[--sp] */
+
+static void
+ppc_emit_pop (void)
+{
+  EMIT_ASM ("lwzu " TOP_FIRST ", 8(30)	\n"
+	    "lwz " TOP_SECOND ", 4(30)	\n");
+}
+
+/* stack[sp++] = TOP
+
+   Because we may use up bytecode stack, expand 8 doublewords more
+   if needed.  */
+
+static void
+ppc_emit_stack_flush (void)
+{
+  /* Make sure bytecode stack is big enough before push.
+     Otherwise, expand 64-byte more.  */
+
+  EMIT_ASM ("  stw   " TOP_FIRST ", 0(30)	\n"
+	    "  stw   " TOP_SECOND ", 4(30)\n"
+	    "  addi  5, 30, -(8 + 8)	\n"
+	    "  cmpw  7, 5, 1		\n"
+	    "  bgt   7, 1f		\n"
+	    "  stwu  31, -64(1)		\n"
+	    "1:addi  30, 30, -8		\n");
+}
+
+/* Swap TOP and stack[sp-1]  */
+
+static void
+ppc_emit_swap (void)
+{
+  EMIT_ASM ("lwz  " TMP_FIRST ", 8(30)	\n"
+	    "lwz  " TMP_SECOND ", 12(30)	\n"
+	    "stw  " TOP_FIRST ", 8(30)	\n"
+	    "stw  " TOP_SECOND ", 12(30)	\n"
+	    "mr   3, 5		\n"
+	    "mr   4, 6		\n");
+}
+
+/* Discard N elements in the stack.  Also used for ppc64.  */
+
+static void
+ppc_emit_stack_adjust (int n)
+{
+  uint32_t buf[6];
+  uint32_t *p = buf;
+
+  n = n << 3;
+  if ((n >> 15) != 0)
+    {
+      emit_error = 1;
+      return;
+    }
+
+  p += GEN_ADDI (p, 30, 30, n);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Call function FN.  */
+
+static void
+ppc_emit_call (CORE_ADDR fn)
+{
+  uint32_t buf[11];
+  uint32_t *p = buf;
+
+  p += gen_call (p, fn, 0, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* FN's prototype is `LONGEST(*fn)(int)'.
+   TOP = fn (arg1)
+  */
+
+static void
+ppc_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[15];
+  uint32_t *p = buf;
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  p += gen_limm (p, 3, (uint32_t) arg1, 0);
+  p += gen_call (p, fn, 0, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+
+  if (__BYTE_ORDER == __LITTLE_ENDIAN)
+    {
+      EMIT_ASM ("mr 5, 4\n"
+		"mr 4, 3\n"
+		"mr 3, 5\n");
+    }
+}
+
+/* FN's prototype is `void(*fn)(int,LONGEST)'.
+   fn (arg1, TOP)
+
+   TOP should be preserved/restored before/after the call.  */
+
+static void
+ppc_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[21];
+  uint32_t *p = buf;
+
+  /* Save TOP.  0(30) is next-empty.  */
+  p += GEN_STW (p, 3, 30, 0);
+  p += GEN_STW (p, 4, 30, 4);
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  if (__BYTE_ORDER == __LITTLE_ENDIAN)
+    {
+       p += GEN_MR (p, 5, 4);
+       p += GEN_MR (p, 6, 3);
+    }
+  else
+    {
+       p += GEN_MR (p, 5, 3);
+       p += GEN_MR (p, 6, 4);
+    }
+  p += gen_limm (p, 3, (uint32_t) arg1, 0);
+  p += gen_call (p, fn, 0, 0);
+
+  /* Restore TOP */
+  p += GEN_LWZ (p, 3, 30, 0);
+  p += GEN_LWZ (p, 4, 30, 4);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Note in the following goto ops:
+
+   When emitting goto, the target address is later relocated by
+   write_goto_address.  OFFSET_P is the offset of the branch instruction
+   in the code sequence, and SIZE_P is how to relocate the instruction,
+   recognized by ppc_write_goto_address.  In current implementation,
+   SIZE can be either 24 or 14 for branch of conditional-branch instruction.
+ */
+
+/* If TOP is true, goto somewhere.  Otherwise, just fall-through.  */
+
+static void
+ppc_emit_if_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("or.    3, 3, 4	\n"
+	    "lwzu " TOP_FIRST ", 8(30)	\n"
+	    "lwz " TOP_SECOND ", 4(30)	\n"
+	    "1:bne  0, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Unconditional goto.  Also used for ppc64.  */
+
+static void
+ppc_emit_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("1:b	1b");
+
+  if (offset_p)
+    *offset_p = 0;
+  if (size_p)
+    *size_p = 24;
+}
+
+/* Goto if stack[--sp] == TOP  */
+
+static void
+ppc_emit_eq_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu  " TMP_FIRST ", 8(30)	\n"
+	    "lwz   " TMP_SECOND ", 4(30)	\n"
+	    "xor   4, 6, 4	\n"
+	    "xor   3, 5, 3	\n"
+	    "or.   3, 3, 4	\n"
+	    "lwzu  " TOP_FIRST ", 8(30)	\n"
+	    "lwz   " TOP_SECOND ", 4(30)	\n"
+	    "1:beq 0, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 28;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] != TOP  */
+
+static void
+ppc_emit_ne_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu  " TMP_FIRST ", 8(30)	\n"
+	    "lwz   " TMP_SECOND ", 4(30)	\n"
+	    "xor   4, 6, 4	\n"
+	    "xor   3, 5, 3	\n"
+	    "or.   3, 3, 4	\n"
+	    "lwzu  " TOP_FIRST ", 8(30)	\n"
+	    "lwz   " TOP_SECOND ", 4(30)	\n"
+	    "1:bne 0, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 28;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] < TOP  */
+
+static void
+ppc_emit_lt_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmpw    7, 5, 3		\n"
+	    /* CR6 bit 0 = low less and high equal */
+	    "crand   6*4+0, 6*4+0, 7*4+2\n"
+	    /* CR7 bit 0 = (low less and high equal) or high less */
+	    "cror    7*4+0, 7*4+0, 6*4+0\n"
+	    "lwzu    " TOP_FIRST ", 8(30)	\n"
+	    "lwz     " TOP_SECOND ", 4(30)\n"
+	    "1:blt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 32;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] <= TOP  */
+
+static void
+ppc_emit_le_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmpw    7, 5, 3		\n"
+	    /* CR6 bit 0 = low less/equal and high equal */
+	    "crandc   6*4+0, 7*4+2, 6*4+1\n"
+	    /* CR7 bit 0 = (low less/eq and high equal) or high less */
+	    "cror    7*4+0, 7*4+0, 6*4+0\n"
+	    "lwzu    " TOP_FIRST ", 8(30)	\n"
+	    "lwz     " TOP_SECOND ", 4(30)\n"
+	    "1:blt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 32;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] > TOP  */
+
+static void
+ppc_emit_gt_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmpw    7, 5, 3		\n"
+	    /* CR6 bit 0 = low greater and high equal */
+	    "crand   6*4+0, 6*4+1, 7*4+2\n"
+	    /* CR7 bit 0 = (low greater and high equal) or high greater */
+	    "cror    7*4+0, 7*4+1, 6*4+0\n"
+	    "lwzu    " TOP_FIRST ", 8(30)	\n"
+	    "lwz     " TOP_SECOND ", 4(30)\n"
+	    "1:blt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 32;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] >= TOP  */
+
+static void
+ppc_emit_ge_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("lwzu " TMP_FIRST ", 8(30)	\n"
+	    "lwz " TMP_SECOND ", 4(30)	\n"
+	    "cmplw   6, 6, 4		\n"
+	    "cmpw    7, 5, 3		\n"
+	    /* CR6 bit 0 = low ge and high equal */
+	    "crandc  6*4+0, 7*4+2, 6*4+0\n"
+	    /* CR7 bit 0 = (low ge and high equal) or high greater */
+	    "cror    7*4+0, 7*4+1, 6*4+0\n"
+	    "lwzu    " TOP_FIRST ", 8(30)\n"
+	    "lwz     " TOP_SECOND ", 4(30)\n"
+	    "1:blt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 32;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Relocate previous emitted branch instruction.  FROM is the address
+   of the branch instruction, TO is the goto target address, and SIZE
+   if the value we set by *SIZE_P before.  Currently, it is either
+   24 or 14 of branch and conditional-branch instruction.
+   Also used for ppc64.  */
+
+static void
+ppc_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
+{
+  long rel = to - from;
+  uint32_t insn;
+  int opcd;
+
+  read_inferior_memory (from, (unsigned char *) &insn, 4);
+  opcd = (insn >> 26) & 0x3f;
+
+  switch (size)
+    {
+    case 14:
+      if (opcd != 16
+	  || (rel >= (1 << 15) || rel < -(1 << 15)))
+	emit_error = 1;
+      insn = (insn & ~0xfffc) | (rel & 0xfffc);
+      break;
+    case 24:
+      if (opcd != 18
+	  || (rel >= (1 << 25) || rel < -(1 << 25)))
+	emit_error = 1;
+      insn = (insn & ~0x3fffffc) | (rel & 0x3fffffc);
+      break;
+    default:
+      emit_error = 1;
+    }
+
+  if (!emit_error)
+    write_inferior_memory (from, (unsigned char *) &insn, 4);
+}
+
+/* Table of emit ops for 32-bit.  */
+
+static struct emit_ops ppc_emit_ops_impl =
+{
+  ppc_emit_prologue,
+  ppc_emit_epilogue,
+  ppc_emit_add,
+  ppc_emit_sub,
+  ppc_emit_mul,
+  ppc_emit_lsh,
+  ppc_emit_rsh_signed,
+  ppc_emit_rsh_unsigned,
+  ppc_emit_ext,
+  ppc_emit_log_not,
+  ppc_emit_bit_and,
+  ppc_emit_bit_or,
+  ppc_emit_bit_xor,
+  ppc_emit_bit_not,
+  ppc_emit_equal,
+  ppc_emit_less_signed,
+  ppc_emit_less_unsigned,
+  ppc_emit_ref,
+  ppc_emit_if_goto,
+  ppc_emit_goto,
+  ppc_write_goto_address,
+  ppc_emit_const,
+  ppc_emit_call,
+  ppc_emit_reg,
+  ppc_emit_pop,
+  ppc_emit_stack_flush,
+  ppc_emit_zero_ext,
+  ppc_emit_swap,
+  ppc_emit_stack_adjust,
+  ppc_emit_int_call_1,
+  ppc_emit_void_call_2,
+  ppc_emit_eq_goto,
+  ppc_emit_ne_goto,
+  ppc_emit_lt_goto,
+  ppc_emit_le_goto,
+  ppc_emit_gt_goto,
+  ppc_emit_ge_goto
+};
+
+#ifdef __powerpc64__
+
+/*
+
+  Bytecode execution stack frame - 64-bit
+
+	|  LR save area           (SP + 16)
+	|  CR save area           (SP + 8)
+ SP' -> +- Back chain             (SP + 0)
+	|  Save r31   for access saved arguments
+	|  Save r30   for bytecode stack pointer
+	|  Save r4    for incoming argument *value
+	|  Save r3    for incoming argument regs
+ r30 -> +- Bytecode execution stack
+	|
+	|  64-byte (8 doublewords) at initial.
+	|  Expand stack as needed.
+	|
+	+-
+        |  Some padding for minimum stack frame.
+        |  112 for ELFv1.
+ SP     +- Back-chain (SP')
+
+  initial frame size
+  = 112 + (4 * 8) + 64
+  = 208
+
+   r30 is the stack-pointer for bytecode machine.
+       It should point to next-empty, so we can use LDU for pop.
+   r3  is used for cache of TOP value.
+       It was the first argument, pointer to regs.
+   r4  is the second argument, pointer to the result.
+       We should set *result = TOP after leaving this function.
+
+ Note:
+ * To restore stack at epilogue
+   => sp = r31
+ * To check stack is big enough for bytecode execution.
+   => r30 - 8 > SP + 112
+ * To return execution result.
+   => 0(r4) = TOP
+
+ */
+
+/* Emit prologue in inferior memory.  See above comments.  */
+
+static void
+ppc64v1_emit_prologue (void)
+{
+  /* On ELFv1, function pointers really point to function descriptor,
+     so emit one here.  We don't care about contents of words 1 and 2,
+     so let them just overlap out code.  */
+  uint64_t opd = current_insn_ptr + 8;
+  uint32_t buf[2];
+
+  /* Mind the strict aliasing rules.  */
+  memcpy (buf, &opd, sizeof buf);
+  emit_insns(buf, 2);
+  EMIT_ASM (/* Save return address.  */
+	    "mflr  0		\n"
+	    "std   0, 16(1)	\n"
+	    /* Save r30 and incoming arguments.  */
+	    "std   31, -8(1)	\n"
+	    "std   30, -16(1)	\n"
+	    "std   4, -24(1)	\n"
+	    "std   3, -32(1)	\n"
+	    /* Point r31 to current r1 for access arguments.  */
+	    "mr    31, 1	\n"
+	    /* Adjust SP.  208 is the initial frame size.  */
+	    "stdu  1, -208(1)	\n"
+	    /* Set r30 to pointing stack-top.  */
+	    "addi  30, 1, 168	\n"
+	    /* Initial r3/TOP to 0.  */
+	    "li	   3, 0		\n");
+}
+
+/* Emit prologue in inferior memory.  See above comments.  */
+
+static void
+ppc64v2_emit_prologue (void)
+{
+  EMIT_ASM (/* Save return address.  */
+	    "mflr  0		\n"
+	    "std   0, 16(1)	\n"
+	    /* Save r30 and incoming arguments.  */
+	    "std   31, -8(1)	\n"
+	    "std   30, -16(1)	\n"
+	    "std   4, -24(1)	\n"
+	    "std   3, -32(1)	\n"
+	    /* Point r31 to current r1 for access arguments.  */
+	    "mr    31, 1	\n"
+	    /* Adjust SP.  208 is the initial frame size.  */
+	    "stdu  1, -208(1)	\n"
+	    /* Set r30 to pointing stack-top.  */
+	    "addi  30, 1, 168	\n"
+	    /* Initial r3/TOP to 0.  */
+	    "li	   3, 0		\n");
+}
+
+/* Emit epilogue in inferior memory.  See above comments.  */
+
+static void
+ppc64_emit_epilogue (void)
+{
+  EMIT_ASM (/* Restore SP.  */
+	    "ld    1, 0(1)      \n"
+	    /* *result = TOP */
+	    "ld    4, -24(1)	\n"
+	    "std   3, 0(4)	\n"
+	    /* Restore registers.  */
+	    "ld    31, -8(1)	\n"
+	    "ld    30, -16(1)	\n"
+            /* Restore LR.  */
+	    "ld    0, 16(1)	\n"
+	    /* Return 0 for no-error.  */
+	    "li    3, 0		\n"
+	    "mtlr  0		\n"
+	    "blr		\n");
+}
+
+/* TOP = stack[--sp] + TOP  */
+
+static void
+ppc64_emit_add (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "add  3, 4, 3	\n");
+}
+
+/* TOP = stack[--sp] - TOP  */
+
+static void
+ppc64_emit_sub (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "sub  3, 4, 3	\n");
+}
+
+/* TOP = stack[--sp] * TOP  */
+
+static void
+ppc64_emit_mul (void)
+{
+  EMIT_ASM ("ldu    4, 8(30)	\n"
+	    "mulld  3, 4, 3	\n");
+}
+
+/* TOP = stack[--sp] << TOP  */
+
+static void
+ppc64_emit_lsh (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "sld  3, 4, 3	\n");
+}
+
+/* Top = stack[--sp] >> TOP
+   (Arithmetic shift right)  */
+
+static void
+ppc64_emit_rsh_signed (void)
+{
+  EMIT_ASM ("ldu   4, 8(30)	\n"
+	    "srad  3, 4, 3	\n");
+}
+
+/* Top = stack[--sp] >> TOP
+   (Logical shift right)  */
+
+static void
+ppc64_emit_rsh_unsigned (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "srd  3, 4, 3	\n");
+}
+
+/* Emit code for signed-extension specified by ARG.  */
+
+static void
+ppc64_emit_ext (int arg)
+{
+  switch (arg)
+    {
+    case 8:
+      EMIT_ASM ("extsb  3, 3");
+      break;
+    case 16:
+      EMIT_ASM ("extsh  3, 3");
+      break;
+    case 32:
+      EMIT_ASM ("extsw  3, 3");
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* Emit code for zero-extension specified by ARG.  */
+
+static void
+ppc64_emit_zero_ext (int arg)
+{
+  switch (arg)
+    {
+    case 8:
+      EMIT_ASM ("rldicl 3,3,0,56");
+      break;
+    case 16:
+      EMIT_ASM ("rldicl 3,3,0,48");
+      break;
+    case 32:
+      EMIT_ASM ("rldicl 3,3,0,32");
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* TOP = !TOP
+   i.e., TOP = (TOP == 0) ? 1 : 0;  */
+
+static void
+ppc64_emit_log_not (void)
+{
+  EMIT_ASM ("cntlzd  3, 3	\n"
+	    "srdi    3, 3, 6	\n");
+}
+
+/* TOP = stack[--sp] & TOP  */
+
+static void
+ppc64_emit_bit_and (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "and  3, 4, 3	\n");
+}
+
+/* TOP = stack[--sp] | TOP  */
+
+static void
+ppc64_emit_bit_or (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "or   3, 4, 3	\n");
+}
+
+/* TOP = stack[--sp] ^ TOP  */
+
+static void
+ppc64_emit_bit_xor (void)
+{
+  EMIT_ASM ("ldu  4, 8(30)	\n"
+	    "xor  3, 4, 3	\n");
+}
+
+/* TOP = ~TOP
+   i.e., TOP = ~(TOP | TOP)  */
+
+static void
+ppc64_emit_bit_not (void)
+{
+  EMIT_ASM ("nor  3, 3, 3	\n");
+}
+
+/* TOP = stack[--sp] == TOP  */
+
+static void
+ppc64_emit_equal (void)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "xor     3, 3, 4	\n"
+	    "cntlzd  3, 3	\n"
+	    "srdi    3, 3, 6	\n");
+}
+
+/* TOP = stack[--sp] < TOP
+   (Signed comparison)  */
+
+static void
+ppc64_emit_less_signed (void)
+{
+  EMIT_ASM ("ldu     4, 8(30)		\n"
+	    "cmpd    7, 4, 3		\n"
+	    "mfcr    3			\n"
+	    "rlwinm  3, 3, 29, 31, 31	\n");
+}
+
+/* TOP = stack[--sp] < TOP
+   (Unsigned comparison)  */
+
+static void
+ppc64_emit_less_unsigned (void)
+{
+  EMIT_ASM ("ldu     4, 8(30)		\n"
+	    "cmpld   7, 4, 3		\n"
+	    "mfcr    3			\n"
+	    "rlwinm  3, 3, 29, 31, 31	\n");
+}
+
+/* Access the memory address in TOP in size of SIZE.
+   Zero-extend the read value.  */
+
+static void
+ppc64_emit_ref (int size)
+{
+  switch (size)
+    {
+    case 1:
+      EMIT_ASM ("lbz   3, 0(3)");
+      break;
+    case 2:
+      EMIT_ASM ("lhz   3, 0(3)");
+      break;
+    case 4:
+      EMIT_ASM ("lwz   3, 0(3)");
+      break;
+    case 8:
+      EMIT_ASM ("ld    3, 0(3)");
+      break;
+    }
+}
+
+/* TOP = NUM  */
+
+static void
+ppc64_emit_const (LONGEST num)
+{
+  uint32_t buf[5];
+  uint32_t *p = buf;
+
+  p += gen_limm (p, 3, num, 1);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Set TOP to the value of register REG by calling get_raw_reg function
+   with two argument, collected buffer and register number.  */
+
+static void
+ppc64v1_emit_reg (int reg)
+{
+  uint32_t buf[15];
+  uint32_t *p = buf;
+
+  /* fctx->regs is passed in r3 and then saved in 176(1).  */
+  p += GEN_LD (p, 3, 31, -32);
+  p += GEN_LI (p, 4, reg);
+  p += GEN_STD (p, 2, 1, 40);	/* Save TOC.  */
+  p += gen_call (p, get_raw_reg_func_addr (), 1, 1);
+  p += GEN_LD (p, 2, 1, 40);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Likewise, for ELFv2.  */
+
+static void
+ppc64v2_emit_reg (int reg)
+{
+  uint32_t buf[12];
+  uint32_t *p = buf;
+
+  /* fctx->regs is passed in r3 and then saved in 176(1).  */
+  p += GEN_LD (p, 3, 31, -32);
+  p += GEN_LI (p, 4, reg);
+  p += GEN_STD (p, 2, 1, 24);	/* Save TOC.  */
+  p += gen_call (p, get_raw_reg_func_addr (), 1, 0);
+  p += GEN_LD (p, 2, 1, 24);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* TOP = stack[--sp] */
+
+static void
+ppc64_emit_pop (void)
+{
+  EMIT_ASM ("ldu  3, 8(30)");
+}
+
+/* stack[sp++] = TOP
+
+   Because we may use up bytecode stack, expand 8 doublewords more
+   if needed.  */
+
+static void
+ppc64_emit_stack_flush (void)
+{
+  /* Make sure bytecode stack is big enough before push.
+     Otherwise, expand 64-byte more.  */
+
+  EMIT_ASM ("  std   3, 0(30)		\n"
+	    "  addi  4, 30, -(112 + 8)	\n"
+	    "  cmpd  7, 4, 1		\n"
+	    "  bgt   7, 1f		\n"
+	    "  stdu  31, -64(1)		\n"
+	    "1:addi  30, 30, -8		\n");
+}
+
+/* Swap TOP and stack[sp-1]  */
+
+static void
+ppc64_emit_swap (void)
+{
+  EMIT_ASM ("ld   4, 8(30)	\n"
+	    "std  3, 8(30)	\n"
+	    "mr   3, 4		\n");
+}
+
+/* Call function FN - ELFv1.  */
+
+static void
+ppc64v1_emit_call (CORE_ADDR fn)
+{
+  uint32_t buf[13];
+  uint32_t *p = buf;
+
+  p += GEN_STD (p, 2, 1, 40);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 1);
+  p += GEN_LD (p, 2, 1, 40);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Call function FN - ELFv2.  */
+
+static void
+ppc64v2_emit_call (CORE_ADDR fn)
+{
+  uint32_t buf[10];
+  uint32_t *p = buf;
+
+  p += GEN_STD (p, 2, 1, 24);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 0);
+  p += GEN_LD (p, 2, 1, 24);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* FN's prototype is `LONGEST(*fn)(int)'.
+   TOP = fn (arg1)
+  */
+
+static void
+ppc64v1_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[13];
+  uint32_t *p = buf;
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  p += gen_limm (p, 3, arg1, 1);
+  p += GEN_STD (p, 2, 1, 40);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 1);
+  p += GEN_LD (p, 2, 1, 40);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Likewise for ELFv2.  */
+
+static void
+ppc64v2_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[10];
+  uint32_t *p = buf;
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  p += gen_limm (p, 3, arg1, 1);
+  p += GEN_STD (p, 2, 1, 24);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 0);
+  p += GEN_LD (p, 2, 1, 24);	/* Restore TOC.  */
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* FN's prototype is `void(*fn)(int,LONGEST)'.
+   fn (arg1, TOP)
+
+   TOP should be preserved/restored before/after the call.  */
+
+static void
+ppc64v1_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[17];
+  uint32_t *p = buf;
+
+  /* Save TOP.  0(30) is next-empty.  */
+  p += GEN_STD (p, 3, 30, 0);
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  p += GEN_MR (p, 4, 3);		/* mr	r4, r3 */
+  p += gen_limm (p, 3, arg1, 1);
+  p += GEN_STD (p, 2, 1, 40);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 1);
+  p += GEN_LD (p, 2, 1, 40);	/* Restore TOC.  */
+
+  /* Restore TOP */
+  p += GEN_LD (p, 3, 30, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* Likewise for ELFv2.  */
+
+static void
+ppc64v2_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  uint32_t buf[14];
+  uint32_t *p = buf;
+
+  /* Save TOP.  0(30) is next-empty.  */
+  p += GEN_STD (p, 3, 30, 0);
+
+  /* Setup argument.  arg1 is a 16-bit value.  */
+  p += GEN_MR (p, 4, 3);		/* mr	r4, r3 */
+  p += gen_limm (p, 3, arg1, 1);
+  p += GEN_STD (p, 2, 1, 24);	/* Save TOC.  */
+  p += gen_call (p, fn, 1, 0);
+  p += GEN_LD (p, 2, 1, 24);	/* Restore TOC.  */
+
+  /* Restore TOP */
+  p += GEN_LD (p, 3, 30, 0);
+
+  emit_insns (buf, p - buf);
+  gdb_assert ((p - buf) <= (sizeof (buf) / sizeof (*buf)));
+}
+
+/* If TOP is true, goto somewhere.  Otherwise, just fall-through.  */
+
+static void
+ppc64_emit_if_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("cmpdi  7, 3, 0	\n"
+	    "ldu    3, 8(30)	\n"
+	    "1:bne  7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 8;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] == TOP  */
+
+static void
+ppc64_emit_eq_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:beq   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] != TOP  */
+
+static void
+ppc64_emit_ne_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:bne   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] < TOP  */
+
+static void
+ppc64_emit_lt_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:blt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] <= TOP  */
+
+static void
+ppc64_emit_le_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:ble   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] > TOP  */
+
+static void
+ppc64_emit_gt_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:bgt   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Goto if stack[--sp] >= TOP  */
+
+static void
+ppc64_emit_ge_goto (int *offset_p, int *size_p)
+{
+  EMIT_ASM ("ldu     4, 8(30)	\n"
+	    "cmpd    7, 4, 3	\n"
+	    "ldu     3, 8(30)	\n"
+	    "1:bge   7, 1b	\n");
+
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 14;
+}
+
+/* Table of emit ops for 64-bit ELFv1.  */
+
+static struct emit_ops ppc64v1_emit_ops_impl =
+{
+  ppc64v1_emit_prologue,
+  ppc64_emit_epilogue,
+  ppc64_emit_add,
+  ppc64_emit_sub,
+  ppc64_emit_mul,
+  ppc64_emit_lsh,
+  ppc64_emit_rsh_signed,
+  ppc64_emit_rsh_unsigned,
+  ppc64_emit_ext,
+  ppc64_emit_log_not,
+  ppc64_emit_bit_and,
+  ppc64_emit_bit_or,
+  ppc64_emit_bit_xor,
+  ppc64_emit_bit_not,
+  ppc64_emit_equal,
+  ppc64_emit_less_signed,
+  ppc64_emit_less_unsigned,
+  ppc64_emit_ref,
+  ppc64_emit_if_goto,
+  ppc_emit_goto,
+  ppc_write_goto_address,
+  ppc64_emit_const,
+  ppc64v1_emit_call,
+  ppc64v1_emit_reg,
+  ppc64_emit_pop,
+  ppc64_emit_stack_flush,
+  ppc64_emit_zero_ext,
+  ppc64_emit_swap,
+  ppc_emit_stack_adjust,
+  ppc64v1_emit_int_call_1,
+  ppc64v1_emit_void_call_2,
+  ppc64_emit_eq_goto,
+  ppc64_emit_ne_goto,
+  ppc64_emit_lt_goto,
+  ppc64_emit_le_goto,
+  ppc64_emit_gt_goto,
+  ppc64_emit_ge_goto
+};
+
+/* Table of emit ops for 64-bit ELFv2.  */
+
+static struct emit_ops ppc64v2_emit_ops_impl =
+{
+  ppc64v2_emit_prologue,
+  ppc64_emit_epilogue,
+  ppc64_emit_add,
+  ppc64_emit_sub,
+  ppc64_emit_mul,
+  ppc64_emit_lsh,
+  ppc64_emit_rsh_signed,
+  ppc64_emit_rsh_unsigned,
+  ppc64_emit_ext,
+  ppc64_emit_log_not,
+  ppc64_emit_bit_and,
+  ppc64_emit_bit_or,
+  ppc64_emit_bit_xor,
+  ppc64_emit_bit_not,
+  ppc64_emit_equal,
+  ppc64_emit_less_signed,
+  ppc64_emit_less_unsigned,
+  ppc64_emit_ref,
+  ppc64_emit_if_goto,
+  ppc_emit_goto,
+  ppc_write_goto_address,
+  ppc64_emit_const,
+  ppc64v2_emit_call,
+  ppc64v2_emit_reg,
+  ppc64_emit_pop,
+  ppc64_emit_stack_flush,
+  ppc64_emit_zero_ext,
+  ppc64_emit_swap,
+  ppc_emit_stack_adjust,
+  ppc64v2_emit_int_call_1,
+  ppc64v2_emit_void_call_2,
+  ppc64_emit_eq_goto,
+  ppc64_emit_ne_goto,
+  ppc64_emit_lt_goto,
+  ppc64_emit_le_goto,
+  ppc64_emit_gt_goto,
+  ppc64_emit_ge_goto
+};
+
+#endif
+
+/* Implementation of linux_target_ops method "emit_ops".  */
+
+static struct emit_ops *
+ppc_emit_ops (void)
+{
+#ifdef __powerpc64__
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+
+  if (register_size (regcache->tdesc, 0) == 8)
+    {
+      if (is_elfv2_inferior ())
+        return &ppc64v2_emit_ops_impl;
+      else
+        return &ppc64v1_emit_ops_impl;
+    }
+#endif
+  return &ppc_emit_ops_impl;
+}
+
+/* Implementation of linux_target_ops method "get_ipa_tdesc_idx".  */
+
+static int
+ppc_get_ipa_tdesc_idx (void)
+{
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+  const struct target_desc *tdesc = regcache->tdesc;
+
+#ifdef __powerpc64__
+  if (tdesc == tdesc_powerpc_64l)
+    return PPC_TDESC_BASE;
+  if (tdesc == tdesc_powerpc_altivec64l)
+    return PPC_TDESC_ALTIVEC;
+  if (tdesc == tdesc_powerpc_cell64l)
+    return PPC_TDESC_CELL;
+  if (tdesc == tdesc_powerpc_vsx64l)
+    return PPC_TDESC_VSX;
+  if (tdesc == tdesc_powerpc_isa205_64l)
+    return PPC_TDESC_ISA205;
+  if (tdesc == tdesc_powerpc_isa205_altivec64l)
+    return PPC_TDESC_ISA205_ALTIVEC;
+  if (tdesc == tdesc_powerpc_isa205_vsx64l)
+    return PPC_TDESC_ISA205_VSX;
+#endif
+
+  if (tdesc == tdesc_powerpc_32l)
+    return PPC_TDESC_BASE;
+  if (tdesc == tdesc_powerpc_altivec32l)
+    return PPC_TDESC_ALTIVEC;
+  if (tdesc == tdesc_powerpc_cell32l)
+    return PPC_TDESC_CELL;
+  if (tdesc == tdesc_powerpc_vsx32l)
+    return PPC_TDESC_VSX;
+  if (tdesc == tdesc_powerpc_isa205_32l)
+    return PPC_TDESC_ISA205;
+  if (tdesc == tdesc_powerpc_isa205_altivec32l)
+    return PPC_TDESC_ISA205_ALTIVEC;
+  if (tdesc == tdesc_powerpc_isa205_vsx32l)
+    return PPC_TDESC_ISA205_VSX;
+  if (tdesc == tdesc_powerpc_e500l)
+    return PPC_TDESC_E500;
+
+  return 0;
+}
+
+struct linux_target_ops the_low_target = {
+  ppc_arch_setup,
+  ppc_regs_info,
+  ppc_cannot_fetch_register,
+  ppc_cannot_store_register,
+  NULL, /* fetch_register */
+  ppc_get_pc,
+  ppc_set_pc,
+  NULL, /* breakpoint_kind_from_pc */
+  ppc_sw_breakpoint_from_kind,
+  NULL,
+  0,
+  ppc_breakpoint_at,
+  ppc_supports_z_point_type,
+  ppc_insert_point,
+  ppc_remove_point,
+  NULL,
+  NULL,
+  ppc_collect_ptrace_register,
+  ppc_supply_ptrace_register,
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  ppc_supports_tracepoints,
+  ppc_get_thread_area,
+  ppc_install_fast_tracepoint_jump_pad,
+  ppc_emit_ops,
+  ppc_get_min_fast_tracepoint_insn_len,
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  ppc_supports_hardware_single_step,
+  NULL, /* get_syscall_trapinfo */
+  ppc_get_ipa_tdesc_idx,
+};
+
+void
+initialize_low_arch (void)
+{
+  /* Initialize the Linux target descriptions.  */
+
+  init_registers_powerpc_32l ();
+  init_registers_powerpc_altivec32l ();
+  init_registers_powerpc_cell32l ();
+  init_registers_powerpc_vsx32l ();
+  init_registers_powerpc_isa205_32l ();
+  init_registers_powerpc_isa205_altivec32l ();
+  init_registers_powerpc_isa205_vsx32l ();
+  init_registers_powerpc_e500l ();
+#if __powerpc64__
   init_registers_powerpc_64l ();
   init_registers_powerpc_altivec64l ();
   init_registers_powerpc_cell64l ();
@@ -719,6 +3161,7 @@ initialize_low_arch (void)
   init_registers_powerpc_isa205_64l ();
   init_registers_powerpc_isa205_altivec64l ();
   init_registers_powerpc_isa205_vsx64l ();
+#endif
 
   initialize_regsets_info (&ppc_regsets_info);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-tdesc.h ./gdb/gdbserver/linux-ppc-tdesc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-ppc-tdesc.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-ppc-tdesc.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,101 @@
+/* Low level support for ppc, shared between gdbserver and IPA.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Note: since IPA obviously knows what ABI it's running on (32 vs 64),
+   it's sufficient to pass only the register set here.  This, together with
+   the ABI known at IPA compile time, maps to a tdesc.  */
+
+enum ppc_linux_tdesc {
+  PPC_TDESC_BASE,
+  PPC_TDESC_ALTIVEC,
+  PPC_TDESC_CELL,
+  PPC_TDESC_VSX,
+  PPC_TDESC_ISA205,
+  PPC_TDESC_ISA205_ALTIVEC,
+  PPC_TDESC_ISA205_VSX,
+  PPC_TDESC_E500,
+};
+
+#if !defined __powerpc64__ || !defined IN_PROCESS_AGENT
+
+/* Defined in auto-generated file powerpc-32l.c.  */
+void init_registers_powerpc_32l (void);
+extern const struct target_desc *tdesc_powerpc_32l;
+
+/* Defined in auto-generated file powerpc-altivec32l.c.  */
+void init_registers_powerpc_altivec32l (void);
+extern const struct target_desc *tdesc_powerpc_altivec32l;
+
+/* Defined in auto-generated file powerpc-cell32l.c.  */
+void init_registers_powerpc_cell32l (void);
+extern const struct target_desc *tdesc_powerpc_cell32l;
+
+/* Defined in auto-generated file powerpc-vsx32l.c.  */
+void init_registers_powerpc_vsx32l (void);
+extern const struct target_desc *tdesc_powerpc_vsx32l;
+
+/* Defined in auto-generated file powerpc-isa205-32l.c.  */
+void init_registers_powerpc_isa205_32l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_32l;
+
+/* Defined in auto-generated file powerpc-isa205-altivec32l.c.  */
+void init_registers_powerpc_isa205_altivec32l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_altivec32l;
+
+/* Defined in auto-generated file powerpc-isa205-vsx32l.c.  */
+void init_registers_powerpc_isa205_vsx32l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_vsx32l;
+
+/* Defined in auto-generated file powerpc-e500l.c.  */
+void init_registers_powerpc_e500l (void);
+extern const struct target_desc *tdesc_powerpc_e500l;
+
+#endif
+
+#if defined __powerpc64__
+
+/* Defined in auto-generated file powerpc-64l.c.  */
+void init_registers_powerpc_64l (void);
+extern const struct target_desc *tdesc_powerpc_64l;
+
+/* Defined in auto-generated file powerpc-altivec64l.c.  */
+void init_registers_powerpc_altivec64l (void);
+extern const struct target_desc *tdesc_powerpc_altivec64l;
+
+/* Defined in auto-generated file powerpc-cell64l.c.  */
+void init_registers_powerpc_cell64l (void);
+extern const struct target_desc *tdesc_powerpc_cell64l;
+
+/* Defined in auto-generated file powerpc-vsx64l.c.  */
+void init_registers_powerpc_vsx64l (void);
+extern const struct target_desc *tdesc_powerpc_vsx64l;
+
+/* Defined in auto-generated file powerpc-isa205-64l.c.  */
+void init_registers_powerpc_isa205_64l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_64l;
+
+/* Defined in auto-generated file powerpc-isa205-altivec64l.c.  */
+void init_registers_powerpc_isa205_altivec64l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_altivec64l;
+
+/* Defined in auto-generated file powerpc-isa205-vsx64l.c.  */
+void init_registers_powerpc_isa205_vsx64l (void);
+extern const struct target_desc *tdesc_powerpc_isa205_vsx64l;
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-ipa.c ./gdb/gdbserver/linux-s390-ipa.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-ipa.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-s390-ipa.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,454 @@
+/* GNU/Linux S/390 specific low level interface, for the in-process
+   agent library for GDB.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "server.h"
+#include <sys/mman.h>
+#include "tracepoint.h"
+#include "linux-s390-tdesc.h"
+#include <elf.h>
+#ifdef HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
+#define FT_FPR(x) (0x000 + (x) * 0x10)
+#define FT_VR(x) (0x000 + (x) * 0x10)
+#define FT_VR_L(x) (0x008 + (x) * 0x10)
+#define FT_GPR(x) (0x200 + (x) * 8)
+#define FT_GPR_U(x) (0x200 + (x) * 8)
+#define FT_GPR_L(x) (0x204 + (x) * 8)
+#define FT_GPR(x) (0x200 + (x) * 8)
+#define FT_ACR(x) (0x280 + (x) * 4)
+#define FT_PSWM 0x2c0
+#define FT_PSWM_U 0x2c0
+#define FT_PSWA 0x2c8
+#define FT_PSWA_L 0x2cc
+#define FT_FPC 0x2d0
+
+/* Mappings between registers collected by the jump pad and GDB's register
+   array layout used by regcache.
+
+   See linux-s390-low.c (s390_install_fast_tracepoint_jump_pad) for more
+   details.  */
+
+#ifndef __s390x__
+
+/* Used for s390-linux32, s390-linux32v1, s390-linux32v2.  */
+
+static const int s390_linux32_ft_collect_regmap[] = {
+  /* 32-bit PSWA and PSWM.  */
+  FT_PSWM_U, FT_PSWA_L,
+  /* 32-bit GPRs (mapped to lower halves of 64-bit slots).  */
+  FT_GPR_L (0), FT_GPR_L (1), FT_GPR_L (2), FT_GPR_L (3),
+  FT_GPR_L (4), FT_GPR_L (5), FT_GPR_L (6), FT_GPR_L (7),
+  FT_GPR_L (8), FT_GPR_L (9), FT_GPR_L (10), FT_GPR_L (11),
+  FT_GPR_L (12), FT_GPR_L (13), FT_GPR_L (14), FT_GPR_L (15),
+  /* ACRs */
+  FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+  FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+  FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+  FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+  /* FPRs (mapped to upper halves of 128-bit VR slots).  */
+  FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+  FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+  FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+  FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+  /* orig_r2, last_break, system_call */
+  -1, -1, -1,
+};
+
+/* Used for s390-linux64, s390-linux64v1, s390-linux64v2, s390-vx-linux64.  */
+
+static const int s390_linux64_ft_collect_regmap[] = {
+  /* 32-bit PSWA and PSWM.  */
+  FT_PSWM_U, FT_PSWA_L,
+  /* 32-bit halves of 64-bit GPRs.  */
+  FT_GPR_U (0), FT_GPR_L (0),
+  FT_GPR_U (1), FT_GPR_L (1),
+  FT_GPR_U (2), FT_GPR_L (2),
+  FT_GPR_U (3), FT_GPR_L (3),
+  FT_GPR_U (4), FT_GPR_L (4),
+  FT_GPR_U (5), FT_GPR_L (5),
+  FT_GPR_U (6), FT_GPR_L (6),
+  FT_GPR_U (7), FT_GPR_L (7),
+  FT_GPR_U (8), FT_GPR_L (8),
+  FT_GPR_U (9), FT_GPR_L (9),
+  FT_GPR_U (10), FT_GPR_L (10),
+  FT_GPR_U (11), FT_GPR_L (11),
+  FT_GPR_U (12), FT_GPR_L (12),
+  FT_GPR_U (13), FT_GPR_L (13),
+  FT_GPR_U (14), FT_GPR_L (14),
+  FT_GPR_U (15), FT_GPR_L (15),
+  /* ACRs */
+  FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+  FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+  FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+  FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+  /* FPRs (mapped to upper halves of 128-bit VR slots).  */
+  FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+  FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+  FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+  FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+  /* orig_r2, last_break, system_call */
+  -1, -1, -1,
+  /* Lower halves of 128-bit VRs. */
+  FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+  FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+  FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+  FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+  /* And the next 16 VRs.  */
+  FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+  FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+  FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+  FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+/* Used for s390-te-linux64, s390-tevx-linux64.  */
+
+static const int s390_te_linux64_ft_collect_regmap[] = {
+  /* 32-bit PSWA and PSWM.  */
+  FT_PSWM_U, FT_PSWA_L,
+  /* 32-bit halves of 64-bit GPRs.  */
+  FT_GPR_U (0), FT_GPR_L (0),
+  FT_GPR_U (1), FT_GPR_L (1),
+  FT_GPR_U (2), FT_GPR_L (2),
+  FT_GPR_U (3), FT_GPR_L (3),
+  FT_GPR_U (4), FT_GPR_L (4),
+  FT_GPR_U (5), FT_GPR_L (5),
+  FT_GPR_U (6), FT_GPR_L (6),
+  FT_GPR_U (7), FT_GPR_L (7),
+  FT_GPR_U (8), FT_GPR_L (8),
+  FT_GPR_U (9), FT_GPR_L (9),
+  FT_GPR_U (10), FT_GPR_L (10),
+  FT_GPR_U (11), FT_GPR_L (11),
+  FT_GPR_U (12), FT_GPR_L (12),
+  FT_GPR_U (13), FT_GPR_L (13),
+  FT_GPR_U (14), FT_GPR_L (14),
+  FT_GPR_U (15), FT_GPR_L (15),
+  /* ACRs */
+  FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+  FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+  FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+  FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+  /* FPRs (mapped to upper halves of 128-bit VR slots).  */
+  FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+  FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+  FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+  FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+  /* orig_r2, last_break, system_call */
+  -1, -1, -1,
+  /* TDB */
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  /* Lower halves of 128-bit VRs. */
+  FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+  FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+  FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+  FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+  /* And the next 16 VRs.  */
+  FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+  FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+  FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+  FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+#else /* __s390x__ */
+
+/* Used for s390x-linux64, s390x-linux64v1, s390x-linux64v2, s390x-vx-linux64.  */
+
+static const int s390x_ft_collect_regmap[] = {
+  /* 64-bit PSWA and PSWM.  */
+  FT_PSWM, FT_PSWA,
+  /* 64-bit GPRs.  */
+  FT_GPR (0), FT_GPR (1), FT_GPR (2), FT_GPR (3),
+  FT_GPR (4), FT_GPR (5), FT_GPR (6), FT_GPR (7),
+  FT_GPR (8), FT_GPR (9), FT_GPR (10), FT_GPR (11),
+  FT_GPR (12), FT_GPR (13), FT_GPR (14), FT_GPR (15),
+  /* ACRs */
+  FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+  FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+  FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+  FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+  /* FPRs (mapped to upper halves of 128-bit VR slots).  */
+  FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+  FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+  FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+  FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+  /* orig_r2, last_break, system_call */
+  -1, -1, -1,
+  /* Lower halves of 128-bit VRs. */
+  FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+  FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+  FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+  FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+  /* And the next 16 VRs.  */
+  FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+  FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+  FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+  FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+/* Used for s390x-te-linux64, s390x-tevx-linux64.  */
+
+static const int s390x_te_ft_collect_regmap[] = {
+  /* 64-bit PSWA and PSWM.  */
+  FT_PSWM, FT_PSWA,
+  /* 64-bit GPRs.  */
+  FT_GPR (0), FT_GPR (1), FT_GPR (2), FT_GPR (3),
+  FT_GPR (4), FT_GPR (5), FT_GPR (6), FT_GPR (7),
+  FT_GPR (8), FT_GPR (9), FT_GPR (10), FT_GPR (11),
+  FT_GPR (12), FT_GPR (13), FT_GPR (14), FT_GPR (15),
+  /* ACRs */
+  FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+  FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+  FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+  FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+  /* FPRs (mapped to upper halves of 128-bit VR slots).  */
+  FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+  FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+  FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+  FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+  /* orig_r2, last_break, system_call */
+  -1, -1, -1,
+  /* TDB */
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  -1, -1, -1, -1,
+  /* Lower halves of 128-bit VRs. */
+  FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+  FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+  FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+  FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+  /* And the next 16 VRs.  */
+  FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+  FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+  FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+  FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+#endif
+
+/* Initialized by get_ipa_tdesc according to the tdesc in use.  */
+
+static const int *s390_regmap;
+static int s390_regnum;
+
+/* Fill in REGCACHE with registers saved by the jump pad in BUF.  */
+
+void
+supply_fast_tracepoint_registers (struct regcache *regcache,
+				  const unsigned char *buf)
+{
+  int i;
+  for (i = 0; i < s390_regnum; i++)
+    if (s390_regmap[i] != -1)
+      supply_register (regcache, i, ((char *) buf) + s390_regmap[i]);
+}
+
+ULONGEST
+get_raw_reg (const unsigned char *raw_regs, int regnum)
+{
+  int offset;
+  if (regnum >= s390_regnum)
+    return 0;
+  offset = s390_regmap[regnum];
+  if (offset == -1)
+    return 0;
+
+  /* The regnums are variable, better to figure out size by FT offset.  */
+
+  /* 64-bit ones.  */
+  if (offset < FT_VR(16)
+#ifdef __s390x__
+      || (offset >= FT_GPR(0) && offset < FT_ACR(0))
+      || offset == FT_PSWM
+      || offset == FT_PSWA
+#endif
+     )
+    return *(uint64_t *) (raw_regs + offset);
+
+  if (offset >= FT_ACR(0 && offset < FT_PSWM)
+      || offset == FT_FPC
+#ifndef __s390x__
+      || (offset >= FT_GPR(0) && offset < FT_ACR(0))
+      || offset == FT_PSWM_U
+      || offset == FT_PSWA_L
+#endif
+     )
+    return *(uint32_t *) (raw_regs + offset);
+
+  /* This leaves 128-bit VX.  No way to return them.  */
+  return 0;
+}
+
+/* Return target_desc to use for IPA, given the tdesc index passed by
+   gdbserver.  For s390, it also sets s390_regmap and s390_regnum.  */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+#define SET_REGMAP(regmap, skip_last) \
+	do { \
+	  s390_regmap = regmap; \
+	  s390_regnum = (sizeof regmap / sizeof regmap[0]) - skip_last; \
+	} while(0)
+  switch (idx)
+    {
+#ifdef __s390x__
+    case S390_TDESC_64:
+      /* Subtract number of VX regs.  */
+      SET_REGMAP(s390x_ft_collect_regmap, 32);
+      return tdesc_s390x_linux64;
+    case S390_TDESC_64V1:
+      SET_REGMAP(s390x_ft_collect_regmap, 32);
+      return tdesc_s390x_linux64v1;
+    case S390_TDESC_64V2:
+      SET_REGMAP(s390x_ft_collect_regmap, 32);
+      return tdesc_s390x_linux64v2;
+    case S390_TDESC_TE:
+      SET_REGMAP(s390x_te_ft_collect_regmap, 32);
+      return tdesc_s390x_te_linux64;
+    case S390_TDESC_VX:
+      SET_REGMAP(s390x_ft_collect_regmap, 0);
+      return tdesc_s390x_vx_linux64;
+    case S390_TDESC_TEVX:
+      SET_REGMAP(s390x_te_ft_collect_regmap, 0);
+      return tdesc_s390x_tevx_linux64;
+#else
+    case S390_TDESC_32:
+      SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+      return tdesc_s390_linux32;
+    case S390_TDESC_32V1:
+      SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+      return tdesc_s390_linux32v1;
+    case S390_TDESC_32V2:
+      SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+      return tdesc_s390_linux32v2;
+    case S390_TDESC_64:
+      SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+      return tdesc_s390_linux64;
+    case S390_TDESC_64V1:
+      SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+      return tdesc_s390_linux64v1;
+    case S390_TDESC_64V2:
+      SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+      return tdesc_s390_linux64v2;
+    case S390_TDESC_TE:
+      SET_REGMAP(s390_te_linux64_ft_collect_regmap, 32);
+      return tdesc_s390_te_linux64;
+    case S390_TDESC_VX:
+      SET_REGMAP(s390_linux64_ft_collect_regmap, 0);
+      return tdesc_s390_vx_linux64;
+    case S390_TDESC_TEVX:
+      SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0);
+      return tdesc_s390_tevx_linux64;
+#endif
+    default:
+      internal_error (__FILE__, __LINE__,
+		      "unknown ipa tdesc index: %d", idx);
+#ifdef __s390x__
+      return tdesc_s390x_linux64;
+#else
+      return tdesc_s390_linux32;
+#endif
+    }
+}
+
+/* Allocate buffer for the jump pads.  On 31-bit, JG reaches everywhere,
+   so just allocate normally.  On 64-bit, we have +/-4GiB of reach, and
+   the executable is usually mapped at 0x80000000 - aim for somewhere
+   below it.  */
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+#ifdef __s390x__
+  uintptr_t addr;
+  uintptr_t exec_base = getauxval (AT_PHDR);
+  int pagesize;
+  void *res;
+
+  if (exec_base == 0)
+    exec_base = 0x80000000;
+
+  pagesize = sysconf (_SC_PAGE_SIZE);
+  if (pagesize == -1)
+    perror_with_name ("sysconf");
+
+  addr = exec_base - size;
+
+  /* size should already be page-aligned, but this can't hurt.  */
+  addr &= ~(pagesize - 1);
+
+  /* Search for a free area.  If we hit 0, we're out of luck.  */
+  for (; addr; addr -= pagesize)
+    {
+      /* No MAP_FIXED - we don't want to zap someone's mapping.  */
+      res = mmap ((void *) addr, size,
+		  PROT_READ | PROT_WRITE | PROT_EXEC,
+		  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+      /* If we got what we wanted, return.  */
+      if ((uintptr_t) res == addr)
+	return res;
+
+      /* If we got a mapping, but at a wrong address, undo it.  */
+      if (res != MAP_FAILED)
+	munmap (res, size);
+    }
+
+  return NULL;
+#else
+  void *res = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
+		    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+  if (res == MAP_FAILED)
+    return NULL;
+
+  return res;
+#endif
+}
+
+void
+initialize_low_tracepoint (void)
+{
+#ifdef __s390x__
+  init_registers_s390x_linux64 ();
+  init_registers_s390x_linux64v1 ();
+  init_registers_s390x_linux64v2 ();
+  init_registers_s390x_te_linux64 ();
+  init_registers_s390x_vx_linux64 ();
+  init_registers_s390x_tevx_linux64 ();
+#else
+  init_registers_s390_linux32 ();
+  init_registers_s390_linux32v1 ();
+  init_registers_s390_linux32v2 ();
+  init_registers_s390_linux64 ();
+  init_registers_s390_linux64v1 ();
+  init_registers_s390_linux64v2 ();
+  init_registers_s390_te_linux64 ();
+  init_registers_s390_vx_linux64 ();
+  init_registers_s390_tevx_linux64 ();
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-low.c ./gdb/gdbserver/linux-s390-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-s390-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux S/390 specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,11 +22,16 @@
 #include "server.h"
 #include "linux-low.h"
 #include "elf/common.h"
+#include "ax.h"
+#include "tracepoint.h"
 
 #include <asm/ptrace.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/uio.h>
 #include <elf.h>
+#include <inttypes.h>
+
+#include "linux-s390-tdesc.h"
 
 #ifndef HWCAP_S390_HIGH_GPRS
 #define HWCAP_S390_HIGH_GPRS 512
@@ -40,66 +45,6 @@
 #define HWCAP_S390_VX 2048
 #endif
 
-/* Defined in auto-generated file s390-linux32.c.  */
-void init_registers_s390_linux32 (void);
-extern const struct target_desc *tdesc_s390_linux32;
-
-/* Defined in auto-generated file s390-linux32v1.c.  */
-void init_registers_s390_linux32v1 (void);
-extern const struct target_desc *tdesc_s390_linux32v1;
-
-/* Defined in auto-generated file s390-linux32v2.c.  */
-void init_registers_s390_linux32v2 (void);
-extern const struct target_desc *tdesc_s390_linux32v2;
-
-/* Defined in auto-generated file s390-linux64.c.  */
-void init_registers_s390_linux64 (void);
-extern const struct target_desc *tdesc_s390_linux64;
-
-/* Defined in auto-generated file s390-linux64v1.c.  */
-void init_registers_s390_linux64v1 (void);
-extern const struct target_desc *tdesc_s390_linux64v1;
-
-/* Defined in auto-generated file s390-linux64v2.c.  */
-void init_registers_s390_linux64v2 (void);
-extern const struct target_desc *tdesc_s390_linux64v2;
-
-/* Defined in auto-generated file s390-te-linux64.c.  */
-void init_registers_s390_te_linux64 (void);
-extern const struct target_desc *tdesc_s390_te_linux64;
-
-/* Defined in auto-generated file s390-vx-linux64.c.  */
-void init_registers_s390_vx_linux64 (void);
-extern const struct target_desc *tdesc_s390_vx_linux64;
-
-/* Defined in auto-generated file s390-tevx-linux64.c.  */
-void init_registers_s390_tevx_linux64 (void);
-extern const struct target_desc *tdesc_s390_tevx_linux64;
-
-/* Defined in auto-generated file s390x-linux64.c.  */
-void init_registers_s390x_linux64 (void);
-extern const struct target_desc *tdesc_s390x_linux64;
-
-/* Defined in auto-generated file s390x-linux64v1.c.  */
-void init_registers_s390x_linux64v1 (void);
-extern const struct target_desc *tdesc_s390x_linux64v1;
-
-/* Defined in auto-generated file s390x-linux64v2.c.  */
-void init_registers_s390x_linux64v2 (void);
-extern const struct target_desc *tdesc_s390x_linux64v2;
-
-/* Defined in auto-generated file s390x-te-linux64.c.  */
-void init_registers_s390x_te_linux64 (void);
-extern const struct target_desc *tdesc_s390x_te_linux64;
-
-/* Defined in auto-generated file s390x-vx-linux64.c.  */
-void init_registers_s390x_vx_linux64 (void);
-extern const struct target_desc *tdesc_s390x_vx_linux64;
-
-/* Defined in auto-generated file s390x-tevx-linux64.c.  */
-void init_registers_s390x_tevx_linux64 (void);
-extern const struct target_desc *tdesc_s390x_tevx_linux64;
-
 #define s390_num_regs 52
 
 static int s390_regmap[] = {
@@ -132,9 +77,9 @@ static int s390_regmap[] = {
   PT_ORIGGPR2,
 };
 
-#ifdef __s390x__
 #define s390_num_regs_3264 68
 
+#ifdef __s390x__
 static int s390_regmap_3264[] = {
   PT_PSWMASK, PT_PSWADDR,
 
@@ -161,6 +106,33 @@ static int s390_regmap_3264[] = {
 
   PT_ORIGGPR2,
 };
+#else
+static int s390_regmap_3264[] = {
+  PT_PSWMASK, PT_PSWADDR,
+
+  -1, PT_GPR0, -1, PT_GPR1,
+  -1, PT_GPR2, -1, PT_GPR3,
+  -1, PT_GPR4, -1, PT_GPR5,
+  -1, PT_GPR6, -1, PT_GPR7,
+  -1, PT_GPR8, -1, PT_GPR9,
+  -1, PT_GPR10, -1, PT_GPR11,
+  -1, PT_GPR12, -1, PT_GPR13,
+  -1, PT_GPR14, -1, PT_GPR15,
+
+  PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
+  PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
+  PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
+  PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
+
+  PT_FPC,
+
+  PT_FPR0_HI, PT_FPR1_HI, PT_FPR2_HI, PT_FPR3_HI,
+  PT_FPR4_HI, PT_FPR5_HI, PT_FPR6_HI, PT_FPR7_HI,
+  PT_FPR8_HI, PT_FPR9_HI, PT_FPR10_HI, PT_FPR11_HI,
+  PT_FPR12_HI, PT_FPR13_HI, PT_FPR14_HI, PT_FPR15_HI,
+
+  PT_ORIGGPR2,
+};
 #endif
 
 
@@ -180,12 +152,12 @@ static void
 s390_collect_ptrace_register (struct regcache *regcache, int regno, char *buf)
 {
   int size = register_size (regcache->tdesc, regno);
+  const struct regs_info *regs_info = (*the_low_target.regs_info) ();
+  struct usrregs_info *usr = regs_info->usrregs;
+  int regaddr = usr->regmap[regno];
+
   if (size < sizeof (long))
     {
-      const struct regs_info *regs_info = (*the_low_target.regs_info) ();
-      struct usrregs_info *usr = regs_info->usrregs;
-      int regaddr = usr->regmap[regno];
-
       memset (buf, 0, sizeof (long));
 
       if ((regno ^ 1) < usr->num_regs
@@ -199,7 +171,7 @@ s390_collect_ptrace_register (struct reg
 	{
 	  /* Convert 4-byte PSW mask to 8 bytes by clearing bit 12 and copying
 	     the basic addressing mode bit from the PSW address.  */
-	  char *addr = alloca (register_size (regcache->tdesc, regno ^ 1));
+	  gdb_byte *addr = (gdb_byte *) alloca (register_size (regcache->tdesc, regno ^ 1));
 	  collect_register (regcache, regno, buf);
 	  collect_register (regcache, regno ^ 1, addr);
 	  buf[1] &= ~0x8;
@@ -218,7 +190,7 @@ s390_collect_ptrace_register (struct reg
       else
 	collect_register (regcache, regno, buf);
     }
-  else
+  else if (regaddr != -1)
     collect_register (regcache, regno, buf);
 }
 
@@ -227,12 +199,12 @@ s390_supply_ptrace_register (struct regc
 			     int regno, const char *buf)
 {
   int size = register_size (regcache->tdesc, regno);
+  const struct regs_info *regs_info = (*the_low_target.regs_info) ();
+  struct usrregs_info *usr = regs_info->usrregs;
+  int regaddr = usr->regmap[regno];
+
   if (size < sizeof (long))
     {
-      const struct regs_info *regs_info = (*the_low_target.regs_info) ();
-      struct usrregs_info *usr = regs_info->usrregs;
-      int regaddr = usr->regmap[regno];
-
       if ((regno ^ 1) < usr->num_regs
 	  && usr->regmap[regno ^ 1] == regaddr)
 	{
@@ -244,8 +216,8 @@ s390_supply_ptrace_register (struct regc
 	{
 	  /* Convert 8-byte PSW mask to 4 bytes by setting bit 12 and copying
 	     the basic addressing mode into the PSW address.  */
-	  char *mask = alloca (size);
-	  char *addr = alloca (register_size (regcache->tdesc, regno ^ 1));
+	  gdb_byte *mask = (gdb_byte *) alloca (size);
+	  gdb_byte *addr = (gdb_byte *) alloca (register_size (regcache->tdesc, regno ^ 1));
 	  memcpy (mask, buf, size);
 	  mask[1] |= 0x8;
 	  supply_register (regcache, regno, mask);
@@ -259,7 +231,7 @@ s390_supply_ptrace_register (struct regc
 	{
 	  /* Convert 8-byte PSW address to 4 bytes by truncating, but
 	     keeping the addressing mode bit (which was set from the mask).  */
-	  char *addr = alloca (size);
+	  gdb_byte *addr = (gdb_byte *) alloca (size);
 	  char amode;
 	  collect_register (regcache, regno, addr);
 	  amode = addr[0] & 0x80;
@@ -274,7 +246,7 @@ s390_supply_ptrace_register (struct regc
       else
 	supply_register (regcache, regno, buf);
     }
-  else
+  else if (regaddr != -1)
     supply_register (regcache, regno, buf);
 }
 
@@ -301,6 +273,28 @@ s390_fill_gregset (struct regcache *regc
 
 /* Fill and store functions for extended register sets.  */
 
+#ifndef __s390x__
+static void
+s390_fill_gprs_high (struct regcache *regcache, void *buf)
+{
+  int r0h = find_regno (regcache->tdesc, "r0h");
+  int i;
+
+  for (i = 0; i < 16; i++)
+    collect_register (regcache, r0h + 2 * i, (char *) buf + 4 * i);
+}
+
+static void
+s390_store_gprs_high (struct regcache *regcache, const void *buf)
+{
+  int r0h = find_regno (regcache->tdesc, "r0h");
+  int i;
+
+  for (i = 0; i < 16; i++)
+    supply_register (regcache, r0h + 2 * i, (const char *) buf + 4 * i);
+}
+#endif
+
 static void
 s390_store_last_break (struct regcache *regcache, const void *buf)
 {
@@ -378,6 +372,10 @@ s390_store_vxrs_high (struct regcache *r
 
 static struct regset_info s390_regsets[] = {
   { 0, 0, 0, 0, GENERAL_REGS, s390_fill_gregset, NULL },
+#ifndef __s390x__
+  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_HIGH_GPRS, 0,
+    EXTENDED_REGS, s390_fill_gprs_high, s390_store_gprs_high },
+#endif
   /* Last break address is read-only; no fill function.  */
   { PTRACE_GETREGSET, -1, NT_S390_LAST_BREAK, 0, EXTENDED_REGS,
     NULL, s390_store_last_break },
@@ -390,13 +388,22 @@ static struct regset_info s390_regsets[]
     EXTENDED_REGS, s390_fill_vxrs_low, s390_store_vxrs_low },
   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_HIGH, 0,
     EXTENDED_REGS, s390_fill_vxrs_high, s390_store_vxrs_high },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 
-static const unsigned char s390_breakpoint[] = { 0, 1 };
+static const gdb_byte s390_breakpoint[] = { 0, 1 };
 #define s390_breakpoint_len 2
 
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+s390_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = s390_breakpoint_len;
+  return s390_breakpoint;
+}
+
 static CORE_ADDR
 s390_get_pc (struct regcache *regcache)
 {
@@ -431,12 +438,11 @@ s390_set_pc (struct regcache *regcache, 
     }
 }
 
-#ifdef __s390x__
 static unsigned long
 s390_get_hwcap (const struct target_desc *tdesc)
 {
   int wordsize = register_size (tdesc, 0);
-  unsigned char *data = alloca (2 * wordsize);
+  gdb_byte *data = (gdb_byte *) alloca (2 * wordsize);
   int offset = 0;
 
   while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
@@ -459,12 +465,11 @@ s390_get_hwcap (const struct target_desc
 
   return 0;
 }
-#endif
 
 static int
 s390_check_regset (int pid, int regset, int regsize)
 {
-  gdb_byte *buf = alloca (regsize);
+  void *buf = alloca (regsize);
   struct iovec iov;
 
   iov.iov_base = buf;
@@ -476,11 +481,10 @@ s390_check_regset (int pid, int regset, 
   return 0;
 }
 
-#ifdef __s390x__
 /* For a 31-bit inferior, whether the kernel supports using the full
    64-bit GPRs.  */
 static int have_hwcap_s390_high_gprs = 0;
-#endif
+static int have_hwcap_s390_vx = 0;
 
 static void
 s390_arch_setup (void)
@@ -508,8 +512,8 @@ s390_arch_setup (void)
 
   /* On a 64-bit host, check the low bit of the (31-bit) PSWM
      -- if this is one, we actually have a 64-bit inferior.  */
-#ifdef __s390x__
   {
+#ifdef __s390x__
     unsigned int pswm;
     struct regcache *regcache = new_register_cache (tdesc);
 
@@ -541,7 +545,9 @@ s390_arch_setup (void)
 
     /* For a 31-bit inferior, check whether the kernel supports
        using the full 64-bit GPRs.  */
-    else if (s390_get_hwcap (tdesc) & HWCAP_S390_HIGH_GPRS)
+    else
+#endif
+    if (s390_get_hwcap (tdesc) & HWCAP_S390_HIGH_GPRS)
       {
 	have_hwcap_s390_high_gprs = 1;
 	if (have_regset_tdb)
@@ -561,19 +567,25 @@ s390_arch_setup (void)
 	else
 	  tdesc = tdesc_s390_linux64;
       }
+
+    have_hwcap_s390_vx = have_regset_vxrs;
   }
-#endif
 
   /* Update target_regsets according to available register sets.  */
   for (regset = s390_regsets; regset->size >= 0; regset++)
     if (regset->get_request == PTRACE_GETREGSET)
       switch (regset->nt_type)
 	{
+#ifndef __s390x__
+	case NT_S390_HIGH_GPRS:
+	  regset->size = have_hwcap_s390_high_gprs ? 64 : 0;
+	  break;
+#endif
 	case NT_S390_LAST_BREAK:
-	  regset->size = have_regset_last_break? 8 : 0;
+	  regset->size = have_regset_last_break ? 8 : 0;
 	  break;
 	case NT_S390_SYSTEM_CALL:
-	  regset->size = have_regset_system_call? 4 : 0;
+	  regset->size = have_regset_system_call ? 4 : 0;
 	  break;
 	case NT_S390_TDB:
 	  regset->size = have_regset_tdb ? 256 : 0;
@@ -600,6 +612,30 @@ s390_breakpoint_at (CORE_ADDR pc)
   return memcmp (c, s390_breakpoint, s390_breakpoint_len) == 0;
 }
 
+/* Breakpoint/Watchpoint support.  */
+
+/* The "supports_z_point_type" linux_target_ops method.  */
+
+static int
+s390_supports_z_point_type (char z_type)
+{
+  switch (z_type)
+    {
+    case Z_PACKET_SW_BP:
+      return 1;
+    default:
+      return 0;
+    }
+}
+
+/* Support for hardware single step.  */
+
+static int
+s390_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct usrregs_info s390_usrregs_info =
   {
     s390_num_regs,
@@ -620,7 +656,6 @@ static struct regs_info regs_info =
     &s390_regsets_info
   };
 
-#ifdef __s390x__
 static struct usrregs_info s390_usrregs_info_3264 =
   {
     s390_num_regs_3264,
@@ -640,68 +675,2137 @@ static struct regs_info regs_info_3264 =
     &s390_usrregs_info_3264,
     &s390_regsets_info_3264
   };
-#endif
 
 static const struct regs_info *
 s390_regs_info (void)
 {
-#ifdef __s390x__
   if (have_hwcap_s390_high_gprs)
     {
+#ifdef __s390x__
       const struct target_desc *tdesc = current_process ()->tdesc;
 
       if (register_size (tdesc, 0) == 4)
 	return &regs_info_3264;
-    }
+#else
+      return &regs_info_3264;
 #endif
+    }
   return &regs_info;
 }
 
-struct linux_target_ops the_low_target = {
-  s390_arch_setup,
-  s390_regs_info,
-  s390_cannot_fetch_register,
-  s390_cannot_store_register,
-  NULL, /* fetch_register */
-  s390_get_pc,
-  s390_set_pc,
-  s390_breakpoint,
-  s390_breakpoint_len,
-  NULL,
-  s390_breakpoint_len,
-  s390_breakpoint_at,
-  NULL,  /* supports_z_point_type */
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  s390_collect_ptrace_register,
-  s390_supply_ptrace_register,
+/* The "supports_tracepoints" linux_target_ops method.  */
+
+static int
+s390_supports_tracepoints (void)
+{
+  return 1;
+}
+
+/* Implementation of linux_target_ops method "get_thread_area".  */
+
+static int
+s390_get_thread_area (int lwpid, CORE_ADDR *addrp)
+{
+  CORE_ADDR res = ptrace (PTRACE_PEEKUSER, lwpid, (long) PT_ACR0, (long) 0);
+#ifdef __s390x__
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+
+  if (register_size (regcache->tdesc, 0) == 4)
+    res &= 0xffffffffull;
+#endif
+  *addrp = res;
+  return 0;
+}
+
+
+/* Fast tracepoint support.
+
+   The register save area on stack is identical for all targets:
+
+   0x000+i*0x10: VR0-VR31
+   0x200+i*8: GR0-GR15
+   0x280+i*4: AR0-AR15
+   0x2c0: PSWM [64-bit]
+   0x2c8: PSWA [64-bit]
+   0x2d0: FPC
+
+   If we're on 31-bit linux, we just don't store the high parts of the GPRs.
+   Likewise, if there's no VX support, we just store the FRs into the slots
+   of low VR halves.  The agent code is responsible for rearranging that
+   into regcache.  */
+
+/* Code sequence saving GPRs for 31-bit target with no high GPRs.  There's
+   one trick used at the very beginning: since there's no way to allocate
+   stack space without destroying CC (lay instruction can do it, but it's
+   only supported on later CPUs), we take 4 different execution paths for
+   every possible value of CC, allocate stack space, save %r0, stuff the
+   CC value in %r0 (shifted to match its position in PSWM high word),
+   then branch to common path.  */
+
+static const unsigned char s390_ft_entry_gpr_esa[] = {
+  0xa7, 0x14, 0x00, 0x1e,		/* jo .Lcc3 */
+  0xa7, 0x24, 0x00, 0x14,		/* jh .Lcc2 */
+  0xa7, 0x44, 0x00, 0x0a,		/* jl .Lcc1 */
+  /* CC = 0 */
+  0xa7, 0xfa, 0xfd, 0x00,		/* ahi %r15, -0x300 */
+  0x50, 0x00, 0xf2, 0x04,		/* st %r0, 0x204(%r15) */
+  0xa7, 0x08, 0x00, 0x00,		/* lhi %r0, 0 */
+  0xa7, 0xf4, 0x00, 0x18,		/* j .Lccdone */
+  /* .Lcc1: */
+  0xa7, 0xfa, 0xfd, 0x00,		/* ahi %r15, -0x300 */
+  0x50, 0x00, 0xf2, 0x04,		/* st %r0, 0x204(%r15) */
+  0xa7, 0x08, 0x10, 0x00,		/* lhi %r0, 0x1000 */
+  0xa7, 0xf4, 0x00, 0x10,		/* j .Lccdone */
+  /* .Lcc2: */
+  0xa7, 0xfa, 0xfd, 0x00,		/* ahi %r15, -0x300 */
+  0x50, 0x00, 0xf2, 0x04,		/* st %r0, 0x204(%r15) */
+  0xa7, 0x08, 0x20, 0x00,		/* lhi %r0, 0x2000 */
+  0xa7, 0xf4, 0x00, 0x08,		/* j .Lccdone */
+  /* .Lcc3: */
+  0xa7, 0xfa, 0xfd, 0x00,		/* ahi %r15, -0x300 */
+  0x50, 0x00, 0xf2, 0x04,		/* st %r0, 0x204(%r15) */
+  0xa7, 0x08, 0x30, 0x00,		/* lhi %r0, 0x3000 */
+  /* .Lccdone: */
+  0x50, 0x10, 0xf2, 0x0c,		/* st %r1, 0x20c(%r15) */
+  0x50, 0x20, 0xf2, 0x14,		/* st %r2, 0x214(%r15) */
+  0x50, 0x30, 0xf2, 0x1c,		/* st %r3, 0x21c(%r15) */
+  0x50, 0x40, 0xf2, 0x24,		/* st %r4, 0x224(%r15) */
+  0x50, 0x50, 0xf2, 0x2c,		/* st %r5, 0x22c(%r15) */
+  0x50, 0x60, 0xf2, 0x34,		/* st %r6, 0x234(%r15) */
+  0x50, 0x70, 0xf2, 0x3c,		/* st %r7, 0x23c(%r15) */
+  0x50, 0x80, 0xf2, 0x44,		/* st %r8, 0x244(%r15) */
+  0x50, 0x90, 0xf2, 0x4c,		/* st %r9, 0x24c(%r15) */
+  0x50, 0xa0, 0xf2, 0x54,		/* st %r10, 0x254(%r15) */
+  0x50, 0xb0, 0xf2, 0x5c,		/* st %r11, 0x25c(%r15) */
+  0x50, 0xc0, 0xf2, 0x64,		/* st %r12, 0x264(%r15) */
+  0x50, 0xd0, 0xf2, 0x6c,		/* st %r13, 0x26c(%r15) */
+  0x50, 0xe0, 0xf2, 0x74,		/* st %r14, 0x274(%r15) */
+  /* Compute original value of %r15 and store it.  We use ahi instead
+     of la to preserve the whole value, and not just the low 31 bits.
+     This is not particularly important here, but essential in the
+     zarch case where someone might be using the high word of %r15
+     as an extra register.  */
+  0x18, 0x1f,				/* lr %r1, %r15 */
+  0xa7, 0x1a, 0x03, 0x00,		/* ahi %r1, 0x300 */
+  0x50, 0x10, 0xf2, 0x7c,		/* st %r1, 0x27c(%r15) */
 };
 
-void
-initialize_low_arch (void)
+/* Code sequence saving GPRs for 31-bit target with high GPRs and for 64-bit
+   target.  Same as above, except this time we can use load/store multiple,
+   since the 64-bit regs are tightly packed.  */
+
+static const unsigned char s390_ft_entry_gpr_zarch[] = {
+  0xa7, 0x14, 0x00, 0x21,		/* jo .Lcc3 */
+  0xa7, 0x24, 0x00, 0x16,		/* jh .Lcc2 */
+  0xa7, 0x44, 0x00, 0x0b,		/* jl .Lcc1 */
+  /* CC = 0 */
+  0xa7, 0xfb, 0xfd, 0x00,		/* aghi %r15, -0x300 */
+  0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,	/* stmg %r0, %r14, 0x200(%r15) */
+  0xa7, 0x08, 0x00, 0x00,		/* lhi %r0, 0 */
+  0xa7, 0xf4, 0x00, 0x1b,		/* j .Lccdone */
+  /* .Lcc1: */
+  0xa7, 0xfb, 0xfd, 0x00,		/* aghi %r15, -0x300 */
+  0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,	/* stmg %r0, %r14, 0x200(%r15) */
+  0xa7, 0x08, 0x10, 0x00,		/* lhi %r0, 0x1000 */
+  0xa7, 0xf4, 0x00, 0x12,		/* j .Lccdone */
+  /* .Lcc2: */
+  0xa7, 0xfb, 0xfd, 0x00,		/* aghi %r15, -0x300 */
+  0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,	/* stmg %r0, %r14, 0x200(%r15) */
+  0xa7, 0x08, 0x20, 0x00,		/* lhi %r0, 0x2000 */
+  0xa7, 0xf4, 0x00, 0x09,		/* j .Lccdone */
+  /* .Lcc3: */
+  0xa7, 0xfb, 0xfd, 0x00,		/* aghi %r15, -0x300 */
+  0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,	/* stmg %r0, %r14, 0x200(%r15) */
+  0xa7, 0x08, 0x30, 0x00,		/* lhi %r0, 0x3000 */
+  /* .Lccdone: */
+  0xb9, 0x04, 0x00, 0x1f,		/* lgr %r1, %r15 */
+  0xa7, 0x1b, 0x03, 0x00,		/* aghi %r1, 0x300 */
+  0xe3, 0x10, 0xf2, 0x78, 0x00, 0x24,	/* stg %r1, 0x278(%r15) */
+};
+
+/* Code sequence saving ARs, PSWM and FPC.  PSWM has to be assembled from
+   current PSWM (read by epsw) and CC from entry (in %r0).  */
+
+static const unsigned char s390_ft_entry_misc[] = {
+  0x9b, 0x0f, 0xf2, 0x80,		/* stam %a0, %a15, 0x20(%%r15) */
+  0xb9, 0x8d, 0x00, 0x23,		/* epsw %r2, %r3 */
+  0xa7, 0x18, 0xcf, 0xff,		/* lhi %r1, ~0x3000 */
+  0x14, 0x21,				/* nr %r2, %r1 */
+  0x16, 0x20,				/* or %r2, %r0 */
+  0x50, 0x20, 0xf2, 0xc0,		/* st %r2, 0x2c0(%r15) */
+  0x50, 0x30, 0xf2, 0xc4,		/* st %r3, 0x2c4(%r15) */
+  0xb2, 0x9c, 0xf2, 0xd0,		/* stfpc 0x2d0(%r15) */
+};
+
+/* Code sequence saving FRs, used if VX not supported.  */
+
+static const unsigned char s390_ft_entry_fr[] = {
+  0x60, 0x00, 0xf0, 0x00,		/* std %f0, 0x000(%r15) */
+  0x60, 0x10, 0xf0, 0x10,		/* std %f1, 0x010(%r15) */
+  0x60, 0x20, 0xf0, 0x20,		/* std %f2, 0x020(%r15) */
+  0x60, 0x30, 0xf0, 0x30,		/* std %f3, 0x030(%r15) */
+  0x60, 0x40, 0xf0, 0x40,		/* std %f4, 0x040(%r15) */
+  0x60, 0x50, 0xf0, 0x50,		/* std %f5, 0x050(%r15) */
+  0x60, 0x60, 0xf0, 0x60,		/* std %f6, 0x060(%r15) */
+  0x60, 0x70, 0xf0, 0x70,		/* std %f7, 0x070(%r15) */
+  0x60, 0x80, 0xf0, 0x80,		/* std %f8, 0x080(%r15) */
+  0x60, 0x90, 0xf0, 0x90,		/* std %f9, 0x090(%r15) */
+  0x60, 0xa0, 0xf0, 0xa0,		/* std %f10, 0x0a0(%r15) */
+  0x60, 0xb0, 0xf0, 0xb0,		/* std %f11, 0x0b0(%r15) */
+  0x60, 0xc0, 0xf0, 0xc0,		/* std %f12, 0x0c0(%r15) */
+  0x60, 0xd0, 0xf0, 0xd0,		/* std %f13, 0x0d0(%r15) */
+  0x60, 0xe0, 0xf0, 0xe0,		/* std %f14, 0x0e0(%r15) */
+  0x60, 0xf0, 0xf0, 0xf0,		/* std %f15, 0x0f0(%r15) */
+};
+
+/* Code sequence saving VRs, used if VX not supported.  */
+
+static const unsigned char s390_ft_entry_vr[] = {
+  0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x3e,	/* vstm %v0, %v15, 0x000(%r15) */
+  0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x3e,	/* vstm %v16, %v31, 0x100(%r15) */
+};
+
+/* Code sequence doing the collection call for 31-bit target.  %r1 contains
+   the address of the literal pool.  */
+
+static const unsigned char s390_ft_main_31[] = {
+  /* Load the literals into registers.  */
+  0x58, 0x50, 0x10, 0x00,		/* l %r5, 0x0(%r1) */
+  0x58, 0x20, 0x10, 0x04,		/* l %r2, 0x4(%r1) */
+  0x58, 0x40, 0x10, 0x08,		/* l %r4, 0x8(%r1) */
+  0x58, 0x60, 0x10, 0x0c,		/* l %r6, 0xc(%r1) */
+  /* Save original PSWA (tracepoint address | 0x80000000).  */
+  0x50, 0x50, 0xf2, 0xcc,		/* st %r5, 0x2cc(%r15) */
+  /* Construct a collecting_t object at %r15+0x2e0.  */
+  0x50, 0x20, 0xf2, 0xe0,		/* st %r2, 0x2e0(%r15) */
+  0x9b, 0x00, 0xf2, 0xe4,		/* stam %a0, %a0, 0x2e4(%r15) */
+  /* Move its address to %r0.  */
+  0x41, 0x00, 0xf2, 0xe0,		/* la %r0, 0x2e0(%r15) */
+  /* Take the lock.  */
+  /* .Lloop:  */
+  0xa7, 0x18, 0x00, 0x00,		/* lhi %r1, 0 */
+  0xba, 0x10, 0x60, 0x00,		/* cs %r1, %r0, 0(%r6) */
+  0xa7, 0x74, 0xff, 0xfc,		/* jne .Lloop */
+  /* Address of the register save block to %r3.  */
+  0x18, 0x3f,				/* lr %r3, %r15 */
+  /* Make a stack frame, so that we can call the collector.  */
+  0xa7, 0xfa, 0xff, 0xa0,		/* ahi %r15, -0x60 */
+  /* Call it.  */
+  0x0d, 0xe4,				/* basr %r14, %r4 */
+  /* And get rid of the stack frame again.  */
+  0x41, 0xf0, 0xf0, 0x60,		/* la %r15, 0x60(%r15) */
+  /* Leave the lock.  */
+  0x07, 0xf0, 				/* br %r0 */
+  0xa7, 0x18, 0x00, 0x00,		/* lhi %r1, 0 */
+  0x50, 0x10, 0x60, 0x00,		/* st %t1, 0(%r6) */
+};
+
+/* Code sequence doing the collection call for 64-bit target.  %r1 contains
+   the address of the literal pool.  */
+
+static const unsigned char s390_ft_main_64[] = {
+  /* Load the literals into registers.  */
+  0xe3, 0x50, 0x10, 0x00, 0x00, 0x04,	/* lg %r5, 0x00(%r1) */
+  0xe3, 0x20, 0x10, 0x08, 0x00, 0x04,	/* lg %r2, 0x08(%r1) */
+  0xe3, 0x40, 0x10, 0x10, 0x00, 0x04,	/* lg %r4, 0x10(%r1) */
+  0xe3, 0x60, 0x10, 0x18, 0x00, 0x04,	/* lg %r6, 0x18(%r1) */
+  /* Save original PSWA (tracepoint address).  */
+  0xe3, 0x50, 0xf2, 0xc8, 0x00, 0x24,	/* stg %r5, 0x2c8(%r15) */
+  /* Construct a collecting_t object at %r15+0x2e0.  */
+  0xe3, 0x20, 0xf2, 0xe0, 0x00, 0x24,	/* stg %r2, 0x2e0(%r15) */
+  0x9b, 0x01, 0xf2, 0xe8,		/* stam %a0, %a1, 0x2e8(%r15) */
+  /* Move its address to %r0.  */
+  0x41, 0x00, 0xf2, 0xe0,		/* la %r0, 0x2e0(%r15) */
+  /* Take the lock.  */
+  /* .Lloop:  */
+  0xa7, 0x19, 0x00, 0x00,		/* lghi %r1, 0 */
+  0xeb, 0x10, 0x60, 0x00, 0x00, 0x30,	/* csg %r1, %r0, 0(%r6) */
+  0xa7, 0x74, 0xff, 0xfb,		/* jne .Lloop */
+  /* Address of the register save block to %r3.  */
+  0xb9, 0x04, 0x00, 0x3f,		/* lgr %r3, %r15 */
+  /* Make a stack frame, so that we can call the collector.  */
+  0xa7, 0xfb, 0xff, 0x60,		/* aghi %r15, -0xa0 */
+  /* Call it.  */
+  0x0d, 0xe4,				/* basr %r14, %r4 */
+  /* And get rid of the stack frame again.  */
+  0x41, 0xf0, 0xf0, 0xa0,		/* la %r15, 0xa0(%r15) */
+  /* Leave the lock.  */
+  0x07, 0xf0,				/* br %r0 */
+  0xa7, 0x19, 0x00, 0x00,		/* lghi %r1, 0 */
+  0xe3, 0x10, 0x60, 0x00, 0x00, 0x24,	/* stg %t1, 0(%r6) */
+};
+
+/* Code sequence restoring FRs, for targets with no VX support.  */
+
+static const unsigned char s390_ft_exit_fr[] = {
+  0x68, 0x00, 0xf0, 0x00,		/* ld %f0, 0x000(%r15) */
+  0x68, 0x10, 0xf0, 0x10,		/* ld %f1, 0x010(%r15) */
+  0x68, 0x20, 0xf0, 0x20,		/* ld %f2, 0x020(%r15) */
+  0x68, 0x30, 0xf0, 0x30,		/* ld %f3, 0x030(%r15) */
+  0x68, 0x40, 0xf0, 0x40,		/* ld %f4, 0x040(%r15) */
+  0x68, 0x50, 0xf0, 0x50,		/* ld %f5, 0x050(%r15) */
+  0x68, 0x60, 0xf0, 0x60,		/* ld %f6, 0x060(%r15) */
+  0x68, 0x70, 0xf0, 0x70,		/* ld %f7, 0x070(%r15) */
+  0x68, 0x80, 0xf0, 0x80,		/* ld %f8, 0x080(%r15) */
+  0x68, 0x90, 0xf0, 0x90,		/* ld %f9, 0x090(%r15) */
+  0x68, 0xa0, 0xf0, 0xa0,		/* ld %f10, 0x0a0(%r15) */
+  0x68, 0xb0, 0xf0, 0xb0,		/* ld %f11, 0x0b0(%r15) */
+  0x68, 0xc0, 0xf0, 0xc0,		/* ld %f12, 0x0c0(%r15) */
+  0x68, 0xd0, 0xf0, 0xd0,		/* ld %f13, 0x0d0(%r15) */
+  0x68, 0xe0, 0xf0, 0xe0,		/* ld %f14, 0x0e0(%r15) */
+  0x68, 0xf0, 0xf0, 0xf0,		/* ld %f15, 0x0f0(%r15) */
+};
+
+/* Code sequence restoring VRs.  */
+
+static const unsigned char s390_ft_exit_vr[] = {
+  0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x36,	/* vlm %v0, %v15, 0x000(%r15) */
+  0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x36,	/* vlm %v16, %v31, 0x100(%r15) */
+};
+
+/* Code sequence restoring misc registers.  As for PSWM, only CC should be
+   modified by C code, so we use the alr instruction to restore it by
+   manufacturing an operand that'll result in the original flags.  */
+
+static const unsigned char s390_ft_exit_misc[] = {
+  0xb2, 0x9d, 0xf2, 0xd0,		/* lfpc 0x2d0(%r15) */
+  0x58, 0x00, 0xf2, 0xc0,		/* l %r0, 0x2c0(%r15) */
+  /* Extract CC to high 2 bits of %r0.  */
+  0x88, 0x00, 0x00, 0x0c,		/* srl %r0, 12 */
+  0x89, 0x00, 0x00, 0x1e,		/* sll %r0, 30 */
+  /* Add %r0 to itself.  Result will be nonzero iff CC bit 0 is set, and
+     will have carry iff CC bit 1 is set - resulting in the same flags
+     as the original.  */
+  0x1e, 0x00,				/* alr %r0, %r0 */
+  0x9a, 0x0f, 0xf2, 0x80,		/* lam %a0, %a15, 0x280(%r15) */
+};
+
+/* Code sequence restoring GPRs, for 31-bit targets with no high GPRs.  */
+
+static const unsigned char s390_ft_exit_gpr_esa[] = {
+  0x58, 0x00, 0xf2, 0x04,		/* l %r0, 0x204(%r15) */
+  0x58, 0x10, 0xf2, 0x0c,		/* l %r1, 0x20c(%r15) */
+  0x58, 0x20, 0xf2, 0x14,		/* l %r2, 0x214(%r15) */
+  0x58, 0x30, 0xf2, 0x1c,		/* l %r3, 0x21c(%r15) */
+  0x58, 0x40, 0xf2, 0x24,		/* l %r4, 0x224(%r15) */
+  0x58, 0x50, 0xf2, 0x2c,		/* l %r5, 0x22c(%r15) */
+  0x58, 0x60, 0xf2, 0x34,		/* l %r6, 0x234(%r15) */
+  0x58, 0x70, 0xf2, 0x3c,		/* l %r7, 0x23c(%r15) */
+  0x58, 0x80, 0xf2, 0x44,		/* l %r8, 0x244(%r15) */
+  0x58, 0x90, 0xf2, 0x4c,		/* l %r9, 0x24c(%r15) */
+  0x58, 0xa0, 0xf2, 0x54,		/* l %r10, 0x254(%r15) */
+  0x58, 0xb0, 0xf2, 0x5c,		/* l %r11, 0x25c(%r15) */
+  0x58, 0xc0, 0xf2, 0x64,		/* l %r12, 0x264(%r15) */
+  0x58, 0xd0, 0xf2, 0x6c,		/* l %r13, 0x26c(%r15) */
+  0x58, 0xe0, 0xf2, 0x74,		/* l %r14, 0x274(%r15) */
+  0x58, 0xf0, 0xf2, 0x7c,		/* l %r15, 0x27c(%r15) */
+};
+
+/* Code sequence restoring GPRs, for 64-bit targets and 31-bit targets
+   with high GPRs.  */
+
+static const unsigned char s390_ft_exit_gpr_zarch[] = {
+  0xeb, 0x0f, 0xf2, 0x00, 0x00, 0x04,	/* lmg %r0, %r15, 0x200(%r15) */
+};
+
+/* Writes instructions to target, updating the to pointer.  */
+
+static void
+append_insns (CORE_ADDR *to, size_t len, const unsigned char *buf)
 {
-  /* Initialize the Linux target descriptions.  */
+  write_inferior_memory (*to, buf, len);
+  *to += len;
+}
 
-  init_registers_s390_linux32 ();
-  init_registers_s390_linux32v1 ();
-  init_registers_s390_linux32v2 ();
-  init_registers_s390_linux64 ();
-  init_registers_s390_linux64v1 ();
-  init_registers_s390_linux64v2 ();
-  init_registers_s390_te_linux64 ();
-  init_registers_s390_vx_linux64 ();
-  init_registers_s390_tevx_linux64 ();
-  init_registers_s390x_linux64 ();
-  init_registers_s390x_linux64v1 ();
-  init_registers_s390x_linux64v2 ();
-  init_registers_s390x_te_linux64 ();
-  init_registers_s390x_vx_linux64 ();
-  init_registers_s390x_tevx_linux64 ();
+/* Relocates an instruction from oldloc to *to, updating to.  */
 
-  initialize_regsets_info (&s390_regsets_info);
+static int
+s390_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc, int is_64)
+{
+  gdb_byte buf[6];
+  int ilen;
+  int op2;
+  /* 0: no fixup, 1: PC16DBL fixup, 2: PC32DBL fixup.  */
+  int mode = 0;
+  int is_bras = 0;
+  read_inferior_memory (oldloc, buf, sizeof buf);
+  if (buf[0] < 0x40)
+    ilen = 2;
+  else if (buf[0] < 0xc0)
+    ilen = 4;
+  else
+    ilen = 6;
+  switch (buf[0])
+    {
+    case 0x05: /* BALR */
+    case 0x0c: /* BASSM */
+    case 0x0d: /* BASR */
+    case 0x45: /* BAL */
+    case 0x4d: /* BAS */
+      /* These save a return address and mess around with registers.
+	 We can't relocate them.  */
+      return 1;
+    case 0x84: /* BRXH */
+    case 0x85: /* BRXLE */
+      mode = 1;
+      break;
+    case 0xa7:
+      op2 = buf[1] & 0xf;
+      /* BRC, BRAS, BRCT, BRCTG */
+      if (op2 >= 4 && op2 <= 7)
+	mode = 1;
+      /* BRAS */
+      if (op2 == 5)
+	is_bras = 1;
+      break;
+    case 0xc0:
+      op2 = buf[1] & 0xf;
+      /* LARL, BRCL, BRASL */
+      if (op2 == 0 || op2 == 4 || op2 == 5)
+	mode = 2;
+      /* BRASL */
+      if (op2 == 5)
+	is_bras = 1;
+      break;
+    case 0xc4:
+    case 0xc6:
+      /* PC-relative addressing instructions.  */
+      mode = 2;
+      break;
+    case 0xc5: /* BPRP */
+    case 0xc7: /* BPP */
+      /* Branch prediction - just skip it.  */
+      return 0;
+    case 0xcc:
+      op2 = buf[1] & 0xf;
+      /* BRCTH */
+      if (op2 == 6)
+	mode = 2;
+      break;
+    case 0xec:
+      op2 = buf[5];
+      switch (op2)
+	{
+	case 0x44: /* BRXHG */
+	case 0x45: /* BRXLG */
+	case 0x64: /* CGRJ */
+	case 0x65: /* CLGRJ */
+	case 0x76: /* CRJ */
+	case 0x77: /* CLRJ */
+	  mode = 1;
+	  break;
+	}
+      break;
+    }
+
+  if (mode != 0)
+    {
+      /* We'll have to relocate an instruction with a PC-relative field.
+	 First, compute the target.  */
+      int64_t loffset = 0;
+      CORE_ADDR target;
+      if (mode == 1)
+	{
+	  int16_t soffset = 0;
+	  memcpy (&soffset, buf + 2, 2);
+	  loffset = soffset;
+	}
+      else if (mode == 2)
+	{
+	  int32_t soffset = 0;
+	  memcpy (&soffset, buf + 2, 4);
+	  loffset = soffset;
+	}
+      target = oldloc + loffset * 2;
+      if (!is_64)
+	target &= 0x7fffffff;
+
+      if (is_bras)
+	{
+	  /* BRAS or BRASL was used.  We cannot just relocate those, since
+	     they save the return address in a register.  We can, however,
+	     replace them with a LARL+JG sequence.  */
+
+	  /* Make the LARL.  */
+	  int32_t soffset;
+	  buf[0] = 0xc0;
+	  buf[1] &= 0xf0;
+	  loffset = oldloc + ilen - *to;
+	  loffset >>= 1;
+	  soffset = loffset;
+	  if (soffset != loffset && is_64)
+	    return 1;
+	  memcpy (buf + 2, &soffset, 4);
+	  append_insns (to, 6, buf);
+
+	  /* Note: this is not fully correct.  In 31-bit mode, LARL will write
+	     an address with the top bit 0, while BRAS/BRASL will write it
+	     with top bit 1.  It should not matter much, since linux compilers
+	     use BR and not BSM to return from functions, but it could confuse
+	     some poor stack unwinder.  */
+
+	  /* We'll now be writing a JG.  */
+	  mode = 2;
+	  buf[0] = 0xc0;
+	  buf[1] = 0xf4;
+	  ilen = 6;
+	}
+
+      /* Compute the new offset and write it to the buffer.  */
+      loffset = target - *to;
+      loffset >>= 1;
+
+      if (mode == 1)
+	{
+	  int16_t soffset = loffset;
+	  if (soffset != loffset)
+	    return 1;
+	  memcpy (buf + 2, &soffset, 2);
+	}
+      else if (mode == 2)
+	{
+	  int32_t soffset = loffset;
+	  if (soffset != loffset && is_64)
+	    return 1;
+	  memcpy (buf + 2, &soffset, 4);
+	}
+    }
+  append_insns (to, ilen, buf);
+  return 0;
+}
+
+/* Implementation of linux_target_ops method
+   "install_fast_tracepoint_jump_pad".  */
+
+static int
+s390_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
+				       CORE_ADDR tpaddr,
+				       CORE_ADDR collector,
+				       CORE_ADDR lockaddr,
+				       ULONGEST orig_size,
+				       CORE_ADDR *jump_entry,
+				       CORE_ADDR *trampoline,
+				       ULONGEST *trampoline_size,
+				       unsigned char *jjump_pad_insn,
+				       ULONGEST *jjump_pad_insn_size,
+				       CORE_ADDR *adjusted_insn_addr,
+				       CORE_ADDR *adjusted_insn_addr_end,
+				       char *err)
+{
+  int i;
+  int64_t loffset;
+  int32_t offset;
+  unsigned char jbuf[6] = { 0xc0, 0xf4, 0, 0, 0, 0 };	/* jg ... */
+  CORE_ADDR buildaddr = *jump_entry;
 #ifdef __s390x__
-  initialize_regsets_info (&s390_regsets_info_3264);
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+  int is_64 = register_size (regcache->tdesc, 0) == 8;
+  int is_zarch = is_64 || have_hwcap_s390_high_gprs;
+  int has_vx = have_hwcap_s390_vx;
+#else
+  int is_64 = 0, is_zarch = 0, has_vx = 0;
+#endif
+  CORE_ADDR literals[4] = {
+    tpaddr,
+    tpoint,
+    collector,
+    lockaddr,
+  };
+
+  /* First, store the GPRs.  */
+  if (is_zarch)
+    append_insns (&buildaddr, sizeof s390_ft_entry_gpr_zarch,
+			      s390_ft_entry_gpr_zarch);
+  else
+    append_insns (&buildaddr, sizeof s390_ft_entry_gpr_esa,
+			      s390_ft_entry_gpr_esa);
+
+  /* Second, misc registers (ARs, PSWM, FPC).  PSWA will be stored below.  */
+  append_insns (&buildaddr, sizeof s390_ft_entry_misc, s390_ft_entry_misc);
+
+  /* Third, FRs or VRs.  */
+  if (has_vx)
+    append_insns (&buildaddr, sizeof s390_ft_entry_vr, s390_ft_entry_vr);
+  else
+    append_insns (&buildaddr, sizeof s390_ft_entry_fr, s390_ft_entry_fr);
+
+  /* Now, the main part of code - store PSWA, take lock, call collector,
+     leave lock.  First, we'll need to fetch 4 literals.  */
+  if (is_64) {
+    unsigned char buf[] = {
+      0x07, 0x07,		/* nopr %r7 */
+      0x07, 0x07,		/* nopr %r7 */
+      0x07, 0x07,		/* nopr %r7 */
+      0xa7, 0x15, 0x00, 0x12,	/* bras %r1, .Lend */
+      0, 0, 0, 0, 0, 0, 0, 0,	/* tpaddr */
+      0, 0, 0, 0, 0, 0, 0, 0,	/* tpoint */
+      0, 0, 0, 0, 0, 0, 0, 0,	/* collector */
+      0, 0, 0, 0, 0, 0, 0, 0,	/* lockaddr */
+      /* .Lend: */
+    };
+    /* Find the proper start place in buf, so that literals will be
+       aligned. */
+    int bufpos = (buildaddr + 2) & 7;
+    /* Stuff the literals into the buffer. */
+    for (i = 0; i < 4; i++) {
+      uint64_t lit = literals[i];
+      memcpy (&buf[sizeof buf - 32 + i * 8], &lit, 8);
+    }
+    append_insns (&buildaddr, sizeof buf - bufpos, buf + bufpos);
+    append_insns (&buildaddr, sizeof s390_ft_main_64, s390_ft_main_64);
+  } else {
+    unsigned char buf[] = {
+      0x07, 0x07,		/* nopr %r7 */
+      0xa7, 0x15, 0x00, 0x0a,	/* bras %r1, .Lend */
+      0, 0, 0, 0,		/* tpaddr */
+      0, 0, 0, 0,		/* tpoint */
+      0, 0, 0, 0,		/* collector */
+      0, 0, 0, 0,		/* lockaddr */
+      /* .Lend: */
+    };
+    /* Find the proper start place in buf, so that literals will be
+       aligned. */
+    int bufpos = (buildaddr + 2) & 3;
+    /* First literal will be saved as the PSWA, make sure it has the high bit
+       set.  */
+    literals[0] |= 0x80000000;
+    /* Stuff the literals into the buffer. */
+    for (i = 0; i < 4; i++) {
+      uint32_t lit = literals[i];
+      memcpy (&buf[sizeof buf - 16 + i * 4], &lit, 4);
+    }
+    append_insns (&buildaddr, sizeof buf - bufpos, buf + bufpos);
+    append_insns (&buildaddr, sizeof s390_ft_main_31, s390_ft_main_31);
+  }
+
+  /* Restore FRs or VRs.  */
+  if (has_vx)
+    append_insns (&buildaddr, sizeof s390_ft_exit_vr, s390_ft_exit_vr);
+  else
+    append_insns (&buildaddr, sizeof s390_ft_exit_fr, s390_ft_exit_fr);
+
+  /* Restore misc registers.  */
+  append_insns (&buildaddr, sizeof s390_ft_exit_misc, s390_ft_exit_misc);
+
+  /* Restore the GPRs.  */
+  if (is_zarch)
+    append_insns (&buildaddr, sizeof s390_ft_exit_gpr_zarch,
+			      s390_ft_exit_gpr_zarch);
+  else
+    append_insns (&buildaddr, sizeof s390_ft_exit_gpr_esa,
+			      s390_ft_exit_gpr_esa);
+
+  /* Now, adjust the original instruction to execute in the jump
+     pad.  */
+  *adjusted_insn_addr = buildaddr;
+  if (s390_relocate_instruction (&buildaddr, tpaddr, is_64))
+    {
+      sprintf (err, "E.Could not relocate instruction for tracepoint.");
+      return 1;
+    }
+  *adjusted_insn_addr_end = buildaddr;
+
+  /* Finally, write a jump back to the program.  */
+
+  loffset = (tpaddr + orig_size) - buildaddr;
+  loffset >>= 1;
+  offset = loffset;
+  if (is_64 && offset != loffset)
+    {
+      sprintf (err,
+	       "E.Jump back from jump pad too far from tracepoint "
+	       "(offset 0x%" PRIx64 " > int33).", loffset);
+      return 1;
+    }
+  memcpy (jbuf + 2, &offset, 4);
+  append_insns (&buildaddr, sizeof jbuf, jbuf);
+
+  /* The jump pad is now built.  Wire in a jump to our jump pad.  This
+     is always done last (by our caller actually), so that we can
+     install fast tracepoints with threads running.  This relies on
+     the agent's atomic write support.  */
+  loffset = *jump_entry - tpaddr;
+  loffset >>= 1;
+  offset = loffset;
+  if (is_64 && offset != loffset)
+    {
+      sprintf (err,
+	       "E.Jump back from jump pad too far from tracepoint "
+	       "(offset 0x%" PRIx64 " > int33).", loffset);
+      return 1;
+    }
+  memcpy (jbuf + 2, &offset, 4);
+  memcpy (jjump_pad_insn, jbuf, sizeof jbuf);
+  *jjump_pad_insn_size = sizeof jbuf;
+
+  /* Return the end address of our pad.  */
+  *jump_entry = buildaddr;
+
+  return 0;
+}
+
+/* Implementation of linux_target_ops method
+   "get_min_fast_tracepoint_insn_len".  */
+
+static int
+s390_get_min_fast_tracepoint_insn_len (void)
+{
+  /* We only support using 6-byte jumps to reach the tracepoint code.
+     If the tracepoint buffer were allocated sufficiently close (64kiB)
+     to the executable code, and the traced instruction itself was close
+     enough to the beginning, we could use 4-byte jumps, but this doesn't
+     seem to be worth the effort.  */
+  return 6;
+}
+
+/* Implementation of linux_target_ops method "get_ipa_tdesc_idx".  */
+
+static int
+s390_get_ipa_tdesc_idx (void)
+{
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+  const struct target_desc *tdesc = regcache->tdesc;
+
+#ifdef __s390x__
+  if (tdesc == tdesc_s390x_linux64)
+    return S390_TDESC_64;
+  if (tdesc == tdesc_s390x_linux64v1)
+    return S390_TDESC_64V1;
+  if (tdesc == tdesc_s390x_linux64v2)
+    return S390_TDESC_64V2;
+  if (tdesc == tdesc_s390x_te_linux64)
+    return S390_TDESC_TE;
+  if (tdesc == tdesc_s390x_vx_linux64)
+    return S390_TDESC_VX;
+  if (tdesc == tdesc_s390x_tevx_linux64)
+    return S390_TDESC_TEVX;
 #endif
+
+  if (tdesc == tdesc_s390_linux32)
+    return S390_TDESC_32;
+  if (tdesc == tdesc_s390_linux32v1)
+    return S390_TDESC_32V1;
+  if (tdesc == tdesc_s390_linux32v2)
+    return S390_TDESC_32V2;
+  if (tdesc == tdesc_s390_linux64)
+    return S390_TDESC_64;
+  if (tdesc == tdesc_s390_linux64v1)
+    return S390_TDESC_64V1;
+  if (tdesc == tdesc_s390_linux64v2)
+    return S390_TDESC_64V2;
+  if (tdesc == tdesc_s390_te_linux64)
+    return S390_TDESC_TE;
+  if (tdesc == tdesc_s390_vx_linux64)
+    return S390_TDESC_VX;
+  if (tdesc == tdesc_s390_tevx_linux64)
+    return S390_TDESC_TEVX;
+
+  return 0;
+}
+
+/* Appends given buffer to current_insn_ptr in the target.  */
+
+static void
+add_insns (const unsigned char *start, int len)
+{
+  CORE_ADDR buildaddr = current_insn_ptr;
+
+  if (debug_threads)
+    debug_printf ("Adding %d bytes of insn at %s\n",
+		  len, paddress (buildaddr));
+
+  append_insns (&buildaddr, len, start);
+  current_insn_ptr = buildaddr;
+}
+
+/* Register usage in emit:
+
+   - %r0, %r1: temp
+   - %r2: top of stack (high word for 31-bit)
+   - %r3: low word of top of stack (for 31-bit)
+   - %r4, %r5: temp
+   - %r6, %r7, %r8: don't use
+   - %r9: saved arg1
+   - %r10: saved arg2
+   - %r11: frame pointer
+   - %r12: saved top of stack for void_call_2 (high word for 31-bit)
+   - %r13: low word of saved top of stack (for 31-bit)
+   - %r14: return address for calls
+   - %r15: stack pointer
+
+  */
+
+/* The "emit_prologue" emit_ops method for s390.  */
+
+static void
+s390_emit_prologue (void)
+{
+  static const unsigned char buf[] = {
+    0x90, 0x9f, 0xf0, 0x24,		/* stm %r9, %r15, 0x24(%r15) */
+    0x18, 0x92,				/* lr %r9, %r2 */
+    0x18, 0xa3,				/* lr %r10, %r3 */
+    0x18, 0xbf,				/* lr %r11, %r15 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_epilogue" emit_ops method for s390.  */
+
+static void
+s390_emit_epilogue (void)
+{
+  static const unsigned char buf[] = {
+    0x90, 0x23, 0xa0, 0x00,		/* stm %r2, %r3, 0(%r10) */
+    0xa7, 0x28, 0x00, 0x00,		/* lhi %r2, 0 */
+    0x98, 0x9f, 0xb0, 0x24,		/* lm %r9, %r15, 0x24(%r11) */
+    0x07, 0xfe,				/* br %r14 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_add" emit_ops method for s390.  */
+
+static void
+s390_emit_add (void)
+{
+  static const unsigned char buf[] = {
+    0x5e, 0x30, 0xf0, 0x04,		/* al %r3, 4(%r15) */
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x98,	/* al %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_sub" emit_ops method for s390.  */
+
+static void
+s390_emit_sub (void)
+{
+  static const unsigned char buf[] = {
+    0x98, 0x45, 0xf0, 0x00,	/* lm %r4, %r5, 0(%r15) */
+    0x1f, 0x53,			/* slr %r5, %r3 */
+    0xb9, 0x99, 0x00, 0x42,	/* slbr %r4, %r2 */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+    0x18, 0x35,			/* lr %r3, %r5 */
+    0x18, 0x24,			/* lr %r2, %r4 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_mul" emit_ops method for s390.  */
+
+static void
+s390_emit_mul (void)
+{
+  emit_error = 1;
+}
+
+/* The "emit_lsh" emit_ops method for s390.  */
+
+static void
+s390_emit_lsh (void)
+{
+  static const unsigned char buf[] = {
+    0x18, 0x43,			/* lr %r4, %r3 */
+    0x98, 0x23, 0xf0, 0x00,	/* lm %r2, %r3, 0(%r15) */
+    0x8d, 0x20, 0x40, 0x00,	/* sldl %r2, 0(%r4) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_rsh_signed" emit_ops method for s390.  */
+
+static void
+s390_emit_rsh_signed (void)
+{
+  static const unsigned char buf[] = {
+    0x18, 0x43,			/* lr %r4, %r3 */
+    0x98, 0x23, 0xf0, 0x00,	/* lm %r2, %r3, 0(%r15) */
+    0x8e, 0x20, 0x40, 0x00,	/* srda %r2, 0(%r4) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_rsh_unsigned" emit_ops method for s390.  */
+
+static void
+s390_emit_rsh_unsigned (void)
+{
+  static const unsigned char buf[] = {
+    0x18, 0x43,			/* lr %r4, %r3 */
+    0x98, 0x23, 0xf0, 0x00,	/* lm %r2, %r3, 0(%r15) */
+    0x8c, 0x20, 0x40, 0x00,	/* srdl %r2, 0(%r4) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_ext" emit_ops method for s390.  */
+
+static void
+s390_emit_ext (int arg)
+{
+  unsigned char buf[] = {
+    0x8d, 0x20, 0x00, 64 - arg,	/* sldl %r2, <64-arg> */
+    0x8e, 0x20, 0x00, 64 - arg,	/* srda %r2, <64-arg> */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_log_not" emit_ops method for s390.  */
+
+static void
+s390_emit_log_not (void)
+{
+  static const unsigned char buf[] = {
+    0x16, 0x23,			/* or %r2, %r3 */
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0xa7, 0x38, 0x00, 0x00,	/* lhi %r3, 0 */
+    0xa7, 0x74, 0x00, 0x04,	/* jne .Lskip */
+    0xa7, 0x38, 0x00, 0x01,	/* lhi %r3, 1 */
+    /* .Lskip: */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_and" emit_ops method for s390.  */
+
+static void
+s390_emit_bit_and (void)
+{
+  static const unsigned char buf[] = {
+    0x54, 0x20, 0xf0, 0x00,	/* n %r2, 0(%r15) */
+    0x54, 0x30, 0xf0, 0x04,	/* n %r3, 4(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_or" emit_ops method for s390.  */
+
+static void
+s390_emit_bit_or (void)
+{
+  static const unsigned char buf[] = {
+    0x56, 0x20, 0xf0, 0x00,	/* o %r2, 0(%r15) */
+    0x56, 0x30, 0xf0, 0x04,	/* o %r3, 4(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_xor" emit_ops method for s390.  */
+
+static void
+s390_emit_bit_xor (void)
+{
+  static const unsigned char buf[] = {
+    0x57, 0x20, 0xf0, 0x00,	/* x %r2, 0(%r15) */
+    0x57, 0x30, 0xf0, 0x04,	/* x %r3, 4(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_not" emit_ops method for s390.  */
+
+static void
+s390_emit_bit_not (void)
+{
+  static const unsigned char buf[] = {
+    0xa7, 0x48, 0xff, 0xff,	/* lhi %r4, -1 */
+    0x17, 0x24,			/* xr %r2, %r4 */
+    0x17, 0x34,			/* xr %r3, %r4 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_equal" emit_ops method for s390.  */
+
+static void
+s390_emit_equal (void)
+{
+  s390_emit_bit_xor ();
+  s390_emit_log_not ();
+}
+
+/* The "emit_less_signed" emit_ops method for s390.  */
+
+static void
+s390_emit_less_signed (void)
+{
+  static const unsigned char buf[] = {
+    0x59, 0x20, 0xf0, 0x00,	/* c %r2, 0(%r15) */
+    0xa7, 0x24, 0x00, 0x0c,	/* jh .Lless */
+    0xa7, 0x44, 0x00, 0x06,	/* jl .Lhigh */
+    0x55, 0x30, 0xf0, 0x04,	/* cl %r3, 4(%r15) */
+    0xa7, 0x24, 0x00, 0x06,	/* jh .Lless */
+    /* .Lhigh: */
+    0xa7, 0x38, 0x00, 0x00,	/* lhi %r3, 0 */
+    0xa7, 0xf4, 0x00, 0x04,	/* j .Lend */
+    /* .Lless: */
+    0xa7, 0x38, 0x00, 0x01,	/* lhi %r3, 1 */
+    /* .Lend: */
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_less_unsigned" emit_ops method for s390.  */
+
+static void
+s390_emit_less_unsigned (void)
+{
+  static const unsigned char buf[] = {
+    0x55, 0x20, 0xf0, 0x00,	/* cl %r2, 0(%r15) */
+    0xa7, 0x24, 0x00, 0x0c,	/* jh .Lless */
+    0xa7, 0x44, 0x00, 0x06,	/* jl .Lhigh */
+    0x55, 0x30, 0xf0, 0x04,	/* cl %r3, 4(%r15) */
+    0xa7, 0x24, 0x00, 0x06,	/* jh .Lless */
+    /* .Lhigh: */
+    0xa7, 0x38, 0x00, 0x00,	/* lhi %r3, 0 */
+    0xa7, 0xf4, 0x00, 0x04,	/* j .Lend */
+    /* .Lless: */
+    0xa7, 0x38, 0x00, 0x01,	/* lhi %r3, 1 */
+    /* .Lend: */
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_ref" emit_ops method for s390.  */
+
+static void
+s390_emit_ref (int size)
+{
+  static const unsigned char buf1[] = {
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0x43, 0x30, 0x30, 0x00,	/* ic %r3, 0(%r3) */
+  };
+  static const unsigned char buf2[] = {
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0x48, 0x30, 0x30, 0x00,	/* lh %r3, 0(%r3) */
+  };
+  static const unsigned char buf4[] = {
+    0xa7, 0x28, 0x00, 0x00,	/* lhi %r2, 0 */
+    0x58, 0x30, 0x30, 0x00,	/* l %r3, 0(%r3) */
+  };
+  static const unsigned char buf8[] = {
+    0x98, 0x23, 0x30, 0x00,	/* lm %r2, %r3, 0(%r3) */
+  };
+  switch (size)
+    {
+    case 1:
+      add_insns (buf1, sizeof buf1);
+      break;
+    case 2:
+      add_insns (buf2, sizeof buf2);
+      break;
+    case 4:
+      add_insns (buf4, sizeof buf4);
+      break;
+    case 8:
+      add_insns (buf8, sizeof buf8);
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* The "emit_if_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_if_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x16, 0x23,				/* or %r2, %r3 */
+    0x98, 0x23, 0xf0, 0x00,		/* lm %r2, %r3, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+    0xc0, 0x74, 0x00, 0x00, 0x00, 0x00	/* jgne <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 12;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_goto" emit_ops method for s390 and s390x.  */
+
+static void
+s390_emit_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,	/* jg <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 2;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "write_goto_address" emit_ops method for s390 and s390x.  */
+
+static void
+s390_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
+{
+  long diff = ((long) (to - (from - 2))) / 2;
+  int sdiff = diff;
+  unsigned char buf[sizeof sdiff];
+
+  /* We're only doing 4-byte sizes at the moment.  */
+  if (size != sizeof sdiff || sdiff != diff)
+    {
+      emit_error = 1;
+      return;
+    }
+
+  memcpy (buf, &sdiff, sizeof sdiff);
+  write_inferior_memory (from, buf, sizeof sdiff);
+}
+
+/* Preparation for emitting a literal pool of given size.  Loads the address
+   of the pool into %r1, and jumps over it.  Called should emit the pool data
+   immediately afterwards.  Used for both s390 and s390x.  */
+
+static void
+s390_emit_litpool (int size)
+{
+  static const unsigned char nop[] = {
+    0x07, 0x07,
+  };
+  unsigned char buf[] = {
+    0xa7, 0x15, 0x00, (size + 4) / 2,	/* bras %r1, .Lend+size */
+    /* .Lend: */
+  };
+  if (size == 4)
+    {
+      /* buf needs to start at even halfword for litpool to be aligned */
+      if (current_insn_ptr & 2)
+	add_insns (nop, sizeof nop);
+    }
+  else
+    {
+      while ((current_insn_ptr & 6) != 4)
+	add_insns (nop, sizeof nop);
+    }
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_const" emit_ops method for s390.  */
+
+static void
+s390_emit_const (LONGEST num)
+{
+  unsigned long long n = num;
+  unsigned char buf_s[] = {
+    0xa7, 0x38, num >> 8, num,	/* lhi %r3, <num> */
+    0x17, 0x22,			/* xr %r2, %r2 */
+  };
+  static const unsigned char buf_l[] = {
+    0x98, 0x23, 0x10, 0x00,	/* lm %r2, %r3, 0(%r1) */
+  };
+  if (num < 0x8000 && num >= 0)
+  {
+    add_insns (buf_s, sizeof buf_s);
+  }
+  else
+  {
+    s390_emit_litpool (8);
+    add_insns ((unsigned char *) &n, sizeof n);
+    add_insns (buf_l, sizeof buf_l);
+  }
+}
+
+/* The "emit_call" emit_ops method for s390.  */
+
+static void
+s390_emit_call (CORE_ADDR fn)
+{
+  unsigned int n = fn;
+  static const unsigned char buf[] = {
+    0x58, 0x10, 0x10, 0x00,	/* l %r1, 0(%r1) */
+    0xa7, 0xfa, 0xff, 0xa0,	/* ahi %r15, -0x60 */
+    0x0d, 0xe1,			/* basr %r14, %r1 */
+    0xa7, 0xfa, 0x00, 0x60,	/* ahi %r15, 0x60 */
+  };
+  s390_emit_litpool (4);
+  add_insns ((unsigned char *) &n, sizeof n);
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_reg" emit_ops method for s390.  */
+
+static void
+s390_emit_reg (int reg)
+{
+  unsigned char bufpre[] = {
+    0x18, 0x29,			/* lr %r2, %r9 */
+    0xa7, 0x38, reg >> 8, reg,	/* lhi %r3, <reg> */
+  };
+  add_insns (bufpre, sizeof bufpre);
+  s390_emit_call (get_raw_reg_func_addr ());
+}
+
+/* The "emit_pop" emit_ops method for s390.  */
+
+static void
+s390_emit_pop (void)
+{
+  static const unsigned char buf[] = {
+    0x98, 0x23, 0xf0, 0x00,	/* lm %r2, %r3, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,	/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_stack_flush" emit_ops method for s390.  */
+
+static void
+s390_emit_stack_flush (void)
+{
+  static const unsigned char buf[] = {
+    0xa7, 0xfa, 0xff, 0xf8,	/* ahi %r15, -8 */
+    0x90, 0x23, 0xf0, 0x00,	/* stm %r2, %r3, 0(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_zero_ext" emit_ops method for s390.  */
+
+static void
+s390_emit_zero_ext (int arg)
+{
+  unsigned char buf[] = {
+    0x8d, 0x20, 0x00, 64 - arg,	/* sldl %r2, <64-arg> */
+    0x8c, 0x20, 0x00, 64 - arg,	/* srdl %r2, <64-arg> */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_swap" emit_ops method for s390.  */
+
+static void
+s390_emit_swap (void)
+{
+  static const unsigned char buf[] = {
+    0x98, 0x45, 0xf0, 0x00,	/* lm %r4, %r5, 0(%r15) */
+    0x90, 0x23, 0xf0, 0x00,	/* stm %r2, %r3, 0(%r15) */
+    0x18, 0x24,			/* lr %r2, %r4 */
+    0x18, 0x35,			/* lr %r3, %r5 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_stack_adjust" emit_ops method for s390.  */
+
+static void
+s390_emit_stack_adjust (int n)
+{
+  unsigned char buf[] = {
+    0xa7, 0xfa, n * 8 >> 8, n * 8,	/* ahi %r15, 8*n */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* Sets %r2 to a 32-bit constant.  */
+
+static void
+s390_emit_set_r2 (int arg1)
+{
+  unsigned char buf_s[] = {
+    0xa7, 0x28, arg1 >> 8, arg1,	/* lhi %r2, <arg1> */
+  };
+  static const unsigned char buf_l[] = {
+    0x58, 0x20, 0x10, 0x00,	/* l %r2, 0(%r1) */
+  };
+  if (arg1 < 0x8000 && arg1 >= -0x8000)
+  {
+    add_insns (buf_s, sizeof buf_s);
+  }
+  else
+  {
+    s390_emit_litpool (4);
+    add_insns ((unsigned char *) &arg1, sizeof arg1);
+    add_insns (buf_l, sizeof buf_l);
+  }
+}
+
+/* The "emit_int_call_1" emit_ops method for s390.  */
+
+static void
+s390_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  /* FN's prototype is `LONGEST(*fn)(int)'.  */
+  s390_emit_set_r2 (arg1);
+  s390_emit_call (fn);
+}
+
+/* The "emit_void_call_2" emit_ops method for s390.  */
+
+static void
+s390_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  /* FN's prototype is `void(*fn)(int,LONGEST)'.  */
+  static const unsigned char buf[] = {
+    0x18, 0xc2,			/* lr %r12, %r2 */
+    0x18, 0xd3,			/* lr %r13, %r3 */
+    0x18, 0x43,			/* lr %r4, %r3 */
+    0x18, 0x32,			/* lr %r3, %r2 */
+  };
+  static const unsigned char buf2[] = {
+    0x18, 0x2c,			/* lr %r2, %r12 */
+    0x18, 0x3d,			/* lr %r3, %r13 */
+  };
+  add_insns (buf, sizeof buf);
+  s390_emit_set_r2 (arg1);
+  s390_emit_call (fn);
+  add_insns (buf2, sizeof buf2);
+}
+
+/* The "emit_eq_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_eq_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x57, 0x20, 0xf0, 0x00,		/* x %r2, 0(%r15) */
+    0x57, 0x30, 0xf0, 0x04,		/* x %r3, 4(%r15) */
+    0x16, 0x23,				/* or %r2, %r3 */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x84, 0x00, 0x00, 0x00, 0x00,	/* jge <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 20;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ne_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_ne_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x57, 0x20, 0xf0, 0x00,		/* x %r2, 0(%r15) */
+    0x57, 0x30, 0xf0, 0x04,		/* x %r3, 4(%r15) */
+    0x16, 0x23,				/* or %r2, %r3 */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,	/* jgne <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 20;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_lt_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_lt_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x59, 0x20, 0xf0, 0x00,		/* c %r2, 0(%r15) */
+    0xa7, 0x24, 0x00, 0x0e,		/* jh .Ltrue */
+    0xa7, 0x44, 0x00, 0x06,		/* jl .Lfalse */
+    0x55, 0x30, 0xf0, 0x04,		/* cl %r3, 4(%r15) */
+    0xa7, 0x24, 0x00, 0x08,		/* jh .Ltrue */
+    /* .Lfalse: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xa7, 0xf4, 0x00, 0x09,		/* j .Lend */
+    /* .Ltrue: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,	/* jg <fillme> */
+    /* .Lend: */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 42;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_le_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_le_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x59, 0x20, 0xf0, 0x00,		/* c %r2, 0(%r15) */
+    0xa7, 0x24, 0x00, 0x0e,		/* jh .Ltrue */
+    0xa7, 0x44, 0x00, 0x06,		/* jl .Lfalse */
+    0x55, 0x30, 0xf0, 0x04,		/* cl %r3, 4(%r15) */
+    0xa7, 0xa4, 0x00, 0x08,		/* jhe .Ltrue */
+    /* .Lfalse: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xa7, 0xf4, 0x00, 0x09,		/* j .Lend */
+    /* .Ltrue: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,	/* jg <fillme> */
+    /* .Lend: */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 42;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_gt_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_gt_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x59, 0x20, 0xf0, 0x00,		/* c %r2, 0(%r15) */
+    0xa7, 0x44, 0x00, 0x0e,		/* jl .Ltrue */
+    0xa7, 0x24, 0x00, 0x06,		/* jh .Lfalse */
+    0x55, 0x30, 0xf0, 0x04,		/* cl %r3, 4(%r15) */
+    0xa7, 0x44, 0x00, 0x08,		/* jl .Ltrue */
+    /* .Lfalse: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xa7, 0xf4, 0x00, 0x09,		/* j .Lend */
+    /* .Ltrue: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,	/* jg <fillme> */
+    /* .Lend: */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 42;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ge_goto" emit_ops method for s390.  */
+
+static void
+s390_emit_ge_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0x59, 0x20, 0xf0, 0x00,		/* c %r2, 0(%r15) */
+    0xa7, 0x44, 0x00, 0x0e,		/* jl .Ltrue */
+    0xa7, 0x24, 0x00, 0x06,		/* jh .Lfalse */
+    0x55, 0x30, 0xf0, 0x04,		/* cl %r3, 4(%r15) */
+    0xa7, 0xc4, 0x00, 0x08,		/* jle .Ltrue */
+    /* .Lfalse: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xa7, 0xf4, 0x00, 0x09,		/* j .Lend */
+    /* .Ltrue: */
+    0x98, 0x23, 0xf0, 0x08,		/* lm %r2, %r3, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,	/* jg <fillme> */
+    /* .Lend: */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 42;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ops" structure for s390.  Named _impl to avoid name
+   collision with s390_emit_ops function.  */
+
+static struct emit_ops s390_emit_ops_impl =
+  {
+    s390_emit_prologue,
+    s390_emit_epilogue,
+    s390_emit_add,
+    s390_emit_sub,
+    s390_emit_mul,
+    s390_emit_lsh,
+    s390_emit_rsh_signed,
+    s390_emit_rsh_unsigned,
+    s390_emit_ext,
+    s390_emit_log_not,
+    s390_emit_bit_and,
+    s390_emit_bit_or,
+    s390_emit_bit_xor,
+    s390_emit_bit_not,
+    s390_emit_equal,
+    s390_emit_less_signed,
+    s390_emit_less_unsigned,
+    s390_emit_ref,
+    s390_emit_if_goto,
+    s390_emit_goto,
+    s390_write_goto_address,
+    s390_emit_const,
+    s390_emit_call,
+    s390_emit_reg,
+    s390_emit_pop,
+    s390_emit_stack_flush,
+    s390_emit_zero_ext,
+    s390_emit_swap,
+    s390_emit_stack_adjust,
+    s390_emit_int_call_1,
+    s390_emit_void_call_2,
+    s390_emit_eq_goto,
+    s390_emit_ne_goto,
+    s390_emit_lt_goto,
+    s390_emit_le_goto,
+    s390_emit_gt_goto,
+    s390_emit_ge_goto
+  };
+
+#ifdef __s390x__
+
+/* The "emit_prologue" emit_ops method for s390x.  */
+
+static void
+s390x_emit_prologue (void)
+{
+  static const unsigned char buf[] = {
+    0xeb, 0x9f, 0xf0, 0x48, 0x00, 0x24,	/* stmg %r9, %r15, 0x48(%r15) */
+    0xb9, 0x04, 0x00, 0x92,		/* lgr %r9, %r2 */
+    0xb9, 0x04, 0x00, 0xa3,		/* lgr %r10, %r3 */
+    0xb9, 0x04, 0x00, 0xbf,		/* lgr %r11, %r15 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_epilogue" emit_ops method for s390x.  */
+
+static void
+s390x_emit_epilogue (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xa0, 0x00, 0x00, 0x24,	/* stg %r2, 0(%r10) */
+    0xa7, 0x29, 0x00, 0x00,		/* lghi %r2, 0 */
+    0xeb, 0x9f, 0xf0, 0x48, 0x00, 0x04,	/* lmg %r9, %r15, 0x48(%r15) */
+    0x07, 0xfe,				/* br %r14 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_add" emit_ops method for s390x.  */
+
+static void
+s390x_emit_add (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x0a,	/* alg %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_sub" emit_ops method for s390x.  */
+
+static void
+s390x_emit_sub (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,	/* lg %r3, 0(%r15) */
+    0xb9, 0x0b, 0x00, 0x32,		/* slgr %r3, %r2 */
+    0xb9, 0x04, 0x00, 0x23,		/* lgr %r2, %r3 */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_mul" emit_ops method for s390x.  */
+
+static void
+s390x_emit_mul (void)
+{
+  emit_error = 1;
+}
+
+/* The "emit_lsh" emit_ops method for s390x.  */
+
+static void
+s390x_emit_lsh (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,	/* lg %r3, 0(%r15) */
+    0xeb, 0x23, 0x20, 0x00, 0x00, 0x0d,	/* sllg %r2, %r3, 0(%r2) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_rsh_signed" emit_ops method for s390x.  */
+
+static void
+s390x_emit_rsh_signed (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,	/* lg %r3, 0(%r15) */
+    0xeb, 0x23, 0x20, 0x00, 0x00, 0x0a,	/* srag %r2, %r3, 0(%r2) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_rsh_unsigned" emit_ops method for s390x.  */
+
+static void
+s390x_emit_rsh_unsigned (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,	/* lg %r3, 0(%r15) */
+    0xeb, 0x23, 0x20, 0x00, 0x00, 0x0c,	/* srlg %r2, %r3, 0(%r2) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_ext" emit_ops method for s390x.  */
+
+static void
+s390x_emit_ext (int arg)
+{
+  unsigned char buf[] = {
+    0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d,	/* sllg %r2, %r2, <64-arg> */
+    0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0a,	/* srag %r2, %r2, <64-arg> */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_log_not" emit_ops method for s390x.  */
+
+static void
+s390x_emit_log_not (void)
+{
+  static const unsigned char buf[] = {
+    0xb9, 0x00, 0x00, 0x22,		/* lpgr %r2, %r2 */
+    0xa7, 0x2b, 0xff, 0xff,		/* aghi %r2, -1 */
+    0xeb, 0x22, 0x00, 0x3f, 0x00, 0x0c,	/* srlg %r2, %r2, 63 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_and" emit_ops method for s390x.  */
+
+static void
+s390x_emit_bit_and (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x80,	/* ng %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_or" emit_ops method for s390x.  */
+
+static void
+s390x_emit_bit_or (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x81,	/* og %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_xor" emit_ops method for s390x.  */
+
+static void
+s390x_emit_bit_xor (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x82,	/* xg %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_bit_not" emit_ops method for s390x.  */
+
+static void
+s390x_emit_bit_not (void)
+{
+  static const unsigned char buf[] = {
+    0xa7, 0x39, 0xff, 0xff,	/* lghi %r3, -1 */
+    0xb9, 0x82, 0x00, 0x23,	/* xgr %r2, %r3 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_equal" emit_ops method for s390x.  */
+
+static void
+s390x_emit_equal (void)
+{
+  s390x_emit_bit_xor ();
+  s390x_emit_log_not ();
+}
+
+/* The "emit_less_signed" emit_ops method for s390x.  */
+
+static void
+s390x_emit_less_signed (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xa7, 0x29, 0x00, 0x01,		/* lghi %r2, 1 */
+    0xa7, 0x24, 0x00, 0x04,		/* jh .Lend */
+    0xa7, 0x29, 0x00, 0x00,		/* lghi %r2, 0 */
+    /* .Lend: */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_less_unsigned" emit_ops method for s390x.  */
+
+static void
+s390x_emit_less_unsigned (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x21,	/* clg %r2, 0(%r15) */
+    0xa7, 0x29, 0x00, 0x01,		/* lghi %r2, 1 */
+    0xa7, 0x24, 0x00, 0x04,		/* jh .Lend */
+    0xa7, 0x29, 0x00, 0x00,		/* lghi %r2, 0 */
+    /* .Lend: */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_ref" emit_ops method for s390x.  */
+
+static void
+s390x_emit_ref (int size)
+{
+  static const unsigned char buf1[] = {
+    0xe3, 0x20, 0x20, 0x00, 0x00, 0x90,	/* llgc %r2, 0(%r2) */
+  };
+  static const unsigned char buf2[] = {
+    0xe3, 0x20, 0x20, 0x00, 0x00, 0x91	/* llgh %r2, 0(%r2) */
+  };
+  static const unsigned char buf4[] = {
+    0xe3, 0x20, 0x20, 0x00, 0x00, 0x16,	/* llgf %r2, 0(%r2) */
+  };
+  static const unsigned char buf8[] = {
+    0xe3, 0x20, 0x20, 0x00, 0x00, 0x04,	/* lg %r2, 0(%r2) */
+  };
+  switch (size)
+    {
+    case 1:
+      add_insns (buf1, sizeof buf1);
+      break;
+    case 2:
+      add_insns (buf2, sizeof buf2);
+      break;
+    case 4:
+      add_insns (buf4, sizeof buf4);
+      break;
+    case 8:
+      add_insns (buf8, sizeof buf8);
+      break;
+    default:
+      emit_error = 1;
+    }
+}
+
+/* The "emit_if_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_if_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xb9, 0x02, 0x00, 0x22,		/* ltgr %r2, %r2 */
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x04,	/* lg %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+    0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,	/* jgne <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 16;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_const" emit_ops method for s390x.  */
+
+static void
+s390x_emit_const (LONGEST num)
+{
+  unsigned long long n = num;
+  unsigned char buf_s[] = {
+    0xa7, 0x29, num >> 8, num,		/* lghi %r2, <num> */
+  };
+  static const unsigned char buf_l[] = {
+    0xe3, 0x20, 0x10, 0x00, 0x00, 0x04,	/* lg %r2, 0(%r1) */
+  };
+  if (num < 0x8000 && num >= -0x8000)
+  {
+    add_insns (buf_s, sizeof buf_s);
+  }
+  else
+  {
+    s390_emit_litpool (8);
+    add_insns ((unsigned char *) &n, sizeof n);
+    add_insns (buf_l, sizeof buf_l);
+  }
+}
+
+/* The "emit_call" emit_ops method for s390x.  */
+
+static void
+s390x_emit_call (CORE_ADDR fn)
+{
+  unsigned long n = fn;
+  static const unsigned char buf[] = {
+    0xe3, 0x10, 0x10, 0x00, 0x00, 0x04,	/* lg %r1, 0(%r1) */
+    0xa7, 0xfb, 0xff, 0x60,		/* aghi %r15, -0xa0 */
+    0x0d, 0xe1,				/* basr %r14, %r1 */
+    0xa7, 0xfb, 0x00, 0xa0,		/* aghi %r15, 0xa0 */
+  };
+  s390_emit_litpool (8);
+  add_insns ((unsigned char *) &n, sizeof n);
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_reg" emit_ops method for s390x.  */
+
+static void
+s390x_emit_reg (int reg)
+{
+  unsigned char buf[] = {
+    0xb9, 0x04, 0x00, 0x29,		/* lgr %r2, %r9 */
+    0xa7, 0x39, reg >> 8, reg,		/* lghi %r3, <reg> */
+  };
+  add_insns (buf, sizeof buf);
+  s390x_emit_call (get_raw_reg_func_addr ());
+}
+
+/* The "emit_pop" emit_ops method for s390x.  */
+
+static void
+s390x_emit_pop (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x04,	/* lg %r2, 0(%r15) */
+    0x41, 0xf0, 0xf0, 0x08,		/* la %r15, 8(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_stack_flush" emit_ops method for s390x.  */
+
+static void
+s390x_emit_stack_flush (void)
+{
+  static const unsigned char buf[] = {
+    0xa7, 0xfb, 0xff, 0xf8,		/* aghi %r15, -8 */
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x24,	/* stg %r2, 0(%r15) */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_zero_ext" emit_ops method for s390x.  */
+
+static void
+s390x_emit_zero_ext (int arg)
+{
+  unsigned char buf[] = {
+    0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d,	/* sllg %r2, %r2, <64-arg> */
+    0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0c,	/* srlg %r2, %r2, <64-arg> */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_swap" emit_ops method for s390x.  */
+
+static void
+s390x_emit_swap (void)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,	/* lg %r3, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x24,	/* stg %r2, 0(%r15) */
+    0xb9, 0x04, 0x00, 0x23,		/* lgr %r2, %r3 */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_stack_adjust" emit_ops method for s390x.  */
+
+static void
+s390x_emit_stack_adjust (int n)
+{
+  unsigned char buf[] = {
+    0xa7, 0xfb, n * 8 >> 8, n * 8,	/* aghi %r15, 8*n */
+  };
+  add_insns (buf, sizeof buf);
+}
+
+/* The "emit_int_call_1" emit_ops method for s390x.  */
+
+static void
+s390x_emit_int_call_1 (CORE_ADDR fn, int arg1)
+{
+  /* FN's prototype is `LONGEST(*fn)(int)'.  */
+  s390x_emit_const (arg1);
+  s390x_emit_call (fn);
+}
+
+/* The "emit_void_call_2" emit_ops method for s390x.  */
+
+static void
+s390x_emit_void_call_2 (CORE_ADDR fn, int arg1)
+{
+  /* FN's prototype is `void(*fn)(int,LONGEST)'.  */
+  static const unsigned char buf[] = {
+    0xb9, 0x04, 0x00, 0x32,		/* lgr %r3, %r2 */
+    0xb9, 0x04, 0x00, 0xc2,		/* lgr %r12, %r2 */
+  };
+  static const unsigned char buf2[] = {
+    0xb9, 0x04, 0x00, 0x2c,		/* lgr %r2, %r12 */
+  };
+  add_insns (buf, sizeof buf);
+  s390x_emit_const (arg1);
+  s390x_emit_call (fn);
+  add_insns (buf2, sizeof buf2);
+}
+
+/* The "emit_eq_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_eq_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x84, 0x00, 0x00, 0x00, 0x00,	/* jge <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ne_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_ne_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,	/* jgne <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_lt_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_lt_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x24, 0x00, 0x00, 0x00, 0x00,	/* jgh <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_le_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_le_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xa4, 0x00, 0x00, 0x00, 0x00,	/* jghe <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_gt_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_gt_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0x44, 0x00, 0x00, 0x00, 0x00,	/* jgl <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ge_goto" emit_ops method for s390x.  */
+
+static void
+s390x_emit_ge_goto (int *offset_p, int *size_p)
+{
+  static const unsigned char buf[] = {
+    0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,	/* cg %r2, 0(%r15) */
+    0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04, /* lg %r2, 8(%r15) */
+    0x41, 0xf0, 0xf0, 0x10,		/* la %r15, 16(%r15) */
+    0xc0, 0xc4, 0x00, 0x00, 0x00, 0x00,	/* jgle <fillme> */
+  };
+  add_insns (buf, sizeof buf);
+  if (offset_p)
+    *offset_p = 18;
+  if (size_p)
+    *size_p = 4;
+}
+
+/* The "emit_ops" structure for s390x.  */
+
+static struct emit_ops s390x_emit_ops =
+  {
+    s390x_emit_prologue,
+    s390x_emit_epilogue,
+    s390x_emit_add,
+    s390x_emit_sub,
+    s390x_emit_mul,
+    s390x_emit_lsh,
+    s390x_emit_rsh_signed,
+    s390x_emit_rsh_unsigned,
+    s390x_emit_ext,
+    s390x_emit_log_not,
+    s390x_emit_bit_and,
+    s390x_emit_bit_or,
+    s390x_emit_bit_xor,
+    s390x_emit_bit_not,
+    s390x_emit_equal,
+    s390x_emit_less_signed,
+    s390x_emit_less_unsigned,
+    s390x_emit_ref,
+    s390x_emit_if_goto,
+    s390_emit_goto,
+    s390_write_goto_address,
+    s390x_emit_const,
+    s390x_emit_call,
+    s390x_emit_reg,
+    s390x_emit_pop,
+    s390x_emit_stack_flush,
+    s390x_emit_zero_ext,
+    s390x_emit_swap,
+    s390x_emit_stack_adjust,
+    s390x_emit_int_call_1,
+    s390x_emit_void_call_2,
+    s390x_emit_eq_goto,
+    s390x_emit_ne_goto,
+    s390x_emit_lt_goto,
+    s390x_emit_le_goto,
+    s390x_emit_gt_goto,
+    s390x_emit_ge_goto
+  };
+#endif
+
+/* The "emit_ops" linux_target_ops method.  */
+
+static struct emit_ops *
+s390_emit_ops (void)
+{
+#ifdef __s390x__
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+
+  if (register_size (regcache->tdesc, 0) == 8)
+    return &s390x_emit_ops;
+  else
+#endif
+    return &s390_emit_ops_impl;
+}
+
+struct linux_target_ops the_low_target = {
+  s390_arch_setup,
+  s390_regs_info,
+  s390_cannot_fetch_register,
+  s390_cannot_store_register,
+  NULL, /* fetch_register */
+  s390_get_pc,
+  s390_set_pc,
+  NULL, /* breakpoint_kind_from_pc */
+  s390_sw_breakpoint_from_kind,
+  NULL,
+  s390_breakpoint_len,
+  s390_breakpoint_at,
+  s390_supports_z_point_type,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  s390_collect_ptrace_register,
+  s390_supply_ptrace_register,
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  s390_supports_tracepoints,
+  s390_get_thread_area,
+  s390_install_fast_tracepoint_jump_pad,
+  s390_emit_ops,
+  s390_get_min_fast_tracepoint_insn_len,
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  s390_supports_hardware_single_step,
+  NULL, /* get_syscall_trapinfo */
+  s390_get_ipa_tdesc_idx,
+};
+
+void
+initialize_low_arch (void)
+{
+  /* Initialize the Linux target descriptions.  */
+
+  init_registers_s390_linux32 ();
+  init_registers_s390_linux32v1 ();
+  init_registers_s390_linux32v2 ();
+  init_registers_s390_linux64 ();
+  init_registers_s390_linux64v1 ();
+  init_registers_s390_linux64v2 ();
+  init_registers_s390_te_linux64 ();
+  init_registers_s390_vx_linux64 ();
+  init_registers_s390_tevx_linux64 ();
+#ifdef __s390x__
+  init_registers_s390x_linux64 ();
+  init_registers_s390x_linux64v1 ();
+  init_registers_s390x_linux64v2 ();
+  init_registers_s390x_te_linux64 ();
+  init_registers_s390x_vx_linux64 ();
+  init_registers_s390x_tevx_linux64 ();
+#endif
+
+  initialize_regsets_info (&s390_regsets_info);
+  initialize_regsets_info (&s390_regsets_info_3264);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-tdesc.h ./gdb/gdbserver/linux-s390-tdesc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-s390-tdesc.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-s390-tdesc.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+/* Low level support for s390, shared between gdbserver and IPA.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Note: since IPA obviously knows what ABI it's running on (s390 vs s390x),
+   it's sufficient to pass only the register set here.  This, together with
+   the ABI known at IPA compile time, maps to a tdesc.  */
+
+enum s390_linux_tdesc {
+  S390_TDESC_32,
+  S390_TDESC_32V1,
+  S390_TDESC_32V2,
+  S390_TDESC_64,
+  S390_TDESC_64V1,
+  S390_TDESC_64V2,
+  S390_TDESC_TE,
+  S390_TDESC_VX,
+  S390_TDESC_TEVX,
+};
+
+#ifdef __s390x__
+
+/* Defined in auto-generated file s390x-linux64.c.  */
+void init_registers_s390x_linux64 (void);
+extern const struct target_desc *tdesc_s390x_linux64;
+
+/* Defined in auto-generated file s390x-linux64v1.c.  */
+void init_registers_s390x_linux64v1 (void);
+extern const struct target_desc *tdesc_s390x_linux64v1;
+
+/* Defined in auto-generated file s390x-linux64v2.c.  */
+void init_registers_s390x_linux64v2 (void);
+extern const struct target_desc *tdesc_s390x_linux64v2;
+
+/* Defined in auto-generated file s390x-te-linux64.c.  */
+void init_registers_s390x_te_linux64 (void);
+extern const struct target_desc *tdesc_s390x_te_linux64;
+
+/* Defined in auto-generated file s390x-vx-linux64.c.  */
+void init_registers_s390x_vx_linux64 (void);
+extern const struct target_desc *tdesc_s390x_vx_linux64;
+
+/* Defined in auto-generated file s390x-tevx-linux64.c.  */
+void init_registers_s390x_tevx_linux64 (void);
+extern const struct target_desc *tdesc_s390x_tevx_linux64;
+
+#endif
+
+#if !defined __s390x__ || !defined IN_PROCESS_AGENT
+
+/* Defined in auto-generated file s390-linux32.c.  */
+void init_registers_s390_linux32 (void);
+extern const struct target_desc *tdesc_s390_linux32;
+
+/* Defined in auto-generated file s390-linux32v1.c.  */
+void init_registers_s390_linux32v1 (void);
+extern const struct target_desc *tdesc_s390_linux32v1;
+
+/* Defined in auto-generated file s390-linux32v2.c.  */
+void init_registers_s390_linux32v2 (void);
+extern const struct target_desc *tdesc_s390_linux32v2;
+
+/* Defined in auto-generated file s390-linux64.c.  */
+void init_registers_s390_linux64 (void);
+extern const struct target_desc *tdesc_s390_linux64;
+
+/* Defined in auto-generated file s390-linux64v1.c.  */
+void init_registers_s390_linux64v1 (void);
+extern const struct target_desc *tdesc_s390_linux64v1;
+
+/* Defined in auto-generated file s390-linux64v2.c.  */
+void init_registers_s390_linux64v2 (void);
+extern const struct target_desc *tdesc_s390_linux64v2;
+
+/* Defined in auto-generated file s390-te-linux64.c.  */
+void init_registers_s390_te_linux64 (void);
+extern const struct target_desc *tdesc_s390_te_linux64;
+
+/* Defined in auto-generated file s390-vx-linux64.c.  */
+void init_registers_s390_vx_linux64 (void);
+extern const struct target_desc *tdesc_s390_vx_linux64;
+
+/* Defined in auto-generated file s390-tevx-linux64.c.  */
+void init_registers_s390_tevx_linux64 (void);
+extern const struct target_desc *tdesc_s390_tevx_linux64;
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-sh-low.c ./gdb/gdbserver/linux-sh-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-sh-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-sh-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/SH specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,25 +58,19 @@ sh_cannot_fetch_register (int regno)
   return 0;
 }
 
-static CORE_ADDR
-sh_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  return pc;
-}
-
-static void
-sh_set_pc (struct regcache *regcache, CORE_ADDR pc)
-{
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
-}
-
 /* Correct in either endianness, obviously.  */
 static const unsigned short sh_breakpoint = 0xc3c3;
 #define sh_breakpoint_len 2
 
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+sh_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = sh_breakpoint_len;
+  return (const gdb_byte *) &sh_breakpoint;
+}
+
 static int
 sh_breakpoint_at (CORE_ADDR where)
 {
@@ -91,6 +85,14 @@ sh_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
+/* Support for hardware single step.  */
+
+static int
+sh_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 /* Provide only a fill function for the general register set.  ps_lgetregs
    will use this for NPTL support.  */
 
@@ -105,7 +107,7 @@ static void sh_fill_gregset (struct regc
 
 static struct regset_info sh_regsets[] = {
   { 0, 0, 0, 0, GENERAL_REGS, sh_fill_gregset, NULL },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info sh_regsets_info =
@@ -146,13 +148,34 @@ struct linux_target_ops the_low_target =
   sh_cannot_fetch_register,
   sh_cannot_store_register,
   NULL, /* fetch_register */
-  sh_get_pc,
-  sh_set_pc,
-  (const unsigned char *) &sh_breakpoint,
-  sh_breakpoint_len,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  sh_sw_breakpoint_from_kind,
   NULL,
   0,
   sh_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  sh_supports_hardware_single_step,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-sparc-low.c ./gdb/gdbserver/linux-sparc-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-sparc-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-sparc-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level interface to ptrace, for the remote server for GDB.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,7 @@
 #include "server.h"
 #include "linux-low.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 #include "gdb_proc_service.h"
 
@@ -223,23 +223,19 @@ sparc_store_fpregset (struct regcache *r
       supply_register (regcache, i, ((char *) buf) + sparc_regmap[i]);
 }
 
-extern int debug_threads;
-
-static CORE_ADDR
-sparc_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-  collect_register_by_name (regcache, "pc", &pc);
-  if (debug_threads)
-    debug_printf ("stop pc is %08lx\n", pc);
-  return pc;
-}
-
-static const unsigned char sparc_breakpoint[INSN_SIZE] = {
+static const gdb_byte sparc_breakpoint[INSN_SIZE] = {
   0x91, 0xd0, 0x20, 0x01
 };
 #define sparc_breakpoint_len INSN_SIZE
 
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const unsigned char *
+sparc_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = sparc_breakpoint_len;
+  return sparc_breakpoint;
+}
 
 static int
 sparc_breakpoint_at (CORE_ADDR where)
@@ -257,19 +253,6 @@ sparc_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
-/* We only place breakpoints in empty marker functions, and thread locking
-   is outside of the function.  So rather than importing software single-step,
-   we can just run until exit.  */
-static CORE_ADDR
-sparc_reinsert_addr (void)
-{
-  struct regcache *regcache = get_thread_regcache (current_thread, 1);
-  CORE_ADDR lr;
-  /* O7 is the equivalent to the 'lr' of other archs.  */
-  collect_register_by_name (regcache, "o7", &lr);
-  return lr;
-}
-
 static void
 sparc_arch_setup (void)
 {
@@ -283,7 +266,7 @@ static struct regset_info sparc_regsets[
   { PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0, sizeof (fpregset_t),
     FP_REGS,
     sparc_fill_fpregset, sparc_store_fpregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info sparc_regsets_info =
@@ -320,12 +303,12 @@ struct linux_target_ops the_low_target =
   sparc_cannot_fetch_register,
   sparc_cannot_store_register,
   NULL, /* fetch_register */
-  sparc_get_pc,
+  linux_get_pc_64bit,
   /* No sparc_set_pc is needed.  */
   NULL,
-  (const unsigned char *) sparc_breakpoint,
-  sparc_breakpoint_len,
-  sparc_reinsert_addr,
+  NULL, /* breakpoint_kind_from_pc */
+  sparc_sw_breakpoint_from_kind,
+  NULL, /* get_next_pcs */
   0,
   sparc_breakpoint_at,
   NULL,  /* supports_z_point_type */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-tic6x-low.c ./gdb/gdbserver/linux-tic6x-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-tic6x-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-tic6x-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target dependent code for GDB on TI C6x systems.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
    Contributed by Andrew Jenner <andrew@codesourcery.com>
    Contributed by Yao Qi <yao@codesourcery.com>
 
@@ -22,7 +22,7 @@
 #include "server.h"
 #include "linux-low.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <endian.h>
 
 #include "gdb_proc_service.h"
@@ -171,6 +171,16 @@ extern struct linux_target_ops the_low_t
 
 static int *tic6x_regmap;
 static unsigned int tic6x_breakpoint;
+#define tic6x_breakpoint_len 4
+
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+tic6x_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = tic6x_breakpoint_len;
+  return (const gdb_byte *) &tic6x_breakpoint;
+}
 
 /* Forward definition.  */
 static struct usrregs_info tic6x_usrregs_info;
@@ -247,8 +257,6 @@ tic6x_set_pc (struct regcache *regcache,
   supply_register_by_name (regcache, "PC", newpc.buf);
 }
 
-#define tic6x_breakpoint_len 4
-
 static int
 tic6x_breakpoint_at (CORE_ADDR where)
 {
@@ -266,7 +274,7 @@ tic6x_breakpoint_at (CORE_ADDR where)
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -324,7 +332,7 @@ tic6x_store_gregset (struct regcache *re
 static struct regset_info tic6x_regsets[] = {
   { PTRACE_GETREGS, PTRACE_SETREGS, 0, TIC6X_NUM_REGS * 4, GENERAL_REGS,
     tic6x_fill_gregset, tic6x_store_gregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static void
@@ -333,6 +341,14 @@ tic6x_arch_setup (void)
   current_process ()->tdesc = tic6x_read_description ();
 }
 
+/* Support for hardware single step.  */
+
+static int
+tic6x_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static struct regsets_info tic6x_regsets_info =
   {
     tic6x_regsets, /* regsets */
@@ -367,11 +383,32 @@ struct linux_target_ops the_low_target =
   NULL, /* fetch_register */
   tic6x_get_pc,
   tic6x_set_pc,
-  (const unsigned char *) &tic6x_breakpoint,
-  tic6x_breakpoint_len,
+  NULL, /* breakpoint_kind_from_pc */
+  tic6x_sw_breakpoint_from_kind,
   NULL,
   0,
   tic6x_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  tic6x_supports_hardware_single_step,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-tile-low.c ./gdb/gdbserver/linux-tile-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-tile-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-tile-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux/TILE-Gx specific low level interface, GDBserver.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,7 +21,7 @@
 #include "linux-low.h"
 
 #include <arch/abi.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 /* Defined in auto-generated file reg-tilegx.c.  */
 void init_registers_tilegx (void);
@@ -68,26 +68,18 @@ tile_cannot_store_register (int regno)
     return 1;
 }
 
-static CORE_ADDR
-tile_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
+static uint64_t tile_breakpoint = 0x400b3cae70166000ULL;
+#define tile_breakpoint_len 8
 
-  collect_register_by_name (regcache, "pc", &pc);
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-tile_set_pc (struct regcache *regcache, CORE_ADDR pc)
+static const gdb_byte *
+tile_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = tile_breakpoint_len;
+  return (const gdb_byte *) &tile_breakpoint;
 }
 
-static uint64_t tile_breakpoint = 0x400b3cae70166000ULL;
-#define tile_breakpoint_len 8
-
 static int
 tile_breakpoint_at (CORE_ADDR where)
 {
@@ -126,7 +118,7 @@ static struct regset_info tile_regsets[]
 {
   { PTRACE_GETREGS, PTRACE_SETREGS, 0, tile_num_regs * 8,
     GENERAL_REGS, tile_fill_gregset, tile_store_gregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static struct regsets_info tile_regsets_info =
@@ -172,6 +164,14 @@ tile_arch_setup (void)
     current_process ()->tdesc = tdesc_tilegx;
 }
 
+/* Support for hardware single step.  */
+
+static int
+tile_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 
 struct linux_target_ops the_low_target =
 {
@@ -180,13 +180,34 @@ struct linux_target_ops the_low_target =
   tile_cannot_fetch_register,
   tile_cannot_store_register,
   NULL,
-  tile_get_pc,
-  tile_set_pc,
-  (const unsigned char *) &tile_breakpoint,
-  tile_breakpoint_len,
+  linux_get_pc_64bit,
+  linux_set_pc_64bit,
+  NULL, /* breakpoint_kind_from_pc */
+  tile_sw_breakpoint_from_kind,
   NULL,
   0,
   tile_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  tile_supports_hardware_single_step,
 };
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-x86-low.c ./gdb/gdbserver/linux-x86-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-x86-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-x86-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux/x86-64 specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,11 @@
 #include "i387-fp.h"
 #include "x86-low.h"
 #include "x86-xstate.h"
+#include "nat/gdb_ptrace.h"
+
+#ifdef __x86_64__
+#include "nat/amd64-linux-siginfo.h"
+#endif
 
 #include "gdb_proc_service.h"
 /* Don't include elf/common.h if linux/elf.h got included by
@@ -40,57 +45,7 @@
 #include "nat/linux-nat.h"
 #include "nat/x86-linux.h"
 #include "nat/x86-linux-dregs.h"
-
-#ifdef __x86_64__
-/* Defined in auto-generated file amd64-linux.c.  */
-void init_registers_amd64_linux (void);
-extern const struct target_desc *tdesc_amd64_linux;
-
-/* Defined in auto-generated file amd64-avx-linux.c.  */
-void init_registers_amd64_avx_linux (void);
-extern const struct target_desc *tdesc_amd64_avx_linux;
-
-/* Defined in auto-generated file amd64-avx512-linux.c.  */
-void init_registers_amd64_avx512_linux (void);
-extern const struct target_desc *tdesc_amd64_avx512_linux;
-
-/* Defined in auto-generated file amd64-mpx-linux.c.  */
-void init_registers_amd64_mpx_linux (void);
-extern const struct target_desc *tdesc_amd64_mpx_linux;
-
-/* Defined in auto-generated file x32-linux.c.  */
-void init_registers_x32_linux (void);
-extern const struct target_desc *tdesc_x32_linux;
-
-/* Defined in auto-generated file x32-avx-linux.c.  */
-void init_registers_x32_avx_linux (void);
-extern const struct target_desc *tdesc_x32_avx_linux;
-
-/* Defined in auto-generated file x32-avx512-linux.c.  */
-void init_registers_x32_avx512_linux (void);
-extern const struct target_desc *tdesc_x32_avx512_linux;
-
-#endif
-
-/* Defined in auto-generated file i386-linux.c.  */
-void init_registers_i386_linux (void);
-extern const struct target_desc *tdesc_i386_linux;
-
-/* Defined in auto-generated file i386-mmx-linux.c.  */
-void init_registers_i386_mmx_linux (void);
-extern const struct target_desc *tdesc_i386_mmx_linux;
-
-/* Defined in auto-generated file i386-avx-linux.c.  */
-void init_registers_i386_avx_linux (void);
-extern const struct target_desc *tdesc_i386_avx_linux;
-
-/* Defined in auto-generated file i386-avx512-linux.c.  */
-void init_registers_i386_avx512_linux (void);
-extern const struct target_desc *tdesc_i386_avx512_linux;
-
-/* Defined in auto-generated file i386-mpx-linux.c.  */
-void init_registers_i386_mpx_linux (void);
-extern const struct target_desc *tdesc_i386_mpx_linux;
+#include "linux-x86-tdesc.h"
 
 #ifdef __x86_64__
 static struct target_desc *tdesc_amd64_linux_no_xml;
@@ -117,7 +72,7 @@ static const char *xmltarget_amd64_linux
 
 #include <sys/reg.h>
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/uio.h>
 
 #ifndef PTRACE_GET_THREAD_AREA
@@ -178,6 +133,11 @@ static const int x86_64_regmap[] =
   -1,
   -1, -1, -1, -1, -1, -1, -1, -1,
   ORIG_RAX * 8,
+#ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+  21 * 8,  22 * 8,
+#else
+  -1, -1,
+#endif
   -1, -1, -1, -1,			/* MPX registers BND0 ... BND3.  */
   -1, -1,				/* MPX registers BNDCFGU, BNDSTATUS.  */
   -1, -1, -1, -1, -1, -1, -1, -1,       /* xmm16 ... xmm31 (AVX512)  */
@@ -188,7 +148,8 @@ static const int x86_64_regmap[] =
   -1, -1, -1, -1, -1, -1, -1, -1,       /* zmm0 ... zmm31 (AVX512)  */
   -1, -1, -1, -1, -1, -1, -1, -1,
   -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1
+  -1, -1, -1, -1, -1, -1, -1, -1,
+  -1					/* pkru  */
 };
 
 #define X86_64_NUM_REGS (sizeof (x86_64_regmap) / sizeof (x86_64_regmap[0]))
@@ -231,7 +192,7 @@ is_64bit_tdesc (void)
 /* Called by libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
 #ifdef __x86_64__
@@ -351,6 +312,20 @@ x86_fill_gregset (struct regcache *regca
       for (i = 0; i < X86_64_NUM_REGS; i++)
 	if (x86_64_regmap[i] != -1)
 	  collect_register (regcache, i, ((char *) buf) + x86_64_regmap[i]);
+
+#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+      {
+        unsigned long base;
+        int lwpid = lwpid_of (current_thread);
+
+        collect_register_by_name (regcache, "fs_base", &base);
+        ptrace (PTRACE_ARCH_PRCTL, lwpid, &base, ARCH_SET_FS);
+
+        collect_register_by_name (regcache, "gs_base", &base);
+        ptrace (PTRACE_ARCH_PRCTL, lwpid, &base, ARCH_SET_GS);
+      }
+#endif
+
       return;
     }
 
@@ -377,6 +352,19 @@ x86_store_gregset (struct regcache *regc
       for (i = 0; i < X86_64_NUM_REGS; i++)
 	if (x86_64_regmap[i] != -1)
 	  supply_register (regcache, i, ((char *) buf) + x86_64_regmap[i]);
+
+#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+      {
+        unsigned long base;
+        int lwpid = lwpid_of (current_thread);
+
+        if (ptrace (PTRACE_ARCH_PRCTL, lwpid, &base, ARCH_GET_FS) == 0)
+          supply_register_by_name (regcache, "fs_base", &base);
+
+        if (ptrace (PTRACE_ARCH_PRCTL, lwpid, &base, ARCH_GET_GS) == 0)
+          supply_register_by_name (regcache, "gs_base", &base);
+      }
+#endif
       return;
     }
 #endif
@@ -462,7 +450,7 @@ static struct regset_info x86_regsets[] 
     FP_REGS,
     x86_fill_fpregset, x86_store_fpregset },
 #endif /* HAVE_PTRACE_GETREGS */
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 static CORE_ADDR
@@ -472,13 +460,15 @@ x86_get_pc (struct regcache *regcache)
 
   if (use_64bit)
     {
-      unsigned long pc;
+      uint64_t pc;
+
       collect_register_by_name (regcache, "rip", &pc);
       return (CORE_ADDR) pc;
     }
   else
     {
-      unsigned int pc;
+      uint32_t pc;
+
       collect_register_by_name (regcache, "eip", &pc);
       return (CORE_ADDR) pc;
     }
@@ -491,17 +481,19 @@ x86_set_pc (struct regcache *regcache, C
 
   if (use_64bit)
     {
-      unsigned long newpc = pc;
+      uint64_t newpc = pc;
+
       supply_register_by_name (regcache, "rip", &newpc);
     }
   else
     {
-      unsigned int newpc = pc;
+      uint32_t newpc = pc;
+
       supply_register_by_name (regcache, "eip", &newpc);
     }
 }
 
-static const unsigned char x86_breakpoint[] = { 0xCC };
+static const gdb_byte x86_breakpoint[] = { 0xCC };
 #define x86_breakpoint_len 1
 
 static int
@@ -669,407 +661,14 @@ x86_debug_reg_state (pid_t pid)
    as debugging it with a 32-bit GDBSERVER, we do the 32-bit <-> 64-bit
    conversion in-place ourselves.  */
 
-/* These types below (compat_*) define a siginfo type that is layout
-   compatible with the siginfo type exported by the 32-bit userspace
-   support.  */
-
-#ifdef __x86_64__
-
-typedef int compat_int_t;
-typedef unsigned int compat_uptr_t;
-
-typedef int compat_time_t;
-typedef int compat_timer_t;
-typedef int compat_clock_t;
-
-struct compat_timeval
-{
-  compat_time_t tv_sec;
-  int tv_usec;
-};
-
-typedef union compat_sigval
-{
-  compat_int_t sival_int;
-  compat_uptr_t sival_ptr;
-} compat_sigval_t;
-
-typedef struct compat_siginfo
-{
-  int si_signo;
-  int si_errno;
-  int si_code;
-
-  union
-  {
-    int _pad[((128 / sizeof (int)) - 3)];
-
-    /* kill() */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-    } _kill;
-
-    /* POSIX.1b timers */
-    struct
-    {
-      compat_timer_t _tid;
-      int _overrun;
-      compat_sigval_t _sigval;
-    } _timer;
-
-    /* POSIX.1b signals */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      compat_sigval_t _sigval;
-    } _rt;
-
-    /* SIGCHLD */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      int _status;
-      compat_clock_t _utime;
-      compat_clock_t _stime;
-    } _sigchld;
-
-    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
-    struct
-    {
-      unsigned int _addr;
-    } _sigfault;
-
-    /* SIGPOLL */
-    struct
-    {
-      int _band;
-      int _fd;
-    } _sigpoll;
-  } _sifields;
-} compat_siginfo_t;
-
-/* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes.  */
-typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
-
-typedef struct compat_x32_siginfo
-{
-  int si_signo;
-  int si_errno;
-  int si_code;
-
-  union
-  {
-    int _pad[((128 / sizeof (int)) - 3)];
-
-    /* kill() */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-    } _kill;
-
-    /* POSIX.1b timers */
-    struct
-    {
-      compat_timer_t _tid;
-      int _overrun;
-      compat_sigval_t _sigval;
-    } _timer;
-
-    /* POSIX.1b signals */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      compat_sigval_t _sigval;
-    } _rt;
-
-    /* SIGCHLD */
-    struct
-    {
-      unsigned int _pid;
-      unsigned int _uid;
-      int _status;
-      compat_x32_clock_t _utime;
-      compat_x32_clock_t _stime;
-    } _sigchld;
-
-    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
-    struct
-    {
-      unsigned int _addr;
-    } _sigfault;
-
-    /* SIGPOLL */
-    struct
-    {
-      int _band;
-      int _fd;
-    } _sigpoll;
-  } _sifields;
-} compat_x32_siginfo_t __attribute__ ((__aligned__ (8)));
-
-#define cpt_si_pid _sifields._kill._pid
-#define cpt_si_uid _sifields._kill._uid
-#define cpt_si_timerid _sifields._timer._tid
-#define cpt_si_overrun _sifields._timer._overrun
-#define cpt_si_status _sifields._sigchld._status
-#define cpt_si_utime _sifields._sigchld._utime
-#define cpt_si_stime _sifields._sigchld._stime
-#define cpt_si_ptr _sifields._rt._sigval.sival_ptr
-#define cpt_si_addr _sifields._sigfault._addr
-#define cpt_si_band _sifields._sigpoll._band
-#define cpt_si_fd _sifields._sigpoll._fd
-
-/* glibc at least up to 2.3.2 doesn't have si_timerid, si_overrun.
-   In their place is si_timer1,si_timer2.  */
-#ifndef si_timerid
-#define si_timerid si_timer1
-#endif
-#ifndef si_overrun
-#define si_overrun si_timer2
-#endif
-
-static void
-compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->cpt_si_timerid = from->si_timerid;
-      to->cpt_si_overrun = from->si_overrun;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_status = from->si_status;
-	  to->cpt_si_utime = from->si_utime;
-	  to->cpt_si_stime = from->si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->cpt_si_addr = (intptr_t) from->si_addr;
-	  break;
-	case SIGPOLL:
-	  to->cpt_si_band = from->si_band;
-	  to->cpt_si_fd = from->si_fd;
-	  break;
-	default:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_ptr = (intptr_t) from->si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->si_timerid = from->cpt_si_timerid;
-      to->si_overrun = from->cpt_si_overrun;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_status = from->cpt_si_status;
-	  to->si_utime = from->cpt_si_utime;
-	  to->si_stime = from->cpt_si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->si_addr = (void *) (intptr_t) from->cpt_si_addr;
-	  break;
-	case SIGPOLL:
-	  to->si_band = from->cpt_si_band;
-	  to->si_fd = from->cpt_si_fd;
-	  break;
-	default:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_ptr = (void* ) (intptr_t) from->cpt_si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to,
-				 siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->cpt_si_timerid = from->si_timerid;
-      to->cpt_si_overrun = from->si_overrun;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->cpt_si_pid = from->si_pid;
-      to->cpt_si_uid = from->si_uid;
-      to->cpt_si_ptr = (intptr_t) from->si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_status = from->si_status;
-	  to->cpt_si_utime = from->si_utime;
-	  to->cpt_si_stime = from->si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->cpt_si_addr = (intptr_t) from->si_addr;
-	  break;
-	case SIGPOLL:
-	  to->cpt_si_band = from->si_band;
-	  to->cpt_si_fd = from->si_fd;
-	  break;
-	default:
-	  to->cpt_si_pid = from->si_pid;
-	  to->cpt_si_uid = from->si_uid;
-	  to->cpt_si_ptr = (intptr_t) from->si_ptr;
-	  break;
-	}
-    }
-}
-
-static void
-siginfo_from_compat_x32_siginfo (siginfo_t *to,
-				 compat_x32_siginfo_t *from)
-{
-  memset (to, 0, sizeof (*to));
-
-  to->si_signo = from->si_signo;
-  to->si_errno = from->si_errno;
-  to->si_code = from->si_code;
-
-  if (to->si_code == SI_TIMER)
-    {
-      to->si_timerid = from->cpt_si_timerid;
-      to->si_overrun = from->cpt_si_overrun;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else if (to->si_code == SI_USER)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-    }
-  else if (to->si_code < 0)
-    {
-      to->si_pid = from->cpt_si_pid;
-      to->si_uid = from->cpt_si_uid;
-      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
-    }
-  else
-    {
-      switch (to->si_signo)
-	{
-	case SIGCHLD:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_status = from->cpt_si_status;
-	  to->si_utime = from->cpt_si_utime;
-	  to->si_stime = from->cpt_si_stime;
-	  break;
-	case SIGILL:
-	case SIGFPE:
-	case SIGSEGV:
-	case SIGBUS:
-	  to->si_addr = (void *) (intptr_t) from->cpt_si_addr;
-	  break;
-	case SIGPOLL:
-	  to->si_band = from->cpt_si_band;
-	  to->si_fd = from->cpt_si_fd;
-	  break;
-	default:
-	  to->si_pid = from->cpt_si_pid;
-	  to->si_uid = from->cpt_si_uid;
-	  to->si_ptr = (void* ) (intptr_t) from->cpt_si_ptr;
-	  break;
-	}
-    }
-}
-
-#endif /* __x86_64__ */
-
-/* Convert a native/host siginfo object, into/from the siginfo in the
+/* Convert a ptrace/host siginfo object, into/from the siginfo in the
    layout of the inferiors' architecture.  Returns true if any
    conversion was done; false otherwise.  If DIRECTION is 1, then copy
-   from INF to NATIVE.  If DIRECTION is 0, copy from NATIVE to
+   from INF to PTRACE.  If DIRECTION is 0, copy from PTRACE to
    INF.  */
 
 static int
-x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
+x86_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
 {
 #ifdef __x86_64__
   unsigned int machine;
@@ -1078,30 +677,12 @@ x86_siginfo_fixup (siginfo_t *native, vo
 
   /* Is the inferior 32-bit?  If so, then fixup the siginfo object.  */
   if (!is_64bit_tdesc ())
-    {
-      gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t));
-
-      if (direction == 0)
-	compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native);
-      else
-	siginfo_from_compat_siginfo (native, (struct compat_siginfo *) inf);
-
-      return 1;
-    }
+      return amd64_linux_siginfo_fixup_common (ptrace, inf, direction,
+					       FIXUP_32);
   /* No fixup for native x32 GDB.  */
   else if (!is_elf64 && sizeof (void *) == 8)
-    {
-      gdb_assert (sizeof (siginfo_t) == sizeof (compat_x32_siginfo_t));
-
-      if (direction == 0)
-	compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf,
-					 native);
-      else
-	siginfo_from_compat_x32_siginfo (native,
-					 (struct compat_x32_siginfo *) inf);
-
-      return 1;
-    }
+    return amd64_linux_siginfo_fixup_common (ptrace, inf, direction,
+					     FIXUP_X32);
 #endif
 
   return 0;
@@ -1141,9 +722,6 @@ int have_ptrace_getfpxregs =
 #endif
 ;
 
-/* Does the current host support PTRACE_GETREGSET?  */
-static int have_ptrace_getregset = -1;
-
 /* Get Linux/x86 target description from running target.  */
 
 static const struct target_desc *
@@ -1245,8 +823,14 @@ x86_linux_read_description (void)
 	    {
 	      switch (xcr0 & X86_XSTATE_ALL_MASK)
 	        {
-		case X86_XSTATE_AVX512_MASK:
-		  return tdesc_amd64_avx512_linux;
+		case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+		  return tdesc_amd64_avx_mpx_avx512_pku_linux;
+
+		case X86_XSTATE_AVX_AVX512_MASK:
+		  return tdesc_amd64_avx_avx512_linux;
+
+		case X86_XSTATE_AVX_MPX_MASK:
+		  return tdesc_amd64_avx_mpx_linux;
 
 		case X86_XSTATE_MPX_MASK:
 		  return tdesc_amd64_mpx_linux;
@@ -1267,8 +851,12 @@ x86_linux_read_description (void)
 	    {
 	      switch (xcr0 & X86_XSTATE_ALL_MASK)
 	        {
-		case X86_XSTATE_AVX512_MASK:
-		  return tdesc_x32_avx512_linux;
+		case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+		  /* No x32 MPX and PKU, fall back to avx_avx512.  */
+		  return tdesc_x32_avx_avx512_linux;
+
+		case X86_XSTATE_AVX_AVX512_MASK:
+		  return tdesc_x32_avx_avx512_linux;
 
 		case X86_XSTATE_MPX_MASK: /* No MPX on x32.  */
 		case X86_XSTATE_AVX_MASK:
@@ -1289,12 +877,18 @@ x86_linux_read_description (void)
 	{
 	  switch (xcr0 & X86_XSTATE_ALL_MASK)
 	    {
-	    case (X86_XSTATE_AVX512_MASK):
-	      return tdesc_i386_avx512_linux;
+	    case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+	      return tdesc_i386_avx_mpx_avx512_pku_linux;
+
+	    case (X86_XSTATE_AVX_AVX512_MASK):
+	      return tdesc_i386_avx_avx512_linux;
 
 	    case (X86_XSTATE_MPX_MASK):
 	      return tdesc_i386_mpx_linux;
 
+	    case (X86_XSTATE_AVX_MPX_MASK):
+	      return tdesc_i386_avx_mpx_linux;
+
 	    case (X86_XSTATE_AVX_MASK):
 	      return tdesc_i386_avx_linux;
 
@@ -1358,29 +952,35 @@ x86_linux_update_xmltarget (void)
    PTRACE_GETREGSET.  */
 
 static void
-x86_linux_process_qsupported (const char *query)
+x86_linux_process_qsupported (char **features, int count)
 {
+  int i;
+
   /* Return if gdb doesn't support XML.  If gdb sends "xmlRegisters="
      with "i386" in qSupported query, it supports x86 XML target
      descriptions.  */
   use_xml = 0;
-  if (query != NULL && startswith (query, "xmlRegisters="))
+  for (i = 0; i < count; i++)
     {
-      char *copy = xstrdup (query + 13);
-      char *p;
+      const char *feature = features[i];
 
-      for (p = strtok (copy, ","); p != NULL; p = strtok (NULL, ","))
+      if (startswith (feature, "xmlRegisters="))
 	{
-	  if (strcmp (p, "i386") == 0)
+	  char *copy = xstrdup (feature + 13);
+	  char *p;
+
+	  for (p = strtok (copy, ","); p != NULL; p = strtok (NULL, ","))
 	    {
-	      use_xml = 1;
-	      break;
+	      if (strcmp (p, "i386") == 0)
+		{
+		  use_xml = 1;
+		  break;
+		}
 	    }
-	} 
 
-      free (copy);
+	  free (copy);
+	}
     }
-
   x86_linux_update_xmltarget ();
 }
 
@@ -1434,6 +1034,25 @@ x86_arch_setup (void)
   current_process ()->tdesc = x86_linux_read_description ();
 }
 
+/* Fill *SYSNO and *SYSRET with the syscall nr trapped and the syscall return
+   code.  This should only be called if LWP got a SYSCALL_SIGTRAP.  */
+
+static void
+x86_get_syscall_trapinfo (struct regcache *regcache, int *sysno)
+{
+  int use_64bit = register_size (regcache->tdesc, 0) == 8;
+
+  if (use_64bit)
+    {
+      long l_sysno;
+
+      collect_register_by_name (regcache, "orig_rax", &l_sysno);
+      *sysno = (int) l_sysno;
+    }
+  else
+    collect_register_by_name (regcache, "orig_eax", sysno);
+}
+
 static int
 x86_supports_tracepoints (void)
 {
@@ -1516,10 +1135,10 @@ amd64_install_fast_tracepoint_jump_pad (
   buf[i++] = 0x41; buf[i++] = 0x51; /* push %r9 */
   buf[i++] = 0x41; buf[i++] = 0x50; /* push %r8 */
   buf[i++] = 0x9c; /* pushfq */
-  buf[i++] = 0x48; /* movl <addr>,%rdi */
+  buf[i++] = 0x48; /* movabs <addr>,%rdi */
   buf[i++] = 0xbf;
-  *((unsigned long *)(buf + i)) = (unsigned long) tpaddr;
-  i += sizeof (unsigned long);
+  memcpy (buf + i, &tpaddr, 8);
+  i += 8;
   buf[i++] = 0x57; /* push %rdi */
   append_insns (&buildaddr, i, buf);
 
@@ -2266,6 +1885,8 @@ amd64_emit_call (CORE_ADDR fn)
   else
     {
       int offset32 = offset64; /* we know we can't overflow here.  */
+
+      buf[i++] = 0xe8; /* call <reladdr> */
       memcpy (buf + i, &offset32, 4);
       i += 4;
     }
@@ -3245,12 +2866,70 @@ x86_emit_ops (void)
     return &i386_emit_ops;
 }
 
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+x86_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = x86_breakpoint_len;
+  return x86_breakpoint;
+}
+
 static int
 x86_supports_range_stepping (void)
 {
   return 1;
 }
 
+/* Implementation of linux_target_ops method "supports_hardware_single_step".
+ */
+
+static int
+x86_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
+static int
+x86_get_ipa_tdesc_idx (void)
+{
+  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+  const struct target_desc *tdesc = regcache->tdesc;
+
+#ifdef __x86_64__
+  if (tdesc == tdesc_amd64_linux || tdesc == tdesc_amd64_linux_no_xml
+      || tdesc == tdesc_x32_linux)
+    return X86_TDESC_SSE;
+  if (tdesc == tdesc_amd64_avx_linux || tdesc == tdesc_x32_avx_linux)
+    return X86_TDESC_AVX;
+  if (tdesc == tdesc_amd64_mpx_linux)
+    return X86_TDESC_MPX;
+  if (tdesc == tdesc_amd64_avx_mpx_linux)
+    return X86_TDESC_AVX_MPX;
+  if (tdesc == tdesc_amd64_avx_mpx_avx512_pku_linux || tdesc == tdesc_x32_avx_avx512_linux)
+    return X86_TDESC_AVX_MPX_AVX512_PKU;
+  if (tdesc == tdesc_amd64_avx_avx512_linux)
+    return X86_TDESC_AVX_AVX512;
+#endif
+
+  if (tdesc == tdesc_i386_mmx_linux)
+    return X86_TDESC_MMX;
+  if (tdesc == tdesc_i386_linux || tdesc == tdesc_i386_linux_no_xml)
+    return X86_TDESC_SSE;
+  if (tdesc == tdesc_i386_avx_linux)
+    return X86_TDESC_AVX;
+  if (tdesc == tdesc_i386_mpx_linux)
+    return X86_TDESC_MPX;
+  if (tdesc == tdesc_i386_avx_mpx_linux)
+    return X86_TDESC_AVX_MPX;
+  if (tdesc == tdesc_i386_avx_mpx_avx512_pku_linux)
+    return X86_TDESC_AVX_MPX_AVX512_PKU;
+  if (tdesc == tdesc_i386_avx_avx512_linux)
+    return X86_TDESC_AVX_AVX512;
+
+  return 0;
+}
+
 /* This is initialized assuming an amd64 target.
    x86_arch_setup will correct it for i386 or amd64 targets.  */
 
@@ -3263,8 +2942,8 @@ struct linux_target_ops the_low_target =
   NULL, /* fetch_register */
   x86_get_pc,
   x86_set_pc,
-  x86_breakpoint,
-  x86_breakpoint_len,
+  NULL, /* breakpoint_kind_from_pc */
+  x86_sw_breakpoint_from_kind,
   NULL,
   1,
   x86_breakpoint_at,
@@ -3291,6 +2970,10 @@ struct linux_target_ops the_low_target =
   x86_emit_ops,
   x86_get_min_fast_tracepoint_insn_len,
   x86_supports_range_stepping,
+  NULL, /* breakpoint_kind_from_current_state */
+  x86_supports_hardware_single_step,
+  x86_get_syscall_trapinfo,
+  x86_get_ipa_tdesc_idx,
 };
 
 void
@@ -3300,24 +2983,28 @@ initialize_low_arch (void)
 #ifdef __x86_64__
   init_registers_amd64_linux ();
   init_registers_amd64_avx_linux ();
-  init_registers_amd64_avx512_linux ();
   init_registers_amd64_mpx_linux ();
+  init_registers_amd64_avx_mpx_linux ();
+  init_registers_amd64_avx_avx512_linux ();
+  init_registers_amd64_avx_mpx_avx512_pku_linux ();
 
   init_registers_x32_linux ();
   init_registers_x32_avx_linux ();
-  init_registers_x32_avx512_linux ();
+  init_registers_x32_avx_avx512_linux ();
 
-  tdesc_amd64_linux_no_xml = xmalloc (sizeof (struct target_desc));
+  tdesc_amd64_linux_no_xml = XNEW (struct target_desc);
   copy_target_description (tdesc_amd64_linux_no_xml, tdesc_amd64_linux);
   tdesc_amd64_linux_no_xml->xmltarget = xmltarget_amd64_linux_no_xml;
 #endif
   init_registers_i386_linux ();
   init_registers_i386_mmx_linux ();
   init_registers_i386_avx_linux ();
-  init_registers_i386_avx512_linux ();
   init_registers_i386_mpx_linux ();
+  init_registers_i386_avx_mpx_linux ();
+  init_registers_i386_avx_avx512_linux ();
+  init_registers_i386_avx_mpx_avx512_pku_linux ();
 
-  tdesc_i386_linux_no_xml = xmalloc (sizeof (struct target_desc));
+  tdesc_i386_linux_no_xml = XNEW (struct target_desc);
   copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux);
   tdesc_i386_linux_no_xml->xmltarget = xmltarget_i386_linux_no_xml;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-x86-tdesc.h ./gdb/gdbserver/linux-x86-tdesc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-x86-tdesc.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gdbserver/linux-x86-tdesc.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,107 @@
+/* Low level support for x86 (i386 and x86-64), shared between gdbserver
+   and IPA.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64
+   vs x32), it's sufficient to pass only the register set here.  This,
+   together with the ABI known at IPA compile time, maps to a tdesc.  */
+
+enum x86_linux_tdesc {
+  X86_TDESC_MMX = 0,
+  X86_TDESC_SSE = 1,
+  X86_TDESC_AVX = 2,
+  X86_TDESC_MPX = 3,
+  X86_TDESC_AVX_MPX = 4,
+  X86_TDESC_AVX_AVX512 = 5,
+  X86_TDESC_AVX_MPX_AVX512_PKU = 6,
+};
+
+#ifdef __x86_64__
+
+#if defined __LP64__  || !defined IN_PROCESS_AGENT
+/* Defined in auto-generated file amd64-linux.c.  */
+void init_registers_amd64_linux (void);
+extern const struct target_desc *tdesc_amd64_linux;
+
+/* Defined in auto-generated file amd64-avx-linux.c.  */
+void init_registers_amd64_avx_linux (void);
+extern const struct target_desc *tdesc_amd64_avx_linux;
+
+/* Defined in auto-generated file amd64-avx-avx512-linux.c.  */
+void init_registers_amd64_avx_avx512_linux (void);
+extern const struct target_desc *tdesc_amd64_avx_avx512_linux;
+
+/* Defined in auto-generated file amd64-avx-mpx-avx512-pku-linux.c.  */
+void init_registers_amd64_avx_mpx_avx512_pku_linux (void);
+extern const struct target_desc *tdesc_amd64_avx_mpx_avx512_pku_linux;
+
+/* Defined in auto-generated file amd64-avx-mpx-linux.c.  */
+void init_registers_amd64_avx_mpx_linux (void);
+extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
+
+/* Defined in auto-generated file amd64-mpx-linux.c.  */
+void init_registers_amd64_mpx_linux (void);
+extern const struct target_desc *tdesc_amd64_mpx_linux;
+#endif
+
+#if defined __ILP32__ || !defined IN_PROCESS_AGENT
+/* Defined in auto-generated file x32-linux.c.  */
+void init_registers_x32_linux (void);
+extern const struct target_desc *tdesc_x32_linux;
+
+/* Defined in auto-generated file x32-avx-linux.c.  */
+void init_registers_x32_avx_linux (void);
+extern const struct target_desc *tdesc_x32_avx_linux;
+
+/* Defined in auto-generated file x32-avx-avx512-linux.c.  */
+void init_registers_x32_avx_avx512_linux (void);
+extern const struct target_desc *tdesc_x32_avx_avx512_linux;
+#endif
+
+#endif
+
+#if defined __i386__ || !defined IN_PROCESS_AGENT
+/* Defined in auto-generated file i386-linux.c.  */
+void init_registers_i386_linux (void);
+extern const struct target_desc *tdesc_i386_linux;
+
+/* Defined in auto-generated file i386-mmx-linux.c.  */
+void init_registers_i386_mmx_linux (void);
+extern const struct target_desc *tdesc_i386_mmx_linux;
+
+/* Defined in auto-generated file i386-avx-linux.c.  */
+void init_registers_i386_avx_linux (void);
+extern const struct target_desc *tdesc_i386_avx_linux;
+
+/* Defined in auto-generated file i386-avx-mpx-linux.c.  */
+void init_registers_i386_avx_mpx_linux (void);
+extern const struct target_desc *tdesc_i386_avx_mpx_linux;
+
+/* Defined in auto-generated file i386-avx-avx512-linux.c.  */
+void init_registers_i386_avx_avx512_linux (void);
+extern const struct target_desc *tdesc_i386_avx_avx512_linux;
+
+/* Defined in auto-generated file i386-avx-mpx-avx512-linux.c.  */
+void init_registers_i386_avx_mpx_avx512_pku_linux (void);
+extern const struct target_desc *tdesc_i386_avx_mpx_avx512_pku_linux;
+
+/* Defined in auto-generated file i386-mpx-linux.c.  */
+void init_registers_i386_mpx_linux (void);
+extern const struct target_desc *tdesc_i386_mpx_linux;
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-xtensa-low.c ./gdb/gdbserver/linux-xtensa-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/linux-xtensa-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/linux-xtensa-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux/Xtensa specific low level interface, for the remote server for GDB.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +26,8 @@ extern const struct target_desc *tdesc_x
 
 #include <asm/ptrace.h>
 #include <xtensa-config.h>
+#include "arch/xtensa.h"
+#include "gdb_proc_service.h"
 
 #include "xtensa-xtregs.c"
 
@@ -140,7 +142,7 @@ static struct regset_info xtensa_regsets
   { PTRACE_GETXTREGS, PTRACE_SETXTREGS, 0, XTENSA_ELF_XTREG_SIZE,
     EXTENDED_REGS,
     xtensa_fill_xtregset, xtensa_store_xtregset },
-  { 0, 0, 0, -1, -1, NULL, NULL }
+  NULL_REGSET
 };
 
 #if XCHAL_HAVE_BE
@@ -149,23 +151,16 @@ static struct regset_info xtensa_regsets
 #define XTENSA_BREAKPOINT {0x2d,0xf0}
 #endif
 
-static const unsigned char xtensa_breakpoint[] = XTENSA_BREAKPOINT;
+static const gdb_byte xtensa_breakpoint[] = XTENSA_BREAKPOINT;
 #define xtensa_breakpoint_len 2
 
-static CORE_ADDR
-xtensa_get_pc (struct regcache *regcache)
-{
-  unsigned long pc;
-
-  collect_register_by_name (regcache, "pc", &pc);
-  return pc;
-}
+/* Implementation of linux_target_ops method "sw_breakpoint_from_kind".  */
 
-static void
-xtensa_set_pc (struct regcache *regcache, CORE_ADDR pc)
+static const gdb_byte *
+xtensa_sw_breakpoint_from_kind (int kind, int *size)
 {
-  unsigned long newpc = pc;
-  supply_register_by_name (regcache, "pc", &newpc);
+  *size = xtensa_breakpoint_len;
+  return xtensa_breakpoint;
 }
 
 static int
@@ -179,6 +174,25 @@ xtensa_breakpoint_at (CORE_ADDR where)
 		  xtensa_breakpoint, xtensa_breakpoint_len) == 0;
 }
 
+/* Called by libthread_db.  */
+
+ps_err_e
+ps_get_thread_area (struct ps_prochandle *ph,
+                    lwpid_t lwpid, int idx, void **base)
+{
+  xtensa_elf_gregset_t regs;
+
+  if (ptrace (PTRACE_GETREGS, lwpid, NULL, &regs) != 0)
+    return PS_ERR;
+
+  /* IDX is the bias from the thread pointer to the beginning of the
+     thread descriptor.  It has to be subtracted due to implementation
+     quirks in libthread_db.  */
+  *base = (void *) ((char *) regs.threadptr - idx);
+
+  return PS_OK;
+}
+
 static struct regsets_info xtensa_regsets_info =
   {
     xtensa_regsets, /* regsets */
@@ -199,6 +213,14 @@ xtensa_arch_setup (void)
   current_process ()->tdesc = tdesc_xtensa;
 }
 
+/* Support for hardware single step.  */
+
+static int
+xtensa_supports_hardware_single_step (void)
+{
+  return 1;
+}
+
 static const struct regs_info *
 xtensa_regs_info (void)
 {
@@ -211,13 +233,34 @@ struct linux_target_ops the_low_target =
   0,
   0,
   NULL, /* fetch_register */
-  xtensa_get_pc,
-  xtensa_set_pc,
-  xtensa_breakpoint,
-  xtensa_breakpoint_len,
+  linux_get_pc_32bit,
+  linux_set_pc_32bit,
+  NULL, /* breakpoint_kind_from_pc */
+  xtensa_sw_breakpoint_from_kind,
   NULL,
   0,
   xtensa_breakpoint_at,
+  NULL, /* supports_z_point_type */
+  NULL, /* insert_point */
+  NULL, /* remove_point */
+  NULL, /* stopped_by_watchpoint */
+  NULL, /* stopped_data_address */
+  NULL, /* collect_ptrace_register */
+  NULL, /* supply_ptrace_register */
+  NULL, /* siginfo_fixup */
+  NULL, /* new_process */
+  NULL, /* new_thread */
+  NULL, /* new_fork */
+  NULL, /* prepare_to_resume */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* get_thread_area */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* supports_range_stepping */
+  NULL, /* breakpoint_kind_from_current_state */
+  xtensa_supports_hardware_single_step,
 };
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-i386-low.c ./gdb/gdbserver/lynx-i386-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-i386-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/lynx-i386-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-low.c ./gdb/gdbserver/lynx-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/lynx-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -218,7 +218,7 @@ lynx_add_process (int pid, int attached)
 
   proc = add_process (pid, attached);
   proc->tdesc = lynx_tdesc;
-  proc->priv = xcalloc (1, sizeof (*proc->priv));
+  proc->priv = XCNEW (struct process_info_private);
   proc->priv->last_wait_event_ptid = null_ptid;
 
   return proc;
@@ -343,7 +343,7 @@ lynx_resume (struct thread_resume *resum
   if (ptid_equal (ptid, minus_one_ptid))
     ptid = thread_to_gdb_id (current_thread);
 
-  regcache_invalidate ();
+  regcache_invalidate_pid (ptid_get_pid (ptid));
 
   errno = 0;
   lynx_ptrace (request, ptid, 1, signal, 0);
@@ -546,16 +546,36 @@ lynx_detach (int pid)
   return 0;
 }
 
+/* A callback for find_inferior which removes from the thread list
+   all threads belonging to process PROC.  */
+
+static int
+lynx_delete_thread_callback (struct inferior_list_entry *entry, void *proc)
+{
+  struct process_info *process = (struct process_info *) proc;
+
+  if (ptid_get_pid (entry->id) == pid_of (process))
+    {
+      struct thread_info *thr = find_thread_ptid (entry->id);
+
+      remove_thread (thr);
+    }
+
+  return 0;
+}
+
 /* Implement the mourn target_ops method.  */
 
 static void
 lynx_mourn (struct process_info *proc)
 {
+  find_inferior (&all_threads, lynx_delete_thread_callback, proc);
+
   /* Free our private data.  */
   free (proc->priv);
   proc->priv = NULL;
 
-  clear_inferiors ();
+  remove_process (proc);
 }
 
 /* Implement the join target_ops method.  */
@@ -713,7 +733,7 @@ lynx_write_memory (CORE_ADDR memaddr, co
 static void
 lynx_request_interrupt (void)
 {
-  ptid_t inferior_ptid = thread_to_gdb_id (current_thread);
+  ptid_t inferior_ptid = thread_to_gdb_id (get_first_thread ());
 
   kill (lynx_ptid_get_pid (inferior_ptid), SIGINT);
 }
@@ -722,6 +742,7 @@ lynx_request_interrupt (void)
 
 static struct target_ops lynx_target_ops = {
   lynx_create_inferior,
+  NULL,  /* post_create_inferior */
   lynx_attach,
   lynx_kill,
   lynx_detach,
@@ -746,10 +767,7 @@ static struct target_ops lynx_target_ops
   NULL,  /* supports_stopped_by_sw_breakpoint */
   NULL,  /* stopped_by_hw_breakpoint */
   NULL,  /* supports_stopped_by_hw_breakpoint */
-  /* Although lynx has hardware single step, still disable this
-     feature for lynx, because it is implemented in linux-low.c instead
-     of in generic code.  */
-  NULL,  /* supports_conditional_breakpoints */
+  target_can_do_hardware_single_step,
   NULL,  /* stopped_by_watchpoint */
   NULL,  /* stopped_data_address */
   NULL,  /* read_offsets */
@@ -764,6 +782,7 @@ static struct target_ops lynx_target_ops
   NULL,  /* supports_multi_process */
   NULL,  /* supports_fork_events */
   NULL,  /* supports_vfork_events */
+  NULL,  /* supports_exec_events */
   NULL,  /* handle_new_gdb_connection */
   NULL,  /* handle_monitor_command */
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-low.h ./gdb/gdbserver/lynx-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/lynx-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-ppc-low.c ./gdb/gdbserver/lynx-ppc-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/lynx-ppc-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/lynx-ppc-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/Makefile.in ./gdb/gdbserver/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2015 Free Software Foundation, Inc.
+# Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -15,6 +15,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Please keep lists in this file sorted alphabetically, with one item per line.
+# See gdb/Makefile.in for guidelines on ordering files and directories.
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
@@ -49,11 +52,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 RANLIB = @RANLIB@
 
-# The name of the compiler to use.
-COMPILER = @COMPILER@
-
 CC = @CC@
 CXX = @CXX@
+CXX_DIALECT = @CXX_DIALECT@
 AR = @AR@
 AR_FLAGS = rc
 
@@ -64,7 +65,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
-COMPILE.pre = $(COMPILER)
+COMPILE.pre = $(CXX) $(CXX_DIALECT)
 COMPILE.post = -c -o $@
 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
@@ -72,8 +73,8 @@ POSTCOMPILE = @true
 # Directory containing source files.  Don't clean up the spacing,
 # this exact string is matched for by the "configure" script.
 srcdir = @srcdir@
-abs_top_srcdir=@abs_top_srcdir@
-abs_srcdir=@abs_srcdir@
+abs_top_srcdir = @abs_top_srcdir@
+abs_srcdir = @abs_srcdir@
 VPATH = @srcdir@
 
 # It is also possible that you will need to add -I/usr/include/sys to the
@@ -82,11 +83,11 @@ VPATH = @srcdir@
 
 # Set this up with gcc if you have gnu ld and the loader will print out
 # line numbers for undefinded refs.
-#CC_LD=gcc -static
-CC_LD=$(COMPILER)
+#CC_LD = g++ -static
+CC_LD = $(CXX) $(CXX_DIALECT)
 
 # Where is the "include" directory?  Traditionally ../include or ./include
-INCLUDE_DIR =  ${srcdir}/../../include
+INCLUDE_DIR = ${srcdir}/../../include
 INCLUDE_DEP = $$(INCLUDE_DIR)
 
 LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
@@ -129,16 +130,17 @@ WERROR_CFLAGS = @WERROR_CFLAGS@
 WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
 		   | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
 
-# CFLAGS is specifically reserved for setting from the command line
+# These are specifically reserved for setting from the command line
 # when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
 CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
 CPPFLAGS = @CPPFLAGS@
 
 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
-INTERNAL_CFLAGS_BASE =  ${CFLAGS} ${GLOBAL_CFLAGS} \
+INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
 	${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
-INTERNAL_WARN_CFLAGS =  ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
-INTERNAL_CFLAGS =  ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
+INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
 
 # LDFLAGS is specifically reserved for setting from the command line
 # when running make.
@@ -147,40 +149,74 @@ INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
 
 # All source files that go into linking GDB remote server.
 
-SFILES=	$(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \
-	$(srcdir)/mem-break.c $(srcdir)/proc-service.c \
-	$(srcdir)/proc-service.list $(srcdir)/regcache.c \
-	$(srcdir)/remote-utils.c $(srcdir)/server.c $(srcdir)/target.c \
-	$(srcdir)/thread-db.c $(srcdir)/utils.c $(srcdir)/debug.c \
+SFILES = \
+	$(srcdir)/debug.c \
+	$(srcdir)/dll.c \
+	$(srcdir)/gdbreplay.c \
+	$(srcdir)/hostio.c \
+	$(srcdir)/hostio-errno.c \
+	$(srcdir)/i387-fp.c \
+	$(srcdir)/inferiors.c \
 	$(srcdir)/linux-aarch64-low.c \
-	$(srcdir)/linux-arm-low.c $(srcdir)/linux-bfin-low.c \
-	$(srcdir)/linux-cris-low.c $(srcdir)/linux-crisv32-low.c \
-	${srcdir}/x86-low.c $(srcdir)/i387-fp.c \
-	$(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
+	$(srcdir)/linux-arm-low.c \
+	$(srcdir)/linux-bfin-low.c \
+	$(srcdir)/linux-cris-low.c \
+	$(srcdir)/linux-crisv32-low.c \
+	$(srcdir)/linux-ia64-low.c \
+	$(srcdir)/linux-low.c \
 	$(srcdir)/linux-m32r-low.c \
-	$(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
+	$(srcdir)/linux-m68k-low.c \
+	$(srcdir)/linux-mips-low.c \
 	$(srcdir)/linux-nios2-low.c \
-	$(srcdir)/linux-ppc-low.c $(srcdir)/nat/ppc-linux.c \
+	$(srcdir)/linux-ppc-low.c \
 	$(srcdir)/linux-s390-low.c \
-	$(srcdir)/linux-sh-low.c $(srcdir)/linux-sparc-low.c \
+	$(srcdir)/linux-sh-low.c \
+	$(srcdir)/linux-sparc-low.c \
+	$(srcdir)/linux-tile-low.c \
 	$(srcdir)/linux-x86-low.c \
 	$(srcdir)/linux-xtensa-low.c \
-	$(srcdir)/linux-tile-low.c \
-	$(srcdir)/win32-arm-low.c $(srcdir)/win32-i386-low.c \
-	$(srcdir)/win32-low.c $(srcdir)/wincecompat.c \
-	$(srcdir)/hostio.c $(srcdir)/hostio-errno.c \
-	$(srcdir)/common/vec.c $(srcdir)/common/gdb_vecs.c \
-	$(srcdir)/common/common-utils.c $(srcdir)/common/xml-utils.c \
-	$(srcdir)/nat/linux-osdata.c $(srcdir)/common/ptid.c \
-	$(srcdir)/nat/linux-personality.c \
-	$(srcdir)/common/buffer.c $(srcdir)/nat/linux-btrace.c \
-	$(srcdir)/common/filestuff.c $(srcdir)/target/waitstatus.c \
-	$(srcdir)/nat/mips-linux-watch.c $(srcdir)/common/print-utils.c \
-	$(srcdir)/common/rsp-low.c $(srcdir)/common/errors.c \
-	$(srcdir)/common/common-debug.c $(srcdir)/common/cleanups.c \
-	$(srcdir)/common/common-exceptions.c $(srcdir)/symbol.c \
+	$(srcdir)/mem-break.c \
+	$(srcdir)/proc-service.c \
+	$(srcdir)/proc-service.list \
+	$(srcdir)/regcache.c \
+	$(srcdir)/remote-utils.c \
+	$(srcdir)/server.c \
+	$(srcdir)/symbol.c \
+	$(srcdir)/target.c \
+	$(srcdir)/thread-db.c \
+	$(srcdir)/utils.c \
+	$(srcdir)/win32-arm-low.c \
+	$(srcdir)/win32-i386-low.c \
+	$(srcdir)/win32-low.c \
+	$(srcdir)/wincecompat.c \
+	$(srcdir)/x86-low.c \
+	$(srcdir)/arch/arm.c \
+	$(srcdir)/arch/arm-get-next-pcs.c \
+	$(srcdir)/arch/arm-linux.c \
 	$(srcdir)/common/btrace-common.c \
-	$(srcdir)/common/fileio.c $(srcdir)/nat/linux-namespaces.c
+	$(srcdir)/common/buffer.c \
+	$(srcdir)/common/cleanups.c \
+	$(srcdir)/common/common-debug.c \
+	$(srcdir)/common/common-exceptions.c \
+	$(srcdir)/common/common-regcache.c \
+	$(srcdir)/common/common-utils.c \
+	$(srcdir)/common/errors.c \
+	$(srcdir)/common/fileio.c \
+	$(srcdir)/common/filestuff.c \
+	$(srcdir)/common/gdb_vecs.c \
+	$(srcdir)/common/new-op.c \
+	$(srcdir)/common/print-utils.c \
+	$(srcdir)/common/ptid.c \
+	$(srcdir)/common/rsp-low.c \
+	$(srcdir)/common/vec.c \
+	$(srcdir)/common/xml-utils.c \
+	$(srcdir)/nat/linux-btrace.c \
+	$(srcdir)/nat/linux-namespaces.c \
+	$(srcdir)/nat/linux-osdata.c \
+	$(srcdir)/nat/linux-personality.c \
+	$(srcdir)/nat/mips-linux-watch.c \
+	$(srcdir)/nat/ppc-linux.c \
+	$(srcdir)/target/waitstatus.c
 
 DEPFILES = @GDBSERVER_DEPFILES@
 
@@ -189,13 +225,50 @@ LIBOBJS = @LIBOBJS@
 SOURCES = $(SFILES)
 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
 
-OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \
-      target.o waitstatus.o utils.o debug.o version.o vec.o gdb_vecs.o \
-      mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \
-      common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \
-      tdesc.o print-utils.o rsp-low.o errors.o common-debug.o cleanups.o \
-      common-exceptions.o symbol.o btrace-common.o fileio.o \
-      $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS)
+OBS = \
+	agent.o \
+	ax.o \
+	btrace-common.o \
+	buffer.o \
+	cleanups.o \
+	common-debug.o \
+	common-exceptions.o \
+	common-regcache.o \
+	common-utils.o \
+	debug.o \
+	dll.o \
+	errors.o \
+	event-loop.o \
+	fileio.o \
+	filestuff.o \
+	format.o \
+	gdb_vecs.o \
+	hostio.o \
+	inferiors.o \
+	mem-break.o \
+	new-op.o \
+	notif.o \
+	print-utils.o \
+	ptid.o \
+	regcache.o \
+	remote-utils.o \
+	rsp-low.o \
+	server.o \
+	signals.o \
+	signals-state-save-restore.o \
+	symbol.o \
+	target.o \
+	tdesc.o \
+	tracepoint.o \
+	utils.o \
+	vec.o \
+	version.o \
+	waitstatus.o \
+	xml-utils.o \
+	$(DEPFILES) \
+	$(LIBOBJS) \
+	$(XML_BUILTIN)
+
 GDBREPLAY_OBS = gdbreplay.o version.o
 GDBSERVER_LIBS = @GDBSERVER_LIBS@
 XM_CLIBS = @LIBS@
@@ -253,7 +326,7 @@ FLAGS_TO_PASS = \
 # All generated files which can be included by another file.
 generated_files = config.h $(GNULIB_H)
 
-.c.o:
+%.o: %.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -313,16 +386,16 @@ gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(L
 	$(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
 	  $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY)
 
-IPA_OBJS=ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o \
+IPA_OBJS = ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o \
 	regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o \
 	tdesc-ipa.o print-utils-ipa.o rsp-low-ipa.o errors-ipa.o \
 	${IPA_DEPFILES}
 
-IPA_LIB=libinproctrace.so
+IPA_LIB = libinproctrace.so
 
 $(IPA_LIB): $(IPA_OBJS) ${ADD_DEPS} ${CDEPS}
 	rm -f $(IPA_LIB)
-	$(CC_LD) -shared -fPIC -Wl,--no-undefined $(INTERNAL_CFLAGS) \
+	$(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) -Wl,--no-undefined $(INTERNAL_CFLAGS) \
 	$(INTERNAL_LDFLAGS) -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
 
 # Put the proper machine-specific files first, so M-. on a machine
@@ -371,14 +444,18 @@ clean:
 	rm -f xml-builtin.c stamp-xml
 	rm -f i386-avx.c i386-avx-linux.c
 	rm -f i386-mpx.c i386-mpx-linux.c
-	rm -f i386-avx512.c i386-avx512-linux.c
+	rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
+	rm -f i386-avx-avx512.c i386-avx-avx512-linux.c
+	rm -f i386-avx-mpx-avx512-pku.c i386-avx-mpx-avx512-pku-linux.c
 	rm -f amd64-avx.c amd64-avx-linux.c
 	rm -f amd64-mpx.c amd64-mpx-linux.c
-	rm -f amd64-avx512.c amd64-avx512-linux.c
+	rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
+	rm -f amd64-avx-avx512.c amd64-avx-avx512-linux.c
+	rm -f amd64-avx-mpx-avx512-pku.c amd64-avx-mpx-avx512-pku-linux.c
 	rm -f i386-mmx.c i386-mmx-linux.c
 	rm -f x32.c x32-linux.c
 	rm -f x32-avx.c x32-avx-linux.c
-	rm -f x32-avx512.c x32-avx512-linux.c
+	rm -f x32-avx-avx512.c x32-avx-avx512-linux.c
 	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 maintainer-clean realclean distclean: clean
@@ -451,7 +528,7 @@ stamp-xml: $(XML_DIR)/feature_to_c.sh Ma
 # GNU Make 3.63 has a different problem: it keeps tacking command line
 # overrides onto the definition of $(MAKE).  This variable setting
 # will remove them.
-MAKEOVERRIDES=
+MAKEOVERRIDES =
 
 regdat_sh = $(srcdir)/../regformats/regdat.sh
 
@@ -490,6 +567,24 @@ regcache-ipa.o: regcache.c
 i386-linux-ipa.o: i386-linux.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
+i386-mmx-linux-ipa.o: i386-mmx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+i386-avx-linux-ipa.o: i386-avx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+i386-mpx-linux-ipa.o: i386-mpx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
 linux-i386-ipa.o: linux-i386-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
@@ -499,6 +594,123 @@ linux-amd64-ipa.o: linux-amd64-ipa.c
 amd64-linux-ipa.o: amd64-linux.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
+amd64-avx-linux-ipa.o: amd64-avx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+linux-aarch64-ipa.o: linux-aarch64-ipa.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+aarch64-ipa.o: aarch64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+linux-s390-ipa.o: linux-s390-ipa.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux32-ipa.o: s390-linux32.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux32v1-ipa.o: s390-linux32v1.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux32v2-ipa.o: s390-linux32v2.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux64-ipa.o: s390-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux64v1-ipa.o: s390-linux64v1.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-linux64v2-ipa.o: s390-linux64v2.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-te-linux64-ipa.o: s390-te-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-vx-linux64-ipa.o: s390-vx-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390-tevx-linux64-ipa.o: s390-tevx-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-linux64-ipa.o: s390x-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-linux64v1-ipa.o: s390x-linux64v1.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-linux64v2-ipa.o: s390x-linux64v2.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-te-linux64-ipa.o: s390x-te-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-vx-linux64-ipa.o: s390x-vx-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+linux-ppc-ipa.o: linux-ppc-ipa.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-32l-ipa.o: powerpc-32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-altivec32l-ipa.o: powerpc-altivec32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-cell32l-ipa.o: powerpc-cell32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-vsx32l-ipa.o: powerpc-vsx32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-e500l-ipa.o: powerpc-e500l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-64l-ipa.o: powerpc-64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-altivec64l-ipa.o: powerpc-altivec64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-cell64l-ipa.o: powerpc-cell64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-vsx64l-ipa.o: powerpc-vsx64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
 tdesc-ipa.o: tdesc.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
@@ -511,6 +723,15 @@ rsp-low-ipa.o: ../common/rsp-low.c
 errors-ipa.o: ../common/errors.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
+x32-linux-ipa.o: x32-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+x32-avx-linux-ipa.o: x32-avx-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+x32-avx512-linux-ipa.o: x32-avx512-linux.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
 
 ax.o: ax.c
 	$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
@@ -576,12 +797,36 @@ waitstatus.o: ../target/waitstatus.c
 fileio.o: ../common/fileio.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
+common-regcache.o: ../common/common-regcache.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+signals-state-save-restore.o: ../common/signals-state-save-restore.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+new-op.o: ../common/new-op.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+# Arch object files rules form ../arch
+
+arm.o: ../arch/arm.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+arm-linux.o: ../arch/arm-linux.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
 
 # Native object files rules from ../nat
 
 x86-dregs.o: ../nat/x86-dregs.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
+amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
 linux-btrace.o: ../nat/linux-btrace.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
@@ -606,6 +851,12 @@ ppc-linux.o: ../nat/ppc-linux.c
 linux-personality.o: ../nat/linux-personality.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
+aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+aarch64-linux.o: ../nat/aarch64-linux.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
 btrace-common.o: ../common/btrace-common.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
@@ -619,18 +870,24 @@ linux-namespaces.o: ../nat/linux-namespa
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
+# Architecture specific object files rules from ../arch
+
+aarch64-insn.o: ../arch/aarch64-insn.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
 aarch64.c : $(srcdir)/../regformats/aarch64.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/aarch64.dat aarch64.c
 reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
-arm-with-iwmmxt.c : $(srcdir)/../regformats/arm-with-iwmmxt.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-iwmmxt.dat arm-with-iwmmxt.c
-arm-with-vfpv2.c : $(srcdir)/../regformats/arm-with-vfpv2.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-vfpv2.dat arm-with-vfpv2.c
-arm-with-vfpv3.c : $(srcdir)/../regformats/arm-with-vfpv3.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-vfpv3.dat arm-with-vfpv3.c
-arm-with-neon.c : $(srcdir)/../regformats/arm-with-neon.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-neon.dat arm-with-neon.c
+arm-with-iwmmxt.c : $(srcdir)/../regformats/arm/arm-with-iwmmxt.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-iwmmxt.dat arm-with-iwmmxt.c
+arm-with-vfpv2.c : $(srcdir)/../regformats/arm/arm-with-vfpv2.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-vfpv2.dat arm-with-vfpv2.c
+arm-with-vfpv3.c : $(srcdir)/../regformats/arm/arm-with-vfpv3.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-vfpv3.dat arm-with-vfpv3.c
+arm-with-neon.c : $(srcdir)/../regformats/arm/arm-with-neon.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-neon.dat arm-with-neon.c
 reg-bfin.c : $(srcdir)/../regformats/reg-bfin.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-bfin.dat reg-bfin.c
 reg-cris.c : $(srcdir)/../regformats/reg-cris.dat $(regdat_sh)
@@ -645,14 +902,22 @@ i386-avx.c : $(srcdir)/../regformats/i38
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx.dat i386-avx.c
 i386-avx-linux.c : $(srcdir)/../regformats/i386/i386-avx-linux.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-linux.dat i386-avx-linux.c
-i386-avx512.c : $(srcdir)/../regformats/i386/i386-avx512.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx512.dat i386-avx512.c
-i386-avx512-linux.c : $(srcdir)/../regformats/i386/i386-avx512-linux.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx512-linux.dat i386-avx512-linux.c
+i386-avx-avx512.c : $(srcdir)/../regformats/i386/i386-avx-avx512.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-avx512.dat i386-avx-avx512.c
+i386-avx-avx512-linux.c : $(srcdir)/../regformats/i386/i386-avx-avx512-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-avx512-linux.dat i386-avx-avx512-linux.c
 i386-mpx.c : $(srcdir)/../regformats/i386/i386-mpx.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c
 i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c
+i386-avx-mpx-avx512-pku.c : $(srcdir)/../regformats/i386/i386-avx-mpx-avx512-pku.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-avx512-pku.dat i386-avx-mpx-avx512-pku.c
+i386-avx-mpx-avx512-pku-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-avx512-pku-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-avx512-pku-linux.dat i386-avx-mpx-avx512-pku-linux.c
+i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c
+i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c
 i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
 i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
@@ -759,14 +1024,22 @@ amd64-avx.c : $(srcdir)/../regformats/i3
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx.dat amd64-avx.c
 amd64-avx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-linux.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-linux.dat amd64-avx-linux.c
-amd64-avx512.c : $(srcdir)/../regformats/i386/amd64-avx512.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx512.dat amd64-avx512.c
-amd64-avx512-linux.c : $(srcdir)/../regformats/i386/amd64-avx512-linux.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx512-linux.dat amd64-avx512-linux.c
+amd64-avx-avx512.c : $(srcdir)/../regformats/i386/amd64-avx-avx512.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-avx512.dat amd64-avx-avx512.c
+amd64-avx-avx512-linux.c : $(srcdir)/../regformats/i386/amd64-avx-avx512-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-avx512-linux.dat amd64-avx-avx512-linux.c
 amd64-mpx.c : $(srcdir)/../regformats/i386/amd64-mpx.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c
 amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c
+amd64-avx-mpx-avx512-pku.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-avx512-pku.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-avx512-pku.dat amd64-avx-mpx-avx512-pku.c
+amd64-avx-mpx-avx512-pku-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat amd64-avx-mpx-avx512-pku-linux.c
+amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c
+amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c
 x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
 x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
@@ -775,10 +1048,10 @@ x32-avx.c : $(srcdir)/../regformats/i386
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx.dat x32-avx.c
 x32-avx-linux.c : $(srcdir)/../regformats/i386/x32-avx-linux.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx-linux.dat x32-avx-linux.c
-x32-avx512.c : $(srcdir)/../regformats/i386/x32-avx512.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx512.dat x32-avx512.c
-x32-avx512-linux.c : $(srcdir)/../regformats/i386/x32-avx512-linux.dat $(regdat_sh)
-	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx512-linux.dat x32-avx512-linux.c
+x32-avx-avx512.c : $(srcdir)/../regformats/i386/x32-avx-avx512.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx-avx512.dat x32-avx-avx512.c
+x32-avx-avx512-linux.c : $(srcdir)/../regformats/i386/x32-avx-avx512-linux.dat $(regdat_sh)
+	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx-avx512-linux.dat x32-avx-avx512-linux.c
 reg-xtensa.c : $(srcdir)/../regformats/reg-xtensa.dat $(regdat_sh)
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-xtensa.dat reg-xtensa.c
 reg-tilegx.c : $(srcdir)/../regformats/reg-tilegx.dat $(regdat_sh)
@@ -787,41 +1060,42 @@ reg-tilegx32.c : $(srcdir)/../regformats
 	$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-tilegx32.dat reg-tilegx32.c
 
 #
-# Dependency tracking.  Most of this is conditional on GNU Make being
-# found by configure; if GNU Make is not found, we fall back to a
-# simpler scheme.
+# Dependency tracking.
 #
 
-@GMAKE_TRUE@ifeq ($(DEPMODE),depmode=gcc3)
+ifeq ($(DEPMODE),depmode=gcc3)
 # Note that we put the dependencies into a .Tpo file, then move them
 # into place if the compile succeeds.  We need this because gcc does
 # not atomically write the dependency output file.
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
-@GMAKE_TRUE@	-MF $(DEPDIR)/$(basename $(@F)).Tpo
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
-@GMAKE_TRUE@	$(DEPDIR)/$(basename $(@F)).Po
-@GMAKE_TRUE@else
-@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
-@GMAKE_TRUE@	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
+	-MF $(DEPDIR)/$(basename $(@F)).Tpo
+override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
+	$(DEPDIR)/$(basename $(@F)).Po
+else
+override COMPILE.pre = source='$<' object='$@' libtool=no \
+	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
 # depcomp handles atomicity for us, so we don't need a postcompile
 # step.
-@GMAKE_TRUE@override POSTCOMPILE =
-@GMAKE_TRUE@endif
+override POSTCOMPILE =
+endif
 
 # A list of all the objects we might care about in this build, for
 # dependency tracking.
-all_object_files = $(OBS) $(GDBREPLAY_OBS)
+all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
 
 # Ensure that generated files are created early.  Use order-only
 # dependencies if available.  They require GNU make 3.80 or newer,
 # and the .VARIABLES variable was introduced at the same time.
-@GMAKE_TRUE@ifdef .VARIABLES
-@GMAKE_TRUE@$(all_object_files): | $(generated_files)
-@GMAKE_TRUE@else
+ifdef .VARIABLES
+$(all_object_files): | $(generated_files)
+else
 $(all_object_files) : $(generated_files)
-@GMAKE_TRUE@endif
+endif
 
 # Dependencies.
-@GMAKE_TRUE@-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
+-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk
 
 # This is the end of "Makefile.in".
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/mem-break.c ./gdb/gdbserver/mem-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/mem-break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/mem-break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Memory breakpoint operations for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -21,8 +21,6 @@
 #include "server.h"
 #include "regcache.h"
 #include "ax.h"
-const unsigned char *breakpoint_data;
-int breakpoint_len;
 
 #define MAX_BREAKPOINT_LEN 8
 
@@ -100,8 +98,13 @@ struct raw_breakpoint
      breakpoint for a given PC.  */
   CORE_ADDR pc;
 
-  /* The breakpoint's size.  */
-  int size;
+  /* The breakpoint's kind.  This is target specific.  Most
+     architectures only use one specific instruction for breakpoints, while
+     others may use more than one.  E.g., on ARM, we need to use different
+     breakpoint instructions on Thumb, Thumb-2, and ARM code.  Likewise for
+     hardware breakpoints -- some architectures (including ARM) need to
+     setup debug registers differently depending on mode.  */
+  int kind;
 
   /* The breakpoint's shadow memory.  */
   unsigned char old_data[MAX_BREAKPOINT_LEN];
@@ -130,8 +133,8 @@ enum bkpt_type
     /* A GDB access watchpoint, requested with a Z4 packet.  */
     gdb_breakpoint_Z4,
 
-    /* A basic-software-single-step breakpoint.  */
-    reinsert_breakpoint,
+    /* A software single-step breakpoint.  */
+    single_step_breakpoint,
 
     /* Any other breakpoint type that doesn't require specific
        treatment goes here.  E.g., an event breakpoint.  */
@@ -170,6 +173,17 @@ struct breakpoint
   /* The breakpoint's type.  */
   enum bkpt_type type;
 
+  /* Link to this breakpoint's raw breakpoint.  This is always
+     non-NULL.  */
+  struct raw_breakpoint *raw;
+};
+
+/* Breakpoint requested by GDB.  */
+
+struct gdb_breakpoint
+{
+  struct breakpoint base;
+
   /* Pointer to the condition list that should be evaluated on
      the target or NULL if the breakpoint is unconditional or
      if GDB doesn't want us to evaluate the conditionals on the
@@ -178,10 +192,13 @@ struct breakpoint
 
   /* Point to the list of commands to run when this is hit.  */
   struct point_command_list *command_list;
+};
 
-  /* Link to this breakpoint's raw breakpoint.  This is always
-     non-NULL.  */
-  struct raw_breakpoint *raw;
+/* Breakpoint used by GDBserver.  */
+
+struct other_breakpoint
+{
+  struct breakpoint base;
 
   /* Function to call when we hit this breakpoint.  If it returns 1,
      the breakpoint shall be deleted; 0 or if this callback is NULL,
@@ -189,6 +206,37 @@ struct breakpoint
   int (*handler) (CORE_ADDR);
 };
 
+/* Breakpoint for single step.  */
+
+struct single_step_breakpoint
+{
+  struct breakpoint base;
+
+  /* Thread the reinsert breakpoint belongs to.  */
+  ptid_t ptid;
+};
+
+/* Return the breakpoint size from its kind.  */
+
+static int
+bp_size (struct raw_breakpoint *bp)
+{
+  int size = 0;
+
+  the_target->sw_breakpoint_from_kind (bp->kind, &size);
+  return size;
+}
+
+/* Return the breakpoint opcode from its kind.  */
+
+static const gdb_byte *
+bp_opcode (struct raw_breakpoint *bp)
+{
+  int size = 0;
+
+  return the_target->sw_breakpoint_from_kind (bp->kind, &size);
+}
+
 /* See mem-break.h.  */
 
 enum target_hw_bp_type
@@ -217,7 +265,7 @@ Z_packet_to_bkpt_type (char z_type)
 {
   gdb_assert ('0' <= z_type && z_type <= '4');
 
-  return gdb_breakpoint_Z0 + (z_type - '0');
+  return (enum bkpt_type) (gdb_breakpoint_Z0 + (z_type - '0'));
 }
 
 /* See mem-break.h.  */
@@ -242,8 +290,20 @@ Z_packet_to_raw_bkpt_type (char z_type)
     }
 }
 
+/* Return true if breakpoint TYPE is a GDB breakpoint.  */
+
+static int
+is_gdb_breakpoint (enum bkpt_type type)
+{
+  return (type == gdb_breakpoint_Z0
+	  || type == gdb_breakpoint_Z1
+	  || type == gdb_breakpoint_Z2
+	  || type == gdb_breakpoint_Z3
+	  || type == gdb_breakpoint_Z4);
+}
+
 int
-any_persistent_commands ()
+any_persistent_commands (void)
 {
   struct process_info *proc = current_process ();
   struct breakpoint *bp;
@@ -251,9 +311,14 @@ any_persistent_commands ()
 
   for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
     {
-      for (cl = bp->command_list; cl != NULL; cl = cl->next)
-	if (cl->persistence)
-	  return 1;
+      if (is_gdb_breakpoint (bp->type))
+	{
+	  struct gdb_breakpoint *gdb_bp = (struct gdb_breakpoint *) bp;
+
+	  for (cl = gdb_bp->command_list; cl != NULL; cl = cl->next)
+	    if (cl->persistence)
+	      return 1;
+	}
     }
 
   return 0;
@@ -281,13 +346,13 @@ find_enabled_raw_code_breakpoint_at (COR
    NULL if not found.  */
 
 static struct raw_breakpoint *
-find_raw_breakpoint_at (CORE_ADDR addr, enum raw_bkpt_type type, int size)
+find_raw_breakpoint_at (CORE_ADDR addr, enum raw_bkpt_type type, int kind)
 {
   struct process_info *proc = current_process ();
   struct raw_breakpoint *bp;
 
   for (bp = proc->raw_breakpoints; bp != NULL; bp = bp->next)
-    if (bp->pc == addr && bp->raw_type == type && bp->size == size)
+    if (bp->pc == addr && bp->raw_type == type && bp->kind == kind)
       return bp;
 
   return NULL;
@@ -301,24 +366,10 @@ insert_memory_breakpoint (struct raw_bre
   unsigned char buf[MAX_BREAKPOINT_LEN];
   int err;
 
-  if (breakpoint_data == NULL)
-    return 1;
-
-  /* If the architecture treats the size field of Z packets as a
-     'kind' field, then we'll need to be able to know which is the
-     breakpoint instruction too.  */
-  if (bp->size != breakpoint_len)
-    {
-      if (debug_threads)
-	debug_printf ("Don't know how to insert breakpoints of size %d.\n",
-		      bp->size);
-      return -1;
-    }
-
   /* Note that there can be fast tracepoint jumps installed in the
      same memory range, so to get at the original memory, we need to
      use read_inferior_memory, which masks those out.  */
-  err = read_inferior_memory (bp->pc, buf, breakpoint_len);
+  err = read_inferior_memory (bp->pc, buf, bp_size (bp));
   if (err != 0)
     {
       if (debug_threads)
@@ -328,10 +379,10 @@ insert_memory_breakpoint (struct raw_bre
     }
   else
     {
-      memcpy (bp->old_data, buf, breakpoint_len);
+      memcpy (bp->old_data, buf, bp_size (bp));
 
-      err = (*the_target->write_memory) (bp->pc, breakpoint_data,
-					 breakpoint_len);
+      err = (*the_target->write_memory) (bp->pc, bp_opcode (bp),
+					 bp_size (bp));
       if (err != 0)
 	{
 	  if (debug_threads)
@@ -358,8 +409,8 @@ remove_memory_breakpoint (struct raw_bre
      note that we need to pass the current shadow contents, because
      write_inferior_memory updates any shadow memory with what we pass
      here, and we want that to be a nop.  */
-  memcpy (buf, bp->old_data, breakpoint_len);
-  err = write_inferior_memory (bp->pc, buf, breakpoint_len);
+  memcpy (buf, bp->old_data, bp_size (bp));
+  err = write_inferior_memory (bp->pc, buf, bp_size (bp));
   if (err != 0)
     {
       if (debug_threads)
@@ -370,60 +421,68 @@ remove_memory_breakpoint (struct raw_bre
   return err != 0 ? -1 : 0;
 }
 
-/* Set a RAW breakpoint of type TYPE and size SIZE at WHERE.  On
+/* Set a RAW breakpoint of type TYPE and kind KIND at WHERE.  On
    success, a pointer to the new breakpoint is returned.  On failure,
    returns NULL and writes the error code to *ERR.  */
 
 static struct raw_breakpoint *
-set_raw_breakpoint_at (enum raw_bkpt_type type, CORE_ADDR where, int size,
+set_raw_breakpoint_at (enum raw_bkpt_type type, CORE_ADDR where, int kind,
 		       int *err)
 {
   struct process_info *proc = current_process ();
   struct raw_breakpoint *bp;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 
   if (type == raw_bkpt_type_sw || type == raw_bkpt_type_hw)
     {
       bp = find_enabled_raw_code_breakpoint_at (where, type);
-      if (bp != NULL && bp->size != size)
+      if (bp != NULL && bp->kind != kind)
 	{
-	  /* A different size than previously seen.  The previous
+	  /* A different kind than previously seen.  The previous
 	     breakpoint must be gone then.  */
 	  if (debug_threads)
-	    debug_printf ("Inconsistent breakpoint size?  Was %d, now %d.\n",
-			  bp->size, size);
+	    debug_printf ("Inconsistent breakpoint kind?  Was %d, now %d.\n",
+			  bp->kind, kind);
 	  bp->inserted = -1;
 	  bp = NULL;
 	}
     }
   else
-    bp = find_raw_breakpoint_at (where, type, size);
+    bp = find_raw_breakpoint_at (where, type, kind);
 
-  if (bp != NULL)
+  if (bp == NULL)
     {
-      bp->refcount++;
-      return bp;
+      bp = XCNEW (struct raw_breakpoint);
+      bp->pc = where;
+      bp->kind = kind;
+      bp->raw_type = type;
+      make_cleanup (xfree, bp);
     }
 
-  bp = xcalloc (1, sizeof (*bp));
-  bp->pc = where;
-  bp->size = size;
-  bp->refcount = 1;
-  bp->raw_type = type;
-
-  *err = the_target->insert_point (bp->raw_type, bp->pc, bp->size, bp);
-  if (*err != 0)
+  if (!bp->inserted)
     {
-      if (debug_threads)
-	debug_printf ("Failed to insert breakpoint at 0x%s (%d).\n",
-		      paddress (where), *err);
-      free (bp);
-      return NULL;
+      *err = the_target->insert_point (bp->raw_type, bp->pc, bp->kind, bp);
+      if (*err != 0)
+	{
+	  if (debug_threads)
+	    debug_printf ("Failed to insert breakpoint at 0x%s (%d).\n",
+			  paddress (where), *err);
+
+	  do_cleanups (old_chain);
+	  return NULL;
+	}
+
+      bp->inserted = 1;
     }
 
-  bp->inserted = 1;
-  /* Link the breakpoint in.  */
-  bp->next = proc->raw_breakpoints;
-  proc->raw_breakpoints = bp;
+  discard_cleanups (old_chain);
+
+  /* Link the breakpoint in, if this is the first reference.  */
+  if (++bp->refcount == 1)
+    {
+      bp->next = proc->raw_breakpoints;
+      proc->raw_breakpoints = bp;
+    }
   return bp;
 }
 
@@ -527,7 +586,7 @@ delete_fast_tracepoint_jump (struct fast
 		 pass the current shadow contents, because
 		 write_inferior_memory updates any shadow memory with
 		 what we pass here, and we want that to be a nop.  */
-	      buf = alloca (bp->length);
+	      buf = (unsigned char *) alloca (bp->length);
 	      memcpy (buf, fast_tracepoint_jump_shadow (bp), bp->length);
 	      ret = write_inferior_memory (bp->pc, buf, bp->length);
 	      if (ret != 0)
@@ -585,12 +644,12 @@ set_fast_tracepoint_jump (CORE_ADDR wher
   /* We don't, so create a new object.  Double the length, because the
      flexible array member holds both the jump insn, and the
      shadow.  */
-  jp = xcalloc (1, sizeof (*jp) + (length * 2));
+  jp = (struct fast_tracepoint_jump *) xcalloc (1, sizeof (*jp) + (length * 2));
   jp->pc = where;
   jp->length = length;
   memcpy (fast_tracepoint_jump_insn (jp), insn, length);
   jp->refcount = 1;
-  buf = alloca (length);
+  buf = (unsigned char *) alloca (length);
 
   /* Note that there can be trap breakpoints inserted in the same
      address range.  To access the original memory contents, we use
@@ -670,7 +729,7 @@ uninsert_fast_tracepoint_jumps_at (CORE_
 	 pass the current shadow contents, because
 	 write_inferior_memory updates any shadow memory with what we
 	 pass here, and we want that to be a nop.  */
-      buf = alloca (jp->length);
+      buf = (unsigned char *) alloca (jp->length);
       memcpy (buf, fast_tracepoint_jump_shadow (jp), jp->length);
       err = write_inferior_memory (jp->pc, buf, jp->length);
       if (err != 0)
@@ -717,7 +776,7 @@ reinsert_fast_tracepoint_jumps_at (CORE_
      to pass the current shadow contents, because
      write_inferior_memory updates any shadow memory with what we pass
      here, and we want that to be a nop.  */
-  buf = alloca (jp->length);
+  buf = (unsigned char *) alloca (jp->length);
   memcpy (buf, fast_tracepoint_jump_shadow (jp), jp->length);
   err = write_inferior_memory (where, buf, jp->length);
   if (err != 0)
@@ -732,7 +791,7 @@ reinsert_fast_tracepoint_jumps_at (CORE_
 }
 
 /* Set a high-level breakpoint of type TYPE, with low level type
-   RAW_TYPE and size SIZE, at WHERE.  On success, a pointer to the new
+   RAW_TYPE and kind KIND, at WHERE.  On success, a pointer to the new
    breakpoint is returned.  On failure, returns NULL and writes the
    error code to *ERR.  HANDLER is called when the breakpoint is hit.
    HANDLER should return 1 if the breakpoint should be deleted, 0
@@ -740,14 +799,14 @@ reinsert_fast_tracepoint_jumps_at (CORE_
 
 static struct breakpoint *
 set_breakpoint (enum bkpt_type type, enum raw_bkpt_type raw_type,
-		CORE_ADDR where, int size,
+		CORE_ADDR where, int kind,
 		int (*handler) (CORE_ADDR), int *err)
 {
   struct process_info *proc = current_process ();
   struct breakpoint *bp;
   struct raw_breakpoint *raw;
 
-  raw = set_raw_breakpoint_at (raw_type, where, size, err);
+  raw = set_raw_breakpoint_at (raw_type, where, kind, err);
 
   if (raw == NULL)
     {
@@ -755,11 +814,32 @@ set_breakpoint (enum bkpt_type type, enu
       return NULL;
     }
 
-  bp = xcalloc (1, sizeof (struct breakpoint));
-  bp->type = type;
+  if (is_gdb_breakpoint (type))
+    {
+      struct gdb_breakpoint *gdb_bp = XCNEW (struct gdb_breakpoint);
 
+      bp = (struct breakpoint *) gdb_bp;
+      gdb_assert (handler == NULL);
+    }
+  else if (type == other_breakpoint)
+    {
+      struct other_breakpoint *other_bp = XCNEW (struct other_breakpoint);
+
+      other_bp->handler = handler;
+      bp = (struct breakpoint *) other_bp;
+    }
+  else if (type == single_step_breakpoint)
+    {
+      struct single_step_breakpoint *ss_bp
+	= XCNEW (struct single_step_breakpoint);
+
+      bp = (struct breakpoint *) ss_bp;
+    }
+  else
+    gdb_assert_not_reached ("unhandled breakpoint type");
+
+  bp->type = type;
   bp->raw = raw;
-  bp->handler = handler;
 
   bp->next = proc->breakpoints;
   proc->breakpoints = bp;
@@ -767,18 +847,29 @@ set_breakpoint (enum bkpt_type type, enu
   return bp;
 }
 
-/* See mem-break.h  */
+/* Set breakpoint of TYPE on address WHERE with handler HANDLER.  */
 
-struct breakpoint *
-set_breakpoint_at (CORE_ADDR where, int (*handler) (CORE_ADDR))
+static struct breakpoint *
+set_breakpoint_type_at (enum bkpt_type type, CORE_ADDR where,
+			int (*handler) (CORE_ADDR))
 {
   int err_ignored;
+  CORE_ADDR placed_address = where;
+  int breakpoint_kind = target_breakpoint_kind_from_pc (&placed_address);
 
-  return set_breakpoint (other_breakpoint, raw_bkpt_type_sw,
-			 where, breakpoint_len, handler,
+  return set_breakpoint (type, raw_bkpt_type_sw,
+			 placed_address, breakpoint_kind, handler,
 			 &err_ignored);
 }
 
+/* See mem-break.h  */
+
+struct breakpoint *
+set_breakpoint_at (CORE_ADDR where, int (*handler) (CORE_ADDR))
+{
+  return set_breakpoint_type_at (other_breakpoint, where, handler);
+}
+
 
 static int
 delete_raw_breakpoint (struct process_info *proc, struct raw_breakpoint *todel)
@@ -799,7 +890,7 @@ delete_raw_breakpoint (struct process_in
 
 	      *bp_link = bp->next;
 
-	      ret = the_target->remove_point (bp->raw_type, bp->pc, bp->size,
+	      ret = the_target->remove_point (bp->raw_type, bp->pc, bp->kind,
 					      bp);
 	      if (ret != 0)
 		{
@@ -891,12 +982,12 @@ delete_breakpoint (struct breakpoint *to
   return delete_breakpoint_1 (proc, todel);
 }
 
-/* Locate a GDB breakpoint of type Z_TYPE and size SIZE placed at
-   address ADDR and return a pointer to its structure.  If SIZE is -1,
-   the breakpoints' sizes are ignored.  */
+/* Locate a GDB breakpoint of type Z_TYPE and kind KIND placed at
+   address ADDR and return a pointer to its structure.  If KIND is -1,
+   the breakpoint's kind is ignored.  */
 
-static struct breakpoint *
-find_gdb_breakpoint (char z_type, CORE_ADDR addr, int size)
+static struct gdb_breakpoint *
+find_gdb_breakpoint (char z_type, CORE_ADDR addr, int kind)
 {
   struct process_info *proc = current_process ();
   struct breakpoint *bp;
@@ -904,8 +995,8 @@ find_gdb_breakpoint (char z_type, CORE_A
 
   for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
     if (bp->type == type && bp->raw->pc == addr
-	&& (size == -1 || bp->raw->size == size))
-      return bp;
+	&& (kind == -1 || bp->raw->kind == kind))
+      return (struct gdb_breakpoint *) bp;
 
   return NULL;
 }
@@ -918,15 +1009,15 @@ z_type_supported (char z_type)
 	  && the_target->supports_z_point_type (z_type));
 }
 
-/* Create a new GDB breakpoint of type Z_TYPE at ADDR with size SIZE.
+/* Create a new GDB breakpoint of type Z_TYPE at ADDR with kind KIND.
    Returns a pointer to the newly created breakpoint on success.  On
    failure returns NULL and sets *ERR to either -1 for error, or 1 if
    Z_TYPE breakpoints are not supported on this target.  */
 
-static struct breakpoint *
-set_gdb_breakpoint_1 (char z_type, CORE_ADDR addr, int size, int *err)
+static struct gdb_breakpoint *
+set_gdb_breakpoint_1 (char z_type, CORE_ADDR addr, int kind, int *err)
 {
-  struct breakpoint *bp;
+  struct gdb_breakpoint *bp;
   enum bkpt_type type;
   enum raw_bkpt_type raw_type;
 
@@ -952,12 +1043,12 @@ set_gdb_breakpoint_1 (char z_type, CORE_
 
       if (bp != NULL)
 	{
-	  if (bp->raw->size != size)
+	  if (bp->base.raw->kind != kind)
 	    {
-	      /* A different size than previously seen.  The previous
+	      /* A different kind than previously seen.  The previous
 		 breakpoint must be gone then.  */
-	      bp->raw->inserted = -1;
-	      delete_breakpoint (bp);
+	      bp->base.raw->inserted = -1;
+	      delete_breakpoint ((struct breakpoint *) bp);
 	      bp = NULL;
 	    }
 	  else if (z_type == Z_PACKET_SW_BP)
@@ -975,10 +1066,10 @@ set_gdb_breakpoint_1 (char z_type, CORE_
     }
   else
     {
-      /* Data breakpoints for the same address but different size are
+      /* Data breakpoints for the same address but different kind are
 	 expected.  GDB doesn't merge these.  The backend gets to do
 	 that if it wants/can.  */
-      bp = find_gdb_breakpoint (z_type, addr, size);
+      bp = find_gdb_breakpoint (z_type, addr, kind);
     }
 
   if (bp != NULL)
@@ -993,7 +1084,8 @@ set_gdb_breakpoint_1 (char z_type, CORE_
 
   raw_type = Z_packet_to_raw_bkpt_type (z_type);
   type = Z_packet_to_bkpt_type (z_type);
-  return set_breakpoint (type, raw_type, addr, size, NULL, err);
+  return (struct gdb_breakpoint *) set_breakpoint (type, raw_type, addr,
+						   kind, NULL, err);
 }
 
 static int
@@ -1011,22 +1103,17 @@ check_gdb_bp_preconditions (char z_type,
       *err = 1;
       return 0;
     }
-  else if (current_thread == NULL)
-    {
-      *err = -1;
-      return 0;
-    }
-  else
-    return 1;
+
+  return 1;
 }
 
 /* See mem-break.h.  This is a wrapper for set_gdb_breakpoint_1 that
    knows to prepare to access memory for Z0 breakpoints.  */
 
-struct breakpoint *
-set_gdb_breakpoint (char z_type, CORE_ADDR addr, int size, int *err)
+struct gdb_breakpoint *
+set_gdb_breakpoint (char z_type, CORE_ADDR addr, int kind, int *err)
 {
-  struct breakpoint *bp;
+  struct gdb_breakpoint *bp;
 
   if (!check_gdb_bp_preconditions (z_type, err))
     return NULL;
@@ -1035,12 +1122,14 @@ set_gdb_breakpoint (char z_type, CORE_AD
      access memory.  */
   if (z_type == Z_PACKET_SW_BP)
     {
-      *err = prepare_to_access_memory ();
-      if (*err != 0)
-	return NULL;
+      if (prepare_to_access_memory () != 0)
+	{
+	  *err = -1;
+	  return NULL;
+	}
     }
 
-  bp = set_gdb_breakpoint_1 (z_type, addr, size, err);
+  bp = set_gdb_breakpoint_1 (z_type, addr, kind, err);
 
   if (z_type == Z_PACKET_SW_BP)
     done_accessing_memory ();
@@ -1048,25 +1137,25 @@ set_gdb_breakpoint (char z_type, CORE_AD
   return bp;
 }
 
-/* Delete a GDB breakpoint of type Z_TYPE and size SIZE previously
+/* Delete a GDB breakpoint of type Z_TYPE and kind KIND previously
    inserted at ADDR with set_gdb_breakpoint_at.  Returns 0 on success,
    -1 on error, and 1 if Z_TYPE breakpoints are not supported on this
    target.  */
 
 static int
-delete_gdb_breakpoint_1 (char z_type, CORE_ADDR addr, int size)
+delete_gdb_breakpoint_1 (char z_type, CORE_ADDR addr, int kind)
 {
-  struct breakpoint *bp;
+  struct gdb_breakpoint *bp;
   int err;
 
-  bp = find_gdb_breakpoint (z_type, addr, size);
+  bp = find_gdb_breakpoint (z_type, addr, kind);
   if (bp == NULL)
     return -1;
 
   /* Before deleting the breakpoint, make sure to free its condition
      and command lists.  */
   clear_breakpoint_conditions_and_commands (bp);
-  err = delete_breakpoint (bp);
+  err = delete_breakpoint ((struct breakpoint *) bp);
   if (err != 0)
     return -1;
 
@@ -1077,7 +1166,7 @@ delete_gdb_breakpoint_1 (char z_type, CO
    knows to prepare to access memory for Z0 breakpoints.  */
 
 int
-delete_gdb_breakpoint (char z_type, CORE_ADDR addr, int size)
+delete_gdb_breakpoint (char z_type, CORE_ADDR addr, int kind)
 {
   int ret;
 
@@ -1095,7 +1184,7 @@ delete_gdb_breakpoint (char z_type, CORE
 	return -1;
     }
 
-  ret = delete_gdb_breakpoint_1 (z_type, addr, size);
+  ret = delete_gdb_breakpoint_1 (z_type, addr, kind);
 
   if (z_type == Z_PACKET_SW_BP)
     done_accessing_memory ();
@@ -1106,7 +1195,7 @@ delete_gdb_breakpoint (char z_type, CORE
 /* Clear all conditions associated with a breakpoint.  */
 
 static void
-clear_breakpoint_conditions (struct breakpoint *bp)
+clear_breakpoint_conditions (struct gdb_breakpoint *bp)
 {
   struct point_cond_list *cond;
 
@@ -1131,7 +1220,7 @@ clear_breakpoint_conditions (struct brea
 /* Clear all commands associated with a breakpoint.  */
 
 static void
-clear_breakpoint_commands (struct breakpoint *bp)
+clear_breakpoint_commands (struct gdb_breakpoint *bp)
 {
   struct point_command_list *cmd;
 
@@ -1154,7 +1243,7 @@ clear_breakpoint_commands (struct breakp
 }
 
 void
-clear_breakpoint_conditions_and_commands (struct breakpoint *bp)
+clear_breakpoint_conditions_and_commands (struct gdb_breakpoint *bp)
 {
   clear_breakpoint_conditions (bp);
   clear_breakpoint_commands (bp);
@@ -1163,13 +1252,13 @@ clear_breakpoint_conditions_and_commands
 /* Add condition CONDITION to GDBserver's breakpoint BP.  */
 
 static void
-add_condition_to_breakpoint (struct breakpoint *bp,
+add_condition_to_breakpoint (struct gdb_breakpoint *bp,
 			     struct agent_expr *condition)
 {
   struct point_cond_list *new_cond;
 
   /* Create new condition.  */
-  new_cond = xcalloc (1, sizeof (*new_cond));
+  new_cond = XCNEW (struct point_cond_list);
   new_cond->cond = condition;
 
   /* Add condition to the list.  */
@@ -1180,7 +1269,7 @@ add_condition_to_breakpoint (struct brea
 /* Add a target-side condition CONDITION to a breakpoint.  */
 
 int
-add_breakpoint_condition (struct breakpoint *bp, char **condition)
+add_breakpoint_condition (struct gdb_breakpoint *bp, char **condition)
 {
   char *actparm = *condition;
   struct agent_expr *cond;
@@ -1195,8 +1284,7 @@ add_breakpoint_condition (struct breakpo
 
   if (cond == NULL)
     {
-      fprintf (stderr, "Condition evaluation failed. "
-	       "Assuming unconditional.\n");
+      warning ("Condition evaluation failed. Assuming unconditional.");
       return 0;
     }
 
@@ -1214,7 +1302,7 @@ static int
 gdb_condition_true_at_breakpoint_z_type (char z_type, CORE_ADDR addr)
 {
   /* Fetch registers for the current inferior.  */
-  struct breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
+  struct gdb_breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
   ULONGEST value = 0;
   struct point_cond_list *cl;
   int err = 0;
@@ -1260,14 +1348,14 @@ gdb_condition_true_at_breakpoint (CORE_A
 
 /* Add commands COMMANDS to GDBserver's breakpoint BP.  */
 
-void
-add_commands_to_breakpoint (struct breakpoint *bp,
+static void
+add_commands_to_breakpoint (struct gdb_breakpoint *bp,
 			    struct agent_expr *commands, int persist)
 {
   struct point_command_list *new_cmd;
 
   /* Create new command.  */
-  new_cmd = xcalloc (1, sizeof (*new_cmd));
+  new_cmd = XCNEW (struct point_command_list);
   new_cmd->cmd = commands;
   new_cmd->persistence = persist;
 
@@ -1279,7 +1367,7 @@ add_commands_to_breakpoint (struct break
 /* Add a target-side command COMMAND to the breakpoint at ADDR.  */
 
 int
-add_breakpoint_commands (struct breakpoint *bp, char **command,
+add_breakpoint_commands (struct gdb_breakpoint *bp, char **command,
 			 int persist)
 {
   char *actparm = *command;
@@ -1295,8 +1383,7 @@ add_breakpoint_commands (struct breakpoi
 
   if (cmd == NULL)
     {
-      fprintf (stderr, "Command evaluation failed. "
-	       "Disabling.\n");
+      warning ("Command evaluation failed. Disabling.");
       return 0;
     }
 
@@ -1313,7 +1400,7 @@ add_breakpoint_commands (struct breakpoi
 static int
 gdb_no_commands_at_breakpoint_z_type (char z_type, CORE_ADDR addr)
 {
-  struct breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
+  struct gdb_breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
 
   if (bp == NULL)
     return 1;
@@ -1343,7 +1430,7 @@ static int
 run_breakpoint_commands_z_type (char z_type, CORE_ADDR addr)
 {
   /* Fetch registers for the current inferior.  */
-  struct breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
+  struct gdb_breakpoint *bp = find_gdb_breakpoint (z_type, addr, -1);
   ULONGEST value = 0;
   struct point_command_list *cl;
   int err = 0;
@@ -1390,18 +1477,21 @@ gdb_breakpoint_here (CORE_ADDR where)
 }
 
 void
-set_reinsert_breakpoint (CORE_ADDR stop_at)
+set_single_step_breakpoint (CORE_ADDR stop_at, ptid_t ptid)
 {
-  struct breakpoint *bp;
+  struct single_step_breakpoint *bp;
+
+  gdb_assert (ptid_get_pid (current_ptid) == ptid_get_pid (ptid));
 
-  bp = set_breakpoint_at (stop_at, NULL);
-  bp->type = reinsert_breakpoint;
+  bp = (struct single_step_breakpoint *) set_breakpoint_type_at (single_step_breakpoint,
+								stop_at, NULL);
+  bp->ptid = ptid;
 }
 
 void
-delete_reinsert_breakpoints (void)
+delete_single_step_breakpoints (struct thread_info *thread)
 {
-  struct process_info *proc = current_process ();
+  struct process_info *proc = get_thread_process (thread);
   struct breakpoint *bp, **bp_link;
 
   bp = proc->breakpoints;
@@ -1409,11 +1499,17 @@ delete_reinsert_breakpoints (void)
 
   while (bp)
     {
-      if (bp->type == reinsert_breakpoint)
+      if (bp->type == single_step_breakpoint
+	  && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
+			 ptid_of (thread)))
 	{
+	  struct thread_info *saved_thread = current_thread;
+
+	  current_thread = thread;
 	  *bp_link = bp->next;
 	  release_breakpoint (proc, bp);
 	  bp = *bp_link;
+	  current_thread = saved_thread;
 	}
       else
 	{
@@ -1438,7 +1534,7 @@ uninsert_raw_breakpoint (struct raw_brea
 
       bp->inserted = 0;
 
-      err = the_target->remove_point (bp->raw_type, bp->pc, bp->size, bp);
+      err = the_target->remove_point (bp->raw_type, bp->pc, bp->kind, bp);
       if (err != 0)
 	{
 	  bp->inserted = 1;
@@ -1492,15 +1588,43 @@ uninsert_all_breakpoints (void)
       uninsert_raw_breakpoint (bp);
 }
 
+void
+uninsert_single_step_breakpoints (struct thread_info *thread)
+{
+  struct process_info *proc = get_thread_process (thread);
+  struct breakpoint *bp;
+
+  for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
+    {
+    if (bp->type == single_step_breakpoint
+	&& ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
+		       ptid_of (thread)))
+      {
+	gdb_assert (bp->raw->inserted > 0);
+
+	/* Only uninsert the raw breakpoint if it only belongs to a
+	   reinsert breakpoint.  */
+	if (bp->raw->refcount == 1)
+	  {
+	    struct thread_info *saved_thread = current_thread;
+
+	    current_thread = thread;
+	    uninsert_raw_breakpoint (bp->raw);
+	    current_thread = saved_thread;
+	  }
+      }
+    }
+}
+
 static void
 reinsert_raw_breakpoint (struct raw_breakpoint *bp)
 {
   int err;
 
   if (bp->inserted)
-    error ("Breakpoint already inserted at reinsert time.");
+    return;
 
-  err = the_target->insert_point (bp->raw_type, bp->pc, bp->size, bp);
+  err = the_target->insert_point (bp->raw_type, bp->pc, bp->kind, bp);
   if (err == 0)
     bp->inserted = 1;
   else if (debug_threads)
@@ -1536,6 +1660,31 @@ reinsert_breakpoints_at (CORE_ADDR pc)
     }
 }
 
+int
+has_single_step_breakpoints (struct thread_info *thread)
+{
+  struct process_info *proc = get_thread_process (thread);
+  struct breakpoint *bp, **bp_link;
+
+  bp = proc->breakpoints;
+  bp_link = &proc->breakpoints;
+
+  while (bp)
+    {
+      if (bp->type == single_step_breakpoint
+	  && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
+			 ptid_of (thread)))
+	return 1;
+      else
+	{
+	  bp_link = &bp->next;
+	  bp = *bp_link;
+	}
+    }
+
+  return 0;
+}
+
 void
 reinsert_all_breakpoints (void)
 {
@@ -1550,6 +1699,32 @@ reinsert_all_breakpoints (void)
 }
 
 void
+reinsert_single_step_breakpoints (struct thread_info *thread)
+{
+  struct process_info *proc = get_thread_process (thread);
+  struct breakpoint *bp;
+
+  for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
+    {
+      if (bp->type == single_step_breakpoint
+	  && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
+			 ptid_of (thread)))
+	{
+	  gdb_assert (bp->raw->inserted > 0);
+
+	  if (bp->raw->refcount == 1)
+	    {
+	      struct thread_info *saved_thread = current_thread;
+
+	      current_thread = thread;
+	      reinsert_raw_breakpoint (bp->raw);
+	      current_thread = saved_thread;
+	    }
+	}
+    }
+}
+
+void
 check_breakpoints (CORE_ADDR stop_pc)
 {
   struct process_info *proc = current_process ();
@@ -1572,14 +1747,20 @@ check_breakpoints (CORE_ADDR stop_pc)
 	      return;
 	    }
 
-	  if (bp->handler != NULL && (*bp->handler) (stop_pc))
+	  if (bp->type == other_breakpoint)
 	    {
-	      *bp_link = bp->next;
+	      struct other_breakpoint *other_bp
+		= (struct other_breakpoint *) bp;
+
+	      if (other_bp->handler != NULL && (*other_bp->handler) (stop_pc))
+		{
+		  *bp_link = bp->next;
 
-	      release_breakpoint (proc, bp);
+		  release_breakpoint (proc, bp);
 
-	      bp = *bp_link;
-	      continue;
+		  bp = *bp_link;
+		  continue;
+		}
 	    }
 	}
 
@@ -1588,13 +1769,6 @@ check_breakpoints (CORE_ADDR stop_pc)
     }
 }
 
-void
-set_breakpoint_data (const unsigned char *bp_data, int bp_len)
-{
-  breakpoint_data = bp_data;
-  breakpoint_len = bp_len;
-}
-
 int
 breakpoint_here (CORE_ADDR addr)
 {
@@ -1660,6 +1834,23 @@ hardware_breakpoint_inserted_here (CORE_
   return 0;
 }
 
+/* See mem-break.h.  */
+
+int
+single_step_breakpoint_inserted_here (CORE_ADDR addr)
+{
+  struct process_info *proc = current_process ();
+  struct breakpoint *bp;
+
+  for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
+    if (bp->type == single_step_breakpoint
+	&& bp->raw->pc == addr
+	&& bp->raw->inserted)
+      return 1;
+
+  return 0;
+}
+
 static int
 validate_inserted_breakpoint (struct raw_breakpoint *bp)
 {
@@ -1669,9 +1860,9 @@ validate_inserted_breakpoint (struct raw
   gdb_assert (bp->inserted);
   gdb_assert (bp->raw_type == raw_bkpt_type_sw);
 
-  buf = alloca (breakpoint_len);
-  err = (*the_target->read_memory) (bp->pc, buf, breakpoint_len);
-  if (err || memcmp (buf, breakpoint_data, breakpoint_len) != 0)
+  buf = (unsigned char *) alloca (bp_size (bp));
+  err = (*the_target->read_memory) (bp->pc, buf, bp_size (bp));
+  if (err || memcmp (buf, bp_opcode (bp), bp_size (bp)) != 0)
     {
       /* Tag it as gone.  */
       bp->inserted = -1;
@@ -1691,7 +1882,12 @@ delete_disabled_breakpoints (void)
     {
       next = bp->next;
       if (bp->raw->inserted < 0)
-	delete_breakpoint_1 (proc, bp);
+	{
+	  /* If single_step_breakpoints become disabled, that means the
+	     manipulations (insertion and removal) of them are wrong.  */
+	  gdb_assert (bp->type != single_step_breakpoint);
+	  delete_breakpoint_1 (proc, bp);
+	}
     }
 }
 
@@ -1762,7 +1958,7 @@ check_mem_read (CORE_ADDR mem_addr, unsi
 
   for (; bp != NULL; bp = bp->next)
     {
-      CORE_ADDR bp_end = bp->pc + breakpoint_len;
+      CORE_ADDR bp_end = bp->pc + bp_size (bp);
       CORE_ADDR start, end;
       int copy_offset, copy_len, buf_offset;
 
@@ -1851,7 +2047,7 @@ check_mem_write (CORE_ADDR mem_addr, uns
 
   for (; bp != NULL; bp = bp->next)
     {
-      CORE_ADDR bp_end = bp->pc + breakpoint_len;
+      CORE_ADDR bp_end = bp->pc + bp_size (bp);
       CORE_ADDR start, end;
       int copy_offset, copy_len, buf_offset;
 
@@ -1882,7 +2078,7 @@ check_mem_write (CORE_ADDR mem_addr, uns
       if (bp->inserted > 0)
 	{
 	  if (validate_inserted_breakpoint (bp))
-	    memcpy (buf + buf_offset, breakpoint_data + copy_offset, copy_len);
+	    memcpy (buf + buf_offset, bp_opcode (bp) + copy_offset, copy_len);
 	  else
 	    disabled_one = 1;
 	}
@@ -1937,9 +2133,9 @@ clone_agent_expr (const struct agent_exp
 {
   struct agent_expr *ax;
 
-  ax = xcalloc (1, sizeof (*ax));
+  ax = XCNEW (struct agent_expr);
   ax->length = src_ax->length;
-  ax->bytes = xcalloc (ax->length, 1);
+  ax->bytes = (unsigned char *) xcalloc (ax->length, 1);
   memcpy (ax->bytes, src_ax->bytes, ax->length);
   return ax;
 }
@@ -1947,71 +2143,98 @@ clone_agent_expr (const struct agent_exp
 /* Deep-copy the contents of one breakpoint to another.  */
 
 static struct breakpoint *
-clone_one_breakpoint (const struct breakpoint *src)
+clone_one_breakpoint (const struct breakpoint *src, ptid_t ptid)
 {
   struct breakpoint *dest;
   struct raw_breakpoint *dest_raw;
-  struct point_cond_list *current_cond;
-  struct point_cond_list *new_cond;
-  struct point_cond_list *cond_tail = NULL;
-  struct point_command_list *current_cmd;
-  struct point_command_list *new_cmd;
-  struct point_command_list *cmd_tail = NULL;
 
   /* Clone the raw breakpoint.  */
-  dest_raw = xcalloc (1, sizeof (*dest_raw));
+  dest_raw = XCNEW (struct raw_breakpoint);
   dest_raw->raw_type = src->raw->raw_type;
   dest_raw->refcount = src->raw->refcount;
   dest_raw->pc = src->raw->pc;
-  dest_raw->size = src->raw->size;
+  dest_raw->kind = src->raw->kind;
   memcpy (dest_raw->old_data, src->raw->old_data, MAX_BREAKPOINT_LEN);
   dest_raw->inserted = src->raw->inserted;
 
   /* Clone the high-level breakpoint.  */
-  dest = xcalloc (1, sizeof (*dest));
-  dest->type = src->type;
-  dest->raw = dest_raw;
-  dest->handler = src->handler;
-
-  /* Clone the condition list.  */
-  for (current_cond = src->cond_list; current_cond != NULL;
-       current_cond = current_cond->next)
+  if (is_gdb_breakpoint (src->type))
     {
-      new_cond = xcalloc (1, sizeof (*new_cond));
-      new_cond->cond = clone_agent_expr (current_cond->cond);
-      APPEND_TO_LIST (&dest->cond_list, new_cond, cond_tail);
+      struct gdb_breakpoint *gdb_dest = XCNEW (struct gdb_breakpoint);
+      struct point_cond_list *current_cond;
+      struct point_cond_list *new_cond;
+      struct point_cond_list *cond_tail = NULL;
+      struct point_command_list *current_cmd;
+      struct point_command_list *new_cmd;
+      struct point_command_list *cmd_tail = NULL;
+
+      /* Clone the condition list.  */
+      for (current_cond = ((struct gdb_breakpoint *) src)->cond_list;
+	   current_cond != NULL;
+	   current_cond = current_cond->next)
+	{
+	  new_cond = XCNEW (struct point_cond_list);
+	  new_cond->cond = clone_agent_expr (current_cond->cond);
+	  APPEND_TO_LIST (&gdb_dest->cond_list, new_cond, cond_tail);
+	}
+
+      /* Clone the command list.  */
+      for (current_cmd = ((struct gdb_breakpoint *) src)->command_list;
+	   current_cmd != NULL;
+	   current_cmd = current_cmd->next)
+	{
+	  new_cmd = XCNEW (struct point_command_list);
+	  new_cmd->cmd = clone_agent_expr (current_cmd->cmd);
+	  new_cmd->persistence = current_cmd->persistence;
+	  APPEND_TO_LIST (&gdb_dest->command_list, new_cmd, cmd_tail);
+	}
+
+      dest = (struct breakpoint *) gdb_dest;
     }
+  else if (src->type == other_breakpoint)
+    {
+      struct other_breakpoint *other_dest = XCNEW (struct other_breakpoint);
 
-  /* Clone the command list.  */
-  for (current_cmd = src->command_list; current_cmd != NULL;
-       current_cmd = current_cmd->next)
+      other_dest->handler = ((struct other_breakpoint *) src)->handler;
+      dest = (struct breakpoint *) other_dest;
+    }
+  else if (src->type == single_step_breakpoint)
     {
-      new_cmd = xcalloc (1, sizeof (*new_cmd));
-      new_cmd->cmd = clone_agent_expr (current_cmd->cmd);
-      new_cmd->persistence = current_cmd->persistence;
-      APPEND_TO_LIST (&dest->command_list, new_cmd, cmd_tail);
+      struct single_step_breakpoint *ss_dest
+	= XCNEW (struct single_step_breakpoint);
+
+      dest = (struct breakpoint *) ss_dest;
+      /* Since single-step breakpoint is thread specific, don't copy
+	 thread id from SRC, use ID instead.  */
+      ss_dest->ptid = ptid;
     }
+  else
+    gdb_assert_not_reached ("unhandled breakpoint type");
+
+  dest->type = src->type;
+  dest->raw = dest_raw;
 
   return dest;
 }
 
-/* Create a new breakpoint list NEW_LIST that is a copy of the
-   list starting at SRC_LIST.  Create the corresponding new
-   raw_breakpoint list NEW_RAW_LIST as well.  */
+/* See mem-break.h.  */
 
 void
-clone_all_breakpoints (struct breakpoint **new_list,
-		       struct raw_breakpoint **new_raw_list,
-		       const struct breakpoint *src_list)
+clone_all_breakpoints (struct thread_info *child_thread,
+		       const struct thread_info *parent_thread)
 {
   const struct breakpoint *bp;
   struct breakpoint *new_bkpt;
   struct breakpoint *bkpt_tail = NULL;
   struct raw_breakpoint *raw_bkpt_tail = NULL;
+  struct process_info *child_proc = get_thread_process (child_thread);
+  struct process_info *parent_proc = get_thread_process (parent_thread);
+  struct breakpoint **new_list = &child_proc->breakpoints;
+  struct raw_breakpoint **new_raw_list = &child_proc->raw_breakpoints;
 
-  for (bp = src_list; bp != NULL; bp = bp->next)
+  for (bp = parent_proc->breakpoints; bp != NULL; bp = bp->next)
     {
-      new_bkpt = clone_one_breakpoint (bp);
+      new_bkpt = clone_one_breakpoint (bp, ptid_of (child_thread));
       APPEND_TO_LIST (new_list, new_bkpt, bkpt_tail);
       APPEND_TO_LIST (new_raw_list, new_bkpt->raw, raw_bkpt_tail);
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/mem-break.h ./gdb/gdbserver/mem-break.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/mem-break.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/mem-break.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Memory breakpoint interfaces for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -25,6 +25,7 @@
 
 /* Breakpoints are opaque.  */
 struct breakpoint;
+struct gdb_breakpoint;
 struct fast_tracepoint_jump;
 struct raw_breakpoint;
 struct process_info;
@@ -65,20 +66,20 @@ enum raw_bkpt_type Z_packet_to_raw_bkpt_
 enum target_hw_bp_type raw_bkpt_type_to_target_hw_bp_type
   (enum raw_bkpt_type raw_type);
 
-/* Create a new GDB breakpoint of type Z_TYPE at ADDR with size SIZE.
+/* Create a new GDB breakpoint of type Z_TYPE at ADDR with kind KIND.
    Returns a pointer to the newly created breakpoint on success.  On
    failure returns NULL and sets *ERR to either -1 for error, or 1 if
    Z_TYPE breakpoints are not supported on this target.  */
 
-struct breakpoint *set_gdb_breakpoint (char z_type, CORE_ADDR addr, int size,
-				       int *err);
+struct gdb_breakpoint *set_gdb_breakpoint (char z_type, CORE_ADDR addr,
+					   int kind, int *err);
 
-/* Delete a GDB breakpoint of type Z_TYPE and size SIZE previously
+/* Delete a GDB breakpoint of type Z_TYPE and kind KIND previously
    inserted at ADDR with set_gdb_breakpoint_at.  Returns 0 on success,
    -1 on error, and 1 if Z_TYPE breakpoints are not supported on this
    target.  */
 
-int delete_gdb_breakpoint (char z_type, CORE_ADDR addr, int size);
+int delete_gdb_breakpoint (char z_type, CORE_ADDR addr, int kind);
 
 /* Returns TRUE if there's a software or hardware (code) breakpoint at
    ADDR in our tables, inserted, or not.  */
@@ -100,23 +101,27 @@ int software_breakpoint_inserted_here (C
 
 int hardware_breakpoint_inserted_here (CORE_ADDR addr);
 
+/* Returns TRUE if there's any single-step breakpoint at ADDR.  */
+
+int single_step_breakpoint_inserted_here (CORE_ADDR addr);
+
 /* Clear all breakpoint conditions and commands associated with a
    breakpoint.  */
 
-void clear_breakpoint_conditions_and_commands (struct breakpoint *bp);
+void clear_breakpoint_conditions_and_commands (struct gdb_breakpoint *bp);
 
 /* Set target-side condition CONDITION to the breakpoint at ADDR.
    Returns false on failure.  On success, advances CONDITION pointer
    past the condition and returns true.  */
 
-int add_breakpoint_condition (struct breakpoint *bp, char **condition);
+int add_breakpoint_condition (struct gdb_breakpoint *bp, char **condition);
 
 /* Set target-side commands COMMANDS to the breakpoint at ADDR.
    Returns false on failure.  On success, advances COMMANDS past the
    commands and returns true.  If PERSIST, the commands should run
    even while GDB is disconnected.  */
 
-int add_breakpoint_commands (struct breakpoint *bp, char **commands,
+int add_breakpoint_commands (struct gdb_breakpoint *bp, char **commands,
 			     int persist);
 
 int any_persistent_commands (void);
@@ -137,7 +142,8 @@ int gdb_breakpoint_here (CORE_ADDR where
 
 /* Create a new breakpoint at WHERE, and call HANDLER when
    it is hit.  HANDLER should return 1 if the breakpoint
-   should be deleted, 0 otherwise.  */
+   should be deleted, 0 otherwise.  The type of the created
+   breakpoint is other_breakpoint.  */
 
 struct breakpoint *set_breakpoint_at (CORE_ADDR where,
 				      int (*handler) (CORE_ADDR));
@@ -146,19 +152,33 @@ struct breakpoint *set_breakpoint_at (CO
 
 int delete_breakpoint (struct breakpoint *bkpt);
 
-/* Set a reinsert breakpoint at STOP_AT.  */
+/* Set a single-step breakpoint at STOP_AT for thread represented by
+   PTID.  */
+
+void set_single_step_breakpoint (CORE_ADDR stop_at, ptid_t ptid);
+
+/* Delete all single-step breakpoints of THREAD.  */
+
+void delete_single_step_breakpoints (struct thread_info *thread);
 
-void set_reinsert_breakpoint (CORE_ADDR stop_at);
+/* Reinsert all single-step breakpoints of THREAD.  */
 
-/* Delete all reinsert breakpoints.  */
+void reinsert_single_step_breakpoints (struct thread_info *thread);
 
-void delete_reinsert_breakpoints (void);
+/* Uninsert all single-step breakpoints of THREAD.  This still leaves
+   the single-step breakpoints in the table.  */
+
+void uninsert_single_step_breakpoints (struct thread_info *thread);
 
 /* Reinsert breakpoints at WHERE (and change their status to
    inserted).  */
 
 void reinsert_breakpoints_at (CORE_ADDR where);
 
+/* The THREAD has single-step breakpoints or not.  */
+
+int has_single_step_breakpoints (struct thread_info *thread);
+
 /* Uninsert breakpoints at WHERE (and change their status to
    uninserted).  This still leaves the breakpoints in the table.  */
 
@@ -194,11 +214,6 @@ void check_mem_read (CORE_ADDR mem_addr,
 void check_mem_write (CORE_ADDR mem_addr,
 		      unsigned char *buf, const unsigned char *myaddr, int mem_len);
 
-/* Set the byte pattern to insert for memory breakpoints.  This function
-   must be called before any breakpoints are set.  */
-
-void set_breakpoint_data (const unsigned char *bp_data, int bp_len);
-
 /* Delete all breakpoints.  */
 
 void delete_all_breakpoints (void);
@@ -253,10 +268,10 @@ int insert_memory_breakpoint (struct raw
 
 int remove_memory_breakpoint (struct raw_breakpoint *bp);
 
-/* Create a new breakpoint list NEW_BKPT_LIST that is a copy of SRC.  */
+/* Create a new breakpoint list in CHILD_THREAD's process that is a
+   copy of breakpoint list in PARENT_THREAD's process.  */
 
-void clone_all_breakpoints (struct breakpoint **new_bkpt_list,
-			    struct raw_breakpoint **new_raw_bkpt_list,
-			    const struct breakpoint *src);
+void clone_all_breakpoints (struct thread_info *child_thread,
+			    const struct thread_info *parent_thread);
 
 #endif /* MEM_BREAK_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/notif.c ./gdb/gdbserver/notif.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/notif.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/notif.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Notification to GDB.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -104,8 +104,8 @@ handle_notif_ack (char *own_buf, int pac
 	= QUEUE_deque (notif_event_p, np->queue);
 
       if (remote_debug)
-	fprintf (stderr, "%s: acking %d\n", np->ack_name,
-		 QUEUE_length (notif_event_p, np->queue));
+	debug_printf ("%s: acking %d\n", np->ack_name,
+		      QUEUE_length (notif_event_p, np->queue));
 
       xfree (head);
     }
@@ -124,8 +124,8 @@ notif_event_enque (struct notif_server *
   QUEUE_enque (notif_event_p, notif->queue, event);
 
   if (remote_debug)
-    fprintf (stderr, "pending events: %s %d\n", notif->notif_name,
-	     QUEUE_length (notif_event_p, notif->queue));
+    debug_printf ("pending events: %s %d\n", notif->notif_name,
+		  QUEUE_length (notif_event_p, notif->queue));
 
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/notif.h ./gdb/gdbserver/notif.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/notif.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/notif.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Notification to GDB.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-low.c ./gdb/gdbserver/nto-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/nto-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* QNX Neutrino specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -794,7 +794,7 @@ nto_insert_point (enum raw_bkpt_type typ
 {
   int wtype = _DEBUG_BREAK_HW; /* Always request HW.  */
 
-  TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len);
+  TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, size);
   switch (type)
     {
     case raw_bkpt_type_sw:
@@ -826,7 +826,7 @@ nto_remove_point (enum raw_bkpt_type typ
 {
   int wtype = _DEBUG_BREAK_HW; /* Always request HW.  */
 
-  TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len);
+  TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, size);
   switch (type)
     {
     case raw_bkpt_type_sw:
@@ -921,10 +921,19 @@ nto_supports_non_stop (void)
   return 0;
 }
 
+/* Implementation of the target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+nto_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = the_low_target.breakpoint_len;
+  return the_low_target.breakpoint;
+}
 
 
 static struct target_ops nto_target_ops = {
   nto_create_inferior,
+  NULL,  /* post_create_inferior */
   nto_attach,
   nto_kill,
   nto_detach,
@@ -949,10 +958,7 @@ static struct target_ops nto_target_ops 
   NULL, /* supports_stopped_by_sw_breakpoint */
   NULL, /* stopped_by_hw_breakpoint */
   NULL, /* supports_stopped_by_hw_breakpoint */
-  /* Although nto has hardware single step, still disable this
-     feature for not, because it is implemented in linux-low.c instead
-     of in generic code.  */
-  NULL, /* supports_conditional_breakpoints */
+  target_can_do_hardware_single_step,
   nto_stopped_by_watchpoint,
   nto_stopped_data_address,
   NULL, /* nto_read_offsets */
@@ -963,7 +969,42 @@ static struct target_ops nto_target_ops 
   NULL, /* xfer_siginfo */
   nto_supports_non_stop,
   NULL, /* async */
-  NULL  /* start_non_stop */
+  NULL, /* start_non_stop */
+  NULL, /* supports_multi_process */
+  NULL, /* supports_fork_events */
+  NULL, /* supports_vfork_events */
+  NULL, /* supports_exec_events */
+  NULL, /* handle_new_gdb_connection */
+  NULL, /* handle_monitor_command */
+  NULL, /* core_of_thread */
+  NULL, /* read_loadmap */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* read_pc */
+  NULL, /* write_pc */
+  NULL, /* thread_stopped */
+  NULL, /* get_tib_address */
+  NULL, /* pause_all */
+  NULL, /* unpause_all */
+  NULL, /* stabilize_threads */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* supports_disable_randomization */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* qxfer_libraries_svr4 */
+  NULL, /* support_agent */
+  NULL, /* support_btrace */
+  NULL, /* enable_btrace */
+  NULL, /* disable_btrace */
+  NULL, /* read_btrace */
+  NULL, /* read_btrace_conf */
+  NULL, /* supports_range_stepping */
+  NULL, /* pid_to_exec_file */
+  NULL, /* multifs_open */
+  NULL, /* multifs_unlink */
+  NULL, /* multifs_readlink */
+  NULL, /* breakpoint_kind_from_pc */
+  nto_sw_breakpoint_from_kind,
 };
 
 
@@ -977,8 +1018,6 @@ initialize_low (void)
 
   TRACE ("%s\n", __func__);
   set_target_ops (&nto_target_ops);
-  set_breakpoint_data (the_low_target.breakpoint,
-		       the_low_target.breakpoint_len);
 
   /* We use SIGUSR1 to gain control after we block waiting for a process.
      We use sigwaitevent to wait.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-low.h ./gdb/gdbserver/nto-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/nto-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Internal interfaces for the QNX Neutrino specific target code for gdbserver.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-x86-low.c ./gdb/gdbserver/nto-x86-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/nto-x86-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/nto-x86-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* QNX Neutrino specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +25,7 @@
 #include <x86/context.h>
 
 
-/* Definition auto generated from reg-i386.dep.  */
+/* Defined in auto-generated build-time file gdb/gdbserver/i386.c.  */
 extern void init_registers_i386 ();
 extern struct reg *regs_i386;
 extern const struct target_desc *tdesc_i386;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/proc-service.c ./gdb/gdbserver/proc-service.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/proc-service.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/proc-service.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* libthread_db helper functions for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -80,7 +80,7 @@ ps_err_e
 ps_pdread (gdb_ps_prochandle_t ph, psaddr_t addr,
 	   gdb_ps_read_buf_t buf, gdb_ps_size_t size)
 {
-  read_inferior_memory ((unsigned long) addr, buf, size);
+  read_inferior_memory ((uintptr_t) addr, (gdb_byte *) buf, size);
   return PS_OK;
 }
 
@@ -90,7 +90,10 @@ ps_err_e
 ps_pdwrite (gdb_ps_prochandle_t ph, psaddr_t addr,
 	    gdb_ps_write_buf_t buf, gdb_ps_size_t size)
 {
-  return write_inferior_memory ((unsigned long) addr, buf, size);
+  if (write_inferior_memory ((uintptr_t) addr, (const gdb_byte *) buf, size)
+      != 0)
+    return PS_ERR;
+  return PS_OK;
 }
 
 /* Get the general registers of LWP LWPID within the target process PH
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/proc-service.list ./gdb/gdbserver/proc-service.list
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/proc-service.list	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/proc-service.list	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* -Wl,--dynamic-list symbols exported for libthread_db.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/regcache.c ./gdb/gdbserver/regcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/regcache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/regcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Register support routines for the remote server for GDB.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,7 +28,7 @@ get_thread_regcache (struct thread_info 
 {
   struct regcache *regcache;
 
-  regcache = (struct regcache *) inferior_regcache_data (thread);
+  regcache = inferior_regcache_data (thread);
 
   /* Threads' regcaches are created lazily, because biarch targets add
      the main thread/lwp before seeing it stop for the first time, and
@@ -76,7 +76,7 @@ regcache_invalidate_thread (struct threa
 {
   struct regcache *regcache;
 
-  regcache = (struct regcache *) inferior_regcache_data (thread);
+  regcache = inferior_regcache_data (thread);
 
   if (regcache == NULL)
     return;
@@ -107,13 +107,23 @@ regcache_invalidate_one (struct inferior
   return 0;
 }
 
+/* See regcache.h.  */
+
+void
+regcache_invalidate_pid (int pid)
+{
+  find_inferior (&all_threads, regcache_invalidate_one, &pid);
+}
+
+/* See regcache.h.  */
+
 void
 regcache_invalidate (void)
 {
   /* Only update the threads of the current process.  */
   int pid = ptid_get_pid (current_thread->entry.id);
 
-  find_inferior (&all_threads, regcache_invalidate_one, &pid);
+  regcache_invalidate_pid (pid);
 }
 
 #endif
@@ -131,10 +141,13 @@ init_register_cache (struct regcache *re
 	 fetches.  This way they'll read as zero instead of
 	 garbage.  */
       regcache->tdesc = tdesc;
-      regcache->registers = xcalloc (1, tdesc->registers_size);
+      regcache->registers
+	= (unsigned char *) xcalloc (1, tdesc->registers_size);
       regcache->registers_owned = 1;
-      regcache->register_status = xcalloc (1, tdesc->num_registers);
-      gdb_assert (REG_UNAVAILABLE == 0);
+      regcache->register_status
+	= (unsigned char *) xmalloc (tdesc->num_registers);
+      memset ((void *) regcache->register_status, REG_UNAVAILABLE,
+	      tdesc->num_registers);
 #else
       gdb_assert_not_reached ("can't allocate memory from the heap");
 #endif
@@ -159,11 +172,10 @@ init_register_cache (struct regcache *re
 struct regcache *
 new_register_cache (const struct target_desc *tdesc)
 {
-  struct regcache *regcache;
+  struct regcache *regcache = XCNEW (struct regcache);
 
   gdb_assert (tdesc->registers_size != 0);
 
-  regcache = xmalloc (sizeof (*regcache));
   return init_register_cache (regcache, tdesc, NULL);
 }
 
@@ -241,18 +253,6 @@ registers_from_string (struct regcache *
   hex2bin (buf, registers, len / 2);
 }
 
-struct reg *
-find_register_by_name (const struct target_desc *tdesc, const char *name)
-{
-  int i;
-
-  for (i = 0; i < tdesc->num_registers; i++)
-    if (strcmp (name, tdesc->reg_defs[i].name) == 0)
-      return &tdesc->reg_defs[i];
-  internal_error (__FILE__, __LINE__, "Unknown register %s requested",
-		  name);
-}
-
 int
 find_regno (const struct target_desc *tdesc, const char *name)
 {
@@ -277,8 +277,7 @@ find_register_by_number (const struct ta
 static void
 free_register_cache_thread (struct thread_info *thread)
 {
-  struct regcache *regcache
-    = (struct regcache *) inferior_regcache_data (thread);
+  struct regcache *regcache = inferior_regcache_data (thread);
 
   if (regcache != NULL)
     {
@@ -316,6 +315,14 @@ register_size (const struct target_desc 
   return tdesc->reg_defs[n].size / 8;
 }
 
+/* See common/common-regcache.h.  */
+
+int
+regcache_register_size (const struct regcache *regcache, int n)
+{
+  return register_size (regcache->tdesc, n);
+}
+
 static unsigned char *
 register_data (struct regcache *regcache, int n, int fetch)
 {
@@ -417,6 +424,28 @@ collect_register (struct regcache *regca
 	  register_size (regcache->tdesc, n));
 }
 
+enum register_status
+regcache_raw_read_unsigned (struct regcache *regcache, int regnum,
+			    ULONGEST *val)
+{
+  int size;
+
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->tdesc->num_registers);
+
+  size = register_size (regcache->tdesc, regnum);
+
+  if (size > (int) sizeof (ULONGEST))
+    error (_("That operation is not available on integers of more than"
+            "%d bytes."),
+          (int) sizeof (ULONGEST));
+
+  *val = 0;
+  collect_register (regcache, regnum, val);
+
+  return REG_VALID;
+}
+
 #ifndef IN_PROCESS_AGENT
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/regcache.h ./gdb/gdbserver/regcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/regcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/regcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Register support routines for the remote server for GDB.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,13 +24,6 @@
 struct thread_info;
 struct target_desc;
 
-/* The register exists, it has a value, but we don't know what it is.
-   Used when inspecting traceframes.  */
-#define REG_UNAVAILABLE 0
-
-/* We know the register's value (and we have it cached).  */
-#define REG_VALID 1
-
 /* The data for the register cache.  Note that we have one per
    inferior; this is primarily for simplicity, as the performance
    benefit is minimal.  */
@@ -74,6 +67,10 @@ void free_register_cache (struct regcach
 
 void regcache_invalidate_thread (struct thread_info *);
 
+/* Invalidate cached registers for all threads of the given process.  */
+
+void regcache_invalidate_pid (int pid);
+
 /* Invalidate cached registers for all threads of the current
    process.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/remote-utils.c ./gdb/gdbserver/remote-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/remote-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/remote-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote utility routines for the remote server for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -51,7 +51,7 @@
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #include <unistd.h>
 #if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
@@ -402,6 +402,11 @@ remote_close (void)
 {
   delete_file_handler (remote_desc);
 
+#ifndef USE_WIN32API
+  /* Remove SIGIO handler.  */
+  signal (SIGIO, SIG_IGN);
+#endif
+
 #ifdef USE_WIN32API
   closesocket (remote_desc);
 #else
@@ -526,7 +531,7 @@ write_ptid (char *buf, ptid_t ptid)
   return buf;
 }
 
-ULONGEST
+static ULONGEST
 hex_or_minus_one (char *buf, char **obuf)
 {
   ULONGEST ret;
@@ -573,9 +578,10 @@ read_ptid (char *buf, char **obuf)
   /* No multi-process.  Just a tid.  */
   tid = hex_or_minus_one (p, &pp);
 
-  /* Since the stub is not sending a process id, then default to
-     what's in the current inferior.  */
-  pid = ptid_get_pid (current_ptid);
+  /* Since GDB is not sending a process id (multi-process extensions
+     are off), then there's only one process.  Default to the first in
+     the list.  */
+  pid = pid_of (get_first_process ());
 
   if (obuf)
     *obuf = pp;
@@ -621,7 +627,7 @@ putpkt_binary_1 (char *buf, int cnt, int
   char *p;
   int cc;
 
-  buf2 = xmalloc (strlen ("$") + cnt + strlen ("#nn") + 1);
+  buf2 = (char *) xmalloc (strlen ("$") + cnt + strlen ("#nn") + 1);
 
   /* Copy the packet into buffer BUF2, encapsulating it
      and giving it a checksum.  */
@@ -658,18 +664,18 @@ putpkt_binary_1 (char *buf, int cnt, int
 	  if (remote_debug)
 	    {
 	      if (is_notif)
-		fprintf (stderr, "putpkt (\"%s\"); [notif]\n", buf2);
+		debug_printf ("putpkt (\"%s\"); [notif]\n", buf2);
 	      else
-		fprintf (stderr, "putpkt (\"%s\"); [noack mode]\n", buf2);
-	      fflush (stderr);
+		debug_printf ("putpkt (\"%s\"); [noack mode]\n", buf2);
+	      debug_flush ();
 	    }
 	  break;
 	}
 
       if (remote_debug)
 	{
-	  fprintf (stderr, "putpkt (\"%s\"); [looking for ack]\n", buf2);
-	  fflush (stderr);
+	  debug_printf ("putpkt (\"%s\"); [looking for ack]\n", buf2);
+	  debug_flush ();
 	}
 
       cc = readchar ();
@@ -682,8 +688,8 @@ putpkt_binary_1 (char *buf, int cnt, int
 
       if (remote_debug)
 	{
-	  fprintf (stderr, "[received '%c' (0x%x)]\n", cc, cc);
-	  fflush (stderr);
+	  debug_printf ("[received '%c' (0x%x)]\n", cc, cc);
+	  debug_flush ();
 	}
 
       /* Check for an input interrupt while we're here.  */
@@ -747,7 +753,7 @@ input_interrupt (int unused)
 	  fprintf (stderr, "client connection closed\n");
 	  return;
 	}
-      else if (cc != 1 || c != '\003' || current_thread == NULL)
+      else if (cc != 1 || c != '\003')
 	{
 	  fprintf (stderr, "input_interrupt, count = %d c = %d ", cc, c);
 	  if (isprint (c))
@@ -774,19 +780,19 @@ check_remote_input_interrupt_request (vo
   input_interrupt (0);
 }
 
-/* Asynchronous I/O support.  SIGIO must be enabled when waiting, in order to
-   accept Control-C from the client, and must be disabled when talking to
-   the client.  */
+/* Asynchronous I/O support.  SIGIO must be unblocked when waiting,
+   in order to accept Control-C from the client, and must be blocked
+   when talking to the client.  */
 
 static void
-unblock_async_io (void)
+block_unblock_async_io (int block)
 {
 #ifndef USE_WIN32API
   sigset_t sigio_set;
 
   sigemptyset (&sigio_set);
   sigaddset (&sigio_set, SIGIO);
-  sigprocmask (SIG_UNBLOCK, &sigio_set, NULL);
+  sigprocmask (block ? SIG_BLOCK : SIG_UNBLOCK, &sigio_set, NULL);
 #endif
 }
 
@@ -822,9 +828,8 @@ enable_async_io (void)
   if (async_io_enabled)
     return;
 
-#ifndef USE_WIN32API
-  signal (SIGIO, input_interrupt);
-#endif
+  block_unblock_async_io (0);
+
   async_io_enabled = 1;
 #ifdef __QNX__
   nto_comctrl (1);
@@ -838,9 +843,8 @@ disable_async_io (void)
   if (!async_io_enabled)
     return;
 
-#ifndef USE_WIN32API
-  signal (SIGIO, SIG_IGN);
-#endif
+  block_unblock_async_io (1);
+
   async_io_enabled = 0;
 #ifdef __QNX__
   nto_comctrl (0);
@@ -851,12 +855,14 @@ disable_async_io (void)
 void
 initialize_async_io (void)
 {
-  /* Make sure that async I/O starts disabled.  */
+  /* Make sure that async I/O starts blocked.  */
   async_io_enabled = 1;
   disable_async_io ();
 
-  /* Make sure the signal is unblocked.  */
-  unblock_async_io ();
+  /* Install the signal handler.  */
+#ifndef USE_WIN32API
+  signal (SIGIO, input_interrupt);
+#endif
 }
 
 /* Internal buffer used by readchar.
@@ -881,7 +887,10 @@ readchar (void)
       if (readchar_bufcnt <= 0)
 	{
 	  if (readchar_bufcnt == 0)
-	    fprintf (stderr, "readchar: Got EOF\n");
+	    {
+	      if (remote_debug)
+		debug_printf ("readchar: Got EOF\n");
+	    }
 	  else
 	    perror ("readchar");
 
@@ -955,12 +964,21 @@ getpkt (char *buf)
       while (1)
 	{
 	  c = readchar ();
+
+	  /* The '\003' may appear before or after each packet, so
+	     check for an input interrupt.  */
+	  if (c == '\003')
+	    {
+	      (*the_target->request_interrupt) ();
+	      continue;
+	    }
+
 	  if (c == '$')
 	    break;
 	  if (remote_debug)
 	    {
-	      fprintf (stderr, "[getpkt: discarding char '%c']\n", c);
-	      fflush (stderr);
+	      debug_printf ("[getpkt: discarding char '%c']\n", c);
+	      debug_flush ();
 	    }
 
 	  if (c < 0)
@@ -1006,8 +1024,8 @@ getpkt (char *buf)
     {
       if (remote_debug)
 	{
-	  fprintf (stderr, "getpkt (\"%s\");  [sending ack] \n", buf);
-	  fflush (stderr);
+	  debug_printf ("getpkt (\"%s\");  [sending ack] \n", buf);
+	  debug_flush ();
 	}
 
       if (write_prim ("+", 1) != 1)
@@ -1015,19 +1033,35 @@ getpkt (char *buf)
 
       if (remote_debug)
 	{
-	  fprintf (stderr, "[sent ack]\n");
-	  fflush (stderr);
+	  debug_printf ("[sent ack]\n");
+	  debug_flush ();
 	}
     }
   else
     {
       if (remote_debug)
 	{
-	  fprintf (stderr, "getpkt (\"%s\");  [no ack sent] \n", buf);
-	  fflush (stderr);
+	  debug_printf ("getpkt (\"%s\");  [no ack sent] \n", buf);
+	  debug_flush ();
 	}
     }
 
+  /* The readchar above may have already read a '\003' out of the socket
+     and moved it to the local buffer.  For example, when GDB sends
+     vCont;c immediately followed by interrupt (see
+     gdb.base/interrupt-noterm.exp).  As soon as we see the vCont;c, we'll
+     resume the inferior and wait.  Since we've already moved the '\003'
+     to the local buffer, SIGIO won't help.  In that case, if we don't
+     check for interrupt after the vCont;c packet, the interrupt character
+     would stay in the buffer unattended until after the next (unrelated)
+     stop.  */
+  while (readchar_bufcnt > 0 && *readchar_bufp == '\003')
+    {
+      /* Consume the interrupt character in the buffer.  */
+      readchar ();
+      (*the_target->request_interrupt) ();
+    }
+
   return bp - buf;
 }
 
@@ -1071,39 +1105,6 @@ outreg (struct regcache *regcache, int r
 }
 
 void
-new_thread_notify (int id)
-{
-  char own_buf[256];
-
-  /* The `n' response is not yet part of the remote protocol.  Do nothing.  */
-  if (1)
-    return;
-
-  if (server_waiting == 0)
-    return;
-
-  sprintf (own_buf, "n%x", id);
-  disable_async_io ();
-  putpkt (own_buf);
-  enable_async_io ();
-}
-
-void
-dead_thread_notify (int id)
-{
-  char own_buf[256];
-
-  /* The `x' response is not yet part of the remote protocol.  Do nothing.  */
-  if (1)
-    return;
-
-  sprintf (own_buf, "x%x", id);
-  disable_async_io ();
-  putpkt (own_buf);
-  enable_async_io ();
-}
-
-void
 prepare_resume_reply (char *buf, ptid_t ptid,
 		      struct target_waitstatus *status)
 {
@@ -1116,6 +1117,11 @@ prepare_resume_reply (char *buf, ptid_t 
     case TARGET_WAITKIND_STOPPED:
     case TARGET_WAITKIND_FORKED:
     case TARGET_WAITKIND_VFORKED:
+    case TARGET_WAITKIND_VFORK_DONE:
+    case TARGET_WAITKIND_EXECD:
+    case TARGET_WAITKIND_THREAD_CREATED:
+    case TARGET_WAITKIND_SYSCALL_ENTRY:
+    case TARGET_WAITKIND_SYSCALL_RETURN:
       {
 	struct thread_info *saved_thread;
 	const char **regp;
@@ -1133,6 +1139,48 @@ prepare_resume_reply (char *buf, ptid_t 
 	    buf = write_ptid (buf, status->value.related_pid);
 	    strcat (buf, ";");
 	  }
+	else if (status->kind == TARGET_WAITKIND_VFORK_DONE && report_vfork_events)
+	  {
+	    enum gdb_signal signal = GDB_SIGNAL_TRAP;
+
+	    sprintf (buf, "T%02xvforkdone:;", signal);
+	  }
+	else if (status->kind == TARGET_WAITKIND_EXECD && report_exec_events)
+	  {
+	    enum gdb_signal signal = GDB_SIGNAL_TRAP;
+	    const char *event = "exec";
+	    char hexified_pathname[PATH_MAX * 2];
+
+	    sprintf (buf, "T%02x%s:", signal, event);
+	    buf += strlen (buf);
+
+	    /* Encode pathname to hexified format.  */
+	    bin2hex ((const gdb_byte *) status->value.execd_pathname,
+		     hexified_pathname,
+		     strlen (status->value.execd_pathname));
+
+	    sprintf (buf, "%s;", hexified_pathname);
+	    xfree (status->value.execd_pathname);
+	    status->value.execd_pathname = NULL;
+	    buf += strlen (buf);
+	  }
+	else if (status->kind == TARGET_WAITKIND_THREAD_CREATED
+		 && report_thread_events)
+	  {
+	    enum gdb_signal signal = GDB_SIGNAL_TRAP;
+
+	    sprintf (buf, "T%02xcreate:;", signal);
+	  }
+	else if (status->kind == TARGET_WAITKIND_SYSCALL_ENTRY
+		 || status->kind == TARGET_WAITKIND_SYSCALL_RETURN)
+	  {
+	    enum gdb_signal signal = GDB_SIGNAL_TRAP;
+	    const char *event = (status->kind == TARGET_WAITKIND_SYSCALL_ENTRY
+				 ? "syscall_entry" : "syscall_return");
+
+	    sprintf (buf, "T%02x%s:%x;", signal, event,
+		     status->value.syscall_number);
+	  }
 	else
 	  sprintf (buf, "T%02x", status->value.sig);
 
@@ -1248,15 +1296,13 @@ prepare_resume_reply (char *buf, ptid_t 
       else
 	sprintf (buf, "X%02x", status->value.sig);
       break;
-    case TARGET_WAITKIND_VFORK_DONE:
-      if (report_vfork_events)
-	{
-	  enum gdb_signal signal = GDB_SIGNAL_TRAP;
-
-	  sprintf (buf, "T%02xvforkdone:;", signal);
-	}
-      else
-	sprintf (buf, "T%02x", GDB_SIGNAL_0);
+    case TARGET_WAITKIND_THREAD_EXITED:
+      sprintf (buf, "w%x;", status->value.integer);
+      buf += strlen (buf);
+      buf = write_ptid (buf, ptid);
+      break;
+    case TARGET_WAITKIND_NO_RESUMED:
+      sprintf (buf, "N");
       break;
     default:
       error ("unhandled waitkind");
@@ -1307,7 +1353,7 @@ decode_M_packet (char *from, CORE_ADDR *
     }
 
   if (*to_p == NULL)
-    *to_p = xmalloc (*len_ptr);
+    *to_p = (unsigned char *) xmalloc (*len_ptr);
 
   hex2bin (&from[i++], *to_p, *len_ptr);
 }
@@ -1333,7 +1379,7 @@ decode_X_packet (char *from, int packet_
     }
 
   if (*to_p == NULL)
-    *to_p = xmalloc (*len_ptr);
+    *to_p = (unsigned char *) xmalloc (*len_ptr);
 
   if (remote_unescape_input ((const gdb_byte *) &from[i], packet_len - i,
 			     *to_p, *len_ptr) != *len_ptr)
@@ -1416,7 +1462,7 @@ clear_symbol_cache (struct sym_cache **s
 int
 look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb)
 {
-  char own_buf[266], *p, *q;
+  char *p, *q;
   int len;
   struct sym_cache *sym;
   struct process_info *proc;
@@ -1451,23 +1497,37 @@ look_up_one_symbol (const char *name, CO
   /* We ought to handle pretty much any packet at this point while we
      wait for the qSymbol "response".  That requires re-entering the
      main loop.  For now, this is an adequate approximation; allow
-     GDB to read from memory while it figures out the address of the
-     symbol.  */
-  while (own_buf[0] == 'm')
+     GDB to read from memory and handle 'v' packets (for vFile transfers)
+     while it figures out the address of the symbol.  */
+  while (1)
     {
-      CORE_ADDR mem_addr;
-      unsigned char *mem_buf;
-      unsigned int mem_len;
+      if (own_buf[0] == 'm')
+	{
+	  CORE_ADDR mem_addr;
+	  unsigned char *mem_buf;
+	  unsigned int mem_len;
 
-      decode_m_packet (&own_buf[1], &mem_addr, &mem_len);
-      mem_buf = xmalloc (mem_len);
-      if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
-	bin2hex (mem_buf, own_buf, mem_len);
+	  decode_m_packet (&own_buf[1], &mem_addr, &mem_len);
+	  mem_buf = (unsigned char *) xmalloc (mem_len);
+	  if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
+	    bin2hex (mem_buf, own_buf, mem_len);
+	  else
+	    write_enn (own_buf);
+	  free (mem_buf);
+	  if (putpkt (own_buf) < 0)
+	    return -1;
+	}
+      else if (own_buf[0] == 'v')
+	{
+	  int new_len = -1;
+	  handle_v_requests (own_buf, len, &new_len);
+	  if (new_len != -1)
+	    putpkt_binary (own_buf, new_len);
+	  else
+	    putpkt (own_buf);
+	}
       else
-	write_enn (own_buf);
-      free (mem_buf);
-      if (putpkt (own_buf) < 0)
-	return -1;
+	break;
       len = getpkt (own_buf);
       if (len < 0)
 	return -1;
@@ -1491,7 +1551,7 @@ look_up_one_symbol (const char *name, CO
   decode_address (addrp, p, q - p);
 
   /* Save the symbol in our cache.  */
-  sym = xmalloc (sizeof (*sym));
+  sym = XNEW (struct sym_cache);
   sym->name = xstrdup (name);
   sym->addr = *addrp;
   sym->next = proc->symbol_cache;
@@ -1515,12 +1575,10 @@ look_up_one_symbol (const char *name, CO
 int
 relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
 {
-  char own_buf[266];
   int len;
   ULONGEST written = 0;
 
   /* Send the request.  */
-  strcpy (own_buf, "qRelocInsn:");
   sprintf (own_buf, "qRelocInsn:%s;%s", paddress (oldloc),
 	   paddress (*to));
   if (putpkt (own_buf) < 0)
@@ -1544,7 +1602,7 @@ relocate_instruction (CORE_ADDR *to, COR
       if (own_buf[0] == 'm')
 	{
 	  decode_m_packet (&own_buf[1], &mem_addr, &mem_len);
-	  mem_buf = xmalloc (mem_len);
+	  mem_buf = (unsigned char *) xmalloc (mem_len);
 	  if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
 	    bin2hex (mem_buf, own_buf, mem_len);
 	  else
@@ -1599,7 +1657,7 @@ void
 monitor_output (const char *msg)
 {
   int len = strlen (msg);
-  char *buf = xmalloc (len * 2 + 2);
+  char *buf = (char *) xmalloc (len * 2 + 2);
 
   buf[0] = 'O';
   bin2hex ((const gdb_byte *) msg, buf + 1, len);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/remote-utils.h ./gdb/gdbserver/remote-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/remote-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/remote-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote utility routines for the remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,8 +44,6 @@ void initialize_async_io (void);
 void enable_async_io (void);
 void disable_async_io (void);
 void check_remote_input_interrupt_request (void);
-void new_thread_notify (int id);
-void dead_thread_notify (int id);
 void prepare_resume_reply (char *buf, ptid_t ptid,
 			   struct target_waitstatus *status);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/server.c ./gdb/gdbserver/server.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/server.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/server.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Main code for remote server for GDB.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,7 @@
 #include "notif.h"
 #include "tdesc.h"
 #include "rsp-low.h"
-
+#include "signals-state-save-restore.h"
 #include <ctype.h>
 #include <unistd.h>
 #if HAVE_SIGNAL_H
@@ -59,10 +59,21 @@ int run_once;
 int multi_process;
 int report_fork_events;
 int report_vfork_events;
+int report_exec_events;
+int report_thread_events;
+
+/* Whether to report TARGET_WAITKING_NO_RESUMED events.  */
+static int report_no_resumed;
+
 int non_stop;
 int swbreak_feature;
 int hwbreak_feature;
 
+/* True if the "vContSupported" feature is active.  In that case, GDB
+   wants us to report whether single step is supported in the reply to
+   "vCont?" packet.  */
+static int vCont_supported;
+
 /* Whether we should attempt to disable the operating system's address
    space randomization feature before starting an inferior.  */
 int disable_randomization = 1;
@@ -108,7 +119,7 @@ int disable_packet_qfThreadInfo;
 static struct target_waitstatus last_status;
 static ptid_t last_ptid;
 
-static char *own_buf;
+char *own_buf;
 static unsigned char *mem_buf;
 
 /* A sub-class of 'struct notif_event' for stop, holding information
@@ -137,7 +148,7 @@ DEFINE_QUEUE_P (notif_event_p);
 static void
 queue_stop_reply (ptid_t ptid, struct target_waitstatus *status)
 {
-  struct vstop_notif *new_notif = xmalloc (sizeof (*new_notif));
+  struct vstop_notif *new_notif = XNEW (struct vstop_notif);
 
   new_notif->ptid = ptid;
   new_notif->status = *status;
@@ -146,15 +157,15 @@ queue_stop_reply (ptid_t ptid, struct ta
 }
 
 static int
-remove_all_on_match_pid (QUEUE (notif_event_p) *q,
-			    QUEUE_ITER (notif_event_p) *iter,
-			    struct notif_event *event,
-			    void *data)
+remove_all_on_match_ptid (QUEUE (notif_event_p) *q,
+			  QUEUE_ITER (notif_event_p) *iter,
+			  struct notif_event *event,
+			  void *data)
 {
-  int *pid = data;
+  ptid_t filter_ptid = *(ptid_t *) data;
+  struct vstop_notif *vstop_event = (struct vstop_notif *) event;
 
-  if (*pid == -1
-      || ptid_get_pid (((struct vstop_notif *) event)->ptid) == *pid)
+  if (ptid_match (vstop_event->ptid, filter_ptid))
     {
       if (q->free_func != NULL)
 	q->free_func (event);
@@ -165,14 +176,13 @@ remove_all_on_match_pid (QUEUE (notif_ev
   return 1;
 }
 
-/* Get rid of the currently pending stop replies for PID.  If PID is
-   -1, then apply to all processes.  */
+/* See server.h.  */
 
-static void
-discard_queued_stop_replies (int pid)
+void
+discard_queued_stop_replies (ptid_t ptid)
 {
   QUEUE_iterate (notif_event_p, notif_stop.queue,
-		 remove_all_on_match_pid, &pid);
+		 remove_all_on_match_ptid, &ptid);
 }
 
 static void
@@ -183,6 +193,38 @@ vstop_notif_reply (struct notif_event *e
   prepare_resume_reply (own_buf, vstop->ptid, &vstop->status);
 }
 
+/* QUEUE_iterate callback helper for in_queued_stop_replies.  */
+
+static int
+in_queued_stop_replies_ptid (QUEUE (notif_event_p) *q,
+			     QUEUE_ITER (notif_event_p) *iter,
+			     struct notif_event *event,
+			     void *data)
+{
+  ptid_t filter_ptid = *(ptid_t *) data;
+  struct vstop_notif *vstop_event = (struct vstop_notif *) event;
+
+  if (ptid_match (vstop_event->ptid, filter_ptid))
+    return 0;
+
+  /* Don't resume fork children that GDB does not know about yet.  */
+  if ((vstop_event->status.kind == TARGET_WAITKIND_FORKED
+       || vstop_event->status.kind == TARGET_WAITKIND_VFORKED)
+      && ptid_match (vstop_event->status.value.related_pid, filter_ptid))
+    return 0;
+
+  return 1;
+}
+
+/* See server.h.  */
+
+int
+in_queued_stop_replies (ptid_t ptid)
+{
+  return !QUEUE_iterate (notif_event_p, notif_stop.queue,
+			 in_queued_stop_replies_ptid, &ptid);
+}
+
 struct notif_server notif_stop =
 {
   "vStopped", "Stop", NULL, vstop_notif_reply,
@@ -207,7 +249,7 @@ start_inferior (char **argv)
 	count++;
       for (i = 0; argv[i] != NULL; i++)
 	count++;
-      new_argv = alloca (sizeof (char *) * count);
+      new_argv = XALLOCAVEC (char *, count);
       count = 0;
       for (i = 0; wrapper_argv[i] != NULL; i++)
 	new_argv[count++] = wrapper_argv[i];
@@ -248,31 +290,26 @@ start_inferior (char **argv)
 
   if (wrapper_argv != NULL)
     {
-      struct thread_resume resume_info;
-
-      memset (&resume_info, 0, sizeof (resume_info));
-      resume_info.thread = pid_to_ptid (signal_pid);
-      resume_info.kind = resume_continue;
-      resume_info.sig = 0;
+      ptid_t ptid = pid_to_ptid (signal_pid);
 
       last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
 
-      if (last_status.kind != TARGET_WAITKIND_STOPPED)
-	return signal_pid;
-
-      do
+      if (last_status.kind == TARGET_WAITKIND_STOPPED)
 	{
-	  (*the_target->resume) (&resume_info, 1);
+	  do
+	    {
+	      target_continue_no_signal (ptid);
 
- 	  last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
-	  if (last_status.kind != TARGET_WAITKIND_STOPPED)
-	    return signal_pid;
+	      last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
+	      if (last_status.kind != TARGET_WAITKIND_STOPPED)
+		break;
 
-	  current_thread->last_resume_kind = resume_stop;
-	  current_thread->last_status = last_status;
+	      current_thread->last_resume_kind = resume_stop;
+	      current_thread->last_status = last_status;
+	    }
+	  while (last_status.value.sig != GDB_SIGNAL_TRAP);
 	}
-      while (last_status.value.sig != GDB_SIGNAL_TRAP);
-
+      target_post_create_inferior ();
       return signal_pid;
     }
 
@@ -280,14 +317,19 @@ start_inferior (char **argv)
      (assuming success).  */
   last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
 
+  /* At this point, the target process, if it exits, is stopped.  Do not call
+     the function target_post_create_inferior if the process has already
+     exited, as the target implementation of the routine may rely on the
+     process being live. */
   if (last_status.kind != TARGET_WAITKIND_EXITED
       && last_status.kind != TARGET_WAITKIND_SIGNALLED)
     {
+      target_post_create_inferior ();
       current_thread->last_resume_kind = resume_stop;
       current_thread->last_status = last_status;
     }
   else
-    mourn_inferior (find_process_pid (ptid_get_pid (last_ptid)));
+    target_mourn_inferior (last_ptid);
 
   return signal_pid;
 }
@@ -378,7 +420,7 @@ decode_xfer (char *buf, char **object, c
    to as much of DATA/LEN as we could fit.  IS_MORE controls
    the first character of the response.  */
 static int
-write_qxfer_response (char *buf, const void *data, int len, int is_more)
+write_qxfer_response (char *buf, const gdb_byte *data, int len, int is_more)
 {
   int out_len;
 
@@ -408,7 +450,7 @@ handle_btrace_enable_bts (struct thread_
   return NULL;
 }
 
-/* Handle btrace enabling in Intel(R) Processor Trace format.  */
+/* Handle btrace enabling in Intel Processor Trace format.  */
 
 static const char *
 handle_btrace_enable_pt (struct thread_info *thread)
@@ -612,12 +654,60 @@ handle_general_set (char *own_buf)
       return;
     }
 
+  if (startswith (own_buf, "QCatchSyscalls:"))
+    {
+      const char *p = own_buf + sizeof ("QCatchSyscalls:") - 1;
+      int enabled = -1;
+      CORE_ADDR sysno;
+      struct process_info *process;
+
+      if (!target_running () || !target_supports_catch_syscall ())
+	{
+	  write_enn (own_buf);
+	  return;
+	}
+
+      if (strcmp (p, "0") == 0)
+	enabled = 0;
+      else if (p[0] == '1' && (p[1] == ';' || p[1] == '\0'))
+	enabled = 1;
+      else
+	{
+	  fprintf (stderr, "Unknown catch-syscalls mode requested: %s\n",
+		   own_buf);
+	  write_enn (own_buf);
+	  return;
+	}
+
+      process = current_process ();
+      VEC_truncate (int, process->syscalls_to_catch, 0);
+
+      if (enabled)
+	{
+	  p += 1;
+	  if (*p == ';')
+	    {
+	      p += 1;
+	      while (*p != '\0')
+		{
+		  p = decode_address_to_semicolon (&sysno, p);
+		  VEC_safe_push (int, process->syscalls_to_catch, (int) sysno);
+		}
+	    }
+	  else
+	    VEC_safe_push (int, process->syscalls_to_catch, ANY_SYSCALL);
+	}
+
+      write_ok (own_buf);
+      return;
+    }
+
   if (strcmp (own_buf, "QStartNoAckMode") == 0)
     {
       if (remote_debug)
 	{
-	  fprintf (stderr, "[noack mode enabled]\n");
-	  fflush (stderr);
+	  debug_printf ("[noack mode enabled]\n");
+	  debug_flush ();
 	}
 
       noack_mode = 1;
@@ -656,7 +746,7 @@ handle_general_set (char *own_buf)
       non_stop = req;
 
       if (remote_debug)
-	fprintf (stderr, "[%s mode enabled]\n", req_str);
+	debug_printf ("[%s mode enabled]\n", req_str);
 
       write_ok (own_buf);
       return;
@@ -672,10 +762,9 @@ handle_general_set (char *own_buf)
 
       if (remote_debug)
 	{
-	  if (disable_randomization)
-	    fprintf (stderr, "[address space randomization disabled]\n");
-	  else
-	    fprintf (stderr, "[address space randomization enabled]\n");
+	  debug_printf (disable_randomization
+			? "[address space randomization disabled]\n"
+			: "[address space randomization enabled]\n");
 	}
 
       write_ok (own_buf);
@@ -705,7 +794,7 @@ handle_general_set (char *own_buf)
       /* Update the flag.  */
       use_agent = req;
       if (remote_debug)
-	fprintf (stderr, "[%s agent]\n", req ? "Enable" : "Disable");
+	debug_printf ("[%s agent]\n", req ? "Enable" : "Disable");
       write_ok (own_buf);
       return;
     }
@@ -716,6 +805,39 @@ handle_general_set (char *own_buf)
   if (handle_btrace_conf_general_set (own_buf))
     return;
 
+  if (startswith (own_buf, "QThreadEvents:"))
+    {
+      char *mode = own_buf + strlen ("QThreadEvents:");
+      enum tribool req = TRIBOOL_UNKNOWN;
+
+      if (strcmp (mode, "0") == 0)
+	req = TRIBOOL_FALSE;
+      else if (strcmp (mode, "1") == 0)
+	req = TRIBOOL_TRUE;
+      else
+	{
+	  char *mode_copy = xstrdup (mode);
+
+	  /* We don't know what this mode is, so complain to GDB.  */
+	  sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
+		   mode_copy);
+	  xfree (mode_copy);
+	  return;
+	}
+
+      report_thread_events = (req == TRIBOOL_TRUE);
+
+      if (remote_debug)
+	{
+	  const char *req_str = report_thread_events ? "enabled" : "disabled";
+
+	  debug_printf ("[thread events are now %s]\n", req_str);
+	}
+
+      write_ok (own_buf);
+      return;
+    }
+
   /* Otherwise we didn't know what packet it was.  Say we didn't
      understand it.  */
   own_buf[0] = 0;
@@ -760,7 +882,7 @@ get_features_xml (const char *annex)
   return NULL;
 }
 
-void
+static void
 monitor_show_help (void)
 {
   monitor_output ("The following monitor commands are supported:\n");
@@ -814,7 +936,10 @@ gdb_read_memory (CORE_ADDR memaddr, unsi
   res = prepare_to_access_memory ();
   if (res == 0)
     {
-      res = read_inferior_memory (memaddr, myaddr, len);
+      if (set_desired_thread (1))
+	res = read_inferior_memory (memaddr, myaddr, len);
+      else
+	res = 1;
       done_accessing_memory ();
 
       return res == 0 ? len : -1;
@@ -838,7 +963,10 @@ gdb_write_memory (CORE_ADDR memaddr, con
       ret = prepare_to_access_memory ();
       if (ret == 0)
 	{
-	  ret = write_inferior_memory (memaddr, myaddr, len);
+	  if (set_desired_thread (1))
+	    ret = write_inferior_memory (memaddr, myaddr, len);
+	  else
+	    ret = EIO;
 	  done_accessing_memory ();
 	}
       return ret;
@@ -878,7 +1006,8 @@ handle_search_memory_1 (CORE_ADDR start_
 				  ? search_space_len
 				  : search_buf_size);
 
-      found_ptr = memmem (search_buf, nr_search_bytes, pattern, pattern_len);
+      found_ptr = (gdb_byte *) memmem (search_buf, nr_search_bytes, pattern,
+				       pattern_len);
 
       if (found_ptr != NULL)
 	{
@@ -946,7 +1075,7 @@ handle_search_memory (char *own_buf, int
   CORE_ADDR found_addr;
   int cmd_name_len = sizeof ("qSearch:memory:") - 1;
 
-  pattern = malloc (packet_len);
+  pattern = (gdb_byte *) malloc (packet_len);
   if (pattern == NULL)
     {
       error ("Unable to allocate memory to perform the search");
@@ -970,7 +1099,7 @@ handle_search_memory (char *own_buf, int
   if (search_space_len < search_buf_size)
     search_buf_size = search_space_len;
 
-  search_buf = malloc (search_buf_size);
+  search_buf = (gdb_byte *) malloc (search_buf_size);
   if (search_buf == NULL)
     {
       free (pattern);
@@ -1169,7 +1298,7 @@ handle_qxfer_auxv (const char *annex,
   if (the_target->read_auxv == NULL || writebuf != NULL)
     return -2;
 
-  if (annex[0] != '\0' || !target_running ())
+  if (annex[0] != '\0' || current_thread == NULL)
     return -1;
 
   return (*the_target->read_auxv) (offset, readbuf, len);
@@ -1198,7 +1327,7 @@ handle_qxfer_exec_file (const char *cons
     }
   else
     {
-      char *annex = alloca (strlen (const_annex) + 1);
+      char *annex = (char *) alloca (strlen (const_annex) + 1);
 
       strcpy (annex, const_annex);
       annex = unpack_varlen_hex (annex, &pid);
@@ -1267,7 +1396,7 @@ static void
 accumulate_file_name_length (struct inferior_list_entry *inf, void *arg)
 {
   struct dll_info *dll = (struct dll_info *) inf;
-  unsigned int *total_len = arg;
+  unsigned int *total_len = (unsigned int *) arg;
 
   /* Over-estimate the necessary memory.  Assume that every character
      in the library name must be escaped.  */
@@ -1281,7 +1410,7 @@ static void
 emit_dll_description (struct inferior_list_entry *inf, void *arg)
 {
   struct dll_info *dll = (struct dll_info *) inf;
-  char **p_ptr = arg;
+  char **p_ptr = (char **) arg;
   char *p = *p_ptr;
   char *name;
 
@@ -1314,14 +1443,14 @@ handle_qxfer_libraries (const char *anne
   if (writebuf != NULL)
     return -2;
 
-  if (annex[0] != '\0' || !target_running ())
+  if (annex[0] != '\0' || current_thread == NULL)
     return -1;
 
   total_len = 64;
   for_each_inferior_with_data (&all_dlls, accumulate_file_name_length,
 			       &total_len);
 
-  document = malloc (total_len);
+  document = (char *) malloc (total_len);
   if (document == NULL)
     return -1;
 
@@ -1358,7 +1487,7 @@ handle_qxfer_libraries_svr4 (const char 
   if (writebuf != NULL)
     return -2;
 
-  if (!target_running () || the_target->qxfer_libraries_svr4 == NULL)
+  if (current_thread == NULL || the_target->qxfer_libraries_svr4 == NULL)
     return -1;
 
   return the_target->qxfer_libraries_svr4 (annex, readbuf, writebuf, offset, len);
@@ -1387,7 +1516,7 @@ handle_qxfer_siginfo (const char *annex,
   if (the_target->qxfer_siginfo == NULL)
     return -2;
 
-  if (annex[0] != '\0' || !target_running ())
+  if (annex[0] != '\0' || current_thread == NULL)
     return -1;
 
   return (*the_target->qxfer_siginfo) (annex, readbuf, writebuf, offset, len);
@@ -1403,7 +1532,7 @@ handle_qxfer_spu (const char *annex,
   if (the_target->qxfer_spu == NULL)
     return -2;
 
-  if (!target_running ())
+  if (current_thread == NULL)
     return -1;
 
   return (*the_target->qxfer_spu) (annex, readbuf, writebuf, offset, len);
@@ -1421,7 +1550,7 @@ handle_qxfer_statictrace (const char *an
   if (writebuf != NULL)
     return -2;
 
-  if (annex[0] != '\0' || !target_running () || current_traceframe == -1)
+  if (annex[0] != '\0' || current_thread == NULL || current_traceframe == -1)
     return -1;
 
   if (traceframe_read_sdata (current_traceframe, offset,
@@ -1437,25 +1566,27 @@ static void
 handle_qxfer_threads_worker (struct inferior_list_entry *inf, void *arg)
 {
   struct thread_info *thread = (struct thread_info *) inf;
-  struct buffer *buffer = arg;
+  struct buffer *buffer = (struct buffer *) arg;
   ptid_t ptid = thread_to_gdb_id (thread);
   char ptid_s[100];
   int core = target_core_of_thread (ptid);
   char core_s[21];
+  const char *name = target_thread_name (ptid);
 
   write_ptid (ptid_s, ptid);
 
+  buffer_xml_printf (buffer, "<thread id=\"%s\"", ptid_s);
+
   if (core != -1)
     {
       sprintf (core_s, "%d", core);
-      buffer_xml_printf (buffer, "<thread id=\"%s\" core=\"%s\"/>\n",
-			 ptid_s, core_s);
-    }
-  else
-    {
-      buffer_xml_printf (buffer, "<thread id=\"%s\"/>\n",
-			 ptid_s);
+      buffer_xml_printf (buffer, " core=\"%s\"", core_s);
     }
+
+  if (name != NULL)
+    buffer_xml_printf (buffer, " name=\"%s\"", name);
+
+  buffer_xml_printf (buffer, "/>\n");
 }
 
 /* Helper for handle_qxfer_threads.  */
@@ -1484,7 +1615,7 @@ handle_qxfer_threads (const char *annex,
   if (writebuf != NULL)
     return -2;
 
-  if (!target_running () || annex[0] != '\0')
+  if (annex[0] != '\0')
     return -1;
 
   if (offset == 0)
@@ -1580,7 +1711,7 @@ handle_qxfer_fdpic (const char *annex, g
   if (the_target->read_loadmap == NULL)
     return -2;
 
-  if (!target_running ())
+  if (current_thread == NULL)
     return -1;
 
   return (*the_target->read_loadmap) (annex, offset, readbuf, len);
@@ -1595,14 +1726,12 @@ handle_qxfer_btrace (const char *annex,
 {
   static struct buffer cache;
   struct thread_info *thread;
-  int type, result;
+  enum btrace_read_type type;
+  int result;
 
   if (the_target->read_btrace == NULL || writebuf != NULL)
     return -2;
 
-  if (!target_running ())
-    return -1;
-
   if (ptid_equal (general_thread, null_ptid)
       || ptid_equal (general_thread, minus_one_ptid))
     {
@@ -1674,7 +1803,7 @@ handle_qxfer_btrace_conf (const char *an
   if (the_target->read_btrace_conf == NULL || writebuf != NULL)
     return -2;
 
-  if (annex[0] != '\0' || !target_running ())
+  if (annex[0] != '\0')
     return -1;
 
   if (ptid_equal (general_thread, null_ptid)
@@ -1785,7 +1914,7 @@ handle_qxfer (char *own_buf, int packet_
 		 more.  */
 	      if (len > PBUFSIZ - 2)
 		len = PBUFSIZ - 2;
-	      data = malloc (len + 1);
+	      data = (unsigned char *) malloc (len + 1);
 	      if (data == NULL)
 		{
 		  write_enn (own_buf);
@@ -1819,7 +1948,7 @@ handle_qxfer (char *own_buf, int packet_
 	      unsigned char *data;
 
 	      strcpy (own_buf, "E00");
-	      data = malloc (packet_len - (offset - own_buf));
+	      data = (unsigned char *) malloc (packet_len - (offset - own_buf));
 	      if (data == NULL)
 		{
 		  write_enn (own_buf);
@@ -1859,11 +1988,6 @@ handle_qxfer (char *own_buf, int packet_
   return 0;
 }
 
-/* Table used by the crc32 function to calcuate the checksum.  */
-
-static unsigned int crc32_table[256] =
-{0, 0};
-
 /* Compute 32 bit CRC from inferior memory.
 
    On success, return 32 bit CRC.
@@ -1872,20 +1996,6 @@ static unsigned int crc32_table[256] =
 static unsigned long long
 crc32 (CORE_ADDR base, int len, unsigned int crc)
 {
-  if (!crc32_table[1])
-    {
-      /* Initialize the CRC table and the decoding table.  */
-      int i, j;
-      unsigned int c;
-
-      for (i = 0; i < 256; i++)
-	{
-	  for (c = i << 24, j = 8; j > 0; --j)
-	    c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
-	  crc32_table[i] = c;
-	}
-    }
-
   while (len--)
     {
       unsigned char byte = 0;
@@ -1894,7 +2004,7 @@ crc32 (CORE_ADDR base, int len, unsigned
       if (read_inferior_memory (base, &byte, 1) != 0)
 	return (unsigned long long) -1;
 
-      crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ byte) & 255];
+      crc = xcrc32 (&byte, 1, crc);
       base++;
     }
   return (unsigned long long) crc;
@@ -1933,7 +2043,7 @@ supported_btrace_packets (char *buf)
 
 /* Handle all of the extended 'q' packets.  */
 
-void
+static void
 handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
 {
   static struct inferior_list_entry *thread_ptr;
@@ -1961,6 +2071,28 @@ handle_query (char *own_buf, int packet_
 
   if (strcmp ("qSymbol::", own_buf) == 0)
     {
+      struct thread_info *save_thread = current_thread;
+
+      /* For qSymbol, GDB only changes the current thread if the
+	 previous current thread was of a different process.  So if
+	 the previous thread is gone, we need to pick another one of
+	 the same process.  This can happen e.g., if we followed an
+	 exec in a non-leader thread.  */
+      if (current_thread == NULL)
+	{
+	  current_thread
+	    = find_any_thread_of_pid (ptid_get_pid (general_thread));
+
+	  /* Just in case, if we didn't find a thread, then bail out
+	     instead of crashing.  */
+	  if (current_thread == NULL)
+	    {
+	      write_enn (own_buf);
+	      current_thread = save_thread;
+	      return;
+	    }
+	}
+
       /* GDB is suggesting new symbols have been loaded.  This may
 	 mean a new shared library has been detected as loaded, so
 	 take the opportunity to check if breakpoints we think are
@@ -1976,9 +2108,11 @@ handle_query (char *own_buf, int packet_
       if (target_supports_tracepoints ())
 	tracepoint_look_up_symbols ();
 
-      if (target_running () && the_target->look_up_symbols != NULL)
+      if (current_thread != NULL && the_target->look_up_symbols != NULL)
 	(*the_target->look_up_symbols) ();
 
+      current_thread = save_thread;
+
       strcpy (own_buf, "OK");
       return;
     }
@@ -2042,9 +2176,6 @@ handle_query (char *own_buf, int packet_
       char *p = &own_buf[10];
       int gdb_supports_qRelocInsn = 0;
 
-      /* Start processing qSupported packet.  */
-      target_process_qsupported (NULL);
-
       /* Process each feature being provided by GDB.  The first
 	 feature will follow a ':', and latter features will follow
 	 ';'.  */
@@ -2052,6 +2183,7 @@ handle_query (char *own_buf, int packet_
 	{
 	  char **qsupported = NULL;
 	  int count = 0;
+	  int unknown = 0;
 	  int i;
 
 	  /* Two passes, to avoid nested strtok calls in
@@ -2061,7 +2193,7 @@ handle_query (char *own_buf, int packet_
 	       p = strtok (NULL, ";"))
 	    {
 	      count++;
-	      qsupported = xrealloc (qsupported, count * sizeof (char *));
+	      qsupported = XRESIZEVEC (char *, qsupported, count);
 	      qsupported[count - 1] = xstrdup (p);
 	    }
 
@@ -2107,12 +2239,37 @@ handle_query (char *own_buf, int packet_
 		  if (target_supports_vfork_events ())
 		    report_vfork_events = 1;
 		}
+	      else if (strcmp (p, "exec-events+") == 0)
+		{
+		  /* GDB supports and wants exec events if possible.  */
+		  if (target_supports_exec_events ())
+		    report_exec_events = 1;
+		}
+	      else if (strcmp (p, "vContSupported+") == 0)
+		vCont_supported = 1;
+	      else if (strcmp (p, "QThreadEvents+") == 0)
+		;
+	      else if (strcmp (p, "no-resumed+") == 0)
+		{
+		  /* GDB supports and wants TARGET_WAITKIND_NO_RESUMED
+		     events.  */
+		  report_no_resumed = 1;
+		}
 	      else
-		target_process_qsupported (p);
-
-	      free (p);
+		{
+		  /* Move the unknown features all together.  */
+		  qsupported[i] = NULL;
+		  qsupported[unknown] = p;
+		  unknown++;
+		}
 	    }
 
+	  /* Give the target backend a chance to process the unknown
+	     features.  */
+	  target_process_qsupported (qsupported, unknown);
+
+	  for (i = 0; i < count; i++)
+	    free (qsupported[i]);
 	  free (qsupported);
 	}
 
@@ -2120,6 +2277,9 @@ handle_query (char *own_buf, int packet_
 	       "PacketSize=%x;QPassSignals+;QProgramSignals+",
 	       PBUFSIZ - 1);
 
+      if (target_supports_catch_syscall ())
+	strcat (own_buf, ";QCatchSyscalls+");
+
       if (the_target->qxfer_libraries_svr4 != NULL)
 	strcat (own_buf, ";qXfer:libraries-svr4:read+"
 		";augmented-libraries-svr4-read+");
@@ -2163,6 +2323,9 @@ handle_query (char *own_buf, int packet_
       if (target_supports_vfork_events ())
 	strcat (own_buf, ";vfork-events+");
 
+      if (target_supports_exec_events ())
+	strcat (own_buf, ";exec-events+");
+
       if (target_supports_non_stop ())
 	strcat (own_buf, ";QNonStop+");
 
@@ -2188,9 +2351,11 @@ handle_query (char *own_buf, int packet_
 	  strcat (own_buf, ";tracenz+");
 	}
 
-      /* Support target-side breakpoint conditions and commands.  */
-      if (target_supports_conditional_breakpoints ())
-	strcat (own_buf, ";ConditionalBreakpoints+");
+      if (target_supports_hardware_single_step ()
+	  || target_supports_software_single_step () )
+	{
+	  strcat (own_buf, ";ConditionalBreakpoints+");
+	}
       strcat (own_buf, ";BreakpointCommands+");
 
       if (target_supports_agent ())
@@ -2207,6 +2372,12 @@ handle_query (char *own_buf, int packet_
       if (the_target->pid_to_exec_file != NULL)
 	strcat (own_buf, ";qXfer:exec-file:read+");
 
+      strcat (own_buf, ";vContSupported+");
+
+      strcat (own_buf, ";QThreadEvents+");
+
+      strcat (own_buf, ";no-resumed+");
+
       /* Reinitialize components as needed for the new connection.  */
       hostio_handle_new_gdb_connection ();
       target_handle_new_gdb_connection ();
@@ -2305,7 +2476,7 @@ handle_query (char *own_buf, int packet_
   /* Handle "monitor" commands.  */
   if (startswith (own_buf, "qRcmd,"))
     {
-      char *mon = malloc (PBUFSIZ);
+      char *mon = (char *) malloc (PBUFSIZ);
       int len = strlen (own_buf + 6);
 
       if (mon == NULL)
@@ -2430,7 +2601,8 @@ struct visit_actioned_threads_data
 static int
 visit_actioned_threads (struct inferior_list_entry *entry, void *datap)
 {
-  struct visit_actioned_threads_data *data = datap;
+  struct visit_actioned_threads_data *data
+    = (struct visit_actioned_threads_data *) datap;
   const struct thread_resume *actions = data->actions;
   size_t num_actions = data->num_actions;
   visit_actioned_threads_callback_ftype *callback = data->callback;
@@ -2476,7 +2648,7 @@ handle_pending_status (const struct thre
 }
 
 /* Parse vCont packets.  */
-void
+static void
 handle_v_cont (char *own_buf)
 {
   char *p, *q;
@@ -2494,7 +2666,7 @@ handle_v_cont (char *own_buf)
       p = strchr (p, ';');
     }
 
-  resume_info = malloc (n * sizeof (resume_info[0]));
+  resume_info = (struct thread_resume *) malloc (n * sizeof (resume_info[0]));
   if (resume_info == NULL)
     goto err;
 
@@ -2524,9 +2696,9 @@ handle_v_cont (char *own_buf)
 	    goto err;
 	  p = q;
 
-	  if (!gdb_signal_to_host_p (sig))
+	  if (!gdb_signal_to_host_p ((enum gdb_signal) sig))
 	    goto err;
-	  resume_info[i].sig = gdb_signal_to_host (sig);
+	  resume_info[i].sig = gdb_signal_to_host ((enum gdb_signal) sig);
 	}
       else if (p[0] == 'r')
 	{
@@ -2573,8 +2745,6 @@ handle_v_cont (char *own_buf)
   if (i < n)
     resume_info[i] = default_action;
 
-  set_desired_thread (0);
-
   resume (resume_info, n);
   free (resume_info);
   return;
@@ -2615,10 +2785,11 @@ resume (struct thread_resume *actions, s
     {
       last_ptid = mywait (minus_one_ptid, &last_status, 0, 1);
 
-      if (last_status.kind == TARGET_WAITKIND_NO_RESUMED)
+      if (last_status.kind == TARGET_WAITKIND_NO_RESUMED
+	  && !report_no_resumed)
 	{
-	  /* No proper RSP support for this yet.  At least return
-	     error.  */
+	  /* The client does not support this stop reply.  At least
+	     return error.  */
 	  sprintf (own_buf, "E.No unwaited-for children left.");
 	  disable_async_io ();
 	  return;
@@ -2639,12 +2810,12 @@ resume (struct thread_resume *actions, s
 
       if (last_status.kind == TARGET_WAITKIND_EXITED
           || last_status.kind == TARGET_WAITKIND_SIGNALLED)
-        mourn_inferior (find_process_pid (ptid_get_pid (last_ptid)));
+        target_mourn_inferior (last_ptid);
     }
 }
 
 /* Attach to a new program.  Return 1 if successful, 0 if failure.  */
-int
+static int
 handle_v_attach (char *own_buf)
 {
   int pid;
@@ -2691,7 +2862,7 @@ handle_v_run (char *own_buf)
       new_argc++;
     }
 
-  new_argv = calloc (new_argc + 2, sizeof (char *));
+  new_argv = (char **) calloc (new_argc + 2, sizeof (char *));
   if (new_argv == NULL)
     {
       write_enn (own_buf);
@@ -2710,7 +2881,7 @@ handle_v_run (char *own_buf)
       else
 	{
 	  /* FIXME: Fail request if out of memory instead of dying.  */
-	  new_argv[i] = xmalloc (1 + (next_p - p) / 2);
+	  new_argv[i] = (char *) xmalloc (1 + (next_p - p) / 2);
 	  hex2bin (p, (gdb_byte *) new_argv[i], (next_p - p) / 2);
 	  new_argv[i][(next_p - p) / 2] = '\0';
 	}
@@ -2767,7 +2938,7 @@ handle_v_run (char *own_buf)
 }
 
 /* Kill process.  Return 1 if successful, 0 if failure.  */
-int
+static int
 handle_v_kill (char *own_buf)
 {
   int pid;
@@ -2781,7 +2952,7 @@ handle_v_kill (char *own_buf)
       last_status.kind = TARGET_WAITKIND_SIGNALLED;
       last_status.value.sig = GDB_SIGNAL_KILL;
       last_ptid = pid_to_ptid (pid);
-      discard_queued_stop_replies (pid);
+      discard_queued_stop_replies (last_ptid);
       write_ok (own_buf);
       return 1;
     }
@@ -2798,16 +2969,36 @@ handle_v_requests (char *own_buf, int pa
 {
   if (!disable_packet_vCont)
     {
+      if (strcmp (own_buf, "vCtrlC") == 0)
+	{
+	  (*the_target->request_interrupt) ();
+	  write_ok (own_buf);
+	  return;
+	}
+
       if (startswith (own_buf, "vCont;"))
 	{
-	  require_running (own_buf);
 	  handle_v_cont (own_buf);
 	  return;
 	}
 
       if (startswith (own_buf, "vCont?"))
 	{
-	  strcpy (own_buf, "vCont;c;C;s;S;t");
+	  strcpy (own_buf, "vCont;c;C;t");
+
+	  if (target_supports_hardware_single_step ()
+	      || target_supports_software_single_step ()
+	      || !vCont_supported)
+	    {
+	      /* If target supports single step either by hardware or by
+		 software, add actions s and S to the list of supported
+		 actions.  On the other hand, if GDB doesn't request the
+		 supported vCont actions in qSupported packet, add s and
+		 S to the list too.  */
+	      own_buf = own_buf + strlen (own_buf);
+	      strcpy (own_buf, ";s;S");
+	    }
+
 	  if (target_supports_range_stepping ())
 	    {
 	      own_buf = own_buf + strlen (own_buf);
@@ -2876,8 +3067,6 @@ myresume (char *own_buf, int step, int s
   int n = 0;
   int valid_cont_thread;
 
-  set_desired_thread (0);
-
   valid_cont_thread = (!ptid_equal (cont_thread, null_ptid)
 			 && !ptid_equal (cont_thread, minus_one_ptid));
 
@@ -2915,7 +3104,7 @@ queue_stop_reply_callback (struct inferi
      manage the thread's last_status field.  */
   if (the_target->thread_stopped == NULL)
     {
-      struct vstop_notif *new_notif = xmalloc (sizeof (*new_notif));
+      struct vstop_notif *new_notif = XNEW (struct vstop_notif);
 
       new_notif->ptid = entry->id;
       new_notif->status = thread->last_status;
@@ -3111,7 +3300,7 @@ static void
 gdbserver_version (void)
 {
   printf ("GNU gdbserver %s%s\n"
-	  "Copyright (C) 2015 Free Software Foundation, Inc.\n"
+	  "Copyright (C) 2017 Free Software Foundation, Inc.\n"
 	  "gdbserver is free software, covered by the "
 	  "GNU General Public License.\n"
 	  "This gdbserver was configured as \"%s\"\n",
@@ -3210,7 +3399,7 @@ kill_inferior_callback (struct inferior_
   int pid = ptid_get_pid (process->entry.id);
 
   kill_inferior (pid);
-  discard_queued_stop_replies (pid);
+  discard_queued_stop_replies (pid_to_ptid (pid));
 }
 
 /* Callback for for_each_inferior to detach or kill the inferior,
@@ -3229,7 +3418,7 @@ detach_or_kill_inferior_callback (struct
   else
     kill_inferior (pid);
 
-  discard_queued_stop_replies (pid);
+  discard_queued_stop_replies (pid_to_ptid (pid));
 }
 
 /* for_each_inferior callback for detach_or_kill_for_exit to print
@@ -3450,6 +3639,8 @@ captured_main (int argc, char *argv[])
      opened by remote_prepare.  */
   notice_open_fds ();
 
+  save_original_signals_state ();
+
   /* We need to know whether the remote connection is stdio before
      starting the inferior.  Inferiors created in this scenario have
      stdin,stdout redirected.  So do this here before we call
@@ -3486,16 +3677,17 @@ captured_main (int argc, char *argv[])
   initialize_event_loop ();
   if (target_supports_tracepoints ())
     initialize_tracepoint ();
+  initialize_notif ();
 
-  own_buf = xmalloc (PBUFSIZ + 1);
-  mem_buf = xmalloc (PBUFSIZ);
+  own_buf = (char *) xmalloc (PBUFSIZ + 1);
+  mem_buf = (unsigned char *) xmalloc (PBUFSIZ);
 
   if (pid == 0 && *next_arg != NULL)
     {
       int i, n;
 
       n = argc - (next_arg - argv);
-      program_argv = xmalloc (sizeof (char *) * (n + 1));
+      program_argv = XNEWVEC (char *, n + 1);
       for (i = 0; i < n; i++)
 	program_argv[i] = xstrdup (next_arg[i]);
       program_argv[i] = NULL;
@@ -3522,8 +3714,6 @@ captured_main (int argc, char *argv[])
     }
   make_cleanup (detach_or_kill_for_exit_cleanup, NULL);
 
-  initialize_notif ();
-
   /* Don't report shared library events on the initial connection,
      even if some libraries are preloaded.  Avoids the "stopped by
      shared library event" notice on gdb side.  */
@@ -3545,11 +3735,13 @@ captured_main (int argc, char *argv[])
       multi_process = 0;
       report_fork_events = 0;
       report_vfork_events = 0;
+      report_exec_events = 0;
       /* Be sure we're out of tfind mode.  */
       current_traceframe = -1;
       cont_thread = null_ptid;
       swbreak_feature = 0;
       hwbreak_feature = 0;
+      vCont_supported = 0;
 
       remote_open (port);
 
@@ -3560,11 +3752,21 @@ captured_main (int argc, char *argv[])
 	  start_event_loop ();
 
 	  /* If an exit was requested (using the "monitor exit"
-	     command), terminate now.  The only other way to get
-	     here is for getpkt to fail; close the connection
-	     and reopen it at the top of the loop.  */
+	     command), terminate now.  */
+	  if (exit_requested)
+	    throw_quit ("Quit");
+
+	  /* The only other way to get here is for getpkt to fail:
+
+	      - If --once was specified, we're done.
+
+	      - If not in extended-remote mode, and we're no longer
+	        debugging anything, simply exit: GDB has disconnected
+	        after processing the last process exit.
 
-	  if (exit_requested || run_once)
+	      - Otherwise, close the connection and reopen it at the
+	        top of the loop.  */
+	  if (run_once || (!extended_protocol && !target_running ()))
 	    throw_quit ("Quit");
 
 	  fprintf (stderr,
@@ -3574,7 +3776,7 @@ captured_main (int argc, char *argv[])
 	  /* Get rid of any pending statuses.  An eventual reconnection
 	     (by the same GDB instance or another) will refresh all its
 	     state from scratch.  */
-	  discard_queued_stop_replies (-1);
+	  discard_queued_stop_replies (minus_one_ptid);
 	  for_each_inferior (&all_threads,
 			     clear_pending_status_callback);
 
@@ -3608,11 +3810,17 @@ captured_main (int argc, char *argv[])
 	}
       CATCH (exception, RETURN_MASK_ERROR)
 	{
+	  fflush (stdout);
+	  fprintf (stderr, "gdbserver: %s\n", exception.message);
+
 	  if (response_needed)
 	    {
 	      write_enn (own_buf);
 	      putpkt (own_buf);
 	    }
+
+	  if (run_once)
+	    throw_quit ("Quit");
 	}
       END_CATCH
     }
@@ -3645,21 +3853,12 @@ main (int argc, char *argv[])
   gdb_assert_not_reached ("captured_main should never return");
 }
 
-/* Skip PACKET until the next semi-colon (or end of string).  */
-
-static void
-skip_to_semicolon (char **packet)
-{
-  while (**packet != '\0' && **packet != ';')
-    (*packet)++;
-}
-
 /* Process options coming from Z packets for a breakpoint.  PACKET is
    the packet buffer.  *PACKET is updated to point to the first char
    after the last processed option.  */
 
 static void
-process_point_options (struct breakpoint *bp, char **packet)
+process_point_options (struct gdb_breakpoint *bp, char **packet)
 {
   char *dataptr = *packet;
   int persist;
@@ -3681,7 +3880,7 @@ process_point_options (struct breakpoint
 	  if (debug_threads)
 	    debug_printf ("Found breakpoint condition.\n");
 	  if (!add_breakpoint_condition (bp, &dataptr))
-	    skip_to_semicolon (&dataptr);
+	    dataptr = strchrnul (dataptr, ';');
 	}
       else if (startswith (dataptr, "cmds:"))
 	{
@@ -3691,14 +3890,14 @@ process_point_options (struct breakpoint
 	  persist = (*dataptr == '1');
 	  dataptr += 2;
 	  if (add_breakpoint_commands (bp, &dataptr, persist))
-	    skip_to_semicolon (&dataptr);
+	    dataptr = strchrnul (dataptr, ';');
 	}
       else
 	{
 	  fprintf (stderr, "Unknown token %c, ignoring.\n",
 		   *dataptr);
 	  /* Skip tokens until we find one that we recognize.  */
-	  skip_to_semicolon (&dataptr);
+	  dataptr = strchrnul (dataptr, ';');
 	}
     }
   *packet = dataptr;
@@ -3723,13 +3922,6 @@ process_serial_event (void)
   int packet_len;
   int new_packet_len = -1;
 
-  /* Used to decide when gdbserver should exit in
-     multi-mode/remote.  */
-  static int have_ran = 0;
-
-  if (!have_ran)
-    have_ran = target_running ();
-
   disable_async_io ();
 
   response_needed = 0;
@@ -3765,7 +3957,6 @@ process_serial_event (void)
 
       if ((tracing && disconnected_tracing) || any_persistent_commands ())
 	{
-	  struct thread_resume resume_info;
 	  struct process_info *process = find_process_pid (pid);
 
 	  if (process == NULL)
@@ -3801,10 +3992,7 @@ process_serial_event (void)
 	  process->gdb_detached = 1;
 
 	  /* Detaching implicitly resumes all threads.  */
-	  resume_info.thread = minus_one_ptid;
-	  resume_info.kind = resume_continue;
-	  resume_info.sig = 0;
-	  (*the_target->resume) (&resume_info, 1);
+	  target_continue_no_signal (minus_one_ptid);
 
 	  write_ok (own_buf);
 	  break; /* from switch/case */
@@ -3816,12 +4004,14 @@ process_serial_event (void)
 	write_enn (own_buf);
       else
 	{
-	  discard_queued_stop_replies (pid);
+	  discard_queued_stop_replies (pid_to_ptid (pid));
 	  write_ok (own_buf);
 
-	  if (extended_protocol)
+	  if (extended_protocol || target_running ())
 	    {
-	      /* Treat this like a normal program exit.  */
+	      /* There is still at least one inferior remaining or
+		 we are in extended mode, so don't terminate gdbserver,
+		 and instead treat this like a normal program exit.  */
 	      last_status.kind = TARGET_WAITKIND_EXITED;
 	      last_status.value.integer = 0;
 	      last_ptid = pid_to_ptid (pid);
@@ -3900,14 +4090,13 @@ process_serial_event (void)
 		    (struct thread_info *) find_inferior_id (&all_threads,
 							     general_thread);
 		  if (thread == NULL)
-		    {
-		      thread = get_first_thread ();
-		      thread_id = thread->entry.id;
-		    }
+		    thread = get_first_thread ();
+		  thread_id = thread->entry.id;
 		}
 
 	      general_thread = thread_id;
 	      set_desired_thread (1);
+	      gdb_assert (current_thread != NULL);
 	    }
 	  else if (own_buf[1] == 'c')
 	    cont_thread = thread_id;
@@ -3939,9 +4128,13 @@ process_serial_event (void)
 	{
 	  struct regcache *regcache;
 
-	  set_desired_thread (1);
-	  regcache = get_thread_regcache (current_thread, 1);
-	  registers_to_string (regcache, own_buf);
+	  if (!set_desired_thread (1))
+	    write_enn (own_buf);
+	  else
+	    {
+	      regcache = get_thread_regcache (current_thread, 1);
+	      registers_to_string (regcache, own_buf);
+	    }
 	}
       break;
     case 'G':
@@ -3952,10 +4145,14 @@ process_serial_event (void)
 	{
 	  struct regcache *regcache;
 
-	  set_desired_thread (1);
-	  regcache = get_thread_regcache (current_thread, 1);
-	  registers_from_string (regcache, &own_buf[1]);
-	  write_ok (own_buf);
+	  if (!set_desired_thread (1))
+	    write_enn (own_buf);
+	  else
+	    {
+	      regcache = get_thread_regcache (current_thread, 1);
+	      registers_from_string (regcache, &own_buf[1]);
+	      write_ok (own_buf);
+	    }
 	}
       break;
     case 'm':
@@ -3987,8 +4184,8 @@ process_serial_event (void)
     case 'C':
       require_running (own_buf);
       hex2bin (own_buf + 1, &sig, 1);
-      if (gdb_signal_to_host_p (sig))
-	signal = gdb_signal_to_host (sig);
+      if (gdb_signal_to_host_p ((enum gdb_signal) sig))
+	signal = gdb_signal_to_host ((enum gdb_signal) sig);
       else
 	signal = 0;
       myresume (own_buf, 0, signal);
@@ -3996,8 +4193,8 @@ process_serial_event (void)
     case 'S':
       require_running (own_buf);
       hex2bin (own_buf + 1, &sig, 1);
-      if (gdb_signal_to_host_p (sig))
-	signal = gdb_signal_to_host (sig);
+      if (gdb_signal_to_host_p ((enum gdb_signal) sig))
+	signal = gdb_signal_to_host ((enum gdb_signal) sig);
       else
 	signal = 0;
       myresume (own_buf, 1, signal);
@@ -4018,20 +4215,20 @@ process_serial_event (void)
       {
 	char *dataptr;
 	ULONGEST addr;
-	int len;
+	int kind;
 	char type = own_buf[1];
 	int res;
 	const int insert = ch == 'Z';
 	char *p = &own_buf[3];
 
 	p = unpack_varlen_hex (p, &addr);
-	len = strtol (p + 1, &dataptr, 16);
+	kind = strtol (p + 1, &dataptr, 16);
 
 	if (insert)
 	  {
-	    struct breakpoint *bp;
+	    struct gdb_breakpoint *bp;
 
-	    bp = set_gdb_breakpoint (type, addr, len, &res);
+	    bp = set_gdb_breakpoint (type, addr, kind, &res);
 	    if (bp != NULL)
 	      {
 		res = 0;
@@ -4046,7 +4243,7 @@ process_serial_event (void)
 	      }
 	  }
 	else
-	  res = delete_gdb_breakpoint (type, addr, len);
+	  res = delete_gdb_breakpoint (type, addr, kind);
 
 	if (res == 0)
 	  write_ok (own_buf);
@@ -4112,7 +4309,20 @@ process_serial_event (void)
 
 	  /* Wait till we are at 1st instruction in prog.  */
 	  if (program_argv != NULL)
-	    start_inferior (program_argv);
+	    {
+	      start_inferior (program_argv);
+	      if (last_status.kind == TARGET_WAITKIND_STOPPED)
+		{
+		  /* Stopped at the first instruction of the target
+		     process.  */
+		  general_thread = last_ptid;
+		}
+	      else
+		{
+		  /* Something went wrong.  */
+		  general_thread = null_ptid;
+		}
+	    }
 	  else
 	    {
 	      last_status.kind = TARGET_WAITKIND_EXITED;
@@ -4148,21 +4358,6 @@ process_serial_event (void)
 
   response_needed = 0;
 
-  if (!extended_protocol && have_ran && !target_running ())
-    {
-      /* In non-stop, defer exiting until GDB had a chance to query
-	 the whole vStopped list (until it gets an OK).  */
-      if (QUEUE_is_empty (notif_event_p, notif_stop.queue))
-	{
-	  /* Be transparent when GDB is connected through stdio -- no
-	     need to spam GDB's console.  */
-	  if (!remote_connection_is_stdio ())
-	    fprintf (stderr, "GDBserver exiting\n");
-	  remote_close ();
-	  exit (0);
-	}
-    }
-
   if (exit_requested)
     return -1;
 
@@ -4188,6 +4383,19 @@ handle_serial_event (int err, gdb_client
   return 0;
 }
 
+/* Push a stop notification on the notification queue.  */
+
+static void
+push_stop_notification (ptid_t ptid, struct target_waitstatus *status)
+{
+  struct vstop_notif *vstop_notif = XNEW (struct vstop_notif);
+
+  vstop_notif->status = *status;
+  vstop_notif->ptid = ptid;
+  /* Push Stop notification.  */
+  notif_push (&notif_stop, (struct notif_event *) vstop_notif);
+}
+
 /* Event-loop callback for target events.  */
 
 int
@@ -4201,7 +4409,8 @@ handle_target_event (int err, gdb_client
 
   if (last_status.kind == TARGET_WAITKIND_NO_RESUMED)
     {
-      /* No RSP support for this yet.  */
+      if (gdb_connected () && report_no_resumed)
+	push_stop_notification (null_ptid, &last_status);
     }
   else if (last_status.kind != TARGET_WAITKIND_IGNORE)
     {
@@ -4213,8 +4422,10 @@ handle_target_event (int err, gdb_client
 	  || last_status.kind == TARGET_WAITKIND_SIGNALLED)
 	{
 	  mark_breakpoints_out (process);
-	  mourn_inferior (process);
+	  target_mourn_inferior (last_ptid);
 	}
+      else if (last_status.kind == TARGET_WAITKIND_THREAD_EXITED)
+	;
       else
 	{
 	  /* We're reporting this thread as stopped.  Update its
@@ -4232,12 +4443,16 @@ handle_target_event (int err, gdb_client
 	      exit (0);
 	    }
 
-	  if (last_status.kind == TARGET_WAITKIND_STOPPED)
+	  if (last_status.kind == TARGET_WAITKIND_EXITED
+	      || last_status.kind == TARGET_WAITKIND_SIGNALLED
+	      || last_status.kind == TARGET_WAITKIND_THREAD_EXITED)
+	    ;
+	  else
 	    {
 	      /* A thread stopped with a signal, but gdb isn't
 		 connected to handle it.  Pass it down to the
 		 inferior, as if it wasn't being traced.  */
-	      struct thread_resume resume_info;
+	      enum gdb_signal signal;
 
 	      if (debug_threads)
 		debug_printf ("GDB not connected; forwarding event %d for"
@@ -4245,27 +4460,15 @@ handle_target_event (int err, gdb_client
 			      (int) last_status.kind,
 			      target_pid_to_str (last_ptid));
 
-	      resume_info.thread = last_ptid;
-	      resume_info.kind = resume_continue;
-	      resume_info.sig = gdb_signal_to_host (last_status.value.sig);
-	      (*the_target->resume) (&resume_info, 1);
+	      if (last_status.kind == TARGET_WAITKIND_STOPPED)
+		signal = last_status.value.sig;
+	      else
+		signal = GDB_SIGNAL_0;
+	      target_continue (last_ptid, signal);
 	    }
-	  else if (debug_threads)
-	    debug_printf ("GDB not connected; ignoring event %d for [%s]\n",
-			  (int) last_status.kind,
-			  target_pid_to_str (last_ptid));
 	}
       else
-	{
-	  struct vstop_notif *vstop_notif
-	    = xmalloc (sizeof (struct vstop_notif));
-
-	  vstop_notif->status = last_status;
-	  vstop_notif->ptid = last_ptid;
-	  /* Push Stop notification.  */
-	  notif_push (&notif_stop,
-		      (struct notif_event *) vstop_notif);
-	}
+	push_stop_notification (last_ptid, &last_status);
     }
 
   /* Be sure to not change the selected thread behind GDB's back.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/server.h ./gdb/gdbserver/server.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/server.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/server.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common definitions for remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -82,10 +82,14 @@ extern int disable_packet_Tthread;
 extern int disable_packet_qC;
 extern int disable_packet_qfThreadInfo;
 
+extern char *own_buf;
+
 extern int run_once;
 extern int multi_process;
 extern int report_fork_events;
 extern int report_vfork_events;
+extern int report_exec_events;
+extern int report_thread_events;
 extern int non_stop;
 
 /* True if the "swbreak+" feature is active.  In that case, GDB wants
@@ -111,13 +115,23 @@ typedef int gdb_fildes_t;
 #include "event-loop.h"
 
 /* Functions from server.c.  */
+extern void handle_v_requests (char *own_buf, int packet_len,
+			       int *new_packet_len);
 extern int handle_serial_event (int err, gdb_client_data client_data);
 extern int handle_target_event (int err, gdb_client_data client_data);
 
+/* Get rid of the currently pending stop replies that match PTID.  */
+extern void discard_queued_stop_replies (ptid_t ptid);
+
+/* Returns true if there's a pending stop reply that matches PTID in
+   the vStopped notifications queue.  */
+extern int in_queued_stop_replies (ptid_t ptid);
+
 #include "remote-utils.h"
 
 #include "utils.h"
 #include "debug.h"
+#include "gdb_vecs.h"
 
 /* Maximum number of bytes to read/write at once.  The value here
    is chosen to fill up a packet (the headers account for the 32).  */
@@ -128,4 +142,10 @@ extern int handle_target_event (int err,
    as large as the largest register set supported by gdbserver.  */
 #define PBUFSIZ 16384
 
+/* Definition for an unknown syscall, used basically in error-cases.  */
+#define UNKNOWN_SYSCALL (-1)
+
+/* Definition for any syscall, used for unfiltered syscall reporting.  */
+#define ANY_SYSCALL (-2)
+
 #endif /* SERVER_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/spu-low.c ./gdb/gdbserver/spu-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/spu-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/spu-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level interface to SPUs, for the remote server for GDB.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -56,6 +56,9 @@ int using_threads = 0;
 void init_registers_spu (void);
 extern const struct target_desc *tdesc_spu;
 
+/* Software breakpoint instruction.  */
+static const gdb_byte breakpoint[] = { 0x00, 0x00, 0x3f, 0xff };
+
 /* Fetch PPU register REGNO.  */
 static CORE_ADDR
 fetch_ppc_register (int regno)
@@ -73,10 +76,10 @@ fetch_ppc_register (int regno)
     char buf[8];
 
     errno = 0;
-    ptrace (PPC_PTRACE_PEEKUSR_3264, tid,
+    ptrace ((PTRACE_TYPE_ARG1) PPC_PTRACE_PEEKUSR_3264, tid,
 	    (PTRACE_TYPE_ARG3) (regno * 8), buf);
     if (errno == 0)
-      ptrace (PPC_PTRACE_PEEKUSR_3264, tid,
+      ptrace ((PTRACE_TYPE_ARG1) PPC_PTRACE_PEEKUSR_3264, tid,
 	      (PTRACE_TYPE_ARG3) (regno * 8 + 4), buf + 4);
     if (errno == 0)
       return (CORE_ADDR) *(unsigned long long *)buf;
@@ -106,7 +109,8 @@ fetch_ppc_memory_1 (int tid, CORE_ADDR m
   if (memaddr >> 32)
     {
       unsigned long long addr_8 = (unsigned long long) memaddr;
-      ptrace (PPC_PTRACE_PEEKTEXT_3264, tid, (PTRACE_TYPE_ARG3) &addr_8, word);
+      ptrace ((PTRACE_TYPE_ARG1) PPC_PTRACE_PEEKTEXT_3264, tid,
+	      (PTRACE_TYPE_ARG3) &addr_8, word);
     }
   else
 #endif
@@ -125,7 +129,8 @@ store_ppc_memory_1 (int tid, CORE_ADDR m
   if (memaddr >> 32)
     {
       unsigned long long addr_8 = (unsigned long long) memaddr;
-      ptrace (PPC_PTRACE_POKEDATA_3264, tid, (PTRACE_TYPE_ARG3) &addr_8, word);
+      ptrace ((PTRACE_TYPE_ARG1) PPC_PTRACE_POKEDATA_3264, tid,
+	      (PTRACE_TYPE_ARG3) &addr_8, word);
     }
   else
 #endif
@@ -147,7 +152,7 @@ fetch_ppc_memory (CORE_ADDR memaddr, cha
 
   int tid = ptid_get_lwp (current_ptid);
 
-  buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
+  buffer = XALLOCAVEC (PTRACE_TYPE_RET, count);
   for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
     if ((ret = fetch_ppc_memory_1 (tid, addr, &buffer[i])) != 0)
       return ret;
@@ -172,7 +177,7 @@ store_ppc_memory (CORE_ADDR memaddr, cha
 
   int tid = ptid_get_lwp (current_ptid);
 
-  buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
+  buffer = XALLOCAVEC (PTRACE_TYPE_RET, count);
 
   if (addr != memaddr || len < (int) sizeof (PTRACE_TYPE_RET))
     if ((ret = fetch_ppc_memory_1 (tid, addr, &buffer[0])) != 0)
@@ -383,11 +388,12 @@ spu_thread_alive (ptid_t ptid)
 static void
 spu_resume (struct thread_resume *resume_info, size_t n)
 {
+  struct thread_info *thr = get_first_thread ();
   size_t i;
 
   for (i = 0; i < n; i++)
     if (ptid_equal (resume_info[i].thread, minus_one_ptid)
-	|| ptid_equal (resume_info[i].thread, current_ptid))
+	|| ptid_equal (resume_info[i].thread, ptid_of (thr)))
       break;
 
   if (i == n)
@@ -401,7 +407,7 @@ spu_resume (struct thread_resume *resume
   regcache_invalidate ();
 
   errno = 0;
-  ptrace (PTRACE_CONT, ptid_get_lwp (current_ptid), 0, resume_info[i].sig);
+  ptrace (PTRACE_CONT, ptid_get_lwp (ptid_of (thr)), 0, resume_info[i].sig);
   if (errno)
     perror_with_name ("ptrace");
 }
@@ -633,11 +639,23 @@ spu_look_up_symbols (void)
 static void
 spu_request_interrupt (void)
 {
-  syscall (SYS_tkill, ptid_get_lwp (current_ptid), SIGINT);
+  struct thread_info *thr = get_first_thread ();
+
+  syscall (SYS_tkill, lwpid_of (thr), SIGINT);
+}
+
+/* Implementation of the target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+spu_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = sizeof breakpoint;
+  return breakpoint;
 }
 
 static struct target_ops spu_target_ops = {
   spu_create_inferior,
+  NULL,  /* post_create_inferior */
   spu_attach,
   spu_kill,
   spu_detach,
@@ -662,21 +680,58 @@ static struct target_ops spu_target_ops 
   NULL, /* supports_stopped_by_sw_breakpoint */
   NULL, /* stopped_by_hw_breakpoint */
   NULL, /* supports_stopped_by_hw_breakpoint */
-  NULL, /* supports_conditional_breakpoints */
+  NULL, /* supports_hardware_single_step */
   NULL,
   NULL,
   NULL,
   NULL,
   spu_proc_xfer_spu,
   hostio_last_error_from_errno,
+  NULL, /* qxfer_osdata */
+  NULL, /* qxfer_siginfo */
+  NULL, /* supports_non_stop */
+  NULL, /* async */
+  NULL, /* start_non_stop */
+  NULL, /* supports_multi_process */
+  NULL, /* supports_fork_events */
+  NULL, /* supports_vfork_events */
+  NULL, /* supports_exec_events */
+  NULL, /* handle_new_gdb_connection */
+  NULL, /* handle_monitor_command */
+  NULL, /* core_of_thread */
+  NULL, /* read_loadmap */
+  NULL, /* process_qsupported */
+  NULL, /* supports_tracepoints */
+  NULL, /* read_pc */
+  NULL, /* write_pc */
+  NULL, /* thread_stopped */
+  NULL, /* get_tib_address */
+  NULL, /* pause_all */
+  NULL, /* unpause_all */
+  NULL, /* stabilize_threads */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* supports_disable_randomization */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* qxfer_libraries_svr4 */
+  NULL, /* support_agent */
+  NULL, /* support_btrace */
+  NULL, /* enable_btrace */
+  NULL, /* disable_btrace */
+  NULL, /* read_btrace */
+  NULL, /* read_btrace_conf */
+  NULL, /* supports_range_stepping */
+  NULL, /* pid_to_exec_file */
+  NULL, /* multifs_open */
+  NULL, /* multifs_unlink */
+  NULL, /* multifs_readlink */
+  NULL, /* breakpoint_kind_from_pc */
+  spu_sw_breakpoint_from_kind,
 };
 
 void
 initialize_low (void)
 {
-  static const unsigned char breakpoint[] = { 0x00, 0x00, 0x3f, 0xff };
-
   set_target_ops (&spu_target_ops);
-  set_breakpoint_data (breakpoint, sizeof breakpoint);
   init_registers_spu ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/symbol.c ./gdb/gdbserver/symbol.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/symbol.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/symbol.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Symbol manipulating routines for the remote server for GDB.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/target.c ./gdb/gdbserver/target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target operations for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -23,7 +23,7 @@
 
 struct target_ops *the_target;
 
-void
+int
 set_desired_thread (int use_general)
 {
   struct thread_info *found;
@@ -33,10 +33,117 @@ set_desired_thread (int use_general)
   else
     found = find_thread_ptid (cont_thread);
 
-  if (found == NULL)
-    current_thread = get_first_thread ();
+  current_thread = found;
+  return (current_thread != NULL);
+}
+
+/* Structure used to look up a thread to use as current when accessing
+   memory.  */
+
+struct thread_search
+{
+  /* The PTID of the current general thread.  This is an input
+     parameter.  */
+  ptid_t current_gen_ptid;
+
+  /* The first thread found.  */
+  struct thread_info *first;
+
+  /* The first stopped thread found.  */
+  struct thread_info *stopped;
+
+  /* The current general thread, if found.  */
+  struct thread_info *current;
+};
+
+/* Callback for find_inferior.  Search for a thread to use as current
+   when accessing memory.  */
+
+static int
+thread_search_callback (struct inferior_list_entry *entry, void *args)
+{
+  struct thread_info *thread = (struct thread_info *) entry;
+  struct thread_search *s = (struct thread_search *) args;
+
+  if (ptid_get_pid (entry->id) == ptid_get_pid (s->current_gen_ptid)
+      && mythread_alive (ptid_of (thread)))
+    {
+      if (s->stopped == NULL
+	  && the_target->thread_stopped != NULL
+	  && thread_stopped (thread))
+	s->stopped = thread;
+
+      if (s->first == NULL)
+	s->first = thread;
+
+      if (s->current == NULL && ptid_equal (s->current_gen_ptid, entry->id))
+	s->current = thread;
+    }
+
+  return 0;
+}
+
+/* The thread that was current before prepare_to_access_memory was
+   called.  done_accessing_memory uses this to restore the previous
+   selected thread.  */
+static ptid_t prev_general_thread;
+
+/* See target.h.  */
+
+int
+prepare_to_access_memory (void)
+{
+  struct thread_search search;
+  struct thread_info *thread;
+
+  memset (&search, 0, sizeof (search));
+  search.current_gen_ptid = general_thread;
+  prev_general_thread = general_thread;
+
+  if (the_target->prepare_to_access_memory != NULL)
+    {
+      int res;
+
+      res = the_target->prepare_to_access_memory ();
+      if (res != 0)
+	return res;
+    }
+
+  find_inferior (&all_threads, thread_search_callback, &search);
+
+  /* Prefer a stopped thread.  If none is found, try the current
+     thread.  Otherwise, take the first thread in the process.  If
+     none is found, undo the effects of
+     target->prepare_to_access_memory() and return error.  */
+  if (search.stopped != NULL)
+    thread = search.stopped;
+  else if (search.current != NULL)
+    thread = search.current;
+  else if (search.first != NULL)
+    thread = search.first;
   else
-    current_thread = found;
+    {
+      done_accessing_memory ();
+      return 1;
+    }
+
+  current_thread = thread;
+  general_thread = ptid_of (thread);
+
+  return 0;
+}
+
+/* See target.h.  */
+
+void
+done_accessing_memory (void)
+{
+  if (the_target->done_accessing_memory != NULL)
+    the_target->done_accessing_memory ();
+
+  /* Restore the previous selected thread.  */
+  general_thread = prev_general_thread;
+  current_thread = find_thread_ptid (general_thread);
 }
 
 int
@@ -77,7 +184,7 @@ write_inferior_memory (CORE_ADDR memaddr
   if (buffer != NULL)
     free (buffer);
 
-  buffer = xmalloc (len);
+  buffer = (unsigned char *) xmalloc (len);
   memcpy (buffer, myaddr, len);
   check_mem_write (memaddr, buffer, myaddr, len);
   res = (*the_target->write_memory) (memaddr, buffer, len);
@@ -104,7 +211,7 @@ mywait (ptid_t ptid, struct target_waits
   if (connected_wait)
     server_waiting = 1;
 
-  ret = (*the_target->wait) (ptid, ourstatus, options);
+  ret = target_wait (ptid, ourstatus, options);
 
   /* We don't expose _LOADED events to gdbserver core.  See the
      `dlls_changed' global.  */
@@ -155,6 +262,22 @@ target_stop_and_wait (ptid_t ptid)
 
 /* See target/target.h.  */
 
+ptid_t
+target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
+{
+  return (*the_target->wait) (ptid, status, options);
+}
+
+/* See target/target.h.  */
+
+void
+target_mourn_inferior (ptid_t ptid)
+{
+  (*the_target->mourn) (find_process_pid (ptid_get_pid (ptid)));
+}
+
+/* See target/target.h.  */
+
 void
 target_continue_no_signal (ptid_t ptid)
 {
@@ -166,6 +289,28 @@ target_continue_no_signal (ptid_t ptid)
   (*the_target->resume) (&resume_info, 1);
 }
 
+/* See target/target.h.  */
+
+void
+target_continue (ptid_t ptid, enum gdb_signal signal)
+{
+  struct thread_resume resume_info;
+
+  resume_info.thread = ptid;
+  resume_info.kind = resume_continue;
+  resume_info.sig = gdb_signal_to_host (signal);
+  (*the_target->resume) (&resume_info, 1);
+}
+
+/* See target/target.h.  */
+
+int
+target_supports_multi_process (void)
+{
+  return (the_target->supports_multi_process != NULL ?
+	  (*the_target->supports_multi_process) () : 0);
+}
+
 int
 start_non_stop (int nonstop)
 {
@@ -183,7 +328,7 @@ start_non_stop (int nonstop)
 void
 set_target_ops (struct target_ops *target)
 {
-  the_target = (struct target_ops *) xmalloc (sizeof (*the_target));
+  the_target = XNEW (struct target_ops);
   memcpy (the_target, target, sizeof (*the_target));
 }
 
@@ -218,3 +363,27 @@ kill_inferior (int pid)
 
   return (*the_target->kill) (pid);
 }
+
+/* Target can do hardware single step.  */
+
+int
+target_can_do_hardware_single_step (void)
+{
+  return 1;
+}
+
+/* Default implementation for breakpoint_kind_for_pc.
+
+   The default behavior for targets that don't implement breakpoint_kind_for_pc
+   is to use the size of a breakpoint as the kind.  */
+
+int
+default_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+  int size = 0;
+
+  gdb_assert (the_target->sw_breakpoint_from_kind != NULL);
+
+  (*the_target->sw_breakpoint_from_kind) (0, &size);
+  return size;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/target.h ./gdb/gdbserver/target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/target.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/target.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target operations for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -21,6 +21,7 @@
 #ifndef TARGET_H
 #define TARGET_H
 
+#include <sys/types.h> /* for mode_t */
 #include "target/target.h"
 #include "target/resume.h"
 #include "target/wait.h"
@@ -74,6 +75,10 @@ struct target_ops
 
   int (*create_inferior) (char *program, char **args);
 
+  /* Do additional setup after a new process is created, including
+     exec-wrapper completion.  */
+  void (*post_create_inferior) (void);
+
   /* Attach to a running process.
 
      PID is the process ID to attach to, specified by the user
@@ -222,9 +227,8 @@ struct target_ops
      HW breakpoint triggering.  */
   int (*supports_stopped_by_hw_breakpoint) (void);
 
-  /* Returns true if the target can evaluate conditions of
-     breakpoints.  */
-  int (*supports_conditional_breakpoints) (void);
+  /* Returns true if the target can do hardware single step.  */
+  int (*supports_hardware_single_step) (void);
 
   /* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise.  */
 
@@ -287,6 +291,9 @@ struct target_ops
   /* Returns true if vfork events are supported.  */
   int (*supports_vfork_events) (void);
 
+  /* Returns true if exec events are supported.  */
+  int (*supports_exec_events) (void);
+
   /* Allows target to re-initialize connection-specific settings.  */
   void (*handle_new_gdb_connection) (void);
 
@@ -301,8 +308,9 @@ struct target_ops
   int (*read_loadmap) (const char *annex, CORE_ADDR offset,
 		       unsigned char *myaddr, unsigned int len);
 
-  /* Target specific qSupported support.  */
-  void (*process_qsupported) (const char *);
+  /* Target specific qSupported support.  FEATURES is an array of
+     features with COUNT elements.  */
+  void (*process_qsupported) (char **features, int count);
 
   /* Return 1 if the target supports tracepoints, 0 (or leave the
      callback NULL) otherwise.  */
@@ -394,11 +402,11 @@ struct target_ops
      Returns zero on success, non-zero otherwise.  */
   int (*disable_btrace) (struct btrace_target_info *tinfo);
 
-  /* Read branch trace data into buffer.  We use an int to specify the type
-     to break a cyclic dependency.
+  /* Read branch trace data into buffer.
      Return 0 on success; print an error message into BUFFER and return -1,
      otherwise.  */
-  int (*read_btrace) (struct btrace_target_info *, struct buffer *, int type);
+  int (*read_btrace) (struct btrace_target_info *, struct buffer *,
+		      enum btrace_read_type type);
 
   /* Read the branch trace configuration into BUFFER.
      Return 0 on success; print an error message into BUFFER and return -1
@@ -436,6 +444,36 @@ struct target_ops
      readlink(2).  */
   ssize_t (*multifs_readlink) (int pid, const char *filename,
 			       char *buf, size_t bufsiz);
+
+  /* Return the breakpoint kind for this target based on PC.  The PCPTR is
+     adjusted to the real memory location in case a flag (e.g., the Thumb bit on
+     ARM) was present in the PC.  */
+  int (*breakpoint_kind_from_pc) (CORE_ADDR *pcptr);
+
+  /* Return the software breakpoint from KIND.  KIND can have target
+     specific meaning like the Z0 kind parameter.
+     SIZE is set to the software breakpoint's length in memory.  */
+  const gdb_byte *(*sw_breakpoint_from_kind) (int kind, int *size);
+
+  /* Return the thread's name, or NULL if the target is unable to determine it.
+     The returned value must not be freed by the caller.  */
+  const char *(*thread_name) (ptid_t thread);
+
+  /* Return the breakpoint kind for this target based on the current
+     processor state (e.g. the current instruction mode on ARM) and the
+     PC.  The PCPTR is adjusted to the real memory location in case a flag
+     (e.g., the Thumb bit on ARM) is present in the PC.  */
+  int (*breakpoint_kind_from_current_state) (CORE_ADDR *pcptr);
+
+  /* Returns true if the target can software single step.  */
+  int (*supports_software_single_step) (void);
+
+  /* Return 1 if the target supports catch syscall, 0 (or leave the
+     callback NULL) otherwise.  */
+  int (*supports_catch_syscall) (void);
+
+  /* Return tdesc index for IPA.  */
+  int (*get_ipa_tdesc_idx) (void);
 };
 
 extern struct target_ops *the_target;
@@ -445,6 +483,13 @@ void set_target_ops (struct target_ops *
 #define create_inferior(program, args) \
   (*the_target->create_inferior) (program, args)
 
+#define target_post_create_inferior()			 \
+  do							 \
+    {							 \
+      if (the_target->post_create_inferior != NULL)	 \
+	(*the_target->post_create_inferior) ();		 \
+    } while (0)
+
 #define myattach(pid) \
   (*the_target->attach) (pid)
 
@@ -458,6 +503,10 @@ int kill_inferior (int);
   (the_target->supports_vfork_events ? \
    (*the_target->supports_vfork_events) () : 0)
 
+#define target_supports_exec_events() \
+  (the_target->supports_exec_events ? \
+   (*the_target->supports_exec_events) () : 0)
+
 #define target_handle_new_gdb_connection()		 \
   do							 \
     {							 \
@@ -468,9 +517,6 @@ int kill_inferior (int);
 #define detach_inferior(pid) \
   (*the_target->detach) (pid)
 
-#define mourn_inferior(PROC) \
-  (*the_target->mourn) (PROC)
-
 #define mythread_alive(pid) \
   (*the_target->thread_alive) (pid)
 
@@ -489,17 +535,21 @@ int kill_inferior (int);
 #define target_async(enable) \
   (the_target->async ? (*the_target->async) (enable) : 0)
 
-#define target_supports_multi_process() \
-  (the_target->supports_multi_process ? \
-   (*the_target->supports_multi_process) () : 0)
-
-#define target_process_qsupported(query)		\
+#define target_process_qsupported(features, count)	\
   do							\
     {							\
       if (the_target->process_qsupported)		\
-	the_target->process_qsupported (query);		\
+	the_target->process_qsupported (features, count); \
     } while (0)
 
+#define target_supports_catch_syscall()              	\
+  (the_target->supports_catch_syscall ?			\
+   (*the_target->supports_catch_syscall) () : 0)
+
+#define target_get_ipa_tdesc_idx()			\
+  (the_target->get_ipa_tdesc_idx			\
+   ? (*the_target->get_ipa_tdesc_idx) () : 0)
+
 #define target_supports_tracepoints()			\
   (the_target->supports_tracepoints			\
    ? (*the_target->supports_tracepoints) () : 0)
@@ -599,14 +649,28 @@ int kill_inferior (int);
   (the_target->supports_stopped_by_hw_breakpoint ? \
    (*the_target->supports_stopped_by_hw_breakpoint) () : 0)
 
-#define target_supports_conditional_breakpoints() \
-  (the_target->supports_conditional_breakpoints ? \
-   (*the_target->supports_conditional_breakpoints) () : 0)
+#define target_supports_hardware_single_step() \
+  (the_target->supports_hardware_single_step ? \
+   (*the_target->supports_hardware_single_step) () : 0)
 
 #define target_stopped_by_hw_breakpoint() \
   (the_target->stopped_by_hw_breakpoint ? \
    (*the_target->stopped_by_hw_breakpoint) () : 0)
 
+#define target_breakpoint_kind_from_pc(pcptr) \
+  (the_target->breakpoint_kind_from_pc \
+   ? (*the_target->breakpoint_kind_from_pc) (pcptr) \
+   : default_breakpoint_kind_from_pc (pcptr))
+
+#define target_breakpoint_kind_from_current_state(pcptr) \
+  (the_target->breakpoint_kind_from_current_state \
+   ? (*the_target->breakpoint_kind_from_current_state) (pcptr) \
+   : target_breakpoint_kind_from_pc (pcptr))
+
+#define target_supports_software_single_step() \
+  (the_target->supports_software_single_step ? \
+   (*the_target->supports_software_single_step) () : 0)
+
 /* Start non-stop mode, returns 0 on success, -1 on failure.   */
 
 int start_non_stop (int nonstop);
@@ -614,29 +678,31 @@ int start_non_stop (int nonstop);
 ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options,
 	       int connected_wait);
 
-#define prepare_to_access_memory()		\
-  (the_target->prepare_to_access_memory		\
-   ? (*the_target->prepare_to_access_memory) () \
-   : 0)
+/* Prepare to read or write memory from the inferior process.  See the
+   corresponding target_ops methods for more details.  */
 
-#define done_accessing_memory()				\
-  do							\
-    {							\
-      if (the_target->done_accessing_memory)     	\
-	(*the_target->done_accessing_memory) ();  	\
-    } while (0)
+int prepare_to_access_memory (void);
+void done_accessing_memory (void);
 
 #define target_core_of_thread(ptid)		\
   (the_target->core_of_thread ? (*the_target->core_of_thread) (ptid) \
    : -1)
 
+#define target_thread_name(ptid)                                \
+  (the_target->thread_name ? (*the_target->thread_name) (ptid)  \
+   : NULL)
+
 int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len);
 
 int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
 			   int len);
 
-void set_desired_thread (int id);
+int set_desired_thread (int id);
 
 const char *target_pid_to_str (ptid_t);
 
+int target_can_do_hardware_single_step (void);
+
+int default_breakpoint_kind_from_pc (CORE_ADDR *pcptr);
+
 #endif /* TARGET_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tdesc.c ./gdb/gdbserver/tdesc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tdesc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/tdesc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,7 +40,7 @@ init_target_desc (struct target_desc *td
 
 #ifndef IN_PROCESS_AGENT
 
-static const struct target_desc default_description;
+static const struct target_desc default_description = { 0 };
 
 void
 copy_target_description (struct target_desc *dest,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tdesc.h ./gdb/gdbserver/tdesc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tdesc.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/tdesc.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target description definitions for remote server for GDB.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/terminal.h ./gdb/gdbserver/terminal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/terminal.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/terminal.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Terminal interface definitions for the GDB remote server.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/thread-db.c ./gdb/gdbserver/thread-db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/thread-db.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/thread-db.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Thread management interface, for the remote server for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -24,8 +24,6 @@
 
 extern int debug_threads;
 
-static int thread_db_use_events;
-
 #include "gdb_proc_service.h"
 #include "nat/gdb_thread_db.h"
 #include "gdb_vecs.h"
@@ -56,41 +54,14 @@ struct thread_db
   void *handle;
 #endif
 
-  /* Thread creation event breakpoint.  The code at this location in
-     the child process will be called by the pthread library whenever
-     a new thread is created.  By setting a special breakpoint at this
-     location, GDB can detect when a new thread is created.  We obtain
-     this location via the td_ta_event_addr call.  Note that if the
-     running kernel supports tracing clones, then we don't need to use
-     (and in fact don't use) this magic thread event breakpoint to
-     learn about threads.  */
-  struct breakpoint *td_create_bp;
-
   /* Addresses of libthread_db functions.  */
-  td_err_e (*td_ta_new_p) (struct ps_prochandle * ps, td_thragent_t **ta);
-  td_err_e (*td_ta_event_getmsg_p) (const td_thragent_t *ta,
-				    td_event_msg_t *msg);
-  td_err_e (*td_ta_set_event_p) (const td_thragent_t *ta,
-				 td_thr_events_t *event);
-  td_err_e (*td_ta_event_addr_p) (const td_thragent_t *ta,
-				  td_event_e event, td_notify_t *ptr);
-  td_err_e (*td_ta_map_lwp2thr_p) (const td_thragent_t *ta, lwpid_t lwpid,
-				   td_thrhandle_t *th);
-  td_err_e (*td_thr_get_info_p) (const td_thrhandle_t *th,
-				 td_thrinfo_t *infop);
-  td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th, int event);
-  td_err_e (*td_ta_thr_iter_p) (const td_thragent_t *ta,
-				td_thr_iter_f *callback, void *cbdata_p,
-				td_thr_state_e state, int ti_pri,
-				sigset_t *ti_sigmask_p,
-				unsigned int ti_user_flags);
-  td_err_e (*td_thr_tls_get_addr_p) (const td_thrhandle_t *th,
-				     psaddr_t map_address,
-				     size_t offset, psaddr_t *address);
-  td_err_e (*td_thr_tlsbase_p) (const td_thrhandle_t *th,
-				unsigned long int modid,
-				psaddr_t *base);
-  const char ** (*td_symbol_list_p) (void);
+  td_ta_new_ftype *td_ta_new_p;
+  td_ta_map_lwp2thr_ftype *td_ta_map_lwp2thr_p;
+  td_thr_get_info_ftype *td_thr_get_info_p;
+  td_ta_thr_iter_ftype *td_ta_thr_iter_p;
+  td_thr_tls_get_addr_ftype *td_thr_tls_get_addr_p;
+  td_thr_tlsbase_ftype *td_thr_tlsbase_p;
+  td_symbol_list_ftype *td_symbol_list_p;
 };
 
 static char *libthread_db_search_path;
@@ -185,84 +156,6 @@ thread_db_state_str (td_thr_state_e stat
 #endif
 
 static int
-thread_db_create_event (CORE_ADDR where)
-{
-  td_event_msg_t msg;
-  td_err_e err;
-  struct lwp_info *lwp;
-  struct thread_db *thread_db = current_process ()->priv->thread_db;
-
-  gdb_assert (thread_db->td_ta_event_getmsg_p != NULL);
-
-  if (debug_threads)
-    debug_printf ("Thread creation event.\n");
-
-  /* FIXME: This assumes we don't get another event.
-     In the LinuxThreads implementation, this is safe,
-     because all events come from the manager thread
-     (except for its own creation, of course).  */
-  err = thread_db->td_ta_event_getmsg_p (thread_db->thread_agent, &msg);
-  if (err != TD_OK)
-    fprintf (stderr, "thread getmsg err: %s\n",
-	     thread_db_err_str (err));
-
-  /* If we do not know about the main thread yet, this would be a good time to
-     find it.  We need to do this to pick up the main thread before any newly
-     created threads.  */
-  lwp = get_thread_lwp (current_thread);
-  if (lwp->thread_known == 0)
-    find_one_thread (current_thread->entry.id);
-
-  /* msg.event == TD_EVENT_CREATE */
-
-  find_new_threads_callback (msg.th_p, NULL);
-
-  return 0;
-}
-
-static int
-thread_db_enable_reporting (void)
-{
-  td_thr_events_t events;
-  td_notify_t notify;
-  td_err_e err;
-  struct thread_db *thread_db = current_process ()->priv->thread_db;
-
-  if (thread_db->td_ta_set_event_p == NULL
-      || thread_db->td_ta_event_addr_p == NULL
-      || thread_db->td_ta_event_getmsg_p == NULL)
-    /* This libthread_db is missing required support.  */
-    return 0;
-
-  /* Set the process wide mask saying which events we're interested in.  */
-  td_event_emptyset (&events);
-  td_event_addset (&events, TD_CREATE);
-
-  err = thread_db->td_ta_set_event_p (thread_db->thread_agent, &events);
-  if (err != TD_OK)
-    {
-      warning ("Unable to set global thread event mask: %s",
-	       thread_db_err_str (err));
-      return 0;
-    }
-
-  /* Get address for thread creation breakpoint.  */
-  err = thread_db->td_ta_event_addr_p (thread_db->thread_agent, TD_CREATE,
-				       &notify);
-  if (err != TD_OK)
-    {
-      warning ("Unable to get location for thread creation breakpoint: %s",
-	       thread_db_err_str (err));
-      return 0;
-    }
-  thread_db->td_create_bp
-    = set_breakpoint_at ((CORE_ADDR) (unsigned long) notify.u.bptaddr,
-			 thread_db_create_event);
-
-  return 1;
-}
-
-static int
 find_one_thread (ptid_t ptid)
 {
   td_thrhandle_t th;
@@ -291,7 +184,7 @@ find_one_thread (ptid_t ptid)
 
   if (debug_threads)
     debug_printf ("Found thread %ld (LWP %d)\n",
-		  ti.ti_tid, ti.ti_lid);
+		  (unsigned long) ti.ti_tid, ti.ti_lid);
 
   if (lwpid != ti.ti_lid)
     {
@@ -300,14 +193,6 @@ find_one_thread (ptid_t ptid)
       return 0;
     }
 
-  if (thread_db_use_events)
-    {
-      err = thread_db->td_thr_event_enable_p (&th, 1);
-      if (err != TD_OK)
-	error ("Cannot enable thread event reporting for %d: %s",
-	       ti.ti_lid, thread_db_err_str (err));
-    }
-
   /* If the new thread ID is zero, a final thread ID will be available
      later.  Do not enable thread debugging yet.  */
   if (ti.ti_tid == 0)
@@ -332,12 +217,12 @@ attach_thread (const td_thrhandle_t *th_
 
   if (debug_threads)
     debug_printf ("Attaching to thread %ld (LWP %d)\n",
-		  ti_p->ti_tid, ti_p->ti_lid);
+		  (unsigned long) ti_p->ti_tid, ti_p->ti_lid);
   err = linux_attach_lwp (ptid);
   if (err != 0)
     {
       warning ("Could not attach to thread %ld (LWP %d): %s\n",
-	       ti_p->ti_tid, ti_p->ti_lid,
+	       (unsigned long) ti_p->ti_tid, ti_p->ti_lid,
 	       linux_ptrace_attach_fail_reason_string (ptid, err));
       return 0;
     }
@@ -347,17 +232,6 @@ attach_thread (const td_thrhandle_t *th_
   lwp->thread_known = 1;
   lwp->th = *th_p;
 
-  if (thread_db_use_events)
-    {
-      td_err_e err;
-      struct thread_db *thread_db = proc->priv->thread_db;
-
-      err = thread_db->td_thr_event_enable_p (th_p, 1);
-      if (err != TD_OK)
-	error ("Cannot enable thread event reporting for %d: %s",
-	       ti_p->ti_lid, thread_db_err_str (err));
-    }
-
   return 1;
 }
 
@@ -405,7 +279,8 @@ find_new_threads_callback (const td_thrh
 	 glibc PR17707.  */
       if (debug_threads)
 	debug_printf ("thread_db: skipping exited and "
-		      "joined thread (0x%lx)\n", ti.ti_tid);
+		      "joined thread (0x%lx)\n",
+		      (unsigned long) ti.ti_tid);
       return 0;
     }
 
@@ -575,7 +450,7 @@ thread_db_load_search (void)
 
   gdb_assert (proc->priv->thread_db == NULL);
 
-  tdb = xcalloc (1, sizeof (*tdb));
+  tdb = XCNEW (struct thread_db);
   proc->priv->thread_db = tdb;
 
   tdb->td_ta_new_p = &td_ta_new;
@@ -596,13 +471,7 @@ thread_db_load_search (void)
   tdb->td_ta_thr_iter_p = &td_ta_thr_iter;
   tdb->td_symbol_list_p = &td_symbol_list;
 
-  /* This is required only when thread_db_use_events is on.  */
-  tdb->td_thr_event_enable_p = &td_thr_event_enable;
-
   /* These are not essential.  */
-  tdb->td_ta_event_addr_p = &td_ta_event_addr;
-  tdb->td_ta_set_event_p = &td_ta_set_event;
-  tdb->td_ta_event_getmsg_p = &td_ta_event_getmsg;
   tdb->td_thr_tls_get_addr_p = &td_thr_tls_get_addr;
   tdb->td_thr_tlsbase_p = &td_thr_tlsbase;
 
@@ -620,7 +489,7 @@ try_thread_db_load_1 (void *handle)
 
   gdb_assert (proc->priv->thread_db == NULL);
 
-  tdb = xcalloc (1, sizeof (*tdb));
+  tdb = XCNEW (struct thread_db);
   proc->priv->thread_db = tdb;
 
   tdb->handle = handle;
@@ -645,7 +514,10 @@ try_thread_db_load_1 (void *handle)
     }								\
   while (0)
 
-  CHK (1, tdb->td_ta_new_p = dlsym (handle, "td_ta_new"));
+#define TDB_DLSYM(tdb, func) \
+  tdb->func ## _p = (func ## _ftype *) dlsym (tdb->handle, #func)
+
+  CHK (1, TDB_DLSYM (tdb, td_ta_new));
 
   /* Attempt to open a connection to the thread library.  */
   err = tdb->td_ta_new_p (&tdb->proc_handle, &tdb->thread_agent);
@@ -658,23 +530,17 @@ try_thread_db_load_1 (void *handle)
       return 0;
     }
 
-  CHK (1, tdb->td_ta_map_lwp2thr_p = dlsym (handle, "td_ta_map_lwp2thr"));
-  CHK (1, tdb->td_thr_get_info_p = dlsym (handle, "td_thr_get_info"));
-  CHK (1, tdb->td_ta_thr_iter_p = dlsym (handle, "td_ta_thr_iter"));
-  CHK (1, tdb->td_symbol_list_p = dlsym (handle, "td_symbol_list"));
-
-  /* This is required only when thread_db_use_events is on.  */
-  CHK (thread_db_use_events,
-       tdb->td_thr_event_enable_p = dlsym (handle, "td_thr_event_enable"));
+  CHK (1, TDB_DLSYM (tdb, td_ta_map_lwp2thr));
+  CHK (1, TDB_DLSYM (tdb, td_thr_get_info));
+  CHK (1, TDB_DLSYM (tdb, td_ta_thr_iter));
+  CHK (1, TDB_DLSYM (tdb, td_symbol_list));
 
   /* These are not essential.  */
-  CHK (0, tdb->td_ta_event_addr_p = dlsym (handle, "td_ta_event_addr"));
-  CHK (0, tdb->td_ta_set_event_p = dlsym (handle, "td_ta_set_event"));
-  CHK (0, tdb->td_ta_event_getmsg_p = dlsym (handle, "td_ta_event_getmsg"));
-  CHK (0, tdb->td_thr_tls_get_addr_p = dlsym (handle, "td_thr_tls_get_addr"));
-  CHK (0, tdb->td_thr_tlsbase_p = dlsym (handle, "td_thr_tlsbase"));
+  CHK (0, TDB_DLSYM (tdb, td_thr_tls_get_addr));
+  CHK (0, TDB_DLSYM (tdb, td_thr_tlsbase));
 
 #undef CHK
+#undef TDB_DLSYM
 
   return 1;
 }
@@ -724,8 +590,7 @@ try_thread_db_load (const char *library)
 	  const char *const libpath = dladdr_to_soname (td_init);
 
 	  if (libpath != NULL)
-	    fprintf (stderr, "Host %s resolved to: %s.\n",
-		     library, libpath);
+	    debug_printf ("Host %s resolved to: %s.\n", library, libpath);
 	}
     }
 #endif
@@ -759,7 +624,7 @@ try_thread_db_load_from_dir (const char 
 
   if (dir_len + 1 + strlen (LIBTHREAD_DB_SO) + 1 > sizeof (path))
     {
-      char *cp = xmalloc (dir_len + 1);
+      char *cp = (char *) xmalloc (dir_len + 1);
 
       memcpy (cp, dir, dir_len);
       cp[dir_len] = '\0';
@@ -833,7 +698,7 @@ thread_db_load_search (void)
 #endif  /* USE_LIBTHREAD_DB_DIRECTLY */
 
 int
-thread_db_init (int use_events)
+thread_db_init (void)
 {
   struct process_info *proc = current_process ();
 
@@ -841,38 +706,25 @@ thread_db_init (int use_events)
      GNU/Linux calls tgid, "thread group ID".  When we support
      attaching to threads, the original thread may not be the correct
      thread.  We would have to get the process ID from /proc for NPTL.
-     For LinuxThreads we could do something similar: follow the chain
-     of parent processes until we find the highest one we're attached
-     to, and use its tgid.
 
      This isn't the only place in gdbserver that assumes that the first
      process in the list is the thread group leader.  */
 
-  thread_db_use_events = use_events;
-
   if (thread_db_load_search ())
     {
-      if (use_events && thread_db_enable_reporting () == 0)
-	{
-	  /* Keep trying; maybe event reporting will work later.  */
-	  thread_db_mourn (proc);
-	  return 0;
-	}
-
       /* It's best to avoid td_ta_thr_iter if possible.  That walks
 	 data structures in the inferior's address space that may be
 	 corrupted, or, if the target is running, the list may change
 	 while we walk it.  In the latter case, it's possible that a
 	 thread exits just at the exact time that causes GDBserver to
-	 get stuck in an infinite loop.  If the kernel supports clone
-	 events, and /proc/PID/task/ exits, then we already know about
+	 get stuck in an infinite loop.  As the kernel supports clone
+	 events and /proc/PID/task/ exists, then we already know about
 	 all threads in the process.  When we need info out of
 	 thread_db on a given thread (e.g., for TLS), we'll use
 	 find_one_thread then.  That uses thread_db entry points that
 	 do not walk libpthread's thread list, so should be safe, as
 	 well as more efficient.  */
-      if (use_events
-	  || !linux_proc_task_list_dir_exists (pid_of (proc)))
+      if (!linux_proc_task_list_dir_exists (pid_of (proc)))
 	thread_db_find_new_threads ();
       thread_db_look_up_symbols ();
       return 1;
@@ -884,7 +736,7 @@ thread_db_init (int use_events)
 static int
 any_thread_of (struct inferior_list_entry *entry, void *args)
 {
-  int *pid_p = args;
+  int *pid_p = (int *) args;
 
   if (ptid_get_pid (entry->id) == *pid_p)
     return 1;
@@ -914,7 +766,9 @@ disable_thread_event_reporting (struct p
 				       td_thr_events_t *event);
 
 #ifndef USE_LIBTHREAD_DB_DIRECTLY
-      td_ta_clear_event_p = dlsym (thread_db->handle, "td_ta_clear_event");
+      td_ta_clear_event_p
+	= (td_ta_clear_event_ftype *) dlsym (thread_db->handle,
+					     "td_ta_clear_event");
 #else
       td_ta_clear_event_p = &td_ta_clear_event;
 #endif
@@ -936,24 +790,6 @@ disable_thread_event_reporting (struct p
     }
 }
 
-static void
-remove_thread_event_breakpoints (struct process_info *proc)
-{
-  struct thread_db *thread_db = proc->priv->thread_db;
-
-  if (thread_db->td_create_bp != NULL)
-    {
-      struct thread_info *saved_thread = current_thread;
-
-      switch_to_process (proc);
-
-      delete_breakpoint (thread_db->td_create_bp);
-      thread_db->td_create_bp = NULL;
-
-      current_thread = saved_thread;
-    }
-}
-
 void
 thread_db_detach (struct process_info *proc)
 {
@@ -962,7 +798,6 @@ thread_db_detach (struct process_info *p
   if (thread_db)
     {
       disable_thread_event_reporting (proc);
-      remove_thread_event_breakpoints (proc);
     }
 }
 
@@ -974,10 +809,10 @@ thread_db_mourn (struct process_info *pr
   struct thread_db *thread_db = proc->priv->thread_db;
   if (thread_db)
     {
-      td_err_e (*td_ta_delete_p) (td_thragent_t *);
+      td_ta_delete_ftype *td_ta_delete_p;
 
 #ifndef USE_LIBTHREAD_DB_DIRECTLY
-      td_ta_delete_p = dlsym (thread_db->handle, "td_ta_delete");
+      td_ta_delete_p = (td_ta_delete_ftype *) dlsym (thread_db->handle, "td_ta_delete");
 #else
       td_ta_delete_p = &td_ta_delete;
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tracepoint.c ./gdb/gdbserver/tracepoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tracepoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/tracepoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Tracepoint code for remote server for GDB.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +25,7 @@
 #include <ctype.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <sys/time.h>
+#include <chrono>
 #include <inttypes.h>
 #include "ax.h"
 #include "tdesc.h"
@@ -108,7 +108,7 @@ trace_vdebug (const char *fmt, ...)
 # define gdb_trampoline_buffer_end IPA_SYM_EXPORTED_NAME (gdb_trampoline_buffer_end)
 # define gdb_trampoline_buffer_error IPA_SYM_EXPORTED_NAME (gdb_trampoline_buffer_error)
 # define collecting IPA_SYM_EXPORTED_NAME (collecting)
-# define gdb_collect IPA_SYM_EXPORTED_NAME (gdb_collect)
+# define gdb_collect_ptr IPA_SYM_EXPORTED_NAME (gdb_collect_ptr)
 # define stop_tracing IPA_SYM_EXPORTED_NAME (stop_tracing)
 # define flush_trace_buffer IPA_SYM_EXPORTED_NAME (flush_trace_buffer)
 # define about_to_request_buffer_space IPA_SYM_EXPORTED_NAME (about_to_request_buffer_space)
@@ -126,14 +126,15 @@ trace_vdebug (const char *fmt, ...)
 # define traceframe_write_count IPA_SYM_EXPORTED_NAME (traceframe_write_count)
 # define traceframes_created IPA_SYM_EXPORTED_NAME (traceframes_created)
 # define trace_state_variables IPA_SYM_EXPORTED_NAME (trace_state_variables)
-# define get_raw_reg IPA_SYM_EXPORTED_NAME (get_raw_reg)
-# define get_trace_state_variable_value \
-  IPA_SYM_EXPORTED_NAME (get_trace_state_variable_value)
-# define set_trace_state_variable_value \
-  IPA_SYM_EXPORTED_NAME (set_trace_state_variable_value)
+# define get_raw_reg_ptr IPA_SYM_EXPORTED_NAME (get_raw_reg_ptr)
+# define get_trace_state_variable_value_ptr \
+  IPA_SYM_EXPORTED_NAME (get_trace_state_variable_value_ptr)
+# define set_trace_state_variable_value_ptr \
+  IPA_SYM_EXPORTED_NAME (set_trace_state_variable_value_ptr)
 # define ust_loaded IPA_SYM_EXPORTED_NAME (ust_loaded)
 # define helper_thread_id IPA_SYM_EXPORTED_NAME (helper_thread_id)
 # define cmd_buf IPA_SYM_EXPORTED_NAME (cmd_buf)
+# define ipa_tdesc_idx IPA_SYM_EXPORTED_NAME (ipa_tdesc_idx)
 #endif
 
 #ifndef IN_PROCESS_AGENT
@@ -149,7 +150,7 @@ struct ipa_sym_addresses
   CORE_ADDR addr_gdb_trampoline_buffer_end;
   CORE_ADDR addr_gdb_trampoline_buffer_error;
   CORE_ADDR addr_collecting;
-  CORE_ADDR addr_gdb_collect;
+  CORE_ADDR addr_gdb_collect_ptr;
   CORE_ADDR addr_stop_tracing;
   CORE_ADDR addr_flush_trace_buffer;
   CORE_ADDR addr_about_to_request_buffer_space;
@@ -167,17 +168,17 @@ struct ipa_sym_addresses
   CORE_ADDR addr_traceframe_write_count;
   CORE_ADDR addr_traceframes_created;
   CORE_ADDR addr_trace_state_variables;
-  CORE_ADDR addr_get_raw_reg;
-  CORE_ADDR addr_get_trace_state_variable_value;
-  CORE_ADDR addr_set_trace_state_variable_value;
+  CORE_ADDR addr_get_raw_reg_ptr;
+  CORE_ADDR addr_get_trace_state_variable_value_ptr;
+  CORE_ADDR addr_set_trace_state_variable_value_ptr;
   CORE_ADDR addr_ust_loaded;
+  CORE_ADDR addr_ipa_tdesc_idx;
 };
 
 static struct
 {
   const char *name;
   int offset;
-  int required;
 } symbol_list[] = {
   IPA_SYM(gdb_tp_heap_buffer),
   IPA_SYM(gdb_jump_pad_buffer),
@@ -186,7 +187,7 @@ static struct
   IPA_SYM(gdb_trampoline_buffer_end),
   IPA_SYM(gdb_trampoline_buffer_error),
   IPA_SYM(collecting),
-  IPA_SYM(gdb_collect),
+  IPA_SYM(gdb_collect_ptr),
   IPA_SYM(stop_tracing),
   IPA_SYM(flush_trace_buffer),
   IPA_SYM(about_to_request_buffer_space),
@@ -204,10 +205,11 @@ static struct
   IPA_SYM(traceframe_write_count),
   IPA_SYM(traceframes_created),
   IPA_SYM(trace_state_variables),
-  IPA_SYM(get_raw_reg),
-  IPA_SYM(get_trace_state_variable_value),
-  IPA_SYM(set_trace_state_variable_value),
+  IPA_SYM(get_raw_reg_ptr),
+  IPA_SYM(get_trace_state_variable_value_ptr),
+  IPA_SYM(set_trace_state_variable_value_ptr),
   IPA_SYM(ust_loaded),
+  IPA_SYM(ipa_tdesc_idx),
 };
 
 static struct ipa_sym_addresses ipa_sym_addrs;
@@ -447,13 +449,18 @@ write_inferior_integer (CORE_ADDR symadd
 }
 
 static int
+write_inferior_int8 (CORE_ADDR symaddr, int8_t val)
+{
+  return write_inferior_memory (symaddr, (unsigned char *) &val, sizeof (val));
+}
+
+static int
 write_inferior_uinteger (CORE_ADDR symaddr, unsigned int val)
 {
   return write_inferior_memory (symaddr, (unsigned char *) &val, sizeof (val));
 }
 
 static CORE_ADDR target_malloc (ULONGEST size);
-static int write_inferior_data_ptr (CORE_ADDR where, CORE_ADDR ptr);
 
 #define COPY_FIELD_TO_BUF(BUF, OBJ, FIELD)	\
   do {							\
@@ -463,28 +470,10 @@ static int write_inferior_data_ptr (CORE
 
 #endif
 
-/* Operations on various types of tracepoint actions.  */
-
-struct tracepoint_action;
-
-struct tracepoint_action_ops
-{
-  /* Download tracepoint action ACTION to IPA.  Return the address of action
-     in IPA/inferior.  */
-  CORE_ADDR (*download) (const struct tracepoint_action *action);
-
-  /* Send ACTION to agent via command buffer started from BUFFER.  Return
-     updated head of command buffer.  */
-  char* (*send) (char *buffer, const struct tracepoint_action *action);
-};
-
 /* Base action.  Concrete actions inherit this.  */
 
 struct tracepoint_action
 {
-#ifndef IN_PROCESS_AGENT
-  const struct tracepoint_action_ops *ops;
-#endif
   char type;
 };
 
@@ -524,12 +513,10 @@ struct collect_static_trace_data_action
 static CORE_ADDR
 m_tracepoint_action_download (const struct tracepoint_action *action)
 {
-  int size_in_ipa = (sizeof (struct collect_memory_action)
-		     - offsetof (struct tracepoint_action, type));
-  CORE_ADDR ipa_action = target_malloc (size_in_ipa);
+  CORE_ADDR ipa_action = target_malloc (sizeof (struct collect_memory_action));
 
-  write_inferior_memory (ipa_action, (unsigned char *) &action->type,
-			 size_in_ipa);
+  write_inferior_memory (ipa_action, (unsigned char *) action,
+			 sizeof (struct collect_memory_action));
 
   return ipa_action;
 }
@@ -546,21 +533,13 @@ m_tracepoint_action_send (char *buffer, 
   return buffer;
 }
 
-static const struct tracepoint_action_ops m_tracepoint_action_ops =
-{
-  m_tracepoint_action_download,
-  m_tracepoint_action_send,
-};
-
 static CORE_ADDR
 r_tracepoint_action_download (const struct tracepoint_action *action)
 {
-  int size_in_ipa = (sizeof (struct collect_registers_action)
-		     - offsetof (struct tracepoint_action, type));
-  CORE_ADDR ipa_action  = target_malloc (size_in_ipa);
+  CORE_ADDR ipa_action = target_malloc (sizeof (struct collect_registers_action));
 
-  write_inferior_memory (ipa_action, (unsigned char *) &action->type,
-			size_in_ipa);
+  write_inferior_memory (ipa_action, (unsigned char *) action,
+			 sizeof (struct collect_registers_action));
 
   return ipa_action;
 }
@@ -571,28 +550,20 @@ r_tracepoint_action_send (char *buffer, 
   return buffer;
 }
 
-static const struct tracepoint_action_ops r_tracepoint_action_ops =
-{
-  r_tracepoint_action_download,
-  r_tracepoint_action_send,
-};
-
 static CORE_ADDR download_agent_expr (struct agent_expr *expr);
 
 static CORE_ADDR
 x_tracepoint_action_download (const struct tracepoint_action *action)
 {
-  int size_in_ipa = (sizeof (struct eval_expr_action)
-		     - offsetof (struct tracepoint_action, type));
-  CORE_ADDR ipa_action = target_malloc (size_in_ipa);
+  CORE_ADDR ipa_action = target_malloc (sizeof (struct eval_expr_action));
   CORE_ADDR expr;
 
-  write_inferior_memory (ipa_action, (unsigned char *) &action->type,
-			 size_in_ipa);
-  expr = download_agent_expr (((struct eval_expr_action *)action)->expr);
-  write_inferior_data_ptr (ipa_action + offsetof (struct eval_expr_action, expr)
-			   - offsetof (struct tracepoint_action, type),
-			   expr);
+  write_inferior_memory (ipa_action, (unsigned char *) action,
+			 sizeof (struct eval_expr_action));
+  expr = download_agent_expr (((struct eval_expr_action *) action)->expr);
+  write_inferior_data_pointer (ipa_action
+			       + offsetof (struct eval_expr_action, expr),
+			       expr);
 
   return ipa_action;
 }
@@ -629,21 +600,14 @@ x_tracepoint_action_send ( char *buffer,
   return agent_expr_send (buffer, eaction->expr);
 }
 
-static const struct tracepoint_action_ops x_tracepoint_action_ops =
-{
-  x_tracepoint_action_download,
-  x_tracepoint_action_send,
-};
-
 static CORE_ADDR
 l_tracepoint_action_download (const struct tracepoint_action *action)
 {
-  int size_in_ipa = (sizeof (struct collect_static_trace_data_action)
-		     - offsetof (struct tracepoint_action, type));
-  CORE_ADDR ipa_action = target_malloc (size_in_ipa);
+  CORE_ADDR ipa_action
+    = target_malloc (sizeof (struct collect_static_trace_data_action));
 
-  write_inferior_memory (ipa_action, (unsigned char *) &action->type,
-			 size_in_ipa);
+  write_inferior_memory (ipa_action, (unsigned char *) action,
+			 sizeof (struct collect_static_trace_data_action));
 
   return ipa_action;
 }
@@ -654,11 +618,39 @@ l_tracepoint_action_send (char *buffer, 
   return buffer;
 }
 
-static const struct tracepoint_action_ops l_tracepoint_action_ops =
+static char *
+tracepoint_action_send (char *buffer, const struct tracepoint_action *action)
 {
-  l_tracepoint_action_download,
-  l_tracepoint_action_send,
-};
+  switch (action->type)
+    {
+    case 'M':
+      return m_tracepoint_action_send (buffer, action);
+    case 'R':
+      return r_tracepoint_action_send (buffer, action);
+    case 'X':
+      return x_tracepoint_action_send (buffer, action);
+    case 'L':
+      return l_tracepoint_action_send (buffer, action);
+    }
+  error ("Unknown trace action '%c'.", action->type);
+}
+
+static CORE_ADDR
+tracepoint_action_download (const struct tracepoint_action *action)
+{
+  switch (action->type)
+    {
+    case 'M':
+      return m_tracepoint_action_download (action);
+    case 'R':
+      return r_tracepoint_action_download (action);
+    case 'X':
+      return x_tracepoint_action_download (action);
+    case 'L':
+      return l_tracepoint_action_download (action);
+    }
+  error ("Unknown trace action '%c'.", action->type);
+}
 #endif
 
 /* This structure describes a piece of the source-level definition of
@@ -696,7 +688,7 @@ enum tracepoint_type
 
 struct tracepoint_hit_ctx;
 
-typedef enum eval_result_type (*condfn) (struct tracepoint_hit_ctx *,
+typedef enum eval_result_type (*condfn) (unsigned char *,
 					 ULONGEST *);
 
 /* The definition of a tracepoint.  */
@@ -849,7 +841,10 @@ IP_AGENT_EXPORT_VAR int trace_buffer_is_
 
 /* The first error that occurred during expression evaluation.  */
 
-IP_AGENT_EXPORT_VAR enum eval_result_type expr_eval_result = expr_eval_no_error;
+/* Stored as an int to avoid the IPA ABI being dependent on whatever
+   the compiler decides to use for the enum's underlying type.  Holds
+   enum eval_result_type values.  */
+IP_AGENT_EXPORT_VAR int expr_eval_result = expr_eval_no_error;
 
 EXTERN_C_POP
 
@@ -1495,7 +1490,7 @@ init_trace_buffer (LONGEST bufsize)
      marker.  */
   alloc_size = (bufsize < TRACEFRAME_EOB_MARKER_SIZE
 		? TRACEFRAME_EOB_MARKER_SIZE : bufsize);
-  trace_buffer_lo = xrealloc (trace_buffer_lo, alloc_size);
+  trace_buffer_lo = (unsigned char *) xrealloc (trace_buffer_lo, alloc_size);
 
   trace_buffer_hi = trace_buffer_lo + trace_buffer_size;
 
@@ -1801,7 +1796,7 @@ add_tracepoint (int num, CORE_ADDR addr)
 {
   struct tracepoint *tpoint, **tp_next;
 
-  tpoint = xmalloc (sizeof (struct tracepoint));
+  tpoint = XNEW (struct tracepoint);
   tpoint->number = num;
   tpoint->address = addr;
   tpoint->numactions = 0;
@@ -1936,13 +1931,12 @@ add_tracepoint_action (struct tracepoint
 	{
 	case 'M':
 	  {
-	    struct collect_memory_action *maction;
+	    struct collect_memory_action *maction =
+	      XNEW (struct collect_memory_action);
 	    ULONGEST basereg;
 	    int is_neg;
 
-	    maction = xmalloc (sizeof *maction);
 	    maction->base.type = *act;
-	    maction->base.ops = &m_tracepoint_action_ops;
 	    action = &maction->base;
 
 	    ++act;
@@ -1964,11 +1958,10 @@ add_tracepoint_action (struct tracepoint
 	  }
 	case 'R':
 	  {
-	    struct collect_registers_action *raction;
+	    struct collect_registers_action *raction =
+	      XNEW (struct collect_registers_action);
 
-	    raction = xmalloc (sizeof *raction);
 	    raction->base.type = *act;
-	    raction->base.ops = &r_tracepoint_action_ops;
 	    action = &raction->base;
 
 	    trace_debug ("Want to collect registers");
@@ -1980,11 +1973,10 @@ add_tracepoint_action (struct tracepoint
 	  }
 	case 'L':
 	  {
-	    struct collect_static_trace_data_action *raction;
+	    struct collect_static_trace_data_action *raction =
+	      XNEW (struct collect_static_trace_data_action);
 
-	    raction = xmalloc (sizeof *raction);
 	    raction->base.type = *act;
-	    raction->base.ops = &l_tracepoint_action_ops;
 	    action = &raction->base;
 
 	    trace_debug ("Want to collect static trace data");
@@ -1997,11 +1989,9 @@ add_tracepoint_action (struct tracepoint
 	  break;
 	case 'X':
 	  {
-	    struct eval_expr_action *xaction;
+	    struct eval_expr_action *xaction = XNEW (struct eval_expr_action);
 
-	    xaction = xmalloc (sizeof (*xaction));
 	    xaction->base.type = *act;
-	    xaction->base.ops = &x_tracepoint_action_ops;
 	    action = &xaction->base;
 
 	    trace_debug ("Want to evaluate expression");
@@ -2023,13 +2013,11 @@ add_tracepoint_action (struct tracepoint
 	  tpoint->num_step_actions++;
 
 	  tpoint->step_actions
-	    = xrealloc (tpoint->step_actions,
-			(sizeof (*tpoint->step_actions)
-			 * tpoint->num_step_actions));
+	    = XRESIZEVEC (struct tracepoint_action *, tpoint->step_actions,
+			  tpoint->num_step_actions);
 	  tpoint->step_actions_str
-	    = xrealloc (tpoint->step_actions_str,
-			(sizeof (*tpoint->step_actions_str)
-			 * tpoint->num_step_actions));
+	    = XRESIZEVEC (char *, tpoint->step_actions_str,
+			  tpoint->num_step_actions);
 	  tpoint->step_actions[tpoint->num_step_actions - 1] = action;
 	  tpoint->step_actions_str[tpoint->num_step_actions - 1]
 	    = savestring (act_start, act - act_start);
@@ -2038,11 +2026,10 @@ add_tracepoint_action (struct tracepoint
 	{
 	  tpoint->numactions++;
 	  tpoint->actions
-	    = xrealloc (tpoint->actions,
-			sizeof (*tpoint->actions) * tpoint->numactions);
+	    = XRESIZEVEC (struct tracepoint_action *, tpoint->actions,
+			  tpoint->numactions);
 	  tpoint->actions_str
-	    = xrealloc (tpoint->actions_str,
-			sizeof (*tpoint->actions_str) * tpoint->numactions);
+	    = XRESIZEVEC (char *, tpoint->actions_str, tpoint->numactions);
 	  tpoint->actions[tpoint->numactions - 1] = action;
 	  tpoint->actions_str[tpoint->numactions - 1]
 	    = savestring (act_start, act - act_start);
@@ -2086,7 +2073,7 @@ create_trace_state_variable (int num, in
     return tsv;
 
   /* Create a new variable.  */
-  tsv = xmalloc (sizeof (struct trace_state_variable));
+  tsv = XNEW (struct trace_state_variable);
   tsv->number = num;
   tsv->initial_value = 0;
   tsv->value = 0;
@@ -2200,7 +2187,8 @@ add_traceframe (struct tracepoint *tpoin
 {
   struct traceframe *tframe;
 
-  tframe = trace_buffer_alloc (sizeof (struct traceframe));
+  tframe
+    = (struct traceframe *) trace_buffer_alloc (sizeof (struct traceframe));
 
   if (tframe == NULL)
     return NULL;
@@ -2222,7 +2210,7 @@ add_traceframe_block (struct traceframe 
   if (!tframe)
     return NULL;
 
-  block = trace_buffer_alloc (amt);
+  block = (unsigned char *) trace_buffer_alloc (amt);
 
   if (!block)
     return NULL;
@@ -2449,10 +2437,20 @@ clear_installed_tracepoints (void)
       switch (tpoint->type)
 	{
 	case trap_tracepoint:
-	  delete_breakpoint (tpoint->handle);
+	  {
+	    struct breakpoint *bp
+	      = (struct breakpoint *) tpoint->handle;
+
+	    delete_breakpoint (bp);
+	  }
 	  break;
 	case fast_tracepoint:
-	  delete_fast_tracepoint_jump (tpoint->handle);
+	  {
+	    struct fast_tracepoint_jump *jump
+	      = (struct fast_tracepoint_jump *) tpoint->handle;
+
+	    delete_fast_tracepoint_jump (jump);
+	  }
 	  break;
 	case static_tracepoint:
 	  if (prev_stpoint != NULL
@@ -2684,7 +2682,7 @@ cmd_qtdpsrc (char *own_buf)
 
   saved = packet;
   packet = strchr (packet, ':');
-  srctype = xmalloc (packet - saved + 1);
+  srctype = (char *) xmalloc (packet - saved + 1);
   memcpy (srctype, saved, packet - saved);
   srctype[packet - saved] = '\0';
   ++packet;
@@ -2692,11 +2690,11 @@ cmd_qtdpsrc (char *own_buf)
   ++packet; /* skip a colon */
   packet = unpack_varlen_hex (packet, &slen);
   ++packet; /* skip a colon */
-  src = xmalloc (slen + 1);
+  src = (char *) xmalloc (slen + 1);
   nbytes = hex2bin (packet, (gdb_byte *) src, strlen (packet) / 2);
   src[nbytes] = '\0';
 
-  newlast = xmalloc (sizeof (struct source_string));
+  newlast = XNEW (struct source_string);
   newlast->type = srctype;
   newlast->str = src;
   newlast->next = NULL;
@@ -2734,7 +2732,7 @@ cmd_qtdv (char *own_buf)
   ++packet; /* skip a colon */
 
   nbytes = strlen (packet) / 2;
-  varname = xmalloc (nbytes + 1);
+  varname = (char *) xmalloc (nbytes + 1);
   nbytes = hex2bin (packet, (gdb_byte *) varname, nbytes);
   varname[nbytes] = '\0';
 
@@ -2791,8 +2789,8 @@ cmd_qtenable_disable (char *own_buf, int
 	      write_enn (own_buf);
 	      return;
 	    }
-	  
-	  ret = write_inferior_integer (obj_addr, enable);
+
+	  ret = write_inferior_int8 (obj_addr, enable);
 	  done_accessing_memory ();
 	  
 	  if (ret)
@@ -2886,7 +2884,8 @@ cmd_qtro (char *own_buf)
       packet = unpack_varlen_hex (packet, &start);
       ++packet;  /* skip a comma */
       packet = unpack_varlen_hex (packet, &end);
-      roreg = xmalloc (sizeof (struct readonly_region));
+
+      roreg = XNEW (struct readonly_region);
       roreg->start = start;
       roreg->end = end;
       roreg->next = readonly_regions;
@@ -2914,9 +2913,6 @@ in_readonly_region (CORE_ADDR addr, ULON
   return 0;
 }
 
-/* The maximum size of a jump pad entry.  */
-static const int max_jump_pad_size = 0x100;
-
 static CORE_ADDR gdb_jump_pad_head;
 
 /* Return the address of the next free jump space.  */
@@ -3078,6 +3074,7 @@ install_fast_tracepoint (struct tracepoi
 {
   CORE_ADDR jentry, jump_entry;
   CORE_ADDR trampoline;
+  CORE_ADDR collect;
   ULONGEST trampoline_size;
   int err = 0;
   /* The jump to the jump pad of the last fast tracepoint
@@ -3092,6 +3089,13 @@ install_fast_tracepoint (struct tracepoi
       return 0;
     }
 
+  if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_collect_ptr,
+				  &collect))
+    {
+      error ("error extracting gdb_collect_ptr");
+      return 1;
+    }
+
   jentry = jump_entry = get_jump_space_head ();
 
   trampoline = 0;
@@ -3100,7 +3104,7 @@ install_fast_tracepoint (struct tracepoi
   /* Install the jump pad.  */
   err = install_fast_tracepoint_jump_pad (tpoint->obj_addr_on_target,
 					  tpoint->address,
-					  ipa_sym_addrs.addr_gdb_collect,
+					  collect,
 					  ipa_sym_addrs.addr_collecting,
 					  tpoint->orig_size,
 					  &jentry,
@@ -3224,9 +3228,17 @@ cmd_qtstart (char *packet)
 
   *packet = '\0';
 
+  if (agent_loaded_p ())
+    {
+      /* Tell IPA about the correct tdesc.  */
+      if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
+				  target_get_ipa_tdesc_idx ()))
+        error ("Error setting ipa_tdesc_idx variable in lib");
+    }
+
   /* Start out empty.  */
   if (agent_loaded_p ())
-    write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0);
+    write_inferior_data_pointer (ipa_sym_addrs.addr_tracepoints, 0);
 
   /* Download and install tracepoints.  */
   for (tpoint = tracepoints; tpoint; tpoint = tpoint->next)
@@ -3322,11 +3334,11 @@ cmd_qtstart (char *packet)
 	  if (tpoint == tracepoints)
 	    /* First object in list, set the head pointer in the
 	       inferior.  */
-	    write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, tpptr);
+	    write_inferior_data_pointer (ipa_sym_addrs.addr_tracepoints, tpptr);
 	  else
-	    write_inferior_data_ptr (prev_tpptr + offsetof (struct tracepoint,
-							    next),
-				     tpptr);
+	    write_inferior_data_pointer (prev_tpptr
+					 + offsetof (struct tracepoint, next),
+					 tpptr);
 	}
 
       /* Any failure in the inner loop is sufficient cause to give
@@ -3660,7 +3672,8 @@ cmd_qtstatus (char *packet)
 
       result_name = stop_reason_rsp + strlen ("terror:");
       hexstr_len = strlen (result_name) * 2;
-      p = stop_reason_rsp = alloca (strlen ("terror:") + hexstr_len + 1);
+      p = stop_reason_rsp
+	= (char *) alloca (strlen ("terror:") + hexstr_len + 1);
       strcpy (p, "terror:");
       p += strlen (p);
       bin2hex ((gdb_byte *) result_name, p, strlen (result_name));
@@ -3669,7 +3682,7 @@ cmd_qtstatus (char *packet)
   /* If this was a forced stop, include any stop note that was supplied.  */
   if (strcmp (stop_reason_rsp, "tstop") == 0)
     {
-      stop_reason_rsp = alloca (strlen ("tstop:") + strlen (buf3) + 1);
+      stop_reason_rsp = (char *) alloca (strlen ("tstop:") + strlen (buf3) + 1);
       strcpy (stop_reason_rsp, "tstop:");
       strcat (stop_reason_rsp, buf3);
     }
@@ -3781,7 +3794,7 @@ response_source (char *packet,
   int len;
 
   len = strlen (src->str);
-  buf = alloca (len * 2 + 1);
+  buf = (char *) alloca (len * 2 + 1);
   bin2hex ((gdb_byte *) src->str, buf, len);
 
   sprintf (packet, "Z%x:%s:%s:%x:%x:%s",
@@ -3870,7 +3883,7 @@ response_tsv (char *packet, struct trace
   if (tsv->name)
     {
       namelen = strlen (tsv->name);
-      buf = alloca (namelen * 2 + 1);
+      buf = (char *) alloca (namelen * 2 + 1);
       bin2hex ((gdb_byte *) tsv->name, buf, namelen);
     }
 
@@ -3949,7 +3962,7 @@ cmd_qtstmat (char *packet)
 static int
 same_process_p (struct inferior_list_entry *entry, void *data)
 {
-  int *pid = data;
+  int *pid = (int *) data;
 
   return ptid_get_pid (entry->id) == *pid;
 }
@@ -4111,7 +4124,7 @@ cmd_qtnotes (char *own_buf)
 	  saved = packet;
 	  packet = strchr (packet, ';');
 	  nbytes = (packet - saved) / 2;
-	  user = xmalloc (nbytes + 1);
+	  user = (char *) xmalloc (nbytes + 1);
 	  nbytes = hex2bin (saved, (gdb_byte *) user, nbytes);
 	  user[nbytes] = '\0';
 	  ++packet; /* skip the semicolon */
@@ -4125,7 +4138,7 @@ cmd_qtnotes (char *own_buf)
 	  saved = packet;
 	  packet = strchr (packet, ';');
 	  nbytes = (packet - saved) / 2;
-	  notes = xmalloc (nbytes + 1);
+	  notes = (char *) xmalloc (nbytes + 1);
 	  nbytes = hex2bin (saved, (gdb_byte *) notes, nbytes);
 	  notes[nbytes] = '\0';
 	  ++packet; /* skip the semicolon */
@@ -4139,7 +4152,7 @@ cmd_qtnotes (char *own_buf)
 	  saved = packet;
 	  packet = strchr (packet, ';');
 	  nbytes = (packet - saved) / 2;
-	  stopnote = xmalloc (nbytes + 1);
+	  stopnote = (char *) xmalloc (nbytes + 1);
 	  nbytes = hex2bin (saved, (gdb_byte *) stopnote, nbytes);
 	  stopnote[nbytes] = '\0';
 	  ++packet; /* skip the semicolon */
@@ -4324,9 +4337,8 @@ static void
 add_while_stepping_state (struct thread_info *tinfo,
 			  int tp_number, CORE_ADDR tp_address)
 {
-  struct wstep_state *wstep;
+  struct wstep_state *wstep = XNEW (struct wstep_state);
 
-  wstep = xmalloc (sizeof (*wstep));
   wstep->next = tinfo->while_stepping;
 
   wstep->tp_number = tp_number;
@@ -4522,7 +4534,7 @@ handle_tracepoint_bkpts (struct thread_i
 	    trace_debug ("lib stopped due to full buffer.");
 	  if (ipa_stopping_tracepoint)
 	    trace_debug ("lib stopped due to tpoint");
-	  if (ipa_stopping_tracepoint)
+	  if (ipa_error_tracepoint)
 	    trace_debug ("lib stopped due to error");
 	}
 
@@ -4707,19 +4719,20 @@ collect_data_at_step (struct tracepoint_
 #endif
 
 #ifdef IN_PROCESS_AGENT
-/* The target description used by the IPA.  Given that the IPA library
-   is built for a specific architecture that is loaded into the
-   inferior, there only needs to be one such description per
-   build.  */
-const struct target_desc *ipa_tdesc;
+/* The target description index for IPA.  Passed from gdbserver, used
+   to select ipa_tdesc.  */
+EXTERN_C_PUSH
+IP_AGENT_EXPORT_VAR int ipa_tdesc_idx;
+EXTERN_C_POP
 #endif
 
 static struct regcache *
 get_context_regcache (struct tracepoint_hit_ctx *ctx)
 {
   struct regcache *regcache = NULL;
-
 #ifdef IN_PROCESS_AGENT
+  const struct target_desc *ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
+
   if (ctx->type == fast_tracepoint)
     {
       struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
@@ -4906,7 +4919,10 @@ condition_true_at_tracepoint (struct tra
      used.  */
 #ifdef IN_PROCESS_AGENT
   if (tpoint->compiled_cond)
-    err = ((condfn) (uintptr_t) (tpoint->compiled_cond)) (ctx, &value);
+    {
+      struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
+      err = ((condfn) (uintptr_t) (tpoint->compiled_cond)) (fctx->regs, &value);
+    }
   else
 #endif
     {
@@ -5066,7 +5082,7 @@ agent_tsv_read (struct eval_agent_expr_c
 static int
 match_blocktype (char blocktype, unsigned char *dataptr, void *data)
 {
-  char *wantedp = data;
+  char *wantedp = (char *) data;
 
   if (*wantedp == blocktype)
     return 1;
@@ -5412,7 +5428,7 @@ traceframe_read_sdata (int tfnum, ULONGE
 static int
 build_traceframe_info_xml (char blocktype, unsigned char *dataptr, void *data)
 {
-  struct buffer *buffer = data;
+  struct buffer *buffer = (struct buffer *) data;
 
   switch (blocktype)
     {
@@ -5789,17 +5805,19 @@ IP_AGENT_EXPORT_FUNC void
 gdb_collect (struct tracepoint *tpoint, unsigned char *regs)
 {
   struct fast_tracepoint_ctx ctx;
+  const struct target_desc *ipa_tdesc;
 
   /* Don't do anything until the trace run is completely set up.  */
   if (!tracing)
     return;
 
+  ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
   ctx.base.type = fast_tracepoint;
   ctx.regs = regs;
   ctx.regcache_initted = 0;
   /* Wrap the regblock in a register cache (in the stack, we don't
      want to malloc here).  */
-  ctx.regspace = alloca (ipa_tdesc->registers_size);
+  ctx.regspace = (unsigned char *) alloca (ipa_tdesc->registers_size);
   if (ctx.regspace == NULL)
     {
       trace_debug ("Trace buffer block allocation failed, skipping");
@@ -5852,6 +5870,25 @@ gdb_collect (struct tracepoint *tpoint, 
     }
 }
 
+/* These global variables points to the corresponding functions.  This is
+   necessary on powerpc64, where asking for function symbol address from gdb
+   results in returning the actual code pointer, instead of the descriptor
+   pointer.  */
+
+typedef void (*gdb_collect_ptr_type) (struct tracepoint *, unsigned char *);
+typedef ULONGEST (*get_raw_reg_ptr_type) (const unsigned char *, int);
+typedef LONGEST (*get_trace_state_variable_value_ptr_type) (int);
+typedef void (*set_trace_state_variable_value_ptr_type) (int, LONGEST);
+
+EXTERN_C_PUSH
+IP_AGENT_EXPORT_VAR gdb_collect_ptr_type gdb_collect_ptr = gdb_collect;
+IP_AGENT_EXPORT_VAR get_raw_reg_ptr_type get_raw_reg_ptr = get_raw_reg;
+IP_AGENT_EXPORT_VAR get_trace_state_variable_value_ptr_type
+  get_trace_state_variable_value_ptr = get_trace_state_variable_value;
+IP_AGENT_EXPORT_VAR set_trace_state_variable_value_ptr_type
+  set_trace_state_variable_value_ptr = set_trace_state_variable_value;
+EXTERN_C_POP
+
 #endif
 
 #ifndef IN_PROCESS_AGENT
@@ -5859,19 +5896,39 @@ gdb_collect (struct tracepoint *tpoint, 
 CORE_ADDR
 get_raw_reg_func_addr (void)
 {
-  return ipa_sym_addrs.addr_get_raw_reg;
+  CORE_ADDR res;
+  if (read_inferior_data_pointer (ipa_sym_addrs.addr_get_raw_reg_ptr, &res))
+    {
+      error ("error extracting get_raw_reg_ptr");
+      return 0;
+    }
+  return res;
 }
 
 CORE_ADDR
 get_get_tsv_func_addr (void)
 {
-  return ipa_sym_addrs.addr_get_trace_state_variable_value;
+  CORE_ADDR res;
+  if (read_inferior_data_pointer (
+	ipa_sym_addrs.addr_get_trace_state_variable_value_ptr, &res))
+    {
+      error ("error extracting get_trace_state_variable_value_ptr");
+      return 0;
+    }
+  return res;
 }
 
 CORE_ADDR
 get_set_tsv_func_addr (void)
 {
-  return ipa_sym_addrs.addr_set_trace_state_variable_value;
+  CORE_ADDR res;
+  if (read_inferior_data_pointer (
+	ipa_sym_addrs.addr_set_trace_state_variable_value_ptr, &res))
+    {
+      error ("error extracting set_trace_state_variable_value_ptr");
+      return 0;
+    }
+  return res;
 }
 
 static void
@@ -5921,16 +5978,6 @@ compile_tracepoint_condition (struct tra
   *jump_entry += 16;
 }
 
-/* We'll need to adjust these when we consider bi-arch setups, and big
-   endian machines.  */
-
-static int
-write_inferior_data_ptr (CORE_ADDR where, CORE_ADDR ptr)
-{
-  return write_inferior_memory (where,
-				(unsigned char *) &ptr, sizeof (void *));
-}
-
 /* The base pointer of the IPA's heap.  This is the only memory the
    IPA is allowed to use.  The IPA should _not_ call the inferior's
    `malloc' during operation.  That'd be slow, and, most importantly,
@@ -5976,8 +6023,8 @@ download_agent_expr (struct agent_expr *
   write_inferior_memory (expr_addr, (unsigned char *) expr, sizeof (*expr));
 
   expr_bytes = target_malloc (expr->length);
-  write_inferior_data_ptr (expr_addr + offsetof (struct agent_expr, bytes),
-			   expr_bytes);
+  write_inferior_data_pointer (expr_addr + offsetof (struct agent_expr, bytes),
+			       expr_bytes);
   write_inferior_memory (expr_bytes, expr->bytes, expr->length);
 
   return expr_addr;
@@ -6035,9 +6082,9 @@ download_tracepoint_1 (struct tracepoint
 			 sizeof (target_tracepoint));
 
   if (tpoint->cond)
-    write_inferior_data_ptr (tpptr + offsetof (struct tracepoint,
-					       cond),
-			     download_agent_expr (tpoint->cond));
+    write_inferior_data_pointer (tpptr
+				 + offsetof (struct tracepoint, cond),
+				 download_agent_expr (tpoint->cond));
 
   if (tpoint->numactions)
     {
@@ -6047,20 +6094,20 @@ download_tracepoint_1 (struct tracepoint
       /* The pointers array.  */
       actions_array
 	= target_malloc (sizeof (*tpoint->actions) * tpoint->numactions);
-      write_inferior_data_ptr (tpptr + offsetof (struct tracepoint,
-						 actions),
-			       actions_array);
+      write_inferior_data_pointer (tpptr + offsetof (struct tracepoint,
+						     actions),
+				   actions_array);
 
       /* Now for each pointer, download the action.  */
       for (i = 0; i < tpoint->numactions; i++)
 	{
 	  struct tracepoint_action *action = tpoint->actions[i];
-	  CORE_ADDR ipa_action = action->ops->download (action);
+	  CORE_ADDR ipa_action = tracepoint_action_download (action);
 
 	  if (ipa_action != 0)
-	    write_inferior_data_ptr
-	      (actions_array + i * sizeof (*tpoint->actions),
-	       ipa_action);
+	    write_inferior_data_pointer (actions_array
+					 + i * sizeof (*tpoint->actions),
+					 ipa_action);
 	}
     }
 }
@@ -6105,7 +6152,7 @@ tracepoint_send_agent (struct tracepoint
       struct tracepoint_action *action = tpoint->actions[i];
 
       p[0] = action->type;
-      p = action->ops->send (&p[1], action);
+      p = tracepoint_action_send (&p[1], action);
     }
 
   get_jump_space_head ();
@@ -6184,19 +6231,19 @@ download_tracepoint (struct tracepoint *
 	}
 
       /* tpoint->next = tp_prev->next */
-      write_inferior_data_ptr (tpoint->obj_addr_on_target
-			       + offsetof (struct tracepoint, next),
-			       tp_prev_target_next_addr);
+      write_inferior_data_pointer (tpoint->obj_addr_on_target
+				   + offsetof (struct tracepoint, next),
+				   tp_prev_target_next_addr);
       /* tp_prev->next = tpoint */
-      write_inferior_data_ptr (tp_prev->obj_addr_on_target
-			       + offsetof (struct tracepoint, next),
-			       tpoint->obj_addr_on_target);
+      write_inferior_data_pointer (tp_prev->obj_addr_on_target
+				   + offsetof (struct tracepoint, next),
+				   tpoint->obj_addr_on_target);
     }
   else
     /* First object in list, set the head pointer in the
        inferior.  */
-    write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints,
-			     tpoint->obj_addr_on_target);
+    write_inferior_data_pointer (ipa_sym_addrs.addr_tracepoints,
+				 tpoint->obj_addr_on_target);
 
 }
 
@@ -6207,7 +6254,7 @@ download_trace_state_variables (void)
   struct trace_state_variable *tsv;
 
   /* Start out empty.  */
-  write_inferior_data_ptr (ipa_sym_addrs.addr_trace_state_variables, 0);
+  write_inferior_data_pointer (ipa_sym_addrs.addr_trace_state_variables, 0);
 
   for (tsv = trace_state_variables; tsv != NULL; tsv = tsv->next)
     {
@@ -6228,15 +6275,15 @@ download_trace_state_variables (void)
 	  /* First object in list, set the head pointer in the
 	     inferior.  */
 
-	  write_inferior_data_ptr (ipa_sym_addrs.addr_trace_state_variables,
-				   ptr);
+	  write_inferior_data_pointer (ipa_sym_addrs.addr_trace_state_variables,
+				       ptr);
 	}
       else
 	{
-	  write_inferior_data_ptr (prev_ptr
-				   + offsetof (struct trace_state_variable,
-					       next),
-				   ptr);
+	  write_inferior_data_pointer (prev_ptr
+				       + offsetof (struct trace_state_variable,
+						   next),
+				       ptr);
 	}
 
       /* Write the whole object.  We'll fix up its pointers in a bit.
@@ -6252,10 +6299,10 @@ download_trace_state_variables (void)
 	  CORE_ADDR name_addr = target_malloc (size);
 	  write_inferior_memory (name_addr,
 				 (unsigned char *) tsv->name, size);
-	  write_inferior_data_ptr (ptr
-				   + offsetof (struct trace_state_variable,
-					       name),
-				   name_addr);
+	  write_inferior_data_pointer (ptr
+				       + offsetof (struct trace_state_variable,
+						   name),
+				       name_addr);
 	}
 
       gdb_assert (tsv->getter == NULL);
@@ -6264,9 +6311,9 @@ download_trace_state_variables (void)
   if (prev_ptr != 0)
     {
       /* Fixup the next pointer in the last item in the list.  */
-      write_inferior_data_ptr (prev_ptr
-			       + offsetof (struct trace_state_variable,
-					   next), 0);
+      write_inferior_data_pointer (prev_ptr
+				   + offsetof (struct trace_state_variable,
+					       next), 0);
     }
 }
 
@@ -6649,6 +6696,7 @@ gdb_probe (const struct marker *mdata, v
 {
   struct tracepoint *tpoint;
   struct static_tracepoint_ctx ctx;
+  const struct target_desc *ipa_tdesc;
 
   /* Don't do anything until the trace run is completely set up.  */
   if (!tracing)
@@ -6657,6 +6705,7 @@ gdb_probe (const struct marker *mdata, v
       return;
     }
 
+  ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
   ctx.base.type = static_tracepoint;
   ctx.regcache_initted = 0;
   ctx.regs = regs;
@@ -7324,6 +7373,34 @@ initialize_tracepoint_ftlib (void)
   gdb_agent_init ();
 }
 
+#ifndef HAVE_GETAUXVAL
+/* Retrieve the value of TYPE from the auxiliary vector.  If TYPE is not
+   found, 0 is returned.  This function is provided if glibc is too old.  */
+
+unsigned long
+getauxval (unsigned long type)
+{
+  unsigned long data[2];
+  FILE *f = fopen ("/proc/self/auxv", "r");
+  unsigned long value = 0;
+
+  if (f == NULL)
+    return 0;
+
+  while (fread (data, sizeof (data), 1, f) > 0)
+    {
+      if (data[0] == type)
+	{
+	  value = data[1];
+	  break;
+	}
+    }
+
+  fclose (f);
+  return value;
+}
+#endif
+
 #endif /* IN_PROCESS_AGENT */
 
 /* Return a timestamp, expressed as microseconds of the usual Unix
@@ -7333,12 +7410,10 @@ initialize_tracepoint_ftlib (void)
 static LONGEST
 get_timestamp (void)
 {
-   struct timeval tv;
+  using namespace std::chrono;
 
-   if (gettimeofday (&tv, 0) != 0)
-     return -1;
-   else
-     return (LONGEST) tv.tv_sec * 1000000 + tv.tv_usec;
+  steady_clock::time_point now = steady_clock::now ();
+  return duration_cast<microseconds> (now.time_since_epoch ()).count ();
 }
 
 void
@@ -7357,33 +7432,22 @@ initialize_tracepoint (void)
 
 #ifdef IN_PROCESS_AGENT
   {
-    uintptr_t addr;
     int pagesize;
+    size_t jump_pad_size;
 
     pagesize = sysconf (_SC_PAGE_SIZE);
     if (pagesize == -1)
       perror_with_name ("sysconf");
 
-    gdb_tp_heap_buffer = xmalloc (5 * 1024 * 1024);
-
 #define SCRATCH_BUFFER_NPAGES 20
 
-    /* Allocate scratch buffer aligned on a page boundary, at a low
-       address (close to the main executable's code).  */
-    for (addr = pagesize; addr != 0; addr += pagesize)
-      {
-	gdb_jump_pad_buffer = mmap ((void *) addr, pagesize * SCRATCH_BUFFER_NPAGES,
-				    PROT_READ | PROT_WRITE | PROT_EXEC,
-				    MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-				    -1, 0);
-	if (gdb_jump_pad_buffer != MAP_FAILED)
-	  break;
-      }
+    jump_pad_size = pagesize * SCRATCH_BUFFER_NPAGES;
 
-    if (addr == 0)
+    gdb_tp_heap_buffer = (char *) xmalloc (5 * 1024 * 1024);
+    gdb_jump_pad_buffer = (char *) alloc_jump_pad_buffer (jump_pad_size);
+    if (gdb_jump_pad_buffer == NULL)
       perror_with_name ("mmap");
-
-    gdb_jump_pad_buffer_end = gdb_jump_pad_buffer + pagesize * SCRATCH_BUFFER_NPAGES;
+    gdb_jump_pad_buffer_end = gdb_jump_pad_buffer + jump_pad_size;
   }
 
   gdb_trampoline_buffer = gdb_trampoline_buffer_end = 0;
@@ -7392,7 +7456,7 @@ initialize_tracepoint (void)
      buffer setup, but it can be mysterious, so create a channel to
      report back on what went wrong, using a fixed size since we may
      not be able to allocate space later when the problem occurs.  */
-  gdb_trampoline_buffer_error = xmalloc (IPA_BUFSIZ);
+  gdb_trampoline_buffer_error = (char *) xmalloc (IPA_BUFSIZ);
 
   strcpy (gdb_trampoline_buffer_error, "No errors reported");
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tracepoint.h ./gdb/gdbserver/tracepoint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/tracepoint.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/tracepoint.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Tracepoint code for remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -124,6 +124,7 @@ int handle_tracepoint_bkpts (struct thre
 
 #ifdef IN_PROCESS_AGENT
 void initialize_low_tracepoint (void);
+const struct target_desc *get_ipa_tdesc (int idx);
 void supply_fast_tracepoint_registers (struct regcache *regcache,
 				       const unsigned char *regs);
 void supply_static_tracepoint_registers (struct regcache *regcache,
@@ -131,9 +132,10 @@ void supply_static_tracepoint_registers 
 					 CORE_ADDR pc);
 void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end,
 				  char *errmsg);
-
-extern const struct target_desc *ipa_tdesc;
-
+void *alloc_jump_pad_buffer (size_t size);
+#ifndef HAVE_GETAUXVAL
+unsigned long getauxval (unsigned long type);
+#endif
 #else
 void stop_tracing (void);
 
@@ -165,8 +167,7 @@ int agent_mem_read_string (struct eval_a
 
 /* The prototype the get_raw_reg function in the IPA.  Each arch's
    bytecode compiler emits calls to this function.  */
-IP_AGENT_EXPORT_FUNC ULONGEST gdb_agent_get_raw_reg
-  (const unsigned char *raw_regs, int regnum);
+ULONGEST get_raw_reg (const unsigned char *raw_regs, int regnum);
 
 /* Returns the address of the get_raw_reg function in the IPA.  */
 CORE_ADDR get_raw_reg_func_addr (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/utils.c ./gdb/gdbserver/utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* General utility routines for the remote server for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -137,11 +137,3 @@ pfildes (gdb_fildes_t fd)
   return plongest (fd);
 #endif
 }
-
-/* See common/common-exceptions.h.  */
-
-void
-prepare_to_throw_exception (void)
-{
-  /* No client-specific actions required.  */
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/utils.h ./gdb/gdbserver/utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* General utility routines for the remote server for GDB.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-arm-low.c ./gdb/gdbserver/win32-arm-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-arm-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/win32-arm-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-i386-low.c ./gdb/gdbserver/win32-i386-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-i386-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/win32-i386-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,11 +29,11 @@
 #define FLAG_TRACE_BIT 0x100
 
 #ifdef __x86_64__
-/* Defined in auto-generated file reg-amd64.c.  */
+/* Defined in auto-generated build-time file gdb/gdbserver/amd64.c.  */
 void init_registers_amd64 (void);
 extern const struct target_desc *tdesc_amd64;
 #else
-/* Defined in auto-generated file reg-i386.c.  */
+/* Defined in auto-generated build-time file gdb/gdbserver/i386.c.  */
 void init_registers_i386 (void);
 extern const struct target_desc *tdesc_i386;
 #endif
@@ -45,7 +45,7 @@ update_debug_registers_callback (struct 
 				 void *pid_p)
 {
   struct thread_info *thr = (struct thread_info *) entry;
-  win32_thread_info *th = inferior_target_data (thr);
+  win32_thread_info *th = (win32_thread_info *) inferior_target_data (thr);
   int pid = *(int *) pid_p;
 
   /* Only update the threads of this process.  */
@@ -89,7 +89,8 @@ x86_dr_low_set_control (unsigned long co
 static DWORD64
 win32_get_current_dr (int dr)
 {
-  win32_thread_info *th = inferior_target_data (current_thread);
+  win32_thread_info *th
+    = (win32_thread_info *) inferior_target_data (current_thread);
 
   win32_require_context (th);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-low.c ./gdb/gdbserver/win32-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/win32-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level interface to Windows debugging, for gdbserver.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Leo Zayas.  Based on "win32-nat.c" from GDB.
 
@@ -198,7 +198,7 @@ thread_rec (ptid_t ptid, int get_context
   if (thread == NULL)
     return NULL;
 
-  th = inferior_target_data (thread);
+  th = (win32_thread_info *) inferior_target_data (thread);
   if (get_context)
     win32_require_context (th);
   return th;
@@ -214,7 +214,7 @@ child_add_thread (DWORD pid, DWORD tid, 
   if ((th = thread_rec (ptid, FALSE)))
     return th;
 
-  th = xcalloc (1, sizeof (*th));
+  th = XCNEW (win32_thread_info);
   th->tid = tid;
   th->h = h;
   th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb;
@@ -229,11 +229,12 @@ child_add_thread (DWORD pid, DWORD tid, 
 
 /* Delete a thread from the list of threads.  */
 static void
-delete_thread_info (struct inferior_list_entry *thread)
+delete_thread_info (struct inferior_list_entry *entry)
 {
-  win32_thread_info *th = inferior_target_data ((struct thread_info *) thread);
+  struct thread_info *thread = (struct thread_info *) entry;
+  win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
 
-  remove_thread ((struct thread_info *) thread);
+  remove_thread (thread);
   CloseHandle (th->h);
   free (th);
 }
@@ -432,7 +433,7 @@ continue_one_thread (struct inferior_lis
 {
   struct thread_info *thread = (struct thread_info *) this_thread;
   int thread_id = * (int *) id_ptr;
-  win32_thread_info *th = inferior_target_data (thread);
+  win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
 
   if (thread_id == -1 || thread_id == th->tid)
     {
@@ -523,7 +524,7 @@ strwinerror (DWORD error)
 			       NULL,
 			       error,
 			       0, /* Default language */
-			       (LPVOID)&msgbuf,
+			       (LPTSTR) &msgbuf,
 			       0,
 			       NULL);
   if (chars != 0)
@@ -641,8 +642,8 @@ win32_create_inferior (char *program, ch
   if (path_ptr)
     {
       int size = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, NULL, 0);
-      orig_path = alloca (strlen (path_ptr) + 1);
-      new_path = alloca (size);
+      orig_path = (char *) alloca (strlen (path_ptr) + 1);
+      new_path = (char *) alloca (size);
       strcpy (orig_path, path_ptr);
       cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, new_path, size);
       setenv ("PATH", new_path, 1);
@@ -654,7 +655,7 @@ win32_create_inferior (char *program, ch
   argslen = 1;
   for (argc = 1; program_args[argc]; argc++)
     argslen += strlen (program_args[argc]) + 1;
-  args = alloca (argslen);
+  args = (char *) alloca (argslen);
   args[0] = '\0';
   for (argc = 1; program_args[argc]; argc++)
     {
@@ -673,7 +674,7 @@ win32_create_inferior (char *program, ch
   err = GetLastError ();
   if (!ret && err == ERROR_FILE_NOT_FOUND)
     {
-      char *exename = alloca (strlen (program) + 5);
+      char *exename = (char *) alloca (strlen (program) + 5);
       strcat (strcpy (exename, program), ".exe");
       ret = create_process (exename, args, flags, &pi);
       err = GetLastError ();
@@ -746,7 +747,7 @@ win32_attach (unsigned long pid)
 
 /* Handle OUTPUT_DEBUG_STRING_EVENT from child process.  */
 static void
-handle_output_debug_string (struct target_waitstatus *ourstatus)
+handle_output_debug_string (void)
 {
 #define READ_BUFFER_LEN 1024
   CORE_ADDR addr;
@@ -818,10 +819,7 @@ win32_kill (int pid)
       if (current_event.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT)
 	break;
       else if (current_event.dwDebugEventCode == OUTPUT_DEBUG_STRING_EVENT)
-	{
-	  struct target_waitstatus our_status = { 0 };
-	  handle_output_debug_string (&our_status);
-	}
+	handle_output_debug_string ();
     }
 
   win32_clear_inferiors ();
@@ -928,12 +926,12 @@ win32_resume (struct thread_resume *resu
 
   if (!ptid_equal (resume_info[0].thread, minus_one_ptid))
     {
-      sig = resume_info[0].sig;
+      sig = gdb_signal_from_host (resume_info[0].sig);
       step = resume_info[0].kind == resume_step;
     }
   else
     {
-      sig = 0;
+      sig = GDB_SIGNAL_0;
       step = 0;
     }
 
@@ -941,12 +939,14 @@ win32_resume (struct thread_resume *resu
     {
       if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
 	{
-	  OUTMSG (("Cannot continue with signal %d here.\n", sig));
+	  OUTMSG (("Cannot continue with signal %s here.\n",
+		   gdb_signal_to_string (sig)));
 	}
       else if (sig == last_sig)
 	continue_status = DBG_EXCEPTION_NOT_HANDLED;
       else
-	OUTMSG (("Can only continue with recieved signal %d.\n", last_sig));
+	OUTMSG (("Can only continue with received signal %s.\n",
+		 gdb_signal_to_string (last_sig)));
     }
 
   last_sig = GDB_SIGNAL_0;
@@ -1084,7 +1084,7 @@ get_image_name (HANDLE h, void *address,
     ReadProcessMemory (h, address_ptr, buf, len, &done);
   else
     {
-      WCHAR *unicode_address = (WCHAR *) alloca (len * sizeof (WCHAR));
+      WCHAR *unicode_address = XALLOCAVEC (WCHAR, len);
       ReadProcessMemory (h, address_ptr, unicode_address, len * sizeof (WCHAR),
 			 &done);
 
@@ -1344,7 +1344,7 @@ static void
 suspend_one_thread (struct inferior_list_entry *entry)
 {
   struct thread_info *thread = (struct thread_info *) entry;
-  win32_thread_info *th = inferior_target_data (thread);
+  win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
 
   if (!th->suspended)
     {
@@ -1571,7 +1571,7 @@ get_child_debug_event (struct target_wai
 		"for pid=%u tid=%x\n",
 		(unsigned) current_event.dwProcessId,
 		(unsigned) current_event.dwThreadId));
-      handle_output_debug_string (ourstatus);
+      handle_output_debug_string ();
       break;
 
     default:
@@ -1783,8 +1783,18 @@ win32_get_tib_address (ptid_t ptid, CORE
   return 1;
 }
 
+/* Implementation of the target_ops method "sw_breakpoint_from_kind".  */
+
+static const gdb_byte *
+win32_sw_breakpoint_from_kind (int kind, int *size)
+{
+  *size = the_low_target.breakpoint_len;
+  return the_low_target.breakpoint;
+}
+
 static struct target_ops win32_target_ops = {
   win32_create_inferior,
+  NULL,  /* post_create_inferior */
   win32_attach,
   win32_kill,
   win32_detach,
@@ -1809,10 +1819,7 @@ static struct target_ops win32_target_op
   NULL, /* supports_stopped_by_sw_breakpoint */
   NULL, /* stopped_by_hw_breakpoint */
   NULL, /* supports_stopped_by_hw_breakpoint */
-  /* Although win32-i386 has hardware single step, still disable this
-     feature for win32, because it is implemented in linux-low.c instead
-     of in generic code.  */
-  NULL, /* supports_conditional_breakpoints */
+  target_can_do_hardware_single_step,
   win32_stopped_by_watchpoint,
   win32_stopped_data_address,
   NULL, /* read_offsets */
@@ -1831,6 +1838,7 @@ static struct target_ops win32_target_op
   NULL, /* supports_multi_process */
   NULL, /* supports_fork_events */
   NULL, /* supports_vfork_events */
+  NULL, /* supports_exec_events */
   NULL, /* handle_new_gdb_connection */
   NULL, /* handle_monitor_command */
   NULL, /* core_of_thread */
@@ -1840,7 +1848,28 @@ static struct target_ops win32_target_op
   NULL, /* read_pc */
   NULL, /* write_pc */
   NULL, /* thread_stopped */
-  win32_get_tib_address
+  win32_get_tib_address,
+  NULL, /* pause_all */
+  NULL, /* unpause_all */
+  NULL, /* stabilize_threads */
+  NULL, /* install_fast_tracepoint_jump_pad */
+  NULL, /* emit_ops */
+  NULL, /* supports_disable_randomization */
+  NULL, /* get_min_fast_tracepoint_insn_len */
+  NULL, /* qxfer_libraries_svr4 */
+  NULL, /* support_agent */
+  NULL, /* support_btrace */
+  NULL, /* enable_btrace */
+  NULL, /* disable_btrace */
+  NULL, /* read_btrace */
+  NULL, /* read_btrace_conf */
+  NULL, /* supports_range_stepping */
+  NULL, /* pid_to_exec_file */
+  NULL, /* multifs_open */
+  NULL, /* multifs_unlink */
+  NULL, /* multifs_readlink */
+  NULL, /* breakpoint_kind_from_pc */
+  win32_sw_breakpoint_from_kind,
 };
 
 /* Initialize the Win32 backend.  */
@@ -1848,8 +1877,5 @@ void
 initialize_low (void)
 {
   set_target_ops (&win32_target_ops);
-  if (the_low_target.breakpoint != NULL)
-    set_breakpoint_data (the_low_target.breakpoint,
-			 the_low_target.breakpoint_len);
   the_low_target.arch_setup ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-low.h ./gdb/gdbserver/win32-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/win32-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/win32-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Internal interfaces for the Win32 specific target code for gdbserver.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/wincecompat.c ./gdb/gdbserver/wincecompat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/wincecompat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/wincecompat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Compatibility routines for Windows CE.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/wincecompat.h ./gdb/gdbserver/wincecompat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/wincecompat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/wincecompat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Compatibility routines for Windows CE.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/x86-low.c ./gdb/gdbserver/x86-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/x86-low.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/x86-low.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level support for x86 (i386 and x86-64).
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/x86-low.h ./gdb/gdbserver/x86-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/x86-low.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/x86-low.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level support for x86 (i386 and x86-64).
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/xtensa-xtregs.c ./gdb/gdbserver/xtensa-xtregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbserver/xtensa-xtregs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbserver/xtensa-xtregs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Table mapping between kernel xtregset and GDB register cache.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-stabs.h ./gdb/gdb-stabs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb-stabs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb-stabs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Definitions for symbol-reading containing "stabs", for GDB.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by John Gilmore.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbthread.h ./gdb/gdbthread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbthread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbthread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Multi-process/thread control defs for GDB, the GNU debugger.
-   Copyright (C) 1987-2015 Free Software Foundation, Inc.
+   Copyright (C) 1987-2017 Free Software Foundation, Inc.
    Contributed by Lynx Real-Time Systems, Inc.  Los Gatos, CA.
    
 
@@ -29,6 +29,8 @@ struct symtab;
 #include "inferior.h"
 #include "btrace.h"
 #include "common/vec.h"
+#include "target/waitstatus.h"
+#include "cli/cli-utils.h"
 
 /* Frontend view of the thread state.  Possible extensions: stepping,
    finishing, until(ling),...  */
@@ -134,11 +136,6 @@ struct thread_control_state
      at.  */
   bpstat stop_bpstat;
 
-  /* The interpreter that issued the execution command.  NULL if the
-     thread was resumed as a result of a command applied to some other
-     thread (e.g., "next" with scheduler-locking off).  */
-  struct interp *command_interp;
-
   /* Whether the command that started the thread was a stepping
      command.  This is used to decide whether "set scheduler-locking
      step" behaves like "on" or "off".  */
@@ -157,6 +154,23 @@ struct thread_suspend_state
      should be suppressed, the core will take care of clearing this
      before the target is resumed.  */
   enum gdb_signal stop_signal;
+
+  /* The reason the thread last stopped, if we need to track it
+     (breakpoint, watchpoint, etc.)  */
+  enum target_stop_reason stop_reason;
+
+  /* The waitstatus for this thread's last event.  */
+  struct target_waitstatus waitstatus;
+  /* If true WAITSTATUS hasn't been handled yet.  */
+  int waitstatus_pending_p;
+
+  /* Record the pc of the thread the last time it stopped.  (This is
+     not the current thread's PC as that may have changed since the
+     last stop, e.g., "return" command, or "p $pc = 0xf000").  This is
+     used in coordination with stop_reason and waitstatus_pending_p:
+     if the thread's PC is changed since it last stopped, a pending
+     breakpoint waitstatus is discarded.  */
+  CORE_ADDR stop_pc;
 };
 
 typedef struct value *value_ptr;
@@ -169,7 +183,46 @@ struct thread_info
   ptid_t ptid;			/* "Actual process id";
 				    In fact, this may be overloaded with 
 				    kernel thread id, etc.  */
-  int num;			/* Convenient handle (GDB thread id) */
+
+  /* Each thread has two GDB IDs.
+
+     a) The thread ID (Id).  This consists of the pair of:
+
+        - the number of the thread's inferior and,
+
+        - the thread's thread number in its inferior, aka, the
+          per-inferior thread number.  This number is unique in the
+          inferior but not unique between inferiors.
+
+     b) The global ID (GId).  This is a a single integer unique
+        between all inferiors.
+
+     E.g.:
+
+      (gdb) info threads -gid
+	Id    GId   Target Id   Frame
+      * 1.1   1     Thread A    0x16a09237 in foo () at foo.c:10
+	1.2   3     Thread B    0x15ebc6ed in bar () at foo.c:20
+	1.3   5     Thread C    0x15ebc6ed in bar () at foo.c:20
+	2.1   2     Thread A    0x16a09237 in foo () at foo.c:10
+	2.2   4     Thread B    0x15ebc6ed in bar () at foo.c:20
+	2.3   6     Thread C    0x15ebc6ed in bar () at foo.c:20
+
+     Above, both inferiors 1 and 2 have threads numbered 1-3, but each
+     thread has its own unique global ID.  */
+
+  /* The thread's global GDB thread number.  This is exposed to MI,
+     Python/Scheme, visible with "info threads -gid", and is also what
+     the $_gthread convenience variable is bound to.  */
+  int global_num;
+
+  /* The per-inferior thread number.  This is unique in the inferior
+     the thread belongs to, but not unique between inferiors.  This is
+     what the $_thread convenience variable is bound to.  */
+  int per_inf_num;
+
+  /* The inferior this thread belongs to.  */
+  struct inferior *inf;
 
   /* The name of the thread, as specified by the user.  This is NULL
      if the thread does not have a user-given name.  */
@@ -181,6 +234,15 @@ struct thread_info
      thread is off and running.  */
   int executing;
 
+  /* Non-zero if this thread is resumed from infrun's perspective.
+     Note that a thread can be marked both as not-executing and
+     resumed at the same time.  This happens if we try to resume a
+     thread that has a wait status pending.  We shouldn't let the
+     thread really run until that wait status has been processed, but
+     we should not process that wait status if we didn't try to let
+     the thread run.  */
+  int resumed;
+
   /* Frontend view of the thread state.  Note that the THREAD_RUNNING/
      THREAD_STOPPED states are different from EXECUTING.  When the
      thread is stopped internally while handling an internal event,
@@ -206,8 +268,10 @@ struct thread_info
 
   /* Internal stepping state.  */
 
-  /* Record the pc of the thread the last time it stopped.  This is
-     maintained by proceed and keep_going, and used in
+  /* Record the pc of the thread the last time it was resumed.  (It
+     can't be done on stop as the PC may change since the last stop,
+     e.g., "return" command, or "p $pc = 0xf000").  This is maintained
+     by proceed and keep_going, and among other things, it's used in
      adjust_pc_after_break to distinguish a hardware single-step
      SIGTRAP from a breakpoint SIGTRAP.  */
   CORE_ADDR prev_pc;
@@ -236,21 +300,10 @@ struct thread_info
      when GDB gets back SIGTRAP from step_resume_breakpoint.  */
   int step_after_step_resume_breakpoint;
 
-  /* Per-thread command support.  */
-
-  /* Pointer to what is left to do for an execution command after the
-     target stops.  Used only in asynchronous mode, by targets that
-     support async execution.  Several execution commands use it.  */
-  struct continuation *continuations;
-
-  /* Similar to the above, but used when a single execution command
-     requires several resume/stop iterations.  Used by the step
-     command.  */
-  struct continuation *intermediate_continuations;
-
-  /* If stepping, nonzero means step count is > 1 so don't print frame
-     next time inferior stops if it stops due to stepping.  */
-  int step_multi;
+  /* Pointer to the state machine manager object that handles what is
+     left to do for the thread's execution command after the target
+     stops.  Several execution commands use it.  */
+  struct thread_fsm *thread_fsm;
 
   /* This is used to remember when a fork or vfork event was caught by
      a catchpoint, and thus the event is to be followed at the next
@@ -283,6 +336,12 @@ struct thread_info
   /* Values that are stored as temporaries on stack while evaluating
      expressions.  */
   value_vec *stack_temporaries;
+
+  /* Step-over chain.  A thread is in the step-over queue if these are
+     non-NULL.  If only a single thread is in the chain, then these
+     fields point to self.  */
+  struct thread_info *step_over_prev;
+  struct thread_info *step_over_next;
 };
 
 /* Create an empty thread list, or empty the existing one.  */
@@ -329,27 +388,40 @@ extern int thread_has_single_step_breakp
 						   struct address_space *aspace,
 						   CORE_ADDR addr);
 
-/* Translate the integer thread id (GDB's homegrown id, not the system's)
-   into a "pid" (which may be overloaded with extra thread information).  */
-extern ptid_t thread_id_to_pid (int);
-
-/* Translate a 'pid' (which may be overloaded with extra thread information) 
-   into the integer thread id (GDB's homegrown id, not the system's).  */
-extern int pid_to_thread_id (ptid_t ptid);
+/* Translate the global integer thread id (GDB's homegrown id, not the
+   system's) into a "pid" (which may be overloaded with extra thread
+   information).  */
+extern ptid_t global_thread_id_to_ptid (int num);
+
+/* Translate a 'pid' (which may be overloaded with extra thread
+   information) into the global integer thread id (GDB's homegrown id,
+   not the system's).  */
+extern int ptid_to_global_thread_id (ptid_t ptid);
+
+/* Returns whether to show inferior-qualified thread IDs, or plain
+   thread numbers.  Inferior-qualified IDs are shown whenever we have
+   multiple inferiors, or the only inferior left has number > 1.  */
+extern int show_inferior_qualified_tids (void);
+
+/* Return a string version of THR's thread ID.  If there are multiple
+   inferiors, then this prints the inferior-qualifier form, otherwise
+   it only prints the thread number.  The result is stored in a
+   circular static buffer, NUMCELLS deep.  */
+const char *print_thread_id (struct thread_info *thr);
 
 /* Boolean test for an already-known pid (which may be overloaded with
    extra thread information).  */
 extern int in_thread_list (ptid_t ptid);
 
-/* Boolean test for an already-known thread id (GDB's homegrown id, 
-   not the system's).  */
-extern int valid_thread_id (int thread);
+/* Boolean test for an already-known global thread id (GDB's homegrown
+   global id, not the system's).  */
+extern int valid_global_thread_id (int global_id);
 
 /* Search function to lookup a thread by 'pid'.  */
 extern struct thread_info *find_thread_ptid (ptid_t ptid);
 
-/* Find thread by GDB user-visible thread number.  */
-struct thread_info *find_thread_id (int num);
+/* Find thread by GDB global thread ID.  */
+struct thread_info *find_thread_global_id (int global_id);
 
 /* Finds the first thread of the inferior given by PID.  If PID is -1,
    returns the first thread in the list.  */
@@ -371,6 +443,16 @@ void thread_change_ptid (ptid_t old_ptid
 typedef int (*thread_callback_func) (struct thread_info *, void *);
 extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
 
+/* Traverse all threads.  */
+#define ALL_THREADS(T)				\
+  for (T = thread_list; T; T = T->next)		\
+
+/* Traverse over all threads, sorted by inferior.  */
+#define ALL_THREADS_BY_INFERIOR(inf, tp) \
+  ALL_INFERIORS (inf) \
+    ALL_THREADS (tp) \
+      if (inf == tp->inf)
+
 /* Traverse all threads, except those that have THREAD_EXITED
    state.  */
 
@@ -387,9 +469,19 @@ extern struct thread_info *iterate_over_
 
 extern int thread_count (void);
 
-/* Switch from one thread to another.  */
+/* Switch from one thread to another.  Also sets the STOP_PC
+   global.  */
 extern void switch_to_thread (ptid_t ptid);
 
+/* Switch from one thread to another.  Does not read registers and
+   sets STOP_PC to -1.  */
+extern void switch_to_thread_no_regs (struct thread_info *thread);
+
+/* Marks or clears thread(s) PTID as resumed.  If PTID is
+   MINUS_ONE_PTID, applies to all threads.  If ptid_is_pid(PTID) is
+   true, applies to all threads of the process pointed at by PTID.  */
+extern void set_resumed (ptid_t ptid, int resumed);
+
 /* Marks thread PTID is running, or stopped. 
    If PTID is minus_one_ptid, marks all threads.  */
 extern void set_running (ptid_t ptid, int running);
@@ -466,7 +558,14 @@ extern void thread_command (char *tidstr
    `set print thread-events'.  */
 extern int print_thread_events;
 
-extern void print_thread_info (struct ui_out *uiout, char *threads,
+/* Prints the list of threads and their details on UIOUT.  If
+   REQUESTED_THREADS, a list of GDB ids/ranges, is not NULL, only
+   print threads whose ID is included in the list.  If PID is not -1,
+   only print threads from the process PID.  Otherwise, threads from
+   all attached PIDs are printed.  If both REQUESTED_THREADS is not
+   NULL and PID is not -1, then the thread is printed if it belongs to
+   the specified process.  Otherwise, an error is raised.  */
+extern void print_thread_info (struct ui_out *uiout, char *requested_threads,
 			       int pid);
 
 extern struct cleanup *make_cleanup_restore_current_thread (void);
@@ -500,6 +599,45 @@ extern struct value *get_last_thread_sta
 
 extern int value_in_thread_stack_temporaries (struct value *, ptid_t);
 
+/* Add TP to the end of its inferior's pending step-over chain.  */
+
+extern void thread_step_over_chain_enqueue (struct thread_info *tp);
+
+/* Remove TP from its inferior's pending step-over chain.  */
+
+extern void thread_step_over_chain_remove (struct thread_info *tp);
+
+/* Return the next thread in the step-over chain starting at TP.  NULL
+   if TP is the last entry in the chain.  */
+
+extern struct thread_info *thread_step_over_chain_next (struct thread_info *tp);
+
+/* Return true if TP is in the step-over chain.  */
+
+extern int thread_is_in_step_over_chain (struct thread_info *tp);
+
+/* Cancel any ongoing execution command.  */
+
+extern void thread_cancel_execution_command (struct thread_info *thr);
+
+/* Check whether it makes sense to access a register of the current
+   thread at this point.  If not, throw an error (e.g., the thread is
+   executing).  */
+extern void validate_registers_access (void);
+
+/* Check whether it makes sense to access a register of PTID at this point.
+   Returns true if registers may be accessed; false otherwise.  */
+extern bool can_access_registers_ptid (ptid_t ptid);
+
+/* Returns whether to show which thread hit the breakpoint, received a
+   signal, etc. and ended up causing a user-visible stop.  This is
+   true iff we ever detected multiple threads.  */
+extern int show_thread_that_caused_stop (void);
+
+/* Print the message for a thread or/and frame selected.  */
+extern void print_selected_thread_frame (struct ui_out *uiout,
+					 user_selected_what selection);
+
 extern struct thread_info *thread_list;
 
 #endif /* GDBTHREAD_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbtypes.c ./gdb/gdbtypes.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbtypes.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbtypes.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support routines for manipulating internal types for GDB.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -187,7 +187,7 @@ alloc_type (struct objfile *objfile)
 
 /* Allocate a new GDBARCH-associated type structure and fill it
    with some defaults.  Space for the type structure is allocated
-   on the heap.  */
+   on the obstack associated with GDBARCH.  */
 
 struct type *
 alloc_type_arch (struct gdbarch *gdbarch)
@@ -198,8 +198,8 @@ alloc_type_arch (struct gdbarch *gdbarch
 
   /* Alloc the structure and start off with all fields zeroed.  */
 
-  type = XCNEW (struct type);
-  TYPE_MAIN_TYPE (type) = XCNEW (struct main_type);
+  type = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct type);
+  TYPE_MAIN_TYPE (type) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct main_type);
 
   TYPE_OBJFILE_OWNED (type) = 0;
   TYPE_OWNER (type).gdbarch = gdbarch;
@@ -252,6 +252,17 @@ get_target_type (struct type *type)
   return type;
 }
 
+/* See gdbtypes.h.  */
+
+unsigned int
+type_length_units (struct type *type)
+{
+  struct gdbarch *arch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+
+  return TYPE_LENGTH (type) / unit_size;
+}
+
 /* Alloc a new type instance structure, fill it with some defaults,
    and point it at OLDTYPE.  Allocate the new type instance from the
    same place as OLDTYPE.  */
@@ -514,7 +525,8 @@ lookup_function_type_with_arguments (str
     }
 
   TYPE_NFIELDS (fn) = nparams;
-  TYPE_FIELDS (fn) = TYPE_ZALLOC (fn, nparams * sizeof (struct field));
+  TYPE_FIELDS (fn)
+    = (struct field *) TYPE_ZALLOC (fn, nparams * sizeof (struct field));
   for (i = 0; i < nparams; ++i)
     TYPE_FIELD_TYPE (fn, i) = param_types[i];
 
@@ -744,7 +756,7 @@ replace_type (struct type *ntype, struct
      the assignment of one type's main type structure to the other
      will produce a type with references to objects (names; field
      lists; etc.) allocated on an objfile other than its own.  */
-  gdb_assert (TYPE_OBJFILE (ntype) == TYPE_OBJFILE (ntype));
+  gdb_assert (TYPE_OBJFILE (ntype) == TYPE_OBJFILE (type));
 
   *TYPE_MAIN_TYPE (ntype) = *TYPE_MAIN_TYPE (type);
 
@@ -898,7 +910,7 @@ has_static_range (const struct range_bou
 int
 get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_RANGE:
@@ -1068,13 +1080,15 @@ create_array_type_with_stride (struct ty
 
   TYPE_CODE (result_type) = TYPE_CODE_ARRAY;
   TYPE_TARGET_TYPE (result_type) = element_type;
-  if (has_static_range (TYPE_RANGE_DATA (range_type)))
+  if (has_static_range (TYPE_RANGE_DATA (range_type))
+      && (!type_not_associated (result_type)
+	  && !type_not_allocated (result_type)))
     {
       LONGEST low_bound, high_bound;
 
       if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
 	low_bound = high_bound = 0;
-      CHECK_TYPEDEF (element_type);
+      element_type = check_typedef (element_type);
       /* Be careful when setting the array length.  Ada arrays can be
 	 empty arrays with the high_bound being smaller than the low_bound.
 	 In such cases, the array length should be zero.  */
@@ -1105,7 +1119,7 @@ create_array_type_with_stride (struct ty
   if (bit_stride > 0)
     TYPE_FIELD_BITSIZE (result_type, 0) = bit_stride;
 
-  /* TYPE_FLAG_TARGET_STUB will take care of zero length arrays.  */
+  /* TYPE_TARGET_STUB will take care of zero length arrays.  */
   if (TYPE_LENGTH (result_type) == 0)
     TYPE_TARGET_STUB (result_type) = 1;
 
@@ -1180,7 +1194,8 @@ create_set_type (struct type *result_typ
 
   TYPE_CODE (result_type) = TYPE_CODE_SET;
   TYPE_NFIELDS (result_type) = 1;
-  TYPE_FIELDS (result_type) = TYPE_ZALLOC (result_type, sizeof (struct field));
+  TYPE_FIELDS (result_type)
+    = (struct field *) TYPE_ZALLOC (result_type, sizeof (struct field));
 
   if (!TYPE_STUB (domain_type))
     {
@@ -1383,7 +1398,7 @@ type_name_no_tag_or_error (struct type *
   const char *name;
   struct objfile *objfile;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   name = type_name_no_tag (type);
   if (name != NULL)
@@ -1406,10 +1421,9 @@ lookup_typename (const struct language_d
 		 const struct block *block, int noerr)
 {
   struct symbol *sym;
-  struct type *type;
 
   sym = lookup_symbol_in_language (name, block, VAR_DOMAIN,
-				   language->la_language, NULL);
+				   language->la_language, NULL).symbol;
   if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
     return SYMBOL_TYPE (sym);
 
@@ -1422,7 +1436,7 @@ struct type *
 lookup_unsigned_typename (const struct language_defn *language,
 			  struct gdbarch *gdbarch, const char *name)
 {
-  char *uns = alloca (strlen (name) + 10);
+  char *uns = (char *) alloca (strlen (name) + 10);
 
   strcpy (uns, "unsigned ");
   strcpy (uns + 9, name);
@@ -1434,7 +1448,7 @@ lookup_signed_typename (const struct lan
 			struct gdbarch *gdbarch, const char *name)
 {
   struct type *t;
-  char *uns = alloca (strlen (name) + 8);
+  char *uns = (char *) alloca (strlen (name) + 8);
 
   strcpy (uns, "signed ");
   strcpy (uns + 7, name);
@@ -1453,7 +1467,7 @@ lookup_struct (const char *name, const s
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0).symbol;
 
   if (sym == NULL)
     {
@@ -1476,7 +1490,7 @@ lookup_union (const char *name, const st
   struct symbol *sym;
   struct type *t;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0).symbol;
 
   if (sym == NULL)
     error (_("No union type named %s."), name);
@@ -1499,7 +1513,7 @@ lookup_enum (const char *name, const str
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0).symbol;
   if (sym == NULL)
     {
       error (_("No enum type named %s."), name);
@@ -1528,7 +1542,7 @@ lookup_template_type (char *name, struct
   strcat (nam, TYPE_NAME (type));
   strcat (nam, " >");	/* FIXME, extra space still introduced in gcc?  */
 
-  sym = lookup_symbol (nam, block, VAR_DOMAIN, 0);
+  sym = lookup_symbol (nam, block, VAR_DOMAIN, 0).symbol;
 
   if (sym == NULL)
     {
@@ -1558,11 +1572,10 @@ struct type *
 lookup_struct_elt_type (struct type *type, const char *name, int noerr)
 {
   int i;
-  char *type_name;
 
   for (;;)
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
       if (TYPE_CODE (type) != TYPE_CODE_PTR
 	  && TYPE_CODE (type) != TYPE_CODE_REF)
 	break;
@@ -1572,9 +1585,9 @@ lookup_struct_elt_type (struct type *typ
   if (TYPE_CODE (type) != TYPE_CODE_STRUCT 
       && TYPE_CODE (type) != TYPE_CODE_UNION)
     {
-      type_name = type_to_string (type);
-      make_cleanup (xfree, type_name);
-      error (_("Type %s is not a structure or union type."), type_name);
+      std::string type_name = type_to_string (type);
+      error (_("Type %s is not a structure or union type."),
+	     type_name.c_str ());
     }
 
 #if 0
@@ -1626,9 +1639,8 @@ lookup_struct_elt_type (struct type *typ
       return NULL;
     }
 
-  type_name = type_to_string (type);
-  make_cleanup (xfree, type_name);
-  error (_("Type %s has no component named %s."), type_name, name);
+  std::string type_name = type_to_string (type);
+  error (_("Type %s has no component named %s."), type_name.c_str (), name);
 }
 
 /* Store in *MAX the largest number representable by unsigned integer type
@@ -1639,7 +1651,7 @@ get_unsigned_type_max (struct type *type
 {
   unsigned int n;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_INT && TYPE_UNSIGNED (type));
   gdb_assert (TYPE_LENGTH (type) <= sizeof (ULONGEST));
 
@@ -1656,7 +1668,7 @@ get_signed_type_minmax (struct type *typ
 {
   unsigned int n;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_INT && !TYPE_UNSIGNED (type));
   gdb_assert (TYPE_LENGTH (type) <= sizeof (LONGEST));
 
@@ -1675,7 +1687,7 @@ get_signed_type_minmax (struct type *typ
 int
 internal_type_vptr_fieldno (struct type *type)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
 	      || TYPE_CODE (type) == TYPE_CODE_UNION);
   if (!HAVE_CPLUS_STRUCT (type))
@@ -1688,7 +1700,7 @@ internal_type_vptr_fieldno (struct type 
 void
 set_type_vptr_fieldno (struct type *type, int fieldno)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
 	      || TYPE_CODE (type) == TYPE_CODE_UNION);
   if (!HAVE_CPLUS_STRUCT (type))
@@ -1702,7 +1714,7 @@ set_type_vptr_fieldno (struct type *type
 struct type *
 internal_type_vptr_basetype (struct type *type)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
 	      || TYPE_CODE (type) == TYPE_CODE_UNION);
   gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF);
@@ -1714,7 +1726,7 @@ internal_type_vptr_basetype (struct type
 void
 set_type_vptr_basetype (struct type *type, struct type *basetype)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
 	      || TYPE_CODE (type) == TYPE_CODE_UNION);
   if (!HAVE_CPLUS_STRUCT (type))
@@ -1737,7 +1749,7 @@ set_type_vptr_basetype (struct type *typ
 int
 get_vptr_fieldno (struct type *type, struct type **basetypep)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   if (TYPE_VPTR_FIELDNO (type) < 0)
     {
@@ -1806,6 +1818,12 @@ is_dynamic_type_internal (struct type *t
 	  || TYPE_DATA_LOCATION_KIND (type) == PROP_LOCLIST))
     return 1;
 
+  if (TYPE_ASSOCIATED_PROP (type))
+    return 1;
+
+  if (TYPE_ALLOCATED_PROP (type))
+    return 1;
+
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_RANGE:
@@ -1868,13 +1886,12 @@ resolve_dynamic_range (struct type *dyn_
   CORE_ADDR value;
   struct type *static_range_type, *static_target_type;
   const struct dynamic_prop *prop;
-  const struct dwarf2_locexpr_baton *baton;
   struct dynamic_prop low_bound, high_bound;
 
   gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE);
 
   prop = &TYPE_RANGE_DATA (dyn_range_type)->low;
-  if (dwarf2_evaluate_property (prop, addr_stack, &value))
+  if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
     {
       low_bound.kind = PROP_CONST;
       low_bound.data.const_val = value;
@@ -1886,7 +1903,7 @@ resolve_dynamic_range (struct type *dyn_
     }
 
   prop = &TYPE_RANGE_DATA (dyn_range_type)->high;
-  if (dwarf2_evaluate_property (prop, addr_stack, &value))
+  if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
     {
       high_bound.kind = PROP_CONST;
       high_bound.data.const_val = value;
@@ -1923,23 +1940,40 @@ resolve_dynamic_array (struct type *type
   struct type *elt_type;
   struct type *range_type;
   struct type *ary_dim;
+  struct dynamic_prop *prop;
 
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY);
 
+  type = copy_type (type);
+
   elt_type = type;
   range_type = check_typedef (TYPE_INDEX_TYPE (elt_type));
   range_type = resolve_dynamic_range (range_type, addr_stack);
 
+  /* Resolve allocated/associated here before creating a new array type, which
+     will update the length of the array accordingly.  */
+  prop = TYPE_ALLOCATED_PROP (type);
+  if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
+    {
+      TYPE_DYN_PROP_ADDR (prop) = value;
+      TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
+    }
+  prop = TYPE_ASSOCIATED_PROP (type);
+  if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
+    {
+      TYPE_DYN_PROP_ADDR (prop) = value;
+      TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
+    }
+
   ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
 
   if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY)
-    elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type), addr_stack);
+    elt_type = resolve_dynamic_array (ary_dim, addr_stack);
   else
     elt_type = TYPE_TARGET_TYPE (type);
 
-  return create_array_type_with_stride (copy_type (type),
-					elt_type, range_type,
-					TYPE_FIELD_BITSIZE (type, 0));
+  return create_array_type_with_stride (type, elt_type, range_type,
+                                        TYPE_FIELD_BITSIZE (type, 0));
 }
 
 /* Resolve dynamic bounds of members of the union TYPE to static
@@ -1958,8 +1992,9 @@ resolve_dynamic_union (struct type *type
 
   resolved_type = copy_type (type);
   TYPE_FIELDS (resolved_type)
-    = TYPE_ALLOC (resolved_type,
-		  TYPE_NFIELDS (resolved_type) * sizeof (struct field));
+    = (struct field *) TYPE_ALLOC (resolved_type,
+				   TYPE_NFIELDS (resolved_type)
+				   * sizeof (struct field));
   memcpy (TYPE_FIELDS (resolved_type),
 	  TYPE_FIELDS (type),
 	  TYPE_NFIELDS (resolved_type) * sizeof (struct field));
@@ -1998,8 +2033,9 @@ resolve_dynamic_struct (struct type *typ
 
   resolved_type = copy_type (type);
   TYPE_FIELDS (resolved_type)
-    = TYPE_ALLOC (resolved_type,
-		  TYPE_NFIELDS (resolved_type) * sizeof (struct field));
+    = (struct field *) TYPE_ALLOC (resolved_type,
+				   TYPE_NFIELDS (resolved_type)
+				   * sizeof (struct field));
   memcpy (TYPE_FIELDS (resolved_type),
 	  TYPE_FIELDS (type),
 	  TYPE_NFIELDS (resolved_type) * sizeof (struct field));
@@ -2024,7 +2060,9 @@ resolve_dynamic_struct (struct type *typ
 
       pinfo.type = check_typedef (TYPE_FIELD_TYPE (type, i));
       pinfo.valaddr = addr_stack->valaddr;
-      pinfo.addr = addr_stack->addr;
+      pinfo.addr
+	= (addr_stack->addr
+	   + (TYPE_FIELD_BITPOS (resolved_type, i) / TARGET_CHAR_BIT));
       pinfo.next = addr_stack;
 
       TYPE_FIELD_TYPE (resolved_type, i)
@@ -2050,8 +2088,13 @@ resolve_dynamic_struct (struct type *typ
 	resolved_type_bit_length = new_bit_length;
     }
 
-  TYPE_LENGTH (resolved_type)
-    = (resolved_type_bit_length + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT;
+  /* The length of a type won't change for fortran, but it does for C and Ada.
+     For fortran the size of dynamic fields might change over time but not the
+     type length of the structure.  If we adapt it, we run into problems
+     when calculating the element offset for arrays of structs.  */
+  if (current_language->la_language != language_fortran)
+    TYPE_LENGTH (resolved_type)
+      = (resolved_type_bit_length + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT;
 
   /* The Ada language uses this field as a cache for static fixed types: reset
      it as RESOLVED_TYPE must have its own static fixed type.  */
@@ -2128,7 +2171,8 @@ resolve_dynamic_type_internal (struct ty
 
   /* Resolve data_location attribute.  */
   prop = TYPE_DATA_LOCATION (resolved_type);
-  if (prop != NULL && dwarf2_evaluate_property (prop, addr_stack, &value))
+  if (prop != NULL
+      && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
     {
       TYPE_DYN_PROP_ADDR (prop) = value;
       TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
@@ -2175,8 +2219,7 @@ add_dyn_prop (enum dynamic_prop_node_kin
 
   gdb_assert (TYPE_OBJFILE_OWNED (type));
 
-  temp = obstack_alloc (&objfile->objfile_obstack,
-			sizeof (struct dynamic_prop_list));
+  temp = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop_list);
   temp->prop_kind = prop_kind;
   temp->prop = prop;
   temp->next = TYPE_DYN_PROP_LIST (type);
@@ -2184,6 +2227,37 @@ add_dyn_prop (enum dynamic_prop_node_kin
   TYPE_DYN_PROP_LIST (type) = temp;
 }
 
+/* Remove dynamic property from TYPE in case it exists.  */
+
+void
+remove_dyn_prop (enum dynamic_prop_node_kind prop_kind,
+                 struct type *type)
+{
+  struct dynamic_prop_list *prev_node, *curr_node;
+
+  curr_node = TYPE_DYN_PROP_LIST (type);
+  prev_node = NULL;
+
+  while (NULL != curr_node)
+    {
+      if (curr_node->prop_kind == prop_kind)
+	{
+	  /* Update the linked list but don't free anything.
+	     The property was allocated on objstack and it is not known
+	     if we are on top of it.  Nevertheless, everything is released
+	     when the complete objstack is freed.  */
+	  if (NULL == prev_node)
+	    TYPE_DYN_PROP_LIST (type) = curr_node->next;
+	  else
+	    prev_node->next = curr_node->next;
+
+	  return;
+	}
+
+      prev_node = curr_node;
+      curr_node = curr_node->next;
+    }
+}
 
 /* Find the real type of TYPE.  This function returns the real type,
    after removing all layers of typedefs, and completing opaque or stub
@@ -2245,7 +2319,7 @@ check_typedef (struct type *type)
 	      stub_noname_complaint ();
 	      return make_qualified_type (type, instance_flags, NULL);
 	    }
-	  sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0);
+	  sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0).symbol;
 	  if (sym)
 	    TYPE_TARGET_TYPE (type) = SYMBOL_TYPE (sym);
 	  else					/* TYPE_CODE_UNDEF */
@@ -2336,7 +2410,7 @@ check_typedef (struct type *type)
 	  stub_noname_complaint ();
 	  return make_qualified_type (type, instance_flags, NULL);
 	}
-      sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0);
+      sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0).symbol;
       if (sym)
         {
           /* Same as above for opaque types, we can replace the stub
@@ -2353,7 +2427,6 @@ check_typedef (struct type *type)
 
   if (TYPE_TARGET_STUB (type))
     {
-      struct type *range_type;
       struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
 
       if (TYPE_STUB (target_type) || TYPE_TARGET_STUB (target_type))
@@ -2386,7 +2459,7 @@ safe_parse_type (struct gdbarch *gdbarch
 
   /* Suppress error messages.  */
   saved_gdb_stderr = gdb_stderr;
-  gdb_stderr = ui_file_new ();
+  gdb_stderr = &null_stream;
 
   /* Call parse_and_eval_type() without fear of longjmp()s.  */
   TRY
@@ -2400,7 +2473,6 @@ safe_parse_type (struct gdbarch *gdbarch
   END_CATCH
 
   /* Stop suppressing error messages.  */
-  ui_file_delete (gdb_stderr);
   gdb_stderr = saved_gdb_stderr;
 
   return type;
@@ -2606,54 +2678,13 @@ allocate_gnat_aux_type (struct type *typ
   *(TYPE_GNAT_SPECIFIC (type)) = gnat_aux_default;
 }
 
-/* Helper function to initialize the standard scalar types.
-
-   If NAME is non-NULL, then it is used to initialize the type name.
-   Note that NAME is not copied; it is required to have a lifetime at
-   least as long as OBJFILE.  */
+/* Helper function to initialize a newly allocated type.  Set type code
+   to CODE and initialize the type-specific fields accordingly.  */
 
-struct type *
-init_type (enum type_code code, int length, int flags,
-	   const char *name, struct objfile *objfile)
+static void
+set_type_code (struct type *type, enum type_code code)
 {
-  struct type *type;
-
-  type = alloc_type (objfile);
   TYPE_CODE (type) = code;
-  TYPE_LENGTH (type) = length;
-
-  gdb_assert (!(flags & (TYPE_FLAG_MIN - 1)));
-  if (flags & TYPE_FLAG_UNSIGNED)
-    TYPE_UNSIGNED (type) = 1;
-  if (flags & TYPE_FLAG_NOSIGN)
-    TYPE_NOSIGN (type) = 1;
-  if (flags & TYPE_FLAG_STUB)
-    TYPE_STUB (type) = 1;
-  if (flags & TYPE_FLAG_TARGET_STUB)
-    TYPE_TARGET_STUB (type) = 1;
-  if (flags & TYPE_FLAG_STATIC)
-    TYPE_STATIC (type) = 1;
-  if (flags & TYPE_FLAG_PROTOTYPED)
-    TYPE_PROTOTYPED (type) = 1;
-  if (flags & TYPE_FLAG_INCOMPLETE)
-    TYPE_INCOMPLETE (type) = 1;
-  if (flags & TYPE_FLAG_VARARGS)
-    TYPE_VARARGS (type) = 1;
-  if (flags & TYPE_FLAG_VECTOR)
-    TYPE_VECTOR (type) = 1;
-  if (flags & TYPE_FLAG_STUB_SUPPORTED)
-    TYPE_STUB_SUPPORTED (type) = 1;
-  if (flags & TYPE_FLAG_FIXED_INSTANCE)
-    TYPE_FIXED_INSTANCE (type) = 1;
-  if (flags & TYPE_FLAG_GNU_IFUNC)
-    TYPE_GNU_IFUNC (type) = 1;
-
-  TYPE_NAME (type) = name;
-
-  /* C++ fancies.  */
-
-  if (name && strcmp (name, "char") == 0)
-    TYPE_NOSIGN (type) = 1;
 
   switch (code)
     {
@@ -2669,8 +2700,163 @@ init_type (enum type_code code, int leng
 	INIT_FUNC_SPECIFIC (type);
         break;
     }
+}
+
+/* Helper function to verify floating-point format and size.
+   BIT is the type size in bits; if BIT equals -1, the size is
+   determined by the floatformat.  Returns size to be used.  */
+
+static int
+verify_floatformat (int bit, const struct floatformat **floatformats)
+{
+  gdb_assert (floatformats != NULL);
+  gdb_assert (floatformats[0] != NULL && floatformats[1] != NULL);
+
+  if (bit == -1)
+    bit = floatformats[0]->totalsize;
+  gdb_assert (bit >= 0);
+
+  size_t len = bit / TARGET_CHAR_BIT;
+  gdb_assert (len >= floatformat_totalsize_bytes (floatformats[0]));
+  gdb_assert (len >= floatformat_totalsize_bytes (floatformats[1]));
+
+  return bit;
+}
+
+/* Helper function to initialize the standard scalar types.
+
+   If NAME is non-NULL, then it is used to initialize the type name.
+   Note that NAME is not copied; it is required to have a lifetime at
+   least as long as OBJFILE.  */
+
+struct type *
+init_type (struct objfile *objfile, enum type_code code, int length,
+	   const char *name)
+{
+  struct type *type;
+
+  type = alloc_type (objfile);
+  set_type_code (type, code);
+  TYPE_LENGTH (type) = length;
+  TYPE_NAME (type) = name;
+
   return type;
 }
+
+/* Allocate a TYPE_CODE_INT type structure associated with OBJFILE.
+   BIT is the type size in bits.  If UNSIGNED_P is non-zero, set
+   the type's TYPE_UNSIGNED flag.  NAME is the type name.  */
+
+struct type *
+init_integer_type (struct objfile *objfile,
+		   int bit, int unsigned_p, const char *name)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_INT, bit / TARGET_CHAR_BIT, name);
+  if (unsigned_p)
+    TYPE_UNSIGNED (t) = 1;
+
+  return t;
+}
+
+/* Allocate a TYPE_CODE_CHAR type structure associated with OBJFILE.
+   BIT is the type size in bits.  If UNSIGNED_P is non-zero, set
+   the type's TYPE_UNSIGNED flag.  NAME is the type name.  */
+
+struct type *
+init_character_type (struct objfile *objfile,
+		     int bit, int unsigned_p, const char *name)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_CHAR, bit / TARGET_CHAR_BIT, name);
+  if (unsigned_p)
+    TYPE_UNSIGNED (t) = 1;
+
+  return t;
+}
+
+/* Allocate a TYPE_CODE_BOOL type structure associated with OBJFILE.
+   BIT is the type size in bits.  If UNSIGNED_P is non-zero, set
+   the type's TYPE_UNSIGNED flag.  NAME is the type name.  */
+
+struct type *
+init_boolean_type (struct objfile *objfile,
+		   int bit, int unsigned_p, const char *name)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_BOOL, bit / TARGET_CHAR_BIT, name);
+  if (unsigned_p)
+    TYPE_UNSIGNED (t) = 1;
+
+  return t;
+}
+
+/* Allocate a TYPE_CODE_FLT type structure associated with OBJFILE.
+   BIT is the type size in bits; if BIT equals -1, the size is
+   determined by the floatformat.  NAME is the type name.  Set the
+   TYPE_FLOATFORMAT from FLOATFORMATS.  */
+
+struct type *
+init_float_type (struct objfile *objfile,
+		 int bit, const char *name,
+		 const struct floatformat **floatformats)
+{
+  struct type *t;
+
+  bit = verify_floatformat (bit, floatformats);
+  t = init_type (objfile, TYPE_CODE_FLT, bit / TARGET_CHAR_BIT, name);
+  TYPE_FLOATFORMAT (t) = floatformats;
+
+  return t;
+}
+
+/* Allocate a TYPE_CODE_DECFLOAT type structure associated with OBJFILE.
+   BIT is the type size in bits.  NAME is the type name.  */
+
+struct type *
+init_decfloat_type (struct objfile *objfile, int bit, const char *name)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_DECFLOAT, bit / TARGET_CHAR_BIT, name);
+  return t;
+}
+
+/* Allocate a TYPE_CODE_COMPLEX type structure associated with OBJFILE.
+   NAME is the type name.  TARGET_TYPE is the component float type.  */
+
+struct type *
+init_complex_type (struct objfile *objfile,
+		   const char *name, struct type *target_type)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_COMPLEX,
+		 2 * TYPE_LENGTH (target_type), name);
+  TYPE_TARGET_TYPE (t) = target_type;
+  return t;
+}
+
+/* Allocate a TYPE_CODE_PTR type structure associated with OBJFILE.
+   BIT is the pointer type size in bits.  NAME is the type name.
+   TARGET_TYPE is the pointer target type.  Always sets the pointer type's
+   TYPE_UNSIGNED flag.  */
+
+struct type *
+init_pointer_type (struct objfile *objfile,
+		   int bit, const char *name, struct type *target_type)
+{
+  struct type *t;
+
+  t = init_type (objfile, TYPE_CODE_PTR, bit / TARGET_CHAR_BIT, name);
+  TYPE_TARGET_TYPE (t) = target_type;
+  TYPE_UNSIGNED (t) = 1;
+  return t;
+}
+
 
 /* Queries on types.  */
 
@@ -2679,7 +2865,7 @@ can_dereference (struct type *t)
 {
   /* FIXME: Should we return true for references as well as
      pointers?  */
-  CHECK_TYPEDEF (t);
+  t = check_typedef (t);
   return
     (t != NULL
      && TYPE_CODE (t) == TYPE_CODE_PTR
@@ -2689,7 +2875,7 @@ can_dereference (struct type *t)
 int
 is_integral_type (struct type *t)
 {
-  CHECK_TYPEDEF (t);
+  t = check_typedef (t);
   return
     ((t != NULL)
      && ((TYPE_CODE (t) == TYPE_CODE_INT)
@@ -2702,10 +2888,10 @@ is_integral_type (struct type *t)
 
 /* Return true if TYPE is scalar.  */
 
-static int
+int
 is_scalar_type (struct type *type)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -2727,7 +2913,7 @@ is_scalar_type (struct type *type)
 int
 is_scalar_type_recursive (struct type *t)
 {
-  CHECK_TYPEDEF (t);
+  t = check_typedef (t);
 
   if (is_scalar_type (t))
     return 1;
@@ -2809,8 +2995,8 @@ distance_to_ancestor (struct type *base,
   int i;
   int d;
 
-  CHECK_TYPEDEF (base);
-  CHECK_TYPEDEF (dclass);
+  base = check_typedef (base);
+  dclass = check_typedef (dclass);
 
   if (class_types_same_p (base, dclass))
     return 0;
@@ -2859,8 +3045,8 @@ is_unique_ancestor_worker (struct type *
 {
   int i, count = 0;
 
-  CHECK_TYPEDEF (base);
-  CHECK_TYPEDEF (dclass);
+  base = check_typedef (base);
+  dclass = check_typedef (dclass);
 
   for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
     {
@@ -3010,10 +3196,9 @@ rank_function (struct type **parms, int 
 	       struct value **args, int nargs)
 {
   int i;
-  struct badness_vector *bv;
+  struct badness_vector *bv = XNEW (struct badness_vector);
   int min_len = nparms < nargs ? nparms : nargs;
 
-  bv = xmalloc (sizeof (struct badness_vector));
   bv->length = nargs + 1;	/* add 1 for the length-match rank.  */
   bv->rank = XNEWVEC (struct rank, nargs + 1);
 
@@ -3179,8 +3364,8 @@ static int
 check_types_equal (struct type *type1, struct type *type2,
 		   VEC (type_equality_entry_d) **worklist)
 {
-  CHECK_TYPEDEF (type1);
-  CHECK_TYPEDEF (type2);
+  type1 = check_typedef (type1);
+  type2 = check_typedef (type2);
 
   if (type1 == type2)
     return 1;
@@ -3361,6 +3546,30 @@ types_deeply_equal (struct type *type1, 
 
   return result;
 }
+
+/* Allocated status of type TYPE.  Return zero if type TYPE is allocated.
+   Otherwise return one.  */
+
+int
+type_not_allocated (const struct type *type)
+{
+  struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type);
+
+  return (prop && TYPE_DYN_PROP_KIND (prop) == PROP_CONST
+         && !TYPE_DYN_PROP_ADDR (prop));
+}
+
+/* Associated status of type TYPE.  Return zero if type TYPE is associated.
+   Otherwise return one.  */
+
+int
+type_not_associated (const struct type *type)
+{
+  struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type);
+
+  return (prop && TYPE_DYN_PROP_KIND (prop) == PROP_CONST
+         && !TYPE_DYN_PROP_ADDR (prop));
+}
 
 /* Compare one type (PARM) for compatibility with another (ARG).
  * PARM is intended to be the parameter type of a function; and
@@ -4103,77 +4312,77 @@ recursive_dump_type (struct type *type, 
 		    TYPE_INSTANCE_FLAGS (type));
   if (TYPE_CONST (type))
     {
-      puts_filtered (" TYPE_FLAG_CONST");
+      puts_filtered (" TYPE_CONST");
     }
   if (TYPE_VOLATILE (type))
     {
-      puts_filtered (" TYPE_FLAG_VOLATILE");
+      puts_filtered (" TYPE_VOLATILE");
     }
   if (TYPE_CODE_SPACE (type))
     {
-      puts_filtered (" TYPE_FLAG_CODE_SPACE");
+      puts_filtered (" TYPE_CODE_SPACE");
     }
   if (TYPE_DATA_SPACE (type))
     {
-      puts_filtered (" TYPE_FLAG_DATA_SPACE");
+      puts_filtered (" TYPE_DATA_SPACE");
     }
   if (TYPE_ADDRESS_CLASS_1 (type))
     {
-      puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_1");
+      puts_filtered (" TYPE_ADDRESS_CLASS_1");
     }
   if (TYPE_ADDRESS_CLASS_2 (type))
     {
-      puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_2");
+      puts_filtered (" TYPE_ADDRESS_CLASS_2");
     }
   if (TYPE_RESTRICT (type))
     {
-      puts_filtered (" TYPE_FLAG_RESTRICT");
+      puts_filtered (" TYPE_RESTRICT");
     }
   if (TYPE_ATOMIC (type))
     {
-      puts_filtered (" TYPE_FLAG_ATOMIC");
+      puts_filtered (" TYPE_ATOMIC");
     }
   puts_filtered ("\n");
 
   printfi_filtered (spaces, "flags");
   if (TYPE_UNSIGNED (type))
     {
-      puts_filtered (" TYPE_FLAG_UNSIGNED");
+      puts_filtered (" TYPE_UNSIGNED");
     }
   if (TYPE_NOSIGN (type))
     {
-      puts_filtered (" TYPE_FLAG_NOSIGN");
+      puts_filtered (" TYPE_NOSIGN");
     }
   if (TYPE_STUB (type))
     {
-      puts_filtered (" TYPE_FLAG_STUB");
+      puts_filtered (" TYPE_STUB");
     }
   if (TYPE_TARGET_STUB (type))
     {
-      puts_filtered (" TYPE_FLAG_TARGET_STUB");
+      puts_filtered (" TYPE_TARGET_STUB");
     }
   if (TYPE_STATIC (type))
     {
-      puts_filtered (" TYPE_FLAG_STATIC");
+      puts_filtered (" TYPE_STATIC");
     }
   if (TYPE_PROTOTYPED (type))
     {
-      puts_filtered (" TYPE_FLAG_PROTOTYPED");
+      puts_filtered (" TYPE_PROTOTYPED");
     }
   if (TYPE_INCOMPLETE (type))
     {
-      puts_filtered (" TYPE_FLAG_INCOMPLETE");
+      puts_filtered (" TYPE_INCOMPLETE");
     }
   if (TYPE_VARARGS (type))
     {
-      puts_filtered (" TYPE_FLAG_VARARGS");
+      puts_filtered (" TYPE_VARARGS");
     }
   /* This is used for things like AltiVec registers on ppc.  Gcc emits
      an attribute for the array type, which tells whether or not we
      have a vector, instead of a regular array.  */
   if (TYPE_VECTOR (type))
     {
-      puts_filtered (" TYPE_FLAG_VECTOR");
+      puts_filtered (" TYPE_VECTOR");
     }
   if (TYPE_FIXED_INSTANCE (type))
     {
@@ -4199,8 +4408,8 @@ recursive_dump_type (struct type *type, 
 			  idx, plongest (TYPE_FIELD_ENUMVAL (type, idx)));
       else
 	printfi_filtered (spaces + 2,
-			  "[%d] bitpos %d bitsize %d type ",
-			  idx, TYPE_FIELD_BITPOS (type, idx),
+			  "[%d] bitpos %s bitsize %d type ",
+			  idx, plongest (TYPE_FIELD_BITPOS (type, idx)),
 			  TYPE_FIELD_BITSIZE (type, idx));
       gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout);
       printf_filtered (" name '%s' (",
@@ -4294,7 +4503,7 @@ struct type_pair
 static hashval_t
 type_pair_hash (const void *item)
 {
-  const struct type_pair *pair = item;
+  const struct type_pair *pair = (const struct type_pair *) item;
 
   return htab_hash_pointer (pair->old);
 }
@@ -4302,7 +4511,8 @@ type_pair_hash (const void *item)
 static int
 type_pair_eq (const void *item_lhs, const void *item_rhs)
 {
-  const struct type_pair *lhs = item_lhs, *rhs = item_rhs;
+  const struct type_pair *lhs = (const struct type_pair *) item_lhs;
+  const struct type_pair *rhs = (const struct type_pair *) item_rhs;
 
   return lhs->old == rhs->old;
 }
@@ -4333,8 +4543,9 @@ copy_dynamic_prop_list (struct obstack *
     {
       struct dynamic_prop_list *node_copy;
 
-      node_copy = obstack_copy (objfile_obstack, *node_ptr,
-				sizeof (struct dynamic_prop_list));
+      node_copy = ((struct dynamic_prop_list *)
+		   obstack_copy (objfile_obstack, *node_ptr,
+				 sizeof (struct dynamic_prop_list)));
       node_copy->prop = (*node_ptr)->prop;
       *node_ptr = node_copy;
 
@@ -4345,9 +4556,9 @@ copy_dynamic_prop_list (struct obstack *
 }
 
 /* Recursively copy (deep copy) TYPE, if it is associated with
-   OBJFILE.  Return a new type allocated using malloc, a saved type if
-   we have already visited TYPE (using COPIED_TYPES), or TYPE if it is
-   not associated with OBJFILE.  */
+   OBJFILE.  Return a new type owned by the gdbarch associated with the type, a
+   saved type if we have already visited TYPE (using COPIED_TYPES), or TYPE if
+   it is not associated with OBJFILE.  */
 
 struct type *
 copy_type_recursive (struct objfile *objfile, 
@@ -4374,8 +4585,7 @@ copy_type_recursive (struct objfile *obj
 
   /* We must add the new type to the hash table immediately, in case
      we encounter this type again during a recursive call below.  */
-  stored
-    = obstack_alloc (&objfile->objfile_obstack, sizeof (struct type_pair));
+  stored = XOBNEW (&objfile->objfile_obstack, struct type_pair);
   stored->old = type;
   stored->newobj = new_type;
   *slot = stored;
@@ -4443,7 +4653,7 @@ copy_type_recursive (struct objfile *obj
   /* For range types, copy the bounds information.  */
   if (TYPE_CODE (type) == TYPE_CODE_RANGE)
     {
-      TYPE_RANGE_DATA (new_type) = xmalloc (sizeof (struct range_bounds));
+      TYPE_RANGE_DATA (new_type) = XNEW (struct range_bounds);
       *TYPE_RANGE_DATA (new_type) = *TYPE_RANGE_DATA (type);
     }
 
@@ -4530,16 +4740,16 @@ copy_type (const struct type *type)
 
 struct type *
 arch_type (struct gdbarch *gdbarch,
-	   enum type_code code, int length, char *name)
+	   enum type_code code, int length, const char *name)
 {
   struct type *type;
 
   type = alloc_type_arch (gdbarch);
-  TYPE_CODE (type) = code;
+  set_type_code (type, code);
   TYPE_LENGTH (type) = length;
 
   if (name)
-    TYPE_NAME (type) = xstrdup (name);
+    TYPE_NAME (type) = gdbarch_obstack_strdup (gdbarch, name);
 
   return type;
 }
@@ -4550,15 +4760,13 @@ arch_type (struct gdbarch *gdbarch,
 
 struct type *
 arch_integer_type (struct gdbarch *gdbarch,
-		   int bit, int unsigned_p, char *name)
+		   int bit, int unsigned_p, const char *name)
 {
   struct type *t;
 
   t = arch_type (gdbarch, TYPE_CODE_INT, bit / TARGET_CHAR_BIT, name);
   if (unsigned_p)
     TYPE_UNSIGNED (t) = 1;
-  if (name && strcmp (name, "char") == 0)
-    TYPE_NOSIGN (t) = 1;
 
   return t;
 }
@@ -4569,7 +4777,7 @@ arch_integer_type (struct gdbarch *gdbar
 
 struct type *
 arch_character_type (struct gdbarch *gdbarch,
-		     int bit, int unsigned_p, char *name)
+		     int bit, int unsigned_p, const char *name)
 {
   struct type *t;
 
@@ -4586,7 +4794,7 @@ arch_character_type (struct gdbarch *gdb
 
 struct type *
 arch_boolean_type (struct gdbarch *gdbarch,
-		   int bit, int unsigned_p, char *name)
+		   int bit, int unsigned_p, const char *name)
 {
   struct type *t;
 
@@ -4604,20 +4812,27 @@ arch_boolean_type (struct gdbarch *gdbar
 
 struct type *
 arch_float_type (struct gdbarch *gdbarch,
-		 int bit, char *name, const struct floatformat **floatformats)
+		 int bit, const char *name,
+		 const struct floatformat **floatformats)
 {
   struct type *t;
 
-  if (bit == -1)
-    {
-      gdb_assert (floatformats != NULL);
-      gdb_assert (floatformats[0] != NULL && floatformats[1] != NULL);
-      bit = floatformats[0]->totalsize;
-    }
-  gdb_assert (bit >= 0);
-
+  bit = verify_floatformat (bit, floatformats);
   t = arch_type (gdbarch, TYPE_CODE_FLT, bit / TARGET_CHAR_BIT, name);
   TYPE_FLOATFORMAT (t) = floatformats;
+
+  return t;
+}
+
+/* Allocate a TYPE_CODE_DECFLOAT type structure associated with GDBARCH.
+   BIT is the type size in bits.  NAME is the type name.  */
+
+struct type *
+arch_decfloat_type (struct gdbarch *gdbarch, int bit, const char *name)
+{
+  struct type *t;
+
+  t = arch_type (gdbarch, TYPE_CODE_DECFLOAT, bit / TARGET_CHAR_BIT, name);
   return t;
 }
 
@@ -4626,7 +4841,7 @@ arch_float_type (struct gdbarch *gdbarch
 
 struct type *
 arch_complex_type (struct gdbarch *gdbarch,
-		   char *name, struct type *target_type)
+		   const char *name, struct type *target_type)
 {
   struct type *t;
 
@@ -4636,50 +4851,86 @@ arch_complex_type (struct gdbarch *gdbar
   return t;
 }
 
+/* Allocate a TYPE_CODE_PTR type structure associated with GDBARCH.
+   BIT is the pointer type size in bits.  NAME is the type name.
+   TARGET_TYPE is the pointer target type.  Always sets the pointer type's
+   TYPE_UNSIGNED flag.  */
+
+struct type *
+arch_pointer_type (struct gdbarch *gdbarch,
+		   int bit, const char *name, struct type *target_type)
+{
+  struct type *t;
+
+  t = arch_type (gdbarch, TYPE_CODE_PTR, bit / TARGET_CHAR_BIT, name);
+  TYPE_TARGET_TYPE (t) = target_type;
+  TYPE_UNSIGNED (t) = 1;
+  return t;
+}
+
 /* Allocate a TYPE_CODE_FLAGS type structure associated with GDBARCH.
    NAME is the type name.  LENGTH is the size of the flag word in bytes.  */
 
 struct type *
-arch_flags_type (struct gdbarch *gdbarch, char *name, int length)
+arch_flags_type (struct gdbarch *gdbarch, const char *name, int length)
 {
-  int nfields = length * TARGET_CHAR_BIT;
+  int max_nfields = length * TARGET_CHAR_BIT;
   struct type *type;
 
   type = arch_type (gdbarch, TYPE_CODE_FLAGS, length, name);
   TYPE_UNSIGNED (type) = 1;
-  TYPE_NFIELDS (type) = nfields;
-  TYPE_FIELDS (type) = TYPE_ZALLOC (type, nfields * sizeof (struct field));
+  TYPE_NFIELDS (type) = 0;
+  /* Pre-allocate enough space assuming every field is one bit.  */
+  TYPE_FIELDS (type)
+    = (struct field *) TYPE_ZALLOC (type, max_nfields * sizeof (struct field));
 
   return type;
 }
 
 /* Add field to TYPE_CODE_FLAGS type TYPE to indicate the bit at
-   position BITPOS is called NAME.  */
+   position BITPOS is called NAME.  Pass NAME as "" for fields that
+   should not be printed.  */
 
 void
-append_flags_type_flag (struct type *type, int bitpos, char *name)
+append_flags_type_field (struct type *type, int start_bitpos, int nr_bits,
+			 struct type *field_type, const char *name)
 {
+  int type_bitsize = TYPE_LENGTH (type) * TARGET_CHAR_BIT;
+  int field_nr = TYPE_NFIELDS (type);
+
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLAGS);
-  gdb_assert (bitpos < TYPE_NFIELDS (type));
-  gdb_assert (bitpos >= 0);
+  gdb_assert (TYPE_NFIELDS (type) + 1 <= type_bitsize);
+  gdb_assert (start_bitpos >= 0 && start_bitpos < type_bitsize);
+  gdb_assert (nr_bits >= 1 && nr_bits <= type_bitsize);
+  gdb_assert (name != NULL);
+
+  TYPE_FIELD_NAME (type, field_nr) = xstrdup (name);
+  TYPE_FIELD_TYPE (type, field_nr) = field_type;
+  SET_FIELD_BITPOS (TYPE_FIELD (type, field_nr), start_bitpos);
+  TYPE_FIELD_BITSIZE (type, field_nr) = nr_bits;
+  ++TYPE_NFIELDS (type);
+}
 
-  if (name)
-    {
-      TYPE_FIELD_NAME (type, bitpos) = xstrdup (name);
-      SET_FIELD_BITPOS (TYPE_FIELD (type, bitpos), bitpos);
-    }
-  else
-    {
-      /* Don't show this field to the user.  */
-      SET_FIELD_BITPOS (TYPE_FIELD (type, bitpos), -1);
-    }
+/* Special version of append_flags_type_field to add a flag field.
+   Add field to TYPE_CODE_FLAGS type TYPE to indicate the bit at
+   position BITPOS is called NAME.  */
+
+void
+append_flags_type_flag (struct type *type, int bitpos, const char *name)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+
+  append_flags_type_field (type, bitpos, 1,
+			   builtin_type (gdbarch)->builtin_bool,
+			   name);
 }
 
 /* Allocate a TYPE_CODE_STRUCT or TYPE_CODE_UNION type structure (as
    specified by CODE) associated with GDBARCH.  NAME is the type name.  */
 
 struct type *
-arch_composite_type (struct gdbarch *gdbarch, char *name, enum type_code code)
+arch_composite_type (struct gdbarch *gdbarch, const char *name,
+		     enum type_code code)
 {
   struct type *t;
 
@@ -4695,14 +4946,14 @@ arch_composite_type (struct gdbarch *gdb
    the caller should do so.  Return the new field.  */
 
 struct field *
-append_composite_type_field_raw (struct type *t, char *name,
+append_composite_type_field_raw (struct type *t, const char *name,
 				 struct type *field)
 {
   struct field *f;
 
   TYPE_NFIELDS (t) = TYPE_NFIELDS (t) + 1;
-  TYPE_FIELDS (t) = xrealloc (TYPE_FIELDS (t),
-			      sizeof (struct field) * TYPE_NFIELDS (t));
+  TYPE_FIELDS (t) = XRESIZEVEC (struct field, TYPE_FIELDS (t),
+				TYPE_NFIELDS (t));
   f = &(TYPE_FIELDS (t)[TYPE_NFIELDS (t) - 1]);
   memset (f, 0, sizeof f[0]);
   FIELD_TYPE (f[0]) = field;
@@ -4714,7 +4965,7 @@ append_composite_type_field_raw (struct 
    ALIGNMENT (if non-zero) specifies the minimum field alignment.  */
 
 void
-append_composite_type_field_aligned (struct type *t, char *name,
+append_composite_type_field_aligned (struct type *t, const char *name,
 				     struct type *field, int alignment)
 {
   struct field *f = append_composite_type_field_raw (t, name, field);
@@ -4754,7 +5005,7 @@ append_composite_type_field_aligned (str
 /* Add new field with name NAME and type FIELD to composite type T.  */
 
 void
-append_composite_type_field (struct type *t, char *name,
+append_composite_type_field (struct type *t, const char *name,
 			     struct type *field)
 {
   append_composite_type_field_aligned (t, name, field, 0);
@@ -4765,7 +5016,7 @@ static struct gdbarch_data *gdbtypes_dat
 const struct builtin_type *
 builtin_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, gdbtypes_data);
+  return (const struct builtin_type *) gdbarch_data (gdbarch, gdbtypes_data);
 }
 
 static void *
@@ -4780,6 +5031,7 @@ gdbtypes_post_init (struct gdbarch *gdba
   builtin_type->builtin_char
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
 			 !gdbarch_char_signed (gdbarch), "char");
+  TYPE_NOSIGN (builtin_type->builtin_char) = 1;
   builtin_type->builtin_signed_char
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
 			 0, "signed char");
@@ -4833,11 +5085,11 @@ gdbtypes_post_init (struct gdbarch *gdba
   /* The following three are about decimal floating point types, which
      are 32-bits, 64-bits and 128-bits respectively.  */
   builtin_type->builtin_decfloat
-    = arch_type (gdbarch, TYPE_CODE_DECFLOAT, 32 / 8, "_Decimal32");
+    = arch_decfloat_type (gdbarch, 32, "_Decimal32");
   builtin_type->builtin_decdouble
-    = arch_type (gdbarch, TYPE_CODE_DECFLOAT, 64 / 8, "_Decimal64");
+    = arch_decfloat_type (gdbarch, 64, "_Decimal64");
   builtin_type->builtin_declong
-    = arch_type (gdbarch, TYPE_CODE_DECFLOAT, 128 / 8, "_Decimal128");
+    = arch_decfloat_type (gdbarch, 128, "_Decimal128");
 
   /* "True" character types.  */
   builtin_type->builtin_true_char
@@ -4910,7 +5162,7 @@ objfile_type (struct objfile *objfile)
 {
   struct gdbarch *gdbarch;
   struct objfile_type *objfile_type
-    = objfile_data (objfile, objfile_type_data);
+    = (struct objfile_type *) objfile_data (objfile, objfile_type_data);
 
   if (objfile_type)
     return objfile_type;
@@ -4923,109 +5175,81 @@ objfile_type (struct objfile *objfile)
 
   /* Basic types.  */
   objfile_type->builtin_void
-    = init_type (TYPE_CODE_VOID, 1,
-		 0,
-		 "void", objfile);
-
+    = init_type (objfile, TYPE_CODE_VOID, 1, "void");
   objfile_type->builtin_char
-    = init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-		 (TYPE_FLAG_NOSIGN
-		  | (gdbarch_char_signed (gdbarch) ? 0 : TYPE_FLAG_UNSIGNED)),
-		 "char", objfile);
+    = init_integer_type (objfile, TARGET_CHAR_BIT,
+			 !gdbarch_char_signed (gdbarch), "char");
+  TYPE_NOSIGN (objfile_type->builtin_char) = 1;
   objfile_type->builtin_signed_char
-    = init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-		 0,
-		 "signed char", objfile);
+    = init_integer_type (objfile, TARGET_CHAR_BIT,
+			 0, "signed char");
   objfile_type->builtin_unsigned_char
-    = init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-		 TYPE_FLAG_UNSIGNED,
-		 "unsigned char", objfile);
+    = init_integer_type (objfile, TARGET_CHAR_BIT,
+			 1, "unsigned char");
   objfile_type->builtin_short
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_short_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "short", objfile);
+    = init_integer_type (objfile, gdbarch_short_bit (gdbarch),
+			 0, "short");
   objfile_type->builtin_unsigned_short
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_short_bit (gdbarch) / TARGET_CHAR_BIT,
-		 TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
+    = init_integer_type (objfile, gdbarch_short_bit (gdbarch),
+			 1, "unsigned short");
   objfile_type->builtin_int
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "int", objfile);
+    = init_integer_type (objfile, gdbarch_int_bit (gdbarch),
+			 0, "int");
   objfile_type->builtin_unsigned_int
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
-		 TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
+    = init_integer_type (objfile, gdbarch_int_bit (gdbarch),
+			 1, "unsigned int");
   objfile_type->builtin_long
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "long", objfile);
+    = init_integer_type (objfile, gdbarch_long_bit (gdbarch),
+			 0, "long");
   objfile_type->builtin_unsigned_long
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
-		 TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
+    = init_integer_type (objfile, gdbarch_long_bit (gdbarch),
+			 1, "unsigned long");
   objfile_type->builtin_long_long
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_long_long_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "long long", objfile);
+    = init_integer_type (objfile, gdbarch_long_long_bit (gdbarch),
+			 0, "long long");
   objfile_type->builtin_unsigned_long_long
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_long_long_bit (gdbarch) / TARGET_CHAR_BIT,
-		 TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
-
+    = init_integer_type (objfile, gdbarch_long_long_bit (gdbarch),
+			 1, "unsigned long long");
   objfile_type->builtin_float
-    = init_type (TYPE_CODE_FLT,
-		 gdbarch_float_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "float", objfile);
-  TYPE_FLOATFORMAT (objfile_type->builtin_float)
-    = gdbarch_float_format (gdbarch);
+    = init_float_type (objfile, gdbarch_float_bit (gdbarch),
+		       "float", gdbarch_float_format (gdbarch));
   objfile_type->builtin_double
-    = init_type (TYPE_CODE_FLT,
-		 gdbarch_double_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "double", objfile);
-  TYPE_FLOATFORMAT (objfile_type->builtin_double)
-    = gdbarch_double_format (gdbarch);
+    = init_float_type (objfile, gdbarch_double_bit (gdbarch),
+		       "double", gdbarch_double_format (gdbarch));
   objfile_type->builtin_long_double
-    = init_type (TYPE_CODE_FLT,
-		 gdbarch_long_double_bit (gdbarch) / TARGET_CHAR_BIT,
-		 0, "long double", objfile);
-  TYPE_FLOATFORMAT (objfile_type->builtin_long_double)
-    = gdbarch_long_double_format (gdbarch);
+    = init_float_type (objfile, gdbarch_long_double_bit (gdbarch),
+		       "long double", gdbarch_long_double_format (gdbarch));
 
   /* This type represents a type that was unrecognized in symbol read-in.  */
   objfile_type->builtin_error
-    = init_type (TYPE_CODE_ERROR, 0, 0, "<unknown type>", objfile);
+    = init_type (objfile, TYPE_CODE_ERROR, 0, "<unknown type>");
 
   /* The following set of types is used for symbols with no
      debug information.  */
   objfile_type->nodebug_text_symbol
-    = init_type (TYPE_CODE_FUNC, 1, 0,
-		 "<text variable, no debug info>", objfile);
+    = init_type (objfile, TYPE_CODE_FUNC, 1,
+		 "<text variable, no debug info>");
   TYPE_TARGET_TYPE (objfile_type->nodebug_text_symbol)
     = objfile_type->builtin_int;
   objfile_type->nodebug_text_gnu_ifunc_symbol
-    = init_type (TYPE_CODE_FUNC, 1, TYPE_FLAG_GNU_IFUNC,
-		 "<text gnu-indirect-function variable, no debug info>",
-		 objfile);
+    = init_type (objfile, TYPE_CODE_FUNC, 1,
+		 "<text gnu-indirect-function variable, no debug info>");
   TYPE_TARGET_TYPE (objfile_type->nodebug_text_gnu_ifunc_symbol)
     = objfile_type->nodebug_text_symbol;
+  TYPE_GNU_IFUNC (objfile_type->nodebug_text_gnu_ifunc_symbol) = 1;
   objfile_type->nodebug_got_plt_symbol
-    = init_type (TYPE_CODE_PTR, gdbarch_addr_bit (gdbarch) / 8, 0,
-		 "<text from jump slot in .got.plt, no debug info>",
-		 objfile);
-  TYPE_TARGET_TYPE (objfile_type->nodebug_got_plt_symbol)
-    = objfile_type->nodebug_text_symbol;
+    = init_pointer_type (objfile, gdbarch_addr_bit (gdbarch),
+			 "<text from jump slot in .got.plt, no debug info>",
+			 objfile_type->nodebug_text_symbol);
   objfile_type->nodebug_data_symbol
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
-		 "<data variable, no debug info>", objfile);
+    = init_integer_type (objfile, gdbarch_int_bit (gdbarch), 0,
+			 "<data variable, no debug info>");
   objfile_type->nodebug_unknown_symbol
-    = init_type (TYPE_CODE_INT, 1, 0,
-		 "<variable (not text or data), no debug info>", objfile);
+    = init_integer_type (objfile, TARGET_CHAR_BIT, 0,
+			 "<variable (not text or data), no debug info>");
   objfile_type->nodebug_tls_symbol
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
-		 "<thread local variable, no debug info>", objfile);
+    = init_integer_type (objfile, gdbarch_int_bit (gdbarch), 0,
+			 "<thread local variable, no debug info>");
 
   /* NOTE: on some targets, addresses and pointers are not necessarily
      the same.
@@ -5047,9 +5271,8 @@ objfile_type (struct objfile *objfile)
      are indeed in the unified virtual address space.  */
 
   objfile_type->builtin_core_addr
-    = init_type (TYPE_CODE_INT,
-		 gdbarch_addr_bit (gdbarch) / 8,
-		 TYPE_FLAG_UNSIGNED, "__CORE_ADDR", objfile);
+    = init_integer_type (objfile, gdbarch_addr_bit (gdbarch), 1,
+			 "__CORE_ADDR");
 
   set_objfile_data (objfile, objfile_type_data, objfile_type);
   return objfile_type;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbtypes.h ./gdb/gdbtypes.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdbtypes.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdbtypes.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 
 /* Internal type definitions for GDB.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -184,35 +184,8 @@ enum type_code
     TYPE_CODE_XMETHOD
   };
 
-/* * Some constants representing each bit field in the main_type.  See
-   the bit-field-specific macros, below, for documentation of each
-   constant in this enum.  These enum values are only used with
-   init_type.  Note that the values are chosen not to conflict with
-   type_instance_flag_value; this lets init_type error-check its
-   input.  */
-
-enum type_flag_value
-{
-  TYPE_FLAG_UNSIGNED = (1 << 9),
-  TYPE_FLAG_NOSIGN = (1 << 10),
-  TYPE_FLAG_STUB = (1 << 11),
-  TYPE_FLAG_TARGET_STUB = (1 << 12),
-  TYPE_FLAG_STATIC = (1 << 13),
-  TYPE_FLAG_PROTOTYPED = (1 << 14),
-  TYPE_FLAG_INCOMPLETE = (1 << 15),
-  TYPE_FLAG_VARARGS = (1 << 16),
-  TYPE_FLAG_VECTOR = (1 << 17),
-  TYPE_FLAG_FIXED_INSTANCE = (1 << 18),
-  TYPE_FLAG_STUB_SUPPORTED = (1 << 19),
-  TYPE_FLAG_GNU_IFUNC = (1 << 20),
-
-  /* * Used for error-checking.  */
-  TYPE_FLAG_MIN = TYPE_FLAG_UNSIGNED
-};
-
 /* * Some bits for the type's instance_flags word.  See the macros
-   below for documentation on each bit.  Note that if you add a value
-   here, you must update the enum type_flag_value as well.  */
+   below for documentation on each bit.  */
 
 enum type_instance_flag_value
 {
@@ -228,7 +201,7 @@ enum type_instance_flag_value
 };
 
 /* * Unsigned integer type.  If this is not set for a TYPE_CODE_INT,
-   the type is signed (unless TYPE_FLAG_NOSIGN (below) is set).  */
+   the type is signed (unless TYPE_NOSIGN (below) is set).  */
 
 #define TYPE_UNSIGNED(t)	(TYPE_MAIN_TYPE (t)->flag_unsigned)
 
@@ -370,11 +343,11 @@ enum type_instance_flag_value
    architecture's two (or more) address spaces, but this is an extension
    of the architecture's model.
 
-   If TYPE_FLAG_INST is set, an object of the corresponding type
+   If TYPE_INSTANCE_FLAG_CODE_SPACE is set, an object of the corresponding type
    resides in instruction memory, even if its address (in the extended
    flat address space) does not reflect this.
 
-   Similarly, if TYPE_FLAG_DATA is set, then an object of the 
+   Similarly, if TYPE_INSTANCE_FLAG_DATA_SPACE is set, then an object of the
    corresponding type resides in the data memory space, even if
    this is not indicated by its (flat address space) address.
 
@@ -390,7 +363,7 @@ enum type_instance_flag_value
 /* * Address class flags.  Some environments provide for pointers
    whose size is different from that of a normal pointer or address
    types where the bits are interpreted differently than normal
-   addresses.  The TYPE_FLAG_ADDRESS_CLASS_n flags may be used in
+   addresses.  The TYPE_INSTANCE_FLAG_ADDRESS_CLASS_n flags may be used in
    target specific ways to represent these different types of address
    classes.  */
 
@@ -440,6 +413,14 @@ enum dynamic_prop_node_kind
   /* A property providing a type's data location.
      Evaluating this field yields to the location of an object's data.  */
   DYN_PROP_DATA_LOCATION,
+
+  /* A property representing DW_AT_allocated.  The presence of this attribute
+     indicates that the object of the type can be allocated/deallocated.  */
+  DYN_PROP_ALLOCATED,
+
+  /* A property representing DW_AT_allocated.  The presence of this attribute
+     indicated that the object of the type can be associated.  */
+  DYN_PROP_ASSOCIATED,
 };
 
 /* * List for dynamic type attributes.  */
@@ -503,7 +484,7 @@ union field_location
      gdbarch_bits_big_endian=0 targets, it is the bit offset to
      the LSB.  */
 
-  int bitpos;
+  LONGEST bitpos;
 
   /* * Enum value.  */
   LONGEST enumval;
@@ -677,7 +658,7 @@ struct main_type
 
      This is used for printing only, except by poorly designed C++ code.
      For looking up a name, look for a symbol in the STRUCT_DOMAIN.
-     One more legitimate use is that if TYPE_FLAG_STUB is set, this is
+     One more legitimate use is that if TYPE_STUB is set, this is
      the name to use to look for definitions in other files.  */
 
   const char *tag_name;
@@ -780,31 +761,23 @@ struct type
      check_typedef.  */
   int instance_flags;
 
-  /* * Length of storage for a value of this type.  This is what
-     sizeof(type) would return; use it for address arithmetic, memory
-     reads and writes, etc.  This size includes padding.  For example,
-     an i386 extended-precision floating point value really only
-     occupies ten bytes, but most ABI's declare its size to be 12
-     bytes, to preserve alignment.  A `struct type' representing such
-     a floating-point type would have a `length' value of 12, even
-     though the last two bytes are unused.
-
-     There's a bit of a host/target mess here, if you're concerned
-     about machines whose bytes aren't eight bits long, or who don't
-     have byte-addressed memory.  Various places pass this to memcpy
-     and such, meaning it must be in units of host bytes.  Various
-     other places expect they can calculate addresses by adding it
-     and such, meaning it must be in units of target bytes.  For
-     some DSP targets, in which HOST_CHAR_BIT will (presumably) be 8
-     and TARGET_CHAR_BIT will be (say) 32, this is a problem.
-
-     One fix would be to make this field in bits (requiring that it
-     always be a multiple of HOST_CHAR_BIT and TARGET_CHAR_BIT) ---
-     the other choice would be to make it consistently in units of
-     HOST_CHAR_BIT.  However, this would still fail to address
-     machines based on a ternary or decimal representation.  */
-  
-  unsigned length;
+  /* * Length of storage for a value of this type.  The value is the
+     expression in host bytes of what sizeof(type) would return.  This
+     size includes padding.  For example, an i386 extended-precision
+     floating point value really only occupies ten bytes, but most
+     ABI's declare its size to be 12 bytes, to preserve alignment.
+     A `struct type' representing such a floating-point type would
+     have a `length' value of 12, even though the last two bytes are
+     unused.
+
+     Since this field is expressed in host bytes, its value is appropriate
+     to pass to memcpy and such (it is assumed that GDB itself always runs
+     on an 8-bits addressable architecture).  However, when using it for
+     target address arithmetic (e.g. adding it to a target address), the
+     type_length_units function should be used in order to get the length
+     expressed in target addressable memory units.  */
+
+  unsigned int length;
 
   /* * Core type, shared by a group of qualified types.  */
 
@@ -953,10 +926,6 @@ struct cplus_struct_type
 
     int is_dynamic : 2;
 
-    /* * Non-zero if this type came from a Java CU.  */
-
-    unsigned int is_java : 1;
-
     /* * The base class which defined the virtual function table pointer.  */
 
     struct type *vptr_basetype;
@@ -1072,12 +1041,12 @@ struct func_type
 
     unsigned int is_noreturn : 1;
 
-    /* * Only those DW_TAG_GNU_call_site's in this function that have
-       DW_AT_GNU_tail_call set are linked in this list.  Function
+    /* * Only those DW_TAG_call_site's in this function that have
+       DW_AT_call_tail_call set are linked in this list.  Function
        without its tail call list complete
-       (DW_AT_GNU_all_tail_call_sites or its superset
-       DW_AT_GNU_all_call_sites) has TAIL_CALL_LIST NULL, even if some
-       DW_TAG_GNU_call_site's exist in such function. */
+       (DW_AT_call_all_tail_calls or its superset
+       DW_AT_call_all_calls) has TAIL_CALL_LIST NULL, even if some
+       DW_TAG_call_site's exist in such function. */
 
     struct call_site *tail_call_list;
 
@@ -1137,13 +1106,12 @@ struct call_site_parameter
 
   union call_site_parameter_u u;
 
-  /* * DW_TAG_formal_parameter's DW_AT_GNU_call_site_value.  It
-     is never NULL.  */
+  /* * DW_TAG_formal_parameter's DW_AT_call_value.  It is never NULL.  */
 
   const gdb_byte *value;
   size_t value_size;
 
-  /* * DW_TAG_formal_parameter's DW_AT_GNU_call_site_data_value.
+  /* * DW_TAG_formal_parameter's DW_AT_call_data_value.
      It may be NULL if not provided by DWARF.  */
 
   const gdb_byte *data_value;
@@ -1151,8 +1119,7 @@ struct call_site_parameter
 };
 
 /* * A place where a function gets called from, represented by
-   DW_TAG_GNU_call_site.  It can be looked up from
-   symtab->call_site_htab.  */
+   DW_TAG_call_site.  It can be looked up from symtab->call_site_htab.  */
 
 struct call_site
   {
@@ -1166,7 +1133,7 @@ struct call_site
 
     struct call_site *tail_call_next;
 
-    /* * Describe DW_AT_GNU_call_site_target.  Missing attribute uses
+    /* * Describe DW_AT_call_target.  Missing attribute uses
        FIELD_LOC_KIND_DWARF_BLOCK with FIELD_DWARF_BLOCK == NULL.  */
 
     struct call_site_target target;
@@ -1180,7 +1147,7 @@ struct call_site
 
     struct dwarf2_per_cu_data *per_cu;
 
-    /* * Describe DW_TAG_GNU_call_site's DW_TAG_formal_parameter.  */
+    /* * Describe DW_TAG_call_site's DW_TAG_formal_parameter.  */
 
     struct call_site_parameter parameter[1];
   };
@@ -1218,9 +1185,9 @@ extern void allocate_gnat_aux_type (stru
 
 #define INIT_FUNC_SPECIFIC(type)					       \
   (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FUNC,			       \
-   TYPE_MAIN_TYPE (type)->type_specific.func_stuff			       \
-     = TYPE_ZALLOC (type,						       \
-		    sizeof (*TYPE_MAIN_TYPE (type)->type_specific.func_stuff)))
+   TYPE_MAIN_TYPE (type)->type_specific.func_stuff = (struct func_type *)      \
+     TYPE_ZALLOC (type,							       \
+		  sizeof (*TYPE_MAIN_TYPE (type)->type_specific.func_stuff)))
 
 #define TYPE_INSTANCE_FLAGS(thistype) (thistype)->instance_flags
 #define TYPE_MAIN_TYPE(thistype) (thistype)->main_type
@@ -1266,6 +1233,12 @@ extern void allocate_gnat_aux_type (stru
 #define TYPE_DATA_LOCATION_KIND(thistype) \
   TYPE_DATA_LOCATION (thistype)->kind
 
+/* Property accessors for the type allocated/associated.  */
+#define TYPE_ALLOCATED_PROP(thistype) \
+  get_dyn_prop (DYN_PROP_ALLOCATED, thistype)
+#define TYPE_ASSOCIATED_PROP(thistype) \
+  get_dyn_prop (DYN_PROP_ASSOCIATED, thistype)
+
 /* Attribute accessors for dynamic properties.  */
 #define TYPE_DYN_PROP_LIST(thistype) \
   TYPE_MAIN_TYPE(thistype)->dyn_prop_list
@@ -1330,7 +1303,6 @@ extern void set_type_vptr_basetype (stru
 #define BASETYPE_VIA_PUBLIC(thistype, index) \
   ((!TYPE_FIELD_PRIVATE(thistype, index)) && (!TYPE_FIELD_PROTECTED(thistype, index)))
 #define TYPE_CPLUS_DYNAMIC(thistype) TYPE_CPLUS_SPECIFIC (thistype)->is_dynamic
-#define TYPE_CPLUS_REALLY_JAVA(thistype) TYPE_CPLUS_SPECIFIC (thistype)->is_java
 
 #define BASETYPE_VIA_VIRTUAL(thistype, index) \
   (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
@@ -1659,19 +1631,44 @@ extern struct gdbarch *get_type_arch (co
 
 extern struct type *get_target_type (struct type *type);
 
+/* Return the equivalent of TYPE_LENGTH, but in number of target
+   addressable memory units of the associated gdbarch instead of bytes.  */
+
+extern unsigned int type_length_units (struct type *type);
+
 /* * Helper function to construct objfile-owned types.  */
 
-extern struct type *init_type (enum type_code, int, int, const char *,
-			       struct objfile *);
+extern struct type *init_type (struct objfile *, enum type_code, int,
+			       const char *);
+extern struct type *init_integer_type (struct objfile *, int, int,
+				       const char *);
+extern struct type *init_character_type (struct objfile *, int, int,
+					 const char *);
+extern struct type *init_boolean_type (struct objfile *, int, int,
+				       const char *);
+extern struct type *init_float_type (struct objfile *, int, const char *,
+				     const struct floatformat **);
+extern struct type *init_decfloat_type (struct objfile *, int, const char *);
+extern struct type *init_complex_type (struct objfile *, const char *,
+				       struct type *);
+extern struct type *init_pointer_type (struct objfile *, int, const char *,
+				       struct type *);
 
 /* Helper functions to construct architecture-owned types.  */
-extern struct type *arch_type (struct gdbarch *, enum type_code, int, char *);
-extern struct type *arch_integer_type (struct gdbarch *, int, int, char *);
-extern struct type *arch_character_type (struct gdbarch *, int, int, char *);
-extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *);
-extern struct type *arch_float_type (struct gdbarch *, int, char *,
+extern struct type *arch_type (struct gdbarch *, enum type_code, int,
+			       const char *);
+extern struct type *arch_integer_type (struct gdbarch *, int, int,
+				       const char *);
+extern struct type *arch_character_type (struct gdbarch *, int, int,
+					 const char *);
+extern struct type *arch_boolean_type (struct gdbarch *, int, int,
+				       const char *);
+extern struct type *arch_float_type (struct gdbarch *, int, const char *,
 				     const struct floatformat **);
-extern struct type *arch_complex_type (struct gdbarch *, char *,
+extern struct type *arch_decfloat_type (struct gdbarch *, int, const char *);
+extern struct type *arch_complex_type (struct gdbarch *, const char *,
+				       struct type *);
+extern struct type *arch_pointer_type (struct gdbarch *, int, const char *,
 				       struct type *);
 
 /* Helper functions to construct a struct or record type.  An
@@ -1681,22 +1678,26 @@ extern struct type *arch_complex_type (s
    field packed against the previous.  */
 
 extern struct type *arch_composite_type (struct gdbarch *gdbarch,
-					 char *name, enum type_code code);
-extern void append_composite_type_field (struct type *t, char *name,
+					 const char *name, enum type_code code);
+extern void append_composite_type_field (struct type *t, const char *name,
 					 struct type *field);
 extern void append_composite_type_field_aligned (struct type *t,
-						 char *name,
+						 const char *name,
 						 struct type *field,
 						 int alignment);
-struct field *append_composite_type_field_raw (struct type *t, char *name,
+struct field *append_composite_type_field_raw (struct type *t, const char *name,
 					       struct type *field);
 
 /* Helper functions to construct a bit flags type.  An initially empty
    type is created using arch_flag_type().  Flags are then added using
-   append_flag_type_flag().  */
+   append_flag_type_field() and append_flag_type_flag().  */
 extern struct type *arch_flags_type (struct gdbarch *gdbarch,
-				     char *name, int length);
-extern void append_flags_type_flag (struct type *type, int bitpos, char *name);
+				     const char *name, int length);
+extern void append_flags_type_field (struct type *type,
+				     int start_bitpos, int nr_bits,
+				     struct type *field_type, const char *name);
+extern void append_flags_type_flag (struct type *type, int bitpos,
+				    const char *name);
 
 extern void make_vector_type (struct type *array_type);
 extern struct type *init_vector_type (struct type *elt_type, int n);
@@ -1812,12 +1813,10 @@ extern void add_dyn_prop
   (enum dynamic_prop_node_kind kind, struct dynamic_prop prop,
    struct type *type, struct objfile *objfile);
 
-extern struct type *check_typedef (struct type *);
+extern void remove_dyn_prop (enum dynamic_prop_node_kind prop_kind,
+                             struct type *type);
 
-#define CHECK_TYPEDEF(TYPE)			\
-  do {						\
-    (TYPE) = check_typedef (TYPE);		\
-  } while (0)
+extern struct type *check_typedef (struct type *);
 
 extern void check_stub_method_group (struct type *, int);
 
@@ -1912,7 +1911,7 @@ extern int field_is_static (struct field
 
 /* printcmd.c */
 
-extern void print_scalar_formatted (const void *, struct type *,
+extern void print_scalar_formatted (const gdb_byte *, struct type *,
 				    const struct value_print_options *,
 				    int, struct ui_file *);
 
@@ -1920,6 +1919,8 @@ extern int can_dereference (struct type 
 
 extern int is_integral_type (struct type *);
 
+extern int is_scalar_type (struct type *type);
+
 extern int is_scalar_type_recursive (struct type *);
 
 extern int class_or_union_p (const struct type *);
@@ -1938,4 +1939,8 @@ extern int types_equal (struct type *, s
 
 extern int types_deeply_equal (struct type *, struct type *);
 
+extern int type_not_allocated (const struct type *type);
+
+extern int type_not_associated (const struct type *type);
+
 #endif /* GDBTYPES_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_usleep.c ./gdb/gdb_usleep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_usleep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_usleep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,8 +18,7 @@
 #include "defs.h"
 #include "gdb_usleep.h"
 #include "gdb_select.h"
-
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 int
 gdb_usleep (int usec)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_usleep.h ./gdb/gdb_usleep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_usleep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_usleep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_vfork.h ./gdb/gdb_vfork.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_vfork.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_vfork.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB-friendly replacement for <vfork.h>.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_wchar.h ./gdb/gdb_wchar.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gdb_wchar.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gdb_wchar.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Wide characters for gdb
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/.gitignore ./gdb/.gitignore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/.gitignore	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/.gitignore	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,8 @@
+/Makefile
+/build-gnulib
+/gdb-gdb.gdb
+/nm.h
+
 /version.c
 /xml-builtin.c
 
@@ -5,6 +10,7 @@
 /ada-lex.c
 /c-exp.c
 /cp-name-parser.c
+/d-exp.c
 /f-exp.c
 /gdb
 /gdbtui
@@ -18,3 +24,4 @@
 /observer.h
 /observer.inc
 /p-exp.c
+/rust-exp.c
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/glibc-tdep.c ./gdb/glibc-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/glibc-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/glibc-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the GNU C Library (glibc).
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/glibc-tdep.h ./gdb/glibc-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/glibc-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/glibc-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the GNU C Library (glibc).
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/aclocal.m4 ./gdb/gnulib/aclocal.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/aclocal.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/aclocal.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1013,6 +1013,7 @@ AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
 m4_include([import/m4/00gnulib.m4])
+m4_include([import/m4/absolute-header.m4])
 m4_include([import/m4/alloca.m4])
 m4_include([import/m4/canonicalize.m4])
 m4_include([import/m4/codeset.m4])
@@ -1028,20 +1029,24 @@ m4_include([import/m4/exponentl.m4])
 m4_include([import/m4/extensions.m4])
 m4_include([import/m4/extern-inline.m4])
 m4_include([import/m4/fcntl-o.m4])
+m4_include([import/m4/flexmember.m4])
 m4_include([import/m4/float_h.m4])
 m4_include([import/m4/fnmatch.m4])
 m4_include([import/m4/fpieee.m4])
 m4_include([import/m4/frexp.m4])
 m4_include([import/m4/frexpl.m4])
+m4_include([import/m4/gettimeofday.m4])
 m4_include([import/m4/glibc21.m4])
 m4_include([import/m4/gnulib-common.m4])
 m4_include([import/m4/gnulib-comp.m4])
+m4_include([import/m4/hard-locale.m4])
 m4_include([import/m4/include_next.m4])
 m4_include([import/m4/inttypes-pri.m4])
 m4_include([import/m4/inttypes.m4])
 m4_include([import/m4/isnand.m4])
 m4_include([import/m4/isnanl.m4])
 m4_include([import/m4/largefile.m4])
+m4_include([import/m4/limits-h.m4])
 m4_include([import/m4/localcharset.m4])
 m4_include([import/m4/locale-fr.m4])
 m4_include([import/m4/locale-ja.m4])
@@ -1062,9 +1067,11 @@ m4_include([import/m4/multiarch.m4])
 m4_include([import/m4/nocrash.m4])
 m4_include([import/m4/off_t.m4])
 m4_include([import/m4/pathmax.m4])
+m4_include([import/m4/rawmemchr.m4])
 m4_include([import/m4/readlink.m4])
 m4_include([import/m4/rename.m4])
 m4_include([import/m4/rmdir.m4])
+m4_include([import/m4/signal_h.m4])
 m4_include([import/m4/ssize_t.m4])
 m4_include([import/m4/stat.m4])
 m4_include([import/m4/stdbool.m4])
@@ -1072,10 +1079,13 @@ m4_include([import/m4/stddef_h.m4])
 m4_include([import/m4/stdint.m4])
 m4_include([import/m4/stdio_h.m4])
 m4_include([import/m4/stdlib_h.m4])
+m4_include([import/m4/strchrnul.m4])
 m4_include([import/m4/string_h.m4])
 m4_include([import/m4/strstr.m4])
 m4_include([import/m4/strtok_r.m4])
+m4_include([import/m4/sys_socket_h.m4])
 m4_include([import/m4/sys_stat_h.m4])
+m4_include([import/m4/sys_time_h.m4])
 m4_include([import/m4/sys_types_h.m4])
 m4_include([import/m4/time_h.m4])
 m4_include([import/m4/unistd_h.m4])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/config.in ./gdb/gnulib/config.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/config.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/config.in	2017-03-06 01:49:07.000000000 +0000
@@ -26,6 +26,9 @@
 /* Define to 1 if using 'alloca.c'. */
 #undef C_ALLOCA
 
+/* Define to 1 if the C locale may have encoding errors. */
+#undef C_LOCALE_MAYBE_EILSEQ
+
 /* Define as the bit index in the word where to find bit 0 of the exponent of
    'double'. */
 #undef DBL_EXPBIT0_BIT
@@ -46,10 +49,26 @@
 /* Define to 1 if // is a file system root distinct from /. */
 #undef DOUBLE_SLASH_IS_DISTINCT_ROOT
 
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+   not. That way, with a declaration like 'struct s { int n; double
+   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+   compilers. When computing the size of such an object, don't use 'sizeof
+   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+   MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
 /* Define to 1 if realpath() can malloc memory, always gives an absolute path,
    and handles trailing slash correctly. */
 #undef FUNC_REALPATH_WORKS
 
+/* Define if gettimeofday clobbers the localtime buffer. */
+#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
+
+/* Define this to 'void' or 'struct timezone' to match the system's
+   declaration of the second argument to gettimeofday. */
+#undef GETTIMEOFDAY_TIMEZONE
+
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module canonicalize-lgpl shall be considered present. */
 #undef GNULIB_CANONICALIZE_LGPL
@@ -58,6 +77,10 @@
    whether the gnulib module fscanf shall be considered present. */
 #undef GNULIB_FSCANF
 
+/* Define to 1 if printf and friends should be labeled with attribute
+   "__gnu_printf__" instead of "__printf__" */
+#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module scanf shall be considered present. */
 #undef GNULIB_SCANF
@@ -78,6 +101,9 @@
 /* Define to 1 when the gnulib module frexpl should be tested. */
 #undef GNULIB_TEST_FREXPL
 
+/* Define to 1 when the gnulib module gettimeofday should be tested. */
+#undef GNULIB_TEST_GETTIMEOFDAY
+
 /* Define to 1 when the gnulib module lstat should be tested. */
 #undef GNULIB_TEST_LSTAT
 
@@ -99,6 +125,9 @@
 /* Define to 1 when the gnulib module memmem should be tested. */
 #undef GNULIB_TEST_MEMMEM
 
+/* Define to 1 when the gnulib module rawmemchr should be tested. */
+#undef GNULIB_TEST_RAWMEMCHR
+
 /* Define to 1 when the gnulib module readlink should be tested. */
 #undef GNULIB_TEST_READLINK
 
@@ -114,15 +143,15 @@
 /* Define to 1 when the gnulib module stat should be tested. */
 #undef GNULIB_TEST_STAT
 
+/* Define to 1 when the gnulib module strchrnul should be tested. */
+#undef GNULIB_TEST_STRCHRNUL
+
 /* Define to 1 when the gnulib module strstr should be tested. */
 #undef GNULIB_TEST_STRSTR
 
 /* Define to 1 when the gnulib module strtok_r should be tested. */
 #undef GNULIB_TEST_STRTOK_R
 
-/* Define to 1 if you have the `alarm' function. */
-#undef HAVE_ALARM
-
 /* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
    may be supplied by this distribution. */
 #undef HAVE_ALLOCA
@@ -140,6 +169,10 @@
 /* Define to 1 if you have the `canonicalize_file_name' function. */
 #undef HAVE_CANONICALIZE_FILE_NAME
 
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
+   */
+#undef HAVE_DECL_ALARM
+
 /* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't.
    */
 #undef HAVE_DECL_DIRFD
@@ -194,6 +227,9 @@
 /* Define to 1 if you have the `getcwd' function. */
 #undef HAVE_GETCWD
 
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -215,6 +251,9 @@
 /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
 #undef HAVE_LANGINFO_CODESET
 
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
 /* Define to 1 if you have the `link' function. */
 #undef HAVE_LINK
 
@@ -258,6 +297,9 @@
 /* Define to 1 if you have the `mprotect' function. */
 #undef HAVE_MPROTECT
 
+/* Define to 1 if you have the `rawmemchr' function. */
+#undef HAVE_RAWMEMCHR
+
 /* Define to 1 if acosf is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ACOSF
 
@@ -502,6 +544,9 @@
 /* Define to 1 if getsubopt is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_GETSUBOPT
 
+/* Define to 1 if gettimeofday is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETTIMEOFDAY
+
 /* Define to 1 if getusershell is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_GETUSERSHELL
 
@@ -700,6 +745,9 @@
 /* Define to 1 if pread is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PREAD
 
+/* Define to 1 if pthread_sigmask is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PTHREAD_SIGMASK
+
 /* Define to 1 if ptsname is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PTSNAME
 
@@ -709,6 +757,9 @@
 /* Define to 1 if pwrite is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PWRITE
 
+/* Define to 1 if qsort_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_QSORT_R
+
 /* Define to 1 if random is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_RANDOM
 
@@ -772,6 +823,9 @@
 /* Define to 1 if scandir is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SCANDIR
 
+/* Define to 1 if secure_getenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SECURE_GETENV
+
 /* Define to 1 if setenv is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SETENV
 
@@ -787,6 +841,30 @@
 /* Define to 1 if setusershell is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SETUSERSHELL
 
+/* Define to 1 if sigaction is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGACTION
+
+/* Define to 1 if sigaddset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGADDSET
+
+/* Define to 1 if sigdelset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGDELSET
+
+/* Define to 1 if sigemptyset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGEMPTYSET
+
+/* Define to 1 if sigfillset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGFILLSET
+
+/* Define to 1 if sigismember is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGISMEMBER
+
+/* Define to 1 if sigpending is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPENDING
+
+/* Define to 1 if sigprocmask is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPROCMASK
+
 /* Define to 1 if sinf is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SINF
 
@@ -1057,12 +1135,18 @@
 /* Define to 1 if 'wint_t' is a signed integer type. */
 #undef HAVE_SIGNED_WINT_T
 
+/* Define to 1 if the system has the type `sigset_t'. */
+#undef HAVE_SIGSET_T
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strchrnul' function. */
+#undef HAVE_STRCHRNUL
+
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
@@ -1087,9 +1171,15 @@
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
 /* Define to 1 if you have the <sys/time.h> header file. */
 #undef HAVE_SYS_TIME_H
 
@@ -1114,6 +1204,9 @@
 /* Define to 1 if you have the <wctype.h> header file. */
 #undef HAVE_WCTYPE_H
 
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
 /* Define if you have the 'wint_t' type. */
 #undef HAVE_WINT_T
 
@@ -1135,6 +1228,9 @@
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
+/* Define to 1 if you have the `_ftime' function. */
+#undef HAVE__FTIME
+
 /* Define as the bit index in the word where to find bit 0 of the exponent of
    'long double'. */
 #undef LDBL_EXPBIT0_BIT
@@ -1152,6 +1248,10 @@
 /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
 #undef MAP_ANONYMOUS
 
+/* Define if the mbrtowc function does not return (size_t) -2 for empty input.
+   */
+#undef MBRTOWC_EMPTY_INPUT_BUG
+
 /* Define if the mbrtowc function has the NULL pwc argument bug. */
 #undef MBRTOWC_NULL_ARG1_BUG
 
@@ -1164,6 +1264,12 @@
 /* Define if the mbrtowc function returns a wrong return value. */
 #undef MBRTOWC_RETVAL_BUG
 
+/* Use GNU style printf and scanf.  */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
@@ -1208,6 +1314,9 @@
    such as on Solaris 9 or cygwin 1.5. */
 #undef RENAME_TRAILING_SLASH_SOURCE_BUG
 
+/* Define to 1 if gnulib's dirfd() replacement is used. */
+#undef REPLACE_DIRFD
+
 /* Define to 1 if stat needs help when passed a directory name with a trailing
    slash */
 #undef REPLACE_FUNC_STAT_DIR
@@ -1238,6 +1347,66 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on macOS.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009.  */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
+   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
 /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
    'wchar_t'. */
 #undef WCHAR_T_SUFFIX
@@ -1258,10 +1427,8 @@
 # endif
 #endif
 
-/* Enable large inode numbers on Mac OS X.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
+/* Enable large inode numbers on Mac OS X 10.5. */
+#undef _DARWIN_USE_64_BIT_INODE
 
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
@@ -1276,6 +1443,9 @@
 /* Define to 1 if on MINIX. */
 #undef _MINIX
 
+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
+#undef _NETBSD_SOURCE
+
 /* The _Noreturn keyword of C11.  */
 #if ! (defined _Noreturn \
        || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
@@ -1297,69 +1467,86 @@
 /* Define to 1 if you need to in order for 'stat' and other things to work. */
 #undef _POSIX_SOURCE
 
-/* Define to 500 only on HP-UX. */
-#undef _XOPEN_SOURCE
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_CONSTANT_MACROS
 
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable general extensions on Mac OS X.  */
-#ifndef _DARWIN_C_SOURCE
-# undef _DARWIN_C_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_LIMIT_MACROS
 
+/* Please see the Gnulib manual for how to use these macros.
 
-/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
-   _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
-   _GL_INLINE_HEADER_BEGIN contains useful stuff to put
-     in an include file, before uses of _GL_INLINE.
-     It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
-     when FOO is an inline function in the header; see
-     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
-   _GL_INLINE_HEADER_END contains useful stuff to put
-     in the same include file, after uses of _GL_INLINE.
-
-   Suppress the use of extern inline on Apple's platforms,
-   as Libc-825.25 (2012-09-19) is incompatible with it; see
-   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
-   Perhaps Apple will fix this some day.  */
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
+     && (defined __header_inline \
+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+            && ! defined __clang__) \
+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
+             && (defined __GNUC__ || defined __cplusplus)) \
+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+                && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
 #if ((__GNUC__ \
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
-      : 199901L <= __STDC_VERSION__) \
-     && !defined __APPLE__)
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !defined __PGI \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline
 # define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
-# if __GNUC_GNU_INLINE__
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
    /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
 #  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
 # else
 #  define _GL_INLINE extern inline
 # endif
 # define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
 #else
 # define _GL_INLINE static _GL_UNUSED
 # define _GL_EXTERN_INLINE static _GL_UNUSED
 #endif
 
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+   suppress bogus "no previous prototype for 'FOO'"
+   and "no previous declaration for 'FOO'" diagnostics,
+   when FOO is an inline function in the header; see
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
 #  define _GL_INLINE_HEADER_CONST_PRAGMA
 # else
@@ -1381,6 +1568,9 @@
 /* Define to a replacement function name for fnmatch(). */
 #undef fnmatch
 
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
@@ -1420,6 +1610,9 @@
 /* Define as a signed type of the same size as size_t. */
 #undef ssize_t
 
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
 /* Define as a marker that can be attached to declarations that might not
     be used.  This helps to reduce warnings, such as from
     GCC -Wunused-parameter.  */
@@ -1432,6 +1625,16 @@
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
 
+/* gcc supports the "unused" attribute on possibly unused labels, and
+   g++ has since version 4.5.  Note to support C++ as well as C,
+   _GL_UNUSED_LABEL should be used with a trailing ;  */
+#if !defined __cplusplus || __GNUC__ > 4 \
+    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
 /* The __pure__ attribute was added in gcc 2.96.  */
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/configure ./gdb/gnulib/configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/configure	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/configure	2017-03-06 01:49:07.000000000 +0000
@@ -656,11 +656,14 @@ NEXT_WCHAR_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
+UNISTD_H_DEFINES_STRUCT_TIMESPEC
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
 TIME_H_DEFINES_STRUCT_TIMESPEC
 NEXT_AS_FIRST_DIRECTIVE_TIME_H
 NEXT_TIME_H
+REPLACE_LOCALTIME
+REPLACE_GMTIME
 REPLACE_TIMEGM
 REPLACE_NANOSLEEP
 REPLACE_MKTIME
@@ -669,6 +672,7 @@ HAVE_TIMEGM
 HAVE_STRPTIME
 HAVE_NANOSLEEP
 HAVE_DECL_LOCALTIME_R
+GNULIB_TIME_RZ
 GNULIB_TIME_R
 GNULIB_TIMEGM
 GNULIB_STRPTIME
@@ -693,11 +697,30 @@ GL_GENERATE_STDDEF_H_FALSE
 GL_GENERATE_STDDEF_H_TRUE
 STDDEF_H
 HAVE_WCHAR_T
+HAVE_MAX_ALIGN_T
 REPLACE_NULL
 HAVE__BOOL
 GL_GENERATE_STDBOOL_H_FALSE
 GL_GENERATE_STDBOOL_H_TRUE
 STDBOOL_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+REPLACE_RAISE
+REPLACE_PTHREAD_SIGMASK
+HAVE_SIGHANDLER_T
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_RAISE
+HAVE_PTHREAD_SIGMASK
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+GNULIB_RAISE
+GNULIB_PTHREAD_SIGMASK
 REPLACE_VSPRINTF
 REPLACE_VSNPRINTF
 REPLACE_VPRINTF
@@ -1012,6 +1035,7 @@ PRIPTR_PREFIX
 PRI_MACROS_BROKEN
 INT64_MAX_EQ_LONG_MAX
 INT32_MAX_LT_INTMAX_MAX
+REPLACE_STRTOUMAX
 REPLACE_STRTOIMAX
 HAVE_DECL_STRTOUMAX
 HAVE_DECL_STRTOIMAX
@@ -1024,6 +1048,9 @@ GNULIB_IMAXABS
 GL_GENERATE_STDINT_H_FALSE
 GL_GENERATE_STDINT_H_TRUE
 STDINT_H
+HAVE_SYS_INTTYPES_H
+HAVE_SYS_BITYPES_H
+HAVE_C99_STDINT_H
 WINT_T_SUFFIX
 WCHAR_T_SUFFIX
 SIG_ATOMIC_T_SUFFIX
@@ -1038,8 +1065,6 @@ BITSIZEOF_SIG_ATOMIC_T
 BITSIZEOF_SIZE_T
 BITSIZEOF_PTRDIFF_T
 APPLE_UNIVERSAL_BUILD
-HAVE_SYS_BITYPES_H
-HAVE_SYS_INTTYPES_H
 HAVE_STDINT_H
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
 NEXT_STDINT_H
@@ -1048,6 +1073,21 @@ HAVE_INTTYPES_H
 HAVE_WCHAR_H
 HAVE_UNSIGNED_LONG_LONG_INT
 HAVE_LONG_LONG_INT
+GL_GENERATE_LIMITS_H_FALSE
+GL_GENERATE_LIMITS_H_TRUE
+LIMITS_H
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
+NEXT_LIMITS_H
+HAVE_WINSOCK2_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
+NEXT_SYS_TIME_H
+REPLACE_STRUCT_TIMEVAL
+REPLACE_GETTIMEOFDAY
+HAVE_TIMEZONE_T
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+HAVE_GETTIMEOFDAY
+GNULIB_GETTIMEOFDAY
 FREXPL_LIBM
 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
 FREXP_LIBM
@@ -1354,6 +1394,7 @@ GNULIB_REWINDDIR
 GNULIB_READDIR
 GNULIB_OPENDIR
 pkglibexecdir
+runstatedir
 lispdir
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
@@ -1362,9 +1403,11 @@ REPLACE_USLEEP
 REPLACE_UNLINKAT
 REPLACE_UNLINK
 REPLACE_TTYNAME_R
+REPLACE_SYMLINKAT
 REPLACE_SYMLINK
 REPLACE_SLEEP
 REPLACE_RMDIR
+REPLACE_READLINKAT
 REPLACE_READLINK
 REPLACE_READ
 REPLACE_PWRITE
@@ -1377,6 +1420,7 @@ REPLACE_ISATTY
 REPLACE_GETPAGESIZE
 REPLACE_GETGROUPS
 REPLACE_GETLOGIN_R
+REPLACE_GETDTABLESIZE
 REPLACE_GETDOMAINNAME
 REPLACE_GETCWD
 REPLACE_FTRUNCATE
@@ -1482,6 +1526,7 @@ REPLACE_SETENV
 REPLACE_REALPATH
 REPLACE_REALLOC
 REPLACE_RANDOM_R
+REPLACE_QSORT_R
 REPLACE_PUTENV
 REPLACE_PTSNAME_R
 REPLACE_PTSNAME
@@ -1499,11 +1544,13 @@ HAVE_STRTOLL
 HAVE_STRTOD
 HAVE_DECL_SETENV
 HAVE_SETENV
+HAVE_SECURE_GETENV
 HAVE_RPMATCH
 HAVE_REALPATH
 HAVE_RANDOM_R
 HAVE_RANDOM_H
 HAVE_RANDOM
+HAVE_QSORT_R
 HAVE_PTSNAME_R
 HAVE_PTSNAME
 HAVE_POSIX_OPENPT
@@ -1526,11 +1573,13 @@ GNULIB_STRTOULL
 GNULIB_STRTOLL
 GNULIB_STRTOD
 GNULIB_SETENV
+GNULIB_SECURE_GETENV
 GNULIB_RPMATCH
 GNULIB_REALPATH
 GNULIB_REALLOC_POSIX
 GNULIB_RANDOM_R
 GNULIB_RANDOM
+GNULIB_QSORT_R
 GNULIB_PUTENV
 GNULIB_PTSNAME_R
 GNULIB_PTSNAME
@@ -1559,12 +1608,6 @@ target_os
 target_vendor
 target_cpu
 target
-RANLIB
-ARFLAGS
-AR
-EGREP
-GREP
-CPP
 host_os
 host_vendor
 host_cpu
@@ -1573,6 +1616,12 @@ build_os
 build_vendor
 build_cpu
 build
+RANLIB
+ARFLAGS
+AR
+EGREP
+GREP
+CPP
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -3268,7 +3317,10 @@ as_fn_append ac_func_list " wmemcpy"
 as_fn_append ac_func_list " wmempcpy"
 as_fn_append ac_header_list " wctype.h"
 gl_fnmatch_required=GNU
-as_fn_append ac_func_list " alarm"
+as_fn_append ac_header_list " sys/time.h"
+as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_func_list " gettimeofday"
+as_fn_append ac_header_list " limits.h"
 as_fn_append ac_header_list " wchar.h"
 as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_header_list " inttypes.h"
@@ -3282,7 +3334,6 @@ as_fn_append ac_header_list " sys/mman.h
 as_fn_append ac_func_list " mprotect"
 as_fn_append ac_func_list " link"
 as_fn_append ac_header_list " sys/stat.h"
-as_fn_append ac_header_list " sys/time.h"
 as_fn_append ac_header_list " features.h"
 as_fn_append ac_func_list " iswcntrl"
 # Check that the precious variables saved in the cache have kept the same
@@ -4146,100 +4197,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -4640,8 +4597,6 @@ done
 
 
 
-
-
   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
   MINIX=yes
@@ -4660,15 +4615,10 @@ fi
 
 $as_echo "#define _MINIX 1" >>confdefs.h
 
-  fi
-
-        case "$host_os" in
-    hpux*)
 
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
 
-      ;;
-  esac
+  fi
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
@@ -4709,8 +4659,77 @@ fi
 
   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
+  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test "${ac_cv_should_define__xopen_source+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_should_define__xopen_source=no
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+          #include <wchar.h>
+          mbstate_t x;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+             #define _XOPEN_SOURCE 500
+             #include <wchar.h>
+             mbstate_t x;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+$as_echo "$ac_cv_should_define__xopen_source" >&6; }
+  test $ac_cv_should_define__xopen_source = yes &&
+    $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+
+
+
+
+
+
+
 
 
 
@@ -4740,14 +4759,19 @@ rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
-  if test -z "$AR"; then
-    if test $gl_cv_c_amsterdam_compiler = yes; then
+
+      if test $gl_cv_c_amsterdam_compiler = yes; then
+    if test -z "$AR"; then
       AR='cc -c.a'
-      if test -z "$ARFLAGS"; then
-        ARFLAGS='-o'
-      fi
-    else
-                  if test -n "$ac_tool_prefix"; then
+    fi
+    if test -z "$ARFLAGS"; then
+      ARFLAGS='-o'
+    fi
+  else
+                                        :
+  fi
+
+        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4839,17 +4863,12 @@ else
   AR="$ac_cv_prog_AR"
 fi
 
-      if test -z "$ARFLAGS"; then
-        ARFLAGS='cru'
-      fi
-    fi
-  else
-    if test -z "$ARFLAGS"; then
-      ARFLAGS='cru'
-    fi
+  if test -z "$ARFLAGS"; then
+    ARFLAGS='cr'
   fi
 
 
+
   if test -z "$RANLIB"; then
     if test $gl_cv_c_amsterdam_compiler = yes; then
       RANLIB=':'
@@ -4950,20 +4969,108 @@ fi
   fi
 
 
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
 
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
 
-
-  # IEEE behaviour is the default on all CPUs except Alpha and SH
-  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
-  # and the GCC 4.1.2 manual).
-  case "$host_cpu" in
-    alpha*)
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+  # IEEE behaviour is the default on all CPUs except Alpha and SH
+  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+  # and the GCC 4.1.2 manual).
+  case "$host_cpu" in
+    alpha*)
       # On Alpha systems, a compiler option provides the behaviour.
       # See the ieee(3) manual page, also available at
       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
@@ -5183,10 +5290,17 @@ rm -rf conftest*
   fi
 
 
+$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
+
 fi
 
 
 
+  # Pre-early section.
+
+
+
+  # Code from module absolute-header:
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module canonicalize-lgpl:
@@ -5199,8 +5313,8 @@ fi
   # Code from module double-slash-root:
   # Code from module errno:
   # Code from module extensions:
-
   # Code from module extern-inline:
+  # Code from module flexmember:
   # Code from module float:
   # Code from module fnmatch:
   # Code from module fnmatch-gnu:
@@ -5209,6 +5323,8 @@ fi
   # Code from module fpucw:
   # Code from module frexp:
   # Code from module frexpl:
+  # Code from module gettimeofday:
+  # Code from module hard-locale:
   # Code from module include_next:
   # Code from module inttypes:
   # Code from module inttypes-incomplete:
@@ -5216,6 +5332,7 @@ fi
   # Code from module isnanl-nolibm:
   # Code from module largefile:
 
+  # Code from module limits-h:
   # Code from module localcharset:
   # Code from module lstat:
   # Code from module malloc-posix:
@@ -5230,10 +5347,12 @@ fi
   # Code from module multiarch:
   # Code from module nocrash:
   # Code from module pathmax:
+  # Code from module rawmemchr:
   # Code from module readlink:
   # Code from module rename:
   # Code from module rmdir:
   # Code from module same-inode:
+  # Code from module signal-h:
   # Code from module snippet/_Noreturn:
   # Code from module snippet/arg-nonnull:
   # Code from module snippet/c++defs:
@@ -5245,6 +5364,7 @@ fi
   # Code from module stdint:
   # Code from module stdio:
   # Code from module stdlib:
+  # Code from module strchrnul:
   # Code from module streq:
   # Code from module string:
   # Code from module strnlen1:
@@ -5252,6 +5372,7 @@ fi
   # Code from module strstr-simple:
   # Code from module strtok_r:
   # Code from module sys_stat:
+  # Code from module sys_time:
   # Code from module sys_types:
   # Code from module time:
   # Code from module unistd:
@@ -6086,11 +6207,13 @@ fi
   GNULIB_PTSNAME=0;
   GNULIB_PTSNAME_R=0;
   GNULIB_PUTENV=0;
+  GNULIB_QSORT_R=0;
   GNULIB_RANDOM=0;
   GNULIB_RANDOM_R=0;
   GNULIB_REALLOC_POSIX=0;
   GNULIB_REALPATH=0;
   GNULIB_RPMATCH=0;
+  GNULIB_SECURE_GETENV=0;
   GNULIB_SETENV=0;
   GNULIB_STRTOD=0;
   GNULIB_STRTOLL=0;
@@ -6113,11 +6236,13 @@ fi
   HAVE_POSIX_OPENPT=1;
   HAVE_PTSNAME=1;
   HAVE_PTSNAME_R=1;
+  HAVE_QSORT_R=1;
   HAVE_RANDOM=1;
   HAVE_RANDOM_H=1;
   HAVE_RANDOM_R=1;
   HAVE_REALPATH=1;
   HAVE_RPMATCH=1;
+  HAVE_SECURE_GETENV=1;
   HAVE_SETENV=1;
   HAVE_DECL_SETENV=1;
   HAVE_STRTOD=1;
@@ -6135,6 +6260,7 @@ fi
   REPLACE_PTSNAME=0;
   REPLACE_PTSNAME_R=0;
   REPLACE_PUTENV=0;
+  REPLACE_QSORT_R=0;
   REPLACE_RANDOM_R=0;
   REPLACE_REALLOC=0;
   REPLACE_REALPATH=0;
@@ -6324,11 +6450,12 @@ nocrash_init (void)
 #else
 /* Avoid a crash on POSIX systems.  */
 #include <signal.h>
+#include <unistd.h>
 /* A POSIX signal handler.  */
 static void
 exception_handler (int sig)
 {
-  exit (1);
+  _exit (1);
 }
 static void
 nocrash_init (void)
@@ -6354,22 +6481,27 @@ main ()
           char *name = realpath ("conftest.a", NULL);
           if (!(name && *name == '/'))
             result |= 1;
+          free (name);
         }
         {
           char *name = realpath ("conftest.b/../conftest.a", NULL);
           if (name != NULL)
             result |= 2;
+          free (name);
         }
         {
           char *name = realpath ("conftest.a/", NULL);
           if (name != NULL)
             result |= 4;
+          free (name);
         }
         {
           char *name1 = realpath (".", NULL);
           char *name2 = realpath ("conftest.d//./..", NULL);
-          if (strcmp (name1, name2) != 0)
+          if (! name1 || ! name2 || strcmp (name1, name2))
             result |= 8;
+          free (name1);
+          free (name2);
         }
         return result;
 
@@ -6526,6 +6658,7 @@ done
   REPLACE_FTRUNCATE=0;
   REPLACE_GETCWD=0;
   REPLACE_GETDOMAINNAME=0;
+  REPLACE_GETDTABLESIZE=0;
   REPLACE_GETLOGIN_R=0;
   REPLACE_GETGROUPS=0;
   REPLACE_GETPAGESIZE=0;
@@ -6538,9 +6671,11 @@ done
   REPLACE_PWRITE=0;
   REPLACE_READ=0;
   REPLACE_READLINK=0;
+  REPLACE_READLINKAT=0;
   REPLACE_RMDIR=0;
   REPLACE_SLEEP=0;
   REPLACE_SYMLINK=0;
+  REPLACE_SYMLINKAT=0;
   REPLACE_TTYNAME_R=0;
   REPLACE_UNLINK=0;
   REPLACE_UNLINKAT=0;
@@ -6786,36 +6921,40 @@ if test "${gl_cv_next_errno_h+set}" = se
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <errno.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'errno.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'errno.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_errno_h
+           gl_cv_next_errno_h='"'$gl_header'"'
 
 
 fi
@@ -7414,7 +7553,16 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
 
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
@@ -7458,192 +7606,624 @@ fi
   fi
 
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_type_unsigned_long_long_int=yes
-     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+typedef int *int_ptr;
+	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
+	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+	   int bar (int ip[$ac_kw]) { return ip[0]; }
 
-  /* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;
 int
 main ()
 {
-/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));
+int s[1];
+	   int *$ac_kw t = s;
+	   t[0] = 0;
+	   return foo (t) + bar (t);
+
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
-  ac_cv_type_unsigned_long_long_int=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-     fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
 
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
 
-  fi
 
+  GNULIB_GETTIMEOFDAY=0;
+    HAVE_GETTIMEOFDAY=1;
+  HAVE_STRUCT_TIMEVAL=1;
+  HAVE_SYS_TIME_H=1;
+  HAVE_TIMEZONE_T=0;
+  REPLACE_GETTIMEOFDAY=0;
+  REPLACE_STRUCT_TIMEVAL=0;
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_type_long_long_int=yes
-      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
-        if test $ac_cv_type_long_long_int = yes; then
-                                        if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-                 #ifndef LLONG_MAX
-                 # define HALF \
-                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-                 # define LLONG_MAX (HALF - 1 + HALF)
-                 #endif
-int
-main ()
-{
-long long int n = 1;
-                 int i;
-                 for (i = 0; ; i++)
-                   {
-                     long long int m = n << i;
-                     if (m >> i != n)
-                       return 1;
-                     if (LLONG_MAX / 2 < m)
-                       break;
-                   }
-                 return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
 
-else
-  ac_cv_type_long_long_int=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-        fi
-      fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
-  if test $ac_cv_type_long_long_int = yes; then
 
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
-  fi
 
 
 
 
 
 
-    gl_cv_c_multiarch=no
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_time_h='<'sys/time.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_time_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
-
+#include <sys/time.h>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-               arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/time.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_sys_time_h
+           gl_cv_next_sys_time_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_time_h='<'sys/time.h'>'
              fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  if test $gl_cv_c_multiarch = yes; then
-    APPLE_UNIVERSAL_BUILD=1
-  else
-    APPLE_UNIVERSAL_BUILD=0
-  fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+     fi
+     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
 
 
 
-  if test $ac_cv_type_long_long_int = yes; then
-    HAVE_LONG_LONG_INT=1
-  else
-    HAVE_LONG_LONG_INT=0
-  fi
 
 
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    HAVE_UNSIGNED_LONG_LONG_INT=1
-  else
-    HAVE_UNSIGNED_LONG_LONG_INT=0
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
   fi
 
 
 
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
-  else
-    HAVE_WCHAR_H=0
-  fi
+
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+            #if HAVE_WINSOCK2_H
+            # include <winsock2.h>
+            #endif
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval=yes
+else
+  gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  else
+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
+$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
+if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+               #include <sys/time.h>
+              #endif
+              #include <time.h>
+              #if HAVE_WINSOCK2_H
+              # include <winsock2.h>
+              #endif
+
+int
+main ()
+{
+static struct timeval x;
+              typedef int verify_tv_sec_type[
+                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+              ];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval_tv_sec=yes
+else
+  gl_cv_sys_struct_timeval_tv_sec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
+$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
+    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
+      REPLACE_STRUCT_TIMEVAL=1
+    fi
+  fi
+
+
+    for gl_func in gettimeofday; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval as_val=\$$as_gl_Symbol
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_limits_h='<'limits.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+$as_echo_n "checking absolute name of <limits.h>... " >&6; }
+if test "${gl_cv_next_limits_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_limits_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'limits.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_limits_h
+           gl_cv_next_limits_h='"'$gl_header'"'
+          else
+               gl_cv_next_limits_h='<'limits.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+$as_echo "$gl_cv_next_limits_h" >&6; }
+     fi
+     NEXT_LIMITS_H=$gl_cv_next_limits_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'limits.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_limits_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
+$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
+if test "${gl_cv_header_limits_width+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+                          #endif
+                          #include <limits.h>
+                          int ullw = ULLONG_WIDTH;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_limits_width=yes
+else
+  gl_cv_header_limits_width=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
+$as_echo "$gl_cv_header_limits_width" >&6; }
+  if test "$gl_cv_header_limits_width" = yes; then
+    LIMITS_H=
+  else
+    LIMITS_H=limits.h
+  fi
+
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
+int
+main ()
+{
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+    gl_cv_c_multiarch=no
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+         not a universal capable compiler
+        #endif
+        typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+               arch=
+     prev=
+     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+       if test -n "$prev"; then
+         case $word in
+           i?86 | x86_64 | ppc | ppc64)
+             if test -z "$arch" || test "$arch" = "$word"; then
+               arch="$word"
+             else
+               gl_cv_c_multiarch=yes
+             fi
+             ;;
+         esac
+         prev=
+       else
+         if test "x$word" = "x-arch"; then
+           prev=arch
+         fi
+       fi
+     done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test $gl_cv_c_multiarch = yes; then
+    APPLE_UNIVERSAL_BUILD=1
+  else
+    APPLE_UNIVERSAL_BUILD=0
+  fi
+
+
+
+
+
+
+
+  if test $ac_cv_type_long_long_int = yes; then
+    HAVE_LONG_LONG_INT=1
+  else
+    HAVE_LONG_LONG_INT=0
+  fi
+
+
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    HAVE_UNSIGNED_LONG_LONG_INT=1
+  else
+    HAVE_UNSIGNED_LONG_LONG_INT=0
+  fi
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
 
 
       if test $ac_cv_header_inttypes_h = yes; then
@@ -7681,36 +8261,40 @@ else
              if test $ac_cv_header_stdint_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdint.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'stdint.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdint.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_stdint_h
+           gl_cv_next_stdint_h='"'$gl_header'"'
           else
                gl_cv_next_stdint_h='<'stdint.h'>'
              fi
@@ -7753,6 +8337,8 @@ else
 
 
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
@@ -7843,6 +8429,15 @@ uintptr_t h = UINTPTR_MAX;
 intmax_t i = INTMAX_MAX;
 uintmax_t j = UINTMAX_MAX;
 
+/* Check that SIZE_MAX has the correct type, if possible.  */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+       || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
 #include <limits.h> /* for CHAR_BIT */
 #define TYPE_MINIMUM(t) \
   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
@@ -7921,6 +8516,8 @@ else
 
 
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 
 
@@ -8006,8 +8603,111 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
   fi
+
+  HAVE_C99_STDINT_H=0
+  HAVE_SYS_BITYPES_H=0
+  HAVE_SYS_INTTYPES_H=0
+  STDINT_H=stdint.h
   if test "$gl_cv_header_working_stdint_h" = yes; then
-    STDINT_H=
+    HAVE_C99_STDINT_H=1
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
+$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
+if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_stdint_predates_cxx11_h=yes
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_predates_cxx11_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
+$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
+
+    if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+
+$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
+
+
+$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
+$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
+if test "${gl_cv_header_stdint_width+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_stdint_width=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+            #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+            #endif
+            #include <stdint.h>
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+            int iw = UINTMAX_WIDTH;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_width=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
+$as_echo "$gl_cv_header_stdint_width" >&6; }
+    if test "$gl_cv_header_stdint_width" = yes; then
+      STDINT_H=
+    fi
   else
             for ac_header in sys/inttypes.h sys/bitypes.h
 do :
@@ -8025,19 +8725,12 @@ done
 
     if test $ac_cv_header_sys_inttypes_h = yes; then
       HAVE_SYS_INTTYPES_H=1
-    else
-      HAVE_SYS_INTTYPES_H=0
     fi
-
     if test $ac_cv_header_sys_bitypes_h = yes; then
       HAVE_SYS_BITYPES_H=1
-    else
-      HAVE_SYS_BITYPES_H=0
     fi
 
 
-
-
   if test $APPLE_UNIVERSAL_BUILD = 0; then
 
 
@@ -8335,9 +9028,23 @@ _ACEOF
     BITSIZEOF_WINT_T=32
   fi
 
-    STDINT_H=stdint.h
   fi
 
+  # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+  LIMITS_H=limits.h
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
+
+
+
+
    if test -n "$STDINT_H"; then
   GL_GENERATE_STDINT_H_TRUE=
   GL_GENERATE_STDINT_H_FALSE='#'
@@ -8359,6 +9066,7 @@ fi
   HAVE_DECL_STRTOIMAX=1;
   HAVE_DECL_STRTOUMAX=1;
   REPLACE_STRTOIMAX=0;
+  REPLACE_STRTOUMAX=0;
   INT32_MAX_LT_INTMAX_MAX=1;
   INT64_MAX_EQ_LONG_MAX='defined _LP64';
   PRI_MACROS_BROKEN=0;
@@ -8392,36 +9100,40 @@ else
              if test $ac_cv_header_inttypes_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <inttypes.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'inttypes.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'inttypes.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_inttypes_h
+           gl_cv_next_inttypes_h='"'$gl_header'"'
           else
                gl_cv_next_inttypes_h='<'inttypes.h'>'
              fi
@@ -9443,14 +10155,15 @@ if test "${gl_cv_func_lstat_dereferences
 else
   rm -f conftest.sym conftest.file
      echo >conftest.file
-     if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
-       if test "$cross_compiling" = yes; then :
+     if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                    # Guess yes on glibc systems.
-            *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-                    # If we don't know, assume the worst.
-            *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
-          esac
+          *-gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *)
+            # If we don't know, assume the worst.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+        esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9460,10 +10173,12 @@ int
 main ()
 {
 struct stat sbuf;
-              /* Linux will dereference the symlink and fail, as required by
-                 POSIX.  That is better in the sense that it means we will not
-                 have to compile and use the lstat wrapper.  */
-              return lstat ("conftest.sym/", &sbuf) == 0;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
 
   ;
   return 0;
@@ -9478,11 +10193,6 @@ rm -f core *.core core.conftest.* gmon.o
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-     else
-       # If the 'ln -s' command failed, then we probably don't even
-       # have an lstat function.
-       gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
-     fi
      rm -f conftest.sym conftest.file
 
 fi
@@ -9571,7 +10281,10 @@ else
 int
 main ()
 {
-return ! malloc (0);
+char *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;
   ;
   return 0;
 }
@@ -10698,6 +11411,89 @@ fi
 
 
 
+
+  GNULIB_PTHREAD_SIGMASK=0;
+  GNULIB_RAISE=0;
+  GNULIB_SIGNAL_H_SIGPIPE=0;
+  GNULIB_SIGPROCMASK=0;
+  GNULIB_SIGACTION=0;
+    HAVE_POSIX_SIGNALBLOCKING=1;
+  HAVE_PTHREAD_SIGMASK=1;
+  HAVE_RAISE=1;
+  HAVE_SIGSET_T=1;
+  HAVE_SIGINFO_T=1;
+  HAVE_SIGACTION=1;
+  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+  HAVE_SIGHANDLER_T=1;
+  REPLACE_PTHREAD_SIGMASK=0;
+  REPLACE_RAISE=0;
+
+
+  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+      #include <signal.h>
+      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+      #include <sys/types.h>
+
+"
+if test "x$ac_cv_type_sigset_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+  gl_cv_type_sigset_t=no
+fi
+
+  if test $gl_cv_type_sigset_t != yes; then
+    HAVE_SIGSET_T=0
+  fi
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
 if test "${ac_cv_header_stdbool_h+set}" = set; then :
@@ -10707,59 +11503,67 @@ else
 /* end confdefs.h.  */
 
              #include <stdbool.h>
-             #ifndef bool
-              "error: bool is not defined"
-             #endif
-             #ifndef false
-              "error: false is not defined"
-             #endif
-             #if false
-              "error: false is not 0"
-             #endif
-             #ifndef true
-              "error: true is not defined"
-             #endif
-             #if true != 1
-              "error: true is not 1"
+
+             #ifdef __cplusplus
+              typedef bool Bool;
+             #else
+              typedef _Bool Bool;
+              #ifndef bool
+               "error: bool is not defined"
+              #endif
+              #ifndef false
+               "error: false is not defined"
+              #endif
+              #if false
+               "error: false is not 0"
+              #endif
+              #ifndef true
+               "error: true is not defined"
+              #endif
+              #if true != 1
+               "error: true is not 1"
+              #endif
              #endif
+
              #ifndef __bool_true_false_are_defined
               "error: __bool_true_false_are_defined is not defined"
              #endif
 
-             struct s { _Bool s: 1; _Bool t; } s;
+             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
 
              char a[true == 1 ? 1 : -1];
              char b[false == 0 ? 1 : -1];
              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
              char d[(bool) 0.5 == true ? 1 : -1];
              /* See body of main program for 'e'.  */
-             char f[(_Bool) 0.0 == false ? 1 : -1];
+             char f[(Bool) 0.0 == false ? 1 : -1];
              char g[true];
-             char h[sizeof (_Bool)];
+             char h[sizeof (Bool)];
              char i[sizeof s.t];
              enum { j = false, k = true, l = false * true, m = true * 256 };
              /* The following fails for
                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             _Bool n[m];
+             Bool n[m];
              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
              /* Catch a bug in an HP-UX C compiler.  See
                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
               */
-             _Bool q = true;
-             _Bool *pq = &q;
+             Bool q = true;
+             Bool *pq = &q;
+             bool *qq = &q;
 
 int
 main ()
 {
 
              bool e = &s;
-             *pq |= q;
-             *pq |= ! q;
+             *pq |= q; *pq |= ! q;
+             *qq |= q; *qq |= ! q;
              /* Refer to every declared value, to avoid compiler optimizations.  */
              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq);
+                     + !m + !n + !o + !p + !q + !pq + !qq);
 
   ;
   return 0;
@@ -10787,6 +11591,7 @@ fi
 
 
     REPLACE_NULL=0;
+  HAVE_MAX_ALIGN_T=1;
   HAVE_WCHAR_T=1;
 
 
@@ -10822,52 +11627,6 @@ fi
 
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
-$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
-if test "${ac_cv_c_restrict+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-typedef int * int_ptr;
-	int foo (int_ptr $ac_kw ip) {
-	return ip[0];
-       }
-int
-main ()
-{
-int s[1];
-	int * $ac_kw t = s;
-	t[0] = 0;
-	return foo(t)
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_restrict=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     test "$ac_cv_c_restrict" != no && break
-   done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
-$as_echo "$ac_cv_c_restrict" >&6; }
-
- case $ac_cv_c_restrict in
-   restrict) ;;
-   no) $as_echo "#define restrict /**/" >>confdefs.h
- ;;
-   *)  cat >>confdefs.h <<_ACEOF
-#define restrict $ac_cv_c_restrict
-_ACEOF
- ;;
- esac
-
 
 
 
@@ -10888,36 +11647,40 @@ if test "${gl_cv_next_string_h+set}" = s
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <string.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'string.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'string.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_string_h
+           gl_cv_next_string_h='"'$gl_header'"'
 
 
 fi
@@ -11170,16 +11933,85 @@ fi
 
 
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = x""yes; then :
 
-else
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
 
-fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_types_h='<'sys/types.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
+$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
+if test "${gl_cv_next_sys_types_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/types.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_sys_types_h
+           gl_cv_next_sys_types_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
+$as_echo "$gl_cv_next_sys_types_h" >&6; }
+     fi
+     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/types.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
+
+
+
+
 
 
 
@@ -11193,6 +12025,7 @@ fi
   GNULIB_STRPTIME=0;
   GNULIB_TIMEGM=0;
   GNULIB_TIME_R=0;
+  GNULIB_TIME_RZ=0;
     HAVE_DECL_LOCALTIME_R=1;
   HAVE_NANOSLEEP=1;
   HAVE_STRPTIME=1;
@@ -11202,7 +12035,9 @@ fi
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
   REPLACE_TIMEGM=GNULIB_PORTCHECK;
 
-
+      : ${GNULIB_GETTIMEOFDAY=0};
+        REPLACE_GMTIME=0;
+  REPLACE_LOCALTIME=0;
 
 
 
@@ -11236,6 +12071,7 @@ fi
   TIME_H_DEFINES_STRUCT_TIMESPEC=0
   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
     TIME_H_DEFINES_STRUCT_TIMESPEC=1
   else
@@ -11296,6 +12132,36 @@ fi
 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
+$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_unistd_h=yes
+else
+  gl_cv_sys_struct_timespec_in_unistd_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
+        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+        fi
       fi
     fi
   fi
@@ -11314,6 +12180,7 @@ fi
 
 
 
+
      if test $gl_cv_have_include_next = yes; then
        gl_cv_next_time_h='<'time.h'>'
      else
@@ -11323,36 +12190,40 @@ if test "${gl_cv_next_time_h+set}" = set
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <time.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'time.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'time.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_time_h
+           gl_cv_next_time_h='"'$gl_header'"'
 
 
 fi
@@ -11398,12 +12269,13 @@ extern int zero (void);
 int main () { return zero(); }
 
 _ACEOF
+                              save_ac_compile="$ac_compile"
+     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-       mv conftest.$ac_objext conftest1.$ac_objext
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -11419,12 +12291,12 @@ _ACEOF
 int zero (void) { return 0; }
 
 _ACEOF
+              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-         mv conftest.$ac_objext conftest2.$ac_objext
          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
            :
          else
@@ -11432,6 +12304,7 @@ _ACEOF
          fi
        fi
      fi
+     ac_compile="$save_ac_compile"
      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
 
 fi
@@ -11713,6 +12586,10 @@ _ACEOF
     localedir='${datarootdir}/locale'
 
   fi
+    if test "x$runstatedir" = x; then
+    runstatedir='${localstatedir}/run'
+
+  fi
 
       pkglibexecdir='${libexecdir}/${PACKAGE}'
 
@@ -11741,36 +12618,40 @@ else
              if test $ac_cv_header_dirent_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <dirent.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'dirent.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'dirent.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_dirent_h
+           gl_cv_next_dirent_h='"'$gl_header'"'
           else
                gl_cv_next_dirent_h='<'dirent.h'>'
              fi
@@ -11902,15 +12783,19 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
 
-  # Use the replacement only if we have no function or macro with that name.
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
-    if test $ac_cv_have_decl_dirfd = yes; then
-      # If the system declares dirfd already, let's declare rpl_dirfd instead.
+  # Use the replacement if we have no function or macro with that name,
+  # or if OS/2 kLIBC whose dirfd() does not work.
+  # Replace only if the system declares dirfd already.
+  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+    no,no,*,yes | *,*,os2*,yes)
       REPLACE_DIRFD=1
-    fi
-  fi
 
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
+;;
+  esac
+
+  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+     || test $REPLACE_DIRFD = 1; then
 
 
 
@@ -12032,6 +12917,50 @@ fi
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+            #include <stdio.h>
+            #include <stddef.h>
+            struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
+            nbytes += sizeof (struct s) - 1;
+            nbytes -= nbytes % sizeof (struct s);
+            struct s *p = malloc (nbytes);
+            p->d[0] = 0.0;
+            return p->d != (double *) NULL;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_flexmember=yes
+else
+  ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+  if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+  else
+    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+  fi
+
+
 
 
   FLOAT_H=
@@ -12161,36 +13090,40 @@ if test "${gl_cv_next_float_h+set}" = se
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <float.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'float.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'float.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_float_h
+           gl_cv_next_float_h='"'$gl_header'"'
 
 
 fi
@@ -12528,7 +13461,8 @@ else
 #include <float.h>
 #include <math.h>
 #include <string.h>
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
+# include <signal.h>
 # include <unistd.h>
 #endif
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
@@ -12551,9 +13485,10 @@ int main()
   int i;
   volatile double x;
   double zero = 0.0;
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
      number.  Let the test fail in this case.  */
+  signal (SIGALRM, SIG_DFL);
   alarm (5);
 #endif
   /* Test on denormalized numbers.  */
@@ -12892,23 +13827,227 @@ fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
+
+  fi
+
+
+
+
+
+          GNULIB_FREXPL=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+  gl_gettimeofday_timezone=void
+  if test $ac_cv_func_gettimeofday != yes; then
+    HAVE_GETTIMEOFDAY=0
+  else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
+$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  # When cross-compiling:
+      case "$host_os" in
+                # Guess all is fine on glibc systems.
+        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+                # If we don't know, assume the worst.
+        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+      esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+          #include <sys/time.h>
+          #include <time.h>
+          #include <stdlib.h>
+
+int
+main ()
+{
+
+          time_t t = 0;
+          struct tm *lt;
+          struct tm saved_lt;
+          struct timeval tv;
+          lt = localtime (&t);
+          saved_lt = *lt;
+          gettimeofday (&tv, NULL);
+          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_gettimeofday_clobber=no
+else
+  gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ case "$gl_cv_func_gettimeofday_clobber" in
+   *yes)
+     REPLACE_GETTIMEOFDAY=1
+
+  REPLACE_GMTIME=1
+  REPLACE_LOCALTIME=1
+
+
+$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+     ;;
+ esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+              struct timeval c;
+              int gettimeofday (struct timeval *restrict, void *restrict);
+
+int
+main ()
+{
+/* glibc uses struct timezone * rather than the POSIX void *
+                 if _GNU_SOURCE is defined.  However, since the only portable
+                 use of gettimeofday uses NULL as the second parameter, and
+                 since the glibc definition is actually more typesafe, it is
+                 not worth wrapping this to get a compliant signature.  */
+              int (*f) (struct timeval *restrict, void *restrict)
+                = gettimeofday;
+              int x = f (&c, 0);
+              return !(x | c.tv_sec | c.tv_usec);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_gettimeofday_posix_signature=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_gettimeofday_posix_signature=almost
+else
+  gl_cv_func_gettimeofday_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+      gl_gettimeofday_timezone='struct timezone'
+    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+        if test $REPLACE_STRUCT_TIMEVAL = 1; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
+_ACEOF
+
+
+  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+  for ac_header in sys/timeb.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in _ftime
+do :
+  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+  fi
+
 
-  fi
 
 
 
+          GNULIB_GETTIMEOFDAY=1
 
 
-          GNULIB_FREXPL=1
 
 
 
+$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
 
 
-$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
 
 
+  :
 
 
 
@@ -13276,17 +14415,7 @@ if test "${gl_cv_func_isnanl_works+set}"
 else
 
       if test "$cross_compiling" = yes; then :
-  case "$host_cpu" in
-                                 # Guess no on ia64, x86_64, i386.
-           ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
-           *)
-             case "$host_os" in
-               netbsd*) gl_cv_func_isnanl_works="guessing no";;
-               *)       gl_cv_func_isnanl_works="guessing yes";;
-             esac
-             ;;
-         esac
-
+  gl_cv_func_isnanl_works="guessing yes"
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -13345,7 +14474,7 @@ int main ()
 # ifdef WORDS_BIGENDIAN
 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
-       ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
+       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
        (unsigned int) (mantlo) << 16                                        \
      }
 # else
@@ -13365,41 +14494,35 @@ int main ()
     if (!isnanl (x.value))
       result |= 2;
   }
-  /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
-     Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
-       Intel IA-64 Architecture Software Developer's Manual, Volume 1:
-       Application Architecture.
-       Table 5-2 "Floating-Point Register Encodings"
-       Figure 5-6 "Memory to Floating-Point Register Data Translation"
-   */
+  /* isnanl should return something even for noncanonical values.  */
   { /* Pseudo-NaN.  */
     static memory_long_double x =
       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 4;
   }
   { /* Pseudo-Infinity.  */
     static memory_long_double x =
       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 8;
   }
   { /* Pseudo-Zero.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 16;
   }
   { /* Unnormalized number.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 32;
   }
   { /* Pseudo-Denormal.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 64;
   }
 #endif
@@ -13569,6 +14692,7 @@ _ACEOF
 
 
 
+
   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
 
 
@@ -13678,36 +14802,40 @@ else
              if test $ac_cv_header_math_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <math.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'math.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'math.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_math_h
+           gl_cv_next_math_h='"'$gl_header'"'
           else
                gl_cv_next_math_h='<'math.h'>'
              fi
@@ -14367,6 +15495,103 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
 
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
+$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
+if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and glibc systems.
+        aix* | *-gnu*)
+                    gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+        *)          gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+      esac
+      if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+           #include <wchar.h>
+           static wchar_t wc;
+           static mbstate_t mbs;
+           int
+           main (void)
+           {
+             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+           }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_empty_input=yes
+else
+  gl_cv_func_mbrtowc_empty_input=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
+$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
+if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+     if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
+
+int
+main ()
+{
+
+            int i;
+            char *locale = setlocale (LC_ALL, "C");
+            if (! locale)
+              return 1;
+            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+              {
+                char c = i;
+                wchar_t wc;
+                mbstate_t mbs = { 0, };
+                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+                if (1 < ss)
+                  return 1;
+              }
+            return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_C_locale_sans_EILSEQ=yes
+else
+  gl_cv_C_locale_sans_EILSEQ=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
+$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
+
       case "$gl_cv_func_mbrtowc_null_arg1" in
         *yes) ;;
         *)
@@ -14399,6 +15624,22 @@ fi
            REPLACE_MBRTOWC=1
            ;;
       esac
+      case "$gl_cv_func_mbrtowc_empty_input" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case $gl_cv_C_locale_sans_EILSEQ in
+        *yes) ;;
+        *)
+$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
     fi
   fi
 
@@ -15087,7 +16328,7 @@ else
 #include <string.h> /* for memmem */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 
 int
 main ()
@@ -15294,6 +16535,53 @@ fi
 
 
 
+
+  for ac_func in rawmemchr
+do :
+  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
+if test "x$ac_cv_func_rawmemchr" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_RAWMEMCHR 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_rawmemchr = no; then
+    HAVE_RAWMEMCHR=0
+  fi
+
+  if test $HAVE_RAWMEMCHR = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+          GNULIB_RAWMEMCHR=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
+
+
+
+
+
+
   if test $ac_cv_func_readlink = no; then
     HAVE_READLINK=0
   else
@@ -15810,6 +17098,152 @@ fi
 
 
 
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_signal_h='<'signal.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if test "${gl_cv_next_signal_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <signal.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'signal.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_signal_h
+           gl_cv_next_signal_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+     fi
+     NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'signal.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_signal_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
+  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+
+else
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_sighandler_t" = x""yes; then :
+
+else
+  HAVE_SIGHANDLER_T=0
+fi
+
+
+
+    for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <signal.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval as_val=\$$as_gl_Symbol
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
 $as_echo_n "checking for ssize_t... " >&6; }
 if test "${gt_cv_ssize_t+set}" = set; then :
@@ -16005,6 +17439,15 @@ fi
 
 
   STDDEF_H=
+  ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
+
+"
+if test "x$ac_cv_type_max_align_t" = x""yes; then :
+
+else
+  HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+fi
+
   if test $gt_cv_c_wchar_t = no; then
     HAVE_WCHAR_T=0
     STDDEF_H=stddef.h
@@ -16067,36 +17510,40 @@ if test "${gl_cv_next_stddef_h+set}" = s
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stddef.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'stddef.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stddef.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_stddef_h
+           gl_cv_next_stddef_h='"'$gl_header'"'
 
 
 fi
@@ -16122,6 +17569,9 @@ fi
 
 
 
+  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+
 
 
 
@@ -16139,36 +17589,40 @@ if test "${gl_cv_next_stdio_h+set}" = se
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdio.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'stdio.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdio.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_stdio_h
+           gl_cv_next_stdio_h='"'$gl_header'"'
 
 
 fi
@@ -16190,6 +17644,48 @@ fi
 
 
 
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
+$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
+if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #define __STDC_FORMAT_MACROS 1
+       #include <stdio.h>
+       #include <inttypes.h>
+       /* For non-mingw systems, compilation will trivially succeed.
+          For mingw, compilation will succeed for older mingw (system
+          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+       #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_printf_attribute_flavor=system
+else
+  gl_cv_func_printf_attribute_flavor=gnu
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
+$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
+  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+
+$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
+
+  fi
+
       GNULIB_FSCANF=1
 
 
@@ -16287,36 +17783,40 @@ if test "${gl_cv_next_stdlib_h+set}" = s
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'stdlib.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdlib.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_stdlib_h
+           gl_cv_next_stdlib_h='"'$gl_header'"'
 
 
 fi
@@ -16339,7 +17839,7 @@ fi
 
 
 
-    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r random random_r realpath rpmatch     setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
+    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch     secure_getenv setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
@@ -16390,6 +17890,115 @@ fi
 
 
 
+  for ac_func in strchrnul
+do :
+  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
+if test "x$ac_cv_func_strchrnul" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCHRNUL 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strchrnul = no; then
+    HAVE_STRCHRNUL=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
+$as_echo_n "checking whether strchrnul works... " >&6; }
+if test "${gl_cv_func_strchrnul_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strchrnul_works="guessing yes"
+else
+  gl_cv_func_strchrnul_works="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strchrnul */
+
+int
+main ()
+{
+const char *buf = "a";
+      return strchrnul (buf, 'b') != buf + 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strchrnul_works=yes
+else
+  gl_cv_func_strchrnul_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
+$as_echo "$gl_cv_func_strchrnul_works" >&6; }
+    case "$gl_cv_func_strchrnul_works" in
+      *yes) ;;
+      *) REPLACE_STRCHRNUL=1 ;;
+    esac
+  fi
+
+  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+          GNULIB_STRCHRNUL=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
+
+
+
+
+
+
+
 
   if test $REPLACE_STRSTR = 0; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
@@ -16430,11 +18039,17 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+   restrictions on its LE runtime), which prevents us from limiting the
+   running time of this test.  */
+# error "This test does not work properly on z/OS"
+#endif
 #include <signal.h> /* for signal */
 #include <string.h> /* for strstr */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 
 int
 main ()
@@ -16744,36 +18359,40 @@ else
              if test $ac_cv_header_sys_stat_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/stat.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'sys/stat.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/stat.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_sys_stat_h
+           gl_cv_next_sys_stat_h='"'$gl_header'"'
           else
                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
              fi
@@ -16876,78 +18495,6 @@ fi
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_types_h='<'sys/types.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
-$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
-if test "${gl_cv_next_sys_types_h+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-
-_ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'sys/types.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
-$as_echo "$gl_cv_next_sys_types_h" >&6; }
-     fi
-     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/types.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_types_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
@@ -16970,36 +18517,40 @@ else
              if test $ac_cv_header_unistd_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'unistd.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'unistd.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_unistd_h
+           gl_cv_next_unistd_h='"'$gl_header'"'
           else
                gl_cv_next_unistd_h='<'unistd.h'>'
              fi
@@ -17112,36 +18663,40 @@ else
              if test $ac_cv_header_wchar_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'wchar.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'wchar.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_wchar_h
+           gl_cv_next_wchar_h='"'$gl_header'"'
           else
                gl_cv_next_wchar_h='<'wchar.h'>'
              fi
@@ -17275,36 +18830,40 @@ else
              if test $ac_cv_header_wctype_h = yes; then
 
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wctype.h>
-
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'wctype.h' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'wctype.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_wctype_h
+           gl_cv_next_wctype_h='"'$gl_header'"'
           else
                gl_cv_next_wctype_h='<'wctype.h'>'
              fi
@@ -18582,6 +20141,14 @@ if test -z "${GL_GENERATE_FNMATCH_H_TRUE
   as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+  as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+  as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
   as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/configure.ac ./gdb/gnulib/configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/configure.ac	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/configure.ac	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/alloca.in.h ./gdb/gnulib/import/alloca.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/alloca.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/alloca.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify it
@@ -51,6 +51,8 @@ extern "C"
 void *_alloca (unsigned short);
 #  pragma intrinsic (_alloca)
 #  define alloca _alloca
+# elif defined __MVS__
+#  include <stdlib.h>
 # else
 #  include <stddef.h>
 #  ifdef  __cplusplus
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/basename-lgpl.c ./gdb/gnulib/import/basename-lgpl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/basename-lgpl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/basename-lgpl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/canonicalize-lgpl.c ./gdb/gnulib/import/canonicalize-lgpl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/canonicalize-lgpl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/canonicalize-lgpl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2012 Free Software Foundation, Inc.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -16,16 +16,16 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the name == NULL test below.  */
+# define _GL_ARG_NONNULL(params)
+
 # define _GL_USE_STDLIB_ALLOC 1
 # include <config.h>
 #endif
 
 #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
 
-/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
-   optimizes away the name == NULL test below.  */
-#define _GL_ARG_NONNULL(params)
-
 /* Specification.  */
 #include <stdlib.h>
 
@@ -83,7 +83,23 @@
 # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
 #endif
 
+/* Define this independently so that stdint.h is not a prerequisite.  */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
 #if !FUNC_REALPATH_WORKS || defined _LIBC
+
+static void
+alloc_failed (void)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* Avoid errno problem without using the malloc or realloc modules; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html  */
+  errno = ENOMEM;
+#endif
+}
+
 /* Return the canonical absolute name of file NAME.  A canonical name
    does not contain any ".", ".." components nor any repeated path
    separators ('/') or symlinks.  All path components must exist.  If
@@ -135,9 +151,7 @@ __realpath (const char *name, char *reso
       rpath = malloc (path_max);
       if (rpath == NULL)
         {
-          /* It's easier to set errno to ENOMEM than to rely on the
-             'malloc-posix' gnulib module.  */
-          errno = ENOMEM;
+          alloc_failed ();
           return NULL;
         }
     }
@@ -185,7 +199,6 @@ __realpath (const char *name, char *reso
 #else
       struct stat st;
 #endif
-      int n;
 
       /* Skip sequence of multiple path-separators.  */
       while (ISSLASH (*start))
@@ -238,9 +251,7 @@ __realpath (const char *name, char *reso
               new_rpath = (char *) realloc (rpath, new_size);
               if (new_rpath == NULL)
                 {
-                  /* It's easier to set errno to ENOMEM than to rely on the
-                     'realloc-posix' gnulib module.  */
-                  errno = ENOMEM;
+                  alloc_failed ();
                   goto error;
                 }
               rpath = new_rpath;
@@ -268,6 +279,7 @@ __realpath (const char *name, char *reso
             {
               char *buf;
               size_t len;
+              ssize_t n;
 
               if (++num_links > MAXSYMLINKS)
                 {
@@ -278,7 +290,7 @@ __realpath (const char *name, char *reso
               buf = malloca (path_max);
               if (!buf)
                 {
-                  errno = ENOMEM;
+                  __set_errno (ENOMEM);
                   goto error;
                 }
 
@@ -287,7 +299,7 @@ __realpath (const char *name, char *reso
                 {
                   int saved_errno = errno;
                   freea (buf);
-                  errno = saved_errno;
+                  __set_errno (saved_errno);
                   goto error;
                 }
               buf[n] = '\0';
@@ -298,13 +310,14 @@ __realpath (const char *name, char *reso
                   if (!extra_buf)
                     {
                       freea (buf);
-                      errno = ENOMEM;
+                      __set_errno (ENOMEM);
                       goto error;
                     }
                 }
 
               len = strlen (end);
-              if ((long int) (n + len) >= path_max)
+              /* Check that n + len + 1 doesn't overflow and is <= path_max. */
+              if (n >= SIZE_MAX - len || n + len >= path_max)
                 {
                   freea (buf);
                   __set_errno (ENAMETOOLONG);
@@ -370,7 +383,7 @@ error:
       freea (extra_buf);
     if (resolved == NULL)
       free (rpath);
-    errno = saved_errno;
+    __set_errno (saved_errno);
   }
   return NULL;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/config.charset ./gdb/gnulib/import/config.charset
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/config.charset	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/config.charset	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006-2016 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -348,12 +348,10 @@ case "$os" in
     #echo "sun_eu_greek ?" # what is this?
     echo "UTF-8 UTF-8"
     ;;
-  freebsd* | os2*)
+  freebsd*)
     # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
     # localcharset.c falls back to using the full locale name
     # from the environment variables.
-    # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
-    # reuse FreeBSD's locale data for OS/2.
     echo "C ASCII"
     echo "US-ASCII ASCII"
     for l in la_LN lt_LN; do
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirent.in.h ./gdb/gnulib/import/dirent.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirent.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/dirent.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* A GNU-like <dirent.h>.
-   Copyright (C) 2006-2012 Free Software Foundation, Inc.
+   Copyright (C) 2006-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -77,6 +77,7 @@ typedef struct gl_directory DIR;
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef opendir
 #   define opendir rpl_opendir
+#   define GNULIB_defined_opendir 1
 #  endif
 _GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
@@ -128,6 +129,7 @@ _GL_WARN_ON_USE (rewinddir, "rewinddir i
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef closedir
 #   define closedir rpl_closedir
+#   define GNULIB_defined_closedir 1
 #  endif
 _GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
@@ -156,6 +158,13 @@ _GL_WARN_ON_USE (closedir, "closedir is 
 #  endif
 _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+
+#  ifdef __KLIBC__
+/* Gnulib internal hooks needed to maintain the dirfd metadata.  */
+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp)
+     _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd);
+#  endif
 # else
 #  if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
     /* dirfd is defined as a macro and not as a function.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirfd.c ./gdb/gnulib/import/dirfd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirfd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/dirfd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* dirfd.c -- return the file descriptor associated with an open DIR*
 
-   Copyright (C) 2001, 2006, 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,11 +22,77 @@
 #include <dirent.h>
 #include <errno.h>
 
+#ifdef __KLIBC__
+# include <stdlib.h>
+# include <io.h>
+
+static struct dirp_fd_list
+{
+  DIR *dirp;
+  int fd;
+  struct dirp_fd_list *next;
+} *dirp_fd_start = NULL;
+
+/* Register fd associated with dirp to dirp_fd_list. */
+int
+_gl_register_dirp_fd (int fd, DIR *dirp)
+{
+  struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
+  if (!new_dirp_fd)
+    return -1;
+
+  new_dirp_fd->dirp = dirp;
+  new_dirp_fd->fd = fd;
+  new_dirp_fd->next = dirp_fd_start;
+
+  dirp_fd_start = new_dirp_fd;
+
+  return 0;
+}
+
+/* Unregister fd from dirp_fd_list with closing it */
+void
+_gl_unregister_dirp_fd (int fd)
+{
+  struct dirp_fd_list *dirp_fd;
+  struct dirp_fd_list *dirp_fd_prev;
+
+  for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
+       dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
+    {
+      if (dirp_fd->fd == fd)
+        {
+          if (dirp_fd_prev)
+            dirp_fd_prev->next = dirp_fd->next;
+          else  /* dirp_fd == dirp_fd_start */
+            dirp_fd_start = dirp_fd_start->next;
+
+          close (fd);
+          free (dirp_fd);
+          break;
+        }
+    }
+}
+#endif
+
 int
 dirfd (DIR *dir_p)
 {
   int fd = DIR_TO_FD (dir_p);
   if (fd == -1)
+#ifndef __KLIBC__
     errno = ENOTSUP;
+#else
+    {
+      struct dirp_fd_list *dirp_fd;
+
+      for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
+        if (dirp_fd->dirp == dir_p)
+          return dirp_fd->fd;
+
+      errno = EINVAL;
+    }
+#endif
+
   return fd;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirname.h ./gdb/gnulib/import/dirname.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirname.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/dirname.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /*  Take file names apart into directory and base names.
 
-    Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation,
+    Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation,
     Inc.
 
     This program is free software: you can redistribute it and/or modify
@@ -31,6 +31,10 @@
 #  define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
 # endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 # if GNULIB_DIRNAME
 char *base_name (char const *file);
 char *dir_name (char const *file);
@@ -43,4 +47,8 @@ char *last_component (char const *file) 
 
 bool strip_trailing_slashes (char *file);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* not DIRNAME_H_ */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirname-lgpl.c ./gdb/gnulib/import/dirname-lgpl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dirname-lgpl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/dirname-lgpl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dosname.h ./gdb/gnulib/import/dosname.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/dosname.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/dosname.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* File names on MS-DOS/Windows systems.
 
-   Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/errno.in.h ./gdb/gnulib/import/errno.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/errno.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/errno.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/arg-nonnull.h ./gdb/gnulib/import/extra/snippet/arg-nonnull.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/arg-nonnull.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/extra/snippet/arg-nonnull.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/c++defs.h ./gdb/gnulib/import/extra/snippet/c++defs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/c++defs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/extra/snippet/c++defs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -17,6 +17,15 @@
 #ifndef _GL_CXXDEFS_H
 #define _GL_CXXDEFS_H
 
+/* Begin/end the GNULIB_NAMESPACE namespace.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
+# define _GL_END_NAMESPACE }
+#else
+# define _GL_BEGIN_NAMESPACE
+# define _GL_END_NAMESPACE
+#endif
+
 /* The three most frequent use cases of these macros are:
 
    * For providing a substitute for a function that is missing on some
@@ -111,14 +120,22 @@
    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
    Example:
      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
- */
+
+   Wrapping rpl_func in an object with an inline conversion operator
+   avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
+   actually used in the program.  */
 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
 #if defined __cplusplus && defined GNULIB_NAMESPACE
 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
     namespace GNULIB_NAMESPACE                                \
     {                                                         \
-      rettype (*const func) parameters = ::rpl_func;          \
+      static const struct _gl_ ## func ## _wrapper            \
+      {                                                       \
+        typedef rettype (*type) parameters;                   \
+        inline type rpl () const { return ::rpl_func; }       \
+        inline operator type () const  { return rpl (); }     \
+      } func = {};                                            \
     }                                                         \
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #else
@@ -135,8 +152,13 @@
 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
     namespace GNULIB_NAMESPACE                                     \
     {                                                              \
-      rettype (*const func) parameters =                           \
-        reinterpret_cast<rettype(*)parameters>(::rpl_func);        \
+      static const struct _gl_ ## func ## _wrapper                 \
+      {                                                            \
+        typedef rettype (*type) parameters;                        \
+        inline type rpl () const                                   \
+        { return reinterpret_cast<type>(::rpl_func); }             \
+        inline operator type () const { return rpl (); }           \
+      } func = {};                                                 \
     }                                                              \
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #else
@@ -150,18 +172,20 @@
    is defined.
    Example:
      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
- */
+
+   Wrapping func in an object with an inline conversion operator
+   avoids a reference to func unless GNULIB_NAMESPACE::func is
+   actually used in the program.  */
 #if defined __cplusplus && defined GNULIB_NAMESPACE
-  /* If we were to write
-       rettype (*const func) parameters = ::func;
-     like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
-     better (remove an indirection through a 'static' pointer variable),
-     but then the _GL_CXXALIASWARN macro below would cause a warning not only
-     for uses of ::func but also for uses of GNULIB_NAMESPACE::func.  */
-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
-    namespace GNULIB_NAMESPACE                     \
-    {                                              \
-      static rettype (*func) parameters = ::func;  \
+# define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
+    namespace GNULIB_NAMESPACE                                \
+    {                                                         \
+      static const struct _gl_ ## func ## _wrapper            \
+      {                                                       \
+        typedef rettype (*type) parameters;                   \
+        inline type rpl () const { return ::func; }           \
+        inline operator type () const { return rpl (); }      \
+      } func = {};                                            \
     }                                              \
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #else
@@ -178,8 +202,13 @@
 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
     namespace GNULIB_NAMESPACE                          \
     {                                                   \
-      static rettype (*func) parameters =               \
-        reinterpret_cast<rettype(*)parameters>(::func); \
+      static const struct _gl_ ## func ## _wrapper      \
+      {                                                 \
+        typedef rettype (*type) parameters;             \
+        inline type rpl () const                        \
+        { return reinterpret_cast<type>(::func); }      \
+        inline operator type () const { return rpl (); }\
+      } func = {};                                      \
     }                                                   \
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #else
@@ -202,9 +231,15 @@
 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
     namespace GNULIB_NAMESPACE                                                \
     {                                                                         \
-      static rettype (*func) parameters =                                     \
-        reinterpret_cast<rettype(*)parameters>(                               \
-          (rettype2(*)parameters2)(::func));                                  \
+      static const struct _gl_ ## func ## _wrapper                            \
+      {                                                                       \
+        typedef rettype (*type) parameters;                                   \
+                                                                              \
+        inline type rpl () const                                              \
+        { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\
+                                                                              \
+        inline operator type () const { return rpl (); }                      \
+      } func = {};                                                            \
     }                                                                         \
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/warn-on-use.h ./gdb/gnulib/import/extra/snippet/warn-on-use.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/snippet/warn-on-use.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/extra/snippet/warn-on-use.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/update-copyright ./gdb/gnulib/import/extra/update-copyright
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/extra/update-copyright	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/extra/update-copyright	2017-03-06 01:49:07.000000000 +0000
@@ -1,11 +1,11 @@
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
   & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
     if 0;
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2012-02-05.21:39'; # UTC
+my $VERSION = '2016-01-12.23:13'; # UTC
 
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -124,7 +124,7 @@ use strict;
 use warnings;
 
 my $copyright_re = 'Copyright';
-my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
 $holder ||= 'Free Software Foundation, Inc.';
 my $prefix_max = 5;
@@ -192,7 +192,7 @@ if (defined $stmt_re)
     if ($final_year != $this_year)
       {
         # Update the year.
-        $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+        $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/;
       }
     if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
       {
@@ -269,6 +269,6 @@ else
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "'; # UTC"
 # End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/flexmember.h ./gdb/gnulib/import/flexmember.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/flexmember.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/flexmember.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+/* Sizes of structs with flexible array members.
+
+   Copyright 2016 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   Written by Paul Eggert.  */
+
+#include <stddef.h>
+
+/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
+   On older platforms without _Alignof, use a pessimistic bound that is
+   safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
+   On newer platforms, use _Alignof to get a tighter bound.  */
+
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
+#else
+# define FLEXALIGNOF(type) _Alignof (type)
+#endif
+
+/* Upper bound on the size of a struct of type TYPE with a flexible
+   array member named MEMBER that is followed by N bytes of other data.
+   This is not simply sizeof (TYPE) + N, since it may require
+   alignment on unusually picky C11 platforms, and
+   FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
+   Yield a value less than N if and only if arithmetic overflow occurs.  */
+
+#define FLEXSIZEOF(type, member, n) \
+   ((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \
+    & ~ (FLEXALIGNOF (type) - 1))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float.c ./gdb/gnulib/import/float.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/float.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float+.h ./gdb/gnulib/import/float+.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float+.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/float+.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float.in.h ./gdb/gnulib/import/float.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/float.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/float.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch.c ./gdb/gnulib/import/fnmatch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/fnmatch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2007, 2009-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 # define _GNU_SOURCE    1
 #endif
 
-#if ! defined __builtin_expect && __GNUC__ < 3
+#if ! defined __builtin_expect && defined __GNUC__ && __GNUC__ < 3
 # define __builtin_expect(expr, expected) (expr)
 #endif
 
@@ -67,6 +67,8 @@ extern int fnmatch (const char *pattern,
 # define SIZE_MAX ((size_t) -1)
 #endif
 
+#include "flexmember.h"
+
 /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set.  */
 #define NO_LEADING_PERIOD(flags) \
   ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch.in.h ./gdb/gnulib/import/fnmatch.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/fnmatch.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2012 Free
+/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2016 Free
    Software Foundation, Inc.
 
    This file is part of the GNU C Library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch_loop.c ./gdb/gnulib/import/fnmatch_loop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fnmatch_loop.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/fnmatch_loop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2006, 2009-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2006, 2009-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -227,6 +227,8 @@ FCT (const CHAR *pattern, const CHAR *st
             c = *p++;
             for (;;)
               {
+		bool is_range = false;
+
                 if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
                   {
                     if (*p == L_('\0'))
@@ -420,8 +422,6 @@ FCT (const CHAR *pattern, const CHAR *st
                   }
                 else
                   {
-                    bool is_range = false;
-
 #ifdef _LIBC
                     bool is_seqval = false;
 
@@ -1031,7 +1031,7 @@ EXT (INT opt, const CHAR *pattern, const
   struct patternlist
   {
     struct patternlist *next;
-    CHAR str[1];
+    CHAR str[FLEXIBLE_ARRAY_MEMBER];
   } *list = NULL;
   struct patternlist **lastp = &list;
   size_t pattern_len = STRLEN (pattern);
@@ -1083,7 +1083,7 @@ EXT (INT opt, const CHAR *pattern, const
                     ? pattern_len                                             \
                     : p - startp + 1UL);                                      \
             plensize = plen * sizeof (CHAR);                                  \
-            newpsize = offsetof (struct patternlist, str) + plensize;         \
+            newpsize = FLEXSIZEOF (struct patternlist, str, plensize);        \
             if ((size_t) -1 / sizeof (CHAR) < plen                            \
                 || newpsize < offsetof (struct patternlist, str)              \
                 || ALLOCA_LIMIT <= newpsize)                                  \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fpucw.h ./gdb/gnulib/import/fpucw.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/fpucw.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/fpucw.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-/* Manipulating the FPU control word.
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+/* Manipulating the FPU control word.  -*- coding: utf-8 -*-
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/frexp.c ./gdb/gnulib/import/frexp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/frexp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/frexp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Split a double into fraction and mantissa.
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/frexpl.c ./gdb/gnulib/import/frexpl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/frexpl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/frexpl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa.
-   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/gettimeofday.c ./gdb/gnulib/import/gettimeofday.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/gettimeofday.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/gettimeofday.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,154 @@
+/* Provide gettimeofday for systems that don't have it or for which it's broken.
+
+   Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification.  */
+#include <sys/time.h>
+
+#include <time.h>
+
+#if HAVE_SYS_TIMEB_H
+# include <sys/timeb.h>
+#endif
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+/* Work around the bug in some systems whereby gettimeofday clobbers
+   the static buffer that localtime uses for its return value.  The
+   gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+   this problem.  The tzset replacement is necessary for at least
+   Solaris 2.5, 2.5.1, and 2.6.  */
+
+static struct tm tm_zero_buffer;
+static struct tm *localtime_buffer_addr = &tm_zero_buffer;
+
+# undef localtime
+extern struct tm *localtime (time_t const *);
+
+# undef gmtime
+extern struct tm *gmtime (time_t const *);
+
+/* This is a wrapper for localtime.  It is used only on systems for which
+   gettimeofday clobbers the static buffer used for localtime's result.
+
+   On the first call, record the address of the static buffer that
+   localtime uses for its result.  */
+
+struct tm *
+rpl_localtime (time_t const *timep)
+{
+  struct tm *tm = localtime (timep);
+
+  if (localtime_buffer_addr == &tm_zero_buffer)
+    localtime_buffer_addr = tm;
+
+  return tm;
+}
+
+/* Same as above, since gmtime and localtime use the same buffer.  */
+struct tm *
+rpl_gmtime (time_t const *timep)
+{
+  struct tm *tm = gmtime (timep);
+
+  if (localtime_buffer_addr == &tm_zero_buffer)
+    localtime_buffer_addr = tm;
+
+  return tm;
+}
+
+#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
+
+#if TZSET_CLOBBERS_LOCALTIME
+
+# undef tzset
+extern void tzset (void);
+
+/* This is a wrapper for tzset, for systems on which tzset may clobber
+   the static buffer used for localtime's result.  */
+void
+rpl_tzset (void)
+{
+  /* Save and restore the contents of the buffer used for localtime's
+     result around the call to tzset.  */
+  struct tm save = *localtime_buffer_addr;
+  tzset ();
+  *localtime_buffer_addr = save;
+}
+#endif
+
+/* This is a wrapper for gettimeofday.  It is used only on systems
+   that lack this function, or whose implementation of this function
+   causes problems.  */
+
+int
+gettimeofday (struct timeval *restrict tv, void *restrict tz)
+{
+#undef gettimeofday
+#if HAVE_GETTIMEOFDAY
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+  /* Save and restore the contents of the buffer used for localtime's
+     result around the call to gettimeofday.  */
+  struct tm save = *localtime_buffer_addr;
+# endif
+
+# if defined timeval /* 'struct timeval' overridden by gnulib?  */
+#  undef timeval
+  struct timeval otv;
+  int result = gettimeofday (&otv, (struct timezone *) tz);
+  if (result == 0)
+    {
+      tv->tv_sec = otv.tv_sec;
+      tv->tv_usec = otv.tv_usec;
+    }
+# else
+  int result = gettimeofday (tv, (struct timezone *) tz);
+# endif
+
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+  *localtime_buffer_addr = save;
+# endif
+
+  return result;
+
+#else
+
+# if HAVE__FTIME
+
+  struct _timeb timebuf;
+  _ftime (&timebuf);
+  tv->tv_sec = timebuf.time;
+  tv->tv_usec = timebuf.millitm * 1000;
+
+# else
+
+#  if !defined OK_TO_USE_1S_CLOCK
+#   error "Only 1-second nominal clock resolution found.  Is that intended?" \
+          "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
+#  endif
+  tv->tv_sec = time (NULL);
+  tv->tv_usec = 0;
+
+# endif
+
+  return 0;
+
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/hard-locale.c ./gdb/gnulib/import/hard-locale.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/hard-locale.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/hard-locale.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,72 @@
+/* hard-locale.c -- Determine whether a locale is hard.
+
+   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software
+   Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include "hard-locale.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __GLIBC__
+# define GLIBC_VERSION __GLIBC__
+#elif defined __UCLIBC__
+# define GLIBC_VERSION 2
+#else
+# define GLIBC_VERSION 0
+#endif
+
+/* Return true if the current CATEGORY locale is hard, i.e. if you
+   can't get away with assuming traditional C or POSIX behavior.  */
+bool
+hard_locale (int category)
+{
+  bool hard = true;
+  char const *p = setlocale (category, NULL);
+
+  if (p)
+    {
+      if (2 <= GLIBC_VERSION)
+        {
+          if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
+            hard = false;
+        }
+      else
+        {
+          char *locale = strdup (p);
+          if (locale)
+            {
+              /* Temporarily set the locale to the "C" and "POSIX" locales
+                 to find their names, so that we can determine whether one
+                 or the other is the caller's locale.  */
+              if (((p = setlocale (category, "C"))
+                   && strcmp (p, locale) == 0)
+                  || ((p = setlocale (category, "POSIX"))
+                      && strcmp (p, locale) == 0))
+                hard = false;
+
+              /* Restore the caller's locale.  */
+              setlocale (category, locale);
+              free (locale);
+            }
+        }
+    }
+
+  return hard;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/hard-locale.h ./gdb/gnulib/import/hard-locale.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/hard-locale.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/hard-locale.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* Determine whether a locale is hard.
+
+   Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef HARD_LOCALE_H_
+# define HARD_LOCALE_H_ 1
+
+# include <stdbool.h>
+
+bool hard_locale (int);
+
+#endif /* HARD_LOCALE_H_ */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/inttypes.in.h ./gdb/gnulib/import/inttypes.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/inttypes.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/inttypes.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
@@ -51,6 +51,10 @@
 #endif
 /* Get CHAR_BIT.  */
 #include <limits.h>
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <stdio.h>
+#endif
 
 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
@@ -1105,12 +1109,22 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax i
 #endif
 
 #if @GNULIB_STRTOUMAX@
-# if !@HAVE_DECL_STRTOUMAX@
-#  undef strtoumax
+# if @REPLACE_STRTOUMAX@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strtoumax
+#   define strtoumax rpl_strtoumax
+#  endif
+_GL_FUNCDECL_RPL (strtoumax, uintmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
+# else
+#  if !@HAVE_DECL_STRTOUMAX@
+#   undef strtoumax
 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
                   (const char *, char **, int) _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+# endif
 _GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoumax
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnan.c ./gdb/gnulib/import/isnan.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnan.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/isnan.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,10 +79,21 @@ extern int rpl_isnanf (float x);
   ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
 typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double;
 
+/* Most hosts nowadays use IEEE floating point, so they use IEC 60559
+   representations, have infinities and NaNs, and do not trap on
+   exceptions.  Define IEEE_FLOATING_POINT if this host is one of the
+   typical ones.  The C11 macro __STDC_IEC_559__ is close to what is
+   wanted here, but is not quite right because this file does not require
+   all the features of C11 Annex F (and does not require C11 at all,
+   for that matter).  */
+
+#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
+                             && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
+
 int
 FUNC (DOUBLE x)
 {
-#ifdef KNOWN_EXPBIT0_LOCATION
+#if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT
 # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
   /* Special CPU dependent code is needed to treat bit patterns outside the
      IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities,
@@ -153,8 +164,9 @@ FUNC (DOUBLE x)
   }
 # endif
 #else
-  /* The configuration did not find sufficient information.  Give up about
-     the signaling NaNs, handle only the quiet NaNs.  */
+  /* The configuration did not find sufficient information, or does
+     not use IEEE floating point.  Give up about the signaling NaNs;
+     handle only the quiet NaNs.  */
   if (x == x)
     {
 # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnand.c ./gdb/gnulib/import/isnand.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnand.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/isnand.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnand-nolibm.h ./gdb/gnulib/import/isnand-nolibm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnand-nolibm.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/isnand-nolibm.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnanl.c ./gdb/gnulib/import/isnanl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnanl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/isnanl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnanl-nolibm.h ./gdb/gnulib/import/isnanl-nolibm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/isnanl-nolibm.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/isnanl-nolibm.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/itold.c ./gdb/gnulib/import/itold.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/itold.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/itold.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/limits.in.h ./gdb/gnulib/import/limits.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/limits.in.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/limits.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,63 @@
+/* A GNU-like <limits.h>.
+
+   Copyright 2016 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   as published by the Free Software Foundation; either version 3, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+#define _@GUARD_PREFIX@_LIMITS_H
+
+/* The number of usable bits in an unsigned or signed integer type
+   with minimum value MIN and maximum value MAX, as an int expression
+   suitable in #if.  Cover all known practical hosts.  This
+   implementation exploits the fact that MAX is 1 less than a power of
+   2, and merely counts the number of 1 bits in MAX; "COBn" means
+   "count the number of 1 bits in the low-order n bits").  */
+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+
+/* Macros specified by ISO/IEC TS 18661-1:2014.  */
+
+#if (! defined ULLONG_WIDTH                                             \
+     && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
+#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
+
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/localcharset.c ./gdb/gnulib/import/localcharset.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/localcharset.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/localcharset.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
 
 #if defined _WIN32 || defined __WIN32__
 # define WINDOWS_NATIVE
+# include <locale.h>
 #endif
 
 #if defined __EMX__
@@ -65,6 +66,11 @@
 # include <os2.h>
 #endif
 
+/* For MB_CUR_MAX_L */
+#if defined DARWIN7
+# include <xlocale.h>
+#endif
+
 #if ENABLE_RELOCATABLE
 # include "relocatable.h"
 #else
@@ -122,7 +128,7 @@ get_charset_aliases (void)
   cp = charset_aliases;
   if (cp == NULL)
     {
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
       const char *dir;
       const char *base = "charset.alias";
       char *file_name;
@@ -336,6 +342,36 @@ get_charset_aliases (void)
            "CP54936" "\0" "GB18030" "\0"
            "CP65001" "\0" "UTF-8" "\0";
 # endif
+# if defined OS2
+      /* To avoid the troubles of installing a separate file in the same
+         directory as the DLL and of retrieving the DLL's directory at
+         runtime, simply inline the aliases here.  */
+
+      /* The list of encodings is taken from "List of OS/2 Codepages"
+         by Alex Taylor:
+         <http://altsan.org/os2/toolkits/uls/index.html#codepages>.
+         See also "IBM Globalization - Code page identifiers":
+         <http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>.  */
+      cp = "CP813" "\0" "ISO-8859-7" "\0"
+           "CP878" "\0" "KOI8-R" "\0"
+           "CP819" "\0" "ISO-8859-1" "\0"
+           "CP912" "\0" "ISO-8859-2" "\0"
+           "CP913" "\0" "ISO-8859-3" "\0"
+           "CP914" "\0" "ISO-8859-4" "\0"
+           "CP915" "\0" "ISO-8859-5" "\0"
+           "CP916" "\0" "ISO-8859-8" "\0"
+           "CP920" "\0" "ISO-8859-9" "\0"
+           "CP921" "\0" "ISO-8859-13" "\0"
+           "CP923" "\0" "ISO-8859-15" "\0"
+           "CP954" "\0" "EUC-JP" "\0"
+           "CP964" "\0" "EUC-TW" "\0"
+           "CP970" "\0" "EUC-KR" "\0"
+           "CP1089" "\0" "ISO-8859-6" "\0"
+           "CP1208" "\0" "UTF-8" "\0"
+           "CP1381" "\0" "GB2312" "\0"
+           "CP1386" "\0" "GBK" "\0"
+           "CP3372" "\0" "EUC-JP" "\0";
+# endif
 #endif
 
       charset_aliases = cp;
@@ -456,14 +492,34 @@ locale_charset (void)
 
   static char buf[2 + 10 + 1];
 
-  /* The Windows API has a function returning the locale's codepage as a
-     number: GetACP().
-     When the output goes to a console window, it needs to be provided in
-     GetOEMCP() encoding if the console is using a raster font, or in
-     GetConsoleOutputCP() encoding if it is using a TrueType font.
-     But in GUI programs and for output sent to files and pipes, GetACP()
-     encoding is the best bet.  */
-  sprintf (buf, "CP%u", GetACP ());
+  /* The Windows API has a function returning the locale's codepage as
+     a number, but the value doesn't change according to what the
+     'setlocale' call specified.  So we use it as a last resort, in
+     case the string returned by 'setlocale' doesn't specify the
+     codepage.  */
+  char *current_locale = setlocale (LC_ALL, NULL);
+  char *pdot;
+
+  /* If they set different locales for different categories,
+     'setlocale' will return a semi-colon separated list of locale
+     values.  To make sure we use the correct one, we choose LC_CTYPE.  */
+  if (strchr (current_locale, ';'))
+    current_locale = setlocale (LC_CTYPE, NULL);
+
+  pdot = strrchr (current_locale, '.');
+  if (pdot)
+    sprintf (buf, "CP%s", pdot + 1);
+  else
+    {
+      /* The Windows API has a function returning the locale's codepage as a
+        number: GetACP().
+        When the output goes to a console window, it needs to be provided in
+        GetOEMCP() encoding if the console is using a raster font, or in
+        GetConsoleOutputCP() encoding if it is using a TrueType font.
+        But in GUI programs and for output sent to files and pipes, GetACP()
+        encoding is the best bet.  */
+      sprintf (buf, "CP%u", GetACP ());
+    }
   codeset = buf;
 
 #elif defined OS2
@@ -473,6 +529,8 @@ locale_charset (void)
   ULONG cp[3];
   ULONG cplen;
 
+  codeset = NULL;
+
   /* Allow user to override the codeset, as set in the operating system,
      with standard language environment variables.  */
   locale = getenv ("LC_ALL");
@@ -504,10 +562,12 @@ locale_charset (void)
             }
         }
 
-      /* Resolve through the charset.alias file.  */
-      codeset = locale;
+      /* For the POSIX locale, don't use the system's codepage.  */
+      if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
+        codeset = "";
     }
-  else
+
+  if (codeset == NULL)
     {
       /* OS/2 has a function returning the locale's codepage as a number.  */
       if (DosQueryCp (sizeof (cp), cp, &cplen))
@@ -545,7 +605,7 @@ locale_charset (void)
 #ifdef DARWIN7
   /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
      (the default codeset) does not work when MB_CUR_MAX is 1.  */
-  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
     codeset = "ASCII";
 #endif
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/localcharset.h ./gdb/gnulib/import/localcharset.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/localcharset.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/localcharset.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2016 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
    This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/lstat.c ./gdb/gnulib/import/lstat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/lstat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/lstat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-2006, 2008-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/00gnulib.m4 ./gdb/gnulib/import/m4/00gnulib.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/00gnulib.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/00gnulib.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,12 +1,28 @@
-# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 3
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl This file must be named something that sorts before all other
 dnl gnulib-provided .m4 files.  It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics.
+
+# Until autoconf 2.63, handling of the diversion stack required m4_init
+# to be called first; but this does not happen with aclocal.  Wrapping
+# the entire execution in another layer of the diversion stack fixes this.
+# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
+# for whether it was FIFO or LIFO; in order to properly balance with
+# m4_init, we need to undo our push just before anything wrapped within
+# the m4_init body.  The way to ensure this is to wrap both sides of
+# m4_init with a one-shot macro that does the pop at the right time.
+m4_ifndef([_m4_divert_diversion],
+[m4_divert_push([KILL])
+m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
+m4_define([m4_init],
+  [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
+
 
 # AC_DEFUN_ONCE([NAME], VALUE)
 # ----------------------------
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/absolute-header.m4 ./gdb/gnulib/import/m4/absolute-header.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/absolute-header.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/absolute-header.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+# absolute-header.m4 serial 16
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, testing first if the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PREPROC_REQUIRE()dnl
+dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
+dnl until we can assume autoconf 2.64 or newer.
+m4_foreach_w([gl_HEADER_NAME], [$1],
+  [AS_VAR_PUSHDEF([gl_absolute_header],
+                  [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
+  AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+    m4_defn([gl_absolute_header]),
+    [AS_VAR_PUSHDEF([ac_header_exists],
+                    [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
+    AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
+    if test AS_VAR_GET(ac_header_exists) = yes; then
+      gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
+    fi
+    AS_VAR_POPDEF([ac_header_exists])dnl
+    ])dnl
+  AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
+                     ["AS_VAR_GET(gl_absolute_header)"],
+                     [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
+  AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER
+
+# gl_ABSOLUTE_HEADER_ONE(HEADER)
+# ------------------------------
+# Like gl_ABSOLUTE_HEADER, except that:
+#   - it assumes that the header exists,
+#   - it uses the current CPPFLAGS,
+#   - it does not cache the result,
+#   - it is silent.
+AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
+  dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+  dnl that contain only a #include of other header files and no
+  dnl non-comment tokens of their own. This leads to a failure to
+  dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+  dnl and others. The workaround is to force preservation of comments
+  dnl through option -C. This ensures all necessary #line directives
+  dnl are present. GCC supports option -C as well.
+  case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+changequote(,)
+  case "$host_os" in
+    mingw*)
+      dnl For the sake of native Windows compilers (excluding gcc),
+      dnl treat backslash as a directory separator, like /.
+      dnl Actually, these compilers use a double-backslash as
+      dnl directory separator, inside the
+      dnl   # line "filename"
+      dnl directives.
+      gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+  dnl A sed expression that turns a string into a basic regular
+  dnl expression, for use within "/.../".
+  gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo '$1' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+changequote([,])
+  dnl eval is necessary to expand gl_absname_cpp.
+  dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+  dnl so use subshell.
+  AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]),
+[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+  sed -n "$gl_absolute_header_sed"`])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/alloca.m4 ./gdb/gnulib/import/m4/alloca.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/alloca.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/alloca.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/canonicalize.m4 ./gdb/gnulib/import/m4/canonicalize.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/canonicalize.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/canonicalize.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 26
+# canonicalize.m4 serial 28
 
-dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
 
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -83,22 +83,27 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
           char *name = realpath ("conftest.a", NULL);
           if (!(name && *name == '/'))
             result |= 1;
+          free (name);
         }
         {
           char *name = realpath ("conftest.b/../conftest.a", NULL);
           if (name != NULL)
             result |= 2;
+          free (name);
         }
         {
           char *name = realpath ("conftest.a/", NULL);
           if (name != NULL)
             result |= 4;
+          free (name);
         }
         {
           char *name1 = realpath (".", NULL);
           char *name2 = realpath ("conftest.d//./..", NULL);
-          if (strcmp (name1, name2) != 0)
+          if (! name1 || ! name2 || strcmp (name1, name2))
             result |= 8;
+          free (name1);
+          free (name2);
         }
         return result;
       ]])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/codeset.m4 ./gdb/gnulib/import/m4/codeset.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/codeset.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/codeset.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,6 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/configmake.m4 ./gdb/gnulib/import/m4/configmake.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/configmake.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/configmake.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# configmake.m4 serial 1
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# configmake.m4 serial 2
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,8 +7,9 @@ dnl with or without modifications, as lo
 # gl_CONFIGMAKE_PREP
 # ------------------
 # Guarantee all of the standard directory variables, even when used with
-# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
-# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
+# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
+# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
+# and runstatedir in 1.14.1).
 AC_DEFUN([gl_CONFIGMAKE_PREP],
 [
   dnl Technically, datadir should default to datarootdir.  But if
@@ -43,6 +44,10 @@ AC_DEFUN([gl_CONFIGMAKE_PREP],
   if test "x$localedir" = x; then
     AC_SUBST([localedir], ['${datarootdir}/locale'])
   fi
+  dnl Added in autoconf 2.70
+  if test "x$runstatedir" = x; then
+    AC_SUBST([runstatedir], ['${localstatedir}/run'])
+  fi
 
   dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
   dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirent_h.m4 ./gdb/gnulib/import/m4/dirent_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirent_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/dirent_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirfd.m4 ./gdb/gnulib/import/m4/dirfd.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirfd.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/dirfd.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,8 +1,8 @@
-# serial 22   -*- Autoconf -*-
+# serial 24   -*- Autoconf -*-
 
 dnl Find out how to get the file descriptor associated with an open DIR*.
 
-# Copyright (C) 2001-2006, 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -35,13 +35,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
        gl_cv_func_dirfd_macro=yes,
        gl_cv_func_dirfd_macro=no)])
 
-  # Use the replacement only if we have no function or macro with that name.
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
-    if test $ac_cv_have_decl_dirfd = yes; then
-      # If the system declares dirfd already, let's declare rpl_dirfd instead.
+  # Use the replacement if we have no function or macro with that name,
+  # or if OS/2 kLIBC whose dirfd() does not work.
+  # Replace only if the system declares dirfd already.
+  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+    no,no,*,yes | *,*,os2*,yes)
       REPLACE_DIRFD=1
-    fi
-  fi
+      AC_DEFINE([REPLACE_DIRFD], [1],
+        [Define to 1 if gnulib's dirfd() replacement is used.]);;
+  esac
 ])
 
 dnl Prerequisites of lib/dirfd.c.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirname.m4 ./gdb/gnulib/import/m4/dirname.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/dirname.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/dirname.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 #serial 10   -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/double-slash-root.m4 ./gdb/gnulib/import/m4/double-slash-root.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/double-slash-root.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/double-slash-root.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # double-slash-root.m4 serial 4   -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/eealloc.m4 ./gdb/gnulib/import/m4/eealloc.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/eealloc.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/eealloc.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/errno_h.m4 ./gdb/gnulib/import/m4/errno_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/errno_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/errno_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/exponentd.m4 ./gdb/gnulib/import/m4/exponentd.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/exponentd.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/exponentd.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/exponentl.m4 ./gdb/gnulib/import/m4/exponentl.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/exponentl.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/exponentl.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # exponentl.m4 serial 3
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/extensions.m4 ./gdb/gnulib/import/m4/extensions.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/extensions.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/extensions.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,14 +1,14 @@
-# serial 12  -*- Autoconf -*-
+# serial 15  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
 # Autoconf.  Perhaps we can remove this once we can assume Autoconf
-# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.70 or later everywhere, but since Autoconf mutates rapidly
 # enough in this area it's likely we'll need to redefine
 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
 
@@ -30,6 +30,7 @@
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
+#
 # Remember that #undef in AH_VERBATIM gets replaced with #define by
 # AC_DEFINE.  The goal here is to define all known feature-enabling
 # macros, then, if reports of conflicts are made, disable macros that
@@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS]
 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
-  AC_REQUIRE([AC_CANONICAL_HOST])
-
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
@@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
        except with this defined.])
     AC_DEFINE([_MINIX], [1],
       [Define to 1 if on MINIX.])
+    AC_DEFINE([_NETBSD_SOURCE], [1],
+      [Define to 1 to make NetBSD features available.  MINIX 3 needs this.])
   fi
 
-  dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
-  dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
-  dnl provided.
-  case "$host_os" in
-    hpux*)
-      AC_DEFINE([_XOPEN_SOURCE], [500],
-        [Define to 500 only on HP-UX.])
-      ;;
-  esac
-
-  AH_VERBATIM([__EXTENSIONS__],
+dnl Use a different key than __EXTENSIONS__, as that name broke existing
+dnl configure.ac when using autoheader 2.62.
+  AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
 [/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-/* Enable general extensions on Mac OS X.  */
+/* Enable general extensions on macOS.  */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
@@ -79,10 +72,44 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009.  */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
 /* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
+/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
+   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
 /* Enable general extensions on Solaris.  */
 #ifndef __EXTENSIONS__
 # undef __EXTENSIONS__
@@ -102,7 +129,30 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+  AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
+  AC_DEFINE([__STDC_WANT_LIB_EXT2__])
+  AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
   AC_DEFINE([_TANDEM_SOURCE])
+  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+    [ac_cv_should_define__xopen_source],
+    [ac_cv_should_define__xopen_source=no
+     AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #include <wchar.h>
+          mbstate_t x;]])],
+       [],
+       [AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM([[
+             #define _XOPEN_SOURCE 500
+             #include <wchar.h>
+             mbstate_t x;]])],
+          [ac_cv_should_define__xopen_source=yes])])])
+  test $ac_cv_should_define__xopen_source = yes &&
+    AC_DEFINE([_XOPEN_SOURCE], [500])
 ])# AC_USE_SYSTEM_EXTENSIONS
 
 # gl_USE_SYSTEM_EXTENSIONS
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/extern-inline.m4 ./gdb/gnulib/import/m4/extern-inline.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/extern-inline.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/extern-inline.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 dnl 'extern inline' a la ISO C99.
 
-dnl Copyright 2012 Free Software Foundation, Inc.
+dnl Copyright 2012-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,40 +8,80 @@ dnl with or without modifications, as lo
 AC_DEFUN([gl_EXTERN_INLINE],
 [
   AH_VERBATIM([extern_inline],
-[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
-   _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
-   _GL_INLINE_HEADER_BEGIN contains useful stuff to put
-     in an include file, before uses of _GL_INLINE.
-     It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
-     when FOO is an inline function in the header; see
-     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
-   _GL_INLINE_HEADER_END contains useful stuff to put
-     in the same include file, after uses of _GL_INLINE.
-
-   Suppress the use of extern inline on Apple's platforms,
-   as Libc-825.25 (2012-09-19) is incompatible with it; see
-   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
-   Perhaps Apple will fix this some day.  */
+[/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
+     && (defined __header_inline \
+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+            && ! defined __clang__) \
+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
+             && (defined __GNUC__ || defined __cplusplus)) \
+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+                && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
 #if ((__GNUC__ \
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
-      : 199901L <= __STDC_VERSION__) \
-     && !defined __APPLE__)
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !defined __PGI \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline
 # define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
-# if __GNUC_GNU_INLINE__
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
    /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
 #  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
 # else
 #  define _GL_INLINE extern inline
 # endif
 # define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
 #else
 # define _GL_INLINE static _GL_UNUSED
 # define _GL_EXTERN_INLINE static _GL_UNUSED
 #endif
 
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+   suppress bogus "no previous prototype for 'FOO'"
+   and "no previous declaration for 'FOO'" diagnostics,
+   when FOO is an inline function in the header; see
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
 #  define _GL_INLINE_HEADER_CONST_PRAGMA
 # else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fcntl-o.m4 ./gdb/gnulib/import/m4/fcntl-o.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fcntl-o.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/fcntl-o.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/flexmember.m4 ./gdb/gnulib/import/m4/flexmember.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/flexmember.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/flexmember.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+# serial 4
+# Check for flexible array member support.
+
+# Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+  AC_CACHE_CHECK([for flexible array member],
+    ac_cv_c_flexmember,
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+            #include <stdio.h>
+            #include <stddef.h>
+            struct s { int n; double d[]; };]],
+          [[int m = getchar ();
+            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
+            nbytes += sizeof (struct s) - 1;
+            nbytes -= nbytes % sizeof (struct s);
+            struct s *p = malloc (nbytes);
+            p->d[0] = 0.0;
+            return p->d != (double *) NULL;]])],
+       [ac_cv_c_flexmember=yes],
+       [ac_cv_c_flexmember=no])])
+  if test $ac_cv_c_flexmember = yes; then
+    AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+      [Define to nothing if C supports flexible array members, and to
+       1 if it does not.  That way, with a declaration like 'struct s
+       { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+       can be used with pre-C99 compilers.
+       When computing the size of such an object, don't use 'sizeof (struct s)'
+       as it overestimates the size.  Use 'offsetof (struct s, d)' instead.
+       Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+       MSVC and with C++ compilers.])
+  else
+    AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+  fi
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/float_h.m4 ./gdb/gnulib/import/m4/float_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/float_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/float_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fnmatch.m4 ./gdb/gnulib/import/m4/fnmatch.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fnmatch.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/fnmatch.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
-# Check for fnmatch - serial 9.
+# Check for fnmatch - serial 9.  -*- coding: utf-8 -*-
 
-# Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fpieee.m4 ./gdb/gnulib/import/m4/fpieee.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/fpieee.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/fpieee.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# fpieee.m4 serial 2
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# fpieee.m4 serial 2  -*- coding: utf-8 -*-
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/frexpl.m4 ./gdb/gnulib/import/m4/frexpl.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/frexpl.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/frexpl.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # frexpl.m4 serial 20
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/frexp.m4 ./gdb/gnulib/import/m4/frexp.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/frexp.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/frexp.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# frexp.m4 serial 14
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# frexp.m4 serial 15
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -93,7 +93,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-  AC_CHECK_FUNCS_ONCE([alarm])
+  AC_CHECK_DECLS_ONCE([alarm])
   AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
     [
       AC_RUN_IFELSE(
@@ -101,7 +101,8 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
 #include <float.h>
 #include <math.h>
 #include <string.h>
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
+# include <signal.h>
 # include <unistd.h>
 #endif
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
@@ -124,9 +125,10 @@ int main()
   int i;
   volatile double x;
   double zero = 0.0;
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
      number.  Let the test fail in this case.  */
+  signal (SIGALRM, SIG_DFL);
   alarm (5);
 #endif
   /* Test on denormalized numbers.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gettimeofday.m4 ./gdb/gnulib/import/m4/gettimeofday.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gettimeofday.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/gettimeofday.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,138 @@
+# serial 21
+
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+  gl_gettimeofday_timezone=void
+  if test $ac_cv_func_gettimeofday != yes; then
+    HAVE_GETTIMEOFDAY=0
+  else
+    gl_FUNC_GETTIMEOFDAY_CLOBBER
+    AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+      [gl_cv_func_gettimeofday_posix_signature],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <sys/time.h>
+              struct timeval c;
+              int gettimeofday (struct timeval *restrict, void *restrict);
+            ]],
+            [[/* glibc uses struct timezone * rather than the POSIX void *
+                 if _GNU_SOURCE is defined.  However, since the only portable
+                 use of gettimeofday uses NULL as the second parameter, and
+                 since the glibc definition is actually more typesafe, it is
+                 not worth wrapping this to get a compliant signature.  */
+              int (*f) (struct timeval *restrict, void *restrict)
+                = gettimeofday;
+              int x = f (&c, 0);
+              return !(x | c.tv_sec | c.tv_usec);
+            ]])],
+          [gl_cv_func_gettimeofday_posix_signature=yes],
+          [AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM(
+              [[#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+              ]])],
+            [gl_cv_func_gettimeofday_posix_signature=almost],
+            [gl_cv_func_gettimeofday_posix_signature=no])])])
+    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+      gl_gettimeofday_timezone='struct timezone'
+    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+    dnl If we override 'struct timeval', we also have to override gettimeofday.
+    if test $REPLACE_STRUCT_TIMEVAL = 1; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+    m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
+      gl_FUNC_TZSET_CLOBBER
+      case "$gl_cv_func_tzset_clobber" in
+        *yes)
+          REPLACE_GETTIMEOFDAY=1
+          gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+          AC_DEFINE([tzset], [rpl_tzset],
+            [Define to rpl_tzset if the wrapper function should be used.])
+          AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
+            [Define if tzset clobbers localtime's static buffer.])
+          ;;
+      esac
+    ])
+  fi
+  AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
+    [Define this to 'void' or 'struct timezone' to match the system's
+     declaration of the second argument to gettimeofday.])
+])
+
+
+dnl See if gettimeofday clobbers the static buffer that localtime uses
+dnl for its return value.  The gettimeofday function from Mac OS X 10.0.4
+dnl (i.e., Darwin 1.3.7) has this problem.
+dnl
+dnl If it does, then arrange to use gettimeofday and localtime only via
+dnl the wrapper functions that work around the problem.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+  [gl_cv_func_gettimeofday_clobber],
+  [AC_RUN_IFELSE(
+     [AC_LANG_PROGRAM(
+        [[#include <string.h>
+          #include <sys/time.h>
+          #include <time.h>
+          #include <stdlib.h>
+        ]],
+        [[
+          time_t t = 0;
+          struct tm *lt;
+          struct tm saved_lt;
+          struct timeval tv;
+          lt = localtime (&t);
+          saved_lt = *lt;
+          gettimeofday (&tv, NULL);
+          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+        ]])],
+     [gl_cv_func_gettimeofday_clobber=no],
+     [gl_cv_func_gettimeofday_clobber=yes],
+     [# When cross-compiling:
+      case "$host_os" in
+                # Guess all is fine on glibc systems.
+        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+                # If we don't know, assume the worst.
+        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+      esac
+     ])])
+
+ case "$gl_cv_func_gettimeofday_clobber" in
+   *yes)
+     REPLACE_GETTIMEOFDAY=1
+     gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+     AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+       [Define if gettimeofday clobbers the localtime buffer.])
+     ;;
+ esac
+])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+  REPLACE_GMTIME=1
+  REPLACE_LOCALTIME=1
+])
+
+# Prerequisites of lib/gettimeofday.c.
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+  AC_CHECK_HEADERS([sys/timeb.h])
+  AC_CHECK_FUNCS([_ftime])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/glibc21.m4 ./gdb/gnulib/import/m4/glibc21.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/glibc21.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/glibc21.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-cache.m4 ./gdb/gnulib/import/m4/gnulib-cache.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-cache.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/gnulib-cache.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes lstat memchr memmem pathmax readlink rename strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
+#   gnulib-tool --import --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes limits-h lstat memchr memmem pathmax rawmemchr readlink rename signal-h strchrnul strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -40,12 +40,16 @@ gl_MODULES([
   fnmatch-gnu
   frexpl
   inttypes
+  limits-h
   lstat
   memchr
   memmem
   pathmax
+  rawmemchr
   readlink
   rename
+  signal-h
+  strchrnul
   strstr
   strtok_r
   sys_stat
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-common.m4 ./gdb/gnulib/import/m4/gnulib-common.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-common.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/gnulib-common.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 33
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 36
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -49,6 +49,16 @@ AC_DEFUN([gl_COMMON_BODY], [
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
 
+/* gcc supports the "unused" attribute on possibly unused labels, and
+   g++ has since version 4.5.  Note to support C++ as well as C,
+   _GL_UNUSED_LABEL should be used with a trailing ;  */
+#if !defined __cplusplus || __GNUC__ > 4 \
+    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
 /* The __pure__ attribute was added in gcc 2.96.  */
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
@@ -243,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
 [
   dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
   dnl as "cc", and GCC as "gcc". They have different object file formats and
-  dnl library formats. In particular, the GNU binutils programs ar, ranlib
+  dnl library formats. In particular, the GNU binutils programs ar and ranlib
   dnl produce libraries that work only with gcc, not with cc.
   AC_REQUIRE([AC_PROG_CC])
+  AC_BEFORE([$0], [AM_PROG_AR])
   AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
     [
       AC_EGREP_CPP([Amsterdam],
@@ -257,25 +268,37 @@ Amsterdam
         [gl_cv_c_amsterdam_compiler=yes],
         [gl_cv_c_amsterdam_compiler=no])
     ])
-  if test -z "$AR"; then
-    if test $gl_cv_c_amsterdam_compiler = yes; then
+
+  dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
+  dnl building with __ACK__.
+  if test $gl_cv_c_amsterdam_compiler = yes; then
+    if test -z "$AR"; then
       AR='cc -c.a'
-      if test -z "$ARFLAGS"; then
-        ARFLAGS='-o'
-      fi
-    else
-      dnl Use the Automake-documented default values for AR and ARFLAGS,
-      dnl but prefer ${host}-ar over ar (useful for cross-compiling).
-      AC_CHECK_TOOL([AR], [ar], [ar])
-      if test -z "$ARFLAGS"; then
-        ARFLAGS='cru'
-      fi
     fi
-  else
     if test -z "$ARFLAGS"; then
-      ARFLAGS='cru'
+      ARFLAGS='-o'
     fi
+  else
+    dnl AM_PROG_AR was added in automake v1.11.2.  AM_PROG_AR does not AC_SUBST
+    dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
+    dnl script on-demand, if not specified by ./configure of course).
+    dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
+    dnl will be ignored.  Also, pay attention to call AM_PROG_AR in else block
+    dnl because AM_PROG_AR is written so it could re-set AR variable even for
+    dnl __ACK__.  It may seem like its easier to avoid calling the macro here,
+    dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
+    dnl default value and automake should usually know them).
+    m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:])
   fi
+
+  dnl In case the code above has not helped with setting AR/ARFLAGS, use
+  dnl Automake-documented default values for AR and ARFLAGS, but prefer
+  dnl ${host}-ar over ar (useful for cross-compiling).
+  AC_CHECK_TOOL([AR], [ar], [ar])
+  if test -z "$ARFLAGS"; then
+    ARFLAGS='cr'
+  fi
+
   AC_SUBST([AR])
   AC_SUBST([ARFLAGS])
   if test -z "$RANLIB"; then
@@ -294,6 +317,8 @@ Amsterdam
 # for interoperability with automake-1.9.6 from autoconf-2.62.
 # Remove this macro when we can assume autoconf >= 2.62 or
 # autoconf >= 2.60 && automake >= 1.10.
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
 m4_ifdef([AC_PROG_MKDIR_P], [
   dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
   m4_define([AC_PROG_MKDIR_P],
@@ -304,27 +329,31 @@ m4_ifdef([AC_PROG_MKDIR_P], [
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
+])
 
 # AC_C_RESTRICT
-# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
-# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
-# works.
-# This definition can be removed once autoconf >= 2.62 can be assumed.
-m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[
+# This definition is copied from post-2.69 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.69.  It can be removed
+# once autoconf >= 2.70 can be assumed.  It's painful to check version
+# numbers, and in practice this macro is more up-to-date than Autoconf
+# is, so override Autoconf unconditionally.
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
    # The order here caters to the fact that C++ does not require restrict.
    for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-      [[typedef int * int_ptr;
-        int foo (int_ptr $ac_kw ip) {
-        return ip[0];
-       }]],
-      [[int s[1];
-        int * $ac_kw t = s;
-        t[0] = 0;
-        return foo(t)]])],
+     AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+	 [[typedef int *int_ptr;
+	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
+	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+	   int bar (int ip[$ac_kw]) { return ip[0]; }
+	 ]],
+	 [[int s[1];
+	   int *$ac_kw t = s;
+	   t[0] = 0;
+	   return foo (t) + bar (t);
+	 ]])],
       [ac_cv_c_restrict=$ac_kw])
      test "$ac_cv_c_restrict" != no && break
    done
@@ -334,21 +363,21 @@ AC_DEFUN([AC_C_RESTRICT],
    nothing if this is not supported.  Do not define if restrict is
    supported directly.  */
 #undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict, even
-   though the corresponding Sun C compiler does, which causes
-   "#define restrict _Restrict" in the previous line.  Perhaps some future
-   version of Sun C++ will work with _Restrict; if so, it'll probably
-   define __RESTRICT, just as Sun C does.  */
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
 #if defined __SUNPRO_CC && !defined __RESTRICT
 # define _Restrict
+# define __restrict__
 #endif])
  case $ac_cv_c_restrict in
    restrict) ;;
    no) AC_DEFINE([restrict], []) ;;
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
-])
-])
+])# AC_C_RESTRICT
 
 # gl_BIGENDIAN
 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
@@ -371,3 +400,63 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
   AC_CACHE_VAL([$1], [$2])
   as_echo_n="$saved_as_echo_n"
 ])
+
+# AS_VAR_COPY was added in autoconf 2.63b
+m4_define_default([AS_VAR_COPY],
+[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+
+# AC_PROG_SED was added in autoconf 2.59b
+m4_ifndef([AC_PROG_SED],
+[AC_DEFUN([AC_PROG_SED],
+[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
+    [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
+     dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
+     ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     AS_UNSET([ac_script])
+     if test -z "$SED"; then
+       ac_path_SED_found=false
+       _AS_PATH_WALK([], [
+         for ac_prog in sed gsed; do
+           for ac_exec_ext in '' $ac_executable_extensions; do
+             ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+             AS_EXECUTABLE_P(["$ac_path_SED"]) || continue
+             case `"$ac_path_SED" --version 2>&1` in
+               *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;;
+               *)
+                 ac_count=0
+                 _AS_ECHO_N([0123456789]) >conftest.in
+                 while :
+                 do
+                   cat conftest.in conftest.in >conftest.tmp
+                   mv conftest.tmp conftest.in
+                   cp conftest.in conftest.nl
+                   echo >> conftest.nl
+                   "$ac_path_SED" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+                   diff conftest.out conftest.nl >/dev/null 2>&1 || break
+                   ac_count=`expr $ac_count + 1`
+                   if test $ac_count -gt ${ac_path_SED_max-0}; then
+                     # Best so far, but keep looking for better
+                     ac_cv_path_SED=$ac_path_SED
+                     ac_path_SED_max=$ac_count
+                   fi
+                   test $ac_count -gt 10 && break
+                 done
+                 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+             esac
+             $ac_path_SED_found && break 3
+           done
+         done])
+       if test -z "$ac_cv_path_SED"; then
+         AC_ERROR([no acceptable sed could be found in \$PATH])
+       fi
+     else
+       ac_cv_path_SED=$SED
+     fi
+ SED="$ac_cv_path_SED"
+ AC_SUBST([SED])dnl
+ rm -f conftest.sed
+])])])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-comp.m4 ./gdb/gnulib/import/m4/gnulib-comp.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-comp.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/gnulib-comp.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,12 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_ES$])dnl a valid locale name
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+
+  # Pre-early section.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([gl_PROG_AR_RANLIB])
+
+  # Code from module absolute-header:
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module canonicalize-lgpl:
@@ -50,8 +55,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module double-slash-root:
   # Code from module errno:
   # Code from module extensions:
-  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   # Code from module extern-inline:
+  # Code from module flexmember:
   # Code from module float:
   # Code from module fnmatch:
   # Code from module fnmatch-gnu:
@@ -60,6 +65,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module fpucw:
   # Code from module frexp:
   # Code from module frexpl:
+  # Code from module gettimeofday:
+  # Code from module hard-locale:
   # Code from module include_next:
   # Code from module inttypes:
   # Code from module inttypes-incomplete:
@@ -67,6 +74,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module isnanl-nolibm:
   # Code from module largefile:
   AC_REQUIRE([AC_SYS_LARGEFILE])
+  # Code from module limits-h:
   # Code from module localcharset:
   # Code from module lstat:
   # Code from module malloc-posix:
@@ -81,10 +89,12 @@ AC_DEFUN([gl_EARLY],
   # Code from module multiarch:
   # Code from module nocrash:
   # Code from module pathmax:
+  # Code from module rawmemchr:
   # Code from module readlink:
   # Code from module rename:
   # Code from module rmdir:
   # Code from module same-inode:
+  # Code from module signal-h:
   # Code from module snippet/_Noreturn:
   # Code from module snippet/arg-nonnull:
   # Code from module snippet/c++defs:
@@ -96,6 +106,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module stdint:
   # Code from module stdio:
   # Code from module stdlib:
+  # Code from module strchrnul:
   # Code from module streq:
   # Code from module string:
   # Code from module strnlen1:
@@ -103,6 +114,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module strstr-simple:
   # Code from module strtok_r:
   # Code from module sys_stat:
+  # Code from module sys_time:
   # Code from module sys_types:
   # Code from module time:
   # Code from module unistd:
@@ -140,7 +152,8 @@ AC_DEFUN([gl_INIT],
   gl_CONFIGMAKE_PREP
   gl_DIRENT_H
   gl_FUNC_DIRFD
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+     || test $REPLACE_DIRFD = 1; then
     AC_LIBOBJ([dirfd])
     gl_PREREQ_DIRFD
   fi
@@ -149,6 +162,7 @@ AC_DEFUN([gl_INIT],
   gl_DOUBLE_SLASH_ROOT
   gl_HEADER_ERRNO_H
   AC_REQUIRE([gl_EXTERN_INLINE])
+  AC_C_FLEXIBLE_ARRAY_MEMBER
   gl_FLOAT_H
   if test $REPLACE_FLOAT_LDBL = 1; then
     AC_LIBOBJ([float])
@@ -176,6 +190,13 @@ AC_DEFUN([gl_INIT],
     AC_LIBOBJ([frexpl])
   fi
   gl_MATH_MODULE_INDICATOR([frexpl])
+  gl_FUNC_GETTIMEOFDAY
+  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+    AC_LIBOBJ([gettimeofday])
+    gl_PREREQ_GETTIMEOFDAY
+  fi
+  gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+  gl_HARD_LOCALE
   gl_INTTYPES_H
   gl_INTTYPES_INCOMPLETE
   gl_FUNC_ISNAND_NO_LIBM
@@ -189,6 +210,7 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_ISNANL
   fi
   AC_REQUIRE([gl_LARGEFILE])
+  gl_LIMITS_H
   gl_LOCALCHARSET
   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
@@ -241,6 +263,12 @@ AC_DEFUN([gl_INIT],
   gl_STRING_MODULE_INDICATOR([memmem])
   gl_MULTIARCH
   gl_PATHMAX
+  gl_FUNC_RAWMEMCHR
+  if test $HAVE_RAWMEMCHR = 0; then
+    AC_LIBOBJ([rawmemchr])
+    gl_PREREQ_RAWMEMCHR
+  fi
+  gl_STRING_MODULE_INDICATOR([rawmemchr])
   gl_FUNC_READLINK
   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
     AC_LIBOBJ([readlink])
@@ -257,6 +285,7 @@ AC_DEFUN([gl_INIT],
     AC_LIBOBJ([rmdir])
   fi
   gl_UNISTD_MODULE_INDICATOR([rmdir])
+  gl_SIGNAL_H
   gt_TYPE_SSIZE_T
   gl_FUNC_STAT
   if test $REPLACE_STAT = 1; then
@@ -269,6 +298,12 @@ AC_DEFUN([gl_INIT],
   gl_STDINT_H
   gl_STDIO_H
   gl_STDLIB_H
+  gl_FUNC_STRCHRNUL
+  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
+    AC_LIBOBJ([strchrnul])
+    gl_PREREQ_STRCHRNUL
+  fi
+  gl_STRING_MODULE_INDICATOR([strchrnul])
   gl_HEADER_STRING_H
   gl_FUNC_STRSTR
   if test $REPLACE_STRSTR = 1; then
@@ -287,6 +322,8 @@ AC_DEFUN([gl_INIT],
   gl_STRING_MODULE_INDICATOR([strtok_r])
   gl_HEADER_SYS_STAT_H
   AC_PROG_MKDIR_P
+  gl_HEADER_SYS_TIME_H
+  AC_PROG_MKDIR_P
   gl_SYS_TYPES_H
   AC_PROG_MKDIR_P
   gl_HEADER_TIME_H
@@ -449,6 +486,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/dirname.h
   lib/dosname.h
   lib/errno.in.h
+  lib/flexmember.h
   lib/float+.h
   lib/float.c
   lib/float.in.h
@@ -458,6 +496,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fpucw.h
   lib/frexp.c
   lib/frexpl.c
+  lib/gettimeofday.c
+  lib/hard-locale.c
+  lib/hard-locale.h
   lib/inttypes.in.h
   lib/isnan.c
   lib/isnand-nolibm.h
@@ -465,6 +506,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/isnanl-nolibm.h
   lib/isnanl.c
   lib/itold.c
+  lib/limits.in.h
   lib/localcharset.c
   lib/localcharset.h
   lib/lstat.c
@@ -483,20 +525,24 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/memchr.valgrind
   lib/memmem.c
   lib/pathmax.h
+  lib/rawmemchr.c
+  lib/rawmemchr.valgrind
   lib/readlink.c
   lib/ref-add.sin
   lib/ref-del.sin
   lib/rename.c
   lib/rmdir.c
   lib/same-inode.h
+  lib/signal.in.h
   lib/stat.c
   lib/stdbool.in.h
   lib/stddef.in.h
   lib/stdint.in.h
-  lib/stdio.c
   lib/stdio.in.h
   lib/stdlib.in.h
   lib/str-two-way.h
+  lib/strchrnul.c
+  lib/strchrnul.valgrind
   lib/streq.h
   lib/string.in.h
   lib/stripslash.c
@@ -505,6 +551,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/strstr.c
   lib/strtok_r.c
   lib/sys_stat.in.h
+  lib/sys_time.in.h
   lib/sys_types.in.h
   lib/time.in.h
   lib/unistd.c
@@ -514,6 +561,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/wctype-h.c
   lib/wctype.in.h
   m4/00gnulib.m4
+  m4/absolute-header.m4
   m4/alloca.m4
   m4/canonicalize.m4
   m4/codeset.m4
@@ -529,19 +577,23 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/extensions.m4
   m4/extern-inline.m4
   m4/fcntl-o.m4
+  m4/flexmember.m4
   m4/float_h.m4
   m4/fnmatch.m4
   m4/fpieee.m4
   m4/frexp.m4
   m4/frexpl.m4
+  m4/gettimeofday.m4
   m4/glibc21.m4
   m4/gnulib-common.m4
+  m4/hard-locale.m4
   m4/include_next.m4
   m4/inttypes-pri.m4
   m4/inttypes.m4
   m4/isnand.m4
   m4/isnanl.m4
   m4/largefile.m4
+  m4/limits-h.m4
   m4/localcharset.m4
   m4/locale-fr.m4
   m4/locale-ja.m4
@@ -562,9 +614,11 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/nocrash.m4
   m4/off_t.m4
   m4/pathmax.m4
+  m4/rawmemchr.m4
   m4/readlink.m4
   m4/rename.m4
   m4/rmdir.m4
+  m4/signal_h.m4
   m4/ssize_t.m4
   m4/stat.m4
   m4/stdbool.m4
@@ -572,10 +626,13 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stdint.m4
   m4/stdio_h.m4
   m4/stdlib_h.m4
+  m4/strchrnul.m4
   m4/string_h.m4
   m4/strstr.m4
   m4/strtok_r.m4
+  m4/sys_socket_h.m4
   m4/sys_stat_h.m4
+  m4/sys_time_h.m4
   m4/sys_types_h.m4
   m4/time_h.m4
   m4/unistd_h.m4
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-tool.m4 ./gdb/gnulib/import/m4/gnulib-tool.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/gnulib-tool.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/gnulib-tool.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/hard-locale.m4 ./gdb/gnulib/import/m4/hard-locale.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/hard-locale.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/hard-locale.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,11 @@
+# hard-locale.m4 serial 8
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl No prerequisites of lib/hard-locale.c.
+AC_DEFUN([gl_HARD_LOCALE],
+[
+  :
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/include_next.m4 ./gdb/gnulib/import/m4/include_next.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/include_next.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/include_next.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # include_next.m4 serial 23
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -192,56 +192,9 @@ dnl until we can assume autoconf 2.64 or
              if test AS_VAR_GET(gl_header_exists) = yes; then
              AS_VAR_POPDEF([gl_header_exists])
             ])
-               AC_LANG_CONFTEST(
-                 [AC_LANG_SOURCE(
-                    [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
-                  )])
-               dnl AIX "xlc -E" and "cc -E" omit #line directives for header
-               dnl files that contain only a #include of other header files and
-               dnl no non-comment tokens of their own. This leads to a failure
-               dnl to detect the absolute name of <dirent.h>, <signal.h>,
-               dnl <poll.h> and others. The workaround is to force preservation
-               dnl of comments through option -C. This ensures all necessary
-               dnl #line directives are present. GCC supports option -C as well.
-               case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-changequote(,)
-               case "$host_os" in
-                 mingw*)
-                   dnl For the sake of native Windows compilers (excluding gcc),
-                   dnl treat backslash as a directory separator, like /.
-                   dnl Actually, these compilers use a double-backslash as
-                   dnl directory separator, inside the
-                   dnl   # line "filename"
-                   dnl directives.
-                   gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-               dnl A sed expression that turns a string into a basic regular
-               dnl expression, for use within "/.../".
-               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-changequote([,])
-               gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
-                                        | sed -e "$gl_make_literal_regex_sed"`
-               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-changequote(,)dnl
-                   s|^/[^/]|//&|
-changequote([,])dnl
-                   p
-                   q
-                 }'
-               dnl eval is necessary to expand gl_absname_cpp.
-               dnl Ultrix and Pyramid sh refuse to redirect output of eval,
-               dnl so use subshell.
-               AS_VAR_SET(gl_next_header,
-                 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-                      sed -n "$gl_absolute_header_sed"`'"'])
+           gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
+           AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
+           AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
           m4_if([$2], [check],
             [else
                AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/inttypes.m4 ./gdb/gnulib/import/m4/inttypes.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/inttypes.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/inttypes.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # inttypes.m4 serial 26
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -148,6 +148,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
   HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
   REPLACE_STRTOIMAX=0;   AC_SUBST([REPLACE_STRTOIMAX])
+  REPLACE_STRTOUMAX=0;   AC_SUBST([REPLACE_STRTOUMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
   PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/inttypes-pri.m4 ./gdb/gnulib/import/m4/inttypes-pri.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/inttypes-pri.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/inttypes-pri.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/isnand.m4 ./gdb/gnulib/import/m4/isnand.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/isnand.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/isnand.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # isnand.m4 serial 11
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/isnanl.m4 ./gdb/gnulib/import/m4/isnanl.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/isnanl.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/isnanl.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# isnanl.m4 serial 17
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# isnanl.m4 serial 19
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -108,11 +108,8 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
     ])
 ])
 
-dnl Test whether isnanl() recognizes all numbers which are neither finite nor
-dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64.
-dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests
-dnl - for pseudo-denormals on i686 and x86_64,
-dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
+dnl Test whether isnanl() recognizes all canonical numbers which are neither
+dnl finite nor infinite.
 AC_DEFUN([gl_FUNC_ISNANL_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
@@ -177,7 +174,7 @@ int main ()
 # ifdef WORDS_BIGENDIAN
 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
-       ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
+       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
        (unsigned int) (mantlo) << 16                                        \
      }
 # else
@@ -197,41 +194,35 @@ int main ()
     if (!isnanl (x.value))
       result |= 2;
   }
-  /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
-     Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
-       Intel IA-64 Architecture Software Developer's Manual, Volume 1:
-       Application Architecture.
-       Table 5-2 "Floating-Point Register Encodings"
-       Figure 5-6 "Memory to Floating-Point Register Data Translation"
-   */
+  /* isnanl should return something even for noncanonical values.  */
   { /* Pseudo-NaN.  */
     static memory_long_double x =
       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 4;
   }
   { /* Pseudo-Infinity.  */
     static memory_long_double x =
       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 8;
   }
   { /* Pseudo-Zero.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 16;
   }
   { /* Unnormalized number.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 32;
   }
   { /* Pseudo-Denormal.  */
     static memory_long_double x =
       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
-    if (!isnanl (x.value))
+    if (isnanl (x.value) && !isnanl (x.value))
       result |= 64;
   }
 #endif
@@ -240,16 +231,6 @@ int main ()
 }]])],
         [gl_cv_func_isnanl_works=yes],
         [gl_cv_func_isnanl_works=no],
-        [case "$host_cpu" in
-                                 # Guess no on ia64, x86_64, i386.
-           ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
-           *)
-             case "$host_os" in
-               netbsd*) gl_cv_func_isnanl_works="guessing no";;
-               *)       gl_cv_func_isnanl_works="guessing yes";;
-             esac
-             ;;
-         esac
-        ])
+        [gl_cv_func_isnanl_works="guessing yes"])
     ])
 ])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/largefile.m4 ./gdb/gnulib/import/m4/largefile.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/largefile.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/largefile.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,13 +1,14 @@
 # Enable large files on systems where this is not the default.
 
-# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# The following implementation works around a problem in autoconf <= 2.68;
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
-m4_version_prereq([2.69], [] ,[
+# The following implementation works around a problem in autoconf <= 2.69;
+# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# or configures them incorrectly in some cases.
+m4_version_prereq([2.70], [] ,[
 
 # _AC_SYS_LARGEFILE_TEST_INCLUDES
 # -------------------------------
@@ -25,9 +26,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUD
 
 
 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-#				CACHE-VAR,
-#				DESCRIPTION,
-#				PROLOGUE, [FUNCTION-BODY])
+#                               CACHE-VAR,
+#                               DESCRIPTION,
+#                               PROLOGUE, [FUNCTION-BODY])
 # --------------------------------------------------------
 m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
 [AC_CACHE_CHECK([for $1 value needed for large files], [$3],
@@ -93,15 +94,11 @@ if test "$enable_largefile" != no; then
       [_AC_SYS_LARGEFILE_TEST_INCLUDES])
   fi
 
-  AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
-[/* Enable large inode numbers on Mac OS X.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif])
+  AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
+    [Enable large inode numbers on Mac OS X 10.5.])
 fi
 ])# AC_SYS_LARGEFILE
-
-])# m4_version_prereq 2.69
+])# m4_version_prereq 2.70
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
 # system headers.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/limits-h.m4 ./gdb/gnulib/import/m4/limits-h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/limits-h.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/limits-h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+dnl Check whether limits.h has needed features.
+
+dnl Copyright 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_DEFUN_ONCE([gl_LIMITS_H],
+[
+  gl_CHECK_NEXT_HEADERS([limits.h])
+
+  AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
+    [gl_cv_header_limits_width],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+                          #endif
+                          #include <limits.h>
+                          int ullw = ULLONG_WIDTH;]])],
+       [gl_cv_header_limits_width=yes],
+       [gl_cv_header_limits_width=no])])
+  if test "$gl_cv_header_limits_width" = yes; then
+    LIMITS_H=
+  else
+    LIMITS_H=limits.h
+  fi
+  AC_SUBST([LIMITS_H])
+  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/localcharset.m4 ./gdb/gnulib/import/m4/localcharset.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/localcharset.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/localcharset.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-fr.m4 ./gdb/gnulib/import/m4/locale-fr.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-fr.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/locale-fr.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # locale-fr.m4 serial 17
-dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-ja.m4 ./gdb/gnulib/import/m4/locale-ja.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-ja.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/locale-ja.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # locale-ja.m4 serial 12
-dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-zh.m4 ./gdb/gnulib/import/m4/locale-zh.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/locale-zh.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/locale-zh.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # locale-zh.m4 serial 12
-dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/longlong.m4 ./gdb/gnulib/import/m4/longlong.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/longlong.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/longlong.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/lstat.m4 ./gdb/gnulib/import/m4/lstat.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/lstat.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/lstat.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
-# serial 26
+# serial 27
 
-# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2016 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -37,30 +37,28 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_
     [gl_cv_func_lstat_dereferences_slashed_symlink],
     [rm -f conftest.sym conftest.file
      echo >conftest.file
-     if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
-       AC_RUN_IFELSE(
-         [AC_LANG_PROGRAM(
-            [AC_INCLUDES_DEFAULT],
-            [[struct stat sbuf;
-              /* Linux will dereference the symlink and fail, as required by
-                 POSIX.  That is better in the sense that it means we will not
-                 have to compile and use the lstat wrapper.  */
-              return lstat ("conftest.sym/", &sbuf) == 0;
-            ]])],
-         [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
-         [gl_cv_func_lstat_dereferences_slashed_symlink=no],
-         [case "$host_os" in
-                    # Guess yes on glibc systems.
-            *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-                    # If we don't know, assume the worst.
-            *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
-          esac
-         ])
-     else
-       # If the 'ln -s' command failed, then we probably don't even
-       # have an lstat function.
-       gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
-     fi
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [AC_INCLUDES_DEFAULT],
+          [[struct stat sbuf;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
+          ]])],
+       [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+       [gl_cv_func_lstat_dereferences_slashed_symlink=no],
+       [case "$host_os" in
+          *-gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *)
+            # If we don't know, assume the worst.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+        esac
+       ])
      rm -f conftest.sym conftest.file
     ])
   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/malloca.m4 ./gdb/gnulib/import/m4/malloca.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/malloca.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/malloca.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/malloc.m4 ./gdb/gnulib/import/m4/malloc.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/malloc.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/malloc.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,13 +1,13 @@
-# malloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# malloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 m4_version_prereq([2.70], [] ,[
 
-# This is taken from the following Autoconf patch:
-# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+# This is adapted with modifications from upstream Autoconf here:
+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
   AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -23,7 +23,10 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
             char *malloc ();
             #endif
           ]],
-          [[return ! malloc (0);]])
+          [[char *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;]])
        ],
        [ac_cv_func_malloc_0_nonnull=yes],
        [ac_cv_func_malloc_0_nonnull=no],
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/math_h.m4 ./gdb/gnulib/import/m4/math_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/math_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/math_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # math_h.m4 serial 114
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbrtowc.m4 ./gdb/gnulib/import/m4/mbrtowc.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbrtowc.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/mbrtowc.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 25
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 Free Software Foundation,
+# mbrtowc.m4 serial 27  -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -39,6 +39,8 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
       gl_MBRTOWC_NULL_ARG2
       gl_MBRTOWC_RETVAL
       gl_MBRTOWC_NUL_RETVAL
+      gl_MBRTOWC_EMPTY_INPUT
+      gl_MBRTOWC_C_LOCALE
       case "$gl_cv_func_mbrtowc_null_arg1" in
         *yes) ;;
         *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
@@ -67,6 +69,21 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
            REPLACE_MBRTOWC=1
            ;;
       esac
+      case "$gl_cv_func_mbrtowc_empty_input" in
+        *yes) ;;
+        *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
+             [Define if the mbrtowc function does not return (size_t) -2
+              for empty input.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case $gl_cv_C_locale_sans_EILSEQ in
+        *yes) ;;
+        *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
+             [Define to 1 if the C locale may have encoding errors.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
     fi
   fi
 ])
@@ -533,6 +550,81 @@ int main ()
     ])
 ])
 
+dnl Test whether mbrtowc returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc works on empty input],
+    [gl_cv_func_mbrtowc_empty_input],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                     # Guess no on AIX and glibc systems.
+        aix* | *-gnu*)
+                    gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+        *)          gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+      esac
+changequote([,])dnl
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+           #include <wchar.h>
+           static wchar_t wc;
+           static mbstate_t mbs;
+           int
+           main (void)
+           {
+             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+           }]])],
+        [gl_cv_func_mbrtowc_empty_input=yes],
+        [gl_cv_func_mbrtowc_empty_input=no],
+        [:])
+    ])
+])
+
+dnl Test whether mbrtowc reports encoding errors in the C locale.
+dnl Although POSIX was never intended to allow this, the GNU C Library
+dnl and other implementations do it.  See:
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+
+AC_DEFUN([gl_MBRTOWC_C_LOCALE],
+[
+  AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+    [gl_cv_C_locale_sans_EILSEQ],
+    [
+     dnl Initial guess, used when cross-compiling or when no suitable locale
+     dnl is present.
+     gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
+          ]], [[
+            int i;
+            char *locale = setlocale (LC_ALL, "C");
+            if (! locale)
+              return 1;
+            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+              {
+                char c = i;
+                wchar_t wc;
+                mbstate_t mbs = { 0, };
+                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+                if (1 < ss)
+                  return 1;
+              }
+            return 0;
+          ]])],
+      [gl_cv_C_locale_sans_EILSEQ=yes],
+      [gl_cv_C_locale_sans_EILSEQ=no],
+      [:])])
+])
+
 # Prerequisites of lib/mbrtowc.c.
 AC_DEFUN([gl_PREREQ_MBRTOWC], [
   :
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbsinit.m4 ./gdb/gnulib/import/m4/mbsinit.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbsinit.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/mbsinit.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbsrtowcs.m4 ./gdb/gnulib/import/m4/mbsrtowcs.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbsrtowcs.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/mbsrtowcs.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # mbsrtowcs.m4 serial 13
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbstate_t.m4 ./gdb/gnulib/import/m4/mbstate_t.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mbstate_t.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/mbstate_t.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/memchr.m4 ./gdb/gnulib/import/m4/memchr.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/memchr.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/memchr.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/memmem.m4 ./gdb/gnulib/import/m4/memmem.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/memmem.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/memmem.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # memmem.m4 serial 24
-dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -93,7 +93,7 @@ AC_DEFUN([gl_FUNC_MEMMEM],
 #include <string.h> /* for memmem */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 ]], [[
     int result = 0;
     size_t m = 1000000;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mmap-anon.m4 ./gdb/gnulib/import/m4/mmap-anon.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/mmap-anon.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/mmap-anon.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/multiarch.m4 ./gdb/gnulib/import/m4/multiarch.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/multiarch.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/multiarch.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # multiarch.m4 serial 7
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/nocrash.m4 ./gdb/gnulib/import/m4/nocrash.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/nocrash.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/nocrash.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -110,11 +110,12 @@ nocrash_init (void)
 #else
 /* Avoid a crash on POSIX systems.  */
 #include <signal.h>
+#include <unistd.h>
 /* A POSIX signal handler.  */
 static void
 exception_handler (int sig)
 {
-  exit (1);
+  _exit (1);
 }
 static void
 nocrash_init (void)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/off_t.m4 ./gdb/gnulib/import/m4/off_t.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/off_t.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/off_t.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # off_t.m4 serial 1
-dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/pathmax.m4 ./gdb/gnulib/import/m4/pathmax.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/pathmax.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/pathmax.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rawmemchr.m4 ./gdb/gnulib/import/m4/rawmemchr.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rawmemchr.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/rawmemchr.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,20 @@
+# rawmemchr.m4 serial 2
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RAWMEMCHR],
+[
+  dnl Persuade glibc <string.h> to declare rawmemchr().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS([rawmemchr])
+  if test $ac_cv_func_rawmemchr = no; then
+    HAVE_RAWMEMCHR=0
+  fi
+])
+
+# Prerequisites of lib/strchrnul.c.
+AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/readlink.m4 ./gdb/gnulib/import/m4/readlink.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/readlink.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/readlink.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # readlink.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rename.m4 ./gdb/gnulib/import/m4/rename.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rename.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/rename.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # serial 26
 
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rmdir.m4 ./gdb/gnulib/import/m4/rmdir.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/rmdir.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/rmdir.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # rmdir.m4 serial 13
-dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/signal_h.m4 ./gdb/gnulib/import/m4/signal_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/signal_h.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/signal_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,83 @@
+# signal_h.m4 serial 18
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SIGNAL_H],
+[
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+  gl_NEXT_HEADERS([signal.h])
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
+  AC_CHECK_TYPE([volatile sig_atomic_t], [],
+    [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
+#include <signal.h>
+    ]])
+
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
+  AC_REQUIRE([AC_TYPE_UID_T])
+
+  dnl Persuade glibc <signal.h> to define sighandler_t.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
+#include <signal.h>
+    ]])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+    ]], [pthread_sigmask sigaction
+    sigaddset sigdelset sigemptyset sigfillset sigismember
+    sigpending sigprocmask])
+])
+
+AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
+[
+  AC_CHECK_TYPES([sigset_t],
+    [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+    [[
+      #include <signal.h>
+      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+      #include <sys/types.h>
+    ]])
+  if test $gl_cv_type_sigset_t != yes; then
+    HAVE_SIGSET_T=0
+  fi
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+  GNULIB_PTHREAD_SIGMASK=0;    AC_SUBST([GNULIB_PTHREAD_SIGMASK])
+  GNULIB_RAISE=0;              AC_SUBST([GNULIB_RAISE])
+  GNULIB_SIGNAL_H_SIGPIPE=0;   AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+  GNULIB_SIGPROCMASK=0;        AC_SUBST([GNULIB_SIGPROCMASK])
+  GNULIB_SIGACTION=0;          AC_SUBST([GNULIB_SIGACTION])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+  HAVE_PTHREAD_SIGMASK=1;      AC_SUBST([HAVE_PTHREAD_SIGMASK])
+  HAVE_RAISE=1;                AC_SUBST([HAVE_RAISE])
+  HAVE_SIGSET_T=1;             AC_SUBST([HAVE_SIGSET_T])
+  HAVE_SIGINFO_T=1;            AC_SUBST([HAVE_SIGINFO_T])
+  HAVE_SIGACTION=1;            AC_SUBST([HAVE_SIGACTION])
+  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+                               AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+                               AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+  HAVE_SIGHANDLER_T=1;         AC_SUBST([HAVE_SIGHANDLER_T])
+  REPLACE_PTHREAD_SIGMASK=0;   AC_SUBST([REPLACE_PTHREAD_SIGMASK])
+  REPLACE_RAISE=0;             AC_SUBST([REPLACE_RAISE])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/ssize_t.m4 ./gdb/gnulib/import/m4/ssize_t.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/ssize_t.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/ssize_t.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stat.m4 ./gdb/gnulib/import/m4/stat.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stat.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stat.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # serial 11
 
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdbool.m4 ./gdb/gnulib/import/m4/stdbool.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdbool.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stdbool.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,11 +1,11 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-#serial 5
+#serial 7
 
 # Prepare for substituting <stdbool.h> if it is not supported.
 
@@ -43,56 +43,64 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
         [AC_LANG_PROGRAM(
            [[
              #include <stdbool.h>
-             #ifndef bool
-              "error: bool is not defined"
-             #endif
-             #ifndef false
-              "error: false is not defined"
-             #endif
-             #if false
-              "error: false is not 0"
-             #endif
-             #ifndef true
-              "error: true is not defined"
-             #endif
-             #if true != 1
-              "error: true is not 1"
+
+             #ifdef __cplusplus
+              typedef bool Bool;
+             #else
+              typedef _Bool Bool;
+              #ifndef bool
+               "error: bool is not defined"
+              #endif
+              #ifndef false
+               "error: false is not defined"
+              #endif
+              #if false
+               "error: false is not 0"
+              #endif
+              #ifndef true
+               "error: true is not defined"
+              #endif
+              #if true != 1
+               "error: true is not 1"
+              #endif
              #endif
+
              #ifndef __bool_true_false_are_defined
               "error: __bool_true_false_are_defined is not defined"
              #endif
 
-             struct s { _Bool s: 1; _Bool t; } s;
+             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
 
              char a[true == 1 ? 1 : -1];
              char b[false == 0 ? 1 : -1];
              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
              char d[(bool) 0.5 == true ? 1 : -1];
              /* See body of main program for 'e'.  */
-             char f[(_Bool) 0.0 == false ? 1 : -1];
+             char f[(Bool) 0.0 == false ? 1 : -1];
              char g[true];
-             char h[sizeof (_Bool)];
+             char h[sizeof (Bool)];
              char i[sizeof s.t];
              enum { j = false, k = true, l = false * true, m = true * 256 };
              /* The following fails for
                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             _Bool n[m];
+             Bool n[m];
              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
              /* Catch a bug in an HP-UX C compiler.  See
                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
               */
-             _Bool q = true;
-             _Bool *pq = &q;
+             Bool q = true;
+             Bool *pq = &q;
+             bool *qq = &q;
            ]],
            [[
              bool e = &s;
-             *pq |= q;
-             *pq |= ! q;
+             *pq |= q; *pq |= ! q;
+             *qq |= q; *qq |= ! q;
              /* Refer to every declared value, to avoid compiler optimizations.  */
              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq);
+                     + !m + !n + !o + !p + !q + !pq + !qq);
            ]])],
         [ac_cv_header_stdbool_h=yes],
         [ac_cv_header_stdbool_h=no])])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stddef_h.m4 ./gdb/gnulib/import/m4/stddef_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stddef_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stddef_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 5
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,9 @@ AC_DEFUN([gl_STDDEF_H],
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   STDDEF_H=
+  AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
+    [[#include <stddef.h>
+    ]])
   if test $gt_cv_c_wchar_t = no; then
     HAVE_WCHAR_T=0
     STDDEF_H=stddef.h
@@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
 [
   dnl Assume proper GNU behavior unless another module says otherwise.
   REPLACE_NULL=0;                AC_SUBST([REPLACE_NULL])
+  HAVE_MAX_ALIGN_T=1;            AC_SUBST([HAVE_MAX_ALIGN_T])
   HAVE_WCHAR_T=1;                AC_SUBST([HAVE_WCHAR_T])
 ])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdint.m4 ./gdb/gnulib/import/m4/stdint.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdint.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stdint.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# stdint.m4 serial 43
-dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# stdint.m4 serial 48
+dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,8 @@ AC_DEFUN_ONCE([gl_STDINT_H],
 [
   AC_PREREQ([2.59])dnl
 
+  AC_REQUIRE([gl_LIMITS_H])
+
   dnl Check for long long int and unsigned long long int.
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   if test $ac_cv_type_long_long_int = yes; then
@@ -70,6 +72,8 @@ AC_DEFUN_ONCE([gl_STDINT_H],
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
@@ -150,6 +154,15 @@ uintptr_t h = UINTPTR_MAX;
 intmax_t i = INTMAX_MAX;
 uintmax_t j = UINTMAX_MAX;
 
+/* Check that SIZE_MAX has the correct type, if possible.  */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+       || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
 #include <limits.h> /* for CHAR_BIT */
 #define TYPE_MINIMUM(t) \
   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
@@ -218,6 +231,8 @@ struct s {
           AC_RUN_IFELSE([
             AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 ]
 gl_STDINT_INCLUDES
@@ -278,28 +293,74 @@ static const char *macro_values[] =
          ])
       ])
   fi
+
+  HAVE_C99_STDINT_H=0
+  HAVE_SYS_BITYPES_H=0
+  HAVE_SYS_INTTYPES_H=0
+  STDINT_H=stdint.h
   if test "$gl_cv_header_working_stdint_h" = yes; then
-    STDINT_H=
+    HAVE_C99_STDINT_H=1
+    dnl Now see whether the system <stdint.h> works without
+    dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+    AC_CACHE_CHECK([whether stdint.h predates C++11],
+      [gl_cv_header_stdint_predates_cxx11_h],
+      [gl_cv_header_stdint_predates_cxx11_h=yes
+       AC_COMPILE_IFELSE([
+         AC_LANG_PROGRAM([[
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+         ]])],
+         [gl_cv_header_stdint_predates_cxx11_h=no])])
+
+    if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+      AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+                [Define to 1 if the system <stdint.h> predates C++11.])
+      AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+                [Define to 1 if the system <stdint.h> predates C++11.])
+    fi
+    AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+      [gl_cv_header_stdint_width],
+      [gl_cv_header_stdint_width=no
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+            #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+            #endif
+            #include <stdint.h>
+            ]gl_STDINT_INCLUDES[
+            int iw = UINTMAX_WIDTH;
+            ]])],
+         [gl_cv_header_stdint_width=yes])])
+    if test "$gl_cv_header_stdint_width" = yes; then
+      STDINT_H=
+    fi
   else
     dnl Check for <sys/inttypes.h>, and for
     dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
     AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
     if test $ac_cv_header_sys_inttypes_h = yes; then
       HAVE_SYS_INTTYPES_H=1
-    else
-      HAVE_SYS_INTTYPES_H=0
     fi
-    AC_SUBST([HAVE_SYS_INTTYPES_H])
     if test $ac_cv_header_sys_bitypes_h = yes; then
       HAVE_SYS_BITYPES_H=1
-    else
-      HAVE_SYS_BITYPES_H=0
     fi
-    AC_SUBST([HAVE_SYS_BITYPES_H])
-
     gl_STDINT_TYPE_PROPERTIES
-    STDINT_H=stdint.h
   fi
+
+  # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+  LIMITS_H=limits.h
+  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+
+  AC_SUBST([HAVE_C99_STDINT_H])
+  AC_SUBST([HAVE_SYS_BITYPES_H])
+  AC_SUBST([HAVE_SYS_INTTYPES_H])
   AC_SUBST([STDINT_H])
   AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
 ])
@@ -477,8 +538,3 @@ dnl Remove this when we can assume autoc
 m4_ifdef([AC_COMPUTE_INT], [], [
   AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
 ])
-
-# Hey Emacs!
-# Local Variables:
-# indent-tabs-mode: nil
-# End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdio_h.m4 ./gdb/gnulib/import/m4/stdio_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdio_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stdio_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,14 +1,45 @@
-# stdio_h.m4 serial 43
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdio_h.m4 serial 48
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_STDIO_H],
 [
+  AH_VERBATIM([MINGW_ANSI_STDIO],
+[/* Use GNU style printf and scanf.  */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+])
+  AC_DEFINE([__USE_MINGW_ANSI_STDIO])
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   gl_NEXT_HEADERS([stdio.h])
 
+  dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
+  dnl inttypes.h behave like gnu instead of system; we must give our
+  dnl printf wrapper the right attribute to match.
+  AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
+    [gl_cv_func_printf_attribute_flavor],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+       #define __STDC_FORMAT_MACROS 1
+       #include <stdio.h>
+       #include <inttypes.h>
+       /* For non-mingw systems, compilation will trivially succeed.
+          For mingw, compilation will succeed for older mingw (system
+          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+       #endif
+      ]])], [gl_cv_func_printf_attribute_flavor=system],
+      [gl_cv_func_printf_attribute_flavor=gnu])])
+  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+    AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
+      [Define to 1 if printf and friends should be labeled with
+       attribute "__gnu_printf__" instead of "__printf__"])
+  fi
+
   dnl No need to create extra modules for these functions. Everyone who uses
   dnl <stdio.h> likely needs them.
   GNULIB_FSCANF=1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdlib_h.m4 ./gdb/gnulib/import/m4/stdlib_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/stdlib_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/stdlib_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 41
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 43
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,8 +21,8 @@ AC_DEFUN([gl_STDLIB_H],
 #endif
     ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
-    posix_openpt ptsname ptsname_r random random_r realpath rpmatch
-    setenv setstate setstate_r srandom srandom_r
+    posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
+    secure_getenv setenv setstate setstate_r srandom srandom_r
     strtod strtoll strtoull unlockpt unsetenv])
 ])
 
@@ -55,11 +55,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
   GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
   GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
+  GNULIB_QSORT_R=0;       AC_SUBST([GNULIB_QSORT_R])
   GNULIB_RANDOM=0;        AC_SUBST([GNULIB_RANDOM])
   GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
   GNULIB_REALPATH=0;      AC_SUBST([GNULIB_REALPATH])
   GNULIB_RPMATCH=0;       AC_SUBST([GNULIB_RPMATCH])
+  GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
   GNULIB_SETENV=0;        AC_SUBST([GNULIB_SETENV])
   GNULIB_STRTOD=0;        AC_SUBST([GNULIB_STRTOD])
   GNULIB_STRTOLL=0;       AC_SUBST([GNULIB_STRTOLL])
@@ -83,11 +85,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
+  HAVE_QSORT_R=1;            AC_SUBST([HAVE_QSORT_R])
   HAVE_RANDOM=1;             AC_SUBST([HAVE_RANDOM])
   HAVE_RANDOM_H=1;           AC_SUBST([HAVE_RANDOM_H])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
   HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
   HAVE_RPMATCH=1;            AC_SUBST([HAVE_RPMATCH])
+  HAVE_SECURE_GETENV=1;      AC_SUBST([HAVE_SECURE_GETENV])
   HAVE_SETENV=1;             AC_SUBST([HAVE_SETENV])
   HAVE_DECL_SETENV=1;        AC_SUBST([HAVE_DECL_SETENV])
   HAVE_STRTOD=1;             AC_SUBST([HAVE_STRTOD])
@@ -105,6 +109,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
+  REPLACE_QSORT_R=0;         AC_SUBST([REPLACE_QSORT_R])
   REPLACE_RANDOM_R=0;        AC_SUBST([REPLACE_RANDOM_R])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strchrnul.m4 ./gdb/gnulib/import/m4/strchrnul.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strchrnul.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/strchrnul.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+# strchrnul.m4 serial 9
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRCHRNUL],
+[
+  dnl Persuade glibc <string.h> to declare strchrnul().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS([strchrnul])
+  if test $ac_cv_func_strchrnul = no; then
+    HAVE_STRCHRNUL=0
+  else
+    AC_CACHE_CHECK([whether strchrnul works],
+      [gl_cv_func_strchrnul_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h> /* for strchrnul */
+]], [[const char *buf = "a";
+      return strchrnul (buf, 'b') != buf + 1;
+    ]])],
+        [gl_cv_func_strchrnul_works=yes],
+        [gl_cv_func_strchrnul_works=no],
+        [dnl Cygwin 1.7.9 introduced strchrnul, but it was broken until 1.7.10
+         AC_EGREP_CPP([Lucky user],
+           [
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+           ],
+           [gl_cv_func_strchrnul_works="guessing yes"],
+           [gl_cv_func_strchrnul_works="guessing no"])
+        ])
+      ])
+    case "$gl_cv_func_strchrnul_works" in
+      *yes) ;;
+      *) REPLACE_STRCHRNUL=1 ;;
+    esac
+  fi
+])
+
+# Prerequisites of lib/strchrnul.c.
+AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/string_h.m4 ./gdb/gnulib/import/m4/string_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/string_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/string_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strstr.m4 ./gdb/gnulib/import/m4/strstr.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strstr.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/strstr.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# strstr.m4 serial 16
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# strstr.m4 serial 17
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -67,11 +67,17 @@ AC_DEFUN([gl_FUNC_STRSTR],
     AC_CACHE_CHECK([whether strstr works in linear time],
       [gl_cv_func_strstr_linear],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+   restrictions on its LE runtime), which prevents us from limiting the
+   running time of this test.  */
+# error "This test does not work properly on z/OS"
+#endif
 #include <signal.h> /* for signal */
 #include <string.h> /* for strstr */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 ]], [[
     int result = 0;
     size_t m = 1000000;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strtok_r.m4 ./gdb/gnulib/import/m4/strtok_r.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/strtok_r.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/strtok_r.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # strtok_r.m4 serial 13
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_socket_h.m4 ./gdb/gnulib/import/m4/sys_socket_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_socket_h.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/sys_socket_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,176 @@
+# sys_socket_h.m4 serial 23
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_HEADER_SYS_SOCKET],
+[
+  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
+  dnl old-style declarations (with return type 'int' instead of 'ssize_t')
+  dnl unless _POSIX_PII_SOCKET is defined.
+  case "$host_os" in
+    osf*)
+      AC_DEFINE([_POSIX_PII_SOCKET], [1],
+        [Define to 1 in order to get the POSIX compatible declarations
+         of socket functions.])
+      ;;
+  esac
+
+  AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
+    [gl_cv_header_sys_socket_h_selfcontained],
+    [
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
+        [gl_cv_header_sys_socket_h_selfcontained=yes],
+        [gl_cv_header_sys_socket_h_selfcontained=no])
+    ])
+  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+    dnl If the shutdown function exists, <sys/socket.h> should define
+    dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
+    AC_CHECK_FUNCS([shutdown])
+    if test $ac_cv_func_shutdown = yes; then
+      AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
+        [gl_cv_header_sys_socket_h_shut],
+        [
+          AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+               [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
+            [gl_cv_header_sys_socket_h_shut=yes],
+            [gl_cv_header_sys_socket_h_shut=no])
+        ])
+      if test $gl_cv_header_sys_socket_h_shut = no; then
+        SYS_SOCKET_H='sys/socket.h'
+      fi
+    fi
+  fi
+  # We need to check for ws2tcpip.h now.
+  gl_PREREQ_SYS_H_SOCKET
+  AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+  if test $ac_cv_type_struct_sockaddr_storage = no; then
+    HAVE_STRUCT_SOCKADDR_STORAGE=0
+  fi
+  if test $ac_cv_type_sa_family_t = no; then
+    HAVE_SA_FAMILY_T=0
+  fi
+  if test $ac_cv_type_struct_sockaddr_storage != no; then
+    AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
+      [],
+      [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
+      [#include <sys/types.h>
+       #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+       #endif
+       #ifdef HAVE_WS2TCPIP_H
+       #include <ws2tcpip.h>
+       #endif
+      ])
+  fi
+  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+    SYS_SOCKET_H='sys/socket.h'
+  fi
+  gl_PREREQ_SYS_H_WINSOCK2
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+/* Some systems require prerequisite headers.  */
+#include <sys/types.h>
+#include <sys/socket.h>
+    ]], [socket connect accept bind getpeername getsockname getsockopt
+    listen recv send recvfrom sendto setsockopt shutdown accept4])
+])
+
+AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
+[
+  dnl Check prerequisites of the <sys/socket.h> replacement.
+  AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+  gl_CHECK_NEXT_HEADERS([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_SYS_SOCKET_H=1
+    HAVE_WS2TCPIP_H=0
+  else
+    HAVE_SYS_SOCKET_H=0
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+  AC_SUBST([HAVE_SYS_SOCKET_H])
+  AC_SUBST([HAVE_WS2TCPIP_H])
+])
+
+# Common prerequisites of the <sys/socket.h> replacement and of the
+# <sys/select.h> replacement.
+# Sets and substitutes HAVE_WINSOCK2_H.
+AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
+[
+  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+  AC_CHECK_HEADERS_ONCE([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h != yes; then
+    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+    dnl the check for those headers unconditional; yet cygwin reports
+    dnl that the headers are present but cannot be compiled (since on
+    dnl cygwin, all socket information should come from sys/socket.h).
+    AC_CHECK_HEADERS([winsock2.h])
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+  AC_SUBST([HAVE_WINSOCK2_H])
+])
+
+AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
+[
+  GNULIB_SOCKET=0;      AC_SUBST([GNULIB_SOCKET])
+  GNULIB_CONNECT=0;     AC_SUBST([GNULIB_CONNECT])
+  GNULIB_ACCEPT=0;      AC_SUBST([GNULIB_ACCEPT])
+  GNULIB_BIND=0;        AC_SUBST([GNULIB_BIND])
+  GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
+  GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
+  GNULIB_GETSOCKOPT=0;  AC_SUBST([GNULIB_GETSOCKOPT])
+  GNULIB_LISTEN=0;      AC_SUBST([GNULIB_LISTEN])
+  GNULIB_RECV=0;        AC_SUBST([GNULIB_RECV])
+  GNULIB_SEND=0;        AC_SUBST([GNULIB_SEND])
+  GNULIB_RECVFROM=0;    AC_SUBST([GNULIB_RECVFROM])
+  GNULIB_SENDTO=0;      AC_SUBST([GNULIB_SENDTO])
+  GNULIB_SETSOCKOPT=0;  AC_SUBST([GNULIB_SETSOCKOPT])
+  GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
+  GNULIB_ACCEPT4=0;     AC_SUBST([GNULIB_ACCEPT4])
+  HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+                        AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
+  HAVE_SA_FAMILY_T=1;   AC_SUBST([HAVE_SA_FAMILY_T])
+  HAVE_ACCEPT4=1;       AC_SUBST([HAVE_ACCEPT4])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_stat_h.m4 ./gdb/gnulib/import/m4/sys_stat_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_stat_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/sys_stat_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # sys_stat_h.m4 serial 28   -*- Autoconf -*-
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_time_h.m4 ./gdb/gnulib/import/m4/sys_time_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_time_h.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/m4/sys_time_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,111 @@
+# Configure a replacement for <sys/time.h>.
+# serial 8
+
+# Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+  dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+  dnl statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
+  fi
+
+  dnl On native Windows with MSVC, 'struct timeval' is defined in <winsock2.h>
+  dnl only. So include that header in the list.
+  gl_PREREQ_SYS_H_WINSOCK2
+  AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+            #if HAVE_WINSOCK2_H
+            # include <winsock2.h>
+            #endif
+          ]],
+          [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+       [gl_cv_sys_struct_timeval=yes],
+       [gl_cv_sys_struct_timeval=no])
+    ])
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  else
+    dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined
+    dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
+    dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
+    dnl smaller than the 'time_t' type mandated by POSIX.
+    dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
+    dnl that is good enough.
+    AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
+      [gl_cv_sys_struct_timeval_tv_sec],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#if HAVE_SYS_TIME_H
+               #include <sys/time.h>
+              #endif
+              #include <time.h>
+              #if HAVE_WINSOCK2_H
+              # include <winsock2.h>
+              #endif
+            ]],
+            [[static struct timeval x;
+              typedef int verify_tv_sec_type[
+                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+              ];
+            ]])],
+         [gl_cv_sys_struct_timeval_tv_sec=yes],
+         [gl_cv_sys_struct_timeval_tv_sec=no])
+      ])
+    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
+      REPLACE_STRUCT_TIMEVAL=1
+    fi
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+    ]], [gettimeofday])
+])
+
+AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
+[
+  GNULIB_GETTIMEOFDAY=0;     AC_SUBST([GNULIB_GETTIMEOFDAY])
+  dnl Assume POSIX behavior unless another module says otherwise.
+  HAVE_GETTIMEOFDAY=1;       AC_SUBST([HAVE_GETTIMEOFDAY])
+  HAVE_STRUCT_TIMEVAL=1;     AC_SUBST([HAVE_STRUCT_TIMEVAL])
+  HAVE_SYS_TIME_H=1;         AC_SUBST([HAVE_SYS_TIME_H])
+  HAVE_TIMEZONE_T=0;         AC_SUBST([HAVE_TIMEZONE_T])
+  REPLACE_GETTIMEOFDAY=0;    AC_SUBST([REPLACE_GETTIMEOFDAY])
+  REPLACE_STRUCT_TIMEVAL=0;  AC_SUBST([REPLACE_STRUCT_TIMEVAL])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_types_h.m4 ./gdb/gnulib/import/m4/sys_types_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/sys_types_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/sys_types_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,10 +1,10 @@
-# sys_types_h.m4 serial 4
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 6
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_SYS_TYPES_H],
+AC_DEFUN_ONCE([gl_SYS_TYPES_H],
 [
   AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
   gl_NEXT_HEADERS([sys/types.h])
@@ -22,3 +22,28 @@ AC_DEFUN([gl_SYS_TYPES_H],
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
 [
 ])
+
+# This works around a buggy version in autoconf <= 2.69.
+# See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
+
+m4_version_prereq([2.70], [], [
+
+# This is taken from the following Autoconf patch:
+# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+
+m4_undefine([AC_HEADER_MAJOR])
+AC_DEFUN([AC_HEADER_MAJOR],
+[AC_CHECK_HEADERS_ONCE([sys/types.h])
+AC_CHECK_HEADER([sys/mkdev.h],
+  [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+    [Define to 1 if `major', `minor', and `makedev' are declared in
+     <mkdev.h>.])])
+if test $ac_cv_header_sys_mkdev_h = no; then
+  AC_CHECK_HEADER([sys/sysmacros.h],
+    [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+      [Define to 1 if `major', `minor', and `makedev' are declared in
+       <sysmacros.h>.])])
+fi
+])
+
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/time_h.m4 ./gdb/gnulib/import/m4/time_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/time_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/time_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,8 +1,8 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
 
-# serial 7
+# serial 9
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
 ])
 
 dnl Check whether 'struct timespec' is declared
-dnl in time.h, sys/time.h, or pthread.h.
+dnl in time.h, sys/time.h, pthread.h, or unistd.h.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
 [
@@ -44,6 +44,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC]
   TIME_H_DEFINES_STRUCT_TIMESPEC=0
   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
     TIME_H_DEFINES_STRUCT_TIMESPEC=1
   else
@@ -70,12 +71,26 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC]
            [gl_cv_sys_struct_timespec_in_pthread_h=no])])
       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      else
+        AC_CACHE_CHECK([for struct timespec in <unistd.h>],
+          [gl_cv_sys_struct_timespec_in_unistd_h],
+          [AC_COMPILE_IFELSE(
+             [AC_LANG_PROGRAM(
+                [[#include <unistd.h>
+                ]],
+                [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+             [gl_cv_sys_struct_timespec_in_unistd_h=yes],
+             [gl_cv_sys_struct_timespec_in_unistd_h=no])])
+        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+        fi
       fi
     fi
   fi
   AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
   AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
   AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
 ])
 
 AC_DEFUN([gl_TIME_MODULE_INDICATOR],
@@ -94,6 +109,7 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
   GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
   GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
   GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
+  GNULIB_TIME_RZ=0;                      AC_SUBST([GNULIB_TIME_RZ])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
   HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
@@ -106,4 +122,13 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
   REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
   REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
+
+  dnl Hack so that the time module doesn't depend on the sys_time module.
+  dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
+  : ${GNULIB_GETTIMEOFDAY=0};            AC_SUBST([GNULIB_GETTIMEOFDAY])
+  dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME
+  dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier
+  dnl is no longer a big deal.
+  REPLACE_GMTIME=0;                      AC_SUBST([REPLACE_GMTIME])
+  REPLACE_LOCALTIME=0;                   AC_SUBST([REPLACE_LOCALTIME])
 ])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/unistd_h.m4 ./gdb/gnulib/import/m4/unistd_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/unistd_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/unistd_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 66
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# unistd_h.m4 serial 68
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -160,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
+  REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
   REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
@@ -172,9 +173,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_PWRITE=0;       AC_SUBST([REPLACE_PWRITE])
   REPLACE_READ=0;         AC_SUBST([REPLACE_READ])
   REPLACE_READLINK=0;     AC_SUBST([REPLACE_READLINK])
+  REPLACE_READLINKAT=0;   AC_SUBST([REPLACE_READLINKAT])
   REPLACE_RMDIR=0;        AC_SUBST([REPLACE_RMDIR])
   REPLACE_SLEEP=0;        AC_SUBST([REPLACE_SLEEP])
   REPLACE_SYMLINK=0;      AC_SUBST([REPLACE_SYMLINK])
+  REPLACE_SYMLINKAT=0;    AC_SUBST([REPLACE_SYMLINKAT])
   REPLACE_TTYNAME_R=0;    AC_SUBST([REPLACE_TTYNAME_R])
   REPLACE_UNLINK=0;       AC_SUBST([REPLACE_UNLINK])
   REPLACE_UNLINKAT=0;     AC_SUBST([REPLACE_UNLINKAT])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/warn-on-use.m4 ./gdb/gnulib/import/m4/warn-on-use.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/warn-on-use.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/warn-on-use.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wchar_h.m4 ./gdb/gnulib/import/m4/wchar_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wchar_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/wchar_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,13 +1,13 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 39
+# wchar_h.m4 serial 40
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -81,8 +81,14 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
 extern int zero (void);
 int main () { return zero(); }
 ]])])
+     dnl Do not rename the object file from conftest.$ac_objext to
+     dnl conftest1.$ac_objext, as this will cause the link to fail on
+     dnl z/OS when using the XPLINK object format (due to duplicate
+     dnl CSECT names). Instead, temporarily redefine $ac_compile so
+     dnl that the object file has the latter name from the start.
+     save_ac_compile="$ac_compile"
+     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
      if AC_TRY_EVAL([ac_compile]); then
-       mv conftest.$ac_objext conftest1.$ac_objext
        AC_LANG_CONFTEST([
          AC_LANG_SOURCE([[#define wcstod renamed_wcstod
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -95,8 +101,9 @@ int main () { return zero(); }
 #include <wchar.h>
 int zero (void) { return 0; }
 ]])])
+       dnl See note above about renaming object files.
+       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
        if AC_TRY_EVAL([ac_compile]); then
-         mv conftest.$ac_objext conftest2.$ac_objext
          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
            :
          else
@@ -104,6 +111,7 @@ int zero (void) { return 0; }
          fi
        fi
      fi
+     ac_compile="$save_ac_compile"
      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
     ])
   if test $gl_cv_header_wchar_h_correct_inline = no; then
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wchar_t.m4 ./gdb/gnulib/import/m4/wchar_t.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wchar_t.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/wchar_t.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wctype_h.m4 ./gdb/gnulib/import/m4/wctype_h.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wctype_h.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/wctype_h.m4	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wint_t.m4 ./gdb/gnulib/import/m4/wint_t.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/m4/wint_t.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/m4/wint_t.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/Makefile.am ./gdb/gnulib/import/Makefile.am
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/Makefile.am	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/Makefile.am	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,9 +21,9 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes lstat memchr memmem pathmax readlink rename strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
+# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes limits-h lstat memchr memmem pathmax rawmemchr readlink rename signal-h strchrnul strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
 
-AUTOMAKE_OPTIONS = 1.5 gnits
+AUTOMAKE_OPTIONS = 1.9.6 gnits
 
 SUBDIRS =
 noinst_HEADERS =
@@ -49,6 +49,15 @@ libgnu_a_LIBADD = $(gl_LIBOBJS)
 libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
 EXTRA_libgnu_a_SOURCES =
 
+## begin gnulib module absolute-header
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+
+## end   gnulib module absolute-header
+
 ## begin gnulib module alloca
 
 
@@ -95,7 +104,7 @@ EXTRA_libgnu_a_SOURCES += canonicalize-l
 ## begin gnulib module configmake
 
 # Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
+# provided by autoconf 2.59c+ or 2.70.
 # The Automake-defined pkg* macros are appended, in the order
 # listed in the Automake 1.10a+ documentation.
 configmake.h: Makefile
@@ -111,6 +120,7 @@ configmake.h: Makefile
 	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
 	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
 	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+	  echo '#define RUNSTATEDIR "$(runstatedir)"'; \
 	  echo '#define INCLUDEDIR "$(includedir)"'; \
 	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
 	  echo '#define DOCDIR "$(docdir)"'; \
@@ -242,6 +252,13 @@ EXTRA_DIST += errno.in.h
 
 ## end   gnulib module errno
 
+## begin gnulib module flexmember
+
+
+EXTRA_DIST += flexmember.h
+
+## end   gnulib module flexmember
+
 ## begin gnulib module float
 
 BUILT_SOURCES += $(FLOAT_H)
@@ -324,6 +341,23 @@ EXTRA_libgnu_a_SOURCES += frexp.c frexpl
 
 ## end   gnulib module frexpl
 
+## begin gnulib module gettimeofday
+
+
+EXTRA_DIST += gettimeofday.c
+
+EXTRA_libgnu_a_SOURCES += gettimeofday.c
+
+## end   gnulib module gettimeofday
+
+## begin gnulib module hard-locale
+
+libgnu_a_SOURCES += hard-locale.c
+
+EXTRA_DIST += hard-locale.h
+
+## end   gnulib module hard-locale
+
 ## begin gnulib module inttypes-incomplete
 
 BUILT_SOURCES += inttypes.h
@@ -352,6 +386,7 @@ inttypes.h: inttypes.in.h $(top_builddir
 	      -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
 	      -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
 	      -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+	      -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
 	      -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
 	      -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
 	      -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
@@ -386,6 +421,34 @@ EXTRA_libgnu_a_SOURCES += isnan.c isnanl
 
 ## end   gnulib module isnanl-nolibm
 
+## begin gnulib module limits-h
+
+BUILT_SOURCES += $(LIMITS_H)
+
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+if GL_GENERATE_LIMITS_H
+limits.h: limits.in.h $(top_builddir)/config.status
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+	      < $(srcdir)/limits.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+else
+limits.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += limits.h limits.h-t
+
+EXTRA_DIST += limits.in.h
+
+## end   gnulib module limits-h
+
 ## begin gnulib module localcharset
 
 libgnu_a_SOURCES += localcharset.h localcharset.c
@@ -822,6 +885,15 @@ EXTRA_DIST += pathmax.h
 
 ## end   gnulib module pathmax
 
+## begin gnulib module rawmemchr
+
+
+EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
+
+EXTRA_libgnu_a_SOURCES += rawmemchr.c
+
+## end   gnulib module rawmemchr
+
 ## begin gnulib module readlink
 
 
@@ -856,6 +928,48 @@ EXTRA_DIST += same-inode.h
 
 ## end   gnulib module same-inode
 
+## begin gnulib module signal-h
+
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+	      -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
+	      -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+	      -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+	      -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+	      -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+	      -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
+	      -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+	      -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+	      -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+	      -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+	      -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+	      -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+	      -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/signal.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+EXTRA_DIST += signal.in.h
+
+## end   gnulib module signal-h
+
 ## begin gnulib module snippet/_Noreturn
 
 # Because this Makefile snippet defines a variable used by other
@@ -984,6 +1098,7 @@ stddef.h: stddef.in.h $(top_builddir)/co
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+	      -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
 	      -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
 	      -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
 	      < $(srcdir)/stddef.in.h; \
@@ -1015,6 +1130,7 @@ stdint.h: stdint.in.h $(top_builddir)/co
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+	      -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
 	      -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
 	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
 	      -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@@ -1052,7 +1168,6 @@ EXTRA_DIST += stdint.in.h
 ## begin gnulib module stdio
 
 BUILT_SOURCES += stdio.h
-libgnu_a_SOURCES += stdio.c
 
 # We need the following in order to create <stdio.h> when the system
 # doesn't have one that works with the given compiler.
@@ -1211,11 +1326,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
 	      -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
 	      -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+	      -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
 	      -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
 	      -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
 	      -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
 	      -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
 	      -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+	      -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
 	      -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
 	      -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
 	      -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
@@ -1239,11 +1356,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
 	      -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
 	      -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+	      -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
 	      -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
 	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
 	      -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
 	      -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+	      -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
 	      -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
 	      -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
 	      -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -1260,6 +1379,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
 	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+	      -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
 	      -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
 	      -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
 	      -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -1279,6 +1399,15 @@ EXTRA_DIST += stdlib.in.h
 
 ## end   gnulib module stdlib
 
+## begin gnulib module strchrnul
+
+
+EXTRA_DIST += strchrnul.c strchrnul.valgrind
+
+EXTRA_libgnu_a_SOURCES += strchrnul.c
+
+## end   gnulib module strchrnul
+
 ## begin gnulib module streq
 
 
@@ -1472,6 +1601,40 @@ EXTRA_DIST += sys_stat.in.h
 
 ## end   gnulib module sys_stat
 
+## begin gnulib module sys_time
+
+BUILT_SOURCES += sys/time.h
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+	      -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+	      -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+	      -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+	      -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+	      -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+	      -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/sys_time.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+
+EXTRA_DIST += sys_time.in.h
+
+## end   gnulib module sys_time
+
 ## begin gnulib module sys_types
 
 BUILT_SOURCES += sys/types.h
@@ -1511,15 +1674,20 @@ time.h: time.in.h $(top_builddir)/config
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+	      -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
 	      -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
 	      -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
 	      -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
 	      -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
 	      -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+	      -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
 	      -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
 	      -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
 	      -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
 	      -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+	      -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+	      -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+	      -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
 	      -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
 	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
 	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
@@ -1527,6 +1695,7 @@ time.h: time.in.h $(top_builddir)/config
 	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -1657,6 +1826,7 @@ unistd.h: unistd.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+	      -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -1669,9 +1839,11 @@ unistd.h: unistd.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
 	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+	      -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
 	      -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+	      -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
 	      -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
 	      -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
 	      -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/Makefile.in ./gdb/gnulib/import/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -15,7 +15,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes lstat memchr memmem pathmax readlink rename strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
+# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes limits-h lstat memchr memmem pathmax rawmemchr readlink rename signal-h strchrnul strstr strtok_r sys_stat unistd update-copyright wchar wctype-h
 
 
 
@@ -64,6 +64,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir
 	$(srcdir)/Makefile.in alloca.c
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
+	$(top_srcdir)/import/m4/absolute-header.m4 \
 	$(top_srcdir)/import/m4/alloca.m4 \
 	$(top_srcdir)/import/m4/canonicalize.m4 \
 	$(top_srcdir)/import/m4/codeset.m4 \
@@ -79,20 +80,24 @@ am__aclocal_m4_deps = $(top_srcdir)/impo
 	$(top_srcdir)/import/m4/extensions.m4 \
 	$(top_srcdir)/import/m4/extern-inline.m4 \
 	$(top_srcdir)/import/m4/fcntl-o.m4 \
+	$(top_srcdir)/import/m4/flexmember.m4 \
 	$(top_srcdir)/import/m4/float_h.m4 \
 	$(top_srcdir)/import/m4/fnmatch.m4 \
 	$(top_srcdir)/import/m4/fpieee.m4 \
 	$(top_srcdir)/import/m4/frexp.m4 \
 	$(top_srcdir)/import/m4/frexpl.m4 \
+	$(top_srcdir)/import/m4/gettimeofday.m4 \
 	$(top_srcdir)/import/m4/glibc21.m4 \
 	$(top_srcdir)/import/m4/gnulib-common.m4 \
 	$(top_srcdir)/import/m4/gnulib-comp.m4 \
+	$(top_srcdir)/import/m4/hard-locale.m4 \
 	$(top_srcdir)/import/m4/include_next.m4 \
 	$(top_srcdir)/import/m4/inttypes-pri.m4 \
 	$(top_srcdir)/import/m4/inttypes.m4 \
 	$(top_srcdir)/import/m4/isnand.m4 \
 	$(top_srcdir)/import/m4/isnanl.m4 \
 	$(top_srcdir)/import/m4/largefile.m4 \
+	$(top_srcdir)/import/m4/limits-h.m4 \
 	$(top_srcdir)/import/m4/localcharset.m4 \
 	$(top_srcdir)/import/m4/locale-fr.m4 \
 	$(top_srcdir)/import/m4/locale-ja.m4 \
@@ -113,9 +118,11 @@ am__aclocal_m4_deps = $(top_srcdir)/impo
 	$(top_srcdir)/import/m4/nocrash.m4 \
 	$(top_srcdir)/import/m4/off_t.m4 \
 	$(top_srcdir)/import/m4/pathmax.m4 \
+	$(top_srcdir)/import/m4/rawmemchr.m4 \
 	$(top_srcdir)/import/m4/readlink.m4 \
 	$(top_srcdir)/import/m4/rename.m4 \
 	$(top_srcdir)/import/m4/rmdir.m4 \
+	$(top_srcdir)/import/m4/signal_h.m4 \
 	$(top_srcdir)/import/m4/ssize_t.m4 \
 	$(top_srcdir)/import/m4/stat.m4 \
 	$(top_srcdir)/import/m4/stdbool.m4 \
@@ -123,10 +130,13 @@ am__aclocal_m4_deps = $(top_srcdir)/impo
 	$(top_srcdir)/import/m4/stdint.m4 \
 	$(top_srcdir)/import/m4/stdio_h.m4 \
 	$(top_srcdir)/import/m4/stdlib_h.m4 \
+	$(top_srcdir)/import/m4/strchrnul.m4 \
 	$(top_srcdir)/import/m4/string_h.m4 \
 	$(top_srcdir)/import/m4/strstr.m4 \
 	$(top_srcdir)/import/m4/strtok_r.m4 \
+	$(top_srcdir)/import/m4/sys_socket_h.m4 \
 	$(top_srcdir)/import/m4/sys_stat_h.m4 \
+	$(top_srcdir)/import/m4/sys_time_h.m4 \
 	$(top_srcdir)/import/m4/sys_types_h.m4 \
 	$(top_srcdir)/import/m4/time_h.m4 \
 	$(top_srcdir)/import/m4/unistd_h.m4 \
@@ -145,9 +155,9 @@ LIBRARIES = $(noinst_LIBRARIES)
 libgnu_a_AR = $(AR) $(ARFLAGS)
 am__DEPENDENCIES_1 =
 am_libgnu_a_OBJECTS = dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \
-	stripslash.$(OBJEXT) localcharset.$(OBJEXT) malloca.$(OBJEXT) \
-	math.$(OBJEXT) stdio.$(OBJEXT) strnlen1.$(OBJEXT) \
-	unistd.$(OBJEXT) wctype-h.$(OBJEXT)
+	stripslash.$(OBJEXT) hard-locale.$(OBJEXT) \
+	localcharset.$(OBJEXT) malloca.$(OBJEXT) math.$(OBJEXT) \
+	strnlen1.$(OBJEXT) unistd.$(OBJEXT) wctype-h.$(OBJEXT)
 libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
@@ -347,6 +357,7 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
@@ -443,6 +454,7 @@ GNULIB_POWF = @GNULIB_POWF@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PRINTF = @GNULIB_PRINTF@
 GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTC = @GNULIB_PUTC@
@@ -450,6 +462,8 @@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PUTS = @GNULIB_PUTS@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RAISE = @GNULIB_RAISE@
 GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
@@ -476,9 +490,13 @@ GNULIB_ROUNDL = @GNULIB_ROUNDL@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SCANDIR = @GNULIB_SCANDIR@
 GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
 GNULIB_SETENV = @GNULIB_SETENV@
 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
 GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
 GNULIB_SINF = @GNULIB_SINF@
 GNULIB_SINHF = @GNULIB_SINHF@
 GNULIB_SINL = @GNULIB_SINL@
@@ -520,6 +538,7 @@ GNULIB_TANHF = @GNULIB_TANHF@
 GNULIB_TANL = @GNULIB_TANL@
 GNULIB_TIMEGM = @GNULIB_TIMEGM@
 GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
 GNULIB_TMPFILE = @GNULIB_TMPFILE@
 GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TRUNC = @GNULIB_TRUNC@
@@ -593,6 +612,7 @@ HAVE_ATANF = @HAVE_ATANF@
 HAVE_ATANL = @HAVE_ATANL@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CBRT = @HAVE_CBRT@
 HAVE_CBRTF = @HAVE_CBRTF@
@@ -715,6 +735,7 @@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_HYPOTF = @HAVE_HYPOTF@
@@ -744,6 +765,7 @@ HAVE_LOGF = @HAVE_LOGF@
 HAVE_LOGL = @HAVE_LOGL@
 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
 HAVE_MBRTOWC = @HAVE_MBRTOWC@
 HAVE_MBSINIT = @HAVE_MBSINIT@
@@ -772,11 +794,15 @@ HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_POWF = @HAVE_POWF@
 HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
+HAVE_RAISE = @HAVE_RAISE@
 HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
@@ -794,11 +820,16 @@ HAVE_RINTL = @HAVE_RINTL@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
 HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
 HAVE_SINF = @HAVE_SINF@
 HAVE_SINHF = @HAVE_SINHF@
 HAVE_SINL = @HAVE_SINL@
@@ -817,6 +848,8 @@ HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
 HAVE_SYMLINK = @HAVE_SYMLINK@
 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
@@ -824,11 +857,14 @@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H
 HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_TANF = @HAVE_TANF@
 HAVE_TANHF = @HAVE_TANHF@
 HAVE_TANL = @HAVE_TANL@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -868,6 +904,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
 HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
 HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
 HAVE_WINT_T = @HAVE_WINT_T@
 HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -890,6 +927,7 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
 LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIMITS_H = @LIMITS_H@
 LN_S = @LN_S@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
 LOCALE_FR = @LOCALE_FR@
@@ -904,13 +942,16 @@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
@@ -920,13 +961,16 @@ NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDIO_H = @NEXT_STDIO_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_TIME_H = @NEXT_TIME_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
@@ -1000,10 +1044,13 @@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
 REPLACE_HYPOT = @REPLACE_HYPOT@
 REPLACE_HYPOTF = @REPLACE_HYPOTF@
@@ -1021,6 +1068,7 @@ REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LDEXPL = @REPLACE_LDEXPL@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
 REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
 REPLACE_LOG = @REPLACE_LOG@
 REPLACE_LOG10 = @REPLACE_LOG10@
@@ -1066,13 +1114,17 @@ REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
+REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMAINDER = @REPLACE_REMAINDER@
@@ -1109,7 +1161,10 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
@@ -1149,6 +1204,7 @@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 VERSION = @VERSION@
@@ -1204,6 +1260,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -1216,28 +1273,31 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.5 gnits
+AUTOMAKE_OPTIONS = 1.9.6 gnits
 SUBDIRS = 
 noinst_HEADERS = 
 noinst_LIBRARIES = libgnu.a
 noinst_LTLIBRARIES = 
 EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h \
 	canonicalize-lgpl.c dirent.in.h dirfd.c dirname.h dosname.h \
-	errno.in.h float.c float.in.h itold.c fnmatch.c fnmatch.in.h \
-	fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c inttypes.in.h \
-	float+.h isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
-	isnanl-nolibm.h isnanl.c config.charset ref-add.sin \
-	ref-del.sin lstat.c malloc.c malloca.h malloca.valgrind \
-	math.in.h mbrtowc.c mbsinit.c mbsrtowcs-impl.h \
-	mbsrtowcs-state.c mbsrtowcs.c memchr.c memchr.valgrind \
-	memmem.c str-two-way.h pathmax.h readlink.c rename.c rmdir.c \
-	same-inode.h $(top_srcdir)/import/extra/snippet/_Noreturn.h \
+	errno.in.h flexmember.h float.c float.in.h itold.c fnmatch.c \
+	fnmatch.in.h fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c \
+	gettimeofday.c hard-locale.h inttypes.in.h float+.h isnan.c \
+	isnand-nolibm.h isnand.c float+.h isnan.c isnanl-nolibm.h \
+	isnanl.c limits.in.h config.charset ref-add.sin ref-del.sin \
+	lstat.c malloc.c malloca.h malloca.valgrind math.in.h \
+	mbrtowc.c mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c \
+	mbsrtowcs.c memchr.c memchr.valgrind memmem.c str-two-way.h \
+	pathmax.h rawmemchr.c rawmemchr.valgrind readlink.c rename.c \
+	rmdir.c same-inode.h signal.in.h \
+	$(top_srcdir)/import/extra/snippet/_Noreturn.h \
 	$(top_srcdir)/import/extra/snippet/arg-nonnull.h \
 	$(top_srcdir)/import/extra/snippet/c++defs.h \
 	$(top_srcdir)/import/extra/snippet/warn-on-use.h stat.c \
 	stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
-	streq.h string.in.h str-two-way.h strstr.c strtok_r.c \
-	sys_stat.in.h sys_types.in.h time.in.h unistd.in.h \
+	strchrnul.c strchrnul.valgrind streq.h string.in.h \
+	str-two-way.h strstr.c strtok_r.c sys_stat.in.h sys_time.in.h \
+	sys_types.in.h time.in.h unistd.in.h \
 	$(top_srcdir)/import/extra/update-copyright verify.h \
 	wchar.in.h wctype.in.h
 
@@ -1251,20 +1311,21 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
 BUILT_SOURCES = $(ALLOCA_H) configmake.h dirent.h $(ERRNO_H) \
-	$(FLOAT_H) $(FNMATCH_H) inttypes.h math.h arg-nonnull.h \
-	c++defs.h warn-on-use.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
-	stdio.h stdlib.h string.h sys/stat.h sys/types.h time.h \
-	unistd.h wchar.h wctype.h
+	$(FLOAT_H) $(FNMATCH_H) inttypes.h $(LIMITS_H) math.h signal.h \
+	arg-nonnull.h c++defs.h warn-on-use.h $(STDBOOL_H) $(STDDEF_H) \
+	$(STDINT_H) stdio.h stdlib.h string.h sys/stat.h sys/time.h \
+	sys/types.h time.h unistd.h wchar.h wctype.h
 SUFFIXES = .sed .sin
 MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
 	dirent.h-t errno.h errno.h-t float.h float.h-t fnmatch.h \
-	fnmatch.h-t inttypes.h inttypes.h-t math.h math.h-t \
-	arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
-	warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \
-	stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \
-	stdlib.h-t string.h string.h-t sys/stat.h sys/stat.h-t \
-	sys/types.h sys/types.h-t time.h time.h-t unistd.h unistd.h-t \
-	wchar.h wchar.h-t wctype.h wctype.h-t
+	fnmatch.h-t inttypes.h inttypes.h-t limits.h limits.h-t math.h \
+	math.h-t signal.h signal.h-t arg-nonnull.h arg-nonnull.h-t \
+	c++defs.h c++defs.h-t warn-on-use.h warn-on-use.h-t stdbool.h \
+	stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
+	stdio.h-t stdlib.h stdlib.h-t string.h string.h-t sys/stat.h \
+	sys/stat.h-t sys/time.h sys/time.h-t sys/types.h sys/types.h-t \
+	time.h time.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
+	wctype.h-t
 MOSTLYCLEANDIRS = sys
 CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
 	ref-del.sed
@@ -1273,15 +1334,21 @@ MAINTAINERCLEANFILES = 
 AM_CPPFLAGS = 
 AM_CFLAGS = 
 libgnu_a_SOURCES = dirname-lgpl.c basename-lgpl.c stripslash.c \
-	localcharset.h localcharset.c malloca.c math.c stdio.c \
+	hard-locale.c localcharset.h localcharset.c malloca.c math.c \
 	strnlen1.h strnlen1.c unistd.c wctype-h.c
 libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
 libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
 EXTRA_libgnu_a_SOURCES = alloca.c canonicalize-lgpl.c dirfd.c float.c \
 	itold.c fnmatch.c fnmatch_loop.c frexp.c frexp.c frexpl.c \
-	isnan.c isnand.c isnan.c isnanl.c lstat.c malloc.c mbrtowc.c \
-	mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c memmem.c \
-	readlink.c rename.c rmdir.c stat.c strstr.c strtok_r.c
+	gettimeofday.c isnan.c isnand.c isnan.c isnanl.c lstat.c \
+	malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c \
+	memchr.c memmem.c rawmemchr.c readlink.c rename.c rmdir.c \
+	stat.c strchrnul.c strstr.c strtok_r.c
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
 
@@ -1361,6 +1428,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@
@@ -1376,11 +1445,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
@@ -1735,7 +1805,7 @@ uninstall-am: uninstall-local
 @GL_GENERATE_ALLOCA_H_FALSE@	rm -f $@
 
 # Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
+# provided by autoconf 2.59c+ or 2.70.
 # The Automake-defined pkg* macros are appended, in the order
 # listed in the Automake 1.10a+ documentation.
 configmake.h: Makefile
@@ -1751,6 +1821,7 @@ configmake.h: Makefile
 	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
 	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
 	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+	  echo '#define RUNSTATEDIR "$(runstatedir)"'; \
 	  echo '#define INCLUDEDIR "$(includedir)"'; \
 	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
 	  echo '#define DOCDIR "$(docdir)"'; \
@@ -1885,6 +1956,7 @@ inttypes.h: inttypes.in.h $(top_builddir
 	      -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
 	      -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
 	      -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+	      -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
 	      -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
 	      -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
 	      -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
@@ -1896,6 +1968,22 @@ inttypes.h: inttypes.in.h $(top_builddir
 	} > $@-t && \
 	mv $@-t $@
 
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+@GL_GENERATE_LIMITS_H_TRUE@limits.h: limits.in.h $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_LIMITS_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_LIMITS_H_TRUE@	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_LIMITS_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@	      -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@	      < $(srcdir)/limits.in.h; \
+@GL_GENERATE_LIMITS_H_TRUE@	} > $@-t && \
+@GL_GENERATE_LIMITS_H_TRUE@	mv $@-t $@
+@GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_FALSE@	rm -f $@
+
 # We need the following in order to install a simple file in $(libdir)
 # which is shared with other installed packages. We use a list of referencing
 # packages so that "make uninstall" will remove the file if and only if it
@@ -2228,6 +2316,39 @@ math.h: math.in.h $(top_builddir)/config
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
 	} > $@-t && \
 	mv $@-t $@
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+	      -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
+	      -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+	      -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+	      -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+	      -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+	      -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
+	      -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+	      -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+	      -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+	      -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+	      -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+	      -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+	      -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+	      -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/signal.in.h; \
+	} > $@-t && \
+	mv $@-t $@
 # The arg-nonnull.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
 # off.
@@ -2276,6 +2397,7 @@ warn-on-use.h: $(top_srcdir)/import/extr
 @GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
 @GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
 @GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
 @GL_GENERATE_STDDEF_H_TRUE@	      < $(srcdir)/stddef.in.h; \
@@ -2295,6 +2417,7 @@ warn-on-use.h: $(top_srcdir)/import/extr
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+@GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@@ -2470,11 +2593,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
 	      -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
 	      -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+	      -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
 	      -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
 	      -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
 	      -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
 	      -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
 	      -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+	      -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
 	      -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
 	      -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
 	      -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
@@ -2498,11 +2623,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
 	      -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
 	      -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+	      -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
 	      -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
 	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
 	      -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
 	      -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+	      -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
 	      -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
 	      -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
 	      -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -2519,6 +2646,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
 	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+	      -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
 	      -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
 	      -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
 	      -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -2676,6 +2804,31 @@ sys/stat.h: sys_stat.in.h $(top_builddir
 	} > $@-t && \
 	mv $@-t $@
 
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+	      -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+	      -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+	      -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+	      -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+	      -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+	      -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/sys_time.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+
 # We need the following in order to create <sys/types.h> when the system
 # doesn't have one that works with the given compiler.
 sys/types.h: sys_types.in.h $(top_builddir)/config.status
@@ -2702,15 +2855,20 @@ time.h: time.in.h $(top_builddir)/config
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+	      -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
 	      -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
 	      -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
 	      -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
 	      -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
 	      -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+	      -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
 	      -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
 	      -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
 	      -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
 	      -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+	      -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+	      -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+	      -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
 	      -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
 	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
 	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
@@ -2718,6 +2876,7 @@ time.h: time.in.h $(top_builddir)/config
 	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -2838,6 +2997,7 @@ unistd.h: unistd.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+	      -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -2850,9 +3010,11 @@ unistd.h: unistd.in.h $(top_builddir)/co
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
 	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+	      -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
 	      -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+	      -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
 	      -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
 	      -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
 	      -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloca.c ./gdb/gnulib/import/malloca.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloca.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/malloca.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -49,12 +49,18 @@
 #define MAGIC_SIZE sizeof (int)
 /* This is how the header info would look like without any alignment
    considerations.  */
-struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
+struct preliminary_header { void *next; int magic; };
 /* But the header's size must be a multiple of sa_alignment_max.  */
 #define HEADER_SIZE \
   (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
-struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
-verify (HEADER_SIZE == sizeof (struct header));
+union header {
+  void *next;
+  struct {
+    char room[HEADER_SIZE - MAGIC_SIZE];
+    int word;
+  } magic;
+};
+verify (HEADER_SIZE == sizeof (union header));
 /* We make the hash table quite big, so that during lookups the probability
    of empty hash buckets is quite high.  There is no need to make the hash
    table resizable, because when the hash table gets filled so much that the
@@ -74,20 +80,21 @@ mmalloca (size_t n)
 
   if (nplus >= n)
     {
-      char *p = (char *) malloc (nplus);
+      void *p = malloc (nplus);
 
       if (p != NULL)
         {
           size_t slot;
+          union header *h = p;
 
-          p += HEADER_SIZE;
+          p = h + 1;
 
           /* Put a magic number into the indicator word.  */
-          ((int *) p)[-1] = MAGIC_NUMBER;
+          h->magic.word = MAGIC_NUMBER;
 
           /* Enter p into the hash table.  */
           slot = (uintptr_t) p % HASH_TABLE_SIZE;
-          ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
+          h->next = mmalloca_results[slot];
           mmalloca_results[slot] = p;
 
           return p;
@@ -123,15 +130,17 @@ freea (void *p)
           void **chain = &mmalloca_results[slot];
           for (; *chain != NULL;)
             {
+              union header *h = p;
               if (*chain == p)
                 {
                   /* Found it.  Remove it from the hash table and free it.  */
-                  char *p_begin = (char *) p - HEADER_SIZE;
-                  *chain = ((struct header *) p_begin)->next;
+                  union header *p_begin = h - 1;
+                  *chain = p_begin->next;
                   free (p_begin);
                   return;
                 }
-              chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
+              h = *chain;
+              chain = &h[-1].next;
             }
         }
       /* At this point, we know it was not a mmalloca() result.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloca.h ./gdb/gnulib/import/malloca.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloca.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/malloca.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -92,7 +92,7 @@ extern void * nmalloca (size_t n, size_t
 /* ------------------- Auxiliary, non-public definitions ------------------- */
 
 /* Determine the alignment of a type at compile time.  */
-#if defined __GNUC__
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
 # define sa_alignof __alignof__
 #elif defined __cplusplus
   template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloc.c ./gdb/gnulib/import/malloc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/malloc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/malloc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/math.c ./gdb/gnulib/import/math.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/math.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/math.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,4 @@
 #include <config.h>
 #define _GL_MATH_INLINE _GL_EXTERN_INLINE
 #include "math.h"
+typedef int dummy;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/math.in.h ./gdb/gnulib/import/math.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/math.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/math.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A GNU-like <math.h>.
 
-   Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2007-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,6 +28,9 @@
 #ifndef _@GUARD_PREFIX@_MATH_H
 #define _@GUARD_PREFIX@_MATH_H
 
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_MATH_INLINE
 # define _GL_MATH_INLINE _GL_INLINE
@@ -60,6 +63,7 @@ _gl_cxx_ ## func ## l (long double l)   
   return func (l);                                                  \
 }
 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
+_GL_BEGIN_NAMESPACE                                                 \
 inline int                                                          \
 func (float f)                                                      \
 {                                                                   \
@@ -74,7 +78,8 @@ inline int                              
 func (long double l)                                                \
 {                                                                   \
   return _gl_cxx_ ## func ## l (l);                                 \
-}
+}                                                                   \
+_GL_END_NAMESPACE
 #endif
 
 /* Helper macros to define a portability warning for the
@@ -403,6 +408,7 @@ _GL_WARN_ON_USE (ceilf, "ceilf is unport
 #if @GNULIB_CEIL@
 # if @REPLACE_CEIL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ceil
 #   define ceil rpl_ceil
 #  endif
 _GL_FUNCDECL_RPL (ceil, double, (double x));
@@ -750,6 +756,7 @@ _GL_WARN_ON_USE (floorf, "floorf is unpo
 #if @GNULIB_FLOOR@
 # if @REPLACE_FLOOR@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef floor
 #   define floor rpl_floor
 #  endif
 _GL_FUNCDECL_RPL (floor, double, (double x));
@@ -970,6 +977,7 @@ _GL_WARN_ON_USE (frexpf, "frexpf is unpo
 #if @GNULIB_FREXP@
 # if @REPLACE_FREXP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef frexp
 #   define frexp rpl_frexp
 #  endif
 _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
@@ -977,7 +985,7 @@ _GL_CXXALIAS_RPL (frexp, double, (double
 # else
 _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
 # endif
-_GL_CXXALIASWARN (frexp);
+_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
 #elif defined GNULIB_POSIXCHECK
 # undef frexp
 /* Assume frexp is always declared.  */
@@ -1955,6 +1963,7 @@ _GL_WARN_ON_USE (tanhf, "tanhf is unport
 #if @GNULIB_TRUNCF@
 # if @REPLACE_TRUNCF@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef truncf
 #   define truncf rpl_truncf
 #  endif
 _GL_FUNCDECL_RPL (truncf, float, (float x));
@@ -1977,6 +1986,7 @@ _GL_WARN_ON_USE (truncf, "truncf is unpo
 #if @GNULIB_TRUNC@
 # if @REPLACE_TRUNC@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef trunc
 #   define trunc rpl_trunc
 #  endif
 _GL_FUNCDECL_RPL (trunc, double, (double x));
@@ -2036,7 +2046,7 @@ _GL_EXTERN_C int gl_isfinitel (long doub
     gl_isfinitef (x))
 # endif
 # ifdef __cplusplus
-#  ifdef isfinite
+#  if defined isfinite || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
 #   undef isfinite
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
@@ -2063,7 +2073,7 @@ _GL_EXTERN_C int gl_isinfl (long double 
     gl_isinff (x))
 # endif
 # ifdef __cplusplus
-#  ifdef isinf
+#  if defined isinf || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
 #   undef isinf
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
@@ -2181,7 +2191,7 @@ _GL_EXTERN_C int rpl_isnanl (long double
     __builtin_isnanf ((float)(x)))
 # endif
 # ifdef __cplusplus
-#  ifdef isnan
+#  if defined isnan || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
 #   undef isnan
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
@@ -2202,7 +2212,8 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
 
 
 #if @GNULIB_SIGNBIT@
-# if @REPLACE_SIGNBIT_USING_GCC@
+# if (@REPLACE_SIGNBIT_USING_GCC@ \
+      && (!defined __cplusplus || __cplusplus < 201103))
 #  undef signbit
    /* GCC 4.0 and newer provides three built-ins for signbit.  */
 #  define signbit(x) \
@@ -2255,7 +2266,7 @@ _GL_EXTERN_C int gl_signbitl (long doubl
     gl_signbitf (x))
 # endif
 # ifdef __cplusplus
-#  ifdef signbit
+#  if defined signbit || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
 #   undef signbit
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbrtowc.c ./gdb/gnulib/import/mbrtowc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbrtowc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/mbrtowc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,11 @@
 /* Specification.  */
 #include <wchar.h>
 
+#if C_LOCALE_MAYBE_EILSEQ
+# include "hard-locale.h"
+# include <locale.h>
+#endif
+
 #if GNULIB_defined_mbstate_t
 /* Implement mbrtowc() on top of mbtowc().  */
 
@@ -328,7 +333,10 @@ mbrtowc (wchar_t *pwc, const char *s, si
 size_t
 rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 {
-# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG
+  size_t ret;
+  wchar_t wc;
+
+# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG
   if (s == NULL)
     {
       pwc = NULL;
@@ -337,6 +345,14 @@ rpl_mbrtowc (wchar_t *pwc, const char *s
     }
 # endif
 
+# if MBRTOWC_EMPTY_INPUT_BUG
+  if (n == 0)
+    return (size_t) -2;
+# endif
+
+  if (! pwc)
+    pwc = &wc;
+
 # if MBRTOWC_RETVAL_BUG
   {
     static mbstate_t internal_state;
@@ -352,8 +368,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s
         size_t count = 0;
         for (; n > 0; s++, n--)
           {
-            wchar_t wc;
-            size_t ret = mbrtowc (&wc, s, 1, ps);
+            ret = mbrtowc (&wc, s, 1, ps);
 
             if (ret == (size_t)(-1))
               return (size_t)(-1);
@@ -361,8 +376,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s
             if (ret != (size_t)(-2))
               {
                 /* The multibyte character has been completed.  */
-                if (pwc != NULL)
-                  *pwc = wc;
+                *pwc = wc;
                 return (wc == 0 ? 0 : count);
               }
           }
@@ -371,32 +385,23 @@ rpl_mbrtowc (wchar_t *pwc, const char *s
   }
 # endif
 
-# if MBRTOWC_NUL_RETVAL_BUG
-  {
-    wchar_t wc;
-    size_t ret = mbrtowc (&wc, s, n, ps);
-
-    if (ret != (size_t)(-1) && ret != (size_t)(-2))
-      {
-        if (pwc != NULL)
-          *pwc = wc;
-        if (wc == 0)
-          ret = 0;
-      }
-    return ret;
-  }
-# else
-  {
-#   if MBRTOWC_NULL_ARG1_BUG
-    wchar_t dummy;
+  ret = mbrtowc (pwc, s, n, ps);
 
-    if (pwc == NULL)
-      pwc = &dummy;
-#   endif
+# if MBRTOWC_NUL_RETVAL_BUG
+  if (ret < (size_t) -2 && !*pwc)
+    return 0;
+# endif
 
-    return mbrtowc (pwc, s, n, ps);
-  }
+# if C_LOCALE_MAYBE_EILSEQ
+  if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
+    {
+      unsigned char uc = *s;
+      *pwc = uc;
+      return 1;
+    }
 # endif
+
+  return ret;
 }
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsinit.c ./gdb/gnulib/import/mbsinit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsinit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/mbsinit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs.c ./gdb/gnulib/import/mbsrtowcs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/mbsrtowcs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs-impl.h ./gdb/gnulib/import/mbsrtowcs-impl.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs-impl.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/mbsrtowcs-impl.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs-state.c ./gdb/gnulib/import/mbsrtowcs-state.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/mbsrtowcs-state.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/mbsrtowcs-state.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/memchr.c ./gdb/gnulib/import/memchr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/memchr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/memchr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/memmem.c ./gdb/gnulib/import/memmem.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/memmem.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/memmem.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/pathmax.h ./gdb/gnulib/import/pathmax.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/pathmax.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/pathmax.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rawmemchr.c ./gdb/gnulib/import/rawmemchr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rawmemchr.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/rawmemchr.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,136 @@
+/* Searching in a string.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+/* Find the first occurrence of C in S.  */
+void *
+rawmemchr (const void *s, int c_in)
+{
+  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+     long instead of a 64-bit uintmax_t tends to give better
+     performance.  On 64-bit hardware, unsigned long is generally 64
+     bits already.  Change this typedef to experiment with
+     performance.  */
+  typedef unsigned long int longword;
+
+  const unsigned char *char_ptr;
+  const longword *longword_ptr;
+  longword repeated_one;
+  longword repeated_c;
+  unsigned char c;
+
+  c = (unsigned char) c_in;
+
+  /* Handle the first few bytes by reading one byte at a time.
+     Do this until CHAR_PTR is aligned on a longword boundary.  */
+  for (char_ptr = (const unsigned char *) s;
+       (size_t) char_ptr % sizeof (longword) != 0;
+       ++char_ptr)
+    if (*char_ptr == c)
+      return (void *) char_ptr;
+
+  longword_ptr = (const longword *) char_ptr;
+
+  /* All these elucidatory comments refer to 4-byte longwords,
+     but the theory applies equally well to any size longwords.  */
+
+  /* Compute auxiliary longword values:
+     repeated_one is a value which has a 1 in every byte.
+     repeated_c has c in every byte.  */
+  repeated_one = 0x01010101;
+  repeated_c = c | (c << 8);
+  repeated_c |= repeated_c << 16;
+  if (0xffffffffU < (longword) -1)
+    {
+      repeated_one |= repeated_one << 31 << 1;
+      repeated_c |= repeated_c << 31 << 1;
+      if (8 < sizeof (longword))
+        {
+          size_t i;
+
+          for (i = 64; i < sizeof (longword) * 8; i *= 2)
+            {
+              repeated_one |= repeated_one << i;
+              repeated_c |= repeated_c << i;
+            }
+        }
+    }
+
+  /* Instead of the traditional loop which tests each byte, we will
+     test a longword at a time.  The tricky part is testing if *any of
+     the four* bytes in the longword in question are equal to NUL or
+     c.  We first use an xor with repeated_c.  This reduces the task
+     to testing whether *any of the four* bytes in longword1 is zero.
+
+     We compute tmp =
+       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+     That is, we perform the following operations:
+       1. Subtract repeated_one.
+       2. & ~longword1.
+       3. & a mask consisting of 0x80 in every byte.
+     Consider what happens in each byte:
+       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+         and step 3 transforms it into 0x80.  A carry can also be propagated
+         to more significant bytes.
+       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
+         the byte ends in a single bit of value 0 and k bits of value 1.
+         After step 2, the result is just k bits of value 1: 2^k - 1.  After
+         step 3, the result is 0.  And no carry is produced.
+     So, if longword1 has only non-zero bytes, tmp is zero.
+     Whereas if longword1 has a zero byte, call j the position of the least
+     significant zero byte.  Then the result has a zero at positions 0, ...,
+     j-1 and a 0x80 at position j.  We cannot predict the result at the more
+     significant bytes (positions j+1..3), but it does not matter since we
+     already have a non-zero bit at position 8*j+7.
+
+     The test whether any byte in longword1 is zero is equivalent
+     to testing whether tmp is nonzero.
+
+     This test can read beyond the end of a string, depending on where
+     C_IN is encountered.  However, this is considered safe since the
+     initialization phase ensured that the read will be aligned,
+     therefore, the read will not cross page boundaries and will not
+     cause a fault.  */
+
+  while (1)
+    {
+      longword longword1 = *longword_ptr ^ repeated_c;
+
+      if ((((longword1 - repeated_one) & ~longword1)
+           & (repeated_one << 7)) != 0)
+        break;
+      longword_ptr++;
+    }
+
+  char_ptr = (const unsigned char *) longword_ptr;
+
+  /* At this point, we know that one of the sizeof (longword) bytes
+     starting at char_ptr is == c.  On little-endian machines, we
+     could determine the first such byte without any further memory
+     accesses, just by looking at the tmp result from the last loop
+     iteration.  But this does not work on big-endian machines.
+     Choose code that works in both cases.  */
+
+  char_ptr = (unsigned char *) longword_ptr;
+  while (*char_ptr != c)
+    char_ptr++;
+  return (void *) char_ptr;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rawmemchr.valgrind ./gdb/gnulib/import/rawmemchr.valgrind
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rawmemchr.valgrind	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/rawmemchr.valgrind	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
+# This use is OK because it provides only a speedup.
+{
+    rawmemchr-value4
+    Memcheck:Value4
+    fun:rawmemchr
+}
+{
+    rawmemchr-value8
+    Memcheck:Value8
+    fun:rawmemchr
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/readlink.c ./gdb/gnulib/import/readlink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/readlink.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/readlink.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Stub for readlink().
-   Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/ref-add.sin ./gdb/gnulib/import/ref-add.sin
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/ref-add.sin	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/ref-add.sin	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Add this package to a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/ref-del.sin ./gdb/gnulib/import/ref-del.sin
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/ref-del.sin	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/ref-del.sin	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Remove this package from a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rename.c ./gdb/gnulib/import/rename.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rename.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/rename.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Work around rename bugs in some systems.
 
-   Copyright (C) 2001-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2006, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -285,7 +285,7 @@ rpl_rename (char const *src, char const 
   char *dst_temp = (char *) dst;
   bool src_slash;
   bool dst_slash;
-  bool dst_exists;
+  bool dst_exists _GL_UNUSED;
   int ret_val = -1;
   int rename_errno = ENOTDIR;
   struct stat src_st;
@@ -462,7 +462,9 @@ rpl_rename (char const *src, char const 
 
   ret_val = rename (src_temp, dst_temp);
   rename_errno = errno;
- out:
+
+ out: _GL_UNUSED_LABEL;
+
   if (src_temp != src)
     free (src_temp);
   if (dst_temp != dst)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rmdir.c ./gdb/gnulib/import/rmdir.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/rmdir.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/rmdir.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Work around rmdir bugs.
 
-   Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2012 Free Software
+   Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/same-inode.h ./gdb/gnulib/import/same-inode.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/same-inode.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/same-inode.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Determine whether two stat buffers refer to the same file.
 
-   Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/signal.in.h ./gdb/gnulib/import/signal.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/signal.in.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/signal.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,463 @@
+/* A GNU-like <signal.h>.
+
+   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
+/* Special invocation convention:
+   - Inside glibc header files.
+   - On glibc systems we have a sequence of nested includes
+     <signal.h> -> <ucontext.h> -> <signal.h>.
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.
+   - On glibc systems with GCC 4.3 we have a sequence of nested includes
+     <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
+     In this situation, some of the functions are not yet declared, therefore
+     we cannot provide the C++ aliases.  */
+
+# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+
+#define _GL_ALREADY_INCLUDING_SIGNAL_H
+
+/* Define pid_t, uid_t.
+   Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+   On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+   us; so include <sys/types.h> now, before the second inclusion guard.  */
+#include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+#define _@GUARD_PREFIX@_SIGNAL_H
+
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
+   declare pthread_sigmask in <pthread.h>, not in <signal.h>.
+   But avoid namespace pollution on glibc systems.*/
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+    && ((defined __APPLE__ && defined __MACH__) \
+        || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
+        || defined __sun || defined __ANDROID__) \
+    && ! defined __GLIBC__
+# include <pthread.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* On AIX, sig_atomic_t already includes volatile.  C99 requires that
+   'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
+   Hence, redefine this to a non-volatile type as needed.  */
+#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+# if !GNULIB_defined_sig_atomic_t
+typedef int rpl_sig_atomic_t;
+#  undef sig_atomic_t
+#  define sig_atomic_t rpl_sig_atomic_t
+#  define GNULIB_defined_sig_atomic_t 1
+# endif
+#endif
+
+/* A set or mask of signals.  */
+#if !@HAVE_SIGSET_T@
+# if !GNULIB_defined_sigset_t
+typedef unsigned int sigset_t;
+#  define GNULIB_defined_sigset_t 1
+# endif
+#endif
+
+/* Define sighandler_t, the type of signal handlers.  A GNU extension.  */
+#if !@HAVE_SIGHANDLER_T@
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_sighandler_t
+typedef void (*sighandler_t) (int);
+#  define GNULIB_defined_sighandler_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+#endif
+
+
+#if @GNULIB_SIGNAL_H_SIGPIPE@
+# ifndef SIGPIPE
+/* Define SIGPIPE to a value that does not overlap with other signals.  */
+#  define SIGPIPE 13
+#  define GNULIB_defined_SIGPIPE 1
+/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask',
+   'write', 'stdio'.  */
+# endif
+#endif
+
+
+/* Maximum signal number + 1.  */
+#ifndef NSIG
+# if defined __TANDEM
+#  define NSIG 32
+# endif
+#endif
+
+
+#if @GNULIB_PTHREAD_SIGMASK@
+# if @REPLACE_PTHREAD_SIGMASK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_sigmask
+#   define pthread_sigmask rpl_pthread_sigmask
+#  endif
+_GL_FUNCDECL_RPL (pthread_sigmask, int,
+                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+_GL_CXXALIAS_RPL (pthread_sigmask, int,
+                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# else
+#  if !@HAVE_PTHREAD_SIGMASK@
+_GL_FUNCDECL_SYS (pthread_sigmask, int,
+                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+#  endif
+_GL_CXXALIAS_SYS (pthread_sigmask, int,
+                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIASWARN (pthread_sigmask);
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_sigmask
+# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+                 "use gnulib module pthread_sigmask for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RAISE@
+# if @REPLACE_RAISE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef raise
+#   define raise rpl_raise
+#  endif
+_GL_FUNCDECL_RPL (raise, int, (int sig));
+_GL_CXXALIAS_RPL (raise, int, (int sig));
+# else
+#  if !@HAVE_RAISE@
+_GL_FUNCDECL_SYS (raise, int, (int sig));
+#  endif
+_GL_CXXALIAS_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIASWARN (raise);
+#elif defined GNULIB_POSIXCHECK
+# undef raise
+/* Assume raise is always declared.  */
+_GL_WARN_ON_USE (raise, "raise can crash on native Windows - "
+                 "use gnulib module raise for portability");
+#endif
+
+
+#if @GNULIB_SIGPROCMASK@
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+
+#  ifndef GNULIB_defined_signal_blocking
+#   define GNULIB_defined_signal_blocking 1
+#  endif
+
+/* Maximum signal number + 1.  */
+#  ifndef NSIG
+#   define NSIG 32
+#  endif
+
+/* This code supports only 32 signals.  */
+#  if !GNULIB_defined_verify_NSIG_constraint
+typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
+#   define GNULIB_defined_verify_NSIG_constraint 1
+#  endif
+
+# endif
+
+/* When also using extern inline, suppress the use of static inline in
+   standard headers of problematic Apple configurations, as Libc at
+   least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+   Perhaps Apple will fix this some day.  */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+     && (defined __i386__ || defined __x86_64__))
+# undef sigaddset
+# undef sigdelset
+# undef sigemptyset
+# undef sigfillset
+# undef sigismember
+#endif
+
+/* Test whether a given signal is contained in a signal set.  */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X.  */
+#  if defined __cplusplus && defined GNULIB_NAMESPACE
+#   undef sigismember
+#  endif
+# else
+_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig)
+                                    _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigismember);
+
+/* Initialize a signal set to the empty set.  */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X.  */
+#  if defined __cplusplus && defined GNULIB_NAMESPACE
+#   undef sigemptyset
+#  endif
+# else
+_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigemptyset);
+
+/* Add a signal to a signal set.  */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X.  */
+#  if defined __cplusplus && defined GNULIB_NAMESPACE
+#   undef sigaddset
+#  endif
+# else
+_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig)
+                                  _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigaddset);
+
+/* Remove a signal from a signal set.  */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X.  */
+#  if defined __cplusplus && defined GNULIB_NAMESPACE
+#   undef sigdelset
+#  endif
+# else
+_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig)
+                                  _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigdelset);
+
+/* Fill a signal set with all possible signals.  */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X.  */
+#  if defined __cplusplus && defined GNULIB_NAMESPACE
+#   undef sigfillset
+#  endif
+# else
+_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigfillset);
+
+/* Return the set of those blocked signals that are pending.  */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigpending);
+
+/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET.
+   Then, if SET is not NULL, affect the current set of blocked signals by
+   combining it with *SET as indicated in OPERATION.
+   In this implementation, you are not allowed to change a signal handler
+   while the signal is blocked.  */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+#  define SIG_BLOCK   0  /* blocked_set = blocked_set | *set; */
+#  define SIG_SETMASK 1  /* blocked_set = *set; */
+#  define SIG_UNBLOCK 2  /* blocked_set = blocked_set & ~*set; */
+_GL_FUNCDECL_SYS (sigprocmask, int,
+                  (int operation, const sigset_t *set, sigset_t *old_set));
+# endif
+_GL_CXXALIAS_SYS (sigprocmask, int,
+                  (int operation, const sigset_t *set, sigset_t *old_set));
+_GL_CXXALIASWARN (sigprocmask);
+
+/* Install the handler FUNC for signal SIG, and return the previous
+   handler.  */
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_function_taking_int_returning_void_t
+typedef void (*_gl_function_taking_int_returning_void_t) (int);
+#  define GNULIB_defined_function_taking_int_returning_void_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define signal rpl_signal
+#  endif
+_GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t,
+                  (int sig, _gl_function_taking_int_returning_void_t func));
+_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
+                  (int sig, _gl_function_taking_int_returning_void_t func));
+# else
+_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
+                  (int sig, _gl_function_taking_int_returning_void_t func));
+# endif
+_GL_CXXALIASWARN (signal);
+
+# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
+/* Raise signal SIGPIPE.  */
+_GL_EXTERN_C int _gl_raise_SIGPIPE (void);
+# endif
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaddset
+# if HAVE_RAW_DECL_SIGADDSET
+_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigdelset
+# if HAVE_RAW_DECL_SIGDELSET
+_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigemptyset
+# if HAVE_RAW_DECL_SIGEMPTYSET
+_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigfillset
+# if HAVE_RAW_DECL_SIGFILLSET
+_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigismember
+# if HAVE_RAW_DECL_SIGISMEMBER
+_GL_WARN_ON_USE (sigismember, "sigismember is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigpending
+# if HAVE_RAW_DECL_SIGPENDING
+_GL_WARN_ON_USE (sigpending, "sigpending is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigprocmask
+# if HAVE_RAW_DECL_SIGPROCMASK
+_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - "
+                 "use the gnulib module sigprocmask for portability");
+# endif
+#endif /* @GNULIB_SIGPROCMASK@ */
+
+
+#if @GNULIB_SIGACTION@
+# if !@HAVE_SIGACTION@
+
+#  if !@HAVE_SIGINFO_T@
+
+#   if !GNULIB_defined_siginfo_types
+
+/* Present to allow compilation, but unsupported by gnulib.  */
+union sigval
+{
+  int sival_int;
+  void *sival_ptr;
+};
+
+/* Present to allow compilation, but unsupported by gnulib.  */
+struct siginfo_t
+{
+  int si_signo;
+  int si_code;
+  int si_errno;
+  pid_t si_pid;
+  uid_t si_uid;
+  void *si_addr;
+  int si_status;
+  long si_band;
+  union sigval si_value;
+};
+typedef struct siginfo_t siginfo_t;
+
+#    define GNULIB_defined_siginfo_types 1
+#   endif
+
+#  endif /* !@HAVE_SIGINFO_T@ */
+
+/* We assume that platforms which lack the sigaction() function also lack
+   the 'struct sigaction' type, and vice versa.  */
+
+#  if !GNULIB_defined_struct_sigaction
+
+struct sigaction
+{
+  union
+  {
+    void (*_sa_handler) (int);
+    /* Present to allow compilation, but unsupported by gnulib.  POSIX
+       says that implementations may, but not must, make sa_sigaction
+       overlap with sa_handler, but we know of no implementation where
+       they do not overlap.  */
+    void (*_sa_sigaction) (int, siginfo_t *, void *);
+  } _sa_func;
+  sigset_t sa_mask;
+  /* Not all POSIX flags are supported.  */
+  int sa_flags;
+};
+#   define sa_handler _sa_func._sa_handler
+#   define sa_sigaction _sa_func._sa_sigaction
+/* Unsupported flags are not present.  */
+#   define SA_RESETHAND 1
+#   define SA_NODEFER 2
+#   define SA_RESTART 4
+
+#   define GNULIB_defined_struct_sigaction 1
+#  endif
+
+_GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict,
+                                   struct sigaction *restrict));
+
+# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+
+#  define sa_sigaction sa_handler
+
+# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+
+_GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict,
+                                   struct sigaction *restrict));
+_GL_CXXALIASWARN (sigaction);
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaction
+# if HAVE_RAW_DECL_SIGACTION
+_GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
+                 "use the gnulib module sigaction for portability");
+# endif
+#endif
+
+/* Some systems don't have SA_NODEFER.  */
+#ifndef SA_NODEFER
+# define SA_NODEFER 0
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stat.c ./gdb/gnulib/import/stat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Work around platform bugs in stat.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdbool.in.h ./gdb/gnulib/import/stdbool.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdbool.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stdbool.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stddef.in.h ./gdb/gnulib/import/stddef.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stddef.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stddef.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,7 +39,6 @@
 
 # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
 #  ifdef __need_wint_t
-#   undef _@GUARD_PREFIX@_STDDEF_H
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -54,33 +53,58 @@
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
 
-#  ifndef _@GUARD_PREFIX@_STDDEF_H
-#   define _@GUARD_PREFIX@_STDDEF_H
-
 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
-#if @REPLACE_NULL@
-# undef NULL
-# ifdef __cplusplus
+#  if (@REPLACE_NULL@ \
+       && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+#   undef NULL
+#   ifdef __cplusplus
    /* ISO C++ says that the macro NULL must expand to an integer constant
       expression, hence '((void *) 0)' is not allowed in C++.  */
-#  if __GNUG__ >= 3
+#    if __GNUG__ >= 3
     /* GNU C++ has a __null macro that behaves like an integer ('int' or
        'long') but has the same size as a pointer.  Use that, to avoid
        warnings.  */
-#   define NULL __null
-#  else
-#   define NULL 0L
+#     define NULL __null
+#    else
+#     define NULL 0L
+#    endif
+#   else
+#    define NULL ((void *) 0)
+#   endif
 #  endif
-# else
-#  define NULL ((void *) 0)
-# endif
-#endif
+
+#  ifndef _@GUARD_PREFIX@_STDDEF_H
+#   define _@GUARD_PREFIX@_STDDEF_H
 
 /* Some platforms lack wchar_t.  */
 #if !@HAVE_WCHAR_T@
 # define wchar_t int
 #endif
 
+/* Some platforms lack max_align_t.  The check for _GCC_MAX_ALIGN_T is
+   a hack in case the configure-time test was done with g++ even though
+   we are currently compiling with gcc.  */
+#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
+/* On the x86, the maximum storage alignment of double, long, etc. is 4,
+   but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
+   and the C11 standard allows this.  Work around this problem by
+   using __alignof__ (which returns 8 for double) rather than _Alignof
+   (which returns 4), and align each union member accordingly.  */
+# ifdef __GNUC__
+#  define _GL_STDDEF_ALIGNAS(type) \
+     __attribute__ ((__aligned__ (__alignof__ (type))))
+# else
+#  define _GL_STDDEF_ALIGNAS(type) /* */
+# endif
+typedef union
+{
+  char *__p _GL_STDDEF_ALIGNAS (char *);
+  double __d _GL_STDDEF_ALIGNAS (double);
+  long double __ld _GL_STDDEF_ALIGNAS (long double);
+  long int __i _GL_STDDEF_ALIGNAS (long int);
+} max_align_t;
+#endif
+
 #  endif /* _@GUARD_PREFIX@_STDDEF_H */
 # endif /* _@GUARD_PREFIX@_STDDEF_H */
 #endif /* __need_XXX */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdint.in.h ./gdb/gnulib/import/stdint.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdint.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stdint.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -38,8 +38,7 @@
    other system header files; just include the system's <stdint.h>.
    Ideally we should test __BIONIC__ here, but it is only defined after
    <sys/cdefs.h> has been included; hence test __ANDROID__ instead.  */
-#if defined __ANDROID__ \
-    && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
+#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #else
 
@@ -80,54 +79,51 @@
 #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 #define _@GUARD_PREFIX@_STDINT_H
 
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH.  */
+#include <limits.h>
+
+#if ! @HAVE_C99_STDINT_H@
+
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
    Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @NEXT_STDINT_H@.  */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include <sys/types.h>
-#endif
-
-/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
-   LONG_MIN, LONG_MAX, ULONG_MAX.  */
-#include <limits.h>
+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+#  include <sys/types.h>
+# endif
 
-#if @HAVE_INTTYPES_H@
+# if @HAVE_INTTYPES_H@
   /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
      int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
      <inttypes.h> also defines intptr_t and uintptr_t.  */
-# include <inttypes.h>
-#elif @HAVE_SYS_INTTYPES_H@
+#  include <inttypes.h>
+# elif @HAVE_SYS_INTTYPES_H@
   /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
      the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.  */
-# include <sys/inttypes.h>
-#endif
+#  include <sys/inttypes.h>
+# endif
 
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
   /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
      int{8,16,32,64}_t and __BIT_TYPES_DEFINED__.  In libc5 >= 5.2.2 it is
      included by <sys/types.h>.  */
-# include <sys/bitypes.h>
-#endif
+#  include <sys/bitypes.h>
+# endif
 
-#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
 /* Minimum and maximum values for an integer type under the usual assumption.
    Return an unspecified value if BITS == 0, adding a check to pacify
    picky compilers.  */
 
-#define _STDINT_MIN(signed, bits, zero) \
-  ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+# define _STDINT_MIN(signed, bits, zero) \
+    ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
 
-#define _STDINT_MAX(signed, bits, zero) \
-  ((signed) \
-   ? ~ _STDINT_MIN (signed, bits, zero) \
-   : /* The expression for the unsigned case.  The subtraction of (signed) \
-        is a nop in the unsigned case and avoids "signed integer overflow" \
-        warnings in the signed case.  */ \
-     ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+# define _STDINT_MAX(signed, bits, zero) \
+    (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
 
 #if !GNULIB_defined_stdint_types
 
@@ -136,26 +132,26 @@
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits.  */
 
-#undef int8_t
-#undef uint8_t
+# undef int8_t
+# undef uint8_t
 typedef signed char gl_int8_t;
 typedef unsigned char gl_uint8_t;
-#define int8_t gl_int8_t
-#define uint8_t gl_uint8_t
+# define int8_t gl_int8_t
+# define uint8_t gl_uint8_t
 
-#undef int16_t
-#undef uint16_t
+# undef int16_t
+# undef uint16_t
 typedef short int gl_int16_t;
 typedef unsigned short int gl_uint16_t;
-#define int16_t gl_int16_t
-#define uint16_t gl_uint16_t
+# define int16_t gl_int16_t
+# define uint16_t gl_uint16_t
 
-#undef int32_t
-#undef uint32_t
+# undef int32_t
+# undef uint32_t
 typedef int gl_int32_t;
 typedef unsigned int gl_uint32_t;
-#define int32_t gl_int32_t
-#define uint32_t gl_uint32_t
+# define int32_t gl_int32_t
+# define uint32_t gl_uint32_t
 
 /* If the system defines INT64_MAX, assume int64_t works.  That way,
    if the underlying platform defines int64_t to be a 64-bit long long
@@ -163,54 +159,54 @@ typedef unsigned int gl_uint32_t;
    int, which would mess up C++ name mangling.  We must use #ifdef
    rather than #if, to avoid an error with HP-UX 10.20 cc.  */
 
-#ifdef INT64_MAX
-# define GL_INT64_T
-#else
+# ifdef INT64_MAX
+#  define GL_INT64_T
+# else
 /* Do not undefine int64_t if gnulib is not being used with 64-bit
    types, since otherwise it breaks platforms like Tandem/NSK.  */
-# if LONG_MAX >> 31 >> 31 == 1
-#  undef int64_t
+#  if LONG_MAX >> 31 >> 31 == 1
+#   undef int64_t
 typedef long int gl_int64_t;
-#  define int64_t gl_int64_t
-#  define GL_INT64_T
-# elif defined _MSC_VER
-#  undef int64_t
+#   define int64_t gl_int64_t
+#   define GL_INT64_T
+#  elif defined _MSC_VER
+#   undef int64_t
 typedef __int64 gl_int64_t;
-#  define int64_t gl_int64_t
-#  define GL_INT64_T
-# elif @HAVE_LONG_LONG_INT@
-#  undef int64_t
+#   define int64_t gl_int64_t
+#   define GL_INT64_T
+#  elif @HAVE_LONG_LONG_INT@
+#   undef int64_t
 typedef long long int gl_int64_t;
-#  define int64_t gl_int64_t
-#  define GL_INT64_T
+#   define int64_t gl_int64_t
+#   define GL_INT64_T
+#  endif
 # endif
-#endif
 
-#ifdef UINT64_MAX
-# define GL_UINT64_T
-#else
-# if ULONG_MAX >> 31 >> 31 >> 1 == 1
-#  undef uint64_t
-typedef unsigned long int gl_uint64_t;
-#  define uint64_t gl_uint64_t
+# ifdef UINT64_MAX
 #  define GL_UINT64_T
-# elif defined _MSC_VER
-#  undef uint64_t
+# else
+#  if ULONG_MAX >> 31 >> 31 >> 1 == 1
+#   undef uint64_t
+typedef unsigned long int gl_uint64_t;
+#   define uint64_t gl_uint64_t
+#   define GL_UINT64_T
+#  elif defined _MSC_VER
+#   undef uint64_t
 typedef unsigned __int64 gl_uint64_t;
-#  define uint64_t gl_uint64_t
-#  define GL_UINT64_T
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
-#  undef uint64_t
+#   define uint64_t gl_uint64_t
+#   define GL_UINT64_T
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#   undef uint64_t
 typedef unsigned long long int gl_uint64_t;
-#  define uint64_t gl_uint64_t
-#  define GL_UINT64_T
+#   define uint64_t gl_uint64_t
+#   define GL_UINT64_T
+#  endif
 # endif
-#endif
 
 /* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
+# define _UINT8_T
+# define _UINT32_T
+# define _UINT64_T
 
 
 /* 7.18.1.2. Minimum-width integer types */
@@ -219,26 +215,26 @@ typedef unsigned long long int gl_uint64
    types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
    are the same as the corresponding N_t types.  */
 
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
+# undef int_least8_t
+# undef uint_least8_t
+# undef int_least16_t
+# undef uint_least16_t
+# undef int_least32_t
+# undef uint_least32_t
+# undef int_least64_t
+# undef uint_least64_t
+# define int_least8_t int8_t
+# define uint_least8_t uint8_t
+# define int_least16_t int16_t
+# define uint_least16_t uint16_t
+# define int_least32_t int32_t
+# define uint_least32_t uint32_t
+# ifdef GL_INT64_T
+#  define int_least64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+#  define uint_least64_t uint64_t
+# endif
 
 /* 7.18.1.3. Fastest minimum-width integer types */
 
@@ -251,50 +247,55 @@ typedef unsigned long long int gl_uint64
    uses types consistent with glibc, as that lessens the chance of
    incompatibility with older GNU hosts.  */
 
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
+# undef int_fast8_t
+# undef uint_fast8_t
+# undef int_fast16_t
+# undef uint_fast16_t
+# undef int_fast32_t
+# undef uint_fast32_t
+# undef int_fast64_t
+# undef uint_fast64_t
 typedef signed char gl_int_fast8_t;
 typedef unsigned char gl_uint_fast8_t;
 
-#ifdef __sun
+# ifdef __sun
 /* Define types compatible with SunOS 5.10, so that code compiled under
    earlier SunOS versions works with code compiled under SunOS 5.10.  */
 typedef int gl_int_fast32_t;
 typedef unsigned int gl_uint_fast32_t;
-#else
+# else
 typedef long int gl_int_fast32_t;
 typedef unsigned long int gl_uint_fast32_t;
-#endif
+# endif
 typedef gl_int_fast32_t gl_int_fast16_t;
 typedef gl_uint_fast32_t gl_uint_fast16_t;
 
-#define int_fast8_t gl_int_fast8_t
-#define uint_fast8_t gl_uint_fast8_t
-#define int_fast16_t gl_int_fast16_t
-#define uint_fast16_t gl_uint_fast16_t
-#define int_fast32_t gl_int_fast32_t
-#define uint_fast32_t gl_uint_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
+# define int_fast8_t gl_int_fast8_t
+# define uint_fast8_t gl_uint_fast8_t
+# define int_fast16_t gl_int_fast16_t
+# define uint_fast16_t gl_uint_fast16_t
+# define int_fast32_t gl_int_fast32_t
+# define uint_fast32_t gl_uint_fast32_t
+# ifdef GL_INT64_T
+#  define int_fast64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+#  define uint_fast64_t uint64_t
+# endif
 
 /* 7.18.1.4. Integer types capable of holding object pointers */
 
-#undef intptr_t
-#undef uintptr_t
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+   definitions of intptr_t and uintptr_t (which use int and unsigned)
+   to avoid clashes with declarations of system functions like sbrk.  */
+# ifndef _INTPTR_T_DECLARED
+# undef intptr_t
+# undef uintptr_t
 typedef long int gl_intptr_t;
 typedef unsigned long int gl_uintptr_t;
-#define intptr_t gl_intptr_t
-#define uintptr_t gl_uintptr_t
+# define intptr_t gl_intptr_t
+# define uintptr_t gl_uintptr_t
+# endif
 
 /* 7.18.1.5. Greatest-width integer types */
 
@@ -305,33 +306,33 @@ typedef unsigned long int gl_uintptr_t;
    similarly for UINTMAX_MAX and uintmax_t.  This avoids problems with
    assuming one type where another is used by the system.  */
 
-#ifndef INTMAX_MAX
-# undef INTMAX_C
-# undef intmax_t
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# ifndef INTMAX_MAX
+#  undef INTMAX_C
+#  undef intmax_t
+#  if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 typedef long long int gl_intmax_t;
-#  define intmax_t gl_intmax_t
-# elif defined GL_INT64_T
-#  define intmax_t int64_t
-# else
+#   define intmax_t gl_intmax_t
+#  elif defined GL_INT64_T
+#   define intmax_t int64_t
+#  else
 typedef long int gl_intmax_t;
-#  define intmax_t gl_intmax_t
+#   define intmax_t gl_intmax_t
+#  endif
 # endif
-#endif
 
-#ifndef UINTMAX_MAX
-# undef UINTMAX_C
-# undef uintmax_t
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# ifndef UINTMAX_MAX
+#  undef UINTMAX_C
+#  undef uintmax_t
+#  if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 typedef unsigned long long int gl_uintmax_t;
-#  define uintmax_t gl_uintmax_t
-# elif defined GL_UINT64_T
-#  define uintmax_t uint64_t
-# else
+#   define uintmax_t gl_uintmax_t
+#  elif defined GL_UINT64_T
+#   define uintmax_t uint64_t
+#  else
 typedef unsigned long int gl_uintmax_t;
-#  define uintmax_t gl_uintmax_t
+#   define uintmax_t gl_uintmax_t
+#  endif
 # endif
-#endif
 
 /* Verify that intmax_t and uintmax_t have the same size.  Too much code
    breaks if this is not the case.  If this check fails, the reason is likely
@@ -339,8 +340,8 @@ typedef unsigned long int gl_uintmax_t;
 typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
                                 ? 1 : -1];
 
-#define GNULIB_defined_stdint_types 1
-#endif /* !GNULIB_defined_stdint_types */
+# define GNULIB_defined_stdint_types 1
+# endif /* !GNULIB_defined_stdint_types */
 
 /* 7.18.2. Limits of specified-width integer types */
 
@@ -349,37 +350,37 @@ typedef int _verify_intmax_size[sizeof (
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits.  */
 
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN  (~ INT8_MAX)
-#define INT8_MAX  127
-#define UINT8_MAX  255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN  (~ INT16_MAX)
-#define INT16_MAX  32767
-#define UINT16_MAX  65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN  (~ INT32_MAX)
-#define INT32_MAX  2147483647
-#define UINT32_MAX  4294967295U
+# undef INT8_MIN
+# undef INT8_MAX
+# undef UINT8_MAX
+# define INT8_MIN  (~ INT8_MAX)
+# define INT8_MAX  127
+# define UINT8_MAX  255
+
+# undef INT16_MIN
+# undef INT16_MAX
+# undef UINT16_MAX
+# define INT16_MIN  (~ INT16_MAX)
+# define INT16_MAX  32767
+# define UINT16_MAX  65535
+
+# undef INT32_MIN
+# undef INT32_MAX
+# undef UINT32_MAX
+# define INT32_MIN  (~ INT32_MAX)
+# define INT32_MAX  2147483647
+# define UINT32_MAX  4294967295U
 
-#if defined GL_INT64_T && ! defined INT64_MAX
+# if defined GL_INT64_T && ! defined INT64_MAX
 /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
    evaluates the latter incorrectly in preprocessor expressions.  */
-# define INT64_MIN  (- INTMAX_C (1) << 63)
-# define INT64_MAX  INTMAX_C (9223372036854775807)
-#endif
+#  define INT64_MIN  (- INTMAX_C (1) << 63)
+#  define INT64_MAX  INTMAX_C (9223372036854775807)
+# endif
 
-#if defined GL_UINT64_T && ! defined UINT64_MAX
-# define UINT64_MAX  UINTMAX_C (18446744073709551615)
-#endif
+# if defined GL_UINT64_T && ! defined UINT64_MAX
+#  define UINT64_MAX  UINTMAX_C (18446744073709551615)
+# endif
 
 /* 7.18.2.2. Limits of minimum-width integer types */
 
@@ -387,38 +388,38 @@ typedef int _verify_intmax_size[sizeof (
    types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
    are the same as the corresponding N_t types.  */
 
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN  INT8_MIN
-#define INT_LEAST8_MAX  INT8_MAX
-#define UINT_LEAST8_MAX  UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN  INT16_MIN
-#define INT_LEAST16_MAX  INT16_MAX
-#define UINT_LEAST16_MAX  UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN  INT32_MIN
-#define INT_LEAST32_MAX  INT32_MAX
-#define UINT_LEAST32_MAX  UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN  INT64_MIN
-# define INT_LEAST64_MAX  INT64_MAX
-#endif
-
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX  UINT64_MAX
-#endif
+# undef INT_LEAST8_MIN
+# undef INT_LEAST8_MAX
+# undef UINT_LEAST8_MAX
+# define INT_LEAST8_MIN  INT8_MIN
+# define INT_LEAST8_MAX  INT8_MAX
+# define UINT_LEAST8_MAX  UINT8_MAX
+
+# undef INT_LEAST16_MIN
+# undef INT_LEAST16_MAX
+# undef UINT_LEAST16_MAX
+# define INT_LEAST16_MIN  INT16_MIN
+# define INT_LEAST16_MAX  INT16_MAX
+# define UINT_LEAST16_MAX  UINT16_MAX
+
+# undef INT_LEAST32_MIN
+# undef INT_LEAST32_MAX
+# undef UINT_LEAST32_MAX
+# define INT_LEAST32_MIN  INT32_MIN
+# define INT_LEAST32_MAX  INT32_MAX
+# define UINT_LEAST32_MAX  UINT32_MAX
+
+# undef INT_LEAST64_MIN
+# undef INT_LEAST64_MAX
+# ifdef GL_INT64_T
+#  define INT_LEAST64_MIN  INT64_MIN
+#  define INT_LEAST64_MAX  INT64_MAX
+# endif
+
+# undef UINT_LEAST64_MAX
+# ifdef GL_UINT64_T
+#  define UINT_LEAST64_MAX  UINT64_MAX
+# endif
 
 /* 7.18.2.3. Limits of fastest minimum-width integer types */
 
@@ -426,117 +427,117 @@ typedef int _verify_intmax_size[sizeof (
    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
    are taken from the same list of types.  */
 
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN  SCHAR_MIN
-#define INT_FAST8_MAX  SCHAR_MAX
-#define UINT_FAST8_MAX  UCHAR_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN  INT_FAST32_MIN
-#define INT_FAST16_MAX  INT_FAST32_MAX
-#define UINT_FAST16_MAX  UINT_FAST32_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#ifdef __sun
-# define INT_FAST32_MIN  INT_MIN
-# define INT_FAST32_MAX  INT_MAX
-# define UINT_FAST32_MAX  UINT_MAX
-#else
-# define INT_FAST32_MIN  LONG_MIN
-# define INT_FAST32_MAX  LONG_MAX
-# define UINT_FAST32_MAX  ULONG_MAX
-#endif
+# undef INT_FAST8_MIN
+# undef INT_FAST8_MAX
+# undef UINT_FAST8_MAX
+# define INT_FAST8_MIN  SCHAR_MIN
+# define INT_FAST8_MAX  SCHAR_MAX
+# define UINT_FAST8_MAX  UCHAR_MAX
+
+# undef INT_FAST16_MIN
+# undef INT_FAST16_MAX
+# undef UINT_FAST16_MAX
+# define INT_FAST16_MIN  INT_FAST32_MIN
+# define INT_FAST16_MAX  INT_FAST32_MAX
+# define UINT_FAST16_MAX  UINT_FAST32_MAX
+
+# undef INT_FAST32_MIN
+# undef INT_FAST32_MAX
+# undef UINT_FAST32_MAX
+# ifdef __sun
+#  define INT_FAST32_MIN  INT_MIN
+#  define INT_FAST32_MAX  INT_MAX
+#  define UINT_FAST32_MAX  UINT_MAX
+# else
+#  define INT_FAST32_MIN  LONG_MIN
+#  define INT_FAST32_MAX  LONG_MAX
+#  define UINT_FAST32_MAX  ULONG_MAX
+# endif
 
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN  INT64_MIN
-# define INT_FAST64_MAX  INT64_MAX
-#endif
+# undef INT_FAST64_MIN
+# undef INT_FAST64_MAX
+# ifdef GL_INT64_T
+#  define INT_FAST64_MIN  INT64_MIN
+#  define INT_FAST64_MAX  INT64_MAX
+# endif
 
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX  UINT64_MAX
-#endif
+# undef UINT_FAST64_MAX
+# ifdef GL_UINT64_T
+#  define UINT_FAST64_MAX  UINT64_MAX
+# endif
 
 /* 7.18.2.4. Limits of integer types capable of holding object pointers */
 
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN  LONG_MIN
-#define INTPTR_MAX  LONG_MAX
-#define UINTPTR_MAX  ULONG_MAX
+# undef INTPTR_MIN
+# undef INTPTR_MAX
+# undef UINTPTR_MAX
+# define INTPTR_MIN  LONG_MIN
+# define INTPTR_MAX  LONG_MAX
+# define UINTPTR_MAX  ULONG_MAX
 
 /* 7.18.2.5. Limits of greatest-width integer types */
 
-#ifndef INTMAX_MAX
-# undef INTMAX_MIN
-# ifdef INT64_MAX
-#  define INTMAX_MIN  INT64_MIN
-#  define INTMAX_MAX  INT64_MAX
-# else
-#  define INTMAX_MIN  INT32_MIN
-#  define INTMAX_MAX  INT32_MAX
+# ifndef INTMAX_MAX
+#  undef INTMAX_MIN
+#  ifdef INT64_MAX
+#   define INTMAX_MIN  INT64_MIN
+#   define INTMAX_MAX  INT64_MAX
+#  else
+#   define INTMAX_MIN  INT32_MIN
+#   define INTMAX_MAX  INT32_MAX
+#  endif
 # endif
-#endif
 
-#ifndef UINTMAX_MAX
-# ifdef UINT64_MAX
-#  define UINTMAX_MAX  UINT64_MAX
-# else
-#  define UINTMAX_MAX  UINT32_MAX
+# ifndef UINTMAX_MAX
+#  ifdef UINT64_MAX
+#   define UINTMAX_MAX  UINT64_MAX
+#  else
+#   define UINTMAX_MAX  UINT32_MAX
+#  endif
 # endif
-#endif
 
 /* 7.18.3. Limits of other integer types */
 
 /* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-#  define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
-#  define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
+# undef PTRDIFF_MIN
+# undef PTRDIFF_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+#  ifdef _LP64
+#   define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
+#   define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
+#  else
+#   define PTRDIFF_MIN  _STDINT_MIN (1, 32, 0)
+#   define PTRDIFF_MAX  _STDINT_MAX (1, 32, 0)
+#  endif
 # else
-#  define PTRDIFF_MIN  _STDINT_MIN (1, 32, 0)
-#  define PTRDIFF_MAX  _STDINT_MAX (1, 32, 0)
-# endif
-#else
-# define PTRDIFF_MIN  \
+#  define PTRDIFF_MIN  \
     _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-# define PTRDIFF_MAX  \
+#  define PTRDIFF_MAX  \
     _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-#endif
+# endif
 
 /* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN  \
+# undef SIG_ATOMIC_MIN
+# undef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_MIN  \
    _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
                 0@SIG_ATOMIC_T_SUFFIX@)
-#define SIG_ATOMIC_MAX  \
+# define SIG_ATOMIC_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
                 0@SIG_ATOMIC_T_SUFFIX@)
 
 
 /* size_t limit */
-#undef SIZE_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-#  define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
+# undef SIZE_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+#  ifdef _LP64
+#   define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
+#  else
+#   define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)
+#  endif
 # else
-#  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)
+#  define SIZE_MAX  _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
 # endif
-#else
-# define SIZE_MAX  _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
-#endif
 
 /* wchar_t limits */
 /* Get WCHAR_MIN, WCHAR_MAX.
@@ -544,29 +545,29 @@ typedef int _verify_intmax_size[sizeof (
    sequence of nested includes
    <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
-#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
      included before <wchar.h>.  */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# include <wchar.h>
-# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-#endif
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN  \
+#  include <stddef.h>
+#  include <stdio.h>
+#  include <time.h>
+#  define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+#  include <wchar.h>
+#  undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# endif
+# undef WCHAR_MIN
+# undef WCHAR_MAX
+# define WCHAR_MIN  \
    _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-#define WCHAR_MAX  \
+# define WCHAR_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
 
 /* wint_t limits */
-#undef WINT_MIN
-#undef WINT_MAX
-#define WINT_MIN  \
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN  \
    _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#define WINT_MAX  \
+# define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
 
 /* 7.18.4. Macros for integer constants */
@@ -577,59 +578,120 @@ typedef int _verify_intmax_size[sizeof (
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits, and int is 32 bits.  */
 
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
+# undef INT8_C
+# undef UINT8_C
+# define INT8_C(x) x
+# define UINT8_C(x) x
+
+# undef INT16_C
+# undef UINT16_C
+# define INT16_C(x) x
+# define UINT16_C(x) x
+
+# undef INT32_C
+# undef UINT32_C
+# define INT32_C(x) x
+# define UINT32_C(x) x ## U
+
+# undef INT64_C
+# undef UINT64_C
+# if LONG_MAX >> 31 >> 31 == 1
+#  define INT64_C(x) x##L
+# elif defined _MSC_VER
+#  define INT64_C(x) x##i64
+# elif @HAVE_LONG_LONG_INT@
+#  define INT64_C(x) x##LL
+# endif
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+#  define UINT64_C(x) x##UL
+# elif defined _MSC_VER
+#  define UINT64_C(x) x##ui64
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#  define UINT64_C(x) x##ULL
+# endif
 
 /* 7.18.4.2. Macros for greatest-width integer constants */
 
-#ifndef INTMAX_C
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-#  define INTMAX_C(x)   x##LL
-# elif defined GL_INT64_T
-#  define INTMAX_C(x)   INT64_C(x)
-# else
-#  define INTMAX_C(x)   x##L
+# ifndef INTMAX_C
+#  if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define INTMAX_C(x)   x##LL
+#  elif defined GL_INT64_T
+#   define INTMAX_C(x)   INT64_C(x)
+#  else
+#   define INTMAX_C(x)   x##L
+#  endif
 # endif
-#endif
 
-#ifndef UINTMAX_C
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-#  define UINTMAX_C(x)  x##ULL
-# elif defined GL_UINT64_T
-#  define UINTMAX_C(x)  UINT64_C(x)
-# else
-#  define UINTMAX_C(x)  x##UL
+# ifndef UINTMAX_C
+#  if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define UINTMAX_C(x)  x##ULL
+#  elif defined GL_UINT64_T
+#   define UINTMAX_C(x)  UINT64_C(x)
+#  else
+#   define UINTMAX_C(x)  x##UL
+#  endif
 # endif
-#endif
+
+#endif /* !@HAVE_C99_STDINT_H@ */
+
+/* Macros specified by ISO/IEC TS 18661-1:2014.  */
+
+#if (!defined UINTMAX_WIDTH \
+     && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# ifdef INT8_MAX
+#  define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX)
+# endif
+# ifdef UINT8_MAX
+#  define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX)
+# endif
+# ifdef INT16_MAX
+#  define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX)
+# endif
+# ifdef UINT16_MAX
+#  define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX)
+# endif
+# ifdef INT32_MAX
+#  define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX)
+# endif
+# ifdef UINT32_MAX
+#  define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX)
+# endif
+# ifdef INT64_MAX
+#  define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX)
+# endif
+# ifdef UINT64_MAX
+#  define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX)
+# endif
+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX)
+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX)
+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX)
+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX)
+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX)
+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX)
+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX)
+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX)
+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX)
+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX)
+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX)
+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX)
+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX)
+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX)
+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX)
+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX)
+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX)
+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX)
+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX)
+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX)
+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX)
+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX)
+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX)
+# ifdef WINT_MAX
+#  define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX)
+# endif
+# ifdef SIG_ATOMIC_MAX
+#  define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX)
+# endif
+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
 
 #endif /* _@GUARD_PREFIX@_STDINT_H */
 #endif /* !(defined __ANDROID__ && ...) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdio.c ./gdb/gnulib/import/stdio.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdio.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stdio.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-#include <config.h>
-#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
-#include "stdio.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdio.in.h ./gdb/gnulib/import/stdio.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdio.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stdio.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,11 +46,6 @@
 #ifndef _@GUARD_PREFIX@_STDIO_H
 #define _@GUARD_PREFIX@_STDIO_H
 
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_STDIO_INLINE
-# define _GL_STDIO_INLINE _GL_INLINE
-#endif
-
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
 
@@ -89,8 +84,13 @@ _GL_INLINE_HEADER_BEGIN
    except that it indicates to GCC that the supported format string directives
    are the ones of the system printf(), rather than the ones standardized by
    ISO C99 and POSIX.  */
-#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
+#else
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
 
 /* _GL_ATTRIBUTE_FORMAT_SCANF
    indicates to GCC that the function takes a format string and arguments,
@@ -129,6 +129,15 @@ _GL_INLINE_HEADER_BEGIN
 #define _GL_STDIO_STRINGIZE(token) #token
 #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
 
+/* When also using extern inline, suppress the use of static inline in
+   standard headers of problematic Apple configurations, as Libc at
+   least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+   Perhaps Apple will fix this some day.  */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+     && defined __GNUC__ && defined __STDC__)
+# undef putc_unlocked
+#endif
 
 #if @GNULIB_DPRINTF@
 # if @REPLACE_DPRINTF@
@@ -580,21 +589,27 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
 _GL_CXXALIAS_SYS (fwrite, size_t,
                   (const void *ptr, size_t s, size_t n, FILE *stream));
 
-/* Work around glibc bug 11959
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
    <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
    which sometimes causes an unwanted diagnostic for fwrite calls.
-   This affects only function declaration attributes, so it's not
-   needed for C++.  */
-#  if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
-rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
-{
-  size_t r = fwrite (ptr, s, n, stream);
-  (void) r;
-  return r;
-}
+   This affects only function declaration attributes under certain
+   versions of gcc and clang, and is not needed for C++.  */
+#  if (0 < __USE_FORTIFY_LEVEL                                          \
+       && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
+       && 3 < __GNUC__ + (4 <= __GNUC_MINOR__)                          \
+       && !defined __cplusplus)
 #   undef fwrite
+#   undef fwrite_unlocked
+extern size_t __REDIRECT (rpl_fwrite,
+                          (const void *__restrict, size_t, size_t,
+                           FILE *__restrict),
+                          fwrite);
+extern size_t __REDIRECT (rpl_fwrite_unlocked,
+                          (const void *__restrict, size_t, size_t,
+                           FILE *__restrict),
+                          fwrite_unlocked);
 #   define fwrite rpl_fwrite
+#   define fwrite_unlocked rpl_fwrite_unlocked
 #  endif
 # endif
 _GL_CXXALIASWARN (fwrite);
@@ -708,11 +723,10 @@ _GL_WARN_ON_USE (getline, "getline is un
    so any use of gets warrants an unconditional warning; besides, C11
    removed it.  */
 #undef gets
-#if HAVE_RAW_DECL_GETS
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
-
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
 struct obstack;
 /* Grow an obstack with formatted output.  Return the number of
@@ -1338,8 +1352,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is 
                       "POSIX compliance");
 #endif
 
-_GL_INLINE_HEADER_END
-
 #endif /* _@GUARD_PREFIX@_STDIO_H */
 #endif /* _@GUARD_PREFIX@_STDIO_H */
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdlib.in.h ./gdb/gnulib/import/stdlib.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stdlib.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stdlib.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,8 +20,9 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined __need_malloc_and_calloc
-/* Special invocation convention inside glibc header files.  */
+#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
+/* Special invocation conventions inside some gnulib header files,
+   and inside some glibc header files, respectively.  */
 
 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
 
@@ -519,6 +520,44 @@ _GL_CXXALIAS_SYS (putenv, int, (char *st
 _GL_CXXALIASWARN (putenv);
 #endif
 
+#if @GNULIB_QSORT_R@
+/* Sort an array of NMEMB elements, starting at address BASE, each element
+   occupying SIZE bytes, in ascending order according to the comparison
+   function COMPARE.  */
+# if @REPLACE_QSORT_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef qsort_r
+#   define qsort_r rpl_qsort_r
+#  endif
+_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg));
+# else
+#  if !@HAVE_QSORT_R@
+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
+#  endif
+_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg));
+# endif
+_GL_CXXALIASWARN (qsort_r);
+#elif defined GNULIB_POSIXCHECK
+# undef qsort_r
+# if HAVE_RAW_DECL_QSORT_R
+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
+                 "use gnulib module qsort_r for portability");
+# endif
+#endif
+
 
 #if @GNULIB_RANDOM_R@
 # if !@HAVE_RANDOM_R@
@@ -766,6 +805,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is un
 # endif
 #endif
 
+#if @GNULIB_SECURE_GETENV@
+/* Look up NAME in the environment, returning 0 in insecure situations.  */
+# if !@HAVE_SECURE_GETENV@
+_GL_FUNCDECL_SYS (secure_getenv, char *,
+                  (char const *name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
+_GL_CXXALIASWARN (secure_getenv);
+#elif defined GNULIB_POSIXCHECK
+# undef secure_getenv
+# if HAVE_RAW_DECL_SECURE_GETENV
+_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
+                 "use gnulib module secure_getenv for portability");
+# endif
+#endif
+
 #if @GNULIB_SETENV@
 /* Set NAME to VALUE in the environment.
    If REPLACE is nonzero, overwrite an existing value.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strchrnul.c ./gdb/gnulib/import/strchrnul.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strchrnul.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/strchrnul.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,142 @@
+/* Searching in a string.
+   Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+/* Find the first occurrence of C in S or the final NUL byte.  */
+char *
+strchrnul (const char *s, int c_in)
+{
+  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+     long instead of a 64-bit uintmax_t tends to give better
+     performance.  On 64-bit hardware, unsigned long is generally 64
+     bits already.  Change this typedef to experiment with
+     performance.  */
+  typedef unsigned long int longword;
+
+  const unsigned char *char_ptr;
+  const longword *longword_ptr;
+  longword repeated_one;
+  longword repeated_c;
+  unsigned char c;
+
+  c = (unsigned char) c_in;
+  if (!c)
+    return rawmemchr (s, 0);
+
+  /* Handle the first few bytes by reading one byte at a time.
+     Do this until CHAR_PTR is aligned on a longword boundary.  */
+  for (char_ptr = (const unsigned char *) s;
+       (size_t) char_ptr % sizeof (longword) != 0;
+       ++char_ptr)
+    if (!*char_ptr || *char_ptr == c)
+      return (char *) char_ptr;
+
+  longword_ptr = (const longword *) char_ptr;
+
+  /* All these elucidatory comments refer to 4-byte longwords,
+     but the theory applies equally well to any size longwords.  */
+
+  /* Compute auxiliary longword values:
+     repeated_one is a value which has a 1 in every byte.
+     repeated_c has c in every byte.  */
+  repeated_one = 0x01010101;
+  repeated_c = c | (c << 8);
+  repeated_c |= repeated_c << 16;
+  if (0xffffffffU < (longword) -1)
+    {
+      repeated_one |= repeated_one << 31 << 1;
+      repeated_c |= repeated_c << 31 << 1;
+      if (8 < sizeof (longword))
+        {
+          size_t i;
+
+          for (i = 64; i < sizeof (longword) * 8; i *= 2)
+            {
+              repeated_one |= repeated_one << i;
+              repeated_c |= repeated_c << i;
+            }
+        }
+    }
+
+  /* Instead of the traditional loop which tests each byte, we will
+     test a longword at a time.  The tricky part is testing if *any of
+     the four* bytes in the longword in question are equal to NUL or
+     c.  We first use an xor with repeated_c.  This reduces the task
+     to testing whether *any of the four* bytes in longword1 or
+     longword2 is zero.
+
+     Let's consider longword1.  We compute tmp =
+       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+     That is, we perform the following operations:
+       1. Subtract repeated_one.
+       2. & ~longword1.
+       3. & a mask consisting of 0x80 in every byte.
+     Consider what happens in each byte:
+       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+         and step 3 transforms it into 0x80.  A carry can also be propagated
+         to more significant bytes.
+       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
+         the byte ends in a single bit of value 0 and k bits of value 1.
+         After step 2, the result is just k bits of value 1: 2^k - 1.  After
+         step 3, the result is 0.  And no carry is produced.
+     So, if longword1 has only non-zero bytes, tmp is zero.
+     Whereas if longword1 has a zero byte, call j the position of the least
+     significant zero byte.  Then the result has a zero at positions 0, ...,
+     j-1 and a 0x80 at position j.  We cannot predict the result at the more
+     significant bytes (positions j+1..3), but it does not matter since we
+     already have a non-zero bit at position 8*j+7.
+
+     The test whether any byte in longword1 or longword2 is zero is equivalent
+     to testing whether tmp1 is nonzero or tmp2 is nonzero.  We can combine
+     this into a single test, whether (tmp1 | tmp2) is nonzero.
+
+     This test can read more than one byte beyond the end of a string,
+     depending on where the terminating NUL is encountered.  However,
+     this is considered safe since the initialization phase ensured
+     that the read will be aligned, therefore, the read will not cross
+     page boundaries and will not cause a fault.  */
+
+  while (1)
+    {
+      longword longword1 = *longword_ptr ^ repeated_c;
+      longword longword2 = *longword_ptr;
+
+      if (((((longword1 - repeated_one) & ~longword1)
+            | ((longword2 - repeated_one) & ~longword2))
+           & (repeated_one << 7)) != 0)
+        break;
+      longword_ptr++;
+    }
+
+  char_ptr = (const unsigned char *) longword_ptr;
+
+  /* At this point, we know that one of the sizeof (longword) bytes
+     starting at char_ptr is == 0 or == c.  On little-endian machines,
+     we could determine the first such byte without any further memory
+     accesses, just by looking at the tmp result from the last loop
+     iteration.  But this does not work on big-endian machines.
+     Choose code that works in both cases.  */
+
+  char_ptr = (unsigned char *) longword_ptr;
+  while (*char_ptr && (*char_ptr != c))
+    char_ptr++;
+  return (char *) char_ptr;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strchrnul.valgrind ./gdb/gnulib/import/strchrnul.valgrind
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strchrnul.valgrind	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/strchrnul.valgrind	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in strchrnul().
+# This use is OK because it provides only a speedup.
+{
+    strchrnul-value4
+    Memcheck:Value4
+    fun:strchrnul
+}
+{
+    strchrnul-value8
+    Memcheck:Value8
+    fun:strchrnul
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/streq.h ./gdb/gnulib/import/streq.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/streq.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/streq.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/string.in.h ./gdb/gnulib/import/string.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/string.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/string.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,16 +15,32 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _@GUARD_PREFIX@_STRING_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#if defined _GL_ALREADY_INCLUDING_STRING_H
+/* Special invocation convention:
+   - On OS X/NetBSD we have a sequence of nested includes
+       <string.h> -> <strings.h> -> "string.h"
+     In this situation system _chk variants due to -D_FORTIFY_SOURCE
+     might be used after any replacements defined here.  */
+
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_STRING_H
+
+#define _GL_ALREADY_INCLUDING_STRING_H
+
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STRING_H@
 
+#undef _GL_ALREADY_INCLUDING_STRING_H
+
 #ifndef _@GUARD_PREFIX@_STRING_H
 #define _@GUARD_PREFIX@_STRING_H
 
@@ -400,15 +416,15 @@ _GL_WARN_ON_USE (strncat, "strncat is un
 #   undef strndup
 #   define strndup rpl_strndup
 #  endif
-_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
                                    _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
 # else
 #  if ! @HAVE_DECL_STRNDUP@
-_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
                                    _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
 # endif
 _GL_CXXALIASWARN (strndup);
 #elif defined GNULIB_POSIXCHECK
@@ -428,17 +444,17 @@ _GL_WARN_ON_USE (strndup, "strndup is un
 #   undef strnlen
 #   define strnlen rpl_strnlen
 #  endif
-_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
                                    _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
 # else
 #  if ! @HAVE_DECL_STRNLEN@
-_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
                                    _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
 # endif
 _GL_CXXALIASWARN (strnlen);
 #elif defined GNULIB_POSIXCHECK
@@ -1027,3 +1043,4 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp
 
 #endif /* _@GUARD_PREFIX@_STRING_H */
 #endif /* _@GUARD_PREFIX@_STRING_H */
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stripslash.c ./gdb/gnulib/import/stripslash.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/stripslash.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/stripslash.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
 
-   Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation,
+   Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strnlen1.c ./gdb/gnulib/import/strnlen1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strnlen1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/strnlen1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strnlen1.h ./gdb/gnulib/import/strnlen1.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strnlen1.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/strnlen1.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strstr.c ./gdb/gnulib/import/strstr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strstr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/strstr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strtok_r.c ./gdb/gnulib/import/strtok_r.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/strtok_r.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/strtok_r.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2012 Free Software
+   Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/str-two-way.h ./gdb/gnulib/import/str-two-way.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/str-two-way.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/str-two-way.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Byte-wise substring search, using the Two-Way algorithm.
-   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Eric Blake <ebb9@byu.net>, 2008.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_stat.in.h ./gdb/gnulib/import/sys_stat.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_stat.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/sys_stat.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat header file.
-   Copyright (C) 2005-2012 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -150,6 +150,10 @@
 # endif
 #endif
 
+#ifndef S_ISMPX /* AIX */
+# define S_ISMPX(m) 0
+#endif
+
 #ifndef S_ISNAM /* Xenix */
 # ifdef S_IFNAM
 #  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_time.in.h ./gdb/gnulib/import/sys_time.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_time.in.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/gnulib/import/sys_time.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,220 @@
+/* Provide a more complete sys/time.h.
+
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
+   recursively via <sys/select.h>.
+   Simply delegate to the system's header in this case; it is a no-op.
+   Without this extra ifdef, the C++ gettimeofday declaration below
+   would be a forward declaration in gnulib's nested <sys/time.h>.  */
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#else
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+#define _@GUARD_PREFIX@_SYS_TIME_H
+
+#if ! @HAVE_SYS_TIME_H@
+# include <time.h>
+#endif
+
+/* On native Windows with MSVC, get the 'struct timeval' type.
+   Also, on native Windows with a 64-bit time_t, where we are overriding the
+   'struct timeval' type, get all declarations of system functions whose
+   signature contains 'struct timeval'.  */
+#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
+
+# if @REPLACE_STRUCT_TIMEVAL@
+#  define timeval rpl_timeval
+# endif
+
+# if !GNULIB_defined_struct_timeval
+struct timeval
+{
+  time_t tv_sec;
+  long int tv_usec;
+};
+#  define GNULIB_defined_struct_timeval 1
+# endif
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GETTIMEOFDAY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef gettimeofday
+#   define gettimeofday rpl_gettimeofday
+#  endif
+_GL_FUNCDECL_RPL (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict));
+# else
+#  if !@HAVE_GETTIMEOFDAY@
+_GL_FUNCDECL_SYS (gettimeofday, int,
+                  (struct timeval *restrict, void *restrict)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on glibc systems, by default, the second argument is
+                                                  struct timezone *.  */
+_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
+                       (struct timeval *restrict, void *restrict));
+# endif
+_GL_CXXALIASWARN (gettimeofday);
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+namespace GNULIB_NAMESPACE {
+  typedef ::timeval
+#undef timeval
+    timeval;
+}
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef gettimeofday
+# if HAVE_RAW_DECL_GETTIMEOFDAY
+_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
+                 "use gnulib module gettimeofday for portability");
+# endif
+#endif
+
+/* Hide some function declarations from <winsock2.h>.  */
+
+#if defined _MSC_VER && @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close close_used_without_including_unistd_h
+#  else
+     _GL_WARN_ON_USE (close,
+                      "close() used without including <unistd.h>");
+#  endif
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef gethostname
+#   define gethostname gethostname_used_without_including_unistd_h
+#  else
+     _GL_WARN_ON_USE (gethostname,
+                      "gethostname() used without including <unistd.h>");
+#  endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef socket
+#   define socket              socket_used_without_including_sys_socket_h
+#   undef connect
+#   define connect             connect_used_without_including_sys_socket_h
+#   undef accept
+#   define accept              accept_used_without_including_sys_socket_h
+#   undef bind
+#   define bind                bind_used_without_including_sys_socket_h
+#   undef getpeername
+#   define getpeername         getpeername_used_without_including_sys_socket_h
+#   undef getsockname
+#   define getsockname         getsockname_used_without_including_sys_socket_h
+#   undef getsockopt
+#   define getsockopt          getsockopt_used_without_including_sys_socket_h
+#   undef listen
+#   define listen              listen_used_without_including_sys_socket_h
+#   undef recv
+#   define recv                recv_used_without_including_sys_socket_h
+#   undef send
+#   define send                send_used_without_including_sys_socket_h
+#   undef recvfrom
+#   define recvfrom            recvfrom_used_without_including_sys_socket_h
+#   undef sendto
+#   define sendto              sendto_used_without_including_sys_socket_h
+#   undef setsockopt
+#   define setsockopt          setsockopt_used_without_including_sys_socket_h
+#   undef shutdown
+#   define shutdown            shutdown_used_without_including_sys_socket_h
+#  else
+     _GL_WARN_ON_USE (socket,
+                      "socket() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (connect,
+                      "connect() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (accept,
+                      "accept() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (bind,
+                      "bind() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getpeername,
+                      "getpeername() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockname,
+                      "getsockname() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockopt,
+                      "getsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (listen,
+                      "listen() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recv,
+                      "recv() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (send,
+                      "send() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recvfrom,
+                      "recvfrom() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (sendto,
+                      "sendto() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (setsockopt,
+                      "setsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (shutdown,
+                      "shutdown() used without including <sys/socket.h>");
+#  endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef select
+#   define select select_used_without_including_sys_select_h
+#  else
+     _GL_WARN_ON_USE (select,
+                      "select() used without including <sys/select.h>");
+#  endif
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
+#endif /* _CYGWIN_SYS_TIME_H */
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_types.in.h ./gdb/gnulib/import/sys_types.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/sys_types.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/sys_types.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,9 @@
 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
 
 /* The include_next requires a split double-inclusion guard.  */
+# define _GL_INCLUDING_SYS_TYPES_H
 #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+# undef _GL_INCLUDING_SYS_TYPES_H
 
 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
 #define _@GUARD_PREFIX@_SYS_TYPES_H
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/time.in.h ./gdb/gnulib/import/time.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/time.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/time.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,11 +22,13 @@
 
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
-   symbols.  Also, Solaris 8 <time.h> eventually includes itself
+   symbols.  (However, skip this for MinGW as it treats __need_time_t
+   incompatibly.)  Also, Solaris 8 <time.h> eventually includes itself
    recursively; if that is happening, just include the system <time.h>
    without adding our own declarations.  */
-#if (defined __need_time_t || defined __need_clock_t \
-     || defined __need_timespec \
+#if (((defined __need_time_t || defined __need_clock_t \
+       || defined __need_timespec)                     \
+      && !defined __MINGW32__)                         \
      || defined _@GUARD_PREFIX@_TIME_H)
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
@@ -48,20 +50,15 @@
 
 /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
    Or they define it with the wrong member names or define it in <sys/time.h>
-   (e.g., FreeBSD circa 1997).  Stock Mingw does not define it, but the
-   pthreads-win32 library defines it in <pthread.h>.  */
+   (e.g., FreeBSD circa 1997).  Stock Mingw prior to 3.0 does not define it,
+   but the pthreads-win32 library defines it in <pthread.h>.  */
 # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
 #  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 #   include <sys/time.h>
 #  elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 #   include <pthread.h>
-/* The pthreads-win32 <pthread.h> also defines a couple of broken macros.  */
-#   undef asctime_r
-#   undef ctime_r
-#   undef gmtime_r
-#   undef localtime_r
-#   undef rand_r
-#   undef strtok_r
+#  elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+#   include <unistd.h>
 #  else
 
 #   ifdef __cplusplus
@@ -187,6 +184,39 @@ _GL_CXXALIASWARN (gmtime_r);
 #  endif
 # endif
 
+/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
+   <http://www.opengroup.org/susv3xsh/localtime.html> and
+   <http://www.opengroup.org/susv3xsh/gmtime.html>.  */
+# if @GNULIB_GETTIMEOFDAY@
+#  if @REPLACE_LOCALTIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef localtime
+#    define localtime rpl_localtime
+#   endif
+_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
+		                          _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
+#  else
+_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
+#  endif
+_GL_CXXALIASWARN (localtime);
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+#  if @REPLACE_GMTIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef gmtime
+#    define gmtime rpl_gmtime
+#   endif
+_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
+                                       _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
+#  else
+_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
+#  endif
+_GL_CXXALIASWARN (gmtime);
+# endif
+
 /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
    the resulting broken-down time into TM.  See
    <http://www.opengroup.org/susv3xsh/strptime.html>.  */
@@ -203,6 +233,25 @@ _GL_CXXALIAS_SYS (strptime, char *, (cha
 _GL_CXXALIASWARN (strptime);
 # endif
 
+# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
+typedef struct tm_zone *timezone_t;
+_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
+_GL_FUNCDECL_SYS (localtime_rz, struct tm *,
+                  (timezone_t __tz, time_t const *restrict __timer,
+                   struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_SYS (localtime_rz, struct tm *,
+                  (timezone_t __tz, time_t const *restrict __timer,
+                   struct tm *restrict __result));
+_GL_FUNCDECL_SYS (mktime_z, time_t,
+                  (timezone_t __tz, struct tm *restrict __result)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_SYS (mktime_z, time_t,
+                  (timezone_t __tz, struct tm *restrict __result));
+# endif
+
 /* Convert TM to a time_t value, assuming UTC.  */
 # if @GNULIB_TIMEGM@
 #  if @REPLACE_TIMEGM@
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/unistd.c ./gdb/gnulib/import/unistd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/unistd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/unistd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,4 @@
 #include <config.h>
 #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
 #include "unistd.h"
+typedef int dummy;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/unistd.in.h ./gdb/gnulib/import/unistd.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/unistd.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/unistd.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2012 Free Software Foundation, Inc.
+   Copyright (C) 2003-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -14,32 +14,30 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _@GUARD_PREFIX@_UNISTD_H
+
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#ifdef _GL_INCLUDING_UNISTD_H
 /* Special invocation convention:
-   - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
-     but we need to ensure that both the system <unistd.h> and <winsock2.h>
-     are completely included before we replace gethostname.  */
-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
-  && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
-/* <unistd.h> is being indirectly included for the first time from
-   <winsock2.h>; avoid declaring any overrides.  */
-# if @HAVE_UNISTD_H@
-#  @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# else
-#  error unexpected; report this to bug-gnulib@gnu.org
-# endif
-# define _GL_WINSOCK2_H_WITNESS
+   - On Mac OS X 10.3.9 we have a sequence of nested includes
+     <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.  */
 
-/* Normal invocation.  */
-#elif !defined _@GUARD_PREFIX@_UNISTD_H
+#@INCLUDE_NEXT@ @NEXT_UNISTD_H@
+
+#else
+/* Normal invocation convention.  */
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
+# define _GL_INCLUDING_UNISTD_H
 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# undef _GL_INCLUDING_UNISTD_H
 #endif
 
 /* Get all possible declarations of gethostname().  */
@@ -77,9 +75,13 @@
 /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
    <unistd.h>.  */
 /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>.  */
+/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
+   included here.  */
 /* But avoid namespace pollution on glibc systems.  */
-#ifndef __GLIBC__
+#if !defined __GLIBC__ && !defined __osf__
+# define __need_system_stdlib_h
 # include <stdlib.h>
+# undef __need_system_stdlib_h
 #endif
 
 /* Native Windows platforms declare chdir, getcwd, rmdir in
@@ -124,9 +126,13 @@
 /* Get getopt(), optarg, optind, opterr, optopt.
    But avoid namespace pollution on glibc systems.  */
 #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# define __need_getopt
 # include <getopt.h>
 #endif
 
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_UNISTD_INLINE
 # define _GL_UNISTD_INLINE _GL_INLINE
@@ -395,6 +401,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportab
 /* Set of environment variables and values.  An array of strings of the form
    "VARIABLE=VALUE", terminated with a NULL.  */
 #  if defined __APPLE__ && defined __MACH__
+#   include <TargetConditionals.h>
+#   if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
+#    define _GL_USE_CRT_EXTERNS
+#   endif
+#  endif
+#  ifdef _GL_USE_CRT_EXTERNS
 #   include <crt_externs.h>
 #   define environ (*_NSGetEnviron ())
 #  else
@@ -662,10 +674,19 @@ _GL_WARN_ON_USE (getdomainname, "getdoma
 #if @GNULIB_GETDTABLESIZE@
 /* Return the maximum number of file descriptors in the current process.
    In POSIX, this is same as sysconf (_SC_OPEN_MAX).  */
-# if !@HAVE_GETDTABLESIZE@
+# if @REPLACE_GETDTABLESIZE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getdtablesize
+#   define getdtablesize rpl_getdtablesize
+#  endif
+_GL_FUNCDECL_RPL (getdtablesize, int, (void));
+_GL_CXXALIAS_RPL (getdtablesize, int, (void));
+# else
+#  if !@HAVE_GETDTABLESIZE@
 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (getdtablesize, int, (void));
+# endif
 _GL_CXXALIASWARN (getdtablesize);
 #elif defined GNULIB_POSIXCHECK
 # undef getdtablesize
@@ -1272,13 +1293,24 @@ _GL_WARN_ON_USE (readlink, "readlink is 
 
 
 #if @GNULIB_READLINKAT@
-# if !@HAVE_READLINKAT@
+# if @REPLACE_READLINKAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define readlinkat rpl_readlinkat
+#  endif
+_GL_FUNCDECL_RPL (readlinkat, ssize_t,
+                  (int fd, char const *file, char *buf, size_t len)
+                  _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (readlinkat, ssize_t,
+                  (int fd, char const *file, char *buf, size_t len));
+# else
+#  if !@HAVE_READLINKAT@
 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
                   (int fd, char const *file, char *buf, size_t len)
                   _GL_ARG_NONNULL ((2, 3)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
                   (int fd, char const *file, char *buf, size_t len));
+# endif
 _GL_CXXALIASWARN (readlinkat);
 #elif defined GNULIB_POSIXCHECK
 # undef readlinkat
@@ -1392,13 +1424,25 @@ _GL_WARN_ON_USE (symlink, "symlink is no
 
 
 #if @GNULIB_SYMLINKAT@
-# if !@HAVE_SYMLINKAT@
+# if @REPLACE_SYMLINKAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef symlinkat
+#   define symlinkat rpl_symlinkat
+#  endif
+_GL_FUNCDECL_RPL (symlinkat, int,
+                  (char const *contents, int fd, char const *file)
+                  _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (symlinkat, int,
+                  (char const *contents, int fd, char const *file));
+# else
+#  if !@HAVE_SYMLINKAT@
 _GL_FUNCDECL_SYS (symlinkat, int,
                   (char const *contents, int fd, char const *file)
                   _GL_ARG_NONNULL ((1, 3)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (symlinkat, int,
                   (char const *contents, int fd, char const *file));
+# endif
 _GL_CXXALIASWARN (symlinkat);
 #elif defined GNULIB_POSIXCHECK
 # undef symlinkat
@@ -1538,4 +1582,5 @@ _GL_CXXALIASWARN (write);
 _GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_UNISTD_H */
+#endif /* _GL_INCLUDING_UNISTD_H */
 #endif /* _@GUARD_PREFIX@_UNISTD_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/verify.h ./gdb/gnulib/import/verify.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/verify.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/verify.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 
 #ifndef _GL_VERIFY_H
-# define _GL_VERIFY_H
+#define _GL_VERIFY_H
 
 
 /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
@@ -31,14 +31,24 @@
    Use this only with GCC.  If we were willing to slow 'configure'
    down we could also use it with other compilers, but since this
    affects only the quality of diagnostics, why bother?  */
-# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus
-#  define _GL_HAVE__STATIC_ASSERT 1
-# endif
+#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
+     && (201112L <= __STDC_VERSION__  || !defined __STRICT_ANSI__) \
+     && !defined __cplusplus)
+# define _GL_HAVE__STATIC_ASSERT 1
+#endif
 /* The condition (99 < __GNUC__) is temporary, until we know about the
    first G++ release that supports static_assert.  */
-# if (99 < __GNUC__) && defined __cplusplus
-#  define _GL_HAVE_STATIC_ASSERT 1
-# endif
+#if (99 < __GNUC__) && defined __cplusplus
+# define _GL_HAVE_STATIC_ASSERT 1
+#endif
+
+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
+   system headers, defines a conflicting _Static_assert that is no
+   better than ours; override it.  */
+#ifndef _GL_HAVE_STATIC_ASSERT
+# include <stddef.h>
+# undef _Static_assert
+#endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
@@ -141,50 +151,50 @@
      Use a template type to work around the problem.  */
 
 /* Concatenate two preprocessor tokens.  */
-# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
-# define _GL_CONCAT0(x, y) x##y
+#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+#define _GL_CONCAT0(x, y) x##y
 
 /* _GL_COUNTER is an integer, preferably one that changes each time we
    use it.  Use __COUNTER__ if it works, falling back on __LINE__
    otherwise.  __LINE__ isn't perfect, but it's better than a
    constant.  */
-# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
-#  define _GL_COUNTER __COUNTER__
-# else
-#  define _GL_COUNTER __LINE__
-# endif
+#if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+# define _GL_COUNTER __COUNTER__
+#else
+# define _GL_COUNTER __LINE__
+#endif
 
 /* Generate a symbol with the given prefix, making it unique if
    possible.  */
-# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
+#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
 
 /* Verify requirement R at compile-time, as an integer constant expression
    that returns 1.  If R is false, fail at compile-time, preferably
    with a diagnostic that includes the string-literal DIAGNOSTIC.  */
 
-# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
-    (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+   (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
 
-# ifdef __cplusplus
-#  if !GNULIB_defined_struct__gl_verify_type
+#ifdef __cplusplus
+# if !GNULIB_defined_struct__gl_verify_type
 template <int w>
   struct _gl_verify_type {
     unsigned int _gl_verify_error_if_negative: w;
   };
-#   define GNULIB_defined_struct__gl_verify_type 1
-#  endif
-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
-    _gl_verify_type<(R) ? 1 : -1>
-# elif defined _GL_HAVE__STATIC_ASSERT
-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
-     struct {                                   \
-       _Static_assert (R, DIAGNOSTIC);          \
-       int _gl_dummy;                          \
-     }
-# else
-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
-     struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
+#  define GNULIB_defined_struct__gl_verify_type 1
 # endif
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    _gl_verify_type<(R) ? 1 : -1>
+#elif defined _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    struct {                                   \
+      _Static_assert (R, DIAGNOSTIC);          \
+      int _gl_dummy;                          \
+    }
+#else
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
+#endif
 
 /* Verify requirement R at compile-time, as a declaration without a
    trailing ';'.  If R is false, fail at compile-time, preferably
@@ -193,23 +203,23 @@ template <int w>
    Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
-# ifdef _GL_HAVE__STATIC_ASSERT
-#  define _GL_VERIFY _Static_assert
-# else
-#  define _GL_VERIFY(R, DIAGNOSTIC)				       \
-     extern int (*_GL_GENSYM (_gl_verify_function) (void))	       \
-       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
-# endif
+#ifdef _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY _Static_assert
+#else
+# define _GL_VERIFY(R, DIAGNOSTIC)				       \
+    extern int (*_GL_GENSYM (_gl_verify_function) (void))	       \
+      [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+#endif
 
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
-# ifdef _GL_STATIC_ASSERT_H
-#  if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
-#   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
-#  endif
-#  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
-#   define static_assert _Static_assert /* C11 requires this #define.  */
-#  endif
+#ifdef _GL_STATIC_ASSERT_H
+# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+#  define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
 # endif
+# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+#  define static_assert _Static_assert /* C11 requires this #define.  */
+# endif
+#endif
 
 /* @assert.h omit start@  */
 
@@ -227,18 +237,42 @@ template <int w>
 
    verify_true is obsolescent; please use verify_expr instead.  */
 
-# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
 
 /* Verify requirement R at compile-time.  Return the value of the
    expression E.  */
 
-# define verify_expr(R, E) \
-    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+#define verify_expr(R, E) \
+   (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
 
 /* Verify requirement R at compile-time, as a declaration without a
    trailing ';'.  */
 
-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* Assume that R always holds.  This lets the compiler optimize
+   accordingly.  R should not have side-effects; it may or may not be
+   evaluated.  Behavior is undefined if R is false.  */
+
+#if (__has_builtin (__builtin_unreachable) \
+     || 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
+# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
+#elif 1200 <= _MSC_VER
+# define assume(R) __assume (R)
+#elif ((defined GCC_LINT || defined lint) \
+       && (__has_builtin (__builtin_trap) \
+           || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
+  /* Doing it this way helps various packages when configured with
+     --enable-gcc-warnings, which compiles with -Dlint.  It's nicer
+     when 'assume' silences warnings even with older GCCs.  */
+# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
+#else
+# define assume(R) ((void) (0 && (R)))
+#endif
 
 /* @assert.h omit end@  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/wchar.in.h ./gdb/gnulib/import/wchar.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/wchar.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/wchar.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,15 +30,23 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+#if (((defined __need_mbstate_t || defined __need_wint_t)               \
+      && !defined __MINGW32__ && !defined __KLIBC__)                    \
+     || (defined __hpux                                                 \
+         && ((defined _INTTYPES_INCLUDED && !defined strtoimax)         \
+             || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
+     || (defined __MINGW32__ && defined __STRING_H_SOURCED__)           \
+     || defined _GL_ALREADY_INCLUDING_WCHAR_H)
 /* Special invocation convention:
-   - Inside glibc and uClibc header files.
+   - Inside glibc and uClibc header files, but not MinGW.
    - On HP-UX 11.00 we have a sequence of nested includes
      <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
      once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
      and once directly.  In both situations 'wint_t' is not yet defined,
      therefore we cannot provide the function overrides; instead include only
      the system's <wchar.h>.
+   - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
+     <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
    - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
      the latter includes <wchar.h>.  But here, we have no way to detect whether
      <wctype.h> is completely included or is still being included.  */
@@ -440,6 +448,11 @@ _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t
 #  if !@HAVE_DECL_WCWIDTH@
 /* wcwidth exists but is not declared.  */
 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
+#  elif defined __KLIBC__
+/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
+   static inline function.  The implementation of wcwidth in wcwidth.c
+   causes a "conflicting types" error. */
+#   undef wcwidth
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/wctype.in.h ./gdb/gnulib/import/wctype.in.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/import/wctype.in.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/import/wctype.in.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2012 Free Software Foundation, Inc.
+   Copyright (C) 2006-2016 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,13 +25,25 @@
  * wctrans_t, and wctype_t are not yet implemented.
  */
 
-#ifndef _@GUARD_PREFIX@_WCTYPE_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__)
+
+/* Special invocation convention:
+   - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of
+     <wctype.h> is being processed, which doesn't include the idempotency
+     guard.   */
+
+#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_WCTYPE_H
+
 #if @HAVE_WINT_T@
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
    Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -44,6 +56,13 @@
 # include <wchar.h>
 #endif
 
+/* mingw has declarations of towupper and towlower in <ctype.h> as
+   well <wctype.h>.  Include <ctype.h> in advance to avoid rpl_ prefix
+   being added to the declarations.  */
+#ifdef __MINGW32__
+# include <ctype.h>
+#endif
+
 /* Include the original <wctype.h> if it exists.
    BeOS 5 has the functions but no <wctype.h>.  */
 /* The include_next requires a split double-inclusion guard.  */
@@ -54,6 +73,9 @@
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 #define _@GUARD_PREFIX@_WCTYPE_H
 
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_WCTYPE_INLINE
 # define _GL_WCTYPE_INLINE _GL_INLINE
@@ -502,3 +524,4 @@ _GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_WCTYPE_H */
 #endif /* _@GUARD_PREFIX@_WCTYPE_H */
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/Makefile.in ./gdb/gnulib/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2015 Free Software Foundation, Inc.
+# Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -287,4 +287,7 @@ force_update:
 # will remove them.
 MAKEOVERRIDES=
 
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk
+
 ### end of the libgnu Makefile.in.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/update-gnulib.sh ./gdb/gnulib/update-gnulib.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnulib/update-gnulib.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnulib/update-gnulib.sh	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -39,11 +39,15 @@ IMPORTED_GNULIB_MODULES="\
     frexpl \
     inttypes \
     lstat \
+    limits-h \
     memchr \
     memmem \
     pathmax \
+    rawmemchr \
     readlink \
     rename \
+    signal-h \
+    strchrnul \
     strstr \
     strtok_r \
     sys_stat \
@@ -54,7 +58,7 @@ IMPORTED_GNULIB_MODULES="\
 "
 
 # The gnulib commit ID to use for the update.
-GNULIB_COMMIT_SHA1="8d5bd1402003bd0153984b138735adf537d960b0"
+GNULIB_COMMIT_SHA1="38237baf99386101934cd93278023aa4ae523ec0"
 
 # The expected version number for the various auto tools we will
 # use after the import.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-nat.c ./gdb/gnu-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnu-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,14 +20,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "defs.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/ptrace.h>
-
+/* Mach/Hurd headers are not yet ready for C++ compilation.  */
+extern "C"
+{
 #include <mach.h>
 #include <mach_error.h>
 #include <mach/exception.h>
@@ -48,6 +43,15 @@
 #include <hurd/sigpreempt.h>
 
 #include <portinfo.h>
+}
+
+#include "defs.h"
+
+#include <ctype.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <sys/ptrace.h>
 
 #include "inferior.h"
 #include "symtab.h"
@@ -59,16 +63,21 @@
 #include "gdbcore.h"
 #include "gdbthread.h"
 #include "gdb_obstack.h"
+#include "tid-parse.h"
 
 #include "gnu-nat.h"
 #include "inf-child.h"
 
+/* MIG stubs are not yet ready for C++ compilation.  */
+extern "C"
+{
 #include "exc_request_S.h"
 #include "notify_S.h"
 #include "process_reply_S.h"
 #include "msg_reply_S.h"
 #include "exc_request_U.h"
 #include "msg_U.h"
+}
 
 static process_t proc_server = MACH_PORT_NULL;
 
@@ -113,8 +122,8 @@ void proc_abort (struct proc *proc, int 
 struct proc *make_proc (struct inf *inf, mach_port_t port, int tid);
 struct proc *_proc_free (struct proc *proc);
 int proc_update_sc (struct proc *proc);
-error_t proc_get_exception_port (struct proc *proc, mach_port_t * port);
-error_t proc_set_exception_port (struct proc *proc, mach_port_t port);
+kern_return_t proc_get_exception_port (struct proc *proc, mach_port_t * port);
+kern_return_t proc_set_exception_port (struct proc *proc, mach_port_t port);
 static mach_port_t _proc_get_exc_port (struct proc *proc);
 void proc_steal_exc_port (struct proc *proc, mach_port_t exc_port);
 void proc_restore_exc_port (struct proc *proc);
@@ -133,7 +142,7 @@ int proc_trace (struct proc *proc, int s
    afterwards).  This effects INF's threads' resume_sc count.  */
 #define INF_RESUME_MSGPORT_RPC(inf, rpc_expr) \
   (inf_set_threads_resume_sc_for_signal_thread (inf) \
-   ? ({ error_t __e; \
+   ? ({ kern_return_t __e; \
 	inf_resume (inf); \
 	__e = INF_MSGPORT_RPC (inf, rpc_expr); \
 	inf_suspend (inf); \
@@ -367,7 +376,7 @@ proc_get_state (struct proc *proc, int w
   if (!proc->state_valid)
     {
       mach_msg_type_number_t state_size = THREAD_STATE_SIZE;
-      error_t err =
+      kern_return_t err =
 	thread_get_state (proc->port, THREAD_STATE_FLAVOR,
 			  (thread_state_t) &proc->state, &state_size);
 
@@ -387,7 +396,7 @@ proc_get_state (struct proc *proc, int w
 
 
 /* Set PORT to PROC's exception port.  */
-error_t
+kern_return_t
 proc_get_exception_port (struct proc * proc, mach_port_t * port)
 {
   if (proc_is_task (proc))
@@ -397,7 +406,7 @@ proc_get_exception_port (struct proc * p
 }
 
 /* Set PROC's exception port to PORT.  */
-error_t
+kern_return_t
 proc_set_exception_port (struct proc * proc, mach_port_t port)
 {
   proc_debug (proc, "setting exception port: %lu", port);
@@ -412,7 +421,7 @@ static mach_port_t
 _proc_get_exc_port (struct proc *proc)
 {
   mach_port_t exc_port;
-  error_t err = proc_get_exception_port (proc, &exc_port);
+  kern_return_t err = proc_get_exception_port (proc, &exc_port);
 
   if (err)
     /* PROC must be dead.  */
@@ -438,7 +447,7 @@ proc_steal_exc_port (struct proc *proc, 
 
   if (cur_exc_port)
     {
-      error_t err = 0;
+      kern_return_t err = 0;
 
       proc_debug (proc, "inserting exception port: %lu", exc_port);
 
@@ -481,7 +490,7 @@ proc_restore_exc_port (struct proc *proc
 
   if (cur_exc_port)
     {
-      error_t err = 0;
+      kern_return_t err = 0;
 
       proc_debug (proc, "restoring real exception port");
 
@@ -537,9 +546,9 @@ static int next_thread_id = 1;
 struct proc *
 make_proc (struct inf *inf, mach_port_t port, int tid)
 {
-  error_t err;
+  kern_return_t err;
   mach_port_t prev_port = MACH_PORT_NULL;
-  struct proc *proc = xmalloc (sizeof (struct proc));
+  struct proc *proc = XNEW (struct proc);
 
   proc->port = port;
   proc->tid = tid;
@@ -636,7 +645,7 @@ _proc_free (struct proc *proc)
 static struct inf *
 make_inf (void)
 {
-  struct inf *inf = xmalloc (sizeof (struct inf));
+  struct inf *inf = XNEW (struct inf);
 
   inf->task = 0;
   inf->threads = 0;
@@ -713,7 +722,7 @@ inf_cleanup (struct inf *inf)
 void
 inf_startup (struct inf *inf, int pid)
 {
-  error_t err;
+  kern_return_t err;
 
   inf_debug (inf, "startup: pid = %d", pid);
 
@@ -745,7 +754,7 @@ inf_set_pid (struct inf *inf, pid_t pid)
     task_port = MACH_PORT_NULL;
   else
     {
-      error_t err = proc_pid2task (proc_server, pid, &task_port);
+      kern_return_t err = proc_pid2task (proc_server, pid, &task_port);
 
       if (err)
 	error (_("Error getting task for pid %d: %s"),
@@ -794,7 +803,7 @@ inf_validate_procinfo (struct inf *inf)
   struct procinfo *pi;
   mach_msg_type_number_t pi_len = 0;
   int info_flags = 0;
-  error_t err =
+  kern_return_t err =
     proc_getprocinfo (proc_server, inf->pid, &info_flags,
 		      (procinfo_t *) &pi, &pi_len, &noise, &noise_len);
 
@@ -822,7 +831,7 @@ inf_validate_task_sc (struct inf *inf)
   mach_msg_type_number_t pi_len = 0;
   int info_flags = PI_FETCH_TASKINFO;
   int suspend_count = -1;
-  error_t err;
+  kern_return_t err;
 
  retry:
   err = proc_getprocinfo (proc_server, inf->pid, &info_flags,
@@ -852,15 +861,9 @@ inf_validate_task_sc (struct inf *inf)
 
   if (inf->task->cur_sc < suspend_count)
     {
-      int abort;
-
-      target_terminal_ours ();	/* Allow I/O.  */
-      abort = !query (_("Pid %d has an additional task suspend count of %d;"
-		      " clear it? "), inf->pid,
-		      suspend_count - inf->task->cur_sc);
-      target_terminal_inferior ();	/* Give it back to the child.  */
-
-      if (abort)
+      if (!query (_("Pid %d has an additional task suspend count of %d;"
+		    " clear it? "), inf->pid,
+		  suspend_count - inf->task->cur_sc))
 	error (_("Additional task suspend count left untouched."));
 
       inf->task->cur_sc = suspend_count;
@@ -881,7 +884,7 @@ inf_set_traced (struct inf *inf, int on)
     /* Make it take effect immediately.  */
     {
       sigset_t mask = on ? ~(sigset_t) 0 : 0;
-      error_t err =
+      kern_return_t err =
 	INF_RESUME_MSGPORT_RPC (inf, msg_set_init_int (msgport, refport,
 						       INIT_TRACEMASK, mask));
 
@@ -1013,7 +1016,7 @@ inf_validate_procs (struct inf *inf)
 
   if (task)
     {
-      error_t err = task_threads (task->port, &threads, &num_threads);
+      kern_return_t err = task_threads (task->port, &threads, &num_threads);
 
       inf_debug (inf, "fetching threads");
       if (err)
@@ -1330,7 +1333,7 @@ inf_restore_exc_ports (struct inf *inf)
 void
 inf_signal (struct inf *inf, enum gdb_signal sig)
 {
-  error_t err = 0;
+  kern_return_t err = 0;
   int host_sig = gdb_signal_to_host (sig);
 
 #define NAME gdb_signal_to_name (sig)
@@ -1419,7 +1422,7 @@ void
 inf_continue (struct inf *inf)
 {
   process_t proc;
-  error_t err = proc_pid2proc (proc_server, inf->pid, &proc);
+  kern_return_t err = proc_pid2proc (proc_server, inf->pid, &proc);
 
   if (!err)
     {
@@ -1449,6 +1452,12 @@ struct inf *gnu_current_inf = 0;
    multi-threaded, we don't bother to lock this.  */
 struct inf *waiting_inf;
 
+/* MIG stubs are not yet ready for C++ compilation.  */
+extern "C" int exc_server (mach_msg_header_t *, mach_msg_header_t *);
+extern "C" int msg_reply_server (mach_msg_header_t *, mach_msg_header_t *);
+extern "C" int notify_server (mach_msg_header_t *, mach_msg_header_t *);
+extern "C" int process_reply_server (mach_msg_header_t *, mach_msg_header_t *);
+
 /* Wait for something to happen in the inferior, returning what in STATUS.  */
 static ptid_t
 gnu_wait (struct target_ops *ops,
@@ -1460,15 +1469,10 @@ gnu_wait (struct target_ops *ops,
       mach_msg_type_t type;
       int data[8000];
     } msg;
-  error_t err;
+  kern_return_t err;
   struct proc *thread;
   struct inf *inf = gnu_current_inf;
 
-  extern int exc_server (mach_msg_header_t *, mach_msg_header_t *);
-  extern int msg_reply_server (mach_msg_header_t *, mach_msg_header_t *);
-  extern int notify_server (mach_msg_header_t *, mach_msg_header_t *);
-  extern int process_reply_server (mach_msg_header_t *, mach_msg_header_t *);
-
   gdb_assert (inf->task);
 
   if (!inf->threads && !inf->pending_execs)
@@ -1652,7 +1656,7 @@ rewait:
 
 
 /* The rpc handler called by exc_server.  */
-error_t
+kern_return_t
 S_exception_raise_request (mach_port_t port, mach_port_t reply_port,
 			   thread_t thread_port, task_t task_port,
 			   int exception, int code, int subcode)
@@ -1749,7 +1753,7 @@ inf_task_died_status (struct inf *inf)
 }
 
 /* Notify server routines.  The only real one is dead name notification.  */
-error_t
+kern_return_t
 do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
 {
   struct inf *inf = waiting_inf;
@@ -1812,8 +1816,8 @@ ILL_RPC (do_mach_notify_send_once,
 
 /* Process_reply server routines.  We only use process_wait_reply.  */
 
-error_t
-S_proc_wait_reply (mach_port_t reply, error_t err,
+kern_return_t
+S_proc_wait_reply (mach_port_t reply, kern_return_t err,
 		   int status, int sigcode, rusage_t rusage, pid_t pid)
 {
   struct inf *inf = waiting_inf;
@@ -1928,8 +1932,8 @@ ILL_RPC (S_proc_get_code_reply,
 
 /* Msg_reply server routines.  We only use msg_sig_post_untraced_reply.  */
 
-error_t
-S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err)
+kern_return_t
+S_msg_sig_post_untraced_reply (mach_port_t reply, kern_return_t err)
 {
   struct inf *inf = waiting_inf;
 
@@ -1959,14 +1963,14 @@ S_msg_sig_post_untraced_reply (mach_port
 }
 
 ILL_RPC (S_msg_sig_post_reply,
-	 mach_port_t reply, error_t err)
+	 mach_port_t reply, kern_return_t err)
 
 /* Returns the number of messages queued for the receive right PORT.  */
 static mach_port_msgcount_t
 port_msgs_queued (mach_port_t port)
 {
   struct mach_port_status status;
-  error_t err =
+  kern_return_t err =
     mach_port_get_receive_status (mach_task_self (), port, &status);
 
   if (err)
@@ -2080,7 +2084,7 @@ gnu_kill_inferior (struct target_ops *op
       task_terminate (task->port);
       inf_set_pid (gnu_current_inf, -1);
     }
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 /* Clean up after the inferior dies.  */
@@ -2116,6 +2120,16 @@ cur_inf (void)
 }
 
 static void
+gnu_ptrace_me (void)
+{
+  /* We're in the child; make this process stop as soon as it execs.  */
+  struct inf *inf = cur_inf ();
+  inf_debug (inf, "tracing self");
+  if (ptrace (PTRACE_TRACEME) != 0)
+    trace_start_error_with_name ("ptrace");
+}
+
+static void
 gnu_create_inferior (struct target_ops *ops, 
 		     char *exec_file, char *allargs, char **env,
 		     int from_tty)
@@ -2123,17 +2137,9 @@ gnu_create_inferior (struct target_ops *
   struct inf *inf = cur_inf ();
   int pid;
 
-  void trace_me (void)
-  {
-    /* We're in the child; make this process stop as soon as it execs.  */
-    inf_debug (inf, "tracing self");
-    if (ptrace (PTRACE_TRACEME) != 0)
-      error (_("ptrace (PTRACE_TRACEME) failed!"));
-  }
-
   inf_debug (inf, "creating inferior");
 
-  pid = fork_inferior (exec_file, allargs, env, trace_me,
+  pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
                        NULL, NULL, NULL, NULL);
 
   /* Attach to the now stopped child, which is actually a shell...  */
@@ -2157,6 +2163,8 @@ gnu_create_inferior (struct target_ops *
 
   startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
   inf->pending_execs = 0;
+  /* Get rid of the old shell threads.  */
+  prune_threads ();
 
   inf_validate_procinfo (inf);
   inf_update_signal_thread (inf);
@@ -2292,7 +2300,7 @@ gnu_thread_alive (struct target_ops *ops
 static int
 gnu_read_inferior (task_t task, CORE_ADDR addr, gdb_byte *myaddr, int length)
 {
-  error_t err;
+  kern_return_t err;
   vm_address_t low_address = (vm_address_t) trunc_page (addr);
   vm_size_t aligned_length =
   (vm_size_t) round_page (addr + length) - low_address;
@@ -2339,7 +2347,7 @@ static int
 gnu_write_inferior (task_t task, CORE_ADDR addr,
 		    const gdb_byte *myaddr, int length)
 {
-  error_t err = 0;
+  kern_return_t err;
   vm_address_t low_address = (vm_address_t) trunc_page (addr);
   vm_size_t aligned_length =
   (vm_size_t) round_page (addr + length) - low_address;
@@ -2350,7 +2358,7 @@ gnu_write_inferior (task_t task, CORE_AD
   char *errstr = "Bug in gnu_write_inferior";
 
   struct vm_region_list *region_element;
-  struct vm_region_list *region_head = (struct vm_region_list *) NULL;
+  struct vm_region_list *region_head = NULL;
 
   /* Get memory from inferior with page aligned addresses.  */
   err = vm_read (task,
@@ -2419,9 +2427,7 @@ gnu_write_inferior (task_t task, CORE_AD
 	  }
 
 	/* Chain the regions for later use.  */
-	region_element =
-	  (struct vm_region_list *)
-	  obstack_alloc (&region_obstack, sizeof (struct vm_region_list));
+	region_element = XOBNEW (&region_obstack, struct vm_region_list);
 
 	region_element->protection = protection;
 	region_element->start = region_address;
@@ -2556,7 +2562,7 @@ static int
 gnu_find_memory_regions (struct target_ops *self,
 			 find_memory_region_ftype func, void *data)
 {
-  error_t err;
+  kern_return_t err;
   task_t task;
   vm_address_t region_address, last_region_address, last_region_end;
   vm_prot_t last_protection;
@@ -2798,12 +2804,12 @@ active_inf (void)
 
 
 static void
-set_task_pause_cmd (char *args, int from_tty)
+set_task_pause_cmd (int arg, int from_tty)
 {
   struct inf *inf = cur_inf ();
   int old_sc = inf->pause_sc;
 
-  inf->pause_sc = parse_bool_arg (args, "set task pause");
+  inf->pause_sc = arg;
 
   if (old_sc == 0 && inf->pause_sc != 0)
     /* If the task is currently unsuspended, immediately suspend it,
@@ -2812,6 +2818,12 @@ set_task_pause_cmd (char *args, int from
 }
 
 static void
+set_task_pause_cmd (char *args, int from_tty)
+{
+  set_task_pause_cmd (parse_bool_arg (args, "set task pause"), from_tty);
+}
+
+static void
 show_task_pause_cmd (char *args, int from_tty)
 {
   struct inf *inf = cur_inf ();
@@ -2901,7 +2913,7 @@ show_thread_default_detach_sc_cmd (char 
 static void
 steal_exc_port (struct proc *proc, mach_port_t name)
 {
-  error_t err;
+  kern_return_t err;
   mach_port_t port;
   mach_msg_type_name_t port_type;
 
@@ -2966,19 +2978,14 @@ set_sig_thread_cmd (char *args, int from
 
   if (!args || (!isdigit (*args) && strcmp (args, "none") != 0))
     error (_("Illegal argument to \"set signal-thread\" command.\n"
-	   "Should be an integer thread ID, or `none'."));
+	     "Should be a thread ID, or \"none\"."));
 
   if (strcmp (args, "none") == 0)
     inf->signal_thread = 0;
   else
     {
-      ptid_t ptid = thread_id_to_pid (atoi (args));
-
-      if (ptid_equal (ptid, minus_one_ptid))
-	error (_("Thread ID %s not known.  "
-		 "Use the \"info threads\" command to\n"
-	       "see the IDs of currently known threads."), args);
-      inf->signal_thread = inf_tid_to_thread (inf, ptid_get_lwp (ptid));
+      struct thread_info *tp = parse_thread_id (args, NULL);
+      inf->signal_thread = inf_tid_to_thread (inf, ptid_get_lwp (tp->ptid));
     }
 }
 
@@ -2997,11 +3004,11 @@ show_sig_thread_cmd (char *args, int fro
 
 
 static void
-set_signals_cmd (char *args, int from_tty)
+set_signals_cmd (int arg, int from_tty)
 {
   struct inf *inf = cur_inf ();
 
-  inf->want_signals = parse_bool_arg (args, "set signals");
+  inf->want_signals = arg;
 
   if (inf->task && inf->want_signals != inf->traced)
     /* Make this take effect immediately in a running process.  */
@@ -3009,6 +3016,12 @@ set_signals_cmd (char *args, int from_tt
 }
 
 static void
+set_signals_cmd (char *args, int from_tty)
+{
+  set_signals_cmd(parse_bool_arg (args, "set signals"), from_tty);
+}
+
+static void
 show_signals_cmd (char *args, int from_tty)
 {
   struct inf *inf = cur_inf ();
@@ -3021,15 +3034,20 @@ show_signals_cmd (char *args, int from_t
 }
 
 static void
-set_exceptions_cmd (char *args, int from_tty)
+set_exceptions_cmd (int arg, int from_tty)
 {
   struct inf *inf = cur_inf ();
-  int val = parse_bool_arg (args, "set exceptions");
 
   /* Make this take effect immediately in a running process.  */
   /* XXX */ ;
 
-  inf->want_exceptions = val;
+  inf->want_exceptions = arg;
+}
+
+static void
+set_exceptions_cmd (char *args, int from_tty)
+{
+  set_exceptions_cmd (parse_bool_arg (args, "set exceptions"), from_tty);
 }
 
 static void
@@ -3084,11 +3102,11 @@ static void
 set_noninvasive_cmd (char *args, int from_tty)
 {
   /* Invert the sense of the arg for each component.  */
-  char *inv_args = parse_bool_arg (args, "set noninvasive") ? "off" : "on";
+  int inv_arg = parse_bool_arg (args, "set noninvasive") ? 0 : 1;
 
-  set_task_pause_cmd (inv_args, from_tty);
-  set_signals_cmd (inv_args, from_tty);
-  set_exceptions_cmd (inv_args, from_tty);
+  set_task_pause_cmd (inv_arg, from_tty);
+  set_signals_cmd (inv_arg, from_tty);
+  set_exceptions_cmd (inv_arg, from_tty);
 }
 
 
@@ -3266,21 +3284,16 @@ This is the same as setting `task pause'
 	   &setlist);
 
   /* Commands to show information about the task's ports.  */
-  add_cmd ("send-rights", class_info, info_send_rights_cmd,
-	   _("Show information about the task's send rights"),
-	   &infolist);
-  add_cmd ("receive-rights", class_info, info_recv_rights_cmd,
-	   _("Show information about the task's receive rights"),
-	   &infolist);
-  add_cmd ("port-rights", class_info, info_port_rights_cmd,
-	   _("Show information about the task's port rights"),
-	   &infolist);
-  add_cmd ("port-sets", class_info, info_port_sets_cmd,
-	   _("Show information about the task's port sets"),
-	   &infolist);
-  add_cmd ("dead-names", class_info, info_dead_names_cmd,
-	   _("Show information about the task's dead names"),
-	   &infolist);
+  add_info ("send-rights", info_send_rights_cmd,
+	    _("Show information about the task's send rights"));
+  add_info ("receive-rights", info_recv_rights_cmd,
+	    _("Show information about the task's receive rights"));
+  add_info ("port-rights", info_port_rights_cmd,
+	    _("Show information about the task's port rights"));
+  add_info ("port-sets", info_port_sets_cmd,
+	    _("Show information about the task's port sets"));
+  add_info ("dead-names", info_dead_names_cmd,
+	    _("Show information about the task's dead names"));
   add_info_alias ("ports", "port-rights", 1);
   add_info_alias ("port", "port-rights", 1);
   add_info_alias ("psets", "port-sets", 1);
@@ -3383,7 +3396,7 @@ thread_takeover_sc_cmd (char *args, int 
   thread_basic_info_data_t _info;
   thread_basic_info_t info = &_info;
   mach_msg_type_number_t info_len = THREAD_BASIC_INFO_COUNT;
-  error_t err =
+  kern_return_t err =
   thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len);
   if (err)
     error (("%s."), safe_strerror (err));
@@ -3494,7 +3507,7 @@ void
 flush_inferior_icache (CORE_ADDR pc, int amount)
 {
   vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH;
-  error_t ret;
+  kern_return_t ret;
 
   ret = vm_machine_attribute (gnu_current_inf->task->port,
 			      pc,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-nat.h ./gdb/gnu-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnu-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common things used by the various *gnu-nat.c files
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-v2-abi.c ./gdb/gnu-v2-abi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-v2-abi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnu-v2-abi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Abstraction of GNU v2 abi.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin <dberlin@redhat.com>
 
@@ -40,7 +40,7 @@ gnuv2_is_destructor_name (const char *na
       || startswith (name, "__dt__"))
     return complete_object_dtor;
   else
-    return 0;
+    return (enum dtor_kinds) 0;
 }
 
 static enum ctor_kinds
@@ -51,7 +51,7 @@ gnuv2_is_constructor_name (const char *n
       || startswith (name, "__ct__"))
     return complete_object_ctor;
   else
-    return 0;
+    return (enum ctor_kinds) 0;
 }
 
 static int
@@ -183,7 +183,7 @@ gnuv2_virtual_fn_field (struct value **a
 
 
 static struct type *
-gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
+gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
 {
   struct type *known_type;
   struct type *rtti_type;
@@ -204,7 +204,7 @@ gnuv2_value_rtti_type (struct value *v, 
 
   /* Get declared type.  */
   known_type = value_type (v);
-  CHECK_TYPEDEF (known_type);
+  known_type = check_typedef (known_type);
   /* RTTI works only or class objects.  */
   if (TYPE_CODE (known_type) != TYPE_CODE_STRUCT)
     return NULL;
@@ -225,7 +225,7 @@ gnuv2_value_rtti_type (struct value *v, 
   /* Make sure our basetype and known type match, otherwise, cast
      so we can get at the vtable properly.  */
   btype = known_type_vptr_basetype;
-  CHECK_TYPEDEF (btype);
+  btype = check_typedef (btype);
   if (btype != known_type )
     {
       v = value_cast (btype, v);
@@ -340,7 +340,7 @@ vb_match (struct type *type, int index, 
 
 static int
 gnuv2_baseclass_offset (struct type *type, int index,
-			const bfd_byte *valaddr, int embedded_offset,
+			const bfd_byte *valaddr, LONGEST embedded_offset,
 			CORE_ADDR address, const struct value *val)
 {
   struct type *basetype = TYPE_BASECLASS (type, index);
@@ -358,7 +358,7 @@ gnuv2_baseclass_offset (struct type *typ
 	  if (vb_match (type, i, basetype))
 	    {
 	      struct type *field_type;
-	      int field_offset;
+	      LONGEST field_offset;
 	      int field_length;
 	      CORE_ADDR addr;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-v3-abi.c ./gdb/gnu-v3-abi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gnu-v3-abi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gnu-v3-abi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Abstraction of GNU v3 abi.
    Contributed by Jim Blandy <jimb@redhat.com>
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -125,8 +125,7 @@ build_gdb_vtable_type (struct gdbarch *a
      the alignment that type requires, and then use that here.  */
 
   /* Build the field list.  */
-  field_list = xmalloc (sizeof (struct field [4]));
-  memset (field_list, 0, sizeof (struct field [4]));
+  field_list = XCNEWVEC (struct field, 4);
   field = &field_list[0];
   offset = 0;
 
@@ -175,7 +174,8 @@ build_gdb_vtable_type (struct gdbarch *a
 static struct type *
 vtable_ptrdiff_type (struct gdbarch *gdbarch)
 {
-  struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+  struct type *vtable_type
+    = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
 
   /* The "offset_to_top" field has the appropriate (ptrdiff_t) type.  */
   return TYPE_FIELD_TYPE (vtable_type, vtable_field_offset_to_top);
@@ -187,7 +187,8 @@ vtable_ptrdiff_type (struct gdbarch *gdb
 static int
 vtable_address_point_offset (struct gdbarch *gdbarch)
 {
-  struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+  struct type *vtable_type
+    = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
 
   return (TYPE_FIELD_BITPOS (vtable_type, vtable_field_virtual_functions)
           / TARGET_CHAR_BIT);
@@ -202,7 +203,7 @@ gnuv3_dynamic_class (struct type *type)
 {
   int fieldnum, fieldelem;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
 	      || TYPE_CODE (type) == TYPE_CODE_UNION);
 
@@ -247,13 +248,13 @@ static struct value *
 gnuv3_get_vtable (struct gdbarch *gdbarch,
 		  struct type *container_type, CORE_ADDR container_addr)
 {
-  struct type *vtable_type = gdbarch_data (gdbarch,
-					   vtable_type_gdbarch_data);
+  struct type *vtable_type
+    = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
   struct type *vtable_pointer_type;
   struct value *vtable_pointer;
   CORE_ADDR vtable_address;
 
-  CHECK_TYPEDEF (container_type);
+  container_type = check_typedef (container_type);
   gdb_assert (TYPE_CODE (container_type) == TYPE_CODE_STRUCT);
 
   /* If this type does not have a virtual table, don't read the first
@@ -285,7 +286,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc
 
 static struct type *
 gnuv3_rtti_type (struct value *value,
-                 int *full_p, int *top_p, int *using_enc_p)
+                 int *full_p, LONGEST *top_p, int *using_enc_p)
 {
   struct gdbarch *gdbarch;
   struct type *values_type = check_typedef (value_type (value));
@@ -295,16 +296,12 @@ gnuv3_rtti_type (struct value *value,
   const char *class_name;
   struct type *run_time_type;
   LONGEST offset_to_top;
-  char *atsign;
+  const char *atsign;
 
   /* We only have RTTI for class objects.  */
   if (TYPE_CODE (values_type) != TYPE_CODE_STRUCT)
     return NULL;
 
-  /* Java doesn't have RTTI following the C++ ABI.  */
-  if (TYPE_CPLUS_REALLY_JAVA (values_type))
-    return NULL;
-
   /* Determine architecture.  */
   gdbarch = get_type_arch (values_type);
 
@@ -346,7 +343,7 @@ gnuv3_rtti_type (struct value *value,
     {
       char *copy;
 
-      copy = alloca (atsign - class_name + 1);
+      copy = (char *) alloca (atsign - class_name + 1);
       memcpy (copy, class_name, atsign - class_name);
       copy[atsign - class_name] = '\0';
       class_name = copy;
@@ -442,7 +439,7 @@ gnuv3_virtual_fn_field (struct value **v
 
 static int
 gnuv3_baseclass_offset (struct type *type, int index,
-			const bfd_byte *valaddr, int embedded_offset,
+			const bfd_byte *valaddr, LONGEST embedded_offset,
 			CORE_ADDR address, const struct value *val)
 {
   struct gdbarch *gdbarch;
@@ -456,9 +453,8 @@ gnuv3_baseclass_offset (struct type *typ
   ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
 
   /* If it isn't a virtual base, this is easy.  The offset is in the
-     type definition.  Likewise for Java, which doesn't really have
-     virtual inheritance in the C++ sense.  */
-  if (!BASETYPE_VIA_VIRTUAL (type, index) || TYPE_CPLUS_REALLY_JAVA (type))
+     type definition.  */
+  if (!BASETYPE_VIA_VIRTUAL (type, index))
     return TYPE_BASECLASS_BITPOS (type, index) / 8;
 
   /* To access a virtual base, we need to use the vbase offset stored in
@@ -779,7 +775,7 @@ DEF_VEC_P (value_and_voffset_p);
 static hashval_t
 hash_value_and_voffset (const void *p)
 {
-  const struct value_and_voffset *o = p;
+  const struct value_and_voffset *o = (const struct value_and_voffset *) p;
 
   return value_address (o->value) + value_embedded_offset (o->value);
 }
@@ -789,8 +785,8 @@ hash_value_and_voffset (const void *p)
 static int
 eq_value_and_voffset (const void *a, const void *b)
 {
-  const struct value_and_voffset *ova = a;
-  const struct value_and_voffset *ovb = b;
+  const struct value_and_voffset *ova = (const struct value_and_voffset *) a;
+  const struct value_and_voffset *ovb = (const struct value_and_voffset *) b;
 
   return (value_address (ova->value) + value_embedded_offset (ova->value)
 	  == value_address (ovb->value) + value_embedded_offset (ovb->value));
@@ -801,10 +797,12 @@ eq_value_and_voffset (const void *a, con
 static int
 compare_value_and_voffset (const void *a, const void *b)
 {
-  const struct value_and_voffset * const *ova = a;
+  const struct value_and_voffset * const *ova
+    = (const struct value_and_voffset * const *) a;
   CORE_ADDR addra = (value_address ((*ova)->value)
 		     + value_embedded_offset ((*ova)->value));
-  const struct value_and_voffset * const *ovb = b;
+  const struct value_and_voffset * const *ovb
+    = (const struct value_and_voffset * const *) b;
   CORE_ADDR addrb = (value_address ((*ovb)->value)
 		     + value_embedded_offset ((*ovb)->value));
 
@@ -842,7 +840,7 @@ compute_vtable_size (htab_t offset_hash,
   search_vo.value = value;
   slot = htab_find_slot (offset_hash, &search_vo, INSERT);
   if (*slot)
-    current_vo = *slot;
+    current_vo = (struct value_and_voffset *) *slot;
   else
     {
       current_vo = XNEW (struct value_and_voffset);
@@ -942,7 +940,6 @@ gnuv3_print_vtable (struct value *value)
   struct type *type;
   struct value *vtable;
   struct value_print_options opts;
-  htab_t offset_hash;
   struct cleanup *cleanup;
   VEC (value_and_voffset_p) *result_vec = NULL;
   struct value_and_voffset *iter;
@@ -978,13 +975,12 @@ gnuv3_print_vtable (struct value *value)
       return;
     }
 
-  offset_hash = htab_create_alloc (1, hash_value_and_voffset,
-				   eq_value_and_voffset,
-				   xfree, xcalloc, xfree);
-  cleanup = make_cleanup_htab_delete (offset_hash);
-  make_cleanup (VEC_cleanup (value_and_voffset_p), &result_vec);
+  htab_up offset_hash (htab_create_alloc (1, hash_value_and_voffset,
+					  eq_value_and_voffset,
+					  xfree, xcalloc, xfree));
+  cleanup = make_cleanup (VEC_cleanup (value_and_voffset_p), &result_vec);
 
-  compute_vtable_size (offset_hash, &result_vec, value);
+  compute_vtable_size (offset_hash.get (), &result_vec, value);
 
   qsort (VEC_address (value_and_voffset_p, result_vec),
 	 VEC_length (value_and_voffset_p, result_vec),
@@ -1025,8 +1021,7 @@ build_std_type_info_type (struct gdbarch
   struct type *char_ptr_type
     = make_pointer_type (make_cv_type (1, 0, char_type, NULL), NULL);
 
-  field_list = xmalloc (sizeof (struct field [2]));
-  memset (field_list, 0, sizeof (struct field [2]));
+  field_list = XCNEWVEC (struct field, 2);
   field = &field_list[0];
   offset = 0;
 
@@ -1063,9 +1058,11 @@ gnuv3_get_typeid_type (struct gdbarch *g
   struct symbol *typeinfo;
   struct type *typeinfo_type;
 
-  typeinfo = lookup_symbol ("std::type_info", NULL, STRUCT_DOMAIN, NULL);
+  typeinfo = lookup_symbol ("std::type_info", NULL, STRUCT_DOMAIN,
+			    NULL).symbol;
   if (typeinfo == NULL)
-    typeinfo_type = gdbarch_data (gdbarch, std_type_info_gdbarch_data);
+    typeinfo_type
+      = (struct type *) gdbarch_data (gdbarch, std_type_info_gdbarch_data);
   else
     typeinfo_type = SYMBOL_TYPE (typeinfo);
 
@@ -1082,7 +1079,7 @@ gnuv3_get_typeid (struct value *value)
   struct gdbarch *gdbarch;
   struct cleanup *cleanup;
   struct value *result;
-  char *type_name, *canonical;
+  std::string type_name, canonical;
 
   /* We have to handle values a bit trickily here, to allow this code
      to work properly with non_lvalue values that are really just
@@ -1102,20 +1099,16 @@ gnuv3_get_typeid (struct value *value)
   gdbarch = get_type_arch (type);
 
   type_name = type_to_string (type);
-  if (type_name == NULL)
+  if (type_name.empty ())
     error (_("cannot find typeinfo for unnamed type"));
-  cleanup = make_cleanup (xfree, type_name);
 
   /* We need to canonicalize the type name here, because we do lookups
      using the demangled name, and so we must match the format it
      uses.  E.g., GDB tends to use "const char *" as a type name, but
      the demangler uses "char const *".  */
-  canonical = cp_canonicalize_string (type_name);
-  if (canonical != NULL)
-    {
-      make_cleanup (xfree, canonical);
-      type_name = canonical;
-    }
+  canonical = cp_canonicalize_string (type_name.c_str ());
+  if (!canonical.empty ())
+    type_name = canonical;
 
   typeinfo_type = gnuv3_get_typeid_type (gdbarch);
 
@@ -1130,33 +1123,30 @@ gnuv3_get_typeid (struct value *value)
 
       vtable = gnuv3_get_vtable (gdbarch, type, address);
       if (vtable == NULL)
-	error (_("cannot find typeinfo for object of type '%s'"), type_name);
+	error (_("cannot find typeinfo for object of type '%s'"),
+	       type_name.c_str ());
       typeinfo_value = value_field (vtable, vtable_field_type_info);
       result = value_ind (value_cast (make_pointer_type (typeinfo_type, NULL),
 				      typeinfo_value));
     }
   else
     {
-      char *sym_name;
-      struct bound_minimal_symbol minsym;
-
-      sym_name = concat ("typeinfo for ", type_name, (char *) NULL);
-      make_cleanup (xfree, sym_name);
-      minsym = lookup_minimal_symbol (sym_name, NULL, NULL);
+      std::string sym_name = std::string ("typeinfo for ") + type_name;
+      bound_minimal_symbol minsym
+	= lookup_minimal_symbol (sym_name.c_str (), NULL, NULL);
 
       if (minsym.minsym == NULL)
-	error (_("could not find typeinfo symbol for '%s'"), type_name);
+	error (_("could not find typeinfo symbol for '%s'"), type_name.c_str ());
 
       result = value_at_lazy (typeinfo_type, BMSYMBOL_VALUE_ADDRESS (minsym));
     }
 
-  do_cleanups (cleanup);
   return result;
 }
 
 /* Implement the 'get_typename_from_type_info' method.  */
 
-static char *
+static std::string
 gnuv3_get_typename_from_type_info (struct value *type_info_ptr)
 {
   struct gdbarch *gdbarch = get_type_arch (value_type (type_info_ptr));
@@ -1184,8 +1174,8 @@ gnuv3_get_typename_from_type_info (struc
   /* Strip off @plt and version suffixes.  */
   atsign = strchr (class_name, '@');
   if (atsign != NULL)
-    return savestring (class_name, atsign - class_name);
-  return xstrdup (class_name);
+    return std::string (class_name, atsign - class_name);
+  return class_name;
 }
 
 /* Implement the 'get_type_from_type_info' method.  */
@@ -1193,28 +1183,14 @@ gnuv3_get_typename_from_type_info (struc
 static struct type *
 gnuv3_get_type_from_type_info (struct value *type_info_ptr)
 {
-  char *type_name;
-  struct cleanup *cleanup;
-  struct value *type_val;
-  struct expression *expr;
-  struct type *result;
-
-  type_name = gnuv3_get_typename_from_type_info (type_info_ptr);
-  cleanup = make_cleanup (xfree, type_name);
-
   /* We have to parse the type name, since in general there is not a
      symbol for a type.  This is somewhat bogus since there may be a
      mis-parse.  Another approach might be to re-use the demangler's
      internal form to reconstruct the type somehow.  */
-
-  expr = parse_expression (type_name);
-  make_cleanup (xfree, expr);
-
-  type_val = evaluate_type (expr);
-  result = value_type (type_val);
-
-  do_cleanups (cleanup);
-  return result;
+  std::string type_name = gnuv3_get_typename_from_type_info (type_info_ptr);
+  expression_up expr (parse_expression (type_name.c_str ()));
+  struct value *type_val = evaluate_type (expr.get ());
+  return value_type (type_val);
 }
 
 /* Determine if we are currently in a C++ thunk.  If so, get the address
@@ -1293,7 +1269,7 @@ gnuv3_pass_by_reference (struct type *ty
 {
   int fieldnum, fieldelem;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   /* We're only interested in things that can have methods.  */
   if (TYPE_CODE (type) != TYPE_CODE_STRUCT
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go32-nat.c ./gdb/go32-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go32-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go32-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Native debugging support for Intel x86 running DJGPP.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Written by Robert Hoehne.
 
    This file is part of GDB.
@@ -677,7 +677,7 @@ go32_create_inferior (struct target_ops 
   if (cmdlen > 1024*1024)
     error (_("Command line too long."));
 
-  cmdline = xmalloc (cmdlen + 4);
+  cmdline = (char *) xmalloc (cmdlen + 4);
   strcpy (cmdline + 1, args);
   /* If the command-line length fits into DOS 126-char limits, use the
      DOS command tail format; otherwise, tell v2loadimage to pass it
@@ -938,7 +938,7 @@ go32_terminal_ours (struct target_ops *s
 static int
 go32_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
-  return !ptid_equal (inferior_ptid, null_ptid);
+  return !ptid_equal (ptid, null_ptid);
 }
 
 static char *
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-exp.c ./gdb/go-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/go-exp.c	2017-03-06 01:53:01.000000000 +0000
@@ -87,59 +87,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth go_maxdepth
-#define	yyparse	go_parse_internal
-#define	yylex	go_lex
-#define	yyerror	go_error
-#define	yylval	go_lval
-#define	yychar	go_char
-#define	yydebug	go_debug
-#define	yypact	go_pact
-#define	yyr1	go_r1
-#define	yyr2	go_r2
-#define	yydef	go_def
-#define	yychk	go_chk
-#define	yypgo	go_pgo
-#define	yyact	go_act
-#define	yyexca	go_exca
-#define yyerrflag go_errflag
-#define yynerrs	go_nerrs
-#define	yyps	go_ps
-#define	yypv	go_pv
-#define	yys	go_s
-#define	yy_yys	go_yys
-#define	yystate	go_state
-#define	yytmp	go_tmp
-#define	yyv	go_v
-#define	yy_yyv	go_yyv
-#define	yyval	go_val
-#define	yylloc	go_lloc
-#define yyreds	go_reds		/* With YYDEBUG defined */
-#define yytoks	go_toks		/* With YYDEBUG defined */
-#define yyname	go_name		/* With YYDEBUG defined */
-#define yyrule	go_rule		/* With YYDEBUG defined */
-#define yylhs	go_yylhs
-#define yylen	go_yylen
-#define yydefred go_yydefred
-#define yydgoto	go_yydgoto
-#define yysindex go_yysindex
-#define yyrindex go_yyrindex
-#define yygindex go_yygindex
-#define yytable	 go_yytable
-#define yycheck	 go_yycheck
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX go_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -155,7 +106,7 @@ void yyerror (char *);
 
 
 /* Line 189 of yacc.c  */
-#line 159 "go-exp.c"
+#line 110 "go-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -278,7 +229,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 142 "go-exp.y"
+#line 93 "go-exp.y"
 
     LONGEST lval;
     struct {
@@ -302,7 +253,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 306 "go-exp.c"
+#line 257 "go-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -313,7 +264,7 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 /* Line 264 of yacc.c  */
-#line 163 "go-exp.y"
+#line 114 "go-exp.y"
 
 /* YYSTYPE gets defined by %union.  */
 static int parse_number (struct parser_state *,
@@ -323,7 +274,7 @@ static int parse_go_float (struct gdbarc
 
 
 /* Line 264 of yacc.c  */
-#line 327 "go-exp.c"
+#line 278 "go-exp.c"
 
 #ifdef short
 # undef short
@@ -635,13 +586,13 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   242,   242,   243,   246,   253,   254,   259,   263,   267,
-     271,   275,   279,   283,   287,   293,   299,   306,   316,   323,
-     320,   331,   335,   338,   342,   346,   350,   356,   362,   368,
-     372,   376,   380,   384,   388,   392,   396,   400,   404,   408,
-     412,   416,   420,   424,   428,   432,   436,   440,   444,   448,
-     452,   458,   465,   474,   487,   494,   497,   503,   518,   525,
-     542,   560,   572,   578,   584,   600,   655,   657,   664,   677
+       0,   193,   193,   194,   197,   204,   205,   210,   214,   218,
+     222,   226,   230,   234,   238,   244,   250,   257,   267,   274,
+     271,   282,   286,   289,   293,   297,   301,   307,   313,   319,
+     323,   327,   331,   335,   339,   343,   347,   351,   355,   359,
+     363,   367,   371,   375,   379,   383,   387,   391,   395,   399,
+     403,   409,   416,   425,   438,   445,   448,   454,   469,   476,
+     493,   511,   523,   529,   535,   551,   603,   605,   612,   625
 };
 #endif
 
@@ -1692,7 +1643,7 @@ yyreduce:
         case 4:
 
 /* Line 1455 of yacc.c  */
-#line 247 "go-exp.y"
+#line 198 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
 			  write_exp_elt_opcode (pstate, OP_TYPE); }
@@ -1701,70 +1652,70 @@ yyreduce:
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 255 "go-exp.y"
+#line 206 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_COMMA); }
     break;
 
   case 7:
 
 /* Line 1455 of yacc.c  */
-#line 260 "go-exp.y"
+#line 211 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 264 "go-exp.y"
+#line 215 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR); }
     break;
 
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 268 "go-exp.y"
+#line 219 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 10:
 
 /* Line 1455 of yacc.c  */
-#line 272 "go-exp.y"
+#line 223 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PLUS); }
     break;
 
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 276 "go-exp.y"
+#line 227 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 280 "go-exp.y"
+#line 231 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 284 "go-exp.y"
+#line 235 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
     break;
 
   case 14:
 
 /* Line 1455 of yacc.c  */
-#line 288 "go-exp.y"
+#line 239 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
     break;
 
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 294 "go-exp.y"
+#line 245 "go-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(3) - (3)].ssym).stoken);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
@@ -1773,7 +1724,7 @@ yyreduce:
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 300 "go-exp.y"
+#line 251 "go-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(3) - (4)].ssym).stoken);
@@ -1783,7 +1734,7 @@ yyreduce:
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 307 "go-exp.y"
+#line 258 "go-exp.y"
     { struct stoken s;
 			  mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
@@ -1796,21 +1747,21 @@ yyreduce:
   case 18:
 
 /* Line 1455 of yacc.c  */
-#line 317 "go-exp.y"
+#line 268 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
     break;
 
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 323 "go-exp.y"
+#line 274 "go-exp.y"
     { start_arglist (); }
     break;
 
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 325 "go-exp.y"
+#line 276 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) end_arglist ());
@@ -1820,35 +1771,35 @@ yyreduce:
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 332 "go-exp.y"
+#line 283 "go-exp.y"
     { start_arglist (); }
     break;
 
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 339 "go-exp.y"
+#line 290 "go-exp.y"
     { arglist_len = 1; }
     break;
 
   case 24:
 
 /* Line 1455 of yacc.c  */
-#line 343 "go-exp.y"
+#line 294 "go-exp.y"
     { arglist_len++; }
     break;
 
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 347 "go-exp.y"
+#line 298 "go-exp.y"
     { (yyval.lval) = end_arglist () - 1; }
     break;
 
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 351 "go-exp.y"
+#line 302 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_MEMVAL);
 			  write_exp_elt_type (pstate, (yyvsp[(2) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_MEMVAL); }
@@ -1857,7 +1808,7 @@ yyreduce:
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 357 "go-exp.y"
+#line 308 "go-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAST);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_CAST); }
@@ -1866,161 +1817,161 @@ yyreduce:
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 363 "go-exp.y"
+#line 314 "go-exp.y"
     { }
     break;
 
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 369 "go-exp.y"
+#line 320 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
     break;
 
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 373 "go-exp.y"
+#line 324 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 377 "go-exp.y"
+#line 328 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 381 "go-exp.y"
+#line 332 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 385 "go-exp.y"
+#line 336 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 389 "go-exp.y"
+#line 340 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 393 "go-exp.y"
+#line 344 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LSH); }
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 397 "go-exp.y"
+#line 348 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_RSH); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 401 "go-exp.y"
+#line 352 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 405 "go-exp.y"
+#line 356 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 409 "go-exp.y"
+#line 360 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 413 "go-exp.y"
+#line 364 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 41:
 
 /* Line 1455 of yacc.c  */
-#line 417 "go-exp.y"
+#line 368 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 421 "go-exp.y"
+#line 372 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 425 "go-exp.y"
+#line 376 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 429 "go-exp.y"
+#line 380 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 433 "go-exp.y"
+#line 384 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 437 "go-exp.y"
+#line 388 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 441 "go-exp.y"
+#line 392 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 445 "go-exp.y"
+#line 396 "go-exp.y"
     { write_exp_elt_opcode (pstate, TERNOP_COND); }
     break;
 
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 449 "go-exp.y"
+#line 400 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 453 "go-exp.y"
+#line 404 "go-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 			  write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
 			  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
@@ -2029,7 +1980,7 @@ yyreduce:
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 459 "go-exp.y"
+#line 410 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
 			  write_exp_elt_longcst (pstate, (LONGEST)((yyvsp[(1) - (1)].typed_val_int).val));
@@ -2039,7 +1990,7 @@ yyreduce:
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 466 "go-exp.y"
+#line 417 "go-exp.y"
     {
 			  struct stoken_vector vec;
 			  vec.len = 1;
@@ -2051,7 +2002,7 @@ yyreduce:
   case 53:
 
 /* Line 1455 of yacc.c  */
-#line 475 "go-exp.y"
+#line 426 "go-exp.y"
     { YYSTYPE val;
 			  parse_number (pstate, (yyvsp[(1) - (1)].ssym).stoken.ptr,
 					(yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
@@ -2066,7 +2017,7 @@ yyreduce:
   case 54:
 
 /* Line 1455 of yacc.c  */
-#line 488 "go-exp.y"
+#line 439 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
 			  write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
@@ -2076,7 +2027,7 @@ yyreduce:
   case 56:
 
 /* Line 1455 of yacc.c  */
-#line 498 "go-exp.y"
+#line 449 "go-exp.y"
     {
 			  write_dollar_variable (pstate, (yyvsp[(1) - (1)].sval));
 			}
@@ -2085,7 +2036,7 @@ yyreduce:
   case 57:
 
 /* Line 1455 of yacc.c  */
-#line 504 "go-exp.y"
+#line 455 "go-exp.y"
     {
 			  /* TODO(dje): Go objects in structs.  */
 			  write_exp_elt_opcode (pstate, OP_LONG);
@@ -2093,7 +2044,7 @@ yyreduce:
 			  write_exp_elt_type
 			    (pstate,
 			     parse_type (pstate)->builtin_unsigned_int);
-			  CHECK_TYPEDEF ((yyvsp[(3) - (4)].tval));
+			  (yyvsp[(3) - (4)].tval) = check_typedef ((yyvsp[(3) - (4)].tval));
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ((yyvsp[(3) - (4)].tval)));
 			  write_exp_elt_opcode (pstate, OP_LONG);
@@ -2103,7 +2054,7 @@ yyreduce:
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 519 "go-exp.y"
+#line 470 "go-exp.y"
     {
 			  /* TODO(dje): Go objects in structs.  */
 			  write_exp_elt_opcode (pstate, UNOP_SIZEOF);
@@ -2113,7 +2064,7 @@ yyreduce:
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 526 "go-exp.y"
+#line 477 "go-exp.y"
     {
 			  /* We copy the string here, and not in the
 			     lexer, to guarantee that we do not leak a
@@ -2126,7 +2077,7 @@ yyreduce:
 
 			  vec->type = (yyvsp[(1) - (1)].tsval).type;
 			  vec->length = (yyvsp[(1) - (1)].tsval).length;
-			  vec->ptr = xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
+			  vec->ptr = (char *) xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
 			  memcpy (vec->ptr, (yyvsp[(1) - (1)].tsval).ptr, (yyvsp[(1) - (1)].tsval).length + 1);
 			}
     break;
@@ -2134,16 +2085,16 @@ yyreduce:
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 543 "go-exp.y"
+#line 494 "go-exp.y"
     {
 			  /* Note that we NUL-terminate here, but just
 			     for convenience.  */
 			  char *p;
 			  ++(yyval.svec).len;
-			  (yyval.svec).tokens = xrealloc ((yyval.svec).tokens,
-					       (yyval.svec).len * sizeof (struct typed_stoken));
+			  (yyval.svec).tokens = XRESIZEVEC (struct typed_stoken,
+						  (yyval.svec).tokens, (yyval.svec).len);
 
-			  p = xmalloc ((yyvsp[(3) - (3)].tsval).length + 1);
+			  p = (char *) xmalloc ((yyvsp[(3) - (3)].tsval).length + 1);
 			  memcpy (p, (yyvsp[(3) - (3)].tsval).ptr, (yyvsp[(3) - (3)].tsval).length + 1);
 
 			  (yyval.svec).tokens[(yyval.svec).len - 1].type = (yyvsp[(3) - (3)].tsval).type;
@@ -2155,7 +2106,7 @@ yyreduce:
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 561 "go-exp.y"
+#line 512 "go-exp.y"
     {
 			  int i;
 
@@ -2170,7 +2121,7 @@ yyreduce:
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 573 "go-exp.y"
+#line 524 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].lval));
 			  write_exp_elt_opcode (pstate, OP_BOOL); }
@@ -2179,7 +2130,7 @@ yyreduce:
   case 63:
 
 /* Line 1455 of yacc.c  */
-#line 579 "go-exp.y"
+#line 530 "go-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].lval));
 			  write_exp_elt_opcode (pstate, OP_BOOL); }
@@ -2188,8 +2139,8 @@ yyreduce:
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 585 "go-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (2)].ssym).sym;
+#line 536 "go-exp.y"
+    { struct symbol *sym = (yyvsp[(1) - (2)].ssym).sym.symbol;
 
 			  if (sym == NULL
 			      || !SYMBOL_IS_ARGUMENT (sym)
@@ -2207,25 +2158,22 @@ yyreduce:
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 601 "go-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
+#line 552 "go-exp.y"
+    { struct block_symbol sym = (yyvsp[(1) - (1)].ssym).sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else if ((yyvsp[(1) - (1)].ssym).is_a_field_of_this)
@@ -2257,21 +2205,21 @@ yyreduce:
   case 66:
 
 /* Line 1455 of yacc.c  */
-#line 656 "go-exp.y"
+#line 604 "go-exp.y"
     { (yyval.tval) = lookup_pointer_type ((yyvsp[(2) - (2)].tval)); }
     break;
 
   case 67:
 
 /* Line 1455 of yacc.c  */
-#line 658 "go-exp.y"
+#line 606 "go-exp.y"
     { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
     break;
 
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 665 "go-exp.y"
+#line 613 "go-exp.y"
     { (yyval.tval) = builtin_go_type (parse_gdbarch (pstate))
 			    ->builtin_uint8; }
     break;
@@ -2279,7 +2227,7 @@ yyreduce:
 
 
 /* Line 1455 of yacc.c  */
-#line 2284 "go-exp.c"
+#line 2232 "go-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2491,7 +2439,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 687 "go-exp.y"
+#line 635 "go-exp.y"
 
 
 /* Wrapper on parse_c_float to get the type right for Go.  */
@@ -2786,7 +2734,7 @@ parse_string_or_char (const char *tokptr
   ++tokptr;
 
   value->type = C_STRING | (quote == '\'' ? C_CHAR : 0); /*FIXME*/
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -3174,7 +3122,7 @@ build_packaged_name (const char *package
   obstack_grow_str (&name_obstack, ".");
   obstack_grow (&name_obstack, name, name_len);
   obstack_grow (&name_obstack, "", 1);
-  result.ptr = obstack_base (&name_obstack);
+  result.ptr = (char *) obstack_base (&name_obstack);
   result.length = obstack_object_size (&name_obstack) - 1;
 
   return result;
@@ -3190,7 +3138,7 @@ package_name_p (const char *name, const 
   struct symbol *sym;
   struct field_of_this_result is_a_field_of_this;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, &is_a_field_of_this);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, &is_a_field_of_this).symbol;
 
   if (sym
       && SYMBOL_CLASS (sym) == LOC_TYPEDEF
@@ -3228,14 +3176,14 @@ static int
 classify_packaged_name (const struct block *block)
 {
   char *copy;
-  struct symbol *sym;
+  struct block_symbol sym;
   struct field_of_this_result is_a_field_of_this;
 
   copy = copy_name (yylval.sval);
 
   sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
 
-  if (sym)
+  if (sym.symbol)
     {
       yylval.ssym.sym = sym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
@@ -3256,7 +3204,7 @@ static int
 classify_name (struct parser_state *par_state, const struct block *block)
 {
   struct type *type;
-  struct symbol *sym;
+  struct block_symbol sym;
   char *copy;
   struct field_of_this_result is_a_field_of_this;
 
@@ -3279,7 +3227,7 @@ classify_name (struct parser_state *par_
 
   sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
 
-  if (sym)
+  if (sym.symbol)
     {
       yylval.ssym.sym = sym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
@@ -3304,7 +3252,7 @@ classify_name (struct parser_state *par_
 	xfree (current_package_name);
 	sym = lookup_symbol (sval.ptr, block, VAR_DOMAIN,
 			     &is_a_field_of_this);
-	if (sym)
+	if (sym.symbol)
 	  {
 	    yylval.ssym.stoken = sval;
 	    yylval.ssym.sym = sym;
@@ -3325,13 +3273,15 @@ classify_name (struct parser_state *par_
 				  0, &newlval);
       if (hextype == INT)
 	{
-	  yylval.ssym.sym = NULL;
+	  yylval.ssym.sym.symbol = NULL;
+	  yylval.ssym.sym.block = NULL;
 	  yylval.ssym.is_a_field_of_this = 0;
 	  return NAME_OR_INT;
 	}
     }
 
-  yylval.ssym.sym = NULL;
+  yylval.ssym.sym.symbol = NULL;
+  yylval.ssym.sym.block = NULL;
   yylval.ssym.is_a_field_of_this = 0;
   return NAME;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-exp.y ./gdb/go-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* YACC parser for Go expressions, for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -67,59 +67,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth go_maxdepth
-#define	yyparse	go_parse_internal
-#define	yylex	go_lex
-#define	yyerror	go_error
-#define	yylval	go_lval
-#define	yychar	go_char
-#define	yydebug	go_debug
-#define	yypact	go_pact
-#define	yyr1	go_r1
-#define	yyr2	go_r2
-#define	yydef	go_def
-#define	yychk	go_chk
-#define	yypgo	go_pgo
-#define	yyact	go_act
-#define	yyexca	go_exca
-#define yyerrflag go_errflag
-#define yynerrs	go_nerrs
-#define	yyps	go_ps
-#define	yypv	go_pv
-#define	yys	go_s
-#define	yy_yys	go_yys
-#define	yystate	go_state
-#define	yytmp	go_tmp
-#define	yyv	go_v
-#define	yy_yyv	go_yyv
-#define	yyval	go_val
-#define	yylloc	go_lloc
-#define yyreds	go_reds		/* With YYDEBUG defined */
-#define yytoks	go_toks		/* With YYDEBUG defined */
-#define yyname	go_name		/* With YYDEBUG defined */
-#define yyrule	go_rule		/* With YYDEBUG defined */
-#define yylhs	go_yylhs
-#define yylen	go_yylen
-#define yydefred go_yydefred
-#define yydgoto	go_yydgoto
-#define yysindex go_yysindex
-#define yyrindex go_yyrindex
-#define yygindex go_yygindex
-#define yytable	 go_yytable
-#define yycheck	 go_yycheck
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX go_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -508,7 +459,7 @@ exp	:	SIZEOF_KEYWORD '(' type ')'  %prec
 			  write_exp_elt_type
 			    (pstate,
 			     parse_type (pstate)->builtin_unsigned_int);
-			  CHECK_TYPEDEF ($3);
+			  $3 = check_typedef ($3);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ($3));
 			  write_exp_elt_opcode (pstate, OP_LONG);
@@ -535,7 +486,7 @@ string_exp:
 
 			  vec->type = $1.type;
 			  vec->length = $1.length;
-			  vec->ptr = malloc ($1.length + 1);
+			  vec->ptr = (char *) malloc ($1.length + 1);
 			  memcpy (vec->ptr, $1.ptr, $1.length + 1);
 			}
 
@@ -545,10 +496,10 @@ string_exp:
 			     for convenience.  */
 			  char *p;
 			  ++$$.len;
-			  $$.tokens = realloc ($$.tokens,
-					       $$.len * sizeof (struct typed_stoken));
+			  $$.tokens = XRESIZEVEC (struct typed_stoken,
+						  $$.tokens, $$.len);
 
-			  p = malloc ($3.length + 1);
+			  p = (char *) malloc ($3.length + 1);
 			  memcpy (p, $3.ptr, $3.length + 1);
 
 			  $$.tokens[$$.len - 1].type = $3.type;
@@ -582,7 +533,7 @@ exp	:	FALSE_KEYWORD
 	;
 
 variable:	name_not_typename ENTRY
-			{ struct symbol *sym = $1.sym;
+			{ struct symbol *sym = $1.sym.symbol;
 
 			  if (sym == NULL
 			      || !SYMBOL_IS_ARGUMENT (sym)
@@ -598,24 +549,21 @@ variable:	name_not_typename ENTRY
 	;
 
 variable:	name_not_typename
-			{ struct symbol *sym = $1.sym;
+			{ struct block_symbol sym = $1.sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else if ($1.is_a_field_of_this)
@@ -978,7 +926,7 @@ parse_string_or_char (const char *tokptr
   ++tokptr;
 
   value->type = C_STRING | (quote == '\'' ? C_CHAR : 0); /*FIXME*/
-  value->ptr = obstack_base (&tempbuf);
+  value->ptr = (char *) obstack_base (&tempbuf);
   value->length = obstack_object_size (&tempbuf);
 
   *outptr = tokptr;
@@ -1366,7 +1314,7 @@ build_packaged_name (const char *package
   obstack_grow_str (&name_obstack, ".");
   obstack_grow (&name_obstack, name, name_len);
   obstack_grow (&name_obstack, "", 1);
-  result.ptr = obstack_base (&name_obstack);
+  result.ptr = (char *) obstack_base (&name_obstack);
   result.length = obstack_object_size (&name_obstack) - 1;
 
   return result;
@@ -1382,7 +1330,7 @@ package_name_p (const char *name, const 
   struct symbol *sym;
   struct field_of_this_result is_a_field_of_this;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, &is_a_field_of_this);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, &is_a_field_of_this).symbol;
 
   if (sym
       && SYMBOL_CLASS (sym) == LOC_TYPEDEF
@@ -1420,14 +1368,14 @@ static int
 classify_packaged_name (const struct block *block)
 {
   char *copy;
-  struct symbol *sym;
+  struct block_symbol sym;
   struct field_of_this_result is_a_field_of_this;
 
   copy = copy_name (yylval.sval);
 
   sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
 
-  if (sym)
+  if (sym.symbol)
     {
       yylval.ssym.sym = sym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
@@ -1448,7 +1396,7 @@ static int
 classify_name (struct parser_state *par_state, const struct block *block)
 {
   struct type *type;
-  struct symbol *sym;
+  struct block_symbol sym;
   char *copy;
   struct field_of_this_result is_a_field_of_this;
 
@@ -1471,7 +1419,7 @@ classify_name (struct parser_state *par_
 
   sym = lookup_symbol (copy, block, VAR_DOMAIN, &is_a_field_of_this);
 
-  if (sym)
+  if (sym.symbol)
     {
       yylval.ssym.sym = sym;
       yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
@@ -1496,7 +1444,7 @@ classify_name (struct parser_state *par_
 	xfree (current_package_name);
 	sym = lookup_symbol (sval.ptr, block, VAR_DOMAIN,
 			     &is_a_field_of_this);
-	if (sym)
+	if (sym.symbol)
 	  {
 	    yylval.ssym.stoken = sval;
 	    yylval.ssym.sym = sym;
@@ -1517,13 +1465,15 @@ classify_name (struct parser_state *par_
 				  0, &newlval);
       if (hextype == INT)
 	{
-	  yylval.ssym.sym = NULL;
+	  yylval.ssym.sym.symbol = NULL;
+	  yylval.ssym.sym.block = NULL;
 	  yylval.ssym.is_a_field_of_this = 0;
 	  return NAME_OR_INT;
 	}
     }
 
-  yylval.ssym.sym = NULL;
+  yylval.ssym.sym.symbol = NULL;
+  yylval.ssym.sym.block = NULL;
   yylval.ssym.is_a_field_of_this = 0;
   return NAME;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-lang.c ./gdb/go-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Go language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -77,8 +77,8 @@ gccgo_string_p (struct type *type)
       struct type *type0 = TYPE_FIELD_TYPE (type, 0);
       struct type *type1 = TYPE_FIELD_TYPE (type, 1);
 
-      CHECK_TYPEDEF (type0);
-      CHECK_TYPEDEF (type1);
+      type0 = check_typedef (type0);
+      type1 = check_typedef (type1);
 
       if (TYPE_CODE (type0) == TYPE_CODE_PTR
 	  && strcmp (TYPE_FIELD_NAME (type, 0), "__data") == 0
@@ -87,7 +87,7 @@ gccgo_string_p (struct type *type)
 	{
 	  struct type *target_type = TYPE_TARGET_TYPE (type0);
 
-	  CHECK_TYPEDEF (target_type);
+	  target_type = check_typedef (target_type);
 
 	  if (TYPE_CODE (target_type) == TYPE_CODE_INT
 	      && TYPE_LENGTH (target_type) == 1
@@ -119,7 +119,7 @@ sixg_string_p (struct type *type)
 enum go_type
 go_classify_struct_type (struct type *type)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   /* Recognize strings as they're useful to be able to print without
      pretty-printers.  */
@@ -195,9 +195,9 @@ unpack_mangled_go_symbol (const char *ma
   /* Pointer to "N" if valid "N<digit(s)>_" found.  */
   char *method_type;
   /* Pointer to the first '.'.  */
-  char *first_dot;
+  const char *first_dot;
   /* Pointer to the last '.'.  */
-  char *last_dot;
+  const char *last_dot;
   /* Non-zero if we saw a pointer indicator.  */
   int saw_pointer;
 
@@ -379,12 +379,21 @@ go_demangle (const char *mangled_name, i
     }
   obstack_grow_str0 (&tempbuf, "");
 
-  result = xstrdup (obstack_finish (&tempbuf));
+  result = xstrdup ((const char *) obstack_finish (&tempbuf));
   obstack_free (&tempbuf, NULL);
   xfree (name_buf);
   return result;
 }
 
+/* la_sniff_from_mangled_name for Go.  */
+
+static int
+go_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = go_demangle (mangled, 0);
+  return *demangled != NULL;
+}
+
 /* Given a Go symbol, return its package or NULL if unknown.
    Space for the result is malloc'd, caller must free.  */
 
@@ -478,7 +487,7 @@ static const struct op_print go_op_print
   {"unsafe.Sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
   {"++", UNOP_POSTINCREMENT, PREC_SUFFIX, 0},
   {"--", UNOP_POSTDECREMENT, PREC_SUFFIX, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_SUFFIX, 0}
 };
 
 enum go_primitive_types {
@@ -565,9 +574,10 @@ static const struct language_defn go_lan
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  NULL,
   &exp_descriptor_c,
   go_parse,
-  go_error,
+  go_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant.  */
   c_printstr,			/* Function to print string constant.  */
@@ -583,6 +593,7 @@ static const struct language_defn go_lan
   basic_lookup_symbol_nonlocal, 
   basic_lookup_transparent_type,
   go_demangle,			/* Language specific symbol demangler.  */
+  go_sniff_from_mangled_name,
   NULL,				/* Language specific
 				   class_name_from_physname.  */
   go_op_print_tab,		/* Expression operators for printing.  */
@@ -637,9 +648,9 @@ build_go_types (struct gdbarch *gdbarch)
   builtin_go_type->builtin_uint64
     = arch_integer_type (gdbarch, 64, 1, "uint64");
   builtin_go_type->builtin_float32
-    = arch_float_type (gdbarch, 32, "float32", NULL);
+    = arch_float_type (gdbarch, 32, "float32", floatformats_ieee_single);
   builtin_go_type->builtin_float64
-    = arch_float_type (gdbarch, 64, "float64", NULL);
+    = arch_float_type (gdbarch, 64, "float64", floatformats_ieee_double);
   builtin_go_type->builtin_complex64
     = arch_complex_type (gdbarch, "complex64",
 			 builtin_go_type->builtin_float32);
@@ -655,7 +666,7 @@ static struct gdbarch_data *go_type_data
 const struct builtin_go_type *
 builtin_go_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, go_type_data);
+  return (const struct builtin_go_type *) gdbarch_data (gdbarch, go_type_data);
 }
 
 extern initialize_file_ftype _initialize_go_language;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-lang.h ./gdb/go-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Go language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -60,7 +60,7 @@ enum go_type
 
 extern int go_parse (struct parser_state *);
 
-extern void go_error (char *);
+extern void go_yyerror (char *);
 
 /* Defined in go-lang.c.  */
 
@@ -84,10 +84,10 @@ extern void go_print_type (struct type *
 
 /* Defined in go-valprint.c.  */
 
-extern void go_val_print (struct type *type, const gdb_byte *valaddr,
+extern void go_val_print (struct type *type,
 			  int embedded_offset, CORE_ADDR address,
 			  struct ui_file *stream, int recurse,
-			  const struct value *val,
+			  struct value *val,
 			  const struct value_print_options *options);
 
 #endif /* !defined (GO_LANG_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-typeprint.c ./gdb/go-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Go types for GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ go_print_type (struct type *type, const 
 {
   /* Borrowed from c-typeprint.c.  */
   if (show > 0)
-    CHECK_TYPEDEF (type);
+    type = check_typedef (type);
 
   /* Print the type of "abc" as "string", not char[4].  */
   if (TYPE_CODE (type) == TYPE_CODE_ARRAY
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-valprint.c ./gdb/go-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/go-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/go-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Go values for GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,10 +36,10 @@
    gdb_assert (go_classify_struct_type (type) == GO_TYPE_STRING).  */
 
 static void
-print_go_string (struct type *type, const gdb_byte *valaddr,
-		 int embedded_offset, CORE_ADDR address,
+print_go_string (struct type *type,
+		 LONGEST embedded_offset, CORE_ADDR address,
 		 struct ui_file *stream, int recurse,
-		 const struct value *val,
+		 struct value *val,
 		 const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
@@ -51,8 +51,8 @@ print_go_string (struct type *type, cons
      unpack_value_field_as_pointer.  Do this until we can get
      unpack_value_field_as_pointer.  */
   LONGEST addr;
+  const gdb_byte *valaddr = value_contents_for_printing (val);
 
-  gdb_assert (valaddr == value_contents_for_printing_const (val));
 
   if (! unpack_value_field_as_long (type, valaddr, embedded_offset, 0,
 				    val, &addr))
@@ -86,12 +86,12 @@ print_go_string (struct type *type, cons
 /* Implements the la_val_print routine for language Go.  */
 
 void
-go_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+go_val_print (struct type *type, int embedded_offset,
 	      CORE_ADDR address, struct ui_file *stream, int recurse,
-	      const struct value *val,
+	      struct value *val,
 	      const struct value_print_options *options)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -104,7 +104,7 @@ go_val_print (struct type *type, const g
 	    case GO_TYPE_STRING:
 	      if (! options->raw)
 		{
-		  print_go_string (type, valaddr, embedded_offset, address,
+		  print_go_string (type, embedded_offset, address,
 				   stream, recurse, val, options);
 		  return;
 		}
@@ -116,7 +116,7 @@ go_val_print (struct type *type, const g
 	/* Fall through.  */
 
       default:
-	c_val_print (type, valaddr, embedded_offset, address, stream,
+	c_val_print (type, embedded_offset, address, stream,
 		     recurse, val, options);
 	break;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gregset.h ./gdb/gregset.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/gregset.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/gregset.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface for functions using gregset and fpregset types.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile.c ./gdb/guile/guile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/guile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General GDB/Guile code.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,7 @@
 #include "cli/cli-utils.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "interps.h"
+#include "top.h"
 #include "extension-priv.h"
 #include "utils.h"
 #include "version.h"
@@ -77,7 +77,7 @@ extern const struct extension_language_o
 
 /* The main struct describing GDB's interface to the Guile
    extension language.  */
-EXPORTED_CONST struct extension_language_defn extension_language_guile =
+extern const struct extension_language_defn extension_language_guile =
 {
   EXT_LANG_GUILE,
   "guile",
@@ -155,7 +155,6 @@ const struct extension_language_ops guil
   gdbscm_breakpoint_cond_says_stop,
 
   NULL, /* gdbscm_check_quit_flag, */
-  NULL, /* gdbscm_clear_quit_flag, */
   NULL, /* gdbscm_set_quit_flag, */
 };
 
@@ -166,8 +165,8 @@ guile_repl_command (char *arg, int from_
 {
   struct cleanup *cleanup;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  cleanup = make_cleanup_restore_integer (&current_ui->async);
+  current_ui->async = 0;
 
   arg = skip_spaces (arg);
 
@@ -199,8 +198,8 @@ guile_command (char *arg, int from_tty)
 {
   struct cleanup *cleanup;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  cleanup = make_cleanup_restore_integer (&current_ui->async);
+  current_ui->async = 0;
 
   arg = skip_spaces (arg);
 
@@ -241,7 +240,7 @@ compute_scheme_string (struct command_li
   for (iter = l; iter; iter = iter->next)
     size += strlen (iter->line) + 1;
 
-  script = xmalloc (size + 1);
+  script = (char *) xmalloc (size + 1);
   here = 0;
   for (iter = l; iter; iter = iter->next)
     {
@@ -312,7 +311,6 @@ gdbscm_execute_gdb_command (SCM command_
   int from_tty = 0, to_string = 0;
   const SCM keywords[] = { from_tty_keyword, to_string_keyword, SCM_BOOL_F };
   char *command;
-  char *result = NULL;
   struct cleanup *cleanups;
   struct gdb_exception except = exception_none;
 
@@ -325,21 +323,20 @@ gdbscm_execute_gdb_command (SCM command_
      executed.  */
   cleanups = make_cleanup (xfree, command);
 
+  std::string to_string_res;
+
   TRY
     {
       struct cleanup *inner_cleanups;
 
-      inner_cleanups = make_cleanup_restore_integer (&interpreter_async);
-      interpreter_async = 0;
+      inner_cleanups = make_cleanup_restore_integer (&current_ui->async);
+      current_ui->async = 0;
 
-      prevent_dont_repeat ();
+      scoped_restore preventer = prevent_dont_repeat ();
       if (to_string)
-	result = execute_command_to_string (command, from_tty);
+	to_string_res = execute_command_to_string (command, from_tty);
       else
-	{
-	  execute_command (command, from_tty);
-	  result = NULL;
-	}
+	execute_command (command, from_tty);
 
       /* Do any commands attached to breakpoint we stopped at.  */
       bpstat_do_actions ();
@@ -355,12 +352,8 @@ gdbscm_execute_gdb_command (SCM command_
   do_cleanups (cleanups);
   GDBSCM_HANDLE_GDB_EXCEPTION (except);
 
-  if (result)
-    {
-      SCM r = gdbscm_scm_from_c_string (result);
-      xfree (result);
-      return r;
-    }
+  if (to_string)
+    return gdbscm_scm_from_c_string (to_string_res.c_str ());
   return SCM_UNSPECIFIED;
 }
 
@@ -478,7 +471,7 @@ info_guile_command (char *args, int from
 
 static const scheme_function misc_guile_functions[] =
 {
-  { "execute", 1, 0, 1, gdbscm_execute_gdb_command,
+  { "execute", 1, 0, 1, as_a_scm_t_subr (gdbscm_execute_gdb_command),
   "\
 Execute the given GDB command.\n\
 \n\
@@ -491,23 +484,24 @@ Execute the given GDB command.\n\
   Returns: The result of the command if #:to-string is true.\n\
     Otherwise returns unspecified." },
 
-  { "data-directory", 0, 0, 0, gdbscm_data_directory,
+  { "data-directory", 0, 0, 0, as_a_scm_t_subr (gdbscm_data_directory),
     "\
 Return the name of GDB's data directory." },
 
-  { "guile-data-directory", 0, 0, 0, gdbscm_guile_data_directory,
+  { "guile-data-directory", 0, 0, 0,
+    as_a_scm_t_subr (gdbscm_guile_data_directory),
     "\
 Return the name of the Guile directory within GDB's data directory." },
 
-  { "gdb-version", 0, 0, 0, gdbscm_gdb_version,
+  { "gdb-version", 0, 0, 0, as_a_scm_t_subr (gdbscm_gdb_version),
     "\
 Return GDB's version string." },
 
-  { "host-config", 0, 0, 0, gdbscm_host_config,
+  { "host-config", 0, 0, 0, as_a_scm_t_subr (gdbscm_host_config),
     "\
 Return the name of the host configuration." },
 
-  { "target-config", 0, 0, 0, gdbscm_target_config,
+  { "target-config", 0, 0, 0, as_a_scm_t_subr (gdbscm_target_config),
     "\
 Return the name of the target configuration." },
 
@@ -628,9 +622,9 @@ initialize_scheme_side (void)
   char *boot_scm_path;
   char *msg;
 
-  guile_datadir = concat (gdb_datadir, SLASH_STRING, "guile", NULL);
+  guile_datadir = concat (gdb_datadir, SLASH_STRING, "guile", (char *) NULL);
   boot_scm_path = concat (guile_datadir, SLASH_STRING, "gdb",
-			  SLASH_STRING, boot_scm_filename, NULL);
+			  SLASH_STRING, boot_scm_filename, (char *) NULL);
 
   scm_c_catch (SCM_BOOL_T, boot_guile_support, boot_scm_path,
 	       handle_boot_error, boot_scm_path, NULL, NULL);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile.h ./gdb/guile/guile.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/guile.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General GDB/Scheme code.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile-internal.h ./gdb/guile/guile-internal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/guile-internal.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/guile-internal.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Internal header for GDB/Scheme code.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,6 +50,42 @@ typedef struct
 
 #define END_VARIABLES { NULL, SCM_BOOL_F, NULL }
 
+/* Although scm_t_subr is meant to hold a function pointer, at least
+   in some versions of guile, it is actually a typedef to "void *".
+   That means that in C++, an explicit cast is necessary to convert
+   function pointer to scm_t_subr.  But a cast also makes it possible
+   to pass function pointers with the wrong type by mistake.  So
+   instead of adding such casts throughout, we use 'as_a_scm_t_subr'
+   to do the conversion, which (only) has overloads for function
+   pointer types that are valid.
+
+   See https://lists.gnu.org/archive/html/guile-devel/2013-03/msg00001.html.
+*/
+
+static inline scm_t_subr
+as_a_scm_t_subr (SCM (*func) (void))
+{
+  return (scm_t_subr) func;
+}
+
+static inline scm_t_subr
+as_a_scm_t_subr (SCM (*func) (SCM))
+{
+  return (scm_t_subr) func;
+}
+
+static inline scm_t_subr
+as_a_scm_t_subr (SCM (*func) (SCM, SCM))
+{
+  return (scm_t_subr) func;
+}
+
+static inline scm_t_subr
+as_a_scm_t_subr (SCM (*func) (SCM, SCM, SCM))
+{
+  return (scm_t_subr) func;
+}
+
 /* Scheme functions to define during initialization.  */
 
 typedef struct
@@ -340,7 +376,7 @@ extern void gdbscm_memory_error (const c
 
 /* scm-safe-call.c */
 
-extern void *gdbscm_with_guile (void *(*func) (void *), void *data);
+extern const char *gdbscm_with_guile (const char *(*func) (void *), void *data);
 
 extern SCM gdbscm_call_guile (SCM (*func) (void *), void *data,
 			      excp_matcher_func *ok_excps);
@@ -561,10 +597,10 @@ extern void gdbscm_preserve_values
 
 extern enum ext_lang_rc gdbscm_apply_val_pretty_printer
   (const struct extension_language_defn *,
-   struct type *type, const gdb_byte *valaddr,
-   int embedded_offset, CORE_ADDR address,
+   struct type *type,
+   LONGEST embedded_offset, CORE_ADDR address,
    struct ui_file *stream, int recurse,
-   const struct value *val,
+   struct value *val,
    const struct value_print_options *options,
    const struct language_defn *language);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/boot.scm ./gdb/guile/lib/gdb/boot.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/boot.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/boot.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; Bootstrap the Scheme side of the gdb module.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/experimental.scm ./gdb/guile/lib/gdb/experimental.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/experimental.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/experimental.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 ;; Various experimental utilities.
 ;; Anything in this file can change or disappear.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/init.scm ./gdb/guile/lib/gdb/init.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/init.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/init.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; Scheme side of the gdb module.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/iterator.scm ./gdb/guile/lib/gdb/iterator.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/iterator.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/iterator.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 ;; Iteration utilities.
 ;; Anything in this file can change or disappear.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/printing.scm ./gdb/guile/lib/gdb/printing.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/printing.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/printing.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; Additional pretty-printer support.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/support.scm ./gdb/guile/lib/gdb/support.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/support.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/support.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; Internal support routines.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/types.scm ./gdb/guile/lib/gdb/types.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb/types.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb/types.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 ;; Type utilities.
-;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb.scm ./gdb/guile/lib/gdb.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/lib/gdb.scm	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/lib/gdb.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; Scheme side of the gdb module.
 ;;
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GDB.
 ;;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-arch.c ./gdb/guile/scm-arch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-arch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-arch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to architecture.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -495,11 +495,11 @@ gdbscm_arch_uint64_type (SCM self)
 
 static const scheme_function arch_functions[] =
 {
-  { "arch?", 1, 0, 0, gdbscm_arch_p,
+  { "arch?", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_p),
     "\
 Return #t if the object is a <gdb:arch> object." },
 
-  { "current-arch", 0, 0, 0, gdbscm_current_arch,
+  { "current-arch", 0, 0, 0, as_a_scm_t_subr (gdbscm_current_arch),
     "\
 Return the <gdb:arch> object representing the architecture of the\n\
 currently selected stack frame, if there is one, or the architecture of the\n\
@@ -507,135 +507,136 @@ current target if there isn't.\n\
 \n\
   Arguments: none" },
 
-  { "arch-name", 1, 0, 0, gdbscm_arch_name,
+  { "arch-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_name),
     "\
 Return the name of the architecture." },
 
-  { "arch-charset", 1, 0, 0, gdbscm_arch_charset,
+  { "arch-charset", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_charset),
   "\
 Return name of target character set as a string." },
 
-  { "arch-wide-charset", 1, 0, 0, gdbscm_arch_wide_charset,
+  { "arch-wide-charset", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_wide_charset),
   "\
 Return name of target wide character set as a string." },
 
-  { "arch-void-type", 1, 0, 0, gdbscm_arch_void_type,
+  { "arch-void-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_void_type),
     "\
 Return the <gdb:type> object for the \"void\" type\n\
 of the architecture." },
 
-  { "arch-char-type", 1, 0, 0, gdbscm_arch_char_type,
+  { "arch-char-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_char_type),
     "\
 Return the <gdb:type> object for the \"char\" type\n\
 of the architecture." },
 
-  { "arch-short-type", 1, 0, 0, gdbscm_arch_short_type,
+  { "arch-short-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_short_type),
     "\
 Return the <gdb:type> object for the \"short\" type\n\
 of the architecture." },
 
-  { "arch-int-type", 1, 0, 0, gdbscm_arch_int_type,
+  { "arch-int-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_int_type),
     "\
 Return the <gdb:type> object for the \"int\" type\n\
 of the architecture." },
 
-  { "arch-long-type", 1, 0, 0, gdbscm_arch_long_type,
+  { "arch-long-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_long_type),
     "\
 Return the <gdb:type> object for the \"long\" type\n\
 of the architecture." },
 
-  { "arch-schar-type", 1, 0, 0, gdbscm_arch_schar_type,
+  { "arch-schar-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_schar_type),
     "\
 Return the <gdb:type> object for the \"signed char\" type\n\
 of the architecture." },
 
-  { "arch-uchar-type", 1, 0, 0, gdbscm_arch_uchar_type,
+  { "arch-uchar-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uchar_type),
     "\
 Return the <gdb:type> object for the \"unsigned char\" type\n\
 of the architecture." },
 
-  { "arch-ushort-type", 1, 0, 0, gdbscm_arch_ushort_type,
+  { "arch-ushort-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_ushort_type),
     "\
 Return the <gdb:type> object for the \"unsigned short\" type\n\
 of the architecture." },
 
-  { "arch-uint-type", 1, 0, 0, gdbscm_arch_uint_type,
+  { "arch-uint-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uint_type),
     "\
 Return the <gdb:type> object for the \"unsigned int\" type\n\
 of the architecture." },
 
-  { "arch-ulong-type", 1, 0, 0, gdbscm_arch_ulong_type,
+  { "arch-ulong-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_ulong_type),
     "\
 Return the <gdb:type> object for the \"unsigned long\" type\n\
 of the architecture." },
 
-  { "arch-float-type", 1, 0, 0, gdbscm_arch_float_type,
+  { "arch-float-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_float_type),
     "\
 Return the <gdb:type> object for the \"float\" type\n\
 of the architecture." },
 
-  { "arch-double-type", 1, 0, 0, gdbscm_arch_double_type,
+  { "arch-double-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_double_type),
     "\
 Return the <gdb:type> object for the \"double\" type\n\
 of the architecture." },
 
-  { "arch-longdouble-type", 1, 0, 0, gdbscm_arch_longdouble_type,
+  { "arch-longdouble-type", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_arch_longdouble_type),
     "\
 Return the <gdb:type> object for the \"long double\" type\n\
 of the architecture." },
 
-  { "arch-bool-type", 1, 0, 0, gdbscm_arch_bool_type,
+  { "arch-bool-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_bool_type),
     "\
 Return the <gdb:type> object for the \"bool\" type\n\
 of the architecture." },
 
-  { "arch-longlong-type", 1, 0, 0, gdbscm_arch_longlong_type,
+  { "arch-longlong-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_longlong_type),
     "\
 Return the <gdb:type> object for the \"long long\" type\n\
 of the architecture." },
 
   { "arch-ulonglong-type", 1, 0, 0,
-    gdbscm_arch_ulonglong_type,
+    as_a_scm_t_subr (gdbscm_arch_ulonglong_type),
     "\
 Return the <gdb:type> object for the \"unsigned long long\" type\n\
 of the architecture." },
 
-  { "arch-int8-type", 1, 0, 0, gdbscm_arch_int8_type,
+  { "arch-int8-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_int8_type),
     "\
 Return the <gdb:type> object for the \"int8\" type\n\
 of the architecture." },
 
-  { "arch-uint8-type", 1, 0, 0, gdbscm_arch_uint8_type,
+  { "arch-uint8-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uint8_type),
     "\
 Return the <gdb:type> object for the \"uint8\" type\n\
 of the architecture." },
 
-  { "arch-int16-type", 1, 0, 0, gdbscm_arch_int16_type,
+  { "arch-int16-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_int16_type),
     "\
 Return the <gdb:type> object for the \"int16\" type\n\
 of the architecture." },
 
-  { "arch-uint16-type", 1, 0, 0, gdbscm_arch_uint16_type,
+  { "arch-uint16-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uint16_type),
     "\
 Return the <gdb:type> object for the \"uint16\" type\n\
 of the architecture." },
 
-  { "arch-int32-type", 1, 0, 0, gdbscm_arch_int32_type,
+  { "arch-int32-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_int32_type),
     "\
 Return the <gdb:type> object for the \"int32\" type\n\
 of the architecture." },
 
-  { "arch-uint32-type", 1, 0, 0, gdbscm_arch_uint32_type,
+  { "arch-uint32-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uint32_type),
     "\
 Return the <gdb:type> object for the \"uint32\" type\n\
 of the architecture." },
 
-  { "arch-int64-type", 1, 0, 0, gdbscm_arch_int64_type,
+  { "arch-int64-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_int64_type),
     "\
 Return the <gdb:type> object for the \"int64\" type\n\
 of the architecture." },
 
-  { "arch-uint64-type", 1, 0, 0, gdbscm_arch_uint64_type,
+  { "arch-uint64-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_arch_uint64_type),
     "\
 Return the <gdb:type> object for the \"uint64\" type\n\
 of the architecture." },
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-auto-load.c ./gdb/guile/scm-auto-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-auto-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-auto-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB routines for supporting auto-loaded Guile scripts.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-block.c ./gdb/guile/scm-block.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-block.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-block.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to blocks.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -85,7 +85,7 @@ static const struct objfile_data *bkscm_
 static hashval_t
 bkscm_hash_block_smob (const void *p)
 {
-  const block_smob *b_smob = p;
+  const block_smob *b_smob = (const block_smob *) p;
 
   return htab_hash_pointer (b_smob->block);
 }
@@ -95,8 +95,8 @@ bkscm_hash_block_smob (const void *p)
 static int
 bkscm_eq_block_smob (const void *ap, const void *bp)
 {
-  const block_smob *a = ap;
-  const block_smob *b = bp;
+  const block_smob *a = (const block_smob *) ap;
+  const block_smob *b = (const block_smob *) bp;
 
   return (a->block == b->block
 	  && a->block != NULL);
@@ -108,7 +108,7 @@ bkscm_eq_block_smob (const void *ap, con
 static htab_t
 bkscm_objfile_block_map (struct objfile *objfile)
 {
-  htab_t htab = objfile_data (objfile, bkscm_objfile_data_key);
+  htab_t htab = (htab_t) objfile_data (objfile, bkscm_objfile_data_key);
 
   if (htab == NULL)
     {
@@ -347,7 +347,7 @@ bkscm_mark_block_invalid (void **slot, v
 static void
 bkscm_del_objfile_blocks (struct objfile *objfile, void *datum)
 {
-  htab_t htab = datum;
+  htab_t htab = (htab_t) datum;
 
   if (htab != NULL)
     {
@@ -709,61 +709,63 @@ gdbscm_lookup_block (SCM pc_scm)
 
 static const scheme_function block_functions[] =
 {
-  { "block?", 1, 0, 0, gdbscm_block_p,
+  { "block?", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_p),
     "\
 Return #t if the object is a <gdb:block> object." },
 
-  { "block-valid?", 1, 0, 0, gdbscm_block_valid_p,
+  { "block-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_valid_p),
     "\
 Return #t if the block is valid.\n\
 A block becomes invalid when its objfile is freed." },
 
-  { "block-start", 1, 0, 0, gdbscm_block_start,
+  { "block-start", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_start),
     "\
 Return the start address of the block." },
 
-  { "block-end", 1, 0, 0, gdbscm_block_end,
+  { "block-end", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_end),
     "\
 Return the end address of the block." },
 
-  { "block-function", 1, 0, 0, gdbscm_block_function,
+  { "block-function", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_function),
     "\
 Return the gdb:symbol object of the function containing the block\n\
 or #f if the block does not live in any function." },
 
-  { "block-superblock", 1, 0, 0, gdbscm_block_superblock,
+  { "block-superblock", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_superblock),
     "\
 Return the superblock (parent block) of the block." },
 
-  { "block-global-block", 1, 0, 0, gdbscm_block_global_block,
+  { "block-global-block", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_global_block),
     "\
 Return the global block of the block." },
 
-  { "block-static-block", 1, 0, 0, gdbscm_block_static_block,
+  { "block-static-block", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_static_block),
     "\
 Return the static block of the block." },
 
-  { "block-global?", 1, 0, 0, gdbscm_block_global_p,
+  { "block-global?", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_global_p),
     "\
 Return #t if block is a global block." },
 
-  { "block-static?", 1, 0, 0, gdbscm_block_static_p,
+  { "block-static?", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_static_p),
     "\
 Return #t if block is a static block." },
 
-  { "block-symbols", 1, 0, 0, gdbscm_block_symbols,
+  { "block-symbols", 1, 0, 0, as_a_scm_t_subr (gdbscm_block_symbols),
     "\
 Return a list of all symbols (as <gdb:symbol> objects) in the block." },
 
-  { "make-block-symbols-iterator", 1, 0, 0, gdbscm_make_block_syms_iter,
+  { "make-block-symbols-iterator", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_make_block_syms_iter),
     "\
 Return a <gdb:iterator> object for iterating over all symbols in the block." },
 
-  { "block-symbols-progress?", 1, 0, 0, bkscm_block_syms_progress_p,
+  { "block-symbols-progress?", 1, 0, 0,
+    as_a_scm_t_subr (bkscm_block_syms_progress_p),
     "\
 Return #t if the object is a <gdb:block-symbols-progress> object." },
 
-  { "lookup-block", 1, 0, 0, gdbscm_lookup_block,
+  { "lookup-block", 1, 0, 0, as_a_scm_t_subr (gdbscm_lookup_block),
     "\
 Return the innermost GDB block containing the address or #f if none found.\n\
 \n\
@@ -792,7 +794,7 @@ gdbscm_initialize_blocks (void)
   /* This function is "private".  */
   bkscm_next_symbol_x_proc
     = scm_c_define_gsubr ("%block-next-symbol!", 1, 0, 0,
-			  gdbscm_block_next_symbol_x);
+			  as_a_scm_t_subr (gdbscm_block_next_symbol_x));
   scm_set_procedure_property_x (bkscm_next_symbol_x_proc,
 				gdbscm_documentation_symbol,
 				gdbscm_scm_from_c_string ("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-breakpoint.c ./gdb/guile/scm-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-breakpoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to breakpoints.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,7 @@
 #include "arch-utils.h"
 #include "language.h"
 #include "guile-internal.h"
+#include "location.h"
 
 /* The <gdb:breakpoint> smob.
    N.B.: The name of this struct is known to breakpoint.h.
@@ -173,6 +174,8 @@ bpscm_print_breakpoint_smob (SCM self, S
   /* Careful, the breakpoint may be invalid.  */
   if (b != NULL)
     {
+      const char *str;
+
       gdbscm_printf (port, " %s %s %s",
 		     bpscm_type_to_string (b->type),
 		     bpscm_enable_state_to_string (b->enable_state),
@@ -181,8 +184,9 @@ bpscm_print_breakpoint_smob (SCM self, S
       gdbscm_printf (port, " hit:%d", b->hit_count);
       gdbscm_printf (port, " ignore:%d", b->ignore_count);
 
-      if (b->addr_string != NULL)
-	gdbscm_printf (port, " @%s", b->addr_string);
+      str = event_location_to_string (b->location);
+      if (str != NULL)
+	gdbscm_printf (port, " @%s", str);
     }
 
   scm_puts (">", port);
@@ -340,8 +344,8 @@ gdbscm_make_breakpoint (SCM location_scm
   char *s;
   char *location;
   int type_arg_pos = -1, access_type_arg_pos = -1, internal_arg_pos = -1;
-  int type = bp_breakpoint;
-  int access_type = hw_write;
+  enum bptype type = bp_breakpoint;
+  enum target_hw_bp_type access_type = hw_write;
   int internal = 0;
   SCM result;
   breakpoint_smob *bp_smob;
@@ -408,6 +412,9 @@ gdbscm_register_breakpoint_x (SCM self)
   breakpoint_smob *bp_smob
     = bpscm_get_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   struct gdb_exception except = exception_none;
+  char *location, *copy;
+  struct event_location *eloc;
+  struct cleanup *cleanup;
 
   /* We only support registering breakpoints created with make-breakpoint.  */
   if (!bp_smob->is_scheme_bkpt)
@@ -417,10 +424,13 @@ gdbscm_register_breakpoint_x (SCM self)
     scm_misc_error (FUNC_NAME, _("breakpoint is already registered"), SCM_EOL);
 
   pending_breakpoint_scm = self;
+  location = bp_smob->spec.location;
+  copy = skip_spaces (location);
+  eloc = string_to_event_location_basic (&copy, current_language);
+  cleanup = make_cleanup_delete_event_location (eloc);
 
   TRY
     {
-      char *location = bp_smob->spec.location;
       int internal = bp_smob->spec.is_internal;
 
       switch (bp_smob->spec.type)
@@ -428,7 +438,7 @@ gdbscm_register_breakpoint_x (SCM self)
 	case bp_breakpoint:
 	  {
 	    create_breakpoint (get_current_arch (),
-			       location, NULL, -1, NULL,
+			       eloc, NULL, -1, NULL,
 			       0,
 			       0, bp_breakpoint,
 			       0,
@@ -464,6 +474,7 @@ gdbscm_register_breakpoint_x (SCM self)
   /* Ensure this gets reset, even if there's an error.  */
   pending_breakpoint_scm = SCM_BOOL_F;
   GDBSCM_HANDLE_GDB_EXCEPTION (except);
+  do_cleanups (cleanup);
 
   return SCM_UNSPECIFIED;
 }
@@ -498,7 +509,7 @@ gdbscm_delete_breakpoint_x (SCM self)
 static int
 bpscm_build_bp_list (struct breakpoint *bp, void *arg)
 {
-  SCM *list = arg;
+  SCM *list = (SCM *) arg;
   breakpoint_smob *bp_smob = bp->scm_bp_object;
 
   /* Lazily create wrappers for breakpoints created outside Scheme.  */
@@ -734,7 +745,7 @@ gdbscm_set_breakpoint_thread_x (SCM self
   if (scm_is_signed_integer (newvalue, LONG_MIN, LONG_MAX))
     {
       id = scm_to_long (newvalue);
-      if (! valid_thread_id (id))
+      if (!valid_global_thread_id (id))
 	{
 	  gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG2, newvalue,
 				     _("invalid thread id"));
@@ -819,12 +830,12 @@ gdbscm_breakpoint_location (SCM self)
 {
   breakpoint_smob *bp_smob
     = bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
-  char *str;
+  const char *str;
 
   if (bp_smob->bp->type != bp_breakpoint)
     return SCM_BOOL_F;
 
-  str = bp_smob->bp->addr_string;
+  str = event_location_to_string (bp_smob->bp->location);
   if (! str)
     str = "";
 
@@ -945,7 +956,7 @@ gdbscm_set_breakpoint_stop_x (SCM self, 
 			" this breakpoint."),
 		      ext_lang_capitalized_name (extlang));
 
-      scm_dynwind_begin (0);
+      scm_dynwind_begin ((scm_t_dynwind_flags) 0);
       gdbscm_dynwind_xfree (error_text);
       gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG1, self, error_text);
       /* The following line, while unnecessary, is present for completeness
@@ -967,37 +978,29 @@ gdbscm_breakpoint_commands (SCM self)
     = bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   struct breakpoint *bp;
   long length;
-  struct ui_file *string_file;
-  struct cleanup *chain;
   SCM result;
-  char *cmdstr;
 
   bp = bp_smob->bp;
 
   if (bp->commands == NULL)
     return SCM_BOOL_F;
 
-  string_file = mem_fileopen ();
-  chain = make_cleanup_ui_file_delete (string_file);
+  string_file buf;
 
-  ui_out_redirect (current_uiout, string_file);
+  current_uiout->redirect (&buf);
   TRY
     {
       print_command_lines (current_uiout, breakpoint_commands (bp), 0);
     }
-  ui_out_redirect (current_uiout, NULL);
+  current_uiout->redirect (NULL);
   CATCH (except, RETURN_MASK_ALL)
     {
-      do_cleanups (chain);
       gdbscm_throw_gdb_exception (except);
     }
   END_CATCH
 
-  cmdstr = ui_file_xstrdup (string_file, &length);
-  make_cleanup (xfree, cmdstr);
-  result = gdbscm_scm_from_c_string (cmdstr);
+  result = gdbscm_scm_from_c_string (buf.c_str ());
 
-  do_cleanups (chain);
   return result;
 }
 
@@ -1158,7 +1161,7 @@ static const scheme_integer_constant bre
 
 static const scheme_function breakpoint_functions[] =
 {
-  { "make-breakpoint", 1, 0, 1, gdbscm_make_breakpoint,
+  { "make-breakpoint", 1, 0, 1, as_a_scm_t_subr (gdbscm_make_breakpoint),
     "\
 Create a GDB breakpoint object.\n\
 \n\
@@ -1167,128 +1170,142 @@ Create a GDB breakpoint object.\n\
   Returns:\n\
     <gdb:breakpoint object" },
 
-  { "register-breakpoint!", 1, 0, 0, gdbscm_register_breakpoint_x,
+  { "register-breakpoint!", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_register_breakpoint_x),
     "\
 Register a <gdb:breakpoint> object with GDB." },
 
-  { "delete-breakpoint!", 1, 0, 0, gdbscm_delete_breakpoint_x,
+  { "delete-breakpoint!", 1, 0, 0, as_a_scm_t_subr (gdbscm_delete_breakpoint_x),
     "\
 Delete the breakpoint from GDB." },
 
-  { "breakpoints", 0, 0, 0, gdbscm_breakpoints,
+  { "breakpoints", 0, 0, 0, as_a_scm_t_subr (gdbscm_breakpoints),
     "\
 Return a list of all GDB breakpoints.\n\
 \n\
   Arguments: none" },
 
-  { "breakpoint?", 1, 0, 0, gdbscm_breakpoint_p,
+  { "breakpoint?", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_p),
     "\
 Return #t if the object is a <gdb:breakpoint> object." },
 
-  { "breakpoint-valid?", 1, 0, 0, gdbscm_breakpoint_valid_p,
+  { "breakpoint-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_valid_p),
     "\
 Return #t if the breakpoint has not been deleted from GDB." },
 
-  { "breakpoint-number", 1, 0, 0, gdbscm_breakpoint_number,
+  { "breakpoint-number", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_number),
     "\
 Return the breakpoint's number." },
 
-  { "breakpoint-type", 1, 0, 0, gdbscm_breakpoint_type,
+  { "breakpoint-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_type),
     "\
 Return the type of the breakpoint." },
 
-  { "breakpoint-visible?", 1, 0, 0, gdbscm_breakpoint_visible,
+  { "breakpoint-visible?", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_visible),
     "\
 Return #t if the breakpoint is visible to the user." },
 
-  { "breakpoint-location", 1, 0, 0, gdbscm_breakpoint_location,
+  { "breakpoint-location", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_location),
     "\
 Return the location of the breakpoint as specified by the user." },
 
-  { "breakpoint-expression", 1, 0, 0, gdbscm_breakpoint_expression,
+  { "breakpoint-expression", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_expression),
     "\
 Return the expression of the breakpoint as specified by the user.\n\
 Valid for watchpoints only, returns #f for non-watchpoints." },
 
-  { "breakpoint-enabled?", 1, 0, 0, gdbscm_breakpoint_enabled_p,
+  { "breakpoint-enabled?", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_enabled_p),
     "\
 Return #t if the breakpoint is enabled." },
 
-  { "set-breakpoint-enabled!", 2, 0, 0, gdbscm_set_breakpoint_enabled_x,
+  { "set-breakpoint-enabled!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_enabled_x),
     "\
 Set the breakpoint's enabled state.\n\
 \n\
   Arguments: <gdb:breakpoint> boolean" },
 
-  { "breakpoint-silent?", 1, 0, 0, gdbscm_breakpoint_silent_p,
+  { "breakpoint-silent?", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_silent_p),
     "\
 Return #t if the breakpoint is silent." },
 
-  { "set-breakpoint-silent!", 2, 0, 0, gdbscm_set_breakpoint_silent_x,
+  { "set-breakpoint-silent!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_silent_x),
     "\
 Set the breakpoint's silent state.\n\
 \n\
   Arguments: <gdb:breakpoint> boolean" },
 
-  { "breakpoint-ignore-count", 1, 0, 0, gdbscm_breakpoint_ignore_count,
+  { "breakpoint-ignore-count", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_ignore_count),
     "\
 Return the breakpoint's \"ignore\" count." },
 
   { "set-breakpoint-ignore-count!", 2, 0, 0,
-    gdbscm_set_breakpoint_ignore_count_x,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_ignore_count_x),
     "\
 Set the breakpoint's \"ignore\" count.\n\
 \n\
   Arguments: <gdb:breakpoint> count" },
 
-  { "breakpoint-hit-count", 1, 0, 0, gdbscm_breakpoint_hit_count,
+  { "breakpoint-hit-count", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_hit_count),
     "\
 Return the breakpoint's \"hit\" count." },
 
-  { "set-breakpoint-hit-count!", 2, 0, 0, gdbscm_set_breakpoint_hit_count_x,
+  { "set-breakpoint-hit-count!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_hit_count_x),
     "\
 Set the breakpoint's \"hit\" count.  The value must be zero.\n\
 \n\
   Arguments: <gdb:breakpoint> 0" },
 
-  { "breakpoint-thread", 1, 0, 0, gdbscm_breakpoint_thread,
+  { "breakpoint-thread", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_thread),
     "\
-Return the breakpoint's thread id or #f if there isn't one." },
+Return the breakpoint's global thread id or #f if there isn't one." },
 
-  { "set-breakpoint-thread!", 2, 0, 0, gdbscm_set_breakpoint_thread_x,
+  { "set-breakpoint-thread!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_thread_x),
     "\
-Set the thread id for this breakpoint.\n\
+Set the global thread id for this breakpoint.\n\
 \n\
-  Arguments: <gdb:breakpoint> thread-id" },
+  Arguments: <gdb:breakpoint> global-thread-id" },
 
-  { "breakpoint-task", 1, 0, 0, gdbscm_breakpoint_task,
+  { "breakpoint-task", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_task),
     "\
 Return the breakpoint's Ada task-id or #f if there isn't one." },
 
-  { "set-breakpoint-task!", 2, 0, 0, gdbscm_set_breakpoint_task_x,
+  { "set-breakpoint-task!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_task_x),
     "\
 Set the breakpoint's Ada task-id.\n\
 \n\
   Arguments: <gdb:breakpoint> task-id" },
 
-  { "breakpoint-condition", 1, 0, 0, gdbscm_breakpoint_condition,
+  { "breakpoint-condition", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_condition),
     "\
 Return the breakpoint's condition as specified by the user.\n\
 Return #f if there isn't one." },
 
-  { "set-breakpoint-condition!", 2, 0, 0, gdbscm_set_breakpoint_condition_x,
+  { "set-breakpoint-condition!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_condition_x),
     "\
 Set the breakpoint's condition.\n\
 \n\
   Arguments: <gdb:breakpoint> condition\n\
     condition: a string" },
 
-  { "breakpoint-stop", 1, 0, 0, gdbscm_breakpoint_stop,
+  { "breakpoint-stop", 1, 0, 0, as_a_scm_t_subr (gdbscm_breakpoint_stop),
     "\
 Return the breakpoint's stop predicate.\n\
 Return #f if there isn't one." },
 
-  { "set-breakpoint-stop!", 2, 0, 0, gdbscm_set_breakpoint_stop_x,
+  { "set-breakpoint-stop!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_breakpoint_stop_x),
     "\
 Set the breakpoint's stop predicate.\n\
 \n\
@@ -1296,7 +1313,8 @@ Set the breakpoint's stop predicate.\n\
     procedure: A procedure of one argument, the breakpoint.\n\
       Its result is true if program execution should stop." },
 
-  { "breakpoint-commands", 1, 0, 0, gdbscm_breakpoint_commands,
+  { "breakpoint-commands", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_breakpoint_commands),
     "\
 Return the breakpoint's commands." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-cmd.c ./gdb/guile/scm-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-cmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB commands implemented in Scheme.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -506,7 +506,7 @@ gdbscm_parse_command_name (const char *n
 		   || name[i - 1] == '_');
        --i)
     ;
-  result = xmalloc (lastchar - i + 2);
+  result = (char *) xmalloc (lastchar - i + 2);
   memcpy (result, &name[i], lastchar - i + 1);
   result[lastchar - i + 1] = '\0';
 
@@ -519,7 +519,7 @@ gdbscm_parse_command_name (const char *n
       return result;
     }
 
-  prefix_text = xmalloc (i + 2);
+  prefix_text = (char *) xmalloc (i + 2);
   memcpy (prefix_text, name, i + 1);
   prefix_text[i + 1] = '\0';
 
@@ -530,7 +530,7 @@ gdbscm_parse_command_name (const char *n
       msg = xstrprintf (_("could not find command prefix '%s'"), prefix_text);
       xfree (prefix_text);
       xfree (result);
-      scm_dynwind_begin (0);
+      scm_dynwind_begin ((scm_t_dynwind_flags) 0);
       gdbscm_dynwind_xfree (msg);
       gdbscm_out_of_range_error (func_name, arg_pos,
 				 gdbscm_scm_from_c_string (name), msg);
@@ -546,7 +546,7 @@ gdbscm_parse_command_name (const char *n
   msg = xstrprintf (_("'%s' is not a prefix command"), prefix_text);
   xfree (prefix_text);
   xfree (result);
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
   gdbscm_dynwind_xfree (msg);
   gdbscm_out_of_range_error (func_name, arg_pos,
 			     gdbscm_scm_from_c_string (name), msg);
@@ -601,7 +601,8 @@ char *
 gdbscm_canonicalize_command_name (const char *name, int want_trailing_space)
 {
   int i, out, seen_word;
-  char *result = scm_gc_malloc_pointerless (strlen (name) + 2, FUNC_NAME);
+  char *result
+    = (char *) scm_gc_malloc_pointerless (strlen (name) + 2, FUNC_NAME);
 
   i = out = seen_word = 0;
   while (name[i])
@@ -673,7 +674,7 @@ gdbscm_make_command (SCM name_scm, SCM r
   int doc_arg_pos = -1;
   char *s;
   char *name;
-  int command_class = no_class;
+  enum command_class command_class = no_class;
   SCM completer_class = SCM_BOOL_F;
   int is_prefix = 0;
   char *doc = NULL;
@@ -819,7 +820,7 @@ gdbscm_register_command_x (SCM self)
 
 static const scheme_function command_functions[] =
 {
-  { "make-command", 1, 0, 1, gdbscm_make_command,
+  { "make-command", 1, 0, 1, as_a_scm_t_subr (gdbscm_make_command),
     "\
 Make a GDB command object.\n\
 \n\
@@ -840,19 +841,19 @@ Make a GDB command object.\n\
     doc: The \"doc string\" of the command.\n\
   Returns: <gdb:command> object" },
 
-  { "register-command!", 1, 0, 0, gdbscm_register_command_x,
+  { "register-command!", 1, 0, 0, as_a_scm_t_subr (gdbscm_register_command_x),
     "\
 Register a <gdb:command> object with GDB." },
 
-  { "command?", 1, 0, 0, gdbscm_command_p,
+  { "command?", 1, 0, 0, as_a_scm_t_subr (gdbscm_command_p),
     "\
 Return #t if the object is a <gdb:command> object." },
 
-  { "command-valid?", 1, 0, 0, gdbscm_command_valid_p,
+  { "command-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_command_valid_p),
     "\
 Return #t if the <gdb:command> object is valid." },
 
-  { "dont-repeat", 1, 0, 0, gdbscm_dont_repeat,
+  { "dont-repeat", 1, 0, 0, as_a_scm_t_subr (gdbscm_dont_repeat),
     "\
 Prevent command repetition when user enters an empty line.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-disasm.c ./gdb/guile/scm-disasm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-disasm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-disasm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to architecture.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,11 +37,13 @@ static SCM address_symbol;
 static SCM asm_symbol;
 static SCM length_symbol;
 
-/* Struct used to pass "application data" in disassemble_info.  */
-
-struct gdbscm_disasm_data
+class gdbscm_disassembler : public gdb_disassembler
 {
-  struct gdbarch *gdbarch;
+public:
+  gdbscm_disassembler (struct gdbarch *gdbarch,
+		       struct ui_file *stream,
+		       SCM port, ULONGEST offset);
+
   SCM port;
   /* The offset of the address of the first instruction in PORT.  */
   ULONGEST offset;
@@ -55,7 +57,7 @@ struct gdbscm_disasm_read_data
   bfd_vma memaddr;
   bfd_byte *myaddr;
   unsigned int length;
-  struct disassemble_info *dinfo;
+  gdbscm_disassembler *dinfo;
 };
 
 /* Subroutine of gdbscm_arch_disassemble to simplify it.
@@ -76,16 +78,16 @@ dascm_make_insn (CORE_ADDR pc, const cha
    Scheme port.  Called via gdbscm_call_guile.
    The result is a statically allocated error message or NULL if success.  */
 
-static void *
+static const char *
 gdbscm_disasm_read_memory_worker (void *datap)
 {
-  struct gdbscm_disasm_read_data *data = datap;
-  struct disassemble_info *dinfo = data->dinfo;
-  struct gdbscm_disasm_data *disasm_data = dinfo->application_data;
-  SCM seekto, newpos, port = disasm_data->port;
+  struct gdbscm_disasm_read_data *data
+    = (struct gdbscm_disasm_read_data *) datap;
+  gdbscm_disassembler *dinfo = data->dinfo;
+  SCM seekto, newpos, port = dinfo->port;
   size_t bytes_read;
 
-  seekto = gdbscm_scm_from_ulongest (data->memaddr - disasm_data->offset);
+  seekto = gdbscm_scm_from_ulongest (data->memaddr - dinfo->offset);
   newpos = scm_seek (port, seekto, scm_from_int (SEEK_SET));
   if (!scm_is_eq (seekto, newpos))
     return "seek error";
@@ -106,45 +108,29 @@ gdbscm_disasm_read_memory (bfd_vma memad
 			   unsigned int length,
 			   struct disassemble_info *dinfo)
 {
+  gdbscm_disassembler *self
+    = static_cast<gdbscm_disassembler *> (dinfo->application_data);
   struct gdbscm_disasm_read_data data;
-  void *status;
+  const char *status;
 
   data.memaddr = memaddr;
   data.myaddr = myaddr;
   data.length = length;
-  data.dinfo = dinfo;
+  data.dinfo = self;
 
   status = gdbscm_with_guile (gdbscm_disasm_read_memory_worker, &data);
 
   /* TODO: IWBN to distinguish problems reading target memory versus problems
-     with the port (e.g., EOF).
-     We return TARGET_XFER_E_IO here as that's what memory_error looks for.  */
-  return status != NULL ? TARGET_XFER_E_IO : 0;
-}
-
-/* disassemble_info.memory_error_func for gdbscm_print_insn_from_port.
-   Technically speaking, we don't need our own memory_error_func,
-   but to not provide one would leave a subtle dependency in the code.
-   This function exists to keep a clear boundary.  */
-
-static void
-gdbscm_disasm_memory_error (int status, bfd_vma memaddr,
-			    struct disassemble_info *info)
-{
-  memory_error (status, memaddr);
+     with the port (e.g., EOF).  */
+  return status != NULL ? -1 : 0;
 }
 
-/* disassemble_info.print_address_func for gdbscm_print_insn_from_port.
-   Since we need to use our own application_data value, we need to supply
-   this routine as well.  */
-
-static void
-gdbscm_disasm_print_address (bfd_vma addr, struct disassemble_info *info)
+gdbscm_disassembler::gdbscm_disassembler (struct gdbarch *gdbarch,
+					  struct ui_file *stream,
+					  SCM port_, ULONGEST offset_)
+  : gdb_disassembler (gdbarch, stream, gdbscm_disasm_read_memory),
+    port (port_), offset (offset_)
 {
-  struct gdbscm_disasm_data *data = info->application_data;
-  struct gdbarch *gdbarch = data->gdbarch;
-
-  print_address (gdbarch, addr, info->stream);
 }
 
 /* Subroutine of gdbscm_arch_disassemble to simplify it.
@@ -160,32 +146,11 @@ gdbscm_disasm_print_address (bfd_vma add
 static int
 gdbscm_print_insn_from_port (struct gdbarch *gdbarch,
 			     SCM port, ULONGEST offset, CORE_ADDR memaddr,
-			     struct ui_file *stream, int *branch_delay_insns)
+			     string_file *stream, int *branch_delay_insns)
 {
-  struct disassemble_info di;
-  int length;
-  struct gdbscm_disasm_data data;
-
-  di = gdb_disassemble_info (gdbarch, stream);
-  data.gdbarch = gdbarch;
-  data.port = port;
-  data.offset = offset;
-  di.application_data = &data;
-  di.read_memory_func = gdbscm_disasm_read_memory;
-  di.memory_error_func = gdbscm_disasm_memory_error;
-  di.print_address_func = gdbscm_disasm_print_address;
-
-  length = gdbarch_print_insn (gdbarch, memaddr, &di);
-
-  if (branch_delay_insns)
-    {
-      if (di.insn_info_valid)
-	*branch_delay_insns = di.branch_delay_insns;
-      else
-	*branch_delay_insns = 0;
-    }
+  gdbscm_disassembler di (gdbarch, stream, port, offset);
 
-  return length;
+  return di.print_insn (memaddr, branch_delay_insns);
 }
 
 /* (arch-disassemble <gdb:arch> address
@@ -280,35 +245,29 @@ gdbscm_arch_disassemble (SCM self, SCM s
   for (pc = start, i = 0; pc <= end && i < count; )
     {
       int insn_len = 0;
-      char *as = NULL;
-      struct ui_file *memfile = mem_fileopen ();
-      struct cleanup *cleanups = make_cleanup_ui_file_delete (memfile);
+      string_file buf;
 
       TRY
 	{
 	  if (using_port)
 	    {
 	      insn_len = gdbscm_print_insn_from_port (gdbarch, port, offset,
-						      pc, memfile, NULL);
+						      pc, &buf, NULL);
 	    }
 	  else
-	    insn_len = gdb_print_insn (gdbarch, pc, memfile, NULL);
+	    insn_len = gdb_print_insn (gdbarch, pc, &buf, NULL);
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
-	  GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS (except, cleanups);
+	  GDBSCM_HANDLE_GDB_EXCEPTION (except);
 	}
       END_CATCH
 
-      as = ui_file_xstrdup (memfile, NULL);
-
-      result = scm_cons (dascm_make_insn (pc, as, insn_len),
+      result = scm_cons (dascm_make_insn (pc, buf.c_str (), insn_len),
 			 result);
 
       pc += insn_len;
       i++;
-      do_cleanups (cleanups);
-      xfree (as);
     }
 
   return scm_reverse_x (result, SCM_EOL);
@@ -318,7 +277,7 @@ gdbscm_arch_disassemble (SCM self, SCM s
 
 static const scheme_function disasm_functions[] =
 {
-  { "arch-disassemble", 2, 0, 1, gdbscm_arch_disassemble,
+  { "arch-disassemble", 2, 0, 1, as_a_scm_t_subr (gdbscm_arch_disassemble),
     "\
 Return list of disassembled instructions in memory.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-exception.c ./gdb/guile/scm-exception.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-exception.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-exception.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme exception support.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -635,22 +635,22 @@ gdbscm_percent_exception_count (void)
 
 static const scheme_function exception_functions[] =
 {
-  { "make-exception", 2, 0, 0, gdbscm_make_exception,
+  { "make-exception", 2, 0, 0, as_a_scm_t_subr (gdbscm_make_exception),
     "\
 Create a <gdb:exception> object.\n\
 \n\
   Arguments: key args\n\
     These are the standard key,args arguments of \"throw\"." },
 
-  { "exception?", 1, 0, 0, gdbscm_exception_p,
+  { "exception?", 1, 0, 0, as_a_scm_t_subr (gdbscm_exception_p),
     "\
 Return #t if the object is a <gdb:exception> object." },
 
-  { "exception-key", 1, 0, 0, gdbscm_exception_key,
+  { "exception-key", 1, 0, 0, as_a_scm_t_subr (gdbscm_exception_key),
     "\
 Return the exception's key." },
 
-  { "exception-args", 1, 0, 0, gdbscm_exception_args,
+  { "exception-args", 1, 0, 0, as_a_scm_t_subr (gdbscm_exception_args),
     "\
 Return the exception's arg list." },
 
@@ -659,11 +659,13 @@ Return the exception's arg list." },
 
 static const scheme_function private_exception_functions[] =
 {
-  { "%exception-print-style", 0, 0, 0, gdbscm_percent_exception_print_style,
+  { "%exception-print-style", 0, 0, 0,
+    as_a_scm_t_subr (gdbscm_percent_exception_print_style),
     "\
 Return the value of the \"guile print-stack\" option." },
 
-  { "%exception-count", 0, 0, 0, gdbscm_percent_exception_count,
+  { "%exception-count", 0, 0, 0,
+    as_a_scm_t_subr (gdbscm_percent_exception_count),
     "\
 Return a count of the number of <gdb:exception> objects created.\n\
 This is for debugging purposes." },
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-frame.c ./gdb/guile/scm-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to stack frames.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -84,7 +84,7 @@ static const struct inferior_data *frscm
 static hashval_t
 frscm_hash_frame_smob (const void *p)
 {
-  const frame_smob *f_smob = p;
+  const frame_smob *f_smob = (const frame_smob *) p;
   const struct frame_id *fid = &f_smob->frame_id;
   hashval_t hash = htab_hash_pointer (f_smob->inferior);
 
@@ -104,8 +104,8 @@ frscm_hash_frame_smob (const void *p)
 static int
 frscm_eq_frame_smob (const void *ap, const void *bp)
 {
-  const frame_smob *a = ap;
-  const frame_smob *b = bp;
+  const frame_smob *a = (const frame_smob *) ap;
+  const frame_smob *b = (const frame_smob *) bp;
 
   return (frame_id_eq (a->frame_id, b->frame_id)
 	  && a->inferior == b->inferior
@@ -118,7 +118,7 @@ frscm_eq_frame_smob (const void *ap, con
 static htab_t
 frscm_inferior_frame_map (struct inferior *inferior)
 {
-  htab_t htab = inferior_data (inferior, frscm_inferior_data_key);
+  htab_t htab = (htab_t) inferior_data (inferior, frscm_inferior_data_key);
 
   if (htab == NULL)
     {
@@ -156,17 +156,12 @@ static int
 frscm_print_frame_smob (SCM self, SCM port, scm_print_state *pstate)
 {
   frame_smob *f_smob = (frame_smob *) SCM_SMOB_DATA (self);
-  struct ui_file *strfile;
-  char *s;
 
   gdbscm_printf (port, "#<%s ", frame_smob_name);
 
-  strfile = mem_fileopen ();
-  fprint_frame_id (strfile, f_smob->frame_id);
-  s = ui_file_xstrdup (strfile, NULL);
-  gdbscm_printf (port, "%s", s);
-  ui_file_delete (strfile);
-  xfree (s);
+  string_file strfile;
+  fprint_frame_id (&strfile, f_smob->frame_id);
+  gdbscm_printf (port, "%s", strfile.c_str ());
 
   scm_puts (">", port);
 
@@ -379,7 +374,7 @@ frscm_mark_frame_invalid (void **slot, v
 static void
 frscm_del_inferior_frames (struct inferior *inferior, void *datum)
 {
-  htab_t htab = datum;
+  htab_t htab = (htab_t) datum;
 
   if (htab != NULL)
     {
@@ -855,6 +850,7 @@ gdbscm_frame_read_var (SCM self, SCM sym
   SCM block_scm = SCM_UNDEFINED;
   struct frame_info *frame = NULL;
   struct symbol *var = NULL;
+  const struct block *block = NULL;
   struct value *value = NULL;
 
   f_smob = frscm_get_frame_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
@@ -909,9 +905,13 @@ gdbscm_frame_read_var (SCM self, SCM sym
 
       TRY
 	{
+	  struct block_symbol lookup_sym;
+
 	  if (block == NULL)
 	    block = get_frame_block (frame, NULL);
-	  var = lookup_symbol (var_name, block, VAR_DOMAIN, NULL);
+	  lookup_sym = lookup_symbol (var_name, block, VAR_DOMAIN, NULL);
+	  var = lookup_sym.symbol;
+	  block = lookup_sym.block;
 	}
       CATCH (ex, RETURN_MASK_ALL)
 	{
@@ -940,7 +940,7 @@ gdbscm_frame_read_var (SCM self, SCM sym
 
   TRY
     {
-      value = read_var_value (var, frame);
+      value = read_var_value (var, block, frame);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1040,7 +1040,7 @@ gdbscm_unwind_stop_reason_string (SCM re
   if (reason < UNWIND_FIRST || reason > UNWIND_LAST)
     scm_out_of_range (FUNC_NAME, reason_scm);
 
-  str = unwind_stop_reason_to_string (reason);
+  str = unwind_stop_reason_to_string ((enum unwind_stop_reason) reason);
   return gdbscm_scm_from_c_string (str);
 }
 
@@ -1070,86 +1070,89 @@ static const scheme_integer_constant fra
 
 static const scheme_function frame_functions[] =
 {
-  { "frame?", 1, 0, 0, gdbscm_frame_p,
+  { "frame?", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_p),
     "\
 Return #t if the object is a <gdb:frame> object." },
 
-  { "frame-valid?", 1, 0, 0, gdbscm_frame_valid_p,
+  { "frame-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_valid_p),
     "\
 Return #t if the object is a valid <gdb:frame> object.\n\
 Frames become invalid when the inferior returns to its caller." },
 
-  { "frame-name", 1, 0, 0, gdbscm_frame_name,
+  { "frame-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_name),
     "\
 Return the name of the function corresponding to this frame,\n\
 or #f if there is no function." },
 
-  { "frame-arch", 1, 0, 0, gdbscm_frame_arch,
+  { "frame-arch", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_arch),
     "\
 Return the frame's architecture as a <gdb:arch> object." },
 
-  { "frame-type", 1, 0, 0, gdbscm_frame_type,
+  { "frame-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_type),
     "\
 Return the frame type, namely one of the gdb:*_FRAME constants." },
 
-  { "frame-unwind-stop-reason", 1, 0, 0, gdbscm_frame_unwind_stop_reason,
+  { "frame-unwind-stop-reason", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_frame_unwind_stop_reason),
     "\
 Return one of the gdb:FRAME_UNWIND_* constants explaining why\n\
 it's not possible to find frames older than this." },
 
-  { "frame-pc", 1, 0, 0, gdbscm_frame_pc,
+  { "frame-pc", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_pc),
     "\
 Return the frame's resume address." },
 
-  { "frame-block", 1, 0, 0, gdbscm_frame_block,
+  { "frame-block", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_block),
     "\
 Return the frame's code block, or #f if one cannot be found." },
 
-  { "frame-function", 1, 0, 0, gdbscm_frame_function,
+  { "frame-function", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_function),
     "\
 Return the <gdb:symbol> for the function corresponding to this frame,\n\
 or #f if there isn't one." },
 
-  { "frame-older", 1, 0, 0, gdbscm_frame_older,
+  { "frame-older", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_older),
     "\
 Return the frame immediately older (outer) to this frame,\n\
 or #f if there isn't one." },
 
-  { "frame-newer", 1, 0, 0, gdbscm_frame_newer,
+  { "frame-newer", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_newer),
     "\
 Return the frame immediately newer (inner) to this frame,\n\
 or #f if there isn't one." },
 
-  { "frame-sal", 1, 0, 0, gdbscm_frame_sal,
+  { "frame-sal", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_sal),
     "\
 Return the frame's symtab-and-line <gdb:sal> object." },
 
-  { "frame-read-var", 2, 0, 1, gdbscm_frame_read_var,
+  { "frame-read-var", 2, 0, 1, as_a_scm_t_subr (gdbscm_frame_read_var),
     "\
 Return the value of the symbol in the frame.\n\
 \n\
   Arguments: <gdb:frame> <gdb:symbol>\n\
          Or: <gdb:frame> string [#:block <gdb:block>]" },
 
-  { "frame-read-register", 2, 0, 0, gdbscm_frame_read_register,
+  { "frame-read-register", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_frame_read_register),
     "\
 Return the value of the register in the frame.\n\
 \n\
   Arguments: <gdb:frame> string" },
 
-  { "frame-select", 1, 0, 0, gdbscm_frame_select,
+  { "frame-select", 1, 0, 0, as_a_scm_t_subr (gdbscm_frame_select),
     "\
 Select this frame." },
 
-  { "newest-frame", 0, 0, 0, gdbscm_newest_frame,
+  { "newest-frame", 0, 0, 0, as_a_scm_t_subr (gdbscm_newest_frame),
     "\
 Return the newest frame." },
 
-  { "selected-frame", 0, 0, 0, gdbscm_selected_frame,
+  { "selected-frame", 0, 0, 0, as_a_scm_t_subr (gdbscm_selected_frame),
     "\
 Return the selected frame." },
 
-  { "unwind-stop-reason-string", 1, 0, 0, gdbscm_unwind_stop_reason_string,
+  { "unwind-stop-reason-string", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_unwind_stop_reason_string),
     "\
 Return a string explaining the unwind stop reason.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-gsmob.c ./gdb/guile/scm-gsmob.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-gsmob.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-gsmob.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme smobs (gsmob is pronounced "jee smob")
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -193,7 +193,7 @@ gdbscm_add_objfile_ref (struct objfile *
   g_smob->prev = NULL;
   if (objfile != NULL)
     {
-      g_smob->next = objfile_data (objfile, data_key);
+      g_smob->next = (chained_gdb_smob *) objfile_data (objfile, data_key);
       if (g_smob->next)
 	g_smob->next->prev = g_smob;
       set_objfile_data (objfile, data_key, g_smob);
@@ -275,7 +275,7 @@ static const scheme_function gsmob_funct
   /* N.B. There is a general rule of not naming symbols in gdb-guile with a
      "gdb" prefix.  This symbol does not violate this rule because it is to
      be read as "gdb-object-foo", not "gdb-foo".  */
-  { "gdb-object-kind", 1, 0, 0, gdbscm_gsmob_kind,
+  { "gdb-object-kind", 1, 0, 0, as_a_scm_t_subr (gdbscm_gsmob_kind),
     "\
 Return the kind of the GDB object, e.g., <gdb:breakpoint>, as a symbol." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-iterator.c ./gdb/guile/scm-iterator.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-iterator.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-iterator.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Simple iterators for GDB/Scheme.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -301,7 +301,7 @@ gdbscm_iterator_next_x (SCM self)
 
 static const scheme_function iterator_functions[] =
 {
-  { "make-iterator", 3, 0, 0, gdbscm_make_iterator,
+  { "make-iterator", 3, 0, 0, as_a_scm_t_subr (gdbscm_make_iterator),
     "\
 Create a <gdb:iterator> object.\n\
 \n\
@@ -314,31 +314,32 @@ Create a <gdb:iterator> object.\n\
       By convention end-of-iteration should be marked with (end-of-iteration)\n\
       from module (gdb iterator)." },
 
-  { "iterator?", 1, 0, 0, gdbscm_iterator_p,
+  { "iterator?", 1, 0, 0, as_a_scm_t_subr (gdbscm_iterator_p),
     "\
 Return #t if the object is a <gdb:iterator> object." },
 
-  { "iterator-object", 1, 0, 0, gdbscm_iterator_object,
+  { "iterator-object", 1, 0, 0, as_a_scm_t_subr (gdbscm_iterator_object),
     "\
 Return the object being iterated over." },
 
-  { "iterator-progress", 1, 0, 0, gdbscm_iterator_progress,
+  { "iterator-progress", 1, 0, 0, as_a_scm_t_subr (gdbscm_iterator_progress),
     "\
 Return the progress object of the iterator." },
 
-  { "set-iterator-progress!", 2, 0, 0, gdbscm_set_iterator_progress_x,
+  { "set-iterator-progress!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_iterator_progress_x),
     "\
 Set the progress object of the iterator." },
 
-  { "iterator-next!", 1, 0, 0, gdbscm_iterator_next_x,
+  { "iterator-next!", 1, 0, 0, as_a_scm_t_subr (gdbscm_iterator_next_x),
     "\
 Invoke the next! procedure of the iterator and return its result." },
 
-  { "end-of-iteration", 0, 0, 0, gdbscm_end_of_iteration,
+  { "end-of-iteration", 0, 0, 0, as_a_scm_t_subr (gdbscm_end_of_iteration),
     "\
 Return the end-of-iteration marker." },
 
-  { "end-of-iteration?", 1, 0, 0, gdbscm_end_of_iteration_p,
+  { "end-of-iteration?", 1, 0, 0, as_a_scm_t_subr (gdbscm_end_of_iteration_p),
     "\
 Return #t if the object is the end-of-iteration marker." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-lazy-string.c ./gdb/guile/scm-lazy-string.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-lazy-string.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-lazy-string.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to lazy strings.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -321,29 +321,32 @@ lsscm_val_print_lazy_string (SCM string,
 
 static const scheme_function lazy_string_functions[] =
 {
-  { "lazy-string?", 1, 0, 0, gdbscm_lazy_string_p,
+  { "lazy-string?", 1, 0, 0, as_a_scm_t_subr (gdbscm_lazy_string_p),
     "\
 Return #t if the object is a <gdb:lazy-string> object." },
 
-  { "lazy-string-address", 1, 0, 0, gdbscm_lazy_string_address,
+  { "lazy-string-address", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_lazy_string_address),
     "\
 Return the address of the lazy-string." },
 
-  { "lazy-string-length", 1, 0, 0, gdbscm_lazy_string_length,
+  { "lazy-string-length", 1, 0, 0, as_a_scm_t_subr (gdbscm_lazy_string_length),
     "\
 Return the length of the lazy-string.\n\
 If the length is -1 then the length is determined by the first null\n\
 of appropriate width." },
 
-  { "lazy-string-encoding", 1, 0, 0, gdbscm_lazy_string_encoding,
+  { "lazy-string-encoding", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_lazy_string_encoding),
     "\
 Return the encoding of the lazy-string." },
 
-  { "lazy-string-type", 1, 0, 0, gdbscm_lazy_string_type,
+  { "lazy-string-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_lazy_string_type),
     "\
 Return the <gdb:type> of the lazy-string." },
 
-  { "lazy-string->value", 1, 0, 0, gdbscm_lazy_string_to_value,
+  { "lazy-string->value", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_lazy_string_to_value),
     "\
 Return the <gdb:value> representation of the lazy-string." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-math.c ./gdb/guile/scm-math.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-math.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-math.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme support for math operations on values.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -186,9 +186,9 @@ vlscm_binop (enum valscm_binary_opcode o
 	    struct type *ltype = value_type (arg1);
 	    struct type *rtype = value_type (arg2);
 
-	    CHECK_TYPEDEF (ltype);
+	    ltype = check_typedef (ltype);
 	    ltype = STRIP_REFERENCE (ltype);
-	    CHECK_TYPEDEF (rtype);
+	    rtype = check_typedef (rtype);
 	    rtype = STRIP_REFERENCE (rtype);
 
 	    if (TYPE_CODE (ltype) == TYPE_CODE_PTR
@@ -206,9 +206,9 @@ vlscm_binop (enum valscm_binary_opcode o
 	    struct type *ltype = value_type (arg1);
 	    struct type *rtype = value_type (arg2);
 
-	    CHECK_TYPEDEF (ltype);
+	    ltype = check_typedef (ltype);
 	    ltype = STRIP_REFERENCE (ltype);
-	    CHECK_TYPEDEF (rtype);
+	    rtype = check_typedef (rtype);
 	    rtype = STRIP_REFERENCE (rtype);
 
 	    if (TYPE_CODE (ltype) == TYPE_CODE_PTR
@@ -905,99 +905,99 @@ vlscm_convert_value_from_scheme (const c
 
 static const scheme_function math_functions[] =
 {
-  { "value-add", 2, 0, 0, gdbscm_value_add,
+  { "value-add", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_add),
     "\
 Return a + b." },
 
-  { "value-sub", 2, 0, 0, gdbscm_value_sub,
+  { "value-sub", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_sub),
     "\
 Return a - b." },
 
-  { "value-mul", 2, 0, 0, gdbscm_value_mul,
+  { "value-mul", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_mul),
     "\
 Return a * b." },
 
-  { "value-div", 2, 0, 0, gdbscm_value_div,
+  { "value-div", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_div),
     "\
 Return a / b." },
 
-  { "value-rem", 2, 0, 0, gdbscm_value_rem,
+  { "value-rem", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_rem),
     "\
 Return a % b." },
 
-  { "value-mod", 2, 0, 0, gdbscm_value_mod,
+  { "value-mod", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_mod),
     "\
 Return a mod b.  See Knuth 1.2.4." },
 
-  { "value-pow", 2, 0, 0, gdbscm_value_pow,
+  { "value-pow", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_pow),
     "\
 Return pow (x, y)." },
 
-  { "value-not", 1, 0, 0, gdbscm_value_not,
+  { "value-not", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_not),
     "\
 Return !a." },
 
-  { "value-neg", 1, 0, 0, gdbscm_value_neg,
+  { "value-neg", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_neg),
     "\
 Return -a." },
 
-  { "value-pos", 1, 0, 0, gdbscm_value_pos,
+  { "value-pos", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_pos),
     "\
 Return a." },
 
-  { "value-abs", 1, 0, 0, gdbscm_value_abs,
+  { "value-abs", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_abs),
     "\
 Return abs (a)." },
 
-  { "value-lsh", 2, 0, 0, gdbscm_value_lsh,
+  { "value-lsh", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_lsh),
     "\
 Return a << b." },
 
-  { "value-rsh", 2, 0, 0, gdbscm_value_rsh,
+  { "value-rsh", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_rsh),
     "\
 Return a >> b." },
 
-  { "value-min", 2, 0, 0, gdbscm_value_min,
+  { "value-min", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_min),
     "\
 Return min (a, b)." },
 
-  { "value-max", 2, 0, 0, gdbscm_value_max,
+  { "value-max", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_max),
     "\
 Return max (a, b)." },
 
-  { "value-lognot", 1, 0, 0, gdbscm_value_lognot,
+  { "value-lognot", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_lognot),
     "\
 Return ~a." },
 
-  { "value-logand", 2, 0, 0, gdbscm_value_logand,
+  { "value-logand", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_logand),
     "\
 Return a & b." },
 
-  { "value-logior", 2, 0, 0, gdbscm_value_logior,
+  { "value-logior", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_logior),
     "\
 Return a | b." },
 
-  { "value-logxor", 2, 0, 0, gdbscm_value_logxor,
+  { "value-logxor", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_logxor),
     "\
 Return a ^ b." },
 
-  { "value=?", 2, 0, 0, gdbscm_value_eq_p,
+  { "value=?", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_eq_p),
     "\
 Return a == b." },
 
-  { "value<?", 2, 0, 0, gdbscm_value_lt_p,
+  { "value<?", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_lt_p),
     "\
 Return a < b." },
 
-  { "value<=?", 2, 0, 0, gdbscm_value_le_p,
+  { "value<=?", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_le_p),
     "\
 Return a <= b." },
 
-  { "value>?", 2, 0, 0, gdbscm_value_gt_p,
+  { "value>?", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_gt_p),
     "\
 Return a > b." },
 
-  { "value>=?", 2, 0, 0, gdbscm_value_ge_p,
+  { "value>=?", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_ge_p),
     "\
 Return a >= b." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-objfile.c ./gdb/guile/scm-objfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-objfile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-objfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to objfiles.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -116,7 +116,7 @@ ofscm_release_objfile (objfile_smob *o_s
 static void
 ofscm_handle_objfile_deleted (struct objfile *objfile, void *datum)
 {
-  objfile_smob *o_smob = datum;
+  objfile_smob *o_smob = (objfile_smob *) datum;
 
   gdb_assert (o_smob->objfile == objfile);
 
@@ -148,7 +148,7 @@ ofscm_objfile_smob_from_objfile (struct 
 {
   objfile_smob *o_smob;
 
-  o_smob = objfile_data (objfile, ofscm_objfile_data_key);
+  o_smob = (objfile_smob *) objfile_data (objfile, ofscm_objfile_data_key);
   if (o_smob == NULL)
     {
       SCM o_scm = ofscm_make_objfile_smob ();
@@ -389,36 +389,37 @@ gdbscm_objfiles (void)
 
 static const scheme_function objfile_functions[] =
 {
-  { "objfile?", 1, 0, 0, gdbscm_objfile_p,
+  { "objfile?", 1, 0, 0, as_a_scm_t_subr (gdbscm_objfile_p),
     "\
 Return #t if the object is a <gdb:objfile> object." },
 
-  { "objfile-valid?", 1, 0, 0, gdbscm_objfile_valid_p,
+  { "objfile-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_objfile_valid_p),
     "\
 Return #t if the objfile is valid (hasn't been deleted from gdb)." },
 
-  { "objfile-filename", 1, 0, 0, gdbscm_objfile_filename,
+  { "objfile-filename", 1, 0, 0, as_a_scm_t_subr (gdbscm_objfile_filename),
     "\
 Return the file name of the objfile." },
 
-  { "objfile-progspace", 1, 0, 0, gdbscm_objfile_progspace,
+  { "objfile-progspace", 1, 0, 0, as_a_scm_t_subr (gdbscm_objfile_progspace),
     "\
 Return the progspace that the objfile lives in." },
 
-  { "objfile-pretty-printers", 1, 0, 0, gdbscm_objfile_pretty_printers,
+  { "objfile-pretty-printers", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_objfile_pretty_printers),
     "\
 Return a list of pretty-printers of the objfile." },
 
   { "set-objfile-pretty-printers!", 2, 0, 0,
-    gdbscm_set_objfile_pretty_printers_x,
+    as_a_scm_t_subr (gdbscm_set_objfile_pretty_printers_x),
     "\
 Set the list of pretty-printers of the objfile." },
 
-  { "current-objfile", 0, 0, 0, gdbscm_get_current_objfile,
+  { "current-objfile", 0, 0, 0, as_a_scm_t_subr (gdbscm_get_current_objfile),
     "\
 Return the current objfile if there is one or #f if there isn't one." },
 
-  { "objfiles", 0, 0, 0, gdbscm_objfiles,
+  { "objfiles", 0, 0, 0, as_a_scm_t_subr (gdbscm_objfiles),
     "\
 Return a list of all objfiles in the current program space." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-param.c ./gdb/guile/scm-param.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-param.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-param.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB parameters implemented in Guile.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -503,8 +503,7 @@ compute_enum_list (SCM enum_values_scm, 
 				 _("enumeration list is empty"));
     }
 
-  enum_values = xmalloc ((size + 1) * sizeof (char *));
-  memset (enum_values, 0, (size + 1) * sizeof (char *));
+  enum_values = XCNEWVEC (char *, size + 1);
 
   i = 0;
   while (!scm_is_eq (enum_values_scm, SCM_EOL))
@@ -939,7 +938,7 @@ gdbscm_make_parameter (SCM name_scm, SCM
   /* These are all stored in GC space so that we don't have to worry about
      freeing them if we throw an exception.  */
   p_smob->name = name;
-  p_smob->cmd_class = cmd_class;
+  p_smob->cmd_class = (enum command_class) cmd_class;
   p_smob->type = (enum var_types) param_type;
   p_smob->doc = doc;
   p_smob->set_doc = set_doc;
@@ -957,7 +956,7 @@ gdbscm_make_parameter (SCM name_scm, SCM
 	  if (gdbscm_is_exception (initial_value_scm))
 	    gdbscm_throw (initial_value_scm);
 	}
-      pascm_set_param_value_x (param_type, &p_smob->value, enum_list,
+      pascm_set_param_value_x (p_smob->type, &p_smob->value, enum_list,
 			       initial_value_scm,
 			       initial_value_arg_pos, FUNC_NAME);
     }
@@ -1118,7 +1117,7 @@ gdbscm_set_parameter_value_x (SCM self, 
 
 static const scheme_function parameter_functions[] =
 {
-  { "make-parameter", 1, 0, 1, gdbscm_make_parameter,
+  { "make-parameter", 1, 0, 1, as_a_scm_t_subr (gdbscm_make_parameter),
     "\
 Make a GDB parameter object.\n\
 \n\
@@ -1150,20 +1149,22 @@ Make a GDB parameter object.\n\
     show-doc: The \"doc string\" when showing the parameter.\n\
     initial-value: The initial value of the parameter." },
 
-  { "register-parameter!", 1, 0, 0, gdbscm_register_parameter_x,
+  { "register-parameter!", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_register_parameter_x),
     "\
 Register a <gdb:parameter> object with GDB." },
 
-  { "parameter?", 1, 0, 0, gdbscm_parameter_p,
+  { "parameter?", 1, 0, 0, as_a_scm_t_subr (gdbscm_parameter_p),
     "\
 Return #t if the object is a <gdb:parameter> object." },
 
-  { "parameter-value", 1, 0, 0, gdbscm_parameter_value,
+  { "parameter-value", 1, 0, 0, as_a_scm_t_subr (gdbscm_parameter_value),
     "\
 Return the value of a <gdb:parameter> object\n\
 or any gdb parameter if param is a string naming the parameter." },
 
-  { "set-parameter-value!", 2, 0, 0, gdbscm_set_parameter_value_x,
+  { "set-parameter-value!", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_set_parameter_value_x),
     "\
 Set the value of a <gdb:parameter> object.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-ports.c ./gdb/guile/scm-ports.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-ports.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-ports.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Support for connecting Guile's stdio to GDB's.
    as well as r/w memory via ports.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 
 #include "defs.h"
 #include "gdb_select.h"
-#include "interps.h"
+#include "top.h"
 #include "target.h"
 #include "guile-internal.h"
 
@@ -37,11 +37,18 @@
 
 /* A ui-file for sending output to Guile.  */
 
-typedef struct
+class ioscm_file_port : public ui_file
 {
-  int *magic;
-  SCM port;
-} ioscm_file_port;
+public:
+  /* Return a ui_file that writes to PORT.  */
+  explicit ioscm_file_port (SCM port);
+
+  void flush () override;
+  void write (const char *buf, long length_buf) override;
+
+private:
+  SCM m_port;
+};
 
 /* Data for a memory port.  */
 
@@ -201,7 +208,9 @@ ioscm_input_waiting (SCM port)
     FD_ZERO (&input_fds);
     FD_SET (fdes, &input_fds);
 
-    num_found = gdb_select (num_fds, &input_fds, NULL, NULL, &timeout);
+    num_found = interruptible_select (num_fds,
+				      &input_fds, NULL, NULL,
+				      &timeout);
     if (num_found < 0)
       {
 	/* Guile doesn't export SIGINT hooks like Python does.
@@ -269,9 +278,9 @@ ioscm_write (SCM port, const void *data,
   TRY
     {
       if (scm_is_eq (port, error_port_scm))
-	fputsn_filtered (data, size, gdb_stderr);
+	fputsn_filtered ((const char *) data, size, gdb_stderr);
       else
-	fputsn_filtered (data, size, gdb_stdout);
+	fputsn_filtered ((const char *) data, size, gdb_stdout);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -326,7 +335,8 @@ ioscm_init_stdio_buffers (SCM port, long
 
   if (!writing && size > 0)
     {
-      pt->read_buf = scm_gc_malloc_pointerless (size, "port buffer");
+      pt->read_buf
+	= (unsigned char *) scm_gc_malloc_pointerless (size, "port buffer");
       pt->read_pos = pt->read_end = pt->read_buf;
       pt->read_buf_size = size;
     }
@@ -338,7 +348,8 @@ ioscm_init_stdio_buffers (SCM port, long
 
   if (writing && size > 0)
     {
-      pt->write_buf = scm_gc_malloc_pointerless (size, "port buffer");
+      pt->write_buf
+	= (unsigned char *) scm_gc_malloc_pointerless (size, "port buffer");
       pt->write_pos = pt->write_buf;
       pt->write_buf_size = size;
     }
@@ -357,6 +368,7 @@ ioscm_make_gdb_stdio_port (int fd)
 {
   int is_a_tty = isatty (fd);
   const char *name;
+  const char *mode_str;
   long mode_bits;
   SCM port;
 
@@ -364,20 +376,21 @@ ioscm_make_gdb_stdio_port (int fd)
     {
     case 0:
       name = input_port_name;
-      mode_bits = scm_mode_bits (is_a_tty ? "r0" : "r");
+      mode_str = is_a_tty ? "r0" : "r";
       break;
     case 1:
       name = output_port_name;
-      mode_bits = scm_mode_bits (is_a_tty ? "w0" : "w");
+      mode_str = is_a_tty ? "w0" : "w";
       break;
     case 2:
       name = error_port_name;
-      mode_bits = scm_mode_bits (is_a_tty ? "w0" : "w");
+      mode_str = is_a_tty ? "w0" : "w";
       break;
     default:
       gdb_assert_not_reached ("bad stdio file descriptor");
     }
 
+  mode_bits = scm_mode_bits ((char *) mode_str);
   port = ioscm_open_port (stdio_port_desc, mode_bits);
 
   scm_set_port_filename_x (port, gdbscm_scm_from_c_string (name));
@@ -425,74 +438,21 @@ gdbscm_error_port (void)
 
 /* Support for sending GDB I/O to Guile ports.  */
 
-static void
-ioscm_file_port_delete (struct ui_file *file)
-{
-  ioscm_file_port *stream = ui_file_data (file);
-
-  if (stream->magic != &file_port_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("ioscm_file_port_delete: bad magic number"));
-  xfree (stream);
-}
-
-static void
-ioscm_file_port_rewind (struct ui_file *file)
-{
-  ioscm_file_port *stream = ui_file_data (file);
+ioscm_file_port::ioscm_file_port (SCM port)
+  : m_port (port)
+{}
 
-  if (stream->magic != &file_port_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("ioscm_file_port_rewind: bad magic number"));
-
-  scm_truncate_file (stream->port, 0);
-}
-
-static void
-ioscm_file_port_put (struct ui_file *file,
-		     ui_file_put_method_ftype *write,
-		     void *dest)
+void
+ioscm_file_port::flush ()
 {
-  ioscm_file_port *stream = ui_file_data (file);
-
-  if (stream->magic != &file_port_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("ioscm_file_port_put: bad magic number"));
-
-  /* This function doesn't meld with ports very well.  */
 }
 
-static void
-ioscm_file_port_write (struct ui_file *file,
-		       const char *buffer,
-		       long length_buffer)
+void
+ioscm_file_port::write (const char *buffer, long length_buffer)
 {
-  ioscm_file_port *stream = ui_file_data (file);
-
-  if (stream->magic != &file_port_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("ioscm_pot_file_write: bad magic number"));
-
-  scm_c_write (stream->port, buffer, length_buffer);
+  scm_c_write (m_port, buffer, length_buffer);
 }
 
-/* Return a ui_file that writes to PORT.  */
-
-static struct ui_file *
-ioscm_file_port_new (SCM port)
-{
-  ioscm_file_port *stream = XCNEW (ioscm_file_port);
-  struct ui_file *file = ui_file_new ();
-
-  set_ui_file_data (file, stream, ioscm_file_port_delete);
-  set_ui_file_rewind (file, ioscm_file_port_rewind);
-  set_ui_file_put (file, ioscm_file_port_put);
-  set_ui_file_write (file, ioscm_file_port_write);
-  stream->magic = &file_port_magic;
-  stream->port = port;
-
-  return file;
-}
 
 /* Helper routine for with-{output,error}-to-port.  */
 
@@ -500,7 +460,6 @@ static SCM
 ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport,
 				  const char *func_name)
 {
-  struct ui_file *port_file;
   struct cleanup *cleanups;
   SCM result;
 
@@ -511,28 +470,22 @@ ioscm_with_output_to_port_worker (SCM po
 
   cleanups = set_batch_flag_and_make_cleanup_restore_page_info ();
 
-  make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  make_cleanup_restore_integer (&current_ui->async);
+  current_ui->async = 0;
 
-  port_file = ioscm_file_port_new (port);
+  ui_file_up port_file (new ioscm_file_port (port));
 
-  make_cleanup_ui_file_delete (port_file);
+  scoped_restore save_file = make_scoped_restore (oport == GDB_STDERR
+						  ? &gdb_stderr : &gdb_stdout);
 
   if (oport == GDB_STDERR)
-    {
-      make_cleanup_restore_ui_file (&gdb_stderr);
-      gdb_stderr = port_file;
-    }
+    gdb_stderr = port_file.get ();
   else
     {
-      make_cleanup_restore_ui_file (&gdb_stdout);
-
-      if (ui_out_redirect (current_uiout, port_file) < 0)
-	warning (_("Current output protocol does not support redirection"));
-      else
-	make_cleanup_ui_out_redirect_pop (current_uiout);
+      current_uiout->redirect (port_file.get ());
+      make_cleanup_ui_out_redirect_pop (current_uiout);
 
-      gdb_stdout = port_file;
+      gdb_stdout = port_file.get ();
     }
 
   result = gdbscm_safe_call_0 (thunk, NULL);
@@ -714,10 +667,11 @@ gdbscm_memory_port_flush (SCM port)
 /* "write" method for memory ports.  */
 
 static void
-gdbscm_memory_port_write (SCM port, const void *data, size_t size)
+gdbscm_memory_port_write (SCM port, const void *void_data, size_t size)
 {
   scm_t_port *pt = SCM_PTAB_ENTRY (port);
   ioscm_memory_port *iomem = (ioscm_memory_port *) SCM_STREAM (port);
+  const gdb_byte *data = (const gdb_byte *) void_data;
 
   /* There's no way to indicate a short write, so if the request goes past
      the end of the port's memory range, flag an error.  */
@@ -756,7 +710,7 @@ gdbscm_memory_port_write (SCM port, cons
 	pt->write_pos = pt->write_end;
 	gdbscm_memory_port_flush (port);
 	{
-	  const void *ptr = ((const char *) data) + space;
+	  const gdb_byte *ptr = data + space;
 	  size_t remaining = size - space;
 
 	  if (remaining >= pt->write_buf_size)
@@ -1011,8 +965,8 @@ ioscm_init_memory_port (SCM port, CORE_A
   pt->write_buf_size = iomem->write_buf_size;
   if (buffered)
     {
-      pt->read_buf = xmalloc (pt->read_buf_size);
-      pt->write_buf = xmalloc (pt->write_buf_size);
+      pt->read_buf = (unsigned char *) xmalloc (pt->read_buf_size);
+      pt->write_buf = (unsigned char *) xmalloc (pt->write_buf_size);
     }
   else
     {
@@ -1076,7 +1030,7 @@ ioscm_reinit_memory_port (SCM port, size
       iomem->read_buf_size = read_buf_size;
       pt->read_buf_size = read_buf_size;
       xfree (pt->read_buf);
-      pt->read_buf = xmalloc (pt->read_buf_size);
+      pt->read_buf = (unsigned char *) xmalloc (pt->read_buf_size);
       pt->read_pos = pt->read_end = pt->read_buf;
     }
 
@@ -1085,7 +1039,7 @@ ioscm_reinit_memory_port (SCM port, size
       iomem->write_buf_size = write_buf_size;
       pt->write_buf_size = write_buf_size;
       xfree (pt->write_buf);
-      pt->write_buf = xmalloc (pt->write_buf_size);
+      pt->write_buf = (unsigned char *) xmalloc (pt->write_buf_size);
       pt->write_pos = pt->write_buf;
       pt->write_end = pt->write_buf + pt->write_buf_size;
     }
@@ -1134,7 +1088,7 @@ gdbscm_open_memory (SCM rest)
 			      &start_arg_pos, &start,
 			      &size_arg_pos, &size);
 
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
 
   if (mode == NULL)
     mode = xstrdup ("r");
@@ -1287,44 +1241,44 @@ gdbscm_set_memory_port_write_buffer_size
 
 static const scheme_function port_functions[] =
 {
-  { "input-port", 0, 0, 0, gdbscm_input_port,
+  { "input-port", 0, 0, 0, as_a_scm_t_subr (gdbscm_input_port),
     "\
 Return gdb's input port." },
 
-  { "output-port", 0, 0, 0, gdbscm_output_port,
+  { "output-port", 0, 0, 0, as_a_scm_t_subr (gdbscm_output_port),
     "\
 Return gdb's output port." },
 
-  { "error-port", 0, 0, 0, gdbscm_error_port,
+  { "error-port", 0, 0, 0, as_a_scm_t_subr (gdbscm_error_port),
     "\
 Return gdb's error port." },
 
-  { "stdio-port?", 1, 0, 0, gdbscm_stdio_port_p,
+  { "stdio-port?", 1, 0, 0, as_a_scm_t_subr (gdbscm_stdio_port_p),
     "\
 Return #t if the object is a gdb:stdio-port." },
 
-  { "open-memory", 0, 0, 1, gdbscm_open_memory,
+  { "open-memory", 0, 0, 1, as_a_scm_t_subr (gdbscm_open_memory),
     "\
 Return a port that can be used for reading/writing inferior memory.\n\
 \n\
   Arguments: [#:mode string] [#:start address] [#:size integer]\n\
   Returns: A port object." },
 
-  { "memory-port?", 1, 0, 0, gdbscm_memory_port_p,
+  { "memory-port?", 1, 0, 0, as_a_scm_t_subr (gdbscm_memory_port_p),
     "\
 Return #t if the object is a memory port." },
 
-  { "memory-port-range", 1, 0, 0, gdbscm_memory_port_range,
+  { "memory-port-range", 1, 0, 0, as_a_scm_t_subr (gdbscm_memory_port_range),
     "\
 Return the memory range of the port as (start end)." },
 
   { "memory-port-read-buffer-size", 1, 0, 0,
-    gdbscm_memory_port_read_buffer_size,
+    as_a_scm_t_subr (gdbscm_memory_port_read_buffer_size),
     "\
 Return the size of the read buffer for the memory port." },
 
   { "set-memory-port-read-buffer-size!", 2, 0, 0,
-    gdbscm_set_memory_port_read_buffer_size_x,
+    as_a_scm_t_subr (gdbscm_set_memory_port_read_buffer_size_x),
     "\
 Set the size of the read buffer for the memory port.\n\
 \n\
@@ -1332,12 +1286,12 @@ Set the size of the read buffer for the 
   Returns: unspecified." },
 
   { "memory-port-write-buffer-size", 1, 0, 0,
-    gdbscm_memory_port_write_buffer_size,
+    as_a_scm_t_subr (gdbscm_memory_port_write_buffer_size),
     "\
 Return the size of the write buffer for the memory port." },
 
   { "set-memory-port-write-buffer-size!", 2, 0, 0,
-    gdbscm_set_memory_port_write_buffer_size_x,
+    as_a_scm_t_subr (gdbscm_set_memory_port_write_buffer_size_x),
     "\
 Set the size of the write buffer for the memory port.\n\
 \n\
@@ -1351,7 +1305,7 @@ static const scheme_function private_por
 {
 #if 0 /* TODO */
   { "%with-gdb-input-from-port", 2, 0, 0,
-    gdbscm_percent_with_gdb_input_from_port,
+    as_a_scm_t_subr (gdbscm_percent_with_gdb_input_from_port),
     "\
 Temporarily set GDB's input port to PORT and then invoke THUNK.\n\
 \n\
@@ -1362,7 +1316,7 @@ This procedure is experimental." },
 #endif
 
   { "%with-gdb-output-to-port", 2, 0, 0,
-    gdbscm_percent_with_gdb_output_to_port,
+    as_a_scm_t_subr (gdbscm_percent_with_gdb_output_to_port),
     "\
 Temporarily set GDB's output port to PORT and then invoke THUNK.\n\
 \n\
@@ -1372,7 +1326,7 @@ Temporarily set GDB's output port to POR
 This procedure is experimental." },
 
   { "%with-gdb-error-to-port", 2, 0, 0,
-    gdbscm_percent_with_gdb_error_to_port,
+    as_a_scm_t_subr (gdbscm_percent_with_gdb_error_to_port),
     "\
 Temporarily set GDB's error port to PORT and then invoke THUNK.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-pretty-print.c ./gdb/guile/scm-pretty-print.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-pretty-print.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-pretty-print.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme pretty-printing.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -957,10 +957,10 @@ ppscm_print_children (SCM printer, enum 
 
 enum ext_lang_rc
 gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang,
-				 struct type *type, const gdb_byte *valaddr,
-				 int embedded_offset, CORE_ADDR address,
+				 struct type *type,
+				 LONGEST embedded_offset, CORE_ADDR address,
 				 struct ui_file *stream, int recurse,
-				 const struct value *val,
+				 struct value *val,
 				 const struct value_print_options *options,
 				 const struct language_defn *language)
 {
@@ -971,8 +971,9 @@ gdbscm_apply_val_pretty_printer (const s
   struct value *value;
   enum display_hint hint;
   struct cleanup *cleanups;
-  int result = EXT_LANG_RC_NOP;
+  enum ext_lang_rc result = EXT_LANG_RC_NOP;
   enum string_repr_result print_result;
+  const gdb_byte *valaddr = value_contents_for_printing (val);
 
   /* No pretty-printer support for unavailable values.  */
   if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
@@ -984,18 +985,7 @@ gdbscm_apply_val_pretty_printer (const s
   cleanups = make_cleanup (null_cleanup, NULL);
 
   /* Instantiate the printer.  */
-  if (valaddr)
-    valaddr += embedded_offset;
-  value = value_from_contents_and_address (type, valaddr,
-					   address + embedded_offset);
-
-  set_value_component_location (value, val);
-  /* set_value_component_location resets the address, so we may
-     need to set it again.  */
-  if (VALUE_LVAL (value) != lval_internalvar
-      && VALUE_LVAL (value) != lval_internalvar_component
-      && VALUE_LVAL (value) != lval_computed)
-    set_value_address (value, address + embedded_offset);
+  value = value_from_component (val, type, embedded_offset);
 
   val_obj = vlscm_scm_from_value (value);
   if (gdbscm_is_exception (val_obj))
@@ -1055,7 +1045,8 @@ gdbscm_apply_val_pretty_printer (const s
 
 static const scheme_function pretty_printer_functions[] =
 {
-  { "make-pretty-printer", 2, 0, 0, gdbscm_make_pretty_printer,
+  { "make-pretty-printer", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_make_pretty_printer),
     "\
 Create a <gdb:pretty-printer> object.\n\
 \n\
@@ -1064,21 +1055,23 @@ Create a <gdb:pretty-printer> object.\n\
     lookup: a procedure:\n\
       (pretty-printer <gdb:value>) -> <gdb:pretty-printer-worker> | #f." },
 
-  { "pretty-printer?", 1, 0, 0, gdbscm_pretty_printer_p,
+  { "pretty-printer?", 1, 0, 0, as_a_scm_t_subr (gdbscm_pretty_printer_p),
     "\
 Return #t if the object is a <gdb:pretty-printer> object." },
 
-  { "pretty-printer-enabled?", 1, 0, 0, gdbscm_pretty_printer_enabled_p,
+  { "pretty-printer-enabled?", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_pretty_printer_enabled_p),
     "\
 Return #t if the pretty-printer is enabled." },
 
   { "set-pretty-printer-enabled!", 2, 0, 0,
-    gdbscm_set_pretty_printer_enabled_x,
+    as_a_scm_t_subr (gdbscm_set_pretty_printer_enabled_x),
     "\
 Set the enabled flag of the pretty-printer.\n\
 Returns \"unspecified\"." },
 
-  { "make-pretty-printer-worker", 3, 0, 0, gdbscm_make_pretty_printer_worker,
+  { "make-pretty-printer-worker", 3, 0, 0,
+    as_a_scm_t_subr (gdbscm_make_pretty_printer_worker),
     "\
 Create a <gdb:pretty-printer-worker> object.\n\
 \n\
@@ -1089,16 +1082,17 @@ Create a <gdb:pretty-printer-worker> obj
     children:     either #f or a procedure:\n\
       (pretty-printer) -> <gdb:iterator>" },
 
-  { "pretty-printer-worker?", 1, 0, 0, gdbscm_pretty_printer_worker_p,
+  { "pretty-printer-worker?", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_pretty_printer_worker_p),
     "\
 Return #t if the object is a <gdb:pretty-printer-worker> object." },
 
-  { "pretty-printers", 0, 0, 0, gdbscm_pretty_printers,
+  { "pretty-printers", 0, 0, 0, as_a_scm_t_subr (gdbscm_pretty_printers),
     "\
 Return the list of global pretty-printers." },
 
   { "set-pretty-printers!", 1, 0, 0,
-    gdbscm_set_pretty_printers_x,
+    as_a_scm_t_subr (gdbscm_set_pretty_printers_x),
     "\
 Set the list of global pretty-printers." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-progspace.c ./gdb/guile/scm-progspace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-progspace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-progspace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Guile interface to program spaces.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -126,7 +126,7 @@ psscm_release_pspace (pspace_smob *p_smo
 static void
 psscm_handle_pspace_deleted (struct program_space *pspace, void *datum)
 {
-  pspace_smob *p_smob = datum;
+  pspace_smob *p_smob = (pspace_smob *) datum;
 
   gdb_assert (p_smob->pspace == pspace);
 
@@ -158,7 +158,7 @@ psscm_pspace_smob_from_pspace (struct pr
 {
   pspace_smob *p_smob;
 
-  p_smob = program_space_data (pspace, psscm_pspace_data_key);
+  p_smob = (pspace_smob *) program_space_data (pspace, psscm_pspace_data_key);
   if (p_smob == NULL)
     {
       SCM p_scm = psscm_make_pspace_smob ();
@@ -373,38 +373,39 @@ gdbscm_progspaces (void)
 
 static const scheme_function pspace_functions[] =
 {
-  { "progspace?", 1, 0, 0, gdbscm_progspace_p,
+  { "progspace?", 1, 0, 0, as_a_scm_t_subr (gdbscm_progspace_p),
     "\
 Return #t if the object is a <gdb:objfile> object." },
 
-  { "progspace-valid?", 1, 0, 0, gdbscm_progspace_valid_p,
+  { "progspace-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_progspace_valid_p),
     "\
 Return #t if the progspace is valid (hasn't been deleted from gdb)." },
 
-  { "progspace-filename", 1, 0, 0, gdbscm_progspace_filename,
+  { "progspace-filename", 1, 0, 0, as_a_scm_t_subr (gdbscm_progspace_filename),
     "\
 Return the name of the main symbol file of the progspace." },
 
-  { "progspace-objfiles", 1, 0, 0, gdbscm_progspace_objfiles,
+  { "progspace-objfiles", 1, 0, 0, as_a_scm_t_subr (gdbscm_progspace_objfiles),
     "\
 Return the list of objfiles associated with the progspace.\n\
 Objfiles that are separate debug objfiles are not included in the result.\n\
 The order of appearance of objfiles in the result is arbitrary." },
 
-  { "progspace-pretty-printers", 1, 0, 0, gdbscm_progspace_pretty_printers,
+  { "progspace-pretty-printers", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_progspace_pretty_printers),
     "\
 Return a list of pretty-printers of the progspace." },
 
   { "set-progspace-pretty-printers!", 2, 0, 0,
-    gdbscm_set_progspace_pretty_printers_x,
+    as_a_scm_t_subr (gdbscm_set_progspace_pretty_printers_x),
     "\
 Set the list of pretty-printers of the progspace." },
 
-  { "current-progspace", 0, 0, 0, gdbscm_current_progspace,
+  { "current-progspace", 0, 0, 0, as_a_scm_t_subr (gdbscm_current_progspace),
     "\
 Return the current program space if there is one or #f if there isn't one." },
 
-  { "progspaces", 0, 0, 0, gdbscm_progspaces,
+  { "progspaces", 0, 0, 0, as_a_scm_t_subr (gdbscm_progspaces),
     "\
 Return a list of all program spaces." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-safe-call.c ./gdb/guile/scm-safe-call.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-safe-call.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-safe-call.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme support for safe calls into the Guile interpreter.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,10 +28,10 @@
 
 struct c_data
 {
-  void *(*func) (void *);
+  const char *(*func) (void *);
   void *data;
   /* An error message or NULL for success.  */
-  void *result;
+  const char *result;
 };
 
 /* Struct to marshall args through gdbscm_with_catch.  */
@@ -97,7 +97,7 @@ scscm_nop_unwind_handler (void *data, SC
 static SCM
 scscm_recording_pre_unwind_handler (void *datap, SCM key, SCM args)
 {
-  struct with_catch_data *data = datap;
+  struct with_catch_data *data = (struct with_catch_data *) datap;
   excp_matcher_func *matcher = data->excp_matcher;
 
   if (matcher != NULL && matcher (key))
@@ -126,7 +126,7 @@ scscm_recording_pre_unwind_handler (void
 static SCM
 scscm_recording_unwind_handler (void *datap, SCM key, SCM args)
 {
-  struct with_catch_data *data = datap;
+  struct with_catch_data *data = (struct with_catch_data *) datap;
 
   /* We need to record the stack in the exception since we're about to
      throw and lose the location that got the exception.  We do this by
@@ -147,7 +147,7 @@ scscm_recording_unwind_handler (void *da
 static void *
 gdbscm_with_catch (void *data)
 {
-  struct with_catch_data *d = data;
+  struct with_catch_data *d = (struct with_catch_data *) data;
 
   d->catch_result
     = scm_c_catch (SCM_BOOL_T,
@@ -167,8 +167,8 @@ gdbscm_with_catch (void *data)
    The result if NULL if no exception occurred, otherwise it is a statically
    allocated error message (caller must *not* free).  */
 
-void *
-gdbscm_with_guile (void *(*func) (void *), void *data)
+const char *
+gdbscm_with_guile (const char *(*func) (void *), void *data)
 {
   struct c_data c_data;
   struct with_catch_data catch_data;
@@ -230,7 +230,7 @@ gdbscm_call_guile (SCM (*func) (void *),
 static SCM
 scscm_call_0_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_call_0 (args[0]);
 }
@@ -248,7 +248,7 @@ gdbscm_safe_call_0 (SCM proc, excp_match
 static SCM
 scscm_call_1_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_call_1 (args[0], args[1]);
 }
@@ -266,7 +266,7 @@ gdbscm_safe_call_1 (SCM proc, SCM arg0, 
 static SCM
 scscm_call_2_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_call_2 (args[0], args[1], args[2]);
 }
@@ -284,7 +284,7 @@ gdbscm_safe_call_2 (SCM proc, SCM arg0, 
 static SCM
 scscm_call_3_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_call_3 (args[0], args[1], args[2], args[3]);
 }
@@ -303,7 +303,7 @@ gdbscm_safe_call_3 (SCM proc, SCM arg1, 
 static SCM
 scscm_call_4_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_call_4 (args[0], args[1], args[2], args[3], args[4]);
 }
@@ -322,7 +322,7 @@ gdbscm_safe_call_4 (SCM proc, SCM arg1, 
 static SCM
 scscm_apply_1_body (void *argsp)
 {
-  SCM *args = argsp;
+  SCM *args = (SCM *) argsp;
 
   return scm_apply_1 (args[0], args[1], args[2]);
 }
@@ -369,10 +369,11 @@ struct eval_scheme_string_data
 /* Wrapper to eval a C string in the Guile interpreter.
    This is passed to gdbscm_with_guile.  */
 
-static void *
+static const char *
 scscm_eval_scheme_string (void *datap)
 {
-  struct eval_scheme_string_data *data = datap;
+  struct eval_scheme_string_data *data
+    = (struct eval_scheme_string_data *) datap;
   SCM result = scm_c_eval_string (data->string);
 
   if (data->display_result && !scm_is_eq (result, SCM_UNSPECIFIED))
@@ -397,7 +398,7 @@ char *
 gdbscm_safe_eval_string (const char *string, int display_result)
 {
   struct eval_scheme_string_data data = { string, display_result };
-  void *result;
+  const char *result;
 
   result = gdbscm_with_guile (scscm_eval_scheme_string, (void *) &data);
 
@@ -410,10 +411,10 @@ gdbscm_safe_eval_string (const char *str
 
 /* Helper function for gdbscm_safe_source_scheme_script.  */
 
-static void *
+static const char *
 scscm_source_scheme_script (void *data)
 {
-  const char *filename = data;
+  const char *filename = (const char *) data;
 
   /* The Guile docs don't specify what the result is.
      Maybe it's SCM_UNSPECIFIED, but the docs should specify that. :-) */
@@ -438,7 +439,7 @@ gdbscm_safe_source_script (const char *f
      by default.  This function is invoked by the "source" GDB command which
      already has its own path search support.  */
   char *abs_filename = NULL;
-  void *result;
+  const char *result;
 
   if (!IS_ABSOLUTE_PATH (filename))
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-string.c ./gdb/guile/scm-string.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-string.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-string.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB/Scheme charset interface.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -83,7 +83,7 @@ struct scm_to_stringn_data
   SCM string;
   size_t *lenp;
   const char *charset;
-  int conversion_kind;
+  scm_t_string_failed_conversion_handler conversion_kind;
   char *result;
 };
 
@@ -93,7 +93,7 @@ struct scm_to_stringn_data
 static SCM
 gdbscm_call_scm_to_stringn (void *datap)
 {
-  struct scm_to_stringn_data *data = datap;
+  struct scm_to_stringn_data *data = (struct scm_to_stringn_data *) datap;
 
   data->result = scm_to_stringn (data->string, data->lenp, data->charset,
 				 data->conversion_kind);
@@ -151,7 +151,7 @@ struct scm_from_stringn_data
   const char *string;
   size_t len;
   const char *charset;
-  int conversion_kind;
+  scm_t_string_failed_conversion_handler conversion_kind;
   SCM result;
 };
 
@@ -161,7 +161,7 @@ struct scm_from_stringn_data
 static SCM
 gdbscm_call_scm_from_stringn (void *datap)
 {
-  struct scm_from_stringn_data *data = datap;
+  struct scm_from_stringn_data *data = (struct scm_from_stringn_data *) datap;
 
   data->result = scm_from_stringn (data->string, data->len, data->charset,
 				   data->conversion_kind);
@@ -268,7 +268,7 @@ gdbscm_string_to_argv (SCM string_scm)
 
 static const scheme_function string_functions[] =
 {
-  { "string->argv", 1, 0, 0, gdbscm_string_to_argv,
+  { "string->argv", 1, 0, 0, as_a_scm_t_subr (gdbscm_string_to_argv),
   "\
 Convert a string to a list of strings split up according to\n\
 gdb's argv parsing rules." },
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-symbol.c ./gdb/guile/scm-symbol.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-symbol.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-symbol.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to symbols.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -65,7 +65,7 @@ struct syscm_gdbarch_data
 static hashval_t
 syscm_hash_symbol_smob (const void *p)
 {
-  const symbol_smob *s_smob = p;
+  const symbol_smob *s_smob = (const symbol_smob *) p;
 
   return htab_hash_pointer (s_smob->symbol);
 }
@@ -75,8 +75,8 @@ syscm_hash_symbol_smob (const void *p)
 static int
 syscm_eq_symbol_smob (const void *ap, const void *bp)
 {
-  const symbol_smob *a = ap;
-  const symbol_smob *b = bp;
+  const symbol_smob *a = (const symbol_smob *) ap;
+  const symbol_smob *b = (const symbol_smob *) bp;
 
   return (a->symbol == b->symbol
 	  && a->symbol != NULL);
@@ -105,7 +105,7 @@ syscm_get_symbol_map (struct symbol *sym
     {
       struct objfile *objfile = symbol_objfile (symbol);
 
-      htab = objfile_data (objfile, syscm_objfile_data_key);
+      htab = (htab_t) objfile_data (objfile, syscm_objfile_data_key);
       if (htab == NULL)
 	{
 	  htab = gdbscm_create_eqable_gsmob_ptr_map (syscm_hash_symbol_smob,
@@ -116,7 +116,8 @@ syscm_get_symbol_map (struct symbol *sym
   else
     {
       struct gdbarch *gdbarch = symbol_arch (symbol);
-      struct syscm_gdbarch_data *data = gdbarch_data (gdbarch,
+      struct syscm_gdbarch_data *data
+	= (struct syscm_gdbarch_data *) gdbarch_data (gdbarch,
 						      syscm_gdbarch_data_key);
 
       htab = data->htab;
@@ -311,7 +312,7 @@ syscm_mark_symbol_invalid (void **slot, 
 static void
 syscm_del_objfile_symbols (struct objfile *objfile, void *datum)
 {
-  htab_t htab = datum;
+  htab_t htab = (htab_t) datum;
 
   if (htab != NULL)
     {
@@ -550,7 +551,11 @@ gdbscm_symbol_value (SCM self, SCM rest)
       if (symbol_read_needs_frame (symbol) && frame_info == NULL)
 	error (_("Symbol requires a frame to compute its value"));
 
-      value = read_var_value (symbol, frame_info);
+      /* TODO: currently, we have no way to recover the block in which SYMBOL
+	 was found, so we have no block to pass to read_var_value.  This will
+	 yield an incorrect value when symbol is not local to FRAME_INFO (this
+	 can happen with nested functions).  */
+      value = read_var_value (symbol, NULL, frame_info);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -617,7 +622,8 @@ gdbscm_lookup_symbol (SCM name_scm, SCM 
 
   TRY
     {
-      symbol = lookup_symbol (name, block, domain, &is_a_field_of_this);
+      symbol = lookup_symbol (name, block, (domain_enum) domain,
+			      &is_a_field_of_this).symbol;
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
@@ -657,7 +663,7 @@ gdbscm_lookup_global_symbol (SCM name_sc
 
   TRY
     {
-      symbol = lookup_global_symbol (name, NULL, domain);
+      symbol = lookup_global_symbol (name, NULL, (domain_enum) domain).symbol;
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
@@ -712,73 +718,75 @@ static const scheme_integer_constant sym
 
 static const scheme_function symbol_functions[] =
 {
-  { "symbol?", 1, 0, 0, gdbscm_symbol_p,
+  { "symbol?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_p),
     "\
 Return #t if the object is a <gdb:symbol> object." },
 
-  { "symbol-valid?", 1, 0, 0, gdbscm_symbol_valid_p,
+  { "symbol-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_valid_p),
     "\
 Return #t if object is a valid <gdb:symbol> object.\n\
 A valid symbol is a symbol that has not been freed.\n\
 Symbols are freed when the objfile they come from is freed." },
 
-  { "symbol-type", 1, 0, 0, gdbscm_symbol_type,
+  { "symbol-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_type),
     "\
 Return the type of symbol." },
 
-  { "symbol-symtab", 1, 0, 0, gdbscm_symbol_symtab,
+  { "symbol-symtab", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_symtab),
     "\
 Return the symbol table (<gdb:symtab>) containing symbol." },
 
-  { "symbol-line", 1, 0, 0, gdbscm_symbol_line,
+  { "symbol-line", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_line),
     "\
 Return the line number at which the symbol was defined." },
 
-  { "symbol-name", 1, 0, 0, gdbscm_symbol_name,
+  { "symbol-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_name),
     "\
 Return the name of the symbol as a string." },
 
-  { "symbol-linkage-name", 1, 0, 0, gdbscm_symbol_linkage_name,
+  { "symbol-linkage-name", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_symbol_linkage_name),
     "\
 Return the linkage name of the symbol as a string." },
 
-  { "symbol-print-name", 1, 0, 0, gdbscm_symbol_print_name,
+  { "symbol-print-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_print_name),
     "\
 Return the print name of the symbol as a string.\n\
 This is either name or linkage-name, depending on whether the user\n\
 asked GDB to display demangled or mangled names." },
 
-  { "symbol-addr-class", 1, 0, 0, gdbscm_symbol_addr_class,
+  { "symbol-addr-class", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_addr_class),
     "\
 Return the address class of the symbol." },
 
-  { "symbol-needs-frame?", 1, 0, 0, gdbscm_symbol_needs_frame_p,
+  { "symbol-needs-frame?", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_symbol_needs_frame_p),
     "\
 Return #t if the symbol needs a frame to compute its value." },
 
-  { "symbol-argument?", 1, 0, 0, gdbscm_symbol_argument_p,
+  { "symbol-argument?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_argument_p),
     "\
 Return #t if the symbol is a function argument." },
 
-  { "symbol-constant?", 1, 0, 0, gdbscm_symbol_constant_p,
+  { "symbol-constant?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_constant_p),
     "\
 Return #t if the symbol is a constant." },
 
-  { "symbol-function?", 1, 0, 0, gdbscm_symbol_function_p,
+  { "symbol-function?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_function_p),
     "\
 Return #t if the symbol is a function." },
 
-  { "symbol-variable?", 1, 0, 0, gdbscm_symbol_variable_p,
+  { "symbol-variable?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_variable_p),
     "\
 Return #t if the symbol is a variable." },
 
-  { "symbol-value", 1, 0, 1, gdbscm_symbol_value,
+  { "symbol-value", 1, 0, 1, as_a_scm_t_subr (gdbscm_symbol_value),
     "\
 Return the value of the symbol.\n\
 \n\
   Arguments: <gdb:symbol> [#:frame frame]" },
 
-  { "lookup-symbol", 1, 0, 1, gdbscm_lookup_symbol,
+  { "lookup-symbol", 1, 0, 1, as_a_scm_t_subr (gdbscm_lookup_symbol),
     "\
 Return (<gdb:symbol> field-of-this?) if found, otherwise #f.\n\
 \n\
@@ -787,7 +795,8 @@ Return (<gdb:symbol> field-of-this?) if 
     block:  a <gdb:block> object\n\
     domain: a SYMBOL_*_DOMAIN value" },
 
-  { "lookup-global-symbol", 1, 0, 1, gdbscm_lookup_global_symbol,
+  { "lookup-global-symbol", 1, 0, 1,
+    as_a_scm_t_subr (gdbscm_lookup_global_symbol),
     "\
 Return <gdb:symbol> if found, otherwise #f.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-symtab.c ./gdb/guile/scm-symtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-symtab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-symtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to symbol tables.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -86,7 +86,7 @@ static const struct objfile_data *stscm_
 static hashval_t
 stscm_hash_symtab_smob (const void *p)
 {
-  const symtab_smob *st_smob = p;
+  const symtab_smob *st_smob = (const symtab_smob *) p;
 
   return htab_hash_pointer (st_smob->symtab);
 }
@@ -96,8 +96,8 @@ stscm_hash_symtab_smob (const void *p)
 static int
 stscm_eq_symtab_smob (const void *ap, const void *bp)
 {
-  const symtab_smob *a = ap;
-  const symtab_smob *b = bp;
+  const symtab_smob *a = (const symtab_smob *) ap;
+  const symtab_smob *b = (const symtab_smob *) bp;
 
   return (a->symtab == b->symtab
 	  && a->symtab != NULL);
@@ -110,7 +110,7 @@ static htab_t
 stscm_objfile_symtab_map (struct symtab *symtab)
 {
   struct objfile *objfile = SYMTAB_OBJFILE (symtab);
-  htab_t htab = objfile_data (objfile, stscm_objfile_data_key);
+  htab_t htab = (htab_t) objfile_data (objfile, stscm_objfile_data_key);
 
   if (htab == NULL)
     {
@@ -292,7 +292,7 @@ stscm_mark_symtab_invalid (void **slot, 
 static void
 stscm_del_objfile_symtabs (struct objfile *objfile, void *datum)
 {
-  htab_t htab = datum;
+  htab_t htab = (htab_t) datum;
 
   if (htab != NULL)
     {
@@ -614,61 +614,63 @@ gdbscm_find_pc_line (SCM pc_scm)
 
 static const scheme_function symtab_functions[] =
 {
-  { "symtab?", 1, 0, 0, gdbscm_symtab_p,
+  { "symtab?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symtab_p),
     "\
 Return #t if the object is a <gdb:symtab> object." },
 
-  { "symtab-valid?", 1, 0, 0, gdbscm_symtab_valid_p,
+  { "symtab-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symtab_valid_p),
     "\
 Return #t if the symtab still exists in GDB.\n\
 Symtabs are deleted when the corresponding objfile is freed." },
 
-  { "symtab-filename", 1, 0, 0, gdbscm_symtab_filename,
+  { "symtab-filename", 1, 0, 0, as_a_scm_t_subr (gdbscm_symtab_filename),
     "\
 Return the symtab's source file name." },
 
-  { "symtab-fullname", 1, 0, 0, gdbscm_symtab_fullname,
+  { "symtab-fullname", 1, 0, 0, as_a_scm_t_subr (gdbscm_symtab_fullname),
     "\
 Return the symtab's full source file name." },
 
-  { "symtab-objfile", 1, 0, 0, gdbscm_symtab_objfile,
+  { "symtab-objfile", 1, 0, 0, as_a_scm_t_subr (gdbscm_symtab_objfile),
     "\
 Return the symtab's objfile." },
 
-  { "symtab-global-block", 1, 0, 0, gdbscm_symtab_global_block,
+  { "symtab-global-block", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_symtab_global_block),
     "\
 Return the symtab's global block." },
 
-  { "symtab-static-block", 1, 0, 0, gdbscm_symtab_static_block,
+  { "symtab-static-block", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_symtab_static_block),
     "\
 Return the symtab's static block." },
 
-  { "sal?", 1, 0, 0, gdbscm_sal_p,
+  { "sal?", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_p),
     "\
 Return #t if the object is a <gdb:sal> (symtab-and-line) object." },
 
-  { "sal-valid?", 1, 0, 0, gdbscm_sal_valid_p,
+  { "sal-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_valid_p),
     "\
 Return #t if the symtab for the sal still exists in GDB.\n\
 Symtabs are deleted when the corresponding objfile is freed." },
 
-  { "sal-symtab", 1, 0, 0, gdbscm_sal_symtab,
+  { "sal-symtab", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_symtab),
     "\
 Return the sal's symtab." },
 
-  { "sal-line", 1, 0, 0, gdbscm_sal_line,
+  { "sal-line", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_line),
     "\
 Return the sal's line number, or #f if there is none." },
 
-  { "sal-pc", 1, 0, 0, gdbscm_sal_pc,
+  { "sal-pc", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_pc),
     "\
 Return the sal's address." },
 
-  { "sal-last", 1, 0, 0, gdbscm_sal_last,
+  { "sal-last", 1, 0, 0, as_a_scm_t_subr (gdbscm_sal_last),
     "\
 Return the last address specified by the sal, or #f if there is none." },
 
-  { "find-pc-line", 1, 0, 0, gdbscm_find_pc_line,
+  { "find-pc-line", 1, 0, 0, as_a_scm_t_subr (gdbscm_find_pc_line),
     "\
 Return the sal corresponding to the address, or #f if there isn't one.\n\
 \n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-type.c ./gdb/guile/scm-type.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-type.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-type.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to types.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -99,37 +99,27 @@ tyscm_type_smob_type (type_smob *t_smob)
   return t_smob->type;
 }
 
-/* Return the name of TYPE in expanded form.
-   Space for the result is malloc'd, caller must free.
-   If there's an error computing the name, the result is NULL and the
-   exception is stored in *EXCP.  */
+/* Return the name of TYPE in expanded form.  If there's an error
+   computing the name, throws the gdb exception with scm_throw.  */
 
-static char *
-tyscm_type_name (struct type *type, SCM *excp)
+static std::string
+tyscm_type_name (struct type *type)
 {
-  char *name = NULL;
-
   TRY
     {
-      struct cleanup *old_chain;
-      struct ui_file *stb;
-
-      stb = mem_fileopen ();
-      old_chain = make_cleanup_ui_file_delete (stb);
+      string_file stb;
 
-      LA_PRINT_TYPE (type, "", stb, -1, 0, &type_print_raw_options);
-
-      name = ui_file_xstrdup (stb, NULL);
-      do_cleanups (old_chain);
+      LA_PRINT_TYPE (type, "", &stb, -1, 0, &type_print_raw_options);
+      return std::move (stb.string ());
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      *excp = gdbscm_scm_from_gdb_exception (except);
-      return NULL;
+      SCM excp = gdbscm_scm_from_gdb_exception (except);
+      gdbscm_throw (excp);
     }
   END_CATCH
 
-  return name;
+  gdb_assert_not_reached ("no way to get here");
 }
 
 /* Administrivia for type smobs.  */
@@ -139,7 +129,7 @@ tyscm_type_name (struct type *type, SCM 
 static hashval_t
 tyscm_hash_type_smob (const void *p)
 {
-  const type_smob *t_smob = p;
+  const type_smob *t_smob = (const type_smob *) p;
 
   return htab_hash_pointer (t_smob->type);
 }
@@ -149,8 +139,8 @@ tyscm_hash_type_smob (const void *p)
 static int
 tyscm_eq_type_smob (const void *ap, const void *bp)
 {
-  const type_smob *a = ap;
-  const type_smob *b = bp;
+  const type_smob *a = (const type_smob *) ap;
+  const type_smob *b = (const type_smob *) bp;
 
   return (a->type == b->type
 	  && a->type != NULL);
@@ -170,7 +160,7 @@ tyscm_type_map (struct type *type)
   if (objfile == NULL)
     return global_types_map;
 
-  htab = objfile_data (objfile, tyscm_objfile_data_key);
+  htab = (htab_t) objfile_data (objfile, tyscm_objfile_data_key);
   if (htab == NULL)
     {
       htab = gdbscm_create_eqable_gsmob_ptr_map (tyscm_hash_type_smob,
@@ -207,11 +197,7 @@ static int
 tyscm_print_type_smob (SCM self, SCM port, scm_print_state *pstate)
 {
   type_smob *t_smob = (type_smob *) SCM_SMOB_DATA (self);
-  SCM exception;
-  char *name = tyscm_type_name (t_smob->type, &exception);
-
-  if (name == NULL)
-    gdbscm_throw (exception);
+  std::string name = tyscm_type_name (t_smob->type);
 
   /* pstate->writingp = zero if invoked by display/~A, and nonzero if
      invoked by write/~S.  What to do here may need to evolve.
@@ -220,7 +206,7 @@ tyscm_print_type_smob (SCM self, SCM por
   if (pstate->writingp)
     gdbscm_printf (port, "#<%s ", type_smob_name);
 
-  scm_puts (name, port);
+  scm_puts (name.c_str (), port);
 
   if (pstate->writingp)
     scm_puts (">", port);
@@ -353,7 +339,7 @@ static int
 tyscm_copy_type_recursive (void **slot, void *info)
 {
   type_smob *t_smob = (type_smob *) *slot;
-  htab_t copied_types = info;
+  htab_t copied_types = (htab_t) info;
   struct objfile *objfile = TYPE_OBJFILE (t_smob->type);
   htab_t htab;
   eqable_gdb_smob **new_slot;
@@ -388,7 +374,7 @@ tyscm_copy_type_recursive (void **slot, 
 static void
 save_objfile_types (struct objfile *objfile, void *datum)
 {
-  htab_t htab = datum;
+  htab_t htab = (htab_t) datum;
   htab_t copied_types;
 
   if (!gdb_scheme_initialized)
@@ -608,16 +594,8 @@ gdbscm_type_print_name (SCM self)
   type_smob *t_smob
     = tyscm_get_type_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   struct type *type = t_smob->type;
-  char *thetype;
-  SCM exception, result;
-
-  thetype = tyscm_type_name (type, &exception);
-
-  if (thetype == NULL)
-    gdbscm_throw (exception);
-
-  result = gdbscm_scm_from_c_string (thetype);
-  xfree (thetype);
+  std::string thetype = tyscm_type_name (type);
+  SCM result = gdbscm_scm_from_c_string (thetype.c_str ());
 
   return result;
 }
@@ -1341,42 +1319,43 @@ static const scheme_integer_constant typ
 
 static const scheme_function type_functions[] =
 {
-  { "type?", 1, 0, 0, gdbscm_type_p,
+  { "type?", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_p),
     "\
 Return #t if the object is a <gdb:type> object." },
 
-  { "lookup-type", 1, 0, 1, gdbscm_lookup_type,
+  { "lookup-type", 1, 0, 1, as_a_scm_t_subr (gdbscm_lookup_type),
     "\
 Return the <gdb:type> object representing string or #f if not found.\n\
 If block is given then the type is looked for in that block.\n\
 \n\
   Arguments: string [#:block <gdb:block>]" },
 
-  { "type-code", 1, 0, 0, gdbscm_type_code,
+  { "type-code", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_code),
     "\
 Return the code of the type" },
 
-  { "type-tag", 1, 0, 0, gdbscm_type_tag,
+  { "type-tag", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_tag),
     "\
 Return the tag name of the type, or #f if there isn't one." },
 
-  { "type-name", 1, 0, 0, gdbscm_type_name,
+  { "type-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_name),
     "\
 Return the name of the type as a string, or #f if there isn't one." },
 
-  { "type-print-name", 1, 0, 0, gdbscm_type_print_name,
+  { "type-print-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_print_name),
     "\
 Return the print name of the type as a string." },
 
-  { "type-sizeof", 1, 0, 0, gdbscm_type_sizeof,
+  { "type-sizeof", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_sizeof),
     "\
 Return the size of the type, in bytes." },
 
-  { "type-strip-typedefs", 1, 0, 0, gdbscm_type_strip_typedefs,
+  { "type-strip-typedefs", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_type_strip_typedefs),
     "\
 Return a type formed by stripping the type of all typedefs." },
 
-  { "type-array", 2, 1, 0, gdbscm_type_array,
+  { "type-array", 2, 1, 0, as_a_scm_t_subr (gdbscm_type_array),
     "\
 Return a type representing an array of objects of the type.\n\
 \n\
@@ -1386,7 +1365,7 @@ Return a type representing an array of o
     the array size.\n\
     Valid bounds for array indices are [low-bound,high-bound]." },
 
-  { "type-vector", 2, 1, 0, gdbscm_type_vector,
+  { "type-vector", 2, 1, 0, as_a_scm_t_subr (gdbscm_type_vector),
     "\
 Return a type representing a vector of objects of the type.\n\
 Vectors differ from arrays in that if the current language has C-style\n\
@@ -1399,87 +1378,88 @@ They are first class values.\n\
     the array size.\n\
     Valid bounds for array indices are [low-bound,high-bound]." },
 
-  { "type-pointer", 1, 0, 0, gdbscm_type_pointer,
+  { "type-pointer", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_pointer),
     "\
 Return a type of pointer to the type." },
 
-  { "type-range", 1, 0, 0, gdbscm_type_range,
+  { "type-range", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_range),
     "\
 Return (low high) representing the range for the type." },
 
-  { "type-reference", 1, 0, 0, gdbscm_type_reference,
+  { "type-reference", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_reference),
     "\
 Return a type of reference to the type." },
 
-  { "type-target", 1, 0, 0, gdbscm_type_target,
+  { "type-target", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_target),
     "\
 Return the target type of the type." },
 
-  { "type-const", 1, 0, 0, gdbscm_type_const,
+  { "type-const", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_const),
     "\
 Return a const variant of the type." },
 
-  { "type-volatile", 1, 0, 0, gdbscm_type_volatile,
+  { "type-volatile", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_volatile),
     "\
 Return a volatile variant of the type." },
 
-  { "type-unqualified", 1, 0, 0, gdbscm_type_unqualified,
+  { "type-unqualified", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_unqualified),
     "\
 Return a variant of the type without const or volatile attributes." },
 
-  { "type-num-fields", 1, 0, 0, gdbscm_type_num_fields,
+  { "type-num-fields", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_num_fields),
     "\
 Return the number of fields of the type." },
 
-  { "type-fields", 1, 0, 0, gdbscm_type_fields,
+  { "type-fields", 1, 0, 0, as_a_scm_t_subr (gdbscm_type_fields),
     "\
 Return the list of <gdb:field> objects of fields of the type." },
 
-  { "make-field-iterator", 1, 0, 0, gdbscm_make_field_iterator,
+  { "make-field-iterator", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_make_field_iterator),
     "\
 Return a <gdb:iterator> object for iterating over the fields of the type." },
 
-  { "type-field", 2, 0, 0, gdbscm_type_field,
+  { "type-field", 2, 0, 0, as_a_scm_t_subr (gdbscm_type_field),
     "\
 Return the field named by string of the type.\n\
 \n\
   Arguments: <gdb:type> string" },
 
-  { "type-has-field?", 2, 0, 0, gdbscm_type_has_field_p,
+  { "type-has-field?", 2, 0, 0, as_a_scm_t_subr (gdbscm_type_has_field_p),
     "\
 Return #t if the type has field named string.\n\
 \n\
   Arguments: <gdb:type> string" },
 
-  { "field?", 1, 0, 0, gdbscm_field_p,
+  { "field?", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_p),
     "\
 Return #t if the object is a <gdb:field> object." },
 
-  { "field-name", 1, 0, 0, gdbscm_field_name,
+  { "field-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_name),
     "\
 Return the name of the field." },
 
-  { "field-type", 1, 0, 0, gdbscm_field_type,
+  { "field-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_type),
     "\
 Return the type of the field." },
 
-  { "field-enumval", 1, 0, 0, gdbscm_field_enumval,
+  { "field-enumval", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_enumval),
     "\
 Return the enum value represented by the field." },
 
-  { "field-bitpos", 1, 0, 0, gdbscm_field_bitpos,
+  { "field-bitpos", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_bitpos),
     "\
 Return the offset in bits of the field in its containing type." },
 
-  { "field-bitsize", 1, 0, 0, gdbscm_field_bitsize,
+  { "field-bitsize", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_bitsize),
     "\
 Return the size of the field in bits." },
 
-  { "field-artificial?", 1, 0, 0, gdbscm_field_artificial_p,
+  { "field-artificial?", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_artificial_p),
     "\
 Return #t if the field is artificial." },
 
-  { "field-baseclass?", 1, 0, 0, gdbscm_field_baseclass_p,
+  { "field-baseclass?", 1, 0, 0, as_a_scm_t_subr (gdbscm_field_baseclass_p),
     "\
 Return #t if the field is a baseclass." },
 
@@ -1504,7 +1484,7 @@ gdbscm_initialize_types (void)
   /* This function is "private".  */
   tyscm_next_field_x_proc
     = scm_c_define_gsubr ("%type-next-field!", 1, 0, 0,
-			  gdbscm_type_next_field_x);
+			  as_a_scm_t_subr (gdbscm_type_next_field_x));
   scm_set_procedure_property_x (tyscm_next_field_x_proc,
 				gdbscm_documentation_symbol,
 				gdbscm_scm_from_c_string ("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-utils.c ./gdb/guile/scm-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General utility routines for GDB/Scheme code.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -201,7 +201,7 @@ extract_arg (char format_char, SCM arg, 
     {
     case 's':
       {
-	char **arg_ptr = argp;
+	char **arg_ptr = (char **) argp;
 
 	CHECK_TYPE (gdbscm_is_true (scm_string_p (arg)), arg, position,
 		    func_name, _("string"));
@@ -210,7 +210,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 't':
       {
-	int *arg_ptr = argp;
+	int *arg_ptr = (int *) argp;
 
 	/* While in Scheme, anything non-#f is "true", we're strict.  */
 	CHECK_TYPE (gdbscm_is_bool (arg), arg, position, func_name,
@@ -220,7 +220,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'i':
       {
-	int *arg_ptr = argp;
+	int *arg_ptr = (int *) argp;
 
 	CHECK_TYPE (scm_is_signed_integer (arg, INT_MIN, INT_MAX),
 		    arg, position, func_name, _("int"));
@@ -229,7 +229,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'u':
       {
-	int *arg_ptr = argp;
+	int *arg_ptr = (int *) argp;
 
 	CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT_MAX),
 		    arg, position, func_name, _("unsigned int"));
@@ -238,7 +238,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'l':
       {
-	long *arg_ptr = argp;
+	long *arg_ptr = (long *) argp;
 
 	CHECK_TYPE (scm_is_signed_integer (arg, LONG_MIN, LONG_MAX),
 		    arg, position, func_name, _("long"));
@@ -247,7 +247,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'n':
       {
-	unsigned long *arg_ptr = argp;
+	unsigned long *arg_ptr = (unsigned long *) argp;
 
 	CHECK_TYPE (scm_is_unsigned_integer (arg, 0, ULONG_MAX),
 		    arg, position, func_name, _("unsigned long"));
@@ -256,7 +256,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'L':
       {
-	LONGEST *arg_ptr = argp;
+	LONGEST *arg_ptr = (LONGEST *) argp;
 
 	CHECK_TYPE (scm_is_signed_integer (arg, INT64_MIN, INT64_MAX),
 		    arg, position, func_name, _("LONGEST"));
@@ -265,7 +265,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'U':
       {
-	ULONGEST *arg_ptr = argp;
+	ULONGEST *arg_ptr = (ULONGEST *) argp;
 
 	CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT64_MAX),
 		    arg, position, func_name, _("ULONGEST"));
@@ -274,7 +274,7 @@ extract_arg (char format_char, SCM arg, 
       }
     case 'O':
       {
-	SCM *arg_ptr = argp;
+	SCM *arg_ptr = (SCM *) argp;
 
 	*arg_ptr = arg;
 	break;
@@ -432,8 +432,8 @@ gdbscm_parse_function_args (const char *
 
   if (num_keywords > 0)
     {
-      SCM *keyword_args = (SCM *) alloca (num_keywords * sizeof (SCM));
-      int *keyword_positions = (int *) alloca (num_keywords * sizeof (int));
+      SCM *keyword_args = XALLOCAVEC (SCM, num_keywords);
+      int *keyword_positions = XALLOCAVEC (int, num_keywords);
 
       gdb_assert (*p == '#');
       ++p;
@@ -587,7 +587,8 @@ char *
 gdbscm_gc_xstrdup (const char *str)
 {
   size_t len = strlen (str);
-  char *result = scm_gc_malloc_pointerless (len + 1, "gdbscm_gc_xstrdup");
+  char *result
+    = (char *) scm_gc_malloc_pointerless (len + 1, "gdbscm_gc_xstrdup");
 
   strcpy (result, str);
   return result;
@@ -607,8 +608,9 @@ gdbscm_gc_dup_argv (char **argv)
 
   /* Allocating "pointerless" works because the pointers are all
      self-contained within the object.  */
-  result = scm_gc_malloc_pointerless (((len + 1) * sizeof (char *))
-				      + string_space, "parameter enum list");
+  result = (char **) scm_gc_malloc_pointerless (((len + 1) * sizeof (char *))
+						+ string_space,
+						"parameter enum list");
   p = (char *) &result[len + 1];
 
   for (i = 0; i < len; ++i)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-value.c ./gdb/guile/scm-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/guile/scm-value.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/guile/scm-value.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Scheme interface to values.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -141,7 +141,6 @@ static int
 vlscm_print_value_smob (SCM self, SCM port, scm_print_state *pstate)
 {
   value_smob *v_smob = (value_smob *) SCM_SMOB_DATA (self);
-  char *s = NULL;
   struct value_print_options opts;
 
   if (pstate->writingp)
@@ -158,13 +157,10 @@ vlscm_print_value_smob (SCM self, SCM po
 
   TRY
     {
-      struct ui_file *stb = mem_fileopen ();
-      struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
+      string_file stb;
 
-      common_val_print (v_smob->value, stb, 0, &opts, current_language);
-      s = ui_file_xstrdup (stb, NULL);
-
-      do_cleanups (old_chain);
+      common_val_print (v_smob->value, &stb, 0, &opts, current_language);
+      scm_puts (stb.c_str (), port);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -172,12 +168,6 @@ vlscm_print_value_smob (SCM self, SCM po
     }
   END_CATCH
 
-  if (s != NULL)
-    {
-      scm_puts (s, port);
-      xfree (s);
-    }
-
   if (pstate->writingp)
     scm_puts (">", port);
 
@@ -581,7 +571,7 @@ gdbscm_value_dynamic_type (SCM self)
 	= make_cleanup_value_free_to_mark (value_mark ());
 
       type = value_type (value);
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
 
       if (((TYPE_CODE (type) == TYPE_CODE_PTR)
 	   || (TYPE_CODE (type) == TYPE_CODE_REF))
@@ -726,7 +716,8 @@ gdbscm_value_field (SCM self, SCM field_
     {
       struct value *tmp = value;
 
-      res_val = value_struct_elt (&tmp, NULL, field, NULL, NULL);
+      res_val = value_struct_elt (&tmp, NULL, field, NULL,
+				  "struct/class/union");
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -851,7 +842,7 @@ gdbscm_value_call (SCM self, SCM args)
       SCM except_scm;
       long i;
 
-      vargs = alloca (sizeof (struct value *) * args_count);
+      vargs = XALLOCAVEC (struct value *, args_count);
       for (i = 0; i < args_count; i++)
 	{
 	  SCM arg = scm_car (args);
@@ -906,7 +897,7 @@ gdbscm_value_to_bytevector (SCM self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
       length = TYPE_LENGTH (type);
       contents = value_contents (value);
     }
@@ -950,7 +941,7 @@ gdbscm_value_to_bool (SCM self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -993,7 +984,7 @@ gdbscm_value_to_integer (SCM self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1039,7 +1030,7 @@ gdbscm_value_to_real (SCM self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1158,7 +1149,7 @@ gdbscm_value_to_string (SCM self, SCM re
      Make sure we don't leak.  This is done via scm_dynwind_begin, et.al.  */
   discard_cleanups (cleanups);
 
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
 
   gdbscm_dynwind_xfree (encoding);
   gdbscm_dynwind_xfree (buffer);
@@ -1281,21 +1272,15 @@ gdbscm_value_print (SCM self)
     = vlscm_get_value_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   struct value *value = v_smob->value;
   struct value_print_options opts;
-  char *s = NULL;
-  SCM result;
 
   get_user_print_options (&opts);
   opts.deref_ref = 0;
 
+  string_file stb;
+
   TRY
     {
-      struct ui_file *stb = mem_fileopen ();
-      struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
-
-      common_val_print (value, stb, 0, &opts, current_language);
-      s = ui_file_xstrdup (stb, NULL);
-
-      do_cleanups (old_chain);
+      common_val_print (value, &stb, 0, &opts, current_language);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1308,11 +1293,8 @@ gdbscm_value_print (SCM self)
      IWBN to use scm_take_locale_string here, but we'd have to temporarily
      override the default port conversion handler because contrary to
      documentation it doesn't necessarily free the input string.  */
-  result = scm_from_stringn (s, strlen (s), host_charset (),
-			     SCM_FAILED_CONVERSION_QUESTION_MARK);
-  xfree (s);
-
-  return result;
+  return scm_from_stringn (stb.c_str (), stb.size (), host_charset (),
+			   SCM_FAILED_CONVERSION_QUESTION_MARK);
 }
 
 /* (parse-and-eval string) -> <gdb:value>
@@ -1410,11 +1392,11 @@ gdbscm_history_append_x (SCM value)
 
 static const scheme_function value_functions[] =
 {
-  { "value?", 1, 0, 0, gdbscm_value_p,
+  { "value?", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_p),
     "\
 Return #t if the object is a <gdb:value> object." },
 
-  { "make-value", 1, 0, 1, gdbscm_make_value,
+  { "make-value", 1, 0, 1, as_a_scm_t_subr (gdbscm_make_value),
     "\
 Create a <gdb:value> representing object.\n\
 Typically this is used to convert numbers and strings to\n\
@@ -1422,47 +1404,50 @@ Typically this is used to convert number
 \n\
   Arguments: object [#:type <gdb:type>]" },
 
-  { "value-optimized-out?", 1, 0, 0, gdbscm_value_optimized_out_p,
+  { "value-optimized-out?", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_value_optimized_out_p),
     "\
 Return #t if the value has been optimizd out." },
 
-  { "value-address", 1, 0, 0, gdbscm_value_address,
+  { "value-address", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_address),
     "\
 Return the address of the value." },
 
-  { "value-type", 1, 0, 0, gdbscm_value_type,
+  { "value-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_type),
     "\
 Return the type of the value." },
 
-  { "value-dynamic-type", 1, 0, 0, gdbscm_value_dynamic_type,
+  { "value-dynamic-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_dynamic_type),
     "\
 Return the dynamic type of the value." },
 
-  { "value-cast", 2, 0, 0, gdbscm_value_cast,
+  { "value-cast", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_cast),
     "\
 Cast the value to the supplied type.\n\
 \n\
   Arguments: <gdb:value> <gdb:type>" },
 
-  { "value-dynamic-cast", 2, 0, 0, gdbscm_value_dynamic_cast,
+  { "value-dynamic-cast", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_dynamic_cast),
     "\
 Cast the value to the supplied type, as if by the C++\n\
 dynamic_cast operator.\n\
 \n\
   Arguments: <gdb:value> <gdb:type>" },
 
-  { "value-reinterpret-cast", 2, 0, 0, gdbscm_value_reinterpret_cast,
+  { "value-reinterpret-cast", 2, 0, 0,
+    as_a_scm_t_subr (gdbscm_value_reinterpret_cast),
     "\
 Cast the value to the supplied type, as if by the C++\n\
 reinterpret_cast operator.\n\
 \n\
   Arguments: <gdb:value> <gdb:type>" },
 
-  { "value-dereference", 1, 0, 0, gdbscm_value_dereference,
+  { "value-dereference", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_dereference),
     "\
 Return the result of applying the C unary * operator to the value." },
 
-  { "value-referenced-value", 1, 0, 0, gdbscm_value_referenced_value,
+  { "value-referenced-value", 1, 0, 0,
+    as_a_scm_t_subr (gdbscm_value_referenced_value),
     "\
 Given a value of a reference type, return the value referenced.\n\
 The difference between this function and value-dereference is that\n\
@@ -1472,19 +1457,19 @@ For example, for a value which is a refe
 value-dereference will result in a value of type 'int' while\n\
 value-referenced-value will result in a value of type 'int *'." },
 
-  { "value-field", 2, 0, 0, gdbscm_value_field,
+  { "value-field", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_field),
     "\
 Return the specified field of the value.\n\
 \n\
   Arguments: <gdb:value> string" },
 
-  { "value-subscript", 2, 0, 0, gdbscm_value_subscript,
+  { "value-subscript", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_subscript),
     "\
 Return the value of the array at the specified index.\n\
 \n\
   Arguments: <gdb:value> integer" },
 
-  { "value-call", 2, 0, 0, gdbscm_value_call,
+  { "value-call", 2, 0, 0, as_a_scm_t_subr (gdbscm_value_call),
     "\
 Perform an inferior function call taking the value as a pointer to the\n\
 function to call.\n\
@@ -1494,27 +1479,27 @@ The result is the value returned by the 
 \n\
   Arguments: <gdb:value> arg-list" },
 
-  { "value->bool", 1, 0, 0, gdbscm_value_to_bool,
+  { "value->bool", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_to_bool),
     "\
 Return the Scheme boolean representing the GDB value.\n\
 The value must be \"integer like\".  Pointers are ok." },
 
-  { "value->integer", 1, 0, 0, gdbscm_value_to_integer,
+  { "value->integer", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_to_integer),
     "\
 Return the Scheme integer representing the GDB value.\n\
 The value must be \"integer like\".  Pointers are ok." },
 
-  { "value->real", 1, 0, 0, gdbscm_value_to_real,
+  { "value->real", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_to_real),
     "\
 Return the Scheme real number representing the GDB value.\n\
 The value must be a number." },
 
-  { "value->bytevector", 1, 0, 0, gdbscm_value_to_bytevector,
+  { "value->bytevector", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_to_bytevector),
     "\
 Return a Scheme bytevector with the raw contents of the GDB value.\n\
 No transformation, endian or otherwise, is performed." },
 
-  { "value->string", 1, 0, 1, gdbscm_value_to_string,
+  { "value->string", 1, 0, 1, as_a_scm_t_subr (gdbscm_value_to_string),
     "\
 Return the Unicode string of the value's contents.\n\
 If ENCODING is not given, the string is assumed to be encoded in\n\
@@ -1528,7 +1513,8 @@ If LENGTH is provided, only fetch string
              [#:encoding encoding] [#:errors \"error\"|\"substitute\"]\n\
              [#:length length]" },
 
-  { "value->lazy-string", 1, 0, 1, gdbscm_value_to_lazy_string,
+  { "value->lazy-string", 1, 0, 1,
+    as_a_scm_t_subr (gdbscm_value_to_lazy_string),
     "\
 Return a Scheme object representing a lazily fetched Unicode string\n\
 of the value's contents.\n\
@@ -1538,36 +1524,36 @@ If LENGTH is provided, only fetch string
 \n\
   Arguments: <gdb:value> [#:encoding encoding] [#:length length]" },
 
-  { "value-lazy?", 1, 0, 0, gdbscm_value_lazy_p,
+  { "value-lazy?", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_lazy_p),
     "\
 Return #t if the value is lazy (not fetched yet from the inferior).\n\
 A lazy value is fetched when needed, or when the value-fetch-lazy! function\n\
 is called." },
 
-  { "make-lazy-value", 2, 0, 0, gdbscm_make_lazy_value,
+  { "make-lazy-value", 2, 0, 0, as_a_scm_t_subr (gdbscm_make_lazy_value),
     "\
 Create a <gdb:value> that will be lazily fetched from the target.\n\
 \n\
   Arguments: <gdb:type> address" },
 
-  { "value-fetch-lazy!", 1, 0, 0, gdbscm_value_fetch_lazy_x,
+  { "value-fetch-lazy!", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_fetch_lazy_x),
     "\
 Fetch the value from the inferior, if it was lazy.\n\
 The result is \"unspecified\"." },
 
-  { "value-print", 1, 0, 0, gdbscm_value_print,
+  { "value-print", 1, 0, 0, as_a_scm_t_subr (gdbscm_value_print),
     "\
 Return the string representation (print form) of the value." },
 
-  { "parse-and-eval", 1, 0, 0, gdbscm_parse_and_eval,
+  { "parse-and-eval", 1, 0, 0, as_a_scm_t_subr (gdbscm_parse_and_eval),
     "\
 Evaluates string in gdb and returns the result as a <gdb:value> object." },
 
-  { "history-ref", 1, 0, 0, gdbscm_history_ref,
+  { "history-ref", 1, 0, 0, as_a_scm_t_subr (gdbscm_history_ref),
     "\
 Return the specified value from GDB's value history." },
 
-  { "history-append!", 1, 0, 0, gdbscm_history_append_x,
+  { "history-append!", 1, 0, 0, as_a_scm_t_subr (gdbscm_history_append_x),
     "\
 Append the specified value onto GDB's value history." },
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/h8300-tdep.c ./gdb/h8300-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/h8300-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/h8300-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-machine dependent code for Renesas H8/300, for GDB.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -236,8 +236,6 @@ h8300_is_argument_spill (struct gdbarch 
 	}
       else if (IS_MOVL_EXT (w2))
 	{
-	  int w3 = read_memory_integer (pc + 4, 2, byte_order);
-
 	  if (IS_MOVL_Rn24_SP (read_memory_integer (pc + 4, 2, byte_order)))
 	    {
 	      LONGEST disp = read_memory_integer (pc + 6, 4, byte_order);
@@ -432,7 +430,7 @@ h8300_frame_cache (struct frame_info *th
   CORE_ADDR current_pc;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct h8300_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct h8300_frame_cache);
   h8300_init_frame_cache (gdbarch, cache);
@@ -671,7 +669,7 @@ h8300_push_dummy_call (struct gdbarch *g
 
       /* Pad the argument appropriately.  */
       int padded_len = align_up (len, wordsize);
-      gdb_byte *padded = xmalloc (padded_len);
+      gdb_byte *padded = (gdb_byte *) xmalloc (padded_len);
       back_to = make_cleanup (xfree, padded);
 
       memset (padded, 0, padded_len);
@@ -742,7 +740,7 @@ h8300_push_dummy_call (struct gdbarch *g
 
 static void
 h8300_extract_return_value (struct type *type, struct regcache *regcache,
-			    void *valbuf)
+			    gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -760,7 +758,7 @@ h8300_extract_return_value (struct type 
       regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
       store_unsigned_integer (valbuf, 2, byte_order, c);
       regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
-      store_unsigned_integer ((void *)((char *) valbuf + 2), 2, byte_order, c);
+      store_unsigned_integer (valbuf + 2, 2, byte_order, c);
       break;
     case 8:			/* long long is now 8 bytes.  */
       if (TYPE_CODE (type) == TYPE_CODE_INT)
@@ -779,7 +777,7 @@ h8300_extract_return_value (struct type 
 
 static void
 h8300h_extract_return_value (struct type *type, struct regcache *regcache,
-			     void *valbuf)
+			     gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -799,8 +797,7 @@ h8300h_extract_return_value (struct type
 	  regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
 	  store_unsigned_integer (valbuf, 4, byte_order, c);
 	  regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
-	  store_unsigned_integer ((void *) ((char *) valbuf + 4), 4,
-				  byte_order, c);
+	  store_unsigned_integer (valbuf + 4, 4, byte_order, c);
 	}
       else
 	{
@@ -845,7 +842,7 @@ h8300h_use_struct_convention (struct typ
 
 static void
 h8300_store_return_value (struct type *type, struct regcache *regcache,
-			  const void *valbuf)
+			  const gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -874,7 +871,7 @@ h8300_store_return_value (struct type *t
 
 static void
 h8300h_store_return_value (struct type *type, struct regcache *regcache,
-			   const void *valbuf)
+			   const gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1054,7 +1051,7 @@ h8300_print_register (struct gdbarch *gd
 	fprintf_filtered (file, "u> ");
       if ((C | Z) == 1)
 	fprintf_filtered (file, "u<= ");
-      if ((C == 0))
+      if (C == 0)
 	fprintf_filtered (file, "u>= ");
       if (C == 1)
 	fprintf_filtered (file, "u< ");
@@ -1245,31 +1242,20 @@ h8300s_dbg_reg_to_regnum (struct gdbarch
   return regno;
 }
 
-static const unsigned char *
-h8300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			  int *lenptr)
-{
-  /*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */
-  static unsigned char breakpoint[] = { 0x01, 0x80 };	/* Sleep */
+/*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */
+constexpr gdb_byte h8300_break_insn[] = { 0x01, 0x80 };	/* Sleep */
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+typedef BP_MANIPULATION (h8300_break_insn) h8300_breakpoint;
 
 static struct gdbarch *
 h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
-  struct gdbarch_tdep *tdep = NULL;
   struct gdbarch *gdbarch;
 
   arches = gdbarch_list_lookup_by_info (arches, &info);
   if (arches != NULL)
     return arches->gdbarch;
 
-#if 0
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
-#endif
-
   if (info.bfd_arch_info->arch != bfd_arch_h8300)
     return NULL;
 
@@ -1385,7 +1371,10 @@ h8300_gdbarch_init (struct gdbarch_info 
   /* Stack grows up.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       h8300_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       h8300_breakpoint::bp_from_kind);
   set_gdbarch_push_dummy_call (gdbarch, h8300_push_dummy_call);
 
   set_gdbarch_char_signed (gdbarch, 0);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-bsd-tdep.c ./gdb/hppa-bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-bsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,141 @@
+/* Target-dependent code for HP PA-RISC BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "objfiles.h"
+#include "target.h"
+#include "value.h"
+
+#include "elf/common.h"
+
+#include "hppa-tdep.h"
+#include "hppa-bsd-tdep.h"
+#include "dwarf2-frame.h"
+#include "solib-svr4.h"
+
+static CORE_ADDR
+hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR faddr = value_as_address (function);
+  struct obj_section *faddr_sec;
+  gdb_byte buf[4];
+
+  /* Is this a plabel? If so, dereference it to get the Global Pointer
+     value.  */
+  if (faddr & 2)
+    {
+      if (target_read_memory ((faddr & ~3) + 4, buf, sizeof buf) == 0)
+	return extract_unsigned_integer (buf, sizeof buf, byte_order);
+    }
+
+  /* If the address is in the .plt section, then the real function
+     hasn't yet been fixed up by the linker so we cannot determine the
+     Global Pointer for that function.  */
+  if (in_plt_section (faddr))
+    return 0;
+
+  faddr_sec = find_pc_section (faddr);
+  if (faddr_sec != NULL)
+    {
+      struct obj_section *sec;
+
+      ALL_OBJFILE_OSECTIONS (faddr_sec->objfile, sec)
+	{
+	  if (strcmp (sec->the_bfd_section->name, ".dynamic") == 0)
+	    break;
+	}
+
+      if (sec < faddr_sec->objfile->sections_end)
+	{
+	  CORE_ADDR addr = obj_section_addr (sec);
+	  CORE_ADDR endaddr = obj_section_endaddr (sec);
+
+	  while (addr < endaddr)
+	    {
+	      gdb_byte buf[4];
+	      LONGEST tag;
+
+	      if (target_read_memory (addr, buf, sizeof buf) != 0)
+		break;
+
+	      tag = extract_signed_integer (buf, sizeof buf, byte_order);
+	      if (tag == DT_PLTGOT)
+		{
+		  CORE_ADDR pltgot;
+
+		  if (target_read_memory (addr + 4, buf, sizeof buf) != 0)
+		    break;
+
+		  /* The NetBSD/OpenBSD ld.so doesn't relocate DT_PLTGOT, so
+		     we have to do it ourselves.  */
+		  pltgot = extract_unsigned_integer (buf, sizeof buf,
+						     byte_order);
+		  pltgot += ANOFFSET (sec->objfile->section_offsets,
+				      SECT_OFF_TEXT (sec->objfile));
+
+		  return pltgot;
+		}
+
+	      if (tag == DT_NULL)
+		break;
+
+	      addr += 8;
+	    }
+	}
+    }
+
+  return 0;
+}
+
+
+static void
+hppabsd_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+			       struct dwarf2_frame_state_reg *reg,
+			       struct frame_info *this_frame)
+{
+  if (regnum == HPPA_PCOQ_HEAD_REGNUM)
+    reg->how = DWARF2_FRAME_REG_RA;
+  else if (regnum == HPPA_SP_REGNUM)
+    reg->how = DWARF2_FRAME_REG_CFA;
+}
+
+void
+hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* OpenBSD and NetBSD have a 64-bit 'long double'.  */
+  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
+
+  /* OpenBSD and NetBSD use ELF.  */
+  tdep->is_elf = 1;
+  tdep->find_global_pointer = hppabsd_find_global_pointer;
+  tdep->in_solib_call_trampoline = hppa_in_solib_call_trampoline;
+  set_gdbarch_skip_trampoline_code (gdbarch, hppa_skip_trampoline_code);
+
+  /* OpenBSD and NetBSD use SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  /* Hook in the DWARF CFI frame unwinder.  */
+  dwarf2_frame_set_init_reg (gdbarch, hppabsd_dwarf2_frame_init_reg);
+  dwarf2_append_unwinders (gdbarch);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppabsd-tdep.c ./gdb/hppabsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppabsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppabsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,141 +0,0 @@
-/* Target-dependent code for HP PA-RISC BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "objfiles.h"
-#include "target.h"
-#include "value.h"
-
-#include "elf/common.h"
-
-#include "hppa-tdep.h"
-#include "hppabsd-tdep.h"
-#include "dwarf2-frame.h"
-#include "solib-svr4.h"
-
-static CORE_ADDR
-hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR faddr = value_as_address (function);
-  struct obj_section *faddr_sec;
-  gdb_byte buf[4];
-
-  /* Is this a plabel? If so, dereference it to get the Global Pointer
-     value.  */
-  if (faddr & 2)
-    {
-      if (target_read_memory ((faddr & ~3) + 4, buf, sizeof buf) == 0)
-	return extract_unsigned_integer (buf, sizeof buf, byte_order);
-    }
-
-  /* If the address is in the .plt section, then the real function
-     hasn't yet been fixed up by the linker so we cannot determine the
-     Global Pointer for that function.  */
-  if (in_plt_section (faddr))
-    return 0;
-
-  faddr_sec = find_pc_section (faddr);
-  if (faddr_sec != NULL)
-    {
-      struct obj_section *sec;
-
-      ALL_OBJFILE_OSECTIONS (faddr_sec->objfile, sec)
-	{
-	  if (strcmp (sec->the_bfd_section->name, ".dynamic") == 0)
-	    break;
-	}
-
-      if (sec < faddr_sec->objfile->sections_end)
-	{
-	  CORE_ADDR addr = obj_section_addr (sec);
-	  CORE_ADDR endaddr = obj_section_endaddr (sec);
-
-	  while (addr < endaddr)
-	    {
-	      gdb_byte buf[4];
-	      LONGEST tag;
-
-	      if (target_read_memory (addr, buf, sizeof buf) != 0)
-		break;
-
-	      tag = extract_signed_integer (buf, sizeof buf, byte_order);
-	      if (tag == DT_PLTGOT)
-		{
-		  CORE_ADDR pltgot;
-
-		  if (target_read_memory (addr + 4, buf, sizeof buf) != 0)
-		    break;
-
-		  /* The NetBSD/OpenBSD ld.so doesn't relocate DT_PLTGOT, so
-		     we have to do it ourselves.  */
-		  pltgot = extract_unsigned_integer (buf, sizeof buf,
-						     byte_order);
-		  pltgot += ANOFFSET (sec->objfile->section_offsets,
-				      SECT_OFF_TEXT (sec->objfile));
-
-		  return pltgot;
-		}
-
-	      if (tag == DT_NULL)
-		break;
-
-	      addr += 8;
-	    }
-	}
-    }
-
-  return 0;
-}
-
-
-static void
-hppabsd_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
-			       struct dwarf2_frame_state_reg *reg,
-			       struct frame_info *this_frame)
-{
-  if (regnum == HPPA_PCOQ_HEAD_REGNUM)
-    reg->how = DWARF2_FRAME_REG_RA;
-  else if (regnum == HPPA_SP_REGNUM)
-    reg->how = DWARF2_FRAME_REG_CFA;
-}
-
-void
-hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* OpenBSD and NetBSD have a 64-bit 'long double'.  */
-  set_gdbarch_long_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
-
-  /* OpenBSD and NetBSD use ELF.  */
-  tdep->is_elf = 1;
-  tdep->find_global_pointer = hppabsd_find_global_pointer;
-  tdep->in_solib_call_trampoline = hppa_in_solib_call_trampoline;
-  set_gdbarch_skip_trampoline_code (gdbarch, hppa_skip_trampoline_code);
-
-  /* OpenBSD and NetBSD use SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  /* Hook in the DWARF CFI frame unwinder.  */
-  dwarf2_frame_set_init_reg (gdbarch, hppabsd_dwarf2_frame_init_reg);
-  dwarf2_append_unwinders (gdbarch);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-bsd-tdep.h ./gdb/hppa-bsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-bsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-bsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* Target-dependent code for HP PA-RISC BSD's.
+
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef HPPA_BSD_TDEP_H
+#define HPPA_BSD_TDEP_H
+
+extern void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
+
+#endif /* hppa-bsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppabsd-tdep.h ./gdb/hppabsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppabsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppabsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-/* Target-dependent code for HP PA-RISC BSD's.
-
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef HPPABSD_TDEP_H
-#define HPPABSD_TDEP_H
-
-extern void hppabsd_init_abi (struct gdbarch_info, struct gdbarch *);
-
-#endif /* hppabsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-nat.c ./gdb/hppa-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppa-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Functions specific to running GDB native on HPPA running GNU/Linux.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +25,7 @@
 #include "linux-nat.h"
 
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <linux/version.h>
 
 #include <asm/ptrace.h>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-offsets.h ./gdb/hppa-linux-offsets.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-offsets.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppa-linux-offsets.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Register offsets for HPPA running GNU/Linux.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-tdep.c ./gdb/hppa-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppa-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux running on PA-RISC, for GDB.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,14 +39,13 @@ static int
 hppa_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
   /* The general registers and the sar are the same in both sets.  */
-  if (reg <= 32)
+  if (reg >= 0 && reg <= 32)
     return reg;
 
   /* fr4-fr31 (left and right halves) are mapped from 72.  */
   if (reg >= 72 && reg <= 72 + 28 * 2)
     return HPPA_FP4_REGNUM + (reg - 72);
 
-  warning (_("Unmapped DWARF DBX Register #%d encountered."), reg);
   return -1;
 }
 
@@ -205,7 +204,7 @@ hppa_linux_sigtramp_frame_unwind_cache (
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct hppa_linux_sigtramp_unwind_cache *) *this_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct hppa_linux_sigtramp_unwind_cache);
   *this_cache = info;
@@ -519,6 +518,7 @@ hppa_linux_init_abi (struct gdbarch_info
      some discussions to support 128-bit long double, but it requires some
      more work in gcc and glibc first.  */
   set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
 
   set_gdbarch_iterate_over_regset_sections
     (gdbarch, hppa_linux_iterate_over_regset_sections);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-nbsd-nat.c ./gdb/hppa-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,245 @@
+/* Native-dependent code for NetBSD/hppa.
+
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "hppa-tdep.h"
+#include "inf-ptrace.h"
+
+#include "nbsd-nat.h"
+
+static int
+hppanbsd_gregset_supplies_p (int regnum)
+{
+  return ((regnum >= HPPA_R0_REGNUM && regnum <= HPPA_R31_REGNUM) ||
+          (regnum >= HPPA_SAR_REGNUM && regnum <= HPPA_PCSQ_TAIL_REGNUM) ||
+          regnum == HPPA_IPSW_REGNUM ||
+	  (regnum >= HPPA_SR4_REGNUM && regnum <= HPPA_SR4_REGNUM + 5));
+}
+
+static int
+hppanbsd_fpregset_supplies_p (int regnum)
+{
+  return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const char *regs = gregs;
+  const int *r = gregs;
+  int regnum;
+
+  for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+
+  regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+  regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+  regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+  regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+  regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+  regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
+  regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
+  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
+  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
+  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
+}
+
+/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
+
+static void
+hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
+{
+  const char *regs = fpregs;
+  int regnum;
+
+  for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
+       regnum += 2, regs += 8)
+    {
+      regcache_raw_supply (regcache, regnum, regs);
+      regcache_raw_supply (regcache, regnum + 1, regs + 4);
+    }
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+hppanbsd_collect_gregset (const struct regcache *regcache,
+			  void *gregs, int regnum)
+{
+  char *regs = gregs;
+  int *r = gregs;
+  int i;
+
+  for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 4);
+    }
+
+  if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
+    regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+  if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+  if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+
+  if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+    regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+  if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+  if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+  if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+  if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+    regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+  if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
+    regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+  if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
+    regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 1)
+    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
+  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 2)
+    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
+  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3)
+    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
+  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4)
+    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
+}
+
+/* Collect the floating-point registers from REGCACHE and store them
+   in FPREGS.  */
+
+static void
+hppanbsd_collect_fpregset (struct regcache *regcache,
+			  void *fpregs, int regnum)
+{
+  char *regs = fpregs;
+  int i;
+
+  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)
+    {
+      if (regnum == -1 || regnum == i || regnum == i + 1)
+	{
+	  regcache_raw_collect (regcache, i, regs);
+	  regcache_raw_collect (regcache, i + 1, regs + 4);
+	}
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers (including the floating-point registers).  */
+
+static void
+hppanbsd_fetch_registers (struct target_ops *ops,
+			  struct regcache *regcache, int regnum)
+
+{
+  if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      hppanbsd_supply_gregset (regcache, &regs);
+    }
+
+  if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      hppanbsd_supply_fpregset (regcache, &fpregs);
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers (including the floating-point registers).  */
+
+static void
+hppanbsd_store_registers (struct target_ops *ops,
+			  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      hppanbsd_collect_gregset (regcache, &regs, regnum);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+    }
+
+  if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      hppanbsd_collect_fpregset (regcache, &fpregs, regnum);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_hppanbsd_nat (void);
+
+void
+_initialize_hppanbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add some extra features to the ptrace target.  */
+  t = inf_ptrace_target ();
+
+  t->to_fetch_registers = hppanbsd_fetch_registers;
+  t->to_store_registers = hppanbsd_store_registers;
+
+  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
+
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppanbsd-nat.c ./gdb/hppanbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppanbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppanbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,245 +0,0 @@
-/* Native-dependent code for NetBSD/hppa.
-
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "hppa-tdep.h"
-#include "inf-ptrace.h"
-
-#include "nbsd-nat.h"
-
-static int
-hppanbsd_gregset_supplies_p (int regnum)
-{
-  return ((regnum >= HPPA_R0_REGNUM && regnum <= HPPA_R31_REGNUM) ||
-          (regnum >= HPPA_SAR_REGNUM && regnum <= HPPA_PCSQ_TAIL_REGNUM) ||
-          regnum == HPPA_IPSW_REGNUM ||
-	  (regnum >= HPPA_SR4_REGNUM && regnum <= HPPA_SR4_REGNUM + 5));
-}
-
-static int
-hppanbsd_fpregset_supplies_p (int regnum)
-{
-  return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM);
-}
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const char *regs = gregs;
-  const int *r = gregs;
-  int regnum;
-
-  for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-
-  regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
-  regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
-  regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
-  regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-  regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-  regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
-  regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
-  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
-  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
-  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
-  regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
-}
-
-/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
-
-static void
-hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
-{
-  const char *regs = fpregs;
-  int regnum;
-
-  for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
-       regnum += 2, regs += 8)
-    {
-      regcache_raw_supply (regcache, regnum, regs);
-      regcache_raw_supply (regcache, regnum + 1, regs + 4);
-    }
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-hppanbsd_collect_gregset (const struct regcache *regcache,
-			  void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int *r = gregs;
-  int i;
-
-  for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 4);
-    }
-
-  if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
-    regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
-  if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-  if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-
-  if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
-    regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
-  if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
-  if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
-  if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-  if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-    regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-  if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
-    regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
-  if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
-    regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
-  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 1)
-    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
-  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 2)
-    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
-  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3)
-    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
-  if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4)
-    regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
-}
-
-/* Collect the floating-point registers from REGCACHE and store them
-   in FPREGS.  */
-
-static void
-hppanbsd_collect_fpregset (struct regcache *regcache,
-			  void *fpregs, int regnum)
-{
-  char *regs = fpregs;
-  int i;
-
-  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)
-    {
-      if (regnum == -1 || regnum == i || regnum == i + 1)
-	{
-	  regcache_raw_collect (regcache, i, regs);
-	  regcache_raw_collect (regcache, i + 1, regs + 4);
-	}
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers (including the floating-point registers).  */
-
-static void
-hppanbsd_fetch_registers (struct target_ops *ops,
-			  struct regcache *regcache, int regnum)
-
-{
-  if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      hppanbsd_supply_gregset (regcache, &regs);
-    }
-
-  if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      hppanbsd_supply_fpregset (regcache, &fpregs);
-    }
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating-point registers).  */
-
-static void
-hppanbsd_store_registers (struct target_ops *ops,
-			  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      hppanbsd_collect_gregset (regcache, &regs, regnum);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-    }
-
-  if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      hppanbsd_collect_fpregset (regcache, &fpregs, regnum);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_hppanbsd_nat (void);
-
-void
-_initialize_hppanbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add some extra features to the ptrace target.  */
-  t = inf_ptrace_target ();
-
-  t->to_fetch_registers = hppanbsd_fetch_registers;
-  t->to_store_registers = hppanbsd_store_registers;
-
-  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
-
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-nbsd-tdep.c ./gdb/hppa-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,218 @@
+/* Target-dependent code for NetBSD/hppa
+
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "hppa-tdep.h"
+#include "hppa-bsd-tdep.h"
+
+/* From <machine/mcontext.h>.  */
+static int hppanbsd_mc_reg_offset[] =
+{
+  /* r0 ... r31 */
+      -1,   1 * 4,   2 * 4,   3 * 4,
+   4 * 4,   5 * 4,   6 * 4,   7 * 4,
+   8 * 4,   9 * 4,  10 * 4,  11 * 4, 
+  12 * 4,  13 * 4,  14 * 4,  15 * 4,
+  16 * 4,  17 * 4,  18 * 4,  19 * 4,
+  20 * 4,  21 * 4,  22 * 4,  23 * 4,
+  24 * 4,  25 * 4,  26 * 4,  27 * 4,
+  28 * 4,  29 * 4,  30 * 4,  31 * 4,
+
+  32 * 4,	/* HPPA_SAR_REGNUM */
+  35 * 4,	/* HPPA_PCOQ_HEAD_REGNUM */
+  33 * 4,	/* HPPA_PCSQ_HEAD_REGNUM */
+  36 * 4,	/* HPPA_PCOQ_TAIL_REGNUM */
+  34 * 4,	/* HPPA_PCSQ_TAIL_REGNUM */
+  -1,		/* HPPA_EIEM_REGNUM */
+  -1,		/* HPPA_IIR_REGNUM */
+  -1,		/* HPPA_ISR_REGNUM */
+  -1,		/* HPPA_IOR_REGNUM */
+  0 * 4,	/* HPPA_IPSW_REGNUM */
+  -1,		/* spare? */
+  41 * 4,	/* HPPA_SR4_REGNUM */
+  37 * 4,	/* sr0 */
+  38 * 4,	/* sr1 */
+  39 * 4,	/* sr2 */
+  40 * 4,	/* sr3 */
+
+  /* more tbd */
+};
+
+static void hppanbsd_sigtramp_cache_init (const struct tramp_frame *,
+                                         struct frame_info *,
+                                         struct trad_frame_cache *,
+                                         CORE_ADDR);
+
+static const struct tramp_frame hppanbsd_sigtramp_si4 =
+{
+  SIGTRAMP_FRAME,
+  4,
+  {
+    { 0xc7d7c012, -1 },	/*	bb,>=,n %arg3, 30, 1f		*/
+    { 0xd6e01c1e, -1 },	/*	 depwi 0,31,2,%arg3		*/
+    { 0x0ee81093, -1 },	/*	ldw 4(%arg3), %r19		*/
+    { 0x0ee01097, -1 },	/*	ldw 0(%arg3), %arg3		*/
+			/* 1: 					*/
+    { 0xe8404000, -1 },	/* 	blr %r0, %rp			*/
+    { 0xeae0c002, -1 },	/*	bv,n %r0(%arg3)			*/
+    { 0x08000240, -1 },	/*	 nop				*/
+
+    { 0x0803025a, -1 },	/*	copy %r3, %arg0			*/
+    { 0x20200801, -1 },	/*	ldil -40000000, %r1		*/
+    { 0xe420e008, -1 },	/*	be,l 4(%sr7, %r1), %sr0, %r31	*/
+    { 0x34160268, -1 },	/*	 ldi 134, %t1 ; SYS_setcontext	*/
+
+    { 0x081c025a, -1 },	/*	copy ret0, %arg0		*/
+    { 0x20200801, -1 },	/*	ldil -40000000, %r1		*/
+    { 0xe420e008, -1 },	/*	be,l 4(%sr7, %r1), %sr0, %r31	*/
+    { 0x34160002, -1 },	/*	 ldi 1, %t1 ; SYS_exit		*/
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  hppanbsd_sigtramp_cache_init
+};
+
+
+static void
+hppanbsd_sigtramp_cache_init (const struct tramp_frame *self,
+                             struct frame_info *this_frame,
+                             struct trad_frame_cache *this_cache,
+                             CORE_ADDR func)
+{
+  CORE_ADDR sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
+  CORE_ADDR base;
+  int *reg_offset;
+  int num_regs;
+  int i;
+
+  reg_offset = hppanbsd_mc_reg_offset;
+  num_regs = ARRAY_SIZE (hppanbsd_mc_reg_offset);
+
+  /* frame pointer */
+  base = sp - 0x280;
+  /* offsetof(struct sigframe_siginfo, sf_uc) = 128 */
+  base += 128;
+  /* offsetof(ucontext_t, uc_mcontext) == 40 */
+  base += 40;
+
+  for (i = 0; i < num_regs; i++)
+    if (reg_offset[i] != -1)
+      trad_frame_set_reg_addr (this_cache, i, base + reg_offset[i]);
+
+  /* Construct the frame ID using the function start.  */
+  trad_frame_set_id (this_cache, frame_id_build (sp, func));
+}
+
+/* Core file support.  */
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define HPPANBSD_SIZEOF_GREGS	(44 * 4)
+
+static int hppanbsd_reg_offset[] =
+{
+  /* r0 ... r31 */
+      -1,   1 * 4,   2 * 4,   3 * 4,
+   4 * 4,   5 * 4,   6 * 4,   7 * 4,
+   8 * 4,   9 * 4,  10 * 4,  11 * 4, 
+  12 * 4,  13 * 4,  14 * 4,  15 * 4,
+  16 * 4,  17 * 4,  18 * 4,  19 * 4,
+  20 * 4,  21 * 4,  22 * 4,  23 * 4,
+  24 * 4,  25 * 4,  26 * 4,  27 * 4,
+  28 * 4,  29 * 4,  30 * 4,  31 * 4,
+
+  32 * 4,	/* HPPA_SAR_REGNUM */
+  35 * 4,	/* HPPA_PCOQ_HEAD_REGNUM */
+  33 * 4,	/* HPPA_PCSQ_HEAD_REGNUM */
+  36 * 4,	/* HPPA_PCOQ_TAIL_REGNUM */
+  34 * 4,	/* HPPA_PCSQ_TAIL_REGNUM */
+  -1,		/* HPPA_EIEM_REGNUM */
+  -1,		/* HPPA_IIR_REGNUM */
+  -1,		/* HPPA_ISR_REGNUM */
+  -1,		/* HPPA_IOR_REGNUM */
+  0 * 4,	/* HPPA_IPSW_REGNUM */
+};
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+hppanbsd_supply_gregset (const struct regset *regset,
+			 struct regcache *regcache,
+			 int regnum, const void *gregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  gdb_assert (len >= HPPANBSD_SIZEOF_GREGS);
+
+  for (i = 0; i < ARRAY_SIZE (hppanbsd_reg_offset); i++)
+    if (hppanbsd_reg_offset[i] != -1)
+      if (regnum == -1 || regnum == i)
+	regcache_raw_supply (regcache, i, regs + hppanbsd_reg_offset[i]);
+}
+
+/* NetBSD/hppa register set.  */
+
+static const struct regset hppanbsd_gregset =
+{
+  NULL,
+  hppanbsd_supply_gregset
+};
+
+/* Iterate over supported core file register note sections. */
+
+static void
+hppanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				       iterate_over_regset_sections_cb *cb,
+				       void *cb_data,
+				       const struct regcache *regcache)
+{
+  cb (".reg", HPPANBSD_SIZEOF_GREGS, &hppanbsd_gregset, NULL, cb_data);
+}
+
+static void
+hppanbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* Obviously NetBSD is BSD-based.  */
+  hppabsd_init_abi (info, gdbarch);
+
+  /* Core file support.  */
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, hppanbsd_iterate_over_regset_sections);
+
+  tramp_frame_prepend_unwinder (gdbarch, &hppanbsd_sigtramp_si4);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_hppanbsd_tdep;
+
+void
+_initialize_hppanbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_NETBSD,
+			  hppanbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppanbsd-tdep.c ./gdb/hppanbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppanbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppanbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,220 +0,0 @@
-/* Target-dependent code for NetBSD/hppa
-
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-
-#include "trad-frame.h"
-#include "tramp-frame.h"
-
-#include "hppa-tdep.h"
-#include "hppabsd-tdep.h"
-
-/* From <machine/mcontext.h>.  */
-static int hppanbsd_mc_reg_offset[] =
-{
-  /* r0 ... r31 */
-      -1,   1 * 4,   2 * 4,   3 * 4,
-   4 * 4,   5 * 4,   6 * 4,   7 * 4,
-   8 * 4,   9 * 4,  10 * 4,  11 * 4, 
-  12 * 4,  13 * 4,  14 * 4,  15 * 4,
-  16 * 4,  17 * 4,  18 * 4,  19 * 4,
-  20 * 4,  21 * 4,  22 * 4,  23 * 4,
-  24 * 4,  25 * 4,  26 * 4,  27 * 4,
-  28 * 4,  29 * 4,  30 * 4,  31 * 4,
-
-  32 * 4,	/* HPPA_SAR_REGNUM */
-  35 * 4,	/* HPPA_PCOQ_HEAD_REGNUM */
-  33 * 4,	/* HPPA_PCSQ_HEAD_REGNUM */
-  36 * 4,	/* HPPA_PCOQ_TAIL_REGNUM */
-  34 * 4,	/* HPPA_PCSQ_TAIL_REGNUM */
-  -1,		/* HPPA_EIEM_REGNUM */
-  -1,		/* HPPA_IIR_REGNUM */
-  -1,		/* HPPA_ISR_REGNUM */
-  -1,		/* HPPA_IOR_REGNUM */
-  0 * 4,	/* HPPA_IPSW_REGNUM */
-  -1,		/* spare? */
-  41 * 4,	/* HPPA_SR4_REGNUM */
-  37 * 4,	/* sr0 */
-  38 * 4,	/* sr1 */
-  39 * 4,	/* sr2 */
-  40 * 4,	/* sr3 */
-
-  /* more tbd */
-};
-
-static void hppanbsd_sigtramp_cache_init (const struct tramp_frame *,
-                                         struct frame_info *,
-                                         struct trad_frame_cache *,
-                                         CORE_ADDR);
-
-static const struct tramp_frame hppanbsd_sigtramp_si4 =
-{
-  SIGTRAMP_FRAME,
-  4,
-  {
-    { 0xc7d7c012, -1 },	/*	bb,>=,n %arg3, 30, 1f		*/
-    { 0xd6e01c1e, -1 },	/*	 depwi 0,31,2,%arg3		*/
-    { 0x0ee81093, -1 },	/*	ldw 4(%arg3), %r19		*/
-    { 0x0ee01097, -1 },	/*	ldw 0(%arg3), %arg3		*/
-			/* 1: 					*/
-    { 0xe8404000, -1 },	/* 	blr %r0, %rp			*/
-    { 0xeae0c002, -1 },	/*	bv,n %r0(%arg3)			*/
-    { 0x08000240, -1 },	/*	 nop				*/
-
-    { 0x0803025a, -1 },	/*	copy %r3, %arg0			*/
-    { 0x20200801, -1 },	/*	ldil -40000000, %r1		*/
-    { 0xe420e008, -1 },	/*	be,l 4(%sr7, %r1), %sr0, %r31	*/
-    { 0x34160268, -1 },	/*	 ldi 134, %t1 ; SYS_setcontext	*/
-
-    { 0x081c025a, -1 },	/*	copy ret0, %arg0		*/
-    { 0x20200801, -1 },	/*	ldil -40000000, %r1		*/
-    { 0xe420e008, -1 },	/*	be,l 4(%sr7, %r1), %sr0, %r31	*/
-    { 0x34160002, -1 },	/*	 ldi 1, %t1 ; SYS_exit		*/
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  hppanbsd_sigtramp_cache_init
-};
-
-
-static void
-hppanbsd_sigtramp_cache_init (const struct tramp_frame *self,
-                             struct frame_info *this_frame,
-                             struct trad_frame_cache *this_cache,
-                             CORE_ADDR func)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
-  CORE_ADDR base;
-  int *reg_offset;
-  int num_regs;
-  int i;
-
-  reg_offset = hppanbsd_mc_reg_offset;
-  num_regs = ARRAY_SIZE (hppanbsd_mc_reg_offset);
-
-  /* frame pointer */
-  base = sp - 0x280;
-  /* offsetof(struct sigframe_siginfo, sf_uc) = 128 */
-  base += 128;
-  /* offsetof(ucontext_t, uc_mcontext) == 40 */
-  base += 40;
-
-  for (i = 0; i < num_regs; i++)
-    if (reg_offset[i] != -1)
-      trad_frame_set_reg_addr (this_cache, i, base + reg_offset[i]);
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (this_cache, frame_id_build (sp, func));
-}
-
-/* Core file support.  */
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define HPPANBSD_SIZEOF_GREGS	(44 * 4)
-
-static int hppanbsd_reg_offset[] =
-{
-  /* r0 ... r31 */
-      -1,   1 * 4,   2 * 4,   3 * 4,
-   4 * 4,   5 * 4,   6 * 4,   7 * 4,
-   8 * 4,   9 * 4,  10 * 4,  11 * 4, 
-  12 * 4,  13 * 4,  14 * 4,  15 * 4,
-  16 * 4,  17 * 4,  18 * 4,  19 * 4,
-  20 * 4,  21 * 4,  22 * 4,  23 * 4,
-  24 * 4,  25 * 4,  26 * 4,  27 * 4,
-  28 * 4,  29 * 4,  30 * 4,  31 * 4,
-
-  32 * 4,	/* HPPA_SAR_REGNUM */
-  35 * 4,	/* HPPA_PCOQ_HEAD_REGNUM */
-  33 * 4,	/* HPPA_PCSQ_HEAD_REGNUM */
-  36 * 4,	/* HPPA_PCOQ_TAIL_REGNUM */
-  34 * 4,	/* HPPA_PCSQ_TAIL_REGNUM */
-  -1,		/* HPPA_EIEM_REGNUM */
-  -1,		/* HPPA_IIR_REGNUM */
-  -1,		/* HPPA_ISR_REGNUM */
-  -1,		/* HPPA_IOR_REGNUM */
-  0 * 4,	/* HPPA_IPSW_REGNUM */
-};
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-hppanbsd_supply_gregset (const struct regset *regset,
-			 struct regcache *regcache,
-			 int regnum, const void *gregs, size_t len)
-{
-  const gdb_byte *regs = gregs;
-  int i;
-
-  gdb_assert (len >= HPPANBSD_SIZEOF_GREGS);
-
-  for (i = 0; i < ARRAY_SIZE (hppanbsd_reg_offset); i++)
-    if (hppanbsd_reg_offset[i] != -1)
-      if (regnum == -1 || regnum == i)
-	regcache_raw_supply (regcache, i, regs + hppanbsd_reg_offset[i]);
-}
-
-/* NetBSD/hppa register set.  */
-
-static const struct regset hppanbsd_gregset =
-{
-  NULL,
-  hppanbsd_supply_gregset
-};
-
-/* Iterate over supported core file register note sections. */
-
-static void
-hppanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				       iterate_over_regset_sections_cb *cb,
-				       void *cb_data,
-				       const struct regcache *regcache)
-{
-  cb (".reg", HPPANBSD_SIZEOF_GREGS, &hppanbsd_gregset, NULL, cb_data);
-}
-
-static void
-hppanbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* Obviously NetBSD is BSD-based.  */
-  hppabsd_init_abi (info, gdbarch);
-
-  /* Core file support.  */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, hppanbsd_iterate_over_regset_sections);
-
-  tramp_frame_prepend_unwinder (gdbarch, &hppanbsd_sigtramp_si4);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_hppanbsd_tdep;
-
-void
-_initialize_hppanbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_NETBSD_ELF,
-			  hppanbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-obsd-nat.c ./gdb/hppa-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,265 @@
+/* Native-dependent code for OpenBSD/hppa.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "hppa-tdep.h"
+#include "inf-ptrace.h"
+
+#include "obsd-nat.h"
+
+static int
+hppaobsd_gregset_supplies_p (int regnum)
+{
+  return (regnum >= HPPA_R0_REGNUM && regnum <= HPPA_CR27_REGNUM);
+}
+
+static int
+hppaobsd_fpregset_supplies_p (int regnum)
+{
+  return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+hppaobsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  gdb_byte zero[4] = { 0 };
+  const char *regs = gregs;
+  int regnum;
+
+  regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
+  for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+
+  if (sizeof(struct reg) >= 46 * 4)
+    {
+      regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
+      regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+      regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+      regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+      regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+      regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+      regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+      regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+      regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+      regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+      regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+      regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+      regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+      regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+      regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+      regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+    } 
+  else
+    {
+      regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
+      regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+      regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+    }
+}
+
+/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
+
+static void
+hppaobsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
+{
+  const char *regs = fpregs;
+  int regnum;
+
+  for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
+       regnum += 2, regs += 8)
+    {
+      regcache_raw_supply (regcache, regnum, regs);
+      regcache_raw_supply (regcache, regnum + 1, regs + 4);
+    }
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+hppaobsd_collect_gregset (const struct regcache *regcache,
+			  void *gregs, int regnum)
+{
+  char *regs = gregs;
+  int i;
+
+  for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 4);
+    }
+
+  if (sizeof(struct reg) >= 46 * 4)
+    {
+      if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
+	regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+      if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+      if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+      if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+      if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+      if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+      if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+      if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+      if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+      if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+      if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+      if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
+	regcache_raw_collect (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+      if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
+	regcache_raw_collect (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+    }
+  else
+    {
+      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+	regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
+      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+	regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+    }
+}
+
+/* Collect the floating-point registers from REGCACHE and store them
+   in FPREGS.  */
+
+static void
+hppaobsd_collect_fpregset (struct regcache *regcache,
+			   void *fpregs, int regnum)
+{
+  char *regs = fpregs;
+  int i;
+
+  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)
+    {
+      if (regnum == -1 || regnum == i || regnum == i + 1)
+	{
+	  regcache_raw_collect (regcache, i, regs);
+	  regcache_raw_collect (regcache, i + 1, regs + 4);
+	}
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers (including the floating-point registers).  */
+
+static void
+hppaobsd_fetch_registers (struct target_ops *ops,
+			  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || hppaobsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      hppaobsd_supply_gregset (regcache, &regs);
+    }
+
+  if (regnum == -1 || hppaobsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      hppaobsd_supply_fpregset (regcache, &fpregs);
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers (including the floating-point registers).  */
+
+static void
+hppaobsd_store_registers (struct target_ops *ops,
+			  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || hppaobsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      hppaobsd_collect_gregset (regcache, &regs, regnum);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+    }
+
+  if (regnum == -1 || hppaobsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      hppaobsd_collect_fpregset (regcache, &fpregs, regnum);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_hppaobsd_nat (void);
+
+void
+_initialize_hppaobsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = hppaobsd_fetch_registers;
+  t->to_store_registers = hppaobsd_store_registers;
+  obsd_add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppaobsd-nat.c ./gdb/hppaobsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppaobsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppaobsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,265 +0,0 @@
-/* Native-dependent code for OpenBSD/hppa.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "hppa-tdep.h"
-#include "inf-ptrace.h"
-
-#include "obsd-nat.h"
-
-static int
-hppaobsd_gregset_supplies_p (int regnum)
-{
-  return (regnum >= HPPA_R0_REGNUM && regnum <= HPPA_CR27_REGNUM);
-}
-
-static int
-hppaobsd_fpregset_supplies_p (int regnum)
-{
-  return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM);
-}
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-hppaobsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  gdb_byte zero[4] = { 0 };
-  const char *regs = gregs;
-  int regnum;
-
-  regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
-  for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-
-  if (sizeof(struct reg) >= 46 * 4)
-    {
-      regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
-      regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
-      regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
-      regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
-      regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-      regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-      regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
-      regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
-      regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
-      regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
-      regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
-      regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
-      regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
-      regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
-      regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
-      regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
-    } 
-  else
-    {
-      regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
-      regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
-      regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
-    }
-}
-
-/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
-
-static void
-hppaobsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
-{
-  const char *regs = fpregs;
-  int regnum;
-
-  for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
-       regnum += 2, regs += 8)
-    {
-      regcache_raw_supply (regcache, regnum, regs);
-      regcache_raw_supply (regcache, regnum + 1, regs + 4);
-    }
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-hppaobsd_collect_gregset (const struct regcache *regcache,
-			  void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int i;
-
-  for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 4);
-    }
-
-  if (sizeof(struct reg) >= 46 * 4)
-    {
-      if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
-	regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
-      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
-      if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
-      if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-      if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
-      if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
-      if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
-      if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
-      if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
-      if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
-      if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
-      if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
-      if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
-	regcache_raw_collect (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
-      if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
-	regcache_raw_collect (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
-    }
-  else
-    {
-      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
-	regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
-      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-	regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
-    }
-}
-
-/* Collect the floating-point registers from REGCACHE and store them
-   in FPREGS.  */
-
-static void
-hppaobsd_collect_fpregset (struct regcache *regcache,
-			   void *fpregs, int regnum)
-{
-  char *regs = fpregs;
-  int i;
-
-  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)
-    {
-      if (regnum == -1 || regnum == i || regnum == i + 1)
-	{
-	  regcache_raw_collect (regcache, i, regs);
-	  regcache_raw_collect (regcache, i + 1, regs + 4);
-	}
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers (including the floating-point registers).  */
-
-static void
-hppaobsd_fetch_registers (struct target_ops *ops,
-			  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || hppaobsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      hppaobsd_supply_gregset (regcache, &regs);
-    }
-
-  if (regnum == -1 || hppaobsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      hppaobsd_supply_fpregset (regcache, &fpregs);
-    }
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating-point registers).  */
-
-static void
-hppaobsd_store_registers (struct target_ops *ops,
-			  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || hppaobsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      hppaobsd_collect_gregset (regcache, &regs, regnum);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-    }
-
-  if (regnum == -1 || hppaobsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      hppaobsd_collect_fpregset (regcache, &fpregs, regnum);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_hppaobsd_nat (void);
-
-void
-_initialize_hppaobsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = hppaobsd_fetch_registers;
-  t->to_store_registers = hppaobsd_store_registers;
-  obsd_add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-obsd-tdep.c ./gdb/hppa-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/hppa-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,177 @@
+/* Target-dependent code for OpenBSD/hppa
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+
+#include "hppa-tdep.h"
+#include "hppa-bsd-tdep.h"
+
+/* Core file support.  */
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define HPPAOBSD_SIZEOF_GREGS	(34 * 4) /* OpenBSD 5.1 and earlier.  */
+#define HPPANBSD_SIZEOF_GREGS	(46 * 4) /* NetBSD and OpenBSD 5.2 and later.  */
+
+/* Sizeof `struct fpreg' in <machine/reg.h>.  */
+#define HPPAOBSD_SIZEOF_FPREGS	(32 * 8)
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+hppaobsd_supply_gregset (const struct regset *regset,
+			 struct regcache *regcache,
+			 int regnum, const void *gregs, size_t len)
+{
+  gdb_byte zero[4] = { 0 };
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  size_t offset;
+  int i;
+
+  gdb_assert (len >= HPPAOBSD_SIZEOF_GREGS);
+
+  if (regnum == -1 || regnum == HPPA_R0_REGNUM)
+    regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
+  for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_supply (regcache, i, regs + offset);
+    }
+
+  if (len >= HPPANBSD_SIZEOF_GREGS)
+    {
+      if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
+	regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
+      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+      if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+      if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+      if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+      if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+      if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+      if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+      if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+      if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+      if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+      if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+      if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
+	regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+      if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
+	regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+    }
+  else
+    {
+      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+	regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
+      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+	regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+    }
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+hppaobsd_supply_fpregset (const struct regset *regset,
+			  struct regcache *regcache,
+			  int regnum, const void *fpregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
+  int i;
+
+  gdb_assert (len >= HPPAOBSD_SIZEOF_FPREGS);
+
+  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + (i - HPPA_FP0_REGNUM) * 4);
+    }
+}
+
+/* OpenBSD/hppa register sets.  */
+
+static const struct regset hppaobsd_gregset =
+{
+  NULL,
+  hppaobsd_supply_gregset,
+  NULL,
+  REGSET_VARIABLE_SIZE
+};
+
+static const struct regset hppaobsd_fpregset =
+{
+  NULL,
+  hppaobsd_supply_fpregset
+};
+
+/* Iterate over supported core file register note sections. */
+
+static void
+hppaobsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				       iterate_over_regset_sections_cb *cb,
+				       void *cb_data,
+				       const struct regcache *regcache)
+{
+  cb (".reg", HPPAOBSD_SIZEOF_GREGS, &hppaobsd_gregset, NULL, cb_data);
+  cb (".reg2", HPPAOBSD_SIZEOF_FPREGS, &hppaobsd_fpregset, NULL, cb_data);
+}
+
+
+static void
+hppaobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* Obviously OpenBSD is BSD-based.  */
+  hppabsd_init_abi (info, gdbarch);
+
+  /* Core file support.  */
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, hppaobsd_iterate_over_regset_sections);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_hppabsd_tdep (void);
+
+void
+_initialize_hppabsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_OPENBSD,
+			  hppaobsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppaobsd-tdep.c ./gdb/hppaobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppaobsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppaobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,196 +0,0 @@
-/* Target-dependent code for OpenBSD/hppa
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-
-#include "hppa-tdep.h"
-#include "hppabsd-tdep.h"
-
-/* Core file support.  */
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define HPPAOBSD_SIZEOF_GREGS	(34 * 4) /* OpenBSD 5.1 and earlier.  */
-#define HPPANBSD_SIZEOF_GREGS	(46 * 4) /* NetBSD and OpenBSD 5.2 and later.  */
-
-/* Sizeof `struct fpreg' in <machine/reg.h>.  */
-#define HPPAOBSD_SIZEOF_FPREGS	(32 * 8)
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-hppaobsd_supply_gregset (const struct regset *regset,
-			 struct regcache *regcache,
-			 int regnum, const void *gregs, size_t len)
-{
-  gdb_byte zero[4] = { 0 };
-  const gdb_byte *regs = gregs;
-  size_t offset;
-  int i;
-
-  gdb_assert (len >= HPPAOBSD_SIZEOF_GREGS);
-
-  if (regnum == -1 || regnum == HPPA_R0_REGNUM)
-    regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
-  for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_supply (regcache, i, regs + offset);
-    }
-
-  if (len >= HPPANBSD_SIZEOF_GREGS)
-    {
-      if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
-	regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
-      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
-      if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
-      if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
-      if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
-      if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
-      if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
-      if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
-      if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
-      if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
-      if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
-      if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
-      if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
-	regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
-      if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
-	regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
-    }
-  else
-    {
-      if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
-	regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
-      if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
-      if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
-	regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
-    }
-}
-
-/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-   in the floating-point register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-hppaobsd_supply_fpregset (const struct regset *regset,
-			  struct regcache *regcache,
-			  int regnum, const void *fpregs, size_t len)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const gdb_byte *regs = fpregs;
-  int i;
-
-  gdb_assert (len >= HPPAOBSD_SIZEOF_FPREGS);
-
-  for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + (i - HPPA_FP0_REGNUM) * 4);
-    }
-}
-
-/* OpenBSD/hppa register sets.  */
-
-static const struct regset hppaobsd_gregset =
-{
-  NULL,
-  hppaobsd_supply_gregset,
-  NULL,
-  REGSET_VARIABLE_SIZE
-};
-
-static const struct regset hppaobsd_fpregset =
-{
-  NULL,
-  hppaobsd_supply_fpregset
-};
-
-/* Iterate over supported core file register note sections. */
-
-static void
-hppaobsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				       iterate_over_regset_sections_cb *cb,
-				       void *cb_data,
-				       const struct regcache *regcache)
-{
-  cb (".reg", HPPAOBSD_SIZEOF_GREGS, &hppaobsd_gregset, NULL, cb_data);
-  cb (".reg2", HPPAOBSD_SIZEOF_FPREGS, &hppaobsd_fpregset, NULL, cb_data);
-}
-
-
-static void
-hppaobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* Obviously OpenBSD is BSD-based.  */
-  hppabsd_init_abi (info, gdbarch);
-
-  /* Core file support.  */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, hppaobsd_iterate_over_regset_sections);
-}
-
-
-/* OpenBSD uses uses the traditional NetBSD core file format, even for
-   ports that use ELF.  */
-#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
-
-static enum gdb_osabi
-hppaobsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_CORE;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_hppabsd_tdep (void);
-
-void
-_initialize_hppabsd_tdep (void)
-{
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_hppa, bfd_target_unknown_flavour,
-				  hppaobsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_OPENBSD_ELF,
-			  hppaobsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-tdep.c ./gdb/hppa-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppa-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the HP PA-RISC architecture.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -39,6 +39,7 @@
 #include "gdbtypes.h"
 #include "objfiles.h"
 #include "hppa-tdep.h"
+#include <algorithm>
 
 static int hppa_debug = 0;
 
@@ -104,7 +105,7 @@ static const struct objfile_data *hppa_o
 static int
 hppa_sign_extend (unsigned val, unsigned bits)
 {
-  return (int) (val >> (bits - 1) ? (-1 << bits) | val : val);
+  return (int) (val >> (bits - 1) ? (-(1 << bits)) | val : val);
 }
 
 /* For many immediate values the sign bit is the low bit!  */
@@ -112,7 +113,7 @@ hppa_sign_extend (unsigned val, unsigned
 static int
 hppa_low_hppa_sign_extend (unsigned val, unsigned bits)
 {
-  return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
+  return (int) ((val & 0x1 ? (-(1 << (bits - 1))) : 0) | val >> 1);
 }
 
 /* Extract the bits at positions between FROM and TO, using HP's numbering
@@ -223,8 +224,8 @@ hppa_init_objfile_priv_data (struct objf
 static int
 compare_unwind_entries (const void *arg1, const void *arg2)
 {
-  const struct unwind_table_entry *a = arg1;
-  const struct unwind_table_entry *b = arg2;
+  const struct unwind_table_entry *a = (const struct unwind_table_entry *) arg1;
+  const struct unwind_table_entry *b = (const struct unwind_table_entry *) arg2;
 
   if (a->region_start > b->region_start)
     return 1;
@@ -261,7 +262,7 @@ internalize_unwinds (struct objfile *obj
       struct gdbarch *gdbarch = get_objfile_arch (objfile);
       unsigned long tmp;
       unsigned i;
-      char *buf = alloca (size);
+      char *buf = (char *) alloca (size);
       CORE_ADDR low_text_segment_address;
 
       /* For ELF targets, then unwinds are supposed to
@@ -434,7 +435,7 @@ read_unwind_info (struct objfile *objfil
   if (stub_unwind_size > 0)
     {
       unsigned int i;
-      char *buf = alloca (stub_unwind_size);
+      char *buf = (char *) alloca (stub_unwind_size);
 
       /* Read in the stub unwind entries.  */
       bfd_get_section_contents (objfile->obfd, stub_unwind_sec, buf,
@@ -504,14 +505,16 @@ find_unwind_entry (CORE_ADDR pc)
   {
     struct hppa_unwind_info *ui;
     ui = NULL;
-    priv = objfile_data (objfile, hppa_objfile_priv_data);
+    priv = ((struct hppa_objfile_private *)
+	    objfile_data (objfile, hppa_objfile_priv_data));
     if (priv)
       ui = ((struct hppa_objfile_private *) priv)->unwind_info;
 
     if (!ui)
       {
 	read_unwind_info (objfile);
-        priv = objfile_data (objfile, hppa_objfile_priv_data);
+        priv = ((struct hppa_objfile_private *)
+		objfile_data (objfile, hppa_objfile_priv_data));
 	if (priv == NULL)
 	  error (_("Internal error reading unwind information."));
         ui = ((struct hppa_objfile_private *) priv)->unwind_info;
@@ -601,13 +604,9 @@ hppa_stack_frame_destroyed_p (struct gdb
   return 0;
 }
 
-static const unsigned char *
-hppa_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static const unsigned char breakpoint[] = {0x00, 0x01, 0x00, 0x04};
-  (*len) = sizeof (breakpoint);
-  return breakpoint;
-}
+constexpr gdb_byte hppa_break_insn[] = {0x00, 0x01, 0x00, 0x04};
+
+typedef BP_MANIPULATION (hppa_break_insn) hppa_breakpoint;
 
 /* Return the name of a register.  */
 
@@ -694,14 +693,13 @@ static int
 hppa64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
   /* The general registers and the sar are the same in both sets.  */
-  if (reg <= 32)
+  if (reg >= 0 && reg <= 32)
     return reg;
 
   /* fr4-fr31 are mapped from 72 in steps of 2.  */
   if (reg >= 72 && reg < 72 + 28 * 2 && !(reg & 1))
     return HPPA64_FP4_REGNUM + (reg - 72) / 2;
 
-  warning (_("Unmapped DWARF DBX Register #%d encountered."), reg);
   return -1;
 }
 
@@ -729,10 +727,6 @@ hppa32_push_dummy_call (struct gdbarch *
   /* Stack base address at which the first parameter is stored.  */
   CORE_ADDR param_end = 0;
 
-  /* The inner most end of the stack after all the parameters have
-     been pushed.  */
-  CORE_ADDR new_sp = 0;
-
   /* Two passes.  First pass computes the location of everything,
      second pass writes the bytes out.  */
   int write_pass;
@@ -1097,10 +1091,10 @@ hppa64_push_dummy_call (struct gdbarch *
       while (regnum > HPPA_ARG0_REGNUM - 8 && len > 0)
 	{
 	  regcache_cooked_write_part (regcache, regnum,
-				      offset % 8, min (len, 8), valbuf);
-	  offset += min (len, 8);
-	  valbuf += min (len, 8);
-	  len -= min (len, 8);
+				      offset % 8, std::min (len, 8), valbuf);
+	  offset += std::min (len, 8);
+	  valbuf += std::min (len, 8);
+	  len -= std::min (len, 8);
 	  regnum--;
 	}
 
@@ -1112,7 +1106,7 @@ hppa64_push_dummy_call (struct gdbarch *
 
   /* Allocate the outgoing parameter area.  Make sure the outgoing
      parameter area is multiple of 16 bytes in length.  */
-  sp += max (align_up (offset, 16), 64);
+  sp += std::max (align_up (offset, 16), (ULONGEST) 64);
 
   /* Allocate 32-bytes of scratch space.  The documentation doesn't
      mention this, but it seems to be needed.  */
@@ -1254,9 +1248,9 @@ hppa64_return_value (struct gdbarch *gdb
       while (len > 0)
 	{
 	  regcache_cooked_read_part (regcache, regnum, offset,
-				     min (len, 8), readbuf);
-	  readbuf += min (len, 8);
-	  len -= min (len, 8);
+				     std::min (len, 8), readbuf);
+	  readbuf += std::min (len, 8);
+	  len -= std::min (len, 8);
 	  regnum++;
 	}
     }
@@ -1266,9 +1260,9 @@ hppa64_return_value (struct gdbarch *gdb
       while (len > 0)
 	{
 	  regcache_cooked_write_part (regcache, regnum, offset,
-				      min (len, 8), writebuf);
-	  writebuf += min (len, 8);
-	  len -= min (len, 8);
+				      std::min (len, 8), writebuf);
+	  writebuf += std::min (len, 8);
+	  len -= std::min (len, 8);
 	  regnum++;
 	}
     }
@@ -1356,7 +1350,7 @@ prologue_inst_adjust_sp (unsigned long i
 
   /* std,ma X,D(sp) */
   if ((inst & 0xffe00008) == 0x73c00008)
-    return (inst & 0x1 ? -1 << 13 : 0) | (((inst >> 4) & 0x3ff) << 3);
+    return (inst & 0x1 ? -(1 << 13) : 0) | (((inst >> 4) & 0x3ff) << 3);
 
   /* addil high21,%r30; ldo low11,(%r1),%r30)
      save high bits in save_high21 for later use.  */
@@ -1852,7 +1846,7 @@ hppa_skip_prologue (struct gdbarch *gdba
      may be the first instruction of the prologue.  If that happens, then
      the instruction skipping code has a bug that needs to be fixed.  */
   if (post_prologue_pc != 0)
-    return max (pc, post_prologue_pc);
+    return std::max (pc, post_prologue_pc);
   else
     return (skip_prologue_hard_way (gdbarch, pc, 1));
 }
@@ -1904,7 +1898,7 @@ hppa_frame_cache (struct frame_info *thi
       if (hppa_debug)
         fprintf_unfiltered (gdb_stdlog, "base=%s (cached) }",
           paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
-      return (*this_cache);
+      return (struct hppa_frame_cache *) (*this_cache);
     }
   cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache);
   (*this_cache) = cache;
@@ -1916,7 +1910,7 @@ hppa_frame_cache (struct frame_info *thi
     {
       if (hppa_debug)
         fprintf_unfiltered (gdb_stdlog, "base=NULL (no unwind entry) }");
-      return (*this_cache);
+      return (struct hppa_frame_cache *) (*this_cache);
     }
 
   /* Turn the Entry_GR field into a bitmask.  */
@@ -2006,7 +2000,7 @@ hppa_frame_cache (struct frame_info *thi
 	  {
 	    error (_("Cannot read instruction at %s."),
 		   paddress (gdbarch, pc));
-	    return (*this_cache);
+	    return (struct hppa_frame_cache *) (*this_cache);
 	  }
 
 	inst = extract_unsigned_integer (buf4, sizeof buf4, byte_order);
@@ -2065,7 +2059,7 @@ hppa_frame_cache (struct frame_info *thi
 		CORE_ADDR offset;
 		
 		if ((inst >> 26) == 0x1c)
-		  offset = (inst & 0x1 ? -1 << 13 : 0)
+		  offset = (inst & 0x1 ? -(1 << 13) : 0)
 		    | (((inst >> 4) & 0x3ff) << 3);
 		else if ((inst >> 26) == 0x03)
 		  offset = hppa_low_hppa_sign_extend (inst & 0x1f, 5);
@@ -2279,7 +2273,7 @@ hppa_frame_cache (struct frame_info *thi
   if (hppa_debug)
     fprintf_unfiltered (gdb_stdlog, "base=%s }",
       paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
-  return (*this_cache);
+  return (struct hppa_frame_cache *) (*this_cache);
 }
 
 static void
@@ -2287,7 +2281,6 @@ hppa_frame_this_id (struct frame_info *t
 		    struct frame_id *this_id)
 {
   struct hppa_frame_cache *info;
-  CORE_ADDR pc = get_frame_pc (this_frame);
   struct unwind_table_entry *u;
 
   info = hppa_frame_cache (this_frame, this_cache);
@@ -2453,7 +2446,7 @@ hppa_stub_frame_unwind_cache (struct fra
   struct unwind_table_entry *u;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct hppa_stub_unwind_cache *) *this_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct hppa_stub_unwind_cache);
   *this_cache = info;
@@ -2461,21 +2454,6 @@ hppa_stub_frame_unwind_cache (struct fra
 
   info->base = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
 
-  if (gdbarch_osabi (gdbarch) == GDB_OSABI_HPUX_SOM)
-    {
-      /* HPUX uses export stubs in function calls; the export stub clobbers
-         the return value of the caller, and, later restores it from the
-	 stack.  */
-      u = find_unwind_entry (get_frame_pc (this_frame));
-
-      if (u && u->stub_unwind.stub_type == EXPORT)
-	{
-          info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24;
-
-	  return info;
-	}
-    }
-
   /* By default we assume that stubs do not change the rp.  */
   info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].realreg = HPPA_RP_REGNUM;
 
@@ -3069,14 +3047,6 @@ hppa_gdbarch_init (struct gdbarch_info i
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
-  
-  /* Try to determine the ABI of the object we are loading.  */
-  if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
-    {
-      /* If it's a SOM file, assume it's HP/UX SOM.  */
-      if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour)
-	info.osabi = GDB_OSABI_HPUX_SOM;
-    }
 
   /* find a candidate among the list of pre-declared architectures.  */
   arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -3189,7 +3159,8 @@ hppa_gdbarch_init (struct gdbarch_info i
       internal_error (__FILE__, __LINE__, _("bad switch"));
     }
       
-  set_gdbarch_breakpoint_from_pc (gdbarch, hppa_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, hppa_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, hppa_breakpoint::bp_from_kind);
   set_gdbarch_pseudo_register_read (gdbarch, hppa_pseudo_register_read);
 
   /* Frame unwind methods.  */
@@ -3223,8 +3194,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_hppa_tdep (void)
 {
-  struct cmd_list_element *c;
-
   gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
 
   hppa_objfile_priv_data = register_objfile_data ();
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-tdep.h ./gdb/hppa-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/hppa-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/hppa-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the HP PA-RISC architecture.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-nat.c ./gdb/i386-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-bsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,367 @@
+/* Native-dependent code for modern i386 BSD's.
+
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+#include <machine/frame.h>
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+#include "x86-bsd-nat.h"
+#include "i386-bsd-nat.h"
+#include "inf-ptrace.h"
+
+
+/* In older BSD versions we cannot get at some of the segment
+   registers.  FreeBSD for example didn't support the %fs and %gs
+   registers until the 3.0 release.  We have autoconf checks for their
+   presence, and deal gracefully with their absence.  */
+
+/* Offset in `struct reg' where MEMBER is stored.  */
+#define REG_OFFSET(member) offsetof (struct reg, member)
+
+/* At i386bsd_reg_offset[REGNUM] you'll find the offset in `struct
+   reg' where the GDB register REGNUM is stored.  Unsupported
+   registers are marked with `-1'.  */
+static int i386bsd_r_reg_offset[] =
+{
+  REG_OFFSET (r_eax),
+  REG_OFFSET (r_ecx),
+  REG_OFFSET (r_edx),
+  REG_OFFSET (r_ebx),
+  REG_OFFSET (r_esp),
+  REG_OFFSET (r_ebp),
+  REG_OFFSET (r_esi),
+  REG_OFFSET (r_edi),
+  REG_OFFSET (r_eip),
+  REG_OFFSET (r_eflags),
+  REG_OFFSET (r_cs),
+  REG_OFFSET (r_ss),
+  REG_OFFSET (r_ds),
+  REG_OFFSET (r_es),
+#ifdef HAVE_STRUCT_REG_R_FS
+  REG_OFFSET (r_fs),
+#else
+  -1,
+#endif
+#ifdef HAVE_STRUCT_REG_R_GS
+  REG_OFFSET (r_gs)
+#else
+  -1
+#endif
+};
+
+/* Macro to determine if a register is fetched with PT_GETREGS.  */
+#define GETREGS_SUPPLIES(regnum) \
+  ((0 <= (regnum) && (regnum) <= 15))
+
+#ifdef HAVE_PT_GETXMMREGS
+/* Set to 1 if the kernel supports PT_GETXMMREGS.  Initialized to -1
+   so that we try PT_GETXMMREGS the first time around.  */
+static int have_ptrace_xmmregs = -1;
+#endif
+
+
+/* Supply the general-purpose registers in GREGS, to REGCACHE.  */
+
+static void
+i386bsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const char *regs = (const char *) gregs;
+  int regnum;
+
+  for (regnum = 0; regnum < ARRAY_SIZE (i386bsd_r_reg_offset); regnum++)
+    {
+      int offset = i386bsd_r_reg_offset[regnum];
+
+      if (offset != -1)
+	regcache_raw_supply (regcache, regnum, regs + offset);
+    }
+}
+
+/* Collect register REGNUM from REGCACHE and store its contents in
+   GREGS.  If REGNUM is -1, collect and store all appropriate
+   registers.  */
+
+static void
+i386bsd_collect_gregset (const struct regcache *regcache,
+			 void *gregs, int regnum)
+{
+  char *regs = (char *) gregs;
+  int i;
+
+  for (i = 0; i < ARRAY_SIZE (i386bsd_r_reg_offset); i++)
+    {
+      if (regnum == -1 || regnum == i)
+	{
+	  int offset = i386bsd_r_reg_offset[i];
+
+	  if (offset != -1)
+	    regcache_raw_collect (regcache, i, regs + offset);
+	}
+    }
+}
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers (including the floating point registers).  */
+
+static void
+i386bsd_fetch_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || GETREGS_SUPPLIES (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      i386bsd_supply_gregset (regcache, &regs);
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1 || regnum >= I386_ST0_REGNUM)
+    {
+      struct fpreg fpregs;
+#ifdef HAVE_PT_GETXMMREGS
+      char xmmregs[512];
+#endif
+
+#ifdef PT_GETXSTATE_INFO
+      if (x86bsd_xsave_len != 0)
+	{
+	  void *xstateregs;
+
+	  xstateregs = alloca (x86bsd_xsave_len);
+	  if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
+	    perror_with_name (_("Couldn't get extended state status"));
+
+	  i387_supply_xsave (regcache, -1, xstateregs);
+	  return;
+	}
+#endif
+      
+#ifdef HAVE_PT_GETXMMREGS
+      if (have_ptrace_xmmregs != 0
+	  && ptrace(PT_GETXMMREGS, get_ptrace_pid (inferior_ptid),
+		    (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
+	{
+	  have_ptrace_xmmregs = 1;
+	  i387_supply_fxsave (regcache, -1, xmmregs);
+	}
+      else
+	{
+	  have_ptrace_xmmregs = 0;
+#endif
+          if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	    perror_with_name (_("Couldn't get floating point status"));
+
+	  i387_supply_fsave (regcache, -1, &fpregs);
+#ifdef HAVE_PT_GETXMMREGS
+	}
+#endif
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers (including the floating point registers).  */
+
+static void
+i386bsd_store_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || GETREGS_SUPPLIES (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      i386bsd_collect_gregset (regcache, &regs, regnum);
+
+      if (ptrace (PT_SETREGS, get_ptrace_pid (inferior_ptid),
+	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1 || regnum >= I386_ST0_REGNUM)
+    {
+      struct fpreg fpregs;
+#ifdef HAVE_PT_GETXMMREGS
+      char xmmregs[512];
+#endif
+
+#ifdef PT_GETXSTATE_INFO
+      if (x86bsd_xsave_len != 0)
+	{
+	  void *xstateregs;
+
+	  xstateregs = alloca (x86bsd_xsave_len);
+	  if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
+	    perror_with_name (_("Couldn't get extended state status"));
+
+	  i387_collect_xsave (regcache, -1, xstateregs, 0);
+
+	  if (ptrace (PT_SETXSTATE, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xstateregs, x86bsd_xsave_len) == -1)
+	    perror_with_name (_("Couldn't write extended state status"));
+	  return;
+	}
+#endif
+
+#ifdef HAVE_PT_GETXMMREGS
+      if (have_ptrace_xmmregs != 0
+	  && ptrace(PT_GETXMMREGS, get_ptrace_pid (inferior_ptid),
+		    (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
+	{
+	  have_ptrace_xmmregs = 1;
+
+	  i387_collect_fxsave (regcache, regnum, xmmregs);
+
+	  if (ptrace (PT_SETXMMREGS, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) xmmregs, 0) == -1)
+            perror_with_name (_("Couldn't write XMM registers"));
+	}
+      else
+	{
+	  have_ptrace_xmmregs = 0;
+#endif
+          if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	    perror_with_name (_("Couldn't get floating point status"));
+
+          i387_collect_fsave (regcache, regnum, &fpregs);
+
+          if (ptrace (PT_SETFPREGS, get_ptrace_pid (inferior_ptid),
+		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	    perror_with_name (_("Couldn't write floating point status"));
+#ifdef HAVE_PT_GETXMMREGS
+        }
+#endif
+    }
+}
+
+/* Create a prototype *BSD/i386 target.  The client can override it
+   with local methods.  */
+
+struct target_ops *
+i386bsd_target (void)
+{
+  struct target_ops *t;
+
+  t = x86bsd_target ();
+  t->to_fetch_registers = i386bsd_fetch_inferior_registers;
+  t->to_store_registers = i386bsd_store_inferior_registers;
+  return t;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386bsd_nat (void);
+
+void
+_initialize_i386bsd_nat (void)
+{
+  int offset;
+
+  /* To support the recognition of signal handlers, i386-bsd-tdep.c
+     hardcodes some constants.  Inclusion of this file means that we
+     are compiling a native debugger, which means that we can use the
+     system header files and sysctl(3) to get at the relevant
+     information.  */
+
+#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
+#define SC_REG_OFFSET i386fbsd4_sc_reg_offset
+#elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
+#define SC_REG_OFFSET i386fbsd_sc_reg_offset
+#elif defined (NetBSD) || defined (__NetBSD_Version__)
+#define SC_REG_OFFSET i386nbsd_sc_reg_offset
+#elif defined (OpenBSD)
+#define SC_REG_OFFSET i386obsd_sc_reg_offset
+#endif
+
+#ifdef SC_REG_OFFSET
+
+  /* We only check the program counter, stack pointer and frame
+     pointer since these members of `struct sigcontext' are essential
+     for providing backtraces.  More checks could be added, but would
+     involve adding configure checks for the appropriate structure
+     members, since older BSD's don't provide all of them.  */
+
+#define SC_PC_OFFSET SC_REG_OFFSET[I386_EIP_REGNUM]
+#define SC_SP_OFFSET SC_REG_OFFSET[I386_ESP_REGNUM]
+#define SC_FP_OFFSET SC_REG_OFFSET[I386_EBP_REGNUM]
+
+  /* Override the default value for the offset of the program counter
+     in the sigcontext structure.  */
+  offset = offsetof (struct sigcontext, sc_pc);
+
+  if (SC_PC_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."), 
+	       offset, SC_PC_OFFSET);
+    }
+
+  SC_PC_OFFSET = offset;
+
+  /* Likewise for the stack pointer.  */
+  offset = offsetof (struct sigcontext, sc_sp);
+
+  if (SC_SP_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."),
+	       offset, SC_SP_OFFSET);
+    }
+
+  SC_SP_OFFSET = offset;
+
+  /* And the frame pointer.  */
+  offset = offsetof (struct sigcontext, sc_fp);
+
+  if (SC_FP_OFFSET != offset)
+    {
+      warning (_("\
+offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>."),
+	       offset, SC_FP_OFFSET);
+    }
+
+  SC_FP_OFFSET = offset;
+
+#endif /* SC_REG_OFFSET */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-nat.c ./gdb/i386bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,448 +0,0 @@
-/* Native-dependent code for modern i386 BSD's.
-
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-
-#include "i386-tdep.h"
-#include "i387-tdep.h"
-#include "i386bsd-nat.h"
-#include "inf-ptrace.h"
-
-
-/* In older BSD versions we cannot get at some of the segment
-   registers.  FreeBSD for example didn't support the %fs and %gs
-   registers until the 3.0 release.  We have autoconf checks for their
-   presence, and deal gracefully with their absence.  */
-
-/* Offset in `struct reg' where MEMBER is stored.  */
-#define REG_OFFSET(member) offsetof (struct reg, member)
-
-/* At i386bsd_reg_offset[REGNUM] you'll find the offset in `struct
-   reg' where the GDB register REGNUM is stored.  Unsupported
-   registers are marked with `-1'.  */
-static int i386bsd_r_reg_offset[] =
-{
-  REG_OFFSET (r_eax),
-  REG_OFFSET (r_ecx),
-  REG_OFFSET (r_edx),
-  REG_OFFSET (r_ebx),
-  REG_OFFSET (r_esp),
-  REG_OFFSET (r_ebp),
-  REG_OFFSET (r_esi),
-  REG_OFFSET (r_edi),
-  REG_OFFSET (r_eip),
-  REG_OFFSET (r_eflags),
-  REG_OFFSET (r_cs),
-  REG_OFFSET (r_ss),
-  REG_OFFSET (r_ds),
-  REG_OFFSET (r_es),
-#ifdef HAVE_STRUCT_REG_R_FS
-  REG_OFFSET (r_fs),
-#else
-  -1,
-#endif
-#ifdef HAVE_STRUCT_REG_R_GS
-  REG_OFFSET (r_gs)
-#else
-  -1
-#endif
-};
-
-/* Macro to determine if a register is fetched with PT_GETREGS.  */
-#define GETREGS_SUPPLIES(regnum) \
-  ((0 <= (regnum) && (regnum) <= 15))
-
-#ifdef HAVE_PT_GETXMMREGS
-/* Set to 1 if the kernel supports PT_GETXMMREGS.  Initialized to -1
-   so that we try PT_GETXMMREGS the first time around.  */
-static int have_ptrace_xmmregs = -1;
-#endif
-
-#ifdef PT_GETXSTATE_INFO
-size_t i386bsd_xsave_len;
-#endif
-
-
-/* Supply the general-purpose registers in GREGS, to REGCACHE.  */
-
-static void
-i386bsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const char *regs = gregs;
-  int regnum;
-
-  for (regnum = 0; regnum < ARRAY_SIZE (i386bsd_r_reg_offset); regnum++)
-    {
-      int offset = i386bsd_r_reg_offset[regnum];
-
-      if (offset != -1)
-	regcache_raw_supply (regcache, regnum, regs + offset);
-    }
-}
-
-/* Collect register REGNUM from REGCACHE and store its contents in
-   GREGS.  If REGNUM is -1, collect and store all appropriate
-   registers.  */
-
-static void
-i386bsd_collect_gregset (const struct regcache *regcache,
-			 void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int i;
-
-  for (i = 0; i < ARRAY_SIZE (i386bsd_r_reg_offset); i++)
-    {
-      if (regnum == -1 || regnum == i)
-	{
-	  int offset = i386bsd_r_reg_offset[i];
-
-	  if (offset != -1)
-	    regcache_raw_collect (regcache, i, regs + offset);
-	}
-    }
-}
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers (including the floating point registers).  */
-
-static void
-i386bsd_fetch_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || GETREGS_SUPPLIES (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      i386bsd_supply_gregset (regcache, &regs);
-      if (regnum != -1)
-	return;
-    }
-
-  if (regnum == -1 || regnum >= I386_ST0_REGNUM)
-    {
-      struct fpreg fpregs;
-#ifdef HAVE_PT_GETXMMREGS
-      char xmmregs[512];
-#endif
-
-#ifdef PT_GETXSTATE_INFO
-      if (i386bsd_xsave_len != 0)
-	{
-	  char *xstateregs;
-
-	  xstateregs = alloca (i386bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
-	    perror_with_name (_("Couldn't get extended state status"));
-
-	  i387_supply_xsave (regcache, -1, xstateregs);
-	  return;
-	}
-#endif
-      
-#ifdef HAVE_PT_GETXMMREGS
-      if (have_ptrace_xmmregs != 0
-	  && ptrace(PT_GETXMMREGS, ptid_get_pid (inferior_ptid),
-		    (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
-	{
-	  have_ptrace_xmmregs = 1;
-	  i387_supply_fxsave (regcache, -1, xmmregs);
-	}
-      else
-	{
-	  have_ptrace_xmmregs = 0;
-#endif
-          if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	    perror_with_name (_("Couldn't get floating point status"));
-
-	  i387_supply_fsave (regcache, -1, &fpregs);
-#ifdef HAVE_PT_GETXMMREGS
-	}
-#endif
-    }
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating point registers).  */
-
-static void
-i386bsd_store_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || GETREGS_SUPPLIES (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      i386bsd_collect_gregset (regcache, &regs, regnum);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-
-      if (regnum != -1)
-	return;
-    }
-
-  if (regnum == -1 || regnum >= I386_ST0_REGNUM)
-    {
-      struct fpreg fpregs;
-#ifdef HAVE_PT_GETXMMREGS
-      char xmmregs[512];
-#endif
-
-#ifdef PT_GETXSTATE_INFO
-      if (i386bsd_xsave_len != 0)
-	{
-	  char *xstateregs;
-
-	  xstateregs = alloca (i386bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
-	    perror_with_name (_("Couldn't get extended state status"));
-
-	  i387_collect_xsave (regcache, -1, xstateregs, 0);
-
-	  if (ptrace (PT_SETXSTATE, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xstateregs, i386bsd_xsave_len) == -1)
-	    perror_with_name (_("Couldn't write extended state status"));
-	  return;
-	}
-#endif
-
-#ifdef HAVE_PT_GETXMMREGS
-      if (have_ptrace_xmmregs != 0
-	  && ptrace(PT_GETXMMREGS, ptid_get_pid (inferior_ptid),
-		    (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
-	{
-	  have_ptrace_xmmregs = 1;
-
-	  i387_collect_fxsave (regcache, regnum, xmmregs);
-
-	  if (ptrace (PT_SETXMMREGS, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) xmmregs, 0) == -1)
-            perror_with_name (_("Couldn't write XMM registers"));
-	}
-      else
-	{
-	  have_ptrace_xmmregs = 0;
-#endif
-          if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	    perror_with_name (_("Couldn't get floating point status"));
-
-          i387_collect_fsave (regcache, regnum, &fpregs);
-
-          if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		      (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	    perror_with_name (_("Couldn't write floating point status"));
-#ifdef HAVE_PT_GETXMMREGS
-        }
-#endif
-    }
-}
-
-/* Create a prototype *BSD/i386 target.  The client can override it
-   with local methods.  */
-
-struct target_ops *
-i386bsd_target (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = i386bsd_fetch_inferior_registers;
-  t->to_store_registers = i386bsd_store_inferior_registers;
-  return t;
-}
-
-
-/* Support for debug registers.  */
-
-#ifdef HAVE_PT_GETDBREGS
-
-/* Not all versions of FreeBSD/i386 that support the debug registers
-   have this macro.  */
-#ifndef DBREG_DRX
-#define DBREG_DRX(d, x) ((&d->dr0)[x])
-#endif
-
-static unsigned long
-i386bsd_dr_get (ptid_t ptid, int regnum)
-{
-  struct dbreg dbregs;
-
-  if (ptrace (PT_GETDBREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't read debug registers"));
-
-  return DBREG_DRX ((&dbregs), regnum);
-}
-
-static void
-i386bsd_dr_set (int regnum, unsigned int value)
-{
-  struct dbreg dbregs;
-
-  if (ptrace (PT_GETDBREGS, ptid_get_pid (inferior_ptid),
-              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't get debug registers"));
-
-  /* For some mysterious reason, some of the reserved bits in the
-     debug control register get set.  Mask these off, otherwise the
-     ptrace call below will fail.  */
-  DBREG_DRX ((&dbregs), 7) &= ~(0x0000fc00);
-
-  DBREG_DRX ((&dbregs), regnum) = value;
-
-  if (ptrace (PT_SETDBREGS, ptid_get_pid (inferior_ptid),
-              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
-    perror_with_name (_("Couldn't write debug registers"));
-}
-
-void
-i386bsd_dr_set_control (unsigned long control)
-{
-  i386bsd_dr_set (7, control);
-}
-
-void
-i386bsd_dr_set_addr (int regnum, CORE_ADDR addr)
-{
-  gdb_assert (regnum >= 0 && regnum <= 4);
-
-  i386bsd_dr_set (regnum, addr);
-}
-
-CORE_ADDR
-i386bsd_dr_get_addr (int regnum)
-{
-  return i386bsd_dr_get (inferior_ptid, regnum);
-}
-
-unsigned long
-i386bsd_dr_get_status (void)
-{
-  return i386bsd_dr_get (inferior_ptid, 6);
-}
-
-unsigned long
-i386bsd_dr_get_control (void)
-{
-  return i386bsd_dr_get (inferior_ptid, 7);
-}
-
-#endif /* PT_GETDBREGS */
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386bsd_nat (void);
-
-void
-_initialize_i386bsd_nat (void)
-{
-  int offset;
-
-  /* To support the recognition of signal handlers, i386bsd-tdep.c
-     hardcodes some constants.  Inclusion of this file means that we
-     are compiling a native debugger, which means that we can use the
-     system header files and sysctl(3) to get at the relevant
-     information.  */
-
-#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
-#define SC_REG_OFFSET i386fbsd4_sc_reg_offset
-#elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
-#define SC_REG_OFFSET i386fbsd_sc_reg_offset
-#elif defined (NetBSD) || defined (__NetBSD_Version__)
-#define SC_REG_OFFSET i386nbsd_sc_reg_offset
-#elif defined (OpenBSD)
-#define SC_REG_OFFSET i386obsd_sc_reg_offset
-#endif
-
-#ifdef SC_REG_OFFSET
-
-  /* We only check the program counter, stack pointer and frame
-     pointer since these members of `struct sigcontext' are essential
-     for providing backtraces.  More checks could be added, but would
-     involve adding configure checks for the appropriate structure
-     members, since older BSD's don't provide all of them.  */
-
-#define SC_PC_OFFSET SC_REG_OFFSET[I386_EIP_REGNUM]
-#define SC_SP_OFFSET SC_REG_OFFSET[I386_ESP_REGNUM]
-#define SC_FP_OFFSET SC_REG_OFFSET[I386_EBP_REGNUM]
-
-  /* Override the default value for the offset of the program counter
-     in the sigcontext structure.  */
-  offset = offsetof (struct sigcontext, sc_pc);
-
-  if (SC_PC_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."), 
-	       offset, SC_PC_OFFSET);
-    }
-
-  SC_PC_OFFSET = offset;
-
-  /* Likewise for the stack pointer.  */
-  offset = offsetof (struct sigcontext, sc_sp);
-
-  if (SC_SP_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."),
-	       offset, SC_SP_OFFSET);
-    }
-
-  SC_SP_OFFSET = offset;
-
-  /* And the frame pointer.  */
-  offset = offsetof (struct sigcontext, sc_fp);
-
-  if (SC_FP_OFFSET != offset)
-    {
-      warning (_("\
-offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>."),
-	       offset, SC_FP_OFFSET);
-    }
-
-  SC_FP_OFFSET = offset;
-
-#endif /* SC_REG_OFFSET */
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-nat.h ./gdb/i386-bsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-nat.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-bsd-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* Native-dependent code for modern i386 BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef I386_BSD_NAT_H
+#define I386_BSD_NAT_H
+
+/* Create a prototype *BSD/i386 target.  The client can override it
+   with local methods.  */
+
+extern struct target_ops *i386bsd_target (void);
+
+#endif /* i386-bsd-nat.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-nat.h ./gdb/i386bsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386bsd-nat.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,43 +0,0 @@
-/* Native-dependent code for modern i386 BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef I386BSD_NAT_H
-#define I386BSD_NAT_H
-
-/* Create a prototype *BSD/i386 target.  The client can override it
-   with local methods.  */
-
-extern struct target_ops *i386bsd_target (void);
-
-/* Low level i386 XSAVE info.  */
-extern size_t i386bsd_xsave_len;
-
-/* low level i386 debug register functions used in i386fbsd-nat.c.  */
-
-extern void i386bsd_dr_set_control (unsigned long control);
-
-extern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr);
-
-extern CORE_ADDR i386bsd_dr_get_addr (int regnum);
-
-extern unsigned long i386bsd_dr_get_status (void);
-
-extern unsigned long i386bsd_dr_get_control (void);
-
-#endif /* i386bsd-nat.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-tdep.c ./gdb/i386-bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-bsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,88 @@
+/* Target-dependent code for i386 BSD's.
+
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "osabi.h"
+
+#include "i386-tdep.h"
+
+/* Support for signal handlers.  */
+
+/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
+   address of the associated sigcontext structure.  */
+
+static CORE_ADDR
+i386bsd_sigcontext_addr (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  gdb_byte buf[4];
+  CORE_ADDR sp;
+
+  get_frame_register (this_frame, I386_ESP_REGNUM, buf);
+  sp = extract_unsigned_integer (buf, 4, byte_order);
+
+  return read_memory_unsigned_integer (sp + 8, 4, byte_order);
+}
+
+
+/* Support for shared libraries.  */
+
+/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD).  */
+
+/* From <machine/signal.h>.  */
+int i386bsd_sc_reg_offset[] =
+{
+  -1,				/* %eax */
+  -1,				/* %ecx */
+  -1,				/* %edx */
+  -1,				/* %ebx */
+  8 + 0 * 4,			/* %esp */
+  8 + 1 * 4,			/* %ebp */
+  -1,				/* %esi */
+  -1,				/* %edi */
+  8 + 3 * 4,			/* %eip */
+  8 + 4 * 4,			/* %eflags */
+  -1,				/* %cs */
+  -1,				/* %ss */
+  -1,				/* %ds */
+  -1,				/* %es */
+  -1,				/* %fs */
+  -1				/* %gs */
+};
+
+void
+i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->jb_pc_offset = 0;
+
+  tdep->sigtramp_start = 0xfdbfdfc0;
+  tdep->sigtramp_end = 0xfdbfe000;
+  tdep->sigcontext_addr = i386bsd_sigcontext_addr;
+  tdep->sc_reg_offset = i386bsd_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (i386bsd_sc_reg_offset);
+}
+
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-tdep.c ./gdb/i386bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386bsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,123 +0,0 @@
-/* Target-dependent code for i386 BSD's.
-
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "osabi.h"
-
-#include "i386-tdep.h"
-
-/* Support for signal handlers.  */
-
-/* Assuming THIS_FRAME is for a BSD sigtramp routine, return the
-   address of the associated sigcontext structure.  */
-
-static CORE_ADDR
-i386bsd_sigcontext_addr (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  gdb_byte buf[4];
-  CORE_ADDR sp;
-
-  get_frame_register (this_frame, I386_ESP_REGNUM, buf);
-  sp = extract_unsigned_integer (buf, 4, byte_order);
-
-  return read_memory_unsigned_integer (sp + 8, 4, byte_order);
-}
-
-
-/* Support for shared libraries.  */
-
-/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD).  */
-
-/* From <machine/signal.h>.  */
-int i386bsd_sc_reg_offset[] =
-{
-  -1,				/* %eax */
-  -1,				/* %ecx */
-  -1,				/* %edx */
-  -1,				/* %ebx */
-  8 + 0 * 4,			/* %esp */
-  8 + 1 * 4,			/* %ebp */
-  -1,				/* %esi */
-  -1,				/* %edi */
-  8 + 3 * 4,			/* %eip */
-  8 + 4 * 4,			/* %eflags */
-  -1,				/* %cs */
-  -1,				/* %ss */
-  -1,				/* %ds */
-  -1,				/* %es */
-  -1,				/* %fs */
-  -1				/* %gs */
-};
-
-void
-i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->jb_pc_offset = 0;
-
-  tdep->sigtramp_start = 0xfdbfdfc0;
-  tdep->sigtramp_end = 0xfdbfe000;
-  tdep->sigcontext_addr = i386bsd_sigcontext_addr;
-  tdep->sc_reg_offset = i386bsd_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (i386bsd_sc_reg_offset);
-}
-
-
-static enum gdb_osabi
-i386bsd_aout_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "a.out-i386-netbsd") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  if (strcmp (bfd_get_target (abfd), "a.out-i386-freebsd") == 0)
-    return GDB_OSABI_FREEBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-static enum gdb_osabi
-i386bsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386bsd_tdep (void);
-
-void
-_initialize_i386bsd_tdep (void)
-{
-  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
-				  i386bsd_aout_osabi_sniffer);
-
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_unknown_flavour,
-				  i386bsd_core_osabi_sniffer);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-cygwin-tdep.c ./gdb/i386-cygwin-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-cygwin-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-cygwin-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Cygwin running on i386's, for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -98,7 +98,7 @@ struct cpms_data
 static void
 core_process_module_section (bfd *abfd, asection *sect, void *obj)
 {
-  struct cpms_data *data = obj;
+  struct cpms_data *data = (struct cpms_data *) obj;
   enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
 
   char *module_name;
@@ -110,7 +110,7 @@ core_process_module_section (bfd *abfd, 
   if (!startswith (sect->name, ".module"))
     return;
 
-  buf = xmalloc (bfd_get_section_size (sect) + 1);
+  buf = (gdb_byte *) xmalloc (bfd_get_section_size (sect) + 1);
   if (!buf)
     {
       printf_unfiltered ("memory allocation failed for %s\n", sect->name);
@@ -163,7 +163,7 @@ windows_core_xfer_shared_libraries (stru
 			 &data);
   obstack_grow_str0 (&obstack, "</library-list>\n");
 
-  buf = obstack_finish (&obstack);
+  buf = (const char *) obstack_finish (&obstack);
   len_avail = strlen (buf);
   if (offset >= len_avail)
     return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-nat.c ./gdb/i386-darwin-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-darwin-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-tdep.c ./gdb/i386-darwin-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-darwin-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
 
@@ -26,7 +26,6 @@
 #include "floatformat.h"
 #include "symtab.h"
 #include "regcache.h"
-#include "libbfd.h"
 #include "objfiles.h"
 
 #include "i387-tdep.h"
@@ -37,6 +36,7 @@
 #include "solib.h"
 #include "solib-darwin.h"
 #include "dwarf2-frame.h"
+#include <algorithm>
 
 /* Offsets into the struct i386_thread_state where we'll find the saved regs.
    From <mach/i386/thread_status.h> and i386-tdep.h.  */
@@ -138,8 +138,12 @@ i386_darwin_arg_type_alignment (struct t
       int i;
       int res = 4;
       for (i = 0; i < TYPE_NFIELDS (type); i++)
-        res = max (res,
-                   i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i)));
+	{
+	  int align
+	    = i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i));
+
+	  res = std::max (res, align);
+	}
       return res;
     }
   /* 2.  The caller aligns nonvector arguments to 4-byte boundaries.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-tdep.h ./gdb/i386-darwin-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-darwin-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-darwin-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Darwin x86.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-dicos-tdep.c ./gdb/i386-dicos-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-dicos-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-dicos-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for DICOS running on i386's, for GDB.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,8 +24,6 @@
 static void
 i386_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   dicos_init_abi (gdbarch);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-nat.c ./gdb/i386-fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,197 @@
+/* Native-dependent code for FreeBSD/i386.
+
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+
+#include "fbsd-nat.h"
+#include "i386-tdep.h"
+#include "x86-nat.h"
+#include "x86-bsd-nat.h"
+#include "i386-bsd-nat.h"
+
+/* Resume execution of the inferior process.  If STEP is nonzero,
+   single-step it.  If SIGNAL is nonzero, give it that signal.  */
+
+static void
+i386fbsd_resume (struct target_ops *ops,
+		 ptid_t ptid, int step, enum gdb_signal signal)
+{
+  pid_t pid = ptid_get_pid (ptid);
+  int request = PT_STEP;
+
+  if (pid == -1)
+    /* Resume all threads.  This only gets used in the non-threaded
+       case, where "resume all threads" and "resume inferior_ptid" are
+       the same.  */
+    pid = ptid_get_pid (inferior_ptid);
+
+  if (!step)
+    {
+      struct regcache *regcache = get_current_regcache ();
+      ULONGEST eflags;
+
+      /* Workaround for a bug in FreeBSD.  Make sure that the trace
+ 	 flag is off when doing a continue.  There is a code path
+ 	 through the kernel which leaves the flag set when it should
+ 	 have been cleared.  If a process has a signal pending (such
+ 	 as SIGALRM) and we do a PT_STEP, the process never really has
+ 	 a chance to run because the kernel needs to notify the
+ 	 debugger that a signal is being sent.  Therefore, the process
+ 	 never goes through the kernel's trap() function which would
+ 	 normally clear it.  */
+
+      regcache_cooked_read_unsigned (regcache, I386_EFLAGS_REGNUM,
+				     &eflags);
+      if (eflags & 0x0100)
+	regcache_cooked_write_unsigned (regcache, I386_EFLAGS_REGNUM,
+					eflags & ~0x0100);
+
+      request = PT_CONTINUE;
+    }
+
+  /* An addres of (caddr_t) 1 tells ptrace to continue from where it
+     was.  (If GDB wanted it to start some other way, we have already
+     written a new PC value to the child.)  */
+  if (ptrace (request, pid, (caddr_t) 1,
+	      gdb_signal_to_host (signal)) == -1)
+    perror_with_name (("ptrace"));
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  /* The following is true for FreeBSD 4.7:
+
+     The pcb contains %eip, %ebx, %esp, %ebp, %esi, %edi and %gs.
+     This accounts for all callee-saved registers specified by the
+     psABI and then some.  Here %esp contains the stack pointer at the
+     point just after the call to cpu_switch().  From this information
+     we reconstruct the register state as it would look when we just
+     returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_esp == 0)
+    return 0;
+
+  pcb->pcb_esp += 4;
+  regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi);
+  regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi);
+  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
+  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+  regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx);
+  regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip);
+  regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs);
+
+  return 1;
+}
+
+
+#ifdef PT_GETXSTATE_INFO
+/* Implement the to_read_description method.  */
+
+static const struct target_desc *
+i386fbsd_read_description (struct target_ops *ops)
+{
+  static int xsave_probed;
+  static uint64_t xcr0;
+
+  if (!xsave_probed)
+    {
+      struct ptrace_xstate_info info;
+
+      if (ptrace (PT_GETXSTATE_INFO, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &info, sizeof (info)) == 0)
+	{
+	  x86bsd_xsave_len = info.xsave_len;
+	  xcr0 = info.xsave_mask;
+	}
+      xsave_probed = 1;
+    }
+
+  if (x86bsd_xsave_len != 0)
+    {
+      return i386_target_description (xcr0);
+    }
+  else
+    return tdesc_i386;
+}
+#endif
+
+/* Prevent warning from -Wmissing-prototypes.  */
+void _initialize_i386fbsd_nat (void);
+
+void
+_initialize_i386fbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add some extra features to the common *BSD/i386 target.  */
+  t = i386bsd_target ();
+
+#ifdef PT_GETXSTATE_INFO
+  t->to_read_description = i386fbsd_read_description;
+#endif
+
+  t->to_resume = i386fbsd_resume;
+  fbsd_nat_add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (i386fbsd_supply_pcb);
+
+#ifdef KERN_PROC_SIGTRAMP
+  /* Normally signal frames are detected via i386fbsd_sigtramp_p.
+     However, FreeBSD 9.2 through 10.1 do not include the page holding
+     the signal code in core dumps.  These releases do provide a
+     kern.proc.sigtramp.<pid> sysctl that returns the location of the
+     signal trampoline for a running process.  We fetch the location
+     of the current (gdb) process and use this to identify signal
+     frames in core dumps from these releases.  */
+  {
+    int mib[4];
+    struct kinfo_sigtramp kst;
+    size_t len;
+
+    mib[0] = CTL_KERN;
+    mib[1] = KERN_PROC;
+    mib[2] = KERN_PROC_SIGTRAMP;
+    mib[3] = getpid ();
+    len = sizeof (kst);
+    if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0)
+      {
+	i386fbsd_sigtramp_start_addr = (uintptr_t) kst.ksigtramp_start;
+	i386fbsd_sigtramp_end_addr = (uintptr_t) kst.ksigtramp_end;
+      }
+  }
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-nat.c ./gdb/i386fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,209 +0,0 @@
-/* Native-dependent code for FreeBSD/i386.
-
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/sysctl.h>
-#include <sys/user.h>
-
-#include "fbsd-nat.h"
-#include "i386-tdep.h"
-#include "x86-nat.h"
-#include "i386bsd-nat.h"
-
-/* Resume execution of the inferior process.  If STEP is nonzero,
-   single-step it.  If SIGNAL is nonzero, give it that signal.  */
-
-static void
-i386fbsd_resume (struct target_ops *ops,
-		 ptid_t ptid, int step, enum gdb_signal signal)
-{
-  pid_t pid = ptid_get_pid (ptid);
-  int request = PT_STEP;
-
-  if (pid == -1)
-    /* Resume all threads.  This only gets used in the non-threaded
-       case, where "resume all threads" and "resume inferior_ptid" are
-       the same.  */
-    pid = ptid_get_pid (inferior_ptid);
-
-  if (!step)
-    {
-      struct regcache *regcache = get_current_regcache ();
-      ULONGEST eflags;
-
-      /* Workaround for a bug in FreeBSD.  Make sure that the trace
- 	 flag is off when doing a continue.  There is a code path
- 	 through the kernel which leaves the flag set when it should
- 	 have been cleared.  If a process has a signal pending (such
- 	 as SIGALRM) and we do a PT_STEP, the process never really has
- 	 a chance to run because the kernel needs to notify the
- 	 debugger that a signal is being sent.  Therefore, the process
- 	 never goes through the kernel's trap() function which would
- 	 normally clear it.  */
-
-      regcache_cooked_read_unsigned (regcache, I386_EFLAGS_REGNUM,
-				     &eflags);
-      if (eflags & 0x0100)
-	regcache_cooked_write_unsigned (regcache, I386_EFLAGS_REGNUM,
-					eflags & ~0x0100);
-
-      request = PT_CONTINUE;
-    }
-
-  /* An addres of (caddr_t) 1 tells ptrace to continue from where it
-     was.  (If GDB wanted it to start some other way, we have already
-     written a new PC value to the child.)  */
-  if (ptrace (request, pid, (caddr_t) 1,
-	      gdb_signal_to_host (signal)) == -1)
-    perror_with_name (("ptrace"));
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  /* The following is true for FreeBSD 4.7:
-
-     The pcb contains %eip, %ebx, %esp, %ebp, %esi, %edi and %gs.
-     This accounts for all callee-saved registers specified by the
-     psABI and then some.  Here %esp contains the stack pointer at the
-     point just after the call to cpu_switch().  From this information
-     we reconstruct the register state as it would look when we just
-     returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_esp == 0)
-    return 0;
-
-  pcb->pcb_esp += 4;
-  regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi);
-  regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi);
-  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
-  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
-  regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx);
-  regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip);
-  regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs);
-
-  return 1;
-}
-
-
-#ifdef PT_GETXSTATE_INFO
-/* Implement the to_read_description method.  */
-
-static const struct target_desc *
-i386fbsd_read_description (struct target_ops *ops)
-{
-  static int xsave_probed;
-  static uint64_t xcr0;
-
-  if (!xsave_probed)
-    {
-      struct ptrace_xstate_info info;
-
-      if (ptrace (PT_GETXSTATE_INFO, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &info, sizeof (info)) == 0)
-	{
-	  i386bsd_xsave_len = info.xsave_len;
-	  xcr0 = info.xsave_mask;
-	}
-      xsave_probed = 1;
-    }
-
-  if (i386bsd_xsave_len != 0)
-    {
-      return i386_target_description (xcr0);
-    }
-  else
-    return tdesc_i386;
-}
-#endif
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_i386fbsd_nat (void);
-
-void
-_initialize_i386fbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add some extra features to the common *BSD/i386 target.  */
-  t = i386bsd_target ();
-
-#ifdef HAVE_PT_GETDBREGS
-
-  x86_use_watchpoints (t);
-
-  x86_dr_low.set_control = i386bsd_dr_set_control;
-  x86_dr_low.set_addr = i386bsd_dr_set_addr;
-  x86_dr_low.get_addr = i386bsd_dr_get_addr;
-  x86_dr_low.get_status = i386bsd_dr_get_status;
-  x86_dr_low.get_control = i386bsd_dr_get_control;
-  x86_set_debug_register_length (4);
-
-#endif /* HAVE_PT_GETDBREGS */
-
-#ifdef PT_GETXSTATE_INFO
-  t->to_read_description = i386fbsd_read_description;
-#endif
-
-  t->to_resume = i386fbsd_resume;
-  fbsd_nat_add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (i386fbsd_supply_pcb);
-
-#ifdef KERN_PROC_SIGTRAMP
-  /* Normally signal frames are detected via i386fbsd_sigtramp_p.
-     However, FreeBSD 9.2 through 10.1 do not include the page holding
-     the signal code in core dumps.  These releases do provide a
-     kern.proc.sigtramp.<pid> sysctl that returns the location of the
-     signal trampoline for a running process.  We fetch the location
-     of the current (gdb) process and use this to identify signal
-     frames in core dumps from these releases.  */
-  {
-    int mib[4];
-    struct kinfo_sigtramp kst;
-    size_t len;
-
-    mib[0] = CTL_KERN;
-    mib[1] = KERN_PROC;
-    mib[2] = KERN_PROC_SIGTRAMP;
-    mib[3] = getpid ();
-    len = sizeof (kst);
-    if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0)
-      {
-	i386fbsd_sigtramp_start_addr = (uintptr_t) kst.ksigtramp_start;
-	i386fbsd_sigtramp_end_addr = (uintptr_t) kst.ksigtramp_end;
-      }
-  }
-#endif
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-tdep.c ./gdb/i386-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,488 @@
+/* Target-dependent code for FreeBSD/i386.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "i386-fbsd-tdep.h"
+#include "x86-xstate.h"
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+#include "bsd-uthread.h"
+#include "fbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Support for signal handlers.  */
+
+/* Return whether THIS_FRAME corresponds to a FreeBSD sigtramp
+   routine.  */
+
+/* FreeBSD/i386 supports three different signal trampolines, one for
+   versions before 4.0, a second for 4.x, and a third for 5.0 and
+   later.  To complicate matters, FreeBSD/i386 binaries running under
+   an amd64 kernel use a different set of trampolines.  These
+   trampolines differ from the i386 kernel trampolines in that they
+   omit a middle section that conditionally restores %gs.  */
+
+static const gdb_byte i386fbsd_sigtramp_start[] =
+{
+  0x8d, 0x44, 0x24, 0x20,       /* lea     SIGF_UC(%esp),%eax */
+  0x50				/* pushl   %eax */
+};
+
+static const gdb_byte i386fbsd_sigtramp_middle[] =
+{
+  0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x00,
+				/* testl   $PSL_VM,UC_EFLAGS(%eax) */
+  0x75, 0x03,			/* jne	   +3 */
+  0x8e, 0x68, 0x14		/* mov	   UC_GS(%eax),%gs */
+};
+
+static const gdb_byte i386fbsd_sigtramp_end[] =
+{
+  0xb8, 0xa1, 0x01, 0x00, 0x00, /* movl   $SYS_sigreturn,%eax */
+  0x50,			/* pushl   %eax */
+  0xcd, 0x80			/* int	   $0x80 */
+};
+
+static const gdb_byte i386fbsd_freebsd4_sigtramp_start[] =
+{
+  0x8d, 0x44, 0x24, 0x14,	/* lea	   SIGF_UC4(%esp),%eax */
+  0x50				/* pushl   %eax */
+};
+
+static const gdb_byte i386fbsd_freebsd4_sigtramp_middle[] =
+{
+  0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x00,
+				/* testl   $PSL_VM,UC4_EFLAGS(%eax) */
+  0x75, 0x03,			/* jne	   +3 */
+  0x8e, 0x68, 0x14		/* mov	   UC4_GS(%eax),%gs */
+};
+
+static const gdb_byte i386fbsd_freebsd4_sigtramp_end[] =
+{
+  0xb8, 0x58, 0x01, 0x00, 0x00, /* movl    $344,%eax */
+  0x50,			/* pushl   %eax */
+  0xcd, 0x80			/* int	   $0x80 */
+};
+
+static const gdb_byte i386fbsd_osigtramp_start[] =
+{
+  0x8d, 0x44, 0x24, 0x14,	/* lea	   SIGF_SC(%esp),%eax */
+  0x50				/* pushl   %eax */
+};
+
+static const gdb_byte i386fbsd_osigtramp_middle[] =
+{
+  0xf7, 0x40, 0x18, 0x00, 0x00, 0x02, 0x00,
+				/* testl   $PSL_VM,SC_PS(%eax) */
+  0x75, 0x03,			/* jne	   +3 */
+  0x8e, 0x68, 0x44		/* mov	   SC_GS(%eax),%gs */
+};
+
+static const gdb_byte i386fbsd_osigtramp_end[] =
+{
+  0xb8, 0x67, 0x00, 0x00, 0x00, /* movl    $103,%eax */
+  0x50,			/* pushl   %eax */
+  0xcd, 0x80			/* int	   $0x80 */
+};
+
+/* The three different trampolines are all the same size.  */
+gdb_static_assert (sizeof i386fbsd_sigtramp_start
+		   == sizeof i386fbsd_freebsd4_sigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_start
+		   == sizeof i386fbsd_osigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+		   == sizeof i386fbsd_freebsd4_sigtramp_middle);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+		   == sizeof i386fbsd_osigtramp_middle);
+gdb_static_assert (sizeof i386fbsd_sigtramp_end
+		   == sizeof i386fbsd_freebsd4_sigtramp_end);
+gdb_static_assert (sizeof i386fbsd_sigtramp_end
+		   == sizeof i386fbsd_osigtramp_end);
+
+/* We assume that the middle is the largest chunk below.  */
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+		   > sizeof i386fbsd_sigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+		   > sizeof i386fbsd_sigtramp_end);
+
+static int
+i386fbsd_sigtramp_p (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  gdb_byte buf[sizeof i386fbsd_sigtramp_middle];
+  const gdb_byte *middle, *end;
+
+  /* Look for a matching start.  */
+  if (!safe_frame_unwind_memory (this_frame, pc, buf,
+				 sizeof i386fbsd_sigtramp_start))
+    return 0;
+  if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start)
+      == 0)
+    {
+      middle = i386fbsd_sigtramp_middle;
+      end = i386fbsd_sigtramp_end;
+    }
+  else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start,
+		   sizeof i386fbsd_freebsd4_sigtramp_start) == 0)
+    {
+      middle = i386fbsd_freebsd4_sigtramp_middle;
+      end = i386fbsd_freebsd4_sigtramp_end;
+    }
+  else if (memcmp (buf, i386fbsd_osigtramp_start,
+		   sizeof i386fbsd_osigtramp_start) == 0)
+    {
+      middle = i386fbsd_osigtramp_middle;
+      end = i386fbsd_osigtramp_end;
+    }
+  else
+    return 0;
+
+  /* Since the end is shorter than the middle, check for a matching end
+     next.  */
+  pc += sizeof i386fbsd_sigtramp_start;
+  if (!safe_frame_unwind_memory (this_frame, pc, buf,
+				 sizeof i386fbsd_sigtramp_end))
+    return 0;
+  if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) == 0)
+    return 1;
+
+  /* If the end didn't match, check for a matching middle.  */
+  if (!safe_frame_unwind_memory (this_frame, pc, buf,
+				 sizeof i386fbsd_sigtramp_middle))
+    return 0;
+  if (memcmp (buf, middle, sizeof i386fbsd_sigtramp_middle) != 0)
+    return 0;
+
+  /* The middle matched, check for a matching end.  */
+  pc += sizeof i386fbsd_sigtramp_middle;
+  if (!safe_frame_unwind_memory (this_frame, pc, buf,
+				 sizeof i386fbsd_sigtramp_end))
+    return 0;
+  if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) != 0)
+    return 0;
+
+  return 1;
+}
+
+/* FreeBSD 3.0-RELEASE or later.  */
+
+/* From <machine/reg.h>.  */
+static int i386fbsd_r_reg_offset[] =
+{
+  9 * 4, 8 * 4, 7 * 4, 6 * 4,	/* %eax, %ecx, %edx, %ebx */
+  15 * 4, 4 * 4,		/* %esp, %ebp */
+  3 * 4, 2 * 4,			/* %esi, %edi */
+  12 * 4, 14 * 4,		/* %eip, %eflags */
+  13 * 4, 16 * 4,		/* %cs, %ss */
+  1 * 4, 0 * 4, -1, -1		/* %ds, %es, %fs, %gs */
+};
+
+/* Sigtramp routine location.  */
+CORE_ADDR i386fbsd_sigtramp_start_addr;
+CORE_ADDR i386fbsd_sigtramp_end_addr;
+
+/* From <machine/signal.h>.  */
+int i386fbsd_sc_reg_offset[] =
+{
+  8 + 14 * 4,			/* %eax */
+  8 + 13 * 4,			/* %ecx */
+  8 + 12 * 4,			/* %edx */
+  8 + 11 * 4,			/* %ebx */
+  8 + 0 * 4,                    /* %esp */
+  8 + 1 * 4,                    /* %ebp */
+  8 + 10 * 4,                   /* %esi */
+  8 + 9 * 4,                    /* %edi */
+  8 + 3 * 4,                    /* %eip */
+  8 + 4 * 4,                    /* %eflags */
+  8 + 7 * 4,                    /* %cs */
+  8 + 8 * 4,                    /* %ss */
+  8 + 6 * 4,                    /* %ds */
+  8 + 5 * 4,                    /* %es */
+  8 + 15 * 4,			/* %fs */
+  8 + 16 * 4			/* %gs */
+};
+
+/* From /usr/src/lib/libc/i386/gen/_setjmp.S.  */
+static int i386fbsd_jmp_buf_reg_offset[] =
+{
+  -1,				/* %eax */
+  -1,				/* %ecx */
+  -1,				/* %edx */
+  1 * 4,			/* %ebx */
+  2 * 4,			/* %esp */
+  3 * 4,			/* %ebp */
+  4 * 4,			/* %esi */
+  5 * 4,			/* %edi */
+  0 * 4				/* %eip */
+};
+
+/* Get XSAVE extended state xcr0 from core dump.  */
+
+uint64_t
+i386fbsd_core_read_xcr0 (bfd *abfd)
+{
+  asection *xstate = bfd_get_section_by_name (abfd, ".reg-xstate");
+  uint64_t xcr0;
+
+  if (xstate)
+    {
+      size_t size = bfd_section_size (abfd, xstate);
+
+      /* Check extended state size.  */
+      if (size < X86_XSTATE_AVX_SIZE)
+	xcr0 = X86_XSTATE_SSE_MASK;
+      else
+	{
+	  char contents[8];
+
+	  if (! bfd_get_section_contents (abfd, xstate, contents,
+					  I386_FBSD_XSAVE_XCR0_OFFSET,
+					  8))
+	    {
+	      warning (_("Couldn't read `xcr0' bytes from "
+			 "`.reg-xstate' section in core file."));
+	      return 0;
+	    }
+
+	  xcr0 = bfd_get_64 (abfd, contents);
+	}
+    }
+  else
+    xcr0 = 0;
+
+  return xcr0;
+}
+
+/* Implement the core_read_description gdbarch method.  */
+
+static const struct target_desc *
+i386fbsd_core_read_description (struct gdbarch *gdbarch,
+				struct target_ops *target,
+				bfd *abfd)
+{
+  return i386_target_description (i386fbsd_core_read_xcr0 (abfd));
+}
+
+/* Similar to i386_supply_fpregset, but use XSAVE extended state.  */
+
+static void
+i386fbsd_supply_xstateregset (const struct regset *regset,
+			      struct regcache *regcache, int regnum,
+			      const void *xstateregs, size_t len)
+{
+  i387_supply_xsave (regcache, regnum, xstateregs);
+}
+
+/* Similar to i386_collect_fpregset, but use XSAVE extended state.  */
+
+static void
+i386fbsd_collect_xstateregset (const struct regset *regset,
+			       const struct regcache *regcache,
+			       int regnum, void *xstateregs, size_t len)
+{
+  i387_collect_xsave (regcache, regnum, xstateregs, 1);
+}
+
+/* Register set definitions.  */
+
+static const struct regset i386fbsd_xstateregset =
+  {
+    NULL,
+    i386fbsd_supply_xstateregset,
+    i386fbsd_collect_xstateregset
+  };
+
+/* Iterate over core file register note sections.  */
+
+static void
+i386fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				       iterate_over_regset_sections_cb *cb,
+				       void *cb_data,
+				       const struct regcache *regcache)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  cb (".reg", tdep->sizeof_gregset, &i386_gregset, NULL, cb_data);
+  cb (".reg2", tdep->sizeof_fpregset, &i386_fpregset, NULL, cb_data);
+
+  if (tdep->xcr0 & X86_XSTATE_AVX)
+    cb (".reg-xstate", X86_XSTATE_SIZE(tdep->xcr0),
+	&i386fbsd_xstateregset, "XSAVE extended state", cb_data);
+}
+
+static void
+i386fbsd_supply_uthread (struct regcache *regcache,
+			 int regnum, CORE_ADDR addr)
+{
+  gdb_byte buf[4];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++)
+    {
+      if (i386fbsd_jmp_buf_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  read_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4);
+	  regcache_raw_supply (regcache, i, buf);
+	}
+    }
+}
+
+static void
+i386fbsd_collect_uthread (const struct regcache *regcache,
+			  int regnum, CORE_ADDR addr)
+{
+  gdb_byte buf[4];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++)
+    {
+      if (i386fbsd_jmp_buf_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  regcache_raw_collect (regcache, i, buf);
+	  write_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4);
+	}
+    }
+}
+
+static void
+i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Obviously FreeBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+
+  /* FreeBSD has a different `struct reg', and reserves some space for
+     its FPU emulator in `struct fpreg'.  */
+  tdep->gregset_reg_offset = i386fbsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (i386fbsd_r_reg_offset);
+  tdep->sizeof_gregset = 18 * 4;
+  tdep->sizeof_fpregset = 176;
+
+  /* FreeBSD uses -freg-struct-return by default.  */
+  tdep->struct_return = reg_struct_return;
+
+  tdep->sigtramp_p = i386fbsd_sigtramp_p;
+
+  /* FreeBSD uses a different memory layout.  */
+  tdep->sigtramp_start = i386fbsd_sigtramp_start_addr;
+  tdep->sigtramp_end = i386fbsd_sigtramp_end_addr;
+
+  /* FreeBSD has a more complete `struct sigcontext'.  */
+  tdep->sc_reg_offset = i386fbsd_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (i386fbsd_sc_reg_offset);
+
+  /* FreeBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, i386fbsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, i386fbsd_collect_uthread);
+
+  i386_elf_init_abi (info, gdbarch);
+
+  /* FreeBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+/* FreeBSD 4.0-RELEASE or later.  */
+
+/* From <machine/reg.h>.  */
+static int i386fbsd4_r_reg_offset[] =
+{
+  10 * 4, 9 * 4, 8 * 4, 7 * 4,	/* %eax, %ecx, %edx, %ebx */
+  16 * 4, 5 * 4,		/* %esp, %ebp */
+  4 * 4, 3 * 4,			/* %esi, %edi */
+  13 * 4, 15 * 4,		/* %eip, %eflags */
+  14 * 4, 17 * 4,		/* %cs, %ss */
+  2 * 4, 1 * 4, 0 * 4, 18 * 4	/* %ds, %es, %fs, %gs */
+};
+
+/* From <machine/signal.h>.  */
+int i386fbsd4_sc_reg_offset[] =
+{
+  20 + 11 * 4,			/* %eax */
+  20 + 10 * 4,			/* %ecx */
+  20 + 9 * 4,			/* %edx */
+  20 + 8 * 4,			/* %ebx */
+  20 + 17 * 4,			/* %esp */
+  20 + 6 * 4,			/* %ebp */
+  20 + 5 * 4,			/* %esi */
+  20 + 4 * 4,			/* %edi */
+  20 + 14 * 4,			/* %eip */
+  20 + 16 * 4,			/* %eflags */
+  20 + 15 * 4,			/* %cs */
+  20 + 18 * 4,			/* %ss */
+  20 + 3 * 4,			/* %ds */
+  20 + 2 * 4,			/* %es */
+  20 + 1 * 4,			/* %fs */
+  20 + 0 * 4			/* %gs */
+};
+
+static void
+i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Generic FreeBSD support. */
+  fbsd_init_abi (info, gdbarch);
+
+  /* Inherit stuff from older releases.  We assume that FreeBSD
+     4.0-RELEASE always uses ELF.  */
+  i386fbsd_init_abi (info, gdbarch);
+
+  /* FreeBSD 4.0 introduced a new `struct reg'.  */
+  tdep->gregset_reg_offset = i386fbsd4_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (i386fbsd4_r_reg_offset);
+  tdep->sizeof_gregset = 19 * 4;
+
+  /* FreeBSD 4.0 introduced a new `struct sigcontext'.  */
+  tdep->sc_reg_offset = i386fbsd4_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (i386fbsd4_sc_reg_offset);
+
+  tdep->xsave_xcr0_offset = I386_FBSD_XSAVE_XCR0_OFFSET;
+
+  /* Iterate over core file register note sections.  */
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, i386fbsd_iterate_over_regset_sections);
+
+  set_gdbarch_core_read_description (gdbarch,
+				     i386fbsd_core_read_description);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386fbsd_tdep (void);
+
+void
+_initialize_i386fbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD,
+			  i386fbsd4_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-tdep.c ./gdb/i386fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,498 +0,0 @@
-/* Target-dependent code for FreeBSD/i386.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "i386fbsd-tdep.h"
-#include "x86-xstate.h"
-
-#include "i386-tdep.h"
-#include "i387-tdep.h"
-#include "bsd-uthread.h"
-#include "fbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Support for signal handlers.  */
-
-/* Return whether THIS_FRAME corresponds to a FreeBSD sigtramp
-   routine.  */
-
-/* FreeBSD/i386 supports three different signal trampolines, one for
-   versions before 4.0, a second for 4.x, and a third for 5.0 and
-   later.  To complicate matters, FreeBSD/i386 binaries running under
-   an amd64 kernel use a different set of trampolines.  These
-   trampolines differ from the i386 kernel trampolines in that they
-   omit a middle section that conditionally restores %gs.  */
-
-static const gdb_byte i386fbsd_sigtramp_start[] =
-{
-  0x8d, 0x44, 0x24, 0x20,       /* lea     SIGF_UC(%esp),%eax */
-  0x50				/* pushl   %eax */
-};
-
-static const gdb_byte i386fbsd_sigtramp_middle[] =
-{
-  0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x00,
-				/* testl   $PSL_VM,UC_EFLAGS(%eax) */
-  0x75, 0x03,			/* jne	   +3 */
-  0x8e, 0x68, 0x14		/* mov	   UC_GS(%eax),%gs */
-};
-
-static const gdb_byte i386fbsd_sigtramp_end[] =
-{
-  0xb8, 0xa1, 0x01, 0x00, 0x00, /* movl   $SYS_sigreturn,%eax */
-  0x50,			/* pushl   %eax */
-  0xcd, 0x80			/* int	   $0x80 */
-};
-
-static const gdb_byte i386fbsd_freebsd4_sigtramp_start[] =
-{
-  0x8d, 0x44, 0x24, 0x14,	/* lea	   SIGF_UC4(%esp),%eax */
-  0x50				/* pushl   %eax */
-};
-
-static const gdb_byte i386fbsd_freebsd4_sigtramp_middle[] =
-{
-  0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x00,
-				/* testl   $PSL_VM,UC4_EFLAGS(%eax) */
-  0x75, 0x03,			/* jne	   +3 */
-  0x8e, 0x68, 0x14		/* mov	   UC4_GS(%eax),%gs */
-};
-
-static const gdb_byte i386fbsd_freebsd4_sigtramp_end[] =
-{
-  0xb8, 0x58, 0x01, 0x00, 0x00, /* movl    $344,%eax */
-  0x50,			/* pushl   %eax */
-  0xcd, 0x80			/* int	   $0x80 */
-};
-
-static const gdb_byte i386fbsd_osigtramp_start[] =
-{
-  0x8d, 0x44, 0x24, 0x14,	/* lea	   SIGF_SC(%esp),%eax */
-  0x50				/* pushl   %eax */
-};
-
-static const gdb_byte i386fbsd_osigtramp_middle[] =
-{
-  0xf7, 0x40, 0x18, 0x00, 0x00, 0x02, 0x00,
-				/* testl   $PSL_VM,SC_PS(%eax) */
-  0x75, 0x03,			/* jne	   +3 */
-  0x8e, 0x68, 0x44		/* mov	   SC_GS(%eax),%gs */
-};
-
-static const gdb_byte i386fbsd_osigtramp_end[] =
-{
-  0xb8, 0x67, 0x00, 0x00, 0x00, /* movl    $103,%eax */
-  0x50,			/* pushl   %eax */
-  0xcd, 0x80			/* int	   $0x80 */
-};
-
-/* The three different trampolines are all the same size.  */
-gdb_static_assert (sizeof i386fbsd_sigtramp_start
-		   == sizeof i386fbsd_freebsd4_sigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_start
-		   == sizeof i386fbsd_osigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle
-		   == sizeof i386fbsd_freebsd4_sigtramp_middle);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle
-		   == sizeof i386fbsd_osigtramp_middle);
-gdb_static_assert (sizeof i386fbsd_sigtramp_end
-		   == sizeof i386fbsd_freebsd4_sigtramp_end);
-gdb_static_assert (sizeof i386fbsd_sigtramp_end
-		   == sizeof i386fbsd_osigtramp_end);
-
-/* We assume that the middle is the largest chunk below.  */
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle
-		   > sizeof i386fbsd_sigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle
-		   > sizeof i386fbsd_sigtramp_end);
-
-static int
-i386fbsd_sigtramp_p (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  gdb_byte buf[sizeof i386fbsd_sigtramp_middle];
-  const gdb_byte *middle, *end;
-
-  /* Look for a matching start.  */
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-				 sizeof i386fbsd_sigtramp_start))
-    return 0;
-  if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start)
-      == 0)
-    {
-      middle = i386fbsd_sigtramp_middle;
-      end = i386fbsd_sigtramp_end;
-    }
-  else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start,
-		   sizeof i386fbsd_freebsd4_sigtramp_start) == 0)
-    {
-      middle = i386fbsd_freebsd4_sigtramp_middle;
-      end = i386fbsd_freebsd4_sigtramp_end;
-    }
-  else if (memcmp (buf, i386fbsd_osigtramp_start,
-		   sizeof i386fbsd_osigtramp_start) == 0)
-    {
-      middle = i386fbsd_osigtramp_middle;
-      end = i386fbsd_osigtramp_end;
-    }
-  else
-    return 0;
-
-  /* Since the end is shorter than the middle, check for a matching end
-     next.  */
-  pc += sizeof i386fbsd_sigtramp_start;
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-				 sizeof i386fbsd_sigtramp_end))
-    return 0;
-  if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) == 0)
-    return 1;
-
-  /* If the end didn't match, check for a matching middle.  */
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-				 sizeof i386fbsd_sigtramp_middle))
-    return 0;
-  if (memcmp (buf, middle, sizeof i386fbsd_sigtramp_middle) != 0)
-    return 0;
-
-  /* The middle matched, check for a matching end.  */
-  pc += sizeof i386fbsd_sigtramp_middle;
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-				 sizeof i386fbsd_sigtramp_end))
-    return 0;
-  if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) != 0)
-    return 0;
-
-  return 1;
-}
-
-/* FreeBSD 3.0-RELEASE or later.  */
-
-/* From <machine/reg.h>.  */
-static int i386fbsd_r_reg_offset[] =
-{
-  9 * 4, 8 * 4, 7 * 4, 6 * 4,	/* %eax, %ecx, %edx, %ebx */
-  15 * 4, 4 * 4,		/* %esp, %ebp */
-  3 * 4, 2 * 4,			/* %esi, %edi */
-  12 * 4, 14 * 4,		/* %eip, %eflags */
-  13 * 4, 16 * 4,		/* %cs, %ss */
-  1 * 4, 0 * 4, -1, -1		/* %ds, %es, %fs, %gs */
-};
-
-/* Sigtramp routine location.  */
-CORE_ADDR i386fbsd_sigtramp_start_addr;
-CORE_ADDR i386fbsd_sigtramp_end_addr;
-
-/* From <machine/signal.h>.  */
-int i386fbsd_sc_reg_offset[] =
-{
-  8 + 14 * 4,			/* %eax */
-  8 + 13 * 4,			/* %ecx */
-  8 + 12 * 4,			/* %edx */
-  8 + 11 * 4,			/* %ebx */
-  8 + 0 * 4,                    /* %esp */
-  8 + 1 * 4,                    /* %ebp */
-  8 + 10 * 4,                   /* %esi */
-  8 + 9 * 4,                    /* %edi */
-  8 + 3 * 4,                    /* %eip */
-  8 + 4 * 4,                    /* %eflags */
-  8 + 7 * 4,                    /* %cs */
-  8 + 8 * 4,                    /* %ss */
-  8 + 6 * 4,                    /* %ds */
-  8 + 5 * 4,                    /* %es */
-  8 + 15 * 4,			/* %fs */
-  8 + 16 * 4			/* %gs */
-};
-
-/* From /usr/src/lib/libc/i386/gen/_setjmp.S.  */
-static int i386fbsd_jmp_buf_reg_offset[] =
-{
-  -1,				/* %eax */
-  -1,				/* %ecx */
-  -1,				/* %edx */
-  1 * 4,			/* %ebx */
-  2 * 4,			/* %esp */
-  3 * 4,			/* %ebp */
-  4 * 4,			/* %esi */
-  5 * 4,			/* %edi */
-  0 * 4				/* %eip */
-};
-
-/* Get XSAVE extended state xcr0 from core dump.  */
-
-uint64_t
-i386fbsd_core_read_xcr0 (bfd *abfd)
-{
-  asection *xstate = bfd_get_section_by_name (abfd, ".reg-xstate");
-  uint64_t xcr0;
-
-  if (xstate)
-    {
-      size_t size = bfd_section_size (abfd, xstate);
-
-      /* Check extended state size.  */
-      if (size < X86_XSTATE_AVX_SIZE)
-	xcr0 = X86_XSTATE_SSE_MASK;
-      else
-	{
-	  char contents[8];
-
-	  if (! bfd_get_section_contents (abfd, xstate, contents,
-					  I386_FBSD_XSAVE_XCR0_OFFSET,
-					  8))
-	    {
-	      warning (_("Couldn't read `xcr0' bytes from "
-			 "`.reg-xstate' section in core file."));
-	      return 0;
-	    }
-
-	  xcr0 = bfd_get_64 (abfd, contents);
-	}
-    }
-  else
-    xcr0 = 0;
-
-  return xcr0;
-}
-
-/* Implement the core_read_description gdbarch method.  */
-
-static const struct target_desc *
-i386fbsd_core_read_description (struct gdbarch *gdbarch,
-				struct target_ops *target,
-				bfd *abfd)
-{
-  return i386_target_description (i386fbsd_core_read_xcr0 (abfd));
-}
-
-/* Similar to i386_supply_fpregset, but use XSAVE extended state.  */
-
-static void
-i386fbsd_supply_xstateregset (const struct regset *regset,
-			      struct regcache *regcache, int regnum,
-			      const void *xstateregs, size_t len)
-{
-  i387_supply_xsave (regcache, regnum, xstateregs);
-}
-
-/* Similar to i386_collect_fpregset, but use XSAVE extended state.  */
-
-static void
-i386fbsd_collect_xstateregset (const struct regset *regset,
-			       const struct regcache *regcache,
-			       int regnum, void *xstateregs, size_t len)
-{
-  i387_collect_xsave (regcache, regnum, xstateregs, 1);
-}
-
-/* Register set definitions.  */
-
-static const struct regset i386fbsd_xstateregset =
-  {
-    NULL,
-    i386fbsd_supply_xstateregset,
-    i386fbsd_collect_xstateregset
-  };
-
-/* Iterate over core file register note sections.  */
-
-static void
-i386fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				       iterate_over_regset_sections_cb *cb,
-				       void *cb_data,
-				       const struct regcache *regcache)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  cb (".reg", tdep->sizeof_gregset, &i386_gregset, NULL, cb_data);
-  cb (".reg2", tdep->sizeof_fpregset, &i386_fpregset, NULL, cb_data);
-
-  if (tdep->xcr0 & X86_XSTATE_AVX)
-    cb (".reg-xstate", X86_XSTATE_SIZE(tdep->xcr0),
-	&i386fbsd_xstateregset, "XSAVE extended state", cb_data);
-}
-
-static void
-i386fbsd_supply_uthread (struct regcache *regcache,
-			 int regnum, CORE_ADDR addr)
-{
-  gdb_byte buf[4];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++)
-    {
-      if (i386fbsd_jmp_buf_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  read_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4);
-	  regcache_raw_supply (regcache, i, buf);
-	}
-    }
-}
-
-static void
-i386fbsd_collect_uthread (const struct regcache *regcache,
-			  int regnum, CORE_ADDR addr)
-{
-  gdb_byte buf[4];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  for (i = 0; i < ARRAY_SIZE (i386fbsd_jmp_buf_reg_offset); i++)
-    {
-      if (i386fbsd_jmp_buf_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  regcache_raw_collect (regcache, i, buf);
-	  write_memory (addr + i386fbsd_jmp_buf_reg_offset[i], buf, 4);
-	}
-    }
-}
-
-static void
-i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Obviously FreeBSD is BSD-based.  */
-  i386bsd_init_abi (info, gdbarch);
-
-  /* FreeBSD has a different `struct reg', and reserves some space for
-     its FPU emulator in `struct fpreg'.  */
-  tdep->gregset_reg_offset = i386fbsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (i386fbsd_r_reg_offset);
-  tdep->sizeof_gregset = 18 * 4;
-  tdep->sizeof_fpregset = 176;
-
-  /* FreeBSD uses -freg-struct-return by default.  */
-  tdep->struct_return = reg_struct_return;
-
-  tdep->sigtramp_p = i386fbsd_sigtramp_p;
-
-  /* FreeBSD uses a different memory layout.  */
-  tdep->sigtramp_start = i386fbsd_sigtramp_start_addr;
-  tdep->sigtramp_end = i386fbsd_sigtramp_end_addr;
-
-  /* FreeBSD has a more complete `struct sigcontext'.  */
-  tdep->sc_reg_offset = i386fbsd_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (i386fbsd_sc_reg_offset);
-
-  /* FreeBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, i386fbsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, i386fbsd_collect_uthread);
-}
-
-static void
-i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* It's almost identical to FreeBSD a.out.  */
-  i386fbsdaout_init_abi (info, gdbarch);
-
-  /* Except that it uses ELF.  */
-  i386_elf_init_abi (info, gdbarch);
-
-  /* FreeBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-/* FreeBSD 4.0-RELEASE or later.  */
-
-/* From <machine/reg.h>.  */
-static int i386fbsd4_r_reg_offset[] =
-{
-  10 * 4, 9 * 4, 8 * 4, 7 * 4,	/* %eax, %ecx, %edx, %ebx */
-  16 * 4, 5 * 4,		/* %esp, %ebp */
-  4 * 4, 3 * 4,			/* %esi, %edi */
-  13 * 4, 15 * 4,		/* %eip, %eflags */
-  14 * 4, 17 * 4,		/* %cs, %ss */
-  2 * 4, 1 * 4, 0 * 4, 18 * 4	/* %ds, %es, %fs, %gs */
-};
-
-/* From <machine/signal.h>.  */
-int i386fbsd4_sc_reg_offset[] =
-{
-  20 + 11 * 4,			/* %eax */
-  20 + 10 * 4,			/* %ecx */
-  20 + 9 * 4,			/* %edx */
-  20 + 8 * 4,			/* %ebx */
-  20 + 17 * 4,			/* %esp */
-  20 + 6 * 4,			/* %ebp */
-  20 + 5 * 4,			/* %esi */
-  20 + 4 * 4,			/* %edi */
-  20 + 14 * 4,			/* %eip */
-  20 + 16 * 4,			/* %eflags */
-  20 + 15 * 4,			/* %cs */
-  20 + 18 * 4,			/* %ss */
-  20 + 3 * 4,			/* %ds */
-  20 + 2 * 4,			/* %es */
-  20 + 1 * 4,			/* %fs */
-  20 + 0 * 4			/* %gs */
-};
-
-static void
-i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Generic FreeBSD support. */
-  fbsd_init_abi (info, gdbarch);
-
-  /* Inherit stuff from older releases.  We assume that FreeBSD
-     4.0-RELEASE always uses ELF.  */
-  i386fbsd_init_abi (info, gdbarch);
-
-  /* FreeBSD 4.0 introduced a new `struct reg'.  */
-  tdep->gregset_reg_offset = i386fbsd4_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (i386fbsd4_r_reg_offset);
-  tdep->sizeof_gregset = 19 * 4;
-
-  /* FreeBSD 4.0 introduced a new `struct sigcontext'.  */
-  tdep->sc_reg_offset = i386fbsd4_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (i386fbsd4_sc_reg_offset);
-
-  tdep->xsave_xcr0_offset = I386_FBSD_XSAVE_XCR0_OFFSET;
-
-  /* Iterate over core file register note sections.  */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, i386fbsd_iterate_over_regset_sections);
-
-  set_gdbarch_core_read_description (gdbarch,
-				     i386fbsd_core_read_description);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386fbsd_tdep (void);
-
-void
-_initialize_i386fbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_AOUT,
-			  i386fbsdaout_init_abi);
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_ELF,
-			  i386fbsd4_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-tdep.h ./gdb/i386-fbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-fbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-fbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+/* Target-dependent code for FreeBSD x86.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef I386_FBSD_TDEP_H
+#define I386_FBSD_TDEP_H
+
+/* Get XSAVE extended state xcr0 from core dump.  */
+extern uint64_t i386fbsd_core_read_xcr0 (bfd *abfd);
+
+/* The format of the XSAVE extended area is determined by hardware.
+   Cores store the XSAVE extended area in a NT_X86_XSTATE note that
+   matches the layout on Linux.  */
+#define I386_FBSD_XSAVE_XCR0_OFFSET 464
+
+#endif /* i386-fbsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-tdep.h ./gdb/i386fbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386fbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386fbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,31 +0,0 @@
-/* Target-dependent code for FreeBSD x86.
-
-   Copyright (C) 2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef I386FBSD_TDEP_H
-#define I386FBSD_TDEP_H
-
-/* Get XSAVE extended state xcr0 from core dump.  */
-extern uint64_t i386fbsd_core_read_xcr0 (bfd *abfd);
-
-/* The format of the XSAVE extended area is determined by hardware.
-   Cores store the XSAVE extended area in a NT_X86_XSTATE note that
-   matches the layout on Linux.  */
-#define I386_FBSD_XSAVE_XCR0_OFFSET 464
-
-#endif /* i386fbsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-gnu-nat.c ./gdb/i386-gnu-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-gnu-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-gnu-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,440 @@
+/* Low level interface to i386 running the GNU Hurd.
+
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Mach/Hurd headers are not yet ready for C++ compilation.  */
+extern "C"
+{
+#include <mach.h>
+#include <mach_error.h>
+#include <mach/message.h>
+#include <mach/exception.h>
+}
+
+#include "defs.h"
+#include "x86-nat.h"
+#include "inferior.h"
+#include "floatformat.h"
+#include "regcache.h"
+
+#include "i386-tdep.h"
+
+#include "gnu-nat.h"
+#include "inf-child.h"
+#include "i387-tdep.h"
+
+/* Offset to the thread_state_t location where REG is stored.  */
+#define REG_OFFSET(reg) offsetof (struct i386_thread_state, reg)
+
+/* At REG_OFFSET[N] is the offset to the thread_state_t location where
+   the GDB register N is stored.  */
+static int reg_offset[] =
+{
+  REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
+  REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
+  REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
+  REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
+};
+
+#define REG_ADDR(state, regnum) ((char *)(state) + reg_offset[regnum])
+
+
+/* Get the whole floating-point state of THREAD and record the values
+   of the corresponding (pseudo) registers.  */
+
+static void
+fetch_fpregs (struct regcache *regcache, struct proc *thread)
+{
+  mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
+  struct i386_float_state state;
+  kern_return_t err;
+
+  err = thread_get_state (thread->port, i386_FLOAT_STATE,
+			  (thread_state_t) &state, &count);
+  if (err)
+    {
+      warning (_("Couldn't fetch floating-point state from %s"),
+	       proc_string (thread));
+      return;
+    }
+
+  if (!state.initialized)
+    {
+      /* The floating-point state isn't initialized.  */
+      i387_supply_fsave (regcache, -1, NULL);
+    }
+  else
+    {
+      /* Supply the floating-point registers.  */
+      i387_supply_fsave (regcache, -1, state.hw_state);
+    }
+}
+
+/* Fetch register REGNO, or all regs if REGNO is -1.  */
+static void
+gnu_fetch_registers (struct target_ops *ops,
+		     struct regcache *regcache, int regno)
+{
+  struct proc *thread;
+
+  /* Make sure we know about new threads.  */
+  inf_update_procs (gnu_current_inf);
+
+  thread = inf_tid_to_thread (gnu_current_inf,
+			      ptid_get_lwp (inferior_ptid));
+  if (!thread)
+    error (_("Can't fetch registers from thread %s: No such thread"),
+	   target_pid_to_str (inferior_ptid));
+
+  if (regno < I386_NUM_GREGS || regno == -1)
+    {
+      thread_state_t state;
+
+      /* This does the dirty work for us.  */
+      state = proc_get_state (thread, 0);
+      if (!state)
+	{
+	  warning (_("Couldn't fetch registers from %s"),
+		   proc_string (thread));
+	  return;
+	}
+
+      if (regno == -1)
+	{
+	  int i;
+
+	  proc_debug (thread, "fetching all register");
+
+	  for (i = 0; i < I386_NUM_GREGS; i++)
+	    regcache_raw_supply (regcache, i, REG_ADDR (state, i));
+	  thread->fetched_regs = ~0;
+	}
+      else
+	{
+	  proc_debug (thread, "fetching register %s",
+		      gdbarch_register_name (get_regcache_arch (regcache),
+					     regno));
+
+	  regcache_raw_supply (regcache, regno,
+			       REG_ADDR (state, regno));
+	  thread->fetched_regs |= (1 << regno);
+	}
+    }
+
+  if (regno >= I386_NUM_GREGS || regno == -1)
+    {
+      proc_debug (thread, "fetching floating-point registers");
+
+      fetch_fpregs (regcache, thread);
+    }
+}
+
+
+/* Store the whole floating-point state into THREAD using information
+   from the corresponding (pseudo) registers.  */
+static void
+store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
+{
+  mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
+  struct i386_float_state state;
+  kern_return_t err;
+
+  err = thread_get_state (thread->port, i386_FLOAT_STATE,
+			  (thread_state_t) &state, &count);
+  if (err)
+    {
+      warning (_("Couldn't fetch floating-point state from %s"),
+	       proc_string (thread));
+      return;
+    }
+
+  /* FIXME: kettenis/2001-07-15: Is this right?  Should we somehow
+     take into account DEPRECATED_REGISTER_VALID like the old code did?  */
+  i387_collect_fsave (regcache, regno, state.hw_state);
+
+  err = thread_set_state (thread->port, i386_FLOAT_STATE,
+			  (thread_state_t) &state, i386_FLOAT_STATE_COUNT);
+  if (err)
+    {
+      warning (_("Couldn't store floating-point state into %s"),
+	       proc_string (thread));
+      return;
+    }
+}
+
+/* Store at least register REGNO, or all regs if REGNO == -1.  */
+static void
+gnu_store_registers (struct target_ops *ops,
+		     struct regcache *regcache, int regno)
+{
+  struct proc *thread;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  /* Make sure we know about new threads.  */
+  inf_update_procs (gnu_current_inf);
+
+  thread = inf_tid_to_thread (gnu_current_inf,
+			      ptid_get_lwp (inferior_ptid));
+  if (!thread)
+    error (_("Couldn't store registers into thread %s: No such thread"),
+	   target_pid_to_str (inferior_ptid));
+
+  if (regno < I386_NUM_GREGS || regno == -1)
+    {
+      thread_state_t state;
+      thread_state_data_t old_state;
+      int was_aborted = thread->aborted;
+      int was_valid = thread->state_valid;
+      int trace;
+
+      if (!was_aborted && was_valid)
+	memcpy (&old_state, &thread->state, sizeof (old_state));
+
+      state = proc_get_state (thread, 1);
+      if (!state)
+	{
+	  warning (_("Couldn't store registers into %s"),
+		   proc_string (thread));
+	  return;
+	}
+
+      /* Save the T bit.  We might try to restore the %eflags register
+         below, but changing the T bit would seriously confuse GDB.  */
+      trace = ((struct i386_thread_state *)state)->efl & 0x100;
+
+      if (!was_aborted && was_valid)
+	/* See which registers have changed after aborting the thread.  */
+	{
+	  int check_regno;
+
+	  for (check_regno = 0; check_regno < I386_NUM_GREGS; check_regno++)
+	    if ((thread->fetched_regs & (1 << check_regno))
+		&& memcpy (REG_ADDR (&old_state, check_regno),
+			   REG_ADDR (state, check_regno),
+			   register_size (gdbarch, check_regno)))
+	      /* Register CHECK_REGNO has changed!  Ack!  */
+	      {
+		warning (_("Register %s changed after the thread was aborted"),
+			 gdbarch_register_name (gdbarch, check_regno));
+		if (regno >= 0 && regno != check_regno)
+		  /* Update GDB's copy of the register.  */
+		  regcache_raw_supply (regcache, check_regno,
+				       REG_ADDR (state, check_regno));
+		else
+		  warning (_("... also writing this register!  "
+			     "Suspicious..."));
+	      }
+	}
+
+      if (regno == -1)
+	{
+	  int i;
+
+	  proc_debug (thread, "storing all registers");
+
+	  for (i = 0; i < I386_NUM_GREGS; i++)
+	    if (REG_VALID == regcache_register_status (regcache, i))
+	      regcache_raw_collect (regcache, i, REG_ADDR (state, i));
+	}
+      else
+	{
+	  proc_debug (thread, "storing register %s",
+		      gdbarch_register_name (gdbarch, regno));
+
+	  gdb_assert (REG_VALID == regcache_register_status (regcache, regno));
+	  regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
+	}
+
+      /* Restore the T bit.  */
+      ((struct i386_thread_state *)state)->efl &= ~0x100;
+      ((struct i386_thread_state *)state)->efl |= trace;
+    }
+
+  if (regno >= I386_NUM_GREGS || regno == -1)
+    {
+      proc_debug (thread, "storing floating-point registers");
+
+      store_fpregs (regcache, thread, regno);
+    }
+}
+
+
+/* Support for debug registers.  */
+
+#ifdef i386_DEBUG_STATE
+/* Get debug registers for thread THREAD.  */
+
+static void
+i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
+{
+  mach_msg_type_number_t count = i386_DEBUG_STATE_COUNT;
+  kern_return_t err;
+
+  err = thread_get_state (thread->port, i386_DEBUG_STATE,
+			  (thread_state_t) regs, &count);
+  if (err != 0 || count != i386_DEBUG_STATE_COUNT)
+    warning (_("Couldn't fetch debug state from %s"),
+	     proc_string (thread));
+}
+
+/* Set debug registers for thread THREAD.  */
+
+static void
+i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
+{
+  kern_return_t err;
+
+  err = thread_set_state (thread->port, i386_DEBUG_STATE,
+			  (thread_state_t) regs, i386_DEBUG_STATE_COUNT);
+  if (err != 0)
+    warning (_("Couldn't store debug state into %s"),
+	     proc_string (thread));
+}
+
+/* Set DR_CONTROL in THREAD.  */
+
+static void
+i386_gnu_dr_set_control_one (struct proc *thread, void *arg)
+{
+  unsigned long *control = (unsigned long *) arg;
+  struct i386_debug_state regs;
+
+  i386_gnu_dr_get (&regs, thread);
+  regs.dr[DR_CONTROL] = *control;
+  i386_gnu_dr_set (&regs, thread);
+}
+
+/* Set DR_CONTROL to CONTROL in all threads.  */
+
+static void
+i386_gnu_dr_set_control (unsigned long control)
+{
+  inf_update_procs (gnu_current_inf);
+  inf_threads (gnu_current_inf, i386_gnu_dr_set_control_one, &control);
+}
+
+/* Parameters to set a debugging address.  */
+
+struct reg_addr
+{
+  int regnum;		/* Register number (zero based).  */
+  CORE_ADDR addr;	/* Address.  */
+};
+
+/* Set address REGNUM (zero based) to ADDR in THREAD.  */
+
+static void
+i386_gnu_dr_set_addr_one (struct proc *thread, void *arg)
+{
+  struct reg_addr *reg_addr = (struct reg_addr *) arg;
+  struct i386_debug_state regs;
+
+  i386_gnu_dr_get (&regs, thread);
+  regs.dr[reg_addr->regnum] = reg_addr->addr;
+  i386_gnu_dr_set (&regs, thread);
+}
+
+/* Set address REGNUM (zero based) to ADDR in all threads.  */
+
+static void
+i386_gnu_dr_set_addr (int regnum, CORE_ADDR addr)
+{
+  struct reg_addr reg_addr;
+
+  gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
+
+  reg_addr.regnum = regnum;
+  reg_addr.addr = addr;
+
+  inf_update_procs (gnu_current_inf);
+  inf_threads (gnu_current_inf, i386_gnu_dr_set_addr_one, &reg_addr);
+}
+
+/* Get debug register REGNUM value from only the one LWP of PTID.  */
+
+static unsigned long
+i386_gnu_dr_get_reg (ptid_t ptid, int regnum)
+{
+  struct i386_debug_state regs;
+  struct proc *thread;
+
+  /* Make sure we know about new threads.  */
+  inf_update_procs (gnu_current_inf);
+
+  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
+  i386_gnu_dr_get (&regs, thread);
+
+  return regs.dr[regnum];
+}
+
+/* Return the inferior's debug register REGNUM.  */
+
+static CORE_ADDR
+i386_gnu_dr_get_addr (int regnum)
+{
+  gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
+
+  return i386_gnu_dr_get_reg (inferior_ptid, regnum);
+}
+
+/* Get DR_STATUS from only the one thread of INFERIOR_PTID.  */
+
+static unsigned long
+i386_gnu_dr_get_status (void)
+{
+  return i386_gnu_dr_get_reg (inferior_ptid, DR_STATUS);
+}
+
+/* Return the inferior's DR7 debug control register.  */
+
+static unsigned long
+i386_gnu_dr_get_control (void)
+{
+  return i386_gnu_dr_get_reg (inferior_ptid, DR_CONTROL);
+}
+#endif /* i386_DEBUG_STATE */
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_i386gnu_nat;
+
+void
+_initialize_i386gnu_nat (void)
+{
+  struct target_ops *t;
+
+  /* Fill in the generic GNU/Hurd methods.  */
+  t = gnu_target ();
+
+#ifdef i386_DEBUG_STATE
+  x86_use_watchpoints (t);
+
+  x86_dr_low.set_control = i386_gnu_dr_set_control;
+  gdb_assert (DR_FIRSTADDR == 0 && DR_LASTADDR < i386_DEBUG_STATE_COUNT);
+  x86_dr_low.set_addr = i386_gnu_dr_set_addr;
+  x86_dr_low.get_addr = i386_gnu_dr_get_addr;
+  x86_dr_low.get_status = i386_gnu_dr_get_status;
+  x86_dr_low.get_control = i386_gnu_dr_get_control;
+  x86_set_debug_register_length (4);
+#endif /* i386_DEBUG_STATE */
+
+  t->to_fetch_registers = gnu_fetch_registers;
+  t->to_store_registers = gnu_store_registers;
+
+  /* Register the target.  */
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386gnu-nat.c ./gdb/i386gnu-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386gnu-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386gnu-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,436 +0,0 @@
-/* Low level interface to i386 running the GNU Hurd.
-
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "x86-nat.h"
-#include "inferior.h"
-#include "floatformat.h"
-#include "regcache.h"
-
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-
-#include "i386-tdep.h"
-
-#include "gnu-nat.h"
-#include "inf-child.h"
-#include "i387-tdep.h"
-
-/* Offset to the thread_state_t location where REG is stored.  */
-#define REG_OFFSET(reg) offsetof (struct i386_thread_state, reg)
-
-/* At REG_OFFSET[N] is the offset to the thread_state_t location where
-   the GDB register N is stored.  */
-static int reg_offset[] =
-{
-  REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
-  REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
-  REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
-  REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
-};
-
-#define REG_ADDR(state, regnum) ((char *)(state) + reg_offset[regnum])
-
-
-/* Get the whole floating-point state of THREAD and record the values
-   of the corresponding (pseudo) registers.  */
-
-static void
-fetch_fpregs (struct regcache *regcache, struct proc *thread)
-{
-  mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
-  struct i386_float_state state;
-  error_t err;
-
-  err = thread_get_state (thread->port, i386_FLOAT_STATE,
-			  (thread_state_t) &state, &count);
-  if (err)
-    {
-      warning (_("Couldn't fetch floating-point state from %s"),
-	       proc_string (thread));
-      return;
-    }
-
-  if (!state.initialized)
-    {
-      /* The floating-point state isn't initialized.  */
-      i387_supply_fsave (regcache, -1, NULL);
-    }
-  else
-    {
-      /* Supply the floating-point registers.  */
-      i387_supply_fsave (regcache, -1, state.hw_state);
-    }
-}
-
-/* Fetch register REGNO, or all regs if REGNO is -1.  */
-static void
-gnu_fetch_registers (struct target_ops *ops,
-		     struct regcache *regcache, int regno)
-{
-  struct proc *thread;
-
-  /* Make sure we know about new threads.  */
-  inf_update_procs (gnu_current_inf);
-
-  thread = inf_tid_to_thread (gnu_current_inf,
-			      ptid_get_lwp (inferior_ptid));
-  if (!thread)
-    error (_("Can't fetch registers from thread %s: No such thread"),
-	   target_pid_to_str (inferior_ptid));
-
-  if (regno < I386_NUM_GREGS || regno == -1)
-    {
-      thread_state_t state;
-
-      /* This does the dirty work for us.  */
-      state = proc_get_state (thread, 0);
-      if (!state)
-	{
-	  warning (_("Couldn't fetch registers from %s"),
-		   proc_string (thread));
-	  return;
-	}
-
-      if (regno == -1)
-	{
-	  int i;
-
-	  proc_debug (thread, "fetching all register");
-
-	  for (i = 0; i < I386_NUM_GREGS; i++)
-	    regcache_raw_supply (regcache, i, REG_ADDR (state, i));
-	  thread->fetched_regs = ~0;
-	}
-      else
-	{
-	  proc_debug (thread, "fetching register %s",
-		      gdbarch_register_name (get_regcache_arch (regcache),
-					     regno));
-
-	  regcache_raw_supply (regcache, regno,
-			       REG_ADDR (state, regno));
-	  thread->fetched_regs |= (1 << regno);
-	}
-    }
-
-  if (regno >= I386_NUM_GREGS || regno == -1)
-    {
-      proc_debug (thread, "fetching floating-point registers");
-
-      fetch_fpregs (regcache, thread);
-    }
-}
-
-
-/* Store the whole floating-point state into THREAD using information
-   from the corresponding (pseudo) registers.  */
-static void
-store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
-{
-  mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
-  struct i386_float_state state;
-  error_t err;
-
-  err = thread_get_state (thread->port, i386_FLOAT_STATE,
-			  (thread_state_t) &state, &count);
-  if (err)
-    {
-      warning (_("Couldn't fetch floating-point state from %s"),
-	       proc_string (thread));
-      return;
-    }
-
-  /* FIXME: kettenis/2001-07-15: Is this right?  Should we somehow
-     take into account DEPRECATED_REGISTER_VALID like the old code did?  */
-  i387_collect_fsave (regcache, regno, state.hw_state);
-
-  err = thread_set_state (thread->port, i386_FLOAT_STATE,
-			  (thread_state_t) &state, i386_FLOAT_STATE_COUNT);
-  if (err)
-    {
-      warning (_("Couldn't store floating-point state into %s"),
-	       proc_string (thread));
-      return;
-    }
-}
-
-/* Store at least register REGNO, or all regs if REGNO == -1.  */
-static void
-gnu_store_registers (struct target_ops *ops,
-		     struct regcache *regcache, int regno)
-{
-  struct proc *thread;
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  /* Make sure we know about new threads.  */
-  inf_update_procs (gnu_current_inf);
-
-  thread = inf_tid_to_thread (gnu_current_inf,
-			      ptid_get_lwp (inferior_ptid));
-  if (!thread)
-    error (_("Couldn't store registers into thread %s: No such thread"),
-	   target_pid_to_str (inferior_ptid));
-
-  if (regno < I386_NUM_GREGS || regno == -1)
-    {
-      thread_state_t state;
-      thread_state_data_t old_state;
-      int was_aborted = thread->aborted;
-      int was_valid = thread->state_valid;
-      int trace;
-
-      if (!was_aborted && was_valid)
-	memcpy (&old_state, &thread->state, sizeof (old_state));
-
-      state = proc_get_state (thread, 1);
-      if (!state)
-	{
-	  warning (_("Couldn't store registers into %s"),
-		   proc_string (thread));
-	  return;
-	}
-
-      /* Save the T bit.  We might try to restore the %eflags register
-         below, but changing the T bit would seriously confuse GDB.  */
-      trace = ((struct i386_thread_state *)state)->efl & 0x100;
-
-      if (!was_aborted && was_valid)
-	/* See which registers have changed after aborting the thread.  */
-	{
-	  int check_regno;
-
-	  for (check_regno = 0; check_regno < I386_NUM_GREGS; check_regno++)
-	    if ((thread->fetched_regs & (1 << check_regno))
-		&& memcpy (REG_ADDR (&old_state, check_regno),
-			   REG_ADDR (state, check_regno),
-			   register_size (gdbarch, check_regno)))
-	      /* Register CHECK_REGNO has changed!  Ack!  */
-	      {
-		warning (_("Register %s changed after the thread was aborted"),
-			 gdbarch_register_name (gdbarch, check_regno));
-		if (regno >= 0 && regno != check_regno)
-		  /* Update GDB's copy of the register.  */
-		  regcache_raw_supply (regcache, check_regno,
-				       REG_ADDR (state, check_regno));
-		else
-		  warning (_("... also writing this register!  "
-			     "Suspicious..."));
-	      }
-	}
-
-      if (regno == -1)
-	{
-	  int i;
-
-	  proc_debug (thread, "storing all registers");
-
-	  for (i = 0; i < I386_NUM_GREGS; i++)
-	    if (REG_VALID == regcache_register_status (regcache, i))
-	      regcache_raw_collect (regcache, i, REG_ADDR (state, i));
-	}
-      else
-	{
-	  proc_debug (thread, "storing register %s",
-		      gdbarch_register_name (gdbarch, regno));
-
-	  gdb_assert (REG_VALID == regcache_register_status (regcache, regno));
-	  regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
-	}
-
-      /* Restore the T bit.  */
-      ((struct i386_thread_state *)state)->efl &= ~0x100;
-      ((struct i386_thread_state *)state)->efl |= trace;
-    }
-
-  if (regno >= I386_NUM_GREGS || regno == -1)
-    {
-      proc_debug (thread, "storing floating-point registers");
-
-      store_fpregs (regcache, thread, regno);
-    }
-}
-
-
-/* Support for debug registers.  */
-
-#ifdef i386_DEBUG_STATE
-/* Get debug registers for thread THREAD.  */
-
-static void
-i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
-{
-  mach_msg_type_number_t count = i386_DEBUG_STATE_COUNT;
-  error_t err;
-
-  err = thread_get_state (thread->port, i386_DEBUG_STATE,
-			  (thread_state_t) regs, &count);
-  if (err != 0 || count != i386_DEBUG_STATE_COUNT)
-    warning (_("Couldn't fetch debug state from %s"),
-	     proc_string (thread));
-}
-
-/* Set debug registers for thread THREAD.  */
-
-static void
-i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
-{
-  error_t err;
-
-  err = thread_set_state (thread->port, i386_DEBUG_STATE,
-			  (thread_state_t) regs, i386_DEBUG_STATE_COUNT);
-  if (err != 0)
-    warning (_("Couldn't store debug state into %s"),
-	     proc_string (thread));
-}
-
-/* Set DR_CONTROL in THREAD.  */
-
-static void
-i386_gnu_dr_set_control_one (struct proc *thread, void *arg)
-{
-  unsigned long *control = arg;
-  struct i386_debug_state regs;
-
-  i386_gnu_dr_get (&regs, thread);
-  regs.dr[DR_CONTROL] = *control;
-  i386_gnu_dr_set (&regs, thread);
-}
-
-/* Set DR_CONTROL to CONTROL in all threads.  */
-
-static void
-i386_gnu_dr_set_control (unsigned long control)
-{
-  inf_update_procs (gnu_current_inf);
-  inf_threads (gnu_current_inf, i386_gnu_dr_set_control_one, &control);
-}
-
-/* Parameters to set a debugging address.  */
-
-struct reg_addr
-{
-  int regnum;		/* Register number (zero based).  */
-  CORE_ADDR addr;	/* Address.  */
-};
-
-/* Set address REGNUM (zero based) to ADDR in THREAD.  */
-
-static void
-i386_gnu_dr_set_addr_one (struct proc *thread, void *arg)
-{
-  struct reg_addr *reg_addr = arg;
-  struct i386_debug_state regs;
-
-  i386_gnu_dr_get (&regs, thread);
-  regs.dr[reg_addr->regnum] = reg_addr->addr;
-  i386_gnu_dr_set (&regs, thread);
-}
-
-/* Set address REGNUM (zero based) to ADDR in all threads.  */
-
-static void
-i386_gnu_dr_set_addr (int regnum, CORE_ADDR addr)
-{
-  struct reg_addr reg_addr;
-
-  gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
-
-  reg_addr.regnum = regnum;
-  reg_addr.addr = addr;
-
-  inf_update_procs (gnu_current_inf);
-  inf_threads (gnu_current_inf, i386_gnu_dr_set_addr_one, &reg_addr);
-}
-
-/* Get debug register REGNUM value from only the one LWP of PTID.  */
-
-static unsigned long
-i386_gnu_dr_get_reg (ptid_t ptid, int regnum)
-{
-  struct i386_debug_state regs;
-  struct proc *thread;
-
-  /* Make sure we know about new threads.  */
-  inf_update_procs (gnu_current_inf);
-
-  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
-  i386_gnu_dr_get (&regs, thread);
-
-  return regs.dr[regnum];
-}
-
-/* Return the inferior's debug register REGNUM.  */
-
-static CORE_ADDR
-i386_gnu_dr_get_addr (int regnum)
-{
-  gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
-
-  return i386_gnu_dr_get_reg (inferior_ptid, regnum);
-}
-
-/* Get DR_STATUS from only the one thread of INFERIOR_PTID.  */
-
-static unsigned long
-i386_gnu_dr_get_status (void)
-{
-  return i386_gnu_dr_get_reg (inferior_ptid, DR_STATUS);
-}
-
-/* Return the inferior's DR7 debug control register.  */
-
-static unsigned long
-i386_gnu_dr_get_control (void)
-{
-  return i386_gnu_dr_get_reg (inferior_ptid, DR_CONTROL);
-}
-#endif /* i386_DEBUG_STATE */
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_i386gnu_nat;
-
-void
-_initialize_i386gnu_nat (void)
-{
-  struct target_ops *t;
-
-  /* Fill in the generic GNU/Hurd methods.  */
-  t = gnu_target ();
-
-#ifdef i386_DEBUG_STATE
-  x86_use_watchpoints (t);
-
-  x86_dr_low.set_control = i386_gnu_dr_set_control;
-  gdb_assert (DR_FIRSTADDR == 0 && DR_LASTADDR < i386_DEBUG_STATE_COUNT);
-  x86_dr_low.set_addr = i386_gnu_dr_set_addr;
-  x86_dr_low.get_addr = i386_gnu_dr_get_addr;
-  x86_dr_low.get_status = i386_gnu_dr_get_status;
-  x86_dr_low.get_control = i386_gnu_dr_get_control;
-  x86_set_debug_register_length (4);
-#endif /* i386_DEBUG_STATE */
-
-  t->to_fetch_registers = gnu_fetch_registers;
-  t->to_store_registers = gnu_store_registers;
-
-  /* Register the target.  */
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-gnu-tdep.c ./gdb/i386-gnu-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-gnu-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-gnu-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+/* Target-dependent code for the GNU Hurd.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "solib-svr4.h"
+
+#include "i386-tdep.h"
+
+/* From <sys/ucontext.h>.  */
+static int i386gnu_gregset_reg_offset[] =
+{
+  11 * 4,		/* %eax */
+  10 * 4,		/* %ecx */
+  9 * 4,		/* %edx */
+  8 * 4,		/* %ebx */
+  17 * 4,		/* %uesp */
+  6 * 4,		/* %ebp */
+  5 * 4,		/* %esi */
+  4 * 4,		/* %edi */
+  14 * 4,		/* %eip */
+  16 * 4,		/* %efl */
+  15 * 4,		/* %cs */
+  18 * 4,		/* %ss */
+  3 * 4,		/* %ds */
+  2 * 4,		/* %es */
+  1 * 4,		/* %fs */
+  0 * 4,		/* %gs */
+};
+
+static void
+i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* GNU uses ELF.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  tdep->gregset_reg_offset = i386gnu_gregset_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (i386gnu_gregset_reg_offset);
+  tdep->sizeof_gregset = 19 * 4;
+
+  tdep->jb_pc_offset = 20;	/* From <bits/setjmp.h>.  */
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern void _initialize_i386gnu_tdep (void);
+
+void
+_initialize_i386gnu_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_HURD, i386gnu_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386gnu-tdep.c ./gdb/i386gnu-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386gnu-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386gnu-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,71 +0,0 @@
-/* Target-dependent code for the GNU Hurd.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "osabi.h"
-#include "solib-svr4.h"
-
-#include "i386-tdep.h"
-
-/* From <sys/ucontext.h>.  */
-static int i386gnu_gregset_reg_offset[] =
-{
-  11 * 4,		/* %eax */
-  10 * 4,		/* %ecx */
-  9 * 4,		/* %edx */
-  8 * 4,		/* %ebx */
-  17 * 4,		/* %uesp */
-  6 * 4,		/* %ebp */
-  5 * 4,		/* %esi */
-  4 * 4,		/* %edi */
-  14 * 4,		/* %eip */
-  16 * 4,		/* %efl */
-  15 * 4,		/* %cs */
-  18 * 4,		/* %ss */
-  3 * 4,		/* %ds */
-  2 * 4,		/* %es */
-  1 * 4,		/* %fs */
-  0 * 4,		/* %gs */
-};
-
-static void
-i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* GNU uses ELF.  */
-  i386_elf_init_abi (info, gdbarch);
-
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  tdep->gregset_reg_offset = i386gnu_gregset_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (i386gnu_gregset_reg_offset);
-  tdep->sizeof_gregset = 19 * 4;
-
-  tdep->jb_pc_offset = 20;	/* From <bits/setjmp.h>.  */
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern void _initialize_i386gnu_tdep (void);
-
-void
-_initialize_i386gnu_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_HURD, i386gnu_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-nat.c ./gdb/i386-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux i386.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,7 @@
 #include "gdbcore.h"
 #include "regcache.h"
 #include "elf/common.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/uio.h>
 #include "gregset.h"
 #include "gdb_proc_service.h"
@@ -59,7 +59,7 @@
   (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS)
 
 #define GETXSTATEREGS_SUPPLIES(regno) \
-  (I386_ST0_REGNUM <= (regno) && (regno) < I386_AVX512_NUM_REGS)
+  (I386_ST0_REGNUM <= (regno) && (regno) < I386_PKEYS_NUM_REGS)
 
 /* Does the current host support the GETREGS request?  */
 int have_ptrace_getregs =
@@ -603,7 +603,7 @@ i386_linux_store_inferior_registers (str
    storage (or its descriptor).  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
 		    lwpid_t lwpid, int idx, void **base)
 {
   unsigned int base_addr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-nat.h ./gdb/i386-linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-linux-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux i386.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-tdep.c ./gdb/i386-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux i386.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 #include "i386-tdep.h"
 #include "i386-linux-tdep.h"
 #include "linux-tdep.h"
+#include "utils.h"
 #include "glibc-tdep.h"
 #include "solib-svr4.h"
 #include "symtab.h"
@@ -47,8 +48,10 @@
 #include "features/i386/i386-linux.c"
 #include "features/i386/i386-mmx-linux.c"
 #include "features/i386/i386-mpx-linux.c"
+#include "features/i386/i386-avx-mpx-linux.c"
 #include "features/i386/i386-avx-linux.c"
-#include "features/i386/i386-avx512-linux.c"
+#include "features/i386/i386-avx-avx512-linux.c"
+#include "features/i386/i386-avx-mpx-avx512-pku-linux.c"
 
 /* Return non-zero, when the register is in the corresponding register
    group.  Put the LINUX_ORIG_EAX register in the system group.  */
@@ -379,9 +382,70 @@ i386_canonicalize_syscall (int syscall)
   enum { i386_syscall_max = 499 };
 
   if (syscall <= i386_syscall_max)
-    return syscall;
+    return (enum gdb_syscall) syscall;
   else
-    return -1;
+    return gdb_sys_no_syscall;
+}
+
+/* Value of the sigcode in case of a boundary fault.  */
+
+#define SIG_CODE_BONDARY_FAULT 3
+
+/* i386 GNU/Linux implementation of the handle_segmentation_fault
+   gdbarch hook.  Displays information related to MPX bound
+   violations.  */
+void
+i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
+				      struct ui_out *uiout)
+{
+  /* -Wmaybe-uninitialized  */
+  CORE_ADDR lower_bound = 0, upper_bound = 0, access = 0;
+  int is_upper;
+  long sig_code = 0;
+
+  if (!i386_mpx_enabled ())
+    return;
+
+  TRY
+    {
+      /* Sigcode evaluates if the actual segfault is a boundary violation.  */
+      sig_code = parse_and_eval_long ("$_siginfo.si_code\n");
+
+      lower_bound
+        = parse_and_eval_long ("$_siginfo._sifields._sigfault._addr_bnd._lower");
+      upper_bound
+        = parse_and_eval_long ("$_siginfo._sifields._sigfault._addr_bnd._upper");
+      access
+        = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr");
+    }
+  CATCH (exception, RETURN_MASK_ALL)
+    {
+      return;
+    }
+  END_CATCH
+
+  /* If this is not a boundary violation just return.  */
+  if (sig_code != SIG_CODE_BONDARY_FAULT)
+    return;
+
+  is_upper = (access > upper_bound ? 1 : 0);
+
+  uiout->text ("\n");
+  if (is_upper)
+    uiout->field_string ("sigcode-meaning", _("Upper bound violation"));
+  else
+    uiout->field_string ("sigcode-meaning", _("Lower bound violation"));
+
+  uiout->text (_(" while accessing address "));
+  uiout->field_fmt ("bound-access", "%s", paddress (gdbarch, access));
+
+  uiout->text (_("\nBounds: [lower = "));
+  uiout->field_fmt ("lower-bound", "%s", paddress (gdbarch, lower_bound));
+
+  uiout->text (_(", upper = "));
+  uiout->field_fmt ("upper-bound", "%s", paddress (gdbarch, upper_bound));
+
+  uiout->text (_("]"));
 }
 
 /* Parse the arguments of current system call instruction and record
@@ -549,6 +613,7 @@ int i386_linux_gregset_reg_offset[] =
   -1, -1,			  /* MPX registers BNDCFGU, BNDSTATUS.  */
   -1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512)  */
   -1, -1, -1, -1, -1, -1, -1, -1, /* zmm0 ... zmm7 (AVX512)  */
+  -1,				  /* PKRU register  */
   11 * 4,			  /* "orig_eax"  */
 };
 
@@ -625,11 +690,14 @@ i386_linux_core_read_description (struct
 
   switch ((xcr0 & X86_XSTATE_ALL_MASK))
     {
-    case X86_XSTATE_MPX_AVX512_MASK:
-    case X86_XSTATE_AVX512_MASK:
-      return tdesc_i386_avx512_linux;
+    case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+      return tdesc_i386_avx_mpx_avx512_pku_linux;
+    case X86_XSTATE_AVX_AVX512_MASK:
+      return tdesc_i386_avx_avx512_linux;
     case X86_XSTATE_MPX_MASK:
       return tdesc_i386_mpx_linux;
+    case X86_XSTATE_AVX_MPX_MASK:
+      return tdesc_i386_avx_mpx_linux;
     case X86_XSTATE_AVX_MASK:
       return tdesc_i386_avx_linux;
     case X86_XSTATE_SSE_MASK:
@@ -656,6 +724,12 @@ i386_linux_supply_xstateregset (const st
   i387_supply_xsave (regcache, regnum, xstateregs);
 }
 
+struct type *
+x86_linux_get_siginfo_type (struct gdbarch *gdbarch)
+{
+  return linux_get_siginfo_type_with_fields (gdbarch, LINUX_SIGINFO_FIELD_ADDR_BND);
+}
+
 /* Similar to i386_collect_fpregset, but use XSAVE extended state.  */
 
 static void
@@ -745,7 +819,8 @@ i386_linux_init_abi (struct gdbarch_info
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   const struct target_desc *tdesc = info.target_desc;
-  struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+  struct tdesc_arch_data *tdesc_data
+    = (struct tdesc_arch_data *) info.tdep_info;
   const struct tdesc_feature *feature;
   int valid_p;
 
@@ -805,8 +880,8 @@ i386_linux_init_abi (struct gdbarch_info
   i386_linux_record_tdep.size_flock = 16;
   i386_linux_record_tdep.size_oldold_utsname = 45;
   i386_linux_record_tdep.size_ustat = 20;
-  i386_linux_record_tdep.size_old_sigaction = 140;
-  i386_linux_record_tdep.size_old_sigset_t = 128;
+  i386_linux_record_tdep.size_old_sigaction = 16;
+  i386_linux_record_tdep.size_old_sigset_t = 4;
   i386_linux_record_tdep.size_rlimit = 8;
   i386_linux_record_tdep.size_rusage = 72;
   i386_linux_record_tdep.size_timeval = 8;
@@ -814,8 +889,7 @@ i386_linux_init_abi (struct gdbarch_info
   i386_linux_record_tdep.size_old_gid_t = 2;
   i386_linux_record_tdep.size_old_uid_t = 2;
   i386_linux_record_tdep.size_fd_set = 128;
-  i386_linux_record_tdep.size_dirent = 268;
-  i386_linux_record_tdep.size_dirent64 = 276;
+  i386_linux_record_tdep.size_old_dirent = 268;
   i386_linux_record_tdep.size_statfs = 64;
   i386_linux_record_tdep.size_statfs64 = 84;
   i386_linux_record_tdep.size_sockaddr = 16;
@@ -842,15 +916,15 @@ i386_linux_init_abi (struct gdbarch_info
   i386_linux_record_tdep.size_NFS_FHSIZE = 32;
   i386_linux_record_tdep.size_knfsd_fh = 132;
   i386_linux_record_tdep.size_TASK_COMM_LEN = 16;
-  i386_linux_record_tdep.size_sigaction = 140;
+  i386_linux_record_tdep.size_sigaction = 20;
   i386_linux_record_tdep.size_sigset_t = 8;
   i386_linux_record_tdep.size_siginfo_t = 128;
   i386_linux_record_tdep.size_cap_user_data_t = 12;
   i386_linux_record_tdep.size_stack_t = 12;
   i386_linux_record_tdep.size_off_t = i386_linux_record_tdep.size_long;
   i386_linux_record_tdep.size_stat64 = 96;
-  i386_linux_record_tdep.size_gid_t = 2;
-  i386_linux_record_tdep.size_uid_t = 2;
+  i386_linux_record_tdep.size_gid_t = 4;
+  i386_linux_record_tdep.size_uid_t = 4;
   i386_linux_record_tdep.size_PAGE_SIZE = 4096;
   i386_linux_record_tdep.size_flock64 = 24;
   i386_linux_record_tdep.size_user_desc = 16;
@@ -860,7 +934,6 @@ i386_linux_init_abi (struct gdbarch_info
   i386_linux_record_tdep.size_itimerspec
     = i386_linux_record_tdep.size_timespec * 2;
   i386_linux_record_tdep.size_mq_attr = 32;
-  i386_linux_record_tdep.size_siginfo = 128;
   i386_linux_record_tdep.size_termios = 36;
   i386_linux_record_tdep.size_termios2 = 44;
   i386_linux_record_tdep.size_pid_t = 4;
@@ -870,6 +943,7 @@ i386_linux_init_abi (struct gdbarch_info
   i386_linux_record_tdep.size_hayes_esp_config = 12;
   i386_linux_record_tdep.size_size_t = 4;
   i386_linux_record_tdep.size_iovec = 8;
+  i386_linux_record_tdep.size_time_t = 4;
 
   /* These values are the second argument of system call "sys_ioctl".
      They are obtained from Linux Kernel source.  */
@@ -994,6 +1068,10 @@ i386_linux_init_abi (struct gdbarch_info
   set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_I386);
   set_gdbarch_get_syscall_number (gdbarch,
                                   i386_linux_get_syscall_number);
+
+  set_gdbarch_get_siginfo_type (gdbarch, x86_linux_get_siginfo_type);
+  set_gdbarch_handle_segmentation_fault (gdbarch,
+					 i386_linux_handle_segmentation_fault);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
@@ -1010,5 +1088,7 @@ _initialize_i386_linux_tdep (void)
   initialize_tdesc_i386_mmx_linux ();
   initialize_tdesc_i386_avx_linux ();
   initialize_tdesc_i386_mpx_linux ();
-  initialize_tdesc_i386_avx512_linux ();
+  initialize_tdesc_i386_avx_mpx_linux ();
+  initialize_tdesc_i386_avx_avx512_linux ();
+  initialize_tdesc_i386_avx_mpx_avx512_pku_linux ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-tdep.h ./gdb/i386-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux x86.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,7 +29,7 @@
 /* Register number for the "orig_eax" pseudo-register.  If this
    pseudo-register contains a value >= 0 it is interpreted as the
    system call number that the kernel is supposed to restart.  */
-#define I386_LINUX_ORIG_EAX_REGNUM (I386_ZMM7H_REGNUM + 1)
+#define I386_LINUX_ORIG_EAX_REGNUM (I386_PKRU_REGNUM + 1)
 
 /* Total number of registers for GNU/Linux.  */
 #define I386_LINUX_NUM_REGS (I386_LINUX_ORIG_EAX_REGNUM + 1)
@@ -37,12 +37,19 @@
 /* Get XSAVE extended state xcr0 from core dump.  */
 extern uint64_t i386_linux_core_read_xcr0 (bfd *abfd);
 
+/* Handle and display information related to the MPX bound violation
+   to the user.  */
+extern void i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
+						  struct ui_out *uiout);
+
 /* Linux target description.  */
 extern struct target_desc *tdesc_i386_linux;
 extern struct target_desc *tdesc_i386_mmx_linux;
 extern struct target_desc *tdesc_i386_avx_linux;
 extern struct target_desc *tdesc_i386_mpx_linux;
-extern struct target_desc *tdesc_i386_avx512_linux;
+extern struct target_desc *tdesc_i386_avx_mpx_linux;
+extern struct target_desc *tdesc_i386_avx_avx512_linux;
+extern struct target_desc *tdesc_i386_avx_mpx_avx512_pku_linux;
 
 /* Format of XSAVE extended state is:
  	struct
@@ -56,6 +63,7 @@ extern struct target_desc *tdesc_i386_av
 	  avx512_zmmh_regs0-7[1153..1407]
 	  avx512_zmmh_regs8-15[1408..1663]
 	  avx512_zmm_regs16-31[1664..2687]
+	  pkru[2688..2752]
 	  future_state etc
 	};
 
@@ -72,4 +80,7 @@ extern struct target_desc *tdesc_i386_av
 
 extern int i386_linux_gregset_reg_offset[];
 
+/* Return x86 siginfo type.  */
+extern struct type *x86_linux_get_siginfo_type (struct gdbarch *gdbarch);
+
 #endif /* i386-linux-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nbsd-nat.c ./gdb/i386-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,90 @@
+/* Native-dependent code for NetBSD/i386.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "i386-tdep.h"
+#include "i386-bsd-nat.h"
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "nbsd-nat.h"
+#include "bsd-kvm.h"
+
+static int
+i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct switchframe sf;
+
+  /* The following is true for NetBSD 1.6.2:
+
+     The pcb contains %esp and %ebp at the point of the context switch
+     in cpu_switch().  At that point we have a stack frame as
+     described by `struct switchframe', which for NetBSD 1.6.2 has the
+     following layout:
+
+     interrupt level
+     %edi
+     %esi
+     %ebx
+     %eip
+
+     we reconstruct the register state as it would look when we just
+     returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_esp == 0)
+    return 0;
+
+  read_memory (pcb->pcb_esp, (gdb_byte *)&sf, sizeof sf);
+  pcb->pcb_esp += sizeof (struct switchframe);
+  regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
+  regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
+  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
+  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+  regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
+  regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386nbsd_nat (void);
+
+void
+_initialize_i386nbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add some extra features to the common *BSD/i386 target.  */
+  t = i386bsd_target ();
+  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
+  add_target (t);
+ 
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (i386nbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386nbsd-nat.c ./gdb/i386nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386nbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,90 +0,0 @@
-/* Native-dependent code for NetBSD/i386.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "i386-tdep.h"
-#include "i386bsd-nat.h"
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-
-#include "nbsd-nat.h"
-#include "bsd-kvm.h"
-
-static int
-i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct switchframe sf;
-
-  /* The following is true for NetBSD 1.6.2:
-
-     The pcb contains %esp and %ebp at the point of the context switch
-     in cpu_switch().  At that point we have a stack frame as
-     described by `struct switchframe', which for NetBSD 1.6.2 has the
-     following layout:
-
-     interrupt level
-     %edi
-     %esi
-     %ebx
-     %eip
-
-     we reconstruct the register state as it would look when we just
-     returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_esp == 0)
-    return 0;
-
-  read_memory (pcb->pcb_esp, (gdb_byte *)&sf, sizeof sf);
-  pcb->pcb_esp += sizeof (struct switchframe);
-  regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
-  regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
-  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
-  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
-  regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
-  regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386nbsd_nat (void);
-
-void
-_initialize_i386nbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add some extra features to the common *BSD/i386 target.  */
-  t = i386bsd_target ();
-  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
-  add_target (t);
- 
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (i386nbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nbsd-tdep.c ./gdb/i386-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,327 @@
+/* Target-dependent code for NetBSD/i386.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "regset.h"
+#include "osabi.h"
+#include "symtab.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+#include "nbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* From <machine/reg.h>.  */
+static int i386nbsd_r_reg_offset[] =
+{
+  0 * 4,			/* %eax */
+  1 * 4,			/* %ecx */
+  2 * 4,			/* %edx */
+  3 * 4,			/* %ebx */
+  4 * 4,			/* %esp */
+  5 * 4,			/* %ebp */
+  6 * 4,			/* %esi */
+  7 * 4,			/* %edi */
+  8 * 4,			/* %eip */
+  9 * 4,			/* %eflags */
+  10 * 4,			/* %cs */
+  11 * 4,			/* %ss */
+  12 * 4,			/* %ds */
+  13 * 4,			/* %es */
+  14 * 4,			/* %fs */
+  15 * 4			/* %gs */
+};
+
+/* From <machine/signal.h>.  */
+int i386nbsd_sc_reg_offset[] =
+{
+  10 * 4,			/* %eax */
+  9 * 4,			/* %ecx */
+  8 * 4,			/* %edx */
+  7 * 4,			/* %ebx */
+  14 * 4,			/* %esp */
+  6 * 4,			/* %ebp */
+  5 * 4,			/* %esi */
+  4 * 4,			/* %edi */
+  11 * 4,			/* %eip */
+  13 * 4,			/* %eflags */
+  12 * 4,			/* %cs */
+  15 * 4,			/* %ss */
+  3 * 4,			/* %ds */
+  2 * 4,			/* %es */
+  1 * 4,			/* %fs */
+  0 * 4				/* %gs */
+};
+
+/* From <machine/mcontext.h>.  */
+int i386nbsd_mc_reg_offset[] =
+{
+  11 * 4,			/* %eax */
+  10 * 4,			/* %ecx */
+  9 * 4,			/* %edx */
+  8 * 4,			/* %ebx */
+  7 * 4,			/* %esp */
+  6 * 4,			/* %ebp */
+  5 * 4,			/* %esi */
+  4 * 4,			/* %edi */
+  14 * 4,			/* %eip */
+  16 * 4,			/* %eflags */
+  15 * 4,			/* %cs */
+  18 * 4,			/* %ss */
+  3 * 4,			/* %ds */
+  2 * 4,			/* %es */
+  1 * 4,			/* %fs */
+  0 * 4				/* %gs */
+};
+
+static void i386nbsd_sigtramp_cache_init (const struct tramp_frame *,
+					  struct frame_info *,
+					  struct trad_frame_cache *,
+					  CORE_ADDR);
+
+static const struct tramp_frame i386nbsd_sigtramp_sc16 =
+{
+  SIGTRAMP_FRAME,
+  1,
+  {
+    { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x10, -1 },
+			/* leal  0x10(%esp), %eax */
+    { 0x50, -1 },	/* pushl %eax */
+    { 0x50, -1 },	/* pushl %eax */
+    { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x127, %eax		# __sigreturn14 */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x1, %eax		# exit */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  i386nbsd_sigtramp_cache_init
+};
+
+static const struct tramp_frame i386nbsd_sigtramp_sc2 =
+{
+  SIGTRAMP_FRAME,
+  1,
+  {
+    { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x0c, -1 },
+			/* leal  0x0c(%esp), %eax */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x127, %eax		# __sigreturn14 */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x1, %eax */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  i386nbsd_sigtramp_cache_init
+};
+
+static const struct tramp_frame i386nbsd_sigtramp_si2 =
+{
+  SIGTRAMP_FRAME,
+  1,
+  {
+    { 0x8b, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x08, -1 },
+			/* movl  8(%esp),%eax */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* movl  $0x134, %eax            # setcontext */
+    { 0xcd, -1 }, { 0x80, -1 },
+			/* int   $0x80 */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* movl  $0x1, %eax */
+    { 0xcd, -1 }, { 0x80, -1 },
+			/* int   $0x80 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  i386nbsd_sigtramp_cache_init
+};
+
+static const struct tramp_frame i386nbsd_sigtramp_si31 =
+{
+  SIGTRAMP_FRAME,
+  1,
+  {
+    { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
+        { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* leal  0x8c(%esp), %eax */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* movl  $0x134, %eax            # setcontext */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x1, %eax */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  i386nbsd_sigtramp_cache_init
+};
+
+static const struct tramp_frame i386nbsd_sigtramp_si4 =
+{
+  SIGTRAMP_FRAME,
+  1,
+  {
+    { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
+        { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* leal  0x8c(%esp), %eax */
+    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+			/* movl  %eax, 0x4(%esp) */
+    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
+			/* movl  $0x134, %eax            # setcontext */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { 0xc7, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
+        { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 },
+			/* movl   $0xffffffff,0x4(%esp) */
+    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
+			/* movl  $0x1, %eax */
+    { 0xcd, -1 }, { 0x80, -1},
+			/* int   $0x80 */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  i386nbsd_sigtramp_cache_init
+};
+
+static void
+i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
+			      struct frame_info *this_frame,
+			      struct trad_frame_cache *this_cache,
+			      CORE_ADDR func)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
+  CORE_ADDR base;
+  int *reg_offset;
+  int num_regs;
+  int i;
+
+  if (self == &i386nbsd_sigtramp_sc16 || self == &i386nbsd_sigtramp_sc2)
+    {
+      reg_offset = i386nbsd_sc_reg_offset;
+      num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
+
+      /* Read in the sigcontext address.  */
+      base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
+    }
+  else
+    {
+      reg_offset = i386nbsd_mc_reg_offset;
+      num_regs = ARRAY_SIZE (i386nbsd_mc_reg_offset);
+
+      /* Read in the ucontext address.  */
+      base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
+      /* offsetof(ucontext_t, uc_mcontext) == 36 */
+      base += 36;
+    }
+
+  for (i = 0; i < num_regs; i++)
+    if (reg_offset[i] != -1)
+      trad_frame_set_reg_addr (this_cache, i, base + reg_offset[i]);
+
+  /* Construct the frame ID using the function start.  */
+  trad_frame_set_id (this_cache, frame_id_build (sp, func));
+}
+
+
+static void 
+i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Obviously NetBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+
+  /* NetBSD has a different `struct reg'.  */
+  tdep->gregset_reg_offset = i386nbsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (i386nbsd_r_reg_offset);
+  tdep->sizeof_gregset = 16 * 4;
+
+  /* NetBSD uses -freg-struct-return by default.  */
+  tdep->struct_return = reg_struct_return;
+
+  /* NetBSD uses tramp_frame sniffers for signal trampolines.  */
+  tdep->sigcontext_addr= 0;
+  tdep->sigtramp_start = 0;
+  tdep->sigtramp_end = 0;
+  tdep->sigtramp_p = 0;
+  tdep->sc_reg_offset = 0;
+  tdep->sc_num_regs = 0;
+
+  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_sc16);
+  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_sc2);
+  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si2);
+  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si31);
+  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si4);
+}
+
+/* NetBSD ELF.  */
+
+static void
+i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* It's still NetBSD.  */
+  i386nbsd_init_abi (info, gdbarch);
+
+  /* But ELF-based.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  /* NetBSD ELF uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  /* NetBSD ELF uses -fpcc-struct-return by default.  */
+  tdep->struct_return = pcc_struct_return;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_i386nbsd_tdep;
+
+void
+_initialize_i386nbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD,
+			  i386nbsdelf_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386nbsd-tdep.c ./gdb/i386nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386nbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,328 +0,0 @@
-/* Target-dependent code for NetBSD/i386.
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "regset.h"
-#include "osabi.h"
-#include "symtab.h"
-#include "trad-frame.h"
-#include "tramp-frame.h"
-
-#include "i386-tdep.h"
-#include "i387-tdep.h"
-#include "nbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* From <machine/reg.h>.  */
-static int i386nbsd_r_reg_offset[] =
-{
-  0 * 4,			/* %eax */
-  1 * 4,			/* %ecx */
-  2 * 4,			/* %edx */
-  3 * 4,			/* %ebx */
-  4 * 4,			/* %esp */
-  5 * 4,			/* %ebp */
-  6 * 4,			/* %esi */
-  7 * 4,			/* %edi */
-  8 * 4,			/* %eip */
-  9 * 4,			/* %eflags */
-  10 * 4,			/* %cs */
-  11 * 4,			/* %ss */
-  12 * 4,			/* %ds */
-  13 * 4,			/* %es */
-  14 * 4,			/* %fs */
-  15 * 4			/* %gs */
-};
-
-/* From <machine/signal.h>.  */
-int i386nbsd_sc_reg_offset[] =
-{
-  10 * 4,			/* %eax */
-  9 * 4,			/* %ecx */
-  8 * 4,			/* %edx */
-  7 * 4,			/* %ebx */
-  14 * 4,			/* %esp */
-  6 * 4,			/* %ebp */
-  5 * 4,			/* %esi */
-  4 * 4,			/* %edi */
-  11 * 4,			/* %eip */
-  13 * 4,			/* %eflags */
-  12 * 4,			/* %cs */
-  15 * 4,			/* %ss */
-  3 * 4,			/* %ds */
-  2 * 4,			/* %es */
-  1 * 4,			/* %fs */
-  0 * 4				/* %gs */
-};
-
-/* From <machine/mcontext.h>.  */
-int i386nbsd_mc_reg_offset[] =
-{
-  11 * 4,			/* %eax */
-  10 * 4,			/* %ecx */
-  9 * 4,			/* %edx */
-  8 * 4,			/* %ebx */
-  7 * 4,			/* %esp */
-  6 * 4,			/* %ebp */
-  5 * 4,			/* %esi */
-  4 * 4,			/* %edi */
-  14 * 4,			/* %eip */
-  16 * 4,			/* %eflags */
-  15 * 4,			/* %cs */
-  18 * 4,			/* %ss */
-  3 * 4,			/* %ds */
-  2 * 4,			/* %es */
-  1 * 4,			/* %fs */
-  0 * 4				/* %gs */
-};
-
-static void i386nbsd_sigtramp_cache_init (const struct tramp_frame *,
-					  struct frame_info *,
-					  struct trad_frame_cache *,
-					  CORE_ADDR);
-
-static const struct tramp_frame i386nbsd_sigtramp_sc16 =
-{
-  SIGTRAMP_FRAME,
-  1,
-  {
-    { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x10, -1 },
-			/* leal  0x10(%esp), %eax */
-    { 0x50, -1 },	/* pushl %eax */
-    { 0x50, -1 },	/* pushl %eax */
-    { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x127, %eax		# __sigreturn14 */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x1, %eax		# exit */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  i386nbsd_sigtramp_cache_init
-};
-
-static const struct tramp_frame i386nbsd_sigtramp_sc2 =
-{
-  SIGTRAMP_FRAME,
-  1,
-  {
-    { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x0c, -1 },
-			/* leal  0x0c(%esp), %eax */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x127, %eax		# __sigreturn14 */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x1, %eax */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  i386nbsd_sigtramp_cache_init
-};
-
-static const struct tramp_frame i386nbsd_sigtramp_si2 =
-{
-  SIGTRAMP_FRAME,
-  1,
-  {
-    { 0x8b, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x08, -1 },
-			/* movl  8(%esp),%eax */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* movl  $0x134, %eax            # setcontext */
-    { 0xcd, -1 }, { 0x80, -1 },
-			/* int   $0x80 */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* movl  $0x1, %eax */
-    { 0xcd, -1 }, { 0x80, -1 },
-			/* int   $0x80 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  i386nbsd_sigtramp_cache_init
-};
-
-static const struct tramp_frame i386nbsd_sigtramp_si31 =
-{
-  SIGTRAMP_FRAME,
-  1,
-  {
-    { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
-        { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* leal  0x8c(%esp), %eax */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* movl  $0x134, %eax            # setcontext */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x1, %eax */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  i386nbsd_sigtramp_cache_init
-};
-
-static const struct tramp_frame i386nbsd_sigtramp_si4 =
-{
-  SIGTRAMP_FRAME,
-  1,
-  {
-    { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
-        { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* leal  0x8c(%esp), %eax */
-    { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-			/* movl  %eax, 0x4(%esp) */
-    { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
-			/* movl  $0x134, %eax            # setcontext */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { 0xc7, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
-        { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 },
-			/* movl   $0xffffffff,0x4(%esp) */
-    { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
-			/* movl  $0x1, %eax */
-    { 0xcd, -1 }, { 0x80, -1},
-			/* int   $0x80 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  i386nbsd_sigtramp_cache_init
-};
-
-static void
-i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
-			      struct frame_info *this_frame,
-			      struct trad_frame_cache *this_cache,
-			      CORE_ADDR func)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
-  CORE_ADDR base;
-  int *reg_offset;
-  int num_regs;
-  int i;
-
-  if (self == &i386nbsd_sigtramp_sc16 || self == &i386nbsd_sigtramp_sc2)
-    {
-      reg_offset = i386nbsd_sc_reg_offset;
-      num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
-
-      /* Read in the sigcontext address.  */
-      base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
-    }
-  else
-    {
-      reg_offset = i386nbsd_mc_reg_offset;
-      num_regs = ARRAY_SIZE (i386nbsd_mc_reg_offset);
-
-      /* Read in the ucontext address.  */
-      base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
-      /* offsetof(ucontext_t, uc_mcontext) == 36 */
-      base += 36;
-    }
-
-  for (i = 0; i < num_regs; i++)
-    if (reg_offset[i] != -1)
-      trad_frame_set_reg_addr (this_cache, i, base + reg_offset[i]);
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (this_cache, frame_id_build (sp, func));
-}
-
-
-static void 
-i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Obviously NetBSD is BSD-based.  */
-  i386bsd_init_abi (info, gdbarch);
-
-  /* NetBSD has a different `struct reg'.  */
-  tdep->gregset_reg_offset = i386nbsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (i386nbsd_r_reg_offset);
-  tdep->sizeof_gregset = 16 * 4;
-
-  /* NetBSD uses -freg-struct-return by default.  */
-  tdep->struct_return = reg_struct_return;
-
-  /* NetBSD uses tramp_frame sniffers for signal trampolines.  */
-  tdep->sigcontext_addr= 0;
-  tdep->sigtramp_start = 0;
-  tdep->sigtramp_end = 0;
-  tdep->sigtramp_p = 0;
-  tdep->sc_reg_offset = 0;
-  tdep->sc_num_regs = 0;
-
-  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_sc16);
-  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_sc2);
-  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si2);
-  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si31);
-  tramp_frame_prepend_unwinder (gdbarch, &i386nbsd_sigtramp_si4);
-}
-
-/* NetBSD ELF.  */
-
-static void
-i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* It's still NetBSD.  */
-  i386nbsd_init_abi (info, gdbarch);
-
-  /* But ELF-based.  */
-  i386_elf_init_abi (info, gdbarch);
-
-  /* NetBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  /* NetBSD ELF uses -fpcc-struct-return by default.  */
-  tdep->struct_return = pcc_struct_return;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_i386nbsd_tdep;
-
-void
-_initialize_i386nbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD_ELF,
-			  i386nbsdelf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nto-tdep.c ./gdb/i386-nto-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-nto-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-nto-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for QNX Neutrino x86.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-obsd-nat.c ./gdb/i386-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,129 @@
+/* Native-dependent code for OpenBSD/i386.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/sysctl.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "i386-tdep.h"
+#include "i386-bsd-nat.h"
+#include "obsd-nat.h"
+#include "bsd-kvm.h"
+
+static int
+i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct switchframe sf;
+
+  /* The following is true for OpenBSD 3.6:
+
+     The pcb contains %esp and %ebp at the point of the context switch
+     in cpu_switch().  At that point we have a stack frame as
+     described by `struct switchframe', which for OpenBSD 3.6 has the
+     following layout:
+
+     interrupt level
+     %edi
+     %esi
+     %ebx
+     %eip
+
+     we reconstruct the register state as it would look when we just
+     returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_esp == 0)
+    return 0;
+
+  /* Read the stack frame, and check its validity.  We do this by
+     checking if the saved interrupt priority level in the stack frame
+     looks reasonable..  */
+#ifdef PCB_SAVECTX
+  if ((pcb->pcb_flags & PCB_SAVECTX) == 0)
+    {
+      /* Yes, we have a frame that matches cpu_switch().  */
+      read_memory (pcb->pcb_esp, (gdb_byte *) &sf, sizeof sf);
+      pcb->pcb_esp += sizeof (struct switchframe);
+      regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
+      regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
+      regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
+      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+    }
+  else
+#endif
+    {
+      /* No, the pcb must have been last updated by savectx().  */
+      pcb->pcb_esp = pcb->pcb_ebp;
+      pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4, byte_order);
+      sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4, byte_order);
+      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+    }
+
+  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
+  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+
+  return 1;
+}
+
+
+/* Prevent warning from -Wmissing-prototypes.  */
+void _initialize_i386obsd_nat (void);
+
+void
+_initialize_i386obsd_nat (void)
+{
+  /* Add some extra features to the common *BSD/i386 target.  */
+  obsd_add_target (i386bsd_target ());
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (i386obsd_supply_pcb);
+
+  /* OpenBSD provides a vm.psstrings sysctl that we can use to locate
+     the sigtramp.  That way we can still recognize a sigtramp if its
+     location is changed in a new kernel.  This is especially
+     important for OpenBSD, since it uses a different memory layout
+     than NetBSD, yet we cannot distinguish between the two.
+
+     Of course this is still based on the assumption that the sigtramp
+     is placed directly under the location where the program arguments
+     and environment can be found.  */
+#ifdef VM_PSSTRINGS
+  {
+    struct _ps_strings _ps;
+    int mib[2];
+    size_t len;
+
+    mib[0] = CTL_VM;
+    mib[1] = VM_PSSTRINGS;
+    len = sizeof (_ps);
+    if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0)
+      {
+	i386obsd_sigtramp_start_addr = (u_long) _ps.val - 128;
+	i386obsd_sigtramp_end_addr = (u_long) _ps.val;
+      }
+  }
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386obsd-nat.c ./gdb/i386obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386obsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,129 +0,0 @@
-/* Native-dependent code for OpenBSD/i386.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/sysctl.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-
-#include "i386-tdep.h"
-#include "i386bsd-nat.h"
-#include "obsd-nat.h"
-#include "bsd-kvm.h"
-
-static int
-i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct switchframe sf;
-
-  /* The following is true for OpenBSD 3.6:
-
-     The pcb contains %esp and %ebp at the point of the context switch
-     in cpu_switch().  At that point we have a stack frame as
-     described by `struct switchframe', which for OpenBSD 3.6 has the
-     following layout:
-
-     interrupt level
-     %edi
-     %esi
-     %ebx
-     %eip
-
-     we reconstruct the register state as it would look when we just
-     returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_esp == 0)
-    return 0;
-
-  /* Read the stack frame, and check its validity.  We do this by
-     checking if the saved interrupt priority level in the stack frame
-     looks reasonable..  */
-#ifdef PCB_SAVECTX
-  if ((pcb->pcb_flags & PCB_SAVECTX) == 0)
-    {
-      /* Yes, we have a frame that matches cpu_switch().  */
-      read_memory (pcb->pcb_esp, (gdb_byte *) &sf, sizeof sf);
-      pcb->pcb_esp += sizeof (struct switchframe);
-      regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
-      regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
-      regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
-      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
-    }
-  else
-#endif
-    {
-      /* No, the pcb must have been last updated by savectx().  */
-      pcb->pcb_esp = pcb->pcb_ebp;
-      pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4, byte_order);
-      sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4, byte_order);
-      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
-    }
-
-  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
-  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
-
-  return 1;
-}
-
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_i386obsd_nat (void);
-
-void
-_initialize_i386obsd_nat (void)
-{
-  /* Add some extra features to the common *BSD/i386 target.  */
-  obsd_add_target (i386bsd_target ());
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (i386obsd_supply_pcb);
-
-  /* OpenBSD provides a vm.psstrings sysctl that we can use to locate
-     the sigtramp.  That way we can still recognize a sigtramp if its
-     location is changed in a new kernel.  This is especially
-     important for OpenBSD, since it uses a different memory layout
-     than NetBSD, yet we cannot distinguish between the two.
-
-     Of course this is still based on the assumption that the sigtramp
-     is placed directly under the location where the program arguments
-     and environment can be found.  */
-#ifdef VM_PSSTRINGS
-  {
-    struct _ps_strings _ps;
-    int mib[2];
-    size_t len;
-
-    mib[0] = CTL_VM;
-    mib[1] = VM_PSSTRINGS;
-    len = sizeof (_ps);
-    if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0)
-      {
-	i386obsd_sigtramp_start_addr = (u_long) _ps.val - 128;
-	i386obsd_sigtramp_end_addr = (u_long) _ps.val;
-      }
-  }
-#endif
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-obsd-tdep.c ./gdb/i386-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,455 @@
+/* Target-dependent code for OpenBSD/i386.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "osabi.h"
+#include "target.h"
+#include "trad-frame.h"
+
+#include "obsd-tdep.h"
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+#include "solib-svr4.h"
+#include "bsd-uthread.h"
+
+/* Support for signal handlers.  */
+
+/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
+   in virtual memory.  The randomness makes it somewhat tricky to
+   detect it, but fortunately we can rely on the fact that the start
+   of the sigtramp routine is page-aligned.  We recognize the
+   trampoline by looking for the code that invokes the sigreturn
+   system call.  The offset where we can find that code varies from
+   release to release.
+
+   By the way, the mapping mentioned above is read-only, so you cannot
+   place a breakpoint in the signal trampoline.  */
+
+/* Default page size.  */
+static const int i386obsd_page_size = 4096;
+
+/* Offset for sigreturn(2).  */
+static const int i386obsd_sigreturn_offset[] = {
+  0x0a,				/* OpenBSD 3.2 */
+  0x14,				/* OpenBSD 3.6 */
+  0x3a,				/* OpenBSD 3.8 */
+  -1
+};
+
+/* Return whether THIS_FRAME corresponds to an OpenBSD sigtramp
+   routine.  */
+
+static int
+i386obsd_sigtramp_p (struct frame_info *this_frame)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
+  /* The call sequence invoking sigreturn(2).  */
+  const gdb_byte sigreturn[] =
+  {
+    0xb8,
+    0x67, 0x00, 0x00, 0x00,	/* movl $SYS_sigreturn, %eax */
+    0xcd, 0x80			/* int $0x80 */
+  };
+  size_t buflen = sizeof sigreturn;
+  const int *offset;
+  gdb_byte *buf;
+  const char *name;
+
+  /* If the function has a valid symbol name, it isn't a
+     trampoline.  */
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (name != NULL)
+    return 0;
+
+  /* If the function lives in a valid section (even without a starting
+     point) it isn't a trampoline.  */
+  if (find_pc_section (pc) != NULL)
+    return 0;
+
+  /* Allocate buffer.  */
+  buf = (gdb_byte *) alloca (buflen);
+
+  /* Loop over all offsets.  */
+  for (offset = i386obsd_sigreturn_offset; *offset != -1; offset++)
+    {
+      /* If we can't read the instructions, return zero.  */
+      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
+				     buf, buflen))
+	return 0;
+
+      /* Check for sigreturn(2).  */
+      if (memcmp (buf, sigreturn, buflen) == 0)
+	return 1;
+    }
+
+  return 0;
+}
+
+/* Mapping between the general-purpose registers in `struct reg'
+   format and GDB's register cache layout.  */
+
+/* From <machine/reg.h>.  */
+static int i386obsd_r_reg_offset[] =
+{
+  0 * 4,			/* %eax */
+  1 * 4,			/* %ecx */
+  2 * 4,			/* %edx */
+  3 * 4,			/* %ebx */
+  4 * 4,			/* %esp */
+  5 * 4,			/* %ebp */
+  6 * 4,			/* %esi */
+  7 * 4,			/* %edi */
+  8 * 4,			/* %eip */
+  9 * 4,			/* %eflags */
+  10 * 4,			/* %cs */
+  11 * 4,			/* %ss */
+  12 * 4,			/* %ds */
+  13 * 4,			/* %es */
+  14 * 4,			/* %fs */
+  15 * 4			/* %gs */
+};
+
+
+
+/* Sigtramp routine location for OpenBSD 3.1 and earlier releases.  */
+CORE_ADDR i386obsd_sigtramp_start_addr = 0xbfbfdf20;
+CORE_ADDR i386obsd_sigtramp_end_addr = 0xbfbfdff0;
+
+/* From <machine/signal.h>.  */
+int i386obsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+  10 * 4,			/* %eax */
+  9 * 4,			/* %ecx */
+  8 * 4,			/* %edx */
+  7 * 4,			/* %ebx */
+  14 * 4,			/* %esp */
+  6 * 4,			/* %ebp */
+  5 * 4,			/* %esi */
+  4 * 4,			/* %edi */
+  11 * 4,			/* %eip */
+  13 * 4,			/* %eflags */
+  12 * 4,			/* %cs */
+  15 * 4,			/* %ss */
+  3 * 4,			/* %ds */
+  2 * 4,			/* %es */
+  1 * 4,			/* %fs */
+  0 * 4				/* %gs */
+};
+
+/* From /usr/src/lib/libpthread/arch/i386/uthread_machdep.c.  */
+static int i386obsd_uthread_reg_offset[] =
+{
+  11 * 4,			/* %eax */
+  10 * 4,			/* %ecx */
+  9 * 4,			/* %edx */
+  8 * 4,			/* %ebx */
+  -1,				/* %esp */
+  6 * 4,			/* %ebp */
+  5 * 4,			/* %esi */
+  4 * 4,			/* %edi */
+  12 * 4,			/* %eip */
+  -1,				/* %eflags */
+  13 * 4,			/* %cs */
+  -1,				/* %ss */
+  3 * 4,			/* %ds */
+  2 * 4,			/* %es */
+  1 * 4,			/* %fs */
+  0 * 4				/* %gs */
+};
+
+/* Offset within the thread structure where we can find the saved
+   stack pointer (%esp).  */
+#define I386OBSD_UTHREAD_ESP_OFFSET	176
+
+static void
+i386obsd_supply_uthread (struct regcache *regcache,
+			 int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
+  CORE_ADDR sp = 0;
+  gdb_byte buf[4];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == -1 || regnum == I386_ESP_REGNUM)
+    {
+      int offset;
+
+      /* Fetch stack pointer from thread structure.  */
+      sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
+
+      /* Adjust the stack pointer such that it looks as if we just
+         returned from _thread_machdep_switch.  */
+      offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
+      store_unsigned_integer (buf, 4, byte_order, sp + offset);
+      regcache_raw_supply (regcache, I386_ESP_REGNUM, buf);
+    }
+
+  for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++)
+    {
+      if (i386obsd_uthread_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  /* Fetch stack pointer from thread structure (if we didn't
+             do so already).  */
+	  if (sp == 0)
+	    sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
+
+	  /* Read the saved register from the stack frame.  */
+	  read_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
+	  regcache_raw_supply (regcache, i, buf);
+	}
+    }
+}
+
+static void
+i386obsd_collect_uthread (const struct regcache *regcache,
+			  int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
+  CORE_ADDR sp = 0;
+  gdb_byte buf[4];
+  int i;
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == -1 || regnum == I386_ESP_REGNUM)
+    {
+      int offset;
+
+      /* Calculate the stack pointer (frame pointer) that will be
+         stored into the thread structure.  */
+      offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
+      regcache_raw_collect (regcache, I386_ESP_REGNUM, buf);
+      sp = extract_unsigned_integer (buf, 4, byte_order) - offset;
+
+      /* Store the stack pointer.  */
+      write_memory_unsigned_integer (sp_addr, 4, byte_order, sp);
+
+      /* The stack pointer was (potentially) modified.  Make sure we
+         build a proper stack frame.  */
+      regnum = -1;
+    }
+
+  for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++)
+    {
+      if (i386obsd_uthread_reg_offset[i] != -1
+	  && (regnum == -1 || regnum == i))
+	{
+	  /* Fetch stack pointer from thread structure (if we didn't
+             calculate it already).  */
+	  if (sp == 0)
+	    sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
+
+	  /* Write the register into the stack frame.  */
+	  regcache_raw_collect (regcache, i, buf);
+	  write_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
+	}
+    }
+}
+
+/* Kernel debugging support.  */
+
+/* From <machine/frame.h>.  Note that %esp and %ess are only saved in
+   a trap frame when entering the kernel from user space.  */
+static int i386obsd_tf_reg_offset[] =
+{
+  10 * 4,			/* %eax */
+  9 * 4,			/* %ecx */
+  8 * 4,			/* %edx */
+  7 * 4,			/* %ebx */
+  -1,				/* %esp */
+  6 * 4,			/* %ebp */
+  5 * 4,			/* %esi */
+  4 * 4,			/* %edi */
+  13 * 4,			/* %eip */
+  15 * 4,			/* %eflags */
+  14 * 4,			/* %cs */
+  -1,				/* %ss */
+  3 * 4,			/* %ds */
+  2 * 4,			/* %es */
+  0 * 4,			/* %fs */
+  1 * 4				/* %gs */
+};
+
+static struct trad_frame_cache *
+i386obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct trad_frame_cache *cache;
+  CORE_ADDR func, sp, addr;
+  ULONGEST cs;
+  const char *name;
+  int i;
+
+  if (*this_cache)
+    return (struct trad_frame_cache *) *this_cache;
+
+  cache = trad_frame_cache_zalloc (this_frame);
+  *this_cache = cache;
+
+  func = get_frame_func (this_frame);
+  sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
+
+  find_pc_partial_function (func, &name, NULL, NULL);
+  if (name && startswith (name, "Xintr"))
+    addr = sp + 8;		/* It's an interrupt frame.  */
+  else
+    addr = sp;
+
+  for (i = 0; i < ARRAY_SIZE (i386obsd_tf_reg_offset); i++)
+    if (i386obsd_tf_reg_offset[i] != -1)
+      trad_frame_set_reg_addr (cache, i, addr + i386obsd_tf_reg_offset[i]);
+
+  /* Read %cs from trap frame.  */
+  addr += i386obsd_tf_reg_offset[I386_CS_REGNUM];
+  cs = read_memory_unsigned_integer (addr, 4, byte_order);
+  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
+    {
+      /* Trap from user space; terminate backtrace.  */
+      trad_frame_set_id (cache, outer_frame_id);
+    }
+  else
+    {
+      /* Construct the frame ID using the function start.  */
+      trad_frame_set_id (cache, frame_id_build (sp + 8, func));
+    }
+
+  return cache;
+}
+
+static void
+i386obsd_trapframe_this_id (struct frame_info *this_frame,
+			    void **this_cache, struct frame_id *this_id)
+{
+  struct trad_frame_cache *cache =
+    i386obsd_trapframe_cache (this_frame, this_cache);
+  
+  trad_frame_get_id (cache, this_id);
+}
+
+static struct value *
+i386obsd_trapframe_prev_register (struct frame_info *this_frame,
+				  void **this_cache, int regnum)
+{
+  struct trad_frame_cache *cache =
+    i386obsd_trapframe_cache (this_frame, this_cache);
+
+  return trad_frame_get_register (cache, this_frame, regnum);
+}
+
+static int
+i386obsd_trapframe_sniffer (const struct frame_unwind *self,
+			    struct frame_info *this_frame,
+			    void **this_prologue_cache)
+{
+  ULONGEST cs;
+  const char *name;
+
+  /* Check Current Privilege Level and bail out if we're not executing
+     in kernel space.  */
+  cs = get_frame_register_unsigned (this_frame, I386_CS_REGNUM);
+  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
+    return 0;
+
+  find_pc_partial_function (get_frame_pc (this_frame), &name, NULL, NULL);
+  return (name && (strcmp (name, "calltrap") == 0
+		   || strcmp (name, "syscall1") == 0
+		   || startswith (name, "Xintr")
+		   || startswith (name, "Xsoft")));
+}
+
+static const struct frame_unwind i386obsd_trapframe_unwind = {
+  /* FIXME: kettenis/20051219: This really is more like an interrupt
+     frame, but SIGTRAMP_FRAME would print <signal handler called>,
+     which really is not what we want here.  */
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  i386obsd_trapframe_this_id,
+  i386obsd_trapframe_prev_register,
+  NULL,
+  i386obsd_trapframe_sniffer
+};
+
+
+static void 
+i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Obviously OpenBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+  obsd_init_abi (info, gdbarch);
+  i386_elf_init_abi (info, gdbarch);
+
+  /* OpenBSD has a different `struct reg'.  */
+  tdep->gregset_reg_offset = i386obsd_r_reg_offset;
+  tdep->gregset_num_regs = ARRAY_SIZE (i386obsd_r_reg_offset);
+  tdep->sizeof_gregset = 16 * 4;
+
+  /* OpenBSD uses -freg-struct-return by default.  */
+  tdep->struct_return = reg_struct_return;
+
+  /* OpenBSD uses a different memory layout.  */
+  tdep->sigtramp_start = i386obsd_sigtramp_start_addr;
+  tdep->sigtramp_end = i386obsd_sigtramp_end_addr;
+  tdep->sigtramp_p = i386obsd_sigtramp_p;
+
+  /* OpenBSD has a `struct sigcontext' that's different from the
+     original 4.3 BSD.  */
+  tdep->sc_reg_offset = i386obsd_sc_reg_offset;
+  tdep->sc_num_regs = ARRAY_SIZE (i386obsd_sc_reg_offset);
+
+  /* OpenBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, i386obsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, i386obsd_collect_uthread);
+
+  /* Unwind kernel trap frames correctly.  */
+  frame_unwind_prepend_unwinder (gdbarch, &i386obsd_trapframe_unwind);
+
+  /* OpenBSD ELF uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386obsd_tdep (void);
+
+void
+_initialize_i386obsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_OPENBSD,
+			  i386obsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386obsd-tdep.c ./gdb/i386obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386obsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,522 +0,0 @@
-/* Target-dependent code for OpenBSD/i386.
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "regset.h"
-#include "symtab.h"
-#include "objfiles.h"
-#include "osabi.h"
-#include "target.h"
-#include "trad-frame.h"
-
-#include "obsd-tdep.h"
-#include "i386-tdep.h"
-#include "i387-tdep.h"
-#include "solib-svr4.h"
-#include "bsd-uthread.h"
-
-/* Support for signal handlers.  */
-
-/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
-   in virtual memory.  The randomness makes it somewhat tricky to
-   detect it, but fortunately we can rely on the fact that the start
-   of the sigtramp routine is page-aligned.  We recognize the
-   trampoline by looking for the code that invokes the sigreturn
-   system call.  The offset where we can find that code varies from
-   release to release.
-
-   By the way, the mapping mentioned above is read-only, so you cannot
-   place a breakpoint in the signal trampoline.  */
-
-/* Default page size.  */
-static const int i386obsd_page_size = 4096;
-
-/* Offset for sigreturn(2).  */
-static const int i386obsd_sigreturn_offset[] = {
-  0x0a,				/* OpenBSD 3.2 */
-  0x14,				/* OpenBSD 3.6 */
-  0x3a,				/* OpenBSD 3.8 */
-  -1
-};
-
-/* Return whether THIS_FRAME corresponds to an OpenBSD sigtramp
-   routine.  */
-
-static int
-i386obsd_sigtramp_p (struct frame_info *this_frame)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
-  /* The call sequence invoking sigreturn(2).  */
-  const gdb_byte sigreturn[] =
-  {
-    0xb8,
-    0x67, 0x00, 0x00, 0x00,	/* movl $SYS_sigreturn, %eax */
-    0xcd, 0x80			/* int $0x80 */
-  };
-  size_t buflen = sizeof sigreturn;
-  const int *offset;
-  gdb_byte *buf;
-  const char *name;
-
-  /* If the function has a valid symbol name, it isn't a
-     trampoline.  */
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (name != NULL)
-    return 0;
-
-  /* If the function lives in a valid section (even without a starting
-     point) it isn't a trampoline.  */
-  if (find_pc_section (pc) != NULL)
-    return 0;
-
-  /* Allocate buffer.  */
-  buf = alloca (buflen);
-
-  /* Loop over all offsets.  */
-  for (offset = i386obsd_sigreturn_offset; *offset != -1; offset++)
-    {
-      /* If we can't read the instructions, return zero.  */
-      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
-				     buf, buflen))
-	return 0;
-
-      /* Check for sigreturn(2).  */
-      if (memcmp (buf, sigreturn, buflen) == 0)
-	return 1;
-    }
-
-  return 0;
-}
-
-/* Mapping between the general-purpose registers in `struct reg'
-   format and GDB's register cache layout.  */
-
-/* From <machine/reg.h>.  */
-static int i386obsd_r_reg_offset[] =
-{
-  0 * 4,			/* %eax */
-  1 * 4,			/* %ecx */
-  2 * 4,			/* %edx */
-  3 * 4,			/* %ebx */
-  4 * 4,			/* %esp */
-  5 * 4,			/* %ebp */
-  6 * 4,			/* %esi */
-  7 * 4,			/* %edi */
-  8 * 4,			/* %eip */
-  9 * 4,			/* %eflags */
-  10 * 4,			/* %cs */
-  11 * 4,			/* %ss */
-  12 * 4,			/* %ds */
-  13 * 4,			/* %es */
-  14 * 4,			/* %fs */
-  15 * 4			/* %gs */
-};
-
-static void
-i386obsd_aout_supply_regset (const struct regset *regset,
-			     struct regcache *regcache, int regnum,
-			     const void *regs, size_t len)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  const gdb_byte *gregs = regs;
-
-  gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
-
-  i386_supply_gregset (regset, regcache, regnum, regs, tdep->sizeof_gregset);
-  i387_supply_fsave (regcache, regnum, gregs + tdep->sizeof_gregset);
-}
-
-static const struct regset i386obsd_aout_gregset =
-  {
-    NULL, i386obsd_aout_supply_regset, NULL
-  };
-
-static void
-i386obsd_aout_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					    iterate_over_regset_sections_cb *cb,
-					    void *cb_data,
-					    const struct regcache *regcache)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* OpenBSD a.out core dumps don't use seperate register sets for the
-     general-purpose and floating-point registers.  */
-
-  cb (".reg", tdep->sizeof_gregset + I387_SIZEOF_FSAVE,
-      &i386obsd_aout_gregset, NULL, cb_data);
-}
-
-
-/* Sigtramp routine location for OpenBSD 3.1 and earlier releases.  */
-CORE_ADDR i386obsd_sigtramp_start_addr = 0xbfbfdf20;
-CORE_ADDR i386obsd_sigtramp_end_addr = 0xbfbfdff0;
-
-/* From <machine/signal.h>.  */
-int i386obsd_sc_reg_offset[I386_NUM_GREGS] =
-{
-  10 * 4,			/* %eax */
-  9 * 4,			/* %ecx */
-  8 * 4,			/* %edx */
-  7 * 4,			/* %ebx */
-  14 * 4,			/* %esp */
-  6 * 4,			/* %ebp */
-  5 * 4,			/* %esi */
-  4 * 4,			/* %edi */
-  11 * 4,			/* %eip */
-  13 * 4,			/* %eflags */
-  12 * 4,			/* %cs */
-  15 * 4,			/* %ss */
-  3 * 4,			/* %ds */
-  2 * 4,			/* %es */
-  1 * 4,			/* %fs */
-  0 * 4				/* %gs */
-};
-
-/* From /usr/src/lib/libpthread/arch/i386/uthread_machdep.c.  */
-static int i386obsd_uthread_reg_offset[] =
-{
-  11 * 4,			/* %eax */
-  10 * 4,			/* %ecx */
-  9 * 4,			/* %edx */
-  8 * 4,			/* %ebx */
-  -1,				/* %esp */
-  6 * 4,			/* %ebp */
-  5 * 4,			/* %esi */
-  4 * 4,			/* %edi */
-  12 * 4,			/* %eip */
-  -1,				/* %eflags */
-  13 * 4,			/* %cs */
-  -1,				/* %ss */
-  3 * 4,			/* %ds */
-  2 * 4,			/* %es */
-  1 * 4,			/* %fs */
-  0 * 4				/* %gs */
-};
-
-/* Offset within the thread structure where we can find the saved
-   stack pointer (%esp).  */
-#define I386OBSD_UTHREAD_ESP_OFFSET	176
-
-static void
-i386obsd_supply_uthread (struct regcache *regcache,
-			 int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
-  CORE_ADDR sp = 0;
-  gdb_byte buf[4];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == -1 || regnum == I386_ESP_REGNUM)
-    {
-      int offset;
-
-      /* Fetch stack pointer from thread structure.  */
-      sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
-
-      /* Adjust the stack pointer such that it looks as if we just
-         returned from _thread_machdep_switch.  */
-      offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
-      store_unsigned_integer (buf, 4, byte_order, sp + offset);
-      regcache_raw_supply (regcache, I386_ESP_REGNUM, buf);
-    }
-
-  for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++)
-    {
-      if (i386obsd_uthread_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  /* Fetch stack pointer from thread structure (if we didn't
-             do so already).  */
-	  if (sp == 0)
-	    sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
-
-	  /* Read the saved register from the stack frame.  */
-	  read_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
-	  regcache_raw_supply (regcache, i, buf);
-	}
-    }
-}
-
-static void
-i386obsd_collect_uthread (const struct regcache *regcache,
-			  int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
-  CORE_ADDR sp = 0;
-  gdb_byte buf[4];
-  int i;
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == -1 || regnum == I386_ESP_REGNUM)
-    {
-      int offset;
-
-      /* Calculate the stack pointer (frame pointer) that will be
-         stored into the thread structure.  */
-      offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
-      regcache_raw_collect (regcache, I386_ESP_REGNUM, buf);
-      sp = extract_unsigned_integer (buf, 4, byte_order) - offset;
-
-      /* Store the stack pointer.  */
-      write_memory_unsigned_integer (sp_addr, 4, byte_order, sp);
-
-      /* The stack pointer was (potentially) modified.  Make sure we
-         build a proper stack frame.  */
-      regnum = -1;
-    }
-
-  for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++)
-    {
-      if (i386obsd_uthread_reg_offset[i] != -1
-	  && (regnum == -1 || regnum == i))
-	{
-	  /* Fetch stack pointer from thread structure (if we didn't
-             calculate it already).  */
-	  if (sp == 0)
-	    sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
-
-	  /* Write the register into the stack frame.  */
-	  regcache_raw_collect (regcache, i, buf);
-	  write_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
-	}
-    }
-}
-
-/* Kernel debugging support.  */
-
-/* From <machine/frame.h>.  Note that %esp and %ess are only saved in
-   a trap frame when entering the kernel from user space.  */
-static int i386obsd_tf_reg_offset[] =
-{
-  10 * 4,			/* %eax */
-  9 * 4,			/* %ecx */
-  8 * 4,			/* %edx */
-  7 * 4,			/* %ebx */
-  -1,				/* %esp */
-  6 * 4,			/* %ebp */
-  5 * 4,			/* %esi */
-  4 * 4,			/* %edi */
-  13 * 4,			/* %eip */
-  15 * 4,			/* %eflags */
-  14 * 4,			/* %cs */
-  -1,				/* %ss */
-  3 * 4,			/* %ds */
-  2 * 4,			/* %es */
-  0 * 4,			/* %fs */
-  1 * 4				/* %gs */
-};
-
-static struct trad_frame_cache *
-i386obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct trad_frame_cache *cache;
-  CORE_ADDR func, sp, addr;
-  ULONGEST cs;
-  const char *name;
-  int i;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-  *this_cache = cache;
-
-  func = get_frame_func (this_frame);
-  sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
-
-  find_pc_partial_function (func, &name, NULL, NULL);
-  if (name && startswith (name, "Xintr"))
-    addr = sp + 8;		/* It's an interrupt frame.  */
-  else
-    addr = sp;
-
-  for (i = 0; i < ARRAY_SIZE (i386obsd_tf_reg_offset); i++)
-    if (i386obsd_tf_reg_offset[i] != -1)
-      trad_frame_set_reg_addr (cache, i, addr + i386obsd_tf_reg_offset[i]);
-
-  /* Read %cs from trap frame.  */
-  addr += i386obsd_tf_reg_offset[I386_CS_REGNUM];
-  cs = read_memory_unsigned_integer (addr, 4, byte_order);
-  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
-    {
-      /* Trap from user space; terminate backtrace.  */
-      trad_frame_set_id (cache, outer_frame_id);
-    }
-  else
-    {
-      /* Construct the frame ID using the function start.  */
-      trad_frame_set_id (cache, frame_id_build (sp + 8, func));
-    }
-
-  return cache;
-}
-
-static void
-i386obsd_trapframe_this_id (struct frame_info *this_frame,
-			    void **this_cache, struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    i386obsd_trapframe_cache (this_frame, this_cache);
-  
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-i386obsd_trapframe_prev_register (struct frame_info *this_frame,
-				  void **this_cache, int regnum)
-{
-  struct trad_frame_cache *cache =
-    i386obsd_trapframe_cache (this_frame, this_cache);
-
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static int
-i386obsd_trapframe_sniffer (const struct frame_unwind *self,
-			    struct frame_info *this_frame,
-			    void **this_prologue_cache)
-{
-  ULONGEST cs;
-  const char *name;
-
-  /* Check Current Privilege Level and bail out if we're not executing
-     in kernel space.  */
-  cs = get_frame_register_unsigned (this_frame, I386_CS_REGNUM);
-  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
-    return 0;
-
-  find_pc_partial_function (get_frame_pc (this_frame), &name, NULL, NULL);
-  return (name && (strcmp (name, "calltrap") == 0
-		   || strcmp (name, "syscall1") == 0
-		   || startswith (name, "Xintr")
-		   || startswith (name, "Xsoft")));
-}
-
-static const struct frame_unwind i386obsd_trapframe_unwind = {
-  /* FIXME: kettenis/20051219: This really is more like an interrupt
-     frame, but SIGTRAMP_FRAME would print <signal handler called>,
-     which really is not what we want here.  */
-  NORMAL_FRAME,
-  default_frame_unwind_stop_reason,
-  i386obsd_trapframe_this_id,
-  i386obsd_trapframe_prev_register,
-  NULL,
-  i386obsd_trapframe_sniffer
-};
-
-
-static void 
-i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Obviously OpenBSD is BSD-based.  */
-  i386bsd_init_abi (info, gdbarch);
-  obsd_init_abi (info, gdbarch);
-
-  /* OpenBSD has a different `struct reg'.  */
-  tdep->gregset_reg_offset = i386obsd_r_reg_offset;
-  tdep->gregset_num_regs = ARRAY_SIZE (i386obsd_r_reg_offset);
-  tdep->sizeof_gregset = 16 * 4;
-
-  /* OpenBSD uses -freg-struct-return by default.  */
-  tdep->struct_return = reg_struct_return;
-
-  /* OpenBSD uses a different memory layout.  */
-  tdep->sigtramp_start = i386obsd_sigtramp_start_addr;
-  tdep->sigtramp_end = i386obsd_sigtramp_end_addr;
-  tdep->sigtramp_p = i386obsd_sigtramp_p;
-
-  /* OpenBSD has a `struct sigcontext' that's different from the
-     original 4.3 BSD.  */
-  tdep->sc_reg_offset = i386obsd_sc_reg_offset;
-  tdep->sc_num_regs = ARRAY_SIZE (i386obsd_sc_reg_offset);
-
-  /* OpenBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, i386obsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, i386obsd_collect_uthread);
-
-  /* Unwind kernel trap frames correctly.  */
-  frame_unwind_prepend_unwinder (gdbarch, &i386obsd_trapframe_unwind);
-}
-
-/* OpenBSD a.out.  */
-
-static void
-i386obsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  i386obsd_init_abi (info, gdbarch);
-
-  /* OpenBSD a.out has a single register set.  */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, i386obsd_aout_iterate_over_regset_sections);
-}
-
-/* OpenBSD ELF.  */
-
-static void
-i386obsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* It's still OpenBSD.  */
-  i386obsd_init_abi (info, gdbarch);
-
-  /* But ELF-based.  */
-  i386_elf_init_abi (info, gdbarch);
-
-  /* OpenBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386obsd_tdep (void);
-
-void
-_initialize_i386obsd_tdep (void)
-{
-  /* FIXME: kettenis/20021020: Since OpenBSD/i386 binaries are
-     indistingushable from NetBSD/i386 a.out binaries, building a GDB
-     that should support both these targets will probably not work as
-     expected.  */
-#define GDB_OSABI_OPENBSD_AOUT GDB_OSABI_NETBSD_AOUT
-
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_OPENBSD_AOUT,
-			  i386obsd_aout_init_abi);
-  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_OPENBSD_ELF,
-			  i386obsd_elf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-sol2-nat.c ./gdb/i386-sol2-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-sol2-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-sol2-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for Solaris x86.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-sol2-tdep.c ./gdb/i386-sol2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-sol2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-sol2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris x86.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-tdep.c ./gdb/i386-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Intel 386 target-dependent stuff.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,7 +53,9 @@
 #include "features/i386/i386.c"
 #include "features/i386/i386-avx.c"
 #include "features/i386/i386-mpx.c"
-#include "features/i386/i386-avx512.c"
+#include "features/i386/i386-avx-mpx.c"
+#include "features/i386/i386-avx-avx512.c"
+#include "features/i386/i386-avx-mpx-avx512-pku.c"
 #include "features/i386/i386-mmx.c"
 
 #include "ax.h"
@@ -65,6 +67,7 @@
 #include "expression.h"
 #include "parser-defs.h"
 #include <ctype.h>
+#include <algorithm>
 
 /* Register names.  */
 
@@ -118,6 +121,11 @@ static const char *i386_mpx_names[] =
   "bnd0raw", "bnd1raw", "bnd2raw", "bnd3raw", "bndcfgu", "bndstatus"
 };
 
+static const char* i386_pkeys_names[] =
+{
+  "pkru"
+};
+
 /* Register names for MPX pseudo-registers.  */
 
 static const char *i386_bnd_names[] =
@@ -412,6 +420,21 @@ i386_mpx_ctrl_regnum_p (struct gdbarch *
   return regnum >= 0 && regnum < I387_NUM_MPX_CTRL_REGS;
 }
 
+/* PKRU register?  */
+
+bool
+i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int pkru_regnum = tdep->pkru_regnum;
+
+  if (pkru_regnum < 0)
+    return false;
+
+  regnum -= pkru_regnum;
+  return regnum >= 0 && regnum < I387_NUM_PKEYS_REGS;
+}
+
 /* Return the name of register REGNUM, or the empty string if it is
    an anonymous register.  */
 
@@ -502,11 +525,11 @@ i386_dbx_reg_to_regnum (struct gdbarch *
   return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
 }
 
-/* Convert SVR4 register number REG to the appropriate register number
+/* Convert SVR4 DWARF register number REG to the appropriate register number
    used by GDB.  */
 
 static int
-i386_svr4_reg_to_regnum (struct gdbarch *gdbarch, int reg)
+i386_svr4_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
@@ -544,8 +567,20 @@ i386_svr4_reg_to_regnum (struct gdbarch 
     case 45: return I386_GS_REGNUM;
     }
 
-  /* This will hopefully provoke a warning.  */
-  return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+  return -1;
+}
+
+/* Wrapper on i386_svr4_dwarf_reg_to_regnum to return
+   num_regs + num_pseudo_regs for other debug formats.  */
+
+static int
+i386_svr4_reg_to_regnum (struct gdbarch *gdbarch, int reg)
+{
+  int regnum = i386_svr4_dwarf_reg_to_regnum (gdbarch, reg);
+
+  if (regnum == -1)
+    return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+  return regnum;
 }
 
 
@@ -574,14 +609,10 @@ static const char *disassembly_flavor = 
 
    This function is 64-bit safe.  */
 
-static const gdb_byte *
-i386_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static gdb_byte break_insn[] = { 0xcc }; /* int 3 */
+constexpr gdb_byte i386_break_insn[] = { 0xcc }; /* int 3 */
+
+typedef BP_MANIPULATION (i386_break_insn) i386_breakpoint;
 
-  *len = sizeof (break_insn);
-  return break_insn;
-}
 
 /* Displaced instruction handling.  */
 
@@ -777,7 +808,7 @@ i386_displaced_step_copy_insn (struct gd
 			       struct regcache *regs)
 {
   size_t len = gdbarch_max_insn_length (gdbarch);
-  gdb_byte *buf = xmalloc (len);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len);
 
   read_memory (from, buf, len);
 
@@ -1352,7 +1383,7 @@ i386_analyze_stack_align (CORE_ADDR pc, 
   if (current_pc > pc + offset_and)
     cache->saved_sp_reg = regnums[reg];
 
-  return min (pc + offset + 3, current_pc);
+  return std::min (pc + offset + 3, current_pc);
 }
 
 /* Maximum instruction length we need to handle.  */
@@ -1823,7 +1854,7 @@ i386_skip_prologue (struct gdbarch *gdba
 	  && (cust != NULL
 	      && COMPUNIT_PRODUCER (cust) != NULL
 	      && startswith (COMPUNIT_PRODUCER (cust), "clang ")))
-        return max (start_pc, post_prologue_pc);
+        return std::max (start_pc, post_prologue_pc);
     }
  
   cache.locals = -1;
@@ -2050,7 +2081,7 @@ i386_frame_cache (struct frame_info *thi
   struct i386_frame_cache *cache;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct i386_frame_cache *) *this_cache;
 
   cache = i386_alloc_frame_cache ();
   *this_cache = cache;
@@ -2220,7 +2251,7 @@ i386_epilogue_frame_cache (struct frame_
   CORE_ADDR sp;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct i386_frame_cache *) *this_cache;
 
   cache = i386_alloc_frame_cache ();
   *this_cache = cache;
@@ -2407,7 +2438,7 @@ i386_sigtramp_frame_cache (struct frame_
   gdb_byte buf[4];
 
   if (*this_cache)
-    return *this_cache;
+    return (struct i386_frame_cache *) *this_cache;
 
   cache = i386_alloc_frame_cache ();
 
@@ -3006,7 +3037,7 @@ i386_bnd_type (struct gdbarch *gdbarch)
 
   if (!tdep->i386_bnd_type)
     {
-      struct type *t, *bound_t;
+      struct type *t;
       const struct builtin_type *bt = builtin_type (gdbarch);
 
       /* The type we're building is described bellow:  */
@@ -3240,7 +3271,7 @@ i386_pseudo_register_read_into_value (st
 				      int regnum,
 				      struct value *result_value)
 {
-  gdb_byte raw_buf[MAX_REGISTER_SIZE];
+  gdb_byte raw_buf[I386_MAX_REGISTER_SIZE];
   enum register_status status;
   gdb_byte *buf = value_contents_raw (result_value);
 
@@ -3407,9 +3438,6 @@ i386_pseudo_register_read_into_value (st
 	}
       else if (i386_byte_regnum_p (gdbarch, regnum))
 	{
-	  /* Check byte pseudo registers last since this function will
-	     be called from amd64_pseudo_register_read, which handles
-	     byte pseudo registers differently.  */
 	  int gpnum = regnum - tdep->al_regnum;
 
 	  /* Extract (always little endian).  We read both lower and
@@ -3448,7 +3476,7 @@ void
 i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
 			    int regnum, const gdb_byte *buf)
 {
-  gdb_byte raw_buf[MAX_REGISTER_SIZE];
+  gdb_byte raw_buf[I386_MAX_REGISTER_SIZE];
 
   if (i386_mmx_regnum_p (gdbarch, regnum))
     {
@@ -3572,9 +3600,6 @@ i386_pseudo_register_write (struct gdbar
 	}
       else if (i386_byte_regnum_p (gdbarch, regnum))
 	{
-	  /* Check byte pseudo registers last since this function will
-	     be called from amd64_pseudo_register_read, which handles
-	     byte pseudo registers differently.  */
 	  int gpnum = regnum - tdep->al_regnum;
 
 	  /* Read ...  We read both lower and upper registers.  */
@@ -3591,6 +3616,88 @@ i386_pseudo_register_write (struct gdbar
 	internal_error (__FILE__, __LINE__, _("invalid regnum"));
     }
 }
+
+/* Implement the 'ax_pseudo_register_collect' gdbarch method.  */
+
+int
+i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
+				 struct agent_expr *ax, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (i386_mmx_regnum_p (gdbarch, regnum))
+    {
+      /* MMX to FPU register mapping depends on current TOS.  Let's just
+	 not care and collect everything...  */
+      int i;
+
+      ax_reg_mask (ax, I387_FSTAT_REGNUM (tdep));
+      for (i = 0; i < 8; i++)
+	ax_reg_mask (ax, I387_ST0_REGNUM (tdep) + i);
+      return 0;
+    }
+  else if (i386_bnd_regnum_p (gdbarch, regnum))
+    {
+      regnum -= tdep->bnd0_regnum;
+      ax_reg_mask (ax, I387_BND0R_REGNUM (tdep) + regnum);
+      return 0;
+    }
+  else if (i386_k_regnum_p (gdbarch, regnum))
+    {
+      regnum -= tdep->k0_regnum;
+      ax_reg_mask (ax, tdep->k0_regnum + regnum);
+      return 0;
+    }
+  else if (i386_zmm_regnum_p (gdbarch, regnum))
+    {
+      regnum -= tdep->zmm0_regnum;
+      if (regnum < num_lower_zmm_regs)
+	{
+	  ax_reg_mask (ax, I387_XMM0_REGNUM (tdep) + regnum);
+	  ax_reg_mask (ax, tdep->ymm0h_regnum + regnum);
+	}
+      else
+	{
+	  ax_reg_mask (ax, I387_XMM16_REGNUM (tdep) + regnum
+			   - num_lower_zmm_regs);
+	  ax_reg_mask (ax, I387_YMM16H_REGNUM (tdep) + regnum
+			   - num_lower_zmm_regs);
+	}
+      ax_reg_mask (ax, tdep->zmm0h_regnum + regnum);
+      return 0;
+    }
+  else if (i386_ymm_regnum_p (gdbarch, regnum))
+    {
+      regnum -= tdep->ymm0_regnum;
+      ax_reg_mask (ax, I387_XMM0_REGNUM (tdep) + regnum);
+      ax_reg_mask (ax, tdep->ymm0h_regnum + regnum);
+      return 0;
+    }
+  else if (i386_ymm_avx512_regnum_p (gdbarch, regnum))
+    {
+      regnum -= tdep->ymm16_regnum;
+      ax_reg_mask (ax, I387_XMM16_REGNUM (tdep) + regnum);
+      ax_reg_mask (ax, tdep->ymm16h_regnum + regnum);
+      return 0;
+    }
+  else if (i386_word_regnum_p (gdbarch, regnum))
+    {
+      int gpnum = regnum - tdep->ax_regnum;
+
+      ax_reg_mask (ax, gpnum);
+      return 0;
+    }
+  else if (i386_byte_regnum_p (gdbarch, regnum))
+    {
+      int gpnum = regnum - tdep->al_regnum;
+
+      ax_reg_mask (ax, gpnum % 4);
+      return 0;
+    }
+  else
+    internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  return 1;
+}
 
 
 /* Return the register number of the register allocated by GCC after
@@ -3732,7 +3839,7 @@ i386_supply_gregset (const struct regset
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   gdb_assert (len >= tdep->sizeof_gregset);
@@ -3757,7 +3864,7 @@ i386_collect_gregset (const struct regse
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *) gregs;
   int i;
 
   gdb_assert (len >= tdep->sizeof_gregset);
@@ -4051,7 +4158,7 @@ i386_stap_parse_special_token_triplet (s
 	return 0;
 
       len = s - start - 1;
-      regname = alloca (len + 1);
+      regname = (char *) alloca (len + 1);
 
       strncpy (regname, start, len);
       regname[len] = '\0';
@@ -4161,7 +4268,7 @@ i386_stap_parse_special_token_three_arg_
 	return 0;
 
       len_base = s - start;
-      base = alloca (len_base + 1);
+      base = (char *) alloca (len_base + 1);
       strncpy (base, start, len_base);
       base[len_base] = '\0';
 
@@ -4176,7 +4283,7 @@ i386_stap_parse_special_token_three_arg_
 	++s;
 
       len_index = s - start;
-      index = alloca (len_index + 1);
+      index = (char *) alloca (len_index + 1);
       strncpy (index, start, len_index);
       index[len_index] = '\0';
 
@@ -4442,7 +4549,7 @@ i386_register_reggroup_p (struct gdbarch
       ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
       bndr_regnum_p, bnd_regnum_p, k_regnum_p, zmm_regnum_p, zmmh_regnum_p,
       zmm_avx512_regnum_p, mpx_ctrl_regnum_p, xmm_avx512_regnum_p,
-      avx512_p, avx_p, sse_p;
+      avx512_p, avx_p, sse_p, pkru_regnum_p;
 
   /* Don't include pseudo registers, except for MMX, in any register
      groups.  */
@@ -4459,6 +4566,7 @@ i386_register_reggroup_p (struct gdbarch
   if (group == i386_mmx_reggroup)
     return mmx_regnum_p;
 
+  pkru_regnum_p = i386_pkru_regnum_p(gdbarch, regnum);
   xmm_regnum_p = i386_xmm_regnum_p (gdbarch, regnum);
   xmm_avx512_regnum_p = i386_xmm_avx512_regnum_p (gdbarch, regnum);
   mxcsr_regnum_p = i386_mxcsr_regnum_p (gdbarch, regnum);
@@ -4469,11 +4577,11 @@ i386_register_reggroup_p (struct gdbarch
   ymm_avx512_regnum_p = i386_ymm_avx512_regnum_p (gdbarch, regnum);
   zmm_regnum_p = i386_zmm_regnum_p (gdbarch, regnum);
 
-  avx512_p = ((tdep->xcr0 & X86_XSTATE_AVX512_MASK)
-	      == X86_XSTATE_AVX512_MASK);
-  avx_p = ((tdep->xcr0 & X86_XSTATE_AVX512_MASK)
+  avx512_p = ((tdep->xcr0 & X86_XSTATE_AVX_AVX512_MASK)
+	      == X86_XSTATE_AVX_AVX512_MASK);
+  avx_p = ((tdep->xcr0 & X86_XSTATE_AVX_AVX512_MASK)
 	   == X86_XSTATE_AVX_MASK) && !avx512_p;
-  sse_p = ((tdep->xcr0 & X86_XSTATE_AVX512_MASK)
+  sse_p = ((tdep->xcr0 & X86_XSTATE_AVX_AVX512_MASK)
 	   == X86_XSTATE_SSE_MASK) && !avx512_p && ! avx_p;
 
   if (group == vector_reggroup)
@@ -4530,7 +4638,8 @@ i386_register_reggroup_p (struct gdbarch
 	    && !bnd_regnum_p
 	    && !mpx_ctrl_regnum_p
 	    && !zmm_regnum_p
-	    && !zmmh_regnum_p);
+	    && !zmmh_regnum_p
+	    && !pkru_regnum_p);
 
   return default_register_reggroup_p (gdbarch, regnum, group);
 }
@@ -4826,17 +4935,12 @@ i386_record_lea_modrm (struct i386_recor
     {
       if (record_full_memory_query)
         {
-	  int q;
-
-          target_terminal_ours ();
-          q = yquery (_("\
+          if (yquery (_("\
 Process record ignores the memory change of instruction at address %s\n\
 because it can't get the value of the segment register.\n\
 Do you want to stop the program?"),
-                      paddress (gdbarch, irp->orig_addr));
-            target_terminal_inferior ();
-            if (q)
-              return -1;
+                      paddress (gdbarch, irp->orig_addr)))
+	    return -1;
         }
 
       return 0;
@@ -4956,7 +5060,7 @@ i386_process_record (struct gdbarch *gdb
   uint32_t opcode;
   uint8_t opcode8;
   ULONGEST addr;
-  gdb_byte buf[MAX_REGISTER_SIZE];
+  gdb_byte buf[I386_MAX_REGISTER_SIZE];
   struct i386_record_s ir;
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   uint8_t rex_w = -1;
@@ -5420,14 +5524,36 @@ i386_process_record (struct gdbarch *gdb
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
       break;
 
-    case 0x0fc7:    /* cmpxchg8b */
+    case 0x0fc7:    /* cmpxchg8b / rdrand / rdseed */
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
 	{
-	  ir.addr -= 2;
-	  opcode = opcode << 8 | ir.modrm;
-	  goto no_support;
+	  /* rdrand and rdseed use the 3 bits of the REG field of ModR/M as
+	     an extended opcode.  rdrand has bits 110 (/6) and rdseed
+	     has bits 111 (/7).  */
+	  if (ir.reg == 6 || ir.reg == 7)
+	    {
+	      /* The storage register is described by the 3 R/M bits, but the
+		 REX.B prefix may be used to give access to registers
+		 R8~R15.  In this case ir.rex_b + R/M will give us the register
+		 in the range R8~R15.
+
+		 REX.W may also be used to access 64-bit registers, but we
+		 already record entire registers and not just partial bits
+		 of them.  */
+	      I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rex_b + ir.rm);
+	      /* These instructions also set conditional bits.  */
+	      I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
+	      break;
+	    }
+	  else
+	    {
+	      /* We don't handle this particular instruction yet.  */
+	      ir.addr -= 2;
+	      opcode = opcode << 8 | ir.modrm;
+	      goto no_support;
+	    }
 	}
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
@@ -5717,16 +5843,11 @@ i386_process_record (struct gdbarch *gdb
         {
           if (record_full_memory_query)
             {
-	      int q;
-
-              target_terminal_ours ();
-              q = yquery (_("\
+              if (yquery (_("\
 Process record ignores the memory change of instruction at address %s\n\
 because it can't get the value of the segment register.\n\
 Do you want to stop the program?"),
-                          paddress (gdbarch, ir.orig_addr));
-              target_terminal_inferior ();
-              if (q)
+                          paddress (gdbarch, ir.orig_addr)))
                 return -1;
             }
 	}
@@ -6391,16 +6512,11 @@ Do you want to stop the program?"),
               /* addr += ((uint32_t) read_register (I386_ES_REGNUM)) << 4; */
               if (record_full_memory_query)
                 {
-	          int q;
-
-                  target_terminal_ours ();
-                  q = yquery (_("\
+                  if (yquery (_("\
 Process record ignores the memory change of instruction at address %s\n\
 because it can't get the value of the segment register.\n\
 Do you want to stop the program?"),
-                              paddress (gdbarch, ir.orig_addr));
-                  target_terminal_inferior ();
-                  if (q)
+                              paddress (gdbarch, ir.orig_addr)))
                     return -1;
                 }
             }
@@ -6946,17 +7062,12 @@ Do you want to stop the program?"),
 	      {
                 if (record_full_memory_query)
                   {
-	            int q;
-
-                    target_terminal_ours ();
-                    q = yquery (_("\
+                    if (yquery (_("\
 Process record ignores the memory change of instruction at address %s\n\
 because it can't get the value of the segment register.\n\
 Do you want to stop the program?"),
-                                paddress (gdbarch, ir.orig_addr));
-                    target_terminal_inferior ();
-                    if (q)
-                      return -1;
+                                paddress (gdbarch, ir.orig_addr)))
+		      return -1;
                   }
 	      }
 	    else
@@ -7003,16 +7114,11 @@ Do you want to stop the program?"),
 		{
                   if (record_full_memory_query)
                     {
-	              int q;
-
-                      target_terminal_ours ();
-                      q = yquery (_("\
+                      if (yquery (_("\
 Process record ignores the memory change of instruction at address %s\n\
 because it can't get the value of the segment register.\n\
 Do you want to stop the program?"),
-                                  paddress (gdbarch, ir.orig_addr));
-                      target_terminal_inferior ();
-                      if (q)
+                                  paddress (gdbarch, ir.orig_addr)))
                         return -1;
                     }
 		}
@@ -8045,11 +8151,10 @@ static const int i386_record_regmap[] =
    string.  */
 
 static int
-i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
-			       CORE_ADDR addr, int *isize, char **msg)
+i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
+			       char **msg)
 {
   int len, jumplen;
-  static struct ui_file *gdb_null = NULL;
 
   /*  Ask the target for the minimum instruction length supported.  */
   jumplen = target_get_min_fast_tracepoint_insn_len ();
@@ -8072,14 +8177,8 @@ i386_fast_tracepoint_valid_at (struct gd
       jumplen = (register_size (gdbarch, 0) == 8) ? 5 : 4;
     }
 
-  /* Dummy file descriptor for the disassembler.  */
-  if (!gdb_null)
-    gdb_null = ui_file_new ();
-
   /* Check for fit.  */
-  len = gdb_print_insn (gdbarch, addr, gdb_null, NULL);
-  if (isize)
-    *isize = len;
+  len = gdb_insn_length (gdbarch, addr);
 
   if (len < jumplen)
     {
@@ -8099,6 +8198,23 @@ i386_fast_tracepoint_valid_at (struct gd
     }
 }
 
+/* Return a floating-point format for a floating-point variable of
+   length LEN in bits.  If non-NULL, NAME is the name of its type.
+   If no suitable type is found, return NULL.  */
+
+const struct floatformat **
+i386_floatformat_for_type (struct gdbarch *gdbarch,
+			   const char *name, int len)
+{
+  if (len == 128 && name)
+    if (strcmp (name, "__float128") == 0
+	|| strcmp (name, "_Float128") == 0
+	|| strcmp (name, "complex _Float128") == 0)
+      return floatformats_ia64_quad;
+
+  return default_floatformat_for_type (gdbarch, name, len);
+}
+
 static int
 i386_validate_tdesc_p (struct gdbarch_tdep *tdep,
 		       struct tdesc_arch_data *tdesc_data)
@@ -8107,7 +8223,7 @@ i386_validate_tdesc_p (struct gdbarch_td
   const struct tdesc_feature *feature_core;
 
   const struct tdesc_feature *feature_sse, *feature_avx, *feature_mpx,
-			     *feature_avx512;
+			     *feature_avx512, *feature_pkeys;
   int i, num_regs, valid_p;
 
   if (! tdesc_has_registers (tdesc))
@@ -8130,6 +8246,9 @@ i386_validate_tdesc_p (struct gdbarch_td
   /* Try AVX512 registers.  */
   feature_avx512 = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx512");
 
+  /* Try PKEYS  */
+  feature_pkeys = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.pkeys");
+
   valid_p = 1;
 
   /* The XCR0 bits.  */
@@ -8139,7 +8258,7 @@ i386_validate_tdesc_p (struct gdbarch_td
       if (!feature_avx)
 	return 0;
 
-      tdep->xcr0 = X86_XSTATE_MPX_AVX512_MASK;
+      tdep->xcr0 = X86_XSTATE_AVX_AVX512_MASK;
 
       /* It may have been set by OSABI initialization function.  */
       if (tdep->k0_regnum < 0)
@@ -8236,10 +8355,28 @@ i386_validate_tdesc_p (struct gdbarch_td
 	    tdep->mpx_register_names[i]);
     }
 
+  if (feature_pkeys)
+    {
+      tdep->xcr0 |= X86_XSTATE_PKRU;
+      if (tdep->pkru_regnum < 0)
+	{
+	  tdep->pkeys_register_names = i386_pkeys_names;
+	  tdep->pkru_regnum = I386_PKRU_REGNUM;
+	  tdep->num_pkeys_regs = 1;
+	}
+
+      for (i = 0; i < I387_NUM_PKEYS_REGS; i++)
+	valid_p &= tdesc_numbered_register (feature_pkeys, tdesc_data,
+					    I387_PKRU_REGNUM (tdep) + i,
+					    tdep->pkeys_register_names[i]);
+    }
+
   return valid_p;
 }
 
 
+/* Note: This is called for both i386 and amd64.  */
+
 static struct gdbarch *
 i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
@@ -8251,15 +8388,13 @@ i386_gdbarch_init (struct gdbarch_info i
   int ymm0_regnum;
   int bnd0_regnum;
   int num_bnd_cooked;
-  int k0_regnum;
-  int zmm0_regnum;
 
   /* If there is already a candidate, use it.  */
   arches = gdbarch_list_lookup_by_info (arches, &info);
   if (arches != NULL)
     return arches->gdbarch;
 
-  /* Allocate space for the new architecture.  */
+  /* Allocate space for the new architecture.  Assume i386 for now.  */
   tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
@@ -8310,6 +8445,9 @@ i386_gdbarch_init (struct gdbarch_info i
      alignment.  */
   set_gdbarch_long_double_bit (gdbarch, 96);
 
+  /* Support for floating-point data type variants.  */
+  set_gdbarch_floatformat_for_type (gdbarch, i386_floatformat_for_type);
+
   /* Register numbers of various important registers.  */
   set_gdbarch_sp_regnum (gdbarch, I386_ESP_REGNUM); /* %esp */
   set_gdbarch_pc_regnum (gdbarch, I386_EIP_REGNUM); /* %eip */
@@ -8351,7 +8489,7 @@ i386_gdbarch_init (struct gdbarch_info i
   set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum);
 
   /* Use the SVR4 register numbering scheme for DWARF 2.  */
-  set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
+  set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_dwarf_reg_to_regnum);
 
   /* We don't set gdbarch_stab_reg_to_regnum, since ECOFF doesn't seem to
      be in use on any of the supported i386 targets.  */
@@ -8377,7 +8515,9 @@ i386_gdbarch_init (struct gdbarch_info i
   /* Stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, i386_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, i386_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, i386_breakpoint::bp_from_kind);
+
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
   set_gdbarch_max_insn_length (gdbarch, I386_MAX_INSN_LEN);
 
@@ -8413,6 +8553,8 @@ i386_gdbarch_init (struct gdbarch_info i
   set_gdbarch_pseudo_register_read_value (gdbarch,
 					  i386_pseudo_register_read_value);
   set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write);
+  set_gdbarch_ax_pseudo_register_collect (gdbarch,
+					  i386_ax_pseudo_register_collect);
 
   set_tdesc_pseudo_register_type (gdbarch, i386_pseudo_register_type);
   set_tdesc_pseudo_register_name (gdbarch, i386_pseudo_register_name);
@@ -8424,7 +8566,7 @@ i386_gdbarch_init (struct gdbarch_info i
   /* Even though the default ABI only includes general-purpose registers,
      floating-point registers and the SSE registers, we have to leave a
      gap for the upper AVX, MPX and AVX512 registers.  */
-  set_gdbarch_num_regs (gdbarch, I386_AVX512_NUM_REGS);
+  set_gdbarch_num_regs (gdbarch, I386_PKEYS_NUM_REGS);
 
   set_gdbarch_gnu_triplet_regexp (gdbarch, i386_gnu_triplet_regexp);
 
@@ -8469,6 +8611,10 @@ i386_gdbarch_init (struct gdbarch_info i
   tdep->num_ymm_avx512_regs = 0;
   tdep->num_xmm_avx512_regs = 0;
 
+  /* No PKEYS registers  */
+  tdep->pkru_regnum = -1;
+  tdep->num_pkeys_regs = 0;
+
   tdesc_data = tdesc_data_alloc ();
 
   set_gdbarch_relocate_instruction (gdbarch, i386_relocate_instruction);
@@ -8479,8 +8625,10 @@ i386_gdbarch_init (struct gdbarch_info i
   set_gdbarch_insn_is_ret (gdbarch, i386_insn_is_ret);
   set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump);
 
-  /* Hook in ABI-specific overrides, if they have been registered.  */
-  info.tdep_info = (void *) tdesc_data;
+  /* Hook in ABI-specific overrides, if they have been registered.
+     Note: If INFO specifies a 64 bit arch, this is where we turn
+     a 32-bit i386 into a 64-bit amd64.  */
+  info.tdep_info = tdesc_data;
   gdbarch_init_osabi (info, gdbarch);
 
   if (!i386_validate_tdesc_p (tdep, tdesc_data))
@@ -8605,9 +8753,12 @@ i386_target_description (uint64_t xcr0)
 {
   switch (xcr0 & X86_XSTATE_ALL_MASK)
     {
-    case X86_XSTATE_MPX_AVX512_MASK:
-    case X86_XSTATE_AVX512_MASK:
-      return tdesc_i386_avx512;
+    case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+      return tdesc_i386_avx_mpx_avx512_pku;
+    case X86_XSTATE_AVX_AVX512_MASK:
+      return tdesc_i386_avx_avx512;
+    case X86_XSTATE_AVX_MPX_MASK:
+      return tdesc_i386_avx_mpx;
     case X86_XSTATE_MPX_MASK:
       return tdesc_i386_mpx;
     case X86_XSTATE_AVX_MASK:
@@ -8628,7 +8779,6 @@ i386_mpx_bd_base (void)
   struct gdbarch_tdep *tdep;
   ULONGEST ret;
   enum register_status regstatus;
-  struct gdb_exception except;
 
   rcache = get_current_regcache ();
   tdep = gdbarch_tdep (get_regcache_arch (rcache));
@@ -8641,9 +8791,7 @@ i386_mpx_bd_base (void)
   return ret & MPX_BASE_MASK;
 }
 
-/* Check if the current target is MPX enabled.  */
-
-static int
+int
 i386_mpx_enabled (void)
 {
   const struct gdbarch_tdep *tdep = gdbarch_tdep (get_current_arch ());
@@ -8684,7 +8832,8 @@ i386_mpx_get_bt_entry (CORE_ADDR ptr, CO
       bt_mask = (CORE_ADDR) MPX_BT_MASK;
 
       if ( sizeof (CORE_ADDR) == 4)
-	error (_("operation not supported"));
+	error (_("bound table examination not supported\
+ for 64-bit process with 32-bit GDB"));
     }
   else
     {
@@ -8725,22 +8874,22 @@ i386_mpx_print_bounds (const CORE_ADDR b
 
   if (bounds_in_map == 1)
     {
-      ui_out_text (uiout, "Null bounds on map:");
-      ui_out_text (uiout, " pointer value = ");
-      ui_out_field_core_addr (uiout, "pointer-value", gdbarch, bt_entry[2]);
-      ui_out_text (uiout, ".");
-      ui_out_text (uiout, "\n");
+      uiout->text ("Null bounds on map:");
+      uiout->text (" pointer value = ");
+      uiout->field_core_addr ("pointer-value", gdbarch, bt_entry[2]);
+      uiout->text (".");
+      uiout->text ("\n");
     }
   else
     {
-      ui_out_text (uiout, "{lbound = ");
-      ui_out_field_core_addr (uiout, "lower-bound", gdbarch, bt_entry[0]);
-      ui_out_text (uiout, ", ubound = ");
+      uiout->text ("{lbound = ");
+      uiout->field_core_addr ("lower-bound", gdbarch, bt_entry[0]);
+      uiout->text (", ubound = ");
 
       /* The upper bound is stored in 1's complement.  */
-      ui_out_field_core_addr (uiout, "upper-bound", gdbarch, ~bt_entry[1]);
-      ui_out_text (uiout, "}: pointer value = ");
-      ui_out_field_core_addr (uiout, "pointer-value", gdbarch, bt_entry[2]);
+      uiout->field_core_addr ("upper-bound", gdbarch, ~bt_entry[1]);
+      uiout->text ("}: pointer value = ");
+      uiout->field_core_addr ("pointer-value", gdbarch, bt_entry[2]);
 
       if (gdbarch_ptr_bit (gdbarch) == 64)
 	size = ( (~(int64_t) bt_entry[1]) - (int64_t) bt_entry[0]);
@@ -8752,12 +8901,12 @@ i386_mpx_print_bounds (const CORE_ADDR b
 	 one to the size.  */
 
       size = (size > -1 ? size + 1 : size);
-      ui_out_text (uiout, ", size = ");
-      ui_out_field_fmt (uiout, "size", "%s", plongest (size));
+      uiout->text (", size = ");
+      uiout->field_fmt ("size", "%s", plongest (size));
 
-      ui_out_text (uiout, ", metadata = ");
-      ui_out_field_core_addr (uiout, "metadata", gdbarch, bt_entry[3]);
-      ui_out_text (uiout, "\n");
+      uiout->text (", metadata = ");
+      uiout->field_core_addr ("metadata", gdbarch, bt_entry[3]);
+      uiout->text ("\n");
     }
 }
 
@@ -8774,12 +8923,19 @@ i386_mpx_info_bounds (char *args, int fr
   struct gdbarch *gdbarch = get_current_arch ();
   struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
 
-  if (!i386_mpx_enabled ())
-    error (_("Intel(R) Memory Protection Extensions not\
- supported on this target."));
+  if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386
+      || !i386_mpx_enabled ())
+    {
+      printf_unfiltered (_("Intel Memory Protection Extensions not "
+			   "supported on this target.\n"));
+      return;
+    }
 
   if (args == NULL)
-    error (_("Address of pointer variable expected."));
+    {
+      printf_unfiltered (_("Address of pointer variable expected.\n"));
+      return;
+    }
 
   addr = parse_and_eval_address (args);
 
@@ -8790,7 +8946,7 @@ i386_mpx_info_bounds (char *args, int fr
 
   for (i = 0; i < 4; i++)
     bt_entry[i] = read_memory_typed_address (bt_entry_addr
-					     + i * data_ptr_type->length,
+					     + i * TYPE_LENGTH (data_ptr_type),
 					     data_ptr_type);
 
   i386_mpx_print_bounds (bt_entry);
@@ -8811,8 +8967,9 @@ i386_mpx_set_bounds (char *args, int fro
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
 
-  if (!i386_mpx_enabled ())
-    error (_("Intel(R) Memory Protection Extensions not supported\
+  if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386
+      || !i386_mpx_enabled ())
+    error (_("Intel Memory Protection Extensions not supported\
  on this target."));
 
   if (args == NULL)
@@ -8836,14 +8993,15 @@ i386_mpx_set_bounds (char *args, int fro
   bt_entry_addr = i386_mpx_get_bt_entry (addr, bd_base);
   for (i = 0; i < 2; i++)
     bt_entry[i] = read_memory_typed_address (bt_entry_addr
-					     + i * data_ptr_type->length,
+					     + i * TYPE_LENGTH (data_ptr_type),
 					     data_ptr_type);
   bt_entry[0] = (uint64_t) lower;
   bt_entry[1] = ~(uint64_t) upper;
 
   for (i = 0; i < 2; i++)
-    write_memory_unsigned_integer (bt_entry_addr + i * data_ptr_type->length,
-				   data_ptr_type->length, byte_order,
+    write_memory_unsigned_integer (bt_entry_addr
+				   + i * TYPE_LENGTH (data_ptr_type),
+				   TYPE_LENGTH (data_ptr_type), byte_order,
 				   bt_entry[i]);
 }
 
@@ -8854,7 +9012,7 @@ static struct cmd_list_element *mpx_set_
 static void
 set_mpx_cmd (char *args, int from_tty)
 {
-  help_list (mpx_set_cmdlist, "set mpx", all_commands, gdb_stdout);
+  help_list (mpx_set_cmdlist, "set mpx ", all_commands, gdb_stdout);
 }
 
 /* Helper function for the CLI commands.  */
@@ -8898,14 +9056,14 @@ is \"default\"."),
   /* Add "mpx" prefix for the set commands.  */
 
   add_prefix_cmd ("mpx", class_support, set_mpx_cmd, _("\
-Set Intel(R) Memory Protection Extensions specific variables."),
-		  &mpx_set_cmdlist, "set tdesc ",
+Set Intel Memory Protection Extensions specific variables."),
+		  &mpx_set_cmdlist, "set mpx ",
 		  0 /* allow-unknown */, &setlist);
 
   /* Add "mpx" prefix for the show commands.  */
 
   add_prefix_cmd ("mpx", class_support, show_mpx_cmd, _("\
-Show Intel(R) Memory Protection Extensions specific variables."),
+Show Intel Memory Protection Extensions specific variables."),
 		  &mpx_show_cmdlist, "show mpx ",
 		  0 /* allow-unknown */, &showlist);
 
@@ -8939,7 +9097,9 @@ Show Intel(R) Memory Protection Extensio
   initialize_tdesc_i386_mmx ();
   initialize_tdesc_i386_avx ();
   initialize_tdesc_i386_mpx ();
-  initialize_tdesc_i386_avx512 ();
+  initialize_tdesc_i386_avx_mpx ();
+  initialize_tdesc_i386_avx_avx512 ();
+  initialize_tdesc_i386_avx_mpx_avx512_pku ();
 
   /* Tell remote stub that we support XML target description.  */
   register_remote_support_xml ("i386");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-tdep.h ./gdb/i386-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the i386.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -189,11 +189,20 @@ struct gdbarch_tdep
   /* YMM16-31 register names.  Only used for tdesc_numbered_register.  */
   const char **ymm_avx512_register_names;
 
+  /* Number of PKEYS registers.  */
+  int num_pkeys_regs;
+
+  /* Register number for PKRU register.  */
+  int pkru_regnum;
+
+  /* PKEYS register names.  */
+  const char **pkeys_register_names;
+
   /* Target description.  */
   const struct target_desc *tdesc;
 
   /* Register group function.  */
-  const void *register_reggroup_p;
+  gdbarch_register_reggroup_p_ftype *register_reggroup_p;
 
   /* Offset of saved PC in jmp_buf.  */
   int jb_pc_offset;
@@ -284,7 +293,8 @@ enum i386_regnum
   I386_K0_REGNUM,		/* %k0 */
   I386_K7_REGNUM = I386_K0_REGNUM + 7,
   I386_ZMM0H_REGNUM,		/* %zmm0h */
-  I386_ZMM7H_REGNUM = I386_ZMM0H_REGNUM + 7
+  I386_ZMM7H_REGNUM = I386_ZMM0H_REGNUM + 7,
+  I386_PKRU_REGNUM
 };
 
 /* Register numbers of RECORD_REGMAP.  */
@@ -324,6 +334,7 @@ enum record_i386_regnum
 #define I386_AVX_NUM_REGS	(I386_YMM7H_REGNUM + 1)
 #define I386_MPX_NUM_REGS	(I386_BNDSTATUS_REGNUM + 1)
 #define I386_AVX512_NUM_REGS	(I386_ZMM7H_REGNUM + 1)
+#define I386_PKEYS_NUM_REGS	(I386_PKRU_REGNUM + 1)
 
 /* Size of the largest register.  */
 #define I386_MAX_REGISTER_SIZE	64
@@ -345,6 +356,7 @@ extern int i386_bnd_regnum_p (struct gdb
 extern int i386_k_regnum_p (struct gdbarch *gdbarch, int regnum);
 extern int i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum);
 extern int i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum);
+extern bool i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum);
 
 extern const char *i386_pseudo_register_name (struct gdbarch *gdbarch,
 					      int regnum);
@@ -360,6 +372,10 @@ extern void i386_pseudo_register_write (
 					struct regcache *regcache,
 					int regnum, const gdb_byte *buf);
 
+extern int i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
+					    struct agent_expr *ax,
+					    int regnum);
+
 /* Segment selectors.  */
 #define I386_SEL_RPL	0x0003  /* Requester's Privilege Level mask.  */
 #define I386_SEL_UPL	0x0003	/* User Privilige Level.  */
@@ -420,9 +436,11 @@ extern int i386_process_record (struct g
                                 struct regcache *regcache, CORE_ADDR addr);
 extern const struct target_desc *i386_target_description (uint64_t xcr0);
 
+/* Return true iff the current target is MPX enabled.  */
+extern int i386_mpx_enabled (void);
 
 
-/* Functions and variables exported from i386bsd-tdep.c.  */
+/* Functions and variables exported from i386-bsd-tdep.c.  */
 
 extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
 extern CORE_ADDR i386fbsd_sigtramp_start_addr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-v4-nat.c ./gdb/i386-v4-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-v4-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/i386-v4-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,163 @@
+/* Native-dependent code for Unix SVR4 running on i386's.
+
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "value.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+
+#ifdef HAVE_SYS_PROCFS_H
+
+#include <sys/procfs.h>
+
+/* We must not compile this code for 64-bit Solaris x86.  */
+#if !defined (PR_MODEL_NATIVE) || (PR_MODEL_NATIVE == PR_MODEL_ILP32)
+
+#include "gregset.h"
+
+/* The `/proc' interface divides the target machine's register set up
+   into two different sets, the general purpose register set (gregset)
+   and the floating-point register set (fpregset).  For each set,
+   there is an ioctl to get the current register set and another ioctl
+   to set the current values.
+
+   The actual structure passed through the ioctl interface is, of
+   course, naturally machine dependent, and is different for each set
+   of registers.  For the i386 for example, the general-purpose
+   register set is typically defined by:
+
+   typedef int gregset_t[19];           (in <sys/regset.h>)
+
+   #define GS   0                       (in <sys/reg.h>)
+   #define FS   1
+   ...
+   #define UESP 17
+   #define SS   18
+
+   and the floating-point set by:
+
+   typedef struct fpregset   {
+           union {
+                   struct fpchip_state            // fp extension state //
+                   {
+                           int     state[27];     // 287/387 saved state //
+                           int     status;        // status word saved at //
+                                                  // exception //
+                   } fpchip_state;
+                   struct fp_emul_space           // for emulators //
+                   {
+                           char    fp_emul[246];
+                           char    fp_epad[2];
+                   } fp_emul_space;
+                   int     f_fpregs[62];          // union of the above //
+           } fp_reg_set;
+           long            f_wregs[33];           // saved weitek state //
+   } fpregset_t;
+
+   Incidentally fpchip_state contains the FPU state in the same format
+   as used by the "fsave" instruction, and that's the only thing we
+   support here.  I don't know how the emulator stores it state.  The
+   Weitek stuff definitely isn't supported.
+
+   The routines defined here, provide the packing and unpacking of
+   gregset_t and fpregset_t formatted data.  */
+
+#ifdef HAVE_GREGSET_T
+
+/* Mapping between the general-purpose registers in `/proc'
+   format and GDB's register array layout.  */
+static int regmap[] =
+{
+  EAX, ECX, EDX, EBX,
+  UESP, EBP, ESI, EDI,
+  EIP, EFL, CS, SS,
+  DS, ES, FS, GS
+};
+
+/* Fill GDB's register array with the general-purpose register values
+   in *GREGSETP.  */
+
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+  const greg_t *regp = (const greg_t *) gregsetp;
+  int regnum;
+
+  for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
+    regcache_raw_supply (regcache, regnum, regp + regmap[regnum]);
+}
+
+/* Fill register REGNUM (if it is a general-purpose register) in
+   *GREGSETPS with the value in GDB's register array.  If REGNUM is -1,
+   do this for all registers.  */
+
+void
+fill_gregset (const struct regcache *regcache,
+	      gregset_t *gregsetp, int regnum)
+{
+  greg_t *regp = (greg_t *) gregsetp;
+  int i;
+
+  for (i = 0; i < I386_NUM_GREGS; i++)
+    if (regnum == -1 || regnum == i)
+      regcache_raw_collect (regcache, i, regp + regmap[i]);
+}
+
+#endif /* HAVE_GREGSET_T */
+
+#ifdef HAVE_FPREGSET_T
+
+/* Fill GDB's register array with the floating-point register values in
+   *FPREGSETP.  */
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{
+  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
+    return;
+
+  i387_supply_fsave (regcache, -1, fpregsetp);
+}
+
+/* Fill register REGNO (if it is a floating-point register) in
+   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
+
+void
+fill_fpregset (const struct regcache *regcache,
+	       fpregset_t *fpregsetp, int regno)
+{
+  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
+    return;
+
+  i387_collect_fsave (regcache, regno, fpregsetp);
+}
+
+#endif /* HAVE_FPREGSET_T */
+
+#endif /* not 64-bit.  */
+
+#endif /* HAVE_SYS_PROCFS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386v4-nat.c ./gdb/i386v4-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386v4-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386v4-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,163 +0,0 @@
-/* Native-dependent code for Unix SVR4 running on i386's.
-
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "value.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
-#include "i386-tdep.h"
-#include "i387-tdep.h"
-
-#ifdef HAVE_SYS_PROCFS_H
-
-#include <sys/procfs.h>
-
-/* We must not compile this code for 64-bit Solaris x86.  */
-#if !defined (PR_MODEL_NATIVE) || (PR_MODEL_NATIVE == PR_MODEL_ILP32)
-
-#include "gregset.h"
-
-/* The `/proc' interface divides the target machine's register set up
-   into two different sets, the general purpose register set (gregset)
-   and the floating-point register set (fpregset).  For each set,
-   there is an ioctl to get the current register set and another ioctl
-   to set the current values.
-
-   The actual structure passed through the ioctl interface is, of
-   course, naturally machine dependent, and is different for each set
-   of registers.  For the i386 for example, the general-purpose
-   register set is typically defined by:
-
-   typedef int gregset_t[19];           (in <sys/regset.h>)
-
-   #define GS   0                       (in <sys/reg.h>)
-   #define FS   1
-   ...
-   #define UESP 17
-   #define SS   18
-
-   and the floating-point set by:
-
-   typedef struct fpregset   {
-           union {
-                   struct fpchip_state            // fp extension state //
-                   {
-                           int     state[27];     // 287/387 saved state //
-                           int     status;        // status word saved at //
-                                                  // exception //
-                   } fpchip_state;
-                   struct fp_emul_space           // for emulators //
-                   {
-                           char    fp_emul[246];
-                           char    fp_epad[2];
-                   } fp_emul_space;
-                   int     f_fpregs[62];          // union of the above //
-           } fp_reg_set;
-           long            f_wregs[33];           // saved weitek state //
-   } fpregset_t;
-
-   Incidentally fpchip_state contains the FPU state in the same format
-   as used by the "fsave" instruction, and that's the only thing we
-   support here.  I don't know how the emulator stores it state.  The
-   Weitek stuff definitely isn't supported.
-
-   The routines defined here, provide the packing and unpacking of
-   gregset_t and fpregset_t formatted data.  */
-
-#ifdef HAVE_GREGSET_T
-
-/* Mapping between the general-purpose registers in `/proc'
-   format and GDB's register array layout.  */
-static int regmap[] =
-{
-  EAX, ECX, EDX, EBX,
-  UESP, EBP, ESI, EDI,
-  EIP, EFL, CS, SS,
-  DS, ES, FS, GS
-};
-
-/* Fill GDB's register array with the general-purpose register values
-   in *GREGSETP.  */
-
-void
-supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
-{
-  const greg_t *regp = (const greg_t *) gregsetp;
-  int regnum;
-
-  for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
-    regcache_raw_supply (regcache, regnum, regp + regmap[regnum]);
-}
-
-/* Fill register REGNUM (if it is a general-purpose register) in
-   *GREGSETPS with the value in GDB's register array.  If REGNUM is -1,
-   do this for all registers.  */
-
-void
-fill_gregset (const struct regcache *regcache,
-	      gregset_t *gregsetp, int regnum)
-{
-  greg_t *regp = (greg_t *) gregsetp;
-  int i;
-
-  for (i = 0; i < I386_NUM_GREGS; i++)
-    if (regnum == -1 || regnum == i)
-      regcache_raw_collect (regcache, i, regp + regmap[i]);
-}
-
-#endif /* HAVE_GREGSET_T */
-
-#ifdef HAVE_FPREGSET_T
-
-/* Fill GDB's register array with the floating-point register values in
-   *FPREGSETP.  */
-
-void
-supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
-{
-  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
-    return;
-
-  i387_supply_fsave (regcache, -1, fpregsetp);
-}
-
-/* Fill register REGNO (if it is a floating-point register) in
-   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
-   do this for all registers.  */
-
-void
-fill_fpregset (const struct regcache *regcache,
-	       fpregset_t *fpregsetp, int regno)
-{
-  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
-    return;
-
-  i387_collect_fsave (regcache, regno, fpregsetp);
-}
-
-#endif /* HAVE_FPREGSET_T */
-
-#endif /* not 64-bit.  */
-
-#endif /* HAVE_SYS_PROCFS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-windows-nat.c ./gdb/i386-windows-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i386-windows-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i386-windows-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i387-tdep.c ./gdb/i387-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i387-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i387-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Intel 387 floating point stuff.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -449,7 +449,7 @@ i387_supply_fsave (struct regcache *regc
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  const gdb_byte *regs = fsave;
+  const gdb_byte *regs = (const gdb_byte *) fsave;
   int i;
 
   gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -502,7 +502,7 @@ void
 i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
-  gdb_byte *regs = fsave;
+  gdb_byte *regs = (gdb_byte *) fsave;
   int i;
 
   gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -595,7 +595,7 @@ void
 i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
-  const gdb_byte *regs = fxsave;
+  const gdb_byte *regs = (const gdb_byte *) fxsave;
   int i;
 
   gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -678,7 +678,7 @@ void
 i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
-  gdb_byte *regs = fxsave;
+  gdb_byte *regs = (gdb_byte *) fxsave;
   int i;
 
   gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -888,6 +888,19 @@ static int xsave_avx512_zmm_h_offset[] =
 #define XSAVE_AVX512_ZMM_H_ADDR(tdep, xsave, regnum) \
   (xsave + xsave_avx512_zmm_h_offset[regnum - I387_ZMM0H_REGNUM (tdep)])
 
+/* At xsave_pkeys_offset[REGNUM] you find the offset to the location
+   of the PKRU register data structure used by the "xsave"
+   instruction where GDB register REGNUM is stored.  */
+
+static int xsave_pkeys_offset[] =
+{
+2688 + 0 * 8		/* %pkru (64 bits in XSTATE, 32-bit actually used by
+			   instructions and applications).  */
+};
+
+#define XSAVE_PKEYS_ADDR(tdep, xsave, regnum) \
+  (xsave + xsave_pkeys_offset[regnum - I387_PKRU_REGNUM (tdep)])
+
 /* Similar to i387_supply_fxsave, but use XSAVE extended state.  */
 
 void
@@ -896,10 +909,10 @@ i387_supply_xsave (struct regcache *regc
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  const gdb_byte *regs = xsave;
+  const gdb_byte *regs = (const gdb_byte *) xsave;
   int i;
-  unsigned int clear_bv;
-  static const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 };
+  ULONGEST clear_bv;
+  static const gdb_byte zero[I386_MAX_REGISTER_SIZE] = { 0 };
   enum
     {
       none = 0x0,
@@ -911,8 +924,9 @@ i387_supply_xsave (struct regcache *regc
       avx512_zmm_h = 0x20,
       avx512_ymmh_avx512 = 0x40,
       avx512_xmm_avx512 = 0x80,
+      pkeys = 0x100,
       all = x87 | sse | avxh | mpx | avx512_k | avx512_zmm_h
-	    | avx512_ymmh_avx512 | avx512_xmm_avx512
+	    | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
     } regclass;
 
   gdb_assert (regs != NULL);
@@ -921,6 +935,9 @@ i387_supply_xsave (struct regcache *regc
 
   if (regnum == -1)
     regclass = all;
+  else if (regnum >= I387_PKRU_REGNUM (tdep)
+	   && regnum < I387_PKEYSEND_REGNUM (tdep))
+    regclass = pkeys;
   else if (regnum >= I387_ZMM0H_REGNUM (tdep)
 	   && regnum < I387_ZMMENDH_REGNUM (tdep))
     regclass = avx512_zmm_h;
@@ -950,12 +967,15 @@ i387_supply_xsave (struct regcache *regc
 
   if (regclass != none)
     {
-      /* Get `xstat_bv'.  */
-      const gdb_byte *xstate_bv_p = XSAVE_XSTATE_BV_ADDR (regs);
+      /* Get `xstat_bv'.  The supported bits in `xstat_bv' are 8 bytes.  */
+      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+      ULONGEST xstate_bv = 0;
+
+      xstate_bv = extract_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
+					    8, byte_order);
 
-      /* The supported bits in `xstat_bv' are 1 byte.  Clear part in
-	 vector registers if its bit in xstat_bv is zero.  */
-      clear_bv = (~(*xstate_bv_p)) & tdep->xcr0;
+      /* Clear part in vector registers if its bit in xstat_bv is zero.  */
+      clear_bv = (~(xstate_bv)) & tdep->xcr0;
     }
   else
     clear_bv = X86_XSTATE_ALL_MASK;
@@ -974,6 +994,14 @@ i387_supply_xsave (struct regcache *regc
     case none:
       break;
 
+    case pkeys:
+      if ((clear_bv & X86_XSTATE_PKRU))
+	regcache_raw_supply (regcache, regnum, zero);
+      else
+	regcache_raw_supply (regcache, regnum,
+			     XSAVE_PKEYS_ADDR (tdep, regs, regnum));
+      return;
+
     case avx512_zmm_h:
       if ((clear_bv & (X86_XSTATE_ZMM_H | X86_XSTATE_ZMM)))
 	regcache_raw_supply (regcache, regnum, zero);
@@ -1039,6 +1067,26 @@ i387_supply_xsave (struct regcache *regc
       return;
 
     case all:
+      /* Handle PKEYS registers.  */
+      if ((tdep->xcr0 & X86_XSTATE_PKRU))
+	{
+	  if ((clear_bv & X86_XSTATE_PKRU))
+	    {
+	      for (i = I387_PKRU_REGNUM (tdep);
+		   i < I387_PKEYSEND_REGNUM (tdep);
+		   i++)
+		regcache_raw_supply (regcache, i, zero);
+	    }
+	  else
+	    {
+	      for (i = I387_PKRU_REGNUM (tdep);
+		   i < I387_PKEYSEND_REGNUM (tdep);
+		   i++)
+		regcache_raw_supply (regcache, i,
+				     XSAVE_PKEYS_ADDR (tdep, regs, i));
+	    }
+	}
+
       /* Handle the upper ZMM registers.  */
       if ((tdep->xcr0 & (X86_XSTATE_ZMM_H | X86_XSTATE_ZMM)))
 	{
@@ -1269,7 +1317,7 @@ i387_collect_xsave (const struct regcach
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  gdb_byte *regs = xsave;
+  gdb_byte *regs = (gdb_byte *) xsave;
   int i;
   enum
     {
@@ -1283,8 +1331,9 @@ i387_collect_xsave (const struct regcach
       avx512_zmm_h = 0x40 | check,
       avx512_ymmh_avx512 = 0x80 | check,
       avx512_xmm_avx512 = 0x100 | check,
+      pkeys = 0x200 | check,
       all = x87 | sse | avxh | mpx | avx512_k | avx512_zmm_h
-	    | avx512_ymmh_avx512 | avx512_xmm_avx512
+	    | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
     } regclass;
 
   gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -1292,6 +1341,9 @@ i387_collect_xsave (const struct regcach
 
   if (regnum == -1)
     regclass = all;
+  else if (regnum >= I387_PKRU_REGNUM (tdep)
+	   && regnum < I387_PKEYSEND_REGNUM (tdep))
+    regclass = pkeys;
   else if (regnum >= I387_ZMM0H_REGNUM (tdep)
 	   && regnum < I387_ZMMENDH_REGNUM (tdep))
     regclass = avx512_zmm_h;
@@ -1333,15 +1385,23 @@ i387_collect_xsave (const struct regcach
   if ((regclass & check))
     {
       gdb_byte raw[I386_MAX_REGISTER_SIZE];
-      gdb_byte *xstate_bv_p = XSAVE_XSTATE_BV_ADDR (regs);
-      unsigned int xstate_bv = 0;
-      /* The supported bits in `xstat_bv' are 1 byte.  */
-      unsigned int clear_bv = (~(*xstate_bv_p)) & tdep->xcr0;
+      ULONGEST initial_xstate_bv, clear_bv, xstate_bv = 0;
       gdb_byte *p;
+      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+      /* The supported bits in `xstat_bv' are 8 bytes.  */
+      initial_xstate_bv = extract_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
+						    8, byte_order);
+      clear_bv = (~(initial_xstate_bv)) & tdep->xcr0;
 
       /* Clear register set if its bit in xstat_bv is zero.  */
       if (clear_bv)
 	{
+	  if ((clear_bv & X86_XSTATE_PKRU))
+	    for (i = I387_PKRU_REGNUM (tdep);
+		 i < I387_PKEYSEND_REGNUM (tdep); i++)
+	      memset (XSAVE_PKEYS_ADDR (tdep, regs, i), 0, 4);
+
 	  if ((clear_bv & X86_XSTATE_BNDREGS))
 	    for (i = I387_BND0R_REGNUM (tdep);
 		 i < I387_BNDCFGU_REGNUM (tdep); i++)
@@ -1390,6 +1450,20 @@ i387_collect_xsave (const struct regcach
 
       if (regclass == all)
 	{
+	  /* Check if any PKEYS registers are changed.  */
+	  if ((tdep->xcr0 & X86_XSTATE_PKRU))
+	    for (i = I387_PKRU_REGNUM (tdep);
+		 i < I387_PKEYSEND_REGNUM (tdep); i++)
+	      {
+		regcache_raw_collect (regcache, i, raw);
+		p = XSAVE_PKEYS_ADDR (tdep, regs, i);
+		if (memcmp (raw, p, 4) != 0)
+		  {
+		    xstate_bv |= X86_XSTATE_PKRU;
+		    memcpy (p, raw, 4);
+		  }
+	      }
+
 	  /* Check if any ZMMH registers are changed.  */
 	  if ((tdep->xcr0 & (X86_XSTATE_ZMM_H | X86_XSTATE_ZMM)))
 	    for (i = I387_ZMM0H_REGNUM (tdep);
@@ -1525,6 +1599,16 @@ i387_collect_xsave (const struct regcach
 	      internal_error (__FILE__, __LINE__,
 			      _("invalid i387 regclass"));
 
+	    case pkeys:
+	      /* This is a PKEYS register.  */
+	      p = XSAVE_PKEYS_ADDR (tdep, regs, regnum);
+	      if (memcmp (raw, p, 4) != 0)
+		{
+		  xstate_bv |= X86_XSTATE_PKRU;
+		  memcpy (p, raw, 4);
+		}
+	      break;
+
 	    case avx512_zmm_h:
 	      /* This is a ZMM register.  */
 	      p = XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, regnum);
@@ -1619,8 +1703,11 @@ i387_collect_xsave (const struct regcach
 	 registers are changed.  */
       if (xstate_bv)
 	{
-	  /* The supported bits in `xstat_bv' are 1 byte.  */
-	  *xstate_bv_p |= (gdb_byte) xstate_bv;
+	  /* The supported bits in `xstat_bv' are 8 bytes.  */
+	  initial_xstate_bv |= xstate_bv;
+	  store_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
+				  8, byte_order,
+				  initial_xstate_bv);
 
 	  switch (regclass)
 	    {
@@ -1639,6 +1726,7 @@ i387_collect_xsave (const struct regcach
 	    case avx512_zmm_h:
 	    case avx512_ymmh_avx512:
 	    case avx512_xmm_avx512:
+	    case pkeys:
 	      /* Register REGNUM has been updated.  Return.  */
 	      return;
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i387-tdep.h ./gdb/i387-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/i387-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/i387-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the i387.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,7 +44,9 @@ struct ui_file;
 #define I387_NUM_BND_REGS 4
 #define I387_NUM_MPX_CTRL_REGS 2
 #define I387_NUM_K_REGS 8
+#define I387_NUM_PKEYS_REGS 1
 
+#define I387_PKRU_REGNUM(tdep) ((tdep)->pkru_regnum)
 #define I387_K0_REGNUM(tdep) ((tdep)->k0_regnum)
 #define I387_NUM_ZMMH_REGS(tdep) ((tdep)->num_zmm_regs)
 #define I387_ZMM0H_REGNUM(tdep) ((tdep)->zmm0h_regnum)
@@ -79,6 +81,9 @@ struct ui_file;
 #define I387_XMM_AVX512_END_REGNUM(tdep) \
   (I387_XMM16_REGNUM (tdep) + I387_NUM_XMM_AVX512_REGS (tdep))
 
+#define I387_PKEYSEND_REGNUM(tdep) \
+  (I387_PKRU_REGNUM (tdep) + I387_NUM_PKEYS_REGS)
+
 /* Print out the i387 floating point state.  */
 
 extern void i387_print_float_info (struct gdbarch *gdbarch,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-libunwind-tdep.c ./gdb/ia64-libunwind-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-libunwind-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-libunwind-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Frame unwinder for ia64 frames using the libunwind library.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Written by Jeff Johnston, contributed by Red Hat Inc.
 
@@ -59,20 +59,33 @@ static int libunwind_initialized;
 static struct gdbarch_data *libunwind_descr_handle;
 
 /* Required function pointers from libunwind.  */
-static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
-static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
-static int (*unw_get_saveloc_p) (unw_cursor_t *, unw_regnum_t,
-				 unw_save_loc_t *);
-static int (*unw_is_signal_frame_p) (unw_cursor_t *);
-static int (*unw_step_p) (unw_cursor_t *);
-static int (*unw_init_remote_p) (unw_cursor_t *, unw_addr_space_t, void *);
-static unw_addr_space_t (*unw_create_addr_space_p) (unw_accessors_t *, int);
-static void (*unw_destroy_addr_space_p) (unw_addr_space_t);
-static int (*unw_search_unwind_table_p) (unw_addr_space_t, unw_word_t,
-					 unw_dyn_info_t *,
-					 unw_proc_info_t *, int, void *);
-static unw_word_t (*unw_find_dyn_list_p) (unw_addr_space_t, unw_dyn_info_t *,
-					  void *);
+typedef int (unw_get_reg_p_ftype) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
+static unw_get_reg_p_ftype *unw_get_reg_p;
+typedef int (unw_get_fpreg_p_ftype) (unw_cursor_t *, unw_regnum_t,
+				     unw_fpreg_t *);
+static unw_get_fpreg_p_ftype *unw_get_fpreg_p;
+typedef int (unw_get_saveloc_p_ftype) (unw_cursor_t *, unw_regnum_t,
+				       unw_save_loc_t *);
+static unw_get_saveloc_p_ftype *unw_get_saveloc_p;
+typedef int (unw_is_signal_frame_p_ftype) (unw_cursor_t *);
+static unw_is_signal_frame_p_ftype *unw_is_signal_frame_p;
+typedef int (unw_step_p_ftype) (unw_cursor_t *);
+static unw_step_p_ftype *unw_step_p;
+typedef int (unw_init_remote_p_ftype) (unw_cursor_t *, unw_addr_space_t,
+				       void *);
+static unw_init_remote_p_ftype *unw_init_remote_p;
+typedef unw_addr_space_t (unw_create_addr_space_p_ftype) (unw_accessors_t *,
+							  int);
+static unw_create_addr_space_p_ftype *unw_create_addr_space_p;
+typedef void (unw_destroy_addr_space_p_ftype) (unw_addr_space_t);
+static unw_destroy_addr_space_p_ftype *unw_destroy_addr_space_p;
+typedef int (unw_search_unwind_table_p_ftype) (unw_addr_space_t, unw_word_t,
+					       unw_dyn_info_t *,
+					       unw_proc_info_t *, int, void *);
+static unw_search_unwind_table_p_ftype *unw_search_unwind_table_p;
+typedef unw_word_t (unw_find_dyn_list_p_ftype) (unw_addr_space_t,
+						unw_dyn_info_t *, void *);
+static unw_find_dyn_list_p_ftype *unw_find_dyn_list_p;
 
 
 struct libunwind_frame_cache
@@ -114,7 +127,8 @@ static char *find_dyn_list_name = STRING
 static struct libunwind_descr *
 libunwind_descr (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, libunwind_descr_handle);
+  return ((struct libunwind_descr *)
+	  gdbarch_data (gdbarch, libunwind_descr_handle));
 }
 
 static void *
@@ -134,12 +148,13 @@ libunwind_frame_set_descr (struct gdbarc
 
   gdb_assert (gdbarch != NULL);
 
-  arch_descr = gdbarch_data (gdbarch, libunwind_descr_handle);
+  arch_descr = ((struct libunwind_descr *)
+		gdbarch_data (gdbarch, libunwind_descr_handle));
 
   if (arch_descr == NULL)
     {
       /* First time here.  Must initialize data area.  */
-      arch_descr = libunwind_descr_init (gdbarch);
+      arch_descr = (struct libunwind_descr *) libunwind_descr_init (gdbarch);
       deprecated_set_gdbarch_data (gdbarch,
 				   libunwind_descr_handle, arch_descr);
     }
@@ -165,7 +180,7 @@ libunwind_frame_cache (struct frame_info
   int i, ret;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct libunwind_frame_cache *) *this_cache;
 
   /* Allocate a new cache.  */
   cache = FRAME_OBSTACK_ZALLOC (struct libunwind_frame_cache);
@@ -197,7 +212,7 @@ libunwind_frame_cache (struct frame_info
      use this cursor to find previous registers via the unw_get_reg
      interface which will invoke libunwind's special logic.  */
   descr = libunwind_descr (gdbarch);
-  acc = descr->accessors;
+  acc = (unw_accessors_t *) descr->accessors;
   as =  unw_create_addr_space_p (acc,
 				 gdbarch_byte_order (gdbarch)
 				 == BFD_ENDIAN_BIG
@@ -230,7 +245,8 @@ libunwind_frame_cache (struct frame_info
 void
 libunwind_frame_dealloc_cache (struct frame_info *self, void *this_cache)
 {
-  struct libunwind_frame_cache *cache = this_cache;
+  struct libunwind_frame_cache *cache
+    = (struct libunwind_frame_cache *) this_cache;
 
   if (cache->as)
     unw_destroy_addr_space_p (cache->as);
@@ -262,7 +278,7 @@ libunwind_frame_sniffer (const struct fr
      it has found sufficient libunwind unwinding information to do so.  */
 
   descr = libunwind_descr (gdbarch);
-  acc = descr->accessors;
+  acc = (unw_accessors_t *) descr->accessors;
   as =  unw_create_addr_space_p (acc,
 				 gdbarch_byte_order (gdbarch)
 				 == BFD_ENDIAN_BIG
@@ -380,8 +396,10 @@ int
 libunwind_search_unwind_table (void *as, long ip, void *di,
 			       void *pi, int need_unwind_info, void *args)
 {
-  return unw_search_unwind_table_p (*(unw_addr_space_t *)as, (unw_word_t )ip, 
-				    di, pi, need_unwind_info, args);
+  return unw_search_unwind_table_p (*(unw_addr_space_t *) as, (unw_word_t) ip,
+				    (unw_dyn_info_t *) di,
+				    (unw_proc_info_t *) pi, need_unwind_info,
+				    args);
 }
 
 /* Verify if we are in a sigtramp frame and we can use libunwind to unwind.  */
@@ -405,7 +423,7 @@ libunwind_sigtramp_frame_sniffer (const 
      so.  */
 
   descr = libunwind_descr (gdbarch);
-  acc = descr->accessors;
+  acc = (unw_accessors_t *) descr->accessors;
   as =  unw_create_addr_space_p (acc,
 				 gdbarch_byte_order (gdbarch)
 				 == BFD_ENDIAN_BIG
@@ -450,7 +468,7 @@ libunwind_get_reg_special (struct gdbarc
 
 
   descr = libunwind_descr (gdbarch);
-  acc = descr->special_accessors;
+  acc = (unw_accessors_t *) descr->special_accessors;
   as =  unw_create_addr_space_p (acc,
 				 gdbarch_byte_order (gdbarch)
 				 == BFD_ENDIAN_BIG
@@ -517,43 +535,52 @@ libunwind_load (void)
 
   /* Initialize pointers to the dynamic library functions we will use.  */
 
-  unw_get_reg_p = dlsym (handle, get_reg_name);
+  unw_get_reg_p = (unw_get_reg_p_ftype *) dlsym (handle, get_reg_name);
   if (unw_get_reg_p == NULL)
     return 0;
 
-  unw_get_fpreg_p = dlsym (handle, get_fpreg_name);
+  unw_get_fpreg_p = (unw_get_fpreg_p_ftype *) dlsym (handle, get_fpreg_name);
   if (unw_get_fpreg_p == NULL)
     return 0;
 
-  unw_get_saveloc_p = dlsym (handle, get_saveloc_name);
+  unw_get_saveloc_p
+    = (unw_get_saveloc_p_ftype *) dlsym (handle, get_saveloc_name);
   if (unw_get_saveloc_p == NULL)
     return 0;
 
-  unw_is_signal_frame_p = dlsym (handle, is_signal_frame_name);
+  unw_is_signal_frame_p
+    = (unw_is_signal_frame_p_ftype *) dlsym (handle, is_signal_frame_name);
   if (unw_is_signal_frame_p == NULL)
     return 0;
 
-  unw_step_p = dlsym (handle, step_name);
+  unw_step_p = (unw_step_p_ftype *) dlsym (handle, step_name);
   if (unw_step_p == NULL)
     return 0;
 
-  unw_init_remote_p = dlsym (handle, init_remote_name);
+  unw_init_remote_p
+    = (unw_init_remote_p_ftype *) dlsym (handle, init_remote_name);
   if (unw_init_remote_p == NULL)
     return 0;
 
-  unw_create_addr_space_p = dlsym (handle, create_addr_space_name);
+  unw_create_addr_space_p
+    = (unw_create_addr_space_p_ftype *) dlsym (handle, create_addr_space_name);
   if (unw_create_addr_space_p == NULL)
     return 0;
 
-  unw_destroy_addr_space_p = dlsym (handle, destroy_addr_space_name);
+  unw_destroy_addr_space_p
+    = (unw_destroy_addr_space_p_ftype *) dlsym (handle,
+						destroy_addr_space_name);
   if (unw_destroy_addr_space_p == NULL)
     return 0;
 
-  unw_search_unwind_table_p = dlsym (handle, search_unwind_table_name);
+  unw_search_unwind_table_p
+    = (unw_search_unwind_table_p_ftype *) dlsym (handle,
+						 search_unwind_table_name);
   if (unw_search_unwind_table_p == NULL)
     return 0;
 
-  unw_find_dyn_list_p = dlsym (handle, find_dyn_list_name);
+  unw_find_dyn_list_p
+    = (unw_find_dyn_list_p_ftype *) dlsym (handle, find_dyn_list_name);
   if (unw_find_dyn_list_p == NULL)
     return 0;
    
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-libunwind-tdep.h ./gdb/ia64-libunwind-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-libunwind-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-libunwind-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Frame unwinder for ia64 frames with libunwind frame information.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by Jeff Johnston.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-linux-nat.c ./gdb/ia64-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Functions specific to running gdb native on IA-64 running
    GNU/Linux.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,7 @@
 #include "linux-nat.h"
 
 #include <signal.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include "gdb_wait.h"
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
@@ -542,7 +542,8 @@ is_power_of_2 (int val)
 
 static int
 ia64_linux_insert_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int rw,
+			      CORE_ADDR addr, int len,
+			      enum target_hw_bp_type type,
 			      struct expression *cond)
 {
   struct lwp_info *lp;
@@ -569,7 +570,7 @@ ia64_linux_insert_watchpoint (struct tar
   dbr_addr = (long) addr;
   dbr_mask = (~(len - 1) & 0x00ffffffffffffffL);  /* construct mask to match */
   dbr_mask |= 0x0800000000000000L;           /* Only match privilege level 3 */
-  switch (rw)
+  switch (type)
     {
     case hw_write:
       dbr_mask |= (1L << 62);			/* Set w bit */
@@ -597,7 +598,8 @@ ia64_linux_insert_watchpoint (struct tar
 
 static int
 ia64_linux_remove_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int type,
+			      CORE_ADDR addr, int len,
+			      enum target_hw_bp_type type,
 			      struct expression *cond)
 {
   int idx;
@@ -678,7 +680,8 @@ ia64_linux_stopped_by_watchpoint (struct
 
 static int
 ia64_linux_can_use_hw_breakpoint (struct target_ops *self,
-				  int type, int cnt, int othertype)
+				  enum bptype type,
+				  int cnt, int othertype)
 {
   return 1;
 }
@@ -743,7 +746,7 @@ ia64_linux_fetch_register (struct regcac
   size = register_size (gdbarch, regnum);
 
   gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
-  buf = alloca (size);
+  buf = (PTRACE_TYPE_RET *) alloca (size);
 
   /* Read the register contents from the inferior a chunk at a time.  */
   for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
@@ -801,7 +804,7 @@ ia64_linux_store_register (const struct 
   size = register_size (gdbarch, regnum);
 
   gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
-  buf = alloca (size);
+  buf = (PTRACE_TYPE_RET *) alloca (size);
 
   /* Write the register contents into the inferior a chunk at a time.  */
   regcache_raw_collect (regcache, regnum, buf);
@@ -862,7 +865,7 @@ ia64_linux_xfer_partial (struct target_o
       if (offset >= gate_table_size)
 	return TARGET_XFER_EOF;
 
-      tmp_buf = alloca (gate_table_size);
+      tmp_buf = (gdb_byte *) alloca (gate_table_size);
       res = syscall (__NR_getunwind, tmp_buf, gate_table_size);
       if (res < 0)
 	return TARGET_XFER_E_IO;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-linux-tdep.c ./gdb/ia64-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-tdep.c ./gdb/ia64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -126,8 +126,6 @@ static CORE_ADDR ia64_find_global_pointe
 #define NUM_IA64_RAW_REGS 462
 
 static int sp_regnum = IA64_GR12_REGNUM;
-static int fp_regnum = IA64_VFP_REGNUM;
-static int lr_regnum = IA64_VRAP_REGNUM;
 
 /* NOTE: we treat the register stack registers r32-r127 as
    pseudo-registers because they may not be accessible via the ptrace
@@ -721,8 +719,6 @@ ia64_memory_insert_breakpoint (struct gd
 		    paddress (gdbarch, bp_tgt->placed_address));
   replace_slotN_contents (bundle, IA64_BREAKPOINT, slotnum);
 
-  bp_tgt->placed_size = bp_tgt->shadow_len;
-
   val = target_write_memory (addr + shadow_slotnum, bundle + shadow_slotnum,
 			     bp_tgt->shadow_len);
 
@@ -785,8 +781,7 @@ ia64_memory_remove_breakpoint (struct gd
       slotnum = 2;
     }
 
-  gdb_assert (bp_tgt->placed_size == BUNDLE_LEN - shadow_slotnum);
-  gdb_assert (bp_tgt->placed_size == bp_tgt->shadow_len);
+  gdb_assert (bp_tgt->shadow_len == BUNDLE_LEN - shadow_slotnum);
 
   instr_breakpoint = slotN_contents (bundle_mem, slotnum);
   if (instr_breakpoint != IA64_BREAKPOINT)
@@ -814,6 +809,15 @@ ia64_memory_remove_breakpoint (struct gd
   return val;
 }
 
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+ia64_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  /* A place holder of gdbarch method breakpoint_kind_from_pc.   */
+  return 0;
+}
+
 /* As gdbarch_breakpoint_from_pc ranges have byte granularity and ia64
    instruction slots ranges are bit-granular (41 bits) we have to provide an
    extended range as described for ia64_memory_insert_breakpoint.  We also take
@@ -1103,7 +1107,7 @@ ia64_pseudo_register_write (struct gdbar
       if ((cfm & 0x7f) > regnum - V32_REGNUM) 
 	{
 	  ULONGEST reg_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
-	  write_memory (reg_addr, (void *) buf, 8);
+	  write_memory (reg_addr, buf, 8);
 	}
     }
   else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
@@ -1399,7 +1403,6 @@ examine_prologue (CORE_ADDR pc, CORE_ADD
       && it == M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
     {
       /* alloc - start of a regular function.  */
-      int sor = (int) ((instr & 0x00078000000LL) >> 27);
       int sol = (int) ((instr & 0x00007f00000LL) >> 20);
       int sof = (int) ((instr & 0x000000fe000LL) >> 13);
       int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
@@ -1850,10 +1853,10 @@ ia64_frame_cache (struct frame_info *thi
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct ia64_frame_cache *cache;
   gdb_byte buf[8];
-  CORE_ADDR cfm, psr;
+  CORE_ADDR cfm;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct ia64_frame_cache *) *this_cache;
 
   cache = ia64_alloc_frame_cache ();
   *this_cache = cache;
@@ -1868,7 +1871,6 @@ ia64_frame_cache (struct frame_info *thi
   cache->bsp = extract_unsigned_integer (buf, 8, byte_order);
   
   get_frame_register (this_frame, IA64_PSR_REGNUM, buf);
-  psr = extract_unsigned_integer (buf, 8, byte_order);
 
   get_frame_register (this_frame, IA64_CFM_REGNUM, buf);
   cfm = extract_unsigned_integer (buf, 8, byte_order);
@@ -2240,7 +2242,7 @@ ia64_sigtramp_frame_cache (struct frame_
   gdb_byte buf[8];
 
   if (*this_cache)
-    return *this_cache;
+    return (struct ia64_frame_cache *) *this_cache;
 
   cache = ia64_alloc_frame_cache ();
 
@@ -2489,7 +2491,7 @@ ia64_access_reg (unw_addr_space_t as, un
 {
   int regnum = ia64_uw2gdb_regnum (uw_regnum);
   unw_word_t bsp, sof, sol, cfm, psr, ip;
-  struct frame_info *this_frame = arg;
+  struct frame_info *this_frame = (struct frame_info *) arg;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   long new_sof, old_sof;
@@ -2552,7 +2554,7 @@ ia64_access_fpreg (unw_addr_space_t as, 
 		   unw_fpreg_t *val, int write, void *arg)
 {
   int regnum = ia64_uw2gdb_regnum (uw_regnum);
-  struct frame_info *this_frame = arg;
+  struct frame_info *this_frame = (struct frame_info *) arg;
   
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
@@ -2569,7 +2571,7 @@ ia64_access_rse_reg (unw_addr_space_t as
 {
   int regnum = ia64_uw2gdb_regnum (uw_regnum);
   unw_word_t bsp, sof, sol, cfm, psr, ip;
-  struct regcache *regcache = arg;
+  struct regcache *regcache = (struct regcache *) arg;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   long new_sof, old_sof;
@@ -2633,7 +2635,7 @@ ia64_access_rse_fpreg (unw_addr_space_t 
 		       unw_fpreg_t *val, int write, void *arg)
 {
   int regnum = ia64_uw2gdb_regnum (uw_regnum);
-  struct regcache *regcache = arg;
+  struct regcache *regcache = (struct regcache *) arg;
   
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
@@ -3723,7 +3725,7 @@ ia64_push_dummy_call (struct gdbarch *gd
   int nslots, rseslots, memslots, slotnum, nfuncargs;
   int floatreg;
   ULONGEST bsp;
-  CORE_ADDR funcdescaddr, pc, global_pointer;
+  CORE_ADDR funcdescaddr, global_pointer;
   CORE_ADDR func_addr = find_function_addr (function, NULL);
 
   nslots = 0;
@@ -3854,11 +3856,11 @@ ia64_push_dummy_call (struct gdbarch *gd
 	  len = TYPE_LENGTH (type);
 	  while (len > 0 && floatreg < IA64_FR16_REGNUM)
 	    {
-	      char to[MAX_REGISTER_SIZE];
+	      gdb_byte to[MAX_REGISTER_SIZE];
 	      convert_typed_floating (value_contents (arg) + argoffset,
 				      float_elt_type, to,
 				      ia64_ext_type (gdbarch));
-	      regcache_cooked_write (regcache, floatreg, (void *)to);
+	      regcache_cooked_write (regcache, floatreg, to);
 	      floatreg++;
 	      argoffset += TYPE_LENGTH (float_elt_type);
 	      len -= TYPE_LENGTH (float_elt_type);
@@ -3963,7 +3965,7 @@ ia64_gdbarch_init (struct gdbarch_info i
   if (arches != NULL)
     return arches->gdbarch;
 
-  tdep = xzalloc (sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   tdep->size_of_register_frame = ia64_size_of_register_frame;
@@ -4013,6 +4015,7 @@ ia64_gdbarch_init (struct gdbarch_info i
   set_gdbarch_memory_remove_breakpoint (gdbarch,
 					ia64_memory_remove_breakpoint);
   set_gdbarch_breakpoint_from_pc (gdbarch, ia64_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, ia64_breakpoint_kind_from_pc);
   set_gdbarch_read_pc (gdbarch, ia64_read_pc);
   set_gdbarch_write_pc (gdbarch, ia64_write_pc);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-tdep.h ./gdb/ia64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the ia64.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-vms-tdep.c ./gdb/ia64-vms-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ia64-vms-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ia64-vms-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenVMS IA-64.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcall.c ./gdb/infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Perform an inferior function call, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "infcall.h"
 #include "breakpoint.h"
 #include "tracepoint.h"
 #include "target.h"
@@ -30,12 +31,14 @@
 #include "objfiles.h"
 #include "gdbcmd.h"
 #include "command.h"
-#include "infcall.h"
 #include "dummy-frame.h"
 #include "ada-lang.h"
 #include "gdbthread.h"
 #include "event-top.h"
 #include "observer.h"
+#include "top.h"
+#include "interps.h"
+#include "thread-fsm.h"
 
 /* If we can't find a function's name from its address,
    we print this instead.  */
@@ -58,10 +61,9 @@
 
    Unfortunately, on certain older platforms, the debug info doesn't
    indicate reliably how each function was defined.  A function type's
-   TYPE_FLAG_PROTOTYPED flag may be clear, even if the function was
-   defined in prototype style.  When calling a function whose
-   TYPE_FLAG_PROTOTYPED flag is clear, GDB consults this flag to
-   decide what to do.
+   TYPE_PROTOTYPED flag may be clear, even if the function was defined
+   in prototype style.  When calling a function whose TYPE_PROTOTYPED
+   flag is clear, GDB consults this flag to decide what to do.
 
    For modern targets, it is proper to assume that, if the prototype
    flag is clear, that can be trusted: `float' arguments should be
@@ -372,6 +374,185 @@ get_function_name (CORE_ADDR funaddr, ch
   }
 }
 
+/* All the meta data necessary to extract the call's return value.  */
+
+struct call_return_meta_info
+{
+  /* The caller frame's architecture.  */
+  struct gdbarch *gdbarch;
+
+  /* The called function.  */
+  struct value *function;
+
+  /* The return value's type.  */
+  struct type *value_type;
+
+  /* Are we returning a value using a structure return or a normal
+     value return?  */
+  int struct_return_p;
+
+  /* If using a structure return, this is the structure's address.  */
+  CORE_ADDR struct_addr;
+
+  /* Whether stack temporaries are enabled.  */
+  int stack_temporaries_enabled;
+};
+
+/* Extract the called function's return value.  */
+
+static struct value *
+get_call_return_value (struct call_return_meta_info *ri)
+{
+  struct value *retval = NULL;
+  int stack_temporaries = thread_stack_temporaries_enabled_p (inferior_ptid);
+
+  if (TYPE_CODE (ri->value_type) == TYPE_CODE_VOID)
+    retval = allocate_value (ri->value_type);
+  else if (ri->struct_return_p)
+    {
+      if (stack_temporaries)
+	{
+	  retval = value_from_contents_and_address (ri->value_type, NULL,
+						    ri->struct_addr);
+	  push_thread_stack_temporary (inferior_ptid, retval);
+	}
+      else
+	{
+	  retval = allocate_value (ri->value_type);
+	  read_value_memory (retval, 0, 1, ri->struct_addr,
+			     value_contents_raw (retval),
+			     TYPE_LENGTH (ri->value_type));
+	}
+    }
+  else
+    {
+      retval = allocate_value (ri->value_type);
+      gdbarch_return_value (ri->gdbarch, ri->function, ri->value_type,
+			    get_current_regcache (),
+			    value_contents_raw (retval), NULL);
+      if (stack_temporaries && class_or_union_p (ri->value_type))
+	{
+	  /* Values of class type returned in registers are copied onto
+	     the stack and their lval_type set to lval_memory.  This is
+	     required because further evaluation of the expression
+	     could potentially invoke methods on the return value
+	     requiring GDB to evaluate the "this" pointer.  To evaluate
+	     the this pointer, GDB needs the memory address of the
+	     value.  */
+	  value_force_lval (retval, ri->struct_addr);
+	  push_thread_stack_temporary (inferior_ptid, retval);
+	}
+    }
+
+  gdb_assert (retval != NULL);
+  return retval;
+}
+
+/* Data for the FSM that manages an infcall.  It's main job is to
+   record the called function's return value.  */
+
+struct call_thread_fsm
+{
+  /* The base class.  */
+  struct thread_fsm thread_fsm;
+
+  /* All the info necessary to be able to extract the return
+     value.  */
+  struct call_return_meta_info return_meta_info;
+
+  /* The called function's return value.  This is extracted from the
+     target before the dummy frame is popped.  */
+  struct value *return_value;
+
+  /* The top level that started the infcall (and is synchronously
+     waiting for it to end).  */
+  struct ui *waiting_ui;
+};
+
+static int call_thread_fsm_should_stop (struct thread_fsm *self,
+					struct thread_info *thread);
+static int call_thread_fsm_should_notify_stop (struct thread_fsm *self);
+
+/* call_thread_fsm's vtable.  */
+
+static struct thread_fsm_ops call_thread_fsm_ops =
+{
+  NULL, /*dtor */
+  NULL, /* clean_up */
+  call_thread_fsm_should_stop,
+  NULL, /* return_value */
+  NULL, /* async_reply_reason*/
+  call_thread_fsm_should_notify_stop,
+};
+
+/* Allocate a new call_thread_fsm object.  */
+
+static struct call_thread_fsm *
+new_call_thread_fsm (struct ui *waiting_ui, struct interp *cmd_interp,
+		     struct gdbarch *gdbarch, struct value *function,
+		     struct type *value_type,
+		     int struct_return_p, CORE_ADDR struct_addr)
+{
+  struct call_thread_fsm *sm;
+
+  sm = XCNEW (struct call_thread_fsm);
+  thread_fsm_ctor (&sm->thread_fsm, &call_thread_fsm_ops, cmd_interp);
+
+  sm->return_meta_info.gdbarch = gdbarch;
+  sm->return_meta_info.function = function;
+  sm->return_meta_info.value_type = value_type;
+  sm->return_meta_info.struct_return_p = struct_return_p;
+  sm->return_meta_info.struct_addr = struct_addr;
+
+  sm->waiting_ui = waiting_ui;
+
+  return sm;
+}
+
+/* Implementation of should_stop method for infcalls.  */
+
+static int
+call_thread_fsm_should_stop (struct thread_fsm *self,
+			     struct thread_info *thread)
+{
+  struct call_thread_fsm *f = (struct call_thread_fsm *) self;
+
+  if (stop_stack_dummy == STOP_STACK_DUMMY)
+    {
+      /* Done.  */
+      thread_fsm_set_finished (self);
+
+      /* Stash the return value before the dummy frame is popped and
+	 registers are restored to what they were before the
+	 call..  */
+      f->return_value = get_call_return_value (&f->return_meta_info);
+
+      /* Break out of wait_sync_command_done.  */
+      scoped_restore save_ui = make_scoped_restore (&current_ui, f->waiting_ui);
+      target_terminal_ours ();
+      f->waiting_ui->prompt_state = PROMPT_NEEDED;
+    }
+
+  return 1;
+}
+
+/* Implementation of should_notify_stop method for infcalls.  */
+
+static int
+call_thread_fsm_should_notify_stop (struct thread_fsm *self)
+{
+  if (thread_fsm_finished_p (self))
+    {
+      /* Infcall succeeded.  Be silent and proceed with evaluating the
+	 expression.  */
+      return 0;
+    }
+
+  /* Something wrong happened.  E.g., an unexpected breakpoint
+     triggered, or a signal was intercepted.  Notify the stop.  */
+  return 1;
+}
+
 /* Subroutine of call_function_by_hand to simplify it.
    Start up the inferior and wait for it to stop.
    Return the exception if there's an error, or an exception with
@@ -381,22 +562,33 @@ get_function_name (CORE_ADDR funaddr, ch
    thrown errors.  The caller should rethrow if there's an error.  */
 
 static struct gdb_exception
-run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
+run_inferior_call (struct call_thread_fsm *sm,
+		   struct thread_info *call_thread, CORE_ADDR real_pc)
 {
   struct gdb_exception caught_error = exception_none;
   int saved_in_infcall = call_thread->control.in_infcall;
   ptid_t call_thread_ptid = call_thread->ptid;
-  int saved_sync_execution = sync_execution;
+  enum prompt_state saved_prompt_state = current_ui->prompt_state;
   int was_running = call_thread->state == THREAD_RUNNING;
+  int saved_ui_async = current_ui->async;
 
   /* Infcalls run synchronously, in the foreground.  */
-  if (target_can_async_p ())
-    sync_execution = 1;
+  current_ui->prompt_state = PROMPT_BLOCKED;
+  /* So that we don't print the prompt prematurely in
+     fetch_inferior_event.  */
+  current_ui->async = 0;
+
+  delete_file_handler (current_ui->input_fd);
 
   call_thread->control.in_infcall = 1;
 
   clear_proceed_status (0);
 
+  /* Associate the FSM with the thread after clear_proceed_status
+     (otherwise it'd clear this FSM), and before anything throws, so
+     we don't leak it (and any resources it manages).  */
+  call_thread->thread_fsm = &sm->thread_fsm;
+
   disable_watchpoints_before_interactive_call_start ();
 
   /* We want to print return value, please...  */
@@ -404,25 +596,11 @@ run_inferior_call (struct thread_info *c
 
   TRY
     {
-      int was_sync = sync_execution;
-
       proceed (real_pc, GDB_SIGNAL_0);
 
       /* Inferior function calls are always synchronous, even if the
-	 target supports asynchronous execution.  Do here what
-	 `proceed' itself does in sync mode.  */
-      if (target_can_async_p ())
-	{
-	  wait_for_inferior ();
-	  normal_stop ();
-	  /* If GDB was previously in sync execution mode, then ensure
-	     that it remains so.  normal_stop calls
-	     async_enable_stdin, so reset it again here.  In other
-	     cases, stdin will be re-enabled by
-	     inferior_event_handler, when an exception is thrown.  */
-	  if (was_sync)
-	    async_disable_stdin ();
-	}
+	 target supports asynchronous execution.  */
+      wait_sync_command_done ();
     }
   CATCH (e, RETURN_MASK_ALL)
     {
@@ -430,6 +608,17 @@ run_inferior_call (struct thread_info *c
     }
   END_CATCH
 
+  /* If GDB has the prompt blocked before, then ensure that it remains
+     so.  normal_stop calls async_enable_stdin, so reset the prompt
+     state again here.  In other cases, stdin will be re-enabled by
+     inferior_event_handler, when an exception is thrown.  */
+  current_ui->prompt_state = saved_prompt_state;
+  if (current_ui->prompt_state == PROMPT_BLOCKED)
+    delete_file_handler (current_ui->input_fd);
+  else
+    ui_register_input_event_handler (current_ui);
+  current_ui->async = saved_ui_async;
+
   /* At this point the current thread may have changed.  Refresh
      CALL_THREAD as it could be invalid if its thread has exited.  */
   call_thread = find_thread_ptid (call_thread_ptid);
@@ -470,8 +659,6 @@ run_inferior_call (struct thread_info *c
   if (call_thread != NULL)
     call_thread->control.in_infcall = saved_in_infcall;
 
-  sync_execution = saved_sync_execution;
-
   return caught_error;
 }
 
@@ -490,96 +677,6 @@ call_function_by_hand (struct value *fun
   return call_function_by_hand_dummy (function, nargs, args, NULL, NULL);
 }
 
-/* Data for dummy_frame_context_saver.  Structure can be freed only
-   after both dummy_frame_context_saver_dtor and
-   dummy_frame_context_saver_drop have been called for it.  */
-
-struct dummy_frame_context_saver
-{
-  /* Inferior registers fetched before associated dummy_frame got freed
-     and before any other destructors of associated dummy_frame got called.
-     It is initialized to NULL.  */
-  struct regcache *retbuf;
-
-  /* It is 1 if this dummy_frame_context_saver_drop has been already
-     called.  */
-  int drop_done;
-};
-
-/* Free struct dummy_frame_context_saver.  */
-
-static void
-dummy_frame_context_saver_free (struct dummy_frame_context_saver *saver)
-{
-  regcache_xfree (saver->retbuf);
-  xfree (saver);
-}
-
-/* Destructor for associated dummy_frame.  */
-
-static void
-dummy_frame_context_saver_dtor (void *data_voidp, int registers_valid)
-{
-  struct dummy_frame_context_saver *data = data_voidp;
-
-  gdb_assert (data->retbuf == NULL);
-
-  if (data->drop_done)
-    dummy_frame_context_saver_free (data);
-  else if (registers_valid)
-    data->retbuf = regcache_dup (get_current_regcache ());
-}
-
-/* Caller is no longer interested in this
-   struct dummy_frame_context_saver.  After its associated dummy_frame
-   gets freed struct dummy_frame_context_saver can be also freed.  */
-
-void
-dummy_frame_context_saver_drop (struct dummy_frame_context_saver *saver)
-{
-  saver->drop_done = 1;
-
-  if (!find_dummy_frame_dtor (dummy_frame_context_saver_dtor, saver))
-    dummy_frame_context_saver_free (saver);
-}
-
-/* Stub dummy_frame_context_saver_drop compatible with make_cleanup.  */
-
-void
-dummy_frame_context_saver_cleanup (void *data)
-{
-  struct dummy_frame_context_saver *saver = data;
-
-  dummy_frame_context_saver_drop (saver);
-}
-
-/* Fetch RETBUF field of possibly opaque DTOR_DATA.
-   RETBUF must not be NULL.  */
-
-struct regcache *
-dummy_frame_context_saver_get_regs (struct dummy_frame_context_saver *saver)
-{
-  gdb_assert (saver->retbuf != NULL);
-  return saver->retbuf;
-}
-
-/* Register provider of inferior registers at the time DUMMY_ID frame of
-   PTID gets freed (before inferior registers get restored to those
-   before dummy_frame).  */
-
-struct dummy_frame_context_saver *
-dummy_frame_context_saver_setup (struct frame_id dummy_id, ptid_t ptid)
-{
-  struct dummy_frame_context_saver *saver;
-
-  saver = xmalloc (sizeof (*saver));
-  saver->retbuf = NULL;
-  saver->drop_done = 0;
-  register_dummy_frame_dtor (dummy_id, inferior_ptid,
-			     dummy_frame_context_saver_dtor, saver);
-  return saver;
-}
-
 /* All this stuff with a dummy frame may seem unnecessarily complicated
    (why not just save registers in GDB?).  The purpose of pushing a dummy
    frame which looks just like a real frame is so that if you call a
@@ -624,8 +721,6 @@ call_function_by_hand_dummy (struct valu
   struct gdb_exception e;
   char name_buf[RAW_FUNCTION_ADDRESS_SIZE];
   int stack_temporaries = thread_stack_temporaries_enabled_p (inferior_ptid);
-  struct dummy_frame_context_saver *context_saver;
-  struct cleanup *context_saver_cleanup;
 
   if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
     ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
@@ -757,7 +852,7 @@ call_function_by_hand_dummy (struct valu
   if (!values_type)
     values_type = builtin_type (gdbarch)->builtin_int;
 
-  CHECK_TYPEDEF (values_type);
+  values_type = check_typedef (values_type);
 
   /* Are we returning a value using a structure return (passing a
      hidden argument pointing to storage) or a normal value return?
@@ -922,7 +1017,7 @@ call_function_by_hand_dummy (struct valu
       struct value **new_args;
 
       /* Add the new argument to the front of the argument list.  */
-      new_args = xmalloc (sizeof (struct value *) * (nargs + 1));
+      new_args = XNEWVEC (struct value *, nargs + 1);
       new_args[0] = value_from_pointer (lookup_pointer_type (values_type),
 					struct_addr);
       memcpy (&new_args[1], &args[0], sizeof (struct value *) * nargs);
@@ -1012,13 +1107,6 @@ call_function_by_hand_dummy (struct valu
     register_dummy_frame_dtor (dummy_id, inferior_ptid,
 			       dummy_dtor, dummy_dtor_data);
 
-  /* dummy_frame_context_saver_setup must be called last so that its
-     saving of inferior registers gets called first (before possible
-     DUMMY_DTOR destructor).  */
-  context_saver = dummy_frame_context_saver_setup (dummy_id, inferior_ptid);
-  context_saver_cleanup = make_cleanup (dummy_frame_context_saver_cleanup,
-					context_saver);
-
   /* Register a clean-up for unwind_on_terminating_exception_breakpoint.  */
   terminate_bp_cleanup = make_cleanup (cleanup_delete_std_terminate_breakpoint,
 				       NULL);
@@ -1031,6 +1119,12 @@ call_function_by_hand_dummy (struct valu
      in a block so that it's only in scope during the time it's valid.  */
   {
     struct thread_info *tp = inferior_thread ();
+    struct thread_fsm *saved_sm;
+    struct call_thread_fsm *sm;
+
+    /* Save the current FSM.  We'll override it.  */
+    saved_sm = tp->thread_fsm;
+    tp->thread_fsm = NULL;
 
     /* Save this thread's ptid, we need it later but the thread
        may have exited.  */
@@ -1038,10 +1132,58 @@ call_function_by_hand_dummy (struct valu
 
     /* Run the inferior until it stops.  */
 
-    e = run_inferior_call (tp, real_pc);
-  }
+    /* Create the FSM used to manage the infcall.  It tells infrun to
+       not report the stop to the user, and captures the return value
+       before the dummy frame is popped.  run_inferior_call registers
+       it with the thread ASAP.  */
+    sm = new_call_thread_fsm (current_ui, command_interp (),
+			      gdbarch, function,
+			      values_type,
+			      struct_return || hidden_first_param_p,
+			      struct_addr);
+
+    e = run_inferior_call (sm, tp, real_pc);
+
+    observer_notify_inferior_call_post (call_thread_ptid, funaddr);
+
+    tp = find_thread_ptid (call_thread_ptid);
+    if (tp != NULL)
+      {
+	/* The FSM should still be the same.  */
+	gdb_assert (tp->thread_fsm == &sm->thread_fsm);
 
-  observer_notify_inferior_call_post (call_thread_ptid, funaddr);
+	if (thread_fsm_finished_p (tp->thread_fsm))
+	  {
+	    struct value *retval;
+
+	    /* The inferior call is successful.  Pop the dummy frame,
+	       which runs its destructors and restores the inferior's
+	       suspend state, and restore the inferior control
+	       state.  */
+	    dummy_frame_pop (dummy_id, call_thread_ptid);
+	    restore_infcall_control_state (inf_status);
+
+	    /* Get the return value.  */
+	    retval = sm->return_value;
+
+	    /* Clean up / destroy the call FSM, and restore the
+	       original one.  */
+	    thread_fsm_clean_up (tp->thread_fsm, tp);
+	    thread_fsm_delete (tp->thread_fsm);
+	    tp->thread_fsm = saved_sm;
+
+	    maybe_remove_breakpoints ();
+
+	    do_cleanups (terminate_bp_cleanup);
+	    gdb_assert (retval != NULL);
+	    return retval;
+	  }
+
+	/* Didn't complete.  Restore previous state machine, and
+	   handle the error.  */
+	tp->thread_fsm = saved_sm;
+      }
+  }
 
   /* Rethrow an error if we got one trying to run the inferior.  */
 
@@ -1123,7 +1265,6 @@ When the function is done executing, GDB
 	       name);
     }
 
-  if (stopped_by_random_signal || stop_stack_dummy != STOP_STACK_DUMMY)
     {
       /* Make a copy as NAME may be in an objfile freed by dummy_frame_pop.  */
       char *name = xstrdup (get_function_name (funaddr,
@@ -1225,65 +1366,10 @@ When the function is done executing, GDB
 		 name);
 	}
 
-      /* The above code errors out, so ...  */
-      internal_error (__FILE__, __LINE__, _("... should not be here"));
     }
 
-  do_cleanups (terminate_bp_cleanup);
-
-  /* If we get here the called FUNCTION ran to completion,
-     and the dummy frame has already been popped.  */
-
-  {
-    struct value *retval = NULL;
-
-    /* Inferior call is successful.  Restore the inferior status.
-       At this stage, leave the RETBUF alone.  */
-    restore_infcall_control_state (inf_status);
-
-    if (TYPE_CODE (values_type) == TYPE_CODE_VOID)
-      retval = allocate_value (values_type);
-    else if (struct_return || hidden_first_param_p)
-      {
-	if (stack_temporaries)
-	  {
-	    retval = value_from_contents_and_address (values_type, NULL,
-						      struct_addr);
-	    push_thread_stack_temporary (inferior_ptid, retval);
-	  }
-	else
-	  {
-	    retval = allocate_value (values_type);
-	    read_value_memory (retval, 0, 1, struct_addr,
-			       value_contents_raw (retval),
-			       TYPE_LENGTH (values_type));
-	  }
-      }
-    else
-      {
-	retval = allocate_value (values_type);
-	gdbarch_return_value (gdbarch, function, values_type,
-			      dummy_frame_context_saver_get_regs (context_saver),
-			      value_contents_raw (retval), NULL);
-	if (stack_temporaries && class_or_union_p (values_type))
-	  {
-	    /* Values of class type returned in registers are copied onto
-	       the stack and their lval_type set to lval_memory.  This is
-	       required because further evaluation of the expression
-	       could potentially invoke methods on the return value
-	       requiring GDB to evaluate the "this" pointer.  To evaluate
-	       the this pointer, GDB needs the memory address of the
-	       value.  */
-	    value_force_lval (retval, struct_addr);
-	    push_thread_stack_temporary (inferior_ptid, retval);
-	  }
-      }
-
-    do_cleanups (context_saver_cleanup);
-
-    gdb_assert (retval);
-    return retval;
-  }
+  /* The above code errors out, so ...  */
+  gdb_assert_not_reached ("... should not be here");
 }
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcall.h ./gdb/infcall.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcall.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/infcall.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Perform an inferior function call, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,13 +50,4 @@ extern struct value *
 			       dummy_frame_dtor_ftype *dummy_dtor,
 			       void *dummy_dtor_data);
 
-struct dummy_frame_context_saver;
-extern void dummy_frame_context_saver_drop
-  (struct dummy_frame_context_saver *data);
-extern void dummy_frame_context_saver_cleanup (void *data_voidp);
-extern struct regcache *dummy_frame_context_saver_get_regs
-  (struct dummy_frame_context_saver *saver);
-extern struct dummy_frame_context_saver *dummy_frame_context_saver_setup
-  (struct frame_id dummy_id, ptid_t ptid);
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-child.c ./gdb/inf-child.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-child.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-child.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Base/prototype target for default child (native) targets.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -209,7 +209,8 @@ inf_child_pid_to_exec_file (struct targe
 static int
 inf_child_fileio_open (struct target_ops *self,
 		       struct inferior *inf, const char *filename,
-		       int flags, int mode, int *target_errno)
+		       int flags, int mode, int warn_if_slow,
+		       int *target_errno)
 {
   int nat_flags;
   mode_t nat_mode;
@@ -351,7 +352,7 @@ inf_child_fileio_readlink (struct target
       return NULL;
     }
 
-  ret = xmalloc (len + 1);
+  ret = (char *) xmalloc (len + 1);
   memcpy (ret, buf, len);
   ret[len] = '\0';
   return ret;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-child.h ./gdb/inf-child.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-child.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-child.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Base/prototype target for default child (native) targets.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcmd.c ./gdb/infcmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infcmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/infcmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Memory-access and commands for "inferior" process, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,6 +55,9 @@
 #include "linespec.h"
 #include "cli/cli-utils.h"
 #include "infcall.h"
+#include "thread-fsm.h"
+#include "top.h"
+#include "interps.h"
 
 /* Local functions: */
 
@@ -89,8 +92,6 @@ static void signal_command (char *, int)
 static void jump_command (char *, int);
 
 static void step_1 (int, int, char *);
-static void step_once (int skip_subroutines, int single_inst,
-		       int count, int thread);
 
 static void next_command (char *, int);
 
@@ -150,7 +151,11 @@ void 
 set_inferior_io_terminal (const char *terminal_name)
 {
   xfree (current_inferior ()->terminal);
-  current_inferior ()->terminal = terminal_name ? xstrdup (terminal_name) : 0;
+
+  if (terminal_name != NULL && *terminal_name != '\0')
+    current_inferior ()->terminal = xstrdup (terminal_name);
+  else
+    current_inferior ()->terminal = NULL;
 }
 
 const char *
@@ -407,7 +412,7 @@ post_create_inferior (struct target_ops 
 {
 
   /* Be sure we own the terminal in case write operations are performed.  */ 
-  target_terminal_ours ();
+  target_terminal_ours_for_output ();
 
   /* If the target hasn't taken care of this already, do it now.
      Targets which need to access registers during to_open,
@@ -504,14 +509,13 @@ prepare_execution_command (struct target
   if (background && !target->to_can_async_p (target))
     error (_("Asynchronous execution not supported on this target."));
 
-  /* If we don't get a request of running in the bg, then we need
-     to simulate synchronous (fg) execution.  */
-  if (!background && target->to_can_async_p (target))
-    {
-      /* Simulate synchronous execution.  Note no cleanup is necessary
-	 for this.  stdin is re-enabled whenever an error reaches the
-	 top level.  */
-      async_disable_stdin ();
+  if (!background)
+    {
+      /* If we get a request for running in the fg, then we need to
+	 simulate synchronous (fg) execution.  Note no cleanup is
+	 necessary for this.  stdin is re-enabled whenever an error
+	 reaches the top level.  */
+      all_uis_on_sync_execution_starting ();
     }
 }
 
@@ -586,16 +590,16 @@ run_command_1 (char *args, int from_tty,
 
   if (from_tty)
     {
-      ui_out_field_string (uiout, NULL, "Starting program");
-      ui_out_text (uiout, ": ");
+      uiout->field_string (NULL, "Starting program");
+      uiout->text (": ");
       if (exec_file)
-	ui_out_field_string (uiout, "execfile", exec_file);
-      ui_out_spaces (uiout, 1);
+	uiout->field_string ("execfile", exec_file);
+      uiout->spaces (1);
       /* We call get_inferior_args() because we might need to compute
 	 the value now.  */
-      ui_out_field_string (uiout, "infargs", get_inferior_args ());
-      ui_out_text (uiout, "\n");
-      ui_out_flush (uiout);
+      uiout->field_string ("infargs", get_inferior_args ());
+      uiout->text ("\n");
+      uiout->flush ();
     }
 
   /* Done with ARGS.  */
@@ -732,7 +736,7 @@ continue_1 (int all_threads)
 
       iterate_over_threads (proceed_thread_callback, NULL);
 
-      if (sync_execution)
+      if (current_ui->prompt_state == PROMPT_BLOCKED)
 	{
 	  /* If all threads in the target were already running,
 	     proceed_thread_callback ends up never calling proceed,
@@ -777,8 +781,6 @@ continue_command (char *args, int from_t
   args = strip_bg_char (args, &async_exec);
   args_chain = make_cleanup (xfree, args);
 
-  prepare_execution_command (&current_target, async_exec);
-
   if (args != NULL)
     {
       if (startswith (args, "-a"))
@@ -842,6 +844,17 @@ continue_command (char *args, int from_t
   /* Done with ARGS.  */
   do_cleanups (args_chain);
 
+  ERROR_NO_INFERIOR;
+  ensure_not_tfind_mode ();
+
+  if (!non_stop || !all_threads)
+    {
+      ensure_valid_thread ();
+      ensure_not_running ();
+    }
+
+  prepare_execution_command (&current_target, async_exec);
+
   if (from_tty)
     printf_filtered (_("Continuing.\n"));
 
@@ -901,14 +914,84 @@ delete_longjmp_breakpoint_cleanup (void 
   delete_longjmp_breakpoint (thread);
 }
 
+/* Data for the FSM that manages the step/next/stepi/nexti
+   commands.  */
+
+struct step_command_fsm
+{
+  /* The base class.  */
+  struct thread_fsm thread_fsm;
+
+  /* How many steps left in a "step N"-like command.  */
+  int count;
+
+  /* If true, this is a next/nexti, otherwise a step/stepi.  */
+  int skip_subroutines;
+
+  /* If true, this is a stepi/nexti, otherwise a step/step.  */
+  int single_inst;
+};
+
+static void step_command_fsm_clean_up (struct thread_fsm *self,
+				       struct thread_info *thread);
+static int step_command_fsm_should_stop (struct thread_fsm *self,
+					 struct thread_info *thread);
+static enum async_reply_reason
+  step_command_fsm_async_reply_reason (struct thread_fsm *self);
+
+/* step_command_fsm's vtable.  */
+
+static struct thread_fsm_ops step_command_fsm_ops =
+{
+  NULL,
+  step_command_fsm_clean_up,
+  step_command_fsm_should_stop,
+  NULL,	/* return_value */
+  step_command_fsm_async_reply_reason,
+};
+
+/* Allocate a new step_command_fsm.  */
+
+static struct step_command_fsm *
+new_step_command_fsm (struct interp *cmd_interp)
+{
+  struct step_command_fsm *sm;
+
+  sm = XCNEW (struct step_command_fsm);
+  thread_fsm_ctor (&sm->thread_fsm, &step_command_fsm_ops, cmd_interp);
+
+  return sm;
+}
+
+/* Prepare for a step/next/etc. command.  Any target resource
+   allocated here is undone in the FSM's clean_up method.  */
+
+static void
+step_command_fsm_prepare (struct step_command_fsm *sm,
+			  int skip_subroutines, int single_inst,
+			  int count, struct thread_info *thread)
+{
+  sm->skip_subroutines = skip_subroutines;
+  sm->single_inst = single_inst;
+  sm->count = count;
+
+  /* Leave the si command alone.  */
+  if (!sm->single_inst || sm->skip_subroutines)
+    set_longjmp_breakpoint (thread, get_frame_id (get_current_frame ()));
+
+  thread->control.stepping_command = 1;
+}
+
+static int prepare_one_step (struct step_command_fsm *sm);
+
 static void
 step_1 (int skip_subroutines, int single_inst, char *count_string)
 {
-  int count = 1;
-  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+  int count;
   int async_exec;
-  int thread = -1;
   struct cleanup *args_chain;
+  struct thread_info *thr;
+  struct step_command_fsm *step_sm;
 
   ERROR_NO_INFERIOR;
   ensure_not_tfind_mode ();
@@ -925,129 +1008,107 @@ step_1 (int skip_subroutines, int single
   /* Done with ARGS.  */
   do_cleanups (args_chain);
 
-  if (!single_inst || skip_subroutines)		/* Leave si command alone.  */
-    {
-      struct thread_info *tp = inferior_thread ();
-
-      if (in_thread_list (inferior_ptid))
- 	thread = pid_to_thread_id (inferior_ptid);
-
-      set_longjmp_breakpoint (tp, get_frame_id (get_current_frame ()));
+  clear_proceed_status (1);
 
-      make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
+  /* Setup the execution command state machine to handle all the COUNT
+     steps.  */
+  thr = inferior_thread ();
+  step_sm = new_step_command_fsm (command_interp ());
+  thr->thread_fsm = &step_sm->thread_fsm;
+
+  step_command_fsm_prepare (step_sm, skip_subroutines,
+			    single_inst, count, thr);
+
+  /* Do only one step for now, before returning control to the event
+     loop.  Let the continuation figure out how many other steps we
+     need to do, and handle them one at the time, through
+     step_once.  */
+  if (!prepare_one_step (step_sm))
+    proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
+  else
+    {
+      int proceeded;
+
+      /* Stepped into an inline frame.  Pretend that we've
+	 stopped.  */
+      thread_fsm_clean_up (thr->thread_fsm, thr);
+      proceeded = normal_stop ();
+      if (!proceeded)
+	inferior_event_handler (INF_EXEC_COMPLETE, NULL);
+      all_uis_check_sync_execution_done ();
     }
+}
 
-  /* In synchronous case, all is well; each step_once call will step once.  */
-  if (!target_can_async_p ())
-    {
-      for (; count > 0; count--)
-	{
-	  step_once (skip_subroutines, single_inst, count, thread);
-
-	  if (!target_has_execution)
-	    break;
-	  else
-	    {
-	      struct thread_info *tp = inferior_thread ();
+/* Implementation of the 'should_stop' FSM method for stepping
+   commands.  Called after we are done with one step operation, to
+   check whether we need to step again, before we print the prompt and
+   return control to the user.  If count is > 1, returns false, as we
+   will need to keep going.  */
 
-	      if (!tp->control.stop_step || !tp->step_multi)
-		{
-		  /* If we stopped for some reason that is not stepping
-		     there are no further steps to make.  */
-		  tp->step_multi = 0;
-		  break;
-		}
-	    }
-	}
+static int
+step_command_fsm_should_stop (struct thread_fsm *self, struct thread_info *tp)
+{
+  struct step_command_fsm *sm = (struct step_command_fsm *) self;
 
-      do_cleanups (cleanups);
-    }
-  else
+  if (tp->control.stop_step)
     {
-      /* In the case of an asynchronous target things get complicated;
-	 do only one step for now, before returning control to the
-	 event loop.  Let the continuation figure out how many other
-	 steps we need to do, and handle them one at the time, through
-	 step_once.  */
-      step_once (skip_subroutines, single_inst, count, thread);
+      /* There are more steps to make, and we did stop due to
+	 ending a stepping range.  Do another step.  */
+      if (--sm->count > 0)
+	return prepare_one_step (sm);
 
-      /* We are running, and the continuation is installed.  It will
-	 disable the longjmp breakpoint as appropriate.  */
-      discard_cleanups (cleanups);
+      thread_fsm_set_finished (self);
     }
-}
 
-struct step_1_continuation_args
-{
-  int count;
-  int skip_subroutines;
-  int single_inst;
-  int thread;
-};
+  return 1;
+}
 
-/* Called after we are done with one step operation, to check whether
-   we need to step again, before we print the prompt and return control
-   to the user.  If count is > 1, we will need to do one more call to
-   proceed(), via step_once().  Basically it is like step_once and
-   step_1_continuation are co-recursive.  */
+/* Implementation of the 'clean_up' FSM method for stepping commands.  */
 
 static void
-step_1_continuation (void *args, int err)
+step_command_fsm_clean_up (struct thread_fsm *self, struct thread_info *thread)
 {
-  struct step_1_continuation_args *a = args;
+  struct step_command_fsm *sm = (struct step_command_fsm *) self;
 
-  if (target_has_execution)
-    {
-      struct thread_info *tp;
+  if (!sm->single_inst || sm->skip_subroutines)
+    delete_longjmp_breakpoint (thread->global_num);
+}
 
-      tp = inferior_thread ();
-      if (!err
-	  && tp->step_multi && tp->control.stop_step)
-	{
-	  /* There are more steps to make, and we did stop due to
-	     ending a stepping range.  Do another step.  */
-	  step_once (a->skip_subroutines, a->single_inst,
-		     a->count - 1, a->thread);
-	  return;
-	}
-      tp->step_multi = 0;
-    }
+/* Implementation of the 'async_reply_reason' FSM method for stepping
+   commands.  */
 
-  /* We either hit an error, or stopped for some reason that is
-     not stepping, or there are no further steps to make.
-     Cleanup.  */
-  if (!a->single_inst || a->skip_subroutines)
-    delete_longjmp_breakpoint (a->thread);
+static enum async_reply_reason
+step_command_fsm_async_reply_reason (struct thread_fsm *self)
+{
+  return EXEC_ASYNC_END_STEPPING_RANGE;
 }
 
-/* Do just one step operation.  This is useful to implement the 'step
-   n' kind of commands.  In case of asynchronous targets, we will have
-   to set up a continuation to be done after the target stops (after
-   this one step).  For synch targets, the caller handles further
-   stepping.  */
+/* Prepare for one step in "step N".  The actual target resumption is
+   done by the caller.  Return true if we're done and should thus
+   report a stop to the user.  Returns false if the target needs to be
+   resumed.  */
 
-static void
-step_once (int skip_subroutines, int single_inst, int count, int thread)
+static int
+prepare_one_step (struct step_command_fsm *sm)
 {
-  struct frame_info *frame = get_current_frame ();
-
-  if (count > 0)
+  if (sm->count > 0)
     {
+      struct frame_info *frame = get_current_frame ();
+
       /* Don't assume THREAD is a valid thread id.  It is set to -1 if
 	 the longjmp breakpoint was not required.  Use the
 	 INFERIOR_PTID thread instead, which is the same thread when
 	 THREAD is set.  */
       struct thread_info *tp = inferior_thread ();
 
-      clear_proceed_status (1);
       set_step_frame ();
 
-      if (!single_inst)
+      if (!sm->single_inst)
 	{
 	  CORE_ADDR pc;
 
 	  /* Step at an inlined function behaves like "down".  */
-	  if (!skip_subroutines
+	  if (!sm->skip_subroutines
 	      && inline_skipped_frames (inferior_ptid))
 	    {
 	      ptid_t resume_ptid;
@@ -1057,17 +1118,8 @@ step_once (int skip_subroutines, int sin
 	      set_running (resume_ptid, 1);
 
 	      step_into_inline_frame (inferior_ptid);
-	      if (count > 1)
-		step_once (skip_subroutines, single_inst, count - 1, thread);
-	      else
-		{
-		  /* Pretend that we've stopped.  */
-		  normal_stop ();
-
-		  if (target_can_async_p ())
-		    inferior_event_handler (INF_EXEC_COMPLETE, NULL);
-		}
-	      return;
+	      sm->count--;
+	      return prepare_one_step (sm);
 	    }
 
 	  pc = get_frame_pc (frame);
@@ -1092,7 +1144,7 @@ step_once (int skip_subroutines, int sin
 					    &tp->control.step_range_end) == 0)
 		error (_("Cannot find bounds of current function"));
 
-	      target_terminal_ours ();
+	      target_terminal_ours_for_output ();
 	      printf_filtered (_("Single stepping until exit from function %s,"
 				 "\nwhich has no line number information.\n"),
 			       name);
@@ -1102,36 +1154,22 @@ step_once (int skip_subroutines, int sin
 	{
 	  /* Say we are stepping, but stop after one insn whatever it does.  */
 	  tp->control.step_range_start = tp->control.step_range_end = 1;
-	  if (!skip_subroutines)
+	  if (!sm->skip_subroutines)
 	    /* It is stepi.
 	       Don't step over function calls, not even to functions lacking
 	       line numbers.  */
 	    tp->control.step_over_calls = STEP_OVER_NONE;
 	}
 
-      if (skip_subroutines)
+      if (sm->skip_subroutines)
 	tp->control.step_over_calls = STEP_OVER_ALL;
 
-      tp->step_multi = (count > 1);
-      tp->control.stepping_command = 1;
-      proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
-
-      /* For async targets, register a continuation to do any
-	 additional steps.  For sync targets, the caller will handle
-	 further stepping.  */
-      if (target_can_async_p ())
-	{
-	  struct step_1_continuation_args *args;
-
-	  args = xmalloc (sizeof (*args));
-	  args->skip_subroutines = skip_subroutines;
-	  args->single_inst = single_inst;
-	  args->count = count;
-	  args->thread = thread;
-
-	  add_intermediate_continuation (tp, step_1_continuation, args, xfree);
-	}
+      return 0;
     }
+
+  /* Done.  */
+  thread_fsm_set_finished (&sm->thread_fsm);
+  return 1;
 }
 
 
@@ -1264,6 +1302,8 @@ signal_command (char *signum_exp, int fr
 	oursig = gdb_signal_from_command (num);
     }
 
+  do_cleanups (args_chain);
+
   /* Look for threads other than the current that this command ends up
      resuming too (due to schedlock off), and warn if they'll get a
      signal delivered.  "signal 0" is used to suppress a previous
@@ -1292,8 +1332,8 @@ signal_command (char *signum_exp, int fr
 	    {
 	      if (!must_confirm)
 		printf_unfiltered (_("Note:\n"));
-	      printf_unfiltered (_("  Thread %d previously stopped with signal %s, %s.\n"),
-				 tp->num,
+	      printf_unfiltered (_("  Thread %s previously stopped with signal %s, %s.\n"),
+				 print_thread_id (tp),
 				 gdb_signal_to_name (tp->suspend.stop_signal),
 				 gdb_signal_to_string (tp->suspend.stop_signal));
 	      must_confirm = 1;
@@ -1301,10 +1341,10 @@ signal_command (char *signum_exp, int fr
 	}
 
       if (must_confirm
-	  && !query (_("Continuing thread %d (the current thread) with specified signal will\n"
+	  && !query (_("Continuing thread %s (the current thread) with specified signal will\n"
 		       "still deliver the signals noted above to their respective threads.\n"
 		       "Continue anyway? "),
-		     inferior_thread ()->num))
+		     print_thread_id (inferior_thread ())))
 	error (_("Not confirmed."));
     }
 
@@ -1361,22 +1401,82 @@ queue_signal_command (char *signum_exp, 
   tp->suspend.stop_signal = oursig;
 }
 
-/* Continuation args to be passed to the "until" command
-   continuation.  */
-struct until_next_continuation_args
+/* Data for the FSM that manages the until (with no argument)
+   command.  */
+
+struct until_next_fsm
 {
-  /* The thread that was current when the command was executed.  */
+  /* The base class.  */
+  struct thread_fsm thread_fsm;
+
+  /* The thread that as current when the command was executed.  */
   int thread;
 };
 
-/* A continuation callback for until_next_command.  */
+static int until_next_fsm_should_stop (struct thread_fsm *self,
+				       struct thread_info *thread);
+static void until_next_fsm_clean_up (struct thread_fsm *self,
+				     struct thread_info *thread);
+static enum async_reply_reason
+  until_next_fsm_async_reply_reason (struct thread_fsm *self);
+
+/* until_next_fsm's vtable.  */
+
+static struct thread_fsm_ops until_next_fsm_ops =
+{
+  NULL, /* dtor */
+  until_next_fsm_clean_up,
+  until_next_fsm_should_stop,
+  NULL, /* return_value */
+  until_next_fsm_async_reply_reason,
+};
+
+/* Allocate a new until_next_fsm.  */
+
+static struct until_next_fsm *
+new_until_next_fsm (struct interp *cmd_interp, int thread)
+{
+  struct until_next_fsm *sm;
+
+  sm = XCNEW (struct until_next_fsm);
+  thread_fsm_ctor (&sm->thread_fsm, &until_next_fsm_ops, cmd_interp);
+
+  sm->thread = thread;
+
+  return sm;
+}
+
+/* Implementation of the 'should_stop' FSM method for the until (with
+   no arg) command.  */
+
+static int
+until_next_fsm_should_stop (struct thread_fsm *self,
+			    struct thread_info *tp)
+{
+  if (tp->control.stop_step)
+    thread_fsm_set_finished (self);
+
+  return 1;
+}
+
+/* Implementation of the 'clean_up' FSM method for the until (with no
+   arg) command.  */
 
 static void
-until_next_continuation (void *arg, int err)
+until_next_fsm_clean_up (struct thread_fsm *self, struct thread_info *thread)
 {
-  struct until_next_continuation_args *a = arg;
+  struct until_next_fsm *sm = (struct until_next_fsm *) self;
 
-  delete_longjmp_breakpoint (a->thread);
+  delete_longjmp_breakpoint (thread->global_num);
+}
+
+/* Implementation of the 'async_reply_reason' FSM method for the until
+   (with no arg) command.  */
+
+static enum async_reply_reason
+until_next_fsm_async_reply_reason (struct thread_fsm *self)
+{
+  return EXEC_ASYNC_END_STEPPING_RANGE;
 }
 
 /* Proceed until we reach a different source line with pc greater than
@@ -1395,8 +1495,9 @@ until_next_command (int from_tty)
   struct symbol *func;
   struct symtab_and_line sal;
   struct thread_info *tp = inferior_thread ();
-  int thread = tp->num;
+  int thread = tp->global_num;
   struct cleanup *old_chain;
+  struct until_next_fsm *sm;
 
   clear_proceed_status (0);
   set_step_frame ();
@@ -1433,25 +1534,14 @@ until_next_command (int from_tty)
 
   tp->control.step_over_calls = STEP_OVER_ALL;
 
-  tp->step_multi = 0;		/* Only one call to proceed */
-
   set_longjmp_breakpoint (tp, get_frame_id (frame));
   old_chain = make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
 
-  proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
-
-  if (target_can_async_p () && is_running (inferior_ptid))
-    {
-      struct until_next_continuation_args *cont_args;
-
-      discard_cleanups (old_chain);
-      cont_args = XNEW (struct until_next_continuation_args);
-      cont_args->thread = inferior_thread ()->num;
+  sm = new_until_next_fsm (command_interp (), tp->global_num);
+  tp->thread_fsm = &sm->thread_fsm;
+  discard_cleanups (old_chain);
 
-      add_continuation (tp, until_next_continuation, cont_args, xfree);
-    }
-  else
-    do_cleanups (old_chain);
+  proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
 }
 
 static void
@@ -1511,26 +1601,19 @@ advance_command (char *arg, int from_tty
    right after an inferior call has finished.  */
 
 struct value *
-get_return_value (struct value *function, struct type *value_type,
-		  struct dummy_frame_context_saver *ctx_saver)
+get_return_value (struct value *function, struct type *value_type)
 {
-  struct regcache *stop_regs = NULL;
+  struct regcache *stop_regs;
   struct gdbarch *gdbarch;
   struct value *value;
-  struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
+  struct cleanup *cleanup;
 
-  /* If registers were not saved, use the current registers.  */
-  if (ctx_saver != NULL)
-    stop_regs = dummy_frame_context_saver_get_regs (ctx_saver);
-  else
-    {
-      stop_regs = regcache_dup (get_current_regcache ());
-      make_cleanup_regcache_xfree (stop_regs);
-    }
+  stop_regs = regcache_dup (get_current_regcache ());
+  cleanup = make_cleanup_regcache_xfree (stop_regs);
 
   gdbarch = get_regcache_arch (stop_regs);
 
-  CHECK_TYPEDEF (value_type);
+  value_type = check_typedef (value_type);
   gdb_assert (TYPE_CODE (value_type) != TYPE_CODE_VOID);
 
   /* FIXME: 2003-09-27: When returning from a nested inferior function
@@ -1562,145 +1645,220 @@ get_return_value (struct value *function
   return value;
 }
 
-/* Print the result of a function at the end of a 'finish' command.
-   DTOR_DATA (if not NULL) can represent inferior registers right after
-   an inferior call has finished.  */
+/* The captured function return value/type and its position in the
+   value history.  */
 
-static void
-print_return_value (struct value *function, struct type *value_type,
-		    struct dummy_frame_context_saver *ctx_saver)
+struct return_value_info
 {
-  struct value *value = get_return_value (function, value_type, ctx_saver);
-  struct ui_out *uiout = current_uiout;
+  /* The captured return value.  May be NULL if we weren't able to
+     retrieve it.  See get_return_value.  */
+  struct value *value;
+
+  /* The return type.  In some cases, we'll not be able extract the
+     return value, but we always know the type.  */
+  struct type *type;
 
-  if (value)
+  /* If we captured a value, this is the value history index.  */
+  int value_history_index;
+};
+
+/* Helper for print_return_value.  */
+
+static void
+print_return_value_1 (struct ui_out *uiout, struct return_value_info *rv)
+{
+  if (rv->value != NULL)
     {
       struct value_print_options opts;
-      struct ui_file *stb;
-      struct cleanup *old_chain;
 
       /* Print it.  */
-      stb = mem_fileopen ();
-      old_chain = make_cleanup_ui_file_delete (stb);
-      ui_out_text (uiout, "Value returned is ");
-      ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
-			record_latest_value (value));
-      ui_out_text (uiout, " = ");
+      uiout->text ("Value returned is ");
+      uiout->field_fmt ("gdb-result-var", "$%d",
+			 rv->value_history_index);
+      uiout->text (" = ");
       get_no_prettyformat_print_options (&opts);
-      value_print (value, stb, &opts);
-      ui_out_field_stream (uiout, "return-value", stb);
-      ui_out_text (uiout, "\n");
-      do_cleanups (old_chain);
+
+      string_file stb;
+
+      value_print (rv->value, &stb, &opts);
+      uiout->field_stream ("return-value", stb);
+      uiout->text ("\n");
     }
   else
     {
-      struct cleanup *oldchain;
-      char *type_name;
+      std::string type_name = type_to_string (rv->type);
+      uiout->text ("Value returned has type: ");
+      uiout->field_string ("return-type", type_name.c_str ());
+      uiout->text (".");
+      uiout->text (" Cannot determine contents\n");
+    }
+}
+
+/* Print the result of a function at the end of a 'finish' command.
+   RV points at an object representing the captured return value/type
+   and its position in the value history.  */
+
+void
+print_return_value (struct ui_out *uiout, struct return_value_info *rv)
+{
+  if (rv->type == NULL || TYPE_CODE (rv->type) == TYPE_CODE_VOID)
+    return;
 
-      type_name = type_to_string (value_type);
-      oldchain = make_cleanup (xfree, type_name);
-      ui_out_text (uiout, "Value returned has type: ");
-      ui_out_field_string (uiout, "return-type", type_name);
-      ui_out_text (uiout, ".");
-      ui_out_text (uiout, " Cannot determine contents\n");
-      do_cleanups (oldchain);
+  TRY
+    {
+      /* print_return_value_1 can throw an exception in some
+	 circumstances.  We need to catch this so that we still
+	 delete the breakpoint.  */
+      print_return_value_1 (uiout, rv);
     }
+  CATCH (ex, RETURN_MASK_ALL)
+    {
+      exception_print (gdb_stdout, ex);
+    }
+  END_CATCH
 }
 
-/* Stuff that needs to be done by the finish command after the target
-   has stopped.  In asynchronous mode, we wait for the target to stop
-   in the call to poll or select in the event loop, so it is
-   impossible to do all the stuff as part of the finish_command
-   function itself.  The only chance we have to complete this command
-   is in fetch_inferior_event, which is called by the event loop as
-   soon as it detects that the target has stopped.  */
+/* Data for the FSM that manages the finish command.  */
 
-struct finish_command_continuation_args
+struct finish_command_fsm
 {
-  /* The thread that as current when the command was executed.  */
-  int thread;
+  /* The base class.  */
+  struct thread_fsm thread_fsm;
+
+  /* The momentary breakpoint set at the function's return address in
+     the caller.  */
   struct breakpoint *breakpoint;
+
+  /* The function that we're stepping out of.  */
   struct symbol *function;
 
-  /* Inferior registers stored right before dummy_frame has been freed
-     after an inferior call.  It can be NULL if no inferior call was
-     involved, GDB will then use current inferior registers.  */
-  struct dummy_frame_context_saver *ctx_saver;
+  /* If the FSM finishes successfully, this stores the function's
+     return value.  */
+  struct return_value_info return_value;
 };
 
-static void
-finish_command_continuation (void *arg, int err)
+static int finish_command_fsm_should_stop (struct thread_fsm *self,
+					   struct thread_info *thread);
+static void finish_command_fsm_clean_up (struct thread_fsm *self,
+					 struct thread_info *thread);
+static struct return_value_info *
+  finish_command_fsm_return_value (struct thread_fsm *self);
+static enum async_reply_reason
+  finish_command_fsm_async_reply_reason (struct thread_fsm *self);
+
+/* finish_command_fsm's vtable.  */
+
+static struct thread_fsm_ops finish_command_fsm_ops =
+{
+  NULL, /* dtor */
+  finish_command_fsm_clean_up,
+  finish_command_fsm_should_stop,
+  finish_command_fsm_return_value,
+  finish_command_fsm_async_reply_reason,
+  NULL, /* should_notify_stop */
+};
+
+/* Allocate a new finish_command_fsm.  */
+
+static struct finish_command_fsm *
+new_finish_command_fsm (struct interp *cmd_interp)
 {
-  struct finish_command_continuation_args *a = arg;
+  struct finish_command_fsm *sm;
 
-  if (!err)
-    {
-      struct thread_info *tp = NULL;
-      bpstat bs = NULL;
+  sm = XCNEW (struct finish_command_fsm);
+  thread_fsm_ctor (&sm->thread_fsm, &finish_command_fsm_ops, cmd_interp);
 
-      if (!ptid_equal (inferior_ptid, null_ptid)
-	  && target_has_execution
-	  && is_stopped (inferior_ptid))
-	{
-	  tp = inferior_thread ();
-	  bs = tp->control.stop_bpstat;
-	}
+  return sm;
+}
 
-      if (bpstat_find_breakpoint (bs, a->breakpoint) != NULL
-	  && a->function != NULL)
-	{
-	  struct type *value_type;
+/* Implementation of the 'should_stop' FSM method for the finish
+   commands.  Detects whether the thread stepped out of the function
+   successfully, and if so, captures the function's return value and
+   marks the FSM finished.  */
 
-	  value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (a->function));
-	  if (!value_type)
-	    internal_error (__FILE__, __LINE__,
-			    _("finish_command: function has no target type"));
+static int
+finish_command_fsm_should_stop (struct thread_fsm *self,
+				struct thread_info *tp)
+{
+  struct finish_command_fsm *f = (struct finish_command_fsm *) self;
+  struct return_value_info *rv = &f->return_value;
 
-	  if (TYPE_CODE (value_type) != TYPE_CODE_VOID)
-	    {
-	      struct value *func;
+  if (f->function != NULL
+      && bpstat_find_breakpoint (tp->control.stop_bpstat,
+				 f->breakpoint) != NULL)
+    {
+      /* We're done.  */
+      thread_fsm_set_finished (self);
 
-	      func = read_var_value (a->function, get_current_frame ());
-	      TRY
-		{
-		  /* print_return_value can throw an exception in some
-		     circumstances.  We need to catch this so that we still
-		     delete the breakpoint.  */
-		  print_return_value (func, value_type, a->ctx_saver);
-		}
-	      CATCH (ex, RETURN_MASK_ALL)
-		{
-		  exception_print (gdb_stdout, ex);
-		}
-	      END_CATCH
-	    }
-	}
+      rv->type = TYPE_TARGET_TYPE (SYMBOL_TYPE (f->function));
+      if (rv->type == NULL)
+	internal_error (__FILE__, __LINE__,
+			_("finish_command: function has no target type"));
+
+      if (TYPE_CODE (rv->type) != TYPE_CODE_VOID)
+	{
+	  struct value *func;
 
-      /* We suppress normal call of normal_stop observer and do it
-	 here so that the *stopped notification includes the return
-	 value.  */
-      if (bs != NULL && tp->control.proceed_to_finish)
-	observer_notify_normal_stop (bs, 1 /* print frame */);
+	  func = read_var_value (f->function, NULL, get_current_frame ());
+	  rv->value = get_return_value (func, rv->type);
+	  if (rv->value != NULL)
+	    rv->value_history_index = record_latest_value (rv->value);
+	}
+    }
+  else if (tp->control.stop_step)
+    {
+      /* Finishing from an inline frame, or reverse finishing.  In
+	 either case, there's no way to retrieve the return value.  */
+      thread_fsm_set_finished (self);
     }
 
-  delete_breakpoint (a->breakpoint);
-  delete_longjmp_breakpoint (a->thread);
+  return 1;
 }
 
+/* Implementation of the 'clean_up' FSM method for the finish
+   commands.  */
+
 static void
-finish_command_continuation_free_arg (void *arg)
+finish_command_fsm_clean_up (struct thread_fsm *self,
+			     struct thread_info *thread)
 {
-  struct finish_command_continuation_args *cargs = arg;
+  struct finish_command_fsm *f = (struct finish_command_fsm *) self;
 
-  if (cargs->ctx_saver != NULL)
-    dummy_frame_context_saver_drop (cargs->ctx_saver);
-  xfree (cargs);
+  if (f->breakpoint != NULL)
+    {
+      delete_breakpoint (f->breakpoint);
+      f->breakpoint = NULL;
+    }
+  delete_longjmp_breakpoint (thread->global_num);
+}
+
+/* Implementation of the 'return_value' FSM method for the finish
+   commands.  */
+
+static struct return_value_info *
+finish_command_fsm_return_value (struct thread_fsm *self)
+{
+  struct finish_command_fsm *f = (struct finish_command_fsm *) self;
+
+  return &f->return_value;
+}
+
+/* Implementation of the 'async_reply_reason' FSM method for the
+   finish commands.  */
+
+static enum async_reply_reason
+finish_command_fsm_async_reply_reason (struct thread_fsm *self)
+{
+  if (execution_direction == EXEC_REVERSE)
+    return EXEC_ASYNC_END_STEPPING_RANGE;
+  else
+    return EXEC_ASYNC_FUNCTION_FINISHED;
 }
 
 /* finish_backward -- helper function for finish_command.  */
 
 static void
-finish_backward (struct symbol *function)
+finish_backward (struct finish_command_fsm *sm)
 {
   struct symtab_and_line sal;
   struct thread_info *tp = inferior_thread ();
@@ -1749,58 +1907,57 @@ finish_backward (struct symbol *function
     }
 }
 
-/* finish_forward -- helper function for finish_command.  */
+/* finish_forward -- helper function for finish_command.  FRAME is the
+   frame that called the function we're about to step out of.  */
 
 static void
-finish_forward (struct symbol *function, struct frame_info *frame)
+finish_forward (struct finish_command_fsm *sm, struct frame_info *frame)
 {
   struct frame_id frame_id = get_frame_id (frame);
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct symtab_and_line sal;
   struct thread_info *tp = inferior_thread ();
-  struct breakpoint *breakpoint;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  struct finish_command_continuation_args *cargs;
-  int thread = tp->num;
-  struct dummy_frame_context_saver *saver = NULL;
 
   sal = find_pc_line (get_frame_pc (frame), 0);
   sal.pc = get_frame_pc (frame);
 
-  if (get_frame_type (frame) == DUMMY_FRAME)
-    {
-      saver = dummy_frame_context_saver_setup (get_stack_frame_id (frame),
-					       inferior_ptid);
-      make_cleanup (dummy_frame_context_saver_cleanup, saver);
-    }
-
-  breakpoint = set_momentary_breakpoint (gdbarch, sal,
-					 get_stack_frame_id (frame),
-                                         bp_finish);
+  sm->breakpoint = set_momentary_breakpoint (gdbarch, sal,
+					     get_stack_frame_id (frame),
+					     bp_finish);
 
   /* set_momentary_breakpoint invalidates FRAME.  */
   frame = NULL;
 
-  make_cleanup_delete_breakpoint (breakpoint);
-
   set_longjmp_breakpoint (tp, frame_id);
-  make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
 
   /* We want to print return value, please...  */
   tp->control.proceed_to_finish = 1;
-  cargs = xmalloc (sizeof (*cargs));
 
-  cargs->thread = thread;
-  cargs->breakpoint = breakpoint;
-  cargs->function = function;
-  cargs->ctx_saver = saver;
-  add_continuation (tp, finish_command_continuation, cargs,
-                    finish_command_continuation_free_arg);
   proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
+}
 
-  discard_cleanups (old_chain);
-  if (!target_can_async_p ())
-    do_all_continuations (0);
+/* Skip frames for "finish".  */
+
+static struct frame_info *
+skip_finish_frames (struct frame_info *frame)
+{
+  struct frame_info *start;
+
+  do
+    {
+      start = frame;
+
+      frame = skip_tailcall_frames (frame);
+      if (frame == NULL)
+	break;
+
+      frame = skip_unwritable_frames (frame);
+      if (frame == NULL)
+	break;
+    }
+  while (start != frame);
+
+  return frame;
 }
 
 /* "finish": Set a temporary breakpoint at the place the selected
@@ -1810,9 +1967,10 @@ static void
 finish_command (char *arg, int from_tty)
 {
   struct frame_info *frame;
-  struct symbol *function;
   int async_exec;
   struct cleanup *args_chain;
+  struct finish_command_fsm *sm;
+  struct thread_info *tp;
 
   ERROR_NO_INFERIOR;
   ensure_not_tfind_mode ();
@@ -1837,9 +1995,14 @@ finish_command (char *arg, int from_tty)
 
   clear_proceed_status (0);
 
+  tp = inferior_thread ();
+
+  sm = new_finish_command_fsm (command_interp ());
+
+  tp->thread_fsm = &sm->thread_fsm;
+
   /* Finishing from an inline frame is completely different.  We don't
-     try to show the "return value" - no way to locate it.  So we do
-     not need a completion.  */
+     try to show the "return value" - no way to locate it.  */
   if (get_frame_type (get_selected_frame (_("No selected frame.")))
       == INLINE_FRAME)
     {
@@ -1848,7 +2011,6 @@ finish_command (char *arg, int from_tty)
 	 called by that frame.  We don't use the magic "1" value for
 	 step_range_end, because then infrun will think this is nexti,
 	 and not step over the rest of this inlined function call.  */
-      struct thread_info *tp = inferior_thread ();
       struct symtab_and_line empty_sal;
 
       init_sal (&empty_sal);
@@ -1869,14 +2031,9 @@ finish_command (char *arg, int from_tty)
       return;
     }
 
-  /* Ignore TAILCALL_FRAME type frames, they were executed already before
-     entering THISFRAME.  */
-  while (get_frame_type (frame) == TAILCALL_FRAME)
-    frame = get_prev_frame (frame);
-
   /* Find the function we will return from.  */
 
-  function = find_pc_function (get_frame_pc (get_selected_frame (NULL)));
+  sm->function = find_pc_function (get_frame_pc (get_selected_frame (NULL)));
 
   /* Print info on the selected frame, including level number but not
      source.  */
@@ -1886,10 +2043,10 @@ finish_command (char *arg, int from_tty)
 	printf_filtered (_("Run back to call of "));
       else
 	{
-	  if (function != NULL && TYPE_NO_RETURN (function->type)
+	  if (sm->function != NULL && TYPE_NO_RETURN (sm->function->type)
 	      && !query (_("warning: Function %s does not return normally.\n"
 			   "Try to finish anyway? "),
-			 SYMBOL_PRINT_NAME (function)))
+			 SYMBOL_PRINT_NAME (sm->function)))
 	    error (_("Not confirmed."));
 	  printf_filtered (_("Run till exit from "));
 	}
@@ -1898,9 +2055,16 @@ finish_command (char *arg, int from_tty)
     }
 
   if (execution_direction == EXEC_REVERSE)
-    finish_backward (function);
+    finish_backward (sm);
   else
-    finish_forward (function, frame);
+    {
+      frame = skip_finish_frames (frame);
+
+      if (frame == NULL)
+	error (_("Cannot find the caller frame."));
+
+      finish_forward (sm, frame);
+    }
 }
 
 
@@ -2141,7 +2305,6 @@ default_print_one_register_info (struct 
   if (TYPE_CODE (regtype) == TYPE_CODE_FLT
       || TYPE_CODE (regtype) == TYPE_CODE_DECFLOAT)
     {
-      int j;
       struct value_print_options opts;
       const gdb_byte *valaddr = value_contents_for_printing (val);
       enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (regtype));
@@ -2150,7 +2313,6 @@ default_print_one_register_info (struct 
       opts.deref_ref = 1;
 
       val_print (regtype,
-		 value_contents_for_printing (val),
 		 value_embedded_offset (val), 0,
 		 file, 0, val, &opts, current_language);
 
@@ -2169,7 +2331,6 @@ default_print_one_register_info (struct 
       get_formatted_print_options (&opts, 'x');
       opts.deref_ref = 1;
       val_print (regtype,
-		 value_contents_for_printing (val),
 		 value_embedded_offset (val), 0,
 		 file, 0, val, &opts, current_language);
       /* If not a vector register, print it also according to its
@@ -2180,7 +2341,6 @@ default_print_one_register_info (struct 
 	  opts.deref_ref = 1;
 	  fprintf_filtered (file, "\t");
 	  val_print (regtype,
-		     value_contents_for_printing (val),
 		     value_embedded_offset (val), 0,
 		     file, 0, val, &opts, current_language);
 	}
@@ -2477,23 +2637,20 @@ proceed_after_attach (int pid)
   do_cleanups (old_chain);
 }
 
-/* attach_command --
-   takes a program started up outside of gdb and ``attaches'' to it.
-   This stops it cold in its tracks and allows us to start debugging it.
-   and wait for the trace-trap that results from attaching.  */
+/* See inferior.h.  */
 
-static void
-attach_command_post_wait (char *args, int from_tty, int async_exec)
+void
+setup_inferior (int from_tty)
 {
   struct inferior *inferior;
 
   inferior = current_inferior ();
-  inferior->control.stop_soon = NO_STOP_QUIETLY;
+  inferior->needs_setup = 0;
 
   /* If no exec file is yet known, try to determine it from the
      process itself.  */
   if (get_exec_file (0) == NULL)
-    exec_file_locate_attach (ptid_get_pid (inferior_ptid), from_tty);
+    exec_file_locate_attach (ptid_get_pid (inferior_ptid), 1, from_tty);
   else
     {
       reopen_exec_file ();
@@ -2504,8 +2661,37 @@ attach_command_post_wait (char *args, in
   target_post_attach (ptid_get_pid (inferior_ptid));
 
   post_create_inferior (&current_target, from_tty);
+}
+
+/* What to do after the first program stops after attaching.  */
+enum attach_post_wait_mode
+{
+  /* Do nothing.  Leaves threads as they are.  */
+  ATTACH_POST_WAIT_NOTHING,
 
-  if (async_exec)
+  /* Re-resume threads that are marked running.  */
+  ATTACH_POST_WAIT_RESUME,
+
+  /* Stop all threads.  */
+  ATTACH_POST_WAIT_STOP,
+};
+
+/* Called after we've attached to a process and we've seen it stop for
+   the first time.  If ASYNC_EXEC is true, re-resume threads that
+   should be running.  Else if ATTACH, */
+
+static void
+attach_post_wait (char *args, int from_tty, enum attach_post_wait_mode mode)
+{
+  struct inferior *inferior;
+
+  inferior = current_inferior ();
+  inferior->control.stop_soon = NO_STOP_QUIETLY;
+
+  if (inferior->needs_setup)
+    setup_inferior (from_tty);
+
+  if (mode == ATTACH_POST_WAIT_RESUME)
     {
       /* The user requested an `attach&', so be sure to leave threads
 	 that didn't get a signal running.  */
@@ -2525,14 +2711,11 @@ attach_command_post_wait (char *args, in
 	    }
 	}
     }
-  else
+  else if (mode == ATTACH_POST_WAIT_STOP)
     {
       /* The user requested a plain `attach', so be sure to leave
 	 the inferior stopped.  */
 
-      if (target_can_async_p ())
-	async_enable_stdin ();
-
       /* At least the current thread is already stopped.  */
 
       /* In all-stop, by definition, all threads have to be already
@@ -2542,6 +2725,30 @@ attach_command_post_wait (char *args, in
 	 should have no effect on already stopped threads.  */
       if (non_stop)
 	target_stop (pid_to_ptid (inferior->pid));
+      else if (target_is_non_stop_p ())
+	{
+	  struct thread_info *thread;
+	  struct thread_info *lowest = inferior_thread ();
+	  int pid = current_inferior ()->pid;
+
+	  stop_all_threads ();
+
+	  /* It's not defined which thread will report the attach
+	     stop.  For consistency, always select the thread with
+	     lowest GDB number, which should be the main thread, if it
+	     still exists.  */
+	  ALL_NON_EXITED_THREADS (thread)
+	    {
+	      if (ptid_get_pid (thread->ptid) == pid)
+		{
+		  if (thread->inf->num < lowest->inf->num
+		      || thread->per_inf_num < lowest->per_inf_num)
+		    lowest = thread;
+		}
+	    }
+
+	  switch_to_thread (lowest->ptid);
+	}
 
       /* Tell the user/frontend where we're stopped.  */
       normal_stop ();
@@ -2554,35 +2761,43 @@ struct attach_command_continuation_args
 {
   char *args;
   int from_tty;
-  int async_exec;
+  enum attach_post_wait_mode mode;
 };
 
 static void
 attach_command_continuation (void *args, int err)
 {
-  struct attach_command_continuation_args *a = args;
+  struct attach_command_continuation_args *a
+    = (struct attach_command_continuation_args *) args;
 
   if (err)
     return;
 
-  attach_command_post_wait (a->args, a->from_tty, a->async_exec);
+  attach_post_wait (a->args, a->from_tty, a->mode);
 }
 
 static void
 attach_command_continuation_free_args (void *args)
 {
-  struct attach_command_continuation_args *a = args;
+  struct attach_command_continuation_args *a
+    = (struct attach_command_continuation_args *) args;
 
   xfree (a->args);
   xfree (a);
 }
 
+/* "attach" command entry point.  Takes a program started up outside
+   of gdb and ``attaches'' to it.  This stops it cold in its tracks
+   and allows us to start debugging it.  */
+
 void
 attach_command (char *args, int from_tty)
 {
   int async_exec;
   struct cleanup *args_chain;
   struct target_ops *attach_target;
+  struct inferior *inferior = current_inferior ();
+  enum attach_post_wait_mode mode;
 
   dont_repeat ();		/* Not for the faint of heart */
 
@@ -2617,9 +2832,6 @@ attach_command (char *args, int from_tty
      shouldn't refer to attach_target again.  */
   attach_target = NULL;
 
-  /* Done with ARGS.  */
-  do_cleanups (args_chain);
-
   /* Set up the "saved terminal modes" of the inferior
      based on what modes we are starting it with.  */
   target_terminal_init ();
@@ -2645,7 +2857,9 @@ attach_command (char *args, int from_tty
   init_wait_for_inferior ();
   clear_proceed_status (0);
 
-  if (non_stop)
+  inferior->needs_setup = 1;
+
+  if (target_is_non_stop_p ())
     {
       /* If we find that the current thread isn't stopped, explicitly
 	 do so now, because we're going to install breakpoints and
@@ -2660,11 +2874,13 @@ attach_command (char *args, int from_tty
 	target_stop (pid_to_ptid (ptid_get_pid (inferior_ptid)));
     }
 
+  mode = async_exec ? ATTACH_POST_WAIT_RESUME : ATTACH_POST_WAIT_STOP;
+
   /* Some system don't generate traps when attaching to inferior.
      E.g. Mach 3 or GNU hurd.  */
   if (!target_attach_no_wait)
     {
-      struct inferior *inferior = current_inferior ();
+      struct attach_command_continuation_args *a;
 
       /* Careful here.  See comments in inferior.h.  Basically some
 	 OSes don't ignore SIGSTOPs on continue requests anymore.  We
@@ -2673,24 +2889,25 @@ attach_command (char *args, int from_tty
 	 STOP_QUIETLY_NO_SIGSTOP is for.  */
       inferior->control.stop_soon = STOP_QUIETLY_NO_SIGSTOP;
 
-      if (target_can_async_p ())
-	{
-	  /* sync_execution mode.  Wait for stop.  */
-	  struct attach_command_continuation_args *a;
-
-	  a = xmalloc (sizeof (*a));
-	  a->args = xstrdup (args);
-	  a->from_tty = from_tty;
-	  a->async_exec = async_exec;
-	  add_inferior_continuation (attach_command_continuation, a,
-				     attach_command_continuation_free_args);
-	  return;
-	}
+      /* Wait for stop.  */
+      a = XNEW (struct attach_command_continuation_args);
+      a->args = xstrdup (args);
+      a->from_tty = from_tty;
+      a->mode = mode;
+      add_inferior_continuation (attach_command_continuation, a,
+				 attach_command_continuation_free_args);
+      /* Done with ARGS.  */
+      do_cleanups (args_chain);
 
-      wait_for_inferior ();
+      if (!target_is_async_p ())
+	mark_infrun_async_event_handler ();
+      return;
     }
 
-  attach_command_post_wait (args, from_tty, async_exec);
+  /* Done with ARGS.  */
+  do_cleanups (args_chain);
+
+  attach_post_wait (args, from_tty, mode);
 }
 
 /* We had just found out that the target was already attached to an
@@ -2705,26 +2922,25 @@ void
 notice_new_inferior (ptid_t ptid, int leave_running, int from_tty)
 {
   struct cleanup* old_chain;
-  int async_exec;
+  enum attach_post_wait_mode mode;
 
   old_chain = make_cleanup (null_cleanup, NULL);
 
-  /* If in non-stop, leave threads as running as they were.  If
-     they're stopped for some reason other than us telling it to, the
-     target reports a signal != GDB_SIGNAL_0.  We don't try to
-     resume threads with such a stop signal.  */
-  async_exec = non_stop;
+  mode = leave_running ? ATTACH_POST_WAIT_RESUME : ATTACH_POST_WAIT_NOTHING;
 
   if (!ptid_equal (inferior_ptid, null_ptid))
     make_cleanup_restore_current_thread ();
 
-  switch_to_thread (ptid);
+  /* Avoid reading registers -- we haven't fetched the target
+     description yet.  */
+  switch_to_thread_no_regs (find_thread_ptid (ptid));
 
   /* When we "notice" a new inferior we need to do all the things we
      would normally do if we had just attached to it.  */
 
   if (is_executing (inferior_ptid))
     {
+      struct attach_command_continuation_args *a;
       struct inferior *inferior = current_inferior ();
 
       /* We're going to install breakpoints, and poke at memory,
@@ -2735,26 +2951,18 @@ notice_new_inferior (ptid_t ptid, int le
       inferior->control.stop_soon = STOP_QUIETLY_REMOTE;
 
       /* Wait for stop before proceeding.  */
-      if (target_can_async_p ())
-	{
-	  struct attach_command_continuation_args *a;
-
-	  a = xmalloc (sizeof (*a));
-	  a->args = xstrdup ("");
-	  a->from_tty = from_tty;
-	  a->async_exec = async_exec;
-	  add_inferior_continuation (attach_command_continuation, a,
-				     attach_command_continuation_free_args);
+      a = XNEW (struct attach_command_continuation_args);
+      a->args = xstrdup ("");
+      a->from_tty = from_tty;
+      a->mode = mode;
+      add_inferior_continuation (attach_command_continuation, a,
+				 attach_command_continuation_free_args);
 
-	  do_cleanups (old_chain);
-	  return;
-	}
-      else
-	wait_for_inferior ();
+      do_cleanups (old_chain);
+      return;
     }
 
-  async_exec = leave_running;
-  attach_command_post_wait ("" /* args */, from_tty, async_exec);
+  attach_post_wait ("" /* args */, from_tty, mode);
 
   do_cleanups (old_chain);
 }
@@ -2784,6 +2992,13 @@ detach_command (char *args, int from_tty
 
   target_detach (args, from_tty);
 
+  /* The current inferior process was just detached successfully.  Get
+     rid of breakpoints that no longer make sense.  Note we don't do
+     this within target_detach because that is also used when
+     following child forks, and in that case we will want to transfer
+     breakpoints to the child, not delete them.  */
+  breakpoint_init_inferior (inf_exited);
+
   /* If the solist is global across inferiors, don't clear it when we
      detach from a single inferior.  */
   if (!gdbarch_has_global_solist (target_gdbarch ()))
@@ -2828,7 +3043,11 @@ interrupt_target_1 (int all_threads)
     ptid = minus_one_ptid;
   else
     ptid = inferior_ptid;
-  target_stop (ptid);
+
+  if (non_stop)
+    target_stop (ptid);
+  else
+    target_interrupt (ptid);
 
   /* Tag the thread as having been explicitly requested to stop, so
      other parts of gdb know not to resume this thread automatically,
@@ -2842,7 +3061,7 @@ interrupt_target_1 (int all_threads)
 
 /* interrupt [-a]
    Stop the execution of the target while running in async mode, in
-   the backgound.  In all-stop, stop the whole process.  In non-stop
+   the background.  In all-stop, stop the whole process.  In non-stop
    mode, stop the current thread only by default, or stop all threads
    if the `-a' switch is used.  */
 
@@ -2999,14 +3218,16 @@ _initialize_infcmd (void)
   const char *cmd_name;
 
   /* Add the filename of the terminal connected to inferior I/O.  */
-  add_setshow_filename_cmd ("inferior-tty", class_run,
-			    &inferior_io_terminal_scratch, _("\
+  add_setshow_optional_filename_cmd ("inferior-tty", class_run,
+				     &inferior_io_terminal_scratch, _("\
 Set terminal for future runs of program being debugged."), _("\
 Show terminal for future runs of program being debugged."), _("\
-Usage: set inferior-tty /dev/pts/1"),
-			    set_inferior_tty_command,
-			    show_inferior_tty_command,
-			    &setlist, &showlist);
+Usage: set inferior-tty [TTY]\n\n\
+If TTY is omitted, the default behavior of using the same terminal as GDB\n\
+is restored."),
+				     set_inferior_tty_command,
+				     show_inferior_tty_command,
+				     &setlist, &showlist);
   add_com_alias ("tty", "set inferior-tty", class_alias, 0);
 
   cmd_name = "args";
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inferior.c ./gdb/inferior.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inferior.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inferior.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Multi-process control for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,7 +74,7 @@ set_current_inferior (struct inferior *i
 static void
 restore_inferior (void *arg)
 {
-  struct inferior *saved_inferior = arg;
+  struct inferior *saved_inferior = (struct inferior *) arg;
 
   set_current_inferior (saved_inferior);
 }
@@ -128,15 +128,24 @@ add_inferior_silent (int pid)
 {
   struct inferior *inf;
 
-  inf = xmalloc (sizeof (*inf));
+  inf = XNEW (struct inferior);
   memset (inf, 0, sizeof (*inf));
   inf->pid = pid;
 
   inf->control.stop_soon = NO_STOP_QUIETLY;
 
   inf->num = ++highest_inferior_num;
-  inf->next = inferior_list;
-  inferior_list = inf;
+
+  if (inferior_list == NULL)
+    inferior_list = inf;
+  else
+    {
+      struct inferior *last;
+
+      for (last = inferior_list; last->next != NULL; last = last->next)
+	;
+      last->next = inf;
+    }
 
   inf->environment = make_environ ();
   init_environ (inf->environment);
@@ -171,7 +180,8 @@ struct delete_thread_of_inferior_arg
 static int
 delete_thread_of_inferior (struct thread_info *tp, void *data)
 {
-  struct delete_thread_of_inferior_arg *arg = data;
+  struct delete_thread_of_inferior_arg *arg
+    = (struct delete_thread_of_inferior_arg *) data;
 
   if (ptid_get_pid (tp->ptid) == arg->pid)
     {
@@ -184,11 +194,8 @@ delete_thread_of_inferior (struct thread
   return 0;
 }
 
-/* If SILENT then be quiet -- don't announce a inferior death, or the
-   exit of its threads.  */
-
 void
-delete_inferior_1 (struct inferior *todel, int silent)
+delete_inferior (struct inferior *todel)
 {
   struct inferior *inf, *infprev;
   struct delete_thread_of_inferior_arg arg;
@@ -203,7 +210,7 @@ delete_inferior_1 (struct inferior *tode
     return;
 
   arg.pid = inf->pid;
-  arg.silent = silent;
+  arg.silent = 1;
 
   iterate_over_threads (delete_thread_of_inferior, &arg);
 
@@ -214,29 +221,13 @@ delete_inferior_1 (struct inferior *tode
 
   observer_notify_inferior_removed (inf);
 
-  free_inferior (inf);
-}
-
-void
-delete_inferior (int pid)
-{
-  struct inferior *inf = find_inferior_pid (pid);
-
-  delete_inferior_1 (inf, 0);
-
-  if (print_inferior_events)
-    printf_unfiltered (_("[Inferior %d exited]\n"), pid);
-}
-
-void
-delete_inferior_silent (int pid)
-{
-  struct inferior *inf = find_inferior_pid (pid);
+  /* If this program space is rendered useless, remove it. */
+  if (program_space_empty_p (inf->pspace))
+    delete_program_space (inf->pspace);
 
-  delete_inferior_1 (inf, 1);
+  free_inferior (inf);
 }
 
-
 /* If SILENT then be quiet -- don't announce a inferior exit, or the
    exit of its threads.  */
 
@@ -258,12 +249,13 @@ exit_inferior_1 (struct inferior *inftoe
 
   iterate_over_threads (delete_thread_of_inferior, &arg);
 
-  /* Notify the observers before removing the inferior from the list,
-     so that the observers have a chance to look it up.  */
   observer_notify_inferior_exit (inf);
 
   inf->pid = 0;
   inf->fake_pid_p = 0;
+  xfree (inf->priv);
+  inf->priv = NULL;
+
   if (inf->vfork_parent != NULL)
     {
       inf->vfork_parent->vfork_child = NULL;
@@ -468,22 +460,41 @@ have_inferiors (void)
   return 0;
 }
 
+/* Return the number of live inferiors.  We account for the case
+   where an inferior might have a non-zero pid but no threads, as
+   in the middle of a 'mourn' operation.  */
+
 int
-have_live_inferiors (void)
+number_of_live_inferiors (void)
 {
   struct inferior *inf;
+  int num_inf = 0;
 
   for (inf = inferior_list; inf; inf = inf->next)
     if (inf->pid != 0)
       {
 	struct thread_info *tp;
-	
-	tp = any_thread_of_process (inf->pid);
-	if (tp && target_has_execution_1 (tp->ptid))
-	  break;
+
+	ALL_NON_EXITED_THREADS (tp)
+	 if (tp && ptid_get_pid (tp->ptid) == inf->pid)
+	   if (target_has_execution_1 (tp->ptid))
+	     {
+	       /* Found a live thread in this inferior, go to the next
+		  inferior.  */
+	       ++num_inf;
+	       break;
+	     }
       }
 
-  return inf != NULL;
+  return num_inf;
+}
+
+/* Return true if there is at least one live inferior.  */
+
+int
+have_live_inferiors (void)
+{
+  return number_of_live_inferiors () > 0;
 }
 
 /* Prune away any unused inferiors, and then prune away no longer used
@@ -509,11 +520,9 @@ prune_inferiors (void)
 	}
 
       *ss_link = ss->next;
-      delete_inferior_1 (ss, 1);
+      delete_inferior (ss);
       ss = *ss_link;
     }
-
-  prune_program_spaces ();
 }
 
 /* Simply returns the count of inferiors.  */
@@ -542,6 +551,21 @@ inferior_pid_to_str (int pid)
     return _("<null>");
 }
 
+/* See inferior.h.  */
+
+void
+print_selected_inferior (struct ui_out *uiout)
+{
+  struct inferior *inf = current_inferior ();
+  const char *filename = inf->pspace->pspace_exec_filename;
+
+  if (filename == NULL)
+    filename = _("<noexec>");
+
+  uiout->message (_("[Switching to inferior %d [%s] (%s)]\n"),
+		  inf->num, inferior_pid_to_str (inf->pid), filename);
+}
+
 /* Prints the list of inferiors and their details on UIOUT.  This is a
    version of 'info_inferior_command' suitable for use from MI.
 
@@ -567,18 +591,18 @@ print_inferior (struct ui_out *uiout, ch
 
   if (inf_count == 0)
     {
-      ui_out_message (uiout, 0, "No inferiors.\n");
+      uiout->message ("No inferiors.\n");
       return;
     }
 
   old_chain = make_cleanup_ui_out_table_begin_end (uiout, 4, inf_count,
 						   "inferiors");
-  ui_out_table_header (uiout, 1, ui_left, "current", "");
-  ui_out_table_header (uiout, 4, ui_left, "number", "Num");
-  ui_out_table_header (uiout, 17, ui_left, "target-id", "Description");
-  ui_out_table_header (uiout, 17, ui_left, "exec", "Executable");
+  uiout->table_header (1, ui_left, "current", "");
+  uiout->table_header (4, ui_left, "number", "Num");
+  uiout->table_header (17, ui_left, "target-id", "Description");
+  uiout->table_header (17, ui_left, "exec", "Executable");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
   for (inf = inferior_list; inf; inf = inf->next)
     {
       struct cleanup *chain2;
@@ -589,35 +613,34 @@ print_inferior (struct ui_out *uiout, ch
       chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
       if (inf == current_inferior ())
-	ui_out_field_string (uiout, "current", "*");
+	uiout->field_string ("current", "*");
       else
-	ui_out_field_skip (uiout, "current");
+	uiout->field_skip ("current");
 
-      ui_out_field_int (uiout, "number", inf->num);
+      uiout->field_int ("number", inf->num);
 
-      ui_out_field_string (uiout, "target-id",
-			   inferior_pid_to_str (inf->pid));
+      uiout->field_string ("target-id", inferior_pid_to_str (inf->pid));
 
       if (inf->pspace->pspace_exec_filename != NULL)
-	ui_out_field_string (uiout, "exec", inf->pspace->pspace_exec_filename);
+	uiout->field_string ("exec", inf->pspace->pspace_exec_filename);
       else
-	ui_out_field_skip (uiout, "exec");
+	uiout->field_skip ("exec");
 
       /* Print extra info that isn't really fit to always present in
 	 tabular form.  Currently we print the vfork parent/child
 	 relationships, if any.  */
       if (inf->vfork_parent)
 	{
-	  ui_out_text (uiout, _("\n\tis vfork child of inferior "));
-	  ui_out_field_int (uiout, "vfork-parent", inf->vfork_parent->num);
+	  uiout->text (_("\n\tis vfork child of inferior "));
+	  uiout->field_int ("vfork-parent", inf->vfork_parent->num);
 	}
       if (inf->vfork_child)
 	{
-	  ui_out_text (uiout, _("\n\tis vfork parent of inferior "));
-	  ui_out_field_int (uiout, "vfork-child", inf->vfork_child->num);
+	  uiout->text (_("\n\tis vfork parent of inferior "));
+	  uiout->field_int ("vfork-child", inf->vfork_child->num);
 	}
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
       do_cleanups (chain2);
     }
 
@@ -627,17 +650,15 @@ print_inferior (struct ui_out *uiout, ch
 static void
 detach_inferior_command (char *args, int from_tty)
 {
-  int num, pid;
   struct thread_info *tp;
-  struct get_number_or_range_state state;
 
   if (!args || !*args)
     error (_("Requires argument (inferior id(s) to detach)"));
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      num = get_number_or_range (&state);
+      int num = parser.get_number ();
 
       if (!valid_gdb_inferior_id (num))
 	{
@@ -645,7 +666,12 @@ detach_inferior_command (char *args, int
 	  continue;
 	}
 
-      pid = gdb_inferior_id_to_pid (num);
+      int pid = gdb_inferior_id_to_pid (num);
+      if (pid == 0)
+	{
+	  warning (_("Inferior ID %d is not running."), num);
+	  continue;
+	}
 
       tp = any_thread_of_process (pid);
       if (!tp)
@@ -663,17 +689,15 @@ detach_inferior_command (char *args, int
 static void
 kill_inferior_command (char *args, int from_tty)
 {
-  int num, pid;
   struct thread_info *tp;
-  struct get_number_or_range_state state;
 
   if (!args || !*args)
     error (_("Requires argument (inferior id(s) to kill)"));
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      num = get_number_or_range (&state);
+      int num = parser.get_number ();
 
       if (!valid_gdb_inferior_id (num))
 	{
@@ -681,7 +705,12 @@ kill_inferior_command (char *args, int f
 	  continue;
 	}
 
-      pid = gdb_inferior_id_to_pid (num);
+      int pid = gdb_inferior_id_to_pid (num);
+      if (pid == 0)
+	{
+	  warning (_("Inferior ID %d is not running."), num);
+	  continue;
+	}
 
       tp = any_thread_of_process (pid);
       if (!tp)
@@ -710,13 +739,6 @@ inferior_command (char *args, int from_t
   if (inf == NULL)
     error (_("Inferior ID %d not known."), num);
 
-  printf_filtered (_("[Switching to inferior %d [%s] (%s)]\n"),
-		   inf->num,
-		   inferior_pid_to_str (inf->pid),
-		   (inf->pspace->pspace_exec_filename != NULL
-		    ? inf->pspace->pspace_exec_filename
-		    : _("<noexec>")));
-
   if (inf->pid != 0)
     {
       if (inf->pid != ptid_get_pid (inferior_ptid))
@@ -730,26 +752,18 @@ inferior_command (char *args, int from_t
 	  switch_to_thread (tp->ptid);
 	}
 
-      printf_filtered (_("[Switching to thread %d (%s)] "),
-		       pid_to_thread_id (inferior_ptid),
-		       target_pid_to_str (inferior_ptid));
+      observer_notify_user_selected_context_changed
+	(USER_SELECTED_INFERIOR
+	 | USER_SELECTED_THREAD
+	 | USER_SELECTED_FRAME);
     }
   else
     {
-      struct inferior *inf;
-
-      inf = find_inferior_id (num);
       set_current_inferior (inf);
       switch_to_thread (null_ptid);
       set_current_program_space (inf->pspace);
-    }
 
-  if (inf->pid != 0 && is_running (inferior_ptid))
-    ui_out_text (current_uiout, "(running)\n");
-  else if (inf->pid != 0)
-    {
-      ui_out_text (current_uiout, "\n");
-      print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+      observer_notify_user_selected_context_changed (USER_SELECTED_INFERIOR);
     }
 }
 
@@ -766,18 +780,14 @@ info_inferiors_command (char *args, int 
 static void
 remove_inferior_command (char *args, int from_tty)
 {
-  int num;
-  struct inferior *inf;
-  struct get_number_or_range_state state;
-
   if (args == NULL || *args == '\0')
     error (_("Requires an argument (inferior id(s) to remove)"));
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      num = get_number_or_range (&state);
-      inf = find_inferior_id (num);
+      int num = parser.get_number ();
+      struct inferior *inf = find_inferior_id (num);
 
       if (inf == NULL)
 	{
@@ -787,7 +797,7 @@ remove_inferior_command (char *args, int
 
       if (inf == current_inferior ())
 	{
-	  warning (_("Can not remove current symbol inferior %d."), num);
+	  warning (_("Can not remove current inferior %d."), num);
 	  continue;
 	}
     
@@ -797,10 +807,8 @@ remove_inferior_command (char *args, int
 	  continue;
 	}
 
-      delete_inferior_1 (inf, 1);
+      delete_inferior (inf);
     }
-
-  prune_program_spaces ();
 }
 
 struct inferior *
@@ -839,8 +847,12 @@ add_inferior_command (char *args, int fr
   int i, copies = 1;
   char *exec = NULL;
   char **argv;
+  symfile_add_flags add_flags = 0;
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
+
   if (args)
     {
       argv = gdb_buildargv (args);
@@ -888,7 +900,7 @@ add_inferior_command (char *args, int fr
 	  switch_to_thread (null_ptid);
 
 	  exec_file_attach (exec, from_tty);
-	  symbol_file_add_main (exec, from_tty);
+	  symbol_file_add_main (exec, add_flags);
 	}
     }
 
@@ -992,6 +1004,26 @@ show_print_inferior_events (struct ui_fi
   fprintf_filtered (file, _("Printing of inferior events is %s.\n"), value);
 }
 
+/* Return a new value for the selected inferior's id.  */
+
+static struct value *
+inferior_id_make_value (struct gdbarch *gdbarch, struct internalvar *var,
+			void *ignore)
+{
+  struct inferior *inf = current_inferior ();
+
+  return value_from_longest (builtin_type (gdbarch)->builtin_int, inf->num);
+}
+
+/* Implementation of `$_inferior' variable.  */
+
+static const struct internalvar_funcs inferior_funcs =
+{
+  inferior_id_make_value,
+  NULL,
+  NULL
+};
+
 
 
 void
@@ -1055,4 +1087,5 @@ Show printing of inferior events (e.g., 
          show_print_inferior_events,
          &setprintlist, &showprintlist);
 
+  create_internalvar_type_lazy ("_inferior", &inferior_funcs, NULL);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inferior.h ./gdb/inferior.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inferior.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inferior.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Variables that describe the inferior process running under GDB:
    Where it is, why it stopped, and how to step it.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,6 +43,8 @@ struct target_desc_info;
 #include "progspace.h"
 #include "registry.h"
 
+#include "symfile-add-flags.h"
+
 struct infcall_suspend_state;
 struct infcall_control_state;
 
@@ -130,6 +132,20 @@ extern void child_terminal_init_with_pgr
 
 /* From fork-child.c */
 
+/* Report an error that happened when starting to trace the inferior
+   (i.e., when the "traceme_fun" callback is called on fork_inferior)
+   and bail out.  This function does not return.  */
+
+extern void trace_start_error (const char *fmt, ...)
+  ATTRIBUTE_NORETURN;
+
+/* Like "trace_start_error", but the error message is constructed by
+   combining STRING with the system error message for errno.  This
+   function does not return.  */
+
+extern void trace_start_error_with_name (const char *string)
+  ATTRIBUTE_NORETURN;
+
 extern int fork_inferior (char *, char *, char **,
 			  void (*)(void),
 			  void (*)(int), void (*)(void), char *,
@@ -143,6 +159,12 @@ extern char *construct_inferior_argument
 
 /* From infcmd.c */
 
+/* Initial inferior setup.  Determines the exec file is not yet known,
+   takes any necessary post-attaching actions, fetches the target
+   description and syncs the shared library list.  */
+
+extern void setup_inferior (int from_tty);
+
 extern void post_create_inferior (struct target_ops *, int);
 
 extern void attach_command (char *, int);
@@ -165,10 +187,8 @@ extern void detach_command (char *, int)
 
 extern void notice_new_inferior (ptid_t, int, int);
 
-struct dummy_frame_context_saver;
-extern struct value *get_return_value
-  (struct value *function, struct type *value_type,
-   struct dummy_frame_context_saver *ctx_saver);
+extern struct value *get_return_value (struct value *function,
+				       struct type *value_type);
 
 /* Prepare for execution command.  TARGET is the target that will run
    the command.  BACKGROUND determines whether this is a foreground
@@ -300,6 +320,9 @@ struct inferior
   /* True if the PID was actually faked by GDB.  */
   int fake_pid_p;
 
+  /* The highest thread number this inferior ever had.  */
+  int highest_thread_num;
+
   /* State of GDB control of inferior process execution.
      See `struct inferior_control_state'.  */
   struct inferior_control_state control;
@@ -366,6 +389,12 @@ struct inferior
      specific thread, see `struct thread_info'.  */
   struct continuation *continuations;
 
+  /* True if setup_inferior wasn't called for this inferior yet.
+     Until that is done, we must not access inferior memory or
+     registers, as we haven't determined the target
+     architecture/description.  */
+  int needs_setup;
+
   /* Private data used by the target vector implementation.  */
   struct private_inferior *priv;
 
@@ -375,9 +404,8 @@ struct inferior
   LONGEST exit_code;
 
   /* Default flags to pass to the symbol reading functions.  These are
-     used whenever a new objfile is created.  The valid values come
-     from enum symfile_add_flags.  */
-  int symfile_flags;
+     used whenever a new objfile is created.  */
+  symfile_add_flags symfile_flags;
 
   /* Info about an inferior's target description (if it's fetched; the
      user supplied description's filename, if any; etc.).  */
@@ -418,14 +446,7 @@ extern struct inferior *add_inferior (in
    the CLI.  */
 extern struct inferior *add_inferior_silent (int pid);
 
-/* Delete an existing inferior list entry, due to inferior exit.  */
-extern void delete_inferior (int pid);
-
-extern void delete_inferior_1 (struct inferior *todel, int silent);
-
-/* Same as delete_inferior, but don't print new inferior notifications
-   to the CLI.  */
-extern void delete_inferior_silent (int pid);
+extern void delete_inferior (struct inferior *todel);
 
 /* Delete an existing inferior list entry, due to inferior detaching.  */
 extern void detach_inferior (int pid);
@@ -487,6 +508,9 @@ extern struct inferior *iterate_over_inf
 /* Returns true if the inferior list is not empty.  */
 extern int have_inferiors (void);
 
+/* Returns the number of live inferiors (real live processes).  */
+extern int number_of_live_inferiors (void);
+
 /* Returns true if there are any live inferiors in the inferior list
    (not cores, not executables, real live processes).  */
 extern int have_live_inferiors (void);
@@ -504,6 +528,12 @@ extern struct cleanup *save_current_infe
 #define ALL_INFERIORS(I) \
   for ((I) = inferior_list; (I); (I) = (I)->next)
 
+/* Traverse all non-exited inferiors.  */
+
+#define ALL_NON_EXITED_INFERIORS(I) \
+  ALL_INFERIORS (I)		    \
+    if ((I)->pid != 0)
+
 extern struct inferior *inferior_list;
 
 /* Prune away automatically added inferiors that aren't required
@@ -514,4 +544,7 @@ extern int number_of_inferiors (void);
 
 extern struct inferior *add_inferior_with_spaces (void);
 
+/* Print the current selected inferior.  */
+extern void print_selected_inferior (struct ui_out *uiout);
+
 #endif /* !defined (INFERIOR_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-loop.c ./gdb/inf-loop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-loop.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-loop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Handling of inferior events for the event loop for GDB, the GNU debugger.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "inferior.h"
 #include "infrun.h"
-#include "target.h"             /* For enum inferior_event_type.  */
 #include "event-loop.h"
 #include "event-top.h"
 #include "inf-loop.h"
@@ -32,39 +31,16 @@
 #include "top.h"
 #include "observer.h"
 
-/* General function to handle events in the inferior.  So far it just
-   takes care of detecting errors reported by select() or poll(),
-   otherwise it assumes that all is OK, and goes on reading data from
-   the fd.  This however may not always be what we want to do.  */
+/* General function to handle events in the inferior.  */
+
 void
 inferior_event_handler (enum inferior_event_type event_type, 
 			gdb_client_data client_data)
 {
-  struct cleanup *cleanup_if_error = make_bpstat_clear_actions_cleanup ();
-
   switch (event_type)
     {
     case INF_REG_EVENT:
-      /* Catch errors for now, until the inner layers of
-	 fetch_inferior_event (i.e. readchar) can return meaningful
-	 error status.  If an error occurs while getting an event from
-	 the target, just cancel the current command.  */
-      {
-
-	TRY
-	  {
-	    fetch_inferior_event (client_data);
-	  }
-	CATCH (ex, RETURN_MASK_ALL)
-	  {
-	    bpstat_clear_actions ();
-	    do_all_intermediate_continuations (1);
-	    do_all_continuations (1);
-
-	    throw_exception (ex);
-	  }
-	END_CATCH
-      }
+      fetch_inferior_event (client_data);
       break;
 
     case INF_EXEC_COMPLETE:
@@ -73,7 +49,7 @@ inferior_event_handler (enum inferior_ev
 	  /* Unregister the inferior from the event loop.  This is done
 	     so that when the inferior is not running we don't get
 	     distracted by spurious inferior output.  */
-	  if (target_has_execution)
+	  if (target_has_execution && target_can_async_p ())
 	    target_async (0);
 	}
 
@@ -82,36 +58,10 @@ inferior_event_handler (enum inferior_ev
       if (!ptid_equal (inferior_ptid, null_ptid))
 	do_all_inferior_continuations (0);
 
-      /* If we were doing a multi-step (eg: step n, next n), but it
-	 got interrupted by a breakpoint, still do the pending
-	 continuations.  The continuation itself is responsible for
-	 distinguishing the cases.  The continuations are allowed to
-	 touch the inferior memory, e.g. to remove breakpoints, so run
-	 them before running breakpoint commands, which may resume the
-	 target.  */
-      if (non_stop
-	  && target_has_execution
-	  && !ptid_equal (inferior_ptid, null_ptid))
-	do_all_intermediate_continuations_thread (inferior_thread (), 0);
-      else
-	do_all_intermediate_continuations (0);
-
-      /* Always finish the previous command before running any
-	 breakpoint commands.  Any stop cancels the previous command.
-	 E.g. a "finish" or "step-n" command interrupted by an
-	 unrelated breakpoint is canceled.  */
-      if (non_stop
-	  && target_has_execution
-	  && !ptid_equal (inferior_ptid, null_ptid))
-	do_all_continuations_thread (inferior_thread (), 0);
-      else
-	do_all_continuations (0);
-
       /* When running a command list (from a user command, say), these
 	 are only run when the command list is all done.  */
-      if (interpreter_async)
+      if (current_ui->async)
 	{
-
 	  check_frame_language_change ();
 
 	  /* Don't propagate breakpoint commands errors.  Either we're
@@ -129,21 +79,8 @@ inferior_event_handler (enum inferior_ev
 	}
       break;
 
-    case INF_EXEC_CONTINUE:
-      /* Is there anything left to do for the command issued to
-         complete?  */
-
-      if (non_stop)
-	do_all_intermediate_continuations_thread (inferior_thread (), 0);
-      else
-	do_all_intermediate_continuations (0);
-      break;
-
-    case INF_TIMER:
     default:
       printf_unfiltered (_("Event type not recognized.\n"));
       break;
     }
-
-  discard_cleanups (cleanup_if_error);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-loop.h ./gdb/inf-loop.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-loop.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-loop.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface to the inferior event handling code for GDB, the GNU debugger.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -20,6 +20,8 @@
 #ifndef INF_LOOP_H
 #define INF_LOOP_H
 
+#include "target.h"             /* For enum inferior_event_type.  */
+
 extern void inferior_event_handler (enum inferior_event_type event_type, 
 				    void* client_data);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inflow.c ./gdb/inflow.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inflow.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inflow.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Low level interface to ptrace, for GDB when running under Unix.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,13 +74,17 @@ struct terminal_info
 };
 
 /* Our own tty state, which we restore every time we need to deal with
-   the terminal.  This is only set once, when GDB first starts.  The
-   settings of flags which readline saves and restores and
+   the terminal.  This is set once, when GDB first starts, and then
+   whenever we enter/leave TUI mode (gdb_save_tty_state).  The
+   settings of flags which readline saves and restores are
    unimportant.  */
 static struct terminal_info our_terminal_info;
 
-/* Snapshot of our own tty state taken during initialization of GDB.
-   This is used as the initial tty state given to each new inferior.  */
+/* Snapshot of the initial tty state taken during initialization of
+   GDB, before readline/ncurses have had a chance to change it.  This
+   is used as the initial tty state given to each new spawned
+   inferior.  Unlike our_terminal_info, this is only ever set
+   once.  */
 static serial_ttystate initial_gdb_ttystate;
 
 static struct terminal_info *get_inflow_inferior_data (struct inferior *);
@@ -101,8 +105,8 @@ inferior_process_group (void)
    we save our handlers in these two variables and set SIGINT and SIGQUIT
    to SIG_IGN.  */
 
-static void (*sigint_ours) ();
-static void (*sigquit_ours) ();
+static sighandler_t sigint_ours;
+static sighandler_t sigquit_ours;
 
 /* The name of the tty (from the `tty' command) that we're giving to
    the inferior when starting it up.  This is only (and should only
@@ -136,82 +140,37 @@ gdb_getpgrp (void)
 }
 #endif
 
-enum
-  {
-    yes, no, have_not_checked
-  }
-gdb_has_a_terminal_flag = have_not_checked;
-
-/* The value of the "interactive-mode" setting.  */
-static enum auto_boolean interactive_mode = AUTO_BOOLEAN_AUTO;
-
-/* Implement the "show interactive-mode" option.  */
-
-static void
-show_interactive_mode (struct ui_file *file, int from_tty,
-                       struct cmd_list_element *c,
-                       const char *value)
-{
-  if (interactive_mode == AUTO_BOOLEAN_AUTO)
-    fprintf_filtered (file, "Debugger's interactive mode "
-		            "is %s (currently %s).\n",
-                      value, gdb_has_a_terminal () ? "on" : "off");
-  else
-    fprintf_filtered (file, "Debugger's interactive mode is %s.\n", value);
-}
-
-/* Set the initial tty state that is to be inherited by new inferiors.  */
+/* See terminal.h.  */
 
 void
 set_initial_gdb_ttystate (void)
 {
-  initial_gdb_ttystate = serial_get_tty_state (stdin_serial);
-}
+  /* Note we can't do any of this in _initialize_inflow because at
+     that point stdin_serial has not been created yet.  */
 
-/* Does GDB have a terminal (on stdin)?  */
-int
-gdb_has_a_terminal (void)
-{
-  if (interactive_mode != AUTO_BOOLEAN_AUTO)
-    return interactive_mode == AUTO_BOOLEAN_TRUE;
+  initial_gdb_ttystate = serial_get_tty_state (stdin_serial);
 
-  switch (gdb_has_a_terminal_flag)
+  if (initial_gdb_ttystate != NULL)
     {
-    case yes:
-      return 1;
-    case no:
-      return 0;
-    case have_not_checked:
-      /* Get all the current tty settings (including whether we have a
-         tty at all!).  Can't do this in _initialize_inflow because
-         serial_fdopen() won't work until the serial_ops_list is
-         initialized.  */
-
+      our_terminal_info.ttystate
+	= serial_copy_tty_state (stdin_serial, initial_gdb_ttystate);
 #ifdef F_GETFL
       our_terminal_info.tflags = fcntl (0, F_GETFL, 0);
 #endif
-
-      gdb_has_a_terminal_flag = no;
-      if (stdin_serial != NULL)
-	{
-	  our_terminal_info.ttystate = serial_get_tty_state (stdin_serial);
-
-	  if (our_terminal_info.ttystate != NULL)
-	    {
-	      gdb_has_a_terminal_flag = yes;
 #ifdef PROCESS_GROUP_TYPE
-	      our_terminal_info.process_group = gdb_getpgrp ();
+      our_terminal_info.process_group = gdb_getpgrp ();
 #endif
-	    }
-	}
-
-      return gdb_has_a_terminal_flag == yes;
-    default:
-      /* "Can't happen".  */
-      return 0;
     }
 }
 
+/* Does GDB have a terminal (on stdin)?  */
+
+static int
+gdb_has_a_terminal (void)
+{
+  return initial_gdb_ttystate != NULL;
+}
+
 /* Macro for printing errors from ioctl operations */
 
 #define	OOPSY(what)	\
@@ -319,9 +278,9 @@ child_terminal_inferior (struct target_o
 
       if (!job_control)
 	{
-	  sigint_ours = (void (*)()) signal (SIGINT, SIG_IGN);
+	  sigint_ours = signal (SIGINT, SIG_IGN);
 #ifdef SIGQUIT
-	  sigquit_ours = (void (*)()) signal (SIGQUIT, SIG_IGN);
+	  sigquit_ours = signal (SIGQUIT, SIG_IGN);
 #endif
 	}
 
@@ -412,18 +371,18 @@ child_terminal_ours_1 (int output_only)
 
   if (tinfo->run_terminal != NULL || gdb_has_a_terminal () == 0)
     return;
-
+  else
     {
 #ifdef SIGTTOU
       /* Ignore this signal since it will happen when we try to set the
          pgrp.  */
-      void (*osigttou) () = NULL;
+      sighandler_t osigttou = NULL;
 #endif
-      int result;
+      int result ATTRIBUTE_UNUSED;
 
 #ifdef SIGTTOU
       if (job_control)
-	osigttou = (void (*)()) signal (SIGTTOU, SIG_IGN);
+	osigttou = signal (SIGTTOU, SIG_IGN);
 #endif
 
       xfree (tinfo->ttystate);
@@ -506,7 +465,7 @@ static const struct inferior_data *inflo
 static void
 inflow_inferior_data_cleanup (struct inferior *inf, void *arg)
 {
-  struct terminal_info *info = arg;
+  struct terminal_info *info = (struct terminal_info *) arg;
 
   xfree (info->run_terminal);
   xfree (info->ttystate);
@@ -521,7 +480,7 @@ get_inflow_inferior_data (struct inferio
 {
   struct terminal_info *info;
 
-  info = inferior_data (inf, inflow_inferior_data);
+  info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
   if (info == NULL)
     {
       info = XCNEW (struct terminal_info);
@@ -542,7 +501,7 @@ inflow_inferior_exit (struct inferior *i
 {
   struct terminal_info *info;
 
-  info = inferior_data (inf, inflow_inferior_data);
+  info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
   if (info != NULL)
     {
       xfree (info->run_terminal);
@@ -711,9 +670,9 @@ new_tty (void)
   tty = open ("/dev/tty", O_RDWR);
   if (tty > 0)
     {
-      void (*osigttou) ();
+      sighandler_t osigttou;
 
-      osigttou = (void (*)()) signal (SIGTTOU, SIG_IGN);
+      osigttou = signal (SIGTTOU, SIG_IGN);
       ioctl (tty, TIOCNOTTY, 0);
       close (tty);
       signal (SIGTTOU, osigttou);
@@ -788,7 +747,7 @@ pass_signal (int signo)
 #endif
 }
 
-static void (*osig) ();
+static sighandler_t osig;
 static int osig_set;
 
 void
@@ -799,7 +758,7 @@ set_sigint_trap (void)
 
   if (inf->attach_flag || tinfo->run_terminal)
     {
-      osig = (void (*)()) signal (SIGINT, pass_signal);
+      osig = signal (SIGINT, pass_signal);
       osig_set = 1;
     }
   else
@@ -899,20 +858,6 @@ _initialize_inflow (void)
   add_info ("terminal", term_info,
 	    _("Print inferior's saved terminal status."));
 
-  add_setshow_auto_boolean_cmd ("interactive-mode", class_support,
-                                &interactive_mode, _("\
-Set whether GDB's standard input is a terminal."), _("\
-Show whether GDB's standard input is a terminal."), _("\
-If on, GDB assumes that standard input is a terminal.  In practice, it\n\
-means that GDB should wait for the user to answer queries associated to\n\
-commands entered at the command prompt.  If off, GDB assumes that standard\n\
-input is not a terminal, and uses the default answer to all queries.\n\
-If auto (the default), determine which mode to use based on the standard\n\
-input settings."),
-                        NULL,
-                        show_interactive_mode,
-                        &setlist, &showlist);
-
   terminal_is_ours = 1;
 
   /* OK, figure out whether we have job control.  If neither termios nor
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inflow.h ./gdb/inflow.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inflow.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inflow.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level interface to ptrace, for GDB when running under Unix.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-ptrace.c ./gdb/inf-ptrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-ptrace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-ptrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level child interface to ptrace.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,7 +24,7 @@
 #include "terminal.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "gdb_ptrace.h"
+#include "nat/gdb_ptrace.h"
 #include "gdb_wait.h"
 #include <signal.h>
 
@@ -79,7 +79,8 @@ static void
 inf_ptrace_me (void)
 {
   /* "Trace me, Dr. Memory!"  */
-  ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0);
+  if (ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3) 0, 0) < 0)
+    trace_start_error_with_name ("ptrace");
 }
 
 /* Start a new inferior Unix child process.  EXEC_FILE is the file to
@@ -240,15 +241,7 @@ inf_ptrace_detach (struct target_ops *op
   pid_t pid = ptid_get_pid (inferior_ptid);
   int sig = 0;
 
-  if (from_tty)
-    {
-      char *exec_file = get_exec_file (0);
-      if (exec_file == 0)
-	exec_file = "";
-      printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
-			 target_pid_to_str (pid_to_ptid (pid)));
-      gdb_flush (gdb_stdout);
-    }
+  target_announce_detach (from_tty);
   if (args)
     sig = atoi (args);
 
@@ -265,6 +258,16 @@ inf_ptrace_detach (struct target_ops *op
   error (_("This system does not support detaching from a process"));
 #endif
 
+  inf_ptrace_detach_success (ops);
+}
+
+/* See inf-ptrace.h.  */
+
+void
+inf_ptrace_detach_success (struct target_ops *ops)
+{
+  pid_t pid = ptid_get_pid (inferior_ptid);
+
   inferior_ptid = null_ptid;
   detach_inferior (pid);
 
@@ -285,13 +288,13 @@ inf_ptrace_kill (struct target_ops *ops)
   ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3)0, 0);
   waitpid (pid, &status, 0);
 
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
-/* Stop the inferior.  */
+/* Interrupt the inferior.  */
 
 static void
-inf_ptrace_stop (struct target_ops *self, ptid_t ptid)
+inf_ptrace_interrupt (struct target_ops *self, ptid_t ptid)
 {
   /* Send a SIGINT to the process group.  This acts just like the user
      typed a ^C on the controlling terminal.  Note that using a
@@ -304,7 +307,7 @@ inf_ptrace_stop (struct target_ops *self
 /* Return which PID to pass to ptrace in order to observe/control the
    tracee identified by PTID.  */
 
-static pid_t
+pid_t
 get_ptrace_pid (ptid_t ptid)
 {
   pid_t pid;
@@ -686,7 +689,7 @@ inf_ptrace_target (void)
   t->to_mourn_inferior = inf_ptrace_mourn_inferior;
   t->to_thread_alive = inf_ptrace_thread_alive;
   t->to_pid_to_str = inf_ptrace_pid_to_str;
-  t->to_stop = inf_ptrace_stop;
+  t->to_interrupt = inf_ptrace_interrupt;
   t->to_xfer_partial = inf_ptrace_xfer_partial;
 #if defined (PT_IO) && defined (PIOD_READ_AUXV)
   t->to_auxv_parse = inf_ptrace_auxv_parse;
@@ -728,7 +731,7 @@ inf_ptrace_fetch_register (struct regcac
 
   size = register_size (gdbarch, regnum);
   gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
-  buf = alloca (size);
+  buf = (PTRACE_TYPE_RET *) alloca (size);
 
   /* Read the register contents from the inferior a chunk at a time.  */
   for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
@@ -786,7 +789,7 @@ inf_ptrace_store_register (const struct 
 
   size = register_size (gdbarch, regnum);
   gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
-  buf = alloca (size);
+  buf = (PTRACE_TYPE_RET *) alloca (size);
 
   /* Write the register contents into the inferior a chunk at a time.  */
   regcache_raw_collect (regcache, regnum, buf);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-ptrace.h ./gdb/inf-ptrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inf-ptrace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inf-ptrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level child interface to ptrace.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,4 +33,13 @@ extern struct target_ops *
   inf_ptrace_trad_target (CORE_ADDR (*register_u_offset)
 					(struct gdbarch *, int, int));
 
+/* Return which PID to pass to ptrace in order to observe/control the
+   tracee identified by PTID.  */
+
+extern pid_t get_ptrace_pid (ptid_t);
+
+
+/* Cleanup the inferior after a successful ptrace detach.  */
+extern void inf_ptrace_detach_success (struct target_ops *ops);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infrun.c ./gdb/infrun.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infrun.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/infrun.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-struct-independent code to start (run) and stop an inferior
    process.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -61,6 +61,9 @@
 #include "target-dcache.h"
 #include "terminal.h"
 #include "solist.h"
+#include "event-loop.h"
+#include "thread-fsm.h"
+#include "common/enum-flags.h"
 
 /* Prototypes for local functions */
 
@@ -101,6 +104,43 @@ static void insert_longjmp_resume_breakp
 
 static int maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc);
 
+/* Asynchronous signal handler registered as event loop source for
+   when we have pending events ready to be passed to the core.  */
+static struct async_event_handler *infrun_async_inferior_event_token;
+
+/* Stores whether infrun_async was previously enabled or disabled.
+   Starts off as -1, indicating "never enabled/disabled".  */
+static int infrun_is_async = -1;
+
+/* See infrun.h.  */
+
+void
+infrun_async (int enable)
+{
+  if (infrun_is_async != enable)
+    {
+      infrun_is_async = enable;
+
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: infrun_async(%d)\n",
+			    enable);
+
+      if (enable)
+	mark_async_event_handler (infrun_async_inferior_event_token);
+      else
+	clear_async_event_handler (infrun_async_inferior_event_token);
+    }
+}
+
+/* See infrun.h.  */
+
+void
+mark_infrun_async_event_handler (void)
+{
+  mark_async_event_handler (infrun_async_inferior_event_token);
+}
+
 /* When set, stop the 'step' command if we enter a function which has
    no line number information.  The normal behavior is that we step
    over such function.  */
@@ -112,10 +152,6 @@ show_step_stop_if_no_debug (struct ui_fi
   fprintf_filtered (file, _("Mode of the step operation is %s.\n"), value);
 }
 
-/* In asynchronous mode, but simulating synchronous execution.  */
-
-int sync_execution = 0;
-
 /* proceed and normal_stop use this to notify the user when the
    inferior stopped in a different thread than it had been running
    in.  */
@@ -348,11 +384,6 @@ show_stop_on_solib_events (struct ui_fil
 		    value);
 }
 
-/* Nonzero means expecting a trace trap
-   and should stop the inferior and return silently when it happens.  */
-
-int stop_after_trap;
-
 /* Nonzero after stop if current stack frame should be printed.  */
 
 static int stop_print_frame;
@@ -407,7 +438,7 @@ follow_fork_inferior (int follow_child, 
 
   if (has_vforked
       && !non_stop /* Non-stop always resumes both branches.  */
-      && (!target_is_async_p () || sync_execution)
+      && current_ui->prompt_state == PROMPT_BLOCKED
       && !(follow_child || detach_fork || sched_multi))
     {
       /* The parent stays blocked inside the vfork syscall until the
@@ -428,8 +459,6 @@ holding the child stopped.  Try \"set de
       /* Detach new forked process?  */
       if (detach_fork)
 	{
-	  struct cleanup *old_chain;
-
 	  /* Before detaching from the child, remove all breakpoints
 	     from it.  If we forked, then this has already been taken
 	     care of by infrun.c.  If we vforked however, any
@@ -652,7 +681,7 @@ follow_fork (void)
   CORE_ADDR step_range_start = 0;
   CORE_ADDR step_range_end = 0;
   struct frame_id step_frame_id = { 0 };
-  struct interp *command_interp = NULL;
+  struct thread_fsm *thread_fsm = NULL;
 
   if (!non_stop)
     {
@@ -704,7 +733,7 @@ follow_fork (void)
 	    step_frame_id = tp->control.step_frame_id;
 	    exception_resume_breakpoint
 	      = clone_momentary_breakpoint (tp->control.exception_resume_breakpoint);
-	    command_interp = tp->control.command_interp;
+	    thread_fsm = tp->thread_fsm;
 
 	    /* For now, delete the parent's sr breakpoint, otherwise,
 	       parent/child sr breakpoints are considered duplicates,
@@ -716,7 +745,7 @@ follow_fork (void)
 	    tp->control.step_range_end = 0;
 	    tp->control.step_frame_id = null_frame_id;
 	    delete_exception_resume_breakpoint (tp);
-	    tp->control.command_interp = NULL;
+	    tp->thread_fsm = NULL;
 	  }
 
 	parent = inferior_ptid;
@@ -762,7 +791,7 @@ follow_fork (void)
 		    tp->control.step_frame_id = step_frame_id;
 		    tp->control.exception_resume_breakpoint
 		      = exception_resume_breakpoint;
-		    tp->control.command_interp = command_interp;
+		    tp->thread_fsm = thread_fsm;
 		  }
 		else
 		  {
@@ -773,7 +802,7 @@ follow_fork (void)
 		       issued is most likely not applicable to the
 		       child, so just warn, and refuse to resume.  */
 		    warning (_("Not resuming: switched threads "
-			       "before following fork child.\n"));
+			       "before following fork child."));
 		  }
 
 		/* Reset breakpoints in the child as appropriate.  */
@@ -1048,14 +1077,17 @@ show_follow_exec_mode_string (struct ui_
   fprintf_filtered (file, _("Follow exec mode is \"%s\".\n"),  value);
 }
 
-/* EXECD_PATHNAME is assumed to be non-NULL.  */
+/* EXEC_FILE_TARGET is assumed to be non-NULL.  */
 
 static void
-follow_exec (ptid_t ptid, char *execd_pathname)
+follow_exec (ptid_t ptid, char *exec_file_target)
 {
   struct thread_info *th, *tmp;
   struct inferior *inf = current_inferior ();
   int pid = ptid_get_pid (ptid);
+  ptid_t process_ptid;
+  char *exec_file_host;
+  struct cleanup *old_chain;
 
   /* This is an exec event that we actually wish to pay attention to.
      Refresh our symbol table to the newly exec'd program, remove any
@@ -1122,9 +1154,10 @@ follow_exec (ptid_t ptid, char *execd_pa
   update_breakpoints_after_exec ();
 
   /* What is this a.out's name?  */
+  process_ptid = pid_to_ptid (pid);
   printf_unfiltered (_("%s is executing new program: %s\n"),
-		     target_pid_to_str (inferior_ptid),
-		     execd_pathname);
+		     target_pid_to_str (process_ptid),
+		     exec_file_target);
 
   /* We've followed the inferior through an exec.  Therefore, the
      inferior has essentially been killed & reborn.  */
@@ -1133,14 +1166,17 @@ follow_exec (ptid_t ptid, char *execd_pa
 
   breakpoint_init_inferior (inf_execd);
 
-  if (*gdb_sysroot != '\0')
-    {
-      char *name = exec_file_find (execd_pathname, NULL);
+  exec_file_host = exec_file_find (exec_file_target, NULL);
+  old_chain = make_cleanup (xfree, exec_file_host);
 
-      execd_pathname = alloca (strlen (name) + 1);
-      strcpy (execd_pathname, name);
-      xfree (name);
-    }
+  /* If we were unable to map the executable target pathname onto a host
+     pathname, tell the user that.  Otherwise GDB's subsequent behavior
+     is confusing.  Maybe it would even be better to stop at this point
+     so that the user can specify a file manually before continuing.  */
+  if (exec_file_host == NULL)
+    warning (_("Could not load symbols for executable %s.\n"
+	       "Do you need \"set sysroot\"?"),
+	     exec_file_target);
 
   /* Reset the shared library package.  This ensures that we get a
      shlib event when the child reaches "_start", at which point the
@@ -1152,20 +1188,21 @@ follow_exec (ptid_t ptid, char *execd_pa
 
   if (follow_exec_mode_string == follow_exec_mode_new)
     {
-      struct program_space *pspace;
-
       /* The user wants to keep the old inferior and program spaces
 	 around.  Create a new fresh one, and switch to it.  */
 
-      inf = add_inferior (current_inferior ()->pid);
-      pspace = add_program_space (maybe_new_address_space ());
-      inf->pspace = pspace;
-      inf->aspace = pspace->aspace;
-
+      /* Do exit processing for the original inferior before adding
+	 the new inferior so we don't have two active inferiors with
+	 the same ptid, which can confuse find_inferior_ptid.  */
       exit_inferior_num_silent (current_inferior ()->num);
 
+      inf = add_inferior_with_spaces ();
+      inf->pid = pid;
+      target_follow_exec (inf, exec_file_target);
+
       set_current_inferior (inf);
-      set_current_program_space (pspace);
+      set_current_program_space (inf->pspace);
+      add_thread (ptid);
     }
   else
     {
@@ -1180,21 +1217,14 @@ follow_exec (ptid_t ptid, char *execd_pa
 
   gdb_assert (current_program_space == inf->pspace);
 
-  /* That a.out is now the one to use.  */
-  exec_file_attach (execd_pathname, 0);
+  /* Attempt to open the exec file.  SYMFILE_DEFER_BP_RESET is used
+     because the proper displacement for a PIE (Position Independent
+     Executable) main symbol file will only be computed by
+     solib_create_inferior_hook below.  breakpoint_re_set would fail
+     to insert the breakpoints with the zero displacement.  */
+  try_open_exec_file (exec_file_host, inf, SYMFILE_DEFER_BP_RESET);
 
-  /* SYMFILE_DEFER_BP_RESET is used as the proper displacement for PIE
-     (Position Independent Executable) main symbol file will get applied by
-     solib_create_inferior_hook below.  breakpoint_re_set would fail to insert
-     the breakpoints with the zero displacement.  */
-
-  symbol_file_add (execd_pathname,
-		   (inf->symfile_flags
-		    | SYMFILE_MAINLINE | SYMFILE_DEFER_BP_RESET),
-		   NULL, 0);
-
-  if ((inf->symfile_flags & SYMFILE_NO_READ) == 0)
-    set_initial_language ();
+  do_cleanups (old_chain);
 
   /* If the target can specify a description, read it.  Must do this
      after flipping to the new executable (because the target supplied
@@ -1221,6 +1251,29 @@ follow_exec (ptid_t ptid, char *execd_pa
      matically get reset there in the new process.).  */
 }
 
+/* The queue of threads that need to do a step-over operation to get
+   past e.g., a breakpoint.  What technique is used to step over the
+   breakpoint/watchpoint does not matter -- all threads end up in the
+   same queue, to maintain rough temporal order of execution, in order
+   to avoid starvation, otherwise, we could e.g., find ourselves
+   constantly stepping the same couple threads past their breakpoints
+   over and over, if the single-step finish fast enough.  */
+struct thread_info *step_over_queue_head;
+
+/* Bit flags indicating what the thread needs to step over.  */
+
+enum step_over_what_flag
+  {
+    /* Step over a breakpoint.  */
+    STEP_OVER_BREAKPOINT = 1,
+
+    /* Step past a non-continuable watchpoint, in order to let the
+       instruction execute so we can evaluate the watchpoint
+       expression.  */
+    STEP_OVER_WATCHPOINT = 2
+  };
+DEF_ENUM_FLAGS_TYPE (enum step_over_what_flag, step_over_what);
+
 /* Info about an instruction that is being stepped over.  */
 
 struct step_over_info
@@ -1235,6 +1288,9 @@ struct step_over_info
   /* The instruction being stepped over triggers a nonsteppable
      watchpoint.  If true, we'll skip inserting watchpoints.  */
   int nonsteppable_watchpoint_p;
+
+  /* The thread's global number.  */
+  int thread;
 };
 
 /* The step-over info of the location that is being stepped over.
@@ -1264,15 +1320,19 @@ struct step_over_info
 static struct step_over_info step_over_info;
 
 /* Record the address of the breakpoint/instruction we're currently
-   stepping over.  */
+   stepping over.
+   N.B. We record the aspace and address now, instead of say just the thread,
+   because when we need the info later the thread may be running.  */
 
 static void
 set_step_over_info (struct address_space *aspace, CORE_ADDR address,
-		    int nonsteppable_watchpoint_p)
+		    int nonsteppable_watchpoint_p,
+		    int thread)
 {
   step_over_info.aspace = aspace;
   step_over_info.address = address;
   step_over_info.nonsteppable_watchpoint_p = nonsteppable_watchpoint_p;
+  step_over_info.thread = thread;
 }
 
 /* Called when we're not longer stepping over a breakpoint / an
@@ -1281,9 +1341,13 @@ set_step_over_info (struct address_space
 static void
 clear_step_over_info (void)
 {
+  if (debug_infrun)
+    fprintf_unfiltered (gdb_stdlog,
+			"infrun: clear_step_over_info\n");
   step_over_info.aspace = NULL;
   step_over_info.address = 0;
   step_over_info.nonsteppable_watchpoint_p = 0;
+  step_over_info.thread = -1;
 }
 
 /* See infrun.h.  */
@@ -1301,6 +1365,15 @@ stepping_past_instruction_at (struct add
 /* See infrun.h.  */
 
 int
+thread_is_stepping_over_breakpoint (int thread)
+{
+  return (step_over_info.thread != -1
+	  && thread == step_over_info.thread);
+}
+
+/* See infrun.h.  */
+
+int
 stepping_past_nonsteppable_watchpoint (void)
 {
   return step_over_info.nonsteppable_watchpoint_p;
@@ -1404,12 +1477,6 @@ step_over_info_valid_p (void)
    displaced step operation on it.  See displaced_step_prepare and
    displaced_step_fixup for details.  */
 
-struct displaced_step_request
-{
-  ptid_t ptid;
-  struct displaced_step_request *next;
-};
-
 /* Per-inferior displaced stepping state.  */
 struct displaced_step_inferior_state
 {
@@ -1419,9 +1486,9 @@ struct displaced_step_inferior_state
   /* The process this displaced step state refers to.  */
   int pid;
 
-  /* A queue of pending displaced stepping requests.  One entry per
-     thread that needs to do a displaced step.  */
-  struct displaced_step_request *step_request_queue;
+  /* True if preparing a displaced step ever failed.  If so, we won't
+     try displaced stepping for this inferior again.  */
+  int failed_before;
 
   /* If this is not null_ptid, this is the thread carrying out a
      displaced single-step in process PID.  This thread's state will
@@ -1463,6 +1530,38 @@ get_displaced_stepping_state (int pid)
   return NULL;
 }
 
+/* Returns true if any inferior has a thread doing a displaced
+   step.  */
+
+static int
+displaced_step_in_progress_any_inferior (void)
+{
+  struct displaced_step_inferior_state *state;
+
+  for (state = displaced_step_inferior_states;
+       state != NULL;
+       state = state->next)
+    if (!ptid_equal (state->step_ptid, null_ptid))
+      return 1;
+
+  return 0;
+}
+
+/* Return true if thread represented by PTID is doing a displaced
+   step.  */
+
+static int
+displaced_step_in_progress_thread (ptid_t ptid)
+{
+  struct displaced_step_inferior_state *displaced;
+
+  gdb_assert (!ptid_equal (ptid, null_ptid));
+
+  displaced = get_displaced_stepping_state (ptid_get_pid (ptid));
+
+  return (displaced != NULL && ptid_equal (displaced->step_ptid, ptid));
+}
+
 /* Return true if process PID has a thread doing a displaced step.  */
 
 static int
@@ -1492,7 +1591,7 @@ add_displaced_stepping_state (int pid)
     if (state->pid == pid)
       return state;
 
-  state = xcalloc (1, sizeof (*state));
+  state = XCNEW (struct displaced_step_inferior_state);
   state->pid = pid;
   state->next = displaced_step_inferior_states;
   displaced_step_inferior_states = state;
@@ -1568,7 +1667,7 @@ show_can_use_displaced_stepping (struct 
     fprintf_filtered (file,
 		      _("Debugger's willingness to use displaced stepping "
 			"to step over breakpoints is %s (currently %s).\n"),
-		      value, non_stop ? "on" : "off");
+		      value, target_is_non_stop_p () ? "on" : "off");
   else
     fprintf_filtered (file,
 		      _("Debugger's willingness to use displaced stepping "
@@ -1576,15 +1675,24 @@ show_can_use_displaced_stepping (struct 
 }
 
 /* Return non-zero if displaced stepping can/should be used to step
-   over breakpoints.  */
+   over breakpoints of thread TP.  */
 
 static int
-use_displaced_stepping (struct gdbarch *gdbarch)
+use_displaced_stepping (struct thread_info *tp)
 {
-  return (((can_use_displaced_stepping == AUTO_BOOLEAN_AUTO && non_stop)
+  struct regcache *regcache = get_thread_regcache (tp->ptid);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct displaced_step_inferior_state *displaced_state;
+
+  displaced_state = get_displaced_stepping_state (ptid_get_pid (tp->ptid));
+
+  return (((can_use_displaced_stepping == AUTO_BOOLEAN_AUTO
+	    && target_is_non_stop_p ())
 	   || can_use_displaced_stepping == AUTO_BOOLEAN_TRUE)
 	  && gdbarch_displaced_step_copy_insn_p (gdbarch)
-	  && find_record_target () == NULL);
+	  && find_record_target () == NULL
+	  && (displaced_state == NULL
+	      || !displaced_state->failed_before));
 }
 
 /* Clean out any stray displaced stepping state.  */
@@ -1605,7 +1713,8 @@ displaced_step_clear (struct displaced_s
 static void
 displaced_step_clear_cleanup (void *arg)
 {
-  struct displaced_step_inferior_state *state = arg;
+  struct displaced_step_inferior_state *state
+    = (struct displaced_step_inferior_state *) arg;
 
   displaced_step_clear (state);
 }
@@ -1636,14 +1745,17 @@ displaced_step_dump_bytes (struct ui_fil
    explain how we handle this case instead.
 
    Returns 1 if preparing was successful -- this thread is going to be
-   stepped now; or 0 if displaced stepping this thread got queued.  */
+   stepped now; 0 if displaced stepping this thread got queued; or -1
+   if this instruction can't be displaced stepped.  */
+
 static int
-displaced_step_prepare (ptid_t ptid)
+displaced_step_prepare_throw (ptid_t ptid)
 {
   struct cleanup *old_cleanups, *ignore_cleanups;
   struct thread_info *tp = find_thread_ptid (ptid);
   struct regcache *regcache = get_thread_regcache (ptid);
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct address_space *aspace = get_regcache_aspace (regcache);
   CORE_ADDR original, copy;
   ULONGEST len;
   struct displaced_step_closure *closure;
@@ -1654,6 +1766,9 @@ displaced_step_prepare (ptid_t ptid)
      support displaced stepping.  */
   gdb_assert (gdbarch_displaced_step_copy_insn_p (gdbarch));
 
+  /* Nor if the thread isn't meant to step over a breakpoint.  */
+  gdb_assert (tp->control.trap_expected);
+
   /* Disable range stepping while executing in the scratch pad.  We
      want a single-step even if executing the displaced instruction in
      the scratch buffer lands within the stepping range (e.g., a
@@ -1669,28 +1784,13 @@ displaced_step_prepare (ptid_t ptid)
     {
       /* Already waiting for a displaced step to finish.  Defer this
 	 request and place in queue.  */
-      struct displaced_step_request *req, *new_req;
 
       if (debug_displaced)
 	fprintf_unfiltered (gdb_stdlog,
-			    "displaced: defering step of %s\n",
+			    "displaced: deferring step of %s\n",
 			    target_pid_to_str (ptid));
 
-      new_req = xmalloc (sizeof (*new_req));
-      new_req->ptid = ptid;
-      new_req->next = NULL;
-
-      if (displaced->step_request_queue)
-	{
-	  for (req = displaced->step_request_queue;
-	       req && req->next;
-	       req = req->next)
-	    ;
-	  req->next = new_req;
-	}
-      else
-	displaced->step_request_queue = new_req;
-
+      thread_step_over_chain_enqueue (tp);
       return 0;
     }
   else
@@ -1711,8 +1811,30 @@ displaced_step_prepare (ptid_t ptid)
   copy = gdbarch_displaced_step_location (gdbarch);
   len = gdbarch_max_insn_length (gdbarch);
 
+  if (breakpoint_in_range_p (aspace, copy, len))
+    {
+      /* There's a breakpoint set in the scratch pad location range
+	 (which is usually around the entry point).  We'd either
+	 install it before resuming, which would overwrite/corrupt the
+	 scratch pad, or if it was already inserted, this displaced
+	 step would overwrite it.  The latter is OK in the sense that
+	 we already assume that no thread is going to execute the code
+	 in the scratch pad range (after initial startup) anyway, but
+	 the former is unacceptable.  Simply punt and fallback to
+	 stepping over this breakpoint in-line.  */
+      if (debug_displaced)
+	{
+	  fprintf_unfiltered (gdb_stdlog,
+			      "displaced: breakpoint set in scratch pad.  "
+			      "Stepping over breakpoint in-line instead.\n");
+	}
+
+      do_cleanups (old_cleanups);
+      return -1;
+    }
+
   /* Save the original contents of the copy area.  */
-  displaced->step_saved_copy = xmalloc (len);
+  displaced->step_saved_copy = (gdb_byte *) xmalloc (len);
   ignore_cleanups = make_cleanup (free_current_contents,
 				  &displaced->step_saved_copy);
   status = target_read_memory (copy, displaced->step_saved_copy, len);
@@ -1732,9 +1854,14 @@ displaced_step_prepare (ptid_t ptid)
 
   closure = gdbarch_displaced_step_copy_insn (gdbarch,
 					      original, copy, regcache);
-
-  /* We don't support the fully-simulated case at present.  */
-  gdb_assert (closure);
+  if (closure == NULL)
+    {
+      /* The architecture doesn't know how or want to displaced step
+	 this instruction or instruction sequence.  Fallback to
+	 stepping over the breakpoint in-line.  */
+      do_cleanups (old_cleanups);
+      return -1;
+    }
 
   /* Save the information we need to fix things up if the step
      succeeds.  */
@@ -1760,6 +1887,51 @@ displaced_step_prepare (ptid_t ptid)
   return 1;
 }
 
+/* Wrapper for displaced_step_prepare_throw that disabled further
+   attempts at displaced stepping if we get a memory error.  */
+
+static int
+displaced_step_prepare (ptid_t ptid)
+{
+  int prepared = -1;
+
+  TRY
+    {
+      prepared = displaced_step_prepare_throw (ptid);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      struct displaced_step_inferior_state *displaced_state;
+
+      if (ex.error != MEMORY_ERROR
+	  && ex.error != NOT_SUPPORTED_ERROR)
+	throw_exception (ex);
+
+      if (debug_infrun)
+	{
+	  fprintf_unfiltered (gdb_stdlog,
+			      "infrun: disabling displaced stepping: %s\n",
+			      ex.message);
+	}
+
+      /* Be verbose if "set displaced-stepping" is "on", silent if
+	 "auto".  */
+      if (can_use_displaced_stepping == AUTO_BOOLEAN_TRUE)
+	{
+	  warning (_("disabling displaced stepping: %s"),
+		   ex.message);
+	}
+
+      /* Disable further displaced stepping attempts.  */
+      displaced_state
+	= get_displaced_stepping_state (ptid_get_pid (ptid));
+      displaced_state->failed_before = 1;
+    }
+  END_CATCH
+
+  return prepared;
+}
+
 static void
 write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr,
 		   const gdb_byte *myaddr, int len)
@@ -1788,21 +1960,28 @@ displaced_step_restore (struct displaced
 				  displaced->step_copy));
 }
 
-static void
+/* If we displaced stepped an instruction successfully, adjust
+   registers and memory to yield the same effect the instruction would
+   have had if we had executed it at its original address, and return
+   1.  If the instruction didn't complete, relocate the PC and return
+   -1.  If the thread wasn't displaced stepping, return 0.  */
+
+static int
 displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal)
 {
   struct cleanup *old_cleanups;
   struct displaced_step_inferior_state *displaced
     = get_displaced_stepping_state (ptid_get_pid (event_ptid));
+  int ret;
 
   /* Was any thread of this process doing a displaced step?  */
   if (displaced == NULL)
-    return;
+    return 0;
 
   /* Was this event for the pid we displaced?  */
   if (ptid_equal (displaced->step_ptid, null_ptid)
       || ! ptid_equal (displaced->step_ptid, event_ptid))
-    return;
+    return 0;
 
   old_cleanups = make_cleanup (displaced_step_clear_cleanup, displaced);
 
@@ -1825,6 +2004,7 @@ displaced_step_fixup (ptid_t event_ptid,
                                     displaced->step_original,
                                     displaced->step_copy,
                                     get_thread_regcache (displaced->step_ptid));
+      ret = 1;
     }
   else
     {
@@ -1835,92 +2015,164 @@ displaced_step_fixup (ptid_t event_ptid,
 
       pc = displaced->step_original + (pc - displaced->step_copy);
       regcache_write_pc (regcache, pc);
+      ret = -1;
     }
 
   do_cleanups (old_cleanups);
 
   displaced->step_ptid = null_ptid;
 
-  /* Are there any pending displaced stepping requests?  If so, run
-     one now.  Leave the state object around, since we're likely to
-     need it again soon.  */
-  while (displaced->step_request_queue)
-    {
-      struct displaced_step_request *head;
-      ptid_t ptid;
-      struct regcache *regcache;
-      struct gdbarch *gdbarch;
-      CORE_ADDR actual_pc;
-      struct address_space *aspace;
+  return ret;
+}
 
-      head = displaced->step_request_queue;
-      ptid = head->ptid;
-      displaced->step_request_queue = head->next;
-      xfree (head);
+/* Data to be passed around while handling an event.  This data is
+   discarded between events.  */
+struct execution_control_state
+{
+  ptid_t ptid;
+  /* The thread that got the event, if this was a thread event; NULL
+     otherwise.  */
+  struct thread_info *event_thread;
 
-      context_switch (ptid);
+  struct target_waitstatus ws;
+  int stop_func_filled_in;
+  CORE_ADDR stop_func_start;
+  CORE_ADDR stop_func_end;
+  const char *stop_func_name;
+  int wait_some_more;
 
-      regcache = get_thread_regcache (ptid);
-      actual_pc = regcache_read_pc (regcache);
-      aspace = get_regcache_aspace (regcache);
-      gdbarch = get_regcache_arch (regcache);
+  /* True if the event thread hit the single-step breakpoint of
+     another thread.  Thus the event doesn't cause a stop, the thread
+     needs to be single-stepped past the single-step breakpoint before
+     we can switch back to the original stepping thread.  */
+  int hit_singlestep_breakpoint;
+};
 
-      if (breakpoint_here_p (aspace, actual_pc))
-	{
-	  if (debug_displaced)
-	    fprintf_unfiltered (gdb_stdlog,
-				"displaced: stepping queued %s now\n",
-				target_pid_to_str (ptid));
+/* Clear ECS and set it to point at TP.  */
 
-	  displaced_step_prepare (ptid);
+static void
+reset_ecs (struct execution_control_state *ecs, struct thread_info *tp)
+{
+  memset (ecs, 0, sizeof (*ecs));
+  ecs->event_thread = tp;
+  ecs->ptid = tp->ptid;
+}
 
-	  if (debug_displaced)
-	    {
-	      CORE_ADDR actual_pc = regcache_read_pc (regcache);
-	      gdb_byte buf[4];
+static void keep_going_pass_signal (struct execution_control_state *ecs);
+static void prepare_to_wait (struct execution_control_state *ecs);
+static int keep_going_stepped_thread (struct thread_info *tp);
+static step_over_what thread_still_needs_step_over (struct thread_info *tp);
 
-	      fprintf_unfiltered (gdb_stdlog, "displaced: run %s: ",
-				  paddress (gdbarch, actual_pc));
-	      read_memory (actual_pc, buf, sizeof (buf));
-	      displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf));
-	    }
+/* Are there any pending step-over requests?  If so, run all we can
+   now and return true.  Otherwise, return false.  */
 
-	  if (gdbarch_displaced_step_hw_singlestep (gdbarch,
-						    displaced->step_closure))
-	    target_resume (ptid, 1, GDB_SIGNAL_0);
-	  else
-	    target_resume (ptid, 0, GDB_SIGNAL_0);
+static int
+start_step_over (void)
+{
+  struct thread_info *tp, *next;
 
-	  /* Done, we're stepping a thread.  */
-	  break;
-	}
-      else
-	{
-	  int step;
-	  struct thread_info *tp = inferior_thread ();
+  /* Don't start a new step-over if we already have an in-line
+     step-over operation ongoing.  */
+  if (step_over_info_valid_p ())
+    return 0;
 
-	  /* The breakpoint we were sitting under has since been
-	     removed.  */
-	  tp->control.trap_expected = 0;
+  for (tp = step_over_queue_head; tp != NULL; tp = next)
+    {
+      struct execution_control_state ecss;
+      struct execution_control_state *ecs = &ecss;
+      step_over_what step_what;
+      int must_be_in_line;
 
-	  /* Go back to what we were trying to do.  */
-	  step = currently_stepping (tp);
+      next = thread_step_over_chain_next (tp);
 
-	  if (step)
-	    step = maybe_software_singlestep (gdbarch, actual_pc);
+      /* If this inferior already has a displaced step in process,
+	 don't start a new one.  */
+      if (displaced_step_in_progress (ptid_get_pid (tp->ptid)))
+	continue;
+
+      step_what = thread_still_needs_step_over (tp);
+      must_be_in_line = ((step_what & STEP_OVER_WATCHPOINT)
+			 || ((step_what & STEP_OVER_BREAKPOINT)
+			     && !use_displaced_stepping (tp)));
+
+      /* We currently stop all threads of all processes to step-over
+	 in-line.  If we need to start a new in-line step-over, let
+	 any pending displaced steps finish first.  */
+      if (must_be_in_line && displaced_step_in_progress_any_inferior ())
+	return 0;
 
-	  if (debug_displaced)
+      thread_step_over_chain_remove (tp);
+
+      if (step_over_queue_head == NULL)
+	{
+	  if (debug_infrun)
 	    fprintf_unfiltered (gdb_stdlog,
-				"displaced: breakpoint is gone: %s, step(%d)\n",
-				target_pid_to_str (tp->ptid), step);
+				"infrun: step-over queue now empty\n");
+	}
+
+      if (tp->control.trap_expected
+	  || tp->resumed
+	  || tp->executing)
+	{
+	  internal_error (__FILE__, __LINE__,
+			  "[%s] has inconsistent state: "
+			  "trap_expected=%d, resumed=%d, executing=%d\n",
+			  target_pid_to_str (tp->ptid),
+			  tp->control.trap_expected,
+			  tp->resumed,
+			  tp->executing);
+	}
+
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: resuming [%s] for step-over\n",
+			    target_pid_to_str (tp->ptid));
+
+      /* keep_going_pass_signal skips the step-over if the breakpoint
+	 is no longer inserted.  In all-stop, we want to keep looking
+	 for a thread that needs a step-over instead of resuming TP,
+	 because we wouldn't be able to resume anything else until the
+	 target stops again.  In non-stop, the resume always resumes
+	 only TP, so it's OK to let the thread resume freely.  */
+      if (!target_is_non_stop_p () && !step_what)
+	continue;
+
+      switch_to_thread (tp->ptid);
+      reset_ecs (ecs, tp);
+      keep_going_pass_signal (ecs);
 
-	  target_resume (ptid, step, GDB_SIGNAL_0);
-	  tp->suspend.stop_signal = GDB_SIGNAL_0;
+      if (!ecs->wait_some_more)
+	error (_("Command aborted."));
+
+      gdb_assert (tp->resumed);
+
+      /* If we started a new in-line step-over, we're done.  */
+      if (step_over_info_valid_p ())
+	{
+	  gdb_assert (tp->control.trap_expected);
+	  return 1;
+	}
 
-	  /* This request was discarded.  See if there's any other
-	     thread waiting for its turn.  */
+      if (!target_is_non_stop_p ())
+	{
+	  /* On all-stop, shouldn't have resumed unless we needed a
+	     step over.  */
+	  gdb_assert (tp->control.trap_expected
+		      || tp->step_after_step_resume_breakpoint);
+
+	  /* With remote targets (at least), in all-stop, we can't
+	     issue any further remote commands until the program stops
+	     again.  */
+	  return 1;
 	}
+
+      /* Either the thread no longer needed a step-over, or a new
+	 displaced stepping sequence started.  Even in the latter
+	 case, continue looking.  Maybe we can also start another
+	 displaced step on a thread of other process. */
     }
+
+  return 0;
 }
 
 /* Update global variables holding ptids to hold NEW_PTID if they were
@@ -1928,7 +2180,6 @@ displaced_step_fixup (ptid_t event_ptid,
 static void
 infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
 {
-  struct displaced_step_request *it;
   struct displaced_step_inferior_state *displaced;
 
   if (ptid_equal (inferior_ptid, old_ptid))
@@ -1940,10 +2191,6 @@ infrun_thread_ptid_changed (ptid_t old_p
     {
       if (ptid_equal (displaced->step_ptid, old_ptid))
 	displaced->step_ptid = new_ptid;
-
-      for (it = displaced->step_request_queue; it; it = it->next)
-	if (ptid_equal (it->ptid, old_ptid))
-	  it->ptid = new_ptid;
     }
 }
 
@@ -1963,13 +2210,15 @@ resume_cleanups (void *ignore)
 static const char schedlock_off[] = "off";
 static const char schedlock_on[] = "on";
 static const char schedlock_step[] = "step";
+static const char schedlock_replay[] = "replay";
 static const char *const scheduler_enums[] = {
   schedlock_off,
   schedlock_on,
   schedlock_step,
+  schedlock_replay,
   NULL
 };
-static const char *scheduler_mode = schedlock_off;
+static const char *scheduler_mode = schedlock_replay;
 static void
 show_scheduler_mode (struct ui_file *file, int from_tty,
 		     struct cmd_list_element *c, const char *value)
@@ -2007,11 +2256,9 @@ maybe_software_singlestep (struct gdbarc
   int hw_step = 1;
 
   if (execution_direction == EXEC_FORWARD
-      && gdbarch_software_single_step_p (gdbarch)
-      && gdbarch_software_single_step (gdbarch, get_current_frame ()))
-    {
-      hw_step = 0;
-    }
+      && gdbarch_software_single_step_p (gdbarch))
+    hw_step = !insert_single_step_breakpoints (gdbarch);
+
   return hw_step;
 }
 
@@ -2035,6 +2282,13 @@ user_visible_resume_ptid (int step)
 	 resume.  */
       resume_ptid = inferior_ptid;
     }
+  else if ((scheduler_mode == schedlock_replay)
+	   && target_record_will_replay (minus_one_ptid, execution_direction))
+    {
+      /* User-settable 'scheduler' mode requires solo thread resume in replay
+	 mode.  */
+      resume_ptid = inferior_ptid;
+    }
   else if (!sched_multi && target_supports_multi_process ())
     {
       /* Resume all threads of the current process (and none of other
@@ -2050,6 +2304,25 @@ user_visible_resume_ptid (int step)
   return resume_ptid;
 }
 
+/* Return a ptid representing the set of threads that we will resume,
+   in the perspective of the target, assuming run control handling
+   does not require leaving some threads stopped (e.g., stepping past
+   breakpoint).  USER_STEP indicates whether we're about to start the
+   target for a stepping command.  */
+
+static ptid_t
+internal_resume_ptid (int user_step)
+{
+  /* In non-stop, we always control threads individually.  Note that
+     the target may always work in non-stop mode even with "set
+     non-stop off", in which case user_visible_resume_ptid could
+     return a wildcard ptid.  */
+  if (target_is_non_stop_p ())
+    return inferior_ptid;
+  else
+    return user_visible_resume_ptid (user_step);
+}
+
 /* Wrapper for target_resume, that handles infrun-specific
    bookkeeping.  */
 
@@ -2091,6 +2364,8 @@ do_target_resume (ptid_t resume_ptid, in
     target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass);
 
   target_resume (resume_ptid, step, sig);
+
+  target_commit_resume ();
 }
 
 /* Resume the inferior, but allow a QUIT.  This is useful if the user
@@ -2120,10 +2395,46 @@ resume (enum gdb_signal sig)
      single-step).  */
   int step;
 
-  tp->stepped_breakpoint = 0;
+  gdb_assert (!thread_is_in_step_over_chain (tp));
 
   QUIT;
 
+  if (tp->suspend.waitstatus_pending_p)
+    {
+      if (debug_infrun)
+	{
+	  char *statstr;
+
+	  statstr = target_waitstatus_to_string (&tp->suspend.waitstatus);
+	  fprintf_unfiltered (gdb_stdlog,
+			      "infrun: resume: thread %s has pending wait status %s "
+			      "(currently_stepping=%d).\n",
+			      target_pid_to_str (tp->ptid),  statstr,
+			      currently_stepping (tp));
+	  xfree (statstr);
+	}
+
+      tp->resumed = 1;
+
+      /* FIXME: What should we do if we are supposed to resume this
+	 thread with a signal?  Maybe we should maintain a queue of
+	 pending signals to deliver.  */
+      if (sig != GDB_SIGNAL_0)
+	{
+	  warning (_("Couldn't deliver signal %s to %s."),
+		   gdb_signal_to_name (sig), target_pid_to_str (tp->ptid));
+	}
+
+      tp->suspend.stop_signal = GDB_SIGNAL_0;
+      discard_cleanups (old_cleanups);
+
+      if (target_can_async_p ())
+	target_async (1);
+      return;
+    }
+
+  tp->stepped_breakpoint = 0;
+
   /* Depends on stepped_breakpoint.  */
   step = currently_stepping (tp);
 
@@ -2225,9 +2536,10 @@ resume (enum gdb_signal sig)
 	      insert_single_step_breakpoint (gdbarch, aspace, pc);
 	      insert_breakpoints ();
 
-	      resume_ptid = user_visible_resume_ptid (user_step);
+	      resume_ptid = internal_resume_ptid (user_step);
 	      do_target_resume (resume_ptid, 0, GDB_SIGNAL_0);
 	      discard_cleanups (old_cleanups);
+	      tp->resumed = 1;
 	      return;
 	    }
 	}
@@ -2249,34 +2561,50 @@ resume (enum gdb_signal sig)
      We can't use displaced stepping when we are waiting for vfork_done
      event, displaced stepping breaks the vfork child similarly as single
      step software breakpoint.  */
-  if (use_displaced_stepping (gdbarch)
-      && tp->control.trap_expected
+  if (tp->control.trap_expected
+      && use_displaced_stepping (tp)
       && !step_over_info_valid_p ()
       && sig == GDB_SIGNAL_0
       && !current_inferior ()->waiting_for_vfork_done)
     {
-      struct displaced_step_inferior_state *displaced;
+      int prepared = displaced_step_prepare (inferior_ptid);
 
-      if (!displaced_step_prepare (inferior_ptid))
+      if (prepared == 0)
 	{
-	  /* Got placed in displaced stepping queue.  Will be resumed
-	     later when all the currently queued displaced stepping
-	     requests finish.  The thread is not executing at this
-	     point, and the call to set_executing will be made later.
-	     But we need to call set_running here, since from the
-	     user/frontend's point of view, threads were set running.  */
-	  set_running (user_visible_resume_ptid (user_step), 1);
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"Got placed in step-over queue\n");
+
+	  tp->control.trap_expected = 0;
 	  discard_cleanups (old_cleanups);
 	  return;
 	}
+      else if (prepared < 0)
+	{
+	  /* Fallback to stepping over the breakpoint in-line.  */
+
+	  if (target_is_non_stop_p ())
+	    stop_all_threads ();
+
+	  set_step_over_info (get_regcache_aspace (regcache),
+			      regcache_read_pc (regcache), 0, tp->global_num);
+
+	  step = maybe_software_singlestep (gdbarch, pc);
+
+	  insert_breakpoints ();
+	}
+      else if (prepared > 0)
+	{
+	  struct displaced_step_inferior_state *displaced;
 
-      /* Update pc to reflect the new address from which we will execute
-	 instructions due to displaced stepping.  */
-      pc = regcache_read_pc (get_thread_regcache (inferior_ptid));
-
-      displaced = get_displaced_stepping_state (ptid_get_pid (inferior_ptid));
-      step = gdbarch_displaced_step_hw_singlestep (gdbarch,
-						   displaced->step_closure);
+	  /* Update pc to reflect the new address from which we will
+	     execute instructions due to displaced stepping.  */
+	  pc = regcache_read_pc (get_thread_regcache (inferior_ptid));
+
+	  displaced = get_displaced_stepping_state (ptid_get_pid (inferior_ptid));
+	  step = gdbarch_displaced_step_hw_singlestep (gdbarch,
+						       displaced->step_closure);
+	}
     }
 
   /* Do we need to do it the hard way, w/temp breakpoints?  */
@@ -2335,37 +2663,32 @@ resume (enum gdb_signal sig)
      use singlestep breakpoint.  */
   gdb_assert (!(thread_has_single_step_breakpoints_set (tp) && step));
 
-  /* Decide the set of threads to ask the target to resume.  Start
-     by assuming everything will be resumed, than narrow the set
-     by applying increasingly restricting conditions.  */
-  resume_ptid = user_visible_resume_ptid (user_step);
-
-  /* Even if RESUME_PTID is a wildcard, and we end up resuming less
-     (e.g., we might need to step over a breakpoint), from the
-     user/frontend's point of view, all threads in RESUME_PTID are now
-     running.  */
-  set_running (resume_ptid, 1);
-
-  /* Maybe resume a single thread after all.  */
-  if ((step || thread_has_single_step_breakpoints_set (tp))
-      && tp->control.trap_expected)
+  /* Decide the set of threads to ask the target to resume.  */
+  if (tp->control.trap_expected)
     {
       /* We're allowing a thread to run past a breakpoint it has
-	 hit, by single-stepping the thread with the breakpoint
-	 removed.  In which case, we need to single-step only this
-	 thread, and keep others stopped, as they can miss this
-	 breakpoint if allowed to run.  */
+	 hit, either by single-stepping the thread with the breakpoint
+	 removed, or by displaced stepping, with the breakpoint inserted.
+	 In the former case, we need to single-step only this thread,
+	 and keep others stopped, as they can miss this breakpoint if
+	 allowed to run.  That's not really a problem for displaced
+	 stepping, but, we still keep other threads stopped, in case
+	 another thread is also stopped for a breakpoint waiting for
+	 its turn in the displaced stepping queue.  */
       resume_ptid = inferior_ptid;
     }
+  else
+    resume_ptid = internal_resume_ptid (user_step);
 
   if (execution_direction != EXEC_REVERSE
       && step && breakpoint_inserted_here_p (aspace, pc))
     {
-      /* The only case we currently need to step a breakpoint
-	 instruction is when we have a signal to deliver.  See
-	 handle_signal_stop where we handle random signals that could
-	 take out us out of the stepping range.  Normally, in that
-	 case we end up continuing (instead of stepping) over the
+      /* There are two cases where we currently need to step a
+	 breakpoint instruction when we have a signal to deliver:
+
+	 - See handle_signal_stop where we handle random signals that
+	 could take out us out of the stepping range.  Normally, in
+	 that case we end up continuing (instead of stepping) over the
 	 signal handler with a breakpoint at PC, but there are cases
 	 where we should _always_ single-step, even if we have a
 	 step-resume breakpoint, like when a software watchpoint is
@@ -2378,8 +2701,20 @@ resume (enum gdb_signal sig)
 	 recurses and executes PC again, it'll miss the breakpoint.
 	 So we leave the breakpoint inserted anyway, but we need to
 	 record that we tried to step a breakpoint instruction, so
-	 that adjust_pc_after_break doesn't end up confused.  */
-      gdb_assert (sig != GDB_SIGNAL_0);
+	 that adjust_pc_after_break doesn't end up confused.
+
+         - In non-stop if we insert a breakpoint (e.g., a step-resume)
+	 in one thread after another thread that was stepping had been
+	 momentarily paused for a step-over.  When we re-resume the
+	 stepping thread, it may be resumed from that address with a
+	 breakpoint that hasn't trapped yet.  Seen with
+	 gdb.threads/non-stop-fair-events.exp, on targets that don't
+	 do displaced stepping.  */
+
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: resume: [%s] stepped breakpoint\n",
+			    target_pid_to_str (tp->ptid));
 
       tp->stepped_breakpoint = 1;
 
@@ -2391,8 +2726,8 @@ resume (enum gdb_signal sig)
     }
 
   if (debug_displaced
-      && use_displaced_stepping (gdbarch)
       && tp->control.trap_expected
+      && use_displaced_stepping (tp)
       && !step_over_info_valid_p ())
     {
       struct regcache *resume_regcache = get_thread_regcache (tp->ptid);
@@ -2417,13 +2752,41 @@ resume (enum gdb_signal sig)
     }
 
   do_target_resume (resume_ptid, step, sig);
+  tp->resumed = 1;
   discard_cleanups (old_cleanups);
 }
 
 /* Proceeding.  */
 
-/* Clear out all variables saying what to do when inferior is continued.
-   First do this, then set the ones you want, then call `proceed'.  */
+/* See infrun.h.  */
+
+/* Counter that tracks number of user visible stops.  This can be used
+   to tell whether a command has proceeded the inferior past the
+   current location.  This allows e.g., inferior function calls in
+   breakpoint commands to not interrupt the command list.  When the
+   call finishes successfully, the inferior is standing at the same
+   breakpoint as if nothing happened (and so we don't call
+   normal_stop).  */
+static ULONGEST current_stop_id;
+
+/* See infrun.h.  */
+
+ULONGEST
+get_stop_id (void)
+{
+  return current_stop_id;
+}
+
+/* Called when we report a user visible stop.  */
+
+static void
+new_stop_id (void)
+{
+  current_stop_id++;
+}
+
+/* Clear out all variables saying what to do when inferior is continued.
+   First do this, then set the ones you want, then call `proceed'.  */
 
 static void
 clear_proceed_status_thread (struct thread_info *tp)
@@ -2433,11 +2796,45 @@ clear_proceed_status_thread (struct thre
 			"infrun: clear_proceed_status_thread (%s)\n",
 			target_pid_to_str (tp->ptid));
 
+  /* If we're starting a new sequence, then the previous finished
+     single-step is no longer relevant.  */
+  if (tp->suspend.waitstatus_pending_p)
+    {
+      if (tp->suspend.stop_reason == TARGET_STOPPED_BY_SINGLE_STEP)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: clear_proceed_status: pending "
+				"event of %s was a finished step. "
+				"Discarding.\n",
+				target_pid_to_str (tp->ptid));
+
+	  tp->suspend.waitstatus_pending_p = 0;
+	  tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON;
+	}
+      else if (debug_infrun)
+	{
+	  char *statstr;
+
+	  statstr = target_waitstatus_to_string (&tp->suspend.waitstatus);
+	  fprintf_unfiltered (gdb_stdlog,
+			      "infrun: clear_proceed_status_thread: thread %s "
+			      "has pending wait status %s "
+			      "(currently_stepping=%d).\n",
+			      target_pid_to_str (tp->ptid), statstr,
+			      currently_stepping (tp));
+	  xfree (statstr);
+	}
+    }
+
   /* If this signal should not be seen by program, give it zero.
      Used for debugging signals.  */
   if (!signal_pass_state (tp->suspend.stop_signal))
     tp->suspend.stop_signal = GDB_SIGNAL_0;
 
+  thread_fsm_delete (tp->thread_fsm);
+  tp->thread_fsm = NULL;
+
   tp->control.trap_expected = 0;
   tp->control.step_range_start = 0;
   tp->control.step_range_end = 0;
@@ -2452,7 +2849,6 @@ clear_proceed_status_thread (struct thre
 
   tp->control.proceed_to_finish = 0;
 
-  tp->control.command_interp = NULL;
   tp->control.stepping_command = 0;
 
   /* Discard any remaining commands or status from previous stop.  */
@@ -2462,6 +2858,18 @@ clear_proceed_status_thread (struct thre
 void
 clear_proceed_status (int step)
 {
+  /* With scheduler-locking replay, stop replaying other threads if we're
+     not replaying the user-visible resume ptid.
+
+     This is a convenience feature to not require the user to explicitly
+     stop replaying the other threads.  We're assuming that the user's
+     intent is to resume tracing the recorded process.  */
+  if (!non_stop && scheduler_mode == schedlock_replay
+      && target_record_is_replaying (minus_one_ptid)
+      && !target_record_will_replay (user_visible_resume_ptid (step),
+				     execution_direction))
+    target_record_stop_replaying ();
+
   if (!non_stop)
     {
       struct thread_info *tp;
@@ -2494,10 +2902,6 @@ clear_proceed_status (int step)
       inferior->control.stop_soon = NO_STOP_QUIETLY;
     }
 
-  stop_after_trap = 0;
-
-  clear_step_over_info ();
-
   observer_notify_about_to_proceed ();
 }
 
@@ -2506,7 +2910,7 @@ clear_proceed_status (int step)
    meanwhile, we can skip the whole step-over dance.  */
 
 static int
-thread_still_needs_step_over (struct thread_info *tp)
+thread_still_needs_step_over_bp (struct thread_info *tp)
 {
   if (tp->stepping_over_breakpoint)
     {
@@ -2523,6 +2927,25 @@ thread_still_needs_step_over (struct thr
   return 0;
 }
 
+/* Check whether thread TP still needs to start a step-over in order
+   to make progress when resumed.  Returns an bitwise or of enum
+   step_over_what bits, indicating what needs to be stepped over.  */
+
+static step_over_what
+thread_still_needs_step_over (struct thread_info *tp)
+{
+  step_over_what what = 0;
+
+  if (thread_still_needs_step_over_bp (tp))
+    what |= STEP_OVER_BREAKPOINT;
+
+  if (tp->stepping_over_watchpoint
+      && !target_have_steppable_watchpoint)
+    what |= STEP_OVER_WATCHPOINT;
+
+  return what;
+}
+
 /* Returns true if scheduler locking applies.  STEP indicates whether
    we're about to do a step/next-like command to a thread.  */
 
@@ -2531,49 +2954,10 @@ schedlock_applies (struct thread_info *t
 {
   return (scheduler_mode == schedlock_on
 	  || (scheduler_mode == schedlock_step
-	      && tp->control.stepping_command));
-}
-
-/* Look a thread other than EXCEPT that has previously reported a
-   breakpoint event, and thus needs a step-over in order to make
-   progress.  Returns NULL is none is found.  */
-
-static struct thread_info *
-find_thread_needs_step_over (struct thread_info *except)
-{
-  struct thread_info *tp, *current;
-
-  /* With non-stop mode on, threads are always handled individually.  */
-  gdb_assert (! non_stop);
-
-  current = inferior_thread ();
-
-  /* If scheduler locking applies, we can avoid iterating over all
-     threads.  */
-  if (schedlock_applies (except))
-    {
-      if (except != current
-	  && thread_still_needs_step_over (current))
-	return current;
-
-      return NULL;
-    }
-
-  ALL_NON_EXITED_THREADS (tp)
-    {
-      /* Ignore the EXCEPT thread.  */
-      if (tp == except)
-	continue;
-      /* Ignore threads of processes we're not resuming.  */
-      if (!sched_multi
-	  && ptid_get_pid (tp->ptid) != ptid_get_pid (inferior_ptid))
-	continue;
-
-      if (thread_still_needs_step_over (tp))
-	return tp;
-    }
-
-  return NULL;
+	      && tp->control.stepping_command)
+	  || (scheduler_mode == schedlock_replay
+	      && target_record_will_replay (minus_one_ptid,
+					    execution_direction)));
 }
 
 /* Basic routine for continuing the program in various fashions.
@@ -2596,6 +2980,12 @@ proceed (CORE_ADDR addr, enum gdb_signal
   struct thread_info *tp;
   CORE_ADDR pc;
   struct address_space *aspace;
+  ptid_t resume_ptid;
+  struct execution_control_state ecss;
+  struct execution_control_state *ecs = &ecss;
+  struct cleanup *old_chain;
+  struct cleanup *defer_resume_cleanup;
+  int started;
 
   /* If we're stopped at a fork/vfork, follow the branch set by the
      "set follow-fork-mode" command; otherwise, we'll just proceed
@@ -2621,6 +3011,8 @@ proceed (CORE_ADDR addr, enum gdb_signal
   /* Fill in with reasonable starting values.  */
   init_thread_stepping_state (tp);
 
+  gdb_assert (!thread_is_in_step_over_chain (tp));
+
   if (addr == (CORE_ADDR) -1)
     {
       if (pc == stop_pc
@@ -2650,13 +3042,21 @@ proceed (CORE_ADDR addr, enum gdb_signal
   if (siggnal != GDB_SIGNAL_DEFAULT)
     tp->suspend.stop_signal = siggnal;
 
-  /* Record the interpreter that issued the execution command that
-     caused this thread to resume.  If the top level interpreter is
-     MI/async, and the execution command was a CLI command
-     (next/step/etc.), we'll want to print stop event output to the MI
-     console channel (the stepped-to line, etc.), as if the user
-     entered the execution command on a real GDB console.  */
-  inferior_thread ()->control.command_interp = command_interp ();
+  resume_ptid = user_visible_resume_ptid (tp->control.stepping_command);
+
+  /* If an exception is thrown from this point on, make sure to
+     propagate GDB's knowledge of the executing state to the
+     frontend/user running state.  */
+  old_chain = make_cleanup (finish_thread_state_cleanup, &resume_ptid);
+
+  /* Even if RESUME_PTID is a wildcard, and we end up resuming fewer
+     threads (e.g., we might need to set threads stepping over
+     breakpoints first), from the user/frontend's point of view, all
+     threads in RESUME_PTID are now running.  Unless we're calling an
+     inferior function, as in that case we pretend the inferior
+     doesn't run at all.  */
+  if (!tp->control.in_infcall)
+   set_running (resume_ptid, 1);
 
   if (debug_infrun)
     fprintf_unfiltered (gdb_stdlog,
@@ -2664,101 +3064,144 @@ proceed (CORE_ADDR addr, enum gdb_signal
 			paddress (gdbarch, addr),
 			gdb_signal_to_symbol_string (siggnal));
 
-  if (non_stop)
-    /* In non-stop, each thread is handled individually.  The context
-       must already be set to the right thread here.  */
-    ;
-  else
+  annotate_starting ();
+
+  /* Make sure that output from GDB appears before output from the
+     inferior.  */
+  gdb_flush (gdb_stdout);
+
+  /* In a multi-threaded task we may select another thread and
+     then continue or step.
+
+     But if a thread that we're resuming had stopped at a breakpoint,
+     it will immediately cause another breakpoint stop without any
+     execution (i.e. it will report a breakpoint hit incorrectly).  So
+     we must step over it first.
+
+     Look for threads other than the current (TP) that reported a
+     breakpoint hit and haven't been resumed yet since.  */
+
+  /* If scheduler locking applies, we can avoid iterating over all
+     threads.  */
+  if (!non_stop && !schedlock_applies (tp))
     {
-      struct thread_info *step_over;
+      struct thread_info *current = tp;
+
+      ALL_NON_EXITED_THREADS (tp)
+        {
+	  /* Ignore the current thread here.  It's handled
+	     afterwards.  */
+	  if (tp == current)
+	    continue;
 
-      /* In a multi-threaded task we may select another thread and
-	 then continue or step.
+	  /* Ignore threads of processes we're not resuming.  */
+	  if (!ptid_match (tp->ptid, resume_ptid))
+	    continue;
+
+	  if (!thread_still_needs_step_over (tp))
+	    continue;
+
+	  gdb_assert (!thread_is_in_step_over_chain (tp));
 
-	 But if the old thread was stopped at a breakpoint, it will
-	 immediately cause another breakpoint stop without any
-	 execution (i.e. it will report a breakpoint hit incorrectly).
-	 So we must step over it first.
-
-	 Look for a thread other than the current (TP) that reported a
-	 breakpoint hit and hasn't been resumed yet since.  */
-      step_over = find_thread_needs_step_over (tp);
-      if (step_over != NULL)
-	{
 	  if (debug_infrun)
 	    fprintf_unfiltered (gdb_stdlog,
 				"infrun: need to step-over [%s] first\n",
-				target_pid_to_str (step_over->ptid));
+				target_pid_to_str (tp->ptid));
 
-	  /* Store the prev_pc for the stepping thread too, needed by
-	     switch_back_to_stepped_thread.  */
-	  tp->prev_pc = regcache_read_pc (get_current_regcache ());
-	  switch_to_thread (step_over->ptid);
-	  tp = step_over;
+	  thread_step_over_chain_enqueue (tp);
 	}
+
+      tp = current;
     }
 
-  /* If we need to step over a breakpoint, and we're not using
-     displaced stepping to do so, insert all breakpoints (watchpoints,
-     etc.) but the one we're stepping over, step one instruction, and
-     then re-insert the breakpoint when that step is finished.  */
-  if (tp->stepping_over_breakpoint && !use_displaced_stepping (gdbarch))
-    {
-      struct regcache *regcache = get_current_regcache ();
+  /* Enqueue the current thread last, so that we move all other
+     threads over their breakpoints first.  */
+  if (tp->stepping_over_breakpoint)
+    thread_step_over_chain_enqueue (tp);
 
-      set_step_over_info (get_regcache_aspace (regcache),
-			  regcache_read_pc (regcache), 0);
-    }
-  else
-    clear_step_over_info ();
+  /* If the thread isn't started, we'll still need to set its prev_pc,
+     so that switch_back_to_stepped_thread knows the thread hasn't
+     advanced.  Must do this before resuming any thread, as in
+     all-stop/remote, once we resume we can't send any other packet
+     until the target stops again.  */
+  tp->prev_pc = regcache_read_pc (regcache);
 
-  insert_breakpoints ();
+  defer_resume_cleanup = make_cleanup_defer_target_commit_resume ();
 
-  tp->control.trap_expected = tp->stepping_over_breakpoint;
+  started = start_step_over ();
 
-  annotate_starting ();
+  if (step_over_info_valid_p ())
+    {
+      /* Either this thread started a new in-line step over, or some
+	 other thread was already doing one.  In either case, don't
+	 resume anything else until the step-over is finished.  */
+    }
+  else if (started && !target_is_non_stop_p ())
+    {
+      /* A new displaced stepping sequence was started.  In all-stop,
+	 we can't talk to the target anymore until it next stops.  */
+    }
+  else if (!non_stop && target_is_non_stop_p ())
+    {
+      /* In all-stop, but the target is always in non-stop mode.
+	 Start all other threads that are implicitly resumed too.  */
+      ALL_NON_EXITED_THREADS (tp)
+        {
+	  /* Ignore threads of processes we're not resuming.  */
+	  if (!ptid_match (tp->ptid, resume_ptid))
+	    continue;
 
-  /* Make sure that output from GDB appears before output from the
-     inferior.  */
-  gdb_flush (gdb_stdout);
+	  if (tp->resumed)
+	    {
+	      if (debug_infrun)
+		fprintf_unfiltered (gdb_stdlog,
+				    "infrun: proceed: [%s] resumed\n",
+				    target_pid_to_str (tp->ptid));
+	      gdb_assert (tp->executing || tp->suspend.waitstatus_pending_p);
+	      continue;
+	    }
 
-  /* Refresh prev_pc value just prior to resuming.  This used to be
-     done in stop_waiting, however, setting prev_pc there did not handle
-     scenarios such as inferior function calls or returning from
-     a function via the return command.  In those cases, the prev_pc
-     value was not set properly for subsequent commands.  The prev_pc value 
-     is used to initialize the starting line number in the ecs.  With an 
-     invalid value, the gdb next command ends up stopping at the position
-     represented by the next line table entry past our start position.
-     On platforms that generate one line table entry per line, this
-     is not a problem.  However, on the ia64, the compiler generates
-     extraneous line table entries that do not increase the line number.
-     When we issue the gdb next command on the ia64 after an inferior call
-     or a return command, we often end up a few instructions forward, still 
-     within the original line we started.
-
-     An attempt was made to refresh the prev_pc at the same time the
-     execution_control_state is initialized (for instance, just before
-     waiting for an inferior event).  But this approach did not work
-     because of platforms that use ptrace, where the pc register cannot
-     be read unless the inferior is stopped.  At that point, we are not
-     guaranteed the inferior is stopped and so the regcache_read_pc() call
-     can fail.  Setting the prev_pc value here ensures the value is updated
-     correctly when the inferior is stopped.  */
-  tp->prev_pc = regcache_read_pc (get_current_regcache ());
-
-  /* Resume inferior.  */
-  resume (tp->suspend.stop_signal);
-
-  /* Wait for it to stop (if not standalone)
-     and in any case decode why it stopped, and act accordingly.  */
-  /* Do this only if we are not using the event loop, or if the target
-     does not support asynchronous execution.  */
-  if (!target_can_async_p ())
+	  if (thread_is_in_step_over_chain (tp))
+	    {
+	      if (debug_infrun)
+		fprintf_unfiltered (gdb_stdlog,
+				    "infrun: proceed: [%s] needs step-over\n",
+				    target_pid_to_str (tp->ptid));
+	      continue;
+	    }
+
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: proceed: resuming %s\n",
+				target_pid_to_str (tp->ptid));
+
+	  reset_ecs (ecs, tp);
+	  switch_to_thread (tp->ptid);
+	  keep_going_pass_signal (ecs);
+	  if (!ecs->wait_some_more)
+	    error (_("Command aborted."));
+	}
+    }
+  else if (!tp->resumed && !thread_is_in_step_over_chain (tp))
     {
-      wait_for_inferior ();
-      normal_stop ();
+      /* The thread wasn't started, and isn't queued, run it now.  */
+      reset_ecs (ecs, tp);
+      switch_to_thread (tp->ptid);
+      keep_going_pass_signal (ecs);
+      if (!ecs->wait_some_more)
+	error (_("Command aborted."));
     }
+
+  do_cleanups (defer_resume_cleanup);
+  target_commit_resume ();
+
+  discard_cleanups (old_chain);
+
+  /* Tell the event loop to wait for it to stop.  If the target
+     supports asynchronous execution, it'll do this from within
+     target_resume.  */
+  if (!target_can_async_p ())
+    mark_async_event_handler (infrun_async_inferior_event_token);
 }
 
 
@@ -2816,28 +3259,6 @@ init_wait_for_inferior (void)
 }
 
 
-/* Data to be passed around while handling an event.  This data is
-   discarded between events.  */
-struct execution_control_state
-{
-  ptid_t ptid;
-  /* The thread that got the event, if this was a thread event; NULL
-     otherwise.  */
-  struct thread_info *event_thread;
-
-  struct target_waitstatus ws;
-  int stop_func_filled_in;
-  CORE_ADDR stop_func_start;
-  CORE_ADDR stop_func_end;
-  const char *stop_func_name;
-  int wait_some_more;
-
-  /* True if the event thread hit the single-step breakpoint of
-     another thread.  Thus the event doesn't cause a stop, the thread
-     needs to be single-stepped past the single-step breakpoint before
-     we can switch back to the original stepping thread.  */
-  int hit_singlestep_breakpoint;
-};
 
 static void handle_inferior_event (struct execution_control_state *ecs);
 
@@ -2851,7 +3272,6 @@ static void check_exception_resume (stru
 
 static void end_stepping_range (struct execution_control_state *ecs);
 static void stop_waiting (struct execution_control_state *ecs);
-static void prepare_to_wait (struct execution_control_state *ecs);
 static void keep_going (struct execution_control_state *ecs);
 static void process_event_stop_test (struct execution_control_state *ecs);
 static int switch_back_to_stepped_thread (struct execution_control_state *ecs);
@@ -2895,7 +3315,7 @@ infrun_thread_stop_requested_callback (s
 	 have consistent output as if the stop event had been
 	 reported.  */
       ecs->ptid = info->ptid;
-      ecs->event_thread = find_thread_ptid (info->ptid);
+      ecs->event_thread = info;
       ecs->ws.kind = TARGET_WAITKIND_STOPPED;
       ecs->ws.value.sig = GDB_SIGNAL_0;
 
@@ -2903,14 +3323,10 @@ infrun_thread_stop_requested_callback (s
 
       if (!ecs->wait_some_more)
 	{
-	  struct thread_info *tp;
+	  /* Cancel any running execution command.  */
+	  thread_cancel_execution_command (info);
 
 	  normal_stop ();
-
-	  /* Finish off the continuations.  */
-	  tp = inferior_thread ();
-	  do_all_intermediate_continuations_thread (tp, 1);
-	  do_all_continuations_thread (tp, 1);
 	}
 
       do_cleanups (old_chain);
@@ -2926,35 +3342,17 @@ infrun_thread_stop_requested_callback (s
 static void
 infrun_thread_stop_requested (ptid_t ptid)
 {
-  struct displaced_step_inferior_state *displaced;
-
-  /* PTID was requested to stop.  Remove it from the displaced
-     stepping queue, so we don't try to resume it automatically.  */
-
-  for (displaced = displaced_step_inferior_states;
-       displaced;
-       displaced = displaced->next)
-    {
-      struct displaced_step_request *it, **prev_next_p;
-
-      it = displaced->step_request_queue;
-      prev_next_p = &displaced->step_request_queue;
-      while (it)
-	{
-	  if (ptid_match (it->ptid, ptid))
-	    {
-	      *prev_next_p = it->next;
-	      it->next = NULL;
-	      xfree (it);
-	    }
-	  else
-	    {
-	      prev_next_p = &it->next;
-	    }
+  struct thread_info *tp;
 
-	  it = *prev_next_p;
-	}
-    }
+  /* PTID was requested to stop.  Remove matching threads from the
+     step-over queue, so we don't try to resume them
+     automatically.  */
+  ALL_NON_EXITED_THREADS (tp)
+    if (ptid_match (tp->ptid, ptid))
+      {
+	if (thread_is_in_step_over_chain (tp))
+	  thread_step_over_chain_remove (tp);
+      }
 
   iterate_over_threads (infrun_thread_stop_requested_callback, &ptid);
 }
@@ -2990,7 +3388,7 @@ for_each_just_stopped_thread (for_each_j
   if (!target_has_execution || ptid_equal (inferior_ptid, null_ptid))
     return;
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     {
       /* If in non-stop mode, only the current thread stopped.  */
       func (inferior_thread ());
@@ -3033,49 +3431,212 @@ delete_just_stopped_threads_infrun_break
   delete_just_stopped_threads_infrun_breakpoints ();
 }
 
-/* Pretty print the results of target_wait, for debugging purposes.  */
+/* See infrun.h.  */
 
-static void
+void
 print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid,
 			   const struct target_waitstatus *ws)
 {
   char *status_string = target_waitstatus_to_string (ws);
-  struct ui_file *tmp_stream = mem_fileopen ();
-  char *text;
+  string_file stb;
 
   /* The text is split over several lines because it was getting too long.
      Call fprintf_unfiltered (gdb_stdlog) once so that the text is still
      output as a unit; we want only one timestamp printed if debug_timestamp
      is set.  */
 
-  fprintf_unfiltered (tmp_stream,
-		      "infrun: target_wait (%d.%ld.%ld",
-		      ptid_get_pid (waiton_ptid),
-		      ptid_get_lwp (waiton_ptid),
-		      ptid_get_tid (waiton_ptid));
+  stb.printf ("infrun: target_wait (%d.%ld.%ld",
+	      ptid_get_pid (waiton_ptid),
+	      ptid_get_lwp (waiton_ptid),
+	      ptid_get_tid (waiton_ptid));
   if (ptid_get_pid (waiton_ptid) != -1)
-    fprintf_unfiltered (tmp_stream,
-			" [%s]", target_pid_to_str (waiton_ptid));
-  fprintf_unfiltered (tmp_stream, ", status) =\n");
-  fprintf_unfiltered (tmp_stream,
-		      "infrun:   %d.%ld.%ld [%s],\n",
-		      ptid_get_pid (result_ptid),
-		      ptid_get_lwp (result_ptid),
-		      ptid_get_tid (result_ptid),
-		      target_pid_to_str (result_ptid));
-  fprintf_unfiltered (tmp_stream,
-		      "infrun:   %s\n",
-		      status_string);
-
-  text = ui_file_xstrdup (tmp_stream, NULL);
+    stb.printf (" [%s]", target_pid_to_str (waiton_ptid));
+  stb.printf (", status) =\n");
+  stb.printf ("infrun:   %d.%ld.%ld [%s],\n",
+	      ptid_get_pid (result_ptid),
+	      ptid_get_lwp (result_ptid),
+	      ptid_get_tid (result_ptid),
+	      target_pid_to_str (result_ptid));
+  stb.printf ("infrun:   %s\n", status_string);
 
   /* This uses %s in part to handle %'s in the text, but also to avoid
      a gcc error: the format attribute requires a string literal.  */
-  fprintf_unfiltered (gdb_stdlog, "%s", text);
+  fprintf_unfiltered (gdb_stdlog, "%s", stb.c_str ());
 
   xfree (status_string);
-  xfree (text);
-  ui_file_delete (tmp_stream);
+}
+
+/* Select a thread at random, out of those which are resumed and have
+   had events.  */
+
+static struct thread_info *
+random_pending_event_thread (ptid_t waiton_ptid)
+{
+  struct thread_info *event_tp;
+  int num_events = 0;
+  int random_selector;
+
+  /* First see how many events we have.  Count only resumed threads
+     that have an event pending.  */
+  ALL_NON_EXITED_THREADS (event_tp)
+    if (ptid_match (event_tp->ptid, waiton_ptid)
+	&& event_tp->resumed
+	&& event_tp->suspend.waitstatus_pending_p)
+      num_events++;
+
+  if (num_events == 0)
+    return NULL;
+
+  /* Now randomly pick a thread out of those that have had events.  */
+  random_selector = (int)
+    ((num_events * (double) rand ()) / (RAND_MAX + 1.0));
+
+  if (debug_infrun && num_events > 1)
+    fprintf_unfiltered (gdb_stdlog,
+			"infrun: Found %d events, selecting #%d\n",
+			num_events, random_selector);
+
+  /* Select the Nth thread that has had an event.  */
+  ALL_NON_EXITED_THREADS (event_tp)
+    if (ptid_match (event_tp->ptid, waiton_ptid)
+	&& event_tp->resumed
+	&& event_tp->suspend.waitstatus_pending_p)
+      if (random_selector-- == 0)
+	break;
+
+  return event_tp;
+}
+
+/* Wrapper for target_wait that first checks whether threads have
+   pending statuses to report before actually asking the target for
+   more events.  */
+
+static ptid_t
+do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
+{
+  ptid_t event_ptid;
+  struct thread_info *tp;
+
+  /* First check if there is a resumed thread with a wait status
+     pending.  */
+  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+    {
+      tp = random_pending_event_thread (ptid);
+    }
+  else
+    {
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: Waiting for specific thread %s.\n",
+			    target_pid_to_str (ptid));
+
+      /* We have a specific thread to check.  */
+      tp = find_thread_ptid (ptid);
+      gdb_assert (tp != NULL);
+      if (!tp->suspend.waitstatus_pending_p)
+	tp = NULL;
+    }
+
+  if (tp != NULL
+      && (tp->suspend.stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
+	  || tp->suspend.stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT))
+    {
+      struct regcache *regcache = get_thread_regcache (tp->ptid);
+      struct gdbarch *gdbarch = get_regcache_arch (regcache);
+      CORE_ADDR pc;
+      int discard = 0;
+
+      pc = regcache_read_pc (regcache);
+
+      if (pc != tp->suspend.stop_pc)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: PC of %s changed.  was=%s, now=%s\n",
+				target_pid_to_str (tp->ptid),
+				paddress (gdbarch, tp->prev_pc),
+				paddress (gdbarch, pc));
+	  discard = 1;
+	}
+      else if (!breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: previous breakpoint of %s, at %s gone\n",
+				target_pid_to_str (tp->ptid),
+				paddress (gdbarch, pc));
+
+	  discard = 1;
+	}
+
+      if (discard)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: pending event of %s cancelled.\n",
+				target_pid_to_str (tp->ptid));
+
+	  tp->suspend.waitstatus.kind = TARGET_WAITKIND_SPURIOUS;
+	  tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON;
+	}
+    }
+
+  if (tp != NULL)
+    {
+      if (debug_infrun)
+	{
+	  char *statstr;
+
+	  statstr = target_waitstatus_to_string (&tp->suspend.waitstatus);
+	  fprintf_unfiltered (gdb_stdlog,
+			      "infrun: Using pending wait status %s for %s.\n",
+			      statstr,
+			      target_pid_to_str (tp->ptid));
+	  xfree (statstr);
+	}
+
+      /* Now that we've selected our final event LWP, un-adjust its PC
+	 if it was a software breakpoint (and the target doesn't
+	 always adjust the PC itself).  */
+      if (tp->suspend.stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
+	  && !target_supports_stopped_by_sw_breakpoint ())
+	{
+	  struct regcache *regcache;
+	  struct gdbarch *gdbarch;
+	  int decr_pc;
+
+	  regcache = get_thread_regcache (tp->ptid);
+	  gdbarch = get_regcache_arch (regcache);
+
+	  decr_pc = gdbarch_decr_pc_after_break (gdbarch);
+	  if (decr_pc != 0)
+	    {
+	      CORE_ADDR pc;
+
+	      pc = regcache_read_pc (regcache);
+	      regcache_write_pc (regcache, pc + decr_pc);
+	    }
+	}
+
+      tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON;
+      *status = tp->suspend.waitstatus;
+      tp->suspend.waitstatus_pending_p = 0;
+
+      /* Wake up the event loop again, until all pending events are
+	 processed.  */
+      if (target_is_async_p ())
+	mark_async_event_handler (infrun_async_inferior_event_token);
+      return tp->ptid;
+    }
+
+  /* But if we don't find one, we'll have to wait.  */
+
+  if (deprecated_target_wait_hook)
+    event_ptid = deprecated_target_wait_hook (ptid, status, options);
+  else
+    event_ptid = target_wait (ptid, status, options);
+
+  return event_ptid;
 }
 
 /* Prepare and stabilize the inferior for detaching it.  E.g.,
@@ -3121,10 +3682,7 @@ prepare_for_detach (void)
 	 don't get any event.  */
       target_dcache_invalidate ();
 
-      if (deprecated_target_wait_hook)
-	ecs->ptid = deprecated_target_wait_hook (pid_ptid, &ecs->ws, 0);
-      else
-	ecs->ptid = target_wait (pid_ptid, &ecs->ws, 0);
+      ecs->ptid = do_target_wait (pid_ptid, &ecs->ws, 0);
 
       if (debug_infrun)
 	print_target_wait_results (pid_ptid, ecs->ptid, &ecs->ws);
@@ -3196,10 +3754,7 @@ wait_for_inferior (void)
 	 don't get any event.  */
       target_dcache_invalidate ();
 
-      if (deprecated_target_wait_hook)
-	ecs->ptid = deprecated_target_wait_hook (waiton_ptid, &ecs->ws, 0);
-      else
-	ecs->ptid = target_wait (waiton_ptid, &ecs->ws, 0);
+      ecs->ptid = do_target_wait (waiton_ptid, &ecs->ws, 0);
 
       if (debug_infrun)
 	print_target_wait_results (waiton_ptid, ecs->ptid, &ecs->ws);
@@ -3230,7 +3785,9 @@ wait_for_inferior (void)
 static void
 reinstall_readline_callback_handler_cleanup (void *arg)
 {
-  if (!interpreter_async)
+  struct ui *ui = current_ui;
+
+  if (!ui->async)
     {
       /* We're not going back to the top level event loop yet.  Don't
 	 install the readline callback, as it'd prep the terminal,
@@ -3240,10 +3797,80 @@ reinstall_readline_callback_handler_clea
       return;
     }
 
-  if (async_command_editing_p && !sync_execution)
+  if (ui->command_editing && ui->prompt_state != PROMPT_BLOCKED)
     gdb_rl_callback_handler_reinstall ();
 }
 
+/* Clean up the FSMs of threads that are now stopped.  In non-stop,
+   that's just the event thread.  In all-stop, that's all threads.  */
+
+static void
+clean_up_just_stopped_threads_fsms (struct execution_control_state *ecs)
+{
+  struct thread_info *thr = ecs->event_thread;
+
+  if (thr != NULL && thr->thread_fsm != NULL)
+    thread_fsm_clean_up (thr->thread_fsm, thr);
+
+  if (!non_stop)
+    {
+      ALL_NON_EXITED_THREADS (thr)
+        {
+	  if (thr->thread_fsm == NULL)
+	    continue;
+	  if (thr == ecs->event_thread)
+	    continue;
+
+	  switch_to_thread (thr->ptid);
+	  thread_fsm_clean_up (thr->thread_fsm, thr);
+	}
+
+      if (ecs->event_thread != NULL)
+	switch_to_thread (ecs->event_thread->ptid);
+    }
+}
+
+/* Helper for all_uis_check_sync_execution_done that works on the
+   current UI.  */
+
+static void
+check_curr_ui_sync_execution_done (void)
+{
+  struct ui *ui = current_ui;
+
+  if (ui->prompt_state == PROMPT_NEEDED
+      && ui->async
+      && !gdb_in_secondary_prompt_p (ui))
+    {
+      target_terminal_ours ();
+      observer_notify_sync_execution_done ();
+      ui_register_input_event_handler (ui);
+    }
+}
+
+/* See infrun.h.  */
+
+void
+all_uis_check_sync_execution_done (void)
+{
+  SWITCH_THRU_ALL_UIS ()
+    {
+      check_curr_ui_sync_execution_done ();
+    }
+}
+
+/* See infrun.h.  */
+
+void
+all_uis_on_sync_execution_starting (void)
+{
+  SWITCH_THRU_ALL_UIS ()
+    {
+      if (current_ui->prompt_state == PROMPT_NEEDED)
+	async_disable_stdin ();
+    }
+}
+
 /* Asynchronous version of wait_for_inferior.  It is called by the
    event loop whenever a change of state is detected on the file
    descriptor corresponding to the target.  It can be called more than
@@ -3260,12 +3887,16 @@ fetch_inferior_event (void *client_data)
   struct execution_control_state *ecs = &ecss;
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   struct cleanup *ts_old_chain;
-  int was_sync = sync_execution;
   int cmd_done = 0;
   ptid_t waiton_ptid = minus_one_ptid;
 
   memset (ecs, 0, sizeof (*ecs));
 
+  /* Events are always processed with the main UI as current UI.  This
+     way, warnings, debug output, etc. are always consistently sent to
+     the main console.  */
+  scoped_restore save_ui = make_scoped_restore (&current_ui, main_ui);
+
   /* End up with readline processing input, if necessary.  */
   make_cleanup (reinstall_readline_callback_handler_cleanup, NULL);
 
@@ -3293,14 +3924,11 @@ fetch_inferior_event (void *client_data)
      event.  */
   target_dcache_invalidate ();
 
-  make_cleanup_restore_integer (&execution_direction);
-  execution_direction = target_execution_direction ();
+  scoped_restore save_exec_dir
+    = make_scoped_restore (&execution_direction, target_execution_direction ());
 
-  if (deprecated_target_wait_hook)
-    ecs->ptid =
-      deprecated_target_wait_hook (waiton_ptid, &ecs->ws, TARGET_WNOHANG);
-  else
-    ecs->ptid = target_wait (waiton_ptid, &ecs->ws, TARGET_WNOHANG);
+  ecs->ptid = do_target_wait (waiton_ptid, &ecs->ws,
+			      target_can_async_p () ? TARGET_WNOHANG : 0);
 
   if (debug_infrun)
     print_target_wait_results (waiton_ptid, ecs->ptid, &ecs->ws);
@@ -3308,7 +3936,7 @@ fetch_inferior_event (void *client_data)
   /* If an error happens while handling the event, propagate GDB's
      knowledge of the executing state to the frontend/user running
      state.  */
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     ts_old_chain = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
   else
     ts_old_chain = make_cleanup (finish_thread_state_cleanup, &ecs->ptid);
@@ -3325,24 +3953,48 @@ fetch_inferior_event (void *client_data)
   if (!ecs->wait_some_more)
     {
       struct inferior *inf = find_inferior_ptid (ecs->ptid);
+      int should_stop = 1;
+      struct thread_info *thr = ecs->event_thread;
+      int should_notify_stop = 1;
 
       delete_just_stopped_threads_infrun_breakpoints ();
 
-      /* We may not find an inferior if this was a process exit.  */
-      if (inf == NULL || inf->control.stop_soon == NO_STOP_QUIETLY)
-	normal_stop ();
-
-      if (target_has_execution
-	  && ecs->ws.kind != TARGET_WAITKIND_NO_RESUMED
-	  && ecs->ws.kind != TARGET_WAITKIND_EXITED
-	  && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
-	  && ecs->event_thread->step_multi
-	  && ecs->event_thread->control.stop_step)
-	inferior_event_handler (INF_EXEC_CONTINUE, NULL);
+      if (thr != NULL)
+	{
+	  struct thread_fsm *thread_fsm = thr->thread_fsm;
+
+	  if (thread_fsm != NULL)
+	    should_stop = thread_fsm_should_stop (thread_fsm, thr);
+	}
+
+      if (!should_stop)
+	{
+	  keep_going (ecs);
+	}
       else
 	{
-	  inferior_event_handler (INF_EXEC_COMPLETE, NULL);
-	  cmd_done = 1;
+	  clean_up_just_stopped_threads_fsms (ecs);
+
+	  if (thr != NULL && thr->thread_fsm != NULL)
+	    {
+	      should_notify_stop
+		= thread_fsm_should_notify_stop (thr->thread_fsm);
+	    }
+
+	  if (should_notify_stop)
+	    {
+	      int proceeded = 0;
+
+	      /* We may not find an inferior if this was a process exit.  */
+	      if (inf == NULL || inf->control.stop_soon == NO_STOP_QUIETLY)
+		proceeded = normal_stop ();
+
+	      if (!proceeded)
+		{
+		  inferior_event_handler (INF_EXEC_COMPLETE, NULL);
+		  cmd_done = 1;
+		}
+	    }
 	}
     }
 
@@ -3352,14 +4004,12 @@ fetch_inferior_event (void *client_data)
   /* Revert thread and frame.  */
   do_cleanups (old_chain);
 
-  /* If the inferior was in sync execution mode, and now isn't,
-     restore the prompt (a synchronous execution command has finished,
-     and we're ready for input).  */
-  if (interpreter_async && was_sync && !sync_execution)
-    observer_notify_sync_execution_done ();
+  /* If a UI was in sync execution mode, and now isn't, restore its
+     prompt (a synchronous execution command has finished, and we're
+     ready for input).  */
+  all_uis_check_sync_execution_done ();
 
   if (cmd_done
-      && !was_sync
       && exec_done_display_p
       && (ptid_equal (inferior_ptid, null_ptid)
 	  || !is_running (inferior_ptid)))
@@ -3392,7 +4042,7 @@ init_thread_stepping_state (struct threa
 
 /* Set the cached copy of the last ptid/waitstatus.  */
 
-static void
+void
 set_last_target_status (ptid_t ptid, struct target_waitstatus status)
 {
   target_last_wait_ptid = ptid;
@@ -3433,8 +4083,14 @@ context_switch (ptid_t ptid)
   switch_to_thread (ptid);
 }
 
+/* If the target can't tell whether we've hit breakpoints
+   (target_supports_stopped_by_sw_breakpoint), and we got a SIGTRAP,
+   check whether that could have been caused by a breakpoint.  If so,
+   adjust the PC, per gdbarch_decr_pc_after_break.  */
+
 static void
-adjust_pc_after_break (struct execution_control_state *ecs)
+adjust_pc_after_break (struct thread_info *thread,
+		       struct target_waitstatus *ws)
 {
   struct regcache *regcache;
   struct gdbarch *gdbarch;
@@ -3462,10 +4118,10 @@ adjust_pc_after_break (struct execution_
      target with both of these set in GDB history, and it seems unlikely to be
      correct, so gdbarch_have_nonsteppable_watchpoint is not checked here.  */
 
-  if (ecs->ws.kind != TARGET_WAITKIND_STOPPED)
+  if (ws->kind != TARGET_WAITKIND_STOPPED)
     return;
 
-  if (ecs->ws.value.sig != GDB_SIGNAL_TRAP)
+  if (ws->value.sig != GDB_SIGNAL_TRAP)
     return;
 
   /* In reverse execution, when a breakpoint is hit, the instruction
@@ -3511,7 +4167,7 @@ adjust_pc_after_break (struct execution_
 
   /* If this target does not decrement the PC after breakpoints, then
      we have nothing to do.  */
-  regcache = get_thread_regcache (ecs->ptid);
+  regcache = get_thread_regcache (thread->ptid);
   gdbarch = get_regcache_arch (regcache);
 
   decr_pc = gdbarch_decr_pc_after_break (gdbarch);
@@ -3541,7 +4197,8 @@ adjust_pc_after_break (struct execution_
      to get the "stopped by SW BP and needs adjustment" info out of
      the target/kernel (and thus never reach here; see above).  */
   if (software_breakpoint_inserted_here_p (aspace, breakpoint_pc)
-      || (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc)))
+      || (target_is_non_stop_p ()
+	  && moribund_breakpoint_here_p (aspace, breakpoint_pc)))
     {
       struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL);
 
@@ -3565,10 +4222,10 @@ adjust_pc_after_break (struct execution_
 	 software breakpoint.  In this case (prev_pc == breakpoint_pc),
 	 we also need to back up to the breakpoint address.  */
 
-      if (thread_has_single_step_breakpoints_set (ecs->event_thread)
-	  || !currently_stepping (ecs->event_thread)
-	  || (ecs->event_thread->stepped_breakpoint
-	      && ecs->event_thread->prev_pc == breakpoint_pc))
+      if (thread_has_single_step_breakpoints_set (thread)
+	  || !currently_stepping (thread)
+	  || (thread->stepped_breakpoint
+	      && thread->prev_pc == breakpoint_pc))
 	regcache_write_pc (regcache, breakpoint_pc);
 
       do_cleanups (old_cleanups);
@@ -3647,24 +4304,498 @@ fill_in_stop_func (struct gdbarch *gdbar
       ecs->stop_func_start
 	+= gdbarch_deprecated_function_start_offset (gdbarch);
 
-      if (gdbarch_skip_entrypoint_p (gdbarch))
-	ecs->stop_func_start = gdbarch_skip_entrypoint (gdbarch,
-							ecs->stop_func_start);
+      if (gdbarch_skip_entrypoint_p (gdbarch))
+	ecs->stop_func_start = gdbarch_skip_entrypoint (gdbarch,
+							ecs->stop_func_start);
+
+      ecs->stop_func_filled_in = 1;
+    }
+}
+
+
+/* Return the STOP_SOON field of the inferior pointed at by PTID.  */
+
+static enum stop_kind
+get_inferior_stop_soon (ptid_t ptid)
+{
+  struct inferior *inf = find_inferior_ptid (ptid);
+
+  gdb_assert (inf != NULL);
+  return inf->control.stop_soon;
+}
+
+/* Wait for one event.  Store the resulting waitstatus in WS, and
+   return the event ptid.  */
+
+static ptid_t
+wait_one (struct target_waitstatus *ws)
+{
+  ptid_t event_ptid;
+  ptid_t wait_ptid = minus_one_ptid;
+
+  overlay_cache_invalid = 1;
+
+  /* Flush target cache before starting to handle each event.
+     Target was running and cache could be stale.  This is just a
+     heuristic.  Running threads may modify target memory, but we
+     don't get any event.  */
+  target_dcache_invalidate ();
+
+  if (deprecated_target_wait_hook)
+    event_ptid = deprecated_target_wait_hook (wait_ptid, ws, 0);
+  else
+    event_ptid = target_wait (wait_ptid, ws, 0);
+
+  if (debug_infrun)
+    print_target_wait_results (wait_ptid, event_ptid, ws);
+
+  return event_ptid;
+}
+
+/* Generate a wrapper for target_stopped_by_REASON that works on PTID
+   instead of the current thread.  */
+#define THREAD_STOPPED_BY(REASON)		\
+static int					\
+thread_stopped_by_ ## REASON (ptid_t ptid)	\
+{						\
+  struct cleanup *old_chain;			\
+  int res;					\
+						\
+  old_chain = save_inferior_ptid ();		\
+  inferior_ptid = ptid;				\
+						\
+  res = target_stopped_by_ ## REASON ();	\
+						\
+  do_cleanups (old_chain);			\
+						\
+  return res;					\
+}
+
+/* Generate thread_stopped_by_watchpoint.  */
+THREAD_STOPPED_BY (watchpoint)
+/* Generate thread_stopped_by_sw_breakpoint.  */
+THREAD_STOPPED_BY (sw_breakpoint)
+/* Generate thread_stopped_by_hw_breakpoint.  */
+THREAD_STOPPED_BY (hw_breakpoint)
+
+/* Cleanups that switches to the PTID pointed at by PTID_P.  */
+
+static void
+switch_to_thread_cleanup (void *ptid_p)
+{
+  ptid_t ptid = *(ptid_t *) ptid_p;
+
+  switch_to_thread (ptid);
+}
+
+/* Save the thread's event and stop reason to process it later.  */
+
+static void
+save_waitstatus (struct thread_info *tp, struct target_waitstatus *ws)
+{
+  struct regcache *regcache;
+  struct address_space *aspace;
+
+  if (debug_infrun)
+    {
+      char *statstr;
+
+      statstr = target_waitstatus_to_string (ws);
+      fprintf_unfiltered (gdb_stdlog,
+			  "infrun: saving status %s for %d.%ld.%ld\n",
+			  statstr,
+			  ptid_get_pid (tp->ptid),
+			  ptid_get_lwp (tp->ptid),
+			  ptid_get_tid (tp->ptid));
+      xfree (statstr);
+    }
+
+  /* Record for later.  */
+  tp->suspend.waitstatus = *ws;
+  tp->suspend.waitstatus_pending_p = 1;
+
+  regcache = get_thread_regcache (tp->ptid);
+  aspace = get_regcache_aspace (regcache);
+
+  if (ws->kind == TARGET_WAITKIND_STOPPED
+      && ws->value.sig == GDB_SIGNAL_TRAP)
+    {
+      CORE_ADDR pc = regcache_read_pc (regcache);
+
+      adjust_pc_after_break (tp, &tp->suspend.waitstatus);
+
+      if (thread_stopped_by_watchpoint (tp->ptid))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_WATCHPOINT;
+	}
+      else if (target_supports_stopped_by_sw_breakpoint ()
+	       && thread_stopped_by_sw_breakpoint (tp->ptid))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_SW_BREAKPOINT;
+	}
+      else if (target_supports_stopped_by_hw_breakpoint ()
+	       && thread_stopped_by_hw_breakpoint (tp->ptid))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_HW_BREAKPOINT;
+	}
+      else if (!target_supports_stopped_by_hw_breakpoint ()
+	       && hardware_breakpoint_inserted_here_p (aspace,
+						       pc))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_HW_BREAKPOINT;
+	}
+      else if (!target_supports_stopped_by_sw_breakpoint ()
+	       && software_breakpoint_inserted_here_p (aspace,
+						       pc))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_SW_BREAKPOINT;
+	}
+      else if (!thread_has_single_step_breakpoints_set (tp)
+	       && currently_stepping (tp))
+	{
+	  tp->suspend.stop_reason
+	    = TARGET_STOPPED_BY_SINGLE_STEP;
+	}
+    }
+}
+
+/* A cleanup that disables thread create/exit events.  */
+
+static void
+disable_thread_events (void *arg)
+{
+  target_thread_events (0);
+}
+
+/* See infrun.h.  */
+
+void
+stop_all_threads (void)
+{
+  /* We may need multiple passes to discover all threads.  */
+  int pass;
+  int iterations = 0;
+  ptid_t entry_ptid;
+  struct cleanup *old_chain;
+
+  gdb_assert (target_is_non_stop_p ());
+
+  if (debug_infrun)
+    fprintf_unfiltered (gdb_stdlog, "infrun: stop_all_threads\n");
+
+  entry_ptid = inferior_ptid;
+  old_chain = make_cleanup (switch_to_thread_cleanup, &entry_ptid);
+
+  target_thread_events (1);
+  make_cleanup (disable_thread_events, NULL);
+
+  /* Request threads to stop, and then wait for the stops.  Because
+     threads we already know about can spawn more threads while we're
+     trying to stop them, and we only learn about new threads when we
+     update the thread list, do this in a loop, and keep iterating
+     until two passes find no threads that need to be stopped.  */
+  for (pass = 0; pass < 2; pass++, iterations++)
+    {
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: stop_all_threads, pass=%d, "
+			    "iterations=%d\n", pass, iterations);
+      while (1)
+	{
+	  ptid_t event_ptid;
+	  struct target_waitstatus ws;
+	  int need_wait = 0;
+	  struct thread_info *t;
+
+	  update_thread_list ();
+
+	  /* Go through all threads looking for threads that we need
+	     to tell the target to stop.  */
+	  ALL_NON_EXITED_THREADS (t)
+	    {
+	      if (t->executing)
+		{
+		  /* If already stopping, don't request a stop again.
+		     We just haven't seen the notification yet.  */
+		  if (!t->stop_requested)
+		    {
+		      if (debug_infrun)
+			fprintf_unfiltered (gdb_stdlog,
+					    "infrun:   %s executing, "
+					    "need stop\n",
+					    target_pid_to_str (t->ptid));
+		      target_stop (t->ptid);
+		      t->stop_requested = 1;
+		    }
+		  else
+		    {
+		      if (debug_infrun)
+			fprintf_unfiltered (gdb_stdlog,
+					    "infrun:   %s executing, "
+					    "already stopping\n",
+					    target_pid_to_str (t->ptid));
+		    }
+
+		  if (t->stop_requested)
+		    need_wait = 1;
+		}
+	      else
+		{
+		  if (debug_infrun)
+		    fprintf_unfiltered (gdb_stdlog,
+					"infrun:   %s not executing\n",
+					target_pid_to_str (t->ptid));
+
+		  /* The thread may be not executing, but still be
+		     resumed with a pending status to process.  */
+		  t->resumed = 0;
+		}
+	    }
+
+	  if (!need_wait)
+	    break;
+
+	  /* If we find new threads on the second iteration, restart
+	     over.  We want to see two iterations in a row with all
+	     threads stopped.  */
+	  if (pass > 0)
+	    pass = -1;
+
+	  event_ptid = wait_one (&ws);
+	  if (ws.kind == TARGET_WAITKIND_NO_RESUMED)
+	    {
+	      /* All resumed threads exited.  */
+	    }
+	  else if (ws.kind == TARGET_WAITKIND_THREAD_EXITED
+		   || ws.kind == TARGET_WAITKIND_EXITED
+		   || ws.kind == TARGET_WAITKIND_SIGNALLED)
+	    {
+	      if (debug_infrun)
+		{
+		  ptid_t ptid = pid_to_ptid (ws.value.integer);
+
+		  fprintf_unfiltered (gdb_stdlog,
+				      "infrun: %s exited while "
+				      "stopping threads\n",
+				      target_pid_to_str (ptid));
+		}
+	    }
+	  else
+	    {
+	      struct inferior *inf;
+
+	      t = find_thread_ptid (event_ptid);
+	      if (t == NULL)
+		t = add_thread (event_ptid);
+
+	      t->stop_requested = 0;
+	      t->executing = 0;
+	      t->resumed = 0;
+	      t->control.may_range_step = 0;
+
+	      /* This may be the first time we see the inferior report
+		 a stop.  */
+	      inf = find_inferior_ptid (event_ptid);
+	      if (inf->needs_setup)
+		{
+		  switch_to_thread_no_regs (t);
+		  setup_inferior (0);
+		}
+
+	      if (ws.kind == TARGET_WAITKIND_STOPPED
+		  && ws.value.sig == GDB_SIGNAL_0)
+		{
+		  /* We caught the event that we intended to catch, so
+		     there's no event pending.  */
+		  t->suspend.waitstatus.kind = TARGET_WAITKIND_IGNORE;
+		  t->suspend.waitstatus_pending_p = 0;
+
+		  if (displaced_step_fixup (t->ptid, GDB_SIGNAL_0) < 0)
+		    {
+		      /* Add it back to the step-over queue.  */
+		      if (debug_infrun)
+			{
+			  fprintf_unfiltered (gdb_stdlog,
+					      "infrun: displaced-step of %s "
+					      "canceled: adding back to the "
+					      "step-over queue\n",
+					      target_pid_to_str (t->ptid));
+			}
+		      t->control.trap_expected = 0;
+		      thread_step_over_chain_enqueue (t);
+		    }
+		}
+	      else
+		{
+		  enum gdb_signal sig;
+		  struct regcache *regcache;
+
+		  if (debug_infrun)
+		    {
+		      char *statstr;
+
+		      statstr = target_waitstatus_to_string (&ws);
+		      fprintf_unfiltered (gdb_stdlog,
+					  "infrun: target_wait %s, saving "
+					  "status for %d.%ld.%ld\n",
+					  statstr,
+					  ptid_get_pid (t->ptid),
+					  ptid_get_lwp (t->ptid),
+					  ptid_get_tid (t->ptid));
+		      xfree (statstr);
+		    }
+
+		  /* Record for later.  */
+		  save_waitstatus (t, &ws);
+
+		  sig = (ws.kind == TARGET_WAITKIND_STOPPED
+			 ? ws.value.sig : GDB_SIGNAL_0);
+
+		  if (displaced_step_fixup (t->ptid, sig) < 0)
+		    {
+		      /* Add it back to the step-over queue.  */
+		      t->control.trap_expected = 0;
+		      thread_step_over_chain_enqueue (t);
+		    }
+
+		  regcache = get_thread_regcache (t->ptid);
+		  t->suspend.stop_pc = regcache_read_pc (regcache);
+
+		  if (debug_infrun)
+		    {
+		      fprintf_unfiltered (gdb_stdlog,
+					  "infrun: saved stop_pc=%s for %s "
+					  "(currently_stepping=%d)\n",
+					  paddress (target_gdbarch (),
+						    t->suspend.stop_pc),
+					  target_pid_to_str (t->ptid),
+					  currently_stepping (t));
+		    }
+		}
+	    }
+	}
+    }
+
+  do_cleanups (old_chain);
+
+  if (debug_infrun)
+    fprintf_unfiltered (gdb_stdlog, "infrun: stop_all_threads done\n");
+}
+
+/* Handle a TARGET_WAITKIND_NO_RESUMED event.  */
+
+static int
+handle_no_resumed (struct execution_control_state *ecs)
+{
+  struct inferior *inf;
+  struct thread_info *thread;
+
+  if (target_can_async_p ())
+    {
+      struct ui *ui;
+      int any_sync = 0;
+
+      ALL_UIS (ui)
+	{
+	  if (ui->prompt_state == PROMPT_BLOCKED)
+	    {
+	      any_sync = 1;
+	      break;
+	    }
+	}
+      if (!any_sync)
+	{
+	  /* There were no unwaited-for children left in the target, but,
+	     we're not synchronously waiting for events either.  Just
+	     ignore.  */
+
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: TARGET_WAITKIND_NO_RESUMED "
+				"(ignoring: bg)\n");
+	  prepare_to_wait (ecs);
+	  return 1;
+	}
+    }
+
+  /* Otherwise, if we were running a synchronous execution command, we
+     may need to cancel it and give the user back the terminal.
 
-      ecs->stop_func_filled_in = 1;
-    }
-}
+     In non-stop mode, the target can't tell whether we've already
+     consumed previous stop events, so it can end up sending us a
+     no-resumed event like so:
+
+       #0 - thread 1 is left stopped
+
+       #1 - thread 2 is resumed and hits breakpoint
+               -> TARGET_WAITKIND_STOPPED
+
+       #2 - thread 3 is resumed and exits
+            this is the last resumed thread, so
+	       -> TARGET_WAITKIND_NO_RESUMED
+
+       #3 - gdb processes stop for thread 2 and decides to re-resume
+            it.
+
+       #4 - gdb processes the TARGET_WAITKIND_NO_RESUMED event.
+            thread 2 is now resumed, so the event should be ignored.
+
+     IOW, if the stop for thread 2 doesn't end a foreground command,
+     then we need to ignore the following TARGET_WAITKIND_NO_RESUMED
+     event.  But it could be that the event meant that thread 2 itself
+     (or whatever other thread was the last resumed thread) exited.
+
+     To address this we refresh the thread list and check whether we
+     have resumed threads _now_.  In the example above, this removes
+     thread 3 from the thread list.  If thread 2 was re-resumed, we
+     ignore this event.  If we find no thread resumed, then we cancel
+     the synchronous command show "no unwaited-for " to the user.  */
+  update_thread_list ();
 
+  ALL_NON_EXITED_THREADS (thread)
+    {
+      if (thread->executing
+	  || thread->suspend.waitstatus_pending_p)
+	{
+	  /* There were no unwaited-for children left in the target at
+	     some point, but there are now.  Just ignore.  */
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: TARGET_WAITKIND_NO_RESUMED "
+				"(ignoring: found resumed)\n");
+	  prepare_to_wait (ecs);
+	  return 1;
+	}
+    }
 
-/* Return the STOP_SOON field of the inferior pointed at by PTID.  */
+  /* Note however that we may find no resumed thread because the whole
+     process exited meanwhile (thus updating the thread list results
+     in an empty thread list).  In this case we know we'll be getting
+     a process exit event shortly.  */
+  ALL_INFERIORS (inf)
+    {
+      if (inf->pid == 0)
+	continue;
 
-static enum stop_kind
-get_inferior_stop_soon (ptid_t ptid)
-{
-  struct inferior *inf = find_inferior_ptid (ptid);
+      thread = any_live_thread_of_process (inf->pid);
+      if (thread == NULL)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: TARGET_WAITKIND_NO_RESUMED "
+				"(expect process exit)\n");
+	  prepare_to_wait (ecs);
+	  return 1;
+	}
+    }
 
-  gdb_assert (inf != NULL);
-  return inf->control.stop_soon;
+  /* Go ahead and report the event.  */
+  return 0;
 }
 
 /* Given an execution control state that has been freshly filled in by
@@ -3702,21 +4833,18 @@ handle_inferior_event_1 (struct executio
       return;
     }
 
-  if (ecs->ws.kind == TARGET_WAITKIND_NO_RESUMED
-      && target_can_async_p () && !sync_execution)
+  if (ecs->ws.kind == TARGET_WAITKIND_THREAD_EXITED)
     {
-      /* There were no unwaited-for children left in the target, but,
-	 we're not synchronously waiting for events either.  Just
-	 ignore.  Otherwise, if we were running a synchronous
-	 execution command, we need to cancel it and give the user
-	 back the terminal.  */
       if (debug_infrun)
-	fprintf_unfiltered (gdb_stdlog,
-			    "infrun: TARGET_WAITKIND_NO_RESUMED (ignoring)\n");
+	fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_THREAD_EXITED\n");
       prepare_to_wait (ecs);
       return;
     }
 
+  if (ecs->ws.kind == TARGET_WAITKIND_NO_RESUMED
+      && handle_no_resumed (ecs))
+    return;
+
   /* Cache the last pid/waitstatus.  */
   set_last_target_status (ecs->ptid, ecs->ws);
 
@@ -3749,7 +4877,7 @@ handle_inferior_event_1 (struct executio
     }
 
   /* Dependent on valid ECS->EVENT_THREAD.  */
-  adjust_pc_after_break (ecs);
+  adjust_pc_after_break (ecs->event_thread, &ecs->ws);
 
   /* Dependent on the current PC value modified by adjust_pc_after_break.  */
   reinit_frame_cache ();
@@ -3785,15 +4913,39 @@ handle_inferior_event_1 (struct executio
 
   /* Mark the non-executing threads accordingly.  In all-stop, all
      threads of all processes are stopped when we get any event
-     reported.  In non-stop mode, only the event thread stops.  If
-     we're handling a process exit in non-stop mode, there's nothing
-     to do, as threads of the dead process are gone, and threads of
-     any other process were left running.  */
-  if (!non_stop)
-    set_executing (minus_one_ptid, 0);
-  else if (ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
-	   && ecs->ws.kind != TARGET_WAITKIND_EXITED)
-    set_executing (ecs->ptid, 0);
+     reported.  In non-stop mode, only the event thread stops.  */
+  {
+    ptid_t mark_ptid;
+
+    if (!target_is_non_stop_p ())
+      mark_ptid = minus_one_ptid;
+    else if (ecs->ws.kind == TARGET_WAITKIND_SIGNALLED
+	     || ecs->ws.kind == TARGET_WAITKIND_EXITED)
+      {
+	/* If we're handling a process exit in non-stop mode, even
+	   though threads haven't been deleted yet, one would think
+	   that there is nothing to do, as threads of the dead process
+	   will be soon deleted, and threads of any other process were
+	   left running.  However, on some targets, threads survive a
+	   process exit event.  E.g., for the "checkpoint" command,
+	   when the current checkpoint/fork exits, linux-fork.c
+	   automatically switches to another fork from within
+	   target_mourn_inferior, by associating the same
+	   inferior/thread to another fork.  We haven't mourned yet at
+	   this point, but we must mark any threads left in the
+	   process as not-executing so that finish_thread_state marks
+	   them stopped (in the user's perspective) if/when we present
+	   the stop to the user.  */
+	mark_ptid = pid_to_ptid (ptid_get_pid (ecs->ptid));
+      }
+    else
+      mark_ptid = ecs->ptid;
+
+    set_executing (mark_ptid, 0);
+
+    /* Likewise the resumed flag.  */
+    set_resumed (mark_ptid, 0);
+  }
 
   switch (ecs->ws.kind)
     {
@@ -3882,6 +5034,15 @@ handle_inferior_event_1 (struct executio
       prepare_to_wait (ecs);
       return;
 
+    case TARGET_WAITKIND_THREAD_CREATED:
+      if (debug_infrun)
+        fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_THREAD_CREATED\n");
+      if (!ptid_equal (ecs->ptid, inferior_ptid))
+	context_switch (ecs->ptid);
+      if (!switch_back_to_stepped_thread (ecs))
+	keep_going (ecs);
+      return;
+
     case TARGET_WAITKIND_EXITED:
     case TARGET_WAITKIND_SIGNALLED:
       if (debug_infrun)
@@ -3950,7 +5111,7 @@ Cannot fill $_exitsignal with the correc
 	}
 
       gdb_flush (gdb_stdout);
-      target_mourn_inferior ();
+      target_mourn_inferior (inferior_ptid);
       stop_print_frame = 0;
       stop_waiting (ecs);
       return;
@@ -3971,12 +5132,10 @@ Cannot fill $_exitsignal with the correc
       {
 	struct regcache *regcache = get_thread_regcache (ecs->ptid);
 	struct gdbarch *gdbarch = get_regcache_arch (regcache);
-	struct displaced_step_inferior_state *displaced
-	  = get_displaced_stepping_state (ptid_get_pid (ecs->ptid));
 
 	/* If checking displaced stepping is supported, and thread
 	   ecs->ptid is displaced stepping.  */
-	if (displaced && ptid_equal (displaced->step_ptid, ecs->ptid))
+	if (displaced_step_in_progress_thread (ecs->ptid))
 	  {
 	    struct inferior *parent_inf
 	      = find_inferior_ptid (ecs->ptid);
@@ -3989,9 +5148,15 @@ Cannot fill $_exitsignal with the correc
 	       that this operation also cleans up the child process for vfork,
 	       because their pages are shared.  */
 	    displaced_step_fixup (ecs->ptid, GDB_SIGNAL_TRAP);
+	    /* Start a new step-over in another thread if there's one
+	       that needs it.  */
+	    start_step_over ();
 
 	    if (ecs->ws.kind == TARGET_WAITKIND_FORKED)
 	      {
+		struct displaced_step_inferior_state *displaced
+		  = get_displaced_stepping_state (ptid_get_pid (ecs->ptid));
+
 		/* Restore scratch pad for child process.  */
 		displaced_step_restore (displaced, ecs->ws.value.related_pid);
 	      }
@@ -4075,8 +5240,20 @@ Cannot fill $_exitsignal with the correc
 	  parent = ecs->ptid;
 	  child = ecs->ws.value.related_pid;
 
+	  /* At this point, the parent is marked running, and the
+	     child is marked stopped.  */
+
+	  /* If not resuming the parent, mark it stopped.  */
+	  if (follow_child && !detach_fork && !non_stop && !sched_multi)
+	    set_running (parent, 0);
+
+	  /* If resuming the child, mark it running.  */
+	  if (follow_child || (!detach_fork && (non_stop || sched_multi)))
+	    set_running (child, 1);
+
 	  /* In non-stop mode, also resume the other branch.  */
-	  if (non_stop && !detach_fork)
+	  if (!detach_fork && (non_stop
+			       || (sched_multi && target_is_non_stop_p ())))
 	    {
 	      if (follow_child)
 		switch_to_thread (parent);
@@ -4140,6 +5317,11 @@ Cannot fill $_exitsignal with the correc
          stop.  */
       follow_exec (inferior_ptid, ecs->ws.value.execd_pathname);
 
+      /* In follow_exec we may have deleted the original thread and
+	 created a new one.  Make sure that the event thread is the
+	 execd thread for that case (this is a nop otherwise).  */
+      ecs->event_thread = inferior_thread ();
+
       ecs->event_thread->control.stop_bpstat
 	= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
 			      stop_pc, ecs->ptid, &ecs->ws);
@@ -4195,8 +5377,14 @@ Cannot fill $_exitsignal with the correc
         fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_HISTORY\n");
       /* Reverse execution: target ran out of history info.  */
 
+      /* Switch to the stopped thread.  */
+      if (!ptid_equal (ecs->ptid, inferior_ptid))
+	context_switch (ecs->ptid);
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog, "infrun: stopped\n");
+
       delete_just_stopped_threads_single_step_breakpoints ();
-      stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
+      stop_pc = regcache_read_pc (get_thread_regcache (inferior_ptid));
       observer_notify_no_history ();
       stop_waiting (ecs);
       return;
@@ -4219,6 +5407,242 @@ handle_inferior_event (struct execution_
   value_free_to_mark (mark);
 }
 
+/* Restart threads back to what they were trying to do back when we
+   paused them for an in-line step-over.  The EVENT_THREAD thread is
+   ignored.  */
+
+static void
+restart_threads (struct thread_info *event_thread)
+{
+  struct thread_info *tp;
+
+  /* In case the instruction just stepped spawned a new thread.  */
+  update_thread_list ();
+
+  ALL_NON_EXITED_THREADS (tp)
+    {
+      if (tp == event_thread)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: "
+				"[%s] is event thread\n",
+				target_pid_to_str (tp->ptid));
+	  continue;
+	}
+
+      if (!(tp->state == THREAD_RUNNING || tp->control.in_infcall))
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: "
+				"[%s] not meant to be running\n",
+				target_pid_to_str (tp->ptid));
+	  continue;
+	}
+
+      if (tp->resumed)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: [%s] resumed\n",
+				target_pid_to_str (tp->ptid));
+	  gdb_assert (tp->executing || tp->suspend.waitstatus_pending_p);
+	  continue;
+	}
+
+      if (thread_is_in_step_over_chain (tp))
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: "
+				"[%s] needs step-over\n",
+				target_pid_to_str (tp->ptid));
+	  gdb_assert (!tp->resumed);
+	  continue;
+	}
+
+
+      if (tp->suspend.waitstatus_pending_p)
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: "
+				"[%s] has pending status\n",
+				target_pid_to_str (tp->ptid));
+	  tp->resumed = 1;
+	  continue;
+	}
+
+      /* If some thread needs to start a step-over at this point, it
+	 should still be in the step-over queue, and thus skipped
+	 above.  */
+      if (thread_still_needs_step_over (tp))
+	{
+	  internal_error (__FILE__, __LINE__,
+			  "thread [%s] needs a step-over, but not in "
+			  "step-over queue\n",
+			  target_pid_to_str (tp->ptid));
+	}
+
+      if (currently_stepping (tp))
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: [%s] was stepping\n",
+				target_pid_to_str (tp->ptid));
+	  keep_going_stepped_thread (tp);
+	}
+      else
+	{
+	  struct execution_control_state ecss;
+	  struct execution_control_state *ecs = &ecss;
+
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: restart threads: [%s] continuing\n",
+				target_pid_to_str (tp->ptid));
+	  reset_ecs (ecs, tp);
+	  switch_to_thread (tp->ptid);
+	  keep_going_pass_signal (ecs);
+	}
+    }
+}
+
+/* Callback for iterate_over_threads.  Find a resumed thread that has
+   a pending waitstatus.  */
+
+static int
+resumed_thread_with_pending_status (struct thread_info *tp,
+				    void *arg)
+{
+  return (tp->resumed
+	  && tp->suspend.waitstatus_pending_p);
+}
+
+/* Called when we get an event that may finish an in-line or
+   out-of-line (displaced stepping) step-over started previously.
+   Return true if the event is processed and we should go back to the
+   event loop; false if the caller should continue processing the
+   event.  */
+
+static int
+finish_step_over (struct execution_control_state *ecs)
+{
+  int had_step_over_info;
+
+  displaced_step_fixup (ecs->ptid,
+			ecs->event_thread->suspend.stop_signal);
+
+  had_step_over_info = step_over_info_valid_p ();
+
+  if (had_step_over_info)
+    {
+      /* If we're stepping over a breakpoint with all threads locked,
+	 then only the thread that was stepped should be reporting
+	 back an event.  */
+      gdb_assert (ecs->event_thread->control.trap_expected);
+
+      if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
+	clear_step_over_info ();
+    }
+
+  if (!target_is_non_stop_p ())
+    return 0;
+
+  /* Start a new step-over in another thread if there's one that
+     needs it.  */
+  start_step_over ();
+
+  /* If we were stepping over a breakpoint before, and haven't started
+     a new in-line step-over sequence, then restart all other threads
+     (except the event thread).  We can't do this in all-stop, as then
+     e.g., we wouldn't be able to issue any other remote packet until
+     these other threads stop.  */
+  if (had_step_over_info && !step_over_info_valid_p ())
+    {
+      struct thread_info *pending;
+
+      /* If we only have threads with pending statuses, the restart
+	 below won't restart any thread and so nothing re-inserts the
+	 breakpoint we just stepped over.  But we need it inserted
+	 when we later process the pending events, otherwise if
+	 another thread has a pending event for this breakpoint too,
+	 we'd discard its event (because the breakpoint that
+	 originally caused the event was no longer inserted).  */
+      context_switch (ecs->ptid);
+      insert_breakpoints ();
+
+      restart_threads (ecs->event_thread);
+
+      /* If we have events pending, go through handle_inferior_event
+	 again, picking up a pending event at random.  This avoids
+	 thread starvation.  */
+
+      /* But not if we just stepped over a watchpoint in order to let
+	 the instruction execute so we can evaluate its expression.
+	 The set of watchpoints that triggered is recorded in the
+	 breakpoint objects themselves (see bp->watchpoint_triggered).
+	 If we processed another event first, that other event could
+	 clobber this info.  */
+      if (ecs->event_thread->stepping_over_watchpoint)
+	return 0;
+
+      pending = iterate_over_threads (resumed_thread_with_pending_status,
+				      NULL);
+      if (pending != NULL)
+	{
+	  struct thread_info *tp = ecs->event_thread;
+	  struct regcache *regcache;
+
+	  if (debug_infrun)
+	    {
+	      fprintf_unfiltered (gdb_stdlog,
+				  "infrun: found resumed threads with "
+				  "pending events, saving status\n");
+	    }
+
+	  gdb_assert (pending != tp);
+
+	  /* Record the event thread's event for later.  */
+	  save_waitstatus (tp, &ecs->ws);
+	  /* This was cleared early, by handle_inferior_event.  Set it
+	     so this pending event is considered by
+	     do_target_wait.  */
+	  tp->resumed = 1;
+
+	  gdb_assert (!tp->executing);
+
+	  regcache = get_thread_regcache (tp->ptid);
+	  tp->suspend.stop_pc = regcache_read_pc (regcache);
+
+	  if (debug_infrun)
+	    {
+	      fprintf_unfiltered (gdb_stdlog,
+				  "infrun: saved stop_pc=%s for %s "
+				  "(currently_stepping=%d)\n",
+				  paddress (target_gdbarch (),
+					    tp->suspend.stop_pc),
+				  target_pid_to_str (tp->ptid),
+				  currently_stepping (tp));
+	    }
+
+	  /* This in-line step-over finished; clear this so we won't
+	     start a new one.  This is what handle_signal_stop would
+	     do, if we returned false.  */
+	  tp->stepping_over_breakpoint = 0;
+
+	  /* Wake up the event loop again.  */
+	  mark_async_event_handler (infrun_async_inferior_event_token);
+
+	  prepare_to_wait (ecs);
+	  return 1;
+	}
+    }
+
+  return 0;
+}
+
 /* Come here when the program has stopped with a signal.  */
 
 static void
@@ -4235,8 +5659,8 @@ handle_signal_stop (struct execution_con
   /* Do we need to clean up the state of a thread that has
      completed a displaced single-step?  (Doing so usually affects
      the PC, so do it here, before we set stop_pc.)  */
-  displaced_step_fixup (ecs->ptid,
-			ecs->event_thread->suspend.stop_signal);
+  if (finish_step_over (ecs))
+    return;
 
   /* If we either finished a single-step or hit a breakpoint, but
      the user wanted this thread to be stopped, pretend we got a
@@ -4289,18 +5713,6 @@ handle_signal_stop (struct execution_con
       return;
     }
 
-  if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
-      && stop_after_trap)
-    {
-      if (!ptid_equal (ecs->ptid, inferior_ptid))
-	context_switch (ecs->ptid);
-      if (debug_infrun)
-	fprintf_unfiltered (gdb_stdlog, "infrun: stopped\n");
-      stop_print_frame = 0;
-      stop_waiting (ecs);
-      return;
-    }
-
   /* This originates from attach_command().  We need to overwrite
      the stop_signal here, because some kernels don't ignore a
      SIGSTOP in a subsequent ptrace(PTRACE_CONT,SIGSTOP) call.
@@ -4342,7 +5754,7 @@ handle_signal_stop (struct execution_con
       context_switch (ecs->ptid);
 
       if (deprecated_context_hook)
-	deprecated_context_hook (pid_to_thread_id (ecs->ptid));
+	deprecated_context_hook (ptid_to_global_thread_id (ecs->ptid));
     }
 
   /* At this point, get hold of the now-current thread's frame.  */
@@ -4679,6 +6091,8 @@ handle_signal_stop (struct execution_con
 	  && ecs->event_thread->control.trap_expected
 	  && ecs->event_thread->control.step_resume_breakpoint == NULL)
 	{
+	  int was_in_line;
+
 	  /* We were just starting a new sequence, attempting to
 	     single-step off of a breakpoint and expecting a SIGTRAP.
 	     Instead this signal arrives.  This signal will take us out
@@ -4694,11 +6108,34 @@ handle_signal_stop (struct execution_con
                                 "infrun: signal arrived while stepping over "
                                 "breakpoint\n");
 
+	  was_in_line = step_over_info_valid_p ();
+	  clear_step_over_info ();
 	  insert_hp_step_resume_breakpoint_at_frame (frame);
 	  ecs->event_thread->step_after_step_resume_breakpoint = 1;
 	  /* Reset trap_expected to ensure breakpoints are re-inserted.  */
 	  ecs->event_thread->control.trap_expected = 0;
 
+	  if (target_is_non_stop_p ())
+	    {
+	      /* Either "set non-stop" is "on", or the target is
+		 always in non-stop mode.  In this case, we have a bit
+		 more work to do.  Resume the current thread, and if
+		 we had paused all threads, restart them while the
+		 signal handler runs.  */
+	      keep_going (ecs);
+
+	      if (was_in_line)
+		{
+		  restart_threads (ecs->event_thread);
+		}
+	      else if (debug_infrun)
+		{
+		  fprintf_unfiltered (gdb_stdlog,
+				      "infrun: no need to restart threads\n");
+		}
+	      return;
+	    }
+
 	  /* If we were nexting/stepping some other thread, switch to
 	     it, so that we don't continue it, losing control.  */
 	  if (!switch_back_to_stepped_thread (ecs))
@@ -4727,6 +6164,7 @@ handle_signal_stop (struct execution_con
                                 "infrun: signal may take us out of "
                                 "single-step range\n");
 
+	  clear_step_over_info ();
 	  insert_hp_step_resume_breakpoint_at_frame (frame);
 	  ecs->event_thread->step_after_step_resume_breakpoint = 1;
 	  /* Reset trap_expected to ensure breakpoints are re-inserted.  */
@@ -4783,6 +6221,10 @@ process_event_stop_test (struct executio
       stop_stack_dummy = what.call_dummy;
     }
 
+  /* A few breakpoint types have callbacks associated (e.g.,
+     bp_jit_event).  Run them now.  */
+  bpstat_run_callbacks (ecs->event_thread->control.stop_bpstat);
+
   /* If we hit an internal event that triggers symbol changes, the
      current frame will be invalidated within bpstat_what (e.g., if we
      hit an internal solib event).  Re-fetch it.  */
@@ -5582,11 +7024,10 @@ process_event_stop_test (struct executio
 static int
 switch_back_to_stepped_thread (struct execution_control_state *ecs)
 {
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
       struct thread_info *tp;
       struct thread_info *stepping_thread;
-      struct thread_info *step_over;
 
       /* If any thread is blocked on some internal breakpoint, and we
 	 simply need to step over that breakpoint to get it going
@@ -5629,14 +7070,20 @@ switch_back_to_stepped_thread (struct ex
 	 return 1;
        }
 
-      /* Otherwise, we no longer expect a trap in the current thread.
-	 Clear the trap_expected flag before switching back -- this is
-	 what keep_going does as well, if we call it.  */
-      ecs->event_thread->control.trap_expected = 0;
-
-      /* Likewise, clear the signal if it should not be passed.  */
-      if (!signal_program[ecs->event_thread->suspend.stop_signal])
-	ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
+      /* If this thread needs yet another step-over (e.g., stepping
+	 through a delay slot), do it first before moving on to
+	 another thread.  */
+      if (thread_still_needs_step_over (ecs->event_thread))
+	{
+	  if (debug_infrun)
+	    {
+	      fprintf_unfiltered (gdb_stdlog,
+				  "infrun: thread [%s] still needs step-over\n",
+				  target_pid_to_str (ecs->event_thread->ptid));
+	    }
+	  keep_going (ecs);
+	  return 1;
+	}
 
       /* If scheduler locking applies even if not stepping, there's no
 	 need to walk over threads.  Above we've checked whether the
@@ -5646,24 +7093,46 @@ switch_back_to_stepped_thread (struct ex
       if (schedlock_applies (ecs->event_thread))
 	return 0;
 
-      /* Look for the stepping/nexting thread, and check if any other
-	 thread other than the stepping thread needs to start a
-	 step-over.  Do all step-overs before actually proceeding with
+      /* Otherwise, we no longer expect a trap in the current thread.
+	 Clear the trap_expected flag before switching back -- this is
+	 what keep_going does as well, if we call it.  */
+      ecs->event_thread->control.trap_expected = 0;
+
+      /* Likewise, clear the signal if it should not be passed.  */
+      if (!signal_program[ecs->event_thread->suspend.stop_signal])
+	ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
+
+      /* Do all pending step-overs before actually proceeding with
 	 step/next/etc.  */
+      if (start_step_over ())
+	{
+	  prepare_to_wait (ecs);
+	  return 1;
+	}
+
+      /* Look for the stepping/nexting thread.  */
       stepping_thread = NULL;
-      step_over = NULL;
+
       ALL_NON_EXITED_THREADS (tp)
         {
-	  /* Ignore threads of processes we're not resuming.  */
+	  /* Ignore threads of processes the caller is not
+	     resuming.  */
 	  if (!sched_multi
-	      && ptid_get_pid (tp->ptid) != ptid_get_pid (inferior_ptid))
+	      && ptid_get_pid (tp->ptid) != ptid_get_pid (ecs->ptid))
 	    continue;
 
 	  /* When stepping over a breakpoint, we lock all threads
 	     except the one that needs to move past the breakpoint.
 	     If a non-event thread has this set, the "incomplete
 	     step-over" check above should have caught it earlier.  */
-	  gdb_assert (!tp->control.trap_expected);
+	  if (tp->control.trap_expected)
+	    {
+	      internal_error (__FILE__, __LINE__,
+			      "[%s] has inconsistent state: "
+			      "trap_expected=%d\n",
+			      target_pid_to_str (tp->ptid),
+			      tp->control.trap_expected);
+	    }
 
 	  /* Did we find the stepping thread?  */
 	  if (tp->control.step_range_end)
@@ -5683,145 +7152,131 @@ switch_back_to_stepped_thread (struct ex
 
 	      stepping_thread = tp;
 	    }
-	  else if (thread_still_needs_step_over (tp))
-	    {
-	      step_over = tp;
-
-	      /* At the top we've returned early if the event thread
-		 is stepping.  If some other thread not the event
-		 thread is stepping, then scheduler locking can't be
-		 in effect, and we can resume this thread.  No need to
-		 keep looking for the stepping thread then.  */
-	      break;
-	    }
 	}
 
-      if (step_over != NULL)
+      if (stepping_thread != NULL)
 	{
-	  tp = step_over;
 	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: switching back to stepped thread\n");
+
+	  if (keep_going_stepped_thread (stepping_thread))
 	    {
-	      fprintf_unfiltered (gdb_stdlog,
-				  "infrun: need to step-over [%s]\n",
-				  target_pid_to_str (tp->ptid));
+	      prepare_to_wait (ecs);
+	      return 1;
 	    }
+	}
+    }
 
-	  /* Only the stepping thread should have this set.  */
-	  gdb_assert (tp->control.step_range_end == 0);
+  return 0;
+}
 
-	  ecs->ptid = tp->ptid;
-	  ecs->event_thread = tp;
-	  switch_to_thread (ecs->ptid);
-	  keep_going (ecs);
-	  return 1;
-	}
+/* Set a previously stepped thread back to stepping.  Returns true on
+   success, false if the resume is not possible (e.g., the thread
+   vanished).  */
+
+static int
+keep_going_stepped_thread (struct thread_info *tp)
+{
+  struct frame_info *frame;
+  struct execution_control_state ecss;
+  struct execution_control_state *ecs = &ecss;
 
-      if (stepping_thread != NULL)
-	{
-	  struct frame_info *frame;
-	  struct gdbarch *gdbarch;
+  /* If the stepping thread exited, then don't try to switch back and
+     resume it, which could fail in several different ways depending
+     on the target.  Instead, just keep going.
+
+     We can find a stepping dead thread in the thread list in two
+     cases:
+
+     - The target supports thread exit events, and when the target
+       tries to delete the thread from the thread list, inferior_ptid
+       pointed at the exiting thread.  In such case, calling
+       delete_thread does not really remove the thread from the list;
+       instead, the thread is left listed, with 'exited' state.
+
+     - The target's debug interface does not support thread exit
+       events, and so we have no idea whatsoever if the previously
+       stepping thread is still alive.  For that reason, we need to
+       synchronously query the target now.  */
 
-	  tp = stepping_thread;
+  if (is_exited (tp->ptid)
+      || !target_thread_alive (tp->ptid))
+    {
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: not resuming previously  "
+			    "stepped thread, it has vanished\n");
 
-	  /* If the stepping thread exited, then don't try to switch
-	     back and resume it, which could fail in several different
-	     ways depending on the target.  Instead, just keep going.
-
-	     We can find a stepping dead thread in the thread list in
-	     two cases:
-
-	     - The target supports thread exit events, and when the
-	     target tries to delete the thread from the thread list,
-	     inferior_ptid pointed at the exiting thread.  In such
-	     case, calling delete_thread does not really remove the
-	     thread from the list; instead, the thread is left listed,
-	     with 'exited' state.
-
-	     - The target's debug interface does not support thread
-	     exit events, and so we have no idea whatsoever if the
-	     previously stepping thread is still alive.  For that
-	     reason, we need to synchronously query the target
-	     now.  */
-	  if (is_exited (tp->ptid)
-	      || !target_thread_alive (tp->ptid))
-	    {
-	      if (debug_infrun)
-		fprintf_unfiltered (gdb_stdlog,
-				    "infrun: not switching back to "
-				    "stepped thread, it has vanished\n");
+      delete_thread (tp->ptid);
+      return 0;
+    }
 
-	      delete_thread (tp->ptid);
-	      keep_going (ecs);
-	      return 1;
-	    }
+  if (debug_infrun)
+    fprintf_unfiltered (gdb_stdlog,
+			"infrun: resuming previously stepped thread\n");
 
-	  if (debug_infrun)
-	    fprintf_unfiltered (gdb_stdlog,
-				"infrun: switching back to stepped thread\n");
+  reset_ecs (ecs, tp);
+  switch_to_thread (tp->ptid);
 
-	  ecs->event_thread = tp;
-	  ecs->ptid = tp->ptid;
-	  context_switch (ecs->ptid);
+  stop_pc = regcache_read_pc (get_thread_regcache (tp->ptid));
+  frame = get_current_frame ();
 
-	  stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
-	  frame = get_current_frame ();
-	  gdbarch = get_frame_arch (frame);
+  /* If the PC of the thread we were trying to single-step has
+     changed, then that thread has trapped or been signaled, but the
+     event has not been reported to GDB yet.  Re-poll the target
+     looking for this particular thread's event (i.e. temporarily
+     enable schedlock) by:
+
+     - setting a break at the current PC
+     - resuming that particular thread, only (by setting trap
+     expected)
 
-	  /* If the PC of the thread we were trying to single-step has
-	     changed, then that thread has trapped or been signaled,
-	     but the event has not been reported to GDB yet.  Re-poll
-	     the target looking for this particular thread's event
-	     (i.e. temporarily enable schedlock) by:
-
-	       - setting a break at the current PC
-	       - resuming that particular thread, only (by setting
-		 trap expected)
-
-	     This prevents us continuously moving the single-step
-	     breakpoint forward, one instruction at a time,
-	     overstepping.  */
+     This prevents us continuously moving the single-step breakpoint
+     forward, one instruction at a time, overstepping.  */
 
-	  if (stop_pc != tp->prev_pc)
-	    {
-	      ptid_t resume_ptid;
+  if (stop_pc != tp->prev_pc)
+    {
+      ptid_t resume_ptid;
 
-	      if (debug_infrun)
-		fprintf_unfiltered (gdb_stdlog,
-				    "infrun: expected thread advanced also\n");
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: expected thread advanced also (%s -> %s)\n",
+			    paddress (target_gdbarch (), tp->prev_pc),
+			    paddress (target_gdbarch (), stop_pc));
+
+      /* Clear the info of the previous step-over, as it's no longer
+	 valid (if the thread was trying to step over a breakpoint, it
+	 has already succeeded).  It's what keep_going would do too,
+	 if we called it.  Do this before trying to insert the sss
+	 breakpoint, otherwise if we were previously trying to step
+	 over this exact address in another thread, the breakpoint is
+	 skipped.  */
+      clear_step_over_info ();
+      tp->control.trap_expected = 0;
 
-	      /* Clear the info of the previous step-over, as it's no
-		 longer valid.  It's what keep_going would do too, if
-		 we called it.  Must do this before trying to insert
-		 the sss breakpoint, otherwise if we were previously
-		 trying to step over this exact address in another
-		 thread, the breakpoint ends up not installed.  */
-	      clear_step_over_info ();
-
-	      insert_single_step_breakpoint (get_frame_arch (frame),
-					     get_frame_address_space (frame),
-					     stop_pc);
-
-	      resume_ptid = user_visible_resume_ptid (tp->control.stepping_command);
-	      do_target_resume (resume_ptid,
-				currently_stepping (tp), GDB_SIGNAL_0);
-	      prepare_to_wait (ecs);
-	    }
-	  else
-	    {
-	      if (debug_infrun)
-		fprintf_unfiltered (gdb_stdlog,
-				    "infrun: expected thread still "
-				    "hasn't advanced\n");
-	      keep_going (ecs);
-	    }
+      insert_single_step_breakpoint (get_frame_arch (frame),
+				     get_frame_address_space (frame),
+				     stop_pc);
+
+      tp->resumed = 1;
+      resume_ptid = internal_resume_ptid (tp->control.stepping_command);
+      do_target_resume (resume_ptid, 0, GDB_SIGNAL_0);
+    }
+  else
+    {
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: expected thread still hasn't advanced\n");
 
-	  return 1;
-	}
+      keep_going_pass_signal (ecs);
     }
-  return 0;
+  return 1;
 }
 
-/* Is thread TP in the middle of single-stepping?  */
+/* Is thread TP in the middle of (software or hardware)
+   single-stepping?  (Note the result of this function must never be
+   passed directly as target_resume's STEP parameter.)  */
 
 static int
 currently_stepping (struct thread_info *tp)
@@ -6082,13 +7537,13 @@ insert_exception_resume_breakpoint (stru
 {
   TRY
     {
-      struct symbol *vsym;
+      struct block_symbol vsym;
       struct value *value;
       CORE_ADDR handler;
       struct breakpoint *bp;
 
       vsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym), b, VAR_DOMAIN, NULL);
-      value = read_var_value (vsym, frame);
+      value = read_var_value (vsym.symbol, vsym.block, frame);
       /* If the value was optimized out, revert to the old behavior.  */
       if (! value_optimized_out (value))
 	{
@@ -6105,7 +7560,7 @@ insert_exception_resume_breakpoint (stru
 	  /* set_momentary_breakpoint_at_pc invalidates FRAME.  */
 	  frame = NULL;
 
-	  bp->thread = tp->num;
+	  bp->thread = tp->global_num;
 	  inferior_thread ()->control.exception_resume_breakpoint = bp;
 	}
     }
@@ -6142,7 +7597,7 @@ insert_exception_resume_from_probe (stru
 
   bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame),
 				       handler, bp_exception_resume);
-  bp->thread = tp->num;
+  bp->thread = tp->global_num;
   inferior_thread ()->control.exception_resume_breakpoint = bp;
 }
 
@@ -6225,26 +7680,40 @@ stop_waiting (struct execution_control_s
 
   /* Let callers know we don't want to wait for the inferior anymore.  */
   ecs->wait_some_more = 0;
+
+  /* If all-stop, but the target is always in non-stop mode, stop all
+     threads now that we're presenting the stop to the user.  */
+  if (!non_stop && target_is_non_stop_p ())
+    stop_all_threads ();
 }
 
-/* Called when we should continue running the inferior, because the
-   current event doesn't cause a user visible stop.  This does the
-   resuming part; waiting for the next event is done elsewhere.  */
+/* Like keep_going, but passes the signal to the inferior, even if the
+   signal is set to nopass.  */
 
 static void
-keep_going (struct execution_control_state *ecs)
+keep_going_pass_signal (struct execution_control_state *ecs)
 {
   /* Make sure normal_stop is called if we get a QUIT handled before
      reaching resume.  */
   struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
 
+  gdb_assert (ptid_equal (ecs->event_thread->ptid, inferior_ptid));
+  gdb_assert (!ecs->event_thread->resumed);
+
   /* Save the pc before execution, to compare with pc after stop.  */
   ecs->event_thread->prev_pc
     = regcache_read_pc (get_thread_regcache (ecs->ptid));
 
-  if (ecs->event_thread->control.trap_expected
-      && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_TRAP)
+  if (ecs->event_thread->control.trap_expected)
     {
+      struct thread_info *tp = ecs->event_thread;
+
+      if (debug_infrun)
+	fprintf_unfiltered (gdb_stdlog,
+			    "infrun: %s has trap_expected set, "
+			    "resuming to collect trap\n",
+			    target_pid_to_str (tp->ptid));
+
       /* We haven't yet gotten our trap, and either: intercepted a
 	 non-signal event (e.g., a fork); or took a signal which we
 	 are supposed to pass through to the inferior.  Simply
@@ -6252,11 +7721,40 @@ keep_going (struct execution_control_sta
       discard_cleanups (old_cleanups);
       resume (ecs->event_thread->suspend.stop_signal);
     }
+  else if (step_over_info_valid_p ())
+    {
+      /* Another thread is stepping over a breakpoint in-line.  If
+	 this thread needs a step-over too, queue the request.  In
+	 either case, this resume must be deferred for later.  */
+      struct thread_info *tp = ecs->event_thread;
+
+      if (ecs->hit_singlestep_breakpoint
+	  || thread_still_needs_step_over (tp))
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: step-over already in progress: "
+				"step-over for %s deferred\n",
+				target_pid_to_str (tp->ptid));
+	  thread_step_over_chain_enqueue (tp);
+	}
+      else
+	{
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: step-over in progress: "
+				"resume of %s deferred\n",
+				target_pid_to_str (tp->ptid));
+	}
+
+      discard_cleanups (old_cleanups);
+    }
   else
     {
       struct regcache *regcache = get_current_regcache ();
       int remove_bp;
       int remove_wps;
+      step_over_what step_what;
 
       /* Either the trap was not expected, but we are continuing
 	 anyway (if we got a signal, the user asked it be passed to
@@ -6277,25 +7775,32 @@ keep_going (struct execution_control_sta
 	 instruction, and then re-insert the breakpoint when that step
 	 is finished.  */
 
+      step_what = thread_still_needs_step_over (ecs->event_thread);
+
       remove_bp = (ecs->hit_singlestep_breakpoint
-		   || thread_still_needs_step_over (ecs->event_thread));
-      remove_wps = (ecs->event_thread->stepping_over_watchpoint
-		    && !target_have_steppable_watchpoint);
+		   || (step_what & STEP_OVER_BREAKPOINT));
+      remove_wps = (step_what & STEP_OVER_WATCHPOINT);
 
       /* We can't use displaced stepping if we need to step past a
 	 watchpoint.  The instruction copied to the scratch pad would
 	 still trigger the watchpoint.  */
       if (remove_bp
-	  && (remove_wps
-	      || !use_displaced_stepping (get_regcache_arch (regcache))))
+	  && (remove_wps || !use_displaced_stepping (ecs->event_thread)))
 	{
 	  set_step_over_info (get_regcache_aspace (regcache),
-			      regcache_read_pc (regcache), remove_wps);
+			      regcache_read_pc (regcache), remove_wps,
+			      ecs->event_thread->global_num);
 	}
       else if (remove_wps)
-	set_step_over_info (NULL, 0, remove_wps);
-      else
-	clear_step_over_info ();
+	set_step_over_info (NULL, 0, remove_wps, -1);
+
+      /* If we now need to do an in-line step-over, we need to stop
+	 all other threads.  Note this must be done before
+	 insert_breakpoints below, because that removes the breakpoint
+	 we're about to step over, otherwise other threads could miss
+	 it.  */
+      if (step_over_info_valid_p () && target_is_non_stop_p ())
+	stop_all_threads ();
 
       /* Stop stepping if inserting breakpoints fails.  */
       TRY
@@ -6313,20 +7818,6 @@ keep_going (struct execution_control_sta
 
       ecs->event_thread->control.trap_expected = (remove_bp || remove_wps);
 
-      /* Do not deliver GDB_SIGNAL_TRAP (except when the user
-	 explicitly specifies that such a signal should be delivered
-	 to the target program).  Typically, that would occur when a
-	 user is debugging a target monitor on a simulator: the target
-	 monitor sets a breakpoint; the simulator encounters this
-	 breakpoint and halts the simulation handing control to GDB;
-	 GDB, noting that the stop address doesn't map to any known
-	 breakpoint, returns control back to the simulator; the
-	 simulator then delivers the hardware equivalent of a
-	 GDB_SIGNAL_TRAP to the program being debugged.	 */
-      if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
-	  && !signal_program[ecs->event_thread->suspend.stop_signal])
-	ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
-
       discard_cleanups (old_cleanups);
       resume (ecs->event_thread->suspend.stop_signal);
     }
@@ -6334,6 +7825,22 @@ keep_going (struct execution_control_sta
   prepare_to_wait (ecs);
 }
 
+/* Called when we should continue running the inferior, because the
+   current event doesn't cause a user visible stop.  This does the
+   resuming part; waiting for the next event is done elsewhere.  */
+
+static void
+keep_going (struct execution_control_state *ecs)
+{
+  if (ecs->event_thread->control.trap_expected
+      && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
+    ecs->event_thread->control.trap_expected = 0;
+
+  if (!signal_program[ecs->event_thread->suspend.stop_signal])
+    ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
+  keep_going_pass_signal (ecs);
+}
+
 /* This function normally comes after a resume, before
    handle_inferior_event exits.  It takes care of any last bits of
    housekeeping, and sets the all-important wait_some_more flag.  */
@@ -6344,10 +7851,10 @@ prepare_to_wait (struct execution_contro
   if (debug_infrun)
     fprintf_unfiltered (gdb_stdlog, "infrun: prepare_to_wait\n");
 
-  /* This is the old end of the while loop.  Let everybody know we
-     want to wait for the inferior some more and get called again
-     soon.  */
   ecs->wait_some_more = 1;
+
+  if (!target_is_async_p ())
+    mark_infrun_async_event_handler ();
 }
 
 /* We are done with the step range of a step/next/si/ni command.
@@ -6376,9 +7883,9 @@ print_end_stepping_range_reason (struct 
 {
   /* For CLI-like interpreters, print nothing.  */
 
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     {
-      ui_out_field_string (uiout, "reason",
+      uiout->field_string ("reason",
 			   async_reason_lookup (EXEC_ASYNC_END_STEPPING_RANGE));
     }
 }
@@ -6387,21 +7894,21 @@ void
 print_signal_exited_reason (struct ui_out *uiout, enum gdb_signal siggnal)
 {
   annotate_signalled ();
-  if (ui_out_is_mi_like_p (uiout))
-    ui_out_field_string
-      (uiout, "reason", async_reason_lookup (EXEC_ASYNC_EXITED_SIGNALLED));
-  ui_out_text (uiout, "\nProgram terminated with signal ");
+  if (uiout->is_mi_like_p ())
+    uiout->field_string
+      ("reason", async_reason_lookup (EXEC_ASYNC_EXITED_SIGNALLED));
+  uiout->text ("\nProgram terminated with signal ");
   annotate_signal_name ();
-  ui_out_field_string (uiout, "signal-name",
+  uiout->field_string ("signal-name",
 		       gdb_signal_to_name (siggnal));
   annotate_signal_name_end ();
-  ui_out_text (uiout, ", ");
+  uiout->text (", ");
   annotate_signal_string ();
-  ui_out_field_string (uiout, "signal-meaning",
+  uiout->field_string ("signal-meaning",
 		       gdb_signal_to_string (siggnal));
   annotate_signal_string_end ();
-  ui_out_text (uiout, ".\n");
-  ui_out_text (uiout, "The program no longer exists.\n");
+  uiout->text (".\n");
+  uiout->text ("The program no longer exists.\n");
 }
 
 void
@@ -6413,68 +7920,97 @@ print_exited_reason (struct ui_out *uiou
   annotate_exited (exitstatus);
   if (exitstatus)
     {
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "reason", 
-			     async_reason_lookup (EXEC_ASYNC_EXITED));
-      ui_out_text (uiout, "[Inferior ");
-      ui_out_text (uiout, plongest (inf->num));
-      ui_out_text (uiout, " (");
-      ui_out_text (uiout, pidstr);
-      ui_out_text (uiout, ") exited with code ");
-      ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) exitstatus);
-      ui_out_text (uiout, "]\n");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_EXITED));
+      uiout->text ("[Inferior ");
+      uiout->text (plongest (inf->num));
+      uiout->text (" (");
+      uiout->text (pidstr);
+      uiout->text (") exited with code ");
+      uiout->field_fmt ("exit-code", "0%o", (unsigned int) exitstatus);
+      uiout->text ("]\n");
     }
   else
     {
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason", async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY));
-      ui_out_text (uiout, "[Inferior ");
-      ui_out_text (uiout, plongest (inf->num));
-      ui_out_text (uiout, " (");
-      ui_out_text (uiout, pidstr);
-      ui_out_text (uiout, ") exited normally]\n");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY));
+      uiout->text ("[Inferior ");
+      uiout->text (plongest (inf->num));
+      uiout->text (" (");
+      uiout->text (pidstr);
+      uiout->text (") exited normally]\n");
     }
 }
 
+/* Some targets/architectures can do extra processing/display of
+   segmentation faults.  E.g., Intel MPX boundary faults.
+   Call the architecture dependent function to handle the fault.  */
+
+static void
+handle_segmentation_fault (struct ui_out *uiout)
+{
+  struct regcache *regcache = get_current_regcache ();
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (gdbarch_handle_segmentation_fault_p (gdbarch))
+    gdbarch_handle_segmentation_fault (gdbarch, uiout);
+}
+
 void
 print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal)
 {
+  struct thread_info *thr = inferior_thread ();
+
   annotate_signal ();
 
-  if (siggnal == GDB_SIGNAL_0 && !ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
+    ;
+  else if (show_thread_that_caused_stop ())
     {
-      struct thread_info *t = inferior_thread ();
+      const char *name;
 
-      ui_out_text (uiout, "\n[");
-      ui_out_field_string (uiout, "thread-name",
-			   target_pid_to_str (t->ptid));
-      ui_out_field_fmt (uiout, "thread-id", "] #%d", t->num);
-      ui_out_text (uiout, " stopped");
+      uiout->text ("\nThread ");
+      uiout->field_fmt ("thread-id", "%s", print_thread_id (thr));
+
+      name = thr->name != NULL ? thr->name : target_thread_name (thr);
+      if (name != NULL)
+	{
+	  uiout->text (" \"");
+	  uiout->field_fmt ("name", "%s", name);
+	  uiout->text ("\"");
+	}
     }
   else
+    uiout->text ("\nProgram");
+
+  if (siggnal == GDB_SIGNAL_0 && !uiout->is_mi_like_p ())
+    uiout->text (" stopped");
+  else
     {
-      ui_out_text (uiout, "\nProgram received signal ");
+      uiout->text (" received signal ");
       annotate_signal_name ();
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string
-	  (uiout, "reason", async_reason_lookup (EXEC_ASYNC_SIGNAL_RECEIVED));
-      ui_out_field_string (uiout, "signal-name",
-			   gdb_signal_to_name (siggnal));
+      if (uiout->is_mi_like_p ())
+	uiout->field_string
+	  ("reason", async_reason_lookup (EXEC_ASYNC_SIGNAL_RECEIVED));
+      uiout->field_string ("signal-name", gdb_signal_to_name (siggnal));
       annotate_signal_name_end ();
-      ui_out_text (uiout, ", ");
+      uiout->text (", ");
       annotate_signal_string ();
-      ui_out_field_string (uiout, "signal-meaning",
-			   gdb_signal_to_string (siggnal));
+      uiout->field_string ("signal-meaning", gdb_signal_to_string (siggnal));
+
+      if (siggnal == GDB_SIGNAL_SEGV)
+	handle_segmentation_fault (uiout);
+
       annotate_signal_string_end ();
     }
-  ui_out_text (uiout, ".\n");
+  uiout->text (".\n");
 }
 
 void
 print_no_history_reason (struct ui_out *uiout)
 {
-  ui_out_text (uiout, "\nNo more reverse-execution history.\n");
+  uiout->text ("\nNo more reverse-execution history.\n");
 }
 
 /* Print current location without a level number, if we have changed
@@ -6482,11 +8018,11 @@ print_no_history_reason (struct ui_out *
    bpstat_print contains the logic deciding in detail what to print,
    based on the event(s) that just occurred.  */
 
-void
-print_stop_event (struct target_waitstatus *ws)
+static void
+print_stop_location (struct target_waitstatus *ws)
 {
   int bpstat_ret;
-  int source_flag;
+  enum print_what source_flag;
   int do_frame_printing = 1;
   struct thread_info *tp = inferior_thread ();
 
@@ -6534,37 +8070,166 @@ print_stop_event (struct target_waitstat
      SRC_AND_LOC: Print location and source line.  */
   if (do_frame_printing)
     print_stack_frame (get_selected_frame (NULL), 0, source_flag, 1);
-
-  /* Display the auto-display expressions.  */
-  do_displays ();
 }
 
-/* Here to return control to GDB when the inferior stops for real.
-   Print appropriate messages, remove breakpoints, give terminal our modes.
+/* See infrun.h.  */
+
+void
+print_stop_event (struct ui_out *uiout)
+{
+  struct target_waitstatus last;
+  ptid_t last_ptid;
+  struct thread_info *tp;
+
+  get_last_target_status (&last_ptid, &last);
+
+  {
+    scoped_restore save_uiout = make_scoped_restore (&current_uiout, uiout);
+
+    print_stop_location (&last);
 
-   STOP_PRINT_FRAME nonzero means print the executing frame
-   (pc, function, args, file, line number and line text).
-   BREAKPOINTS_FAILED nonzero means stop was due to error
-   attempting to insert breakpoints.  */
+    /* Display the auto-display expressions.  */
+    do_displays ();
+  }
+
+  tp = inferior_thread ();
+  if (tp->thread_fsm != NULL
+      && thread_fsm_finished_p (tp->thread_fsm))
+    {
+      struct return_value_info *rv;
+
+      rv = thread_fsm_return_value (tp->thread_fsm);
+      if (rv != NULL)
+	print_return_value (uiout, rv);
+    }
+}
+
+/* See infrun.h.  */
 
 void
+maybe_remove_breakpoints (void)
+{
+  if (!breakpoints_should_be_inserted_now () && target_has_execution)
+    {
+      if (remove_breakpoints ())
+	{
+	  target_terminal_ours_for_output ();
+	  printf_filtered (_("Cannot remove breakpoints because "
+			     "program is no longer writable.\nFurther "
+			     "execution is probably impossible.\n"));
+	}
+    }
+}
+
+/* The execution context that just caused a normal stop.  */
+
+struct stop_context
+{
+  /* The stop ID.  */
+  ULONGEST stop_id;
+
+  /* The event PTID.  */
+
+  ptid_t ptid;
+
+  /* If stopp for a thread event, this is the thread that caused the
+     stop.  */
+  struct thread_info *thread;
+
+  /* The inferior that caused the stop.  */
+  int inf_num;
+};
+
+/* Returns a new stop context.  If stopped for a thread event, this
+   takes a strong reference to the thread.  */
+
+static struct stop_context *
+save_stop_context (void)
+{
+  struct stop_context *sc = XNEW (struct stop_context);
+
+  sc->stop_id = get_stop_id ();
+  sc->ptid = inferior_ptid;
+  sc->inf_num = current_inferior ()->num;
+
+  if (!ptid_equal (inferior_ptid, null_ptid))
+    {
+      /* Take a strong reference so that the thread can't be deleted
+	 yet.  */
+      sc->thread = inferior_thread ();
+      sc->thread->refcount++;
+    }
+  else
+    sc->thread = NULL;
+
+  return sc;
+}
+
+/* Release a stop context previously created with save_stop_context.
+   Releases the strong reference to the thread as well. */
+
+static void
+release_stop_context_cleanup (void *arg)
+{
+  struct stop_context *sc = (struct stop_context *) arg;
+
+  if (sc->thread != NULL)
+    sc->thread->refcount--;
+  xfree (sc);
+}
+
+/* Return true if the current context no longer matches the saved stop
+   context.  */
+
+static int
+stop_context_changed (struct stop_context *prev)
+{
+  if (!ptid_equal (prev->ptid, inferior_ptid))
+    return 1;
+  if (prev->inf_num != current_inferior ()->num)
+    return 1;
+  if (prev->thread != NULL && prev->thread->state != THREAD_STOPPED)
+    return 1;
+  if (get_stop_id () != prev->stop_id)
+    return 1;
+  return 0;
+}
+
+/* See infrun.h.  */
+
+int
 normal_stop (void)
 {
   struct target_waitstatus last;
   ptid_t last_ptid;
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+  ptid_t pid_ptid;
 
   get_last_target_status (&last_ptid, &last);
 
+  new_stop_id ();
+
   /* If an exception is thrown from this point on, make sure to
      propagate GDB's knowledge of the executing state to the
      frontend/user running state.  A QUIT is an easy exception to see
      here, so do this before any filtered output.  */
   if (!non_stop)
     make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
-  else if (last.kind != TARGET_WAITKIND_SIGNALLED
-	   && last.kind != TARGET_WAITKIND_EXITED
-	   && last.kind != TARGET_WAITKIND_NO_RESUMED)
+  else if (last.kind == TARGET_WAITKIND_SIGNALLED
+	   || last.kind == TARGET_WAITKIND_EXITED)
+    {
+      /* On some targets, we may still have live threads in the
+	 inferior when we get a process exit event.  E.g., for
+	 "checkpoint", when the current checkpoint/fork exits,
+	 linux-fork.c automatically switches to another fork from
+	 within target_mourn_inferior.  */
+      if (!ptid_equal (inferior_ptid, null_ptid))
+	{
+	  pid_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
+	  make_cleanup (finish_thread_state_cleanup, &pid_ptid);
+	}
+    }
+  else if (last.kind != TARGET_WAITKIND_NO_RESUMED)
     make_cleanup (finish_thread_state_cleanup, &inferior_ptid);
 
   /* As we're presenting a stop, and potentially removing breakpoints,
@@ -6603,32 +8268,28 @@ normal_stop (void)
       && last.kind != TARGET_WAITKIND_EXITED
       && last.kind != TARGET_WAITKIND_NO_RESUMED)
     {
-      target_terminal_ours_for_output ();
-      printf_filtered (_("[Switching to %s]\n"),
-		       target_pid_to_str (inferior_ptid));
-      annotate_thread_changed ();
+      SWITCH_THRU_ALL_UIS ()
+	{
+	  target_terminal_ours_for_output ();
+	  printf_filtered (_("[Switching to %s]\n"),
+			   target_pid_to_str (inferior_ptid));
+	  annotate_thread_changed ();
+	}
       previous_inferior_ptid = inferior_ptid;
     }
 
   if (last.kind == TARGET_WAITKIND_NO_RESUMED)
     {
-      gdb_assert (sync_execution || !target_can_async_p ());
-
-      target_terminal_ours_for_output ();
-      printf_filtered (_("No unwaited-for children left.\n"));
+      SWITCH_THRU_ALL_UIS ()
+	if (current_ui->prompt_state == PROMPT_BLOCKED)
+	  {
+	    target_terminal_ours_for_output ();
+	    printf_filtered (_("No unwaited-for children left.\n"));
+	  }
     }
 
   /* Note: this depends on the update_thread_list call above.  */
-  if (!breakpoints_should_be_inserted_now () && target_has_execution)
-    {
-      if (remove_breakpoints ())
-	{
-	  target_terminal_ours_for_output ();
-	  printf_filtered (_("Cannot remove breakpoints because "
-			     "program is no longer writable.\nFurther "
-			     "execution is probably impossible.\n"));
-	}
-    }
+  maybe_remove_breakpoints ();
 
   /* If an auto-display called a function and that got a signal,
      delete that auto-display to avoid an infinite recursion.  */
@@ -6636,124 +8297,76 @@ normal_stop (void)
   if (stopped_by_random_signal)
     disable_current_display ();
 
-  /* Notify observers if we finished a "step"-like command, etc.  */
-  if (target_has_execution
-      && last.kind != TARGET_WAITKIND_SIGNALLED
-      && last.kind != TARGET_WAITKIND_EXITED
-      && inferior_thread ()->control.stop_step)
+  SWITCH_THRU_ALL_UIS ()
     {
-      /* But not if in the middle of doing a "step n" operation for
-	 n > 1 */
-      if (inferior_thread ()->step_multi)
-	goto done;
-
-      observer_notify_end_stepping_range ();
-    }
-
-  target_terminal_ours ();
-  async_enable_stdin ();
-
-  /* Set the current source location.  This will also happen if we
-     display the frame below, but the current SAL will be incorrect
-     during a user hook-stop function.  */
-  if (has_stack_frames () && !stop_stack_dummy)
-    set_current_sal_from_frame (get_current_frame ());
-
-  /* Let the user/frontend see the threads as stopped, but defer to
-     call_function_by_hand if the thread finished an infcall
-     successfully.  We may be e.g., evaluating a breakpoint condition.
-     In that case, the thread had state THREAD_RUNNING before the
-     infcall, and shall remain marked running, all without informing
-     the user/frontend about state transition changes.  */
-  if (target_has_execution
-      && inferior_thread ()->control.in_infcall
-      && stop_stack_dummy == STOP_STACK_DUMMY)
-    discard_cleanups (old_chain);
-  else
-    do_cleanups (old_chain);
+      async_enable_stdin ();
+    }
 
-  /* Look up the hook_stop and run it (CLI internally handles problem
-     of stop_command's pre-hook not existing).  */
-  if (stop_command)
-    catch_errors (hook_stop_stub, stop_command,
-		  "Error while running hook_stop:\n", RETURN_MASK_ALL);
-
-  if (!has_stack_frames ())
-    goto done;
-
-  if (last.kind == TARGET_WAITKIND_SIGNALLED
-      || last.kind == TARGET_WAITKIND_EXITED)
-    goto done;
+  /* Let the user/frontend see the threads as stopped.  */
+  do_cleanups (old_chain);
 
   /* Select innermost stack frame - i.e., current frame is frame 0,
-     and current location is based on that.
-     Don't do this on return from a stack dummy routine,
-     or if the program has exited.  */
+     and current location is based on that.  Handle the case where the
+     dummy call is returning after being stopped.  E.g. the dummy call
+     previously hit a breakpoint.  (If the dummy call returns
+     normally, we won't reach here.)  Do this before the stop hook is
+     run, so that it doesn't get to see the temporary dummy frame,
+     which is not where we'll present the stop.  */
+  if (has_stack_frames ())
+    {
+      if (stop_stack_dummy == STOP_STACK_DUMMY)
+	{
+	  /* Pop the empty frame that contains the stack dummy.  This
+	     also restores inferior state prior to the call (struct
+	     infcall_suspend_state).  */
+	  struct frame_info *frame = get_current_frame ();
+
+	  gdb_assert (get_frame_type (frame) == DUMMY_FRAME);
+	  frame_pop (frame);
+	  /* frame_pop calls reinit_frame_cache as the last thing it
+	     does which means there's now no selected frame.  */
+	}
 
-  if (!stop_stack_dummy)
-    {
       select_frame (get_current_frame ());
 
-      /* If --batch-silent is enabled then there's no need to print the current
-	 source location, and to try risks causing an error message about
-	 missing source files.  */
-      if (stop_print_frame && !batch_silent)
-	print_stop_event (&last);
-    }
-
-  if (stop_stack_dummy == STOP_STACK_DUMMY)
-    {
-      /* Pop the empty frame that contains the stack dummy.
-	 This also restores inferior state prior to the call
-	 (struct infcall_suspend_state).  */
-      struct frame_info *frame = get_current_frame ();
-
-      gdb_assert (get_frame_type (frame) == DUMMY_FRAME);
-      frame_pop (frame);
-      /* frame_pop() calls reinit_frame_cache as the last thing it
-	 does which means there's currently no selected frame.  We
-	 don't need to re-establish a selected frame if the dummy call
-	 returns normally, that will be done by
-	 restore_infcall_control_state.  However, we do have to handle
-	 the case where the dummy call is returning after being
-	 stopped (e.g. the dummy call previously hit a breakpoint).
-	 We can't know which case we have so just always re-establish
-	 a selected frame here.  */
-      select_frame (get_current_frame ());
+      /* Set the current source location.  */
+      set_current_sal_from_frame (get_current_frame ());
     }
 
-done:
-  annotate_stopped ();
-
-  /* Suppress the stop observer if we're in the middle of:
-
-     - a step n (n > 1), as there still more steps to be done.
-
-     - a "finish" command, as the observer will be called in
-       finish_command_continuation, so it can include the inferior
-       function's return value.
-
-     - calling an inferior function, as we pretend we inferior didn't
-       run at all.  The return value of the call is handled by the
-       expression evaluator, through call_function_by_hand.  */
-
-  if (!target_has_execution
-      || last.kind == TARGET_WAITKIND_SIGNALLED
-      || last.kind == TARGET_WAITKIND_EXITED
-      || last.kind == TARGET_WAITKIND_NO_RESUMED
-      || (!(inferior_thread ()->step_multi
-	    && inferior_thread ()->control.stop_step)
-	  && !(inferior_thread ()->control.stop_bpstat
-	       && inferior_thread ()->control.proceed_to_finish)
-	  && !inferior_thread ()->control.in_infcall))
+  /* Look up the hook_stop and run it (CLI internally handles problem
+     of stop_command's pre-hook not existing).  */
+  if (stop_command != NULL)
     {
-      if (!ptid_equal (inferior_ptid, null_ptid))
-	observer_notify_normal_stop (inferior_thread ()->control.stop_bpstat,
-				     stop_print_frame);
-      else
-	observer_notify_normal_stop (NULL, stop_print_frame);
+      struct stop_context *saved_context = save_stop_context ();
+      struct cleanup *old_chain
+	= make_cleanup (release_stop_context_cleanup, saved_context);
+
+      catch_errors (hook_stop_stub, stop_command,
+		    "Error while running hook_stop:\n", RETURN_MASK_ALL);
+
+      /* If the stop hook resumes the target, then there's no point in
+	 trying to notify about the previous stop; its context is
+	 gone.  Likewise if the command switches thread or inferior --
+	 the observers would print a stop for the wrong
+	 thread/inferior.  */
+      if (stop_context_changed (saved_context))
+	{
+	  do_cleanups (old_chain);
+	  return 1;
+	}
+      do_cleanups (old_chain);
     }
 
+  /* Notify observers about the stop.  This is where the interpreters
+     print the stop event.  */
+  if (!ptid_equal (inferior_ptid, null_ptid))
+    observer_notify_normal_stop (inferior_thread ()->control.stop_bpstat,
+				 stop_print_frame);
+  else
+    observer_notify_normal_stop (NULL, stop_print_frame);
+
+  annotate_stopped ();
+
   if (target_has_execution)
     {
       if (last.kind != TARGET_WAITKIND_SIGNALLED
@@ -6767,6 +8380,8 @@ done:
      longer needed.  Keeping those around slows down things linearly.
      Note that this never removes the current inferior.  */
   prune_inferiors ();
+
+  return 0;
 }
 
 static int
@@ -7053,7 +8668,7 @@ Are you sure you want to change it? "),
 	    sig_print_header ();
 	    for (; signum < nsigs; signum++)
 	      if (sigs[signum])
-		sig_print_info (signum);
+		sig_print_info ((enum gdb_signal) signum);
 	  }
 
 	break;
@@ -7144,25 +8759,6 @@ signals_info (char *signum_exp, int from
 		     "to change these tables.\n"));
 }
 
-/* Check if it makes sense to read $_siginfo from the current thread
-   at this point.  If not, throw an error.  */
-
-static void
-validate_siginfo_access (void)
-{
-  /* No current inferior, no siginfo.  */
-  if (ptid_equal (inferior_ptid, null_ptid))
-    error (_("No thread selected."));
-
-  /* Don't try to read from a dead thread.  */
-  if (is_exited (inferior_ptid))
-    error (_("The current thread has terminated"));
-
-  /* ... or from a spinning thread.  */
-  if (is_running (inferior_ptid))
-    error (_("Selected thread is running."));
-}
-
 /* The $_siginfo convenience variable is a bit special.  We don't know
    for sure the type of the value until we actually have a chance to
    fetch the data.  The type can change depending on gdbarch, so it is
@@ -7181,7 +8777,9 @@ siginfo_value_read (struct value *v)
 {
   LONGEST transferred;
 
-  validate_siginfo_access ();
+  /* If we can access registers, so can we access $_siginfo.  Likewise
+     vice versa.  */
+  validate_registers_access ();
 
   transferred =
     target_read (&current_target, TARGET_OBJECT_SIGNAL_INFO,
@@ -7202,7 +8800,9 @@ siginfo_value_write (struct value *v, st
 {
   LONGEST transferred;
 
-  validate_siginfo_access ();
+  /* If we can access registers, so can we access $_siginfo.  Likewise
+     vice versa.  */
+  validate_registers_access ();
 
   transferred = target_write (&current_target,
 			      TARGET_OBJECT_SIGNAL_INFO,
@@ -7280,7 +8880,7 @@ save_infcall_suspend_state (void)
       size_t len = TYPE_LENGTH (type);
       struct cleanup *back_to;
 
-      siginfo_data = xmalloc (len);
+      siginfo_data = (gdb_byte *) xmalloc (len);
       back_to = make_cleanup (xfree, siginfo_data);
 
       if (target_read (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
@@ -7349,7 +8949,7 @@ restore_infcall_suspend_state (struct in
 static void
 do_restore_infcall_suspend_state_cleanup (void *state)
 {
-  restore_infcall_suspend_state (state);
+  restore_infcall_suspend_state ((struct infcall_suspend_state *) state);
 }
 
 struct cleanup *
@@ -7385,7 +8985,6 @@ struct infcall_control_state
   /* Other fields:  */
   enum stop_stack_kind stop_stack_dummy;
   int stopped_by_random_signal;
-  int stop_after_trap;
 
   /* ID if the selected frame when the inferior function call was made.  */
   struct frame_id selected_frame_id;
@@ -7397,7 +8996,8 @@ struct infcall_control_state
 struct infcall_control_state *
 save_infcall_control_state (void)
 {
-  struct infcall_control_state *inf_status = xmalloc (sizeof (*inf_status));
+  struct infcall_control_state *inf_status =
+    XNEW (struct infcall_control_state);
   struct thread_info *tp = inferior_thread ();
   struct inferior *inf = current_inferior ();
 
@@ -7416,7 +9016,6 @@ save_infcall_control_state (void)
   /* Other fields:  */
   inf_status->stop_stack_dummy = stop_stack_dummy;
   inf_status->stopped_by_random_signal = stopped_by_random_signal;
-  inf_status->stop_after_trap = stop_after_trap;
 
   inf_status->selected_frame_id = get_frame_id (get_selected_frame (NULL));
 
@@ -7468,7 +9067,6 @@ restore_infcall_control_state (struct in
   /* Other fields:  */
   stop_stack_dummy = inf_status->stop_stack_dummy;
   stopped_by_random_signal = inf_status->stopped_by_random_signal;
-  stop_after_trap = inf_status->stop_after_trap;
 
   if (target_has_stack)
     {
@@ -7490,7 +9088,7 @@ restore_infcall_control_state (struct in
 static void
 do_restore_infcall_control_state_cleanup (void *sts)
 {
-  restore_infcall_control_state (sts);
+  restore_infcall_control_state ((struct infcall_control_state *) sts);
 }
 
 struct cleanup *
@@ -7524,7 +9122,7 @@ discard_infcall_control_state (struct in
 static void
 restore_inferior_ptid (void *arg)
 {
-  ptid_t *saved_ptid_ptr = arg;
+  ptid_t *saved_ptid_ptr = (ptid_t *) arg;
 
   inferior_ptid = *saved_ptid_ptr;
   xfree (arg);
@@ -7537,9 +9135,8 @@ restore_inferior_ptid (void *arg)
 struct cleanup *
 save_inferior_ptid (void)
 {
-  ptid_t *saved_ptid_ptr;
+  ptid_t *saved_ptid_ptr = XNEW (ptid_t);
 
-  saved_ptid_ptr = xmalloc (sizeof (ptid_t));
   *saved_ptid_ptr = inferior_ptid;
   return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
 }
@@ -7558,7 +9155,7 @@ clear_exit_convenience_vars (void)
    Set exec-direction / show exec-direction commands
    (returns error unless target implements to_set_exec_direction method).  */
 
-int execution_direction = EXEC_FORWARD;
+enum exec_direction_kind execution_direction = EXEC_FORWARD;
 static const char exec_forward[] = "forward";
 static const char exec_reverse[] = "reverse";
 static const char *exec_direction = exec_forward;
@@ -7621,6 +9218,15 @@ static const struct internalvar_funcs si
   NULL
 };
 
+/* Callback for infrun's target events source.  This is marked when a
+   thread has a pending status to process.  */
+
+static void
+infrun_async_inferior_event_handler (gdb_client_data data)
+{
+  inferior_event_handler (INF_REG_EVENT, NULL);
+}
+
 void
 _initialize_infrun (void)
 {
@@ -7628,6 +9234,10 @@ _initialize_infrun (void)
   int numsigs;
   struct cmd_list_element *c;
 
+  /* Register extra event sources in the event loop.  */
+  infrun_async_inferior_event_token
+    = create_async_event_handler (infrun_async_inferior_event_handler, NULL);
+
   add_info ("signals", signals_info, _("\
 What debugger does when program gets various signals.\n\
 Specify a signal as argument to print info on that signal only."));
@@ -7704,15 +9314,11 @@ leave it stopped or free to run as neede
 			   &showlist);
 
   numsigs = (int) GDB_SIGNAL_LAST;
-  signal_stop = (unsigned char *) xmalloc (sizeof (signal_stop[0]) * numsigs);
-  signal_print = (unsigned char *)
-    xmalloc (sizeof (signal_print[0]) * numsigs);
-  signal_program = (unsigned char *)
-    xmalloc (sizeof (signal_program[0]) * numsigs);
-  signal_catch = (unsigned char *)
-    xmalloc (sizeof (signal_catch[0]) * numsigs);
-  signal_pass = (unsigned char *)
-    xmalloc (sizeof (signal_pass[0]) * numsigs);
+  signal_stop = XNEWVEC (unsigned char, numsigs);
+  signal_print = XNEWVEC (unsigned char, numsigs);
+  signal_program = XNEWVEC (unsigned char, numsigs);
+  signal_catch = XNEWVEC (unsigned char, numsigs);
+  signal_pass = XNEWVEC (unsigned char, numsigs);
   for (i = 0; i < numsigs; i++)
     {
       signal_stop[i] = 1;
@@ -7721,8 +9327,19 @@ leave it stopped or free to run as neede
       signal_catch[i] = 0;
     }
 
-  /* Signals caused by debugger's own actions
-     should not be given to the program afterwards.  */
+  /* Signals caused by debugger's own actions should not be given to
+     the program afterwards.
+
+     Do not deliver GDB_SIGNAL_TRAP by default, except when the user
+     explicitly specifies that it should be delivered to the target
+     program.  Typically, that would occur when a user is debugging a
+     target monitor on a simulator: the target monitor sets a
+     breakpoint; the simulator encounters this breakpoint and halts
+     the simulation handing control to GDB; GDB, noting that the stop
+     address doesn't map to any known breakpoint, returns control back
+     to the simulator; the simulator then delivers the hardware
+     equivalent of a GDB_SIGNAL_TRAP to the program being
+     debugged.  */
   signal_program[GDB_SIGNAL_TRAP] = 0;
   signal_program[GDB_SIGNAL_INT] = 0;
 
@@ -7756,6 +9373,8 @@ leave it stopped or free to run as neede
   signal_print[GDB_SIGNAL_WAITING] = 0;
   signal_stop[GDB_SIGNAL_CANCEL] = 0;
   signal_print[GDB_SIGNAL_CANCEL] = 0;
+  signal_stop[GDB_SIGNAL_LIBRT] = 0;
+  signal_print[GDB_SIGNAL_LIBRT] = 0;
 
   /* Update cached state.  */
   signal_cache_update (-1);
@@ -7813,10 +9432,13 @@ By default, the debugger will use the sa
 			scheduler_enums, &scheduler_mode, _("\
 Set mode for locking scheduler during execution."), _("\
 Show mode for locking scheduler during execution."), _("\
-off  == no locking (threads may preempt at any time)\n\
-on   == full locking (no thread except the current thread may run)\n\
-step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
-	In this mode, other threads may run during other commands."),
+off    == no locking (threads may preempt at any time)\n\
+on     == full locking (no thread except the current thread may run)\n\
+          This applies to both normal execution and replay mode.\n\
+step   == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
+          In this mode, other threads may run during other commands.\n\
+          This applies to both normal execution and replay mode.\n\
+replay == scheduler locked in replay mode and unlocked during normal execution."),
 			set_schedlock_func,	/* traps on target vector */
 			show_scheduler_mode,
 			&setlist, &showlist);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infrun.h ./gdb/infrun.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/infrun.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/infrun.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1986-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 struct target_waitstatus;
 struct frame_info;
 struct address_space;
+struct return_value_info;
 
 /* True if we are debugging run control.  */
 extern unsigned int debug_infrun;
@@ -34,11 +35,6 @@ extern int debug_displaced;
    of shared library events by the dynamic linker.  */
 extern int stop_on_solib_events;
 
-/* Are we simulating synchronous execution? This is used in async gdb
-   to implement the 'run', 'continue' etc commands, which will not
-   redisplay the prompt until the execution is actually over.  */
-extern int sync_execution;
-
 /* True if execution commands resume all threads of all processes by
    default; otherwise, resume only threads of the current inferior
    process.  */
@@ -61,6 +57,11 @@ extern int non_stop;
    starting an inferior.  */
 extern int disable_randomization;
 
+/* Returns a unique identifier for the current stop.  This can be used
+   to tell whether a command has proceeded the inferior past the
+   current location.  */
+extern ULONGEST get_stop_id (void);
+
 /* Reverse execution.  */
 enum exec_direction_kind
   {
@@ -68,10 +69,8 @@ enum exec_direction_kind
     EXEC_REVERSE
   };
 
-/* The current execution direction.  This should only be set to enum
-   exec_direction_kind values.  It is only an int to make it
-   compatible with make_cleanup_restore_integer.  */
-extern int execution_direction;
+/* The current execution direction.  */
+extern enum exec_direction_kind execution_direction;
 
 extern void start_remote (int from_tty);
 
@@ -99,11 +98,21 @@ extern ptid_t user_visible_resume_ptid (
 
 extern void wait_for_inferior (void);
 
-extern void normal_stop (void);
+/* Return control to GDB when the inferior stops for real.  Print
+   appropriate messages, remove breakpoints, give terminal our modes,
+   and run the stop hook.  Returns true if the stop hook proceeded the
+   target, false otherwise.  */
+extern int normal_stop (void);
 
 extern void get_last_target_status (ptid_t *ptid,
 				    struct target_waitstatus *status);
 
+extern void set_last_target_status (ptid_t ptid,
+				    struct target_waitstatus status);
+
+/* Stop all threads.  Only returns after everything is halted.  */
+extern void stop_all_threads (void);
+
 extern void prepare_for_detach (void);
 
 extern void fetch_inferior_event (void *);
@@ -119,6 +128,10 @@ extern void insert_step_resume_breakpoin
 extern int stepping_past_instruction_at (struct address_space *aspace,
 					 CORE_ADDR address);
 
+/* Returns true if thread whose thread number is THREAD is stepping
+   over a breakpoint.  */
+extern int thread_is_stepping_over_breakpoint (int thread);
+
 /* Returns true if we're trying to step past an instruction that
    triggers a non-steppable watchpoint.  */
 extern int stepping_past_nonsteppable_watchpoint (void);
@@ -148,7 +161,23 @@ extern void print_exited_reason (struct 
    inferior has stopped.  */
 extern void print_no_history_reason (struct ui_out *uiout);
 
-extern void print_stop_event (struct target_waitstatus *ws);
+/* Print the result of a function at the end of a 'finish' command.
+   RV points at an object representing the captured return value/type
+   and its position in the value history.  */
+
+extern void print_return_value (struct ui_out *uiout,
+				struct return_value_info *rv);
+
+/* Print current location without a level number, if we have changed
+   functions or hit a breakpoint.  Print source line if we have one.
+   If the execution command captured a return value, print it.  */
+
+extern void print_stop_event (struct ui_out *uiout);
+
+/* Pretty print the results of target_wait, for debugging purposes.  */
+
+extern void print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid,
+				       const struct target_waitstatus *ws);
 
 extern int signal_stop_state (int);
 
@@ -189,4 +218,29 @@ extern void signal_catch_update (const u
    systems.  Use of symbolic signal names is strongly encouraged.  */
 enum gdb_signal gdb_signal_from_command (int num);
 
+/* Enables/disables infrun's async event source in the event loop.  */
+extern void infrun_async (int enable);
+
+/* Call infrun's event handler the next time through the event
+   loop.  */
+extern void mark_infrun_async_event_handler (void);
+
+/* The global queue of threads that need to do a step-over operation
+   to get past e.g., a breakpoint.  */
+extern struct thread_info *step_over_queue_head;
+
+/* Remove breakpoints if possible (usually that means, if everything
+   is stopped).  On failure, print a message.  */
+extern void maybe_remove_breakpoints (void);
+
+/* If a UI was in sync execution mode, and now isn't, restore its
+   prompt (a synchronous execution command has finished, and we're
+   ready for input).  */
+extern void all_uis_check_sync_execution_done (void);
+
+/* If a UI was in sync execution mode, and hasn't displayed the prompt
+   yet, re-disable its prompt (a synchronous execution command was
+   started or re-started).  */
+extern void all_uis_on_sync_execution_starting (void);
+
 #endif /* INFRUN_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inline-frame.c ./gdb/inline-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inline-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inline-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Inline frame unwinder for GDB.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -283,7 +283,7 @@ block_starting_point_at (CORE_ADDR pc, c
   if (BLOCKVECTOR_MAP (bv) == NULL)
     return 0;
 
-  new_block = addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
+  new_block = (struct block *) addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
   if (new_block == NULL)
     return 1;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inline-frame.h ./gdb/inline-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/inline-frame.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/inline-frame.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for inline frame support.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/interps.c ./gdb/interps.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/interps.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/interps.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Manages interpreters for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
 
@@ -39,83 +39,113 @@
 #include "top.h"		/* For command_loop.  */
 #include "continuations.h"
 
-/* True if the current interpreter in is async mode.  See interps.h
-   for more details.  This starts out disabled, until all the explicit
-   command line arguments (e.g., `gdb -ex "start" -ex "next"') are
-   processed.  */
-int interpreter_async = 0;
+/* Each UI has its own independent set of interpreters.  */
 
-struct interp
+struct ui_interp_info
 {
-  /* This is the name in "-i=" and set interpreter.  */
-  const char *name;
+  /* Each top level has its own independent set of interpreters.  */
+  struct interp *interp_list;
+  struct interp *current_interpreter;
+  struct interp *top_level_interpreter;
+
+  /* The interpreter that is active while `interp_exec' is active, NULL
+     at all other times.  */
+  struct interp *command_interpreter;
+};
 
-  /* Interpreters are stored in a linked list, this is the next
-     one...  */
-  struct interp *next;
-
-  /* This is a cookie that an instance of the interpreter can use.
-     This is a bit confused right now as the exact initialization
-     sequence for it, and how it relates to the interpreter's uiout
-     object is a bit confused.  */
-  void *data;
+/* Get UI's ui_interp_info object.  Never returns NULL.  */
 
-  /* Has the init_proc been run?  */
-  int inited;
+static struct ui_interp_info *
+get_interp_info (struct ui *ui)
+{
+  if (ui->interp_info == NULL)
+    ui->interp_info = XCNEW (struct ui_interp_info);
+  return ui->interp_info;
+}
 
-  const struct interp_procs *procs;
-  int quiet_p;
-};
+/* Get the current UI's ui_interp_info object.  Never returns
+   NULL.  */
+
+static struct ui_interp_info *
+get_current_interp_info (void)
+{
+  return get_interp_info (current_ui);
+}
 
 /* The magic initialization routine for this module.  */
 
 void _initialize_interpreter (void);
 
-/* Variables local to this file: */
+static struct interp *interp_lookup_existing (struct ui *ui,
+					      const char *name);
 
-static struct interp *interp_list = NULL;
-static struct interp *current_interpreter = NULL;
-static struct interp *top_level_interpreter_ptr = NULL;
+interp::interp (const char *name)
+{
+  this->name = xstrdup (name);
+  this->inited = false;
+}
 
-/* interp_new - This allocates space for a new interpreter,
-   fills the fields from the inputs, and returns a pointer to the
-   interpreter.  */
-struct interp *
-interp_new (const char *name, const struct interp_procs *procs)
+interp::~interp ()
+{}
+
+/* An interpreter factory.  Maps an interpreter name to the factory
+   function that instantiates an interpreter by that name.  */
+
+struct interp_factory
 {
-  struct interp *new_interp;
+  /* This is the name in "-i=INTERP" and "interpreter-exec INTERP".  */
+  const char *name;
+
+  /* The function that creates the interpreter.  */
+  interp_factory_func func;
+};
 
-  new_interp = XNEW (struct interp);
+typedef struct interp_factory *interp_factory_p;
+DEF_VEC_P(interp_factory_p);
 
-  new_interp->name = xstrdup (name);
-  new_interp->data = NULL;
-  new_interp->quiet_p = 0;
-  new_interp->procs = procs;
-  new_interp->inited = 0;
+/* The registered interpreter factories.  */
+static VEC(interp_factory_p) *interpreter_factories = NULL;
 
-  /* Check for required procs.  */
-  gdb_assert (procs->command_loop_proc != NULL);
+/* See interps.h.  */
 
-  return new_interp;
+void
+interp_factory_register (const char *name, interp_factory_func func)
+{
+  struct interp_factory *f;
+  int ix;
+
+  /* Assert that no factory for NAME is already registered.  */
+  for (ix = 0;
+       VEC_iterate (interp_factory_p, interpreter_factories, ix, f);
+       ++ix)
+    if (strcmp (f->name, name) == 0)
+      {
+	internal_error (__FILE__, __LINE__,
+			_("interpreter factory already registered: \"%s\"\n"),
+			name);
+      }
+
+  f = XNEW (struct interp_factory);
+  f->name = name;
+  f->func = func;
+  VEC_safe_push (interp_factory_p, interpreter_factories, f);
 }
 
 /* Add interpreter INTERP to the gdb interpreter list.  The
    interpreter must not have previously been added.  */
 void
-interp_add (struct interp *interp)
+interp_add (struct ui *ui, struct interp *interp)
 {
-  gdb_assert (interp_lookup (interp->name) == NULL);
+  struct ui_interp_info *ui_interp = get_interp_info (ui);
+
+  gdb_assert (interp_lookup_existing (ui, interp->name) == NULL);
 
-  interp->next = interp_list;
-  interp_list = interp;
+  interp->next = ui_interp->interp_list;
+  ui_interp->interp_list = interp;
 }
 
 /* This sets the current interpreter to be INTERP.  If INTERP has not
-   been initialized, then this will also run the init proc.  If the
-   init proc is successful, return 1, if it fails, set the old
-   interpreter back in place and return 0.  If we can't restore the
-   old interpreter, then raise an internal error, since we are in
-   pretty bad shape at this point.
+   been initialized, then this will also run the init method.
 
    The TOP_LEVEL parameter tells if this new interpreter is
    the top-level one.  The top-level is what is requested
@@ -124,149 +154,153 @@ interp_add (struct interp *interp)
    MI is the top-level interpreter, then it will always report
    events such as target stops and new thread creation, even if they
    are caused by CLI commands.  */
-int
-interp_set (struct interp *interp, int top_level)
+
+static void
+interp_set (struct interp *interp, bool top_level)
 {
-  struct interp *old_interp = current_interpreter;
-  int first_time = 0;
-  char buffer[64];
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+  struct interp *old_interp = ui_interp->current_interpreter;
 
   /* If we already have an interpreter, then trying to
      set top level interpreter is kinda pointless.  */
-  gdb_assert (!top_level || !current_interpreter);
-  gdb_assert (!top_level || !top_level_interpreter_ptr);
+  gdb_assert (!top_level || !ui_interp->current_interpreter);
+  gdb_assert (!top_level || !ui_interp->top_level_interpreter);
 
-  if (current_interpreter != NULL)
+  if (old_interp != NULL)
     {
-      ui_out_flush (current_uiout);
-      if (current_interpreter->procs->suspend_proc
-	  && !current_interpreter->procs->suspend_proc (current_interpreter->
-							data))
-	{
-	  error (_("Could not suspend interpreter \"%s\"."),
-		 current_interpreter->name);
-	}
-    }
-  else
-    {
-      first_time = 1;
+      current_uiout->flush ();
+      old_interp->suspend ();
     }
 
-  current_interpreter = interp;
+  ui_interp->current_interpreter = interp;
   if (top_level)
-    top_level_interpreter_ptr = interp;
+    ui_interp->top_level_interpreter = interp;
 
   /* We use interpreter_p for the "set interpreter" variable, so we need
      to make sure we have a malloc'ed copy for the set command to free.  */
   if (interpreter_p != NULL
-      && strcmp (current_interpreter->name, interpreter_p) != 0)
+      && strcmp (interp->name, interpreter_p) != 0)
     {
       xfree (interpreter_p);
 
-      interpreter_p = xstrdup (current_interpreter->name);
+      interpreter_p = xstrdup (interp->name);
     }
 
-  /* Run the init proc.  If it fails, try to restore the old interp.  */
-
+  /* Run the init proc.  */
   if (!interp->inited)
     {
-      if (interp->procs->init_proc != NULL)
-	{
-	  interp->data = interp->procs->init_proc (interp, top_level);
-	}
-      interp->inited = 1;
+      interp->init (top_level);
+      interp->inited = true;
     }
 
   /* Do this only after the interpreter is initialized.  */
-  current_uiout = interp->procs->ui_out_proc (interp);
+  current_uiout = interp->interp_ui_out ();
 
   /* Clear out any installed interpreter hooks/event handlers.  */
   clear_interpreter_hooks ();
 
-  if (interp->procs->resume_proc != NULL
-      && (!interp->procs->resume_proc (interp->data)))
-    {
-      if (old_interp == NULL || !interp_set (old_interp, 0))
-	internal_error (__FILE__, __LINE__,
-			_("Failed to initialize new interp \"%s\" %s"),
-			interp->name, "and could not restore old interp!\n");
-      return 0;
-    }
+  interp->resume ();
+}
+
+/* Look up the interpreter for NAME.  If no such interpreter exists,
+   return NULL, otherwise return a pointer to the interpreter.  */
 
-  if (!first_time && !interp_quiet_p (interp))
+static struct interp *
+interp_lookup_existing (struct ui *ui, const char *name)
+{
+  struct ui_interp_info *ui_interp = get_interp_info (ui);
+  struct interp *interp;
+
+  for (interp = ui_interp->interp_list;
+       interp != NULL;
+       interp = interp->next)
     {
-      xsnprintf (buffer, sizeof (buffer),
-		 "Switching to interpreter \"%.24s\".\n", interp->name);
-      ui_out_text (current_uiout, buffer);
+      if (strcmp (interp->name, name) == 0)
+	return interp;
     }
 
-  return 1;
+  return NULL;
 }
 
-/* interp_lookup - Looks up the interpreter for NAME.  If no such
-   interpreter exists, return NULL, otherwise return a pointer to the
-   interpreter.  */
+/* See interps.h.  */
+
 struct interp *
-interp_lookup (const char *name)
+interp_lookup (struct ui *ui, const char *name)
 {
+  struct interp_factory *factory;
   struct interp *interp;
+  int ix;
 
   if (name == NULL || strlen (name) == 0)
     return NULL;
 
-  for (interp = interp_list; interp != NULL; interp = interp->next)
-    {
-      if (strcmp (interp->name, name) == 0)
+  /* Only create each interpreter once per top level.  */
+  interp = interp_lookup_existing (ui, name);
+  if (interp != NULL)
+    return interp;
+
+  for (ix = 0;
+       VEC_iterate (interp_factory_p, interpreter_factories, ix, factory);
+       ++ix)
+    if (strcmp (factory->name, name) == 0)
+      {
+	interp = factory->func (name);
+	interp_add (ui, interp);
 	return interp;
-    }
+      }
 
   return NULL;
 }
 
+/* See interps.h.  */
+
+void
+set_top_level_interpreter (const char *name)
+{
+  /* Find it.  */
+  struct interp *interp = interp_lookup (current_ui, name);
+
+  if (interp == NULL)
+    error (_("Interpreter `%s' unrecognized"), name);
+  /* Install it.  */
+  interp_set (interp, true);
+}
+
 /* Returns the current interpreter.  */
 
 struct ui_out *
 interp_ui_out (struct interp *interp)
 {
-  if (interp != NULL)
-    return interp->procs->ui_out_proc (interp);
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
 
-  return current_interpreter->procs->ui_out_proc (current_interpreter);
+  if (interp == NULL)
+    interp = ui_interp->current_interpreter;
+  return interp->interp_ui_out ();
 }
 
-int
-current_interp_set_logging (int start_log, struct ui_file *out,
-			    struct ui_file *logfile)
+void
+current_interp_set_logging (ui_file_up logfile,
+			    bool logging_redirect)
 {
-  if (current_interpreter == NULL
-      || current_interpreter->procs->set_logging_proc == NULL)
-    return 0;
-
-  return current_interpreter->procs->set_logging_proc (current_interpreter,
-						       start_log, out,
-						       logfile);
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+  struct interp *interp = ui_interp->current_interpreter;
+
+  interp->set_logging (std::move (logfile), logging_redirect);
 }
 
 /* Temporarily overrides the current interpreter.  */
 struct interp *
 interp_set_temp (const char *name)
 {
-  struct interp *interp = interp_lookup (name);
-  struct interp *old_interp = current_interpreter;
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+  struct interp *interp = interp_lookup (current_ui, name);
+  struct interp *old_interp = ui_interp->current_interpreter;
 
   if (interp)
-    current_interpreter = interp;
+    ui_interp->current_interpreter = interp;
   return old_interp;
 }
 
-/* Returns the interpreter's cookie.  */
-
-void *
-interp_data (struct interp *interp)
-{
-  return interp->data;
-}
-
 /* Returns the interpreter's name.  */
 
 const char *
@@ -279,16 +313,15 @@ interp_name (struct interp *interp)
 int
 current_interp_named_p (const char *interp_name)
 {
-  if (current_interpreter)
-    return (strcmp (current_interpreter->name, interp_name) == 0);
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+  struct interp *interp = ui_interp->current_interpreter;
+
+  if (interp != NULL)
+    return (strcmp (interp->name, interp_name) == 0);
 
   return 0;
 }
 
-/* The interpreter that is active while `interp_exec' is active, NULL
-   at all other times.  */
-static struct interp *command_interpreter;
-
 /* The interpreter that was active when a command was executed.
    Normally that'd always be CURRENT_INTERPRETER, except that MI's
    -interpreter-exec command doesn't actually flip the current
@@ -302,37 +335,30 @@ static struct interp *command_interprete
 struct interp *
 command_interp (void)
 {
-  if (command_interpreter != NULL)
-    return command_interpreter;
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+
+  if (ui_interp->command_interpreter != NULL)
+    return ui_interp->command_interpreter;
   else
-    return current_interpreter;
+    return ui_interp->current_interpreter;
 }
 
-/* Run the current command interpreter's main loop.  */
+/* See interps.h.  */
+
 void
-current_interp_command_loop (void)
+interp_pre_command_loop (struct interp *interp)
 {
-  gdb_assert (current_interpreter != NULL);
+  gdb_assert (interp != NULL);
 
-  current_interpreter->procs->command_loop_proc (current_interpreter->data);
+  interp->pre_command_loop ();
 }
 
+/* See interp.h  */
+
 int
-interp_quiet_p (struct interp *interp)
+interp_supports_command_editing (struct interp *interp)
 {
-  if (interp != NULL)
-    return interp->quiet_p;
-  else
-    return current_interpreter->quiet_p;
-}
-
-static int
-interp_set_quiet (struct interp *interp, int quiet)
-{
-  int old_val = interp->quiet_p;
-
-  interp->quiet_p = quiet;
-  return old_val;
+  return interp->supports_command_editing ();
 }
 
 /* interp_exec - This executes COMMAND_STR in the current 
@@ -341,18 +367,18 @@ interp_set_quiet (struct interp *interp,
 struct gdb_exception
 interp_exec (struct interp *interp, const char *command_str)
 {
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+
   struct gdb_exception ex;
   struct interp *save_command_interp;
 
-  gdb_assert (interp->procs->exec_proc != NULL);
-
   /* See `command_interp' for why we do this.  */
-  save_command_interp = command_interpreter;
-  command_interpreter = interp;
+  save_command_interp = ui_interp->command_interpreter;
+  ui_interp->command_interpreter = interp;
 
-  ex = interp->procs->exec_proc (interp->data, command_str);
+  ex = interp->exec (command_str);
 
-  command_interpreter = save_command_interp;
+  ui_interp->command_interpreter = save_command_interp;
 
   return ex;
 }
@@ -370,7 +396,6 @@ clear_interpreter_hooks (void)
   deprecated_readline_begin_hook = 0;
   deprecated_readline_hook = 0;
   deprecated_readline_end_hook = 0;
-  deprecated_register_changed_hook = 0;
   deprecated_context_hook = 0;
   deprecated_target_wait_hook = 0;
   deprecated_call_command_hook = 0;
@@ -380,12 +405,12 @@ clear_interpreter_hooks (void)
 static void
 interpreter_exec_cmd (char *args, int from_tty)
 {
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
   struct interp *old_interp, *interp_to_use;
   char **prules = NULL;
   char **trule = NULL;
   unsigned int nrules;
   unsigned int i;
-  int old_quiet, use_quiet;
   struct cleanup *cleanup;
 
   if (args == NULL)
@@ -401,18 +426,13 @@ interpreter_exec_cmd (char *args, int fr
   if (nrules < 2)
     error (_("usage: interpreter-exec <interpreter> [ <command> ... ]"));
 
-  old_interp = current_interpreter;
+  old_interp = ui_interp->current_interpreter;
 
-  interp_to_use = interp_lookup (prules[0]);
+  interp_to_use = interp_lookup (current_ui, prules[0]);
   if (interp_to_use == NULL)
     error (_("Could not find interpreter \"%s\"."), prules[0]);
 
-  /* Temporarily set interpreters quiet.  */
-  old_quiet = interp_set_quiet (old_interp, 1);
-  use_quiet = interp_set_quiet (interp_to_use, 1);
-
-  if (!interp_set (interp_to_use, 0))
-    error (_("Could not switch to interpreter \"%s\"."), prules[0]);
+  interp_set (interp_to_use, false);
 
   for (i = 1; i < nrules; i++)
     {
@@ -421,30 +441,30 @@ interpreter_exec_cmd (char *args, int fr
       if (e.reason < 0)
 	{
 	  interp_set (old_interp, 0);
-	  interp_set_quiet (interp_to_use, use_quiet);
-	  interp_set_quiet (old_interp, old_quiet);
 	  error (_("error in command: \"%s\"."), prules[i]);
 	}
     }
 
   interp_set (old_interp, 0);
-  interp_set_quiet (interp_to_use, use_quiet);
-  interp_set_quiet (old_interp, old_quiet);
 
   do_cleanups (cleanup);
 }
 
-/* List the possible interpreters which could complete the given text.  */
-static VEC (char_ptr) *
+/* See interps.h.  */
+
+VEC (char_ptr) *
 interpreter_completer (struct cmd_list_element *ignore,
 		       const char *text, const char *word)
 {
+  struct interp_factory *interp;
   int textlen;
   VEC (char_ptr) *matches = NULL;
-  struct interp *interp;
+  int ix;
 
   textlen = strlen (text);
-  for (interp = interp_list; interp != NULL; interp = interp->next)
+  for (ix = 0;
+       VEC_iterate (interp_factory_p, interpreter_factories, ix, interp);
+       ++ix)
     {
       if (strncmp (interp->name, text, textlen) == 0)
 	{
@@ -475,14 +495,19 @@ interpreter_completer (struct cmd_list_e
 struct interp *
 top_level_interpreter (void)
 {
-  return top_level_interpreter_ptr;  
+  struct ui_interp_info *ui_interp = get_current_interp_info ();
+
+  return ui_interp->top_level_interpreter;
 }
 
-void *
-top_level_interpreter_data (void)
+/* See interps.h.  */
+
+struct interp *
+current_interpreter (void)
 {
-  gdb_assert (top_level_interpreter_ptr);
-  return top_level_interpreter_ptr->data;  
+  struct ui_interp_info *ui_interp = get_interp_info (current_ui);
+
+  return ui_interp->current_interpreter;
 }
 
 /* This just adds the "interpreter-exec" command.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/interps.h ./gdb/interps.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/interps.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/interps.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Manages interpreters for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
 
@@ -24,86 +24,124 @@
 
 struct ui_out;
 struct interp;
+struct ui;
+
+typedef struct interp *(*interp_factory_func) (const char *name);
+
+/* Each interpreter kind (CLI, MI, etc.) registers itself with a call
+   to this function, passing along its name, and a pointer to a
+   function that creates a new instance of an interpreter with that
+   name.  */
+extern void interp_factory_register (const char *name,
+				     interp_factory_func func);
 
 extern int interp_resume (struct interp *interp);
 extern int interp_suspend (struct interp *interp);
 extern struct gdb_exception interp_exec (struct interp *interp,
 					 const char *command);
-extern int interp_quiet_p (struct interp *interp);
 
-typedef void *(interp_init_ftype) (struct interp *self, int top_level);
-typedef int (interp_resume_ftype) (void *data);
-typedef int (interp_suspend_ftype) (void *data);
-typedef struct gdb_exception (interp_exec_ftype) (void *data,
-						  const char *command);
-typedef void (interp_command_loop_ftype) (void *data);
-typedef struct ui_out *(interp_ui_out_ftype) (struct interp *self);
-
-typedef int (interp_set_logging_ftype) (struct interp *self, int start_log,
-					struct ui_file *out,
-					struct ui_file *logfile);
-
-struct interp_procs
+class interp
 {
-  interp_init_ftype *init_proc;
-  interp_resume_ftype *resume_proc;
-  interp_suspend_ftype *suspend_proc;
-  interp_exec_ftype *exec_proc;
+public:
+  explicit interp (const char *name);
+  virtual ~interp () = 0;
+
+  virtual void init (bool top_level)
+  {}
+
+  virtual void resume () = 0;
+  virtual void suspend () = 0;
+
+  virtual gdb_exception exec (const char *command) = 0;
 
   /* Returns the ui_out currently used to collect results for this
      interpreter.  It can be a formatter for stdout, as is the case
      for the console & mi outputs, or it might be a result
      formatter.  */
-  interp_ui_out_ftype *ui_out_proc;
+  virtual ui_out *interp_ui_out () = 0;
 
   /* Provides a hook for interpreters to do any additional
      setup/cleanup that they might need when logging is enabled or
      disabled.  */
-  interp_set_logging_ftype *set_logging_proc;
+  virtual void set_logging (ui_file_up logfile, bool logging_redirect) = 0;
+
+  /* Called before starting an event loop, to give the interpreter a
+     chance to e.g., print a prompt.  */
+  virtual void pre_command_loop ()
+  {}
+
+  /* Returns true if this interpreter supports using the readline
+     library; false if it uses GDB's own simplified readline
+     emulation.  */
+  virtual bool supports_command_editing ()
+  { return false; }
+
+  /* This is the name in "-i=" and "set interpreter".  */
+  const char *name;
+
+  /* Interpreters are stored in a linked list, this is the next
+     one...  */
+  struct interp *next;
 
-  interp_command_loop_ftype *command_loop_proc;
+  /* Has the init method been run?  */
+  bool inited;
 };
 
-extern struct interp *interp_new (const char *name, const struct interp_procs *procs);
-extern void interp_add (struct interp *interp);
-extern int interp_set (struct interp *interp, int top_level);
-extern struct interp *interp_lookup (const char *name);
+extern void interp_add (struct ui *ui, struct interp *interp);
+
+/* Look up the interpreter for NAME, creating one if none exists yet.
+   If NAME is not a interpreter type previously registered with
+   interp_factory_register, return NULL; otherwise return a pointer to
+   the interpreter.  */
+extern struct interp *interp_lookup (struct ui *ui, const char *name);
+
+/* Set the current UI's top level interpreter to the interpreter named
+   NAME.  Throws an error if NAME is not a known interpreter or the
+   interpreter fails to initialize.  */
+extern void set_top_level_interpreter (const char *name);
+
 extern struct ui_out *interp_ui_out (struct interp *interp);
-extern void *interp_data (struct interp *interp);
 extern const char *interp_name (struct interp *interp);
 extern struct interp *interp_set_temp (const char *name);
 
 extern int current_interp_named_p (const char *name);
 
-extern void current_interp_command_loop (void);
-
 /* Call this function to give the current interpreter an opportunity
    to do any special handling of streams when logging is enabled or
-   disabled.  START_LOG is 1 when logging is starting, 0 when it ends,
-   and OUT is the stream for the log file; it will be NULL when
-   logging is ending.  LOGFILE is non-NULL if the output streams
-   are to be tees, with the log file as one of the outputs.  */
-
-extern int current_interp_set_logging (int start_log, struct ui_file *out,
-				       struct ui_file *logfile);
+   disabled.  LOGFILE is the stream for the log file when logging is
+   starting and is NULL when logging is ending.  LOGGING_REDIRECT is
+   the value of the "set logging redirect" setting.  If true, the
+   interpreter should configure the output streams to send output only
+   to the logfile.  If false, the interpreter should configure the
+   output streams to send output to both the current output stream
+   (i.e., the terminal) and the log file.  */
+extern void current_interp_set_logging (ui_file_up logfile,
+					bool logging_redirect);
 
-/* Returns opaque data associated with the top-level interpreter.  */
-extern void *top_level_interpreter_data (void);
+/* Returns the top-level interpreter.  */
 extern struct interp *top_level_interpreter (void);
 
-extern struct interp *command_interp (void);
+/* Return the current UI's current interpreter.  */
+extern struct interp *current_interpreter (void);
 
-/* True if the current interpreter is in async mode, false if in sync
-   mode.  If in sync mode, running a synchronous execution command
-   (with execute_command, e.g, "next") will not return until the
-   command is finished.  If in async mode, then running a synchronous
-   command returns right after resuming the target.  Waiting for the
-   command's completion is later done on the top event loop (using
-   continuations).  */
-extern int interpreter_async;
+extern struct interp *command_interp (void);
 
 extern void clear_interpreter_hooks (void);
 
+/* Returns true if INTERP supports using the readline library; false
+   if it uses GDB's own simplified form of readline.  */
+extern int interp_supports_command_editing (struct interp *interp);
+
+/* Called before starting an event loop, to give the interpreter a
+   chance to e.g., print a prompt.  */
+extern void interp_pre_command_loop (struct interp *interp);
+
+/* List the possible interpreters which could complete the given
+   text.  */
+extern VEC (char_ptr) *interpreter_completer (struct cmd_list_element *ignore,
+					      const char *text,
+					      const char *word);
+
 /* well-known interpreters */
 #define INTERP_CONSOLE		"console"
 #define INTERP_MI1             "mi1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/iq2000-tdep.c ./gdb/iq2000-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/iq2000-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/iq2000-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for the IQ2000 architecture, for GDB, the GNU
    Debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -206,8 +206,6 @@ iq2000_scan_prologue (struct gdbarch *gd
   struct symtab_and_line sal;
   CORE_ADDR pc;
   CORE_ADDR loop_end;
-  int found_store_lr = 0;
-  int found_decr_sp = 0;
   int srcreg;
   int tgtreg;
   signed short offset;
@@ -250,8 +248,6 @@ iq2000_scan_prologue (struct gdbarch *gd
 	  if (tgtreg >= 0 && tgtreg < E_NUM_REGS)
 	    cache->saved_regs[tgtreg] = -((signed short) (insn & 0xffff));
 
-	  if (tgtreg == E_LR_REGNUM)
-	    found_store_lr = 1;
 	  continue;
 	}
 
@@ -259,7 +255,6 @@ iq2000_scan_prologue (struct gdbarch *gd
 	{
 	  /* addi %1, %1, -N == addi %sp, %sp, -N */
 	  /* LEGACY -- from assembly-only port.  */
-	  found_decr_sp = 1;
 	  cache->framesize = -((signed short) (insn & 0xffff));
 	  continue;
 	}
@@ -372,7 +367,7 @@ iq2000_frame_cache (struct frame_info *t
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct iq2000_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct iq2000_frame_cache);
   iq2000_init_frame_cache (cache);
@@ -474,18 +469,23 @@ static const struct frame_base iq2000_fr
   iq2000_frame_base_address
 };
 
-static const unsigned char *
-iq2000_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			   int *lenptr)
+static int
+iq2000_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
-  static const unsigned char big_breakpoint[] = { 0x00, 0x00, 0x00, 0x0d };
-  static const unsigned char little_breakpoint[] = { 0x0d, 0x00, 0x00, 0x00 };
-
   if ((*pcptr & 3) != 0)
     error (_("breakpoint_from_pc: invalid breakpoint address 0x%lx"),
 	   (long) *pcptr);
 
-  *lenptr = 4;
+  return 4;
+}
+
+static const gdb_byte *
+iq2000_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  static const unsigned char big_breakpoint[] = { 0x00, 0x00, 0x00, 0x0d };
+  static const unsigned char little_breakpoint[] = { 0x0d, 0x00, 0x00, 0x00 };
+  *size = kind;
+
   return (gdbarch_byte_order (gdbarch)
 	  == BFD_ENDIAN_BIG) ? big_breakpoint : little_breakpoint;
 }
@@ -537,7 +537,7 @@ iq2000_use_struct_convention (struct typ
 
 static void
 iq2000_extract_return_value (struct type *type, struct regcache *regcache,
-			     void *valbuf)
+			     gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -564,7 +564,7 @@ iq2000_extract_return_value (struct type
 	  regcache_cooked_read_unsigned (regcache, regno++, &tmp);
 	  store_unsigned_integer (valbuf, size, byte_order, tmp);
 	  len -= size;
-	  valbuf = ((char *) valbuf) + size;
+	  valbuf += size;
 	}
     }
   else
@@ -831,7 +831,10 @@ iq2000_gdbarch_init (struct gdbarch_info
   set_gdbarch_double_format        (gdbarch, floatformats_ieee_double);
   set_gdbarch_long_double_format   (gdbarch, floatformats_ieee_double);
   set_gdbarch_return_value	   (gdbarch, iq2000_return_value);
-  set_gdbarch_breakpoint_from_pc   (gdbarch, iq2000_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       iq2000_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       iq2000_sw_breakpoint_from_kind);
   set_gdbarch_frame_args_skip      (gdbarch, 0);
   set_gdbarch_skip_prologue        (gdbarch, iq2000_skip_prologue);
   set_gdbarch_inner_than           (gdbarch, core_addr_lessthan);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit.c ./gdb/jit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle JIT code generation in the inferior for GDB, the GNU Debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,6 +39,8 @@
 #include "gdb-dlfcn.h"
 #include <sys/stat.h>
 #include "gdb_bfd.h"
+#include "readline/tilde.h"
+#include "completer.h"
 
 static const char *jit_reader_dir = NULL;
 
@@ -51,6 +53,7 @@ static const char *const jit_descriptor_
 static const struct program_space_data *jit_program_space_data = NULL;
 
 static void jit_inferior_init (struct gdbarch *gdbarch);
+static void jit_inferior_exit_hook (struct inferior *inf);
 
 /* An unwinder is registered for every gdbarch.  This key is used to
    remember if the unwinder has been registered for a particular
@@ -133,10 +136,10 @@ mem_bfd_iovec_stat (struct bfd *abfd, vo
 
 /* Open a BFD from the target's memory.  */
 
-static struct bfd *
+static gdb_bfd_ref_ptr
 bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, char *target)
 {
-  struct target_buffer *buffer = xmalloc (sizeof (struct target_buffer));
+  struct target_buffer *buffer = XNEW (struct target_buffer);
 
   buffer->base = addr;
   buffer->size = size;
@@ -177,7 +180,7 @@ jit_reader_load (const char *file_name)
   so = gdb_dlopen (file_name);
   old_cleanups = make_cleanup_dlclose (so);
 
-  init_fn = gdb_dlsym (so, reader_init_fn_sym);
+  init_fn = (reader_init_fn_type *) gdb_dlsym (so, reader_init_fn_sym);
   if (!init_fn)
     error (_("Could not locate initialization function: %s."),
           reader_init_fn_sym);
@@ -207,17 +210,23 @@ jit_reader_load_command (char *args, int
 
   if (args == NULL)
     error (_("No reader name provided."));
+  args = tilde_expand (args);
+  prev_cleanup = make_cleanup (xfree, args);
 
   if (loaded_jit_reader != NULL)
     error (_("JIT reader already loaded.  Run jit-reader-unload first."));
 
   if (IS_ABSOLUTE_PATH (args))
-    so_name = xstrdup (args);
+    so_name = args;
   else
-    so_name = xstrprintf ("%s%s%s", jit_reader_dir, SLASH_STRING, args);
-  prev_cleanup = make_cleanup (xfree, so_name);
+    {
+      so_name = xstrprintf ("%s%s%s", jit_reader_dir, SLASH_STRING, args);
+      make_cleanup (xfree, so_name);
+    }
 
   loaded_jit_reader = jit_reader_load (so_name);
+  reinit_frame_cache ();
+  jit_inferior_created_hook ();
   do_cleanups (prev_cleanup);
 }
 
@@ -229,6 +238,8 @@ jit_reader_unload_command (char *args, i
   if (!loaded_jit_reader)
     error (_("No JIT reader loaded."));
 
+  reinit_frame_cache ();
+  jit_inferior_exit_hook (current_inferior ());
   loaded_jit_reader->functions->destroy (loaded_jit_reader->functions);
 
   gdb_dlclose (loaded_jit_reader->handle);
@@ -285,7 +296,7 @@ get_jit_objfile_data (struct objfile *ob
 {
   struct jit_objfile_data *objf_data;
 
-  objf_data = objfile_data (objf, jit_objfile_data);
+  objf_data = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
   if (objf_data == NULL)
     {
       objf_data = XCNEW (struct jit_objfile_data);
@@ -315,7 +326,9 @@ get_jit_program_space_data (void)
 {
   struct jit_program_space_data *ps_data;
 
-  ps_data = program_space_data (current_program_space, jit_program_space_data);
+  ps_data
+    = ((struct jit_program_space_data *)
+       program_space_data (current_program_space, jit_program_space_data));
   if (ps_data == NULL)
     {
       ps_data = XCNEW (struct jit_program_space_data);
@@ -364,7 +377,7 @@ jit_read_descriptor (struct gdbarch *gdb
   ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
   ptr_size = TYPE_LENGTH (ptr_type);
   desc_size = 8 + 2 * ptr_size;  /* Two 32-bit ints and two pointers.  */
-  desc_buf = alloca (desc_size);
+  desc_buf = (gdb_byte *) alloca (desc_size);
 
   /* Read the descriptor.  */
   err = target_read_memory (MSYMBOL_VALUE_ADDRESS (ps_data->objfile,
@@ -412,7 +425,7 @@ jit_read_code_entry (struct gdbarch *gdb
   off = (off + (align_bytes - 1)) & ~(align_bytes - 1);
 
   entry_size = off + 8;  /* Three pointers and one 64-bit int.  */
-  entry_buf = alloca (entry_size);
+  entry_buf = (gdb_byte *) alloca (entry_size);
 
   /* Read the entry.  */
   err = target_read_memory (code_addr, entry_buf, entry_size);
@@ -489,7 +502,8 @@ typedef CORE_ADDR jit_dbg_reader_data;
 static enum gdb_status
 jit_target_read_impl (GDB_CORE_ADDR target_mem, void *gdb_buf, int len)
 {
-  int result = target_read_memory ((CORE_ADDR) target_mem, gdb_buf, len);
+  int result = target_read_memory ((CORE_ADDR) target_mem,
+				   (gdb_byte *) gdb_buf, len);
   if (result == 0)
     return GDB_SUCCESS;
   else
@@ -603,12 +617,14 @@ jit_symtab_line_mapping_add_impl (struct
                                   struct gdb_line_mapping *map)
 {
   int i;
+  int alloc_len;
 
   if (nlines < 1)
     return;
 
-  stab->linetable = xmalloc (sizeof (struct linetable)
-                             + (nlines - 1) * sizeof (struct linetable_entry));
+  alloc_len = sizeof (struct linetable)
+	      + (nlines - 1) * sizeof (struct linetable_entry);
+  stab->linetable = (struct linetable *) xmalloc (alloc_len);
   stab->linetable->nitems = nlines;
   for (i = 0; i < nlines; i++)
     {
@@ -658,14 +674,15 @@ finalize_symtab (struct gdb_symtab *stab
 		     * sizeof (struct linetable_entry)
 		     + sizeof (struct linetable));
       SYMTAB_LINETABLE (COMPUNIT_FILETABS (cust))
-	= obstack_alloc (&objfile->objfile_obstack, size);
+	= (struct linetable *) obstack_alloc (&objfile->objfile_obstack, size);
       memcpy (SYMTAB_LINETABLE (COMPUNIT_FILETABS (cust)), stab->linetable,
 	      size);
     }
 
   blockvector_size = (sizeof (struct blockvector)
                       + (actual_nblocks - 1) * sizeof (struct block *));
-  bv = obstack_alloc (&objfile->objfile_obstack, blockvector_size);
+  bv = (struct blockvector *) obstack_alloc (&objfile->objfile_obstack,
+					     blockvector_size);
   COMPUNIT_BLOCKVECTOR (cust) = bv;
 
   /* (begin, end) will contain the PC range this entire blockvector
@@ -702,9 +719,10 @@ finalize_symtab (struct gdb_symtab *stab
       SYMBOL_TYPE (block_name) = lookup_function_type (block_type);
       SYMBOL_BLOCK_VALUE (block_name) = new_block;
 
-      block_name->ginfo.name = obstack_copy0 (&objfile->objfile_obstack,
-					      gdb_block_iter->name,
-					      strlen (gdb_block_iter->name));
+      block_name->ginfo.name
+	= (const char *) obstack_copy0 (&objfile->objfile_obstack,
+					gdb_block_iter->name,
+					strlen (gdb_block_iter->name));
 
       BLOCK_FUNCTION (new_block) = block_name;
 
@@ -787,7 +805,7 @@ jit_object_close_impl (struct gdb_symbol
   struct objfile *objfile;
   jit_dbg_reader_data *priv_data;
 
-  priv_data = cb->priv_data;
+  priv_data = (jit_dbg_reader_data *) cb->priv_data;
 
   objfile = allocate_objfile (NULL, "<< JIT compiled code >>",
 			      OBJF_NOT_FILENAME);
@@ -813,7 +831,7 @@ static int
 jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
                             CORE_ADDR entry_addr)
 {
-  void *gdb_mem;
+  gdb_byte *gdb_mem;
   int status;
   jit_dbg_reader_data priv_data;
   struct gdb_reader_funcs *funcs;
@@ -836,7 +854,7 @@ jit_reader_try_read_symtab (struct jit_c
   if (!loaded_jit_reader)
     return 0;
 
-  gdb_mem = xmalloc (code_entry->symfile_size);
+  gdb_mem = (gdb_byte *) xmalloc (code_entry->symfile_size);
 
   status = 1;
   TRY
@@ -874,7 +892,6 @@ jit_bfd_try_read_symtab (struct jit_code
                          CORE_ADDR entry_addr,
                          struct gdbarch *gdbarch)
 {
-  bfd *nbfd;
   struct section_addr_info *sai;
   struct bfd_section *sec;
   struct objfile *objfile;
@@ -889,8 +906,9 @@ jit_bfd_try_read_symtab (struct jit_code
 			paddress (gdbarch, code_entry->symfile_addr),
 			pulongest (code_entry->symfile_size));
 
-  nbfd = bfd_open_from_target_memory (code_entry->symfile_addr,
-                                      code_entry->symfile_size, gnutarget);
+  gdb_bfd_ref_ptr nbfd (bfd_open_from_target_memory (code_entry->symfile_addr,
+						     code_entry->symfile_size,
+						     gnutarget));
   if (nbfd == NULL)
     {
       puts_unfiltered (_("Error opening JITed symbol file, ignoring it.\n"));
@@ -899,42 +917,42 @@ jit_bfd_try_read_symtab (struct jit_code
 
   /* Check the format.  NOTE: This initializes important data that GDB uses!
      We would segfault later without this line.  */
-  if (!bfd_check_format (nbfd, bfd_object))
+  if (!bfd_check_format (nbfd.get (), bfd_object))
     {
       printf_unfiltered (_("\
 JITed symbol file is not an object file, ignoring it.\n"));
-      gdb_bfd_unref (nbfd);
       return;
     }
 
   /* Check bfd arch.  */
   b = gdbarch_bfd_arch_info (gdbarch);
-  if (b->compatible (b, bfd_get_arch_info (nbfd)) != b)
+  if (b->compatible (b, bfd_get_arch_info (nbfd.get ())) != b)
     warning (_("JITed object file architecture %s is not compatible "
-               "with target architecture %s."), bfd_get_arch_info
-             (nbfd)->printable_name, b->printable_name);
+               "with target architecture %s."),
+	     bfd_get_arch_info (nbfd.get ())->printable_name,
+	     b->printable_name);
 
   /* Read the section address information out of the symbol file.  Since the
      file is generated by the JIT at runtime, it should all of the absolute
      addresses that we care about.  */
-  sai = alloc_section_addr_info (bfd_count_sections (nbfd));
+  sai = alloc_section_addr_info (bfd_count_sections (nbfd.get ()));
   old_cleanups = make_cleanup_free_section_addr_info (sai);
   i = 0;
   for (sec = nbfd->sections; sec != NULL; sec = sec->next)
-    if ((bfd_get_section_flags (nbfd, sec) & (SEC_ALLOC|SEC_LOAD)) != 0)
+    if ((bfd_get_section_flags (nbfd.get (), sec) & (SEC_ALLOC|SEC_LOAD)) != 0)
       {
         /* We assume that these virtual addresses are absolute, and do not
            treat them as offsets.  */
-        sai->other[i].addr = bfd_get_section_vma (nbfd, sec);
-        sai->other[i].name = xstrdup (bfd_get_section_name (nbfd, sec));
+        sai->other[i].addr = bfd_get_section_vma (nbfd.get (), sec);
+        sai->other[i].name = xstrdup (bfd_get_section_name (nbfd.get (), sec));
         sai->other[i].sectindex = sec->index;
         ++i;
       }
   sai->num_sections = i;
 
   /* This call does not take ownership of SAI.  */
-  make_cleanup_bfd_unref (nbfd);
-  objfile = symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd), 0, sai,
+  objfile = symbol_file_add_from_bfd (nbfd.get (),
+				      bfd_get_filename (nbfd.get ()), 0, sai,
 				      OBJF_SHARED | OBJF_NOT_FILENAME, NULL);
 
   do_cleanups (old_cleanups);
@@ -985,7 +1003,8 @@ jit_find_objf_with_entry_addr (CORE_ADDR
     {
       struct jit_objfile_data *objf_data;
 
-      objf_data = objfile_data (objf, jit_objfile_data);
+      objf_data
+	= (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
       if (objf_data != NULL && objf_data->addr == entry_addr)
         return objf;
     }
@@ -1007,7 +1026,8 @@ jit_breakpoint_deleted (struct breakpoin
     {
       struct jit_program_space_data *ps_data;
 
-      ps_data = program_space_data (iter->pspace, jit_program_space_data);
+      ps_data = ((struct jit_program_space_data *)
+		 program_space_data (iter->pspace, jit_program_space_data));
       if (ps_data != NULL && ps_data->jit_breakpoint == iter->owner)
 	{
 	  ps_data->cached_code_address = 0;
@@ -1017,7 +1037,7 @@ jit_breakpoint_deleted (struct breakpoin
 }
 
 /* (Re-)Initialize the jit breakpoint if necessary.
-   Return 0 on success.  */
+   Return 0 if the jit breakpoint has been successfully initialized.  */
 
 static int
 jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
@@ -1061,7 +1081,7 @@ jit_breakpoint_re_set_internal (struct g
 			paddress (gdbarch, addr));
 
   if (ps_data->cached_code_address == addr)
-    return 1;
+    return 0;
 
   /* Delete the old breakpoint.  */
   if (ps_data->jit_breakpoint != NULL)
@@ -1081,7 +1101,7 @@ struct jit_unwind_private
 {
   /* Cached register values.  See jit_frame_sniffer to see how this
      works.  */
-  struct gdb_reg_value **registers;
+  struct regcache *regcache;
 
   /* The frame being unwound.  */
   struct frame_info *this_frame;
@@ -1096,7 +1116,7 @@ jit_unwind_reg_set_impl (struct gdb_unwi
   struct jit_unwind_private *priv;
   int gdb_reg;
 
-  priv = cb->priv_data;
+  priv = (struct jit_unwind_private *) cb->priv_data;
 
   gdb_reg = gdbarch_dwarf2_reg_to_regnum (get_frame_arch (priv->this_frame),
                                           dwarf_regnum);
@@ -1106,11 +1126,12 @@ jit_unwind_reg_set_impl (struct gdb_unwi
         fprintf_unfiltered (gdb_stdlog,
                             _("Could not recognize DWARF regnum %d"),
                             dwarf_regnum);
+      value->free (value);
       return;
     }
 
-  gdb_assert (priv->registers);
-  priv->registers[gdb_reg] = value;
+  regcache_raw_set_cached_value (priv->regcache, gdb_reg, value->value);
+  value->free (value);
 }
 
 static void
@@ -1129,12 +1150,13 @@ jit_unwind_reg_get_impl (struct gdb_unwi
   int gdb_reg, size;
   struct gdbarch *frame_arch;
 
-  priv = cb->priv_data;
+  priv = (struct jit_unwind_private *) cb->priv_data;
   frame_arch = get_frame_arch (priv->this_frame);
 
   gdb_reg = gdbarch_dwarf2_reg_to_regnum (frame_arch, regnum);
   size = register_size (frame_arch, gdb_reg);
-  value = xmalloc (sizeof (struct gdb_reg_value) + size - 1);
+  value = ((struct gdb_reg_value *)
+	   xmalloc (sizeof (struct gdb_reg_value) + size - 1));
   value->defined = deprecated_frame_register_read (priv->this_frame, gdb_reg,
 						   value->value);
   value->size = size;
@@ -1148,18 +1170,10 @@ jit_unwind_reg_get_impl (struct gdb_unwi
 static void
 jit_dealloc_cache (struct frame_info *this_frame, void *cache)
 {
-  struct jit_unwind_private *priv_data = cache;
-  struct gdbarch *frame_arch;
-  int i;
-
-  gdb_assert (priv_data->registers);
-  frame_arch = get_frame_arch (priv_data->this_frame);
+  struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache;
 
-  for (i = 0; i < gdbarch_num_regs (frame_arch); i++)
-    if (priv_data->registers[i] && priv_data->registers[i]->free)
-      priv_data->registers[i]->free (priv_data->registers[i]);
-
-  xfree (priv_data->registers);
+  gdb_assert (priv_data->regcache != NULL);
+  regcache_xfree (priv_data->regcache);
   xfree (priv_data);
 }
 
@@ -1178,6 +1192,8 @@ jit_frame_sniffer (const struct frame_un
   struct jit_unwind_private *priv_data;
   struct gdb_unwind_callbacks callbacks;
   struct gdb_reader_funcs *funcs;
+  struct address_space *aspace;
+  struct gdbarch *gdbarch;
 
   callbacks.reg_get = jit_unwind_reg_get_impl;
   callbacks.reg_set = jit_unwind_reg_set_impl;
@@ -1190,11 +1206,12 @@ jit_frame_sniffer (const struct frame_un
 
   gdb_assert (!*cache);
 
+  aspace = get_frame_address_space (this_frame);
+  gdbarch = get_frame_arch (this_frame);
+
   *cache = XCNEW (struct jit_unwind_private);
-  priv_data = *cache;
-  priv_data->registers =
-    XCNEWVEC (struct gdb_reg_value *,	      
-	      gdbarch_num_regs (get_frame_arch (this_frame)));
+  priv_data = (struct jit_unwind_private *) *cache;
+  priv_data->regcache = regcache_xmalloc (gdbarch, aspace);
   priv_data->this_frame = this_frame;
 
   callbacks.priv_data = priv_data;
@@ -1230,7 +1247,7 @@ jit_frame_this_id (struct frame_info *th
   struct gdb_reader_funcs *funcs;
   struct gdb_unwind_callbacks callbacks;
 
-  priv.registers = NULL;
+  priv.regcache = NULL;
   priv.this_frame = this_frame;
 
   /* We don't expect the frame_id function to set any registers, so we
@@ -1253,18 +1270,26 @@ jit_frame_this_id (struct frame_info *th
 static struct value *
 jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg)
 {
-  struct jit_unwind_private *priv = *cache;
-  struct gdb_reg_value *value;
+  struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache;
+  struct gdbarch *gdbarch;
 
   if (priv == NULL)
     return frame_unwind_got_optimized (this_frame, reg);
 
-  gdb_assert (priv->registers);
-  value = priv->registers[reg];
-  if (value && value->defined)
-    return frame_unwind_got_bytes (this_frame, reg, value->value);
+  gdbarch = get_regcache_arch (priv->regcache);
+  if (reg < gdbarch_num_regs (gdbarch))
+    {
+      gdb_byte *buf = (gdb_byte *) alloca (register_size (gdbarch, reg));
+      enum register_status status;
+
+      status = regcache_raw_read (priv->regcache, reg, buf);
+      if (status == REG_VALID)
+	return frame_unwind_got_bytes (this_frame, reg, buf);
+      else
+	return frame_unwind_got_optimized (this_frame, reg);
+    }
   else
-    return frame_unwind_got_optimized (this_frame, reg);
+    return gdbarch_pseudo_register_read_value (gdbarch, priv->regcache, reg);
 }
 
 /* Relay everything back to the unwinder registered by the JIT debug
@@ -1298,7 +1323,8 @@ jit_prepend_unwinder (struct gdbarch *gd
 {
   struct jit_gdbarch_data_type *data;
 
-  data = gdbarch_data (gdbarch, jit_gdbarch_data);
+  data
+    = (struct jit_gdbarch_data_type *) gdbarch_data (gdbarch, jit_gdbarch_data);
   if (!data->unwinder_registered)
     {
       frame_unwind_prepend_unwinder (gdbarch, &jit_frame_unwind);
@@ -1356,6 +1382,14 @@ jit_inferior_init (struct gdbarch *gdbar
     }
 }
 
+/* inferior_created observer.  */
+
+static void
+jit_inferior_created (struct target_ops *ops, int from_tty)
+{
+  jit_inferior_created_hook ();
+}
+
 /* Exported routine to call when an inferior has been created.  */
 
 void
@@ -1386,8 +1420,8 @@ jit_inferior_exit_hook (struct inferior 
 
   ALL_OBJFILES_SAFE (objf, temp)
     {
-      struct jit_objfile_data *objf_data = objfile_data (objf,
-							 jit_objfile_data);
+      struct jit_objfile_data *objf_data
+	= (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
 
       if (objf_data != NULL && objf_data->addr != 0)
 	jit_unregister_code (objf);
@@ -1438,15 +1472,21 @@ jit_event_handler (struct gdbarch *gdbar
 static void
 free_objfile_data (struct objfile *objfile, void *data)
 {
-  struct jit_objfile_data *objf_data = data;
+  struct jit_objfile_data *objf_data = (struct jit_objfile_data *) data;
 
   if (objf_data->register_code != NULL)
     {
       struct jit_program_space_data *ps_data;
 
-      ps_data = program_space_data (objfile->pspace, jit_program_space_data);
+      ps_data
+	= ((struct jit_program_space_data *)
+	   program_space_data (objfile->pspace, jit_program_space_data));
       if (ps_data != NULL && ps_data->objfile == objfile)
-	ps_data->objfile = NULL;
+	{
+	  ps_data->objfile = NULL;
+	  delete_breakpoint (ps_data->jit_breakpoint);
+	  ps_data->cached_code_address = 0;
+	}
     }
 
   xfree (data);
@@ -1458,10 +1498,11 @@ free_objfile_data (struct objfile *objfi
 static void *
 jit_gdbarch_data_init (struct obstack *obstack)
 {
-  struct jit_gdbarch_data_type *data;
+  struct jit_gdbarch_data_type *data =
+    XOBNEW (obstack, struct jit_gdbarch_data_type);
 
-  data = obstack_alloc (obstack, sizeof (struct jit_gdbarch_data_type));
   data->unwinder_registered = 0;
+
   return data;
 }
 
@@ -1482,6 +1523,7 @@ _initialize_jit (void)
 			     show_jit_debug,
 			     &setdebuglist, &showdebuglist);
 
+  observer_attach_inferior_created (jit_inferior_created);
   observer_attach_inferior_exit (jit_inferior_exit_hook);
   observer_attach_breakpoint_deleted (jit_breakpoint_deleted);
 
@@ -1493,15 +1535,21 @@ _initialize_jit (void)
   jit_gdbarch_data = gdbarch_data_register_pre_init (jit_gdbarch_data_init);
   if (is_dl_available ())
     {
-      add_com ("jit-reader-load", no_class, jit_reader_load_command, _("\
+      struct cmd_list_element *c;
+
+      c = add_com ("jit-reader-load", no_class, jit_reader_load_command, _("\
 Load FILE as debug info reader and unwinder for JIT compiled code.\n\
 Usage: jit-reader-load FILE\n\
 Try to load file FILE as a debug info reader (and unwinder) for\n\
 JIT compiled code.  The file is loaded from " JIT_READER_DIR ",\n\
 relocated relative to the GDB executable if required."));
-      add_com ("jit-reader-unload", no_class, jit_reader_unload_command, _("\
+      set_cmd_completer (c, filename_completer);
+
+      c = add_com ("jit-reader-unload", no_class,
+		   jit_reader_unload_command, _("\
 Unload the currently loaded JIT debug info reader.\n\
-Usage: jit-reader-unload FILE\n\n\
+Usage: jit-reader-unload\n\n\
 Do \"help jit-reader-load\" for info on loading debug info readers."));
+      set_cmd_completer (c, noop_completer);
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit.h ./gdb/jit.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jit.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* JIT declarations for GDB, the GNU Debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit-reader.in ./gdb/jit-reader.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jit-reader.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jit-reader.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* JIT declarations for GDB, the GNU Debugger.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-exp.c ./gdb/jv-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/jv-exp.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,3367 +0,0 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-
-
-/* Copy the first part of user declarations.  */
-
-/* Line 189 of yacc.c  */
-#line 36 "jv-exp.y"
-
-
-#include "defs.h"
-#include <ctype.h>
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "jv-lang.h"
-#include "bfd.h" /* Required by objfiles.h.  */
-#include "symfile.h" /* Required by objfiles.h.  */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-#include "block.h"
-#include "completer.h"
-
-#define parse_type(ps) builtin_type (parse_gdbarch (ps))
-#define parse_java_type(ps) builtin_java_type (parse_gdbarch (ps))
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth java_maxdepth
-#define	yyparse	java_parse_internal
-#define	yylex	java_lex
-#define	yyerror	java_error
-#define	yylval	java_lval
-#define	yychar	java_char
-#define	yydebug	java_debug
-#define	yypact	java_pact	
-#define	yyr1	java_r1			
-#define	yyr2	java_r2			
-#define	yydef	java_def		
-#define	yychk	java_chk		
-#define	yypgo	java_pgo		
-#define	yyact	java_act		
-#define	yyexca	java_exca
-#define yyerrflag java_errflag
-#define yynerrs	java_nerrs
-#define	yyps	java_ps
-#define	yypv	java_pv
-#define	yys	java_s
-#define	yy_yys	java_yys
-#define	yystate	java_state
-#define	yytmp	java_tmp
-#define	yyv	java_v
-#define	yy_yyv	java_yyv
-#define	yyval	java_val
-#define	yylloc	java_lloc
-#define yyreds	java_reds		/* With YYDEBUG defined */
-#define yytoks	java_toks		/* With YYDEBUG defined */
-#define yyname	java_name		/* With YYDEBUG defined */
-#define yyrule	java_rule		/* With YYDEBUG defined */
-#define yylhs	java_yylhs
-#define yylen	java_yylen
-#define yydefred java_yydefred
-#define yydgoto	java_yydgoto
-#define yysindex java_yysindex
-#define yyrindex java_yyrindex
-#define yygindex java_yygindex
-#define yytable	 java_yytable
-#define yycheck	 java_yycheck
-#define yyss	java_yyss
-#define yysslim	java_yysslim
-#define yyssp	java_yyssp
-#define yystacksize java_yystacksize
-#define yyvs	java_yyvs
-#define yyvsp	java_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
-
-/* The state of the parser, used internally when we are parsing the
-   expression.  */
-
-static struct parser_state *pstate = NULL;
-
-int yyparse (void);
-
-static int yylex (void);
-
-void yyerror (char *);
-
-static struct type *java_type_from_name (struct stoken);
-static void push_expression_name (struct parser_state *, struct stoken);
-static void push_fieldnames (struct parser_state *, struct stoken);
-
-static struct expression *copy_exp (struct expression *, int);
-static void insert_exp (struct parser_state *, int, struct expression *);
-
-
-
-/* Line 189 of yacc.c  */
-#line 172 "jv-exp.c"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     INTEGER_LITERAL = 258,
-     FLOATING_POINT_LITERAL = 259,
-     IDENTIFIER = 260,
-     STRING_LITERAL = 261,
-     BOOLEAN_LITERAL = 262,
-     TYPENAME = 263,
-     NAME_OR_INT = 264,
-     ERROR = 265,
-     LONG = 266,
-     SHORT = 267,
-     BYTE = 268,
-     INT = 269,
-     CHAR = 270,
-     BOOLEAN = 271,
-     DOUBLE = 272,
-     FLOAT = 273,
-     VARIABLE = 274,
-     ASSIGN_MODIFY = 275,
-     SUPER = 276,
-     NEW = 277,
-     OROR = 278,
-     ANDAND = 279,
-     NOTEQUAL = 280,
-     EQUAL = 281,
-     GEQ = 282,
-     LEQ = 283,
-     RSH = 284,
-     LSH = 285,
-     DECREMENT = 286,
-     INCREMENT = 287
-   };
-#endif
-/* Tokens.  */
-#define INTEGER_LITERAL 258
-#define FLOATING_POINT_LITERAL 259
-#define IDENTIFIER 260
-#define STRING_LITERAL 261
-#define BOOLEAN_LITERAL 262
-#define TYPENAME 263
-#define NAME_OR_INT 264
-#define ERROR 265
-#define LONG 266
-#define SHORT 267
-#define BYTE 268
-#define INT 269
-#define CHAR 270
-#define BOOLEAN 271
-#define DOUBLE 272
-#define FLOAT 273
-#define VARIABLE 274
-#define ASSIGN_MODIFY 275
-#define SUPER 276
-#define NEW 277
-#define OROR 278
-#define ANDAND 279
-#define NOTEQUAL 280
-#define EQUAL 281
-#define GEQ 282
-#define LEQ 283
-#define RSH 284
-#define LSH 285
-#define DECREMENT 286
-#define INCREMENT 287
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c  */
-#line 139 "jv-exp.y"
-
-    LONGEST lval;
-    struct {
-      LONGEST val;
-      struct type *type;
-    } typed_val_int;
-    struct {
-      DOUBLEST dval;
-      struct type *type;
-    } typed_val_float;
-    struct symbol *sym;
-    struct type *tval;
-    struct stoken sval;
-    struct ttype tsym;
-    struct symtoken ssym;
-    struct block *bval;
-    enum exp_opcode opcode;
-    struct internalvar *ivar;
-    int *ivec;
-  
-
-
-/* Line 214 of yacc.c  */
-#line 295 "jv-exp.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-/* Copy the second part of user declarations.  */
-
-/* Line 264 of yacc.c  */
-#line 160 "jv-exp.y"
-
-/* YYSTYPE gets defined by %union */
-static int parse_number (struct parser_state *, const char *, int,
-			 int, YYSTYPE *);
-
-
-/* Line 264 of yacc.c  */
-#line 314 "jv-exp.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
-#endif
-{
-  return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or xmalloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined xmalloc) \
-	     && (defined YYFREE || defined xfree)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC xmalloc
-#   if ! defined xmalloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE xfree
-#   if ! defined xfree && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void xfree (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  98
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   373
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  56
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  58
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  132
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  209
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   287
-
-#define YYTRANSLATE(YYX)						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    54,     2,     2,     2,    43,    30,     2,
-      48,    49,    41,    39,    23,    40,    46,    42,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    55,     2,
-      33,    24,    34,    25,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    47,     2,    52,    29,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    50,    28,    51,    53,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    26,    27,
-      31,    32,    35,    36,    37,    38,    44,    45
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
-      19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
-      39,    41,    43,    45,    47,    49,    51,    54,    57,    59,
-      61,    63,    65,    67,    69,    73,    75,    79,    81,    83,
-      85,    89,    91,    93,    95,    97,   101,   103,   105,   111,
-     113,   117,   118,   120,   125,   130,   132,   135,   139,   142,
-     146,   148,   149,   153,   157,   160,   161,   166,   173,   180,
-     185,   190,   195,   197,   199,   201,   203,   205,   208,   211,
-     213,   215,   218,   221,   224,   226,   229,   232,   234,   237,
-     240,   242,   248,   253,   259,   261,   265,   269,   273,   275,
-     279,   283,   285,   289,   293,   295,   299,   303,   307,   311,
-     313,   317,   321,   323,   327,   329,   333,   335,   339,   341,
-     345,   347,   351,   353,   359,   361,   363,   367,   371,   373,
-     375,   377,   379
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      57,     0,    -1,    73,    -1,    58,    -1,    59,    -1,    62,
-      -1,    68,    -1,     6,    -1,     3,    -1,     9,    -1,     4,
-      -1,     7,    -1,    60,    -1,    63,    -1,    16,    -1,    64,
-      -1,    65,    -1,    13,    -1,    12,    -1,    14,    -1,    11,
-      -1,    15,    -1,    18,    -1,    17,    -1,    69,    -1,    66,
-      -1,    62,    84,    -1,    69,    84,    -1,     5,    -1,    72,
-      -1,    71,    -1,    72,    -1,     5,    -1,     9,    -1,    69,
-      46,    71,    -1,   113,    -1,    73,    23,   113,    -1,    75,
-      -1,    81,    -1,    61,    -1,    48,   113,    49,    -1,    78,
-      -1,    86,    -1,    88,    -1,    90,    -1,    76,    79,    77,
-      -1,    50,    -1,    51,    -1,    22,    67,    48,    80,    49,
-      -1,   113,    -1,    79,    23,   113,    -1,    -1,    79,    -1,
-      22,    62,    82,    85,    -1,    22,    66,    82,    85,    -1,
-      83,    -1,    82,    83,    -1,    47,   113,    52,    -1,    47,
-      52,    -1,    84,    47,    52,    -1,    84,    -1,    -1,    74,
-      46,    71,    -1,    19,    46,    71,    -1,    69,    48,    -1,
-      -1,    87,    89,    80,    49,    -1,    74,    46,    71,    48,
-      80,    49,    -1,    21,    46,    71,    48,    80,    49,    -1,
-      69,    47,   113,    52,    -1,    19,    47,   113,    52,    -1,
-      75,    47,   113,    52,    -1,    74,    -1,    69,    -1,    19,
-      -1,    92,    -1,    93,    -1,    91,    45,    -1,    91,    44,
-      -1,    95,    -1,    96,    -1,    39,    94,    -1,    40,    94,
-      -1,    41,    94,    -1,    97,    -1,    45,    94,    -1,    44,
-      94,    -1,    91,    -1,    53,    94,    -1,    54,    94,    -1,
-      98,    -1,    48,    62,    85,    49,    94,    -1,    48,   113,
-      49,    97,    -1,    48,    69,    84,    49,    97,    -1,    94,
-      -1,    99,    41,    94,    -1,    99,    42,    94,    -1,    99,
-      43,    94,    -1,    99,    -1,   100,    39,    99,    -1,   100,
-      40,    99,    -1,   100,    -1,   101,    38,   100,    -1,   101,
-      37,   100,    -1,   101,    -1,   102,    33,   101,    -1,   102,
-      34,   101,    -1,   102,    36,   101,    -1,   102,    35,   101,
-      -1,   102,    -1,   103,    32,   102,    -1,   103,    31,   102,
-      -1,   103,    -1,   104,    30,   103,    -1,   104,    -1,   105,
-      29,   104,    -1,   105,    -1,   106,    28,   105,    -1,   106,
-      -1,   107,    27,   106,    -1,   107,    -1,   108,    26,   107,
-      -1,   108,    -1,   108,    25,   113,    55,   109,    -1,   109,
-      -1,   111,    -1,   112,    24,   109,    -1,   112,    20,   109,
-      -1,    70,    -1,    19,    -1,    86,    -1,    90,    -1,   110,
-      -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint16 yyrline[] =
-{
-       0,   217,   217,   218,   221,   230,   231,   235,   244,   249,
-     258,   263,   269,   280,   281,   286,   287,   291,   293,   295,
-     297,   299,   304,   306,   318,   323,   327,   329,   334,   335,
-     339,   340,   344,   345,   349,   375,   376,   381,   382,   386,
-     387,   388,   389,   390,   391,   392,   400,   405,   410,   416,
-     418,   424,   425,   429,   432,   438,   439,   443,   447,   449,
-     454,   456,   460,   462,   468,   474,   473,   479,   481,   486,
-     506,   508,   513,   514,   516,   518,   519,   523,   528,   533,
-     534,   535,   536,   538,   541,   545,   550,   555,   556,   558,
-     560,   564,   568,   592,   602,   603,   605,   607,   612,   613,
-     615,   620,   621,   623,   629,   630,   632,   634,   636,   642,
-     643,   645,   650,   651,   656,   657,   661,   662,   667,   668,
-     673,   674,   679,   680,   685,   686,   690,   692,   699,   701,
-     703,   704,   709
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "INTEGER_LITERAL",
-  "FLOATING_POINT_LITERAL", "IDENTIFIER", "STRING_LITERAL",
-  "BOOLEAN_LITERAL", "TYPENAME", "NAME_OR_INT", "ERROR", "LONG", "SHORT",
-  "BYTE", "INT", "CHAR", "BOOLEAN", "DOUBLE", "FLOAT", "VARIABLE",
-  "ASSIGN_MODIFY", "SUPER", "NEW", "','", "'='", "'?'", "OROR", "ANDAND",
-  "'|'", "'^'", "'&'", "NOTEQUAL", "EQUAL", "'<'", "'>'", "GEQ", "LEQ",
-  "RSH", "LSH", "'+'", "'-'", "'*'", "'/'", "'%'", "DECREMENT",
-  "INCREMENT", "'.'", "'['", "'('", "')'", "'{'", "'}'", "']'", "'~'",
-  "'!'", "':'", "$accept", "start", "type_exp", "PrimitiveOrArrayType",
-  "StringLiteral", "Literal", "PrimitiveType", "NumericType",
-  "IntegralType", "FloatingPointType", "ClassOrInterfaceType", "ClassType",
-  "ArrayType", "Name", "ForcedName", "SimpleName", "QualifiedName", "exp1",
-  "Primary", "PrimaryNoNewArray", "lcurly", "rcurly",
-  "ClassInstanceCreationExpression", "ArgumentList", "ArgumentList_opt",
-  "ArrayCreationExpression", "DimExprs", "DimExpr", "Dims", "Dims_opt",
-  "FieldAccess", "FuncStart", "MethodInvocation", "$@1", "ArrayAccess",
-  "PostfixExpression", "PostIncrementExpression",
-  "PostDecrementExpression", "UnaryExpression", "PreIncrementExpression",
-  "PreDecrementExpression", "UnaryExpressionNotPlusMinus",
-  "CastExpression", "MultiplicativeExpression", "AdditiveExpression",
-  "ShiftExpression", "RelationalExpression", "EqualityExpression",
-  "AndExpression", "ExclusiveOrExpression", "InclusiveOrExpression",
-  "ConditionalAndExpression", "ConditionalOrExpression",
-  "ConditionalExpression", "AssignmentExpression", "Assignment",
-  "LeftHandSide", "Expression", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,    44,    61,    63,   278,   279,   124,    94,
-      38,   280,   281,    60,    62,   282,   283,   284,   285,    43,
-      45,    42,    47,    37,   286,   287,    46,    91,    40,    41,
-     123,   125,    93,   126,    33,    58
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    56,    57,    57,    58,    59,    59,    60,    61,    61,
-      61,    61,    61,    62,    62,    63,    63,    64,    64,    64,
-      64,    64,    65,    65,    66,    67,    68,    68,    69,    69,
-      70,    70,    71,    71,    72,    73,    73,    74,    74,    75,
-      75,    75,    75,    75,    75,    75,    76,    77,    78,    79,
-      79,    80,    80,    81,    81,    82,    82,    83,    84,    84,
-      85,    85,    86,    86,    87,    89,    88,    88,    88,    90,
-      90,    90,    91,    91,    91,    91,    91,    92,    93,    94,
-      94,    94,    94,    94,    94,    95,    96,    97,    97,    97,
-      97,    98,    98,    98,    99,    99,    99,    99,   100,   100,
-     100,   101,   101,   101,   102,   102,   102,   102,   102,   103,
-     103,   103,   104,   104,   105,   105,   106,   106,   107,   107,
-     108,   108,   109,   109,   110,   110,   111,   111,   112,   112,
-     112,   112,   113
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     2,     2,     1,     1,
-       1,     1,     1,     1,     3,     1,     3,     1,     1,     1,
-       3,     1,     1,     1,     1,     3,     1,     1,     5,     1,
-       3,     0,     1,     4,     4,     1,     2,     3,     2,     3,
-       1,     0,     3,     3,     2,     0,     4,     6,     6,     4,
-       4,     4,     1,     1,     1,     1,     1,     2,     2,     1,
-       1,     2,     2,     2,     1,     2,     2,     1,     2,     2,
-       1,     5,     4,     5,     1,     3,     3,     3,     1,     3,
-       3,     1,     3,     3,     1,     3,     3,     3,     3,     1,
-       3,     3,     1,     3,     1,     3,     1,     3,     1,     3,
-       1,     3,     1,     5,     1,     1,     3,     3,     1,     1,
-       1,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       0,     8,    10,    28,     7,    11,     9,    20,    18,    17,
-      19,    21,    14,    23,    22,    74,     0,     0,     0,     0,
-       0,     0,     0,     0,    46,     0,     0,     0,     3,     4,
-      12,    39,     5,    13,    15,    16,     6,    73,   128,    30,
-      29,     2,    72,    37,     0,    41,    38,    42,    65,    43,
-      44,    87,    75,    76,    94,    79,    80,    84,    90,    98,
-     101,   104,   109,   112,   114,   116,   118,   120,   122,   124,
-     132,   125,     0,    35,     0,     0,     0,    28,     0,    25,
-       0,    24,    29,     9,    74,    73,    42,    44,    81,    82,
-      83,    86,    85,    61,    73,     0,    88,    89,     1,     0,
-      26,     0,     0,    64,    27,     0,     0,     0,     0,    49,
-      51,    78,    77,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    32,    33,    63,     0,     0,     0,
-      61,    55,    61,    51,     0,    60,     0,     0,    40,    58,
-       0,    34,     0,    36,    62,     0,     0,    47,    45,    52,
-       0,    95,    96,    97,    99,   100,   103,   102,   105,   106,
-     108,   107,   111,   110,   113,   115,   117,   119,     0,   121,
-     127,   126,    70,    51,     0,     0,    56,    53,    54,     0,
-       0,     0,    92,    59,    69,    51,    71,    50,    66,     0,
-       0,    57,    48,    91,    93,     0,   123,    68,    67
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      79,    80,    36,    85,    38,    39,    82,    41,    42,    43,
-      44,   158,    45,   159,   160,    46,   140,   141,   145,   146,
-      86,    48,    49,   110,    87,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,    72,   109
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -145
-static const yytype_int16 yypact[] =
-{
-     215,  -145,  -145,    -5,  -145,  -145,     1,  -145,  -145,  -145,
-    -145,  -145,  -145,  -145,  -145,    -7,   -19,   279,    50,    50,
-      50,    50,    50,   215,  -145,    50,    50,    46,  -145,  -145,
-    -145,  -145,    -9,  -145,  -145,  -145,  -145,    87,  -145,  -145,
-      12,    44,     5,    16,   319,  -145,  -145,    28,  -145,  -145,
-      38,    29,  -145,  -145,  -145,  -145,  -145,  -145,  -145,    99,
-      53,    85,    52,    94,    66,    41,    71,    74,   122,  -145,
-    -145,  -145,    40,  -145,    26,   319,    26,  -145,    59,    59,
-      67,    82,  -145,  -145,   111,   107,  -145,  -145,  -145,  -145,
-    -145,  -145,  -145,    -9,    87,    68,  -145,  -145,  -145,    79,
-      91,    26,   267,  -145,    91,   319,    26,   319,   -18,  -145,
-     319,  -145,  -145,    50,    50,    50,    50,    50,    50,    50,
-      50,    50,    50,    50,    50,    50,    50,    50,    50,    50,
-     319,    50,    50,    50,  -145,  -145,  -145,   112,   126,   319,
-     128,  -145,   128,   319,   319,    91,   127,   -31,   193,  -145,
-     125,  -145,   129,  -145,   131,   130,   319,  -145,  -145,   157,
-     135,  -145,  -145,  -145,    99,    99,    53,    53,    85,    85,
-      85,    85,    52,    52,    94,    66,    41,    71,   132,    74,
-    -145,  -145,  -145,   319,   134,   267,  -145,  -145,  -145,   139,
-      50,   193,  -145,  -145,  -145,   319,  -145,  -145,  -145,    50,
-     141,  -145,  -145,  -145,  -145,   144,  -145,  -145,  -145
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
-{
-    -145,  -145,  -145,  -145,  -145,  -145,    -3,  -145,  -145,  -145,
-    -145,  -145,  -145,    11,  -145,   -64,     0,  -145,  -145,  -145,
-    -145,  -145,  -145,   150,  -134,  -145,   124,  -116,   -29,   -99,
-       6,  -145,  -145,  -145,    22,  -145,  -145,  -145,    58,  -145,
-    -145,  -144,  -145,    43,    49,    -2,    45,    78,    81,    83,
-      77,    92,  -145,  -131,  -145,  -145,  -145,     7
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -132
-static const yytype_int16 yytable[] =
-{
-      40,   180,   181,   100,   192,   156,    47,    73,   104,   189,
-     136,    37,   138,  -129,    78,   -32,   150,  -129,   191,   -32,
-      93,   -33,    50,    40,   186,   -33,   186,    76,    81,    47,
-      95,   134,   -31,   157,    94,   135,   -31,   151,    99,    74,
-      75,   187,   154,   188,    40,    50,    98,   204,  -130,   200,
-      47,   106,  -130,     1,     2,    77,     4,     5,  -131,    83,
-     132,   205,  -131,   107,   133,   147,    50,   105,   206,    84,
-     127,    16,    17,   111,   112,    40,    88,    89,    90,    91,
-      92,    47,   137,    96,    97,   120,   121,   122,   123,    18,
-      19,    20,   116,   117,    21,    22,   126,    50,    23,   128,
-      24,   129,    40,    25,    26,    40,   139,    40,    47,   152,
-      40,    47,   153,    47,   155,   143,    47,   148,   168,   169,
-     170,   171,   118,   119,    50,   124,   125,    50,   101,    50,
-      40,   149,    50,   101,   102,   103,    47,   178,   150,    40,
-     113,   114,   115,    40,    40,    47,   184,   130,   131,    47,
-      47,   152,    50,   101,   144,   103,    40,    74,    75,   164,
-     165,    50,    47,   197,   182,    50,    50,   166,   167,   172,
-     173,   161,   162,   163,   183,   185,   190,   193,    50,   195,
-     156,   194,   196,    40,   198,    40,   201,   199,   202,    47,
-     207,    47,   184,   208,   108,    40,     1,     2,    77,     4,
-       5,    47,    83,   142,   174,    50,   177,    50,   175,     0,
-       0,   176,    84,     0,    16,    17,     0,    50,     1,     2,
-       3,     4,     5,   179,     6,     0,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,     0,    16,    17,     0,     0,
-       0,    23,     0,    24,     0,     0,    25,    26,   203,     0,
-       0,     0,     0,     0,    18,    19,    20,     0,     0,    21,
-      22,     0,     0,    23,     0,    24,     0,     0,    25,    26,
-       1,     2,     3,     4,     5,     0,     6,     0,     0,     0,
-       0,     0,     0,     0,    77,     0,    15,     0,    16,    17,
-       7,     8,     9,    10,    11,    12,    13,    14,     0,     0,
-       0,     0,     0,     0,     0,     0,    18,    19,    20,     0,
-       0,    21,    22,     0,     0,    23,     0,    24,     0,   149,
-      25,    26,     1,     2,     3,     4,     5,     0,     6,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    15,     0,
-      16,    17,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    18,    19,
-      20,     0,     0,    21,    22,     0,     0,    23,     0,    24,
-       0,     0,    25,    26
-};
-
-static const yytype_int16 yycheck[] =
-{
-       0,   132,   133,    32,   148,    23,     0,     0,    37,   143,
-      74,     0,    76,    20,    17,    20,    47,    24,    49,    24,
-      23,    20,     0,    23,   140,    24,   142,    46,    17,    23,
-      23,     5,    20,    51,    23,     9,    24,   101,    47,    46,
-      47,   140,   106,   142,    44,    23,     0,   191,    20,   183,
-      44,    46,    24,     3,     4,     5,     6,     7,    20,     9,
-      20,   195,    24,    47,    24,    94,    44,    23,   199,    19,
-      29,    21,    22,    44,    45,    75,    18,    19,    20,    21,
-      22,    75,    75,    25,    26,    33,    34,    35,    36,    39,
-      40,    41,    39,    40,    44,    45,    30,    75,    48,    28,
-      50,    27,   102,    53,    54,   105,    47,   107,   102,   102,
-     110,   105,   105,   107,   107,    48,   110,    49,   120,   121,
-     122,   123,    37,    38,   102,    31,    32,   105,    46,   107,
-     130,    52,   110,    46,    47,    48,   130,   130,    47,   139,
-      41,    42,    43,   143,   144,   139,   139,    25,    26,   143,
-     144,   144,   130,    46,    47,    48,   156,    46,    47,   116,
-     117,   139,   156,   156,    52,   143,   144,   118,   119,   124,
-     125,   113,   114,   115,    48,    47,    49,    52,   156,    48,
-      23,    52,    52,   183,    49,   185,    52,    55,    49,   183,
-      49,   185,   185,    49,    44,   195,     3,     4,     5,     6,
-       7,   195,     9,    79,   126,   183,   129,   185,   127,    -1,
-      -1,   128,    19,    -1,    21,    22,    -1,   195,     3,     4,
-       5,     6,     7,   131,     9,    -1,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    -1,    21,    22,    -1,    -1,
-      -1,    48,    -1,    50,    -1,    -1,    53,    54,   190,    -1,
-      -1,    -1,    -1,    -1,    39,    40,    41,    -1,    -1,    44,
-      45,    -1,    -1,    48,    -1,    50,    -1,    -1,    53,    54,
-       3,     4,     5,     6,     7,    -1,     9,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,     5,    -1,    19,    -1,    21,    22,
-      11,    12,    13,    14,    15,    16,    17,    18,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    39,    40,    41,    -1,
-      -1,    44,    45,    -1,    -1,    48,    -1,    50,    -1,    52,
-      53,    54,     3,     4,     5,     6,     7,    -1,     9,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    -1,
-      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,
-      41,    -1,    -1,    44,    45,    -1,    -1,    48,    -1,    50,
-      -1,    -1,    53,    54
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,     3,     4,     5,     6,     7,     9,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    21,    22,    39,    40,
-      41,    44,    45,    48,    50,    53,    54,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    68,    69,    70,    71,
-      72,    73,    74,    75,    76,    78,    81,    86,    87,    88,
-      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,    46,    47,    46,     5,    62,    66,
-      67,    69,    72,     9,    19,    69,    86,    90,    94,    94,
-      94,    94,    94,    62,    69,   113,    94,    94,     0,    47,
-      84,    46,    47,    48,    84,    23,    46,    47,    79,   113,
-      89,    44,    45,    41,    42,    43,    39,    40,    37,    38,
-      33,    34,    35,    36,    31,    32,    30,    29,    28,    27,
-      25,    26,    20,    24,     5,     9,    71,   113,    71,    47,
-      82,    83,    82,    48,    47,    84,    85,    84,    49,    52,
-      47,    71,   113,   113,    71,   113,    23,    51,    77,    79,
-      80,    94,    94,    94,    99,    99,   100,   100,   101,   101,
-     101,   101,   102,   102,   103,   104,   105,   106,   113,   107,
-     109,   109,    52,    48,   113,    47,    83,    85,    85,    80,
-      49,    49,    97,    52,    52,    48,    52,   113,    49,    55,
-      80,    52,    49,    94,    97,    80,   109,    49,    49
-};
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;							\
-    }								\
-while (YYID (0))
-
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
-do {									  \
-  if (yydebug)								  \
-    {									  \
-      YYFPRINTF (stderr, "%s ", Title);					  \
-      yy_symbol_print (stderr,						  \
-		  Type, Value); \
-      YYFPRINTF (stderr, "\n");						  \
-    }									  \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (!yyvaluep)
-    return;
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-	     yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-	switch (*++yyp)
-	  {
-	  case '\'':
-	  case ',':
-	    goto do_not_strip_quotes;
-
-	  case '\\':
-	    if (*++yyp != '\\')
-	      goto do_not_strip_quotes;
-	    /* Fall through.  */
-	  default:
-	    if (yyres)
-	      yyres[yyn] = *yyp;
-	    yyn++;
-	    break;
-
-	  case '"':
-	    if (yyres)
-	      yyres[yyn] = '\0';
-	    return yyn;
-	  }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  YYUSE (yyvaluep);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
-}
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to xreallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to xreallocate the stack.  Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	yytype_int16 *yyss1 = yyss;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow (YY_("memory exhausted"),
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	yytype_int16 *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 4:
-
-/* Line 1455 of yacc.c  */
-#line 222 "jv-exp.y"
-    {
-		  write_exp_elt_opcode (pstate, OP_TYPE);
-		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
-		  write_exp_elt_opcode (pstate, OP_TYPE);
-		}
-    break;
-
-  case 7:
-
-/* Line 1455 of yacc.c  */
-#line 236 "jv-exp.y"
-    {
-		  write_exp_elt_opcode (pstate, OP_STRING);
-		  write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
-		  write_exp_elt_opcode (pstate, OP_STRING);
-		}
-    break;
-
-  case 8:
-
-/* Line 1455 of yacc.c  */
-#line 245 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
-		  write_exp_elt_longcst (pstate, (LONGEST)((yyvsp[(1) - (1)].typed_val_int).val));
-		  write_exp_elt_opcode (pstate, OP_LONG); }
-    break;
-
-  case 9:
-
-/* Line 1455 of yacc.c  */
-#line 250 "jv-exp.y"
-    { YYSTYPE val;
-		  parse_number (pstate, (yyvsp[(1) - (1)].sval).ptr, (yyvsp[(1) - (1)].sval).length, 0, &val);
-		  write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate, val.typed_val_int.type);
-		  write_exp_elt_longcst (pstate,
-					 (LONGEST) val.typed_val_int.val);
-		  write_exp_elt_opcode (pstate, OP_LONG);
-		}
-    break;
-
-  case 10:
-
-/* Line 1455 of yacc.c  */
-#line 259 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, OP_DOUBLE);
-		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
-		  write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
-		  write_exp_elt_opcode (pstate, OP_DOUBLE); }
-    break;
-
-  case 11:
-
-/* Line 1455 of yacc.c  */
-#line 264 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate,
-				  parse_java_type (pstate)->builtin_boolean);
-		  write_exp_elt_longcst (pstate, (LONGEST)(yyvsp[(1) - (1)].lval));
-		  write_exp_elt_opcode (pstate, OP_LONG); }
-    break;
-
-  case 14:
-
-/* Line 1455 of yacc.c  */
-#line 282 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_boolean; }
-    break;
-
-  case 17:
-
-/* Line 1455 of yacc.c  */
-#line 292 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_byte; }
-    break;
-
-  case 18:
-
-/* Line 1455 of yacc.c  */
-#line 294 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_short; }
-    break;
-
-  case 19:
-
-/* Line 1455 of yacc.c  */
-#line 296 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_int; }
-    break;
-
-  case 20:
-
-/* Line 1455 of yacc.c  */
-#line 298 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_long; }
-    break;
-
-  case 21:
-
-/* Line 1455 of yacc.c  */
-#line 300 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_char; }
-    break;
-
-  case 22:
-
-/* Line 1455 of yacc.c  */
-#line 305 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_float; }
-    break;
-
-  case 23:
-
-/* Line 1455 of yacc.c  */
-#line 307 "jv-exp.y"
-    { (yyval.tval) = parse_java_type (pstate)->builtin_double; }
-    break;
-
-  case 24:
-
-/* Line 1455 of yacc.c  */
-#line 319 "jv-exp.y"
-    { (yyval.tval) = java_type_from_name ((yyvsp[(1) - (1)].sval)); }
-    break;
-
-  case 26:
-
-/* Line 1455 of yacc.c  */
-#line 328 "jv-exp.y"
-    { (yyval.tval) = java_array_type ((yyvsp[(1) - (2)].tval), (yyvsp[(2) - (2)].lval)); }
-    break;
-
-  case 27:
-
-/* Line 1455 of yacc.c  */
-#line 330 "jv-exp.y"
-    { (yyval.tval) = java_array_type (java_type_from_name ((yyvsp[(1) - (2)].sval)), (yyvsp[(2) - (2)].lval)); }
-    break;
-
-  case 34:
-
-/* Line 1455 of yacc.c  */
-#line 350 "jv-exp.y"
-    { (yyval.sval).length = (yyvsp[(1) - (3)].sval).length + (yyvsp[(3) - (3)].sval).length + 1;
-		  if ((yyvsp[(1) - (3)].sval).ptr + (yyvsp[(1) - (3)].sval).length + 1 == (yyvsp[(3) - (3)].sval).ptr
-		      && (yyvsp[(1) - (3)].sval).ptr[(yyvsp[(1) - (3)].sval).length] == '.')
-		    (yyval.sval).ptr = (yyvsp[(1) - (3)].sval).ptr;  /* Optimization.  */
-		  else
-		    {
-		      char *buf;
-
-		      buf = xmalloc ((yyval.sval).length + 1);
-		      make_cleanup (xfree, buf);
-		      sprintf (buf, "%.*s.%.*s",
-			       (yyvsp[(1) - (3)].sval).length, (yyvsp[(1) - (3)].sval).ptr, (yyvsp[(3) - (3)].sval).length, (yyvsp[(3) - (3)].sval).ptr);
-		      (yyval.sval).ptr = buf;
-		} }
-    break;
-
-  case 36:
-
-/* Line 1455 of yacc.c  */
-#line 377 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_COMMA); }
-    break;
-
-  case 45:
-
-/* Line 1455 of yacc.c  */
-#line 393 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, OP_ARRAY);
-		  write_exp_elt_longcst (pstate, (LONGEST) 0);
-		  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(3) - (3)].lval));
-		  write_exp_elt_opcode (pstate, OP_ARRAY); }
-    break;
-
-  case 46:
-
-/* Line 1455 of yacc.c  */
-#line 401 "jv-exp.y"
-    { start_arglist (); }
-    break;
-
-  case 47:
-
-/* Line 1455 of yacc.c  */
-#line 406 "jv-exp.y"
-    { (yyval.lval) = end_arglist () - 1; }
-    break;
-
-  case 48:
-
-/* Line 1455 of yacc.c  */
-#line 411 "jv-exp.y"
-    { internal_error (__FILE__, __LINE__,
-				  _("FIXME - ClassInstanceCreationExpression")); }
-    break;
-
-  case 49:
-
-/* Line 1455 of yacc.c  */
-#line 417 "jv-exp.y"
-    { arglist_len = 1; }
-    break;
-
-  case 50:
-
-/* Line 1455 of yacc.c  */
-#line 419 "jv-exp.y"
-    { arglist_len++; }
-    break;
-
-  case 51:
-
-/* Line 1455 of yacc.c  */
-#line 424 "jv-exp.y"
-    { arglist_len = 0; }
-    break;
-
-  case 53:
-
-/* Line 1455 of yacc.c  */
-#line 430 "jv-exp.y"
-    { internal_error (__FILE__, __LINE__,
-				  _("FIXME - ArrayCreationExpression")); }
-    break;
-
-  case 54:
-
-/* Line 1455 of yacc.c  */
-#line 433 "jv-exp.y"
-    { internal_error (__FILE__, __LINE__,
-				  _("FIXME - ArrayCreationExpression")); }
-    break;
-
-  case 58:
-
-/* Line 1455 of yacc.c  */
-#line 448 "jv-exp.y"
-    { (yyval.lval) = 1; }
-    break;
-
-  case 59:
-
-/* Line 1455 of yacc.c  */
-#line 450 "jv-exp.y"
-    { (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1; }
-    break;
-
-  case 61:
-
-/* Line 1455 of yacc.c  */
-#line 456 "jv-exp.y"
-    { (yyval.lval) = 0; }
-    break;
-
-  case 62:
-
-/* Line 1455 of yacc.c  */
-#line 461 "jv-exp.y"
-    { push_fieldnames (pstate, (yyvsp[(3) - (3)].sval)); }
-    break;
-
-  case 63:
-
-/* Line 1455 of yacc.c  */
-#line 463 "jv-exp.y"
-    { push_fieldnames (pstate, (yyvsp[(3) - (3)].sval)); }
-    break;
-
-  case 64:
-
-/* Line 1455 of yacc.c  */
-#line 469 "jv-exp.y"
-    { push_expression_name (pstate, (yyvsp[(1) - (2)].sval)); }
-    break;
-
-  case 65:
-
-/* Line 1455 of yacc.c  */
-#line 474 "jv-exp.y"
-    { start_arglist(); }
-    break;
-
-  case 66:
-
-/* Line 1455 of yacc.c  */
-#line 476 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, OP_FUNCALL);
-		  write_exp_elt_longcst (pstate, (LONGEST) end_arglist ());
-		  write_exp_elt_opcode (pstate, OP_FUNCALL); }
-    break;
-
-  case 67:
-
-/* Line 1455 of yacc.c  */
-#line 480 "jv-exp.y"
-    { error (_("Form of method invocation not implemented")); }
-    break;
-
-  case 68:
-
-/* Line 1455 of yacc.c  */
-#line 482 "jv-exp.y"
-    { error (_("Form of method invocation not implemented")); }
-    break;
-
-  case 69:
-
-/* Line 1455 of yacc.c  */
-#line 487 "jv-exp.y"
-    {
-                  /* Emit code for the Name now, then exchange it in the
-		     expout array with the Expression's code.  We could
-		     introduce a OP_SWAP code or a reversed version of
-		     BINOP_SUBSCRIPT, but that makes the rest of GDB pay
-		     for our parsing kludges.  */
-		  struct expression *name_expr;
-
-		  push_expression_name (pstate, (yyvsp[(1) - (4)].sval));
-		  name_expr = copy_exp (pstate->expout, pstate->expout_ptr);
-		  pstate->expout_ptr -= name_expr->nelts;
-		  insert_exp (pstate,
-			      pstate->expout_ptr
-			      - length_of_subexp (pstate->expout,
-						  pstate->expout_ptr),
-			      name_expr);
-		  xfree (name_expr);
-		  write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT);
-		}
-    break;
-
-  case 70:
-
-/* Line 1455 of yacc.c  */
-#line 507 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
-    break;
-
-  case 71:
-
-/* Line 1455 of yacc.c  */
-#line 509 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
-    break;
-
-  case 73:
-
-/* Line 1455 of yacc.c  */
-#line 515 "jv-exp.y"
-    { push_expression_name (pstate, (yyvsp[(1) - (1)].sval)); }
-    break;
-
-  case 77:
-
-/* Line 1455 of yacc.c  */
-#line 524 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
-    break;
-
-  case 78:
-
-/* Line 1455 of yacc.c  */
-#line 529 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
-    break;
-
-  case 82:
-
-/* Line 1455 of yacc.c  */
-#line 537 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_NEG); }
-    break;
-
-  case 83:
-
-/* Line 1455 of yacc.c  */
-#line 539 "jv-exp.y"
-    { write_exp_elt_opcode (pstate,
-					UNOP_IND); }
-    break;
-
-  case 85:
-
-/* Line 1455 of yacc.c  */
-#line 546 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
-    break;
-
-  case 86:
-
-/* Line 1455 of yacc.c  */
-#line 551 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
-    break;
-
-  case 88:
-
-/* Line 1455 of yacc.c  */
-#line 557 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
-    break;
-
-  case 89:
-
-/* Line 1455 of yacc.c  */
-#line 559 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
-    break;
-
-  case 91:
-
-/* Line 1455 of yacc.c  */
-#line 565 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, java_array_type ((yyvsp[(2) - (5)].tval), (yyvsp[(3) - (5)].lval)));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
-    break;
-
-  case 92:
-
-/* Line 1455 of yacc.c  */
-#line 569 "jv-exp.y"
-    {
-		  int last_exp_size = length_of_subexp (pstate->expout,
-							pstate->expout_ptr);
-		  struct type *type;
-		  int i;
-		  int base = pstate->expout_ptr - last_exp_size - 3;
-
-		  if (base < 0
-		      || pstate->expout->elts[base+2].opcode != OP_TYPE)
-		    error (_("Invalid cast expression"));
-		  type = pstate->expout->elts[base+1].type;
-		  /* Remove the 'Expression' and slide the
-		     UnaryExpressionNotPlusMinus down to replace it.  */
-		  for (i = 0;  i < last_exp_size;  i++)
-		    pstate->expout->elts[base + i]
-		      = pstate->expout->elts[base + i + 3];
-		  pstate->expout_ptr -= 3;
-		  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
-		    type = lookup_pointer_type (type);
-		  write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, type);
-		  write_exp_elt_opcode (pstate, UNOP_CAST);
-		}
-    break;
-
-  case 93:
-
-/* Line 1455 of yacc.c  */
-#line 593 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate,
-				      java_array_type (java_type_from_name
-						       ((yyvsp[(2) - (5)].sval)), (yyvsp[(3) - (5)].lval)));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
-    break;
-
-  case 95:
-
-/* Line 1455 of yacc.c  */
-#line 604 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_MUL); }
-    break;
-
-  case 96:
-
-/* Line 1455 of yacc.c  */
-#line 606 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_DIV); }
-    break;
-
-  case 97:
-
-/* Line 1455 of yacc.c  */
-#line 608 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_REM); }
-    break;
-
-  case 99:
-
-/* Line 1455 of yacc.c  */
-#line 614 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_ADD); }
-    break;
-
-  case 100:
-
-/* Line 1455 of yacc.c  */
-#line 616 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_SUB); }
-    break;
-
-  case 102:
-
-/* Line 1455 of yacc.c  */
-#line 622 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_LSH); }
-    break;
-
-  case 103:
-
-/* Line 1455 of yacc.c  */
-#line 624 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_RSH); }
-    break;
-
-  case 105:
-
-/* Line 1455 of yacc.c  */
-#line 631 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_LESS); }
-    break;
-
-  case 106:
-
-/* Line 1455 of yacc.c  */
-#line 633 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_GTR); }
-    break;
-
-  case 107:
-
-/* Line 1455 of yacc.c  */
-#line 635 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_LEQ); }
-    break;
-
-  case 108:
-
-/* Line 1455 of yacc.c  */
-#line 637 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_GEQ); }
-    break;
-
-  case 110:
-
-/* Line 1455 of yacc.c  */
-#line 644 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
-    break;
-
-  case 111:
-
-/* Line 1455 of yacc.c  */
-#line 646 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
-    break;
-
-  case 113:
-
-/* Line 1455 of yacc.c  */
-#line 652 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
-    break;
-
-  case 115:
-
-/* Line 1455 of yacc.c  */
-#line 658 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
-    break;
-
-  case 117:
-
-/* Line 1455 of yacc.c  */
-#line 663 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
-    break;
-
-  case 119:
-
-/* Line 1455 of yacc.c  */
-#line 669 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
-    break;
-
-  case 121:
-
-/* Line 1455 of yacc.c  */
-#line 675 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
-    break;
-
-  case 123:
-
-/* Line 1455 of yacc.c  */
-#line 681 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, TERNOP_COND); }
-    break;
-
-  case 126:
-
-/* Line 1455 of yacc.c  */
-#line 691 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
-    break;
-
-  case 127:
-
-/* Line 1455 of yacc.c  */
-#line 693 "jv-exp.y"
-    { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
-		  write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
-		  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
-    break;
-
-  case 128:
-
-/* Line 1455 of yacc.c  */
-#line 700 "jv-exp.y"
-    { push_expression_name (pstate, (yyvsp[(1) - (1)].sval)); }
-    break;
-
-
-
-/* Line 1455 of yacc.c  */
-#line 2376 "jv-exp.c"
-      default: break;
-    }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
-#else
-      {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
-      }
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      if (yychar <= YYEOF)
-	{
-	  /* Return failure if at end of input.  */
-	  if (yychar == YYEOF)
-	    YYABORT;
-	}
-      else
-	{
-	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-
-      yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  *++yyvsp = yylval;
-
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-
-/* Line 1675 of yacc.c  */
-#line 712 "jv-exp.y"
-
-/* Take care of parsing a number (anything that starts with a digit).
-   Set yylval and return the token type; update lexptr.
-   LEN is the number of characters in it.  */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (struct parser_state *par_state,
-	      const char *p, int len, int parsed_float, YYSTYPE *putithere)
-{
-  ULONGEST n = 0;
-  ULONGEST limit, limit_div_base;
-
-  int c;
-  int base = input_radix;
-
-  struct type *type;
-
-  if (parsed_float)
-    {
-      const char *suffix;
-      int suffix_len;
-
-      if (! parse_float (p, len, &putithere->typed_val_float.dval, &suffix))
-	return ERROR;
-
-      suffix_len = p + len - suffix;
-
-      if (suffix_len == 0)
-	putithere->typed_val_float.type
-	  = parse_type (par_state)->builtin_double;
-      else if (suffix_len == 1)
-	{
-	  /* See if it has `f' or `d' suffix (float or double).  */
-	  if (tolower (*suffix) == 'f')
-	    putithere->typed_val_float.type =
-	      parse_type (par_state)->builtin_float;
-	  else if (tolower (*suffix) == 'd')
-	    putithere->typed_val_float.type =
-	      parse_type (par_state)->builtin_double;
-	  else
-	    return ERROR;
-	}
-      else
-	return ERROR;
-
-      return FLOATING_POINT_LITERAL;
-    }
-
-  /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
-  if (p[0] == '0')
-    switch (p[1])
-      {
-      case 'x':
-      case 'X':
-	if (len >= 3)
-	  {
-	    p += 2;
-	    base = 16;
-	    len -= 2;
-	  }
-	break;
-
-      case 't':
-      case 'T':
-      case 'd':
-      case 'D':
-	if (len >= 3)
-	  {
-	    p += 2;
-	    base = 10;
-	    len -= 2;
-	  }
-	break;
-
-      default:
-	base = 8;
-	break;
-      }
-
-  c = p[len-1];
-  /* A paranoid calculation of (1<<64)-1.  */
-  limit = (ULONGEST)0xffffffff;
-  limit = ((limit << 16) << 16) | limit;
-  if (c == 'l' || c == 'L')
-    {
-      type = parse_java_type (par_state)->builtin_long;
-      len--;
-    }
-  else
-    {
-      type = parse_java_type (par_state)->builtin_int;
-    }
-  limit_div_base = limit / (ULONGEST) base;
-
-  while (--len >= 0)
-    {
-      c = *p++;
-      if (c >= '0' && c <= '9')
-	c -= '0';
-      else if (c >= 'A' && c <= 'Z')
-	c -= 'A' - 10;
-      else if (c >= 'a' && c <= 'z')
-	c -= 'a' - 10;
-      else
-	return ERROR;	/* Char not a digit */
-      if (c >= base)
-	return ERROR;
-      if (n > limit_div_base
-	  || (n *= base) > limit - c)
-	error (_("Numeric constant too large"));
-      n += c;
-	}
-
-  /* If the type is bigger than a 32-bit signed integer can be, implicitly
-     promote to long.  Java does not do this, so mark it as
-     parse_type (par_state)->builtin_uint64 rather than
-     parse_java_type (par_state)->builtin_long.
-     0x80000000 will become -0x80000000 instead of 0x80000000L, because we
-     don't know the sign at this point.  */
-  if (type == parse_java_type (par_state)->builtin_int
-      && n > (ULONGEST)0x80000000)
-    type = parse_type (par_state)->builtin_uint64;
-
-  putithere->typed_val_int.val = n;
-  putithere->typed_val_int.type = type;
-
-  return INTEGER_LITERAL;
-}
-
-struct token
-{
-  char *oper;
-  int token;
-  enum exp_opcode opcode;
-};
-
-static const struct token tokentab3[] =
-  {
-    {">>=", ASSIGN_MODIFY, BINOP_RSH},
-    {"<<=", ASSIGN_MODIFY, BINOP_LSH}
-  };
-
-static const struct token tokentab2[] =
-  {
-    {"+=", ASSIGN_MODIFY, BINOP_ADD},
-    {"-=", ASSIGN_MODIFY, BINOP_SUB},
-    {"*=", ASSIGN_MODIFY, BINOP_MUL},
-    {"/=", ASSIGN_MODIFY, BINOP_DIV},
-    {"%=", ASSIGN_MODIFY, BINOP_REM},
-    {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR},
-    {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND},
-    {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR},
-    {"++", INCREMENT, BINOP_END},
-    {"--", DECREMENT, BINOP_END},
-    {"&&", ANDAND, BINOP_END},
-    {"||", OROR, BINOP_END},
-    {"<<", LSH, BINOP_END},
-    {">>", RSH, BINOP_END},
-    {"==", EQUAL, BINOP_END},
-    {"!=", NOTEQUAL, BINOP_END},
-    {"<=", LEQ, BINOP_END},
-    {">=", GEQ, BINOP_END}
-  };
-
-/* Read one token, getting characters through lexptr.  */
-
-static int
-yylex (void)
-{
-  int c;
-  int namelen;
-  unsigned int i;
-  const char *tokstart;
-  const char *tokptr;
-  int tempbufindex;
-  static char *tempbuf;
-  static int tempbufsize;
-  
- retry:
-
-  prev_lexptr = lexptr;
-
-  tokstart = lexptr;
-  /* See if it is a special token of length 3.  */
-  for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
-    if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
-      {
-	lexptr += 3;
-	yylval.opcode = tokentab3[i].opcode;
-	return tokentab3[i].token;
-      }
-
-  /* See if it is a special token of length 2.  */
-  for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
-    if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
-      {
-	lexptr += 2;
-	yylval.opcode = tokentab2[i].opcode;
-	return tokentab2[i].token;
-      }
-
-  switch (c = *tokstart)
-    {
-    case 0:
-      return 0;
-
-    case ' ':
-    case '\t':
-    case '\n':
-      lexptr++;
-      goto retry;
-
-    case '\'':
-      /* We either have a character constant ('0' or '\177' for example)
-	 or we have a quoted symbol reference ('foo(int,int)' in C++
-	 for example).  */
-      lexptr++;
-      c = *lexptr++;
-      if (c == '\\')
-	c = parse_escape (parse_gdbarch (pstate), &lexptr);
-      else if (c == '\'')
-	error (_("Empty character constant"));
-
-      yylval.typed_val_int.val = c;
-      yylval.typed_val_int.type = parse_java_type (pstate)->builtin_char;
-
-      c = *lexptr++;
-      if (c != '\'')
-	{
-	  namelen = skip_quoted (tokstart) - tokstart;
-	  if (namelen > 2)
-	    {
-	      lexptr = tokstart + namelen;
-	      if (lexptr[-1] != '\'')
-		error (_("Unmatched single quote"));
-	      namelen -= 2;
-	      tokstart++;
-	      goto tryname;
-	    }
-	  error (_("Invalid character constant"));
-	}
-      return INTEGER_LITERAL;
-
-    case '(':
-      paren_depth++;
-      lexptr++;
-      return c;
-
-    case ')':
-      if (paren_depth == 0)
-	return 0;
-      paren_depth--;
-      lexptr++;
-      return c;
-
-    case ',':
-      if (comma_terminates && paren_depth == 0)
-	return 0;
-      lexptr++;
-      return c;
-
-    case '.':
-      /* Might be a floating point number.  */
-      if (lexptr[1] < '0' || lexptr[1] > '9')
-	goto symbol;		/* Nope, must be a symbol.  */
-      /* FALL THRU into number case.  */
-
-    case '0':
-    case '1':
-    case '2':
-    case '3':
-    case '4':
-    case '5':
-    case '6':
-    case '7':
-    case '8':
-    case '9':
-      {
-	/* It's a number.  */
-	int got_dot = 0, got_e = 0, toktype;
-	const char *p = tokstart;
-	int hex = input_radix > 10;
-
-	if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
-	  {
-	    p += 2;
-	    hex = 1;
-	  }
-	else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
-	  {
-	    p += 2;
-	    hex = 0;
-	  }
-
-	for (;; ++p)
-	  {
-	    /* This test includes !hex because 'e' is a valid hex digit
-	       and thus does not indicate a floating point number when
-	       the radix is hex.  */
-	    if (!hex && !got_e && (*p == 'e' || *p == 'E'))
-	      got_dot = got_e = 1;
-	    /* This test does not include !hex, because a '.' always indicates
-	       a decimal floating point number regardless of the radix.  */
-	    else if (!got_dot && *p == '.')
-	      got_dot = 1;
-	    else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
-		     && (*p == '-' || *p == '+'))
-	      /* This is the sign of the exponent, not the end of the
-		 number.  */
-	      continue;
-	    /* We will take any letters or digits.  parse_number will
-	       complain if past the radix, or if L or U are not final.  */
-	    else if ((*p < '0' || *p > '9')
-		     && ((*p < 'a' || *p > 'z')
-				  && (*p < 'A' || *p > 'Z')))
-	      break;
-	  }
-	toktype = parse_number (pstate, tokstart, p - tokstart,
-				got_dot|got_e, &yylval);
-        if (toktype == ERROR)
-	  {
-	    char *err_copy = (char *) alloca (p - tokstart + 1);
-
-	    memcpy (err_copy, tokstart, p - tokstart);
-	    err_copy[p - tokstart] = 0;
-	    error (_("Invalid number \"%s\""), err_copy);
-	  }
-	lexptr = p;
-	return toktype;
-      }
-
-    case '+':
-    case '-':
-    case '*':
-    case '/':
-    case '%':
-    case '|':
-    case '&':
-    case '^':
-    case '~':
-    case '!':
-    case '<':
-    case '>':
-    case '[':
-    case ']':
-    case '?':
-    case ':':
-    case '=':
-    case '{':
-    case '}':
-    symbol:
-      lexptr++;
-      return c;
-
-    case '"':
-
-      /* Build the gdb internal form of the input string in tempbuf,
-	 translating any standard C escape forms seen.  Note that the
-	 buffer is null byte terminated *only* for the convenience of
-	 debugging gdb itself and printing the buffer contents when
-	 the buffer contains no embedded nulls.  Gdb does not depend
-	 upon the buffer being null byte terminated, it uses the length
-	 string instead.  This allows gdb to handle C strings (as well
-	 as strings in other languages) with embedded null bytes */
-
-      tokptr = ++tokstart;
-      tempbufindex = 0;
-
-      do {
-	/* Grow the static temp buffer if necessary, including allocating
-	   the first one on demand.  */
-	if (tempbufindex + 1 >= tempbufsize)
-	  {
-	    tempbuf = (char *) xrealloc (tempbuf, tempbufsize += 64);
-	  }
-	switch (*tokptr)
-	  {
-	  case '\0':
-	  case '"':
-	    /* Do nothing, loop will terminate.  */
-	    break;
-	  case '\\':
-	    tokptr++;
-	    c = parse_escape (parse_gdbarch (pstate), &tokptr);
-	    if (c == -1)
-	      {
-		continue;
-	      }
-	    tempbuf[tempbufindex++] = c;
-	    break;
-	  default:
-	    tempbuf[tempbufindex++] = *tokptr++;
-	    break;
-	  }
-      } while ((*tokptr != '"') && (*tokptr != '\0'));
-      if (*tokptr++ != '"')
-	{
-	  error (_("Unterminated string in expression"));
-	}
-      tempbuf[tempbufindex] = '\0';	/* See note above */
-      yylval.sval.ptr = tempbuf;
-      yylval.sval.length = tempbufindex;
-      lexptr = tokptr;
-      return (STRING_LITERAL);
-    }
-
-  if (!(c == '_' || c == '$'
-	|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
-    /* We must have come across a bad character (e.g. ';').  */
-    error (_("Invalid character '%c' in expression"), c);
-
-  /* It's a name.  See how long it is.  */
-  namelen = 0;
-  for (c = tokstart[namelen];
-       (c == '_'
-	|| c == '$'
-	|| (c >= '0' && c <= '9')
-	|| (c >= 'a' && c <= 'z')
-	|| (c >= 'A' && c <= 'Z')
-	|| c == '<');
-       )
-    {
-      if (c == '<')
-	{
-	  int i = namelen;
-	  while (tokstart[++i] && tokstart[i] != '>');
-	  if (tokstart[i] == '>')
-	    namelen = i;
-	}
-       c = tokstart[++namelen];
-     }
-
-  /* The token "if" terminates the expression and is NOT 
-     removed from the input stream.  */
-  if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
-    {
-      return 0;
-    }
-
-  lexptr += namelen;
-
-  tryname:
-
-  /* Catch specific keywords.  Should be done with a data structure.  */
-  switch (namelen)
-    {
-    case 7:
-      if (strncmp (tokstart, "boolean", 7) == 0)
-	return BOOLEAN;
-      break;
-    case 6:
-      if (strncmp (tokstart, "double", 6) == 0)      
-	return DOUBLE;
-      break;
-    case 5:
-      if (strncmp (tokstart, "short", 5) == 0)
-	return SHORT;
-      if (strncmp (tokstart, "false", 5) == 0)
-	{
-	  yylval.lval = 0;
-	  return BOOLEAN_LITERAL;
-	}
-      if (strncmp (tokstart, "super", 5) == 0)
-	return SUPER;
-      if (strncmp (tokstart, "float", 5) == 0)
-	return FLOAT;
-      break;
-    case 4:
-      if (strncmp (tokstart, "long", 4) == 0)
-	return LONG;
-      if (strncmp (tokstart, "byte", 4) == 0)
-	return BYTE;
-      if (strncmp (tokstart, "char", 4) == 0)
-	return CHAR;
-      if (strncmp (tokstart, "true", 4) == 0)
-	{
-	  yylval.lval = 1;
-	  return BOOLEAN_LITERAL;
-	}
-      break;
-    case 3:
-      if (strncmp (tokstart, "int", 3) == 0)
-	return INT;
-      if (strncmp (tokstart, "new", 3) == 0)
-	return NEW;
-      break;
-    default:
-      break;
-    }
-
-  yylval.sval.ptr = tokstart;
-  yylval.sval.length = namelen;
-
-  if (*tokstart == '$')
-    {
-      write_dollar_variable (pstate, yylval.sval);
-      return VARIABLE;
-    }
-
-  /* Input names that aren't symbols but ARE valid hex numbers,
-     when the input radix permits them, can be names or numbers
-     depending on the parse.  Note we support radixes > 16 here.  */
-  if (((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
-       (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
-    {
-      YYSTYPE newlval;	/* Its value is ignored.  */
-      int hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
-      if (hextype == INTEGER_LITERAL)
-	return NAME_OR_INT;
-    }
-  return IDENTIFIER;
-}
-
-int
-java_parse (struct parser_state *par_state)
-{
-  int result;
-  struct cleanup *c = make_cleanup_clear_parser_state (&pstate);
-
-  /* Setting up the parser state.  */
-  gdb_assert (par_state != NULL);
-  pstate = par_state;
-
-  result = yyparse ();
-  do_cleanups (c);
-
-  return result;
-}
-
-void
-yyerror (char *msg)
-{
-  if (prev_lexptr)
-    lexptr = prev_lexptr;
-
-  if (msg)
-    error (_("%s: near `%s'"), msg, lexptr);
-  else
-    error (_("error in expression, near `%s'"), lexptr);
-}
-
-static struct type *
-java_type_from_name (struct stoken name)
-{
-  char *tmp = copy_name (name);
-  struct type *typ = java_lookup_class (tmp);
-  if (typ == NULL || TYPE_CODE (typ) != TYPE_CODE_STRUCT)
-    error (_("No class named `%s'"), tmp);
-  return typ;
-}
-
-/* If NAME is a valid variable name in this scope, push it and return 1.
-   Otherwise, return 0.  */
-
-static int
-push_variable (struct parser_state *par_state, struct stoken name)
-{
-  char *tmp = copy_name (name);
-  struct field_of_this_result is_a_field_of_this;
-  struct symbol *sym;
-
-  sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN,
-		       &is_a_field_of_this);
-  if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-    {
-      if (symbol_read_needs_frame (sym))
-	{
-	  if (innermost_block == 0 ||
-	      contained_in (block_found, innermost_block))
-	    innermost_block = block_found;
-	}
-
-      write_exp_elt_opcode (par_state, OP_VAR_VALUE);
-      /* We want to use the selected frame, not another more inner frame
-	 which happens to be in the same block.  */
-      write_exp_elt_block (par_state, NULL);
-      write_exp_elt_sym (par_state, sym);
-      write_exp_elt_opcode (par_state, OP_VAR_VALUE);
-      return 1;
-    }
-  if (is_a_field_of_this.type != NULL)
-    {
-      /* it hangs off of `this'.  Must not inadvertently convert from a
-	 method call to data ref.  */
-      if (innermost_block == 0 || 
-	  contained_in (block_found, innermost_block))
-	innermost_block = block_found;
-      write_exp_elt_opcode (par_state, OP_THIS);
-      write_exp_elt_opcode (par_state, OP_THIS);
-      write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-      write_exp_string (par_state, name);
-      write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-      return 1;
-    }
-  return 0;
-}
-
-/* Assuming a reference expression has been pushed, emit the
-   STRUCTOP_PTR ops to access the field named NAME.  If NAME is a
-   qualified name (has '.'), generate a field access for each part.  */
-
-static void
-push_fieldnames (struct parser_state *par_state, struct stoken name)
-{
-  int i;
-  struct stoken token;
-  token.ptr = name.ptr;
-  for (i = 0;  ;  i++)
-    {
-      if (i == name.length || name.ptr[i] == '.')
-	{
-	  /* token.ptr is start of current field name.  */
-	  token.length = &name.ptr[i] - token.ptr;
-	  write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-	  write_exp_string (par_state, token);
-	  write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-	  token.ptr += token.length + 1;
-	}
-      if (i >= name.length)
-	break;
-    }
-}
-
-/* Helper routine for push_expression_name.
-   Handle a qualified name, where DOT_INDEX is the index of the first '.' */
-
-static void
-push_qualified_expression_name (struct parser_state *par_state,
-				struct stoken name, int dot_index)
-{
-  struct stoken token;
-  char *tmp;
-  struct type *typ;
-
-  token.ptr = name.ptr;
-  token.length = dot_index;
-
-  if (push_variable (par_state, token))
-    {
-      token.ptr = name.ptr + dot_index + 1;
-      token.length = name.length - dot_index - 1;
-      push_fieldnames (par_state, token);
-      return;
-    }
-
-  token.ptr = name.ptr;
-  for (;;)
-    {
-      token.length = dot_index;
-      tmp = copy_name (token);
-      typ = java_lookup_class (tmp);
-      if (typ != NULL)
-	{
-	  if (dot_index == name.length)
-	    {
-	      write_exp_elt_opcode (par_state, OP_TYPE);
-	      write_exp_elt_type (par_state, typ);
-	      write_exp_elt_opcode (par_state, OP_TYPE);
-	      return;
-	    }
-	  dot_index++;  /* Skip '.' */
-	  name.ptr += dot_index;
-	  name.length -= dot_index;
-	  dot_index = 0;
-	  while (dot_index < name.length && name.ptr[dot_index] != '.') 
-	    dot_index++;
-	  token.ptr = name.ptr;
-	  token.length = dot_index;
-	  write_exp_elt_opcode (par_state, OP_SCOPE);
-	  write_exp_elt_type (par_state, typ);
-	  write_exp_string (par_state, token);
-	  write_exp_elt_opcode (par_state, OP_SCOPE); 
-	  if (dot_index < name.length)
-	    {
-	      dot_index++;
-	      name.ptr += dot_index;
-	      name.length -= dot_index;
-	      push_fieldnames (par_state, name);
-	    }
-	  return;
-	}
-      else if (dot_index >= name.length)
-	break;
-      dot_index++;  /* Skip '.' */
-      while (dot_index < name.length && name.ptr[dot_index] != '.')
-	dot_index++;
-    }
-  error (_("unknown type `%.*s'"), name.length, name.ptr);
-}
-
-/* Handle Name in an expression (or LHS).
-   Handle VAR, TYPE, TYPE.FIELD1....FIELDN and VAR.FIELD1....FIELDN.  */
-
-static void
-push_expression_name (struct parser_state *par_state, struct stoken name)
-{
-  char *tmp;
-  struct type *typ;
-  int i;
-
-  for (i = 0;  i < name.length;  i++)
-    {
-      if (name.ptr[i] == '.')
-	{
-	  /* It's a Qualified Expression Name.  */
-	  push_qualified_expression_name (par_state, name, i);
-	  return;
-	}
-    }
-
-  /* It's a Simple Expression Name.  */
-  
-  if (push_variable (par_state, name))
-    return;
-  tmp = copy_name (name);
-  typ = java_lookup_class (tmp);
-  if (typ != NULL)
-    {
-      write_exp_elt_opcode (par_state, OP_TYPE);
-      write_exp_elt_type (par_state, typ);
-      write_exp_elt_opcode (par_state, OP_TYPE);
-    }
-  else
-    {
-      struct bound_minimal_symbol msymbol;
-
-      msymbol = lookup_bound_minimal_symbol (tmp);
-      if (msymbol.minsym != NULL)
-	write_exp_msymbol (par_state, msymbol);
-      else if (!have_full_symbols () && !have_partial_symbols ())
-	error (_("No symbol table is loaded.  Use the \"file\" command"));
-      else
-	error (_("No symbol \"%s\" in current context."), tmp);
-    }
-
-}
-
-
-/* The following two routines, copy_exp and insert_exp, aren't specific to
-   Java, so they could go in parse.c, but their only purpose is to support
-   the parsing kludges we use in this file, so maybe it's best to isolate
-   them here.  */
-
-/* Copy the expression whose last element is at index ENDPOS - 1 in EXPR
-   into a freshly xmalloc'ed struct expression.  Its language_defn is set
-   to null.  */
-static struct expression *
-copy_exp (struct expression *expr, int endpos)
-{
-  int len = length_of_subexp (expr, endpos);
-  struct expression *newobj
-    = (struct expression *) xmalloc (sizeof (*newobj) + EXP_ELEM_TO_BYTES (len));
-
-  newobj->nelts = len;
-  memcpy (newobj->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len));
-  newobj->language_defn = 0;
-
-  return newobj;
-}
-
-/* Insert the expression NEW into the current expression (expout) at POS.  */
-static void
-insert_exp (struct parser_state *par_state, int pos, struct expression *newobj)
-{
-  int newlen = newobj->nelts;
-  int i;
-
-  /* Grow expout if necessary.  In this function's only use at present,
-     this should never be necessary.  */
-  increase_expout_size (par_state, newlen);
-
-  for (i = par_state->expout_ptr - 1; i >= pos; i--)
-    par_state->expout->elts[i + newlen] = par_state->expout->elts[i];
-  
-  memcpy (par_state->expout->elts + pos, newobj->elts,
-	  EXP_ELEM_TO_BYTES (newlen));
-  par_state->expout_ptr += newlen;
-}
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-exp.y ./gdb/jv-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-exp.y	1970-01-01 00:00:00.000000000 +0000
@@ -1,1491 +0,0 @@
-/* YACC parser for Java expressions, for GDB.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Parse a Java expression from text in a string,
-   and return the result as a  struct expression  pointer.
-   That structure contains arithmetic operations in reverse polish,
-   with constants represented by operations that are followed by special data.
-   See expression.h for the details of the format.
-   What is important here is that it can be built up sequentially
-   during the process of parsing; the lower levels of the tree always
-   come first in the result.  Well, almost always; see ArrayAccess.
-
-   Note that malloc's and realloc's in this file are transformed to
-   xmalloc and xrealloc respectively by the same sed command in the
-   makefile that remaps any other malloc/realloc inserted by the parser
-   generator.  Doing this with #defines and trying to control the interaction
-   with include files (<malloc.h> and <stdlib.h> for example) just became
-   too messy, particularly when such includes can be inserted at random
-   times by the parser generator.  */
-  
-%{
-
-#include "defs.h"
-#include <ctype.h>
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "jv-lang.h"
-#include "bfd.h" /* Required by objfiles.h.  */
-#include "symfile.h" /* Required by objfiles.h.  */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-#include "block.h"
-#include "completer.h"
-
-#define parse_type(ps) builtin_type (parse_gdbarch (ps))
-#define parse_java_type(ps) builtin_java_type (parse_gdbarch (ps))
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth java_maxdepth
-#define	yyparse	java_parse_internal
-#define	yylex	java_lex
-#define	yyerror	java_error
-#define	yylval	java_lval
-#define	yychar	java_char
-#define	yydebug	java_debug
-#define	yypact	java_pact	
-#define	yyr1	java_r1			
-#define	yyr2	java_r2			
-#define	yydef	java_def		
-#define	yychk	java_chk		
-#define	yypgo	java_pgo		
-#define	yyact	java_act		
-#define	yyexca	java_exca
-#define yyerrflag java_errflag
-#define yynerrs	java_nerrs
-#define	yyps	java_ps
-#define	yypv	java_pv
-#define	yys	java_s
-#define	yy_yys	java_yys
-#define	yystate	java_state
-#define	yytmp	java_tmp
-#define	yyv	java_v
-#define	yy_yyv	java_yyv
-#define	yyval	java_val
-#define	yylloc	java_lloc
-#define yyreds	java_reds		/* With YYDEBUG defined */
-#define yytoks	java_toks		/* With YYDEBUG defined */
-#define yyname	java_name		/* With YYDEBUG defined */
-#define yyrule	java_rule		/* With YYDEBUG defined */
-#define yylhs	java_yylhs
-#define yylen	java_yylen
-#define yydefred java_yydefred
-#define yydgoto	java_yydgoto
-#define yysindex java_yysindex
-#define yyrindex java_yyrindex
-#define yygindex java_yygindex
-#define yytable	 java_yytable
-#define yycheck	 java_yycheck
-#define yyss	java_yyss
-#define yysslim	java_yysslim
-#define yyssp	java_yyssp
-#define yystacksize java_yystacksize
-#define yyvs	java_yyvs
-#define yyvsp	java_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
-
-/* The state of the parser, used internally when we are parsing the
-   expression.  */
-
-static struct parser_state *pstate = NULL;
-
-int yyparse (void);
-
-static int yylex (void);
-
-void yyerror (char *);
-
-static struct type *java_type_from_name (struct stoken);
-static void push_expression_name (struct parser_state *, struct stoken);
-static void push_fieldnames (struct parser_state *, struct stoken);
-
-static struct expression *copy_exp (struct expression *, int);
-static void insert_exp (struct parser_state *, int, struct expression *);
-
-%}
-
-/* Although the yacc "value" of an expression is not used,
-   since the result is stored in the structure being created,
-   other node types do have values.  */
-
-%union
-  {
-    LONGEST lval;
-    struct {
-      LONGEST val;
-      struct type *type;
-    } typed_val_int;
-    struct {
-      DOUBLEST dval;
-      struct type *type;
-    } typed_val_float;
-    struct symbol *sym;
-    struct type *tval;
-    struct stoken sval;
-    struct ttype tsym;
-    struct symtoken ssym;
-    struct block *bval;
-    enum exp_opcode opcode;
-    struct internalvar *ivar;
-    int *ivec;
-  }
-
-%{
-/* YYSTYPE gets defined by %union */
-static int parse_number (struct parser_state *, const char *, int,
-			 int, YYSTYPE *);
-%}
-
-%type <lval> rcurly Dims Dims_opt
-%type <tval> ClassOrInterfaceType ClassType /* ReferenceType Type ArrayType */
-%type <tval> IntegralType FloatingPointType NumericType PrimitiveType ArrayType PrimitiveOrArrayType
-
-%token <typed_val_int> INTEGER_LITERAL
-%token <typed_val_float> FLOATING_POINT_LITERAL
-
-%token <sval> IDENTIFIER
-%token <sval> STRING_LITERAL
-%token <lval> BOOLEAN_LITERAL
-%token <tsym> TYPENAME
-%type <sval> Name SimpleName QualifiedName ForcedName
-
-/* A NAME_OR_INT is a symbol which is not known in the symbol table,
-   but which would parse as a valid number in the current input radix.
-   E.g. "c" when input_radix==16.  Depending on the parse, it will be
-   turned into a name or into a number.  */
-
-%token <sval> NAME_OR_INT 
-
-%token ERROR
-
-/* Special type cases, put in to allow the parser to distinguish different
-   legal basetypes.  */
-%token LONG SHORT BYTE INT CHAR BOOLEAN DOUBLE FLOAT
-
-%token VARIABLE
-
-%token <opcode> ASSIGN_MODIFY
-
-%token SUPER NEW
-
-%left ','
-%right '=' ASSIGN_MODIFY
-%right '?'
-%left OROR
-%left ANDAND
-%left '|'
-%left '^'
-%left '&'
-%left EQUAL NOTEQUAL
-%left '<' '>' LEQ GEQ
-%left LSH RSH
-%left '+' '-'
-%left '*' '/' '%'
-%right INCREMENT DECREMENT
-%right '.' '[' '('
-
-
-%%
-
-start   :	exp1
-	|	type_exp
-	;
-
-type_exp:	PrimitiveOrArrayType
-		{
-		  write_exp_elt_opcode (pstate, OP_TYPE);
-		  write_exp_elt_type (pstate, $1);
-		  write_exp_elt_opcode (pstate, OP_TYPE);
-		}
-	;
-
-PrimitiveOrArrayType:
-		PrimitiveType
-	|	ArrayType
-	;
-
-StringLiteral:
-	STRING_LITERAL
-		{
-		  write_exp_elt_opcode (pstate, OP_STRING);
-		  write_exp_string (pstate, $1);
-		  write_exp_elt_opcode (pstate, OP_STRING);
-		}
-;
-
-Literal:
-	INTEGER_LITERAL
-		{ write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate, $1.type);
-		  write_exp_elt_longcst (pstate, (LONGEST)($1.val));
-		  write_exp_elt_opcode (pstate, OP_LONG); }
-|	NAME_OR_INT
-		{ YYSTYPE val;
-		  parse_number (pstate, $1.ptr, $1.length, 0, &val);
-		  write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate, val.typed_val_int.type);
-		  write_exp_elt_longcst (pstate,
-					 (LONGEST) val.typed_val_int.val);
-		  write_exp_elt_opcode (pstate, OP_LONG);
-		}
-|	FLOATING_POINT_LITERAL
-		{ write_exp_elt_opcode (pstate, OP_DOUBLE);
-		  write_exp_elt_type (pstate, $1.type);
-		  write_exp_elt_dblcst (pstate, $1.dval);
-		  write_exp_elt_opcode (pstate, OP_DOUBLE); }
-|	BOOLEAN_LITERAL
-		{ write_exp_elt_opcode (pstate, OP_LONG);
-		  write_exp_elt_type (pstate,
-				  parse_java_type (pstate)->builtin_boolean);
-		  write_exp_elt_longcst (pstate, (LONGEST)$1);
-		  write_exp_elt_opcode (pstate, OP_LONG); }
-|	StringLiteral
-	;
-
-/* UNUSED:
-Type:
-	PrimitiveType
-|	ReferenceType
-;
-*/
-
-PrimitiveType:
-	NumericType
-|	BOOLEAN
-		{ $$ = parse_java_type (pstate)->builtin_boolean; }
-;
-
-NumericType:
-	IntegralType
-|	FloatingPointType
-;
-
-IntegralType:
-	BYTE
-		{ $$ = parse_java_type (pstate)->builtin_byte; }
-|	SHORT
-		{ $$ = parse_java_type (pstate)->builtin_short; }
-|	INT
-		{ $$ = parse_java_type (pstate)->builtin_int; }
-|	LONG
-		{ $$ = parse_java_type (pstate)->builtin_long; }
-|	CHAR
-		{ $$ = parse_java_type (pstate)->builtin_char; }
-;
-
-FloatingPointType:
-	FLOAT
-		{ $$ = parse_java_type (pstate)->builtin_float; }
-|	DOUBLE
-		{ $$ = parse_java_type (pstate)->builtin_double; }
-;
-
-/* UNUSED:
-ReferenceType:
-	ClassOrInterfaceType
-|	ArrayType
-;
-*/
-
-ClassOrInterfaceType:
-	Name
-		{ $$ = java_type_from_name ($1); }
-;
-
-ClassType:
-	ClassOrInterfaceType
-;
-
-ArrayType:
-	PrimitiveType Dims
-		{ $$ = java_array_type ($1, $2); }
-|	Name Dims
-		{ $$ = java_array_type (java_type_from_name ($1), $2); }
-;
-
-Name:
-	IDENTIFIER
-|	QualifiedName
-;
-
-ForcedName:
-	SimpleName
-|	QualifiedName
-;
-
-SimpleName:
-	IDENTIFIER
-|	NAME_OR_INT
-;
-
-QualifiedName:
-	Name '.' SimpleName
-		{ $$.length = $1.length + $3.length + 1;
-		  if ($1.ptr + $1.length + 1 == $3.ptr
-		      && $1.ptr[$1.length] == '.')
-		    $$.ptr = $1.ptr;  /* Optimization.  */
-		  else
-		    {
-		      char *buf;
-
-		      buf = malloc ($$.length + 1);
-		      make_cleanup (free, buf);
-		      sprintf (buf, "%.*s.%.*s",
-			       $1.length, $1.ptr, $3.length, $3.ptr);
-		      $$.ptr = buf;
-		} }
-;
-
-/*
-type_exp:	type
-			{ write_exp_elt_opcode(OP_TYPE);
-			  write_exp_elt_type($1);
-			  write_exp_elt_opcode(OP_TYPE);}
-	;
-	*/
-
-/* Expressions, including the comma operator.  */
-exp1	:	Expression
-	|	exp1 ',' Expression
-			{ write_exp_elt_opcode (pstate, BINOP_COMMA); }
-	;
-
-Primary:
-	PrimaryNoNewArray
-|	ArrayCreationExpression
-;
-
-PrimaryNoNewArray:
-	Literal
-|	'(' Expression ')'
-|	ClassInstanceCreationExpression
-|	FieldAccess
-|	MethodInvocation
-|	ArrayAccess
-|	lcurly ArgumentList rcurly
-		{ write_exp_elt_opcode (pstate, OP_ARRAY);
-		  write_exp_elt_longcst (pstate, (LONGEST) 0);
-		  write_exp_elt_longcst (pstate, (LONGEST) $3);
-		  write_exp_elt_opcode (pstate, OP_ARRAY); }
-;
-
-lcurly:
-	'{'
-		{ start_arglist (); }
-;
-
-rcurly:
-	'}'
-		{ $$ = end_arglist () - 1; }
-;
-
-ClassInstanceCreationExpression:
-	NEW ClassType '(' ArgumentList_opt ')'
-		{ internal_error (__FILE__, __LINE__,
-				  _("FIXME - ClassInstanceCreationExpression")); }
-;
-
-ArgumentList:
-	Expression
-		{ arglist_len = 1; }
-|	ArgumentList ',' Expression
-		{ arglist_len++; }
-;
-
-ArgumentList_opt:
-	/* EMPTY */
-		{ arglist_len = 0; }
-| ArgumentList
-;
-
-ArrayCreationExpression:
-	NEW PrimitiveType DimExprs Dims_opt
-		{ internal_error (__FILE__, __LINE__,
-				  _("FIXME - ArrayCreationExpression")); }
-|	NEW ClassOrInterfaceType DimExprs Dims_opt
-		{ internal_error (__FILE__, __LINE__,
-				  _("FIXME - ArrayCreationExpression")); }
-;
-
-DimExprs:
-	DimExpr
-|	DimExprs DimExpr
-;
-
-DimExpr:
-	'[' Expression ']'
-;
-
-Dims:
-	'[' ']'
-		{ $$ = 1; }
-|	Dims '[' ']'
-	{ $$ = $1 + 1; }
-;
-
-Dims_opt:
-	Dims
-|	/* EMPTY */
-		{ $$ = 0; }
-;
-
-FieldAccess:
-	Primary '.' SimpleName
-		{ push_fieldnames (pstate, $3); }
-|	VARIABLE '.' SimpleName
-		{ push_fieldnames (pstate, $3); }
-/*|	SUPER '.' SimpleName { FIXME } */
-;
-
-FuncStart:
-	Name '('
-                { push_expression_name (pstate, $1); }
-;
-
-MethodInvocation:
-	FuncStart
-                { start_arglist(); }
-	ArgumentList_opt ')'
-                { write_exp_elt_opcode (pstate, OP_FUNCALL);
-		  write_exp_elt_longcst (pstate, (LONGEST) end_arglist ());
-		  write_exp_elt_opcode (pstate, OP_FUNCALL); }
-|	Primary '.' SimpleName '(' ArgumentList_opt ')'
-		{ error (_("Form of method invocation not implemented")); }
-|	SUPER '.' SimpleName '(' ArgumentList_opt ')'
-		{ error (_("Form of method invocation not implemented")); }
-;
-
-ArrayAccess:
-	Name '[' Expression ']'
-                {
-                  /* Emit code for the Name now, then exchange it in the
-		     expout array with the Expression's code.  We could
-		     introduce a OP_SWAP code or a reversed version of
-		     BINOP_SUBSCRIPT, but that makes the rest of GDB pay
-		     for our parsing kludges.  */
-		  struct expression *name_expr;
-
-		  push_expression_name (pstate, $1);
-		  name_expr = copy_exp (pstate->expout, pstate->expout_ptr);
-		  pstate->expout_ptr -= name_expr->nelts;
-		  insert_exp (pstate,
-			      pstate->expout_ptr
-			      - length_of_subexp (pstate->expout,
-						  pstate->expout_ptr),
-			      name_expr);
-		  free (name_expr);
-		  write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT);
-		}
-|	VARIABLE '[' Expression ']'
-		{ write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
-|	PrimaryNoNewArray '[' Expression ']'
-		{ write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
-;
-
-PostfixExpression:
-	Primary
-|	Name
-		{ push_expression_name (pstate, $1); }
-|	VARIABLE
-		/* Already written by write_dollar_variable.  */
-|	PostIncrementExpression
-|	PostDecrementExpression
-;
-
-PostIncrementExpression:
-	PostfixExpression INCREMENT
-		{ write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
-;
-
-PostDecrementExpression:
-	PostfixExpression DECREMENT
-		{ write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
-;
-
-UnaryExpression:
-	PreIncrementExpression
-|	PreDecrementExpression
-|	'+' UnaryExpression
-|	'-' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_NEG); }
-|	'*' UnaryExpression 
-		{ write_exp_elt_opcode (pstate,
-					UNOP_IND); } /*FIXME not in Java  */
-|	UnaryExpressionNotPlusMinus
-;
-
-PreIncrementExpression:
-	INCREMENT UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
-;
-
-PreDecrementExpression:
-	DECREMENT UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
-;
-
-UnaryExpressionNotPlusMinus:
-	PostfixExpression
-|	'~' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
-|	'!' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
-|	CastExpression
-	;
-
-CastExpression:
-	'(' PrimitiveType Dims_opt ')' UnaryExpression
-		{ write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, java_array_type ($2, $3));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
-|	'(' Expression ')' UnaryExpressionNotPlusMinus
-		{
-		  int last_exp_size = length_of_subexp (pstate->expout,
-							pstate->expout_ptr);
-		  struct type *type;
-		  int i;
-		  int base = pstate->expout_ptr - last_exp_size - 3;
-
-		  if (base < 0
-		      || pstate->expout->elts[base+2].opcode != OP_TYPE)
-		    error (_("Invalid cast expression"));
-		  type = pstate->expout->elts[base+1].type;
-		  /* Remove the 'Expression' and slide the
-		     UnaryExpressionNotPlusMinus down to replace it.  */
-		  for (i = 0;  i < last_exp_size;  i++)
-		    pstate->expout->elts[base + i]
-		      = pstate->expout->elts[base + i + 3];
-		  pstate->expout_ptr -= 3;
-		  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
-		    type = lookup_pointer_type (type);
-		  write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate, type);
-		  write_exp_elt_opcode (pstate, UNOP_CAST);
-		}
-|	'(' Name Dims ')' UnaryExpressionNotPlusMinus
-		{ write_exp_elt_opcode (pstate, UNOP_CAST);
-		  write_exp_elt_type (pstate,
-				      java_array_type (java_type_from_name
-						       ($2), $3));
-		  write_exp_elt_opcode (pstate, UNOP_CAST); }
-;
-
-
-MultiplicativeExpression:
-	UnaryExpression
-|	MultiplicativeExpression '*' UnaryExpression
-		{ write_exp_elt_opcode (pstate, BINOP_MUL); }
-|	MultiplicativeExpression '/' UnaryExpression
-		{ write_exp_elt_opcode (pstate, BINOP_DIV); }
-|	MultiplicativeExpression '%' UnaryExpression
-		{ write_exp_elt_opcode (pstate, BINOP_REM); }
-;
-
-AdditiveExpression:
-	MultiplicativeExpression
-|	AdditiveExpression '+' MultiplicativeExpression
-		{ write_exp_elt_opcode (pstate, BINOP_ADD); }
-|	AdditiveExpression '-' MultiplicativeExpression
-		{ write_exp_elt_opcode (pstate, BINOP_SUB); }
-;
-
-ShiftExpression:
-	AdditiveExpression
-|	ShiftExpression LSH AdditiveExpression
-		{ write_exp_elt_opcode (pstate, BINOP_LSH); }
-|	ShiftExpression RSH AdditiveExpression
-		{ write_exp_elt_opcode (pstate, BINOP_RSH); }
-/* |	ShiftExpression >>> AdditiveExpression { FIXME } */
-;
-
-RelationalExpression:
-	ShiftExpression
-|	RelationalExpression '<' ShiftExpression
-		{ write_exp_elt_opcode (pstate, BINOP_LESS); }
-|	RelationalExpression '>' ShiftExpression
-		{ write_exp_elt_opcode (pstate, BINOP_GTR); }
-|	RelationalExpression LEQ ShiftExpression
-		{ write_exp_elt_opcode (pstate, BINOP_LEQ); }
-|	RelationalExpression GEQ ShiftExpression
-		{ write_exp_elt_opcode (pstate, BINOP_GEQ); }
-/* | RelationalExpresion INSTANCEOF ReferenceType { FIXME } */
-;
-
-EqualityExpression:
-	RelationalExpression
-|	EqualityExpression EQUAL RelationalExpression
-		{ write_exp_elt_opcode (pstate, BINOP_EQUAL); }
-|	EqualityExpression NOTEQUAL RelationalExpression
-		{ write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
-;
-
-AndExpression:
-	EqualityExpression
-|	AndExpression '&' EqualityExpression
-		{ write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
-;
-
-ExclusiveOrExpression:
-	AndExpression
-|	ExclusiveOrExpression '^' AndExpression
-		{ write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
-;
-InclusiveOrExpression:
-	ExclusiveOrExpression
-|	InclusiveOrExpression '|' ExclusiveOrExpression
-		{ write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
-;
-
-ConditionalAndExpression:
-	InclusiveOrExpression
-|	ConditionalAndExpression ANDAND InclusiveOrExpression
-		{ write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
-;
-
-ConditionalOrExpression:
-	ConditionalAndExpression
-|	ConditionalOrExpression OROR ConditionalAndExpression
-		{ write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
-;
-
-ConditionalExpression:
-	ConditionalOrExpression
-|	ConditionalOrExpression '?' Expression ':' ConditionalExpression
-		{ write_exp_elt_opcode (pstate, TERNOP_COND); }
-;
-
-AssignmentExpression:
-	ConditionalExpression
-|	Assignment
-;
-			  
-Assignment:
-	LeftHandSide '=' ConditionalExpression
-		{ write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
-|	LeftHandSide ASSIGN_MODIFY ConditionalExpression
-		{ write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
-		  write_exp_elt_opcode (pstate, $2);
-		  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
-;
-
-LeftHandSide:
-	ForcedName
-		{ push_expression_name (pstate, $1); }
-|	VARIABLE
-		/* Already written by write_dollar_variable.  */
-|	FieldAccess
-|	ArrayAccess
-;
-
-
-Expression:
-	AssignmentExpression
-;
-
-%%
-/* Take care of parsing a number (anything that starts with a digit).
-   Set yylval and return the token type; update lexptr.
-   LEN is the number of characters in it.  */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (struct parser_state *par_state,
-	      const char *p, int len, int parsed_float, YYSTYPE *putithere)
-{
-  ULONGEST n = 0;
-  ULONGEST limit, limit_div_base;
-
-  int c;
-  int base = input_radix;
-
-  struct type *type;
-
-  if (parsed_float)
-    {
-      const char *suffix;
-      int suffix_len;
-
-      if (! parse_float (p, len, &putithere->typed_val_float.dval, &suffix))
-	return ERROR;
-
-      suffix_len = p + len - suffix;
-
-      if (suffix_len == 0)
-	putithere->typed_val_float.type
-	  = parse_type (par_state)->builtin_double;
-      else if (suffix_len == 1)
-	{
-	  /* See if it has `f' or `d' suffix (float or double).  */
-	  if (tolower (*suffix) == 'f')
-	    putithere->typed_val_float.type =
-	      parse_type (par_state)->builtin_float;
-	  else if (tolower (*suffix) == 'd')
-	    putithere->typed_val_float.type =
-	      parse_type (par_state)->builtin_double;
-	  else
-	    return ERROR;
-	}
-      else
-	return ERROR;
-
-      return FLOATING_POINT_LITERAL;
-    }
-
-  /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
-  if (p[0] == '0')
-    switch (p[1])
-      {
-      case 'x':
-      case 'X':
-	if (len >= 3)
-	  {
-	    p += 2;
-	    base = 16;
-	    len -= 2;
-	  }
-	break;
-
-      case 't':
-      case 'T':
-      case 'd':
-      case 'D':
-	if (len >= 3)
-	  {
-	    p += 2;
-	    base = 10;
-	    len -= 2;
-	  }
-	break;
-
-      default:
-	base = 8;
-	break;
-      }
-
-  c = p[len-1];
-  /* A paranoid calculation of (1<<64)-1.  */
-  limit = (ULONGEST)0xffffffff;
-  limit = ((limit << 16) << 16) | limit;
-  if (c == 'l' || c == 'L')
-    {
-      type = parse_java_type (par_state)->builtin_long;
-      len--;
-    }
-  else
-    {
-      type = parse_java_type (par_state)->builtin_int;
-    }
-  limit_div_base = limit / (ULONGEST) base;
-
-  while (--len >= 0)
-    {
-      c = *p++;
-      if (c >= '0' && c <= '9')
-	c -= '0';
-      else if (c >= 'A' && c <= 'Z')
-	c -= 'A' - 10;
-      else if (c >= 'a' && c <= 'z')
-	c -= 'a' - 10;
-      else
-	return ERROR;	/* Char not a digit */
-      if (c >= base)
-	return ERROR;
-      if (n > limit_div_base
-	  || (n *= base) > limit - c)
-	error (_("Numeric constant too large"));
-      n += c;
-	}
-
-  /* If the type is bigger than a 32-bit signed integer can be, implicitly
-     promote to long.  Java does not do this, so mark it as
-     parse_type (par_state)->builtin_uint64 rather than
-     parse_java_type (par_state)->builtin_long.
-     0x80000000 will become -0x80000000 instead of 0x80000000L, because we
-     don't know the sign at this point.  */
-  if (type == parse_java_type (par_state)->builtin_int
-      && n > (ULONGEST)0x80000000)
-    type = parse_type (par_state)->builtin_uint64;
-
-  putithere->typed_val_int.val = n;
-  putithere->typed_val_int.type = type;
-
-  return INTEGER_LITERAL;
-}
-
-struct token
-{
-  char *oper;
-  int token;
-  enum exp_opcode opcode;
-};
-
-static const struct token tokentab3[] =
-  {
-    {">>=", ASSIGN_MODIFY, BINOP_RSH},
-    {"<<=", ASSIGN_MODIFY, BINOP_LSH}
-  };
-
-static const struct token tokentab2[] =
-  {
-    {"+=", ASSIGN_MODIFY, BINOP_ADD},
-    {"-=", ASSIGN_MODIFY, BINOP_SUB},
-    {"*=", ASSIGN_MODIFY, BINOP_MUL},
-    {"/=", ASSIGN_MODIFY, BINOP_DIV},
-    {"%=", ASSIGN_MODIFY, BINOP_REM},
-    {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR},
-    {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND},
-    {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR},
-    {"++", INCREMENT, BINOP_END},
-    {"--", DECREMENT, BINOP_END},
-    {"&&", ANDAND, BINOP_END},
-    {"||", OROR, BINOP_END},
-    {"<<", LSH, BINOP_END},
-    {">>", RSH, BINOP_END},
-    {"==", EQUAL, BINOP_END},
-    {"!=", NOTEQUAL, BINOP_END},
-    {"<=", LEQ, BINOP_END},
-    {">=", GEQ, BINOP_END}
-  };
-
-/* Read one token, getting characters through lexptr.  */
-
-static int
-yylex (void)
-{
-  int c;
-  int namelen;
-  unsigned int i;
-  const char *tokstart;
-  const char *tokptr;
-  int tempbufindex;
-  static char *tempbuf;
-  static int tempbufsize;
-  
- retry:
-
-  prev_lexptr = lexptr;
-
-  tokstart = lexptr;
-  /* See if it is a special token of length 3.  */
-  for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
-    if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
-      {
-	lexptr += 3;
-	yylval.opcode = tokentab3[i].opcode;
-	return tokentab3[i].token;
-      }
-
-  /* See if it is a special token of length 2.  */
-  for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
-    if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
-      {
-	lexptr += 2;
-	yylval.opcode = tokentab2[i].opcode;
-	return tokentab2[i].token;
-      }
-
-  switch (c = *tokstart)
-    {
-    case 0:
-      return 0;
-
-    case ' ':
-    case '\t':
-    case '\n':
-      lexptr++;
-      goto retry;
-
-    case '\'':
-      /* We either have a character constant ('0' or '\177' for example)
-	 or we have a quoted symbol reference ('foo(int,int)' in C++
-	 for example).  */
-      lexptr++;
-      c = *lexptr++;
-      if (c == '\\')
-	c = parse_escape (parse_gdbarch (pstate), &lexptr);
-      else if (c == '\'')
-	error (_("Empty character constant"));
-
-      yylval.typed_val_int.val = c;
-      yylval.typed_val_int.type = parse_java_type (pstate)->builtin_char;
-
-      c = *lexptr++;
-      if (c != '\'')
-	{
-	  namelen = skip_quoted (tokstart) - tokstart;
-	  if (namelen > 2)
-	    {
-	      lexptr = tokstart + namelen;
-	      if (lexptr[-1] != '\'')
-		error (_("Unmatched single quote"));
-	      namelen -= 2;
-	      tokstart++;
-	      goto tryname;
-	    }
-	  error (_("Invalid character constant"));
-	}
-      return INTEGER_LITERAL;
-
-    case '(':
-      paren_depth++;
-      lexptr++;
-      return c;
-
-    case ')':
-      if (paren_depth == 0)
-	return 0;
-      paren_depth--;
-      lexptr++;
-      return c;
-
-    case ',':
-      if (comma_terminates && paren_depth == 0)
-	return 0;
-      lexptr++;
-      return c;
-
-    case '.':
-      /* Might be a floating point number.  */
-      if (lexptr[1] < '0' || lexptr[1] > '9')
-	goto symbol;		/* Nope, must be a symbol.  */
-      /* FALL THRU into number case.  */
-
-    case '0':
-    case '1':
-    case '2':
-    case '3':
-    case '4':
-    case '5':
-    case '6':
-    case '7':
-    case '8':
-    case '9':
-      {
-	/* It's a number.  */
-	int got_dot = 0, got_e = 0, toktype;
-	const char *p = tokstart;
-	int hex = input_radix > 10;
-
-	if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
-	  {
-	    p += 2;
-	    hex = 1;
-	  }
-	else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
-	  {
-	    p += 2;
-	    hex = 0;
-	  }
-
-	for (;; ++p)
-	  {
-	    /* This test includes !hex because 'e' is a valid hex digit
-	       and thus does not indicate a floating point number when
-	       the radix is hex.  */
-	    if (!hex && !got_e && (*p == 'e' || *p == 'E'))
-	      got_dot = got_e = 1;
-	    /* This test does not include !hex, because a '.' always indicates
-	       a decimal floating point number regardless of the radix.  */
-	    else if (!got_dot && *p == '.')
-	      got_dot = 1;
-	    else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
-		     && (*p == '-' || *p == '+'))
-	      /* This is the sign of the exponent, not the end of the
-		 number.  */
-	      continue;
-	    /* We will take any letters or digits.  parse_number will
-	       complain if past the radix, or if L or U are not final.  */
-	    else if ((*p < '0' || *p > '9')
-		     && ((*p < 'a' || *p > 'z')
-				  && (*p < 'A' || *p > 'Z')))
-	      break;
-	  }
-	toktype = parse_number (pstate, tokstart, p - tokstart,
-				got_dot|got_e, &yylval);
-        if (toktype == ERROR)
-	  {
-	    char *err_copy = (char *) alloca (p - tokstart + 1);
-
-	    memcpy (err_copy, tokstart, p - tokstart);
-	    err_copy[p - tokstart] = 0;
-	    error (_("Invalid number \"%s\""), err_copy);
-	  }
-	lexptr = p;
-	return toktype;
-      }
-
-    case '+':
-    case '-':
-    case '*':
-    case '/':
-    case '%':
-    case '|':
-    case '&':
-    case '^':
-    case '~':
-    case '!':
-    case '<':
-    case '>':
-    case '[':
-    case ']':
-    case '?':
-    case ':':
-    case '=':
-    case '{':
-    case '}':
-    symbol:
-      lexptr++;
-      return c;
-
-    case '"':
-
-      /* Build the gdb internal form of the input string in tempbuf,
-	 translating any standard C escape forms seen.  Note that the
-	 buffer is null byte terminated *only* for the convenience of
-	 debugging gdb itself and printing the buffer contents when
-	 the buffer contains no embedded nulls.  Gdb does not depend
-	 upon the buffer being null byte terminated, it uses the length
-	 string instead.  This allows gdb to handle C strings (as well
-	 as strings in other languages) with embedded null bytes */
-
-      tokptr = ++tokstart;
-      tempbufindex = 0;
-
-      do {
-	/* Grow the static temp buffer if necessary, including allocating
-	   the first one on demand.  */
-	if (tempbufindex + 1 >= tempbufsize)
-	  {
-	    tempbuf = (char *) realloc (tempbuf, tempbufsize += 64);
-	  }
-	switch (*tokptr)
-	  {
-	  case '\0':
-	  case '"':
-	    /* Do nothing, loop will terminate.  */
-	    break;
-	  case '\\':
-	    tokptr++;
-	    c = parse_escape (parse_gdbarch (pstate), &tokptr);
-	    if (c == -1)
-	      {
-		continue;
-	      }
-	    tempbuf[tempbufindex++] = c;
-	    break;
-	  default:
-	    tempbuf[tempbufindex++] = *tokptr++;
-	    break;
-	  }
-      } while ((*tokptr != '"') && (*tokptr != '\0'));
-      if (*tokptr++ != '"')
-	{
-	  error (_("Unterminated string in expression"));
-	}
-      tempbuf[tempbufindex] = '\0';	/* See note above */
-      yylval.sval.ptr = tempbuf;
-      yylval.sval.length = tempbufindex;
-      lexptr = tokptr;
-      return (STRING_LITERAL);
-    }
-
-  if (!(c == '_' || c == '$'
-	|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
-    /* We must have come across a bad character (e.g. ';').  */
-    error (_("Invalid character '%c' in expression"), c);
-
-  /* It's a name.  See how long it is.  */
-  namelen = 0;
-  for (c = tokstart[namelen];
-       (c == '_'
-	|| c == '$'
-	|| (c >= '0' && c <= '9')
-	|| (c >= 'a' && c <= 'z')
-	|| (c >= 'A' && c <= 'Z')
-	|| c == '<');
-       )
-    {
-      if (c == '<')
-	{
-	  int i = namelen;
-	  while (tokstart[++i] && tokstart[i] != '>');
-	  if (tokstart[i] == '>')
-	    namelen = i;
-	}
-       c = tokstart[++namelen];
-     }
-
-  /* The token "if" terminates the expression and is NOT 
-     removed from the input stream.  */
-  if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
-    {
-      return 0;
-    }
-
-  lexptr += namelen;
-
-  tryname:
-
-  /* Catch specific keywords.  Should be done with a data structure.  */
-  switch (namelen)
-    {
-    case 7:
-      if (strncmp (tokstart, "boolean", 7) == 0)
-	return BOOLEAN;
-      break;
-    case 6:
-      if (strncmp (tokstart, "double", 6) == 0)      
-	return DOUBLE;
-      break;
-    case 5:
-      if (strncmp (tokstart, "short", 5) == 0)
-	return SHORT;
-      if (strncmp (tokstart, "false", 5) == 0)
-	{
-	  yylval.lval = 0;
-	  return BOOLEAN_LITERAL;
-	}
-      if (strncmp (tokstart, "super", 5) == 0)
-	return SUPER;
-      if (strncmp (tokstart, "float", 5) == 0)
-	return FLOAT;
-      break;
-    case 4:
-      if (strncmp (tokstart, "long", 4) == 0)
-	return LONG;
-      if (strncmp (tokstart, "byte", 4) == 0)
-	return BYTE;
-      if (strncmp (tokstart, "char", 4) == 0)
-	return CHAR;
-      if (strncmp (tokstart, "true", 4) == 0)
-	{
-	  yylval.lval = 1;
-	  return BOOLEAN_LITERAL;
-	}
-      break;
-    case 3:
-      if (strncmp (tokstart, "int", 3) == 0)
-	return INT;
-      if (strncmp (tokstart, "new", 3) == 0)
-	return NEW;
-      break;
-    default:
-      break;
-    }
-
-  yylval.sval.ptr = tokstart;
-  yylval.sval.length = namelen;
-
-  if (*tokstart == '$')
-    {
-      write_dollar_variable (pstate, yylval.sval);
-      return VARIABLE;
-    }
-
-  /* Input names that aren't symbols but ARE valid hex numbers,
-     when the input radix permits them, can be names or numbers
-     depending on the parse.  Note we support radixes > 16 here.  */
-  if (((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
-       (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
-    {
-      YYSTYPE newlval;	/* Its value is ignored.  */
-      int hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
-      if (hextype == INTEGER_LITERAL)
-	return NAME_OR_INT;
-    }
-  return IDENTIFIER;
-}
-
-int
-java_parse (struct parser_state *par_state)
-{
-  int result;
-  struct cleanup *c = make_cleanup_clear_parser_state (&pstate);
-
-  /* Setting up the parser state.  */
-  gdb_assert (par_state != NULL);
-  pstate = par_state;
-
-  result = yyparse ();
-  do_cleanups (c);
-
-  return result;
-}
-
-void
-yyerror (char *msg)
-{
-  if (prev_lexptr)
-    lexptr = prev_lexptr;
-
-  if (msg)
-    error (_("%s: near `%s'"), msg, lexptr);
-  else
-    error (_("error in expression, near `%s'"), lexptr);
-}
-
-static struct type *
-java_type_from_name (struct stoken name)
-{
-  char *tmp = copy_name (name);
-  struct type *typ = java_lookup_class (tmp);
-  if (typ == NULL || TYPE_CODE (typ) != TYPE_CODE_STRUCT)
-    error (_("No class named `%s'"), tmp);
-  return typ;
-}
-
-/* If NAME is a valid variable name in this scope, push it and return 1.
-   Otherwise, return 0.  */
-
-static int
-push_variable (struct parser_state *par_state, struct stoken name)
-{
-  char *tmp = copy_name (name);
-  struct field_of_this_result is_a_field_of_this;
-  struct symbol *sym;
-
-  sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN,
-		       &is_a_field_of_this);
-  if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-    {
-      if (symbol_read_needs_frame (sym))
-	{
-	  if (innermost_block == 0 ||
-	      contained_in (block_found, innermost_block))
-	    innermost_block = block_found;
-	}
-
-      write_exp_elt_opcode (par_state, OP_VAR_VALUE);
-      /* We want to use the selected frame, not another more inner frame
-	 which happens to be in the same block.  */
-      write_exp_elt_block (par_state, NULL);
-      write_exp_elt_sym (par_state, sym);
-      write_exp_elt_opcode (par_state, OP_VAR_VALUE);
-      return 1;
-    }
-  if (is_a_field_of_this.type != NULL)
-    {
-      /* it hangs off of `this'.  Must not inadvertently convert from a
-	 method call to data ref.  */
-      if (innermost_block == 0 || 
-	  contained_in (block_found, innermost_block))
-	innermost_block = block_found;
-      write_exp_elt_opcode (par_state, OP_THIS);
-      write_exp_elt_opcode (par_state, OP_THIS);
-      write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-      write_exp_string (par_state, name);
-      write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-      return 1;
-    }
-  return 0;
-}
-
-/* Assuming a reference expression has been pushed, emit the
-   STRUCTOP_PTR ops to access the field named NAME.  If NAME is a
-   qualified name (has '.'), generate a field access for each part.  */
-
-static void
-push_fieldnames (struct parser_state *par_state, struct stoken name)
-{
-  int i;
-  struct stoken token;
-  token.ptr = name.ptr;
-  for (i = 0;  ;  i++)
-    {
-      if (i == name.length || name.ptr[i] == '.')
-	{
-	  /* token.ptr is start of current field name.  */
-	  token.length = &name.ptr[i] - token.ptr;
-	  write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-	  write_exp_string (par_state, token);
-	  write_exp_elt_opcode (par_state, STRUCTOP_PTR);
-	  token.ptr += token.length + 1;
-	}
-      if (i >= name.length)
-	break;
-    }
-}
-
-/* Helper routine for push_expression_name.
-   Handle a qualified name, where DOT_INDEX is the index of the first '.' */
-
-static void
-push_qualified_expression_name (struct parser_state *par_state,
-				struct stoken name, int dot_index)
-{
-  struct stoken token;
-  char *tmp;
-  struct type *typ;
-
-  token.ptr = name.ptr;
-  token.length = dot_index;
-
-  if (push_variable (par_state, token))
-    {
-      token.ptr = name.ptr + dot_index + 1;
-      token.length = name.length - dot_index - 1;
-      push_fieldnames (par_state, token);
-      return;
-    }
-
-  token.ptr = name.ptr;
-  for (;;)
-    {
-      token.length = dot_index;
-      tmp = copy_name (token);
-      typ = java_lookup_class (tmp);
-      if (typ != NULL)
-	{
-	  if (dot_index == name.length)
-	    {
-	      write_exp_elt_opcode (par_state, OP_TYPE);
-	      write_exp_elt_type (par_state, typ);
-	      write_exp_elt_opcode (par_state, OP_TYPE);
-	      return;
-	    }
-	  dot_index++;  /* Skip '.' */
-	  name.ptr += dot_index;
-	  name.length -= dot_index;
-	  dot_index = 0;
-	  while (dot_index < name.length && name.ptr[dot_index] != '.') 
-	    dot_index++;
-	  token.ptr = name.ptr;
-	  token.length = dot_index;
-	  write_exp_elt_opcode (par_state, OP_SCOPE);
-	  write_exp_elt_type (par_state, typ);
-	  write_exp_string (par_state, token);
-	  write_exp_elt_opcode (par_state, OP_SCOPE); 
-	  if (dot_index < name.length)
-	    {
-	      dot_index++;
-	      name.ptr += dot_index;
-	      name.length -= dot_index;
-	      push_fieldnames (par_state, name);
-	    }
-	  return;
-	}
-      else if (dot_index >= name.length)
-	break;
-      dot_index++;  /* Skip '.' */
-      while (dot_index < name.length && name.ptr[dot_index] != '.')
-	dot_index++;
-    }
-  error (_("unknown type `%.*s'"), name.length, name.ptr);
-}
-
-/* Handle Name in an expression (or LHS).
-   Handle VAR, TYPE, TYPE.FIELD1....FIELDN and VAR.FIELD1....FIELDN.  */
-
-static void
-push_expression_name (struct parser_state *par_state, struct stoken name)
-{
-  char *tmp;
-  struct type *typ;
-  int i;
-
-  for (i = 0;  i < name.length;  i++)
-    {
-      if (name.ptr[i] == '.')
-	{
-	  /* It's a Qualified Expression Name.  */
-	  push_qualified_expression_name (par_state, name, i);
-	  return;
-	}
-    }
-
-  /* It's a Simple Expression Name.  */
-  
-  if (push_variable (par_state, name))
-    return;
-  tmp = copy_name (name);
-  typ = java_lookup_class (tmp);
-  if (typ != NULL)
-    {
-      write_exp_elt_opcode (par_state, OP_TYPE);
-      write_exp_elt_type (par_state, typ);
-      write_exp_elt_opcode (par_state, OP_TYPE);
-    }
-  else
-    {
-      struct bound_minimal_symbol msymbol;
-
-      msymbol = lookup_bound_minimal_symbol (tmp);
-      if (msymbol.minsym != NULL)
-	write_exp_msymbol (par_state, msymbol);
-      else if (!have_full_symbols () && !have_partial_symbols ())
-	error (_("No symbol table is loaded.  Use the \"file\" command"));
-      else
-	error (_("No symbol \"%s\" in current context."), tmp);
-    }
-
-}
-
-
-/* The following two routines, copy_exp and insert_exp, aren't specific to
-   Java, so they could go in parse.c, but their only purpose is to support
-   the parsing kludges we use in this file, so maybe it's best to isolate
-   them here.  */
-
-/* Copy the expression whose last element is at index ENDPOS - 1 in EXPR
-   into a freshly malloc'ed struct expression.  Its language_defn is set
-   to null.  */
-static struct expression *
-copy_exp (struct expression *expr, int endpos)
-{
-  int len = length_of_subexp (expr, endpos);
-  struct expression *newobj
-    = (struct expression *) malloc (sizeof (*newobj) + EXP_ELEM_TO_BYTES (len));
-
-  newobj->nelts = len;
-  memcpy (newobj->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len));
-  newobj->language_defn = 0;
-
-  return newobj;
-}
-
-/* Insert the expression NEW into the current expression (expout) at POS.  */
-static void
-insert_exp (struct parser_state *par_state, int pos, struct expression *newobj)
-{
-  int newlen = newobj->nelts;
-  int i;
-
-  /* Grow expout if necessary.  In this function's only use at present,
-     this should never be necessary.  */
-  increase_expout_size (par_state, newlen);
-
-  for (i = par_state->expout_ptr - 1; i >= pos; i--)
-    par_state->expout->elts[i + newlen] = par_state->expout->elts[i];
-  
-  memcpy (par_state->expout->elts + pos, newobj->elts,
-	  EXP_ELEM_TO_BYTES (newlen));
-  par_state->expout_ptr += newlen;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-lang.c ./gdb/jv-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-lang.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,1251 +0,0 @@
-/* Java language support routines for GDB, the GNU debugger.
-
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "expression.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "value.h"
-#include "c-lang.h"
-#include "jv-lang.h"
-#include "varobj.h"
-#include "gdbcore.h"
-#include "block.h"
-#include "demangle.h"
-#include "dictionary.h"
-#include <ctype.h>
-#include "charset.h"
-#include "valprint.h"
-#include "cp-support.h"
-
-/* Local functions */
-
-extern void _initialize_java_language (void);
-
-static int java_demangled_signature_length (const char *);
-static void java_demangled_signature_copy (char *, const char *);
-
-static struct compunit_symtab *get_java_class_symtab (struct gdbarch *gdbarch);
-static char *get_java_utf8_name (struct obstack *obstack, struct value *name);
-static int java_class_is_primitive (struct value *clas);
-static struct value *java_value_string (char *ptr, int len);
-
-static void java_emit_char (int c, struct type *type,
-			    struct ui_file * stream, int quoter);
-
-static char *java_class_name_from_physname (const char *physname);
-
-static const struct objfile_data *jv_dynamics_objfile_data_key;
-
-/* The dynamic objfile is kept per-program-space.  This key lets us
-   associate the objfile with the program space.  */
-
-static const struct program_space_data *jv_dynamics_progspace_key;
-
-static struct type *java_link_class_type (struct gdbarch *,
-					  struct type *, struct value *);
-
-/* An instance of this structure is used to store some data that must
-   be freed.  */
-
-struct jv_per_objfile_data
-{
-  /* The expandable dictionary we use.  */
-  struct dictionary *dict;
-};
-
-/* A function called when the dynamics_objfile is freed.  We use this
-   to clean up some internal state.  */
-static void
-jv_per_objfile_free (struct objfile *objfile, void *data)
-{
-  struct jv_per_objfile_data *jv_data = data;
-  struct objfile *dynamics_objfile;
-
-  dynamics_objfile = program_space_data (current_program_space,
-					 jv_dynamics_progspace_key);
-  gdb_assert (objfile == dynamics_objfile);
-
-  if (jv_data->dict)
-    dict_free (jv_data->dict);
-  xfree (jv_data);
-
-  set_program_space_data (current_program_space,
-			  jv_dynamics_progspace_key,
-			  NULL);
-}
-
-/* FIXME: carlton/2003-02-04: This is the main or only caller of
-   allocate_objfile with first argument NULL; as a result, this code
-   breaks every so often.  Somebody should write a test case that
-   exercises GDB in various ways (e.g. something involving loading a
-   dynamic library) after this code has been called.  */
-
-static struct objfile *
-get_dynamics_objfile (struct gdbarch *gdbarch)
-{
-  struct objfile *dynamics_objfile;
-
-  dynamics_objfile = program_space_data (current_program_space,
-					 jv_dynamics_progspace_key);
-
-  if (dynamics_objfile == NULL)
-    {
-      struct jv_per_objfile_data *data;
-
-      /* Mark it as shared so that it is cleared when the inferior is
-	 re-run.  */
-      dynamics_objfile = allocate_objfile (NULL, NULL,
-					   OBJF_SHARED | OBJF_NOT_FILENAME);
-      dynamics_objfile->per_bfd->gdbarch = gdbarch;
-
-      data = XCNEW (struct jv_per_objfile_data);
-      set_objfile_data (dynamics_objfile, jv_dynamics_objfile_data_key, data);
-
-      set_program_space_data (current_program_space,
-			      jv_dynamics_progspace_key,
-			      dynamics_objfile);
-    }
-  return dynamics_objfile;
-}
-
-static struct compunit_symtab *
-get_java_class_symtab (struct gdbarch *gdbarch)
-{
-  struct objfile *objfile = get_dynamics_objfile (gdbarch);
-  struct compunit_symtab *class_symtab = objfile->compunit_symtabs;
-
-  if (class_symtab == NULL)
-    {
-      struct blockvector *bv;
-      struct block *bl;
-      struct jv_per_objfile_data *jv_data;
-
-      class_symtab = allocate_compunit_symtab (objfile, "<java-classes>");
-      add_compunit_symtab_to_objfile (class_symtab);
-      allocate_symtab (class_symtab, "<java-classes>");
-
-      COMPUNIT_FILETABS (class_symtab)->language = language_java;
-      bv = (struct blockvector *)
-	obstack_alloc (&objfile->objfile_obstack,
-		       sizeof (struct blockvector) + sizeof (struct block *));
-      BLOCKVECTOR_NBLOCKS (bv) = 1;
-      COMPUNIT_BLOCKVECTOR (class_symtab) = bv;
-
-      /* Allocate dummy STATIC_BLOCK.  */
-      bl = allocate_block (&objfile->objfile_obstack);
-      BLOCK_DICT (bl) = dict_create_linear (&objfile->objfile_obstack,
-					    NULL);
-      BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = bl;
-
-      /* Allocate GLOBAL_BLOCK.  */
-      bl = allocate_global_block (&objfile->objfile_obstack);
-      BLOCK_DICT (bl) = dict_create_hashed_expandable ();
-      set_block_compunit_symtab (bl, class_symtab);
-      BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
-
-      /* Arrange to free the dict.  */
-      jv_data = objfile_data (objfile, jv_dynamics_objfile_data_key);
-      jv_data->dict = BLOCK_DICT (bl);
-    }
-  return class_symtab;
-}
-
-static void
-add_class_symtab_symbol (struct symbol *sym)
-{
-  struct compunit_symtab *cust = get_java_class_symtab (symbol_arch (sym));
-  const struct blockvector *bv = COMPUNIT_BLOCKVECTOR (cust);
-
-  dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym);
-}
-
-static struct symbol *
-add_class_symbol (struct type *type, CORE_ADDR addr)
-{
-  struct symbol *sym;
-  struct objfile *objfile = get_dynamics_objfile (get_type_arch (type));
-
-  sym = allocate_symbol (objfile);
-  SYMBOL_SET_LANGUAGE (sym, language_java, &objfile->objfile_obstack);
-  SYMBOL_SET_LINKAGE_NAME (sym, TYPE_TAG_NAME (type));
-  SYMBOL_ACLASS_INDEX (sym) = LOC_TYPEDEF;
-  /*  SYMBOL_VALUE (sym) = valu; */
-  SYMBOL_TYPE (sym) = type;
-  SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
-  SYMBOL_VALUE_ADDRESS (sym) = addr;
-  return sym;
-}
-
-struct type *
-java_lookup_class (char *name)
-{
-  struct symbol *sym;
-
-  sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, NULL);
-  if (sym != NULL)
-    return SYMBOL_TYPE (sym);
-  /* FIXME - should search inferior's symbol table.  */
-  return NULL;
-}
-
-/* Return a nul-terminated string (allocated on OBSTACK) for
-   a name given by NAME (which has type Utf8Const*).  */
-
-char *
-get_java_utf8_name (struct obstack *obstack, struct value *name)
-{
-  char *chrs;
-  struct value *temp = name;
-  int name_length;
-  CORE_ADDR data_addr;
-
-  temp = value_struct_elt (&temp, NULL, "length", NULL, "structure");
-  name_length = (int) value_as_long (temp);
-  data_addr = value_address (temp) + TYPE_LENGTH (value_type (temp));
-  chrs = obstack_alloc (obstack, name_length + 1);
-  chrs[name_length] = '\0';
-  read_memory (data_addr, (gdb_byte *) chrs, name_length);
-  return chrs;
-}
-
-struct value *
-java_class_from_object (struct value *obj_val)
-{
-  /* This is all rather inefficient, since the offsets of vtable and
-     class are fixed.  FIXME */
-  struct value *vtable_val;
-
-  if (TYPE_CODE (value_type (obj_val)) == TYPE_CODE_PTR
-      && TYPE_LENGTH (TYPE_TARGET_TYPE (value_type (obj_val))) == 0)
-    obj_val = value_at (get_java_object_type (),
-			value_as_address (obj_val));
-
-  vtable_val = value_struct_elt (&obj_val, NULL, "vtable", NULL, "structure");
-  return value_struct_elt (&vtable_val, NULL, "class", NULL, "structure");
-}
-
-/* Check if CLASS_IS_PRIMITIVE(value of clas): */
-static int
-java_class_is_primitive (struct value *clas)
-{
-  struct value *vtable = value_struct_elt (&clas, NULL, "vtable",
-					   NULL, "struct");
-  CORE_ADDR i = value_as_address (vtable);
-
-  return (int) (i & 0x7fffffff) == (int) 0x7fffffff;
-}
-
-/* Read a GCJ Class object, and generated a gdb (TYPE_CODE_STRUCT) type.  */
-
-struct type *
-type_from_class (struct gdbarch *gdbarch, struct value *clas)
-{
-  struct type *type;
-  char *name;
-  struct value *temp;
-  struct objfile *objfile;
-  struct value *utf8_name;
-  char *nptr;
-  CORE_ADDR addr;
-
-  type = check_typedef (value_type (clas));
-  if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    {
-      if (value_logical_not (clas))
-	return NULL;
-      clas = value_ind (clas);
-    }
-  addr = value_address (clas);
-
-  objfile = get_dynamics_objfile (gdbarch);
-  if (java_class_is_primitive (clas))
-    {
-      struct value *sig;
-
-      temp = clas;
-      sig = value_struct_elt (&temp, NULL, "method_count", NULL, "structure");
-      return java_primitive_type (gdbarch, value_as_long (sig));
-    }
-
-  /* Get Class name.  */
-  /* If clasloader non-null, prepend loader address.  FIXME */
-  temp = clas;
-  utf8_name = value_struct_elt (&temp, NULL, "name", NULL, "structure");
-  name = get_java_utf8_name (&objfile->objfile_obstack, utf8_name);
-  for (nptr = name; *nptr != 0; nptr++)
-    {
-      if (*nptr == '/')
-	*nptr = '.';
-    }
-
-  type = java_lookup_class (name);
-  if (type != NULL)
-    return type;
-
-  type = alloc_type (objfile);
-  TYPE_CODE (type) = TYPE_CODE_STRUCT;
-  INIT_CPLUS_SPECIFIC (type);
-
-  if (name[0] == '[')
-    {
-      char *signature = name;
-      int namelen = java_demangled_signature_length (signature);
-
-      if (namelen > strlen (name))
-	name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
-      java_demangled_signature_copy (name, signature);
-      name[namelen] = '\0';
-      temp = clas;
-      /* Set array element type.  */
-      temp = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
-      deprecated_set_value_type (temp,
-				 lookup_pointer_type (value_type (clas)));
-      TYPE_TARGET_TYPE (type) = type_from_class (gdbarch, temp);
-    }
-
-  ALLOCATE_CPLUS_STRUCT_TYPE (type);
-  TYPE_TAG_NAME (type) = name;
-
-  add_class_symtab_symbol (add_class_symbol (type, addr));
-  return java_link_class_type (gdbarch, type, clas);
-}
-
-/* Fill in class TYPE with data from the CLAS value.  */
-
-static struct type *
-java_link_class_type (struct gdbarch *gdbarch,
-		      struct type *type, struct value *clas)
-{
-  struct value *temp;
-  const char *unqualified_name;
-  const char *name = TYPE_TAG_NAME (type);
-  int ninterfaces, nfields, nmethods;
-  int type_is_object = 0;
-  struct fn_field *fn_fields;
-  struct fn_fieldlist *fn_fieldlists;
-  struct value *fields;
-  struct value *methods;
-  struct value *method = NULL;
-  struct value *field = NULL;
-  int i, j;
-  struct objfile *objfile = get_dynamics_objfile (gdbarch);
-  struct type *tsuper;
-
-  gdb_assert (name != NULL);
-  unqualified_name = strrchr (name, '.');
-  if (unqualified_name == NULL)
-    unqualified_name = name;
-
-  temp = clas;
-  temp = value_struct_elt (&temp, NULL, "superclass", NULL, "structure");
-  if (strcmp (name, "java.lang.Object") == 0)
-    {
-      tsuper = get_java_object_type ();
-      if (tsuper && TYPE_CODE (tsuper) == TYPE_CODE_PTR)
-	tsuper = TYPE_TARGET_TYPE (tsuper);
-      type_is_object = 1;
-    }
-  else
-    tsuper = type_from_class (gdbarch, temp);
-
-#if 1
-  ninterfaces = 0;
-#else
-  temp = clas;
-  ninterfaces = value_as_long (value_struct_elt (&temp, NULL, "interface_len",
-						 NULL, "structure"));
-#endif
-  TYPE_N_BASECLASSES (type) = (tsuper == NULL ? 0 : 1) + ninterfaces;
-  temp = clas;
-  nfields = value_as_long (value_struct_elt (&temp, NULL, "field_count",
-					     NULL, "structure"));
-  nfields += TYPE_N_BASECLASSES (type);
-  nfields++;			/* Add one for dummy "class" field.  */
-  TYPE_NFIELDS (type) = nfields;
-  TYPE_FIELDS (type) = (struct field *)
-    TYPE_ALLOC (type, sizeof (struct field) * nfields);
-
-  memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields);
-
-  TYPE_FIELD_PRIVATE_BITS (type) =
-    (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
-  B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields);
-
-  TYPE_FIELD_PROTECTED_BITS (type) =
-    (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
-  B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields);
-
-  TYPE_FIELD_IGNORE_BITS (type) =
-    (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
-  B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields);
-
-  TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *)
-    TYPE_ALLOC (type, B_BYTES (TYPE_N_BASECLASSES (type)));
-  B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), TYPE_N_BASECLASSES (type));
-
-  if (tsuper != NULL)
-    {
-      TYPE_BASECLASS (type, 0) = tsuper;
-      if (type_is_object)
-	SET_TYPE_FIELD_PRIVATE (type, 0);
-    }
-
-  i = strlen (name);
-  if (i > 2 && name[i - 1] == ']' && tsuper != NULL)
-    {
-      /* FIXME */
-      TYPE_LENGTH (type) = TYPE_LENGTH (tsuper) + 4;   /* size with "length" */
-    }
-  else
-    {
-      temp = clas;
-      temp = value_struct_elt (&temp, NULL, "size_in_bytes",
-			       NULL, "structure");
-      TYPE_LENGTH (type) = value_as_long (temp);
-    }
-
-  fields = NULL;
-  nfields--;			/* First set up dummy "class" field.  */
-  SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas));
-  TYPE_FIELD_NAME (type, nfields) = "class";
-  TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
-  SET_TYPE_FIELD_PRIVATE (type, nfields);
-
-  for (i = TYPE_N_BASECLASSES (type); i < nfields; i++)
-    {
-      int accflags;
-      int boffset;
-
-      if (fields == NULL)
-	{
-	  temp = clas;
-	  fields = value_struct_elt (&temp, NULL, "fields", NULL, "structure");
-	  field = value_ind (fields);
-	}
-      else
-	{			/* Re-use field value for next field.  */
-	  CORE_ADDR addr
-	    = value_address (field) + TYPE_LENGTH (value_type (field));
-
-	  set_value_address (field, addr);
-	  set_value_lazy (field, 1);
-	}
-      temp = field;
-      temp = value_struct_elt (&temp, NULL, "name", NULL, "structure");
-      TYPE_FIELD_NAME (type, i) =
-	get_java_utf8_name (&objfile->objfile_obstack, temp);
-      temp = field;
-      accflags = value_as_long (value_struct_elt (&temp, NULL, "accflags",
-						  NULL, "structure"));
-      temp = field;
-      temp = value_struct_elt (&temp, NULL, "info", NULL, "structure");
-      boffset = value_as_long (value_struct_elt (&temp, NULL, "boffset",
-						 NULL, "structure"));
-      if (accflags & 0x0001)	/* public access */
-	{
-	  /* ??? */
-	}
-      if (accflags & 0x0002)	/* private access */
-	{
-	  SET_TYPE_FIELD_PRIVATE (type, i);
-	}
-      if (accflags & 0x0004)	/* protected access */
-	{
-	  SET_TYPE_FIELD_PROTECTED (type, i);
-	}
-      if (accflags & 0x0008)	/* ACC_STATIC */
-	SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset);
-      else
-	SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
-      if (accflags & 0x8000)	/* FIELD_UNRESOLVED_FLAG */
-	{
-	  TYPE_FIELD_TYPE (type, i) = get_java_object_type ();	/* FIXME */
-	}
-      else
-	{
-	  struct type *ftype;
-
-	  temp = field;
-	  temp = value_struct_elt (&temp, NULL, "type", NULL, "structure");
-	  ftype = type_from_class (gdbarch, temp);
-	  if (TYPE_CODE (ftype) == TYPE_CODE_STRUCT)
-	    ftype = lookup_pointer_type (ftype);
-	  TYPE_FIELD_TYPE (type, i) = ftype;
-	}
-    }
-
-  temp = clas;
-  nmethods = value_as_long (value_struct_elt (&temp, NULL, "method_count",
-					      NULL, "structure"));
-  j = nmethods * sizeof (struct fn_field);
-  fn_fields = (struct fn_field *)
-    obstack_alloc (&objfile->objfile_obstack, j);
-  memset (fn_fields, 0, j);
-  fn_fieldlists = (struct fn_fieldlist *)
-    alloca (nmethods * sizeof (struct fn_fieldlist));
-
-  methods = NULL;
-  for (i = 0; i < nmethods; i++)
-    {
-      const char *mname;
-      int k;
-
-      if (methods == NULL)
-	{
-	  temp = clas;
-	  methods = value_struct_elt (&temp, NULL, "methods",
-				      NULL, "structure");
-	  method = value_ind (methods);
-	}
-      else
-	{			/* Re-use method value for next method.  */
-	  CORE_ADDR addr
-	    = value_address (method) + TYPE_LENGTH (value_type (method));
-
-	  set_value_address (method, addr);
-	  set_value_lazy (method, 1);
-	}
-
-      /* Get method name.  */
-      temp = method;
-      temp = value_struct_elt (&temp, NULL, "name", NULL, "structure");
-      mname = get_java_utf8_name (&objfile->objfile_obstack, temp);
-      if (strcmp (mname, "<init>") == 0)
-	mname = unqualified_name;
-
-      /* Check for an existing method with the same name.
-       * This makes building the fn_fieldslists an O(nmethods**2)
-       * operation.  That could be using hashing, but I doubt it
-       * is worth it.  Note that we do maintain the order of methods
-       * in the inferior's Method table (as long as that is grouped
-       * by method name), which I think is desirable.  --PB */
-      for (k = 0, j = TYPE_NFN_FIELDS (type);;)
-	{
-	  if (--j < 0)
-	    {			/* No match - new method name.  */
-	      j = TYPE_NFN_FIELDS (type)++;
-	      fn_fieldlists[j].name = mname;
-	      fn_fieldlists[j].length = 1;
-	      fn_fieldlists[j].fn_fields = &fn_fields[i];
-	      k = i;
-	      break;
-	    }
-	  if (strcmp (mname, fn_fieldlists[j].name) == 0)
-	    {		/* Found an existing method with the same name.  */
-	      int l;
-
-	      if (mname != unqualified_name)
-		obstack_free (&objfile->objfile_obstack, mname);
-	      mname = fn_fieldlists[j].name;
-	      fn_fieldlists[j].length++;
-	      k = i - k;	/* Index of new slot.  */
-	      /* Shift intervening fn_fields (between k and i) down.  */
-	      for (l = i; l > k; l--)
-		fn_fields[l] = fn_fields[l - 1];
-	      for (l = TYPE_NFN_FIELDS (type); --l > j;)
-		fn_fieldlists[l].fn_fields++;
-	      break;
-	    }
-	  k += fn_fieldlists[j].length;
-	}
-      fn_fields[k].physname = "";
-      fn_fields[k].is_stub = 1;
-      /* FIXME */
-      fn_fields[k].type = lookup_function_type
-			   (builtin_java_type (gdbarch)->builtin_void);
-      TYPE_CODE (fn_fields[k].type) = TYPE_CODE_METHOD;
-    }
-
-  j = TYPE_NFN_FIELDS (type) * sizeof (struct fn_fieldlist);
-  TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
-    obstack_alloc (&objfile->objfile_obstack, j);
-  memcpy (TYPE_FN_FIELDLISTS (type), fn_fieldlists, j);
-
-  return type;
-}
-
-struct type *
-get_java_object_type (void)
-{
-  struct symbol *sym;
-
-  sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, NULL);
-  if (sym == NULL)
-    error (_("cannot find java.lang.Object"));
-  return SYMBOL_TYPE (sym);
-}
-
-int
-get_java_object_header_size (struct gdbarch *gdbarch)
-{
-  struct type *objtype = get_java_object_type ();
-
-  if (objtype == NULL)
-    return (2 * gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
-  else
-    return TYPE_LENGTH (objtype);
-}
-
-int
-is_object_type (struct type *type)
-{
-  CHECK_TYPEDEF (type);
-  if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    {
-      struct type *ttype = check_typedef (TYPE_TARGET_TYPE (type));
-      const char *name;
-      if (TYPE_CODE (ttype) != TYPE_CODE_STRUCT)
-	return 0;
-      while (TYPE_N_BASECLASSES (ttype) > 0)
-	ttype = TYPE_BASECLASS (ttype, 0);
-      name = TYPE_TAG_NAME (ttype);
-      if (name != NULL && strcmp (name, "java.lang.Object") == 0)
-	return 1;
-      name
-	= TYPE_NFIELDS (ttype) > 0 ? TYPE_FIELD_NAME (ttype, 0) : (char *) 0;
-      if (name != NULL && strcmp (name, "vtable") == 0)
-	return 1;
-    }
-  return 0;
-}
-
-struct type *
-java_primitive_type (struct gdbarch *gdbarch, int signature)
-{
-  const struct builtin_java_type *builtin = builtin_java_type (gdbarch);
-
-  switch (signature)
-    {
-    case 'B':
-      return builtin->builtin_byte;
-    case 'S':
-      return builtin->builtin_short;
-    case 'I':
-      return builtin->builtin_int;
-    case 'J':
-      return builtin->builtin_long;
-    case 'Z':
-      return builtin->builtin_boolean;
-    case 'C':
-      return builtin->builtin_char;
-    case 'F':
-      return builtin->builtin_float;
-    case 'D':
-      return builtin->builtin_double;
-    case 'V':
-      return builtin->builtin_void;
-    }
-  error (_("unknown signature '%c' for primitive type"), (char) signature);
-}
-
-/* If name[0 .. namelen-1] is the name of a primitive Java type,
-   return that type.  Otherwise, return NULL.  */
-
-struct type *
-java_primitive_type_from_name (struct gdbarch *gdbarch,
-			       const char *name, int namelen)
-{
-  const struct builtin_java_type *builtin = builtin_java_type (gdbarch);
-
-  switch (name[0])
-    {
-    case 'b':
-      if (namelen == 4 && memcmp (name, "byte", 4) == 0)
-	return builtin->builtin_byte;
-      if (namelen == 7 && memcmp (name, "boolean", 7) == 0)
-	return builtin->builtin_boolean;
-      break;
-    case 'c':
-      if (namelen == 4 && memcmp (name, "char", 4) == 0)
-	return builtin->builtin_char;
-      break;
-    case 'd':
-      if (namelen == 6 && memcmp (name, "double", 6) == 0)
-	return builtin->builtin_double;
-      break;
-    case 'f':
-      if (namelen == 5 && memcmp (name, "float", 5) == 0)
-	return builtin->builtin_float;
-      break;
-    case 'i':
-      if (namelen == 3 && memcmp (name, "int", 3) == 0)
-	return builtin->builtin_int;
-      break;
-    case 'l':
-      if (namelen == 4 && memcmp (name, "long", 4) == 0)
-	return builtin->builtin_long;
-      break;
-    case 's':
-      if (namelen == 5 && memcmp (name, "short", 5) == 0)
-	return builtin->builtin_short;
-      break;
-    case 'v':
-      if (namelen == 4 && memcmp (name, "void", 4) == 0)
-	return builtin->builtin_void;
-      break;
-    }
-  return NULL;
-}
-
-static char *
-java_primitive_type_name (int signature)
-{
-  switch (signature)
-    {
-    case 'B':
-      return "byte";
-    case 'S':
-      return "short";
-    case 'I':
-      return "int";
-    case 'J':
-      return "long";
-    case 'Z':
-      return "boolean";
-    case 'C':
-      return "char";
-    case 'F':
-      return "float";
-    case 'D':
-      return "double";
-    case 'V':
-      return "void";
-    }
-  error (_("unknown signature '%c' for primitive type"), (char) signature);
-}
-
-/* Return the length (in bytes) of demangled name of the Java type
-   signature string SIGNATURE.  */
-
-static int
-java_demangled_signature_length (const char *signature)
-{
-  int array = 0;
-
-  for (; *signature == '['; signature++)
-    array += 2;			/* Two chars for "[]".  */
-  switch (signature[0])
-    {
-    case 'L':
-      /* Subtract 2 for 'L' and ';'.  */
-      return strlen (signature) - 2 + array;
-    default:
-      return strlen (java_primitive_type_name (signature[0])) + array;
-    }
-}
-
-/* Demangle the Java type signature SIGNATURE, leaving the result in
-   RESULT.  */
-
-static void
-java_demangled_signature_copy (char *result, const char *signature)
-{
-  int array = 0;
-  char *ptr;
-  int i;
-
-  while (*signature == '[')
-    {
-      array++;
-      signature++;
-    }
-  switch (signature[0])
-    {
-    case 'L':
-      /* Subtract 2 for 'L' and ';', but add 1 for final nul.  */
-      signature++;
-      ptr = result;
-      for (; *signature != ';' && *signature != '\0'; signature++)
-	{
-	  if (*signature == '/')
-	    *ptr++ = '.';
-	  else
-	    *ptr++ = *signature;
-	}
-      break;
-    default:
-      ptr = java_primitive_type_name (signature[0]);
-      i = strlen (ptr);
-      strcpy (result, ptr);
-      ptr = result + i;
-      break;
-    }
-  while (--array >= 0)
-    {
-      *ptr++ = '[';
-      *ptr++ = ']';
-    }
-}
-
-/* Return the demangled name of the Java type signature string SIGNATURE,
-   as a freshly allocated copy.  */
-
-char *
-java_demangle_type_signature (const char *signature)
-{
-  int length = java_demangled_signature_length (signature);
-  char *result = xmalloc (length + 1);
-
-  java_demangled_signature_copy (result, signature);
-  result[length] = '\0';
-  return result;
-}
-
-/* Return the type of TYPE followed by DIMS pairs of [ ].
-   If DIMS == 0, TYPE is returned.  */
-
-struct type *
-java_array_type (struct type *type, int dims)
-{
-  while (dims-- > 0)
-    {
-      /* FIXME  This is bogus!  Java arrays are not gdb arrays!  */
-      type = lookup_array_range_type (type, 0, 0);
-    }
-
-  return type;
-}
-
-/* Create a Java string in the inferior from a (Utf8) literal.  */
-
-static struct value *
-java_value_string (char *ptr, int len)
-{
-  error (_("not implemented - java_value_string"));	/* FIXME */
-}
-
-/* Return the encoding that should be used for the character type
-   TYPE.  */
-
-static const char *
-java_get_encoding (struct type *type)
-{
-  struct gdbarch *arch = get_type_arch (type);
-  const char *encoding;
-
-  if (type == builtin_java_type (arch)->builtin_char)
-    {
-      if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG)
-	encoding = "UTF-16BE";
-      else
-	encoding = "UTF-16LE";
-    }
-  else
-    encoding = target_charset (arch);
-
-  return encoding;
-}
-
-/* Print the character C on STREAM as part of the contents of a literal
-   string whose delimiter is QUOTER.  Note that that format for printing
-   characters and strings is language specific.  */
-
-static void
-java_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
-{
-  const char *encoding = java_get_encoding (type);
-
-  generic_emit_char (c, type, stream, quoter, encoding);
-}
-
-/* Implementation of la_printchar method.  */
-
-static void
-java_printchar (int c, struct type *type, struct ui_file *stream)
-{
-  fputs_filtered ("'", stream);
-  LA_EMIT_CHAR (c, type, stream, '\'');
-  fputs_filtered ("'", stream);
-}
-
-/* Implementation of la_printstr method.  */
-
-static void
-java_printstr (struct ui_file *stream, struct type *type,
-	       const gdb_byte *string,
-	       unsigned int length, const char *encoding, int force_ellipses,
-	       const struct value_print_options *options)
-{
-  const char *type_encoding = java_get_encoding (type);
-
-  if (!encoding || !*encoding)
-    encoding = type_encoding;
-
-  generic_printstr (stream, type, string, length, encoding,
-		    force_ellipses, '"', 0, options);
-}
-
-static struct value *
-evaluate_subexp_java (struct type *expect_type, struct expression *exp,
-		      int *pos, enum noside noside)
-{
-  int pc = *pos;
-  int i;
-  const char *name;
-  enum exp_opcode op = exp->elts[*pos].opcode;
-  struct value *arg1;
-  struct value *arg2;
-  struct type *type;
-
-  switch (op)
-    {
-    case UNOP_IND:
-      if (noside == EVAL_SKIP)
-	goto standard;
-      (*pos)++;
-      arg1 = evaluate_subexp_java (NULL_TYPE, exp, pos, EVAL_NORMAL);
-      if (is_object_type (value_type (arg1)))
-	{
-	  struct type *type;
-
-	  type = type_from_class (exp->gdbarch, java_class_from_object (arg1));
-	  arg1 = value_cast (lookup_pointer_type (type), arg1);
-	}
-      return value_ind (arg1);
-
-    case BINOP_SUBSCRIPT:
-      (*pos)++;
-      arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
-      arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
-      if (noside == EVAL_SKIP)
-	goto nosideret;
-      /* If the user attempts to subscript something that is not an
-         array or pointer type (like a plain int variable for example),
-         then report this as an error.  */
-
-      arg1 = coerce_ref (arg1);
-      type = check_typedef (value_type (arg1));
-      if (TYPE_CODE (type) == TYPE_CODE_PTR)
-	type = check_typedef (TYPE_TARGET_TYPE (type));
-      name = TYPE_NAME (type);
-      if (name == NULL)
-	name = TYPE_TAG_NAME (type);
-      i = name == NULL ? 0 : strlen (name);
-      if (TYPE_CODE (type) == TYPE_CODE_STRUCT
-	  && i > 2 && name[i - 1] == ']')
-	{
-	  enum bfd_endian byte_order = gdbarch_byte_order (exp->gdbarch);
-	  CORE_ADDR address;
-	  long length, index;
-	  struct type *el_type;
-	  gdb_byte buf4[4];
-
-	  struct value *clas = java_class_from_object (arg1);
-	  struct value *temp = clas;
-	  /* Get CLASS_ELEMENT_TYPE of the array type.  */
-	  temp = value_struct_elt (&temp, NULL, "methods",
-				   NULL, "structure");
-	  deprecated_set_value_type (temp, value_type (clas));
-	  el_type = type_from_class (exp->gdbarch, temp);
-	  if (TYPE_CODE (el_type) == TYPE_CODE_STRUCT)
-	    el_type = lookup_pointer_type (el_type);
-
-	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (el_type, VALUE_LVAL (arg1));
-	  address = value_as_address (arg1);
-	  address += get_java_object_header_size (exp->gdbarch);
-	  read_memory (address, buf4, 4);
-	  length = (long) extract_signed_integer (buf4, 4, byte_order);
-	  index = (long) value_as_long (arg2);
-	  if (index >= length || index < 0)
-	    error (_("array index (%ld) out of bounds (length: %ld)"),
-		   index, length);
-	  address = (address + 4) + index * TYPE_LENGTH (el_type);
-	  return value_at (el_type, address);
-	}
-      else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
-	{
-	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (TYPE_TARGET_TYPE (type), VALUE_LVAL (arg1));
-	  else
-	    return value_subscript (arg1, value_as_long (arg2));
-	}
-      if (name)
-	error (_("cannot subscript something of type `%s'"), name);
-      else
-	error (_("cannot subscript requested type"));
-
-    case OP_STRING:
-      (*pos)++;
-      i = longest_to_int (exp->elts[pc + 1].longconst);
-      (*pos) += 3 + BYTES_TO_EXP_ELEM (i + 1);
-      if (noside == EVAL_SKIP)
-	goto nosideret;
-      return java_value_string (&exp->elts[pc + 2].string, i);
-
-    case STRUCTOP_PTR:
-      arg1 = evaluate_subexp_standard (expect_type, exp, pos, noside);
-      /* Convert object field (such as TYPE.class) to reference.  */
-      if (TYPE_CODE (value_type (arg1)) == TYPE_CODE_STRUCT)
-	arg1 = value_addr (arg1);
-      return arg1;
-    default:
-      break;
-    }
-standard:
-  return evaluate_subexp_standard (expect_type, exp, pos, noside);
-nosideret:
-  return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1);
-}
-
-static char *java_demangle (const char *mangled, int options)
-{
-  return gdb_demangle (mangled, options | DMGL_JAVA);
-}
-
-/* Find the member function name of the demangled name NAME.  NAME
-   must be a method name including arguments, in order to correctly
-   locate the last component.
-
-   This function return a pointer to the first dot before the
-   member function name, or NULL if the name was not of the
-   expected form.  */
-
-static const char *
-java_find_last_component (const char *name)
-{
-  const char *p;
-
-  /* Find argument list.  */
-  p = strchr (name, '(');
-
-  if (p == NULL)
-    return NULL;
-
-  /* Back up and find first dot prior to argument list.  */
-  while (p > name && *p != '.')
-    p--;
-
-  if (p == name)
-    return NULL;
-
-  return p;
-}
-
-/* Return the name of the class containing method PHYSNAME.  */
-
-static char *
-java_class_name_from_physname (const char *physname) 
-{
-  char *ret = NULL;
-  const char *end;
-  char *demangled_name = java_demangle (physname, DMGL_PARAMS | DMGL_ANSI);
-
-  if (demangled_name == NULL)
-    return NULL;
-
-  end = java_find_last_component (demangled_name);
-  if (end != NULL)
-    {
-      ret = xmalloc (end - demangled_name + 1);
-      memcpy (ret, demangled_name, end - demangled_name);
-      ret[end - demangled_name] = '\0';
-    }
-
-  xfree (demangled_name);
-  return ret;
-}
-
-/* Table mapping opcodes into strings for printing operators
-   and precedences of the operators.  */
-
-const struct op_print java_op_print_tab[] =
-{
-  {",", BINOP_COMMA, PREC_COMMA, 0},
-  {"=", BINOP_ASSIGN, PREC_ASSIGN, 1},
-  {"||", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
-  {"&&", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
-  {"|", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
-  {"^", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
-  {"&", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
-  {"==", BINOP_EQUAL, PREC_EQUAL, 0},
-  {"!=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
-  {"<=", BINOP_LEQ, PREC_ORDER, 0},
-  {">=", BINOP_GEQ, PREC_ORDER, 0},
-  {">", BINOP_GTR, PREC_ORDER, 0},
-  {"<", BINOP_LESS, PREC_ORDER, 0},
-  {">>", BINOP_RSH, PREC_SHIFT, 0},
-  {"<<", BINOP_LSH, PREC_SHIFT, 0},
-  {"+", BINOP_ADD, PREC_ADD, 0},
-  {"-", BINOP_SUB, PREC_ADD, 0},
-  {"*", BINOP_MUL, PREC_MUL, 0},
-  {"/", BINOP_DIV, PREC_MUL, 0},
-  {"%", BINOP_REM, PREC_MUL, 0},
-  {"-", UNOP_NEG, PREC_PREFIX, 0},
-  {"!", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
-  {"~", UNOP_COMPLEMENT, PREC_PREFIX, 0},
-  {"*", UNOP_IND, PREC_PREFIX, 0},
-  {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
-  {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
-  {NULL, 0, 0, 0}
-};
-
-enum java_primitive_types
-{
-  java_primitive_type_int,
-  java_primitive_type_short,
-  java_primitive_type_long,
-  java_primitive_type_byte,
-  java_primitive_type_boolean,
-  java_primitive_type_char,
-  java_primitive_type_float,
-  java_primitive_type_double,
-  java_primitive_type_void,
-  nr_java_primitive_types
-};
-
-static void
-java_language_arch_info (struct gdbarch *gdbarch,
-			 struct language_arch_info *lai)
-{
-  const struct builtin_java_type *builtin = builtin_java_type (gdbarch);
-
-  lai->string_char_type = builtin->builtin_char;
-  lai->primitive_type_vector
-    = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_java_primitive_types + 1,
-                              struct type *);
-  lai->primitive_type_vector [java_primitive_type_int]
-    = builtin->builtin_int;
-  lai->primitive_type_vector [java_primitive_type_short]
-    = builtin->builtin_short;
-  lai->primitive_type_vector [java_primitive_type_long]
-    = builtin->builtin_long;
-  lai->primitive_type_vector [java_primitive_type_byte]
-    = builtin->builtin_byte;
-  lai->primitive_type_vector [java_primitive_type_boolean]
-    = builtin->builtin_boolean;
-  lai->primitive_type_vector [java_primitive_type_char]
-    = builtin->builtin_char;
-  lai->primitive_type_vector [java_primitive_type_float]
-    = builtin->builtin_float;
-  lai->primitive_type_vector [java_primitive_type_double]
-    = builtin->builtin_double;
-  lai->primitive_type_vector [java_primitive_type_void]
-    = builtin->builtin_void;
-
-  lai->bool_type_symbol = "boolean";
-  lai->bool_type_default = builtin->builtin_boolean;
-}
-
-const struct exp_descriptor exp_descriptor_java = 
-{
-  print_subexp_standard,
-  operator_length_standard,
-  operator_check_standard,
-  op_name_standard,
-  dump_subexp_body_standard,
-  evaluate_subexp_java
-};
-
-const struct language_defn java_language_defn =
-{
-  "java",			/* Language name */
-  "Java",
-  language_java,
-  range_check_off,
-  case_sensitive_on,
-  array_row_major,
-  macro_expansion_no,
-  &exp_descriptor_java,
-  java_parse,
-  java_error,
-  null_post_parser,
-  java_printchar,		/* Print a character constant */
-  java_printstr,		/* Function to print string constant */
-  java_emit_char,		/* Function to print a single character */
-  java_print_type,		/* Print a type using appropriate syntax */
-  default_print_typedef,	/* Print a typedef using appropriate syntax */
-  java_val_print,		/* Print a value using appropriate syntax */
-  java_value_print,		/* Print a top-level value */
-  default_read_var_value,	/* la_read_var_value */
-  NULL,				/* Language specific skip_trampoline */
-  "this",	                /* name_of_this */
-  basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
-  basic_lookup_transparent_type,/* lookup_transparent_type */
-  java_demangle,		/* Language specific symbol demangler */
-  java_class_name_from_physname,/* Language specific class name */
-  java_op_print_tab,		/* expression operators for printing */
-  0,				/* not c-style arrays */
-  0,				/* String lower bound */
-  default_word_break_characters,
-  default_make_symbol_completion_list,
-  java_language_arch_info,
-  default_print_array_index,
-  default_pass_by_reference,
-  default_get_string,
-  NULL,				/* la_get_symbol_name_cmp */
-  iterate_over_symbols,
-  &java_varobj_ops,
-  NULL,
-  NULL,
-  LANG_MAGIC
-};
-
-static void *
-build_java_types (struct gdbarch *gdbarch)
-{
-  struct builtin_java_type *builtin_java_type
-    = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct builtin_java_type);
-
-  builtin_java_type->builtin_int
-    = arch_integer_type (gdbarch, 32, 0, "int");
-  builtin_java_type->builtin_short
-    = arch_integer_type (gdbarch, 16, 0, "short");
-  builtin_java_type->builtin_long
-    = arch_integer_type (gdbarch, 64, 0, "long");
-  builtin_java_type->builtin_byte
-    = arch_integer_type (gdbarch, 8, 0, "byte");
-  builtin_java_type->builtin_boolean
-    = arch_boolean_type (gdbarch, 8, 0, "boolean");
-  builtin_java_type->builtin_char
-    = arch_character_type (gdbarch, 16, 1, "char");
-  builtin_java_type->builtin_float
-    = arch_float_type (gdbarch, 32, "float", NULL);
-  builtin_java_type->builtin_double
-    = arch_float_type (gdbarch, 64, "double", NULL);
-  builtin_java_type->builtin_void
-    = arch_type (gdbarch, TYPE_CODE_VOID, 1, "void");
-
-  return builtin_java_type;
-}
-
-static struct gdbarch_data *java_type_data;
-
-const struct builtin_java_type *
-builtin_java_type (struct gdbarch *gdbarch)
-{
-  return gdbarch_data (gdbarch, java_type_data);
-}
-
-void
-_initialize_java_language (void)
-{
-  jv_dynamics_objfile_data_key
-    = register_objfile_data_with_cleanup (NULL, jv_per_objfile_free);
-  jv_dynamics_progspace_key = register_program_space_data ();
-
-  java_type_data = gdbarch_data_register_post_init (build_java_types);
-
-  add_language (&java_language_defn);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-lang.h ./gdb/jv-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-lang.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,79 +0,0 @@
-/* Java language support definitions for GDB, the GNU debugger.
-
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef JV_LANG_H
-#define JV_LANG_H
-
-struct value;
-struct type_print_options;
-struct parser_state;
-
-extern int java_parse (struct parser_state *); /* Defined in jv-exp.y */
-
-extern void java_error (char *);	/* Defined in jv-exp.y */
-
-struct builtin_java_type
-{
-  struct type *builtin_int;
-  struct type *builtin_byte;
-  struct type *builtin_short;
-  struct type *builtin_long;
-  struct type *builtin_boolean;
-  struct type *builtin_char;
-  struct type *builtin_float;
-  struct type *builtin_double;
-  struct type *builtin_void;
-};
-
-extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
-
-extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-			    struct ui_file *, int,
-			    const struct value *,
-			    const struct value_print_options *);
-
-extern void java_value_print (struct value *, struct ui_file *,
-			      const struct value_print_options *);
-
-extern struct value *java_class_from_object (struct value *);
-
-extern struct type *type_from_class (struct gdbarch *, struct value *);
-
-extern struct type *java_primitive_type (struct gdbarch *, int signature);
-
-extern struct type *java_primitive_type_from_name (struct gdbarch *,
-						   const char *, int);
-
-extern struct type *java_array_type (struct type *, int);
-
-extern struct type *get_java_object_type (void);
-extern int get_java_object_header_size (struct gdbarch *);
-
-extern struct type *java_lookup_class (char *);
-
-extern int is_object_type (struct type *);
-
-/* Defined in jv-typeprint.c */
-extern void java_print_type (struct type *, const char *,
-			     struct ui_file *, int, int,
-			     const struct type_print_options *);
-
-extern char *java_demangle_type_signature (const char *);
-
-#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-typeprint.c ./gdb/jv-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-typeprint.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,354 +0,0 @@
-/* Support for printing Java types for GDB, the GNU debugger.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "value.h"
-#include "demangle.h"
-#include "gdb-demangle.h"
-#include "jv-lang.h"
-#include "typeprint.h"
-#include "c-lang.h"
-#include "cp-abi.h"
-#include "cp-support.h"
-
-/* Local functions */
-
-static void java_type_print_base (struct type * type,
-				  struct ui_file *stream, int show,
-				  int level,
-				  const struct type_print_options *flags);
-
-static void
-java_type_print_derivation_info (struct ui_file *stream, struct type *type)
-{
-  const char *name;
-  int i;
-  int n_bases;
-  int prev;
-
-  n_bases = TYPE_N_BASECLASSES (type);
-
-  for (i = 0, prev = 0; i < n_bases; i++)
-    {
-      int kind;
-
-      kind = BASETYPE_VIA_VIRTUAL (type, i) ? 'I' : 'E';
-
-      fputs_filtered (kind == prev ? ", "
-		      : kind == 'I' ? " implements "
-		      : " extends ",
-		      stream);
-      prev = kind;
-      name = type_name_no_tag (TYPE_BASECLASS (type, i));
-
-      fprintf_filtered (stream, "%s", name ? name : "(null)");
-    }
-
-  if (i > 0)
-    fputs_filtered (" ", stream);
-}
-
-/* Print the name of the type (or the ultimate pointer target,
-   function value or array element), or the description of a
-   structure or union.
-
-   SHOW positive means print details about the type (e.g. enum values),
-   and print structure elements passing SHOW - 1 for show.
-   SHOW negative means just print the type name or struct tag if there is one.
-   If there is no name, print something sensible but concise like
-   "struct {...}".
-   SHOW zero means just print the type name or struct tag if there is one.
-   If there is no name, print something sensible but not as concise like
-   "struct {int x; int y;}".
-
-   LEVEL is the number of spaces to indent by.
-   We increase it for some recursive calls.  */
-
-static void
-java_type_print_base (struct type *type, struct ui_file *stream, int show,
-		      int level, const struct type_print_options *flags)
-{
-  int i;
-  int len;
-  char *mangled_name;
-  char *demangled_name;
-
-  QUIT;
-  wrap_here ("    ");
-
-  if (type == NULL)
-    {
-      fputs_filtered ("<type unknown>", stream);
-      return;
-    }
-
-  /* When SHOW is zero or less, and there is a valid type name, then always
-     just print the type name directly from the type.  */
-
-  if (show <= 0
-      && TYPE_NAME (type) != NULL)
-    {
-      fputs_filtered (TYPE_NAME (type), stream);
-      return;
-    }
-
-  CHECK_TYPEDEF (type);
-
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_PTR:
-      java_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level,
-			    flags);
-      break;
-
-    case TYPE_CODE_STRUCT:
-      if (TYPE_TAG_NAME (type) != NULL && TYPE_TAG_NAME (type)[0] == '[')
-	{			/* array type */
-	  char *name = java_demangle_type_signature (TYPE_TAG_NAME (type));
-
-	  fputs_filtered (name, stream);
-	  xfree (name);
-	  break;
-	}
-
-      if (show >= 0)
-	fprintf_filtered (stream, "class ");
-
-      if (TYPE_TAG_NAME (type) != NULL)
-	{
-	  fputs_filtered (TYPE_TAG_NAME (type), stream);
-	  if (show > 0)
-	    fputs_filtered (" ", stream);
-	}
-
-      wrap_here ("    ");
-
-      if (show < 0)
-	{
-	  /* If we just printed a tag name, no need to print anything else.  */
-	  if (TYPE_TAG_NAME (type) == NULL)
-	    fprintf_filtered (stream, "{...}");
-	}
-      else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
-	{
-	  java_type_print_derivation_info (stream, type);
-
-	  fprintf_filtered (stream, "{\n");
-	  if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
-	    {
-	      if (TYPE_STUB (type))
-		fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
-	      else
-		fprintfi_filtered (level + 4, stream, "<no data fields>\n");
-	    }
-
-	  /* If there is a base class for this type,
-	     do not print the field that it occupies.  */
-
-	  len = TYPE_NFIELDS (type);
-	  for (i = TYPE_N_BASECLASSES (type); i < len; i++)
-	    {
-	      QUIT;
-	      /* Don't print out virtual function table.  */
-	      if (startswith (TYPE_FIELD_NAME (type, i), "_vptr")
-		  && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
-		continue;
-
-	      /* Don't print the dummy field "class".  */
-	      if (startswith (TYPE_FIELD_NAME (type, i), "class"))
-		continue;
-
-	      print_spaces_filtered (level + 4, stream);
-
-	      if (HAVE_CPLUS_STRUCT (type))
-		{
-		  if (TYPE_FIELD_PROTECTED (type, i))
-		    fprintf_filtered (stream, "protected ");
-		  else if (TYPE_FIELD_PRIVATE (type, i))
-		    fprintf_filtered (stream, "private ");
-		  else
-		    fprintf_filtered (stream, "public ");
-		}
-
-	      if (field_is_static (&TYPE_FIELD (type, i)))
-		fprintf_filtered (stream, "static ");
-
-	      java_print_type (TYPE_FIELD_TYPE (type, i),
-			       TYPE_FIELD_NAME (type, i),
-			       stream, show - 1, level + 4, flags);
-
-	      fprintf_filtered (stream, ";\n");
-	    }
-
-	  /* If there are both fields and methods, put a space between.  */
-	  len = TYPE_NFN_FIELDS (type);
-	  if (len)
-	    fprintf_filtered (stream, "\n");
-
-	  /* Print out the methods.  */
-
-	  for (i = 0; i < len; i++)
-	    {
-	      struct fn_field *f;
-	      int j;
-	      const char *method_name;
-	      const char *name;
-	      int is_constructor;
-	      int n_overloads;
-
-	      f = TYPE_FN_FIELDLIST1 (type, i);
-	      n_overloads = TYPE_FN_FIELDLIST_LENGTH (type, i);
-	      method_name = TYPE_FN_FIELDLIST_NAME (type, i);
-	      name = type_name_no_tag (type);
-	      is_constructor = name && strcmp (method_name, name) == 0;
-
-	      for (j = 0; j < n_overloads; j++)
-		{
-		  const char *real_physname;
-		  char *physname, *p;
-		  int is_full_physname_constructor;
-
-		  real_physname = TYPE_FN_FIELD_PHYSNAME (f, j);
-
-		  /* The physname will contain the return type
-		     after the final closing parenthesis.  Strip it off.  */
-		  p = strrchr (real_physname, ')');
-		  gdb_assert (p != NULL);
-		  ++p;   /* Keep the trailing ')'.  */
-		  physname = alloca (p - real_physname + 1);
-		  memcpy (physname, real_physname, p - real_physname);
-		  physname[p - real_physname] = '\0';
-
-		  is_full_physname_constructor
-                    = (TYPE_FN_FIELD_CONSTRUCTOR (f, j)
-		       || is_constructor_name (physname)
-                       || is_destructor_name (physname));
-
-		  QUIT;
-
-		  print_spaces_filtered (level + 4, stream);
-
-		  if (TYPE_FN_FIELD_PROTECTED (f, j))
-		    fprintf_filtered (stream, "protected ");
-		  else if (TYPE_FN_FIELD_PRIVATE (f, j))
-		    fprintf_filtered (stream, "private ");
-		  else if (TYPE_FN_FIELD_PUBLIC (f, j))
-		    fprintf_filtered (stream, "public ");
-
-		  if (TYPE_FN_FIELD_ABSTRACT (f, j))
-		    fprintf_filtered (stream, "abstract ");
-		  if (TYPE_FN_FIELD_STATIC (f, j))
-		    fprintf_filtered (stream, "static ");
-		  if (TYPE_FN_FIELD_FINAL (f, j))
-		    fprintf_filtered (stream, "final ");
-		  if (TYPE_FN_FIELD_SYNCHRONIZED (f, j))
-		    fprintf_filtered (stream, "synchronized ");
-		  if (TYPE_FN_FIELD_NATIVE (f, j))
-		    fprintf_filtered (stream, "native ");
-
-		  if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
-		    {
-		      /* Keep GDB from crashing here.  */
-		      fprintf_filtered (stream, "<undefined type> %s;\n",
-					TYPE_FN_FIELD_PHYSNAME (f, j));
-		      break;
-		    }
-		  else if (!is_constructor && !is_full_physname_constructor)
-		    {
-		      type_print (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)),
-				  "", stream, -1);
-		      fputs_filtered (" ", stream);
-		    }
-
-		  if (TYPE_FN_FIELD_STUB (f, j))
-		    /* Build something we can demangle.  */
-		    mangled_name = gdb_mangle_name (type, i, j);
-		  else
-		    mangled_name = physname;
-
-		  demangled_name =
-		    gdb_demangle (mangled_name,
-				  DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
-
-		  if (demangled_name == NULL)
-		    demangled_name = xstrdup (mangled_name);
-
-		  {
-		    char *demangled_no_class;
-		    char *ptr;
-
-		    ptr = demangled_no_class = demangled_name;
-
-		    while (1)
-		      {
-			char c;
-
-			c = *ptr++;
-
-			if (c == 0 || c == '(')
-			  break;
-			if (c == '.')
-			  demangled_no_class = ptr;
-		      }
-
-		    fputs_filtered (demangled_no_class, stream);
-		    xfree (demangled_name);
-		  }
-
-		  if (TYPE_FN_FIELD_STUB (f, j))
-		    xfree (mangled_name);
-
-		  fprintf_filtered (stream, ";\n");
-		}
-	    }
-
-	  fprintfi_filtered (level, stream, "}");
-	}
-      break;
-
-    default:
-      c_type_print_base (type, stream, show, level, flags);
-    }
-}
-
-/* LEVEL is the depth to indent lines by.  */
-
-void
-java_print_type (struct type *type, const char *varstring,
-		 struct ui_file *stream, int show, int level,
-		 const struct type_print_options *flags)
-{
-  int demangled_args;
-
-  java_type_print_base (type, stream, show, level, flags);
-
-  if (varstring != NULL && *varstring != '\0')
-    {
-      fputs_filtered (" ", stream);
-      fputs_filtered (varstring, stream);
-    }
-
-  /* For demangled function names, we have the arglist as part of the name,
-     so don't print an additional pair of ()'s.  */
-
-  demangled_args = varstring != NULL && strchr (varstring, '(') != NULL;
-  c_type_print_varspec_suffix (type, stream, show, 0, demangled_args, flags);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-valprint.c ./gdb/jv-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-valprint.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,531 +0,0 @@
-/* Support for printing Java values for GDB, the GNU debugger.
-
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "gdbcore.h"
-#include "expression.h"
-#include "value.h"
-#include "demangle.h"
-#include "valprint.h"
-#include "language.h"
-#include "jv-lang.h"
-#include "c-lang.h"
-#include "annotate.h"
-/* Local functions */
-
-void
-java_value_print (struct value *val, struct ui_file *stream, 
-		  const struct value_print_options *options)
-{
-  struct gdbarch *gdbarch = get_type_arch (value_type (val));
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct type *type;
-  CORE_ADDR address;
-  int i;
-  const char *name;
-  struct value_print_options opts;
-
-  type = value_type (val);
-  address = value_address (val);
-
-  if (is_object_type (type))
-    {
-      CORE_ADDR obj_addr;
-      struct value *tem = val;
-
-      /* Get the run-time type, and cast the object into that.  */
-      while (TYPE_CODE (value_type (tem)) == TYPE_CODE_PTR)
-	tem = value_ind (tem);
-
-      obj_addr = value_address (tem);
-
-      if (obj_addr != 0)
-	{
-	  type = type_from_class (gdbarch, java_class_from_object (val));
-	  type = lookup_pointer_type (type);
-
-	  val = value_at (type, address);
-	  type = value_type (val);
-	}
-    }
-
-  if (TYPE_CODE (type) == TYPE_CODE_PTR && !value_logical_not (val))
-    type_print (TYPE_TARGET_TYPE (type), "", stream, -1);
-
-  name = TYPE_TAG_NAME (type);
-  if (TYPE_CODE (type) == TYPE_CODE_STRUCT && name != NULL
-      && (i = strlen (name), name[i - 1] == ']'))
-    {
-      gdb_byte buf4[4];
-      long length;
-      unsigned int things_printed = 0;
-      int reps;
-      struct type *el_type
-	= java_primitive_type_from_name (gdbarch, name, i - 2);
-
-      i = 0;
-      read_memory (address + get_java_object_header_size (gdbarch), buf4, 4);
-
-      length = (long) extract_signed_integer (buf4, 4, byte_order);
-      fprintf_filtered (stream, "{length: %ld", length);
-
-      if (el_type == NULL)
-	{
-	  CORE_ADDR element;
-	  CORE_ADDR next_element = -1; /* Dummy initial value.  */
-
-	  /* Skip object header and length.  */
-	  address += get_java_object_header_size (gdbarch) + 4;
-
-	  while (i < length && things_printed < options->print_max)
-	    {
-	      gdb_byte *buf;
-
-	      buf = alloca (gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT);
-	      fputs_filtered (", ", stream);
-	      wrap_here (n_spaces (2));
-
-	      if (i > 0)
-		element = next_element;
-	      else
-		{
-		  read_memory (address, buf, sizeof (buf));
-		  address += gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT;
-		  /* FIXME: cagney/2003-05-24: Bogus or what.  It
-                     pulls a host sized pointer out of the target and
-                     then extracts that as an address (while assuming
-                     that the address is unsigned)!  */
-		  element = extract_unsigned_integer (buf, sizeof (buf),
-						      byte_order);
-		}
-
-	      for (reps = 1; i + reps < length; reps++)
-		{
-		  read_memory (address, buf, sizeof (buf));
-		  address += gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT;
-		  /* FIXME: cagney/2003-05-24: Bogus or what.  It
-                     pulls a host sized pointer out of the target and
-                     then extracts that as an address (while assuming
-                     that the address is unsigned)!  */
-		  next_element = extract_unsigned_integer (buf, sizeof (buf),
-							   byte_order);
-		  if (next_element != element)
-		    break;
-		}
-
-	      if (reps == 1)
-		fprintf_filtered (stream, "%d: ", i);
-	      else
-		fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);
-
-	      if (element == 0)
-		fprintf_filtered (stream, "null");
-	      else
-		fprintf_filtered (stream, "@%s", paddress (gdbarch, element));
-
-	      things_printed++;
-	      i += reps;
-	    }
-	}
-      else
-	{
-	  struct value *v = allocate_value (el_type);
-	  struct value *next_v = allocate_value (el_type);
-
-	  set_value_address (v, (address
-				 + get_java_object_header_size (gdbarch) + 4));
-	  set_value_address (next_v, value_raw_address (v));
-
-	  while (i < length && things_printed < options->print_max)
-	    {
-	      fputs_filtered (", ", stream);
-	      wrap_here (n_spaces (2));
-
-	      if (i > 0)
-		{
-		  struct value *tmp;
-
-		  tmp = next_v;
-		  next_v = v;
-		  v = tmp;
-		}
-	      else
-		{
-		  set_value_lazy (v, 1);
-		  set_value_offset (v, 0);
-		}
-
-	      set_value_offset (next_v, value_offset (v));
-
-	      for (reps = 1; i + reps < length; reps++)
-		{
-		  set_value_lazy (next_v, 1);
-		  set_value_offset (next_v, value_offset (next_v)
-				    + TYPE_LENGTH (el_type));
-		  value_fetch_lazy (next_v);
-		  if (!value_contents_eq (v, value_embedded_offset (v),
-					  next_v,
-					  value_embedded_offset (next_v),
-					  TYPE_LENGTH (el_type)))
-		    break;
-		}
-
-	      if (reps == 1)
-		fprintf_filtered (stream, "%d: ", i);
-	      else
-		fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);
-
-	      opts = *options;
-	      opts.deref_ref = 1;
-	      common_val_print (v, stream, 1, &opts, current_language);
-
-	      things_printed++;
-	      i += reps;
-	    }
-	}
-
-      if (i < length)
-	fprintf_filtered (stream, "...");
-
-      fprintf_filtered (stream, "}");
-
-      return;
-    }
-
-  /* If it's type String, print it.  */
-
-  if (TYPE_CODE (type) == TYPE_CODE_PTR
-      && TYPE_TARGET_TYPE (type)
-      && TYPE_TAG_NAME (TYPE_TARGET_TYPE (type))
-      && strcmp (TYPE_TAG_NAME (TYPE_TARGET_TYPE (type)),
-		 "java.lang.String") == 0
-      && (options->format == 0 || options->format == 's')
-      && address != 0
-      && value_as_address (val) != 0)
-    {
-      struct type *char_type;
-      struct value *data_val;
-      CORE_ADDR data;
-      struct value *boffset_val;
-      unsigned long boffset;
-      struct value *count_val;
-      unsigned long count;
-      struct value *mark;
-
-      fputs_filtered (" ", stream);
-
-      mark = value_mark ();	/* Remember start of new values.  */
-
-      data_val = value_struct_elt (&val, NULL, "data", NULL, NULL);
-      data = value_as_address (data_val);
-
-      boffset_val = value_struct_elt (&val, NULL, "boffset", NULL, NULL);
-      boffset = value_as_address (boffset_val);
-
-      count_val = value_struct_elt (&val, NULL, "count", NULL, NULL);
-      count = value_as_address (count_val);
-
-      value_free_to_mark (mark);	/* Release unnecessary values.  */
-
-      char_type = builtin_java_type (gdbarch)->builtin_char;
-      val_print_string (char_type, NULL, data + boffset, count, stream,
-			options);
-
-      return;
-    }
-
-  opts = *options;
-  opts.deref_ref = 1;
-  common_val_print (val, stream, 0, &opts, current_language);
-}
-
-/* TYPE, VALADDR, ADDRESS, STREAM, RECURSE, and OPTIONS have the
-   same meanings as in cp_print_value and c_val_print.
-
-   DONT_PRINT is an array of baseclass types that we
-   should not print, or zero if called from top level.  */
-
-static void
-java_print_value_fields (struct type *type, const gdb_byte *valaddr,
-			 int offset,
-			 CORE_ADDR address, struct ui_file *stream,
-			 int recurse,
-			 const struct value *val,
-			 const struct value_print_options *options)
-{
-  int i, len, n_baseclasses;
-
-  CHECK_TYPEDEF (type);
-
-  fprintf_filtered (stream, "{");
-  len = TYPE_NFIELDS (type);
-  n_baseclasses = TYPE_N_BASECLASSES (type);
-
-  if (n_baseclasses > 0)
-    {
-      int i, n_baseclasses = TYPE_N_BASECLASSES (type);
-
-      for (i = 0; i < n_baseclasses; i++)
-	{
-	  int boffset;
-	  struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
-	  const char *basename = TYPE_NAME (baseclass);
-	  const gdb_byte *base_valaddr;
-
-	  if (BASETYPE_VIA_VIRTUAL (type, i))
-	    continue;
-
-	  if (basename != NULL && strcmp (basename, "java.lang.Object") == 0)
-	    continue;
-
-	  boffset = 0;
-
-	  if (options->prettyformat)
-	    {
-	      fprintf_filtered (stream, "\n");
-	      print_spaces_filtered (2 * (recurse + 1), stream);
-	    }
-	  fputs_filtered ("<", stream);
-	  /* Not sure what the best notation is in the case where there is no
-	     baseclass name.  */
-	  fputs_filtered (basename ? basename : "", stream);
-	  fputs_filtered ("> = ", stream);
-
-	  base_valaddr = valaddr;
-
-	  java_print_value_fields (baseclass, base_valaddr,
-				   offset + boffset, address,
-				   stream, recurse + 1, val, options);
-	  fputs_filtered (", ", stream);
-	}
-    }
-
-  if (!len && n_baseclasses == 1)
-    fprintf_filtered (stream, "<No data fields>");
-  else
-    {
-      int fields_seen = 0;
-
-      for (i = n_baseclasses; i < len; i++)
-	{
-	  /* If requested, skip printing of static fields.  */
-	  if (field_is_static (&TYPE_FIELD (type, i)))
-	    {
-	      const char *name = TYPE_FIELD_NAME (type, i);
-
-	      if (!options->static_field_print)
-		continue;
-	      if (name != NULL && strcmp (name, "class") == 0)
-		continue;
-	    }
-	  if (fields_seen)
-	    fprintf_filtered (stream, ", ");
-	  else if (n_baseclasses > 0)
-	    {
-	      if (options->prettyformat)
-		{
-		  fprintf_filtered (stream, "\n");
-		  print_spaces_filtered (2 + 2 * recurse, stream);
-		  fputs_filtered ("members of ", stream);
-		  fputs_filtered (type_name_no_tag (type), stream);
-		  fputs_filtered (": ", stream);
-		}
-	    }
-	  fields_seen = 1;
-
-	  if (options->prettyformat)
-	    {
-	      fprintf_filtered (stream, "\n");
-	      print_spaces_filtered (2 + 2 * recurse, stream);
-	    }
-	  else
-	    {
-	      wrap_here (n_spaces (2 + 2 * recurse));
-	    }
-
-	  annotate_field_begin (TYPE_FIELD_TYPE (type, i));
-
-	  if (field_is_static (&TYPE_FIELD (type, i)))
-	    fputs_filtered ("static ", stream);
-	  fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
-				   language_cplus,
-				   DMGL_PARAMS | DMGL_ANSI);
-	  annotate_field_name_end ();
-	  fputs_filtered (": ", stream);
-	  annotate_field_value ();
-
-	  if (!field_is_static (&TYPE_FIELD (type, i))
-	      && TYPE_FIELD_PACKED (type, i))
-	    {
-	      struct value *v;
-
-	      /* Bitfields require special handling, especially due to byte
-	         order problems.  */
-	      if (TYPE_FIELD_IGNORE (type, i))
-		{
-		  fputs_filtered ("<optimized out or zero length>", stream);
-		}
-	      else if (value_bits_synthetic_pointer (val,
-						     TYPE_FIELD_BITPOS (type,
-									i),
-						     TYPE_FIELD_BITSIZE (type,
-									 i)))
-		{
-		  fputs_filtered (_("<synthetic pointer>"), stream);
-		}
-	      else
-		{
-		  struct value_print_options opts;
-
-		  v = value_field_bitfield (type, i, valaddr, offset, val);
-
-		  opts = *options;
-		  opts.deref_ref = 0;
-		  common_val_print (v, stream, recurse + 1,
-				    &opts, current_language);
-		}
-	    }
-	  else
-	    {
-	      if (TYPE_FIELD_IGNORE (type, i))
-		{
-		  fputs_filtered ("<optimized out or zero length>", stream);
-		}
-	      else if (field_is_static (&TYPE_FIELD (type, i)))
-		{
-		  struct value_print_options opts;
-		  struct value *v = value_static_field (type, i);
-		  struct type *t = check_typedef (value_type (v));
-
-		  if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
-		    v = value_addr (v);
-		  opts = *options;
-		  opts.deref_ref = 0;
-		  common_val_print (v, stream, recurse + 1,
-				    &opts, current_language);
-		}
-	      else if (TYPE_FIELD_TYPE (type, i) == NULL)
-		fputs_filtered ("<unknown type>", stream);
-	      else
-		{
-		  struct value_print_options opts = *options;
-
-		  opts.deref_ref = 0;
-		  val_print (TYPE_FIELD_TYPE (type, i),
-			     valaddr,
-			     offset + TYPE_FIELD_BITPOS (type, i) / 8,
-			     address, stream, recurse + 1, val, &opts,
-			     current_language);
-		}
-	    }
-	  annotate_field_end ();
-	}
-
-      if (options->prettyformat)
-	{
-	  fprintf_filtered (stream, "\n");
-	  print_spaces_filtered (2 * recurse, stream);
-	}
-    }
-  fprintf_filtered (stream, "}");
-}
-
-/* See val_print for a description of the various parameters of this
-   function; they are identical.  */
-
-void
-java_val_print (struct type *type, const gdb_byte *valaddr,
-		int embedded_offset, CORE_ADDR address,
-		struct ui_file *stream, int recurse,
-		const struct value *val,
-		const struct value_print_options *options)
-{
-  struct gdbarch *gdbarch = get_type_arch (type);
-  struct type *target_type;
-  CORE_ADDR addr;
-
-  CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_PTR:
-      if (options->format && options->format != 's')
-	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      val, options, 0, stream);
-	  break;
-	}
-      addr = unpack_pointer (type, valaddr + embedded_offset);
-      if (addr == 0)
-	{
-	  fputs_filtered ("null", stream);
-	  return;
-	}
-      target_type = check_typedef (TYPE_TARGET_TYPE (type));
-
-      if (TYPE_CODE (target_type) == TYPE_CODE_FUNC)
-	{
-	  /* Try to print what function it points to.  */
-	  print_address_demangle (options, gdbarch, addr, stream, demangle);
-	  return;
-	}
-
-      if (options->addressprint && options->format != 's')
-	{
-	  fputs_filtered ("@", stream);
-	  print_longest (stream, 'x', 0, (ULONGEST) addr);
-	}
-
-      return;
-
-    case TYPE_CODE_CHAR:
-    case TYPE_CODE_INT:
-      /* Can't just call c_val_print because that prints bytes as C
-	 chars.  */
-      if (options->format || options->output_format)
-	{
-	  struct value_print_options opts = *options;
-
-	  opts.format = (options->format ? options->format
-			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      val, &opts, 0, stream);
-	}
-      else if (TYPE_CODE (type) == TYPE_CODE_CHAR
-	       || (TYPE_CODE (type) == TYPE_CODE_INT
-		   && TYPE_LENGTH (type) == 2
-		   && strcmp (TYPE_NAME (type), "char") == 0))
-	LA_PRINT_CHAR ((int) unpack_long (type, valaddr + embedded_offset),
-		       type, stream);
-      else
-	val_print_type_code_int (type, valaddr + embedded_offset, stream);
-      break;
-
-    case TYPE_CODE_STRUCT:
-      java_print_value_fields (type, valaddr, embedded_offset,
-			       address, stream, recurse, val, options);
-      break;
-
-    default:
-      c_val_print (type, valaddr, embedded_offset, address, stream,
-		   recurse, val, options);
-      break;
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-varobj.c ./gdb/jv-varobj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/jv-varobj.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/jv-varobj.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,107 +0,0 @@
-/* varobj support for Java.
-
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "varobj.h"
-
-/* Java */
-
-static int
-java_number_of_children (const struct varobj *var)
-{
-  return cplus_varobj_ops.number_of_children (var);
-}
-
-static char *
-java_name_of_variable (const struct varobj *parent)
-{
-  char *p, *name;
-
-  name = cplus_varobj_ops.name_of_variable (parent);
-  /* If  the name has "-" in it, it is because we
-     needed to escape periods in the name...  */
-  p = name;
-
-  while (*p != '\000')
-    {
-      if (*p == '-')
-	*p = '.';
-      p++;
-    }
-
-  return name;
-}
-
-static char *
-java_name_of_child (const struct varobj *parent, int index)
-{
-  char *name, *p;
-
-  name = cplus_varobj_ops.name_of_child (parent, index);
-  /* Escape any periods in the name...  */
-  p = name;
-
-  while (*p != '\000')
-    {
-      if (*p == '.')
-	*p = '-';
-      p++;
-    }
-
-  return name;
-}
-
-static char *
-java_path_expr_of_child (const struct varobj *child)
-{
-  return NULL;
-}
-
-static struct value *
-java_value_of_child (const struct varobj *parent, int index)
-{
-  return cplus_varobj_ops.value_of_child (parent, index);
-}
-
-static struct type *
-java_type_of_child (const struct varobj *parent, int index)
-{
-  return cplus_varobj_ops.type_of_child (parent, index);
-}
-
-static char *
-java_value_of_variable (const struct varobj *var,
-			enum varobj_display_formats format)
-{
-  return cplus_varobj_ops.value_of_variable (var, format);
-}
-
-/* varobj operations for java.  */
-
-const struct lang_varobj_ops java_varobj_ops =
-{
-   java_number_of_children,
-   java_name_of_variable,
-   java_name_of_child,
-   java_path_expr_of_child,
-   java_value_of_child,
-   java_type_of_child,
-   java_value_of_variable,
-   varobj_default_value_is_changeable_p,
-   NULL, /* value_has_mutated */
-   varobj_default_is_path_expr_parent
-};
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/language.c ./gdb/language.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/language.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/language.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Multiple source language support for GDB.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
@@ -39,10 +39,10 @@
 #include "varobj.h"
 #include "target.h"
 #include "parser-defs.h"
-#include "jv-lang.h"
 #include "demangle.h"
 #include "symfile.h"
 #include "cp-support.h"
+#include "frame.h"
 
 extern void _initialize_language (void);
 
@@ -118,7 +118,7 @@ static void
 show_language_command (struct ui_file *file, int from_tty,
 		       struct cmd_list_element *c, const char *value)
 {
-  enum language flang;		/* The language of the current frame.  */
+  enum language flang;		/* The language of the frame.  */
 
   if (language_mode == language_mode_auto)
     fprintf_filtered (gdb_stdout,
@@ -130,11 +130,17 @@ show_language_command (struct ui_file *f
 		      _("The current source language is \"%s\".\n"),
 		      current_language->la_name);
 
-  flang = get_frame_language ();
-  if (flang != language_unknown &&
-      language_mode == language_mode_manual &&
-      current_language->la_language != flang)
-    printf_filtered ("%s\n", lang_frame_mismatch_warn);
+  if (has_stack_frames ())
+    {
+      struct frame_info *frame;
+
+      frame = get_selected_frame (NULL);
+      flang = get_frame_language (frame);
+      if (flang != language_unknown
+	  && language_mode == language_mode_manual
+	  && current_language->la_language != flang)
+	printf_filtered ("%s\n", lang_frame_mismatch_warn);
+    }
 }
 
 /* Set command.  Change the current working language.  */
@@ -142,7 +148,7 @@ static void
 set_language_command (char *ignore, int from_tty, struct cmd_list_element *c)
 {
   int i;
-  enum language flang;
+  enum language flang = language_unknown;
 
   /* Search the list of languages for a match.  */
   for (i = 0; i < languages_size; i++)
@@ -155,7 +161,19 @@ set_language_command (char *ignore, int 
 	      /* Enter auto mode.  Set to the current frame's language, if
                  known, or fallback to the initial language.  */
 	      language_mode = language_mode_auto;
-	      flang = get_frame_language ();
+	      TRY
+		{
+		  struct frame_info *frame;
+
+		  frame = get_selected_frame (NULL);
+		  flang = get_frame_language (frame);
+		}
+	      CATCH (ex, RETURN_MASK_ERROR)
+		{
+		  flang = language_unknown;
+		}
+	      END_CATCH
+
 	      if (flang != language_unknown)
 		set_language (flang);
 	      else
@@ -520,10 +538,6 @@ add_language (const struct language_defn
   /* For the "set language" command.  */
   static const char **language_names = NULL;
   /* For the "help set language" command.  */
-  char *language_set_doc = NULL;
-
-  int i;
-  struct ui_file *tmp_stream;
 
   if (lang->la_magic != LANG_MAGIC)
     {
@@ -537,8 +551,7 @@ add_language (const struct language_defn
   if (!languages)
     {
       languages_allocsize = DEFAULT_ALLOCSIZE;
-      languages = (const struct language_defn **) xmalloc
-	(languages_allocsize * sizeof (*languages));
+      languages = XNEWVEC (const struct language_defn *, languages_allocsize);
     }
   if (languages_size >= languages_allocsize)
     {
@@ -550,50 +563,54 @@ add_language (const struct language_defn
 
   /* Build the language names array, to be used as enumeration in the
      set language" enum command.  */
-  language_names = xrealloc (language_names,
-			     (languages_size + 1) * sizeof (const char *));
-  for (i = 0; i < languages_size; ++i)
+  language_names = XRESIZEVEC (const char *, language_names,
+			       languages_size + 1);
+
+  for (int i = 0; i < languages_size; ++i)
     language_names[i] = languages[i]->la_name;
-  language_names[i] = NULL;
+  language_names[languages_size] = NULL;
+
+  /* Add the filename extensions.  */
+  if (lang->la_filename_extensions != NULL)
+    {
+      int i;
+
+      for (i = 0; lang->la_filename_extensions[i] != NULL; ++i)
+	add_filename_language (lang->la_filename_extensions[i],
+			       lang->la_language);
+    }
 
   /* Build the "help set language" docs.  */
-  tmp_stream = mem_fileopen ();
+  string_file doc;
 
-  fprintf_unfiltered (tmp_stream,
-		      _("Set the current source language.\n"
-			"The currently understood settings are:\n\nlocal or "
-			"auto    Automatic setting based on source file\n"));
+  doc.printf (_("Set the current source language.\n"
+		"The currently understood settings are:\n\nlocal or "
+		"auto    Automatic setting based on source file\n"));
 
-  for (i = 0; i < languages_size; ++i)
+  for (int i = 0; i < languages_size; ++i)
     {
       /* Already dealt with these above.  */
       if (languages[i]->la_language == language_unknown
 	  || languages[i]->la_language == language_auto)
 	continue;
 
-      /* FIXME: i18n: for now assume that the human-readable name
-	 is just a capitalization of the internal name.  */
-      fprintf_unfiltered (tmp_stream, "%-16s Use the %c%s language\n",
-			  languages[i]->la_name,
-			  /* Capitalize first letter of language
-			     name.  */
-			  toupper (languages[i]->la_name[0]),
-			  languages[i]->la_name + 1);
+      /* FIXME: i18n: for now assume that the human-readable name is
+	 just a capitalization of the internal name.  */
+      doc.printf ("%-16s Use the %c%s language\n",
+		  languages[i]->la_name,
+		  /* Capitalize first letter of language name.  */
+		  toupper (languages[i]->la_name[0]),
+		  languages[i]->la_name + 1);
     }
 
-  language_set_doc = ui_file_xstrdup (tmp_stream, NULL);
-  ui_file_delete (tmp_stream);
-
   add_setshow_enum_cmd ("language", class_support,
 			(const char **) language_names,
 			&language,
-			language_set_doc,
+			doc.c_str (),
 			_("Show the current source language."),
 			NULL, set_language_command,
 			show_language_command,
 			&setlist, &showlist);
-
-  xfree (language_set_doc);
 }
 
 /* Iterate through all registered languages looking for and calling
@@ -634,6 +651,23 @@ language_demangle (const struct language
   return NULL;
 }
 
+/* See langauge.h.  */
+
+int
+language_sniff_from_mangled_name (const struct language_defn *lang,
+				  const char *mangled, char **demangled)
+{
+  gdb_assert (lang != NULL);
+
+  if (lang->la_sniff_from_mangled_name == NULL)
+    {
+      *demangled = NULL;
+      return 0;
+    }
+
+  return lang->la_sniff_from_mangled_name (mangled, demangled);
+}
+
 /* Return class name from physname or NULL.  */
 char *
 language_class_name_from_physname (const struct language_defn *lang,
@@ -738,10 +772,10 @@ unk_lang_print_type (struct type *type, 
 }
 
 static void
-unk_lang_val_print (struct type *type, const gdb_byte *valaddr,
+unk_lang_val_print (struct type *type,
 		    int embedded_offset, CORE_ADDR address,
 		    struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct value *val,
 		    const struct value_print_options *options)
 {
   error (_("internal error - unimplemented "
@@ -796,6 +830,7 @@ const struct language_defn unknown_langu
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  NULL,
   &exp_descriptor_standard,
   unk_lang_parser,
   unk_lang_error,
@@ -813,6 +848,7 @@ const struct language_defn unknown_langu
   basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   unk_lang_demangle,		/* Language specific symbol demangler */
+  NULL,
   unk_lang_class_name,		/* Language specific
 				   class_name_from_physname */
   unk_op_print_tab,		/* expression operators for printing */
@@ -843,6 +879,7 @@ const struct language_defn auto_language
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  NULL,
   &exp_descriptor_standard,
   unk_lang_parser,
   unk_lang_error,
@@ -860,6 +897,7 @@ const struct language_defn auto_language
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   unk_lang_demangle,		/* Language specific symbol demangler */
+  NULL,
   unk_lang_class_name,		/* Language specific
 				   class_name_from_physname */
   unk_op_print_tab,		/* expression operators for printing */
@@ -888,6 +926,7 @@ const struct language_defn local_languag
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  NULL,
   &exp_descriptor_standard,
   unk_lang_parser,
   unk_lang_error,
@@ -905,6 +944,7 @@ const struct language_defn local_languag
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   unk_lang_demangle,		/* Language specific symbol demangler */
+  NULL,
   unk_lang_class_name,		/* Language specific
 				   class_name_from_physname */
   unk_op_print_tab,		/* expression operators for printing */
@@ -956,8 +996,8 @@ struct type *
 language_string_char_type (const struct language_defn *la,
 			   struct gdbarch *gdbarch)
 {
-  struct language_gdbarch *ld = gdbarch_data (gdbarch,
-					      language_gdbarch_data);
+  struct language_gdbarch *ld
+    = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
 
   return ld->arch_info[la->la_language].string_char_type;
 }
@@ -966,15 +1006,15 @@ struct type *
 language_bool_type (const struct language_defn *la,
 		    struct gdbarch *gdbarch)
 {
-  struct language_gdbarch *ld = gdbarch_data (gdbarch,
-					      language_gdbarch_data);
+  struct language_gdbarch *ld
+    = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
 
   if (ld->arch_info[la->la_language].bool_type_symbol)
     {
       struct symbol *sym;
 
       sym = lookup_symbol (ld->arch_info[la->la_language].bool_type_symbol,
-			   NULL, VAR_DOMAIN, NULL);
+			   NULL, VAR_DOMAIN, NULL).symbol;
       if (sym)
 	{
 	  struct type *type = SYMBOL_TYPE (sym);
@@ -1010,8 +1050,8 @@ language_lookup_primitive_type (const st
 				struct gdbarch *gdbarch,
 				const char *name)
 {
-  struct language_gdbarch *ld = gdbarch_data (gdbarch,
-					      language_gdbarch_data);
+  struct language_gdbarch *ld =
+    (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
   struct type **typep;
 
   typep = language_lookup_primitive_type_1 (&ld->arch_info[la->la_language],
@@ -1055,9 +1095,6 @@ language_init_primitive_type_symbols (st
 				      struct gdbarch *gdbarch)
 {
   int n;
-  struct compunit_symtab *cust;
-  struct symtab *symtab;
-  struct block *static_block, *global_block;
 
   gdb_assert (lai->primitive_type_vector != NULL);
 
@@ -1075,10 +1112,9 @@ language_init_primitive_type_symbols (st
     }
 
   /* Note: The result of symbol lookup is normally a symbol *and* the block
-     it was found in (returned in global block_found).  Builtin types don't
-     live in blocks.  We *could* give them one, but there is no current need
-     so to keep things simple symbol lookup is extended to allow for
-     BLOCK_FOUND to be NULL.  */
+     it was found in.  Builtin types don't live in blocks.  We *could* give
+     them one, but there is no current need so to keep things simple symbol
+     lookup is extended to allow for BLOCK_FOUND to be NULL.  */
 }
 
 /* See language.h.  */
@@ -1088,8 +1124,8 @@ language_lookup_primitive_type_as_symbol
 					  struct gdbarch *gdbarch,
 					  const char *name)
 {
-  struct language_gdbarch *ld = gdbarch_data (gdbarch,
-					      language_gdbarch_data);
+  struct language_gdbarch *ld
+    = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
   struct language_arch_info *lai = &ld->arch_info[la->la_language];
   struct type **typep;
   struct symbol *sym;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/language.h ./gdb/language.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/language.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/language.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Source-language-related definitions for GDB.
 
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
@@ -24,6 +24,7 @@
 #define LANGUAGE_H 1
 
 #include "symtab.h"
+#include "common/function-view.h"
 
 /* Forward decls for prototypes.  */
 struct value;
@@ -164,6 +165,13 @@ struct language_defn
     /* Style of macro expansion, if any, supported by this language.  */
     enum macro_expansion la_macro_expansion;
 
+    /* A NULL-terminated array of file extensions for this language.
+       The extension must include the ".", like ".c".  If this
+       language doesn't need to provide any filename extensions, this
+       may be NULL.  */
+
+    const char *const *la_filename_extensions;
+
     /* Definitions related to expression printing, prefixifying, and
        dumping.  */
 
@@ -212,9 +220,6 @@ struct language_defn
        
        TYPE is the type of the sub-object to be printed.
 
-       CONTENTS holds the bits of the value.  This holds the entire
-       enclosing object.
-
        EMBEDDED_OFFSET is the offset into the outermost object of the
        sub-object represented by TYPE.  This is the object which this
        call should print.  Note that the enclosing type is not
@@ -230,10 +235,9 @@ struct language_defn
        printing.  */
 
     void (*la_val_print) (struct type *type,
-			  const gdb_byte *contents,
 			  int embedded_offset, CORE_ADDR address,
 			  struct ui_file *stream, int recurse,
-			  const struct value *val,
+			  struct value *val,
 			  const struct value_print_options *options);
 
     /* Print a top-level value using syntax appropriate for this language.  */
@@ -241,13 +245,19 @@ struct language_defn
     void (*la_value_print) (struct value *, struct ui_file *,
 			    const struct value_print_options *);
 
-    /* Given a symbol VAR, and a stack frame id FRAME, read the value
-       of the variable an return (pointer to a) struct value containing
-       the value.
+    /* Given a symbol VAR, the corresponding block VAR_BLOCK (if any) and a
+       stack frame id FRAME, read the value of the variable and return (pointer
+       to a) struct value containing the value.
+
+       VAR_BLOCK is needed if there's a possibility for VAR to be outside
+       FRAME.  This is what happens if FRAME correspond to a nested function
+       and VAR is defined in the outer function.  If callers know that VAR is
+       located in FRAME or is global/static, NULL can be passed as VAR_BLOCK.
 
        Throw an error if the variable cannot be found.  */
 
     struct value *(*la_read_var_value) (struct symbol *var,
+					const struct block *var_block,
 					struct frame_info *frame);
 
     /* PC is possibly an unknown languages trampoline.
@@ -267,10 +277,11 @@ struct language_defn
        the part of symbol lookup where C looks up static and global
        variables.  */
 
-    struct symbol *(*la_lookup_symbol_nonlocal) (const struct language_defn *,
-						 const char *,
-						 const struct block *,
-						 const domain_enum);
+    struct block_symbol (*la_lookup_symbol_nonlocal)
+      (const struct language_defn *,
+       const char *,
+       const struct block *,
+       const domain_enum);
 
     /* Find the definition of the type with the given name.  */
     struct type *(*la_lookup_transparent_type) (const char *);
@@ -278,6 +289,22 @@ struct language_defn
     /* Return demangled language symbol, or NULL.  */
     char *(*la_demangle) (const char *mangled, int options);
 
+    /* Demangle a symbol according to this language's rules.  Unlike
+       la_demangle, this does not take any options.
+
+       *DEMANGLED will be set by this function.
+       
+       If this function returns 0, then *DEMANGLED must always be set
+       to NULL.
+
+       If this function returns 1, the implementation may set this to
+       a xmalloc'd string holding the demangled form.  However, it is
+       not required to.  The string, if any, is owned by the caller.
+
+       The resulting string should be of the form that will be
+       installed into a symbol.  */
+    int (*la_sniff_from_mangled_name) (const char *mangled, char **demangled);
+
     /* Return class name of a mangled method name or NULL.  */
     char *(*la_class_name_from_physname) (const char *physname);
 
@@ -346,18 +373,15 @@ struct language_defn
        The caller is responsible for iterating up through superblocks
        if desired.
 
-       For each one, call CALLBACK with the symbol and the DATA
-       argument.  If CALLBACK returns zero, the iteration ends at that
-       point.
+       For each one, call CALLBACK with the symbol.  If CALLBACK
+       returns false, the iteration ends at that point.
 
        This field may not be NULL.  If the language does not need any
        special processing here, 'iterate_over_symbols' should be
        used as the definition.  */
-    void (*la_iterate_over_symbols) (const struct block *block,
-				     const char *name,
-				     domain_enum domain,
-				     symbol_found_callback_ftype *callback,
-				     void *data);
+    void (*la_iterate_over_symbols)
+      (const struct block *block, const char *name, domain_enum domain,
+       gdb::function_view<symbol_found_callback_ftype> callback);
 
     /* Various operations on varobj.  */
     const struct lang_varobj_ops *la_varobj_ops;
@@ -376,8 +400,8 @@ struct language_defn
        If 'la_get_gcc_context' is not defined, then this method is
        ignored.
 
-       This takes the user-supplied text and returns a newly malloc'd
-       bit of code to compile.  The caller owns the result.
+       This takes the user-supplied text and returns a new bit of code
+       to compile.
 
        INST is the compiler instance being used.
        INPUT is the user's input text.
@@ -386,11 +410,11 @@ struct language_defn
        parsed.
        EXPR_PC is the PC at which the expression is being parsed.  */
 
-    char *(*la_compute_program) (struct compile_instance *inst,
-				 const char *input,
-				 struct gdbarch *gdbarch,
-				 const struct block *expr_block,
-				 CORE_ADDR expr_pc);
+    std::string (*la_compute_program) (struct compile_instance *inst,
+				       const char *input,
+				       struct gdbarch *gdbarch,
+				       const struct block *expr_block,
+				       CORE_ADDR expr_pc);
 
     /* Add fields above this point, so the magic number is always last.  */
     /* Magic number for compat checking.  */
@@ -485,9 +509,6 @@ extern enum language set_language (enum 
 #define LA_PRINT_TYPEDEF(type,new_symbol,stream) \
   (current_language->la_print_typedef(type,new_symbol,stream))
 
-#define LA_VAL_PRINT(type,valaddr,offset,addr,stream,val,recurse,options) \
-  (current_language->la_val_print(type,valaddr,offset,addr,stream, \
-				  val,recurse,options))
 #define LA_VALUE_PRINT(val,stream,options) \
   (current_language->la_value_print(val,stream,options))
 
@@ -504,9 +525,8 @@ extern enum language set_language (enum 
 #define LA_PRINT_ARRAY_INDEX(index_value, stream, options) \
   (current_language->la_print_array_index(index_value, stream, options))
 
-#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK, DATA) \
-  (current_language->la_iterate_over_symbols (BLOCK, NAME, DOMAIN, CALLBACK, \
-					      DATA))
+#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK) \
+  (current_language->la_iterate_over_symbols (BLOCK, NAME, DOMAIN, CALLBACK))
 
 /* Test a character to decide whether it can be printed in literal form
    or needs to be printed in another representation.  For example,
@@ -543,8 +563,6 @@ extern const char *language_str (enum la
 
 extern void add_language (const struct language_defn *);
 
-extern enum language get_frame_language (void);	/* In stack.c */
-
 /* Check for a language-specific trampoline.  */
 
 extern CORE_ADDR skip_language_trampoline (struct frame_info *, CORE_ADDR pc);
@@ -553,6 +571,13 @@ extern CORE_ADDR skip_language_trampolin
 extern char *language_demangle (const struct language_defn *current_language, 
 				const char *mangled, int options);
 
+/* A wrapper for la_sniff_from_mangled_name.  The arguments and result
+   are as for the method.  */
+
+extern int language_sniff_from_mangled_name (const struct language_defn *lang,
+					     const char *mangled,
+					     char **demangled);
+
 /* Return class name from physname, or NULL.  */
 extern char *language_class_name_from_physname (const struct language_defn *,
 					        const char *physname);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/libiberty.m4 ./gdb/libiberty.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/libiberty.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/libiberty.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 dnl Bits libiberty clients must do on their autoconf step.
 dnl
-dnl   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/libmcheck.m4 ./gdb/libmcheck.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/libmcheck.m4	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/libmcheck.m4	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linespec.c ./gdb/linespec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linespec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linespec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Parser for linespec for the GNU debugger, GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,6 +43,8 @@
 #include "filenames.h"
 #include "ada-lang.h"
 #include "stack.h"
+#include "location.h"
+#include "common/function-view.h"
 
 typedef struct symbol *symbolp;
 DEF_VEC_P (symbolp);
@@ -64,73 +66,26 @@ typedef struct bound_minimal_symbol boun
 
 DEF_VEC_O (bound_minimal_symbol_d);
 
-/* An enumeration of possible signs for a line offset.  */
-enum offset_relative_sign
-{
-  /* No sign  */
-  LINE_OFFSET_NONE,
-
-  /* A plus sign ("+")  */
-  LINE_OFFSET_PLUS,
-
-  /* A minus sign ("-")  */
-  LINE_OFFSET_MINUS,
-
-  /* A special "sign" for unspecified offset.  */
-  LINE_OFFSET_UNKNOWN
-};
-
-/* A line offset in a linespec.  */
-
-struct line_offset
-{
-  /* Line offset and any specified sign.  */
-  int offset;
-  enum offset_relative_sign sign;
-};
-
 /* A linespec.  Elements of this structure are filled in by a parser
    (either parse_linespec or some other function).  The structure is
    then converted into SALs by convert_linespec_to_sals.  */
 
 struct linespec
 {
-  /* An expression and the resulting PC.  Specifying an expression
-     currently precludes the use of other members.  */
-
-  /* The expression entered by the user.  */
-  const char *expression;
-
-  /* The resulting PC expression derived from evaluating EXPRESSION.  */
-  CORE_ADDR expr_pc;
-
-  /* Any specified file symtabs.  */
-
-  /* The user-supplied source filename or NULL if none was specified.  */
-  const char *source_filename;
+  /* An explicit location describing the SaLs.  */
+  struct explicit_location explicit_loc;
 
   /* The list of symtabs to search to which to limit the search.  May not
-     be NULL.  If SOURCE_FILENAME is NULL (no user-specified filename),
-     FILE_SYMTABS should contain one single NULL member.  This will
-     cause the code to use the default symtab.  */
+     be NULL.  If explicit.SOURCE_FILENAME is NULL (no user-specified
+     filename), FILE_SYMTABS should contain one single NULL member.  This
+     will cause the code to use the default symtab.  */
   VEC (symtab_ptr) *file_symtabs;
 
-  /* The name of a function or method and any matching symbols.  */
-
-  /* The user-specified function name.  If no function name was
-     supplied, this may be NULL.  */
-  const char *function_name;
-
   /* A list of matching function symbols and minimal symbols.  Both lists
      may be NULL if no matching symbols were found.  */
   VEC (symbolp) *function_symbols;
   VEC (bound_minimal_symbol_d) *minimal_symbols;
 
-  /* The name of a label and matching symbols.  */
-
-  /* The user-specified label name.  */
-  const char *label_name;
-
   /* A structure of matching label symbols and the corresponding
      function symbol in which the label was found.  Both may be NULL
      or both must be non-NULL.  */
@@ -139,10 +94,6 @@ struct linespec
     VEC (symbolp) *label_symbols;
     VEC (symbolp) *function_symbols;
   } labels;
-
-  /* Line offset.  It may be LINE_OFFSET_UNKNOWN, meaning that no
-   offset was specified.  */
-  struct line_offset line_offset;
 };
 typedef struct linespec *linespec_p;
 
@@ -173,6 +124,10 @@ struct linespec_state
   /* The program space as seen when the module was entered.  */
   struct program_space *program_space;
 
+  /* If not NULL, the search is restricted to just this program
+     space.  */
+  struct program_space *search_pspace;
+
   /* The default symtab to use, if no other symtab is specified.  */
   struct symtab *default_symtab;
 
@@ -195,6 +150,9 @@ struct linespec_state
   /* This is a set of address_entry objects which is used to prevent
      duplicate symbols from being entered into the result.  */
   htab_t addr_set;
+
+  /* Are we building a linespec?  */
+  int is_linespec;
 };
 
 /* This is a helper object that is used when collecting symbols into a
@@ -214,8 +172,23 @@ struct collect_info
     VEC (symbolp) *symbols;
     VEC (bound_minimal_symbol_d) *minimal_symbols;
   } result;
+
+  /* Possibly add a symbol to the results.  */
+  bool add_symbol (symbol *sym);
 };
 
+bool
+collect_info::add_symbol (symbol *sym)
+{
+  /* In list mode, add all matching symbols, regardless of class.
+     This allows the user to type "list a_global_variable".  */
+  if (SYMBOL_CLASS (sym) == LOC_BLOCK || this->state->list_mode)
+    VEC_safe_push (symbolp, this->result.symbols, sym);
+
+  /* Continue iterating.  */
+  return true;
+}
+
 /* Token types  */
 
 enum ls_token_type
@@ -281,8 +254,8 @@ struct ls_parser
     const char *saved_arg;
 
     /* Head of the input stream.  */
-    const char **stream;
-#define PARSER_STREAM(P) (*(P)->lexer.stream)
+    const char *stream;
+#define PARSER_STREAM(P) ((P)->lexer.stream)
 
     /* The current token.  */
     linespec_token current;
@@ -301,23 +274,27 @@ struct ls_parser
 };
 typedef struct ls_parser linespec_parser;
 
+/* A convenience macro for accessing the explicit location result of
+   the parser.  */
+#define PARSER_EXPLICIT(PPTR) (&PARSER_RESULT ((PPTR))->explicit_loc)
+
 /* Prototypes for local functions.  */
 
-static void iterate_over_file_blocks (struct symtab *symtab,
-				      const char *name, domain_enum domain,
-				      symbol_found_callback_ftype *callback,
-				      void *data);
+static void iterate_over_file_blocks
+  (struct symtab *symtab, const char *name, domain_enum domain,
+   gdb::function_view<symbol_found_callback_ftype> callback);
 
 static void initialize_defaults (struct symtab **default_symtab,
 				 int *default_line);
 
-static CORE_ADDR linespec_expression_to_pc (const char **exp_ptr);
+CORE_ADDR linespec_expression_to_pc (const char **exp_ptr);
 
 static struct symtabs_and_lines decode_objc (struct linespec_state *self,
 					     linespec_p ls,
-					     const char **argptr);
+					     const char *arg);
 
-static VEC (symtab_ptr) *symtabs_from_filename (const char *);
+static VEC (symtab_ptr) *symtabs_from_filename (const char *,
+						struct program_space *pspace);
 
 static VEC (symbolp) *find_label_symbols (struct linespec_state *self,
 					  VEC (symbolp) *function_symbols,
@@ -345,7 +322,9 @@ static void add_all_symbol_names_from_ps
 					      struct program_space *pspace,
 					      VEC (const_char_ptr) *names);
 
-static VEC (symtab_ptr) *collect_symtabs_from_filename (const char *file);
+static VEC (symtab_ptr) *
+  collect_symtabs_from_filename (const char *file,
+				 struct program_space *pspace);
 
 static void decode_digits_ordinary (struct linespec_state *self,
 				    linespec_p ls,
@@ -366,8 +345,6 @@ static int compare_symbols (const void *
 
 static int compare_msymbols (const void *a, const void *b);
 
-static const char *find_toplevel_char (const char *s, char c);
-
 /* Permitted quote characters for the parser.  This is different from the
    completer's quote characters to allow backward compatibility with the
    previous parser.  */
@@ -462,10 +439,9 @@ linespec_lexer_lex_keyword (const char *
   return NULL;
 }
 
-/* Does STRING represent an Ada operator?  If so, return the length
-   of the decoded operator name.  If not, return 0.  */
+/*  See description in linespec.h.  */
 
-static int
+int
 is_ada_operator (const char *string)
 {
   const struct ada_opname_map *mapping;
@@ -715,7 +691,7 @@ linespec_lexer_lex_string (linespec_pars
 		  && (PARSER_STREAM (parser) - start) > 8
 		  /* strlen ("operator") */)
 		{
-		  char *p = strstr (start, "operator");
+		  const char *p = strstr (start, "operator");
 
 		  if (p != NULL && is_operator_name (p))
 		    {
@@ -856,7 +832,7 @@ add_sal_to_sals_basic (struct symtabs_an
 		       struct symtab_and_line *sal)
 {
   ++sals->nelts;
-  sals->sals = xrealloc (sals->sals, sals->nelts * sizeof (sals->sals[0]));
+  sals->sals = XRESIZEVEC (struct symtab_and_line, sals->sals, sals->nelts);
   sals->sals[sals->nelts - 1] = *sal;
 }
 
@@ -879,13 +855,12 @@ add_sal_to_sals (struct linespec_state *
     {
       struct linespec_canonical_name *canonical;
 
-      self->canonical_names = xrealloc (self->canonical_names,
-					(sals->nelts
-					 * sizeof (*self->canonical_names)));
+      self->canonical_names = XRESIZEVEC (struct linespec_canonical_name,
+					  self->canonical_names, sals->nelts);
       canonical = &self->canonical_names[sals->nelts - 1];
       if (!literal_canonical && sal->symtab)
 	{
-	  const char *fullname = symtab_to_fullname (sal->symtab);
+	  symtab_to_fullname (sal->symtab);
 
 	  /* Note that the filter doesn't have to be a valid linespec
 	     input.  We only apply the ":LINE" treatment to Ada for
@@ -915,7 +890,7 @@ add_sal_to_sals (struct linespec_state *
 static hashval_t
 hash_address_entry (const void *p)
 {
-  const struct address_entry *aep = p;
+  const struct address_entry *aep = (const struct address_entry *) p;
   hashval_t hash;
 
   hash = iterative_hash_object (aep->pspace, 0);
@@ -927,8 +902,8 @@ hash_address_entry (const void *p)
 static int
 eq_address_entry (const void *a, const void *b)
 {
-  const struct address_entry *aea = a;
-  const struct address_entry *aeb = b;
+  const struct address_entry *aea = (const struct address_entry *) a;
+  const struct address_entry *aeb = (const struct address_entry *) b;
 
   return aea->pspace == aeb->pspace && aea->addr == aeb->addr;
 }
@@ -956,81 +931,26 @@ maybe_add_address (htab_t set, struct pr
   return 1;
 }
 
-/* A callback function and the additional data to call it with.  */
-
-struct symbol_and_data_callback
-{
-  /* The callback to use.  */
-  symbol_found_callback_ftype *callback;
-
-  /* Data to be passed to the callback.  */
-  void *data;
-};
-
-/* A helper for iterate_over_all_matching_symtabs that is used to
-   restrict calls to another callback to symbols representing inline
-   symbols only.  */
-
-static int
-iterate_inline_only (struct symbol *sym, void *d)
-{
-  if (SYMBOL_INLINED (sym))
-    {
-      struct symbol_and_data_callback *cad = d;
-
-      return cad->callback (sym, cad->data);
-    }
-  return 1; /* Continue iterating.  */
-}
-
-/* Some data for the expand_symtabs_matching callback.  */
-
-struct symbol_matcher_data
-{
-  /* The lookup name against which symbol name should be compared.  */
-  const char *lookup_name;
-
-  /* The routine to be used for comparison.  */
-  symbol_name_cmp_ftype symbol_name_cmp;
-};
-
-/* A helper for iterate_over_all_matching_symtabs that is passed as a
-   callback to the expand_symtabs_matching method.  */
-
-static int
-iterate_name_matcher (const char *name, void *d)
-{
-  const struct symbol_matcher_data *data = d;
-
-  if (data->symbol_name_cmp (name, data->lookup_name) == 0)
-    return 1; /* Expand this symbol's symbol table.  */
-  return 0; /* Skip this symbol.  */
-}
-
 /* A helper that walks over all matching symtabs in all objfiles and
    calls CALLBACK for each symbol matching NAME.  If SEARCH_PSPACE is
    not NULL, then the search is restricted to just that program
-   space.  If INCLUDE_INLINE is nonzero then symbols representing
+   space.  If INCLUDE_INLINE is true then symbols representing
    inlined instances of functions will be included in the result.  */
 
 static void
-iterate_over_all_matching_symtabs (struct linespec_state *state,
-				   const char *name,
-				   const domain_enum domain,
-				   symbol_found_callback_ftype *callback,
-				   void *data,
-				   struct program_space *search_pspace,
-				   int include_inline)
+iterate_over_all_matching_symtabs
+  (struct linespec_state *state, const char *name, const domain_enum domain,
+   struct program_space *search_pspace, bool include_inline,
+   gdb::function_view<symbol_found_callback_ftype> callback)
 {
   struct objfile *objfile;
   struct program_space *pspace;
-  struct symbol_matcher_data matcher_data;
 
-  matcher_data.lookup_name = name;
-  matcher_data.symbol_name_cmp =
-    state->language->la_get_symbol_name_cmp != NULL
-    ? state->language->la_get_symbol_name_cmp (name)
-    : strcmp_iw;
+  /* The routine to be used for comparison.  */
+  symbol_name_cmp_ftype symbol_name_cmp
+    = (state->language->la_get_symbol_name_cmp != NULL
+       ? state->language->la_get_symbol_name_cmp (name)
+       : strcmp_iw);
 
   ALL_PSPACES (pspace)
   {
@@ -1046,20 +966,24 @@ iterate_over_all_matching_symtabs (struc
       struct compunit_symtab *cu;
 
       if (objfile->sf)
-	objfile->sf->qf->expand_symtabs_matching (objfile, NULL,
-						  iterate_name_matcher,
-						  NULL, ALL_DOMAIN,
-						  &matcher_data);
+	objfile->sf->qf->expand_symtabs_matching
+	  (objfile,
+	   NULL,
+	   [&] (const char *symbol_name)
+	   {
+	     return symbol_name_cmp (symbol_name, name) == 0;
+	   },
+	   NULL,
+	   ALL_DOMAIN);
 
       ALL_OBJFILE_COMPUNITS (objfile, cu)
 	{
 	  struct symtab *symtab = COMPUNIT_FILETABS (cu);
 
-	  iterate_over_file_blocks (symtab, name, domain, callback, data);
+	  iterate_over_file_blocks (symtab, name, domain, callback);
 
 	  if (include_inline)
 	    {
-	      struct symbol_and_data_callback cad = { callback, data };
 	      struct block *block;
 	      int i;
 
@@ -1069,7 +993,14 @@ iterate_over_all_matching_symtabs (struc
 		{
 		  block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), i);
 		  state->language->la_iterate_over_symbols
-		    (block, name, domain, iterate_inline_only, &cad);
+		    (block, name, domain, [&] (symbol *sym)
+		     {
+		       /* Restrict calls to CALLBACK to symbols
+			  representing inline symbols only.  */
+		       if (SYMBOL_INLINED (sym))
+			 return callback (sym);
+		       return true;
+		     });
 		}
 	    }
 	}
@@ -1098,16 +1029,16 @@ get_current_search_block (void)
 /* Iterate over static and global blocks.  */
 
 static void
-iterate_over_file_blocks (struct symtab *symtab,
-			  const char *name, domain_enum domain,
-			  symbol_found_callback_ftype *callback, void *data)
+iterate_over_file_blocks
+  (struct symtab *symtab, const char *name, domain_enum domain,
+   gdb::function_view<symbol_found_callback_ftype> callback)
 {
   struct block *block;
 
   for (block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK);
        block != NULL;
        block = BLOCK_SUPERBLOCK (block))
-    LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback, data);
+    LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback);
 }
 
 /* A helper for find_method.  This finds all methods in type T which
@@ -1129,7 +1060,7 @@ find_methods (struct type *t, const char
     {
       int method_counter;
 
-      CHECK_TYPEDEF (t);
+      t = check_typedef (t);
 
       /* Loop over each method name.  At this level, all overloads of a name
          are counted as a single name.  There is an inner loop which loops over
@@ -1183,7 +1114,7 @@ find_methods (struct type *t, const char
    strings.  Also, ignore the char within a template name, like a ','
    within foo<int, int>.  */
 
-static const char *
+const char *
 find_toplevel_char (const char *s, char c)
 {
   int quoted = 0;		/* zero if we're not in quotes;
@@ -1341,8 +1272,8 @@ struct decode_line_2_item
 static int
 decode_line_2_compare_items (const void *ap, const void *bp)
 {
-  const struct decode_line_2_item *a = ap;
-  const struct decode_line_2_item *b = bp;
+  const struct decode_line_2_item *a = (const struct decode_line_2_item *) ap;
+  const struct decode_line_2_item *b = (const struct decode_line_2_item *) bp;
   int retval;
 
   retval = strcmp (a->displayform, b->displayform);
@@ -1366,7 +1297,6 @@ decode_line_2 (struct linespec_state *se
   int i;
   struct cleanup *old_chain;
   VEC (const_char_ptr) *filters = NULL;
-  struct get_number_or_range_state state;
   struct decode_line_2_item *items;
   int items_count;
 
@@ -1378,7 +1308,7 @@ decode_line_2 (struct linespec_state *se
 
   /* Prepare ITEMS array.  */
   items_count = result->nelts;
-  items = xmalloc (sizeof (*items) * items_count);
+  items = XNEWVEC (struct decode_line_2_item, items_count);
   make_cleanup (xfree, items);
   for (i = 0; i < items_count; ++i)
     {
@@ -1447,12 +1377,10 @@ decode_line_2 (struct linespec_state *se
   if (args == 0 || *args == 0)
     error_no_arg (_("one or more choice numbers"));
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      int num;
-
-      num = get_number_or_range (&state);
+      int num = parser.get_number ();
 
       if (num == 0)
 	error (_("canceled"));
@@ -1557,10 +1485,9 @@ unexpected_linespec_error (linespec_pars
       || token.type == LSTOKEN_KEYWORD)
     {
       char *string;
-      struct cleanup *cleanup;
 
       string = copy_token_string (token);
-      cleanup = make_cleanup (xfree, string);
+      make_cleanup (xfree, string);
       throw_error (GENERIC_ERROR,
 		   _("malformed linespec error: unexpected %s, \"%s\""),
 		   token_type_strings[token.type], string);
@@ -1571,11 +1498,35 @@ unexpected_linespec_error (linespec_pars
 		 token_type_strings[token.type]);
 }
 
-/* Parse and return a line offset in STRING.  */
+/* Throw an undefined label error.  */
 
-static struct line_offset
+static void ATTRIBUTE_NORETURN
+undefined_label_error (const char *function, const char *label)
+{
+  if (function != NULL)
+    throw_error (NOT_FOUND_ERROR,
+                _("No label \"%s\" defined in function \"%s\"."),
+                label, function);
+  else
+    throw_error (NOT_FOUND_ERROR,
+                _("No label \"%s\" defined in current function."),
+                label);
+}
+
+/* Throw a source file not found error.  */
+
+static void ATTRIBUTE_NORETURN
+source_file_not_found_error (const char *name)
+{
+  throw_error (NOT_FOUND_ERROR, _("No source file named %s."), name);
+}
+
+/* See description in linespec.h.  */
+
+struct line_offset
 linespec_parse_line_offset (const char *string)
 {
+  const char *start = string;
   struct line_offset line_offset = {0, LINE_OFFSET_NONE};
 
   if (*string == '+')
@@ -1589,6 +1540,9 @@ linespec_parse_line_offset (const char *
       ++string;
     }
 
+  if (*string != '\0' && !isdigit (*string))
+    error (_("malformed line offset: \"%s\""), start);
+
   /* Right now, we only allow base 10 for offsets.  */
   line_offset.offset = atoi (string);
   return line_offset;
@@ -1617,7 +1571,7 @@ linespec_parse_basic (linespec_parser *p
       /* Record the line offset and get the next token.  */
       name = copy_token_string (token);
       cleanup = make_cleanup (xfree, name);
-      PARSER_RESULT (parser)->line_offset = linespec_parse_line_offset (name);
+      PARSER_EXPLICIT (parser)->line_offset = linespec_parse_line_offset (name);
       do_cleanups (cleanup);
 
       /* Get the next token.  */
@@ -1654,7 +1608,7 @@ linespec_parse_basic (linespec_parser *p
     {
       PARSER_RESULT (parser)->function_symbols = symbols;
       PARSER_RESULT (parser)->minimal_symbols = minimal_symbols;
-      PARSER_RESULT (parser)->function_name = name;
+      PARSER_EXPLICIT (parser)->function_name = name;
       symbols = NULL;
       discard_cleanups (cleanup);
     }
@@ -1668,7 +1622,7 @@ linespec_parse_basic (linespec_parser *p
 	{
 	  PARSER_RESULT (parser)->labels.label_symbols = labels;
 	  PARSER_RESULT (parser)->labels.function_symbols = symbols;
-	  PARSER_RESULT (parser)->label_name = name;
+	  PARSER_EXPLICIT (parser)->label_name = name;
 	  symbols = NULL;
 	  discard_cleanups (cleanup);
 	}
@@ -1676,14 +1630,14 @@ linespec_parse_basic (linespec_parser *p
 	       && *LS_TOKEN_STOKEN (token).ptr == '$')
 	{
 	  /* User specified a convenience variable or history value.  */
-	  PARSER_RESULT (parser)->line_offset
+	  PARSER_EXPLICIT (parser)->line_offset
 	    = linespec_parse_variable (PARSER_STATE (parser), name);
 
-	  if (PARSER_RESULT (parser)->line_offset.sign == LINE_OFFSET_UNKNOWN)
+	  if (PARSER_EXPLICIT (parser)->line_offset.sign == LINE_OFFSET_UNKNOWN)
 	    {
 	      /* The user-specified variable was not valid.  Do not
 		 throw an error here.  parse_linespec will do it for us.  */
-	      PARSER_RESULT (parser)->function_name = name;
+	      PARSER_EXPLICIT (parser)->function_name = name;
 	      discard_cleanups (cleanup);
 	      return;
 	    }
@@ -1698,7 +1652,7 @@ linespec_parse_basic (linespec_parser *p
 	     an error here.  parse_linespec will do it for us.  */
 
 	  /* Save a copy of the name we were trying to lookup.  */
-	  PARSER_RESULT (parser)->function_name = name;
+	  PARSER_EXPLICIT (parser)->function_name = name;
 	  discard_cleanups (cleanup);
 	  return;
 	}
@@ -1718,7 +1672,7 @@ linespec_parse_basic (linespec_parser *p
 	     get the next token.  */
 	  name = copy_token_string (token);
 	  cleanup = make_cleanup (xfree, name);
-	  PARSER_RESULT (parser)->line_offset
+	  PARSER_EXPLICIT (parser)->line_offset
 	    = linespec_parse_line_offset (name);
 	  do_cleanups (cleanup);
 
@@ -1738,16 +1692,15 @@ linespec_parse_basic (linespec_parser *p
 	    {
 	      PARSER_RESULT (parser)->labels.label_symbols = labels;
 	      PARSER_RESULT (parser)->labels.function_symbols = symbols;
-	      PARSER_RESULT (parser)->label_name = name;
+	      PARSER_EXPLICIT (parser)->label_name = name;
 	      symbols = NULL;
 	      discard_cleanups (cleanup);
 	    }
 	  else
 	    {
 	      /* We don't know what it was, but it isn't a label.  */
-	      throw_error (NOT_FOUND_ERROR,
-			   _("No label \"%s\" defined in function \"%s\"."),
-			   name, PARSER_RESULT (parser)->function_name);
+	      undefined_label_error (PARSER_EXPLICIT (parser)->function_name,
+				     name);
 	    }
 
 	  /* Check for a line offset.  */
@@ -1765,7 +1718,7 @@ linespec_parse_basic (linespec_parser *p
 	      name = copy_token_string (token);
 	      cleanup = make_cleanup (xfree, name);
 
-	      PARSER_RESULT (parser)->line_offset
+	      PARSER_EXPLICIT (parser)->line_offset
 		= linespec_parse_line_offset (name);
 	      do_cleanups (cleanup);
 
@@ -1782,74 +1735,49 @@ linespec_parse_basic (linespec_parser *p
 }
 
 /* Canonicalize the linespec contained in LS.  The result is saved into
-   STATE->canonical.  */
+   STATE->canonical.  This function handles both linespec and explicit
+   locations.  */
 
 static void
-canonicalize_linespec (struct linespec_state *state, linespec_p ls)
+canonicalize_linespec (struct linespec_state *state, const linespec_p ls)
 {
+  struct event_location *canon;
+  struct explicit_location *explicit_loc;
+
   /* If canonicalization was not requested, no need to do anything.  */
   if (!state->canonical)
     return;
 
-  /* Shortcut expressions, which can only appear by themselves.  */
-  if (ls->expression != NULL)
-    state->canonical->addr_string = xstrdup (ls->expression);
-  else
-    {
-      struct ui_file *buf;
-      int need_colon = 0;
+  /* Save everything as an explicit location.  */
+  canon = state->canonical->location
+    = new_explicit_location (&ls->explicit_loc);
+  explicit_loc = get_explicit_location (canon);
 
-      buf = mem_fileopen ();
-      if (ls->source_filename)
-	{
-	  fputs_unfiltered (ls->source_filename, buf);
-	  need_colon = 1;
-	}
-
-      if (ls->function_name)
-	{
-	  if (need_colon)
-	    fputc_unfiltered (':', buf);
-	  fputs_unfiltered (ls->function_name, buf);
-	  need_colon = 1;
-	}
+  if (explicit_loc->label_name != NULL)
+    {
+      state->canonical->special_display = 1;
 
-      if (ls->label_name)
+      if (explicit_loc->function_name == NULL)
 	{
-	  if (need_colon)
-	    fputc_unfiltered (':', buf);
+	  struct symbol *s;
 
-	  if (ls->function_name == NULL)
-	    {
-	      struct symbol *s;
-
-	      /* No function was specified, so add the symbol name.  */
-	      gdb_assert (ls->labels.function_symbols != NULL
-			  && (VEC_length (symbolp, ls->labels.function_symbols)
-			      == 1));
-	      s = VEC_index (symbolp, ls->labels.function_symbols, 0);
-	      fputs_unfiltered (SYMBOL_NATURAL_NAME (s), buf);
-	      fputc_unfiltered (':', buf);
-	    }
-
-	  fputs_unfiltered (ls->label_name, buf);
-	  need_colon = 1;
-	  state->canonical->special_display = 1;
+	  /* No function was specified, so add the symbol name.  */
+	  gdb_assert (ls->labels.function_symbols != NULL
+		      && (VEC_length (symbolp, ls->labels.function_symbols)
+			  == 1));
+	  s = VEC_index (symbolp, ls->labels.function_symbols, 0);
+	  explicit_loc->function_name = xstrdup (SYMBOL_NATURAL_NAME (s));
 	}
+    }
 
-      if (ls->line_offset.sign != LINE_OFFSET_UNKNOWN)
-	{
-	  if (need_colon)
-	    fputc_unfiltered (':', buf);
-	  fprintf_filtered (buf, "%s%d",
-			    (ls->line_offset.sign == LINE_OFFSET_NONE ? ""
-			     : (ls->line_offset.sign
-				== LINE_OFFSET_PLUS ? "+" : "-")),
-			    ls->line_offset.offset);
-	}
+  /* If this location originally came from a linespec, save a string
+     representation of it for display and saving to file.  */
+  if (state->is_linespec)
+    {
+      char *linespec = explicit_location_to_linespec (explicit_loc);
 
-      state->canonical->addr_string = ui_file_xstrdup (buf, NULL);
-      ui_file_delete (buf);
+      set_event_location_string (canon, linespec);
+      xfree (linespec);
     }
 }
 
@@ -1886,22 +1814,23 @@ create_sals_line_offset (struct linespec
       fullname = symtab_to_fullname (self->default_symtab);
       VEC_pop (symtab_ptr, ls->file_symtabs);
       VEC_free (symtab_ptr, ls->file_symtabs);
-      ls->file_symtabs = collect_symtabs_from_filename (fullname);
+      ls->file_symtabs = collect_symtabs_from_filename (fullname,
+							self->search_pspace);
       use_default = 1;
     }
 
-  val.line = ls->line_offset.offset;
-  switch (ls->line_offset.sign)
+  val.line = ls->explicit_loc.line_offset.offset;
+  switch (ls->explicit_loc.line_offset.sign)
     {
     case LINE_OFFSET_PLUS:
-      if (ls->line_offset.offset == 0)
+      if (ls->explicit_loc.line_offset.offset == 0)
 	val.line = 5;
       if (use_default)
 	val.line = self->default_line + val.line;
       break;
 
     case LINE_OFFSET_MINUS:
-      if (ls->line_offset.offset == 0)
+      if (ls->explicit_loc.line_offset.offset == 0)
 	val.line = 15;
       if (use_default)
 	val.line = self->default_line - val.line;
@@ -1993,9 +1922,9 @@ create_sals_line_offset (struct linespec
 
   if (values.nelts == 0)
     {
-      if (ls->source_filename)
+      if (ls->explicit_loc.source_filename)
 	throw_error (NOT_FOUND_ERROR, _("No line %d in file \"%s\"."),
-		     val.line, ls->source_filename);
+		     val.line, ls->explicit_loc.source_filename);
       else
 	throw_error (NOT_FOUND_ERROR, _("No line %d in the current file."),
 		     val.line);
@@ -2004,6 +1933,24 @@ create_sals_line_offset (struct linespec
   return values;
 }
 
+/* Convert the given ADDRESS into SaLs.  */
+
+static struct symtabs_and_lines
+convert_address_location_to_sals (struct linespec_state *self,
+				  CORE_ADDR address)
+{
+  struct symtab_and_line sal;
+  struct symtabs_and_lines sals = {NULL, 0};
+
+  sal = find_pc_line (address, 0);
+  sal.pc = address;
+  sal.section = find_pc_overlay (address);
+  sal.explicit_pc = 1;
+  add_sal_to_sals (self, &sals, &sal, core_addr_to_string (address), 1);
+
+  return sals;
+}
+
 /* Create and return SALs from the linespec LS.  */
 
 static struct symtabs_and_lines
@@ -2011,18 +1958,7 @@ convert_linespec_to_sals (struct linespe
 {
   struct symtabs_and_lines sals = {NULL, 0};
 
-  if (ls->expression != NULL)
-    {
-      struct symtab_and_line sal;
-
-      /* We have an expression.  No other attribute is allowed.  */
-      sal = find_pc_line (ls->expr_pc, 0);
-      sal.pc = ls->expr_pc;
-      sal.section = find_pc_overlay (ls->expr_pc);
-      sal.explicit_pc = 1;
-      add_sal_to_sals (state, &sals, &sal, ls->expression, 1);
-    }
-  else if (ls->labels.label_symbols != NULL)
+  if (ls->labels.label_symbols != NULL)
     {
       /* We have just a bunch of functions/methods or labels.  */
       int i;
@@ -2085,13 +2021,13 @@ convert_linespec_to_sals (struct linespe
 	    }
 	}
     }
-  else if (ls->line_offset.sign != LINE_OFFSET_UNKNOWN)
+  else if (ls->explicit_loc.line_offset.sign != LINE_OFFSET_UNKNOWN)
     {
       /* Only an offset was specified.  */
 	sals = create_sals_line_offset (state, ls);
 
 	/* Make sure we have a filename for canonicalization.  */
-	if (ls->source_filename == NULL)
+	if (ls->explicit_loc.source_filename == NULL)
 	  {
 	    const char *fullname = symtab_to_fullname (state->default_symtab);
 
@@ -2099,7 +2035,7 @@ convert_linespec_to_sals (struct linespe
 	       form so that displaying SOURCE_FILENAME can follow the current
 	       FILENAME_DISPLAY_STRING setting.  But as it is used only rarely
 	       it has been kept for code simplicity only in absolute form.  */
-	    ls->source_filename = xstrdup (fullname);
+	    ls->explicit_loc.source_filename = xstrdup (fullname);
 	  }
     }
   else
@@ -2116,14 +2052,80 @@ convert_linespec_to_sals (struct linespe
   return sals;
 }
 
+/* Convert the explicit location EXPLICIT_LOC into SaLs.  */
+
+static struct symtabs_and_lines
+convert_explicit_location_to_sals (struct linespec_state *self,
+				   linespec_p result,
+				   const struct explicit_location *explicit_loc)
+{
+  VEC (symbolp) *symbols, *labels;
+  VEC (bound_minimal_symbol_d) *minimal_symbols;
+
+  if (explicit_loc->source_filename != NULL)
+    {
+      TRY
+	{
+	  result->file_symtabs
+	    = symtabs_from_filename (explicit_loc->source_filename,
+				     self->search_pspace);
+	}
+      CATCH (except, RETURN_MASK_ERROR)
+	{
+	  source_file_not_found_error (explicit_loc->source_filename);
+	}
+      END_CATCH
+      result->explicit_loc.source_filename
+	= xstrdup (explicit_loc->source_filename);
+    }
+  else
+    {
+      /* A NULL entry means to use the default symtab.  */
+      VEC_safe_push (symtab_ptr, result->file_symtabs, NULL);
+    }
+
+  if (explicit_loc->function_name != NULL)
+    {
+      find_linespec_symbols (self, result->file_symtabs,
+			     explicit_loc->function_name, &symbols,
+			     &minimal_symbols);
+
+      if (symbols == NULL && minimal_symbols == NULL)
+	symbol_not_found_error (explicit_loc->function_name,
+				result->explicit_loc.source_filename);
+
+      result->explicit_loc.function_name
+	= xstrdup (explicit_loc->function_name);
+      result->function_symbols = symbols;
+      result->minimal_symbols = minimal_symbols;
+    }
+
+  if (explicit_loc->label_name != NULL)
+    {
+      symbols = NULL;
+      labels = find_label_symbols (self, result->function_symbols,
+				   &symbols, explicit_loc->label_name);
+
+      if (labels == NULL)
+	undefined_label_error (result->explicit_loc.function_name,
+			       explicit_loc->label_name);
+
+      result->explicit_loc.label_name = xstrdup (explicit_loc->label_name);
+      result->labels.label_symbols = labels;
+      result->labels.function_symbols = symbols;
+    }
+
+  if (explicit_loc->line_offset.sign != LINE_OFFSET_UNKNOWN)
+    result->explicit_loc.line_offset = explicit_loc->line_offset;
+
+   return convert_linespec_to_sals (self, result);
+}
+
 /* Parse a string that specifies a linespec.
-   Pass the address of a char * variable; that variable will be
-   advanced over the characters actually parsed.
 
    The basic grammar of linespecs:
 
-   linespec -> expr_spec | var_spec | basic_spec
-   expr_spec -> '*' STRING
+   linespec -> var_spec | basic_spec
    var_spec -> '$' (STRING | NUMBER)
 
    basic_spec -> file_offset_spec | function_spec | label_spec
@@ -2167,10 +2169,10 @@ convert_linespec_to_sals (struct linespe
    if no file is validly specified.  Callers must check that.
    Also, the line number returned may be invalid.  */
 
-/* Parse the linespec in ARGPTR.  */
+/* Parse the linespec in ARG.  */
 
 static struct symtabs_and_lines
-parse_linespec (linespec_parser *parser, const char **argptr)
+parse_linespec (linespec_parser *parser, const char *arg)
 {
   linespec_token token;
   struct symtabs_and_lines values;
@@ -2181,30 +2183,30 @@ parse_linespec (linespec_parser *parser,
      IDEs to work around bugs in the previous parser by quoting
      the entire linespec, so we attempt to deal with this nicely.  */
   parser->is_quote_enclosed = 0;
-  if (!is_ada_operator (*argptr)
-      && strchr (linespec_quote_characters, **argptr) != NULL)
+  if (!is_ada_operator (arg)
+      && strchr (linespec_quote_characters, *arg) != NULL)
     {
       const char *end;
 
-      end = skip_quote_char (*argptr + 1, **argptr);
+      end = skip_quote_char (arg + 1, *arg);
       if (end != NULL && is_closing_quote_enclosed (end))
 	{
-	  /* Here's the special case.  Skip ARGPTR past the initial
+	  /* Here's the special case.  Skip ARG past the initial
 	     quote.  */
-	  ++(*argptr);
+	  ++arg;
 	  parser->is_quote_enclosed = 1;
 	}
     }
 
-  parser->lexer.saved_arg = *argptr;
-  parser->lexer.stream = argptr;
+  parser->lexer.saved_arg = arg;
+  parser->lexer.stream = arg;
 
   /* Initialize the default symtab and line offset.  */
   initialize_defaults (&PARSER_STATE (parser)->default_symtab,
 		       &PARSER_STATE (parser)->default_line);
 
   /* Objective-C shortcut.  */
-  values = decode_objc (PARSER_STATE (parser), PARSER_RESULT (parser), argptr);
+  values = decode_objc (PARSER_STATE (parser), PARSER_RESULT (parser), arg);
   if (values.sals != NULL)
     return values;
 
@@ -2214,33 +2216,7 @@ parse_linespec (linespec_parser *parser,
   token = linespec_lexer_lex_one (parser);
 
   /* It must be either LSTOKEN_STRING or LSTOKEN_NUMBER.  */
-  if (token.type == LSTOKEN_STRING && *LS_TOKEN_STOKEN (token).ptr == '*')
-    {
-      char *expr;
-      const char *copy;
-
-      /* User specified an expression, *EXPR.  */
-      copy = expr = copy_token_string (token);
-      cleanup = make_cleanup (xfree, expr);
-      PARSER_RESULT (parser)->expr_pc = linespec_expression_to_pc (&copy);
-      discard_cleanups (cleanup);
-      PARSER_RESULT (parser)->expression = expr;
-
-      /* This is a little hacky/tricky.  If linespec_expression_to_pc
-	 did not evaluate the entire token, then we must find the
-	 string COPY inside the original token buffer.  */
-      if (*copy != '\0')
-	{
-	  PARSER_STREAM (parser) = strstr (parser->lexer.saved_arg, copy);
-	  gdb_assert (PARSER_STREAM (parser) != NULL);
-	}
-
-      /* Consume the token.  */
-      linespec_lexer_consume_token (parser);
-
-      goto convert_to_sals;
-    }
-  else if (token.type == LSTOKEN_STRING && *LS_TOKEN_STOKEN (token).ptr == '$')
+  if (token.type == LSTOKEN_STRING && *LS_TOKEN_STOKEN (token).ptr == '$')
     {
       char *var;
 
@@ -2250,13 +2226,13 @@ parse_linespec (linespec_parser *parser,
       /* User specified a convenience variable or history value.  */
       var = copy_token_string (token);
       cleanup = make_cleanup (xfree, var);
-      PARSER_RESULT (parser)->line_offset
+      PARSER_EXPLICIT (parser)->line_offset
 	= linespec_parse_variable (PARSER_STATE (parser), var);
       do_cleanups (cleanup);
 
       /* If a line_offset wasn't found (VAR is the name of a user
 	 variable/function), then skip to normal symbol processing.  */
-      if (PARSER_RESULT (parser)->line_offset.sign != LINE_OFFSET_UNKNOWN)
+      if (PARSER_EXPLICIT (parser)->line_offset.sign != LINE_OFFSET_UNKNOWN)
 	{
 	  /* Consume this token.  */
 	  linespec_lexer_consume_token (parser);
@@ -2283,7 +2259,8 @@ parse_linespec (linespec_parser *parser,
       TRY
 	{
 	  PARSER_RESULT (parser)->file_symtabs
-	    = symtabs_from_filename (user_filename);
+	    = symtabs_from_filename (user_filename,
+				     PARSER_STATE (parser)->search_pspace);
 	}
       CATCH (ex, RETURN_MASK_ERROR)
 	{
@@ -2294,7 +2271,7 @@ parse_linespec (linespec_parser *parser,
       if (file_exception.reason >= 0)
 	{
 	  /* Symtabs were found for the file.  Record the filename.  */
-	  PARSER_RESULT (parser)->source_filename = user_filename;
+	  PARSER_EXPLICIT (parser)->source_filename = user_filename;
 
 	  /* Get the next token.  */
 	  token = linespec_lexer_consume_token (parser);
@@ -2331,7 +2308,7 @@ parse_linespec (linespec_parser *parser,
 
   if (PARSER_RESULT (parser)->function_symbols == NULL
       && PARSER_RESULT (parser)->labels.label_symbols == NULL
-      && PARSER_RESULT (parser)->line_offset.sign == LINE_OFFSET_UNKNOWN
+      && PARSER_EXPLICIT (parser)->line_offset.sign == LINE_OFFSET_UNKNOWN
       && PARSER_RESULT (parser)->minimal_symbols == NULL)
     {
       /* The linespec didn't parse.  Re-throw the file exception if
@@ -2340,8 +2317,8 @@ parse_linespec (linespec_parser *parser,
 	throw_exception (file_exception);
 
       /* Otherwise, the symbol is not found.  */
-      symbol_not_found_error (PARSER_RESULT (parser)->function_name,
-			      PARSER_RESULT (parser)->source_filename);
+      symbol_not_found_error (PARSER_EXPLICIT (parser)->function_name,
+			      PARSER_EXPLICIT (parser)->source_filename);
     }
 
  convert_to_sals:
@@ -2365,6 +2342,7 @@ parse_linespec (linespec_parser *parser,
 static void
 linespec_state_constructor (struct linespec_state *self,
 			    int flags, const struct language_defn *language,
+			    struct program_space *search_pspace,
 			    struct symtab *default_symtab,
 			    int default_line,
 			    struct linespec_result *canonical)
@@ -2373,12 +2351,14 @@ linespec_state_constructor (struct lines
   self->language = language;
   self->funfirstline = (flags & DECODE_LINE_FUNFIRSTLINE) ? 1 : 0;
   self->list_mode = (flags & DECODE_LINE_LIST_MODE) ? 1 : 0;
+  self->search_pspace = search_pspace;
   self->default_symtab = default_symtab;
   self->default_line = default_line;
   self->canonical = canonical;
   self->program_space = current_program_space;
   self->addr_set = htab_create_alloc (10, hash_address_entry, eq_address_entry,
 				      xfree, xcalloc, xfree);
+  self->is_linespec = 0;
 }
 
 /* Initialize a new linespec parser.  */
@@ -2386,14 +2366,17 @@ linespec_state_constructor (struct lines
 static void
 linespec_parser_new (linespec_parser *parser,
 		     int flags, const struct language_defn *language,
+		     struct program_space *search_pspace,
 		     struct symtab *default_symtab,
 		     int default_line,
 		     struct linespec_result *canonical)
 {
+  memset (parser, 0, sizeof (linespec_parser));
   parser->lexer.current.type = LSTOKEN_CONSUMED;
   memset (PARSER_RESULT (parser), 0, sizeof (struct linespec));
-  PARSER_RESULT (parser)->line_offset.sign = LINE_OFFSET_UNKNOWN;
+  PARSER_EXPLICIT (parser)->line_offset.sign = LINE_OFFSET_UNKNOWN;
   linespec_state_constructor (PARSER_STATE (parser), flags, language,
+			      search_pspace,
 			      default_symtab, default_line, canonical);
 }
 
@@ -2412,10 +2395,9 @@ linespec_parser_delete (void *arg)
 {
   linespec_parser *parser = (linespec_parser *) arg;
 
-  xfree ((char *) PARSER_RESULT (parser)->expression);
-  xfree ((char *) PARSER_RESULT (parser)->source_filename);
-  xfree ((char *) PARSER_RESULT (parser)->label_name);
-  xfree ((char *) PARSER_RESULT (parser)->function_name);
+  xfree (PARSER_EXPLICIT (parser)->source_filename);
+  xfree (PARSER_EXPLICIT (parser)->label_name);
+  xfree (PARSER_EXPLICIT (parser)->function_name);
 
   if (PARSER_RESULT (parser)->file_symtabs != NULL)
     VEC_free (symtab_ptr, PARSER_RESULT (parser)->file_symtabs);
@@ -2435,10 +2417,117 @@ linespec_parser_delete (void *arg)
   linespec_state_destructor (PARSER_STATE (parser));
 }
 
+/* See description in linespec.h.  */
+
+void
+linespec_lex_to_end (char **stringp)
+{
+  linespec_parser parser;
+  struct cleanup *cleanup;
+  linespec_token token;
+  const char *orig;
+
+  if (stringp == NULL || *stringp == NULL)
+    return;
+
+  linespec_parser_new (&parser, 0, current_language, NULL, NULL, 0, NULL);
+  cleanup = make_cleanup (linespec_parser_delete, &parser);
+  parser.lexer.saved_arg = *stringp;
+  PARSER_STREAM (&parser) = orig = *stringp;
+
+  do
+    {
+      /* Stop before any comma tokens;  we need it to keep it
+	 as the next token in the string.  */
+      token = linespec_lexer_peek_token (&parser);
+      if (token.type == LSTOKEN_COMMA)
+	break;
+      token = linespec_lexer_consume_token (&parser);
+    }
+  while (token.type != LSTOKEN_EOI && token.type != LSTOKEN_KEYWORD);
+
+  *stringp += PARSER_STREAM (&parser) - orig;
+  do_cleanups (cleanup);
+}
+
+/* A helper function for decode_line_full and decode_line_1 to
+   turn LOCATION into symtabs_and_lines.  */
+
+static struct symtabs_and_lines
+event_location_to_sals (linespec_parser *parser,
+			const struct event_location *location)
+{
+  struct symtabs_and_lines result = {NULL, 0};
+
+  switch (event_location_type (location))
+    {
+    case LINESPEC_LOCATION:
+      {
+	PARSER_STATE (parser)->is_linespec = 1;
+	TRY
+	  {
+	    result = parse_linespec (parser, get_linespec_location (location));
+	  }
+	CATCH (except, RETURN_MASK_ERROR)
+	  {
+	    throw_exception (except);
+	  }
+	END_CATCH
+      }
+      break;
+
+    case ADDRESS_LOCATION:
+      {
+	const char *addr_string = get_address_string_location (location);
+	CORE_ADDR addr = get_address_location (location);
+
+	if (addr_string != NULL)
+	  {
+	    char *expr = xstrdup (addr_string);
+	    const char *const_expr = expr;
+	    struct cleanup *cleanup = make_cleanup (xfree, expr);
+
+	    addr = linespec_expression_to_pc (&const_expr);
+	    if (PARSER_STATE (parser)->canonical != NULL)
+	      PARSER_STATE (parser)->canonical->location
+		= copy_event_location (location);
+
+	    do_cleanups (cleanup);
+	  }
+
+	result = convert_address_location_to_sals (PARSER_STATE (parser),
+						   addr);
+      }
+      break;
+
+    case EXPLICIT_LOCATION:
+      {
+	const struct explicit_location *explicit_loc;
+
+	explicit_loc = get_explicit_location_const (location);
+	result = convert_explicit_location_to_sals (PARSER_STATE (parser),
+						    PARSER_RESULT (parser),
+						    explicit_loc);
+      }
+      break;
+
+    case PROBE_LOCATION:
+      /* Probes are handled by their own decoders.  */
+      gdb_assert_not_reached ("attempt to decode probe location");
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled event location type");
+    }
+
+  return result;
+}
+
 /* See linespec.h.  */
 
 void
-decode_line_full (char **argptr, int flags,
+decode_line_full (const struct event_location *location, int flags,
+		  struct program_space *search_pspace,
 		  struct symtab *default_symtab,
 		  int default_line, struct linespec_result *canonical,
 		  const char *select_mode,
@@ -2449,7 +2538,6 @@ decode_line_full (char **argptr, int fla
   VEC (const_char_ptr) *filters = NULL;
   linespec_parser parser;
   struct linespec_state *state;
-  const char *copy, *orig;
 
   gdb_assert (canonical != NULL);
   /* The filter only makes sense for 'all'.  */
@@ -2460,18 +2548,16 @@ decode_line_full (char **argptr, int fla
 	      || select_mode == multiple_symbols_cancel);
   gdb_assert ((flags & DECODE_LINE_LIST_MODE) == 0);
 
-  linespec_parser_new (&parser, flags, current_language, default_symtab,
+  linespec_parser_new (&parser, flags, current_language,
+		       search_pspace, default_symtab,
 		       default_line, canonical);
   cleanups = make_cleanup (linespec_parser_delete, &parser);
   save_current_program_space ();
 
-  orig = copy = *argptr;
-  result = parse_linespec (&parser, &copy);
-  *argptr += copy - orig;
+  result = event_location_to_sals (&parser, location);
   state = PARSER_STATE (&parser);
 
   gdb_assert (result.nelts == 1 || canonical->pre_expanded);
-  gdb_assert (canonical->addr_string != NULL);
   canonical->pre_expanded = 1;
 
   /* Arrange for allocated canonical names to be freed.  */
@@ -2489,7 +2575,7 @@ decode_line_full (char **argptr, int fla
 
   if (select_mode == NULL)
     {
-      if (ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ())))
+      if (interp_ui_out (top_level_interpreter ())->is_mi_like_p ())
 	select_mode = multiple_symbols_all;
       else
 	select_mode = multiple_symbols_select_mode ();
@@ -2515,23 +2601,22 @@ decode_line_full (char **argptr, int fla
 /* See linespec.h.  */
 
 struct symtabs_and_lines
-decode_line_1 (char **argptr, int flags,
+decode_line_1 (const struct event_location *location, int flags,
+	       struct program_space *search_pspace,
 	       struct symtab *default_symtab,
 	       int default_line)
 {
   struct symtabs_and_lines result;
   linespec_parser parser;
   struct cleanup *cleanups;
-  const char *copy, *orig;
 
-  linespec_parser_new (&parser, flags, current_language, default_symtab,
+  linespec_parser_new (&parser, flags, current_language,
+		       search_pspace, default_symtab,
 		       default_line, NULL);
   cleanups = make_cleanup (linespec_parser_delete, &parser);
   save_current_program_space ();
 
-  orig = copy = *argptr;
-  result = parse_linespec (&parser, &copy);
-  *argptr += copy - orig;
+  result = event_location_to_sals (&parser, location);
 
   do_cleanups (cleanups);
   return result;
@@ -2544,6 +2629,8 @@ decode_line_with_current_source (char *s
 {
   struct symtabs_and_lines sals;
   struct symtab_and_line cursal;
+  struct event_location *location;
+  struct cleanup *cleanup;
 
   if (string == 0)
     error (_("Empty line specification."));
@@ -2552,11 +2639,15 @@ decode_line_with_current_source (char *s
      and get a default source symtab+line or it will recursively call us!  */
   cursal = get_current_source_symtab_and_line ();
 
-  sals = decode_line_1 (&string, flags,
+  location = string_to_event_location (&string, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
+  sals = decode_line_1 (location, flags, NULL,
 			cursal.symtab, cursal.line);
 
   if (*string)
     error (_("Junk at end of line specification: %s"), string);
+
+  do_cleanups (cleanup);
   return sals;
 }
 
@@ -2566,19 +2657,25 @@ struct symtabs_and_lines
 decode_line_with_last_displayed (char *string, int flags)
 {
   struct symtabs_and_lines sals;
+  struct event_location *location;
+  struct cleanup *cleanup;
 
   if (string == 0)
     error (_("Empty line specification."));
 
+  location = string_to_event_location (&string, current_language);
+  cleanup = make_cleanup_delete_event_location (location);
   if (last_displayed_sal_is_valid ())
-    sals = decode_line_1 (&string, flags,
+    sals = decode_line_1 (location, flags, NULL,
 			  get_last_displayed_symtab (),
 			  get_last_displayed_line ());
   else
-    sals = decode_line_1 (&string, flags, (struct symtab *) NULL, 0);
+    sals = decode_line_1 (location, flags, NULL, (struct symtab *) NULL, 0);
 
   if (*string)
     error (_("Junk at end of line specification: %s"), string);
+
+  do_cleanups (cleanup);
   return sals;
 }
 
@@ -2608,7 +2705,7 @@ initialize_defaults (struct symtab **def
 /* Evaluate the expression pointed to by EXP_PTR into a CORE_ADDR,
    advancing EXP_PTR past any parsed text.  */
 
-static CORE_ADDR
+CORE_ADDR
 linespec_expression_to_pc (const char **exp_ptr)
 {
   if (current_program_space->executing_startup)
@@ -2631,7 +2728,7 @@ linespec_expression_to_pc (const char **
    the existing C++ code to let the user choose one.  */
 
 static struct symtabs_and_lines
-decode_objc (struct linespec_state *self, linespec_p ls, const char **argptr)
+decode_objc (struct linespec_state *self, linespec_p ls, const char *arg)
 {
   struct collect_info info;
   VEC (const_char_ptr) *symbol_names = NULL;
@@ -2649,7 +2746,7 @@ decode_objc (struct linespec_state *self
   values.nelts = 0;
   values.sals = NULL;
 
-  new_argptr = find_imps (*argptr, &symbol_names); 
+  new_argptr = find_imps (arg, &symbol_names);
   if (VEC_empty (const_char_ptr, symbol_names))
     {
       do_cleanups (cleanup);
@@ -2663,74 +2760,103 @@ decode_objc (struct linespec_state *self
     {
       char *saved_arg;
 
-      saved_arg = alloca (new_argptr - *argptr + 1);
-      memcpy (saved_arg, *argptr, new_argptr - *argptr);
-      saved_arg[new_argptr - *argptr] = '\0';
+      saved_arg = (char *) alloca (new_argptr - arg + 1);
+      memcpy (saved_arg, arg, new_argptr - arg);
+      saved_arg[new_argptr - arg] = '\0';
 
-      ls->function_name = xstrdup (saved_arg);
+      ls->explicit_loc.function_name = xstrdup (saved_arg);
       ls->function_symbols = info.result.symbols;
       ls->minimal_symbols = info.result.minimal_symbols;
       values = convert_linespec_to_sals (self, ls);
 
       if (self->canonical)
 	{
+	  char *str;
+
 	  self->canonical->pre_expanded = 1;
-	  if (ls->source_filename)
-	    self->canonical->addr_string
-	      = xstrprintf ("%s:%s", ls->source_filename, saved_arg);
+
+	  if (ls->explicit_loc.source_filename)
+	    {
+	      str = xstrprintf ("%s:%s",
+				ls->explicit_loc.source_filename, saved_arg);
+	    }
 	  else
-	    self->canonical->addr_string = xstrdup (saved_arg);
+	    str = xstrdup (saved_arg);
+
+	  make_cleanup (xfree, str);
+	  self->canonical->location = new_linespec_location (&str);
 	}
     }
 
-  *argptr = new_argptr;
-
   do_cleanups (cleanup);
 
   return values;
 }
 
-/* An instance of this type is used when collecting prefix symbols for
-   decode_compound.  */
-
-struct decode_compound_collector
+/* A function object that serves as symbol_found_callback_ftype
+   callback for iterate_over_symbols.  This is used by
+   lookup_prefix_sym to collect type symbols.  */
+class decode_compound_collector
 {
-  /* The result vector.  */
-  VEC (symbolp) *symbols;
+public:
+  decode_compound_collector ()
+    : m_symbols (NULL)
+  {
+    m_unique_syms = htab_create_alloc (1, htab_hash_pointer,
+				       htab_eq_pointer, NULL,
+				       xcalloc, xfree);
+  }
+
+  ~decode_compound_collector ()
+  {
+    if (m_unique_syms != NULL)
+      htab_delete (m_unique_syms);
+  }
+
+  /* Releases ownership of the collected symbols and returns them.  */
+  VEC (symbolp) *release_symbols ()
+  {
+    VEC (symbolp) *res = m_symbols;
+    m_symbols = NULL;
+    return res;
+  }
 
+  /* Callable as a symbol_found_callback_ftype callback.  */
+  bool operator () (symbol *sym);
+
+private:
   /* A hash table of all symbols we found.  We use this to avoid
      adding any symbol more than once.  */
-  htab_t unique_syms;
-};
+  htab_t m_unique_syms;
 
-/* A callback for iterate_over_symbols that is used by
-   lookup_prefix_sym to collect type symbols.  */
+  /* The result vector.  */
+  VEC (symbolp) *m_symbols;
+};
 
-static int
-collect_one_symbol (struct symbol *sym, void *d)
+bool
+decode_compound_collector::operator () (symbol *sym)
 {
-  struct decode_compound_collector *collector = d;
   void **slot;
   struct type *t;
 
   if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
-    return 1; /* Continue iterating.  */
+    return true; /* Continue iterating.  */
 
   t = SYMBOL_TYPE (sym);
-  CHECK_TYPEDEF (t);
+  t = check_typedef (t);
   if (TYPE_CODE (t) != TYPE_CODE_STRUCT
       && TYPE_CODE (t) != TYPE_CODE_UNION
       && TYPE_CODE (t) != TYPE_CODE_NAMESPACE)
-    return 1; /* Continue iterating.  */
+    return true; /* Continue iterating.  */
 
-  slot = htab_find_slot (collector->unique_syms, sym, INSERT);
+  slot = htab_find_slot (m_unique_syms, sym, INSERT);
   if (!*slot)
     {
       *slot = sym;
-      VEC_safe_push (symbolp, collector->symbols, sym);
+      VEC_safe_push (symbolp, m_symbols, sym);
     }
 
-  return 1; /* Continue iterating.  */
+  return true; /* Continue iterating.  */
 }
 
 /* Return any symbols corresponding to CLASS_NAME in FILE_SYMTABS.  */
@@ -2741,28 +2867,16 @@ lookup_prefix_sym (struct linespec_state
 {
   int ix;
   struct symtab *elt;
-  struct decode_compound_collector collector;
-  struct cleanup *outer;
-  struct cleanup *cleanup;
-
-  collector.symbols = NULL;
-  outer = make_cleanup (VEC_cleanup (symbolp), &collector.symbols);
-
-  collector.unique_syms = htab_create_alloc (1, htab_hash_pointer,
-					     htab_eq_pointer, NULL,
-					     xcalloc, xfree);
-  cleanup = make_cleanup_htab_delete (collector.unique_syms);
+  decode_compound_collector collector;
 
   for (ix = 0; VEC_iterate (symtab_ptr, file_symtabs, ix, elt); ++ix)
     {
       if (elt == NULL)
 	{
 	  iterate_over_all_matching_symtabs (state, class_name, STRUCT_DOMAIN,
-					     collect_one_symbol, &collector,
-					     NULL, 0);
+					     NULL, false, collector);
 	  iterate_over_all_matching_symtabs (state, class_name, VAR_DOMAIN,
-					     collect_one_symbol, &collector,
-					     NULL, 0);
+					     NULL, false, collector);
 	}
       else
 	{
@@ -2770,16 +2884,12 @@ lookup_prefix_sym (struct linespec_state
 	     been filtered out earlier.  */
 	  gdb_assert (!SYMTAB_PSPACE (elt)->executing_startup);
 	  set_current_program_space (SYMTAB_PSPACE (elt));
-	  iterate_over_file_blocks (elt, class_name, STRUCT_DOMAIN,
-				    collect_one_symbol, &collector);
-	  iterate_over_file_blocks (elt, class_name, VAR_DOMAIN,
-				    collect_one_symbol, &collector);
+	  iterate_over_file_blocks (elt, class_name, STRUCT_DOMAIN, collector);
+	  iterate_over_file_blocks (elt, class_name, VAR_DOMAIN, collector);
 	}
     }
 
-  do_cleanups (cleanup);
-  discard_cleanups (outer);
-  return collector.symbols;
+  return collector.release_symbols ();
 }
 
 /* A qsort comparison function for symbols.  The resulting order does
@@ -2789,8 +2899,8 @@ lookup_prefix_sym (struct linespec_state
 static int
 compare_symbols (const void *a, const void *b)
 {
-  struct symbol * const *sa = a;
-  struct symbol * const *sb = b;
+  struct symbol * const *sa = (struct symbol * const*) a;
+  struct symbol * const *sb = (struct symbol * const*) b;
   uintptr_t uia, uib;
 
   uia = (uintptr_t) SYMTAB_PSPACE (symbol_symtab (*sa));
@@ -2817,8 +2927,10 @@ compare_symbols (const void *a, const vo
 static int
 compare_msymbols (const void *a, const void *b)
 {
-  const struct bound_minimal_symbol *sa = a;
-  const struct bound_minimal_symbol *sb = b;
+  const struct bound_minimal_symbol *sa
+    = (const struct bound_minimal_symbol *) a;
+  const struct bound_minimal_symbol *sb
+    = (const struct bound_minimal_symbol *) b;
   uintptr_t uia, uib;
 
   uia = (uintptr_t) sa->objfile->pspace;
@@ -2983,71 +3095,102 @@ find_method (struct linespec_state *self
 
 
 
-/* This object is used when collecting all matching symtabs.  */
+/* This function object is a callback for iterate_over_symtabs, used
+   when collecting all matching symtabs.  */
 
-struct symtab_collector
+class symtab_collector
 {
+public:
+  symtab_collector ()
+  {
+    m_symtabs = NULL;
+    m_symtab_table = htab_create (1, htab_hash_pointer, htab_eq_pointer,
+				  NULL);
+  }
+
+  ~symtab_collector ()
+  {
+    if (m_symtab_table != NULL)
+      htab_delete (m_symtab_table);
+  }
+
+  /* Callable as a symbol_found_callback_ftype callback.  */
+  bool operator () (symtab *sym);
+
+  /* Releases ownership of the collected symtabs and returns them.  */
+  VEC (symtab_ptr) *release_symtabs ()
+  {
+    VEC (symtab_ptr) *res = m_symtabs;
+    m_symtabs = NULL;
+    return res;
+  }
+
+private:
   /* The result vector of symtabs.  */
-  VEC (symtab_ptr) *symtabs;
+  VEC (symtab_ptr) *m_symtabs;
 
   /* This is used to ensure the symtabs are unique.  */
-  htab_t symtab_table;
+  htab_t m_symtab_table;
 };
 
-/* Callback for iterate_over_symtabs.  */
-
-static int
-add_symtabs_to_list (struct symtab *symtab, void *d)
+bool
+symtab_collector::operator () (struct symtab *symtab)
 {
-  struct symtab_collector *data = d;
   void **slot;
 
-  slot = htab_find_slot (data->symtab_table, symtab, INSERT);
+  slot = htab_find_slot (m_symtab_table, symtab, INSERT);
   if (!*slot)
     {
       *slot = symtab;
-      VEC_safe_push (symtab_ptr, data->symtabs, symtab);
+      VEC_safe_push (symtab_ptr, m_symtabs, symtab);
     }
 
-  return 0;
+  return false;
 }
 
-/* Given a file name, return a VEC of all matching symtabs.  */
+/* Given a file name, return a VEC of all matching symtabs.  If
+   SEARCH_PSPACE is not NULL, the search is restricted to just that
+   program space.  */
 
 static VEC (symtab_ptr) *
-collect_symtabs_from_filename (const char *file)
+collect_symtabs_from_filename (const char *file,
+			       struct program_space *search_pspace)
 {
-  struct symtab_collector collector;
-  struct cleanup *cleanups;
-  struct program_space *pspace;
-
-  collector.symtabs = NULL;
-  collector.symtab_table = htab_create (1, htab_hash_pointer, htab_eq_pointer,
-					NULL);
-  cleanups = make_cleanup_htab_delete (collector.symtab_table);
+  symtab_collector collector;
 
   /* Find that file's data.  */
-  ALL_PSPACES (pspace)
-  {
-    if (pspace->executing_startup)
-      continue;
+  if (search_pspace == NULL)
+    {
+      struct program_space *pspace;
 
-    set_current_program_space (pspace);
-    iterate_over_symtabs (file, add_symtabs_to_list, &collector);
-  }
+      ALL_PSPACES (pspace)
+        {
+	  if (pspace->executing_startup)
+	    continue;
 
-  do_cleanups (cleanups);
-  return collector.symtabs;
+	  set_current_program_space (pspace);
+	  iterate_over_symtabs (file, collector);
+	}
+    }
+  else
+    {
+      set_current_program_space (search_pspace);
+      iterate_over_symtabs (file, collector);
+    }
+
+  return collector.release_symtabs ();
 }
 
-/* Return all the symtabs associated to the FILENAME.  */
+/* Return all the symtabs associated to the FILENAME.  If SEARCH_PSPACE is
+   not NULL, the search is restricted to just that program space.  */
 
 static VEC (symtab_ptr) *
-symtabs_from_filename (const char *filename)
+symtabs_from_filename (const char *filename,
+		       struct program_space *search_pspace)
 {
   VEC (symtab_ptr) *result;
   
-  result = collect_symtabs_from_filename (filename);
+  result = collect_symtabs_from_filename (filename, search_pspace);
 
   if (VEC_empty (symtab_ptr, result))
     {
@@ -3055,7 +3198,7 @@ symtabs_from_filename (const char *filen
 	throw_error (NOT_FOUND_ERROR,
 		     _("No symbol table is loaded.  "
 		       "Use the \"file\" command."));
-      throw_error (NOT_FOUND_ERROR, _("No source file named %s."), filename);
+      source_file_not_found_error (filename);
     }
 
   return result;
@@ -3084,9 +3227,10 @@ find_function_symbols (struct linespec_s
   /* Try NAME as an Objective-C selector.  */
   find_imps (name, &symbol_names);
   if (!VEC_empty (const_char_ptr, symbol_names))
-    add_all_symbol_names_from_pspace (&info, NULL, symbol_names);
+    add_all_symbol_names_from_pspace (&info, state->search_pspace,
+				      symbol_names);
   else
-    add_matching_symbols_to_info (name, &info, NULL);
+    add_matching_symbols_to_info (name, &info, state->search_pspace);
 
   do_cleanups (cleanup);
 
@@ -3117,27 +3261,28 @@ find_linespec_symbols (struct linespec_s
 		       VEC (symbolp) **symbols,
 		       VEC (bound_minimal_symbol_d) **minsyms)
 {
-  struct cleanup *cleanup;
-  char *canon;
+  demangle_result_storage demangle_storage;
+  std::string ada_lookup_storage;
   const char *lookup_name;
 
-  cleanup = demangle_for_lookup (name, state->language->la_language,
-				 &lookup_name);
   if (state->language->la_language == language_ada)
     {
       /* In Ada, the symbol lookups are performed using the encoded
          name rather than the demangled name.  */
-      lookup_name = ada_name_for_lookup (name);
-      make_cleanup (xfree, (void *) lookup_name);
+      ada_lookup_storage = ada_name_for_lookup (name);
+      lookup_name = ada_lookup_storage.c_str ();
     }
-
-  canon = cp_canonicalize_string_no_typedefs (lookup_name);
-  if (canon != NULL)
+  else
     {
-      lookup_name = canon;
-      make_cleanup (xfree, canon);
+      lookup_name = demangle_for_lookup (name,
+					 state->language->la_language,
+					 demangle_storage);
     }
 
+  std::string canon = cp_canonicalize_string_no_typedefs (lookup_name);
+  if (!canon.empty ())
+    lookup_name = canon.c_str ();
+
   /* It's important to not call expand_symtabs_matching unnecessarily
      as it can really slow things down (by unnecessarily expanding
      potentially 1000s of symtabs, which when debugging some apps can
@@ -3156,7 +3301,7 @@ find_linespec_symbols (struct linespec_s
   if (VEC_empty (symbolp, *symbols)
       && VEC_empty (bound_minimal_symbol_d, *minsyms))
     {
-      char *klass, *method;
+      std::string klass, method;
       const char *last, *p, *scope_op;
       VEC (symbolp) *classes;
 
@@ -3164,12 +3309,6 @@ find_linespec_symbols (struct linespec_s
 	 name into namespaces${SCOPE_OPERATOR}class_name and method_name.  */
       scope_op = "::";
       p = find_toplevel_string (lookup_name, scope_op);
-      if (p == NULL)
-	{
-	  /* No C++ scope operator.  Try Java.  */
-	  scope_op = ".";
-	  p = find_toplevel_string (lookup_name, scope_op);
-	}
 
       last = NULL;
       while (p != NULL)
@@ -3182,35 +3321,29 @@ find_linespec_symbols (struct linespec_s
 	 we already attempted to lookup the entire name as a symbol
 	 and failed.  */
       if (last == NULL)
-	{
-	  do_cleanups (cleanup);
-	  return;
-	}
+	return;
 
       /* LOOKUP_NAME points to the class name.
 	 LAST points to the method name.  */
-      klass = xmalloc ((last - lookup_name + 1) * sizeof (char));
-      make_cleanup (xfree, klass);
-      strncpy (klass, lookup_name, last - lookup_name);
-      klass[last - lookup_name] = '\0';
+      klass = std::string (lookup_name, last - lookup_name);
 
       /* Skip past the scope operator.  */
       last += strlen (scope_op);
-      method = xmalloc ((strlen (last) + 1) * sizeof (char));
-      make_cleanup (xfree, method);
-      strcpy (method, last);
+      method = last;
 
       /* Find a list of classes named KLASS.  */
-      classes = lookup_prefix_sym (state, file_symtabs, klass);
-      make_cleanup (VEC_cleanup (symbolp), &classes);
+      classes = lookup_prefix_sym (state, file_symtabs, klass.c_str ());
+      struct cleanup *old_chain
+	= make_cleanup (VEC_cleanup (symbolp), &classes);
 
       if (!VEC_empty (symbolp, classes))
 	{
 	  /* Now locate a list of suitable methods named METHOD.  */
 	  TRY
 	    {
-	      find_method (state, file_symtabs, klass, method, classes,
-			   symbols, minsyms);
+	      find_method (state, file_symtabs,
+			   klass.c_str (), method.c_str (),
+			   classes, symbols, minsyms);
 	    }
 
 	  /* If successful, we're done.  If NOT_FOUND_ERROR
@@ -3222,9 +3355,9 @@ find_linespec_symbols (struct linespec_s
 	    }
 	  END_CATCH
 	}
-    }
 
-  do_cleanups (cleanup);
+      do_cleanups (old_chain);
+    }
 }
 
 /* Return all labels named NAME in FUNCTION_SYMBOLS.  Return the
@@ -3254,7 +3387,7 @@ find_label_symbols (struct linespec_stat
 	return NULL;
       fn_sym = BLOCK_FUNCTION (block);
 
-      sym = lookup_symbol (name, block, LABEL_DOMAIN, 0);
+      sym = lookup_symbol (name, block, LABEL_DOMAIN, 0).symbol;
 
       if (sym != NULL)
 	{
@@ -3269,7 +3402,7 @@ find_label_symbols (struct linespec_stat
 	{
 	  set_current_program_space (SYMTAB_PSPACE (symbol_symtab (fn_sym)));
 	  block = SYMBOL_BLOCK_VALUE (fn_sym);
-	  sym = lookup_symbol (name, block, LABEL_DOMAIN, 0);
+	  sym = lookup_symbol (name, block, LABEL_DOMAIN, 0).symbol;
 
 	  if (sym != NULL)
 	    {
@@ -3417,20 +3550,6 @@ linespec_parse_variable (struct linespec
 }
 
 
-/* A callback used to possibly add a symbol to the results.  */
-
-static int
-collect_symbols (struct symbol *sym, void *data)
-{
-  struct collect_info *info = data;
-
-  /* In list mode, add all matching symbols, regardless of class.
-     This allows the user to type "list a_global_variable".  */
-  if (SYMBOL_CLASS (sym) == LOC_BLOCK || info->state->list_mode)
-    VEC_safe_push (symbolp, info->result.symbols, sym);
-  return 1; /* Continue iterating.  */
-}
-
 /* We've found a minimal symbol MSYMBOL in OBJFILE to associate with our
    linespec; return the SAL in RESULT.  This function should return SALs
    matching those from find_function_start_sal, otherwise false
@@ -3469,6 +3588,8 @@ minsym_found (struct linespec_state *sel
 	  sal.pc = MSYMBOL_VALUE_ADDRESS (objfile, msymbol);
 	  sal.pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc,
 						       &current_target);
+	  if (gdbarch_skip_entrypoint_p (gdbarch))
+	    sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc);
 	}
       else
 	skip_prologue_sal (&sal);
@@ -3528,8 +3649,8 @@ classify_mtype (enum minimal_symbol_type
 static int
 compare_msyms (const void *a, const void *b)
 {
-  const bound_minimal_symbol_d *moa = a;
-  const bound_minimal_symbol_d *mob = b;
+  const bound_minimal_symbol_d *moa = (const bound_minimal_symbol_d *) a;
+  const bound_minimal_symbol_d *mob = (const bound_minimal_symbol_d *) b;
   enum minimal_symbol_type ta = MSYMBOL_TYPE (moa->minsym);
   enum minimal_symbol_type tb = MSYMBOL_TYPE (mob->minsym);
 
@@ -3542,7 +3663,7 @@ compare_msyms (const void *a, const void
 static void
 add_minsym (struct minimal_symbol *minsym, void *d)
 {
-  struct collect_minsyms *info = d;
+  struct collect_minsyms *info = (struct collect_minsyms *) d;
   bound_minimal_symbol_d mo;
 
   mo.minsym = minsym;
@@ -3696,8 +3817,8 @@ add_matching_symbols_to_info (const char
       if (elt == NULL)
 	{
 	  iterate_over_all_matching_symtabs (info->state, name, VAR_DOMAIN,
-					     collect_symbols, info,
-					     pspace, 1);
+					     pspace, true, [&] (symbol *sym)
+	    { return info->add_symbol (sym); });
 	  search_minsyms_for_name (info, name, pspace, NULL);
 	}
       else if (pspace == NULL || pspace == SYMTAB_PSPACE (elt))
@@ -3708,8 +3829,8 @@ add_matching_symbols_to_info (const char
 	     been filtered out earlier.  */
 	  gdb_assert (!SYMTAB_PSPACE (elt)->executing_startup);
 	  set_current_program_space (SYMTAB_PSPACE (elt));
-	  iterate_over_file_blocks (elt, name, VAR_DOMAIN,
-				    collect_symbols, info);
+	  iterate_over_file_blocks (elt, name, VAR_DOMAIN, [&] (symbol *sym)
+	    { return info->add_symbol (sym); });
 
 	  /* If no new symbols were found in this iteration and this symtab
 	     is in assembler, we might actually be looking for a label for
@@ -3782,7 +3903,7 @@ destroy_linespec_result (struct linespec
   int i;
   struct linespec_sals *lsal;
 
-  xfree (ls->addr_string);
+  delete_event_location (ls->location);
   for (i = 0; VEC_iterate (linespec_sals, ls->sals, i, lsal); ++i)
     {
       xfree (lsal->canonical);
@@ -3796,7 +3917,7 @@ destroy_linespec_result (struct linespec
 static void
 cleanup_linespec_result (void *a)
 {
-  destroy_linespec_result (a);
+  destroy_linespec_result ((struct linespec_result *) a);
 }
 
 /* See the comment in linespec.h.  */
@@ -3806,3 +3927,11 @@ make_cleanup_destroy_linespec_result (st
 {
   return make_cleanup (cleanup_linespec_result, ls);
 }
+
+/* Return the quote characters permitted by the linespec parser.  */
+
+const char *
+get_gdb_linespec_parser_quote_characters (void)
+{
+  return linespec_quote_characters;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linespec.h ./gdb/linespec.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linespec.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linespec.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header for GDB line completion.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ enum decode_line_flags
 
 struct linespec_sals
 {
-  /* This is the linespec corresponding to the sals contained in this
+  /* This is the location corresponding to the sals contained in this
      object.  It can be passed as the FILTER argument to future calls
      to decode_line_full.  This is freed by
      destroy_linespec_result.  */
@@ -71,9 +71,9 @@ struct linespec_result
      object.  */
   int pre_expanded;
 
-  /* If PRE_EXPANDED is non-zero, this is set to the linespec entered
+  /* If PRE_EXPANDED is non-zero, this is set to the location entered
      by the user.  This will be freed by destroy_linespec_result.  */
-  char *addr_string;
+  struct event_location *location;
 
   /* The sals.  The vector will be freed by
      destroy_linespec_result.  */
@@ -96,16 +96,20 @@ extern struct cleanup *
 /* Decode a linespec using the provided default symtab and line.  */
 
 extern struct symtabs_and_lines
-	decode_line_1 (char **argptr, int flags,
+	decode_line_1 (const struct event_location *location, int flags,
+		       struct program_space *search_pspace,
 		       struct symtab *default_symtab, int default_line);
 
-/* Parse *ARGPTR as a linespec and return results.  This is the "full"
+/* Parse LOCATION and return results.  This is the "full"
    interface to this module, which handles multiple results
    properly.
 
    For FLAGS, see decode_line_flags.  DECODE_LINE_LIST_MODE is not
    valid for this function.
 
+   If SEARCH_PSPACE is not NULL, symbol search is restricted to just
+   that program space.
+
    DEFAULT_SYMTAB and DEFAULT_LINE describe the default location.
    DEFAULT_SYMTAB can be NULL, in which case the current symtab and
    line are used.
@@ -135,7 +139,8 @@ extern struct symtabs_and_lines
    strcmp sense) to FILTER will be returned; all others will be
    filtered out.  */
 
-extern void decode_line_full (char **argptr, int flags,
+extern void decode_line_full (const struct event_location *location, int flags,
+			      struct program_space *search_pspace,
 			      struct symtab *default_symtab, int default_line,
 			      struct linespec_result *canonical,
 			      const char *select_mode,
@@ -156,4 +161,34 @@ extern struct symtabs_and_lines decode_l
    the keyword.  If not, return NULL.  */
 
 extern const char *linespec_lexer_lex_keyword (const char *p);
+
+/* Parse a line offset from STRING.  */
+
+extern struct line_offset linespec_parse_line_offset (const char *string);
+
+/* Return the quote characters permitted by the linespec parser.  */
+
+extern const char *get_gdb_linespec_parser_quote_characters (void);
+
+/* Does STRING represent an Ada operator?  If so, return the length
+   of the decoded operator name.  If not, return 0.  */
+
+extern int is_ada_operator (const char *string);
+
+/* Find an instance of the character C in the string S that is outside
+   of all parenthesis pairs, single-quoted strings, and double-quoted
+   strings.  Also, ignore the char within a template name, like a ','
+   within foo<int, int>.  */
+
+extern const char *find_toplevel_char (const char *s, char c);
+
+/* Find the end of the (first) linespec pointed to by *STRINGP.
+   STRINGP will be advanced to this point.  */
+
+extern void linespec_lex_to_end (char **stringp);
+
+/* Evaluate the expression pointed to by EXP_PTR into a CORE_ADDR,
+   advancing EXP_PTR past any parsed text.  */
+
+extern CORE_ADDR linespec_expression_to_pc (const char **exp_ptr);
 #endif /* defined (LINESPEC_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-fork.c ./gdb/linux-fork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-fork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-fork.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code for debugging multiple forks.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +30,7 @@
 #include "gdbthread.h"
 #include "source.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include "gdb_wait.h"
 #include <dirent.h>
 #include <ctype.h>
@@ -63,6 +63,21 @@ forks_exist_p (void)
   return (fork_list != NULL);
 }
 
+/* Return the last fork in the list.  */
+
+static struct fork_info *
+find_last_fork (void)
+{
+  struct fork_info *last;
+
+  if (fork_list == NULL)
+    return NULL;
+
+  for (last = fork_list; last->next != NULL; last = last->next)
+    ;
+  return last;
+}
+
 /* Add a fork to the internal fork list.  */
 
 struct fork_info *
@@ -83,8 +98,16 @@ add_fork (pid_t pid)
   fp = XCNEW (struct fork_info);
   fp->ptid = ptid_build (pid, pid, 0);
   fp->num = ++highest_fork_num;
-  fp->next = fork_list;
-  fork_list = fp;
+
+  if (fork_list == NULL)
+    fork_list = fp;
+  else
+    {
+      struct fork_info *last = find_last_fork ();
+
+      last->next = fp;
+    }
+
   return fp;
 }
 
@@ -297,8 +320,7 @@ fork_save_infrun_state (struct fork_info
 		fp->maxfd = tmp;
 	    }
 	  /* Allocate array of file positions.  */
-	  fp->filepos = xrealloc (fp->filepos,
-				  (fp->maxfd + 1) * sizeof (*fp->filepos));
+	  fp->filepos = XRESIZEVEC (off_t, fp->filepos, fp->maxfd + 1);
 
 	  /* Initialize to -1 (invalid).  */
 	  for (tmp = 0; tmp <= fp->maxfd; tmp++)
@@ -354,12 +376,13 @@ linux_fork_killall (void)
 void
 linux_fork_mourn_inferior (void)
 {
+  struct fork_info *last;
+  int status;
+
   /* Wait just one more time to collect the inferior's exit status.
      Do not check whether this succeeds though, since we may be
      dealing with a process that we attached to.  Such a process will
      only report its exit status to its original parent.  */
-  int status;
-
   waitpid (ptid_get_pid (inferior_ptid), &status, 0);
 
   /* OK, presumably inferior_ptid is the one who has exited.
@@ -372,7 +395,8 @@ linux_fork_mourn_inferior (void)
      inferior_ptid yet.  */
   gdb_assert (fork_list);
 
-  fork_load_infrun_state (fork_list);
+  last = find_last_fork ();
+  fork_load_infrun_state (last);
   printf_filtered (_("[Switching to %s]\n"),
 		   target_pid_to_str (inferior_ptid));
 
@@ -416,7 +440,7 @@ linux_fork_detach (const char *args, int
 static void
 inferior_call_waitpid_cleanup (void *fp)
 {
-  struct fork_info *oldfp = fp;
+  struct fork_info *oldfp = (struct fork_info *) fp;
 
   if (oldfp)
     {
@@ -656,7 +680,6 @@ checkpoint_command (char *args, int from
   struct value *fork_fn = NULL, *ret;
   struct fork_info *fp;
   pid_t retpid;
-  struct cleanup *old_chain;
 
   if (!target_has_execution) 
     error (_("The program is not being run."));
@@ -680,11 +703,13 @@ checkpoint_command (char *args, int from
   ret = value_from_longest (builtin_type (gdbarch)->builtin_int, 0);
 
   /* Tell linux-nat.c that we're checkpointing this inferior.  */
-  old_chain = make_cleanup_restore_integer (&checkpointing_pid);
-  checkpointing_pid = ptid_get_pid (inferior_ptid);
+  {
+    scoped_restore save_pid
+      = make_scoped_restore (&checkpointing_pid, ptid_get_pid (inferior_ptid));
+
+    ret = call_function_by_hand (fork_fn, 0, &ret);
+  }
 
-  ret = call_function_by_hand (fork_fn, 0, &ret);
-  do_cleanups (old_chain);
   if (!ret)	/* Probably can't happen.  */
     error (_("checkpoint: call_function_by_hand returned null."));
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-fork.h ./gdb/linux-fork.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-fork.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-fork.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code for debugging multiple forks.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-nat.c ./gdb/linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code common to multiple platforms.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,11 +24,9 @@
 #include "nat/linux-nat.h"
 #include "nat/linux-waitpid.h"
 #include "gdb_wait.h"
-#ifdef HAVE_TKILL_SYSCALL
 #include <unistd.h>
 #include <sys/syscall.h>
-#endif
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include "linux-nat.h"
 #include "nat/linux-ptrace.h"
 #include "nat/linux-procfs.h"
@@ -78,29 +76,35 @@
 Waiting for events in sync mode
 ===============================
 
-When waiting for an event in a specific thread, we just use waitpid, passing
-the specific pid, and not passing WNOHANG.
+When waiting for an event in a specific thread, we just use waitpid,
+passing the specific pid, and not passing WNOHANG.
+
+When waiting for an event in all threads, waitpid is not quite good:
+
+- If the thread group leader exits while other threads in the thread
+  group still exist, waitpid(TGID, ...) hangs.  That waitpid won't
+  return an exit status until the other threads in the group are
+  reaped.
 
-When waiting for an event in all threads, waitpid is not quite good.  Prior to
-version 2.4, Linux can either wait for event in main thread, or in secondary
-threads.  (2.4 has the __WALL flag).  So, if we use blocking waitpid, we might
-miss an event.  The solution is to use non-blocking waitpid, together with
-sigsuspend.  First, we use non-blocking waitpid to get an event in the main 
-process, if any.  Second, we use non-blocking waitpid with the __WCLONED
-flag to check for events in cloned processes.  If nothing is found, we use
-sigsuspend to wait for SIGCHLD.  When SIGCHLD arrives, it means something
-happened to a child process -- and SIGCHLD will be delivered both for events
-in main debugged process and in cloned processes.  As soon as we know there's
-an event, we get back to calling nonblocking waitpid with and without 
-__WCLONED.
-
-Note that SIGCHLD should be blocked between waitpid and sigsuspend calls,
-so that we don't miss a signal.  If SIGCHLD arrives in between, when it's
-blocked, the signal becomes pending and sigsuspend immediately
-notices it and returns.
+- When a non-leader thread execs, that thread just vanishes without
+  reporting an exit (so we'd hang if we waited for it explicitly in
+  that case).  The exec event is instead reported to the TGID pid.
+
+The solution is to always use -1 and WNOHANG, together with
+sigsuspend.
 
-Waiting for events in async mode
-================================
+First, we use non-blocking waitpid to check for events.  If nothing is
+found, we use sigsuspend to wait for SIGCHLD.  When SIGCHLD arrives,
+it means something happened to a child process.  As soon as we know
+there's an event, we get back to calling nonblocking waitpid.
+
+Note that SIGCHLD should be blocked between waitpid and sigsuspend
+calls, so that we don't miss a signal.  If SIGCHLD arrives in between,
+when it's blocked, the signal becomes pending and sigsuspend
+immediately notices it and returns.
+
+Waiting for events in async mode (TARGET_WNOHANG)
+=================================================
 
 In async mode, GDB should always be ready to handle both user input
 and target events, so neither blocking waitpid nor sigsuspend are
@@ -159,7 +163,24 @@ We could use a real-time signal instead.
 could use PTRACE_GETSIGINFO to locate the specific stop signals sent by GDB.
 But we would still have to have some support for SIGSTOP, since PTRACE_ATTACH
 generates it, and there are races with trying to find a signal that is not
-blocked.  */
+blocked.
+
+Exec events
+===========
+
+The case of a thread group (process) with 3 or more threads, and a
+thread other than the leader execs is worth detailing:
+
+On an exec, the Linux kernel destroys all threads except the execing
+one in the thread group, and resets the execing thread's tid to the
+tgid.  No exit notification is sent for the execing thread -- from the
+ptracer's perspective, it appears as though the execing thread just
+vanishes.  Until we reap all other threads except the leader and the
+execing thread, the leader will be zombie, and the execing thread will
+be in `D (disc sleep)' state.  As soon as all other threads are
+reaped, the execing thread changes its tid to the tgid, and the
+previous (zombie) leader vanishes, giving place to the "new"
+leader.  */
 
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
@@ -218,6 +239,9 @@ struct simple_pid_list
 };
 struct simple_pid_list *stopped_pids;
 
+/* Whether target_thread_events is in effect.  */
+static int report_thread_events;
+
 /* Async mode support.  */
 
 /* The read/write ends of the pipe registered as waitable file in the
@@ -282,10 +306,11 @@ static struct lwp_info *find_lwp_pid (pt
 
 static int lwp_status_pending_p (struct lwp_info *lp);
 
-static int check_stopped_by_breakpoint (struct lwp_info *lp);
 static int sigtrap_is_event (int status);
 static int (*linux_nat_status_is_event) (int status) = sigtrap_is_event;
 
+static void save_stop_reason (struct lwp_info *lp);
+
 
 /* LWP accessors.  */
 
@@ -330,13 +355,21 @@ lwp_stop_reason (struct lwp_info *lwp)
   return lwp->stop_reason;
 }
 
+/* See nat/linux-nat.h.  */
+
+int
+lwp_is_stepping (struct lwp_info *lwp)
+{
+  return lwp->step;
+}
+
 
 /* Trivial list manipulation functions to keep track of a list of
    new stopped processes.  */
 static void
 add_to_pid_list (struct simple_pid_list **listp, int pid, int status)
 {
-  struct simple_pid_list *new_pid = xmalloc (sizeof (struct simple_pid_list));
+  struct simple_pid_list *new_pid = XNEW (struct simple_pid_list);
 
   new_pid->pid = pid;
   new_pid->status = status;
@@ -345,17 +378,6 @@ add_to_pid_list (struct simple_pid_list 
 }
 
 static int
-in_pid_list_p (struct simple_pid_list *list, int pid)
-{
-  struct simple_pid_list *p;
-
-  for (p = list; p != NULL; p = p->next)
-    if (p->pid == pid)
-      return 1;
-  return 0;
-}
-
-static int
 pull_pid_from_list (struct simple_pid_list **listp, int pid, int *statusp)
 {
   struct simple_pid_list **p;
@@ -438,7 +460,7 @@ num_lwps (int pid)
 static void
 delete_lwp_cleanup (void *lp_voidp)
 {
-  struct lwp_info *lp = lp_voidp;
+  struct lwp_info *lp = (struct lwp_info *) lp_voidp;
 
   delete_lwp (lp->ptid);
 }
@@ -663,41 +685,86 @@ linux_child_set_syscall_catchpoint (stru
   return 0;
 }
 
-/* On GNU/Linux there are no real LWP's.  The closest thing to LWP's
-   are processes sharing the same VM space.  A multi-threaded process
-   is basically a group of such processes.  However, such a grouping
-   is almost entirely a user-space issue; the kernel doesn't enforce
-   such a grouping at all (this might change in the future).  In
-   general, we'll rely on the threads library (i.e. the GNU/Linux
-   Threads library) to provide such a grouping.
-
-   It is perfectly well possible to write a multi-threaded application
-   without the assistance of a threads library, by using the clone
-   system call directly.  This module should be able to give some
-   rudimentary support for debugging such applications if developers
-   specify the CLONE_PTRACE flag in the clone system call, and are
-   using the Linux kernel 2.4 or above.
-
-   Note that there are some peculiarities in GNU/Linux that affect
-   this code:
-
-   - In general one should specify the __WCLONE flag to waitpid in
-     order to make it report events for any of the cloned processes
-     (and leave it out for the initial process).  However, if a cloned
-     process has exited the exit status is only reported if the
-     __WCLONE flag is absent.  Linux kernel 2.4 has a __WALL flag, but
-     we cannot use it since GDB must work on older systems too.
-
-   - When a traced, cloned process exits and is waited for by the
-     debugger, the kernel reassigns it to the original parent and
-     keeps it around as a "zombie".  Somehow, the GNU/Linux Threads
-     library doesn't notice this, which leads to the "zombie problem":
-     When debugged a multi-threaded process that spawns a lot of
-     threads will run out of processes, even if the threads exit,
-     because the "zombies" stay around.  */
+/* List of known LWPs, keyed by LWP PID.  This speeds up the common
+   case of mapping a PID returned from the kernel to our corresponding
+   lwp_info data structure.  */
+static htab_t lwp_lwpid_htab;
+
+/* Calculate a hash from a lwp_info's LWP PID.  */
+
+static hashval_t
+lwp_info_hash (const void *ap)
+{
+  const struct lwp_info *lp = (struct lwp_info *) ap;
+  pid_t pid = ptid_get_lwp (lp->ptid);
+
+  return iterative_hash_object (pid, 0);
+}
+
+/* Equality function for the lwp_info hash table.  Compares the LWP's
+   PID.  */
+
+static int
+lwp_lwpid_htab_eq (const void *a, const void *b)
+{
+  const struct lwp_info *entry = (const struct lwp_info *) a;
+  const struct lwp_info *element = (const struct lwp_info *) b;
+
+  return ptid_get_lwp (entry->ptid) == ptid_get_lwp (element->ptid);
+}
+
+/* Create the lwp_lwpid_htab hash table.  */
 
-/* List of known LWPs.  */
+static void
+lwp_lwpid_htab_create (void)
+{
+  lwp_lwpid_htab = htab_create (100, lwp_info_hash, lwp_lwpid_htab_eq, NULL);
+}
+
+/* Add LP to the hash table.  */
+
+static void
+lwp_lwpid_htab_add_lwp (struct lwp_info *lp)
+{
+  void **slot;
+
+  slot = htab_find_slot (lwp_lwpid_htab, lp, INSERT);
+  gdb_assert (slot != NULL && *slot == NULL);
+  *slot = lp;
+}
+
+/* Head of doubly-linked list of known LWPs.  Sorted by reverse
+   creation order.  This order is assumed in some cases.  E.g.,
+   reaping status after killing alls lwps of a process: the leader LWP
+   must be reaped last.  */
 struct lwp_info *lwp_list;
+
+/* Add LP to sorted-by-reverse-creation-order doubly-linked list.  */
+
+static void
+lwp_list_add (struct lwp_info *lp)
+{
+  lp->next = lwp_list;
+  if (lwp_list != NULL)
+    lwp_list->prev = lp;
+  lwp_list = lp;
+}
+
+/* Remove LP from sorted-by-reverse-creation-order doubly-linked
+   list.  */
+
+static void
+lwp_list_remove (struct lwp_info *lp)
+{
+  /* Remove from sorted-by-creation-order list.  */
+  if (lp->next != NULL)
+    lp->next->prev = lp->prev;
+  if (lp->prev != NULL)
+    lp->prev->next = lp->next;
+  if (lp == lwp_list)
+    lwp_list = lp->next;
+}
+
 
 
 /* Original signal mask.  */
@@ -759,9 +826,9 @@ linux_nat_pass_signals (struct target_op
 
 /* Prototypes for local functions.  */
 static int stop_wait_callback (struct lwp_info *lp, void *data);
-static int linux_thread_alive (ptid_t ptid);
 static char *linux_child_pid_to_exec_file (struct target_ops *self, int pid);
 static int resume_stopped_resumed_lwps (struct lwp_info *lp, void *data);
+static int check_ptrace_stopped_lwp_gone (struct lwp_info *lp);
 
 
 
@@ -774,31 +841,30 @@ lwp_free (struct lwp_info *lp)
   xfree (lp);
 }
 
-/* Remove all LWPs belong to PID from the lwp list.  */
+/* Traversal function for purge_lwp_list.  */
 
-static void
-purge_lwp_list (int pid)
+static int
+lwp_lwpid_htab_remove_pid (void **slot, void *info)
 {
-  struct lwp_info *lp, *lpprev, *lpnext;
-
-  lpprev = NULL;
+  struct lwp_info *lp = (struct lwp_info *) *slot;
+  int pid = *(int *) info;
 
-  for (lp = lwp_list; lp; lp = lpnext)
+  if (ptid_get_pid (lp->ptid) == pid)
     {
-      lpnext = lp->next;
+      htab_clear_slot (lwp_lwpid_htab, slot);
+      lwp_list_remove (lp);
+      lwp_free (lp);
+    }
 
-      if (ptid_get_pid (lp->ptid) == pid)
-	{
-	  if (lp == lwp_list)
-	    lwp_list = lp->next;
-	  else
-	    lpprev->next = lp->next;
+  return 1;
+}
 
-	  lwp_free (lp);
-	}
-      else
-	lpprev = lp;
-    }
+/* Remove all LWPs belong to PID from the lwp list.  */
+
+static void
+purge_lwp_list (int pid)
+{
+  htab_traverse_noresize (lwp_lwpid_htab, lwp_lwpid_htab_remove_pid, &pid);
 }
 
 /* Add the LWP specified by PTID to the list.  PTID is the first LWP
@@ -822,7 +888,7 @@ add_initial_lwp (ptid_t ptid)
 
   gdb_assert (ptid_lwp_p (ptid));
 
-  lp = (struct lwp_info *) xmalloc (sizeof (struct lwp_info));
+  lp = XNEW (struct lwp_info);
 
   memset (lp, 0, sizeof (struct lwp_info));
 
@@ -832,8 +898,11 @@ add_initial_lwp (ptid_t ptid)
   lp->ptid = ptid;
   lp->core = -1;
 
-  lp->next = lwp_list;
-  lwp_list = lp;
+  /* Add to sorted-by-reverse-creation-order list.  */
+  lwp_list_add (lp);
+
+  /* Add to keyed-by-pid htab.  */
+  lwp_lwpid_htab_add_lwp (lp);
 
   return lp;
 }
@@ -864,22 +933,24 @@ add_lwp (ptid_t ptid)
 static void
 delete_lwp (ptid_t ptid)
 {
-  struct lwp_info *lp, *lpprev;
+  struct lwp_info *lp;
+  void **slot;
+  struct lwp_info dummy;
 
-  lpprev = NULL;
+  dummy.ptid = ptid;
+  slot = htab_find_slot (lwp_lwpid_htab, &dummy, NO_INSERT);
+  if (slot == NULL)
+    return;
 
-  for (lp = lwp_list; lp; lpprev = lp, lp = lp->next)
-    if (ptid_equal (lp->ptid, ptid))
-      break;
+  lp = *(struct lwp_info **) slot;
+  gdb_assert (lp != NULL);
 
-  if (!lp)
-    return;
+  htab_clear_slot (lwp_lwpid_htab, slot);
 
-  if (lpprev)
-    lpprev->next = lp->next;
-  else
-    lwp_list = lp->next;
+  /* Remove from sorted-by-creation-order list.  */
+  lwp_list_remove (lp);
 
+  /* Release.  */
   lwp_free (lp);
 }
 
@@ -891,17 +962,16 @@ find_lwp_pid (ptid_t ptid)
 {
   struct lwp_info *lp;
   int lwp;
+  struct lwp_info dummy;
 
   if (ptid_lwp_p (ptid))
     lwp = ptid_get_lwp (ptid);
   else
     lwp = ptid_get_pid (ptid);
 
-  for (lp = lwp_list; lp; lp = lp->next)
-    if (lwp == ptid_get_lwp (lp->ptid))
-      return lp;
-
-  return NULL;
+  dummy.ptid = ptid_build (0, lwp, 0);
+  lp = (struct lwp_info *) htab_find (lwp_lwpid_htab, &dummy);
+  return lp;
 }
 
 /* See nat/linux-nat.h.  */
@@ -975,8 +1045,7 @@ exit_lwp (struct lwp_info *lp)
    Returns a wait status for that LWP, to cache.  */
 
 static int
-linux_nat_post_attach_wait (ptid_t ptid, int first, int *cloned,
-			    int *signalled)
+linux_nat_post_attach_wait (ptid_t ptid, int first, int *signalled)
 {
   pid_t new_pid, pid = ptid_get_lwp (ptid);
   int status;
@@ -1010,17 +1079,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
   /* Make sure the initial process is stopped.  The user-level threads
      layer might want to poke around in the inferior, and that won't
      work if things haven't stabilized yet.  */
-  new_pid = my_waitpid (pid, &status, 0);
-  if (new_pid == -1 && errno == ECHILD)
-    {
-      if (first)
-	warning (_("%s is a cloned process"), target_pid_to_str (ptid));
-
-      /* Try again with __WCLONE to check cloned processes.  */
-      new_pid = my_waitpid (pid, &status, __WCLONE);
-      *cloned = 1;
-    }
-
+  new_pid = my_waitpid (pid, &status, __WALL);
   gdb_assert (pid == new_pid);
 
   if (!WIFSTOPPED (status))
@@ -1044,139 +1103,6 @@ linux_nat_post_attach_wait (ptid_t ptid,
   return status;
 }
 
-/* Attach to the LWP specified by PID.  Return 0 if successful, -1 if
-   the new LWP could not be attached, or 1 if we're already auto
-   attached to this thread, but haven't processed the
-   PTRACE_EVENT_CLONE event of its parent thread, so we just ignore
-   its existance, without considering it an error.  */
-
-int
-lin_lwp_attach_lwp (ptid_t ptid)
-{
-  struct lwp_info *lp;
-  int lwpid;
-
-  gdb_assert (ptid_lwp_p (ptid));
-
-  lp = find_lwp_pid (ptid);
-  lwpid = ptid_get_lwp (ptid);
-
-  /* We assume that we're already attached to any LWP that is already
-     in our list of LWPs.  If we're not seeing exit events from threads
-     and we've had PID wraparound since we last tried to stop all threads,
-     this assumption might be wrong; fortunately, this is very unlikely
-     to happen.  */
-  if (lp == NULL)
-    {
-      int status, cloned = 0, signalled = 0;
-
-      if (ptrace (PTRACE_ATTACH, lwpid, 0, 0) < 0)
-	{
-	  if (linux_supports_tracefork ())
-	    {
-	      /* If we haven't stopped all threads when we get here,
-		 we may have seen a thread listed in thread_db's list,
-		 but not processed the PTRACE_EVENT_CLONE yet.  If
-		 that's the case, ignore this new thread, and let
-		 normal event handling discover it later.  */
-	      if (in_pid_list_p (stopped_pids, lwpid))
-		{
-		  /* We've already seen this thread stop, but we
-		     haven't seen the PTRACE_EVENT_CLONE extended
-		     event yet.  */
-		  if (debug_linux_nat)
-		    fprintf_unfiltered (gdb_stdlog,
-					"LLAL: attach failed, but already seen "
-					"this thread %s stop\n",
-					target_pid_to_str (ptid));
-		  return 1;
-		}
-	      else
-		{
-		  int new_pid;
-		  int status;
-
-		  if (debug_linux_nat)
-		    fprintf_unfiltered (gdb_stdlog,
-					"LLAL: attach failed, and haven't seen "
-					"this thread %s stop yet\n",
-					target_pid_to_str (ptid));
-
-		  /* We may or may not be attached to the LWP already.
-		     Try waitpid on it.  If that errors, we're not
-		     attached to the LWP yet.  Otherwise, we're
-		     already attached.  */
-		  gdb_assert (lwpid > 0);
-		  new_pid = my_waitpid (lwpid, &status, WNOHANG);
-		  if (new_pid == -1 && errno == ECHILD)
-		    new_pid = my_waitpid (lwpid, &status, __WCLONE | WNOHANG);
-		  if (new_pid != -1)
-		    {
-		      if (new_pid == 0)
-			{
-			  /* The child hasn't stopped for its initial
-			     SIGSTOP stop yet.  */
-			  if (debug_linux_nat)
-			    fprintf_unfiltered (gdb_stdlog,
-						"LLAL: child hasn't "
-						"stopped yet\n");
-			}
-		      else if (WIFSTOPPED (status))
-			{
-			  if (debug_linux_nat)
-			    fprintf_unfiltered (gdb_stdlog,
-						"LLAL: adding to stopped_pids\n");
-			  add_to_pid_list (&stopped_pids, lwpid, status);
-			}
-		      return 1;
-		    }
-		}
-	    }
-
-	  /* If we fail to attach to the thread, issue a warning,
-	     but continue.  One way this can happen is if thread
-	     creation is interrupted; as of Linux kernel 2.6.19, a
-	     bug may place threads in the thread list and then fail
-	     to create them.  */
-	  warning (_("Can't attach %s: %s"), target_pid_to_str (ptid),
-		   safe_strerror (errno));
-	  return -1;
-	}
-
-      if (debug_linux_nat)
-	fprintf_unfiltered (gdb_stdlog,
-			    "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n",
-			    target_pid_to_str (ptid));
-
-      status = linux_nat_post_attach_wait (ptid, 0, &cloned, &signalled);
-      if (!WIFSTOPPED (status))
-	return 1;
-
-      lp = add_lwp (ptid);
-      lp->stopped = 1;
-      lp->last_resume_kind = resume_stop;
-      lp->cloned = cloned;
-      lp->signalled = signalled;
-      if (WSTOPSIG (status) != SIGSTOP)
-	{
-	  lp->resumed = 1;
-	  lp->status = status;
-	}
-
-      target_post_attach (ptid_get_lwp (lp->ptid));
-
-      if (debug_linux_nat)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "LLAL: waitpid %s received %s\n",
-			      target_pid_to_str (ptid),
-			      status_to_str (status));
-	}
-    }
-
-  return 0;
-}
-
 static void
 linux_nat_create_inferior (struct target_ops *ops, 
 			   char *exec_file, char *allargs, char **env,
@@ -1247,7 +1173,6 @@ attach_proc_task_lwp_callback (ptid_t pt
 				target_pid_to_str (ptid));
 
 	  lp = add_lwp (ptid);
-	  lp->cloned = 1;
 
 	  /* The next time we wait for this LWP we'll see a SIGSTOP as
 	     PTRACE_ATTACH brings it to a halt.  */
@@ -1256,6 +1181,16 @@ attach_proc_task_lwp_callback (ptid_t pt
 	  /* We need to wait for a stop before being able to make the
 	     next ptrace call on this LWP.  */
 	  lp->must_set_ptrace_flags = 1;
+
+	  /* So that wait collects the SIGSTOP.  */
+	  lp->resumed = 1;
+
+	  /* Also add the LWP to gdb's thread list, in case a
+	     matching libthread_db is not found (or the process uses
+	     raw clone).  */
+	  add_thread (lp->ptid);
+	  set_running (lp->ptid, 1);
+	  set_executing (lp->ptid, 1);
 	}
 
       return 1;
@@ -1310,8 +1245,7 @@ linux_nat_attach (struct target_ops *ops
   /* Add the initial process as the first LWP to the list.  */
   lp = add_initial_lwp (ptid);
 
-  status = linux_nat_post_attach_wait (lp->ptid, 1, &lp->cloned,
-				       &lp->signalled);
+  status = linux_nat_post_attach_wait (lp->ptid, 1, &lp->signalled);
   if (!WIFSTOPPED (status))
     {
       if (WIFEXITED (status))
@@ -1319,7 +1253,7 @@ linux_nat_attach (struct target_ops *ops
 	  int exit_code = WEXITSTATUS (status);
 
 	  target_terminal_ours ();
-	  target_mourn_inferior ();
+	  target_mourn_inferior (inferior_ptid);
 	  if (exit_code == 0)
 	    error (_("Unable to attach: program exited normally."));
 	  else
@@ -1331,7 +1265,7 @@ linux_nat_attach (struct target_ops *ops
 	  enum gdb_signal signo;
 
 	  target_terminal_ours ();
-	  target_mourn_inferior ();
+	  target_mourn_inferior (inferior_ptid);
 
 	  signo = gdb_signal_from_host (WTERMSIG (status));
 	  error (_("Unable to attach: program terminated with signal "
@@ -1370,9 +1304,13 @@ linux_nat_attach (struct target_ops *ops
     target_async (1);
 }
 
-/* Get pending status of LP.  */
+/* Get pending signal of THREAD as a host signal number, for detaching
+   purposes.  This is the signal the thread last stopped for, which we
+   need to deliver to the thread when detaching, otherwise, it'd be
+   suppressed/lost.  */
+
 static int
-get_pending_status (struct lwp_info *lp, int *status)
+get_detach_signal (struct lwp_info *lp)
 {
   enum gdb_signal signo = GDB_SIGNAL_0;
 
@@ -1401,13 +1339,16 @@ get_pending_status (struct lwp_info *lp,
     signo = GDB_SIGNAL_0; /* a pending ptrace event, not a real signal.  */
   else if (lp->status)
     signo = gdb_signal_from_host (WSTOPSIG (lp->status));
-  else if (non_stop && !is_executing (lp->ptid))
+  else if (target_is_non_stop_p () && !is_executing (lp->ptid))
     {
       struct thread_info *tp = find_thread_ptid (lp->ptid);
 
-      signo = tp->suspend.stop_signal;
+      if (tp->suspend.waitstatus_pending_p)
+	signo = tp->suspend.waitstatus.value.sig;
+      else
+	signo = tp->suspend.stop_signal;
     }
-  else if (!non_stop)
+  else if (!target_is_non_stop_p ())
     {
       struct target_waitstatus last;
       ptid_t last_ptid;
@@ -1422,8 +1363,6 @@ get_pending_status (struct lwp_info *lp,
 	}
     }
 
-  *status = 0;
-
   if (signo == GDB_SIGNAL_0)
     {
       if (debug_linux_nat)
@@ -1442,21 +1381,28 @@ get_pending_status (struct lwp_info *lp,
     }
   else
     {
-      *status = W_STOPCODE (gdb_signal_to_host (signo));
-
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
 			    "GPT: lwp %s has pending signal %s\n",
 			    target_pid_to_str (lp->ptid),
 			    gdb_signal_to_string (signo));
+
+      return gdb_signal_to_host (signo);
     }
 
   return 0;
 }
 
-static int
-detach_callback (struct lwp_info *lp, void *data)
+/* Detach from LP.  If SIGNO_P is non-NULL, then it points to the
+   signal number that should be passed to the LWP when detaching.
+   Otherwise pass any pending signal the LWP may have, if any.  */
+
+static void
+detach_one_lwp (struct lwp_info *lp, int *signo_p)
 {
+  int lwpid = ptid_get_lwp (lp->ptid);
+  int signo;
+
   gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
 
   if (debug_linux_nat && lp->status)
@@ -1472,36 +1418,83 @@ detach_callback (struct lwp_info *lp, vo
 			    "DC: Sending SIGCONT to %s\n",
 			    target_pid_to_str (lp->ptid));
 
-      kill_lwp (ptid_get_lwp (lp->ptid), SIGCONT);
+      kill_lwp (lwpid, SIGCONT);
       lp->signalled = 0;
     }
 
-  /* We don't actually detach from the LWP that has an id equal to the
-     overall process id just yet.  */
-  if (ptid_get_lwp (lp->ptid) != ptid_get_pid (lp->ptid))
+  if (signo_p == NULL)
     {
-      int status = 0;
-
       /* Pass on any pending signal for this LWP.  */
-      get_pending_status (lp, &status);
+      signo = get_detach_signal (lp);
+    }
+  else
+    signo = *signo_p;
 
+  /* Preparing to resume may try to write registers, and fail if the
+     lwp is zombie.  If that happens, ignore the error.  We'll handle
+     it below, when detach fails with ESRCH.  */
+  TRY
+    {
       if (linux_nat_prepare_to_resume != NULL)
 	linux_nat_prepare_to_resume (lp);
-      errno = 0;
-      if (ptrace (PTRACE_DETACH, ptid_get_lwp (lp->ptid), 0,
-		  WSTOPSIG (status)) < 0)
-	error (_("Can't detach %s: %s"), target_pid_to_str (lp->ptid),
-	       safe_strerror (errno));
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (!check_ptrace_stopped_lwp_gone (lp))
+	throw_exception (ex);
+    }
+  END_CATCH
 
-      if (debug_linux_nat)
-	fprintf_unfiltered (gdb_stdlog,
-			    "PTRACE_DETACH (%s, %s, 0) (OK)\n",
-			    target_pid_to_str (lp->ptid),
-			    strsignal (WSTOPSIG (status)));
+  if (ptrace (PTRACE_DETACH, lwpid, 0, signo) < 0)
+    {
+      int save_errno = errno;
+
+      /* We know the thread exists, so ESRCH must mean the lwp is
+	 zombie.  This can happen if one of the already-detached
+	 threads exits the whole thread group.  In that case we're
+	 still attached, and must reap the lwp.  */
+      if (save_errno == ESRCH)
+	{
+	  int ret, status;
 
-      delete_lwp (lp->ptid);
+	  ret = my_waitpid (lwpid, &status, __WALL);
+	  if (ret == -1)
+	    {
+	      warning (_("Couldn't reap LWP %d while detaching: %s"),
+		       lwpid, strerror (errno));
+	    }
+	  else if (!WIFEXITED (status) && !WIFSIGNALED (status))
+	    {
+	      warning (_("Reaping LWP %d while detaching "
+			 "returned unexpected status 0x%x"),
+		       lwpid, status);
+	    }
+	}
+      else
+	{
+	  error (_("Can't detach %s: %s"), target_pid_to_str (lp->ptid),
+		 safe_strerror (save_errno));
+	}
+    }
+  else if (debug_linux_nat)
+    {
+      fprintf_unfiltered (gdb_stdlog,
+			  "PTRACE_DETACH (%s, %s, 0) (OK)\n",
+			  target_pid_to_str (lp->ptid),
+			  strsignal (signo));
     }
 
+  delete_lwp (lp->ptid);
+}
+
+static int
+detach_callback (struct lwp_info *lp, void *data)
+{
+  /* We don't actually detach from the thread group leader just yet.
+     If the thread group exits, we must reap the zombie clone lwps
+     before we're able to reap the leader.  */
+  if (ptid_get_lwp (lp->ptid) != ptid_get_pid (lp->ptid))
+    detach_one_lwp (lp, NULL);
   return 0;
 }
 
@@ -1509,7 +1502,6 @@ static void
 linux_nat_detach (struct target_ops *ops, const char *args, int from_tty)
 {
   int pid;
-  int status;
   struct lwp_info *main_lwp;
 
   pid = ptid_get_pid (inferior_ptid);
@@ -1531,29 +1523,6 @@ linux_nat_detach (struct target_ops *ops
 
   main_lwp = find_lwp_pid (pid_to_ptid (pid));
 
-  /* Pass on any pending signal for the last LWP.  */
-  if ((args == NULL || *args == '\0')
-      && get_pending_status (main_lwp, &status) != -1
-      && WIFSTOPPED (status))
-    {
-      char *tem;
-
-      /* Put the signal number in ARGS so that inf_ptrace_detach will
-	 pass it along with PTRACE_DETACH.  */
-      tem = alloca (8);
-      xsnprintf (tem, 8, "%d", (int) WSTOPSIG (status));
-      args = tem;
-      if (debug_linux_nat)
-	fprintf_unfiltered (gdb_stdlog,
-			    "LND: Sending signal %s to %s\n",
-			    args,
-			    target_pid_to_str (main_lwp->ptid));
-    }
-
-  if (linux_nat_prepare_to_resume != NULL)
-    linux_nat_prepare_to_resume (main_lwp);
-  delete_lwp (main_lwp->ptid);
-
   if (forks_exist_p ())
     {
       /* Multi-fork case.  The current inferior_ptid is being detached
@@ -1563,7 +1532,24 @@ linux_nat_detach (struct target_ops *ops
       linux_fork_detach (args, from_tty);
     }
   else
-    linux_ops->to_detach (ops, args, from_tty);
+    {
+      int signo;
+
+      target_announce_detach (from_tty);
+
+      /* Pass on any pending signal for the last LWP, unless the user
+	 requested detaching with a different signal (most likely 0,
+	 meaning, discard the signal).  */
+      if (args != NULL)
+	signo = atoi (args);
+      else
+	signo = get_detach_signal (main_lwp);
+
+      detach_one_lwp (main_lwp, &signo);
+
+      inf_ptrace_detach_success (ops);
+    }
+  delete_lwp (main_lwp->ptid);
 }
 
 /* Resume execution of the inferior process.  If STEP is nonzero,
@@ -1598,6 +1584,7 @@ linux_resume_one_lwp_throw (struct lwp_i
      status.  Note that we must not throw after this is cleared,
      otherwise handle_zombie_lwp_error would get confused.  */
   lp->stopped = 0;
+  lp->core = -1;
   lp->stop_reason = TARGET_STOPPED_BY_NO_REASON;
   registers_changed_ptid (lp->ptid);
 }
@@ -1844,27 +1831,17 @@ linux_nat_resume (struct target_ops *ops
 static int
 kill_lwp (int lwpid, int signo)
 {
-  /* Use tkill, if possible, in case we are using nptl threads.  If tkill
-     fails, then we are not using nptl threads and we should be using kill.  */
-
-#ifdef HAVE_TKILL_SYSCALL
-  {
-    static int tkill_failed;
-
-    if (!tkill_failed)
-      {
-	int ret;
-
-	errno = 0;
-	ret = syscall (__NR_tkill, lwpid, signo);
-	if (errno != ENOSYS)
-	  return ret;
-	tkill_failed = 1;
-      }
-  }
-#endif
+  int ret;
 
-  return kill (lwpid, signo);
+  errno = 0;
+  ret = syscall (__NR_tkill, lwpid, signo);
+  if (errno == ENOSYS)
+    {
+      /* If tkill fails, then we are not using nptl threads, a
+	 configuration we no longer support.  */
+      perror_with_name (("tkill"));
+    }
+  return ret;
 }
 
 /* Handle a GNU/Linux syscall trap wait response.  If we see a syscall
@@ -1916,17 +1893,17 @@ linux_handle_syscall_trap (struct lwp_in
       return 1;
     }
 
+  /* Always update the entry/return state, even if this particular
+     syscall isn't interesting to the core now.  In async mode,
+     the user could install a new catchpoint for this syscall
+     between syscall enter/return, and we'll need to know to
+     report a syscall return if that happens.  */
+  lp->syscall_state = (lp->syscall_state == TARGET_WAITKIND_SYSCALL_ENTRY
+		       ? TARGET_WAITKIND_SYSCALL_RETURN
+		       : TARGET_WAITKIND_SYSCALL_ENTRY);
+
   if (catch_syscall_enabled ())
     {
-      /* Always update the entry/return state, even if this particular
-	 syscall isn't interesting to the core now.  In async mode,
-	 the user could install a new catchpoint for this syscall
-	 between syscall enter/return, and we'll need to know to
-	 report a syscall return if that happens.  */
-      lp->syscall_state = (lp->syscall_state == TARGET_WAITKIND_SYSCALL_ENTRY
-			   ? TARGET_WAITKIND_SYSCALL_RETURN
-			   : TARGET_WAITKIND_SYSCALL_ENTRY);
-
       if (catching_syscall_number (syscall_number))
 	{
 	  /* Alright, an event to report.  */
@@ -2000,13 +1977,17 @@ linux_handle_syscall_trap (struct lwp_in
    true, the new LWP remains stopped, otherwise it is continued.  */
 
 static int
-linux_handle_extended_wait (struct lwp_info *lp, int status,
-			    int stopping)
+linux_handle_extended_wait (struct lwp_info *lp, int status)
 {
   int pid = ptid_get_lwp (lp->ptid);
   struct target_waitstatus *ourstatus = &lp->waitstatus;
   int event = linux_ptrace_get_extended_event (status);
 
+  /* All extended events we currently use are mid-syscall.  Only
+     PTRACE_EVENT_STOP is delivered more like a signal-stop, but
+     you have to be using PTRACE_SEIZE to get that.  */
+  lp->syscall_state = TARGET_WAITKIND_SYSCALL_ENTRY;
+
   if (event == PTRACE_EVENT_FORK || event == PTRACE_EVENT_VFORK
       || event == PTRACE_EVENT_CLONE)
     {
@@ -2020,8 +2001,7 @@ linux_handle_extended_wait (struct lwp_i
 	{
 	  /* The new child has a pending SIGSTOP.  We can't affect it until it
 	     hits the SIGSTOP, but we're already attached.  */
-	  ret = my_waitpid (new_pid, &status,
-			    (event == PTRACE_EVENT_CLONE) ? __WCLONE : 0);
+	  ret = my_waitpid (new_pid, &status, __WALL);
 	  if (ret == -1)
 	    perror_with_name (_("waiting for new child"));
 	  else if (ret != new_pid)
@@ -2071,7 +2051,7 @@ linux_handle_extended_wait (struct lwp_i
 	ourstatus->kind = TARGET_WAITKIND_FORKED;
       else if (event == PTRACE_EVENT_VFORK)
 	ourstatus->kind = TARGET_WAITKIND_VFORKED;
-      else
+      else if (event == PTRACE_EVENT_CLONE)
 	{
 	  struct lwp_info *new_lp;
 
@@ -2084,45 +2064,8 @@ linux_handle_extended_wait (struct lwp_i
 				pid, new_pid);
 
 	  new_lp = add_lwp (ptid_build (ptid_get_pid (lp->ptid), new_pid, 0));
-	  new_lp->cloned = 1;
 	  new_lp->stopped = 1;
-
-	  if (WSTOPSIG (status) != SIGSTOP)
-	    {
-	      /* This can happen if someone starts sending signals to
-		 the new thread before it gets a chance to run, which
-		 have a lower number than SIGSTOP (e.g. SIGUSR1).
-		 This is an unlikely case, and harder to handle for
-		 fork / vfork than for clone, so we do not try - but
-		 we handle it for clone events here.  We'll send
-		 the other signal on to the thread below.  */
-
-	      new_lp->signalled = 1;
-	    }
-	  else
-	    {
-	      struct thread_info *tp;
-
-	      /* When we stop for an event in some other thread, and
-		 pull the thread list just as this thread has cloned,
-		 we'll have seen the new thread in the thread_db list
-		 before handling the CLONE event (glibc's
-		 pthread_create adds the new thread to the thread list
-		 before clone'ing, and has the kernel fill in the
-		 thread's tid on the clone call with
-		 CLONE_PARENT_SETTID).  If that happened, and the core
-		 had requested the new thread to stop, we'll have
-		 killed it with SIGSTOP.  But since SIGSTOP is not an
-		 RT signal, it can only be queued once.  We need to be
-		 careful to not resume the LWP if we wanted it to
-		 stop.  In that case, we'll leave the SIGSTOP pending.
-		 It will later be reported as GDB_SIGNAL_0.  */
-	      tp = find_thread_ptid (new_lp->ptid);
-	      if (tp != NULL && tp->stop_requested)
-		new_lp->last_resume_kind = resume_stop;
-	      else
-		status = 0;
-	    }
+	  new_lp->resumed = 1;
 
 	  /* If the thread_db layer is active, let it record the user
 	     level thread id and status, and add the thread to GDB's
@@ -2136,19 +2079,23 @@ linux_handle_extended_wait (struct lwp_i
 	    }
 
 	  /* Even if we're stopping the thread for some reason
-	     internal to this module, from the user/frontend's
-	     perspective, this new thread is running.  */
+	     internal to this module, from the perspective of infrun
+	     and the user/frontend, this new thread is running until
+	     it next reports a stop.  */
 	  set_running (new_lp->ptid, 1);
-	  if (!stopping)
-	    {
-	      set_executing (new_lp->ptid, 1);
-	      /* thread_db_attach_lwp -> lin_lwp_attach_lwp forced
-		 resume_stop.  */
-	      new_lp->last_resume_kind = resume_continue;
-	    }
+	  set_executing (new_lp->ptid, 1);
 
-	  if (status != 0)
+	  if (WSTOPSIG (status) != SIGSTOP)
 	    {
+	      /* This can happen if someone starts sending signals to
+		 the new thread before it gets a chance to run, which
+		 have a lower number than SIGSTOP (e.g. SIGUSR1).
+		 This is an unlikely case, and harder to handle for
+		 fork / vfork than for clone, so we do not try - but
+		 we handle it for clone events here.  */
+
+	      new_lp->signalled = 1;
+
 	      /* We created NEW_LP so it cannot yet contain STATUS.  */
 	      gdb_assert (new_lp->status == 0);
 
@@ -2161,8 +2108,12 @@ linux_handle_extended_wait (struct lwp_i
 				    status_to_str (status));
 	      new_lp->status = status;
 	    }
+	  else if (report_thread_events)
+	    {
+	      new_lp->waitstatus.kind = TARGET_WAITKIND_THREAD_CREATED;
+	      new_lp->status = status;
+	    }
 
-	  new_lp->resumed = !stopping;
 	  return 1;
 	}
 
@@ -2232,19 +2183,13 @@ wait_lwp (struct lwp_info *lp)
 
   for (;;)
     {
-      /* If my_waitpid returns 0 it means the __WCLONE vs. non-__WCLONE kind
-	 was right and we should just call sigsuspend.  */
-
-      pid = my_waitpid (ptid_get_lwp (lp->ptid), &status, WNOHANG);
-      if (pid == -1 && errno == ECHILD)
-	pid = my_waitpid (ptid_get_lwp (lp->ptid), &status, __WCLONE | WNOHANG);
+      pid = my_waitpid (ptid_get_lwp (lp->ptid), &status, __WALL | WNOHANG);
       if (pid == -1 && errno == ECHILD)
 	{
 	  /* The thread has previously exited.  We need to delete it
-	     now because, for some vendor 2.4 kernels with NPTL
-	     support backported, there won't be an exit event unless
-	     it is the main thread.  2.6 kernels will report an exit
-	     event for each thread that exits, as expected.  */
+	     now because if this was a non-leader thread execing, we
+	     won't get an exit event.  See comments on exec events at
+	     the top of the file.  */
 	  thread_dead = 1;
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog, "WL: %s vanished.\n",
@@ -2257,9 +2202,8 @@ wait_lwp (struct lwp_info *lp)
 	 Thread group leader may have exited in which case we'll lock up in
 	 waitpid if there are other threads, even if they are all zombies too.
 	 Basically, we're not supposed to use waitpid this way.
-	 __WCLONE is not applicable for the leader so we can't use that.
-	 LINUX_NAT_THREAD_ALIVE cannot be used here as it requires a STOPPED
-	 process; it gets ESRCH both for the zombie and for running processes.
+	  tkill(pid,0) cannot be used here as it gets ESRCH for both
+	 for zombie and running processes.
 
 	 As a workaround, check if we're waiting for the thread group leader and
 	 if it's a zombie, and avoid calling waitpid if it is.
@@ -2308,6 +2252,21 @@ wait_lwp (struct lwp_info *lp)
       /* Check if the thread has exited.  */
       if (WIFEXITED (status) || WIFSIGNALED (status))
 	{
+	  if (report_thread_events
+	      || ptid_get_pid (lp->ptid) == ptid_get_lwp (lp->ptid))
+	    {
+	      if (debug_linux_nat)
+		fprintf_unfiltered (gdb_stdlog, "WL: LWP %d exited.\n",
+				    ptid_get_pid (lp->ptid));
+
+	      /* If this is the leader exiting, it means the whole
+		 process is gone.  Store the status to report to the
+		 core.  Store it in lp->waitstatus, because lp->status
+		 would be ambiguous (W_EXITCODE(0,0) == 0).  */
+	      store_waitstatus (&lp->waitstatus, status);
+	      return 0;
+	    }
+
 	  thread_dead = 1;
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog, "WL: %s exited.\n",
@@ -2344,6 +2303,12 @@ wait_lwp (struct lwp_info *lp)
       if (linux_handle_syscall_trap (lp, 1))
 	return wait_lwp (lp);
     }
+  else
+    {
+      /* Almost all other ptrace-stops are known to be outside of system
+	 calls, with further exceptions in linux_handle_extended_wait.  */
+      lp->syscall_state = TARGET_WAITKIND_IGNORE;
+    }
 
   /* Handle GNU/Linux's extended waitstatus for trace events.  */
   if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP
@@ -2353,7 +2318,7 @@ wait_lwp (struct lwp_info *lp)
 	fprintf_unfiltered (gdb_stdlog,
 			    "WL: Handling extended status 0x%06x\n",
 			    status);
-      linux_handle_extended_wait (lp, status, 1);
+      linux_handle_extended_wait (lp, status);
       return 0;
     }
 
@@ -2519,30 +2484,6 @@ check_stopped_by_watchpoint (struct lwp_
   return lp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT;
 }
 
-/* Called when the LWP stopped for a trap that could be explained by a
-   watchpoint or a breakpoint.  */
-
-static void
-save_sigtrap (struct lwp_info *lp)
-{
-  gdb_assert (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON);
-  gdb_assert (lp->status != 0);
-
-  /* Check first if this was a SW/HW breakpoint before checking
-     watchpoints, because at least s390 can't tell the data address of
-     hardware watchpoint hits, and the kernel returns
-     stopped-by-watchpoint as long as there's a watchpoint set.  */
-  if (linux_nat_status_is_event (lp->status))
-    check_stopped_by_breakpoint (lp);
-
-  /* Note that TRAP_HWBKPT can indicate either a hardware breakpoint
-     or hardware watchpoint.  Check which is which if we got
-     TARGET_STOPPED_BY_HW_BREAKPOINT.  */
-  if (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON
-      || lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
-    check_stopped_by_watchpoint (lp);
-}
-
 /* Returns true if the LWP had stopped for a watchpoint.  */
 
 static int
@@ -2639,7 +2580,7 @@ stop_wait_callback (struct lwp_info *lp,
 	  /* Save the sigtrap event.  */
 	  lp->status = status;
 	  gdb_assert (lp->signalled);
-	  save_sigtrap (lp);
+	  save_stop_reason (lp);
 	}
       else
 	{
@@ -2679,7 +2620,6 @@ status_callback (struct lwp_info *lp, vo
       || lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
     {
       struct regcache *regcache = get_thread_regcache (lp->ptid);
-      struct gdbarch *gdbarch = get_regcache_arch (regcache);
       CORE_ADDR pc;
       int discard = 0;
 
@@ -2720,18 +2660,9 @@ status_callback (struct lwp_info *lp, vo
 	  linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
 	  return 0;
 	}
-    }
-
-  return 1;
-}
-
-/* Return non-zero if LP isn't stopped.  */
+    }
 
-static int
-running_callback (struct lwp_info *lp, void *data)
-{
-  return (!lp->stopped
-	  || (lwp_status_pending_p (lp) && lp->resumed));
+  return 1;
 }
 
 /* Count the LWP's that have had events.  */
@@ -2739,7 +2670,7 @@ running_callback (struct lwp_info *lp, v
 static int
 count_events_callback (struct lwp_info *lp, void *data)
 {
-  int *count = data;
+  int *count = (int *) data;
 
   gdb_assert (count != NULL);
 
@@ -2778,7 +2709,7 @@ lwp_status_pending_p (struct lwp_info *l
 static int
 select_event_lwp_callback (struct lwp_info *lp, void *data)
 {
-  int *selector = data;
+  int *selector = (int *) data;
 
   gdb_assert (selector != NULL);
 
@@ -2790,29 +2721,32 @@ select_event_lwp_callback (struct lwp_in
   return 0;
 }
 
-/* Called when the LWP got a signal/trap that could be explained by a
-   software or hardware breakpoint.  */
+/* Called when the LWP stopped for a signal/trap.  If it stopped for a
+   trap check what caused it (breakpoint, watchpoint, trace, etc.),
+   and save the result in the LWP's stop_reason field.  If it stopped
+   for a breakpoint, decrement the PC if necessary on the lwp's
+   architecture.  */
 
-static int
-check_stopped_by_breakpoint (struct lwp_info *lp)
+static void
+save_stop_reason (struct lwp_info *lp)
 {
-  /* Arrange for a breakpoint to be hit again later.  We don't keep
-     the SIGTRAP status and don't forward the SIGTRAP signal to the
-     LWP.  We will handle the current event, eventually we will resume
-     this LWP, and this breakpoint will trap again.
-
-     If we do not do this, then we run the risk that the user will
-     delete or disable the breakpoint, but the LWP will have already
-     tripped on it.  */
-
-  struct regcache *regcache = get_thread_regcache (lp->ptid);
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct regcache *regcache;
+  struct gdbarch *gdbarch;
   CORE_ADDR pc;
   CORE_ADDR sw_bp_pc;
 #if USE_SIGTRAP_SIGINFO
   siginfo_t siginfo;
 #endif
 
+  gdb_assert (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON);
+  gdb_assert (lp->status != 0);
+
+  if (!linux_nat_status_is_event (lp->status))
+    return;
+
+  regcache = get_thread_regcache (lp->ptid);
+  gdbarch = get_regcache_arch (regcache);
+
   pc = regcache_read_pc (regcache);
   sw_bp_pc = pc - gdbarch_decr_pc_after_break (gdbarch);
 
@@ -2821,33 +2755,29 @@ check_stopped_by_breakpoint (struct lwp_
     {
       if (siginfo.si_signo == SIGTRAP)
 	{
-	  if (siginfo.si_code == GDB_ARCH_TRAP_BRKPT)
+	  if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code)
+	      && GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
 	    {
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "CSBB: %s stopped by software "
-				    "breakpoint\n",
-				    target_pid_to_str (lp->ptid));
-
-	      /* Back up the PC if necessary.  */
-	      if (pc != sw_bp_pc)
-		regcache_write_pc (regcache, sw_bp_pc);
-
-	      lp->stop_pc = sw_bp_pc;
+	      /* The si_code is ambiguous on this arch -- check debug
+		 registers.  */
+	      if (!check_stopped_by_watchpoint (lp))
+		lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
+	    }
+	  else if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code))
+	    {
+	      /* If we determine the LWP stopped for a SW breakpoint,
+		 trust it.  Particularly don't check watchpoint
+		 registers, because at least on s390, we'd find
+		 stopped-by-watchpoint as long as there's a watchpoint
+		 set.  */
 	      lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
-	      return 1;
 	    }
-	  else if (siginfo.si_code == TRAP_HWBKPT)
+	  else if (GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
 	    {
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "CSBB: %s stopped by hardware "
-				    "breakpoint/watchpoint\n",
-				    target_pid_to_str (lp->ptid));
-
-	      lp->stop_pc = pc;
-	      lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
-	      return 1;
+	      /* This can indicate either a hardware breakpoint or
+		 hardware watchpoint.  Check debug registers.  */
+	      if (!check_stopped_by_watchpoint (lp))
+		lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
 	    }
 	  else if (siginfo.si_code == TRAP_TRACE)
 	    {
@@ -2855,6 +2785,13 @@ check_stopped_by_breakpoint (struct lwp_
 		fprintf_unfiltered (gdb_stdlog,
 				    "CSBB: %s stopped by trace\n",
 				    target_pid_to_str (lp->ptid));
+
+	      /* We may have single stepped an instruction that
+		 triggered a watchpoint.  In that case, on some
+		 architectures (such as x86), instead of TRAP_HWBKPT,
+		 si_code indicates TRAP_TRACE, and we need to check
+		 the debug registers separately.  */
+	      check_stopped_by_watchpoint (lp);
 	    }
 	}
     }
@@ -2865,6 +2802,18 @@ check_stopped_by_breakpoint (struct lwp_
     {
       /* The LWP was either continued, or stepped a software
 	 breakpoint instruction.  */
+      lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
+    }
+
+  if (hardware_breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+    lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
+
+  if (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON)
+    check_stopped_by_watchpoint (lp);
+#endif
+
+  if (lp->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT)
+    {
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
 			    "CSBB: %s stopped by software breakpoint\n",
@@ -2874,25 +2823,25 @@ check_stopped_by_breakpoint (struct lwp_
       if (pc != sw_bp_pc)
 	regcache_write_pc (regcache, sw_bp_pc);
 
-      lp->stop_pc = sw_bp_pc;
-      lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
-      return 1;
+      /* Update this so we record the correct stop PC below.  */
+      pc = sw_bp_pc;
     }
-
-  if (hardware_breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+  else if (lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
     {
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
-			    "CSBB: stopped by hardware breakpoint %s\n",
+			    "CSBB: %s stopped by hardware breakpoint\n",
+			    target_pid_to_str (lp->ptid));
+    }
+  else if (lp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT)
+    {
+      if (debug_linux_nat)
+	fprintf_unfiltered (gdb_stdlog,
+			    "CSBB: %s stopped by hardware watchpoint\n",
 			    target_pid_to_str (lp->ptid));
-
-      lp->stop_pc = pc;
-      lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
-      return 1;
     }
-#endif
 
-  return 0;
+  lp->stop_pc = pc;
 }
 
 
@@ -2958,7 +2907,7 @@ select_event_lwp (ptid_t filter, struct 
      having stepped the thread, wouldn't understand what the trap was
      for, and therefore would report it to the user as a random
      signal.  */
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
       event_lp = iterate_over_lwps (filter,
 				    select_singlestep_lwp_callback, NULL);
@@ -3013,59 +2962,6 @@ resumed_callback (struct lwp_info *lp, v
   return lp->resumed;
 }
 
-/* Stop an active thread, verify it still exists, then resume it.  If
-   the thread ends up with a pending status, then it is not resumed,
-   and *DATA (really a pointer to int), is set.  */
-
-static int
-stop_and_resume_callback (struct lwp_info *lp, void *data)
-{
-  if (!lp->stopped)
-    {
-      ptid_t ptid = lp->ptid;
-
-      stop_callback (lp, NULL);
-      stop_wait_callback (lp, NULL);
-
-      /* Resume if the lwp still exists, and the core wanted it
-	 running.  */
-      lp = find_lwp_pid (ptid);
-      if (lp != NULL)
-	{
-	  if (lp->last_resume_kind == resume_stop
-	      && !lwp_status_pending_p (lp))
-	    {
-	      /* The core wanted the LWP to stop.  Even if it stopped
-		 cleanly (with SIGSTOP), leave the event pending.  */
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "SARC: core wanted LWP %ld stopped "
-				    "(leaving SIGSTOP pending)\n",
-				    ptid_get_lwp (lp->ptid));
-	      lp->status = W_STOPCODE (SIGSTOP);
-	    }
-
-	  if (!lwp_status_pending_p (lp))
-	    {
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "SARC: re-resuming LWP %ld\n",
-				    ptid_get_lwp (lp->ptid));
-	      resume_lwp (lp, lp->step, GDB_SIGNAL_0);
-	    }
-	  else
-	    {
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "SARC: not re-resuming LWP %ld "
-				    "(has pending)\n",
-				    ptid_get_lwp (lp->ptid));
-	    }
-	}
-    }
-  return 0;
-}
-
 /* Check if we should go on and pass this event to common code.
    Return the affected lwp if we are, or NULL otherwise.  */
 
@@ -3146,6 +3042,12 @@ linux_nat_filter_event (int lwpid, int s
       if (linux_handle_syscall_trap (lp, 0))
 	return NULL;
     }
+  else
+    {
+      /* Almost all other ptrace-stops are known to be outside of system
+	 calls, with further exceptions in linux_handle_extended_wait.  */
+      lp->syscall_state = TARGET_WAITKIND_IGNORE;
+    }
 
   /* Handle GNU/Linux's extended waitstatus for trace events.  */
   if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP
@@ -3155,58 +3057,36 @@ linux_nat_filter_event (int lwpid, int s
 	fprintf_unfiltered (gdb_stdlog,
 			    "LLW: Handling extended status 0x%06x\n",
 			    status);
-      if (linux_handle_extended_wait (lp, status, 0))
+      if (linux_handle_extended_wait (lp, status))
 	return NULL;
     }
 
   /* Check if the thread has exited.  */
   if (WIFEXITED (status) || WIFSIGNALED (status))
     {
-      if (num_lwps (ptid_get_pid (lp->ptid)) > 1)
+      if (!report_thread_events
+	  && num_lwps (ptid_get_pid (lp->ptid)) > 1)
 	{
-	  /* If this is the main thread, we must stop all threads and
-	     verify if they are still alive.  This is because in the
-	     nptl thread model on Linux 2.4, there is no signal issued
-	     for exiting LWPs other than the main thread.  We only get
-	     the main thread exit signal once all child threads have
-	     already exited.  If we stop all the threads and use the
-	     stop_wait_callback to check if they have exited we can
-	     determine whether this signal should be ignored or
-	     whether it means the end of the debugged application,
-	     regardless of which threading model is being used.  */
-	  if (ptid_get_pid (lp->ptid) == ptid_get_lwp (lp->ptid))
-	    {
-	      iterate_over_lwps (pid_to_ptid (ptid_get_pid (lp->ptid)),
-				 stop_and_resume_callback, NULL);
-	    }
-
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
 				"LLW: %s exited.\n",
 				target_pid_to_str (lp->ptid));
 
-	  if (num_lwps (ptid_get_pid (lp->ptid)) > 1)
-	    {
-	      /* If there is at least one more LWP, then the exit signal
-		 was not the end of the debugged application and should be
-		 ignored.  */
-	      exit_lwp (lp);
-	      return NULL;
-	    }
+	  /* If there is at least one more LWP, then the exit signal
+	     was not the end of the debugged application and should be
+	     ignored.  */
+	  exit_lwp (lp);
+	  return NULL;
 	}
 
-      gdb_assert (lp->resumed);
-
+      /* Note that even if the leader was ptrace-stopped, it can still
+	 exit, if e.g., some other thread brings down the whole
+	 process (calls `exit').  So don't assert that the lwp is
+	 resumed.  */
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
-			    "Process %ld exited\n",
-			    ptid_get_lwp (lp->ptid));
-
-      /* This was the last lwp in the process.  Since events are
-	 serialized to GDB core, we may not be able report this one
-	 right now, but GDB core and the other target layers will want
-	 to be notified about the exit code/signal, leave the status
-	 pending for the next time we're able to report it.  */
+			    "LWP %ld exited (resumed=%d)\n",
+			    ptid_get_lwp (lp->ptid), lp->resumed);
 
       /* Dead LWP's aren't expected to reported a pending sigstop.  */
       lp->signalled = 0;
@@ -3217,28 +3097,6 @@ linux_nat_filter_event (int lwpid, int s
       return lp;
     }
 
-  /* Check if the current LWP has previously exited.  In the nptl
-     thread model, LWPs other than the main thread do not issue
-     signals when they exit so we must check whenever the thread has
-     stopped.  A similar check is made in stop_wait_callback().  */
-  if (num_lwps (ptid_get_pid (lp->ptid)) > 1 && !linux_thread_alive (lp->ptid))
-    {
-      ptid_t ptid = pid_to_ptid (ptid_get_pid (lp->ptid));
-
-      if (debug_linux_nat)
-	fprintf_unfiltered (gdb_stdlog,
-			    "LLW: %s exited.\n",
-			    target_pid_to_str (lp->ptid));
-
-      exit_lwp (lp);
-
-      /* Make sure there is at least one thread running.  */
-      gdb_assert (iterate_over_lwps (ptid, running_callback, NULL));
-
-      /* Discard the event.  */
-      return NULL;
-    }
-
   /* Make sure we don't report a SIGSTOP that we sent ourselves in
      an attempt to stop an LWP.  */
   if (lp->signalled
@@ -3306,7 +3164,7 @@ linux_nat_filter_event (int lwpid, int s
     {
       enum gdb_signal signo = gdb_signal_from_host (WSTOPSIG (status));
 
-      if (!non_stop)
+      if (!target_is_non_stop_p ())
 	{
 	  /* Only do the below in all-stop, as we currently use SIGSTOP
 	     to implement target_stop (see linux_nat_stop) in
@@ -3350,7 +3208,7 @@ linux_nat_filter_event (int lwpid, int s
   /* An interesting event.  */
   gdb_assert (lp);
   lp->status = status;
-  save_sigtrap (lp);
+  save_stop_reason (lp);
   return lp;
 }
 
@@ -3390,18 +3248,8 @@ check_zombie_leaders (void)
 	     leader's exit status until all other threads are gone.
 
 	     - There are 3 or more threads in the group, and a thread
-	     other than the leader exec'd.  On an exec, the Linux
-	     kernel destroys all other threads (except the execing
-	     one) in the thread group, and resets the execing thread's
-	     tid to the tgid.  No exit notification is sent for the
-	     execing thread -- from the ptracer's perspective, it
-	     appears as though the execing thread just vanishes.
-	     Until we reap all other threads except the leader and the
-	     execing thread, the leader will be zombie, and the
-	     execing thread will be in `D (disc sleep)'.  As soon as
-	     all other threads are reaped, the execing thread changes
-	     it's tid to the tgid, and the previous (zombie) leader
-	     vanishes, giving place to the "new" leader.  We could try
+	     other than the leader exec'd.  See comments on exec
+	     events at the top of the file.  We could try
 	     distinguishing the exit and exec cases, by waiting once
 	     more, and seeing if something comes out, but it doesn't
 	     sound useful.  The previous leader _does_ go away, and
@@ -3419,6 +3267,30 @@ check_zombie_leaders (void)
     }
 }
 
+/* Convenience function that is called when the kernel reports an exit
+   event.  This decides whether to report the event to GDB as a
+   process exit event, a thread exit event, or to suppress the
+   event.  */
+
+static ptid_t
+filter_exit_event (struct lwp_info *event_child,
+		   struct target_waitstatus *ourstatus)
+{
+  ptid_t ptid = event_child->ptid;
+
+  if (num_lwps (ptid_get_pid (ptid)) > 1)
+    {
+      if (report_thread_events)
+	ourstatus->kind = TARGET_WAITKIND_THREAD_EXITED;
+      else
+	ourstatus->kind = TARGET_WAITKIND_IGNORE;
+
+      exit_lwp (event_child);
+    }
+
+  return ptid;
+}
+
 static ptid_t
 linux_nat_wait_1 (struct target_ops *ops,
 		  ptid_t ptid, struct target_waitstatus *ourstatus,
@@ -3460,12 +3332,6 @@ linux_nat_wait_1 (struct target_ops *ops
 			    target_pid_to_str (lp->ptid));
     }
 
-  if (!target_is_async_p ())
-    {
-      /* Causes SIGINT to be passed on to the attached process.  */
-      set_sigint_trap ();
-    }
-
   /* But if we don't find a pending event, we'll have to wait.  Always
      pull all events out of the kernel.  We'll randomly select an
      event LWP out of all that have events, to prevent starvation.  */
@@ -3488,9 +3354,7 @@ linux_nat_wait_1 (struct target_ops *ops
 	   the TGID pid.  */
 
       errno = 0;
-      lwpid = my_waitpid (-1, &status,  __WCLONE | WNOHANG);
-      if (lwpid == 0 || (lwpid == -1 && errno == ECHILD))
-	lwpid = my_waitpid (-1, &status, WNOHANG);
+      lwpid = my_waitpid (-1, &status,  __WALL | WNOHANG);
 
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
@@ -3536,9 +3400,6 @@ linux_nat_wait_1 (struct target_ops *ops
 
 	  ourstatus->kind = TARGET_WAITKIND_NO_RESUMED;
 
-	  if (!target_is_async_p ())
-	    clear_sigint_trap ();
-
 	  restore_child_signals_mask (&prev_mask);
 	  return minus_one_ptid;
 	}
@@ -3564,15 +3425,12 @@ linux_nat_wait_1 (struct target_ops *ops
       sigsuspend (&suspend_mask);
     }
 
-  if (!target_is_async_p ())
-    clear_sigint_trap ();
-
   gdb_assert (lp);
 
   status = lp->status;
   lp->status = 0;
 
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
       /* Now stop all other LWP's ...  */
       iterate_over_lwps (minus_one_ptid, stop_callback, NULL);
@@ -3614,7 +3472,7 @@ linux_nat_wait_1 (struct target_ops *ops
      clears it.  */
   last_resume_kind = lp->last_resume_kind;
 
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
       /* In all-stop, from the core's perspective, all LWPs are now
 	 stopped until a new resume action is sent over.  */
@@ -3662,6 +3520,9 @@ linux_nat_wait_1 (struct target_ops *ops
   else
     lp->core = linux_common_core_of_thread (lp->ptid);
 
+  if (ourstatus->kind == TARGET_WAITKIND_EXITED)
+    return filter_exit_event (lp, ourstatus);
+
   return lp->ptid;
 }
 
@@ -3671,11 +3532,30 @@ linux_nat_wait_1 (struct target_ops *ops
 static int
 resume_stopped_resumed_lwps (struct lwp_info *lp, void *data)
 {
-  ptid_t *wait_ptid_p = data;
+  ptid_t *wait_ptid_p = (ptid_t *) data;
 
-  if (lp->stopped
-      && lp->resumed
-      && !lwp_status_pending_p (lp))
+  if (!lp->stopped)
+    {
+      if (debug_linux_nat)
+	fprintf_unfiltered (gdb_stdlog,
+			    "RSRL: NOT resuming LWP %s, not stopped\n",
+			    target_pid_to_str (lp->ptid));
+    }
+  else if (!lp->resumed)
+    {
+      if (debug_linux_nat)
+	fprintf_unfiltered (gdb_stdlog,
+			    "RSRL: NOT resuming LWP %s, not resumed\n",
+			    target_pid_to_str (lp->ptid));
+    }
+  else if (lwp_status_pending_p (lp))
+    {
+      if (debug_linux_nat)
+	fprintf_unfiltered (gdb_stdlog,
+			    "RSRL: NOT resuming LWP %s, has pending status\n",
+			    target_pid_to_str (lp->ptid));
+    }
+  else
     {
       struct regcache *regcache = get_thread_regcache (lp->ptid);
       struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -3747,7 +3627,7 @@ linux_nat_wait (struct target_ops *ops,
      specific_process, for example, see linux_nat_wait_1), and
      meanwhile the event became uninteresting.  Don't bother resuming
      LWPs we're not going to wait for if they'd stop immediately.  */
-  if (non_stop)
+  if (target_is_non_stop_p ())
     iterate_over_lwps (minus_one_ptid, resume_stopped_resumed_lwps, &ptid);
 
   event_ptid = linux_nat_wait_1 (ops, ptid, ourstatus, target_options);
@@ -3764,118 +3644,125 @@ linux_nat_wait (struct target_ops *ops,
   return event_ptid;
 }
 
-static int
-kill_callback (struct lwp_info *lp, void *data)
+/* Kill one LWP.  */
+
+static void
+kill_one_lwp (pid_t pid)
 {
   /* PTRACE_KILL may resume the inferior.  Send SIGKILL first.  */
 
   errno = 0;
-  kill_lwp (ptid_get_lwp (lp->ptid), SIGKILL);
+  kill_lwp (pid, SIGKILL);
   if (debug_linux_nat)
     {
       int save_errno = errno;
 
       fprintf_unfiltered (gdb_stdlog,
-			  "KC:  kill (SIGKILL) %s, 0, 0 (%s)\n",
-			  target_pid_to_str (lp->ptid),
+			  "KC:  kill (SIGKILL) %ld, 0, 0 (%s)\n", (long) pid,
 			  save_errno ? safe_strerror (save_errno) : "OK");
     }
 
   /* Some kernels ignore even SIGKILL for processes under ptrace.  */
 
   errno = 0;
-  ptrace (PTRACE_KILL, ptid_get_lwp (lp->ptid), 0, 0);
+  ptrace (PTRACE_KILL, pid, 0, 0);
   if (debug_linux_nat)
     {
       int save_errno = errno;
 
       fprintf_unfiltered (gdb_stdlog,
-			  "KC:  PTRACE_KILL %s, 0, 0 (%s)\n",
-			  target_pid_to_str (lp->ptid),
+			  "KC:  PTRACE_KILL %ld, 0, 0 (%s)\n", (long) pid,
 			  save_errno ? safe_strerror (save_errno) : "OK");
     }
-
-  return 0;
 }
 
-static int
-kill_wait_callback (struct lwp_info *lp, void *data)
+/* Wait for an LWP to die.  */
+
+static void
+kill_wait_one_lwp (pid_t pid)
 {
-  pid_t pid;
+  pid_t res;
 
   /* We must make sure that there are no pending events (delayed
      SIGSTOPs, pending SIGTRAPs, etc.) to make sure the current
      program doesn't interfere with any following debugging session.  */
 
-  /* For cloned processes we must check both with __WCLONE and
-     without, since the exit status of a cloned process isn't reported
-     with __WCLONE.  */
-  if (lp->cloned)
-    {
-      do
-	{
-	  pid = my_waitpid (ptid_get_lwp (lp->ptid), NULL, __WCLONE);
-	  if (pid != (pid_t) -1)
-	    {
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "KWC: wait %s received unknown.\n",
-				    target_pid_to_str (lp->ptid));
-	      /* The Linux kernel sometimes fails to kill a thread
-		 completely after PTRACE_KILL; that goes from the stop
-		 point in do_fork out to the one in
-		 get_signal_to_deliever and waits again.  So kill it
-		 again.  */
-	      kill_callback (lp, NULL);
-	    }
-	}
-      while (pid == ptid_get_lwp (lp->ptid));
-
-      gdb_assert (pid == -1 && errno == ECHILD);
-    }
-
   do
     {
-      pid = my_waitpid (ptid_get_lwp (lp->ptid), NULL, 0);
-      if (pid != (pid_t) -1)
+      res = my_waitpid (pid, NULL, __WALL);
+      if (res != (pid_t) -1)
 	{
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
-				"KWC: wait %s received unk.\n",
-				target_pid_to_str (lp->ptid));
-	  /* See the call to kill_callback above.  */
-	  kill_callback (lp, NULL);
+				"KWC: wait %ld received unknown.\n",
+				(long) pid);
+	  /* The Linux kernel sometimes fails to kill a thread
+	     completely after PTRACE_KILL; that goes from the stop
+	     point in do_fork out to the one in get_signal_to_deliver
+	     and waits again.  So kill it again.  */
+	  kill_one_lwp (pid);
 	}
     }
-  while (pid == ptid_get_lwp (lp->ptid));
+  while (res == pid);
+
+  gdb_assert (res == -1 && errno == ECHILD);
+}
+
+/* Callback for iterate_over_lwps.  */
+
+static int
+kill_callback (struct lwp_info *lp, void *data)
+{
+  kill_one_lwp (ptid_get_lwp (lp->ptid));
+  return 0;
+}
+
+/* Callback for iterate_over_lwps.  */
 
-  gdb_assert (pid == -1 && errno == ECHILD);
+static int
+kill_wait_callback (struct lwp_info *lp, void *data)
+{
+  kill_wait_one_lwp (ptid_get_lwp (lp->ptid));
   return 0;
 }
 
+/* Kill the fork children of any threads of inferior INF that are
+   stopped at a fork event.  */
+
 static void
-linux_nat_kill (struct target_ops *ops)
+kill_unfollowed_fork_children (struct inferior *inf)
 {
-  struct target_waitstatus last;
-  ptid_t last_ptid;
-  int status;
+  struct thread_info *thread;
+
+  ALL_NON_EXITED_THREADS (thread)
+    if (thread->inf == inf)
+      {
+	struct target_waitstatus *ws = &thread->pending_follow;
+
+	if (ws->kind == TARGET_WAITKIND_FORKED
+	    || ws->kind == TARGET_WAITKIND_VFORKED)
+	  {
+	    ptid_t child_ptid = ws->value.related_pid;
+	    int child_pid = ptid_get_pid (child_ptid);
+	    int child_lwp = ptid_get_lwp (child_ptid);
+
+	    kill_one_lwp (child_lwp);
+	    kill_wait_one_lwp (child_lwp);
+
+	    /* Let the arch-specific native code know this process is
+	       gone.  */
+	    linux_nat_forget_process (child_pid);
+	  }
+      }
+}
 
+static void
+linux_nat_kill (struct target_ops *ops)
+{
   /* If we're stopped while forking and we haven't followed yet,
      kill the other task.  We need to do this first because the
      parent will be sleeping if this is a vfork.  */
-
-  get_last_target_status (&last_ptid, &last);
-
-  if (last.kind == TARGET_WAITKIND_FORKED
-      || last.kind == TARGET_WAITKIND_VFORKED)
-    {
-      ptrace (PT_KILL, ptid_get_pid (last.value.related_pid), 0, 0);
-      wait (&status);
-
-      /* Let the arch-specific native code know this process is
-	 gone.  */
-      linux_nat_forget_process (ptid_get_pid (last.value.related_pid));
-    }
+  kill_unfollowed_fork_children (current_inferior ());
 
   if (forks_exist_p ())
     linux_fork_killall ();
@@ -3897,7 +3784,7 @@ linux_nat_kill (struct target_ops *ops)
       iterate_over_lwps (ptid, kill_wait_callback, NULL);
     }
 
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 static void
@@ -4029,33 +3916,10 @@ linux_nat_xfer_partial (struct target_op
 }
 
 static int
-linux_thread_alive (ptid_t ptid)
-{
-  int err, tmp_errno;
-
-  gdb_assert (ptid_lwp_p (ptid));
-
-  /* Send signal 0 instead of anything ptrace, because ptracing a
-     running thread errors out claiming that the thread doesn't
-     exist.  */
-  err = kill_lwp (ptid_get_lwp (ptid), 0);
-  tmp_errno = errno;
-  if (debug_linux_nat)
-    fprintf_unfiltered (gdb_stdlog,
-			"LLTA: KILL(SIG0) %s (%s)\n",
-			target_pid_to_str (ptid),
-			err ? safe_strerror (tmp_errno) : "OK");
-
-  if (err != 0)
-    return 0;
-
-  return 1;
-}
-
-static int
 linux_nat_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
-  return linux_thread_alive (ptid);
+  /* As long as a PTID is in lwp list, consider it alive.  */
+  return find_lwp_pid (ptid) != NULL;
 }
 
 /* Implement the to_update_thread_list target method for this
@@ -4064,15 +3928,23 @@ linux_nat_thread_alive (struct target_op
 static void
 linux_nat_update_thread_list (struct target_ops *ops)
 {
-  if (linux_supports_traceclone ())
-    {
-      /* With support for clone events, we add/delete threads from the
-	 list as clone/exit events are processed, so just try deleting
-	 exited threads still in the thread list.  */
-      delete_exited_threads ();
+  struct lwp_info *lwp;
+
+  /* We add/delete threads from the list as clone/exit events are
+     processed, so just try deleting exited threads still in the
+     thread list.  */
+  delete_exited_threads ();
+
+  /* Update the processor core that each lwp/thread was last seen
+     running on.  */
+  ALL_LWPS (lwp)
+    {
+      /* Avoid accessing /proc if the thread hasn't run since we last
+	 time we fetched the thread's core.  Accessing /proc becomes
+	 noticeably expensive when we have thousands of LWPs.  */
+      if (lwp->core == -1)
+	lwp->core = linux_common_core_of_thread (lwp->ptid);
     }
-  else
-    prune_threads ();
 }
 
 static char *
@@ -4091,41 +3963,10 @@ linux_nat_pid_to_str (struct target_ops 
   return normal_pid_to_str (ptid);
 }
 
-static char *
+static const char *
 linux_nat_thread_name (struct target_ops *self, struct thread_info *thr)
 {
-  int pid = ptid_get_pid (thr->ptid);
-  long lwp = ptid_get_lwp (thr->ptid);
-#define FORMAT "/proc/%d/task/%ld/comm"
-  char buf[sizeof (FORMAT) + 30];
-  FILE *comm_file;
-  char *result = NULL;
-
-  snprintf (buf, sizeof (buf), FORMAT, pid, lwp);
-  comm_file = gdb_fopen_cloexec (buf, "r");
-  if (comm_file)
-    {
-      /* Not exported by the kernel, so we define it here.  */
-#define COMM_LEN 16
-      static char line[COMM_LEN + 1];
-
-      if (fgets (line, sizeof (line), comm_file))
-	{
-	  char *nl = strchr (line, '\n');
-
-	  if (nl)
-	    *nl = '\0';
-	  if (*line != '\0')
-	    result = line;
-	}
-
-      fclose (comm_file);
-    }
-
-#undef COMM_LEN
-#undef FORMAT
-
-  return result;
+  return linux_proc_tid_get_name (thr->ptid);
 }
 
 /* Accepts an integer PID; Returns a string representing a file that
@@ -4153,7 +3994,7 @@ linux_proc_xfer_partial (struct target_o
   char filename[64];
 
   if (object != TARGET_OBJECT_MEMORY || !readbuf)
-    return 0;
+    return TARGET_XFER_EOF;
 
   /* Don't bother for one word.  */
   if (len < 3 * sizeof (long))
@@ -4456,7 +4297,7 @@ cleanup_target_stop (void *arg)
   gdb_assert (arg != NULL);
 
   /* Unpause all */
-  target_resume (*ptid, 0, GDB_SIGNAL_0);
+  target_continue_no_signal (*ptid);
 }
 
 static VEC(static_tracepoint_marker_p) *
@@ -4576,9 +4417,8 @@ linux_nat_is_async_p (struct target_ops 
 static int
 linux_nat_can_async_p (struct target_ops *ops)
 {
-  /* NOTE: palves 2008-03-21: We're only async when the user requests
-     it explicitly with the "set target-async" command.
-     Someday, linux will always be async.  */
+  /* We're always async, unless the user explicitly prevented it with the
+     "maint set target-async" command.  */
   return target_async_permitted;
 }
 
@@ -4588,6 +4428,14 @@ linux_nat_supports_non_stop (struct targ
   return 1;
 }
 
+/* to_always_non_stop_p implementation.  */
+
+static int
+linux_nat_always_non_stop_p (struct target_ops *self)
+{
+  return 1;
+}
+
 /* True if we want to support multi-process.  To be removed when GDB
    supports multi-exec.  */
 
@@ -4618,24 +4466,12 @@ static int async_terminal_is_ours = 1;
 static void
 linux_nat_terminal_inferior (struct target_ops *self)
 {
-  /* Like target_terminal_inferior, use target_can_async_p, not
-     target_is_async_p, since at this point the target is not async
-     yet.  If it can async, then we know it will become async prior to
-     resume.  */
-  if (!target_can_async_p ())
-    {
-      /* Async mode is disabled.  */
-      child_terminal_inferior (self);
-      return;
-    }
-
   child_terminal_inferior (self);
 
   /* Calls to target_terminal_*() are meant to be idempotent.  */
   if (!async_terminal_is_ours)
     return;
 
-  delete_file_handler (input_fd);
   async_terminal_is_ours = 0;
   set_sigint_trap ();
 }
@@ -4661,7 +4497,6 @@ linux_nat_terminal_ours (struct target_o
     return;
 
   clear_sigint_trap ();
-  add_file_handler (input_fd, stdin_event_handler, 0);
   async_terminal_is_ours = 1;
 }
 
@@ -4807,10 +4642,7 @@ linux_nat_stop_lwp (struct lwp_info *lwp
 static void
 linux_nat_stop (struct target_ops *self, ptid_t ptid)
 {
-  if (non_stop)
-    iterate_over_lwps (ptid, linux_nat_stop_lwp, NULL);
-  else
-    linux_ops->to_stop (linux_ops, ptid);
+  iterate_over_lwps (ptid, linux_nat_stop_lwp, NULL);
 }
 
 static void
@@ -4905,7 +4737,8 @@ linux_nat_fileio_pid_of (struct inferior
 static int
 linux_nat_fileio_open (struct target_ops *self,
 		       struct inferior *inf, const char *filename,
-		       int flags, int mode, int *target_errno)
+		       int flags, int mode, int warn_if_slow,
+		       int *target_errno)
 {
   int nat_flags;
   mode_t nat_mode;
@@ -4945,7 +4778,7 @@ linux_nat_fileio_readlink (struct target
       return NULL;
     }
 
-  ret = xmalloc (len + 1);
+  ret = (char *) xmalloc (len + 1);
   memcpy (ret, buf, len);
   ret[len] = '\0';
   return ret;
@@ -4968,6 +4801,14 @@ linux_nat_fileio_unlink (struct target_o
   return ret;
 }
 
+/* Implementation of the to_thread_events method.  */
+
+static void
+linux_nat_thread_events (struct target_ops *ops, int enable)
+{
+  report_thread_events = enable;
+}
+
 void
 linux_nat_add_target (struct target_ops *t)
 {
@@ -5000,10 +4841,12 @@ linux_nat_add_target (struct target_ops 
   t->to_supports_stopped_by_sw_breakpoint = linux_nat_supports_stopped_by_sw_breakpoint;
   t->to_stopped_by_hw_breakpoint = linux_nat_stopped_by_hw_breakpoint;
   t->to_supports_stopped_by_hw_breakpoint = linux_nat_supports_stopped_by_hw_breakpoint;
+  t->to_thread_events = linux_nat_thread_events;
 
   t->to_can_async_p = linux_nat_can_async_p;
   t->to_is_async_p = linux_nat_is_async_p;
   t->to_supports_non_stop = linux_nat_supports_non_stop;
+  t->to_always_non_stop_p = linux_nat_always_non_stop_p;
   t->to_async = linux_nat_async;
   t->to_terminal_inferior = linux_nat_terminal_inferior;
   t->to_terminal_ours = linux_nat_terminal_ours;
@@ -5011,7 +4854,6 @@ linux_nat_add_target (struct target_ops 
   super_close = t->to_close;
   t->to_close = linux_nat_close;
 
-  /* Methods for non-stop support.  */
   t->to_stop = linux_nat_stop;
 
   t->to_supports_multi_process = linux_nat_supports_multi_process;
@@ -5168,6 +5010,8 @@ Enables printf debugging output."),
   sigdelset (&suspend_mask, SIGCHLD);
 
   sigemptyset (&blocked_mask);
+
+  lwp_lwpid_htab_create ();
 }
 
 
@@ -5175,70 +5019,16 @@ Enables printf debugging output."),
    the GNU/Linux Threads library and therefore doesn't really belong
    here.  */
 
-/* Read variable NAME in the target and return its value if found.
-   Otherwise return zero.  It is assumed that the type of the variable
-   is `int'.  */
-
-static int
-get_signo (const char *name)
-{
-  struct bound_minimal_symbol ms;
-  int signo;
-
-  ms = lookup_minimal_symbol (name, NULL, NULL);
-  if (ms.minsym == NULL)
-    return 0;
-
-  if (target_read_memory (BMSYMBOL_VALUE_ADDRESS (ms), (gdb_byte *) &signo,
-			  sizeof (signo)) != 0)
-    return 0;
-
-  return signo;
-}
-
 /* Return the set of signals used by the threads library in *SET.  */
 
 void
 lin_thread_get_thread_signals (sigset_t *set)
 {
-  struct sigaction action;
-  int restart, cancel;
-
-  sigemptyset (&blocked_mask);
   sigemptyset (set);
 
-  restart = get_signo ("__pthread_sig_restart");
-  cancel = get_signo ("__pthread_sig_cancel");
-
-  /* LinuxThreads normally uses the first two RT signals, but in some legacy
-     cases may use SIGUSR1/SIGUSR2.  NPTL always uses RT signals, but does
-     not provide any way for the debugger to query the signal numbers -
-     fortunately they don't change!  */
-
-  if (restart == 0)
-    restart = __SIGRTMIN;
-
-  if (cancel == 0)
-    cancel = __SIGRTMIN + 1;
-
-  sigaddset (set, restart);
-  sigaddset (set, cancel);
-
-  /* The GNU/Linux Threads library makes terminating threads send a
-     special "cancel" signal instead of SIGCHLD.  Make sure we catch
-     those (to prevent them from terminating GDB itself, which is
-     likely to be their default action) and treat them the same way as
-     SIGCHLD.  */
-
-  action.sa_handler = sigchld_handler;
-  sigemptyset (&action.sa_mask);
-  action.sa_flags = SA_RESTART;
-  sigaction (cancel, &action, NULL);
-
-  /* We block the "cancel" signal throughout this code ...  */
-  sigaddset (&blocked_mask, cancel);
-  sigprocmask (SIG_BLOCK, &blocked_mask, NULL);
-
-  /* ... except during a sigsuspend.  */
-  sigdelset (&suspend_mask, cancel);
+  /* NPTL reserves the first two RT signals, but does not provide any
+     way for the debugger to query the signal numbers - fortunately
+     they don't change.  */
+  sigaddset (set, __SIGRTMIN);
+  sigaddset (set, __SIGRTMIN + 1);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-nat.h ./gdb/linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native debugging support for GNU/Linux (LWP layer).
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,11 +37,6 @@ struct lwp_info
      next time we see this LWP stop.  */
   int must_set_ptrace_flags;
 
-  /* Non-zero if this LWP is cloned.  In this context "cloned" means
-     that the LWP is reporting to its parent using a signal other than
-     SIGCHLD.  */
-  int cloned;
-
   /* Non-zero if we sent this LWP a SIGSTOP (but the LWP didn't report
      it back yet).  */
   int signalled;
@@ -93,12 +88,12 @@ struct lwp_info
      or to a local variable in lin_lwp_wait.  */
   struct target_waitstatus waitstatus;
 
-  /* Signal wether we are in a SYSCALL_ENTRY or
+  /* Signal whether we are in a SYSCALL_ENTRY or
      in a SYSCALL_RETURN event.
      Values:
      - TARGET_WAITKIND_SYSCALL_ENTRY
      - TARGET_WAITKIND_SYSCALL_RETURN */
-  int syscall_state;
+  enum target_waitkind syscall_state;
 
   /* The processor core this LWP was last seen on.  */
   int core;
@@ -106,7 +101,9 @@ struct lwp_info
   /* Arch-specific additions.  */
   struct arch_lwp_info *arch_private;
 
-  /* Next LWP in list.  */
+  /* Previous and next pointers in doubly-linked list of known LWPs,
+     sorted by reverse creation order.  */
+  struct lwp_info *prev;
   struct lwp_info *next;
 };
 
@@ -116,7 +113,6 @@ struct lwp_info
 extern struct lwp_info *lwp_list;
 
 /* Does the current host support PTRACE_GETREGSET?  */
-enum tribool { TRIBOOL_UNKNOWN = -1, TRIBOOL_FALSE = 0, TRIBOOL_TRUE = 1 };
 extern enum tribool have_ptrace_getregset;
 
 /* Iterate over each active thread (light-weight process).  */
@@ -142,8 +138,6 @@ extern void lin_thread_get_thread_signal
 void linux_proc_pending_signals (int pid, sigset_t *pending,
 				 sigset_t *blocked, sigset_t *ignored);
 
-extern int lin_lwp_attach_lwp (ptid_t ptid);
-
 /* For linux_stop_lwp see nat/linux-nat.h.  */
 
 /* Stop all LWPs, synchronously.  (Any events that trigger while LWPs
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-record.c ./gdb/linux-record.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-record.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-record.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target code for GNU/Linux.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -85,10 +85,22 @@
 #define OUTPUT_REG(val, num)      phex_nz ((val), \
     TYPE_LENGTH (gdbarch_register_type (get_regcache_arch (regcache), (num))))
 
+/* Record a memory area of length LEN pointed to by register
+   REGNUM.  */
+
+static int
+record_mem_at_reg (struct regcache *regcache, int regnum, int len)
+{
+  ULONGEST addr;
+
+  regcache_raw_read_unsigned (regcache, regnum, &addr);
+  return record_full_arch_list_add_mem ((CORE_ADDR) addr, len);
+}
+
 static int
 record_linux_sockaddr (struct regcache *regcache,
-                       struct linux_record_tdep *tdep, ULONGEST addr,
-                       ULONGEST len)
+		       struct linux_record_tdep *tdep, ULONGEST addr,
+		       ULONGEST len)
 {
   gdb_byte *a;
   int addrlen;
@@ -98,7 +110,7 @@ record_linux_sockaddr (struct regcache *
   if (!addr)
     return 0;
 
-  a = alloca (tdep->size_int);
+  a = (gdb_byte *) alloca (tdep->size_int);
 
   if (record_full_arch_list_add_mem ((CORE_ADDR) len, tdep->size_int))
     return -1;
@@ -107,12 +119,12 @@ record_linux_sockaddr (struct regcache *
   if (target_read_memory ((CORE_ADDR) len, a, tdep->size_int))
     {
       if (record_debug)
-        fprintf_unfiltered (gdb_stdlog,
-                            "Process record: error reading "
-                            "memory at addr = 0x%s len = %d.\n",
-                            phex_nz (len, tdep->size_pointer),
-                            tdep->size_int);
-        return -1;
+	fprintf_unfiltered (gdb_stdlog,
+			    "Process record: error reading "
+			    "memory at addr = 0x%s len = %d.\n",
+			    phex_nz (len, tdep->size_pointer),
+			    tdep->size_int);
+      return -1;
     }
   addrlen = (int) extract_unsigned_integer (a, tdep->size_int, byte_order);
   if (addrlen <= 0 || addrlen > tdep->size_sockaddr)
@@ -126,7 +138,7 @@ record_linux_sockaddr (struct regcache *
 
 static int
 record_linux_msghdr (struct regcache *regcache,
-                     struct linux_record_tdep *tdep, ULONGEST addr)
+		     struct linux_record_tdep *tdep, ULONGEST addr)
 {
   gdb_byte *a;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -140,17 +152,17 @@ record_linux_msghdr (struct regcache *re
   if (record_full_arch_list_add_mem ((CORE_ADDR) addr, tdep->size_msghdr))
     return -1;
 
-  a = alloca (tdep->size_msghdr);
+  a = (gdb_byte *) alloca (tdep->size_msghdr);
   if (target_read_memory ((CORE_ADDR) addr, a, tdep->size_msghdr))
     {
       if (record_debug)
-        fprintf_unfiltered (gdb_stdlog,
-                            "Process record: error reading "
-                            "memory at addr = 0x%s "
-                            "len = %d.\n",
-                            phex_nz (addr, tdep->size_pointer),
-                            tdep->size_msghdr);
-        return -1;
+	fprintf_unfiltered (gdb_stdlog,
+			    "Process record: error reading "
+			    "memory at addr = 0x%s "
+			    "len = %d.\n",
+			    phex_nz (addr, tdep->size_pointer),
+			    tdep->size_msghdr);
+      return -1;
     }
 
   /* msg_name msg_namelen */
@@ -162,7 +174,9 @@ record_linux_msghdr (struct regcache *re
 				       tdep->size_int,
 				       byte_order)))
     return -1;
-  a += tdep->size_int;
+  /* We have read an int, but skip size_pointer bytes to account for alignment
+     of the next field on 64-bit targets. */
+  a += tdep->size_pointer;
 
   /* msg_iov msg_iovlen */
   addr = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
@@ -171,33 +185,33 @@ record_linux_msghdr (struct regcache *re
     {
       ULONGEST i;
       ULONGEST len = extract_unsigned_integer (a, tdep->size_size_t,
-                                               byte_order);
-      gdb_byte *iov = alloca (tdep->size_iovec);
+					       byte_order);
+      gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
 
       for (i = 0; i < len; i++)
-        {
-          if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec))
-            {
-              if (record_debug)
-                fprintf_unfiltered (gdb_stdlog,
-                                    "Process record: error "
-                                    "reading memory at "
-                                    "addr = 0x%s "
-                                    "len = %d.\n",
-                                    phex_nz (addr,tdep->size_pointer),
-                                    tdep->size_iovec);
-                return -1;
-            }
-          tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov,
-                                                          tdep->size_pointer,
-                                                          byte_order);
-          tmpint = (int) extract_unsigned_integer (iov + tdep->size_pointer,
-                                                   tdep->size_size_t,
-                                                   byte_order);
-          if (record_full_arch_list_add_mem (tmpaddr, tmpint))
-            return -1;
-          addr += tdep->size_iovec;
-        }
+	{
+	  if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec))
+	    {
+	      if (record_debug)
+		fprintf_unfiltered (gdb_stdlog,
+				    "Process record: error "
+				    "reading memory at "
+				    "addr = 0x%s "
+				    "len = %d.\n",
+				    phex_nz (addr,tdep->size_pointer),
+				    tdep->size_iovec);
+	      return -1;
+	    }
+	  tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov,
+							  tdep->size_pointer,
+							  byte_order);
+	  tmpint = (int) extract_unsigned_integer (iov + tdep->size_pointer,
+						   tdep->size_size_t,
+						   byte_order);
+	  if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+	    return -1;
+	  addr += tdep->size_iovec;
+	}
     }
   a += tdep->size_size_t;
 
@@ -224,9 +238,9 @@ record_linux_msghdr (struct regcache *re
    Return -1 if something wrong.  */
 
 int
-record_linux_system_call (enum gdb_syscall syscall, 
+record_linux_system_call (enum gdb_syscall syscall,
 			  struct regcache *regcache,
-                          struct linux_record_tdep *tdep)
+			  struct linux_record_tdep *tdep)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -240,43 +254,51 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_exit:
-      {
-        int q;
-
-        target_terminal_ours ();
-        q = yquery (_("The next instruction is syscall exit.  "
-                      "It will make the program exit.  "
-                      "Do you want to stop the program?"));
-        target_terminal_inferior ();
-        if (q)
-          return 1;
-      }
+      if (yquery (_("The next instruction is syscall exit.  "
+		    "It will make the program exit.  "
+		    "Do you want to stop the program?")))
+	return 1;
       break;
 
     case gdb_sys_fork:
       break;
 
     case gdb_sys_read:
-      {
-        ULONGEST addr, count;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &addr);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
-        if (record_full_arch_list_add_mem ((CORE_ADDR) addr, (int) count))
-          return -1;
-      }
+    case gdb_sys_readlink:
+    case gdb_sys_recv:
+      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+      if (record_mem_at_reg (regcache, tdep->arg2, (int) tmpulongest))
+	return -1;
       break;
 
     case gdb_sys_write:
     case gdb_sys_open:
     case gdb_sys_close:
+      break;
+
     case gdb_sys_waitpid:
+      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
+      if (tmpulongest)
+	if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+					   tdep->size_int))
+	  return -1;
+      break;
+
     case gdb_sys_creat:
     case gdb_sys_link:
     case gdb_sys_unlink:
     case gdb_sys_execve:
     case gdb_sys_chdir:
+      break;
+
     case gdb_sys_time:
+      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
+      if (tmpulongest)
+	if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+					   tdep->size_time_t))
+	  return -1;
+      break;
+
     case gdb_sys_mknod:
     case gdb_sys_chmod:
     case gdb_sys_lchown16:
@@ -286,10 +308,9 @@ record_linux_system_call (enum gdb_sysca
     case gdb_sys_stat:
     case gdb_sys_fstat:
     case gdb_sys_lstat:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size__old_kernel_stat))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2,
+			     tdep->size__old_kernel_stat))
+	return -1;
       break;
 
     case gdb_sys_lseek:
@@ -304,14 +325,12 @@ record_linux_system_call (enum gdb_sysca
     case gdb_sys_ptrace:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest == RECORD_PTRACE_PEEKTEXT
-          || tmpulongest == RECORD_PTRACE_PEEKDATA
-          || tmpulongest == RECORD_PTRACE_PEEKUSR)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
-            return -1;
-        }
+	  || tmpulongest == RECORD_PTRACE_PEEKDATA
+	  || tmpulongest == RECORD_PTRACE_PEEKUSR)
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg4, 4))
+	    return -1;
+	}
       break;
 
     case gdb_sys_alarm:
@@ -328,14 +347,17 @@ record_linux_system_call (enum gdb_sysca
     case gdb_sys_mkdir:
     case gdb_sys_rmdir:
     case gdb_sys_dup:
+      break;
+
     case gdb_sys_pipe:
+    case gdb_sys_pipe2:
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int * 2))
+	return -1;
       break;
 
     case gdb_sys_times:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_tms))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_tms))
+	return -1;
       break;
 
     case gdb_sys_ni_syscall44:
@@ -354,155 +376,132 @@ record_linux_system_call (enum gdb_sysca
       /* XXX Need to add a lot of support of other ioctl requests.  */
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest == tdep->ioctl_FIOCLEX
-          || tmpulongest == tdep->ioctl_FIONCLEX
-          || tmpulongest == tdep->ioctl_FIONBIO
-          || tmpulongest == tdep->ioctl_FIOASYNC
-          || tmpulongest == tdep->ioctl_TCSETS
-          || tmpulongest == tdep->ioctl_TCSETSW
-          || tmpulongest == tdep->ioctl_TCSETSF
-          || tmpulongest == tdep->ioctl_TCSETA
-          || tmpulongest == tdep->ioctl_TCSETAW
-          || tmpulongest == tdep->ioctl_TCSETAF
-          || tmpulongest == tdep->ioctl_TCSBRK
-          || tmpulongest == tdep->ioctl_TCXONC
-          || tmpulongest == tdep->ioctl_TCFLSH
-          || tmpulongest == tdep->ioctl_TIOCEXCL
-          || tmpulongest == tdep->ioctl_TIOCNXCL
-          || tmpulongest == tdep->ioctl_TIOCSCTTY
-          || tmpulongest == tdep->ioctl_TIOCSPGRP
-          || tmpulongest == tdep->ioctl_TIOCSTI
-          || tmpulongest == tdep->ioctl_TIOCSWINSZ
-          || tmpulongest == tdep->ioctl_TIOCMBIS
-          || tmpulongest == tdep->ioctl_TIOCMBIC
-          || tmpulongest == tdep->ioctl_TIOCMSET
-          || tmpulongest == tdep->ioctl_TIOCSSOFTCAR
-          || tmpulongest == tdep->ioctl_TIOCCONS
-          || tmpulongest == tdep->ioctl_TIOCSSERIAL
-          || tmpulongest == tdep->ioctl_TIOCPKT
-          || tmpulongest == tdep->ioctl_TIOCNOTTY
-          || tmpulongest == tdep->ioctl_TIOCSETD
-          || tmpulongest == tdep->ioctl_TCSBRKP
-          || tmpulongest == tdep->ioctl_TIOCTTYGSTRUCT
-          || tmpulongest == tdep->ioctl_TIOCSBRK
-          || tmpulongest == tdep->ioctl_TIOCCBRK
-          || tmpulongest == tdep->ioctl_TCSETS2
-          || tmpulongest == tdep->ioctl_TCSETSW2
-          || tmpulongest == tdep->ioctl_TCSETSF2
-          || tmpulongest == tdep->ioctl_TIOCSPTLCK
-          || tmpulongest == tdep->ioctl_TIOCSERCONFIG
-          || tmpulongest == tdep->ioctl_TIOCSERGWILD
-          || tmpulongest == tdep->ioctl_TIOCSERSWILD
-          || tmpulongest == tdep->ioctl_TIOCSLCKTRMIOS
-          || tmpulongest == tdep->ioctl_TIOCSERGETMULTI
-          || tmpulongest == tdep->ioctl_TIOCSERSETMULTI
-          || tmpulongest == tdep->ioctl_TIOCMIWAIT
-          || tmpulongest == tdep->ioctl_TIOCSHAYESESP)
-        {
-          /* Nothing to do.  */
-        }
+	  || tmpulongest == tdep->ioctl_FIONCLEX
+	  || tmpulongest == tdep->ioctl_FIONBIO
+	  || tmpulongest == tdep->ioctl_FIOASYNC
+	  || tmpulongest == tdep->ioctl_TCSETS
+	  || tmpulongest == tdep->ioctl_TCSETSW
+	  || tmpulongest == tdep->ioctl_TCSETSF
+	  || tmpulongest == tdep->ioctl_TCSETA
+	  || tmpulongest == tdep->ioctl_TCSETAW
+	  || tmpulongest == tdep->ioctl_TCSETAF
+	  || tmpulongest == tdep->ioctl_TCSBRK
+	  || tmpulongest == tdep->ioctl_TCXONC
+	  || tmpulongest == tdep->ioctl_TCFLSH
+	  || tmpulongest == tdep->ioctl_TIOCEXCL
+	  || tmpulongest == tdep->ioctl_TIOCNXCL
+	  || tmpulongest == tdep->ioctl_TIOCSCTTY
+	  || tmpulongest == tdep->ioctl_TIOCSPGRP
+	  || tmpulongest == tdep->ioctl_TIOCSTI
+	  || tmpulongest == tdep->ioctl_TIOCSWINSZ
+	  || tmpulongest == tdep->ioctl_TIOCMBIS
+	  || tmpulongest == tdep->ioctl_TIOCMBIC
+	  || tmpulongest == tdep->ioctl_TIOCMSET
+	  || tmpulongest == tdep->ioctl_TIOCSSOFTCAR
+	  || tmpulongest == tdep->ioctl_TIOCCONS
+	  || tmpulongest == tdep->ioctl_TIOCSSERIAL
+	  || tmpulongest == tdep->ioctl_TIOCPKT
+	  || tmpulongest == tdep->ioctl_TIOCNOTTY
+	  || tmpulongest == tdep->ioctl_TIOCSETD
+	  || tmpulongest == tdep->ioctl_TCSBRKP
+	  || tmpulongest == tdep->ioctl_TIOCTTYGSTRUCT
+	  || tmpulongest == tdep->ioctl_TIOCSBRK
+	  || tmpulongest == tdep->ioctl_TIOCCBRK
+	  || tmpulongest == tdep->ioctl_TCSETS2
+	  || tmpulongest == tdep->ioctl_TCSETSW2
+	  || tmpulongest == tdep->ioctl_TCSETSF2
+	  || tmpulongest == tdep->ioctl_TIOCSPTLCK
+	  || tmpulongest == tdep->ioctl_TIOCSERCONFIG
+	  || tmpulongest == tdep->ioctl_TIOCSERGWILD
+	  || tmpulongest == tdep->ioctl_TIOCSERSWILD
+	  || tmpulongest == tdep->ioctl_TIOCSLCKTRMIOS
+	  || tmpulongest == tdep->ioctl_TIOCSERGETMULTI
+	  || tmpulongest == tdep->ioctl_TIOCSERSETMULTI
+	  || tmpulongest == tdep->ioctl_TIOCMIWAIT
+	  || tmpulongest == tdep->ioctl_TIOCSHAYESESP)
+	{
+	  /* Nothing to do.  */
+	}
       else if (tmpulongest == tdep->ioctl_TCGETS
-               || tmpulongest == tdep->ioctl_TCGETA
-               || tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_termios))
-            return -1;
-        }
+	       || tmpulongest == tdep->ioctl_TCGETA
+	       || tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_termios))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCGPGRP
-               || tmpulongest == tdep->ioctl_TIOCGSID)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_pid_t))
-            return -1;
-        }
+	       || tmpulongest == tdep->ioctl_TIOCGSID)
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_pid_t))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCOUTQ
-               || tmpulongest == tdep->ioctl_TIOCMGET
-               || tmpulongest == tdep->ioctl_TIOCGSOFTCAR
-               || tmpulongest == tdep->ioctl_FIONREAD
-               || tmpulongest == tdep->ioctl_TIOCINQ
-               || tmpulongest == tdep->ioctl_TIOCGETD
-               || tmpulongest == tdep->ioctl_TIOCGPTN
-               || tmpulongest == tdep->ioctl_TIOCSERGETLSR)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_int))
-            return -1;
-        }
+	       || tmpulongest == tdep->ioctl_TIOCMGET
+	       || tmpulongest == tdep->ioctl_TIOCGSOFTCAR
+	       || tmpulongest == tdep->ioctl_FIONREAD
+	       || tmpulongest == tdep->ioctl_TIOCINQ
+	       || tmpulongest == tdep->ioctl_TIOCGETD
+	       || tmpulongest == tdep->ioctl_TIOCGPTN
+	       || tmpulongest == tdep->ioctl_TIOCSERGETLSR)
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCGWINSZ)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_winsize))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_winsize))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCLINUX)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
+	{
 	  /* This syscall affects a char-size memory.  */
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 1))
-            return -1;
-        }
+	  if (record_mem_at_reg (regcache, tdep->arg3, 1))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCGSERIAL)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_serial_struct))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_serial_struct))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TCGETS2)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_termios2))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_termios2))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_FIOQSIZE)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_loff_t))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCGICOUNT)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_serial_icounter_struct))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_serial_icounter_struct))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCGHAYESESP)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_hayes_esp_config))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_hayes_esp_config))
+	    return -1;
+	}
       else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT)
-        {
-          printf_unfiltered (_("Process record and replay target doesn't "
-                               "support ioctl request TIOCSERGSTRUCT\n"));
-          return 1;
-        }
+	{
+	  printf_unfiltered (_("Process record and replay target doesn't "
+			       "support ioctl request TIOCSERGSTRUCT\n"));
+	  return 1;
+	}
       else
-        {
-          printf_unfiltered (_("Process record and replay target doesn't "
-                               "support ioctl request 0x%s.\n"),
-                             OUTPUT_REG (tmpulongest, tdep->arg2));
-          return 1;
-        }
+	{
+	  printf_unfiltered (_("Process record and replay target doesn't "
+			       "support ioctl request 0x%s.\n"),
+			     OUTPUT_REG (tmpulongest, tdep->arg2));
+	  return 1;
+	}
       break;
 
     case gdb_sys_fcntl:
@@ -510,13 +509,10 @@ record_linux_system_call (enum gdb_sysca
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
     sys_fcntl:
       if (tmpulongest == tdep->fcntl_F_GETLK)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_flock))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_flock))
+	    return -1;
+	}
       break;
 
     case gdb_sys_ni_syscall56:
@@ -525,10 +521,9 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_olduname:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_oldold_utsname))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1,
+			     tdep->size_oldold_utsname))
+	return -1;
       break;
 
     case gdb_sys_umask:
@@ -536,10 +531,8 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_ustat:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_ustat))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_ustat))
+	return -1;
       break;
 
     case gdb_sys_dup2:
@@ -549,10 +542,9 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_sigaction:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_sigaction))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3,
+			     tdep->size_old_sigaction))
+	return -1;
       break;
 
     case gdb_sys_sgetmask:
@@ -563,10 +555,9 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_sigpending:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_sigset_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1,
+			     tdep->size_old_sigset_t))
+	return -1;
       break;
 
     case gdb_sys_sethostname:
@@ -574,28 +565,19 @@ record_linux_system_call (enum gdb_sysca
       break;
 
     case gdb_sys_old_getrlimit:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_rlimit))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
+	return -1;
       break;
 
     case gdb_sys_getrusage:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_rusage))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rusage))
+	return -1;
       break;
 
     case gdb_sys_gettimeofday:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timeval))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timezone))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timeval)
+	  || record_mem_at_reg (regcache, tdep->arg2, tdep->size_timezone))
+	return -1;
       break;
 
     case gdb_sys_settimeofday:
@@ -603,94 +585,83 @@ record_linux_system_call (enum gdb_sysca
 
     case gdb_sys_getgroups16:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_gid_t))
-        return -1;
+      if (tmpulongest)
+	{
+	  ULONGEST gidsetsize;
+
+	  regcache_raw_read_unsigned (regcache, tdep->arg1,
+				      &gidsetsize);
+	  tmpint = tdep->size_old_gid_t * (int) gidsetsize;
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+	    return -1;
+	}
       break;
 
     case gdb_sys_setgroups16:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_gid_t))
-        return -1;
       break;
 
     case gdb_old_select:
       {
-        struct sel_arg_struct
-        {
-          CORE_ADDR n;
-          CORE_ADDR inp;
-          CORE_ADDR outp;
-          CORE_ADDR exp;
-          CORE_ADDR tvp;
-        } sel;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg1,
-                                    &tmpulongest);
-        if (tmpulongest)
-          {
-            if (target_read_memory (tmpulongest, (gdb_byte *) &sel,
-                                    sizeof(sel)))
-              {
-                if (record_debug)
-                  fprintf_unfiltered (gdb_stdlog,
-                                      "Process record: error reading memory "
-                                      "at addr = 0x%s len = %lu.\n",
-                                      OUTPUT_REG (tmpulongest, tdep->arg1),
-                                      (unsigned long) sizeof (sel));
-                return -1;
-              }
-            if (record_full_arch_list_add_mem (sel.inp, tdep->size_fd_set))
-              return -1;
-            if (record_full_arch_list_add_mem (sel.outp, tdep->size_fd_set))
-              return -1;
-            if (record_full_arch_list_add_mem (sel.exp, tdep->size_fd_set))
-              return -1;
-            if (record_full_arch_list_add_mem (sel.tvp, tdep->size_timeval))
-              return -1;
-          }
+	unsigned long sz_sel_arg = tdep->size_long + tdep->size_pointer * 4;
+	gdb_byte *a = (gdb_byte *) alloca (sz_sel_arg);
+	CORE_ADDR inp, outp, exp, tvp;
+
+	regcache_raw_read_unsigned (regcache, tdep->arg1,
+				    &tmpulongest);
+	if (tmpulongest)
+	  {
+	    if (target_read_memory (tmpulongest, a, sz_sel_arg))
+	      {
+		if (record_debug)
+		  fprintf_unfiltered (gdb_stdlog,
+				      "Process record: error reading memory "
+				      "at addr = 0x%s len = %lu.\n",
+				      OUTPUT_REG (tmpulongest, tdep->arg1),
+				      sz_sel_arg);
+		return -1;
+	      }
+	    /* Skip n. */
+	    a += tdep->size_long;
+	    inp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+	    a += tdep->size_pointer;
+	    outp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+	    a += tdep->size_pointer;
+	    exp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+	    a += tdep->size_pointer;
+	    tvp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+	    if (inp)
+	      if (record_full_arch_list_add_mem (inp, tdep->size_fd_set))
+		return -1;
+	    if (outp)
+	      if (record_full_arch_list_add_mem (outp, tdep->size_fd_set))
+		return -1;
+	    if (exp)
+	      if (record_full_arch_list_add_mem (exp, tdep->size_fd_set))
+		return -1;
+	    if (tvp)
+	      if (record_full_arch_list_add_mem (tvp, tdep->size_timeval))
+		return -1;
+	  }
       }
       break;
 
     case gdb_sys_symlink:
       break;
 
-    case gdb_sys_readlink:
-      {
-        ULONGEST len;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                    &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
-        if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
-          return -1;
-      }
-      break;
-
     case gdb_sys_uselib:
     case gdb_sys_swapon:
       break;
 
     case gdb_sys_reboot:
-      {
-        int q;
-
-        target_terminal_ours ();
-        q = yquery (_("The next instruction is syscall reboot.  "
-		      "It will restart the computer.  "
-		      "Do you want to stop the program?"));
-        target_terminal_inferior ();
-        if (q)
-          return 1;
-      }
+      if (yquery (_("The next instruction is syscall reboot.  "
+		    "It will restart the computer.  "
+		    "Do you want to stop the program?")))
+	return 1;
       break;
 
     case gdb_old_readdir:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_dirent))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_old_dirent))
+	return -1;
       break;
 
     case gdb_old_mmap:
@@ -698,26 +669,21 @@ record_linux_system_call (enum gdb_sysca
 
     case gdb_sys_munmap:
       {
-        ULONGEST len;
+	ULONGEST len;
 
-        regcache_raw_read_unsigned (regcache, tdep->arg1,
-                                    &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
-        if (record_full_memory_query)
-          {
-	    int q;
-
-            target_terminal_ours ();
-            q = yquery (_("\
+	regcache_raw_read_unsigned (regcache, tdep->arg1,
+				    &tmpulongest);
+	regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
+	if (record_full_memory_query)
+	  {
+	    if (yquery (_("\
 The next instruction is syscall munmap.\n\
 It will free the memory addr = 0x%s len = %u.\n\
 It will make record target cannot record some memory change.\n\
 Do you want to stop the program?"),
-                        OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
-            target_terminal_inferior ();
-            if (q)
-              return 1;
-          }
+			OUTPUT_REG (tmpulongest, tdep->arg1), (int) len))
+	      return 1;
+	  }
       }
       break;
 
@@ -732,10 +698,8 @@ Do you want to stop the program?"),
 
     case gdb_sys_statfs:
     case gdb_sys_fstatfs:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_statfs))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_statfs))
+	return -1;
       break;
 
     case gdb_sys_ioperm:
@@ -755,347 +719,332 @@ Do you want to stop the program?"),
     case gdb_sys_getsockname:
     case gdb_sys_getpeername:
       {
-        ULONGEST len;
+	ULONGEST len;
 
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
-        if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
-          return -1;
+	regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
+	regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
+	if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+	  return -1;
       }
       break;
 
     case gdb_sys_recvfrom:
       {
-        ULONGEST len;
+	ULONGEST len;
 
-        regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
-        if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
-          return -1;
-      }
-      break;
-
-    case gdb_sys_recv:
-      {
-        ULONGEST size;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
-        if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					   (int) size))
-          return -1;
+	regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
+	regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
+	if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+	  return -1;
       }
       break;
 
     case gdb_sys_recvmsg:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (record_linux_msghdr (regcache, tdep, tmpulongest))
-        return -1;
+	return -1;
       break;
 
     case gdb_sys_socketpair:
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_getsockopt:
       regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST optvalp;
-          gdb_byte *optlenp = alloca (tdep->size_int);
-
-          if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
-                                  tdep->size_int))
-            {
-              if (record_debug)
-                fprintf_unfiltered (gdb_stdlog,
-                                    "Process record: error reading "
-                                    "memory at addr = 0x%s "
-                                    "len = %d.\n",
-                                    OUTPUT_REG (tmpulongest, tdep->arg5),
-                                    tdep->size_int);
-              return -1;
-            }
-          regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp);
-          tmpint = (int) extract_signed_integer (optlenp, tdep->size_int,
-                                                 byte_order);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) optvalp, tmpint))
-            return -1;
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	{
+	  ULONGEST optvalp;
+	  gdb_byte *optlenp = (gdb_byte *) alloca (tdep->size_int);
+
+	  if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
+				  tdep->size_int))
+	    {
+	      if (record_debug)
+		fprintf_unfiltered (gdb_stdlog,
+				    "Process record: error reading "
+				    "memory at addr = 0x%s "
+				    "len = %d.\n",
+				    OUTPUT_REG (tmpulongest, tdep->arg5),
+				    tdep->size_int);
+	      return -1;
+	    }
+	  regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp);
+	  tmpint = (int) extract_signed_integer (optlenp, tdep->size_int,
+						 byte_order);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) optvalp, tmpint))
+	    return -1;
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     tdep->size_int))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_socketcall:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       switch (tmpulongest)
-        {
-        case RECORD_SYS_SOCKET:
-        case RECORD_SYS_BIND:
-        case RECORD_SYS_CONNECT:
-        case RECORD_SYS_LISTEN:
-          break;
-        case RECORD_SYS_ACCEPT:
-        case RECORD_SYS_GETSOCKNAME:
-        case RECORD_SYS_GETPEERNAME:
-          {
-            regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                        &tmpulongest);
-            if (tmpulongest)
-              {
-                gdb_byte *a = alloca (tdep->size_ulong * 2);
-                ULONGEST len;
-
-                tmpulongest += tdep->size_ulong;
-                if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                        tdep->size_ulong * 2))
-                  {
-                    if (record_debug)
-                      fprintf_unfiltered (gdb_stdlog,
-                                          "Process record: error reading "
-                                          "memory at addr = 0x%s len = %d.\n",
-                                          OUTPUT_REG (tmpulongest, tdep->arg2),
-                                          tdep->size_ulong * 2);
-                    return -1;
-                  }
-                tmpulongest = extract_unsigned_integer (a,
-                                                        tdep->size_ulong,
-                                                        byte_order);
-                len = extract_unsigned_integer (a + tdep->size_ulong,
-                                                tdep->size_ulong, byte_order);
-                if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
-                  return -1;
-              }
-          }
-          break;
-
-        case RECORD_SYS_SOCKETPAIR:
-          {
-            gdb_byte *a = alloca (tdep->size_ulong);
-
-            regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                        &tmpulongest);
-            if (tmpulongest)
-              {
-                tmpulongest += tdep->size_ulong * 3;
-                if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                        tdep->size_ulong))
-                  {
-                    if (record_debug)
-                      fprintf_unfiltered (gdb_stdlog,
-                                          "Process record: error reading "
-                                          "memory at addr = 0x%s len = %d.\n",
-                                          OUTPUT_REG (tmpulongest, tdep->arg2),
-                                          tdep->size_ulong);
-                    return -1;
-                  }
-                tmpaddr
-                  = (CORE_ADDR) extract_unsigned_integer (a, tdep->size_ulong,
-                                                          byte_order);
-                if (record_full_arch_list_add_mem (tmpaddr, tdep->size_int))
-                  return -1;
-              }
-          }
-          break;
-        case RECORD_SYS_SEND:
-        case RECORD_SYS_SENDTO:
-          break;
-        case RECORD_SYS_RECVFROM:
-          regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                      &tmpulongest);
-          if (tmpulongest)
-            {
-              gdb_byte *a = alloca (tdep->size_ulong * 2);
-              ULONGEST len;
-
-              tmpulongest += tdep->size_ulong * 4;
-              if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                      tdep->size_ulong * 2))
-                {
-                  if (record_debug)
-                    fprintf_unfiltered (gdb_stdlog,
-                                        "Process record: error reading "
-                                        "memory at addr = 0x%s len = %d.\n",
-                                        OUTPUT_REG (tmpulongest, tdep->arg2),
-                                        tdep->size_ulong * 2);
-                  return -1;
-                }
-              tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
-                                                      byte_order);
-              len = extract_unsigned_integer (a + tdep->size_ulong,
-                                              tdep->size_ulong, byte_order);
-              if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
-                return -1;
-            }
-        case RECORD_SYS_RECV:
-          regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                      &tmpulongest);
-          if (tmpulongest)
-            {
-              gdb_byte *a = alloca (tdep->size_ulong * 2);
-
-              tmpulongest += tdep->size_ulong;
-              if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                      tdep->size_ulong))
-                {
-                  if (record_debug)
-                    fprintf_unfiltered (gdb_stdlog,
-                                        "Process record: error reading "
-                                        "memory at addr = 0x%s len = %d.\n",
-                                        OUTPUT_REG (tmpulongest, tdep->arg2),
-                                        tdep->size_ulong);
-                    return -1;
-                }
-              tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
-                                                      byte_order);
-              if (tmpulongest)
-                {
-                  a += tdep->size_ulong;
-                  tmpint = (int) extract_unsigned_integer (a, tdep->size_ulong,
-                                                           byte_order);
-                  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	{
+	case RECORD_SYS_SOCKET:
+	case RECORD_SYS_BIND:
+	case RECORD_SYS_CONNECT:
+	case RECORD_SYS_LISTEN:
+	  break;
+	case RECORD_SYS_ACCEPT:
+	case RECORD_SYS_GETSOCKNAME:
+	case RECORD_SYS_GETPEERNAME:
+	  {
+	    regcache_raw_read_unsigned (regcache, tdep->arg2,
+					&tmpulongest);
+	    if (tmpulongest)
+	      {
+		gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+		ULONGEST len;
+
+		tmpulongest += tdep->size_ulong;
+		if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+					tdep->size_ulong * 2))
+		  {
+		    if (record_debug)
+		      fprintf_unfiltered (gdb_stdlog,
+					  "Process record: error reading "
+					  "memory at addr = 0x%s len = %d.\n",
+					  OUTPUT_REG (tmpulongest, tdep->arg2),
+					  tdep->size_ulong * 2);
+		    return -1;
+		  }
+		tmpulongest = extract_unsigned_integer (a,
+							tdep->size_ulong,
+							byte_order);
+		len = extract_unsigned_integer (a + tdep->size_ulong,
+						tdep->size_ulong, byte_order);
+		if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+		  return -1;
+	      }
+	  }
+	  break;
+
+	case RECORD_SYS_SOCKETPAIR:
+	  {
+	    gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
+
+	    regcache_raw_read_unsigned (regcache, tdep->arg2,
+					&tmpulongest);
+	    if (tmpulongest)
+	      {
+		tmpulongest += tdep->size_ulong * 3;
+		if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+					tdep->size_ulong))
+		  {
+		    if (record_debug)
+		      fprintf_unfiltered (gdb_stdlog,
+					  "Process record: error reading "
+					  "memory at addr = 0x%s len = %d.\n",
+					  OUTPUT_REG (tmpulongest, tdep->arg2),
+					  tdep->size_ulong);
+		    return -1;
+		  }
+		tmpaddr
+		  = (CORE_ADDR) extract_unsigned_integer (a, tdep->size_ulong,
+							  byte_order);
+		if (record_full_arch_list_add_mem (tmpaddr, tdep->size_int))
+		  return -1;
+	      }
+	  }
+	  break;
+	case RECORD_SYS_SEND:
+	case RECORD_SYS_SENDTO:
+	  break;
+	case RECORD_SYS_RECVFROM:
+	  regcache_raw_read_unsigned (regcache, tdep->arg2,
+				      &tmpulongest);
+	  if (tmpulongest)
+	    {
+	      gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+	      ULONGEST len;
+
+	      tmpulongest += tdep->size_ulong * 4;
+	      if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+				      tdep->size_ulong * 2))
+		{
+		  if (record_debug)
+		    fprintf_unfiltered (gdb_stdlog,
+					"Process record: error reading "
+					"memory at addr = 0x%s len = %d.\n",
+					OUTPUT_REG (tmpulongest, tdep->arg2),
+					tdep->size_ulong * 2);
+		  return -1;
+		}
+	      tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+						      byte_order);
+	      len = extract_unsigned_integer (a + tdep->size_ulong,
+					      tdep->size_ulong, byte_order);
+	      if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+		return -1;
+	    }
+	case RECORD_SYS_RECV:
+	  regcache_raw_read_unsigned (regcache, tdep->arg2,
+				      &tmpulongest);
+	  if (tmpulongest)
+	    {
+	      gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+
+	      tmpulongest += tdep->size_ulong;
+	      if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+				      tdep->size_ulong))
+		{
+		  if (record_debug)
+		    fprintf_unfiltered (gdb_stdlog,
+					"Process record: error reading "
+					"memory at addr = 0x%s len = %d.\n",
+					OUTPUT_REG (tmpulongest, tdep->arg2),
+					tdep->size_ulong);
+		  return -1;
+		}
+	      tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+						      byte_order);
+	      if (tmpulongest)
+		{
+		  a += tdep->size_ulong;
+		  tmpint = (int) extract_unsigned_integer (a, tdep->size_ulong,
+							   byte_order);
+		  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 						     tmpint))
-                    return -1;
-                }
-            }
-          break;
-        case RECORD_SYS_SHUTDOWN:
-        case RECORD_SYS_SETSOCKOPT:
-          break;
-        case RECORD_SYS_GETSOCKOPT:
-          {
-            gdb_byte *a = alloca (tdep->size_ulong * 2);
-            gdb_byte *av = alloca (tdep->size_int);
-
-            regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                        &tmpulongest);
-            if (tmpulongest)
-              {
-                tmpulongest += tdep->size_ulong * 3;
-                if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                        tdep->size_ulong * 2))
-                  {
-                    if (record_debug)
-                      fprintf_unfiltered (gdb_stdlog,
-                                          "Process record: error reading "
-                                          "memory at addr = 0x%s len = %d.\n",
-                                          OUTPUT_REG (tmpulongest, tdep->arg2),
-                                          tdep->size_ulong * 2);
-                    return -1;
-                  }
-                tmpulongest = extract_unsigned_integer (a + tdep->size_ulong,
-                                                        tdep->size_ulong,
-                                                        byte_order);
-                if (tmpulongest)
-                  {
-                    if (target_read_memory ((CORE_ADDR) tmpulongest, av,
-                                            tdep->size_int))
-                      {
-                        if (record_debug)
-                          fprintf_unfiltered (gdb_stdlog,
-                                              "Process record: error reading "
-                                              "memory at addr = 0x%s "
-                                              "len = %d.\n",
-                                              phex_nz (tmpulongest,
-                                                       tdep->size_ulong),
-                                              tdep->size_int);
-                        return -1;
-                      }
-                    tmpaddr
-                      = (CORE_ADDR) extract_unsigned_integer (a,
-                                                              tdep->size_ulong,
-                                                              byte_order);
-                    tmpint = (int) extract_unsigned_integer (av,
-                                                             tdep->size_int,
-                                                             byte_order);
-                    if (record_full_arch_list_add_mem (tmpaddr, tmpint))
-                      return -1;
-                    a += tdep->size_ulong;
-                    tmpaddr
-                      = (CORE_ADDR) extract_unsigned_integer (a,
-                                                              tdep->size_ulong,
-                                                              byte_order);
-                    if (record_full_arch_list_add_mem (tmpaddr,
+		    return -1;
+		}
+	    }
+	  break;
+	case RECORD_SYS_SHUTDOWN:
+	case RECORD_SYS_SETSOCKOPT:
+	  break;
+	case RECORD_SYS_GETSOCKOPT:
+	  {
+	    gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+	    gdb_byte *av = (gdb_byte *) alloca (tdep->size_int);
+
+	    regcache_raw_read_unsigned (regcache, tdep->arg2,
+					&tmpulongest);
+	    if (tmpulongest)
+	      {
+		tmpulongest += tdep->size_ulong * 3;
+		if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+					tdep->size_ulong * 2))
+		  {
+		    if (record_debug)
+		      fprintf_unfiltered (gdb_stdlog,
+					  "Process record: error reading "
+					  "memory at addr = 0x%s len = %d.\n",
+					  OUTPUT_REG (tmpulongest, tdep->arg2),
+					  tdep->size_ulong * 2);
+		    return -1;
+		  }
+		tmpulongest = extract_unsigned_integer (a + tdep->size_ulong,
+							tdep->size_ulong,
+							byte_order);
+		if (tmpulongest)
+		  {
+		    if (target_read_memory ((CORE_ADDR) tmpulongest, av,
+					    tdep->size_int))
+		      {
+			if (record_debug)
+			  fprintf_unfiltered (gdb_stdlog,
+					      "Process record: error reading "
+					      "memory at addr = 0x%s "
+					      "len = %d.\n",
+					      phex_nz (tmpulongest,
+						       tdep->size_ulong),
+					      tdep->size_int);
+			return -1;
+		      }
+		    tmpaddr
+		      = (CORE_ADDR) extract_unsigned_integer (a,
+							      tdep->size_ulong,
+							      byte_order);
+		    tmpint = (int) extract_unsigned_integer (av,
+							     tdep->size_int,
+							     byte_order);
+		    if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+		      return -1;
+		    a += tdep->size_ulong;
+		    tmpaddr
+		      = (CORE_ADDR) extract_unsigned_integer (a,
+							      tdep->size_ulong,
+							      byte_order);
+		    if (record_full_arch_list_add_mem (tmpaddr,
 						       tdep->size_int))
-                      return -1;
-                  }
-              }
-          }
-          break;
-        case RECORD_SYS_SENDMSG:
-          break;
-        case RECORD_SYS_RECVMSG:
-          {
-            gdb_byte *a = alloca (tdep->size_ulong);
-
-            regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                        &tmpulongest);
-            if (tmpulongest)
-              {
-                tmpulongest += tdep->size_ulong;
-                if (target_read_memory ((CORE_ADDR) tmpulongest, a,
-                                        tdep->size_ulong))
-                  {
-                    if (record_debug)
-                      fprintf_unfiltered (gdb_stdlog,
-                                          "Process record: error reading "
-                                          "memory at addr = 0x%s len = %d.\n",
-                                          OUTPUT_REG (tmpulongest, tdep->arg2),
-                                          tdep->size_ulong);
-                    return -1;
-                  }
-                tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
-                                                        byte_order);
-                if (record_linux_msghdr (regcache, tdep, tmpulongest))
-                  return -1;
-              }
-          }
-          break;
-        default:
-          printf_unfiltered (_("Process record and replay target "
-                               "doesn't support socketcall call 0x%s\n"),
-                             OUTPUT_REG (tmpulongest, tdep->arg1));
-          return -1;
-          break;
-        }
+		      return -1;
+		  }
+	      }
+	  }
+	  break;
+	case RECORD_SYS_SENDMSG:
+	  break;
+	case RECORD_SYS_RECVMSG:
+	  {
+	    gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
+
+	    regcache_raw_read_unsigned (regcache, tdep->arg2,
+					&tmpulongest);
+	    if (tmpulongest)
+	      {
+		tmpulongest += tdep->size_ulong;
+		if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+					tdep->size_ulong))
+		  {
+		    if (record_debug)
+		      fprintf_unfiltered (gdb_stdlog,
+					  "Process record: error reading "
+					  "memory at addr = 0x%s len = %d.\n",
+					  OUTPUT_REG (tmpulongest, tdep->arg2),
+					  tdep->size_ulong);
+		    return -1;
+		  }
+		tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+							byte_order);
+		if (record_linux_msghdr (regcache, tdep, tmpulongest))
+		  return -1;
+	      }
+	  }
+	  break;
+	default:
+	  printf_unfiltered (_("Process record and replay target "
+			       "doesn't support socketcall call 0x%s\n"),
+			     OUTPUT_REG (tmpulongest, tdep->arg1));
+	  return -1;
+	  break;
+	}
       break;
 
     case gdb_sys_syslog:
       break;
 
     case gdb_sys_setitimer:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_itimerval))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_itimerval))
+	return -1;
       break;
 
     case gdb_sys_getitimer:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_itimerval))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerval))
+	return -1;
       break;
 
     case gdb_sys_newstat:
     case gdb_sys_newlstat:
     case gdb_sys_newfstat:
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat))
+	return -1;
+      break;
+
     case gdb_sys_newfstatat:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
+      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
       if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					 tdep->size_stat))
-        return -1;
+	return -1;
       break;
 
     case gdb_sys_uname:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_utsname))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1,
+			     tdep->size_old_utsname))
+	return -1;
       break;
 
     case gdb_sys_iopl:
@@ -1105,24 +1054,17 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_wait4:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_rusage))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+	  || record_mem_at_reg (regcache, tdep->arg4, tdep->size_rusage))
+	return -1;
       break;
 
     case gdb_sys_swapoff:
       break;
 
     case gdb_sys_sysinfo:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_sysinfo))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_sysinfo))
+	return -1;
       break;
 
     case gdb_sys_shmget:
@@ -1136,17 +1078,13 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_shmat:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_ulong))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_ulong))
+	return -1;
       break;
 
     case gdb_sys_shmctl:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_shmid_ds))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_shmid_ds))
+	return -1;
       break;
 
       /* XXX sys_semctl 525 still not supported.  */
@@ -1154,78 +1092,65 @@ Do you want to stop the program?"),
 
     case gdb_sys_msgrcv:
       {
-        ULONGEST msgp;
-        LONGEST l;
+	LONGEST l;
 
-        regcache_raw_read_signed (regcache, tdep->arg3, &l);
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
-        tmpint = l + tdep->size_long;
-        if (record_full_arch_list_add_mem ((CORE_ADDR) msgp, tmpint))
-          return -1;
+	regcache_raw_read_signed (regcache, tdep->arg3, &l);
+	tmpint = l + tdep->size_long;
+	if (record_mem_at_reg (regcache, tdep->arg2, tmpint))
+	  return -1;
       }
       break;
 
     case gdb_sys_msgctl:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_msqid_ds))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_msqid_ds))
+	return -1;
       break;
 
     case gdb_sys_ipc:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       tmpulongest &= 0xffff;
       switch (tmpulongest)
-        {
-        case RECORD_SEMOP:
-        case RECORD_SEMGET:
-        case RECORD_SEMTIMEDOP:
-        case RECORD_MSGSND:
-        case RECORD_MSGGET:
+	{
+	case RECORD_SEMOP:
+	case RECORD_SEMGET:
+	case RECORD_SEMTIMEDOP:
+	case RECORD_MSGSND:
+	case RECORD_MSGGET:
 	  /* XXX maybe need do some record works with RECORD_SHMDT.  */
-        case RECORD_SHMDT:
-        case RECORD_SHMGET:
-          break;
-        case RECORD_MSGRCV:
-          {
-            LONGEST second;
-            ULONGEST ptr;
-
-            regcache_raw_read_signed (regcache, tdep->arg3, &second);
-            regcache_raw_read_unsigned (regcache, tdep->arg5, &ptr);
-            tmpint = (int) second + tdep->size_long;
-            if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, tmpint))
-              return -1;
-          }
-          break;
-        case RECORD_MSGCTL:
-          regcache_raw_read_unsigned (regcache, tdep->arg5,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_msqid_ds))
-            return -1;
-          break;
-        case RECORD_SHMAT:
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_ulong))
-            return -1;
-          break;
-        case RECORD_SHMCTL:
-          regcache_raw_read_unsigned (regcache, tdep->arg5,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_shmid_ds))
-            return -1;
-          break;
-        default:
+	case RECORD_SHMDT:
+	case RECORD_SHMGET:
+	  break;
+	case RECORD_MSGRCV:
+	  {
+	    LONGEST second;
+
+	    regcache_raw_read_signed (regcache, tdep->arg3, &second);
+	    tmpint = (int) second + tdep->size_long;
+	    if (record_mem_at_reg (regcache, tdep->arg5, tmpint))
+	      return -1;
+	  }
+	  break;
+	case RECORD_MSGCTL:
+	  if (record_mem_at_reg (regcache, tdep->arg5,
+				 tdep->size_msqid_ds))
+	    return -1;
+	  break;
+	case RECORD_SHMAT:
+	  if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_ulong))
+	    return -1;
+	  break;
+	case RECORD_SHMCTL:
+	  if (record_mem_at_reg (regcache, tdep->arg5,
+				 tdep->size_shmid_ds))
+	    return -1;
+	  break;
+	default:
 	  /* XXX RECORD_SEMCTL still not supported.  */
-          printf_unfiltered (_("Process record and replay target doesn't "
-                               "support ipc number %s\n"), 
+	  printf_unfiltered (_("Process record and replay target doesn't "
+			       "support ipc number %s\n"),
 			     pulongest (tmpulongest));
-          break;
-        }
+	  break;
+	}
       break;
 
     case gdb_sys_fsync:
@@ -1235,40 +1160,35 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_newuname:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_new_utsname))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1,
+			     tdep->size_new_utsname))
+	return -1;
       break;
 
     case gdb_sys_modify_ldt:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest == 0 || tmpulongest == 2)
-        {
-          ULONGEST ptr, bytecount;
+	{
+	  ULONGEST bytecount;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &ptr);
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, (int) bytecount))
-            return -1;
-        }
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
+	  if (record_mem_at_reg (regcache, tdep->arg2, (int) bytecount))
+	    return -1;
+	}
       break;
 
     case gdb_sys_adjtimex:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timex))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timex))
+	return -1;
       break;
 
     case gdb_sys_mprotect:
       break;
 
     case gdb_sys_sigprocmask:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_sigset_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3,
+			     tdep->size_old_sigset_t))
+	return -1;
       break;
 
     case gdb_sys_ni_syscall127:
@@ -1280,37 +1200,29 @@ Do you want to stop the program?"),
     case gdb_sys_quotactl:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       switch (tmpulongest)
-        {
-        case RECORD_Q_GETFMT:
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          /* __u32 */
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
-            return -1;
-          break;
-        case RECORD_Q_GETINFO:
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_mem_dqinfo))
-            return -1;
-          break;
-        case RECORD_Q_GETQUOTA:
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_if_dqblk))
-            return -1;
-          break;
-        case RECORD_Q_XGETQSTAT:
-        case RECORD_Q_XGETQUOTA:
-          regcache_raw_read_unsigned (regcache, tdep->arg4,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_fs_quota_stat))
-            return -1;
-          break;
-        }
+	{
+	case RECORD_Q_GETFMT:
+	  /* __u32 */
+	  if (record_mem_at_reg (regcache, tdep->arg4, 4))
+	    return -1;
+	  break;
+	case RECORD_Q_GETINFO:
+	  if (record_mem_at_reg (regcache, tdep->arg4,
+				 tdep->size_mem_dqinfo))
+	    return -1;
+	  break;
+	case RECORD_Q_GETQUOTA:
+	  if (record_mem_at_reg (regcache, tdep->arg4,
+				 tdep->size_if_dqblk))
+	    return -1;
+	  break;
+	case RECORD_Q_XGETQSTAT:
+	case RECORD_Q_XGETQUOTA:
+	  if (record_mem_at_reg (regcache, tdep->arg4,
+				 tdep->size_fs_quota_stat))
+	    return -1;
+	  break;
+	}
       break;
 
     case gdb_sys_getpgid:
@@ -1321,13 +1233,11 @@ Do you want to stop the program?"),
     case gdb_sys_sysfs:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest == 2)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
+	{
 	  /*XXX the size of memory is not very clear.  */
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 10))
-            return -1;
-        }
+	  if (record_mem_at_reg (regcache, tdep->arg3, 10))
+	    return -1;
+	}
       break;
 
     case gdb_sys_personality:
@@ -1337,42 +1247,23 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_llseek:
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_loff_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
+	return -1;
       break;
 
     case gdb_sys_getdents:
-      {
-        ULONGEST count;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                    &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
-        if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					   tdep->size_dirent * count))
-          return -1;
-      }
+    case gdb_sys_getdents64:
+      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+      if (record_mem_at_reg (regcache, tdep->arg2, tmpulongest))
+	return -1;
       break;
 
     case gdb_sys_select:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timeval))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg5, tdep->size_timeval))
+	return -1;
       break;
 
     case gdb_sys_flock:
@@ -1381,40 +1272,40 @@ Do you want to stop the program?"),
 
     case gdb_sys_readv:
       {
-        ULONGEST vec, vlen;
+	ULONGEST vec, vlen;
 
-        regcache_raw_read_unsigned (regcache, tdep->arg2, &vec);
-        if (vec)
-          {
-            gdb_byte *iov = alloca (tdep->size_iovec);
-
-            regcache_raw_read_unsigned (regcache, tdep->arg3, &vlen);
-            for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
-              {
-                if (target_read_memory ((CORE_ADDR) vec, iov,
-                                        tdep->size_iovec))
-                  {
-                    if (record_debug)
-                      fprintf_unfiltered (gdb_stdlog,
-                                          "Process record: error reading "
-                                          "memory at addr = 0x%s len = %d.\n",
-                                          OUTPUT_REG (vec, tdep->arg2),
-                                          tdep->size_iovec);
-                    return -1;
-                  }
-                tmpaddr
-                  = (CORE_ADDR) extract_unsigned_integer (iov,
-                                                          tdep->size_pointer,
-                                                          byte_order);
-                tmpint
-                  = (int) extract_unsigned_integer (iov + tdep->size_pointer,
-                                                    tdep->size_size_t,
-                                                    byte_order);
-                if (record_full_arch_list_add_mem (tmpaddr, tmpint))
-                  return -1;
-                vec += tdep->size_iovec;
-              }
-          }
+	regcache_raw_read_unsigned (regcache, tdep->arg2, &vec);
+	if (vec)
+	  {
+	    gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
+
+	    regcache_raw_read_unsigned (regcache, tdep->arg3, &vlen);
+	    for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
+	      {
+		if (target_read_memory ((CORE_ADDR) vec, iov,
+					tdep->size_iovec))
+		  {
+		    if (record_debug)
+		      fprintf_unfiltered (gdb_stdlog,
+					  "Process record: error reading "
+					  "memory at addr = 0x%s len = %d.\n",
+					  OUTPUT_REG (vec, tdep->arg2),
+					  tdep->size_iovec);
+		    return -1;
+		  }
+		tmpaddr
+		  = (CORE_ADDR) extract_unsigned_integer (iov,
+							  tdep->size_pointer,
+							  byte_order);
+		tmpint
+		  = (int) extract_unsigned_integer (iov + tdep->size_pointer,
+						    tdep->size_size_t,
+						    byte_order);
+		if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+		  return -1;
+		vec += tdep->size_iovec;
+	      }
+	  }
       }
       break;
 
@@ -1430,10 +1321,8 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_sched_getparam:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_sched_setscheduler:
@@ -1445,10 +1334,8 @@ Do you want to stop the program?"),
 
     case gdb_sys_sched_rr_get_interval:
     case gdb_sys_nanosleep:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_mremap:
@@ -1456,18 +1343,12 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_getresuid16:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_uid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_uid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_uid_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_uid_t)
+	  || record_mem_at_reg (regcache, tdep->arg2,
+				tdep->size_old_uid_t)
+	  || record_mem_at_reg (regcache, tdep->arg3,
+				tdep->size_old_uid_t))
+	return -1;
       break;
 
     case gdb_sys_vm86:
@@ -1477,107 +1358,88 @@ Do you want to stop the program?"),
     case gdb_sys_poll:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST nfds;
+	{
+	  ULONGEST nfds;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     tdep->size_pollfd * nfds))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_nfsservctl:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest == 7 || tmpulongest == 8)
-        {
-          int rsize;
+	{
+	  int rsize;
 
-          if (tmpulongest == 7)
-            rsize = tdep->size_NFS_FHSIZE;
-          else
-            rsize = tdep->size_knfsd_fh;
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, rsize))
-            return -1;
-        }
+	  if (tmpulongest == 7)
+	    rsize = tdep->size_NFS_FHSIZE;
+	  else
+	    rsize = tdep->size_knfsd_fh;
+	  if (record_mem_at_reg (regcache, tdep->arg3, rsize))
+	    return -1;
+	}
       break;
 
     case gdb_sys_setresgid16:
       break;
 
     case gdb_sys_getresgid16:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_gid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_gid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_old_gid_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_gid_t)
+	  || record_mem_at_reg (regcache, tdep->arg2,
+				tdep->size_old_gid_t)
+	  || record_mem_at_reg (regcache, tdep->arg3,
+				tdep->size_old_gid_t))
+	return -1;
       break;
 
     case gdb_sys_prctl:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       switch (tmpulongest)
-        {
-        case 2:
-          regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_int))
-            return -1;
-          break;
-        case 16:
-          regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_TASK_COMM_LEN))
-            return -1;
-          break;
-        }
+	{
+	case 2:
+	  if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
+	    return -1;
+	  break;
+	case 16:
+	  if (record_mem_at_reg (regcache, tdep->arg2,
+				 tdep->size_TASK_COMM_LEN))
+	    return -1;
+	  break;
+	}
       break;
 
     case gdb_sys_rt_sigreturn:
       break;
 
     case gdb_sys_rt_sigaction:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_sigaction))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigaction))
+	return -1;
       break;
 
     case gdb_sys_rt_sigprocmask:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_sigset_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigset_t))
+	return -1;
       break;
 
     case gdb_sys_rt_sigpending:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST sigsetsize;
+	{
+	  ULONGEST sigsetsize;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) sigsetsize))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_rt_sigtimedwait:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_siginfo_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_siginfo_t))
+	return -1;
       break;
 
     case gdb_sys_rt_sigqueueinfo:
@@ -1587,14 +1449,14 @@ Do you want to stop the program?"),
     case gdb_sys_pread64:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST count;
+	{
+	  ULONGEST count;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) count))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_pwrite64:
@@ -1604,38 +1466,33 @@ Do you want to stop the program?"),
     case gdb_sys_getcwd:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST size;
+	{
+	  ULONGEST size;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) size))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_capget:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_cap_user_data_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2,
+			     tdep->size_cap_user_data_t))
+	return -1;
       break;
 
     case gdb_sys_capset:
       break;
 
     case gdb_sys_sigaltstack:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_stack_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stack_t))
+	return -1;
       break;
 
     case gdb_sys_sendfile:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_off_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_off_t))
+	return -1;
       break;
 
     case gdb_sys_ni_syscall188:
@@ -1644,10 +1501,8 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_getrlimit:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_rlimit))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
+	return -1;
       break;
 
     case gdb_sys_mmap2:
@@ -1660,10 +1515,8 @@ Do you want to stop the program?"),
     case gdb_sys_stat64:
     case gdb_sys_lstat64:
     case gdb_sys_fstat64:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_stat64))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat64))
+	return -1;
       break;
 
     case gdb_sys_lchown:
@@ -1678,15 +1531,15 @@ Do you want to stop the program?"),
     case gdb_sys_getgroups:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST gidsetsize;
+	{
+	  ULONGEST gidsetsize;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg1,
-                                      &gidsetsize);
-          tmpint = tdep->size_gid_t * (int) gidsetsize;
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
-            return -1;
-        }
+	  regcache_raw_read_unsigned (regcache, tdep->arg1,
+				      &gidsetsize);
+	  tmpint = tdep->size_gid_t * (int) gidsetsize;
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+	    return -1;
+	}
       break;
 
     case gdb_sys_setgroups:
@@ -1695,36 +1548,20 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_getresuid:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_uid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_uid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_uid_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_uid_t)
+	  || record_mem_at_reg (regcache, tdep->arg2, tdep->size_uid_t)
+	  || record_mem_at_reg (regcache, tdep->arg3, tdep->size_uid_t))
+	return -1;
       break;
 
     case gdb_sys_setresgid:
       break;
 
     case gdb_sys_getresgid:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_gid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_gid_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_gid_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_gid_t)
+	  || record_mem_at_reg (regcache, tdep->arg2, tdep->size_gid_t)
+	  || record_mem_at_reg (regcache, tdep->arg3, tdep->size_gid_t))
+	return -1;
       break;
 
     case gdb_sys_chown:
@@ -1736,43 +1573,26 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_mincore:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_PAGE_SIZE))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_PAGE_SIZE))
+	return -1;
       break;
 
     case gdb_sys_madvise:
       break;
 
-    case gdb_sys_getdents64:
-      {
-        ULONGEST count;
-
-        regcache_raw_read_unsigned (regcache, tdep->arg2,
-                                    &tmpulongest);
-        regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
-        if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					   tdep->size_dirent64 * count))
-          return -1;
-      }
-      break;
-
     case gdb_sys_fcntl64:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest == tdep->fcntl_F_GETLK64)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					     tdep->size_flock64))
-            return -1;
-        }
+	{
+	  if (record_mem_at_reg (regcache, tdep->arg3,
+				 tdep->size_flock64))
+	    return -1;
+	}
       else if (tmpulongest != tdep->fcntl_F_SETLK64
-               && tmpulongest != tdep->fcntl_F_SETLKW64)
-        {
-          goto sys_fcntl;
-        }
+	       && tmpulongest != tdep->fcntl_F_SETLKW64)
+	{
+	  goto sys_fcntl;
+	}
       break;
 
     case gdb_sys_ni_syscall222:
@@ -1789,14 +1609,14 @@ Do you want to stop the program?"),
     case gdb_sys_fgetxattr:
       regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST size;
+	{
+	  ULONGEST size;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) size))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_listxattr:
@@ -1804,14 +1624,14 @@ Do you want to stop the program?"),
     case gdb_sys_flistxattr:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST size;
+	{
+	  ULONGEST size;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) size))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_removexattr:
@@ -1821,10 +1641,8 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_sendfile64:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_loff_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
+	return -1;
       break;
 
     case gdb_sys_futex:
@@ -1834,35 +1652,29 @@ Do you want to stop the program?"),
     case gdb_sys_sched_getaffinity:
       regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST len;
+	{
+	  ULONGEST len;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) len))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_set_thread_area:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_get_thread_area:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_user_desc))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_user_desc))
+	return -1;
       break;
 
     case gdb_sys_io_setup:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_long))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_long))
+	return -1;
       break;
 
     case gdb_sys_io_destroy:
@@ -1871,54 +1683,52 @@ Do you want to stop the program?"),
     case gdb_sys_io_getevents:
       regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST nr;
+	{
+	  ULONGEST nr;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     nr * tdep->size_io_event))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_io_submit:
       regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST nr, i;
-          gdb_byte *iocbp;
-
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &nr);
-          iocbp = alloca (nr * tdep->size_pointer);
-          if (target_read_memory ((CORE_ADDR) tmpulongest, iocbp,
-                                  nr * tdep->size_pointer))
-            {
-              if (record_debug)
-                fprintf_unfiltered (gdb_stdlog,
-                                    "Process record: error reading memory "
-                                    "at addr = 0x%s len = %u.\n",
-                                    OUTPUT_REG (tmpulongest, tdep->arg2),
-                                    (int) (nr * tdep->size_pointer));
-              return -1;
-            }
-          for (i = 0; i < nr; i++)
-            {
-              tmpaddr
-                = (CORE_ADDR) extract_unsigned_integer (iocbp,
-                                                        tdep->size_pointer,
-                                                        byte_order);
-              if (record_full_arch_list_add_mem (tmpaddr, tdep->size_iocb))
-                return -1;
-              iocbp += tdep->size_pointer;
-            }
-        }
+	{
+	  ULONGEST nr, i;
+	  gdb_byte *iocbp;
+
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &nr);
+	  iocbp = (gdb_byte *) alloca (nr * tdep->size_pointer);
+	  if (target_read_memory ((CORE_ADDR) tmpulongest, iocbp,
+				  nr * tdep->size_pointer))
+	    {
+	      if (record_debug)
+		fprintf_unfiltered (gdb_stdlog,
+				    "Process record: error reading memory "
+				    "at addr = 0x%s len = %u.\n",
+				    OUTPUT_REG (tmpulongest, tdep->arg2),
+				    (int) (nr * tdep->size_pointer));
+	      return -1;
+	    }
+	  for (i = 0; i < nr; i++)
+	    {
+	      tmpaddr
+		= (CORE_ADDR) extract_unsigned_integer (iocbp,
+							tdep->size_pointer,
+							byte_order);
+	      if (record_full_arch_list_add_mem (tmpaddr, tdep->size_iocb))
+		return -1;
+	      iocbp += tdep->size_pointer;
+	    }
+	}
       break;
 
     case gdb_sys_io_cancel:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_io_event))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_io_event))
+	return -1;
       break;
 
     case gdb_sys_fadvise64:
@@ -1926,30 +1736,23 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_exit_group:
-      {
-        int q;
-
-        target_terminal_ours ();
-        q = yquery (_("The next instruction is syscall exit_group.  "
-                      "It will make the program exit.  "
-                      "Do you want to stop the program?"));
-        target_terminal_inferior ();
-        if (q)
-          return 1;
-      }
+      if (yquery (_("The next instruction is syscall exit_group.  "
+		    "It will make the program exit.  "
+		    "Do you want to stop the program?")))
+	return 1;
       break;
 
     case gdb_sys_lookup_dcookie:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST len;
+	{
+	  ULONGEST len;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) len))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_epoll_create:
@@ -1959,15 +1762,15 @@ Do you want to stop the program?"),
     case gdb_sys_epoll_wait:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST maxevents;
+	{
+	  ULONGEST maxevents;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (maxevents
 					      * tdep->size_epoll_event)))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_remap_file_pages:
@@ -1975,24 +1778,18 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_timer_create:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_timer_settime:
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_itimerspec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_itimerspec))
+	return -1;
       break;
 
     case gdb_sys_timer_gettime:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_itimerspec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerspec))
+	return -1;
       break;
 
     case gdb_sys_timer_getoverrun:
@@ -2001,32 +1798,24 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_clock_gettime:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_clock_getres:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_clock_nanosleep:
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_statfs64:
     case gdb_sys_fstatfs64:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_statfs64))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_statfs64))
+	return -1;
       break;
 
     case gdb_sys_tgkill:
@@ -2037,20 +1826,18 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_get_mempolicy:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
+	return -1;
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST maxnode;
+	{
+	  ULONGEST maxnode;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     maxnode * tdep->size_long))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_set_mempolicy:
@@ -2062,42 +1849,33 @@ Do you want to stop the program?"),
     case gdb_sys_mq_timedreceive:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST msg_len;
+	{
+	  ULONGEST msg_len;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) msg_len))
-            return -1;
-        }
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+	    return -1;
+	}
+      if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_mq_notify:
       break;
 
     case gdb_sys_mq_getsetattr:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_mq_attr))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_mq_attr))
+	return -1;
       break;
 
     case gdb_sys_kexec_load:
       break;
 
     case gdb_sys_waitid:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_siginfo))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_rusage))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_siginfo_t)
+	  || record_mem_at_reg (regcache, tdep->arg5, tdep->size_rusage))
+	return -1;
       break;
 
     case gdb_sys_ni_syscall285:
@@ -2108,19 +1886,19 @@ Do you want to stop the program?"),
     case gdb_sys_keyctl:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest == 6 || tmpulongest == 11)
-        {
-          regcache_raw_read_unsigned (regcache, tdep->arg3,
-                                      &tmpulongest);
-          if (tmpulongest)
-            {
-              ULONGEST buflen;
+	{
+	  regcache_raw_read_unsigned (regcache, tdep->arg3,
+				      &tmpulongest);
+	  if (tmpulongest)
+	    {
+	      ULONGEST buflen;
 
-              regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
-              if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	      regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
+	      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 						 (int) buflen))
-                return -1;
-            }
-        }
+		return -1;
+	    }
+	}
       break;
 
     case gdb_sys_ioprio_set:
@@ -2137,10 +1915,8 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_fstatat64:
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_stat64))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_stat64))
+	return -1;
       break;
 
     case gdb_sys_unlinkat:
@@ -2152,14 +1928,14 @@ Do you want to stop the program?"),
     case gdb_sys_readlinkat:
       regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST bufsiz;
+	{
+	  ULONGEST bufsiz;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     (int) bufsiz))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_fchmodat:
@@ -2167,39 +1943,26 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_pselect6:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_fd_set))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
+	  || record_mem_at_reg (regcache, tdep->arg5, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_ppoll:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST nfds;
+	{
+	  ULONGEST nfds;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     tdep->size_pollfd * nfds))
-            return -1;
-        }
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_timespec))
-        return -1;
+	    return -1;
+	}
+      if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_timespec))
+	return -1;
       break;
 
     case gdb_sys_unshare:
@@ -2207,25 +1970,15 @@ Do you want to stop the program?"),
       break;
 
     case gdb_sys_get_robust_list:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+	  || record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
+	return -1;
       break;
 
     case gdb_sys_splice:
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_loff_t))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_loff_t))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_loff_t)
+	  || record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
+	return -1;
       break;
 
     case gdb_sys_sync_file_range:
@@ -2236,47 +1989,49 @@ Do you want to stop the program?"),
     case gdb_sys_move_pages:
       regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST nr_pages;
+	{
+	  ULONGEST nr_pages;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+	  regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					     nr_pages * tdep->size_int))
-            return -1;
-        }
+	    return -1;
+	}
       break;
 
     case gdb_sys_getcpu:
-      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_int))
-        return -1;
-      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
-      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-					 tdep->size_ulong * 2))
-        return -1;
+      if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int)
+	  || record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+	  || record_mem_at_reg (regcache, tdep->arg3,
+				tdep->size_ulong * 2))
+	return -1;
       break;
 
     case gdb_sys_epoll_pwait:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (tmpulongest)
-        {
-          ULONGEST maxevents;
+	{
+	  ULONGEST maxevents;
+
+	  regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
+	  tmpint = (int) maxevents * tdep->size_epoll_event;
+	  if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+	    return -1;
+	}
+      break;
+
+    case gdb_sys_fallocate:
+    case gdb_sys_eventfd2:
+    case gdb_sys_epoll_create1:
+    case gdb_sys_dup3:
+      break;
 
-          regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
-          tmpint = (int) maxevents * tdep->size_epoll_event;
-          if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
-            return -1;
-        }
+    case gdb_sys_inotify_init1:
       break;
 
     default:
       printf_unfiltered (_("Process record and replay target doesn't "
-                           "support syscall number %d\n"), syscall);
+			   "support syscall number %d\n"), syscall);
       return -1;
       break;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-record.h ./gdb/linux-record.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-record.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-record.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target code for GNU/Linux.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,8 +39,7 @@ struct linux_record_tdep
   int size_old_gid_t;
   int size_old_uid_t;
   int size_fd_set;
-  int size_dirent;
-  int size_dirent64;
+  int size_old_dirent;
   int size_statfs;
   int size_statfs64;
   int size_sockaddr;
@@ -81,7 +80,6 @@ struct linux_record_tdep
   int size_epoll_event;
   int size_itimerspec;
   int size_mq_attr;
-  int size_siginfo;
   int size_termios;
   int size_termios2;
   int size_pid_t;
@@ -91,6 +89,7 @@ struct linux_record_tdep
   int size_hayes_esp_config;
   int size_size_t;
   int size_iovec;
+  int size_time_t;
 
   /* The values of the second argument of system call "sys_ioctl".  */
   int ioctl_TCGETS;
@@ -182,6 +181,9 @@ struct linux_record_tdep
    each must provide a mapping from their set to this one.  */
 
 enum gdb_syscall {
+  /* An unknown GDB syscall, not a real syscall.  */
+  gdb_sys_no_syscall = -1,
+
   gdb_sys_restart_syscall = 0,
   gdb_sys_exit = 1,
   gdb_sys_fork = 2,
@@ -502,6 +504,12 @@ enum gdb_syscall {
   gdb_sys_move_pages = 317,
   gdb_sys_getcpu = 318,
   gdb_sys_epoll_pwait = 319,
+  gdb_sys_fallocate = 324,
+  gdb_sys_eventfd2 = 328,
+  gdb_sys_epoll_create1 = 329,
+  gdb_sys_dup3 = 330,
+  gdb_sys_pipe2 = 331,
+  gdb_sys_inotify_init1 = 332,
   gdb_sys_socket = 500,
   gdb_sys_connect = 501,
   gdb_sys_accept = 502,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-tdep.c ./gdb/linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux, architecture independent.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,6 +37,7 @@
 #include "infcall.h"
 #include "gdbcmd.h"
 #include "gdb_regex.h"
+#include "common/enum-flags.h"
 
 #include <ctype.h>
 
@@ -46,7 +47,7 @@
    Documentation/filesystems/proc.txt, inside the Linux kernel
    tree.  */
 
-enum filterflags
+enum filter_flag
   {
     COREFILTER_ANON_PRIVATE = 1 << 0,
     COREFILTER_ANON_SHARED = 1 << 1,
@@ -56,6 +57,7 @@ enum filterflags
     COREFILTER_HUGETLB_PRIVATE = 1 << 5,
     COREFILTER_HUGETLB_SHARED = 1 << 6,
   };
+DEF_ENUM_FLAGS_TYPE (enum filter_flag, filter_flags);
 
 /* This struct is used to map flags found in the "VmFlags:" field (in
    the /proc/<PID>/smaps file).  */
@@ -171,7 +173,8 @@ init_linux_gdbarch_data (struct gdbarch 
 static struct linux_gdbarch_data *
 get_linux_gdbarch_data (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, linux_gdbarch_data_handle);
+  return ((struct linux_gdbarch_data *)
+	  gdbarch_data (gdbarch, linux_gdbarch_data_handle));
 }
 
 /* Per-inferior data key.  */
@@ -203,7 +206,7 @@ invalidate_linux_cache_inf (struct infer
 {
   struct linux_info *info;
 
-  info = inferior_data (inf, linux_inferior_data);
+  info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
   if (info != NULL)
     {
       xfree (info);
@@ -230,7 +233,7 @@ get_linux_inferior_data (void)
   struct linux_info *info;
   struct inferior *inf = current_inferior ();
 
-  info = inferior_data (inf, linux_inferior_data);
+  info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
   if (info == NULL)
     {
       info = XCNEW (struct linux_info);
@@ -240,14 +243,14 @@ get_linux_inferior_data (void)
   return info;
 }
 
-/* This function is suitable for architectures that don't
-   extend/override the standard siginfo structure.  */
+/* See linux-tdep.h.  */
 
-static struct type *
-linux_get_siginfo_type (struct gdbarch *gdbarch)
+struct type *
+linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
+				    linux_siginfo_extra_fields extra_fields)
 {
   struct linux_gdbarch_data *linux_gdbarch_data;
-  struct type *int_type, *uint_type, *long_type, *void_ptr_type;
+  struct type *int_type, *uint_type, *long_type, *void_ptr_type, *short_type;
   struct type *uid_type, *pid_type;
   struct type *sigval_type, *clock_type;
   struct type *siginfo_type, *sifields_type;
@@ -263,6 +266,8 @@ linux_get_siginfo_type (struct gdbarch *
 				 1, "unsigned int");
   long_type = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
 				 0, "long");
+  short_type = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
+				 0, "short");
   void_ptr_type = lookup_pointer_type (builtin_type (gdbarch)->builtin_void);
 
   /* sival_t */
@@ -338,6 +343,18 @@ linux_get_siginfo_type (struct gdbarch *
   /* _sigfault */
   type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
   append_composite_type_field (type, "si_addr", void_ptr_type);
+
+  /* Additional bound fields for _sigfault in case they were requested.  */
+  if ((extra_fields & LINUX_SIGINFO_FIELD_ADDR_BND) != 0)
+    {
+      struct type *sigfault_bnd_fields;
+
+      append_composite_type_field (type, "_addr_lsb", short_type);
+      sigfault_bnd_fields = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
+      append_composite_type_field (sigfault_bnd_fields, "_lower", void_ptr_type);
+      append_composite_type_field (sigfault_bnd_fields, "_upper", void_ptr_type);
+      append_composite_type_field (type, "_addr_bnd", sigfault_bnd_fields);
+    }
   append_composite_type_field (sifields_type, "_sigfault", type);
 
   /* _sigpoll */
@@ -361,6 +378,15 @@ linux_get_siginfo_type (struct gdbarch *
   return siginfo_type;
 }
 
+/* This function is suitable for architectures that don't
+   extend/override the standard siginfo structure.  */
+
+static struct type *
+linux_get_siginfo_type (struct gdbarch *gdbarch)
+{
+  return linux_get_siginfo_type_with_fields (gdbarch, 0);
+}
+
 /* Return true if the target is running on uClinux instead of normal
    Linux kernel.  */
 
@@ -598,7 +624,7 @@ mapping_is_anonymous_p (const char *file
      This should work OK enough, however.  */
 
 static int
-dump_mapping_p (enum filterflags filterflags, const struct smaps_vmflags *v,
+dump_mapping_p (filter_flags filterflags, const struct smaps_vmflags *v,
 		int maybe_private_p, int mapping_anon_p, int mapping_file_p,
 		const char *filename)
 {
@@ -997,7 +1023,7 @@ linux_core_info_proc_mappings (struct gd
   if (note_size < 2 * addr_size)
     error (_("malformed core note - too short for header"));
 
-  contents = xmalloc (note_size);
+  contents = (unsigned char *) xmalloc (note_size);
   cleanup = make_cleanup (xfree, contents);
   if (!bfd_get_section_contents (core_bfd, section, contents, 0, note_size))
     error (_("could not get core note contents"));
@@ -1119,10 +1145,10 @@ linux_find_memory_regions_full (struct g
   /* Default dump behavior of coredump_filter (0x33), according to
      Documentation/filesystems/proc.txt from the Linux kernel
      tree.  */
-  enum filterflags filterflags = (COREFILTER_ANON_PRIVATE
-				  | COREFILTER_ANON_SHARED
-				  | COREFILTER_ELF_HEADERS
-				  | COREFILTER_HUGETLB_PRIVATE);
+  filter_flags filterflags = (COREFILTER_ANON_PRIVATE
+			      | COREFILTER_ANON_SHARED
+			      | COREFILTER_ELF_HEADERS
+			      | COREFILTER_HUGETLB_PRIVATE);
 
   /* We need to know the real target PID to access /proc.  */
   if (current_inferior ()->fake_pid_p)
@@ -1138,7 +1164,10 @@ linux_find_memory_regions_full (struct g
 							coredumpfilter_name);
       if (coredumpfilterdata != NULL)
 	{
-	  sscanf (coredumpfilterdata, "%x", &filterflags);
+	  unsigned int flags;
+
+	  sscanf (coredumpfilterdata, "%x", &flags);
+	  filterflags = (enum filter_flag) flags;
 	  xfree (coredumpfilterdata);
 	}
     }
@@ -1306,7 +1335,8 @@ linux_find_memory_regions_thunk (ULONGES
 				 int read, int write, int exec, int modified,
 				 const char *filename, void *arg)
 {
-  struct linux_find_memory_regions_data *data = arg;
+  struct linux_find_memory_regions_data *data
+    = (struct linux_find_memory_regions_data *) arg;
 
   return data->func (vaddr, size, read, write, exec, modified, data->obfd);
 }
@@ -1340,18 +1370,6 @@ find_signalled_thread (struct thread_inf
   return 0;
 }
 
-static enum gdb_signal
-find_stop_signal (void)
-{
-  struct thread_info *info =
-    iterate_over_threads (find_signalled_thread, NULL);
-
-  if (info)
-    return info->suspend.stop_signal;
-  else
-    return GDB_SIGNAL_0;
-}
-
 /* Generate corefile notes for SPU contexts.  */
 
 static char *
@@ -1454,7 +1472,8 @@ linux_make_mappings_callback (ULONGEST v
 			      int read, int write, int exec, int modified,
 			      const char *filename, void *data)
 {
-  struct linux_make_mappings_data *map_data = data;
+  struct linux_make_mappings_data *map_data
+    = (struct linux_make_mappings_data *) data;
   gdb_byte buf[sizeof (ULONGEST)];
 
   if (*filename == '\0' || inode == 0)
@@ -1555,14 +1574,15 @@ linux_collect_regset_section_cb (const c
 				 const char *human_name, void *cb_data)
 {
   char *buf;
-  struct linux_collect_regset_section_cb_data *data = cb_data;
+  struct linux_collect_regset_section_cb_data *data
+    = (struct linux_collect_regset_section_cb_data *) cb_data;
 
   if (data->abort_iteration)
     return;
 
   gdb_assert (regset && regset->collect_regset);
 
-  buf = xmalloc (size);
+  buf = (char *) xmalloc (size);
   regset->collect_regset (regset, data->regcache, -1, buf, size);
 
   /* PRSTATUS still needs to be treated specially.  */
@@ -1630,7 +1650,7 @@ linux_get_siginfo_data (struct gdbarch *
   
   siginfo_type = gdbarch_get_siginfo_type (gdbarch);
 
-  buf = xmalloc (TYPE_LENGTH (siginfo_type));
+  buf = (gdb_byte *) xmalloc (TYPE_LENGTH (siginfo_type));
   cleanups = make_cleanup (xfree, buf);
 
   bytes_read = target_read (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
@@ -1652,61 +1672,49 @@ linux_get_siginfo_data (struct gdbarch *
 struct linux_corefile_thread_data
 {
   struct gdbarch *gdbarch;
-  int pid;
   bfd *obfd;
   char *note_data;
   int *note_size;
   enum gdb_signal stop_signal;
 };
 
-/* Called by gdbthread.c once per thread.  Records the thread's
-   register state for the corefile note section.  */
+/* Records the thread's register state for the corefile note
+   section.  */
 
-static int
-linux_corefile_thread_callback (struct thread_info *info, void *data)
+static void
+linux_corefile_thread (struct thread_info *info,
+		       struct linux_corefile_thread_data *args)
 {
-  struct linux_corefile_thread_data *args = data;
-
-  /* It can be current thread
-     which cannot be removed by update_thread_list.  */
-  if (info->state == THREAD_EXITED)
-    return 0;
-
-  if (ptid_get_pid (info->ptid) == args->pid)
-    {
-      struct cleanup *old_chain;
-      struct regcache *regcache;
-      gdb_byte *siginfo_data;
-      LONGEST siginfo_size = 0;
-
-      regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
-
-      old_chain = save_inferior_ptid ();
-      inferior_ptid = info->ptid;
-      target_fetch_registers (regcache, -1);
-      siginfo_data = linux_get_siginfo_data (args->gdbarch, &siginfo_size);
-      do_cleanups (old_chain);
-
-      old_chain = make_cleanup (xfree, siginfo_data);
-
-      args->note_data = linux_collect_thread_registers
-	(regcache, info->ptid, args->obfd, args->note_data,
-	 args->note_size, args->stop_signal);
+  struct cleanup *old_chain;
+  struct regcache *regcache;
+  gdb_byte *siginfo_data;
+  LONGEST siginfo_size = 0;
+
+  regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
+
+  old_chain = save_inferior_ptid ();
+  inferior_ptid = info->ptid;
+  target_fetch_registers (regcache, -1);
+  siginfo_data = linux_get_siginfo_data (args->gdbarch, &siginfo_size);
+  do_cleanups (old_chain);
+
+  old_chain = make_cleanup (xfree, siginfo_data);
+
+  args->note_data = linux_collect_thread_registers
+    (regcache, info->ptid, args->obfd, args->note_data,
+     args->note_size, args->stop_signal);
+
+  /* Don't return anything if we got no register information above,
+     such a core file is useless.  */
+  if (args->note_data != NULL)
+    if (siginfo_data != NULL)
+      args->note_data = elfcore_write_note (args->obfd,
+					    args->note_data,
+					    args->note_size,
+					    "CORE", NT_SIGINFO,
+					    siginfo_data, siginfo_size);
 
-      /* Don't return anything if we got no register information above,
-         such a core file is useless.  */
-      if (args->note_data != NULL)
-	if (siginfo_data != NULL)
-	  args->note_data = elfcore_write_note (args->obfd,
-						args->note_data,
-						args->note_size,
-						"CORE", NT_SIGINFO,
-						siginfo_data, siginfo_size);
-
-      do_cleanups (old_chain);
-    }
-
-  return !args->note_data;
+  do_cleanups (old_chain);
 }
 
 /* Fill the PRPSINFO structure with information about the process being
@@ -1749,7 +1757,6 @@ linux_fill_prpsinfo (struct elf_internal
   int n_fields = 0;
   /* Cleanups.  */
   struct cleanup *c;
-  int i;
 
   gdb_assert (p != NULL);
 
@@ -1781,7 +1788,7 @@ linux_fill_prpsinfo (struct elf_internal
 
   psargs = xstrdup (fname);
   if (infargs != NULL)
-    psargs = reconcat (psargs, psargs, " ", infargs, NULL);
+    psargs = reconcat (psargs, psargs, " ", infargs, (char *) NULL);
 
   make_cleanup (xfree, psargs);
 
@@ -1922,6 +1929,7 @@ linux_make_corefile_notes (struct gdbarc
   char *note_data = NULL;
   gdb_byte *auxv;
   int auxv_len;
+  struct thread_info *curr_thr, *signalled_thr, *thr;
 
   if (! gdbarch_iterate_over_regset_sections_p (gdbarch))
     return NULL;
@@ -1958,13 +1966,37 @@ linux_make_corefile_notes (struct gdbarc
     }
   END_CATCH
 
+  /* Like the kernel, prefer dumping the signalled thread first.
+     "First thread" is what tools use to infer the signalled thread.
+     In case there's more than one signalled thread, prefer the
+     current thread, if it is signalled.  */
+  curr_thr = inferior_thread ();
+  if (curr_thr->suspend.stop_signal != GDB_SIGNAL_0)
+    signalled_thr = curr_thr;
+  else
+    {
+      signalled_thr = iterate_over_threads (find_signalled_thread, NULL);
+      if (signalled_thr == NULL)
+	signalled_thr = curr_thr;
+    }
+
   thread_args.gdbarch = gdbarch;
-  thread_args.pid = ptid_get_pid (inferior_ptid);
   thread_args.obfd = obfd;
   thread_args.note_data = note_data;
   thread_args.note_size = note_size;
-  thread_args.stop_signal = find_stop_signal ();
-  iterate_over_threads (linux_corefile_thread_callback, &thread_args);
+  thread_args.stop_signal = signalled_thr->suspend.stop_signal;
+
+  linux_corefile_thread (signalled_thr, &thread_args);
+  ALL_NON_EXITED_THREADS (thr)
+    {
+      if (thr == signalled_thr)
+	continue;
+      if (ptid_get_pid (thr->ptid) != ptid_get_pid (inferior_ptid))
+	continue;
+
+      linux_corefile_thread (thr, &thread_args);
+    }
+
   note_data = thread_args.note_data;
   if (!note_data)
     return NULL;
@@ -2245,39 +2277,95 @@ linux_gdb_signal_to_target (struct gdbar
   return -1;
 }
 
-/* Rummage through mappings to find a mapping's size.  */
-
-static int
-find_mapping_size (CORE_ADDR vaddr, unsigned long size,
-		   int read, int write, int exec, int modified,
-		   void *data)
-{
-  struct mem_range *range = data;
-
-  if (vaddr == range->start)
-    {
-      range->length = size;
-      return 1;
-    }
-  return 0;
-}
-
 /* Helper for linux_vsyscall_range that does the real work of finding
    the vsyscall's address range.  */
 
 static int
 linux_vsyscall_range_raw (struct gdbarch *gdbarch, struct mem_range *range)
 {
+  char filename[100];
+  long pid;
+  char *data;
+
   if (target_auxv_search (&current_target, AT_SYSINFO_EHDR, &range->start) <= 0)
     return 0;
 
-  /* This is installed by linux_init_abi below, so should always be
-     available.  */
-  gdb_assert (gdbarch_find_memory_regions_p (target_gdbarch ()));
+  /* It doesn't make sense to access the host's /proc when debugging a
+     core file.  Instead, look for the PT_LOAD segment that matches
+     the vDSO.  */
+  if (!target_has_execution)
+    {
+      Elf_Internal_Phdr *phdrs;
+      long phdrs_size;
+      int num_phdrs, i;
 
-  range->length = 0;
-  gdbarch_find_memory_regions (gdbarch, find_mapping_size, range);
-  return 1;
+      phdrs_size = bfd_get_elf_phdr_upper_bound (core_bfd);
+      if (phdrs_size == -1)
+	return 0;
+
+      phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size);
+      num_phdrs = bfd_get_elf_phdrs (core_bfd, phdrs);
+      if (num_phdrs == -1)
+	return 0;
+
+      for (i = 0; i < num_phdrs; i++)
+	if (phdrs[i].p_type == PT_LOAD
+	    && phdrs[i].p_vaddr == range->start)
+	  {
+	    range->length = phdrs[i].p_memsz;
+	    return 1;
+	  }
+
+      return 0;
+    }
+
+  /* We need to know the real target PID to access /proc.  */
+  if (current_inferior ()->fake_pid_p)
+    return 0;
+
+  pid = current_inferior ()->pid;
+
+  /* Note that reading /proc/PID/task/PID/maps (1) is much faster than
+     reading /proc/PID/maps (2).  The later identifies thread stacks
+     in the output, which requires scanning every thread in the thread
+     group to check whether a VMA is actually a thread's stack.  With
+     Linux 4.4 on an Intel i7-4810MQ @ 2.80GHz, with an inferior with
+     a few thousand threads, (1) takes a few miliseconds, while (2)
+     takes several seconds.  Also note that "smaps", what we read for
+     determining core dump mappings, is even slower than "maps".  */
+  xsnprintf (filename, sizeof filename, "/proc/%ld/task/%ld/maps", pid, pid);
+  data = target_fileio_read_stralloc (NULL, filename);
+  if (data != NULL)
+    {
+      struct cleanup *cleanup = make_cleanup (xfree, data);
+      char *line;
+      char *saveptr = NULL;
+
+      for (line = strtok_r (data, "\n", &saveptr);
+	   line != NULL;
+	   line = strtok_r (NULL, "\n", &saveptr))
+	{
+	  ULONGEST addr, endaddr;
+	  const char *p = line;
+
+	  addr = strtoulst (p, &p, 16);
+	  if (addr == range->start)
+	    {
+	      if (*p == '-')
+		p++;
+	      endaddr = strtoulst (p, &p, 16);
+	      range->length = endaddr - addr;
+	      do_cleanups (cleanup);
+	      return 1;
+	    }
+	}
+
+      do_cleanups (cleanup);
+    }
+  else
+    warning (_("unable to open /proc file '%s'"), filename);
+
+  return 0;
 }
 
 /* Implementation of the "vsyscall_range" gdbarch hook.  Handles
@@ -2393,7 +2481,8 @@ linux_displaced_step_location (struct gd
      location.  The auxiliary vector gets us the PowerPC-side entry
      point address instead.  */
   if (target_auxv_search (&current_target, AT_ENTRY, &addr) <= 0)
-    error (_("Cannot find AT_ENTRY auxiliary vector entry."));
+    throw_error (NOT_SUPPORTED_ERROR,
+		 _("Cannot find AT_ENTRY auxiliary vector entry."));
 
   /* Make certain that the address points at real code, and not a
      function descriptor.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-tdep.h ./gdb/linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux, architecture independent.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,23 @@
 
 struct regcache;
 
+/* Enum used to define the extra fields of the siginfo type used by an
+   architecture.  */
+enum linux_siginfo_extra_field_values
+{
+  /* Add bound fields into the segmentation fault field.  */
+  LINUX_SIGINFO_FIELD_ADDR_BND = 1
+};
+
+/* Defines a type for the values defined in linux_siginfo_extra_field_values.  */
+DEF_ENUM_FLAGS_TYPE (enum linux_siginfo_extra_field_values,
+		     linux_siginfo_extra_fields);
+
+/* This function is suitable for architectures that
+   extend/override the standard siginfo in a specific way.  */
+struct type *linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
+						 linux_siginfo_extra_fields);
+
 typedef char *(*linux_collect_thread_registers_ftype) (const struct regcache *,
 						       ptid_t,
 						       bfd *, char *, int *,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-thread-db.c ./gdb/linux-thread-db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/linux-thread-db.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/linux-thread-db.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* libthread_db assisted debugging support, generic parts.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,6 +45,7 @@
 #include <signal.h>
 #include <ctype.h>
 #include "nat/linux-namespaces.h"
+#include <algorithm>
 
 /* GNU/Linux libthread_db support.
 
@@ -54,11 +55,12 @@
    created, thread IDs (usually, the result of pthread_self), and
    thread-local variables.
 
-   The libthread_db interface originates on Solaris, where it is
-   both more powerful and more complicated.  This implementation
-   only works for LinuxThreads and NPTL, the two glibc threading
-   libraries.  It assumes that each thread is permanently assigned
-   to a single light-weight process (LWP).
+   The libthread_db interface originates on Solaris, where it is both
+   more powerful and more complicated.  This implementation only works
+   for NPTL, the glibc threading library.  It assumes that each thread
+   is permanently assigned to a single light-weight process (LWP).  At
+   some point it also supported the older LinuxThreads library, but it
+   no longer does.
 
    libthread_db-specific information is stored in the "private" field
    of struct thread_info.  When the field is NULL we do not yet have
@@ -78,16 +80,6 @@ static char *libthread_db_search_path;
    by the "set auto-load libthread-db" command.  */
 static int auto_load_thread_db = 1;
 
-/* Returns true if we need to use thread_db thread create/death event
-   breakpoints to learn about threads.  */
-
-static int
-thread_db_use_events (void)
-{
-  /* Not necessary if the kernel supports clone events.  */
-  return !linux_supports_traceclone ();
-}
-
 /* "show" command for the auto_load_thread_db configuration variable.  */
 
 static void
@@ -161,50 +153,15 @@ struct thread_db_info
      be able to ignore such stale entries.  */
   int need_stale_parent_threads_check;
 
-  /* Location of the thread creation event breakpoint.  The code at
-     this location in the child process will be called by the pthread
-     library whenever a new thread is created.  By setting a special
-     breakpoint at this location, GDB can detect when a new thread is
-     created.  We obtain this location via the td_ta_event_addr
-     call.  */
-  CORE_ADDR td_create_bp_addr;
-
-  /* Location of the thread death event breakpoint.  */
-  CORE_ADDR td_death_bp_addr;
-
   /* Pointers to the libthread_db functions.  */
 
-  td_err_e (*td_init_p) (void);
-
-  td_err_e (*td_ta_new_p) (struct ps_prochandle * ps,
-				td_thragent_t **ta);
-  td_err_e (*td_ta_map_lwp2thr_p) (const td_thragent_t *ta,
-				   lwpid_t lwpid, td_thrhandle_t *th);
-  td_err_e (*td_ta_thr_iter_p) (const td_thragent_t *ta,
-				td_thr_iter_f *callback, void *cbdata_p,
-				td_thr_state_e state, int ti_pri,
-				sigset_t *ti_sigmask_p,
-				unsigned int ti_user_flags);
-  td_err_e (*td_ta_event_addr_p) (const td_thragent_t *ta,
-				  td_event_e event, td_notify_t *ptr);
-  td_err_e (*td_ta_set_event_p) (const td_thragent_t *ta,
-				 td_thr_events_t *event);
-  td_err_e (*td_ta_clear_event_p) (const td_thragent_t *ta,
-				   td_thr_events_t *event);
-  td_err_e (*td_ta_event_getmsg_p) (const td_thragent_t *ta,
-				    td_event_msg_t *msg);
-
-  td_err_e (*td_thr_get_info_p) (const td_thrhandle_t *th,
-				 td_thrinfo_t *infop);
-  td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th,
-				     int event);
-
-  td_err_e (*td_thr_tls_get_addr_p) (const td_thrhandle_t *th,
-				     psaddr_t map_address,
-				     size_t offset, psaddr_t *address);
-  td_err_e (*td_thr_tlsbase_p) (const td_thrhandle_t *th,
-				unsigned long int modid,
-				psaddr_t *base);
+  td_init_ftype *td_init_p;
+  td_ta_new_ftype *td_ta_new_p;
+  td_ta_map_lwp2thr_ftype *td_ta_map_lwp2thr_p;
+  td_ta_thr_iter_ftype *td_ta_thr_iter_p;
+  td_thr_get_info_ftype *td_thr_get_info_p;
+  td_thr_tls_get_addr_ftype *td_thr_tls_get_addr_p;
+  td_thr_tlsbase_ftype *td_thr_tlsbase_p;
 };
 
 /* List of known processes using thread_db, and the required
@@ -216,10 +173,9 @@ static void thread_db_find_new_threads_2
 
 static void check_thread_signals (void);
 
-static void record_thread (struct thread_db_info *info,
-			   struct thread_info *tp,
-			   ptid_t ptid, const td_thrhandle_t *th_p,
-			   const td_thrinfo_t *ti_p);
+static struct thread_info *record_thread
+  (struct thread_db_info *info, struct thread_info *tp,
+   ptid_t ptid, const td_thrhandle_t *th_p, const td_thrinfo_t *ti_p);
 
 /* Add the current inferior to the list of processes using libpthread.
    Return a pointer to the newly allocated object that was added to
@@ -229,9 +185,8 @@ static void record_thread (struct thread
 static struct thread_db_info *
 add_thread_db_info (void *handle)
 {
-  struct thread_db_info *info;
+  struct thread_db_info *info = XCNEW (struct thread_db_info);
 
-  info = xcalloc (1, sizeof (*info));
   info->pid = ptid_get_pid (inferior_ptid);
   info->handle = handle;
 
@@ -293,12 +248,6 @@ delete_thread_db_info (int pid)
   xfree (info);
 }
 
-/* Prototypes for local functions.  */
-static int attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
-			  const td_thrinfo_t *ti_p);
-static void detach_thread (ptid_t ptid);
-
-
 /* Use "struct private_thread_info" to cache thread state.  This is
    a substantial optimization.  */
 
@@ -379,33 +328,10 @@ thread_db_err_str (td_err_e err)
       return buf;
     }
 }
-
-/* Return 1 if any threads have been registered.  There may be none if
-   the threading library is not fully initialized yet.  */
-
-static int
-have_threads_callback (struct thread_info *thread, void *args)
-{
-  int pid = * (int *) args;
-
-  if (ptid_get_pid (thread->ptid) != pid)
-    return 0;
-
-  return thread->priv != NULL;
-}
-
-static int
-have_threads (ptid_t ptid)
-{
-  int pid = ptid_get_pid (ptid);
-
-  return iterate_over_threads (have_threads_callback, &pid) != NULL;
-}
 
-
 /* Fetch the user-level thread id of PTID.  */
 
-static void
+static struct thread_info *
 thread_from_lwp (ptid_t ptid)
 {
   td_thrhandle_t th;
@@ -438,7 +364,7 @@ thread_from_lwp (ptid_t ptid)
 
   /* Fill the cache.  */
   tp = find_thread_ptid (ptid);
-  record_thread (info, tp, ptid, &th, &ti);
+  return record_thread (info, tp, ptid, &th, &ti);
 }
 
 
@@ -447,9 +373,6 @@ thread_from_lwp (ptid_t ptid)
 int
 thread_db_notice_clone (ptid_t parent, ptid_t child)
 {
-  td_thrhandle_t th;
-  td_thrinfo_t ti;
-  td_err_e err;
   struct thread_db_info *info;
 
   info = get_thread_db_info (ptid_get_pid (child));
@@ -475,37 +398,6 @@ verbose_dlsym (void *handle, const char 
   return sym;
 }
 
-static td_err_e
-enable_thread_event (int event, CORE_ADDR *bp)
-{
-  td_notify_t notify;
-  td_err_e err;
-  struct thread_db_info *info;
-
-  info = get_thread_db_info (ptid_get_pid (inferior_ptid));
-
-  /* Access an lwp we know is stopped.  */
-  info->proc_handle.ptid = inferior_ptid;
-
-  /* Get the breakpoint address for thread EVENT.  */
-  err = info->td_ta_event_addr_p (info->thread_agent, event, &notify);
-  if (err != TD_OK)
-    return err;
-
-  /* Set up the breakpoint.  */
-  gdb_assert (exec_bfd);
-  (*bp) = (gdbarch_convert_from_func_ptr_addr
-	   (target_gdbarch (),
-	    /* Do proper sign extension for the target.  */
-	    (bfd_get_sign_extend_vma (exec_bfd) > 0
-	     ? (CORE_ADDR) (intptr_t) notify.u.bptaddr
-	     : (CORE_ADDR) (uintptr_t) notify.u.bptaddr),
-	    &current_target));
-  create_thread_event_breakpoint (target_gdbarch (), *bp);
-
-  return TD_OK;
-}
-
 /* Verify inferior's '\0'-terminated symbol VER_SYMBOL starts with "%d.%d" and
    return 1 if this version is lower (and not equal) to
    VER_MAJOR_MIN.VER_MINOR_MIN.  Return 0 in all other cases.  */
@@ -537,68 +429,6 @@ inferior_has_bug (const char *ver_symbol
   return retval;
 }
 
-static void
-enable_thread_event_reporting (void)
-{
-  td_thr_events_t events;
-  td_err_e err;
-  struct thread_db_info *info;
-
-  info = get_thread_db_info (ptid_get_pid (inferior_ptid));
-
-  /* We cannot use the thread event reporting facility if these
-     functions aren't available.  */
-  if (info->td_ta_event_addr_p == NULL
-      || info->td_ta_set_event_p == NULL
-      || info->td_ta_event_getmsg_p == NULL
-      || info->td_thr_event_enable_p == NULL)
-    return;
-
-  /* Set the process wide mask saying which events we're interested in.  */
-  td_event_emptyset (&events);
-  td_event_addset (&events, TD_CREATE);
-
-  /* There is a bug fixed between linuxthreads 2.1.3 and 2.2 by
-       commit 2e4581e4fba917f1779cd0a010a45698586c190a
-       * manager.c (pthread_exited): Correctly report event as TD_REAP
-       instead of TD_DEATH.  Fix comments.
-     where event reporting facility is broken for TD_DEATH events,
-     so don't enable it if we have glibc but a lower version.  */
-  if (!inferior_has_bug ("__linuxthreads_version", 2, 2))
-    td_event_addset (&events, TD_DEATH);
-
-  err = info->td_ta_set_event_p (info->thread_agent, &events);
-  if (err != TD_OK)
-    {
-      warning (_("Unable to set global thread event mask: %s"),
-	       thread_db_err_str (err));
-      return;
-    }
-
-  /* Delete previous thread event breakpoints, if any.  */
-  remove_thread_event_breakpoints ();
-  info->td_create_bp_addr = 0;
-  info->td_death_bp_addr = 0;
-
-  /* Set up the thread creation event.  */
-  err = enable_thread_event (TD_CREATE, &info->td_create_bp_addr);
-  if (err != TD_OK)
-    {
-      warning (_("Unable to get location for thread creation breakpoint: %s"),
-	       thread_db_err_str (err));
-      return;
-    }
-
-  /* Set up the thread death event.  */
-  err = enable_thread_event (TD_DEATH, &info->td_death_bp_addr);
-  if (err != TD_OK)
-    {
-      warning (_("Unable to get location for thread death breakpoint: %s"),
-	       thread_db_err_str (err));
-      return;
-    }
-}
-
 /* Similar as thread_db_find_new_threads_1, but try to silently ignore errors
    if appropriate.
 
@@ -677,9 +507,20 @@ try_thread_db_load_1 (struct thread_db_i
   /* Initialize pointers to the dynamic library functions we will use.
      Essential functions first.  */
 
-  info->td_init_p = verbose_dlsym (info->handle, "td_init");
-  if (info->td_init_p == NULL)
-    return 0;
+#define TDB_VERBOSE_DLSYM(info, func)			\
+  info->func ## _p = (func ## _ftype *) verbose_dlsym (info->handle, #func)
+
+#define TDB_DLSYM(info, func)			\
+  info->func ## _p = (func ## _ftype *) dlsym (info->handle, #func)
+
+#define CHK(a)								\
+  do									\
+    {									\
+      if ((a) == NULL)							\
+	return 0;							\
+  } while (0)
+
+  CHK (TDB_VERBOSE_DLSYM (info, td_init));
 
   err = info->td_init_p ();
   if (err != TD_OK)
@@ -689,9 +530,7 @@ try_thread_db_load_1 (struct thread_db_i
       return 0;
     }
 
-  info->td_ta_new_p = verbose_dlsym (info->handle, "td_ta_new");
-  if (info->td_ta_new_p == NULL)
-    return 0;
+  CHK (TDB_VERBOSE_DLSYM (info, td_ta_new));
 
   /* Initialize the structure that identifies the child process.  */
   info->proc_handle.ptid = inferior_ptid;
@@ -720,27 +559,13 @@ try_thread_db_load_1 (struct thread_db_i
       return 0;
     }
 
-  info->td_ta_map_lwp2thr_p = verbose_dlsym (info->handle,
-					     "td_ta_map_lwp2thr");
-  if (info->td_ta_map_lwp2thr_p == NULL)
-    return 0;
-
-  info->td_ta_thr_iter_p = verbose_dlsym (info->handle, "td_ta_thr_iter");
-  if (info->td_ta_thr_iter_p == NULL)
-    return 0;
-
-  info->td_thr_get_info_p = verbose_dlsym (info->handle, "td_thr_get_info");
-  if (info->td_thr_get_info_p == NULL)
-    return 0;
+  /* These are essential.  */
+  CHK (TDB_VERBOSE_DLSYM (info, td_ta_map_lwp2thr));
+  CHK (TDB_VERBOSE_DLSYM (info, td_thr_get_info));
 
   /* These are not essential.  */
-  info->td_ta_event_addr_p = dlsym (info->handle, "td_ta_event_addr");
-  info->td_ta_set_event_p = dlsym (info->handle, "td_ta_set_event");
-  info->td_ta_clear_event_p = dlsym (info->handle, "td_ta_clear_event");
-  info->td_ta_event_getmsg_p = dlsym (info->handle, "td_ta_event_getmsg");
-  info->td_thr_event_enable_p = dlsym (info->handle, "td_thr_event_enable");
-  info->td_thr_tls_get_addr_p = dlsym (info->handle, "td_thr_tls_get_addr");
-  info->td_thr_tlsbase_p = dlsym (info->handle, "td_thr_tlsbase");
+  TDB_DLSYM (info, td_thr_tls_get_addr);
+  TDB_DLSYM (info, td_thr_tlsbase);
 
   /* It's best to avoid td_ta_thr_iter if possible.  That walks data
      structures in the inferior's address space that may be corrupted,
@@ -753,6 +578,15 @@ try_thread_db_load_1 (struct thread_db_i
      currently on core targets, as it uses ptrace directly.  */
   if (target_has_execution
       && linux_proc_task_list_dir_exists (ptid_get_pid (inferior_ptid)))
+    info->td_ta_thr_iter_p = NULL;
+  else
+    CHK (TDB_VERBOSE_DLSYM (info, td_ta_thr_iter));
+
+#undef TDB_VERBOSE_DLSYM
+#undef TDB_DLSYM
+#undef CHK
+
+  if (info->td_ta_thr_iter_p == NULL)
     {
       struct lwp_info *lp;
       int pid = ptid_get_pid (inferior_ptid);
@@ -780,7 +614,7 @@ try_thread_db_load_1 (struct thread_db_i
       struct ui_file *file;
       const char *library;
 
-      library = dladdr_to_soname (*info->td_ta_new_p);
+      library = dladdr_to_soname ((const void *) *info->td_ta_new_p);
       if (library == NULL)
 	library = LIBTHREAD_DB_SO;
 
@@ -798,10 +632,6 @@ try_thread_db_load_1 (struct thread_db_i
   if (thread_db_list->next == NULL)
     push_target (&thread_db_ops);
 
-  /* Enable event reporting, but not when debugging a core file.  */
-  if (target_has_execution && thread_db_use_events ())
-    enable_thread_event_reporting ();
-
   return 1;
 }
 
@@ -887,6 +717,7 @@ try_thread_db_load_from_pdir_1 (struct o
   char *path, *cp;
   int result;
   const char *obj_name = objfile_name (obj);
+  int alloc_len;
 
   if (obj_name[0] != '/')
     {
@@ -895,8 +726,10 @@ try_thread_db_load_from_pdir_1 (struct o
       return 0;
     }
 
-  path = xmalloc (strlen (obj_name) + (subdir ? strlen (subdir) + 1 : 0)
-		  + 1 + strlen (LIBTHREAD_DB_SO) + 1);
+  alloc_len = (strlen (obj_name)
+	       + (subdir ? strlen (subdir) + 1 : 0)
+	       + 1 + strlen (LIBTHREAD_DB_SO) + 1);
+  path = (char *) xmalloc (alloc_len);
   cleanup = make_cleanup (xfree, path);
 
   strcpy (path, obj_name);
@@ -973,7 +806,7 @@ try_thread_db_load_from_dir (const char 
   if (!auto_load_thread_db)
     return 0;
 
-  path = xmalloc (dir_len + 1 + strlen (LIBTHREAD_DB_SO) + 1);
+  path = (char *) xmalloc (dir_len + 1 + strlen (LIBTHREAD_DB_SO) + 1);
   cleanup = make_cleanup (xfree, path);
 
   memcpy (path, dir, dir_len);
@@ -1018,7 +851,7 @@ thread_db_load_search (void)
 
 	  if (this_dir[pdir_len] == '/')
 	    {
-	      subdir = xmalloc (strlen (this_dir));
+	      subdir = (char *) xmalloc (strlen (this_dir));
 	      make_cleanup (xfree, subdir);
 	      strcpy (subdir, this_dir + pdir_len + 1);
 	    }
@@ -1107,23 +940,6 @@ thread_db_load (void)
 }
 
 static void
-disable_thread_event_reporting (struct thread_db_info *info)
-{
-  if (info->td_ta_clear_event_p != NULL)
-    {
-      td_thr_events_t events;
-
-      /* Set the process wide mask saying we aren't interested in any
-	 events anymore.  */
-      td_event_fillset (&events);
-      info->td_ta_clear_event_p (info->thread_agent, &events);
-    }
-
-  info->td_create_bp_addr = 0;
-  info->td_death_bp_addr = 0;
-}
-
-static void
 check_thread_signals (void)
 {
   if (!thread_signals)
@@ -1204,7 +1020,8 @@ check_pid_namespace_match (void)
 	{
 	  warning (_ ("Target and debugger are in different PID "
 		      "namespaces; thread lists and other data are "
-		      "likely unreliable"));
+		      "likely unreliable.  "
+		      "Connect to gdbserver inside the container."));
 	}
     }
 }
@@ -1230,98 +1047,26 @@ update_thread_state (struct private_thre
 		 || ti_p->ti_state == TD_THR_ZOMBIE);
 }
 
-/* Attach to a new thread.  This function is called when we receive a
-   TD_CREATE event or when we iterate over all threads and find one
-   that wasn't already in our list.  Returns true on success.  */
-
-static int
-attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
-	       const td_thrinfo_t *ti_p)
-{
-  struct thread_info *tp;
-  struct thread_db_info *info;
-
-  /* If we're being called after a TD_CREATE event, we may already
-     know about this thread.  There are two ways this can happen.  We
-     may have iterated over all threads between the thread creation
-     and the TD_CREATE event, for instance when the user has issued
-     the `info threads' command before the SIGTRAP for hitting the
-     thread creation breakpoint was reported.  Alternatively, the
-     thread may have exited and a new one been created with the same
-     thread ID.  In the first case we don't need to do anything; in
-     the second case we should discard information about the dead
-     thread and attach to the new one.  */
-  tp = find_thread_ptid (ptid);
-  if (tp != NULL)
-    {
-      /* If tp->priv is NULL, then GDB is already attached to this
-	 thread, but we do not know anything about it.  We can learn
-	 about it here.  This can only happen if we have some other
-	 way besides libthread_db to notice new threads (i.e.
-	 PTRACE_EVENT_CLONE); assume the same mechanism notices thread
-	 exit, so this can not be a stale thread recreated with the
-	 same ID.  */
-      if (tp->priv != NULL)
-	{
-	  if (!tp->priv->dying)
-	    return 0;
-
-	  delete_thread (ptid);
-	  tp = NULL;
-	}
-    }
-
-  /* Under GNU/Linux, we have to attach to each and every thread.  */
-  if (target_has_execution
-      && tp == NULL)
-    {
-      int res;
-
-      res = lin_lwp_attach_lwp (ptid_build (ptid_get_pid (ptid),
-					    ti_p->ti_lid, 0));
-      if (res < 0)
-	{
-	  /* Error, stop iterating.  */
-	  return 0;
-	}
-      else if (res > 0)
-	{
-	  /* Pretend this thread doesn't exist yet, and keep
-	     iterating.  */
-	  return 1;
-	}
-
-      /* Otherwise, we sucessfully attached to the thread.  */
-    }
-
-  info = get_thread_db_info (ptid_get_pid (ptid));
-  record_thread (info, tp, ptid, th_p, ti_p);
-  return 1;
-}
-
 /* Record a new thread in GDB's thread list.  Creates the thread's
-   private info.  If TP is NULL, creates a new thread.  Otherwise,
-   uses TP.  */
+   private info.  If TP is NULL or TP is marked as having exited,
+   creates a new thread.  Otherwise, uses TP.  */
 
-static void
+static struct thread_info *
 record_thread (struct thread_db_info *info,
 	       struct thread_info *tp,
 	       ptid_t ptid, const td_thrhandle_t *th_p,
 	       const td_thrinfo_t *ti_p)
 {
-  td_err_e err;
   struct private_thread_info *priv;
-  int new_thread = (tp == NULL);
 
   /* A thread ID of zero may mean the thread library has not
      initialized yet.  Leave private == NULL until the thread library
      has initialized.  */
   if (ti_p->ti_tid == 0)
-    return;
+    return tp;
 
   /* Construct the thread's private data.  */
-  priv = xmalloc (sizeof (struct private_thread_info));
-  memset (priv, 0, sizeof (struct private_thread_info));
+  priv = XCNEW (struct private_thread_info);
 
   priv->th = *th_p;
   priv->tid = ti_p->ti_tid;
@@ -1335,36 +1080,10 @@ record_thread (struct thread_db_info *in
   else
     tp->priv = priv;
 
-  /* Enable thread event reporting for this thread, except when
-     debugging a core file.  */
-  if (target_has_execution && thread_db_use_events () && new_thread)
-    {
-      err = info->td_thr_event_enable_p (th_p, 1);
-      if (err != TD_OK)
-	error (_("Cannot enable thread event reporting for %s: %s"),
-	       target_pid_to_str (ptid), thread_db_err_str (err));
-    }
-
   if (target_has_execution)
     check_thread_signals ();
-}
 
-static void
-detach_thread (ptid_t ptid)
-{
-  struct thread_info *thread_info;
-
-  /* Don't delete the thread now, because it still reports as active
-     until it has executed a few instructions after the event
-     breakpoint - if we deleted it now, "info threads" would cause us
-     to re-attach to it.  Just mark it as having had a TD_DEATH
-     event.  This means that we won't delete it from our thread list
-     until we notice that it's dead (via prune_threads), or until
-     something re-uses its thread ID.  We'll report the thread exit
-     when the underlying LWP dies.  */
-  thread_info = find_thread_ptid (ptid);
-  gdb_assert (thread_info != NULL && thread_info->priv != NULL);
-  thread_info->priv->dying = 1;
+  return tp;
 }
 
 static void
@@ -1376,21 +1095,7 @@ thread_db_detach (struct target_ops *ops
   info = get_thread_db_info (ptid_get_pid (inferior_ptid));
 
   if (info)
-    {
-      if (target_has_execution && thread_db_use_events ())
-	{
-	  disable_thread_event_reporting (info);
-
-	  /* Delete the old thread event breakpoints.  Note that
-	     unlike when mourning, we can remove them here because
-	     there's still a live inferior to poke at.  In any case,
-	     GDB will not try to insert anything in the inferior when
-	     removing a breakpoint.  */
-	  remove_thread_event_breakpoints ();
-	}
-
-      delete_thread_db_info (ptid_get_pid (inferior_ptid));
-    }
+    delete_thread_db_info (ptid_get_pid (inferior_ptid));
 
   target_beneath->to_detach (target_beneath, args, from_tty);
 
@@ -1402,101 +1107,6 @@ thread_db_detach (struct target_ops *ops
     unpush_target (&thread_db_ops);
 }
 
-/* Check if PID is currently stopped at the location of a thread event
-   breakpoint location.  If it is, read the event message and act upon
-   the event.  */
-
-static void
-check_event (ptid_t ptid)
-{
-  struct regcache *regcache = get_thread_regcache (ptid);
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  td_event_msg_t msg;
-  td_thrinfo_t ti;
-  td_err_e err;
-  CORE_ADDR stop_pc;
-  int loop = 0;
-  struct thread_db_info *info;
-
-  info = get_thread_db_info (ptid_get_pid (ptid));
-
-  /* Bail out early if we're not at a thread event breakpoint.  */
-  stop_pc = regcache_read_pc (regcache);
-  if (!target_supports_stopped_by_sw_breakpoint ())
-    stop_pc -= gdbarch_decr_pc_after_break (gdbarch);
-
-  if (stop_pc != info->td_create_bp_addr
-      && stop_pc != info->td_death_bp_addr)
-    return;
-
-  /* Access an lwp we know is stopped.  */
-  info->proc_handle.ptid = ptid;
-
-  /* If we have only looked at the first thread before libpthread was
-     initialized, we may not know its thread ID yet.  Make sure we do
-     before we add another thread to the list.  */
-  if (!have_threads (ptid))
-    thread_db_find_new_threads_1 (ptid);
-
-  /* If we are at a create breakpoint, we do not know what new lwp
-     was created and cannot specifically locate the event message for it.
-     We have to call td_ta_event_getmsg() to get
-     the latest message.  Since we have no way of correlating whether
-     the event message we get back corresponds to our breakpoint, we must
-     loop and read all event messages, processing them appropriately.
-     This guarantees we will process the correct message before continuing
-     from the breakpoint.
-
-     Currently, death events are not enabled.  If they are enabled,
-     the death event can use the td_thr_event_getmsg() interface to
-     get the message specifically for that lwp and avoid looping
-     below.  */
-
-  loop = 1;
-
-  do
-    {
-      err = info->td_ta_event_getmsg_p (info->thread_agent, &msg);
-      if (err != TD_OK)
-	{
-	  if (err == TD_NOMSG)
-	    return;
-
-	  error (_("Cannot get thread event message: %s"),
-		 thread_db_err_str (err));
-	}
-
-      err = info->td_thr_get_info_p (msg.th_p, &ti);
-      if (err != TD_OK)
-	error (_("Cannot get thread info: %s"), thread_db_err_str (err));
-
-      ptid = ptid_build (ptid_get_pid (ptid), ti.ti_lid, 0);
-
-      switch (msg.event)
-	{
-	case TD_CREATE:
-	  /* Call attach_thread whether or not we already know about a
-	     thread with this thread ID.  */
-	  attach_thread (ptid, msg.th_p, &ti);
-
-	  break;
-
-	case TD_DEATH:
-
-	  if (!in_thread_list (ptid))
-	    error (_("Spurious thread death event."));
-
-	  detach_thread (ptid);
-
-	  break;
-
-	default:
-	  error (_("Spurious thread event."));
-	}
-    }
-  while (loop);
-}
-
 static ptid_t
 thread_db_wait (struct target_ops *ops,
 		ptid_t ptid, struct target_waitstatus *ourstatus,
@@ -1507,12 +1117,14 @@ thread_db_wait (struct target_ops *ops,
 
   ptid = beneath->to_wait (beneath, ptid, ourstatus, options);
 
-  if (ourstatus->kind == TARGET_WAITKIND_IGNORE)
-    return ptid;
-
-  if (ourstatus->kind == TARGET_WAITKIND_EXITED
-      || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
-    return ptid;
+  switch (ourstatus->kind)
+    {
+    case TARGET_WAITKIND_IGNORE:
+    case TARGET_WAITKIND_EXITED:
+    case TARGET_WAITKIND_THREAD_EXITED:
+    case TARGET_WAITKIND_SIGNALLED:
+      return ptid;
+    }
 
   info = get_thread_db_info (ptid_get_pid (ptid));
 
@@ -1528,17 +1140,9 @@ thread_db_wait (struct target_ops *ops,
       if (!thread_db_list)
  	unpush_target (&thread_db_ops);
 
-      /* Thread event breakpoints are deleted by
-	 update_breakpoints_after_exec.  */
-
       return ptid;
     }
 
-  if (ourstatus->kind == TARGET_WAITKIND_STOPPED
-      && ourstatus->value.sig == GDB_SIGNAL_TRAP)
-    /* Check for a thread event.  */
-    check_event (ptid);
-
   /* Fill in the thread's user-level thread id and status.  */
   thread_from_lwp (ptid);
 
@@ -1554,10 +1158,6 @@ thread_db_mourn_inferior (struct target_
 
   target_beneath->to_mourn_inferior (target_beneath);
 
-  /* Delete the old thread event breakpoints.  Do this after mourning
-     the inferior, so that we don't try to uninsert them.  */
-  remove_thread_event_breakpoints ();
-
   /* Detach thread_db target ops.  */
   if (!thread_db_list)
     unpush_target (ops);
@@ -1576,7 +1176,7 @@ find_new_threads_callback (const td_thrh
   td_err_e err;
   ptid_t ptid;
   struct thread_info *tp;
-  struct callback_data *cb_data = data;
+  struct callback_data *cb_data = (struct callback_data *) data;
   struct thread_db_info *info = cb_data->info;
 
   err = info->td_thr_get_info_p (th_p, &ti);
@@ -1595,7 +1195,8 @@ find_new_threads_callback (const td_thrh
       if (libthread_db_debug)
 	fprintf_unfiltered (gdb_stdlog,
 			    "thread_db: skipping exited and "
-			    "joined thread (0x%lx)\n", ti.ti_tid);
+			    "joined thread (0x%lx)\n",
+			    (unsigned long) ti.ti_tid);
       return 0;
     }
 
@@ -1604,21 +1205,12 @@ find_new_threads_callback (const td_thrh
       /* A thread ID of zero means that this is the main thread, but
 	 glibc has not yet initialized thread-local storage and the
 	 pthread library.  We do not know what the thread's TID will
-	 be yet.  Just enable event reporting and otherwise ignore
-	 it.  */
+	 be yet.  */
 
       /* In that case, we're not stopped in a fork syscall and don't
 	 need this glibc bug workaround.  */
       info->need_stale_parent_threads_check = 0;
 
-      if (target_has_execution && thread_db_use_events ())
-	{
-	  err = info->td_thr_event_enable_p (th_p, 1);
-	  if (err != TD_OK)
-	    error (_("Cannot enable thread event reporting for LWP %d: %s"),
-		   (int) ti.ti_lid, thread_db_err_str (err));
-	}
-
       return 0;
     }
 
@@ -1636,24 +1228,7 @@ find_new_threads_callback (const td_thrh
   ptid = ptid_build (info->pid, ti.ti_lid, 0);
   tp = find_thread_ptid (ptid);
   if (tp == NULL || tp->priv == NULL)
-    {
-      if (attach_thread (ptid, th_p, &ti))
-	cb_data->new_threads += 1;
-      else
-	/* Problem attaching this thread; perhaps it exited before we
-	   could attach it?
-	   This could mean that the thread list inside glibc itself is in
-	   inconsistent state, and libthread_db could go on looping forever
-	   (observed with glibc-2.3.6).  To prevent that, terminate
-	   iteration: thread_db_find_new_threads_2 will retry.  */
-	return 1;
-    }
-  else if (target_has_execution && !thread_db_use_events ())
-    {
-      /* Need to update this if not using the libthread_db events
-	 (particularly, the TD_DEATH event).  */
-      update_thread_state (tp->priv, &ti);
-    }
+    record_thread (info, tp, ptid, th_p, &ti);
 
   return 0;
 }
@@ -1672,7 +1247,7 @@ find_new_threads_once (struct thread_db_
   data.new_threads = 0;
 
   /* See comment in thread_db_update_thread_list.  */
-  gdb_assert (!target_has_execution || thread_db_use_events ());
+  gdb_assert (info->td_ta_thr_iter_p != NULL);
 
   TRY
     {
@@ -1750,17 +1325,11 @@ thread_db_find_new_threads_1 (ptid_t pti
   thread_db_find_new_threads_2 (ptid, 0);
 }
 
-static int
-update_thread_core (struct lwp_info *info, void *closure)
-{
-  info->core = linux_common_core_of_thread (info->ptid);
-  return 0;
-}
-
-/* Update the thread list using td_ta_thr_iter.  */
+/* Implement the to_update_thread_list target method for this
+   target.  */
 
 static void
-thread_db_update_thread_list_td_ta_thr_iter (struct target_ops *ops)
+thread_db_update_thread_list (struct target_ops *ops)
 {
   struct thread_db_info *info;
   struct inferior *inf;
@@ -1782,35 +1351,25 @@ thread_db_update_thread_list_td_ta_thr_i
       if (thread == NULL || thread->executing)
 	continue;
 
+      /* It's best to avoid td_ta_thr_iter if possible.  That walks
+	 data structures in the inferior's address space that may be
+	 corrupted, or, if the target is running, the list may change
+	 while we walk it.  In the latter case, it's possible that a
+	 thread exits just at the exact time that causes GDB to get
+	 stuck in an infinite loop.  To avoid pausing all threads
+	 whenever the core wants to refresh the thread list, we
+	 instead use thread_from_lwp immediately when we see an LWP
+	 stop.  That uses thread_db entry points that do not walk
+	 libpthread's thread list, so should be safe, as well as more
+	 efficient.  */
+      if (target_has_execution_1 (thread->ptid))
+	continue;
+
       thread_db_find_new_threads_1 (thread->ptid);
     }
-}
 
-/* Implement the to_update_thread_list target method for this
-   target.  */
-
-static void
-thread_db_update_thread_list (struct target_ops *ops)
-{
-  /* It's best to avoid td_ta_thr_iter if possible.  That walks data
-     structures in the inferior's address space that may be corrupted,
-     or, if the target is running, the list may change while we walk
-     it.  In the latter case, it's possible that a thread exits just
-     at the exact time that causes GDB to get stuck in an infinite
-     loop.  To avoid pausing all threads whenever the core wants to
-     refresh the thread list, if the kernel supports clone events
-     (meaning we're always already attached to all LWPs), we use
-     thread_from_lwp immediately when we see an LWP stop.  That uses
-     thread_db entry points that do not walk libpthread's thread list,
-     so should be safe, as well as more efficient.  */
-  if (target_has_execution && !thread_db_use_events ())
-    ops->beneath->to_update_thread_list (ops->beneath);
-  else
-    thread_db_update_thread_list_td_ta_thr_iter (ops);
-
-  if (target_has_execution)
-    iterate_over_lwps (minus_one_ptid /* iterate over all */,
-		       update_thread_core, NULL);
+  /* Give the beneath target a chance to do extra processing.  */
+  ops->beneath->to_update_thread_list (ops->beneath);
 }
 
 static char *
@@ -1826,7 +1385,7 @@ thread_db_pid_to_str (struct target_ops 
 
       tid = thread_info->priv->tid;
       snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
-		tid, ptid_get_lwp (ptid));
+		(unsigned long) tid, ptid_get_lwp (ptid));
 
       return buf;
     }
@@ -1863,13 +1422,13 @@ thread_db_get_thread_local_address (stru
   struct thread_info *thread_info;
   struct target_ops *beneath;
 
-  /* If we have not discovered any threads yet, check now.  */
-  if (!have_threads (ptid))
-    thread_db_find_new_threads_1 (ptid);
-
   /* Find the matching thread.  */
   thread_info = find_thread_ptid (ptid);
 
+  /* We may not have discovered the thread yet.  */
+  if (thread_info != NULL && thread_info->priv == NULL)
+    thread_info = thread_from_lwp (ptid);
+
   if (thread_info != NULL && thread_info->priv != NULL)
     {
       td_err_e err;
@@ -2010,7 +1569,7 @@ info_auto_load_libthread_db (char *args,
     if (info->filename != NULL)
       info_count++;
 
-  array = xmalloc (sizeof (*array) * info_count);
+  array = XNEWVEC (struct thread_db_info *, info_count);
   back_to = make_cleanup (xfree, array);
 
   info_count = 0;
@@ -2041,13 +1600,13 @@ info_auto_load_libthread_db (char *args,
       if (i == 0 || strcmp (array[i - 1]->filename, array[i]->filename) != 0)
 	{
 	  unique_filenames++;
-	  max_filename_len = max (max_filename_len,
-				  strlen (array[i]->filename));
+	  max_filename_len = std::max (max_filename_len,
+				       strlen (array[i]->filename));
 
 	  if (i > 0)
 	    {
 	      pids_len -= strlen (", ");
-	      max_pids_len = max (max_pids_len, pids_len);
+	      max_pids_len = std::max (max_pids_len, pids_len);
 	    }
 	  pids_len = 0;
 	}
@@ -2056,23 +1615,22 @@ info_auto_load_libthread_db (char *args,
   if (i)
     {
       pids_len -= strlen (", ");
-      max_pids_len = max (max_pids_len, pids_len);
+      max_pids_len = std::max (max_pids_len, pids_len);
     }
 
   /* Table header shifted right by preceding "libthread-db:  " would not match
      its columns.  */
   if (info_count > 0 && args == auto_load_info_scripts_pattern_nl)
-    ui_out_text (uiout, "\n");
+    uiout->text ("\n");
 
   make_cleanup_ui_out_table_begin_end (uiout, 2, unique_filenames,
 				       "LinuxThreadDbTable");
 
-  ui_out_table_header (uiout, max_filename_len, ui_left, "filename",
-		       "Filename");
-  ui_out_table_header (uiout, pids_len, ui_left, "PIDs", "Pids");
-  ui_out_table_body (uiout);
+  uiout->table_header (max_filename_len, ui_left, "filename", "Filename");
+  uiout->table_header (pids_len, ui_left, "PIDs", "Pids");
+  uiout->table_body ();
 
-  pids = xmalloc (max_pids_len + 1);
+  pids = (char *) xmalloc (max_pids_len + 1);
   make_cleanup (xfree, pids);
 
   /* Note I is incremented inside the cycle, not at its end.  */
@@ -2082,7 +1640,7 @@ info_auto_load_libthread_db (char *args,
       char *pids_end;
 
       info = array[i];
-      ui_out_field_string (uiout, "filename", info->filename);
+      uiout->field_string ("filename", info->filename);
       pids_end = pids;
 
       while (i < info_count && strcmp (info->filename, array[i]->filename) == 0)
@@ -2100,16 +1658,16 @@ info_auto_load_libthread_db (char *args,
 	}
       *pids_end = '\0';
 
-      ui_out_field_string (uiout, "pids", pids);
+      uiout->field_string ("pids", pids);
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
       do_cleanups (chain);
     }
 
   do_cleanups (back_to);
 
   if (info_count == 0)
-    ui_out_message (uiout, 0, _("No auto-loaded libthread-db.\n"));
+    uiout->message (_("No auto-loaded libthread-db.\n"));
 }
 
 static void
@@ -2145,10 +1703,9 @@ _initialize_thread_db (void)
 
   /* Defer loading of libthread_db.so until inferior is running.
      This allows gdb to load correct libthread_db for a given
-     executable -- there could be mutiple versions of glibc,
-     compiled with LinuxThreads or NPTL, and until there is
-     a running inferior, we can't tell which libthread_db is
-     the correct one to load.  */
+     executable -- there could be multiple versions of glibc,
+     and until there is a running inferior, we can't tell which
+     libthread_db is the correct one to load.  */
 
   libthread_db_search_path = xstrdup (LIBTHREAD_DB_SEARCH_PATH);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/lm32-tdep.c ./gdb/lm32-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/lm32-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/lm32-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for Lattice Mico32 processor, for GDB.
    Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,6 +36,7 @@
 #include "trad-frame.h"
 #include "reggroups.h"
 #include "opcodes/lm32-desc.h"
+#include <algorithm>
 
 /* Macros to extract fields from an instruction.  */
 #define LM32_OPCODE(insn)       ((insn >> 26) & 0x3f)
@@ -197,7 +198,7 @@ lm32_skip_prologue (struct gdbarch *gdba
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -215,16 +216,10 @@ lm32_skip_prologue (struct gdbarch *gdba
 }
 
 /* Create a breakpoint instruction.  */
+constexpr gdb_byte lm32_break_insn[4] = { OP_RAISE << 2, 0, 0, 2 };
 
-static const gdb_byte *
-lm32_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			 int *lenptr)
-{
-  static const gdb_byte breakpoint[4] = { OP_RAISE << 2, 0, 0, 2 };
+typedef BP_MANIPULATION (lm32_break_insn) lm32_breakpoint;
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
 
 /* Setup registers and stack for faking a call to a function in the 
    inferior.  */
@@ -289,7 +284,8 @@ lm32_push_dummy_call (struct gdbarch *gd
 	regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
       else
 	{
-	  write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
+	  write_memory_unsigned_integer (sp, TYPE_LENGTH (arg_type), byte_order,
+					 val);
 	  sp -= 4;
 	}
     }
@@ -422,7 +418,7 @@ lm32_frame_cache (struct frame_info *thi
   int i;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct lm32_frame_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct lm32_frame_cache);
   (*this_prologue_cache) = info;
@@ -561,7 +557,8 @@ lm32_gdbarch_init (struct gdbarch_info i
   frame_unwind_append_unwinder (gdbarch, &lm32_frame_unwind);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, lm32_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, lm32_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, lm32_breakpoint::bp_from_kind);
   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
 
   /* Calling functions in the inferior.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/location.c ./gdb/location.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/location.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/location.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,733 @@
+/* Data structures and API for event locations in GDB.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdb_assert.h"
+#include "location.h"
+#include "symtab.h"
+#include "language.h"
+#include "linespec.h"
+#include "cli/cli-utils.h"
+#include "probe.h"
+
+#include <ctype.h>
+#include <string.h>
+
+/* An event location used to set a stop event in the inferior.
+   This structure is an amalgam of the various ways
+   to specify where a stop event should be set.  */
+
+struct event_location
+{
+  /* The type of this breakpoint specification.  */
+  enum event_location_type type;
+#define EL_TYPE(P) (P)->type
+
+  union
+  {
+    /* A generic "this is a string specification" for a location.
+       This representation is used by both "normal" linespecs and
+       probes.  */
+    char *addr_string;
+#define EL_LINESPEC(P) ((P)->u.addr_string)
+#define EL_PROBE(P) ((P)->u.addr_string)
+
+    /* An address in the inferior.  */
+    CORE_ADDR address;
+#define EL_ADDRESS(P) (P)->u.address
+
+    /* An explicit location.  */
+    struct explicit_location explicit_loc;
+#define EL_EXPLICIT(P) (&((P)->u.explicit_loc))
+  } u;
+
+  /* Cached string representation of this location.  This is used, e.g., to
+     save stop event locations to file.  Malloc'd.  */
+  char *as_string;
+#define EL_STRING(P) ((P)->as_string)
+};
+
+/* See description in location.h.  */
+
+enum event_location_type
+event_location_type (const struct event_location *location)
+{
+  return EL_TYPE (location);
+}
+
+/* See description in location.h.  */
+
+void
+initialize_explicit_location (struct explicit_location *explicit_loc)
+{
+  memset (explicit_loc, 0, sizeof (struct explicit_location));
+  explicit_loc->line_offset.sign = LINE_OFFSET_UNKNOWN;
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+new_linespec_location (char **linespec)
+{
+  struct event_location *location;
+
+  location = XCNEW (struct event_location);
+  EL_TYPE (location) = LINESPEC_LOCATION;
+  if (*linespec != NULL)
+    {
+      char *p;
+      char *orig = *linespec;
+
+      linespec_lex_to_end (linespec);
+      p = remove_trailing_whitespace (orig, *linespec);
+      if ((p - orig) > 0)
+	EL_LINESPEC (location) = savestring (orig, p - orig);
+    }
+  return location;
+}
+
+/* See description in location.h.  */
+
+const char *
+get_linespec_location (const struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == LINESPEC_LOCATION);
+  return EL_LINESPEC (location);
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+new_address_location (CORE_ADDR addr, const char *addr_string,
+		      int addr_string_len)
+{
+  struct event_location *location;
+
+  location = XCNEW (struct event_location);
+  EL_TYPE (location) = ADDRESS_LOCATION;
+  EL_ADDRESS (location) = addr;
+  if (addr_string != NULL)
+    EL_STRING (location) = xstrndup (addr_string, addr_string_len);
+  return location;
+}
+
+/* See description in location.h.  */
+
+CORE_ADDR
+get_address_location (const struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == ADDRESS_LOCATION);
+  return EL_ADDRESS (location);
+}
+
+/* See description in location.h.  */
+
+const char *
+get_address_string_location (const struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == ADDRESS_LOCATION);
+  return EL_STRING (location);
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+new_probe_location (const char *probe)
+{
+  struct event_location *location;
+
+  location = XCNEW (struct event_location);
+  EL_TYPE (location) = PROBE_LOCATION;
+  if (probe != NULL)
+    EL_PROBE (location) = xstrdup (probe);
+  return location;
+}
+
+/* See description in location.h.  */
+
+const char *
+get_probe_location (const struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == PROBE_LOCATION);
+  return EL_PROBE (location);
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+new_explicit_location (const struct explicit_location *explicit_loc)
+{
+  struct event_location tmp;
+
+  memset (&tmp, 0, sizeof (struct event_location));
+  EL_TYPE (&tmp) = EXPLICIT_LOCATION;
+  initialize_explicit_location (EL_EXPLICIT (&tmp));
+  if (explicit_loc != NULL)
+    {
+      if (explicit_loc->source_filename != NULL)
+	{
+	  EL_EXPLICIT (&tmp)->source_filename
+	    = explicit_loc->source_filename;
+	}
+
+      if (explicit_loc->function_name != NULL)
+	EL_EXPLICIT (&tmp)->function_name
+	  = explicit_loc->function_name;
+
+      if (explicit_loc->label_name != NULL)
+	EL_EXPLICIT (&tmp)->label_name = explicit_loc->label_name;
+
+      if (explicit_loc->line_offset.sign != LINE_OFFSET_UNKNOWN)
+	EL_EXPLICIT (&tmp)->line_offset = explicit_loc->line_offset;
+    }
+
+  return copy_event_location (&tmp);
+}
+
+/* See description in location.h.  */
+
+struct explicit_location *
+get_explicit_location (struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == EXPLICIT_LOCATION);
+  return EL_EXPLICIT (location);
+}
+
+/* See description in location.h.  */
+
+const struct explicit_location *
+get_explicit_location_const (const struct event_location *location)
+{
+  gdb_assert (EL_TYPE (location) == EXPLICIT_LOCATION);
+  return EL_EXPLICIT (location);
+}
+
+/* This convenience function returns a malloc'd string which
+   represents the location in EXPLICIT_LOC.
+
+   AS_LINESPEC is non-zero if this string should be a linespec.
+   Otherwise it will be output in explicit form.  */
+
+static char *
+explicit_to_string_internal (int as_linespec,
+			     const struct explicit_location *explicit_loc)
+{
+  int need_space = 0;
+  char space = as_linespec ? ':' : ' ';
+  string_file buf;
+
+  if (explicit_loc->source_filename != NULL)
+    {
+      if (!as_linespec)
+	buf.puts ("-source ");
+      buf.puts (explicit_loc->source_filename);
+      need_space = 1;
+    }
+
+  if (explicit_loc->function_name != NULL)
+    {
+      if (need_space)
+	buf.putc (space);
+      if (!as_linespec)
+	buf.puts ("-function ");
+      buf.puts (explicit_loc->function_name);
+      need_space = 1;
+    }
+
+  if (explicit_loc->label_name != NULL)
+    {
+      if (need_space)
+	buf.putc (space);
+      if (!as_linespec)
+	buf.puts ("-label ");
+      buf.puts (explicit_loc->label_name);
+      need_space = 1;
+    }
+
+  if (explicit_loc->line_offset.sign != LINE_OFFSET_UNKNOWN)
+    {
+      if (need_space)
+	buf.putc (space);
+      if (!as_linespec)
+	buf.puts ("-line ");
+      buf.printf ("%s%d",
+		  (explicit_loc->line_offset.sign == LINE_OFFSET_NONE ? ""
+		   : (explicit_loc->line_offset.sign
+		      == LINE_OFFSET_PLUS ? "+" : "-")),
+		  explicit_loc->line_offset.offset);
+    }
+
+  return xstrdup (buf.c_str ());
+}
+
+/* See description in location.h.  */
+
+char *
+explicit_location_to_string (const struct explicit_location *explicit_loc)
+{
+  return explicit_to_string_internal (0, explicit_loc);
+}
+
+/* See description in location.h.  */
+
+char *
+explicit_location_to_linespec (const struct explicit_location *explicit_loc)
+{
+  return explicit_to_string_internal (1, explicit_loc);
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+copy_event_location (const struct event_location *src)
+{
+  struct event_location *dst;
+
+  dst = XCNEW (struct event_location);
+  EL_TYPE (dst) = EL_TYPE (src);
+  if (EL_STRING (src) != NULL)
+    EL_STRING (dst) = xstrdup (EL_STRING (src));
+
+  switch (EL_TYPE (src))
+    {
+    case LINESPEC_LOCATION:
+      if (EL_LINESPEC (src) != NULL)
+	EL_LINESPEC (dst) = xstrdup (EL_LINESPEC (src));
+      break;
+
+    case ADDRESS_LOCATION:
+      EL_ADDRESS (dst) = EL_ADDRESS (src);
+      break;
+
+    case EXPLICIT_LOCATION:
+      if (EL_EXPLICIT (src)->source_filename != NULL)
+	EL_EXPLICIT (dst)->source_filename
+	  = xstrdup (EL_EXPLICIT (src)->source_filename);
+
+      if (EL_EXPLICIT (src)->function_name != NULL)
+	EL_EXPLICIT (dst)->function_name
+	  = xstrdup (EL_EXPLICIT (src)->function_name);
+
+      if (EL_EXPLICIT (src)->label_name != NULL)
+	EL_EXPLICIT (dst)->label_name = xstrdup (EL_EXPLICIT (src)->label_name);
+
+      EL_EXPLICIT (dst)->line_offset = EL_EXPLICIT (src)->line_offset;
+      break;
+
+
+    case PROBE_LOCATION:
+      if (EL_PROBE (src) != NULL)
+	EL_PROBE (dst) = xstrdup (EL_PROBE (src));
+      break;
+
+    default:
+      gdb_assert_not_reached ("unknown event location type");
+    }
+
+  return dst;
+}
+
+/* A cleanup function for struct event_location.  */
+
+static void
+delete_event_location_cleanup (void *data)
+{
+  struct event_location *location = (struct event_location *) data;
+
+  delete_event_location (location);
+}
+
+/* See description in location.h.  */
+
+struct cleanup *
+make_cleanup_delete_event_location (struct event_location *location)
+{
+  return make_cleanup (delete_event_location_cleanup, location);
+}
+
+/* See description in location.h.  */
+
+void
+delete_event_location (struct event_location *location)
+{
+  if (location != NULL)
+    {
+      xfree (EL_STRING (location));
+
+      switch (EL_TYPE (location))
+	{
+	case LINESPEC_LOCATION:
+	  xfree (EL_LINESPEC (location));
+	  break;
+
+	case ADDRESS_LOCATION:
+	  /* Nothing to do.  */
+	  break;
+
+	case EXPLICIT_LOCATION:
+	  xfree (EL_EXPLICIT (location)->source_filename);
+	  xfree (EL_EXPLICIT (location)->function_name);
+	  xfree (EL_EXPLICIT (location)->label_name);
+	  break;
+
+	case PROBE_LOCATION:
+	  xfree (EL_PROBE (location));
+	  break;
+
+	default:
+	  gdb_assert_not_reached ("unknown event location type");
+	}
+
+      xfree (location);
+    }
+}
+
+/* See description in location.h.  */
+
+const char *
+event_location_to_string (struct event_location *location)
+{
+  if (EL_STRING (location) == NULL)
+    {
+      switch (EL_TYPE (location))
+	{
+	case LINESPEC_LOCATION:
+	  if (EL_LINESPEC (location) != NULL)
+	    EL_STRING (location) = xstrdup (EL_LINESPEC (location));
+	  break;
+
+	case ADDRESS_LOCATION:
+	  EL_STRING (location)
+	    = xstrprintf ("*%s",
+			  core_addr_to_string (EL_ADDRESS (location)));
+	  break;
+
+	case EXPLICIT_LOCATION:
+	  EL_STRING (location)
+	    = explicit_location_to_string (EL_EXPLICIT (location));
+	  break;
+
+	case PROBE_LOCATION:
+	  EL_STRING (location) = xstrdup (EL_PROBE (location));
+	  break;
+
+	default:
+	  gdb_assert_not_reached ("unknown event location type");
+	}
+    }
+
+  return EL_STRING (location);
+}
+
+/* A lexer for explicit locations.  This function will advance INP
+   past any strings that it lexes.  Returns a malloc'd copy of the
+   lexed string or NULL if no lexing was done.  */
+
+static char *
+explicit_location_lex_one (const char **inp,
+			   const struct language_defn *language)
+{
+  const char *start = *inp;
+
+  if (*start == '\0')
+    return NULL;
+
+  /* If quoted, skip to the ending quote.  */
+  if (strchr (get_gdb_linespec_parser_quote_characters (), *start))
+    {
+      char quote_char = *start;
+
+      /* If the input is not an Ada operator, skip to the matching
+	 closing quote and return the string.  */
+      if (!(language->la_language == language_ada
+	    && quote_char == '\"' && is_ada_operator (start)))
+	{
+	  const char *end = find_toplevel_char (start + 1, quote_char);
+
+	  if (end == NULL)
+	    error (_("Unmatched quote, %s."), start);
+	  *inp = end + 1;
+	  return savestring (start + 1, *inp - start - 2);
+	}
+    }
+
+  /* If the input starts with '-' or '+', the string ends with the next
+     whitespace or comma.  */
+  if (*start == '-' || *start == '+')
+    {
+      while (*inp[0] != '\0' && *inp[0] != ',' && !isspace (*inp[0]))
+	++(*inp);
+    }
+  else
+    {
+      /* Handle numbers first, stopping at the next whitespace or ','.  */
+      while (isdigit (*inp[0]))
+	++(*inp);
+      if (*inp[0] == '\0' || isspace (*inp[0]) || *inp[0] == ',')
+	return savestring (start, *inp - start);
+
+      /* Otherwise stop at the next occurrence of whitespace, '\0',
+	 keyword, or ','.  */
+      *inp = start;
+      while ((*inp)[0]
+	     && (*inp)[0] != ','
+	     && !(isspace ((*inp)[0])
+		  || linespec_lexer_lex_keyword (&(*inp)[1])))
+	{
+	  /* Special case: C++ operator,.  */
+	  if (language->la_language == language_cplus
+	      && strncmp (*inp, "operator", 8) == 0)
+	    (*inp) += 8;
+	  ++(*inp);
+	}
+    }
+
+  if (*inp - start > 0)
+    return savestring (start, *inp - start);
+
+  return NULL;
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+string_to_explicit_location (const char **argp,
+			     const struct language_defn *language,
+			     int dont_throw)
+{
+  struct cleanup *cleanup;
+  struct event_location *location;
+
+  /* It is assumed that input beginning with '-' and a non-digit
+     character is an explicit location.  "-p" is reserved, though,
+     for probe locations.  */
+  if (argp == NULL
+      || *argp == NULL
+      || *argp[0] != '-'
+      || !isalpha ((*argp)[1])
+      || ((*argp)[0] == '-' && (*argp)[1] == 'p'))
+    return NULL;
+
+  location = new_explicit_location (NULL);
+  cleanup = make_cleanup_delete_event_location (location);
+
+  /* Process option/argument pairs.  dprintf_command
+     requires that processing stop on ','.  */
+  while ((*argp)[0] != '\0' && (*argp)[0] != ',')
+    {
+      int len;
+      char *opt, *oarg;
+      const char *start;
+      struct cleanup *opt_cleanup, *oarg_cleanup;
+
+      /* If *ARGP starts with a keyword, stop processing
+	 options.  */
+      if (linespec_lexer_lex_keyword (*argp) != NULL)
+	break;
+
+      /* Mark the start of the string in case we need to rewind.  */
+      start = *argp;
+
+      /* Get the option string.  */
+      opt = explicit_location_lex_one (argp, language);
+      opt_cleanup = make_cleanup (xfree, opt);
+
+      *argp = skip_spaces_const (*argp);
+
+      /* Get the argument string.  */
+      oarg = explicit_location_lex_one (argp, language);
+      oarg_cleanup = make_cleanup (xfree, oarg);
+      *argp = skip_spaces_const (*argp);
+
+      /* Use the length of the option to allow abbreviations.  */
+      len = strlen (opt);
+
+      /* All options have a required argument.  Checking for this required
+	 argument is deferred until later.  */
+      if (strncmp (opt, "-source", len) == 0)
+	EL_EXPLICIT (location)->source_filename = oarg;
+      else if (strncmp (opt, "-function", len) == 0)
+	EL_EXPLICIT (location)->function_name = oarg;
+      else if (strncmp (opt, "-line", len) == 0)
+	{
+	  if (oarg != NULL)
+	    {
+	      EL_EXPLICIT (location)->line_offset
+		= linespec_parse_line_offset (oarg);
+	      do_cleanups (oarg_cleanup);
+	      do_cleanups (opt_cleanup);
+	      continue;
+	    }
+	}
+      else if (strncmp (opt, "-label", len) == 0)
+	EL_EXPLICIT (location)->label_name = oarg;
+      /* Only emit an "invalid argument" error for options
+	 that look like option strings.  */
+      else if (opt[0] == '-' && !isdigit (opt[1]))
+	{
+	  if (!dont_throw)
+	    error (_("invalid explicit location argument, \"%s\""), opt);
+	}
+      else
+	{
+	  /* End of the explicit location specification.
+	     Stop parsing and return whatever explicit location was
+	     parsed.  */
+	  *argp = start;
+	  discard_cleanups (oarg_cleanup);
+	  do_cleanups (opt_cleanup);
+	  discard_cleanups (cleanup);
+	  return location;
+	}
+
+      /* It's a little lame to error after the fact, but in this
+	 case, it provides a much better user experience to issue
+	 the "invalid argument" error before any missing
+	 argument error.  */
+      if (oarg == NULL && !dont_throw)
+	error (_("missing argument for \"%s\""), opt);
+
+      /* The option/argument pair was successfully processed;
+	 oarg belongs to the explicit location, and opt should
+	 be freed.  */
+      discard_cleanups (oarg_cleanup);
+      do_cleanups (opt_cleanup);
+    }
+
+  /* One special error check:  If a source filename was given
+     without offset, function, or label, issue an error.  */
+  if (EL_EXPLICIT (location)->source_filename != NULL
+      && EL_EXPLICIT (location)->function_name == NULL
+      && EL_EXPLICIT (location)->label_name == NULL
+      && (EL_EXPLICIT (location)->line_offset.sign == LINE_OFFSET_UNKNOWN)
+      && !dont_throw)
+    {
+      error (_("Source filename requires function, label, or "
+	       "line offset."));
+    }
+
+  discard_cleanups (cleanup);
+  return location;
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+string_to_event_location_basic (char **stringp,
+				const struct language_defn *language)
+{
+  struct event_location *location;
+  const char *cs;
+
+  /* Try the input as a probe spec.  */
+  cs = *stringp;
+  if (cs != NULL && probe_linespec_to_ops (&cs) != NULL)
+    {
+      location = new_probe_location (*stringp);
+      *stringp += strlen (*stringp);
+    }
+  else
+    {
+      /* Try an address location.  */
+      if (*stringp != NULL && **stringp == '*')
+	{
+	  const char *arg, *orig;
+	  CORE_ADDR addr;
+
+	  orig = arg = *stringp;
+	  addr = linespec_expression_to_pc (&arg);
+	  location = new_address_location (addr, orig, arg - orig);
+	  *stringp += arg - orig;
+	}
+      else
+	{
+	  /* Everything else is a linespec.  */
+	  location = new_linespec_location (stringp);
+	}
+    }
+
+  return location;
+}
+
+/* See description in location.h.  */
+
+struct event_location *
+string_to_event_location (char **stringp,
+			  const struct language_defn *language)
+{
+  struct event_location *location;
+  const char *arg, *orig;
+
+  /* Try an explicit location.  */
+  orig = arg = *stringp;
+  location = string_to_explicit_location (&arg, language, 0);
+  if (location != NULL)
+    {
+      /* It was a valid explicit location.  Advance STRINGP to
+	 the end of input.  */
+      *stringp += arg - orig;
+    }
+  else
+    {
+      /* Everything else is a "basic" linespec, address, or probe
+	 location.  */
+      location = string_to_event_location_basic (stringp, language);
+    }
+
+  return location;
+}
+
+/* See description in location.h.  */
+
+int
+event_location_empty_p (const struct event_location *location)
+{
+  switch (EL_TYPE (location))
+    {
+    case LINESPEC_LOCATION:
+      /* Linespecs are never "empty."  (NULL is a valid linespec)  */
+      return 0;
+
+    case ADDRESS_LOCATION:
+      return 0;
+
+    case EXPLICIT_LOCATION:
+      return (EL_EXPLICIT (location) == NULL
+	      || (EL_EXPLICIT (location)->source_filename == NULL
+		  && EL_EXPLICIT (location)->function_name == NULL
+		  && EL_EXPLICIT (location)->label_name == NULL
+		  && (EL_EXPLICIT (location)->line_offset.sign
+		      == LINE_OFFSET_UNKNOWN)));
+
+    case PROBE_LOCATION:
+      return EL_PROBE (location) == NULL;
+
+    default:
+      gdb_assert_not_reached ("unknown event location type");
+    }
+}
+
+/* See description in location.h.  */
+
+void
+set_event_location_string (struct event_location *location,
+			   const char *string)
+{
+  xfree (EL_STRING (location));
+  EL_STRING (location) = string == NULL ?  NULL : xstrdup (string);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/location.h ./gdb/location.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/location.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/location.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,253 @@
+/* Data structures and API for event locations in GDB.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef LOCATIONS_H
+#define LOCATIONS_H 1
+
+struct language_defn;
+struct event_location;
+
+/* An enumeration of possible signs for a line offset.  */
+
+enum offset_relative_sign
+{
+  /* No sign  */
+  LINE_OFFSET_NONE,
+
+  /* A plus sign ("+")  */
+  LINE_OFFSET_PLUS,
+
+  /* A minus sign ("-")  */
+  LINE_OFFSET_MINUS,
+
+  /* A special "sign" for unspecified offset.  */
+  LINE_OFFSET_UNKNOWN
+};
+
+/* A line offset in a location.  */
+
+struct line_offset
+{
+  /* Line offset and any specified sign.  */
+  int offset;
+  enum offset_relative_sign sign;
+};
+
+/* An enumeration of the various ways to specify a stop event
+   location (used with create_breakpoint).  */
+
+enum event_location_type
+{
+  /* A traditional linespec.  */
+  LINESPEC_LOCATION,
+
+  /* An address in the inferior.  */
+  ADDRESS_LOCATION,
+
+  /* An explicit location.  */
+  EXPLICIT_LOCATION,
+
+  /* A probe location.  */
+  PROBE_LOCATION
+};
+
+/* An explicit location.  This structure is used to bypass the
+   parsing done on linespecs.  It still has the same requirements
+   as linespecs, though.  For example, source_filename requires
+   at least one other field.  */
+
+struct explicit_location
+{
+  /* The source filename. Malloc'd.  */
+  char *source_filename;
+
+  /* The function name.  Malloc'd.  */
+  char *function_name;
+
+  /* The name of a label.  Malloc'd.  */
+  char *label_name;
+
+  /* A line offset relative to the start of the symbol
+     identified by the above fields or the current symtab
+     if the other fields are NULL.  */
+  struct line_offset line_offset;
+};
+
+/* Return the type of the given event location.  */
+
+extern enum event_location_type
+  event_location_type (const struct event_location *);
+
+/* Return a malloc'd explicit string representation of the given
+   explicit location.  The location must already be canonicalized/valid.  */
+
+extern char *
+  explicit_location_to_string (const struct explicit_location *explicit_loc);
+
+/* Return a malloc'd linespec string representation of the given
+   explicit location.  The location must already be canonicalized/valid.  */
+
+extern char *
+  explicit_location_to_linespec (const struct explicit_location *explicit_loc);
+
+/* Return a string representation of the LOCATION.
+   This function may return NULL for unspecified linespecs,
+   e.g, LOCATION_LINESPEC and addr_string is NULL.
+
+   The result is cached in LOCATION.  */
+
+extern const char *
+  event_location_to_string (struct event_location *location);
+
+/* Create a new linespec location.  The return result is malloc'd
+   and should be freed with delete_event_location.  */
+
+extern struct event_location *
+  new_linespec_location (char **linespec);
+
+/* Return the linespec location (a string) of the given event_location
+   (which must be of type LINESPEC_LOCATION).  */
+
+extern const char *
+  get_linespec_location (const struct event_location *location);
+
+/* Create a new address location.
+   ADDR is the address corresponding to this event_location.
+   ADDR_STRING, a string of ADDR_STRING_LEN characters, is
+   the expression that was parsed to determine the address ADDR.  */
+
+extern struct event_location *
+  new_address_location (CORE_ADDR addr, const char *addr_string,
+			int addr_string_len);
+
+/* Return the address location (a CORE_ADDR) of the given event_location
+   (which must be of type ADDRESS_LOCATION).  */
+
+extern CORE_ADDR
+  get_address_location (const struct event_location *location);
+
+/* Return the expression (a string) that was used to compute the address
+   of the given event_location (which must be of type ADDRESS_LOCATION).  */
+
+extern const char *
+  get_address_string_location (const struct event_location *location);
+
+/* Create a new probe location.  The return result is malloc'd
+   and should be freed with delete_event_location.  */
+
+extern struct event_location *
+  new_probe_location (const char *probe);
+
+/* Return the probe location (a string) of the given event_location
+   (which must be of type PROBE_LOCATION).  */
+
+extern const char *
+  get_probe_location (const struct event_location *location);
+
+/* Initialize the given explicit location.  */
+
+extern void
+  initialize_explicit_location (struct explicit_location *explicit_loc);
+
+/* Create a new explicit location.  If not NULL, EXPLICIT is checked for
+   validity.  If invalid, an exception is thrown.
+
+   The return result is malloc'd and should be freed with
+   delete_event_location.  */
+
+extern struct event_location *
+  new_explicit_location (const struct explicit_location *explicit_loc);
+
+/* Return the explicit location of the given event_location
+   (which must be of type EXPLICIT_LOCATION).  */
+
+extern struct explicit_location *
+  get_explicit_location (struct event_location *location);
+
+/* A const version of the above.  */
+
+extern const struct explicit_location *
+  get_explicit_location_const (const struct event_location *location);
+
+/* Free an event location and any associated data.  */
+
+extern void delete_event_location (struct event_location *location);
+
+/* Make a cleanup to free LOCATION.  */
+
+extern struct cleanup *
+  make_cleanup_delete_event_location (struct event_location *location);
+
+/* Return a copy of the given SRC location.  */
+
+extern struct event_location *
+  copy_event_location (const struct event_location *src);
+
+/* Attempt to convert the input string in *ARGP into an event_location.
+   ARGP is advanced past any processed input.  Returns an event_location
+   (malloc'd) if an event location was successfully found in *ARGP,
+   NULL otherwise.
+
+   This function may call error() if *ARGP looks like properly formed,
+   but invalid, input, e.g., if it is called with missing argument parameters
+   or invalid options.
+
+   The return result must be freed with delete_event_location.
+
+   This function is intended to be used by CLI commands and will parse
+   explicit locations in a CLI-centric way.  Other interfaces should use
+   string_to_event_location_basic if they want to maintain support for
+   legacy specifications of probe, address, and linespec locations.  */
+
+extern struct event_location *
+  string_to_event_location (char **argp,
+			    const struct language_defn *langauge);
+
+/* Like string_to_event_location, but does not attempt to parse explicit
+   locations.  */
+
+extern struct event_location *
+  string_to_event_location_basic (char **argp,
+				  const struct language_defn *language);
+
+/* Attempt to convert the input string in *ARGP into an explicit location.
+   ARGP is advanced past any processed input.  Returns an event_location
+   (malloc'd) if an explicit location was successfully found in *ARGP,
+   NULL otherwise.
+
+   IF !DONT_THROW, this function may call error() if *ARGP looks like
+   properly formed input, e.g., if it is called with missing argument
+   parameters or invalid options.  If DONT_THROW is non-zero, this function
+   will not throw any exceptions.  */
+
+extern struct event_location *
+  string_to_explicit_location (const char **argp,
+			       const struct language_defn *langauge,
+			       int dont_throw);
+
+/* A convenience function for testing for unset locations.  */
+
+extern int event_location_empty_p (const struct event_location *location);
+
+/* Set the location's string representation.  If STRING is NULL, clear
+   the string representation.  */
+
+extern void
+  set_event_location_string (struct event_location *location,
+			     const char *string);
+#endif /* LOCATIONS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-exp.c ./gdb/m2-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-exp.c	2015-07-06 01:51:09.000000000 +0000
+++ ./gdb/m2-exp.c	2017-03-06 01:53:01.000000000 +0000
@@ -85,65 +85,10 @@
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_m2_type(ps) builtin_m2_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth m2_maxdepth
-#define	yyparse	m2_parse_internal
-#define	yylex	m2_lex
-#define	yyerror	m2_error
-#define	yylval	m2_lval
-#define	yychar	m2_char
-#define	yydebug	m2_debug
-#define	yypact	m2_pact
-#define	yyr1	m2_r1
-#define	yyr2	m2_r2
-#define	yydef	m2_def
-#define	yychk	m2_chk
-#define	yypgo	m2_pgo
-#define	yyact	m2_act
-#define	yyexca	m2_exca
-#define	yyerrflag m2_errflag
-#define	yynerrs	m2_nerrs
-#define	yyps	m2_ps
-#define	yypv	m2_pv
-#define	yys	m2_s
-#define	yy_yys	m2_yys
-#define	yystate	m2_state
-#define	yytmp	m2_tmp
-#define	yyv	m2_v
-#define	yy_yyv	m2_yyv
-#define	yyval	m2_val
-#define	yylloc	m2_lloc
-#define	yyreds	m2_reds		/* With YYDEBUG defined */
-#define	yytoks	m2_toks		/* With YYDEBUG defined */
-#define yyname	m2_name		/* With YYDEBUG defined */
-#define yyrule	m2_rule		/* With YYDEBUG defined */
-#define yylhs	m2_yylhs
-#define yylen	m2_yylen
-#define yydefred m2_yydefred
-#define yydgoto	m2_yydgoto
-#define yysindex m2_yysindex
-#define yyrindex m2_yyrindex
-#define yygindex m2_yygindex
-#define yytable	 m2_yytable
-#define yycheck	 m2_yycheck
-#define yyss	m2_yyss
-#define yysslim	m2_yysslim
-#define yyssp	m2_yyssp
-#define yystacksize m2_yystacksize
-#define yyvs	m2_yyvs
-#define yyvsp	m2_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX m2_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -164,7 +109,7 @@ static int number_sign = 1;
 
 
 /* Line 189 of yacc.c  */
-#line 168 "m2-exp.c"
+#line 113 "m2-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -297,7 +242,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 137 "m2-exp.y"
+#line 82 "m2-exp.y"
 
     LONGEST lval;
     ULONGEST ulval;
@@ -316,7 +261,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 320 "m2-exp.c"
+#line 265 "m2-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -328,7 +273,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 332 "m2-exp.c"
+#line 277 "m2-exp.c"
 
 #ifdef short
 # undef short
@@ -651,15 +596,15 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   206,   206,   207,   210,   219,   224,   223,   230,   234,
-     238,   239,   242,   246,   250,   254,   258,   264,   270,   274,
-     280,   284,   288,   292,   296,   301,   305,   312,   316,   323,
-     329,   332,   336,   340,   344,   346,   356,   352,   364,   371,
-     368,   379,   382,   386,   391,   396,   401,   407,   413,   421,
-     425,   429,   433,   437,   441,   445,   449,   453,   455,   459,
-     463,   467,   471,   475,   479,   483,   490,   496,   502,   510,
-     521,   531,   540,   543,   552,   559,   563,   573,   585,   593,
-     597,   620,   665
+       0,   151,   151,   152,   155,   164,   169,   168,   175,   179,
+     183,   184,   187,   191,   195,   199,   203,   209,   215,   219,
+     225,   229,   233,   237,   241,   246,   250,   257,   261,   268,
+     274,   277,   281,   285,   289,   291,   301,   297,   309,   316,
+     313,   324,   327,   331,   336,   341,   346,   352,   358,   366,
+     370,   374,   378,   382,   386,   390,   394,   398,   400,   404,
+     408,   412,   416,   420,   424,   428,   435,   441,   447,   455,
+     466,   476,   485,   488,   497,   504,   508,   518,   530,   538,
+     542,   565,   608
 };
 #endif
 
@@ -1826,7 +1771,7 @@ yyreduce:
         case 4:
 
 /* Line 1455 of yacc.c  */
-#line 211 "m2-exp.y"
+#line 156 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 		  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
 		  write_exp_elt_opcode (pstate, OP_TYPE);
@@ -1836,21 +1781,21 @@ yyreduce:
   case 5:
 
 /* Line 1455 of yacc.c  */
-#line 220 "m2-exp.y"
+#line 165 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND); }
     break;
 
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 224 "m2-exp.y"
+#line 169 "m2-exp.y"
     { number_sign = -1; }
     break;
 
   case 7:
 
 /* Line 1455 of yacc.c  */
-#line 226 "m2-exp.y"
+#line 171 "m2-exp.y"
     { number_sign = 1;
 			  write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
@@ -1858,49 +1803,49 @@ yyreduce:
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 231 "m2-exp.y"
+#line 176 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PLUS); }
     break;
 
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 235 "m2-exp.y"
+#line 180 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 243 "m2-exp.y"
+#line 188 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAP); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 247 "m2-exp.y"
+#line 192 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ORD); }
     break;
 
   case 14:
 
 /* Line 1455 of yacc.c  */
-#line 251 "m2-exp.y"
+#line 196 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ABS); }
     break;
 
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 255 "m2-exp.y"
+#line 200 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_HIGH); }
     break;
 
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 259 "m2-exp.y"
+#line 204 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_MIN);
 			  write_exp_elt_type (pstate, (yyvsp[(3) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_MIN); }
@@ -1909,7 +1854,7 @@ yyreduce:
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 265 "m2-exp.y"
+#line 210 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_MAX);
 			  write_exp_elt_type (pstate, (yyvsp[(3) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_MAX); }
@@ -1918,14 +1863,14 @@ yyreduce:
   case 18:
 
 /* Line 1455 of yacc.c  */
-#line 271 "m2-exp.y"
+#line 216 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_FLOAT); }
     break;
 
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 275 "m2-exp.y"
+#line 220 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_VAL);
 			  write_exp_elt_type (pstate, (yyvsp[(3) - (6)].tval));
 			  write_exp_elt_opcode (pstate, BINOP_VAL); }
@@ -1934,49 +1879,49 @@ yyreduce:
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 281 "m2-exp.y"
+#line 226 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CHR); }
     break;
 
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 285 "m2-exp.y"
+#line 230 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ODD); }
     break;
 
   case 22:
 
 /* Line 1455 of yacc.c  */
-#line 289 "m2-exp.y"
+#line 234 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_TRUNC); }
     break;
 
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 293 "m2-exp.y"
+#line 238 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
     break;
 
   case 24:
 
 /* Line 1455 of yacc.c  */
-#line 297 "m2-exp.y"
+#line 242 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
     break;
 
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 302 "m2-exp.y"
+#line 247 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
     break;
 
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 306 "m2-exp.y"
+#line 251 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 			  write_exp_elt_opcode (pstate, BINOP_ADD);
 			  write_exp_elt_opcode (pstate,
@@ -1986,14 +1931,14 @@ yyreduce:
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 313 "m2-exp.y"
+#line 258 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT);}
     break;
 
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 317 "m2-exp.y"
+#line 262 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
 			  write_exp_elt_opcode (pstate, BINOP_SUB);
 			  write_exp_elt_opcode (pstate,
@@ -2003,7 +1948,7 @@ yyreduce:
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 324 "m2-exp.y"
+#line 269 "m2-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
@@ -2012,49 +1957,49 @@ yyreduce:
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 333 "m2-exp.y"
+#line 278 "m2-exp.y"
     { error (_("Sets are not implemented."));}
     break;
 
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 337 "m2-exp.y"
+#line 282 "m2-exp.y"
     { error (_("Sets are not implemented."));}
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 341 "m2-exp.y"
+#line 286 "m2-exp.y"
     { error (_("Sets are not implemented."));}
     break;
 
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 345 "m2-exp.y"
+#line 290 "m2-exp.y"
     { error (_("Sets are not implemented."));}
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 347 "m2-exp.y"
+#line 292 "m2-exp.y"
     { error (_("Sets are not implemented."));}
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 356 "m2-exp.y"
+#line 301 "m2-exp.y"
     { start_arglist(); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 358 "m2-exp.y"
+#line 303 "m2-exp.y"
     { write_exp_elt_opcode (pstate, MULTI_SUBSCRIPT);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) end_arglist());
@@ -2064,21 +2009,21 @@ yyreduce:
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 365 "m2-exp.y"
+#line 310 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
     break;
 
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 371 "m2-exp.y"
+#line 316 "m2-exp.y"
     { start_arglist (); }
     break;
 
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 373 "m2-exp.y"
+#line 318 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) end_arglist ());
@@ -2088,35 +2033,35 @@ yyreduce:
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 383 "m2-exp.y"
+#line 328 "m2-exp.y"
     { arglist_len = 1; }
     break;
 
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 387 "m2-exp.y"
+#line 332 "m2-exp.y"
     { arglist_len++; }
     break;
 
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 392 "m2-exp.y"
+#line 337 "m2-exp.y"
     { arglist_len = 1; }
     break;
 
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 397 "m2-exp.y"
+#line 342 "m2-exp.y"
     { arglist_len++; }
     break;
 
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 402 "m2-exp.y"
+#line 347 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_MEMVAL);
 			  write_exp_elt_type (pstate, (yyvsp[(2) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_MEMVAL); }
@@ -2125,7 +2070,7 @@ yyreduce:
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 408 "m2-exp.y"
+#line 353 "m2-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_CAST);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (4)].tval));
 			  write_exp_elt_opcode (pstate, UNOP_CAST); }
@@ -2134,133 +2079,133 @@ yyreduce:
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 414 "m2-exp.y"
+#line 359 "m2-exp.y"
     { }
     break;
 
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 422 "m2-exp.y"
+#line 367 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
     break;
 
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 426 "m2-exp.y"
+#line 371 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 430 "m2-exp.y"
+#line 375 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_DIV); }
     break;
 
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 434 "m2-exp.y"
+#line 379 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_INTDIV); }
     break;
 
   case 53:
 
 /* Line 1455 of yacc.c  */
-#line 438 "m2-exp.y"
+#line 383 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 54:
 
 /* Line 1455 of yacc.c  */
-#line 442 "m2-exp.y"
+#line 387 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 55:
 
 /* Line 1455 of yacc.c  */
-#line 446 "m2-exp.y"
+#line 391 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 56:
 
 /* Line 1455 of yacc.c  */
-#line 450 "m2-exp.y"
+#line 395 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
     break;
 
   case 57:
 
 /* Line 1455 of yacc.c  */
-#line 454 "m2-exp.y"
+#line 399 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 456 "m2-exp.y"
+#line 401 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
     break;
 
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 460 "m2-exp.y"
+#line 405 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ); }
     break;
 
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 464 "m2-exp.y"
+#line 409 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ); }
     break;
 
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 468 "m2-exp.y"
+#line 413 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS); }
     break;
 
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 472 "m2-exp.y"
+#line 417 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR); }
     break;
 
   case 63:
 
 /* Line 1455 of yacc.c  */
-#line 476 "m2-exp.y"
+#line 421 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
     break;
 
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 480 "m2-exp.y"
+#line 425 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
     break;
 
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 484 "m2-exp.y"
+#line 429 "m2-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 66:
 
 /* Line 1455 of yacc.c  */
-#line 491 "m2-exp.y"
+#line 436 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].ulval));
 			  write_exp_elt_opcode (pstate, OP_BOOL); }
@@ -2269,7 +2214,7 @@ yyreduce:
   case 67:
 
 /* Line 1455 of yacc.c  */
-#line 497 "m2-exp.y"
+#line 442 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].ulval));
 			  write_exp_elt_opcode (pstate, OP_BOOL); }
@@ -2278,7 +2223,7 @@ yyreduce:
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 503 "m2-exp.y"
+#line 448 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
 					parse_m2_type (pstate)->builtin_int);
@@ -2289,7 +2234,7 @@ yyreduce:
   case 69:
 
 /* Line 1455 of yacc.c  */
-#line 511 "m2-exp.y"
+#line 456 "m2-exp.y"
     {
 			  write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
@@ -2303,7 +2248,7 @@ yyreduce:
   case 70:
 
 /* Line 1455 of yacc.c  */
-#line 522 "m2-exp.y"
+#line 467 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
 					      parse_m2_type (pstate)
@@ -2315,7 +2260,7 @@ yyreduce:
   case 71:
 
 /* Line 1455 of yacc.c  */
-#line 532 "m2-exp.y"
+#line 477 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate,
 					      parse_m2_type (pstate)
@@ -2327,7 +2272,7 @@ yyreduce:
   case 73:
 
 /* Line 1455 of yacc.c  */
-#line 544 "m2-exp.y"
+#line 489 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
 					    parse_type (pstate)->builtin_int);
@@ -2339,7 +2284,7 @@ yyreduce:
   case 74:
 
 /* Line 1455 of yacc.c  */
-#line 553 "m2-exp.y"
+#line 498 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_M2_STRING);
 			  write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
 			  write_exp_elt_opcode (pstate, OP_M2_STRING); }
@@ -2348,28 +2293,28 @@ yyreduce:
   case 75:
 
 /* Line 1455 of yacc.c  */
-#line 560 "m2-exp.y"
+#line 505 "m2-exp.y"
     { (yyval.bval) = SYMBOL_BLOCK_VALUE((yyvsp[(1) - (1)].sym)); }
     break;
 
   case 76:
 
 /* Line 1455 of yacc.c  */
-#line 564 "m2-exp.y"
+#line 509 "m2-exp.y"
     { struct symbol *sym
 			    = lookup_symbol (copy_name ((yyvsp[(1) - (1)].sval)),
 					     expression_context_block,
-					     VAR_DOMAIN, 0);
+					     VAR_DOMAIN, 0).symbol;
 			  (yyval.sym) = sym;}
     break;
 
   case 77:
 
 /* Line 1455 of yacc.c  */
-#line 574 "m2-exp.y"
+#line 519 "m2-exp.y"
     { struct symbol *tem
 			    = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
-					     VAR_DOMAIN, 0);
+					     VAR_DOMAIN, 0).symbol;
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
@@ -2380,7 +2325,7 @@ yyreduce:
   case 78:
 
 /* Line 1455 of yacc.c  */
-#line 586 "m2-exp.y"
+#line 531 "m2-exp.y"
     { write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			  write_exp_elt_block (pstate, NULL);
 			  write_exp_elt_sym (pstate, (yyvsp[(1) - (1)].sym));
@@ -2390,55 +2335,53 @@ yyreduce:
   case 80:
 
 /* Line 1455 of yacc.c  */
-#line 598 "m2-exp.y"
-    { struct symbol *sym;
-			  sym = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
-					       VAR_DOMAIN, 0);
-			  if (sym == 0)
+#line 543 "m2-exp.y"
+    { struct block_symbol sym
+			    = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
+					     VAR_DOMAIN, 0);
+
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
-			  if (symbol_read_needs_frame (sym))
+			  if (symbol_read_needs_frame (sym.symbol))
 			    {
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			    }
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
     break;
 
   case 81:
 
 /* Line 1455 of yacc.c  */
-#line 621 "m2-exp.y"
-    { struct symbol *sym;
+#line 566 "m2-exp.y"
+    { struct block_symbol sym;
 			  struct field_of_this_result is_a_field_of_this;
 
- 			  sym = lookup_symbol (copy_name ((yyvsp[(1) - (1)].sval)),
+			  sym = lookup_symbol (copy_name ((yyvsp[(1) - (1)].sval)),
 					       expression_context_block,
 					       VAR_DOMAIN,
 					       &is_a_field_of_this);
-			  if (sym)
+
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0 ||
-				      contained_in (block_found, 
+				      contained_in (sym.block,
 						    innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else
@@ -2462,7 +2405,7 @@ yyreduce:
   case 82:
 
 /* Line 1455 of yacc.c  */
-#line 666 "m2-exp.y"
+#line 609 "m2-exp.y"
     { (yyval.tval) = lookup_typename (parse_language (pstate),
 						parse_gdbarch (pstate),
 						copy_name ((yyvsp[(1) - (1)].sval)),
@@ -2472,7 +2415,7 @@ yyreduce:
 
 
 /* Line 1455 of yacc.c  */
-#line 2477 "m2-exp.c"
+#line 2420 "m2-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2684,7 +2627,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 673 "m2-exp.y"
+#line 616 "m2-exp.y"
 
 
 /* Take care of parsing a number (anything that starts with a digit).
@@ -3043,7 +2986,7 @@ yylex (void)
 
     if (lookup_symtab (tmp))
       return BLOCKNAME;
-    sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0);
+    sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0).symbol;
     if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
       return BLOCKNAME;
     if (lookup_typename (parse_language (pstate), parse_gdbarch (pstate),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-exp.y ./gdb/m2-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m2-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* YACC grammar for Modula-2 expressions, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
    Generated from expread.y (now c-exp.y) and contributed by the Department
    of Computer Science at the State University of New York at Buffalo, 1991.
 
@@ -51,65 +51,10 @@
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 #define parse_m2_type(ps) builtin_m2_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth m2_maxdepth
-#define	yyparse	m2_parse_internal
-#define	yylex	m2_lex
-#define	yyerror	m2_error
-#define	yylval	m2_lval
-#define	yychar	m2_char
-#define	yydebug	m2_debug
-#define	yypact	m2_pact
-#define	yyr1	m2_r1
-#define	yyr2	m2_r2
-#define	yydef	m2_def
-#define	yychk	m2_chk
-#define	yypgo	m2_pgo
-#define	yyact	m2_act
-#define	yyexca	m2_exca
-#define	yyerrflag m2_errflag
-#define	yynerrs	m2_nerrs
-#define	yyps	m2_ps
-#define	yypv	m2_pv
-#define	yys	m2_s
-#define	yy_yys	m2_yys
-#define	yystate	m2_state
-#define	yytmp	m2_tmp
-#define	yyv	m2_v
-#define	yy_yyv	m2_yyv
-#define	yyval	m2_val
-#define	yylloc	m2_lloc
-#define	yyreds	m2_reds		/* With YYDEBUG defined */
-#define	yytoks	m2_toks		/* With YYDEBUG defined */
-#define yyname	m2_name		/* With YYDEBUG defined */
-#define yyrule	m2_rule		/* With YYDEBUG defined */
-#define yylhs	m2_yylhs
-#define yylen	m2_yylen
-#define yydefred m2_yydefred
-#define yydgoto	m2_yydgoto
-#define yysindex m2_yysindex
-#define yyrindex m2_yyrindex
-#define yygindex m2_yygindex
-#define yytable	 m2_yytable
-#define yycheck	 m2_yycheck
-#define yyss	m2_yyss
-#define yysslim	m2_yysslim
-#define yyssp	m2_yyssp
-#define yystacksize m2_yystacksize
-#define yyvs	m2_yyvs
-#define yyvsp	m2_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX m2_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -564,7 +509,7 @@ fblock	:	BLOCKNAME
 			{ struct symbol *sym
 			    = lookup_symbol (copy_name ($1),
 					     expression_context_block,
-					     VAR_DOMAIN, 0);
+					     VAR_DOMAIN, 0).symbol;
 			  $$ = sym;}
 	;
 			     
@@ -573,7 +518,7 @@ fblock	:	BLOCKNAME
 fblock	:	block COLONCOLON BLOCKNAME
 			{ struct symbol *tem
 			    = lookup_symbol (copy_name ($3), $1,
-					     VAR_DOMAIN, 0);
+					     VAR_DOMAIN, 0).symbol;
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ($3));
@@ -595,52 +540,50 @@ variable:	INTERNAL_VAR
 
 /* GDB scope operator */
 variable:	block COLONCOLON NAME
-			{ struct symbol *sym;
-			  sym = lookup_symbol (copy_name ($3), $1,
-					       VAR_DOMAIN, 0);
-			  if (sym == 0)
+			{ struct block_symbol sym
+			    = lookup_symbol (copy_name ($3), $1,
+					     VAR_DOMAIN, 0);
+
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ($3));
-			  if (symbol_read_needs_frame (sym))
+			  if (symbol_read_needs_frame (sym.symbol))
 			    {
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			    }
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
 	;
 
 /* Base case for variables.  */
 variable:	NAME
-			{ struct symbol *sym;
+			{ struct block_symbol sym;
 			  struct field_of_this_result is_a_field_of_this;
 
- 			  sym = lookup_symbol (copy_name ($1),
+			  sym = lookup_symbol (copy_name ($1),
 					       expression_context_block,
 					       VAR_DOMAIN,
 					       &is_a_field_of_this);
-			  if (sym)
+
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0 ||
-				      contained_in (block_found, 
+				      contained_in (sym.block,
 						    innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
 			    }
 			  else
@@ -1028,7 +971,7 @@ yylex (void)
 
     if (lookup_symtab (tmp))
       return BLOCKNAME;
-    sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0);
+    sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0).symbol;
     if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
       return BLOCKNAME;
     if (lookup_typename (parse_language (pstate), parse_gdbarch (pstate),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-lang.c ./gdb/m2-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m2-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Modula 2 language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -304,7 +304,7 @@ static const struct op_print m2_op_print
   {"MIN", UNOP_MIN, PREC_BUILTIN_FUNCTION, 0},
   {"ODD", UNOP_ODD, PREC_BUILTIN_FUNCTION, 0},
   {"TRUNC", UNOP_TRUNC, PREC_BUILTIN_FUNCTION, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_BUILTIN_FUNCTION, 0}
 };
 
 /* The built-in types of Modula-2.  */
@@ -363,9 +363,10 @@ const struct language_defn m2_language_d
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  NULL,
   &exp_descriptor_modula2,
   m2_parse,			/* parser */
-  m2_error,			/* parser error function */
+  m2_yyerror,			/* parser error function */
   null_post_parser,
   m2_printchar,			/* Print character constant */
   m2_printstr,			/* function to print string constant */
@@ -380,6 +381,7 @@ const struct language_defn m2_language_d
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   m2_op_print_tab,		/* expression operators for printing */
@@ -411,7 +413,8 @@ build_m2_types (struct gdbarch *gdbarch)
   builtin_m2_type->builtin_card
     = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 1, "CARDINAL");
   builtin_m2_type->builtin_real
-    = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch), "REAL", NULL);
+    = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch), "REAL",
+		       gdbarch_float_format (gdbarch));
   builtin_m2_type->builtin_char
     = arch_character_type (gdbarch, TARGET_CHAR_BIT, 1, "CHAR");
   builtin_m2_type->builtin_bool
@@ -425,7 +428,7 @@ static struct gdbarch_data *m2_type_data
 const struct builtin_m2_type *
 builtin_m2_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, m2_type_data);
+  return (const struct builtin_m2_type *) gdbarch_data (gdbarch, m2_type_data);
 }
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-lang.h ./gdb/m2-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m2-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Modula 2 language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,7 @@ struct parser_state;
 
 extern int m2_parse (struct parser_state *); /* Defined in m2-exp.y */
 
-extern void m2_error (char *);	/* Defined in m2-exp.y */
+extern void m2_yyerror (char *);	/* Defined in m2-exp.y */
 
 /* Defined in m2-typeprint.c */
 extern void m2_print_type (struct type *, const char *, struct ui_file *, int,
@@ -34,9 +34,9 @@ extern void m2_print_typedef (struct typ
 extern int m2_is_long_set (struct type *type);
 extern int m2_is_unbounded_array (struct type *type);
 
-extern void m2_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+extern void m2_val_print (struct type *, int, CORE_ADDR,
 			  struct ui_file *, int,
-			  const struct value *,
+			  struct value *,
 			  const struct value_print_options *);
 
 extern int get_long_set_bounds (struct type *type, LONGEST *low,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-typeprint.c ./gdb/m2-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m2-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for printing Modula 2 types for GDB, the GNU debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,7 +74,7 @@ m2_print_type (struct type *type, const 
 	       int show, int level,
 	       const struct type_print_options *flags)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   QUIT;
 
@@ -160,7 +160,7 @@ void
 m2_print_typedef (struct type *type, struct symbol *new_symbol,
 		  struct ui_file *stream)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   fprintf_filtered (stream, "TYPE ");
   if (!TYPE_NAME (SYMBOL_TYPE (new_symbol))
       || strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
@@ -373,7 +373,7 @@ m2_is_long_set (struct type *type)
 static int
 m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_CHAR:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-valprint.c ./gdb/m2-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m2-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m2-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Modula 2 values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,7 +37,7 @@ static void
 m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
 			 int embedded_offset, CORE_ADDR address,
 			 struct ui_file *stream, int recurse,
-			 const struct value *val,
+			 struct value *val,
 			 const struct value_print_options *options,
 			 int len);
 
@@ -81,7 +81,7 @@ m2_print_long_set (struct type *type, co
   struct type *target;
   int bitval;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   fprintf_filtered (stream, "{");
   len = TYPE_NFIELDS (type);
@@ -162,13 +162,11 @@ m2_print_unbounded_array (struct type *t
 			  struct ui_file *stream, int recurse,
 			  const struct value_print_options *options)
 {
-  struct type *content_type;
   CORE_ADDR addr;
   LONGEST len;
   struct value *val;
 
-  CHECK_TYPEDEF (type);
-  content_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0));
+  type = check_typedef (type);
 
   addr = unpack_pointer (TYPE_FIELD_TYPE (type, 0),
 			 (TYPE_FIELD_BITPOS (type, 0) / 8) +
@@ -264,11 +262,11 @@ static void
 m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
 			 int embedded_offset, CORE_ADDR address,
 			 struct ui_file *stream, int recurse,
-			 const struct value *val,
+			 struct value *val,
 			 const struct value_print_options *options,
 			 int len)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   if (TYPE_LENGTH (type) > 0)
     {
@@ -284,7 +282,7 @@ m2_print_array_contents (struct type *ty
       else
 	{
 	  fprintf_filtered (stream, "{");
-	  val_print_array_elements (type, valaddr, embedded_offset,
+	  val_print_array_elements (type, embedded_offset,
 				    address, stream, recurse, val,
 				    options, 0);
 	  fprintf_filtered (stream, "}");
@@ -301,25 +299,27 @@ static const struct generic_val_print_de
   " * I",
   "TRUE",
   "FALSE",
-  "void"
+  "void",
+  "{",
+  "}"
 };
 
 /* See val_print for a description of the various parameters of this
    function; they are identical.  */
 
 void
-m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+m2_val_print (struct type *type, int embedded_offset,
 	      CORE_ADDR address, struct ui_file *stream, int recurse,
-	      const struct value *original_value,
+	      struct value *original_value,
 	      const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
-  unsigned int i = 0;	/* Number of characters printed.  */
   unsigned len;
   struct type *elttype;
   CORE_ADDR addr;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_ARRAY:
@@ -353,12 +353,11 @@ m2_val_print (struct type *type, const g
 	      LA_PRINT_STRING (stream, TYPE_TARGET_TYPE (type),
 			       valaddr + embedded_offset, len, NULL,
 			       0, options);
-	      i = len;
 	    }
 	  else
 	    {
 	      fprintf_filtered (stream, "{");
-	      val_print_array_elements (type, valaddr, embedded_offset,
+	      val_print_array_elements (type, embedded_offset,
 					address, stream,
 					recurse, original_value,
 					options, 0);
@@ -375,7 +374,7 @@ m2_val_print (struct type *type, const g
 	print_variable_at_address (type, valaddr + embedded_offset,
 				   stream, recurse, options);
       else if (options->format && options->format != 's')
-	val_print_scalar_formatted (type, valaddr, embedded_offset,
+	val_print_scalar_formatted (type, embedded_offset,
 				    original_value, options, 0, stream);
       else
 	{
@@ -399,14 +398,14 @@ m2_val_print (struct type *type, const g
 	m2_print_unbounded_array (type, valaddr, embedded_offset,
 				  address, stream, recurse, options);
       else
-	cp_print_value_fields (type, type, valaddr, embedded_offset,
+	cp_print_value_fields (type, type, embedded_offset,
 			       address, stream, recurse, original_value,
 			       options, NULL, 0);
       break;
 
     case TYPE_CODE_SET:
       elttype = TYPE_INDEX_TYPE (type);
-      CHECK_TYPEDEF (elttype);
+      elttype = check_typedef (elttype);
       if (TYPE_STUB (elttype))
 	{
 	  fprintf_filtered (stream, _("<incomplete type>"));
@@ -471,7 +470,7 @@ m2_val_print (struct type *type, const g
     case TYPE_CODE_RANGE:
       if (TYPE_LENGTH (type) == TYPE_LENGTH (TYPE_TARGET_TYPE (type)))
 	{
-	  m2_val_print (TYPE_TARGET_TYPE (type), valaddr, embedded_offset,
+	  m2_val_print (TYPE_TARGET_TYPE (type), embedded_offset,
 			address, stream, recurse, original_value, options);
 	  break;
 	}
@@ -496,7 +495,7 @@ m2_val_print (struct type *type, const g
     case TYPE_CODE_BOOL:
     case TYPE_CODE_CHAR:
     default:
-      generic_val_print (type, valaddr, embedded_offset, address,
+      generic_val_print (type, embedded_offset, address,
 			 stream, recurse, original_value, options,
 			 &m2_decorations);
       break;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32c-tdep.c ./gdb/m32c-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32c-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32c-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Renesas M32C target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,9 +46,13 @@ struct m32c_reg;
 
 /* The type of a function that moves the value of REG between CACHE or
    BUF --- in either direction.  */
-typedef enum register_status (m32c_move_reg_t) (struct m32c_reg *reg,
+typedef enum register_status (m32c_write_reg_t) (struct m32c_reg *reg,
+						 struct regcache *cache,
+						 const gdb_byte *buf);
+
+typedef enum register_status (m32c_read_reg_t) (struct m32c_reg *reg,
 						struct regcache *cache,
-						void *buf);
+						gdb_byte *buf);
 
 struct m32c_reg
 {
@@ -78,7 +82,8 @@ struct m32c_reg
 
   /* Functions to read its value from a regcache, and write its value
      to a regcache.  */
-  m32c_move_reg_t *read, *write;
+  m32c_read_reg_t *read;
+  m32c_write_reg_t *write;
 
   /* Data for READ and WRITE functions.  The exact meaning depends on
      the specific functions selected; see the comments for those
@@ -187,27 +192,18 @@ make_types (struct gdbarch *arch)
      this is called, so we avoid using them.  */
   tdep->voyd = arch_type (arch, TYPE_CODE_VOID, 1, "void");
   tdep->ptr_voyd
-    = arch_type (arch, TYPE_CODE_PTR, gdbarch_ptr_bit (arch) / TARGET_CHAR_BIT,
-                 NULL);
-  TYPE_TARGET_TYPE (tdep->ptr_voyd) = tdep->voyd;
-  TYPE_UNSIGNED (tdep->ptr_voyd) = 1;
+    = arch_pointer_type (arch, gdbarch_ptr_bit (arch), NULL, tdep->voyd);
   tdep->func_voyd = lookup_function_type (tdep->voyd);
 
   xsnprintf (type_name, sizeof (type_name), "%s_data_addr_t",
 	     gdbarch_bfd_arch_info (arch)->printable_name);
   tdep->data_addr_reg_type
-    = arch_type (arch, TYPE_CODE_PTR, data_addr_reg_bits / TARGET_CHAR_BIT,
-                 xstrdup (type_name));
-  TYPE_TARGET_TYPE (tdep->data_addr_reg_type) = tdep->voyd;
-  TYPE_UNSIGNED (tdep->data_addr_reg_type) = 1;
+    = arch_pointer_type (arch, data_addr_reg_bits, type_name, tdep->voyd);
 
   xsnprintf (type_name, sizeof (type_name), "%s_code_addr_t",
 	     gdbarch_bfd_arch_info (arch)->printable_name);
   tdep->code_addr_reg_type
-    = arch_type (arch, TYPE_CODE_PTR, code_addr_reg_bits / TARGET_CHAR_BIT,
-                 xstrdup (type_name));
-  TYPE_TARGET_TYPE (tdep->code_addr_reg_type) = tdep->func_voyd;
-  TYPE_UNSIGNED (tdep->code_addr_reg_type) = 1;
+    = arch_pointer_type (arch, code_addr_reg_bits, type_name, tdep->func_voyd);
 
   tdep->uint8  = arch_integer_type (arch,  8, 1, "uint8_t");
   tdep->uint16 = arch_integer_type (arch, 16, 1, "uint16_t");
@@ -297,18 +293,24 @@ m32c_register_reggroup_p (struct gdbarch
 
 
 /* Register move functions.  We declare them here using
-   m32c_move_reg_t to check the types.  */
-static m32c_move_reg_t m32c_raw_read,      m32c_raw_write;
-static m32c_move_reg_t m32c_banked_read,   m32c_banked_write;
-static m32c_move_reg_t m32c_sb_read, 	   m32c_sb_write;
-static m32c_move_reg_t m32c_part_read,     m32c_part_write;
-static m32c_move_reg_t m32c_cat_read,      m32c_cat_write;
-static m32c_move_reg_t m32c_r3r2r1r0_read, m32c_r3r2r1r0_write;
-
+   m32c_{read,write}_reg_t to check the types.  */
+static m32c_read_reg_t m32c_raw_read;
+static m32c_read_reg_t m32c_banked_read;
+static m32c_read_reg_t m32c_sb_read;
+static m32c_read_reg_t m32c_part_read;
+static m32c_read_reg_t m32c_cat_read;
+static m32c_read_reg_t m32c_r3r2r1r0_read;
+
+static m32c_write_reg_t m32c_raw_write;
+static m32c_write_reg_t m32c_banked_write;
+static m32c_write_reg_t m32c_sb_write;
+static m32c_write_reg_t m32c_part_write;
+static m32c_write_reg_t m32c_cat_write;
+static m32c_write_reg_t m32c_r3r2r1r0_write;
 
 /* Copy the value of the raw register REG from CACHE to BUF.  */
 static enum register_status
-m32c_raw_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_raw_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   return regcache_raw_read (cache, reg->num, buf);
 }
@@ -316,9 +318,10 @@ m32c_raw_read (struct m32c_reg *reg, str
 
 /* Copy the value of the raw register REG from BUF to CACHE.  */
 static enum register_status
-m32c_raw_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_raw_write (struct m32c_reg *reg, struct regcache *cache,
+		const gdb_byte *buf)
 {
-  regcache_raw_write (cache, reg->num, (const void *) buf);
+  regcache_raw_write (cache, reg->num, buf);
 
   return REG_VALID;
 }
@@ -348,7 +351,7 @@ m32c_banked_register (struct m32c_reg *r
    masked in REG->n set, then read REG->ry.  Otherwise, read
    REG->rx.  */
 static enum register_status
-m32c_banked_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_banked_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   struct m32c_reg *bank_reg = m32c_banked_register (reg, cache);
   return regcache_raw_read (cache, bank_reg->num, buf);
@@ -360,10 +363,11 @@ m32c_banked_read (struct m32c_reg *reg, 
    masked in REG->n set, then write REG->ry.  Otherwise, write
    REG->rx.  */
 static enum register_status
-m32c_banked_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_banked_write (struct m32c_reg *reg, struct regcache *cache,
+		   const gdb_byte *buf)
 {
   struct m32c_reg *bank_reg = m32c_banked_register (reg, cache);
-  regcache_raw_write (cache, bank_reg->num, (const void *) buf);
+  regcache_raw_write (cache, bank_reg->num, buf);
 
   return REG_VALID;
 }
@@ -372,7 +376,7 @@ m32c_banked_write (struct m32c_reg *reg,
 /* Move the value of SB from CACHE to BUF.  On bfd_mach_m32c, SB is a
    banked register; on bfd_mach_m16c, it's not.  */
 static enum register_status
-m32c_sb_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_sb_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   if (gdbarch_bfd_arch_info (reg->arch)->mach == bfd_mach_m16c)
     return m32c_raw_read (reg->rx, cache, buf);
@@ -384,7 +388,7 @@ m32c_sb_read (struct m32c_reg *reg, stru
 /* Move the value of SB from BUF to CACHE.  On bfd_mach_m32c, SB is a
    banked register; on bfd_mach_m16c, it's not.  */
 static enum register_status
-m32c_sb_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_sb_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 {
   if (gdbarch_bfd_arch_info (reg->arch)->mach == bfd_mach_m16c)
     m32c_raw_write (reg->rx, cache, buf);
@@ -437,7 +441,7 @@ m32c_find_part (struct m32c_reg *reg, in
    REG->type values, where higher indices refer to more significant
    bits, read the value of the REG->n'th element.  */
 static enum register_status
-m32c_part_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_part_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   int offset, len;
 
@@ -452,7 +456,8 @@ m32c_part_read (struct m32c_reg *reg, st
    values, where higher indices refer to more significant bits, write
    the value of the REG->n'th element.  */
 static enum register_status
-m32c_part_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_part_write (struct m32c_reg *reg, struct regcache *cache,
+		 const gdb_byte *buf)
 {
   int offset, len;
 
@@ -467,27 +472,25 @@ m32c_part_write (struct m32c_reg *reg, s
    concatenation of the values of the registers REG->rx and REG->ry,
    with REG->rx contributing the more significant bits.  */
 static enum register_status
-m32c_cat_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_cat_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   int high_bytes = TYPE_LENGTH (reg->rx->type);
   int low_bytes  = TYPE_LENGTH (reg->ry->type);
-  /* For address arithmetic.  */
-  unsigned char *cbuf = buf;
   enum register_status status;
 
   gdb_assert (TYPE_LENGTH (reg->type) == high_bytes + low_bytes);
 
   if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
     {
-      status = regcache_cooked_read (cache, reg->rx->num, cbuf);
+      status = regcache_cooked_read (cache, reg->rx->num, buf);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, reg->ry->num, cbuf + high_bytes);
+	status = regcache_cooked_read (cache, reg->ry->num, buf + high_bytes);
     }
   else
     {
-      status = regcache_cooked_read (cache, reg->rx->num, cbuf + low_bytes);
+      status = regcache_cooked_read (cache, reg->rx->num, buf + low_bytes);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, reg->ry->num, cbuf);
+	status = regcache_cooked_read (cache, reg->ry->num, buf);
     }
 
   return status;
@@ -498,24 +501,23 @@ m32c_cat_read (struct m32c_reg *reg, str
    concatenation of the values of the registers REG->rx and REG->ry,
    with REG->rx contributing the more significant bits.  */
 static enum register_status
-m32c_cat_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_cat_write (struct m32c_reg *reg, struct regcache *cache,
+		const gdb_byte *buf)
 {
   int high_bytes = TYPE_LENGTH (reg->rx->type);
   int low_bytes  = TYPE_LENGTH (reg->ry->type);
-  /* For address arithmetic.  */
-  unsigned char *cbuf = buf;
 
   gdb_assert (TYPE_LENGTH (reg->type) == high_bytes + low_bytes);
 
   if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
     {
-      regcache_cooked_write (cache, reg->rx->num, cbuf);
-      regcache_cooked_write (cache, reg->ry->num, cbuf + high_bytes);
+      regcache_cooked_write (cache, reg->rx->num, buf);
+      regcache_cooked_write (cache, reg->ry->num, buf + high_bytes);
     }
   else
     {
-      regcache_cooked_write (cache, reg->rx->num, cbuf + low_bytes);
-      regcache_cooked_write (cache, reg->ry->num, cbuf);
+      regcache_cooked_write (cache, reg->rx->num, buf + low_bytes);
+      regcache_cooked_write (cache, reg->ry->num, buf);
     }
 
   return REG_VALID;
@@ -526,34 +528,31 @@ m32c_cat_write (struct m32c_reg *reg, st
    the concatenation (from most significant to least) of r3, r2, r1,
    and r0.  */
 static enum register_status
-m32c_r3r2r1r0_read (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_r3r2r1r0_read (struct m32c_reg *reg, struct regcache *cache, gdb_byte *buf)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (reg->arch);
   int len = TYPE_LENGTH (tdep->r0->type);
   enum register_status status;
 
-  /* For address arithmetic.  */
-  unsigned char *cbuf = buf;
-
   if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
     {
-      status = regcache_cooked_read (cache, tdep->r0->num, cbuf + len * 3);
+      status = regcache_cooked_read (cache, tdep->r0->num, buf + len * 3);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r1->num, cbuf + len * 2);
+	status = regcache_cooked_read (cache, tdep->r1->num, buf + len * 2);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r2->num, cbuf + len * 1);
+	status = regcache_cooked_read (cache, tdep->r2->num, buf + len * 1);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r3->num, cbuf);
+	status = regcache_cooked_read (cache, tdep->r3->num, buf);
     }
   else
     {
-      status = regcache_cooked_read (cache, tdep->r0->num, cbuf);
+      status = regcache_cooked_read (cache, tdep->r0->num, buf);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r1->num, cbuf + len * 1);
+	status = regcache_cooked_read (cache, tdep->r1->num, buf + len * 1);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r2->num, cbuf + len * 2);
+	status = regcache_cooked_read (cache, tdep->r2->num, buf + len * 2);
       if (status == REG_VALID)
-	status = regcache_cooked_read (cache, tdep->r3->num, cbuf + len * 3);
+	status = regcache_cooked_read (cache, tdep->r3->num, buf + len * 3);
     }
 
   return status;
@@ -564,27 +563,25 @@ m32c_r3r2r1r0_read (struct m32c_reg *reg
    the concatenation (from most significant to least) of r3, r2, r1,
    and r0.  */
 static enum register_status
-m32c_r3r2r1r0_write (struct m32c_reg *reg, struct regcache *cache, void *buf)
+m32c_r3r2r1r0_write (struct m32c_reg *reg, struct regcache *cache,
+		     const gdb_byte *buf)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (reg->arch);
   int len = TYPE_LENGTH (tdep->r0->type);
 
-  /* For address arithmetic.  */
-  unsigned char *cbuf = buf;
-
   if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
     {
-      regcache_cooked_write (cache, tdep->r0->num, cbuf + len * 3);
-      regcache_cooked_write (cache, tdep->r1->num, cbuf + len * 2);
-      regcache_cooked_write (cache, tdep->r2->num, cbuf + len * 1);
-      regcache_cooked_write (cache, tdep->r3->num, cbuf);
+      regcache_cooked_write (cache, tdep->r0->num, buf + len * 3);
+      regcache_cooked_write (cache, tdep->r1->num, buf + len * 2);
+      regcache_cooked_write (cache, tdep->r2->num, buf + len * 1);
+      regcache_cooked_write (cache, tdep->r3->num, buf);
     }
   else
     {
-      regcache_cooked_write (cache, tdep->r0->num, cbuf);
-      regcache_cooked_write (cache, tdep->r1->num, cbuf + len * 1);
-      regcache_cooked_write (cache, tdep->r2->num, cbuf + len * 2);
-      regcache_cooked_write (cache, tdep->r3->num, cbuf + len * 3);
+      regcache_cooked_write (cache, tdep->r0->num, buf);
+      regcache_cooked_write (cache, tdep->r1->num, buf + len * 1);
+      regcache_cooked_write (cache, tdep->r2->num, buf + len * 2);
+      regcache_cooked_write (cache, tdep->r3->num, buf + len * 3);
     }
 
   return REG_VALID;
@@ -623,7 +620,7 @@ m32c_pseudo_register_write (struct gdbar
   gdb_assert (arch == tdep->regs[cookednum].arch);
   reg = &tdep->regs[cookednum];
 
-  reg->write (reg, cache, (void *) buf);
+  reg->write (reg, cache, buf);
 }
 
 
@@ -634,8 +631,8 @@ add_reg (struct gdbarch *arch,
 	 const char *name,
 	 struct type *type,
 	 int sim_num,
-	 m32c_move_reg_t *read,
-	 m32c_move_reg_t *write,
+	 m32c_read_reg_t *read,
+	 m32c_write_reg_t *write,
 	 struct m32c_reg *rx,
 	 struct m32c_reg *ry,
 	 int n)
@@ -817,9 +814,6 @@ make_regs (struct gdbarch *arch)
   struct m32c_reg *sp;
   struct m32c_reg *r0hl;
   struct m32c_reg *r1hl;
-  struct m32c_reg *r2hl;
-  struct m32c_reg *r3hl;
-  struct m32c_reg *intbhl;
   struct m32c_reg *r2r0;
   struct m32c_reg *r3r1;
   struct m32c_reg *r3r1r2r0;
@@ -883,9 +877,9 @@ make_regs (struct gdbarch *arch)
 
   r0hl        = CHL (r0, tdep->int8);
   r1hl        = CHL (r1, tdep->int8);
-  r2hl        = CHL (r2, tdep->int8);
-  r3hl        = CHL (r3, tdep->int8);
-  intbhl      = CHL (intb, tdep->int16);
+  CHL (r2, tdep->int8);
+  CHL (r3, tdep->int8);
+  CHL (intb, tdep->int16);
 
   r2r0        = CCAT (r2,   r0,   tdep->int32);
   r3r1        = CCAT (r3,   r1,   tdep->int32);
@@ -996,16 +990,9 @@ make_regs (struct gdbarch *arch)
 
 
 /* Breakpoints.  */
+constexpr gdb_byte m32c_break_insn[] = { 0x00 };	/* brk */
 
-static const unsigned char *
-m32c_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static unsigned char break_insn[] = { 0x00 };	/* brk */
-
-  *len = sizeof (break_insn);
-  return break_insn;
-}
-
+typedef BP_MANIPULATION (m32c_break_insn) m32c_breakpoint;
 
 
 /* Prologue analysis.  */
@@ -1875,10 +1862,11 @@ m32c_analyze_frame_prologue (struct fram
 
       *this_prologue_cache = FRAME_OBSTACK_ZALLOC (struct m32c_prologue);
       m32c_analyze_prologue (get_frame_arch (this_frame),
-			     func_start, stop_addr, *this_prologue_cache);
+			     func_start, stop_addr,
+			     (struct m32c_prologue *) *this_prologue_cache);
     }
 
-  return *this_prologue_cache;
+  return (struct m32c_prologue *) *this_prologue_cache;
 }
 
 
@@ -1942,7 +1930,6 @@ m32c_prev_register (struct frame_info *t
   struct m32c_prologue *p
     = m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
   CORE_ADDR frame_base = m32c_frame_base (this_frame, this_prologue_cache);
-  int reg_size = register_size (get_frame_arch (this_frame), regnum);
 
   if (regnum == tdep->sp->num)
     return frame_unwind_got_constant (this_frame, regnum, frame_base);
@@ -2467,7 +2454,7 @@ m32c_m16c_address_to_pointer (struct gdb
                paddress (gdbarch, addr));
 
       func_name = MSYMBOL_LINKAGE_NAME (func_msym.minsym);
-      tramp_name = xmalloc (strlen (func_name) + 5);
+      tramp_name = (char *) xmalloc (strlen (func_name) + 5);
       strcpy (tramp_name, func_name);
       strcat (tramp_name, ".plt");
 
@@ -2554,7 +2541,7 @@ m32c_m16c_pointer_to_address (struct gdb
                  Since the trampoline contains a jump instruction, we
                  could also just extract the jump's target address.  I
                  don't see much advantage one way or the other.  */
-              char *func_name = xmalloc (len - 4 + 1);
+              char *func_name = (char *) xmalloc (len - 4 + 1);
               memcpy (func_name, ptr_msym_name, len - 4);
               func_name[len - 4] = '\0';
               func_msym
@@ -2627,7 +2614,7 @@ m32c_virtual_frame_pointer (struct gdbar
 static struct gdbarch *
 m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
-  struct gdbarch *arch;
+  struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
   unsigned long mach = info.bfd_arch_info->mach;
 
@@ -2638,52 +2625,53 @@ m32c_gdbarch_init (struct gdbarch_info i
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
     return arches->gdbarch;
 
-  tdep = xcalloc (1, sizeof (*tdep));
-  arch = gdbarch_alloc (&info, tdep);
+  tdep = XCNEW (struct gdbarch_tdep);
+  gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Essential types.  */
-  make_types (arch);
+  make_types (gdbarch);
 
   /* Address/pointer conversions.  */
   if (mach == bfd_mach_m16c)
     {
-      set_gdbarch_address_to_pointer (arch, m32c_m16c_address_to_pointer);
-      set_gdbarch_pointer_to_address (arch, m32c_m16c_pointer_to_address);
+      set_gdbarch_address_to_pointer (gdbarch, m32c_m16c_address_to_pointer);
+      set_gdbarch_pointer_to_address (gdbarch, m32c_m16c_pointer_to_address);
     }
 
   /* Register set.  */
-  make_regs (arch);
+  make_regs (gdbarch);
 
   /* Disassembly.  */
-  set_gdbarch_print_insn (arch, print_insn_m32c);
+  set_gdbarch_print_insn (gdbarch, print_insn_m32c);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (arch, m32c_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32c_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32c_breakpoint::bp_from_kind);
 
   /* Prologue analysis and unwinding.  */
-  set_gdbarch_inner_than (arch, core_addr_lessthan);
-  set_gdbarch_skip_prologue (arch, m32c_skip_prologue);
-  set_gdbarch_unwind_pc (arch, m32c_unwind_pc);
-  set_gdbarch_unwind_sp (arch, m32c_unwind_sp);
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_skip_prologue (gdbarch, m32c_skip_prologue);
+  set_gdbarch_unwind_pc (gdbarch, m32c_unwind_pc);
+  set_gdbarch_unwind_sp (gdbarch, m32c_unwind_sp);
 #if 0
   /* I'm dropping the dwarf2 sniffer because it has a few problems.
      They may be in the dwarf2 cfi code in GDB, or they may be in
      the debug info emitted by the upstream toolchain.  I don't 
      know which, but I do know that the prologue analyzer works better.
      MVS 04/13/06  */
-  dwarf2_append_sniffers (arch);
+  dwarf2_append_sniffers (gdbarch);
 #endif
-  frame_unwind_append_unwinder (arch, &m32c_unwind);
+  frame_unwind_append_unwinder (gdbarch, &m32c_unwind);
 
   /* Inferior calls.  */
-  set_gdbarch_push_dummy_call (arch, m32c_push_dummy_call);
-  set_gdbarch_return_value (arch, m32c_return_value);
-  set_gdbarch_dummy_id (arch, m32c_dummy_id);
+  set_gdbarch_push_dummy_call (gdbarch, m32c_push_dummy_call);
+  set_gdbarch_return_value (gdbarch, m32c_return_value);
+  set_gdbarch_dummy_id (gdbarch, m32c_dummy_id);
 
   /* Trampolines.  */
-  set_gdbarch_skip_trampoline_code (arch, m32c_skip_trampoline_code);
+  set_gdbarch_skip_trampoline_code (gdbarch, m32c_skip_trampoline_code);
 
-  set_gdbarch_virtual_frame_pointer (arch, m32c_virtual_frame_pointer);
+  set_gdbarch_virtual_frame_pointer (gdbarch, m32c_virtual_frame_pointer);
 
   /* m32c function boundary addresses are not necessarily even.
      Therefore, the `vbit', which indicates a pointer to a virtual
@@ -2693,9 +2681,9 @@ m32c_gdbarch_init (struct gdbarch_info i
      In order to verify this, see the definition of
      TARGET_PTRMEMFUNC_VBIT_LOCATION in gcc/defaults.h along with the
      definition of FUNCTION_BOUNDARY in gcc/config/m32c/m32c.h.  */
-  set_gdbarch_vbit_in_delta (arch, 1);
+  set_gdbarch_vbit_in_delta (gdbarch, 1);
 
-  return arch;
+  return gdbarch;
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-linux-nat.c ./gdb/m32r-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32r-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux m32r.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 #include "regcache.h"
 #include "linux-nat.h"
 #include "target.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/user.h>
 #include <sys/procfs.h>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-linux-tdep.c ./gdb/m32r-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32r-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux m32r.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -230,7 +230,7 @@ m32r_linux_sigtramp_frame_cache (struct 
   int regnum;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct m32r_frame_cache *) (*this_cache);
   cache = FRAME_OBSTACK_ZALLOC (struct m32r_frame_cache);
   (*this_cache) = cache;
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -351,7 +351,7 @@ m32r_linux_supply_gregset (const struct 
 			   struct regcache *regcache, int regnum,
 			   const void *gregs, size_t size)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   enum bfd_endian byte_order =
     gdbarch_byte_order (get_regcache_arch (regcache));
   ULONGEST psw, bbpsw;
@@ -394,7 +394,7 @@ m32r_linux_collect_gregset (const struct
 			    const struct regcache *regcache,
 			    int regnum, void *gregs, size_t size)
 {
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *) gregs;
   int i;
   enum bfd_endian byte_order =
     gdbarch_byte_order (get_regcache_arch (regcache));
@@ -447,7 +447,6 @@ m32r_linux_iterate_over_regset_sections 
 static void
 m32r_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   linux_init_abi (info, gdbarch);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-rom.c ./gdb/m32r-rom.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-rom.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32r-rom.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,634 +0,0 @@
-/* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, 
-   the GNU debugger.
-
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
-
-   Adapted by Michael Snyder of Cygnus Support.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* This module defines communication with the Renesas m32r monitor.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "symtab.h"
-#include "command.h"
-#include "gdbcmd.h"
-#include "symfile.h"		/* for generic load */
-#include <sys/time.h>
-#include <time.h>		/* for time_t */
-#include "objfiles.h"		/* for ALL_OBJFILES etc.  */
-#include "inferior.h"
-#include <ctype.h>
-#include "regcache.h"
-#include "gdb_bfd.h"
-#include "cli/cli-utils.h"
-
-/*
- * All this stuff just to get my host computer's IP address!
- */
-#ifdef __MINGW32__
-#include <winsock2.h>
-#else
-#include <sys/types.h>
-#include <netdb.h>		/* for hostent */
-#include <netinet/in.h>		/* for struct in_addr */
-#if 1
-#include <arpa/inet.h>		/* for inet_ntoa */
-#endif
-#endif
-
-static char *board_addr;	/* user-settable IP address for M32R-EVA */
-static char *server_addr;	/* user-settable IP address for gdb host */
-static char *download_path;	/* user-settable path for SREC files     */
-
-
-/* REGNUM */
-#define PSW_REGNUM      16
-#define SPI_REGNUM      18
-#define SPU_REGNUM      19
-#define ACCL_REGNUM     22
-#define ACCH_REGNUM     23
-
-
-/* 
- * Function: m32r_load_1 (helper function)
- */
-
-static void
-m32r_load_section (bfd *abfd, asection *s, void *obj)
-{
-  unsigned int *data_count = obj;
-  if (s->flags & SEC_LOAD)
-    {
-      int addr_size = gdbarch_addr_bit (target_gdbarch ()) / 8;
-      bfd_size_type section_size = bfd_section_size (abfd, s);
-      bfd_vma section_base = bfd_section_lma (abfd, s);
-      unsigned int buffer, i;
-
-      *data_count += section_size;
-
-      printf_filtered ("Loading section %s, size 0x%lx lma ",
-		       bfd_section_name (abfd, s),
-		       (unsigned long) section_size);
-      fputs_filtered (paddress (target_gdbarch (), section_base), gdb_stdout);
-      printf_filtered ("\n");
-      gdb_flush (gdb_stdout);
-      monitor_printf ("%s mw\r", phex_nz (section_base, addr_size));
-      for (i = 0; i < section_size; i += 4)
-	{
-	  QUIT;
-	  monitor_expect (" -> ", NULL, 0);
-	  bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
-	  monitor_printf ("%x\n", buffer);
-	}
-      monitor_expect (" -> ", NULL, 0);
-      monitor_printf ("q\n");
-      monitor_expect_prompt (NULL, 0);
-    }
-}
-
-static int
-m32r_load_1 (void *dummy)
-{
-  int data_count = 0;
-
-  bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count);
-  return data_count;
-}
-
-/* 
- * Function: m32r_load (an alternate way to load) 
- */
-
-static void
-m32r_load (char *filename, int from_tty)
-{
-  bfd *abfd;
-  unsigned int data_count = 0;
-  struct timeval start_time, end_time;
-  struct cleanup *cleanup;
-
-  if (filename == NULL || filename[0] == 0)
-    filename = get_exec_file (1);
-
-  abfd = gdb_bfd_open (filename, NULL, -1);
-  if (!abfd)
-    error (_("Unable to open file %s."), filename);
-  cleanup = make_cleanup_bfd_unref (abfd);
-  if (bfd_check_format (abfd, bfd_object) == 0)
-    error (_("File is not an object file."));
-  gettimeofday (&start_time, NULL);
-#if 0
-  for (s = abfd->sections; s; s = s->next)
-    if (s->flags & SEC_LOAD)
-      {
-	bfd_size_type section_size = bfd_section_size (abfd, s);
-	bfd_vma section_base = bfd_section_vma (abfd, s);
-	unsigned int buffer;
-
-	data_count += section_size;
-
-	printf_filtered ("Loading section %s, size 0x%lx vma ",
-			 bfd_section_name (abfd, s), section_size);
-	fputs_filtered (paddress (target_gdbarch (), section_base), gdb_stdout);
-	printf_filtered ("\n");
-	gdb_flush (gdb_stdout);
-	monitor_printf ("%x mw\r", section_base);
-	for (i = 0; i < section_size; i += 4)
-	  {
-	    monitor_expect (" -> ", NULL, 0);
-	    bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
-	    monitor_printf ("%x\n", buffer);
-	  }
-	monitor_expect (" -> ", NULL, 0);
-	monitor_printf ("q\n");
-	monitor_expect_prompt (NULL, 0);
-      }
-#else
-  if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
-    {
-      monitor_printf ("q\n");
-      do_cleanups (cleanup);
-      return;
-    }
-#endif
-  gettimeofday (&end_time, NULL);
-  printf_filtered ("Start address 0x%lx\n",
-		   (unsigned long) bfd_get_start_address (abfd));
-  print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
-			      &end_time);
-
-  /* Finally, make the PC point at the start address.  */
-  if (exec_bfd)
-    regcache_write_pc (get_current_regcache (),
-		       bfd_get_start_address (exec_bfd));
-
-  inferior_ptid = null_ptid;	/* No process now.  */
-
-  /* This is necessary because many things were based on the PC at the
-     time that we attached to the monitor, which is no longer valid
-     now that we have loaded new code (and just changed the PC).
-     Another way to do this might be to call normal_stop, except that
-     the stack may not be valid, and things would get horribly
-     confused...  */
-
-  clear_symtab_users (0);
-  do_cleanups (cleanup);
-}
-
-static void
-m32r_load_gen (struct target_ops *self, const char *filename, int from_tty)
-{
-  generic_load (filename, from_tty);
-}
-
-/* This array of registers needs to match the indexes used by GDB.  The
-   whole reason this exists is because the various ROM monitors use
-   different names than GDB does, and don't support all the registers
-   either.  So, typing "info reg sp" becomes an "A7".  */
-
-static char *m32r_regnames[] =
-  { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-  "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
-};
-
-static void
-m32r_supply_register (struct regcache *regcache, char *regname,
-		      int regnamelen, char *val, int vallen)
-{
-  int regno;
-  int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]);
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  for (regno = 0; regno < num_regs; regno++)
-    if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0)
-      break;
-
-  if (regno >= num_regs)
-    return;			/* no match */
-
-  if (regno == ACCL_REGNUM)
-    {				/* Special handling for 64-bit acc reg.  */
-      monitor_supply_register (regcache, ACCH_REGNUM, val);
-      val = strchr (val, ':');	/* Skip past ':' to get 2nd word.  */
-      if (val != NULL)
-	monitor_supply_register (regcache, ACCL_REGNUM, val + 1);
-    }
-  else
-    {
-      monitor_supply_register (regcache, regno, val);
-      if (regno == PSW_REGNUM)
-	{
-#if (defined SM_REGNUM || defined BSM_REGNUM || defined IE_REGNUM \
-     || defined BIE_REGNUM || defined COND_REGNUM  || defined CBR_REGNUM \
-     || defined BPC_REGNUM || defined BCARRY_REGNUM)
-	  unsigned long psw = strtoul (val, NULL, 16);
-	  char *zero = "00000000", *one = "00000001";
-#endif
-
-#ifdef SM_REGNUM
-	  /* Stack mode bit */
-	  monitor_supply_register (regcache, SM_REGNUM,
-				   (psw & 0x80) ? one : zero);
-#endif
-#ifdef BSM_REGNUM
-	  /* Backup stack mode bit */
-	  monitor_supply_register (regcache, BSM_REGNUM,
-				   (psw & 0x8000) ? one : zero);
-#endif
-#ifdef IE_REGNUM
-	  /* Interrupt enable bit */
-	  monitor_supply_register (regcache, IE_REGNUM,
-				   (psw & 0x40) ? one : zero);
-#endif
-#ifdef BIE_REGNUM
-	  /* Backup interrupt enable bit */
-	  monitor_supply_register (regcache, BIE_REGNUM,
-				   (psw & 0x4000) ? one : zero);
-#endif
-#ifdef COND_REGNUM
-	  /* Condition bit (carry etc.) */
-	  monitor_supply_register (regcache, COND_REGNUM,
-				   (psw & 0x1) ? one : zero);
-#endif
-#ifdef CBR_REGNUM
-	  monitor_supply_register (regcache, CBR_REGNUM,
-				   (psw & 0x1) ? one : zero);
-#endif
-#ifdef BPC_REGNUM
-	  monitor_supply_register (regcache, BPC_REGNUM,
-				   zero);	/* KLUDGE:   (???????) */
-#endif
-#ifdef BCARRY_REGNUM
-	  monitor_supply_register (regcache, BCARRY_REGNUM,
-				   zero);	/* KLUDGE: (??????) */
-#endif
-	}
-
-      if (regno == SPI_REGNUM || regno == SPU_REGNUM)
-	{	/* special handling for stack pointer (spu or spi).  */
-	  ULONGEST stackmode, psw;
-	  regcache_cooked_read_unsigned (regcache, PSW_REGNUM, &psw);
-	  stackmode = psw & 0x80;
-
-	  if (regno == SPI_REGNUM && !stackmode)	/* SP == SPI */
-	    monitor_supply_register (regcache,
-				     gdbarch_sp_regnum (gdbarch), val);
-	  else if (regno == SPU_REGNUM && stackmode)	/* SP == SPU */
-	    monitor_supply_register (regcache,
-				     gdbarch_sp_regnum (gdbarch), val);
-	}
-    }
-}
-
-/* m32r RevC board monitor */
-
-static struct target_ops m32r_ops;
-
-static char *m32r_inits[] = { "\r", NULL };
-
-static struct monitor_ops m32r_cmds;
-
-static void
-init_m32r_cmds (void)
-{
-  m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
-  m32r_cmds.init = m32r_inits;	/* Init strings */
-  m32r_cmds.cont = "go\r";	/* continue command */
-  m32r_cmds.step = "step\r";	/* single step */
-  m32r_cmds.stop = NULL;	/* interrupt command */
-  m32r_cmds.set_break = "%x +bp\r";	/* set a breakpoint */
-  m32r_cmds.clr_break = "%x -bp\r";	/* clear a breakpoint */
-  m32r_cmds.clr_all_break = "bpoff\r";	/* clear all breakpoints */
-  m32r_cmds.fill = "%x %x %x fill\r";	/* fill (start length val) */
-  m32r_cmds.setmem.cmdb = "%x 1 %x fill\r";	/* setmem.cmdb (addr, value) */
-  m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r";	/* setmem.cmdw (addr, value) */
-  m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r";	/* setmem.cmdl (addr, value) */
-  m32r_cmds.setmem.cmdll = NULL;	/* setmem.cmdll (addr, value) */
-  m32r_cmds.setmem.resp_delim = NULL;	/* setmem.resp_delim */
-  m32r_cmds.setmem.term = NULL;	/* setmem.term */
-  m32r_cmds.setmem.term_cmd = NULL;	/* setmem.term_cmd */
-  m32r_cmds.getmem.cmdb = "%x %x dump\r";	/* getmem.cmdb (addr, len) */
-  m32r_cmds.getmem.cmdw = NULL;	/* getmem.cmdw (addr, len) */
-  m32r_cmds.getmem.cmdl = NULL;	/* getmem.cmdl (addr, len) */
-  m32r_cmds.getmem.cmdll = NULL;	/* getmem.cmdll (addr, len) */
-  m32r_cmds.getmem.resp_delim = ": ";	/* getmem.resp_delim */
-  m32r_cmds.getmem.term = NULL;	/* getmem.term */
-  m32r_cmds.getmem.term_cmd = NULL;	/* getmem.term_cmd */
-  m32r_cmds.setreg.cmd = "%x to %%%s\r";	/* setreg.cmd (name, value) */
-  m32r_cmds.setreg.resp_delim = NULL;	/* setreg.resp_delim */
-  m32r_cmds.setreg.term = NULL;	/* setreg.term */
-  m32r_cmds.setreg.term_cmd = NULL;	/* setreg.term_cmd */
-  m32r_cmds.getreg.cmd = NULL;	/* getreg.cmd (name) */
-  m32r_cmds.getreg.resp_delim = NULL;	/* getreg.resp_delim */
-  m32r_cmds.getreg.term = NULL;	/* getreg.term */
-  m32r_cmds.getreg.term_cmd = NULL;	/* getreg.term_cmd */
-  m32r_cmds.dump_registers = ".reg\r";	/* dump_registers */
-  					/* register_pattern */
-  m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";
-  m32r_cmds.supply_register = m32r_supply_register;
-  m32r_cmds.load = NULL;	/* download command */
-  m32r_cmds.loadresp = NULL;	/* load response */
-  m32r_cmds.prompt = "ok ";	/* monitor command prompt */
-  m32r_cmds.line_term = "\r";	/* end-of-line terminator */
-  m32r_cmds.cmd_end = NULL;	/* optional command terminator */
-  m32r_cmds.target = &m32r_ops;	/* target operations */
-  m32r_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  m32r_cmds.regnames = m32r_regnames;	/* registers names */
-  m32r_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
-}				/* init_m32r_cmds */
-
-static void
-m32r_open (const char *args, int from_tty)
-{
-  monitor_open (args, &m32r_cmds, from_tty);
-}
-
-/* Mon2000 monitor (MSA2000 board) */
-
-static struct target_ops mon2000_ops;
-static struct monitor_ops mon2000_cmds;
-
-static void
-init_mon2000_cmds (void)
-{
-  mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
-  mon2000_cmds.init = m32r_inits;	/* Init strings */
-  mon2000_cmds.cont = "go\r";	/* continue command */
-  mon2000_cmds.step = "step\r";	/* single step */
-  mon2000_cmds.stop = NULL;	/* interrupt command */
-  mon2000_cmds.set_break = "%x +bp\r";	/* set a breakpoint */
-  mon2000_cmds.clr_break = "%x -bp\r";	/* clear a breakpoint */
-  mon2000_cmds.clr_all_break = "bpoff\r";	/* clear all breakpoints */
-  mon2000_cmds.fill = "%x %x %x fill\r";	/* fill (start length val) */
-  mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r";	/* setmem.cmdb (addr, value) */
-  mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r";	/* setmem.cmdw (addr, value) */
-  mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r";	/* setmem.cmdl (addr, value) */
-  mon2000_cmds.setmem.cmdll = NULL;	/* setmem.cmdll (addr, value) */
-  mon2000_cmds.setmem.resp_delim = NULL;	/* setmem.resp_delim */
-  mon2000_cmds.setmem.term = NULL;	/* setmem.term */
-  mon2000_cmds.setmem.term_cmd = NULL;	/* setmem.term_cmd */
-  mon2000_cmds.getmem.cmdb = "%x %x dump\r";	/* getmem.cmdb (addr, len) */
-  mon2000_cmds.getmem.cmdw = NULL;	/* getmem.cmdw (addr, len) */
-  mon2000_cmds.getmem.cmdl = NULL;	/* getmem.cmdl (addr, len) */
-  mon2000_cmds.getmem.cmdll = NULL;	/* getmem.cmdll (addr, len) */
-  mon2000_cmds.getmem.resp_delim = ": ";	/* getmem.resp_delim */
-  mon2000_cmds.getmem.term = NULL;	/* getmem.term */
-  mon2000_cmds.getmem.term_cmd = NULL;	/* getmem.term_cmd */
-  mon2000_cmds.setreg.cmd = "%x to %%%s\r";	/* setreg.cmd (name, value) */
-  mon2000_cmds.setreg.resp_delim = NULL;	/* setreg.resp_delim */
-  mon2000_cmds.setreg.term = NULL;	/* setreg.term */
-  mon2000_cmds.setreg.term_cmd = NULL;	/* setreg.term_cmd */
-  mon2000_cmds.getreg.cmd = NULL;	/* getreg.cmd (name) */
-  mon2000_cmds.getreg.resp_delim = NULL;	/* getreg.resp_delim */
-  mon2000_cmds.getreg.term = NULL;	/* getreg.term */
-  mon2000_cmds.getreg.term_cmd = NULL;	/* getreg.term_cmd */
-  mon2000_cmds.dump_registers = ".reg\r";	/* dump_registers */
-						/* register_pattern */
-  mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";
-  mon2000_cmds.supply_register = m32r_supply_register;
-  mon2000_cmds.load = NULL;	/* download command */
-  mon2000_cmds.loadresp = NULL;	/* load response */
-  mon2000_cmds.prompt = "Mon2000>";	/* monitor command prompt */
-  mon2000_cmds.line_term = "\r";	/* end-of-line terminator */
-  mon2000_cmds.cmd_end = NULL;	/* optional command terminator */
-  mon2000_cmds.target = &mon2000_ops;	/* target operations */
-  mon2000_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  mon2000_cmds.regnames = m32r_regnames;	/* registers names */
-  mon2000_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
-}				/* init_mon2000_cmds */
-
-static void
-mon2000_open (const char *args, int from_tty)
-{
-  monitor_open (args, &mon2000_cmds, from_tty);
-}
-
-static void
-m32r_upload_command (char *args, int from_tty)
-{
-  bfd *abfd;
-  asection *s;
-  struct timeval start_time, end_time;
-  int resp_len, data_count = 0;
-  char buf[1024];
-  struct hostent *hostent;
-  struct in_addr inet_addr;
-  struct cleanup *cleanup;
-
-  /* First check to see if there's an ethernet port!  */
-  monitor_printf ("ust\r");
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));
-  if (!strchr (buf, ':'))
-    error (_("No ethernet connection!"));
-
-  if (board_addr == 0)
-    {
-      /* Scan second colon in the output from the "ust" command.  */
-      char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1;
-
-      myIPaddress = skip_spaces (myIPaddress);
-
-      if (startswith (myIPaddress, "0.0."))	/* empty */
-	error (_("Please use 'set board-address' to "
-		 "set the M32R-EVA board's IP address."));
-      if (strchr (myIPaddress, '('))
-	*(strchr (myIPaddress, '(')) = '\0';	/* delete trailing junk */
-      board_addr = xstrdup (myIPaddress);
-    }
-  if (server_addr == 0)
-    {
-#ifdef __MINGW32__
-      WSADATA wd;
-      /* Winsock initialization.  */
-      if (WSAStartup (MAKEWORD (1, 1), &wd))
-	error (_("Couldn't initialize WINSOCK."));
-#endif
-
-      buf[0] = 0;
-      gethostname (buf, sizeof (buf));
-      if (buf[0] != 0)
-	{
-	  hostent = gethostbyname (buf);
-	  if (hostent != 0)
-	    {
-#if 1
-	      memcpy (&inet_addr.s_addr, hostent->h_addr,
-		      sizeof (inet_addr.s_addr));
-	      server_addr = (char *) inet_ntoa (inet_addr);
-#else
-	      server_addr = (char *) inet_ntoa (hostent->h_addr);
-#endif
-	    }
-	}
-      if (server_addr == 0)	/* failed?  */
-	error (_("Need to know gdb host computer's "
-		 "IP address (use 'set server-address')"));
-    }
-
-  if (args == 0 || args[0] == 0)	/* No args: upload the current
-					   file.  */
-    args = get_exec_file (1);
-
-  if (args[0] != '/' && download_path == 0)
-    {
-      if (current_directory)
-	download_path = xstrdup (current_directory);
-      else
-	error (_("Need to know default download "
-		 "path (use 'set download-path')"));
-    }
-
-  gettimeofday (&start_time, NULL);
-  monitor_printf ("uhip %s\r", server_addr);
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));	/* parse result?  */
-  monitor_printf ("ulip %s\r", board_addr);
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));	/* parse result?  */
-  if (args[0] != '/')
-    monitor_printf ("up %s\r", download_path);	/* use default path */
-  else
-    monitor_printf ("up\r");	/* rooted filename/path */
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));	/* parse result?  */
-
-  if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec"))
-    monitor_printf ("ul %s\r", args);
-  else				/* add ".srec" suffix */
-    monitor_printf ("ul %s.srec\r", args);
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));	/* parse result?  */
-
-  if (buf[0] == 0 || strstr (buf, "complete") == 0)
-    error (_("Upload file not found: %s.srec\n"
-	     "Check IP addresses and download path."),
-	   args);
-  else
-    printf_filtered (" -- Ethernet load complete.\n");
-
-  gettimeofday (&end_time, NULL);
-  abfd = gdb_bfd_open (args, NULL, -1);
-  cleanup = make_cleanup_bfd_unref (abfd);
-  if (abfd != NULL)
-    {		/* Download is done -- print section statistics.  */
-      if (bfd_check_format (abfd, bfd_object) == 0)
-	{
-	  printf_filtered ("File is not an object file\n");
-	}
-      for (s = abfd->sections; s; s = s->next)
-	if (s->flags & SEC_LOAD)
-	  {
-	    bfd_size_type section_size = bfd_section_size (abfd, s);
-	    bfd_vma section_base = bfd_section_lma (abfd, s);
-
-	    data_count += section_size;
-
-	    printf_filtered ("Loading section %s, size 0x%lx lma ",
-			     bfd_section_name (abfd, s),
-			     (unsigned long) section_size);
-	    fputs_filtered (paddress (target_gdbarch (), section_base),
-			    gdb_stdout);
-	    printf_filtered ("\n");
-	    gdb_flush (gdb_stdout);
-	  }
-      /* Finally, make the PC point at the start address.  */
-      regcache_write_pc (get_current_regcache (),
-			 bfd_get_start_address (abfd));
-      printf_filtered ("Start address 0x%lx\n", 
-		       (unsigned long) bfd_get_start_address (abfd));
-      print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
-				  &end_time);
-    }
-  inferior_ptid = null_ptid;	/* No process now.  */
-
-  /* This is necessary because many things were based on the PC at the
-     time that we attached to the monitor, which is no longer valid
-     now that we have loaded new code (and just changed the PC).
-     Another way to do this might be to call normal_stop, except that
-     the stack may not be valid, and things would get horribly
-     confused...  */
-
-  clear_symtab_users (0);
-  do_cleanups (cleanup);
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_m32r_rom;
-
-void
-_initialize_m32r_rom (void)
-{
-  /* Initialize m32r RevC monitor target.  */
-  init_m32r_cmds ();
-  init_monitor_ops (&m32r_ops);
-
-  m32r_ops.to_shortname = "m32r";
-  m32r_ops.to_longname = "m32r monitor";
-  m32r_ops.to_load = m32r_load_gen;	/* Monitor lacks a download
-					   command.  */
-  m32r_ops.to_doc = "Debug via the m32r monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  m32r_ops.to_open = m32r_open;
-  add_target (&m32r_ops);
-
-  /* Initialize mon2000 monitor target */
-  init_mon2000_cmds ();
-  init_monitor_ops (&mon2000_ops);
-
-  mon2000_ops.to_shortname = "mon2000";
-  mon2000_ops.to_longname = "Mon2000 monitor";
-  mon2000_ops.to_load = m32r_load_gen;	/* Monitor lacks a download
-					   command.  */
-  mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  mon2000_ops.to_open = mon2000_open;
-  add_target (&mon2000_ops);
-
-  add_setshow_string_cmd ("download-path", class_obscure, &download_path, _("\
-Set the default path for downloadable SREC files."), _("\
-Show the default path for downloadable SREC files."), _("\
-Determines the default path for downloadable SREC files."),
-			  NULL,
-			  NULL, /* FIXME: i18n: The default path for
-				   downloadable SREC files is %s.  */
-			  &setlist, &showlist);
-
-  add_setshow_string_cmd ("board-address", class_obscure, &board_addr, _("\
-Set IP address for M32R-EVA target board."), _("\
-Show IP address for M32R-EVA target board."), _("\
-Determine the IP address for M32R-EVA target board."),
-			  NULL,
-			  NULL, /* FIXME: i18n: IP address for
-				   M32R-EVA target board is %s.  */
-			  &setlist, &showlist);
-
-  add_setshow_string_cmd ("server-address", class_obscure, &server_addr, _("\
-Set IP address for download server (GDB's host computer)."), _("\
-Show IP address for download server (GDB's host computer)."), _("\
-Determine the IP address for download server (GDB's host computer)."),
-			  NULL,
-			  NULL, /* FIXME: i18n: IP address for
-				   download server (GDB's host
-				   computer) is %s.  */
-			  &setlist, &showlist);
-
-  add_com ("upload", class_obscure, m32r_upload_command, _("\
-Upload the srec file via the monitor's Ethernet upload capability."));
-
-  add_com ("tload", class_obscure, m32r_load, _("test upload command."));
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-tdep.c ./gdb/m32r-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32r-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Renesas M32R, for GDB.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,8 +36,8 @@
 #include "trad-frame.h"
 #include "dis-asm.h"
 #include "objfiles.h"
-
 #include "m32r-tdep.h"
+#include <algorithm>
 
 /* Local functions */
 
@@ -91,7 +91,7 @@ m32r_memory_insert_breakpoint (struct gd
     return val;			/* return error */
 
   memcpy (bp_tgt->shadow_contents, contents_cache, 4);
-  bp_tgt->placed_size = bp_tgt->shadow_len = 4;
+  bp_tgt->shadow_len = 4;
 
   /* Determine appropriate breakpoint contents and size for this address.  */
   if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
@@ -165,9 +165,21 @@ m32r_memory_remove_breakpoint (struct gd
   return val;
 }
 
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+m32r_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  if ((*pcptr & 3) == 0)
+    return 4;
+  else
+    return 2;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
 static const gdb_byte *
-m32r_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
+m32r_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
   static gdb_byte be_bp_entry[] = {
     0x10, 0xf1, 0x70, 0x00
@@ -175,40 +187,21 @@ m32r_breakpoint_from_pc (struct gdbarch 
   static gdb_byte le_bp_entry[] = {
     0x00, 0x70, 0xf1, 0x10
   };	/* dpt -> nop */
-  gdb_byte *bp;
+
+  *size = kind;
 
   /* Determine appropriate breakpoint.  */
   if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
-    {
-      if ((*pcptr & 3) == 0)
-	{
-	  bp = be_bp_entry;
-	  *lenptr = 4;
-	}
-      else
-	{
-	  bp = be_bp_entry;
-	  *lenptr = 2;
-	}
-    }
+    return be_bp_entry;
   else
     {
-      if ((*pcptr & 3) == 0)
-	{
-	  bp = le_bp_entry;
-	  *lenptr = 4;
-	}
+      if (kind == 4)
+	return le_bp_entry;
       else
-	{
-	  bp = le_bp_entry + 2;
-	  *lenptr = 2;
-	}
+	return le_bp_entry + 2;
     }
-
-  return bp;
 }
 
-
 char *m32r_register_names[] = {
   "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
   "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp",
@@ -249,7 +242,7 @@ m32r_register_type (struct gdbarch *gdba
 
 static void
 m32r_store_return_value (struct type *type, struct regcache *regcache,
-			 const void *valbuf)
+			 const gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -261,7 +254,7 @@ m32r_store_return_value (struct type *ty
 
   if (len > 4)
     {
-      regval = extract_unsigned_integer ((gdb_byte *) valbuf + 4,
+      regval = extract_unsigned_integer (valbuf + 4,
 					 len - 4, byte_order);
       regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);
     }
@@ -355,9 +348,7 @@ decode_prologue (struct gdbarch *gdbarch
 
       if ((insn & 0xf0ff) == 0x207f)
 	{			/* st reg, @-sp */
-	  int regno;
 	  framesize += 4;
-	  regno = ((insn >> 8) & 0xf);
 	  after_prologue = 0;
 	  continue;
 	}
@@ -486,7 +477,7 @@ m32r_skip_prologue (struct gdbarch *gdba
 	   the end of the function.  In this case, there probably isn't a
 	   prologue.  */
 	{
-	  func_end = min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
+	  func_end = std::min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
 	}
     }
   else
@@ -540,7 +531,7 @@ m32r_frame_unwind_cache (struct frame_in
 
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct m32r_unwind_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct m32r_unwind_cache);
   (*this_prologue_cache) = info;
@@ -776,25 +767,24 @@ m32r_push_dummy_call (struct gdbarch *gd
 
 static void
 m32r_extract_return_value (struct type *type, struct regcache *regcache,
-			   void *dst)
+			   gdb_byte *dst)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  bfd_byte *valbuf = dst;
   int len = TYPE_LENGTH (type);
   ULONGEST tmp;
 
   /* By using store_unsigned_integer we avoid having to do
      anything special for small big-endian values.  */
   regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &tmp);
-  store_unsigned_integer (valbuf, (len > 4 ? len - 4 : len), byte_order, tmp);
+  store_unsigned_integer (dst, (len > 4 ? len - 4 : len), byte_order, tmp);
 
   /* Ignore return values more than 8 bytes in size because the m32r
      returns anything more than 8 bytes in the stack.  */
   if (len > 4)
     {
       regcache_cooked_read_unsigned (regcache, RET1_REGNUM + 1, &tmp);
-      store_unsigned_integer (valbuf + len - 4, 4, byte_order, tmp);
+      store_unsigned_integer (dst + len - 4, 4, byte_order, tmp);
     }
 }
 
@@ -932,7 +922,8 @@ m32r_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, m32r_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32r_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32r_sw_breakpoint_from_kind);
   set_gdbarch_memory_insert_breakpoint (gdbarch,
 					m32r_memory_insert_breakpoint);
   set_gdbarch_memory_remove_breakpoint (gdbarch,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-tdep.h ./gdb/m32r-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m32r-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m32r-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Renesas M32R, for GDB.
  
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68hc11-tdep.c ./gdb/m68hc11-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68hc11-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68hc11-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Motorola 68HC11 & 68HC12
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Stephane Carrez, stcarrez@nerim.fr
 
@@ -337,7 +337,7 @@ m68hc11_pseudo_register_write (struct gd
   if (regno == M68HC12_HARD_PC_REGNUM)
     {
       const int regsize = 4;
-      gdb_byte *tmp = alloca (regsize);
+      gdb_byte *tmp = (gdb_byte *) alloca (regsize);
       CORE_ADDR pc;
 
       memcpy (tmp, buf, regsize);
@@ -362,7 +362,7 @@ m68hc11_pseudo_register_write (struct gd
   if (soft_regs[regno].name)
     {
       const int regsize = 2;
-      gdb_byte *tmp = alloca (regsize);
+      gdb_byte *tmp = (gdb_byte *) alloca (regsize);
       memcpy (tmp, buf, regsize);
       target_write_memory (soft_regs[regno].addr, tmp, regsize);
     }
@@ -390,16 +390,9 @@ m68hc11_register_name (struct gdbarch *g
   return m68hc11_register_names[reg_nr];
 }
 
-static const unsigned char *
-m68hc11_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			    int *lenptr)
-{
-  static unsigned char breakpoint[] = {0x0};
-
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+constexpr gdb_byte m68hc11_break_insn[] = {0x0};
 
+typedef BP_MANIPULATION (m68hc11_break_insn) m68hc11_breakpoint;
 
 /* 68HC11 & 68HC12 prologue analysis.  */
 
@@ -792,7 +785,7 @@ m68hc11_frame_unwind_cache (struct frame
   int i;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct m68hc11_unwind_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct m68hc11_unwind_cache);
   (*this_prologue_cache) = info;
@@ -1451,7 +1444,7 @@ m68hc11_gdbarch_init (struct gdbarch_inf
     }
 
   /* Need a new architecture.  Fill in a target specific vector.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
 
@@ -1528,7 +1521,10 @@ m68hc11_gdbarch_init (struct gdbarch_inf
   set_gdbarch_return_value (gdbarch, m68hc11_return_value);
   set_gdbarch_skip_prologue (gdbarch, m68hc11_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, m68hc11_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       m68hc11_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       m68hc11_breakpoint::bp_from_kind);
   set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
 
   m68hc11_add_reggroups (gdbarch);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-bsd-nat.c ./gdb/m68k-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/m68k-bsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,237 @@
+/* Native-dependent code for Motorola 68000 BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "m68k-tdep.h"
+#include "inf-ptrace.h"
+
+static int
+m68kbsd_gregset_supplies_p (int regnum)
+{
+  return (regnum >= M68K_D0_REGNUM && regnum <= M68K_PC_REGNUM);
+}
+
+static int
+m68kbsd_fpregset_supplies_p (int regnum)
+{
+  return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FPI_REGNUM);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const char *regs = gregs;
+  int regnum;
+
+  for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
+
+static void
+m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  const char *regs = fpregs;
+  int regnum;
+
+  for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum,
+			 regs + m68kbsd_fpreg_offset (gdbarch, regnum));
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+m68kbsd_collect_gregset (const struct regcache *regcache,
+			 void *gregs, int regnum)
+{
+  char *regs = gregs;
+  int i;
+
+  for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 4);
+    }
+}
+
+/* Collect the floating-point registers from REGCACHE and store them
+   in FPREGS.  */
+
+static void
+m68kbsd_collect_fpregset (struct regcache *regcache,
+			  void *fpregs, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  char *regs = fpregs;
+  int i;
+
+  for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i,
+			      regs + m68kbsd_fpreg_offset (gdbarch, i));
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers (including the floating-point registers).  */
+
+static void
+m68kbsd_fetch_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      m68kbsd_supply_gregset (regcache, &regs);
+    }
+
+  if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      m68kbsd_supply_fpregset (regcache, &fpregs);
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers (including the floating-point registers).  */
+
+static void
+m68kbsd_store_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      m68kbsd_collect_gregset (regcache, &regs, regnum);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't write registers"));
+    }
+
+  if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      m68kbsd_collect_fpregset (regcache, &fpregs, regnum);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+/* OpenBSD doesn't have these.  */
+#ifndef PCB_REGS_FP
+#define PCB_REGS_FP 10
+#endif
+#ifndef PCB_REGS_SP
+#define PCB_REGS_SP 11
+#endif
+
+static int
+m68kbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  int regnum, tmp;
+  int i = 0;
+
+  /* The following is true for NetBSD 1.6.2:
+
+     The pcb contains %d2...%d7, %a2...%a7 and %ps.  This accounts for
+     all callee-saved registers.  From this information we reconstruct
+     the register state as it would look when we just returned from
+     cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_regs[PCB_REGS_SP] == 0)
+    return 0;
+
+  for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+  for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+
+  tmp = pcb->pcb_ps & 0xffff;
+  regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp);
+
+  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp);
+  regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_m68kbsd_nat (void);
+
+void
+_initialize_m68kbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = m68kbsd_fetch_inferior_registers;
+  t->to_store_registers = m68kbsd_store_inferior_registers;
+  add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (m68kbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68kbsd-nat.c ./gdb/m68kbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68kbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68kbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,237 +0,0 @@
-/* Native-dependent code for Motorola 68000 BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "m68k-tdep.h"
-#include "inf-ptrace.h"
-
-static int
-m68kbsd_gregset_supplies_p (int regnum)
-{
-  return (regnum >= M68K_D0_REGNUM && regnum <= M68K_PC_REGNUM);
-}
-
-static int
-m68kbsd_fpregset_supplies_p (int regnum)
-{
-  return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FPI_REGNUM);
-}
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const char *regs = gregs;
-  int regnum;
-
-  for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-}
-
-/* Supply the floating-point registers stored in FPREGS to REGCACHE.  */
-
-static void
-m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const char *regs = fpregs;
-  int regnum;
-
-  for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum,
-			 regs + m68kbsd_fpreg_offset (gdbarch, regnum));
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-m68kbsd_collect_gregset (const struct regcache *regcache,
-			 void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int i;
-
-  for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 4);
-    }
-}
-
-/* Collect the floating-point registers from REGCACHE and store them
-   in FPREGS.  */
-
-static void
-m68kbsd_collect_fpregset (struct regcache *regcache,
-			  void *fpregs, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  char *regs = fpregs;
-  int i;
-
-  for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i,
-			      regs + m68kbsd_fpreg_offset (gdbarch, i));
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers (including the floating-point registers).  */
-
-static void
-m68kbsd_fetch_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      m68kbsd_supply_gregset (regcache, &regs);
-    }
-
-  if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      m68kbsd_supply_fpregset (regcache, &fpregs);
-    }
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating-point registers).  */
-
-static void
-m68kbsd_store_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      m68kbsd_collect_gregset (regcache, &regs, regnum);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	          (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
-    }
-
-  if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      m68kbsd_collect_fpregset (regcache, &fpregs, regnum);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-/* OpenBSD doesn't have these.  */
-#ifndef PCB_REGS_FP
-#define PCB_REGS_FP 10
-#endif
-#ifndef PCB_REGS_SP
-#define PCB_REGS_SP 11
-#endif
-
-static int
-m68kbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  int regnum, tmp;
-  int i = 0;
-
-  /* The following is true for NetBSD 1.6.2:
-
-     The pcb contains %d2...%d7, %a2...%a7 and %ps.  This accounts for
-     all callee-saved registers.  From this information we reconstruct
-     the register state as it would look when we just returned from
-     cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_regs[PCB_REGS_SP] == 0)
-    return 0;
-
-  for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
-  for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
-
-  tmp = pcb->pcb_ps & 0xffff;
-  regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp);
-
-  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp);
-  regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_m68kbsd_nat (void);
-
-void
-_initialize_m68kbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = m68kbsd_fetch_inferior_registers;
-  t->to_store_registers = m68kbsd_store_inferior_registers;
-  add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (m68kbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-bsd-tdep.c ./gdb/m68k-bsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-bsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/m68k-bsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,163 @@
+/* Target-dependent code for Motorola 68000 BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+#include "gdbtypes.h"
+
+#include "m68k-tdep.h"
+#include "solib-svr4.h"
+
+/* Core file support.  */
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define M68KBSD_SIZEOF_GREGS	(18 * 4)
+
+/* Sizeof `struct fpreg' in <machine/reg.h.  */
+#define M68KBSD_SIZEOF_FPREGS	(((8 * 3) + 3) * 4)
+
+int
+m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum)
+{
+  int fp_len = TYPE_LENGTH (gdbarch_register_type (gdbarch, regnum));
+  
+  if (regnum >= M68K_FPC_REGNUM)
+    return 8 * fp_len + (regnum - M68K_FPC_REGNUM) * 4;
+
+  return (regnum - M68K_FP0_REGNUM) * fp_len;
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+m68kbsd_supply_fpregset (const struct regset *regset,
+			 struct regcache *regcache,
+			 int regnum, const void *fpregs, size_t len)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
+  int i;
+
+  gdb_assert (len >= M68KBSD_SIZEOF_FPREGS);
+
+  for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i,
+			     regs + m68kbsd_fpreg_offset (gdbarch, i));
+    }
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+m68kbsd_supply_gregset (const struct regset *regset,
+			struct regcache *regcache,
+			int regnum, const void *gregs, size_t len)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  gdb_assert (len >= M68KBSD_SIZEOF_GREGS);
+
+  for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + i * 4);
+    }
+
+  if (len >= M68KBSD_SIZEOF_GREGS + M68KBSD_SIZEOF_FPREGS)
+    {
+      regs += M68KBSD_SIZEOF_GREGS;
+      len -= M68KBSD_SIZEOF_GREGS;
+      m68kbsd_supply_fpregset (regset, regcache, regnum, regs, len);
+    }
+}
+
+/* Motorola 68000 register sets.  */
+
+static const struct regset m68kbsd_gregset =
+{
+  NULL,
+  m68kbsd_supply_gregset,
+  NULL,
+  REGSET_VARIABLE_SIZE
+};
+
+static const struct regset m68kbsd_fpregset =
+{
+  NULL,
+  m68kbsd_supply_fpregset
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+m68kbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				      iterate_over_regset_sections_cb *cb,
+				      void *cb_data,
+				      const struct regcache *regcache)
+{
+  cb (".reg", M68KBSD_SIZEOF_GREGS, &m68kbsd_gregset, NULL, cb_data);
+  cb (".reg2", M68KBSD_SIZEOF_FPREGS, &m68kbsd_fpregset, NULL, cb_data);
+}
+
+
+static void
+m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->jb_pc = 5;
+  tdep->jb_elt_size = 4;
+
+  set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, m68kbsd_iterate_over_regset_sections);
+
+  /* NetBSD ELF uses the SVR4 ABI.  */
+  m68k_svr4_init_abi (info, gdbarch);
+  tdep->struct_return = pcc_struct_return;
+
+  /* NetBSD ELF uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_m68kbsd_tdep (void);
+
+void
+_initialize_m68kbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_NETBSD,
+			  m68kbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68kbsd-tdep.c ./gdb/m68kbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68kbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68kbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,270 +0,0 @@
-/* Target-dependent code for Motorola 68000 BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "trad-frame.h"
-#include "tramp-frame.h"
-#include "gdbtypes.h"
-
-#include "m68k-tdep.h"
-#include "solib-svr4.h"
-
-/* Core file support.  */
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define M68KBSD_SIZEOF_GREGS	(18 * 4)
-
-/* Sizeof `struct fpreg' in <machine/reg.h.  */
-#define M68KBSD_SIZEOF_FPREGS	(((8 * 3) + 3) * 4)
-
-int
-m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum)
-{
-  int fp_len = TYPE_LENGTH (gdbarch_register_type (gdbarch, regnum));
-  
-  if (regnum >= M68K_FPC_REGNUM)
-    return 8 * fp_len + (regnum - M68K_FPC_REGNUM) * 4;
-
-  return (regnum - M68K_FP0_REGNUM) * fp_len;
-}
-
-/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-   in the floating-point register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-m68kbsd_supply_fpregset (const struct regset *regset,
-			 struct regcache *regcache,
-			 int regnum, const void *fpregs, size_t len)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const gdb_byte *regs = fpregs;
-  int i;
-
-  gdb_assert (len >= M68KBSD_SIZEOF_FPREGS);
-
-  for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i,
-			     regs + m68kbsd_fpreg_offset (gdbarch, i));
-    }
-}
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-m68kbsd_supply_gregset (const struct regset *regset,
-			struct regcache *regcache,
-			int regnum, const void *gregs, size_t len)
-{
-  const gdb_byte *regs = gregs;
-  int i;
-
-  gdb_assert (len >= M68KBSD_SIZEOF_GREGS);
-
-  for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * 4);
-    }
-
-  if (len >= M68KBSD_SIZEOF_GREGS + M68KBSD_SIZEOF_FPREGS)
-    {
-      regs += M68KBSD_SIZEOF_GREGS;
-      len -= M68KBSD_SIZEOF_GREGS;
-      m68kbsd_supply_fpregset (regset, regcache, regnum, regs, len);
-    }
-}
-
-/* Motorola 68000 register sets.  */
-
-static const struct regset m68kbsd_gregset =
-{
-  NULL,
-  m68kbsd_supply_gregset,
-  NULL,
-  REGSET_VARIABLE_SIZE
-};
-
-static const struct regset m68kbsd_fpregset =
-{
-  NULL,
-  m68kbsd_supply_fpregset
-};
-
-/* Iterate over core file register note sections.  */
-
-static void
-m68kbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				      iterate_over_regset_sections_cb *cb,
-				      void *cb_data,
-				      const struct regcache *regcache)
-{
-  cb (".reg", M68KBSD_SIZEOF_GREGS, &m68kbsd_gregset, NULL, cb_data);
-  cb (".reg2", M68KBSD_SIZEOF_FPREGS, &m68kbsd_fpregset, NULL, cb_data);
-}
-
-
-/* Signal trampolines.  */
-
-static void
-m68kobsd_sigtramp_cache_init (const struct tramp_frame *self,
-			      struct frame_info *this_frame,
-			      struct trad_frame_cache *this_cache,
-			      CORE_ADDR func)
-{
-  CORE_ADDR addr, base, pc;
-  int regnum;
-
-  base = get_frame_register_unsigned (this_frame, M68K_SP_REGNUM);
-
-  /* The 'addql #4,%sp' instruction at offset 8 adjusts the stack
-     pointer.  Adjust the frame base accordingly.  */
-  pc = get_frame_register_unsigned (this_frame, M68K_PC_REGNUM);
-  if ((pc - func) > 8)
-    base -= 4;
-
-  /* Get frame pointer, stack pointer, program counter and processor
-     state from `struct sigcontext'.  */
-  addr = get_frame_memory_unsigned (this_frame, base + 8, 4);
-  trad_frame_set_reg_addr (this_cache, M68K_FP_REGNUM, addr + 8);
-  trad_frame_set_reg_addr (this_cache, M68K_SP_REGNUM, addr + 12);
-  trad_frame_set_reg_addr (this_cache, M68K_PC_REGNUM, addr + 20);
-  trad_frame_set_reg_addr (this_cache, M68K_PS_REGNUM, addr + 24);
-
-  /* The sc_ap member of `struct sigcontext' points to additional
-     hardware state.  Here we find the missing registers.  */
-  addr = get_frame_memory_unsigned (this_frame, addr + 16, 4) + 4;
-  for (regnum = M68K_D0_REGNUM; regnum < M68K_FP_REGNUM; regnum++, addr += 4)
-    trad_frame_set_reg_addr (this_cache, regnum, addr);
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (this_cache, frame_id_build (base, func));
-}
-
-static const struct tramp_frame m68kobsd_sigtramp = {
-  SIGTRAMP_FRAME,
-  2,
-  {
-    { 0x206f, -1 }, { 0x000c, -1},	/* moveal %sp@(12),%a0 */
-    { 0x4e90, -1 },			/* jsr %a0@ */
-    { 0x588f, -1 },			/* addql #4,%sp */
-    { 0x4e41, -1 },			/* trap #1 */
-    { 0x2f40, -1 }, { 0x0004, -1 },	/* moveal %d0,%sp@(4) */
-    { 0x7001, -1 },			/* moveq #SYS_exit,%d0 */
-    { 0x4e40, -1 },			/* trap #0 */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  m68kobsd_sigtramp_cache_init
-};
-
-
-static void
-m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->jb_pc = 5;
-  tdep->jb_elt_size = 4;
-
-  set_gdbarch_decr_pc_after_break (gdbarch, 2);
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, m68kbsd_iterate_over_regset_sections);
-}
-
-/* OpenBSD and NetBSD a.out.  */
-
-static void
-m68kbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  m68kbsd_init_abi (info, gdbarch);
-
-  tdep->struct_return = reg_struct_return;
-
-  tramp_frame_prepend_unwinder (gdbarch, &m68kobsd_sigtramp);
-}
-
-/* NetBSD ELF.  */
-
-static void
-m68kbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  m68kbsd_init_abi (info, gdbarch);
-
-  /* NetBSD ELF uses the SVR4 ABI.  */
-  m68k_svr4_init_abi (info, gdbarch);
-  tdep->struct_return = pcc_struct_return;
-
-  /* NetBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-
-static enum gdb_osabi
-m68kbsd_aout_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "a.out-m68k-netbsd") == 0
-      || strcmp (bfd_get_target (abfd), "a.out-m68k4k-netbsd") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-static enum gdb_osabi
-m68kbsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_m68kbsd_tdep (void);
-
-void
-_initialize_m68kbsd_tdep (void)
-{
-  gdbarch_register_osabi_sniffer (bfd_arch_m68k, bfd_target_aout_flavour,
-				  m68kbsd_aout_osabi_sniffer);
-
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_m68k, bfd_target_unknown_flavour,
-				  m68kbsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_NETBSD_AOUT,
-			  m68kbsd_aout_init_abi);
-  gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_NETBSD_ELF,
-			  m68kbsd_elf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-linux-nat.c ./gdb/m68k-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-linux-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/m68k-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,542 @@
+/* Motorola m68k native support for GNU/Linux.
+
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "inferior.h"
+#include "language.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+#include "linux-nat.h"
+
+#include "m68k-tdep.h"
+
+#include <sys/dir.h>
+#include <signal.h>
+#include "nat/gdb_ptrace.h"
+#include <sys/user.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <sys/procfs.h>
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
+#include <sys/file.h>
+#include <sys/stat.h>
+
+#include "floatformat.h"
+
+/* Prototypes for supply_gregset etc.  */
+#include "gregset.h"
+
+/* Defines ps_err_e, struct ps_prochandle.  */
+#include "gdb_proc_service.h"
+
+#ifndef PTRACE_GET_THREAD_AREA
+#define PTRACE_GET_THREAD_AREA 25
+#endif
+
+/* This table must line up with gdbarch_register_name in "m68k-tdep.c".  */
+static const int regmap[] =
+{
+  PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
+  PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
+  PT_SR, PT_PC,
+  /* PT_FP0, ..., PT_FP7 */
+  21, 24, 27, 30, 33, 36, 39, 42,
+  /* PT_FPCR, PT_FPSR, PT_FPIAR */
+  45, 46, 47
+};
+
+/* Which ptrace request retrieves which registers?
+   These apply to the corresponding SET requests as well.  */
+#define NUM_GREGS (18)
+#define MAX_NUM_REGS (NUM_GREGS + 11)
+
+static int
+getregs_supplies (int regno)
+{
+  return 0 <= regno && regno < NUM_GREGS;
+}
+
+static int
+getfpregs_supplies (int regno)
+{
+  return M68K_FP0_REGNUM <= regno && regno <= M68K_FPI_REGNUM;
+}
+
+/* Does the current host support the GETREGS request?  */
+static int have_ptrace_getregs =
+#ifdef HAVE_PTRACE_GETREGS
+  1
+#else
+  0
+#endif
+;
+
+
+
+/* Fetching registers directly from the U area, one at a time.  */
+
+/* Fetch one register.  */
+
+static void
+fetch_register (struct regcache *regcache, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  long regaddr, val;
+  int i;
+  gdb_byte buf[M68K_MAX_REGISTER_SIZE];
+  int tid;
+
+  /* Overload thread id onto process id.  */
+  tid = ptid_get_lwp (inferior_ptid);
+  if (tid == 0)
+    tid = ptid_get_pid (inferior_ptid);	/* no thread id, just use
+					   process id.  */
+
+  regaddr = 4 * regmap[regno];
+  for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
+    {
+      errno = 0;
+      val = ptrace (PTRACE_PEEKUSER, tid, regaddr, 0);
+      memcpy (&buf[i], &val, sizeof (long));
+      regaddr += sizeof (long);
+      if (errno != 0)
+	error (_("Couldn't read register %s (#%d): %s."), 
+	       gdbarch_register_name (gdbarch, regno),
+	       regno, safe_strerror (errno));
+    }
+  regcache_raw_supply (regcache, regno, buf);
+}
+
+/* Fetch register values from the inferior.
+   If REGNO is negative, do this for all registers.
+   Otherwise, REGNO specifies which register (so we can save time).  */
+
+static void
+old_fetch_inferior_registers (struct regcache *regcache, int regno)
+{
+  if (regno >= 0)
+    {
+      fetch_register (regcache, regno);
+    }
+  else
+    {
+      for (regno = 0;
+	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
+	   regno++)
+	{
+	  fetch_register (regcache, regno);
+	}
+    }
+}
+
+/* Store one register.  */
+
+static void
+store_register (const struct regcache *regcache, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  long regaddr, val;
+  int i;
+  int tid;
+  gdb_byte buf[M68K_MAX_REGISTER_SIZE];
+
+  /* Overload thread id onto process id.  */
+  tid = ptid_get_lwp (inferior_ptid);
+  if (tid == 0)
+    tid = ptid_get_pid (inferior_ptid);	/* no thread id, just use
+					   process id.  */
+
+  regaddr = 4 * regmap[regno];
+
+  /* Put the contents of regno into a local buffer.  */
+  regcache_raw_collect (regcache, regno, buf);
+
+  /* Store the local buffer into the inferior a chunk at the time.  */
+  for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
+    {
+      errno = 0;
+      memcpy (&val, &buf[i], sizeof (long));
+      ptrace (PTRACE_POKEUSER, tid, regaddr, val);
+      regaddr += sizeof (long);
+      if (errno != 0)
+	error (_("Couldn't write register %s (#%d): %s."),
+	       gdbarch_register_name (gdbarch, regno),
+	       regno, safe_strerror (errno));
+    }
+}
+
+/* Store our register values back into the inferior.
+   If REGNO is negative, do this for all registers.
+   Otherwise, REGNO specifies which register (so we can save time).  */
+
+static void
+old_store_inferior_registers (const struct regcache *regcache, int regno)
+{
+  if (regno >= 0)
+    {
+      store_register (regcache, regno);
+    }
+  else
+    {
+      for (regno = 0;
+	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
+	   regno++)
+	{
+	  store_register (regcache, regno);
+	}
+    }
+}
+
+/*  Given a pointer to a general register set in /proc format
+   (elf_gregset_t *), unpack the register contents and supply
+   them as gdb's idea of the current register values.  */
+
+void
+supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  const elf_greg_t *regp = (const elf_greg_t *) gregsetp;
+  int regi;
+
+  for (regi = M68K_D0_REGNUM;
+       regi <= gdbarch_sp_regnum (gdbarch);
+       regi++)
+    regcache_raw_supply (regcache, regi, &regp[regmap[regi]]);
+  regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch),
+		       &regp[PT_SR]);
+  regcache_raw_supply (regcache,
+		       gdbarch_pc_regnum (gdbarch), &regp[PT_PC]);
+}
+
+/* Fill register REGNO (if it is a general-purpose register) in
+   *GREGSETPS with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
+void
+fill_gregset (const struct regcache *regcache,
+	      elf_gregset_t *gregsetp, int regno)
+{
+  elf_greg_t *regp = (elf_greg_t *) gregsetp;
+  int i;
+
+  for (i = 0; i < NUM_GREGS; i++)
+    if (regno == -1 || regno == i)
+      regcache_raw_collect (regcache, i, regp + regmap[i]);
+}
+
+#ifdef HAVE_PTRACE_GETREGS
+
+/* Fetch all general-purpose registers from process/thread TID and
+   store their values in GDB's register array.  */
+
+static void
+fetch_regs (struct regcache *regcache, int tid)
+{
+  elf_gregset_t regs;
+
+  if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
+    {
+      if (errno == EIO)
+	{
+	  /* The kernel we're running on doesn't support the GETREGS
+             request.  Reset `have_ptrace_getregs'.  */
+	  have_ptrace_getregs = 0;
+	  return;
+	}
+
+      perror_with_name (_("Couldn't get registers"));
+    }
+
+  supply_gregset (regcache, (const elf_gregset_t *) &regs);
+}
+
+/* Store all valid general-purpose registers in GDB's register array
+   into the process/thread specified by TID.  */
+
+static void
+store_regs (const struct regcache *regcache, int tid, int regno)
+{
+  elf_gregset_t regs;
+
+  if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
+    perror_with_name (_("Couldn't get registers"));
+
+  fill_gregset (regcache, &regs, regno);
+
+  if (ptrace (PTRACE_SETREGS, tid, 0, (int) &regs) < 0)
+    perror_with_name (_("Couldn't write registers"));
+}
+
+#else
+
+static void fetch_regs (struct regcache *regcache, int tid)
+{
+}
+
+static void store_regs (const struct regcache *regcache, int tid, int regno)
+{
+}
+
+#endif
+
+
+/* Transfering floating-point registers between GDB, inferiors and cores.  */
+
+/* What is the address of fpN within the floating-point register set F?  */
+#define FPREG_ADDR(f, n) (&(f)->fpregs[(n) * 3])
+
+/* Fill GDB's register array with the floating-point register values in
+   *FPREGSETP.  */
+
+void
+supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int regi;
+
+  for (regi = gdbarch_fp0_regnum (gdbarch);
+       regi < gdbarch_fp0_regnum (gdbarch) + 8; regi++)
+    regcache_raw_supply (regcache, regi,
+			 FPREG_ADDR (fpregsetp,
+				     regi - gdbarch_fp0_regnum (gdbarch)));
+  regcache_raw_supply (regcache, M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]);
+  regcache_raw_supply (regcache, M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]);
+  regcache_raw_supply (regcache, M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]);
+}
+
+/* Fill register REGNO (if it is a floating-point register) in
+   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
+
+void
+fill_fpregset (const struct regcache *regcache,
+	       elf_fpregset_t *fpregsetp, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int i;
+
+  /* Fill in the floating-point registers.  */
+  for (i = gdbarch_fp0_regnum (gdbarch);
+       i < gdbarch_fp0_regnum (gdbarch) + 8; i++)
+    if (regno == -1 || regno == i)
+      regcache_raw_collect (regcache, i,
+			    FPREG_ADDR (fpregsetp,
+				        i - gdbarch_fp0_regnum (gdbarch)));
+
+  /* Fill in the floating-point control registers.  */
+  for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
+    if (regno == -1 || regno == i)
+      regcache_raw_collect (regcache, i,
+			    &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+}
+
+#ifdef HAVE_PTRACE_GETREGS
+
+/* Fetch all floating-point registers from process/thread TID and store
+   thier values in GDB's register array.  */
+
+static void
+fetch_fpregs (struct regcache *regcache, int tid)
+{
+  elf_fpregset_t fpregs;
+
+  if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
+    perror_with_name (_("Couldn't get floating point status"));
+
+  supply_fpregset (regcache, (const elf_fpregset_t *) &fpregs);
+}
+
+/* Store all valid floating-point registers in GDB's register array
+   into the process/thread specified by TID.  */
+
+static void
+store_fpregs (const struct regcache *regcache, int tid, int regno)
+{
+  elf_fpregset_t fpregs;
+
+  if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
+    perror_with_name (_("Couldn't get floating point status"));
+
+  fill_fpregset (regcache, &fpregs, regno);
+
+  if (ptrace (PTRACE_SETFPREGS, tid, 0, (int) &fpregs) < 0)
+    perror_with_name (_("Couldn't write floating point status"));
+}
+
+#else
+
+static void fetch_fpregs (struct regcache *regcache, int tid)
+{
+}
+
+static void store_fpregs (const struct regcache *regcache, int tid, int regno)
+{
+}
+
+#endif
+
+/* Transferring arbitrary registers between GDB and inferior.  */
+
+/* Fetch register REGNO from the child process.  If REGNO is -1, do
+   this for all registers (including the floating point and SSE
+   registers).  */
+
+static void
+m68k_linux_fetch_inferior_registers (struct target_ops *ops,
+				     struct regcache *regcache, int regno)
+{
+  int tid;
+
+  /* Use the old method of peeking around in `struct user' if the
+     GETREGS request isn't available.  */
+  if (! have_ptrace_getregs)
+    {
+      old_fetch_inferior_registers (regcache, regno);
+      return;
+    }
+
+  /* GNU/Linux LWP ID's are process ID's.  */
+  tid = ptid_get_lwp (inferior_ptid);
+  if (tid == 0)
+    tid = ptid_get_pid (inferior_ptid);	/* Not a threaded program.  */
+
+  /* Use the PTRACE_GETFPXREGS request whenever possible, since it
+     transfers more registers in one system call, and we'll cache the
+     results.  But remember that fetch_fpxregs can fail, and return
+     zero.  */
+  if (regno == -1)
+    {
+      fetch_regs (regcache, tid);
+
+      /* The call above might reset `have_ptrace_getregs'.  */
+      if (! have_ptrace_getregs)
+	{
+	  old_fetch_inferior_registers (regcache, -1);
+	  return;
+	}
+
+      fetch_fpregs (regcache, tid);
+      return;
+    }
+
+  if (getregs_supplies (regno))
+    {
+      fetch_regs (regcache, tid);
+      return;
+    }
+
+  if (getfpregs_supplies (regno))
+    {
+      fetch_fpregs (regcache, tid);
+      return;
+    }
+
+  internal_error (__FILE__, __LINE__,
+		  _("Got request for bad register number %d."), regno);
+}
+
+/* Store register REGNO back into the child process.  If REGNO is -1,
+   do this for all registers (including the floating point and SSE
+   registers).  */
+static void
+m68k_linux_store_inferior_registers (struct target_ops *ops,
+				     struct regcache *regcache, int regno)
+{
+  int tid;
+
+  /* Use the old method of poking around in `struct user' if the
+     SETREGS request isn't available.  */
+  if (! have_ptrace_getregs)
+    {
+      old_store_inferior_registers (regcache, regno);
+      return;
+    }
+
+  /* GNU/Linux LWP ID's are process ID's.  */
+  tid = ptid_get_lwp (inferior_ptid);
+  if (tid == 0)
+    tid = ptid_get_pid (inferior_ptid);	/* Not a threaded program.  */
+
+  /* Use the PTRACE_SETFPREGS requests whenever possible, since it
+     transfers more registers in one system call.  But remember that
+     store_fpregs can fail, and return zero.  */
+  if (regno == -1)
+    {
+      store_regs (regcache, tid, regno);
+      store_fpregs (regcache, tid, regno);
+      return;
+    }
+
+  if (getregs_supplies (regno))
+    {
+      store_regs (regcache, tid, regno);
+      return;
+    }
+
+  if (getfpregs_supplies (regno))
+    {
+      store_fpregs (regcache, tid, regno);
+      return;
+    }
+
+  internal_error (__FILE__, __LINE__,
+		  _("Got request to store bad register number %d."), regno);
+}
+
+
+/* Fetch the thread-local storage pointer for libthread_db.  */
+
+ps_err_e
+ps_get_thread_area (struct ps_prochandle *ph, 
+		    lwpid_t lwpid, int idx, void **base)
+{
+  if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) < 0)
+    return PS_ERR;
+
+  /* IDX is the bias from the thread pointer to the beginning of the
+     thread descriptor.  It has to be subtracted due to implementation
+     quirks in libthread_db.  */
+  *base = (char *) *base - idx;
+
+  return PS_OK;
+}
+
+
+void _initialize_m68k_linux_nat (void);
+
+void
+_initialize_m68k_linux_nat (void)
+{
+  struct target_ops *t;
+
+  /* Fill in the generic GNU/Linux methods.  */
+  t = linux_target ();
+
+  /* Add our register access methods.  */
+  t->to_fetch_registers = m68k_linux_fetch_inferior_registers;
+  t->to_store_registers = m68k_linux_store_inferior_registers;
+
+  /* Register the target.  */
+  linux_nat_add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68klinux-nat.c ./gdb/m68klinux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68klinux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68klinux-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,542 +0,0 @@
-/* Motorola m68k native support for GNU/Linux.
-
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-#include "linux-nat.h"
-
-#include "m68k-tdep.h"
-
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/procfs.h>
-
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
-#include <sys/file.h>
-#include <sys/stat.h>
-
-#include "floatformat.h"
-
-/* Prototypes for supply_gregset etc.  */
-#include "gregset.h"
-
-/* Defines ps_err_e, struct ps_prochandle.  */
-#include "gdb_proc_service.h"
-
-#ifndef PTRACE_GET_THREAD_AREA
-#define PTRACE_GET_THREAD_AREA 25
-#endif
-
-/* This table must line up with gdbarch_register_name in "m68k-tdep.c".  */
-static const int regmap[] =
-{
-  PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
-  PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
-  PT_SR, PT_PC,
-  /* PT_FP0, ..., PT_FP7 */
-  21, 24, 27, 30, 33, 36, 39, 42,
-  /* PT_FPCR, PT_FPSR, PT_FPIAR */
-  45, 46, 47
-};
-
-/* Which ptrace request retrieves which registers?
-   These apply to the corresponding SET requests as well.  */
-#define NUM_GREGS (18)
-#define MAX_NUM_REGS (NUM_GREGS + 11)
-
-static int
-getregs_supplies (int regno)
-{
-  return 0 <= regno && regno < NUM_GREGS;
-}
-
-static int
-getfpregs_supplies (int regno)
-{
-  return M68K_FP0_REGNUM <= regno && regno <= M68K_FPI_REGNUM;
-}
-
-/* Does the current host support the GETREGS request?  */
-static int have_ptrace_getregs =
-#ifdef HAVE_PTRACE_GETREGS
-  1
-#else
-  0
-#endif
-;
-
-
-
-/* Fetching registers directly from the U area, one at a time.  */
-
-/* Fetch one register.  */
-
-static void
-fetch_register (struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  long regaddr, val;
-  int i;
-  gdb_byte buf[MAX_REGISTER_SIZE];
-  int tid;
-
-  /* Overload thread id onto process id.  */
-  tid = ptid_get_lwp (inferior_ptid);
-  if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);	/* no thread id, just use
-					   process id.  */
-
-  regaddr = 4 * regmap[regno];
-  for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
-    {
-      errno = 0;
-      val = ptrace (PTRACE_PEEKUSER, tid, regaddr, 0);
-      memcpy (&buf[i], &val, sizeof (long));
-      regaddr += sizeof (long);
-      if (errno != 0)
-	error (_("Couldn't read register %s (#%d): %s."), 
-	       gdbarch_register_name (gdbarch, regno),
-	       regno, safe_strerror (errno));
-    }
-  regcache_raw_supply (regcache, regno, buf);
-}
-
-/* Fetch register values from the inferior.
-   If REGNO is negative, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-
-static void
-old_fetch_inferior_registers (struct regcache *regcache, int regno)
-{
-  if (regno >= 0)
-    {
-      fetch_register (regcache, regno);
-    }
-  else
-    {
-      for (regno = 0;
-	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
-	   regno++)
-	{
-	  fetch_register (regcache, regno);
-	}
-    }
-}
-
-/* Store one register.  */
-
-static void
-store_register (const struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  long regaddr, val;
-  int i;
-  int tid;
-  gdb_byte buf[MAX_REGISTER_SIZE];
-
-  /* Overload thread id onto process id.  */
-  tid = ptid_get_lwp (inferior_ptid);
-  if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);	/* no thread id, just use
-					   process id.  */
-
-  regaddr = 4 * regmap[regno];
-
-  /* Put the contents of regno into a local buffer.  */
-  regcache_raw_collect (regcache, regno, buf);
-
-  /* Store the local buffer into the inferior a chunk at the time.  */
-  for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
-    {
-      errno = 0;
-      memcpy (&val, &buf[i], sizeof (long));
-      ptrace (PTRACE_POKEUSER, tid, regaddr, val);
-      regaddr += sizeof (long);
-      if (errno != 0)
-	error (_("Couldn't write register %s (#%d): %s."),
-	       gdbarch_register_name (gdbarch, regno),
-	       regno, safe_strerror (errno));
-    }
-}
-
-/* Store our register values back into the inferior.
-   If REGNO is negative, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-
-static void
-old_store_inferior_registers (const struct regcache *regcache, int regno)
-{
-  if (regno >= 0)
-    {
-      store_register (regcache, regno);
-    }
-  else
-    {
-      for (regno = 0;
-	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
-	   regno++)
-	{
-	  store_register (regcache, regno);
-	}
-    }
-}
-
-/*  Given a pointer to a general register set in /proc format
-   (elf_gregset_t *), unpack the register contents and supply
-   them as gdb's idea of the current register values.  */
-
-void
-supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const elf_greg_t *regp = (const elf_greg_t *) gregsetp;
-  int regi;
-
-  for (regi = M68K_D0_REGNUM;
-       regi <= gdbarch_sp_regnum (gdbarch);
-       regi++)
-    regcache_raw_supply (regcache, regi, &regp[regmap[regi]]);
-  regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch),
-		       &regp[PT_SR]);
-  regcache_raw_supply (regcache,
-		       gdbarch_pc_regnum (gdbarch), &regp[PT_PC]);
-}
-
-/* Fill register REGNO (if it is a general-purpose register) in
-   *GREGSETPS with the value in GDB's register array.  If REGNO is -1,
-   do this for all registers.  */
-void
-fill_gregset (const struct regcache *regcache,
-	      elf_gregset_t *gregsetp, int regno)
-{
-  elf_greg_t *regp = (elf_greg_t *) gregsetp;
-  int i;
-
-  for (i = 0; i < NUM_GREGS; i++)
-    if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i, regp + regmap[i]);
-}
-
-#ifdef HAVE_PTRACE_GETREGS
-
-/* Fetch all general-purpose registers from process/thread TID and
-   store their values in GDB's register array.  */
-
-static void
-fetch_regs (struct regcache *regcache, int tid)
-{
-  elf_gregset_t regs;
-
-  if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
-    {
-      if (errno == EIO)
-	{
-	  /* The kernel we're running on doesn't support the GETREGS
-             request.  Reset `have_ptrace_getregs'.  */
-	  have_ptrace_getregs = 0;
-	  return;
-	}
-
-      perror_with_name (_("Couldn't get registers"));
-    }
-
-  supply_gregset (regcache, (const elf_gregset_t *) &regs);
-}
-
-/* Store all valid general-purpose registers in GDB's register array
-   into the process/thread specified by TID.  */
-
-static void
-store_regs (const struct regcache *regcache, int tid, int regno)
-{
-  elf_gregset_t regs;
-
-  if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
-    perror_with_name (_("Couldn't get registers"));
-
-  fill_gregset (regcache, &regs, regno);
-
-  if (ptrace (PTRACE_SETREGS, tid, 0, (int) &regs) < 0)
-    perror_with_name (_("Couldn't write registers"));
-}
-
-#else
-
-static void fetch_regs (struct regcache *regcache, int tid)
-{
-}
-
-static void store_regs (const struct regcache *regcache, int tid, int regno)
-{
-}
-
-#endif
-
-
-/* Transfering floating-point registers between GDB, inferiors and cores.  */
-
-/* What is the address of fpN within the floating-point register set F?  */
-#define FPREG_ADDR(f, n) (&(f)->fpregs[(n) * 3])
-
-/* Fill GDB's register array with the floating-point register values in
-   *FPREGSETP.  */
-
-void
-supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int regi;
-
-  for (regi = gdbarch_fp0_regnum (gdbarch);
-       regi < gdbarch_fp0_regnum (gdbarch) + 8; regi++)
-    regcache_raw_supply (regcache, regi,
-			 FPREG_ADDR (fpregsetp,
-				     regi - gdbarch_fp0_regnum (gdbarch)));
-  regcache_raw_supply (regcache, M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]);
-  regcache_raw_supply (regcache, M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]);
-  regcache_raw_supply (regcache, M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]);
-}
-
-/* Fill register REGNO (if it is a floating-point register) in
-   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
-   do this for all registers.  */
-
-void
-fill_fpregset (const struct regcache *regcache,
-	       elf_fpregset_t *fpregsetp, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int i;
-
-  /* Fill in the floating-point registers.  */
-  for (i = gdbarch_fp0_regnum (gdbarch);
-       i < gdbarch_fp0_regnum (gdbarch) + 8; i++)
-    if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i,
-			    FPREG_ADDR (fpregsetp,
-				        i - gdbarch_fp0_regnum (gdbarch)));
-
-  /* Fill in the floating-point control registers.  */
-  for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
-    if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i,
-			    &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
-}
-
-#ifdef HAVE_PTRACE_GETREGS
-
-/* Fetch all floating-point registers from process/thread TID and store
-   thier values in GDB's register array.  */
-
-static void
-fetch_fpregs (struct regcache *regcache, int tid)
-{
-  elf_fpregset_t fpregs;
-
-  if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
-    perror_with_name (_("Couldn't get floating point status"));
-
-  supply_fpregset (regcache, (const elf_fpregset_t *) &fpregs);
-}
-
-/* Store all valid floating-point registers in GDB's register array
-   into the process/thread specified by TID.  */
-
-static void
-store_fpregs (const struct regcache *regcache, int tid, int regno)
-{
-  elf_fpregset_t fpregs;
-
-  if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
-    perror_with_name (_("Couldn't get floating point status"));
-
-  fill_fpregset (regcache, &fpregs, regno);
-
-  if (ptrace (PTRACE_SETFPREGS, tid, 0, (int) &fpregs) < 0)
-    perror_with_name (_("Couldn't write floating point status"));
-}
-
-#else
-
-static void fetch_fpregs (struct regcache *regcache, int tid)
-{
-}
-
-static void store_fpregs (const struct regcache *regcache, int tid, int regno)
-{
-}
-
-#endif
-
-/* Transferring arbitrary registers between GDB and inferior.  */
-
-/* Fetch register REGNO from the child process.  If REGNO is -1, do
-   this for all registers (including the floating point and SSE
-   registers).  */
-
-static void
-m68k_linux_fetch_inferior_registers (struct target_ops *ops,
-				     struct regcache *regcache, int regno)
-{
-  int tid;
-
-  /* Use the old method of peeking around in `struct user' if the
-     GETREGS request isn't available.  */
-  if (! have_ptrace_getregs)
-    {
-      old_fetch_inferior_registers (regcache, regno);
-      return;
-    }
-
-  /* GNU/Linux LWP ID's are process ID's.  */
-  tid = ptid_get_lwp (inferior_ptid);
-  if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);	/* Not a threaded program.  */
-
-  /* Use the PTRACE_GETFPXREGS request whenever possible, since it
-     transfers more registers in one system call, and we'll cache the
-     results.  But remember that fetch_fpxregs can fail, and return
-     zero.  */
-  if (regno == -1)
-    {
-      fetch_regs (regcache, tid);
-
-      /* The call above might reset `have_ptrace_getregs'.  */
-      if (! have_ptrace_getregs)
-	{
-	  old_fetch_inferior_registers (regcache, -1);
-	  return;
-	}
-
-      fetch_fpregs (regcache, tid);
-      return;
-    }
-
-  if (getregs_supplies (regno))
-    {
-      fetch_regs (regcache, tid);
-      return;
-    }
-
-  if (getfpregs_supplies (regno))
-    {
-      fetch_fpregs (regcache, tid);
-      return;
-    }
-
-  internal_error (__FILE__, __LINE__,
-		  _("Got request for bad register number %d."), regno);
-}
-
-/* Store register REGNO back into the child process.  If REGNO is -1,
-   do this for all registers (including the floating point and SSE
-   registers).  */
-static void
-m68k_linux_store_inferior_registers (struct target_ops *ops,
-				     struct regcache *regcache, int regno)
-{
-  int tid;
-
-  /* Use the old method of poking around in `struct user' if the
-     SETREGS request isn't available.  */
-  if (! have_ptrace_getregs)
-    {
-      old_store_inferior_registers (regcache, regno);
-      return;
-    }
-
-  /* GNU/Linux LWP ID's are process ID's.  */
-  tid = ptid_get_lwp (inferior_ptid);
-  if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);	/* Not a threaded program.  */
-
-  /* Use the PTRACE_SETFPREGS requests whenever possible, since it
-     transfers more registers in one system call.  But remember that
-     store_fpregs can fail, and return zero.  */
-  if (regno == -1)
-    {
-      store_regs (regcache, tid, regno);
-      store_fpregs (regcache, tid, regno);
-      return;
-    }
-
-  if (getregs_supplies (regno))
-    {
-      store_regs (regcache, tid, regno);
-      return;
-    }
-
-  if (getfpregs_supplies (regno))
-    {
-      store_fpregs (regcache, tid, regno);
-      return;
-    }
-
-  internal_error (__FILE__, __LINE__,
-		  _("Got request to store bad register number %d."), regno);
-}
-
-
-/* Fetch the thread-local storage pointer for libthread_db.  */
-
-ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph, 
-		    lwpid_t lwpid, int idx, void **base)
-{
-  if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) < 0)
-    return PS_ERR;
-
-  /* IDX is the bias from the thread pointer to the beginning of the
-     thread descriptor.  It has to be subtracted due to implementation
-     quirks in libthread_db.  */
-  *base = (char *) *base - idx;
-
-  return PS_OK;
-}
-
-
-void _initialize_m68k_linux_nat (void);
-
-void
-_initialize_m68k_linux_nat (void)
-{
-  struct target_ops *t;
-
-  /* Fill in the generic GNU/Linux methods.  */
-  t = linux_target ();
-
-  /* Add our register access methods.  */
-  t->to_fetch_registers = m68k_linux_fetch_inferior_registers;
-  t->to_store_registers = m68k_linux_store_inferior_registers;
-
-  /* Register the target.  */
-  linux_nat_add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-linux-tdep.c ./gdb/m68k-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-linux-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/m68k-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,435 @@
+/* Motorola m68k target-dependent support for GNU/Linux.
+
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "doublest.h"
+#include "floatformat.h"
+#include "frame.h"
+#include "target.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "objfiles.h"
+#include "symtab.h"
+#include "m68k-tdep.h"
+#include "trad-frame.h"
+#include "frame-unwind.h"
+#include "glibc-tdep.h"
+#include "solib-svr4.h"
+#include "auxv.h"
+#include "observer.h"
+#include "elf/common.h"
+#include "linux-tdep.h"
+#include "regset.h"
+
+/* Offsets (in target ints) into jmp_buf.  */
+
+#define M68K_LINUX_JB_ELEMENT_SIZE 4
+#define M68K_LINUX_JB_PC 7
+
+/* Check whether insn1 and insn2 are parts of a signal trampoline.  */
+
+#define IS_SIGTRAMP(insn1, insn2)					\
+  (/* addaw #20,sp; moveq #119,d0; trap #0 */				\
+   (insn1 == 0xdefc0014 && insn2 == 0x70774e40)				\
+   /* moveq #119,d0; trap #0 */						\
+   || insn1 == 0x70774e40)
+
+#define IS_RT_SIGTRAMP(insn1, insn2)					\
+  (/* movel #173,d0; trap #0 */						\
+   (insn1 == 0x203c0000 && insn2 == 0x00ad4e40)				\
+   /* moveq #82,d0; notb d0; trap #0 */					\
+   || (insn1 == 0x70524600 && (insn2 >> 16) == 0x4e40))
+
+/* Return non-zero if THIS_FRAME corresponds to a signal trampoline.  For
+   the sake of m68k_linux_get_sigtramp_info we also distinguish between
+   non-RT and RT signal trampolines.  */
+
+static int
+m68k_linux_pc_in_sigtramp (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  gdb_byte buf[12];
+  unsigned long insn0, insn1, insn2;
+  CORE_ADDR pc = get_frame_pc (this_frame);
+
+  if (!safe_frame_unwind_memory (this_frame, pc - 4, buf, sizeof (buf)))
+    return 0;
+  insn1 = extract_unsigned_integer (buf + 4, 4, byte_order);
+  insn2 = extract_unsigned_integer (buf + 8, 4, byte_order);
+  if (IS_SIGTRAMP (insn1, insn2))
+    return 1;
+  if (IS_RT_SIGTRAMP (insn1, insn2))
+    return 2;
+
+  insn0 = extract_unsigned_integer (buf, 4, byte_order);
+  if (IS_SIGTRAMP (insn0, insn1))
+    return 1;
+  if (IS_RT_SIGTRAMP (insn0, insn1))
+    return 2;
+
+  insn0 = ((insn0 << 16) & 0xffffffff) | (insn1 >> 16);
+  insn1 = ((insn1 << 16) & 0xffffffff) | (insn2 >> 16);
+  if (IS_SIGTRAMP (insn0, insn1))
+    return 1;
+  if (IS_RT_SIGTRAMP (insn0, insn1))
+    return 2;
+
+  return 0;
+}
+
+/* From <asm/sigcontext.h>.  */
+static int m68k_linux_sigcontext_reg_offset[M68K_NUM_REGS] =
+{
+  2 * 4,			/* %d0 */
+  3 * 4,			/* %d1 */
+  -1,				/* %d2 */
+  -1,				/* %d3 */
+  -1,				/* %d4 */
+  -1,				/* %d5 */
+  -1,				/* %d6 */
+  -1,				/* %d7 */
+  4 * 4,			/* %a0 */
+  5 * 4,			/* %a1 */
+  -1,				/* %a2 */
+  -1,				/* %a3 */
+  -1,				/* %a4 */
+  -1,				/* %a5 */
+  -1,				/* %fp */
+  1 * 4,			/* %sp */
+  6 * 4,			/* %sr */
+  6 * 4 + 2,			/* %pc */
+  8 * 4,			/* %fp0 */
+  11 * 4,			/* %fp1 */
+  -1,				/* %fp2 */
+  -1,				/* %fp3 */
+  -1,				/* %fp4 */
+  -1,				/* %fp5 */
+  -1,				/* %fp6 */
+  -1,				/* %fp7 */
+  14 * 4,			/* %fpcr */
+  15 * 4,			/* %fpsr */
+  16 * 4			/* %fpiaddr */
+};
+
+static int m68k_uclinux_sigcontext_reg_offset[M68K_NUM_REGS] =
+{
+  2 * 4,			/* %d0 */
+  3 * 4,			/* %d1 */
+  -1,				/* %d2 */
+  -1,				/* %d3 */
+  -1,				/* %d4 */
+  -1,				/* %d5 */
+  -1,				/* %d6 */
+  -1,				/* %d7 */
+  4 * 4,			/* %a0 */
+  5 * 4,			/* %a1 */
+  -1,				/* %a2 */
+  -1,				/* %a3 */
+  -1,				/* %a4 */
+  6 * 4,			/* %a5 */
+  -1,				/* %fp */
+  1 * 4,			/* %sp */
+  7 * 4,			/* %sr */
+  7 * 4 + 2,			/* %pc */
+  -1,				/* %fp0 */
+  -1,				/* %fp1 */
+  -1,				/* %fp2 */
+  -1,				/* %fp3 */
+  -1,				/* %fp4 */
+  -1,				/* %fp5 */
+  -1,				/* %fp6 */
+  -1,				/* %fp7 */
+  -1,				/* %fpcr */
+  -1,				/* %fpsr */
+  -1				/* %fpiaddr */
+};
+
+/* From <asm/ucontext.h>.  */
+static int m68k_linux_ucontext_reg_offset[M68K_NUM_REGS] =
+{
+  6 * 4,			/* %d0 */
+  7 * 4,			/* %d1 */
+  8 * 4,			/* %d2 */
+  9 * 4,			/* %d3 */
+  10 * 4,			/* %d4 */
+  11 * 4,			/* %d5 */
+  12 * 4,			/* %d6 */
+  13 * 4,			/* %d7 */
+  14 * 4,			/* %a0 */
+  15 * 4,			/* %a1 */
+  16 * 4,			/* %a2 */
+  17 * 4,			/* %a3 */
+  18 * 4,			/* %a4 */
+  19 * 4,			/* %a5 */
+  20 * 4,			/* %fp */
+  21 * 4,			/* %sp */
+  23 * 4,			/* %sr */
+  22 * 4,			/* %pc */
+  27 * 4,			/* %fp0 */
+  30 * 4,			/* %fp1 */
+  33 * 4,			/* %fp2 */
+  36 * 4,			/* %fp3 */
+  39 * 4,			/* %fp4 */
+  42 * 4,			/* %fp5 */
+  45 * 4,			/* %fp6 */
+  48 * 4,			/* %fp7 */
+  24 * 4,			/* %fpcr */
+  25 * 4,			/* %fpsr */
+  26 * 4			/* %fpiaddr */
+};
+
+
+/* Get info about saved registers in sigtramp.  */
+
+struct m68k_linux_sigtramp_info
+{
+  /* Address of sigcontext.  */
+  CORE_ADDR sigcontext_addr;
+
+  /* Offset of registers in `struct sigcontext'.  */
+  int *sc_reg_offset;
+};
+
+/* Nonzero if running on uClinux.  */
+static int target_is_uclinux;
+
+static void
+m68k_linux_inferior_created (struct target_ops *objfile, int from_tty)
+{
+  /* Record that we will need to re-evaluate whether we are running on a
+     uClinux or normal GNU/Linux target (see m68k_linux_get_sigtramp_info).  */
+  target_is_uclinux = -1;
+}
+
+static struct m68k_linux_sigtramp_info
+m68k_linux_get_sigtramp_info (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp;
+  struct m68k_linux_sigtramp_info info;
+
+  /* Determine whether we are running on a uClinux or normal GNU/Linux
+     target so we can use the correct sigcontext layouts.  */
+  if (target_is_uclinux == -1)
+    target_is_uclinux = linux_is_uclinux ();
+
+  sp = get_frame_register_unsigned (this_frame, M68K_SP_REGNUM);
+
+  /* Get sigcontext address, it is the third parameter on the stack.  */
+  info.sigcontext_addr = read_memory_unsigned_integer (sp + 8, 4, byte_order);
+
+  if (m68k_linux_pc_in_sigtramp (this_frame) == 2)
+    info.sc_reg_offset = m68k_linux_ucontext_reg_offset;
+  else
+    info.sc_reg_offset = (target_is_uclinux
+			  ? m68k_uclinux_sigcontext_reg_offset
+			  : m68k_linux_sigcontext_reg_offset);
+  return info;
+}
+
+/* Signal trampolines.  */
+
+static struct trad_frame_cache *
+m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame,
+				 void **this_cache)
+{
+  struct frame_id this_id;
+  struct trad_frame_cache *cache;
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct m68k_linux_sigtramp_info info;
+  gdb_byte buf[4];
+  int i;
+
+  if (*this_cache)
+    return (struct trad_frame_cache *) *this_cache;
+
+  cache = trad_frame_cache_zalloc (this_frame);
+
+  /* FIXME: cagney/2004-05-01: This is is long standing broken code.
+     The frame ID's code address should be the start-address of the
+     signal trampoline and not the current PC within that
+     trampoline.  */
+  get_frame_register (this_frame, M68K_SP_REGNUM, buf);
+  /* See the end of m68k_push_dummy_call.  */
+  this_id = frame_id_build (extract_unsigned_integer (buf, 4, byte_order)
+			    - 4 + 8, get_frame_pc (this_frame));
+  trad_frame_set_id (cache, this_id);
+
+  info = m68k_linux_get_sigtramp_info (this_frame);
+
+  for (i = 0; i < M68K_NUM_REGS; i++)
+    if (info.sc_reg_offset[i] != -1)
+      trad_frame_set_reg_addr (cache, i,
+			       info.sigcontext_addr + info.sc_reg_offset[i]);
+
+  *this_cache = cache;
+  return cache;
+}
+
+static void
+m68k_linux_sigtramp_frame_this_id (struct frame_info *this_frame,
+				   void **this_cache,
+				   struct frame_id *this_id)
+{
+  struct trad_frame_cache *cache =
+    m68k_linux_sigtramp_frame_cache (this_frame, this_cache);
+  trad_frame_get_id (cache, this_id);
+}
+
+static struct value *
+m68k_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
+					 void **this_cache,
+					 int regnum)
+{
+  /* Make sure we've initialized the cache.  */
+  struct trad_frame_cache *cache =
+    m68k_linux_sigtramp_frame_cache (this_frame, this_cache);
+  return trad_frame_get_register (cache, this_frame, regnum);
+}
+
+static int
+m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				   struct frame_info *this_frame,
+				   void **this_prologue_cache)
+{
+  return m68k_linux_pc_in_sigtramp (this_frame);
+}
+
+static const struct frame_unwind m68k_linux_sigtramp_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  m68k_linux_sigtramp_frame_this_id,
+  m68k_linux_sigtramp_frame_prev_register,
+  NULL,
+  m68k_linux_sigtramp_frame_sniffer
+};
+
+/* Register maps for supply/collect regset functions.  */
+
+static const struct regcache_map_entry m68k_linux_gregmap[] =
+  {
+    { 7, M68K_D1_REGNUM, 4 },	/* d1 ... d7 */
+    { 7, M68K_A0_REGNUM, 4 },	/* a0 ... a6 */
+    { 1, M68K_D0_REGNUM, 4 },
+    { 1, M68K_SP_REGNUM, 4 },
+    { 1, REGCACHE_MAP_SKIP, 4 }, /* orig_d0 (skip) */
+    { 1, M68K_PS_REGNUM, 4 },
+    { 1, M68K_PC_REGNUM, 4 },
+    /* Ignore 16-bit fields 'fmtvec' and '__fill'.  */
+    { 0 }
+  };
+
+#define M68K_LINUX_GREGS_SIZE (20 * 4)
+
+static const struct regcache_map_entry m68k_linux_fpregmap[] =
+  {
+    { 8, M68K_FP0_REGNUM, 12 },	/* fp0 ... fp7 */
+    { 1, M68K_FPC_REGNUM, 4 },
+    { 1, M68K_FPS_REGNUM, 4 },
+    { 1, M68K_FPI_REGNUM, 4 },
+    { 0 }
+  };
+
+#define M68K_LINUX_FPREGS_SIZE (27 * 4)
+
+/* Register sets. */
+
+static const struct regset m68k_linux_gregset =
+  {
+    m68k_linux_gregmap,
+    regcache_supply_regset, regcache_collect_regset
+  };
+
+static const struct regset m68k_linux_fpregset =
+  {
+    m68k_linux_fpregmap,
+    regcache_supply_regset, regcache_collect_regset
+  };
+
+/* Iterate over core file register note sections.  */
+
+static void
+m68k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					 iterate_over_regset_sections_cb *cb,
+					 void *cb_data,
+					 const struct regcache *regcache)
+{
+  cb (".reg", M68K_LINUX_GREGS_SIZE, &m68k_linux_gregset, NULL, cb_data);
+  cb (".reg2", M68K_LINUX_FPREGS_SIZE, &m68k_linux_fpregset, NULL, cb_data);
+}
+
+static void
+m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  linux_init_abi (info, gdbarch);
+
+  tdep->jb_pc = M68K_LINUX_JB_PC;
+  tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE;
+
+  /* GNU/Linux uses a calling convention that's similar to SVR4.  It
+     returns integer values in %d0/%d1, pointer values in %a0 and
+     floating values in %fp0, just like SVR4, but uses %a1 to pass the
+     address to store a structure value.  It also returns small
+     structures in registers instead of memory.  */
+  m68k_svr4_init_abi (info, gdbarch);
+  tdep->struct_value_regnum = M68K_A1_REGNUM;
+  tdep->struct_return = reg_struct_return;
+
+  set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
+  frame_unwind_append_unwinder (gdbarch, &m68k_linux_sigtramp_frame_unwind);
+
+  /* Shared library handling.  */
+
+  /* GNU/Linux uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets (gdbarch,
+					 svr4_ilp32_fetch_link_map_offsets);
+
+  /* GNU/Linux uses the dynamic linker included in the GNU C Library.  */
+  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
+
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+
+  /* Core file support. */
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, m68k_linux_iterate_over_regset_sections);
+
+  /* Enable TLS support.  */
+  set_gdbarch_fetch_tls_load_module_address (gdbarch,
+                                             svr4_fetch_objfile_link_map);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_m68k_linux_tdep;
+
+void
+_initialize_m68k_linux_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_LINUX,
+			  m68k_linux_init_abi);
+  observer_attach_inferior_created (m68k_linux_inferior_created);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68klinux-tdep.c ./gdb/m68klinux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68klinux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68klinux-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,436 +0,0 @@
-/* Motorola m68k target-dependent support for GNU/Linux.
-
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "doublest.h"
-#include "floatformat.h"
-#include "frame.h"
-#include "target.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "objfiles.h"
-#include "symtab.h"
-#include "m68k-tdep.h"
-#include "trad-frame.h"
-#include "frame-unwind.h"
-#include "glibc-tdep.h"
-#include "solib-svr4.h"
-#include "auxv.h"
-#include "observer.h"
-#include "elf/common.h"
-#include "linux-tdep.h"
-#include "regset.h"
-
-/* Offsets (in target ints) into jmp_buf.  */
-
-#define M68K_LINUX_JB_ELEMENT_SIZE 4
-#define M68K_LINUX_JB_PC 7
-
-/* Check whether insn1 and insn2 are parts of a signal trampoline.  */
-
-#define IS_SIGTRAMP(insn1, insn2)					\
-  (/* addaw #20,sp; moveq #119,d0; trap #0 */				\
-   (insn1 == 0xdefc0014 && insn2 == 0x70774e40)				\
-   /* moveq #119,d0; trap #0 */						\
-   || insn1 == 0x70774e40)
-
-#define IS_RT_SIGTRAMP(insn1, insn2)					\
-  (/* movel #173,d0; trap #0 */						\
-   (insn1 == 0x203c0000 && insn2 == 0x00ad4e40)				\
-   /* moveq #82,d0; notb d0; trap #0 */					\
-   || (insn1 == 0x70524600 && (insn2 >> 16) == 0x4e40))
-
-/* Return non-zero if THIS_FRAME corresponds to a signal trampoline.  For
-   the sake of m68k_linux_get_sigtramp_info we also distinguish between
-   non-RT and RT signal trampolines.  */
-
-static int
-m68k_linux_pc_in_sigtramp (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  gdb_byte buf[12];
-  unsigned long insn0, insn1, insn2;
-  CORE_ADDR pc = get_frame_pc (this_frame);
-
-  if (!safe_frame_unwind_memory (this_frame, pc - 4, buf, sizeof (buf)))
-    return 0;
-  insn1 = extract_unsigned_integer (buf + 4, 4, byte_order);
-  insn2 = extract_unsigned_integer (buf + 8, 4, byte_order);
-  if (IS_SIGTRAMP (insn1, insn2))
-    return 1;
-  if (IS_RT_SIGTRAMP (insn1, insn2))
-    return 2;
-
-  insn0 = extract_unsigned_integer (buf, 4, byte_order);
-  if (IS_SIGTRAMP (insn0, insn1))
-    return 1;
-  if (IS_RT_SIGTRAMP (insn0, insn1))
-    return 2;
-
-  insn0 = ((insn0 << 16) & 0xffffffff) | (insn1 >> 16);
-  insn1 = ((insn1 << 16) & 0xffffffff) | (insn2 >> 16);
-  if (IS_SIGTRAMP (insn0, insn1))
-    return 1;
-  if (IS_RT_SIGTRAMP (insn0, insn1))
-    return 2;
-
-  return 0;
-}
-
-/* From <asm/sigcontext.h>.  */
-static int m68k_linux_sigcontext_reg_offset[M68K_NUM_REGS] =
-{
-  2 * 4,			/* %d0 */
-  3 * 4,			/* %d1 */
-  -1,				/* %d2 */
-  -1,				/* %d3 */
-  -1,				/* %d4 */
-  -1,				/* %d5 */
-  -1,				/* %d6 */
-  -1,				/* %d7 */
-  4 * 4,			/* %a0 */
-  5 * 4,			/* %a1 */
-  -1,				/* %a2 */
-  -1,				/* %a3 */
-  -1,				/* %a4 */
-  -1,				/* %a5 */
-  -1,				/* %fp */
-  1 * 4,			/* %sp */
-  6 * 4,			/* %sr */
-  6 * 4 + 2,			/* %pc */
-  8 * 4,			/* %fp0 */
-  11 * 4,			/* %fp1 */
-  -1,				/* %fp2 */
-  -1,				/* %fp3 */
-  -1,				/* %fp4 */
-  -1,				/* %fp5 */
-  -1,				/* %fp6 */
-  -1,				/* %fp7 */
-  14 * 4,			/* %fpcr */
-  15 * 4,			/* %fpsr */
-  16 * 4			/* %fpiaddr */
-};
-
-static int m68k_uclinux_sigcontext_reg_offset[M68K_NUM_REGS] =
-{
-  2 * 4,			/* %d0 */
-  3 * 4,			/* %d1 */
-  -1,				/* %d2 */
-  -1,				/* %d3 */
-  -1,				/* %d4 */
-  -1,				/* %d5 */
-  -1,				/* %d6 */
-  -1,				/* %d7 */
-  4 * 4,			/* %a0 */
-  5 * 4,			/* %a1 */
-  -1,				/* %a2 */
-  -1,				/* %a3 */
-  -1,				/* %a4 */
-  6 * 4,			/* %a5 */
-  -1,				/* %fp */
-  1 * 4,			/* %sp */
-  7 * 4,			/* %sr */
-  7 * 4 + 2,			/* %pc */
-  -1,				/* %fp0 */
-  -1,				/* %fp1 */
-  -1,				/* %fp2 */
-  -1,				/* %fp3 */
-  -1,				/* %fp4 */
-  -1,				/* %fp5 */
-  -1,				/* %fp6 */
-  -1,				/* %fp7 */
-  -1,				/* %fpcr */
-  -1,				/* %fpsr */
-  -1				/* %fpiaddr */
-};
-
-/* From <asm/ucontext.h>.  */
-static int m68k_linux_ucontext_reg_offset[M68K_NUM_REGS] =
-{
-  6 * 4,			/* %d0 */
-  7 * 4,			/* %d1 */
-  8 * 4,			/* %d2 */
-  9 * 4,			/* %d3 */
-  10 * 4,			/* %d4 */
-  11 * 4,			/* %d5 */
-  12 * 4,			/* %d6 */
-  13 * 4,			/* %d7 */
-  14 * 4,			/* %a0 */
-  15 * 4,			/* %a1 */
-  16 * 4,			/* %a2 */
-  17 * 4,			/* %a3 */
-  18 * 4,			/* %a4 */
-  19 * 4,			/* %a5 */
-  20 * 4,			/* %fp */
-  21 * 4,			/* %sp */
-  23 * 4,			/* %sr */
-  22 * 4,			/* %pc */
-  27 * 4,			/* %fp0 */
-  30 * 4,			/* %fp1 */
-  33 * 4,			/* %fp2 */
-  36 * 4,			/* %fp3 */
-  39 * 4,			/* %fp4 */
-  42 * 4,			/* %fp5 */
-  45 * 4,			/* %fp6 */
-  48 * 4,			/* %fp7 */
-  24 * 4,			/* %fpcr */
-  25 * 4,			/* %fpsr */
-  26 * 4			/* %fpiaddr */
-};
-
-
-/* Get info about saved registers in sigtramp.  */
-
-struct m68k_linux_sigtramp_info
-{
-  /* Address of sigcontext.  */
-  CORE_ADDR sigcontext_addr;
-
-  /* Offset of registers in `struct sigcontext'.  */
-  int *sc_reg_offset;
-};
-
-/* Nonzero if running on uClinux.  */
-static int target_is_uclinux;
-
-static void
-m68k_linux_inferior_created (struct target_ops *objfile, int from_tty)
-{
-  /* Record that we will need to re-evaluate whether we are running on a
-     uClinux or normal GNU/Linux target (see m68k_linux_get_sigtramp_info).  */
-  target_is_uclinux = -1;
-}
-
-static struct m68k_linux_sigtramp_info
-m68k_linux_get_sigtramp_info (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp;
-  struct m68k_linux_sigtramp_info info;
-
-  /* Determine whether we are running on a uClinux or normal GNU/Linux
-     target so we can use the correct sigcontext layouts.  */
-  if (target_is_uclinux == -1)
-    target_is_uclinux = linux_is_uclinux ();
-
-  sp = get_frame_register_unsigned (this_frame, M68K_SP_REGNUM);
-
-  /* Get sigcontext address, it is the third parameter on the stack.  */
-  info.sigcontext_addr = read_memory_unsigned_integer (sp + 8, 4, byte_order);
-
-  if (m68k_linux_pc_in_sigtramp (this_frame) == 2)
-    info.sc_reg_offset = m68k_linux_ucontext_reg_offset;
-  else
-    info.sc_reg_offset = (target_is_uclinux
-			  ? m68k_uclinux_sigcontext_reg_offset
-			  : m68k_linux_sigcontext_reg_offset);
-  return info;
-}
-
-/* Signal trampolines.  */
-
-static struct trad_frame_cache *
-m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame,
-				 void **this_cache)
-{
-  struct frame_id this_id;
-  struct trad_frame_cache *cache;
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct m68k_linux_sigtramp_info info;
-  gdb_byte buf[4];
-  int i;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-
-  /* FIXME: cagney/2004-05-01: This is is long standing broken code.
-     The frame ID's code address should be the start-address of the
-     signal trampoline and not the current PC within that
-     trampoline.  */
-  get_frame_register (this_frame, M68K_SP_REGNUM, buf);
-  /* See the end of m68k_push_dummy_call.  */
-  this_id = frame_id_build (extract_unsigned_integer (buf, 4, byte_order)
-			    - 4 + 8, get_frame_pc (this_frame));
-  trad_frame_set_id (cache, this_id);
-
-  info = m68k_linux_get_sigtramp_info (this_frame);
-
-  for (i = 0; i < M68K_NUM_REGS; i++)
-    if (info.sc_reg_offset[i] != -1)
-      trad_frame_set_reg_addr (cache, i,
-			       info.sigcontext_addr + info.sc_reg_offset[i]);
-
-  *this_cache = cache;
-  return cache;
-}
-
-static void
-m68k_linux_sigtramp_frame_this_id (struct frame_info *this_frame,
-				   void **this_cache,
-				   struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    m68k_linux_sigtramp_frame_cache (this_frame, this_cache);
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-m68k_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
-					 void **this_cache,
-					 int regnum)
-{
-  /* Make sure we've initialized the cache.  */
-  struct trad_frame_cache *cache =
-    m68k_linux_sigtramp_frame_cache (this_frame, this_cache);
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static int
-m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				   struct frame_info *this_frame,
-				   void **this_prologue_cache)
-{
-  return m68k_linux_pc_in_sigtramp (this_frame);
-}
-
-static const struct frame_unwind m68k_linux_sigtramp_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  m68k_linux_sigtramp_frame_this_id,
-  m68k_linux_sigtramp_frame_prev_register,
-  NULL,
-  m68k_linux_sigtramp_frame_sniffer
-};
-
-/* Register maps for supply/collect regset functions.  */
-
-static const struct regcache_map_entry m68k_linux_gregmap[] =
-  {
-    { 7, M68K_D1_REGNUM, 4 },	/* d1 ... d7 */
-    { 7, M68K_A0_REGNUM, 4 },	/* a0 ... a6 */
-    { 1, M68K_D0_REGNUM, 4 },
-    { 1, M68K_SP_REGNUM, 4 },
-    { 1, REGCACHE_MAP_SKIP, 4 }, /* orig_d0 (skip) */
-    { 1, M68K_PS_REGNUM, 4 },
-    { 1, M68K_PC_REGNUM, 4 },
-    /* Ignore 16-bit fields 'fmtvec' and '__fill'.  */
-    { 0 }
-  };
-
-#define M68K_LINUX_GREGS_SIZE (20 * 4)
-
-static const struct regcache_map_entry m68k_linux_fpregmap[] =
-  {
-    { 8, M68K_FP0_REGNUM, 12 },	/* fp0 ... fp7 */
-    { 1, M68K_FPC_REGNUM, 4 },
-    { 1, M68K_FPS_REGNUM, 4 },
-    { 1, M68K_FPI_REGNUM, 4 },
-    { 0 }
-  };
-
-#define M68K_LINUX_FPREGS_SIZE (27 * 4)
-
-/* Register sets. */
-
-static const struct regset m68k_linux_gregset =
-  {
-    m68k_linux_gregmap,
-    regcache_supply_regset, regcache_collect_regset
-  };
-
-static const struct regset m68k_linux_fpregset =
-  {
-    m68k_linux_fpregmap,
-    regcache_supply_regset, regcache_collect_regset
-  };
-
-/* Iterate over core file register note sections.  */
-
-static void
-m68k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					 iterate_over_regset_sections_cb *cb,
-					 void *cb_data,
-					 const struct regcache *regcache)
-{
-  cb (".reg", M68K_LINUX_GREGS_SIZE, &m68k_linux_gregset, NULL, cb_data);
-  cb (".reg2", M68K_LINUX_FPREGS_SIZE, &m68k_linux_fpregset, NULL, cb_data);
-}
-
-static void
-m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  linux_init_abi (info, gdbarch);
-
-  tdep->jb_pc = M68K_LINUX_JB_PC;
-  tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE;
-
-  /* GNU/Linux uses a calling convention that's similar to SVR4.  It
-     returns integer values in %d0/%d1, pointer values in %a0 and
-     floating values in %fp0, just like SVR4, but uses %a1 to pass the
-     address to store a structure value.  It also returns small
-     structures in registers instead of memory.  */
-  m68k_svr4_init_abi (info, gdbarch);
-  tdep->struct_value_regnum = M68K_A1_REGNUM;
-  tdep->struct_return = reg_struct_return;
-
-  set_gdbarch_decr_pc_after_break (gdbarch, 2);
-
-  frame_unwind_append_unwinder (gdbarch, &m68k_linux_sigtramp_frame_unwind);
-
-  /* Shared library handling.  */
-
-  /* GNU/Linux uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets (gdbarch,
-					 svr4_ilp32_fetch_link_map_offsets);
-
-  /* GNU/Linux uses the dynamic linker included in the GNU C Library.  */
-  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
-
-  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
-
-  /* Core file support. */
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, m68k_linux_iterate_over_regset_sections);
-
-  /* Enable TLS support.  */
-  set_gdbarch_fetch_tls_load_module_address (gdbarch,
-                                             svr4_fetch_objfile_link_map);
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_m68k_linux_tdep;
-
-void
-_initialize_m68k_linux_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_LINUX,
-			  m68k_linux_init_abi);
-  observer_attach_inferior_created (m68k_linux_inferior_created);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-tdep.c ./gdb/m68k-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68k-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Motorola 68000 series.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -57,14 +57,9 @@
 #define BPT_VECTOR 0xf
 #endif
 
-static const gdb_byte *
-m68k_local_breakpoint_from_pc (struct gdbarch *gdbarch,
-			       CORE_ADDR *pcptr, int *lenptr)
-{
-  static gdb_byte break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
-  *lenptr = sizeof (break_insn);
-  return break_insn;
-}
+constexpr gdb_byte m68k_break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
+
+typedef BP_MANIPULATION (m68k_break_insn) m68k_breakpoint;
 
 
 /* Construct types for ISA-specific registers.  */
@@ -573,7 +568,7 @@ m68k_dwarf_reg_to_regnum (struct gdbarch
     /* pc */
     return M68K_PC_REGNUM;
   else
-    return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+    return -1;
 }
 
 
@@ -882,7 +877,7 @@ m68k_frame_cache (struct frame_info *thi
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct m68k_frame_cache *) *this_cache;
 
   cache = m68k_alloc_frame_cache ();
   *this_cache = cache;
@@ -1028,7 +1023,7 @@ m68k_get_longjmp_target (struct frame_in
       return 0;
     }
 
-  buf = alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
+  buf = (gdb_byte *) alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
   sp = get_frame_register_unsigned (frame, gdbarch_sp_regnum (gdbarch));
 
   if (target_read_memory (sp + SP_ARG0,	/* Offset of first arg on stack.  */
@@ -1185,7 +1180,7 @@ m68k_gdbarch_init (struct gdbarch_info i
       return best_arch->gdbarch;
     }
 
-  tdep = xzalloc (sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->fpregs_present = has_fp;
   tdep->flavour = flavour;
@@ -1196,7 +1191,8 @@ m68k_gdbarch_init (struct gdbarch_info i
   set_gdbarch_long_double_bit (gdbarch, long_double_format[0]->totalsize);
 
   set_gdbarch_skip_prologue (gdbarch, m68k_skip_prologue);
-  set_gdbarch_breakpoint_from_pc (gdbarch, m68k_local_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, m68k_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, m68k_breakpoint::bp_from_kind);
 
   /* Stack grows down.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-tdep.h ./gdb/m68k-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m68k-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m68k-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Motorola 68000 series.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -101,7 +101,7 @@ struct gdbarch_tdep
 extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
 
 
-/* Functions exported from m68kbsd-tdep.c.  */
+/* Functions exported from m68k-bsd-tdep.c.  */
 
 extern int m68kbsd_fpreg_offset (struct gdbarch *gdbarch, int regnum);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-bsd-nat.c ./gdb/m88k-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/m88k-bsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,111 @@
+/* Native-dependent code for Motorola 88000 BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "m88k-tdep.h"
+#include "inf-ptrace.h"
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+m88kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const char *regs = gregs;
+  int regnum;
+
+  for (regnum = 0; regnum < M88K_NUM_REGS; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+m88kbsd_collect_gregset (const struct regcache *regcache,
+			 void *gregs, int regnum)
+{
+  char *regs = gregs;
+  int i;
+
+  for (i = 0; i < M88K_NUM_REGS; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 4);
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers.  */
+
+static void
+m88kbsd_fetch_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  m88kbsd_supply_gregset (regcache, &regs);
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers.  */
+
+static void
+m88kbsd_store_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  m88kbsd_collect_gregset (regcache, &regs, regnum);
+
+  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't write registers"));
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_m88kbsd_nat (void);
+
+void
+_initialize_m88kbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = m88kbsd_fetch_inferior_registers;
+  t->to_store_registers = m88kbsd_store_inferior_registers;
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88kbsd-nat.c ./gdb/m88kbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88kbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m88kbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,111 +0,0 @@
-/* Native-dependent code for Motorola 88000 BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "m88k-tdep.h"
-#include "inf-ptrace.h"
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-m88kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const char *regs = gregs;
-  int regnum;
-
-  for (regnum = 0; regnum < M88K_NUM_REGS; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-m88kbsd_collect_gregset (const struct regcache *regcache,
-			 void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int i;
-
-  for (i = 0; i < M88K_NUM_REGS; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 4);
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers.  */
-
-static void
-m88kbsd_fetch_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  m88kbsd_supply_gregset (regcache, &regs);
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers.  */
-
-static void
-m88kbsd_store_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  m88kbsd_collect_gregset (regcache, &regs, regnum);
-
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't write registers"));
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_m88kbsd_nat (void);
-
-void
-_initialize_m88kbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = m88kbsd_fetch_inferior_registers;
-  t->to_store_registers = m88kbsd_store_inferior_registers;
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-tdep.c ./gdb/m88k-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m88k-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Motorola 88000 series.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 #include "symtab.h"
 #include "trad-frame.h"
 #include "value.h"
+#include <algorithm>
 
 #include "m88k-tdep.h"
 
@@ -96,16 +97,11 @@ m88k_addr_bits_remove (struct gdbarch *g
    encode a breakpoint instruction, store the length of the string in
    *LEN and optionally adjust *PC to point to the correct memory
    location for inserting the breakpoint.  */
-   
-static const gdb_byte *
-m88k_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  /* tb 0,r0,511 */
-  static gdb_byte break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
 
-  *len = sizeof (break_insn);
-  return break_insn;
-}
+/* tb 0,r0,511 */
+constexpr gdb_byte m88k_break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
+
+typedef BP_MANIPULATION (m88k_break_insn) m88k_breakpoint;
 
 static CORE_ADDR
 m88k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
@@ -533,11 +529,9 @@ m88k_analyze_prologue (struct gdbarch *g
   /* Provide a dummy cache if necessary.  */
   if (cache == NULL)
     {
-      size_t sizeof_saved_regs =
-	(M88K_R31_REGNUM + 1) * sizeof (struct trad_frame_saved_reg);
-
-      cache = alloca (sizeof (struct m88k_frame_cache));
-      cache->saved_regs = alloca (sizeof_saved_regs);
+      cache = XALLOCA (struct m88k_frame_cache);
+      cache->saved_regs =
+        XALLOCAVEC (struct trad_frame_saved_reg, M88K_R31_REGNUM + 1);
 
       /* We only initialize the members we care about.  */
       cache->saved_regs[M88K_R1_REGNUM].addr = -1;
@@ -560,7 +554,7 @@ m88k_analyze_prologue (struct gdbarch *g
              prologue.  */
 	  if (cache->fp_offset != -1
 	      && cache->saved_regs[M88K_R1_REGNUM].addr != -1)
-	    return min (pc, end);
+	    return std::min (pc, end);
 	  break;
 
 	case M88K_PIA_NOTE_ST:
@@ -568,7 +562,7 @@ m88k_analyze_prologue (struct gdbarch *g
 	  /* If no frame has been allocated, the stores aren't part of
              the prologue.  */
 	  if (cache->sp_offset == 0)
-	    return min (pc, end);
+	    return std::min (pc, end);
 
 	  /* Record location of saved registers.  */
 	  {
@@ -585,7 +579,7 @@ m88k_analyze_prologue (struct gdbarch *g
 	  /* A second stack pointer adjustment isn't part of the
              prologue.  */
 	  if (cache->sp_offset != 0)
-	    return min (pc, end);
+	    return std::min (pc, end);
 
 	  /* Store stack pointer adjustment.  */
 	  cache->sp_offset = -SUBU_OFFSET (insn);
@@ -595,7 +589,7 @@ m88k_analyze_prologue (struct gdbarch *g
 	  /* A second frame pointer assignment isn't part of the
              prologue.  */
 	  if (cache->fp_offset != -1)
-	    return min (pc, end);
+	    return std::min (pc, end);
 
 	  /* Record frame pointer assignment.  */
 	  cache->fp_offset = ADDU_OFFSET (insn);
@@ -606,12 +600,12 @@ m88k_analyze_prologue (struct gdbarch *g
              the instruction in the delay slot might be.  Limit the
              prologue analysis to the delay slot and record the branch
              instruction as the end of the prologue.  */
-	  limit = min (limit, pc + 2 * M88K_INSN_SIZE);
+	  limit = std::min (limit, pc + 2 * M88K_INSN_SIZE);
 	  end = pc;
 	  break;
 
 	case M88K_PIA_NOTE_PROLOGUE_END:
-	  return min (pc, end);
+	  return std::min (pc, end);
 	}
 
       pc += M88K_INSN_SIZE;
@@ -654,7 +648,7 @@ m88k_frame_cache (struct frame_info *thi
   CORE_ADDR frame_sp;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct m88k_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct m88k_frame_cache);
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -784,7 +778,7 @@ m88k_supply_gregset (const struct regset
 		     struct regcache *regcache,
 		     int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   for (i = 0; i < M88K_NUM_REGS; i++)
@@ -858,7 +852,8 @@ m88k_gdbarch_init (struct gdbarch_info i
   set_gdbarch_return_value (gdbarch, m88k_return_value);
 
   set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
-  set_gdbarch_breakpoint_from_pc (gdbarch, m88k_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, m88k_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, m88k_breakpoint::bp_from_kind);
   set_gdbarch_unwind_pc (gdbarch, m88k_unwind_pc);
   set_gdbarch_write_pc (gdbarch, m88k_write_pc);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-tdep.h ./gdb/m88k-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/m88k-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/m88k-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Motorola 88000 series.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/machoread.c ./gdb/machoread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/machoread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/machoread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    Contributed by AdaCore.
 
@@ -33,6 +33,7 @@
 #include "psympriv.h"
 #include "complaints.h"
 #include "gdb_bfd.h"
+#include <string>
 
 /* If non-zero displays debugging message.  */
 static unsigned int mach_o_debug_level = 0;
@@ -96,7 +97,8 @@ macho_register_oso (VEC (oso_el) **oso_v
 /* Add symbol SYM to the minimal symbol table of OBJFILE.  */
 
 static void
-macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
+macho_symtab_add_minsym (minimal_symbol_reader &reader,
+			 struct objfile *objfile, const asymbol *sym)
 {
   if (sym->name == NULL || *sym->name == '\0')
     {
@@ -146,10 +148,9 @@ macho_symtab_add_minsym (struct objfile 
       else
         return;	/* Skip this symbol.  */
 
-      prim_record_minimal_symbol_and_info
-        (sym->name, symaddr, ms_type,
-	 gdb_bfd_section_index (objfile->obfd, sym->section),
-	 objfile);
+      reader.record_with_info (sym->name, symaddr, ms_type,
+			       gdb_bfd_section_index (objfile->obfd,
+						      sym->section));
     }
 }
 
@@ -157,12 +158,12 @@ macho_symtab_add_minsym (struct objfile 
    NUMBER_OF_SYMBOLS for OBJFILE.  Registers OSO filenames found.  */
 
 static void
-macho_symtab_read (struct objfile *objfile,
+macho_symtab_read (minimal_symbol_reader &reader,
+		   struct objfile *objfile,
 		   long number_of_symbols, asymbol **symbol_table,
 		   VEC (oso_el) **oso_vector_ptr)
 {
   long i;
-  const asymbol *dir_so = NULL;
   const asymbol *file_so = NULL;
   asymbol **oso_file = NULL;
   unsigned int nbr_syms = 0;
@@ -208,7 +209,6 @@ macho_symtab_read (struct objfile *objfi
               else
                 {
                   file_so = sym;
-                  dir_so = NULL;
                   state = S_FIRST_SO;
                 }
             }
@@ -228,7 +228,7 @@ macho_symtab_read (struct objfile *objfi
           else
             {
               /* Non-debugging symbols go to the minimal symbol table.  */
-              macho_symtab_add_minsym (objfile, sym);
+              macho_symtab_add_minsym (reader, objfile, sym);
             }
           break;
 
@@ -245,7 +245,6 @@ macho_symtab_read (struct objfile *objfi
               else if (state == S_FIRST_SO)
                 {
                   /* Second SO stab for the file name.  */
-                  dir_so = file_so;
                   file_so = sym;
                   state = S_SECOND_SO;
                 }
@@ -292,7 +291,6 @@ macho_symtab_read (struct objfile *objfi
                 {
                   complaint (&symfile_complaints, _("Missing nul SO"));
                   file_so = sym;
-                  dir_so = NULL;
                   state = S_FIRST_SO;
                 }
             }
@@ -431,8 +429,10 @@ macho_resolve_oso_sym_with_minsym (struc
 /* Add oso file OSO/ABFD as a symbol file.  */
 
 static void
-macho_add_oso_symfile (oso_el *oso, bfd *abfd, const char *name,
-                       struct objfile *main_objfile, int symfile_flags)
+macho_add_oso_symfile (oso_el *oso, const gdb_bfd_ref_ptr &abfd,
+		       const char *name,
+                       struct objfile *main_objfile,
+		       symfile_add_flags symfile_flags)
 {
   int storage;
   int i;
@@ -440,7 +440,6 @@ macho_add_oso_symfile (oso_el *oso, bfd 
   asymbol **symp;
   struct bfd_hash_table table;
   int nbr_sections;
-  struct cleanup *cleanup;
 
   /* Per section flag to mark which section have been rebased.  */
   unsigned char *sections_rebased;
@@ -449,18 +448,16 @@ macho_add_oso_symfile (oso_el *oso, bfd 
     printf_unfiltered
       (_("Loading debugging symbols from oso: %s\n"), oso->name);
 
-  if (!bfd_check_format (abfd, bfd_object))
+  if (!bfd_check_format (abfd.get (), bfd_object))
     {
       warning (_("`%s': can't read symbols: %s."), oso->name,
                bfd_errmsg (bfd_get_error ()));
-      gdb_bfd_unref (abfd);
       return;
     }
 
-  if (abfd->my_archive == NULL && oso->mtime != bfd_get_mtime (abfd))
+  if (abfd->my_archive == NULL && oso->mtime != bfd_get_mtime (abfd.get ()))
     {
       warning (_("`%s': file time stamp mismatch."), oso->name);
-      gdb_bfd_unref (abfd);
       return;
     }
 
@@ -469,19 +466,18 @@ macho_add_oso_symfile (oso_el *oso, bfd 
                               oso->nbr_syms))
     {
       warning (_("`%s': can't create hash table"), oso->name);
-      gdb_bfd_unref (abfd);
       return;
     }
 
-  bfd_set_cacheable (abfd, 1);
+  bfd_set_cacheable (abfd.get (), 1);
 
   /* Read symbols table.  */
-  storage = bfd_get_symtab_upper_bound (abfd);
+  storage = bfd_get_symtab_upper_bound (abfd.get ());
   symbol_table = (asymbol **) xmalloc (storage);
-  bfd_canonicalize_symtab (abfd, symbol_table);
+  bfd_canonicalize_symtab (abfd.get (), symbol_table);
 
   /* Init section flags.  */
-  nbr_sections = bfd_count_sections (abfd);
+  nbr_sections = bfd_count_sections (abfd.get ());
   sections_rebased = (unsigned char *) alloca (nbr_sections);
   for (i = 0; i < nbr_sections; i++)
     sections_rebased[i] = 0;
@@ -602,7 +598,7 @@ macho_add_oso_symfile (oso_el *oso, bfd 
                          sec->name, sym->name,
                          paddress (arch, res));
                     }
-                  bfd_set_section_vma (abfd, sec, res);
+                  bfd_set_section_vma (abfd.get (), sec, res);
                   sections_rebased[sec->index] = 1;
                 }
             }
@@ -618,13 +614,12 @@ macho_add_oso_symfile (oso_el *oso, bfd 
 
   /* We need to clear SYMFILE_MAINLINE to avoid interractive question
      from symfile.c:symbol_file_add_with_addrs_or_offsets.  */
-  cleanup = make_cleanup_bfd_unref (abfd);
   symbol_file_add_from_bfd
-    (abfd, name, symfile_flags & ~(SYMFILE_MAINLINE | SYMFILE_VERBOSE), NULL,
+    (abfd.get (), name, symfile_flags & ~(SYMFILE_MAINLINE | SYMFILE_VERBOSE),
+     NULL,
      main_objfile->flags & (OBJF_REORDERED | OBJF_SHARED
 			    | OBJF_READNOW | OBJF_USERLOADED),
      main_objfile);
-  do_cleanups (cleanup);
 }
 
 /* Read symbols from the vector of oso files.
@@ -634,12 +629,11 @@ macho_add_oso_symfile (oso_el *oso, bfd 
 static void
 macho_symfile_read_all_oso (VEC (oso_el) **oso_vector_ptr,
 			    struct objfile *main_objfile,
-			    int symfile_flags)
+			    symfile_add_flags symfile_flags)
 {
   int ix;
   VEC (oso_el) *vec = *oso_vector_ptr;
   oso_el *oso;
-  struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
 
   /* Sort oso by name so that files from libraries are gathered.  */
   qsort (VEC_address (oso_el, vec), VEC_length (oso_el, vec),
@@ -653,51 +647,45 @@ macho_symfile_read_all_oso (VEC (oso_el)
       pfx_len = get_archive_prefix_len (oso->name);
       if (pfx_len > 0)
 	{
-	  bfd *archive_bfd;
-	  bfd *member_bfd;
-	  char *archive_name = XNEWVEC (char, pfx_len + 1);
           int last_ix;
           oso_el *oso2;
           int ix2;
 
-	  memcpy (archive_name, oso->name, pfx_len);
-	  archive_name[pfx_len] = '\0';
-
-	  make_cleanup (xfree, archive_name);
+	  std::string archive_name (oso->name, pfx_len);
 
           /* Compute number of oso for this archive.  */
           for (last_ix = ix;
                VEC_iterate (oso_el, vec, last_ix, oso2); last_ix++)
             {
-              if (strncmp (oso2->name, archive_name, pfx_len) != 0)
+              if (strncmp (oso2->name, archive_name.c_str (), pfx_len) != 0)
                 break;
             }
 
 	  /* Open the archive and check the format.  */
-	  archive_bfd = gdb_bfd_open (archive_name, gnutarget, -1);
+	  gdb_bfd_ref_ptr archive_bfd (gdb_bfd_open (archive_name.c_str (),
+						     gnutarget, -1));
 	  if (archive_bfd == NULL)
 	    {
 	      warning (_("Could not open OSO archive file \"%s\""),
-		       archive_name);
+		       archive_name.c_str ());
               ix = last_ix;
 	      continue;
 	    }
-	  if (!bfd_check_format (archive_bfd, bfd_archive))
+	  if (!bfd_check_format (archive_bfd.get (), bfd_archive))
 	    {
 	      warning (_("OSO archive file \"%s\" not an archive."),
-		       archive_name);
-	      gdb_bfd_unref (archive_bfd);
+		       archive_name.c_str ());
               ix = last_ix;
 	      continue;
 	    }
 
-	  member_bfd = gdb_bfd_openr_next_archived_file (archive_bfd, NULL);
+	  gdb_bfd_ref_ptr member_bfd
+	    (gdb_bfd_openr_next_archived_file (archive_bfd.get (), NULL));
 
 	  if (member_bfd == NULL)
 	    {
 	      warning (_("Could not read archive members out of "
-			 "OSO archive \"%s\""), archive_name);
-	      gdb_bfd_unref (archive_bfd);
+			 "OSO archive \"%s\""), archive_name.c_str ());
               ix = last_ix;
 	      continue;
 	    }
@@ -705,7 +693,6 @@ macho_symfile_read_all_oso (VEC (oso_el)
           /* Load all oso in this library.  */
 	  while (member_bfd != NULL)
 	    {
-	      bfd *prev;
 	      const char *member_name = member_bfd->filename;
               int member_len = strlen (member_name);
 
@@ -727,13 +714,8 @@ macho_symfile_read_all_oso (VEC (oso_el)
                     }
                 }
 
-              prev = member_bfd;
-	      member_bfd = gdb_bfd_openr_next_archived_file (archive_bfd,
-							     member_bfd);
-
-              /* Free previous member if not referenced by an oso.  */
-              if (ix2 >= last_ix)
-                gdb_bfd_unref (prev);
+	      member_bfd = gdb_bfd_openr_next_archived_file (archive_bfd.get (),
+							     member_bfd.get ());
 	    }
           for (ix2 = ix; ix2 < last_ix; ix2++)
             {
@@ -747,10 +729,8 @@ macho_symfile_read_all_oso (VEC (oso_el)
 	}
       else
 	{
-          bfd *abfd;
-
-	  abfd = gdb_bfd_open (oso->name, gnutarget, -1);
-	  if (!abfd)
+	  gdb_bfd_ref_ptr abfd (gdb_bfd_open (oso->name, gnutarget, -1));
+	  if (abfd == NULL)
             warning (_("`%s': can't open to read symbols: %s."), oso->name,
                      bfd_errmsg (bfd_get_error ()));
           else
@@ -760,8 +740,6 @@ macho_symfile_read_all_oso (VEC (oso_el)
           ix++;
         }
     }
-
-  do_cleanups (cleanup);
 }
 
 /* DSYM (debug symbols) files contain the debug info of an executable.
@@ -776,15 +754,14 @@ macho_symfile_read_all_oso (VEC (oso_el)
    Return NULL if no valid dsym file is found (FILENAMEP is not used in
    such case).  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 macho_check_dsym (struct objfile *objfile, char **filenamep)
 {
   size_t name_len = strlen (objfile_name (objfile));
   size_t dsym_len = strlen (DSYM_SUFFIX);
   const char *base_name = lbasename (objfile_name (objfile));
   size_t base_len = strlen (base_name);
-  char *dsym_filename = alloca (name_len + dsym_len + base_len + 1);
-  bfd *dsym_bfd;
+  char *dsym_filename = (char *) alloca (name_len + dsym_len + base_len + 1);
   bfd_mach_o_load_command *main_uuid;
   bfd_mach_o_load_command *dsym_uuid;
 
@@ -801,25 +778,23 @@ macho_check_dsym (struct objfile *objfil
       warning (_("can't find UUID in %s"), objfile_name (objfile));
       return NULL;
     }
-  dsym_bfd = gdb_bfd_openr (dsym_filename, gnutarget);
+  gdb_bfd_ref_ptr dsym_bfd (gdb_bfd_openr (dsym_filename, gnutarget));
   if (dsym_bfd == NULL)
     {
       warning (_("can't open dsym file %s"), dsym_filename);
       return NULL;
     }
 
-  if (!bfd_check_format (dsym_bfd, bfd_object))
+  if (!bfd_check_format (dsym_bfd.get (), bfd_object))
     {
-      gdb_bfd_unref (dsym_bfd);
       warning (_("bad dsym file format: %s"), bfd_errmsg (bfd_get_error ()));
       return NULL;
     }
 
-  if (bfd_mach_o_lookup_command (dsym_bfd,
+  if (bfd_mach_o_lookup_command (dsym_bfd.get (),
                                  BFD_MACH_O_LC_UUID, &dsym_uuid) == 0)
     {
       warning (_("can't find UUID in %s"), dsym_filename);
-      gdb_bfd_unref (dsym_bfd);
       return NULL;
     }
   if (memcmp (dsym_uuid->command.uuid.uuid, main_uuid->command.uuid.uuid,
@@ -827,7 +802,6 @@ macho_check_dsym (struct objfile *objfil
     {
       warning (_("dsym file UUID doesn't match the one in %s"),
 	       objfile_name (objfile));
-      gdb_bfd_unref (dsym_bfd);
       return NULL;
     }
   *filenamep = xstrdup (dsym_filename);
@@ -835,12 +809,10 @@ macho_check_dsym (struct objfile *objfil
 }
 
 static void
-macho_symfile_read (struct objfile *objfile, int symfile_flags)
+macho_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *abfd = objfile->obfd;
-  CORE_ADDR offset;
   long storage_needed;
-  bfd *dsym_bfd;
   VEC (oso_el) *oso_vector = NULL;
   struct cleanup *old_chain = make_cleanup (VEC_cleanup (oso_el), &oso_vector);
 
@@ -866,8 +838,7 @@ macho_symfile_read (struct objfile *objf
 	  symbol_table = (asymbol **) xmalloc (storage_needed);
 	  make_cleanup (xfree, symbol_table);
 
-          init_minimal_symbol_collection ();
-          make_cleanup_discard_minimal_symbols ();
+          minimal_symbol_reader reader (objfile);
 
 	  symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
 
@@ -876,9 +847,10 @@ macho_symfile_read (struct objfile *objf
 		   bfd_get_filename (objfile->obfd),
 		   bfd_errmsg (bfd_get_error ()));
 
-	  macho_symtab_read (objfile, symcount, symbol_table, &oso_vector);
+	  macho_symtab_read (reader, objfile, symcount, symbol_table,
+			     &oso_vector);
 
-          install_minimal_symbols (objfile);
+          reader.install ();
 	}
 
       /* Try to read .eh_frame / .debug_frame.  */
@@ -888,11 +860,9 @@ macho_symfile_read (struct objfile *objf
       dwarf2_build_frame_info (objfile);
 
       /* Check for DSYM file.  */
-      dsym_bfd = macho_check_dsym (objfile, &dsym_filename);
+      gdb_bfd_ref_ptr dsym_bfd (macho_check_dsym (objfile, &dsym_filename));
       if (dsym_bfd != NULL)
 	{
-	  int ix;
-	  oso_el *oso;
           struct bfd_section *asect, *dsect;
 
 	  make_cleanup (xfree, dsym_filename);
@@ -907,14 +877,13 @@ macho_symfile_read (struct objfile *objf
             {
               if (strcmp (asect->name, dsect->name) != 0)
                 break;
-              bfd_set_section_size (dsym_bfd, dsect,
+              bfd_set_section_size (dsym_bfd.get (), dsect,
                                     bfd_get_section_size (asect));
             }
 
 	  /* Add the dsym file as a separate file.  */
-	  make_cleanup_bfd_unref (dsym_bfd);
-          symbol_file_add_separate (dsym_bfd, dsym_filename, symfile_flags,
-				    objfile);
+          symbol_file_add_separate (dsym_bfd.get (), dsym_filename,
+				    symfile_flags, objfile);
 
 	  /* Don't try to read dwarf2 from main file or shared libraries.  */
 	  do_cleanups (old_chain);
@@ -963,7 +932,6 @@ macho_symfile_offsets (struct objfile *o
                        const struct section_addr_info *addrs)
 {
   unsigned int i;
-  unsigned int num_sections;
   struct obj_section *osect;
 
   /* Allocate section_offsets.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrocmd.c ./gdb/macrocmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrocmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macrocmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* C preprocessor macro expansion commands for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -186,20 +186,6 @@ print_macro_definition (const char *name
     fprintf_filtered (gdb_stdout, "=%s\n", d->replacement);
 }
 
-/* A callback function for usage with macro_for_each and friends.
-   If USER_DATA is null all macros will be printed.
-   Otherwise USER_DATA is considered to be a string, printing
-   only macros who's NAME matches USER_DATA.  Other arguments are
-   routed to print_macro_definition.  */
-static void
-print_macro_callback (const char *name, const struct macro_definition *macro,
-		   struct macro_source_file *source, int line,
-		   void *user_data)
-{
-  if (! user_data || strcmp (user_data, name) == 0)
-    print_macro_definition (name, macro, source, line);
-}
-
 /* The implementation of the `info macro' command.  */
 static void
 info_macro_command (char *args, int from_tty)
@@ -248,7 +234,14 @@ info_macro_command (char *args, int from
   if (! ms)
     macro_inform_no_debuginfo ();
   else if (show_all_macros_named)
-    macro_for_each (ms->file->table, print_macro_callback, name);
+    macro_for_each (ms->file->table, [&] (const char *macro_name,
+					  const macro_definition *macro,
+					  macro_source_file *source,
+					  int line)
+      {
+	if (strcmp (name, macro_name) == 0)
+	  print_macro_definition (name, macro, source, line);
+      });
   else
     {
       struct macro_definition *d;
@@ -296,7 +289,7 @@ info_macros_command (char *args, int fro
   if (! ms || ! ms->file || ! ms->file->table)
     macro_inform_no_debuginfo ();
   else
-    macro_for_each_in_scope (ms->file, ms->line, print_macro_callback, NULL);
+    macro_for_each_in_scope (ms->file, ms->line, print_macro_definition);
 
   do_cleanups (cleanup_chain);
 }
@@ -387,7 +380,7 @@ macro_define_command (char *exp, int fro
     {
       /* Function-like macro.  */
       int alloced = 5;
-      char **argv = (char **) xmalloc (alloced * sizeof (char *));
+      char **argv = XNEWVEC (char *, alloced);
 
       new_macro.kind = macro_function_like;
       new_macro.argc = 0;
@@ -465,8 +458,7 @@ macro_undef_command (char *exp, int from
 
 static void
 print_one_macro (const char *name, const struct macro_definition *macro,
-		 struct macro_source_file *source, int line,
-		 void *ignore)
+		 struct macro_source_file *source, int line)
 {
   fprintf_filtered (gdb_stdout, "macro define %s", name);
   if (macro->kind == macro_function_like)
@@ -486,7 +478,7 @@ print_one_macro (const char *name, const
 static void
 macro_list_command (char *exp, int from_tty)
 {
-  macro_for_each (macro_user_macros, print_one_macro, NULL);
+  macro_for_each (macro_user_macros, print_one_macro);
 }
 
 
@@ -522,21 +514,18 @@ expression work together to yield a pre-
 	   &macrolist);
   add_alias_cmd ("exp1", "expand-once", no_class, 1, &macrolist);
 
-  add_cmd ("macro", no_class, info_macro_command,
-	   _("Show the definition of MACRO, and it's source location.\n\
+  add_info ("macro", info_macro_command,
+	    _("Show the definition of MACRO, and it's source location.\n\
 Usage: info macro [-a|-all] [--] MACRO\n\
 Options: \n\
   -a, --all    Output all definitions of MACRO in the current compilation\
  unit.\n\
-  --           Specify the end of arguments and the beginning of the MACRO."),
-
-	   &infolist);
+  --           Specify the end of arguments and the beginning of the MACRO."));
 
-  add_cmd ("macros", no_class, info_macros_command,
-	   _("Show the definitions of all macros at LINESPEC, or the current \
+  add_info ("macros", info_macros_command,
+	    _("Show the definitions of all macros at LINESPEC, or the current \
 source location.\n\
-Usage: info macros [LINESPEC]"),
-	   &infolist);
+Usage: info macros [LINESPEC]"));
 
   add_cmd ("define", no_class, macro_define_command, _("\
 Define a new C/C++ preprocessor macro.\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroexp.c ./gdb/macroexp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroexp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macroexp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* C preprocessor macro expansion for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -146,7 +146,7 @@ resize_buffer (struct macro_buffer *b, i
     while (b->size <= n)
       b->size *= 2;
 
-  b->text = xrealloc (b->text, b->size);
+  b->text = (char *) xrealloc (b->text, b->size);
 }
 
 
@@ -814,7 +814,7 @@ gather_arguments (const char *name, stru
 
   args_len = 0;
   args_size = 6;
-  args = (struct macro_buffer *) xmalloc (sizeof (*args) * args_size);
+  args = XNEWVEC (struct macro_buffer, args_size);
 
   for (;;)
     {
@@ -825,7 +825,7 @@ gather_arguments (const char *name, stru
       if (args_len >= args_size)
         {
           args_size *= 2;
-          args = xrealloc (args, sizeof (*args) * args_size);
+          args = XRESIZEVEC (struct macro_buffer, args, args_size);
         }
 
       /* Initialize the next argument.  */
@@ -858,7 +858,8 @@ gather_arguments (const char *name, stru
 		      if (args_len >= args_size)
 			{
 			  args_size++;
-			  args = xrealloc (args, sizeof (*args) * args_size);
+			  args = XRESIZEVEC (struct macro_buffer, args,
+					     args_size);
 			}
 		      arg = &args[args_len++];
 		      set_token (arg, src->text, src->text);
@@ -1330,7 +1331,7 @@ maybe_expand (struct macro_buffer *dest,
     {
       /* Make a null-terminated copy of it, since that's what our
          lookup function expects.  */
-      char *id = xmalloc (src_first->len + 1);
+      char *id = (char *) xmalloc (src_first->len + 1);
       struct cleanup *back_to = make_cleanup (xfree, id);
 
       memcpy (id, src_first->text, src_first->len);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroexp.h ./gdb/macroexp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroexp.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macroexp.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface to C preprocessor macro expansion for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroscope.c ./gdb/macroscope.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroscope.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macroscope.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Functions for deciding which macros are currently in scope.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -48,7 +48,7 @@ sal_macro_scope (struct symtab_and_line 
   if (COMPUNIT_MACRO_TABLE (cust) == NULL)
     return NULL;
 
-  ms = (struct macro_scope *) xmalloc (sizeof (*ms));
+  ms = XNEW (struct macro_scope);
 
   main_file = macro_main (COMPUNIT_MACRO_TABLE (cust));
   inclusion = macro_lookup_inclusion (main_file, sal.symtab->filename);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroscope.h ./gdb/macroscope.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macroscope.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macroscope.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface to functions for deciding which macros are currently in scope.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrotab.c ./gdb/macrotab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrotab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macrotab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* C preprocessor macro tables for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -130,7 +130,7 @@ macro_bcache (struct macro_table *t, con
 static const char *
 macro_bcache_str (struct macro_table *t, const char *s)
 {
-  return macro_bcache (t, s, strlen (s) + 1);
+  return (const char *) macro_bcache (t, s, strlen (s) + 1);
 }
 
 
@@ -352,7 +352,7 @@ new_macro_key (struct macro_table *t,
                struct macro_source_file *file,
                int line)
 {
-  struct macro_key *k = macro_alloc (sizeof (*k), t);
+  struct macro_key *k = (struct macro_key *) macro_alloc (sizeof (*k), t);
 
   memset (k, 0, sizeof (*k));
   k->table = t;
@@ -385,7 +385,8 @@ new_source_file (struct macro_table *t,
                  const char *filename)
 {
   /* Get space for the source file structure itself.  */
-  struct macro_source_file *f = macro_alloc (sizeof (*f), t);
+  struct macro_source_file *f
+    = (struct macro_source_file *) macro_alloc (sizeof (*f), t);
 
   memset (f, 0, sizeof (*f));
   f->table = t;
@@ -553,7 +554,8 @@ new_macro_definition (struct macro_table
                       int argc, const char **argv,
                       const char *replacement)
 {
-  struct macro_definition *d = macro_alloc (sizeof (*d), t);
+  struct macro_definition *d
+    = (struct macro_definition *) macro_alloc (sizeof (*d), t);
 
   memset (d, 0, sizeof (*d));
   d->table = t;
@@ -568,12 +570,13 @@ new_macro_definition (struct macro_table
       int cached_argv_size = argc * sizeof (*cached_argv);
 
       /* Bcache all the arguments.  */
-      cached_argv = alloca (cached_argv_size);
+      cached_argv = (const char **) alloca (cached_argv_size);
       for (i = 0; i < argc; i++)
         cached_argv[i] = macro_bcache_str (t, argv[i]);
 
       /* Now bcache the array of argument pointers itself.  */
-      d->argv = macro_bcache (t, cached_argv, cached_argv_size);
+      d->argv = ((const char * const *)
+		 macro_bcache (t, cached_argv, cached_argv_size));
     }
 
   /* We don't bcache the entire definition structure because it's got
@@ -962,8 +965,7 @@ macro_definition_location (struct macro_
    the FILE and LINE fields.  */
 struct macro_for_each_data
 {
-  macro_callback_fn fn;
-  void *user_data;
+  gdb::function_view<macro_callback_fn> fn;
   struct macro_source_file *file;
   int line;
 };
@@ -982,20 +984,18 @@ foreach_macro (splay_tree_node node, voi
 			  (struct macro_definition *) node->value);
   xfree (key_fullname);
 
-  (*datum->fn) (key->name, def, key->start_file, key->start_line,
-		datum->user_data);
+  datum->fn (key->name, def, key->start_file, key->start_line);
   return 0;
 }
 
 /* Call FN for every macro in TABLE.  */
 void
-macro_for_each (struct macro_table *table, macro_callback_fn fn,
-		void *user_data)
+macro_for_each (struct macro_table *table,
+		gdb::function_view<macro_callback_fn> fn)
 {
   struct macro_for_each_data datum;
 
   datum.fn = fn;
-  datum.user_data = user_data;
   datum.file = NULL;
   datum.line = 0;
   splay_tree_foreach (table->definitions, foreach_macro, &datum);
@@ -1021,20 +1021,18 @@ foreach_macro_in_scope (splay_tree_node 
       && (!key->end_file
 	  || compare_locations (key->end_file, key->end_line,
 				datum->file, datum->line) >= 0))
-    (*datum->fn) (key->name, def, key->start_file, key->start_line,
-		  datum->user_data);
+    datum->fn (key->name, def, key->start_file, key->start_line);
   return 0;
 }
 
 /* Call FN for every macro is visible in SCOPE.  */
 void
 macro_for_each_in_scope (struct macro_source_file *file, int line,
-			 macro_callback_fn fn, void *user_data)
+			 gdb::function_view<macro_callback_fn> fn)
 {
   struct macro_for_each_data datum;
 
   datum.fn = fn;
-  datum.user_data = user_data;
   datum.file = file;
   datum.line = line;
   splay_tree_foreach (file->table->definitions,
@@ -1054,9 +1052,9 @@ new_macro_table (struct obstack *obstack
 
   /* First, get storage for the `struct macro_table' itself.  */
   if (obstack)
-    t = obstack_alloc (obstack, sizeof (*t));
+    t = XOBNEW (obstack, struct macro_table);
   else
-    t = xmalloc (sizeof (*t));
+    t = XNEW (struct macro_table);
 
   memset (t, 0, sizeof (*t));
   t->obstack = obstack;
@@ -1099,5 +1097,5 @@ macro_source_fullname (struct macro_sour
   if (comp_dir == NULL || IS_ABSOLUTE_PATH (file->filename))
     return xstrdup (file->filename);
 
-  return concat (comp_dir, SLASH_STRING, file->filename, NULL);
+  return concat (comp_dir, SLASH_STRING, file->filename, (char *) NULL);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrotab.h ./gdb/macrotab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/macrotab.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/macrotab.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface to C preprocessor macro tables for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -20,6 +20,8 @@
 #ifndef MACROTAB_H
 #define MACROTAB_H
 
+#include "common/function-view.h"
+
 struct obstack;
 struct bcache;
 struct compunit_symtab;
@@ -329,28 +331,23 @@ struct macro_source_file *(macro_definit
                             const char *name,
                             int *definition_line));
 
-/* Callback function when walking a macro table.  NAME is the name of
-   the macro, and DEFINITION is the definition.  SOURCE is the file at the
-   start of the include path, and LINE is the line number of the SOURCE file
-   where the macro was defined.  USER_DATA is an arbitrary pointer which is
-   passed by the caller to macro_for_each or macro_for_each_in_scope.  */
-typedef void (*macro_callback_fn) (const char *name,
-				   const struct macro_definition *definition,
-				   struct macro_source_file *source,
-				   int line,
-				   void *user_data);
-
-/* Call the function FN for each macro in the macro table TABLE.
-   USER_DATA is passed, untranslated, to FN.  */
-void macro_for_each (struct macro_table *table, macro_callback_fn fn,
-		     void *user_data);
-
-/* Call the function FN for each macro that is visible in a given
-   scope.  The scope is represented by FILE and LINE.  USER_DATA is
-   passed, untranslated, to FN.  */
+/* Prototype for a callback callable when walking a macro table.  NAME
+   is the name of the macro, and DEFINITION is the definition.  SOURCE
+   is the file at the start of the include path, and LINE is the line
+   number of the SOURCE file where the macro was defined.  */
+typedef void (macro_callback_fn) (const char *name,
+				  const struct macro_definition *definition,
+				  struct macro_source_file *source,
+				  int line);
+
+/* Call the callable FN for each macro in the macro table TABLE.  */
+void macro_for_each (struct macro_table *table,
+		     gdb::function_view<macro_callback_fn> fn);
+
+/* Call FN for each macro that is visible in a given scope.  The scope
+   is represented by FILE and LINE.  */
 void macro_for_each_in_scope (struct macro_source_file *file, int line,
-			      macro_callback_fn fn,
-			      void *user_data);
+			      gdb::function_view<macro_callback_fn> fn);
 
 /* Return FILE->filename with possibly prepended compilation directory name.
    This is raw concatenation without the "set substitute-path" and gdb_realpath
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/main.c ./gdb/main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Top level stuff for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,6 +44,8 @@
 #include <signal.h>
 #include "event-top.h"
 #include "infrun.h"
+#include "signals-state-save-restore.h"
+#include <vector>
 
 /* The selected interpreter.  This will be used as a set command
    variable, so it should always be malloc'ed - since
@@ -68,10 +70,6 @@ static int gdb_datadir_provided = 0;
    the possibly relocated path to python's lib directory.  */
 char *python_libdir = 0;
 
-struct ui_file *gdb_stdout;
-struct ui_file *gdb_stderr;
-struct ui_file *gdb_stdlog;
-struct ui_file *gdb_stdin;
 /* Target IO streams.  */
 struct ui_file *gdb_stdtargin;
 struct ui_file *gdb_stdtarg;
@@ -232,7 +230,7 @@ get_init_files (const char **system_gdbi
 	      for (p = tmp_sys_gdbinit; IS_DIR_SEPARATOR (*p); ++p)
 		continue;
 	      relocated_sysgdbinit = concat (gdb_datadir, SLASH_STRING, p,
-					     NULL);
+					     (char *) NULL);
 	      xfree (tmp_sys_gdbinit);
 	    }
 	  else
@@ -297,7 +295,9 @@ setup_alternate_signal_stack (void)
 #ifdef HAVE_SIGALTSTACK
   stack_t ss;
 
-  ss.ss_sp = xmalloc (SIGSTKSZ);
+  /* FreeBSD versions older than 11.0 use char * for ss_sp instead of
+     void *.  This cast works with both types.  */
+  ss.ss_sp = (char *) xmalloc (SIGSTKSZ);
   ss.ss_size = SIGSTKSZ;
   ss.ss_flags = 0;
 
@@ -311,11 +311,19 @@ setup_alternate_signal_stack (void)
 static int
 captured_command_loop (void *data)
 {
+  struct ui *ui = current_ui;
+
   /* Top-level execution commands can be run in the background from
      here on.  */
-  interpreter_async = 1;
+  current_ui->async = 1;
+
+  /* Give the interpreter a chance to print a prompt, if necessary  */
+  if (ui->prompt_state != PROMPT_BLOCKED)
+    interp_pre_command_loop (top_level_interpreter ());
+
+  /* Now it's time to start the event loop.  */
+  start_event_loop ();
 
-  current_interp_command_loop ();
   /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton
      would clean things up (restoring the cleanup chain) to the state
      they were just prior to the call.  Technically, this means that
@@ -328,7 +336,7 @@ captured_command_loop (void *data)
      error) we try to quit.  If the quit is aborted, catch_errors()
      which called this catch the signal and restart the command
      loop.  */
-  quit_command (NULL, instream == stdin);
+  quit_command (NULL, ui->instream == ui->stdin_stream);
   return 1;
 }
 
@@ -363,7 +371,7 @@ catch_command_errors (catch_command_erro
 {
   TRY
     {
-      int was_sync = sync_execution;
+      int was_sync = current_ui->prompt_state == PROMPT_BLOCKED;
 
       command (arg, from_tty);
 
@@ -390,7 +398,7 @@ catch_command_errors_const (catch_comman
 {
   TRY
     {
-      int was_sync = sync_execution;
+      int was_sync = current_ui->prompt_state == PROMPT_BLOCKED;
 
       command (arg, from_tty);
 
@@ -405,6 +413,20 @@ catch_command_errors_const (catch_comman
   return 1;
 }
 
+/* Adapter for symbol_file_add_main that translates 'from_tty' to a
+   symfile_add_flags.  */
+
+static void
+symbol_file_add_main_adapter (const char *arg, int from_tty)
+{
+  symfile_add_flags add_flags = 0;
+
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
+
+  symbol_file_add_main (arg, add_flags);
+}
+
 /* Type of this option.  */
 enum cmdarg_kind
 {
@@ -422,24 +444,26 @@ enum cmdarg_kind
 };
 
 /* Arguments of --command option and its counterpart.  */
-typedef struct cmdarg {
+struct cmdarg
+{
+  cmdarg (cmdarg_kind type_, char *string_)
+    : type (type_), string (string_)
+  {}
+
   /* Type of this option.  */
   enum cmdarg_kind type;
 
   /* Value of this option - filename or the GDB command itself.  String memory
      is not owned by this structure despite it is 'const'.  */
   char *string;
-} cmdarg_s;
-
-/* Define type VEC (cmdarg_s).  */
-DEF_VEC_O (cmdarg_s);
+};
 
-static int
-captured_main (void *data)
+static void
+captured_main_1 (struct captured_main_args *context)
 {
-  struct captured_main_args *context = data;
   int argc = context->argc;
   char **argv = context->argv;
+
   static int quiet = 0;
   static int set_args = 0;
   static int inhibit_home_gdbinit = 0;
@@ -460,15 +484,10 @@ captured_main (void *data)
   static int print_configuration;
 
   /* Pointers to all arguments of --command option.  */
-  VEC (cmdarg_s) *cmdarg_vec = NULL;
-  struct cmdarg *cmdarg_p;
+  std::vector<struct cmdarg> cmdarg_vec;
 
-  /* Indices of all arguments of --directory option.  */
-  char **dirarg;
-  /* Allocated size.  */
-  int dirsize;
-  /* Number of elements used.  */
-  int ndir;
+  /* All arguments of --directory option.  */
+  std::vector<char *> dirarg;
 
   /* gdb init files.  */
   const char *system_gdbinit;
@@ -479,14 +498,14 @@ captured_main (void *data)
   int save_auto_load;
   struct objfile *objfile;
 
-  struct cleanup *pre_stat_chain;
+  struct cleanup *chain;
 
 #ifdef HAVE_SBRK
-  /* Set this before calling make_command_stats_cleanup.  */
+  /* Set this before constructing scoped_command_stats.  */
   lim_at_start = (char *) sbrk (0);
 #endif
 
-  pre_stat_chain = make_command_stats_cleanup (0);
+  scoped_command_stats stat_reporter (false);
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
@@ -494,21 +513,16 @@ captured_main (void *data)
 #if defined (HAVE_SETLOCALE)
   setlocale (LC_CTYPE, "");
 #endif
+#ifdef ENABLE_NLS
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
+#endif
 
   bfd_init ();
   notice_open_fds ();
+  save_original_signals_state ();
 
-  make_cleanup (VEC_cleanup (cmdarg_s), &cmdarg_vec);
-  dirsize = 1;
-  dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg));
-  ndir = 0;
-
-  clear_quit_flag ();
-  saved_command_line = (char *) xmalloc (saved_command_line_size);
-  saved_command_line[0] = '\0';
-  instream = stdin;
+  saved_command_line = (char *) xstrdup ("");
 
 #ifdef __MINGW32__
   /* Ensure stderr is unbuffered.  A Cygwin pty or pipe is implemented
@@ -516,12 +530,9 @@ captured_main (void *data)
   setvbuf (stderr, NULL, _IONBF, BUFSIZ);
 #endif
 
-  gdb_stdout = stdio_fileopen (stdout);
-  gdb_stderr = stderr_fileopen ();
+  main_ui = new_ui (stdin, stdout, stderr);
+  current_ui = main_ui;
 
-  gdb_stdlog = gdb_stderr;	/* for moment */
-  gdb_stdtarg = gdb_stderr;	/* for moment */
-  gdb_stdin = stdio_fileopen (stdin);
   gdb_stdtargerr = gdb_stderr;	/* for moment */
   gdb_stdtargin = gdb_stdin;	/* for moment */
 
@@ -560,7 +571,7 @@ captured_main (void *data)
 #ifdef WITH_PYTHON_PATH
   {
     /* For later use in helping Python find itself.  */
-    char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", NULL);
+    char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", (char *) NULL);
 
     python_libdir = relocate_gdb_directory (tmp, PYTHON_PATH_RELOCATABLE);
     xfree (tmp);
@@ -739,36 +750,20 @@ captured_main (void *data)
 	    pidarg = optarg;
 	    break;
 	  case 'x':
-	    {
-	      struct cmdarg cmdarg = { CMDARG_FILE, optarg };
-
-	      VEC_safe_push (cmdarg_s, cmdarg_vec, &cmdarg);
-	    }
+	    cmdarg_vec.emplace_back (CMDARG_FILE, optarg);
 	    break;
 	  case 'X':
-	    {
-	      struct cmdarg cmdarg = { CMDARG_COMMAND, optarg };
-
-	      VEC_safe_push (cmdarg_s, cmdarg_vec, &cmdarg);
-	    }
+	    cmdarg_vec.emplace_back (CMDARG_COMMAND, optarg);
 	    break;
 	  case OPT_IX:
-	    {
-	      struct cmdarg cmdarg = { CMDARG_INIT_FILE, optarg };
-
-	      VEC_safe_push (cmdarg_s, cmdarg_vec, &cmdarg);
-	    }
+	    cmdarg_vec.emplace_back (CMDARG_INIT_FILE, optarg);
 	    break;
 	  case OPT_IEX:
-	    {
-	      struct cmdarg cmdarg = { CMDARG_INIT_COMMAND, optarg };
-
-	      VEC_safe_push (cmdarg_s, cmdarg_vec, &cmdarg);
-	    }
+	    cmdarg_vec.emplace_back (CMDARG_INIT_COMMAND, optarg);
 	    break;
 	  case 'B':
 	    batch_flag = batch_silent = 1;
-	    gdb_stdout = ui_file_new();
+	    gdb_stdout = new null_file ();
 	    break;
 	  case 'D':
 	    if (optarg[0] == '\0')
@@ -805,13 +800,7 @@ captured_main (void *data)
 	    interpreter_p = xstrdup (optarg);
 	    break;
 	  case 'd':
-	    dirarg[ndir++] = optarg;
-	    if (ndir >= dirsize)
-	      {
-		dirsize *= 2;
-		dirarg = (char **) xrealloc ((char *) dirarg,
-					     dirsize * sizeof (*dirarg));
-	      }
+	    dirarg.push_back (optarg);
 	    break;
 	  case 't':
 	    ttyarg = optarg;
@@ -963,17 +952,7 @@ captured_main (void *data)
 
   /* Install the default UI.  All the interpreters should have had a
      look at things by now.  Initialize the default interpreter.  */
-
-  {
-    /* Find it.  */
-    struct interp *interp = interp_lookup (interpreter_p);
-
-    if (interp == NULL)
-      error (_("Interpreter `%s' unrecognized"), interpreter_p);
-    /* Install it.  */
-    if (!interp_set (interp, 1))
-      error (_("Interpreter `%s' failed to initialize."), interpreter_p);
-  }
+  set_top_level_interpreter (interpreter_p);
 
   /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets
      GDB retain the old MI1 interpreter startup behavior.  Output the
@@ -1012,17 +991,21 @@ captured_main (void *data)
     catch_command_errors_const (source_script, home_gdbinit, 0);
 
   /* Process '-ix' and '-iex' options early.  */
-  for (i = 0; VEC_iterate (cmdarg_s, cmdarg_vec, i, cmdarg_p); i++)
-    switch (cmdarg_p->type)
+  for (i = 0; i < cmdarg_vec.size (); i++)
     {
-      case CMDARG_INIT_FILE:
-        catch_command_errors_const (source_script, cmdarg_p->string,
-				    !batch_flag);
-	break;
-      case CMDARG_INIT_COMMAND:
-        catch_command_errors (execute_command, cmdarg_p->string,
-			      !batch_flag);
-	break;
+      const struct cmdarg &cmdarg_p = cmdarg_vec[i];
+
+      switch (cmdarg_p.type)
+	{
+	case CMDARG_INIT_FILE:
+	  catch_command_errors_const (source_script, cmdarg_p.string,
+				      !batch_flag);
+	  break;
+	case CMDARG_INIT_COMMAND:
+	  catch_command_errors (execute_command, cmdarg_p.string,
+				!batch_flag);
+	  break;
+	}
     }
 
   /* Now perform all the actions indicated by the arguments.  */
@@ -1031,9 +1014,8 @@ captured_main (void *data)
       catch_command_errors (cd_command, cdarg, 0);
     }
 
-  for (i = 0; i < ndir; i++)
+  for (i = 0; i < dirarg.size (); i++)
     catch_command_errors (directory_switch, dirarg[i], 0);
-  xfree (dirarg);
 
   /* Skip auto-loading section-specified scripts until we've sourced
      local_gdbinit (which is often used to augment the source search
@@ -1050,7 +1032,7 @@ captured_main (void *data)
          catch_command_errors returns non-zero on success!  */
       if (catch_command_errors_const (exec_file_attach, execarg,
 				      !batch_flag))
-	catch_command_errors_const (symbol_file_add_main, symarg,
+	catch_command_errors_const (symbol_file_add_main_adapter, symarg,
 				    !batch_flag);
     }
   else
@@ -1059,7 +1041,7 @@ captured_main (void *data)
 	catch_command_errors_const (exec_file_attach, execarg,
 				    !batch_flag);
       if (symarg != NULL)
-	catch_command_errors_const (symbol_file_add_main, symarg,
+	catch_command_errors_const (symbol_file_add_main_adapter, symarg,
 				    !batch_flag);
     }
 
@@ -1122,17 +1104,21 @@ captured_main (void *data)
     load_auto_scripts_for_objfile (objfile);
 
   /* Process '-x' and '-ex' options.  */
-  for (i = 0; VEC_iterate (cmdarg_s, cmdarg_vec, i, cmdarg_p); i++)
-    switch (cmdarg_p->type)
+  for (i = 0; i < cmdarg_vec.size (); i++)
     {
-      case CMDARG_FILE:
-        catch_command_errors_const (source_script, cmdarg_p->string,
-				    !batch_flag);
-	break;
-      case CMDARG_COMMAND:
-        catch_command_errors (execute_command, cmdarg_p->string,
-			      !batch_flag);
-	break;
+      const struct cmdarg &cmdarg_p = cmdarg_vec[i];
+
+      switch (cmdarg_p.type)
+	{
+	case CMDARG_FILE:
+	  catch_command_errors_const (source_script, cmdarg_p.string,
+				      !batch_flag);
+	  break;
+	case CMDARG_COMMAND:
+	  catch_command_errors (execute_command, cmdarg_p.string,
+				!batch_flag);
+	  break;
+	}
     }
 
   /* Read in the old history after all the command files have been
@@ -1144,9 +1130,14 @@ captured_main (void *data)
       /* We have hit the end of the batch file.  */
       quit_force (NULL, 0);
     }
+}
+
+static void
+captured_main (void *data)
+{
+  struct captured_main_args *context = (struct captured_main_args *) data;
 
-  /* Show time and/or space usage.  */
-  do_cleanups (pre_stat_chain);
+  captured_main_1 (context);
 
   /* NOTE: cagney/1999-11-07: There is probably no reason for not
      moving this loop and the code found in captured_command_loop()
@@ -1162,7 +1153,16 @@ captured_main (void *data)
 int
 gdb_main (struct captured_main_args *args)
 {
-  catch_errors (captured_main, args, "", RETURN_MASK_ALL);
+  TRY
+    {
+      captured_main (args);
+    }
+  CATCH (ex, RETURN_MASK_ALL)
+    {
+      exception_print (gdb_stderr, ex);
+    }
+  END_CATCH
+
   /* The only way to end up here is by an error (normal exit is
      handled by quit_force()), hence always return an error status.  */
   return 1;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/main.h ./gdb/main.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/main.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/main.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Main interface for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/MAINTAINERS ./gdb/MAINTAINERS
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/MAINTAINERS	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/MAINTAINERS	2017-03-06 01:49:07.000000000 +0000
@@ -282,7 +282,7 @@ the native maintainer when resolving ABI
 			Michael Eager		eager@eagercon.com
 
 	mips		--target=mips-elf ,-Werror
-			Maciej W. Rozycki	macro@codesourcery.com
+			Maciej W. Rozycki	macro@imgtec.com
 
 	mn10300		--target=mn10300-elf broken
 			(sim/ dies with make -j)
@@ -295,7 +295,7 @@ the native maintainer when resolving ABI
 
 	nios2		--target=nios2-elf ,-Werror
 			--target=nios2-linux-gnu ,-Werror
-			Yao Qi			yao@codesourcery.com
+			Yao Qi			yao.qi@arm.com
 
 	ns32k		Deleted
 
@@ -308,6 +308,7 @@ the native maintainer when resolving ABI
 	rx		--target=rx-elf ,-Werror
 
 	s390		--target=s390-linux-gnu ,-Werror
+			Andreas Arnez		arnez@linux.vnet.ibm.com
 
 	score	--target=score-elf
 			Qinwei		qinwei@sunnorth.com.cn
@@ -322,7 +323,7 @@ the native maintainer when resolving ABI
 			Ulrich Weigand		uweigand@de.ibm.com
 
 	tic6x		--target=tic6x-elf ,-Werror
-			Yao Qi			yao@codesourcery.com
+			Yao Qi			yao.qi@arm.com
 
 	v850		--target=v850-elf ,-Werror
 
@@ -353,7 +354,6 @@ resolving more generic problems.
 The host maintainer ensures that gdb can be built as a cross debugger on
 their platform.
 
-AIX			Joel Brobecker		brobecker@adacore.com
 Darwin			Tristan Gingold		gingold@adacore.com
 djgpp native		Eli Zaretskii		eliz@gnu.org
 GNU Hurd		Alfred M. Szmidt	ams@gnu.org
@@ -370,11 +370,15 @@ Core: Generic components used by all of 
 
 threads			Mark Kettenis		kettenis@gnu.org
 
+linespec		Keith Seitz             keiths@redhat.com
+
 language support
   Ada			Joel Brobecker		brobecker@adacore.com
 			Paul Hilfinger		hilfinger@gnat.com
   C++			Daniel Jacobowitz	drow@false.org
+  D			Iain Buclaw		ibuclaw@gdcproject.org
   Objective C support   Adam Fedor		fedor@gnu.org
+  Rust			Tom Tromey		tom@tromey.com
 shared libs		Kevin Buettner		kevinb@redhat.com
 MI interface		Vladimir Prus		vladimir@codesourcery.com
 
@@ -386,6 +390,13 @@ testsuite
 SystemTap		Sergio Durigan Junior	sergiodj@redhat.com
 
 
+
+Reverse debugging / Record and Replay / Tracing:
+
+record btrace		Markus T. Metzger	markus.t.metzger@intel.com
+
+
+
 UI: External (user) interfaces.
 
 gdbtk (c & tcl)		Fernando Nasser         fnasser@redhat.com
@@ -439,7 +450,6 @@ tui			Stephane Carrez		Stephane.Carrez@g
 ia64			Kevin Buettner		kevinb@redhat.com
 AIX			Kevin Buettner		kevinb@redhat.com
 GNU/Linux PPC native	Kevin Buettner		kevinb@redhat.com
-gdb.java tests		Anthony Green		green@redhat.com
 FreeBSD native & host	David O'Brien		obrien@freebsd.org
 event loop		Elena Zannoni		elena.zannoni@oracle.com
 generic symtabs		Elena Zannoni		elena.zannoni@oracle.com
@@ -462,6 +472,7 @@ FSF assignment and have submitted one go
 Pedro Alves					pedro_alves@portugalmail.pt
 David Anderson					davea@sgi.com
 John David Anglin				dave.anglin@nrc-cnrc.gc.ca
+Andreas Arnez					arnez@linux.vnet.ibm.com
 Shrinivas Atre					shrinivasa@kpitcummins.com
 Sterling Augustine				saugustine@google.com
 John Baldwin					jhb@freebsd.org
@@ -517,12 +528,13 @@ Doug Evans					dje@google.com
 Adam Fedor					fedor@gnu.org
 Max Filippov					jcmvbkbc@gmail.com
 Brian Ford					ford@vss.fsi.com
+Matthew Fortune					matthew.fortune@imgtec.com
 Orjan Friberg					orjanf@axis.com
 Andreas From					andreas.from@ericsson.com
 Nathan Froyd					froydnj@codesourcery.com
 Mike Frysinger					vapier@gentoo.org
 Gary Funck					gary@intrepid.com
-Martin Galvan					martin.galvan@tallertechnologies.com
+Martin Galvan					martingalvan@sourceware.org
 Chen Gang					gang.chen.5i5j@gmail.com
 Mircea Gherzan					mircea.gherzan@intel.com
 Paul Gilliam					pgilliam@us.ibm.com
@@ -535,6 +547,7 @@ Matthew Gretton-Dann				matthew.gretton-
 Maxim Grigoriev					maxim2405@gmail.com
 Jerome Guitton					guitton@act-europe.fr
 Ben Harris					bjh21@netbsd.org
+Bernhard Heckel					heckel_bernhard@web.de
 Richard Henderson				rth@redhat.com
 Aldy Hernandez					aldyh@redhat.com
 Paul Hilfinger					hilfinger@gnat.com
@@ -556,8 +569,11 @@ Jeff Johnston					jjohnstn@redhat.com
 Geoff Keating					geoffk@redhat.com
 Mark Kettenis					kettenis@gnu.org
 Marc Khouzam					marc.khouzam@ericsson.com
+Toshihito Kikuchi					k.toshihito@yahoo.de
 Jim Kingdon					kingdon@panix.com
+Anton Kolesov					anton.kolesov@synopsys.com
 Paul Koning					paul_koning@dell.com
+Marcin KoÅ›cielnicki				koriakin@0x04.net
 Jan Kratochvil					jan.kratochvil@redhat.com
 Maxim Kuvyrkov					maxim@kugelworks.com
 Pierre Langlois 				pierre.langlois@arm.com
@@ -566,9 +582,11 @@ Jeff Law					law@redhat.com
 Justin Lebar					justin.lebar@gmail.com
 David Lecomber					david@streamline-computing.com
 Don Lee						don.lee@sunplusct.com
+Yan-Ting Lin					currygt52@gmail.com
 Robert Lipe					rjl@sco.com
 Lei Liu						lei.liu2@windriver.com
 Sandra Loosemore				sandra@codesourcery.com
+Carl Love                  cel@us.ibm.com
 H.J. Lu						hjl.tools@gmail.com
 Michal Ludvig                                   mludvig@suse.cz
 Edjunior B. Machado				emachado@linux.vnet.ibm.com
@@ -580,6 +598,7 @@ Greg McGary					greg@mcgary.org
 Roland McGrath					roland@hack.frob.com
 Bryce McKinlay					mckinlay@redhat.com
 Jason Merrill					jason@redhat.com
+Markus T. Metzger				markus.t.metzger@intel.com
 David S. Miller					davem@redhat.com
 Mark Mitchell					mark@codesourcery.com
 Marko Mlinar                                    markom@opencores.org
@@ -609,7 +628,7 @@ Paul Pluzhnikov					ppluzhnikov@google.c
 Marek Polacek					mpolacek@redhat.com
 Siddhesh Poyarekar				siddhesh@redhat.com
 Vladimir Prus                                   vladimir@codesourcery.com
-Yao Qi						yao@codesourcery.com
+Yao Qi						yao.qi@arm.com
 Qinwei						qinwei@sunnorth.com.cn
 Ramana Radhakrishnan				ramana.radhakrishnan@arm.com
 Siva Chandra Reddy				sivachandra@google.com
@@ -648,6 +667,7 @@ Jackie Smith Cashion				jsmith@redhat.co
 Petr Sorfa					petrs@caldera.com
 Andrew Stubbs					ams@codesourcery.com
 Emi Suzuki					emi-suzuki@tjsys.co.jp
+David Taylor					david.taylor@emc.com
 Ian Lance Taylor				ian@airs.com
 Walfred Tedeschi				walfred.tedeschi@intel.com
 Gary Thomas					gthomas@redhat.com
@@ -669,6 +689,7 @@ Kris Warkentin					kewarken@qnx.com
 Philippe Waroquiers				philippe.waroquiers@skynet.be
 Ulrich Weigand					uweigand@de.ibm.com
 Ken Werner					ken.werner@de.ibm.com
+Tim Wiederhake					tim.wiederhake@intel.com
 Mark Wielaard					mjw@redhat.com
 Nathan Williams					nathanw@wasabisystems.com
 Bob Wilson					bob.wilson@acm.org
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/maint.c ./gdb/maint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/maint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/maint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for GDB maintenance commands.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -24,8 +24,6 @@
 #include "arch-utils.h"
 #include <ctype.h>
 #include <signal.h>
-#include <sys/time.h>
-#include <time.h>
 #include "command.h"
 #include "gdbcmd.h"
 #include "symtab.h"
@@ -39,8 +37,8 @@
 #include "objfiles.h"
 #include "value.h"
 #include "top.h"
-#include "timeval-utils.h"
 #include "maint.h"
+#include "selftest.h"
 
 #include "cli/cli-decode.h"
 #include "cli/cli-utils.h"
@@ -303,7 +301,7 @@ print_bfd_section_info (bfd *abfd, 
 {
   flagword flags = bfd_get_section_flags (abfd, asect);
   const char *name = bfd_section_name (abfd, asect);
-  const char *arg = datum;
+  const char *arg = (const char *) datum;
 
   if (arg == NULL || *arg == '\0'
       || match_substring (arg, name)
@@ -405,14 +403,11 @@ maintenance_print_architecture (char *ar
     gdbarch_dump (gdbarch, gdb_stdout);
   else
     {
-      struct cleanup *cleanups;
-      struct ui_file *file = gdb_fopen (args, "w");
+      stdio_file file;
 
-      if (file == NULL)
+      if (!file.open (args, "w"))
 	perror_with_name (_("maintenance print architecture"));
-      cleanups = make_cleanup_ui_file_delete (file);
-      gdbarch_dump (gdbarch, file);
-      do_cleanups (cleanups);
+      gdbarch_dump (gdbarch, &file);
     }
 }
 
@@ -751,31 +746,6 @@ static int per_command_symtab;
 static struct cmd_list_element *per_command_setlist;
 static struct cmd_list_element *per_command_showlist;
 
-/* Records a run time and space usage to be used as a base for
-   reporting elapsed time or change in space.  */
-
-struct cmd_stats 
-{
-  /* Zero if the saved time is from the beginning of GDB execution.
-     One if from the beginning of an individual command execution.  */
-  int msg_type;
-  /* Track whether the stat was enabled at the start of the command
-     so that we can avoid printing anything if it gets turned on by
-     the current command.  */
-  int time_enabled : 1;
-  int space_enabled : 1;
-  int symtab_enabled : 1;
-  long start_cpu_time;
-  struct timeval start_wall_time;
-  long start_space;
-  /* Total number of symtabs (over all objfiles).  */
-  int start_nr_symtabs;
-  /* A count of the compunits.  */
-  int start_nr_compunit_symtabs;
-  /* Total number of blocks.  */
-  int start_nr_blocks;
-};
-
 /* Set whether to display time statistics to NEW_VALUE
    (non-zero means true).  */
 
@@ -826,47 +796,52 @@ count_symtabs_and_blocks (int *nr_symtab
   *nr_blocks_ptr = nr_blocks;
 }
 
-/* As indicated by display_time and display_space, report GDB's elapsed time
-   and space usage from the base time and space provided in ARG, which
-   must be a pointer to a struct cmd_stat.  This function is intended
-   to be called as a cleanup.  */
+/* As indicated by display_time and display_space, report GDB's
+   elapsed time and space usage from the base time and space recorded
+   in this object.  */
 
-static void
-report_command_stats (void *arg)
+scoped_command_stats::~scoped_command_stats ()
 {
-  struct cmd_stats *start_stats = (struct cmd_stats *) arg;
-  int msg_type = start_stats->msg_type;
+  /* Early exit if we're not reporting any stats.  It can be expensive to
+     compute the pre-command values so don't collect them at all if we're
+     not reporting stats.  Alas this doesn't work in the startup case because
+     we don't know yet whether we will be reporting the stats.  For the
+     startup case collect the data anyway (it should be cheap at this point),
+     and leave it to the reporter to decide whether to print them.  */
+  if (m_msg_type
+      && !per_command_time
+      && !per_command_space
+      && !per_command_symtab)
+    return;
 
-  if (start_stats->time_enabled && per_command_time)
+  if (m_time_enabled && per_command_time)
     {
-      long cmd_time = get_run_time () - start_stats->start_cpu_time;
-      struct timeval now_wall_time, delta_wall_time, wait_time;
+      using namespace std::chrono;
 
-      gettimeofday (&now_wall_time, NULL);
-      timeval_sub (&delta_wall_time,
-		   &now_wall_time, &start_stats->start_wall_time);
+      run_time_clock::duration cmd_time
+	= run_time_clock::now () - m_start_cpu_time;
 
+      steady_clock::duration wall_time
+	= steady_clock::now () - m_start_wall_time;
       /* Subtract time spend in prompt_for_continue from walltime.  */
-      wait_time = get_prompt_for_continue_wait_time ();
-      timeval_sub (&delta_wall_time, &delta_wall_time, &wait_time);
+      wall_time -= get_prompt_for_continue_wait_time ();
 
-      printf_unfiltered (msg_type == 0
-			 ? _("Startup time: %ld.%06ld (cpu), %ld.%06ld (wall)\n")
-			 : _("Command execution time: %ld.%06ld (cpu), %ld.%06ld (wall)\n"),
-			 cmd_time / 1000000, cmd_time % 1000000,
-			 (long) delta_wall_time.tv_sec,
-			 (long) delta_wall_time.tv_usec);
+      printf_unfiltered (!m_msg_type
+			 ? _("Startup time: %.6f (cpu), %.6f (wall)\n")
+			 : _("Command execution time: %.6f (cpu), %.6f (wall)\n"),
+			 duration<double> (cmd_time).count (),
+			 duration<double> (wall_time).count ());
     }
 
-  if (start_stats->space_enabled && per_command_space)
+  if (m_space_enabled && per_command_space)
     {
 #ifdef HAVE_SBRK
       char *lim = (char *) sbrk (0);
 
       long space_now = lim - lim_at_start;
-      long space_diff = space_now - start_stats->start_space;
+      long space_diff = space_now - m_start_space;
 
-      printf_unfiltered (msg_type == 0
+      printf_unfiltered (!m_msg_type
 			 ? _("Space used: %ld (%s%ld during startup)\n")
 			 : _("Space used: %ld (%s%ld for this command)\n"),
 			 space_now,
@@ -875,7 +850,7 @@ report_command_stats (void *arg)
 #endif
     }
 
-  if (start_stats->symtab_enabled && per_command_symtab)
+  if (m_symtab_enabled && per_command_symtab)
     {
       int nr_symtabs, nr_compunit_symtabs, nr_blocks;
 
@@ -884,71 +859,55 @@ report_command_stats (void *arg)
 			   " #compunits: %d (+%d),"
 			   " #blocks: %d (+%d)\n"),
 			 nr_symtabs,
-			 nr_symtabs - start_stats->start_nr_symtabs,
+			 nr_symtabs - m_start_nr_symtabs,
 			 nr_compunit_symtabs,
 			 (nr_compunit_symtabs
-			  - start_stats->start_nr_compunit_symtabs),
+			  - m_start_nr_compunit_symtabs),
 			 nr_blocks,
-			 nr_blocks - start_stats->start_nr_blocks);
+			 nr_blocks - m_start_nr_blocks);
     }
 }
 
-/* Create a cleanup that reports time and space used since its creation.
-   MSG_TYPE is zero for gdb startup, otherwise it is one(1) to report
-   data for individual commands.  */
-
-struct cleanup *
-make_command_stats_cleanup (int msg_type)
+scoped_command_stats::scoped_command_stats (bool msg_type)
+: m_msg_type (msg_type)
 {
-  struct cmd_stats *new_stat;
-
-  /* Early exit if we're not reporting any stats.  It can be expensive to
-     compute the pre-command values so don't collect them at all if we're
-     not reporting stats.  Alas this doesn't work in the startup case because
-     we don't know yet whether we will be reporting the stats.  For the
-     startup case collect the data anyway (it should be cheap at this point),
-     and leave it to the reporter to decide whether to print them.  */
-  if (msg_type != 0
-      && !per_command_time
-      && !per_command_space
-      && !per_command_symtab)
-    return make_cleanup (null_cleanup, 0);
-
-  new_stat = XCNEW (struct cmd_stats);
-
-  new_stat->msg_type = msg_type;
-
-  if (msg_type == 0 || per_command_space)
+  if (!m_msg_type || per_command_space)
     {
 #ifdef HAVE_SBRK
       char *lim = (char *) sbrk (0);
-      new_stat->start_space = lim - lim_at_start;
-      new_stat->space_enabled = 1;
+      m_start_space = lim - lim_at_start;
+      m_space_enabled = 1;
 #endif
     }
+  else
+    m_space_enabled = 0;
 
   if (msg_type == 0 || per_command_time)
     {
-      new_stat->start_cpu_time = get_run_time ();
-      gettimeofday (&new_stat->start_wall_time, NULL);
-      new_stat->time_enabled = 1;
+      using namespace std::chrono;
+
+      m_start_cpu_time = run_time_clock::now ();
+      m_start_wall_time = steady_clock::now ();
+      m_time_enabled = 1;
     }
+  else
+    m_time_enabled = 0;
 
   if (msg_type == 0 || per_command_symtab)
     {
       int nr_symtabs, nr_compunit_symtabs, nr_blocks;
 
       count_symtabs_and_blocks (&nr_symtabs, &nr_compunit_symtabs, &nr_blocks);
-      new_stat->start_nr_symtabs = nr_symtabs;
-      new_stat->start_nr_compunit_symtabs = nr_compunit_symtabs;
-      new_stat->start_nr_blocks = nr_blocks;
-      new_stat->symtab_enabled = 1;
+      m_start_nr_symtabs = nr_symtabs;
+      m_start_nr_compunit_symtabs = nr_compunit_symtabs;
+      m_start_nr_blocks = nr_blocks;
+      m_symtab_enabled = 1;
     }
+  else
+    m_symtab_enabled = 0;
 
-  /* Initalize timer to keep track of how long we waited for the user.  */
+  /* Initialize timer to keep track of how long we waited for the user.  */
   reset_prompt_for_continue_wait_time ();
-
-  return make_cleanup_dtor (report_command_stats, new_stat, xfree);
 }
 
 /* Handle unknown "mt set per-command" arguments.
@@ -958,7 +917,6 @@ static void
 set_per_command_cmd (char *args, int from_tty)
 {
   struct cmd_list_element *list;
-  size_t length;
   int val;
 
   val = parse_cli_boolean_value (args);
@@ -982,6 +940,16 @@ show_per_command_cmd (char *args, int fr
   cmd_show_list (per_command_showlist, from_tty, "");
 }
 
+
+/* The "maintenance selftest" command.  */
+
+static void
+maintenance_selftest (char *args, int from_tty)
+{
+  run_self_tests ();
+}
+
+
 void
 _initialize_maint_cmds (void)
 {
@@ -1154,6 +1122,13 @@ testsuite can check the command deprecat
 If you decide you want to use it: maintenance undeprecate 'commandname'"),
 	   &maintenancelist);
 
+  add_cmd ("selftest", class_maintenance, maintenance_selftest, _("\
+Run gdb's unit tests.\n\
+Usage: maintenance selftest\n\
+This will run any unit tests that were built in to gdb.\n\
+gdb will abort if any test fails."),
+	   &maintenancelist);
+
   add_setshow_zinteger_cmd ("watchdog", class_maintenance, &watchdog, _("\
 Set watchdog timer."), _("\
 Show watchdog timer."), _("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/maint.h ./gdb/maint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/maint.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/maint.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for GDB maintenance commands.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,13 +19,47 @@
 #ifndef MAINT_H
 #define MAINT_H
 
+#include "run-time-clock.h"
+#include <chrono>
+
 extern void set_per_command_time (int);
 
 extern void set_per_command_space (int);
 
-/* Note: There's no set_per_command_symtab on purpose.
-   Symtab stats aren't yet as useful for --statistics output.  */
+/* Records a run time and space usage to be used as a base for
+   reporting elapsed time or change in space.  */
 
-extern struct cleanup *make_command_stats_cleanup (int);
+class scoped_command_stats
+{
+ public:
+
+  explicit scoped_command_stats (bool msg_type);
+  ~scoped_command_stats ();
+
+ private:
+
+  // No need for these.  They are intentionally not defined anywhere.
+  scoped_command_stats &operator= (const scoped_command_stats &);
+  scoped_command_stats (const scoped_command_stats &);
+
+  /* Zero if the saved time is from the beginning of GDB execution.
+     One if from the beginning of an individual command execution.  */
+  bool m_msg_type;
+  /* Track whether the stat was enabled at the start of the command
+     so that we can avoid printing anything if it gets turned on by
+     the current command.  */
+  int m_time_enabled : 1;
+  int m_space_enabled : 1;
+  int m_symtab_enabled : 1;
+  run_time_clock::time_point m_start_cpu_time;
+  std::chrono::steady_clock::time_point m_start_wall_time;
+  long m_start_space;
+  /* Total number of symtabs (over all objfiles).  */
+  int m_start_nr_symtabs;
+  /* A count of the compunits.  */
+  int m_start_nr_compunit_symtabs;
+  /* Total number of blocks.  */
+  int m_start_nr_blocks;
+};
 
 #endif /* MAINT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/Makefile.in ./gdb/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2015 Free Software Foundation, Inc.
+# Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -15,6 +15,25 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Please keep lists in this file sorted alphabetically, with one item per line.
+# Here are the general guidelines for ordering files and directories:
+#
+#   - Files come before directories.
+#   - The extensions are not taken into account when comparing filenames, except
+#     if the filenames are otherwise equal.
+#   - A filename that is a prefix of another one comes before.
+#   - Underscores and dashes are treated equally, and come before alphanumeric
+#     characters.
+#
+# For example:
+#
+# SOME_FILES = \
+# 	foo.c \
+# 	foo.h \
+# 	foo-bar.c \
+# 	foobar.c \
+# 	foo/bar.c
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
@@ -79,16 +98,14 @@ MSGMERGE = msgmerge
 PACKAGE = @PACKAGE@
 CATALOGS = @CATALOGS@
 
-# The name of the compiler to use.
-COMPILER = @COMPILER@
-
 # If you are compiling with GCC, make sure that either 1) You have the
 # fixed include files where GCC can reach them, or 2) You use the
 # -traditional flag.  Otherwise the ioctl calls in inflow.c
 # will be incorrectly compiled.  The "fixincludes" script in the gcc
 # distribution will fix your include files up.
-CC=@CC@
-CXX=@CXX@
+CC = @CC@
+CXX = @CXX@
+CXX_DIALECT = @CXX_DIALECT@
 
 # Dependency tracking information.
 DEPMODE = @CCDEPMODE@
@@ -97,7 +114,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
-COMPILE.pre = $(COMPILER)
+COMPILE.pre = $(CXX) $(CXX_DIALECT)
 COMPILE.post = -c -o $@
 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
@@ -107,7 +124,7 @@ srcdir = @srcdir@
 VPATH = @srcdir@
 top_srcdir = @top_srcdir@
 
-YACC=@YACC@
+YACC = @YACC@
 
 # This is used to rebuild ada-lex.c from ada-lex.l.  If the program is
 # not defined, but ada-lex.c is present, compilation will continue,
@@ -127,13 +144,13 @@ MAKEHTMLFLAGS =
 
 # Set this up with gcc if you have gnu ld and the loader will print out
 # line numbers for undefined references.
-#CC_LD=gcc -static
-CC_LD=$(COMPILER)
+#CC_LD = g++ -static
+CC_LD = $(CXX) $(CXX_DIALECT)
 
 # Where is our "include" directory?  Typically $(srcdir)/../include.
 # This is essentially the header file directory for the library
 # routines in libiberty.
-INCLUDE_DIR =  $(srcdir)/../include
+INCLUDE_DIR = $(srcdir)/../include
 INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
 
 # Where is the "-liberty" library?  Typically in ../libiberty.
@@ -194,6 +211,9 @@ INTL = @LIBINTL@
 INTL_DEPS = @LIBINTL_DEP@
 INTL_CFLAGS = @INCINTL@
 
+# Where is the ICONV library?  This will be empty if in libc or not available.
+LIBICONV = @LIBICONV@
+
 # Did the user give us a --with-gdb-datadir option?
 GDB_DATADIR = @GDB_DATADIR@
 
@@ -213,45 +233,79 @@ GNULIB_H = $(GNULIB_BUILDDIR)/import/str
 # CLI sub directory definitons
 #
 SUBDIR_CLI_OBS = \
+	cli-cmds.o \
+	cli-decode.o \
 	cli-dump.o \
-	cli-decode.o cli-script.o cli-cmds.o cli-setshow.o \
+	cli-interp.o \
 	cli-logging.o \
-	cli-interp.o cli-utils.o
+	cli-script.o \
+	cli-setshow.o \
+	cli-utils.o
+
 SUBDIR_CLI_SRCS = \
+	cli/cli-cmds.c \
+	cli/cli-decode.c \
 	cli/cli-dump.c \
-	cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
+	cli/cli-interp.c \
 	cli/cli-logging.c \
-	cli/cli-interp.c cli/cli-utils.c
+	cli/cli-script.c \
+	cli/cli-setshow.c \
+	cli/cli-utils.c
+
 SUBDIR_CLI_DEPS =
-SUBDIR_CLI_LDFLAGS=
-SUBDIR_CLI_CFLAGS=
+SUBDIR_CLI_LDFLAGS =
+SUBDIR_CLI_CFLAGS =
 
 #
 # MI sub directory definitons
 #
 SUBDIR_MI_OBS = \
-	mi-out.o mi-console.o \
-	mi-cmds.o mi-cmd-catch.o mi-cmd-env.o \
-	mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
-	mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o \
-	mi-cmd-info.o mi-interp.o \
-	mi-main.o mi-parse.o mi-getopt.o
+	mi-cmd-break.o \
+	mi-cmd-catch.o \
+	mi-cmd-disas.o \
+	mi-cmd-env.o \
+	mi-cmd-file.o \
+	mi-cmd-info.o \
+	mi-cmd-stack.o \
+	mi-cmd-target.o \
+	mi-cmd-var.o \
+	mi-cmds.o \
+	mi-console.o \
+	mi-getopt.o \
+	mi-interp.o \
+	mi-main.o \
+	mi-out.o \
+	mi-parse.o \
+	mi-symbol-cmds.o
+
 SUBDIR_MI_SRCS = \
-	mi/mi-out.c mi/mi-console.c \
-	mi/mi-cmds.c mi/mi-cmd-catch.c mi/mi-cmd-env.c \
-	mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
-	mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \
-	mi/mi-cmd-target.c mi/mi-cmd-info.c mi/mi-interp.c \
-	mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
+	mi/mi-cmd-break.c \
+	mi/mi-cmd-catch.c \
+	mi/mi-cmd-disas.c \
+	mi/mi-cmd-env.c \
+	mi/mi-cmd-file.c \
+	mi/mi-cmd-info.c \
+	mi/mi-cmd-stack.c \
+	mi/mi-cmd-target.c \
+	mi/mi-cmd-var.c \
+	mi/mi-cmds.c \
+	mi/mi-console.c \
+	mi/mi-getopt.c \
+	mi/mi-interp.c \
+	mi/mi-main.c \
+	mi/mi-out.c \
+	mi/mi-parse.c \
+	mi/mi-symbol-cmds.c
+
 SUBDIR_MI_DEPS =
-SUBDIR_MI_LDFLAGS=
-SUBDIR_MI_CFLAGS=
+SUBDIR_MI_LDFLAGS =
+SUBDIR_MI_CFLAGS =
 
 #
 # TUI sub directory definitions
 #
-
 SUBDIR_TUI_OBS = \
+	tui.o \
 	tui-command.o \
 	tui-data.o \
 	tui-disasm.o \
@@ -267,10 +321,10 @@ SUBDIR_TUI_OBS = \
 	tui-win.o \
 	tui-windata.o \
 	tui-wingeneral.o \
-	tui-winsource.o \
-	tui.o
+	tui-winsource.o
 
 SUBDIR_TUI_SRCS = \
+	tui/tui.c \
 	tui/tui-command.c \
 	tui/tui-data.c \
 	tui/tui-disasm.c \
@@ -286,34 +340,38 @@ SUBDIR_TUI_SRCS = \
 	tui/tui-win.c \
 	tui/tui-windata.c \
 	tui/tui-wingeneral.c \
-	tui/tui-winsource.c \
-	tui/tui.c
+	tui/tui-winsource.c
 
 SUBDIR_TUI_DEPS =
-SUBDIR_TUI_LDFLAGS=
-SUBDIR_TUI_CFLAGS= \
-	-DTUI=1
+SUBDIR_TUI_LDFLAGS =
+SUBDIR_TUI_CFLAGS = -DTUI=1
 
 #
 # GCC Compile support sub-directory definitions
 #
 SUBDIR_GCC_COMPILE_OBS = \
-	compile.o compile-c-symbols.o compile-c-types.o \
-	compile-object-load.o compile-object-run.o \
-	compile-loc2c.o compile-c-support.o
+	compile.o \
+	compile-c-support.o \
+	compile-c-symbols.o \
+	compile-c-types.o \
+	compile-loc2c.o \
+	compile-object-load.o \
+	compile-object-run.o
+
 SUBDIR_GCC_COMPILE_SRCS = \
 	compile/compile.c \
+	compile/compile-c-support.c \
 	compile/compile-c-symbols.c \
 	compile/compile-c-types.c \
+	compile/compile-loc2c.c \
 	compile/compile-object-load.c \
 	compile/compile-object-load.h \
 	compile/compile-object-run.c \
-	compile/compile-object-run.h \
-	compile/compile-loc2c.c \
-	compile/compile-c-support.c
+	compile/compile-object-run.h
 
+#
 # Guile sub directory definitons for guile support.
-
+#
 SUBDIR_GUILE_OBS = \
 	guile.o \
 	scm-arch.o \
@@ -327,8 +385,8 @@ SUBDIR_GUILE_OBS = \
 	scm-gsmob.o \
 	scm-iterator.o \
 	scm-lazy-string.o \
-	scm-objfile.o \
 	scm-math.o \
+	scm-objfile.o \
 	scm-param.o \
 	scm-ports.o \
 	scm-pretty-print.o \
@@ -340,6 +398,7 @@ SUBDIR_GUILE_OBS = \
 	scm-type.o \
 	scm-utils.o \
 	scm-value.o
+
 SUBDIR_GUILE_SRCS = \
 	guile/guile.c \
 	guile/scm-arch.c \
@@ -353,8 +412,8 @@ SUBDIR_GUILE_SRCS = \
 	guile/scm-gsmob.c \
 	guile/scm-iterator.c \
 	guile/scm-lazy-string.c \
-	guile/scm-objfile.c \
 	guile/scm-math.c \
+	guile/scm-objfile.c \
 	guile/scm-param.c \
 	guile/scm-ports.c \
 	guile/scm-pretty-print.c \
@@ -366,15 +425,15 @@ SUBDIR_GUILE_SRCS = \
 	guile/scm-type.c \
 	guile/scm-utils.c \
 	guile/scm-value.c
+
 SUBDIR_GUILE_DEPS =
-SUBDIR_GUILE_LDFLAGS=
-SUBDIR_GUILE_CFLAGS=
+SUBDIR_GUILE_LDFLAGS =
+SUBDIR_GUILE_CFLAGS =
 
 #
 # python sub directory definitons
 #
 SUBDIR_PYTHON_OBS = \
-	python.o \
 	py-arch.o \
 	py-auto-load.o \
 	py-block.o \
@@ -382,7 +441,6 @@ SUBDIR_PYTHON_OBS = \
 	py-breakpoint.o \
 	py-cmd.o \
 	py-continueevent.o \
-	py-xmethods.o \
 	py-event.o \
 	py-evtregistry.o \
 	py-evts.o \
@@ -402,6 +460,9 @@ SUBDIR_PYTHON_OBS = \
 	py-param.o \
 	py-prettyprint.o \
 	py-progspace.o \
+	py-record.o \
+	py-record-btrace.o \
+	py-record-full.o \
 	py-signalevent.o \
 	py-stopevent.o \
 	py-symbol.o \
@@ -411,10 +472,11 @@ SUBDIR_PYTHON_OBS = \
 	py-unwind.o \
 	py-utils.o \
 	py-value.o \
-	py-varobj.o
+	py-varobj.o \
+	py-xmethods.o \
+	python.o
 
 SUBDIR_PYTHON_SRCS = \
-	python/python.c \
 	python/py-arch.c \
 	python/py-auto-load.c \
 	python/py-block.c \
@@ -422,7 +484,6 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-breakpoint.c \
 	python/py-cmd.c \
 	python/py-continueevent.c \
-	python/py-xmethods.c \
 	python/py-event.c \
 	python/py-evtregistry.c \
 	python/py-evts.c \
@@ -442,6 +503,9 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-param.c \
 	python/py-prettyprint.c \
 	python/py-progspace.c \
+	python/py-record.c \
+	python/py-record-btrace.c \
+	python/py-record-full.c \
 	python/py-signalevent.c \
 	python/py-stopevent.c \
 	python/py-symbol.c \
@@ -451,10 +515,19 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-unwind.c \
 	python/py-utils.c \
 	python/py-value.c \
-	python/py-varobj.c
+	python/py-varobj.c \
+	python/py-xmethods.c \
+	python/python.c
+
 SUBDIR_PYTHON_DEPS =
-SUBDIR_PYTHON_LDFLAGS=
-SUBDIR_PYTHON_CFLAGS=
+SUBDIR_PYTHON_LDFLAGS =
+SUBDIR_PYTHON_CFLAGS =
+
+SUBDIR_UNITTESTS_SRCS = \
+	unittests/function-view-selftests.c
+
+SUBDIR_UNITTESTS_OBS = \
+	function-view-selftests.o
 
 # Opcodes currently live in one of two places.  Either they are in the
 # opcode library, typically ../opcodes, or they are in a header file
@@ -494,7 +567,7 @@ WIN32LDAPP = @WIN32LDAPP@
 
 LIBGUI = @LIBGUI@
 GUI_CFLAGS_X = @GUI_CFLAGS_X@
-IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
+IDE_CFLAGS = $(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
 
 ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
 
@@ -508,26 +581,39 @@ GDBTK_LIBRARY = $(datadir)/insight$(GDBT
 GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
 
 SUBDIR_GDBTK_OBS = \
-	gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \
-	gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o
+	gdbtk.o \
+	gdbtk-bp.o \
+	gdbtk-cmds.o \
+	gdbtk-hooks.o \
+	gdbtk-interp.o \
+	gdbtk-register.o \
+	gdbtk-stack.o \
+	gdbtk-varobj.o \
+	gdbtk-wrapper.o
+
 SUBDIR_GDBTK_SRCS = \
-	gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
-	gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
+	gdbtk/generic/gdbtk.c \
+	gdbtk/generic/gdbtk-bp.c \
+	gdbtk/generic/gdbtk-cmds.c \
+	gdbtk/generic/gdbtk-hooks.c \
 	gdbtk/generic/gdbtk-interp.c \
-	gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
-	gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
-	gdbtk/generic/gdbtk-main.c
+	gdbtk/generic/gdbtk-main.c \
+	gdbtk/generic/gdbtk-register.c \
+	gdbtk/generic/gdbtk-stack.c \
+	gdbtk/generic/gdbtk-varobj.c \
+	gdbtk/generic/gdbtk-wrapper.c
+
 SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
-SUBDIR_GDBTK_LDFLAGS=
-SUBDIR_GDBTK_CFLAGS= -DGDBTK
+SUBDIR_GDBTK_LDFLAGS =
+SUBDIR_GDBTK_CFLAGS = -DGDBTK
 
-CONFIG_OBS= @CONFIG_OBS@
-CONFIG_SRCS= @CONFIG_SRCS@
-CONFIG_DEPS= @CONFIG_DEPS@
+CONFIG_OBS = @CONFIG_OBS@
+CONFIG_SRCS = @CONFIG_SRCS@
+CONFIG_DEPS = @CONFIG_DEPS@
 CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
-ENABLE_CFLAGS= @ENABLE_CFLAGS@
-CONFIG_ALL= @CONFIG_ALL@
-CONFIG_CLEAN= @CONFIG_CLEAN@
+ENABLE_CFLAGS = @ENABLE_CFLAGS@
+CONFIG_ALL = @CONFIG_ALL@
+CONFIG_CLEAN = @CONFIG_CLEAN@
 CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
@@ -548,9 +634,10 @@ GLOBAL_CFLAGS = $(MH_CFLAGS)
 
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
 
-# CFLAGS is specifically reserved for setting from the command line
-# when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
+# These are specifically reserved for setting from the command line
+# when running make.  I.E.: "make CFLAGS=-Wmissing-prototypes".
 CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
 
 # Set by configure, for e.g. expat.  Python installations are such that
 # C headers are included using their basename (for example, we #include
@@ -560,14 +647,9 @@ CFLAGS = @CFLAGS@
 # a bit the consequences by putting the Python includes last in the list.
 INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
 
-# Need to pass this to testsuite for "make check".  Probably should be
-# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in
-# so "make check" has the same result no matter where it is run.
-CXXFLAGS = -g -O
-
 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
 INTERNAL_CFLAGS_BASE = \
-	$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
+	$(CXXFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
 	$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
 	$(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
 	$(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS)
@@ -582,7 +664,9 @@ LDFLAGS = @LDFLAGS@
 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
 # and have it work; that's why CFLAGS is here.
 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
-INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS)
+INTERNAL_LDFLAGS = \
+	$(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
+	$(LDFLAGS) $(CONFIG_LDFLAGS)
 
 # If your system is missing alloca(), or, more likely, it's there but
 # it doesn't work, then refer to libiberty.
@@ -594,30 +678,35 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(
 	$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
 	@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
 	$(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
-	$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
+	$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV)
 CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
 	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
 
 ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 
-DIST=gdb
+DIST = gdb
 
-LINT=/usr/5bin/lint
-LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
+LINT = /usr/5bin/lint
+LINTFLAGS = $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
 	$(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
 	$(INTL_CFLAGS)
 
 RUNTEST = runtest
-RUNTESTFLAGS=
+RUNTESTFLAGS =
 
 # XML files to build in to GDB.
-XMLFILES = $(srcdir)/features/gdb-target.dtd $(srcdir)/features/xinclude.dtd \
+XMLFILES = \
+	$(srcdir)/features/btrace.dtd \
+	$(srcdir)/features/btrace-conf.dtd \
+	$(srcdir)/features/gdb-target.dtd \
 	$(srcdir)/features/library-list.dtd \
 	$(srcdir)/features/library-list-aix.dtd \
-	$(srcdir)/features/library-list-svr4.dtd $(srcdir)/features/osdata.dtd \
-	$(srcdir)/features/threads.dtd $(srcdir)/features/traceframe-info.dtd \
-	$(srcdir)/features/btrace.dtd $(srcdir)/features/btrace-conf.dtd
+	$(srcdir)/features/library-list-svr4.dtd \
+	$(srcdir)/features/osdata.dtd \
+	$(srcdir)/features/threads.dtd \
+	$(srcdir)/features/traceframe-info.dtd \
+	$(srcdir)/features/xinclude.dtd
 
 # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
 # interface to the serial port.  Hopefully if get ported to OS/2, VMS,
@@ -629,8 +718,17 @@ SER_HARDWIRE = @SER_HARDWIRE@
 
 # The `remote' debugging target is supported for most architectures,
 # but not all (e.g. 960)
-REMOTE_OBS = remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o \
-	remote-notif.o ctf.o tracefile.o tracefile-tfile.o
+REMOTE_OBS = \
+	ax-gdb.o \
+	ax-general.o \
+	ctf.o \
+	dcache.o \
+	remote.o \
+	remote-fileio.o \
+	remote-notif.o \
+	tracefile.o \
+	tracefile-tfile.o \
+	tracepoint.o
 
 # This is remote-sim.o if a simulator is to be linked in.
 SIM_OBS = @SIM_OBS@
@@ -641,84 +739,160 @@ TARGET_OBS = @TARGET_OBS@
 # All target-dependent objects files that require 64-bit CORE_ADDR
 # (used with --enable-targets=all --enable-64-bit-bfd).
 ALL_64_TARGET_OBS = \
-	aarch64-tdep.o aarch64-linux-tdep.o aarch64-newlib-tdep.o \
-	alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
-	alphanbsd-tdep.o alphaobsd-tdep.o alpha-tdep.o \
-	amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
-	amd64-linux-tdep.o amd64nbsd-tdep.o \
-	amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
-	ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
-	mips64obsd-tdep.o \
-	sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
-	sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o
+	aarch64-insn.o \
+	aarch64-linux-tdep.o \
+	aarch64-newlib-tdep.o \
+	aarch64-tdep.o \
+	alpha-bsd-tdep.o \
+	alpha-fbsd-tdep.o \
+	alpha-linux-tdep.o \
+	alpha-mdebug-tdep.o \
+	alpha-nbsd-tdep.o \
+	alpha-obsd-tdep.o \
+	alpha-tdep.o \
+	amd64-darwin-tdep.o \
+	amd64-dicos-tdep.o \
+	amd64-fbsd-tdep.o \
+	amd64-linux-tdep.o \
+	amd64-nbsd-tdep.o \
+	amd64-obsd-tdep.o \
+	amd64-sol2-tdep.o \
+	amd64-tdep.o \
+	amd64-windows-tdep.o \
+	ia64-linux-tdep.o \
+	ia64-tdep.o \
+	ia64-vms-tdep.o \
+	mips64-obsd-tdep.o \
+	sparc64-fbsd-tdep.o \
+	sparc64-linux-tdep.o \
+	sparc64-nbsd-tdep.o \
+	sparc64-obsd-tdep.o \
+	sparc64-sol2-tdep.o \
+	sparc64-tdep.o
 
 # All other target-dependent objects files (used with --enable-targets=all).
 ALL_TARGET_OBS = \
-	armbsd-tdep.o arm-linux-tdep.o arm-symbian-tdep.o \
-	armnbsd-tdep.o armobsd-tdep.o \
-	arm-tdep.o arm-wince-tdep.o \
+	arc-tdep.o \
+	arm.o \
+	arm-bsd-tdep.o \
+	arm-get-next-pcs.o \
+	arm-linux.o \
+	arm-linux-tdep.o \
+	arm-nbsd-tdep.o \
+	arm-obsd-tdep.o \
+	arm-symbian-tdep.o \
+	arm-tdep.o \
+	arm-wince-tdep.o \
 	avr-tdep.o \
-	bfin-linux-tdep.o bfin-tdep.o \
-	cris-linux-tdep.o cris-tdep.o \
+	bfin-linux-tdep.o \
+	bfin-tdep.o \
+	bsd-uthread.o \
+	cris-linux-tdep.o \
+	cris-tdep.o \
 	dicos-tdep.o \
 	fbsd-tdep.o \
-	frv-linux-tdep.o frv-tdep.o \
+	frv-linux-tdep.o \
+	frv-tdep.o \
 	ft32-tdep.o \
+	glibc-tdep.o \
 	h8300-tdep.o \
-	hppabsd-tdep.o hppanbsd-tdep.o hppaobsd-tdep.o \
-	hppa-linux-tdep.o hppa-tdep.o \
-	i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
-	i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
-	i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
-	i386-dicos-tdep.o i386-darwin-tdep.o \
+	hppa-bsd-tdep.o \
+	hppa-linux-tdep.o \
+	hppa-nbsd-tdep.o \
+	hppa-obsd-tdep.o \
+	hppa-tdep.o \
+	i386-bsd-tdep.o \
+	i386-cygwin-tdep.o \
+	i386-darwin-tdep.o \
+	i386-dicos-tdep.o \
+	i386-fbsd-tdep.o \
+	i386-gnu-tdep.o \
+	i386-linux-tdep.o \
+	i386-nbsd-tdep.o \
+	i386-nto-tdep.o \
+	i386-obsd-tdep.o \
+	i386-sol2-tdep.o \
+	i386-tdep.o \
+	i387-tdep.o \
 	iq2000-tdep.o \
+	linux-record.o \
 	linux-tdep.o \
 	lm32-tdep.o \
 	m32c-tdep.o \
-	m32r-linux-tdep.o m32r-tdep.o \
+	m32r-linux-tdep.o \
+	m32r-tdep.o \
 	m68hc11-tdep.o \
-	m68kbsd-tdep.o m68klinux-tdep.o m68k-tdep.o \
+	m68k-bsd-tdep.o \
+	m68k-linux-tdep.o \
+	m68k-tdep.o \
 	m88k-tdep.o \
 	mep-tdep.o \
-	microblaze-tdep.o microblaze-linux-tdep.o \
-	mips-linux-tdep.o mips-sde-tdep.o \
-	mipsnbsd-tdep.o mips-tdep.o \
-	mn10300-linux-tdep.o mn10300-tdep.o \
+	microblaze-linux-tdep.o \
+	microblaze-tdep.o \
+	mips-fbsd-tdep.o \
+	mips-linux-tdep.o \
+	mips-nbsd-tdep.o \
+	mips-sde-tdep.o \
+	mips-tdep.o \
+	mn10300-linux-tdep.o \
+	mn10300-tdep.o \
 	moxie-tdep.o \
 	msp430-tdep.o \
 	mt-tdep.o \
-	nios2-tdep.o nios2-linux-tdep.o \
+	nbsd-tdep.o \
+	nds32-tdep.o \
+	nios2-linux-tdep.o \
+	nios2-tdep.o \
 	nto-tdep.o \
-	ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o  \
-	ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
-	rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o \
+	obsd-tdep.o \
+	ppc-fbsd-tdep.o \
+	ppc-linux-tdep.o \
+	ppc-nbsd-tdep.o \
+	ppc-obsd-tdep.o \
+	ppc-ravenscar-thread.o \
+	ppc-sysv-tdep.o \
+	ppc64-tdep.o \
+	ravenscar-thread.o \
+	rl78-tdep.o \
+	rs6000-aix-tdep.o \
 	rs6000-lynx178-tdep.o \
+	rs6000-tdep.o \
 	rx-tdep.o \
 	s390-linux-tdep.o \
 	score-tdep.o \
-	sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
-	sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
-	sparc-sol2-tdep.o sparc-tdep.o sparc-ravenscar-thread.o \
-	spu-tdep.o spu-multiarch.o solib-spu.o \
-	tic6x-tdep.o tic6x-linux-tdep.o \
-	tilegx-tdep.o tilegx-linux-tdep.o \
-	v850-tdep.o \
-	vaxnbsd-tdep.o vaxobsd-tdep.o vax-tdep.o \
-	xstormy16-tdep.o \
-	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
-	glibc-tdep.o \
-	bsd-uthread.o \
-	nbsd-tdep.o obsd-tdep.o \
+	sh-linux-tdep.o \
+	sh-nbsd-tdep.o \
+	sh-tdep.o \
+	sh64-tdep.o \
 	sol2-tdep.o \
-	solib-frv.o solib-svr4.o \
-	solib-darwin.o solib-dsbt.o \
-	dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o dsrec.o monitor.o \
-	remote-m32r-sdi.o remote-mips.o \
-	xcoffread.o \
+	solib-aix.o \
+	solib-darwin.o \
+	solib-dsbt.o \
+	solib-frv.o \
+	solib-spu.o \
+	solib-svr4.o \
+	sparc-linux-tdep.o \
+	sparc-nbsd-tdep.o \
+	sparc-obsd-tdep.o \
+	sparc-ravenscar-thread.o \
+	sparc-sol2-tdep.o \
+	sparc-tdep.o \
+	spu-multiarch.o \
+	spu-tdep.o \
 	symfile-mem.o \
+	tic6x-linux-tdep.o \
+	tic6x-tdep.o \
+	tilegx-linux-tdep.o \
+	tilegx-tdep.o \
+	v850-tdep.o \
+	vax-nbsd-tdep.o \
+	vax-tdep.o \
 	windows-tdep.o \
-	linux-record.o \
-	ravenscar-thread.o
+	xcoffread.o \
+	xstormy16-tdep.o \
+	xtensa-config.o \
+	xtensa-linux-tdep.o \
+	xtensa-tdep.o
 
 # Host-dependent makefile fragment comes in here.
 @host_makefile_frag@
@@ -743,6 +917,7 @@ FLAGS_TO_PASS = \
 	"CC=$(CC)" \
 	"CFLAGS=$(CFLAGS)" \
 	"CXX=$(CXX)" \
+	"CXX_DIALECT=$(CXX_DIALECT)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"DLLTOOL=$(DLLTOOL)" \
 	"LDFLAGS=$(LDFLAGS)" \
@@ -820,78 +995,233 @@ TARGET_FLAGS_TO_PASS = \
 # Links made at configuration time should not be specified here, since
 # SFILES is used in building the distribution archive.
 
-SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
+SFILES = \
+	ada-exp.y \
+	ada-lang.c \
+	ada-tasks.c \
+	ada-typeprint.c \
+	ada-valprint.c \
 	ada-varobj.c \
-	addrmap.c auto-load.c \
-	auxv.c ax-general.c ax-gdb.c \
+	addrmap.c \
 	agent.c \
+	annotate.c \
+	arch-utils.c \
+	auto-load.c \
+	auxv.c \
+	ax-gdb.c \
+	ax-general.c \
 	bcache.c \
 	bfd-target.c \
-	block.c blockframe.c \
-	breakpoint.c break-catch-sig.c break-catch-throw.c \
+	block.c \
+	blockframe.c \
+	break-catch-sig.c \
 	break-catch-syscall.c \
-	build-id.c buildsym.c \
-	c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \
-	charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
-	complaints.c completer.c continuations.c corefile.c corelow.c \
-	cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
-	d-exp.y d-lang.c d-valprint.c \
+	break-catch-throw.c \
+	breakpoint.c \
+	btrace.c \
+	build-id.c \
+	buildsym.c \
+	c-exp.y \
+	c-lang.c \
+	c-typeprint.c \
+	c-valprint.c \
+	c-varobj.c \
+	charset.c \
+	cli-out.c \
+	coff-pe-read.c \
+	coffread.c \
+	complaints.c \
+	completer.c \
+	continuations.c \
+	copying.c \
+	corefile.c \
+	corelow.c \
+	cp-abi.c \
 	cp-name-parser.y \
-	dbxread.c demangle.c dictionary.c disasm.c doublest.c \
-	dtrace-probe.c dummy-frame.c \
-	dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \
+	cp-namespace.c \
+	cp-support.c \
+	cp-valprint.c \
+	ctf.c \
+	d-exp.y \
+	d-lang.c \
+	d-namespace.c \
+	d-valprint.c \
+	dbxread.c \
+	demangle.c \
+	dfp.c \
+	dictionary.c \
+	disasm.c \
+	disasm-selftests.c \
+	doublest.c \
+	dtrace-probe.c \
+	dummy-frame.c \
+	dwarf2-frame.c \
 	dwarf2-frame-tailcall.c \
-	elfread.c environ.c eval.c event-loop.c event-top.c \
-	exceptions.c expprint.c extension.c \
-	f-exp.y f-lang.c f-typeprint.c f-valprint.c filesystem.c \
-	findcmd.c findvar.c frame.c frame-base.c frame-unwind.c \
-	gdbarch.c arch-utils.c gdb_bfd.c gdb_obstack.c \
-	gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
-	go-exp.y go-lang.c go-typeprint.c go-valprint.c \
+	dwarf2expr.c \
+	dwarf2loc.c \
+	dwarf2read.c \
+	elfread.c \
+	environ.c \
+	eval.c \
+	event-loop.c \
+	event-top.c \
+	exceptions.c \
+	expprint.c \
+	extension.c \
+	f-exp.y \
+	f-lang.c \
+	f-typeprint.c \
+	f-valprint.c \
+	filesystem.c \
+	findcmd.c \
+	findvar.c \
+	frame.c \
+	frame-base.c \
+	frame-unwind.c \
+	gcore.c \
+	gdb.c \
+	gdb_bfd.c \
+	gdb-dlfcn.c \
+	gdb_obstack.c \
+	gdb_usleep.c \
+	gdbarch.c \
+	gdbtypes.c \
+	gnu-v2-abi.c \
+	gnu-v3-abi.c \
+	go-exp.y \
+	go-lang.c \
+	go-typeprint.c \
+	go-valprint.c \
+	inf-child.c \
 	inf-loop.c \
 	infcall.c \
-	infcmd.c inflow.c infrun.c \
+	infcmd.c \
+	inferior.c \
+	inflow.c \
+	infrun.c \
 	inline-frame.c \
 	interps.c \
-	jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c jv-varobj.c \
-	language.c linespec.c minidebug.c \
-	m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \
-	macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
-	mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
-	memrange.c mi/mi-common.c \
+	jit.c \
+	language.c \
+	linespec.c \
+	location.c \
+	m2-exp.y \
+	m2-lang.c \
+	m2-typeprint.c \
+	m2-valprint.c \
+	macrocmd.c \
+	macroexp.c \
+	macroscope.c \
+	macrotab.c \
+	main.c \
+	maint.c \
+	mdebugread.c \
+	mem-break.c \
+	memattr.c \
+	memory-map.c \
+	memrange.c \
+	minidebug.c \
+	minsyms.c \
+	mipsread.c \
+	namespace.c \
 	objc-lang.c \
-	objfiles.c osabi.c observer.c osdata.c \
+	objfiles.c \
+	observer.c \
 	opencl-lang.c \
-	p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
-	proc-service.list progspace.c \
-	prologue-value.c psymtab.c \
-	regcache.c reggroups.c remote.c remote-fileio.c remote-notif.c reverse.c \
+	osabi.c \
+	osdata.c \
+	p-exp.y \
+	p-lang.c \
+	p-typeprint.c \
+	p-valprint.c \
+	parse.c \
+	printcmd.c \
+	probe.c \
+	proc-service.list \
+	progspace.c \
+	prologue-value.c \
+	psymtab.c \
+	record.c \
+	record-btrace.c \
+	record-full.c \
+	regcache.c \
+	reggroups.c \
+	remote.c \
+	remote-fileio.c \
+	remote-notif.c \
+	reverse.c \
+	rust-exp.y \
+	rust-lang.c \
+	selftest.c \
+	selftest-arch.c \
 	sentinel-frame.c \
-	serial.c ser-base.c ser-unix.c skip.c \
-	solib.c solib-target.c source.c \
-	stabsread.c stack.c probe.c stap-probe.c std-regs.c \
-	symfile.c symfile-debug.c symfile-mem.c symmisc.c symtab.c \
-	target.c target-dcache.c target-descriptions.c target-memory.c \
-	thread.c top.c tracepoint.c \
+	ser-base.c \
+	ser-event.c \
+	ser-unix.c \
+	serial.c \
+	skip.c \
+	sol-thread.c \
+	solib.c \
+	solib-target.c \
+	source.c \
+	stabsread.c \
+	stack.c \
+	stap-probe.c \
+	std-regs.c \
+	stub-termcap.c \
+	symfile.c \
+	symfile-debug.c \
+	symfile-mem.c \
+	symmisc.c \
+	symtab.c \
+	target.c \
+	target-dcache.c \
+	target-descriptions.c \
+	target-memory.c \
+	thread.c \
+	tid-parse.c \
+	top.c \
+	tracepoint.c \
 	trad-frame.c \
 	tramp-frame.c \
 	typeprint.c \
-	ui-out.c utils.c ui-file.h ui-file.c \
+	ui-file.c \
+	ui-file.h \
+	ui-out.c \
 	user-regs.c \
-	valarith.c valops.c valprint.c value.c varobj.c common/vec.c \
-	xml-tdesc.c xml-support.c \
-	inferior.c gdb_usleep.c \
-	record.c record-full.c gcore.c \
-	jit.c \
+	utils.c \
+	valarith.c \
+	valops.c \
+	valprint.c \
+	value.c \
+	varobj.c \
+	xml-support.c \
 	xml-syscall.c \
-	annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \
-	sol-thread.c stub-termcap.c \
-	common/gdb_vecs.c common/common-utils.c common/xml-utils.c \
-	common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \
-	common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \
-	target/waitstatus.c common/print-utils.c common/rsp-low.c \
-	common/errors.c common/common-debug.c common/common-exceptions.c \
-	common/btrace-common.c common/fileio.c \
+	xml-tdesc.c \
+	common/agent.c \
+	common/btrace-common.c \
+	common/buffer.c \
+	common/cleanups.c \
+	common/common-debug.c \
+	common/common-exceptions.c \
+	common/common-regcache.c \
+	common/common-utils.c \
+	common/errors.c \
+	common/fileio.c \
+	common/filestuff.c \
+	common/format.c \
+	common/gdb_vecs.c \
+	common/new-op.c \
+	common/print-utils.c \
+	common/ptid.c \
+	common/rsp-low.c \
+	common/run-time-clock.c \
+	common/signals.c \
+	common/signals-state-save-restore.c \
+	common/vec.c \
+	common/xml-utils.c \
+	mi/mi-common.c \
+	target/waitstatus.c \
 	$(SUBDIR_GCC_COMPILE_SRCS)
 
 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -903,98 +1233,357 @@ LINTFILES = $(SFILES) $(YYFILES) $(CONFI
 # right, it is probably easiest just to list .h files here directly.
 
 HFILES_NO_SRCDIR = \
-common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
-common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
-proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
-ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
-exec.h m32r-tdep.h osabi.h gdbcore.h amd64bsd-nat.h \
-i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
-ia64-tdep.h ada-lang.h varobj.h varobj-iter.h frv-tdep.h \
-nto-tdep.h serial.h \
-c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
-cli/cli-decode.h cli/cli-cmds.h cli/cli-utils.h \
-cli/cli-script.h macrotab.h symtab.h common/version.h \
-compile/compile.h gnulib/import/string.in.h gnulib/import/str-two-way.h \
-gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
-gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
-amd64-nat.h s390-linux-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
-gdbarch.h bsd-uthread.h memory-map.h memrange.h obsd-nat.h \
-mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
-ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
-f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
-objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \
-gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
-inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h \
-solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
-m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
-target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
-tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
-tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
-tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
-tui/tui-source.h sol2-tdep.h gregset.h sh-tdep.h sh64-tdep.h \
-expression.h score-tdep.h gdb_select.h ser-tcp.h \
-extension.h extension-priv.h \
-build-id.h buildsym.h valprint.h \
-typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
-mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
-complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
-common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
-interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h	\
-amd64-linux-tdep.h linespec.h i387-tdep.h mn10300-tdep.h \
-sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h \
-coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
-m68k-tdep.h spu-tdep.h jv-lang.h environ.h amd64-tdep.h \
-doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h ppc64-tdep.h \
-rs6000-tdep.h rs6000-aix-tdep.h \
-common/gdb_locale.h arch-utils.h trad-frame.h gnu-nat.h \
-language.h nbsd-tdep.h solib-svr4.h \
-macroexp.h ui-file.h regcache.h tracepoint.h tracefile.h i386-tdep.h \
-inf-child.h p-lang.h event-top.h gdbtypes.h user-regs.h \
-regformats/regdef.h config/i386/nm-i386gnu.h \
-config/i386/nm-fbsd.h \
-config/nm-nto.h config/sparc/nm-sol2.h config/nm-linux.h \
-top.h bsd-kvm.h gdb-stabs.h reggroups.h \
-annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h	\
-remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
-sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
-gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
-psymtab.h psympriv.h progspace.h bfin-tdep.h \
-amd64-darwin-tdep.h charset-list.h \
-config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
-dicos-tdep.h filesystem.h gcore.h gdb_wchar.h hppabsd-tdep.h \
-i386-darwin-tdep.h i386-nat.h linux-record.h moxie-tdep.h nios2-tdep.h \
-ft32-tdep.h \
-osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
-python/python-internal.h python/python.h ravenscar-thread.h record.h \
-record-full.h solib-aix.h \
-solib-darwin.h solib-spu.h windows-nat.h xcoffread.h \
-gnulib/import/extra/snippet/arg-nonnull.h gnulib/import/extra/snippet/c++defs.h \
-gnulib/import/extra/snippet/warn-on-use.h \
-gnulib/import/stddef.in.h gnulib/import/inttypes.in.h inline-frame.h skip.h \
-common/common-utils.h common/xml-utils.h common/buffer.h common/ptid.h \
-common/format.h common/host-defs.h utils.h common/queue.h \
-nat/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \
-gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h nat/linux-btrace.h \
-nat/ppc-linux.h ctf.h nat/x86-cpuid.h nat/x86-gcc-cpuid.h target/resume.h \
-target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
-common/print-utils.h common/rsp-low.h nat/x86-dregs.h x86-linux-nat.h \
-i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
-common/common-debug.h common/cleanups.h common/gdb_setjmp.h \
-common/common-exceptions.h target/target.h common/symbol.h \
-common/common-regcache.h fbsd-tdep.h nat/linux-personality.h \
-common/fileio.h nat/x86-linux.h nat/x86-linux-dregs.h \
-nat/linux-namespaces.h
+	aarch64-tdep.h \
+	ada-lang.h \
+	addrmap.h \
+	alpha-bsd-tdep.h \
+	alpha-tdep.h \
+	amd64-darwin-tdep.h \
+	amd64-linux-tdep.h \
+	amd64-nat.h \
+	amd64-tdep.h \
+	annotate.h \
+	arc-tdep.h \
+	arch-utils.h \
+	arm-linux-tdep.h \
+	arm-tdep.h \
+	auto-load.h \
+	auxv.h \
+	ax.h \
+	ax-gdb.h \
+	bcache.h \
+	bfd-target.h \
+	bfin-tdep.h \
+	block.h \
+	breakpoint.h \
+	bsd-kvm.h \
+	bsd-uthread.h \
+	build-id.h \
+	buildsym.h \
+	c-lang.h \
+	charset.h \
+	charset-list.h \
+	cli-out.h \
+	coff-pe-read.h \
+	command.h \
+	complaints.h \
+	completer.h \
+	cp-abi.h \
+	cp-support.h \
+	ctf.h \
+	d-lang.h \
+	darwin-nat.h \
+	dcache.h \
+	defs.h \
+	dfp.h \
+	dicos-tdep.h \
+	dictionary.h \
+	disasm.h \
+	doublest.h \
+	dummy-frame.h \
+	dwarf2-frame.h \
+	dwarf2-frame-tailcall.h \
+	dwarf2expr.h \
+	dwarf2loc.h \
+	environ.h \
+	event-loop.h \
+	event-top.h \
+	exceptions.h \
+	exec.h \
+	expression.h \
+	extension.h \
+	extension-priv.h \
+	f-lang.h \
+	fbsd-nat.h \
+	fbsd-tdep.h \
+	filesystem.h \
+	frame.h \
+	frame-base.h \
+	frame-unwind.h \
+	frv-tdep.h \
+	ft32-tdep.h \
+	gcore.h \
+	gdb.h \
+	gdb_bfd.h \
+	gdb_curses.h \
+	gdb-dlfcn.h \
+	gdb_expat.h \
+	gdb_obstack.h \
+	gdb_proc_service.h \
+	gdb_regex.h \
+	gdb_select.h \
+	gdb-stabs.h \
+	gdb_usleep.h \
+	gdb_vfork.h \
+	gdb_wchar.h \
+	gdbarch.h \
+	gdbcmd.h \
+	gdbcore.h \
+	gdbthread.h \
+	gdbtypes.h \
+	glibc-tdep.h \
+	gnu-nat.h \
+	go-lang.h \
+	gregset.h \
+	hppa-bsd-tdep.h \
+	hppa-linux-offsets.h \
+	hppa-tdep.h \
+	i386-bsd-nat.h \
+	i386-darwin-tdep.h \
+	i386-linux-nat.h \
+	i386-linux-tdep.h \
+	i386-tdep.h \
+	i387-tdep.h \
+	ia64-libunwind-tdep.h \
+	ia64-tdep.h \
+	inf-child.h \
+	inf-loop.h \
+	inf-ptrace.h \
+	infcall.h \
+	inferior.h \
+	inflow.h \
+	inline-frame.h \
+	interps.h \
+	jit.h \
+	language.h \
+	linespec.h \
+	linux-fork.h \
+	linux-nat.h \
+	linux-record.h \
+	linux-tdep.h \
+	location.h \
+	m2-lang.h \
+	m32r-tdep.h \
+	m68k-tdep.h \
+	m88k-tdep.h \
+	macroexp.h \
+	macroscope.h \
+	macrotab.h \
+	main.h \
+	mdebugread.h \
+	memattr.h \
+	memory-map.h \
+	memrange.h \
+	microblaze-tdep.h \
+	mips-linux-tdep.h \
+	mips-nbsd-tdep.h \
+	mips-tdep.h \
+	mn10300-tdep.h \
+	moxie-tdep.h \
+	nbsd-nat.h \
+	nbsd-tdep.h \
+	nds32-tdep.h \
+	nios2-tdep.h \
+	nto-tdep.h \
+	objc-lang.h \
+	objfiles.h \
+	obsd-nat.h \
+	obsd-tdep.h \
+	osabi.h \
+	osdata.h \
+	p-lang.h \
+	parser-defs.h \
+	ppc-fbsd-tdep.h \
+	ppc-linux-tdep.h \
+	ppc-nbsd-tdep.h \
+	ppc-obsd-tdep.h \
+	ppc-ravenscar-thread.h \
+	ppc-tdep.h \
+	ppc64-tdep.h \
+	probe.h \
+	proc-utils.h \
+	procfs.h \
+	progspace.h \
+	prologue-value.h \
+	psympriv.h \
+	psymtab.h \
+	ravenscar-thread.h \
+	record.h \
+	record-full.h \
+	regcache.h \
+	reggroups.h \
+	regset.h \
+	remote.h \
+	remote-fileio.h \
+	remote-notif.h \
+	rs6000-aix-tdep.h \
+	rs6000-tdep.h \
+	s390-linux-tdep.h \
+	score-tdep.h \
+	selftest-arch.h \
+	sentinel-frame.h \
+	ser-base.h \
+	ser-event.h \
+	ser-tcp.h \
+	ser-unix.h \
+	serial.h \
+	sh-tdep.h \
+	sh64-tdep.h \
+	sim-regno.h \
+	skip.h \
+	sol2-tdep.h \
+	solib.h \
+	solib-aix.h \
+	solib-darwin.h \
+	solib-spu.h \
+	solib-svr4.h \
+	solib-target.h \
+	solist.h \
+	source.h \
+	sparc-nat.h \
+	sparc-ravenscar-thread.h \
+	sparc-tdep.h \
+	sparc64-tdep.h \
+	spu-tdep.h \
+	stabsread.h \
+	stack.h \
+	stap-probe.h \
+	symfile.h \
+	symtab.h \
+	target.h \
+	target-dcache.h \
+	target-descriptions.h \
+	terminal.h \
+	tid-parse.h \
+	top.h \
+	tracefile.h \
+	tracepoint.h \
+	trad-frame.h \
+	tramp-frame.h \
+	typeprint.h \
+	ui-file.h \
+	ui-out.h \
+	user-regs.h \
+	utils.h \
+	valprint.h \
+	value.h \
+	varobj.h \
+	varobj-iter.h \
+	vax-tdep.h \
+	windows-nat.h \
+	windows-tdep.h \
+	x86-bsd-nat.h \
+	x86-linux-nat.h \
+	x86-nat.h \
+	xcoffread.h \
+	xml-support.h \
+	xml-syscall.h \
+	xml-tdesc.h \
+	xtensa-tdep.h \
+	arch/aarch64-insn.h \
+	arch/arm.h \
+	cli/cli-cmds.h \
+	cli/cli-decode.h \
+	cli/cli-script.h \
+	cli/cli-setshow.h \
+	cli/cli-utils.h \
+	common/buffer.h \
+	common/cleanups.h \
+	common/common-debug.h \
+	common/common-defs.h \
+	common/common-exceptions.h \
+	common/common-regcache.h \
+	common/common-types.h \
+	common/common-utils.h \
+	common/errors.h \
+	common/fileio.h \
+	common/format.h \
+	common/gdb_assert.h \
+	common/gdb_locale.h \
+	common/gdb_setjmp.h \
+	common/gdb_signals.h \
+	common/gdb_sys_time.h \
+	common/gdb_vecs.h \
+	common/gdb_wait.h \
+	common/host-defs.h \
+	common/print-utils.h \
+	common/ptid.h \
+	common/queue.h \
+	common/rsp-low.h \
+	common/run-time-clock.h \
+	common/signals-state-save-restore.h \
+	common/symbol.h \
+	common/vec.h \
+	common/version.h \
+	common/x86-xstate.h \
+	common/xml-utils.h \
+	compile/compile.h \
+	config/nm-linux.h \
+	config/nm-nto.h \
+	config/djgpp/langinfo.h \
+	config/djgpp/nl_types.h \
+	config/i386/nm-fbsd.h \
+	config/i386/nm-i386gnu.h \
+	config/sparc/nm-sol2.h \
+	gnulib/import/inttypes.in.h \
+	gnulib/import/stddef.in.h \
+	gnulib/import/stdint.in.h \
+	gnulib/import/str-two-way.h \
+	gnulib/import/string.in.h \
+	gnulib/import/extra/snippet/arg-nonnull.h \
+	gnulib/import/extra/snippet/c++defs.h \
+	gnulib/import/extra/snippet/warn-on-use.h \
+	mi/mi-cmds.h \
+	mi/mi-common.h \
+	mi/mi-console.h \
+	mi/mi-getopt.h \
+	mi/mi-main.h \
+	mi/mi-out.h \
+	mi/mi-parse.h \
+	nat/aarch64-linux.h \
+	nat/aarch64-linux-hw-point.h \
+	nat/amd64-linux-siginfo.h \
+	nat/gdb_ptrace.h \
+	nat/gdb_thread_db.h \
+	nat/linux-btrace.h \
+	nat/linux-namespaces.h \
+	nat/linux-nat.h \
+	nat/linux-osdata.h \
+	nat/linux-personality.h \
+	nat/linux-ptrace.h \
+	nat/linux-waitpid.h \
+	nat/mips-linux-watch.h \
+	nat/ppc-linux.h \
+	nat/x86-cpuid.h \
+	nat/x86-dregs.h \
+	nat/x86-gcc-cpuid.h \
+	nat/x86-linux.h \
+	nat/x86-linux-dregs.h \
+	python/py-event.h \
+	python/py-events.h \
+	python/py-stopevent.h \
+	python/python.h \
+	python/python-internal.h \
+	regformats/regdef.h \
+	target/resume.h \
+	target/target.h \
+	target/wait.h \
+	target/waitstatus.h \
+	tui/tui.h \
+	tui/tui-command.h \
+	tui/tui-data.h \
+	tui/tui-disasm.h \
+	tui/tui-file.h \
+	tui/tui-hooks.h \
+	tui/tui-io.h \
+	tui/tui-layout.h \
+	tui/tui-regs.h \
+	tui/tui-source.h \
+	tui/tui-stack.h \
+	tui/tui-win.h \
+	tui/tui-windata.h \
+	tui/tui-wingeneral.h \
+	tui/tui-winsource.h
 
 # Header files that already have srcdir in them, or which are in objdir.
 
-HFILES_WITH_SRCDIR = ../bfd/bfd.h jit-reader.h
-
+HFILES_WITH_SRCDIR = \
+	../bfd/bfd.h \
+	jit-reader.h
 
 # GDB "info" files, which should be included in their entirety
 INFOFILES = gdb.info*
 
-REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar
-
 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
 # default their values the way we do for SER_HARDWIRE; in the future
 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
@@ -1012,78 +1601,211 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_
 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
 
 COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
-	version.o \
-	annotate.o \
+	ada-lang.o \
+	ada-tasks.o \
+	ada-typeprint.o \
+	ada-valprint.o \
+	ada-varobj.o \
 	addrmap.o \
-	auto-load.o auxv.o \
 	agent.o \
+	annotate.o \
+	arch-utils.o \
+	auto-load.o \
+	auxv.o \
+	bcache.o \
 	bfd-target.o \
-	blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o \
+	block.o \
+	blockframe.o \
+	break-catch-sig.o \
 	break-catch-syscall.o \
-	findvar.o regcache.o cleanups.o \
-	charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o \
-	source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o \
-	block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o \
-	linespec.o dictionary.o \
-	infcall.o \
-	infcmd.o infrun.o \
-	expprint.o environ.o stack.o thread.o \
+	break-catch-throw.o \
+	breakpoint.o \
+	btrace.o \
+	btrace-common.o \
+	buffer.o \
+	build-id.o \
+	buildsym.o \
+	c-lang.o \
+	c-typeprint.o \
+	c-valprint.o \
+	c-varobj.o \
+	charset.o \
+	cleanups.o \
+	cli-out.o \
+	coff-pe-read.o \
+	coffread.o \
+	common-agent.o \
+	common-debug.o \
+	common-exceptions.o \
+	common-regcache.o \
+	common-utils.o \
+	complaints.o \
+	completer.o \
+	continuations.o \
+	copying.o \
+	corefile.o \
+	corelow.o \
+	cp-abi.o \
+	cp-namespace.o \
+	cp-support.o \
+	cp-valprint.o \
+	d-lang.o \
+	d-namespace.o \
+	d-valprint.o \
+	dbxread.o \
+	debug.o \
+	demangle.o \
+	dfp.o \
+	dictionary.o \
+	disasm.o \
+	disasm-selftests.o \
+	doublest.o \
+	dummy-frame.o \
+	dwarf2-frame.o \
+	dwarf2-frame-tailcall.o \
+	dwarf2expr.o \
+	dwarf2loc.o \
+	dwarf2read.o \
+	environ.o \
+	errors.o \
+	eval.o \
+	event-loop.o \
+	event-top.o \
 	exceptions.o \
+	exec.o \
+	expprint.o \
 	extension.o \
-	filesystem.o \
+	f-lang.o \
+	f-typeprint.o \
+	f-valprint.o \
+	fileio.o \
 	filestuff.o \
+	filesystem.o \
+	findcmd.o \
+	findvar.o \
+	format.o \
+	frame.o \
+	frame-base.o \
+	frame-unwind.o \
+	gcore.o \
+	gdb_bfd.o \
+	gdb-dlfcn.o \
+	gdb_obstack.o \
+	gdb_usleep.o \
+	gdb_vecs.o \
+	gdbarch.o \
+	gdbtypes.o \
+	gnu-v2-abi.o \
+	gnu-v3-abi.o \
+	go-lang.o \
+	go-typeprint.o \
+	go-valprint.o \
 	inf-child.o \
+	inf-loop.o \
+	infcall.o \
+	infcmd.o \
+	inferior.o \
+	infrun.o \
+	inline-frame.o \
 	interps.o \
-	minidebug.o \
+	jit.o \
+	language.o \
+	linespec.o \
+	location.o \
+	m2-lang.o \
+	m2-typeprint.o \
+	m2-valprint.o \
+	macrocmd.o \
+	macroexp.o \
+	macroscope.o \
+	macrotab.o \
 	main.o \
-	macrotab.o macrocmd.o macroexp.o macroscope.o \
+	maint.o \
+	mdebugread.o \
+	mem-break.o \
+	memattr.o \
+	memory-map.o \
+	memrange.o \
 	mi-common.o \
-	event-loop.o event-top.o inf-loop.o completer.o \
-	gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o \
-	osabi.o copying.o \
-	memattr.o mem-break.o target.o target-dcache.o parse.o language.o \
-	build-id.o buildsym.o \
-	findcmd.o \
-	std-regs.o \
-	signals.o \
-	exec.o reverse.o \
-	bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
-	dbxread.o coffread.o coff-pe-read.o \
-	dwarf2read.o mipsread.o stabsread.o corefile.o \
-	dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o \
-	ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o \
-	ada-tasks.o ada-varobj.o c-varobj.o \
-	ui-out.o cli-out.o \
-	varobj.o vec.o \
-	go-lang.o go-valprint.o go-typeprint.o \
-	jv-lang.o jv-valprint.o jv-typeprint.o jv-varobj.o \
-	m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o \
-	sentinel-frame.o \
-	complaints.o typeprint.o \
-	ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
-	ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o \
-	m2-valprint.o \
-	serial.o mdebugread.o top.o utils.o \
-	ui-file.o \
-	user-regs.o \
-	frame.o frame-unwind.o doublest.o \
-	frame-base.o \
-	inline-frame.o \
-	gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
-	cp-namespace.o \
+	minidebug.o \
+	minsyms.o \
+	mipsread.o \
+	namespace.o \
+	new-op.o \
+	objc-lang.o \
+	objfiles.o \
+	observer.o \
+	opencl-lang.o \
+	osabi.o \
+	osdata.o \
+	p-lang.o \
+	p-typeprint.o \
+	p-valprint.o \
+	parse.o \
+	print-utils.o \
+	printcmd.o \
+	probe.o \
+	progspace.o \
+	prologue-value.o \
+	psymtab.o \
+	ptid.o \
+	record.o \
+	record-btrace.o \
+	record-full.o \
+	regcache.o \
 	reggroups.o \
+	registry.o \
+	reverse.o \
+	rsp-low.o \
+	run-time-clock.o \
+	rust-lang.o \
+	selftest.o \
+	selftest-arch.o \
+	sentinel-frame.o \
+	ser-event.o \
+	serial.o \
+	signals.o \
+	signals-state-save-restore.o \
+	skip.o \
+	solib.o \
+	solib-target.o \
+	source.o \
+	stabsread.o \
+	stack.o \
+	std-regs.o \
+	symfile.o \
+	symfile-debug.o \
+	symmisc.o \
+	symtab.o \
+	target.o \
+	target-dcache.o \
+	target-descriptions.o \
+	target-memory.o \
+	thread.o \
+	thread-fsm.o \
+	tid-parse.o \
+	top.o \
 	trad-frame.o \
 	tramp-frame.o \
-	solib.o solib-target.o \
-	prologue-value.o memory-map.o memrange.o \
-	xml-support.o xml-syscall.o xml-utils.o \
-	target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
-	inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o \
-	gdb_vecs.o jit.o progspace.o skip.o probe.o \
-	common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \
-	format.o registry.o btrace.o record-btrace.o waitstatus.o \
-	print-utils.o rsp-low.o errors.o common-debug.o debug.o \
-	common-exceptions.o btrace-common.o fileio.o \
+	typeprint.o \
+	ui-file.o \
+	ui-out.o \
+	user-regs.o \
+	utils.o \
+	utils-selftests.o \
+	valarith.o \
+	valops.o \
+	valprint.o \
+	value.o \
+	varobj.o \
+	vec.o \
+	version.o \
+	waitstatus.o \
+	xml-builtin.o \
+	xml-support.o \
+	xml-syscall.o \
+	xml-tdesc.o \
+	xml-utils.o \
 	$(SUBDIR_GCC_COMPILE_OBS)
 
 TSOBS = inflow.o
@@ -1098,17 +1820,28 @@ CLEANDIRS = $(SUBDIRS)
 REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
-YYFILES = c-exp.c \
-	cp-name-parser.c \
-	ada-lex.c \
+YYFILES = \
 	ada-exp.c \
-	jv-exp.c \
-	d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
-YYOBJ = c-exp.o \
-	cp-name-parser.o \
+	ada-lex.c \
+	c-exp.c \
+	cp-name-parser.c \
+	d-exp.c \
+	f-exp.c \
+	go-exp.c \
+	m2-exp.c \
+	p-exp.c \
+	rust-exp.c
+
+YYOBJ = \
 	ada-exp.o \
-	jv-exp.o \
-	d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o
+	c-exp.o \
+	cp-name-parser.o \
+	d-exp.o \
+	f-exp.o \
+	go-exp.o \
+	m2-exp.o \
+	p-exp.o \
+	rust-exp.o
 
 # Things which need to be built when making a distribution.
 
@@ -1116,16 +1849,82 @@ DISTSTUFF = $(YYFILES)
 
 
 # All generated files which can be included by another file.
-generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
-	$(GNULIB_H) $(NAT_GENERATED_FILES) gcore
+generated_files = \
+	ada-lex.c \
+	config.h \
+	gcore \
+	jit-reader.h \
+	observer.h \
+	observer.inc \
+	$(GNULIB_H) \
+	$(NAT_GENERATED_FILES)
 
-.c.o:
-	$(COMPILE) $<
-	$(POSTCOMPILE)
+# Flags needed to compile Python code
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
 
 all: gdb$(EXEEXT) $(CONFIG_ALL)
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
 
+# Rule for compiling .c files in the top-level gdb directory.
+%.o: %.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+# Rules for compiling .c files in the various source subdirectories.
+%.o: ${srcdir}/arch/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/cli/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: ${srcdir}/common/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/compile/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/gdbtk/generic/%.c
+	$(COMPILE) $(all_gdbtk_cflags) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/guile/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/mi/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: ${srcdir}/nat/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/python/%.c
+	$(COMPILE) $(PYTHON_CFLAGS) $<
+	$(POSTCOMPILE)
+
+%.o: ${srcdir}/target/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: $(srcdir)/tui/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+%.o: ${srcdir}/unittests/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+# Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
+# object file generate by gdb/agent.c.
+common-agent.o: $(srcdir)/common/agent.c
+	$(COMPILE) $(srcdir)/common/agent.c
+	$(POSTCOMPILE)
+
 installcheck:
 
 # The check target can not use subdir_do, because subdir_do does not
@@ -1154,6 +1953,14 @@ check-read1: force
 	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \
 	else true; fi
 
+check-parallel: force
+	@if [ -f testsuite/Makefile ]; then \
+	  rootme=`pwd`; export rootme; \
+	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
+	  cd testsuite; \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \
+	else true; fi
+
 # The idea is to parallelize testing of multilibs, for example:
 #   make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
 # will run 3 concurrent sessions of check, eventually testing all 10
@@ -1202,8 +2009,8 @@ CHECK_HEADERS = $(HFILES_NO_SRCDIR)
 check-headers:
 	@echo Checking headers.
 	for i in $(CHECK_HEADERS) ; do \
-		$(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \
-			-include defs.h $(srcdir)/$$i ; \
+		$(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
+		$(INTERNAL_CFLAGS) -include defs.h $(srcdir)/$$i ; \
 	done
 .PHONY: check-headers
 
@@ -1349,6 +2156,7 @@ init.c: $(INIT_FILES)
 	    -e '/version.[co]$$/d' \
 	    -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
 	    -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
+	    -e 's/-exp\.o$$/-exp.y/' \
 	    -e 's/\.[co]$$/.c/' \
 	    -e 's,signals\.c,common/signals\.c,' \
 	    -e 's|^\([^  /][^     ]*\)|$(srcdir)/\1|g' | \
@@ -1380,7 +2188,7 @@ init.c: $(INIT_FILES)
 # against that.
 #
 # init.o is very important.  It pulls in the rest of GDB.
-LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
+LIBGDB_OBS = $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
 libgdb.a: $(LIBGDB_OBS)
 	-rm -f libgdb.a
 	$(AR) q libgdb.a $(LIBGDB_OBS)
@@ -1470,8 +2278,7 @@ local-maintainer-clean:
 	rm -f c-exp.c \
 		cp-name-parser.c \
 		ada-lex.c ada-exp.c \
-		jv-exp.tab \
-		d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
+		d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
 	rm -f TAGS $(INFOFILES)
 	rm -f $(YYFILES)
 	rm -f nm.h config.status
@@ -1641,114 +2448,216 @@ force_update:
 # GNU Make 3.63 has a different problem: it keeps tacking command line
 # overrides onto the definition of $(MAKE).  This variable setting
 # will remove them.
-MAKEOVERRIDES=
+MAKEOVERRIDES =
 
 ALLDEPFILES = \
-	aarch64-tdep.c aarch64-linux-tdep.c aarch64-newlib-tdep.c \
 	aarch64-linux-nat.c \
+	aarch64-linux-tdep.c \
+	aarch64-newlib-tdep.c \
+	aarch64-tdep.c \
 	aix-thread.c \
-	alphabsd-nat.c alpha-linux-nat.c \
-	alpha-tdep.c alpha-mdebug-tdep.c \
+	alpha-bsd-nat.c \
+	alpha-bsd-tdep.c \
+	alpha-fbsd-tdep.c \
+	alpha-linux-nat.c \
 	alpha-linux-tdep.c \
-	alphabsd-tdep.c alphafbsd-tdep.c alphanbsd-tdep.c alphaobsd-tdep.c \
-	amd64-nat.c amd64-tdep.c \
-	amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
-	amd64nbsd-nat.c amd64nbsd-tdep.c \
-	amd64obsd-nat.c amd64obsd-tdep.c \
+	alpha-mdebug-tdep.c \
+	alpha-nbsd-tdep.c \
+	alpha-obsd-tdep.c \
+	alpha-tdep.c \
+	amd64-bsd-nat.c \
 	amd64-darwin-tdep.c \
 	amd64-dicos-tdep.c \
-	amd64-linux-nat.c amd64-linux-tdep.c \
+	amd64-fbsd-nat.c \
+	amd64-fbsd-tdep.c \
+	amd64-linux-nat.c \
+	amd64-linux-tdep.c \
+	amd64-nat.c \
+	amd64-nbsd-nat.c \
+	amd64-nbsd-tdep.c \
+	amd64-obsd-nat.c \
+	amd64-obsd-tdep.c \
 	amd64-sol2-tdep.c \
-	arm-linux-nat.c arm-linux-tdep.c arm-symbian-tdep.c arm-tdep.c \
-	armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
+	amd64-tdep.c \
+	arc-tdep.c \
+	arm.c \
+	arm-bsd-tdep.c \
+	arm-get-next-pcs.c \
+	arm-linux.c \
+	arm-linux-nat.c \
+	arm-linux-tdep.c \
+	arm-nbsd-nat.c \
+	arm-nbsd-tdep.c \
+	arm-obsd-tdep.c \
+	arm-symbian-tdep.c \
+	arm-tdep.c \
 	avr-tdep.c \
-	bfin-linux-tdep.c bfin-tdep.c \
-	bsd-uthread.c bsd-kvm.c \
+	bfin-linux-tdep.c \
+	bfin-tdep.c \
+	bsd-kvm.c \
+	bsd-uthread.c \
 	core-regset.c \
-	dcache.c dicos-tdep.c darwin-nat.c \
+	darwin-nat.c \
+	dcache.c \
+	dcache.c \
+	dicos-tdep.c \
 	exec.c \
 	fbsd-nat.c \
 	fbsd-tdep.c \
 	fork-child.c \
 	ft32-tdep.c \
 	glibc-tdep.c \
-	go32-nat.c h8300-tdep.c \
+	go32-nat.c \
+	h8300-tdep.c \
+	hppa-bsd-tdep.c \
+	hppa-linux-nat.c \
+	hppa-linux-tdep.c \
+	hppa-nbsd-nat.c \
+	hppa-nbsd-tdep.c \
+	hppa-obsd-nat.c \
+	hppa-obsd-tdep.c \
 	hppa-tdep.c \
-	hppa-linux-tdep.c hppa-linux-nat.c \
-	hppabsd-tdep.c \
-	hppanbsd-nat.c hppanbsd-tdep.c \
-	hppaobsd-nat.c hppaobsd-tdep.c \
-	i386-tdep.c i386-linux-nat.c \
-	i386v4-nat.c i386-cygwin-tdep.c \
-	i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
-	i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
-	i387-tdep.c \
-	i386-darwin-tdep.c i386-darwin-nat.c \
+	i386-bsd-nat.c \
+	i386-bsd-tdep.c \
+	i386-cygwin-tdep.c \
+	i386-darwin-nat.c \
+	i386-darwin-tdep.c \
 	i386-dicos-tdep.c \
-	i386-linux-tdep.c x86-nat.c \
-	i386-sol2-nat.c i386-sol2-tdep.c \
-	i386gnu-nat.c i386gnu-tdep.c \
-	ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c ia64-vms-tdep.c \
-	inf-ptrace.c \
+	i386-fbsd-nat.c \
+	i386-fbsd-tdep.c \
+	i386-gnu-nat.c \
+	i386-gnu-tdep.c \
+	i386-linux-nat.c \
+	i386-linux-tdep.c \
+	i386-nbsd-nat.c \
+	i386-nbsd-tdep.c \
+	i386-obsd-nat.c \
+	i386-obsd-tdep.c \
+	i386-sol2-nat.c \
+	i386-sol2-tdep.c \
+	i386-tdep.c \
+	i386-v4-nat.c \
+	i387-tdep.c \
 	ia64-libunwind-tdep.c \
+	ia64-linux-nat.c \
+	ia64-linux-tdep.c \
+	ia64-tdep.c \
+	ia64-vms-tdep.c \
+	inf-ptrace.c \
 	linux-fork.c \
-	linux-tdep.c \
 	linux-record.c \
+	linux-tdep.c \
 	lm32-tdep.c \
-	m68hc11-tdep.c \
+	m32r-linux-nat.c \
+	m32r-linux-tdep.c \
 	m32r-tdep.c \
-	m32r-linux-nat.c m32r-linux-tdep.c \
+	m68hc11-tdep.c \
+	m68k-bsd-nat.c \
+	m68k-bsd-tdep.c \
+	m68k-linux-nat.c \
+	m68k-linux-tdep.c \
 	m68k-tdep.c \
-	m68kbsd-nat.c m68kbsd-tdep.c \
-	m68klinux-nat.c m68klinux-tdep.c \
-	m88k-tdep.c m88kbsd-nat.c \
-	microblaze-tdep.c microblaze-linux-tdep.c \
-	mingw-hdep.c common/mingw-strerror.c \
-	mips-linux-nat.c mips-linux-tdep.c \
+	m88k-bsd-nat.c \
+	m88k-tdep.c \
+	microblaze-linux-tdep.c \
+	microblaze-tdep.c \
+	mingw-hdep.c \
+	mips-fbsd-nat.c \
+	mips-fbsd-tdep.c \
+	mips-linux-nat.c \
+	mips-linux-tdep.c \
+	mips-nbsd-nat.c \
+	mips-nbsd-tdep.c \
 	mips-sde-tdep.c \
 	mips-tdep.c \
-	mipsnbsd-nat.c mipsnbsd-tdep.c \
-	mips64obsd-nat.c mips64obsd-tdep.c \
+	mips64-obsd-nat.c \
+	mips64-obsd-tdep.c \
 	msp430-tdep.c \
-	nios2-tdep.c nios2-linux-tdep.c \
-	nbsd-nat.c nbsd-tdep.c obsd-nat.c obsd-tdep.c \
-	posix-hdep.c common/posix-strerror.c \
-	ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c ppc64-tdep.c \
-	ppcfbsd-nat.c ppcfbsd-tdep.c \
-	ppcnbsd-nat.c ppcnbsd-tdep.c \
-	ppcobsd-nat.c ppcobsd-tdep.c \
+	nbsd-nat.c \
+	nbsd-tdep.c \
+	nds32-tdep.c \
+	nios2-linux-tdep.c \
+	nios2-tdep.c \
+	obsd-nat.c \
+	obsd-tdep.c \
+	posix-hdep.c \
+	ppc-fbsd-nat.c \
+	ppc-fbsd-tdep.c \
+	ppc-linux-nat.c \
+	ppc-linux-tdep.c \
+	ppc-nbsd-nat.c \
+	ppc-nbsd-tdep.c \
+	ppc-obsd-nat.c \
+	ppc-obsd-tdep.c \
+	ppc-ravenscar-thread.c \
+	ppc-sysv-tdep.c \
+	ppc64-tdep.c \
 	procfs.c \
 	ravenscar-thread.c \
-	remote-m32r-sdi.c remote-mips.c \
 	remote-sim.c \
-	dcache.c \
 	rl78-tdep.c \
-	rs6000-nat.c rs6000-tdep.c solib-aix.c ppc-ravenscar-thread.c \
 	rs6000-lynx178-tdep.c \
+	rs6000-nat.c \
+	rs6000-tdep.c \
 	rx-tdep.c \
-	s390-linux-tdep.c s390-linux-nat.c \
+	s390-linux-nat.c \
+	s390-linux-tdep.c \
 	score-tdep.c \
-	ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
-	sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
+	ser-go32.c \
+	ser-mingw.c \
+	ser-pipe.c \
+	ser-tcp.c \
+	sh-nbsd-nat.c \
+	sh-nbsd-tdep.c \
+	sh-tdep.c \
+	sh64-tdep.c \
 	sol2-tdep.c \
+	solib-aix.c \
+	solib-spu.c \
 	solib-svr4.c \
-	sparc-linux-nat.c sparc-linux-tdep.c \
-	sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-sol2-tdep.c \
-	sparc-nat.c sparc-tdep.c sparc64-linux-nat.c sparc64-linux-tdep.c \
-	sparc64-nat.c sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \
-	sparc64nbsd-nat.c sparc64nbsd-tdep.c \
-	sparc64obsd-nat.c sparc64obsd-tdep.c \
-	sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \
+	sparc-linux-nat.c \
+	sparc-linux-tdep.c \
+	sparc-nat.c \
+	sparc-nbsd-nat.c \
+	sparc-nbsd-tdep.c \
+	sparc-obsd-tdep.c \
 	sparc-ravenscar-thread.c \
-	spu-linux-nat.c spu-tdep.c spu-multiarch.c solib-spu.c \
-	tilegx-linux-nat.c tilegx-tdep.c tilegx-linux-tdep.c \
+	sparc-sol2-nat.c \
+	sparc-sol2-tdep.c \
+	sparc-tdep.c \
+	sparc64-fbsd-nat.c \
+	sparc64-fbsd-tdep.c \
+	sparc64-linux-nat.c \
+	sparc64-linux-tdep.c \
+	sparc64-nat.c \
+	sparc64-nbsd-nat.c \
+	sparc64-nbsd-tdep.c \
+	sparc64-obsd-nat.c \
+	sparc64-obsd-tdep.c \
+	sparc64-sol2-tdep.c \
+	sparc64-tdep.c \
+	spu-linux-nat.c \
+	spu-multiarch.c \
+	spu-tdep.c \
+	tilegx-linux-nat.c \
+	tilegx-linux-tdep.c \
+	tilegx-tdep.c \
 	v850-tdep.c \
-	vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
-	windows-nat.c windows-tdep.c \
+	vax-bsd-nat.c \
+	vax-nbsd-tdep.c \
+	vax-tdep.c \
+	windows-nat.c \
+	windows-tdep.c \
+	x86-nat.c \
 	xcoffread.c \
 	xstormy16-tdep.c \
-	xtensa-tdep.c xtensa-config.c \
-	xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c
+	xtensa-config.c \
+	xtensa-linux-nat.c \
+	xtensa-linux-tdep.c \
+	xtensa-tdep.c \
+	xtensa-xtregs.c \
+	common/mingw-strerror.c \
+	common/posix-strerror.c
 
 # Some files need explicit build rules (due to -Werror problems) or due
 # to sub-directory fun 'n' games.
@@ -1787,7 +2696,6 @@ ada-exp.o: ada-exp.c
 # Rules for generating translated message descriptions.  Disabled by
 # autoconf if the tools are not available.
 
-.SUFFIXES: .po .gmo .pox .pot
 .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
 
 all-po: $(CATALOGS)
@@ -1798,14 +2706,14 @@ update-po: $(CATALOGS:.gmo=.pox)
 
 # N.B. We do not attempt to copy these into $(srcdir).  The snapshot
 # script does that.
-.po.gmo:
+%.gmo: %.po
 	-test -d po || mkdir po
 	$(GMSGFMT) --statistics -o $@ $<
 
 # The new .po has to be gone over by hand, so we deposit it into
 # build/po with a different extension.  If build/po/$(PACKAGE).pot
 # exists, use it (it was just created), else use the one in srcdir.
-.po.pox:
+%.pox: %.po
 	-test -d po || mkdir po
 	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
 			then echo po/$(PACKAGE).pot; \
@@ -1866,8 +2774,7 @@ po/$(PACKAGE).pot: force
 # Strictly speaking c-exp.c should therefore depend on
 # Makefile.in, but that was a pretty big annoyance.
 
-.SUFFIXES: .y .l
-.y.c:
+%.c: %.y
 	rm -f $@ $@.tmp
 	$(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
 		|| (rm -f $@; false)
@@ -1880,9 +2787,10 @@ po/$(PACKAGE).pot: force
 	     -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
 	     -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
 	     -e '/^#line.*y.tab.c/d' \
+	     -e 's/YY_NULL/YY_NULLPTR/g' \
 	  < $@.tmp > $@
 	rm -f $@.tmp
-.l.c:
+%.c: %.l
 	if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
 	    $(FLEX) -o$@ $< && \
 	    rm -f $@.new && \
@@ -1921,82 +2829,8 @@ stamp-xml: $(srcdir)/features/feature_to
 .PRECIOUS: xml-builtin.c
 
 #
-# gdb/cli/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-cli-cmds.o: $(srcdir)/cli/cli-cmds.c
-	$(COMPILE) $(srcdir)/cli/cli-cmds.c
-	$(POSTCOMPILE)
-
-cli-decode.o: $(srcdir)/cli/cli-decode.c
-	$(COMPILE) $(srcdir)/cli/cli-decode.c
-	$(POSTCOMPILE)
-
-cli-dump.o: $(srcdir)/cli/cli-dump.c
-	$(COMPILE) $(srcdir)/cli/cli-dump.c
-	$(POSTCOMPILE)
-
-cli-interp.o: $(srcdir)/cli/cli-interp.c
-	$(COMPILE) $(srcdir)/cli/cli-interp.c
-	$(POSTCOMPILE)
-
-cli-logging.o: $(srcdir)/cli/cli-logging.c
-	$(COMPILE) $(srcdir)/cli/cli-logging.c
-	$(POSTCOMPILE)
-
-cli-script.o: $(srcdir)/cli/cli-script.c
-	$(COMPILE) $(srcdir)/cli/cli-script.c
-	$(POSTCOMPILE)
-
-cli-setshow.o: $(srcdir)/cli/cli-setshow.c
-	$(COMPILE) $(srcdir)/cli/cli-setshow.c
-	$(POSTCOMPILE)
-
-cli-utils.o: $(srcdir)/cli/cli-utils.c
-	$(COMPILE) $(srcdir)/cli/cli-utils.c
-	$(POSTCOMPILE)
-
-# GCC Compile support dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-compile.o: $(srcdir)/compile/compile.c
-	$(COMPILE) $(srcdir)/compile/compile.c
-	$(POSTCOMPILE)
-
-compile-c-types.o: $(srcdir)/compile/compile-c-types.c
-	$(COMPILE) $(srcdir)/compile/compile-c-types.c
-	$(POSTCOMPILE)
-
-compile-c-symbols.o: $(srcdir)/compile/compile-c-symbols.c
-	$(COMPILE) $(srcdir)/compile/compile-c-symbols.c
-	$(POSTCOMPILE)
-
-compile-object-load.o: $(srcdir)/compile/compile-object-load.c
-	$(COMPILE) $(srcdir)/compile/compile-object-load.c
-	$(POSTCOMPILE)
-
-compile-object-run.o: $(srcdir)/compile/compile-object-run.c
-	$(COMPILE) $(srcdir)/compile/compile-object-run.c
-	$(POSTCOMPILE)
-
-compile-loc2c.o: $(srcdir)/compile/compile-loc2c.c
-	$(COMPILE) $(srcdir)/compile/compile-loc2c.c
-	$(POSTCOMPILE)
-
-compile-c-support.o: $(srcdir)/compile/compile-c-support.c
-	$(COMPILE) $(srcdir)/compile/compile-c-support.c
-	$(POSTCOMPILE)
-
-
-#
 # GDBTK sub-directory
 #
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
 
 all-gdbtk: insight$(EXEEXT)
 
@@ -2061,632 +2895,25 @@ all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_
 		-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
 		-DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
 
-gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk.c
-	$(POSTCOMPILE)
-
-gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-bp.c
-	$(POSTCOMPILE)
-
-gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-cmds.c
-	$(POSTCOMPILE)
-
-gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-hooks.c
-	$(POSTCOMPILE)
-
-gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-interp.c
-	$(POSTCOMPILE)
-
-gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-main.c
-	$(POSTCOMPILE)
-
-gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-register.c
-	$(POSTCOMPILE)
-
-gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-stack.c
-	$(POSTCOMPILE)
-
-gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-varobj.c
-	$(POSTCOMPILE)
-
-gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
-	$(POSTCOMPILE)
-
-
-#
-# gdb/mi/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-break.c
-	$(POSTCOMPILE)
-
-mi-cmd-catch.o: $(srcdir)/mi/mi-cmd-catch.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-catch.c
-	$(POSTCOMPILE)
-
-mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-disas.c
-	$(POSTCOMPILE)
-
-mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-env.c
-	$(POSTCOMPILE)
-
-mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-file.c
-	$(POSTCOMPILE)
-
-mi-cmd-info.o: $(srcdir)/mi/mi-cmd-info.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-info.c
-	$(POSTCOMPILE)
-
-mi-cmds.o: $(srcdir)/mi/mi-cmds.c
-	$(COMPILE) $(srcdir)/mi/mi-cmds.c
-	$(POSTCOMPILE)
-
-mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-stack.c
-	$(POSTCOMPILE)
-
-mi-cmd-target.o: $(srcdir)/mi/mi-cmd-target.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-target.c
-	$(POSTCOMPILE)
-
-mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-var.c
-	$(POSTCOMPILE)
-
-mi-console.o: $(srcdir)/mi/mi-console.c
-	$(COMPILE) $(srcdir)/mi/mi-console.c
-	$(POSTCOMPILE)
-
-mi-getopt.o: $(srcdir)/mi/mi-getopt.c
-	$(COMPILE) $(srcdir)/mi/mi-getopt.c
-	$(POSTCOMPILE)
-
-mi-interp.o: $(srcdir)/mi/mi-interp.c
-	$(COMPILE) $(srcdir)/mi/mi-interp.c
-	$(POSTCOMPILE)
-
-mi-main.o: $(srcdir)/mi/mi-main.c
-	$(COMPILE) $(srcdir)/mi/mi-main.c
-	$(POSTCOMPILE)
-
-mi-out.o: $(srcdir)/mi/mi-out.c
-	$(COMPILE) $(srcdir)/mi/mi-out.c
-	$(POSTCOMPILE)
-
-mi-parse.o: $(srcdir)/mi/mi-parse.c
-	$(COMPILE) $(srcdir)/mi/mi-parse.c
-	$(POSTCOMPILE)
-
-mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c
-	$(COMPILE) $(srcdir)/mi/mi-symbol-cmds.c
-	$(POSTCOMPILE)
-
-mi-common.o: $(srcdir)/mi/mi-common.c
-	$(COMPILE) $(srcdir)/mi/mi-common.c
-	$(POSTCOMPILE)
-
-# gdb/common/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-signals.o: $(srcdir)/common/signals.c
-	$(COMPILE) $(srcdir)/common/signals.c
-	$(POSTCOMPILE)
-
-common-utils.o: ${srcdir}/common/common-utils.c
-	$(COMPILE) $(srcdir)/common/common-utils.c
-	$(POSTCOMPILE)
-
-gdb_vecs.o: ${srcdir}/common/gdb_vecs.c
-	$(COMPILE) $(srcdir)/common/gdb_vecs.c
-	$(POSTCOMPILE)
-
-xml-utils.o: ${srcdir}/common/xml-utils.c
-	$(COMPILE) $(srcdir)/common/xml-utils.c
-	$(POSTCOMPILE)
-
-ptid.o: ${srcdir}/common/ptid.c
-	$(COMPILE) $(srcdir)/common/ptid.c
-	$(POSTCOMPILE)
-
-buffer.o: ${srcdir}/common/buffer.c
-	$(COMPILE) $(srcdir)/common/buffer.c
-	$(POSTCOMPILE)
-
-filestuff.o: $(srcdir)/common/filestuff.c
-	$(COMPILE) $(srcdir)/common/filestuff.c
-	$(POSTCOMPILE)
-
-format.o: ${srcdir}/common/format.c
-	$(COMPILE) $(srcdir)/common/format.c
-	$(POSTCOMPILE)
-
-common-agent.o: $(srcdir)/common/agent.c
-	$(COMPILE) $(srcdir)/common/agent.c
-	$(POSTCOMPILE)
-
-vec.o: ${srcdir}/common/vec.c
-	$(COMPILE) $(srcdir)/common/vec.c
-	$(POSTCOMPILE)
-
-print-utils.o: ${srcdir}/common/print-utils.c
-	$(COMPILE) $(srcdir)/common/print-utils.c
-	$(POSTCOMPILE)
-
-rsp-low.o: ${srcdir}/common/rsp-low.c
-	$(COMPILE) $(srcdir)/common/rsp-low.c
-	$(POSTCOMPILE)
-
-errors.o: ${srcdir}/common/errors.c
-	$(COMPILE) $(srcdir)/common/errors.c
-	$(POSTCOMPILE)
-
-common-debug.o: ${srcdir}/common/common-debug.c
-	$(COMPILE) $(srcdir)/common/common-debug.c
-	$(POSTCOMPILE)
-
-cleanups.o: ${srcdir}/common/cleanups.c
-	$(COMPILE) $(srcdir)/common/cleanups.c
-	$(POSTCOMPILE)
-
-common-exceptions.o: ${srcdir}/common/common-exceptions.c
-	$(COMPILE) $(srcdir)/common/common-exceptions.c
-	$(POSTCOMPILE)
-
-posix-strerror.o: ${srcdir}/common/posix-strerror.c
-	$(COMPILE) $(srcdir)/common/posix-strerror.c
-	$(POSTCOMPILE)
-
-mingw-strerror.o: ${srcdir}/common/mingw-strerror.c
-	$(COMPILE) $(srcdir)/common/mingw-strerror.c
-	$(POSTCOMPILE)
-
-btrace-common.o: ${srcdir}/common/btrace-common.c
-	$(COMPILE) $(srcdir)/common/btrace-common.c
-	$(POSTCOMPILE)
-
-fileio.o: ${srcdir}/common/fileio.c
-	$(COMPILE) $(srcdir)/common/fileio.c
-	$(POSTCOMPILE)
-#
-# gdb/target/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-waitstatus.o: ${srcdir}/target/waitstatus.c
-	$(COMPILE) $(srcdir)/target/waitstatus.c
-	$(POSTCOMPILE)
-
-# gdb/nat/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-x86-dregs.o: ${srcdir}/nat/x86-dregs.c
-	$(COMPILE) $(srcdir)/nat/x86-dregs.c
-	$(POSTCOMPILE)
-
-linux-btrace.o: ${srcdir}/nat/linux-btrace.c
-	$(COMPILE) $(srcdir)/nat/linux-btrace.c
-	$(POSTCOMPILE)
-
-linux-osdata.o: ${srcdir}/nat/linux-osdata.c
-	$(COMPILE) $(srcdir)/nat/linux-osdata.c
-	$(POSTCOMPILE)
-
-linux-procfs.o: $(srcdir)/nat/linux-procfs.c
-	$(COMPILE) $(srcdir)/nat/linux-procfs.c
-	$(POSTCOMPILE)
-
-linux-ptrace.o: $(srcdir)/nat/linux-ptrace.c
-	$(COMPILE) $(srcdir)/nat/linux-ptrace.c
-	$(POSTCOMPILE)
-
-linux-waitpid.o: ${srcdir}/nat/linux-waitpid.c
-	$(COMPILE) $(srcdir)/nat/linux-waitpid.c
-	$(POSTCOMPILE)
-
-mips-linux-watch.o: ${srcdir}/nat/mips-linux-watch.c
-	$(COMPILE) $(srcdir)/nat/mips-linux-watch.c
-	$(POSTCOMPILE)
-
-ppc-linux.o: ${srcdir}/nat/ppc-linux.c
-	$(COMPILE) $(srcdir)/nat/ppc-linux.c
-	$(POSTCOMPILE)
-
-linux-personality.o: ${srcdir}/nat/linux-personality.c
-	$(COMPILE) $(srcdir)/nat/linux-personality.c
-	$(POSTCOMPILE)
-
-x86-linux.o: ${srcdir}/nat/x86-linux.c
-	$(COMPILE) $(srcdir)/nat/x86-linux.c
-	$(POSTCOMPILE)
-
-x86-linux-dregs.o: ${srcdir}/nat/x86-linux-dregs.c
-	$(COMPILE) $(srcdir)/nat/x86-linux-dregs.c
-	$(POSTCOMPILE)
-
-linux-namespaces.o: ${srcdir}/nat/linux-namespaces.c
-	$(COMPILE) $(srcdir)/nat/linux-namespaces.c
-	$(POSTCOMPILE)
-
 #
-# gdb/tui/ dependencies
+# Dependency tracking.
 #
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-tui.o: $(srcdir)/tui/tui.c
-	$(COMPILE) $(srcdir)/tui/tui.c
-	$(POSTCOMPILE)
-
-tui-command.o: $(srcdir)/tui/tui-command.c
-	$(COMPILE) $(srcdir)/tui/tui-command.c
-	$(POSTCOMPILE)
 
-tui-data.o: $(srcdir)/tui/tui-data.c
-	$(COMPILE) $(srcdir)/tui/tui-data.c
-	$(POSTCOMPILE)
-
-tui-disasm.o: $(srcdir)/tui/tui-disasm.c
-	$(COMPILE) $(srcdir)/tui/tui-disasm.c
-	$(POSTCOMPILE)
-
-tui-file.o: $(srcdir)/tui/tui-file.c
-	$(COMPILE) $(srcdir)/tui/tui-file.c
-	$(POSTCOMPILE)
-
-tui-hooks.o: $(srcdir)/tui/tui-hooks.c
-	$(COMPILE) $(srcdir)/tui/tui-hooks.c
-	$(POSTCOMPILE)
-
-tui-interp.o: $(srcdir)/tui/tui-interp.c
-	$(COMPILE) $(srcdir)/tui/tui-interp.c
-	$(POSTCOMPILE)
-
-tui-io.o: $(srcdir)/tui/tui-io.c
-	$(COMPILE) $(srcdir)/tui/tui-io.c
-	$(POSTCOMPILE)
-
-tui-layout.o: $(srcdir)/tui/tui-layout.c
-	$(COMPILE) $(srcdir)/tui/tui-layout.c
-	$(POSTCOMPILE)
-
-tui-out.o: $(srcdir)/tui/tui-out.c
-	$(COMPILE) $(srcdir)/tui/tui-out.c
-	$(POSTCOMPILE)
-
-tui-regs.o: $(srcdir)/tui/tui-regs.c
-	$(COMPILE) $(srcdir)/tui/tui-regs.c
-	$(POSTCOMPILE)
-
-tui-source.o: $(srcdir)/tui/tui-source.c
-	$(COMPILE) $(srcdir)/tui/tui-source.c
-	$(POSTCOMPILE)
-
-tui-stack.o: $(srcdir)/tui/tui-stack.c
-	$(COMPILE) $(srcdir)/tui/tui-stack.c
-	$(POSTCOMPILE)
-
-tui-win.o: $(srcdir)/tui/tui-win.c
-	$(COMPILE) $(srcdir)/tui/tui-win.c
-	$(POSTCOMPILE)
-
-tui-windata.o: $(srcdir)/tui/tui-windata.c
-	$(COMPILE) $(srcdir)/tui/tui-windata.c
-	$(POSTCOMPILE)
-
-tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c
-	$(COMPILE) $(srcdir)/tui/tui-wingeneral.c
-	$(POSTCOMPILE)
-
-tui-winsource.o: $(srcdir)/tui/tui-winsource.c
-	$(COMPILE) $(srcdir)/tui/tui-winsource.c
-	$(POSTCOMPILE)
-
-# gdb/guile dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-guile.o: $(srcdir)/guile/guile.c
-	$(COMPILE) $(srcdir)/guile/guile.c
-	$(POSTCOMPILE)
-
-scm-arch.o: $(srcdir)/guile/scm-arch.c
-	$(COMPILE) $(srcdir)/guile/scm-arch.c
-	$(POSTCOMPILE)
-
-scm-auto-load.o: $(srcdir)/guile/scm-auto-load.c
-	$(COMPILE) $(srcdir)/guile/scm-auto-load.c
-	$(POSTCOMPILE)
-
-scm-block.o: $(srcdir)/guile/scm-block.c
-	$(COMPILE) $(srcdir)/guile/scm-block.c
-	$(POSTCOMPILE)
-
-scm-breakpoint.o: $(srcdir)/guile/scm-breakpoint.c
-	$(COMPILE) $(srcdir)/guile/scm-breakpoint.c
-	$(POSTCOMPILE)
-
-scm-cmd.o: $(srcdir)/guile/scm-cmd.c
-	$(COMPILE) $(srcdir)/guile/scm-cmd.c
-	$(POSTCOMPILE)
-
-scm-disasm.o: $(srcdir)/guile/scm-disasm.c
-	$(COMPILE) $(srcdir)/guile/scm-disasm.c
-	$(POSTCOMPILE)
-
-scm-exception.o: $(srcdir)/guile/scm-exception.c
-	$(COMPILE) $(srcdir)/guile/scm-exception.c
-	$(POSTCOMPILE)
-
-scm-frame.o: $(srcdir)/guile/scm-frame.c
-	$(COMPILE) $(srcdir)/guile/scm-frame.c
-	$(POSTCOMPILE)
-
-scm-gsmob.o: $(srcdir)/guile/scm-gsmob.c
-	$(COMPILE) $(srcdir)/guile/scm-gsmob.c
-	$(POSTCOMPILE)
-
-scm-iterator.o: $(srcdir)/guile/scm-iterator.c
-	$(COMPILE) $(srcdir)/guile/scm-iterator.c
-	$(POSTCOMPILE)
-
-scm-lazy-string.o: $(srcdir)/guile/scm-lazy-string.c
-	$(COMPILE) $(srcdir)/guile/scm-lazy-string.c
-	$(POSTCOMPILE)
-
-scm-math.o: $(srcdir)/guile/scm-math.c
-	$(COMPILE) $(srcdir)/guile/scm-math.c
-	$(POSTCOMPILE)
-
-scm-objfile.o: $(srcdir)/guile/scm-objfile.c
-	$(COMPILE) $(srcdir)/guile/scm-objfile.c
-	$(POSTCOMPILE)
-
-scm-param.o: $(srcdir)/guile/scm-param.c
-	$(COMPILE) $(srcdir)/guile/scm-param.c
-	$(POSTCOMPILE)
-
-scm-ports.o: $(srcdir)/guile/scm-ports.c
-	$(COMPILE) $(srcdir)/guile/scm-ports.c
-	$(POSTCOMPILE)
-
-scm-pretty-print.o: $(srcdir)/guile/scm-pretty-print.c
-	$(COMPILE) $(srcdir)/guile/scm-pretty-print.c
-	$(POSTCOMPILE)
-
-scm-progspace.o: $(srcdir)/guile/scm-progspace.c
-	$(COMPILE) $(srcdir)/guile/scm-progspace.c
-	$(POSTCOMPILE)
-
-scm-safe-call.o: $(srcdir)/guile/scm-safe-call.c
-	$(COMPILE) $(srcdir)/guile/scm-safe-call.c
-	$(POSTCOMPILE)
-
-scm-string.o: $(srcdir)/guile/scm-string.c
-	$(COMPILE) $(srcdir)/guile/scm-string.c
-	$(POSTCOMPILE)
-
-scm-symbol.o: $(srcdir)/guile/scm-symbol.c
-	$(COMPILE) $(srcdir)/guile/scm-symbol.c
-	$(POSTCOMPILE)
-
-scm-symtab.o: $(srcdir)/guile/scm-symtab.c
-	$(COMPILE) $(srcdir)/guile/scm-symtab.c
-	$(POSTCOMPILE)
-
-scm-type.o: $(srcdir)/guile/scm-type.c
-	$(COMPILE) $(srcdir)/guile/scm-type.c
-	$(POSTCOMPILE)
-
-scm-utils.o: $(srcdir)/guile/scm-utils.c
-	$(COMPILE) $(srcdir)/guile/scm-utils.c
-	$(POSTCOMPILE)
-
-scm-value.o: $(srcdir)/guile/scm-value.c
-	$(COMPILE) $(srcdir)/guile/scm-value.c
-	$(POSTCOMPILE)
-
-# gdb/python/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-# Flags needed to compile Python code
-PYTHON_CFLAGS=@PYTHON_CFLAGS@
-
-python.o: $(srcdir)/python/python.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
-	$(POSTCOMPILE)
-
-py-arch.o: $(srcdir)/python/py-arch.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-arch.c
-	$(POSTCOMPILE)
-
-py-auto-load.o: $(srcdir)/python/py-auto-load.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-auto-load.c
-	$(POSTCOMPILE)
-
-py-block.o: $(srcdir)/python/py-block.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-block.c
-	$(POSTCOMPILE)
-
-py-bpevent.o: $(srcdir)/python/py-bpevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-bpevent.c
-	$(POSTCOMPILE)
-
-py-breakpoint.o: $(srcdir)/python/py-breakpoint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-breakpoint.c
-	$(POSTCOMPILE)
-
-py-cmd.o: $(srcdir)/python/py-cmd.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-cmd.c
-	$(POSTCOMPILE)
-
-py-continueevent.o: $(srcdir)/python/py-continueevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-continueevent.c
-	$(POSTCOMPILE)
-
-py-xmethods.o: $(srcdir)/python/py-xmethods.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-xmethods.c
-	$(POSTCOMPILE)
-
-py-event.o: $(srcdir)/python/py-event.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-event.c
-	$(POSTCOMPILE)
-
-py-evtregistry.o: $(srcdir)/python/py-evtregistry.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evtregistry.c
-	$(POSTCOMPILE)
-
-py-evts.o: $(srcdir)/python/py-evts.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evts.c
-	$(POSTCOMPILE)
-
-py-exitedevent.o: $(srcdir)/python/py-exitedevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-exitedevent.c
-	$(POSTCOMPILE)
-
-py-finishbreakpoint.o: $(srcdir)/python/py-finishbreakpoint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-finishbreakpoint.c
-	$(POSTCOMPILE)
-
-py-frame.o: $(srcdir)/python/py-frame.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c
-	$(POSTCOMPILE)
-
-py-framefilter.o: $(srcdir)/python/py-framefilter.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-framefilter.c
-	$(POSTCOMPILE)
-
-py-function.o: $(srcdir)/python/py-function.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
-	$(POSTCOMPILE)
-
-py-gdb-readline.o: $(srcdir)/python/py-gdb-readline.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-gdb-readline.c
-	$(POSTCOMPILE)
-
-py-inferior.o: $(srcdir)/python/py-inferior.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-inferior.c
-	$(POSTCOMPILE)
-
-py-infevents.o: $(srcdir)/python/py-infevents.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infevents.c
-	$(POSTCOMPILE)
-
-py-infthread.o: $(srcdir)/python/py-infthread.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infthread.c
-	$(POSTCOMPILE)
-
-py-lazy-string.o: $(srcdir)/python/py-lazy-string.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-lazy-string.c
-	$(POSTCOMPILE)
-
-py-linetable.o: $(srcdir)/python/py-linetable.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-linetable.c
-	$(POSTCOMPILE)
-
-py-newobjfileevent.o: $(srcdir)/python/py-newobjfileevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-newobjfileevent.c
-	$(POSTCOMPILE)
-
-py-objfile.o: $(srcdir)/python/py-objfile.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
-	$(POSTCOMPILE)
-
-py-param.o: $(srcdir)/python/py-param.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-param.c
-	$(POSTCOMPILE)
-
-py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
-	$(POSTCOMPILE)
-
-py-progspace.o: $(srcdir)/python/py-progspace.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-progspace.c
-	$(POSTCOMPILE)
-
-py-signalevent.o: $(srcdir)/python/py-signalevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-signalevent.c
-	$(POSTCOMPILE)
-
-py-stopevent.o: $(srcdir)/python/py-stopevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-stopevent.c
-	$(POSTCOMPILE)
-
-py-symbol.o: $(srcdir)/python/py-symbol.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symbol.c
-	$(POSTCOMPILE)
-
-py-symtab.o: $(srcdir)/python/py-symtab.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symtab.c
-	$(POSTCOMPILE)
-
-py-threadevent.o: $(srcdir)/python/py-threadevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-threadevent.c
-	$(POSTCOMPILE)
-
-py-type.o: $(srcdir)/python/py-type.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-type.c
-	$(POSTCOMPILE)
-
-py-unwind.o: $(srcdir)/python/py-unwind.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-unwind.c
-	$(POSTCOMPILE)
-
-py-utils.o: $(srcdir)/python/py-utils.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-utils.c
-	$(POSTCOMPILE)
-
-py-value.o: $(srcdir)/python/py-value.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
-	$(POSTCOMPILE)
-
-py-varobj.o: $(srcdir)/python/py-varobj.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-varobj.c
-	$(POSTCOMPILE)
-
-#
-# Dependency tracking.  Most of this is conditional on GNU Make being
-# found by configure; if GNU Make is not found, we fall back to a
-# simpler scheme.
-#
-
-@GMAKE_TRUE@ifeq ($(DEPMODE),depmode=gcc3)
+ifeq ($(DEPMODE),depmode=gcc3)
 # Note that we put the dependencies into a .Tpo file, then move them
 # into place if the compile succeeds.  We need this because gcc does
 # not atomically write the dependency output file.
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
-@GMAKE_TRUE@	-MF $(DEPDIR)/$(basename $(@F)).Tpo
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
-@GMAKE_TRUE@	$(DEPDIR)/$(basename $(@F)).Po
-@GMAKE_TRUE@else
-@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
-@GMAKE_TRUE@	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
+	-MF $(DEPDIR)/$(basename $(@F)).Tpo
+override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
+	$(DEPDIR)/$(basename $(@F)).Po
+else
+override COMPILE.pre = source='$<' object='$@' libtool=no \
+	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
 # depcomp handles atomicity for us, so we don't need a postcompile
 # step.
-@GMAKE_TRUE@override POSTCOMPILE =
-@GMAKE_TRUE@endif
+override POSTCOMPILE =
+endif
 
 # A list of all the objects we might care about in this build, for
 # dependency tracking.
@@ -2696,13 +2923,16 @@ all_object_files = gdb.o $(LIBGDB_OBS) g
 # Ensure that generated files are created early.  Use order-only
 # dependencies if available.  They require GNU make 3.80 or newer,
 # and the .VARIABLES variable was introduced at the same time.
-@GMAKE_TRUE@ifdef .VARIABLES
-@GMAKE_TRUE@$(all_object_files): | $(generated_files)
-@GMAKE_TRUE@else
+ifdef .VARIABLES
+$(all_object_files): | $(generated_files)
+else
 $(all_object_files) : $(generated_files)
-@GMAKE_TRUE@endif
+endif
 
 # Dependencies.
-@GMAKE_TRUE@-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
+-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
+
+# Disable implicit make rules.
+include $(srcdir)/disable-implicit-rules.mk
 
 ### end of the gdb Makefile.in.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/make-target-delegates ./gdb/make-target-delegates
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/make-target-delegates	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/make-target-delegates	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mdebugread.c ./gdb/mdebugread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mdebugread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mdebugread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Read a symbol table in ECOFF format (Third-Eye).
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
    CMU.  Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -222,7 +222,8 @@ static int found_ecoff_debugging_info;
 static int upgrade_type (int, struct type **, int, union aux_ext *,
 			 int, char *);
 
-static void parse_partial_symbols (struct objfile *);
+static void parse_partial_symbols (minimal_symbol_reader &,
+				   struct objfile *);
 
 static int has_opaque_xref (FDR *, SYMR *);
 
@@ -336,7 +337,8 @@ fdr_name (FDR *f)
    different sections are relocated via the SECTION_OFFSETS.  */
 
 void
-mdebug_build_psymtabs (struct objfile *objfile,
+mdebug_build_psymtabs (minimal_symbol_reader &reader,
+		       struct objfile *objfile,
 		       const struct ecoff_debug_swap *swap,
 		       struct ecoff_debug_info *info)
 {
@@ -359,7 +361,7 @@ mdebug_build_psymtabs (struct objfile *o
       info->fdr = (FDR *) obstack_alloc (&objfile->objfile_obstack,
 					 (info->symbolic_header.ifdMax
 					  * sizeof (FDR)));
-      fdr_src = info->external_fdr;
+      fdr_src = (char *) info->external_fdr;
       fdr_end = (fdr_src
 		 + info->symbolic_header.ifdMax * swap->external_fdr_size);
       fdr_ptr = info->fdr;
@@ -367,7 +369,7 @@ mdebug_build_psymtabs (struct objfile *o
 	(*swap->swap_fdr_in) (objfile->obfd, fdr_src, fdr_ptr);
     }
 
-  parse_partial_symbols (objfile);
+  parse_partial_symbols (reader, objfile);
 
 #if 0
   /* Check to make sure file was compiled with -g.  If not, warn the
@@ -436,7 +438,7 @@ push_parse_stack (void)
   if (top_stack && top_stack->prev)
     newobj = top_stack->prev;
   else
-    newobj = (struct parse_stack *) xzalloc (sizeof (struct parse_stack));
+    newobj = XCNEW (struct parse_stack);
   /* Initialize new frame with previous content.  */
   if (top_stack)
     {
@@ -521,6 +523,14 @@ add_pending (FDR *fh, char *sh, struct t
 
 /* Parsing Routines proper.  */
 
+static void
+reg_value_complaint (int regnum, int num_regs, const char *sym)
+{
+  complaint (&symfile_complaints,
+	     _("bad register number %d (max %d) in symbol %s"),
+             regnum, num_regs - 1, sym);
+}
+
 /* Parse a single symbol.  Mostly just make up a GDB symbol for it.
    For blocks, procedures and types we open a new lexical context.
    This is basically just a big switch on the symbol's type.  Argument
@@ -533,7 +543,21 @@ add_pending (FDR *fh, char *sh, struct t
 static int
 mdebug_reg_to_regnum (struct symbol *sym, struct gdbarch *gdbarch)
 {
-  return gdbarch_ecoff_reg_to_regnum (gdbarch, SYMBOL_VALUE (sym));
+  int regno = gdbarch_ecoff_reg_to_regnum (gdbarch, SYMBOL_VALUE (sym));
+
+  if (regno < 0
+      || regno >= (gdbarch_num_regs (gdbarch)
+		   + gdbarch_num_pseudo_regs (gdbarch)))
+    {
+      reg_value_complaint (regno,
+			   gdbarch_num_regs (gdbarch)
+			     + gdbarch_num_pseudo_regs (gdbarch),
+			   SYMBOL_PRINT_NAME (sym));
+
+      regno = gdbarch_sp_regnum (gdbarch); /* Known safe, though useless.  */
+    }
+
+  return regno;
 }
 
 static const struct symbol_register_ops mdebug_register_funcs = {
@@ -545,6 +569,26 @@ static const struct symbol_register_ops 
 static int mdebug_register_index;
 static int mdebug_regparm_index;
 
+/* Common code for symbols describing data.  */
+
+static void
+add_data_symbol (SYMR *sh, union aux_ext *ax, int bigend,
+		 struct symbol *s, int aclass_index, struct block *b,
+		 struct objfile *objfile, char *name)
+{
+  SYMBOL_DOMAIN (s) = VAR_DOMAIN;
+  SYMBOL_ACLASS_INDEX (s) = aclass_index;
+  add_symbol (s, top_stack->cur_st, b);
+
+  /* Type could be missing if file is compiled without debugging info.  */
+  if (SC_IS_UNDEF (sh->sc)
+      || sh->sc == scNil || sh->index == indexNil)
+    SYMBOL_TYPE (s) = objfile_type (objfile)->nodebug_data_symbol;
+  else
+    SYMBOL_TYPE (s) = parse_type (cur_fd, ax, sh->index, 0, bigend, name);
+  /* Value of a data symbol is its memory address.  */
+}
+
 static int
 parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
 	      struct section_offsets *section_offsets, struct objfile *objfile)
@@ -559,7 +603,6 @@ parse_symbol (SYMR *sh, union aux_ext *a
   struct type *t;
   struct field *f;
   int count = 1;
-  enum address_class theclass;
   TIR tir;
   long svalue = sh->value;
   int bitsize;
@@ -600,15 +643,14 @@ parse_symbol (SYMR *sh, union aux_ext *a
       break;
 
     case stGlobal:		/* External symbol, goes into global block.  */
-      theclass = LOC_STATIC;
       b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
 			     GLOBAL_BLOCK);
       s = new_symbol (name);
       SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
-      goto data;
+      add_data_symbol (sh, ax, bigend, s, LOC_STATIC, b, objfile, name);
+      break;
 
     case stStatic:		/* Static data, goes into current block.  */
-      theclass = LOC_STATIC;
       b = top_stack->cur_block;
       s = new_symbol (name);
       if (SC_IS_COMMON (sh->sc))
@@ -622,29 +664,19 @@ parse_symbol (SYMR *sh, union aux_ext *a
 	}
       else
 	SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
-      goto data;
+      add_data_symbol (sh, ax, bigend, s, LOC_STATIC, b, objfile, name);
+      break;
 
     case stLocal:		/* Local variable, goes into current block.  */
       b = top_stack->cur_block;
       s = new_symbol (name);
       SYMBOL_VALUE (s) = svalue;
       if (sh->sc == scRegister)
-	theclass = mdebug_register_index;
-      else
-	theclass = LOC_LOCAL;
-
-    data:			/* Common code for symbols describing data.  */
-      SYMBOL_DOMAIN (s) = VAR_DOMAIN;
-      SYMBOL_ACLASS_INDEX (s) = theclass;
-      add_symbol (s, top_stack->cur_st, b);
-
-      /* Type could be missing if file is compiled without debugging info.  */
-      if (SC_IS_UNDEF (sh->sc)
-	  || sh->sc == scNil || sh->index == indexNil)
-	SYMBOL_TYPE (s) = objfile_type (objfile)->nodebug_data_symbol;
+	add_data_symbol (sh, ax, bigend, s, mdebug_register_index,
+			 b, objfile, name);
       else
-	SYMBOL_TYPE (s) = parse_type (cur_fd, ax, sh->index, 0, bigend, name);
-      /* Value of a data symbol is its memory address.  */
+	add_data_symbol (sh, ax, bigend, s, LOC_LOCAL,
+			 b, objfile, name);
       break;
 
     case stParam:		/* Arg to procedure, goes into current
@@ -1050,8 +1082,8 @@ parse_symbol (SYMR *sh, union aux_ext *a
 		enum_sym = allocate_symbol (mdebugread_objfile);
 		SYMBOL_SET_LINKAGE_NAME
 		  (enum_sym,
-		   obstack_copy0 (&mdebugread_objfile->objfile_obstack,
-				  f->name, strlen (f->name)));
+		   (char *) obstack_copy0 (&mdebugread_objfile->objfile_obstack,
+					   f->name, strlen (f->name)));
 		SYMBOL_ACLASS_INDEX (enum_sym) = LOC_CONST;
 		SYMBOL_TYPE (enum_sym) = t;
 		SYMBOL_DOMAIN (enum_sym) = VAR_DOMAIN;
@@ -1348,7 +1380,8 @@ static struct type *
 basic_type (int bt, struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
-  struct type **map_bt = objfile_data (objfile, basic_type_data);
+  struct type **map_bt
+    = (struct type **) objfile_data (objfile, basic_type_data);
   struct type *tp;
 
   if (bt >= btMax)
@@ -1371,97 +1404,81 @@ basic_type (int bt, struct objfile *objf
       break;
 
     case btAdr:
-      tp = init_type (TYPE_CODE_PTR, 4, TYPE_FLAG_UNSIGNED,
-		      "adr_32", objfile);
-      TYPE_TARGET_TYPE (tp) = objfile_type (objfile)->builtin_void;
+      tp = init_pointer_type (objfile, 32, "adr_32",
+			      objfile_type (objfile)->builtin_void);
       break;
 
     case btChar:
-      tp = init_type (TYPE_CODE_INT, 1, 0,
-		      "char", objfile);
+      tp = init_integer_type (objfile, 8, 0, "char");
+      TYPE_NOSIGN (tp) = 1;
       break;
 
     case btUChar:
-      tp = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED,
-		      "unsigned char", objfile);
+      tp = init_integer_type (objfile, 8, 1, "unsigned char");
       break;
 
     case btShort:
-      tp = init_type (TYPE_CODE_INT, 2, 0,
-		      "short", objfile);
+      tp = init_integer_type (objfile, 16, 0, "short");
       break;
 
     case btUShort:
-      tp = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED,
-		      "unsigned short", objfile);
+      tp = init_integer_type (objfile, 16, 1, "unsigned short");
       break;
 
     case btInt:
-      tp = init_type (TYPE_CODE_INT, 4, 0,
-		      "int", objfile);
+      tp = init_integer_type (objfile, 32, 0, "int");
       break;
 
    case btUInt:
-      tp = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED,
-		      "unsigned int", objfile);
+      tp = init_integer_type (objfile, 32, 1, "unsigned int");
       break;
 
     case btLong:
-      tp = init_type (TYPE_CODE_INT, 4, 0,
-		      "long", objfile);
+      tp = init_integer_type (objfile, 32, 0, "long");
       break;
 
     case btULong:
-      tp = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED,
-		      "unsigned long", objfile);
+      tp = init_integer_type (objfile, 32, 1, "unsigned long");
       break;
 
     case btFloat:
-      tp = init_type (TYPE_CODE_FLT,
-		      gdbarch_float_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "float", objfile);
+      tp = init_float_type (objfile, gdbarch_float_bit (gdbarch),
+			    "float", gdbarch_float_format (gdbarch));
       break;
 
     case btDouble:
-      tp = init_type (TYPE_CODE_FLT,
-		      gdbarch_double_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "double", objfile);
+      tp = init_float_type (objfile, gdbarch_double_bit (gdbarch),
+			    "double", gdbarch_double_format (gdbarch));
       break;
 
     case btComplex:
-      tp = init_type (TYPE_CODE_COMPLEX,
-		      2 * gdbarch_float_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "complex", objfile);
-      TYPE_TARGET_TYPE (tp) = basic_type (btFloat, objfile);
+      tp = init_complex_type (objfile, "complex",
+			      basic_type (btFloat, objfile));
       break;
 
     case btDComplex:
-      tp = init_type (TYPE_CODE_COMPLEX,
-		      2 * gdbarch_double_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "double complex", objfile);
-      TYPE_TARGET_TYPE (tp) = basic_type (btDouble, objfile);
+      tp = init_complex_type (objfile, "double complex",
+			      basic_type (btFloat, objfile));
       break;
 
     case btFixedDec:
       /* We use TYPE_CODE_INT to print these as integers.  Does this do any
 	 good?  Would we be better off with TYPE_CODE_ERROR?  Should
 	 TYPE_CODE_ERROR print things in hex if it knows the size?  */
-      tp = init_type (TYPE_CODE_INT,
-		      gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "fixed decimal", objfile);
+      tp = init_integer_type (objfile, gdbarch_int_bit (gdbarch), 0,
+			      "fixed decimal");
       break;
 
     case btFloatDec:
-      tp = init_type (TYPE_CODE_ERROR,
-		      gdbarch_double_bit (gdbarch) / TARGET_CHAR_BIT, 0,
-		      "floating decimal", objfile);
+      tp = init_type (objfile, TYPE_CODE_ERROR,
+		      gdbarch_double_bit (gdbarch) / TARGET_CHAR_BIT,
+		      "floating decimal");
       break;
 
     case btString:
       /* Is a "string" the way btString means it the same as TYPE_CODE_STRING?
 	 FIXME.  */
-      tp = init_type (TYPE_CODE_STRING, 1, 0,
-		      "string", objfile);
+      tp = init_type (objfile, TYPE_CODE_STRING, 1, "string");
       break;
 
     case btVoid:
@@ -1469,39 +1486,32 @@ basic_type (int bt, struct objfile *objf
       break;
 
     case btLong64:
-      tp = init_type (TYPE_CODE_INT, 8, 0,
-		      "long", objfile);
+      tp = init_integer_type (objfile, 64, 0, "long");
       break;
 
     case btULong64:
-      tp = init_type (TYPE_CODE_INT, 8, TYPE_FLAG_UNSIGNED,
-		      "unsigned long", objfile);
+      tp = init_integer_type (objfile, 64, 1, "unsigned long");
       break;
 
     case btLongLong64:
-      tp = init_type (TYPE_CODE_INT, 8, 0,
-		      "long long", objfile);
+      tp = init_integer_type (objfile, 64, 0, "long long");
       break;
 
     case btULongLong64:
-      tp = init_type (TYPE_CODE_INT, 8, TYPE_FLAG_UNSIGNED,
-		      "unsigned long long", objfile);
+      tp = init_integer_type (objfile, 64, 1, "unsigned long long");
       break;
 
     case btAdr64:
-      tp = init_type (TYPE_CODE_PTR, 8, TYPE_FLAG_UNSIGNED,
-		      "adr_64", objfile);
-      TYPE_TARGET_TYPE (tp) = objfile_type (objfile)->builtin_void;
+      tp = init_pointer_type (objfile, 64, "adr_64",
+			      objfile_type (objfile)->builtin_void);
       break;
 
     case btInt64:
-      tp = init_type (TYPE_CODE_INT, 8, 0,
-		      "int", objfile);
+      tp = init_integer_type (objfile, 64, 0, "int");
       break;
 
     case btUInt64:
-      tp = init_type (TYPE_CODE_INT, 8, TYPE_FLAG_UNSIGNED,
-		      "unsigned int", objfile);
+      tp = init_integer_type (objfile, 64, 1, "unsigned int");
       break;
 
     default:
@@ -1653,7 +1663,7 @@ parse_type (int fd, union aux_ext *ax, u
       /* Try to cross reference this type, build new type on failure.  */
       ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
       if (tp == (struct type *) NULL)
-	tp = init_type (type_code, 0, 0, (char *) NULL, mdebugread_objfile);
+	tp = init_type (mdebugread_objfile, type_code, 0, NULL);
 
       /* DEC c89 produces cross references to qualified aggregate types,
          dereference them.  */
@@ -1696,8 +1706,9 @@ parse_type (int fd, union aux_ext *ax, u
 	  else if (TYPE_TAG_NAME (tp) == NULL
 		   || strcmp (TYPE_TAG_NAME (tp), name) != 0)
 	    TYPE_TAG_NAME (tp)
-	      = obstack_copy0 (&mdebugread_objfile->objfile_obstack,
-			       name, strlen (name));
+	      = ((const char *)
+		 obstack_copy0 (&mdebugread_objfile->objfile_obstack,
+				name, strlen (name)));
 	}
     }
 
@@ -1712,7 +1723,7 @@ parse_type (int fd, union aux_ext *ax, u
       /* Try to cross reference this type, build new type on failure.  */
       ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
       if (tp == (struct type *) NULL)
-	tp = init_type (type_code, 0, 0, (char *) NULL, mdebugread_objfile);
+	tp = init_type (mdebugread_objfile, type_code, 0, NULL);
 
       /* Make sure that TYPE_CODE(tp) has an expected type code.
          Any type may be returned from cross_ref if file indirect entries
@@ -1733,8 +1744,9 @@ parse_type (int fd, union aux_ext *ax, u
 	  if (TYPE_NAME (tp) == NULL
 	      || strcmp (TYPE_NAME (tp), name) != 0)
 	    TYPE_NAME (tp)
-	      = obstack_copy0 (&mdebugread_objfile->objfile_obstack,
-			       name, strlen (name));
+	      = ((const char *)
+		 obstack_copy0 (&mdebugread_objfile->objfile_obstack,
+				name, strlen (name)));
 	}
     }
   if (t->bt == btTypedef)
@@ -2250,7 +2262,8 @@ function_outside_compilation_unit_compla
    belongs to, and then records this new minimal symbol.  */
 
 static void
-record_minimal_symbol (const char *name, const CORE_ADDR address,
+record_minimal_symbol (minimal_symbol_reader &reader,
+		       const char *name, const CORE_ADDR address,
                        enum minimal_symbol_type ms_type, int storage_class,
                        struct objfile *objfile)
 {
@@ -2306,15 +2319,15 @@ record_minimal_symbol (const char *name,
         section = -1;
     }
 
-  prim_record_minimal_symbol_and_info (name, address, ms_type,
-                                       section, objfile);
+  reader.record_with_info (name, address, ms_type, section);
 }
 
 /* Master parsing procedure for first-pass reading of file symbols
    into a partial_symtab.  */
 
 static void
-parse_partial_symbols (struct objfile *objfile)
+parse_partial_symbols (minimal_symbol_reader &reader,
+		       struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   const bfd_size_type external_sym_size = debug_swap->external_sym_size;
@@ -2335,7 +2348,6 @@ parse_partial_symbols (struct objfile *o
   SYMR sh;
   struct partial_symtab *pst;
   int textlow_not_set = 1;
-  int past_first_source_file = 0;
 
   /* List of current psymtab's include files.  */
   const char **psymtab_include_list;
@@ -2395,8 +2407,7 @@ parse_partial_symbols (struct objfile *o
   /* Allocate the map FDR -> PST.
      Minor hack: -O3 images might claim some global data belongs
      to FDR -1.  We`ll go along with that.  */
-  fdr_to_pst = (struct pst_map *)
-    xzalloc ((hdr->ifdMax + 1) * sizeof *fdr_to_pst);
+  fdr_to_pst = XCNEWVEC (struct pst_map, hdr->ifdMax + 1);
   old_chain = make_cleanup (xfree, fdr_to_pst);
   fdr_to_pst++;
   {
@@ -2415,7 +2426,7 @@ parse_partial_symbols (struct objfile *o
 	  hdr->ifdMax * sizeof (struct mdebug_pending *));
 
   /* Pass 0 over external syms: swap them in.  */
-  ext_block = (EXTR *) xmalloc (hdr->iextMax * sizeof (EXTR));
+  ext_block = XNEWVEC (EXTR, hdr->iextMax);
   make_cleanup (xfree, ext_block);
 
   ext_out = (char *) debug_info->external_ext;
@@ -2616,7 +2627,7 @@ parse_partial_symbols (struct objfile *o
 	  unknown_ext_complaint (name);
 	}
       if (!ECOFF_IN_ELF (cur_bfd))
-        record_minimal_symbol (name, svalue, ms_type, ext_in->asym.sc,
+        record_minimal_symbol (reader, name, svalue, ms_type, ext_in->asym.sc,
                                objfile);
     }
 
@@ -2733,7 +2744,7 @@ parse_partial_symbols (struct objfile *o
 		      if (sh.st == stStaticProc)
 			{
 			  namestring = debug_info->ss + fh->issBase + sh.iss;
-                          record_minimal_symbol (namestring, sh.value,
+                          record_minimal_symbol (reader, namestring, sh.value,
                                                  mst_file_text, sh.sc,
                                                  objfile);
 			}
@@ -2778,7 +2789,7 @@ parse_partial_symbols (struct objfile *o
 			case scPData:
 			case scXData:
 			  namestring = debug_info->ss + fh->issBase + sh.iss;
-                          record_minimal_symbol (namestring, sh.value,
+                          record_minimal_symbol (reader, namestring, sh.value,
                                                  mst_file_data, sh.sc,
                                                  objfile);
 			  sh.value += ANOFFSET (objfile->section_offsets,
@@ -2789,7 +2800,7 @@ parse_partial_symbols (struct objfile *o
 			  /* FIXME!  Shouldn't this use cases for bss, 
 			     then have the default be abs?  */
 			  namestring = debug_info->ss + fh->issBase + sh.iss;
-                          record_minimal_symbol (namestring, sh.value,
+                          record_minimal_symbol (reader, namestring, sh.value,
                                                  mst_file_bss, sh.sc,
                                                  objfile);
 			  sh.value += ANOFFSET (objfile->section_offsets,
@@ -2827,10 +2838,11 @@ parse_partial_symbols (struct objfile *o
 		    /* Concatinate stabstring2 with stabstring1.  */
 		    if (stabstring
 		     && stabstring != debug_info->ss + fh->issBase + sh.iss)
-		      stabstring = xrealloc (stabstring, len + len2 + 1);
+		      stabstring
+			= (char *) xrealloc (stabstring, len + len2 + 1);
 		    else
 		      {
-			stabstring = xmalloc (len + len2 + 1);
+			stabstring = (char *) xmalloc (len + len2 + 1);
 			strcpy (stabstring, stabstring1);
 		      }
 		    strcpy (stabstring + len, stabstring2);
@@ -2924,36 +2936,21 @@ parse_partial_symbols (struct objfile *o
 
 		  case N_SO:
 		    {
-		      CORE_ADDR valu;
 		      static int prev_so_symnum = -10;
-		      static int first_so_symnum;
 		      const char *p;
-		      int prev_textlow_not_set;
-
-		      valu = sh.value + ANOFFSET (objfile->section_offsets,
-						  SECT_OFF_TEXT (objfile));
-
-		      prev_textlow_not_set = textlow_not_set;
 
 		      /* A zero value is probably an indication for the
-			 SunPRO 3.0 compiler.  end_psymtab explicitly tests
+			 SunPRO 3.0 compiler.  dbx_end_psymtab explicitly tests
 			 for zero, so don't relocate it.  */
 
 		      if (sh.value == 0
 			  && gdbarch_sofun_address_maybe_missing (gdbarch))
-			{
-			  textlow_not_set = 1;
-			  valu = 0;
-			}
+			textlow_not_set = 1;
 		      else
 			textlow_not_set = 0;
 
-		      past_first_source_file = 1;
-
 		      if (prev_so_symnum != symnum - 1)
 			{		/* Here if prev stab wasn't N_SO.  */
-			  first_so_symnum = symnum;
-
 			  if (pst)
 			    {
 			      pst = (struct partial_symtab *) 0;
@@ -3110,7 +3107,7 @@ parse_partial_symbols (struct objfile *o
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_STATIC,
 					     &objfile->static_psymbols,
-					     0, sh.value,
+					     sh.value,
 					     psymtab_language, objfile);
 			continue;
 		      case 'G':
@@ -3122,7 +3119,7 @@ parse_partial_symbols (struct objfile *o
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_STATIC,
 					     &objfile->global_psymbols,
-					     0, sh.value,
+					     sh.value,
 					     psymtab_language, objfile);
 			continue;
 
@@ -3140,8 +3137,7 @@ parse_partial_symbols (struct objfile *o
 			    add_psymbol_to_list (namestring, p - namestring, 1,
 						 STRUCT_DOMAIN, LOC_TYPEDEF,
 						 &objfile->static_psymbols,
-						 sh.value, 0,
-						 psymtab_language, objfile);
+						 0, psymtab_language, objfile);
 			    if (p[2] == 't')
 			      {
 				/* Also a typedef with the same name.  */
@@ -3149,8 +3145,7 @@ parse_partial_symbols (struct objfile *o
 						     p - namestring, 1,
 						     VAR_DOMAIN, LOC_TYPEDEF,
 						     &objfile->static_psymbols,
-						     sh.value, 0,
-						     psymtab_language,
+						     0, psymtab_language,
 						     objfile);
 				p += 1;
 			      }
@@ -3163,8 +3158,7 @@ parse_partial_symbols (struct objfile *o
 			    add_psymbol_to_list (namestring, p - namestring, 1,
 						 VAR_DOMAIN, LOC_TYPEDEF,
 						 &objfile->static_psymbols,
-						 sh.value, 0,
-						 psymtab_language, objfile);
+						 0, psymtab_language, objfile);
 			  }
 		      check_enum:
 			/* If this is an enumerated type, we need to add
@@ -3228,7 +3222,7 @@ parse_partial_symbols (struct objfile *o
 				add_psymbol_to_list (p, q - p, 1,
 						     VAR_DOMAIN, LOC_CONST,
 						     &objfile->static_psymbols,
-						     0, 0, psymtab_language,
+						     0, psymtab_language,
 						     objfile);
 				/* Point past the name.  */
 				p = q;
@@ -3246,15 +3240,14 @@ parse_partial_symbols (struct objfile *o
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_CONST,
 					     &objfile->static_psymbols,
-					     sh.value, 0, psymtab_language,
-					     objfile);
+					     0, psymtab_language, objfile);
 			continue;
 
 		      case 'f':
 			if (! pst)
 			  {
 			    int name_len = p - namestring;
-			    char *name = xmalloc (name_len + 1);
+			    char *name = (char *) xmalloc (name_len + 1);
 
 			    memcpy (name, namestring, name_len);
 			    name[name_len] = '\0';
@@ -3266,7 +3259,7 @@ parse_partial_symbols (struct objfile *o
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_BLOCK,
 					     &objfile->static_psymbols,
-					     0, sh.value,
+					     sh.value,
 					     psymtab_language, objfile);
 			continue;
 
@@ -3278,7 +3271,7 @@ parse_partial_symbols (struct objfile *o
 			if (! pst)
 			  {
 			    int name_len = p - namestring;
-			    char *name = xmalloc (name_len + 1);
+			    char *name = (char *) xmalloc (name_len + 1);
 
 			    memcpy (name, namestring, name_len);
 			    name[name_len] = '\0';
@@ -3290,7 +3283,7 @@ parse_partial_symbols (struct objfile *o
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_BLOCK,
 					     &objfile->global_psymbols,
-					     0, sh.value,
+					     sh.value,
 					     psymtab_language, objfile);
 			continue;
 
@@ -3347,7 +3340,7 @@ parse_partial_symbols (struct objfile *o
 
 		  case N_ENDM:
 		    /* Solaris 2 end of module, finish current partial
-		       symbol table.  END_PSYMTAB will set
+		       symbol table.  dbx_end_psymtab will set
 		       pst->texthigh to the proper value, which is
 		       necessary if a module compiled without
 		       debugging info follows this module.  */
@@ -3477,10 +3470,9 @@ parse_partial_symbols (struct objfile *o
 		  int new_sdx;
 
 		case stStaticProc:
-		  prim_record_minimal_symbol_and_info (name, minsym_value,
-						       mst_file_text,
-						       SECT_OFF_TEXT (objfile),
-						       objfile);
+		  reader.record_with_info (name, minsym_value,
+					   mst_file_text,
+					   SECT_OFF_TEXT (objfile));
 
 		  /* FALLTHROUGH */
 
@@ -3533,12 +3525,12 @@ parse_partial_symbols (struct objfile *o
 		    add_psymbol_to_list (name, strlen (name), 1,
 					 VAR_DOMAIN, LOC_BLOCK,
 					 &objfile->global_psymbols,
-				    0, sh.value, psymtab_language, objfile);
+					 sh.value, psymtab_language, objfile);
 		  else
 		    add_psymbol_to_list (name, strlen (name), 1,
 					 VAR_DOMAIN, LOC_BLOCK,
 					 &objfile->static_psymbols,
-				    0, sh.value, psymtab_language, objfile);
+					 sh.value, psymtab_language, objfile);
 
 		  procaddr = sh.value;
 
@@ -3563,15 +3555,13 @@ parse_partial_symbols (struct objfile *o
 
 		case stStatic:	/* Variable */
 		  if (SC_IS_DATA (sh.sc))
-		    prim_record_minimal_symbol_and_info (name, minsym_value,
-							 mst_file_data,
-							 SECT_OFF_DATA (objfile),
-							 objfile);
+		    reader.record_with_info (name, minsym_value,
+					     mst_file_data,
+					     SECT_OFF_DATA (objfile));
 		  else
-		    prim_record_minimal_symbol_and_info (name, minsym_value,
-							 mst_file_bss,
-							 SECT_OFF_BSS (objfile),
-							 objfile);
+		    reader.record_with_info (name, minsym_value,
+					     mst_file_bss,
+					     SECT_OFF_BSS (objfile));
 		  theclass = LOC_STATIC;
 		  break;
 
@@ -3605,8 +3595,7 @@ parse_partial_symbols (struct objfile *o
 		      add_psymbol_to_list (name, strlen (name), 1,
 					   STRUCT_DOMAIN, LOC_TYPEDEF,
 					   &objfile->static_psymbols,
-					   0, (CORE_ADDR) 0,
-					   psymtab_language, objfile);
+					   0, psymtab_language, objfile);
 		    }
 		  handle_psymbol_enumerators (objfile, fh, sh.st, sh.value);
 
@@ -3646,7 +3635,7 @@ parse_partial_symbols (struct objfile *o
 	      add_psymbol_to_list (name, strlen (name), 1,
 				   VAR_DOMAIN, theclass,
 				   &objfile->static_psymbols,
-				   0, sh.value, psymtab_language, objfile);
+				   sh.value, psymtab_language, objfile);
 	    skip:
 	      cur_sdx++;	/* Go to next file symbol.  */
 	    }
@@ -3726,17 +3715,18 @@ parse_partial_symbols (struct objfile *o
 	      add_psymbol_to_list (name, strlen (name), 1,
 				   VAR_DOMAIN, theclass,
 				   &objfile->global_psymbols,
-				   0, svalue,
-				   psymtab_language, objfile);
+				   svalue, psymtab_language, objfile);
 	    }
 	}
 
-      /* Link pst to FDR.  end_psymtab returns NULL if the psymtab was
+      /* Link pst to FDR.  dbx_end_psymtab returns NULL if the psymtab was
          empty and put on the free list.  */
-      fdr_to_pst[f_idx].pst = end_psymtab (objfile, save_pst,
-					psymtab_include_list, includes_used,
-					   -1, save_pst->texthigh,
-		       dependency_list, dependencies_used, textlow_not_set);
+      fdr_to_pst[f_idx].pst
+	= dbx_end_psymtab (objfile, save_pst,
+			   psymtab_include_list, includes_used,
+			   -1, save_pst->texthigh,
+			   dependency_list, dependencies_used,
+			   textlow_not_set);
       includes_used = 0;
       dependencies_used = 0;
 
@@ -3889,8 +3879,8 @@ handle_psymbol_enumerators (struct objfi
          in psymtabs, just in symtabs.  */
       add_psymbol_to_list (name, strlen (name), 1,
 			   VAR_DOMAIN, LOC_CONST,
-			   &objfile->static_psymbols, 0,
-			   (CORE_ADDR) 0, psymtab_language, objfile);
+			   &objfile->static_psymbols,
+			   0, psymtab_language, objfile);
       ext_sym += external_sym_size;
     }
 }
@@ -4139,7 +4129,7 @@ psymtab_to_symtab_1 (struct objfile *obj
 	  PDR *pdr_in;
 	  PDR *pdr_in_end;
 
-	  pr_block = (PDR *) xmalloc (fh->cpd * sizeof (PDR));
+	  pr_block = XNEWVEC (PDR, fh->cpd);
 	  old_chain = make_cleanup (xfree, pr_block);
 
 	  pdr_ptr = ((char *) debug_info->external_pdr
@@ -4242,7 +4232,7 @@ psymtab_to_symtab_1 (struct objfile *obj
 	      PDR *pdr_in;
 	      PDR *pdr_in_end;
 
-	      pr_block = (PDR *) xmalloc (fh->cpd * sizeof (PDR));
+	      pr_block = XNEWVEC (PDR, fh->cpd);
 
 	      old_chain = make_cleanup (xfree, pr_block);
 
@@ -4283,10 +4273,10 @@ psymtab_to_symtab_1 (struct objfile *obj
       if (size > 1)
 	--size;
       SYMTAB_LINETABLE (COMPUNIT_FILETABS (cust))
-	= obstack_copy (&mdebugread_objfile->objfile_obstack,
-			lines,
-			(sizeof (struct linetable)
-			 + size * sizeof (lines->item)));
+	= ((struct linetable *)
+	   obstack_copy (&mdebugread_objfile->objfile_obstack,
+			 lines, (sizeof (struct linetable)
+				 + size * sizeof (lines->item))));
       xfree (lines);
 
       /* .. and our share of externals.
@@ -4381,7 +4371,7 @@ cross_ref (int fd, union aux_ext *ax, st
   int xref_fd;
   struct mdebug_pending *pend;
 
-  *tpp = (struct type *) NULL;
+  *tpp = NULL;
 
   (*debug_swap->swap_rndx_in) (bigend, &ax->a_rndx, rn);
 
@@ -4397,13 +4387,13 @@ cross_ref (int fd, union aux_ext *ax, st
     }
 
   /* mips cc uses a rf of -1 for opaque struct definitions.
-     Set TYPE_FLAG_STUB for these types so that check_typedef will
+     Set TYPE_STUB for these types so that check_typedef will
      resolve them if the struct gets defined in another compilation unit.  */
   if (rf == -1)
     {
       *pname = "<undefined>";
-      *tpp = init_type (type_code, 0, TYPE_FLAG_STUB,
-			(char *) NULL, mdebugread_objfile);
+      *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
+      TYPE_STUB (*tpp) = 1;
       return result;
     }
 
@@ -4489,8 +4479,7 @@ cross_ref (int fd, union aux_ext *ax, st
 	  switch (tir.bt)
 	    {
 	    case btVoid:
-	      *tpp = init_type (type_code, 0, 0, (char *) NULL,
-				mdebugread_objfile);
+	      *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
 	      *pname = "<undefined>";
 	      break;
 
@@ -4525,8 +4514,7 @@ cross_ref (int fd, union aux_ext *ax, st
 	      complaint (&symfile_complaints,
 			 _("illegal bt %d in forward typedef for %s"), tir.bt,
 			 sym_name);
-	      *tpp = init_type (type_code, 0, 0, (char *) NULL,
-				mdebugread_objfile);
+	      *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
 	      break;
 	    }
 	  return result;
@@ -4554,7 +4542,7 @@ cross_ref (int fd, union aux_ext *ax, st
 	     has not been parsed yet.
 	     Initialize the type only, it will be filled in when
 	     it's definition is parsed.  */
-	  *tpp = init_type (type_code, 0, 0, (char *) NULL, mdebugread_objfile);
+	  *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
 	}
       add_pending (fh, esh, *tpp);
     }
@@ -4835,7 +4823,7 @@ new_block (enum block_type type)
   /* FIXME: carlton/2003-09-11: This should use allocate_block to
      allocate the block.  Which, in turn, suggests that the block
      should be allocated on an obstack.  */
-  struct block *retval = xzalloc (sizeof (struct block));
+  struct block *retval = XCNEW (struct block);
 
   if (type == FUNCTION_BLOCK)
     BLOCK_DICT (retval) = dict_create_linear_expandable ();
@@ -4882,14 +4870,12 @@ elfmdebug_build_psymtabs (struct objfile
 {
   bfd *abfd = objfile->obfd;
   struct ecoff_debug_info *info;
-  struct cleanup *back_to;
 
   /* FIXME: It's not clear whether we should be getting minimal symbol
      information from .mdebug in an ELF file, or whether we will.
      Re-initialize the minimal symbol reader in case we do.  */
 
-  init_minimal_symbol_collection ();
-  back_to = make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   info = ((struct ecoff_debug_info *)
 	  obstack_alloc (&objfile->objfile_obstack,
@@ -4899,10 +4885,9 @@ elfmdebug_build_psymtabs (struct objfile
     error (_("Error reading ECOFF debugging information: %s"),
 	   bfd_errmsg (bfd_get_error ()));
 
-  mdebug_build_psymtabs (objfile, swap, info);
+  mdebug_build_psymtabs (reader, objfile, swap, info);
 
-  install_minimal_symbols (objfile);
-  do_cleanups (back_to);
+  reader.install ();
 }
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mdebugread.h ./gdb/mdebugread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mdebugread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mdebugread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Read a symbol table in ECOFF format (Third-Eye).
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memattr.c ./gdb/memattr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memattr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memattr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Memory attributes support, for GDB.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -98,8 +98,8 @@ mem_region_lessthan (const struct mem_re
 int
 mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
 {
-  const struct mem_region *lhs = untyped_lhs;
-  const struct mem_region *rhs = untyped_rhs;
+  const struct mem_region *lhs = (const struct mem_region *) untyped_lhs;
+  const struct mem_region *rhs = (const struct mem_region *) untyped_rhs;
 
   if (lhs->lo < rhs->lo)
     return -1;
@@ -578,12 +578,10 @@ mem_enable_command (char *args, int from
     }
   else
     {
-      struct get_number_or_range_state state;
-
-      init_number_or_range (&state, args);
-      while (!state.finished)
+      number_or_range_parser parser (args);
+      while (!parser.finished ())
 	{
-	  num = get_number_or_range (&state);
+	  num = parser.get_number ();
 	  mem_enable (num);
 	}
     }
@@ -610,27 +608,24 @@ mem_disable (int num)
 static void
 mem_disable_command (char *args, int from_tty)
 {
-  int num;
-  struct mem_region *m;
-  int ix;
-
   require_user_regions (from_tty);
 
   target_dcache_invalidate ();
 
   if (args == NULL || *args == '\0')
     {
+      struct mem_region *m;
+      int ix;
+
       for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
 	m->enabled_p = 0;
     }
   else
     {
-      struct get_number_or_range_state state;
-
-      init_number_or_range (&state, args);
-      while (!state.finished)
+      number_or_range_parser parser (args);
+      while (!parser.finished ())
 	{
-	  num = get_number_or_range (&state);
+	  int num = parser.get_number ();
 	  mem_disable (num);
 	}
     }
@@ -666,9 +661,6 @@ mem_delete (int num)
 static void
 mem_delete_command (char *args, int from_tty)
 {
-  int num;
-  struct get_number_or_range_state state;
-
   require_user_regions (from_tty);
 
   target_dcache_invalidate ();
@@ -681,10 +673,10 @@ mem_delete_command (char *args, int from
       return;
     }
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      num = get_number_or_range (&state);
+      int num = parser.get_number ();
       mem_delete (num);
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memattr.h ./gdb/memattr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memattr.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memattr.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Memory attributes support, for GDB.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mem-break.c ./gdb/mem-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mem-break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mem-break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Simulate breakpoints by patching locations in the target system, for GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by John Gilmore.
 
@@ -44,16 +44,11 @@ default_memory_insert_breakpoint (struct
   int val;
 
   /* Determine appropriate breakpoint contents and size for this address.  */
-  bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-  if (bp == NULL)
-    error (_("Software breakpoints not implemented for this target."));
-
-  bp_tgt->placed_address = addr;
-  bp_tgt->placed_size = bplen;
+  bp = gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->kind, &bplen);
 
   /* Save the memory contents in the shadow_contents buffer and then
      write the breakpoint instruction.  */
-  readbuf = alloca (bplen);
+  readbuf = (gdb_byte *) alloca (bplen);
   val = target_read_memory (addr, readbuf, bplen);
   if (val == 0)
     {
@@ -79,8 +74,12 @@ int
 default_memory_remove_breakpoint (struct gdbarch *gdbarch,
 				  struct bp_target_info *bp_tgt)
 {
+  int bplen;
+
+  gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->kind, &bplen);
+
   return target_write_raw_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
-				  bp_tgt->placed_size);
+				  bplen);
 }
 
 
@@ -93,7 +92,8 @@ memory_insert_breakpoint (struct target_
 
 int
 memory_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			  struct bp_target_info *bp_tgt)
+			  struct bp_target_info *bp_tgt,
+			  enum remove_bp_reason reason)
 {
   return gdbarch_memory_remove_breakpoint (gdbarch, bp_tgt);
 }
@@ -114,7 +114,7 @@ memory_validate_breakpoint (struct gdbar
      address.  */
   bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
 
-  if (bp == NULL || bp_tgt->placed_size != bplen)
+  if (bp == NULL)
     return 0;
 
   /* Make sure we see the memory breakpoints.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memory-map.c ./gdb/memory-map.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memory-map.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memory-map.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for handling XML memory maps provided by target.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,18 +55,22 @@ memory_map_start_memory (struct gdb_xml_
 			 const struct gdb_xml_element *element,
 			 void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct memory_map_parsing_data *data = user_data;
+  struct memory_map_parsing_data *data
+    = (struct memory_map_parsing_data *) user_data;
   struct mem_region *r = VEC_safe_push (mem_region_s, *data->memory_map, NULL);
   ULONGEST *start_p, *length_p, *type_p;
 
-  start_p = xml_find_attribute (attributes, "start")->value;
-  length_p = xml_find_attribute (attributes, "length")->value;
-  type_p = xml_find_attribute (attributes, "type")->value;
+  start_p
+    = (ULONGEST *) xml_find_attribute (attributes, "start")->value;
+  length_p
+    = (ULONGEST *) xml_find_attribute (attributes, "length")->value;
+  type_p
+    = (ULONGEST *) xml_find_attribute (attributes, "type")->value;
 
   mem_region_init (r);
   r->lo = *start_p;
   r->hi = r->lo + *length_p;
-  r->attrib.mode = *type_p;
+  r->attrib.mode = (enum mem_access_mode) *type_p;
   r->attrib.blocksize = -1;
 }
 
@@ -78,7 +82,8 @@ memory_map_end_memory (struct gdb_xml_pa
 		       const struct gdb_xml_element *element,
 		       void *user_data, const char *body_text)
 {
-  struct memory_map_parsing_data *data = user_data;
+  struct memory_map_parsing_data *data
+    = (struct memory_map_parsing_data *) user_data;
   struct mem_region *r = VEC_last (mem_region_s, *data->memory_map);
 
   if (r->attrib.mode == MEM_FLASH && r->attrib.blocksize == -1)
@@ -93,10 +98,11 @@ memory_map_start_property (struct gdb_xm
 			   const struct gdb_xml_element *element,
 			   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct memory_map_parsing_data *data = user_data;
+  struct memory_map_parsing_data *data
+    = (struct memory_map_parsing_data *) user_data;
   char *name;
 
-  name = xml_find_attribute (attributes, "name")->value;
+  name = (char *) xml_find_attribute (attributes, "name")->value;
   snprintf (data->property_name, sizeof (data->property_name), "%s", name);
 }
 
@@ -107,7 +113,8 @@ memory_map_end_property (struct gdb_xml_
 			 const struct gdb_xml_element *element,
 			 void *user_data, const char *body_text)
 {
-  struct memory_map_parsing_data *data = user_data;
+  struct memory_map_parsing_data *data
+    = (struct memory_map_parsing_data *) user_data;
   char *name = data->property_name;
 
   if (strcmp (name, "blocksize") == 0)
@@ -125,7 +132,7 @@ memory_map_end_property (struct gdb_xml_
 static void
 clear_result (void *p)
 {
-  VEC(mem_region_s) **result = p;
+  VEC(mem_region_s) **result = (VEC(mem_region_s) **) p;
   VEC_free (mem_region_s, *result);
   *result = NULL;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memory-map.h ./gdb/memory-map.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memory-map.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memory-map.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for handling XML memory maps provided by target.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memrange.c ./gdb/memrange.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memrange.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memrange.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Memory ranges
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "memrange.h"
+#include <algorithm>
 
 int
 mem_ranges_overlap (CORE_ADDR start1, int len1,
@@ -26,8 +27,8 @@ mem_ranges_overlap (CORE_ADDR start1, in
 {
   ULONGEST h, l;
 
-  l = max (start1, start2);
-  h = min (start1 + len1, start2 + len2);
+  l = std::max (start1, start2);
+  h = std::min (start1 + len1, start2 + len2);
   return (l < h);
 }
 
@@ -46,8 +47,8 @@ address_in_mem_range (CORE_ADDR address,
 static int
 compare_mem_ranges (const void *ap, const void *bp)
 {
-  const struct mem_range *r1 = ap;
-  const struct mem_range *r2 = bp;
+  const struct mem_range *r1 = (const struct mem_range *) ap;
+  const struct mem_range *r2 = (const struct mem_range *) bp;
 
   if (r1->start > r2->start)
     return 1;
@@ -82,7 +83,7 @@ normalize_mem_ranges (VEC(mem_range_s) *
 	     merge them.  */
 	  if (rb->start <= ra->start + ra->length)
 	    {
-	      ra->length = max (ra->length,
+	      ra->length = std::max ((CORE_ADDR) ra->length,
 				(rb->start - ra->start) + rb->length);
 	      continue;		/* next b, same a */
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memrange.h ./gdb/memrange.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/memrange.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/memrange.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* The memory range data structure, and associated utilities.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mep-tdep.c ./gdb/mep-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mep-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mep-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Toshiba MeP for GDB, the GNU debugger.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
@@ -784,7 +784,9 @@ static int
 mep_debug_reg_to_regnum (struct gdbarch *gdbarch, int debug_reg)
 {
   /* The debug info uses the raw register numbers.  */
-  return mep_raw_to_pseudo[debug_reg];
+  if (debug_reg >= 0 && debug_reg < ARRAY_SIZE (mep_raw_to_pseudo))
+    return mep_raw_to_pseudo[debug_reg];
+  return -1;
 }
 
 
@@ -848,7 +850,7 @@ current_me_module (void)
       ULONGEST regval;
       regcache_cooked_read_unsigned (get_current_regcache (),
 				     MEP_MODULE_REGNUM, &regval);
-      return regval;
+      return (CONFIG_ATTR) regval;
     }
   else
     return gdbarch_tdep (target_gdbarch ())->me_module;
@@ -1126,7 +1128,7 @@ static enum register_status
 mep_pseudo_cr32_read (struct gdbarch *gdbarch,
                       struct regcache *regcache,
                       int cookednum,
-                      void *buf)
+                      gdb_byte *buf)
 {
   enum register_status status;
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1152,7 +1154,7 @@ static enum register_status
 mep_pseudo_cr64_read (struct gdbarch *gdbarch,
                       struct regcache *regcache,
                       int cookednum,
-                      void *buf)
+                      gdb_byte *buf)
 {
   return regcache_raw_read (regcache, mep_pseudo_to_raw[cookednum], buf);
 }
@@ -1182,7 +1184,7 @@ static void
 mep_pseudo_csr_write (struct gdbarch *gdbarch,
                       struct regcache *regcache,
                       int cookednum,
-                      const void *buf)
+                      const gdb_byte *buf)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int size = register_size (gdbarch, cookednum);
@@ -1213,7 +1215,7 @@ static void
 mep_pseudo_cr32_write (struct gdbarch *gdbarch,
                        struct regcache *regcache,
                        int cookednum,
-                       const void *buf)
+                       const gdb_byte *buf)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   /* Expand the 32-bit value into a 64-bit value, and write that to
@@ -1234,7 +1236,7 @@ static void
 mep_pseudo_cr64_write (struct gdbarch *gdbarch,
                      struct regcache *regcache,
                      int cookednum,
-                     const void *buf)
+                     const gdb_byte *buf)
 {
   regcache_raw_write (regcache, mep_pseudo_to_raw[cookednum], buf);
 }
@@ -1264,13 +1266,12 @@ mep_pseudo_register_write (struct gdbarc
 
 /* Disassembly.  */
 
-/* The mep disassembler needs to know about the section in order to
-   work correctly.  */
 static int
 mep_gdb_print_insn (bfd_vma pc, disassemble_info * info)
 {
   struct obj_section * s = find_pc_section (pc);
 
+  info->arch = bfd_arch_mep;
   if (s)
     {
       /* The libopcodes disassembly code uses the section to find the
@@ -1278,12 +1279,9 @@ mep_gdb_print_insn (bfd_vma pc, disassem
          the me_module index, and the me_module index to select the
          right instructions to print.  */
       info->section = s->the_bfd_section;
-      info->arch = bfd_arch_mep;
-	
-      return print_insn_mep (pc, info);
     }
-  
-  return 0;
+
+  return print_insn_mep (pc, info);
 }
 
 
@@ -1916,15 +1914,9 @@ mep_skip_prologue (struct gdbarch *gdbar
 
 
 /* Breakpoints.  */
+constexpr gdb_byte mep_break_insn[] = { 0x70, 0x32 };
 
-static const unsigned char *
-mep_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr)
-{
-  static unsigned char breakpoint[] = { 0x70, 0x32 };
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
-
+typedef BP_MANIPULATION (mep_break_insn) mep_breakpoint;
 
 
 /* Frames and frame unwinding.  */
@@ -1950,10 +1942,11 @@ mep_analyze_frame_prologue (struct frame
         stop_addr = func_start;
 
       mep_analyze_prologue (get_frame_arch (this_frame),
-			    func_start, stop_addr, *this_prologue_cache);
+			    func_start, stop_addr,
+			    (struct mep_prologue *) *this_prologue_cache);
     }
 
-  return *this_prologue_cache;
+  return (struct mep_prologue *) *this_prologue_cache;
 }
 
 
@@ -2395,7 +2388,10 @@ mep_gdbarch_init (struct gdbarch_info in
       /* The way to get the me_module code depends on the object file
          format.  At the moment, we only know how to handle ELF.  */
       if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
-        me_module = elf_elfheader (info.abfd)->e_flags & EF_MEP_INDEX_MASK;
+	{
+	  int flag = elf_elfheader (info.abfd)->e_flags & EF_MEP_INDEX_MASK;
+	  me_module = (CONFIG_ATTR) flag;
+	}
       else
         me_module = CONFIG_NONE;
     }
@@ -2441,7 +2437,7 @@ mep_gdbarch_init (struct gdbarch_info in
     if (gdbarch_tdep (arches->gdbarch)->me_module == me_module)
       return arches->gdbarch;
 
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Get a CGEN CPU descriptor for this architecture.  */
@@ -2484,7 +2480,8 @@ mep_gdbarch_init (struct gdbarch_info in
   set_gdbarch_print_insn (gdbarch, mep_gdb_print_insn); 
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, mep_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, mep_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, mep_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_skip_prologue (gdbarch, mep_skip_prologue);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-break.c ./gdb/mi/mi-cmd-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - breakpoint and watchpoint commands.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -28,6 +28,9 @@
 #include "observer.h"
 #include "mi-main.h"
 #include "mi-cmd-break.h"
+#include "language.h"
+#include "location.h"
+#include "linespec.h"
 #include "gdb_obstack.h"
 #include <ctype.h>
 
@@ -153,7 +156,7 @@ mi_argv_to_format (char **argv, int argc
     }
   obstack_1grow (&obstack, '\0');
 
-  ret = xstrdup (obstack_finish (&obstack));
+  ret = xstrdup ((const char *) obstack_finish (&obstack));
   obstack_free (&obstack, NULL);
 
   return ret;
@@ -177,7 +180,10 @@ mi_cmd_break_insert_1 (int dprintf, char
   int tracepoint = 0;
   struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
   enum bptype type_wanted;
+  struct event_location *location;
   struct breakpoint_ops *ops;
+  int is_explicit = 0;
+  struct explicit_location explicit_loc;
   char *extra_string = NULL;
 
   enum opt
@@ -185,6 +191,8 @@ mi_cmd_break_insert_1 (int dprintf, char
       HARDWARE_OPT, TEMP_OPT, CONDITION_OPT,
       IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT,
       TRACEPOINT_OPT,
+      EXPLICIT_SOURCE_OPT, EXPLICIT_FUNC_OPT,
+      EXPLICIT_LABEL_OPT, EXPLICIT_LINE_OPT
     };
   static const struct mi_opt opts[] =
   {
@@ -196,6 +204,10 @@ mi_cmd_break_insert_1 (int dprintf, char
     {"f", PENDING_OPT, 0},
     {"d", DISABLE_OPT, 0},
     {"a", TRACEPOINT_OPT, 0},
+    {"-source" , EXPLICIT_SOURCE_OPT, 1},
+    {"-function", EXPLICIT_FUNC_OPT, 1},
+    {"-label", EXPLICIT_LABEL_OPT, 1},
+    {"-line", EXPLICIT_LINE_OPT, 1},
     { 0, 0, 0 }
   };
 
@@ -204,6 +216,8 @@ mi_cmd_break_insert_1 (int dprintf, char
   int oind = 0;
   char *oarg;
 
+  initialize_explicit_location (&explicit_loc);
+
   while (1)
     {
       int opt = mi_getopt ("-break-insert", argc, argv,
@@ -236,16 +250,31 @@ mi_cmd_break_insert_1 (int dprintf, char
 	case TRACEPOINT_OPT:
 	  tracepoint = 1;
 	  break;
+	case EXPLICIT_SOURCE_OPT:
+	  is_explicit = 1;
+	  explicit_loc.source_filename = oarg;
+	  break;
+	case EXPLICIT_FUNC_OPT:
+	  is_explicit = 1;
+	  explicit_loc.function_name = oarg;
+	  break;
+	case EXPLICIT_LABEL_OPT:
+	  is_explicit = 1;
+	  explicit_loc.label_name = oarg;
+	  break;
+	case EXPLICIT_LINE_OPT:
+	  is_explicit = 1;
+	  explicit_loc.line_offset = linespec_parse_line_offset (oarg);
+	  break;
 	}
     }
 
-  if (oind >= argc)
+  if (oind >= argc && !is_explicit)
     error (_("-%s-insert: Missing <location>"),
 	   dprintf ? "dprintf" : "break");
-  address = argv[oind];
   if (dprintf)
     {
-      int format_num = oind + 1;
+      int format_num = is_explicit ? oind : oind + 1;
 
       if (hardware || tracepoint)
 	error (_("-dprintf-insert: does not support -h or -a"));
@@ -254,11 +283,21 @@ mi_cmd_break_insert_1 (int dprintf, char
 
       extra_string = mi_argv_to_format (argv + format_num, argc - format_num);
       make_cleanup (xfree, extra_string);
+      address = argv[oind];
     }
   else
     {
-      if (oind < argc - 1)
-	error (_("-break-insert: Garbage following <location>"));
+      if (is_explicit)
+	{
+	  if (oind < argc)
+	    error (_("-break-insert: Garbage following explicit location"));
+	}
+      else
+	{
+	  if (oind < argc - 1)
+	    error (_("-break-insert: Garbage following <location>"));
+	  address = argv[oind];
+	}
     }
 
   /* Now we have what we need, let's insert the breakpoint!  */
@@ -287,7 +326,32 @@ mi_cmd_break_insert_1 (int dprintf, char
       ops = &bkpt_breakpoint_ops;
     }
 
-  create_breakpoint (get_current_arch (), address, condition, thread,
+  if (is_explicit)
+    {
+      /* Error check -- we must have one of the other
+	 parameters specified.  */
+      if (explicit_loc.source_filename != NULL
+	  && explicit_loc.function_name == NULL
+	  && explicit_loc.label_name == NULL
+	  && explicit_loc.line_offset.sign == LINE_OFFSET_UNKNOWN)
+	error (_("-%s-insert: --source option requires --function, --label,"
+		 " or --line"), dprintf ? "dprintf" : "break");
+
+      location = new_explicit_location (&explicit_loc);
+    }
+  else
+    {
+      location = string_to_event_location_basic (&address, current_language);
+      if (*address)
+	{
+	  delete_event_location (location);
+	  error (_("Garbage '%s' at end of location"), address);
+	}
+    }
+
+  make_cleanup_delete_event_location (location);
+
+  create_breakpoint (get_current_arch (), location, condition, thread,
 		     extra_string,
 		     0 /* condition and thread are valid.  */,
 		     temp_p, type_wanted,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-break.h ./gdb/mi/mi-cmd-break.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-break.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-break.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - breakpoint and watchpoint commands.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corporation.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-catch.c ./gdb/mi/mi-cmd-catch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-catch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-catch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - catch commands.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corporation.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-disas.c ./gdb/mi/mi-cmd-disas.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-disas.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-disas.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - disassemble commands.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -44,10 +44,11 @@
    always required:
 
    MODE: 0 -- disassembly.
-         1 -- disassembly and source.
+         1 -- disassembly and source (with deprecated source-centric view).
          2 -- disassembly and opcodes.
-         3 -- disassembly, source and opcodes.
-*/
+         3 -- disassembly, source-centric and opcodes.
+         4 -- disassembly, and source (with pc-centric view).
+         5 -- disassembly, source (pc-centric) and opcodes.  */
 
 void
 mi_cmd_disassemble (char *command, char **argv, int argc)
@@ -141,16 +142,34 @@ mi_cmd_disassemble (char *command, char 
 	     "[-n howmany]] [-s startaddr -e endaddr] [--] mode."));
 
   mode = atoi (argv[0]);
-  if (mode < 0 || mode > 3)
-    error (_("-data-disassemble: Mode argument must be 0, 1, 2, or 3."));
+  if (mode < 0 || mode > 5)
+    error (_("-data-disassemble: Mode argument must be in the range 0-5."));
 
   /* Convert the mode into a set of disassembly flags.  */
 
-  disasm_flags = 0;
-  if (mode & 0x1)
-    disasm_flags |= DISASSEMBLY_SOURCE;
-  if (mode & 0x2)
-    disasm_flags |= DISASSEMBLY_RAW_INSN;
+  disasm_flags = 0;  /* Initialize here for -Wall.  */
+  switch (mode)
+    {
+    case 0:
+      break;
+    case 1:
+      disasm_flags |= DISASSEMBLY_SOURCE_DEPRECATED;
+      break;
+    case 2:
+      disasm_flags |= DISASSEMBLY_RAW_INSN;
+      break;
+    case 3:
+      disasm_flags |= DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_RAW_INSN;
+      break;
+    case 4:
+      disasm_flags |= DISASSEMBLY_SOURCE;
+      break;
+    case 5:
+      disasm_flags |= DISASSEMBLY_SOURCE | DISASSEMBLY_RAW_INSN;
+      break;
+    default:
+      gdb_assert_not_reached ("bad disassembly mode");
+    }
 
   /* We must get the function beginning and end where line_num is
      contained.  */
@@ -168,7 +187,6 @@ mi_cmd_disassemble (char *command, char 
     }
 
   gdb_disassembly (gdbarch, uiout,
-  		   file_string,
   		   disasm_flags,
 		   how_many, low, high);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-env.c ./gdb/mi/mi-cmd-env.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-env.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-env.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - environment commands.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat Inc.
 
@@ -84,7 +84,7 @@ mi_cmd_env_pwd (char *command, char **ar
     error (_("-environment-pwd: error finding name of working directory: %s"),
            safe_strerror (errno));
     
-  ui_out_field_string (uiout, "cwd", gdb_dirbuf);
+  uiout->field_string ("cwd", gdb_dirbuf);
 }
 
 /* Change working directory.  */
@@ -181,7 +181,7 @@ mi_cmd_env_path (char *command, char **a
   set_in_environ (current_inferior ()->environment, path_var_name, exec_path);
   xfree (exec_path);
   env = get_in_environ (current_inferior ()->environment, path_var_name);
-  ui_out_field_string (uiout, "path", env);
+  uiout->field_string ("path", env);
 }
 
 /* Add zero or more directories to the front of the source path.  */
@@ -241,7 +241,7 @@ mi_cmd_env_dir (char *command, char **ar
   for (i = argc - 1; i >= 0; --i)
     env_mod_path (argv[i], &source_path);
 
-  ui_out_field_string (uiout, "source-path", source_path);
+  uiout->field_string ("source-path", source_path);
   forget_cached_source_info ();
 }
 
@@ -264,8 +264,7 @@ mi_cmd_inferior_tty_show (char *command,
     error (_("-inferior-tty-show: Usage: No args"));
 
   if (inferior_io_terminal)
-    ui_out_field_string (current_uiout,
-			 "inferior_tty_terminal", inferior_io_terminal);
+    current_uiout->field_string ("inferior_tty_terminal", inferior_io_terminal);
 }
 
 void 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-file.c ./gdb/mi/mi-cmd-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-file.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-file.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - file commands.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -49,15 +49,13 @@ mi_cmd_file_list_exec_source_file (char 
     error (_("-file-list-exec-source-file: No symtab"));
 
   /* Print to the user the line, filename and fullname.  */
-  ui_out_field_int (uiout, "line", st.line);
-  ui_out_field_string (uiout, "file",
-		       symtab_to_filename_for_display (st.symtab));
-
-  ui_out_field_string (uiout, "fullname", symtab_to_fullname (st.symtab));
-
-  ui_out_field_int (uiout, "macro-info",
-		    COMPUNIT_MACRO_TABLE
-		      (SYMTAB_COMPUNIT (st.symtab)) != NULL);
+  uiout->field_int ("line", st.line);
+  uiout->field_string ("file", symtab_to_filename_for_display (st.symtab));
+
+  uiout->field_string ("fullname", symtab_to_fullname (st.symtab));
+
+  uiout->field_int ("macro-info",
+		    COMPUNIT_MACRO_TABLE (SYMTAB_COMPUNIT (st.symtab)) != NULL);
 }
 
 /* A callback for map_partial_symbol_filenames.  */
@@ -68,14 +66,14 @@ print_partial_file_name (const char *fil
 {
   struct ui_out *uiout = current_uiout;
 
-  ui_out_begin (uiout, ui_out_type_tuple, NULL);
+  uiout->begin (ui_out_type_tuple, NULL);
 
-  ui_out_field_string (uiout, "file", filename);
+  uiout->field_string ("file", filename);
 
   if (fullname)
-    ui_out_field_string (uiout, "fullname", fullname);
+    uiout->field_string ("fullname", fullname);
 
-  ui_out_end (uiout, ui_out_type_tuple);
+  uiout->end (ui_out_type_tuple);
 }
 
 void
@@ -90,21 +88,21 @@ mi_cmd_file_list_exec_source_files (char
     error (_("-file-list-exec-source-files: Usage: No args"));
 
   /* Print the table header.  */
-  ui_out_begin (uiout, ui_out_type_list, "files");
+  uiout->begin (ui_out_type_list, "files");
 
   /* Look at all of the file symtabs.  */
   ALL_FILETABS (objfile, cu, s)
   {
-    ui_out_begin (uiout, ui_out_type_tuple, NULL);
+    uiout->begin (ui_out_type_tuple, NULL);
 
-    ui_out_field_string (uiout, "file", symtab_to_filename_for_display (s));
-    ui_out_field_string (uiout, "fullname", symtab_to_fullname (s));
+    uiout->field_string ("file", symtab_to_filename_for_display (s));
+    uiout->field_string ("fullname", symtab_to_fullname (s));
 
-    ui_out_end (uiout, ui_out_type_tuple);
+    uiout->end (ui_out_type_tuple);
   }
 
   map_symbol_filenames (print_partial_file_name, NULL,
 			1 /*need_fullname*/);
 
-  ui_out_end (uiout, ui_out_type_list);
+  uiout->end (ui_out_type_list);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-info.c ./gdb/mi/mi-cmd-info.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-info.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-info.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - information commands.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,17 +53,17 @@ mi_cmd_info_ada_exceptions (char *comman
 
   make_cleanup_ui_out_table_begin_end
     (uiout, 2, VEC_length (ada_exc_info, exceptions), "ada-exceptions");
-  ui_out_table_header (uiout, 1, ui_left, "name", "Name");
-  ui_out_table_header (uiout, 1, ui_left, "address", "Address");
-  ui_out_table_body (uiout);
+  uiout->table_header (1, ui_left, "name", "Name");
+  uiout->table_header (1, ui_left, "address", "Address");
+  uiout->table_body ();
 
   for (ix = 0; VEC_iterate(ada_exc_info, exceptions, ix, info); ix++)
     {
       struct cleanup *sub_chain;
 
       sub_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-      ui_out_field_string (uiout, "name", info->name);
-      ui_out_field_core_addr (uiout, "address", gdbarch, info->addr);
+      uiout->field_string ("name", info->name);
+      uiout->field_core_addr ("address", gdbarch, info->addr);
 
       do_cleanups (sub_chain);
     }
@@ -96,7 +96,7 @@ mi_cmd_info_gdb_mi_command (char *comman
   cmd = mi_lookup (cmd_name);
 
   old_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "command");
-  ui_out_field_string (uiout, "exists", cmd != NULL ? "true" : "false");
+  uiout->field_string ("exists", cmd != NULL ? "true" : "false");
   do_cleanups (old_chain);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmds.c ./gdb/mi/mi-cmds.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmds.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmds.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set for GDB, the GNU debugger.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -137,7 +137,8 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_MI ("stack-list-frames", mi_cmd_stack_list_frames),
   DEF_MI_CMD_MI ("stack-list-locals", mi_cmd_stack_list_locals),
   DEF_MI_CMD_MI ("stack-list-variables", mi_cmd_stack_list_variables),
-  DEF_MI_CMD_MI ("stack-select-frame", mi_cmd_stack_select_frame),
+  DEF_MI_CMD_MI_1 ("stack-select-frame", mi_cmd_stack_select_frame,
+		   &mi_suppress_notification.user_selected_context),
   DEF_MI_CMD_MI ("symbol-list-lines", mi_cmd_symbol_list_lines),
   DEF_MI_CMD_CLI ("target-attach", "attach", 1),
   DEF_MI_CMD_MI ("target-detach", mi_cmd_target_detach),
@@ -146,10 +147,12 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_MI ("target-file-delete", mi_cmd_target_file_delete),
   DEF_MI_CMD_MI ("target-file-get", mi_cmd_target_file_get),
   DEF_MI_CMD_MI ("target-file-put", mi_cmd_target_file_put),
+  DEF_MI_CMD_MI ("target-flash-erase", mi_cmd_target_flash_erase),
   DEF_MI_CMD_CLI ("target-select", "target", 1),
   DEF_MI_CMD_MI ("thread-info", mi_cmd_thread_info),
   DEF_MI_CMD_MI ("thread-list-ids", mi_cmd_thread_list_ids),
-  DEF_MI_CMD_MI ("thread-select", mi_cmd_thread_select),
+  DEF_MI_CMD_MI_1 ("thread-select", mi_cmd_thread_select,
+		   &mi_suppress_notification.user_selected_context),
   DEF_MI_CMD_MI ("trace-define-variable", mi_cmd_trace_define_variable),
   DEF_MI_CMD_MI_1 ("trace-find", mi_cmd_trace_find,
 		   &mi_suppress_notification.traceframe),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmds.h ./gdb/mi/mi-cmds.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmds.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmds.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Command Set for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -93,6 +93,7 @@ extern mi_cmd_argv_ftype mi_cmd_target_d
 extern mi_cmd_argv_ftype mi_cmd_target_file_get;
 extern mi_cmd_argv_ftype mi_cmd_target_file_put;
 extern mi_cmd_argv_ftype mi_cmd_target_file_delete;
+extern mi_cmd_argv_ftype mi_cmd_target_flash_erase;
 extern mi_cmd_argv_ftype mi_cmd_thread_info;
 extern mi_cmd_argv_ftype mi_cmd_thread_list_ids;
 extern mi_cmd_argv_ftype mi_cmd_thread_select;
@@ -157,9 +158,6 @@ extern struct mi_cmd *mi_lookup (const c
 /* Debug flag */
 extern int mi_debug_p;
 
-/* Raw console output - FIXME: should this be a parameter? */
-extern struct ui_file *raw_stdout;
-
 extern void mi_execute_command (const char *cmd, int from_tty);
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-stack.c ./gdb/mi/mi-cmd-stack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-stack.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-stack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - stack commands.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -202,7 +202,7 @@ mi_cmd_stack_info_depth (char *command, 
        i++, fi = get_prev_frame (fi))
     QUIT;
 
-  ui_out_field_int (current_uiout, "depth", i);
+  current_uiout->field_int ("depth", i);
 }
 
 /* Print a list of the locals for the current frame.  With argument of
@@ -215,14 +215,12 @@ mi_cmd_stack_list_locals (char *command,
   struct frame_info *frame;
   int raw_arg = 0;
   enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
-  int print_value;
+  enum print_values print_value;
   int oind = 0;
   int skip_unavailable = 0;
-  int i;
 
   if (argc > 1)
     {
-      int i;
       enum opt
       {
 	NO_FRAME_FILTERS,
@@ -393,7 +391,7 @@ mi_cmd_stack_list_args (char *command, c
 
 	  QUIT;
 	  cleanup_frame = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
-	  ui_out_field_int (uiout, "level", i);
+	  uiout->field_int ("level", i);
 	  list_args_or_locals (arguments, print_values, fi, skip_unavailable);
 	  do_cleanups (cleanup_frame);
 	}
@@ -412,13 +410,12 @@ mi_cmd_stack_list_variables (char *comma
   struct frame_info *frame;
   int raw_arg = 0;
   enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
-  int print_value;
+  enum print_values print_value;
   int oind = 0;
   int skip_unavailable = 0;
 
   if (argc > 1)
     {
-      int i;
       enum opt
       {
 	NO_FRAME_FILTERS,
@@ -491,7 +488,6 @@ list_arg_or_local (const struct frame_ar
 {
   struct cleanup *old_chain;
   struct ui_out *uiout = current_uiout;
-  struct ui_file *stb;
 
   gdb_assert (!arg->val || !arg->error);
   gdb_assert ((values == PRINT_NO_VALUES && arg->val == NULL
@@ -514,25 +510,26 @@ list_arg_or_local (const struct frame_ar
 					 TYPE_LENGTH (value_type (arg->val))))))
     return;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  old_chain = make_cleanup (null_cleanup, NULL);
 
   if (values != PRINT_NO_VALUES || what == all)
     make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-  fputs_filtered (SYMBOL_PRINT_NAME (arg->sym), stb);
+  string_file stb;
+
+  stb.puts (SYMBOL_PRINT_NAME (arg->sym));
   if (arg->entry_kind == print_entry_values_only)
-    fputs_filtered ("@entry", stb);
-  ui_out_field_stream (uiout, "name", stb);
+    stb.puts ("@entry");
+  uiout->field_stream ("name", stb);
 
   if (what == all && SYMBOL_IS_ARGUMENT (arg->sym))
-    ui_out_field_int (uiout, "arg", 1);
+    uiout->field_int ("arg", 1);
 
   if (values == PRINT_SIMPLE_VALUES)
     {
       check_typedef (arg->sym->type);
-      type_print (arg->sym->type, "", stb, -1);
-      ui_out_field_stream (uiout, "type", stb);
+      type_print (arg->sym->type, "", &stb, -1);
+      uiout->field_stream ("type", stb);
     }
 
   if (arg->val || arg->error)
@@ -549,7 +546,7 @@ list_arg_or_local (const struct frame_ar
 
 	      get_no_prettyformat_print_options (&opts);
 	      opts.deref_ref = 1;
-	      common_val_print (arg->val, stb, 0, &opts,
+	      common_val_print (arg->val, &stb, 0, &opts,
 				language_def (SYMBOL_LANGUAGE (arg->sym)));
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
@@ -559,9 +556,8 @@ list_arg_or_local (const struct frame_ar
 	  END_CATCH
 	}
       if (error_message != NULL)
-	fprintf_filtered (stb, _("<error reading variable: %s>"),
-			  error_message);
-      ui_out_field_stream (uiout, "value", stb);
+	stb.printf (_("<error reading variable: %s>"), error_message);
+      uiout->field_stream ("value", stb);
     }
 
   do_cleanups (old_chain);
@@ -648,7 +644,7 @@ list_args_or_locals (enum what_to_list w
 	      if (SYMBOL_IS_ARGUMENT (sym))
 		sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
 				      block, VAR_DOMAIN,
-				      NULL);
+				      NULL).symbol;
 	      else
 		sym2 = sym;
 	      gdb_assert (sym2 != NULL);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-target.c ./gdb/mi/mi-cmd-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - target commands.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-var.c ./gdb/mi/mi-cmd-var.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-cmd-var.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-cmd-var.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - varobj commands.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -49,51 +49,41 @@ print_varobj (struct varobj *var, enum p
 	      int print_expression)
 {
   struct ui_out *uiout = current_uiout;
-  char *type;
   int thread_id;
-  char *display_hint;
 
-  ui_out_field_string (uiout, "name", varobj_get_objname (var));
+  uiout->field_string ("name", varobj_get_objname (var));
   if (print_expression)
     {
-      char *exp = varobj_get_expression (var);
+      std::string exp = varobj_get_expression (var);
 
-      ui_out_field_string (uiout, "exp", exp);
-      xfree (exp);
+      uiout->field_string ("exp", exp.c_str ());
     }
-  ui_out_field_int (uiout, "numchild", varobj_get_num_children (var));
+  uiout->field_int ("numchild", varobj_get_num_children (var));
   
   if (mi_print_value_p (var, print_values))
     {
-      char *val = varobj_get_value (var);
+      std::string val = varobj_get_value (var);
 
-      ui_out_field_string (uiout, "value", val);
-      xfree (val);
+      uiout->field_string ("value", val.c_str ());
     }
 
-  type = varobj_get_type (var);
-  if (type != NULL)
-    {
-      ui_out_field_string (uiout, "type", type);
-      xfree (type);
-    }
+  std::string type = varobj_get_type (var);
+  if (!type.empty ())
+    uiout->field_string ("type", type.c_str ());
 
   thread_id = varobj_get_thread_id (var);
   if (thread_id > 0)
-    ui_out_field_int (uiout, "thread-id", thread_id);
+    uiout->field_int ("thread-id", thread_id);
 
   if (varobj_get_frozen (var))
-    ui_out_field_int (uiout, "frozen", 1);
+    uiout->field_int ("frozen", 1);
 
-  display_hint = varobj_get_display_hint (var);
+  gdb::unique_xmalloc_ptr<char> display_hint = varobj_get_display_hint (var);
   if (display_hint)
-    {
-      ui_out_field_string (uiout, "displayhint", display_hint);
-      xfree (display_hint);
-    }
+    uiout->field_string ("displayhint", display_hint.get ());
 
   if (varobj_is_dynamic_p (var))
-    ui_out_field_int (uiout, "dynamic", 1);
+    uiout->field_int ("dynamic", 1);
 }
 
 /* VAROBJ operations */
@@ -154,7 +144,7 @@ mi_cmd_var_create (char *command, char *
 
   print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
 
-  ui_out_field_int (uiout, "has_more", varobj_has_more (var, 0));
+  uiout->field_int ("has_more", varobj_has_more (var, 0));
 
   do_cleanups (old_cleanups);
 }
@@ -205,9 +195,9 @@ mi_cmd_var_delete (char *command, char *
 
   var = varobj_get_handle (name);
 
-  numdel = varobj_delete (var, NULL, children_only_p);
+  numdel = varobj_delete (var, children_only_p);
 
-  ui_out_field_int (uiout, "ndeleted", numdel);
+  uiout->field_int ("ndeleted", numdel);
 
   do_cleanups (old_cleanups);
 }
@@ -233,10 +223,12 @@ mi_parse_format (const char *arg)
 	return FORMAT_HEXADECIMAL;
       else if (strncmp (arg, "octal", len) == 0)
 	return FORMAT_OCTAL;
+      else if (strncmp (arg, "zero-hexadecimal", len) == 0)
+	return FORMAT_ZHEXADECIMAL;
     }
 
   error (_("Must specify the format as: \"natural\", "
-	   "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
+	   "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or \"zero-hexadecimal\""));
 }
 
 void
@@ -244,7 +236,6 @@ mi_cmd_var_set_format (char *command, ch
 {
   enum varobj_display_formats format;
   struct varobj *var;
-  char *val;
   struct ui_out *uiout = current_uiout;
 
   if (argc != 2)
@@ -259,12 +250,11 @@ mi_cmd_var_set_format (char *command, ch
   varobj_set_display_format (var, format);
 
   /* Report the new current format.  */
-  ui_out_field_string (uiout, "format", varobj_format_string[(int) format]);
+  uiout->field_string ("format", varobj_format_string[(int) format]);
  
   /* Report the value in the new format.  */
-  val = varobj_get_value (var);
-  ui_out_field_string (uiout, "value", val);
-  xfree (val);
+  std::string val = varobj_get_value (var);
+  uiout->field_string ("value", val.c_str ());
 }
 
 void
@@ -324,7 +314,7 @@ mi_cmd_var_show_format (char *command, c
   format = varobj_get_display_format (var);
 
   /* Report the current format.  */
-  ui_out_field_string (uiout, "format", varobj_format_string[(int) format]);
+  uiout->field_string ("format", varobj_format_string[(int) format]);
 }
 
 void
@@ -339,7 +329,7 @@ mi_cmd_var_info_num_children (char *comm
   /* Get varobj handle, if a valid var obj name was specified.  */
   var = varobj_get_handle (argv[0]);
 
-  ui_out_field_int (uiout, "numchild", varobj_get_num_children (var));
+  uiout->field_int ("numchild", varobj_get_num_children (var));
 }
 
 /* Return 1 if given the argument PRINT_VALUES we should display
@@ -384,7 +374,6 @@ mi_cmd_var_list_children (char *command,
   enum print_values print_values;
   int ix;
   int from, to;
-  char *display_hint;
 
   if (argc < 1 || argc > 4)
     error (_("-var-list-children: Usage: "
@@ -408,18 +397,15 @@ mi_cmd_var_list_children (char *command,
     }
 
   children = varobj_list_children (var, &from, &to);
-  ui_out_field_int (uiout, "numchild", to - from);
+  uiout->field_int ("numchild", to - from);
   if (argc == 2 || argc == 4)
     print_values = mi_parse_print_values (argv[0]);
   else
     print_values = PRINT_NO_VALUES;
 
-  display_hint = varobj_get_display_hint (var);
+  gdb::unique_xmalloc_ptr<char> display_hint = varobj_get_display_hint (var);
   if (display_hint)
-    {
-      ui_out_field_string (uiout, "displayhint", display_hint);
-      xfree (display_hint);
-    }
+    uiout->field_string ("displayhint", display_hint.get ());
 
   if (from < to)
     {
@@ -444,7 +430,7 @@ mi_cmd_var_list_children (char *command,
       do_cleanups (cleanup_children);
     }
 
-  ui_out_field_int (uiout, "has_more", varobj_has_more (var, to));
+  uiout->field_int ("has_more", varobj_has_more (var, to));
 }
 
 void
@@ -452,18 +438,15 @@ mi_cmd_var_info_type (char *command, cha
 {
   struct ui_out *uiout = current_uiout;
   struct varobj *var;
-  char *type_name;
 
   if (argc != 1)
     error (_("-var-info-type: Usage: NAME."));
 
   /* Get varobj handle, if a valid var obj name was specified.  */
   var = varobj_get_handle (argv[0]);
-  type_name = varobj_get_type (var);
 
-  ui_out_field_string (uiout, "type", type_name);
-
-  xfree (type_name);
+  std::string type_name = varobj_get_type (var);
+  uiout->field_string ("type", type_name.c_str ());
 }
 
 void
@@ -471,7 +454,6 @@ mi_cmd_var_info_path_expression (char *c
 {
   struct ui_out *uiout = current_uiout;
   struct varobj *var;
-  char *path_expr;
 
   if (argc != 1)
     error (_("Usage: NAME."));
@@ -479,9 +461,9 @@ mi_cmd_var_info_path_expression (char *c
   /* Get varobj handle, if a valid var obj name was specified.  */
   var = varobj_get_handle (argv[0]);
   
-  path_expr = varobj_get_path_expr (var);
+  const char *path_expr = varobj_get_path_expr (var);
 
-  ui_out_field_string (uiout, "path_expr", path_expr);
+  uiout->field_string ("path_expr", path_expr);
 }
 
 void
@@ -490,7 +472,6 @@ mi_cmd_var_info_expression (char *comman
   struct ui_out *uiout = current_uiout;
   const struct language_defn *lang;
   struct varobj *var;
-  char *exp;
 
   if (argc != 1)
     error (_("-var-info-expression: Usage: NAME."));
@@ -500,11 +481,10 @@ mi_cmd_var_info_expression (char *comman
 
   lang = varobj_get_language (var);
 
-  ui_out_field_string (uiout, "lang", lang->la_natural_name);
+  uiout->field_string ("lang", lang->la_natural_name);
 
-  exp = varobj_get_expression (var);
-  ui_out_field_string (uiout, "exp", exp);
-  xfree (exp);
+  std::string exp = varobj_get_expression (var);
+  uiout->field_string ("exp", exp.c_str ());
 }
 
 void
@@ -528,7 +508,7 @@ mi_cmd_var_show_attributes (char *comman
   else
     attstr = "noneditable";
 
-  ui_out_field_string (uiout, "attr", attstr);
+  uiout->field_string ("attr", attstr);
 }
 
 void
@@ -586,17 +566,15 @@ mi_cmd_var_evaluate_expression (char *co
    
   if (formatFound)
     {
-      char *val = varobj_get_formatted_value (var, format);
+      std::string val = varobj_get_formatted_value (var, format);
 
-      ui_out_field_string (uiout, "value", val);
-      xfree (val);
+      uiout->field_string ("value", val.c_str ());
     }
   else
     {
-      char *val = varobj_get_value (var);
+      std::string val = varobj_get_value (var);
 
-      ui_out_field_string (uiout, "value", val);
-      xfree (val);
+      uiout->field_string ("value", val.c_str ());
     }
 }
 
@@ -605,8 +583,6 @@ mi_cmd_var_assign (char *command, char *
 {
   struct ui_out *uiout = current_uiout;
   struct varobj *var;
-  char *expression, *val;
-  struct cleanup *cleanup;
 
   if (argc != 2)
     error (_("-var-assign: Usage: NAME EXPRESSION."));
@@ -617,23 +593,19 @@ mi_cmd_var_assign (char *command, char *
   if (!varobj_editable_p (var))
     error (_("-var-assign: Variable object is not editable"));
 
-  expression = xstrdup (argv[1]);
+  const char *expression = argv[1];
 
   /* MI command '-var-assign' may write memory, so suppress memory
      changed notification if it does.  */
-  cleanup
-    = make_cleanup_restore_integer (&mi_suppress_notification.memory);
-  mi_suppress_notification.memory = 1;
+  scoped_restore save_suppress
+    = make_scoped_restore (&mi_suppress_notification.memory, 1);
 
   if (!varobj_set_value (var, expression))
     error (_("-var-assign: Could not assign "
 	     "expression to variable object"));
 
-  val = varobj_get_value (var);
-  ui_out_field_string (uiout, "value", val);
-  xfree (val);
-
-  do_cleanups (cleanup);
+  std::string val = varobj_get_value (var);
+  uiout->field_string ("value", val.c_str ());
 }
 
 /* Type used for parameters passing to mi_cmd_var_update_iter.  */
@@ -649,7 +621,7 @@ struct mi_cmd_var_update
 static void
 mi_cmd_var_update_iter (struct varobj *var, void *data_pointer)
 {
-  struct mi_cmd_var_update *data = data_pointer;
+  struct mi_cmd_var_update *data = (struct mi_cmd_var_update *) data_pointer;
   int thread_id, thread_stopped;
 
   thread_id = varobj_get_thread_id (var);
@@ -660,7 +632,7 @@ mi_cmd_var_update_iter (struct varobj *v
     thread_stopped = 1;
   else
     {
-      struct thread_info *tp = find_thread_id (thread_id);
+      struct thread_info *tp = find_thread_global_id (thread_id);
 
       if (tp)
 	thread_stopped = is_stopped (tp->ptid);
@@ -741,67 +713,61 @@ varobj_update_one (struct varobj *var, e
   
   for (i = 0; VEC_iterate (varobj_update_result, changes, i, r); ++i)
     {
-      char *display_hint;
       int from, to;
       struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
 
       if (mi_version (uiout) > 1)
 	make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-      ui_out_field_string (uiout, "name", varobj_get_objname (r->varobj));
+      uiout->field_string ("name", varobj_get_objname (r->varobj));
 
       switch (r->status)
 	{
 	case VAROBJ_IN_SCOPE:
 	  if (mi_print_value_p (r->varobj, print_values))
 	    {
-	      char *val = varobj_get_value (r->varobj);
+	      std::string val = varobj_get_value (r->varobj);
 
-	      ui_out_field_string (uiout, "value", val);
-	      xfree (val);
+	      uiout->field_string ("value", val.c_str ());
 	    }
-	  ui_out_field_string (uiout, "in_scope", "true");
+	  uiout->field_string ("in_scope", "true");
 	  break;
         case VAROBJ_NOT_IN_SCOPE:
-          ui_out_field_string (uiout, "in_scope", "false");
+          uiout->field_string ("in_scope", "false");
 	  break;
         case VAROBJ_INVALID:
-          ui_out_field_string (uiout, "in_scope", "invalid");
+          uiout->field_string ("in_scope", "invalid");
  	  break;
 	}
 
       if (r->status != VAROBJ_INVALID)
 	{
 	  if (r->type_changed)
-	    ui_out_field_string (uiout, "type_changed", "true");
+	    uiout->field_string ("type_changed", "true");
 	  else
-	    ui_out_field_string (uiout, "type_changed", "false");
+	    uiout->field_string ("type_changed", "false");
 	}
 
       if (r->type_changed)
 	{
-	  char *type_name = varobj_get_type (r->varobj);
+	  std::string type_name = varobj_get_type (r->varobj);
 
-	  ui_out_field_string (uiout, "new_type", type_name);
-	  xfree (type_name);
+	  uiout->field_string ("new_type", type_name.c_str ());
 	}
 
       if (r->type_changed || r->children_changed)
-	ui_out_field_int (uiout, "new_num_children", 
+	uiout->field_int ("new_num_children",
 			  varobj_get_num_children (r->varobj));
 
-      display_hint = varobj_get_display_hint (r->varobj);
+      gdb::unique_xmalloc_ptr<char> display_hint
+	= varobj_get_display_hint (r->varobj);
       if (display_hint)
-	{
-	  ui_out_field_string (uiout, "displayhint", display_hint);
-	  xfree (display_hint);
-	}
+	uiout->field_string ("displayhint", display_hint.get ());
 
       if (varobj_is_dynamic_p (r->varobj))
-	ui_out_field_int (uiout, "dynamic", 1);
+	uiout->field_int ("dynamic", 1);
 
       varobj_get_child_range (r->varobj, &from, &to);
-      ui_out_field_int (uiout, "has_more",
-			varobj_has_more (r->varobj, to));
+      uiout->field_int ("has_more", varobj_has_more (r->varobj, to));
 
       if (r->newobj)
 	{
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-common.c ./gdb/mi/mi-common.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-common.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-common.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface for common GDB/MI data
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-common.h ./gdb/mi/mi-common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-common.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-common.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface for common GDB/MI data
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,10 @@
 #ifndef MI_COMMON_H
 #define MI_COMMON_H
 
+#include "interps.h"
+
+struct mi_console_file;
+
 /* Represents the reason why GDB is sending an asynchronous command to
    the front end.  NOTE: When modifing this, don't forget to update
    gdb.texinfo!  */
@@ -48,25 +52,42 @@ enum async_reply_reason
 
 const char *async_reason_lookup (enum async_reply_reason reason);
 
-struct mi_interp
+/* An MI interpreter.  */
+
+class mi_interp final : public interp
 {
+public:
+  mi_interp (const char *name)
+    : interp (name)
+  {}
+
+  void init (bool top_level) override;
+  void resume () override;
+  void suspend () override;
+  gdb_exception exec (const char *command_str) override;
+  ui_out *interp_ui_out () override;
+  void set_logging (ui_file_up logfile, bool logging_redirect) override;
+  void pre_command_loop () override;
+
   /* MI's output channels */
-  struct ui_file *out;
-  struct ui_file *err;
-  struct ui_file *log;
-  struct ui_file *targ;
-  struct ui_file *event_channel;
+  mi_console_file *out;
+  mi_console_file *err;
+  mi_console_file *log;
+  mi_console_file *targ;
+  mi_console_file *event_channel;
+
+  /* Raw console output.  */
+  struct ui_file *raw_stdout;
+
+  /* Save the original value of raw_stdout here when logging, so we
+     can restore correctly when done.  */
+  struct ui_file *saved_raw_stdout;
 
   /* MI's builder.  */
   struct ui_out *mi_uiout;
 
   /* MI's CLI builder (wraps OUT).  */
   struct ui_out *cli_uiout;
-
-  /* This is the interpreter for the mi... */
-  struct interp *mi2_interp;
-  struct interp *mi1_interp;
-  struct interp *mi_interp;
 };
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-console.c ./gdb/mi/mi-console.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-console.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-console.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Console code.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -26,115 +26,56 @@
 
 #include "defs.h"
 #include "mi-console.h"
-static ui_file_fputs_ftype mi_console_file_fputs;
-static ui_file_flush_ftype mi_console_file_flush;
-static ui_file_delete_ftype mi_console_file_delete;
-
-struct mi_console_file
-  {
-    int *magic;
-    struct ui_file *raw;
-    struct ui_file *buffer;
-    const char *prefix;
-    char quote;
-  };
-
-/* Use the address of this otherwise-unused global as a magic number
-   identifying this class of ui_file objects.  */
-static int mi_console_file_magic;
 
 /* Create a console that wraps the given output stream RAW with the
    string PREFIX and quoting it with QUOTE.  */
 
-struct ui_file *
-mi_console_file_new (struct ui_file *raw, const char *prefix, char quote)
-{
-  struct ui_file *ui_file = ui_file_new ();
-  struct mi_console_file *mi_console = XNEW (struct mi_console_file);
-
-  mi_console->magic = &mi_console_file_magic;
-  mi_console->raw = raw;
-  mi_console->buffer = mem_fileopen ();
-  mi_console->prefix = prefix;
-  mi_console->quote = quote;
-  set_ui_file_fputs (ui_file, mi_console_file_fputs);
-  set_ui_file_flush (ui_file, mi_console_file_flush);
-  set_ui_file_data (ui_file, mi_console, mi_console_file_delete);
-
-  return ui_file;
-}
-
-static void
-mi_console_file_delete (struct ui_file *file)
-{
-  struct mi_console_file *mi_console = ui_file_data (file);
+mi_console_file::mi_console_file (ui_file *raw, const char *prefix, char quote)
+  : m_raw (raw),
+    m_prefix (prefix),
+    m_quote (quote)
+{}
 
-  if (mi_console->magic != &mi_console_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mi_console_file_delete: bad magic number"));
-
-  xfree (mi_console);
-}
-
-static void
-mi_console_file_fputs (const char *buf, struct ui_file *file)
+void
+mi_console_file::write (const char *buf, long length_buf)
 {
-  struct mi_console_file *mi_console = ui_file_data (file);
-
-  if (mi_console->magic != &mi_console_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    "mi_console_file_fputs: bad magic number");
-
+  size_t prev_size = m_buffer.size ();
   /* Append the text to our internal buffer.  */
-  fputs_unfiltered (buf, mi_console->buffer);
-  /* Flush when an embedded newline is present anywhere in the buffer.  */
-  if (strchr (buf, '\n') != NULL)
-    gdb_flush (file);
+  m_buffer.write (buf, length_buf);
+  /* Flush when an embedded newline is present anywhere in the
+     buffer.  */
+  if (strchr (m_buffer.c_str () + prev_size, '\n') != NULL)
+    this->flush ();
 }
 
-/* Transform a byte sequence into a console output packet.  */
-
-static void
-mi_console_raw_packet (void *data, const char *buf, long length_buf)
+void
+mi_console_file::flush ()
 {
-  struct mi_console_file *mi_console = data;
-
-  if (mi_console->magic != &mi_console_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mi_console_raw_packet: bad magic number"));
+  const std::string &str = m_buffer.string ();
 
-  if (length_buf > 0)
+  /* Transform a byte sequence into a console output packet.  */
+  if (!str.empty ())
     {
-      fputs_unfiltered (mi_console->prefix, mi_console->raw);
-      if (mi_console->quote)
+      size_t length_buf = str.size ();
+      const char *buf = str.data ();
+
+      fputs_unfiltered (m_prefix, m_raw);
+      if (m_quote)
 	{
-	  fputc_unfiltered (mi_console->quote, mi_console->raw);
-	  fputstrn_unfiltered (buf, length_buf,
-			       mi_console->quote, mi_console->raw);
-	  fputc_unfiltered (mi_console->quote, mi_console->raw);
-	  fputc_unfiltered ('\n', mi_console->raw);
+	  fputc_unfiltered (m_quote, m_raw);
+	  fputstrn_unfiltered (buf, length_buf, m_quote, m_raw);
+	  fputc_unfiltered (m_quote, m_raw);
+	  fputc_unfiltered ('\n', m_raw);
 	}
       else
 	{
-	  fputstrn_unfiltered (buf, length_buf, 0, mi_console->raw);
-	  fputc_unfiltered ('\n', mi_console->raw);
+	  fputstrn_unfiltered (buf, length_buf, 0, m_raw);
+	  fputc_unfiltered ('\n', m_raw);
 	}
-      gdb_flush (mi_console->raw);
+      gdb_flush (m_raw);
     }
-}
-
-static void
-mi_console_file_flush (struct ui_file *file)
-{
-  struct mi_console_file *mi_console = ui_file_data (file);
-
-  if (mi_console->magic != &mi_console_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mi_console_file_flush: bad magic number"));
-
-  ui_file_put (mi_console->buffer, mi_console_raw_packet, mi_console);
-  ui_file_rewind (mi_console->buffer);
 
+  m_buffer.clear ();
 }
 
 /* Change the underlying stream of the console directly; this is
@@ -142,13 +83,7 @@ mi_console_file_flush (struct ui_file *f
    logging enable/disable.  */
 
 void
-mi_console_set_raw (struct ui_file *file, struct ui_file *raw)
+mi_console_file::set_raw (ui_file *raw)
 {
-  struct mi_console_file *mi_console = ui_file_data (file);
-
-  if (mi_console->magic != &mi_console_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mi_console_file_set_raw: bad magic number"));
-
-  mi_console->raw = raw;
+  m_raw = raw;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-console.h ./gdb/mi/mi-console.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-console.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-console.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - MI Console.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -20,11 +20,37 @@
 #ifndef MI_CONSOLE_H
 #define MI_CONSOLE_H
 
-extern struct ui_file *mi_console_file_new (struct ui_file *raw,
-					    const char *prefix,
-					    char quote);
+/* An output stream for MI.  Wraps a given output stream with a prefix
+   and handles quoting.  This stream is locally buffered.  */
 
-extern void mi_console_set_raw (struct ui_file *console,
-				struct ui_file *raw);
+class mi_console_file : public ui_file
+{
+public:
+  /* Create a console that wraps the given output stream RAW with the
+     string PREFIX and quoting it with QUOTE.  */
+  mi_console_file (ui_file *raw, const char *prefix, char quote);
+
+  /* MI-specific API.  */
+  void set_raw (ui_file *raw);
+
+  /* ui_file-specific methods.  */
+
+  void flush () override;
+
+  void write (const char *buf, long length_buf) override;
+
+private:
+  /* The wrapped raw output stream.  */
+  ui_file *m_raw;
+
+  /* The local buffer.  */
+  string_file m_buffer;
+
+  /* The prefix.  */
+  const char *m_prefix;
+
+  /* The quote char.  */
+  char m_quote;
+};
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-getopt.c ./gdb/mi/mi-getopt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-getopt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-getopt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - MI Option Parser.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-getopt.h ./gdb/mi/mi-getopt.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-getopt.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-getopt.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Option Parser.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-interp.c ./gdb/mi/mi-interp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-interp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-interp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,13 +37,14 @@
 #include "objfiles.h"
 #include "tracepoint.h"
 #include "cli-out.h"
+#include "thread-fsm.h"
+#include "cli/cli-interp.h"
 
 /* These are the interpreter setup, etc. functions for the MI
    interpreter.  */
 
 static void mi_execute_command_wrapper (const char *cmd);
 static void mi_execute_command_input_handler (char *cmd);
-static void mi_command_loop (void *data);
 
 /* These are hooks that we put in place while doing interpreter_exec
    so we can report interesting things that happened "behind the MI's
@@ -64,7 +65,8 @@ static void mi_on_no_history (void);
 
 static void mi_new_thread (struct thread_info *t);
 static void mi_thread_exit (struct thread_info *t, int silent);
-static void mi_record_changed (struct inferior*, int);
+static void mi_record_changed (struct inferior*, int, const char *,
+			       const char *);
 static void mi_inferior_added (struct inferior *inf);
 static void mi_inferior_appeared (struct inferior *inf);
 static void mi_inferior_exit (struct inferior *inf);
@@ -87,29 +89,50 @@ static void mi_on_sync_execution_done (v
 
 static int report_initial_inferior (struct inferior *inf, void *closure);
 
-static void *
-mi_interpreter_init (struct interp *interp, int top_level)
+/* Display the MI prompt.  */
+
+static void
+display_mi_prompt (struct mi_interp *mi)
+{
+  struct ui *ui = current_ui;
+
+  fputs_unfiltered ("(gdb) \n", mi->raw_stdout);
+  gdb_flush (mi->raw_stdout);
+  ui->prompt_state = PROMPTED;
+}
+
+/* Returns the INTERP's data cast as mi_interp if INTERP is an MI, and
+   returns NULL otherwise.  */
+
+static struct mi_interp *
+as_mi_interp (struct interp *interp)
+{
+  if (interp_ui_out (interp)->is_mi_like_p ())
+    return (struct mi_interp *) interp;
+  return NULL;
+}
+
+void
+mi_interp::init (bool top_level)
 {
-  struct mi_interp *mi = XNEW (struct mi_interp);
+  mi_interp *mi = this;
   const char *name;
   int mi_version;
 
-  /* Assign the output channel created at startup to its own global,
-     so that we can create a console channel that encapsulates and
-     prefixes all gdb_output-type bits coming from the rest of the
-     debugger.  */
-
-  raw_stdout = gdb_stdout;
+  /* Store the current output channel, so that we can create a console
+     channel that encapsulates and prefixes all gdb_output-type bits
+     coming from the rest of the debugger.  */
+  mi->raw_stdout = gdb_stdout;
 
   /* Create MI console channels, each with a different prefix so they
      can be distinguished.  */
-  mi->out = mi_console_file_new (raw_stdout, "~", '"');
-  mi->err = mi_console_file_new (raw_stdout, "&", '"');
+  mi->out = new mi_console_file (mi->raw_stdout, "~", '"');
+  mi->err = new mi_console_file (mi->raw_stdout, "&", '"');
   mi->log = mi->err;
-  mi->targ = mi_console_file_new (raw_stdout, "@", '"');
-  mi->event_channel = mi_console_file_new (raw_stdout, "=", 0);
+  mi->targ = new mi_console_file (mi->raw_stdout, "@", '"');
+  mi->event_channel = new mi_console_file (mi->raw_stdout, "=", 0);
 
-  name = interp_name (interp);
+  name = interp_name (this);
   /* INTERP_MI selects the most recent released version.  "mi2" was
      released as part of GDB 6.0.  */
   if (strcmp (name, INTERP_MI) == 0)
@@ -126,70 +149,28 @@ mi_interpreter_init (struct interp *inte
   mi->mi_uiout = mi_out_new (mi_version);
   mi->cli_uiout = cli_out_new (mi->out);
 
-  /* There are installed even if MI is not the top level interpreter.
-     The callbacks themselves decide whether to be skipped.  */
-  observer_attach_signal_received (mi_on_signal_received);
-  observer_attach_end_stepping_range (mi_on_end_stepping_range);
-  observer_attach_signal_exited (mi_on_signal_exited);
-  observer_attach_exited (mi_on_exited);
-  observer_attach_no_history (mi_on_no_history);
-
   if (top_level)
     {
-      observer_attach_new_thread (mi_new_thread);
-      observer_attach_thread_exit (mi_thread_exit);
-      observer_attach_inferior_added (mi_inferior_added);
-      observer_attach_inferior_appeared (mi_inferior_appeared);
-      observer_attach_inferior_exit (mi_inferior_exit);
-      observer_attach_inferior_removed (mi_inferior_removed);
-      observer_attach_record_changed (mi_record_changed);
-      observer_attach_normal_stop (mi_on_normal_stop);
-      observer_attach_target_resumed (mi_on_resume);
-      observer_attach_solib_loaded (mi_solib_loaded);
-      observer_attach_solib_unloaded (mi_solib_unloaded);
-      observer_attach_about_to_proceed (mi_about_to_proceed);
-      observer_attach_traceframe_changed (mi_traceframe_changed);
-      observer_attach_tsv_created (mi_tsv_created);
-      observer_attach_tsv_deleted (mi_tsv_deleted);
-      observer_attach_tsv_modified (mi_tsv_modified);
-      observer_attach_breakpoint_created (mi_breakpoint_created);
-      observer_attach_breakpoint_deleted (mi_breakpoint_deleted);
-      observer_attach_breakpoint_modified (mi_breakpoint_modified);
-      observer_attach_command_param_changed (mi_command_param_changed);
-      observer_attach_memory_changed (mi_memory_changed);
-      observer_attach_sync_execution_done (mi_on_sync_execution_done);
-
       /* The initial inferior is created before this function is
 	 called, so we need to report it explicitly.  Use iteration in
 	 case future version of GDB creates more than one inferior
 	 up-front.  */
       iterate_over_inferiors (report_initial_inferior, mi);
     }
-
-  return mi;
 }
 
-static int
-mi_interpreter_resume (void *data)
+void
+mi_interp::resume ()
 {
-  struct mi_interp *mi = data;
+  struct mi_interp *mi = this;
+  struct ui *ui = current_ui;
 
   /* As per hack note in mi_interpreter_init, swap in the output
      channels... */
-  gdb_setup_readline ();
+  gdb_setup_readline (0);
 
-  /* These overwrite some of the initialization done in
-     _intialize_event_loop.  */
-  call_readline = gdb_readline2;
-  input_handler = mi_execute_command_input_handler;
-  async_command_editing_p = 0;
-  /* FIXME: This is a total hack for now.  PB's use of the MI
-     implicitly relies on a bug in the async support which allows
-     asynchronous commands to leak through the commmand loop.  The bug
-     involves (but is not limited to) the fact that sync_execution was
-     erroneously initialized to 0.  Duplicate by initializing it thus
-     here...  */
-  sync_execution = 0;
+  ui->call_readline = gdb_readline_no_editing_callback;
+  ui->input_handler = mi_execute_command_input_handler;
 
   gdb_stdout = mi->out;
   /* Route error and log output through the MI.  */
@@ -205,19 +186,16 @@ mi_interpreter_resume (void *data)
   clear_interpreter_hooks ();
 
   deprecated_show_load_progress = mi_load_progress;
-
-  return 1;
 }
 
-static int
-mi_interpreter_suspend (void *data)
+void
+mi_interp::suspend ()
 {
   gdb_disable_readline ();
-  return 1;
 }
 
-static struct gdb_exception
-mi_interpreter_exec (void *data, const char *command)
+gdb_exception
+mi_interp::exec (const char *command)
 {
   mi_execute_command_wrapper (command);
   return exception_none;
@@ -235,7 +213,7 @@ mi_cmd_interpreter_exec (char *command, 
     error (_("-interpreter-exec: "
 	     "Usage: -interpreter-exec interp command"));
 
-  interp_to_use = interp_lookup (argv[0]);
+  interp_to_use = interp_lookup (current_ui, argv[0]);
   if (interp_to_use == NULL)
     error (_("-interpreter-exec: could not find interpreter \"%s\""),
 	   argv[0]);
@@ -301,7 +279,9 @@ mi_interp_query_hook (const char *ctlstr
 static void
 mi_execute_command_wrapper (const char *cmd)
 {
-  mi_execute_command (cmd, stdin == instream);
+  struct ui *ui = current_ui;
+
+  mi_execute_command (cmd, ui->instream == ui->stdin_stream);
 }
 
 /* Observer for the synchronous_command_done notification.  */
@@ -309,21 +289,16 @@ mi_execute_command_wrapper (const char *
 static void
 mi_on_sync_execution_done (void)
 {
-  /* MI generally prints a prompt after a command, indicating it's
-     ready for further input.  However, due to an historical wart, if
-     MI async, and a (CLI) synchronous command was issued, then we
-     will print the prompt right after printing "^running", even if we
-     cannot actually accept any input until the target stops.  See
-     mi_on_resume.  However, if the target is async but MI is sync,
-     then we need to output the MI prompt now, to replicate gdb's
-     behavior when neither the target nor MI are async.  (Note this
-     observer is only called by the asynchronous target event handling
-     code.)  */
+  struct ui *ui = current_ui;
+  struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+
+  if (mi == NULL)
+    return;
+
+  /* If MI is sync, then output the MI prompt now, indicating we're
+     ready for further input.  */
   if (!mi_async_p ())
-    {
-      fputs_unfiltered ("(gdb) \n", raw_stdout);
-      gdb_flush (raw_stdout);
-    }
+    display_mi_prompt (mi);
 }
 
 /* mi_execute_command_wrapper wrapper suitable for INPUT_HANDLER.  */
@@ -331,185 +306,254 @@ mi_on_sync_execution_done (void)
 static void
 mi_execute_command_input_handler (char *cmd)
 {
-  mi_execute_command_wrapper (cmd);
+  struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+  struct ui *ui = current_ui;
 
-  /* MI generally prints a prompt after a command, indicating it's
-     ready for further input.  However, due to an historical wart, if
-     MI is async, and a synchronous command was issued, then we will
-     print the prompt right after printing "^running", even if we
-     cannot actually accept any input until the target stops.  See
-     mi_on_resume.
+  ui->prompt_state = PROMPT_NEEDED;
 
-     If MI is not async, then we print the prompt when the command
-     finishes.  If the target is sync, that means output the prompt
-     now, as in that case executing a command doesn't return until the
-     command is done.  However, if the target is async, we go back to
-     the event loop and output the prompt in the
-     'synchronous_command_done' observer.  */
-  if (!target_is_async_p () || !sync_execution)
-    {
-      fputs_unfiltered ("(gdb) \n", raw_stdout);
-      gdb_flush (raw_stdout);
-    }
+  mi_execute_command_wrapper (cmd);
+
+  /* Print a prompt, indicating we're ready for further input, unless
+     we just started a synchronous command.  In that case, we're about
+     to go back to the event loop and will output the prompt in the
+     'synchronous_command_done' observer when the target next
+     stops.  */
+  if (ui->prompt_state == PROMPT_NEEDED)
+    display_mi_prompt (mi);
 }
 
-static void
-mi_command_loop (void *data)
+void
+mi_interp::pre_command_loop ()
 {
+  struct mi_interp *mi = this;
+
   /* Turn off 8 bit strings in quoted output.  Any character with the
      high bit set is printed using C's octal format.  */
   sevenbit_strings = 1;
 
   /* Tell the world that we're alive.  */
-  fputs_unfiltered ("(gdb) \n", raw_stdout);
-  gdb_flush (raw_stdout);
-
-  start_event_loop ();
+  display_mi_prompt (mi);
 }
 
 static void
 mi_new_thread (struct thread_info *t)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
   struct inferior *inf = find_inferior_ptid (t->ptid);
 
   gdb_assert (inf);
 
-  fprintf_unfiltered (mi->event_channel, 
-		      "thread-created,id=\"%d\",group-id=\"i%d\"",
-		      t->num, inf->num);
-  gdb_flush (mi->event_channel);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
+
+      if (mi == NULL)
+	continue;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel,
+			  "thread-created,id=\"%d\",group-id=\"i%d\"",
+			  t->global_num, inf->num);
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_thread_exit (struct thread_info *t, int silent)
 {
-  struct mi_interp *mi;
-  struct inferior *inf;
-  struct cleanup *old_chain;
-
   if (silent)
     return;
 
-  inf = find_inferior_ptid (t->ptid);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  mi = top_level_interpreter_data ();
-  old_chain = make_cleanup_restore_target_terminal ();
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel, 
-		      "thread-exited,id=\"%d\",group-id=\"i%d\"",
-		      t->num, inf->num);
-  gdb_flush (mi->event_channel);
+      if (mi == NULL)
+	continue;
 
-  do_cleanups (old_chain);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+      fprintf_unfiltered (mi->event_channel,
+			  "thread-exited,id=\"%d\",group-id=\"i%d\"",
+			  t->global_num, t->inf->num);
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification on changing the state of record.  */
 
 static void
-mi_record_changed (struct inferior *inferior, int started)
+mi_record_changed (struct inferior *inferior, int started, const char *method,
+		   const char *format)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  fprintf_unfiltered (mi->event_channel,  "record-%s,thread-group=\"i%d\"",
-		      started ? "started" : "stopped", inferior->num);
+      if (mi == NULL)
+	continue;
 
-  gdb_flush (mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      if (started)
+	{
+	  if (format != NULL)
+	    {
+	      fprintf_unfiltered (mi->event_channel,
+				  "record-started,thread-group=\"i%d\","
+				  "method=\"%s\",format=\"%s\"",
+				  inferior->num, method, format);
+	    }
+	  else
+	    {
+	      fprintf_unfiltered (mi->event_channel,
+				  "record-started,thread-group=\"i%d\","
+				  "method=\"%s\"",
+				  inferior->num, method);
+	    }
+	}
+      else
+	{
+	  fprintf_unfiltered (mi->event_channel,
+			      "record-stopped,thread-group=\"i%d\"",
+			      inferior->num);
+	}
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_inferior_added (struct inferior *inf)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *interp;
+      struct mi_interp *mi;
+      struct cleanup *old_chain;
+
+      /* We'll be called once for the initial inferior, before the top
+	 level interpreter is set.  */
+      interp = top_level_interpreter ();
+      if (interp == NULL)
+	continue;
+
+      mi = as_mi_interp (interp);
+      if (mi == NULL)
+	continue;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel,
+			  "thread-group-added,id=\"i%d\"",
+			  inf->num);
+      gdb_flush (mi->event_channel);
 
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel,
-		      "thread-group-added,id=\"i%d\"",
-		      inf->num);
-  gdb_flush (mi->event_channel);
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_inferior_appeared (struct inferior *inf)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel,
-		      "thread-group-started,id=\"i%d\",pid=\"%d\"",
-		      inf->num, inf->pid);
-  gdb_flush (mi->event_channel);
+      if (mi == NULL)
+	continue;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel,
+			  "thread-group-started,id=\"i%d\",pid=\"%d\"",
+			  inf->num, inf->pid);
+      gdb_flush (mi->event_channel);
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_inferior_exit (struct inferior *inf)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
-  if (inf->has_exit_code)
-    fprintf_unfiltered (mi->event_channel,
-			"thread-group-exited,id=\"i%d\",exit-code=\"%s\"",
-			inf->num, int_string (inf->exit_code, 8, 0, 0, 1));
-  else
-    fprintf_unfiltered (mi->event_channel,
-			"thread-group-exited,id=\"i%d\"", inf->num);
+      if (mi == NULL)
+	continue;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  gdb_flush (mi->event_channel);  
+      if (inf->has_exit_code)
+	fprintf_unfiltered (mi->event_channel,
+			    "thread-group-exited,id=\"i%d\",exit-code=\"%s\"",
+			    inf->num, int_string (inf->exit_code, 8, 0, 0, 1));
+      else
+	fprintf_unfiltered (mi->event_channel,
+			    "thread-group-exited,id=\"i%d\"", inf->num);
+
+      gdb_flush (mi->event_channel);
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_inferior_removed (struct inferior *inf)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel,
-		      "thread-group-removed,id=\"i%d\"",
-		      inf->num);
-  gdb_flush (mi->event_channel);
-}
+      if (mi == NULL)
+	continue;
 
-/* Cleanup that restores a previous current uiout.  */
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-static void
-restore_current_uiout_cleanup (void *arg)
-{
-  struct ui_out *saved_uiout = arg;
+      fprintf_unfiltered (mi->event_channel,
+			  "thread-group-removed,id=\"i%d\"",
+			  inf->num);
+      gdb_flush (mi->event_channel);
 
-  current_uiout = saved_uiout;
+      do_cleanups (old_chain);
+    }
 }
 
 /* Return the MI interpreter, if it is active -- either because it's
    the top-level interpreter or the interpreter executing the current
    command.  Returns NULL if the MI interpreter is not being used.  */
 
-static struct interp *
-find_mi_interpreter (void)
-{
-  struct interp *interp;
-
-  interp = top_level_interpreter ();
-  if (ui_out_is_mi_like_p (interp_ui_out (interp)))
-    return interp;
-
-  interp = command_interp ();
-  if (ui_out_is_mi_like_p (interp_ui_out (interp)))
-    return interp;
-
-  return NULL;
-}
-
-/* Return the MI_INTERP structure of the active MI interpreter.
-   Returns NULL if MI is not active.  */
-
 static struct mi_interp *
-mi_interp_data (void)
+find_mi_interp (void)
 {
-  struct interp *interp = find_mi_interpreter ();
+  struct mi_interp *mi;
+
+  mi = as_mi_interp (top_level_interpreter ());
+  if (mi != NULL)
+    return mi;
+
+  mi = as_mi_interp (command_interp ());
+  if (mi != NULL)
+    return mi;
 
-  if (interp != NULL)
-    return interp_data (interp);
   return NULL;
 }
 
@@ -522,13 +566,16 @@ mi_interp_data (void)
 static void
 mi_on_signal_received (enum gdb_signal siggnal)
 {
-  struct mi_interp *mi = mi_interp_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = find_mi_interp ();
 
-  if (mi == NULL)
-    return;
+      if (mi == NULL)
+	continue;
 
-  print_signal_received_reason (mi->mi_uiout, siggnal);
-  print_signal_received_reason (mi->cli_uiout, siggnal);
+      print_signal_received_reason (mi->mi_uiout, siggnal);
+      print_signal_received_reason (mi->cli_uiout, siggnal);
+    }
 }
 
 /* Observer for the end_stepping_range notification.  */
@@ -536,13 +583,16 @@ mi_on_signal_received (enum gdb_signal s
 static void
 mi_on_end_stepping_range (void)
 {
-  struct mi_interp *mi = mi_interp_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = find_mi_interp ();
 
-  if (mi == NULL)
-    return;
+      if (mi == NULL)
+	continue;
 
-  print_end_stepping_range_reason (mi->mi_uiout);
-  print_end_stepping_range_reason (mi->cli_uiout);
+      print_end_stepping_range_reason (mi->mi_uiout);
+      print_end_stepping_range_reason (mi->cli_uiout);
+    }
 }
 
 /* Observer for the signal_exited notification.  */
@@ -550,13 +600,16 @@ mi_on_end_stepping_range (void)
 static void
 mi_on_signal_exited (enum gdb_signal siggnal)
 {
-  struct mi_interp *mi = mi_interp_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = find_mi_interp ();
 
-  if (mi == NULL)
-    return;
+      if (mi == NULL)
+	continue;
 
-  print_signal_exited_reason (mi->mi_uiout, siggnal);
-  print_signal_exited_reason (mi->cli_uiout, siggnal);
+      print_signal_exited_reason (mi->mi_uiout, siggnal);
+      print_signal_exited_reason (mi->cli_uiout, siggnal);
+    }
 }
 
 /* Observer for the exited notification.  */
@@ -564,13 +617,16 @@ mi_on_signal_exited (enum gdb_signal sig
 static void
 mi_on_exited (int exitstatus)
 {
-  struct mi_interp *mi = mi_interp_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = find_mi_interp ();
 
-  if (mi == NULL)
-    return;
+      if (mi == NULL)
+	continue;
 
-  print_exited_reason (mi->mi_uiout, exitstatus);
-  print_exited_reason (mi->cli_uiout, exitstatus);
+      print_exited_reason (mi->mi_uiout, exitstatus);
+      print_exited_reason (mi->cli_uiout, exitstatus);
+    }
 }
 
 /* Observer for the no_history notification.  */
@@ -578,119 +634,84 @@ mi_on_exited (int exitstatus)
 static void
 mi_on_no_history (void)
 {
-  struct mi_interp *mi = mi_interp_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = find_mi_interp ();
 
-  if (mi == NULL)
-    return;
+      if (mi == NULL)
+	continue;
 
-  print_no_history_reason (mi->mi_uiout);
-  print_no_history_reason (mi->cli_uiout);
+      print_no_history_reason (mi->mi_uiout);
+      print_no_history_reason (mi->cli_uiout);
+    }
 }
 
 static void
-mi_on_normal_stop (struct bpstats *bs, int print_frame)
+mi_on_normal_stop_1 (struct bpstats *bs, int print_frame)
 {
   /* Since this can be called when CLI command is executing,
      using cli interpreter, be sure to use MI uiout for output,
      not the current one.  */
   struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
+  struct mi_interp *mi = (struct mi_interp *) top_level_interpreter ();
 
   if (print_frame)
     {
+      struct thread_info *tp;
       int core;
+      struct interp *console_interp;
 
-      if (current_uiout != mi_uiout)
-	{
-	  /* The normal_stop function has printed frame information
-	     into CLI uiout, or some other non-MI uiout.  There's no
-	     way we can extract proper fields from random uiout
-	     object, so we print the frame again.  In practice, this
-	     can only happen when running a CLI command in MI.  */
-	  struct ui_out *saved_uiout = current_uiout;
-	  struct target_waitstatus last;
-	  ptid_t last_ptid;
-
-	  current_uiout = mi_uiout;
-
-	  get_last_target_status (&last_ptid, &last);
-	  print_stop_event (&last);
+      tp = inferior_thread ();
 
-	  current_uiout = saved_uiout;
-	}
-      /* Otherwise, frame information has already been printed by
-	 normal_stop.  */
-      else
+      if (tp->thread_fsm != NULL
+	  && thread_fsm_finished_p (tp->thread_fsm))
 	{
-	  /* Breakpoint hits should always be mirrored to the console.
-	     Deciding what to mirror to the console wrt to breakpoints
-	     and random stops gets messy real fast.  E.g., say "s"
-	     trips on a breakpoint.  We'd clearly want to mirror the
-	     event to the console in this case.  But what about more
-	     complicated cases like "s&; thread n; s&", and one of
-	     those steps spawning a new thread, and that thread
-	     hitting a breakpoint?  It's impossible in general to
-	     track whether the thread had any relation to the commands
-	     that had been executed.  So we just simplify and always
-	     mirror breakpoints and random events to the console.
-
-	     Also, CLI execution commands (-interpreter-exec console
-	     "next", for example) in async mode have the opposite
-	     issue as described in the "then" branch above --
-	     normal_stop has already printed frame information to MI
-	     uiout, but nothing has printed the same information to
-	     the CLI channel.  We should print the source line to the
-	     console when stepping or other similar commands, iff the
-	     step was started by a console command (but not if it was
-	     started with -exec-step or similar).  */
-	  struct thread_info *tp = inferior_thread ();
-
-	  if ((!tp->control.stop_step
-		  && !tp->control.proceed_to_finish)
-	      || (tp->control.command_interp != NULL
-		  && tp->control.command_interp != top_level_interpreter ()))
-	    {
-	      struct mi_interp *mi = top_level_interpreter_data ();
-	      struct target_waitstatus last;
-	      ptid_t last_ptid;
-	      struct cleanup *old_chain;
-
-	      /* Set the current uiout to CLI uiout temporarily.  */
-	      old_chain = make_cleanup (restore_current_uiout_cleanup,
-					current_uiout);
-	      current_uiout = mi->cli_uiout;
-
-	      get_last_target_status (&last_ptid, &last);
-	      print_stop_event (&last);
+	  enum async_reply_reason reason;
 
-	      do_cleanups (old_chain);
-	    }
+	  reason = thread_fsm_async_reply_reason (tp->thread_fsm);
+	  mi_uiout->field_string ("reason", async_reason_lookup (reason));
 	}
+      print_stop_event (mi_uiout);
+
+      console_interp = interp_lookup (current_ui, INTERP_CONSOLE);
+      if (should_print_stop_to_console (console_interp, tp))
+	print_stop_event (mi->cli_uiout);
 
-      ui_out_field_int (mi_uiout, "thread-id",
-			pid_to_thread_id (inferior_ptid));
+      mi_uiout->field_int ("thread-id", tp->global_num);
       if (non_stop)
 	{
 	  struct cleanup *back_to = make_cleanup_ui_out_list_begin_end 
 	    (mi_uiout, "stopped-threads");
 
-	  ui_out_field_int (mi_uiout, NULL,
-			    pid_to_thread_id (inferior_ptid));
+	  mi_uiout->field_int (NULL, tp->global_num);
 	  do_cleanups (back_to);
 	}
       else
-	ui_out_field_string (mi_uiout, "stopped-threads", "all");
+	mi_uiout->field_string ("stopped-threads", "all");
 
       core = target_core_of_thread (inferior_ptid);
       if (core != -1)
-	ui_out_field_int (mi_uiout, "core", core);
+	mi_uiout->field_int ("core", core);
     }
   
-  fputs_unfiltered ("*stopped", raw_stdout);
-  mi_out_put (mi_uiout, raw_stdout);
+  fputs_unfiltered ("*stopped", mi->raw_stdout);
+  mi_out_put (mi_uiout, mi->raw_stdout);
   mi_out_rewind (mi_uiout);
-  mi_print_timing_maybe ();
-  fputs_unfiltered ("\n", raw_stdout);
-  gdb_flush (raw_stdout);
+  mi_print_timing_maybe (mi->raw_stdout);
+  fputs_unfiltered ("\n", mi->raw_stdout);
+  gdb_flush (mi->raw_stdout);
+}
+
+static void
+mi_on_normal_stop (struct bpstats *bs, int print_frame)
+{
+  SWITCH_THRU_ALL_UIS ()
+    {
+      if (as_mi_interp (top_level_interpreter ()) == NULL)
+	continue;
+
+      mi_on_normal_stop_1 (bs, print_frame);
+    }
 }
 
 static void
@@ -717,6 +738,7 @@ struct mi_suppress_notification mi_suppr
     0,
     0,
     0,
+    0,
   };
 
 /* Emit notification on changing a traceframe.  */
@@ -724,21 +746,31 @@ struct mi_suppress_notification mi_suppr
 static void
 mi_traceframe_changed (int tfnum, int tpnum)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-
   if (mi_suppress_notification.traceframe)
     return;
 
-  target_terminal_ours ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  if (tfnum >= 0)
-    fprintf_unfiltered (mi->event_channel, "traceframe-changed,"
-			"num=\"%d\",tracepoint=\"%d\"\n",
-			tfnum, tpnum);
-  else
-    fprintf_unfiltered (mi->event_channel, "traceframe-changed,end");
+      if (mi == NULL)
+	continue;
 
-  gdb_flush (mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      if (tfnum >= 0)
+	fprintf_unfiltered (mi->event_channel, "traceframe-changed,"
+			    "num=\"%d\",tracepoint=\"%d\"\n",
+			    tfnum, tpnum);
+      else
+	fprintf_unfiltered (mi->event_channel, "traceframe-changed,end");
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification on creating a trace state variable.  */
@@ -746,15 +778,25 @@ mi_traceframe_changed (int tfnum, int tp
 static void
 mi_tsv_created (const struct trace_state_variable *tsv)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
+      if (mi == NULL)
+	continue;
 
-  fprintf_unfiltered (mi->event_channel, "tsv-created,"
-		      "name=\"%s\",initial=\"%s\"\n",
-		      tsv->name, plongest (tsv->initial_value));
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  gdb_flush (mi->event_channel);
+      fprintf_unfiltered (mi->event_channel, "tsv-created,"
+			  "name=\"%s\",initial=\"%s\"\n",
+			  tsv->name, plongest (tsv->initial_value));
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification on deleting a trace state variable.  */
@@ -762,17 +804,27 @@ mi_tsv_created (const struct trace_state
 static void
 mi_tsv_deleted (const struct trace_state_variable *tsv)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
+      if (mi == NULL)
+	continue;
 
-  if (tsv != NULL)
-    fprintf_unfiltered (mi->event_channel, "tsv-deleted,"
-			"name=\"%s\"\n", tsv->name);
-  else
-    fprintf_unfiltered (mi->event_channel, "tsv-deleted\n");
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  gdb_flush (mi->event_channel);
+      if (tsv != NULL)
+	fprintf_unfiltered (mi->event_channel, "tsv-deleted,"
+			    "name=\"%s\"\n", tsv->name);
+      else
+	fprintf_unfiltered (mi->event_channel, "tsv-deleted\n");
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification on modifying a trace state variable.  */
@@ -780,25 +832,37 @@ mi_tsv_deleted (const struct trace_state
 static void
 mi_tsv_modified (const struct trace_state_variable *tsv)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *mi_uiout;
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
+      if (mi == NULL)
+	continue;
 
-  fprintf_unfiltered (mi->event_channel,
-		      "tsv-modified");
+      mi_uiout = interp_ui_out (top_level_interpreter ());
 
-  ui_out_redirect (mi_uiout, mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  ui_out_field_string (mi_uiout, "name", tsv->name);
-  ui_out_field_string (mi_uiout, "initial",
-		       plongest (tsv->initial_value));
-  if (tsv->value_known)
-    ui_out_field_string (mi_uiout, "current", plongest (tsv->value));
+      fprintf_unfiltered (mi->event_channel,
+			  "tsv-modified");
 
-  ui_out_redirect (mi_uiout, NULL);
+      mi_uiout->redirect (mi->event_channel);
 
-  gdb_flush (mi->event_channel);
+      mi_uiout->field_string ("name", tsv->name);
+      mi_uiout->field_string ("initial",
+			   plongest (tsv->initial_value));
+      if (tsv->value_known)
+	mi_uiout->field_string ("current", plongest (tsv->value));
+
+      mi_uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification about a created breakpoint.  */
@@ -806,38 +870,51 @@ mi_tsv_modified (const struct trace_stat
 static void
 mi_breakpoint_created (struct breakpoint *b)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
-
   if (mi_suppress_notification.breakpoint)
     return;
 
   if (b->number <= 0)
     return;
 
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel,
-		      "breakpoint-created");
-  /* We want the output from gdb_breakpoint_query to go to
-     mi->event_channel.  One approach would be to just call
-     gdb_breakpoint_query, and then use mi_out_put to send the current
-     content of mi_outout into mi->event_channel.  However, that will
-     break if anything is output to mi_uiout prior to calling the
-     breakpoint_created notifications.  So, we use
-     ui_out_redirect.  */
-  ui_out_redirect (mi_uiout, mi->event_channel);
-  TRY
-    {
-      gdb_breakpoint_query (mi_uiout, b->number, NULL);
-    }
-  CATCH (e, RETURN_MASK_ERROR)
+  SWITCH_THRU_ALL_UIS ()
     {
-    }
-  END_CATCH
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *mi_uiout;
+      struct cleanup *old_chain;
+
+      if (mi == NULL)
+	continue;
+
+      mi_uiout = interp_ui_out (top_level_interpreter ());
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel,
+			  "breakpoint-created");
+      /* We want the output from gdb_breakpoint_query to go to
+	 mi->event_channel.  One approach would be to just call
+	 gdb_breakpoint_query, and then use mi_out_put to send the current
+	 content of mi_uiout into mi->event_channel.  However, that will
+	 break if anything is output to mi_uiout prior to calling the
+	 breakpoint_created notifications.  So, we use
+	 ui_out_redirect.  */
+      mi_uiout->redirect (mi->event_channel);
+      TRY
+	{
+	  gdb_breakpoint_query (mi_uiout, b->number, NULL);
+	}
+      CATCH (e, RETURN_MASK_ERROR)
+	{
+	}
+      END_CATCH
 
-  ui_out_redirect (mi_uiout, NULL);
+      mi_uiout->redirect (NULL);
 
-  gdb_flush (mi->event_channel);
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification about deleted breakpoint.  */
@@ -845,20 +922,30 @@ mi_breakpoint_created (struct breakpoint
 static void
 mi_breakpoint_deleted (struct breakpoint *b)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-
   if (mi_suppress_notification.breakpoint)
     return;
 
   if (b->number <= 0)
     return;
 
-  target_terminal_ours ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  fprintf_unfiltered (mi->event_channel, "breakpoint-deleted,id=\"%d\"",
-		      b->number);
+      if (mi == NULL)
+	continue;
 
-  gdb_flush (mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel, "breakpoint-deleted,id=\"%d\"",
+			  b->number);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification about modified breakpoint.  */
@@ -866,49 +953,66 @@ mi_breakpoint_deleted (struct breakpoint
 static void
 mi_breakpoint_modified (struct breakpoint *b)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
-
   if (mi_suppress_notification.breakpoint)
     return;
 
   if (b->number <= 0)
     return;
 
-  target_terminal_ours ();
-  fprintf_unfiltered (mi->event_channel,
-		      "breakpoint-modified");
-  /* We want the output from gdb_breakpoint_query to go to
-     mi->event_channel.  One approach would be to just call
-     gdb_breakpoint_query, and then use mi_out_put to send the current
-     content of mi_outout into mi->event_channel.  However, that will
-     break if anything is output to mi_uiout prior to calling the
-     breakpoint_created notifications.  So, we use
-     ui_out_redirect.  */
-  ui_out_redirect (mi_uiout, mi->event_channel);
-  TRY
-    {
-      gdb_breakpoint_query (mi_uiout, b->number, NULL);
-    }
-  CATCH (e, RETURN_MASK_ERROR)
+  SWITCH_THRU_ALL_UIS ()
     {
-    }
-  END_CATCH
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
 
-  ui_out_redirect (mi_uiout, NULL);
+      if (mi == NULL)
+	continue;
 
-  gdb_flush (mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+      fprintf_unfiltered (mi->event_channel,
+			  "breakpoint-modified");
+      /* We want the output from gdb_breakpoint_query to go to
+	 mi->event_channel.  One approach would be to just call
+	 gdb_breakpoint_query, and then use mi_out_put to send the current
+	 content of mi_uiout into mi->event_channel.  However, that will
+	 break if anything is output to mi_uiout prior to calling the
+	 breakpoint_created notifications.  So, we use
+	 ui_out_redirect.  */
+      mi->mi_uiout->redirect (mi->event_channel);
+      TRY
+	{
+	  gdb_breakpoint_query (mi->mi_uiout, b->number, NULL);
+	}
+      CATCH (e, RETURN_MASK_ERROR)
+	{
+	}
+      END_CATCH
+
+      mi->mi_uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 static int
 mi_output_running_pid (struct thread_info *info, void *arg)
 {
-  ptid_t *ptid = arg;
+  ptid_t *ptid = (ptid_t *) arg;
 
-  if (ptid_get_pid (*ptid) == ptid_get_pid (info->ptid))
-    fprintf_unfiltered (raw_stdout,
-			"*running,thread-id=\"%d\"\n",
-			info->num);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+
+      if (mi == NULL)
+	continue;
+
+      if (ptid_get_pid (*ptid) == ptid_get_pid (info->ptid))
+	fprintf_unfiltered (mi->raw_stdout,
+			    "*running,thread-id=\"%d\"\n",
+			    info->global_num);
+    }
 
   return 0;
 }
@@ -918,7 +1022,7 @@ mi_inferior_count (struct inferior *inf,
 {
   if (inf->pid != 0)
     {
-      int *count_p = arg;
+      int *count_p = (int *) arg;
       (*count_p)++;
     }
 
@@ -926,19 +1030,8 @@ mi_inferior_count (struct inferior *inf,
 }
 
 static void
-mi_on_resume (ptid_t ptid)
+mi_on_resume_1 (struct mi_interp *mi, ptid_t ptid)
 {
-  struct thread_info *tp = NULL;
-
-  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
-    tp = inferior_thread ();
-  else
-    tp = find_thread_ptid (ptid);
-
-  /* Suppress output while calling an inferior function.  */
-  if (tp->control.in_infcall)
-    return;
-
   /* To cater for older frontends, emit ^running, but do it only once
      per each command.  We do it here, since at this point we know
      that the target was successfully resumed, and in non-async mode,
@@ -949,12 +1042,12 @@ mi_on_resume (ptid_t ptid)
      In future (MI3), we'll be outputting "^done" here.  */
   if (!running_result_record_printed && mi_proceeded)
     {
-      fprintf_unfiltered (raw_stdout, "%s^running\n",
+      fprintf_unfiltered (mi->raw_stdout, "%s^running\n",
 			  current_token ? current_token : "");
     }
 
   if (ptid_get_pid (ptid) == -1)
-    fprintf_unfiltered (raw_stdout, "*running,thread-id=\"all\"\n");
+    fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"all\"\n");
   else if (ptid_is_pid (ptid))
     {
       int count = 0;
@@ -965,7 +1058,7 @@ mi_on_resume (ptid_t ptid)
       iterate_over_inferiors (mi_inferior_count, &count);
 
       if (count == 1)
-	fprintf_unfiltered (raw_stdout, "*running,thread-id=\"all\"\n");
+	fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"all\"\n");
       else
 	iterate_over_threads (mi_output_running_pid, &ptid);
     }
@@ -974,72 +1067,126 @@ mi_on_resume (ptid_t ptid)
       struct thread_info *ti = find_thread_ptid (ptid);
 
       gdb_assert (ti);
-      fprintf_unfiltered (raw_stdout, "*running,thread-id=\"%d\"\n", ti->num);
+      fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"%d\"\n",
+			  ti->global_num);
     }
 
   if (!running_result_record_printed && mi_proceeded)
     {
       running_result_record_printed = 1;
-      /* This is what gdb used to do historically -- printing prompt even if
-	 it cannot actually accept any input.  This will be surely removed
-	 for MI3, and may be removed even earlier.  SYNC_EXECUTION is
-	 checked here because we only need to emit a prompt if a
-	 synchronous command was issued when the target is async.  */
-      if (!target_is_async_p () || sync_execution)
-	fputs_unfiltered ("(gdb) \n", raw_stdout);
+      /* This is what gdb used to do historically -- printing prompt
+	 even if it cannot actually accept any input.  This will be
+	 surely removed for MI3, and may be removed even earlier.  */
+      if (current_ui->prompt_state == PROMPT_BLOCKED)
+	fputs_unfiltered ("(gdb) \n", mi->raw_stdout);
     }
-  gdb_flush (raw_stdout);
+  gdb_flush (mi->raw_stdout);
 }
 
 static void
-mi_solib_loaded (struct so_list *solib)
+mi_on_resume (ptid_t ptid)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
-
-  target_terminal_ours ();
+  struct thread_info *tp = NULL;
 
-  fprintf_unfiltered (mi->event_channel, "library-loaded");
+  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+    tp = inferior_thread ();
+  else
+    tp = find_thread_ptid (ptid);
 
-  ui_out_redirect (uiout, mi->event_channel);
+  /* Suppress output while calling an inferior function.  */
+  if (tp->control.in_infcall)
+    return;
 
-  ui_out_field_string (uiout, "id", solib->so_original_name);
-  ui_out_field_string (uiout, "target-name", solib->so_original_name);
-  ui_out_field_string (uiout, "host-name", solib->so_name);
-  ui_out_field_int (uiout, "symbols-loaded", solib->symbols_loaded);
-  if (!gdbarch_has_global_solist (target_gdbarch ()))
+  SWITCH_THRU_ALL_UIS ()
     {
-      ui_out_field_fmt (uiout, "thread-group", "i%d", current_inferior ()->num);
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct cleanup *old_chain;
+
+      if (mi == NULL)
+	continue;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      mi_on_resume_1 (mi, ptid);
+
+      do_cleanups (old_chain);
     }
+}
 
-  ui_out_redirect (uiout, NULL);
+static void
+mi_solib_loaded (struct so_list *solib)
+{
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *uiout;
+      struct cleanup *old_chain;
 
-  gdb_flush (mi->event_channel);
+      if (mi == NULL)
+	continue;
+
+      uiout = interp_ui_out (top_level_interpreter ());
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      fprintf_unfiltered (mi->event_channel, "library-loaded");
+
+      uiout->redirect (mi->event_channel);
+
+      uiout->field_string ("id", solib->so_original_name);
+      uiout->field_string ("target-name", solib->so_original_name);
+      uiout->field_string ("host-name", solib->so_name);
+      uiout->field_int ("symbols-loaded", solib->symbols_loaded);
+      if (!gdbarch_has_global_solist (target_gdbarch ()))
+	{
+	  uiout->field_fmt ("thread-group", "i%d", current_inferior ()->num);
+	}
+
+      uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 static void
 mi_solib_unloaded (struct so_list *solib)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *uiout;
+      struct cleanup *old_chain;
 
-  target_terminal_ours ();
+      if (mi == NULL)
+	continue;
 
-  fprintf_unfiltered (mi->event_channel, "library-unloaded");
+      uiout = interp_ui_out (top_level_interpreter ());
 
-  ui_out_redirect (uiout, mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  ui_out_field_string (uiout, "id", solib->so_original_name);
-  ui_out_field_string (uiout, "target-name", solib->so_original_name);
-  ui_out_field_string (uiout, "host-name", solib->so_name);
-  if (!gdbarch_has_global_solist (target_gdbarch ()))
-    {
-      ui_out_field_fmt (uiout, "thread-group", "i%d", current_inferior ()->num);
-    }
+      fprintf_unfiltered (mi->event_channel, "library-unloaded");
 
-  ui_out_redirect (uiout, NULL);
+      uiout->redirect (mi->event_channel);
 
-  gdb_flush (mi->event_channel);
+      uiout->field_string ("id", solib->so_original_name);
+      uiout->field_string ("target-name", solib->so_original_name);
+      uiout->field_string ("host-name", solib->so_name);
+      if (!gdbarch_has_global_solist (target_gdbarch ()))
+	{
+	  uiout->field_fmt ("thread-group", "i%d", current_inferior ()->num);
+	}
+
+      uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification about the command parameter change.  */
@@ -1047,25 +1194,36 @@ mi_solib_unloaded (struct so_list *solib
 static void
 mi_command_param_changed (const char *param, const char *value)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
-
   if (mi_suppress_notification.cmd_param_changed)
     return;
 
-  target_terminal_ours ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *mi_uiout;
+      struct cleanup *old_chain;
 
-  fprintf_unfiltered (mi->event_channel,
-		      "cmd-param-changed");
+      if (mi == NULL)
+	continue;
 
-  ui_out_redirect (mi_uiout, mi->event_channel);
+      mi_uiout = interp_ui_out (top_level_interpreter ());
 
-  ui_out_field_string (mi_uiout, "param", param);
-  ui_out_field_string (mi_uiout, "value", value);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  ui_out_redirect (mi_uiout, NULL);
+      fprintf_unfiltered (mi->event_channel, "cmd-param-changed");
 
-  gdb_flush (mi->event_channel);
+      mi_uiout->redirect (mi->event_channel);
+
+      mi_uiout->field_string ("param", param);
+      mi_uiout->field_string ("value", value);
+
+      mi_uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
+    }
 }
 
 /* Emit notification about the target memory change.  */
@@ -1074,112 +1232,173 @@ static void
 mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr,
 		   ssize_t len, const bfd_byte *myaddr)
 {
-  struct mi_interp *mi = top_level_interpreter_data ();
-  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
-  struct obj_section *sec;
-
   if (mi_suppress_notification.memory)
     return;
 
-  target_terminal_ours ();
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *mi_uiout;
+      struct obj_section *sec;
+      struct cleanup *old_chain;
+
+      if (mi == NULL)
+	continue;
 
-  fprintf_unfiltered (mi->event_channel,
-		      "memory-changed");
+      mi_uiout = interp_ui_out (top_level_interpreter ());
 
-  ui_out_redirect (mi_uiout, mi->event_channel);
+      old_chain = make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
 
-  ui_out_field_fmt (mi_uiout, "thread-group", "i%d", inferior->num);
-  ui_out_field_core_addr (mi_uiout, "addr", target_gdbarch (), memaddr);
-  ui_out_field_fmt (mi_uiout, "len", "%s", hex_string (len));
+      fprintf_unfiltered (mi->event_channel, "memory-changed");
 
-  /* Append 'type=code' into notification if MEMADDR falls in the range of
-     sections contain code.  */
-  sec = find_pc_section (memaddr);
-  if (sec != NULL && sec->objfile != NULL)
-    {
-      flagword flags = bfd_get_section_flags (sec->objfile->obfd,
-					      sec->the_bfd_section);
+      mi_uiout->redirect (mi->event_channel);
+
+      mi_uiout->field_fmt ("thread-group", "i%d", inferior->num);
+      mi_uiout->field_core_addr ("addr", target_gdbarch (), memaddr);
+      mi_uiout->field_fmt ("len", "%s", hex_string (len));
+
+      /* Append 'type=code' into notification if MEMADDR falls in the range of
+	 sections contain code.  */
+      sec = find_pc_section (memaddr);
+      if (sec != NULL && sec->objfile != NULL)
+	{
+	  flagword flags = bfd_get_section_flags (sec->objfile->obfd,
+						  sec->the_bfd_section);
+
+	  if (flags & SEC_CODE)
+	    mi_uiout->field_string ("type", "code");
+	}
 
-      if (flags & SEC_CODE)
-	ui_out_field_string (mi_uiout, "type", "code");
+      mi_uiout->redirect (NULL);
+
+      gdb_flush (mi->event_channel);
+
+      do_cleanups (old_chain);
     }
+}
 
-  ui_out_redirect (mi_uiout, NULL);
+/* Emit an event when the selection context (inferior, thread, frame)
+   changed.  */
 
-  gdb_flush (mi->event_channel);
+static void
+mi_user_selected_context_changed (user_selected_what selection)
+{
+  struct thread_info *tp;
+
+  /* Don't send an event if we're responding to an MI command.  */
+  if (mi_suppress_notification.user_selected_context)
+    return;
+
+  tp = find_thread_ptid (inferior_ptid);
+
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
+      struct ui_out *mi_uiout;
+      struct cleanup *old_chain;
+
+      if (mi == NULL)
+	continue;
+
+      mi_uiout = interp_ui_out (top_level_interpreter ());
+
+      mi_uiout->redirect (mi->event_channel);
+
+      old_chain = make_cleanup_ui_out_redirect_pop (mi_uiout);
+
+      make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+
+      if (selection & USER_SELECTED_INFERIOR)
+	print_selected_inferior (mi->cli_uiout);
+
+      if (tp != NULL
+	  && (selection & (USER_SELECTED_THREAD | USER_SELECTED_FRAME)))
+	{
+	  print_selected_thread_frame (mi->cli_uiout, selection);
+
+	  fprintf_unfiltered (mi->event_channel,
+			      "thread-selected,id=\"%d\"",
+			      tp->global_num);
+
+	  if (tp->state != THREAD_RUNNING)
+	    {
+	      if (has_stack_frames ())
+		print_stack_frame_to_uiout (mi_uiout, get_selected_frame (NULL),
+					    1, SRC_AND_LOC, 1);
+	    }
+	}
+
+      gdb_flush (mi->event_channel);
+      do_cleanups (old_chain);
+    }
 }
 
 static int
 report_initial_inferior (struct inferior *inf, void *closure)
 {
-  /* This function is called from mi_intepreter_init, and since
+  /* This function is called from mi_interpreter_init, and since
      mi_inferior_added assumes that inferior is fully initialized
      and top_level_interpreter_data is set, we cannot call
      it here.  */
-  struct mi_interp *mi = closure;
+  struct mi_interp *mi = (struct mi_interp *) closure;
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup_restore_target_terminal ();
+  target_terminal_ours_for_output ();
 
-  target_terminal_ours ();
   fprintf_unfiltered (mi->event_channel,
 		      "thread-group-added,id=\"i%d\"",
 		      inf->num);
   gdb_flush (mi->event_channel);
+
+  do_cleanups (old_chain);
   return 0;
 }
 
-static struct ui_out *
-mi_ui_out (struct interp *interp)
+ui_out *
+mi_interp::interp_ui_out ()
 {
-  struct mi_interp *mi = interp_data (interp);
-
-  return mi->mi_uiout;
+  return this->mi_uiout;
 }
 
-/* Save the original value of raw_stdout here when logging, so we can
-   restore correctly when done.  */
-
-static struct ui_file *saved_raw_stdout;
-
 /* Do MI-specific logging actions; save raw_stdout, and change all
    the consoles to use the supplied ui-file(s).  */
 
-static int
-mi_set_logging (struct interp *interp, int start_log,
-		struct ui_file *out, struct ui_file *logfile)
+void
+mi_interp::set_logging (ui_file_up logfile, bool logging_redirect)
 {
-  struct mi_interp *mi = interp_data (interp);
-
-  if (!mi)
-    return 0;
+  struct mi_interp *mi = this;
 
-  if (start_log)
-    {
-      /* The tee created already is based on gdb_stdout, which for MI
-	 is a console and so we end up in an infinite loop of console
-	 writing to ui_file writing to console etc.  So discard the
-	 existing tee (it hasn't been used yet, and MI won't ever use
-	 it), and create one based on raw_stdout instead.  */
-      if (logfile)
-	{
-	  ui_file_delete (out);
-	  out = tee_file_new (raw_stdout, 0, logfile, 0);
-	}
+  if (logfile != NULL)
+    {
+      mi->saved_raw_stdout = mi->raw_stdout;
+      mi->raw_stdout = make_logging_output (mi->raw_stdout,
+					    std::move (logfile),
+					    logging_redirect);
 
-      saved_raw_stdout = raw_stdout;
-      raw_stdout = out;
     }
   else
     {
-      raw_stdout = saved_raw_stdout;
-      saved_raw_stdout = NULL;
+      delete mi->raw_stdout;
+      mi->raw_stdout = mi->saved_raw_stdout;
+      mi->saved_raw_stdout = NULL;
     }
   
-  mi_console_set_raw (mi->out, raw_stdout);
-  mi_console_set_raw (mi->err, raw_stdout);
-  mi_console_set_raw (mi->log, raw_stdout);
-  mi_console_set_raw (mi->targ, raw_stdout);
-  mi_console_set_raw (mi->event_channel, raw_stdout);
+  mi->out->set_raw (mi->raw_stdout);
+  mi->err->set_raw (mi->raw_stdout);
+  mi->log->set_raw (mi->raw_stdout);
+  mi->targ->set_raw (mi->raw_stdout);
+  mi->event_channel->set_raw (mi->raw_stdout);
+}
 
-  return 1;
+/* Factory for MI interpreters.  */
+
+static struct interp *
+mi_interp_factory (const char *name)
+{
+  return new mi_interp (name);
 }
 
 extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
@@ -1187,20 +1406,39 @@ extern initialize_file_ftype _initialize
 void
 _initialize_mi_interp (void)
 {
-  static const struct interp_procs procs =
-    {
-      mi_interpreter_init,	/* init_proc */
-      mi_interpreter_resume,	/* resume_proc */
-      mi_interpreter_suspend,	/* suspend_proc */
-      mi_interpreter_exec,	/* exec_proc */
-      mi_ui_out, 		/* ui_out_proc */
-      mi_set_logging,		/* set_logging_proc */
-      mi_command_loop		/* command_loop_proc */
-    };
-
   /* The various interpreter levels.  */
-  interp_add (interp_new (INTERP_MI1, &procs));
-  interp_add (interp_new (INTERP_MI2, &procs));
-  interp_add (interp_new (INTERP_MI3, &procs));
-  interp_add (interp_new (INTERP_MI, &procs));
+  interp_factory_register (INTERP_MI1, mi_interp_factory);
+  interp_factory_register (INTERP_MI2, mi_interp_factory);
+  interp_factory_register (INTERP_MI3, mi_interp_factory);
+  interp_factory_register (INTERP_MI, mi_interp_factory);
+
+  observer_attach_signal_received (mi_on_signal_received);
+  observer_attach_end_stepping_range (mi_on_end_stepping_range);
+  observer_attach_signal_exited (mi_on_signal_exited);
+  observer_attach_exited (mi_on_exited);
+  observer_attach_no_history (mi_on_no_history);
+  observer_attach_new_thread (mi_new_thread);
+  observer_attach_thread_exit (mi_thread_exit);
+  observer_attach_inferior_added (mi_inferior_added);
+  observer_attach_inferior_appeared (mi_inferior_appeared);
+  observer_attach_inferior_exit (mi_inferior_exit);
+  observer_attach_inferior_removed (mi_inferior_removed);
+  observer_attach_record_changed (mi_record_changed);
+  observer_attach_normal_stop (mi_on_normal_stop);
+  observer_attach_target_resumed (mi_on_resume);
+  observer_attach_solib_loaded (mi_solib_loaded);
+  observer_attach_solib_unloaded (mi_solib_unloaded);
+  observer_attach_about_to_proceed (mi_about_to_proceed);
+  observer_attach_traceframe_changed (mi_traceframe_changed);
+  observer_attach_tsv_created (mi_tsv_created);
+  observer_attach_tsv_deleted (mi_tsv_deleted);
+  observer_attach_tsv_modified (mi_tsv_modified);
+  observer_attach_breakpoint_created (mi_breakpoint_created);
+  observer_attach_breakpoint_deleted (mi_breakpoint_deleted);
+  observer_attach_breakpoint_modified (mi_breakpoint_modified);
+  observer_attach_command_param_changed (mi_command_param_changed);
+  observer_attach_memory_changed (mi_memory_changed);
+  observer_attach_sync_execution_done (mi_on_sync_execution_done);
+  observer_attach_user_selected_context_changed
+    (mi_user_selected_context_changed);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-main.c ./gdb/mi/mi-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Command Set.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -53,17 +53,11 @@
 #include "linespec.h"
 #include "extension.h"
 #include "gdbcmd.h"
+#include "observer.h"
 
 #include <ctype.h>
-#include <sys/time.h>
-
-#if defined HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-#ifdef HAVE_GETRUSAGE
-struct rusage rusage;
-#endif
+#include "run-time-clock.h"
+#include <chrono>
 
 enum
   {
@@ -72,8 +66,6 @@ enum
 
 int mi_debug_p;
 
-struct ui_file *raw_stdout;
-
 /* This is used to pass the current command timestamp down to
    continuation routines.  */
 static struct mi_timestamp *current_command_ts;
@@ -149,18 +141,20 @@ mi_async_p (void)
 
 static void timestamp (struct mi_timestamp *tv);
 
-static void print_diff_now (struct mi_timestamp *start);
-static void print_diff (struct mi_timestamp *start, struct mi_timestamp *end);
+static void print_diff (struct ui_file *file, struct mi_timestamp *start,
+			struct mi_timestamp *end);
 
 void
 mi_cmd_gdb_exit (char *command, char **argv, int argc)
 {
+  struct mi_interp *mi = (struct mi_interp *) current_interpreter ();
+
   /* We have to print everything right here because we never return.  */
   if (current_token)
-    fputs_unfiltered (current_token, raw_stdout);
-  fputs_unfiltered ("^exit\n", raw_stdout);
-  mi_out_put (current_uiout, raw_stdout);
-  gdb_flush (raw_stdout);
+    fputs_unfiltered (current_token, mi->raw_stdout);
+  fputs_unfiltered ("^exit\n", mi->raw_stdout);
+  mi_out_put (current_uiout, mi->raw_stdout);
+  gdb_flush (mi->raw_stdout);
   /* FIXME: The function called is not yet a formal libgdb function.  */
   quit_force (NULL, FROM_TTY);
 }
@@ -299,7 +293,7 @@ exec_continue (char **argv, int argc)
     }
   else
     {
-      struct cleanup *back_to = make_cleanup_restore_integer (&sched_multi);
+      scoped_restore save_multi = make_scoped_restore (&sched_multi);
 
       if (current_context->all)
 	{
@@ -314,7 +308,6 @@ exec_continue (char **argv, int argc)
 	     same.  */
 	  continue_1 (1);
 	}
-      do_cleanups (back_to);
     }
 }
 
@@ -415,6 +408,8 @@ run_one_inferior (struct inferior *inf, 
 {
   int start_p = *(int *) arg;
   const char *run_cmd = start_p ? "start" : "run";
+  struct target_ops *run_target = find_run_target ();
+  int async_p = mi_async && run_target->to_can_async_p (run_target);
 
   if (inf->pid != 0)
     {
@@ -435,15 +430,14 @@ run_one_inferior (struct inferior *inf, 
       switch_to_thread (null_ptid);
       set_current_program_space (inf->pspace);
     }
-  mi_execute_cli_command (run_cmd, mi_async_p (),
-			  mi_async_p () ? "&" : NULL);
+  mi_execute_cli_command (run_cmd, async_p,
+			  async_p ? "&" : NULL);
   return 0;
 }
 
 void
 mi_cmd_exec_run (char *command, char **argv, int argc)
 {
-  int i;
   int start_p = 0;
 
   /* Parse the command options.  */
@@ -489,9 +483,11 @@ mi_cmd_exec_run (char *command, char **a
   else
     {
       const char *run_cmd = start_p ? "start" : "run";
+      struct target_ops *run_target = find_run_target ();
+      int async_p = mi_async && run_target->to_can_async_p (run_target);
 
-      mi_execute_cli_command (run_cmd, mi_async_p (),
-			      mi_async_p () ? "&" : NULL);
+      mi_execute_cli_command (run_cmd, async_p,
+			      async_p ? "&" : NULL);
     }
 }
 
@@ -556,21 +552,39 @@ mi_cmd_target_detach (char *command, cha
 }
 
 void
+mi_cmd_target_flash_erase (char *command, char **argv, int argc)
+{
+  flash_erase_command (NULL, 0);
+}
+
+void
 mi_cmd_thread_select (char *command, char **argv, int argc)
 {
   enum gdb_rc rc;
   char *mi_error_message;
+  ptid_t previous_ptid = inferior_ptid;
 
   if (argc != 1)
     error (_("-thread-select: USAGE: threadnum."));
 
   rc = gdb_thread_select (current_uiout, argv[0], &mi_error_message);
 
+  /* If thread switch did not succeed don't notify or print.  */
   if (rc == GDB_RC_FAIL)
     {
       make_cleanup (xfree, mi_error_message);
       error ("%s", mi_error_message);
     }
+
+  print_selected_thread_frame (current_uiout,
+			       USER_SELECTED_THREAD | USER_SELECTED_FRAME);
+
+  /* Notify if the thread has effectively changed.  */
+  if (!ptid_equal (inferior_ptid, previous_ptid))
+    {
+      observer_notify_user_selected_context_changed (USER_SELECTED_THREAD
+						     | USER_SELECTED_FRAME);
+    }
 }
 
 void
@@ -610,7 +624,7 @@ struct collect_cores_data
 static int
 collect_cores (struct thread_info *ti, void *xdata)
 {
-  struct collect_cores_data *data = xdata;
+  struct collect_cores_data *data = (struct collect_cores_data *) xdata;
 
   if (ptid_get_pid (ti->ptid) == data->pid)
     {
@@ -643,7 +657,8 @@ struct print_one_inferior_data
 static int
 print_one_inferior (struct inferior *inferior, void *xdata)
 {
-  struct print_one_inferior_data *top_data = xdata;
+  struct print_one_inferior_data *top_data
+    = (struct print_one_inferior_data *) xdata;
   struct ui_out *uiout = current_uiout;
 
   if (VEC_empty (int, top_data->inferiors)
@@ -655,17 +670,17 @@ print_one_inferior (struct inferior *inf
       struct cleanup *back_to
 	= make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-      ui_out_field_fmt (uiout, "id", "i%d", inferior->num);
-      ui_out_field_string (uiout, "type", "process");
+      uiout->field_fmt ("id", "i%d", inferior->num);
+      uiout->field_string ("type", "process");
       if (inferior->has_exit_code)
-	ui_out_field_string (uiout, "exit-code",
+	uiout->field_string ("exit-code",
 			     int_string (inferior->exit_code, 8, 0, 0, 1));
       if (inferior->pid != 0)
-	ui_out_field_int (uiout, "pid", inferior->pid);
+	uiout->field_int ("pid", inferior->pid);
 
       if (inferior->pspace->pspace_exec_filename != NULL)
 	{
-	  ui_out_field_string (uiout, "executable",
+	  uiout->field_string ("executable",
 			       inferior->pspace->pspace_exec_filename);
 	}
 
@@ -691,7 +706,7 @@ print_one_inferior (struct inferior *inf
 	  e = unique (b, e);
 
 	  for (; b != e; ++b)
-	    ui_out_field_int (uiout, NULL, *b);
+	    uiout->field_int (NULL, *b);
 
 	  do_cleanups (back_to_2);
 	}
@@ -720,7 +735,7 @@ output_cores (struct ui_out *uiout, cons
   make_cleanup (xfree, cores);
 
   for (p = strtok (p, ","); p;  p = strtok (NULL, ","))
-    ui_out_field_string (uiout, NULL, p);
+    uiout->field_string (NULL, p);
 
   do_cleanups (back_to);
 }
@@ -728,7 +743,7 @@ output_cores (struct ui_out *uiout, cons
 static void
 free_vector_of_ints (void *xvector)
 {
-  VEC (int) **vector = xvector;
+  VEC (int) **vector = (VEC (int) **) xvector;
 
   VEC_free (int, *vector);
 }
@@ -759,7 +774,7 @@ splay_tree_int_comparator (splay_tree_ke
 static void
 free_splay_tree (void *xt)
 {
-  splay_tree t = xt;
+  splay_tree t = (splay_tree) xt;
   splay_tree_delete (t);
 }
 
@@ -843,12 +858,12 @@ list_available_thread_groups (VEC (int) 
 
       back_to = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-      ui_out_field_fmt (uiout, "id", "%s", pid);
-      ui_out_field_string (uiout, "type", "process");
+      uiout->field_fmt ("id", "%s", pid);
+      uiout->field_string ("type", "process");
       if (cmd)
-	ui_out_field_string (uiout, "description", cmd);
+	uiout->field_string ("description", cmd);
       if (user)
-	ui_out_field_string (uiout, "user", user);
+	uiout->field_string ("user", user);
       if (cores)
 	output_cores (uiout, "cores", cores);
 
@@ -872,9 +887,9 @@ list_available_thread_groups (VEC (int) 
 		  const char *tid = get_osdata_column (child, "tid");
 		  const char *tcore = get_osdata_column (child, "core");
 
-		  ui_out_field_string (uiout, "id", tid);
+		  uiout->field_string ("id", tid);
 		  if (tcore)
-		    ui_out_field_string (uiout, "core", tcore);
+		    uiout->field_string ("core", tcore);
 
 		  do_cleanups (back_to_2);
 		}
@@ -1018,10 +1033,9 @@ mi_cmd_data_list_register_names (char *c
 	{
 	  if (gdbarch_register_name (gdbarch, regnum) == NULL
 	      || *(gdbarch_register_name (gdbarch, regnum)) == '\0')
-	    ui_out_field_string (uiout, NULL, "");
+	    uiout->field_string (NULL, "");
 	  else
-	    ui_out_field_string (uiout, NULL,
-				 gdbarch_register_name (gdbarch, regnum));
+	    uiout->field_string (NULL, gdbarch_register_name (gdbarch, regnum));
 	}
     }
 
@@ -1034,10 +1048,9 @@ mi_cmd_data_list_register_names (char *c
 
       if (gdbarch_register_name (gdbarch, regnum) == NULL
 	  || *(gdbarch_register_name (gdbarch, regnum)) == '\0')
-	ui_out_field_string (uiout, NULL, "");
+	uiout->field_string (NULL, "");
       else
-	ui_out_field_string (uiout, NULL,
-			     gdbarch_register_name (gdbarch, regnum));
+	uiout->field_string (NULL, gdbarch_register_name (gdbarch, regnum));
     }
   do_cleanups (cleanup);
 }
@@ -1089,7 +1102,7 @@ mi_cmd_data_list_changed_registers (char
 	    error (_("-data-list-changed-registers: "
 		     "Unable to read register contents."));
 	  else if (changed)
-	    ui_out_field_int (uiout, NULL, regnum);
+	    uiout->field_int (NULL, regnum);
 	}
     }
 
@@ -1108,7 +1121,7 @@ mi_cmd_data_list_changed_registers (char
 	    error (_("-data-list-changed-registers: "
 		     "Unable to read register contents."));
 	  else if (changed)
-	    ui_out_field_int (uiout, NULL, regnum);
+	    uiout->field_int (NULL, regnum);
 	}
       else
 	error (_("bad register number"));
@@ -1249,18 +1262,16 @@ static void
 output_register (struct frame_info *frame, int regnum, int format,
 		 int skip_unavailable)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
   struct ui_out *uiout = current_uiout;
   struct value *val = value_of_register (regnum, frame);
   struct cleanup *tuple_cleanup;
   struct value_print_options opts;
-  struct ui_file *stb;
 
   if (skip_unavailable && !value_entirely_available (val))
     return;
 
   tuple_cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-  ui_out_field_int (uiout, "number", regnum);
+  uiout->field_int ("number", regnum);
 
   if (format == 'N')
     format = 0;
@@ -1268,16 +1279,14 @@ output_register (struct frame_info *fram
   if (format == 'r')
     format = 'z';
 
-  stb = mem_fileopen ();
-  make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
   get_formatted_print_options (&opts, format);
   opts.deref_ref = 1;
   val_print (value_type (val),
-	     value_contents_for_printing (val),
 	     value_embedded_offset (val), 0,
-	     stb, 0, val, &opts, current_language);
-  ui_out_field_stream (uiout, "value", stb);
+	     &stb, 0, val, &opts, current_language);
+  uiout->field_stream ("value", stb);
 
   do_cleanups (tuple_cleanup);
 }
@@ -1346,34 +1355,26 @@ mi_cmd_data_write_register_values (char 
 void
 mi_cmd_data_evaluate_expression (char *command, char **argv, int argc)
 {
-  struct expression *expr;
-  struct cleanup *old_chain;
   struct value *val;
-  struct ui_file *stb;
   struct value_print_options opts;
   struct ui_out *uiout = current_uiout;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
-
   if (argc != 1)
     error (_("-data-evaluate-expression: "
 	     "Usage: -data-evaluate-expression expression"));
 
-  expr = parse_expression (argv[0]);
+  expression_up expr = parse_expression (argv[0]);
 
-  make_cleanup (free_current_contents, &expr);
+  val = evaluate_expression (expr.get ());
 
-  val = evaluate_expression (expr);
+  string_file stb;
 
   /* Print the result of the expression evaluation.  */
   get_user_print_options (&opts);
   opts.deref_ref = 0;
-  common_val_print (val, stb, 0, &opts, current_language);
+  common_val_print (val, &stb, 0, &opts, current_language);
 
-  ui_out_field_stream (uiout, "value", stb);
-
-  do_cleanups (old_chain);
+  uiout->field_stream ("value", stb);
 }
 
 /* This is the -data-read-memory command.
@@ -1400,7 +1401,6 @@ mi_cmd_data_read_memory (char *command, 
 {
   struct gdbarch *gdbarch = get_current_arch ();
   struct ui_out *uiout = current_uiout;
-  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
   CORE_ADDR addr;
   long total_bytes, nr_cols, nr_rows;
   char word_format;
@@ -1408,7 +1408,6 @@ mi_cmd_data_read_memory (char *command, 
   long word_size;
   char word_asize;
   char aschar;
-  gdb_byte *mbuf;
   int nr_bytes;
   long offset = 0;
   int oind = 0;
@@ -1493,39 +1492,35 @@ mi_cmd_data_read_memory (char *command, 
 
   /* Create a buffer and read it in.  */
   total_bytes = word_size * nr_rows * nr_cols;
-  mbuf = xcalloc (total_bytes, 1);
-  make_cleanup (xfree, mbuf);
+
+  std::unique_ptr<gdb_byte[]> mbuf (new gdb_byte[total_bytes]);
 
   /* Dispatch memory reads to the topmost target, not the flattened
      current_target.  */
   nr_bytes = target_read (current_target.beneath,
-			  TARGET_OBJECT_MEMORY, NULL, mbuf,
+			  TARGET_OBJECT_MEMORY, NULL, mbuf.get (),
 			  addr, total_bytes);
   if (nr_bytes <= 0)
     error (_("Unable to read memory."));
 
   /* Output the header information.  */
-  ui_out_field_core_addr (uiout, "addr", gdbarch, addr);
-  ui_out_field_int (uiout, "nr-bytes", nr_bytes);
-  ui_out_field_int (uiout, "total-bytes", total_bytes);
-  ui_out_field_core_addr (uiout, "next-row",
-			  gdbarch, addr + word_size * nr_cols);
-  ui_out_field_core_addr (uiout, "prev-row",
-			  gdbarch, addr - word_size * nr_cols);
-  ui_out_field_core_addr (uiout, "next-page", gdbarch, addr + total_bytes);
-  ui_out_field_core_addr (uiout, "prev-page", gdbarch, addr - total_bytes);
+  uiout->field_core_addr ("addr", gdbarch, addr);
+  uiout->field_int ("nr-bytes", nr_bytes);
+  uiout->field_int ("total-bytes", total_bytes);
+  uiout->field_core_addr ("next-row", gdbarch, addr + word_size * nr_cols);
+  uiout->field_core_addr ("prev-row", gdbarch, addr - word_size * nr_cols);
+  uiout->field_core_addr ("next-page", gdbarch, addr + total_bytes);
+  uiout->field_core_addr ("prev-page", gdbarch, addr - total_bytes);
 
   /* Build the result as a two dimentional table.  */
   {
-    struct ui_file *stream;
-    struct cleanup *cleanup_stream;
     int row;
     int row_byte;
+    struct cleanup *cleanup_list;
 
-    stream = mem_fileopen ();
-    cleanup_stream = make_cleanup_ui_file_delete (stream);
+    string_file stream;
 
-    make_cleanup_ui_out_list_begin_end (uiout, "memory");
+    cleanup_list = make_cleanup_ui_out_list_begin_end (uiout, "memory");
     for (row = 0, row_byte = 0;
 	 row < nr_rows;
 	 row++, row_byte += nr_cols * word_size)
@@ -1537,7 +1532,7 @@ mi_cmd_data_read_memory (char *command, 
 	struct value_print_options opts;
 
 	cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-	ui_out_field_core_addr (uiout, "addr", gdbarch, addr + row_byte);
+	uiout->field_core_addr ("addr", gdbarch, addr + row_byte);
 	/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr +
 	   row_byte); */
 	cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data");
@@ -1548,14 +1543,14 @@ mi_cmd_data_read_memory (char *command, 
 	  {
 	    if (col_byte + word_size > nr_bytes)
 	      {
-		ui_out_field_string (uiout, NULL, "N/A");
+		uiout->field_string (NULL, "N/A");
 	      }
 	    else
 	      {
-		ui_file_rewind (stream);
-		print_scalar_formatted (mbuf + col_byte, word_type, &opts,
-					word_asize, stream);
-		ui_out_field_stream (uiout, NULL, stream);
+		stream.clear ();
+		print_scalar_formatted (&mbuf[col_byte], word_type, &opts,
+					word_asize, &stream);
+		uiout->field_stream (NULL, stream);
 	      }
 	  }
 	do_cleanups (cleanup_list_data);
@@ -1563,24 +1558,23 @@ mi_cmd_data_read_memory (char *command, 
 	  {
 	    int byte;
 
-	    ui_file_rewind (stream);
+	    stream.clear ();
 	    for (byte = row_byte;
 		 byte < row_byte + word_size * nr_cols; byte++)
 	      {
 		if (byte >= nr_bytes)
-		  fputc_unfiltered ('X', stream);
+		  stream.putc ('X');
 		else if (mbuf[byte] < 32 || mbuf[byte] > 126)
-		  fputc_unfiltered (aschar, stream);
+		  stream.putc (aschar);
 		else
-		  fputc_unfiltered (mbuf[byte], stream);
+		  stream.putc (mbuf[byte]);
 	      }
-	    ui_out_field_stream (uiout, "ascii", stream);
+	    uiout->field_stream ("ascii", stream);
 	  }
 	do_cleanups (cleanup_tuple);
       }
-    do_cleanups (cleanup_stream);
+    do_cleanups (cleanup_list);
   }
-  do_cleanups (cleanups);
 }
 
 void
@@ -1632,7 +1626,7 @@ mi_cmd_data_read_memory_bytes (char *com
 
   result = read_memory_robust (current_target.beneath, addr, length);
 
-  cleanups = make_cleanup (free_memory_read_result_vector, result);
+  cleanups = make_cleanup (free_memory_read_result_vector, &result);
 
   if (VEC_length (memory_read_result_s, result) == 0)
     error (_("Unable to read memory."));
@@ -1645,14 +1639,14 @@ mi_cmd_data_read_memory_bytes (char *com
       struct cleanup *t = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
       char *data, *p;
       int i;
+      int alloc_len;
 
-      ui_out_field_core_addr (uiout, "begin", gdbarch, read_result->begin);
-      ui_out_field_core_addr (uiout, "offset", gdbarch, read_result->begin
-			      - addr);
-      ui_out_field_core_addr (uiout, "end", gdbarch, read_result->end);
+      uiout->field_core_addr ("begin", gdbarch, read_result->begin);
+      uiout->field_core_addr ("offset", gdbarch, read_result->begin - addr);
+      uiout->field_core_addr ("end", gdbarch, read_result->end);
 
-      data = xmalloc (
-	  (read_result->end - read_result->begin) * 2 * unit_size + 1);
+      alloc_len = (read_result->end - read_result->begin) * 2 * unit_size + 1;
+      data = (char *) xmalloc (alloc_len);
 
       for (i = 0, p = data;
 	   i < ((read_result->end - read_result->begin) * unit_size);
@@ -1660,7 +1654,7 @@ mi_cmd_data_read_memory_bytes (char *com
 	{
 	  sprintf (p, "%02x", read_result->data[i]);
 	}
-      ui_out_field_string (uiout, "contents", data);
+      uiout->field_string ("contents", data);
       xfree (data);
       do_cleanups (t);
     }
@@ -1694,7 +1688,7 @@ mi_cmd_data_write_memory (char *command,
   /* FIXME: ezannoni 2000-02-17 LONGEST could possibly not be big
      enough when using a compiler other than GCC.  */
   LONGEST value;
-  void *buffer;
+  gdb_byte *buffer;
   struct cleanup *old_chain;
   long offset = 0;
   int oind = 0;
@@ -1742,7 +1736,7 @@ mi_cmd_data_write_memory (char *command,
   /* Get the value as a number.  */
   value = parse_and_eval_address (argv[3]);
   /* Get the value into an array.  */
-  buffer = xmalloc (word_size);
+  buffer = (gdb_byte *) xmalloc (word_size);
   old_chain = make_cleanup (xfree, buffer);
   store_signed_integer (buffer, word_size, byte_order, value);
   /* Write it down to memory.  */
@@ -1790,7 +1784,7 @@ mi_cmd_data_write_memory_bytes (char *co
   else
     count_units = len_units;
 
-  databuf = xmalloc (len_bytes * sizeof (gdb_byte));
+  databuf = XNEWVEC (gdb_byte, len_bytes);
   back_to = make_cleanup (xfree, databuf);
 
   for (i = 0; i < len_bytes; ++i)
@@ -1805,7 +1799,7 @@ mi_cmd_data_write_memory_bytes (char *co
     {
       /* Pattern is made of less units than count:
          repeat pattern to fill memory.  */
-      data = xmalloc (count_units * unit_size);
+      data = (gdb_byte *) xmalloc (count_units * unit_size);
       make_cleanup (xfree, data);
 
       /* Number of times the pattern is entirely repeated.  */
@@ -1863,19 +1857,19 @@ mi_cmd_list_features (char *command, cha
       struct ui_out *uiout = current_uiout;
 
       cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features");
-      ui_out_field_string (uiout, NULL, "frozen-varobjs");
-      ui_out_field_string (uiout, NULL, "pending-breakpoints");
-      ui_out_field_string (uiout, NULL, "thread-info");
-      ui_out_field_string (uiout, NULL, "data-read-memory-bytes");
-      ui_out_field_string (uiout, NULL, "breakpoint-notifications");
-      ui_out_field_string (uiout, NULL, "ada-task-info");
-      ui_out_field_string (uiout, NULL, "language-option");
-      ui_out_field_string (uiout, NULL, "info-gdb-mi-command");
-      ui_out_field_string (uiout, NULL, "undefined-command-error-code");
-      ui_out_field_string (uiout, NULL, "exec-run-start-option");
+      uiout->field_string (NULL, "frozen-varobjs");
+      uiout->field_string (NULL, "pending-breakpoints");
+      uiout->field_string (NULL, "thread-info");
+      uiout->field_string (NULL, "data-read-memory-bytes");
+      uiout->field_string (NULL, "breakpoint-notifications");
+      uiout->field_string (NULL, "ada-task-info");
+      uiout->field_string (NULL, "language-option");
+      uiout->field_string (NULL, "info-gdb-mi-command");
+      uiout->field_string (NULL, "undefined-command-error-code");
+      uiout->field_string (NULL, "exec-run-start-option");
 
       if (ext_lang_initialized_p (get_ext_lang_defn (EXT_LANG_PYTHON)))
-	ui_out_field_string (uiout, NULL, "python");
+	uiout->field_string (NULL, "python");
 
       do_cleanups (cleanup);
       return;
@@ -1894,9 +1888,9 @@ mi_cmd_list_target_features (char *comma
 
       cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features");
       if (mi_async_p ())
-	ui_out_field_string (uiout, NULL, "async");
+	uiout->field_string (NULL, "async");
       if (target_can_execute_reverse)
-	ui_out_field_string (uiout, NULL, "reverse");
+	uiout->field_string (NULL, "reverse");
       do_cleanups (cleanup);
       return;
     }
@@ -1914,7 +1908,7 @@ mi_cmd_add_inferior (char *command, char
 
   inf = add_inferior_with_spaces ();
 
-  ui_out_field_fmt (current_uiout, "inferior", "i%d", inf->num);
+  current_uiout->field_fmt ("inferior", "i%d", inf->num);
 }
 
 /* Callback used to find the first inferior other than the current
@@ -1964,7 +1958,7 @@ mi_cmd_remove_inferior (char *command, c
       set_current_program_space (new_inferior->pspace);
     }
 
-  delete_inferior_1 (inf, 1 /* silent */);
+  delete_inferior (inf);
 }
 
 
@@ -1979,6 +1973,7 @@ mi_cmd_remove_inferior (char *command, c
 static void
 captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context)
 {
+  struct mi_interp *mi = (struct mi_interp *) command_interp ();
   struct cleanup *cleanup;
 
   if (do_timings)
@@ -1995,7 +1990,8 @@ captured_mi_execute_command (struct ui_o
       /* A MI command was read from the input stream.  */
       if (mi_debug_p)
 	/* FIXME: gdb_???? */
-	fprintf_unfiltered (raw_stdout, " token=`%s' command=`%s' args=`%s'\n",
+	fprintf_unfiltered (mi->raw_stdout,
+			    " token=`%s' command=`%s' args=`%s'\n",
 			    context->token, context->command, context->args);
 
       mi_cmd_execute (context);
@@ -2008,15 +2004,15 @@ captured_mi_execute_command (struct ui_o
 	 uiout will most likely crash in the mi_out_* routines.  */
       if (!running_result_record_printed)
 	{
-	  fputs_unfiltered (context->token, raw_stdout);
+	  fputs_unfiltered (context->token, mi->raw_stdout);
 	  /* There's no particularly good reason why target-connect results
 	     in not ^done.  Should kill ^connected for MI3.  */
 	  fputs_unfiltered (strcmp (context->command, "target-select") == 0
-			    ? "^connected" : "^done", raw_stdout);
-	  mi_out_put (uiout, raw_stdout);
+			    ? "^connected" : "^done", mi->raw_stdout);
+	  mi_out_put (uiout, mi->raw_stdout);
 	  mi_out_rewind (uiout);
-	  mi_print_timing_maybe ();
-	  fputs_unfiltered ("\n", raw_stdout);
+	  mi_print_timing_maybe (mi->raw_stdout);
+	  fputs_unfiltered ("\n", mi->raw_stdout);
 	}
       else
 	/* The command does not want anything to be printed.  In that
@@ -2035,7 +2031,7 @@ captured_mi_execute_command (struct ui_o
 	/* Echo the command on the console.  */
 	fprintf_unfiltered (gdb_stdlog, "%s\n", context->command);
 	/* Call the "console" interpreter.  */
-	argv[0] = "console";
+	argv[0] = INTERP_CONSOLE;
 	argv[1] = context->command;
 	mi_cmd_interpreter_exec ("-interpreter-exec", argv, 2);
 
@@ -2047,12 +2043,12 @@ captured_mi_execute_command (struct ui_o
 	  {
 	    if (!running_result_record_printed)
 	      {
-		fputs_unfiltered (context->token, raw_stdout);
-		fputs_unfiltered ("^done", raw_stdout);
-		mi_out_put (uiout, raw_stdout);
+		fputs_unfiltered (context->token, mi->raw_stdout);
+		fputs_unfiltered ("^done", mi->raw_stdout);
+		mi_out_put (uiout, mi->raw_stdout);
 		mi_out_rewind (uiout);
-		mi_print_timing_maybe ();
-		fputs_unfiltered ("\n", raw_stdout);
+		mi_print_timing_maybe (mi->raw_stdout);
+		fputs_unfiltered ("\n", mi->raw_stdout);
 	      }
 	    else
 	      mi_out_rewind (uiout);
@@ -2069,22 +2065,52 @@ captured_mi_execute_command (struct ui_o
 static void
 mi_print_exception (const char *token, struct gdb_exception exception)
 {
-  fputs_unfiltered (token, raw_stdout);
-  fputs_unfiltered ("^error,msg=\"", raw_stdout);
+  struct mi_interp *mi = (struct mi_interp *) current_interpreter ();
+
+  fputs_unfiltered (token, mi->raw_stdout);
+  fputs_unfiltered ("^error,msg=\"", mi->raw_stdout);
   if (exception.message == NULL)
-    fputs_unfiltered ("unknown error", raw_stdout);
+    fputs_unfiltered ("unknown error", mi->raw_stdout);
   else
-    fputstr_unfiltered (exception.message, '"', raw_stdout);
-  fputs_unfiltered ("\"", raw_stdout);
+    fputstr_unfiltered (exception.message, '"', mi->raw_stdout);
+  fputs_unfiltered ("\"", mi->raw_stdout);
 
   switch (exception.error)
     {
       case UNDEFINED_COMMAND_ERROR:
-	fputs_unfiltered (",code=\"undefined-command\"", raw_stdout);
+	fputs_unfiltered (",code=\"undefined-command\"", mi->raw_stdout);
 	break;
     }
 
-  fputs_unfiltered ("\n", raw_stdout);
+  fputs_unfiltered ("\n", mi->raw_stdout);
+}
+
+/* Determine whether the parsed command already notifies the
+   user_selected_context_changed observer.  */
+
+static int
+command_notifies_uscc_observer (struct mi_parse *command)
+{
+  if (command->op == CLI_COMMAND)
+    {
+      /* CLI commands "thread" and "inferior" already send it.  */
+      return (strncmp (command->command, "thread ", 7) == 0
+	      || strncmp (command->command, "inferior ", 9) == 0);
+    }
+  else /* MI_COMMAND */
+    {
+      if (strcmp (command->command, "interpreter-exec") == 0
+	  && command->argc > 1)
+	{
+	  /* "thread" and "inferior" again, but through -interpreter-exec.  */
+	  return (strncmp (command->argv[1], "thread ", 7) == 0
+		  || strncmp (command->argv[1], "inferior ", 9) == 0);
+	}
+
+      else
+	/* -thread-select already sends it.  */
+	return strcmp (command->command, "thread-select") == 0;
+    }
 }
 
 void
@@ -2114,13 +2140,19 @@ mi_execute_command (const char *cmd, int
   if (command != NULL)
     {
       ptid_t previous_ptid = inferior_ptid;
+      struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
 
       command->token = token;
 
+      if (command->cmd != NULL && command->cmd->suppress_notification != NULL)
+        {
+          make_cleanup_restore_integer (command->cmd->suppress_notification);
+          *command->cmd->suppress_notification = 1;
+        }
+
       if (do_timings)
 	{
-	  command->cmd_start = (struct mi_timestamp *)
-	    xmalloc (sizeof (struct mi_timestamp));
+	  command->cmd_start = new mi_timestamp ();
 	  timestamp (command->cmd_start);
 	}
 
@@ -2130,6 +2162,13 @@ mi_execute_command (const char *cmd, int
 	}
       CATCH (result, RETURN_MASK_ALL)
 	{
+	  /* Like in start_event_loop, enable input and force display
+	     of the prompt.  Otherwise, any command that calls
+	     async_disable_stdin, and then throws, will leave input
+	     disabled.  */
+	  async_enable_stdin ();
+	  current_ui->prompt_state = PROMPT_NEEDED;
+
 	  /* The command execution failed and error() was called
 	     somewhere.  */
 	  mi_print_exception (command->token, result);
@@ -2141,16 +2180,15 @@ mi_execute_command (const char *cmd, int
 
       if (/* The notifications are only output when the top-level
 	     interpreter (specified on the command line) is MI.  */
-	  ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
+	  interp_ui_out (top_level_interpreter ())->is_mi_like_p ()
 	  /* Don't try report anything if there are no threads --
 	     the program is dead.  */
 	  && thread_count () != 0
-	  /* -thread-select explicitly changes thread. If frontend uses that
-	     internally, we don't want to emit =thread-selected, since
-	     =thread-selected is supposed to indicate user's intentions.  */
-	  && strcmp (command->command, "thread-select") != 0)
+	  /* If the command already reports the thread change, no need to do it
+	     again.  */
+	  && !command_notifies_uscc_observer (command))
 	{
-	  struct mi_interp *mi = top_level_interpreter_data ();
+	  struct mi_interp *mi = (struct mi_interp *) top_level_interpreter ();
 	  int report_change = 0;
 
 	  if (command->thread == -1)
@@ -2163,22 +2201,19 @@ mi_execute_command (const char *cmd, int
 	    {
 	      struct thread_info *ti = inferior_thread ();
 
-	      report_change = (ti->num != command->thread);
+	      report_change = (ti->global_num != command->thread);
 	    }
 
 	  if (report_change)
 	    {
-	      struct thread_info *ti = inferior_thread ();
-
-	      target_terminal_ours ();
-	      fprintf_unfiltered (mi->event_channel,
-				  "thread-selected,id=\"%d\"",
-				  ti->num);
-	      gdb_flush (mi->event_channel);
+		observer_notify_user_selected_context_changed
+		  (USER_SELECTED_THREAD | USER_SELECTED_FRAME);
 	    }
 	}
 
       mi_parse_free (command);
+
+      do_cleanups (cleanup);
     }
 }
 
@@ -2186,7 +2221,6 @@ static void
 mi_cmd_execute (struct mi_parse *parse)
 {
   struct cleanup *cleanup;
-  enum language saved_language;
 
   cleanup = prepare_execute_command ();
 
@@ -2224,7 +2258,7 @@ mi_cmd_execute (struct mi_parse *parse)
 
   if (parse->thread != -1)
     {
-      struct thread_info *tp = find_thread_id (parse->thread);
+      struct thread_info *tp = find_thread_global_id (parse->thread);
 
       if (!tp)
 	error (_("Invalid thread id: %d"), parse->thread);
@@ -2256,12 +2290,6 @@ mi_cmd_execute (struct mi_parse *parse)
 
   current_context = parse;
 
-  if (parse->cmd->suppress_notification != NULL)
-    {
-      make_cleanup_restore_integer (parse->cmd->suppress_notification);
-      *parse->cmd->suppress_notification = 1;
-    }
-
   if (parse->cmd->argv_func != NULL)
     {
       parse->cmd->argv_func (parse->command, parse->argv, parse->argc);
@@ -2277,15 +2305,12 @@ mi_cmd_execute (struct mi_parse *parse)
   else
     {
       /* FIXME: DELETE THIS.  */
-      struct ui_file *stb;
-
-      stb = mem_fileopen ();
+      string_file stb;
 
-      fputs_unfiltered ("Undefined mi command: ", stb);
-      fputstr_unfiltered (parse->command, '"', stb);
-      fputs_unfiltered (" (missing implementation)", stb);
+      stb.puts ("Undefined mi command: ");
+      stb.putstr (parse->command, '"');
+      stb.puts (" (missing implementation)");
 
-      make_cleanup_ui_file_delete (stb);
       error_stream (stb);
     }
   do_cleanups (cleanup);
@@ -2344,12 +2369,13 @@ mi_load_progress (const char *section_na
 		  unsigned long total_sent,
 		  unsigned long grand_total)
 {
-  struct timeval time_now, delta, update_threshold;
-  static struct timeval last_update;
+  using namespace std::chrono;
+  static steady_clock::time_point last_update;
   static char *previous_sect_name = NULL;
   int new_section;
   struct ui_out *saved_uiout;
   struct ui_out *uiout;
+  struct mi_interp *mi = (struct mi_interp *) current_interpreter ();
 
   /* This function is called through deprecated_show_load_progress
      which means uiout may not be correct.  Fix it for the duration
@@ -2368,19 +2394,6 @@ mi_load_progress (const char *section_na
 
   uiout = current_uiout;
 
-  update_threshold.tv_sec = 0;
-  update_threshold.tv_usec = 500000;
-  gettimeofday (&time_now, NULL);
-
-  delta.tv_usec = time_now.tv_usec - last_update.tv_usec;
-  delta.tv_sec = time_now.tv_sec - last_update.tv_sec;
-
-  if (delta.tv_usec < 0)
-    {
-      delta.tv_sec -= 1;
-      delta.tv_usec += 1000000L;
-    }
-
   new_section = (previous_sect_name ?
 		 strcmp (previous_sect_name, section_name) : 1);
   if (new_section)
@@ -2391,38 +2404,37 @@ mi_load_progress (const char *section_na
       previous_sect_name = xstrdup (section_name);
 
       if (current_token)
-	fputs_unfiltered (current_token, raw_stdout);
-      fputs_unfiltered ("+download", raw_stdout);
+	fputs_unfiltered (current_token, mi->raw_stdout);
+      fputs_unfiltered ("+download", mi->raw_stdout);
       cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-      ui_out_field_string (uiout, "section", section_name);
-      ui_out_field_int (uiout, "section-size", total_section);
-      ui_out_field_int (uiout, "total-size", grand_total);
+      uiout->field_string ("section", section_name);
+      uiout->field_int ("section-size", total_section);
+      uiout->field_int ("total-size", grand_total);
       do_cleanups (cleanup_tuple);
-      mi_out_put (uiout, raw_stdout);
-      fputs_unfiltered ("\n", raw_stdout);
-      gdb_flush (raw_stdout);
+      mi_out_put (uiout, mi->raw_stdout);
+      fputs_unfiltered ("\n", mi->raw_stdout);
+      gdb_flush (mi->raw_stdout);
     }
 
-  if (delta.tv_sec >= update_threshold.tv_sec &&
-      delta.tv_usec >= update_threshold.tv_usec)
+  steady_clock::time_point time_now = steady_clock::now ();
+  if (time_now - last_update > milliseconds (500))
     {
       struct cleanup *cleanup_tuple;
 
-      last_update.tv_sec = time_now.tv_sec;
-      last_update.tv_usec = time_now.tv_usec;
+      last_update = time_now;
       if (current_token)
-	fputs_unfiltered (current_token, raw_stdout);
-      fputs_unfiltered ("+download", raw_stdout);
+	fputs_unfiltered (current_token, mi->raw_stdout);
+      fputs_unfiltered ("+download", mi->raw_stdout);
       cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-      ui_out_field_string (uiout, "section", section_name);
-      ui_out_field_int (uiout, "section-sent", sent_so_far);
-      ui_out_field_int (uiout, "section-size", total_section);
-      ui_out_field_int (uiout, "total-sent", total_sent);
-      ui_out_field_int (uiout, "total-size", grand_total);
+      uiout->field_string ("section", section_name);
+      uiout->field_int ("section-sent", sent_so_far);
+      uiout->field_int ("section-size", total_section);
+      uiout->field_int ("total-sent", total_sent);
+      uiout->field_int ("total-size", grand_total);
       do_cleanups (cleanup_tuple);
-      mi_out_put (uiout, raw_stdout);
-      fputs_unfiltered ("\n", raw_stdout);
-      gdb_flush (raw_stdout);
+      mi_out_put (uiout, mi->raw_stdout);
+      fputs_unfiltered ("\n", mi->raw_stdout);
+      gdb_flush (mi->raw_stdout);
     }
 
   xfree (uiout);
@@ -2432,65 +2444,49 @@ mi_load_progress (const char *section_na
 static void
 timestamp (struct mi_timestamp *tv)
 {
-  gettimeofday (&tv->wallclock, NULL);
-#ifdef HAVE_GETRUSAGE
-  getrusage (RUSAGE_SELF, &rusage);
-  tv->utime.tv_sec = rusage.ru_utime.tv_sec;
-  tv->utime.tv_usec = rusage.ru_utime.tv_usec;
-  tv->stime.tv_sec = rusage.ru_stime.tv_sec;
-  tv->stime.tv_usec = rusage.ru_stime.tv_usec;
-#else
-  {
-    long usec = get_run_time ();
+  using namespace std::chrono;
 
-    tv->utime.tv_sec = usec/1000000L;
-    tv->utime.tv_usec = usec - 1000000L*tv->utime.tv_sec;
-    tv->stime.tv_sec = 0;
-    tv->stime.tv_usec = 0;
-  }
-#endif
+  tv->wallclock = steady_clock::now ();
+  run_time_clock::now (tv->utime, tv->stime);
 }
 
 static void
-print_diff_now (struct mi_timestamp *start)
+print_diff_now (struct ui_file *file, struct mi_timestamp *start)
 {
   struct mi_timestamp now;
 
   timestamp (&now);
-  print_diff (start, &now);
+  print_diff (file, start, &now);
 }
 
 void
-mi_print_timing_maybe (void)
+mi_print_timing_maybe (struct ui_file *file)
 {
   /* If the command is -enable-timing then do_timings may be true
      whilst current_command_ts is not initialized.  */
   if (do_timings && current_command_ts)
-    print_diff_now (current_command_ts);
-}
-
-static long
-timeval_diff (struct timeval start, struct timeval end)
-{
-  return ((end.tv_sec - start.tv_sec) * 1000000L)
-    + (end.tv_usec - start.tv_usec);
+    print_diff_now (file, current_command_ts);
 }
 
 static void
-print_diff (struct mi_timestamp *start, struct mi_timestamp *end)
+print_diff (struct ui_file *file, struct mi_timestamp *start,
+	    struct mi_timestamp *end)
 {
+  using namespace std::chrono;
+
+  duration<double> wallclock = end->wallclock - start->wallclock;
+  duration<double> utime = end->utime - start->utime;
+  duration<double> stime = end->stime - start->stime;
+
   fprintf_unfiltered
-    (raw_stdout,
+    (file,
      ",time={wallclock=\"%0.5f\",user=\"%0.5f\",system=\"%0.5f\"}",
-     timeval_diff (start->wallclock, end->wallclock) / 1000000.0,
-     timeval_diff (start->utime, end->utime) / 1000000.0,
-     timeval_diff (start->stime, end->stime) / 1000000.0);
+     wallclock.count (), utime.count (), stime.count ());
 }
 
 void
 mi_cmd_trace_define_variable (char *command, char **argv, int argc)
 {
-  struct expression *expr;
   LONGEST initval = 0;
   struct trace_state_variable *tsv;
   char *name = 0;
@@ -2643,6 +2639,11 @@ mi_cmd_trace_save (char *command, char *
 	  break;
 	}
     }
+
+  if (argc - oind != 1)
+    error (_("Exactly one argument required "
+	     "(file in which to save trace data)"));
+
   filename = argv[oind];
 
   if (generate_ctf)
@@ -2684,38 +2685,33 @@ mi_cmd_ada_task_info (char *command, cha
 /* Print EXPRESSION according to VALUES.  */
 
 static void
-print_variable_or_computed (char *expression, enum print_values values)
+print_variable_or_computed (const char *expression, enum print_values values)
 {
-  struct expression *expr;
   struct cleanup *old_chain;
   struct value *val;
-  struct ui_file *stb;
-  struct value_print_options opts;
   struct type *type;
   struct ui_out *uiout = current_uiout;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
-  expr = parse_expression (expression);
-
-  make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_expression (expression);
 
   if (values == PRINT_SIMPLE_VALUES)
-    val = evaluate_type (expr);
+    val = evaluate_type (expr.get ());
   else
-    val = evaluate_expression (expr);
+    val = evaluate_expression (expr.get ());
 
+  old_chain = make_cleanup (null_cleanup, NULL);
   if (values != PRINT_NO_VALUES)
     make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-  ui_out_field_string (uiout, "name", expression);
+  uiout->field_string ("name", expression);
 
   switch (values)
     {
     case PRINT_SIMPLE_VALUES:
       type = check_typedef (value_type (val));
-      type_print (value_type (val), "", stb, -1);
-      ui_out_field_stream (uiout, "type", stb);
+      type_print (value_type (val), "", &stb, -1);
+      uiout->field_stream ("type", stb);
       if (TYPE_CODE (type) != TYPE_CODE_ARRAY
 	  && TYPE_CODE (type) != TYPE_CODE_STRUCT
 	  && TYPE_CODE (type) != TYPE_CODE_UNION)
@@ -2724,8 +2720,8 @@ print_variable_or_computed (char *expres
 
 	  get_no_prettyformat_print_options (&opts);
 	  opts.deref_ref = 1;
-	  common_val_print (val, stb, 0, &opts, current_language);
-	  ui_out_field_stream (uiout, "value", stb);
+	  common_val_print (val, &stb, 0, &opts, current_language);
+	  uiout->field_stream ("value", stb);
 	}
       break;
     case PRINT_ALL_VALUES:
@@ -2734,8 +2730,8 @@ print_variable_or_computed (char *expres
 
 	get_no_prettyformat_print_options (&opts);
 	opts.deref_ref = 1;
-	common_val_print (val, stb, 0, &opts, current_language);
-	ui_out_field_stream (uiout, "value", stb);
+	common_val_print (val, &stb, 0, &opts, current_language);
+	uiout->field_stream ("value", stb);
       }
       break;
     }
@@ -2755,8 +2751,8 @@ mi_cmd_trace_frame_collected (char *comm
   struct collection_list tracepoint_list, stepping_list;
   struct traceframe_info *tinfo;
   int oind = 0;
-  int var_print_values = PRINT_ALL_VALUES;
-  int comp_print_values = PRINT_ALL_VALUES;
+  enum print_values var_print_values = PRINT_ALL_VALUES;
+  enum print_values comp_print_values = PRINT_ALL_VALUES;
   int registers_format = 'x';
   int memory_contents = 0;
   struct ui_out *uiout = current_uiout;
@@ -2814,8 +2810,7 @@ mi_cmd_trace_frame_collected (char *comm
   old_chain = make_cleanup_restore_current_thread ();
   select_frame (get_current_frame ());
 
-  encode_actions_and_make_cleanup (tloc, &tracepoint_list,
-				   &stepping_list);
+  encode_actions (tloc, &tracepoint_list, &stepping_list);
 
   if (stepping_frame)
     clist = &stepping_list;
@@ -2827,13 +2822,19 @@ mi_cmd_trace_frame_collected (char *comm
   /* Explicitly wholly collected variables.  */
   {
     struct cleanup *list_cleanup;
-    char *p;
     int i;
 
     list_cleanup = make_cleanup_ui_out_list_begin_end (uiout,
 						       "explicit-variables");
-    for (i = 0; VEC_iterate (char_ptr, clist->wholly_collected, i, p); i++)
-      print_variable_or_computed (p, var_print_values);
+
+    const std::vector<std::string> &wholly_collected
+      = clist->wholly_collected ();
+    for (size_t i = 0; i < wholly_collected.size (); i++)
+      {
+	const std::string &str = wholly_collected[i];
+	print_variable_or_computed (str.c_str (), var_print_values);
+      }
+
     do_cleanups (list_cleanup);
   }
 
@@ -2846,8 +2847,14 @@ mi_cmd_trace_frame_collected (char *comm
     list_cleanup
       = make_cleanup_ui_out_list_begin_end (uiout,
 					    "computed-expressions");
-    for (i = 0; VEC_iterate (char_ptr, clist->computed, i, p); i++)
-      print_variable_or_computed (p, comp_print_values);
+
+    const std::vector<std::string> &computed = clist->computed ();
+    for (size_t i = 0; i < computed.size (); i++)
+      {
+	const std::string &str = computed[i];
+	print_variable_or_computed (str.c_str (), comp_print_values);
+      }
+
     do_cleanups (list_cleanup);
   }
 
@@ -2903,19 +2910,19 @@ mi_cmd_trace_frame_collected (char *comm
 
 	if (tsv != NULL)
 	  {
-	    tsvname = xrealloc (tsvname, strlen (tsv->name) + 2);
+	    tsvname = (char *) xrealloc (tsvname, strlen (tsv->name) + 2);
 	    tsvname[0] = '$';
 	    strcpy (tsvname + 1, tsv->name);
-	    ui_out_field_string (uiout, "name", tsvname);
+	    uiout->field_string ("name", tsvname);
 
 	    tsv->value_known = target_get_trace_state_variable_value (tsv->number,
 								      &tsv->value);
-	    ui_out_field_int (uiout, "current", tsv->value);
+	    uiout->field_int ("current", tsv->value);
 	  }
 	else
 	  {
-	    ui_out_field_skip (uiout, "name");
-	    ui_out_field_skip (uiout, "current");
+	    uiout->field_skip ("name");
+	    uiout->field_skip ("current");
 	  }
 
 	do_cleanups (cleanup_child);
@@ -2944,10 +2951,10 @@ mi_cmd_trace_frame_collected (char *comm
 
 	cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-	ui_out_field_core_addr (uiout, "address", gdbarch, r->start);
-	ui_out_field_int (uiout, "length", r->length);
+	uiout->field_core_addr ("address", gdbarch, r->start);
+	uiout->field_int ("length", r->length);
 
-	data = xmalloc (r->length);
+	data = (gdb_byte *) xmalloc (r->length);
 	make_cleanup (xfree, data);
 
 	if (memory_contents)
@@ -2957,15 +2964,15 @@ mi_cmd_trace_frame_collected (char *comm
 		int m;
 		char *data_str, *p;
 
-		data_str = xmalloc (r->length * 2 + 1);
+		data_str = (char *) xmalloc (r->length * 2 + 1);
 		make_cleanup (xfree, data_str);
 
 		for (m = 0, p = data_str; m < r->length; ++m, p += 2)
 		  sprintf (p, "%02x", data[m]);
-		ui_out_field_string (uiout, "contents", data_str);
+		uiout->field_string ("contents", data_str);
 	      }
 	    else
-	      ui_out_field_skip (uiout, "contents");
+	      uiout->field_skip ("contents");
 	  }
 	do_cleanups (cleanup_child);
       }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-main.h ./gdb/mi/mi-main.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-main.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-main.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Internal Functions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,13 +20,15 @@
 #ifndef MI_MAIN_H
 #define MI_MAIN_H
 
+struct ui_file;
+
 extern void mi_load_progress (const char *section_name,
 			      unsigned long sent_so_far,
 			      unsigned long total_section,
 			      unsigned long total_sent,
 			      unsigned long grand_total);
 
-extern void mi_print_timing_maybe (void);
+extern void mi_print_timing_maybe (struct ui_file *file);
 
 /* Whether MI is in async mode.  */
 
@@ -47,6 +49,8 @@ struct mi_suppress_notification
   int traceframe;
   /* Memory changed notification suppressed?  */
   int memory;
+  /* User selected context changed notification suppressed?  */
+  int user_selected_context;
 };
 extern struct mi_suppress_notification mi_suppress_notification;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-out.c ./gdb/mi/mi-out.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-out.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-out.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Command Set - output generating routines.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -22,188 +22,87 @@
 #include "defs.h"
 #include "ui-out.h"
 #include "mi-out.h"
-
-struct ui_out_data
-  {
-    int suppress_field_separator;
-    int suppress_output;
-    int mi_version;
-    struct ui_file *buffer;
-    struct ui_file *original_buffer;
-  };
-typedef struct ui_out_data mi_out_data;
-
-/* These are the MI output functions */
-
-static void mi_table_begin (struct ui_out *uiout, int nbrofcols,
-			    int nr_rows, const char *tblid);
-static void mi_table_body (struct ui_out *uiout);
-static void mi_table_end (struct ui_out *uiout);
-static void mi_table_header (struct ui_out *uiout, int width,
-			     enum ui_align alig, const char *col_name,
-			     const char *colhdr);
-static void mi_begin (struct ui_out *uiout, enum ui_out_type type,
-		      int level, const char *id);
-static void mi_end (struct ui_out *uiout, enum ui_out_type type, int level);
-static void mi_field_int (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align alig, const char *fldname, int value);
-static void mi_field_skip (struct ui_out *uiout, int fldno, int width,
-			   enum ui_align alig, const char *fldname);
-static void mi_field_string (struct ui_out *uiout, int fldno, int width,
-			     enum ui_align alig, const char *fldname,
-			     const char *string);
-static void mi_field_fmt (struct ui_out *uiout, int fldno,
-			  int width, enum ui_align align,
-			  const char *fldname, const char *format,
-			  va_list args) ATTRIBUTE_PRINTF (6, 0);
-static void mi_spaces (struct ui_out *uiout, int numspaces);
-static void mi_text (struct ui_out *uiout, const char *string);
-static void mi_message (struct ui_out *uiout, int verbosity,
-			const char *format, va_list args)
-     ATTRIBUTE_PRINTF (3, 0);
-static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
-static void mi_flush (struct ui_out *uiout);
-static int mi_redirect (struct ui_out *uiout, struct ui_file *outstream);
-
-/* This is the MI ui-out implementation functions vector */
-
-static const struct ui_out_impl mi_ui_out_impl =
-{
-  mi_table_begin,
-  mi_table_body,
-  mi_table_end,
-  mi_table_header,
-  mi_begin,
-  mi_end,
-  mi_field_int,
-  mi_field_skip,
-  mi_field_string,
-  mi_field_fmt,
-  mi_spaces,
-  mi_text,
-  mi_message,
-  mi_wrap_hint,
-  mi_flush,
-  mi_redirect,
-  0,
-  1, /* Needs MI hacks.  */
-};
-
-/* Prototypes for local functions */
-
-extern void _initialize_mi_out (void);
-static void field_separator (struct ui_out *uiout);
-static void mi_open (struct ui_out *uiout, const char *name,
-		     enum ui_out_type type);
-static void mi_close (struct ui_out *uiout, enum ui_out_type type);
+#include <vector>
 
 /* Mark beginning of a table.  */
 
 void
-mi_table_begin (struct ui_out *uiout,
-		int nr_cols,
-		int nr_rows,
-		const char *tblid)
-{
-  mi_open (uiout, tblid, ui_out_type_tuple);
-  mi_field_int (uiout, -1, -1, -1, "nr_rows", nr_rows);
-  mi_field_int (uiout, -1, -1, -1, "nr_cols", nr_cols);
-  mi_open (uiout, "hdr", ui_out_type_list);
+mi_ui_out::do_table_begin (int nr_cols, int nr_rows,
+			   const char *tblid)
+{
+  open (tblid, ui_out_type_tuple);
+  do_field_int (-1, -1, ui_left, "nr_rows", nr_rows);
+  do_field_int (-1, -1, ui_left, "nr_cols", nr_cols);
+  open ("hdr", ui_out_type_list);
 }
 
 /* Mark beginning of a table body.  */
 
 void
-mi_table_body (struct ui_out *uiout)
+mi_ui_out::do_table_body ()
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
   /* close the table header line if there were any headers */
-  mi_close (uiout, ui_out_type_list);
-  mi_open (uiout, "body", ui_out_type_list);
+  close (ui_out_type_list);
+  open ("body", ui_out_type_list);
 }
 
 /* Mark end of a table.  */
 
 void
-mi_table_end (struct ui_out *uiout)
+mi_ui_out::do_table_end ()
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  data->suppress_output = 0;
-  mi_close (uiout, ui_out_type_list); /* body */
-  mi_close (uiout, ui_out_type_tuple);
+  close (ui_out_type_list); /* body */
+  close (ui_out_type_tuple);
 }
 
 /* Specify table header.  */
 
 void
-mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		 const char *col_name, const char *colhdr)
-{
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
-
-  mi_open (uiout, NULL, ui_out_type_tuple);
-  mi_field_int (uiout, 0, 0, 0, "width", width);
-  mi_field_int (uiout, 0, 0, 0, "alignment", alignment);
-  mi_field_string (uiout, 0, 0, 0, "col_name", col_name);
-  mi_field_string (uiout, 0, width, alignment, "colhdr", colhdr);
-  mi_close (uiout, ui_out_type_tuple);
+mi_ui_out::do_table_header (int width, ui_align alignment,
+			    const std::string &col_name,
+			    const std::string &col_hdr)
+{
+  open (NULL, ui_out_type_tuple);
+  do_field_int (0, 0, ui_center, "width", width);
+  do_field_int (0, 0, ui_center, "alignment", alignment);
+  do_field_string (0, 0, ui_center, "col_name", col_name.c_str ());
+  do_field_string (0, width, alignment, "colhdr", col_hdr.c_str ());
+  close (ui_out_type_tuple);
 }
 
 /* Mark beginning of a list.  */
 
 void
-mi_begin (struct ui_out *uiout, enum ui_out_type type, int level,
-	  const char *id)
+mi_ui_out::do_begin (ui_out_type type, const char *id)
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
-
-  mi_open (uiout, id, type);
+  open (id, type);
 }
 
 /* Mark end of a list.  */
 
 void
-mi_end (struct ui_out *uiout, enum ui_out_type type, int level)
+mi_ui_out::do_end (ui_out_type type)
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
-
-  mi_close (uiout, type);
+  close (type);
 }
 
 /* Output an int field.  */
 
-static void
-mi_field_int (struct ui_out *uiout, int fldno, int width,
-              enum ui_align alignment, const char *fldname, int value)
+void
+mi_ui_out::do_field_int (int fldno, int width, ui_align alignment,
+			 const char *fldname, int value)
 {
   char buffer[20];	/* FIXME: how many chars long a %d can become? */
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
 
   xsnprintf (buffer, sizeof (buffer), "%d", value);
-  mi_field_string (uiout, fldno, width, alignment, fldname, buffer);
+  do_field_string (fldno, width, alignment, fldname, buffer);
 }
 
 /* Used to omit a field.  */
 
 void
-mi_field_skip (struct ui_out *uiout, int fldno, int width,
-               enum ui_align alignment, const char *fldname)
+mi_ui_out::do_field_skip (int fldno, int width, ui_align alignment,
+			  const char *fldname)
 {
 }
 
@@ -211,203 +110,217 @@ mi_field_skip (struct ui_out *uiout, int
    separators are both handled by mi_field_string. */
 
 void
-mi_field_string (struct ui_out *uiout, int fldno, int width,
-		 enum ui_align align, const char *fldname, const char *string)
+mi_ui_out::do_field_string (int fldno, int width, ui_align align,
+			    const char *fldname, const char *string)
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_output)
-    return;
+  ui_file *stream = m_streams.back ();
+  field_separator ();
 
-  field_separator (uiout);
   if (fldname)
-    fprintf_unfiltered (data->buffer, "%s=", fldname);
-  fprintf_unfiltered (data->buffer, "\"");
+    fprintf_unfiltered (stream, "%s=", fldname);
+  fprintf_unfiltered (stream, "\"");
   if (string)
-    fputstr_unfiltered (string, '"', data->buffer);
-  fprintf_unfiltered (data->buffer, "\"");
+    fputstr_unfiltered (string, '"', stream);
+  fprintf_unfiltered (stream, "\"");
 }
 
 /* This is the only field function that does not align.  */
 
 void
-mi_field_fmt (struct ui_out *uiout, int fldno, int width,
-	      enum ui_align align, const char *fldname,
-	      const char *format, va_list args)
+mi_ui_out::do_field_fmt (int fldno, int width, ui_align align,
+			 const char *fldname, const char *format,
+			 va_list args)
 {
-  mi_out_data *data = ui_out_data (uiout);
+  ui_file *stream = m_streams.back ();
+  field_separator ();
 
-  if (data->suppress_output)
-    return;
-
-  field_separator (uiout);
   if (fldname)
-    fprintf_unfiltered (data->buffer, "%s=\"", fldname);
+    fprintf_unfiltered (stream, "%s=\"", fldname);
   else
-    fputs_unfiltered ("\"", data->buffer);
-  vfprintf_unfiltered (data->buffer, format, args);
-  fputs_unfiltered ("\"", data->buffer);
+    fputs_unfiltered ("\"", stream);
+  vfprintf_unfiltered (stream, format, args);
+  fputs_unfiltered ("\"", stream);
 }
 
 void
-mi_spaces (struct ui_out *uiout, int numspaces)
+mi_ui_out::do_spaces (int numspaces)
 {
 }
 
 void
-mi_text (struct ui_out *uiout, const char *string)
+mi_ui_out::do_text (const char *string)
 {
 }
 
 void
-mi_message (struct ui_out *uiout, int verbosity,
-	    const char *format, va_list args)
+mi_ui_out::do_message (const char *format, va_list args)
 {
 }
 
 void
-mi_wrap_hint (struct ui_out *uiout, char *identstring)
+mi_ui_out::do_wrap_hint (const char *identstring)
 {
   wrap_here (identstring);
 }
 
 void
-mi_flush (struct ui_out *uiout)
+mi_ui_out::do_flush ()
 {
-  mi_out_data *data = ui_out_data (uiout);
 
-  gdb_flush (data->buffer);
+  gdb_flush (m_streams.back ());
 }
 
-int
-mi_redirect (struct ui_out *uiout, struct ui_file *outstream)
+void
+mi_ui_out::do_redirect (ui_file *outstream)
 {
-  mi_out_data *data = ui_out_data (uiout);
-
   if (outstream != NULL)
-    {
-      data->original_buffer = data->buffer;
-      data->buffer = outstream;
-    }
-  else if (data->original_buffer != NULL)
-    {
-      data->buffer = data->original_buffer;
-      data->original_buffer = NULL;
-    }
-
-  return 0;
+    m_streams.push_back (outstream);
+  else
+    m_streams.pop_back ();
 }
 
-/* local functions */
-
-/* access to ui_out format private members */
-
-static void
-field_separator (struct ui_out *uiout)
+void
+mi_ui_out::field_separator ()
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  if (data->suppress_field_separator)
-    data->suppress_field_separator = 0;
+  if (m_suppress_field_separator)
+    m_suppress_field_separator = false;
   else
-    fputc_unfiltered (',', data->buffer);
+    fputc_unfiltered (',', m_streams.back ());
 }
 
-static void
-mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type)
+void
+mi_ui_out::open (const char *name, ui_out_type type)
 {
-  mi_out_data *data = ui_out_data (uiout);
+  ui_file *stream = m_streams.back ();
+
+  field_separator ();
+  m_suppress_field_separator = true;
 
-  field_separator (uiout);
-  data->suppress_field_separator = 1;
   if (name)
-    fprintf_unfiltered (data->buffer, "%s=", name);
+    fprintf_unfiltered (stream, "%s=", name);
+
   switch (type)
     {
     case ui_out_type_tuple:
-      fputc_unfiltered ('{', data->buffer);
+      fputc_unfiltered ('{', stream);
       break;
+
     case ui_out_type_list:
-      fputc_unfiltered ('[', data->buffer);
+      fputc_unfiltered ('[', stream);
       break;
+
     default:
       internal_error (__FILE__, __LINE__, _("bad switch"));
     }
 }
 
-static void
-mi_close (struct ui_out *uiout, enum ui_out_type type)
+void
+mi_ui_out::close (ui_out_type type)
 {
-  mi_out_data *data = ui_out_data (uiout);
+  ui_file *stream = m_streams.back ();
 
   switch (type)
     {
     case ui_out_type_tuple:
-      fputc_unfiltered ('}', data->buffer);
+      fputc_unfiltered ('}', stream);
       break;
+
     case ui_out_type_list:
-      fputc_unfiltered (']', data->buffer);
+      fputc_unfiltered (']', stream);
       break;
+
     default:
       internal_error (__FILE__, __LINE__, _("bad switch"));
     }
-  data->suppress_field_separator = 0;
-}
 
-/* Add a string to the buffer.  */
+  m_suppress_field_separator = false;
+}
 
-void
-mi_out_buffered (struct ui_out *uiout, char *string)
+string_file *
+mi_ui_out::main_stream ()
 {
-  mi_out_data *data = ui_out_data (uiout);
+  gdb_assert (m_streams.size () == 1);
 
-  fprintf_unfiltered (data->buffer, "%s", string);
+  return (string_file *) m_streams.back ();
 }
 
 /* Clear the buffer.  */
 
 void
-mi_out_rewind (struct ui_out *uiout)
+mi_ui_out::rewind ()
 {
-  mi_out_data *data = ui_out_data (uiout);
-
-  ui_file_rewind (data->buffer);
+  main_stream ()->clear ();
 }
 
 /* Dump the buffer onto the specified stream.  */
 
 void
-mi_out_put (struct ui_out *uiout, struct ui_file *stream)
+mi_ui_out::put (ui_file *where)
 {
-  mi_out_data *data = ui_out_data (uiout);
+  string_file *mi_stream = main_stream ();
 
-  ui_file_put (data->buffer, ui_file_write_for_put, stream);
-  ui_file_rewind (data->buffer);
+  where->write (mi_stream->data (), mi_stream->size ());
+  mi_stream->clear ();
 }
 
 /* Return the current MI version.  */
 
 int
-mi_version (struct ui_out *uiout)
+mi_ui_out::version ()
 {
-  mi_out_data *data = ui_out_data (uiout);
+  return m_mi_version;
+}
+
+/* Constructor for an `mi_out_data' object.  */
+
+mi_ui_out::mi_ui_out (int mi_version)
+: m_suppress_field_separator (false),
+  m_suppress_output (false),
+  m_mi_version (mi_version)
+{
+  string_file *stream = new string_file ();
+  m_streams.push_back (stream);
+}
 
-  return data->mi_version;
+mi_ui_out::~mi_ui_out ()
+{
 }
 
 /* Initialize private members at startup.  */
 
-struct ui_out *
+mi_ui_out *
 mi_out_new (int mi_version)
 {
-  int flags = 0;
+  return new mi_ui_out (mi_version);
+}
+
+/* Helper function to return the given UIOUT as an mi_ui_out.  It is an error
+   to call this function with an ui_out that is not an MI.  */
 
-  mi_out_data *data = XNEW (mi_out_data);
-  data->suppress_field_separator = 0;
-  data->suppress_output = 0;
-  data->mi_version = mi_version;
-  /* FIXME: This code should be using a ``string_file'' and not the
-     TUI buffer hack. */
-  data->buffer = mem_fileopen ();
-  return ui_out_new (&mi_ui_out_impl, data, flags);
+static mi_ui_out *
+as_mi_ui_out (ui_out *uiout)
+{
+  mi_ui_out *mi_uiout = dynamic_cast<mi_ui_out *> (uiout);
+
+  gdb_assert (mi_uiout != NULL);
+
+  return mi_uiout;
+}
+
+int
+mi_version (ui_out *uiout)
+{
+  return as_mi_ui_out (uiout)->version ();
+}
+
+void
+mi_out_put (ui_out *uiout, struct ui_file *stream)
+{
+  return as_mi_ui_out (uiout)->put (stream);
+}
+
+void
+mi_out_rewind (ui_out *uiout)
+{
+  return as_mi_ui_out (uiout)->rewind ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-out.h ./gdb/mi/mi-out.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-out.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-out.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - MI output generating routines for GDB.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -20,15 +20,78 @@
 #ifndef MI_OUT_H
 #define MI_OUT_H 1
 
+#include <vector>
+
 struct ui_out;
 struct ui_file;
 
-extern struct ui_out *mi_out_new (int mi_version);
-extern void mi_out_put (struct ui_out *uiout, struct ui_file *stream);
-extern void mi_out_rewind (struct ui_out *uiout);
-extern void mi_out_buffered (struct ui_out *uiout, char *string);
 
-/* Return the version number of the current MI.  */
-extern int mi_version (struct ui_out *uiout);
+class mi_ui_out : public ui_out
+{
+public:
+
+  explicit mi_ui_out (int mi_version);
+  virtual ~mi_ui_out ();
+
+  /* MI-specific */
+  void rewind ();
+  void put (struct ui_file *stream);
+
+  /* Return the version number of the current MI.  */
+  int version ();
+
+protected:
+
+  virtual void do_table_begin (int nbrofcols, int nr_rows, const char *tblid)
+    override;
+  virtual void do_table_body () override;
+  virtual void do_table_header (int width, ui_align align,
+			     const std::string &col_name,
+			     const std::string &col_hdr) override;
+  virtual void do_table_end () override;
+
+  virtual void do_begin (ui_out_type type, const char *id) override;
+  virtual void do_end (ui_out_type type) override;
+  virtual void do_field_int (int fldno, int width, ui_align align,
+			  const char *fldname, int value) override;
+  virtual void do_field_skip (int fldno, int width, ui_align align,
+			   const char *fldname) override;
+  virtual void do_field_string (int fldno, int width, ui_align align,
+			     const char *fldname, const char *string) override;
+  virtual void do_field_fmt (int fldno, int width, ui_align align,
+			  const char *fldname, const char *format, va_list args)
+    override ATTRIBUTE_PRINTF (6,0);
+  virtual void do_spaces (int numspaces) override;
+  virtual void do_text (const char *string) override;
+  virtual void do_message (const char *format, va_list args) override
+    ATTRIBUTE_PRINTF (2,0);
+  virtual void do_wrap_hint (const char *identstring) override;
+  virtual void do_flush () override;
+  virtual void do_redirect (struct ui_file *outstream) override;
+
+  virtual bool do_is_mi_like_p () override
+  { return true; }
+
+private:
+
+  void field_separator ();
+  void open (const char *name, ui_out_type type);
+  void close (ui_out_type type);
+
+  /* Convenience method that returns the MI out's string stream cast
+     to its appropriate type.  Assumes/asserts that output was not
+     redirected.  */
+  string_file *main_stream ();
+
+  bool m_suppress_field_separator;
+  bool m_suppress_output;
+  int m_mi_version;
+  std::vector<ui_file *> m_streams;
+};
+
+mi_ui_out *mi_out_new (int mi_version);
+int mi_version (ui_out *uiout);
+void mi_out_put (ui_out *uiout, struct ui_file *stream);
+void mi_out_rewind (ui_out *uiout);
 
 #endif /* MI_OUT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-parse.c ./gdb/mi/mi-parse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-parse.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-parse.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* MI Command Set - MI parser.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -111,7 +111,7 @@ mi_parse_argv (const char *args, struct 
 {
   const char *chp = args;
   int argc = 0;
-  char **argv = xmalloc ((argc + 1) * sizeof (char *));
+  char **argv = XNEWVEC (char *, argc + 1);
 
   argv[argc] = NULL;
   while (1)
@@ -165,7 +165,7 @@ mi_parse_argv (const char *args, struct 
 		return;
 	      }
 	    /* Create the buffer and copy characters in.  */
-	    arg = xmalloc ((len + 1) * sizeof (char));
+	    arg = XNEWVEC (char, len + 1);
 	    chp = start;
 	    len = 0;
 	    while (*chp != '\0' && *chp != '"')
@@ -195,14 +195,14 @@ mi_parse_argv (const char *args, struct 
 		chp++;
 	      }
 	    len = chp - start;
-	    arg = xmalloc ((len + 1) * sizeof (char));
+	    arg = XNEWVEC (char, len + 1);
 	    strncpy (arg, start, len);
 	    arg[len] = '\0';
 	    break;
 	  }
 	}
       /* Append arg to argv.  */
-      argv = xrealloc (argv, (argc + 2) * sizeof (char *));
+      argv = XRESIZEVEC (char *, argv, argc + 2);
       argv[argc++] = arg;
       argv[argc] = NULL;
     }
@@ -229,7 +229,7 @@ mi_parse_free (struct mi_parse *parse)
 static void
 mi_parse_cleanup (void *arg)
 {
-  mi_parse_free (arg);
+  mi_parse_free ((struct mi_parse *) arg);
 }
 
 struct mi_parse *
@@ -254,7 +254,7 @@ mi_parse (const char *cmd, char **token)
   /* Find/skip any token and then extract it.  */
   for (chp = cmd; *chp >= '0' && *chp <= '9'; chp++)
     ;
-  *token = xmalloc (chp - cmd + 1);
+  *token = (char *) xmalloc (chp - cmd + 1);
   memcpy (*token, cmd, (chp - cmd));
   (*token)[chp - cmd] = '\0';
 
@@ -276,7 +276,7 @@ mi_parse (const char *cmd, char **token)
 
     for (; *chp && !isspace (*chp); chp++)
       ;
-    parse->command = xmalloc (chp - tmp + 1);
+    parse->command = (char *) xmalloc (chp - tmp + 1);
     memcpy (parse->command, tmp, chp - tmp);
     parse->command[chp - tmp] = '\0';
   }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-parse.h ./gdb/mi/mi-parse.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-parse.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-parse.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - MI Command Parser.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -20,15 +20,18 @@
 #ifndef MI_PARSE_H
 #define MI_PARSE_H
 
-#include <sys/time.h>
+#include "run-time-clock.h"
+#include <chrono>
+#include "mi-cmds.h"  /* For enum print_values.  */
 
 /* MI parser */
 
 /* Timestamps for current command and last asynchronous command.  */
-struct mi_timestamp {
-  struct timeval wallclock;
-  struct timeval utime;
-  struct timeval stime;
+struct mi_timestamp
+{
+  std::chrono::steady_clock::time_point wallclock;
+  user_cpu_time_clock::time_point utime;
+  system_cpu_time_clock::time_point stime;
 };
 
 enum mi_command_type
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-symbol-cmds.c ./gdb/mi/mi-symbol-cmds.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mi/mi-symbol-cmds.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mi/mi-symbol-cmds.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* MI Command Set - symbol commands.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -56,9 +56,8 @@ mi_cmd_symbol_list_lines (char *command,
     for (i = 0; i < SYMTAB_LINETABLE (s)->nitems; i++)
     {
       cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-      ui_out_field_core_addr (uiout, "pc", gdbarch,
-			      SYMTAB_LINETABLE (s)->item[i].pc);
-      ui_out_field_int (uiout, "line", SYMTAB_LINETABLE (s)->item[i].line);
+      uiout->field_core_addr ("pc", gdbarch, SYMTAB_LINETABLE (s)->item[i].pc);
+      uiout->field_int ("line", SYMTAB_LINETABLE (s)->item[i].line);
       do_cleanups (cleanup_tuple);
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-linux-tdep.c ./gdb/microblaze-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/microblaze-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Xilinx MicroBlaze.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,8 +49,6 @@ microblaze_linux_memory_remove_breakpoin
 
   /* Determine appropriate breakpoint contents and size for this address.  */
   bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-  if (bp == NULL)
-    error (_("Software breakpoints not implemented for this target."));
 
   val = target_read_memory (addr, old_contents, bplen);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-rom.c ./gdb/microblaze-rom.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-rom.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/microblaze-rom.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,192 +0,0 @@
-/* Remote debugging interface to Xilinx MicroBlaze.
-
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-void _initialize_picobug_rom (void);
-
-static char *picobug_inits[] =
-{"\r", NULL};
-
-static struct target_ops picobug_ops;
-static struct monitor_ops picobug_cmds;
-
-/* Picobug only supports a subset of registers from MCore.  In reality,
-   it doesn't support ss1, either.  */
-static char *picobug_regnames[] = {
-  "r0",   "r1",   "r2",   "r3",   "r4",   "r5",   "r6",   "r7",
-  "r8",   "r9",   "r10",  "r11",  "r12",  "r13",  "r14",  "r15",
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  "psr",  "vbr",  "epsr", "fpsr", "epc",  "fpc",  0,      "ss1",
-  "ss2",  "ss3",  "ss4",  0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  "pc" };
-
-
-
-static void
-picobug_open (const char *args, int from_tty)
-{
-  monitor_open (args, &picobug_cmds, from_tty);
-}
-/* We choose to write our own dumpregs routine, since the output of
-   the register dumping is rather difficult to encapsulate in a
-   regexp:
-
-picobug> rd
-     pc 2f00031e      epc 2f00031e      fpc 00000000
-    psr 80000101     epsr 80000101     fpsr 00000000
-ss0-ss4 bad0beef 00000000 00000000 00000000 00000000      vbr 30005c00
-  r0-r7 2f0fff4c 00000090 00000001 00000002 00000003 00000004 00000005 00000006
- r8-r15 2f0fff64 00000000 00000000 00000000 00000000 00000000 00000000 2f00031e
-*/
-
-static int
-picobug_dumpregs (struct regcache *regcache)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  char buf[1024];
-  int resp_len;
-  char *p;
-
-  /* Send the dump register command to the monitor and
-     get the reply.  */
-  monitor_printf (picobug_cmds.dump_registers);
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));
-
-  p = strtok (buf, " \t\r\n");
-  while (p)
-    {
-      if (strchr (p, '-'))
-	{
-	  /* Got a range.  Either r0-r7, r8-r15 or ss0-ss4.  */
-	  if (startswith (p, "r0") || startswith (p, "r8"))
-	    {
-	      int rn = (p[1] == '0' ? 0 : 8);
-	      int i = 0;
-
-	      /* Get the next 8 values and record them.  */
-	      while (i < 8)
-		{
-		  p = strtok (NULL, " \t\r\n");
-		  if (p)
-		    monitor_supply_register (regcache, rn + i, p);
-		  i++;
-		}
-	    }
-	  else if (startswith (p, "ss"))
-	    {
-	      /* Get the next five values, ignoring the first.  */
-	      int rn;
-	      p = strtok (NULL, " \t\r\n");
-	      for (rn = 39; rn < 43; rn++)
-		{
-		  p = strtok (NULL, " \t\r\n");
-		  if (p)
-		    monitor_supply_register (regcache, rn, p);
-		}
-	    }
-	  else
-	    {
-	      break;
-	    }
-	}
-      else
-	{
-	  /* Simple register type, paired.  */
-	  char *name = p;
-	  int i;
-
-	  /* Get and record value.  */
-	  p = strtok (NULL, " \t\r\n");
-	  if (p)
-	    {
-	      for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
-		{
-		  if (picobug_regnames[i]
-		      && strcmp (picobug_regnames[i], name) == 0)
-		    break;
-		}
-
-	      if (i <= gdbarch_num_regs (gdbarch))
-		monitor_supply_register (regcache, i, p);
-	    }
-	}
-      p = strtok (NULL, " \t\r\n");
-    }
-
-  return 0;
-}
-
-static void
-init_picobug_cmds (void)
-{
-  picobug_cmds.flags = MO_GETMEM_NEEDS_RANGE | MO_CLR_BREAK_USES_ADDR
-		       | MO_PRINT_PROGRAM_OUTPUT;
-
-  picobug_cmds.init = picobug_inits;		/* Init strings		*/
-  picobug_cmds.cont = "g\n";			/* continue command	*/
-  picobug_cmds.step = "s\n";			/* single step		*/
-  picobug_cmds.set_break = "br %x\n";		/* set a breakpoint	*/
-  picobug_cmds.clr_break = "nobr %x\n";		/* clear a breakpoint	*/
-  picobug_cmds.clr_all_break = "nobr\n";	/* clear all breakpoints */
-  picobug_cmds.setmem.cmdb = "mm %x %x ;b\n";	/* setmem.cmdb (addr, value) */
-  picobug_cmds.setmem.cmdw = "mm %x %x ;h\n";	/* setmem.cmdw (addr, value) */
-  picobug_cmds.setmem.cmdl = "mm %x %x ;w\n";	/* setmem.cmdl (addr, value) */
-  picobug_cmds.getmem.cmdb = "md %x %x\n";	/* getmem.cmdb (start addr,
-						   end addr) 		*/
-  picobug_cmds.getmem.resp_delim = ":";		/* getmem.resp_delim	*/
-  picobug_cmds.setreg.cmd = "rm %s %x\n";	/* setreg.cmd (name, value) */
-  picobug_cmds.getreg.cmd = "rd %s\n";		/* getreg.cmd (name)	*/
-  picobug_cmds.getreg.resp_delim = ":";		/* getreg.resp_delim	*/
-  picobug_cmds.dump_registers = "rd\n";		/* dump_registers	*/
-  picobug_cmds.dumpregs = picobug_dumpregs;	/* dump registers parser */
-  picobug_cmds.load = "lo\n";			/* download command	*/
-  picobug_cmds.prompt = "picobug> ";		/* monitor command prompt */
-  picobug_cmds.line_term = "\n";		/* end-of-line terminator */
-  picobug_cmds.target = &picobug_ops;		/* target operations	*/
-  picobug_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits	*/
-  picobug_cmds.regnames = picobug_regnames;	/* registers names	*/
-  picobug_cmds.num_breakpoints = 20;		/* number of breakpoints */
-  picobug_cmds.magic = MONITOR_OPS_MAGIC;	/* magic		*/
-}
-
-void
-_initialize_picobug_rom (void)
-{
-  int i;
-
-  /* Initialize m32r RevC monitor target.  */
-  init_picobug_cmds ();
-  init_monitor_ops (&picobug_ops);
-  picobug_ops.to_shortname = "picobug";
-  picobug_ops.to_longname = "picobug monitor";
-  picobug_ops.to_doc = "Debug via the picobug monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  picobug_ops.to_open = picobug_open;
-
-  add_target (&picobug_ops);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-tdep.c ./gdb/microblaze-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/microblaze-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Xilinx MicroBlaze.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -134,15 +134,10 @@ microblaze_fetch_instruction (CORE_ADDR 
   return extract_unsigned_integer (buf, 4, byte_order);
 }
 
-static const gdb_byte *
-microblaze_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, 
-			       int *len)
-{
-  static gdb_byte break_insn[] = MICROBLAZE_BREAKPOINT;
+constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT;
+
+typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint;
 
-  *len = sizeof (break_insn);
-  return break_insn;
-}
 
 /* Allocate and initialize a frame cache.  */
 
@@ -437,11 +432,10 @@ microblaze_frame_cache (struct frame_inf
 {
   struct microblaze_frame_cache *cache;
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
-  CORE_ADDR func;
   int rn;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct microblaze_frame_cache *) *this_cache;
 
   cache = microblaze_alloc_frame_cache ();
   *this_cache = cache;
@@ -451,7 +445,8 @@ microblaze_frame_cache (struct frame_inf
   for (rn = 0; rn < gdbarch_num_regs (gdbarch); rn++)
     cache->register_offsets[rn] = -1;
 
-  func = get_frame_func (next_frame);
+  /* Call for side effects.  */
+  get_frame_func (next_frame);
 
   cache->pc = get_frame_address_in_block (next_frame);
 
@@ -638,8 +633,9 @@ static int dwarf2_to_reg_map[78] =
 static int
 microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
-  gdb_assert ((size_t) reg < sizeof (dwarf2_to_reg_map));
-  return dwarf2_to_reg_map[reg];
+  if (reg >= 0 && reg < sizeof (dwarf2_to_reg_map))
+    return dwarf2_to_reg_map[reg];
+  return -1;
 }
 
 static void
@@ -735,7 +731,10 @@ microblaze_gdbarch_init (struct gdbarch_
   /* Stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, microblaze_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       microblaze_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       microblaze_breakpoint::bp_from_kind);
 
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-tdep.h ./gdb/microblaze-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/microblaze-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/microblaze-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Xilinx MicroBlaze.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mingw-hdep.c ./gdb/mingw-hdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mingw-hdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mingw-hdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Host support routines for MinGW, for GDB, the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,14 +27,6 @@
 
 #include <windows.h>
 
-/* This event is signalled whenever an asynchronous SIGINT handler
-   needs to perform an action in the main thread.  */
-static HANDLE sigint_event;
-
-/* When SIGINT_EVENT is signalled, gdb_select will call this
-   function.  */
-struct async_signal_handler *sigint_handler;
-
 /* Return an absolute file name of the running GDB, if possible, or
    ARGV0 if not.  The return value is in malloc'ed storage.  */
 
@@ -120,8 +112,7 @@ gdb_select (int n, fd_set *readfds, fd_s
 	}
     }
 
-  gdb_assert (num_handles < MAXIMUM_WAIT_OBJECTS);
-  handles[num_handles++] = sigint_event;
+  gdb_assert (num_handles <= MAXIMUM_WAIT_OBJECTS);
 
   event = WaitForMultipleObjects (num_handles,
 				  handles,
@@ -184,46 +175,5 @@ gdb_select (int n, fd_set *readfds, fd_s
   while (RL_ISSTATE (RL_STATE_SIGHANDLER))
     Sleep (1);
 
-  if (h == sigint_event
-      || WaitForSingleObject (sigint_event, 0) == WAIT_OBJECT_0)
-    {
-      if (sigint_handler != NULL)
-	call_async_signal_handler (sigint_handler);
-
-      if (num_ready == 0)
-	{
-	  errno = EINTR;
-	  return -1;
-	}
-    }
-
   return num_ready;
 }
-
-/* Wrapper for the body of signal handlers.  On Windows systems, a
-   SIGINT handler runs in its own thread.  We can't longjmp from
-   there, and we shouldn't even prompt the user.  Delay HANDLER
-   until the main thread is next in gdb_select.  */
-
-void
-gdb_call_async_signal_handler (struct async_signal_handler *handler,
-			       int immediate_p)
-{
-  if (immediate_p)
-    sigint_handler = handler;
-  else
-    {
-      mark_async_signal_handler (handler);
-      sigint_handler = NULL;
-    }
-  SetEvent (sigint_event);
-}
-
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_mingw_hdep;
-
-void
-_initialize_mingw_hdep (void)
-{
-  sigint_event = CreateEvent (0, FALSE, FALSE, 0);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minidebug.c ./gdb/minidebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minidebug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/minidebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Read MiniDebugInfo data from an objfile.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdbcore.h"
+#include <algorithm>
 
 #ifdef HAVE_LIBLZMA
 
@@ -76,7 +77,7 @@ struct gdb_lzma_stream
 static void *
 lzma_open (struct bfd *nbfd, void *open_closure)
 {
-  asection *section = open_closure;
+  asection *section = (asection *) open_closure;
   bfd_size_type size, offset;
   lzma_stream_flags options;
   gdb_byte footer[LZMA_STREAM_HEADER_SIZE];
@@ -101,7 +102,7 @@ lzma_open (struct bfd *nbfd, void *open_
     }
 
   offset -= options.backward_size;
-  indexdata = xmalloc (options.backward_size);
+  indexdata = (gdb_byte *) xmalloc (options.backward_size);
   index = NULL;
   pos = 0;
   if (bfd_seek (section->owner, offset, SEEK_SET) != 0
@@ -118,7 +119,7 @@ lzma_open (struct bfd *nbfd, void *open_
     }
   xfree (indexdata);
 
-  lstream = xzalloc (sizeof (struct gdb_lzma_stream));
+  lstream = XCNEW (struct gdb_lzma_stream);
   lstream->section = section;
   lstream->index = index;
 
@@ -133,7 +134,7 @@ static file_ptr
 lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes,
 	    file_ptr offset)
 {
-  struct gdb_lzma_stream *lstream = stream;
+  struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
   bfd_size_type chunk_size;
   lzma_index_iter iter;
   gdb_byte *compressed, *uncompressed;
@@ -155,7 +156,7 @@ lzma_pread (struct bfd *nbfd, void *stre
 	  if (lzma_index_iter_locate (&iter, offset))
 	    break;
 
-	  compressed = xmalloc (iter.block.total_size);
+	  compressed = (gdb_byte *) xmalloc (iter.block.total_size);
 	  block_offset = section->filepos + iter.block.compressed_file_offset;
 	  if (bfd_seek (section->owner, block_offset, SEEK_SET) != 0
 	      || bfd_bread (compressed, iter.block.total_size, section->owner)
@@ -165,7 +166,7 @@ lzma_pread (struct bfd *nbfd, void *stre
 	      break;
 	    }
 
-	  uncompressed = xmalloc (iter.block.uncompressed_size);
+	  uncompressed = (gdb_byte *) xmalloc (iter.block.uncompressed_size);
 
 	  memset (&block, 0, sizeof (block));
 	  block.filters = filters;
@@ -201,7 +202,7 @@ lzma_pread (struct bfd *nbfd, void *stre
 			       + iter.block.uncompressed_size);
 	}
 
-      chunk_size = min (nbytes, lstream->data_end - offset);
+      chunk_size = std::min (nbytes, (file_ptr) lstream->data_end - offset);
       memcpy (buf, lstream->data + offset - lstream->data_start, chunk_size);
       buf = (gdb_byte *) buf + chunk_size;
       offset += chunk_size;
@@ -220,7 +221,7 @@ static int
 lzma_close (struct bfd *nbfd,
 	    void *stream)
 {
-  struct gdb_lzma_stream *lstream = stream;
+  struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
 
   lzma_index_end (lstream->index, &gdb_lzma_allocator);
   xfree (lstream->data);
@@ -239,7 +240,7 @@ lzma_stat (struct bfd *abfd,
 	   void *stream,
 	   struct stat *sb)
 {
-  struct gdb_lzma_stream *lstream = stream;
+  struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
 
   memset (sb, 0, sizeof (struct stat));
   sb->st_size = lzma_index_uncompressed_size (lstream->index);
@@ -255,11 +256,11 @@ lzma_stat (struct bfd *abfd,
    If we find one we create a iovec based bfd that decompresses the
    object data on demand.  If we don't find one, return NULL.  */
 
-bfd *
+gdb_bfd_ref_ptr
 find_separate_debug_file_in_section (struct objfile *objfile)
 {
   asection *section;
-  bfd *abfd;
+  gdb_bfd_ref_ptr abfd;
 
   if (objfile->obfd == NULL)
     return NULL;
@@ -274,16 +275,14 @@ find_separate_debug_file_in_section (str
   if (abfd == NULL)
     return NULL;
 
-  if (!bfd_check_format (abfd, bfd_object))
+  if (!bfd_check_format (abfd.get (), bfd_object))
     {
       warning (_("Cannot parse .gnu_debugdata section; not a BFD object"));
-      gdb_bfd_unref (abfd);
       return NULL;
     }
 #else
   warning (_("Cannot parse .gnu_debugdata section; LZMA support was "
 	     "disabled at compile time"));
-  abfd = NULL;
 #endif /* !HAVE_LIBLZMA */
 
   return abfd;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minsyms.c ./gdb/minsyms.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minsyms.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/minsyms.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB routines for manipulating the minimal symbol tables.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -64,19 +64,6 @@ struct msym_bunch
     struct minimal_symbol contents[BUNCH_SIZE];
   };
 
-/* Bunch currently being filled up.
-   The next field points to chain of filled bunches.  */
-
-static struct msym_bunch *msym_bunch;
-
-/* Number of slots filled in current bunch.  */
-
-static int msym_bunch_index;
-
-/* Total number of minimal symbols recorded so far for the objfile.  */
-
-static int msym_count;
-
 /* See minsyms.h.  */
 
 unsigned int
@@ -171,22 +158,20 @@ lookup_minimal_symbol (const char *name,
   unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
   unsigned int dem_hash = msymbol_hash_iw (name) % MINIMAL_SYMBOL_HASH_SIZE;
 
-  int needtofreename = 0;
-  const char *modified_name;
+  const char *modified_name = name;
 
   if (sfile != NULL)
     sfile = lbasename (sfile);
 
   /* For C++, canonicalize the input name.  */
-  modified_name = name;
+  std::string modified_name_storage;
   if (current_language->la_language == language_cplus)
     {
-      char *cname = cp_canonicalize_string (name);
-
-      if (cname)
+      std::string cname = cp_canonicalize_string (name);
+      if (!cname.empty ())
 	{
-	  modified_name = cname;
-	  needtofreename = 1;
+	  std::swap (modified_name_storage, cname);
+	  modified_name = modified_name_storage.c_str ();
 	}
     }
 
@@ -285,9 +270,6 @@ lookup_minimal_symbol (const char *name,
 	}
     }
 
-  if (needtofreename)
-    xfree ((void *) modified_name);
-
   /* External symbols are best.  */
   if (found_symbol.minsym != NULL)
     {
@@ -697,10 +679,10 @@ lookup_minimal_symbol_by_pc_section_1 (C
 		     symbol isn't an object or function (e.g. a
 		     label), or it may just mean that the size was not
 		     specified.  */
-		  if (MSYMBOL_SIZE (&msymbol[hi]) == 0
-		      && best_zero_sized == -1)
+		  if (MSYMBOL_SIZE (&msymbol[hi]) == 0)
 		    {
-		      best_zero_sized = hi;
+		      if (best_zero_sized == -1)
+			best_zero_sized = hi;
 		      hi--;
 		      continue;
 		    }
@@ -921,23 +903,42 @@ get_symbol_leading_char (bfd *abfd)
 
 /* See minsyms.h.  */
 
-void
-init_minimal_symbol_collection (void)
-{
-  msym_count = 0;
-  msym_bunch = NULL;
-  /* Note that presetting msym_bunch_index to BUNCH_SIZE causes the
+minimal_symbol_reader::minimal_symbol_reader (struct objfile *obj)
+: m_objfile (obj),
+  m_msym_bunch (NULL),
+  /* Note that presetting m_msym_bunch_index to BUNCH_SIZE causes the
      first call to save a minimal symbol to allocate the memory for
      the first bunch.  */
-  msym_bunch_index = BUNCH_SIZE;
+  m_msym_bunch_index (BUNCH_SIZE),
+  m_msym_count (0)
+{
+}
+
+/* Discard the currently collected minimal symbols, if any.  If we wish
+   to save them for later use, we must have already copied them somewhere
+   else before calling this function.
+
+   FIXME:  We could allocate the minimal symbol bunches on their own
+   obstack and then simply blow the obstack away when we are done with
+   it.  Is it worth the extra trouble though?  */
+
+minimal_symbol_reader::~minimal_symbol_reader ()
+{
+  struct msym_bunch *next;
+
+  while (m_msym_bunch != NULL)
+    {
+      next = m_msym_bunch->next;
+      xfree (m_msym_bunch);
+      m_msym_bunch = next;
+    }
 }
 
 /* See minsyms.h.  */
 
 void
-prim_record_minimal_symbol (const char *name, CORE_ADDR address,
-			    enum minimal_symbol_type ms_type,
-			    struct objfile *objfile)
+minimal_symbol_reader::record (const char *name, CORE_ADDR address,
+			       enum minimal_symbol_type ms_type)
 {
   int section;
 
@@ -947,34 +948,31 @@ prim_record_minimal_symbol (const char *
     case mst_text_gnu_ifunc:
     case mst_file_text:
     case mst_solib_trampoline:
-      section = SECT_OFF_TEXT (objfile);
+      section = SECT_OFF_TEXT (m_objfile);
       break;
     case mst_data:
     case mst_file_data:
-      section = SECT_OFF_DATA (objfile);
+      section = SECT_OFF_DATA (m_objfile);
       break;
     case mst_bss:
     case mst_file_bss:
-      section = SECT_OFF_BSS (objfile);
+      section = SECT_OFF_BSS (m_objfile);
       break;
     default:
       section = -1;
     }
 
-  prim_record_minimal_symbol_and_info (name, address, ms_type,
-				       section, objfile);
+  record_with_info (name, address, ms_type, section);
 }
 
 /* See minsyms.h.  */
 
 struct minimal_symbol *
-prim_record_minimal_symbol_full (const char *name, int name_len, int copy_name,
-				 CORE_ADDR address,
-				 enum minimal_symbol_type ms_type,
-				 int section,
-				 struct objfile *objfile)
+minimal_symbol_reader::record_full (const char *name, int name_len,
+				    bool copy_name, CORE_ADDR address,
+				    enum minimal_symbol_type ms_type,
+				    int section)
 {
-  struct obj_section *obj_section;
   struct msym_bunch *newobj;
   struct minimal_symbol *msymbol;
 
@@ -990,7 +988,7 @@ prim_record_minimal_symbol_full (const c
 
   /* It's safe to strip the leading char here once, since the name
      is also stored stripped in the minimal symbol table.  */
-  if (name[0] == get_symbol_leading_char (objfile->obfd))
+  if (name[0] == get_symbol_leading_char (m_objfile->obfd))
     {
       ++name;
       --name_len;
@@ -999,17 +997,17 @@ prim_record_minimal_symbol_full (const c
   if (ms_type == mst_file_text && startswith (name, "__gnu_compiled"))
     return (NULL);
 
-  if (msym_bunch_index == BUNCH_SIZE)
+  if (m_msym_bunch_index == BUNCH_SIZE)
     {
       newobj = XCNEW (struct msym_bunch);
-      msym_bunch_index = 0;
-      newobj->next = msym_bunch;
-      msym_bunch = newobj;
+      m_msym_bunch_index = 0;
+      newobj->next = m_msym_bunch;
+      m_msym_bunch = newobj;
     }
-  msymbol = &msym_bunch->contents[msym_bunch_index];
+  msymbol = &m_msym_bunch->contents[m_msym_bunch_index];
   MSYMBOL_SET_LANGUAGE (msymbol, language_auto,
-			&objfile->per_bfd->storage_obstack);
-  MSYMBOL_SET_NAMES (msymbol, name, name_len, copy_name, objfile);
+			&m_objfile->per_bfd->storage_obstack);
+  MSYMBOL_SET_NAMES (msymbol, name, name_len, copy_name, m_objfile);
 
   SET_MSYMBOL_VALUE_ADDRESS (msymbol, address);
   MSYMBOL_SECTION (msymbol) = section;
@@ -1028,28 +1026,15 @@ prim_record_minimal_symbol_full (const c
 
   /* If we already read minimal symbols for this objfile, then don't
      ever allocate a new one.  */
-  if (!objfile->per_bfd->minsyms_read)
+  if (!m_objfile->per_bfd->minsyms_read)
     {
-      msym_bunch_index++;
-      objfile->per_bfd->n_minsyms++;
+      m_msym_bunch_index++;
+      m_objfile->per_bfd->n_minsyms++;
     }
-  msym_count++;
+  m_msym_count++;
   return msymbol;
 }
 
-/* See minsyms.h.  */
-
-struct minimal_symbol *
-prim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address,
-				     enum minimal_symbol_type ms_type,
-				     int section,
-				     struct objfile *objfile)
-{
-  return prim_record_minimal_symbol_full (name, strlen (name), 1,
-					  address, ms_type,
-					  section, objfile);
-}
-
 /* Compare two minimal symbols by address and return a signed result based
    on unsigned comparisons, so that we sort into unsigned numeric order.
    Within groups with the same address, sort by name.  */
@@ -1088,37 +1073,6 @@ compare_minimal_symbols (const void *fn1
     }
 }
 
-/* Discard the currently collected minimal symbols, if any.  If we wish
-   to save them for later use, we must have already copied them somewhere
-   else before calling this function.
-
-   FIXME:  We could allocate the minimal symbol bunches on their own
-   obstack and then simply blow the obstack away when we are done with
-   it.  Is it worth the extra trouble though?  */
-
-static void
-do_discard_minimal_symbols_cleanup (void *arg)
-{
-  struct msym_bunch *next;
-
-  while (msym_bunch != NULL)
-    {
-      next = msym_bunch->next;
-      xfree (msym_bunch);
-      msym_bunch = next;
-    }
-}
-
-/* See minsyms.h.  */
-
-struct cleanup *
-make_cleanup_discard_minimal_symbols (void)
-{
-  return make_cleanup (do_discard_minimal_symbols_cleanup, 0);
-}
-
-
-
 /* Compact duplicate entries out of a minimal symbol table by walking
    through the table and compacting out entries with duplicate addresses
    and matching names.  Return the number of entries remaining.
@@ -1245,7 +1199,7 @@ build_minimal_symbol_hash_tables (struct
    attempts to demangle them if we later add more minimal symbols.  */
 
 void
-install_minimal_symbols (struct objfile *objfile)
+minimal_symbol_reader::install ()
 {
   int bindex;
   int mcount;
@@ -1253,16 +1207,16 @@ install_minimal_symbols (struct objfile 
   struct minimal_symbol *msymbols;
   int alloc_count;
 
-  if (objfile->per_bfd->minsyms_read)
+  if (m_objfile->per_bfd->minsyms_read)
     return;
 
-  if (msym_count > 0)
+  if (m_msym_count > 0)
     {
       if (symtab_create_debug)
 	{
 	  fprintf_unfiltered (gdb_stdlog,
 			      "Installing %d minimal symbols of objfile %s.\n",
-			      msym_count, objfile_name (objfile));
+			      m_msym_count, objfile_name (m_objfile));
 	}
 
       /* Allocate enough space in the obstack, into which we will gather the
@@ -1270,17 +1224,17 @@ install_minimal_symbols (struct objfile 
          compact out the duplicate entries.  Once we have a final table,
          we will give back the excess space.  */
 
-      alloc_count = msym_count + objfile->per_bfd->minimal_symbol_count + 1;
-      obstack_blank (&objfile->per_bfd->storage_obstack,
+      alloc_count = m_msym_count + m_objfile->per_bfd->minimal_symbol_count + 1;
+      obstack_blank (&m_objfile->per_bfd->storage_obstack,
 		     alloc_count * sizeof (struct minimal_symbol));
       msymbols = (struct minimal_symbol *)
-	obstack_base (&objfile->per_bfd->storage_obstack);
+	obstack_base (&m_objfile->per_bfd->storage_obstack);
 
       /* Copy in the existing minimal symbols, if there are any.  */
 
-      if (objfile->per_bfd->minimal_symbol_count)
-	memcpy ((char *) msymbols, (char *) objfile->per_bfd->msymbols,
-	    objfile->per_bfd->minimal_symbol_count * sizeof (struct minimal_symbol));
+      if (m_objfile->per_bfd->minimal_symbol_count)
+	memcpy ((char *) msymbols, (char *) m_objfile->per_bfd->msymbols,
+	    m_objfile->per_bfd->minimal_symbol_count * sizeof (struct minimal_symbol));
 
       /* Walk through the list of minimal symbol bunches, adding each symbol
          to the new contiguous array of symbols.  Note that we start with the
@@ -1288,13 +1242,13 @@ install_minimal_symbols (struct objfile 
          msym_bunch_index for the first bunch we copy over), and thereafter
          each bunch is full.  */
 
-      mcount = objfile->per_bfd->minimal_symbol_count;
+      mcount = m_objfile->per_bfd->minimal_symbol_count;
 
-      for (bunch = msym_bunch; bunch != NULL; bunch = bunch->next)
+      for (bunch = m_msym_bunch; bunch != NULL; bunch = bunch->next)
 	{
-	  for (bindex = 0; bindex < msym_bunch_index; bindex++, mcount++)
+	  for (bindex = 0; bindex < m_msym_bunch_index; bindex++, mcount++)
 	    msymbols[mcount] = bunch->contents[bindex];
-	  msym_bunch_index = BUNCH_SIZE;
+	  m_msym_bunch_index = BUNCH_SIZE;
 	}
 
       /* Sort the minimal symbols by address.  */
@@ -1305,12 +1259,12 @@ install_minimal_symbols (struct objfile 
       /* Compact out any duplicates, and free up whatever space we are
          no longer using.  */
 
-      mcount = compact_minimal_symbols (msymbols, mcount, objfile);
+      mcount = compact_minimal_symbols (msymbols, mcount, m_objfile);
 
-      obstack_blank_fast (&objfile->per_bfd->storage_obstack,
+      obstack_blank_fast (&m_objfile->per_bfd->storage_obstack,
 	       (mcount + 1 - alloc_count) * sizeof (struct minimal_symbol));
       msymbols = (struct minimal_symbol *)
-	obstack_finish (&objfile->per_bfd->storage_obstack);
+	obstack_finish (&m_objfile->per_bfd->storage_obstack);
 
       /* We also terminate the minimal symbol table with a "null symbol",
          which is *not* included in the size of the table.  This makes it
@@ -1326,14 +1280,14 @@ install_minimal_symbols (struct objfile 
          The strings themselves are also located in the storage_obstack
          of this objfile.  */
 
-      objfile->per_bfd->minimal_symbol_count = mcount;
-      objfile->per_bfd->msymbols = msymbols;
+      m_objfile->per_bfd->minimal_symbol_count = mcount;
+      m_objfile->per_bfd->msymbols = msymbols;
 
       /* Now build the hash tables; we can't do this incrementally
          at an earlier point since we weren't finished with the obstack
 	 yet.  (And if the msymbol obstack gets moved, all the internal
 	 pointers to other msymbols need to be adjusted.)  */
-      build_minimal_symbol_hash_tables (objfile);
+      build_minimal_symbol_hash_tables (m_objfile);
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minsyms.h ./gdb/minsyms.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/minsyms.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/minsyms.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Minimal symbol table definitions for GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,81 +53,100 @@ struct bound_minimal_symbol
    as opaque and use functions provided by minsyms.c to inspect them.
 */
 
-/* Prepare to start collecting minimal symbols.  This should be called
-   by a symbol reader to initialize the minimal symbol module.
-   Currently, minimal symbol table creation is not reentrant; it
-   relies on global (static) variables in minsyms.c.  */
-
-void init_minimal_symbol_collection (void);
-
-/* Return a cleanup which is used to clean up the global state left
-   over by minimal symbol creation.  After calling
-   init_minimal_symbol_collection, a symbol reader should call this
-   function.  Then, after all minimal symbols have been read,
-   regardless of whether they are installed or not, the cleanup
-   returned by this function should be run.  */
+struct msym_bunch;
 
-struct cleanup *make_cleanup_discard_minimal_symbols (void);
+/* An RAII-based object that is used to record minimal symbols while
+   they are being read.  */
+class minimal_symbol_reader
+{
+ public:
+
+  /* Prepare to start collecting minimal symbols.  This should be
+     called by a symbol reader to initialize the minimal symbol
+     module.  */
+
+  explicit minimal_symbol_reader (struct objfile *);
+
+  ~minimal_symbol_reader ();
+
+  /* Install the minimal symbols that have been collected into the
+     given objfile.  */
 
-/* Record a new minimal symbol.  This is the "full" entry point;
-   simpler convenience entry points are also provided below.
+  void install ();
+
+  /* Record a new minimal symbol.  This is the "full" entry point;
+     simpler convenience entry points are also provided below.
    
-   This returns a new minimal symbol.  It is ok to modify the returned
-   minimal symbol (though generally not necessary).  It is not ok,
-   though, to stash the pointer anywhere; as minimal symbols may be
-   moved after creation.  The memory for the returned minimal symbol
-   is still owned by the minsyms.c code, and should not be freed.
+     This returns a new minimal symbol.  It is ok to modify the returned
+     minimal symbol (though generally not necessary).  It is not ok,
+     though, to stash the pointer anywhere; as minimal symbols may be
+     moved after creation.  The memory for the returned minimal symbol
+     is still owned by the minsyms.c code, and should not be freed.
    
-   Arguments are:
+     Arguments are:
 
-   NAME - the symbol's name
-   NAME_LEN - the length of the name
-   COPY_NAME - if true, the minsym code must make a copy of NAME.  If
-   false, then NAME must be NUL-terminated, and must have a lifetime
-   that is at least as long as OBJFILE's lifetime.
-   ADDRESS - the address of the symbol
-   MS_TYPE - the type of the symbol
-   SECTION - the symbol's section
-   appropriate obj_section for the minimal symbol.  This can be NULL.
-   OBJFILE - the objfile associated with the minimal symbol.  */
-
-struct minimal_symbol *prim_record_minimal_symbol_full
-    (const char *name,
-     int name_len,
-     int copy_name,
-     CORE_ADDR address,
-     enum minimal_symbol_type ms_type,
-     int section,
-     struct objfile *objfile);
-
-/* Like prim_record_minimal_symbol_full, but:
-   - uses strlen to compute NAME_LEN,
-   - passes COPY_NAME = 1,
-   - and passes a default SECTION, depending on the type
-   
-   This variant does not return the new symbol.  */
+     NAME - the symbol's name
+     NAME_LEN - the length of the name
+     COPY_NAME - if true, the minsym code must make a copy of NAME.  If
+     false, then NAME must be NUL-terminated, and must have a lifetime
+     that is at least as long as OBJFILE's lifetime.
+     ADDRESS - the address of the symbol
+     MS_TYPE - the type of the symbol
+     SECTION - the symbol's section
+  */
 
-void prim_record_minimal_symbol (const char *, CORE_ADDR,
-				 enum minimal_symbol_type,
-				 struct objfile *);
+  struct minimal_symbol *record_full (const char *name,
+				      int name_len,
+				      bool copy_name,
+				      CORE_ADDR address,
+				      enum minimal_symbol_type ms_type,
+				      int section);
 
-/* Like prim_record_minimal_symbol_full, but:
-   - uses strlen to compute NAME_LEN,
-   - passes COPY_NAME = 1.  */
+  /* Like record_full, but:
+     - uses strlen to compute NAME_LEN,
+     - passes COPY_NAME = true,
+     - and passes a default SECTION, depending on the type
 
-struct minimal_symbol *prim_record_minimal_symbol_and_info
-    (const char *,
-     CORE_ADDR,
-     enum minimal_symbol_type,
-     int section,
-     struct objfile *);
+     This variant does not return the new symbol.  */
+
+  void record (const char *name, CORE_ADDR address,
+	       enum minimal_symbol_type ms_type);
 
-/* Install the minimal symbols that have been collected into the given
-   objfile.  After this is called, the cleanup returned by
-   make_cleanup_discard_minimal_symbols should be run in order to
-   clean up global state.  */
+  /* Like record_full, but:
+     - uses strlen to compute NAME_LEN,
+     - passes COPY_NAME = true.  */
 
-void install_minimal_symbols (struct objfile *);
+  struct minimal_symbol *record_with_info (const char *name,
+					   CORE_ADDR address,
+					   enum minimal_symbol_type ms_type,
+					   int section)
+  {
+    return record_full (name, strlen (name), true, address, ms_type, section);
+  }
+
+ private:
+
+  /* No need for these.  They are intentionally not defined anywhere.  */
+  minimal_symbol_reader &operator=
+    (const minimal_symbol_reader &);
+  minimal_symbol_reader (const minimal_symbol_reader &);
+
+  struct objfile *m_objfile;
+
+  /* Bunch currently being filled up.
+     The next field points to chain of filled bunches.  */
+
+  struct msym_bunch *m_msym_bunch;
+
+  /* Number of slots filled in current bunch.  */
+
+  int m_msym_bunch_index;
+
+  /* Total number of minimal symbols recorded so far for the
+     objfile.  */
+
+  int m_msym_count;
+};
 
 /* Create the terminating entry of OBJFILE's minimal symbol table.
    If OBJFILE->msymbols is zero, allocate a single entry from
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64-obsd-nat.c ./gdb/mips64-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips64-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,126 @@
+/* Native-dependent code for OpenBSD/mips64.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "mips-tdep.h"
+#include "inf-ptrace.h"
+#include "obsd-nat.h"
+
+/* Shorthand for some register numbers used below.  */
+#define MIPS_PC_REGNUM	MIPS_EMBED_PC_REGNUM
+#define MIPS_FP0_REGNUM	MIPS_EMBED_FP0_REGNUM
+#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+mips64obsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const char *regs = gregs;
+  int regnum;
+
+  for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 8);
+
+  for (regnum = MIPS_FP0_REGNUM; regnum <= MIPS_FSR_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + (regnum + 2) * 8);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+mips64obsd_collect_gregset (const struct regcache *regcache,
+			    void *gregs, int regnum)
+{
+  char *regs = gregs;
+  int i;
+
+  for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 8);
+    }
+
+  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + (i + 2) * 8);
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers.  */
+
+static void
+mips64obsd_fetch_inferior_registers (struct target_ops *ops,
+				     struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  mips64obsd_supply_gregset (regcache, &regs);
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers.  */
+
+static void
+mips64obsd_store_inferior_registers (struct target_ops *ops,
+				     struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  mips64obsd_collect_gregset (regcache, &regs, regnum);
+
+  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't write registers"));
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_mips64obsd_nat (void);
+
+void
+_initialize_mips64obsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = mips64obsd_fetch_inferior_registers;
+  t->to_store_registers = mips64obsd_store_inferior_registers;
+  obsd_add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64obsd-nat.c ./gdb/mips64obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64obsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips64obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,126 +0,0 @@
-/* Native-dependent code for OpenBSD/mips64.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "mips-tdep.h"
-#include "inf-ptrace.h"
-#include "obsd-nat.h"
-
-/* Shorthand for some register numbers used below.  */
-#define MIPS_PC_REGNUM	MIPS_EMBED_PC_REGNUM
-#define MIPS_FP0_REGNUM	MIPS_EMBED_FP0_REGNUM
-#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-mips64obsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const char *regs = gregs;
-  int regnum;
-
-  for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 8);
-
-  for (regnum = MIPS_FP0_REGNUM; regnum <= MIPS_FSR_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + (regnum + 2) * 8);
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-mips64obsd_collect_gregset (const struct regcache *regcache,
-			    void *gregs, int regnum)
-{
-  char *regs = gregs;
-  int i;
-
-  for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 8);
-    }
-
-  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + (i + 2) * 8);
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers.  */
-
-static void
-mips64obsd_fetch_inferior_registers (struct target_ops *ops,
-				     struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  mips64obsd_supply_gregset (regcache, &regs);
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers.  */
-
-static void
-mips64obsd_store_inferior_registers (struct target_ops *ops,
-				     struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  mips64obsd_collect_gregset (regcache, &regs, regnum);
-
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't write registers"));
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_mips64obsd_nat (void);
-
-void
-_initialize_mips64obsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = mips64obsd_fetch_inferior_registers;
-  t->to_store_registers = mips64obsd_store_inferior_registers;
-  obsd_add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64-obsd-tdep.c ./gdb/mips64-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips64-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,170 @@
+/* Target-dependent code for OpenBSD/mips64.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "obsd-tdep.h"
+#include "mips-tdep.h"
+#include "solib-svr4.h"
+
+/* The MIPS64 Floating-Point Quad-Precision format is similar to
+   big-endian IA-64 Quad-Precision format.  */
+#define floatformats_mips64_quad floatformats_ia64_quad
+
+#define MIPS64OBSD_NUM_REGS 73
+
+/* Core file support.  */
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+mips64obsd_supply_gregset (const struct regset *regset,
+			   struct regcache *regcache, int regnum,
+			   const void *gregs, size_t len)
+{
+  const char *regs = (const char *) gregs;
+  int i;
+
+  for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + i * 8);
+    }
+}
+
+/* OpenBSD/mips64 register set.  */
+
+static const struct regset mips64obsd_gregset =
+{
+  NULL,
+  mips64obsd_supply_gregset
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+mips64obsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					 iterate_over_regset_sections_cb *cb,
+					 void *cb_data,
+					 const struct regcache *regcache)
+{
+  cb (".reg", MIPS64OBSD_NUM_REGS * 8, &mips64obsd_gregset, NULL, cb_data);
+}
+
+
+/* Signal trampolines.  */
+
+static void
+mips64obsd_sigframe_init (const struct tramp_frame *self,
+			  struct frame_info *this_frame,
+			  struct trad_frame_cache *cache,
+			  CORE_ADDR func)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  CORE_ADDR sp, sigcontext_addr, addr;
+  int regnum;
+
+  /* We find the appropriate instance of `struct sigcontext' at a
+     fixed offset in the signal frame.  */
+  sp = get_frame_register_signed (this_frame,
+				  MIPS_SP_REGNUM + gdbarch_num_regs (gdbarch));
+  sigcontext_addr = sp + 32;
+
+  /* PC.  */
+  regnum = mips_regnum (gdbarch)->pc;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			    sigcontext_addr + 16);
+
+  /* GPRs.  */
+  for (regnum = MIPS_AT_REGNUM, addr = sigcontext_addr + 32;
+       regnum <= MIPS_RA_REGNUM; regnum++, addr += 8)
+    trad_frame_set_reg_addr (cache,
+			     regnum + gdbarch_num_regs (gdbarch),
+			     addr);
+
+  /* HI and LO.  */
+  regnum = mips_regnum (gdbarch)->lo;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   sigcontext_addr + 280);
+  regnum = mips_regnum (gdbarch)->hi;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   sigcontext_addr + 288);
+
+  /* TODO: Handle the floating-point registers.  */
+
+  trad_frame_set_id (cache, frame_id_build (sp, func));
+}
+
+static const struct tramp_frame mips64obsd_sigframe =
+{
+  SIGTRAMP_FRAME,
+  MIPS_INSN32_SIZE,
+  {
+    { 0x67a40020, -1 },		/* daddiu  a0,sp,32 */
+    { 0x24020067, -1 },		/* li      v0,103 */
+    { 0x0000000c, -1 },		/* syscall */
+    { 0x0000000d, -1 },		/* break */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  mips64obsd_sigframe_init
+};
+
+
+static void
+mips64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* OpenBSD/mips64 only supports the n64 ABI, but the braindamaged
+     way GDB works, forces us to pretend we can handle them all.  */
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, mips64obsd_iterate_over_regset_sections);
+
+  tramp_frame_prepend_unwinder (gdbarch, &mips64obsd_sigframe);
+
+  set_gdbarch_long_double_bit (gdbarch, 128);
+  set_gdbarch_long_double_format (gdbarch, floatformats_mips64_quad);
+
+  obsd_init_abi(info, gdbarch);
+
+  /* OpenBSD/mips64 has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_mips64obsd_tdep (void);
+
+void
+_initialize_mips64obsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_OPENBSD,
+			  mips64obsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64obsd-tdep.c ./gdb/mips64obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips64obsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips64obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,170 +0,0 @@
-/* Target-dependent code for OpenBSD/mips64.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "trad-frame.h"
-#include "tramp-frame.h"
-
-#include "obsd-tdep.h"
-#include "mips-tdep.h"
-#include "solib-svr4.h"
-
-/* The MIPS64 Floating-Point Quad-Precision format is similar to
-   big-endian IA-64 Quad-Precision format.  */
-#define floatformats_mips64_quad floatformats_ia64_quad
-
-#define MIPS64OBSD_NUM_REGS 73
-
-/* Core file support.  */
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-mips64obsd_supply_gregset (const struct regset *regset,
-			   struct regcache *regcache, int regnum,
-			   const void *gregs, size_t len)
-{
-  const char *regs = gregs;
-  int i;
-
-  for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * 8);
-    }
-}
-
-/* OpenBSD/mips64 register set.  */
-
-static const struct regset mips64obsd_gregset =
-{
-  NULL,
-  mips64obsd_supply_gregset
-};
-
-/* Iterate over core file register note sections.  */
-
-static void
-mips64obsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					 iterate_over_regset_sections_cb *cb,
-					 void *cb_data,
-					 const struct regcache *regcache)
-{
-  cb (".reg", MIPS64OBSD_NUM_REGS * 8, &mips64obsd_gregset, NULL, cb_data);
-}
-
-
-/* Signal trampolines.  */
-
-static void
-mips64obsd_sigframe_init (const struct tramp_frame *self,
-			  struct frame_info *this_frame,
-			  struct trad_frame_cache *cache,
-			  CORE_ADDR func)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  CORE_ADDR sp, sigcontext_addr, addr;
-  int regnum;
-
-  /* We find the appropriate instance of `struct sigcontext' at a
-     fixed offset in the signal frame.  */
-  sp = get_frame_register_signed (this_frame,
-				  MIPS_SP_REGNUM + gdbarch_num_regs (gdbarch));
-  sigcontext_addr = sp + 32;
-
-  /* PC.  */
-  regnum = mips_regnum (gdbarch)->pc;
-  trad_frame_set_reg_addr (cache,
-			   regnum + gdbarch_num_regs (gdbarch),
-			    sigcontext_addr + 16);
-
-  /* GPRs.  */
-  for (regnum = MIPS_AT_REGNUM, addr = sigcontext_addr + 32;
-       regnum <= MIPS_RA_REGNUM; regnum++, addr += 8)
-    trad_frame_set_reg_addr (cache,
-			     regnum + gdbarch_num_regs (gdbarch),
-			     addr);
-
-  /* HI and LO.  */
-  regnum = mips_regnum (gdbarch)->lo;
-  trad_frame_set_reg_addr (cache,
-			   regnum + gdbarch_num_regs (gdbarch),
-			   sigcontext_addr + 280);
-  regnum = mips_regnum (gdbarch)->hi;
-  trad_frame_set_reg_addr (cache,
-			   regnum + gdbarch_num_regs (gdbarch),
-			   sigcontext_addr + 288);
-
-  /* TODO: Handle the floating-point registers.  */
-
-  trad_frame_set_id (cache, frame_id_build (sp, func));
-}
-
-static const struct tramp_frame mips64obsd_sigframe =
-{
-  SIGTRAMP_FRAME,
-  MIPS_INSN32_SIZE,
-  {
-    { 0x67a40020, -1 },		/* daddiu  a0,sp,32 */
-    { 0x24020067, -1 },		/* li      v0,103 */
-    { 0x0000000c, -1 },		/* syscall */
-    { 0x0000000d, -1 },		/* break */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  mips64obsd_sigframe_init
-};
-
-
-static void
-mips64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* OpenBSD/mips64 only supports the n64 ABI, but the braindamaged
-     way GDB works, forces us to pretend we can handle them all.  */
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, mips64obsd_iterate_over_regset_sections);
-
-  tramp_frame_prepend_unwinder (gdbarch, &mips64obsd_sigframe);
-
-  set_gdbarch_long_double_bit (gdbarch, 128);
-  set_gdbarch_long_double_format (gdbarch, floatformats_mips64_quad);
-
-  obsd_init_abi(info, gdbarch);
-
-  /* OpenBSD/mips64 has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_mips64obsd_tdep (void);
-
-void
-_initialize_mips64obsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_OPENBSD_ELF,
-			  mips64obsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-nat.c ./gdb/mips-fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,136 @@
+/* Native-dependent code for FreeBSD/mips.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "fbsd-nat.h"
+#include "mips-tdep.h"
+#include "mips-fbsd-tdep.h"
+#include "inf-ptrace.h"
+
+/* Determine if PT_GETREGS fetches this register.  */
+
+static bool
+getregs_supplies (struct gdbarch *gdbarch, int regnum)
+{
+  return (regnum >= MIPS_ZERO_REGNUM
+	  && regnum <= gdbarch_pc_regnum (gdbarch));
+}
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers.  */
+
+static void
+mips_fbsd_fetch_inferior_registers (struct target_ops *ops,
+				    struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      mips_fbsd_supply_gregs (regcache, regnum, &regs, sizeof (register_t));
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1
+      || regnum >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      mips_fbsd_supply_fpregs (regcache, regnum, &fpregs,
+			       sizeof (f_register_t));
+    }
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers.  */
+
+static void
+mips_fbsd_store_inferior_registers (struct target_ops *ops,
+				    struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      mips_fbsd_collect_gregs (regcache, regnum, (char *) &regs,
+			       sizeof (register_t));
+
+      if (ptrace (PT_SETREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't write registers"));
+
+      if (regnum != -1)
+	return;
+    }
+
+  if (regnum == -1
+      || regnum >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      mips_fbsd_collect_fpregs (regcache, regnum, (char *) &fpregs,
+				sizeof (f_register_t));
+
+      if (ptrace (PT_SETFPREGS, get_ptrace_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_mips_fbsd_nat (void);
+
+void
+_initialize_mips_fbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = mips_fbsd_fetch_inferior_registers;
+  t->to_store_registers = mips_fbsd_store_inferior_registers;
+  fbsd_nat_add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-tdep.c ./gdb/mips-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,560 @@
+/* Target-dependent code for FreeBSD/mips.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "osabi.h"
+#include "regset.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "fbsd-tdep.h"
+#include "mips-tdep.h"
+#include "mips-fbsd-tdep.h"
+
+#include "solib-svr4.h"
+
+/* Shorthand for some register numbers used below.  */
+#define MIPS_PC_REGNUM  MIPS_EMBED_PC_REGNUM
+#define MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM
+#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
+
+/* Core file support. */
+
+/* Number of registers in `struct reg' from <machine/reg.h>.  The
+   first 38 follow the standard MIPS layout.  The 39th holds
+   IC_INT_REG on RM7K and RM9K processors.  The 40th is a dummy for
+   padding.  */
+#define MIPS_FBSD_NUM_GREGS	40
+
+/* Number of registers in `struct fpreg' from <machine/reg.h>.  The
+   first 32 hold floating point registers.  33 holds the FSR.  The
+   34th is a dummy for padding.  */
+#define MIPS_FBSD_NUM_FPREGS	34
+
+/* Supply a single register.  If the source register size matches the
+   size the regcache expects, this can use regcache_raw_supply().  If
+   they are different, this copies the source register into a buffer
+   that can be passed to regcache_raw_supply().  */
+
+static void
+mips_fbsd_supply_reg (struct regcache *regcache, int regnum, const void *addr,
+		      size_t len)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (register_size (gdbarch, regnum) == len)
+    regcache_raw_supply (regcache, regnum, addr);
+  else
+    {
+      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+      gdb_byte buf[MAX_REGISTER_SIZE];
+      LONGEST val;
+
+      val = extract_signed_integer ((const gdb_byte *) addr, len, byte_order);
+      store_signed_integer (buf, register_size (gdbarch, regnum), byte_order,
+			    val);
+      regcache_raw_supply (regcache, regnum, buf);
+    }
+}
+
+/* Collect a single register.  If the destination register size
+   matches the size the regcache expects, this can use
+   regcache_raw_supply().  If they are different, this fetches the
+   register via regcache_raw_supply() into a buffer and then copies it
+   into the final destination.  */
+
+static void
+mips_fbsd_collect_reg (const struct regcache *regcache, int regnum, void *addr,
+		       size_t len)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (register_size (gdbarch, regnum) == len)
+    regcache_raw_collect (regcache, regnum, addr);
+  else
+    {
+      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+      gdb_byte buf[MAX_REGISTER_SIZE];
+      LONGEST val;
+
+      regcache_raw_collect (regcache, regnum, buf);
+      val = extract_signed_integer (buf, register_size (gdbarch, regnum),
+				    byte_order);
+      store_signed_integer ((gdb_byte *) addr, len, byte_order, val);
+    }
+}
+
+/* Supply the floating-point registers stored in FPREGS to REGCACHE.
+   Each floating-point register in FPREGS is REGSIZE bytes in
+   length.  */
+
+void
+mips_fbsd_supply_fpregs (struct regcache *regcache, int regnum,
+			 const void *fpregs, size_t regsize)
+{
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
+  int i;
+
+  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
+    if (regnum == i || regnum == -1)
+      mips_fbsd_supply_reg (regcache, i,
+			    regs + (i - MIPS_FP0_REGNUM) * regsize, regsize);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.
+   Each general-purpose register in GREGS is REGSIZE bytes in
+   length.  */
+
+void
+mips_fbsd_supply_gregs (struct regcache *regcache, int regnum,
+			const void *gregs, size_t regsize)
+{
+  const gdb_byte *regs = (const gdb_byte *) gregs;
+  int i;
+
+  for (i = 0; i <= MIPS_PC_REGNUM; i++)
+    if (regnum == i || regnum == -1)
+      mips_fbsd_supply_reg (regcache, i, regs + i * regsize, regsize);
+}
+
+/* Collect the floating-point registers from REGCACHE and store them
+   in FPREGS.  Each floating-point register in FPREGS is REGSIZE bytes
+   in length.  */
+
+void
+mips_fbsd_collect_fpregs (const struct regcache *regcache, int regnum,
+			  void *fpregs, size_t regsize)
+{
+  gdb_byte *regs = (gdb_byte *) fpregs;
+  int i;
+
+  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
+    if (regnum == i || regnum == -1)
+      mips_fbsd_collect_reg (regcache, i,
+			     regs + (i - MIPS_FP0_REGNUM) * regsize, regsize);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  Each general-purpose register in GREGS is REGSIZE bytes
+   in length.  */
+
+void
+mips_fbsd_collect_gregs (const struct regcache *regcache, int regnum,
+			 void *gregs, size_t regsize)
+{
+  gdb_byte *regs = (gdb_byte *) gregs;
+  int i;
+
+  for (i = 0; i <= MIPS_PC_REGNUM; i++)
+    if (regnum == i || regnum == -1)
+      mips_fbsd_collect_reg (regcache, i, regs + i * regsize, regsize);
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+mips_fbsd_supply_fpregset (const struct regset *regset,
+			   struct regcache *regcache,
+			   int regnum, const void *fpregs, size_t len)
+{
+  size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+
+  gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
+
+  mips_fbsd_supply_fpregs (regcache, regnum, fpregs, regsize);
+}
+
+/* Collect register REGNUM from the register cache REGCACHE and store
+   it in the buffer specified by FPREGS and LEN in the floating-point
+   register set REGSET.  If REGNUM is -1, do this for all registers in
+   REGSET.  */
+
+static void
+mips_fbsd_collect_fpregset (const struct regset *regset,
+			    const struct regcache *regcache,
+			    int regnum, void *fpregs, size_t len)
+{
+  size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+
+  gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
+
+  mips_fbsd_collect_fpregs (regcache, regnum, fpregs, regsize);
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+mips_fbsd_supply_gregset (const struct regset *regset,
+			  struct regcache *regcache, int regnum,
+			  const void *gregs, size_t len)
+{
+  size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+
+  gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);
+
+  mips_fbsd_supply_gregs (regcache, regnum, gregs, regsize);
+}
+
+/* Collect register REGNUM from the register cache REGCACHE and store
+   it in the buffer specified by GREGS and LEN in the general-purpose
+   register set REGSET.  If REGNUM is -1, do this for all registers in
+   REGSET.  */
+
+static void
+mips_fbsd_collect_gregset (const struct regset *regset,
+			   const struct regcache *regcache,
+			   int regnum, void *gregs, size_t len)
+{
+  size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+
+  gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);
+
+  mips_fbsd_collect_gregs (regcache, regnum, gregs, regsize);
+}
+
+/* FreeBSD/mips register sets.  */
+
+static const struct regset mips_fbsd_gregset =
+{
+  NULL,
+  mips_fbsd_supply_gregset,
+  mips_fbsd_collect_gregset,
+};
+
+static const struct regset mips_fbsd_fpregset =
+{
+  NULL,
+  mips_fbsd_supply_fpregset,
+  mips_fbsd_collect_fpregset,
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+mips_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+					iterate_over_regset_sections_cb *cb,
+					void *cb_data,
+					const struct regcache *regcache)
+{
+  size_t regsize = mips_abi_regsize (gdbarch);
+
+  cb (".reg", MIPS_FBSD_NUM_GREGS * regsize, &mips_fbsd_gregset,
+      NULL, cb_data);
+  cb (".reg2", MIPS_FBSD_NUM_FPREGS * regsize, &mips_fbsd_fpregset,
+      NULL, cb_data);
+}
+
+/* Signal trampoline support.  */
+
+#define FBSD_SYS_sigreturn	417
+
+#define MIPS_INST_LI_V0_SIGRETURN 0x24020000 + FBSD_SYS_sigreturn
+#define MIPS_INST_SYSCALL	0x0000000c
+#define MIPS_INST_BREAK		0x0000000d
+
+#define O32_SIGFRAME_UCONTEXT_OFFSET	(16)
+#define O32_SIGSET_T_SIZE	(16)
+
+#define O32_UCONTEXT_ONSTACK	(O32_SIGSET_T_SIZE)
+#define O32_UCONTEXT_PC		(O32_UCONTEXT_ONSTACK + 4)
+#define O32_UCONTEXT_REGS	(O32_UCONTEXT_PC + 4)
+#define O32_UCONTEXT_SR		(O32_UCONTEXT_REGS + 4 * 32)
+#define O32_UCONTEXT_LO		(O32_UCONTEXT_SR + 4)
+#define O32_UCONTEXT_HI		(O32_UCONTEXT_LO + 4)
+#define O32_UCONTEXT_FPUSED	(O32_UCONTEXT_HI + 4)
+#define O32_UCONTEXT_FPREGS	(O32_UCONTEXT_FPUSED + 4)
+
+#define O32_UCONTEXT_REG_SIZE	4
+
+static void
+mips_fbsd_sigframe_init (const struct tramp_frame *self,
+			 struct frame_info *this_frame,
+			 struct trad_frame_cache *cache,
+			 CORE_ADDR func)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp, ucontext_addr, addr;
+  int regnum;
+  gdb_byte buf[4];
+
+  /* We find the appropriate instance of `ucontext_t' at a
+     fixed offset in the signal frame.  */
+  sp = get_frame_register_signed (this_frame,
+				  MIPS_SP_REGNUM + gdbarch_num_regs (gdbarch));
+  ucontext_addr = sp + O32_SIGFRAME_UCONTEXT_OFFSET;
+
+  /* PC.  */
+  regnum = mips_regnum (gdbarch)->pc;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + O32_UCONTEXT_PC);
+
+  /* GPRs.  */
+  for (regnum = MIPS_ZERO_REGNUM, addr = ucontext_addr + O32_UCONTEXT_REGS;
+       regnum <= MIPS_RA_REGNUM; regnum++, addr += O32_UCONTEXT_REG_SIZE)
+    trad_frame_set_reg_addr (cache,
+			     regnum + gdbarch_num_regs (gdbarch),
+			     addr);
+
+  regnum = MIPS_PS_REGNUM;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + O32_UCONTEXT_SR);
+
+  /* HI and LO.  */
+  regnum = mips_regnum (gdbarch)->lo;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + O32_UCONTEXT_LO);
+  regnum = mips_regnum (gdbarch)->hi;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + O32_UCONTEXT_HI);
+
+  if (target_read_memory (ucontext_addr + O32_UCONTEXT_FPUSED, buf, 4) == 0
+      && extract_unsigned_integer (buf, 4, byte_order) != 0)
+    {
+      for (regnum = 0, addr = ucontext_addr + O32_UCONTEXT_FPREGS;
+	   regnum < 32; regnum++, addr += O32_UCONTEXT_REG_SIZE)
+	trad_frame_set_reg_addr (cache,
+				 regnum + gdbarch_fp0_regnum (gdbarch),
+				 addr);
+      trad_frame_set_reg_addr (cache, mips_regnum (gdbarch)->fp_control_status,
+			       addr);
+    }
+
+  trad_frame_set_id (cache, frame_id_build (sp, func));
+}
+
+#define MIPS_INST_ADDIU_A0_SP_O32 (0x27a40000 \
+				   + O32_SIGFRAME_UCONTEXT_OFFSET)
+
+static const struct tramp_frame mips_fbsd_sigframe =
+{
+  SIGTRAMP_FRAME,
+  MIPS_INSN32_SIZE,
+  {
+    { MIPS_INST_ADDIU_A0_SP_O32, -1 },	/* addiu   a0, sp, SIGF_UC */
+    { MIPS_INST_LI_V0_SIGRETURN, -1 },	/* li      v0, SYS_sigreturn */
+    { MIPS_INST_SYSCALL, -1 },		/* syscall */
+    { MIPS_INST_BREAK, -1 },		/* break */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  mips_fbsd_sigframe_init
+};
+
+#define N64_SIGFRAME_UCONTEXT_OFFSET	(32)
+#define N64_SIGSET_T_SIZE	(16)
+
+#define N64_UCONTEXT_ONSTACK	(N64_SIGSET_T_SIZE)
+#define N64_UCONTEXT_PC		(N64_UCONTEXT_ONSTACK + 8)
+#define N64_UCONTEXT_REGS	(N64_UCONTEXT_PC + 8)
+#define N64_UCONTEXT_SR		(N64_UCONTEXT_REGS + 8 * 32)
+#define N64_UCONTEXT_LO		(N64_UCONTEXT_SR + 8)
+#define N64_UCONTEXT_HI		(N64_UCONTEXT_LO + 8)
+#define N64_UCONTEXT_FPUSED	(N64_UCONTEXT_HI + 8)
+#define N64_UCONTEXT_FPREGS	(N64_UCONTEXT_FPUSED + 8)
+
+#define N64_UCONTEXT_REG_SIZE	8
+
+static void
+mips64_fbsd_sigframe_init (const struct tramp_frame *self,
+			   struct frame_info *this_frame,
+			   struct trad_frame_cache *cache,
+			   CORE_ADDR func)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp, ucontext_addr, addr;
+  int regnum;
+  gdb_byte buf[4];
+
+  /* We find the appropriate instance of `ucontext_t' at a
+     fixed offset in the signal frame.  */
+  sp = get_frame_register_signed (this_frame,
+				  MIPS_SP_REGNUM + gdbarch_num_regs (gdbarch));
+  ucontext_addr = sp + N64_SIGFRAME_UCONTEXT_OFFSET;
+
+  /* PC.  */
+  regnum = mips_regnum (gdbarch)->pc;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + N64_UCONTEXT_PC);
+
+  /* GPRs.  */
+  for (regnum = MIPS_ZERO_REGNUM, addr = ucontext_addr + N64_UCONTEXT_REGS;
+       regnum <= MIPS_RA_REGNUM; regnum++, addr += N64_UCONTEXT_REG_SIZE)
+    trad_frame_set_reg_addr (cache,
+			     regnum + gdbarch_num_regs (gdbarch),
+			     addr);
+
+  regnum = MIPS_PS_REGNUM;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + N64_UCONTEXT_SR);
+
+  /* HI and LO.  */
+  regnum = mips_regnum (gdbarch)->lo;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + N64_UCONTEXT_LO);
+  regnum = mips_regnum (gdbarch)->hi;
+  trad_frame_set_reg_addr (cache,
+			   regnum + gdbarch_num_regs (gdbarch),
+			   ucontext_addr + N64_UCONTEXT_HI);
+
+  if (target_read_memory (ucontext_addr + N64_UCONTEXT_FPUSED, buf, 4) == 0
+      && extract_unsigned_integer (buf, 4, byte_order) != 0)
+    {
+      for (regnum = 0, addr = ucontext_addr + N64_UCONTEXT_FPREGS;
+	   regnum < 32; regnum++, addr += N64_UCONTEXT_REG_SIZE)
+	trad_frame_set_reg_addr (cache,
+				 regnum + gdbarch_fp0_regnum (gdbarch),
+				 addr);
+      trad_frame_set_reg_addr (cache, mips_regnum (gdbarch)->fp_control_status,
+			       addr);
+    }
+
+  trad_frame_set_id (cache, frame_id_build (sp, func));
+}
+
+#define MIPS_INST_DADDIU_A0_SP_N64 (0x67a40000 \
+				    + N64_SIGFRAME_UCONTEXT_OFFSET)
+
+static const struct tramp_frame mips64_fbsd_sigframe =
+{
+  SIGTRAMP_FRAME,
+  MIPS_INSN32_SIZE,
+  {
+    { MIPS_INST_DADDIU_A0_SP_N64, -1 },	/* daddiu  a0, sp, SIGF_UC */
+    { MIPS_INST_LI_V0_SIGRETURN, -1 },	/* li      v0, SYS_sigreturn */
+    { MIPS_INST_SYSCALL, -1 },		/* syscall */
+    { MIPS_INST_BREAK, -1 },		/* break */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  mips64_fbsd_sigframe_init
+};
+
+/* Shared library support.  */
+
+/* FreeBSD/mips uses a slightly different `struct link_map' than the
+   other FreeBSD platforms as it includes an additional `l_off'
+   member.  */
+
+static struct link_map_offsets *
+mips_fbsd_ilp32_fetch_link_map_offsets (void)
+{
+  static struct link_map_offsets lmo;
+  static struct link_map_offsets *lmp = NULL;
+
+  if (lmp == NULL)
+    {
+      lmp = &lmo;
+
+      lmo.r_version_offset = 0;
+      lmo.r_version_size = 4;
+      lmo.r_map_offset = 4;
+      lmo.r_brk_offset = 8;
+      lmo.r_ldsomap_offset = -1;
+
+      lmo.link_map_size = 24;
+      lmo.l_addr_offset = 0;
+      lmo.l_name_offset = 8;
+      lmo.l_ld_offset = 12;
+      lmo.l_next_offset = 16;
+      lmo.l_prev_offset = 20;
+    }
+
+  return lmp;
+}
+
+static struct link_map_offsets *
+mips_fbsd_lp64_fetch_link_map_offsets (void)
+{
+  static struct link_map_offsets lmo;
+  static struct link_map_offsets *lmp = NULL;
+
+  if (lmp == NULL)
+    {
+      lmp = &lmo;
+
+      lmo.r_version_offset = 0;
+      lmo.r_version_size = 4;
+      lmo.r_map_offset = 8;
+      lmo.r_brk_offset = 16;
+      lmo.r_ldsomap_offset = -1;
+
+      lmo.link_map_size = 48;
+      lmo.l_addr_offset = 0;
+      lmo.l_name_offset = 16;
+      lmo.l_ld_offset = 24;
+      lmo.l_next_offset = 32;
+      lmo.l_prev_offset = 40;
+    }
+
+  return lmp;
+}
+
+static void
+mips_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  enum mips_abi abi = mips_abi (gdbarch);
+
+  /* Generic FreeBSD support.  */
+  fbsd_init_abi (info, gdbarch);
+
+  set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
+
+  switch (abi)
+    {
+      case MIPS_ABI_O32:
+	tramp_frame_prepend_unwinder (gdbarch, &mips_fbsd_sigframe);
+	break;
+      case MIPS_ABI_N32:
+	break;
+      case MIPS_ABI_N64:
+	tramp_frame_prepend_unwinder (gdbarch, &mips64_fbsd_sigframe);
+	break;
+    }
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, mips_fbsd_iterate_over_regset_sections);
+
+  /* FreeBSD/mips has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, (gdbarch_ptr_bit (gdbarch) == 32 ?
+	       mips_fbsd_ilp32_fetch_link_map_offsets :
+	       mips_fbsd_lp64_fetch_link_map_offsets));
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_mips_fbsd_tdep (void);
+
+void
+_initialize_mips_fbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_FREEBSD,
+			  mips_fbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-tdep.h ./gdb/mips-fbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-fbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-fbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* Common target dependent code for GDB on MIPS systems running FreeBSD.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef MIPS_FBSD_TDEP_H
+#define MIPS_FBSD_TDEP_H
+
+void mips_fbsd_supply_fpregs (struct regcache *, int, const void *, size_t);
+void mips_fbsd_supply_gregs (struct regcache *, int, const void *, size_t);
+void mips_fbsd_collect_fpregs (const struct regcache *, int, void *, size_t);
+void mips_fbsd_collect_gregs (const struct regcache *, int, void *, size_t);
+
+#endif /* MIPS_FBSD_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-nat.c ./gdb/mips-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,7 +32,7 @@
 #include "gregset.h"
 
 #include <sgidefs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/ptrace.h>
 
 #include "nat/mips-linux-watch.h"
@@ -152,7 +152,7 @@ mips64_linux_register_addr (struct gdbar
 /* Fetch the thread-local storage pointer for libthread_db.  */
 
 ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
                     lwpid_t lwpid, int idx, void **base)
 {
   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
@@ -509,7 +509,8 @@ mips_show_dr (const char *func, CORE_ADD
 
 static int
 mips_linux_can_use_hw_breakpoint (struct target_ops *self,
-				  int type, int cnt, int ot)
+				  enum bptype type,
+				  int cnt, int ot)
 {
   int i;
   uint32_t wanted_mask, irw_mask;
@@ -614,7 +615,7 @@ write_watchpoint_regs (void)
   ALL_LWPS (lp)
     {
       tid = ptid_get_lwp (lp->ptid);
-      if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror) == -1)
+      if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
 	perror_with_name (_("Couldn't write debug register"));
     }
   return 0;
@@ -634,7 +635,7 @@ mips_linux_new_thread (struct lwp_info *
     return;
 
   tid = ptid_get_lwp (lp->ptid);
-  if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror) == -1)
+  if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
     perror_with_name (_("Couldn't write debug register"));
 }
 
@@ -643,7 +644,8 @@ mips_linux_new_thread (struct lwp_info *
 
 static int
 mips_linux_insert_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int type,
+			      CORE_ADDR addr, int len,
+			      enum target_hw_bp_type type,
 			      struct expression *cond)
 {
   struct pt_watch_regs regs;
@@ -671,8 +673,7 @@ mips_linux_insert_watchpoint (struct tar
     return -1;
 
   /* It fit.  Stick it on the end of the list.  */
-  new_watch = (struct mips_watchpoint *)
-    xmalloc (sizeof (struct mips_watchpoint));
+  new_watch = XNEW (struct mips_watchpoint);
   new_watch->addr = addr;
   new_watch->len = len;
   new_watch->type = type;
@@ -697,7 +698,8 @@ mips_linux_insert_watchpoint (struct tar
 
 static int
 mips_linux_remove_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int type,
+			      CORE_ADDR addr, int len,
+			      enum target_hw_bp_type type,
 			      struct expression *cond)
 {
   int retval;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-tdep.c ./gdb/mips-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -120,7 +120,8 @@ supply_32bit_reg (struct regcache *regca
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[MAX_REGISTER_SIZE];
   store_signed_integer (buf, register_size (gdbarch, regnum), byte_order,
-			extract_signed_integer (addr, 4, byte_order));
+			extract_signed_integer ((const gdb_byte *) addr, 4,
+						byte_order));
   regcache_raw_supply (regcache, regnum, buf);
 }
 
@@ -334,7 +335,8 @@ mips64_linux_get_longjmp_target (struct 
   CORE_ADDR jb_addr;
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  void *buf = alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
+  gdb_byte *buf
+    = (gdb_byte *) alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
   int element_size = gdbarch_ptr_bit (gdbarch) == 32 ? 4 : 8;
 
   jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
@@ -475,7 +477,7 @@ mips64_fill_gregset (const struct regcac
       val = extract_signed_integer (buf, register_size (gdbarch, regno),
 				    byte_order);
       dst = regp + regaddr;
-      store_signed_integer (dst, 8, byte_order, val);
+      store_signed_integer ((gdb_byte *) dst, 8, byte_order, val);
     }
 }
 
@@ -737,15 +739,17 @@ mips_linux_in_dynsym_stub (CORE_ADDR pc)
   insn = extract_unsigned_integer (p + 4, 4, byte_order);
   if (n64)
     {
-      /* daddu t7,ra */
-      if (insn != 0x03e0782d)
+      /* 'daddu t7,ra' or 'or t7, ra, zero'*/
+      if (insn != 0x03e0782d || insn != 0x03e07825)
 	return 0;
+
     }
   else
     {
-      /* addu t7,ra */
-      if (insn != 0x03e07821)
+      /* 'addu t7,ra'  or 'or t7, ra, zero'*/
+      if (insn != 0x03e07821 || insn != 0x03e07825)
 	return 0;
+
     }
 
   insn = extract_unsigned_integer (p + 8, 4, byte_order);
@@ -1642,7 +1646,8 @@ mips_linux_init_abi (struct gdbarch_info
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum mips_abi abi = mips_abi (gdbarch);
-  struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+  struct tdesc_arch_data *tdesc_data
+    = (struct tdesc_arch_data *) info.tdep_info;
 
   linux_init_abi (info, gdbarch);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-tdep.h ./gdb/mips-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-nat.c ./gdb/mips-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,125 @@
+/* Native-dependent code for MIPS systems running NetBSD.
+
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "mips-tdep.h"
+#include "mips-nbsd-tdep.h"
+#include "inf-ptrace.h"
+
+/* Determine if PT_GETREGS fetches this register.  */
+static int
+getregs_supplies (struct gdbarch *gdbarch, int regno)
+{
+  return ((regno) >= MIPS_ZERO_REGNUM
+	  && (regno) <= gdbarch_pc_regnum (gdbarch));
+}
+
+static void
+mipsnbsd_fetch_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  if (regno == -1 || getregs_supplies (gdbarch, regno))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+      
+      mipsnbsd_supply_reg (regcache, (char *) &regs, regno);
+      if (regno != -1)
+	return;
+    }
+
+  if (regno == -1
+      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno);
+    }
+}
+
+static void
+mipsnbsd_store_inferior_registers (struct target_ops *ops,
+				   struct regcache *regcache, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  if (regno == -1 || getregs_supplies (gdbarch, regno))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      mipsnbsd_fill_reg (regcache, (char *) &regs, regno);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid), 
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't write registers"));
+
+      if (regno != -1)
+	return;
+    }
+
+  if (regno == -1
+      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
+    {
+      struct fpreg fpregs; 
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_mipsnbsd_nat (void);
+
+void
+_initialize_mipsnbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = mipsnbsd_fetch_inferior_registers;
+  t->to_store_registers = mipsnbsd_store_inferior_registers;
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-nat.c ./gdb/mipsnbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mipsnbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,125 +0,0 @@
-/* Native-dependent code for MIPS systems running NetBSD.
-
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "mips-tdep.h"
-#include "mipsnbsd-tdep.h"
-#include "inf-ptrace.h"
-
-/* Determine if PT_GETREGS fetches this register.  */
-static int
-getregs_supplies (struct gdbarch *gdbarch, int regno)
-{
-  return ((regno) >= MIPS_ZERO_REGNUM
-	  && (regno) <= gdbarch_pc_regnum (gdbarch));
-}
-
-static void
-mipsnbsd_fetch_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  if (regno == -1 || getregs_supplies (gdbarch, regno))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-      
-      mipsnbsd_supply_reg (regcache, (char *) &regs, regno);
-      if (regno != -1)
-	return;
-    }
-
-  if (regno == -1
-      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno);
-    }
-}
-
-static void
-mipsnbsd_store_inferior_registers (struct target_ops *ops,
-				   struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  if (regno == -1 || getregs_supplies (gdbarch, regno))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      mipsnbsd_fill_reg (regcache, (char *) &regs, regno);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid), 
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't write registers"));
-
-      if (regno != -1)
-	return;
-    }
-
-  if (regno == -1
-      || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
-    {
-      struct fpreg fpregs; 
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_mipsnbsd_nat (void);
-
-void
-_initialize_mipsnbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = mipsnbsd_fetch_inferior_registers;
-  t->to_store_registers = mipsnbsd_store_inferior_registers;
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-tdep.c ./gdb/mips-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,385 @@
+/* Target-dependent code for NetBSD/mips.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "regset.h"
+#include "target.h"
+#include "value.h"
+#include "osabi.h"
+
+#include "nbsd-tdep.h"
+#include "mips-nbsd-tdep.h"
+#include "mips-tdep.h"
+
+#include "solib-svr4.h"
+
+/* Shorthand for some register numbers used below.  */
+#define MIPS_PC_REGNUM  MIPS_EMBED_PC_REGNUM
+#define MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM
+#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
+
+/* Core file support.  */
+
+/* Number of registers in `struct reg' from <machine/reg.h>.  */
+#define MIPSNBSD_NUM_GREGS	38
+
+/* Number of registers in `struct fpreg' from <machine/reg.h>.  */
+#define MIPSNBSD_NUM_FPREGS	33
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+   in the floating-point register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+mipsnbsd_supply_fpregset (const struct regset *regset,
+			  struct regcache *regcache,
+			  int regnum, const void *fpregs, size_t len)
+{
+  size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
+  const char *regs = (const char *) fpregs;
+  int i;
+
+  gdb_assert (len >= MIPSNBSD_NUM_FPREGS * regsize);
+
+  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i,
+			     regs + (i - MIPS_FP0_REGNUM) * regsize);
+    }
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+   in the general-purpose register set REGSET to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+static void
+mipsnbsd_supply_gregset (const struct regset *regset,
+			 struct regcache *regcache, int regnum,
+			 const void *gregs, size_t len)
+{
+  size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
+  const char *regs = (const char *) gregs;
+  int i;
+
+  gdb_assert (len >= MIPSNBSD_NUM_GREGS * regsize);
+
+  for (i = 0; i <= MIPS_PC_REGNUM; i++)
+    {
+      if (regnum == i || regnum == -1)
+	regcache_raw_supply (regcache, i, regs + i * regsize);
+    }
+
+  if (len >= (MIPSNBSD_NUM_GREGS + MIPSNBSD_NUM_FPREGS) * regsize)
+    {
+      regs += MIPSNBSD_NUM_GREGS * regsize;
+      len -= MIPSNBSD_NUM_GREGS * regsize;
+      mipsnbsd_supply_fpregset (regset, regcache, regnum, regs, len);
+    }
+}
+
+/* NetBSD/mips register sets.  */
+
+static const struct regset mipsnbsd_gregset =
+{
+  NULL,
+  mipsnbsd_supply_gregset,
+  NULL,
+  REGSET_VARIABLE_SIZE
+};
+
+static const struct regset mipsnbsd_fpregset =
+{
+  NULL,
+  mipsnbsd_supply_fpregset
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+mipsnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				       iterate_over_regset_sections_cb *cb,
+				       void *cb_data,
+				       const struct regcache *regcache)
+{
+  size_t regsize = mips_isa_regsize (gdbarch);
+
+  cb (".reg", MIPSNBSD_NUM_GREGS * regsize, &mipsnbsd_gregset,
+      NULL, cb_data);
+  cb (".reg2", MIPSNBSD_NUM_FPREGS * regsize, &mipsnbsd_fpregset,
+      NULL, cb_data);
+}
+
+
+/* Conveniently, GDB uses the same register numbering as the
+   ptrace register structure used by NetBSD/mips.  */
+
+void
+mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int i;
+
+  for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
+    {
+      if (regno == i || regno == -1)
+	{
+	  if (gdbarch_cannot_fetch_register (gdbarch, i))
+	    regcache_raw_supply (regcache, i, NULL);
+	  else
+            regcache_raw_supply (regcache, i,
+				 regs + (i * mips_isa_regsize (gdbarch)));
+        }
+    }
+}
+
+void
+mipsnbsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int i;
+
+  for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
+    if ((regno == i || regno == -1)
+	&& ! gdbarch_cannot_store_register (gdbarch, i))
+      regcache_raw_collect (regcache, i,
+			    regs + (i * mips_isa_regsize (gdbarch)));
+}
+
+void
+mipsnbsd_supply_fpreg (struct regcache *regcache,
+		       const char *fpregs, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int i;
+
+  for (i = gdbarch_fp0_regnum (gdbarch);
+       i <= mips_regnum (gdbarch)->fp_implementation_revision;
+       i++)
+    {
+      if (regno == i || regno == -1)
+	{
+	  if (gdbarch_cannot_fetch_register (gdbarch, i))
+	    regcache_raw_supply (regcache, i, NULL);
+	  else
+            regcache_raw_supply (regcache, i,
+				 fpregs 
+				 + ((i - gdbarch_fp0_regnum (gdbarch))
+				    * mips_isa_regsize (gdbarch)));
+	}
+    }
+}
+
+void
+mipsnbsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  int i;
+
+  for (i = gdbarch_fp0_regnum (gdbarch);
+       i <= mips_regnum (gdbarch)->fp_control_status;
+       i++)
+    if ((regno == i || regno == -1) 
+	&& ! gdbarch_cannot_store_register (gdbarch, i))
+      regcache_raw_collect (regcache, i,
+			    fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
+			      * mips_isa_regsize (gdbarch)));
+}
+
+#if 0
+
+/* Under NetBSD/mips, signal handler invocations can be identified by the
+   designated code sequence that is used to return from a signal handler.
+   In particular, the return address of a signal handler points to the
+   following code sequence:
+
+	addu	a0, sp, 16
+	li	v0, 295			# __sigreturn14
+	syscall
+   
+   Each instruction has a unique encoding, so we simply attempt to match
+   the instruction the PC is pointing to with any of the above instructions.
+   If there is a hit, we know the offset to the start of the designated
+   sequence and can then check whether we really are executing in the
+   signal trampoline.  If not, -1 is returned, otherwise the offset from the
+   start of the return sequence is returned.  */
+
+#define RETCODE_NWORDS	3
+#define RETCODE_SIZE	(RETCODE_NWORDS * 4)
+
+static const unsigned char sigtramp_retcode_mipsel[RETCODE_SIZE] =
+{
+  0x10, 0x00, 0xa4, 0x27,	/* addu a0, sp, 16 */
+  0x27, 0x01, 0x02, 0x24,	/* li v0, 295 */
+  0x0c, 0x00, 0x00, 0x00,	/* syscall */
+};
+
+static const unsigned char sigtramp_retcode_mipseb[RETCODE_SIZE] =
+{
+  0x27, 0xa4, 0x00, 0x10,	/* addu a0, sp, 16 */
+  0x24, 0x02, 0x01, 0x27,	/* li v0, 295 */
+  0x00, 0x00, 0x00, 0x0c,	/* syscall */
+};
+
+#endif
+
+/* Figure out where the longjmp will land.  We expect that we have
+   just entered longjmp and haven't yet setup the stack frame, so the
+   args are still in the argument regs.  MIPS_A0_REGNUM points at the
+   jmp_buf structure from which we extract the PC that we will land
+   at.  The PC is copied into *pc.  This routine returns true on
+   success.  */
+
+#define NBSD_MIPS_JB_PC			(2 * 4)
+#define NBSD_MIPS_JB_ELEMENT_SIZE(gdbarch)	mips_isa_regsize (gdbarch)
+#define NBSD_MIPS_JB_OFFSET(gdbarch)		(NBSD_MIPS_JB_PC * \
+					 NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch))
+
+static int
+mipsnbsd_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
+{
+  struct gdbarch *gdbarch = get_frame_arch (frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR jb_addr;
+  gdb_byte *buf;
+
+  buf = (gdb_byte *) alloca (NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch));
+
+  jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
+
+  if (target_read_memory (jb_addr + NBSD_MIPS_JB_OFFSET (gdbarch), buf,
+  			  NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch)))
+    return 0;
+
+  *pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch),
+				  byte_order);
+  return 1;
+}
+
+static int
+mipsnbsd_cannot_fetch_register (struct gdbarch *gdbarch, int regno)
+{
+  return (regno == MIPS_ZERO_REGNUM
+	  || regno == mips_regnum (gdbarch)->fp_implementation_revision);
+}
+
+static int
+mipsnbsd_cannot_store_register (struct gdbarch *gdbarch, int regno)
+{
+  return (regno == MIPS_ZERO_REGNUM
+	  || regno == mips_regnum (gdbarch)->fp_implementation_revision);
+}
+
+/* Shared library support.  */
+
+/* NetBSD/mips uses a slightly different `struct link_map' than the
+   other NetBSD platforms.  */
+
+static struct link_map_offsets *
+mipsnbsd_ilp32_fetch_link_map_offsets (void)
+{
+  static struct link_map_offsets lmo;
+  static struct link_map_offsets *lmp = NULL;
+
+  if (lmp == NULL) 
+    {
+      lmp = &lmo;
+
+      lmo.r_version_offset = 0;
+      lmo.r_version_size = 4;
+      lmo.r_map_offset = 4;
+      lmo.r_brk_offset = 8;
+      lmo.r_ldsomap_offset = -1;
+
+      /* Everything we need is in the first 24 bytes.  */
+      lmo.link_map_size = 24;
+      lmo.l_addr_offset = 4;
+      lmo.l_name_offset = 8;
+      lmo.l_ld_offset = 12;
+      lmo.l_next_offset = 16;
+      lmo.l_prev_offset = 20;
+    }
+
+  return lmp;
+}
+
+static struct link_map_offsets *
+mipsnbsd_lp64_fetch_link_map_offsets (void)
+{
+  static struct link_map_offsets lmo;
+  static struct link_map_offsets *lmp = NULL;
+
+  if (lmp == NULL)
+    {
+      lmp = &lmo;
+
+      lmo.r_version_offset = 0;
+      lmo.r_version_size = 4;
+      lmo.r_map_offset = 8;
+      lmo.r_brk_offset = 16;
+      lmo.r_ldsomap_offset = -1;
+
+      /* Everything we need is in the first 40 bytes.  */
+      lmo.link_map_size = 48;
+      lmo.l_addr_offset = 0;
+      lmo.l_name_offset = 16; 
+      lmo.l_ld_offset = 24;
+      lmo.l_next_offset = 32;
+      lmo.l_prev_offset = 40;
+    }
+
+  return lmp;
+}
+
+
+static void
+mipsnbsd_init_abi (struct gdbarch_info info,
+                   struct gdbarch *gdbarch)
+{
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, mipsnbsd_iterate_over_regset_sections);
+
+  set_gdbarch_get_longjmp_target (gdbarch, mipsnbsd_get_longjmp_target);
+
+  set_gdbarch_cannot_fetch_register (gdbarch, mipsnbsd_cannot_fetch_register);
+  set_gdbarch_cannot_store_register (gdbarch, mipsnbsd_cannot_store_register);
+
+  set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
+
+  /* NetBSD/mips has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, (gdbarch_ptr_bit (gdbarch) == 32 ?
+	       mipsnbsd_ilp32_fetch_link_map_offsets :
+	       mipsnbsd_lp64_fetch_link_map_offsets));
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mipsnbsd_tdep;
+
+void
+_initialize_mipsnbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_NETBSD,
+			  mipsnbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-tdep.c ./gdb/mipsnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mipsnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,385 +0,0 @@
-/* Target-dependent code for NetBSD/mips.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "regset.h"
-#include "target.h"
-#include "value.h"
-#include "osabi.h"
-
-#include "nbsd-tdep.h"
-#include "mipsnbsd-tdep.h"
-#include "mips-tdep.h"
-
-#include "solib-svr4.h"
-
-/* Shorthand for some register numbers used below.  */
-#define MIPS_PC_REGNUM  MIPS_EMBED_PC_REGNUM
-#define MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM
-#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
-
-/* Core file support.  */
-
-/* Number of registers in `struct reg' from <machine/reg.h>.  */
-#define MIPSNBSD_NUM_GREGS	38
-
-/* Number of registers in `struct fpreg' from <machine/reg.h>.  */
-#define MIPSNBSD_NUM_FPREGS	33
-
-/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-   in the floating-point register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-mipsnbsd_supply_fpregset (const struct regset *regset,
-			  struct regcache *regcache,
-			  int regnum, const void *fpregs, size_t len)
-{
-  size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
-  const char *regs = fpregs;
-  int i;
-
-  gdb_assert (len >= MIPSNBSD_NUM_FPREGS * regsize);
-
-  for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i,
-			     regs + (i - MIPS_FP0_REGNUM) * regsize);
-    }
-}
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
-   in the general-purpose register set REGSET to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-static void
-mipsnbsd_supply_gregset (const struct regset *regset,
-			 struct regcache *regcache, int regnum,
-			 const void *gregs, size_t len)
-{
-  size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
-  const char *regs = gregs;
-  int i;
-
-  gdb_assert (len >= MIPSNBSD_NUM_GREGS * regsize);
-
-  for (i = 0; i <= MIPS_PC_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * regsize);
-    }
-
-  if (len >= (MIPSNBSD_NUM_GREGS + MIPSNBSD_NUM_FPREGS) * regsize)
-    {
-      regs += MIPSNBSD_NUM_GREGS * regsize;
-      len -= MIPSNBSD_NUM_GREGS * regsize;
-      mipsnbsd_supply_fpregset (regset, regcache, regnum, regs, len);
-    }
-}
-
-/* NetBSD/mips register sets.  */
-
-static const struct regset mipsnbsd_gregset =
-{
-  NULL,
-  mipsnbsd_supply_gregset,
-  NULL,
-  REGSET_VARIABLE_SIZE
-};
-
-static const struct regset mipsnbsd_fpregset =
-{
-  NULL,
-  mipsnbsd_supply_fpregset
-};
-
-/* Iterate over core file register note sections.  */
-
-static void
-mipsnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				       iterate_over_regset_sections_cb *cb,
-				       void *cb_data,
-				       const struct regcache *regcache)
-{
-  size_t regsize = mips_isa_regsize (gdbarch);
-
-  cb (".reg", MIPSNBSD_NUM_GREGS * regsize, &mipsnbsd_gregset,
-      NULL, cb_data);
-  cb (".reg2", MIPSNBSD_NUM_FPREGS * regsize, &mipsnbsd_fpregset,
-      NULL, cb_data);
-}
-
-
-/* Conveniently, GDB uses the same register numbering as the
-   ptrace register structure used by NetBSD/mips.  */
-
-void
-mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int i;
-
-  for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
-    {
-      if (regno == i || regno == -1)
-	{
-	  if (gdbarch_cannot_fetch_register (gdbarch, i))
-	    regcache_raw_supply (regcache, i, NULL);
-	  else
-            regcache_raw_supply (regcache, i,
-				 regs + (i * mips_isa_regsize (gdbarch)));
-        }
-    }
-}
-
-void
-mipsnbsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int i;
-
-  for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
-    if ((regno == i || regno == -1)
-	&& ! gdbarch_cannot_store_register (gdbarch, i))
-      regcache_raw_collect (regcache, i,
-			    regs + (i * mips_isa_regsize (gdbarch)));
-}
-
-void
-mipsnbsd_supply_fpreg (struct regcache *regcache,
-		       const char *fpregs, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int i;
-
-  for (i = gdbarch_fp0_regnum (gdbarch);
-       i <= mips_regnum (gdbarch)->fp_implementation_revision;
-       i++)
-    {
-      if (regno == i || regno == -1)
-	{
-	  if (gdbarch_cannot_fetch_register (gdbarch, i))
-	    regcache_raw_supply (regcache, i, NULL);
-	  else
-            regcache_raw_supply (regcache, i,
-				 fpregs 
-				 + ((i - gdbarch_fp0_regnum (gdbarch))
-				    * mips_isa_regsize (gdbarch)));
-	}
-    }
-}
-
-void
-mipsnbsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int i;
-
-  for (i = gdbarch_fp0_regnum (gdbarch);
-       i <= mips_regnum (gdbarch)->fp_control_status;
-       i++)
-    if ((regno == i || regno == -1) 
-	&& ! gdbarch_cannot_store_register (gdbarch, i))
-      regcache_raw_collect (regcache, i,
-			    fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
-			      * mips_isa_regsize (gdbarch)));
-}
-
-#if 0
-
-/* Under NetBSD/mips, signal handler invocations can be identified by the
-   designated code sequence that is used to return from a signal handler.
-   In particular, the return address of a signal handler points to the
-   following code sequence:
-
-	addu	a0, sp, 16
-	li	v0, 295			# __sigreturn14
-	syscall
-   
-   Each instruction has a unique encoding, so we simply attempt to match
-   the instruction the PC is pointing to with any of the above instructions.
-   If there is a hit, we know the offset to the start of the designated
-   sequence and can then check whether we really are executing in the
-   signal trampoline.  If not, -1 is returned, otherwise the offset from the
-   start of the return sequence is returned.  */
-
-#define RETCODE_NWORDS	3
-#define RETCODE_SIZE	(RETCODE_NWORDS * 4)
-
-static const unsigned char sigtramp_retcode_mipsel[RETCODE_SIZE] =
-{
-  0x10, 0x00, 0xa4, 0x27,	/* addu a0, sp, 16 */
-  0x27, 0x01, 0x02, 0x24,	/* li v0, 295 */
-  0x0c, 0x00, 0x00, 0x00,	/* syscall */
-};
-
-static const unsigned char sigtramp_retcode_mipseb[RETCODE_SIZE] =
-{
-  0x27, 0xa4, 0x00, 0x10,	/* addu a0, sp, 16 */
-  0x24, 0x02, 0x01, 0x27,	/* li v0, 295 */
-  0x00, 0x00, 0x00, 0x0c,	/* syscall */
-};
-
-#endif
-
-/* Figure out where the longjmp will land.  We expect that we have
-   just entered longjmp and haven't yet setup the stack frame, so the
-   args are still in the argument regs.  MIPS_A0_REGNUM points at the
-   jmp_buf structure from which we extract the PC that we will land
-   at.  The PC is copied into *pc.  This routine returns true on
-   success.  */
-
-#define NBSD_MIPS_JB_PC			(2 * 4)
-#define NBSD_MIPS_JB_ELEMENT_SIZE(gdbarch)	mips_isa_regsize (gdbarch)
-#define NBSD_MIPS_JB_OFFSET(gdbarch)		(NBSD_MIPS_JB_PC * \
-					 NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch))
-
-static int
-mipsnbsd_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
-{
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR jb_addr;
-  gdb_byte *buf;
-
-  buf = alloca (NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch));
-
-  jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
-
-  if (target_read_memory (jb_addr + NBSD_MIPS_JB_OFFSET (gdbarch), buf,
-  			  NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch)))
-    return 0;
-
-  *pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch),
-				  byte_order);
-  return 1;
-}
-
-static int
-mipsnbsd_cannot_fetch_register (struct gdbarch *gdbarch, int regno)
-{
-  return (regno == MIPS_ZERO_REGNUM
-	  || regno == mips_regnum (gdbarch)->fp_implementation_revision);
-}
-
-static int
-mipsnbsd_cannot_store_register (struct gdbarch *gdbarch, int regno)
-{
-  return (regno == MIPS_ZERO_REGNUM
-	  || regno == mips_regnum (gdbarch)->fp_implementation_revision);
-}
-
-/* Shared library support.  */
-
-/* NetBSD/mips uses a slightly different `struct link_map' than the
-   other NetBSD platforms.  */
-
-static struct link_map_offsets *
-mipsnbsd_ilp32_fetch_link_map_offsets (void)
-{
-  static struct link_map_offsets lmo;
-  static struct link_map_offsets *lmp = NULL;
-
-  if (lmp == NULL) 
-    {
-      lmp = &lmo;
-
-      lmo.r_version_offset = 0;
-      lmo.r_version_size = 4;
-      lmo.r_map_offset = 4;
-      lmo.r_brk_offset = 8;
-      lmo.r_ldsomap_offset = -1;
-
-      /* Everything we need is in the first 24 bytes.  */
-      lmo.link_map_size = 24;
-      lmo.l_addr_offset = 4;
-      lmo.l_name_offset = 8;
-      lmo.l_ld_offset = 12;
-      lmo.l_next_offset = 16;
-      lmo.l_prev_offset = 20;
-    }
-
-  return lmp;
-}
-
-static struct link_map_offsets *
-mipsnbsd_lp64_fetch_link_map_offsets (void)
-{
-  static struct link_map_offsets lmo;
-  static struct link_map_offsets *lmp = NULL;
-
-  if (lmp == NULL)
-    {
-      lmp = &lmo;
-
-      lmo.r_version_offset = 0;
-      lmo.r_version_size = 4;
-      lmo.r_map_offset = 8;
-      lmo.r_brk_offset = 16;
-      lmo.r_ldsomap_offset = -1;
-
-      /* Everything we need is in the first 40 bytes.  */
-      lmo.link_map_size = 48;
-      lmo.l_addr_offset = 0;
-      lmo.l_name_offset = 16; 
-      lmo.l_ld_offset = 24;
-      lmo.l_next_offset = 32;
-      lmo.l_prev_offset = 40;
-    }
-
-  return lmp;
-}
-
-
-static void
-mipsnbsd_init_abi (struct gdbarch_info info,
-                   struct gdbarch *gdbarch)
-{
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, mipsnbsd_iterate_over_regset_sections);
-
-  set_gdbarch_get_longjmp_target (gdbarch, mipsnbsd_get_longjmp_target);
-
-  set_gdbarch_cannot_fetch_register (gdbarch, mipsnbsd_cannot_fetch_register);
-  set_gdbarch_cannot_store_register (gdbarch, mipsnbsd_cannot_store_register);
-
-  set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
-
-  /* NetBSD/mips has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, (gdbarch_ptr_bit (gdbarch) == 32 ?
-	       mipsnbsd_ilp32_fetch_link_map_offsets :
-	       mipsnbsd_lp64_fetch_link_map_offsets));
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_mipsnbsd_tdep;
-
-void
-_initialize_mipsnbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_NETBSD_ELF,
-			  mipsnbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-tdep.h ./gdb/mips-nbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-nbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/mips-nbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+/* Common target dependent code for GDB on MIPS systems running NetBSD.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef MIPS_NBSD_TDEP_H
+#define MIPS_NBSD_TDEP_H
+
+void mipsnbsd_supply_reg (struct regcache *, const char *, int);
+void mipsnbsd_fill_reg (const struct regcache *, char *, int);
+
+void mipsnbsd_supply_fpreg (struct regcache *, const char *, int);
+void mipsnbsd_fill_fpreg (const struct regcache *, char *, int);
+
+#endif /* MIPS_NBSD_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-tdep.h ./gdb/mipsnbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsnbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mipsnbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-/* Common target dependent code for GDB on MIPS systems running NetBSD.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef MIPSNBSD_TDEP_H
-#define MIPSNBSD_TDEP_H
-
-void mipsnbsd_supply_reg (struct regcache *, const char *, int);
-void mipsnbsd_fill_reg (const struct regcache *, char *, int);
-
-void mipsnbsd_supply_fpreg (struct regcache *, const char *, int);
-void mipsnbsd_fill_fpreg (const struct regcache *, char *, int);
-
-#endif /* MIPSNBSD_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsread.c ./gdb/mipsread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mipsread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mipsread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Read a symbol table in MIPS' format (Third-Eye).
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU.  Major work
    by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
@@ -42,7 +42,8 @@
 #include "psymtab.h"
 
 static void
-read_alphacoff_dynamic_symtab (struct section_offsets *,
+read_alphacoff_dynamic_symtab (minimal_symbol_reader &,
+			       struct section_offsets *,
 			       struct objfile *objfile);
 
 /* Initialize anything that needs initializing when a completely new
@@ -66,13 +67,11 @@ mipscoff_symfile_init (struct objfile *o
 /* Read a symbol file from a file.  */
 
 static void
-mipscoff_symfile_read (struct objfile *objfile, int symfile_flags)
+mipscoff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *abfd = objfile->obfd;
-  struct cleanup *back_to;
 
-  init_minimal_symbol_collection ();
-  back_to = make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   /* Now that the executable file is positioned at symbol table,
      process it and define symbols accordingly.  */
@@ -81,18 +80,17 @@ mipscoff_symfile_read (struct objfile *o
 	(abfd, (asection *) NULL, &ecoff_data (abfd)->debug_info)))
     error (_("Error reading symbol table: %s"), bfd_errmsg (bfd_get_error ()));
 
-  mdebug_build_psymtabs (objfile, &ecoff_backend (abfd)->debug_swap,
+  mdebug_build_psymtabs (reader, objfile, &ecoff_backend (abfd)->debug_swap,
 			 &ecoff_data (abfd)->debug_info);
 
   /* Add alpha coff dynamic symbols.  */
 
-  read_alphacoff_dynamic_symtab (objfile->section_offsets, objfile);
+  read_alphacoff_dynamic_symtab (reader, objfile->section_offsets, objfile);
 
   /* Install any minimal symbols that have been collected as the current
      minimal symbols for this objfile.  */
 
-  install_minimal_symbols (objfile);
-  do_cleanups (back_to);
+  reader.install ();
 }
 
 /* Perform any local cleanups required when we are done with a
@@ -176,7 +174,8 @@ alphacoff_locate_sections (bfd *ignore_a
    them to the minimal symbol table.  */
 
 static void
-read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
+read_alphacoff_dynamic_symtab (minimal_symbol_reader &reader,
+			       struct section_offsets *section_offsets,
 			       struct objfile *objfile)
 {
   bfd *abfd = objfile->obfd;
@@ -215,13 +214,13 @@ read_alphacoff_dynamic_symtab (struct se
   str_secsize = bfd_get_section_size (si.str_sect);
   dyninfo_secsize = bfd_get_section_size (si.dyninfo_sect);
   got_secsize = bfd_get_section_size (si.got_sect);
-  sym_secptr = xmalloc (sym_secsize);
+  sym_secptr = (char *) xmalloc (sym_secsize);
   cleanups = make_cleanup (xfree, sym_secptr);
-  str_secptr = xmalloc (str_secsize);
+  str_secptr = (char *) xmalloc (str_secsize);
   make_cleanup (xfree, str_secptr);
-  dyninfo_secptr = xmalloc (dyninfo_secsize);
+  dyninfo_secptr = (char *) xmalloc (dyninfo_secsize);
   make_cleanup (xfree, dyninfo_secptr);
-  got_secptr = xmalloc (got_secsize);
+  got_secptr = (char *) xmalloc (got_secsize);
   make_cleanup (xfree, got_secptr);
 
   if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
@@ -391,7 +390,7 @@ read_alphacoff_dynamic_symtab (struct se
 	    }
 	}
 
-      prim_record_minimal_symbol (name, sym_value, ms_type, objfile);
+      reader.record (name, sym_value, ms_type);
     }
 
   do_cleanups (cleanups);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-sde-tdep.c ./gdb/mips-sde-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-sde-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-sde-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for SDE on MIPS processors.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info 
   int i;
 
   if (*this_cache != NULL)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;
 
@@ -205,7 +205,7 @@ static void
 mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
 					   void *obj)
 {
-  enum gdb_osabi *os_ident_ptr = obj;
+  enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj;
   const char *name;
 
   name = bfd_get_section_name (abfd, sect);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-tdep.c ./gdb/mips-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -44,6 +44,7 @@
 #include "symcat.h"
 #include "sim-regno.h"
 #include "dis-asm.h"
+#include "disasm.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "trad-frame.h"
@@ -55,6 +56,7 @@
 #include "user-regs.h"
 #include "valprint.h"
 #include "ax.h"
+#include <algorithm>
 
 static const struct objfile_data *mips_pdr_data;
 
@@ -107,6 +109,23 @@ static const char *const mips_abi_string
   NULL
 };
 
+/* Enum describing the different kinds of breakpoints.  */
+
+enum mips_breakpoint_kind
+{
+  /* 16-bit MIPS16 mode breakpoint.  */
+  MIPS_BP_KIND_MIPS16 = 2,
+
+  /* 16-bit microMIPS mode breakpoint.  */
+  MIPS_BP_KIND_MICROMIPS16 = 3,
+
+  /* 32-bit standard MIPS mode breakpoint.  */
+  MIPS_BP_KIND_MIPS32 = 4,
+
+  /* 32-bit microMIPS mode breakpoint.  */
+  MIPS_BP_KIND_MICROMIPS32 = 5,
+};
+
 /* For backwards compatibility we default to MIPS16.  This flag is
    overridden as soon as unambiguous ELF file flags tell us the
    compressed ISA encoding used.  */
@@ -559,19 +578,6 @@ static const char *mips_generic_reg_name
   "fsr", "fir",
 };
 
-/* Names of IDT R3041 registers.  */
-
-static const char *mips_r3041_reg_names[] = {
-  "sr", "lo", "hi", "bad", "cause", "pc",
-  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-  "fsr", "fir", "", /*"fp" */ "",
-  "", "", "bus", "ccfg", "", "", "", "",
-  "", "", "port", "cmp", "", "", "epc", "prid",
-};
-
 /* Names of tx39 registers.  */
 
 static const char *mips_tx39_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
@@ -585,15 +591,6 @@ static const char *mips_tx39_reg_names[N
   "", "", "config", "cache", "debug", "depc", "epc",
 };
 
-/* Names of IRIX registers.  */
-static const char *mips_irix_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
-  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-  "pc", "cause", "bad", "hi", "lo", "fsr", "fir"
-};
-
 /* Names of registers with Linux kernels.  */
 static const char *mips_linux_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
   "sr", "lo", "hi", "bad", "cause", "pc",
@@ -1032,8 +1029,7 @@ mips_register_type (struct gdbarch *gdba
       if (rawnum == mips_regnum (gdbarch)->fp_control_status
 	  || rawnum == mips_regnum (gdbarch)->fp_implementation_revision)
 	return builtin_type (gdbarch)->builtin_int32;
-      else if (gdbarch_osabi (gdbarch) != GDB_OSABI_IRIX
-	       && gdbarch_osabi (gdbarch) != GDB_OSABI_LINUX
+      else if (gdbarch_osabi (gdbarch) != GDB_OSABI_LINUX
 	       && rawnum >= MIPS_FIRST_EMBED_REGNUM
 	       && rawnum <= MIPS_LAST_EMBED_REGNUM)
 	/* The pseudo/cooked view of the embedded registers is always
@@ -1073,11 +1069,18 @@ mips_pseudo_register_type (struct gdbarc
   if (TYPE_LENGTH (rawtype) == 0)
     return rawtype;
 
+  /* Present the floating point registers however the hardware did;
+     do not try to convert between FPU layouts.  */
   if (mips_float_register_p (gdbarch, rawnum))
-    /* Present the floating point registers however the hardware did;
-       do not try to convert between FPU layouts.  */
     return rawtype;
 
+  /* Floating-point control registers are always 32-bit even though for
+     backwards compatibility reasons 64-bit targets will transfer them
+     as 64-bit quantities even if using XML descriptions.  */
+  if (rawnum == mips_regnum (gdbarch)->fp_control_status
+      || rawnum == mips_regnum (gdbarch)->fp_implementation_revision)
+    return builtin_type (gdbarch)->builtin_int32;
+
   /* Use pointer types for registers if we can.  For n32 we can not,
      since we do not have a 64-bit pointer type.  */
   if (mips_abi_regsize (gdbarch)
@@ -1102,19 +1105,16 @@ mips_pseudo_register_type (struct gdbarc
 	      && rawnum < mips_regnum (gdbarch)->dspacc + 6)))
     return builtin_type (gdbarch)->builtin_int32;
 
-  if (gdbarch_osabi (gdbarch) != GDB_OSABI_IRIX
-      && gdbarch_osabi (gdbarch) != GDB_OSABI_LINUX
-      && rawnum >= MIPS_EMBED_FP0_REGNUM + 32
+  /* The pseudo/cooked view of embedded registers is always
+     32-bit, even if the target transfers 64-bit values for them.
+     New targets relying on XML descriptions should only transfer
+     the necessary 32 bits, but older versions of GDB expected 64,
+     so allow the target to provide 64 bits without interfering
+     with the displayed type.  */
+  if (gdbarch_osabi (gdbarch) != GDB_OSABI_LINUX
+      && rawnum >= MIPS_FIRST_EMBED_REGNUM
       && rawnum <= MIPS_LAST_EMBED_REGNUM)
-    {
-      /* The pseudo/cooked view of embedded registers is always
-	 32-bit, even if the target transfers 64-bit values for them.
-	 New targets relying on XML descriptions should only transfer
-	 the necessary 32 bits, but older versions of GDB expected 64,
-	 so allow the target to provide 64 bits without interfering
-	 with the displayed type.  */
-      return builtin_type (gdbarch)->builtin_int32;
-    }
+    return builtin_type (gdbarch)->builtin_int32;
 
   /* For all other registers, pass through the hardware type.  */
   return rawtype;
@@ -1429,12 +1429,12 @@ mips_write_pc (struct regcache *regcache
 
 static ULONGEST
 mips_fetch_instruction (struct gdbarch *gdbarch,
-			enum mips_isa isa, CORE_ADDR addr, int *statusp)
+			enum mips_isa isa, CORE_ADDR addr, int *errp)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[MIPS_INSN32_SIZE];
   int instlen;
-  int status;
+  int err;
 
   switch (isa)
     {
@@ -1450,13 +1450,13 @@ mips_fetch_instruction (struct gdbarch *
       internal_error (__FILE__, __LINE__, _("invalid ISA"));
       break;
     }
-  status = target_read_memory (addr, buf, instlen);
-  if (statusp != NULL)
-    *statusp = status;
-  if (status)
+  err = target_read_memory (addr, buf, instlen);
+  if (errp != NULL)
+    *errp = err;
+  if (err != 0)
     {
-      if (statusp == NULL)
-	memory_error (status, addr);
+      if (errp == NULL)
+	memory_error (TARGET_XFER_E_IO, addr);
       return 0;
     }
   return extract_unsigned_integer (buf, instlen, byte_order);
@@ -1518,10 +1518,8 @@ mips_insn_size (enum mips_isa isa, ULONG
   switch (isa)
     {
     case ISA_MICROMIPS:
-      if (micromips_op (insn) == 0x1f)
-        return 3 * MIPS_INSN16_SIZE;
-      else if (((micromips_op (insn) & 0x4) == 0x4)
-	       || ((micromips_op (insn) & 0x7) == 0x0))
+      if ((micromips_op (insn) & 0x4) == 0x4
+	  || (micromips_op (insn) & 0x7) == 0x0)
         return 2 * MIPS_INSN16_SIZE;
       else
         return MIPS_INSN16_SIZE;
@@ -1547,7 +1545,7 @@ mips32_relative_offset (ULONGEST inst)
    number of the floating condition bits tested by the branch.  */
 
 static CORE_ADDR
-mips32_bc1_pc (struct gdbarch *gdbarch, struct frame_info *frame,
+mips32_bc1_pc (struct gdbarch *gdbarch, struct regcache *regcache,
 	       ULONGEST inst, CORE_ADDR pc, int count)
 {
   int fcsr = mips_regnum (gdbarch)->fp_control_status;
@@ -1561,7 +1559,7 @@ mips32_bc1_pc (struct gdbarch *gdbarch, 
     /* No way to handle; it'll most likely trap anyway.  */
     return pc;
 
-  fcs = get_frame_register_unsigned (frame, fcsr);
+  fcs = regcache_raw_get_unsigned (regcache, fcsr);
   cond = ((fcs >> 24) & 0xfe) | ((fcs >> 23) & 0x01);
 
   if (((cond >> cnum) & mask) != mask * !tf)
@@ -1605,9 +1603,9 @@ is_octeon_bbit_op (int op, struct gdbarc
    branch prediction.  */
 
 static CORE_ADDR
-mips32_next_pc (struct frame_info *frame, CORE_ADDR pc)
+mips32_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   unsigned long inst;
   int op;
   inst = mips_fetch_instruction (gdbarch, ISA_MIPS, pc, NULL);
@@ -1634,15 +1632,15 @@ mips32_next_pc (struct frame_info *frame
 	}
       else if (op == 17 && itype_rs (inst) == 8)
 	/* BC1F, BC1FL, BC1T, BC1TL: 010001 01000 */
-	pc = mips32_bc1_pc (gdbarch, frame, inst, pc + 4, 1);
+	pc = mips32_bc1_pc (gdbarch, regcache, inst, pc + 4, 1);
       else if (op == 17 && itype_rs (inst) == 9
 	       && (itype_rt (inst) & 2) == 0)
 	/* BC1ANY2F, BC1ANY2T: 010001 01001 xxx0x */
-	pc = mips32_bc1_pc (gdbarch, frame, inst, pc + 4, 2);
+	pc = mips32_bc1_pc (gdbarch, regcache, inst, pc + 4, 2);
       else if (op == 17 && itype_rs (inst) == 10
 	       && (itype_rt (inst) & 2) == 0)
 	/* BC1ANY4F, BC1ANY4T: 010001 01010 xxx0x */
-	pc = mips32_bc1_pc (gdbarch, frame, inst, pc + 4, 4);
+	pc = mips32_bc1_pc (gdbarch, regcache, inst, pc + 4, 4);
       else if (op == 29)
 	/* JALX: 011101 */
 	/* The new PC will be alternate mode.  */
@@ -1664,8 +1662,8 @@ mips32_next_pc (struct frame_info *frame
 	  if (op == 54 || op == 62)
 	    bit += 32;
 
-	  if (((get_frame_register_signed (frame,
-					   itype_rs (inst)) >> bit) & 1)
+	  if (((regcache_raw_get_signed (regcache,
+					 itype_rs (inst)) >> bit) & 1)
               == branch_if)
 	    pc += mips32_relative_offset (inst) + 4;
           else
@@ -1688,15 +1686,15 @@ mips32_next_pc (struct frame_info *frame
 	    case 8:		/* JR */
 	    case 9:		/* JALR */
 	      /* Set PC to that address.  */
-	      pc = get_frame_register_signed (frame, rtype_rs (inst));
+	      pc = regcache_raw_get_signed (regcache, rtype_rs (inst));
 	      break;
 	    case 12:            /* SYSCALL */
 	      {
 		struct gdbarch_tdep *tdep;
 
-		tdep = gdbarch_tdep (get_frame_arch (frame));
+		tdep = gdbarch_tdep (gdbarch);
 		if (tdep->syscall_next_pc != NULL)
-		  pc = tdep->syscall_next_pc (frame);
+		  pc = tdep->syscall_next_pc (get_current_frame ());
 		else
 		  pc += 4;
 	      }
@@ -1716,7 +1714,7 @@ mips32_next_pc (struct frame_info *frame
 	      case 16:		/* BLTZAL */
 	      case 18:		/* BLTZALL */
 	      less_branch:
-		if (get_frame_register_signed (frame, itype_rs (inst)) < 0)
+		if (regcache_raw_get_signed (regcache, itype_rs (inst)) < 0)
 		  pc += mips32_relative_offset (inst) + 4;
 		else
 		  pc += 8;	/* after the delay slot */
@@ -1725,7 +1723,7 @@ mips32_next_pc (struct frame_info *frame
 	      case 3:		/* BGEZL */
 	      case 17:		/* BGEZAL */
 	      case 19:		/* BGEZALL */
-		if (get_frame_register_signed (frame, itype_rs (inst)) >= 0)
+		if (regcache_raw_get_signed (regcache, itype_rs (inst)) >= 0)
 		  pc += mips32_relative_offset (inst) + 4;
 		else
 		  pc += 8;	/* after the delay slot */
@@ -1742,8 +1740,8 @@ mips32_next_pc (struct frame_info *frame
 		      /* No way to handle; it'll most likely trap anyway.  */
 		      break;
 
-		    if ((get_frame_register_unsigned (frame,
-						      dspctl) & 0x7f) >= pos)
+		    if ((regcache_raw_get_unsigned (regcache,
+						    dspctl) & 0x7f) >= pos)
 		      pc += mips32_relative_offset (inst);
 		    else
 		      pc += 4;
@@ -1766,22 +1764,22 @@ mips32_next_pc (struct frame_info *frame
 	  break;
 	case 4:		/* BEQ, BEQL */
 	equal_branch:
-	  if (get_frame_register_signed (frame, itype_rs (inst)) ==
-	      get_frame_register_signed (frame, itype_rt (inst)))
+	  if (regcache_raw_get_signed (regcache, itype_rs (inst)) ==
+	      regcache_raw_get_signed (regcache, itype_rt (inst)))
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
 	  break;
 	case 5:		/* BNE, BNEL */
 	neq_branch:
-	  if (get_frame_register_signed (frame, itype_rs (inst)) !=
-	      get_frame_register_signed (frame, itype_rt (inst)))
+	  if (regcache_raw_get_signed (regcache, itype_rs (inst)) !=
+	      regcache_raw_get_signed (regcache, itype_rt (inst)))
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
 	  break;
 	case 6:		/* BLEZ, BLEZL */
-	  if (get_frame_register_signed (frame, itype_rs (inst)) <= 0)
+	  if (regcache_raw_get_signed (regcache, itype_rs (inst)) <= 0)
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
@@ -1789,7 +1787,7 @@ mips32_next_pc (struct frame_info *frame
 	case 7:
 	default:
 	greater_branch:	/* BGTZ, BGTZL */
-	  if (get_frame_register_signed (frame, itype_rs (inst)) > 0)
+	  if (regcache_raw_get_signed (regcache, itype_rs (inst)) > 0)
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
@@ -1843,7 +1841,7 @@ micromips_pc_insn_size (struct gdbarch *
    examined by the branch.  */
 
 static CORE_ADDR
-micromips_bc1_pc (struct gdbarch *gdbarch, struct frame_info *frame,
+micromips_bc1_pc (struct gdbarch *gdbarch, struct regcache *regcache,
 		  ULONGEST insn, CORE_ADDR pc, int count)
 {
   int fcsr = mips_regnum (gdbarch)->fp_control_status;
@@ -1857,7 +1855,7 @@ micromips_bc1_pc (struct gdbarch *gdbarc
     /* No way to handle; it'll most likely trap anyway.  */
     return pc;
 
-  fcs = get_frame_register_unsigned (frame, fcsr);
+  fcs = regcache_raw_get_unsigned (regcache, fcsr);
   cond = ((fcs >> 24) & 0xfe) | ((fcs >> 23) & 0x01);
 
   if (((cond >> cnum) & mask) != mask * !tf)
@@ -1872,21 +1870,15 @@ micromips_bc1_pc (struct gdbarch *gdbarc
    after the instruction at the address PC.  */
 
 static CORE_ADDR
-micromips_next_pc (struct frame_info *frame, CORE_ADDR pc)
+micromips_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   ULONGEST insn;
 
   insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, NULL);
   pc += MIPS_INSN16_SIZE;
   switch (mips_insn_size (ISA_MICROMIPS, insn))
     {
-    /* 48-bit instructions.  */
-    case 3 * MIPS_INSN16_SIZE: /* POOL48A: bits 011111 */
-      /* No branch or jump instructions in this category.  */
-      pc += 2 * MIPS_INSN16_SIZE;
-      break;
-
     /* 32-bit instructions.  */
     case 2 * MIPS_INSN16_SIZE:
       insn <<= 16;
@@ -1900,7 +1892,7 @@ micromips_next_pc (struct frame_info *fr
 	      && (b6s10_ext (insn) & 0x2bf) == 0x3c)
 				/* JALR, JALR.HB: 000000 000x111100 111100 */
 				/* JALRS, JALRS.HB: 000000 010x111100 111100 */
-	    pc = get_frame_register_signed (frame, b0s5_reg (insn >> 16));
+	    pc = regcache_raw_get_signed (regcache, b0s5_reg (insn >> 16));
 	  break;
 
 	case 0x10: /* POOL32I: bits 010000 */
@@ -1909,8 +1901,8 @@ micromips_next_pc (struct frame_info *fr
 	    case 0x00: /* BLTZ: bits 010000 00000 */
 	    case 0x01: /* BLTZAL: bits 010000 00001 */
 	    case 0x11: /* BLTZALS: bits 010000 10001 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) < 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) < 0)
 		pc += micromips_relative_offset16 (insn);
 	      else
 		pc += micromips_pc_insn_size (gdbarch, pc);
@@ -1919,38 +1911,38 @@ micromips_next_pc (struct frame_info *fr
 	    case 0x02: /* BGEZ: bits 010000 00010 */
 	    case 0x03: /* BGEZAL: bits 010000 00011 */
 	    case 0x13: /* BGEZALS: bits 010000 10011 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) >= 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) >= 0)
 		pc += micromips_relative_offset16 (insn);
 	      else
 		pc += micromips_pc_insn_size (gdbarch, pc);
 	      break;
 
 	    case 0x04: /* BLEZ: bits 010000 00100 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) <= 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) <= 0)
 		pc += micromips_relative_offset16 (insn);
 	      else
 		pc += micromips_pc_insn_size (gdbarch, pc);
 	      break;
 
 	    case 0x05: /* BNEZC: bits 010000 00101 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) != 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) != 0)
 		pc += micromips_relative_offset16 (insn);
 	      break;
 
 	    case 0x06: /* BGTZ: bits 010000 00110 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) > 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) > 0)
 		pc += micromips_relative_offset16 (insn);
 	      else
 		pc += micromips_pc_insn_size (gdbarch, pc);
 	      break;
 
 	    case 0x07: /* BEQZC: bits 010000 00111 */
-	      if (get_frame_register_signed (frame,
-					     b0s5_reg (insn >> 16)) == 0)
+	      if (regcache_raw_get_signed (regcache,
+					   b0s5_reg (insn >> 16)) == 0)
 		pc += micromips_relative_offset16 (insn);
 	      break;
 
@@ -1971,8 +1963,8 @@ micromips_next_pc (struct frame_info *fr
 		  /* No way to handle; it'll most likely trap anyway.  */
 		  break;
 
-		if ((get_frame_register_unsigned (frame,
-						  dspctl) & 0x7f) >= pos)
+		if ((regcache_raw_get_unsigned (regcache,
+						dspctl) & 0x7f) >= pos)
 		  pc += micromips_relative_offset16 (insn);
 		else
 		  pc += micromips_pc_insn_size (gdbarch, pc);
@@ -1984,14 +1976,14 @@ micromips_next_pc (struct frame_info *fr
 	    case 0x1d: /* BC1T: bits 010000 11101 xxx00 */
 		       /* BC1ANY2T: bits 010000 11101 xxx01 */
 	      if (((insn >> 16) & 0x2) == 0x0)
-		pc = micromips_bc1_pc (gdbarch, frame, insn, pc,
+		pc = micromips_bc1_pc (gdbarch, regcache, insn, pc,
 				       ((insn >> 16) & 0x1) + 1);
 	      break;
 
 	    case 0x1e: /* BC1ANY4F: bits 010000 11110 xxx01 */
 	    case 0x1f: /* BC1ANY4T: bits 010000 11111 xxx01 */
 	      if (((insn >> 16) & 0x3) == 0x1)
-		pc = micromips_bc1_pc (gdbarch, frame, insn, pc, 4);
+		pc = micromips_bc1_pc (gdbarch, regcache, insn, pc, 4);
 	      break;
 	    }
 	  break;
@@ -2003,16 +1995,16 @@ micromips_next_pc (struct frame_info *fr
 	  break;
 
 	case 0x25: /* BEQ: bits 100101 */
-	    if (get_frame_register_signed (frame, b0s5_reg (insn >> 16))
-		== get_frame_register_signed (frame, b5s5_reg (insn >> 16)))
+	    if (regcache_raw_get_signed (regcache, b0s5_reg (insn >> 16))
+		== regcache_raw_get_signed (regcache, b5s5_reg (insn >> 16)))
 	      pc += micromips_relative_offset16 (insn);
 	    else
 	      pc += micromips_pc_insn_size (gdbarch, pc);
 	  break;
 
 	case 0x2d: /* BNE: bits 101101 */
-	    if (get_frame_register_signed (frame, b0s5_reg (insn >> 16))
-		!= get_frame_register_signed (frame, b5s5_reg (insn >> 16)))
+	  if (regcache_raw_get_signed (regcache, b0s5_reg (insn >> 16))
+		!= regcache_raw_get_signed (regcache, b5s5_reg (insn >> 16)))
 	      pc += micromips_relative_offset16 (insn);
 	    else
 	      pc += micromips_pc_insn_size (gdbarch, pc);
@@ -2031,17 +2023,17 @@ micromips_next_pc (struct frame_info *fr
 	case 0x11: /* POOL16C: bits 010001 */
 	  if ((b5s5_op (insn) & 0x1c) == 0xc)
 	    /* JR16, JRC, JALR16, JALRS16: 010001 011xx */
-	    pc = get_frame_register_signed (frame, b0s5_reg (insn));
+	    pc = regcache_raw_get_signed (regcache, b0s5_reg (insn));
 	  else if (b5s5_op (insn) == 0x18)
 	    /* JRADDIUSP: bits 010001 11000 */
-	    pc = get_frame_register_signed (frame, MIPS_RA_REGNUM);
+	    pc = regcache_raw_get_signed (regcache, MIPS_RA_REGNUM);
 	  break;
 
 	case 0x23: /* BEQZ16: bits 100011 */
 	  {
 	    int rs = mips_reg3_to_reg[b7s3_reg (insn)];
 
-	    if (get_frame_register_signed (frame, rs) == 0)
+	    if (regcache_raw_get_signed (regcache, rs) == 0)
 	      pc += micromips_relative_offset7 (insn);
 	    else
 	      pc += micromips_pc_insn_size (gdbarch, pc);
@@ -2052,7 +2044,7 @@ micromips_next_pc (struct frame_info *fr
 	  {
 	    int rs = mips_reg3_to_reg[b7s3_reg (insn)];
 
-	    if (get_frame_register_signed (frame, rs) != 0)
+	    if (regcache_raw_get_signed (regcache, rs) != 0)
 	      pc += micromips_relative_offset7 (insn);
 	    else
 	      pc += micromips_pc_insn_size (gdbarch, pc);
@@ -2231,10 +2223,10 @@ add_offset_16 (CORE_ADDR pc, int offset)
 }
 
 static CORE_ADDR
-extended_mips16_next_pc (struct frame_info *frame, CORE_ADDR pc,
+extended_mips16_next_pc (regcache *regcache, CORE_ADDR pc,
 			 unsigned int extension, unsigned int insn)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int op = (insn >> 11);
   switch (op)
     {
@@ -2262,7 +2254,7 @@ extended_mips16_next_pc (struct frame_in
 	struct upk_mips16 upk;
 	int reg;
 	unpack_mips16 (gdbarch, pc, extension, insn, ritype, &upk);
-	reg = get_frame_register_signed (frame, mips_reg3_to_reg[upk.regx]);
+	reg = regcache_raw_get_signed (regcache, mips_reg3_to_reg[upk.regx]);
 	if (reg == 0)
 	  pc = add_offset_16 (pc, upk.offset);
 	else
@@ -2274,7 +2266,7 @@ extended_mips16_next_pc (struct frame_in
 	struct upk_mips16 upk;
 	int reg;
 	unpack_mips16 (gdbarch, pc, extension, insn, ritype, &upk);
-	reg = get_frame_register_signed (frame, mips_reg3_to_reg[upk.regx]);
+	reg = regcache_raw_get_signed (regcache, mips_reg3_to_reg[upk.regx]);
 	if (reg != 0)
 	  pc = add_offset_16 (pc, upk.offset);
 	else
@@ -2287,7 +2279,8 @@ extended_mips16_next_pc (struct frame_in
 	int reg;
 	unpack_mips16 (gdbarch, pc, extension, insn, i8type, &upk);
 	/* upk.regx contains the opcode */
-	reg = get_frame_register_signed (frame, 24);  /* Test register is 24 */
+	/* Test register is 24 */
+	reg = regcache_raw_get_signed (regcache, 24);
 	if (((upk.regx == 0) && (reg == 0))	/* BTEZ */
 	    || ((upk.regx == 1) && (reg != 0)))	/* BTNEZ */
 	  pc = add_offset_16 (pc, upk.offset);
@@ -2309,7 +2302,7 @@ extended_mips16_next_pc (struct frame_in
 	      reg = mips_reg3_to_reg[upk.regx];
 	    else
 	      reg = 31;		/* Function return instruction.  */
-	    pc = get_frame_register_signed (frame, reg);
+	    pc = regcache_raw_get_signed (regcache, reg);
 	  }
 	else
 	  pc += 2;
@@ -2321,7 +2314,7 @@ extended_mips16_next_pc (struct frame_in
          that.  */
       {
 	pc += 2;
-	pc = extended_mips16_next_pc (frame, pc, insn,
+	pc = extended_mips16_next_pc (regcache, pc, insn,
 				      fetch_mips_16 (gdbarch, pc));
 	break;
       }
@@ -2335,11 +2328,11 @@ extended_mips16_next_pc (struct frame_in
 }
 
 static CORE_ADDR
-mips16_next_pc (struct frame_info *frame, CORE_ADDR pc)
+mips16_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   unsigned int insn = fetch_mips_16 (gdbarch, pc);
-  return extended_mips16_next_pc (frame, pc, 0, insn);
+  return extended_mips16_next_pc (regcache, pc, 0, insn);
 }
 
 /* The mips_next_pc function supports single_step when the remote
@@ -2348,16 +2341,16 @@ mips16_next_pc (struct frame_info *frame
    branch will go.  This isn't hard because all the data is available.
    The MIPS32, MIPS16 and microMIPS variants are quite different.  */
 static CORE_ADDR
-mips_next_pc (struct frame_info *frame, CORE_ADDR pc)
+mips_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
   if (mips_pc_is_mips16 (gdbarch, pc))
-    return mips16_next_pc (frame, pc);
+    return mips16_next_pc (regcache, pc);
   else if (mips_pc_is_micromips (gdbarch, pc))
-    return micromips_next_pc (frame, pc);
+    return micromips_next_pc (regcache, pc);
   else
-    return mips32_next_pc (frame, pc);
+    return mips32_next_pc (regcache, pc);
 }
 
 /* Return non-zero if the MIPS16 instruction INSN is a compact branch
@@ -2818,7 +2811,7 @@ mips_insn16_frame_cache (struct frame_in
   struct mips_frame_cache *cache;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct mips_frame_cache *) (*this_cache);
   cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
   (*this_cache) = cache;
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -2836,7 +2829,8 @@ mips_insn16_frame_cache (struct frame_in
     if (start_addr == 0)
       return cache;
 
-    mips16_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+    mips16_scan_prologue (gdbarch, start_addr, pc, this_frame,
+			  (struct mips_frame_cache *) *this_cache);
   }
   
   /* gdbarch_sp_regnum contains the value and not the address.  */
@@ -2844,7 +2838,7 @@ mips_insn16_frame_cache (struct frame_in
 			gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
 			cache->base);
 
-  return (*this_cache);
+  return (struct mips_frame_cache *) (*this_cache);
 }
 
 static void
@@ -2946,7 +2940,6 @@ micromips_scan_prologue (struct gdbarch 
   int non_prologue_insns = 0;
   long frame_offset = 0;	/* Size of stack frame.  */
   long frame_adjust = 0;	/* Offset of FP from SP.  */
-  CORE_ADDR frame_addr = 0;	/* Value of $30, used as frame pointer.  */
   int prev_delay_slot = 0;
   int in_delay_slot;
   CORE_ADDR prev_pc;
@@ -2992,13 +2985,6 @@ micromips_scan_prologue (struct gdbarch 
       loc += MIPS_INSN16_SIZE;
       switch (mips_insn_size (ISA_MICROMIPS, insn))
 	{
-	/* 48-bit instructions.  */
-	case 3 * MIPS_INSN16_SIZE:
-	  /* No prologue instructions in this category.  */
-	  this_non_prologue_insn = 1;
-	  loc += 2 * MIPS_INSN16_SIZE;
-	  break;
-
 	/* 32-bit instructions.  */
 	case 2 * MIPS_INSN16_SIZE:
 	  insn <<= 16;
@@ -3054,7 +3040,7 @@ micromips_scan_prologue (struct gdbarch 
 		       && ((reglist >= 1 && reglist <= 9)
 			   || (reglist >= 16 && reglist <= 25)))
 		{
-		  int sreglist = min(reglist & 0xf, 8);
+		  int sreglist = std::min(reglist & 0xf, 8);
 
 		  s = 4 << ((b12s4_op (insn) & 0x2) == 0x2);
 		  for (i = 0; i < sreglist; i++)
@@ -3082,7 +3068,6 @@ micromips_scan_prologue (struct gdbarch 
 	      else if (sreg == MIPS_SP_REGNUM && dreg == 30)
 				/* (D)ADDIU $fp, $sp, imm */
 		{
-		  frame_addr = sp + offset;
 		  frame_adjust = offset;
 		  frame_reg = 30;
 		}
@@ -3158,10 +3143,7 @@ micromips_scan_prologue (struct gdbarch 
 	      dreg = b5s5_reg (insn);
 	      if (sreg == MIPS_SP_REGNUM && dreg == 30)
 				/* MOVE  $fp, $sp */
-		{
-		  frame_addr = sp;
-		  frame_reg = 30;
-		}
+		frame_reg = 30;
 	      else if ((sreg & 0x1c) != 0x4)
 				/* MOVE  reg, $a0-$a3 */
 		this_non_prologue_insn = 1;
@@ -3263,7 +3245,7 @@ mips_micro_frame_cache (struct frame_inf
   struct mips_frame_cache *cache;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct mips_frame_cache *) (*this_cache);
 
   cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
   (*this_cache) = cache;
@@ -3282,7 +3264,8 @@ mips_micro_frame_cache (struct frame_inf
     if (start_addr == 0)
       return cache;
 
-    micromips_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+    micromips_scan_prologue (gdbarch, start_addr, pc, this_frame,
+			     (struct mips_frame_cache *) *this_cache);
   }
 
   /* gdbarch_sp_regnum contains the value and not the address.  */
@@ -3290,7 +3273,7 @@ mips_micro_frame_cache (struct frame_inf
 			gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
 			cache->base);
 
-  return (*this_cache);
+  return (struct mips_frame_cache *) (*this_cache);
 }
 
 static void
@@ -3640,7 +3623,7 @@ mips_insn32_frame_cache (struct frame_in
   struct mips_frame_cache *cache;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct mips_frame_cache *) (*this_cache);
 
   cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
   (*this_cache) = cache;
@@ -3659,7 +3642,8 @@ mips_insn32_frame_cache (struct frame_in
     if (start_addr == 0)
       return cache;
 
-    mips32_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+    mips32_scan_prologue (gdbarch, start_addr, pc, this_frame,
+			  (struct mips_frame_cache *) *this_cache);
   }
   
   /* gdbarch_sp_regnum contains the value and not the address.  */
@@ -3667,7 +3651,7 @@ mips_insn32_frame_cache (struct frame_in
 			gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
 			cache->base);
 
-  return (*this_cache);
+  return (struct mips_frame_cache *) (*this_cache);
 }
 
 static void
@@ -3749,7 +3733,7 @@ mips_stub_frame_cache (struct frame_info
   int num_regs = gdbarch_num_regs (gdbarch);
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct trad_frame_cache *) (*this_cache);
   this_trad_cache = trad_frame_cache_zalloc (this_frame);
   (*this_cache) = this_trad_cache;
 
@@ -3895,9 +3879,8 @@ mips_addr_bits_remove (struct gdbarch *g
 #define SC_OPCODE 0x38
 #define SCD_OPCODE 0x3c
 
-static int
-mips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
- 				struct address_space *aspace, CORE_ADDR pc)
+static VEC (CORE_ADDR) *
+mips_deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   CORE_ADDR breaks[2] = {-1, -1};
   CORE_ADDR loc = pc;
@@ -3907,11 +3890,12 @@ mips_deal_with_atomic_sequence (struct g
   int index;
   int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */  
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
   insn = mips_fetch_instruction (gdbarch, ISA_MIPS, loc, NULL);
   /* Assume all atomic sequences start with a ll/lld instruction.  */
   if (itype_op (insn) != LL_OPCODE && itype_op (insn) != LLD_OPCODE)
-    return 0;
+    return NULL;
 
   /* Assume that no atomic sequence is longer than "atomic_sequence_length" 
      instructions.  */
@@ -3975,7 +3959,7 @@ mips_deal_with_atomic_sequence (struct g
 
   /* Assume that the atomic sequence ends with a sc/scd instruction.  */
   if (itype_op (insn) != SC_OPCODE && itype_op (insn) != SCD_OPCODE)
-    return 0;
+    return NULL;
 
   loc += MIPS_INSN32_SIZE;
 
@@ -3989,14 +3973,13 @@ mips_deal_with_atomic_sequence (struct g
 
   /* Effectively inserts the breakpoints.  */
   for (index = 0; index <= last_breakpoint; index++)
-    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
 
-  return 1;
+  return next_pcs;
 }
 
-static int
+static VEC (CORE_ADDR) *
 micromips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
-				     struct address_space *aspace,
 				     CORE_ADDR pc)
 {
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
@@ -4009,16 +3992,17 @@ micromips_deal_with_atomic_sequence (str
   ULONGEST insn;
   int insn_count;
   int index;
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
   /* Assume all atomic sequences start with a ll/lld instruction.  */
   insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, loc, NULL);
   if (micromips_op (insn) != 0x18)	/* POOL32C: bits 011000 */
-    return 0;
+    return NULL;
   loc += MIPS_INSN16_SIZE;
   insn <<= 16;
   insn |= mips_fetch_instruction (gdbarch, ISA_MICROMIPS, loc, NULL);
   if ((b12s4_op (insn) & 0xb) != 0x3)	/* LL, LLD: bits 011000 0x11 */
-    return 0;
+    return NULL;
   loc += MIPS_INSN16_SIZE;
 
   /* Assume all atomic sequences end with an sc/scd instruction.  Assume
@@ -4038,11 +4022,6 @@ micromips_deal_with_atomic_sequence (str
          its destination address.  */
       switch (mips_insn_size (ISA_MICROMIPS, insn))
 	{
-	/* 48-bit instructions.  */
-	case 3 * MIPS_INSN16_SIZE: /* POOL48A: bits 011111 */
-	  loc += 2 * MIPS_INSN16_SIZE;
-	  break;
-
 	/* 32-bit instructions.  */
 	case 2 * MIPS_INSN16_SIZE:
 	  switch (micromips_op (insn))
@@ -4120,24 +4099,24 @@ micromips_deal_with_atomic_sequence (str
 	          && b5s5_op (insn) != 0x18)
 				/* JRADDIUSP: bits 010001 11000 */
 	        break;
-	      return 0; /* Fall back to the standard single-step code. */
+	      return NULL; /* Fall back to the standard single-step code. */
 
 	    case 0x33: /* B16: bits 110011 */
-	      return 0; /* Fall back to the standard single-step code. */
+	      return NULL; /* Fall back to the standard single-step code. */
 	    }
 	  break;
 	}
       if (is_branch)
 	{
 	  if (last_breakpoint >= 1)
-	    return 0; /* More than one branch found, fallback to the
+	    return NULL; /* More than one branch found, fallback to the
 			 standard single-step code.  */
 	  breaks[1] = branch_bp;
 	  last_breakpoint++;
 	}
     }
   if (!sc_found)
-    return 0;
+    return NULL;
 
   /* Insert a breakpoint right after the end of the atomic sequence.  */
   breaks[0] = loc;
@@ -4149,21 +4128,20 @@ micromips_deal_with_atomic_sequence (str
 
   /* Effectively inserts the breakpoints.  */
   for (index = 0; index <= last_breakpoint; index++)
-    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
 
-  return 1;
+  return next_pcs;
 }
 
-static int
-deal_with_atomic_sequence (struct gdbarch *gdbarch,
-			   struct address_space *aspace, CORE_ADDR pc)
+static VEC (CORE_ADDR) *
+deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   if (mips_pc_is_mips (pc))
-    return mips_deal_with_atomic_sequence (gdbarch, aspace, pc);
+    return mips_deal_with_atomic_sequence (gdbarch, pc);
   else if (mips_pc_is_micromips (gdbarch, pc))
-    return micromips_deal_with_atomic_sequence (gdbarch, aspace, pc);
+    return micromips_deal_with_atomic_sequence (gdbarch, pc);
   else
-    return 0;
+    return NULL;
 }
 
 /* mips_software_single_step() is called just before we want to resume
@@ -4171,21 +4149,22 @@ deal_with_atomic_sequence (struct gdbarc
    or kernel single-step support (MIPS on GNU/Linux for example).  We find
    the target of the coming instruction and breakpoint it.  */
 
-int
-mips_software_single_step (struct frame_info *frame)
+VEC (CORE_ADDR) *
+mips_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   CORE_ADDR pc, next_pc;
+  VEC (CORE_ADDR) *next_pcs;
 
-  pc = get_frame_pc (frame);
-  if (deal_with_atomic_sequence (gdbarch, aspace, pc))
-    return 1;
+  pc = regcache_read_pc (regcache);
+  next_pcs = deal_with_atomic_sequence (gdbarch, pc);
+  if (next_pcs != NULL)
+    return next_pcs;
 
-  next_pc = mips_next_pc (frame, pc);
+  next_pc = mips_next_pc (regcache, pc);
 
-  insert_single_step_breakpoint (gdbarch, aspace, next_pc);
-  return 1;
+  VEC_safe_push (CORE_ADDR, next_pcs, next_pc);
+  return next_pcs;
 }
 
 /* Test whether the PC points to the return instruction at the
@@ -5519,8 +5498,6 @@ mips_o32_push_dummy_call (struct gdbarch
 	    }
 	  while (len > 0)
 	    {
-	      /* Remember if the argument was written to the stack.  */
-	      int stack_used_p = 0;
 	      int partial_len = (len < MIPS32_REGSIZE ? len : MIPS32_REGSIZE);
 
 	      if (mips_debug)
@@ -5535,7 +5512,6 @@ mips_o32_push_dummy_call (struct gdbarch
 		     promoted to int before being stored?  */
 		  int longword_offset = 0;
 		  CORE_ADDR addr;
-		  stack_used_p = 1;
 
 		  if (mips_debug)
 		    {
@@ -5977,8 +5953,6 @@ mips_o64_push_dummy_call (struct gdbarch
 				  && len % MIPS64_REGSIZE != 0);
 	  while (len > 0)
 	    {
-	      /* Remember if the argument was written to the stack.  */
-	      int stack_used_p = 0;
 	      int partial_len = (len < MIPS64_REGSIZE ? len : MIPS64_REGSIZE);
 
 	      if (mips_debug)
@@ -5993,7 +5967,6 @@ mips_o64_push_dummy_call (struct gdbarch
 		     promoted to int before being stored?  */
 		  int longword_offset = 0;
 		  CORE_ADDR addr;
-		  stack_used_p = 1;
 		  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
 		    {
 		      if ((typecode == TYPE_CODE_INT
@@ -6205,7 +6178,7 @@ mips_read_fp_register_single (struct fra
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   int raw_size = register_size (gdbarch, regno);
-  gdb_byte *raw_buffer = alloca (raw_size);
+  gdb_byte *raw_buffer = (gdb_byte *) alloca (raw_size);
 
   if (!deprecated_frame_register_read (frame, regno, raw_buffer))
     error (_("can't read register %d (%s)"),
@@ -6281,8 +6254,9 @@ mips_print_fp_register (struct ui_file *
   double doub, flt1;	/* Doubles extracted from raw hex data.  */
   int inv1, inv2;
 
-  raw_buffer = alloca (2 * register_size (gdbarch,
-					  mips_regnum (gdbarch)->fp0));
+  raw_buffer
+    = ((gdb_byte *)
+       alloca (2 * register_size (gdbarch, mips_regnum (gdbarch)->fp0)));
 
   fprintf_filtered (file, "%s:", gdbarch_register_name (gdbarch, regnum));
   fprintf_filtered (file, "%*s",
@@ -6384,7 +6358,6 @@ mips_print_register (struct ui_file *fil
 
   get_formatted_print_options (&opts, 'x');
   val_print_scalar_formatted (value_type (val),
-			      value_contents_for_printing (val),
 			      value_embedded_offset (val),
 			      val,
 			      &opts, 0, file);
@@ -6672,7 +6645,7 @@ mips_skip_prologue (struct gdbarch *gdba
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -6765,11 +6738,6 @@ micromips_stack_frame_destroyed_p (struc
       loc += MIPS_INSN16_SIZE;
       switch (mips_insn_size (ISA_MICROMIPS, insn))
 	{
-	/* 48-bit instructions.  */
-	case 3 * MIPS_INSN16_SIZE:
-	  /* No epilogue instructions in this category.  */
-	  return 0;
-
 	/* 32-bit instructions.  */
 	case 2 * MIPS_INSN16_SIZE:
 	  insn <<= 16;
@@ -7002,25 +6970,6 @@ set_mipsfpu_auto_command (char *args, in
   mips_fpu_type_auto = 1;
 }
 
-/* Attempt to identify the particular processor model by reading the
-   processor id.  NOTE: cagney/2003-11-15: Firstly it isn't clear that
-   the relevant processor still exists (it dates back to '94) and
-   secondly this is not the way to do this.  The processor type should
-   be set by forcing an architecture change.  */
-
-void
-deprecated_mips_set_processor_regs_hack (void)
-{
-  struct regcache *regcache = get_current_regcache ();
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  ULONGEST prid;
-
-  regcache_cooked_read_unsigned (regcache, MIPS_PRID_REGNUM, &prid);
-  if ((prid & ~0xf) == 0x700)
-    tdep->mips_processor_reg_names = mips_r3041_reg_names;
-}
-
 /* Just like reinit_frame_cache, but with the right arguments to be
    callable as an sfunc.  */
 
@@ -7034,7 +6983,9 @@ reinit_frame_cache_sfunc (char *args, in
 static int
 gdb_print_insn_mips (bfd_vma memaddr, struct disassemble_info *info)
 {
-  struct gdbarch *gdbarch = info->application_data;
+  gdb_disassembler *di
+    = static_cast<gdb_disassembler *>(info->application_data);
+  struct gdbarch *gdbarch = di->arch ();
 
   /* FIXME: cagney/2003-06-26: Is this even necessary?  The
      disassembler needs to be able to locally determine the ISA, and
@@ -7087,150 +7038,91 @@ gdb_print_insn_mips_n64 (bfd_vma memaddr
   return gdb_print_insn_mips (memaddr, info);
 }
 
-/* This function implements gdbarch_breakpoint_from_pc.  It uses the
-   program counter value to determine whether a 16- or 32-bit breakpoint
-   should be used.  It returns a pointer to a string of bytes that encode a
-   breakpoint instruction, stores the length of the string to *lenptr, and
-   adjusts pc (if necessary) to point to the actual memory location where
-   the breakpoint should be inserted.  */
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
-static const gdb_byte *
-mips_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
+static int
+mips_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
   CORE_ADDR pc = *pcptr;
 
-  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+  if (mips_pc_is_mips16 (gdbarch, pc))
     {
-      if (mips_pc_is_mips16 (gdbarch, pc))
-	{
-	  static gdb_byte mips16_big_breakpoint[] = { 0xe8, 0xa5 };
-	  *pcptr = unmake_compact_addr (pc);
-	  *lenptr = sizeof (mips16_big_breakpoint);
-	  return mips16_big_breakpoint;
-	}
-      else if (mips_pc_is_micromips (gdbarch, pc))
-	{
-	  static gdb_byte micromips16_big_breakpoint[] = { 0x46, 0x85 };
-	  static gdb_byte micromips32_big_breakpoint[] = { 0, 0x5, 0, 0x7 };
-	  ULONGEST insn;
-	  int status;
-	  int size;
-
-	  insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &status);
-	  size = status ? 2
-			: mips_insn_size (ISA_MICROMIPS, insn) == 2 ? 2 : 4;
-	  *pcptr = unmake_compact_addr (pc);
-	  *lenptr = size;
-	  return (size == 2) ? micromips16_big_breakpoint
-			     : micromips32_big_breakpoint;
-	}
-      else
-	{
-	  /* The IDT board uses an unusual breakpoint value, and
-	     sometimes gets confused when it sees the usual MIPS
-	     breakpoint instruction.  */
-	  static gdb_byte big_breakpoint[] = { 0, 0x5, 0, 0xd };
-	  static gdb_byte pmon_big_breakpoint[] = { 0, 0, 0, 0xd };
-	  static gdb_byte idt_big_breakpoint[] = { 0, 0, 0x0a, 0xd };
-	  /* Likewise, IRIX appears to expect a different breakpoint,
-	     although this is not apparent until you try to use pthreads.  */
-	  static gdb_byte irix_big_breakpoint[] = { 0, 0, 0, 0xd };
-
-	  *lenptr = sizeof (big_breakpoint);
-
-	  if (strcmp (target_shortname, "mips") == 0)
-	    return idt_big_breakpoint;
-	  else if (strcmp (target_shortname, "ddb") == 0
-		   || strcmp (target_shortname, "pmon") == 0
-		   || strcmp (target_shortname, "lsi") == 0)
-	    return pmon_big_breakpoint;
-	  else if (gdbarch_osabi (gdbarch) == GDB_OSABI_IRIX)
-	    return irix_big_breakpoint;
-	  else
-	    return big_breakpoint;
-	}
+      *pcptr = unmake_compact_addr (pc);
+      return MIPS_BP_KIND_MIPS16;
     }
-  else
+  else if (mips_pc_is_micromips (gdbarch, pc))
     {
-      if (mips_pc_is_mips16 (gdbarch, pc))
-	{
-	  static gdb_byte mips16_little_breakpoint[] = { 0xa5, 0xe8 };
-	  *pcptr = unmake_compact_addr (pc);
-	  *lenptr = sizeof (mips16_little_breakpoint);
-	  return mips16_little_breakpoint;
-	}
-      else if (mips_pc_is_micromips (gdbarch, pc))
-	{
-	  static gdb_byte micromips16_little_breakpoint[] = { 0x85, 0x46 };
-	  static gdb_byte micromips32_little_breakpoint[] = { 0x5, 0, 0x7, 0 };
-	  ULONGEST insn;
-	  int status;
-	  int size;
-
-	  insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &status);
-	  size = status ? 2
-			: mips_insn_size (ISA_MICROMIPS, insn) == 2 ? 2 : 4;
-	  *pcptr = unmake_compact_addr (pc);
-	  *lenptr = size;
-	  return (size == 2) ? micromips16_little_breakpoint
-			     : micromips32_little_breakpoint;
-	}
+      ULONGEST insn;
+      int status;
+
+      *pcptr = unmake_compact_addr (pc);
+      insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &status);
+      if (status || (mips_insn_size (ISA_MICROMIPS, insn) == 2))
+	return MIPS_BP_KIND_MICROMIPS16;
       else
-	{
-	  static gdb_byte little_breakpoint[] = { 0xd, 0, 0x5, 0 };
-	  static gdb_byte pmon_little_breakpoint[] = { 0xd, 0, 0, 0 };
-	  static gdb_byte idt_little_breakpoint[] = { 0xd, 0x0a, 0, 0 };
-
-	  *lenptr = sizeof (little_breakpoint);
-
-	  if (strcmp (target_shortname, "mips") == 0)
-	    return idt_little_breakpoint;
-	  else if (strcmp (target_shortname, "ddb") == 0
-		   || strcmp (target_shortname, "pmon") == 0
-		   || strcmp (target_shortname, "lsi") == 0)
-	    return pmon_little_breakpoint;
-	  else
-	    return little_breakpoint;
-	}
+	return MIPS_BP_KIND_MICROMIPS32;
     }
+  else
+    return MIPS_BP_KIND_MIPS32;
 }
 
-/* Determine the remote breakpoint kind suitable for the PC.  The following
-   kinds are used:
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
-   * 2 -- 16-bit MIPS16 mode breakpoint,
+static const gdb_byte *
+mips_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
 
-   * 3 -- 16-bit microMIPS mode breakpoint,
+  switch (kind)
+    {
+    case MIPS_BP_KIND_MIPS16:
+      {
+	static gdb_byte mips16_big_breakpoint[] = { 0xe8, 0xa5 };
+	static gdb_byte mips16_little_breakpoint[] = { 0xa5, 0xe8 };
 
-   * 4 -- 32-bit standard MIPS mode breakpoint,
+	*size = 2;
+	if (byte_order_for_code == BFD_ENDIAN_BIG)
+	  return mips16_big_breakpoint;
+	else
+	  return mips16_little_breakpoint;
+      }
+    case MIPS_BP_KIND_MICROMIPS16:
+      {
+	static gdb_byte micromips16_big_breakpoint[] = { 0x46, 0x85 };
+	static gdb_byte micromips16_little_breakpoint[] = { 0x85, 0x46 };
 
-   * 5 -- 32-bit microMIPS mode breakpoint.  */
+	*size = 2;
 
-static void
-mips_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-				int *kindptr)
-{
-  CORE_ADDR pc = *pcptr;
+	if (byte_order_for_code == BFD_ENDIAN_BIG)
+	  return micromips16_big_breakpoint;
+	else
+	  return micromips16_little_breakpoint;
+      }
+    case MIPS_BP_KIND_MICROMIPS32:
+      {
+	static gdb_byte micromips32_big_breakpoint[] = { 0, 0x5, 0, 0x7 };
+	static gdb_byte micromips32_little_breakpoint[] = { 0x5, 0, 0x7, 0 };
 
-  if (mips_pc_is_mips16 (gdbarch, pc))
-    {
-      *pcptr = unmake_compact_addr (pc);
-      *kindptr = 2;
-    }
-  else if (mips_pc_is_micromips (gdbarch, pc))
-    {
-      ULONGEST insn;
-      int status;
-      int size;
+	*size = 4;
+	if (byte_order_for_code == BFD_ENDIAN_BIG)
+	  return micromips32_big_breakpoint;
+	else
+	  return micromips32_little_breakpoint;
+      }
+    case MIPS_BP_KIND_MIPS32:
+      {
+	static gdb_byte big_breakpoint[] = { 0, 0x5, 0, 0xd };
+	static gdb_byte little_breakpoint[] = { 0xd, 0, 0x5, 0 };
 
-      insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &status);
-      size = status ? 2 : mips_insn_size (ISA_MICROMIPS, insn) == 2 ? 2 : 4;
-      *pcptr = unmake_compact_addr (pc);
-      *kindptr = size | 1;
-    }
-  else
-    *kindptr = 4;
+	*size = 4;
+	if (byte_order_for_code == BFD_ENDIAN_BIG)
+	  return big_breakpoint;
+	else
+	  return little_breakpoint;
+      }
+    default:
+      gdb_assert_not_reached ("unexpected mips breakpoint kind");
+    };
 }
 
 /* Return non-zero if the standard MIPS instruction INST has a branch
@@ -7370,12 +7262,14 @@ micromips_insn_at_pc_has_delay_slot (str
 {
   ULONGEST insn;
   int status;
+  int size;
 
   insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, addr, &status);
   if (status)
     return 0;
+  size = mips_insn_size (ISA_MICROMIPS, insn);
   insn <<= 16;
-  if (mips_insn_size (ISA_MICROMIPS, insn) == 2 * MIPS_INSN16_SIZE)
+  if (size == 2 * MIPS_INSN16_SIZE)
     {
       insn |= mips_fetch_instruction (gdbarch, ISA_MICROMIPS, addr, &status);
       if (status)
@@ -8020,9 +7914,7 @@ mips_stab_reg_to_regnum (struct gdbarch 
   else if (mips_regnum (gdbarch)->dspacc != -1 && num >= 72 && num < 78)
     regnum = num + mips_regnum (gdbarch)->dspacc - 72;
   else
-    /* This will hopefully (eventually) provoke a warning.  Should
-       we be calling complaint() here?  */
-    return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+    return -1;
   return gdbarch_num_regs (gdbarch) + regnum;
 }
 
@@ -8045,9 +7937,7 @@ mips_dwarf_dwarf2_ecoff_reg_to_regnum (s
   else if (mips_regnum (gdbarch)->dspacc != -1 && num >= 66 && num < 72)
     regnum = num + mips_regnum (gdbarch)->dspacc - 66;
   else
-    /* This will hopefully (eventually) provoke a warning.  Should we
-       be calling complaint() here?  */
-    return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
+    return -1;
   return gdbarch_num_regs (gdbarch) + regnum;
 }
 
@@ -8185,7 +8075,7 @@ mips_register_g_packet_guesses (struct g
 static struct value *
 value_of_mips_user_reg (struct frame_info *frame, const void *baton)
 {
-  const int *reg_p = baton;
+  const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, frame);
 }
 
@@ -8207,22 +8097,7 @@ mips_gdbarch_init (struct gdbarch_info i
   int dspctl;
 
   /* Fill in the OS dependent register numbers and names.  */
-  if (info.osabi == GDB_OSABI_IRIX)
-    {
-      mips_regnum.fp0 = 32;
-      mips_regnum.pc = 64;
-      mips_regnum.cause = 65;
-      mips_regnum.badvaddr = 66;
-      mips_regnum.hi = 67;
-      mips_regnum.lo = 68;
-      mips_regnum.fp_control_status = 69;
-      mips_regnum.fp_implementation_revision = 70;
-      mips_regnum.dspacc = dspacc = -1;
-      mips_regnum.dspctl = dspctl = -1;
-      num_regs = 71;
-      reg_names = mips_irix_reg_names;
-    }
-  else if (info.osabi == GDB_OSABI_LINUX)
+  if (info.osabi == GDB_OSABI_LINUX)
     {
       mips_regnum.fp0 = 38;
       mips_regnum.pc = 37;
@@ -8236,7 +8111,7 @@ mips_gdbarch_init (struct gdbarch_info i
       mips_regnum.dspctl = -1;
       dspacc = 72;
       dspctl = 78;
-      num_regs = 79;
+      num_regs = 90;
       reg_names = mips_linux_reg_names;
     }
   else
@@ -8355,6 +8230,8 @@ mips_gdbarch_init (struct gdbarch_info i
 	  return NULL;
 	}
 
+      num_regs = mips_regnum.fp_implementation_revision + 1;
+
       if (dspacc >= 0)
 	{
 	  feature = tdesc_find_feature (info.target_desc,
@@ -8388,6 +8265,8 @@ mips_gdbarch_init (struct gdbarch_info i
 
 	      mips_regnum.dspacc = dspacc;
 	      mips_regnum.dspctl = dspctl;
+
+	      num_regs = mips_regnum.dspctl + 1;
 	    }
 	}
 
@@ -8458,7 +8337,8 @@ mips_gdbarch_init (struct gdbarch_info i
 	  /* On Irix, ELF64 executables use the N64 ABI.  The
 	     pseudo-sections which describe the ABI aren't present
 	     on IRIX.  (Even for executables created by gcc.)  */
-	  if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
+	  if (info.abfd != NULL
+	      && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
 	      && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
 	    found_abi = MIPS_ABI_N64;
 	  else
@@ -8608,7 +8488,7 @@ mips_gdbarch_init (struct gdbarch_info i
     }
 
   /* Need a new architecture.  Fill in a target specific vector.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
   tdep->mips64_transfers_32bit_regs_p = mips64_transfers_32bit_regs_p;
@@ -8840,9 +8720,8 @@ mips_gdbarch_init (struct gdbarch_info i
   set_gdbarch_value_to_register (gdbarch, mips_value_to_register);
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, mips_breakpoint_from_pc);
-  set_gdbarch_remote_breakpoint_from_pc (gdbarch,
-					 mips_remote_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, mips_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, mips_sw_breakpoint_from_kind);
   set_gdbarch_adjust_breakpoint_address (gdbarch,
 					 mips_adjust_breakpoint_address);
 
@@ -8894,7 +8773,7 @@ mips_gdbarch_init (struct gdbarch_info i
   mips_register_g_packet_guesses (gdbarch);
 
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
-  info.tdep_info = (void *) tdesc_data;
+  info.tdep_info = tdesc_data;
   gdbarch_init_osabi (info, gdbarch);
 
   /* The hook may have adjusted num_regs, fetch the final value and
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-tdep.h ./gdb/mips-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mips-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mips-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -144,9 +144,6 @@ enum
   MIPS_LAST_EMBED_REGNUM = 89	/* Last one.  */
 };
 
-/* Defined in mips-tdep.c and used in remote-mips.c.  */
-extern void deprecated_mips_set_processor_regs_hack (void);
-
 /* Instruction sizes and other useful constants.  */
 enum
 {
@@ -157,7 +154,7 @@ enum
 };
 
 /* Single step based on where the current instruction will take us.  */
-extern int mips_software_single_step (struct frame_info *frame);
+extern VEC (CORE_ADDR) *mips_software_single_step (struct regcache *regcache);
 
 /* Strip the ISA (compression) bit off from ADDR.  */
 extern CORE_ADDR mips_unmake_compact_addr (CORE_ADDR addr);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-linux-tdep.c ./gdb/mn10300-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mn10300-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -243,7 +243,8 @@ am33_supply_fpregset_method (const struc
 			     struct regcache *regcache, 
 			     int regnum, const void *fpregs, size_t len)
 {
-  const mn10300_elf_fpregset_t *fpregset = fpregs;
+  const mn10300_elf_fpregset_t *fpregset
+    = (const mn10300_elf_fpregset_t *) fpregs;
 
   gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
 
@@ -275,7 +276,7 @@ am33_collect_gregset_method (const struc
 			     const struct regcache *regcache, 
 			     int regnum, void *gregs, size_t len)
 {
-  mn10300_elf_gregset_t *regp = gregs;
+  mn10300_elf_gregset_t *regp = (gdb_byte (*)[28][4]) gregs;
   int i;
 
   gdb_assert (len >= sizeof (mn10300_elf_gregset_t));
@@ -423,7 +424,7 @@ am33_collect_fpregset_method (const stru
 			      const struct regcache *regcache, 
 			      int regnum, void *fpregs, size_t len)
 {
-  mn10300_elf_fpregset_t *fpregset = fpregs;
+  mn10300_elf_fpregset_t *fpregset = (mn10300_elf_fpregset_t *) fpregs;
 
   gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-tdep.c ./gdb/mn10300-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mn10300-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -322,15 +322,9 @@ mn10300_write_pc (struct regcache *regca
    The Matsushita mn10x00 processors have single byte instructions
    so we need a single byte breakpoint.  Matsushita hasn't defined
    one, so we defined it ourselves.  */
+constexpr gdb_byte mn10300_break_insn[] = {0xff};
 
-static const unsigned char *
-mn10300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
-			    int *bp_size)
-{
-  static gdb_byte breakpoint[] = {0xff};
-  *bp_size = 1;
-  return breakpoint;
-}
+typedef BP_MANIPULATION (mn10300_break_insn) mn10300_breakpoint;
 
 /* Model the semantics of pushing a register onto the stack.  This
    is a helper function for mn10300_analyze_prologue, below.  */
@@ -1092,10 +1086,12 @@ mn10300_analyze_frame_prologue (struct f
         stop_addr = func_start;
 
       mn10300_analyze_prologue (get_frame_arch (this_frame),
-                                func_start, stop_addr, *this_prologue_cache);
+				func_start, stop_addr,
+				((struct mn10300_prologue *)
+				 *this_prologue_cache));
     }
 
-  return *this_prologue_cache;
+  return (struct mn10300_prologue *) *this_prologue_cache;
 }
 
 /* Given the next frame and a prologue cache, return this frame's
@@ -1148,11 +1144,9 @@ static struct value *
 mn10300_frame_prev_register (struct frame_info *this_frame,
 		             void **this_prologue_cache, int regnum)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
   struct mn10300_prologue *p
     = mn10300_analyze_frame_prologue (this_frame, this_prologue_cache);
   CORE_ADDR frame_base = mn10300_frame_base (this_frame, this_prologue_cache);
-  int reg_size = register_size (get_frame_arch (this_frame), regnum);
 
   if (regnum == E_SP_REGNUM)
     return frame_unwind_got_constant (this_frame, regnum, frame_base);
@@ -1383,10 +1377,7 @@ mn10300_dwarf2_reg_to_regnum (struct gdb
 
   if (dwarf2 < 0
       || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb))
-    {
-      warning (_("Bogus register number in debug info: %d"), dwarf2);
-      return -1;
-    }
+    return -1;
 
   return dwarf2_to_gdb[dwarf2];
 }
@@ -1403,7 +1394,7 @@ mn10300_gdbarch_init (struct gdbarch_inf
   if (arches != NULL)
     return arches->gdbarch;
 
-  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   switch (info.bfd_arch_info->mach)
@@ -1447,7 +1438,10 @@ mn10300_gdbarch_init (struct gdbarch_inf
   /* Stack unwinding.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, mn10300_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       mn10300_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       mn10300_breakpoint::bp_from_kind);
   /* decr_pc_after_break?  */
   /* Disassembly.  */
   set_gdbarch_print_insn (gdbarch, print_insn_mn10300);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-tdep.h ./gdb/mn10300-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mn10300-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mn10300-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent interface for Matsushita MN10300 for GDB, the GNU debugger.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/monitor.c ./gdb/monitor.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/monitor.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/monitor.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,2418 +0,0 @@
-/* Remote debugging interface for boot monitors, for GDB.
-
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
-
-   Contributed by Cygnus Support.  Written by Rob Savoye for Cygnus.
-   Resurrected from the ashes by Stu Grossman.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* This file was derived from various remote-* modules.  It is a collection
-   of generic support functions so GDB can talk directly to a ROM based
-   monitor.  This saves use from having to hack an exception based handler
-   into existence, and makes for quick porting.
-
-   This module talks to a debug monitor called 'MONITOR', which
-   We communicate with MONITOR via either a direct serial line, or a TCP
-   (or possibly TELNET) stream to a terminal multiplexor,
-   which in turn talks to the target board.  */
-
-/* FIXME 32x64: This code assumes that registers and addresses are at
-   most 32 bits long.  If they can be larger, you will need to declare
-   values as LONGEST and use %llx or some such to print values when
-   building commands to send to the monitor.  Since we don't know of
-   any actual 64-bit targets with ROM monitors that use this code,
-   it's not an issue right now.  -sts 4/18/96  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include <signal.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include "command.h"
-#include "serial.h"
-#include "monitor.h"
-#include "gdbcmd.h"
-#include "inferior.h"
-#include "infrun.h"
-#include "gdb_regex.h"
-#include "srec.h"
-#include "regcache.h"
-#include "gdbthread.h"
-#include "readline/readline.h"
-#include "rsp-low.h"
-
-static char *dev_name;
-static struct target_ops *targ_ops;
-
-static void monitor_interrupt_query (void);
-static void monitor_interrupt_twice (int);
-static void monitor_stop (struct target_ops *self, ptid_t);
-static void monitor_dump_regs (struct regcache *regcache);
-
-#if 0
-static int from_hex (int a);
-#endif
-
-static struct monitor_ops *current_monitor;
-
-static int hashmark;		/* flag set by "set hash".  */
-
-static int timeout = 30;
-
-static int in_monitor_wait = 0;	/* Non-zero means we are in monitor_wait().  */
-
-static void (*ofunc) ();	/* Old SIGINT signal handler.  */
-
-static CORE_ADDR *breakaddr;
-
-/* Descriptor for I/O to remote machine.  Initialize it to NULL so
-   that monitor_open knows that we don't have a file open when the
-   program starts.  */
-
-static struct serial *monitor_desc = NULL;
-
-/* Pointer to regexp pattern matching data.  */
-
-static struct re_pattern_buffer register_pattern;
-static char register_fastmap[256];
-
-static struct re_pattern_buffer getmem_resp_delim_pattern;
-static char getmem_resp_delim_fastmap[256];
-
-static struct re_pattern_buffer setmem_resp_delim_pattern;
-static char setmem_resp_delim_fastmap[256];
-
-static struct re_pattern_buffer setreg_resp_delim_pattern;
-static char setreg_resp_delim_fastmap[256];
-
-static int dump_reg_flag;	/* Non-zero means do a dump_registers cmd when
-				   monitor_wait wakes up.  */
-
-static int first_time = 0;	/* Is this the first time we're
-				   executing after gaving created the
-				   child proccess?  */
-
-
-/* This is the ptid we use while we're connected to a monitor.  Its
-   value is arbitrary, as monitor targets don't have a notion of
-   processes or threads, but we need something non-null to place in
-   inferior_ptid.  */
-static ptid_t monitor_ptid;
-
-#define TARGET_BUF_SIZE 2048
-
-/* Monitor specific debugging information.  Typically only useful to
-   the developer of a new monitor interface.  */
-
-static void monitor_debug (const char *fmt, ...) ATTRIBUTE_PRINTF (1, 2);
-
-static unsigned int monitor_debug_p = 0;
-
-/* NOTE: This file alternates between monitor_debug_p and remote_debug
-   when determining if debug information is printed.  Perhaps this
-   could be simplified.  */
-
-static void
-monitor_debug (const char *fmt, ...)
-{
-  if (monitor_debug_p)
-    {
-      va_list args;
-
-      va_start (args, fmt);
-      vfprintf_filtered (gdb_stdlog, fmt, args);
-      va_end (args);
-    }
-}
-
-
-/* Convert a string into a printable representation, Return # byte in
-   the new string.  When LEN is >0 it specifies the size of the
-   string.  Otherwize strlen(oldstr) is used.  */
-
-static void
-monitor_printable_string (char *newstr, char *oldstr, int len)
-{
-  int ch;
-  int i;
-
-  if (len <= 0)
-    len = strlen (oldstr);
-
-  for (i = 0; i < len; i++)
-    {
-      ch = oldstr[i];
-      switch (ch)
-	{
-	default:
-	  if (isprint (ch))
-	    *newstr++ = ch;
-
-	  else
-	    {
-	      sprintf (newstr, "\\x%02x", ch & 0xff);
-	      newstr += 4;
-	    }
-	  break;
-
-	case '\\':
-	  *newstr++ = '\\';
-	  *newstr++ = '\\';
-	  break;
-	case '\b':
-	  *newstr++ = '\\';
-	  *newstr++ = 'b';
-	  break;
-	case '\f':
-	  *newstr++ = '\\';
-	  *newstr++ = 't';
-	  break;
-	case '\n':
-	  *newstr++ = '\\';
-	  *newstr++ = 'n';
-	  break;
-	case '\r':
-	  *newstr++ = '\\';
-	  *newstr++ = 'r';
-	  break;
-	case '\t':
-	  *newstr++ = '\\';
-	  *newstr++ = 't';
-	  break;
-	case '\v':
-	  *newstr++ = '\\';
-	  *newstr++ = 'v';
-	  break;
-	}
-    }
-
-  *newstr++ = '\0';
-}
-
-/* Print monitor errors with a string, converting the string to printable
-   representation.  */
-
-static void
-monitor_error (char *function, char *message,
-	       CORE_ADDR memaddr, int len, char *string, int final_char)
-{
-  int real_len = (len == 0 && string != (char *) 0) ? strlen (string) : len;
-  char *safe_string = alloca ((real_len * 4) + 1);
-
-  monitor_printable_string (safe_string, string, real_len);
-
-  if (final_char)
-    error (_("%s (%s): %s: %s%c"),
-	   function, paddress (target_gdbarch (), memaddr),
-	   message, safe_string, final_char);
-  else
-    error (_("%s (%s): %s: %s"),
-	   function, paddress (target_gdbarch (), memaddr),
-	   message, safe_string);
-}
-
-/* monitor_vsprintf - similar to vsprintf but handles 64-bit addresses
-
-   This function exists to get around the problem that many host platforms
-   don't have a printf that can print 64-bit addresses.  The %A format
-   specification is recognized as a special case, and causes the argument
-   to be printed as a 64-bit hexadecimal address.
-
-   Only format specifiers of the form "[0-9]*[a-z]" are recognized.
-   If it is a '%s' format, the argument is a string; otherwise the
-   argument is assumed to be a long integer.
-
-   %% is also turned into a single %.  */
-
-static void
-monitor_vsprintf (char *sndbuf, char *pattern, va_list args)
-{
-  int addr_bit = gdbarch_addr_bit (target_gdbarch ());
-  char format[10];
-  char fmt;
-  char *p;
-  int i;
-  long arg_int;
-  CORE_ADDR arg_addr;
-  char *arg_string;
-
-  for (p = pattern; *p; p++)
-    {
-      if (*p == '%')
-	{
-	  /* Copy the format specifier to a separate buffer.  */
-	  format[0] = *p++;
-	  for (i = 1; *p >= '0' && *p <= '9' && i < (int) sizeof (format) - 2;
-	       i++, p++)
-	    format[i] = *p;
-	  format[i] = fmt = *p;
-	  format[i + 1] = '\0';
-
-	  /* Fetch the next argument and print it.  */
-	  switch (fmt)
-	    {
-	    case '%':
-	      strcpy (sndbuf, "%");
-	      break;
-	    case 'A':
-	      arg_addr = va_arg (args, CORE_ADDR);
-	      strcpy (sndbuf, phex_nz (arg_addr, addr_bit / 8));
-	      break;
-	    case 's':
-	      arg_string = va_arg (args, char *);
-	      sprintf (sndbuf, format, arg_string);
-	      break;
-	    default:
-	      arg_int = va_arg (args, long);
-	      sprintf (sndbuf, format, arg_int);
-	      break;
-	    }
-	  sndbuf += strlen (sndbuf);
-	}
-      else
-	*sndbuf++ = *p;
-    }
-  *sndbuf = '\0';
-}
-
-
-/* monitor_printf_noecho -- Send data to monitor, but don't expect an echo.
-   Works just like printf.  */
-
-void
-monitor_printf_noecho (char *pattern,...)
-{
-  va_list args;
-  char sndbuf[2000];
-  int len;
-
-  va_start (args, pattern);
-
-  monitor_vsprintf (sndbuf, pattern, args);
-
-  len = strlen (sndbuf);
-  if (len + 1 > sizeof sndbuf)
-    internal_error (__FILE__, __LINE__,
-		    _("failed internal consistency check"));
-
-  if (monitor_debug_p)
-    {
-      char *safe_string = (char *) alloca ((strlen (sndbuf) * 4) + 1);
-
-      monitor_printable_string (safe_string, sndbuf, 0);
-      fprintf_unfiltered (gdb_stdlog, "sent[%s]\n", safe_string);
-    }
-
-  monitor_write (sndbuf, len);
-}
-
-/* monitor_printf -- Send data to monitor and check the echo.  Works just like
-   printf.  */
-
-void
-monitor_printf (char *pattern,...)
-{
-  va_list args;
-  char sndbuf[2000];
-  int len;
-
-  va_start (args, pattern);
-
-  monitor_vsprintf (sndbuf, pattern, args);
-
-  len = strlen (sndbuf);
-  if (len + 1 > sizeof sndbuf)
-    internal_error (__FILE__, __LINE__,
-		    _("failed internal consistency check"));
-
-  if (monitor_debug_p)
-    {
-      char *safe_string = (char *) alloca ((len * 4) + 1);
-
-      monitor_printable_string (safe_string, sndbuf, 0);
-      fprintf_unfiltered (gdb_stdlog, "sent[%s]\n", safe_string);
-    }
-
-  monitor_write (sndbuf, len);
-
-  /* We used to expect that the next immediate output was the
-     characters we just output, but sometimes some extra junk appeared
-     before the characters we expected, like an extra prompt, or a
-     portmaster sending telnet negotiations.  So, just start searching
-     for what we sent, and skip anything unknown.  */
-  monitor_debug ("ExpectEcho\n");
-  monitor_expect (sndbuf, (char *) 0, 0);
-}
-
-
-/* Write characters to the remote system.  */
-
-void
-monitor_write (char *buf, int buflen)
-{
-  if (serial_write (monitor_desc, buf, buflen))
-    fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
-			safe_strerror (errno));
-}
-
-
-/* Read a binary character from the remote system, doing all the fancy
-   timeout stuff, but without interpreting the character in any way,
-   and without printing remote debug information.  */
-
-int
-monitor_readchar (void)
-{
-  int c;
-  int looping;
-
-  do
-    {
-      looping = 0;
-      c = serial_readchar (monitor_desc, timeout);
-
-      if (c >= 0)
-	c &= 0xff;		/* don't lose bit 7 */
-    }
-  while (looping);
-
-  if (c >= 0)
-    return c;
-
-  if (c == SERIAL_TIMEOUT)
-    error (_("Timeout reading from remote system."));
-
-  perror_with_name (_("remote-monitor"));
-}
-
-
-/* Read a character from the remote system, doing all the fancy
-   timeout stuff.  */
-
-static int
-readchar (int timeout)
-{
-  int c;
-  static enum
-    {
-      last_random, last_nl, last_cr, last_crnl
-    }
-  state = last_random;
-  int looping;
-
-  do
-    {
-      looping = 0;
-      c = serial_readchar (monitor_desc, timeout);
-
-      if (c >= 0)
-	{
-	  c &= 0x7f;
-	  /* This seems to interfere with proper function of the
-	     input stream.  */
-	  if (monitor_debug_p || remote_debug)
-	    {
-	      char buf[2];
-
-	      buf[0] = c;
-	      buf[1] = '\0';
-	      puts_debug ("read -->", buf, "<--");
-	    }
-
-	}
-
-      /* Canonicialize \n\r combinations into one \r.  */
-      if ((current_monitor->flags & MO_HANDLE_NL) != 0)
-	{
-	  if ((c == '\r' && state == last_nl)
-	      || (c == '\n' && state == last_cr))
-	    {
-	      state = last_crnl;
-	      looping = 1;
-	    }
-	  else if (c == '\r')
-	    state = last_cr;
-	  else if (c != '\n')
-	    state = last_random;
-	  else
-	    {
-	      state = last_nl;
-	      c = '\r';
-	    }
-	}
-    }
-  while (looping);
-
-  if (c >= 0)
-    return c;
-
-  if (c == SERIAL_TIMEOUT)
-#if 0
-    /* I fail to see how detaching here can be useful.  */
-    if (in_monitor_wait)	/* Watchdog went off.  */
-      {
-	target_mourn_inferior ();
-	error (_("GDB serial timeout has expired.  Target detached."));
-      }
-    else
-#endif
-      error (_("Timeout reading from remote system."));
-
-  perror_with_name (_("remote-monitor"));
-}
-
-/* Scan input from the remote system, until STRING is found.  If BUF is non-
-   zero, then collect input until we have collected either STRING or BUFLEN-1
-   chars.  In either case we terminate BUF with a 0.  If input overflows BUF
-   because STRING can't be found, return -1, else return number of chars in BUF
-   (minus the terminating NUL).  Note that in the non-overflow case, STRING
-   will be at the end of BUF.  */
-
-int
-monitor_expect (char *string, char *buf, int buflen)
-{
-  char *p = string;
-  int obuflen = buflen;
-  int c;
-
-  if (monitor_debug_p)
-    {
-      char *safe_string = (char *) alloca ((strlen (string) * 4) + 1);
-      monitor_printable_string (safe_string, string, 0);
-      fprintf_unfiltered (gdb_stdlog, "MON Expecting '%s'\n", safe_string);
-    }
-
-  immediate_quit++;
-  QUIT;
-  while (1)
-    {
-      if (buf)
-	{
-	  if (buflen < 2)
-	    {
-	      *buf = '\000';
-	      immediate_quit--;
-	      return -1;
-	    }
-
-	  c = readchar (timeout);
-	  if (c == '\000')
-	    continue;
-	  *buf++ = c;
-	  buflen--;
-	}
-      else
-	c = readchar (timeout);
-
-      /* Don't expect any ^C sent to be echoed.  */
-
-      if (*p == '\003' || c == *p)
-	{
-	  p++;
-	  if (*p == '\0')
-	    {
-	      immediate_quit--;
-
-	      if (buf)
-		{
-		  *buf++ = '\000';
-		  return obuflen - buflen;
-		}
-	      else
-		return 0;
-	    }
-	}
-      else
-	{
-	  /* We got a character that doesn't match the string.  We need to
-	     back up p, but how far?  If we're looking for "..howdy" and the
-	     monitor sends "...howdy"?  There's certainly a match in there,
-	     but when we receive the third ".", we won't find it if we just
-	     restart the matching at the beginning of the string.
-
-	     This is a Boyer-Moore kind of situation.  We want to reset P to
-	     the end of the longest prefix of STRING that is a suffix of
-	     what we've read so far.  In the example above, that would be
-	     ".." --- the longest prefix of "..howdy" that is a suffix of
-	     "...".  This longest prefix could be the empty string, if C
-	     is nowhere to be found in STRING.
-
-	     If this longest prefix is not the empty string, it must contain
-	     C, so let's search from the end of STRING for instances of C,
-	     and see if the portion of STRING before that is a suffix of
-	     what we read before C.  Actually, we can search backwards from
-	     p, since we know no prefix can be longer than that.
-
-	     Note that we can use STRING itself, along with C, as a record
-	     of what we've received so far.  :)  */
-	  int i;
-
-	  for (i = (p - string) - 1; i >= 0; i--)
-	    if (string[i] == c)
-	      {
-		/* Is this prefix a suffix of what we've read so far?
-		   In other words, does
-                     string[0 .. i-1] == string[p - i, p - 1]?  */
-		if (! memcmp (string, p - i, i))
-		  {
-		    p = string + i + 1;
-		    break;
-		  }
-	      }
-	  if (i < 0)
-	    p = string;
-	}
-    }
-}
-
-/* Search for a regexp.  */
-
-static int
-monitor_expect_regexp (struct re_pattern_buffer *pat, char *buf, int buflen)
-{
-  char *mybuf;
-  char *p;
-
-  monitor_debug ("MON Expecting regexp\n");
-  if (buf)
-    mybuf = buf;
-  else
-    {
-      mybuf = alloca (TARGET_BUF_SIZE);
-      buflen = TARGET_BUF_SIZE;
-    }
-
-  p = mybuf;
-  while (1)
-    {
-      int retval;
-
-      if (p - mybuf >= buflen)
-	{			/* Buffer about to overflow.  */
-
-/* On overflow, we copy the upper half of the buffer to the lower half.  Not
-   great, but it usually works...  */
-
-	  memcpy (mybuf, mybuf + buflen / 2, buflen / 2);
-	  p = mybuf + buflen / 2;
-	}
-
-      *p++ = readchar (timeout);
-
-      retval = re_search (pat, mybuf, p - mybuf, 0, p - mybuf, NULL);
-      if (retval >= 0)
-	return 1;
-    }
-}
-
-/* Keep discarding input until we see the MONITOR prompt.
-
-   The convention for dealing with the prompt is that you
-   o give your command
-   o *then* wait for the prompt.
-
-   Thus the last thing that a procedure does with the serial line will
-   be an monitor_expect_prompt().  Exception: monitor_resume does not
-   wait for the prompt, because the terminal is being handed over to
-   the inferior.  However, the next thing which happens after that is
-   a monitor_wait which does wait for the prompt.  Note that this
-   includes abnormal exit, e.g. error().  This is necessary to prevent
-   getting into states from which we can't recover.  */
-
-int
-monitor_expect_prompt (char *buf, int buflen)
-{
-  monitor_debug ("MON Expecting prompt\n");
-  return monitor_expect (current_monitor->prompt, buf, buflen);
-}
-
-/* Get N 32-bit words from remote, each preceded by a space, and put
-   them in registers starting at REGNO.  */
-
-#if 0
-static unsigned long
-get_hex_word (void)
-{
-  unsigned long val;
-  int i;
-  int ch;
-
-  do
-    ch = readchar (timeout);
-  while (isspace (ch));
-
-  val = from_hex (ch);
-
-  for (i = 7; i >= 1; i--)
-    {
-      ch = readchar (timeout);
-      if (!isxdigit (ch))
-	break;
-      val = (val << 4) | from_hex (ch);
-    }
-
-  return val;
-}
-#endif
-
-static void
-compile_pattern (char *pattern, struct re_pattern_buffer *compiled_pattern,
-		 char *fastmap)
-{
-  int tmp;
-  const char *val;
-
-  compiled_pattern->fastmap = fastmap;
-
-  tmp = re_set_syntax (RE_SYNTAX_EMACS);
-  val = re_compile_pattern (pattern,
-			    strlen (pattern),
-			    compiled_pattern);
-  re_set_syntax (tmp);
-
-  if (val)
-    error (_("compile_pattern: Can't compile pattern string `%s': %s!"),
-	   pattern, val);
-
-  if (fastmap)
-    re_compile_fastmap (compiled_pattern);
-}
-
-/* Open a connection to a remote debugger.  NAME is the filename used
-   for communication.  */
-
-void
-monitor_open (const char *args, struct monitor_ops *mon_ops, int from_tty)
-{
-  const char *name;
-  char **p;
-  struct inferior *inf;
-
-  if (mon_ops->magic != MONITOR_OPS_MAGIC)
-    error (_("Magic number of monitor_ops struct wrong."));
-
-  targ_ops = mon_ops->target;
-  name = targ_ops->to_shortname;
-
-  if (!args)
-    error (_("Use `target %s DEVICE-NAME' to use a serial port, or\n\
-`target %s HOST-NAME:PORT-NUMBER' to use a network connection."), name, name);
-
-  target_preopen (from_tty);
-
-  /* Setup pattern for register dump.  */
-
-  if (mon_ops->register_pattern)
-    compile_pattern (mon_ops->register_pattern, &register_pattern,
-		     register_fastmap);
-
-  if (mon_ops->getmem.resp_delim)
-    compile_pattern (mon_ops->getmem.resp_delim, &getmem_resp_delim_pattern,
-		     getmem_resp_delim_fastmap);
-
-  if (mon_ops->setmem.resp_delim)
-    compile_pattern (mon_ops->setmem.resp_delim, &setmem_resp_delim_pattern,
-                     setmem_resp_delim_fastmap);
-
-  if (mon_ops->setreg.resp_delim)
-    compile_pattern (mon_ops->setreg.resp_delim, &setreg_resp_delim_pattern,
-                     setreg_resp_delim_fastmap);
-  
-  unpush_target (targ_ops);
-
-  if (dev_name)
-    xfree (dev_name);
-  dev_name = xstrdup (args);
-
-  monitor_desc = serial_open (dev_name);
-
-  if (!monitor_desc)
-    perror_with_name (dev_name);
-
-  if (baud_rate != -1)
-    {
-      if (serial_setbaudrate (monitor_desc, baud_rate))
-	{
-	  serial_close (monitor_desc);
-	  perror_with_name (dev_name);
-	}
-    }
-
-  serial_setparity (monitor_desc, serial_parity);
-  serial_raw (monitor_desc);
-
-  serial_flush_input (monitor_desc);
-
-  /* some systems only work with 2 stop bits.  */
-
-  serial_setstopbits (monitor_desc, mon_ops->stopbits);
-
-  current_monitor = mon_ops;
-
-  /* See if we can wake up the monitor.  First, try sending a stop sequence,
-     then send the init strings.  Last, remove all breakpoints.  */
-
-  if (current_monitor->stop)
-    {
-      monitor_stop (targ_ops, inferior_ptid);
-      if ((current_monitor->flags & MO_NO_ECHO_ON_OPEN) == 0)
-	{
-	  monitor_debug ("EXP Open echo\n");
-	  monitor_expect_prompt (NULL, 0);
-	}
-    }
-
-  /* wake up the monitor and see if it's alive.  */
-  for (p = mon_ops->init; *p != NULL; p++)
-    {
-      /* Some of the characters we send may not be echoed,
-         but we hope to get a prompt at the end of it all.  */
-
-      if ((current_monitor->flags & MO_NO_ECHO_ON_OPEN) == 0)
-	monitor_printf (*p);
-      else
-	monitor_printf_noecho (*p);
-      monitor_expect_prompt (NULL, 0);
-    }
-
-  serial_flush_input (monitor_desc);
-
-  /* Alloc breakpoints */
-  if (mon_ops->set_break != NULL)
-    {
-      if (mon_ops->num_breakpoints == 0)
-	mon_ops->num_breakpoints = 8;
-
-      breakaddr = (CORE_ADDR *)
-	xmalloc (mon_ops->num_breakpoints * sizeof (CORE_ADDR));
-      memset (breakaddr, 0, mon_ops->num_breakpoints * sizeof (CORE_ADDR));
-    }
-
-  /* Remove all breakpoints.  */
-
-  if (mon_ops->clr_all_break)
-    {
-      monitor_printf (mon_ops->clr_all_break);
-      monitor_expect_prompt (NULL, 0);
-    }
-
-  if (from_tty)
-    printf_unfiltered (_("Remote target %s connected to %s\n"),
-		       name, dev_name);
-
-  push_target (targ_ops);
-
-  /* Start afresh.  */
-  init_thread_list ();
-
-  /* Make run command think we are busy...  */
-  inferior_ptid = monitor_ptid;
-  inf = current_inferior ();
-  inferior_appeared (inf, ptid_get_pid (inferior_ptid));
-  add_thread_silent (inferior_ptid);
-
-  /* Give monitor_wait something to read.  */
-
-  monitor_printf (current_monitor->line_term);
-
-  init_wait_for_inferior ();
-
-  start_remote (from_tty);
-}
-
-/* Close out all files and local state before this target loses
-   control.  */
-
-void
-monitor_close (struct target_ops *self)
-{
-  if (monitor_desc)
-    serial_close (monitor_desc);
-
-  /* Free breakpoint memory.  */
-  if (breakaddr != NULL)
-    {
-      xfree (breakaddr);
-      breakaddr = NULL;
-    }
-
-  monitor_desc = NULL;
-
-  delete_thread_silent (monitor_ptid);
-  delete_inferior_silent (ptid_get_pid (monitor_ptid));
-}
-
-/* Terminate the open connection to the remote debugger.  Use this
-   when you want to detach and do something else with your gdb.  */
-
-static void
-monitor_detach (struct target_ops *ops, const char *args, int from_tty)
-{
-  unpush_target (ops);		/* calls monitor_close to do the real work.  */
-  if (from_tty)
-    printf_unfiltered (_("Ending remote %s debugging\n"), target_shortname);
-}
-
-/* Convert VALSTR into the target byte-ordered value of REGNO and store it.  */
-
-char *
-monitor_supply_register (struct regcache *regcache, int regno, char *valstr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  ULONGEST val;
-  unsigned char regbuf[MAX_REGISTER_SIZE];
-  char *p;
-
-  val = 0;
-  p = valstr;
-  while (p && *p != '\0')
-    {
-      if (*p == '\r' || *p == '\n')
-        {
-          while (*p != '\0') 
-              p++;
-          break;
-        }
-      if (isspace (*p))
-        {
-          p++;
-          continue;
-        }
-      if (!isxdigit (*p) && *p != 'x')
-        {
-          break;
-        }
-
-      val <<= 4;
-      val += fromhex (*p++);
-    }
-  monitor_debug ("Supplying Register %d %s\n", regno, valstr);
-
-  if (val == 0 && valstr == p)
-    error (_("monitor_supply_register (%d):  bad value from monitor: %s."),
-	   regno, valstr);
-
-  /* supply register stores in target byte order, so swap here.  */
-
-  store_unsigned_integer (regbuf, register_size (gdbarch, regno), byte_order,
-			  val);
-
-  regcache_raw_supply (regcache, regno, regbuf);
-
-  return p;
-}
-
-/* Tell the remote machine to resume.  */
-
-static void
-monitor_resume (struct target_ops *ops,
-		ptid_t ptid, int step, enum gdb_signal sig)
-{
-  /* Some monitors require a different command when starting a program.  */
-  monitor_debug ("MON resume\n");
-  if (current_monitor->flags & MO_RUN_FIRST_TIME && first_time == 1)
-    {
-      first_time = 0;
-      monitor_printf ("run\r");
-      if (current_monitor->flags & MO_NEED_REGDUMP_AFTER_CONT)
-	dump_reg_flag = 1;
-      return;
-    }
-  if (step)
-    monitor_printf (current_monitor->step);
-  else
-    {
-      if (current_monitor->continue_hook)
-	(*current_monitor->continue_hook) ();
-      else
-	monitor_printf (current_monitor->cont);
-      if (current_monitor->flags & MO_NEED_REGDUMP_AFTER_CONT)
-	dump_reg_flag = 1;
-    }
-}
-
-/* Parse the output of a register dump command.  A monitor specific
-   regexp is used to extract individual register descriptions of the
-   form REG=VAL.  Each description is split up into a name and a value
-   string which are passed down to monitor specific code.  */
-
-static void
-parse_register_dump (struct regcache *regcache, char *buf, int len)
-{
-  monitor_debug ("MON Parsing  register dump\n");
-  while (1)
-    {
-      int regnamelen, vallen;
-      char *regname, *val;
-
-      /* Element 0 points to start of register name, and element 1
-         points to the start of the register value.  */
-      struct re_registers register_strings;
-
-      memset (&register_strings, 0, sizeof (struct re_registers));
-
-      if (re_search (&register_pattern, buf, len, 0, len,
-		     &register_strings) == -1)
-	break;
-
-      regnamelen = register_strings.end[1] - register_strings.start[1];
-      regname = buf + register_strings.start[1];
-      vallen = register_strings.end[2] - register_strings.start[2];
-      val = buf + register_strings.start[2];
-
-      current_monitor->supply_register (regcache, regname, regnamelen,
-					val, vallen);
-
-      buf += register_strings.end[0];
-      len -= register_strings.end[0];
-    }
-}
-
-/* Send ^C to target to halt it.  Target will respond, and send us a
-   packet.  */
-
-static void
-monitor_interrupt (int signo)
-{
-  /* If this doesn't work, try more severe steps.  */
-  signal (signo, monitor_interrupt_twice);
-
-  if (monitor_debug_p || remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "monitor_interrupt called\n");
-
-  target_stop (inferior_ptid);
-}
-
-/* The user typed ^C twice.  */
-
-static void
-monitor_interrupt_twice (int signo)
-{
-  signal (signo, ofunc);
-
-  monitor_interrupt_query ();
-
-  signal (signo, monitor_interrupt);
-}
-
-/* Ask the user what to do when an interrupt is received.  */
-
-static void
-monitor_interrupt_query (void)
-{
-  target_terminal_ours ();
-
-  if (query (_("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? ")))
-    {
-      target_mourn_inferior ();
-      quit ();
-    }
-
-  target_terminal_inferior ();
-}
-
-static void
-monitor_wait_cleanup (void *old_timeout)
-{
-  timeout = *(int *) old_timeout;
-  signal (SIGINT, ofunc);
-  in_monitor_wait = 0;
-}
-
-
-
-static void
-monitor_wait_filter (char *buf,
-		     int bufmax,
-		     int *ext_resp_len,
-		     struct target_waitstatus *status)
-{
-  int resp_len;
-
-  do
-    {
-      resp_len = monitor_expect_prompt (buf, bufmax);
-      *ext_resp_len = resp_len;
-
-      if (resp_len <= 0)
-	fprintf_unfiltered (gdb_stderr,
-			    "monitor_wait:  excessive "
-			    "response from monitor: %s.", buf);
-    }
-  while (resp_len < 0);
-
-  /* Print any output characters that were preceded by ^O.  */
-  /* FIXME - This would be great as a user settabgle flag.  */
-  if (monitor_debug_p || remote_debug
-      || current_monitor->flags & MO_PRINT_PROGRAM_OUTPUT)
-    {
-      int i;
-
-      for (i = 0; i < resp_len - 1; i++)
-	if (buf[i] == 0x0f)
-	  putchar_unfiltered (buf[++i]);
-    }
-}
-
-
-
-/* Wait until the remote machine stops, then return, storing status in
-   status just as `wait' would.  */
-
-static ptid_t
-monitor_wait (struct target_ops *ops,
-	      ptid_t ptid, struct target_waitstatus *status, int options)
-{
-  int old_timeout = timeout;
-  char buf[TARGET_BUF_SIZE];
-  int resp_len;
-  struct cleanup *old_chain;
-
-  status->kind = TARGET_WAITKIND_EXITED;
-  status->value.integer = 0;
-
-  old_chain = make_cleanup (monitor_wait_cleanup, &old_timeout);
-  monitor_debug ("MON wait\n");
-
-#if 0
-  /* This is somthing other than a maintenance command.  */
-    in_monitor_wait = 1;
-  timeout = watchdog > 0 ? watchdog : -1;
-#else
-  timeout = -1;		/* Don't time out -- user program is running.  */
-#endif
-
-  ofunc = (void (*)()) signal (SIGINT, monitor_interrupt);
-
-  if (current_monitor->wait_filter)
-    (*current_monitor->wait_filter) (buf, sizeof (buf), &resp_len, status);
-  else
-    monitor_wait_filter (buf, sizeof (buf), &resp_len, status);
-
-#if 0				/* Transferred to monitor wait filter.  */
-  do
-    {
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-
-      if (resp_len <= 0)
-	fprintf_unfiltered (gdb_stderr,
-			    "monitor_wait:  excessive "
-			    "response from monitor: %s.", buf);
-    }
-  while (resp_len < 0);
-
-  /* Print any output characters that were preceded by ^O.  */
-  /* FIXME - This would be great as a user settabgle flag.  */
-  if (monitor_debug_p || remote_debug
-      || current_monitor->flags & MO_PRINT_PROGRAM_OUTPUT)
-    {
-      int i;
-
-      for (i = 0; i < resp_len - 1; i++)
-	if (buf[i] == 0x0f)
-	  putchar_unfiltered (buf[++i]);
-    }
-#endif
-
-  signal (SIGINT, ofunc);
-
-  timeout = old_timeout;
-#if 0
-  if (dump_reg_flag && current_monitor->dump_registers)
-    {
-      dump_reg_flag = 0;
-      monitor_printf (current_monitor->dump_registers);
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-    }
-
-  if (current_monitor->register_pattern)
-    parse_register_dump (get_current_regcache (), buf, resp_len);
-#else
-  monitor_debug ("Wait fetching registers after stop\n");
-  monitor_dump_regs (get_current_regcache ());
-#endif
-
-  status->kind = TARGET_WAITKIND_STOPPED;
-  status->value.sig = GDB_SIGNAL_TRAP;
-
-  discard_cleanups (old_chain);
-
-  in_monitor_wait = 0;
-
-  return inferior_ptid;
-}
-
-/* Fetch register REGNO, or all registers if REGNO is -1.  Returns
-   errno value.  */
-
-static void
-monitor_fetch_register (struct regcache *regcache, int regno)
-{
-  const char *name;
-  char *zerobuf;
-  char *regbuf;
-  int i;
-
-  regbuf  = alloca (MAX_REGISTER_SIZE * 2 + 1);
-  zerobuf = alloca (MAX_REGISTER_SIZE);
-  memset (zerobuf, 0, MAX_REGISTER_SIZE);
-
-  if (current_monitor->regname != NULL)
-    name = current_monitor->regname (regno);
-  else
-    name = current_monitor->regnames[regno];
-  monitor_debug ("MON fetchreg %d '%s'\n", regno, name ? name : "(null name)");
-
-  if (!name || (*name == '\0'))
-    {
-      monitor_debug ("No register known for %d\n", regno);
-      regcache_raw_supply (regcache, regno, zerobuf);
-      return;
-    }
-
-  /* Send the register examine command.  */
-
-  monitor_printf (current_monitor->getreg.cmd, name);
-
-  /* If RESP_DELIM is specified, we search for that as a leading
-     delimiter for the register value.  Otherwise, we just start
-     searching from the start of the buf.  */
-
-  if (current_monitor->getreg.resp_delim)
-    {
-      monitor_debug ("EXP getreg.resp_delim\n");
-      monitor_expect (current_monitor->getreg.resp_delim, NULL, 0);
-      /* Handle case of first 32 registers listed in pairs.  */
-      if (current_monitor->flags & MO_32_REGS_PAIRED
-	  && (regno & 1) != 0 && regno < 32)
-	{
-	  monitor_debug ("EXP getreg.resp_delim\n");
-	  monitor_expect (current_monitor->getreg.resp_delim, NULL, 0);
-	}
-    }
-
-  /* Skip leading spaces and "0x" if MO_HEX_PREFIX flag is set.  */
-  if (current_monitor->flags & MO_HEX_PREFIX)
-    {
-      int c;
-
-      c = readchar (timeout);
-      while (c == ' ')
-	c = readchar (timeout);
-      if ((c == '0') && ((c = readchar (timeout)) == 'x'))
-	;
-      else
-	error (_("Bad value returned from monitor "
-		 "while fetching register %x."),
-	       regno);
-    }
-
-  /* Read upto the maximum number of hex digits for this register, skipping
-     spaces, but stop reading if something else is seen.  Some monitors
-     like to drop leading zeros.  */
-
-  for (i = 0; i < register_size (get_regcache_arch (regcache), regno) * 2; i++)
-    {
-      int c;
-
-      c = readchar (timeout);
-      while (c == ' ')
-	c = readchar (timeout);
-
-      if (!isxdigit (c))
-	break;
-
-      regbuf[i] = c;
-    }
-
-  regbuf[i] = '\000';		/* Terminate the number.  */
-  monitor_debug ("REGVAL '%s'\n", regbuf);
-
-  /* If TERM is present, we wait for that to show up.  Also, (if TERM
-     is present), we will send TERM_CMD if that is present.  In any
-     case, we collect all of the output into buf, and then wait for
-     the normal prompt.  */
-
-  if (current_monitor->getreg.term)
-    {
-      monitor_debug ("EXP getreg.term\n");
-      monitor_expect (current_monitor->getreg.term, NULL, 0); /* Get
-								 response.  */
-    }
-
-  if (current_monitor->getreg.term_cmd)
-    {
-      monitor_debug ("EMIT getreg.term.cmd\n");
-      monitor_printf (current_monitor->getreg.term_cmd);
-    }
-  if (!current_monitor->getreg.term ||	/* Already expected or */
-      current_monitor->getreg.term_cmd)		/* ack expected.  */
-    monitor_expect_prompt (NULL, 0);	/* Get response.  */
-
-  monitor_supply_register (regcache, regno, regbuf);
-}
-
-/* Sometimes, it takes several commands to dump the registers.  */
-/* This is a primitive for use by variations of monitor interfaces in
-   case they need to compose the operation.  */
-
-int
-monitor_dump_reg_block (struct regcache *regcache, char *block_cmd)
-{
-  char buf[TARGET_BUF_SIZE];
-  int resp_len;
-
-  monitor_printf (block_cmd);
-  resp_len = monitor_expect_prompt (buf, sizeof (buf));
-  parse_register_dump (regcache, buf, resp_len);
-  return 1;
-}
-
-
-/* Read the remote registers into the block regs.  */
-/* Call the specific function if it has been provided.  */
-
-static void
-monitor_dump_regs (struct regcache *regcache)
-{
-  char buf[TARGET_BUF_SIZE];
-  int resp_len;
-
-  if (current_monitor->dumpregs)
-    (*(current_monitor->dumpregs)) (regcache);	/* Call supplied function.  */
-  else if (current_monitor->dump_registers)	/* Default version.  */
-    {
-      monitor_printf (current_monitor->dump_registers);
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-      parse_register_dump (regcache, buf, resp_len);
-    }
-  else
-    /* Need some way to read registers.  */
-    internal_error (__FILE__, __LINE__,
-		    _("failed internal consistency check"));
-}
-
-static void
-monitor_fetch_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regno)
-{
-  monitor_debug ("MON fetchregs\n");
-  if (current_monitor->getreg.cmd)
-    {
-      if (regno >= 0)
-	{
-	  monitor_fetch_register (regcache, regno);
-	  return;
-	}
-
-      for (regno = 0; regno < gdbarch_num_regs (get_regcache_arch (regcache));
-	   regno++)
-	monitor_fetch_register (regcache, regno);
-    }
-  else
-    {
-      monitor_dump_regs (regcache);
-    }
-}
-
-/* Store register REGNO, or all if REGNO == 0.  Return errno value.  */
-
-static void
-monitor_store_register (struct regcache *regcache, int regno)
-{
-  int reg_size = register_size (get_regcache_arch (regcache), regno);
-  const char *name;
-  ULONGEST val;
-  
-  if (current_monitor->regname != NULL)
-    name = current_monitor->regname (regno);
-  else
-    name = current_monitor->regnames[regno];
-  
-  if (!name || (*name == '\0'))
-    {
-      monitor_debug ("MON Cannot store unknown register\n");
-      return;
-    }
-
-  regcache_cooked_read_unsigned (regcache, regno, &val);
-  monitor_debug ("MON storeg %d %s\n", regno, phex (val, reg_size));
-
-  /* Send the register deposit command.  */
-
-  if (current_monitor->flags & MO_REGISTER_VALUE_FIRST)
-    monitor_printf (current_monitor->setreg.cmd, val, name);
-  else if (current_monitor->flags & MO_SETREG_INTERACTIVE)
-    monitor_printf (current_monitor->setreg.cmd, name);
-  else
-    monitor_printf (current_monitor->setreg.cmd, name, val);
-
-  if (current_monitor->setreg.resp_delim)
-    {
-      monitor_debug ("EXP setreg.resp_delim\n");
-      monitor_expect_regexp (&setreg_resp_delim_pattern, NULL, 0);
-      if (current_monitor->flags & MO_SETREG_INTERACTIVE)
-	monitor_printf ("%s\r", phex_nz (val, reg_size));
-    }
-  if (current_monitor->setreg.term)
-    {
-      monitor_debug ("EXP setreg.term\n");
-      monitor_expect (current_monitor->setreg.term, NULL, 0);
-      if (current_monitor->flags & MO_SETREG_INTERACTIVE)
-	monitor_printf ("%s\r", phex_nz (val, reg_size));
-      monitor_expect_prompt (NULL, 0);
-    }
-  else
-    monitor_expect_prompt (NULL, 0);
-  if (current_monitor->setreg.term_cmd)		/* Mode exit required.  */
-    {
-      monitor_debug ("EXP setreg_termcmd\n");
-      monitor_printf ("%s", current_monitor->setreg.term_cmd);
-      monitor_expect_prompt (NULL, 0);
-    }
-}				/* monitor_store_register */
-
-/* Store the remote registers.  */
-
-static void
-monitor_store_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regno)
-{
-  if (regno >= 0)
-    {
-      monitor_store_register (regcache, regno);
-      return;
-    }
-
-  for (regno = 0; regno < gdbarch_num_regs (get_regcache_arch (regcache));
-       regno++)
-    monitor_store_register (regcache, regno);
-}
-
-/* Get ready to modify the registers array.  On machines which store
-   individual registers, this doesn't need to do anything.  On machines
-   which store all the registers in one fell swoop, this makes sure
-   that registers contains all the registers from the program being
-   debugged.  */
-
-static void
-monitor_prepare_to_store (struct target_ops *self, struct regcache *regcache)
-{
-  /* Do nothing, since we can store individual regs.  */
-}
-
-static void
-monitor_files_info (struct target_ops *ops)
-{
-  printf_unfiltered (_("\tAttached to %s at %d baud.\n"), dev_name, baud_rate);
-}
-
-static int
-monitor_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  unsigned int val, hostval;
-  char *cmd;
-  int i;
-
-  monitor_debug ("MON write %d %s\n", len, paddress (target_gdbarch (), memaddr));
-
-  if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
-    memaddr = gdbarch_addr_bits_remove (target_gdbarch (), memaddr);
-
-  /* Use memory fill command for leading 0 bytes.  */
-
-  if (current_monitor->fill)
-    {
-      for (i = 0; i < len; i++)
-	if (myaddr[i] != 0)
-	  break;
-
-      if (i > 4)		/* More than 4 zeros is worth doing.  */
-	{
-	  monitor_debug ("MON FILL %d\n", i);
-	  if (current_monitor->flags & MO_FILL_USES_ADDR)
-	    monitor_printf (current_monitor->fill, memaddr,
-			    (memaddr + i) - 1, 0);
-	  else
-	    monitor_printf (current_monitor->fill, memaddr, i, 0);
-
-	  monitor_expect_prompt (NULL, 0);
-
-	  return i;
-	}
-    }
-
-#if 0
-  /* Can't actually use long longs if VAL is an int (nice idea, though).  */
-  if ((memaddr & 0x7) == 0 && len >= 8 && current_monitor->setmem.cmdll)
-    {
-      len = 8;
-      cmd = current_monitor->setmem.cmdll;
-    }
-  else
-#endif
-  if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->setmem.cmdl)
-    {
-      len = 4;
-      cmd = current_monitor->setmem.cmdl;
-    }
-  else if ((memaddr & 0x1) == 0 && len >= 2 && current_monitor->setmem.cmdw)
-    {
-      len = 2;
-      cmd = current_monitor->setmem.cmdw;
-    }
-  else
-    {
-      len = 1;
-      cmd = current_monitor->setmem.cmdb;
-    }
-
-  val = extract_unsigned_integer (myaddr, len, byte_order);
-
-  if (len == 4)
-    {
-      hostval = *(unsigned int *) myaddr;
-      monitor_debug ("Hostval(%08x) val(%08x)\n", hostval, val);
-    }
-
-
-  if (current_monitor->flags & MO_NO_ECHO_ON_SETMEM)
-    monitor_printf_noecho (cmd, memaddr, val);
-  else if (current_monitor->flags & MO_SETMEM_INTERACTIVE)
-    {
-      monitor_printf_noecho (cmd, memaddr);
-
-      if (current_monitor->setmem.resp_delim)
-        {
-          monitor_debug ("EXP setmem.resp_delim");
-          monitor_expect_regexp (&setmem_resp_delim_pattern, NULL, 0); 
-	  monitor_printf ("%x\r", val);
-       }
-      if (current_monitor->setmem.term)
-	{
-	  monitor_debug ("EXP setmem.term");
-	  monitor_expect (current_monitor->setmem.term, NULL, 0);
-	  monitor_printf ("%x\r", val);
-	}
-      if (current_monitor->setmem.term_cmd)
-	{	/* Emit this to get out of the memory editing state.  */
-	  monitor_printf ("%s", current_monitor->setmem.term_cmd);
-	  /* Drop through to expecting a prompt.  */
-	}
-    }
-  else
-    monitor_printf (cmd, memaddr, val);
-
-  monitor_expect_prompt (NULL, 0);
-
-  return len;
-}
-
-
-static int
-monitor_write_memory_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
-{
-  unsigned char val;
-  int written = 0;
-
-  if (len == 0)
-    return 0;
-  /* Enter the sub mode.  */
-  monitor_printf (current_monitor->setmem.cmdb, memaddr);
-  monitor_expect_prompt (NULL, 0);
-  while (len)
-    {
-      val = *myaddr;
-      monitor_printf ("%x\r", val);
-      myaddr++;
-      memaddr++;
-      written++;
-      /* If we wanted to, here we could validate the address.  */
-      monitor_expect_prompt (NULL, 0);
-      len--;
-    }
-  /* Now exit the sub mode.  */
-  monitor_printf (current_monitor->getreg.term_cmd);
-  monitor_expect_prompt (NULL, 0);
-  return written;
-}
-
-
-static void
-longlongendswap (unsigned char *a)
-{
-  int i, j;
-  unsigned char x;
-
-  i = 0;
-  j = 7;
-  while (i < 4)
-    {
-      x = *(a + i);
-      *(a + i) = *(a + j);
-      *(a + j) = x;
-      i++, j--;
-    }
-}
-/* Format 32 chars of long long value, advance the pointer.  */
-static char *hexlate = "0123456789abcdef";
-static char *
-longlong_hexchars (unsigned long long value,
-		   char *outbuff)
-{
-  if (value == 0)
-    {
-      *outbuff++ = '0';
-      return outbuff;
-    }
-  else
-    {
-      static unsigned char disbuf[8];	/* disassembly buffer */
-      unsigned char *scan, *limit;	/* loop controls */
-      unsigned char c, nib;
-      int leadzero = 1;
-
-      scan = disbuf;
-      limit = scan + 8;
-      {
-	unsigned long long *dp;
-
-	dp = (unsigned long long *) scan;
-	*dp = value;
-      }
-      longlongendswap (disbuf);	/* FIXME: ONly on big endian hosts.  */
-      while (scan < limit)
-	{
-	  c = *scan++;		/* A byte of our long long value.  */
-	  if (leadzero)
-	    {
-	      if (c == 0)
-		continue;
-	      else
-		leadzero = 0;	/* Henceforth we print even zeroes.  */
-	    }
-	  nib = c >> 4;		/* high nibble bits */
-	  *outbuff++ = hexlate[nib];
-	  nib = c & 0x0f;	/* low nibble bits */
-	  *outbuff++ = hexlate[nib];
-	}
-      return outbuff;
-    }
-}				/* longlong_hexchars */
-
-
-
-/* I am only going to call this when writing virtual byte streams.
-   Which possably entails endian conversions.  */
-
-static int
-monitor_write_memory_longlongs (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
-{
-  static char hexstage[20];	/* At least 16 digits required, plus null.  */
-  char *endstring;
-  long long *llptr;
-  long long value;
-  int written = 0;
-
-  llptr = (long long *) myaddr;
-  if (len == 0)
-    return 0;
-  monitor_printf (current_monitor->setmem.cmdll, memaddr);
-  monitor_expect_prompt (NULL, 0);
-  while (len >= 8)
-    {
-      value = *llptr;
-      endstring = longlong_hexchars (*llptr, hexstage);
-      *endstring = '\0';	/* NUll terminate for printf.  */
-      monitor_printf ("%s\r", hexstage);
-      llptr++;
-      memaddr += 8;
-      written += 8;
-      /* If we wanted to, here we could validate the address.  */
-      monitor_expect_prompt (NULL, 0);
-      len -= 8;
-    }
-  /* Now exit the sub mode.  */
-  monitor_printf (current_monitor->getreg.term_cmd);
-  monitor_expect_prompt (NULL, 0);
-  return written;
-}				/* */
-
-
-
-/* ----- MONITOR_WRITE_MEMORY_BLOCK ---------------------------- */
-/* This is for the large blocks of memory which may occur in downloading.
-   And for monitors which use interactive entry,
-   And for monitors which do not have other downloading methods.
-   Without this, we will end up calling monitor_write_memory many times
-   and do the entry and exit of the sub mode many times
-   This currently assumes...
-   MO_SETMEM_INTERACTIVE
-   ! MO_NO_ECHO_ON_SETMEM
-   To use this, the you have to patch the monitor_cmds block with
-   this function.  Otherwise, its not tuned up for use by all
-   monitor variations.  */
-
-static int
-monitor_write_memory_block (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
-{
-  int written;
-
-  written = 0;
-  /* FIXME: This would be a good place to put the zero test.  */
-#if 1
-  if ((len > 8) && (((len & 0x07)) == 0) && current_monitor->setmem.cmdll)
-    {
-      return monitor_write_memory_longlongs (memaddr, myaddr, len);
-    }
-#endif
-  written = monitor_write_memory_bytes (memaddr, myaddr, len);
-  return written;
-}
-
-/* This is an alternate form of monitor_read_memory which is used for monitors
-   which can only read a single byte/word/etc. at a time.  */
-
-static int
-monitor_read_memory_single (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  unsigned int val;
-  char membuf[sizeof (int) * 2 + 1];
-  char *p;
-  char *cmd;
-
-  monitor_debug ("MON read single\n");
-#if 0
-  /* Can't actually use long longs (nice idea, though).  In fact, the
-     call to strtoul below will fail if it tries to convert a value
-     that's too big to fit in a long.  */
-  if ((memaddr & 0x7) == 0 && len >= 8 && current_monitor->getmem.cmdll)
-    {
-      len = 8;
-      cmd = current_monitor->getmem.cmdll;
-    }
-  else
-#endif
-  if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->getmem.cmdl)
-    {
-      len = 4;
-      cmd = current_monitor->getmem.cmdl;
-    }
-  else if ((memaddr & 0x1) == 0 && len >= 2 && current_monitor->getmem.cmdw)
-    {
-      len = 2;
-      cmd = current_monitor->getmem.cmdw;
-    }
-  else
-    {
-      len = 1;
-      cmd = current_monitor->getmem.cmdb;
-    }
-
-  /* Send the examine command.  */
-
-  monitor_printf (cmd, memaddr);
-
-  /* If RESP_DELIM is specified, we search for that as a leading
-     delimiter for the memory value.  Otherwise, we just start
-     searching from the start of the buf.  */
-
-  if (current_monitor->getmem.resp_delim)
-    {
-      monitor_debug ("EXP getmem.resp_delim\n");
-      monitor_expect_regexp (&getmem_resp_delim_pattern, NULL, 0);
-    }
-
-  /* Now, read the appropriate number of hex digits for this loc,
-     skipping spaces.  */
-
-  /* Skip leading spaces and "0x" if MO_HEX_PREFIX flag is set.  */
-  if (current_monitor->flags & MO_HEX_PREFIX)
-    {
-      int c;
-
-      c = readchar (timeout);
-      while (c == ' ')
-	c = readchar (timeout);
-      if ((c == '0') && ((c = readchar (timeout)) == 'x'))
-	;
-      else
-	monitor_error ("monitor_read_memory_single", 
-		       "bad response from monitor",
-		       memaddr, 0, NULL, 0);
-    }
-
-  {
-    int i;
-
-    for (i = 0; i < len * 2; i++)
-      {
-	int c;
-
-	while (1)
-	  {
-	    c = readchar (timeout);
-	    if (isxdigit (c))
-	      break;
-	    if (c == ' ')
-	      continue;
-	    
-	    monitor_error ("monitor_read_memory_single",
-			   "bad response from monitor",
-			   memaddr, i, membuf, 0);
-	  }
-      membuf[i] = c;
-    }
-    membuf[i] = '\000';		/* Terminate the number.  */
-  }
-
-/* If TERM is present, we wait for that to show up.  Also, (if TERM is
-   present), we will send TERM_CMD if that is present.  In any case, we collect
-   all of the output into buf, and then wait for the normal prompt.  */
-
-  if (current_monitor->getmem.term)
-    {
-      monitor_expect (current_monitor->getmem.term, NULL, 0); /* Get
-								 response.  */
-
-      if (current_monitor->getmem.term_cmd)
-	{
-	  monitor_printf (current_monitor->getmem.term_cmd);
-	  monitor_expect_prompt (NULL, 0);
-	}
-    }
-  else
-    monitor_expect_prompt (NULL, 0);	/* Get response.  */
-
-  p = membuf;
-  val = strtoul (membuf, &p, 16);
-
-  if (val == 0 && membuf == p)
-    monitor_error ("monitor_read_memory_single",
-		   "bad value from monitor",
-		   memaddr, 0, membuf, 0);
-
-  /* supply register stores in target byte order, so swap here.  */
-
-  store_unsigned_integer (myaddr, len, byte_order, val);
-
-  return len;
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR to inferior's
-   memory at MEMADDR.  Returns length moved.  Currently, we do no more
-   than 16 bytes at a time.  */
-
-static int
-monitor_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
-{
-  unsigned int val;
-  char buf[512];
-  char *p, *p1;
-  int resp_len;
-  int i;
-  CORE_ADDR dumpaddr;
-
-  if (len <= 0)
-    {
-      monitor_debug ("Zero length call to monitor_read_memory\n");
-      return 0;
-    }
-
-  monitor_debug ("MON read block ta(%s) ha(%s) %d\n",
-		 paddress (target_gdbarch (), memaddr),
-		 host_address_to_string (myaddr), len);
-
-  if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
-    memaddr = gdbarch_addr_bits_remove (target_gdbarch (), memaddr);
-
-  if (current_monitor->flags & MO_GETMEM_READ_SINGLE)
-    return monitor_read_memory_single (memaddr, myaddr, len);
-
-  len = min (len, 16);
-
-  /* Some dumpers align the first data with the preceding 16
-     byte boundary.  Some print blanks and start at the
-     requested boundary.  EXACT_DUMPADDR  */
-
-  dumpaddr = (current_monitor->flags & MO_EXACT_DUMPADDR)
-    ? memaddr : memaddr & ~0x0f;
-
-  /* See if xfer would cross a 16 byte boundary.  If so, clip it.  */
-  if (((memaddr ^ (memaddr + len - 1)) & ~0xf) != 0)
-    len = ((memaddr + len) & ~0xf) - memaddr;
-
-  /* Send the memory examine command.  */
-
-  if (current_monitor->flags & MO_GETMEM_NEEDS_RANGE)
-    monitor_printf (current_monitor->getmem.cmdb, memaddr, memaddr + len);
-  else if (current_monitor->flags & MO_GETMEM_16_BOUNDARY)
-    monitor_printf (current_monitor->getmem.cmdb, dumpaddr);
-  else
-    monitor_printf (current_monitor->getmem.cmdb, memaddr, len);
-
-  /* If TERM is present, we wait for that to show up.  Also, (if TERM
-     is present), we will send TERM_CMD if that is present.  In any
-     case, we collect all of the output into buf, and then wait for
-     the normal prompt.  */
-
-  if (current_monitor->getmem.term)
-    {
-      resp_len = monitor_expect (current_monitor->getmem.term,
-				 buf, sizeof buf);	/* Get response.  */
-
-      if (resp_len <= 0)
-	monitor_error ("monitor_read_memory",
-		       "excessive response from monitor",
-		       memaddr, resp_len, buf, 0);
-
-      if (current_monitor->getmem.term_cmd)
-	{
-	  serial_write (monitor_desc, current_monitor->getmem.term_cmd,
-			strlen (current_monitor->getmem.term_cmd));
-	  monitor_expect_prompt (NULL, 0);
-	}
-    }
-  else
-    resp_len = monitor_expect_prompt (buf, sizeof buf);	 /* Get response.  */
-
-  p = buf;
-
-  /* If RESP_DELIM is specified, we search for that as a leading
-     delimiter for the values.  Otherwise, we just start searching
-     from the start of the buf.  */
-
-  if (current_monitor->getmem.resp_delim)
-    {
-      int retval, tmp;
-      struct re_registers resp_strings;
-
-      monitor_debug ("MON getmem.resp_delim %s\n",
-		     current_monitor->getmem.resp_delim);
-
-      memset (&resp_strings, 0, sizeof (struct re_registers));
-      tmp = strlen (p);
-      retval = re_search (&getmem_resp_delim_pattern, p, tmp, 0, tmp,
-			  &resp_strings);
-
-      if (retval < 0)
-	monitor_error ("monitor_read_memory",
-		       "bad response from monitor",
-		       memaddr, resp_len, buf, 0);
-
-      p += resp_strings.end[0];
-#if 0
-      p = strstr (p, current_monitor->getmem.resp_delim);
-      if (!p)
-	monitor_error ("monitor_read_memory",
-		       "bad response from monitor",
-		       memaddr, resp_len, buf, 0);
-      p += strlen (current_monitor->getmem.resp_delim);
-#endif
-    }
-  monitor_debug ("MON scanning  %d ,%s '%s'\n", len,
-		 host_address_to_string (p), p);
-  if (current_monitor->flags & MO_GETMEM_16_BOUNDARY)
-    {
-      char c;
-      int fetched = 0;
-      i = len;
-      c = *p;
-
-
-      while (!(c == '\000' || c == '\n' || c == '\r') && i > 0)
-	{
-	  if (isxdigit (c))
-	    {
-	      if ((dumpaddr >= memaddr) && (i > 0))
-		{
-		  val = fromhex (c) * 16 + fromhex (*(p + 1));
-		  *myaddr++ = val;
-		  if (monitor_debug_p || remote_debug)
-		    fprintf_unfiltered (gdb_stdlog, "[%02x]", val);
-		  --i;
-		  fetched++;
-		}
-	      ++dumpaddr;
-	      ++p;
-	    }
-	  ++p;			/* Skip a blank or other non hex char.  */
-	  c = *p;
-	}
-      if (fetched == 0)
-	error (_("Failed to read via monitor"));
-      if (monitor_debug_p || remote_debug)
-	fprintf_unfiltered (gdb_stdlog, "\n");
-      return fetched;		/* Return the number of bytes actually
-				   read.  */
-    }
-  monitor_debug ("MON scanning bytes\n");
-
-  for (i = len; i > 0; i--)
-    {
-      /* Skip non-hex chars, but bomb on end of string and newlines.  */
-
-      while (1)
-	{
-	  if (isxdigit (*p))
-	    break;
-
-	  if (*p == '\000' || *p == '\n' || *p == '\r')
-	    monitor_error ("monitor_read_memory",
-			   "badly terminated response from monitor",
-			   memaddr, resp_len, buf, 0);
-	  p++;
-	}
-
-      val = strtoul (p, &p1, 16);
-
-      if (val == 0 && p == p1)
-	monitor_error ("monitor_read_memory",
-		       "bad value from monitor",
-		       memaddr, resp_len, buf, 0);
-
-      *myaddr++ = val;
-
-      if (i == 1)
-	break;
-
-      p = p1;
-    }
-
-  return len;
-}
-
-/* Helper for monitor_xfer_partial that handles memory transfers.
-   Arguments are like target_xfer_partial.  */
-
-static enum target_xfer_status
-monitor_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-		     ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
-{
-  int res;
-
-  if (writebuf != NULL)
-    {
-      if (current_monitor->flags & MO_HAS_BLOCKWRITES)
-	res = monitor_write_memory_block (memaddr, writebuf, len);
-      else
-	res = monitor_write_memory (memaddr, writebuf, len);
-    }
-  else
-    {
-      res = monitor_read_memory (memaddr, readbuf, len);
-    }
-
-  if (res <= 0)
-    return TARGET_XFER_E_IO;
-  else
-    {
-      *xfered_len = (ULONGEST) res;
-      return TARGET_XFER_OK;
-    }
-}
-
-/* Target to_xfer_partial implementation.  */
-
-static enum target_xfer_status
-monitor_xfer_partial (struct target_ops *ops, enum target_object object,
-		      const char *annex, gdb_byte *readbuf,
-		      const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
-		      ULONGEST *xfered_len)
-{
-  switch (object)
-    {
-    case TARGET_OBJECT_MEMORY:
-      return monitor_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
-
-    default:
-      return TARGET_XFER_E_IO;
-    }
-}
-
-static void
-monitor_kill (struct target_ops *ops)
-{
-  return;			/* Ignore attempts to kill target system.  */
-}
-
-/* All we actually do is set the PC to the start address of exec_bfd.  */
-
-static void
-monitor_create_inferior (struct target_ops *ops, char *exec_file,
-			 char *args, char **env, int from_tty)
-{
-  if (args && (*args != '\000'))
-    error (_("Args are not supported by the monitor."));
-
-  first_time = 1;
-  clear_proceed_status (0);
-  regcache_write_pc (get_current_regcache (),
-		     bfd_get_start_address (exec_bfd));
-}
-
-/* Clean up when a program exits.
-   The program actually lives on in the remote processor's RAM, and may be
-   run again without a download.  Don't leave it full of breakpoint
-   instructions.  */
-
-static void
-monitor_mourn_inferior (struct target_ops *ops)
-{
-  unpush_target (targ_ops);
-  generic_mourn_inferior ();	/* Do all the proper things now.  */
-  delete_thread_silent (monitor_ptid);
-}
-
-/* Tell the monitor to add a breakpoint.  */
-
-static int
-monitor_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			   struct bp_target_info *bp_tgt)
-{
-  CORE_ADDR addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
-  int i;
-  int bplen;
-
-  monitor_debug ("MON inst bkpt %s\n", paddress (gdbarch, addr));
-  if (current_monitor->set_break == NULL)
-    error (_("No set_break defined for this monitor"));
-
-  if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
-    addr = gdbarch_addr_bits_remove (gdbarch, addr);
-
-  /* Determine appropriate breakpoint size for this address.  */
-  gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-  bp_tgt->placed_address = addr;
-  bp_tgt->placed_size = bplen;
-
-  for (i = 0; i < current_monitor->num_breakpoints; i++)
-    {
-      if (breakaddr[i] == 0)
-	{
-	  breakaddr[i] = addr;
-	  monitor_printf (current_monitor->set_break, addr);
-	  monitor_expect_prompt (NULL, 0);
-	  return 0;
-	}
-    }
-
-  error (_("Too many breakpoints (> %d) for monitor."),
-	 current_monitor->num_breakpoints);
-}
-
-/* Tell the monitor to remove a breakpoint.  */
-
-static int
-monitor_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			   struct bp_target_info *bp_tgt)
-{
-  CORE_ADDR addr = bp_tgt->placed_address;
-  int i;
-
-  monitor_debug ("MON rmbkpt %s\n", paddress (gdbarch, addr));
-  if (current_monitor->clr_break == NULL)
-    error (_("No clr_break defined for this monitor"));
-
-  for (i = 0; i < current_monitor->num_breakpoints; i++)
-    {
-      if (breakaddr[i] == addr)
-	{
-	  breakaddr[i] = 0;
-	  /* Some monitors remove breakpoints based on the address.  */
-	  if (current_monitor->flags & MO_CLR_BREAK_USES_ADDR)
-	    monitor_printf (current_monitor->clr_break, addr);
-	  else if (current_monitor->flags & MO_CLR_BREAK_1_BASED)
-	    monitor_printf (current_monitor->clr_break, i + 1);
-	  else
-	    monitor_printf (current_monitor->clr_break, i);
-	  monitor_expect_prompt (NULL, 0);
-	  return 0;
-	}
-    }
-  fprintf_unfiltered (gdb_stderr,
-		      "Can't find breakpoint associated with %s\n",
-		      paddress (gdbarch, addr));
-  return 1;
-}
-
-/* monitor_wait_srec_ack -- wait for the target to send an acknowledgement for
-   an S-record.  Return non-zero if the ACK is received properly.  */
-
-static int
-monitor_wait_srec_ack (void)
-{
-  int ch;
-
-  if (current_monitor->flags & MO_SREC_ACK_PLUS)
-    {
-      return (readchar (timeout) == '+');
-    }
-  else if (current_monitor->flags & MO_SREC_ACK_ROTATE)
-    {
-      /* Eat two backspaces, a "rotating" char (|/-\), and a space.  */
-      if ((ch = readchar (1)) < 0)
-	return 0;
-      if ((ch = readchar (1)) < 0)
-	return 0;
-      if ((ch = readchar (1)) < 0)
-	return 0;
-      if ((ch = readchar (1)) < 0)
-	return 0;
-    }
-  return 1;
-}
-
-/* monitor_load -- download a file.  */
-
-static void
-monitor_load (struct target_ops *self, const char *args, int from_tty)
-{
-  CORE_ADDR load_offset = 0;
-  char **argv;
-  struct cleanup *old_cleanups;
-  char *filename;
-
-  monitor_debug ("MON load\n");
-
-  if (args == NULL)
-    error_no_arg (_("file to load"));
-
-  argv = gdb_buildargv (args);
-  old_cleanups = make_cleanup_freeargv (argv);
-
-  filename = tilde_expand (argv[0]);
-  make_cleanup (xfree, filename);
-
-  /* Enable user to specify address for downloading as 2nd arg to load.  */
-  if (argv[1] != NULL)
-    {
-      const char *endptr;
-
-      load_offset = strtoulst (argv[1], &endptr, 0);
-
-      /* If the last word was not a valid number then
-	 treat it as a file name with spaces in.  */
-      if (argv[1] == endptr)
-	error (_("Invalid download offset:%s."), argv[1]);
-
-      if (argv[2] != NULL)
-	error (_("Too many parameters."));
-    }
-
-  monitor_printf (current_monitor->load);
-  if (current_monitor->loadresp)
-    monitor_expect (current_monitor->loadresp, NULL, 0);
-
-  load_srec (monitor_desc, filename, load_offset,
-	     32, SREC_ALL, hashmark,
-	     current_monitor->flags & MO_SREC_ACK ?
-	     monitor_wait_srec_ack : NULL);
-
-  monitor_expect_prompt (NULL, 0);
-
-  do_cleanups (old_cleanups);
-
-  /* Finally, make the PC point at the start address.  */
-  if (exec_bfd)
-    regcache_write_pc (get_current_regcache (),
-		       bfd_get_start_address (exec_bfd));
-
-  /* There used to be code here which would clear inferior_ptid and
-     call clear_symtab_users.  None of that should be necessary:
-     monitor targets should behave like remote protocol targets, and
-     since generic_load does none of those things, this function
-     shouldn't either.
-
-     Furthermore, clearing inferior_ptid is *incorrect*.  After doing
-     a load, we still have a valid connection to the monitor, with a
-     live processor state to fiddle with.  The user can type
-     `continue' or `jump *start' and make the program run.  If they do
-     these things, however, GDB will be talking to a running program
-     while inferior_ptid is null_ptid; this makes things like
-     reinit_frame_cache very confused.  */
-}
-
-static void
-monitor_stop (struct target_ops *self, ptid_t ptid)
-{
-  monitor_debug ("MON stop\n");
-  if ((current_monitor->flags & MO_SEND_BREAK_ON_STOP) != 0)
-    serial_send_break (monitor_desc);
-  if (current_monitor->stop)
-    monitor_printf_noecho (current_monitor->stop);
-}
-
-/* Put a COMMAND string out to MONITOR.  Output from MONITOR is placed
-   in OUTPUT until the prompt is seen.  FIXME: We read the characters
-   ourseleves here cause of a nasty echo.  */
-
-static void
-monitor_rcmd (struct target_ops *self, const char *command,
-	      struct ui_file *outbuf)
-{
-  char *p;
-  int resp_len;
-  char buf[1000];
-
-  if (monitor_desc == NULL)
-    error (_("monitor target not open."));
-
-  p = current_monitor->prompt;
-
-  /* Send the command.  Note that if no args were supplied, then we're
-     just sending the monitor a newline, which is sometimes useful.  */
-
-  monitor_printf ("%s\r", (command ? command : ""));
-
-  resp_len = monitor_expect_prompt (buf, sizeof buf);
-
-  fputs_unfiltered (buf, outbuf);	/* Output the response.  */
-}
-
-/* Convert hex digit A to a number.  */
-
-#if 0
-static int
-from_hex (int a)
-{
-  if (a >= '0' && a <= '9')
-    return a - '0';
-  if (a >= 'a' && a <= 'f')
-    return a - 'a' + 10;
-  if (a >= 'A' && a <= 'F')
-    return a - 'A' + 10;
-
-  error (_("Reply contains invalid hex digit 0x%x"), a);
-}
-#endif
-
-char *
-monitor_get_dev_name (void)
-{
-  return dev_name;
-}
-
-/* Check to see if a thread is still alive.  */
-
-static int
-monitor_thread_alive (struct target_ops *ops, ptid_t ptid)
-{
-  if (ptid_equal (ptid, monitor_ptid))
-    /* The monitor's task is always alive.  */
-    return 1;
-
-  return 0;
-}
-
-/* Convert a thread ID to a string.  Returns the string in a static
-   buffer.  */
-
-static char *
-monitor_pid_to_str (struct target_ops *ops, ptid_t ptid)
-{
-  static char buf[64];
-
-  if (ptid_equal (monitor_ptid, ptid))
-    {
-      xsnprintf (buf, sizeof buf, "Thread <main>");
-      return buf;
-    }
-
-  return normal_pid_to_str (ptid);
-}
-
-static struct target_ops monitor_ops;
-
-static void
-init_base_monitor_ops (void)
-{
-  monitor_ops.to_close = monitor_close;
-  monitor_ops.to_detach = monitor_detach;
-  monitor_ops.to_resume = monitor_resume;
-  monitor_ops.to_wait = monitor_wait;
-  monitor_ops.to_fetch_registers = monitor_fetch_registers;
-  monitor_ops.to_store_registers = monitor_store_registers;
-  monitor_ops.to_prepare_to_store = monitor_prepare_to_store;
-  monitor_ops.to_xfer_partial = monitor_xfer_partial;
-  monitor_ops.to_files_info = monitor_files_info;
-  monitor_ops.to_insert_breakpoint = monitor_insert_breakpoint;
-  monitor_ops.to_remove_breakpoint = monitor_remove_breakpoint;
-  monitor_ops.to_kill = monitor_kill;
-  monitor_ops.to_load = monitor_load;
-  monitor_ops.to_create_inferior = monitor_create_inferior;
-  monitor_ops.to_mourn_inferior = monitor_mourn_inferior;
-  monitor_ops.to_stop = monitor_stop;
-  monitor_ops.to_rcmd = monitor_rcmd;
-  monitor_ops.to_log_command = serial_log_command;
-  monitor_ops.to_thread_alive = monitor_thread_alive;
-  monitor_ops.to_pid_to_str = monitor_pid_to_str;
-  monitor_ops.to_stratum = process_stratum;
-  monitor_ops.to_has_all_memory = default_child_has_all_memory;
-  monitor_ops.to_has_memory = default_child_has_memory;
-  monitor_ops.to_has_stack = default_child_has_stack;
-  monitor_ops.to_has_registers = default_child_has_registers;
-  monitor_ops.to_has_execution = default_child_has_execution;
-  monitor_ops.to_magic = OPS_MAGIC;
-}				/* init_base_monitor_ops */
-
-/* Init the target_ops structure pointed at by OPS.  */
-
-void
-init_monitor_ops (struct target_ops *ops)
-{
-  if (monitor_ops.to_magic != OPS_MAGIC)
-    init_base_monitor_ops ();
-
-  memcpy (ops, &monitor_ops, sizeof monitor_ops);
-}
-
-/* Define additional commands that are usually only used by monitors.  */
-
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_remote_monitors;
-
-void
-_initialize_remote_monitors (void)
-{
-  init_base_monitor_ops ();
-  add_setshow_boolean_cmd ("hash", no_class, &hashmark, _("\
-Set display of activity while downloading a file."), _("\
-Show display of activity while downloading a file."), _("\
-When enabled, a hashmark \'#\' is displayed."),
-			   NULL,
-			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
-
-  add_setshow_zuinteger_cmd ("monitor", no_class, &monitor_debug_p, _("\
-Set debugging of remote monitor communication."), _("\
-Show debugging of remote monitor communication."), _("\
-When enabled, communication between GDB and the remote monitor\n\
-is displayed."),
-			     NULL,
-			     NULL, /* FIXME: i18n: */
-			     &setdebuglist, &showdebuglist);
-
-  /* Yes, 42000 is arbitrary.  The only sense out of it, is that it
-     isn't 0.  */
-  monitor_ptid = ptid_build (42000, 0, 42000);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/monitor.h ./gdb/monitor.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/monitor.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/monitor.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,261 +0,0 @@
-/* Definitions for remote debugging interface for ROM monitors.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
-   Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef MONITOR_H
-#define MONITOR_H
-
-struct target_waitstatus;
-struct serial;
-
-/* This structure describes the strings necessary to give small command
-   sequences to the monitor, and parse the response.
-
-   CMD is the actual command typed at the monitor.  Usually this has
-   embedded sequences ala printf, which are substituted with the
-   arguments appropriate to that type of command.  Ie: to examine a
-   register, we substitute the register name for the first arg.  To
-   modify memory, we substitute the memory location and the new
-   contents for the first and second args, etc...
-
-   RESP_DELIM used to home in on the response string, and is used to
-   disambiguate the answer within the pile of text returned by the
-   monitor.  This should be a unique string that immediately precedes
-   the answer.  Ie: if your monitor prints out `PC: 00000001= ' in
-   response to asking for the PC, you should use `: ' as the
-   RESP_DELIM.  RESP_DELIM may be NULL if the res- ponse is going to
-   be ignored, or has no particular leading text.
-
-   TERM is the string that the monitor outputs to indicate that it is
-   idle, and waiting for input.  This is usually a prompt of some
-   sort.  In the previous example, it would be `= '.  It is important
-   that TERM really means that the monitor is idle, otherwise GDB may
-   try to type at it when it isn't ready for input.  This is a problem
-   because many monitors cannot deal with type-ahead.  TERM may be
-   NULL if the normal prompt is output.
-
-   TERM_CMD is used to quit out of the subcommand mode and get back to
-   the main prompt.  TERM_CMD may be NULL if it isn't necessary.  It
-   will also be ignored if TERM is NULL.  */
-
-struct memrw_cmd
-  {
-    char *cmdb;			/* Command to send for byte read/write */
-    char *cmdw;			/* Command for word (16 bit) read/write */
-    char *cmdl;			/* Command for long (32 bit) read/write */
-    char *cmdll;		/* Command for long long (64 bit) read/write */
-    char *resp_delim;		/* String just prior to the desired value */
-    char *term;			/* Terminating string to search for */
-    char *term_cmd;		/* String to get out of sub-mode (if
-				   necessary) */
-  };
-
-struct regrw_cmd
-  {
-    char *cmd;			/* Command to send for reg read/write */
-    char *resp_delim;		/* String (actually a regexp if getmem) just
-				   prior to the desired value */
-    char *term;			/* Terminating string to search for */
-    char *term_cmd;		/* String to get out of sub-mode (if
-				   necessary) */
-  };
-
-struct monitor_ops
-  {
-    int flags;			/* See below */
-    char **init;		/* List of init commands.  NULL terminated.  */
-    char *cont;			/* continue command */
-    char *step;			/* single step */
-    char *stop;			/* Interrupt program string */
-    char *set_break;		/* set a breakpoint.  If NULL, monitor
-				   implementation sets its own
-				   to_insert_breakpoint method.  */
-    char *clr_break;		/* clear a breakpoint */
-    char *clr_all_break;	/* Clear all breakpoints */
-    char *fill;			/* Memory fill cmd (addr len val) */
-    struct memrw_cmd setmem;	/* set memory to a value */
-    struct memrw_cmd getmem;	/* display memory */
-    struct regrw_cmd setreg;	/* set a register */
-    struct regrw_cmd getreg;	/* get a register */
-    /* Some commands can dump a bunch of registers
-       at once.  This comes as a set of REG=VAL
-       pairs.  This should be called for each pair
-       of registers that we can parse to supply
-       GDB with the value of a register.  */
-    char *dump_registers;	/* Command to dump all regs at once */
-    char *register_pattern;	/* Pattern that picks out register
-				   from reg dump */
-    void (*supply_register) (struct regcache *regcache, char *name,
-			     int namelen, char *val, int vallen);
-    int (*dumpregs) (struct regcache *);	/* Dump all registers */
-    int (*continue_hook) (void);	/* Emit the continue command */
-    int (*wait_filter) (char *buf,	/* Maybe contains registers */
-			int bufmax,
-			int *response_length,
-			struct target_waitstatus * status);
-    char *load;			/* load command */
-    char *loadresp;		/* Response to load command */
-    char *prompt;		/* monitor command prompt */
-    char *line_term;		/* end-of-command delimitor */
-    char *cmd_end;		/* optional command terminator */
-    struct target_ops *target;	/* target operations */
-    int stopbits;		/* number of stop bits */
-    char **regnames;		/* array of register names in ascii */
-                                /* deprecated: use regname instead */
-    const char *(*regname) (int index); 
-                                /* function for dynamic regname array */
-    int num_breakpoints;	/* If set_break != NULL, number of supported
-				   breakpoints */
-    int magic;			/* Check value */
-  };
-
-/* The monitor ops magic number, used to detect if an ops structure doesn't
-   have the right number of entries filled in.  */
-
-#define MONITOR_OPS_MAGIC 600925
-
-/* Flag definitions.  */
-
-/* If set, then clear breakpoint command uses address, otherwise it
-   uses an index returned by the monitor.  */
-
-#define MO_CLR_BREAK_USES_ADDR 0x1
-
-/* If set, then memory fill command uses STARTADDR, ENDADDR+1, VALUE
-   as args, else it uses STARTADDR, LENGTH, VALUE as args.  */
-
-#define MO_FILL_USES_ADDR 0x2
-
-/* If set, then monitor doesn't automatically supply register dump
-   when coming back after a continue.  */
-
-#define MO_NEED_REGDUMP_AFTER_CONT 0x4
-
-/* getmem needs start addr and end addr.  */
-
-#define MO_GETMEM_NEEDS_RANGE 0x8
-
-/* getmem can only read one loc at a time.  */
-
-#define MO_GETMEM_READ_SINGLE 0x10
-
-/* handle \r\n combinations.  */
-
-#define MO_HANDLE_NL 0x20
-
-/* don't expect echos in monitor_open.  */
-
-#define MO_NO_ECHO_ON_OPEN 0x40
-
-/* If set, send break to stop monitor.  */
-
-#define MO_SEND_BREAK_ON_STOP 0x80
-
-/* If set, target sends an ACK after each S-record.  */
-
-#define MO_SREC_ACK 0x100
-
-/* Allow 0x prefix on addresses retured from monitor.  */
-
-#define MO_HEX_PREFIX 0x200
-
-/* Some monitors require a different command when starting a program.  */
-
-#define MO_RUN_FIRST_TIME 0x400
-
-/* Don't expect echos when getting memory */
-
-#define MO_NO_ECHO_ON_SETMEM 0x800
-
-/* If set, then register store command expects value BEFORE regname.  */
-
-#define MO_REGISTER_VALUE_FIRST 0x1000
-
-/* If set, then the monitor displays registers as pairs.  */
-
-#define MO_32_REGS_PAIRED 0x2000
-
-/* If set, then register setting happens interactively.  */
-
-#define MO_SETREG_INTERACTIVE 0x4000
-
-/* If set, then memory setting happens interactively.  */
-
-#define MO_SETMEM_INTERACTIVE 0x8000
-
-/* If set, then memory dumps are always on 16-byte boundaries, even
-   when less is desired.  */
-
-#define MO_GETMEM_16_BOUNDARY 0x10000
-
-/* If set, then the monitor numbers its breakpoints starting from 1.  */
-
-#define MO_CLR_BREAK_1_BASED 0x20000
-
-/* If set, then the monitor acks srecords with a plus sign.  */
-
-#define MO_SREC_ACK_PLUS 0x40000
-
-/* If set, then the monitor "acks" srecords with rotating lines.  */
-
-#define MO_SREC_ACK_ROTATE 0x80000
-
-/* If set, then remove useless address bits from memory addresses.  */
-
-#define MO_ADDR_BITS_REMOVE 0x100000
-
-/* If set, then display target program output if prefixed by ^O.  */
-
-#define MO_PRINT_PROGRAM_OUTPUT 0x200000
-
-/* Some dump bytes commands align the first data with the preceding
-   16 byte boundary.  Some print blanks and start at the exactly the
-   requested boundary.  */
-
-#define MO_EXACT_DUMPADDR 0x400000
-
-/* Rather entering and exiting the write memory dialog for each word byte,
-   we can save time by transferring the whole block without exiting
-   the memory editing mode.  You only need to worry about this
-   if you are doing memory downloading.
-   This engages a new write function registered with dcache.  */
-
-#define MO_HAS_BLOCKWRITES 0x800000
-
-#define SREC_SIZE 160
-
-extern void monitor_open (const char *args, struct monitor_ops *ops,
-			  int from_tty);
-extern void monitor_close (struct target_ops *self);
-extern char *monitor_supply_register (struct regcache *regcache,
-				      int regno, char *valstr);
-extern int monitor_expect (char *prompt, char *buf, int buflen);
-extern int monitor_expect_prompt (char *buf, int buflen);
-/* Note: The variable argument functions monitor_printf and
-   monitor_printf_noecho vararg do not take take standard format style
-   arguments.  Instead they take custom formats interpretered directly
-   by monitor_vsprintf.  */
-extern void monitor_printf (char *, ...);
-extern void monitor_printf_noecho (char *, ...);
-extern void monitor_write (char *buf, int buflen);
-extern int monitor_readchar (void);
-extern char *monitor_get_dev_name (void);
-extern void init_monitor_ops (struct target_ops *);
-extern int monitor_dump_reg_block (struct regcache *regcache, char *dump_cmd);
-
-#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/moxie-tdep.c ./gdb/moxie-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/moxie-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/moxie-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Moxie.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,6 +39,7 @@
 #include "record-full.h"
 
 #include "moxie-tdep.h"
+#include <algorithm>
 
 /* Local functions.  */
 
@@ -67,17 +68,9 @@ moxie_frame_align (struct gdbarch *gdbar
   return sp & ~1;
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
+constexpr gdb_byte moxie_break_insn[] = { 0x35, 0x00 };
 
-static const unsigned char *
-moxie_breakpoint_from_pc (struct gdbarch *gdbarch,
-			  CORE_ADDR *pcptr, int *lenptr)
-{
-  static unsigned char breakpoint[] = { 0x35, 0x00 };
-
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+typedef BP_MANIPULATION (moxie_break_insn) moxie_breakpoint;
 
 /* Moxie register names.  */
 
@@ -117,7 +110,7 @@ moxie_register_type (struct gdbarch *gdb
 
 static void
 moxie_store_return_value (struct type *type, struct regcache *regcache,
-			 const void *valbuf)
+			 const gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -129,8 +122,7 @@ moxie_store_return_value (struct type *t
   regcache_cooked_write_unsigned (regcache, RET1_REGNUM, regval);
   if (len > 4)
     {
-      regval = extract_unsigned_integer ((gdb_byte *) valbuf + 4,
-					 len - 4, byte_order);
+      regval = extract_unsigned_integer (valbuf + 4, len - 4, byte_order);
       regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);
     }
 }
@@ -226,7 +218,7 @@ moxie_skip_prologue (struct gdbarch *gdb
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
       else
 	{
 	  /* Can't determine prologue from the symbol table, need to examine
@@ -241,7 +233,7 @@ moxie_skip_prologue (struct gdbarch *gdb
 	  plg_end = moxie_analyze_prologue (func_addr, 
 					    func_end, &cache, gdbarch);
 	  /* Found a function.  */
-	  sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+	  sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
 	  /* Don't use line number debug info for assembly source
 	     files.  */
 	  if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
@@ -307,20 +299,19 @@ moxie_process_readu (CORE_ADDR addr, gdb
 
 /* Insert a single step breakpoint.  */
 
-static int
-moxie_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+moxie_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   CORE_ADDR addr;
   gdb_byte buf[4];
   uint16_t inst;
   uint32_t tmpu32;
   ULONGEST fp;
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct regcache *regcache = get_current_regcache ();
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  addr = get_frame_pc (frame);
+  addr = regcache_read_pc (regcache);
 
   inst = (uint16_t) moxie_process_readu (addr, buf, 2, byte_order);
 
@@ -346,8 +337,9 @@ moxie_software_single_step (struct frame
 	    case 0x09: /* bleu */
 	      /* Insert breaks on both branches, because we can't currently tell
 		 which way things will go.  */
-	      insert_single_step_breakpoint (gdbarch, aspace, addr + 2);
-	      insert_single_step_breakpoint (gdbarch, aspace, addr + 2 + INST2OFFSET(inst));
+	      VEC_safe_push (CORE_ADDR, next_pcs, addr + 2);
+	      VEC_safe_push (CORE_ADDR, next_pcs,
+			     addr + 2 + INST2OFFSET(inst));
 	      break;
 	    default:
 	      {
@@ -359,7 +351,7 @@ moxie_software_single_step (struct frame
       else
 	{
 	  /* This is a Form 2 instruction.  They are all 16 bits.  */
-	  insert_single_step_breakpoint (gdbarch, aspace, addr + 2);
+	  VEC_safe_push (CORE_ADDR, next_pcs, addr + 2);
 	}
     }
   else
@@ -406,7 +398,7 @@ moxie_software_single_step (struct frame
 	case 0x32: /* udiv.l */
 	case 0x33: /* mod.l */
 	case 0x34: /* umod.l */
-	  insert_single_step_breakpoint (gdbarch, aspace, addr + 2);
+	  VEC_safe_push (CORE_ADDR, next_pcs, addr + 2);
 	  break;
 
 	  /* 32-bit instructions.  */
@@ -416,7 +408,7 @@ moxie_software_single_step (struct frame
 	case 0x37: /* sto.b */
 	case 0x38: /* ldo.s */
 	case 0x39: /* sto.s */
-	  insert_single_step_breakpoint (gdbarch, aspace, addr + 4);
+	  VEC_safe_push (CORE_ADDR, next_pcs, addr + 4);
 	  break;
 
 	  /* 48-bit instructions.  */
@@ -429,32 +421,27 @@ moxie_software_single_step (struct frame
 	case 0x20: /* ldi.s (immediate) */
 	case 0x22: /* lda.s */
 	case 0x24: /* sta.s */
-	  insert_single_step_breakpoint (gdbarch, aspace, addr + 6);
+	  VEC_safe_push (CORE_ADDR, next_pcs, addr + 6);
 	  break;
 
 	  /* Control flow instructions.	 */
 	case 0x03: /* jsra */
 	case 0x1a: /* jmpa */
-	  insert_single_step_breakpoint (gdbarch, aspace,
-					 moxie_process_readu (addr + 2,
-							      buf, 4,
-							      byte_order));
+	  VEC_safe_push (CORE_ADDR, next_pcs,
+			 moxie_process_readu (addr + 2, buf, 4, byte_order));
 	  break;
 
 	case 0x04: /* ret */
 	  regcache_cooked_read_unsigned (regcache, MOXIE_FP_REGNUM, &fp);
-	  insert_single_step_breakpoint (gdbarch, aspace,
-					 moxie_process_readu (fp + 4,
-							      buf, 4,
-							      byte_order));
+	  VEC_safe_push (CORE_ADDR, next_pcs,
+			 moxie_process_readu (fp + 4, buf, 4, byte_order));
 	  break;
 
 	case 0x19: /* jsr */
 	case 0x25: /* jmp */
 	  regcache_raw_read (regcache,
 			     (inst >> 4) & 0xf, (gdb_byte *) & tmpu32);
-	  insert_single_step_breakpoint (gdbarch, aspace,
-					 tmpu32);
+	  VEC_safe_push (CORE_ADDR, next_pcs, tmpu32);
 	  break;
 
 	case 0x30: /* swi */
@@ -464,7 +451,7 @@ moxie_software_single_step (struct frame
 	}
     }
 
-  return 1;
+  return next_pcs;
 }
 
 /* Implement the "read_pc" gdbarch method.  */
@@ -499,25 +486,24 @@ moxie_unwind_sp (struct gdbarch *gdbarch
 
 static void
 moxie_extract_return_value (struct type *type, struct regcache *regcache,
-			   void *dst)
+			    gdb_byte *dst)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  bfd_byte *valbuf = dst;
   int len = TYPE_LENGTH (type);
   ULONGEST tmp;
 
   /* By using store_unsigned_integer we avoid having to do
      anything special for small big-endian values.  */
   regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &tmp);
-  store_unsigned_integer (valbuf, (len > 4 ? len - 4 : len), byte_order, tmp);
+  store_unsigned_integer (dst, (len > 4 ? len - 4 : len), byte_order, tmp);
 
   /* Ignore return values more than 8 bytes in size because the moxie
      returns anything more than 8 bytes in the stack.  */
   if (len > 4)
     {
       regcache_cooked_read_unsigned (regcache, RET1_REGNUM + 1, &tmp);
-      store_unsigned_integer (valbuf + len - 4, 4, byte_order, tmp);
+      store_unsigned_integer (dst + len - 4, 4, byte_order, tmp);
     }
 }
 
@@ -570,7 +556,7 @@ moxie_frame_cache (struct frame_info *th
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct moxie_frame_cache *) *this_cache;
 
   cache = moxie_alloc_frame_cache ();
   *this_cache = cache;
@@ -1140,7 +1126,10 @@ moxie_gdbarch_init (struct gdbarch_info 
 
   set_gdbarch_skip_prologue (gdbarch, moxie_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, moxie_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       moxie_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       moxie_breakpoint::bp_from_kind);
   set_gdbarch_frame_align (gdbarch, moxie_frame_align);
 
   frame_base_set_default (gdbarch, &moxie_frame_base);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/moxie-tdep.h ./gdb/moxie-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/moxie-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/moxie-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Moxie
  
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/msp430-tdep.c ./gdb/msp430-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/msp430-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/msp430-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for the Texas Instruments MSP430 for GDB, the
    GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
@@ -248,7 +248,6 @@ msp430_pseudo_register_write (struct gdb
 			      struct regcache *regcache,
 			      int regnum, const gdb_byte *buffer)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   if (MSP430_NUM_REGS <= regnum && regnum < MSP430_NUM_TOTAL_REGS)
 
     {
@@ -278,17 +277,9 @@ msp430_register_sim_regno (struct gdbarc
   return regnum;
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
-
-static const gdb_byte *
-msp430_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			   int *lenptr)
-{
-  static gdb_byte breakpoint[] = { 0x43, 0x43 };
+constexpr gdb_byte msp430_break_insn[] = { 0x43, 0x43 };
 
-  *lenptr = sizeof breakpoint;
-  return breakpoint;
-}
+typedef BP_MANIPULATION (msp430_break_insn) msp430_breakpoint;
 
 /* Define a "handle" struct for fetching the next opcode.  */
 
@@ -306,7 +297,8 @@ struct msp430_get_opcode_byte_handle
 static int
 msp430_get_opcode_byte (void *handle)
 {
-  struct msp430_get_opcode_byte_handle *opcdata = handle;
+  struct msp430_get_opcode_byte_handle *opcdata
+    = (struct msp430_get_opcode_byte_handle *) handle;
   int status;
   gdb_byte byte;
 
@@ -502,10 +494,11 @@ msp430_analyze_frame_prologue (struct fr
 	stop_addr = func_start;
 
       msp430_analyze_prologue (get_frame_arch (this_frame), func_start,
-			       stop_addr, *this_prologue_cache);
+			       stop_addr,
+			       (struct msp430_prologue *) *this_prologue_cache);
     }
 
-  return *this_prologue_cache;
+  return (struct msp430_prologue *) *this_prologue_cache;
 }
 
 /* Given a frame and a prologue cache, return this frame's base.  */
@@ -581,13 +574,9 @@ static const struct frame_unwind msp430_
 static int
 msp430_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
-  if (reg < MSP430_NUM_REGS)
+  if (reg >= 0 && reg < MSP430_NUM_REGS)
     return reg + MSP430_NUM_REGS;
-  else
-    {
-      warning (_("Unmapped DWARF Register #%d encountered."), reg);
-      return -1;
-    }
+  return -1;
 }
 
 /* Implement the "return_value" gdbarch method.  */
@@ -770,10 +759,16 @@ msp430_push_dummy_call (struct gdbarch *
 		  int size = 2;
 
 		  if (code_model == MSP_LARGE_CODE_MODEL
-		      && TYPE_CODE (arg_type) == TYPE_CODE_PTR)
+		      && (TYPE_CODE (arg_type) == TYPE_CODE_PTR
+		          || TYPE_CODE (arg_type) == TYPE_CODE_REF
+			  || TYPE_CODE (arg_type) == TYPE_CODE_STRUCT
+			  || TYPE_CODE (arg_type) == TYPE_CODE_UNION))
 		    {
-		      /* Pointer arguments using large memory model are passed
-		         using entire register.  */
+		      /* When using the large memory model, pointer,
+			 reference, struct, and union arguments are
+			 passed using the entire register.  (As noted
+			 earlier, aggregates are always passed by
+			 reference.) */
 		      if (offset != 0)
 			continue;
 		      size = 4;
@@ -951,7 +946,7 @@ msp430_gdbarch_init (struct gdbarch_info
 
   /* None found, create a new architecture from the information
      provided.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
   tdep->isa = isa;
@@ -998,7 +993,10 @@ msp430_gdbarch_init (struct gdbarch_info
   set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, msp430_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       msp430_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       msp430_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
 
   /* Disassembly.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mt-tdep.c ./gdb/mt-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/mt-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/mt-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Morpho mt processor, for GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -200,7 +200,7 @@ mt_register_name (struct gdbarch *gdbarc
 	array_names[regnum] = stub;
 	return stub;
       }
-    name = xmalloc (30);
+    name = (char *) xmalloc (30);
     sprintf (name, "copro_%d_%d_%s", dim_1, dim_2, stub);
     array_names[regnum] = name;
     return name;
@@ -415,7 +415,7 @@ mt_skip_prologue (struct gdbarch *gdbarc
       struct symbol *sym;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
 	{
 	  /* Don't use this trick for assembly source files.  */
@@ -449,23 +449,32 @@ mt_skip_prologue (struct gdbarch *gdbarc
   return pc;
 }
 
-/* The breakpoint instruction must be the same size as the smallest
-   instruction in the instruction set.
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
-   The BP for ms1 is defined as 0x68000000 (BREAK).
-   The BP for ms2 is defined as 0x69000000 (illegal).  */
+static int
+mt_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  return 4;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
 static const gdb_byte *
-mt_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
-		       int *bp_size)
+mt_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
+  /* The breakpoint instruction must be the same size as the smallest
+     instruction in the instruction set.
+
+     The BP for ms1 is defined as 0x68000000 (BREAK).
+     The BP for ms2 is defined as 0x69000000 (illegal).  */
   static gdb_byte ms1_breakpoint[] = { 0x68, 0, 0, 0 };
   static gdb_byte ms2_breakpoint[] = { 0x69, 0, 0, 0 };
 
-  *bp_size = 4;
+  *size = kind;
+
   if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_ms2)
     return ms2_breakpoint;
-  
+
   return ms1_breakpoint;
 }
 
@@ -676,12 +685,11 @@ mt_registers_info (struct gdbarch *gdbar
 	{
 	  /* Special output handling for 38-bit context register.  */
 	  unsigned char *buff;
-	  unsigned int *bytes, i, regsize;
+	  unsigned int i, regsize;
 
 	  regsize = register_size (gdbarch, regnum);
 
-	  buff = alloca (regsize);
-	  bytes = alloca (regsize * sizeof (*bytes));
+	  buff = (unsigned char *) alloca (regsize);
 
 	  deprecated_frame_register_read (frame, regnum, buff);
 
@@ -704,11 +712,10 @@ mt_registers_info (struct gdbarch *gdbar
                || regnum == MT_COPRO_PSEUDOREG_REGNUM)
 	{
 	  /* Special output handling for the 'coprocessor' register.  */
-	  gdb_byte *buf;
 	  struct value_print_options opts;
+	  struct value *val;
 
-	  buf = alloca (register_size (gdbarch, MT_COPRO_REGNUM));
-	  deprecated_frame_register_read (frame, MT_COPRO_REGNUM, buf);
+	  val = get_frame_register_value (frame, MT_COPRO_REGNUM);
 	  /* And print.  */
 	  regnum = MT_COPRO_PSEUDOREG_REGNUM;
 	  fputs_filtered (gdbarch_register_name (gdbarch, regnum),
@@ -718,8 +725,8 @@ mt_registers_info (struct gdbarch *gdbar
 				 file);
 	  get_no_prettyformat_print_options (&opts);
 	  opts.deref_ref = 1;
-	  val_print (register_type (gdbarch, regnum), buf,
-		     0, 0, file, 0, NULL,
+	  val_print (register_type (gdbarch, regnum),
+		     0, 0, file, 0, val,
 		     &opts, current_language);
 	  fputs_filtered ("\n", file);
 	}
@@ -849,7 +856,7 @@ mt_push_dummy_call (struct gdbarch *gdba
       /* Right-justify the value in an aligned-length buffer.  */
       typelen = TYPE_LENGTH (value_type (args[j]));
       slacklen = (wordsize - (typelen % wordsize)) % wordsize;
-      val = xmalloc (typelen + slacklen);
+      val = (gdb_byte *) xmalloc (typelen + slacklen);
       back_to = make_cleanup (xfree, val);
       memcpy (val, contents, typelen);
       memset (val + typelen, 0, slacklen);
@@ -915,7 +922,7 @@ mt_frame_unwind_cache (struct frame_info
   ULONGEST sp, fp;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct mt_unwind_cache *) (*this_prologue_cache);
 
   gdbarch = get_frame_arch (this_frame);
   info = FRAME_OBSTACK_ZALLOC (struct mt_unwind_cache);
@@ -1163,7 +1170,8 @@ mt_gdbarch_init (struct gdbarch_info inf
   set_gdbarch_pseudo_register_write (gdbarch, mt_pseudo_register_write);
   set_gdbarch_skip_prologue (gdbarch, mt_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, mt_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, mt_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, mt_sw_breakpoint_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_frame_args_skip (gdbarch, 0);
   set_gdbarch_print_insn (gdbarch, print_insn_mt);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/namespace.c ./gdb/namespace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/namespace.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/namespace.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,123 @@
+/* Code dealing with "using" directives for GDB.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "namespace.h"
+
+/* Add a using directive to USING_DIRECTIVES.  If the using directive
+   in question has already been added, don't add it twice.
+
+   Create a new struct using_direct which imports the namespace SRC
+   into the scope DEST.  ALIAS is the name of the imported namespace
+   in the current scope.  If ALIAS is NULL then the namespace is known
+   by its original name.  DECLARATION is the name if the imported
+   varable if this is a declaration import (Eg. using A::x), otherwise
+   it is NULL.  EXCLUDES is a list of names not to import from an
+   imported module or NULL.  If COPY_NAMES is non-zero, then the
+   arguments are copied into newly allocated memory so they can be
+   temporaries.  For EXCLUDES the VEC pointers are copied but the
+   pointed to characters are not copied.  */
+
+void
+add_using_directive (struct using_direct **using_directives,
+		     const char *dest,
+		     const char *src,
+		     const char *alias,
+		     const char *declaration,
+		     VEC (const_char_ptr) *excludes,
+		     int copy_names,
+		     struct obstack *obstack)
+{
+  struct using_direct *current;
+  struct using_direct *newobj;
+  int alloc_len;
+
+  /* Has it already been added?  */
+
+  for (current = *using_directives; current != NULL; current = current->next)
+    {
+      int ix;
+      const char *param;
+
+      if (strcmp (current->import_src, src) != 0)
+	continue;
+      if (strcmp (current->import_dest, dest) != 0)
+	continue;
+      if ((alias == NULL && current->alias != NULL)
+	  || (alias != NULL && current->alias == NULL)
+	  || (alias != NULL && current->alias != NULL
+	      && strcmp (alias, current->alias) != 0))
+	continue;
+      if ((declaration == NULL && current->declaration != NULL)
+	  || (declaration != NULL && current->declaration == NULL)
+	  || (declaration != NULL && current->declaration != NULL
+	      && strcmp (declaration, current->declaration) != 0))
+	continue;
+
+      /* Compare the contents of EXCLUDES.  */
+      for (ix = 0; VEC_iterate (const_char_ptr, excludes, ix, param); ix++)
+	if (current->excludes[ix] == NULL
+	    || strcmp (param, current->excludes[ix]) != 0)
+	  break;
+      if (ix < VEC_length (const_char_ptr, excludes)
+	  || current->excludes[ix] != NULL)
+	continue;
+
+      /* Parameters exactly match CURRENT.  */
+      return;
+    }
+
+  alloc_len = (sizeof(*newobj)
+	       + (VEC_length (const_char_ptr, excludes)
+		  * sizeof(*newobj->excludes)));
+  newobj = (struct using_direct *) obstack_alloc (obstack, alloc_len);
+  memset (newobj, 0, sizeof (*newobj));
+
+  if (copy_names)
+    {
+      newobj->import_src
+	= (const char *) obstack_copy0 (obstack, src, strlen (src));
+      newobj->import_dest
+	= (const char *) obstack_copy0 (obstack, dest, strlen (dest));
+    }
+  else
+    {
+      newobj->import_src = src;
+      newobj->import_dest = dest;
+    }
+
+  if (alias != NULL && copy_names)
+    newobj->alias
+      = (const char *) obstack_copy0 (obstack, alias, strlen (alias));
+  else
+    newobj->alias = alias;
+
+  if (declaration != NULL && copy_names)
+    newobj->declaration
+      = (const char *) obstack_copy0 (obstack, declaration,
+				      strlen (declaration));
+  else
+    newobj->declaration = declaration;
+
+  memcpy (newobj->excludes, VEC_address (const_char_ptr, excludes),
+	  VEC_length (const_char_ptr, excludes) * sizeof (*newobj->excludes));
+  newobj->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
+
+  newobj->next = *using_directives;
+  *using_directives = newobj;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/namespace.h ./gdb/namespace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/namespace.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/namespace.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,118 @@
+/* Code dealing with "using" directives for GDB.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef NAMESPACE_H
+#define NAMESPACE_H
+
+#include "vec.h"
+#include "gdb_vecs.h"
+#include "gdb_obstack.h"
+
+/* This struct is designed to store data from using directives.  It
+   says that names from namespace IMPORT_SRC should be visible within
+   namespace IMPORT_DEST.  These form a linked list; NEXT is the next
+   element of the list.  If the imported namespace or declaration has
+   been aliased within the IMPORT_DEST namespace, ALIAS is set to a
+   string representing the alias.  Otherwise, ALIAS is NULL.
+   DECLARATION is the name of the imported declaration, if this import
+   statement represents one.  Otherwise DECLARATION is NULL and this
+   import statement represents a namespace.
+
+   C++:      using namespace A;
+   Fortran:  use A
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = NULL
+   declaration = NULL
+   excludes = NULL
+
+   C++:      using A::x;
+   Fortran:  use A, only: x
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = NULL
+   declaration = "x"
+   excludes = NULL
+   The declaration will get imported as import_dest::x.
+
+   C++ has no way to import all names except those listed ones.
+   Fortran:  use A, localname => x
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = "localname"
+   declaration = "x"
+   excludes = NULL
+   +
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = NULL
+   declaration = NULL
+   excludes = ["x"]
+   All the entries of A get imported except of "x".  "x" gets imported as
+   "localname".  "x" is not defined as a local name by this statement.
+
+   C++:      namespace LOCALNS = A;
+   Fortran has no way to address non-local namespace/module.
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = "LOCALNS"
+   declaration = NULL
+   excludes = NULL
+   The namespace will get imported as the import_dest::LOCALNS
+   namespace.
+
+   C++ cannot express it, it would be something like: using localname
+   = A::x;
+   Fortran:  use A, only localname => x
+   import_src = "A"
+   import_dest = local scope of the import statement even such as ""
+   alias = "localname"
+   declaration = "x"
+   excludes = NULL
+   The declaration will get imported as localname or
+   `import_dest`localname.  */
+
+struct using_direct
+{
+  const char *import_src;
+  const char *import_dest;
+
+  const char *alias;
+  const char *declaration;
+
+  struct using_direct *next;
+
+  /* Used during import search to temporarily mark this node as
+     searched.  */
+  int searched;
+
+  /* USING_DIRECT has variable allocation size according to the number of
+     EXCLUDES entries, the last entry is NULL.  */
+  const char *excludes[1];
+};
+
+extern void add_using_directive (struct using_direct **using_directives,
+				 const char *dest,
+				 const char *src,
+				 const char *alias,
+				 const char *declaration,
+				 VEC (const_char_ptr) *excludes,
+				 int copy_names,
+                                 struct obstack *obstack);
+
+#endif /* NAMESPACE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux.c ./gdb/nat/aarch64-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/aarch64-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,239 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "break-common.h"
+#include "nat/linux-nat.h"
+#include "nat/aarch64-linux-hw-point.h"
+#include "nat/aarch64-linux.h"
+
+#include "elf/common.h"
+#include "nat/gdb_ptrace.h"
+#include <asm/ptrace.h>
+#include <sys/uio.h>
+
+/* Called when resuming a thread LWP.
+   The hardware debug registers are updated when there is any change.  */
+
+void
+aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
+{
+  struct arch_lwp_info *info = lwp_arch_private_info (lwp);
+
+  /* NULL means this is the main thread still going through the shell,
+     or, no watchpoint has been set yet.  In that case, there's
+     nothing to do.  */
+  if (info == NULL)
+    return;
+
+  if (DR_HAS_CHANGED (info->dr_changed_bp)
+      || DR_HAS_CHANGED (info->dr_changed_wp))
+    {
+      ptid_t ptid = ptid_of_lwp (lwp);
+      int tid = ptid_get_lwp (ptid);
+      struct aarch64_debug_reg_state *state
+	= aarch64_get_debug_reg_state (ptid_get_pid (ptid));
+
+      if (show_debug_regs)
+	debug_printf ("prepare_to_resume thread %d\n", tid);
+
+      /* Watchpoints.  */
+      if (DR_HAS_CHANGED (info->dr_changed_wp))
+	{
+	  aarch64_linux_set_debug_regs (state, tid, 1);
+	  DR_CLEAR_CHANGED (info->dr_changed_wp);
+	}
+
+      /* Breakpoints.  */
+      if (DR_HAS_CHANGED (info->dr_changed_bp))
+	{
+	  aarch64_linux_set_debug_regs (state, tid, 0);
+	  DR_CLEAR_CHANGED (info->dr_changed_bp);
+	}
+    }
+}
+
+/* Function to call when a new thread is detected.  */
+
+void
+aarch64_linux_new_thread (struct lwp_info *lwp)
+{
+  struct arch_lwp_info *info = XNEW (struct arch_lwp_info);
+
+  /* Mark that all the hardware breakpoint/watchpoint register pairs
+     for this thread need to be initialized (with data from
+     aarch_process_info.debug_reg_state).  */
+  DR_MARK_ALL_CHANGED (info->dr_changed_bp, aarch64_num_bp_regs);
+  DR_MARK_ALL_CHANGED (info->dr_changed_wp, aarch64_num_wp_regs);
+
+  lwp_set_arch_private_info (lwp, info);
+}
+
+/* Convert native siginfo FROM to the siginfo in the layout of the
+   inferior's architecture TO.  */
+
+void
+aarch64_compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
+{
+  memset (to, 0, sizeof (*to));
+
+  to->si_signo = from->si_signo;
+  to->si_errno = from->si_errno;
+  to->si_code = from->si_code;
+
+  if (to->si_code == SI_TIMER)
+    {
+      to->cpt_si_timerid = from->si_timerid;
+      to->cpt_si_overrun = from->si_overrun;
+      to->cpt_si_ptr = (intptr_t) from->si_ptr;
+    }
+  else if (to->si_code == SI_USER)
+    {
+      to->cpt_si_pid = from->si_pid;
+      to->cpt_si_uid = from->si_uid;
+    }
+  else if (to->si_code < 0)
+    {
+      to->cpt_si_pid = from->si_pid;
+      to->cpt_si_uid = from->si_uid;
+      to->cpt_si_ptr = (intptr_t) from->si_ptr;
+    }
+  else
+    {
+      switch (to->si_signo)
+	{
+	case SIGCHLD:
+	  to->cpt_si_pid = from->si_pid;
+	  to->cpt_si_uid = from->si_uid;
+	  to->cpt_si_status = from->si_status;
+	  to->cpt_si_utime = from->si_utime;
+	  to->cpt_si_stime = from->si_stime;
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to->cpt_si_addr = (intptr_t) from->si_addr;
+	  break;
+	case SIGPOLL:
+	  to->cpt_si_band = from->si_band;
+	  to->cpt_si_fd = from->si_fd;
+	  break;
+	default:
+	  to->cpt_si_pid = from->si_pid;
+	  to->cpt_si_uid = from->si_uid;
+	  to->cpt_si_ptr = (intptr_t) from->si_ptr;
+	  break;
+	}
+    }
+}
+
+/* Convert inferior's architecture siginfo FROM to native siginfo TO.  */
+
+void
+aarch64_siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
+{
+  memset (to, 0, sizeof (*to));
+
+  to->si_signo = from->si_signo;
+  to->si_errno = from->si_errno;
+  to->si_code = from->si_code;
+
+  if (to->si_code == SI_TIMER)
+    {
+      to->si_timerid = from->cpt_si_timerid;
+      to->si_overrun = from->cpt_si_overrun;
+      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
+    }
+  else if (to->si_code == SI_USER)
+    {
+      to->si_pid = from->cpt_si_pid;
+      to->si_uid = from->cpt_si_uid;
+    }
+  if (to->si_code < 0)
+    {
+      to->si_pid = from->cpt_si_pid;
+      to->si_uid = from->cpt_si_uid;
+      to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
+    }
+  else
+    {
+      switch (to->si_signo)
+	{
+	case SIGCHLD:
+	  to->si_pid = from->cpt_si_pid;
+	  to->si_uid = from->cpt_si_uid;
+	  to->si_status = from->cpt_si_status;
+	  to->si_utime = from->cpt_si_utime;
+	  to->si_stime = from->cpt_si_stime;
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to->si_addr = (void *) (intptr_t) from->cpt_si_addr;
+	  break;
+	case SIGPOLL:
+	  to->si_band = from->cpt_si_band;
+	  to->si_fd = from->cpt_si_fd;
+	  break;
+	default:
+	  to->si_pid = from->cpt_si_pid;
+	  to->si_uid = from->cpt_si_uid;
+	  to->si_ptr = (void* ) (intptr_t) from->cpt_si_ptr;
+	  break;
+	}
+    }
+}
+
+/* Called by libthread_db.  Returns a pointer to the thread local
+   storage (or its descriptor).  */
+
+ps_err_e
+aarch64_ps_get_thread_area (struct ps_prochandle *ph,
+			    lwpid_t lwpid, int idx, void **base,
+			    int is_64bit_p)
+{
+  struct iovec iovec;
+  uint64_t reg64;
+  uint32_t reg32;
+
+  if (is_64bit_p)
+    {
+      iovec.iov_base = &reg64;
+      iovec.iov_len = sizeof (reg64);
+    }
+  else
+    {
+      iovec.iov_base = &reg32;
+      iovec.iov_len = sizeof (reg32);
+    }
+
+  if (ptrace (PTRACE_GETREGSET, lwpid, NT_ARM_TLS, &iovec) != 0)
+    return PS_ERR;
+
+  /* IDX is the bias from the thread pointer to the beginning of the
+     thread descriptor.  It has to be subtracted due to implementation
+     quirks in libthread_db.  */
+  if (is_64bit_p)
+    *base = (void *) (reg64 - idx);
+  else
+    *base = (void *) (uintptr_t) (reg32 - idx);
+
+  return PS_OK;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux.h ./gdb/nat/aarch64-linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/aarch64-linux.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,129 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef AARCH64_LINUX_H
+#define AARCH64_LINUX_H 1
+
+#include <signal.h>
+
+/* Defines ps_err_e, struct ps_prochandle.  */
+#include "gdb_proc_service.h"
+
+typedef int compat_int_t;
+typedef unsigned int compat_uptr_t;
+
+typedef int compat_time_t;
+typedef int compat_timer_t;
+typedef int compat_clock_t;
+
+struct compat_timeval
+{
+  compat_time_t tv_sec;
+  int tv_usec;
+};
+
+typedef union compat_sigval
+{
+  compat_int_t sival_int;
+  compat_uptr_t sival_ptr;
+} compat_sigval_t;
+
+typedef struct compat_siginfo
+{
+  int si_signo;
+  int si_errno;
+  int si_code;
+
+  union
+  {
+    int _pad[((128 / sizeof (int)) - 3)];
+
+    /* kill() */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+    } _kill;
+
+    /* POSIX.1b timers */
+    struct
+    {
+      compat_timer_t _tid;
+      int _overrun;
+      compat_sigval_t _sigval;
+    } _timer;
+
+    /* POSIX.1b signals */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      compat_sigval_t _sigval;
+    } _rt;
+
+    /* SIGCHLD */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      int _status;
+      compat_clock_t _utime;
+      compat_clock_t _stime;
+    } _sigchld;
+
+    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+    struct
+    {
+      unsigned int _addr;
+    } _sigfault;
+
+    /* SIGPOLL */
+    struct
+    {
+      int _band;
+      int _fd;
+    } _sigpoll;
+  } _sifields;
+} compat_siginfo_t;
+
+#define cpt_si_pid _sifields._kill._pid
+#define cpt_si_uid _sifields._kill._uid
+#define cpt_si_timerid _sifields._timer._tid
+#define cpt_si_overrun _sifields._timer._overrun
+#define cpt_si_status _sifields._sigchld._status
+#define cpt_si_utime _sifields._sigchld._utime
+#define cpt_si_stime _sifields._sigchld._stime
+#define cpt_si_ptr _sifields._rt._sigval.sival_ptr
+#define cpt_si_addr _sifields._sigfault._addr
+#define cpt_si_band _sifields._sigpoll._band
+#define cpt_si_fd _sifields._sigpoll._fd
+
+void aarch64_siginfo_from_compat_siginfo (siginfo_t *to,
+					    compat_siginfo_t *from);
+void aarch64_compat_siginfo_from_siginfo (compat_siginfo_t *to,
+					    siginfo_t *from);
+
+void aarch64_linux_prepare_to_resume (struct lwp_info *lwp);
+
+void aarch64_linux_new_thread (struct lwp_info *lwp);
+
+ps_err_e aarch64_ps_get_thread_area (struct ps_prochandle *ph,
+				       lwpid_t lwpid, int idx, void **base,
+				       int is_64bit_p);
+
+#endif /* AARCH64_LINUX_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux-hw-point.c ./gdb/nat/aarch64-linux-hw-point.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux-hw-point.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/aarch64-linux-hw-point.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,714 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "common-defs.h"
+#include "break-common.h"
+#include "common-regcache.h"
+#include "nat/linux-nat.h"
+#include "aarch64-linux-hw-point.h"
+
+#include <sys/uio.h>
+#include <asm/ptrace.h>
+#include <sys/ptrace.h>
+#include <elf.h>
+
+/* Number of hardware breakpoints/watchpoints the target supports.
+   They are initialized with values obtained via the ptrace calls
+   with NT_ARM_HW_BREAK and NT_ARM_HW_WATCH respectively.  */
+
+int aarch64_num_bp_regs;
+int aarch64_num_wp_regs;
+
+/* Utility function that returns the length in bytes of a watchpoint
+   according to the content of a hardware debug control register CTRL.
+   Note that the kernel currently only supports the following Byte
+   Address Select (BAS) values: 0x1, 0x3, 0xf and 0xff, which means
+   that for a hardware watchpoint, its valid length can only be 1
+   byte, 2 bytes, 4 bytes or 8 bytes.  */
+
+unsigned int
+aarch64_watchpoint_length (unsigned int ctrl)
+{
+  switch (DR_CONTROL_LENGTH (ctrl))
+    {
+    case 0x01:
+      return 1;
+    case 0x03:
+      return 2;
+    case 0x0f:
+      return 4;
+    case 0xff:
+      return 8;
+    default:
+      return 0;
+    }
+}
+
+/* Given the hardware breakpoint or watchpoint type TYPE and its
+   length LEN, return the expected encoding for a hardware
+   breakpoint/watchpoint control register.  */
+
+static unsigned int
+aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len)
+{
+  unsigned int ctrl, ttype;
+
+  /* type */
+  switch (type)
+    {
+    case hw_write:
+      ttype = 2;
+      break;
+    case hw_read:
+      ttype = 1;
+      break;
+    case hw_access:
+      ttype = 3;
+      break;
+    case hw_execute:
+      ttype = 0;
+      break;
+    default:
+      perror_with_name (_("Unrecognized breakpoint/watchpoint type"));
+    }
+
+  ctrl = ttype << 3;
+
+  /* length bitmask */
+  ctrl |= ((1 << len) - 1) << 5;
+  /* enabled at el0 */
+  ctrl |= (2 << 1) | 1;
+
+  return ctrl;
+}
+
+/* Addresses to be written to the hardware breakpoint and watchpoint
+   value registers need to be aligned; the alignment is 4-byte and
+   8-type respectively.  Linux kernel rejects any non-aligned address
+   it receives from the related ptrace call.  Furthermore, the kernel
+   currently only supports the following Byte Address Select (BAS)
+   values: 0x1, 0x3, 0xf and 0xff, which means that for a hardware
+   watchpoint to be accepted by the kernel (via ptrace call), its
+   valid length can only be 1 byte, 2 bytes, 4 bytes or 8 bytes.
+   Despite these limitations, the unaligned watchpoint is supported in
+   this port.
+
+   Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise.  */
+
+static int
+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
+{
+  unsigned int alignment = 0;
+
+  if (is_watchpoint)
+    alignment = AARCH64_HWP_ALIGNMENT;
+  else
+    {
+      struct regcache *regcache
+	= get_thread_regcache_for_ptid (current_lwp_ptid ());
+
+      /* Set alignment to 2 only if the current process is 32-bit,
+	 since thumb instruction can be 2-byte aligned.  Otherwise, set
+	 alignment to AARCH64_HBP_ALIGNMENT.  */
+      if (regcache_register_size (regcache, 0) == 8)
+	alignment = AARCH64_HBP_ALIGNMENT;
+      else
+	alignment = 2;
+    }
+
+  if (addr & (alignment - 1))
+    return 0;
+
+  if (len != 8 && len != 4 && len != 2 && len != 1)
+    return 0;
+
+  return 1;
+}
+
+/* Given the (potentially unaligned) watchpoint address in ADDR and
+   length in LEN, return the aligned address and aligned length in
+   *ALIGNED_ADDR_P and *ALIGNED_LEN_P, respectively.  The returned
+   aligned address and length will be valid values to write to the
+   hardware watchpoint value and control registers.
+
+   The given watchpoint may get truncated if more than one hardware
+   register is needed to cover the watched region.  *NEXT_ADDR_P
+   and *NEXT_LEN_P, if non-NULL, will return the address and length
+   of the remaining part of the watchpoint (which can be processed
+   by calling this routine again to generate another aligned address
+   and length pair.
+
+   Essentially, unaligned watchpoint is achieved by minimally
+   enlarging the watched area to meet the alignment requirement, and
+   if necessary, splitting the watchpoint over several hardware
+   watchpoint registers.  The trade-off is that there will be
+   false-positive hits for the read-type or the access-type hardware
+   watchpoints; for the write type, which is more commonly used, there
+   will be no such issues, as the higher-level breakpoint management
+   in gdb always examines the exact watched region for any content
+   change, and transparently resumes a thread from a watchpoint trap
+   if there is no change to the watched region.
+
+   Another limitation is that because the watched region is enlarged,
+   the watchpoint fault address returned by
+   aarch64_stopped_data_address may be outside of the original watched
+   region, especially when the triggering instruction is accessing a
+   larger region.  When the fault address is not within any known
+   range, watchpoints_triggered in gdb will get confused, as the
+   higher-level watchpoint management is only aware of original
+   watched regions, and will think that some unknown watchpoint has
+   been triggered.  In such a case, gdb may stop without displaying
+   any detailed information.
+
+   Once the kernel provides the full support for Byte Address Select
+   (BAS) in the hardware watchpoint control register, these
+   limitations can be largely relaxed with some further work.  */
+
+static void
+aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
+			  int *aligned_len_p, CORE_ADDR *next_addr_p,
+			  int *next_len_p)
+{
+  int aligned_len;
+  unsigned int offset;
+  CORE_ADDR aligned_addr;
+  const unsigned int alignment = AARCH64_HWP_ALIGNMENT;
+  const unsigned int max_wp_len = AARCH64_HWP_MAX_LEN_PER_REG;
+
+  /* As assumed by the algorithm.  */
+  gdb_assert (alignment == max_wp_len);
+
+  if (len <= 0)
+    return;
+
+  /* Address to be put into the hardware watchpoint value register
+     must be aligned.  */
+  offset = addr & (alignment - 1);
+  aligned_addr = addr - offset;
+
+  gdb_assert (offset >= 0 && offset < alignment);
+  gdb_assert (aligned_addr >= 0 && aligned_addr <= addr);
+  gdb_assert (offset + len > 0);
+
+  if (offset + len >= max_wp_len)
+    {
+      /* Need more than one watchpoint registers; truncate it at the
+	 alignment boundary.  */
+      aligned_len = max_wp_len;
+      len -= (max_wp_len - offset);
+      addr += (max_wp_len - offset);
+      gdb_assert ((addr & (alignment - 1)) == 0);
+    }
+  else
+    {
+      /* Find the smallest valid length that is large enough to
+	 accommodate this watchpoint.  */
+      static const unsigned char
+	aligned_len_array[AARCH64_HWP_MAX_LEN_PER_REG] =
+	{ 1, 2, 4, 4, 8, 8, 8, 8 };
+
+      aligned_len = aligned_len_array[offset + len - 1];
+      addr += len;
+      len = 0;
+    }
+
+  if (aligned_addr_p)
+    *aligned_addr_p = aligned_addr;
+  if (aligned_len_p)
+    *aligned_len_p = aligned_len;
+  if (next_addr_p)
+    *next_addr_p = addr;
+  if (next_len_p)
+    *next_len_p = len;
+}
+
+struct aarch64_dr_update_callback_param
+{
+  int is_watchpoint;
+  unsigned int idx;
+};
+
+/* Callback for iterate_over_lwps.  Records the
+   information about the change of one hardware breakpoint/watchpoint
+   setting for the thread LWP.
+   The information is passed in via PTR.
+   N.B.  The actual updating of hardware debug registers is not
+   carried out until the moment the thread is resumed.  */
+
+static int
+debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
+{
+  struct aarch64_dr_update_callback_param *param_p
+    = (struct aarch64_dr_update_callback_param *) ptr;
+  int tid = ptid_get_lwp (ptid_of_lwp (lwp));
+  int idx = param_p->idx;
+  int is_watchpoint = param_p->is_watchpoint;
+  struct arch_lwp_info *info = lwp_arch_private_info (lwp);
+  dr_changed_t *dr_changed_ptr;
+  dr_changed_t dr_changed;
+
+  if (info == NULL)
+    {
+      info = XCNEW (struct arch_lwp_info);
+      lwp_set_arch_private_info (lwp, info);
+    }
+
+  if (show_debug_regs)
+    {
+      debug_printf ("debug_reg_change_callback: \n\tOn entry:\n");
+      debug_printf ("\ttid%d, dr_changed_bp=0x%s, "
+		    "dr_changed_wp=0x%s\n", tid,
+		    phex (info->dr_changed_bp, 8),
+		    phex (info->dr_changed_wp, 8));
+    }
+
+  dr_changed_ptr = is_watchpoint ? &info->dr_changed_wp
+    : &info->dr_changed_bp;
+  dr_changed = *dr_changed_ptr;
+
+  gdb_assert (idx >= 0
+	      && (idx <= (is_watchpoint ? aarch64_num_wp_regs
+			  : aarch64_num_bp_regs)));
+
+  /* The actual update is done later just before resuming the lwp,
+     we just mark that one register pair needs updating.  */
+  DR_MARK_N_CHANGED (dr_changed, idx);
+  *dr_changed_ptr = dr_changed;
+
+  /* If the lwp isn't stopped, force it to momentarily pause, so
+     we can update its debug registers.  */
+  if (!lwp_is_stopped (lwp))
+    linux_stop_lwp (lwp);
+
+  if (show_debug_regs)
+    {
+      debug_printf ("\tOn exit:\n\ttid%d, dr_changed_bp=0x%s, "
+		    "dr_changed_wp=0x%s\n", tid,
+		    phex (info->dr_changed_bp, 8),
+		    phex (info->dr_changed_wp, 8));
+    }
+
+  return 0;
+}
+
+/* Notify each thread that their IDXth breakpoint/watchpoint register
+   pair needs to be updated.  The message will be recorded in each
+   thread's arch-specific data area, the actual updating will be done
+   when the thread is resumed.  */
+
+static void
+aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state,
+				 int is_watchpoint, unsigned int idx)
+{
+  struct aarch64_dr_update_callback_param param;
+  ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ()));
+
+  param.is_watchpoint = is_watchpoint;
+  param.idx = idx;
+
+  iterate_over_lwps (pid_ptid, debug_reg_change_callback, (void *) &param);
+}
+
+/* Record the insertion of one breakpoint/watchpoint, as represented
+   by ADDR and CTRL, in the process' arch-specific data area *STATE.  */
+
+static int
+aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state,
+				   enum target_hw_bp_type type,
+				   CORE_ADDR addr, int len)
+{
+  int i, idx, num_regs, is_watchpoint;
+  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
+  CORE_ADDR *dr_addr_p;
+
+  /* Set up state pointers.  */
+  is_watchpoint = (type != hw_execute);
+  gdb_assert (aarch64_point_is_aligned (is_watchpoint, addr, len));
+  if (is_watchpoint)
+    {
+      num_regs = aarch64_num_wp_regs;
+      dr_addr_p = state->dr_addr_wp;
+      dr_ctrl_p = state->dr_ctrl_wp;
+      dr_ref_count = state->dr_ref_count_wp;
+    }
+  else
+    {
+      num_regs = aarch64_num_bp_regs;
+      dr_addr_p = state->dr_addr_bp;
+      dr_ctrl_p = state->dr_ctrl_bp;
+      dr_ref_count = state->dr_ref_count_bp;
+    }
+
+  ctrl = aarch64_point_encode_ctrl_reg (type, len);
+
+  /* Find an existing or free register in our cache.  */
+  idx = -1;
+  for (i = 0; i < num_regs; ++i)
+    {
+      if ((dr_ctrl_p[i] & 1) == 0)
+	{
+	  gdb_assert (dr_ref_count[i] == 0);
+	  idx = i;
+	  /* no break; continue hunting for an exising one.  */
+	}
+      else if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
+	{
+	  gdb_assert (dr_ref_count[i] != 0);
+	  idx = i;
+	  break;
+	}
+    }
+
+  /* No space.  */
+  if (idx == -1)
+    return -1;
+
+  /* Update our cache.  */
+  if ((dr_ctrl_p[idx] & 1) == 0)
+    {
+      /* new entry */
+      dr_addr_p[idx] = addr;
+      dr_ctrl_p[idx] = ctrl;
+      dr_ref_count[idx] = 1;
+      /* Notify the change.  */
+      aarch64_notify_debug_reg_change (state, is_watchpoint, idx);
+    }
+  else
+    {
+      /* existing entry */
+      dr_ref_count[idx]++;
+    }
+
+  return 0;
+}
+
+/* Record the removal of one breakpoint/watchpoint, as represented by
+   ADDR and CTRL, in the process' arch-specific data area *STATE.  */
+
+static int
+aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state,
+				   enum target_hw_bp_type type,
+				   CORE_ADDR addr, int len)
+{
+  int i, num_regs, is_watchpoint;
+  unsigned int ctrl, *dr_ctrl_p, *dr_ref_count;
+  CORE_ADDR *dr_addr_p;
+
+  /* Set up state pointers.  */
+  is_watchpoint = (type != hw_execute);
+  if (is_watchpoint)
+    {
+      num_regs = aarch64_num_wp_regs;
+      dr_addr_p = state->dr_addr_wp;
+      dr_ctrl_p = state->dr_ctrl_wp;
+      dr_ref_count = state->dr_ref_count_wp;
+    }
+  else
+    {
+      num_regs = aarch64_num_bp_regs;
+      dr_addr_p = state->dr_addr_bp;
+      dr_ctrl_p = state->dr_ctrl_bp;
+      dr_ref_count = state->dr_ref_count_bp;
+    }
+
+  ctrl = aarch64_point_encode_ctrl_reg (type, len);
+
+  /* Find the entry that matches the ADDR and CTRL.  */
+  for (i = 0; i < num_regs; ++i)
+    if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl)
+      {
+	gdb_assert (dr_ref_count[i] != 0);
+	break;
+      }
+
+  /* Not found.  */
+  if (i == num_regs)
+    return -1;
+
+  /* Clear our cache.  */
+  if (--dr_ref_count[i] == 0)
+    {
+      /* Clear the enable bit.  */
+      ctrl &= ~1;
+      dr_addr_p[i] = 0;
+      dr_ctrl_p[i] = ctrl;
+      /* Notify the change.  */
+      aarch64_notify_debug_reg_change (state, is_watchpoint, i);
+    }
+
+  return 0;
+}
+
+int
+aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
+			   int len, int is_insert,
+			   struct aarch64_debug_reg_state *state)
+{
+  if (is_insert)
+    {
+      /* The hardware breakpoint on AArch64 should always be 4-byte
+	 aligned, but on AArch32, it can be 2-byte aligned.  Note that
+	 we only check the alignment on inserting breakpoint because
+	 aarch64_point_is_aligned needs the inferior_ptid inferior's
+	 regcache to decide whether the inferior is 32-bit or 64-bit.
+	 However when GDB follows the parent process and detach breakpoints
+	 from child process, inferior_ptid is the child ptid, but the
+	 child inferior doesn't exist in GDB's view yet.  */
+      if (!aarch64_point_is_aligned (0 /* is_watchpoint */ , addr, len))
+	return -1;
+
+      return aarch64_dr_state_insert_one_point (state, type, addr, len);
+    }
+  else
+    return aarch64_dr_state_remove_one_point (state, type, addr, len);
+}
+
+/* This is essentially the same as aarch64_handle_breakpoint, apart
+   from that it is an aligned watchpoint to be handled.  */
+
+static int
+aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type,
+				   CORE_ADDR addr, int len, int is_insert,
+				   struct aarch64_debug_reg_state *state)
+{
+  if (is_insert)
+    return aarch64_dr_state_insert_one_point (state, type, addr, len);
+  else
+    return aarch64_dr_state_remove_one_point (state, type, addr, len);
+}
+
+/* Insert/remove unaligned watchpoint by calling
+   aarch64_align_watchpoint repeatedly until the whole watched region,
+   as represented by ADDR and LEN, has been properly aligned and ready
+   to be written to one or more hardware watchpoint registers.
+   IS_INSERT indicates whether this is an insertion or a deletion.
+   Return 0 if succeed.  */
+
+static int
+aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
+				     CORE_ADDR addr, int len, int is_insert,
+				     struct aarch64_debug_reg_state *state)
+{
+  while (len > 0)
+    {
+      CORE_ADDR aligned_addr;
+      int aligned_len, ret;
+
+      aarch64_align_watchpoint (addr, len, &aligned_addr, &aligned_len,
+				&addr, &len);
+
+      if (is_insert)
+	ret = aarch64_dr_state_insert_one_point (state, type, aligned_addr,
+						 aligned_len);
+      else
+	ret = aarch64_dr_state_remove_one_point (state, type, aligned_addr,
+						 aligned_len);
+
+      if (show_debug_regs)
+	debug_printf ("handle_unaligned_watchpoint: is_insert: %d\n"
+		      "                             "
+		      "aligned_addr: %s, aligned_len: %d\n"
+		      "                                "
+		      "next_addr: %s,    next_len: %d\n",
+		      is_insert, core_addr_to_string_nz (aligned_addr),
+		      aligned_len, core_addr_to_string_nz (addr), len);
+
+      if (ret != 0)
+	return ret;
+    }
+
+  return 0;
+}
+
+int
+aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
+			   int len, int is_insert,
+			   struct aarch64_debug_reg_state *state)
+{
+  if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
+    return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert,
+					      state);
+  else
+    return aarch64_handle_unaligned_watchpoint (type, addr, len, is_insert,
+						state);
+}
+
+/* Call ptrace to set the thread TID's hardware breakpoint/watchpoint
+   registers with data from *STATE.  */
+
+void
+aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
+			      int tid, int watchpoint)
+{
+  int i, count;
+  struct iovec iov;
+  struct user_hwdebug_state regs;
+  const CORE_ADDR *addr;
+  const unsigned int *ctrl;
+
+  memset (&regs, 0, sizeof (regs));
+  iov.iov_base = &regs;
+  count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;
+  addr = watchpoint ? state->dr_addr_wp : state->dr_addr_bp;
+  ctrl = watchpoint ? state->dr_ctrl_wp : state->dr_ctrl_bp;
+  if (count == 0)
+    return;
+  iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs)
+		 + count * sizeof (regs.dbg_regs[0]));
+
+  for (i = 0; i < count; i++)
+    {
+      regs.dbg_regs[i].addr = addr[i];
+      regs.dbg_regs[i].ctrl = ctrl[i];
+    }
+
+  if (ptrace (PTRACE_SETREGSET, tid,
+	      watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK,
+	      (void *) &iov))
+    error (_("Unexpected error setting hardware debug registers"));
+}
+
+/* Print the values of the cached breakpoint/watchpoint registers.  */
+
+void
+aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
+			      const char *func, CORE_ADDR addr,
+			      int len, enum target_hw_bp_type type)
+{
+  int i;
+
+  debug_printf ("%s", func);
+  if (addr || len)
+    debug_printf (" (addr=0x%08lx, len=%d, type=%s)",
+		  (unsigned long) addr, len,
+		  type == hw_write ? "hw-write-watchpoint"
+		  : (type == hw_read ? "hw-read-watchpoint"
+		     : (type == hw_access ? "hw-access-watchpoint"
+			: (type == hw_execute ? "hw-breakpoint"
+			   : "??unknown??"))));
+  debug_printf (":\n");
+
+  debug_printf ("\tBREAKPOINTs:\n");
+  for (i = 0; i < aarch64_num_bp_regs; i++)
+    debug_printf ("\tBP%d: addr=%s, ctrl=0x%08x, ref.count=%d\n",
+		  i, core_addr_to_string_nz (state->dr_addr_bp[i]),
+		  state->dr_ctrl_bp[i], state->dr_ref_count_bp[i]);
+
+  debug_printf ("\tWATCHPOINTs:\n");
+  for (i = 0; i < aarch64_num_wp_regs; i++)
+    debug_printf ("\tWP%d: addr=%s, ctrl=0x%08x, ref.count=%d\n",
+		  i, core_addr_to_string_nz (state->dr_addr_wp[i]),
+		  state->dr_ctrl_wp[i], state->dr_ref_count_wp[i]);
+}
+
+/* Get the hardware debug register capacity information from the
+   process represented by TID.  */
+
+void
+aarch64_linux_get_debug_reg_capacity (int tid)
+{
+  struct iovec iov;
+  struct user_hwdebug_state dreg_state;
+
+  iov.iov_base = &dreg_state;
+  iov.iov_len = sizeof (dreg_state);
+
+  /* Get hardware watchpoint register info.  */
+  if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_WATCH, &iov) == 0
+      && (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
+	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
+	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
+    {
+      aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
+      if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
+	{
+	  warning (_("Unexpected number of hardware watchpoint registers"
+		     " reported by ptrace, got %d, expected %d."),
+		   aarch64_num_wp_regs, AARCH64_HWP_MAX_NUM);
+	  aarch64_num_wp_regs = AARCH64_HWP_MAX_NUM;
+	}
+    }
+  else
+    {
+      warning (_("Unable to determine the number of hardware watchpoints"
+		 " available."));
+      aarch64_num_wp_regs = 0;
+    }
+
+  /* Get hardware breakpoint register info.  */
+  if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_BREAK, &iov) == 0
+      && (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
+	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
+	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
+    {
+      aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
+      if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
+	{
+	  warning (_("Unexpected number of hardware breakpoint registers"
+		     " reported by ptrace, got %d, expected %d."),
+		   aarch64_num_bp_regs, AARCH64_HBP_MAX_NUM);
+	  aarch64_num_bp_regs = AARCH64_HBP_MAX_NUM;
+	}
+    }
+  else
+    {
+      warning (_("Unable to determine the number of hardware breakpoints"
+		 " available."));
+      aarch64_num_bp_regs = 0;
+    }
+}
+
+/* Return true if we can watch a memory region that starts address
+   ADDR and whose length is LEN in bytes.  */
+
+int
+aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len)
+{
+  CORE_ADDR aligned_addr;
+
+  /* Can not set watchpoints for zero or negative lengths.  */
+  if (len <= 0)
+    return 0;
+
+  /* Must have hardware watchpoint debug register(s).  */
+  if (aarch64_num_wp_regs == 0)
+    return 0;
+
+  /* We support unaligned watchpoint address and arbitrary length,
+     as long as the size of the whole watched area after alignment
+     doesn't exceed size of the total area that all watchpoint debug
+     registers can watch cooperatively.
+
+     This is a very relaxed rule, but unfortunately there are
+     limitations, e.g. false-positive hits, due to limited support of
+     hardware debug registers in the kernel.  See comment above
+     aarch64_align_watchpoint for more information.  */
+
+  aligned_addr = addr & ~(AARCH64_HWP_MAX_LEN_PER_REG - 1);
+  if (aligned_addr + aarch64_num_wp_regs * AARCH64_HWP_MAX_LEN_PER_REG
+      < addr + len)
+    return 0;
+
+  /* All tests passed so we are likely to be able to set the watchpoint.
+     The reason that it is 'likely' rather than 'must' is because
+     we don't check the current usage of the watchpoint registers, and
+     there may not be enough registers available for this watchpoint.
+     Ideally we should check the cached debug register state, however
+     the checking is costly.  */
+  return 1;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux-hw-point.h ./gdb/nat/aarch64-linux-hw-point.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/aarch64-linux-hw-point.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/aarch64-linux-hw-point.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,191 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Contributed by ARM Ltd.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef AARCH64_LINUX_HW_POINT_H
+#define AARCH64_LINUX_HW_POINT_H 1
+
+#include "break-common.h" /* For enum target_hw_bp_type.  */
+
+/* Macro definitions, data structures, and code for the hardware
+   breakpoint and hardware watchpoint support follow.  We use the
+   following abbreviations throughout the code:
+
+   hw - hardware
+   bp - breakpoint
+   wp - watchpoint  */
+
+/* Maximum number of hardware breakpoint and watchpoint registers.
+   Neither of these values may exceed the width of dr_changed_t
+   measured in bits.  */
+
+#define AARCH64_HBP_MAX_NUM 16
+#define AARCH64_HWP_MAX_NUM 16
+
+/* Alignment requirement in bytes for addresses written to
+   hardware breakpoint and watchpoint value registers.
+
+   A ptrace call attempting to set an address that does not meet the
+   alignment criteria will fail.  Limited support has been provided in
+   this port for unaligned watchpoints, such that from a GDB user
+   perspective, an unaligned watchpoint may be requested.
+
+   This is achieved by minimally enlarging the watched area to meet the
+   alignment requirement, and if necessary, splitting the watchpoint
+   over several hardware watchpoint registers.  */
+
+#define AARCH64_HBP_ALIGNMENT 4
+#define AARCH64_HWP_ALIGNMENT 8
+
+/* The maximum length of a memory region that can be watched by one
+   hardware watchpoint register.  */
+
+#define AARCH64_HWP_MAX_LEN_PER_REG 8
+
+/* ptrace hardware breakpoint resource info is formatted as follows:
+
+   31             24             16               8              0
+   +---------------+--------------+---------------+---------------+
+   |   RESERVED    |   RESERVED   |   DEBUG_ARCH  |  NUM_SLOTS    |
+   +---------------+--------------+---------------+---------------+  */
+
+
+/* Macros to extract fields from the hardware debug information word.  */
+#define AARCH64_DEBUG_NUM_SLOTS(x) ((x) & 0xff)
+#define AARCH64_DEBUG_ARCH(x) (((x) >> 8) & 0xff)
+
+/* Macro for the expected version of the ARMv8-A debug architecture.  */
+#define AARCH64_DEBUG_ARCH_V8 0x6
+#define AARCH64_DEBUG_ARCH_V8_1 0x7
+#define AARCH64_DEBUG_ARCH_V8_2 0x8
+
+/* ptrace expects control registers to be formatted as follows:
+
+   31                             13          5      3      1     0
+   +--------------------------------+----------+------+------+----+
+   |         RESERVED (SBZ)         |  LENGTH  | TYPE | PRIV | EN |
+   +--------------------------------+----------+------+------+----+
+
+   The TYPE field is ignored for breakpoints.  */
+
+#define DR_CONTROL_ENABLED(ctrl)	(((ctrl) & 0x1) == 1)
+#define DR_CONTROL_LENGTH(ctrl)		(((ctrl) >> 5) & 0xff)
+
+/* Each bit of a variable of this type is used to indicate whether a
+   hardware breakpoint or watchpoint setting has been changed since
+   the last update.
+
+   Bit N corresponds to the Nth hardware breakpoint or watchpoint
+   setting which is managed in aarch64_debug_reg_state, where N is
+   valid between 0 and the total number of the hardware breakpoint or
+   watchpoint debug registers minus 1.
+
+   When bit N is 1, the corresponding breakpoint or watchpoint setting
+   has changed, and therefore the corresponding hardware debug
+   register needs to be updated via the ptrace interface.
+
+   In the per-thread arch-specific data area, we define two such
+   variables for per-thread hardware breakpoint and watchpoint
+   settings respectively.
+
+   This type is part of the mechanism which helps reduce the number of
+   ptrace calls to the kernel, i.e. avoid asking the kernel to write
+   to the debug registers with unchanged values.  */
+
+typedef ULONGEST dr_changed_t;
+
+/* Set each of the lower M bits of X to 1; assert X is wide enough.  */
+
+#define DR_MARK_ALL_CHANGED(x, m)					\
+  do									\
+    {									\
+      gdb_assert (sizeof ((x)) * 8 >= (m));				\
+      (x) = (((dr_changed_t)1 << (m)) - 1);				\
+    } while (0)
+
+#define DR_MARK_N_CHANGED(x, n)						\
+  do									\
+    {									\
+      (x) |= ((dr_changed_t)1 << (n));					\
+    } while (0)
+
+#define DR_CLEAR_CHANGED(x)						\
+  do									\
+    {									\
+      (x) = 0;								\
+    } while (0)
+
+#define DR_HAS_CHANGED(x) ((x) != 0)
+#define DR_N_HAS_CHANGED(x, n) ((x) & ((dr_changed_t)1 << (n)))
+
+/* Structure for managing the hardware breakpoint/watchpoint resources.
+   DR_ADDR_* stores the address, DR_CTRL_* stores the control register
+   content, and DR_REF_COUNT_* counts the numbers of references to the
+   corresponding bp/wp, by which way the limited hardware resources
+   are not wasted on duplicated bp/wp settings (though so far gdb has
+   done a good job by not sending duplicated bp/wp requests).  */
+
+struct aarch64_debug_reg_state
+{
+  /* hardware breakpoint */
+  CORE_ADDR dr_addr_bp[AARCH64_HBP_MAX_NUM];
+  unsigned int dr_ctrl_bp[AARCH64_HBP_MAX_NUM];
+  unsigned int dr_ref_count_bp[AARCH64_HBP_MAX_NUM];
+
+  /* hardware watchpoint */
+  CORE_ADDR dr_addr_wp[AARCH64_HWP_MAX_NUM];
+  unsigned int dr_ctrl_wp[AARCH64_HWP_MAX_NUM];
+  unsigned int dr_ref_count_wp[AARCH64_HWP_MAX_NUM];
+};
+
+/* Per-thread arch-specific data we want to keep.  */
+
+struct arch_lwp_info
+{
+  /* When bit N is 1, it indicates the Nth hardware breakpoint or
+     watchpoint register pair needs to be updated when the thread is
+     resumed; see aarch64_linux_prepare_to_resume.  */
+  dr_changed_t dr_changed_bp;
+  dr_changed_t dr_changed_wp;
+};
+
+extern int aarch64_num_bp_regs;
+extern int aarch64_num_wp_regs;
+
+unsigned int aarch64_watchpoint_length (unsigned int ctrl);
+
+int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
+			       int len, int is_insert,
+			       struct aarch64_debug_reg_state *state);
+int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
+			       int len, int is_insert,
+			       struct aarch64_debug_reg_state *state);
+
+void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
+				   int tid, int watchpoint);
+
+void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
+				   const char *func, CORE_ADDR addr,
+				   int len, enum target_hw_bp_type type);
+
+void aarch64_linux_get_debug_reg_capacity (int tid);
+
+struct aarch64_debug_reg_state *aarch64_get_debug_reg_state (pid_t pid);
+
+int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len);
+
+#endif /* AARCH64_LINUX_HW_POINT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/amd64-linux-siginfo.c ./gdb/nat/amd64-linux-siginfo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/amd64-linux-siginfo.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/amd64-linux-siginfo.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,596 @@
+/* Low-level siginfo manipulation for amd64.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <signal.h>
+#include "common-defs.h"
+#include "amd64-linux-siginfo.h"
+
+#define GDB_SI_SIZE 128
+
+/* The types below define the most complete kernel siginfo types known
+   for the architecture, independent of the system/libc headers.  They
+   are named from a 64-bit kernel's perspective:
+
+   | layout | type                 |
+   |--------+----------------------|
+   | 64-bit | nat_siginfo_t        |
+   | 32-bit | compat_siginfo_t     |
+   | x32    | compat_x32_siginfo_t |
+*/
+
+#ifndef __ILP32__
+
+typedef int nat_int_t;
+typedef unsigned long nat_uptr_t;
+
+typedef int nat_time_t;
+typedef int nat_timer_t;
+
+/* For native 64-bit, clock_t in _sigchld is 64-bit.  */
+typedef long nat_clock_t;
+
+typedef union nat_sigval
+{
+  nat_int_t sival_int;
+  nat_uptr_t sival_ptr;
+} nat_sigval_t;
+
+typedef struct nat_siginfo
+{
+  int si_signo;
+  int si_errno;
+  int si_code;
+
+  union
+  {
+    int _pad[((128 / sizeof (int)) - 4)];
+    /* kill() */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+    } _kill;
+
+    /* POSIX.1b timers */
+    struct
+    {
+      nat_timer_t _tid;
+      int _overrun;
+      nat_sigval_t _sigval;
+    } _timer;
+
+    /* POSIX.1b signals */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      nat_sigval_t _sigval;
+    } _rt;
+
+    /* SIGCHLD */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      int _status;
+      nat_clock_t _utime;
+      nat_clock_t _stime;
+    } _sigchld;
+
+    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+    struct
+    {
+      nat_uptr_t _addr;
+      short int _addr_lsb;
+      struct
+      {
+	nat_uptr_t _lower;
+	nat_uptr_t _upper;
+      } si_addr_bnd;
+    } _sigfault;
+
+    /* SIGPOLL */
+    struct
+    {
+      int _band;
+      int _fd;
+    } _sigpoll;
+  } _sifields;
+} nat_siginfo_t;
+
+#endif /* __ILP32__ */
+
+/* These types below (compat_*) define a siginfo type that is layout
+   compatible with the siginfo type exported by the 32-bit userspace
+   support.  */
+
+typedef int compat_int_t;
+typedef unsigned int compat_uptr_t;
+
+typedef int compat_time_t;
+typedef int compat_timer_t;
+typedef int compat_clock_t;
+
+struct compat_timeval
+{
+  compat_time_t tv_sec;
+  int tv_usec;
+};
+
+typedef union compat_sigval
+{
+  compat_int_t sival_int;
+  compat_uptr_t sival_ptr;
+} compat_sigval_t;
+
+typedef struct compat_siginfo
+{
+  int si_signo;
+  int si_errno;
+  int si_code;
+
+  union
+  {
+    int _pad[((128 / sizeof (int)) - 3)];
+
+    /* kill() */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+    } _kill;
+
+    /* POSIX.1b timers */
+    struct
+    {
+      compat_timer_t _tid;
+      int _overrun;
+      compat_sigval_t _sigval;
+    } _timer;
+
+    /* POSIX.1b signals */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      compat_sigval_t _sigval;
+    } _rt;
+
+    /* SIGCHLD */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      int _status;
+      compat_clock_t _utime;
+      compat_clock_t _stime;
+    } _sigchld;
+
+    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+    struct
+    {
+      unsigned int _addr;
+      short int _addr_lsb;
+      struct
+      {
+	unsigned int _lower;
+	unsigned int _upper;
+      } si_addr_bnd;
+    } _sigfault;
+
+    /* SIGPOLL */
+    struct
+    {
+      int _band;
+      int _fd;
+    } _sigpoll;
+  } _sifields;
+} compat_siginfo_t;
+
+/* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes.  */
+typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
+
+typedef struct compat_x32_siginfo
+{
+  int si_signo;
+  int si_errno;
+  int si_code;
+
+  union
+  {
+    int _pad[((128 / sizeof (int)) - 3)];
+
+    /* kill() */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+    } _kill;
+
+    /* POSIX.1b timers */
+    struct
+    {
+      compat_timer_t _tid;
+      int _overrun;
+      compat_sigval_t _sigval;
+    } _timer;
+
+    /* POSIX.1b signals */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      compat_sigval_t _sigval;
+    } _rt;
+
+    /* SIGCHLD */
+    struct
+    {
+      unsigned int _pid;
+      unsigned int _uid;
+      int _status;
+      compat_x32_clock_t _utime;
+      compat_x32_clock_t _stime;
+    } _sigchld;
+
+    /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+    struct
+    {
+      unsigned int _addr;
+      unsigned int _addr_lsb;
+    } _sigfault;
+
+    /* SIGPOLL */
+    struct
+    {
+      int _band;
+      int _fd;
+    } _sigpoll;
+  } _sifields;
+} compat_x32_siginfo_t __attribute__ ((__aligned__ (8)));
+
+/* To simplify usage of siginfo fields.  */
+
+#define cpt_si_pid _sifields._kill._pid
+#define cpt_si_uid _sifields._kill._uid
+#define cpt_si_timerid _sifields._timer._tid
+#define cpt_si_overrun _sifields._timer._overrun
+#define cpt_si_status _sifields._sigchld._status
+#define cpt_si_utime _sifields._sigchld._utime
+#define cpt_si_stime _sifields._sigchld._stime
+#define cpt_si_ptr _sifields._rt._sigval.sival_ptr
+#define cpt_si_addr _sifields._sigfault._addr
+#define cpt_si_addr_lsb _sifields._sigfault._addr_lsb
+#define cpt_si_band _sifields._sigpoll._band
+#define cpt_si_fd _sifields._sigpoll._fd
+
+/* glibc at least up to 2.3.2 doesn't have si_timerid, si_overrun.
+   In their place is si_timer1,si_timer2.  */
+
+#ifndef si_timerid
+#define si_timerid si_timer1
+#endif
+#ifndef si_overrun
+#define si_overrun si_timer2
+#endif
+
+/* The type of the siginfo object the kernel returns in
+   PTRACE_GETSIGINFO.  If gdb is built as a x32 program, we get a x32
+   siginfo.  */
+#ifdef __ILP32__
+typedef compat_x32_siginfo_t ptrace_siginfo_t;
+#else
+typedef nat_siginfo_t ptrace_siginfo_t;
+#endif
+
+/*  Convert the system provided siginfo into compatible siginfo.  */
+
+static void
+compat_siginfo_from_siginfo (compat_siginfo_t *to, const siginfo_t *from)
+{
+  ptrace_siginfo_t from_ptrace;
+
+  memcpy (&from_ptrace, from, sizeof (from_ptrace));
+  memset (to, 0, sizeof (*to));
+
+  to->si_signo = from_ptrace.si_signo;
+  to->si_errno = from_ptrace.si_errno;
+  to->si_code = from_ptrace.si_code;
+
+  if (to->si_code == SI_TIMER)
+    {
+      to->cpt_si_timerid = from_ptrace.cpt_si_timerid;
+      to->cpt_si_overrun = from_ptrace.cpt_si_overrun;
+      to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+    }
+  else if (to->si_code == SI_USER)
+    {
+      to->cpt_si_pid = from_ptrace.cpt_si_pid;
+      to->cpt_si_uid = from_ptrace.cpt_si_uid;
+    }
+  else if (to->si_code < 0)
+    {
+      to->cpt_si_pid = from_ptrace.cpt_si_pid;
+      to->cpt_si_uid = from_ptrace.cpt_si_uid;
+      to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+    }
+  else
+    {
+      switch (to->si_signo)
+	{
+	case SIGCHLD:
+	  to->cpt_si_pid = from_ptrace.cpt_si_pid;
+	  to->cpt_si_uid = from_ptrace.cpt_si_uid;
+	  to->cpt_si_status = from_ptrace.cpt_si_status;
+	  to->cpt_si_utime = from_ptrace.cpt_si_utime;
+	  to->cpt_si_stime = from_ptrace.cpt_si_stime;
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to->cpt_si_addr = from_ptrace.cpt_si_addr;
+	  break;
+	case SIGPOLL:
+	  to->cpt_si_band = from_ptrace.cpt_si_band;
+	  to->cpt_si_fd = from_ptrace.cpt_si_fd;
+	  break;
+	default:
+	  to->cpt_si_pid = from_ptrace.cpt_si_pid;
+	  to->cpt_si_uid = from_ptrace.cpt_si_uid;
+	  to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+	  break;
+	}
+    }
+}
+
+/* Convert the compatible siginfo into system siginfo.  */
+
+static void
+siginfo_from_compat_siginfo (siginfo_t *to, const compat_siginfo_t *from)
+{
+  ptrace_siginfo_t to_ptrace;
+
+  memset (&to_ptrace, 0, sizeof (to_ptrace));
+
+  to_ptrace.si_signo = from->si_signo;
+  to_ptrace.si_errno = from->si_errno;
+  to_ptrace.si_code = from->si_code;
+
+  if (to_ptrace.si_code == SI_TIMER)
+    {
+      to_ptrace.cpt_si_timerid = from->cpt_si_timerid;
+      to_ptrace.cpt_si_overrun = from->cpt_si_overrun;
+      to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+    }
+  else if (to_ptrace.si_code == SI_USER)
+    {
+      to_ptrace.cpt_si_pid = from->cpt_si_pid;
+      to_ptrace.cpt_si_uid = from->cpt_si_uid;
+    }
+  if (to_ptrace.si_code < 0)
+    {
+      to_ptrace.cpt_si_pid = from->cpt_si_pid;
+      to_ptrace.cpt_si_uid = from->cpt_si_uid;
+      to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+    }
+  else
+    {
+      switch (to_ptrace.si_signo)
+	{
+	case SIGCHLD:
+	  to_ptrace.cpt_si_pid = from->cpt_si_pid;
+	  to_ptrace.cpt_si_uid = from->cpt_si_uid;
+	  to_ptrace.cpt_si_status = from->cpt_si_status;
+	  to_ptrace.cpt_si_utime = from->cpt_si_utime;
+	  to_ptrace.cpt_si_stime = from->cpt_si_stime;
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to_ptrace.cpt_si_addr = from->cpt_si_addr;
+	  to_ptrace.cpt_si_addr_lsb = from->cpt_si_addr_lsb;
+	  break;
+	case SIGPOLL:
+	  to_ptrace.cpt_si_band = from->cpt_si_band;
+	  to_ptrace.cpt_si_fd = from->cpt_si_fd;
+	  break;
+	default:
+	  to_ptrace.cpt_si_pid = from->cpt_si_pid;
+	  to_ptrace.cpt_si_uid = from->cpt_si_uid;
+	  to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+	  break;
+	}
+    }
+  memcpy (to, &to_ptrace, sizeof (to_ptrace));
+}
+
+/*  Convert the system provided siginfo into compatible x32 siginfo.  */
+
+static void
+compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to,
+				 const siginfo_t *from)
+{
+  ptrace_siginfo_t from_ptrace;
+
+  memcpy (&from_ptrace, from, sizeof (from_ptrace));
+  memset (to, 0, sizeof (*to));
+
+  to->si_signo = from_ptrace.si_signo;
+  to->si_errno = from_ptrace.si_errno;
+  to->si_code = from_ptrace.si_code;
+
+  if (to->si_code == SI_TIMER)
+    {
+      to->cpt_si_timerid = from_ptrace.cpt_si_timerid;
+      to->cpt_si_overrun = from_ptrace.cpt_si_overrun;
+      to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+    }
+  else if (to->si_code == SI_USER)
+    {
+      to->cpt_si_pid = from_ptrace.cpt_si_pid;
+      to->cpt_si_uid = from_ptrace.cpt_si_uid;
+    }
+  else if (to->si_code < 0)
+    {
+      to->cpt_si_pid = from_ptrace.cpt_si_pid;
+      to->cpt_si_uid = from_ptrace.cpt_si_uid;
+      to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+    }
+  else
+    {
+      switch (to->si_signo)
+	{
+	case SIGCHLD:
+	  to->cpt_si_pid = from_ptrace.cpt_si_pid;
+	  to->cpt_si_uid = from_ptrace.cpt_si_uid;
+	  to->cpt_si_status = from_ptrace.cpt_si_status;
+	  memcpy (&to->cpt_si_utime, &from_ptrace.cpt_si_utime,
+		  sizeof (to->cpt_si_utime));
+	  memcpy (&to->cpt_si_stime, &from_ptrace.cpt_si_stime,
+		  sizeof (to->cpt_si_stime));
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to->cpt_si_addr = from_ptrace.cpt_si_addr;
+	  break;
+	case SIGPOLL:
+	  to->cpt_si_band = from_ptrace.cpt_si_band;
+	  to->cpt_si_fd = from_ptrace.cpt_si_fd;
+	  break;
+	default:
+	  to->cpt_si_pid = from_ptrace.cpt_si_pid;
+	  to->cpt_si_uid = from_ptrace.cpt_si_uid;
+	  to->cpt_si_ptr = from_ptrace.cpt_si_ptr;
+	  break;
+	}
+    }
+}
+
+
+
+
+/* Convert the compatible x32 siginfo into system siginfo.  */
+static void
+siginfo_from_compat_x32_siginfo (siginfo_t *to,
+				 const compat_x32_siginfo_t *from)
+{
+  ptrace_siginfo_t to_ptrace;
+
+  memset (&to_ptrace, 0, sizeof (to_ptrace));
+  to_ptrace.si_signo = from->si_signo;
+  to_ptrace.si_errno = from->si_errno;
+  to_ptrace.si_code = from->si_code;
+
+  if (to_ptrace.si_code == SI_TIMER)
+    {
+      to_ptrace.cpt_si_timerid = from->cpt_si_timerid;
+      to_ptrace.cpt_si_overrun = from->cpt_si_overrun;
+      to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+    }
+  else if (to_ptrace.si_code == SI_USER)
+    {
+      to_ptrace.cpt_si_pid = from->cpt_si_pid;
+      to_ptrace.cpt_si_uid = from->cpt_si_uid;
+    }
+  if (to_ptrace.si_code < 0)
+    {
+      to_ptrace.cpt_si_pid = from->cpt_si_pid;
+      to_ptrace.cpt_si_uid = from->cpt_si_uid;
+      to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+    }
+  else
+    {
+      switch (to_ptrace.si_signo)
+	{
+	case SIGCHLD:
+	  to_ptrace.cpt_si_pid = from->cpt_si_pid;
+	  to_ptrace.cpt_si_uid = from->cpt_si_uid;
+	  to_ptrace.cpt_si_status = from->cpt_si_status;
+	  memcpy (&to_ptrace.cpt_si_utime, &from->cpt_si_utime,
+		  sizeof (to_ptrace.cpt_si_utime));
+	  memcpy (&to_ptrace.cpt_si_stime, &from->cpt_si_stime,
+		  sizeof (to_ptrace.cpt_si_stime));
+	  break;
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGBUS:
+	  to_ptrace.cpt_si_addr = from->cpt_si_addr;
+	  break;
+	case SIGPOLL:
+	  to_ptrace.cpt_si_band = from->cpt_si_band;
+	  to_ptrace.cpt_si_fd = from->cpt_si_fd;
+	  break;
+	default:
+	  to_ptrace.cpt_si_pid = from->cpt_si_pid;
+	  to_ptrace.cpt_si_uid = from->cpt_si_uid;
+	  to_ptrace.cpt_si_ptr = from->cpt_si_ptr;
+	  break;
+	}
+    }
+  memcpy (to, &to_ptrace, sizeof (to_ptrace));
+}
+
+/* Convert a ptrace siginfo object, into/from the siginfo in the
+   layout of the inferiors' architecture.  Returns true if any
+   conversion was done; false otherwise.  If DIRECTION is 1, then copy
+   from INF to PTRACE.  If DIRECTION is 0, then copy from NATIVE to
+   INF.  */
+
+int
+amd64_linux_siginfo_fixup_common (siginfo_t *ptrace, gdb_byte *inf,
+				  int direction,
+				  enum amd64_siginfo_fixup_mode mode)
+{
+  if (mode == FIXUP_32)
+    {
+      if (direction == 0)
+	compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, ptrace);
+      else
+	siginfo_from_compat_siginfo (ptrace, (struct compat_siginfo *) inf);
+
+      return 1;
+    }
+  else if (mode == FIXUP_X32)
+    {
+      if (direction == 0)
+	compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf,
+					 ptrace);
+      else
+	siginfo_from_compat_x32_siginfo (ptrace,
+					 (struct compat_x32_siginfo *) inf);
+
+      return 1;
+    }
+  return 0;
+}
+
+/* Sanity check for the siginfo structure sizes.  */
+
+gdb_static_assert (sizeof (siginfo_t) == GDB_SI_SIZE);
+#ifndef __ILP32__
+gdb_static_assert (sizeof (nat_siginfo_t) == GDB_SI_SIZE);
+#endif
+gdb_static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE);
+gdb_static_assert (sizeof (compat_siginfo_t) == GDB_SI_SIZE);
+gdb_static_assert (sizeof (ptrace_siginfo_t) == GDB_SI_SIZE);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/amd64-linux-siginfo.h ./gdb/nat/amd64-linux-siginfo.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/amd64-linux-siginfo.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/amd64-linux-siginfo.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,58 @@
+/* Low-level siginfo manipulation for amd64.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef AMD64_LINUX_SIGINFO_H
+#define AMD64_LINUX_SIGINFO_H 1
+
+#include <signal.h>  /* For siginfo_t.  */
+
+/* When GDB is built as a 64-bit application on Linux, the
+   PTRACE_GETSIGINFO data is always presented in 64-bit layout.  Since
+   debugging a 32-bit inferior with a 64-bit GDB should look the same
+   as debugging it with a 32-bit GDB, we do the 32-bit <-> 64-bit
+   conversion in-place ourselves.
+   In other to make this conversion independent of the system where gdb
+   is compiled the most complete version of the siginfo, named as native
+   siginfo, is used internally as an intermediate step.
+
+   Conversion using nat_siginfo is exemplified below:
+   compat_siginfo_from_siginfo or compat_x32_siginfo_from_siginfo
+
+      buffer (from the kernel) -> nat_siginfo -> 32 / X32 siginfo
+
+   siginfo_from_compat_x32_siginfo or siginfo_from_compat_siginfo
+
+     32 / X32 siginfo -> nat_siginfo -> buffer (to the kernel)  */
+
+
+/* Kind of siginfo fixup to be performed.  */
+
+enum amd64_siginfo_fixup_mode
+{
+  FIXUP_32 = 1,   /* Fixup for 32bit.  */
+  FIXUP_X32 = 2   /* Fixup for x32.  */
+};
+
+/* Common code for performing the fixup of the siginfo.  */
+
+int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
+				      int direction,
+				      enum amd64_siginfo_fixup_mode mode);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/gdb_ptrace.h ./gdb/nat/gdb_ptrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/gdb_ptrace.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nat/gdb_ptrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,153 @@
+/* Portable <sys/ptrace.h>
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   
+#ifndef GDB_PTRACE_H
+#define GDB_PTRACE_H
+
+/* The <sys/ptrace.h> header was introduced with 4.4BSD, and provided
+   the PT_* symbolic constants for the ptrace(2) request numbers.  The
+   ptrace(2) prototype was added later to the same header on BSD.
+   SunOS and GNU/Linux have slightly different symbolic names for the
+   constants that start with PTRACE_*.  System V still doesn't have
+   (and probably never will have) a <sys/ptrace.h> with symbolic
+   constants; the ptrace(2) prototype can be found in <unistd.h>.
+   Fortunately all systems use the same numerical constants for the
+   common ptrace requests.  */
+
+#ifdef HAVE_PTRACE_H
+# include <ptrace.h>
+#elif defined(HAVE_SYS_PTRACE_H)
+# include <sys/ptrace.h>
+#endif
+
+/* No need to include <unistd.h> since it's already included by
+   "defs.h".  */
+
+#ifndef PT_TRACE_ME
+# define PT_TRACE_ME	0
+#endif
+
+#ifndef PT_READ_I
+# define PT_READ_I	1	/* Read word in child's I space.  */
+#endif
+
+#ifndef PT_READ_D
+# define PT_READ_D	2	/* Read word in child's D space.  */
+#endif
+
+#ifndef PT_READ_U
+# define PT_READ_U	3	/* Read word in child's U space.  */
+#endif
+
+#ifndef PT_WRITE_I
+# define PT_WRITE_I	4	/* Write word in child's I space.  */
+#endif
+
+#ifndef PT_WRITE_D
+# define PT_WRITE_D	5	/* Write word in child's D space.  */
+#endif
+
+#ifndef PT_WRITE_U
+# define PT_WRITE_U	6	/* Write word in child's U space.  */
+#endif
+
+/* HP-UX doesn't define PT_CONTINUE and PT_STEP.  Instead of those two
+   ptrace requests, it has PT_CONTIN, PT_CONTIN1, PT_SINGLE and
+   PT_SINGLE1.  PT_CONTIN1 and PT_SINGLE1 preserve pending signals,
+   which apparently is what is wanted by the HP-UX native code.  */
+
+#ifndef PT_CONTINUE
+# ifdef PT_CONTIN1
+#  define PT_CONTINUE	PT_CONTIN1
+# else
+#  define PT_CONTINUE	7	/* Continue the child.  */
+# endif
+#endif
+
+#ifndef PT_KILL
+# define PT_KILL	8	/* Kill the child process.  */
+#endif
+
+#ifndef PT_STEP
+# ifdef PT_SINGLE1
+#  define PT_STEP	PT_SINGLE1
+# else
+#  define PT_STEP	9	/* Single step the child.   */
+# endif
+#endif
+
+/* Not all systems support attaching and detaching.   */
+
+#ifndef PT_ATTACH
+# ifdef PTRACE_ATTACH
+#  define PT_ATTACH PTRACE_ATTACH
+# endif
+#endif
+
+#ifndef PT_DETACH
+# ifdef PTRACE_DETACH
+#  define PT_DETACH PTRACE_DETACH
+# endif
+#endif
+
+/* For systems such as HP/UX that do not provide PT_SYSCALL, define it
+   here as an alias for PT_CONTINUE.  This is what the PT_SYSCALL
+   request is expected to do, in addition to stopping when entering/
+   exiting a system call.  Chances are, if the system supports system
+   call tracing, enabling this feature is probably done separately;
+   and there is probably no special request that we would be required
+   to use when resuming the execution of our program.  */
+#ifndef PT_SYSCALL
+# ifdef PTRACE_SYSCALL
+#  define PT_SYSCALL PTRACE_SYSCALL
+#else
+#  define PT_SYSCALL PT_CONTINUE
+# endif
+#endif
+
+/* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64
+   or whatever it's called these days, don't provide a prototype for
+   ptrace.  Provide one to silence compiler warnings.  */
+
+#ifndef HAVE_DECL_PTRACE
+extern PTRACE_TYPE_RET ptrace();
+#endif
+
+/* Some systems, at least AIX and HP-UX have a ptrace with five
+   arguments.  Since we never use the fifth argument, define a ptrace
+   macro that calls the real ptrace with the last argument set to
+   zero.  */
+
+#ifdef PTRACE_TYPE_ARG5
+# ifdef HAVE_PTRACE64
+#  define ptrace(request, pid, addr, data) \
+          ptrace64 (request, pid, addr, data, 0)
+#  undef PTRACE_TYPE_ARG3
+#  define PTRACE_TYPE_ARG3 long long
+# else
+#  define ptrace(request, pid, addr, data) \
+          ptrace (request, pid, addr, data, 0)
+# endif
+#else
+/* Wrapper that avoids adding a pointless cast to all callers.  */
+# define ptrace(request, pid, addr, data) \
+         ptrace ((PTRACE_TYPE_ARG1) request, pid, addr, data)
+#endif
+
+#endif /* gdb_ptrace.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/gdb_thread_db.h ./gdb/nat/gdb_thread_db.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/gdb_thread_db.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/gdb_thread_db.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,23 @@
+/* Copyright (C) 2000-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_THREAD_DB_H
+#define GDB_THREAD_DB_H 1
+
 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
 #else
@@ -14,3 +34,42 @@
    libthread_db associated with whatever libpthread the app is using.  */
 #define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
 #endif
+
+/* Types of the libthread_db functions.  */
+
+typedef td_err_e (td_init_ftype) (void);
+
+typedef td_err_e (td_ta_new_ftype) (struct ps_prochandle * ps,
+				    td_thragent_t **ta);
+typedef td_err_e (td_ta_map_lwp2thr_ftype) (const td_thragent_t *ta,
+					    lwpid_t lwpid, td_thrhandle_t *th);
+typedef td_err_e (td_ta_thr_iter_ftype) (const td_thragent_t *ta,
+					 td_thr_iter_f *callback, void *cbdata_p,
+					 td_thr_state_e state, int ti_pri,
+					 sigset_t *ti_sigmask_p,
+					 unsigned int ti_user_flags);
+typedef td_err_e (td_ta_event_addr_ftype) (const td_thragent_t *ta,
+					   td_event_e event, td_notify_t *ptr);
+typedef td_err_e (td_ta_set_event_ftype) (const td_thragent_t *ta,
+					  td_thr_events_t *event);
+typedef td_err_e (td_ta_clear_event_ftype) (const td_thragent_t *ta,
+					    td_thr_events_t *event);
+typedef td_err_e (td_ta_event_getmsg_ftype) (const td_thragent_t *ta,
+					     td_event_msg_t *msg);
+
+typedef td_err_e (td_thr_get_info_ftype) (const td_thrhandle_t *th,
+					  td_thrinfo_t *infop);
+typedef td_err_e (td_thr_event_enable_ftype) (const td_thrhandle_t *th,
+					      int event);
+
+typedef td_err_e (td_thr_tls_get_addr_ftype) (const td_thrhandle_t *th,
+					      psaddr_t map_address,
+					      size_t offset, psaddr_t *address);
+typedef td_err_e (td_thr_tlsbase_ftype) (const td_thrhandle_t *th,
+					 unsigned long int modid,
+					 psaddr_t *base);
+
+typedef const char ** (td_symbol_list_ftype) (void);
+typedef td_err_e (td_ta_delete_ftype) (td_thragent_t *);
+
+#endif /* GDB_THREAD_DB_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-btrace.c ./gdb/nat/linux-btrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-btrace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-btrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux-dependent part of branch trace support for GDB, and GDBserver.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -24,6 +24,9 @@
 #include "common-regcache.h"
 #include "gdb_wait.h"
 #include "x86-cpuid.h"
+#include "filestuff.h"
+
+#include <inttypes.h>
 
 #ifdef HAVE_SYS_SYSCALL_H
 #include <sys/syscall.h>
@@ -33,10 +36,9 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/user.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/types.h>
 #include <signal.h>
-#include <sys/utsname.h>
 
 /* A branch trace record in perf_event.  */
 struct perf_event_bts
@@ -101,35 +103,45 @@ perf_event_new_data (const struct perf_e
   return *pev->data_head != pev->last_head;
 }
 
-/* Try to determine the size of a pointer in bits for the OS.
-
-   This is the same as the size of a pointer for the inferior process
-   except when a 32-bit inferior is running on a 64-bit OS.  */
-
 /* Copy the last SIZE bytes from PEV ending at DATA_HEAD and return a pointer
    to the memory holding the copy.
    The caller is responsible for freeing the memory.  */
 
 static gdb_byte *
-perf_event_read (const struct perf_event_buffer *pev, unsigned long data_head,
-		 unsigned long size)
+perf_event_read (const struct perf_event_buffer *pev, __u64 data_head,
+		 size_t size)
 {
   const gdb_byte *begin, *end, *start, *stop;
   gdb_byte *buffer;
-  unsigned long data_tail, buffer_size;
+  size_t buffer_size;
+  __u64 data_tail;
 
   if (size == 0)
     return NULL;
 
+  /* We should never ask for more data than the buffer can hold.  */
+  buffer_size = pev->size;
+  gdb_assert (size <= buffer_size);
+
+  /* If we ask for more data than we seem to have, we wrap around and read
+     data from the end of the buffer.  This is already handled by the %
+     BUFFER_SIZE operation, below.  Here, we just need to make sure that we
+     don't underflow.
+
+     Note that this is perfectly OK for perf event buffers where data_head
+     doesn'grow indefinitely and instead wraps around to remain within the
+     buffer's boundaries.  */
+  if (data_head < size)
+    data_head += buffer_size;
+
   gdb_assert (size <= data_head);
   data_tail = data_head - size;
 
-  buffer_size = pev->size;
   begin = pev->mem;
   start = begin + data_tail % buffer_size;
   stop = begin + data_head % buffer_size;
 
-  buffer = xmalloc (size);
+  buffer = (gdb_byte *) xmalloc (size);
 
   if (start < stop)
     memcpy (buffer, start, stop - start);
@@ -149,15 +161,13 @@ perf_event_read (const struct perf_event
 
 static void
 perf_event_read_all (struct perf_event_buffer *pev, gdb_byte **data,
-		     unsigned long *psize)
+		     size_t *psize)
 {
-  unsigned long data_head, size;
+  size_t size;
+  __u64 data_head;
 
   data_head = *pev->data_head;
-
   size = pev->size;
-  if (data_head < size)
-    size = data_head;
 
   *data = perf_event_read (pev, data_head, size);
   *psize = size;
@@ -187,56 +197,75 @@ perf_event_pt_event_type (int *type)
   return -1;
 }
 
-static int
-linux_determine_kernel_ptr_bits (void)
+/* Try to determine the start address of the Linux kernel.  */
+
+static uint64_t
+linux_determine_kernel_start (void)
 {
-  struct utsname utsn;
-  int errcode;
+  static uint64_t kernel_start;
+  static int cached;
+  FILE *file;
 
-  memset (&utsn, 0, sizeof (utsn));
+  if (cached != 0)
+    return kernel_start;
 
-  errcode = uname (&utsn);
-  if (errcode < 0)
-    return 0;
+  cached = 1;
 
-  /* We only need to handle the 64-bit host case, here.  For 32-bit host,
-     the pointer size can be filled in later based on the inferior.  */
-  if (strcmp (utsn.machine, "x86_64") == 0)
-    return 64;
+  file = gdb_fopen_cloexec ("/proc/kallsyms", "r");
+  if (file == NULL)
+    return kernel_start;
 
-  return 0;
+  while (!feof (file))
+    {
+      char buffer[1024], symbol[8], *line;
+      uint64_t addr;
+      int match;
+
+      line = fgets (buffer, sizeof (buffer), file);
+      if (line == NULL)
+	break;
+
+      match = sscanf (line, "%" SCNx64 " %*[tT] %7s", &addr, symbol);
+      if (match != 2)
+	continue;
+
+      if (strcmp (symbol, "_text") == 0)
+	{
+	  kernel_start = addr;
+	  break;
+	}
+    }
+
+  fclose (file);
+
+  return kernel_start;
 }
 
 /* Check whether an address is in the kernel.  */
 
 static inline int
-perf_event_is_kernel_addr (const struct btrace_target_info *tinfo,
-			   uint64_t addr)
+perf_event_is_kernel_addr (uint64_t addr)
 {
-  uint64_t mask;
+  uint64_t kernel_start;
 
-  /* If we don't know the size of a pointer, we can't check.  Let's assume it's
-     not a kernel address in this case.  */
-  if (tinfo->ptr_bits == 0)
-    return 0;
-
-  /* A bit mask for the most significant bit in an address.  */
-  mask = (uint64_t) 1 << (tinfo->ptr_bits - 1);
+  kernel_start = linux_determine_kernel_start ();
+  if (kernel_start != 0ull)
+    return (addr >= kernel_start);
 
-  /* Check whether the most significant bit in the address is set.  */
-  return (addr & mask) != 0;
+  /* If we don't know the kernel's start address, let's check the most
+     significant bit.  This will work at least for 64-bit kernels.  */
+  return ((addr & (1ull << 63)) != 0);
 }
 
 /* Check whether a perf event record should be skipped.  */
 
 static inline int
-perf_event_skip_bts_record (const struct btrace_target_info *tinfo,
-			    const struct perf_event_bts *bts)
+perf_event_skip_bts_record (const struct perf_event_bts *bts)
 {
   /* The hardware may report branches from kernel into user space.  Branches
      from user into kernel space will be suppressed.  We filter the former to
      provide a consistent branch trace excluding kernel.  */
-  return perf_event_is_kernel_addr (tinfo, bts->from);
+  return perf_event_is_kernel_addr (bts->from);
 }
 
 /* Perform a few consistency checks on a perf event sample record.  This is
@@ -269,12 +298,11 @@ perf_event_sample_ok (const struct perf_
 
 static VEC (btrace_block_s) *
 perf_event_read_bts (struct btrace_target_info* tinfo, const uint8_t *begin,
-		     const uint8_t *end, const uint8_t *start,
-		     unsigned long long size)
+		     const uint8_t *end, const uint8_t *start, size_t size)
 {
   VEC (btrace_block_s) *btrace = NULL;
   struct perf_event_sample sample;
-  unsigned long long read = 0;
+  size_t read = 0;
   struct btrace_block block = { 0, 0 };
   struct regcache *regcache;
 
@@ -334,7 +362,7 @@ perf_event_read_bts (struct btrace_targe
 	  break;
 	}
 
-      if (perf_event_skip_bts_record (tinfo, &psample->bts))
+      if (perf_event_skip_bts_record (&psample->bts))
 	continue;
 
       /* We found a valid sample, so we can complete the current block.  */
@@ -370,7 +398,7 @@ kernel_supports_bts (void)
   switch (child)
     {
     case -1:
-      warning (_("test bts: cannot fork: %s."), strerror (errno));
+      warning (_("test bts: cannot fork: %s."), safe_strerror (errno));
       return 0;
 
     case 0:
@@ -378,7 +406,7 @@ kernel_supports_bts (void)
       if (status != 0)
 	{
 	  warning (_("test bts: cannot PTRACE_TRACEME: %s."),
-		   strerror (errno));
+		   safe_strerror (errno));
 	  _exit (1);
 	}
 
@@ -386,7 +414,7 @@ kernel_supports_bts (void)
       if (status != 0)
 	{
 	  warning (_("test bts: cannot raise SIGTRAP: %s."),
-		   strerror (errno));
+		   safe_strerror (errno));
 	  _exit (1);
 	}
 
@@ -397,7 +425,7 @@ kernel_supports_bts (void)
       if (pid != child)
 	{
 	  warning (_("test bts: bad pid %ld, error: %s."),
-		   (long) pid, strerror (errno));
+		   (long) pid, safe_strerror (errno));
 	  return 0;
 	}
 
@@ -429,7 +457,7 @@ kernel_supports_bts (void)
       if (pid != child)
 	{
 	  warning (_("test bts: bad pid %ld, error: %s."),
-		   (long) pid, strerror (errno));
+		   (long) pid, safe_strerror (errno));
 	  if (!WIFSIGNALED (status))
 	    warning (_("test bts: expected killed. status: %d."),
 		     status);
@@ -439,7 +467,7 @@ kernel_supports_bts (void)
     }
 }
 
-/* Check whether the kernel supports Intel(R) Processor Trace.  */
+/* Check whether the kernel supports Intel Processor Trace.  */
 
 static int
 kernel_supports_pt (void)
@@ -453,7 +481,7 @@ kernel_supports_pt (void)
   switch (child)
     {
     case -1:
-      warning (_("test pt: cannot fork: %s."), strerror (errno));
+      warning (_("test pt: cannot fork: %s."), safe_strerror (errno));
       return 0;
 
     case 0:
@@ -461,7 +489,7 @@ kernel_supports_pt (void)
       if (status != 0)
 	{
 	  warning (_("test pt: cannot PTRACE_TRACEME: %s."),
-		   strerror (errno));
+		   safe_strerror (errno));
 	  _exit (1);
 	}
 
@@ -469,7 +497,7 @@ kernel_supports_pt (void)
       if (status != 0)
 	{
 	  warning (_("test pt: cannot raise SIGTRAP: %s."),
-		   strerror (errno));
+		   safe_strerror (errno));
 	  _exit (1);
 	}
 
@@ -480,7 +508,7 @@ kernel_supports_pt (void)
       if (pid != child)
 	{
 	  warning (_("test pt: bad pid %ld, error: %s."),
-		   (long) pid, strerror (errno));
+		   (long) pid, safe_strerror (errno));
 	  return 0;
 	}
 
@@ -516,7 +544,7 @@ kernel_supports_pt (void)
       if (pid != child)
 	{
 	  warning (_("test pt: bad pid %ld, error: %s."),
-		   (long) pid, strerror (errno));
+		   (long) pid, safe_strerror (errno));
 	  if (!WIFSIGNALED (status))
 	    warning (_("test pt: expected killed. status: %d."),
 		     status);
@@ -596,7 +624,7 @@ linux_supports_bts (void)
   return cached > 0;
 }
 
-/* Check whether the linux target supports Intel(R) Processor Trace.  */
+/* Check whether the linux target supports Intel Processor Trace.  */
 
 static int
 linux_supports_pt (void)
@@ -642,12 +670,12 @@ linux_enable_bts (ptid_t ptid, const str
   struct perf_event_mmap_page *header;
   struct btrace_target_info *tinfo;
   struct btrace_tinfo_bts *bts;
-  unsigned long long size, pages, data_offset, data_size;
+  size_t size, pages;
+  __u64 data_offset;
   int pid, pg;
 
-  tinfo = xzalloc (sizeof (*tinfo));
+  tinfo = XCNEW (struct btrace_target_info);
   tinfo->ptid = ptid;
-  tinfo->ptr_bits = linux_determine_kernel_ptr_bits ();
 
   tinfo->conf.format = BTRACE_FORMAT_BTS;
   bts = &tinfo->variant.bts;
@@ -674,32 +702,41 @@ linux_enable_bts (ptid_t ptid, const str
     goto err_out;
 
   /* Convert the requested size in bytes to pages (rounding up).  */
-  pages = (((unsigned long long) conf->size) + PAGE_SIZE - 1) / PAGE_SIZE;
+  pages = ((size_t) conf->size / PAGE_SIZE
+	   + ((conf->size % PAGE_SIZE) == 0 ? 0 : 1));
   /* We need at least one page.  */
   if (pages == 0)
     pages = 1;
 
   /* The buffer size can be requested in powers of two pages.  Adjust PAGES
      to the next power of two.  */
-  for (pg = 0; pages != (1u << pg); ++pg)
-    if ((pages & (1u << pg)) != 0)
-      pages += (1u << pg);
+  for (pg = 0; pages != ((size_t) 1 << pg); ++pg)
+    if ((pages & ((size_t) 1 << pg)) != 0)
+      pages += ((size_t) 1 << pg);
 
   /* We try to allocate the requested size.
      If that fails, try to get as much as we can.  */
   for (; pages > 0; pages >>= 1)
     {
       size_t length;
+      __u64 data_size;
+
+      data_size = (__u64) pages * PAGE_SIZE;
 
-      size = pages * PAGE_SIZE;
+      /* Don't ask for more than we can represent in the configuration.  */
+      if ((__u64) UINT_MAX < data_size)
+	continue;
+
+      size = (size_t) data_size;
       length = size + PAGE_SIZE;
 
       /* Check for overflows.  */
-      if ((unsigned long long) length < size)
+      if ((__u64) length != data_size + PAGE_SIZE)
 	continue;
 
       /* The number of pages we request needs to be a power of two.  */
-      header = mmap (NULL, length, PROT_READ, MAP_SHARED, bts->file, 0);
+      header = ((struct perf_event_mmap_page *)
+		mmap (NULL, length, PROT_READ, MAP_SHARED, bts->file, 0));
       if (header != MAP_FAILED)
 	break;
     }
@@ -708,23 +745,33 @@ linux_enable_bts (ptid_t ptid, const str
     goto err_file;
 
   data_offset = PAGE_SIZE;
-  data_size = size;
 
 #if defined (PERF_ATTR_SIZE_VER5)
   if (offsetof (struct perf_event_mmap_page, data_size) <= header->size)
     {
+      __u64 data_size;
+
       data_offset = header->data_offset;
       data_size = header->data_size;
+
+      size = (unsigned int) data_size;
+
+      /* Check for overflows.  */
+      if ((__u64) size != data_size)
+	{
+	  munmap ((void *) header, size + PAGE_SIZE);
+	  goto err_file;
+	}
     }
 #endif /* defined (PERF_ATTR_SIZE_VER5) */
 
   bts->header = header;
   bts->bts.mem = ((const uint8_t *) header) + data_offset;
-  bts->bts.size = data_size;
+  bts->bts.size = size;
   bts->bts.data_head = &header->data_head;
-  bts->bts.last_head = 0;
+  bts->bts.last_head = 0ull;
 
-  tinfo->conf.bts.size = data_size;
+  tinfo->conf.bts.size = (unsigned int) size;
   return tinfo;
 
  err_file:
@@ -738,7 +785,7 @@ linux_enable_bts (ptid_t ptid, const str
 
 #if defined (PERF_ATTR_SIZE_VER5)
 
-/* Enable branch tracing in Intel(R) Processor Trace format.  */
+/* Enable branch tracing in Intel Processor Trace format.  */
 
 static struct btrace_target_info *
 linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
@@ -746,7 +793,7 @@ linux_enable_pt (ptid_t ptid, const stru
   struct perf_event_mmap_page *header;
   struct btrace_target_info *tinfo;
   struct btrace_tinfo_pt *pt;
-  unsigned long long pages, size;
+  size_t pages, size;
   int pid, pg, errcode, type;
 
   if (conf->size == 0)
@@ -760,9 +807,8 @@ linux_enable_pt (ptid_t ptid, const stru
   if (pid == 0)
     pid = ptid_get_pid (ptid);
 
-  tinfo = xzalloc (sizeof (*tinfo));
+  tinfo = XCNEW (struct btrace_target_info);
   tinfo->ptid = ptid;
-  tinfo->ptr_bits = 0;
 
   tinfo->conf.format = BTRACE_FORMAT_PT;
   pt = &tinfo->variant.pt;
@@ -780,42 +826,52 @@ linux_enable_pt (ptid_t ptid, const stru
     goto err;
 
   /* Allocate the configuration page. */
-  header = mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
-		 pt->file, 0);
+  header = ((struct perf_event_mmap_page *)
+	    mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
+		  pt->file, 0));
   if (header == MAP_FAILED)
     goto err_file;
 
   header->aux_offset = header->data_offset + header->data_size;
 
   /* Convert the requested size in bytes to pages (rounding up).  */
-  pages = (((unsigned long long) conf->size) + PAGE_SIZE - 1) / PAGE_SIZE;
+  pages = ((size_t) conf->size / PAGE_SIZE
+	   + ((conf->size % PAGE_SIZE) == 0 ? 0 : 1));
   /* We need at least one page.  */
   if (pages == 0)
     pages = 1;
 
   /* The buffer size can be requested in powers of two pages.  Adjust PAGES
      to the next power of two.  */
-  for (pg = 0; pages != (1u << pg); ++pg)
-    if ((pages & (1u << pg)) != 0)
-      pages += (1u << pg);
+  for (pg = 0; pages != ((size_t) 1 << pg); ++pg)
+    if ((pages & ((size_t) 1 << pg)) != 0)
+      pages += ((size_t) 1 << pg);
 
   /* We try to allocate the requested size.
      If that fails, try to get as much as we can.  */
   for (; pages > 0; pages >>= 1)
     {
       size_t length;
+      __u64 data_size;
 
-      size = pages * PAGE_SIZE;
-      length = size;
+      data_size = (__u64) pages * PAGE_SIZE;
+
+      /* Don't ask for more than we can represent in the configuration.  */
+      if ((__u64) UINT_MAX < data_size)
+	continue;
+
+      size = (size_t) data_size;
 
       /* Check for overflows.  */
-      if ((unsigned long long) length < size)
+      if ((__u64) size != data_size)
 	continue;
 
-      header->aux_size = size;
+      header->aux_size = data_size;
+      length = size;
 
-      pt->pt.mem = mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file,
-			 header->aux_offset);
+      pt->pt.mem = ((const uint8_t *)
+		    mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file,
+			  header->aux_offset));
       if (pt->pt.mem != MAP_FAILED)
 	break;
     }
@@ -827,7 +883,7 @@ linux_enable_pt (ptid_t ptid, const stru
   pt->pt.size = size;
   pt->pt.data_head = &header->aux_head;
 
-  tinfo->conf.pt.size = size;
+  tinfo->conf.pt.size = (unsigned int) size;
   return tinfo;
 
  err_conf:
@@ -888,7 +944,7 @@ linux_disable_bts (struct btrace_tinfo_b
   return BTRACE_ERR_NONE;
 }
 
-/* Disable Intel(R) Processor Trace tracing.  */
+/* Disable Intel Processor Trace tracing.  */
 
 static enum btrace_error
 linux_disable_pt (struct btrace_tinfo_pt *tinfo)
@@ -938,7 +994,8 @@ linux_read_bts (struct btrace_data_bts *
 {
   struct perf_event_buffer *pevent;
   const uint8_t *begin, *end, *start;
-  unsigned long long data_head, data_tail, buffer_size, size;
+  size_t buffer_size, size;
+  __u64 data_head, data_tail;
   unsigned int retries = 5;
 
   pevent = &tinfo->variant.bts.bts;
@@ -961,6 +1018,8 @@ linux_read_bts (struct btrace_data_bts *
 
       if (type == BTRACE_READ_DELTA)
 	{
+	  __u64 data_size;
+
 	  /* Determine the number of bytes to read and check for buffer
 	     overflows.  */
 
@@ -971,9 +1030,12 @@ linux_read_bts (struct btrace_data_bts *
 	    return BTRACE_ERR_OVERFLOW;
 
 	  /* If the buffer is smaller than the trace delta, we overflowed.  */
-	  size = data_head - data_tail;
-	  if (buffer_size < size)
+	  data_size = data_head - data_tail;
+	  if (buffer_size < data_size)
 	    return BTRACE_ERR_OVERFLOW;
+
+	  /* DATA_SIZE <= BUFFER_SIZE and therefore fits into a size_t.  */
+	  size = (size_t) data_size;
 	}
       else
 	{
@@ -982,7 +1044,7 @@ linux_read_bts (struct btrace_data_bts *
 
 	  /* Adjust the size if the buffer has not overflowed, yet.  */
 	  if (data_head < size)
-	    size = data_head;
+	    size = (size_t) data_head;
 	}
 
       /* Data_head keeps growing; the buffer itself is circular.  */
@@ -1017,7 +1079,7 @@ linux_read_bts (struct btrace_data_bts *
   return BTRACE_ERR_NONE;
 }
 
-/* Fill in the Intel(R) Processor Trace configuration information.  */
+/* Fill in the Intel Processor Trace configuration information.  */
 
 static void
 linux_fill_btrace_pt_config (struct btrace_data_pt_config *conf)
@@ -1025,7 +1087,7 @@ linux_fill_btrace_pt_config (struct btra
   conf->cpu = btrace_this_cpu ();
 }
 
-/* Read branch trace data in Intel(R) Processor Trace format for the thread
+/* Read branch trace data in Intel Processor Trace format for the thread
    given by TINFO into BTRACE using the TYPE reading method.  */
 
 static enum btrace_error
@@ -1079,7 +1141,7 @@ linux_read_btrace (struct btrace_data *b
       return linux_read_bts (&btrace->variant.bts, tinfo, type);
 
     case BTRACE_FORMAT_PT:
-      /* We read btrace in Intel(R) Processor Trace format.  */
+      /* We read btrace in Intel Processor Trace format.  */
       btrace->format = BTRACE_FORMAT_PT;
       btrace->variant.pt.data = NULL;
       btrace->variant.pt.size = 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-btrace.h ./gdb/nat/linux-btrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-btrace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-btrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux-dependent part of branch trace support for GDB, and GDBserver.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -38,13 +38,13 @@ struct perf_event_buffer
   const uint8_t *mem;
 
   /* The size of the mapped memory in bytes.  */
-  unsigned long long size;
+  size_t size;
 
   /* A pointer to the data_head field for this buffer. */
-  volatile unsigned long long *data_head;
+  volatile __u64 *data_head;
 
   /* The data_head value from the last read.  */
-  unsigned long long last_head;
+  __u64 last_head;
 };
 
 /* Branch trace target information for BTS tracing.  */
@@ -63,7 +63,8 @@ struct btrace_tinfo_bts
   struct perf_event_buffer bts;
 };
 
-/* Branch trace target information for Intel(R) Processor Trace.  */
+/* Branch trace target information for Intel Processor Trace
+   tracing.  */
 struct btrace_tinfo_pt
 {
   /* The Linux perf_event configuration for collecting the branch trace.  */
@@ -100,11 +101,6 @@ struct btrace_target_info
     struct btrace_tinfo_pt pt;
   } variant;
 #endif /* HAVE_LINUX_PERF_EVENT_H */
-
-  /* The size of a pointer in bits for this thread.
-     The information is used to identify kernel addresses in order to skip
-     records from/to kernel space.  */
-  int ptr_bits;
 };
 
 /* See to_supports_btrace in target.h.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-namespaces.c ./gdb/nat/linux-namespaces.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-namespaces.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-namespaces.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux namespaces(7) support.
 
-   Copyright (C) 2015 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,20 +32,33 @@
 /* See nat/linux-namespaces.h.  */
 int debug_linux_namespaces;
 
+/* Handle systems without fork.  */
+
+static inline pid_t
+do_fork (void)
+{
+#ifdef HAVE_FORK
+  return fork ();
+#else
+  errno = ENOSYS;
+  return -1;
+#endif
+}
+
 /* Handle systems without setns.  */
 
-#ifndef HAVE_SETNS
-static int
-setns (int fd, int nstype)
+static inline int
+do_setns (int fd, int nstype)
 {
-#ifdef __NR_setns
+#ifdef HAVE_SETNS
+  return setns (fd, nstype);
+#elif defined __NR_setns
   return syscall (__NR_setns, fd, nstype);
 #else
   errno = ENOSYS;
   return -1;
 #endif
 }
-#endif
 
 /* Handle systems without MSG_CMSG_CLOEXEC.  */
 
@@ -495,7 +508,7 @@ mnsh_recv_message (int sock, enum mnsh_m
 static ssize_t
 mnsh_handle_setns (int sock, int fd, int nstype)
 {
-  int result = setns (fd, nstype);
+  int result = do_setns (fd, nstype);
 
   return mnsh_return_int (sock, result, errno);
 }
@@ -644,7 +657,7 @@ linux_mntns_get_helper (void)
       if (gdb_socketpair_cloexec (AF_UNIX, SOCK_STREAM, 0, sv) < 0)
 	return NULL;
 
-      h.pid = fork ();
+      h.pid = do_fork ();
       if (h.pid < 0)
 	{
 	  int saved_errno = errno;
@@ -894,7 +907,7 @@ linux_mntns_access_fs (pid_t pid)
   if (fd < 0)
     goto error;
 
-  old_chain = make_cleanup_close (fd);
+  make_cleanup_close (fd);
 
   if (fstat (fd, &sb) != 0)
     goto error;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-namespaces.h ./gdb/nat/linux-namespaces.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-namespaces.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-namespaces.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux namespaces(7) support.
 
-   Copyright (C) 2015 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-nat.h ./gdb/nat/linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code for native debugging support for GNU/Linux (LWP layer).
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,11 @@
 struct lwp_info;
 struct arch_lwp_info;
 
+/* This is the kernel's hard limit.  Not to be confused with SIGRTMIN.  */
+#ifndef __SIGRTMIN
+#define __SIGRTMIN 32
+#endif
+
 /* Unlike other extended result codes, WSTOPSIG (status) on
    PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but
    instead SIGTRAP with bit 7 set.  */
@@ -80,4 +85,9 @@ extern enum target_stop_reason lwp_stop_
 
 extern void linux_stop_lwp (struct lwp_info *lwp);
 
+/* Return nonzero if we are single-stepping this LWP at the ptrace
+   level.  */
+
+extern int lwp_is_stepping (struct lwp_info *lwp);
+
 #endif /* LINUX_NAT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-osdata.c ./gdb/nat/linux-osdata.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-osdata.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-osdata.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux-specific functions to retrieve OS data.
    
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -78,7 +78,7 @@ linux_common_core_of_thread (ptid_t ptid
   for (;;)
     {
       int n;
-      content = xrealloc (content, content_read + 1024);
+      content = (char *) xrealloc (content, content_read + 1024);
       n = fread (content + content_read, 1, 1024, f);
       content_read += n;
       if (n < 1024)
@@ -337,7 +337,7 @@ linux_xfer_osdata_processes (gdb_byte *r
 		strcpy (user, "?");
 
 	      /* Find CPU cores used by the process.  */
-	      cores = (int *) xcalloc (num_cores, sizeof (int));
+	      cores = XCNEWVEC (int, num_cores);
 	      task_count = get_cores_used_by_process (pid, cores, num_cores);
 	      cores_str = (char *) xcalloc (task_count, sizeof ("4294967295") + 1);
 
@@ -460,7 +460,7 @@ linux_xfer_osdata_processgroups (gdb_byt
 	{
 	  struct dirent *dp;
 	  const size_t list_block_size = 512;
-	  PID_T *process_list = (PID_T *) xmalloc (list_block_size * 2 * sizeof (PID_T));
+	  PID_T *process_list = XNEWVEC (PID_T, list_block_size * 2);
 	  size_t process_count = 0;
 	  size_t i;
 
@@ -585,7 +585,8 @@ linux_xfer_osdata_threads (gdb_byte *rea
 		  || NAMELEN (dp) > sizeof ("4294967295") - 1)
 		continue;
 
-	      sprintf (procentry, "/proc/%s", dp->d_name);
+	      xsnprintf (procentry, sizeof (procentry), "/proc/%s",
+			 dp->d_name);
 	      if (stat (procentry, &statbuf) == 0
 		  && S_ISDIR (statbuf.st_mode))
 		{
@@ -797,7 +798,8 @@ linux_xfer_osdata_fds (gdb_byte *readbuf
 		  || NAMELEN (dp) > sizeof ("4294967295") - 1)
 		continue;
 
-	      sprintf (procentry, "/proc/%s", dp->d_name);
+	      xsnprintf (procentry, sizeof (procentry), "/proc/%s",
+			 dp->d_name);
 	      if (stat (procentry, &statbuf) == 0
 		  && S_ISDIR (statbuf.st_mode))
 		{
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-osdata.h ./gdb/nat/linux-osdata.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-osdata.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-osdata.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Linux-specific functions to retrieve OS data.
    
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-personality.c ./gdb/nat/linux-personality.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-personality.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-personality.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Disable address space randomization based on inferior personality.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-personality.h ./gdb/nat/linux-personality.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-personality.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-personality.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Disable address space randomization based on inferior personality.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-procfs.c ./gdb/nat/linux-procfs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-procfs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-procfs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Linux-specific PROCFS manipulation routines.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -70,19 +70,69 @@ linux_proc_get_tracerpid_nowarn (pid_t l
   return linux_proc_get_int (lwpid, "TracerPid", 0);
 }
 
-/* Fill in BUFFER, a buffer with BUFFER_SIZE bytes with the 'State'
+/* Process states as discovered in the 'State' line of
+   /proc/PID/status.  Not all possible states are represented here,
+   only those that we care about.  */
+
+enum proc_state
+{
+  /* Some state we don't handle.  */
+  PROC_STATE_UNKNOWN,
+
+  /* Stopped on a signal.  */
+  PROC_STATE_STOPPED,
+
+  /* Tracing stop.  */
+  PROC_STATE_TRACING_STOP,
+
+  /* Dead.  */
+  PROC_STATE_DEAD,
+
+  /* Zombie.  */
+  PROC_STATE_ZOMBIE,
+};
+
+/* Parse a PROC_STATE out of STATE, a buffer with the state found in
+   the 'State:' line of /proc/PID/status.  */
+
+static enum proc_state
+parse_proc_status_state (const char *state)
+{
+  state = skip_spaces_const (state);
+
+  switch (state[0])
+    {
+    case 't':
+      return PROC_STATE_TRACING_STOP;
+    case 'T':
+      /* Before Linux 2.6.33, tracing stop used uppercase T.  */
+      if (strcmp (state, "T (tracing stop)") == 0)
+	return PROC_STATE_TRACING_STOP;
+      else
+	return PROC_STATE_STOPPED;
+    case 'X':
+      return PROC_STATE_DEAD;
+    case 'Z':
+      return PROC_STATE_ZOMBIE;
+    }
+
+  return PROC_STATE_UNKNOWN;
+}
+
+
+/* Fill in STATE, a buffer with BUFFER_SIZE bytes with the 'State'
    line of /proc/PID/status.  Returns -1 on failure to open the /proc
    file, 1 if the line is found, and 0 if not found.  If WARN, warn on
    failure to open the /proc file.  */
 
 static int
-linux_proc_pid_get_state (pid_t pid, char *buffer, size_t buffer_size,
-			  int warn)
+linux_proc_pid_get_state (pid_t pid, int warn, enum proc_state *state)
 {
   FILE *procfile;
   int have_state;
+  char buffer[100];
 
-  xsnprintf (buffer, buffer_size, "/proc/%d/status", (int) pid);
+  xsnprintf (buffer, sizeof (buffer), "/proc/%d/status", (int) pid);
   procfile = gdb_fopen_cloexec (buffer, "r");
   if (procfile == NULL)
     {
@@ -92,10 +142,11 @@ linux_proc_pid_get_state (pid_t pid, cha
     }
 
   have_state = 0;
-  while (fgets (buffer, buffer_size, procfile) != NULL)
+  while (fgets (buffer, sizeof (buffer), procfile) != NULL)
     if (startswith (buffer, "State:"))
       {
 	have_state = 1;
+	*state = parse_proc_status_state (buffer + sizeof ("State:") - 1);
 	break;
       }
   fclose (procfile);
@@ -107,10 +158,10 @@ linux_proc_pid_get_state (pid_t pid, cha
 int
 linux_proc_pid_is_gone (pid_t pid)
 {
-  char buffer[100];
   int have_state;
+  enum proc_state state;
 
-  have_state = linux_proc_pid_get_state (pid, buffer, sizeof buffer, 0);
+  have_state = linux_proc_pid_get_state (pid, 0, &state);
   if (have_state < 0)
     {
       /* If we can't open the status file, assume the thread has
@@ -123,23 +174,20 @@ linux_proc_pid_is_gone (pid_t pid)
       return 0;
     }
   else
-    {
-      return (strstr (buffer, "Z (") != NULL
-	      || strstr (buffer, "X (") != NULL);
-    }
+    return (state == PROC_STATE_ZOMBIE || state == PROC_STATE_DEAD);
 }
 
 /* Return non-zero if 'State' of /proc/PID/status contains STATE.  If
    WARN, warn on failure to open the /proc file.  */
 
 static int
-linux_proc_pid_has_state (pid_t pid, const char *state, int warn)
+linux_proc_pid_has_state (pid_t pid, enum proc_state state, int warn)
 {
-  char buffer[100];
   int have_state;
+  enum proc_state cur_state;
 
-  have_state = linux_proc_pid_get_state (pid, buffer, sizeof buffer, warn);
-  return (have_state > 0 && strstr (buffer, state) != NULL);
+  have_state = linux_proc_pid_get_state (pid, warn, &cur_state);
+  return (have_state > 0 && cur_state == state);
 }
 
 /* Detect `T (stopped)' in `/proc/PID/status'.
@@ -148,16 +196,16 @@ linux_proc_pid_has_state (pid_t pid, con
 int
 linux_proc_pid_is_stopped (pid_t pid)
 {
-  return linux_proc_pid_has_state (pid, "T (stopped)", 1);
+  return linux_proc_pid_has_state (pid, PROC_STATE_STOPPED, 1);
 }
 
-/* Detect `T (tracing stop)' in `/proc/PID/status'.
+/* Detect `t (tracing stop)' in `/proc/PID/status'.
    Other states including `T (stopped)' are reported as false.  */
 
 int
 linux_proc_pid_is_trace_stopped_nowarn (pid_t pid)
 {
-  return linux_proc_pid_has_state (pid, "T (tracing stop)", 1);
+  return linux_proc_pid_has_state (pid, PROC_STATE_TRACING_STOP, 1);
 }
 
 /* Return non-zero if PID is a zombie.  If WARN, warn on failure to
@@ -166,7 +214,7 @@ linux_proc_pid_is_trace_stopped_nowarn (
 static int
 linux_proc_pid_is_zombie_maybe_warn (pid_t pid, int warn)
 {
-  return linux_proc_pid_has_state (pid, "Z (zombie)", warn);
+  return linux_proc_pid_has_state (pid, PROC_STATE_ZOMBIE, warn);
 }
 
 /* See linux-procfs.h declaration.  */
@@ -187,6 +235,48 @@ linux_proc_pid_is_zombie (pid_t pid)
 
 /* See linux-procfs.h.  */
 
+const char *
+linux_proc_tid_get_name (ptid_t ptid)
+{
+#define TASK_COMM_LEN 16  /* As defined in the kernel's sched.h.  */
+
+  static char comm_buf[TASK_COMM_LEN];
+  char comm_path[100];
+  FILE *comm_file;
+  const char *comm_val;
+  pid_t pid = ptid_get_pid (ptid);
+  pid_t tid = ptid_lwp_p (ptid) ? ptid_get_lwp (ptid) : ptid_get_pid (ptid);
+
+  xsnprintf (comm_path, sizeof (comm_path),
+	     "/proc/%ld/task/%ld/comm", (long) pid, (long) tid);
+
+  comm_file = gdb_fopen_cloexec (comm_path, "r");
+  if (comm_file == NULL)
+    return NULL;
+
+  comm_val = fgets (comm_buf, sizeof (comm_buf), comm_file);
+  fclose (comm_file);
+
+  if (comm_val != NULL)
+    {
+      int i;
+
+      /* Make sure there is no newline at the end.  */
+      for (i = 0; i < sizeof (comm_buf); i++)
+	{
+	  if (comm_buf[i] == '\n')
+	    {
+	      comm_buf[i] = '\0';
+	      break;
+	    }
+	}
+    }
+
+  return comm_val;
+}
+
+/* See linux-procfs.h.  */
+
 void
 linux_proc_attach_tgid_threads (pid_t pid,
 				linux_proc_attach_lwp_func attach_lwp)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-procfs.h ./gdb/nat/linux-procfs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-procfs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-procfs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Linux-specific PROCFS manipulation routines.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -54,6 +54,13 @@ extern int linux_proc_pid_is_zombie_nowa
 
 extern int linux_proc_pid_is_gone (pid_t pid);
 
+/* Return a string giving the thread's name or NULL if the
+   information is unavailable.  The returned value points to a statically
+   allocated buffer.  The value therefore becomes invalid at the next
+   linux_proc_tid_get_name call.  */
+
+extern const char *linux_proc_tid_get_name (ptid_t ptid);
+
 /* Callback function for linux_proc_attach_tgid_threads.  If the PTID
    thread is not yet known, try to attach to it and return true,
    otherwise return false.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-ptrace.c ./gdb/nat/linux-ptrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-ptrace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-ptrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Linux-specific ptrace manipulation routines.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,10 @@
 #include "linux-waitpid.h"
 #include "buffer.h"
 #include "gdb_wait.h"
+#include "gdb_ptrace.h"
+#ifdef HAVE_SYS_PROCFS_H
+#include <sys/procfs.h>
+#endif
 
 /* Stores the ptrace options supported by the running kernel.
    A value of -1 means we did not check for features yet.  A value
@@ -99,8 +103,10 @@ linux_ptrace_test_ret_to_nx (void)
   gdb_byte *return_address, *pc;
   long l;
   int status, kill_status;
+  elf_gregset_t regs;
 
-  return_address = mmap (NULL, 2, PROT_READ | PROT_WRITE,
+  return_address
+    = (gdb_byte *) mmap (NULL, 2, PROT_READ | PROT_WRITE,
 			 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (return_address == MAP_FAILED)
     {
@@ -186,23 +192,19 @@ linux_ptrace_test_ret_to_nx (void)
       return;
     }
 
-  errno = 0;
+  if (ptrace (PTRACE_GETREGS, child, (PTRACE_TYPE_ARG3) 0,
+	      (PTRACE_TYPE_ARG4) &regs) < 0)
+    {
+      warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_GETREGS: %s"),
+	       safe_strerror (errno));
+    }
 #if defined __i386__
-  l = ptrace (PTRACE_PEEKUSER, child, (PTRACE_TYPE_ARG3) (uintptr_t) (EIP * 4),
-	      (PTRACE_TYPE_ARG4) NULL);
+  pc = (gdb_byte *) (uintptr_t) regs[EIP];
 #elif defined __x86_64__
-  l = ptrace (PTRACE_PEEKUSER, child, (PTRACE_TYPE_ARG3) (uintptr_t) (RIP * 8),
-	      (PTRACE_TYPE_ARG4) NULL);
+  pc = (gdb_byte *) (uintptr_t) regs[RIP];
 #else
 # error "!__i386__ && !__x86_64__"
 #endif
-  if (errno != 0)
-    {
-      warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: %s"),
-	       safe_strerror (errno));
-      return;
-    }
-  pc = (void *) (uintptr_t) l;
 
   kill (child, SIGKILL);
   ptrace (PTRACE_KILL, child, (PTRACE_TYPE_ARG3) NULL,
@@ -259,7 +261,7 @@ linux_ptrace_test_ret_to_nx (void)
    FUNCTION).  For MMU targets, CHILD_STACK is ignored.  */
 
 static int
-linux_fork_to_function (gdb_byte *child_stack, void (*function) (gdb_byte *))
+linux_fork_to_function (gdb_byte *child_stack, int (*function) (void *))
 {
   int child_pid;
 
@@ -296,8 +298,8 @@ linux_fork_to_function (gdb_byte *child_
 /* A helper function for linux_check_ptrace_features, called after
    the child forks a grandchild.  */
 
-static void
-linux_grandchild_function (gdb_byte *child_stack)
+static int
+linux_grandchild_function (void *child_stack)
 {
   /* Free any allocated stack.  */
   xfree (child_stack);
@@ -311,14 +313,14 @@ linux_grandchild_function (gdb_byte *chi
    the parent process forks a child.  The child allows itself to
    be traced by its parent.  */
 
-static void
-linux_child_function (gdb_byte *child_stack)
+static int
+linux_child_function (void *child_stack)
 {
   ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
   kill (getpid (), SIGSTOP);
 
   /* Fork a grandchild.  */
-  linux_fork_to_function (child_stack, linux_grandchild_function);
+  linux_fork_to_function ((gdb_byte *) child_stack, linux_grandchild_function);
 
   /* This code is only reacheable by the child (grandchild's parent)
      process.  */
@@ -537,6 +539,17 @@ linux_supports_tracefork (void)
   return ptrace_supports_feature (PTRACE_O_TRACEFORK);
 }
 
+/* Returns non-zero if PTRACE_EVENT_EXEC is supported by ptrace,
+   0 otherwise.  Note that if PTRACE_EVENT_FORK is supported so is
+   PTRACE_EVENT_CLONE, PTRACE_EVENT_FORK and PTRACE_EVENT_VFORK,
+   since they were all added to the kernel at the same time.  */
+
+int
+linux_supports_traceexec (void)
+{
+  return ptrace_supports_feature (PTRACE_O_TRACEEXEC);
+}
+
 /* Returns non-zero if PTRACE_EVENT_CLONE is supported by ptrace,
    0 otherwise.  Note that if PTRACE_EVENT_CLONE is supported so is
    PTRACE_EVENT_FORK, PTRACE_EVENT_EXEC and PTRACE_EVENT_VFORK,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-ptrace.h ./gdb/nat/linux-ptrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-ptrace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-ptrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,7 @@
 
 struct buffer;
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 #ifdef __UCLIBC__
 #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
@@ -119,14 +119,14 @@ struct buffer;
 /* The x86 kernel gets some of the si_code values backwards, like
    this:
 
-   | what                                     | si_code    |
-   |------------------------------------------+------------|
-   | software breakpoints (int3)              | SI_KERNEL  |
-   | single-steps                             | TRAP_TRACE |
-   | single-stepping a syscall                | TRAP_BRKPT |
-   | user sent SIGTRAP                        | 0          |
-   | exec SIGTRAP (when no PTRACE_EVENT_EXEC) | 0          |
-   | hardware breakpoints/watchpoints         | TRAP_HWBPT |
+   | what                                     | si_code     |
+   |------------------------------------------+-------------|
+   | software breakpoints (int3)              | SI_KERNEL   |
+   | single-steps                             | TRAP_TRACE  |
+   | single-stepping a syscall                | TRAP_BRKPT  |
+   | user sent SIGTRAP                        | 0           |
+   | exec SIGTRAP (when no PTRACE_EVENT_EXEC) | 0           |
+   | hardware breakpoints/watchpoints         | TRAP_HWBKPT |
 
    That is, it reports SI_KERNEL for software breakpoints (and only
    for those), and TRAP_BRKPT for single-stepping a syscall...  If the
@@ -135,12 +135,40 @@ struct buffer;
    running to a breakpoint and checking what comes out of
    siginfo->si_code.
 
-   The generic Linux target code should use GDB_ARCH_TRAP_BRKPT
-   instead of TRAP_BRKPT to abstract out this x86 peculiarity.  */
+   The ppc kernel does use TRAP_BRKPT for software breakpoints
+   in PowerPC code, but it uses SI_KERNEL for software breakpoints
+   in SPU code on a Cell/B.E.  However, SI_KERNEL is never seen
+   on a SIGTRAP for any other reason.
+
+   The MIPS kernel up until 4.5 used SI_KERNEL for all kernel
+   generated traps.  Since:
+
+     - MIPS doesn't do hardware single-step.
+     - We don't need to care about exec SIGTRAPs --- we assume
+       PTRACE_EVENT_EXEC is available.
+     - The MIPS kernel doesn't support hardware breakpoints.
+
+   on MIPS, all we need to care about is distinguishing between
+   software breakpoints and hardware watchpoints, which can be done by
+   peeking the debug registers.
+
+   Beginning with Linux 4.6, the MIPS port reports proper TRAP_BRKPT and
+   TRAP_HWBKPT codes, so we also match them.
+
+   The generic Linux target code should use GDB_ARCH_IS_TRAP_* instead
+   of TRAP_* to abstract out these peculiarities.  */
 #if defined __i386__ || defined __x86_64__
-# define GDB_ARCH_TRAP_BRKPT SI_KERNEL
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == SI_KERNEL)
+# define GDB_ARCH_IS_TRAP_HWBKPT(X) ((X) == TRAP_HWBKPT)
+#elif defined __powerpc__
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == SI_KERNEL || (X) == TRAP_BRKPT)
+# define GDB_ARCH_IS_TRAP_HWBKPT(X) ((X) == TRAP_HWBKPT)
+#elif defined __mips__
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == SI_KERNEL || (X) == TRAP_BRKPT)
+# define GDB_ARCH_IS_TRAP_HWBKPT(X) ((X) == SI_KERNEL || (X) == TRAP_HWBKPT)
 #else
-# define GDB_ARCH_TRAP_BRKPT TRAP_BRKPT
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == TRAP_BRKPT)
+# define GDB_ARCH_IS_TRAP_HWBKPT(X) ((X) == TRAP_HWBKPT)
 #endif
 
 #ifndef TRAP_HWBKPT
@@ -161,6 +189,7 @@ extern void linux_check_ptrace_features 
 extern void linux_enable_event_reporting (pid_t pid, int attached);
 extern void linux_disable_event_reporting (pid_t pid);
 extern int linux_supports_tracefork (void);
+extern int linux_supports_traceexec (void);
 extern int linux_supports_traceclone (void);
 extern int linux_supports_tracevforkdone (void);
 extern int linux_supports_tracesysgood (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-waitpid.c ./gdb/nat/linux-waitpid.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-waitpid.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-waitpid.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Wrapper implementation for waitpid for GNU/Linux (LWP layer).
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,8 +74,7 @@ status_to_str (int status)
   return buf;
 }
 
-/* Wrapper function for waitpid which handles EINTR, and emulates
-   __WALL for systems where that is not available.  */
+/* See linux-waitpid.h.  */
 
 int
 my_waitpid (int pid, int *status, int flags)
@@ -84,67 +83,15 @@ my_waitpid (int pid, int *status, int fl
 
   linux_debug ("my_waitpid (%d, 0x%x)\n", pid, flags);
 
-  if (flags & __WALL)
+  do
     {
-      sigset_t block_mask, org_mask, wake_mask;
-      int wnohang;
-
-      wnohang = (flags & WNOHANG) != 0;
-      flags &= ~(__WALL | __WCLONE);
-
-      if (!wnohang)
-	{
-	  flags |= WNOHANG;
-
-	  /* Block all signals while here.  This avoids knowing about
-	     LinuxThread's signals.  */
-	  sigfillset (&block_mask);
-	  sigprocmask (SIG_BLOCK, &block_mask, &org_mask);
-
-	  /* ... except during the sigsuspend below.  */
-	  sigemptyset (&wake_mask);
-	}
-
-      while (1)
-	{
-	  /* Since all signals are blocked, there's no need to check
-	     for EINTR here.  */
-	  ret = waitpid (pid, status, flags);
-	  out_errno = errno;
-
-	  if (ret == -1 && out_errno != ECHILD)
-	    break;
-	  else if (ret > 0)
-	    break;
-
-	  if (flags & __WCLONE)
-	    {
-	      /* We've tried both flavors now.  If WNOHANG is set,
-		 there's nothing else to do, just bail out.  */
-	      if (wnohang)
-		break;
-
-	      linux_debug ("blocking\n");
-
-	      /* Block waiting for signals.  */
-	      sigsuspend (&wake_mask);
-	    }
-	  flags ^= __WCLONE;
-	}
-
-      if (!wnohang)
-	sigprocmask (SIG_SETMASK, &org_mask, NULL);
-    }
-  else
-    {
-      do
-	ret = waitpid (pid, status, flags);
-      while (ret == -1 && errno == EINTR);
-      out_errno = errno;
+      ret = waitpid (pid, status, flags);
     }
+  while (ret == -1 && errno == EINTR);
+  out_errno = errno;
 
   linux_debug ("my_waitpid (%d, 0x%x): status(%x), %d\n",
-	       pid, flags, status ? *status : -1, ret);
+	       pid, flags, (ret > 0 && status != NULL) ? *status : -1, ret);
 
   errno = out_errno;
   return ret;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-waitpid.h ./gdb/nat/linux-waitpid.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/linux-waitpid.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/linux-waitpid.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Wrapper for waitpid for GNU/Linux (LWP layer).
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,8 +20,7 @@
 #ifndef LINUX_WAITPID_H
 #define LINUX_WAITPID_H
 
-/* Wrapper function for waitpid which handles EINTR, and emulates
-   __WALL for systems where that is not available.  */
+/* Wrapper function for waitpid which handles EINTR.  */
 extern int my_waitpid (int pid, int *status, int flags);
 
 /* Convert wait status STATUS to a string.  Used for printing debug
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/mips-linux-watch.c ./gdb/nat/mips-linux-watch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/mips-linux-watch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/mips-linux-watch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,7 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "common-defs.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include "mips-linux-watch.h"
 
 /* Assuming usable watch registers REGS, return the irw_mask of
@@ -164,7 +164,7 @@ mips_linux_read_watch_registers (long lw
 {
   if (force || *watch_readback_valid == 0)
     {
-      if (ptrace (PTRACE_GET_WATCH_REGS, lwpid, watch_readback) == -1)
+      if (ptrace (PTRACE_GET_WATCH_REGS, lwpid, watch_readback, NULL) == -1)
 	{
 	  *watch_readback_valid = -1;
 	  return 0;
@@ -198,7 +198,7 @@ mips_linux_read_watch_registers (long lw
 /* Convert GDB's TYPE to an IRW mask.  */
 
 uint32_t
-mips_linux_watch_type_to_irw (int type)
+mips_linux_watch_type_to_irw (enum target_hw_bp_type type)
 {
   switch (type)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/mips-linux-watch.h ./gdb/nat/mips-linux-watch.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/mips-linux-watch.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/mips-linux-watch.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -94,7 +94,7 @@ struct mips_watchpoint
 {
   CORE_ADDR addr;
   int len;
-  int type;
+  enum target_hw_bp_type type;
   struct mips_watchpoint *next;
 };
 
@@ -110,7 +110,7 @@ int mips_linux_watch_try_one_watch (stru
 				    CORE_ADDR addr, int len, uint32_t irw);
 void mips_linux_watch_populate_regs (struct mips_watchpoint *current_watches,
 				     struct pt_watch_regs *regs);
-uint32_t mips_linux_watch_type_to_irw (int type);
+uint32_t mips_linux_watch_type_to_irw (enum target_hw_bp_type type);
 
 int mips_linux_read_watch_registers (long lwpid,
 				     struct pt_watch_regs *watch_readback,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/ppc-linux.c ./gdb/nat/ppc-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/ppc-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/ppc-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/*Copyright (C) 2015 Free Software Foundation, Inc.
+/*Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/ppc-linux.h ./gdb/nat/ppc-linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/ppc-linux.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/ppc-linux.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-cpuid.h ./gdb/nat/x86-cpuid.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-cpuid.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-cpuid.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* C API for x86 cpuid insn.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-dregs.c ./gdb/nat/x86-dregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-dregs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-dregs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Debug register code for x86 (i386 and x86-64).
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-dregs.h ./gdb/nat/x86-dregs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-dregs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-dregs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Debug register code for x86 (i386 and x86-64).
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-gcc-cpuid.h ./gdb/nat/x86-gcc-cpuid.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-gcc-cpuid.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-gcc-cpuid.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,9 +1,9 @@
 /*
- * Helper cpuid.h file copied from gcc-4.8.0.  Code in gdb should not
+ * Helper cpuid.h file copied from gcc-6.0.0.  Code in gdb should not
  * include this directly, but pull in x86-cpuid.h and use that func.
  */
 /*
- * Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ * Copyright (C) 2007-2017 Free Software Foundation, Inc.
  *
  * This file is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -61,31 +61,56 @@
 #define bit_LWP 	(1 << 15)
 #define bit_FMA4        (1 << 16)
 #define bit_TBM         (1 << 21)
+#define bit_MWAITX      (1 << 29)
 
 /* %edx */
+#define bit_AVX5124VNNIW (1 << 2)
+#define bit_AVX5124FMAPS (1 << 3)
 #define bit_MMXEXT	(1 << 22)
 #define bit_LM		(1 << 29)
 #define bit_3DNOWP	(1 << 30)
 #define bit_3DNOW	(1 << 31)
 
+/* %ebx.  */
+#define bit_CLZERO	(1 << 0)
+
 /* Extended Features (%eax == 7) */
+/* %ebx */
 #define bit_FSGSBASE	(1 << 0)
 #define bit_BMI	(1 << 3)
 #define bit_HLE	(1 << 4)
 #define bit_AVX2	(1 << 5)
 #define bit_BMI2	(1 << 8)
 #define bit_RTM	(1 << 11)
+#define bit_MPX	(1 << 14)
 #define bit_AVX512F	(1 << 16)
-#define bit_MPX (1 << 14)
+#define bit_AVX512DQ	(1 << 17)
 #define bit_RDSEED	(1 << 18)
 #define bit_ADX	(1 << 19)
+#define bit_AVX512IFMA	(1 << 21)
+#define bit_CLFLUSHOPT	(1 << 23)
+#define bit_CLWB	(1 << 24)
 #define bit_AVX512PF	(1 << 26)
 #define bit_AVX512ER	(1 << 27)
 #define bit_AVX512CD	(1 << 28)
 #define bit_SHA		(1 << 29)
+#define bit_AVX512BW	(1 << 30)
+#define bit_AVX512VL	(1 << 31)
+
+/* %ecx */
+#define bit_PREFETCHWT1	  (1 << 0)
+#define bit_AVX512VBMI	(1 << 1)
+#define bit_PKU	(1 << 3)
+#define bit_OSPKE	(1 << 4)
+
+/* XFEATURE_ENABLED_MASK register bits (%eax == 13, %ecx == 0) */
+#define bit_BNDREGS     (1 << 3)
+#define bit_BNDCSR      (1 << 4)
 
 /* Extended State Enumeration Sub-leaf (%eax == 13, %ecx == 1) */
 #define bit_XSAVEOPT	(1 << 0)
+#define bit_XSAVEC	(1 << 1)
+#define bit_XSAVES	(1 << 3)
 
 /* Signatures for different CPU implementations as returned in uses
    of cpuid with level 0.  */
@@ -141,55 +166,6 @@
 #define signature_VORTEX_ecx	0x436f5320
 #define signature_VORTEX_edx	0x36387865
 
-#if defined(__i386__) && defined(__PIC__)
-/* %ebx may be the PIC register.  */
-#if __GNUC__ >= 3
-#define __cpuid(level, a, b, c, d)			\
-  __asm__ ("xchg{l}\t{%%}ebx, %k1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchg{l}\t{%%}ebx, %k1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level))
-
-#define __cpuid_count(level, count, a, b, c, d)		\
-  __asm__ ("xchg{l}\t{%%}ebx, %k1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchg{l}\t{%%}ebx, %k1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level), "2" (count))
-#else
-/* Host GCCs older than 3.0 weren't supporting Intel asm syntax
-   nor alternatives in i386 code.  */
-#define __cpuid(level, a, b, c, d)			\
-  __asm__ ("xchgl\t%%ebx, %k1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchgl\t%%ebx, %k1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level))
-
-#define __cpuid_count(level, count, a, b, c, d)		\
-  __asm__ ("xchgl\t%%ebx, %k1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchgl\t%%ebx, %k1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level), "2" (count))
-#endif
-#elif defined(__x86_64__) && (defined(__code_model_medium__) || defined(__code_model_large__)) && defined(__PIC__)
-/* %rbx may be the PIC register.  */
-#define __cpuid(level, a, b, c, d)			\
-  __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchg{q}\t{%%}rbx, %q1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level))
-
-#define __cpuid_count(level, count, a, b, c, d)		\
-  __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t"			\
-	   "cpuid\n\t"					\
-	   "xchg{q}\t{%%}rbx, %q1\n\t"			\
-	   : "=a" (a), "=&r" (b), "=c" (c), "=d" (d)	\
-	   : "0" (level), "2" (count))
-#else
 #define __cpuid(level, a, b, c, d)			\
   __asm__ ("cpuid\n\t"					\
 	   : "=a" (a), "=b" (b), "=c" (c), "=d" (d)	\
@@ -199,7 +175,7 @@
   __asm__ ("cpuid\n\t"					\
 	   : "=a" (a), "=b" (b), "=c" (c), "=d" (d)	\
 	   : "0" (level), "2" (count))
-#endif
+
 
 /* Return highest supported input value for cpuid instruction.  ext can
    be either 0x0 or 0x8000000 to return highest supported value for
@@ -258,21 +234,37 @@ __get_cpuid_max (unsigned int __ext, uns
   return __eax;
 }
 
-/* Return cpuid data for requested cpuid level, as found in returned
+/* Return cpuid data for requested cpuid leaf, as found in returned
    eax, ebx, ecx and edx registers.  The function checks if cpuid is
    supported and returns 1 for valid cpuid information or 0 for
-   unsupported cpuid level.  All pointers are required to be non-null.  */
+   unsupported cpuid leaf.  All pointers are required to be non-null.  */
 
 static __inline int
-__get_cpuid (unsigned int __level,
+__get_cpuid (unsigned int __leaf,
 	     unsigned int *__eax, unsigned int *__ebx,
 	     unsigned int *__ecx, unsigned int *__edx)
 {
-  unsigned int __ext = __level & 0x80000000;
+  unsigned int __ext = __leaf & 0x80000000;
+
+  if (__get_cpuid_max (__ext, 0) < __leaf)
+    return 0;
+
+  __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
+  return 1;
+}
+
+/* Same as above, but sub-leaf can be specified.  */
+
+static __inline int
+__get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
+		   unsigned int *__eax, unsigned int *__ebx,
+		   unsigned int *__ecx, unsigned int *__edx)
+{
+  unsigned int __ext = __leaf & 0x80000000;
 
-  if (__get_cpuid_max (__ext, 0) < __level)
+  if (__get_cpuid_max (__ext, 0) < __leaf)
     return 0;
 
-  __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
+  __cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
   return 1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux.c ./gdb/nat/x86-linux.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-linux.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux-dregs.c ./gdb/nat/x86-linux-dregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux-dregs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-linux-dregs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level debug register code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "common-defs.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/user.h>
 #include "target/waitstatus.h"
 #include "nat/x86-linux.h"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux-dregs.h ./gdb/nat/x86-linux-dregs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux-dregs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-linux-dregs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low-level debug register code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux.h ./gdb/nat/x86-linux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nat/x86-linux.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nat/x86-linux.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-nat.c ./gdb/nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for NetBSD.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-nat.h ./gdb/nbsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nbsd-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for NetBSD.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-tdep.c ./gdb/nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target-dependent code for NetBSD systems.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Wasabi Systems, Inc.
   
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-tdep.h ./gdb/nbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Common target-dependent definitions for NetBSD systems.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nds32-tdep.c ./gdb/nds32-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nds32-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nds32-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,2175 @@
+/* Target-dependent code for the NDS32 architecture, for GDB.
+
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+   Contributed by Andes Technology Corporation.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "symtab.h"
+#include "gdbtypes.h"
+#include "gdbcore.h"
+#include "value.h"
+#include "reggroups.h"
+#include "inferior.h"
+#include "osabi.h"
+#include "arch-utils.h"
+#include "regcache.h"
+#include "dis-asm.h"
+#include "user-regs.h"
+#include "elf-bfd.h"
+#include "dwarf2-frame.h"
+#include "remote.h"
+#include "target-descriptions.h"
+
+#include "nds32-tdep.h"
+#include "elf/nds32.h"
+#include "opcode/nds32.h"
+#include <algorithm>
+
+#include "features/nds32.c"
+
+/* Simple macros for instruction analysis.  */
+#define CHOP_BITS(insn, n)	(insn & ~__MASK (n))
+#define N32_LSMW_ENABLE4(insn)	(((insn) >> 6) & 0xf)
+#define N32_SMW_ADM \
+	N32_TYPE4 (LSMW, 0, 0, 0, 1, (N32_LSMW_ADM << 2) | N32_LSMW_LSMW)
+#define N32_LMW_BIM \
+	N32_TYPE4 (LSMW, 0, 0, 0, 0, (N32_LSMW_BIM << 2) | N32_LSMW_LSMW)
+#define N32_FLDI_SP \
+	N32_TYPE2 (LDC, 0, REG_SP, 0)
+
+extern void _initialize_nds32_tdep (void);
+
+/* Use an invalid address value as 'not available' marker.  */
+enum { REG_UNAVAIL = (CORE_ADDR) -1 };
+
+/* Use an impossible value as invalid offset.  */
+enum { INVALID_OFFSET = (CORE_ADDR) -1 };
+
+/* Instruction groups for NDS32 epilogue analysis.  */
+enum
+{
+  /* Instructions used everywhere, not only in epilogue.  */
+  INSN_NORMAL,
+  /* Instructions used to reset sp for local vars, arguments, etc.  */
+  INSN_RESET_SP,
+  /* Instructions used to recover saved regs and to recover padding.  */
+  INSN_RECOVER,
+  /* Instructions used to return to the caller.  */
+  INSN_RETURN,
+  /* Instructions used to recover saved regs and to return to the caller.  */
+  INSN_RECOVER_RETURN,
+};
+
+static const char *const nds32_register_names[] =
+{
+  /* 32 GPRs.  */
+  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+  "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+  "r24", "r25", "r26", "r27", "fp", "gp", "lp", "sp",
+  /* PC.  */
+  "pc",
+};
+
+static const char *const nds32_fdr_register_names[] =
+{
+  "fd0", "fd1", "fd2", "fd3", "fd4", "fd5", "fd6", "fd7",
+  "fd8", "fd9", "fd10", "fd11", "fd12", "fd13", "fd14", "fd15",
+  "fd16", "fd17", "fd18", "fd19", "fd20", "fd21", "fd22", "fd23",
+  "fd24", "fd25", "fd26", "fd27", "fd28", "fd29", "fd30", "fd31"
+};
+
+static const char *const nds32_fsr_register_names[] =
+{
+  "fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",
+  "fs8", "fs9", "fs10", "fs11", "fs12", "fs13", "fs14", "fs15",
+  "fs16", "fs17", "fs18", "fs19", "fs20", "fs21", "fs22", "fs23",
+  "fs24", "fs25", "fs26", "fs27", "fs28", "fs29", "fs30", "fs31"
+};
+
+/* The number of registers for four FPU configuration options.  */
+const int num_fdr_map[] = { 4, 8, 16, 32 };
+const int num_fsr_map[] = { 8, 16, 32, 32 };
+
+/* Aliases for registers.  */
+static const struct
+{
+  const char *name;
+  const char *alias;
+} nds32_register_aliases[] =
+{
+  {"r15", "ta"},
+  {"r26", "p0"},
+  {"r27", "p1"},
+  {"fp", "r28"},
+  {"gp", "r29"},
+  {"lp", "r30"},
+  {"sp", "r31"},
+
+  {"cr0", "cpu_ver"},
+  {"cr1", "icm_cfg"},
+  {"cr2", "dcm_cfg"},
+  {"cr3", "mmu_cfg"},
+  {"cr4", "msc_cfg"},
+  {"cr5", "core_id"},
+  {"cr6", "fucop_exist"},
+  {"cr7", "msc_cfg2"},
+
+  {"ir0", "psw"},
+  {"ir1", "ipsw"},
+  {"ir2", "p_psw"},
+  {"ir3", "ivb"},
+  {"ir4", "eva"},
+  {"ir5", "p_eva"},
+  {"ir6", "itype"},
+  {"ir7", "p_itype"},
+  {"ir8", "merr"},
+  {"ir9", "ipc"},
+  {"ir10", "p_ipc"},
+  {"ir11", "oipc"},
+  {"ir12", "p_p0"},
+  {"ir13", "p_p1"},
+  {"ir14", "int_mask"},
+  {"ir15", "int_pend"},
+  {"ir16", "sp_usr"},
+  {"ir17", "sp_priv"},
+  {"ir18", "int_pri"},
+  {"ir19", "int_ctrl"},
+  {"ir20", "sp_usr1"},
+  {"ir21", "sp_priv1"},
+  {"ir22", "sp_usr2"},
+  {"ir23", "sp_priv2"},
+  {"ir24", "sp_usr3"},
+  {"ir25", "sp_priv3"},
+  {"ir26", "int_mask2"},
+  {"ir27", "int_pend2"},
+  {"ir28", "int_pri2"},
+  {"ir29", "int_trigger"},
+
+  {"mr0", "mmu_ctl"},
+  {"mr1", "l1_pptb"},
+  {"mr2", "tlb_vpn"},
+  {"mr3", "tlb_data"},
+  {"mr4", "tlb_misc"},
+  {"mr5", "vlpt_idx"},
+  {"mr6", "ilmb"},
+  {"mr7", "dlmb"},
+  {"mr8", "cache_ctl"},
+  {"mr9", "hsmp_saddr"},
+  {"mr10", "hsmp_eaddr"},
+  {"mr11", "bg_region"},
+
+  {"dr0", "bpc0"},
+  {"dr1", "bpc1"},
+  {"dr2", "bpc2"},
+  {"dr3", "bpc3"},
+  {"dr4", "bpc4"},
+  {"dr5", "bpc5"},
+  {"dr6", "bpc6"},
+  {"dr7", "bpc7"},
+  {"dr8", "bpa0"},
+  {"dr9", "bpa1"},
+  {"dr10", "bpa2"},
+  {"dr11", "bpa3"},
+  {"dr12", "bpa4"},
+  {"dr13", "bpa5"},
+  {"dr14", "bpa6"},
+  {"dr15", "bpa7"},
+  {"dr16", "bpam0"},
+  {"dr17", "bpam1"},
+  {"dr18", "bpam2"},
+  {"dr19", "bpam3"},
+  {"dr20", "bpam4"},
+  {"dr21", "bpam5"},
+  {"dr22", "bpam6"},
+  {"dr23", "bpam7"},
+  {"dr24", "bpv0"},
+  {"dr25", "bpv1"},
+  {"dr26", "bpv2"},
+  {"dr27", "bpv3"},
+  {"dr28", "bpv4"},
+  {"dr29", "bpv5"},
+  {"dr30", "bpv6"},
+  {"dr31", "bpv7"},
+  {"dr32", "bpcid0"},
+  {"dr33", "bpcid1"},
+  {"dr34", "bpcid2"},
+  {"dr35", "bpcid3"},
+  {"dr36", "bpcid4"},
+  {"dr37", "bpcid5"},
+  {"dr38", "bpcid6"},
+  {"dr39", "bpcid7"},
+  {"dr40", "edm_cfg"},
+  {"dr41", "edmsw"},
+  {"dr42", "edm_ctl"},
+  {"dr43", "edm_dtr"},
+  {"dr44", "bpmtc"},
+  {"dr45", "dimbr"},
+  {"dr46", "tecr0"},
+  {"dr47", "tecr1"},
+
+  {"hspr0", "hsp_ctl"},
+  {"hspr1", "sp_bound"},
+  {"hspr2", "sp_bound_priv"},
+
+  {"pfr0", "pfmc0"},
+  {"pfr1", "pfmc1"},
+  {"pfr2", "pfmc2"},
+  {"pfr3", "pfm_ctl"},
+  {"pfr4", "pft_ctl"},
+
+  {"dmar0", "dma_cfg"},
+  {"dmar1", "dma_gcsw"},
+  {"dmar2", "dma_chnsel"},
+  {"dmar3", "dma_act"},
+  {"dmar4", "dma_setup"},
+  {"dmar5", "dma_isaddr"},
+  {"dmar6", "dma_esaddr"},
+  {"dmar7", "dma_tcnt"},
+  {"dmar8", "dma_status"},
+  {"dmar9", "dma_2dset"},
+  {"dmar10", "dma_2dsctl"},
+  {"dmar11", "dma_rcnt"},
+  {"dmar12", "dma_hstatus"},
+
+  {"racr0", "prusr_acc_ctl"},
+  {"fucpr", "fucop_ctl"},
+
+  {"idr0", "sdz_ctl"},
+  {"idr1", "misc_ctl"},
+  {"idr2", "ecc_misc"},
+
+  {"secur0", "sfcr"},
+  {"secur1", "sign"},
+  {"secur2", "isign"},
+  {"secur3", "p_isign"},
+};
+
+/* Value of a register alias.  BATON is the regnum of the corresponding
+   register.  */
+
+static struct value *
+value_of_nds32_reg (struct frame_info *frame, const void *baton)
+{
+  return value_of_register ((int) (intptr_t) baton, frame);
+}
+
+/* Implement the "frame_align" gdbarch method.  */
+
+static CORE_ADDR
+nds32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+  /* 8-byte aligned.  */
+  return align_down (sp, 8);
+}
+
+/* The same insn machine code is used for little-endian and big-endian.  */
+constexpr gdb_byte nds32_break_insn[] = { 0xEA, 0x00 };
+
+typedef BP_MANIPULATION (nds32_break_insn) nds32_breakpoint;
+
+/* Implement the "dwarf2_reg_to_regnum" gdbarch method.  */
+
+static int
+nds32_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  const int FSR = 38;
+  const int FDR = FSR + 32;
+
+  if (num >= 0 && num < 32)
+    {
+      /* General-purpose registers (R0 - R31).  */
+      return num;
+    }
+  else if (num >= FSR && num < FSR + 32)
+    {
+      /* Single precision floating-point registers (FS0 - FS31).  */
+      return num - FSR + tdep->fs0_regnum;
+    }
+  else if (num >= FDR && num < FDR + 32)
+    {
+      /* Double precision floating-point registers (FD0 - FD31).  */
+      return num - FDR + NDS32_FD0_REGNUM;
+    }
+
+  /* No match, return a inaccessible register number.  */
+  return -1;
+}
+
+/* NDS32 register groups.  */
+static struct reggroup *nds32_cr_reggroup;
+static struct reggroup *nds32_ir_reggroup;
+static struct reggroup *nds32_mr_reggroup;
+static struct reggroup *nds32_dr_reggroup;
+static struct reggroup *nds32_pfr_reggroup;
+static struct reggroup *nds32_hspr_reggroup;
+static struct reggroup *nds32_dmar_reggroup;
+static struct reggroup *nds32_racr_reggroup;
+static struct reggroup *nds32_idr_reggroup;
+static struct reggroup *nds32_secur_reggroup;
+
+static void
+nds32_init_reggroups (void)
+{
+  nds32_cr_reggroup = reggroup_new ("cr", USER_REGGROUP);
+  nds32_ir_reggroup = reggroup_new ("ir", USER_REGGROUP);
+  nds32_mr_reggroup = reggroup_new ("mr", USER_REGGROUP);
+  nds32_dr_reggroup = reggroup_new ("dr", USER_REGGROUP);
+  nds32_pfr_reggroup = reggroup_new ("pfr", USER_REGGROUP);
+  nds32_hspr_reggroup = reggroup_new ("hspr", USER_REGGROUP);
+  nds32_dmar_reggroup = reggroup_new ("dmar", USER_REGGROUP);
+  nds32_racr_reggroup = reggroup_new ("racr", USER_REGGROUP);
+  nds32_idr_reggroup = reggroup_new ("idr", USER_REGGROUP);
+  nds32_secur_reggroup = reggroup_new ("secur", USER_REGGROUP);
+}
+
+static void
+nds32_add_reggroups (struct gdbarch *gdbarch)
+{
+  /* Add pre-defined register groups.  */
+  reggroup_add (gdbarch, general_reggroup);
+  reggroup_add (gdbarch, float_reggroup);
+  reggroup_add (gdbarch, system_reggroup);
+  reggroup_add (gdbarch, all_reggroup);
+  reggroup_add (gdbarch, save_reggroup);
+  reggroup_add (gdbarch, restore_reggroup);
+
+  /* Add NDS32 register groups.  */
+  reggroup_add (gdbarch, nds32_cr_reggroup);
+  reggroup_add (gdbarch, nds32_ir_reggroup);
+  reggroup_add (gdbarch, nds32_mr_reggroup);
+  reggroup_add (gdbarch, nds32_dr_reggroup);
+  reggroup_add (gdbarch, nds32_pfr_reggroup);
+  reggroup_add (gdbarch, nds32_hspr_reggroup);
+  reggroup_add (gdbarch, nds32_dmar_reggroup);
+  reggroup_add (gdbarch, nds32_racr_reggroup);
+  reggroup_add (gdbarch, nds32_idr_reggroup);
+  reggroup_add (gdbarch, nds32_secur_reggroup);
+}
+
+/* Implement the "register_reggroup_p" gdbarch method.  */
+
+static int
+nds32_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+			   struct reggroup *reggroup)
+{
+  const char *reg_name;
+  const char *group_name;
+  int ret;
+
+  if (reggroup == all_reggroup)
+    return 1;
+
+  /* General reggroup contains only GPRs and PC.  */
+  if (reggroup == general_reggroup)
+    return regnum <= NDS32_PC_REGNUM;
+
+  if (reggroup == float_reggroup || reggroup == save_reggroup
+      || reggroup == restore_reggroup)
+    {
+      ret = tdesc_register_in_reggroup_p (gdbarch, regnum, reggroup);
+      if (ret != -1)
+	return ret;
+
+      return default_register_reggroup_p (gdbarch, regnum, reggroup);
+    }
+
+  if (reggroup == system_reggroup)
+    return (regnum > NDS32_PC_REGNUM)
+	    && !nds32_register_reggroup_p (gdbarch, regnum, float_reggroup);
+
+  /* The NDS32 reggroup contains registers whose name is prefixed
+     by reggroup name.  */
+  reg_name = gdbarch_register_name (gdbarch, regnum);
+  group_name = reggroup_name (reggroup);
+  return !strncmp (reg_name, group_name, strlen (group_name));
+}
+
+/* Implement the "pseudo_register_type" tdesc_arch_data method.  */
+
+static struct type *
+nds32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  /* Currently, only FSRs could be defined as pseudo registers.  */
+  if (regnum < gdbarch_num_pseudo_regs (gdbarch))
+    return arch_float_type (gdbarch, -1, "builtin_type_ieee_single",
+			    floatformats_ieee_single);
+
+  warning (_("Unknown nds32 pseudo register %d."), regnum);
+  return NULL;
+}
+
+/* Implement the "pseudo_register_name" tdesc_arch_data method.  */
+
+static const char *
+nds32_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  /* Currently, only FSRs could be defined as pseudo registers.  */
+  if (regnum < gdbarch_num_pseudo_regs (gdbarch))
+    return nds32_fsr_register_names[regnum];
+
+  warning (_("Unknown nds32 pseudo register %d."), regnum);
+  return NULL;
+}
+
+/* Implement the "pseudo_register_read" gdbarch method.  */
+
+static enum register_status
+nds32_pseudo_register_read (struct gdbarch *gdbarch,
+			    struct regcache *regcache, int regnum,
+			    gdb_byte *buf)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  gdb_byte reg_buf[8];
+  int offset, fdr_regnum;
+  enum register_status status = REG_UNKNOWN;
+
+  /* Sanity check.  */
+  if (tdep->fpu_freg == -1 || tdep->use_pseudo_fsrs == 0)
+    return status;
+
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  /* Currently, only FSRs could be defined as pseudo registers.  */
+  if (regnum < gdbarch_num_pseudo_regs (gdbarch))
+    {
+      /* fs0 is always the most significant half of fd0.  */
+      if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	offset = (regnum & 1) ? 4 : 0;
+      else
+	offset = (regnum & 1) ? 0 : 4;
+
+      fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1);
+      status = regcache_raw_read (regcache, fdr_regnum, reg_buf);
+      if (status == REG_VALID)
+	memcpy (buf, reg_buf + offset, 4);
+    }
+
+  return status;
+}
+
+/* Implement the "pseudo_register_write" gdbarch method.  */
+
+static void
+nds32_pseudo_register_write (struct gdbarch *gdbarch,
+			     struct regcache *regcache, int regnum,
+			     const gdb_byte *buf)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  gdb_byte reg_buf[8];
+  int offset, fdr_regnum;
+
+  /* Sanity check.  */
+  if (tdep->fpu_freg == -1 || tdep->use_pseudo_fsrs == 0)
+    return;
+
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  /* Currently, only FSRs could be defined as pseudo registers.  */
+  if (regnum < gdbarch_num_pseudo_regs (gdbarch))
+    {
+      /* fs0 is always the most significant half of fd0.  */
+      if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	offset = (regnum & 1) ? 4 : 0;
+      else
+	offset = (regnum & 1) ? 0 : 4;
+
+      fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1);
+      regcache_raw_read (regcache, fdr_regnum, reg_buf);
+      memcpy (reg_buf + offset, buf, 4);
+      regcache_raw_write (regcache, fdr_regnum, reg_buf);
+    }
+}
+
+/* Helper function for NDS32 ABI.  Return true if FPRs can be used
+   to pass function arguments and return value.  */
+
+static int
+nds32_abi_use_fpr (int elf_abi)
+{
+  return elf_abi == E_NDS_ABI_V2FP_PLUS;
+}
+
+/* Helper function for NDS32 ABI.  Return true if GPRs and stack
+   can be used together to pass an argument.  */
+
+static int
+nds32_abi_split (int elf_abi)
+{
+  return elf_abi == E_NDS_ABI_AABI;
+}
+
+#define NDS32_NUM_SAVED_REGS (NDS32_LP_REGNUM + 1)
+
+struct nds32_frame_cache
+{
+  /* The previous frame's inner most stack address.  Used as this
+     frame ID's stack_addr.  */
+  CORE_ADDR prev_sp;
+
+  /* The frame's base, optionally used by the high-level debug info.  */
+  CORE_ADDR base;
+
+  /* During prologue analysis, keep how far the SP and FP have been offset
+     from the start of the stack frame (as defined by the previous frame's
+     stack pointer).
+     During epilogue analysis, keep how far the SP has been offset from the
+     current stack pointer.  */
+  CORE_ADDR sp_offset;
+  CORE_ADDR fp_offset;
+
+  /* The address of the first instruction in this function.  */
+  CORE_ADDR pc;
+
+  /* Saved registers.  */
+  CORE_ADDR saved_regs[NDS32_NUM_SAVED_REGS];
+};
+
+/* Allocate and initialize a frame cache.  */
+
+static struct nds32_frame_cache *
+nds32_alloc_frame_cache (void)
+{
+  struct nds32_frame_cache *cache;
+  int i;
+
+  cache = FRAME_OBSTACK_ZALLOC (struct nds32_frame_cache);
+
+  /* Initialize fp_offset to check if FP is set in prologue.  */
+  cache->fp_offset = INVALID_OFFSET;
+
+  /* Saved registers.  We initialize these to -1 since zero is a valid
+     offset.  */
+  for (i = 0; i < NDS32_NUM_SAVED_REGS; i++)
+    cache->saved_regs[i] = REG_UNAVAIL;
+
+  return cache;
+}
+
+/* Helper function for instructions used to push multiple words.  */
+
+static void
+nds32_push_multiple_words (struct nds32_frame_cache *cache, int rb, int re,
+			   int enable4)
+{
+  CORE_ADDR sp_offset = cache->sp_offset;
+  int i;
+
+  /* Check LP, GP, FP in enable4.  */
+  for (i = 1; i <= 3; i++)
+    {
+      if ((enable4 >> i) & 0x1)
+	{
+	  sp_offset += 4;
+	  cache->saved_regs[NDS32_SP_REGNUM - i] = sp_offset;
+	}
+    }
+
+  /* Skip case where re == rb == sp.  */
+  if ((rb < REG_FP) && (re < REG_FP))
+    {
+      for (i = re; i >= rb; i--)
+	{
+	  sp_offset += 4;
+	  cache->saved_regs[i] = sp_offset;
+	}
+    }
+
+  /* For sp, update the offset.  */
+  cache->sp_offset = sp_offset;
+}
+
+/* Analyze the instructions within the given address range.  If CACHE
+   is non-NULL, fill it in.  Return the first address beyond the given
+   address range.  If CACHE is NULL, return the first address not
+   recognized as a prologue instruction.  */
+
+static CORE_ADDR
+nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
+			CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  /* Current scanning status.  */
+  int in_prologue_bb = 0;
+  int val_ta = 0;
+  uint32_t insn, insn_len;
+
+  for (; pc < limit_pc; pc += insn_len)
+    {
+      insn = read_memory_unsigned_integer (pc, 4, BFD_ENDIAN_BIG);
+
+      if ((insn & 0x80000000) == 0)
+	{
+	  /* 32-bit instruction */
+	  insn_len = 4;
+
+	  if (CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_SP, 0))
+	    {
+	      /* addi $sp, $sp, imm15s */
+	      int imm15s = N32_IMM15S (insn);
+
+	      if (imm15s < 0)
+		{
+		  if (cache != NULL)
+		    cache->sp_offset += -imm15s;
+
+		  in_prologue_bb = 1;
+		  continue;
+		}
+	    }
+	  else if (CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_FP, REG_SP, 0))
+	    {
+	      /* addi $fp, $sp, imm15s */
+	      int imm15s = N32_IMM15S (insn);
+
+	      if (imm15s > 0)
+		{
+		  if (cache != NULL)
+		    cache->fp_offset = cache->sp_offset - imm15s;
+
+		  in_prologue_bb = 1;
+		  continue;
+		}
+	    }
+	  else if ((insn & ~(__MASK (19) << 6)) == N32_SMW_ADM
+		   && N32_RA5 (insn) == REG_SP)
+	    {
+	      /* smw.adm Rb, [$sp], Re, enable4 */
+	      if (cache != NULL)
+		nds32_push_multiple_words (cache, N32_RT5 (insn),
+					   N32_RB5 (insn),
+					   N32_LSMW_ENABLE4 (insn));
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (insn == N32_ALU1 (ADD, REG_SP, REG_SP, REG_TA)
+		   || insn == N32_ALU1 (ADD, REG_SP, REG_TA, REG_SP))
+	    {
+	      /* add $sp, $sp, $ta */
+	      /* add $sp, $ta, $sp */
+	      if (val_ta < 0)
+		{
+		  if (cache != NULL)
+		    cache->sp_offset += -val_ta;
+
+		  in_prologue_bb = 1;
+		  continue;
+		}
+	    }
+	  else if (CHOP_BITS (insn, 20) == N32_TYPE1 (MOVI, REG_TA, 0))
+	    {
+	      /* movi $ta, imm20s */
+	      if (cache != NULL)
+		val_ta = N32_IMM20S (insn);
+
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 20) == N32_TYPE1 (SETHI, REG_TA, 0))
+	    {
+	      /* sethi $ta, imm20u */
+	      if (cache != NULL)
+		val_ta = N32_IMM20U (insn) << 12;
+
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 15) == N32_TYPE2 (ORI, REG_TA, REG_TA, 0))
+	    {
+	      /* ori $ta, $ta, imm15u */
+	      if (cache != NULL)
+		val_ta |= N32_IMM15U (insn);
+
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_TA, REG_TA, 0))
+	    {
+	      /* addi $ta, $ta, imm15s */
+	      if (cache != NULL)
+		val_ta += N32_IMM15S (insn);
+
+	      continue;
+	    }
+	  if (insn == N32_ALU1 (ADD, REG_GP, REG_TA, REG_GP)
+	      || insn == N32_ALU1 (ADD, REG_GP, REG_GP, REG_TA))
+	    {
+	      /* add $gp, $ta, $gp */
+	      /* add $gp, $gp, $ta */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 20) == N32_TYPE1 (MOVI, REG_GP, 0))
+	    {
+	      /* movi $gp, imm20s */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 20) == N32_TYPE1 (SETHI, REG_GP, 0))
+	    {
+	      /* sethi $gp, imm20u */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 15) == N32_TYPE2 (ORI, REG_GP, REG_GP, 0))
+	    {
+	      /* ori $gp, $gp, imm15u */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else
+	    {
+	      /* Jump/Branch insns never appear in prologue basic block.
+		 The loop can be escaped early when these insns are met.  */
+	      if (in_prologue_bb == 1)
+		{
+		  int op = N32_OP6 (insn);
+
+		  if (op == N32_OP6_JI
+		      || op == N32_OP6_JREG
+		      || op == N32_OP6_BR1
+		      || op == N32_OP6_BR2
+		      || op == N32_OP6_BR3)
+		    break;
+		}
+	    }
+
+	  if (abi_use_fpr && N32_OP6 (insn) == N32_OP6_SDC
+	      && __GF (insn, 12, 3) == 0)
+	    {
+	      /* For FPU insns, CP (bit [13:14]) should be CP0,  and only
+		 normal form (bit [12] == 0) is used.  */
+
+	      /* fsdi FDt, [$sp + (imm12s << 2)] */
+	      if (N32_RA5 (insn) == REG_SP)
+		continue;
+	    }
+
+	  /* The optimizer might shove anything into the prologue, if
+	     we build up cache (cache != NULL) from analyzing prologue,
+	     we just skip what we don't recognize and analyze further to
+	     make cache as complete as possible.  However, if we skip
+	     prologue, we'll stop immediately on unrecognized
+	     instruction.  */
+	  if (cache == NULL)
+	    break;
+	}
+      else
+	{
+	  /* 16-bit instruction */
+	  insn_len = 2;
+
+	  insn >>= 16;
+
+	  if (CHOP_BITS (insn, 10) == N16_TYPE10 (ADDI10S, 0))
+	    {
+	      /* addi10s.sp */
+	      int imm10s = N16_IMM10S (insn);
+
+	      if (imm10s < 0)
+		{
+		  if (cache != NULL)
+		    cache->sp_offset += -imm10s;
+
+		  in_prologue_bb = 1;
+		  continue;
+		}
+	    }
+	  else if (__GF (insn, 7, 8) == N16_T25_PUSH25)
+	    {
+	      /* push25 */
+	      if (cache != NULL)
+		{
+		  int imm8u = (insn & 0x1f) << 3;
+		  int re = (insn >> 5) & 0x3;
+		  const int reg_map[] = { 6, 8, 10, 14 };
+
+		  /* Operation 1 -- smw.adm R6, [$sp], Re, #0xe */
+		  nds32_push_multiple_words (cache, 6, reg_map[re], 0xe);
+
+		  /* Operation 2 -- sp = sp - (imm5u << 3) */
+		  cache->sp_offset += imm8u;
+		}
+
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (insn == N16_TYPE5 (ADD5PC, REG_GP))
+	    {
+	      /* add5.pc $gp */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else if (CHOP_BITS (insn, 5) == N16_TYPE55 (MOVI55, REG_GP, 0))
+	    {
+	      /* movi55 $gp, imm5s */
+	      in_prologue_bb = 1;
+	      continue;
+	    }
+	  else
+	    {
+	      /* Jump/Branch insns never appear in prologue basic block.
+		 The loop can be escaped early when these insns are met.  */
+	      if (in_prologue_bb == 1)
+		{
+		  uint32_t insn5 = CHOP_BITS (insn, 5);
+		  uint32_t insn8 = CHOP_BITS (insn, 8);
+		  uint32_t insn38 = CHOP_BITS (insn, 11);
+
+		  if (insn5 == N16_TYPE5 (JR5, 0)
+		      || insn5 == N16_TYPE5 (JRAL5, 0)
+		      || insn5 == N16_TYPE5 (RET5, 0)
+		      || insn8 == N16_TYPE8 (J8, 0)
+		      || insn8 == N16_TYPE8 (BEQZS8, 0)
+		      || insn8 == N16_TYPE8 (BNEZS8, 0)
+		      || insn38 == N16_TYPE38 (BEQZ38, 0, 0)
+		      || insn38 == N16_TYPE38 (BNEZ38, 0, 0)
+		      || insn38 == N16_TYPE38 (BEQS38, 0, 0)
+		      || insn38 == N16_TYPE38 (BNES38, 0, 0))
+		    break;
+		}
+	    }
+
+	  /* The optimizer might shove anything into the prologue, if
+	     we build up cache (cache != NULL) from analyzing prologue,
+	     we just skip what we don't recognize and analyze further to
+	     make cache as complete as possible.  However, if we skip
+	     prologue, we'll stop immediately on unrecognized
+	     instruction.  */
+	  if (cache == NULL)
+	    break;
+	}
+    }
+
+  return pc;
+}
+
+/* Implement the "skip_prologue" gdbarch method.
+
+   Find the end of function prologue.  */
+
+static CORE_ADDR
+nds32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  CORE_ADDR func_addr, limit_pc;
+
+  /* See if we can determine the end of the prologue via the symbol table.
+     If so, then return either PC, or the PC after the prologue, whichever
+     is greater.  */
+  if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
+    {
+      CORE_ADDR post_prologue_pc
+	= skip_prologue_using_sal (gdbarch, func_addr);
+      if (post_prologue_pc != 0)
+	return std::max (pc, post_prologue_pc);
+    }
+
+  /* Can't determine prologue from the symbol table, need to examine
+     instructions.  */
+
+  /* Find an upper limit on the function prologue using the debug
+     information.  If the debug information could not be used to provide
+     that bound, then use an arbitrary large number as the upper bound.  */
+  limit_pc = skip_prologue_using_sal (gdbarch, pc);
+  if (limit_pc == 0)
+    limit_pc = pc + 128;	/* Magic.  */
+
+  /* Find the end of prologue.  */
+  return nds32_analyze_prologue (gdbarch, pc, limit_pc, NULL);
+}
+
+/* Allocate and fill in *THIS_CACHE with information about the prologue of
+   *THIS_FRAME.  Do not do this if *THIS_CACHE was already allocated.  Return
+   a pointer to the current nds32_frame_cache in *THIS_CACHE.  */
+
+static struct nds32_frame_cache *
+nds32_frame_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct nds32_frame_cache *cache;
+  CORE_ADDR current_pc;
+  ULONGEST prev_sp;
+  ULONGEST this_base;
+  int i;
+
+  if (*this_cache)
+    return (struct nds32_frame_cache *) *this_cache;
+
+  cache = nds32_alloc_frame_cache ();
+  *this_cache = cache;
+
+  cache->pc = get_frame_func (this_frame);
+  current_pc = get_frame_pc (this_frame);
+  nds32_analyze_prologue (gdbarch, cache->pc, current_pc, cache);
+
+  /* Compute the previous frame's stack pointer (which is also the
+     frame's ID's stack address), and this frame's base pointer.  */
+  if (cache->fp_offset != INVALID_OFFSET)
+    {
+      /* FP is set in prologue, so it can be used to calculate other info.  */
+      this_base = get_frame_register_unsigned (this_frame, NDS32_FP_REGNUM);
+      prev_sp = this_base + cache->fp_offset;
+    }
+  else
+    {
+      this_base = get_frame_register_unsigned (this_frame, NDS32_SP_REGNUM);
+      prev_sp = this_base + cache->sp_offset;
+    }
+
+  cache->prev_sp = prev_sp;
+  cache->base = this_base;
+
+  /* Adjust all the saved registers such that they contain addresses
+     instead of offsets.  */
+  for (i = 0; i < NDS32_NUM_SAVED_REGS; i++)
+    if (cache->saved_regs[i] != REG_UNAVAIL)
+      cache->saved_regs[i] = cache->prev_sp - cache->saved_regs[i];
+
+  return cache;
+}
+
+/* Implement the "this_id" frame_unwind method.
+
+   Our frame ID for a normal frame is the current function's starting
+   PC and the caller's SP when we were called.  */
+
+static void
+nds32_frame_this_id (struct frame_info *this_frame,
+		     void **this_cache, struct frame_id *this_id)
+{
+  struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
+
+  /* This marks the outermost frame.  */
+  if (cache->prev_sp == 0)
+    return;
+
+  *this_id = frame_id_build (cache->prev_sp, cache->pc);
+}
+
+/* Implement the "prev_register" frame_unwind method.  */
+
+static struct value *
+nds32_frame_prev_register (struct frame_info *this_frame, void **this_cache,
+			   int regnum)
+{
+  struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
+
+  if (regnum == NDS32_SP_REGNUM)
+    return frame_unwind_got_constant (this_frame, regnum, cache->prev_sp);
+
+  /* The PC of the previous frame is stored in the LP register of
+     the current frame.  */
+  if (regnum == NDS32_PC_REGNUM)
+    regnum = NDS32_LP_REGNUM;
+
+  if (regnum < NDS32_NUM_SAVED_REGS && cache->saved_regs[regnum] != REG_UNAVAIL)
+    return frame_unwind_got_memory (this_frame, regnum,
+				    cache->saved_regs[regnum]);
+
+  return frame_unwind_got_register (this_frame, regnum, regnum);
+}
+
+static const struct frame_unwind nds32_frame_unwind =
+{
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  nds32_frame_this_id,
+  nds32_frame_prev_register,
+  NULL,
+  default_frame_sniffer,
+};
+
+/* Return the frame base address of *THIS_FRAME.  */
+
+static CORE_ADDR
+nds32_frame_base_address (struct frame_info *this_frame, void **this_cache)
+{
+  struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
+
+  return cache->base;
+}
+
+static const struct frame_base nds32_frame_base =
+{
+  &nds32_frame_unwind,
+  nds32_frame_base_address,
+  nds32_frame_base_address,
+  nds32_frame_base_address
+};
+
+/* Helper function for instructions used to pop multiple words.  */
+
+static void
+nds32_pop_multiple_words (struct nds32_frame_cache *cache, int rb, int re,
+			  int enable4)
+{
+  CORE_ADDR sp_offset = cache->sp_offset;
+  int i;
+
+  /* Skip case where re == rb == sp.  */
+  if ((rb < REG_FP) && (re < REG_FP))
+    {
+      for (i = rb; i <= re; i++)
+	{
+	  cache->saved_regs[i] = sp_offset;
+	  sp_offset += 4;
+	}
+    }
+
+  /* Check FP, GP, LP in enable4.  */
+  for (i = 3; i >= 1; i--)
+    {
+      if ((enable4 >> i) & 0x1)
+	{
+	  cache->saved_regs[NDS32_SP_REGNUM - i] = sp_offset;
+	  sp_offset += 4;
+	}
+    }
+
+  /* For sp, update the offset.  */
+  cache->sp_offset = sp_offset;
+}
+
+/* The instruction sequences in NDS32 epilogue are
+
+   INSN_RESET_SP  (optional)
+		  (If exists, this must be the first instruction in epilogue
+		   and the stack has not been destroyed.).
+   INSN_RECOVER  (optional).
+   INSN_RETURN/INSN_RECOVER_RETURN  (required).  */
+
+/* Helper function for analyzing the given 32-bit INSN.  If CACHE is non-NULL,
+   the necessary information will be recorded.  */
+
+static inline int
+nds32_analyze_epilogue_insn32 (int abi_use_fpr, uint32_t insn,
+			       struct nds32_frame_cache *cache)
+{
+  if (CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_SP, 0)
+      && N32_IMM15S (insn) > 0)
+    /* addi $sp, $sp, imm15s */
+    return INSN_RESET_SP;
+  else if (CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_FP, 0)
+	   && N32_IMM15S (insn) < 0)
+    /* addi $sp, $fp, imm15s */
+    return INSN_RESET_SP;
+  else if ((insn & ~(__MASK (19) << 6)) == N32_LMW_BIM
+	   && N32_RA5 (insn) == REG_SP)
+    {
+      /* lmw.bim Rb, [$sp], Re, enable4 */
+      if (cache != NULL)
+	nds32_pop_multiple_words (cache, N32_RT5 (insn),
+				  N32_RB5 (insn), N32_LSMW_ENABLE4 (insn));
+
+      return INSN_RECOVER;
+    }
+  else if (insn == N32_JREG (JR, 0, REG_LP, 0, 1))
+    /* ret $lp */
+    return INSN_RETURN;
+  else if (insn == N32_ALU1 (ADD, REG_SP, REG_SP, REG_TA)
+	   || insn == N32_ALU1 (ADD, REG_SP, REG_TA, REG_SP))
+    /* add $sp, $sp, $ta */
+    /* add $sp, $ta, $sp */
+    return INSN_RESET_SP;
+  else if (abi_use_fpr
+	   && (insn & ~(__MASK (5) << 20 | __MASK (13))) == N32_FLDI_SP)
+    {
+      if (__GF (insn, 12, 1) == 0)
+	/* fldi FDt, [$sp + (imm12s << 2)] */
+	return INSN_RECOVER;
+      else
+	{
+	  /* fldi.bi FDt, [$sp], (imm12s << 2) */
+	  int offset = N32_IMM12S (insn) << 2;
+
+	  if (offset == 8 || offset == 12)
+	    {
+	      if (cache != NULL)
+		cache->sp_offset += offset;
+
+	      return INSN_RECOVER;
+	    }
+	}
+    }
+
+  return INSN_NORMAL;
+}
+
+/* Helper function for analyzing the given 16-bit INSN.  If CACHE is non-NULL,
+   the necessary information will be recorded.  */
+
+static inline int
+nds32_analyze_epilogue_insn16 (uint32_t insn, struct nds32_frame_cache *cache)
+{
+  if (insn == N16_TYPE5 (RET5, REG_LP))
+    /* ret5 $lp */
+    return INSN_RETURN;
+  else if (CHOP_BITS (insn, 10) == N16_TYPE10 (ADDI10S, 0))
+    {
+      /* addi10s.sp */
+      int imm10s = N16_IMM10S (insn);
+
+      if (imm10s > 0)
+	{
+	  if (cache != NULL)
+	    cache->sp_offset += imm10s;
+
+	  return INSN_RECOVER;
+	}
+    }
+  else if (__GF (insn, 7, 8) == N16_T25_POP25)
+    {
+      /* pop25 */
+      if (cache != NULL)
+	{
+	  int imm8u = (insn & 0x1f) << 3;
+	  int re = (insn >> 5) & 0x3;
+	  const int reg_map[] = { 6, 8, 10, 14 };
+
+	  /* Operation 1 -- sp = sp + (imm5u << 3) */
+	  cache->sp_offset += imm8u;
+
+	  /* Operation 2 -- lmw.bim R6, [$sp], Re, #0xe */
+	  nds32_pop_multiple_words (cache, 6, reg_map[re], 0xe);
+	}
+
+      /* Operation 3 -- ret $lp */
+      return INSN_RECOVER_RETURN;
+    }
+
+  return INSN_NORMAL;
+}
+
+/* Analyze a reasonable amount of instructions from the given PC to find
+   the instruction used to return to the caller.  Return 1 if the 'return'
+   instruction could be found, 0 otherwise.
+
+   If CACHE is non-NULL, fill it in.  */
+
+static int
+nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
+			struct nds32_frame_cache *cache)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  CORE_ADDR limit_pc;
+  uint32_t insn, insn_len;
+  int insn_type = INSN_NORMAL;
+
+  if (abi_use_fpr)
+    limit_pc = pc + 48;
+  else
+    limit_pc = pc + 16;
+
+  for (; pc < limit_pc; pc += insn_len)
+    {
+      insn = read_memory_unsigned_integer (pc, 4, BFD_ENDIAN_BIG);
+
+      if ((insn & 0x80000000) == 0)
+	{
+	  /* 32-bit instruction */
+	  insn_len = 4;
+
+	  insn_type = nds32_analyze_epilogue_insn32 (abi_use_fpr, insn, cache);
+	  if (insn_type == INSN_RETURN)
+	    return 1;
+	  else if (insn_type == INSN_RECOVER)
+	    continue;
+	}
+      else
+	{
+	  /* 16-bit instruction */
+	  insn_len = 2;
+
+	  insn >>= 16;
+	  insn_type = nds32_analyze_epilogue_insn16 (insn, cache);
+	  if (insn_type == INSN_RETURN || insn_type == INSN_RECOVER_RETURN)
+	    return 1;
+	  else if (insn_type == INSN_RECOVER)
+	    continue;
+	}
+
+      /* Stop the scan if this is an unexpected instruction.  */
+      break;
+    }
+
+  return 0;
+}
+
+/* Implement the "stack_frame_destroyed_p" gdbarch method.  */
+
+static int
+nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  int insn_type = INSN_NORMAL;
+  int ret_found = 0;
+  uint32_t insn;
+
+  insn = read_memory_unsigned_integer (addr, 4, BFD_ENDIAN_BIG);
+
+  if ((insn & 0x80000000) == 0)
+    {
+      /* 32-bit instruction */
+
+      insn_type = nds32_analyze_epilogue_insn32 (abi_use_fpr, insn, NULL);
+    }
+  else
+    {
+      /* 16-bit instruction */
+
+      insn >>= 16;
+      insn_type = nds32_analyze_epilogue_insn16 (insn, NULL);
+    }
+
+  if (insn_type == INSN_NORMAL || insn_type == INSN_RESET_SP)
+    return 0;
+
+  /* Search the required 'return' instruction within the following reasonable
+     instructions.  */
+  ret_found = nds32_analyze_epilogue (gdbarch, addr, NULL);
+  if (ret_found == 0)
+    return 0;
+
+  /* Scan backwards to make sure that the last instruction has adjusted
+     stack.  Both a 16-bit and a 32-bit instruction will be tried.  This is
+     just a heuristic, so the false positives will be acceptable.  */
+  insn = read_memory_unsigned_integer (addr - 2, 4, BFD_ENDIAN_BIG);
+
+  /* Only 16-bit instructions are possible at addr - 2.  */
+  if ((insn & 0x80000000) != 0)
+    {
+      /* This may be a 16-bit instruction or part of a 32-bit instruction.  */
+
+      insn_type = nds32_analyze_epilogue_insn16 (insn >> 16, NULL);
+      if (insn_type == INSN_RECOVER)
+	return 1;
+    }
+
+  insn = read_memory_unsigned_integer (addr - 4, 4, BFD_ENDIAN_BIG);
+
+  /* If this is a 16-bit instruction at addr - 4, then there must be another
+     16-bit instruction at addr - 2, so only 32-bit instructions need to
+     be analyzed here.  */
+  if ((insn & 0x80000000) == 0)
+    {
+      /* This may be a 32-bit instruction or part of a 32-bit instruction.  */
+
+      insn_type = nds32_analyze_epilogue_insn32 (abi_use_fpr, insn, NULL);
+      if (insn_type == INSN_RECOVER || insn_type == INSN_RESET_SP)
+	return 1;
+    }
+
+  return 0;
+}
+
+/* Implement the "sniffer" frame_unwind method.  */
+
+static int
+nds32_epilogue_frame_sniffer (const struct frame_unwind *self,
+			      struct frame_info *this_frame, void **this_cache)
+{
+  if (frame_relative_level (this_frame) == 0)
+    return nds32_stack_frame_destroyed_p (get_frame_arch (this_frame),
+					  get_frame_pc (this_frame));
+  else
+    return 0;
+}
+
+/* Allocate and fill in *THIS_CACHE with information needed to unwind
+   *THIS_FRAME within epilogue.  Do not do this if *THIS_CACHE was already
+   allocated.  Return a pointer to the current nds32_frame_cache in
+   *THIS_CACHE.  */
+
+static struct nds32_frame_cache *
+nds32_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct nds32_frame_cache *cache;
+  CORE_ADDR current_pc, current_sp;
+  int i;
+
+  if (*this_cache)
+    return (struct nds32_frame_cache *) *this_cache;
+
+  cache = nds32_alloc_frame_cache ();
+  *this_cache = cache;
+
+  cache->pc = get_frame_func (this_frame);
+  current_pc = get_frame_pc (this_frame);
+  nds32_analyze_epilogue (gdbarch, current_pc, cache);
+
+  current_sp = get_frame_register_unsigned (this_frame, NDS32_SP_REGNUM);
+  cache->prev_sp = current_sp + cache->sp_offset;
+
+  /* Adjust all the saved registers such that they contain addresses
+     instead of offsets.  */
+  for (i = 0; i < NDS32_NUM_SAVED_REGS; i++)
+    if (cache->saved_regs[i] != REG_UNAVAIL)
+      cache->saved_regs[i] = current_sp + cache->saved_regs[i];
+
+  return cache;
+}
+
+/* Implement the "this_id" frame_unwind method.  */
+
+static void
+nds32_epilogue_frame_this_id (struct frame_info *this_frame,
+			      void **this_cache, struct frame_id *this_id)
+{
+  struct nds32_frame_cache *cache
+    = nds32_epilogue_frame_cache (this_frame, this_cache);
+
+  /* This marks the outermost frame.  */
+  if (cache->prev_sp == 0)
+    return;
+
+  *this_id = frame_id_build (cache->prev_sp, cache->pc);
+}
+
+/* Implement the "prev_register" frame_unwind method.  */
+
+static struct value *
+nds32_epilogue_frame_prev_register (struct frame_info *this_frame,
+				    void **this_cache, int regnum)
+{
+  struct nds32_frame_cache *cache
+    = nds32_epilogue_frame_cache (this_frame, this_cache);
+
+  if (regnum == NDS32_SP_REGNUM)
+    return frame_unwind_got_constant (this_frame, regnum, cache->prev_sp);
+
+  /* The PC of the previous frame is stored in the LP register of
+     the current frame.  */
+  if (regnum == NDS32_PC_REGNUM)
+    regnum = NDS32_LP_REGNUM;
+
+  if (regnum < NDS32_NUM_SAVED_REGS && cache->saved_regs[regnum] != REG_UNAVAIL)
+    return frame_unwind_got_memory (this_frame, regnum,
+				    cache->saved_regs[regnum]);
+
+  return frame_unwind_got_register (this_frame, regnum, regnum);
+}
+
+static const struct frame_unwind nds32_epilogue_frame_unwind =
+{
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  nds32_epilogue_frame_this_id,
+  nds32_epilogue_frame_prev_register,
+  NULL,
+  nds32_epilogue_frame_sniffer
+};
+
+/* Implement the "dummy_id" gdbarch method.  */
+
+static struct frame_id
+nds32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
+{
+  CORE_ADDR sp = get_frame_register_unsigned (this_frame, NDS32_SP_REGNUM);
+
+  return frame_id_build (sp, get_frame_pc (this_frame));
+}
+
+/* Implement the "unwind_pc" gdbarch method.  */
+
+static CORE_ADDR
+nds32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  return frame_unwind_register_unsigned (next_frame, NDS32_PC_REGNUM);
+}
+
+/* Implement the "unwind_sp" gdbarch method.  */
+
+static CORE_ADDR
+nds32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  return frame_unwind_register_unsigned (next_frame, NDS32_SP_REGNUM);
+}
+
+/* Floating type and struct type that has only one floating type member
+   can pass value using FPU registers (when FPU ABI is used).  */
+
+static int
+nds32_check_calling_use_fpr (struct type *type)
+{
+  struct type *t;
+  enum type_code typecode;
+
+  t = type;
+  while (1)
+    {
+      t = check_typedef (t);
+      typecode = TYPE_CODE (t);
+      if (typecode != TYPE_CODE_STRUCT)
+	break;
+      else if (TYPE_NFIELDS (t) != 1)
+	return 0;
+      else
+	t = TYPE_FIELD_TYPE (t, 0);
+    }
+
+  return typecode == TYPE_CODE_FLT;
+}
+
+/* Return the alignment (in bytes) of the given type.  */
+
+static int
+nds32_type_align (struct type *type)
+{
+  int n;
+  int align;
+  int falign;
+
+  type = check_typedef (type);
+  switch (TYPE_CODE (type))
+    {
+    default:
+      /* Should never happen.  */
+      internal_error (__FILE__, __LINE__, _("unknown type alignment"));
+      return 4;
+
+    case TYPE_CODE_PTR:
+    case TYPE_CODE_ENUM:
+    case TYPE_CODE_INT:
+    case TYPE_CODE_FLT:
+    case TYPE_CODE_SET:
+    case TYPE_CODE_RANGE:
+    case TYPE_CODE_REF:
+    case TYPE_CODE_CHAR:
+    case TYPE_CODE_BOOL:
+      return TYPE_LENGTH (type);
+
+    case TYPE_CODE_ARRAY:
+    case TYPE_CODE_COMPLEX:
+      return nds32_type_align (TYPE_TARGET_TYPE (type));
+
+    case TYPE_CODE_STRUCT:
+    case TYPE_CODE_UNION:
+      align = 1;
+      for (n = 0; n < TYPE_NFIELDS (type); n++)
+	{
+	  falign = nds32_type_align (TYPE_FIELD_TYPE (type, n));
+	  if (falign > align)
+	    align = falign;
+	}
+      return align;
+    }
+}
+
+/* Implement the "push_dummy_call" gdbarch method.  */
+
+static CORE_ADDR
+nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+		       struct regcache *regcache, CORE_ADDR bp_addr,
+		       int nargs, struct value **args, CORE_ADDR sp,
+		       int struct_return, CORE_ADDR struct_addr)
+{
+  const int REND = 6;		/* End for register offset.  */
+  int goff = 0;			/* Current gpr offset for argument.  */
+  int foff = 0;			/* Current fpr offset for argument.  */
+  int soff = 0;			/* Current stack offset for argument.  */
+  int i;
+  ULONGEST regval;
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  struct type *func_type = value_type (function);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  int abi_split = nds32_abi_split (tdep->elf_abi);
+
+  /* Set the return address.  For the NDS32, the return breakpoint is
+     always at BP_ADDR.  */
+  regcache_cooked_write_unsigned (regcache, NDS32_LP_REGNUM, bp_addr);
+
+  /* If STRUCT_RETURN is true, then the struct return address (in
+     STRUCT_ADDR) will consume the first argument-passing register.
+     Both adjust the register count and store that value.  */
+  if (struct_return)
+    {
+      regcache_cooked_write_unsigned (regcache, NDS32_R0_REGNUM, struct_addr);
+      goff++;
+    }
+
+  /* Now make sure there's space on the stack */
+  for (i = 0; i < nargs; i++)
+    {
+      struct type *type = value_type (args[i]);
+      int align = nds32_type_align (type);
+
+      /* If align is zero, it may be an empty struct.
+	 Just ignore the argument of empty struct.  */
+      if (align == 0)
+	continue;
+
+      sp -= TYPE_LENGTH (type);
+      sp = align_down (sp, align);
+    }
+
+  /* Stack must be 8-byte aligned.  */
+  sp = align_down (sp, 8);
+
+  soff = 0;
+  for (i = 0; i < nargs; i++)
+    {
+      const gdb_byte *val;
+      int align, len;
+      struct type *type;
+      int calling_use_fpr;
+      int use_fpr = 0;
+
+      type = value_type (args[i]);
+      calling_use_fpr = nds32_check_calling_use_fpr (type);
+      len = TYPE_LENGTH (type);
+      align = nds32_type_align (type);
+      val = value_contents (args[i]);
+
+      /* The size of a composite type larger than 4 bytes will be rounded
+	 up to the nearest multiple of 4.  */
+      if (len > 4)
+	len = align_up (len, 4);
+
+      /* Variadic functions are handled differently between AABI and ABI2FP+.
+
+	 For AABI, the caller pushes arguments in registers, callee stores
+	 unnamed arguments in stack, and then va_arg fetch arguments in stack.
+	 Therefore, we don't have to handle variadic functions specially.
+
+	 For ABI2FP+, the caller pushes only named arguments in registers
+	 and pushes all unnamed arguments in stack.  */
+
+      if (abi_use_fpr && TYPE_VARARGS (func_type)
+	  && i >= TYPE_NFIELDS (func_type))
+	goto use_stack;
+
+      /* Try to use FPRs to pass arguments only when
+	 1. The program is built using toolchain with FPU support.
+	 2. The type of this argument can use FPR to pass value.  */
+      use_fpr = abi_use_fpr && calling_use_fpr;
+
+      if (use_fpr)
+	{
+	  if (tdep->fpu_freg == -1)
+	    goto error_no_fpr;
+
+	  /* Adjust alignment.  */
+	  if ((align >> 2) > 0)
+	    foff = align_up (foff, align >> 2);
+
+	  if (foff < REND)
+	    {
+	      switch (len)
+		{
+		case 4:
+		  regcache_cooked_write (regcache,
+					 tdep->fs0_regnum + foff, val);
+		  foff++;
+		  break;
+		case 8:
+		  regcache_cooked_write (regcache,
+					 NDS32_FD0_REGNUM + (foff >> 1), val);
+		  foff += 2;
+		  break;
+		default:
+		  /* Long double?  */
+		  internal_error (__FILE__, __LINE__,
+				  "Do not know how to handle %d-byte double.\n",
+				  len);
+		  break;
+		}
+	      continue;
+	    }
+	}
+      else
+	{
+	  /*
+	     When passing arguments using GPRs,
+
+	     * A composite type not larger than 4 bytes is passed in $rN.
+	       The format is as if the value is loaded with load instruction
+	       of corresponding size (e.g., LB, LH, LW).
+
+	       For example,
+
+		       r0
+		       31      0
+	       LITTLE: [x x b a]
+		  BIG: [x x a b]
+
+	     * Otherwise, a composite type is passed in consecutive registers.
+	       The size is rounded up to the nearest multiple of 4.
+	       The successive registers hold the parts of the argument as if
+	       were loaded using lmw instructions.
+
+	       For example,
+
+		       r0	 r1
+		       31      0 31      0
+	       LITTLE: [d c b a] [x x x e]
+		  BIG: [a b c d] [e x x x]
+	   */
+
+	  /* Adjust alignment.  */
+	  if ((align >> 2) > 0)
+	    goff = align_up (goff, align >> 2);
+
+	  if (len <= (REND - goff) * 4)
+	    {
+	      /* This argument can be passed wholly via GPRs.  */
+	      while (len > 0)
+		{
+		  regval = extract_unsigned_integer (val, (len > 4) ? 4 : len,
+						     byte_order);
+		  regcache_cooked_write_unsigned (regcache,
+						  NDS32_R0_REGNUM + goff,
+						  regval);
+		  len -= 4;
+		  val += 4;
+		  goff++;
+		}
+	      continue;
+	    }
+	  else if (abi_split)
+	    {
+	      /* Some parts of this argument can be passed via GPRs.  */
+	      while (goff < REND)
+		{
+		  regval = extract_unsigned_integer (val, (len > 4) ? 4 : len,
+						     byte_order);
+		  regcache_cooked_write_unsigned (regcache,
+						  NDS32_R0_REGNUM + goff,
+						  regval);
+		  len -= 4;
+		  val += 4;
+		  goff++;
+		}
+	    }
+	}
+
+use_stack:
+      /*
+	 When pushing (split parts of) an argument into stack,
+
+	 * A composite type not larger than 4 bytes is copied to different
+	   base address.
+	   In little-endian, the first byte of this argument is aligned
+	   at the low address of the next free word.
+	   In big-endian, the last byte of this argument is aligned
+	   at the high address of the next free word.
+
+	   For example,
+
+	   sp [ - ]  [ c ] hi
+	      [ c ]  [ b ]
+	      [ b ]  [ a ]
+	      [ a ]  [ - ] lo
+	     LITTLE   BIG
+       */
+
+      /* Adjust alignment.  */
+      soff = align_up (soff, align);
+
+      while (len > 0)
+	{
+	  int rlen = (len > 4) ? 4 : len;
+
+	  if (byte_order == BFD_ENDIAN_BIG)
+	    write_memory (sp + soff + 4 - rlen, val, rlen);
+	  else
+	    write_memory (sp + soff, val, rlen);
+
+	  len -= 4;
+	  val += 4;
+	  soff += 4;
+	}
+    }
+
+  /* Finally, update the SP register.  */
+  regcache_cooked_write_unsigned (regcache, NDS32_SP_REGNUM, sp);
+
+  return sp;
+
+error_no_fpr:
+  /* If use_fpr, but no floating-point register exists,
+     then it is an error.  */
+  error (_("Fail to call. FPU registers are required."));
+}
+
+/* Read, for architecture GDBARCH, a function return value of TYPE
+   from REGCACHE, and copy that into VALBUF.  */
+
+static void
+nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type,
+			    struct regcache *regcache, gdb_byte *valbuf)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  int calling_use_fpr;
+  int len;
+
+  calling_use_fpr = nds32_check_calling_use_fpr (type);
+  len = TYPE_LENGTH (type);
+
+  if (abi_use_fpr && calling_use_fpr)
+    {
+      if (len == 4)
+	regcache_cooked_read (regcache, tdep->fs0_regnum, valbuf);
+      else if (len == 8)
+	regcache_cooked_read (regcache, NDS32_FD0_REGNUM, valbuf);
+      else
+	internal_error (__FILE__, __LINE__,
+			_("Cannot extract return value of %d bytes "
+			  "long floating-point."), len);
+    }
+  else
+    {
+      /*
+	 When returning result,
+
+	 * A composite type not larger than 4 bytes is returned in $r0.
+	   The format is as if the result is loaded with load instruction
+	   of corresponding size (e.g., LB, LH, LW).
+
+	   For example,
+
+		   r0
+		   31      0
+	   LITTLE: [x x b a]
+	      BIG: [x x a b]
+
+	 * Otherwise, a composite type not larger than 8 bytes is returned
+	   in $r0 and $r1.
+	   In little-endian, the first word is loaded in $r0.
+	   In big-endian, the last word is loaded in $r1.
+
+	   For example,
+
+		   r0	     r1
+		   31      0 31      0
+	   LITTLE: [d c b a] [x x x e]
+	      BIG: [x x x a] [b c d e]
+       */
+
+      ULONGEST tmp;
+
+      if (len < 4)
+	{
+	  /* By using store_unsigned_integer we avoid having to do
+	     anything special for small big-endian values.  */
+	  regcache_cooked_read_unsigned (regcache, NDS32_R0_REGNUM, &tmp);
+	  store_unsigned_integer (valbuf, len, byte_order, tmp);
+	}
+      else if (len == 4)
+	{
+	  regcache_cooked_read (regcache, NDS32_R0_REGNUM, valbuf);
+	}
+      else if (len < 8)
+	{
+	  int len1, len2;
+
+	  len1 = byte_order == BFD_ENDIAN_BIG ? len - 4 : 4;
+	  len2 = len - len1;
+
+	  regcache_cooked_read_unsigned (regcache, NDS32_R0_REGNUM, &tmp);
+	  store_unsigned_integer (valbuf, len1, byte_order, tmp);
+
+	  regcache_cooked_read_unsigned (regcache, NDS32_R0_REGNUM + 1, &tmp);
+	  store_unsigned_integer (valbuf + len1, len2, byte_order, tmp);
+	}
+      else
+	{
+	  regcache_cooked_read (regcache, NDS32_R0_REGNUM, valbuf);
+	  regcache_cooked_read (regcache, NDS32_R0_REGNUM + 1, valbuf + 4);
+	}
+    }
+}
+
+/* Write, for architecture GDBARCH, a function return value of TYPE
+   from VALBUF into REGCACHE.  */
+
+static void
+nds32_store_return_value (struct gdbarch *gdbarch, struct type *type,
+			  struct regcache *regcache, const gdb_byte *valbuf)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
+  int calling_use_fpr;
+  int len;
+
+  calling_use_fpr = nds32_check_calling_use_fpr (type);
+  len = TYPE_LENGTH (type);
+
+  if (abi_use_fpr && calling_use_fpr)
+    {
+      if (len == 4)
+	regcache_cooked_write (regcache, tdep->fs0_regnum, valbuf);
+      else if (len == 8)
+	regcache_cooked_write (regcache, NDS32_FD0_REGNUM, valbuf);
+      else
+	internal_error (__FILE__, __LINE__,
+			_("Cannot store return value of %d bytes "
+			  "long floating-point."), len);
+    }
+  else
+    {
+      ULONGEST regval;
+
+      if (len < 4)
+	{
+	  regval = extract_unsigned_integer (valbuf, len, byte_order);
+	  regcache_cooked_write_unsigned (regcache, NDS32_R0_REGNUM, regval);
+	}
+      else if (len == 4)
+	{
+	  regcache_cooked_write (regcache, NDS32_R0_REGNUM, valbuf);
+	}
+      else if (len < 8)
+	{
+	  int len1, len2;
+
+	  len1 = byte_order == BFD_ENDIAN_BIG ? len - 4 : 4;
+	  len2 = len - len1;
+
+	  regval = extract_unsigned_integer (valbuf, len1, byte_order);
+	  regcache_cooked_write_unsigned (regcache, NDS32_R0_REGNUM, regval);
+
+	  regval = extract_unsigned_integer (valbuf + len1, len2, byte_order);
+	  regcache_cooked_write_unsigned (regcache, NDS32_R0_REGNUM + 1,
+					  regval);
+	}
+      else
+	{
+	  regcache_cooked_write (regcache, NDS32_R0_REGNUM, valbuf);
+	  regcache_cooked_write (regcache, NDS32_R0_REGNUM + 1, valbuf + 4);
+	}
+    }
+}
+
+/* Implement the "return_value" gdbarch method.
+
+   Determine, for architecture GDBARCH, how a return value of TYPE
+   should be returned.  If it is supposed to be returned in registers,
+   and READBUF is non-zero, read the appropriate value from REGCACHE,
+   and copy it into READBUF.  If WRITEBUF is non-zero, write the value
+   from WRITEBUF into REGCACHE.  */
+
+static enum return_value_convention
+nds32_return_value (struct gdbarch *gdbarch, struct value *func_type,
+		    struct type *type, struct regcache *regcache,
+		    gdb_byte *readbuf, const gdb_byte *writebuf)
+{
+  if (TYPE_LENGTH (type) > 8)
+    {
+      return RETURN_VALUE_STRUCT_CONVENTION;
+    }
+  else
+    {
+      if (readbuf != NULL)
+	nds32_extract_return_value (gdbarch, type, regcache, readbuf);
+      if (writebuf != NULL)
+	nds32_store_return_value (gdbarch, type, regcache, writebuf);
+
+      return RETURN_VALUE_REGISTER_CONVENTION;
+    }
+}
+
+/* Implement the "get_longjmp_target" gdbarch method.  */
+
+static int
+nds32_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
+{
+  gdb_byte buf[4];
+  CORE_ADDR jb_addr;
+  struct gdbarch *gdbarch = get_frame_arch (frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+  jb_addr = get_frame_register_unsigned (frame, NDS32_R0_REGNUM);
+
+  if (target_read_memory (jb_addr + 11 * 4, buf, 4))
+    return 0;
+
+  *pc = extract_unsigned_integer (buf, 4, byte_order);
+  return 1;
+}
+
+/* Validate the given TDESC, and fixed-number some registers in it.
+   Return 0 if the given TDESC does not contain the required feature
+   or not contain required registers.  */
+
+static int
+nds32_validate_tdesc_p (const struct target_desc *tdesc,
+			struct tdesc_arch_data *tdesc_data,
+			int *fpu_freg, int *use_pseudo_fsrs)
+{
+  const struct tdesc_feature *feature;
+  int i, valid_p;
+
+  feature = tdesc_find_feature (tdesc, "org.gnu.gdb.nds32.core");
+  if (feature == NULL)
+    return 0;
+
+  valid_p = 1;
+  /* Validate and fixed-number R0-R10.  */
+  for (i = NDS32_R0_REGNUM; i <= NDS32_R0_REGNUM + 10; i++)
+    valid_p &= tdesc_numbered_register (feature, tdesc_data, i,
+					nds32_register_names[i]);
+
+  /* Validate R15.  */
+  valid_p &= tdesc_unnumbered_register (feature,
+					nds32_register_names[NDS32_TA_REGNUM]);
+
+  /* Validate and fixed-number FP, GP, LP, SP, PC.  */
+  for (i = NDS32_FP_REGNUM; i <= NDS32_PC_REGNUM; i++)
+    valid_p &= tdesc_numbered_register (feature, tdesc_data, i,
+					nds32_register_names[i]);
+
+  if (!valid_p)
+    return 0;
+
+  /* Fixed-number R11-R27.  */
+  for (i = NDS32_R0_REGNUM + 11; i <= NDS32_R0_REGNUM + 27; i++)
+    tdesc_numbered_register (feature, tdesc_data, i, nds32_register_names[i]);
+
+  feature = tdesc_find_feature (tdesc, "org.gnu.gdb.nds32.fpu");
+  if (feature != NULL)
+    {
+      int num_fdr_regs, num_fsr_regs, fs0_regnum, num_listed_fsr;
+      int freg = -1;
+
+      /* Guess FPU configuration via listed registers.  */
+      if (tdesc_unnumbered_register (feature, "fd31"))
+	freg = 3;
+      else if (tdesc_unnumbered_register (feature, "fd15"))
+	freg = 2;
+      else if (tdesc_unnumbered_register (feature, "fd7"))
+	freg = 1;
+      else if (tdesc_unnumbered_register (feature, "fd3"))
+	freg = 0;
+
+      if (freg == -1)
+	/* Required FDR is not found.  */
+	return 0;
+      else
+	*fpu_freg = freg;
+
+      /* Validate and fixed-number required FDRs.  */
+      num_fdr_regs = num_fdr_map[freg];
+      for (i = 0; i < num_fdr_regs; i++)
+	valid_p &= tdesc_numbered_register (feature, tdesc_data,
+					    NDS32_FD0_REGNUM + i,
+					    nds32_fdr_register_names[i]);
+      if (!valid_p)
+	return 0;
+
+      /* Count the number of listed FSRs, and fixed-number them if present.  */
+      num_fsr_regs = num_fsr_map[freg];
+      fs0_regnum = NDS32_FD0_REGNUM + num_fdr_regs;
+      num_listed_fsr = 0;
+      for (i = 0; i < num_fsr_regs; i++)
+	num_listed_fsr += tdesc_numbered_register (feature, tdesc_data,
+						   fs0_regnum + i,
+						   nds32_fsr_register_names[i]);
+
+      if (num_listed_fsr == 0)
+	/* No required FSRs are listed explicitly,  make them pseudo registers
+	   of FDRs.  */
+	*use_pseudo_fsrs = 1;
+      else if (num_listed_fsr == num_fsr_regs)
+	/* All required FSRs are listed explicitly.  */
+	*use_pseudo_fsrs = 0;
+      else
+	/* Some required FSRs are missing.  */
+	return 0;
+    }
+
+  return 1;
+}
+
+/* Initialize the current architecture based on INFO.  If possible,
+   re-use an architecture from ARCHES, which is a list of
+   architectures already created during this debugging session.
+
+   Called e.g. at program startup, when reading a core file, and when
+   reading a binary file.  */
+
+static struct gdbarch *
+nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  struct gdbarch *gdbarch;
+  struct gdbarch_tdep *tdep;
+  struct gdbarch_list *best_arch;
+  struct tdesc_arch_data *tdesc_data = NULL;
+  const struct target_desc *tdesc = info.target_desc;
+  int elf_abi = E_NDS_ABI_AABI;
+  int fpu_freg = -1;
+  int use_pseudo_fsrs = 0;
+  int i, num_regs, maxregs;
+
+  /* Extract the elf_flags if available.  */
+  if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+    elf_abi = elf_elfheader (info.abfd)->e_flags & EF_NDS_ABI;
+
+  /* If there is already a candidate, use it.  */
+  for (best_arch = gdbarch_list_lookup_by_info (arches, &info);
+       best_arch != NULL;
+       best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
+    {
+      struct gdbarch_tdep *idep = gdbarch_tdep (best_arch->gdbarch);
+
+      if (idep->elf_abi != elf_abi)
+	continue;
+
+      /* Found a match.  */
+      break;
+    }
+
+  if (best_arch != NULL)
+    return best_arch->gdbarch;
+
+  if (!tdesc_has_registers (tdesc))
+    tdesc = tdesc_nds32;
+
+  tdesc_data = tdesc_data_alloc ();
+
+  if (!nds32_validate_tdesc_p (tdesc, tdesc_data, &fpu_freg, &use_pseudo_fsrs))
+    {
+      tdesc_data_cleanup (tdesc_data);
+      return NULL;
+    }
+
+  /* Allocate space for the new architecture.  */
+  tdep = XCNEW (struct gdbarch_tdep);
+  tdep->fpu_freg = fpu_freg;
+  tdep->use_pseudo_fsrs = use_pseudo_fsrs;
+  tdep->fs0_regnum = -1;
+  tdep->elf_abi = elf_abi;
+
+  gdbarch = gdbarch_alloc (&info, tdep);
+
+  if (fpu_freg == -1)
+    num_regs = NDS32_NUM_REGS;
+  else if (use_pseudo_fsrs == 1)
+    {
+      set_gdbarch_pseudo_register_read (gdbarch, nds32_pseudo_register_read);
+      set_gdbarch_pseudo_register_write (gdbarch, nds32_pseudo_register_write);
+      set_tdesc_pseudo_register_name (gdbarch, nds32_pseudo_register_name);
+      set_tdesc_pseudo_register_type (gdbarch, nds32_pseudo_register_type);
+      set_gdbarch_num_pseudo_regs (gdbarch, num_fsr_map[fpu_freg]);
+
+      num_regs = NDS32_NUM_REGS + num_fdr_map[fpu_freg];
+    }
+  else
+    num_regs = NDS32_NUM_REGS + num_fdr_map[fpu_freg] + num_fsr_map[fpu_freg];
+
+  set_gdbarch_num_regs (gdbarch, num_regs);
+  tdesc_use_registers (gdbarch, tdesc, tdesc_data);
+
+  /* Cache the register number of fs0.  */
+  if (fpu_freg != -1)
+    tdep->fs0_regnum = user_reg_map_name_to_regnum (gdbarch, "fs0", -1);
+
+  /* Add NDS32 register aliases.  To avoid search in user register name space,
+     user_reg_map_name_to_regnum is not used.  */
+  maxregs = (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch));
+  for (i = 0; i < ARRAY_SIZE (nds32_register_aliases); i++)
+    {
+      int regnum, j;
+
+      regnum = -1;
+      /* Search register name space.  */
+      for (j = 0; j < maxregs; j++)
+	{
+	  const char *regname = gdbarch_register_name (gdbarch, j);
+
+	  if (regname != NULL
+	      && strcmp (regname, nds32_register_aliases[i].name) == 0)
+	    {
+	      regnum = j;
+	      break;
+	    }
+	}
+
+      /* Try next alias entry if the given name can not be found in register
+	 name space.  */
+      if (regnum == -1)
+	continue;
+
+      user_reg_add (gdbarch, nds32_register_aliases[i].alias,
+		    value_of_nds32_reg, (const void *) (intptr_t) regnum);
+    }
+
+  nds32_add_reggroups (gdbarch);
+
+  /* Hook in ABI-specific overrides, if they have been registered.  */
+  info.tdep_info = (void *) tdesc_data;
+  gdbarch_init_osabi (info, gdbarch);
+
+  /* Override tdesc_register callbacks for system registers.  */
+  set_gdbarch_register_reggroup_p (gdbarch, nds32_register_reggroup_p);
+
+  set_gdbarch_sp_regnum (gdbarch, NDS32_SP_REGNUM);
+  set_gdbarch_pc_regnum (gdbarch, NDS32_PC_REGNUM);
+  set_gdbarch_unwind_sp (gdbarch, nds32_unwind_sp);
+  set_gdbarch_unwind_pc (gdbarch, nds32_unwind_pc);
+  set_gdbarch_stack_frame_destroyed_p (gdbarch, nds32_stack_frame_destroyed_p);
+  set_gdbarch_dwarf2_reg_to_regnum (gdbarch, nds32_dwarf2_reg_to_regnum);
+
+  set_gdbarch_push_dummy_call (gdbarch, nds32_push_dummy_call);
+  set_gdbarch_return_value (gdbarch, nds32_return_value);
+  set_gdbarch_dummy_id (gdbarch, nds32_dummy_id);
+
+  set_gdbarch_skip_prologue (gdbarch, nds32_skip_prologue);
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       nds32_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       nds32_breakpoint::bp_from_kind);
+
+  set_gdbarch_frame_align (gdbarch, nds32_frame_align);
+  frame_base_set_default (gdbarch, &nds32_frame_base);
+
+  set_gdbarch_print_insn (gdbarch, print_insn_nds32);
+
+  /* Handle longjmp.  */
+  set_gdbarch_get_longjmp_target (gdbarch, nds32_get_longjmp_target);
+
+  /* The order of appending is the order it check frame.  */
+  dwarf2_append_unwinders (gdbarch);
+  frame_unwind_append_unwinder (gdbarch, &nds32_epilogue_frame_unwind);
+  frame_unwind_append_unwinder (gdbarch, &nds32_frame_unwind);
+
+  return gdbarch;
+}
+
+void
+_initialize_nds32_tdep (void)
+{
+  /* Initialize gdbarch.  */
+  register_gdbarch_init (bfd_arch_nds32, nds32_gdbarch_init);
+
+  initialize_tdesc_nds32 ();
+  nds32_init_reggroups ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nds32-tdep.h ./gdb/nds32-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nds32-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/nds32-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+/* Target-dependent code for the NDS32 architecture, for GDB.
+
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+   Contributed by Andes Technology Corporation.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef NDS32_TDEP_H
+#define NDS32_TDEP_H
+
+enum nds32_regnum
+{
+  /* General purpose registers.  */
+  NDS32_R0_REGNUM = 0,
+  NDS32_R5_REGNUM = 5,
+  NDS32_TA_REGNUM = 15,		/* Temporary register.  */
+  NDS32_FP_REGNUM = 28,		/* Frame pointer.  */
+  NDS32_GP_REGNUM = 29,		/* Global pointer.  */
+  NDS32_LP_REGNUM = 30,		/* Link pointer.  */
+  NDS32_SP_REGNUM = 31,		/* Stack pointer.  */
+
+  NDS32_PC_REGNUM = 32,		/* Program counter.  */
+
+  NDS32_NUM_REGS,
+
+  /* The first double precision floating-point register.  */
+  NDS32_FD0_REGNUM = NDS32_NUM_REGS,
+};
+
+struct gdbarch_tdep
+{
+  /* The guessed FPU configuration.  */
+  int fpu_freg;
+  /* FSRs are defined as pseudo registers.  */
+  int use_pseudo_fsrs;
+  /* Cached regnum of the first FSR (FS0).  */
+  int fs0_regnum;
+  /* ELF ABI info.  */
+  int elf_abi;
+};
+#endif /* NDS32_TDEP_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/NEWS ./gdb/NEWS
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/NEWS	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/NEWS	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,487 @@
 		What has changed in GDB?
 	     (Organized release by release)
 
-*** Changes since GDB 7.9
+*** Changes since GDB 7.12
+
+* GDB now supports access to the PKU register on GNU/Linux. The register is
+  added by the Memory Protection Keys for Userspace feature which will be
+  available in future Intel CPUs.
+
+* Python Scripting
+
+  ** New functions to start, stop and access a running btrace recording.
+
+* GDB now supports recording and replaying rdrand and rdseed Intel 64
+  instructions.
+
+* Building GDB and GDBserver now requires a C++11 compiler.
+
+  For example, GCC 4.8 or later.
+
+  It is no longer possible to build GDB or GDBserver with a C
+  compiler.  The --disable-build-with-cxx configure option has been
+  removed.
+
+* Building GDB and GDBserver now requires GNU make >= 3.81.
+
+  It is no longer supported to build GDB or GDBserver with another
+  implementation of the make program or an earlier version of GNU make.
+
+* Native debugging on MS-Windows supports command-line redirection
+
+  Command-line arguments used for starting programs on MS-Windows can
+  now include redirection symbols supported by native Windows shells,
+  such as '<', '>', '>>', '2>&1', etc.  This affects GDB commands such
+  as "run", "start", and "set args", as well as the corresponding MI
+  features.
+
+* Support for thread names on MS-Windows.
+
+  GDB now catches and handles the special exception that programs
+  running on MS-Windows use to assign names to threads in the
+  debugger.
+
+* Support for Java programs compiled with gcj has been removed.
+
+* User commands now accept an unlimited number of arguments.
+  Previously, only up to 10 was accepted.
+
+* The "eval" command now expands user-defined command arguments.
+
+  This makes it easier to process a variable number of arguments:
+
+   define mycommand
+     set $i = 0
+     while $i < $argc
+       eval "print $arg%d", $i
+       set $i = $i + 1
+     end
+   end
+
+* Target descriptions can now describe registers for sparc32 and sparc64.
+
+* GDB now supports DWARF version 5 (debug information format).
+  Its .debug_names index is not yet supported.
+
+* New native configurations
+
+FreeBSD/mips			mips*-*-freebsd
+
+
+* New targets
+
+Synopsys ARC			arc*-*-elf32
+FreeBSD/mips			mips*-*-freebsd
+
+* New commands
+
+flash-erase
+  Erases all the flash memory regions reported by the target.
+
+* New MI commands
+
+-target-flash-erase
+  Erases all the flash memory regions reported by the target.  This is
+  equivalent to the CLI command flash-erase.
+
+* New commands
+
+set disassembler-options
+show disassembler-options
+  Controls the passing of target specific information to the disassembler.
+  If it is necessary to specify more than one disassembler option then
+  multiple options can be placed together into a comma separated list.
+  The default value is the empty string.  Currently, the only supported
+  targets are ARM, PowerPC and S/390.
+
+*** Changes in GDB 7.12
+
+* GDB and GDBserver now build with a C++ compiler by default.
+
+  The --enable-build-with-cxx configure option is now enabled by
+  default.  One must now explicitly configure with
+  --disable-build-with-cxx in order to build with a C compiler.  This
+  option will be removed in a future release.
+
+* GDBserver now supports recording btrace without maintaining an active
+  GDB connection.
+
+* GDB now supports a negative repeat count in the 'x' command to examine
+  memory backward from the given address.  For example:
+
+    (gdb) bt
+    #0  Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
+    #1  0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
+    (gdb) x/-5i 0x0000000000400580
+       0x40056a <main(int, char**)+8>:      mov    %edi,-0x4(%rbp)
+       0x40056d <main(int, char**)+11>:     mov    %rsi,-0x10(%rbp)
+       0x400571 <main(int, char**)+15>:     mov    $0x40061c,%esi
+       0x400576 <main(int, char**)+20>:     mov    $0x2a,%edi
+       0x40057b <main(int, char**)+25>:
+        callq  0x400536 <Func1(int, char const*)>
+
+* Fortran: Support structures with fields of dynamic types and 
+  arrays of dynamic types.
+
+* The symbol dumping maintenance commands have new syntax.
+maint print symbols [-pc address] [--] [filename]
+maint print symbols [-objfile objfile] [-source source] [--] [filename]
+maint print psymbols [-objfile objfile] [-pc address] [--] [filename]
+maint print psymbols [-objfile objfile] [-source source] [--] [filename]
+maint print msymbols [-objfile objfile] [--] [filename]
+
+* GDB now supports multibit bitfields and enums in target register
+  descriptions.
+
+* New Python-based convenience function $_as_string(val), which returns
+  the textual representation of a value.  This function is especially
+  useful to obtain the text label of an enum value.
+
+* Intel MPX bound violation handling.
+
+   Segmentation faults caused by a Intel MPX boundary violation
+   now display the kind of violation (upper or lower), the memory
+   address accessed and the memory bounds, along with the usual
+   signal received and code location.
+
+   For example:
+
+   Program received signal SIGSEGV, Segmentation fault
+   Upper bound violation while accessing address 0x7fffffffc3b3
+   Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
+   0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
+
+* Rust language support.
+  GDB now supports debugging programs written in the Rust programming
+  language.  See https://www.rust-lang.org/ for more information about
+  Rust.
+
+* Support for running interpreters on specified input/output devices
+
+  GDB now supports a new mechanism that allows frontends to provide
+  fully featured GDB console views, as a better alternative to
+  building such views on top of the "-interpreter-exec console"
+  command.  See the new "new-ui" command below.  With that command,
+  frontends can now start GDB in the traditional command-line mode
+  running in an embedded terminal emulator widget, and create a
+  separate MI interpreter running on a specified i/o device.  In this
+  way, GDB handles line editing, history, tab completion, etc. in the
+  console all by itself, and the GUI uses the separate MI interpreter
+  for its own control and synchronization, invisible to the command
+  line.
+
+* The "catch syscall" command catches groups of related syscalls.
+
+  The "catch syscall" command now supports catching a group of related
+  syscalls using the 'group:' or 'g:' prefix.
+
+* New commands
+
+skip -file file
+skip -gfile file-glob-pattern
+skip -function function
+skip -rfunction regular-expression
+  A generalized form of the skip command, with new support for
+  glob-style file names and regular expressions for function names.
+  Additionally, a file spec and a function spec may now be combined.
+
+maint info line-table REGEXP
+  Display the contents of GDB's internal line table data struture.
+
+maint selftest
+  Run any GDB unit tests that were compiled in.
+
+new-ui INTERP TTY
+  Start a new user interface instance running INTERP as interpreter,
+  using the TTY file for input/output.
+
+* Python Scripting
+
+  ** gdb.Breakpoint objects have a new attribute "pending", which
+     indicates whether the breakpoint is pending.
+  ** Three new breakpoint-related events have been added:
+     gdb.breakpoint_created, gdb.breakpoint_modified, and
+     gdb.breakpoint_deleted.
+
+signal-event EVENTID
+  Signal ("set") the given MS-Windows event object.  This is used in
+  conjunction with the Windows JIT debugging (AeDebug) support, where
+  the OS suspends a crashing process until a debugger can attach to
+  it.  Resuming the crashing process, in order to debug it, is done by
+  signalling an event.
+
+* Support for tracepoints and fast tracepoints on s390-linux and s390x-linux
+  was added in GDBserver, including JIT compiling fast tracepoint's
+  conditional expression bytecode into native code.
+
+* Support for various remote target protocols and ROM monitors has
+  been removed:
+
+  target m32rsdi	Remote M32R debugging over SDI
+  target mips		MIPS remote debugging protocol
+  target pmon		PMON ROM monitor
+  target ddb		NEC's DDB variant of PMON for Vr4300
+  target rockhopper	NEC RockHopper variant of PMON
+  target lsi		LSI variant of PMO
+
+* Support for tracepoints and fast tracepoints on powerpc-linux,
+  powerpc64-linux, and powerpc64le-linux was added in GDBserver,
+  including JIT compiling fast tracepoint's conditional expression
+  bytecode into native code.
+
+* MI async record =record-started now includes the method and format used for
+  recording.  For example:
+
+    =record-started,thread-group="i1",method="btrace",format="bts"
+
+* MI async record =thread-selected now includes the frame field.  For example:
+
+     =thread-selected,id="3",frame={level="0",addr="0x00000000004007c0"}
+
+* New targets
+
+Andes NDS32			nds32*-*-elf
+
+*** Changes in GDB 7.11
+
+* GDB now supports debugging kernel-based threads on FreeBSD.
+
+* Per-inferior thread numbers
+
+  Thread numbers are now per inferior instead of global.  If you're
+  debugging multiple inferiors, GDB displays thread IDs using a
+  qualified INF_NUM.THR_NUM form.  For example:
+
+     (gdb) info threads
+       Id   Target Id         Frame
+       1.1  Thread 0x7ffff7fc2740 (LWP 8155) (running)
+       1.2  Thread 0x7ffff7fc1700 (LWP 8168) (running)
+     * 2.1  Thread 0x7ffff7fc2740 (LWP 8157) (running)
+       2.2  Thread 0x7ffff7fc1700 (LWP 8190) (running)
+
+  As consequence, thread numbers as visible in the $_thread
+  convenience variable and in Python's InferiorThread.num attribute
+  are no longer unique between inferiors.
+
+  GDB now maintains a second thread ID per thread, referred to as the
+  global thread ID, which is the new equivalent of thread numbers in
+  previous releases.  See also $_gthread below.
+
+  For backwards compatibility, MI's thread IDs always refer to global
+  IDs.
+
+* Commands that accept thread IDs now accept the qualified
+  INF_NUM.THR_NUM form as well.  For example:
+
+     (gdb) thread 2.1
+     [Switching to thread 2.1 (Thread 0x7ffff7fc2740 (LWP 8157))] (running)
+     (gdb)
+
+* In commands that accept a list of thread IDs, you can now refer to
+  all threads of an inferior using a star wildcard.  GDB accepts
+  "INF_NUM.*", to refer to all threads of inferior INF_NUM, and "*" to
+  refer to all threads of the current inferior.  For example, "info
+  threads 2.*".
+
+* You can use "info threads -gid" to display the global thread ID of
+  all threads.
+
+* The new convenience variable $_gthread holds the global number of
+  the current thread.
+
+* The new convenience variable $_inferior holds the number of the
+  current inferior.
+
+* GDB now displays the ID and name of the thread that hit a breakpoint
+  or received a signal, if your program is multi-threaded.  For
+  example:
+
+   Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file program.c, line 20.
+   Thread 1 "main" received signal SIGINT, Interrupt.
+
+* Record btrace now supports non-stop mode.
+
+* Support for tracepoints on aarch64-linux was added in GDBserver.
+
+* The 'record instruction-history' command now indicates speculative execution
+  when using the Intel Processor Trace recording format.
+
+* GDB now allows users to specify explicit locations, bypassing
+  the linespec parser.  This feature is also available to GDB/MI
+  clients.
+
+* Multi-architecture debugging is supported on AArch64 GNU/Linux.
+  GDB now is able to debug both AArch64 applications and ARM applications
+  at the same time.
+
+* Support for fast tracepoints on aarch64-linux was added in GDBserver,
+  including JIT compiling fast tracepoint's conditional expression bytecode
+  into native code.
+
+* GDB now supports displaced stepping on AArch64 GNU/Linux.
+
+* "info threads", "info inferiors", "info display", "info checkpoints"
+  and "maint info program-spaces" now list the corresponding items in
+  ascending ID order, for consistency with all other "info" commands.
+
+* In Ada, the overloads selection menu has been enhanced to display the
+  parameter types and the return types for the matching overloaded subprograms.
+
+* New commands
+
+maint set target-non-stop (on|off|auto)
+maint show target-non-stop
+  Control whether GDB targets always operate in non-stop mode even if
+  "set non-stop" is "off".  The default is "auto", meaning non-stop
+  mode is enabled if supported by the target.
+
+maint set bfd-sharing
+maint show bfd-sharing
+  Control the reuse of bfd objects.
+
+set debug bfd-cache
+show debug bfd-cache
+  Control display of debugging info regarding bfd caching.
+
+set debug fbsd-lwp
+show debug fbsd-lwp
+  Control display of debugging info regarding FreeBSD threads.
+
+set remote multiprocess-extensions-packet
+show remote multiprocess-extensions-packet
+  Set/show the use of the remote protocol multiprocess extensions.
+
+set remote thread-events
+show remote thread-events
+  Set/show the use of thread create/exit events.
+
+set ada print-signatures on|off
+show ada print-signatures"
+  Control whether parameter types and return types are displayed in overloads
+  selection menus.  It is activaled (@code{on}) by default.
+
+set max-value-size
+show max-value-size
+  Controls the maximum size of memory, in bytes, that GDB will
+  allocate for value contents.  Prevents incorrect programs from
+  causing GDB to allocate overly large buffers.  Default is 64k.
+
+* The "disassemble" command accepts a new modifier: /s.
+  It prints mixed source+disassembly like /m with two differences:
+  - disassembled instructions are now printed in program order, and
+  - and source for all relevant files is now printed.
+  The "/m" option is now considered deprecated: its "source-centric"
+  output hasn't proved useful in practice.
+
+* The "record instruction-history" command accepts a new modifier: /s.
+  It behaves exactly like /m and prints mixed source+disassembly.
+
+* The "set scheduler-locking" command supports a new mode "replay".
+  It behaves like "off" in record mode and like "on" in replay mode.
+
+* Support for various ROM monitors has been removed:
+
+  target dbug		dBUG ROM monitor for Motorola ColdFire
+  target picobug	Motorola picobug monitor
+  target dink32		DINK32 ROM monitor for PowerPC
+  target m32r		Renesas M32R/D ROM monitor
+  target mon2000	mon2000 ROM monitor
+  target ppcbug		PPCBUG ROM monitor for PowerPC
+
+* Support for reading/writing memory and extracting values on architectures
+  whose memory is addressable in units of any integral multiple of 8 bits.
+
+* New remote packets
+
+exec stop reason
+  Indicates that an exec system call was executed.
+
+exec-events feature in qSupported
+  The qSupported packet allows GDB to request support for exec
+  events using the new 'gdbfeature' exec-event, and the qSupported
+  response can contain the corresponding 'stubfeature'.  Set and
+  show commands can be used to display whether these features are enabled.
+
+vCtrlC
+  Equivalent to interrupting with the ^C character, but works in
+  non-stop mode.
+
+thread created stop reason (T05 create:...)
+  Indicates that the thread was just created and is stopped at entry.
+
+thread exit stop reply (w exitcode;tid)
+  Indicates that the thread has terminated.
+
+QThreadEvents
+  Enables/disables thread create and exit event reporting.  For
+  example, this is used in non-stop mode when GDB stops a set of
+  threads and synchronously waits for the their corresponding stop
+  replies.  Without exit events, if one of the threads exits, GDB
+  would hang forever not knowing that it should no longer expect a
+  stop for that same thread.
+
+N stop reply
+  Indicates that there are no resumed threads left in the target (all
+  threads are stopped).  The remote stub reports support for this stop
+  reply to GDB's qSupported query.
+
+QCatchSyscalls
+  Enables/disables catching syscalls from the inferior process.
+  The remote stub reports support for this packet to GDB's qSupported query.
+
+syscall_entry stop reason
+  Indicates that a syscall was just called.
+
+syscall_return stop reason
+  Indicates that a syscall just returned.
+
+* Extended-remote exec events
+
+  ** GDB now has support for exec events on extended-remote Linux targets.
+     For such targets with Linux kernels 2.5.46 and later, this enables
+     follow-exec-mode and exec catchpoints.
+
+set remote exec-event-feature-packet
+show remote exec-event-feature-packet
+  Set/show the use of the remote exec event feature.
+
+ * Thread names in remote protocol
+
+   The reply to qXfer:threads:read may now include a name attribute for each
+   thread.
+
+* Target remote mode fork and exec events
+
+  ** GDB now has support for fork and exec events on target remote mode
+     Linux targets.  For such targets with Linux kernels 2.5.46 and later,
+     this enables follow-fork-mode, detach-on-fork, follow-exec-mode, and
+     fork and exec catchpoints.
+
+* Remote syscall events
+
+  ** GDB now has support for catch syscall on remote Linux targets,
+     currently enabled on x86/x86_64 architectures.
+
+set remote catch-syscall-packet
+show remote catch-syscall-packet
+  Set/show the use of the remote catch syscall feature.
+
+* MI changes
+
+  ** The -var-set-format command now accepts the zero-hexadecimal
+     format.  It outputs data in hexadecimal format with zero-padding on the
+     left.
+
+* Python Scripting
+
+  ** gdb.InferiorThread objects have a new attribute "global_num",
+     which refers to the thread's global thread ID.  The existing
+     "num" attribute now refers to the thread's per-inferior number.
+     See "Per-inferior thread numbers" above.
+  ** gdb.InferiorThread objects have a new attribute "inferior", which
+     is the Inferior object the thread belongs to.
+
+*** Changes in GDB 7.10
 
 * Support for process record-replay and reverse debugging on aarch64*-linux*
   targets has been added.  GDB now supports recording of A64 instruction set
@@ -110,11 +590,11 @@ tui disable
 
 show mpx bound
 set mpx bound on i386 and amd64
-   Support for bound table investigation on Intel(R) MPX enabled applications.
+   Support for bound table investigation on Intel MPX enabled applications.
 
 record btrace pt
 record pt
-  Start branch trace recording using Intel(R) Processor Trace format.
+  Start branch trace recording using Intel Processor Trace format.
 
 maint info btrace
   Print information about branch tracing internals.
@@ -182,7 +662,7 @@ show debug linux-namespaces
 
 set|show record btrace pt buffer-size
   Set and show the size of the ring buffer used for branch tracing in
-  Intel(R) Processor Trace format.
+  Intel Processor Trace format.
   The obtained size may differ from the requested size.  Use "info
   record" to see the obtained buffer size.
 
@@ -207,12 +687,12 @@ Qbtrace-conf:bts:size
   Set the requested ring buffer size for branch tracing in BTS format.
 
 Qbtrace:pt
-  Enable Intel(R) Procesor Trace-based branch tracing for the current
+  Enable Intel Procesor Trace-based branch tracing for the current
   process.  The remote stub reports support for this packet to GDB's
   qSupported query.
 
 Qbtrace-conf:pt:size
-  Set the requested ring buffer size for branch tracing in Intel(R) Processor
+  Set the requested ring buffer size for branch tracing in Intel Processor
   Trace format.
 
 swbreak stop reason
@@ -286,7 +766,7 @@ Itanium running HP-UX         ia64-*-hpu
 
 --with-intel-pt
   This configure option allows the user to build GDB with support for
-  Intel(R) Processor Trace (default: auto).  This requires libipt.
+  Intel Processor Trace (default: auto).  This requires libipt.
 
 --with-libipt-prefix=PATH
   Specify the path to the version of libipt that GDB should use.
@@ -558,10 +1038,10 @@ show mi-async
   can be used to launch native programs even when "set
   auto-connect-native-target" is set to off.
 
-* GDB now supports access to Intel(R) MPX registers on GNU/Linux.
+* GDB now supports access to Intel MPX registers on GNU/Linux.
 
-* Support for Intel(R) AVX-512 registers on GNU/Linux.
-  Support displaying and modifying Intel(R) AVX-512 registers
+* Support for Intel AVX-512 registers on GNU/Linux.
+  Support displaying and modifying Intel AVX-512 registers
   $zmm0 - $zmm31 and $k0 - $k7 on GNU/Linux.
 
 * New remote packets
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-linux-tdep.c ./gdb/nios2-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nios2-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent code for GNU/Linux on Nios II.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Mentor Graphics, Inc.
 
    This file is part of GDB.
@@ -61,7 +61,7 @@ nios2_supply_gregset (const struct regse
 		      struct regcache *regcache,
 		      int regnum, const void *gregs_buf, size_t len)
 {
-  const gdb_byte *gregs = gregs_buf;
+  const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
   int regno;
   static const gdb_byte zero_buf[4] = {0, 0, 0, 0};
 
@@ -83,7 +83,7 @@ nios2_collect_gregset (const struct regs
 		       const struct regcache *regcache,
 		       int regnum, void *gregs_buf, size_t len)
 {
-  gdb_byte *gregs = gregs_buf;
+  gdb_byte *gregs = (gdb_byte *) gregs_buf;
   int regno;
 
   for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++)
@@ -156,13 +156,30 @@ nios2_linux_rt_sigreturn_init (const str
   trad_frame_set_id (this_cache, frame_id_build (base, func));
 }
 
-static struct tramp_frame nios2_linux_rt_sigreturn_tramp_frame =
+/* Trampoline for sigreturn.  This has the form
+     movi r2, __NR_rt_sigreturn
+     trap 0
+   appropriately encoded for R1 or R2.  */
+
+static struct tramp_frame nios2_r1_linux_rt_sigreturn_tramp_frame =
+{
+  SIGTRAMP_FRAME,
+  4,
+  {
+    { MATCH_R1_MOVI | SET_IW_I_B (2) | SET_IW_I_IMM16 (139), -1 },
+    { MATCH_R1_TRAP | SET_IW_R_IMM5 (0), -1},
+    { TRAMP_SENTINEL_INSN }
+  },
+  nios2_linux_rt_sigreturn_init
+};
+
+static struct tramp_frame nios2_r2_linux_rt_sigreturn_tramp_frame =
 {
   SIGTRAMP_FRAME,
   4,
   {
-    { 0x00800004 | (139 << 6), -1 },  /* movi r2,__NR_rt_sigreturn */
-    { 0x003b683a, -1 },               /* trap */
+    { MATCH_R2_MOVI | SET_IW_F2I16_B (2) | SET_IW_F2I16_IMM16 (139), -1 },
+    { MATCH_R2_TRAP | SET_IW_X2L5_IMM5 (0), -1},
     { TRAMP_SENTINEL_INSN }
   },
   nios2_linux_rt_sigreturn_init
@@ -172,7 +189,8 @@ static struct tramp_frame nios2_linux_rt
    instruction to be executed.  */
 
 static CORE_ADDR
-nios2_linux_syscall_next_pc (struct frame_info *frame)
+nios2_linux_syscall_next_pc (struct frame_info *frame,
+			     const struct nios2_opcode *op)
 {
   CORE_ADDR pc = get_frame_pc (frame);
   ULONGEST syscall_nr = get_frame_register_unsigned (frame, NIOS2_R2_REGNUM);
@@ -182,7 +200,7 @@ nios2_linux_syscall_next_pc (struct fram
   if (syscall_nr == 139 /* rt_sigreturn */)
     return frame_unwind_caller_pc (frame);
 
-  return pc + NIOS2_OPCODE_SIZE;
+  return pc + op->size;
 }
 
 /* Hook function for gdbarch_register_osabi.  */
@@ -207,8 +225,12 @@ nios2_linux_init_abi (struct gdbarch_inf
   set_gdbarch_iterate_over_regset_sections
     (gdbarch, nios2_iterate_over_regset_sections);
   /* Linux signal frame unwinders.  */
-  tramp_frame_prepend_unwinder (gdbarch,
-                                &nios2_linux_rt_sigreturn_tramp_frame);
+  if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_nios2r2)
+    tramp_frame_prepend_unwinder (gdbarch,
+				  &nios2_r2_linux_rt_sigreturn_tramp_frame);
+  else
+    tramp_frame_prepend_unwinder (gdbarch,
+				  &nios2_r1_linux_rt_sigreturn_tramp_frame);
 
   tdep->syscall_next_pc = nios2_linux_syscall_next_pc;
 
@@ -223,8 +245,14 @@ extern initialize_file_ftype _initialize
 void
 _initialize_nios2_linux_tdep (void)
 {
-  gdbarch_register_osabi (bfd_arch_nios2, 0, GDB_OSABI_LINUX,
-                          nios2_linux_init_abi);
+
+  const struct bfd_arch_info *arch_info;
+
+  for (arch_info = bfd_lookup_arch (bfd_arch_nios2, 0);
+       arch_info != NULL;
+       arch_info = arch_info->next)
+    gdbarch_register_osabi (bfd_arch_nios2, arch_info->mach,
+			    GDB_OSABI_LINUX, nios2_linux_init_abi);
 
   initialize_tdesc_nios2_linux ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-tdep.c ./gdb/nios2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nios2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-machine dependent code for Nios II, for GDB.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Peter Brookes (pbrookes@altera.com)
    and Andrew Draper (adraper@altera.com).
    Contributed by Mentor Graphics, Inc.
@@ -44,9 +44,7 @@
 
 /* To get entry_point_address.  */
 #include "objfiles.h"
-
-/* Nios II ISA specific encodings and macros.  */
-#include "opcode/nios2.h"
+#include <algorithm>
 
 /* Nios II specific header.  */
 #include "nios2-tdep.h"
@@ -141,17 +139,15 @@ static int nios2_dwarf2gdb_regno_map[] =
   NIOS2_MPUACC_REGNUM     /* 48 */
 };
 
+gdb_static_assert (ARRAY_SIZE (nios2_dwarf2gdb_regno_map) == NIOS2_NUM_REGS);
 
 /* Implement the dwarf2_reg_to_regnum gdbarch method.  */
 
 static int
 nios2_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dw_reg)
 {
-  if (dw_reg < 0 || dw_reg > NIOS2_NUM_REGS)
-    {
-      warning (_("Dwarf-2 uses unmapped register #%d"), dw_reg);
-      return dw_reg;
-    }
+  if (dw_reg < 0 || dw_reg >= NIOS2_NUM_REGS)
+    return -1;
 
   return nios2_dwarf2gdb_regno_map[dw_reg];
 }
@@ -287,8 +283,16 @@ nios2_fetch_insn (struct gdbarch *gdbarc
   unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
   unsigned int insn;
 
-  if (!safe_read_memory_integer (pc, NIOS2_OPCODE_SIZE,
-				 gdbarch_byte_order (gdbarch), &memword))
+  if (mach == bfd_mach_nios2r2)
+    {
+      if (!safe_read_memory_integer (pc, NIOS2_OPCODE_SIZE,
+				     BFD_ENDIAN_LITTLE, &memword)
+	  && !safe_read_memory_integer (pc, NIOS2_CDX_OPCODE_SIZE,
+					BFD_ENDIAN_LITTLE, &memword))
+	return NULL;
+    }
+  else if (!safe_read_memory_integer (pc, NIOS2_OPCODE_SIZE,
+				      gdbarch_byte_order (gdbarch), &memword))
     return NULL;
 
   insn = (unsigned int) memword;
@@ -305,13 +309,38 @@ static int
 nios2_match_add (uint32_t insn, const struct nios2_opcode *op,
 		 unsigned long mach, int *ra, int *rb, int *rc)
 {
-  if (op->match == MATCH_R1_ADD || op->match == MATCH_R1_MOV)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && (op->match == MATCH_R1_ADD || op->match == MATCH_R1_MOV))
     {
       *ra = GET_IW_R_A (insn);
       *rb = GET_IW_R_B (insn);
       *rc = GET_IW_R_C (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_ADD || op->match == MATCH_R2_MOV)
+    {
+      *ra = GET_IW_F3X6L5_A (insn);
+      *rb = GET_IW_F3X6L5_B (insn);
+      *rc = GET_IW_F3X6L5_C (insn);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_ADD_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T3X1_A3 (insn)];
+      *rb = nios2_r2_reg3_mappings[GET_IW_T3X1_B3 (insn)];
+      *rc = nios2_r2_reg3_mappings[GET_IW_T3X1_C3 (insn)];
+      return 1;
+    }
+  else if (op->match == MATCH_R2_MOV_N)
+    {
+      *ra = GET_IW_F2_A (insn);
+      *rb = 0;
+      *rc = GET_IW_F2_B (insn);
+      return 1;
+    }
   return 0;
 }
 
@@ -322,13 +351,31 @@ static int
 nios2_match_sub (uint32_t insn, const struct nios2_opcode *op,
 		 unsigned long mach, int *ra, int *rb, int *rc)
 {
-  if (op->match == MATCH_R1_SUB)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_SUB)
     {
       *ra = GET_IW_R_A (insn);
       *rb = GET_IW_R_B (insn);
       *rc = GET_IW_R_C (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_SUB)
+    {
+      *ra = GET_IW_F3X6L5_A (insn);
+      *rb = GET_IW_F3X6L5_B (insn);
+      *rc = GET_IW_F3X6L5_C (insn);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_SUB_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T3X1_A3 (insn)];
+      *rb = nios2_r2_reg3_mappings[GET_IW_T3X1_B3 (insn)];
+      *rc = nios2_r2_reg3_mappings[GET_IW_T3X1_C3 (insn)];
+      return 1;
+    }
   return 0;
 }
 
@@ -340,13 +387,49 @@ static int
 nios2_match_addi (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, int *ra, int *rb, int *imm)
 {
-  if (op->match == MATCH_R1_ADDI)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_ADDI)
     {
       *ra = GET_IW_I_A (insn);
       *rb = GET_IW_I_B (insn);
       *imm = (signed) (GET_IW_I_IMM16 (insn) << 16) >> 16;
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_ADDI)
+    {
+      *ra = GET_IW_F2I16_A (insn);
+      *rb = GET_IW_F2I16_B (insn);
+      *imm = (signed) (GET_IW_F2I16_IMM16 (insn) << 16) >> 16;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_ADDI_N || op->match == MATCH_R2_SUBI_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T2X1I3_A3 (insn)];
+      *rb = nios2_r2_reg3_mappings[GET_IW_T2X1I3_B3 (insn)];
+      *imm = nios2_r2_asi_n_mappings[GET_IW_T2X1I3_IMM3 (insn)];
+      if (op->match == MATCH_R2_SUBI_N)
+	*imm = - (*imm);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_SPADDI_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T1I7_A3 (insn)];
+      *rb = NIOS2_SP_REGNUM;
+      *imm = GET_IW_T1I7_IMM7 (insn) << 2;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_SPINCI_N || op->match == MATCH_R2_SPDECI_N)
+    {
+      *ra = NIOS2_SP_REGNUM;
+      *rb = NIOS2_SP_REGNUM;
+      *imm = GET_IW_X1I7_IMM7 (insn) << 2;
+      if (op->match == MATCH_R2_SPDECI_N)
+	*imm = - (*imm);
+      return 1;
+    }
   return 0;
 }
 
@@ -358,13 +441,24 @@ static int
 nios2_match_orhi (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, int *ra, int *rb, unsigned int *uimm)
 {
-  if (op->match == MATCH_R1_ORHI)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_ORHI)
     {
       *ra = GET_IW_I_A (insn);
       *rb = GET_IW_I_B (insn);
       *uimm = GET_IW_I_IMM16 (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_ORHI)
+    {
+      *ra = GET_IW_F2I16_A (insn);
+      *rb = GET_IW_F2I16_B (insn);
+      *uimm = GET_IW_F2I16_IMM16 (insn);
+      return 1;
+    }
   return 0;
 }
 
@@ -376,13 +470,52 @@ static int
 nios2_match_stw (uint32_t insn, const struct nios2_opcode *op,
 		 unsigned long mach, int *ra, int *rb, int *imm)
 {
-  if (op->match == MATCH_R1_STW || op->match == MATCH_R1_STWIO)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && (op->match == MATCH_R1_STW || op->match == MATCH_R1_STWIO))
     {
       *ra = GET_IW_I_A (insn);
       *rb = GET_IW_I_B (insn);
       *imm = (signed) (GET_IW_I_IMM16 (insn) << 16) >> 16;
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_STW)
+    {
+      *ra = GET_IW_F2I16_A (insn);
+      *rb = GET_IW_F2I16_B (insn);
+      *imm = (signed) (GET_IW_F2I16_IMM16 (insn) << 16) >> 16;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_STWIO)
+    {
+      *ra = GET_IW_F2X4I12_A (insn);
+      *rb = GET_IW_F2X4I12_B (insn);
+      *imm = (signed) (GET_IW_F2X4I12_IMM12 (insn) << 20) >> 20;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_STW_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T2I4_A3 (insn)];
+      *rb = nios2_r2_reg3_mappings[GET_IW_T2I4_B3 (insn)];
+      *imm = GET_IW_T2I4_IMM4 (insn) << 2;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_STWSP_N)
+    {
+      *ra = NIOS2_SP_REGNUM;
+      *rb = GET_IW_F1I5_B (insn);
+      *imm = GET_IW_F1I5_IMM5 (insn) << 2;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_STWZ_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T1X1I6_A3 (insn)];
+      *rb = 0;
+      *imm = GET_IW_T1X1I6_IMM6 (insn) << 2;
+      return 1;
+    }
   return 0;
 }
 
@@ -394,13 +527,45 @@ static int
 nios2_match_ldw (uint32_t insn, const struct nios2_opcode *op,
 		 unsigned long mach, int *ra, int *rb, int *imm)
 {
-  if (op->match == MATCH_R1_LDW || op->match == MATCH_R1_LDWIO)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && (op->match == MATCH_R1_LDW || op->match == MATCH_R1_LDWIO))
     {
       *ra = GET_IW_I_A (insn);
       *rb = GET_IW_I_B (insn);
       *imm = (signed) (GET_IW_I_IMM16 (insn) << 16) >> 16;
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_LDW)
+    {
+      *ra = GET_IW_F2I16_A (insn);
+      *rb = GET_IW_F2I16_B (insn);
+      *imm = (signed) (GET_IW_F2I16_IMM16 (insn) << 16) >> 16;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_LDWIO)
+    {
+      *ra = GET_IW_F2X4I12_A (insn);
+      *rb = GET_IW_F2X4I12_B (insn);
+      *imm = (signed) (GET_IW_F2X4I12_IMM12 (insn) << 20) >> 20;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_LDW_N)
+    {
+      *ra = nios2_r2_reg3_mappings[GET_IW_T2I4_A3 (insn)];
+      *rb = nios2_r2_reg3_mappings[GET_IW_T2I4_B3 (insn)];
+      *imm = GET_IW_T2I4_IMM4 (insn) << 2;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_LDWSP_N)
+    {
+      *ra = NIOS2_SP_REGNUM;
+      *rb = GET_IW_F1I5_B (insn);
+      *imm = GET_IW_F1I5_IMM5 (insn) << 2;
+      return 1;
+    }
   return 0;
 }
 
@@ -411,15 +576,126 @@ static int
 nios2_match_rdctl (uint32_t insn, const struct nios2_opcode *op,
 		   unsigned long mach, int *ra, int *rc)
 {
-  if (op->match == MATCH_R1_RDCTL)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && (op->match == MATCH_R1_RDCTL))
     {
       *ra = GET_IW_R_IMM5 (insn);
       *rc = GET_IW_R_C (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_RDCTL)
+    {
+      *ra = GET_IW_F3X6L5_IMM5 (insn);
+      *rc = GET_IW_F3X6L5_C (insn);
+      return 1;
+    }
+  return 0;
+}
+
+/* Match and disassemble a PUSH.N or STWM instruction.
+   Returns true on success, and fills in the operand pointers.  */
+
+static int
+nios2_match_stwm (uint32_t insn, const struct nios2_opcode *op,
+		  unsigned long mach, unsigned int *reglist,
+		  int *ra, int *imm, int *wb, int *id)
+{
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_PUSH_N)
+    {
+      *reglist = 1 << 31;
+      if (GET_IW_L5I4X1_FP (insn))
+	*reglist |= (1 << 28);
+      if (GET_IW_L5I4X1_CS (insn))
+	{
+	  int val = GET_IW_L5I4X1_REGRANGE (insn);
+	  *reglist |= nios2_r2_reg_range_mappings[val];
+	}
+      *ra = NIOS2_SP_REGNUM;
+      *imm = GET_IW_L5I4X1_IMM4 (insn) << 2;
+      *wb = 1;
+      *id = 0;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_STWM)
+    {
+      unsigned int rawmask = GET_IW_F1X4L17_REGMASK (insn);
+      if (GET_IW_F1X4L17_RS (insn))
+	{
+	  *reglist = ((rawmask << 14) & 0x00ffc000);
+	  if (rawmask & (1 << 10))
+	    *reglist |= (1 << 28);
+	  if (rawmask & (1 << 11))
+	    *reglist |= (1 << 31);
+	}
+      else
+	*reglist = rawmask << 2;
+      *ra = GET_IW_F1X4L17_A (insn);
+      *imm = 0;
+      *wb = GET_IW_F1X4L17_WB (insn);
+      *id = GET_IW_F1X4L17_ID (insn);
+      return 1;
+    }
   return 0;
 }
 
+/* Match and disassemble a POP.N or LDWM instruction.
+   Returns true on success, and fills in the operand pointers.  */
+
+static int
+nios2_match_ldwm (uint32_t insn, const struct nios2_opcode *op,
+		  unsigned long mach, unsigned int *reglist,
+		  int *ra, int *imm, int *wb, int *id, int *ret)
+{
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_POP_N)
+    {
+      *reglist = 1 << 31;
+      if (GET_IW_L5I4X1_FP (insn))
+	*reglist |= (1 << 28);
+      if (GET_IW_L5I4X1_CS (insn))
+	{
+	  int val = GET_IW_L5I4X1_REGRANGE (insn);
+	  *reglist |= nios2_r2_reg_range_mappings[val];
+	}
+      *ra = NIOS2_SP_REGNUM;
+      *imm = GET_IW_L5I4X1_IMM4 (insn) << 2;
+      *wb = 1;
+      *id = 1;
+      *ret = 1;
+      return 1;
+    }
+  else if (op->match == MATCH_R2_LDWM)
+    {
+      unsigned int rawmask = GET_IW_F1X4L17_REGMASK (insn);
+      if (GET_IW_F1X4L17_RS (insn))
+	{
+	  *reglist = ((rawmask << 14) & 0x00ffc000);
+	  if (rawmask & (1 << 10))
+	    *reglist |= (1 << 28);
+	  if (rawmask & (1 << 11))
+	    *reglist |= (1 << 31);
+	}
+      else
+	*reglist = rawmask << 2;
+      *ra = GET_IW_F1X4L17_A (insn);
+      *imm = 0;
+      *wb = GET_IW_F1X4L17_WB (insn);
+      *id = GET_IW_F1X4L17_ID (insn);
+      *ret = GET_IW_F1X4L17_PC (insn);
+      return 1;
+    }
+  return 0;
+}
 
 /* Match and disassemble a branch instruction, with (potentially)
    2 register operands and one immediate operand.
@@ -440,36 +716,93 @@ nios2_match_branch (uint32_t insn, const
 		    unsigned long mach, int *ra, int *rb, int *imm,
 		    enum branch_condition *cond)
 {
-  switch (op->match)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2)
     {
-    case MATCH_R1_BR:
-      *cond = branch_none;
-      break;
-    case MATCH_R1_BEQ:
-      *cond = branch_eq;
-      break;
-    case MATCH_R1_BNE:
-      *cond = branch_ne;
-      break;
-    case MATCH_R1_BGE:
-      *cond = branch_ge;
-      break;
-    case MATCH_R1_BGEU:
-      *cond = branch_geu;
-      break;
-    case MATCH_R1_BLT:
-      *cond = branch_lt;
-      break;
-    case MATCH_R1_BLTU:
-      *cond = branch_ltu;
-      break;
-    default:
-      return 0;
+      switch (op->match)
+	{
+	case MATCH_R1_BR:
+	  *cond = branch_none;
+	  break;
+	case MATCH_R1_BEQ:
+	  *cond = branch_eq;
+	  break;
+	case MATCH_R1_BNE:
+	  *cond = branch_ne;
+	  break;
+	case MATCH_R1_BGE:
+	  *cond = branch_ge;
+	  break;
+	case MATCH_R1_BGEU:
+	  *cond = branch_geu;
+	  break;
+	case MATCH_R1_BLT:
+	  *cond = branch_lt;
+	  break;
+	case MATCH_R1_BLTU:
+	  *cond = branch_ltu;
+	  break;
+	default:
+	  return 0;
+	}
+      *imm = (signed) (GET_IW_I_IMM16 (insn) << 16) >> 16;
+      *ra = GET_IW_I_A (insn);
+      *rb = GET_IW_I_B (insn);
+      return 1;
     }
-  *imm = (signed) (GET_IW_I_IMM16 (insn) << 16) >> 16;
-  *ra = GET_IW_I_A (insn);
-  *rb = GET_IW_I_B (insn);
-  return 1;
+  else
+    {
+      switch (op->match)
+	{
+	case MATCH_R2_BR_N:
+	  *cond = branch_none;
+	  *ra = NIOS2_Z_REGNUM;
+	  *rb = NIOS2_Z_REGNUM;
+	  *imm = (signed) ((GET_IW_I10_IMM10 (insn) << 1) << 21) >> 21;
+	  return 1;
+	case MATCH_R2_BEQZ_N:
+	  *cond = branch_eq;
+	  *ra = nios2_r2_reg3_mappings[GET_IW_T1I7_A3 (insn)];
+	  *rb = NIOS2_Z_REGNUM;
+	  *imm = (signed) ((GET_IW_T1I7_IMM7 (insn) << 1) << 24) >> 24;
+	  return 1;
+	case MATCH_R2_BNEZ_N:
+	  *cond = branch_ne;
+	  *ra = nios2_r2_reg3_mappings[GET_IW_T1I7_A3 (insn)];
+	  *rb = NIOS2_Z_REGNUM;
+	  *imm = (signed) ((GET_IW_T1I7_IMM7 (insn) << 1) << 24) >> 24;
+	  return 1;
+	case MATCH_R2_BR:
+	  *cond = branch_none;
+	  break;
+	case MATCH_R2_BEQ:
+	  *cond = branch_eq;
+	  break;
+	case MATCH_R2_BNE:
+	  *cond = branch_ne;
+	  break;
+	case MATCH_R2_BGE:
+	  *cond = branch_ge;
+	  break;
+	case MATCH_R2_BGEU:
+	  *cond = branch_geu;
+	  break;
+	case MATCH_R2_BLT:
+	  *cond = branch_lt;
+	  break;
+	case MATCH_R2_BLTU:
+	  *cond = branch_ltu;
+	  break;
+	default:
+	  return 0;
+	}
+      *ra = GET_IW_F2I16_A (insn);
+      *rb = GET_IW_F2I16_B (insn);
+      *imm = (signed) (GET_IW_F2I16_IMM16 (insn) << 16) >> 16;
+      return 1;
+    }
+  return 0;
 }
 
 /* Match and disassemble a direct jump instruction, with an
@@ -480,11 +813,20 @@ static int
 nios2_match_jmpi (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, unsigned int *uimm)
 {
-  if (op->match == MATCH_R1_JMPI)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_JMPI)
     {
       *uimm = GET_IW_J_IMM26 (insn) << 2;
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_JMPI)
+    {
+      *uimm = GET_IW_L26_IMM26 (insn) << 2;
+      return 1;
+    }
   return 0;
 }
 
@@ -496,11 +838,20 @@ static int
 nios2_match_calli (uint32_t insn, const struct nios2_opcode *op,
 		   unsigned long mach, unsigned int *uimm)
 {
-  if (op->match == MATCH_R1_CALL)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_CALL)
     {
       *uimm = GET_IW_J_IMM26 (insn) << 2;
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_CALL)
+    {
+      *uimm = GET_IW_L26_IMM26 (insn) << 2;
+      return 1;
+    }
   return 0;
 }
 
@@ -512,23 +863,49 @@ static int
 nios2_match_jmpr (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, int *ra)
 {
-  switch (op->match)
-    {
-    case MATCH_R1_JMP:
-      *ra = GET_IW_I_A (insn);
-      return 1;
-    case MATCH_R1_RET:
-      *ra = NIOS2_RA_REGNUM;
-      return 1;
-    case MATCH_R1_ERET:
-      *ra = NIOS2_EA_REGNUM;
-      return 1;
-    case MATCH_R1_BRET:
-      *ra = NIOS2_BA_REGNUM;
-      return 1;
-    default:
-      return 0;
-    }
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2)
+    switch (op->match)
+      {
+      case MATCH_R1_JMP:
+	*ra = GET_IW_I_A (insn);
+	return 1;
+      case MATCH_R1_RET:
+	*ra = NIOS2_RA_REGNUM;
+	return 1;
+      case MATCH_R1_ERET:
+	*ra = NIOS2_EA_REGNUM;
+	return 1;
+      case MATCH_R1_BRET:
+	*ra = NIOS2_BA_REGNUM;
+	return 1;
+      default:
+	return 0;
+      }
+  else
+    switch (op->match)
+      {
+      case MATCH_R2_JMP:
+	*ra = GET_IW_F2I16_A (insn);
+	return 1;
+      case MATCH_R2_JMPR_N:
+	*ra = GET_IW_F1X1_A (insn);
+	return 1;
+      case MATCH_R2_RET:
+      case MATCH_R2_RET_N:
+	*ra = NIOS2_RA_REGNUM;
+	return 1;
+      case MATCH_R2_ERET:
+	*ra = NIOS2_EA_REGNUM;
+	return 1;
+      case MATCH_R2_BRET:
+	*ra = NIOS2_BA_REGNUM;
+	return 1;
+      default:
+	return 0;
+      }
+  return 0;
 }
 
 /* Match and disassemble an indirect call instruction, with a register
@@ -538,11 +915,25 @@ static int
 nios2_match_callr (uint32_t insn, const struct nios2_opcode *op,
 		   unsigned long mach, int *ra)
 {
-  if (op->match == MATCH_R1_CALLR)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_CALLR)
     {
       *ra = GET_IW_I_A (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_CALLR)
+    {
+      *ra = GET_IW_F2I16_A (insn);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_CALLR_N)
+    {
+      *ra = GET_IW_F1X1_A (insn);
+      return 1;
+    }
   return 0;
 }
 
@@ -553,11 +944,25 @@ static int
 nios2_match_break (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, unsigned int *uimm)
 {
-  if (op->match == MATCH_R1_BREAK)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_BREAK)
     {
       *uimm = GET_IW_R_IMM5 (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_BREAK)
+    {
+      *uimm = GET_IW_F3X6L5_IMM5 (insn);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_BREAK_N)
+    {
+      *uimm = GET_IW_X2L5_IMM5 (insn);
+      return 1;
+    }
   return 0;
 }
 
@@ -568,11 +973,25 @@ static int
 nios2_match_trap (uint32_t insn, const struct nios2_opcode *op,
 		  unsigned long mach, unsigned int *uimm)
 {
-  if (op->match == MATCH_R1_TRAP)
+  int is_r2 = (mach == bfd_mach_nios2r2);
+
+  if (!is_r2 && op->match == MATCH_R1_TRAP)
     {
       *uimm = GET_IW_R_IMM5 (insn);
       return 1;
     }
+  else if (!is_r2)
+    return 0;
+  else if (op->match == MATCH_R2_TRAP)
+    {
+      *uimm = GET_IW_F3X6L5_IMM5 (insn);
+      return 1;
+    }
+  else if (op->match == MATCH_R2_TRAP_N)
+    {
+      *uimm = GET_IW_X2L5_IMM5 (insn);
+      return 1;
+    }
   return 0;
 }
 
@@ -589,6 +1008,7 @@ nios2_in_epilogue_p (struct gdbarch *gdb
 		     CORE_ADDR start_pc)
 {
   unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
+  int is_r2 = (mach == bfd_mach_nios2r2);
   /* Maximum number of possibly-epilogue instructions to check.
      Note that this number should not be too large, else we can
      potentially end up iterating through unmapped memory.  */
@@ -597,6 +1017,7 @@ nios2_in_epilogue_p (struct gdbarch *gdb
   const struct nios2_opcode *op = NULL;
   unsigned int uimm;
   int imm;
+  int wb, id, ret;
   int ra, rb, rc;
   enum branch_condition cond;
   CORE_ADDR pc;
@@ -605,17 +1026,41 @@ nios2_in_epilogue_p (struct gdbarch *gdb
   if (current_pc <= start_pc)
     return 0;
 
-  /* Find the previous instruction before current_pc.
-     For the moment we will assume that all instructions are the
-     same size here.  */
-  pc = current_pc - NIOS2_OPCODE_SIZE;
+  /* Find the previous instruction before current_pc.  For R2, it might
+     be either a 16-bit or 32-bit instruction; the only way to know for
+     sure is to scan through from the beginning of the function,
+     disassembling as we go.  */
+  if (is_r2)
+    for (pc = start_pc; ; )
+      {
+	op = nios2_fetch_insn (gdbarch, pc, &insn);
+	if (op == NULL)
+	  return 0;
+	if (pc + op->size < current_pc)
+	  pc += op->size;
+	else
+	  break;
+	/* We can skip over insns to a forward branch target.  Since
+	   the branch offset is relative to the next instruction,
+	   it's correct to do this after incrementing the pc above.  */
+	if (nios2_match_branch (insn, op, mach, &ra, &rb, &imm, &cond)
+	    && imm > 0
+	    && pc + imm < current_pc)
+	  pc += imm;
+      }
+  /* Otherwise just go back to the previous 32-bit insn.  */
+  else
+    pc = current_pc - NIOS2_OPCODE_SIZE;
 
   /* Beginning with the previous instruction we just located, check whether
      we are in a sequence of at least one stack adjustment instruction.
      Possible instructions here include:
 	 ADDI sp, sp, n
 	 ADD sp, sp, rn
-	 LDW sp, n(sp)  */
+	 LDW sp, n(sp)
+	 SPINCI.N n
+	 LDWSP.N sp, n(sp)
+	 LDWM {reglist}, (sp)++, wb */
   for (ninsns = 0; ninsns < max_insns; ninsns++)
     {
       int ok = 0;
@@ -633,6 +1078,9 @@ nios2_in_epilogue_p (struct gdbarch *gdb
 	ok = (rc == NIOS2_SP_REGNUM);
       else if (nios2_match_ldw (insn, op, mach, &ra, &rb, &imm))
 	ok = (rb == NIOS2_SP_REGNUM);
+      else if (nios2_match_ldwm (insn, op, mach, &uimm, &ra,
+				 &imm, &wb, &ret, &id))
+	ok = (ra == NIOS2_SP_REGNUM && wb && id);
       if (!ok)
 	break;
     }
@@ -648,9 +1096,12 @@ nios2_in_epilogue_p (struct gdbarch *gdb
     return 1;
 
   /* The next instruction following the stack adjustments must be a
-     return, jump, or unconditional branch.  */
+     return, jump, or unconditional branch, or a CDX pop.n or ldwm
+     that does an implicit return.  */
   if (nios2_match_jmpr (insn, op, mach, &ra)
       || nios2_match_jmpi (insn, op, mach, &uimm)
+      || (nios2_match_ldwm (insn, op, mach, &uimm, &ra, &imm, &wb, &id, &ret)
+	  && ret)
       || (nios2_match_branch (insn, op, mach, &ra, &rb, &imm, &cond)
 	  && cond == branch_none))
     return 1;
@@ -684,10 +1135,12 @@ nios2_stack_frame_destroyed_p (struct gd
 	  mov	 ra, r8
 
      2) A stack adjustment and save of R4-R7 for varargs functions.
-        This is typically merged with item 3.
+        For R2 CDX this is typically handled with a STWM, otherwise
+	this is typically merged with item 3.
 
-     3) A stack adjustment and save of the callee-saved registers;
-	typically an explicit SP decrement and individual register
+     3) A stack adjustment and save of the callee-saved registers.
+        For R2 CDX these are typically handled with a PUSH.N or STWM,
+	otherwise as an explicit SP decrement and individual register
 	saves.
 
         There may also be a stack switch here in an exception handler
@@ -697,22 +1150,29 @@ nios2_stack_frame_destroyed_p (struct gd
 	  stw    sp, constant(rx)
 	  mov    sp, rx
 
-     5) A frame pointer save, which can be either a MOV or ADDI.
+     4) A frame pointer save, which can be either a MOV or ADDI.
 
-     6) A further stack pointer adjustment.  This is normally included
-        adjustment in step 4 unless the total adjustment is too large
+     5) A further stack pointer adjustment.  This is normally included
+        adjustment in step 3 unless the total adjustment is too large
 	to be done in one step.
 
      7) A stack overflow check, which can take either of these forms:
 	  bgeu   sp, rx, +8
-	  break  3
+	  trap  3
 	or
 	  bltu   sp, rx, .Lstack_overflow
 	  ...
 	.Lstack_overflow:
-	  break  3
-        If present, this is inserted after the stack pointer adjustments
-	for steps 3, 4, and 6.
+	  trap  3
+	  
+	Older versions of GCC emitted "break 3" instead of "trap 3" here,
+	so we check for both cases.
+
+	Older GCC versions emitted stack overflow checks after the SP
+	adjustments in both steps 3 and 4.  Starting with GCC 6, there is
+	at most one overflow check, which is placed before the first
+	stack adjustment for R2 CDX and after the first stack adjustment
+	otherwise.
 
     The prologue instructions may be combined or interleaved with other
     instructions.
@@ -734,7 +1194,6 @@ nios2_analyze_prologue (struct gdbarch *
      Note that this number should not be too large, else we can
      potentially end up iterating through unmapped memory.  */
   int ninsns, max_insns = 50;
-  int regno;
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
 
@@ -782,7 +1241,7 @@ nios2_analyze_prologue (struct gdbarch *
       int ra, rb, rc, imm;
       unsigned int uimm;
       unsigned int reglist;
-      int wb, ret;
+      int wb, id, ret;
       enum branch_condition cond;
 
       if (pc == current_pc)
@@ -805,7 +1264,12 @@ nios2_analyze_prologue (struct gdbarch *
       pc += op->size;
 
       if (nios2_debug)
-	fprintf_unfiltered (gdb_stdlog, "[%08X]", insn);
+	{
+	  if (op->size == 2)
+	    fprintf_unfiltered (gdb_stdlog, "[%04X]", insn & 0xffff);
+	  else
+	    fprintf_unfiltered (gdb_stdlog, "[%08X]", insn);
+	}
 
       /* The following instructions can appear in the prologue.  */
 
@@ -928,9 +1392,7 @@ nios2_analyze_prologue (struct gdbarch *
 	  if (orig > 0
 	      && (value[rb].offset == 0
 		  || (orig == NIOS2_EA_REGNUM && value[rb].offset == -4))
-	      && ((value[ra].reg == NIOS2_SP_REGNUM
-		   && cache->reg_saved[orig].basereg != NIOS2_SP_REGNUM)
-		  || cache->reg_saved[orig].basereg == -1))
+	      && value[ra].reg == NIOS2_SP_REGNUM)
 	    {
 	      if (pc < current_pc)
 		{
@@ -949,6 +1411,42 @@ nios2_analyze_prologue (struct gdbarch *
 	    break;
         }
 
+      else if (nios2_match_stwm (insn, op, mach,
+				 &reglist, &ra, &imm, &wb, &id))
+	{
+	  /* PUSH.N {reglist}, adjust
+	     or
+	     STWM {reglist}, --(SP)[, writeback] */
+	  int i;
+	  int off = 0;
+
+	  if (ra != NIOS2_SP_REGNUM || id != 0)
+	    /* This is a non-stack-push memory write and cannot be
+	       part of the prologue.  */
+	    break;
+
+	  for (i = 31; i >= 0; i--)
+	    if (reglist & (1 << i))
+	      {
+		int orig = value[i].reg;
+		
+		off += 4;
+		if (orig > 0 && value[i].offset == 0 && pc < current_pc)
+		  {
+		    cache->reg_saved[orig].basereg
+		      = value[NIOS2_SP_REGNUM].reg;
+		    cache->reg_saved[orig].addr
+		      = value[NIOS2_SP_REGNUM].offset - off;
+		  }
+	      }
+
+	  if (wb)
+	    value[NIOS2_SP_REGNUM].offset -= off;
+	  value[NIOS2_SP_REGNUM].offset -= imm;
+
+	  prologue_end = pc;
+	}
+
       else if (nios2_match_rdctl (insn, op, mach, &ra, &rc))
 	{
 	  /* RDCTL rC, ctlN
@@ -995,14 +1493,15 @@ nios2_analyze_prologue (struct gdbarch *
 	  else if (cond == branch_geu)
 	    {
 	      /* BGEU sp, rx, +8
-		 BREAK 3
+		 TRAP 3  (or BREAK 3)
 		 This instruction sequence is used in stack checking;
 		 we can ignore it.  */
 	      unsigned int next_insn;
 	      const struct nios2_opcode *next_op
 		= nios2_fetch_insn (gdbarch, pc, &next_insn);
 	      if (next_op != NULL
-		  && nios2_match_break (next_insn, op, mach, &uimm))
+		  && (nios2_match_trap (next_insn, op, mach, &uimm)
+		      || nios2_match_break (next_insn, op, mach, &uimm)))
 		pc += next_op->size;
 	      else
 		break;
@@ -1010,13 +1509,14 @@ nios2_analyze_prologue (struct gdbarch *
 	  else if (cond == branch_ltu)
 	    {
 	      /* BLTU sp, rx, .Lstackoverflow
-		 If the location branched to holds a BREAK 3 instruction
-		 then this is also stack overflow detection.  */
+		 If the location branched to holds a TRAP or BREAK
+		 instruction then this is also stack overflow detection.  */
 	      unsigned int next_insn;
 	      const struct nios2_opcode *next_op
 		= nios2_fetch_insn (gdbarch, pc + imm, &next_insn);
 	      if (next_op != NULL
-		  && nios2_match_break (next_insn, op, mach, &uimm))
+		  && (nios2_match_trap (next_insn, op, mach, &uimm)
+		      || nios2_match_break (next_insn, op, mach, &uimm)))
 		;
 	      else
 		break;
@@ -1025,11 +1525,16 @@ nios2_analyze_prologue (struct gdbarch *
 	    break;
 	}
 
-      /* All other calls or jumps (including returns) terminate 
+      /* All other calls, jumps, returns, TRAPs, or BREAKs terminate
 	 the prologue.  */
       else if (nios2_match_callr (insn, op, mach, &ra)
 	       || nios2_match_jmpr (insn, op, mach, &ra)
-	       || nios2_match_jmpi (insn, op, mach, &uimm))
+	       || nios2_match_jmpi (insn, op, mach, &uimm)
+	       || (nios2_match_ldwm (insn, op, mach, &reglist, &ra,
+				     &imm, &wb, &id, &ret)
+		   && ret)
+	       || nios2_match_trap (insn, op, mach, &uimm)
+	       || nios2_match_break (insn, op, mach, &uimm))
 	break;
     }
 
@@ -1181,7 +1686,7 @@ nios2_skip_prologue (struct gdbarch *gdb
         = skip_prologue_using_sal (gdbarch, func_addr);
 
       if (post_prologue_pc != 0)
-        return max (start_pc, post_prologue_pc);
+        return std::max (start_pc, post_prologue_pc);
     }
 
   /* Prologue analysis does the rest....  */
@@ -1189,9 +1694,34 @@ nios2_skip_prologue (struct gdbarch *gdb
   return nios2_analyze_prologue (gdbarch, start_pc, start_pc, &cache, NULL);
 }
 
-/* Implement the breakpoint_from_pc gdbarch hook.
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+nios2_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
+
+  if (mach == bfd_mach_nios2r2)
+    {
+      unsigned int insn;
+      const struct nios2_opcode *op
+	= nios2_fetch_insn (gdbarch, *pcptr, &insn);
+
+      if (op && op->size == NIOS2_CDX_OPCODE_SIZE)
+	return NIOS2_CDX_OPCODE_SIZE;
+      else
+	return NIOS2_OPCODE_SIZE;
+    }
+  else
+    return NIOS2_OPCODE_SIZE;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
-   The Nios II ABI for Linux says: "Userspace programs should not use
+static const gdb_byte *
+nios2_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+/* The Nios II ABI for Linux says: "Userspace programs should not use
    the break instruction and userspace debuggers should not insert
    one." and "Userspace breakpoints are accomplished using the trap
    instruction with immediate operand 31 (all ones)."
@@ -1199,23 +1729,47 @@ nios2_skip_prologue (struct gdbarch *gdb
    So, we use "trap 31" consistently as the breakpoint on bare-metal
    as well as Linux targets.  */
 
-static const gdb_byte*
-nios2_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
-			  int *bp_size)
-{
-  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
+  /* R2 trap encoding:
+     ((0x2d << 26) | (0x1f << 21) | (0x1d << 16) | (0x20 << 0))
+     0xb7fd0020
+     CDX trap.n encoding:
+     ((0xd << 12) | (0x1f << 6) | (0x9 << 0))
+     0xd7c9
+     Note that code is always little-endian on R2.  */
+  *size = kind;
+
+  if (kind == NIOS2_CDX_OPCODE_SIZE)
+    {
+      static const gdb_byte cdx_breakpoint_le[] = {0xc9, 0xd7};
 
-  /* R1 trap encoding:
-     ((0x1d << 17) | (0x2d << 11) | (0x1f << 6) | (0x3a << 0))
-     0x003b6ffa */
-  static const gdb_byte r1_breakpoint_le[] = {0xfa, 0x6f, 0x3b, 0x0};
-  static const gdb_byte r1_breakpoint_be[] = {0x0, 0x3b, 0x6f, 0xfa};
-  *bp_size = NIOS2_OPCODE_SIZE;
-  if (byte_order_for_code == BFD_ENDIAN_BIG)
-    return r1_breakpoint_be;
+      return cdx_breakpoint_le;
+    }
   else
-    return r1_breakpoint_le;
+    {
+      unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
+
+      if (mach == bfd_mach_nios2r2)
+	{
+	  static const gdb_byte r2_breakpoint_le[] = {0x20, 0x00, 0xfd, 0xb7};
+
+	  return r2_breakpoint_le;
+	}
+      else
+	{
+	  enum bfd_endian byte_order_for_code
+	    = gdbarch_byte_order_for_code (gdbarch);
+	  /* R1 trap encoding:
+	     ((0x1d << 17) | (0x2d << 11) | (0x1f << 6) | (0x3a << 0))
+	     0x003b6ffa */
+	  static const gdb_byte r1_breakpoint_le[] = {0xfa, 0x6f, 0x3b, 0x0};
+	  static const gdb_byte r1_breakpoint_be[] = {0x0, 0x3b, 0x6f, 0xfa};
+
+	  if (byte_order_for_code == BFD_ENDIAN_BIG)
+	    return r1_breakpoint_be;
+	  else
+	    return r1_breakpoint_le;
+	}
+    }
 }
 
 /* Implement the print_insn gdbarch method.  */
@@ -1306,11 +1860,9 @@ nios2_push_dummy_call (struct gdbarch *g
   for (argnum = 0; argnum < nargs; argnum++)
     {
       const gdb_byte *val;
-      gdb_byte valbuf[MAX_REGISTER_SIZE];
       struct value *arg = args[argnum];
       struct type *arg_type = check_typedef (value_type (arg));
       int len = TYPE_LENGTH (arg_type);
-      enum type_code typecode = TYPE_CODE (arg_type);
 
       val = value_contents (arg);
 
@@ -1380,10 +1932,9 @@ nios2_frame_unwind_cache (struct frame_i
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR current_pc;
   struct nios2_unwind_cache *cache;
-  int i;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct nios2_unwind_cache *) *this_prologue_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct nios2_unwind_cache);
   *this_prologue_cache = cache;
@@ -1488,10 +2039,9 @@ nios2_stub_frame_cache (struct frame_inf
   CORE_ADDR stack_addr;
   struct trad_frame_cache *this_trad_cache;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  int num_regs = gdbarch_num_regs (gdbarch);
 
   if (*this_cache != NULL)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
   this_trad_cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = this_trad_cache;
 
@@ -1546,7 +2096,6 @@ nios2_stub_frame_sniffer (const struct f
 			  struct frame_info *this_frame, void **cache)
 {
   gdb_byte dummy[4];
-  struct obj_section *s;
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
 
   /* Use the stub unwinder for unreadable code.  */
@@ -1577,9 +2126,9 @@ static const struct frame_unwind nios2_s
    branch prediction.  */
 
 static CORE_ADDR
-nios2_get_next_pc (struct frame_info *frame, CORE_ADDR pc)
+nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
   unsigned int insn;
@@ -1588,7 +2137,7 @@ nios2_get_next_pc (struct frame_info *fr
   int rb;
   int imm;
   unsigned int uimm;
-  int wb, ret;
+  int wb, id, ret;
   enum branch_condition cond;
 
   /* Do something stupid if we can't disassemble the insn at pc.  */
@@ -1597,10 +2146,10 @@ nios2_get_next_pc (struct frame_info *fr
     
   if (nios2_match_branch (insn, op, mach, &ra, &rb, &imm, &cond))
     {
-      int ras = get_frame_register_signed (frame, ra);
-      int rbs = get_frame_register_signed (frame, rb);
-      unsigned int rau = get_frame_register_unsigned (frame, ra);
-      unsigned int rbu = get_frame_register_unsigned (frame, rb);
+      int ras = regcache_raw_get_signed (regcache, ra);
+      int rbs = regcache_raw_get_signed (regcache, rb);
+      unsigned int rau = regcache_raw_get_unsigned (regcache, ra);
+      unsigned int rbu = regcache_raw_get_unsigned (regcache, rb);
 
       pc += op->size;
       switch (cond)
@@ -1643,12 +2192,23 @@ nios2_get_next_pc (struct frame_info *fr
 
   else if (nios2_match_jmpr (insn, op, mach, &ra)
 	   || nios2_match_callr (insn, op, mach, &ra))
-    pc = get_frame_register_unsigned (frame, ra);
+    pc = regcache_raw_get_unsigned (regcache, ra);
 
-  else if (nios2_match_trap (insn, op, mach, &uimm))
+  else if (nios2_match_ldwm (insn, op, mach, &uimm, &ra, &imm, &wb, &id, &ret)
+	   && ret)
+    {
+      /* If ra is in the reglist, we have to use the value saved in the
+	 stack frame rather than the current value.  */
+      if (uimm & (1 << NIOS2_RA_REGNUM))
+	pc = nios2_unwind_pc (gdbarch, get_current_frame ());
+      else
+	pc = regcache_raw_get_unsigned (regcache, NIOS2_RA_REGNUM);
+    }
+
+  else if (nios2_match_trap (insn, op, mach, &uimm) && uimm == 0)
     {
       if (tdep->syscall_next_pc != NULL)
-	return tdep->syscall_next_pc (frame);
+	return tdep->syscall_next_pc (get_current_frame (), op);
     }
 
   else
@@ -1659,16 +2219,16 @@ nios2_get_next_pc (struct frame_info *fr
 
 /* Implement the software_single_step gdbarch method.  */
 
-static int
-nios2_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+nios2_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR next_pc = nios2_get_next_pc (frame, get_frame_pc (frame));
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  CORE_ADDR next_pc = nios2_get_next_pc (regcache, regcache_read_pc (regcache));
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  insert_single_step_breakpoint (gdbarch, aspace, next_pc);
+  VEC_safe_push (CORE_ADDR, next_pcs, next_pc);
 
-  return 1;
+  return next_pcs;
 }
 
 /* Implement the get_longjump_target gdbarch method.  */
@@ -1696,7 +2256,7 @@ nios2_gdbarch_init (struct gdbarch_info 
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
-  int register_bytes, i;
+  int i;
   struct tdesc_arch_data *tdesc_data = NULL;
   const struct target_desc *tdesc = info.target_desc;
 
@@ -1736,7 +2296,7 @@ nios2_gdbarch_init (struct gdbarch_info 
 
   /* None found, create a new architecture from the information
      provided.  */
-  tdep = xcalloc (1, sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* longjmp support not enabled by default.  */
@@ -1776,7 +2336,8 @@ nios2_gdbarch_init (struct gdbarch_info 
 
   set_gdbarch_skip_prologue (gdbarch, nios2_skip_prologue);
   set_gdbarch_stack_frame_destroyed_p (gdbarch, nios2_stack_frame_destroyed_p);
-  set_gdbarch_breakpoint_from_pc (gdbarch, nios2_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, nios2_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, nios2_sw_breakpoint_from_kind);
 
   set_gdbarch_dummy_id (gdbarch, nios2_dummy_id);
   set_gdbarch_unwind_pc (gdbarch, nios2_unwind_pc);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-tdep.h ./gdb/nios2-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nios2-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nios2-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent header for the Nios II architecture, for GDB.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Mentor Graphics, Inc.
 
    This file is part of GDB.
@@ -20,6 +20,9 @@
 #ifndef NIOS2_TDEP_H
 #define NIOS2_TDEP_H
 
+/* Nios II ISA specific encodings and macros.  */
+#include "opcode/nios2.h"
+
 /* Registers.  */
 #define NIOS2_Z_REGNUM 0     /* Zero */
 #define NIOS2_R2_REGNUM 2    /* used for return value */
@@ -61,13 +64,15 @@
 
 /* Size of an instruction, in bytes.  */
 #define NIOS2_OPCODE_SIZE 4
+#define NIOS2_CDX_OPCODE_SIZE 2
 
 /* Target-dependent structure in gdbarch.  */
 struct gdbarch_tdep
 {
   /* Assumes FRAME is stopped at a syscall (trap) instruction; returns
      the expected next PC.  */
-  CORE_ADDR (*syscall_next_pc) (struct frame_info *frame);
+  CORE_ADDR (*syscall_next_pc) (struct frame_info *frame,
+				const struct nios2_opcode *op);
 
   /* Offset to PC value in jump buffer.
      If this is negative, longjmp support will be disabled.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-procfs.c ./gdb/nto-procfs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-procfs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nto-procfs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Machine independent support for QNX Neutrino /proc (process file system)
    for GDB.  Written by Colin Burgess at QNX Software Systems Limited.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -30,6 +30,8 @@
 #include <sys/syspage.h>
 #include <dirent.h>
 #include <sys/netmgr.h>
+#include <sys/auxv.h>
+
 #include "gdbcore.h"
 #include "inferior.h"
 #include "target.h"
@@ -40,6 +42,7 @@
 #include "regcache.h"
 #include "solib.h"
 #include "inf-child.h"
+#include "common/filestuff.h"
 
 #define NULL_PID		0
 #define _DEBUG_FLAG_TRACE	(_DEBUG_FLAG_TRACE_EXEC|_DEBUG_FLAG_TRACE_RD|\
@@ -47,21 +50,23 @@
 
 int ctl_fd;
 
-static void (*ofunc) ();
+static sighandler_t ofunc;
 
 static procfs_run run;
 
 static ptid_t do_attach (ptid_t ptid);
 
 static int procfs_can_use_hw_breakpoint (struct target_ops *self,
-					 int, int, int);
+					 enum bptype, int, int);
 
 static int procfs_insert_hw_watchpoint (struct target_ops *self,
-					CORE_ADDR addr, int len, int type,
+					CORE_ADDR addr, int len,
+					enum target_hw_bp_type type,
 					struct expression *cond);
 
 static int procfs_remove_hw_watchpoint (struct target_ops *self,
-					CORE_ADDR addr, int len, int type,
+					CORE_ADDR addr, int len,
+					enum target_hw_bp_type type,
 					struct expression *cond);
 
 static int procfs_stopped_by_watchpoint (struct target_ops *ops);
@@ -70,7 +75,7 @@ static int procfs_stopped_by_watchpoint 
    referenced elsewhere.  'nto_procfs_node' is a flag used to say
    whether we are local, or we should get the current node descriptor
    for the remote QNX node.  */
-static char nto_procfs_path[PATH_MAX] = { "/proc" };
+static char *nodestr;
 static unsigned nto_procfs_node = ND_LOCAL_NODE;
 
 /* Return the current QNX Node, or error out.  This is a simple
@@ -82,10 +87,11 @@ nto_node (void)
 {
   unsigned node;
 
-  if (ND_NODE_CMP (nto_procfs_node, ND_LOCAL_NODE) == 0)
+  if (ND_NODE_CMP (nto_procfs_node, ND_LOCAL_NODE) == 0
+      || nodestr == NULL)
     return ND_LOCAL_NODE;
 
-  node = netmgr_strtond (nto_procfs_path, 0);
+  node = netmgr_strtond (nodestr, 0);
   if (node == -1)
     error (_("Lost the QNX node.  Debug session probably over."));
 
@@ -105,12 +111,12 @@ procfs_is_nto_target (bfd *abfd)
 static void
 procfs_open_1 (struct target_ops *ops, const char *arg, int from_tty)
 {
-  char *nodestr;
   char *endstr;
   char buffer[50];
   int fd, total_size;
   procfs_sysinfo *sysinfo;
   struct cleanup *cleanups;
+  char nto_procfs_path[PATH_MAX];
 
   /* Offer to kill previous inferiors before opening this target.  */
   target_preopen (from_tty);
@@ -120,8 +126,11 @@ procfs_open_1 (struct target_ops *ops, c
   /* Set the default node used for spawning to this one,
      and only override it if there is a valid arg.  */
 
+  xfree (nodestr);
+  nodestr = NULL;
+
   nto_procfs_node = ND_LOCAL_NODE;
-  nodestr = arg ? xstrdup (arg) : arg;
+  nodestr = (arg != NULL) ? xstrdup (arg) : NULL;
 
   init_thread_list ();
 
@@ -146,10 +155,8 @@ procfs_open_1 (struct target_ops *ops, c
 	    *endstr = 0;
 	}
     }
-  snprintf (nto_procfs_path, PATH_MAX - 1, "%s%s", nodestr ? nodestr : "",
-	    "/proc");
-  if (nodestr)
-    xfree (nodestr);
+  snprintf (nto_procfs_path, PATH_MAX - 1, "%s%s",
+	    (nodestr != NULL) ? nodestr : "", "/proc");
 
   fd = open (nto_procfs_path, O_RDONLY);
   if (fd == -1)
@@ -171,7 +178,7 @@ procfs_open_1 (struct target_ops *ops, c
     {
       total_size = sysinfo->total_size;
       sysinfo = alloca (total_size);
-      if (!sysinfo)
+      if (sysinfo == NULL)
 	{
 	  printf_filtered ("Memory error: %d (%s)\n", errno,
 			   safe_strerror (errno));
@@ -351,12 +358,12 @@ do_closedir_cleanup (void *dir)
   closedir (dir);
 }
 
-void
+static void
 procfs_pidlist (char *args, int from_tty)
 {
   DIR *dp = NULL;
   struct dirent *dirp = NULL;
-  char buf[512];
+  char buf[PATH_MAX];
   procfs_info *pidinfo = NULL;
   procfs_debuginfo *info = NULL;
   procfs_status *status = NULL;
@@ -364,12 +371,16 @@ procfs_pidlist (char *args, int from_tty
   pid_t pid;
   char name[512];
   struct cleanup *cleanups;
+  char procfs_dir[PATH_MAX];
+
+  snprintf (procfs_dir, sizeof (procfs_dir), "%s%s",
+	    (nodestr != NULL) ? nodestr : "", "/proc");
 
-  dp = opendir (nto_procfs_path);
+  dp = opendir (procfs_dir);
   if (dp == NULL)
     {
       fprintf_unfiltered (gdb_stderr, "failed to opendir \"%s\" - %d (%s)",
-			  nto_procfs_path, errno, safe_strerror (errno));
+			  procfs_dir, errno, safe_strerror (errno));
       return;
     }
 
@@ -392,7 +403,9 @@ procfs_pidlist (char *args, int from_tty
 	      do_cleanups (cleanups);
 	      return;
 	    }
-	  snprintf (buf, 511, "%s/%s/as", nto_procfs_path, dirp->d_name);
+	  snprintf (buf, sizeof (buf), "%s%s/%s/as",
+		    (nodestr != NULL) ? nodestr : "",
+		    "/proc", dirp->d_name);
 	  pid = atoi (dirp->d_name);
 	}
       while (pid == 0);
@@ -403,8 +416,7 @@ procfs_pidlist (char *args, int from_tty
 	{
 	  fprintf_unfiltered (gdb_stderr, "failed to open %s - %d (%s)\n",
 			      buf, errno, safe_strerror (errno));
-	  do_cleanups (cleanups);
-	  return;
+	  continue;
 	}
       inner_cleanup = make_cleanup_close (fd);
 
@@ -428,11 +440,16 @@ procfs_pidlist (char *args, int from_tty
       status = (procfs_status *) buf;
       for (status->tid = 1; status->tid <= num_threads; status->tid++)
 	{
-	  if (devctl (fd, DCMD_PROC_TIDSTATUS, status, sizeof (buf), 0) != EOK
-	      && status->tid != 0)
-	    break;
-	  if (status->tid != 0)
-	    printf_filtered ("%s - %d/%d\n", name, pid, status->tid);
+	  const int err
+	    = devctl (fd, DCMD_PROC_TIDSTATUS, status, sizeof (buf), 0);
+	  printf_filtered ("%s - %d", name, pid);
+	  if (err == EOK && status->tid != 0)
+	    printf_filtered ("/%d\n", status->tid);
+	  else
+	    {
+	      printf_filtered ("\n");
+	      break;
+	    }
 	}
 
       do_cleanups (inner_cleanup);
@@ -443,7 +460,7 @@ procfs_pidlist (char *args, int from_tty
   return;
 }
 
-void
+static void
 procfs_meminfo (char *args, int from_tty)
 {
   procfs_mapinfo *mapinfos = NULL;
@@ -484,7 +501,7 @@ procfs_meminfo (char *args, int from_tty
       return;
     }
 
-  mapinfos = xmalloc (num * sizeof (procfs_mapinfo));
+  mapinfos = XNEWVEC (procfs_mapinfo, num);
 
   num_mapinfos = num;
   mapinfo_p = mapinfos;
@@ -499,7 +516,7 @@ procfs_meminfo (char *args, int from_tty
       return;
     }
 
-  num = min (num, num_mapinfos);
+  num = std::min (num, num_mapinfos);
 
   /* Run through the list of mapinfos, and store the data and text info
      so we can print it at the bottom of the loop.  */
@@ -596,7 +613,35 @@ procfs_files_info (struct target_ops *ig
 
   printf_unfiltered ("\tUsing the running image of %s %s via %s.\n",
 		     inf->attach_flag ? "attached" : "child",
-		     target_pid_to_str (inferior_ptid), nto_procfs_path);
+		     target_pid_to_str (inferior_ptid),
+		     (nodestr != NULL) ? nodestr : "local node");
+}
+
+/* Target to_pid_to_exec_file implementation.  */
+
+static char *
+procfs_pid_to_exec_file (struct target_ops *ops, const int pid)
+{
+  int proc_fd;
+  static char proc_path[PATH_MAX];
+  ssize_t rd;
+
+  /* Read exe file name.  */
+  snprintf (proc_path, sizeof (proc_path), "%s/proc/%d/exefile",
+	    (nodestr != NULL) ? nodestr : "", pid);
+  proc_fd = open (proc_path, O_RDONLY);
+  if (proc_fd == -1)
+    return NULL;
+
+  rd = read (proc_fd, proc_path, sizeof (proc_path) - 1);
+  close (proc_fd);
+  if (rd <= 0)
+    {
+      proc_path[0] = '\0';
+      return NULL;
+    }
+  proc_path[rd] = '\0';
+  return proc_path;
 }
 
 /* Attach to process PID, then initialize for debugging it.  */
@@ -650,8 +695,8 @@ do_attach (ptid_t ptid)
   struct sigevent event;
   char path[PATH_MAX];
 
-  snprintf (path, PATH_MAX - 1, "%s/%d/as", nto_procfs_path,
-	    ptid_get_pid (ptid));
+  snprintf (path, PATH_MAX - 1, "%s%s/%d/as",
+	    (nodestr != NULL) ? nodestr : "", "/proc", ptid_get_pid (ptid));
   ctl_fd = open (path, O_RDWR);
   if (ctl_fd == -1)
     error (_("Couldn't open proc file %s, error %d (%s)"), path, errno,
@@ -678,34 +723,30 @@ do_attach (ptid_t ptid)
 static void
 interrupt_query (void)
 {
-  target_terminal_ours ();
-
   if (query (_("Interrupted while waiting for the program.\n\
 Give up (and stop debugging it)? ")))
     {
-      target_mourn_inferior ();
+      target_mourn_inferior (inferior_ptid);
       quit ();
     }
-
-  target_terminal_inferior ();
 }
 
 /* The user typed ^C twice.  */
 static void
-nto_interrupt_twice (int signo)
+nto_handle_sigint_twice (int signo)
 {
   signal (signo, ofunc);
   interrupt_query ();
-  signal (signo, nto_interrupt_twice);
+  signal (signo, nto_handle_sigint_twice);
 }
 
 static void
-nto_interrupt (int signo)
+nto_handle_sigint (int signo)
 {
   /* If this doesn't work, try more severe steps.  */
-  signal (signo, nto_interrupt_twice);
+  signal (signo, nto_handle_sigint_twice);
 
-  target_stop (inferior_ptid);
+  target_interrupt (inferior_ptid);
 }
 
 static ptid_t
@@ -733,12 +774,15 @@ procfs_wait (struct target_ops *ops,
   devctl (ctl_fd, DCMD_PROC_STATUS, &status, sizeof (status), 0);
   while (!(status.flags & _DEBUG_FLAG_ISTOP))
     {
-      ofunc = (void (*)()) signal (SIGINT, nto_interrupt);
+      ofunc = signal (SIGINT, nto_handle_sigint);
       sigwaitinfo (&set, &info);
       signal (SIGINT, ofunc);
       devctl (ctl_fd, DCMD_PROC_STATUS, &status, sizeof (status), 0);
     }
 
+  nto_inferior_data (NULL)->stopped_flags = status.flags;
+  nto_inferior_data (NULL)->stopped_pc = status.ip;
+
   if (status.flags & _DEBUG_FLAG_SSTEP)
     {
       ourstatus->kind = TARGET_WAITKIND_STOPPED;
@@ -869,9 +913,42 @@ procfs_xfer_partial (struct target_ops *
     {
     case TARGET_OBJECT_MEMORY:
       return procfs_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
+    case TARGET_OBJECT_AUXV:
+      if (readbuf != NULL)
+	{
+	  int err;
+	  CORE_ADDR initial_stack;
+	  debug_process_t procinfo;
+	  /* For 32-bit architecture, size of auxv_t is 8 bytes.  */
+	  const unsigned int sizeof_auxv_t = sizeof (auxv_t);
+	  const unsigned int sizeof_tempbuf = 20 * sizeof_auxv_t;
+	  int tempread;
+	  gdb_byte *const tempbuf = alloca (sizeof_tempbuf);
+
+	  if (tempbuf == NULL)
+	    return TARGET_XFER_E_IO;
+
+	  err = devctl (ctl_fd, DCMD_PROC_INFO, &procinfo,
+		        sizeof procinfo, 0);
+	  if (err != EOK)
+	    return TARGET_XFER_E_IO;
+
+	  initial_stack = procinfo.initial_stack;
+
+	  /* procfs is always 'self-hosted', no byte-order manipulation.  */
+	  tempread = nto_read_auxv_from_initial_stack (initial_stack, tempbuf,
+						       sizeof_tempbuf,
+						       sizeof (auxv_t));
+	  tempread = std::min (tempread, len) - offset;
+	  memcpy (readbuf, tempbuf + offset, tempread);
+	  *xfered_len = tempread;
+	  return tempread ? TARGET_XFER_OK : TARGET_XFER_EOF;
+	}
+	/* Fallthru */
     default:
       return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
-					    readbuf, writebuf, offset, len);
+					    readbuf, writebuf, offset, len,
+					    xfered_len);
     }
 }
 
@@ -885,15 +962,8 @@ procfs_detach (struct target_ops *ops, c
   int siggnal = 0;
   int pid;
 
-  if (from_tty)
-    {
-      char *exec_file = get_exec_file (0);
-      if (exec_file == 0)
-	exec_file = "";
-      printf_unfiltered ("Detaching from program: %s %s\n",
-			 exec_file, target_pid_to_str (inferior_ptid));
-      gdb_flush (gdb_stdout);
-    }
+  target_announce_detach ();
+
   if (args)
     siggnal = atoi (args);
 
@@ -934,7 +1004,8 @@ procfs_insert_breakpoint (struct target_
 
 static int
 procfs_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			  struct bp_target_info *bp_tgt)
+			  struct bp_target_info *bp_tgt,
+			  enum remove_bp_reason reason)
 {
   return procfs_breakpoint (bp_tgt->placed_address, _DEBUG_BREAK_EXEC, -1);
 }
@@ -1117,7 +1188,7 @@ procfs_create_inferior (struct target_op
     }
 
   args = xstrdup (allargs);
-  breakup_args (args, exec_file ? &argv[1] : &argv[0]);
+  breakup_args (args, (exec_file != NULL) ? &argv[1] : &argv[0]);
 
   argv = nto_parse_redirection (argv, &in, &out, &err);
 
@@ -1221,7 +1292,7 @@ procfs_create_inferior (struct target_op
 }
 
 static void
-procfs_stop (struct target_ops *self, ptid_t ptid)
+procfs_interrupt (struct target_ops *self, ptid_t ptid)
 {
   devctl (ctl_fd, DCMD_PROC_STOP, NULL, 0, 0);
 }
@@ -1229,7 +1300,7 @@ procfs_stop (struct target_ops *self, pt
 static void
 procfs_kill_inferior (struct target_ops *ops)
 {
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 /* Fill buf with regset and return devctl cmd to do the setting.  Return
@@ -1265,7 +1336,7 @@ get_regset (int regset, char *buf, int b
   return dev_set;
 }
 
-void
+static void
 procfs_store_registers (struct target_ops *ops,
 			struct regcache *regcache, int regno)
 {
@@ -1347,13 +1418,6 @@ procfs_pass_signals (struct target_ops *
     }
 }
 
-static struct tidinfo *
-procfs_thread_info (pid_t pid, short tid)
-{
-/* NYI */
-  return NULL;
-}
-
 static char *
 procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
@@ -1444,9 +1508,10 @@ init_procfs_targets (void)
   t->to_thread_alive = procfs_thread_alive;
   t->to_update_thread_list = procfs_update_thread_list;
   t->to_pid_to_str = procfs_pid_to_str;
-  t->to_stop = procfs_stop;
+  t->to_interrupt = procfs_interrupt;
   t->to_have_continuable_watchpoint = 1;
   t->to_extra_thread_info = nto_extra_thread_info;
+  t->to_pid_to_exec_file = procfs_pid_to_exec_file;
 
   nto_native_ops = t;
 
@@ -1466,6 +1531,8 @@ init_procfs_targets (void)
 
 #define OSTYPE_NTO 1
 
+extern initialize_file_ftype _initialize_procfs;
+
 void
 _initialize_procfs (void)
 {
@@ -1494,16 +1561,16 @@ _initialize_procfs (void)
 
 
 static int
-procfs_hw_watchpoint (int addr, int len, int type)
+procfs_hw_watchpoint (int addr, int len, enum target_hw_bp_type type)
 {
   procfs_break brk;
 
   switch (type)
     {
-    case 1:			/* Read.  */
+    case hw_read:
       brk.type = _DEBUG_BREAK_RD;
       break;
-    case 2:			/* Read/Write.  */
+    case hw_access:
       brk.type = _DEBUG_BREAK_RW;
       break;
     default:			/* Modify.  */
@@ -1525,14 +1592,16 @@ procfs_hw_watchpoint (int addr, int len,
 
 static int
 procfs_can_use_hw_breakpoint (struct target_ops *self,
-			      int type, int cnt, int othertype)
+			      enum bptype type,
+			      int cnt, int othertype)
 {
   return 1;
 }
 
 static int
 procfs_remove_hw_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int type,
+			     CORE_ADDR addr, int len,
+			     enum target_hw_bp_type type,
 			     struct expression *cond)
 {
   return procfs_hw_watchpoint (addr, -1, type);
@@ -1540,7 +1609,8 @@ procfs_remove_hw_watchpoint (struct targ
 
 static int
 procfs_insert_hw_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int type,
+			     CORE_ADDR addr, int len,
+			     enum target_hw_bp_type type,
 			     struct expression *cond)
 {
   return procfs_hw_watchpoint (addr, len, type);
@@ -1549,5 +1619,21 @@ procfs_insert_hw_watchpoint (struct targ
 static int
 procfs_stopped_by_watchpoint (struct target_ops *ops)
 {
-  return 0;
+  /* NOTE: nto_stopped_by_watchpoint will be called ONLY while we are
+     stopped due to a SIGTRAP.  This assumes gdb works in 'all-stop' mode;
+     future gdb versions will likely run in 'non-stop' mode in which case
+     we will have to store/examine statuses per thread in question.
+     Until then, this will work fine.  */
+
+  struct inferior *inf = current_inferior ();
+  struct nto_inferior_data *inf_data;
+
+  gdb_assert (inf != NULL);
+
+  inf_data = nto_inferior_data (inf);
+
+  return inf_data->stopped_flags
+	 & (_DEBUG_FLAG_TRACE_RD
+	    | _DEBUG_FLAG_TRACE_WR
+	    | _DEBUG_FLAG_TRACE_MODIFY);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-tdep.c ./gdb/nto-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nto-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* nto-tdep.c - general QNX Neutrino target functionality.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -32,6 +32,9 @@
 #include "gdbcore.h"
 #include "objfiles.h"
 
+#define QNX_NOTE_NAME	"QNX"
+#define QNX_INFO_SECT_NAME "QNX_info"
+
 #ifdef __CYGWIN__
 #include <sys/cygwin.h>
 #endif
@@ -46,6 +49,8 @@ static char default_nto_target[] = "";
 
 struct nto_target_ops current_nto_target;
 
+static const struct inferior_data *nto_inferior_data_reg;
+
 static char *
 nto_target (void)
 {
@@ -82,7 +87,8 @@ nto_map_arch_to_cputype (const char *arc
 }
 
 int
-nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
+nto_find_and_open_solib (const char *solib, unsigned o_flags,
+			 char **temp_pathname)
 {
   char *buf, *arch_path, *nto_root;
   const char *endian;
@@ -118,11 +124,11 @@ nto_find_and_open_solib (char *solib, un
 
   arch_len = (strlen (nto_root) + strlen (arch) + strlen (endian) + 2
 	      + strlen (solib));
-  arch_path = alloca (arch_len);
+  arch_path = (char *) alloca (arch_len);
   xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
 
   len = strlen (PATH_FMT) + strlen (arch_path) * 5 + 1;
-  buf = alloca (len);
+  buf = (char *) alloca (len);
   xsnprintf (buf, len, PATH_FMT, arch_path, arch_path, arch_path, arch_path,
 	     arch_path);
 
@@ -194,7 +200,7 @@ nto_parse_redirection (char *pargv[], co
   out = "";
   err = "";
 
-  argv = xcalloc (n + 1, sizeof argv[0]);
+  argv = XCNEWVEC (char *, n + 1);
   argc = n;
   for (i = 0, n = 0; n < argc; n++)
     {
@@ -330,12 +336,51 @@ nto_dummy_supply_regset (struct regcache
   /* Do nothing.  */
 }
 
+static void
+nto_sniff_abi_note_section (bfd *abfd, asection *sect, void *obj)
+{
+  const char *sectname;
+  unsigned int sectsize;
+  /* Buffer holding the section contents.  */
+  char *note;
+  unsigned int namelen;
+  const char *name;
+  const unsigned sizeof_Elf_Nhdr = 12;
+
+  sectname = bfd_get_section_name (abfd, sect);
+  sectsize = bfd_section_size (abfd, sect);
+
+  if (sectsize > 128)
+    sectsize = 128;
+
+  if (sectname != NULL && strstr (sectname, QNX_INFO_SECT_NAME) != NULL)
+    *(enum gdb_osabi *) obj = GDB_OSABI_QNXNTO;
+  else if (sectname != NULL && strstr (sectname, "note") != NULL
+	   && sectsize > sizeof_Elf_Nhdr)
+    {
+      note = XNEWVEC (char, sectsize);
+      bfd_get_section_contents (abfd, sect, note, 0, sectsize);
+      namelen = (unsigned int) bfd_h_get_32 (abfd, note);
+      name = note + sizeof_Elf_Nhdr;
+      if (sectsize >= namelen + sizeof_Elf_Nhdr
+	  && namelen == sizeof (QNX_NOTE_NAME)
+	  && 0 == strcmp (name, QNX_NOTE_NAME))
+        *(enum gdb_osabi *) obj = GDB_OSABI_QNXNTO;
+
+      XDELETEVEC (note);
+    }
+}
+
 enum gdb_osabi
 nto_elf_osabi_sniffer (bfd *abfd)
 {
-  if (nto_is_nto_target)
-    return nto_is_nto_target (abfd);
-  return GDB_OSABI_UNKNOWN;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
+
+  bfd_map_over_sections (abfd,
+			 nto_sniff_abi_note_section,
+			 &osabi);
+
+  return osabi;
 }
 
 static const char *nto_thread_state_str[] =
@@ -394,3 +439,137 @@ nto_initialize_signals (void)
   signal_pass_update (SIGPHOTON, 1);
 #endif
 }
+
+/* Read AUXV from initial_stack.  */
+LONGEST
+nto_read_auxv_from_initial_stack (CORE_ADDR initial_stack, gdb_byte *readbuf,
+                                  LONGEST len, size_t sizeof_auxv_t)
+{
+  gdb_byte targ32[4]; /* For 32 bit target values.  */
+  gdb_byte targ64[8]; /* For 64 bit target values.  */
+  CORE_ADDR data_ofs = 0;
+  ULONGEST anint;
+  LONGEST len_read = 0;
+  gdb_byte *buff;
+  enum bfd_endian byte_order;
+  int ptr_size;
+
+  if (sizeof_auxv_t == 16)
+    ptr_size = 8;
+  else
+    ptr_size = 4;
+
+  /* Skip over argc, argv and envp... Comment from ldd.c:
+
+     The startup frame is set-up so that we have:
+     auxv
+     NULL
+     ...
+     envp2
+     envp1 <----- void *frame + (argc + 2) * sizeof(char *)
+     NULL
+     ...
+     argv2
+     argv1
+     argc  <------ void * frame
+
+     On entry to ldd, frame gives the address of argc on the stack.  */
+  /* Read argc. 4 bytes on both 64 and 32 bit arches and luckily little
+   * endian. So we just read first 4 bytes.  */
+  if (target_read_memory (initial_stack + data_ofs, targ32, 4) != 0)
+    return 0;
+
+  byte_order = gdbarch_byte_order (target_gdbarch ());
+
+  anint = extract_unsigned_integer (targ32, sizeof (targ32), byte_order);
+
+  /* Size of pointer is assumed to be 4 bytes (32 bit arch.) */
+  data_ofs += (anint + 2) * ptr_size; /* + 2 comes from argc itself and
+                                                NULL terminating pointer in
+                                                argv.  */
+
+  /* Now loop over env table:  */
+  anint = 0;
+  while (target_read_memory (initial_stack + data_ofs, targ64, ptr_size)
+         == 0)
+    {
+      if (extract_unsigned_integer (targ64, ptr_size, byte_order) == 0)
+	anint = 1; /* Keep looping until non-null entry is found.  */
+      else if (anint)
+	break;
+      data_ofs += ptr_size;
+    }
+  initial_stack += data_ofs;
+
+  memset (readbuf, 0, len);
+  buff = readbuf;
+  while (len_read <= len-sizeof_auxv_t)
+    {
+      if (target_read_memory (initial_stack + len_read, buff, sizeof_auxv_t)
+	  == 0)
+        {
+	  /* Both 32 and 64 bit structures have int as the first field.  */
+          const ULONGEST a_type
+	    = extract_unsigned_integer (buff, sizeof (targ32), byte_order);
+
+          if (a_type == AT_NULL)
+	    break;
+	  buff += sizeof_auxv_t;
+	  len_read += sizeof_auxv_t;
+        }
+      else
+        break;
+    }
+  return len_read;
+}
+
+/* Allocate new nto_inferior_data object.  */
+
+static struct nto_inferior_data *
+nto_new_inferior_data (void)
+{
+  struct nto_inferior_data *const inf_data
+    = XCNEW (struct nto_inferior_data);
+
+  return inf_data;
+}
+
+/* Free inferior data.  */
+
+static void
+nto_inferior_data_cleanup (struct inferior *const inf, void *const dat)
+{
+  xfree (dat);
+}
+
+/* Return nto_inferior_data for the given INFERIOR.  If not yet created,
+   construct it.  */
+
+struct nto_inferior_data *
+nto_inferior_data (struct inferior *const inferior)
+{
+  struct inferior *const inf = inferior ? inferior : current_inferior ();
+  struct nto_inferior_data *inf_data;
+
+  gdb_assert (inf != NULL);
+
+  inf_data
+    = (struct nto_inferior_data *) inferior_data (inf, nto_inferior_data_reg);
+  if (inf_data == NULL)
+    {
+      set_inferior_data (inf, nto_inferior_data_reg,
+			 (inf_data = nto_new_inferior_data ()));
+    }
+
+  return inf_data;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_nto_tdep;
+
+void
+_initialize_nto_tdep (void)
+{
+  nto_inferior_data_reg
+    = register_inferior_data_with_cleanup (NULL, nto_inferior_data_cleanup);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-tdep.h ./gdb/nto-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/nto-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/nto-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* nto-tdep.h - QNX Neutrino target header.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -142,6 +142,16 @@ struct private_thread_info
   char name[1];
 };
 
+/* Per-inferior data, common for both procfs and remote.  */
+struct nto_inferior_data
+{
+  /* Last stopped flags result from wait function */
+  unsigned int stopped_flags;
+
+  /* Last known stopped PC */
+  CORE_ADDR stopped_pc;
+};
+
 /* Generic functions in nto-tdep.c.  */
 
 void nto_init_solib_absolute_prefix (void);
@@ -154,7 +164,7 @@ void nto_relocate_section_addresses (str
 
 int nto_map_arch_to_cputype (const char *);
 
-int nto_find_and_open_solib (char *, unsigned, char **);
+int nto_find_and_open_solib (const char *, unsigned, char **);
 
 enum gdb_osabi nto_elf_osabi_sniffer (bfd *abfd);
 
@@ -168,4 +178,10 @@ int nto_in_dynsym_resolve_code (CORE_ADD
 
 char *nto_extra_thread_info (struct target_ops *self, struct thread_info *);
 
+LONGEST nto_read_auxv_from_initial_stack (CORE_ADDR inital_stack,
+					  gdb_byte *readbuf,
+					  LONGEST len, size_t sizeof_auxv_t);
+
+struct nto_inferior_data *nto_inferior_data (struct inferior *inf);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objc-lang.c ./gdb/objc-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objc-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/objc-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Objective-C language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
    Written by Michael Snyder.
@@ -85,7 +85,7 @@ lookup_struct_typedef (char *name, const
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0).symbol;
 
   if (sym == NULL)
     {
@@ -226,7 +226,7 @@ objc_demangle (const char *mangled, int 
      (mangled[1] == 'i' || mangled[1] == 'c') &&
       mangled[2] == '_')
     {
-      cp = demangled = xmalloc(strlen(mangled) + 2);
+      cp = demangled = (char *) xmalloc (strlen (mangled) + 2);
 
       if (mangled[1] == 'i')
 	*cp++ = '-';		/* for instance method */
@@ -281,6 +281,15 @@ objc_demangle (const char *mangled, int 
     return NULL;	/* Not an objc mangled name.  */
 }
 
+/* la_sniff_from_mangled_name for ObjC.  */
+
+static int
+objc_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = objc_demangle (mangled, 0);
+  return *demangled != NULL;
+}
+
 /* Determine if we are currently in the Objective-C dispatch function.
    If so, get the address of the method function that the dispatcher
    would call and use that as the function to step into instead.  Also
@@ -350,6 +359,11 @@ static const struct op_print objc_op_pri
     {NULL, OP_NULL, PREC_NULL, 0}
 };
 
+static const char *objc_extensions[] =
+{
+  ".m", NULL
+};
+
 const struct language_defn objc_language_defn = {
   "objective-c",		/* Language name */
   "Objective-C",
@@ -358,9 +372,10 @@ const struct language_defn objc_language
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  objc_extensions,
   &exp_descriptor_standard,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,		       /* Print a character constant */
   c_printstr,		       /* Function to print string constant */
@@ -375,6 +390,7 @@ const struct language_defn objc_language
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   objc_demangle,		/* Language specific symbol demangler */
+  objc_sniff_from_mangled_name,
   NULL,				/* Language specific
 				   class_name_from_physname */
   objc_op_print_tab,		/* Expression operators for printing */
@@ -413,8 +429,7 @@ static char *msglist_sel;
 void
 start_msglist(void)
 {
-  struct selname *newobj =
-    (struct selname *) xmalloc (sizeof (struct selname));
+  struct selname *newobj = XNEW (struct selname);
 
   newobj->next = selname_chain;
   newobj->msglist_len = msglist_len;
@@ -626,7 +641,7 @@ selectors_info (char *regexp, int from_t
       printf_filtered (_("Selectors matching \"%s\":\n\n"), 
 		       regexp ? regexp : "*");
 
-      sym_arr = alloca (matches * sizeof (struct symbol *));
+      sym_arr = XALLOCAVEC (struct symbol *, matches);
       matches = 0;
       ALL_MSYMBOLS (objfile, msymbol)
 	{
@@ -763,7 +778,7 @@ classes_info (char *regexp, int from_tty
     {
       printf_filtered (_("Classes matching \"%s\":\n\n"), 
 		       regexp ? regexp : "*");
-      sym_arr = alloca (matches * sizeof (struct symbol *));
+      sym_arr = XALLOCAVEC (struct symbol *, matches);
       matches = 0;
       ALL_MSYMBOLS (objfile, msymbol)
 	{
@@ -982,7 +997,7 @@ find_methods (char type, const char *the
 
       unsigned int objfile_csym = 0;
 
-      objc_csym = objfile_data (objfile, objc_objfile_data);
+      objc_csym = (unsigned int *) objfile_data (objfile, objc_objfile_data);
       if (objc_csym != NULL && *objc_csym == 0)
 	/* There are no ObjC symbols in this objfile.  Skip it entirely.  */
 	continue;
@@ -1007,7 +1022,7 @@ find_methods (char type, const char *the
 	  while ((strlen (symname) + 1) >= tmplen)
 	    {
 	      tmplen = (tmplen == 0) ? 1024 : tmplen * 2;
-	      tmp = xrealloc (tmp, tmplen);
+	      tmp = (char *) xrealloc (tmp, tmplen);
 	    }
 	  strcpy (tmp, symname);
 
@@ -1035,8 +1050,7 @@ find_methods (char type, const char *the
 
       if (objc_csym == NULL)
 	{
-	  objc_csym = obstack_alloc (&objfile->objfile_obstack,
-				     sizeof (*objc_csym));
+	  objc_csym = XOBNEW (&objfile->objfile_obstack, unsigned int);
 	  *objc_csym = objfile_csym;
 	  set_objfile_data (objfile, objc_objfile_data, objc_csym);
 	}
@@ -1144,7 +1158,8 @@ find_imps (const char *method, VEC (cons
      add the selector itself as a symbol, if it exists.  */
   if (selector_case && !VEC_empty (const_char_ptr, *symbol_names))
     {
-      struct symbol *sym = lookup_symbol (selector, NULL, VAR_DOMAIN, 0);
+      struct symbol *sym = lookup_symbol (selector, NULL, VAR_DOMAIN,
+					  0).symbol;
 
       if (sym != NULL) 
 	VEC_safe_push (const_char_ptr, *symbol_names,
@@ -1178,14 +1193,11 @@ print_object_command (char *args, int fr
 "The 'print-object' command requires an argument (an Objective-C object)");
 
   {
-    struct expression *expr = parse_expression (args);
-    struct cleanup *old_chain = 
-      make_cleanup (free_current_contents, &expr);
+    expression_up expr = parse_expression (args);
     int pc = 0;
 
     object = evaluate_subexp (builtin_type (expr->gdbarch)->builtin_data_ptr,
-			      expr, &pc, EVAL_NORMAL);
-    do_cleanups (old_chain);
+			      expr.get (), &pc, EVAL_NORMAL);
   }
 
   /* Validate the address for sanity.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objc-lang.h ./gdb/objc-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objc-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/objc-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Objective-C language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Apple Computer, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfile-flags.h ./gdb/objfile-flags.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfile-flags.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/objfile-flags.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+/* Definition of objfile flags.
+
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#if !defined (OBJFILE_FLAGS_H)
+#define OBJFILE_FLAGS_H
+
+#include "common/enum-flags.h"
+
+/* Defines for the objfile flags field.  Defined in a separate file to
+   break circular header dependencies.  */
+
+enum objfile_flag
+  {
+    /* When an object file has its functions reordered (currently
+       Irix-5.2 shared libraries exhibit this behaviour), we will need
+       an expensive algorithm to locate a partial symtab or symtab via
+       an address.  To avoid this penalty for normal object files, we
+       use this flag, whose setting is determined upon symbol table
+       read in.  */
+    OBJF_REORDERED = 1 << 0,	/* Functions are reordered */
+
+    /* Distinguish between an objfile for a shared library and a
+       "vanilla" objfile.  This may come from a target's
+       implementation of the solib interface, from add-symbol-file, or
+       any other mechanism that loads dynamic objects.  */
+    OBJF_SHARED = 1 << 1,	/* From a shared library */
+
+    /* User requested that this objfile be read in it's entirety.  */
+    OBJF_READNOW = 1 << 2,	/* Immediate full read */
+
+    /* This objfile was created because the user explicitly caused it
+       (e.g., used the add-symbol-file command).  This bit offers a
+       way for run_command to remove old objfile entries which are no
+       longer valid (i.e., are associated with an old inferior), but
+       to preserve ones that the user explicitly loaded via the
+       add-symbol-file command.  */
+    OBJF_USERLOADED = 1 << 3,	/* User loaded */
+
+    /* Set if we have tried to read partial symtabs for this objfile.
+       This is used to allow lazy reading of partial symtabs.  */
+    OBJF_PSYMTABS_READ = 1 << 4,
+
+    /* Set if this is the main symbol file (as opposed to symbol file
+       for dynamically loaded code).  */
+    OBJF_MAINLINE = 1 << 5,
+
+    /* ORIGINAL_NAME and OBFD->FILENAME correspond to text description
+       unrelated to filesystem names.  It can be for example
+       "<image in memory>".  */
+    OBJF_NOT_FILENAME = 1 << 6,
+  };
+
+DEF_ENUM_FLAGS_TYPE (enum objfile_flag, objfile_flags);
+
+#endif /* !defined (OBJFILE_FLAGS_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfiles.c ./gdb/objfiles.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfiles.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/objfiles.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB routines for manipulating objfiles.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -53,6 +53,8 @@
 #include "gdb_bfd.h"
 #include "btrace.h"
 
+#include <vector>
+
 /* Keep a registry of per-objfile data-pointers required by other GDB
    modules.  */
 
@@ -83,7 +85,7 @@ static const struct program_space_data *
 static void
 objfiles_pspace_data_cleanup (struct program_space *pspace, void *arg)
 {
-  struct objfile_pspace_info *info = arg;
+  struct objfile_pspace_info *info = (struct objfile_pspace_info *) arg;
 
   xfree (info->sections);
   xfree (info);
@@ -97,7 +99,8 @@ get_objfile_pspace_data (struct program_
 {
   struct objfile_pspace_info *info;
 
-  info = program_space_data (pspace, objfiles_pspace_data);
+  info = ((struct objfile_pspace_info *)
+	  program_space_data (pspace, objfiles_pspace_data));
   if (info == NULL)
     {
       info = XCNEW (struct objfile_pspace_info);
@@ -127,7 +130,8 @@ get_objfile_bfd_data (struct objfile *ob
   struct objfile_per_bfd_storage *storage = NULL;
 
   if (abfd != NULL)
-    storage = bfd_data (abfd, objfiles_bfd_data);
+    storage = ((struct objfile_per_bfd_storage *)
+	       bfd_data (abfd, objfiles_bfd_data));
 
   if (storage == NULL)
     {
@@ -136,7 +140,9 @@ get_objfile_bfd_data (struct objfile *ob
 	 enough that this seems reasonable.  */
       if (abfd != NULL && !gdb_bfd_requires_relocations (abfd))
 	{
-	  storage = bfd_zalloc (abfd, sizeof (struct objfile_per_bfd_storage));
+	  storage
+	    = ((struct objfile_per_bfd_storage *)
+	       bfd_zalloc (abfd, sizeof (struct objfile_per_bfd_storage)));
 	  set_bfd_data (abfd, objfiles_bfd_data, storage);
 	}
       else
@@ -174,7 +180,7 @@ free_objfile_per_bfd_storage (struct obj
 static void
 objfile_bfd_data_free (struct bfd *unused, void *d)
 {
-  free_objfile_per_bfd_storage (d);
+  free_objfile_per_bfd_storage ((struct objfile_per_bfd_storage *) d);
 }
 
 /* See objfiles.h.  */
@@ -195,10 +201,97 @@ set_objfile_main_name (struct objfile *o
   if (objfile->per_bfd->name_of_main == NULL
       || strcmp (objfile->per_bfd->name_of_main, name) != 0)
     objfile->per_bfd->name_of_main
-      = obstack_copy0 (&objfile->per_bfd->storage_obstack, name, strlen (name));
+      = (const char *) obstack_copy0 (&objfile->per_bfd->storage_obstack, name,
+				      strlen (name));
   objfile->per_bfd->language_of_main = lang;
 }
 
+/* Helper structure to map blocks to static link properties in hash tables.  */
+
+struct static_link_htab_entry
+{
+  const struct block *block;
+  const struct dynamic_prop *static_link;
+};
+
+/* Return a hash code for struct static_link_htab_entry *P.  */
+
+static hashval_t
+static_link_htab_entry_hash (const void *p)
+{
+  const struct static_link_htab_entry *e
+    = (const struct static_link_htab_entry *) p;
+
+  return htab_hash_pointer (e->block);
+}
+
+/* Return whether P1 an P2 (pointers to struct static_link_htab_entry) are
+   mappings for the same block.  */
+
+static int
+static_link_htab_entry_eq (const void *p1, const void *p2)
+{
+  const struct static_link_htab_entry *e1
+    = (const struct static_link_htab_entry *) p1;
+  const struct static_link_htab_entry *e2
+    = (const struct static_link_htab_entry *) p2;
+
+  return e1->block == e2->block;
+}
+
+/* Register STATIC_LINK as the static link for BLOCK, which is part of OBJFILE.
+   Must not be called more than once for each BLOCK.  */
+
+void
+objfile_register_static_link (struct objfile *objfile,
+			      const struct block *block,
+			      const struct dynamic_prop *static_link)
+{
+  void **slot;
+  struct static_link_htab_entry lookup_entry;
+  struct static_link_htab_entry *entry;
+
+  if (objfile->static_links == NULL)
+    objfile->static_links = htab_create_alloc
+      (1, &static_link_htab_entry_hash, static_link_htab_entry_eq, NULL,
+       xcalloc, xfree);
+
+  /* Create a slot for the mapping, make sure it's the first mapping for this
+     block and then create the mapping itself.  */
+  lookup_entry.block = block;
+  slot = htab_find_slot (objfile->static_links, &lookup_entry, INSERT);
+  gdb_assert (*slot == NULL);
+
+  entry = (struct static_link_htab_entry *) obstack_alloc
+	    (&objfile->objfile_obstack, sizeof (*entry));
+  entry->block = block;
+  entry->static_link = static_link;
+  *slot = (void *) entry;
+}
+
+/* Look for a static link for BLOCK, which is part of OBJFILE.  Return NULL if
+   none was found.  */
+
+const struct dynamic_prop *
+objfile_lookup_static_link (struct objfile *objfile,
+			    const struct block *block)
+{
+  struct static_link_htab_entry *entry;
+  struct static_link_htab_entry lookup_entry;
+
+  if (objfile->static_links == NULL)
+    return NULL;
+  lookup_entry.block = block;
+  entry
+    = (struct static_link_htab_entry *) htab_find (objfile->static_links,
+						   &lookup_entry);
+  if (entry == NULL)
+    return NULL;
+
+  gdb_assert (entry->block == block);
+  return entry->static_link;
+}
+
 
 
 /* Called via bfd_map_over_sections to build up the section table that
@@ -231,7 +324,7 @@ static void
 add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
 			 void *objfilep)
 {
-  add_to_objfile_sections_full (abfd, asect, objfilep, 0);
+  add_to_objfile_sections_full (abfd, asect, (struct objfile *) objfilep, 0);
 }
 
 /* Builds a section table for OBJFILE.
@@ -272,22 +365,13 @@ build_objfile_section_table (struct objf
    requests for specific operations.  Other bits like OBJF_SHARED are
    simply copied through to the new objfile flags member.  */
 
-/* NOTE: carlton/2003-02-04: This function is called with args NULL, 0
-   by jv-lang.c, to create an artificial objfile used to hold
-   information about dynamically-loaded Java classes.  Unfortunately,
-   that branch of this function doesn't get tested very frequently, so
-   it's prone to breakage.  (E.g. at one time the name was set to NULL
-   in that situation, which broke a loop over all names in the dynamic
-   library loader.)  If you change this function, please try to leave
-   things in a consistent state even if abfd is NULL.  */
-
 struct objfile *
-allocate_objfile (bfd *abfd, const char *name, int flags)
+allocate_objfile (bfd *abfd, const char *name, objfile_flags flags)
 {
   struct objfile *objfile;
   char *expanded_name;
 
-  objfile = (struct objfile *) xzalloc (sizeof (struct objfile));
+  objfile = XCNEW (struct objfile);
   objfile->psymbol_cache = psymbol_bcache_init ();
   /* We could use obstack_specify_allocation here instead, but
      gdb_obstack.h specifies the alloc/dealloc functions.  */
@@ -306,9 +390,10 @@ allocate_objfile (bfd *abfd, const char 
     expanded_name = xstrdup (name);
   else
     expanded_name = gdb_abspath (name);
-  objfile->original_name = obstack_copy0 (&objfile->objfile_obstack,
-					  expanded_name,
-					  strlen (expanded_name));
+  objfile->original_name
+    = (char *) obstack_copy0 (&objfile->objfile_obstack,
+			      expanded_name,
+			      strlen (expanded_name));
   xfree (expanded_name);
 
   /* Update the per-objfile information that comes from the bfd, ensuring
@@ -653,6 +738,11 @@ free_objfile (struct objfile *objfile)
   /* Rebuild section map next time we need it.  */
   get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1;
 
+  /* Free the map for static links.  There's no need to free static link
+     themselves since they were allocated on the objstack.  */
+  if (objfile->static_links != NULL)
+    htab_delete (objfile->static_links);
+
   /* The last thing we do is free the objfile struct itself.  */
   xfree (objfile);
 }
@@ -660,7 +750,7 @@ free_objfile (struct objfile *objfile)
 static void
 do_free_objfile_cleanup (void *obj)
 {
-  free_objfile (obj);
+  free_objfile ((struct objfile *) obj);
 }
 
 struct cleanup *
@@ -846,7 +936,6 @@ objfile_relocate (struct objfile *objfil
        debug_objfile = objfile_separate_debug_iterate (objfile, debug_objfile))
     {
       struct section_addr_info *objfile_addrs;
-      struct section_offsets *new_debug_offsets;
       struct cleanup *my_cleanups;
 
       objfile_addrs = build_section_addr_info_from_objfile (objfile);
@@ -859,14 +948,13 @@ objfile_relocate (struct objfile *objfil
 
       gdb_assert (debug_objfile->num_sections
 		  == gdb_bfd_count_sections (debug_objfile->obfd));
-      new_debug_offsets = 
-	xmalloc (SIZEOF_N_SECTION_OFFSETS (debug_objfile->num_sections));
-      make_cleanup (xfree, new_debug_offsets);
-      relative_addr_info_to_section_offsets (new_debug_offsets,
+      std::vector<struct section_offsets>
+	new_debug_offsets (SIZEOF_N_SECTION_OFFSETS (debug_objfile->num_sections));
+      relative_addr_info_to_section_offsets (new_debug_offsets.data (),
 					     debug_objfile->num_sections,
 					     objfile_addrs);
 
-      changed |= objfile_relocate1 (debug_objfile, new_debug_offsets);
+      changed |= objfile_relocate1 (debug_objfile, new_debug_offsets.data ());
 
       do_cleanups (my_cleanups);
     }
@@ -1294,7 +1382,7 @@ update_section_map (struct program_space
       return;
     }
 
-  map = xmalloc (alloc_size * sizeof (*map));
+  map = XNEWVEC (struct obj_section *, alloc_size);
 
   i = 0;
   ALL_PSPACE_OBJFILES (pspace, objfile)
@@ -1308,7 +1396,7 @@ update_section_map (struct program_space
 
   if (map_size < alloc_size)
     /* Some sections were eliminated.  Trim excess space.  */
-    map = xrealloc (map, map_size * sizeof (*map));
+    map = XRESIZEVEC (struct obj_section *, map, map_size);
   else
     gdb_assert (alloc_size == map_size);
 
@@ -1426,7 +1514,7 @@ resume_section_map_updates (struct progr
 void
 resume_section_map_updates_cleanup (void *arg)
 {
-  resume_section_map_updates (arg);
+  resume_section_map_updates ((struct program_space *) arg);
 }
 
 /* Return 1 if ADDR maps into one of the sections of OBJFILE and 0
@@ -1523,6 +1611,16 @@ objfile_debug_name (const struct objfile
   return lbasename (objfile->original_name);
 }
 
+/* See objfiles.h.  */
+
+const char *
+objfile_flavour_name (struct objfile *objfile)
+{
+  if (objfile->obfd != NULL)
+    return bfd_flavour_name (bfd_get_flavour (objfile->obfd));
+  return NULL;
+}
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 extern initialize_file_ftype _initialize_objfiles;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfiles.h ./gdb/objfiles.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/objfiles.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/objfiles.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for symbol file management in GDB.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,9 @@
 #if !defined (OBJFILES_H)
 #define OBJFILES_H
 
+#include "hashtab.h"
 #include "gdb_obstack.h"	/* For obstack internals.  */
+#include "objfile-flags.h"
 #include "symfile.h"		/* For struct psymbol_allocation_list.  */
 #include "progspace.h"
 #include "registry.h"
@@ -75,7 +77,7 @@ struct objfile_data;
    process startup code.  Since we have no guarantee that the linked
    in startup modules have any debugging information that gdb can use,
    we need to avoid following frame pointers back into frames that might
-   have been built in the startup code, as we might get hopelessly 
+   have been built in the startup code, as we might get hopelessly
    confused.  However, we almost always have debugging information
    available for main().
 
@@ -99,33 +101,34 @@ struct objfile_data;
    from user code don't go wandering off into the startup code.  */
 
 struct entry_info
-  {
-    /* The unrelocated value we should use for this objfile entry point.  */
-    CORE_ADDR entry_point;
-
-    /* The index of the section in which the entry point appears.  */
-    int the_bfd_section_index;
-
-    /* Set to 1 iff ENTRY_POINT contains a valid value.  */
-    unsigned entry_point_p : 1;
-
-    /* Set to 1 iff this object was initialized.  */
-    unsigned initialized : 1;
-  };
+{
+  /* The unrelocated value we should use for this objfile entry point.  */
+  CORE_ADDR entry_point;
+
+  /* The index of the section in which the entry point appears.  */
+  int the_bfd_section_index;
+
+  /* Set to 1 iff ENTRY_POINT contains a valid value.  */
+  unsigned entry_point_p : 1;
+
+  /* Set to 1 iff this object was initialized.  */
+  unsigned initialized : 1;
+};
 
 /* Sections in an objfile.  The section offsets are stored in the
    OBJFILE.  */
 
 struct obj_section
-  {
-    struct bfd_section *the_bfd_section;	/* BFD section pointer */
+{
+  /* BFD section pointer */
+  struct bfd_section *the_bfd_section;
 
-    /* Objfile this section is part of.  */
-    struct objfile *objfile;
+  /* Objfile this section is part of.  */
+  struct objfile *objfile;
 
-    /* True if this "overlay section" is mapped into an "overlay region".  */
-    int ovly_mapped;
-  };
+  /* True if this "overlay section" is mapped into an "overlay region".  */
+  int ovly_mapped;
+};
 
 /* Relocation offset applied to S.  */
 #define obj_section_offset(s)						\
@@ -149,13 +152,22 @@ struct obj_section
    read, size of string table (if any), etc.  */
 
 struct objstats
-  {
-    int n_psyms;		/* Number of partial symbols read */
-    int n_syms;			/* Number of full symbols read */
-    int n_stabs;		/* Number of ".stabs" read (if applicable) */
-    int n_types;		/* Number of types */
-    int sz_strtab;		/* Size of stringtable, (if applicable) */
-  };
+{
+  /* Number of partial symbols read.  */
+  int n_psyms;
+
+  /* Number of full symbols read.  */
+  int n_syms;
+
+  /* Number of ".stabs" read (if applicable).  */
+  int n_stabs;
+
+  /* Number of types.  */
+  int n_types;
+
+  /* Size of stringtable, (if applicable).  */
+  int sz_strtab;
+};
 
 #define OBJSTAT(objfile, expr) (objfile -> stats.expr)
 #define OBJSTATS struct objstats stats
@@ -175,12 +187,13 @@ struct objfile_per_bfd_storage
   /* The storage has an obstack of its own.  */
 
   struct obstack storage_obstack;
-  
+
   /* Byte cache for file names.  */
 
   struct bcache *filename_cache;
 
   /* Byte cache for macros.  */
+
   struct bcache *macro_cache;
 
   /* The gdbarch associated with the BFD.  Note that this gdbarch is
@@ -195,6 +208,7 @@ struct objfile_per_bfd_storage
      both null-terminated; the first one is a mangled or linkage
      name, and the second is the demangled name or just a zero byte
      if the name doesn't demangle.  */
+
   struct htab *demangled_names_hash;
 
   /* The per-objfile information about the entry point, the scope (file/func)
@@ -226,6 +240,7 @@ struct objfile_per_bfd_storage
      de-duplication is applied.  Note in particular that this has only
      a passing relationship with the actual size of the table above;
      use minimal_symbol_count if you need the true size.  */
+
   int n_minsyms;
 
   /* This is true if minimal symbols have already been read.  Symbol
@@ -257,211 +272,182 @@ struct objfile_per_bfd_storage
    (see remote-vx.c).  */
 
 struct objfile
-  {
-
-    /* All struct objfile's are chained together by their next pointers.
-       The program space field "objfiles"  (frequently referenced via
-       the macro "object_files") points to the first link in this
-       chain.  */
-
-    struct objfile *next;
-
-    /* The object file's original name as specified by the user,
-       made absolute, and tilde-expanded.  However, it is not canonicalized
-       (i.e., it has not been passed through gdb_realpath).
-       This pointer is never NULL.  This does not have to be freed; it is
-       guaranteed to have a lifetime at least as long as the objfile.  */
-
-    char *original_name;
-
-    CORE_ADDR addr_low;
-
-    /* Some flag bits for this objfile.
-       The values are defined by OBJF_*.  */
-
-    unsigned short flags;
+{
+  /* All struct objfile's are chained together by their next pointers.
+     The program space field "objfiles"  (frequently referenced via
+     the macro "object_files") points to the first link in this chain.  */
 
-    /* The program space associated with this objfile.  */
+  struct objfile *next;
 
-    struct program_space *pspace;
+  /* The object file's original name as specified by the user,
+     made absolute, and tilde-expanded.  However, it is not canonicalized
+     (i.e., it has not been passed through gdb_realpath).
+     This pointer is never NULL.  This does not have to be freed; it is
+     guaranteed to have a lifetime at least as long as the objfile.  */
 
-    /* List of compunits.
-       These are used to do symbol lookups and file/line-number lookups.  */
+  char *original_name;
 
-    struct compunit_symtab *compunit_symtabs;
+  CORE_ADDR addr_low;
 
-    /* Each objfile points to a linked list of partial symtabs derived from
-       this file, one partial symtab structure for each compilation unit
-       (source file).  */
+  /* Some flag bits for this objfile.  */
 
-    struct partial_symtab *psymtabs;
+  objfile_flags flags;
 
-    /* Map addresses to the entries of PSYMTABS.  It would be more efficient to
-       have a map per the whole process but ADDRMAP cannot selectively remove
-       its items during FREE_OBJFILE.  This mapping is already present even for
-       PARTIAL_SYMTABs which still have no corresponding full SYMTABs read.  */
+  /* The program space associated with this objfile.  */
 
-    struct addrmap *psymtabs_addrmap;
+  struct program_space *pspace;
 
-    /* List of freed partial symtabs, available for re-use.  */
+  /* List of compunits.
+     These are used to do symbol lookups and file/line-number lookups.  */
 
-    struct partial_symtab *free_psymtabs;
+  struct compunit_symtab *compunit_symtabs;
 
-    /* The object file's BFD.  Can be null if the objfile contains only
-       minimal symbols, e.g. the run time common symbols for SunOS4.  */
+  /* Each objfile points to a linked list of partial symtabs derived from
+     this file, one partial symtab structure for each compilation unit
+     (source file).  */
 
-    bfd *obfd;
+  struct partial_symtab *psymtabs;
 
-    /* The per-BFD data.  Note that this is treated specially if OBFD
-       is NULL.  */
+  /* Map addresses to the entries of PSYMTABS.  It would be more efficient to
+     have a map per the whole process but ADDRMAP cannot selectively remove
+     its items during FREE_OBJFILE.  This mapping is already present even for
+     PARTIAL_SYMTABs which still have no corresponding full SYMTABs read.  */
 
-    struct objfile_per_bfd_storage *per_bfd;
+  struct addrmap *psymtabs_addrmap;
 
-    /* The modification timestamp of the object file, as of the last time
-       we read its symbols.  */
+  /* List of freed partial symtabs, available for re-use.  */
 
-    long mtime;
+  struct partial_symtab *free_psymtabs;
 
-    /* Obstack to hold objects that should be freed when we load a new symbol
-       table from this object file.  */
+  /* The object file's BFD.  Can be null if the objfile contains only
+     minimal symbols, e.g. the run time common symbols for SunOS4.  */
 
-    struct obstack objfile_obstack; 
+  bfd *obfd;
 
-    /* A byte cache where we can stash arbitrary "chunks" of bytes that
-       will not change.  */
+  /* The per-BFD data.  Note that this is treated specially if OBFD
+     is NULL.  */
 
-    struct psymbol_bcache *psymbol_cache; /* Byte cache for partial syms.  */
+  struct objfile_per_bfd_storage *per_bfd;
 
-    /* Vectors of all partial symbols read in from file.  The actual data
-       is stored in the objfile_obstack.  */
+  /* The modification timestamp of the object file, as of the last time
+     we read its symbols.  */
 
-    struct psymbol_allocation_list global_psymbols;
-    struct psymbol_allocation_list static_psymbols;
+  long mtime;
 
-    /* Structure which keeps track of functions that manipulate objfile's
-       of the same type as this objfile.  I.e. the function to read partial
-       symbols for example.  Note that this structure is in statically
-       allocated memory, and is shared by all objfiles that use the
-       object module reader of this type.  */
+  /* Obstack to hold objects that should be freed when we load a new symbol
+     table from this object file.  */
 
-    const struct sym_fns *sf;
+  struct obstack objfile_obstack;
 
-    /* Per objfile data-pointers required by other GDB modules.  */
+  /* A byte cache where we can stash arbitrary "chunks" of bytes that
+     will not change.  */
 
-    REGISTRY_FIELDS;
+  struct psymbol_bcache *psymbol_cache; /* Byte cache for partial syms.  */
 
-    /* Set of relocation offsets to apply to each section.
-       The table is indexed by the_bfd_section->index, thus it is generally
-       as large as the number of sections in the binary.
-       The table is stored on the objfile_obstack.
+  /* Vectors of all partial symbols read in from file.  The actual data
+     is stored in the objfile_obstack.  */
 
-       These offsets indicate that all symbols (including partial and
-       minimal symbols) which have been read have been relocated by this
-       much.  Symbols which are yet to be read need to be relocated by it.  */
+  struct psymbol_allocation_list global_psymbols;
+  struct psymbol_allocation_list static_psymbols;
 
-    struct section_offsets *section_offsets;
-    int num_sections;
+  /* Structure which keeps track of functions that manipulate objfile's
+     of the same type as this objfile.  I.e. the function to read partial
+     symbols for example.  Note that this structure is in statically
+     allocated memory, and is shared by all objfiles that use the
+     object module reader of this type.  */
 
-    /* Indexes in the section_offsets array.  These are initialized by the
-       *_symfile_offsets() family of functions (som_symfile_offsets,
-       xcoff_symfile_offsets, default_symfile_offsets).  In theory they
-       should correspond to the section indexes used by bfd for the
-       current objfile.  The exception to this for the time being is the
-       SOM version.  */
+  const struct sym_fns *sf;
 
-    int sect_index_text;
-    int sect_index_data;
-    int sect_index_bss;
-    int sect_index_rodata;
+  /* Per objfile data-pointers required by other GDB modules.  */
 
-    /* These pointers are used to locate the section table, which
-       among other things, is used to map pc addresses into sections.
-       SECTIONS points to the first entry in the table, and
-       SECTIONS_END points to the first location past the last entry
-       in the table.  The table is stored on the objfile_obstack.  The
-       sections are indexed by the BFD section index; but the
-       structure data is only valid for certain sections
-       (e.g. non-empty, SEC_ALLOC).  */
+  REGISTRY_FIELDS;
 
-    struct obj_section *sections, *sections_end;
+  /* Set of relocation offsets to apply to each section.
+     The table is indexed by the_bfd_section->index, thus it is generally
+     as large as the number of sections in the binary.
+     The table is stored on the objfile_obstack.
 
-    /* GDB allows to have debug symbols in separate object files.  This is
-       used by .gnu_debuglink, ELF build id note and Mach-O OSO.
-       Although this is a tree structure, GDB only support one level
-       (ie a separate debug for a separate debug is not supported).  Note that
-       separate debug object are in the main chain and therefore will be
-       visited by ALL_OBJFILES & co iterators.  Separate debug objfile always
-       has a non-nul separate_debug_objfile_backlink.  */
+     These offsets indicate that all symbols (including partial and
+     minimal symbols) which have been read have been relocated by this
+     much.  Symbols which are yet to be read need to be relocated by it.  */
 
-    /* Link to the first separate debug object, if any.  */
-    struct objfile *separate_debug_objfile;
+  struct section_offsets *section_offsets;
+  int num_sections;
 
-    /* If this is a separate debug object, this is used as a link to the
-       actual executable objfile.  */
-    struct objfile *separate_debug_objfile_backlink;
+  /* Indexes in the section_offsets array.  These are initialized by the
+     *_symfile_offsets() family of functions (som_symfile_offsets,
+     xcoff_symfile_offsets, default_symfile_offsets).  In theory they
+     should correspond to the section indexes used by bfd for the
+     current objfile.  The exception to this for the time being is the
+     SOM version.  */
 
-    /* If this is a separate debug object, this is a link to the next one
-       for the same executable objfile.  */
-    struct objfile *separate_debug_objfile_link;
+  int sect_index_text;
+  int sect_index_data;
+  int sect_index_bss;
+  int sect_index_rodata;
 
-    /* Place to stash various statistics about this objfile.  */
-    OBJSTATS;
+  /* These pointers are used to locate the section table, which
+     among other things, is used to map pc addresses into sections.
+     SECTIONS points to the first entry in the table, and
+     SECTIONS_END points to the first location past the last entry
+     in the table.  The table is stored on the objfile_obstack.  The
+     sections are indexed by the BFD section index; but the
+     structure data is only valid for certain sections
+     (e.g. non-empty, SEC_ALLOC).  */
 
-    /* A linked list of symbols created when reading template types or
-       function templates.  These symbols are not stored in any symbol
-       table, so we have to keep them here to relocate them
-       properly.  */
-    struct symbol *template_symbols;
-  };
+  struct obj_section *sections, *sections_end;
 
-/* Defines for the objfile flag word.  */
+  /* GDB allows to have debug symbols in separate object files.  This is
+     used by .gnu_debuglink, ELF build id note and Mach-O OSO.
+     Although this is a tree structure, GDB only support one level
+     (ie a separate debug for a separate debug is not supported).  Note that
+     separate debug object are in the main chain and therefore will be
+     visited by ALL_OBJFILES & co iterators.  Separate debug objfile always
+     has a non-nul separate_debug_objfile_backlink.  */
 
-/* When an object file has its functions reordered (currently Irix-5.2
-   shared libraries exhibit this behaviour), we will need an expensive
-   algorithm to locate a partial symtab or symtab via an address.
-   To avoid this penalty for normal object files, we use this flag,
-   whose setting is determined upon symbol table read in.  */
+  /* Link to the first separate debug object, if any.  */
 
-#define OBJF_REORDERED	(1 << 0)	/* Functions are reordered */
+  struct objfile *separate_debug_objfile;
 
-/* Distinguish between an objfile for a shared library and a "vanilla"
-   objfile.  This may come from a target's implementation of the solib
-   interface, from add-symbol-file, or any other mechanism that loads
-   dynamic objects.  */
+  /* If this is a separate debug object, this is used as a link to the
+     actual executable objfile.  */
 
-#define OBJF_SHARED     (1 << 1)	/* From a shared library */
+  struct objfile *separate_debug_objfile_backlink;
 
-/* User requested that this objfile be read in it's entirety.  */
+  /* If this is a separate debug object, this is a link to the next one
+     for the same executable objfile.  */
 
-#define OBJF_READNOW	(1 << 2)	/* Immediate full read */
+  struct objfile *separate_debug_objfile_link;
 
-/* This objfile was created because the user explicitly caused it
-   (e.g., used the add-symbol-file command).  This bit offers a way
-   for run_command to remove old objfile entries which are no longer
-   valid (i.e., are associated with an old inferior), but to preserve
-   ones that the user explicitly loaded via the add-symbol-file
-   command.  */
+  /* Place to stash various statistics about this objfile.  */
 
-#define OBJF_USERLOADED	(1 << 3)	/* User loaded */
+  OBJSTATS;
 
-/* Set if we have tried to read partial symtabs for this objfile.
-   This is used to allow lazy reading of partial symtabs.  */
+  /* A linked list of symbols created when reading template types or
+     function templates.  These symbols are not stored in any symbol
+     table, so we have to keep them here to relocate them
+     properly.  */
 
-#define OBJF_PSYMTABS_READ (1 << 4)
+  struct symbol *template_symbols;
 
-/* Set if this is the main symbol file
-   (as opposed to symbol file for dynamically loaded code).  */
+  /* Associate a static link (struct dynamic_prop *) to all blocks (struct
+     block *) that have one.
 
-#define OBJF_MAINLINE (1 << 5)
+     In the context of nested functions (available in Pascal, Ada and GNU C,
+     for instance), a static link (as in DWARF's DW_AT_static_link attribute)
+     for a function is a way to get the frame corresponding to the enclosing
+     function.
 
-/* ORIGINAL_NAME and OBFD->FILENAME correspond to text description unrelated to
-   filesystem names.  It can be for example "<image in memory>".  */
-
-#define OBJF_NOT_FILENAME (1 << 6)
+     Very few blocks have a static link, so it's more memory efficient to
+     store these here rather than in struct block.  Static links must be
+     allocated on the objfile's obstack.  */
+  htab_t static_links;
+};
 
 /* Declarations for functions defined in objfiles.c */
 
-extern struct objfile *allocate_objfile (bfd *, const char *name, int);
+extern struct objfile *allocate_objfile (bfd *, const char *name,
+					 objfile_flags);
 
 extern struct gdbarch *get_objfile_arch (const struct objfile *);
 
@@ -471,8 +457,6 @@ extern CORE_ADDR entry_point_address (vo
 
 extern void build_objfile_section_table (struct objfile *);
 
-extern void terminate_minimal_symbol_table (struct objfile *objfile);
-
 extern struct objfile *objfile_separate_debug_iterate (const struct objfile *,
                                                        const struct objfile *);
 
@@ -714,9 +698,22 @@ const char *objfile_filename (const stru
 
 extern const char *objfile_debug_name (const struct objfile *objfile);
 
+/* Return the name of the file format of OBJFILE if the file has been opened,
+   otherwise return NULL.  */
+
+const char *objfile_flavour_name (struct objfile *objfile);
+
 /* Set the objfile's notion of the "main" name and language.  */
 
 extern void set_objfile_main_name (struct objfile *objfile,
 				   const char *name, enum language lang);
 
+extern void objfile_register_static_link
+  (struct objfile *objfile,
+   const struct block *block,
+   const struct dynamic_prop *static_link);
+
+extern const struct dynamic_prop *objfile_lookup_static_link
+  (struct objfile *objfile, const struct block *block);
+
 #endif /* !defined (OBJFILES_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-nat.c ./gdb/obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for OpenBSD.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-nat.h ./gdb/obsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/obsd-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for OpenBSD.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-tdep.c ./gdb/obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenBSD.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-tdep.h ./gdb/obsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/obsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/obsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenBSD.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/observer.c ./gdb/observer.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/observer.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/observer.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB Notifications to Observers.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/observer.sh ./gdb/observer.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/observer.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/observer.sh	2017-03-06 01:49:07.000000000 +0000
@@ -29,7 +29,7 @@ rm -f ${otmp}
 cat <<EOF >>${otmp}
 /* GDB Notifications to Observers.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -143,7 +143,7 @@ EOF
 
 	if test ! -z "${notify_args}"; then
 	    cat<<EOF >>${otmp}
-  const struct ${event}_args *args = args_data;
+  const struct ${event}_args *args = (const struct ${event}_args *) args_data;
 EOF
 	fi
 	cat <<EOF >>${otmp}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/opencl-lang.c ./gdb/opencl-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/opencl-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/opencl-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* OpenCL language support for GDB, the GNU debugger.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    Contributed by Ken Werner <ken.werner@de.ibm.com>.
 
@@ -69,7 +69,7 @@ static struct gdbarch_data *opencl_type_
 static struct type **
 builtin_opencl_type (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, opencl_type_data);
+  return (struct type **) gdbarch_data (gdbarch, opencl_type_data);
 }
 
 /* Returns the corresponding OpenCL vector type from the given type code,
@@ -172,8 +172,8 @@ lval_func_read (struct value *v)
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
   struct type *type = check_typedef (value_type (v));
   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
-  int offset = value_offset (v);
-  int elsize = TYPE_LENGTH (eltype);
+  LONGEST offset = value_offset (v);
+  LONGEST elsize = TYPE_LENGTH (eltype);
   int n, i, j = 0;
   LONGEST lowb = 0;
   LONGEST highb = 0;
@@ -201,8 +201,8 @@ lval_func_write (struct value *v, struct
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
   struct type *type = check_typedef (value_type (v));
   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
-  int offset = value_offset (v);
-  int elsize = TYPE_LENGTH (eltype);
+  LONGEST offset = value_offset (v);
+  LONGEST elsize = TYPE_LENGTH (eltype);
   int n, i, j = 0;
   LONGEST lowb = 0;
   LONGEST highb = 0;
@@ -243,7 +243,7 @@ lval_func_write (struct value *v, struct
 
 static int
 lval_func_check_synthetic_pointer (const struct value *v,
-				   int offset, int length)
+				   LONGEST offset, int length)
 {
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
   /* Size of the target type in bits.  */
@@ -984,7 +984,7 @@ Cannot perform conditional operation on 
 						"structure");
 
 	    if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	      v = value_zero (value_type (v), not_lval);
+	      v = value_zero (value_type (v), VALUE_LVAL (v));
 	    return v;
 	  }
       }
@@ -1007,7 +1007,7 @@ opencl_print_type (struct type *type, co
      be printed using their TYPE_NAME.  */
   if (show > 0)
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
       if (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
 	  && TYPE_NAME (type) != NULL)
 	show = 0;
@@ -1052,9 +1052,10 @@ const struct language_defn opencl_langua
   case_sensitive_on,
   array_row_major,
   macro_expansion_c,
+  NULL,
   &exp_descriptor_opencl,
   c_parse,
-  c_error,
+  c_yyerror,
   null_post_parser,
   c_printchar,			/* Print a character constant */
   c_printstr,			/* Function to print string constant */
@@ -1069,6 +1070,7 @@ const struct language_defn opencl_langua
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific
 				   class_name_from_physname */
   c_op_print_tab,		/* expression operators for printing */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osabi.c ./gdb/osabi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osabi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/osabi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* OS ABI variant handling for GDB.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,17 +64,12 @@ static const struct osabi_names gdb_osab
   { "GNU/Hurd", NULL },
   { "Solaris", NULL },
   { "GNU/Linux", "linux(-gnu)?" },
-  { "FreeBSD a.out", NULL },
-  { "FreeBSD ELF", NULL },
-  { "NetBSD a.out", NULL },
-  { "NetBSD ELF", NULL },
-  { "OpenBSD ELF", NULL },
-  { "Windows CE", NULL },
+  { "FreeBSD", NULL },
+  { "NetBSD", NULL },
+  { "OpenBSD", NULL },
+  { "WindowsCE", NULL },
   { "DJGPP", NULL },
-  { "Irix", NULL },
-  { "HP/UX ELF", NULL },
-  { "HP/UX SOM", NULL },
-  { "QNX Neutrino", NULL },
+  { "QNX-Neutrino", NULL },
   { "Cygwin", NULL },
   { "AIX", NULL },
   { "DICOS", NULL },
@@ -187,8 +182,7 @@ gdbarch_register_osabi (enum bfd_archite
 	}
     }
 
-  (*handler_p)
-    = (struct gdb_osabi_handler *) xmalloc (sizeof (struct gdb_osabi_handler));
+  (*handler_p) = XNEW (struct gdb_osabi_handler);
   (*handler_p)->next = NULL;
   (*handler_p)->arch_info = arch_info;
   (*handler_p)->osabi = osabi;
@@ -228,8 +222,7 @@ gdbarch_register_osabi_sniffer (enum bfd
 {
   struct gdb_osabi_sniffer *sniffer;
 
-  sniffer =
-    (struct gdb_osabi_sniffer *) xmalloc (sizeof (struct gdb_osabi_sniffer));
+  sniffer = XNEW (struct gdb_osabi_sniffer);
   sniffer->arch = arch;
   sniffer->flavour = flavour;
   sniffer->sniffer = sniffer_fn;
@@ -443,7 +436,7 @@ check_note (bfd *abfd, asection *sect, c
 void
 generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
 {
-  enum gdb_osabi *osabi = obj;
+  enum gdb_osabi *osabi = (enum gdb_osabi *) obj;
   const char *name;
   unsigned int sectsize;
   char *note;
@@ -460,7 +453,7 @@ generic_elf_osabi_sniff_abi_tag_sections
      compressed section.  But, since note sections are not compressed,
      deferring the reading until we recognize the section avoids any
      error.  */
-  note = alloca (sectsize);
+  note = (char *) alloca (sectsize);
 
   /* .note.ABI-tag notes, used by GNU/Linux and FreeBSD.  */
   if (strcmp (name, ".note.ABI-tag") == 0)
@@ -485,11 +478,11 @@ generic_elf_osabi_sniff_abi_tag_sections
 	      break;
 
 	    case GNU_ABI_TAG_FREEBSD:
-	      *osabi = GDB_OSABI_FREEBSD_ELF;
+	      *osabi = GDB_OSABI_FREEBSD;
 	      break;
 
 	    case GNU_ABI_TAG_NETBSD:
-	      *osabi = GDB_OSABI_NETBSD_ELF;
+	      *osabi = GDB_OSABI_NETBSD;
 	      break;
 
 	    default:
@@ -504,7 +497,7 @@ generic_elf_osabi_sniff_abi_tag_sections
 		      NT_FREEBSD_ABI_TAG))
 	{
 	  /* There is no need to check the version yet.  */
-	  *osabi = GDB_OSABI_FREEBSD_ELF;
+	  *osabi = GDB_OSABI_FREEBSD;
 	  return;
 	}
 
@@ -516,7 +509,7 @@ generic_elf_osabi_sniff_abi_tag_sections
       && check_note (abfd, sect, note, &sectsize, "NetBSD", 4, NT_NETBSD_IDENT))
     {
       /* There is no need to check the version yet.  */
-      *osabi = GDB_OSABI_NETBSD_ELF;
+      *osabi = GDB_OSABI_NETBSD;
       return;
     }
 
@@ -526,14 +519,14 @@ generic_elf_osabi_sniff_abi_tag_sections
 		     NT_OPENBSD_IDENT))
     {
       /* There is no need to check the version yet.  */
-      *osabi = GDB_OSABI_OPENBSD_ELF;
+      *osabi = GDB_OSABI_OPENBSD;
       return;
     }
 
   /* .note.netbsdcore.procinfo notes, used by NetBSD.  */
   if (strcmp (name, ".note.netbsdcore.procinfo") == 0)
     {
-      *osabi = GDB_OSABI_NETBSD_ELF;
+      *osabi = GDB_OSABI_NETBSD;
       return;
     }
 }
@@ -550,6 +543,7 @@ generic_elf_osabi_sniffer (bfd *abfd)
     {
     case ELFOSABI_NONE:
     case ELFOSABI_GNU:
+    case ELFOSABI_HPUX:
       /* When the EI_OSABI field in the ELF header is ELFOSABI_NONE
 	 (0), then the ELF structures in the file are conforming to
 	 the base specification for that machine (there are no
@@ -558,34 +552,27 @@ generic_elf_osabi_sniffer (bfd *abfd)
 
 	 The same applies for ELFOSABI_GNU: this can mean GNU/Hurd,
 	 GNU/Linux, and possibly more.  */
+
+      /* And likewise ELFOSABI_HPUX.  For some reason the default
+	 value for the EI_OSABI field is ELFOSABI_HPUX for all PA-RISC
+	 targets (with the exception of GNU/Linux).  */
       bfd_map_over_sections (abfd,
 			     generic_elf_osabi_sniff_abi_tag_sections,
 			     &osabi);
       break;
 
     case ELFOSABI_FREEBSD:
-      osabi = GDB_OSABI_FREEBSD_ELF;
+      osabi = GDB_OSABI_FREEBSD;
       break;
 
     case ELFOSABI_NETBSD:
-      osabi = GDB_OSABI_NETBSD_ELF;
+      osabi = GDB_OSABI_NETBSD;
       break;
 
     case ELFOSABI_SOLARIS:
       osabi = GDB_OSABI_SOLARIS;
       break;
 
-    case ELFOSABI_HPUX:
-      /* For some reason the default value for the EI_OSABI field is
-	 ELFOSABI_HPUX for all PA-RISC targets (with the exception of
-	 GNU/Linux).  We use HP-UX ELF as the default, but let any
-	 OS-specific notes override this.  */
-      osabi = GDB_OSABI_HPUX_ELF;
-      bfd_map_over_sections (abfd,
-			     generic_elf_osabi_sniff_abi_tag_sections,
-			     &osabi);
-      break;
-
     case ELFOSABI_OPENVMS:
       osabi = GDB_OSABI_OPENVMS;
       break;
@@ -598,7 +585,7 @@ generic_elf_osabi_sniffer (bfd *abfd)
 	 header to "brand" their ELF binaries in FreeBSD 3.x.  */
       if (memcmp (&elf_elfheader (abfd)->e_ident[8],
 		  "FreeBSD", sizeof ("FreeBSD")) == 0)
-	osabi = GDB_OSABI_FREEBSD_ELF;
+	osabi = GDB_OSABI_FREEBSD;
     }
 
   return osabi;
@@ -626,12 +613,16 @@ set_osabi (char *args, int from_tty, str
       int i;
 
       for (i = 1; i < GDB_OSABI_INVALID; i++)
-	if (strcmp (set_osabi_string, gdbarch_osabi_name (i)) == 0)
-	  {
-	    user_selected_osabi = i;
-	    user_osabi_state = osabi_user;
-	    break;
-	  }
+        {
+	  enum gdb_osabi osabi = (enum gdb_osabi) i;
+
+	  if (strcmp (set_osabi_string, gdbarch_osabi_name (osabi)) == 0)
+	    {
+	      user_selected_osabi = osabi;
+	      user_osabi_state = osabi_user;
+	      break;
+	    }
+	}
       if (i == GDB_OSABI_INVALID)
 	internal_error (__FILE__, __LINE__,
 			_("Invalid OS ABI \"%s\" passed to command handler."),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osabi.h ./gdb/osabi.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osabi.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/osabi.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* OS ABI variant handling for GDB.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osdata.c ./gdb/osdata.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osdata.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/osdata.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for handling XML generic OS data provided by target.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,14 +58,14 @@ osdata_start_osdata (struct gdb_xml_pars
                         const struct gdb_xml_element *element,
                         void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct osdata_parsing_data *data = user_data;
+  struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
   char *type;
   struct osdata *osdata;
 
   if (data->osdata)
     gdb_xml_error (parser, _("Seen more than on osdata element"));
 
-  type = xml_find_attribute (attributes, "type")->value;
+  type = (char *) xml_find_attribute (attributes, "type")->value;
   osdata = XCNEW (struct osdata);
   osdata->type = xstrdup (type);
   data->osdata = osdata;
@@ -78,7 +78,7 @@ osdata_start_item (struct gdb_xml_parser
                   const struct gdb_xml_element *element,
                   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct osdata_parsing_data *data = user_data;
+  struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
   struct osdata_item item = { NULL };
 
   VEC_safe_push (osdata_item_s, data->osdata->items, &item);
@@ -91,8 +91,9 @@ osdata_start_column (struct gdb_xml_pars
                     const struct gdb_xml_element *element,
                     void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct osdata_parsing_data *data = user_data;
-  const char *name = xml_find_attribute (attributes, "name")->value;
+  struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
+  const char *name
+    = (const char *) xml_find_attribute (attributes, "name")->value;
 
   data->property_name = xstrdup (name);
 }
@@ -104,7 +105,7 @@ osdata_end_column (struct gdb_xml_parser
                   const struct gdb_xml_element *element,
                   void *user_data, const char *body_text)
 {
-  struct osdata_parsing_data *data = user_data;
+  struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
   struct osdata *osdata = data->osdata;
   struct osdata_item *item = VEC_last (osdata_item_s, osdata->items);
   struct osdata_column *col = VEC_safe_push (osdata_column_s,
@@ -121,7 +122,7 @@ osdata_end_column (struct gdb_xml_parser
 static void
 clear_parsing_data (void *p)
 {
-  struct osdata_parsing_data *data = p;
+  struct osdata_parsing_data *data = (struct osdata_parsing_data *) p;
 
   osdata_free (data->osdata);
   data->osdata = NULL;
@@ -229,7 +230,7 @@ osdata_free (struct osdata *osdata)
 static void
 osdata_free_cleanup (void *arg)
 {
-  struct osdata *osdata = arg;
+  struct osdata *osdata = (struct osdata *) arg;
 
   osdata_free (osdata);
 }
@@ -314,7 +315,7 @@ info_osdata_command (char *type, int fro
 	 for a column named "Title", and only include it with MI
 	 output; this column's normal use is for titles for interface
 	 elements like menus, and it clutters up CLI output.  */
-      if (!type && !ui_out_is_mi_like_p (uiout))
+      if (!type && !uiout->is_mi_like_p ())
 	{
 	  struct osdata_column *col;
 	  int ix;
@@ -360,12 +361,12 @@ info_osdata_command (char *type, int fro
 	    continue;
 
 	  snprintf (col_name, 32, "col%d", ix);
-	  ui_out_table_header (uiout, 10, ui_left,
+	  uiout->table_header (10, ui_left,
 			       col_name, col->name);
         }
     }
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
 
   if (nrows != 0)
     {
@@ -394,12 +395,12 @@ info_osdata_command (char *type, int fro
 	       continue;
 
 	     snprintf (col_name, 32, "col%d", ix_cols);
-	     ui_out_field_string (uiout, col_name, col->value);
+	     uiout->field_string (col_name, col->value);
 	   }
 	 
          do_cleanups (old_chain);
 
-         ui_out_text (uiout, "\n");
+         uiout->text ("\n");
        }
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osdata.h ./gdb/osdata.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/osdata.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/osdata.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Routines for handling XML generic OS data provided by target.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/parse.c ./gdb/parse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/parse.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/parse.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Parse expressions for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Modified from expread.y by the Department of Computer Science at the
    State University of New York at Buffalo, 1991.
@@ -49,6 +49,7 @@
 #include "source.h"
 #include "objfiles.h"
 #include "user-regs.h"
+#include <algorithm>
 
 /* Standard set of definitions for printing, dumping, prefixifying,
  * and evaluating expressions.  */
@@ -114,12 +115,12 @@ static void free_funcalls (void *ignore)
 static int prefixify_subexp (struct expression *, struct expression *, int,
 			     int);
 
-static struct expression *parse_exp_in_context (const char **, CORE_ADDR,
-						const struct block *, int, 
-						int, int *);
-static struct expression *parse_exp_in_context_1 (const char **, CORE_ADDR,
-						  const struct block *, int,
-						  int, int *);
+static expression_up parse_exp_in_context (const char **, CORE_ADDR,
+					   const struct block *, int,
+					   int, int *);
+static expression_up parse_exp_in_context_1 (const char **, CORE_ADDR,
+					     const struct block *, int,
+					     int, int *);
 
 void _initialize_parse (void);
 
@@ -142,7 +143,7 @@ start_arglist (void)
 {
   struct funcall *newobj;
 
-  newobj = (struct funcall *) xmalloc (sizeof (struct funcall));
+  newobj = XNEW (struct funcall);
   newobj->next = funcall_chain;
   newobj->arglist_len = arglist_len;
   arglist_len = 0;
@@ -189,8 +190,9 @@ initialize_expout (struct parser_state *
 {
   ps->expout_size = initial_size;
   ps->expout_ptr = 0;
-  ps->expout = xmalloc (sizeof (struct expression)
-			+ EXP_ELEM_TO_BYTES (ps->expout_size));
+  ps->expout
+    = (struct expression *) xmalloc (sizeof (struct expression)
+				     + EXP_ELEM_TO_BYTES (ps->expout_size));
   ps->expout->language_defn = lang;
   ps->expout->gdbarch = gdbarch;
 }
@@ -585,7 +587,7 @@ mark_completion_tag (enum type_code tag,
 	      || tag == TYPE_CODE_STRUCT
 	      || tag == TYPE_CODE_ENUM);
   expout_tag_completion_type = tag;
-  expout_completion_name = xmalloc (length + 1);
+  expout_completion_name = (char *) xmalloc (length + 1);
   memcpy (expout_completion_name, ptr, length);
   expout_completion_name[length] = '\0';
 }
@@ -615,7 +617,7 @@ mark_completion_tag (enum type_code tag,
 void
 write_dollar_variable (struct parser_state *ps, struct stoken str)
 {
-  struct symbol *sym = NULL;
+  struct block_symbol sym;
   struct bound_minimal_symbol msym;
   struct internalvar *isym = NULL;
 
@@ -672,11 +674,11 @@ write_dollar_variable (struct parser_sta
 
   sym = lookup_symbol (copy_name (str), (struct block *) NULL,
 		       VAR_DOMAIN, NULL);
-  if (sym)
+  if (sym.symbol)
     {
       write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      write_exp_elt_block (ps, block_found);	/* set by lookup_symbol */
-      write_exp_elt_sym (ps, sym);
+      write_exp_elt_block (ps, sym.block);
+      write_exp_elt_sym (ps, sym.symbol);
       write_exp_elt_opcode (ps, OP_VAR_VALUE);
       return;
     }
@@ -795,7 +797,7 @@ copy_name (struct stoken token)
   if (namecopy_size < token.length + 1)
     {
       namecopy_size = token.length + 1;
-      namecopy = xrealloc (namecopy, token.length + 1);
+      namecopy = (char *) xrealloc (namecopy, token.length + 1);
     }
       
   memcpy (namecopy, token.ptr, token.length);
@@ -861,7 +863,7 @@ operator_length_standard (const struct e
 {
   int oplen = 1;
   int args = 0;
-  enum f90_range_type range_type;
+  enum range_type range_type;
   int i;
 
   if (endpos < 1)
@@ -1003,10 +1005,11 @@ operator_length_standard (const struct e
       oplen = 2;
       break;
 
-    case OP_F90_RANGE:
+    case OP_RANGE:
       oplen = 3;
+      range_type = (enum range_type)
+	longest_to_int (expr->elts[endpos - 2].longconst);
 
-      range_type = longest_to_int (expr->elts[endpos - 2].longconst);
       switch (range_type)
 	{
 	case LOW_BOUND_DEFAULT:
@@ -1105,14 +1108,14 @@ prefixify_subexp (struct expression *ine
 
    If COMMA is nonzero, stop if a comma is reached.  */
 
-struct expression *
+expression_up
 parse_exp_1 (const char **stringptr, CORE_ADDR pc, const struct block *block,
 	     int comma)
 {
   return parse_exp_in_context (stringptr, pc, block, comma, 0, NULL);
 }
 
-static struct expression *
+static expression_up
 parse_exp_in_context (const char **stringptr, CORE_ADDR pc,
 		      const struct block *block,
 		      int comma, int void_context_p, int *out_subexp)
@@ -1128,7 +1131,7 @@ parse_exp_in_context (const char **strin
    left-hand-side of the struct op.  If not doing such completion, it
    is left untouched.  */
 
-static struct expression *
+static expression_up
 parse_exp_in_context_1 (const char **stringptr, CORE_ADDR pc,
 			const struct block *block,
 			int comma, int void_context_p, int *out_subexp)
@@ -1251,18 +1254,16 @@ parse_exp_in_context_1 (const char **str
   discard_cleanups (old_chain);
 
   *stringptr = lexptr;
-  return ps.expout;
+  return expression_up (ps.expout);
 }
 
 /* Parse STRING as an expression, and complain if this fails
    to use up all of the contents of STRING.  */
 
-struct expression *
+expression_up
 parse_expression (const char *string)
 {
-  struct expression *exp;
-
-  exp = parse_exp_1 (&string, 0, 0, 0);
+  expression_up exp = parse_exp_1 (&string, 0, 0, 0);
   if (*string)
     error (_("Junk after end of expression."));
   return exp;
@@ -1271,11 +1272,10 @@ parse_expression (const char *string)
 /* Same as parse_expression, but using the given language (LANG)
    to parse the expression.  */
 
-struct expression *
+expression_up
 parse_expression_with_language (const char *string, enum language lang)
 {
   struct cleanup *old_chain = NULL;
-  struct expression *expr;
 
   if (current_language->la_language != lang)
     {
@@ -1283,7 +1283,7 @@ parse_expression_with_language (const ch
       set_language (lang);
     }
 
-  expr = parse_expression (string);
+  expression_up expr = parse_expression (string);
 
   if (old_chain != NULL)
     do_cleanups (old_chain);
@@ -1302,7 +1302,7 @@ struct type *
 parse_expression_for_completion (const char *string, char **name,
 				 enum type_code *code)
 {
-  struct expression *exp = NULL;
+  expression_up exp;
   struct value *val;
   int subexp;
 
@@ -1330,24 +1330,17 @@ parse_expression_for_completion (const c
     }
 
   if (expout_last_struct == -1)
-    {
-      xfree (exp);
-      return NULL;
-    }
+    return NULL;
 
-  *name = extract_field_op (exp, &subexp);
+  *name = extract_field_op (exp.get (), &subexp);
   if (!*name)
-    {
-      xfree (exp);
-      return NULL;
-    }
+    return NULL;
 
   /* This might throw an exception.  If so, we want to let it
      propagate.  */
-  val = evaluate_subexpression_type (exp, subexp);
+  val = evaluate_subexpression_type (exp.get (), subexp);
   /* (*NAME) is a part of the EXP memory block freed below.  */
   *name = xstrdup (*name);
-  xfree (exp);
 
   return value_type (val);
 }
@@ -1372,7 +1365,7 @@ parse_float (const char *p, int len, DOU
   char *copy;
   int n, num;
 
-  copy = xmalloc (len + 1);
+  copy = (char *) xmalloc (len + 1);
   memcpy (copy, p, len);
   copy[len] = 0;
 
@@ -1438,8 +1431,8 @@ type_stack_reserve (struct type_stack *s
       stack->size *= 2;
       if (stack->size < howmuch)
 	stack->size = howmuch;
-      stack->elements = xrealloc (stack->elements,
-				  stack->size * sizeof (union type_stack_elt));
+      stack->elements = XRESIZEVEC (union type_stack_elt, stack->elements,
+				    stack->size);
     }
 }
 
@@ -1619,7 +1612,7 @@ get_type_stack (void)
 void
 type_stack_cleanup (void *arg)
 {
-  struct type_stack *stack = arg;
+  struct type_stack *stack = (struct type_stack *) arg;
 
   xfree (stack->elements);
   xfree (stack);
@@ -1896,7 +1889,7 @@ exp_iterate (struct expression *exp,
 static int
 exp_uses_objfile_iter (struct objfile *exp_objfile, void *objfile_voidp)
 {
-  struct objfile *objfile = objfile_voidp;
+  struct objfile *objfile = (struct objfile *) objfile_voidp;
 
   if (exp_objfile->separate_debug_objfile_backlink)
     exp_objfile = exp_objfile->separate_debug_objfile_backlink;
@@ -1923,7 +1916,7 @@ increase_expout_size (struct parser_stat
 {
   if ((ps->expout_ptr + lenelt) >= ps->expout_size)
     {
-      ps->expout_size = max (ps->expout_size * 2,
+      ps->expout_size = std::max (ps->expout_size * 2,
 			     ps->expout_ptr + lenelt + 10);
       ps->expout = (struct expression *)
 	xrealloc (ps->expout, (sizeof (struct expression)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/parser-defs.h ./gdb/parser-defs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/parser-defs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/parser-defs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Parser definitions for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Modified from expread.y by the Department of Computer Science at the
    State University of New York at Buffalo.
@@ -106,7 +106,7 @@ struct ttype
 struct symtoken
   {
     struct stoken stoken;
-    struct symbol *sym;
+    struct block_symbol sym;
     int is_a_field_of_this;
   };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-exp.c ./gdb/p-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-exp.c	2015-07-06 01:51:10.000000000 +0000
+++ ./gdb/p-exp.c	2017-03-06 01:53:01.000000000 +0000
@@ -86,65 +86,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth pascal_maxdepth
-#define	yyparse	pascal_parse_internal
-#define	yylex	pascal_lex
-#define	yyerror	pascal_error
-#define	yylval	pascal_lval
-#define	yychar	pascal_char
-#define	yydebug	pascal_debug
-#define	yypact	pascal_pact
-#define	yyr1	pascal_r1
-#define	yyr2	pascal_r2
-#define	yydef	pascal_def
-#define	yychk	pascal_chk
-#define	yypgo	pascal_pgo
-#define	yyact	pascal_act
-#define	yyexca	pascal_exca
-#define yyerrflag pascal_errflag
-#define yynerrs	pascal_nerrs
-#define	yyps	pascal_ps
-#define	yypv	pascal_pv
-#define	yys	pascal_s
-#define	yy_yys	pascal_yys
-#define	yystate	pascal_state
-#define	yytmp	pascal_tmp
-#define	yyv	pascal_v
-#define	yy_yyv	pascal_yyv
-#define	yyval	pascal_val
-#define	yylloc	pascal_lloc
-#define yyreds	pascal_reds		/* With YYDEBUG defined */
-#define yytoks	pascal_toks		/* With YYDEBUG defined */
-#define yyname	pascal_name		/* With YYDEBUG defined */
-#define yyrule	pascal_rule		/* With YYDEBUG defined */
-#define yylhs	pascal_yylhs
-#define yylen	pascal_yylen
-#define yydefred pascal_yydefred
-#define yydgoto	pascal_yydgoto
-#define yysindex pascal_yysindex
-#define yyrindex pascal_yyrindex
-#define yygindex pascal_yygindex
-#define yytable	 pascal_yytable
-#define yycheck	 pascal_yycheck
-#define yyss	pascal_yyss
-#define yysslim	pascal_yysslim
-#define yyssp	pascal_yyssp
-#define yystacksize pascal_yystacksize
-#define yyvs	pascal_yyvs
-#define yyvsp	pascal_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX pascal_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -161,7 +106,7 @@ static char *uptok (const char *, int);
 
 
 /* Line 189 of yacc.c  */
-#line 165 "p-exp.c"
+#line 110 "p-exp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -270,7 +215,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 140 "p-exp.y"
+#line 85 "p-exp.y"
 
     LONGEST lval;
     struct {
@@ -297,7 +242,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 301 "p-exp.c"
+#line 246 "p-exp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -308,7 +253,7 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 /* Line 264 of yacc.c  */
-#line 164 "p-exp.y"
+#line 109 "p-exp.y"
 
 /* YYSTYPE gets defined by %union */
 static int parse_number (struct parser_state *,
@@ -323,7 +268,7 @@ static int search_field;
 
 
 /* Line 264 of yacc.c  */
-#line 327 "p-exp.c"
+#line 272 "p-exp.c"
 
 #ifdef short
 # undef short
@@ -637,14 +582,14 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   246,   246,   246,   255,   256,   259,   266,   267,   272,
-     278,   284,   288,   292,   296,   301,   305,   323,   339,   345,
-     357,   355,   388,   385,   401,   402,   404,   408,   423,   429,
-     433,   433,   456,   460,   464,   468,   472,   476,   480,   486,
-     492,   498,   504,   510,   516,   520,   524,   528,   532,   539,
-     546,   554,   568,   576,   579,   594,   605,   609,   641,   669,
-     687,   697,   712,   727,   728,   759,   831,   842,   846,   848,
-     850,   853,   861,   862,   863,   864,   867,   868
+       0,   191,   191,   191,   200,   201,   204,   211,   212,   217,
+     223,   229,   233,   237,   241,   246,   250,   268,   284,   290,
+     302,   300,   333,   330,   346,   347,   349,   353,   368,   374,
+     378,   378,   401,   405,   409,   413,   417,   421,   425,   431,
+     437,   443,   449,   455,   461,   465,   469,   473,   477,   484,
+     491,   499,   513,   521,   524,   539,   550,   554,   586,   614,
+     632,   643,   658,   674,   675,   706,   775,   786,   790,   792,
+     794,   797,   805,   806,   807,   808,   811,   812
 };
 #endif
 
@@ -1682,7 +1627,7 @@ yyreduce:
         case 2:
 
 /* Line 1455 of yacc.c  */
-#line 246 "p-exp.y"
+#line 191 "p-exp.y"
     { current_type = NULL;
 		  intvar = NULL;
 		  search_field = 0;
@@ -1693,14 +1638,14 @@ yyreduce:
   case 3:
 
 /* Line 1455 of yacc.c  */
-#line 251 "p-exp.y"
+#line 196 "p-exp.y"
     {}
     break;
 
   case 6:
 
 /* Line 1455 of yacc.c  */
-#line 260 "p-exp.y"
+#line 205 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_TYPE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].tval));
 			  write_exp_elt_opcode (pstate, OP_TYPE);
@@ -1710,14 +1655,14 @@ yyreduce:
   case 8:
 
 /* Line 1455 of yacc.c  */
-#line 268 "p-exp.y"
+#line 213 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_COMMA); }
     break;
 
   case 9:
 
 /* Line 1455 of yacc.c  */
-#line 273 "p-exp.y"
+#line 218 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_IND);
 			  if (current_type)
 			    current_type = TYPE_TARGET_TYPE (current_type); }
@@ -1726,7 +1671,7 @@ yyreduce:
   case 10:
 
 /* Line 1455 of yacc.c  */
-#line 279 "p-exp.y"
+#line 224 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_ADDR);
 			  if (current_type)
 			    current_type = TYPE_POINTER_TYPE (current_type); }
@@ -1735,42 +1680,42 @@ yyreduce:
   case 11:
 
 /* Line 1455 of yacc.c  */
-#line 285 "p-exp.y"
+#line 230 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_NEG); }
     break;
 
   case 12:
 
 /* Line 1455 of yacc.c  */
-#line 289 "p-exp.y"
+#line 234 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
     break;
 
   case 13:
 
 /* Line 1455 of yacc.c  */
-#line 293 "p-exp.y"
+#line 238 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
     break;
 
   case 14:
 
 /* Line 1455 of yacc.c  */
-#line 297 "p-exp.y"
+#line 242 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
     break;
 
   case 15:
 
 /* Line 1455 of yacc.c  */
-#line 302 "p-exp.y"
+#line 247 "p-exp.y"
     { search_field = 1; }
     break;
 
   case 16:
 
 /* Line 1455 of yacc.c  */
-#line 306 "p-exp.y"
+#line 251 "p-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(2) - (2)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
@@ -1790,7 +1735,7 @@ yyreduce:
   case 17:
 
 /* Line 1455 of yacc.c  */
-#line 324 "p-exp.y"
+#line 269 "p-exp.y"
     { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(2) - (2)].sval));
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
@@ -1810,7 +1755,7 @@ yyreduce:
   case 18:
 
 /* Line 1455 of yacc.c  */
-#line 340 "p-exp.y"
+#line 285 "p-exp.y"
     { mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
 			  write_exp_string (pstate, (yyvsp[(2) - (3)].sval));
@@ -1820,7 +1765,7 @@ yyreduce:
   case 19:
 
 /* Line 1455 of yacc.c  */
-#line 346 "p-exp.y"
+#line 291 "p-exp.y"
     { struct stoken s;
 			  mark_struct_expression (pstate);
 			  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
@@ -1833,7 +1778,7 @@ yyreduce:
   case 20:
 
 /* Line 1455 of yacc.c  */
-#line 357 "p-exp.y"
+#line 302 "p-exp.y"
     { const char *arrayname;
 			  int arrayfieldindex;
 			  arrayfieldindex = is_pascal_string_type (
@@ -1844,7 +1789,7 @@ yyreduce:
 			      struct stoken stringsval;
 			      char *buf;
 
-			      buf = alloca (strlen (arrayname) + 1);
+			      buf = (char *) alloca (strlen (arrayname) + 1);
 			      stringsval.ptr = buf;
 			      stringsval.length = strlen (arrayname);
 			      strcpy (buf, arrayname);
@@ -1860,7 +1805,7 @@ yyreduce:
   case 21:
 
 /* Line 1455 of yacc.c  */
-#line 379 "p-exp.y"
+#line 324 "p-exp.y"
     { pop_current_type ();
 			  write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT);
 			  if (current_type)
@@ -1870,7 +1815,7 @@ yyreduce:
   case 22:
 
 /* Line 1455 of yacc.c  */
-#line 388 "p-exp.y"
+#line 333 "p-exp.y"
     { push_current_type ();
 			  start_arglist (); }
     break;
@@ -1878,7 +1823,7 @@ yyreduce:
   case 23:
 
 /* Line 1455 of yacc.c  */
-#line 391 "p-exp.y"
+#line 336 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_FUNCALL);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) end_arglist ());
@@ -1892,21 +1837,21 @@ yyreduce:
   case 25:
 
 /* Line 1455 of yacc.c  */
-#line 403 "p-exp.y"
+#line 348 "p-exp.y"
     { arglist_len = 1; }
     break;
 
   case 26:
 
 /* Line 1455 of yacc.c  */
-#line 405 "p-exp.y"
+#line 350 "p-exp.y"
     { arglist_len++; }
     break;
 
   case 27:
 
 /* Line 1455 of yacc.c  */
-#line 409 "p-exp.y"
+#line 354 "p-exp.y"
     { if (current_type)
 			    {
 			      /* Allow automatic dereference of classes.  */
@@ -1924,21 +1869,21 @@ yyreduce:
   case 28:
 
 /* Line 1455 of yacc.c  */
-#line 424 "p-exp.y"
+#line 369 "p-exp.y"
     { }
     break;
 
   case 29:
 
 /* Line 1455 of yacc.c  */
-#line 430 "p-exp.y"
+#line 375 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_MUL); }
     break;
 
   case 30:
 
 /* Line 1455 of yacc.c  */
-#line 433 "p-exp.y"
+#line 378 "p-exp.y"
     {
 			  if (current_type && is_integral_type (current_type))
 			    leftdiv_is_integer = 1;
@@ -1948,7 +1893,7 @@ yyreduce:
   case 31:
 
 /* Line 1455 of yacc.c  */
-#line 438 "p-exp.y"
+#line 383 "p-exp.y"
     {
 			  if (leftdiv_is_integer && current_type
 			      && is_integral_type (current_type))
@@ -1970,49 +1915,49 @@ yyreduce:
   case 32:
 
 /* Line 1455 of yacc.c  */
-#line 457 "p-exp.y"
+#line 402 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_INTDIV); }
     break;
 
   case 33:
 
 /* Line 1455 of yacc.c  */
-#line 461 "p-exp.y"
+#line 406 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_REM); }
     break;
 
   case 34:
 
 /* Line 1455 of yacc.c  */
-#line 465 "p-exp.y"
+#line 410 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ADD); }
     break;
 
   case 35:
 
 /* Line 1455 of yacc.c  */
-#line 469 "p-exp.y"
+#line 414 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_SUB); }
     break;
 
   case 36:
 
 /* Line 1455 of yacc.c  */
-#line 473 "p-exp.y"
+#line 418 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LSH); }
     break;
 
   case 37:
 
 /* Line 1455 of yacc.c  */
-#line 477 "p-exp.y"
+#line 422 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_RSH); }
     break;
 
   case 38:
 
 /* Line 1455 of yacc.c  */
-#line 481 "p-exp.y"
+#line 426 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_EQUAL);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2021,7 +1966,7 @@ yyreduce:
   case 39:
 
 /* Line 1455 of yacc.c  */
-#line 487 "p-exp.y"
+#line 432 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2030,7 +1975,7 @@ yyreduce:
   case 40:
 
 /* Line 1455 of yacc.c  */
-#line 493 "p-exp.y"
+#line 438 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LEQ);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2039,7 +1984,7 @@ yyreduce:
   case 41:
 
 /* Line 1455 of yacc.c  */
-#line 499 "p-exp.y"
+#line 444 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GEQ);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2048,7 +1993,7 @@ yyreduce:
   case 42:
 
 /* Line 1455 of yacc.c  */
-#line 505 "p-exp.y"
+#line 450 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_LESS);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2057,7 +2002,7 @@ yyreduce:
   case 43:
 
 /* Line 1455 of yacc.c  */
-#line 511 "p-exp.y"
+#line 456 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_GTR);
 			  current_type = parse_type (pstate)->builtin_bool;
 			}
@@ -2066,35 +2011,35 @@ yyreduce:
   case 44:
 
 /* Line 1455 of yacc.c  */
-#line 517 "p-exp.y"
+#line 462 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
     break;
 
   case 45:
 
 /* Line 1455 of yacc.c  */
-#line 521 "p-exp.y"
+#line 466 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
     break;
 
   case 46:
 
 /* Line 1455 of yacc.c  */
-#line 525 "p-exp.y"
+#line 470 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
     break;
 
   case 47:
 
 /* Line 1455 of yacc.c  */
-#line 529 "p-exp.y"
+#line 474 "p-exp.y"
     { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
     break;
 
   case 48:
 
 /* Line 1455 of yacc.c  */
-#line 533 "p-exp.y"
+#line 478 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].lval));
 			  current_type = parse_type (pstate)->builtin_bool;
@@ -2104,7 +2049,7 @@ yyreduce:
   case 49:
 
 /* Line 1455 of yacc.c  */
-#line 540 "p-exp.y"
+#line 485 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_BOOL);
 			  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(1) - (1)].lval));
 			  current_type = parse_type (pstate)->builtin_bool;
@@ -2114,7 +2059,7 @@ yyreduce:
   case 50:
 
 /* Line 1455 of yacc.c  */
-#line 547 "p-exp.y"
+#line 492 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
 			  current_type = (yyvsp[(1) - (1)].typed_val_int).type;
@@ -2125,7 +2070,7 @@ yyreduce:
   case 51:
 
 /* Line 1455 of yacc.c  */
-#line 555 "p-exp.y"
+#line 500 "p-exp.y"
     { YYSTYPE val;
 			  parse_number (pstate, (yyvsp[(1) - (1)].ssym).stoken.ptr,
 					(yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
@@ -2141,7 +2086,7 @@ yyreduce:
   case 52:
 
 /* Line 1455 of yacc.c  */
-#line 569 "p-exp.y"
+#line 514 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_DOUBLE);
 			  write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
 			  current_type = (yyvsp[(1) - (1)].typed_val_float).type;
@@ -2152,7 +2097,7 @@ yyreduce:
   case 54:
 
 /* Line 1455 of yacc.c  */
-#line 582 "p-exp.y"
+#line 527 "p-exp.y"
     {  if (intvar) {
  			     struct value * val, * mark;
 
@@ -2168,12 +2113,12 @@ yyreduce:
   case 55:
 
 /* Line 1455 of yacc.c  */
-#line 595 "p-exp.y"
+#line 540 "p-exp.y"
     { write_exp_elt_opcode (pstate, OP_LONG);
 			  write_exp_elt_type (pstate,
 					    parse_type (pstate)->builtin_int);
 			  current_type = parse_type (pstate)->builtin_int;
-			  CHECK_TYPEDEF ((yyvsp[(3) - (4)].tval));
+			  (yyvsp[(3) - (4)].tval) = check_typedef ((yyvsp[(3) - (4)].tval));
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ((yyvsp[(3) - (4)].tval)));
 			  write_exp_elt_opcode (pstate, OP_LONG); }
@@ -2182,7 +2127,7 @@ yyreduce:
   case 56:
 
 /* Line 1455 of yacc.c  */
-#line 606 "p-exp.y"
+#line 551 "p-exp.y"
     { write_exp_elt_opcode (pstate, UNOP_SIZEOF);
 			  current_type = parse_type (pstate)->builtin_int; }
     break;
@@ -2190,7 +2135,7 @@ yyreduce:
   case 57:
 
 /* Line 1455 of yacc.c  */
-#line 610 "p-exp.y"
+#line 555 "p-exp.y"
     { /* C strings are converted into array constants with
 			     an explicit null byte added at the end.  Thus
 			     the array upper bound is the string length.
@@ -2224,7 +2169,7 @@ yyreduce:
   case 58:
 
 /* Line 1455 of yacc.c  */
-#line 642 "p-exp.y"
+#line 587 "p-exp.y"
     {
 			  struct value * this_val;
 			  struct type * this_type;
@@ -2253,10 +2198,10 @@ yyreduce:
   case 59:
 
 /* Line 1455 of yacc.c  */
-#line 670 "p-exp.y"
+#line 615 "p-exp.y"
     {
-			  if ((yyvsp[(1) - (1)].ssym).sym != 0)
-			      (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym);
+			  if ((yyvsp[(1) - (1)].ssym).sym.symbol != 0)
+			      (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym.symbol);
 			  else
 			    {
 			      struct symtab *tem =
@@ -2274,10 +2219,11 @@ yyreduce:
   case 60:
 
 /* Line 1455 of yacc.c  */
-#line 688 "p-exp.y"
+#line 633 "p-exp.y"
     { struct symbol *tem
 			    = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
-					     VAR_DOMAIN, NULL);
+					     VAR_DOMAIN, NULL).symbol;
+
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
@@ -2287,27 +2233,28 @@ yyreduce:
   case 61:
 
 /* Line 1455 of yacc.c  */
-#line 698 "p-exp.y"
-    { struct symbol *sym;
+#line 644 "p-exp.y"
+    { struct block_symbol sym;
+
 			  sym = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
 					       VAR_DOMAIN, NULL);
-			  if (sym == 0)
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ((yyvsp[(3) - (3)].sval)));
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
     break;
 
   case 62:
 
 /* Line 1455 of yacc.c  */
-#line 713 "p-exp.y"
+#line 659 "p-exp.y"
     {
 			  struct type *type = (yyvsp[(1) - (3)].tval);
+
 			  if (TYPE_CODE (type) != TYPE_CODE_STRUCT
 			      && TYPE_CODE (type) != TYPE_CODE_UNION)
 			    error (_("`%s' is not defined as an aggregate type."),
@@ -2323,7 +2270,7 @@ yyreduce:
   case 64:
 
 /* Line 1455 of yacc.c  */
-#line 729 "p-exp.y"
+#line 676 "p-exp.y"
     {
 			  char *name = copy_name ((yyvsp[(2) - (2)].sval));
 			  struct symbol *sym;
@@ -2331,7 +2278,7 @@ yyreduce:
 
 			  sym =
 			    lookup_symbol (name, (const struct block *) NULL,
-					   VAR_DOMAIN, NULL);
+					   VAR_DOMAIN, NULL).symbol;
 			  if (sym)
 			    {
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
@@ -2357,27 +2304,24 @@ yyreduce:
   case 65:
 
 /* Line 1455 of yacc.c  */
-#line 760 "p-exp.y"
-    { struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
+#line 707 "p-exp.y"
+    { struct block_symbol sym = (yyvsp[(1) - (1)].ssym).sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      current_type = sym->type; }
+			      current_type = sym.symbol->type; }
 			  else if ((yyvsp[(1) - (1)].ssym).is_a_field_of_this)
 			    {
 			      struct value * this_val;
@@ -2386,9 +2330,9 @@ yyreduce:
 			         not inadvertently convert from a method call
 				 to data ref.  */
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
@@ -2431,21 +2375,21 @@ yyreduce:
   case 68:
 
 /* Line 1455 of yacc.c  */
-#line 847 "p-exp.y"
+#line 791 "p-exp.y"
     { (yyval.tval) = lookup_pointer_type ((yyvsp[(2) - (2)].tval)); }
     break;
 
   case 69:
 
 /* Line 1455 of yacc.c  */
-#line 849 "p-exp.y"
+#line 793 "p-exp.y"
     { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
     break;
 
   case 70:
 
 /* Line 1455 of yacc.c  */
-#line 851 "p-exp.y"
+#line 795 "p-exp.y"
     { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
 					      expression_context_block); }
     break;
@@ -2453,7 +2397,7 @@ yyreduce:
   case 71:
 
 /* Line 1455 of yacc.c  */
-#line 854 "p-exp.y"
+#line 798 "p-exp.y"
     { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
 					      expression_context_block); }
     break;
@@ -2461,35 +2405,35 @@ yyreduce:
   case 72:
 
 /* Line 1455 of yacc.c  */
-#line 861 "p-exp.y"
+#line 805 "p-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 73:
 
 /* Line 1455 of yacc.c  */
-#line 862 "p-exp.y"
+#line 806 "p-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
   case 74:
 
 /* Line 1455 of yacc.c  */
-#line 863 "p-exp.y"
+#line 807 "p-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].tsym).stoken; }
     break;
 
   case 75:
 
 /* Line 1455 of yacc.c  */
-#line 864 "p-exp.y"
+#line 808 "p-exp.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
     break;
 
 
 
 /* Line 1455 of yacc.c  */
-#line 2494 "p-exp.c"
+#line 2438 "p-exp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2701,7 +2645,7 @@ yyreturn:
 
 
 /* Line 1675 of yacc.c  */
-#line 878 "p-exp.y"
+#line 822 "p-exp.y"
 
 
 /* Take care of parsing a number (anything that starts with a digit).
@@ -3335,7 +3279,7 @@ yylex (void)
 	  static const char this_name[] = "this";
 
 	  if (lookup_symbol (this_name, expression_context_block,
-			     VAR_DOMAIN, NULL))
+			     VAR_DOMAIN, NULL).symbol)
 	    {
 	      xfree (uptokstart);
 	      return THIS;
@@ -3358,7 +3302,7 @@ yylex (void)
         so in expression to enter hexadecimal values
         we still need to use C syntax with 0xff  */
       write_dollar_variable (pstate, yylval.sval);
-      tmp = alloca (namelen + 1);
+      tmp = (char *) alloca (namelen + 1);
       memcpy (tmp, tokstart, namelen);
       tmp[namelen] = '\0';
       intvar = lookup_only_internalvar (tmp + 1);
@@ -3385,7 +3329,7 @@ yylex (void)
       sym = NULL;
     else
       sym = lookup_symbol (tmp, expression_context_block,
-			   VAR_DOMAIN, &is_a_field_of_this);
+			   VAR_DOMAIN, &is_a_field_of_this).symbol;
     /* second chance uppercased (as Free Pascal does).  */
     if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
       {
@@ -3400,7 +3344,7 @@ yylex (void)
 	 sym = NULL;
        else
 	 sym = lookup_symbol (tmp, expression_context_block,
-			      VAR_DOMAIN, &is_a_field_of_this);
+			      VAR_DOMAIN, &is_a_field_of_this).symbol;
       }
     /* Third chance Capitalized (as GPC does).  */
     if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
@@ -3422,7 +3366,7 @@ yylex (void)
 	 sym = NULL;
        else
 	 sym = lookup_symbol (tmp, expression_context_block,
-			      VAR_DOMAIN, &is_a_field_of_this);
+			      VAR_DOMAIN, &is_a_field_of_this).symbol;
       }
 
     if (is_a_field || (is_a_field_of_this.type != NULL))
@@ -3432,7 +3376,8 @@ yylex (void)
 	tempbuf [namelen] = 0;
 	yylval.sval.ptr = tempbuf;
 	yylval.sval.length = namelen;
-	yylval.ssym.sym = NULL;
+	yylval.ssym.sym.symbol = NULL;
+	yylval.ssym.sym.block = NULL;
 	xfree (uptokstart);
         yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	if (is_a_field)
@@ -3446,7 +3391,8 @@ yylex (void)
     if ((sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
         || lookup_symtab (tmp))
       {
-	yylval.ssym.sym = sym;
+	yylval.ssym.sym.symbol = sym;
+	yylval.ssym.sym.block = NULL;
 	yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	xfree (uptokstart);
 	return BLOCKNAME;
@@ -3502,7 +3448,9 @@ yylex (void)
 		      struct symbol *cur_sym;
 		      /* As big as the whole rest of the expression, which is
 			 at least big enough.  */
-		      char *ncopy = alloca (strlen (tmp)+strlen (namestart)+3);
+		      char *ncopy
+			= (char *) alloca (strlen (tmp) + strlen (namestart)
+					   + 3);
 		      char *tmp1;
 
 		      tmp1 = ncopy;
@@ -3513,7 +3461,7 @@ yylex (void)
 		      memcpy (tmp1, namestart, p - namestart);
 		      tmp1[p - namestart] = '\0';
 		      cur_sym = lookup_symbol (ncopy, expression_context_block,
-					       VAR_DOMAIN, NULL);
+					       VAR_DOMAIN, NULL).symbol;
 		      if (cur_sym)
 			{
 			  if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF)
@@ -3561,7 +3509,8 @@ yylex (void)
 	hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
 	if (hextype == INT)
 	  {
-	    yylval.ssym.sym = sym;
+	    yylval.ssym.sym.symbol = sym;
+	    yylval.ssym.sym.block = NULL;
 	    yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	    xfree (uptokstart);
 	    return NAME_OR_INT;
@@ -3570,7 +3519,8 @@ yylex (void)
 
     xfree(uptokstart);
     /* Any other kind of symbol.  */
-    yylval.ssym.sym = sym;
+    yylval.ssym.sym.symbol = sym;
+    yylval.ssym.sym.block = NULL;
     return NAME;
   }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-exp.y ./gdb/p-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-exp.y	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/p-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* YACC parser for Pascal expressions, for GDB.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,65 +58,10 @@
 
 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
 
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  Note that these are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list.  */
-
-#define	yymaxdepth pascal_maxdepth
-#define	yyparse	pascal_parse_internal
-#define	yylex	pascal_lex
-#define	yyerror	pascal_error
-#define	yylval	pascal_lval
-#define	yychar	pascal_char
-#define	yydebug	pascal_debug
-#define	yypact	pascal_pact
-#define	yyr1	pascal_r1
-#define	yyr2	pascal_r2
-#define	yydef	pascal_def
-#define	yychk	pascal_chk
-#define	yypgo	pascal_pgo
-#define	yyact	pascal_act
-#define	yyexca	pascal_exca
-#define yyerrflag pascal_errflag
-#define yynerrs	pascal_nerrs
-#define	yyps	pascal_ps
-#define	yypv	pascal_pv
-#define	yys	pascal_s
-#define	yy_yys	pascal_yys
-#define	yystate	pascal_state
-#define	yytmp	pascal_tmp
-#define	yyv	pascal_v
-#define	yy_yyv	pascal_yyv
-#define	yyval	pascal_val
-#define	yylloc	pascal_lloc
-#define yyreds	pascal_reds		/* With YYDEBUG defined */
-#define yytoks	pascal_toks		/* With YYDEBUG defined */
-#define yyname	pascal_name		/* With YYDEBUG defined */
-#define yyrule	pascal_rule		/* With YYDEBUG defined */
-#define yylhs	pascal_yylhs
-#define yylen	pascal_yylen
-#define yydefred pascal_yydefred
-#define yydgoto	pascal_yydgoto
-#define yysindex pascal_yysindex
-#define yyrindex pascal_yyrindex
-#define yygindex pascal_yygindex
-#define yytable	 pascal_yytable
-#define yycheck	 pascal_yycheck
-#define yyss	pascal_yyss
-#define yysslim	pascal_yysslim
-#define yyssp	pascal_yyssp
-#define yystacksize pascal_yystacksize
-#define yyvs	pascal_yyvs
-#define yyvsp	pascal_yyvsp
-
-#ifndef YYDEBUG
-#define	YYDEBUG 1		/* Default to yydebug support */
-#endif
-
-#define YYFPRINTF parser_fprintf
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc).  */
+#define GDB_YY_REMAP_PREFIX pascal_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */
@@ -364,7 +309,7 @@ exp	:	exp '['
 			      struct stoken stringsval;
 			      char *buf;
 
-			      buf = alloca (strlen (arrayname) + 1);
+			      buf = (char *) alloca (strlen (arrayname) + 1);
 			      stringsval.ptr = buf;
 			      stringsval.length = strlen (arrayname);
 			      strcpy (buf, arrayname);
@@ -596,7 +541,7 @@ exp	:	SIZEOF '(' type ')'	%prec UNARY
 			  write_exp_elt_type (pstate,
 					    parse_type (pstate)->builtin_int);
 			  current_type = parse_type (pstate)->builtin_int;
-			  CHECK_TYPEDEF ($3);
+			  $3 = check_typedef ($3);
 			  write_exp_elt_longcst (pstate,
 						 (LONGEST) TYPE_LENGTH ($3));
 			  write_exp_elt_opcode (pstate, OP_LONG); }
@@ -668,8 +613,8 @@ exp	:	THIS
 
 block	:	BLOCKNAME
 			{
-			  if ($1.sym != 0)
-			      $$ = SYMBOL_BLOCK_VALUE ($1.sym);
+			  if ($1.sym.symbol != 0)
+			      $$ = SYMBOL_BLOCK_VALUE ($1.sym.symbol);
 			  else
 			    {
 			      struct symtab *tem =
@@ -687,7 +632,8 @@ block	:	BLOCKNAME
 block	:	block COLONCOLON name
 			{ struct symbol *tem
 			    = lookup_symbol (copy_name ($3), $1,
-					     VAR_DOMAIN, NULL);
+					     VAR_DOMAIN, NULL).symbol;
+
 			  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
 			    error (_("No function \"%s\" in specified context."),
 				   copy_name ($3));
@@ -695,23 +641,24 @@ block	:	block COLONCOLON name
 	;
 
 variable:	block COLONCOLON name
-			{ struct symbol *sym;
+			{ struct block_symbol sym;
+
 			  sym = lookup_symbol (copy_name ($3), $1,
 					       VAR_DOMAIN, NULL);
-			  if (sym == 0)
+			  if (sym.symbol == 0)
 			    error (_("No symbol \"%s\" in specified context."),
 				   copy_name ($3));
 
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			  /* block_found is set by lookup_symbol.  */
-			  write_exp_elt_block (pstate, block_found);
-			  write_exp_elt_sym (pstate, sym);
+			  write_exp_elt_block (pstate, sym.block);
+			  write_exp_elt_sym (pstate, sym.symbol);
 			  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
 	;
 
 qualified_name:	typebase COLONCOLON name
 			{
 			  struct type *type = $1;
+
 			  if (TYPE_CODE (type) != TYPE_CODE_STRUCT
 			      && TYPE_CODE (type) != TYPE_CODE_UNION)
 			    error (_("`%s' is not defined as an aggregate type."),
@@ -733,7 +680,7 @@ variable:	qualified_name
 
 			  sym =
 			    lookup_symbol (name, (const struct block *) NULL,
-					   VAR_DOMAIN, NULL);
+					   VAR_DOMAIN, NULL).symbol;
 			  if (sym)
 			    {
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
@@ -757,26 +704,23 @@ variable:	qualified_name
 	;
 
 variable:	name_not_typename
-			{ struct symbol *sym = $1.sym;
+			{ struct block_symbol sym = $1.sym;
 
-			  if (sym)
+			  if (sym.symbol)
 			    {
-			      if (symbol_read_needs_frame (sym))
+			      if (symbol_read_needs_frame (sym.symbol))
 				{
 				  if (innermost_block == 0
-				      || contained_in (block_found,
+				      || contained_in (sym.block,
 						       innermost_block))
-				    innermost_block = block_found;
+				    innermost_block = sym.block;
 				}
 
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      /* We want to use the selected frame, not
-				 another more inner frame which happens to
-				 be in the same block.  */
-			      write_exp_elt_block (pstate, NULL);
-			      write_exp_elt_sym (pstate, sym);
+			      write_exp_elt_block (pstate, sym.block);
+			      write_exp_elt_sym (pstate, sym.symbol);
 			      write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-			      current_type = sym->type; }
+			      current_type = sym.symbol->type; }
 			  else if ($1.is_a_field_of_this)
 			    {
 			      struct value * this_val;
@@ -785,9 +729,9 @@ variable:	name_not_typename
 			         not inadvertently convert from a method call
 				 to data ref.  */
 			      if (innermost_block == 0
-				  || contained_in (block_found,
+				  || contained_in (sym.block,
 						   innermost_block))
-				innermost_block = block_found;
+				innermost_block = sym.block;
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, OP_THIS);
 			      write_exp_elt_opcode (pstate, STRUCTOP_PTR);
@@ -1508,7 +1452,7 @@ yylex (void)
 	  static const char this_name[] = "this";
 
 	  if (lookup_symbol (this_name, expression_context_block,
-			     VAR_DOMAIN, NULL))
+			     VAR_DOMAIN, NULL).symbol)
 	    {
 	      free (uptokstart);
 	      return THIS;
@@ -1531,7 +1475,7 @@ yylex (void)
         so in expression to enter hexadecimal values
         we still need to use C syntax with 0xff  */
       write_dollar_variable (pstate, yylval.sval);
-      tmp = alloca (namelen + 1);
+      tmp = (char *) alloca (namelen + 1);
       memcpy (tmp, tokstart, namelen);
       tmp[namelen] = '\0';
       intvar = lookup_only_internalvar (tmp + 1);
@@ -1558,7 +1502,7 @@ yylex (void)
       sym = NULL;
     else
       sym = lookup_symbol (tmp, expression_context_block,
-			   VAR_DOMAIN, &is_a_field_of_this);
+			   VAR_DOMAIN, &is_a_field_of_this).symbol;
     /* second chance uppercased (as Free Pascal does).  */
     if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
       {
@@ -1573,7 +1517,7 @@ yylex (void)
 	 sym = NULL;
        else
 	 sym = lookup_symbol (tmp, expression_context_block,
-			      VAR_DOMAIN, &is_a_field_of_this);
+			      VAR_DOMAIN, &is_a_field_of_this).symbol;
       }
     /* Third chance Capitalized (as GPC does).  */
     if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
@@ -1595,7 +1539,7 @@ yylex (void)
 	 sym = NULL;
        else
 	 sym = lookup_symbol (tmp, expression_context_block,
-			      VAR_DOMAIN, &is_a_field_of_this);
+			      VAR_DOMAIN, &is_a_field_of_this).symbol;
       }
 
     if (is_a_field || (is_a_field_of_this.type != NULL))
@@ -1605,7 +1549,8 @@ yylex (void)
 	tempbuf [namelen] = 0;
 	yylval.sval.ptr = tempbuf;
 	yylval.sval.length = namelen;
-	yylval.ssym.sym = NULL;
+	yylval.ssym.sym.symbol = NULL;
+	yylval.ssym.sym.block = NULL;
 	free (uptokstart);
         yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	if (is_a_field)
@@ -1619,7 +1564,8 @@ yylex (void)
     if ((sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
         || lookup_symtab (tmp))
       {
-	yylval.ssym.sym = sym;
+	yylval.ssym.sym.symbol = sym;
+	yylval.ssym.sym.block = NULL;
 	yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	free (uptokstart);
 	return BLOCKNAME;
@@ -1675,7 +1621,9 @@ yylex (void)
 		      struct symbol *cur_sym;
 		      /* As big as the whole rest of the expression, which is
 			 at least big enough.  */
-		      char *ncopy = alloca (strlen (tmp)+strlen (namestart)+3);
+		      char *ncopy
+			= (char *) alloca (strlen (tmp) + strlen (namestart)
+					   + 3);
 		      char *tmp1;
 
 		      tmp1 = ncopy;
@@ -1686,7 +1634,7 @@ yylex (void)
 		      memcpy (tmp1, namestart, p - namestart);
 		      tmp1[p - namestart] = '\0';
 		      cur_sym = lookup_symbol (ncopy, expression_context_block,
-					       VAR_DOMAIN, NULL);
+					       VAR_DOMAIN, NULL).symbol;
 		      if (cur_sym)
 			{
 			  if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF)
@@ -1734,7 +1682,8 @@ yylex (void)
 	hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
 	if (hextype == INT)
 	  {
-	    yylval.ssym.sym = sym;
+	    yylval.ssym.sym.symbol = sym;
+	    yylval.ssym.sym.block = NULL;
 	    yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
 	    free (uptokstart);
 	    return NAME_OR_INT;
@@ -1743,7 +1692,8 @@ yylex (void)
 
     free(uptokstart);
     /* Any other kind of symbol.  */
-    yylval.ssym.sym = sym;
+    yylval.ssym.sym.symbol = sym;
+    yylval.ssym.sym.block = NULL;
     return NAME;
   }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-lang.c ./gdb/p-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-lang.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/p-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Pascal language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -339,7 +339,7 @@ const struct op_print pascal_op_print_ta
   {"^", UNOP_IND, PREC_SUFFIX, 1},
   {"@", UNOP_ADDR, PREC_PREFIX, 0},
   {"sizeof", UNOP_SIZEOF, PREC_PREFIX, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_PREFIX, 0}
 };
 
 enum pascal_primitive_types {
@@ -412,6 +412,11 @@ pascal_language_arch_info (struct gdbarc
   lai->bool_type_default = builtin->builtin_bool;
 }
 
+static const char *p_extensions[] =
+{
+  ".pas", ".p", ".pp", NULL
+};
+
 const struct language_defn pascal_language_defn =
 {
   "pascal",			/* Language name */
@@ -421,9 +426,10 @@ const struct language_defn pascal_langua
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  p_extensions,
   &exp_descriptor_standard,
   pascal_parse,
-  pascal_error,
+  pascal_yyerror,
   null_post_parser,
   pascal_printchar,		/* Print a character constant */
   pascal_printstr,		/* Function to print string constant */
@@ -438,6 +444,7 @@ const struct language_defn pascal_langua
   basic_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,				/* Language specific symbol demangler */
+  NULL,
   NULL,				/* Language specific class_name_from_physname */
   pascal_op_print_tab,		/* expression operators for printing */
   1,				/* c-style arrays */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-lang.h ./gdb/p-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-lang.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/p-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Pascal language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,7 @@ extern const char *pascal_main_name (voi
 
 extern int pascal_parse (struct parser_state *); /* Defined in p-exp.y */
 
-extern void pascal_error (char *);	/* Defined in p-exp.y */
+extern void pascal_yyerror (char *);	/* Defined in p-exp.y */
 
 /* Defined in p-typeprint.c */
 extern void pascal_print_type (struct type *, const char *, struct ui_file *,
@@ -36,9 +36,9 @@ extern void pascal_print_type (struct ty
 extern void pascal_print_typedef (struct type *, struct symbol *,
 				  struct ui_file *);
 
-extern void pascal_val_print (struct type *, const gdb_byte *, int,
+extern void pascal_val_print (struct type *, int,
 			      CORE_ADDR, struct ui_file *, int,
-			      const struct value *,
+			      struct value *,
 			      const struct value_print_options *);
 
 extern void pascal_value_print (struct value *, struct ui_file *,
@@ -72,10 +72,10 @@ extern void
 				    const struct type_print_options *);
 
 extern void pascal_object_print_value_fields (struct type *, const gdb_byte *,
-					      int,
+					      LONGEST,
 					      CORE_ADDR, struct ui_file *,
 					      int,
-					      const struct value *,
+					      struct value *,
 					      const struct value_print_options *,
 					      struct type **, int);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/po/gdb.pot ./gdb/po/gdb.pot
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/po/gdb.pot	2015-07-06 01:51:11.000000000 +0000
+++ ./gdb/po/gdb.pot	2017-03-06 01:53:02.000000000 +0000
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-06 01:51+0000\n"
+"POT-Creation-Date: 2017-03-06 01:53+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,62 +16,44 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aarch64-linux-nat.c:329 gdbserver/linux-aarch64-low.c:604
-msgid "Unexpected error setting hardware debug registers"
-msgstr ""
-
-#: aarch64-linux-nat.c:472 aarch64-linux-nat.c:496 arm-linux-nat.c:364
-#: arm-linux-nat.c:414 arm-linux-nat.c:470
+#: aarch64-linux-nat.c:176 aarch64-linux-nat.c:213 arm-linux-nat.c:185
+#: arm-linux-nat.c:213
 msgid "Unable to fetch general registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:505 arm-linux-nat.c:498
+#: aarch64-linux-nat.c:229 arm-linux-nat.c:230
 msgid "Unable to store general registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:525 aarch64-linux-nat.c:552
-msgid "Unable to fetch FP/SIMD registers."
-msgstr ""
-
-#: aarch64-linux-nat.c:566
-msgid "Unable to store FP/SIMD registers."
-msgstr ""
-
-#: aarch64-linux-nat.c:778
-#, possible-c-format
-msgid ""
-"Unexpected number of hardware watchpoint registers reported by ptrace, got %"
-"d, expected %d."
+#: aarch64-linux-nat.c:257 aarch64-linux-nat.c:304 arm-linux-nat.c:324
+msgid "Unable to fetch VFP registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:786
-msgid "Unable to determine the number of hardware watchpoints available."
+#: aarch64-linux-nat.c:269
+msgid "Unable to fetch vFP/SIMD registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:798
-#, possible-c-format
-msgid ""
-"Unexpected number of hardware breakpoint registers reported by ptrace, got %"
-"d, expected %d."
+#: aarch64-linux-nat.c:316
+msgid "Unable to fetch FP/SIMD registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:806
-msgid "Unable to determine the number of hardware breakpoints available."
+#: aarch64-linux-nat.c:335 arm-linux-nat.c:370
+msgid "Unable to store VFP registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:994 gdbserver/linux-aarch64-low.c:434
-msgid "Unrecognized breakpoint/watchpoint type"
+#: aarch64-linux-nat.c:341
+msgid "Unable to store FP/SIMD registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:1492
+#: aarch64-linux-nat.c:791
 msgid "Set whether to show variables that mirror the AArch64 debug registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:1493
+#: aarch64-linux-nat.c:792
 msgid "Show whether to show variables that mirror the AArch64 debug registers."
 msgstr ""
 
-#: aarch64-linux-nat.c:1494 mips-linux-nat.c:776 x86-nat.c:275
+#: aarch64-linux-nat.c:793 mips-linux-nat.c:778 x86-nat.c:271
 msgid ""
 "Use \"on\" to enable, \"off\" to disable.\n"
 "If enabled, the debug registers values are shown when GDB inserts\n"
@@ -79,622 +61,614 @@ msgid ""
 "triggers a breakpoint or watchpoint."
 msgstr ""
 
-#: aarch64-linux-tdep.c:288 arm-linux-tdep.c:1197 i386-tdep.c:4060
-#: i386-tdep.c:4169 i386-tdep.c:4184 ppc-linux-tdep.c:1087 stap-probe.c:679
+#: aarch64-linux-tdep.c:288 arm-linux-tdep.c:1221 i386-tdep.c:4167
+#: i386-tdep.c:4276 i386-tdep.c:4291 ppc-linux-tdep.c:1090 stap-probe.c:679
 #, possible-c-format
 msgid "Invalid register name `%s' on expression `%s'."
 msgstr ""
 
-#: aarch64-linux-tdep.c:908 amd64-linux-tdep.c:1493 arm-linux-tdep.c:1304
-#: i386-linux-tdep.c:409
+#: aarch64-linux-tdep.c:956 amd64-linux-tdep.c:1502 arm-linux-tdep.c:1683
+#: i386-linux-tdep.c:473 s390-linux-tdep.c:2912
 #, possible-c-format
 msgid "Process record and replay target doesn't support syscall number %s\n"
 msgstr ""
 
-#: aarch64-tdep.c:175
+#: aarch64-tdep.c:196
 #, possible-c-format
 msgid "AArch64 debugging is %s.\n"
 msgstr ""
 
-#: aarch64-tdep.c:1192 arm-tdep.c:3204
+#: aarch64-tdep.c:1036 arm-tdep.c:3141
 #, possible-c-format
 msgid "Unexpected register %d"
 msgstr ""
 
 #. Should never happen.
-#: aarch64-tdep.c:1243 arm-tdep.c:3438
+#: aarch64-tdep.c:1088 arm-tdep.c:3380 nds32-tdep.c:1451
 msgid "unknown type alignment"
 msgstr ""
 
-#: aarch64-tdep.c:2282
+#: aarch64-tdep.c:2177
 #, possible-c-format
 msgid "aarch64_pseudo_register_name: bad register number %d"
 msgstr ""
 
-#: aarch64-tdep.c:2309
+#: aarch64-tdep.c:2204
 #, possible-c-format
 msgid "aarch64_pseudo_register_type: bad register number %d"
 msgstr ""
 
-#: aarch64-tdep.c:2785
+#: aarch64-tdep.c:3032
 #, possible-c-format
 msgid "aarch64_dump_tdep: Lowest pc = 0x%s"
 msgstr ""
 
 #. Debug this file's internals.
-#: aarch64-tdep.c:2801
+#: aarch64-tdep.c:3048
 msgid "Set AArch64 debugging."
 msgstr ""
 
-#: aarch64-tdep.c:2802
+#: aarch64-tdep.c:3049
 msgid "Show AArch64 debugging."
 msgstr ""
 
-#: aarch64-tdep.c:2803
+#: aarch64-tdep.c:3050
 msgid "When on, AArch64 specific debugging is enabled."
 msgstr ""
 
-#. Save SPSR also;how?
-#. SPSR is going to be changed.
-#. we need to get SPSR value, which is yet to be done
-#. SPSR is going to be changed.
-#. How to read SPSR value?
-#. Save SPSR also; how?
 #. We need to save SPSR value, which is not yet done.
-#: aarch64-tdep.c:3743 arm-tdep.c:11087 arm-tdep.c:11136 arm-tdep.c:11307
-#: arm-tdep.c:11366 arm-tdep.c:11953 arm-tdep.c:12869
+#: aarch64-tdep.c:3972 arm-tdep.c:11065 arm-tdep.c:11991
 #, possible-c-format
 msgid "Process record does not support instruction 0x%0x at address %s.\n"
 msgstr ""
 
-#: ada-exp.y:272
+#: ada-exp.y:221
 msgid "Invalid conversion"
 msgstr ""
 
-#: ada-exp.y:290
+#: ada-exp.y:239
 msgid "Type required for qualification"
 msgstr ""
 
-#: ada-exp.y:308
+#: ada-exp.y:257
 msgid "Cannot slice a type"
 msgstr ""
 
-#: ada-exp.y:376
+#: ada-exp.y:325
 msgid "Type required within braces in coercion"
 msgstr ""
 
-#: ada-exp.y:446 ada-exp.y:464
+#: ada-exp.y:395 ada-exp.y:413
 msgid "Right operand of 'in' must be type"
 msgstr ""
 
-#: ada-exp.y:578
+#: ada-exp.y:527
 msgid "Prefix must be type"
 msgstr ""
 
-#: ada-exp.y:631
+#: ada-exp.y:580
 msgid "NEW not implemented."
 msgstr ""
 
-#: ada-exp.y:807
+#: ada-exp.y:756
 #, possible-c-format
 msgid "Error in expression, near `%s'."
 msgstr ""
 
-#: ada-exp.y:874
+#: ada-exp.y:823
 msgid "Could not find renamed symbol"
 msgstr ""
 
-#: ada-exp.y:882
+#: ada-exp.y:832
 #, possible-c-format
 msgid "Could not find renamed variable: %s"
 msgstr ""
 
-#: ada-exp.y:956
+#: ada-exp.y:906
 #, possible-c-format
 msgid "Could not find %s"
 msgstr ""
 
-#: ada-exp.y:1009
+#: ada-exp.y:959
 msgid "Internal error in encoding of renaming declaration"
 msgstr ""
 
-#: ada-exp.y:1040 c-exp.y:929 p-exp.y:681
+#: ada-exp.y:990 c-exp.y:874 p-exp.y:626
 #, possible-c-format
 msgid "No file or function \"%s\"."
 msgstr ""
 
-#: ada-exp.y:1042 c-exp.y:943 m2-exp.y:578 p-exp.y:692
+#: ada-exp.y:992 c-exp.y:889 m2-exp.y:523 p-exp.y:638
 #, possible-c-format
 msgid "No function \"%s\" in specified context."
 msgstr ""
 
-#: ada-exp.y:1047
+#: ada-exp.y:997
 #, possible-c-format
 msgid "Function name \"%s\" ambiguous here"
 msgstr ""
 
-#: ada-exp.y:1337
+#: ada-exp.y:1289
 msgid "impossible value from ada_parse_renaming"
 msgstr ""
 
-#: ada-exp.y:1355
+#: ada-exp.y:1307
 #, possible-c-format
 msgid "Invalid attempt to select from type: \"%s\"."
 msgstr ""
 
-#: ada-exp.y:1389
+#: ada-exp.y:1341
 #, possible-c-format
 msgid "No definition of \"%s\" found."
 msgstr ""
 
-#: ada-exp.y:1403 c-exp.y:1054 c-exp.y:1106 cli/cli-cmds.c:947 f-exp.y:542
-#: go-exp.y:638 linespec.c:1513 linespec.c:3056 p-exp.y:751 p-exp.y:821
-#: source.c:206 symtab.c:4250
+#: ada-exp.y:1355 c-exp.y:1000 c-exp.y:1049 cli/cli-cmds.c:975 d-exp.y:496
+#: f-exp.y:485 go-exp.y:586 linespec.c:1441 linespec.c:3199 p-exp.y:698
+#: p-exp.y:765 source.c:208 symtab.c:4108
 msgid "No symbol table is loaded.  Use the \"file\" command."
 msgstr ""
 
-#: ada-exp.y:1405
+#: ada-exp.y:1357
 #, possible-c-format
 msgid "No definition of \"%s\" in current context."
 msgstr ""
 
-#: ada-exp.y:1407
+#: ada-exp.y:1359
 #, possible-c-format
 msgid "No definition of \"%s\" in specified context."
 msgstr ""
 
-#: ada-exp.y:1412
+#: ada-exp.y:1364
 #, possible-c-format
 msgid "Could not find renamed symbol \"%s\""
 msgstr ""
 
-#: ada-exp.y:1446
+#: ada-exp.y:1399
 msgid "Invalid use of type."
 msgstr ""
 
-#: ada-lang.c:625
+#: ada-lang.c:631
 #, possible-c-format
 msgid "Unable to find field %s in struct %s.  Aborting"
 msgstr ""
 
-#: ada-lang.c:745
+#: ada-lang.c:751
 msgid "object size is larger than varsize-limit"
 msgstr ""
 
-#: ada-lang.c:810
+#: ada-lang.c:816
 msgid "Unexpected type in ada_discrete_type_high_bound."
 msgstr ""
 
-#: ada-lang.c:831
+#: ada-lang.c:837
 msgid "Unexpected type in ada_discrete_type_low_bound."
 msgstr ""
 
-#: ada-lang.c:930
+#: ada-lang.c:936
 msgid "Invalid address for Ada main program name."
 msgstr ""
 
-#: ada-lang.c:1009
+#: ada-lang.c:1015
 #, possible-c-format
 msgid "invalid Ada operator name: %s"
 msgstr ""
 
-#: ada-lang.c:1671 ada-lang.c:1689 ada-lang.c:1703 ada-lang.c:1771
+#: ada-lang.c:1717 ada-lang.c:1735 ada-lang.c:1749 ada-lang.c:1817
 msgid "Bad GNAT array descriptor"
 msgstr ""
 
-#: ada-lang.c:1808
+#: ada-lang.c:1854
 msgid "Bad GNAT array descriptor bounds"
 msgstr ""
 
-#: ada-lang.c:2051
+#: ada-lang.c:2097
 msgid "Bounds unavailable for null array pointer."
 msgstr ""
 
-#: ada-lang.c:2140
+#: ada-lang.c:2186
 msgid "could not understand bit size information on packed array"
 msgstr ""
 
-#: ada-lang.c:2238
+#: ada-lang.c:2284
 msgid "could not find bounds information on packed array"
 msgstr ""
 
-#: ada-lang.c:2245
+#: ada-lang.c:2291
 msgid "could not understand bounds information on packed array"
 msgstr ""
 
-#: ada-lang.c:2279
+#: ada-lang.c:2325
 msgid "can't unpack array"
 msgstr ""
 
-#: ada-lang.c:2332
+#: ada-lang.c:2378
 msgid "attempt to do packed indexing of something other than a packed array"
 msgstr ""
 
-#: ada-lang.c:2342
+#: ada-lang.c:2388
 msgid "don't know bounds of array"
 msgstr ""
 
-#: ada-lang.c:2348
+#: ada-lang.c:2394
 #, possible-c-format
 msgid "packed array index %ld out of bounds"
 msgstr ""
 
-#: ada-lang.c:2646 ada-lang.c:9677 valops.c:1000
+#: ada-lang.c:2466
+#, possible-c-format
+msgid "Cannot unpack %d bits into buffer of %d bytes"
+msgstr ""
+
+#: ada-lang.c:2762 ada-lang.c:9911 valops.c:1009
 msgid "Left operand of assignment is not a modifiable lvalue."
 msgstr ""
 
-#: ada-lang.c:2748 ada-lang.c:2771
+#: ada-lang.c:2864 ada-lang.c:2900
 #, possible-c-format
 msgid "too many subscripts (%d expected)"
 msgstr ""
 
-#: ada-lang.c:2804 ada-lang.c:2830
+#: ada-lang.c:2933 ada-lang.c:2959
 msgid "unable to get positions in slice, use bounds instead"
 msgstr ""
 
-#: ada-lang.c:2925
+#: ada-lang.c:3054
 #, possible-c-format
 msgid "invalid dimension number to '%s"
 msgstr ""
 
-#: ada-lang.c:2944
+#: ada-lang.c:3073
 msgid "attempt to take bound of something that is not an array"
 msgstr ""
 
-#: ada-lang.c:3106
+#: ada-lang.c:3235
 msgid "Could not find operator name for opcode"
 msgstr ""
 
-#: ada-lang.c:3296
+#: ada-lang.c:3425
 msgid "Unexpected operator during name resolution"
 msgstr ""
 
-#: ada-lang.c:3360
+#: ada-lang.c:3489
 #, possible-c-format
 msgid "No definition found for %s"
 msgstr ""
 
-#: ada-lang.c:3372 ada-lang.c:3424
+#: ada-lang.c:3501 ada-lang.c:3553
 #, possible-c-format
 msgid "Could not find a match for %s"
 msgstr ""
 
-#: ada-lang.c:3377 ada-lang.c:3657
+#: ada-lang.c:3506 ada-lang.c:3791
 #, possible-c-format
 msgid "Multiple matches for %s\n"
 msgstr ""
 
-#: ada-lang.c:3745
+#: ada-lang.c:3922
 msgid "Request to select 0 symbols!"
 msgstr ""
 
-#: ada-lang.c:3750 linespec.c:1426
+#: ada-lang.c:3927 linespec.c:1356
 msgid ""
 "canceled because the command is ambiguous\n"
 "See set/show multiple-symbol."
 msgstr ""
 
-#: ada-lang.c:3760
+#: ada-lang.c:3937
 msgid "[0] cancel\n"
 msgstr ""
 
-#: ada-lang.c:3762
+#: ada-lang.c:3939
 msgid "[1] all\n"
 msgstr ""
 
-#: ada-lang.c:3777
+#: ada-lang.c:3957
 #, possible-c-format
-msgid "[%d] %s at <no source file available>:%d\n"
+msgid " at <no source file available>:%d\n"
 msgstr ""
 
-#: ada-lang.c:3782 ada-lang.c:3800
+#: ada-lang.c:3960 ada-lang.c:3981
 #, possible-c-format
-msgid "[%d] %s at %s:%d\n"
+msgid " at %s:%d\n"
 msgstr ""
 
-#: ada-lang.c:3811
+#: ada-lang.c:3991
 #, possible-c-format
 msgid "'(%s) (enumeral)\n"
 msgstr ""
 
-#: ada-lang.c:3816
+#: ada-lang.c:4002
 #, possible-c-format
-msgid "[%d] %s in %s (enumeral)\n"
+msgid " in %s (enumeral)\n"
 msgstr ""
 
-#: ada-lang.c:3817
+#: ada-lang.c:4003
 #, possible-c-format
-msgid "[%d] %s at %s:?\n"
+msgid " at %s:?\n"
 msgstr ""
 
-#: ada-lang.c:3823
-#, possible-c-format
-msgid "[%d] %s (enumeral)\n"
+#: ada-lang.c:4007
+msgid " (enumeral)\n"
 msgstr ""
 
-#: ada-lang.c:3824
-#, possible-c-format
-msgid "[%d] %s at ?\n"
+#: ada-lang.c:4008
+msgid " at ?\n"
 msgstr ""
 
-#: ada-lang.c:3871 ada-lang.c:3884 linespec.c:1448
+#: ada-lang.c:4054 ada-lang.c:4067 linespec.c:1378
 msgid "one or more choice numbers"
 msgstr ""
 
-#: ada-lang.c:3891
+#: ada-lang.c:4074
 msgid "Argument must be choice number"
 msgstr ""
 
-#: ada-lang.c:3895
+#: ada-lang.c:4078
 msgid "cancelled"
 msgstr ""
 
-#: ada-lang.c:3922
+#: ada-lang.c:4105
 #, possible-c-format
 msgid "Select no more than %d of the above"
 msgstr ""
 
 #. PNH: Do we ever get here?  See ada_search_struct_field,
 #. find_struct_field.
-#: ada-lang.c:7222
+#: ada-lang.c:7466
 msgid "Cannot assign this kind of variant record"
 msgstr ""
 
-#: ada-lang.c:7319 valops.c:2181
+#: ada-lang.c:7563 valops.c:2195
 #, possible-c-format
 msgid "There is no member named %s."
 msgstr ""
 
-#: ada-lang.c:7325
+#: ada-lang.c:7569
 msgid "Attempt to extract a component of a value that is not a record."
 msgstr ""
 
-#: ada-lang.c:7376
-msgid "Type (null) is not a structure or union type"
-msgstr ""
-
-#. XXX: type_sprint
-#: ada-lang.c:7380 ada-lang.c:7459 ada-lang.c:7466
-msgid "Type "
+#: ada-lang.c:7628
+#, possible-c-format
+msgid "Type %s is not a structure or union type"
 msgstr ""
 
-#: ada-lang.c:7382
-msgid " is not a structure or union type"
+#: ada-lang.c:7629
+msgid "(null)"
 msgstr ""
 
-#: ada-lang.c:7461
-msgid " has no component named <null>"
+#: ada-lang.c:7699 inferior.c:551
+msgid "<null>"
 msgstr ""
 
-#: ada-lang.c:7468
+#: ada-lang.c:7701
 #, possible-c-format
-msgid " has no component named %s"
+msgid "Type %s has no component named %s"
 msgstr ""
 
-#: ada-lang.c:7825
+#: ada-lang.c:8058
 msgid "unexpected null name on descriptive type"
 msgstr ""
 
-#: ada-lang.c:8216
+#: ada-lang.c:8449
 #, possible-c-format
 msgid "Invalid type size for `%s' detected: %d."
 msgstr ""
 
-#: ada-lang.c:8219
+#: ada-lang.c:8452
 #, possible-c-format
 msgid "Invalid type size for <unnamed> detected: %d."
 msgstr ""
 
-#: ada-lang.c:8230
+#: ada-lang.c:8463
 msgid "record type with dynamic size is larger than varsize-limit"
 msgstr ""
 
-#: ada-lang.c:8673
+#: ada-lang.c:8906
 msgid "array type with dynamic size is larger than varsize-limit"
 msgstr ""
 
-#: ada-lang.c:9044
+#: ada-lang.c:9278
 msgid "'POS only defined on discrete types"
 msgstr ""
 
-#: ada-lang.c:9047
+#: ada-lang.c:9281
 msgid "enumeration value is invalid: can't find 'POS"
 msgstr ""
 
-#: ada-lang.c:9064
+#: ada-lang.c:9298
 msgid "'VAL only defined on discrete types"
 msgstr ""
 
-#: ada-lang.c:9066
+#: ada-lang.c:9300
 msgid "'VAL requires integral argument"
 msgstr ""
 
-#: ada-lang.c:9073
+#: ada-lang.c:9307
 msgid "argument to 'VAL out of range"
 msgstr ""
 
-#: ada-lang.c:9395 ada-lang.c:9433
+#: ada-lang.c:9629 ada-lang.c:9667
 msgid "unable to determine array bounds"
 msgstr ""
 
-#: ada-lang.c:9474
+#: ada-lang.c:9708
 msgid "cannot assign arrays of different length"
 msgstr ""
 
-#: ada-lang.c:9488
+#: ada-lang.c:9722
 msgid "Incompatible types in assignment"
 msgstr ""
 
-#: ada-lang.c:9522
+#: ada-lang.c:9756
 #, possible-c-format
 msgid "second operand of %s must not be zero."
 msgstr ""
 
-#: ada-lang.c:9567
+#: ada-lang.c:9801
 msgid "Attempt to compare array with non-array"
 msgstr ""
 
-#: ada-lang.c:9693
+#: ada-lang.c:9927
 msgid "Left-hand side must be array or record."
 msgstr ""
 
-#: ada-lang.c:9718
+#: ada-lang.c:9952
 msgid "Misplaced 'others' clause"
 msgstr ""
 
-#: ada-lang.c:9723
+#: ada-lang.c:9957
 msgid "Internal error: bad aggregate clause"
 msgstr ""
 
-#: ada-lang.c:9745
+#: ada-lang.c:9979
 msgid "Extra components in aggregate ignored."
 msgstr ""
 
-#: ada-lang.c:9812
+#: ada-lang.c:10046
 msgid "Invalid record component association."
 msgstr ""
 
-#: ada-lang.c:9818
+#: ada-lang.c:10052
 #, possible-c-format
 msgid "Unknown component name: %s."
 msgstr ""
 
-#: ada-lang.c:9823
+#: ada-lang.c:10057
 msgid "Index in component association out of bounds."
 msgstr ""
 
-#: ada-lang.c:9899
+#: ada-lang.c:10133
 msgid "Internal error: miscounted aggregate components."
 msgstr ""
 
-#: ada-lang.c:10271
+#: ada-lang.c:10505
 msgid "Fixed-point values must be assigned to fixed-point variables"
 msgstr ""
 
-#: ada-lang.c:10292
+#: ada-lang.c:10526
 msgid "Operands of fixed-point addition must have the same type"
 msgstr ""
 
-#: ada-lang.c:10318
+#: ada-lang.c:10552
 msgid "Operands of fixed-point subtraction must have the same type"
 msgstr ""
 
 #. Only encountered when an unresolved symbol occurs in a
 #. context other than a function call, in which case, it is
 #. invalid.
-#: ada-lang.c:10421 ada-lang.c:10512
+#: ada-lang.c:10655 ada-lang.c:10745
 #, possible-c-format
 msgid "Unexpected unresolved symbol, %s, during evaluation"
 msgstr ""
 
-#: ada-lang.c:10561
+#: ada-lang.c:10801
 #, possible-c-format
 msgid "cannot subscript or call something of type `%s'"
 msgstr ""
 
-#: ada-lang.c:10597
+#: ada-lang.c:10837
 msgid "cannot subscript or call a record"
 msgstr ""
 
-#: ada-lang.c:10599
+#: ada-lang.c:10839
 #, possible-c-format
 msgid "wrong number of subscripts; expecting %d"
 msgstr ""
 
-#: ada-lang.c:10611 ada-lang.c:10625
+#: ada-lang.c:10851 ada-lang.c:10865
 msgid "element type of array unknown"
 msgstr ""
 
-#: ada-lang.c:10634
+#: ada-lang.c:10874
 msgid "Attempt to index or call something other than an array or function"
 msgstr ""
 
-#: ada-lang.c:10664
+#: ada-lang.c:10904
 msgid "cannot slice a packed array"
 msgstr ""
 
-#: ada-lang.c:10692 valops.c:3785
+#: ada-lang.c:10932 valops.c:3793
 msgid "cannot take slice of non-array"
 msgstr ""
 
-#: ada-lang.c:10731
+#: ada-lang.c:10971
 msgid "Membership test incompletely implemented; always returns true"
 msgstr ""
 
-#: ada-lang.c:10820
+#: ada-lang.c:11060
 #, possible-c-format
 msgid "Invalid operand to '%s"
 msgstr ""
 
 #. Should never happen.
-#: ada-lang.c:10850 ada-lang.c:10875 ada-lang.c:10910
+#: ada-lang.c:11090 ada-lang.c:11115 ada-lang.c:11150
 msgid "unexpected attribute encountered"
 msgstr ""
 
-#: ada-lang.c:10883
+#: ada-lang.c:11123
 msgid "the 'length attribute applies only to array types"
 msgstr ""
 
-#: ada-lang.c:10887
+#: ada-lang.c:11127
 msgid "unimplemented type attribute"
 msgstr ""
 
-#: ada-lang.c:10960
+#: ada-lang.c:11200
 msgid "'modulus must be applied to modular type"
 msgstr ""
 
-#: ada-lang.c:11057
+#: ada-lang.c:11297
 msgid "Attempt to dereference null array pointer."
 msgstr ""
 
-#: ada-lang.c:11101 eval.c:2523 eval.c:3024 valops.c:1580
+#: ada-lang.c:11341 eval.c:2505 eval.c:3006 valops.c:1594
 msgid "Attempt to take contents of a non-pointer value."
 msgstr ""
 
-#: ada-lang.c:11178 eval.c:2761
+#: ada-lang.c:11420 eval.c:2743
 msgid "Attempt to use a type name as an expression"
 msgstr ""
 
-#: ada-lang.c:11190
+#: ada-lang.c:11432
 #, possible-c-format
 msgid ""
 "Undefined name, ambiguous name, or renaming used in component association: %"
 "s."
 msgstr ""
 
-#: ada-lang.c:11193
+#: ada-lang.c:11435
 msgid "Aggregates only allowed on the right of an assignment"
 msgstr ""
 
-#: ada-lang.c:11196
+#: ada-lang.c:11438
 msgid "aggregate apparently mangled"
 msgstr ""
 
-#: ada-lang.c:11490
+#: ada-lang.c:11736
 msgid "Unknown lower bound, using 1."
 msgstr ""
 
-#: ada-lang.c:11509
+#: ada-lang.c:11755
 #, possible-c-format
 msgid "Unknown upper bound, using %ld."
 msgstr ""
 
-#: ada-lang.c:11690
+#: ada-lang.c:11936
 msgid ""
 "Your Ada runtime appears to be missing some debugging information.\n"
 "Cannot insert Ada exception catchpoint in this configuration."
 msgstr ""
 
-#: ada-lang.c:11700
+#: ada-lang.c:11946
 #, possible-c-format
 msgid "Symbol \"%s\" is not a function (class = %d)"
 msgstr ""
 
-#: ada-lang.c:11742
+#: ada-lang.c:11988
 msgid "Unable to insert catchpoint.  Is this an Ada main program?"
 msgstr ""
 
-#: ada-lang.c:11750
+#: ada-lang.c:11996
 msgid "Unable to insert catchpoint. Try to start the program first."
 msgstr ""
 
@@ -704,115 +678,115 @@ msgstr ""
 #. configurable run time mode, or that a-except as been optimized
 #. out by the linker...  In any case, at this point it is not worth
 #. supporting this feature.
-#: ada-lang.c:11759
+#: ada-lang.c:12005
 msgid "Cannot insert Ada exception catchpoints in this configuration."
 msgstr ""
 
-#: ada-lang.c:11932 ada-lang.c:12303 ada-lang.c:12347 ada-lang.c:12378
+#: ada-lang.c:12180 ada-lang.c:12551 ada-lang.c:12595 ada-lang.c:12626
 msgid "unexpected catchpoint type"
 msgstr ""
 
-#: ada-lang.c:11957
+#: ada-lang.c:12205
 #, possible-c-format
 msgid "failed to get exception name: %s"
 msgstr ""
 
-#: ada-lang.c:12070
+#: ada-lang.c:12319
 #, possible-c-format
 msgid "failed to reevaluate internal exception condition for catchpoint %d: %s"
 msgstr ""
 
-#: ada-lang.c:12170
+#: ada-lang.c:12412
 msgid "Error in testing exception condition:\n"
 msgstr ""
 
-#: ada-lang.c:12284 ada-lang.c:12328
+#: ada-lang.c:12532 ada-lang.c:12576
 #, possible-c-format
 msgid "`%s' Ada exception"
 msgstr ""
 
-#: ada-lang.c:12318 break-catch-throw.c:348
+#: ada-lang.c:12566 break-catch-throw.c:350
 msgid "Temporary catchpoint "
 msgstr ""
 
-#: ada-lang.c:12319 break-catch-throw.c:349
+#: ada-lang.c:12567 break-catch-throw.c:351
 msgid "Catchpoint "
 msgstr ""
 
-#: ada-lang.c:12335
+#: ada-lang.c:12583
 msgid "all Ada exceptions"
 msgstr ""
 
-#: ada-lang.c:12339
+#: ada-lang.c:12587
 msgid "unhandled Ada exceptions"
 msgstr ""
 
-#: ada-lang.c:12343
+#: ada-lang.c:12591
 msgid "failed Ada assertions"
 msgstr ""
 
-#: ada-lang.c:12615
+#: ada-lang.c:12863
 msgid "Condition missing after `if' keyword"
 msgstr ""
 
-#: ada-lang.c:12626 breakpoint.c:1010 breakpoint.c:1024
+#: ada-lang.c:12874 breakpoint.c:1022 breakpoint.c:1036
 msgid "Junk at end of expression"
 msgstr ""
 
-#: ada-lang.c:12674 ada-lang.c:12697
+#: ada-lang.c:12922 ada-lang.c:12945
 #, possible-c-format
 msgid "unexpected catchpoint kind (%d)"
 msgstr ""
 
-#: ada-lang.c:12875
+#: ada-lang.c:13123
 msgid "condition missing after `if' keyword"
 msgstr ""
 
-#: ada-lang.c:12882 break-catch-throw.c:478 breakpoint.c:9514
-#: breakpoint.c:11457 breakpoint.c:11601 breakpoint.c:11646 breakpoint.c:15160
+#: ada-lang.c:13130 break-catch-throw.c:477 breakpoint.c:9677
+#: breakpoint.c:11708 breakpoint.c:11840 breakpoint.c:11885 breakpoint.c:15536
 msgid "Junk at end of arguments."
 msgstr ""
 
-#: ada-lang.c:13218
+#: ada-lang.c:13458
 msgid "invalid regular expression"
 msgstr ""
 
-#: ada-lang.c:13243
+#: ada-lang.c:13483
 #, possible-c-format
 msgid "All Ada exceptions matching regular expression \"%s\":\n"
 msgstr ""
 
-#: ada-lang.c:13245
+#: ada-lang.c:13485
 msgid "All defined Ada exceptions:\n"
 msgstr ""
 
 #. XXX: gdb_sprint_host_address, type_sprint
-#: ada-lang.c:13427
+#: ada-lang.c:13667
 msgid "Type @"
 msgstr ""
 
-#: ada-lang.c:13827
+#: ada-lang.c:14075
 msgid "\"set ada\" must be followed by the name of a setting.\n"
 msgstr ""
 
-#: ada-lang.c:13905
+#: ada-lang.c:14153
 msgid "Prefix command for changing Ada-specfic settings"
 msgstr ""
 
-#: ada-lang.c:13909
+#: ada-lang.c:14157
 msgid "Generic command for showing Ada-specific settings."
 msgstr ""
 
-#: ada-lang.c:13913
+#: ada-lang.c:14161
 msgid "Enable or disable an optimization trusting PAD types over XVS types"
 msgstr ""
 
-#: ada-lang.c:13914
+#: ada-lang.c:14162
 msgid ""
 "Show whether an optimization trusting PAD types over XVS types is activated"
 msgstr ""
 
-#: ada-lang.c:13916
+#: ada-lang.c:14164
 msgid ""
 "This is related to the encoding used by the GNAT compiler.  The debugger\n"
 "should normally trust the contents of PAD types, but certain older versions\n"
@@ -824,42 +798,54 @@ msgid ""
 "this option to \"off\" unless necessary."
 msgstr ""
 
-#: ada-lang.c:13926
+#: ada-lang.c:14175
+msgid ""
+"Enable or disable the output of formal and return types for functions in the "
+"overloads selection menu"
+msgstr ""
+
+#: ada-lang.c:14177
+msgid ""
+"Show whether the output of formal and return types for functions in the "
+"overloads selection menu is activated"
+msgstr ""
+
+#: ada-lang.c:14182
 msgid ""
 "Catch Ada exceptions, when raised.\n"
 "With an argument, catch only exceptions with the given name."
 msgstr ""
 
-#: ada-lang.c:13933
+#: ada-lang.c:14189
 msgid ""
 "Catch failed Ada assertions, when raised.\n"
 "With an argument, catch only exceptions with the given name."
 msgstr ""
 
-#: ada-lang.c:13944
+#: ada-lang.c:14200
 msgid ""
 "List all Ada exception names.\n"
 "If a regular expression is passed as an argument, only those matching\n"
 "the regular expression are listed."
 msgstr ""
 
-#: ada-lang.c:13950
+#: ada-lang.c:14206
 msgid "Set Ada maintenance-related variables."
 msgstr ""
 
-#: ada-lang.c:13955
+#: ada-lang.c:14211
 msgid "Show Ada maintenance-related variables"
 msgstr ""
 
-#: ada-lang.c:13962
+#: ada-lang.c:14218
 msgid "Set whether descriptive types generated by GNAT should be ignored."
 msgstr ""
 
-#: ada-lang.c:13963
+#: ada-lang.c:14219
 msgid "Show whether descriptive types generated by GNAT should be ignored."
 msgstr ""
 
-#: ada-lang.c:13964
+#: ada-lang.c:14220
 msgid ""
 "When enabled, the debugger will stop using the DW_AT_GNAT_descriptive_type\n"
 "DWARF attribute."
@@ -978,49 +964,49 @@ msgstr ""
 msgid "Blocked in selective wait statement"
 msgstr ""
 
-#: ada-tasks.c:419
+#: ada-tasks.c:421
 msgid "Unknown task name format. Aborting"
 msgstr ""
 
-#: ada-tasks.c:493
+#: ada-tasks.c:496
 msgid "Cannot find Ada_Task_Control_Block type. Aborting"
 msgstr ""
 
-#: ada-tasks.c:506
+#: ada-tasks.c:509
 msgid "Cannot find Common_ATCB type. Aborting"
 msgstr ""
 
-#: ada-tasks.c:508
+#: ada-tasks.c:511
 msgid "Cannot find Private_Data type. Aborting"
 msgstr ""
 
-#: ada-tasks.c:510
+#: ada-tasks.c:513
 msgid "Cannot find Entry_Call_Record type. Aborting"
 msgstr ""
 
-#: ada-tasks.c:986
+#: ada-tasks.c:989
 msgid "Cannot inspect Ada tasks when program is not running"
 msgstr ""
 
-#: ada-tasks.c:1014 ada-tasks.c:1164 ada-tasks.c:1329
+#: ada-tasks.c:1016 ada-tasks.c:1165 ada-tasks.c:1329
 msgid "Your application does not use any Ada tasks.\n"
 msgstr ""
 
-#: ada-tasks.c:1125
+#: ada-tasks.c:1127
 #, possible-c-format
 msgid "Accepting RV with %-4d"
 msgstr ""
 
-#: ada-tasks.c:1131
+#: ada-tasks.c:1133
 #, possible-c-format
 msgid "Waiting on RV with %-3d"
 msgstr ""
 
-#: ada-tasks.c:1141
+#: ada-tasks.c:1143
 msgid "<no name>"
 msgstr ""
 
-#: ada-tasks.c:1169 ada-tasks.c:1280
+#: ada-tasks.c:1170 ada-tasks.c:1281
 #, possible-c-format
 msgid ""
 "Task ID %d not known.  Use the \"info tasks\" command to\n"
@@ -1028,83 +1014,83 @@ msgid ""
 msgstr ""
 
 #. Print the Ada task ID.
-#: ada-tasks.c:1174
+#: ada-tasks.c:1175
 #, possible-c-format
 msgid "Ada Task: %s\n"
 msgstr ""
 
-#: ada-tasks.c:1179
+#: ada-tasks.c:1180
 #, possible-c-format
 msgid "Name: %s\n"
 msgstr ""
 
-#: ada-tasks.c:1181
+#: ada-tasks.c:1182
 msgid "<no name>\n"
 msgstr ""
 
 #. Print the TID and LWP.
-#: ada-tasks.c:1184
+#: ada-tasks.c:1185
 #, possible-c-format
 msgid "Thread: %#lx\n"
 msgstr ""
 
-#: ada-tasks.c:1185
+#: ada-tasks.c:1186
 #, possible-c-format
 msgid "LWP: %#lx\n"
 msgstr ""
 
-#: ada-tasks.c:1195
+#: ada-tasks.c:1196
 #, possible-c-format
 msgid "Parent: %d"
 msgstr ""
 
-#: ada-tasks.c:1201
+#: ada-tasks.c:1202
 msgid "No parent\n"
 msgstr ""
 
 #. Print the base priority.
-#: ada-tasks.c:1204
+#: ada-tasks.c:1205
 #, possible-c-format
 msgid "Base Priority: %d\n"
 msgstr ""
 
-#: ada-tasks.c:1213
+#: ada-tasks.c:1214
 #, possible-c-format
 msgid "State: Accepting rendezvous with %d"
 msgstr ""
 
-#: ada-tasks.c:1219
+#: ada-tasks.c:1220
 #, possible-c-format
 msgid "State: Waiting on task %d's entry"
 msgstr ""
 
-#: ada-tasks.c:1223
+#: ada-tasks.c:1224
 #, possible-c-format
 msgid "State: %s"
 msgstr ""
 
-#: ada-tasks.c:1264
+#: ada-tasks.c:1265
 msgid "[Current task is unknown]\n"
 msgstr ""
 
-#: ada-tasks.c:1266
+#: ada-tasks.c:1267
 #, possible-c-format
 msgid "[Current task is %d]\n"
 msgstr ""
 
-#: ada-tasks.c:1285
+#: ada-tasks.c:1286
 #, possible-c-format
 msgid "Cannot switch to task %d: Task is no longer running"
 msgstr ""
 
-#: ada-tasks.c:1305
+#: ada-tasks.c:1306
 #, possible-c-format
 msgid ""
 "Unable to compute thread ID for task %d.\n"
 "Cannot switch to this task."
 msgstr ""
 
-#: ada-tasks.c:1311
+#: ada-tasks.c:1312
 #, possible-c-format
 msgid "[Switching to task %d]\n"
 msgstr ""
@@ -1125,47 +1111,47 @@ msgid ""
 "Without argument, this command simply prints the current task ID"
 msgstr ""
 
-#: ada-typeprint.c:398
+#: ada-typeprint.c:399
 msgid "<undecipherable array type>"
 msgstr ""
 
-#: ada-typeprint.c:722
+#: ada-typeprint.c:727
 msgid " <incomplete type> end record"
 msgstr ""
 
-#: ada-typeprint.c:889
+#: ada-typeprint.c:894
 #, possible-c-format
 msgid "<%d-byte integer>"
 msgstr ""
 
-#: ada-typeprint.c:911
+#: ada-typeprint.c:916
 #, possible-c-format
 msgid "<%d-byte float>"
 msgstr ""
 
-#: ada-typeprint.c:924
+#: ada-typeprint.c:929
 msgid "array (?) of ? (<mal-formed descriptor>)"
 msgstr ""
 
-#: ada-valprint.c:203 ada-valprint.c:496 valprint.c:2301
+#: ada-valprint.c:203 ada-valprint.c:494 valprint.c:2675
 #, possible-c-format
 msgid " <repeats %u times>"
 msgstr ""
 
-#: ada-valprint.c:427
+#: ada-valprint.c:425
 msgid "internal error: unhandled type in ada_print_scalar"
 msgstr ""
 
-#: ada-valprint.c:431 typeprint.c:587
+#: ada-valprint.c:429 typeprint.c:579
 msgid "Invalid type code in symbol table."
 msgstr ""
 
-#: ada-valprint.c:642
+#: ada-valprint.c:638
 msgid "<optimized out or zero length>"
 msgstr ""
 
 #. Could not get the array bounds.  Pretend this is an empty array.
-#: ada-varobj.c:258 valprint.c:1675
+#: ada-varobj.c:251 valprint.c:2053
 msgid "unable to get bounds of array, assuming null array"
 msgstr ""
 
@@ -1234,7 +1220,7 @@ msgid "finished"
 msgstr ""
 
 #. i18n: Like "Thread-Id %d, [state] unknown"
-#: aix-thread.c:573 record-btrace.c:462 source.c:678
+#: aix-thread.c:573 btrace.c:1772 source.c:680
 msgid "unknown"
 msgstr ""
 
@@ -1269,119 +1255,127 @@ msgid "Thread %ld"
 msgstr ""
 
 #. i18n: Like "thread-identifier %d, [state] running, suspended"
-#: aix-thread.c:1772
-#, possible-c-format
+#: aix-thread.c:1771
+#, c-format
 msgid "tid %d"
 msgstr ""
 
 #. i18n: Like "Thread-Id %d, [state] running, suspended"
-#: aix-thread.c:1783
+#: aix-thread.c:1782
+#, c-format
 msgid ", suspended"
 msgstr ""
 
 #. i18n: Like "Thread-Id %d, [state] running, detached"
-#: aix-thread.c:1789
+#: aix-thread.c:1788
+#, c-format
 msgid ", detached"
 msgstr ""
 
 #. i18n: Like "Thread-Id %d, [state] running, cancel pending"
-#: aix-thread.c:1794
+#: aix-thread.c:1793
+#, c-format
 msgid ", cancel pending"
 msgstr ""
 
-#: aix-thread.c:1818 aix-thread.c:1819
+#: aix-thread.c:1816 aix-thread.c:1817
 msgid "AIX pthread support"
 msgstr ""
 
-#: aix-thread.c:1855
+#: aix-thread.c:1853
 msgid "Set debugging of AIX thread module."
 msgstr ""
 
-#: aix-thread.c:1856
+#: aix-thread.c:1854
 msgid "Show debugging of AIX thread module."
 msgstr ""
 
-#: aix-thread.c:1857
+#: aix-thread.c:1855
 msgid "Enables debugging output (used to debug GDB)."
 msgstr ""
 
-#: alphabsd-nat.c:96 alphabsd-nat.c:128 amd64bsd-nat.c:57 amd64bsd-nat.c:105
-#: amd64fbsd-nat.c:168 amd64-linux-nat.c:142 amd64-linux-nat.c:197
-#: hppanbsd-nat.c:172 hppanbsd-nat.c:202 hppaobsd-nat.c:198 hppaobsd-nat.c:228
-#: i386bsd-nat.c:143 i386bsd-nat.c:208 i386-linux-nat.c:217
-#: i386-linux-nat.c:232 m32r-linux-nat.c:112 m32r-linux-nat.c:161
-#: m68kbsd-nat.c:120 m68kbsd-nat.c:150 m68klinux-nat.c:268 m68klinux-nat.c:283
-#: m88kbsd-nat.c:73 m88kbsd-nat.c:89 mips64obsd-nat.c:88 mips64obsd-nat.c:104
-#: mips-linux-nat.c:262 mips-linux-nat.c:344 mipsnbsd-nat.c:52
-#: mipsnbsd-nat.c:83 ppcfbsd-nat.c:126 ppcfbsd-nat.c:154 ppcnbsd-nat.c:91
-#: ppcnbsd-nat.c:122 ppcobsd-nat.c:81 ppcobsd-nat.c:117 s390-linux-nat.c:227
-#: s390-linux-nat.c:244 shnbsd-nat.c:54 shnbsd-nat.c:75 sparc-nat.c:173
-#: sparc-nat.c:209 tilegx-linux-nat.c:136 tilegx-linux-nat.c:156
-#: vaxbsd-nat.c:73 vaxbsd-nat.c:89 xtensa-linux-nat.c:190
-#: xtensa-linux-nat.c:209
+#: alpha-bsd-nat.c:96 alpha-bsd-nat.c:128 amd64-bsd-nat.c:53
+#: amd64-bsd-nat.c:101 amd64-fbsd-nat.c:157 amd64-linux-nat.c:150
+#: amd64-linux-nat.c:229 hppa-nbsd-nat.c:172 hppa-nbsd-nat.c:202
+#: hppa-obsd-nat.c:198 hppa-obsd-nat.c:228 i386-bsd-nat.c:140
+#: i386-bsd-nat.c:205 i386-linux-nat.c:217 i386-linux-nat.c:232
+#: m32r-linux-nat.c:112 m32r-linux-nat.c:161 m68k-bsd-nat.c:120
+#: m68k-bsd-nat.c:150 m68k-linux-nat.c:268 m68k-linux-nat.c:283
+#: m88k-bsd-nat.c:73 m88k-bsd-nat.c:89 mips64-obsd-nat.c:88
+#: mips64-obsd-nat.c:104 mips-fbsd-nat.c:57 mips-fbsd-nat.c:92
+#: mips-linux-nat.c:262 mips-linux-nat.c:344 mips-nbsd-nat.c:52
+#: mips-nbsd-nat.c:83 ppc-fbsd-nat.c:126 ppc-fbsd-nat.c:154 ppc-nbsd-nat.c:91
+#: ppc-nbsd-nat.c:122 ppc-obsd-nat.c:81 ppc-obsd-nat.c:117
+#: s390-linux-nat.c:241 s390-linux-nat.c:258 sh-nbsd-nat.c:54 sh-nbsd-nat.c:75
+#: sparc-nat.c:173 sparc-nat.c:209 tilegx-linux-nat.c:136
+#: tilegx-linux-nat.c:156 vax-bsd-nat.c:73 vax-bsd-nat.c:89
+#: xtensa-linux-nat.c:183 xtensa-linux-nat.c:202
 msgid "Couldn't get registers"
 msgstr ""
 
-#: alphabsd-nat.c:110 alphabsd-nat.c:147 amd64bsd-nat.c:84 amd64bsd-nat.c:141
-#: amd64-linux-nat.c:169 amd64-linux-nat.c:232 hppanbsd-nat.c:183
-#: hppanbsd-nat.c:217 hppaobsd-nat.c:209 hppaobsd-nat.c:243 i386bsd-nat.c:186
-#: i386bsd-nat.c:265 i386-linux-nat.c:281 i386-linux-nat.c:295
-#: m68kbsd-nat.c:131 m68kbsd-nat.c:165 m68klinux-nat.c:365 m68klinux-nat.c:379
-#: mipsnbsd-nat.c:66 mipsnbsd-nat.c:102 ppcobsd-nat.c:98 ppcobsd-nat.c:138
-#: s390-linux-nat.c:264 s390-linux-nat.c:281 sparc-nat.c:185
+#: alpha-bsd-nat.c:110 alpha-bsd-nat.c:147 amd64-bsd-nat.c:80
+#: amd64-bsd-nat.c:137 amd64-linux-nat.c:177 amd64-linux-nat.c:264
+#: hppa-nbsd-nat.c:183 hppa-nbsd-nat.c:217 hppa-obsd-nat.c:209
+#: hppa-obsd-nat.c:243 i386-bsd-nat.c:183 i386-bsd-nat.c:262
+#: i386-linux-nat.c:281 i386-linux-nat.c:295 m68k-bsd-nat.c:131
+#: m68k-bsd-nat.c:165 m68k-linux-nat.c:365 m68k-linux-nat.c:379
+#: mips-fbsd-nat.c:71 mips-fbsd-nat.c:112 mips-nbsd-nat.c:66
+#: mips-nbsd-nat.c:102 ppc-obsd-nat.c:98 ppc-obsd-nat.c:138
+#: s390-linux-nat.c:278 s390-linux-nat.c:295 sparc-nat.c:185
 msgid "Couldn't get floating point status"
 msgstr ""
 
-#: alphabsd-nat.c:134 amd64bsd-nat.c:111 amd64-linux-nat.c:202
-#: hppanbsd-nat.c:208 hppaobsd-nat.c:234 i386bsd-nat.c:214
-#: i386-linux-nat.c:237 m32r-linux-nat.c:166 m68kbsd-nat.c:156
-#: m68klinux-nat.c:288 m88kbsd-nat.c:95 mips64obsd-nat.c:110 mipsnbsd-nat.c:89
-#: ppcfbsd-nat.c:160 ppcnbsd-nat.c:129 ppcobsd-nat.c:128 s390-linux-nat.c:249
-#: sparc-nat.c:214 tilegx-linux-nat.c:161 vaxbsd-nat.c:95
-#: xtensa-linux-nat.c:217
+#: alpha-bsd-nat.c:134 amd64-bsd-nat.c:107 amd64-linux-nat.c:234
+#: hppa-nbsd-nat.c:208 hppa-obsd-nat.c:234 i386-bsd-nat.c:211
+#: i386-linux-nat.c:237 m32r-linux-nat.c:166 m68k-bsd-nat.c:156
+#: m68k-linux-nat.c:288 m88k-bsd-nat.c:95 mips64-obsd-nat.c:110
+#: mips-fbsd-nat.c:99 mips-nbsd-nat.c:89 ppc-fbsd-nat.c:160 ppc-nbsd-nat.c:129
+#: ppc-obsd-nat.c:128 s390-linux-nat.c:263 sparc-nat.c:214
+#: tilegx-linux-nat.c:161 vax-bsd-nat.c:95 xtensa-linux-nat.c:210
 msgid "Couldn't write registers"
 msgstr ""
 
-#: alphabsd-nat.c:153 amd64bsd-nat.c:147 amd64-linux-nat.c:237
-#: hppanbsd-nat.c:223 hppaobsd-nat.c:249 i386bsd-nat.c:271
-#: i386-linux-nat.c:300 m68kbsd-nat.c:171 m68klinux-nat.c:384
-#: mipsnbsd-nat.c:108 ppcobsd-nat.c:145 s390-linux-nat.c:286
+#: alpha-bsd-nat.c:153 amd64-bsd-nat.c:143 amd64-linux-nat.c:269
+#: hppa-nbsd-nat.c:223 hppa-obsd-nat.c:249 i386-bsd-nat.c:268
+#: i386-linux-nat.c:300 m68k-bsd-nat.c:171 m68k-linux-nat.c:384
+#: mips-fbsd-nat.c:119 mips-nbsd-nat.c:108 ppc-obsd-nat.c:145
+#: s390-linux-nat.c:300
 msgid "Couldn't write floating point status"
 msgstr ""
 
-#: alpha-tdep.c:260
+#: alpha-tdep.c:262
 msgid "Cannot retrieve value from floating point register"
 msgstr ""
 
-#: alpha-tdep.c:275
+#: alpha-tdep.c:277
 msgid "Cannot store value in floating point register"
 msgstr ""
 
-#: alpha-tdep.c:501 alpha-tdep.c:525 alpha-tdep.c:570 alpha-tdep.c:595
+#: alpha-tdep.c:502 alpha-tdep.c:526 alpha-tdep.c:571 alpha-tdep.c:596
 msgid "unknown floating point width"
 msgstr ""
 
 #. FIXME: 128-bit long doubles are returned like structures:
 #. by writing into indirect storage provided by the caller
 #. as the first argument.
-#: alpha-tdep.c:566 alpha-tdep.c:591
+#: alpha-tdep.c:567 alpha-tdep.c:592
 msgid "Cannot set a 128-bit long double return value."
 msgstr ""
 
-#: alpha-tdep.c:1097
+#: alpha-tdep.c:1093
 #, possible-c-format
 msgid ""
 "Hit beginning of text section without finding enclosing function for address "
 "%s"
 msgstr ""
 
-#: alpha-tdep.c:1100
+#: alpha-tdep.c:1096
 #, possible-c-format
 msgid ""
 "Hit heuristic-fence-post without finding enclosing function for address %s"
 msgstr ""
 
-#: alpha-tdep.c:1105
+#: alpha-tdep.c:1101
 msgid ""
 "This warning occurs if you are debugging a function without any symbols\n"
 "(for example, in a stripped executable).  In that case, you may wish to\n"
@@ -1392,111 +1386,124 @@ msgid ""
 "(more likely) you have encountered a bug in GDB.\n"
 msgstr ""
 
-#: alpha-tdep.c:1872 mips-tdep.c:9183
+#: alpha-tdep.c:1869 mips-tdep.c:9062
 msgid "Set the distance searched for the start of a function."
 msgstr ""
 
-#: alpha-tdep.c:1873 mips-tdep.c:9184
+#: alpha-tdep.c:1870 mips-tdep.c:9063
 msgid "Show the distance searched for the start of a function."
 msgstr ""
 
-#: alpha-tdep.c:1874 mips-tdep.c:9185
+#: alpha-tdep.c:1871 mips-tdep.c:9064
 msgid ""
 "If you are debugging a stripped executable, GDB needs to search through the\n"
 "program for the start of a function.  This command sets the distance of the\n"
 "search.  The only need to set it is when debugging a stripped executable."
 msgstr ""
 
-#: amd64bsd-nat.c:75 amd64bsd-nat.c:128 amd64-linux-nat.c:162
-#: amd64-linux-nat.c:221 i386bsd-nat.c:165 i386bsd-nat.c:235
+#: amd64-bsd-nat.c:71 amd64-bsd-nat.c:124 amd64-linux-nat.c:170
+#: amd64-linux-nat.c:253 i386-bsd-nat.c:162 i386-bsd-nat.c:232
 msgid "Couldn't get extended state status"
 msgstr ""
 
-#: amd64bsd-nat.c:134 amd64-linux-nat.c:227 i386bsd-nat.c:241
+#: amd64-bsd-nat.c:130 amd64-linux-nat.c:259 i386-bsd-nat.c:238
 #: i386-linux-nat.c:366
 msgid "Couldn't write extended state status"
 msgstr ""
 
-#: amd64bsd-nat.c:177 i386bsd-nat.c:310
-msgid "Couldn't read debug registers"
-msgstr ""
-
-#: amd64bsd-nat.c:189 i386bsd-nat.c:322
-msgid "Couldn't get debug registers"
-msgstr ""
-
-#: amd64bsd-nat.c:200 i386bsd-nat.c:333
-msgid "Couldn't write debug registers"
-msgstr ""
-
-#: amd64fbsd-nat.c:257
+#: amd64-fbsd-nat.c:230
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n"
 "Please report this to <bug-gdb@gnu.org>."
 msgstr ""
 
-#: amd64fbsd-nat.c:270
+#: amd64-fbsd-nat.c:243
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_rsp) yields %d instead of %d.\n"
 "Please report this to <bug-gdb@gnu.org>."
 msgstr ""
 
-#: amd64fbsd-nat.c:283
+#: amd64-fbsd-nat.c:256
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_rbp) yields %d instead of %d.\n"
 "Please report this to <bug-gdb@gnu.org>."
 msgstr ""
 
-#: amd64-tdep.c:256 avr-tdep.c:1368 cris-tdep.c:1795 msp430-tdep.c:588
-#, possible-c-format
-msgid "Unmapped DWARF Register #%d encountered."
+#: amd64-linux-nat.c:191
+msgid "Couldn't get segment register fs_base"
+msgstr ""
+
+#: amd64-linux-nat.c:199
+msgid "Couldn't get segment register gs_base"
+msgstr ""
+
+#: amd64-linux-nat.c:284
+msgid "Couldn't write segment register fs_base"
+msgstr ""
+
+#: amd64-linux-nat.c:291
+msgid "Couldn't write segment register gs_base"
 msgstr ""
 
 #. We shouldn't get here.
-#: amd64-tdep.c:1197
+#: amd64-tdep.c:1231
 msgid "unable to find free reg"
 msgstr ""
 
-#: arch-utils.c:233 m32c-tdep.c:2600 m32c-tdep.c:2621
+#. multiply
+#: arch/arm.c:127 arch/arm-get-next-pcs.c:680 arch/arm-get-next-pcs.c:701
+#: arch/arm-get-next-pcs.c:817
+msgid "Invalid update to pc in instruction"
+msgstr ""
+
+#: arch/arm.c:197
+msgid "bad value in switch"
+msgstr ""
+
+#: arch/arm-get-next-pcs.c:897
+msgid "Bad bit-field extraction"
+msgstr ""
+
+#: arch-utils.c:240 m32c-tdep.c:2587 m32c-tdep.c:2608
 msgid "No virtual frame pointer available"
 msgstr ""
 
-#: arch-utils.c:304
+#: arch-utils.c:339
 msgid "The target endianness is set automatically (currently big endian)\n"
 msgstr ""
 
-#: arch-utils.c:307
+#: arch-utils.c:342
 msgid "The target endianness is set automatically (currently little endian)\n"
 msgstr ""
 
-#: arch-utils.c:312
+#: arch-utils.c:347
 msgid "The target is assumed to be big endian\n"
 msgstr ""
 
-#: arch-utils.c:315
+#: arch-utils.c:350
 msgid "The target is assumed to be little endian\n"
 msgstr ""
 
-#: arch-utils.c:330
+#: arch-utils.c:365
 msgid "set_endian: architecture update failed"
 msgstr ""
 
-#: arch-utils.c:336
+#: arch-utils.c:371
 msgid "Little endian target not supported by GDB\n"
 msgstr ""
 
-#: arch-utils.c:344
+#: arch-utils.c:379
 msgid "Big endian target not supported by GDB\n"
 msgstr ""
 
-#: arch-utils.c:350
+#: arch-utils.c:385
 msgid "set_endian: bad value"
 msgstr ""
 
-#: arch-utils.c:409
+#: arch-utils.c:444
 #, possible-c-format
 msgid ""
 "Selected architecture %s is not compatible with reported target architecture "
@@ -1505,348 +1512,357 @@ msgstr ""
 
 #. We have no idea which one is better.  This is a bug, but not
 #. a critical problem; warn the user.
-#: arch-utils.c:433
+#: arch-utils.c:468
 #, possible-c-format
 msgid ""
 "Selected architecture %s is ambiguous with reported target architecture %s"
 msgstr ""
 
-#: arch-utils.c:464
+#: arch-utils.c:499
 #, possible-c-format
 msgid "The target architecture is set automatically (currently %s)\n"
 msgstr ""
 
-#: arch-utils.c:468
+#: arch-utils.c:503
 #, possible-c-format
 msgid "The target architecture is assumed to be %s\n"
 msgstr ""
 
-#: arch-utils.c:488
+#: arch-utils.c:523
 msgid "could not select an architecture automatically"
 msgstr ""
 
-#: arch-utils.c:495
+#: arch-utils.c:530
 msgid "set_architecture: bfd_scan_arch failed"
 msgstr ""
 
-#: arch-utils.c:499
+#: arch-utils.c:534
 #, possible-c-format
 msgid "Architecture `%s' not recognized.\n"
 msgstr ""
 
-#: arch-utils.c:584
+#: arch-utils.c:619
 msgid "Architecture of file not recognized."
 msgstr ""
 
-#: arch-utils.c:631
+#: arch-utils.c:666
 msgid "initialize_current_architecture: No arch"
 msgstr ""
 
-#: arch-utils.c:635
+#: arch-utils.c:670
 msgid "initialize_current_architecture: Arch not found"
 msgstr ""
 
-#: arch-utils.c:678
+#: arch-utils.c:713
 msgid ""
 "initialize_current_architecture: Selection of initial architecture failed"
 msgstr ""
 
-#: arch-utils.c:692
+#: arch-utils.c:727
 msgid "Set architecture of target."
 msgstr ""
 
-#: arch-utils.c:693
+#: arch-utils.c:728
 msgid "Show architecture of target."
 msgstr ""
 
-#: arch-utils.c:820
+#: arch-utils.c:865
 msgid "This architecture has no method to collect a return address."
 msgstr ""
 
-#: arch-utils.c:864
+#: arch-utils.c:908
 msgid "This target does not support inferior memory allocation by mmap."
 msgstr ""
 
-#: arch-utils.c:908
+#: arch-utils.c:975
 msgid "Set endianness of target."
 msgstr ""
 
-#: arch-utils.c:909
+#: arch-utils.c:976
 msgid "Show endianness of target."
 msgstr ""
 
-#: arm-linux-nat.c:112
-msgid "Unable to fetch floating point register."
+#: arc-tdep.c:503
+#, possible-c-format
+msgid "arc: extract_return_value: type length %u too large"
 msgstr ""
 
-#: arm-linux-nat.c:153 arm-linux-nat.c:193 arm-linux-nat.c:253
-msgid "Unable to fetch the floating point registers."
+#: arc-tdep.c:557
+msgid "arc_store_return_value: type length too large."
 msgstr ""
 
-#: arm-linux-nat.c:220
-msgid "Unable to store floating point register."
+#: arc-tdep.c:1060 arc-tdep.c:1076
+msgid "Error: ARC v2 target description supplied for non-ARCv2 target.\n"
 msgstr ""
 
-#: arm-linux-nat.c:280
-msgid "Unable to store floating point registers."
+#: arc-tdep.c:1093
+msgid ""
+"Error: ARCompact target description supplied for non-ARCompact target.\n"
 msgstr ""
 
-#: arm-linux-nat.c:311
-msgid "Unable to fetch general register."
+#: arc-tdep.c:1104
+msgid ""
+"Error: Couldn't find core register feature in supplied target description."
 msgstr ""
 
-#: arm-linux-nat.c:441
-msgid "Unable to store general register."
+#: arc-tdep.c:1138 arc-tdep.c:1162
+#, possible-c-format
+msgid "Error: Cannot find required register `%s' in feature `%s'.\n"
 msgstr ""
 
-#: arm-linux-nat.c:520 arm-linux-nat.c:549
-msgid "Unable to fetch WMMX registers."
+#: arc-tdep.c:1150
+#, possible-c-format
+msgid ""
+"Error: Cannot find required feature `%s' in supplied target description.\n"
 msgstr ""
 
-#: arm-linux-nat.c:575
-msgid "Unable to store WMMX registers."
+#: arc-tdep.c:1313
+msgid "Set ARC specific debugging."
 msgstr ""
 
-#: arm-linux-nat.c:609
-msgid "Unable to fetch VFP registers."
+#: arc-tdep.c:1314
+msgid "Show ARC specific debugging."
 msgstr ""
 
-#: arm-linux-nat.c:645
-msgid "Unable to fetch VFP registers (for update)."
+#: arc-tdep.c:1315
+msgid "Non-zero enables ARC specific debugging."
 msgstr ""
 
-#: arm-linux-nat.c:669
-msgid "Unable to store VFP registers."
+#: arm-linux-nat.c:95 arm-linux-nat.c:133
+msgid "Unable to fetch the floating point registers."
+msgstr ""
+
+#: arm-linux-nat.c:157
+msgid "Unable to store floating point registers."
+msgstr ""
+
+#: arm-linux-nat.c:249 arm-linux-nat.c:275
+msgid "Unable to fetch WMMX registers."
+msgstr ""
+
+#: arm-linux-nat.c:298
+msgid "Unable to store WMMX registers."
+msgstr ""
+
+#: arm-linux-nat.c:353
+msgid "Unable to fetch VFP registers (for update)."
 msgstr ""
 
-#: arm-linux-nat.c:899
+#: arm-linux-nat.c:600
 #, possible-c-format
 msgid ""
 "arm-linux-gdb supports %d hardware watchpoints but "
 "target                       supports %d"
 msgstr ""
 
-#: arm-linux-nat.c:906
+#: arm-linux-nat.c:607
 #, possible-c-format
 msgid ""
 "arm-linux-gdb supports %d hardware breakpoints but "
 "target                       supports %d"
 msgstr ""
 
-#: arm-linux-nat.c:1526 arm-linux-nat.c:1531
+#: arm-linux-nat.c:1230 arm-linux-nat.c:1235
 msgid "Unexpected error setting breakpoint"
 msgstr ""
 
-#: arm-linux-nat.c:1543 arm-linux-nat.c:1548
+#: arm-linux-nat.c:1247 arm-linux-nat.c:1252
 msgid "Unexpected error setting watchpoint"
 msgstr ""
 
-#: arm-linux-tdep.c:1402
+#: arm-linux-tdep.c:1781
 msgid "arm_linux_init_abi: Floating point model not supported"
 msgstr ""
 
-#: armnbsd-nat.c:85
+#: arm-nbsd-nat.c:85
 msgid "unable to fetch general register"
 msgstr ""
 
-#: armnbsd-nat.c:138 armnbsd-nat.c:186 armnbsd-nat.c:224
+#: arm-nbsd-nat.c:138 arm-nbsd-nat.c:186 arm-nbsd-nat.c:224
 msgid "unable to fetch general registers"
 msgstr ""
 
-#: armnbsd-nat.c:156
+#: arm-nbsd-nat.c:156
 msgid "unable to fetch floating-point register"
 msgstr ""
 
-#: armnbsd-nat.c:286 armnbsd-nat.c:369
+#: arm-nbsd-nat.c:286 arm-nbsd-nat.c:369
 #, possible-c-format
 msgid "unable to write register %d to inferior"
 msgstr ""
 
-#: armnbsd-nat.c:334
+#: arm-nbsd-nat.c:334
 msgid "unable to store general registers"
 msgstr ""
 
-#: armnbsd-nat.c:348
+#: arm-nbsd-nat.c:348
 msgid "unable to fetch floating-point registers"
 msgstr ""
 
-#: armnbsd-nat.c:391
+#: arm-nbsd-nat.c:391
 msgid "unable to store floating-point registers"
 msgstr ""
 
-#: armnbsd-nat.c:443
+#: arm-nbsd-nat.c:424
 msgid "wrong size of register set in core file"
 msgstr ""
 
-#: armnbsd-nat.c:455
+#: arm-nbsd-nat.c:436
 msgid "wrong size of FPA register set in core file"
 msgstr ""
 
-#: armnbsd-tdep.c:62 arm-tdep.c:10334
+#: arm-nbsd-tdep.c:63 arm-tdep.c:9396
 msgid "arm_gdbarch_init: bad byte order for float format"
 msgstr ""
 
-#. multiply
-#: arm-tdep.c:1531 arm-tdep.c:4804 arm-tdep.c:4825 arm-tdep.c:4947
-msgid "Invalid update to pc in instruction"
-msgstr ""
-
-#: arm-tdep.c:1601
-msgid "bad value in switch"
-msgstr ""
-
-#: arm-tdep.c:3498 arm-tdep.c:3520
+#: arm-tdep.c:3450 arm-tdep.c:3472
 #, possible-c-format
 msgid "Invalid VFP CPRC type: %d."
 msgstr ""
 
-#: arm-tdep.c:3987
+#: arm-tdep.c:3970
 #, possible-c-format
 msgid "Hardware FPU type %d\n"
 msgstr ""
 
-#: arm-tdep.c:3989
+#: arm-tdep.c:3972
 #, possible-c-format
 msgid "Software FPU type %d\n"
 msgstr ""
 
 #. i18n: [floating point unit] mask
-#: arm-tdep.c:3991
+#: arm-tdep.c:3974
 msgid "mask: "
 msgstr ""
 
 #. i18n: [floating point unit] flags
-#: arm-tdep.c:3994
+#: arm-tdep.c:3977
 msgid "flags: "
 msgstr ""
 
-#: arm-tdep.c:4223
+#: arm-tdep.c:4206
 #, possible-c-format
 msgid "Bad REGNUM %d"
 msgstr ""
 
-#: arm-tdep.c:5031
-msgid "Bad bit-field extraction\n"
-msgstr ""
-
 #. Unpredictable behaviour.  Try to do something sensible (switch to ARM
 #. mode, align dest to 4 bytes).
-#: arm-tdep.c:5620
+#: arm-tdep.c:4545
 msgid "Single-stepping BX to non-word-aligned ARM instruction."
 msgstr ""
 
-#: arm-tdep.c:5682
+#: arm-tdep.c:4607
 msgid "Instruction wrote to PC in an unexpected way when single-stepping"
 msgstr ""
 
-#: arm-tdep.c:5688
+#: arm-tdep.c:4613
 msgid "Invalid argument to displaced_write_reg"
 msgstr ""
 
-#: arm-tdep.c:6648
+#: arm-tdep.c:5573
 msgid "copy_extra_ld_st: instruction decode error"
 msgstr ""
 
-#: arm-tdep.c:6962
+#: arm-tdep.c:5887
 msgid "Cannot single-step exception return"
 msgstr ""
 
-#: arm-tdep.c:7082
+#: arm-tdep.c:6007
 #, possible-c-format
 msgid "displaced: LDM: move loaded register r%d to r%d\n"
 msgstr ""
 
-#: arm-tdep.c:7087
+#: arm-tdep.c:6012
 #, possible-c-format
 msgid "displaced: LDM: register r%d already in the right place\n"
 msgstr ""
 
-#: arm-tdep.c:7107
+#: arm-tdep.c:6032
 #, possible-c-format
 msgid "displaced: LDM: restored clobbered register r%d\n"
 msgstr ""
 
-#: arm-tdep.c:7150 arm-tdep.c:7261
+#: arm-tdep.c:6075 arm-tdep.c:6186
 msgid "displaced: Unpredictable LDM or STM with base register r15"
 msgstr ""
 
-#: arm-tdep.c:7219 arm-tdep.c:7305
+#: arm-tdep.c:6144 arm-tdep.c:6230
 #, possible-c-format
 msgid ""
 "displaced: LDM r%d%s, {..., pc}: original reg list %.4x, modified list %.4x\n"
 msgstr ""
 
-#: arm-tdep.c:8264
+#: arm-tdep.c:7254
 #, possible-c-format
 msgid "displaced: POP {..., pc}: original reg list %.4x, modified list %.4x\n"
 msgstr ""
 
-#: arm-tdep.c:8381
+#: arm-tdep.c:7371
 msgid "thumb_process_displaced_16bit_insn: Instruction decode error"
 msgstr ""
 
-#: arm-tdep.c:8589
+#: arm-tdep.c:7578
 msgid "thumb_process_displaced_32bit_insn: Instruction decode error"
 msgstr ""
 
-#: arm-tdep.c:8673
+#: arm-tdep.c:7662
 msgid "arm_process_displaced_insn: Instruction decode error"
 msgstr ""
 
-#: arm-tdep.c:8948
+#: arm-tdep.c:7977
 msgid "arm_extract_return_value: Floating point model not supported"
 msgstr ""
 
-#: arm-tdep.c:9139
+#: arm-tdep.c:8182
 msgid "arm_store_return_value: Floating point model not supported"
 msgstr ""
 
-#: arm-tdep.c:9375
+#: arm-tdep.c:8417
 msgid "\"set arm\" must be followed by an apporpriate subcommand.\n"
 msgstr ""
 
-#: arm-tdep.c:9399 rs6000-tdep.c:6047 rs6000-tdep.c:6074
+#: arm-tdep.c:8441 rs6000-tdep.c:6658 rs6000-tdep.c:6685
 msgid "could not update architecture"
 msgstr ""
 
-#: arm-tdep.c:9416
+#: arm-tdep.c:8458
 #, possible-c-format
 msgid "Invalid fp model accepted: %s."
 msgstr ""
 
-#: arm-tdep.c:9430
+#: arm-tdep.c:8472
 #, possible-c-format
 msgid "The current ARM floating point model is \"auto\" (currently \"%s\").\n"
 msgstr ""
 
-#: arm-tdep.c:9434
+#: arm-tdep.c:8476
 #, possible-c-format
 msgid "The current ARM floating point model is \"%s\".\n"
 msgstr ""
 
-#: arm-tdep.c:9453
+#: arm-tdep.c:8495
 #, possible-c-format
 msgid "Invalid ABI accepted: %s."
 msgstr ""
 
-#: arm-tdep.c:9467
+#: arm-tdep.c:8509
 #, possible-c-format
 msgid "The current ARM ABI is \"auto\" (currently \"%s\").\n"
 msgstr ""
 
-#: arm-tdep.c:9471
+#: arm-tdep.c:8513
 #, possible-c-format
 msgid "The current ARM ABI is \"%s\".\n"
 msgstr ""
 
-#: arm-tdep.c:9480
+#: arm-tdep.c:8522
 #, possible-c-format
 msgid ""
 "The current execution mode assumed (when symbols are unavailable) is \"%s"
 "\".\n"
 msgstr ""
 
-#: arm-tdep.c:9492
+#: arm-tdep.c:8532
 #, possible-c-format
 msgid ""
 "The current execution mode assumed (even when symbols are available) is \"%s"
@@ -1854,57 +1870,57 @@ msgid ""
 msgstr ""
 
 #. Leave it as "auto".
-#: arm-tdep.c:10026
+#: arm-tdep.c:9088
 #, possible-c-format
 msgid "unknown ARM EABI version 0x%x"
 msgstr ""
 
-#: arm-tdep.c:10513
+#: arm-tdep.c:9583
 #, possible-c-format
 msgid "arm_dump_tdep: Lowest pc = 0x%lx"
 msgstr ""
 
-#: arm-tdep.c:10562 arm-tdep.c:10566
+#: arm-tdep.c:9625 arm-tdep.c:9629
 msgid "Various ARM-specific commands."
 msgstr ""
 
-#: arm-tdep.c:10597
+#: arm-tdep.c:9659
 msgid "The valid values are:\n"
 msgstr ""
 
-#: arm-tdep.c:10599
+#: arm-tdep.c:9661
 msgid "The default is \"std\"."
 msgstr ""
 
-#: arm-tdep.c:10605
+#: arm-tdep.c:9665
 msgid "Set the disassembly style."
 msgstr ""
 
-#: arm-tdep.c:10606
+#: arm-tdep.c:9666
 msgid "Show the disassembly style."
 msgstr ""
 
-#: arm-tdep.c:10614
+#: arm-tdep.c:9673
 msgid "Set usage of ARM 32-bit mode."
 msgstr ""
 
-#: arm-tdep.c:10615
+#: arm-tdep.c:9674
 msgid "Show usage of ARM 32-bit mode."
 msgstr ""
 
-#: arm-tdep.c:10616
+#: arm-tdep.c:9675
 msgid "When off, a 26-bit PC will be used."
 msgstr ""
 
-#: arm-tdep.c:10624
+#: arm-tdep.c:9683
 msgid "Set the floating point type."
 msgstr ""
 
-#: arm-tdep.c:10625
+#: arm-tdep.c:9684
 msgid "Show the floating point type."
 msgstr ""
 
-#: arm-tdep.c:10626
+#: arm-tdep.c:9685
 msgid ""
 "auto - Determine the FP typefrom the OS-ABI.\n"
 "softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n"
@@ -1913,59 +1929,47 @@ msgid ""
 "vfp - VFP co-processor."
 msgstr ""
 
-#: arm-tdep.c:10636
+#: arm-tdep.c:9695
 msgid "Set the ABI."
 msgstr ""
 
-#: arm-tdep.c:10637
+#: arm-tdep.c:9696
 msgid "Show the ABI."
 msgstr ""
 
-#: arm-tdep.c:10645
+#: arm-tdep.c:9704
 msgid "Set the mode assumed when symbols are unavailable."
 msgstr ""
 
-#: arm-tdep.c:10646
+#: arm-tdep.c:9705
 msgid "Show the mode assumed when symbols are unavailable."
 msgstr ""
 
-#: arm-tdep.c:10651
+#: arm-tdep.c:9710
 msgid "Set the mode assumed even when symbols are available."
 msgstr ""
 
-#: arm-tdep.c:10652
+#: arm-tdep.c:9711
 msgid "Show the mode assumed even when symbols are available."
 msgstr ""
 
-#: arm-tdep.c:10658
+#: arm-tdep.c:9717
 msgid "Set ARM debugging."
 msgstr ""
 
-#: arm-tdep.c:10659
+#: arm-tdep.c:9718
 msgid "Show ARM debugging."
 msgstr ""
 
-#: arm-tdep.c:10660
+#: arm-tdep.c:9719
 msgid "When on, arm-specific debugging is enabled."
 msgstr ""
 
-#. SPSR is going to be changed.
-#. We need to get SPSR value, which is yet to be done.
-#: arm-tdep.c:11042
-#, possible-c-format
-msgid "Process record does not support instruction  0x%0x at address %s.\n"
-msgstr ""
-
-#: arm-tdep.c:11217
-#, possible-c-format
-msgid "Process record does not support instruction x%0x at address %s.\n"
-msgstr ""
-
-#: arm-tdep.c:12529 arm-tdep.c:12967 rs6000-tdep.c:5090
+#: arm-tdep.c:11651 arm-tdep.c:12089 rs6000-tdep.c:5678
 msgid "no syscall record support\n"
 msgstr ""
 
-#: arm-tdep.c:13851 arm-tdep.c:13948
+#: arm-tdep.c:12971 arm-tdep.c:13080
 #, possible-c-format
 msgid "Process record: error reading memory at addr %s len = %d.\n"
 msgstr ""
@@ -2086,88 +2090,88 @@ msgid ""
 "\tinfo \"(gdb)Auto-loading safe path\"\n"
 msgstr ""
 
-#: auto-load.c:799 auto-load.c:830
+#: auto-load.c:803 auto-load.c:834
 #, possible-c-format
 msgid "auto-load: Attempted file \"%s\" %s.\n"
 msgstr ""
 
-#: auto-load.c:800 auto-load.c:833
+#: auto-load.c:804 auto-load.c:837
 msgid "exists"
 msgstr ""
 
-#: auto-load.c:800 auto-load.c:833
+#: auto-load.c:804 auto-load.c:837
 msgid "does not exist"
 msgstr ""
 
-#: auto-load.c:815
+#: auto-load.c:819
 #, possible-c-format
 msgid "auto-load: Searching 'set auto-load scripts-directory' path \"%s\".\n"
 msgstr ""
 
-#: auto-load.c:848
+#: auto-load.c:852
 #, possible-c-format
 msgid "auto-load: Loading %s script \"%s\" by extension for objfile \"%s\".\n"
 msgstr ""
 
-#: auto-load.c:909
+#: auto-load.c:913
 #, possible-c-format
 msgid "auto-load: Stripped .exe suffix, retrying with \"%s\".\n"
 msgstr ""
 
-#: auto-load.c:965 auto-load.c:1070
+#: auto-load.c:969 auto-load.c:1074
 #, possible-c-format
 msgid ""
 "auto-load: Loading %s script \"%s\" from section \"%s\" of objfile \"%s\".\n"
 msgstr ""
 
 #. We don't throw an error, the program is still debuggable.
-#: auto-load.c:1040
+#: auto-load.c:1044
 #, possible-c-format
 msgid ""
 "Missing/bad script name in entry at offset %u in section %s\n"
 "of file %s."
 msgstr ""
 
-#: auto-load.c:1124
+#: auto-load.c:1128
 #, possible-c-format
 msgid "Invalid entry in %s section"
 msgstr ""
 
-#: auto-load.c:1135
+#: auto-load.c:1139
 #, possible-c-format
 msgid "Non-nul-terminated entry in %s at offset %u"
 msgstr ""
 
-#: auto-load.c:1147
+#: auto-load.c:1151
 #, possible-c-format
 msgid "Empty entry in %s at offset %u"
 msgstr ""
 
-#: auto-load.c:1177
+#: auto-load.c:1181
 #, possible-c-format
 msgid "Couldn't read %s section of %s"
 msgstr ""
 
-#: auto-load.c:1341 solib.c:988 solib.c:1070
+#: auto-load.c:1345 solib.c:1003 solib.c:1083
 #, possible-c-format
 msgid "Invalid regexp: %s"
 msgstr ""
 
-#: auto-load.c:1421
+#: auto-load.c:1424
 msgid "Local .gdbinit file was not found.\n"
 msgstr ""
 
-#: auto-load.c:1423
+#: auto-load.c:1426
 #, possible-c-format
 msgid "Local .gdbinit file \"%s\" has been loaded.\n"
 msgstr ""
 
-#: auto-load.c:1426
+#: auto-load.c:1429
 #, possible-c-format
 msgid "Local .gdbinit file \"%s\" has not been loaded.\n"
 msgstr ""
 
-#: auto-load.c:1442
+#: auto-load.c:1445
 #, possible-c-format
 msgid ""
 "Unsupported auto-load script at offset %u in section %s\n"
@@ -2175,7 +2179,7 @@ msgid ""
 "Use `info auto-load %s-scripts [REGEXP]' to list them."
 msgstr ""
 
-#: auto-load.c:1464
+#: auto-load.c:1467
 #, possible-c-format
 msgid ""
 "Missing auto-load script at offset %u in section %s\n"
@@ -2183,65 +2187,65 @@ msgid ""
 "Use `info auto-load %s-scripts [REGEXP]' to list them."
 msgstr ""
 
-#: auto-load.c:1493
+#: auto-load.c:1496
 msgid ""
 "Valid is only global 'set auto-load no'; otherwise check the auto-load sub-"
 "commands."
 msgstr ""
 
-#: auto-load.c:1512
+#: auto-load.c:1515
 msgid ""
 "Auto-loading specific settings.\n"
 "Configure various auto-load-specific variables such as\n"
 "automatic loading of Python scripts."
 msgstr ""
 
-#: auto-load.c:1539
+#: auto-load.c:1542
 msgid ""
 "Show auto-loading specific settings.\n"
 "Show configuration of various auto-load-specific variables such as\n"
 "automatic loading of Python scripts."
 msgstr ""
 
-#: auto-load.c:1590
+#: auto-load.c:1593
 msgid ""
 "Print current status of auto-loaded files.\n"
 "Print whether various files like Python scripts or .gdbinit files have been\n"
 "found and/or loaded."
 msgstr ""
 
-#: auto-load.c:1617
+#: auto-load.c:1620
 msgid "Enable or disable auto-loading of canned sequences of commands scripts."
 msgstr ""
 
-#: auto-load.c:1618
+#: auto-load.c:1621
 msgid ""
 "Show whether auto-loading of canned sequences of commands scripts is enabled."
 msgstr ""
 
-#: auto-load.c:1620
+#: auto-load.c:1623
 msgid ""
 "If enabled, canned sequences of commands are loaded when the debugger reads\n"
 "an executable or shared library.\n"
 "This options has security implications for untrusted inferiors."
 msgstr ""
 
-#: auto-load.c:1629
+#: auto-load.c:1632
 msgid ""
 "Print the list of automatically loaded sequences of commands.\n"
 "Usage: info auto-load gdb-scripts [REGEXP]"
 msgstr ""
 
-#: auto-load.c:1634
+#: auto-load.c:1637
 msgid "Enable or disable auto-loading of .gdbinit script in current directory."
 msgstr ""
 
-#: auto-load.c:1635
+#: auto-load.c:1638
 msgid ""
 "Show whether auto-loading .gdbinit script in current directory is enabled."
 msgstr ""
 
-#: auto-load.c:1637
+#: auto-load.c:1640
 msgid ""
 "If enabled, canned sequences of commands are loaded when debugger starts\n"
 "from .gdbinit file in current directory.  Such files are deprecated,\n"
@@ -2249,28 +2253,28 @@ msgid ""
 "This options has security implications for untrusted inferiors."
 msgstr ""
 
-#: auto-load.c:1647
+#: auto-load.c:1650
 msgid ""
 "Print whether current directory .gdbinit file has been loaded.\n"
 "Usage: info auto-load local-gdbinit"
 msgstr ""
 
-#: auto-load.c:1655
+#: auto-load.c:1658
 #, possible-c-format
 msgid "GDB scripts:    OBJFILE%s\n"
 msgstr ""
 
-#: auto-load.c:1662
+#: auto-load.c:1665
 #, possible-c-format
 msgid "Python scripts: OBJFILE%s\n"
 msgstr ""
 
-#: auto-load.c:1670
+#: auto-load.c:1673
 #, possible-c-format
 msgid "Guile scripts:  OBJFILE%s\n"
 msgstr ""
 
-#: auto-load.c:1675
+#: auto-load.c:1678
 #, possible-c-format
 msgid ""
 "Automatically loaded scripts are located in one of the directories listed\n"
@@ -2285,23 +2289,23 @@ msgid ""
 "option."
 msgstr ""
 
-#: auto-load.c:1692
+#: auto-load.c:1695
 msgid "Set the list of directories from which to load auto-loaded scripts."
 msgstr ""
 
-#: auto-load.c:1693
+#: auto-load.c:1696
 msgid "Show the list of directories from which to load auto-loaded scripts."
 msgstr ""
 
-#: auto-load.c:1707
+#: auto-load.c:1710
 msgid "Set the list of files and directories that are safe for auto-loading."
 msgstr ""
 
-#: auto-load.c:1708
+#: auto-load.c:1711
 msgid "Show the list of files and directories that are safe for auto-loading."
 msgstr ""
 
-#: auto-load.c:1709
+#: auto-load.c:1712
 msgid ""
 "Various files loaded automatically for the 'set auto-load ...' options must\n"
 "be located in one of the directories listed by this option.  Warning will "
@@ -2317,7 +2321,7 @@ msgid ""
 "This options has security implications for untrusted inferiors."
 msgstr ""
 
-#: auto-load.c:1728
+#: auto-load.c:1731
 msgid ""
 "Add entries to the list of directories from which it is safe to auto-load "
 "files.\n"
@@ -2326,7 +2330,7 @@ msgid ""
 "access the current full list setting."
 msgstr ""
 
-#: auto-load.c:1737
+#: auto-load.c:1740
 msgid ""
 "Add entries to the list of directories from which to load auto-loaded "
 "scripts.\n"
@@ -2334,251 +2338,251 @@ msgid ""
 "'show auto-load scripts-directory' to access the current full list setting."
 msgstr ""
 
-#: auto-load.c:1745
+#: auto-load.c:1748
 msgid "Set auto-load verifications debugging."
 msgstr ""
 
-#: auto-load.c:1746
+#: auto-load.c:1749
 msgid "Show auto-load verifications debugging."
 msgstr ""
 
-#: auto-load.c:1747
+#: auto-load.c:1750
 msgid ""
 "When non-zero, debugging output for files of 'set auto-load ...'\n"
 "is displayed."
 msgstr ""
 
-#: auxv.c:437
+#: auxv.c:456
 msgid "End of vector"
 msgstr ""
 
-#: auxv.c:438 auxv.c:459
+#: auxv.c:457 auxv.c:479
 msgid "Entry should be ignored"
 msgstr ""
 
-#: auxv.c:439
+#: auxv.c:458
 msgid "File descriptor of program"
 msgstr ""
 
-#: auxv.c:440
+#: auxv.c:459
 msgid "Program headers for program"
 msgstr ""
 
-#: auxv.c:441
+#: auxv.c:460
 msgid "Size of program header entry"
 msgstr ""
 
-#: auxv.c:442
+#: auxv.c:461
 msgid "Number of program headers"
 msgstr ""
 
-#: auxv.c:443
+#: auxv.c:462
 msgid "System page size"
 msgstr ""
 
-#: auxv.c:444
+#: auxv.c:463
 msgid "Base address of interpreter"
 msgstr ""
 
-#: auxv.c:445
+#: auxv.c:464
 msgid "Flags"
 msgstr ""
 
-#: auxv.c:446
+#: auxv.c:465
 msgid "Entry point of program"
 msgstr ""
 
-#: auxv.c:447
+#: auxv.c:466
 msgid "Program is not ELF"
 msgstr ""
 
-#: auxv.c:448 auxv.c:472
+#: auxv.c:467 auxv.c:495
 msgid "Real user ID"
 msgstr ""
 
-#: auxv.c:449 auxv.c:471
+#: auxv.c:468 auxv.c:494
 msgid "Effective user ID"
 msgstr ""
 
-#: auxv.c:450 auxv.c:474
+#: auxv.c:469 auxv.c:497
 msgid "Real group ID"
 msgstr ""
 
-#: auxv.c:451 auxv.c:473
+#: auxv.c:470 auxv.c:496
 msgid "Effective group ID"
 msgstr ""
 
-#: auxv.c:452
+#: auxv.c:471
 msgid "Frequency of times()"
 msgstr ""
 
-#: auxv.c:453
+#: auxv.c:472
 msgid "String identifying platform"
 msgstr ""
 
-#: auxv.c:454 auxv.c:480
+#: auxv.c:473 auxv.c:505
 msgid "Machine-dependent CPU capability hints"
 msgstr ""
 
-#: auxv.c:455
+#: auxv.c:475
 msgid "Used FPU control word"
 msgstr ""
 
-#: auxv.c:456
+#: auxv.c:476
 msgid "Data cache block size"
 msgstr ""
 
-#: auxv.c:457
+#: auxv.c:477
 msgid "Instruction cache block size"
 msgstr ""
 
-#: auxv.c:458
+#: auxv.c:478
 msgid "Unified cache block size"
 msgstr ""
 
-#: auxv.c:460
+#: auxv.c:480
 msgid "String identifying base platform"
 msgstr ""
 
-#: auxv.c:461
+#: auxv.c:482
 msgid "Address of 16 random bytes"
 msgstr ""
 
-#: auxv.c:462
+#: auxv.c:483
 msgid "Extension of AT_HWCAP"
 msgstr ""
 
-#: auxv.c:463
+#: auxv.c:484
 msgid "File name of executable"
 msgstr ""
 
-#: auxv.c:464
+#: auxv.c:485
 msgid "Boolean, was exec setuid-like?"
 msgstr ""
 
-#: auxv.c:465
+#: auxv.c:486
 msgid "Special system info/entry points"
 msgstr ""
 
-#: auxv.c:466
+#: auxv.c:487
 msgid "System-supplied DSO's ELF header"
 msgstr ""
 
-#: auxv.c:467
+#: auxv.c:489
 msgid "L1 Instruction cache information"
 msgstr ""
 
-#: auxv.c:468
+#: auxv.c:491
 msgid "L1 Data cache information"
 msgstr ""
 
-#: auxv.c:469
+#: auxv.c:492
 msgid "L2 cache information"
 msgstr ""
 
-#: auxv.c:470
+#: auxv.c:493
 msgid "L3 cache information"
 msgstr ""
 
-#: auxv.c:475
+#: auxv.c:498
 msgid "Dynamic linker's ELF header"
 msgstr ""
 
-#: auxv.c:476
+#: auxv.c:499
 msgid "Dynamic linker's section headers"
 msgstr ""
 
-#: auxv.c:477
+#: auxv.c:501
 msgid "String giving name of dynamic linker"
 msgstr ""
 
-#: auxv.c:478
+#: auxv.c:503
 msgid "Large pagesize"
 msgstr ""
 
-#: auxv.c:479
+#: auxv.c:504
 msgid "Platform name string"
 msgstr ""
 
-#: auxv.c:481
+#: auxv.c:507
 msgid "Should flush icache?"
 msgstr ""
 
-#: auxv.c:482
+#: auxv.c:508
 msgid "CPU name string"
 msgstr ""
 
-#: auxv.c:483
+#: auxv.c:509
 msgid "COFF entry point address"
 msgstr ""
 
-#: auxv.c:484
+#: auxv.c:510
 msgid "COFF executable file descriptor"
 msgstr ""
 
-#: auxv.c:486
+#: auxv.c:513
 msgid "Canonicalized file name given to execve"
 msgstr ""
 
-#: auxv.c:487
+#: auxv.c:514
 msgid "String for name of MMU module"
 msgstr ""
 
-#: auxv.c:488
+#: auxv.c:515
 msgid "Dynamic linker's data segment address"
 msgstr ""
 
-#: auxv.c:490
+#: auxv.c:518
 msgid "AF_SUN_ flags passed from the kernel"
 msgstr ""
 
-#: auxv.c:528
+#: auxv.c:558
 msgid "The program has no auxiliary information now."
 msgstr ""
 
-#: auxv.c:534
+#: auxv.c:564
 msgid "No auxiliary vector found, or failed reading it."
 msgstr ""
 
-#: auxv.c:536
+#: auxv.c:566
 msgid "Auxiliary vector is empty."
 msgstr ""
 
-#: auxv.c:547
+#: auxv.c:577
 msgid ""
 "Display the inferior's auxiliary vector.\n"
 "This is information provided by the operating system at program startup."
 msgstr ""
 
-#: avr-tdep.c:399 avr-tdep.c:417 i386-tdep.c:455 i386-tdep.c:3211
-#: i386-tdep.c:3427 i386-tdep.c:3591 s390-linux-tdep.c:324
-#: s390-linux-tdep.c:344 s390-linux-tdep.c:418 s390-linux-tdep.c:473
-#: sparc64-tdep.c:336 spu-tdep.c:178 spu-tdep.c:248 spu-tdep.c:309
-#: spu-tdep.c:331 spu-tdep.c:353
+#: avr-tdep.c:401 avr-tdep.c:419 i386-tdep.c:478 i386-tdep.c:3242
+#: i386-tdep.c:3455 i386-tdep.c:3616 i386-tdep.c:3698 s390-linux-tdep.c:364
+#: s390-linux-tdep.c:384 s390-linux-tdep.c:458 s390-linux-tdep.c:513
+#: s390-linux-tdep.c:595 s390-linux-tdep.c:641 sparc64-tdep.c:369
+#: spu-tdep.c:179 spu-tdep.c:249 spu-tdep.c:310 spu-tdep.c:332 spu-tdep.c:354
 msgid "invalid regnum"
 msgstr ""
 
-#: avr-tdep.c:660
+#: avr-tdep.c:662
 #, possible-c-format
 msgid "Num pushes too large: %d\n"
 msgstr ""
 
-#: avr-tdep.c:1573
+#: avr-tdep.c:1565
 msgid "ERR: info io_registers NOT supported by current target\n"
 msgstr ""
 
-#: avr-tdep.c:1581
+#: avr-tdep.c:1573
 msgid "Error fetching number of io registers\n"
 msgstr ""
 
-#: avr-tdep.c:1590
+#: avr-tdep.c:1582
 #, possible-c-format
 msgid ""
 "Target has %u io registers:\n"
 "\n"
 msgstr ""
 
-#: avr-tdep.c:1639
+#: avr-tdep.c:1631
 msgid "query remote avr target for io space register values"
 msgstr ""
 
@@ -2608,7 +2612,7 @@ msgstr ""
 msgid "Couldn't resolve symbol `%s'."
 msgstr ""
 
-#: ax-gdb.c:728 findvar.c:353 findvar.c:564 printcmd.c:1299 tracepoint.c:2844
+#: ax-gdb.c:728 findvar.c:359 findvar.c:741 printcmd.c:1543 tracepoint.c:2726
 msgid "LOC_COMPUTED variable missing a method"
 msgstr ""
 
@@ -2621,216 +2625,215 @@ msgstr ""
 msgid "Value not scalar: cannot be an rvalue."
 msgstr ""
 
-#: ax-gdb.c:1012
+#: ax-gdb.c:1011
 msgid "Invalid type cast: intended type must be scalar."
 msgstr ""
 
-#: ax-gdb.c:1035
+#: ax-gdb.c:1034
 msgid "Casts to requested type are not yet implemented."
 msgstr ""
 
-#: ax-gdb.c:1103
+#: ax-gdb.c:1102
 msgid ""
 "First argument of `-' is a pointer, but second argument is neither\n"
 "an integer nor a pointer of the same type."
 msgstr ""
 
-#: ax-gdb.c:1156
+#: ax-gdb.c:1155
 #, possible-c-format
 msgid "Invalid combination of types in %s."
 msgstr ""
 
-#: ax-gdb.c:1173
+#: ax-gdb.c:1172
 msgid "Invalid type of operand to `!'."
 msgstr ""
 
-#: ax-gdb.c:1184
+#: ax-gdb.c:1183
 msgid "Invalid type of operand to `~'."
 msgstr ""
 
-#: ax-gdb.c:1202
+#: ax-gdb.c:1201
 msgid "gen_deref: expected a pointer"
 msgstr ""
 
-#: ax-gdb.c:1211 valops.c:914
+#: ax-gdb.c:1210 valops.c:917
 msgid "Attempt to dereference a generic pointer."
 msgstr ""
 
-#: ax-gdb.c:1232
+#: ax-gdb.c:1231
 msgid "Operand of `&' is an rvalue, which has no address."
 msgstr ""
 
-#: ax-gdb.c:1235
+#: ax-gdb.c:1234
 msgid "Operand of `&' is in a register, and has no address."
 msgstr ""
 
-#: ax-gdb.c:1307
+#: ax-gdb.c:1306
 msgid "gen_bitfield_ref: bitfield too wide"
 msgstr ""
 
-#: ax-gdb.c:1459 ax-gdb.c:1601
+#: ax-gdb.c:1458 ax-gdb.c:1600
 #, possible-c-format
 msgid "static field `%s' has been optimized out, cannot use"
 msgstr ""
 
-#: ax-gdb.c:1471
+#: ax-gdb.c:1470
 msgid "find_field: anonymous unions not supported"
 msgstr ""
 
-#: ax-gdb.c:1519
+#: ax-gdb.c:1518
 #, possible-c-format
 msgid "The left operand of `%s' is not a %s."
 msgstr ""
 
-#: ax-gdb.c:1525
+#: ax-gdb.c:1524
 msgid "Structure does not live in memory."
 msgstr ""
 
-#: ax-gdb.c:1531
+#: ax-gdb.c:1530
 #, possible-c-format
 msgid "Couldn't find member named `%s' in struct/union/class `%s'"
 msgstr ""
 
-#: ax-gdb.c:1589
+#: ax-gdb.c:1588
 msgid "non-aggregate type to gen_struct_elt_for_reference"
 msgstr ""
 
-#: ax-gdb.c:1607 valops.c:3339
+#: ax-gdb.c:1606 valops.c:3347
 msgid "pointers to bitfield members not allowed"
 msgstr ""
 
 #. FIXME we need a way to do "want_address" equivalent
-#: ax-gdb.c:1611 valops.c:3372
+#: ax-gdb.c:1610 valops.c:3380
 #, possible-c-format
 msgid "Cannot reference non-static field \"%s\""
 msgstr ""
 
-#: ax-gdb.c:1632 eval.c:1497 valops.c:3548
+#: ax-gdb.c:1631 eval.c:1477 valops.c:3556
 #, possible-c-format
 msgid "No symbol \"%s\" in namespace \"%s\"."
 msgstr ""
 
-#: ax-gdb.c:1662 ax-gdb.c:1980 ax-gdb.c:2204
+#: ax-gdb.c:1661 ax-gdb.c:1979 ax-gdb.c:2203
 #, possible-c-format
 msgid "`%s' has been optimized out, cannot use"
 msgstr ""
 
-#: ax-gdb.c:1686
+#: ax-gdb.c:1685
 msgid "non-aggregate type in gen_aggregate_elt_ref"
 msgstr ""
 
-#: ax-gdb.c:1713
+#: ax-gdb.c:1712
 msgid "Left operand of `@' must be an object in memory."
 msgstr ""
 
-#: ax-gdb.c:1721
+#: ax-gdb.c:1720
 msgid "Right operand of `@' must be a constant, in agent expressions."
 msgstr ""
 
-#: ax-gdb.c:1724
+#: ax-gdb.c:1723
 msgid "Right operand of `@' must be an integer."
 msgstr ""
 
-#: ax-gdb.c:1727
+#: ax-gdb.c:1726
 msgid "Right operand of `@' must be positive."
 msgstr ""
 
-#: ax-gdb.c:1906 ax-gdb.c:1942
+#: ax-gdb.c:1905 ax-gdb.c:1941
 #, possible-c-format
 msgid "$%s is not a trace state variable, may not assign to it"
 msgstr ""
 
-#: ax-gdb.c:1910 ax-gdb.c:1946
+#: ax-gdb.c:1909 ax-gdb.c:1945
 msgid "May only assign to trace state variables"
 msgstr ""
 
-#: ax-gdb.c:1995 tracepoint.c:1520
+#: ax-gdb.c:1994 tracepoint.c:1437
 #, possible-c-format
 msgid "Register $%s not available"
 msgstr ""
 
-#: ax-gdb.c:1999
+#: ax-gdb.c:1998
 #, possible-c-format
 msgid "'%s' is a user-register; GDB cannot yet trace user-register contents."
 msgstr ""
 
-#: ax-gdb.c:2026
+#: ax-gdb.c:2025
 #, possible-c-format
 msgid ""
 "$%s is not a trace state variable; GDB agent expressions cannot use "
 "convenience variables."
 msgstr ""
 
-#: ax-gdb.c:2147
+#: ax-gdb.c:2146
 msgid "Argument of unary `*' is not a pointer."
 msgstr ""
 
-#: ax-gdb.c:2183
+#: ax-gdb.c:2182
 msgid "gen_expr: unhandled struct case"
 msgstr ""
 
-#: ax-gdb.c:2199
+#: ax-gdb.c:2198
 #, possible-c-format
 msgid "no `%s' found"
 msgstr ""
 
-#: ax-gdb.c:2221 eval.c:734 eval.c:2921
+#: ax-gdb.c:2220 eval.c:715 eval.c:2903
 #, possible-c-format
 msgid "There is no field named %s"
 msgstr ""
 
-#: ax-gdb.c:2229
+#: ax-gdb.c:2228
 msgid "Attempt to use a type name as an expression."
 msgstr ""
 
-#: ax-gdb.c:2232
+#: ax-gdb.c:2231
 #, possible-c-format
 msgid "Unsupported operator %s (%d) in expression."
 msgstr ""
 
-#: ax-gdb.c:2308
+#: ax-gdb.c:2307
 msgid "cannot subscript requested type: cannot call user defined functions"
 msgstr ""
 
-#: ax-gdb.c:2321 eval.c:2146 eval.c:2192 eval.c:2216 jv-lang.c:985
-#: m2-lang.c:254
+#: ax-gdb.c:2320 eval.c:2127 eval.c:2173 eval.c:2197 m2-lang.c:254
 #, possible-c-format
 msgid "cannot subscript something of type `%s'"
 msgstr ""
 
-#: ax-gdb.c:2324 eval.c:2149 eval.c:2219 jv-lang.c:987 m2-lang.c:257
+#: ax-gdb.c:2323 eval.c:2130 eval.c:2200 m2-lang.c:257
 msgid "cannot subscript requested type"
 msgstr ""
 
-#: ax-gdb.c:2329 valarith.c:945
+#: ax-gdb.c:2328 valarith.c:945
 msgid "Argument to arithmetic operation not a number or boolean."
 msgstr ""
 
-#: ax-gdb.c:2384
+#: ax-gdb.c:2383
 msgid "gen_expr: op case sets don't match"
 msgstr ""
 
-#: ax-gdb.c:2634 ax-gdb.c:2710
+#: ax-gdb.c:2591 ax-gdb.c:2668
 msgid "GDB can't do agent expression translation with overlays."
 msgstr ""
 
-#: ax-gdb.c:2637 ax-gdb.c:2713
+#: ax-gdb.c:2594 ax-gdb.c:2671
 msgid "expression to translate"
 msgstr ""
 
-#: ax-gdb.c:2720
+#: ax-gdb.c:2678
 msgid "Must start with a format string."
 msgstr ""
 
-#: ax-gdb.c:2731 breakpoint.c:2406 printcmd.c:2272
+#: ax-gdb.c:2689 breakpoint.c:2420 printcmd.c:2523
 msgid "Bad format string, non-terminated '\"'."
 msgstr ""
 
-#: ax-gdb.c:2736 breakpoint.c:2411 printcmd.c:2277
+#: ax-gdb.c:2694 breakpoint.c:2425 printcmd.c:2528
 msgid "Invalid argument syntax"
 msgstr ""
 
-#: ax-gdb.c:2780
+#: ax-gdb.c:2738
 msgid ""
 "Translate an expression into remote agent bytecode for tracing.\n"
 "Usage: maint agent [-at location,] EXPRESSION\n"
@@ -2838,7 +2841,7 @@ msgid ""
 "If not, generate remote agent bytecode for current frame pc address."
 msgstr ""
 
-#: ax-gdb.c:2788
+#: ax-gdb.c:2746
 msgid ""
 "Translate an expression into remote agent bytecode for evaluation.\n"
 "Usage: maint agent-eval [-at location,] EXPRESSION\n"
@@ -2846,100 +2849,100 @@ msgid ""
 "If not, generate remote agent bytecode for current frame pc address."
 msgstr ""
 
-#: ax-gdb.c:2796
+#: ax-gdb.c:2754
 msgid ""
 "Translate an expression into remote agent bytecode for evaluation and "
 "display the bytecodes."
 msgstr ""
 
-#: ax-general.c:129
+#: ax-general.c:106
 msgid "GDB bug: ax-general.c (read_const): incomplete constant"
 msgstr ""
 
-#: ax-general.c:153
+#: ax-general.c:137
 msgid "GDB bug: ax-general.c (ax_pick): stack depth out of range"
 msgstr ""
 
-#: ax-general.c:166
+#: ax-general.c:150
 msgid "GDB bug: ax-general.c (generic_ext): bit count out of range"
 msgstr ""
 
-#: ax-general.c:169
+#: ax-general.c:153
 msgid "GDB bug: ax-general.c (generic_ext): opcode has inadequate range"
 msgstr ""
 
-#: ax-general.c:200
+#: ax-general.c:184
 msgid ""
 "GDB bug: ax-general.c (ax_trace_quick): size out of range for trace_quick"
 msgstr ""
 
-#: ax-general.c:236
+#: ax-general.c:220
 msgid "GDB bug: ax-general.c (ax_label): label target out of range"
 msgstr ""
 
 #. FIXME: floating-point support not present yet.
-#: ax-general.c:282
+#: ax-general.c:266
 msgid "GDB bug: ax-general.c (ax_const_d): floating point not supported yet"
 msgstr ""
 
-#: ax-general.c:296 ax-general.c:444
+#: ax-general.c:280 ax-general.c:431
 #, possible-c-format
 msgid "'%s' is a pseudo-register; GDB cannot yet trace its contents."
 msgstr ""
 
-#: ax-general.c:300 ax-general.c:448
+#: ax-general.c:284 ax-general.c:435
 #, possible-c-format
 msgid "Trace '%s' failed."
 msgstr ""
 
-#: ax-general.c:307
+#: ax-general.c:294
 msgid "GDB bug: ax-general.c (ax_reg): register number out of range"
 msgstr ""
 
-#: ax-general.c:325
+#: ax-general.c:312
 #, possible-c-format
 msgid "ax-general.c (ax_tsv): variable number is %d, out of range"
 msgstr ""
 
-#: ax-general.c:348
+#: ax-general.c:335
 #, possible-c-format
 msgid "ax-general.c (ax_string): string length is %d, out of allowed range"
 msgstr ""
 
-#: ax-general.c:380
+#: ax-general.c:367
 #, possible-c-format
 msgid "Scope: %s\n"
 msgstr ""
 
-#: ax-general.c:381
+#: ax-general.c:368
 msgid "Reg mask:"
 msgstr ""
 
-#: ax-general.c:383
+#: ax-general.c:370
 #, possible-c-format
 msgid " %02x"
 msgstr ""
 
-#: ax-general.c:384 darwin-nat.c:556 darwin-nat-info.c:293
-#: darwin-nat-info.c:586 darwin-nat-info.c:794
+#: ax-general.c:371 darwin-nat.c:569 darwin-nat-info.c:293
+#: darwin-nat-info.c:586 darwin-nat-info.c:793
 msgid "\n"
 msgstr ""
 
-#: ax-general.c:390
+#: ax-general.c:377
 msgid "GDB bug: ax-general.c (ax_print): opcode map out of sync"
 msgstr ""
 
-#: ax-general.c:399
+#: ax-general.c:386
 #, possible-c-format
 msgid "%3d  <bad opcode %02x>\n"
 msgstr ""
 
-#: ax-general.c:405
+#: ax-general.c:392
 #, possible-c-format
 msgid "%3d  <incomplete opcode %s>\n"
 msgstr ""
 
-#: ax-general.c:427
+#: ax-general.c:414
 #, possible-c-format
 msgid " \"%s\", %d args"
 msgstr ""
@@ -2947,104 +2950,104 @@ msgstr ""
 #. i18n: Like "Percentage of duplicates, by count: (not applicable)".
 #. i18n: "Average entry size: (not applicable)".
 #. i18n: "Average hash chain length: (not applicable)".
-#: bcache.c:347 bcache.c:448 bcache.c:478
+#: bcache.c:348 bcache.c:449 bcache.c:479
 msgid "(not applicable)\n"
 msgstr ""
 
-#: bcache.c:429
+#: bcache.c:430
 #, possible-c-format
 msgid "  Cached '%s' statistics:\n"
 msgstr ""
 
-#: bcache.c:430
+#: bcache.c:431
 #, possible-c-format
 msgid "    Total object count:  %ld\n"
 msgstr ""
 
-#: bcache.c:431
+#: bcache.c:432
 #, possible-c-format
 msgid "    Unique object count: %lu\n"
 msgstr ""
 
-#: bcache.c:432
+#: bcache.c:433
 msgid "    Percentage of duplicates, by count: "
 msgstr ""
 
-#: bcache.c:436
+#: bcache.c:437
 #, possible-c-format
 msgid "    Total object size:   %ld\n"
 msgstr ""
 
-#: bcache.c:437
+#: bcache.c:438
 #, possible-c-format
 msgid "    Unique object size:  %ld\n"
 msgstr ""
 
-#: bcache.c:438
+#: bcache.c:439
 msgid "    Percentage of duplicates, by size:  "
 msgstr ""
 
-#: bcache.c:442
+#: bcache.c:443
 #, possible-c-format
 msgid "    Max entry size:     %d\n"
 msgstr ""
 
-#: bcache.c:443
+#: bcache.c:444
 msgid "    Average entry size: "
 msgstr ""
 
-#: bcache.c:449
+#: bcache.c:450
 #, possible-c-format
 msgid "    Median entry size:  %d\n"
 msgstr ""
 
-#: bcache.c:452
+#: bcache.c:453
 #, possible-c-format
 msgid "    Total memory used by bcache, including overhead: %ld\n"
 msgstr ""
 
-#: bcache.c:455
+#: bcache.c:456
 msgid "    Percentage memory overhead: "
 msgstr ""
 
-#: bcache.c:457
+#: bcache.c:458
 msgid "    Net memory savings:         "
 msgstr ""
 
-#: bcache.c:461
+#: bcache.c:462
 #, possible-c-format
 msgid "    Hash table size:           %3d\n"
 msgstr ""
 
-#: bcache.c:463
+#: bcache.c:464
 #, possible-c-format
 msgid "    Hash table expands:        %lu\n"
 msgstr ""
 
-#: bcache.c:465
+#: bcache.c:466
 #, possible-c-format
 msgid "    Hash table hashes:         %lu\n"
 msgstr ""
 
-#: bcache.c:467
+#: bcache.c:468
 #, possible-c-format
 msgid "    Half hash misses:          %lu\n"
 msgstr ""
 
-#: bcache.c:469
+#: bcache.c:470
 msgid "    Hash table population:     "
 msgstr ""
 
-#: bcache.c:471
+#: bcache.c:472
 #, possible-c-format
 msgid "    Median hash chain length:  %3d\n"
 msgstr ""
 
-#: bcache.c:473
+#: bcache.c:474
 msgid "    Average hash chain length: "
 msgstr ""
 
-#: bcache.c:479
+#: bcache.c:480
 #, possible-c-format
 msgid "    Maximum hash chain length: %3d\n"
 msgstr ""
@@ -3063,55 +3066,52 @@ msgid ""
 "function"
 msgstr ""
 
-#: bfin-tdep.c:697 bfin-tdep.c:717 xtensa-tdep.c:334 xtensa-tdep.c:635
-#: xtensa-tdep.c:729
+#: bfin-tdep.c:697 bfin-tdep.c:717 xtensa-tdep.c:337 xtensa-tdep.c:636
+#: xtensa-tdep.c:730
 #, possible-c-format
 msgid "invalid register number %d"
 msgstr ""
 
 #: block.c:242
 #, possible-c-format
-msgid ""
-"DW_OP_GNU_entry_value resolving cannot find DW_TAG_GNU_call_site %s in %s"
+msgid "DW_OP_entry_value resolving cannot find DW_TAG_call_site %s in %s"
 msgstr ""
 
-#: break-catch-sig.c:229
+#: break-catch-sig.c:234
 #, possible-c-format
-msgid ""
-"\n"
-"Catchpoint %d (signal %s), "
+msgid "Catchpoint %d (signal %s), "
 msgstr ""
 
-#: break-catch-sig.c:307
+#: break-catch-sig.c:306
 #, possible-c-format
 msgid "Catchpoint %d (signals"
 msgstr ""
 
-#: break-catch-sig.c:309
+#: break-catch-sig.c:308
 #, possible-c-format
 msgid "Catchpoint %d (signal"
 msgstr ""
 
-#: break-catch-sig.c:322
+#: break-catch-sig.c:321
 #, possible-c-format
 msgid "Catchpoint %d (any signal)"
 msgstr ""
 
-#: break-catch-sig.c:324
+#: break-catch-sig.c:323
 #, possible-c-format
 msgid "Catchpoint %d (standard signals)"
 msgstr ""
 
-#: break-catch-sig.c:412
+#: break-catch-sig.c:411
 msgid "'all' cannot be caught with other signals"
 msgstr ""
 
-#: break-catch-sig.c:430
+#: break-catch-sig.c:429
 #, possible-c-format
 msgid "Unknown signal name '%s'."
 msgstr ""
 
-#: break-catch-sig.c:497
+#: break-catch-sig.c:496
 msgid ""
 "Catch signals by their names and/or numbers.\n"
 "Usage: catch signal [[NAME|NUMBER] [NAME|NUMBER]...|all]\n"
@@ -3122,47 +3122,52 @@ msgid ""
 "(if your system supports that), or signal numbers."
 msgstr ""
 
-#: break-catch-syscall.c:361
+#: break-catch-syscall.c:363
 #, possible-c-format
 msgid "Catchpoint %d (syscalls"
 msgstr ""
 
-#: break-catch-syscall.c:363
+#: break-catch-syscall.c:365
 #, possible-c-format
 msgid "Catchpoint %d (syscall"
 msgstr ""
 
-#: break-catch-syscall.c:380
+#: break-catch-syscall.c:382
 #, possible-c-format
 msgid "Catchpoint %d (any syscall)"
 msgstr ""
 
+#: break-catch-syscall.c:488
+#, possible-c-format
+msgid "Unknown syscall group '%s'."
+msgstr ""
+
 #. Here we have to issue an error instead of a warning,
 #. because GDB cannot do anything useful if there's no
 #. syscall number to be caught.
-#: break-catch-syscall.c:479
+#: break-catch-syscall.c:509
 #, possible-c-format
 msgid "Unknown syscall name '%s'."
 msgstr ""
 
-#: break-catch-syscall.c:503
+#: break-catch-syscall.c:533
 msgid "The feature 'catch syscall' is not supported on this architecture yet."
 msgstr ""
 
-#: break-catch-syscall.c:649
+#: break-catch-syscall.c:726
 msgid ""
-"Catch system calls by their names and/or numbers.\n"
-"Arguments say which system calls to catch.  If no arguments\n"
-"are given, every system call will be caught.\n"
-"Arguments, if given, should be one or more system call names\n"
-"(if your system supports that), or system call numbers."
+"Catch system calls by their names, groups and/or numbers.\n"
+"Arguments say which system calls to catch.  If no arguments are given,\n"
+"every system call will be caught.  Arguments, if given, should be one\n"
+"or more system call names (if your system supports that), system call\n"
+"groups or system call numbers."
 msgstr ""
 
 #. We have been told to display the contents of F77 COMMON
 #. block supposedly visible in this function.  Let us
 #. first make sure that it is visible and if so, let
 #. us display its contents.
-#: break-catch-throw.c:106 f-valprint.c:483 probe.c:939
+#: break-catch-throw.c:107 f-valprint.c:461 probe.c:967
 msgid "No frame selected"
 msgstr ""
 
@@ -3178,19 +3183,19 @@ msgstr ""
 msgid "error computing probe argument at c++ exception catchpoint"
 msgstr ""
 
-#: break-catch-throw.c:334
+#: break-catch-throw.c:336
 msgid "\tmatching: "
 msgstr ""
 
-#: break-catch-throw.c:351
+#: break-catch-throw.c:353
 msgid " (throw)"
 msgstr ""
 
-#: break-catch-throw.c:352
+#: break-catch-throw.c:354
 msgid " (catch)"
 msgstr ""
 
-#: break-catch-throw.c:353
+#: break-catch-throw.c:355
 msgid " (rethrow)"
 msgstr ""
 
@@ -3198,560 +3203,549 @@ msgstr ""
 msgid "invalid type-matching regexp"
 msgstr ""
 
-#: break-catch-throw.c:483
+#: break-catch-throw.c:482
 msgid "Unsupported or unknown exception event; cannot catch it"
 msgstr ""
 
 #. Add catch and tcatch sub-commands.
-#: break-catch-throw.c:581
+#: break-catch-throw.c:580
 msgid "Catch an exception, when caught."
 msgstr ""
 
-#: break-catch-throw.c:587
+#: break-catch-throw.c:586
 msgid "Catch an exception, when thrown."
 msgstr ""
 
-#: break-catch-throw.c:593
+#: break-catch-throw.c:592
 msgid "Catch an exception, when rethrown."
 msgstr ""
 
-#: breakpoint.c:404
+#: breakpoint.c:408
 #, possible-c-format
 msgid "Debugger's willingness to use watchpoint hardware is %s.\n"
 msgstr ""
 
-#: breakpoint.c:420
+#: breakpoint.c:424
 #, possible-c-format
 msgid "Debugger's behavior regarding pending breakpoints is %s.\n"
 msgstr ""
 
-#: breakpoint.c:436
+#: breakpoint.c:440
 #, possible-c-format
 msgid "Automatic usage of hardware breakpoints is %s.\n"
 msgstr ""
 
-#: breakpoint.c:453
+#: breakpoint.c:457
 #, possible-c-format
 msgid "Always inserted breakpoint mode is %s.\n"
 msgstr ""
 
-#: breakpoint.c:844
+#: breakpoint.c:857
 msgid ""
 "Target does not support breakpoint condition evaluation.\n"
 "Using host evaluation mode instead."
 msgstr ""
 
-#: breakpoint.c:900
+#: breakpoint.c:913
 #, possible-c-format
 msgid "Breakpoint condition evaluation mode is %s (currently %s).\n"
 msgstr ""
 
-#: breakpoint.c:905
+#: breakpoint.c:918
 #, possible-c-format
 msgid "Breakpoint condition evaluation mode is %s.\n"
 msgstr ""
 
-#: breakpoint.c:991
+#: breakpoint.c:1003
 #, possible-c-format
 msgid "Breakpoint %d now unconditional.\n"
 msgstr ""
 
-#: breakpoint.c:1088
+#: breakpoint.c:1100
 msgid "breakpoint number"
 msgstr ""
 
-#: breakpoint.c:1093
+#: breakpoint.c:1105
 #, possible-c-format
 msgid "Bad breakpoint argument: '%s'"
 msgstr ""
 
-#: breakpoint.c:1106 guile/scm-breakpoint.c:943 python/py-breakpoint.c:997
+#: breakpoint.c:1118 guile/scm-breakpoint.c:954 python/py-breakpoint.c:1038
 #, possible-c-format
 msgid ""
 "Only one stop condition allowed.  There is currently a %s stop condition "
 "defined for this breakpoint."
 msgstr ""
 
-#: breakpoint.c:1118 breakpoint.c:14360
+#: breakpoint.c:1130 breakpoint.c:14680
 #, possible-c-format
 msgid "No breakpoint number %d."
 msgstr ""
 
-#: breakpoint.c:1135
+#: breakpoint.c:1147
 msgid "The 'while-stepping' command can only be used for tracepoints"
 msgstr ""
 
-#: breakpoint.c:1145
+#: breakpoint.c:1157
 msgid "The 'collect' command can only be used for tracepoints"
 msgstr ""
 
-#: breakpoint.c:1148
+#: breakpoint.c:1160
 msgid "The 'teval' command can only be used for tracepoints"
 msgstr ""
 
-#: breakpoint.c:1202
+#: breakpoint.c:1214
 msgid "The 'while-stepping' command cannot be used for fast tracepoint"
 msgstr ""
 
-#: breakpoint.c:1205
+#: breakpoint.c:1217
 msgid "The 'while-stepping' command cannot be used for static tracepoint"
 msgstr ""
 
-#: breakpoint.c:1209
+#: breakpoint.c:1221
 msgid "The 'while-stepping' command can be used only once"
 msgstr ""
 
-#: breakpoint.c:1226
+#: breakpoint.c:1238
 msgid "The 'while-stepping' command cannot be nested"
 msgstr ""
 
-#: breakpoint.c:1358
+#: breakpoint.c:1370
 #, possible-c-format
 msgid "Type commands for breakpoint(s) %s, one per line."
 msgstr ""
 
-#: breakpoint.c:1430
+#: breakpoint.c:1432
 msgid "No breakpoints specified."
 msgstr ""
 
-#: breakpoint.c:1649
+#: breakpoint.c:1647
 #, possible-c-format
 msgid "reading through apparently deleted breakpoint #%d?"
 msgstr ""
 
-#: breakpoint.c:1916 breakpoint.c:2097
+#: breakpoint.c:1936 breakpoint.c:2117
 msgid ""
 "Can't set read/access watchpoint when hardware watchpoints are disabled."
 msgstr ""
 
-#: breakpoint.c:2076
+#: breakpoint.c:2096
 msgid "Target does not support this type of hardware watchpoint."
 msgstr ""
 
-#: breakpoint.c:2079
+#: breakpoint.c:2099
 msgid "There are not enough available hardware resources for this watchpoint."
 msgstr ""
 
-#: breakpoint.c:2100
+#: breakpoint.c:2120
 msgid "Expression cannot be implemented with read/access watchpoint."
 msgstr ""
 
-#: breakpoint.c:2135
+#: breakpoint.c:2148
 #, possible-c-format
 msgid ""
 "Watchpoint %d deleted because the program has left the block\n"
 "in which its expression is valid.\n"
 msgstr ""
 
-#: breakpoint.c:2395
+#: breakpoint.c:2409
 msgid "No format string following the location"
 msgstr ""
 
-#: breakpoint.c:2664
+#: breakpoint.c:2696
 msgid ""
 "Note: automatically using hardware breakpoints for read-only addresses.\n"
 msgstr ""
 
-#: breakpoint.c:2675
+#: breakpoint.c:2707
 #, possible-c-format
 msgid ""
 "Cannot insert breakpoint %d.\n"
 "Cannot set software breakpoint at read-only address %s\n"
 msgstr ""
 
-#: breakpoint.c:2716
+#: breakpoint.c:2748
 #, possible-c-format
 msgid "hardware breakpoint %d not supported in overlay!"
 msgstr ""
 
-#: breakpoint.c:2918
+#: breakpoint.c:2953
 #, possible-c-format
 msgid ""
 "Error inserting catchpoint %d: Your system does not support this type\n"
 "of catchpoint."
 msgstr ""
 
-#: breakpoint.c:2922
+#: breakpoint.c:2957
 #, possible-c-format
 msgid "Error inserting catchpoint %d."
 msgstr ""
 
-#: breakpoint.c:3211
+#: breakpoint.c:3243
 #, possible-c-format
 msgid ""
-"Thread-specific breakpoint %d deleted - thread %d no longer in the thread "
+"Thread-specific breakpoint %d deleted - thread %s no longer in the thread "
 "list.\n"
 msgstr ""
 
-#: breakpoint.c:3855
+#: breakpoint.c:3903
 msgid "Cannot detach breakpoints of inferior_ptid"
 msgstr ""
 
-#: breakpoint.c:4016
+#: breakpoint.c:4061
 #, possible-c-format
 msgid "Could not remove hardware watchpoint %d."
 msgstr ""
 
-#: breakpoint.c:4702
+#: breakpoint.c:4783
 msgid "<unreadable>"
 msgstr ""
 
-#: breakpoint.c:4749
+#: breakpoint.c:4861
 msgid "print_bp_stop_message: unrecognized enum value"
 msgstr ""
 
-#: breakpoint.c:4768
+#: breakpoint.c:4879
 msgid "Stopped due to shared library event:\n"
 msgstr ""
 
-#: breakpoint.c:4771
+#: breakpoint.c:4881
 msgid "Stopped due to shared library event (no libraries added or removed)\n"
 msgstr ""
 
-#: breakpoint.c:4785
+#: breakpoint.c:4895
 msgid "  Inferior unloaded "
 msgstr ""
 
-#: breakpoint.c:4808
+#: breakpoint.c:4918
 msgid "  Inferior loaded "
 msgstr ""
 
-#. Error from catch_errors.
-#: breakpoint.c:5315
+#: breakpoint.c:5431
 #, possible-c-format
 msgid "Watchpoint %d deleted.\n"
 msgstr ""
 
-#: breakpoint.c:5446
+#: breakpoint.c:5565
 msgid "Watchpoint condition cannot be tested in the current scope"
 msgstr ""
 
-#: breakpoint.c:5835
+#: breakpoint.c:5965
 msgid "bpstat_what: tracepoint encountered"
 msgstr ""
 
-#: breakpoint.c:5856
+#: breakpoint.c:5986
 #, possible-c-format
 msgid "bpstat_what: unhandled bptype %d"
 msgstr ""
 
-#: breakpoint.c:6125
+#: breakpoint.c:6261
 #, possible-c-format
 msgid "bptypes table does not describe type #%d."
 msgstr ""
 
-#: breakpoint.c:6259
+#: breakpoint.c:6394
 msgid "print_one_breakpoint: bp_none encountered\n"
 msgstr ""
 
-#: breakpoint.c:6895
+#: breakpoint.c:7044
 msgid "Note: breakpoint "
 msgstr ""
 
 #. if (others == ???)
-#: breakpoint.c:6897
+#: breakpoint.c:7046
 msgid "Note: breakpoints "
 msgstr ""
 
-#: breakpoint.c:6915
+#: breakpoint.c:7064
 msgid "also set at pc "
 msgstr ""
 
-#: breakpoint.c:7092
+#: breakpoint.c:7263
 #, possible-c-format
 msgid "Breakpoint %d address previously adjusted from %s to %s."
 msgstr ""
 
-#: breakpoint.c:7095
+#: breakpoint.c:7266
 #, possible-c-format
 msgid "Breakpoint address adjusted from %s to %s."
 msgstr ""
 
-#: breakpoint.c:7211
+#: breakpoint.c:7381
 msgid "unknown breakpoint type"
 msgstr ""
 
-#: breakpoint.c:7820
+#: breakpoint.c:7967
 #, possible-c-format
 msgid "Temporarily disabling breakpoints for unloaded shared library \"%s\""
 msgstr ""
 
-#: breakpoint.c:8021
+#: breakpoint.c:8167
 #, possible-c-format
 msgid "Catchpoint %d (fork)"
 msgstr ""
 
-#: breakpoint.c:8137
+#: breakpoint.c:8282
 #, possible-c-format
 msgid "Catchpoint %d (vfork)"
 msgstr ""
 
-#: breakpoint.c:8314
+#: breakpoint.c:8460
 #, possible-c-format
 msgid "load of library matching %s"
 msgstr ""
 
-#: breakpoint.c:8316
+#: breakpoint.c:8462
 msgid "load of library"
 msgstr ""
 
-#: breakpoint.c:8321
+#: breakpoint.c:8467
 #, possible-c-format
 msgid "unload of library matching %s"
 msgstr ""
 
-#: breakpoint.c:8323
+#: breakpoint.c:8469
 msgid "unload of library"
 msgstr ""
 
-#: breakpoint.c:8338
+#: breakpoint.c:8483
 #, possible-c-format
 msgid "Catchpoint %d (%s)"
 msgstr ""
 
-#: breakpoint.c:8388 objc-lang.c:589 objc-lang.c:740 symtab.c:4545
-#: thread.c:1612
+#: breakpoint.c:8533 objc-lang.c:604 objc-lang.c:755 symtab.c:4372
+#: thread.c:2021
 #, possible-c-format
 msgid "Invalid regexp (%s): %s"
 msgstr ""
 
-#: breakpoint.c:8597
+#: breakpoint.c:8742
 #, possible-c-format
 msgid "Catchpoint %d (exec)"
 msgstr ""
 
-#: breakpoint.c:8998 printcmd.c:2265
+#: breakpoint.c:9150 printcmd.c:2516
 msgid "Bad format string, missing '\"'."
 msgstr ""
 
-#: breakpoint.c:9005
+#: breakpoint.c:9157
 msgid "No function supplied for dprintf call"
 msgstr ""
 
-#: breakpoint.c:9023
+#: breakpoint.c:9175
 msgid "Target cannot run dprintf commands, falling back to GDB printf"
 msgstr ""
 
-#: breakpoint.c:9029
+#: breakpoint.c:9181
 msgid "Invalid dprintf style."
 msgstr ""
 
-#: breakpoint.c:9089 breakpoint.c:14578
+#: breakpoint.c:9242 breakpoint.c:14896
 msgid "No hardware breakpoint support in the target."
 msgstr ""
 
-#: breakpoint.c:9091 breakpoint.c:10221 breakpoint.c:14580
+#: breakpoint.c:9244 breakpoint.c:10393 breakpoint.c:14898
 msgid "Hardware breakpoints used exceeds limit."
 msgstr ""
 
-#: breakpoint.c:9146 breakpoint.c:9155
+#: breakpoint.c:9299 breakpoint.c:9308
 #, possible-c-format
 msgid "Probed static tracepoint marker \"%s\"\n"
 msgstr ""
 
-#: breakpoint.c:9160
+#: breakpoint.c:9313
 msgid "Couldn't determine the static tracepoint marker to probe"
 msgstr ""
 
-#: breakpoint.c:9180
+#: breakpoint.c:9333
 #, possible-c-format
 msgid "Garbage '%s' follows condition"
 msgstr ""
 
-#: breakpoint.c:9190 breakpoint.c:13360
+#: breakpoint.c:9343 breakpoint.c:10165
 msgid "Format string required"
 msgstr ""
 
-#: breakpoint.c:9193
+#: breakpoint.c:9346
 #, possible-c-format
 msgid "Garbage '%s' at end of command"
 msgstr ""
 
-#: breakpoint.c:9351
+#: breakpoint.c:9517
 msgid "No default breakpoint address now."
 msgstr ""
 
-#: breakpoint.c:9423
+#: breakpoint.c:9597
 #, possible-c-format
-msgid "May not have a fast tracepoint at 0x%s%s"
+msgid "May not have a fast tracepoint at %s%s"
 msgstr ""
 
-#: breakpoint.c:9435 thread.c:1532
-#, possible-c-format
-msgid "Unknown thread %d."
-msgstr ""
-
-#: breakpoint.c:9491
+#: breakpoint.c:9655
 msgid "Junk after thread keyword."
 msgstr ""
 
-#: breakpoint.c:9503
+#: breakpoint.c:9666
 msgid "Junk after task keyword."
 msgstr ""
 
-#: breakpoint.c:9505
+#: breakpoint.c:9668
 #, possible-c-format
 msgid "Unknown task %d."
 msgstr ""
 
-#: breakpoint.c:9540
+#: breakpoint.c:9703
 #, possible-c-format
 msgid "No known static tracepoint marker named %s"
 msgstr ""
 
-#: breakpoint.c:9623
+#: breakpoint.c:9778
 #, possible-c-format
 msgid "Make %s pending on future shared library load? "
 msgstr ""
 
-#: breakpoint.c:9710
+#: breakpoint.c:9858 mi/mi-cmd-break.c:348
 #, possible-c-format
 msgid "Garbage '%s' at end of location"
 msgstr ""
 
-#: breakpoint.c:9787
+#: breakpoint.c:9931
 msgid ""
 "Multiple breakpoints were set.\n"
 "Use the \"delete\" command to delete unwanted breakpoints."
 msgstr ""
 
-#: breakpoint.c:9850 linespec.c:1997
+#: breakpoint.c:10000 linespec.c:1926
 #, possible-c-format
 msgid "No line %d in file \"%s\"."
 msgstr ""
 
-#: breakpoint.c:9926
+#: breakpoint.c:10076
 msgid ""
 "Specify the type of breakpoint to set.\n"
 "Usage: stop in <function | address>\n"
 "       stop at <line>\n"
 msgstr ""
 
-#: breakpoint.c:9959
+#: breakpoint.c:10109
 msgid "Usage: stop in <function | address>\n"
 msgstr ""
 
-#: breakpoint.c:9991
+#: breakpoint.c:10141
 msgid "Usage: stop at <line>\n"
 msgstr ""
 
-#: breakpoint.c:10020
+#: breakpoint.c:10190
 msgid "May only run agent-printf on the target"
 msgstr ""
 
-#: breakpoint.c:10148
+#: breakpoint.c:10318
 #, possible-c-format
 msgid "Hardware assisted ranged breakpoint %d from %s to %s."
 msgstr ""
 
-#: breakpoint.c:10189 breakpoint.c:10269
+#: breakpoint.c:10360 breakpoint.c:10444
 msgid "Could not find location of the end of the range."
 msgstr ""
 
-#: breakpoint.c:10214
+#: breakpoint.c:10386
 msgid "This target does not support hardware ranged breakpoints."
 msgstr ""
 
-#: breakpoint.c:10225
+#: breakpoint.c:10397
 msgid "No address range specified."
 msgstr ""
 
-#: breakpoint.c:10235
+#: breakpoint.c:10408
 msgid "Too few arguments."
 msgstr ""
 
-#: breakpoint.c:10237
+#: breakpoint.c:10410
 msgid "Could not find location of the beginning of the range."
 msgstr ""
 
-#: breakpoint.c:10243 breakpoint.c:10274
+#: breakpoint.c:10416 breakpoint.c:10449
 msgid "Cannot create a ranged breakpoint with multiple locations."
 msgstr ""
 
-#: breakpoint.c:10282
+#: breakpoint.c:10455
 msgid "Invalid address range, end precedes start."
 msgstr ""
 
 #. Length overflowed.
-#: breakpoint.c:10287
+#: breakpoint.c:10460
 msgid "Address range too large."
 msgstr ""
 
-#: breakpoint.c:10678 breakpoint.c:10815 breakpoint.c:10871 breakpoint.c:10902
+#: breakpoint.c:10848 breakpoint.c:10985 breakpoint.c:11041 breakpoint.c:11072
 msgid "Invalid hardware watchpoint type."
 msgstr ""
 
-#: breakpoint.c:10709
+#: breakpoint.c:10879
 msgid "Invalid watchpoint type."
 msgstr ""
 
-#: breakpoint.c:10819
+#: breakpoint.c:10989
 msgid ""
 "\n"
 "Check the underlying instruction at PC for the memory\n"
 "address and value which triggered this watchpoint.\n"
 msgstr ""
 
-#: breakpoint.c:10994
+#: breakpoint.c:11164
 msgid "You can specify only one thread."
 msgstr ""
 
-#: breakpoint.c:11002
-#, possible-c-format
-msgid "Invalid thread ID specification %s."
-msgstr ""
-
-#: breakpoint.c:11016
+#: breakpoint.c:11183
 msgid "You can specify only one mask."
 msgstr ""
 
-#: breakpoint.c:11060
+#: breakpoint.c:11227
 #, possible-c-format
 msgid "Cannot watch constant value `%.*s'."
 msgstr ""
 
-#: breakpoint.c:11087
+#: breakpoint.c:11254
 msgid "This target does not support masked watchpoints."
 msgstr ""
 
-#: breakpoint.c:11089
+#: breakpoint.c:11256
 msgid "Invalid mask or memory region."
 msgstr ""
 
-#: breakpoint.c:11115
+#: breakpoint.c:11279
 msgid "Junk at end of command."
 msgstr ""
 
-#: breakpoint.c:11451
+#: breakpoint.c:11702
 msgid "Couldn't get information on specified line."
 msgstr ""
 
-#: breakpoint.c:11618
+#: breakpoint.c:11857
 msgid "unsupported or unknown fork kind; cannot catch it"
 msgstr ""
 
-#: breakpoint.c:11695 breakpoint.c:11702
+#: breakpoint.c:11935 breakpoint.c:11942
 msgid "Catch requires an event name."
 msgstr ""
 
-#: breakpoint.c:11761
+#: breakpoint.c:12000
 msgid "No source file specified."
 msgstr ""
 
-#: breakpoint.c:11859
+#: breakpoint.c:12098
 #, possible-c-format
 msgid "No breakpoint at %s."
 msgstr ""
 
-#: breakpoint.c:11861
+#: breakpoint.c:12100
 msgid "No breakpoint at this line."
 msgstr ""
 
-#: breakpoint.c:11884
+#: breakpoint.c:12123
 msgid "Deleted breakpoint "
 msgstr ""
 
-#: breakpoint.c:11886
+#: breakpoint.c:12125
 msgid "Deleted breakpoints "
 msgstr ""
 
@@ -3763,187 +3757,197 @@ msgstr ""
 #. Note that at this point, old_loc->owner is still
 #. valid, as delete_breakpoint frees the breakpoint
 #. only after calling us.
-#: breakpoint.c:12314
+#: breakpoint.c:12558
 #, possible-c-format
 msgid "warning: Error removing breakpoint %d\n"
 msgstr ""
 
-#: breakpoint.c:12546
+#: breakpoint.c:12795
 #, possible-c-format
 msgid " (%s) pending."
 msgstr ""
 
-#: breakpoint.c:12902
+#: breakpoint.c:12800
+#, possible-c-format
+msgid " (%s,%s) pending."
+msgstr ""
+
+#: breakpoint.c:12806
+#, possible-c-format
+msgid " (%s %s) pending."
+msgstr ""
+
+#: breakpoint.c:13169
 msgid "Temporary breakpoint"
 msgstr ""
 
-#: breakpoint.c:12904
+#: breakpoint.c:13171
 msgid "Breakpoint"
 msgstr ""
 
-#: breakpoint.c:12905 breakpoint.c:13243 breakpoint.c:13247 breakpoint.c:13251
+#: breakpoint.c:13172 breakpoint.c:13494 breakpoint.c:13498 breakpoint.c:13502
 #, possible-c-format
 msgid " %d"
 msgstr ""
 
-#: breakpoint.c:12907
+#: breakpoint.c:13174
 msgid " at gnu-indirect-function resolver"
 msgstr ""
 
-#: breakpoint.c:12910
+#: breakpoint.c:13177
 #, possible-c-format
 msgid "Hardware assisted breakpoint %d"
 msgstr ""
 
-#: breakpoint.c:12913
+#: breakpoint.c:13180
 #, possible-c-format
 msgid "Dprintf %d"
 msgstr ""
 
-#: breakpoint.c:12934
+#: breakpoint.c:13201
 #, possible-c-format
 msgid "unhandled breakpoint type %d"
 msgstr ""
 
 #. Not sure how we will get here.
 #. GDB should not stop for these breakpoints.
-#: breakpoint.c:13040
+#: breakpoint.c:13314
 msgid "Thread Event Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. By analogy with the thread event, GDB should not stop for these.
-#: breakpoint.c:13045
+#: breakpoint.c:13319
 msgid "Overlay Event Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13050
+#: breakpoint.c:13324
 msgid "Longjmp Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13055
+#: breakpoint.c:13329
 msgid "std::terminate Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13061
+#: breakpoint.c:13335
 msgid "Exception Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
-#: breakpoint.c:13196
+#: breakpoint.c:13447
 msgid "probe not found"
 msgstr ""
 
-#: breakpoint.c:13242
+#: breakpoint.c:13493
 msgid "Tracepoint"
 msgstr ""
 
-#: breakpoint.c:13246
+#: breakpoint.c:13497
 msgid "Fast tracepoint"
 msgstr ""
 
-#: breakpoint.c:13250
+#: breakpoint.c:13501
 msgid "Static tracepoint"
 msgstr ""
 
-#: breakpoint.c:13255 breakpoint.c:13274
+#: breakpoint.c:13506 breakpoint.c:13525
 #, possible-c-format
 msgid "unhandled tracepoint type %d"
 msgstr ""
 
-#: breakpoint.c:13516
+#: breakpoint.c:13773
 #, possible-c-format
 msgid "marker %s not found"
 msgstr ""
 
-#: breakpoint.c:13710
+#: breakpoint.c:13967
 msgid "Delete all breakpoints? "
 msgstr ""
 
-#: breakpoint.c:13816
+#: breakpoint.c:14081
 #, possible-c-format
 msgid "static tracepoint %d changed probed marker from %s to %s"
 msgstr ""
 
-#: breakpoint.c:13851
+#: breakpoint.c:14117
 #, possible-c-format
 msgid "marker for static tracepoint %d (%s) not found at previous line number"
 msgstr ""
 
-#: breakpoint.c:13944
+#: breakpoint.c:14252
 #, possible-c-format
 msgid "Could not reset ranged breakpoint %d: multiple locations found\n"
 msgstr ""
 
-#: breakpoint.c:13984
+#: breakpoint.c:14292
 #, possible-c-format
 msgid "failed to reevaluate condition for breakpoint %d: %s"
 msgstr ""
 
-#: breakpoint.c:14336
+#: breakpoint.c:14656
 #, possible-c-format
 msgid "Ignore count ignored for tracepoint %d."
 msgstr ""
 
-#: breakpoint.c:14345
+#: breakpoint.c:14665
 #, possible-c-format
 msgid "Will stop next time breakpoint %d is reached."
 msgstr ""
 
-#: breakpoint.c:14349
+#: breakpoint.c:14669
 #, possible-c-format
 msgid "Will ignore next crossing of breakpoint %d."
 msgstr ""
 
-#: breakpoint.c:14352
+#: breakpoint.c:14672
 #, possible-c-format
 msgid "Will ignore next %d crossings of breakpoint %d."
 msgstr ""
 
-#: breakpoint.c:14372
+#: breakpoint.c:14692
 msgid "a breakpoint number"
 msgstr ""
 
-#: breakpoint.c:14376
+#: breakpoint.c:14696
 #, possible-c-format
 msgid "bad breakpoint number: '%s'"
 msgstr ""
 
-#: breakpoint.c:14378
+#: breakpoint.c:14698
 msgid "Second argument (specified ignore-count) is missing."
 msgstr ""
 
-#: breakpoint.c:14401
+#: breakpoint.c:14720
 msgid "one or more breakpoint numbers"
 msgstr ""
 
-#: breakpoint.c:14414
+#: breakpoint.c:14732
 #, possible-c-format
 msgid "bad breakpoint number at or near '%s'"
 msgstr ""
 
-#: breakpoint.c:14426
+#: breakpoint.c:14744
 #, possible-c-format
 msgid "No breakpoint number %d.\n"
 msgstr ""
 
-#: breakpoint.c:14446 breakpoint.c:14455
+#: breakpoint.c:14764 breakpoint.c:14773
 #, possible-c-format
 msgid "Bad breakpoint number '%s'"
 msgstr ""
 
-#: breakpoint.c:14460 breakpoint.c:14467
+#: breakpoint.c:14778 breakpoint.c:14785
 #, possible-c-format
 msgid "Bad breakpoint location number '%s'"
 msgstr ""
 
-#: breakpoint.c:14599
+#: breakpoint.c:14917
 #, possible-c-format
 msgid "Cannot enable watchpoint %d: "
 msgstr ""
 
-#: breakpoint.c:14740
+#: breakpoint.c:15058
 msgid "hit count"
 msgstr ""
 
@@ -3951,75 +3955,77 @@ msgstr ""
 #. address.  Since there is no way to confirm that the address
 #. means the same thing as when the trace was started, warn the
 #. user.
-#: breakpoint.c:14981
+#: breakpoint.c:15350
 #, possible-c-format
 msgid "Uploaded tracepoint %d has no source location, using raw address"
 msgstr ""
 
-#: breakpoint.c:14990
+#: breakpoint.c:15359
 #, possible-c-format
 msgid "Uploaded tracepoint %d condition has no source form, ignoring it"
 msgstr ""
 
-#: breakpoint.c:15038
+#: breakpoint.c:15414
 #, possible-c-format
 msgid "Uploaded tracepoint %d actions have no source form, ignoring them"
 msgstr ""
 
-#: breakpoint.c:15112
+#: breakpoint.c:15488
 msgid "Delete all tracepoints? "
 msgstr ""
 
-#: breakpoint.c:15131
+#: breakpoint.c:15507
 #, possible-c-format
 msgid "Setting tracepoint %d's passcount to %d\n"
 msgstr ""
 
-#: breakpoint.c:15148
+#: breakpoint.c:15524
 msgid "passcount command requires an argument (count + optional TP num)"
 msgstr ""
 
-#: breakpoint.c:15246
+#: breakpoint.c:15620
 #, possible-c-format
 msgid "bad tracepoint number at or near '%s'\n"
 msgstr ""
 
-#: breakpoint.c:15249
+#: breakpoint.c:15623
 msgid "No previous tracepoint\n"
 msgstr ""
 
-#: breakpoint.c:15291
+#: breakpoint.c:15664
 msgid "Argument required (file name in which to save)"
 msgstr ""
 
-#: breakpoint.c:15317
+#: breakpoint.c:15690
 msgid "Nothing to save."
 msgstr ""
 
-#: breakpoint.c:15325
+#: breakpoint.c:15700
 #, possible-c-format
 msgid "Unable to open file '%s' for saving (%s)"
 msgstr ""
 
-#: breakpoint.c:15397
+#: breakpoint.c:15769
 #, possible-c-format
 msgid "Saved to file '%s'.\n"
 msgstr ""
 
-#: breakpoint.c:15490
+#: breakpoint.c:15882
 msgid "\"save\" must be followed by the name of a save subcommand.\n"
 msgstr ""
 
-#: breakpoint.c:15771
+#: breakpoint.c:16163
 msgid ""
 "Set ignore-count of breakpoint number N to COUNT.\n"
 "Usage is `ignore N COUNT'."
 msgstr ""
 
-#: breakpoint.c:15775
+#: breakpoint.c:16167
 msgid ""
-"Set commands to be executed when a breakpoint is hit.\n"
-"Give breakpoint number as argument after \"commands\".\n"
+"Set commands to be executed when the given breakpoints are hit.\n"
+"Give a space-separated breakpoint list as argument after \"commands\".\n"
+"A list element can be a breakpoint number (e.g. `5') or a range of numbers\n"
+"(e.g. `5-7').\n"
 "With no argument, the targeted breakpoint is the last one set.\n"
 "The commands themselves follow starting on the next line.\n"
 "Type a line containing \"end\" to indicate the end of them.\n"
@@ -4027,14 +4033,14 @@ msgid ""
 "then no output is printed when it is hit, except what the commands print."
 msgstr ""
 
-#: breakpoint.c:15784
+#: breakpoint.c:16178
 msgid ""
 "Specify breakpoint number N to break only if COND is true.\n"
 "Usage is `condition N COND', where N is an integer and COND is an\n"
 "expression to be evaluated whenever breakpoint N is reached."
 msgstr ""
 
-#: breakpoint.c:15790
+#: breakpoint.c:16184
 msgid ""
 "Set a temporary breakpoint.\n"
 "Like \"break\" except the breakpoint is only temporary,\n"
@@ -4043,7 +4049,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:15799
+#: breakpoint.c:16193
 msgid ""
 "Set a hardware assisted breakpoint.\n"
 "Like \"break\" except the breakpoint requires hardware support,\n"
@@ -4051,7 +4057,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:15807
+#: breakpoint.c:16201
 msgid ""
 "Set a temporary hardware assisted breakpoint.\n"
 "Like \"hbreak\" except the breakpoint is only temporary,\n"
@@ -4059,7 +4065,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:15815
+#: breakpoint.c:16209
 msgid ""
 "Enable some breakpoints.\n"
 "Give breakpoint numbers (separated by spaces) as arguments.\n"
@@ -4068,7 +4074,7 @@ msgid ""
 "With a subcommand you can enable temporarily."
 msgstr ""
 
-#: breakpoint.c:15825
+#: breakpoint.c:16219
 msgid ""
 "Enable some breakpoints.\n"
 "Give breakpoint numbers (separated by spaces) as arguments.\n"
@@ -4076,26 +4082,26 @@ msgid ""
 "May be abbreviated to simply \"enable\".\n"
 msgstr ""
 
-#: breakpoint.c:15832 breakpoint.c:15853
+#: breakpoint.c:16226 breakpoint.c:16247
 msgid ""
 "Enable breakpoints for one hit.  Give breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion, it becomes disabled."
 msgstr ""
 
-#: breakpoint.c:15837 breakpoint.c:15848
+#: breakpoint.c:16231 breakpoint.c:16242
 msgid ""
 "Enable breakpoints and delete when hit.  Give breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion, it is deleted."
 msgstr ""
 
-#: breakpoint.c:15842 breakpoint.c:15858
+#: breakpoint.c:16236 breakpoint.c:16252
 msgid ""
 "Enable breakpoints for COUNT hits.  Give count and then breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion,\n"
 "the count is decremented; when it reaches zero, the breakpoint is disabled."
 msgstr ""
 
-#: breakpoint.c:15864
+#: breakpoint.c:16258
 msgid ""
 "Disable some breakpoints.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4103,7 +4109,7 @@ msgid ""
 "A disabled breakpoint is not forgotten, but has no effect until re-enabled."
 msgstr ""
 
-#: breakpoint.c:15873
+#: breakpoint.c:16267
 msgid ""
 "Disable some breakpoints.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4112,7 +4118,7 @@ msgid ""
 "This command may be abbreviated \"disable\"."
 msgstr ""
 
-#: breakpoint.c:15881
+#: breakpoint.c:16275
 msgid ""
 "Delete some breakpoints or auto-display expressions.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4122,7 +4128,7 @@ msgid ""
 "The \"unset\" command is also an alias for \"delete\"."
 msgstr ""
 
-#: breakpoint.c:15892
+#: breakpoint.c:16286
 msgid ""
 "Delete some breakpoints or auto-display expressions.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4130,38 +4136,35 @@ msgid ""
 "This command may be abbreviated \"delete\"."
 msgstr ""
 
-#: breakpoint.c:15899
+#: breakpoint.c:16293
 msgid ""
-"Clear breakpoint at specified line or function.\n"
-"Argument may be line number, function name, or \"*\" and an address.\n"
-"If line number is specified, all breakpoints in that line are cleared.\n"
-"If function is specified, breakpoints at beginning of function are cleared.\n"
-"If an address is specified, breakpoints at that address are cleared.\n"
+"Clear breakpoint at specified location.\n"
+"Argument may be a linespec, explicit, or address location as described "
+"below.\n"
 "\n"
 "With no argument, clears all breakpoints in the line that the selected "
 "frame\n"
 "is executing in.\n"
 "\n"
-"See also the \"delete\" command which clears breakpoints by number."
 msgstr ""
 
-#: breakpoint.c:15912
-msgid "Set breakpoint at specified line or function.\n"
+#: breakpoint.c:16303
+msgid "Set breakpoint at specified location.\n"
 msgstr ""
 
-#: breakpoint.c:15924
+#: breakpoint.c:16315
 msgid "Break in function/address or break at a line in the current file."
 msgstr ""
 
-#: breakpoint.c:15928
+#: breakpoint.c:16319
 msgid "Break in function or address."
 msgstr ""
 
-#: breakpoint.c:15930
+#: breakpoint.c:16321
 msgid "Break at a line in the current file."
 msgstr ""
 
-#: breakpoint.c:15931
+#: breakpoint.c:16322
 msgid ""
 "Status of user-settable breakpoints, or breakpoint number NUMBER.\n"
 "The \"Type\" column indicates one of:\n"
@@ -4183,7 +4186,7 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:15948
+#: breakpoint.c:16339
 msgid ""
 "Status of specified breakpoints (all user-settable breakpoints if no "
 "argument).\n"
@@ -4206,7 +4209,7 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:15966
+#: breakpoint.c:16357
 msgid ""
 "Status of all breakpoints, or breakpoint number NUMBER.\n"
 "The \"Type\" column indicates one of:\n"
@@ -4232,43 +4235,43 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:15987
+#: breakpoint.c:16378
 msgid "Set catchpoints to catch events."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:15992
+#: breakpoint.c:16383
 msgid "Set temporary catchpoints to catch events."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:15997
+#: breakpoint.c:16388
 msgid "Catch calls to fork."
 msgstr ""
 
-#: breakpoint.c:16002
+#: breakpoint.c:16393
 msgid "Catch calls to vfork."
 msgstr ""
 
-#: breakpoint.c:16007
+#: breakpoint.c:16398
 msgid "Catch calls to exec."
 msgstr ""
 
-#: breakpoint.c:16012
+#: breakpoint.c:16403
 msgid ""
 "Catch loads of shared libraries.\n"
 "Usage: catch load [REGEX]\n"
 "If REGEX is given, only stop for libraries matching the regular expression."
 msgstr ""
 
-#: breakpoint.c:16019
+#: breakpoint.c:16410
 msgid ""
 "Catch unloads of shared libraries.\n"
 "Usage: catch unload [REGEX]\n"
 "If REGEX is given, only stop for libraries matching the regular expression."
 msgstr ""
 
-#: breakpoint.c:16027
+#: breakpoint.c:16418
 msgid ""
 "Set a watchpoint for an expression.\n"
 "Usage: watch [-l|-location] EXPRESSION\n"
@@ -4278,7 +4281,7 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16036
+#: breakpoint.c:16427
 msgid ""
 "Set a read watchpoint for an expression.\n"
 "Usage: rwatch [-l|-location] EXPRESSION\n"
@@ -4288,7 +4291,7 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16045
+#: breakpoint.c:16436
 msgid ""
 "Set a watchpoint for an expression.\n"
 "Usage: awatch [-l|-location] EXPRESSION\n"
@@ -4298,19 +4301,19 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16054
+#: breakpoint.c:16445
 msgid "Status of specified watchpoints (all watchpoints if no argument)."
 msgstr ""
 
-#: breakpoint.c:16060
+#: breakpoint.c:16451
 msgid "Set debugger's willingness to use watchpoint hardware."
 msgstr ""
 
-#: breakpoint.c:16061
+#: breakpoint.c:16452
 msgid "Show debugger's willingness to use watchpoint hardware."
 msgstr ""
 
-#: breakpoint.c:16062
+#: breakpoint.c:16453
 msgid ""
 "If zero, gdb will not use hardware for new watchpoints, even if\n"
 "such is available.  (However, any hardware watchpoints that were\n"
@@ -4319,31 +4322,29 @@ msgid ""
 msgstr ""
 
 #. Tracepoint manipulation commands.
-#: breakpoint.c:16075
+#: breakpoint.c:16466
 msgid ""
-"Set a tracepoint at specified line or function.\n"
+"Set a tracepoint at specified location.\n"
 "\n"
 msgstr ""
 
-#: breakpoint.c:16087
+#: breakpoint.c:16478
 msgid ""
-"Set a fast tracepoint at specified line or function.\n"
+"Set a fast tracepoint at specified location.\n"
 "\n"
 msgstr ""
 
-#: breakpoint.c:16094
+#: breakpoint.c:16485
 msgid ""
-"Set a static tracepoint at specified line, function or marker.\n"
+"Set a static tracepoint at location or marker.\n"
 "\n"
 "strace [LOCATION] [if CONDITION]\n"
-"LOCATION may be a line number, function name, \"*\" and an address,\n"
+"LOCATION may be a linespec, explicit, or address location (described "
+"below) \n"
 "or -m MARKER_ID.\n"
-"If a line number is specified, probe the marker at start of code\n"
-"for that line.  If a function is specified, probe the marker at start\n"
-"of code for that function.  If an address is specified, probe the marker\n"
-"at that exact address.  If a marker id is specified, probe the marker\n"
-"with that name.  With no LOCATION, uses current execution address of\n"
-"the selected stack frame.\n"
+"\n"
+"If a marker id is specified, probe the marker with that name.  With\n"
+"no LOCATION, uses current execution address of the selected stack frame.\n"
 "Static tracepoints accept an extra collect action -- ``collect $_sdata''.\n"
 "This collects arbitrary user data passed in the probe point call to the\n"
 "tracing library.  You can inspect it when analyzing the trace buffer,\n"
@@ -4351,43 +4352,37 @@ msgid ""
 "\n"
 "CONDITION is a boolean expression.\n"
 "\n"
-"Multiple tracepoints at one place are permitted, and useful if their\n"
-"conditions are different.\n"
-"\n"
-"Do \"help breakpoints\" for info on other commands dealing with "
-"breakpoints.\n"
-"Do \"help tracepoints\" for info on other tracepoint commands."
 msgstr ""
 
-#: breakpoint.c:16120
+#: breakpoint.c:16507
 msgid ""
 "Status of specified tracepoints (all tracepoints if no argument).\n"
 "Convenience variable \"$tpnum\" contains the number of the\n"
 "last tracepoint set."
 msgstr ""
 
-#: breakpoint.c:16127
+#: breakpoint.c:16514
 msgid ""
 "Delete specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means delete all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16134
+#: breakpoint.c:16521
 msgid ""
 "Disable specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means disable all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16141
+#: breakpoint.c:16528
 msgid ""
 "Enable specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means enable all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16148
+#: breakpoint.c:16535
 msgid ""
 "Set the passcount for a tracepoint.\n"
 "The trace will end when the tracepoint has been passed 'count' times.\n"
@@ -4395,12 +4390,12 @@ msgid ""
 "if TPNUM is omitted, passcount refers to the last tracepoint defined."
 msgstr ""
 
-#: breakpoint.c:16155
+#: breakpoint.c:16542
 msgid "Save breakpoint definitions as a script."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16159
+#: breakpoint.c:16546
 msgid ""
 "Save current breakpoint definitions as a script.\n"
 "This includes all types of breakpoints (breakpoints, watchpoints,\n"
@@ -4408,29 +4403,29 @@ msgid ""
 "session to restore them."
 msgstr ""
 
-#: breakpoint.c:16167
+#: breakpoint.c:16554
 msgid ""
 "Save current tracepoint definitions as a script.\n"
 "Use the 'source' command in another debug session to restore them."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16176 breakpoint.c:16182
+#: breakpoint.c:16563 breakpoint.c:16569
 msgid ""
 "Breakpoint specific settings\n"
 "Configure various breakpoint-specific variables such as\n"
 "pending breakpoint behavior"
 msgstr ""
 
-#: breakpoint.c:16190
+#: breakpoint.c:16577
 msgid "Set debugger's behavior regarding pending breakpoints."
 msgstr ""
 
-#: breakpoint.c:16191
+#: breakpoint.c:16578
 msgid "Show debugger's behavior regarding pending breakpoints."
 msgstr ""
 
-#: breakpoint.c:16192
+#: breakpoint.c:16579
 msgid ""
 "If on, an unrecognized breakpoint location will cause gdb to create a\n"
 "pending breakpoint.  If off, an unrecognized breakpoint location results in\n"
@@ -4438,15 +4433,15 @@ msgid ""
 "user-query to see if a pending breakpoint should be created."
 msgstr ""
 
-#: breakpoint.c:16205
+#: breakpoint.c:16592
 msgid "Set automatic usage of hardware breakpoints."
 msgstr ""
 
-#: breakpoint.c:16206
+#: breakpoint.c:16593
 msgid "Show automatic usage of hardware breakpoints."
 msgstr ""
 
-#: breakpoint.c:16207
+#: breakpoint.c:16594
 msgid ""
 "If set, the debugger will automatically use hardware breakpoints for\n"
 "breakpoints set with \"break\" but falling in read-only memory.  If not "
@@ -4454,15 +4449,15 @@ msgid ""
 "a warning will be emitted for such breakpoints."
 msgstr ""
 
-#: breakpoint.c:16217
+#: breakpoint.c:16604
 msgid "Set mode for inserting breakpoints."
 msgstr ""
 
-#: breakpoint.c:16218
+#: breakpoint.c:16605
 msgid "Show mode for inserting breakpoints."
 msgstr ""
 
-#: breakpoint.c:16219
+#: breakpoint.c:16606
 msgid ""
 "When this mode is on, breakpoints are inserted immediately as soon as\n"
 "they're created, kept inserted even when execution stops, and removed\n"
@@ -4471,15 +4466,15 @@ msgid ""
 "when execution stops."
 msgstr ""
 
-#: breakpoint.c:16232
+#: breakpoint.c:16619
 msgid "Set mode of breakpoint condition evaluation."
 msgstr ""
 
-#: breakpoint.c:16233
+#: breakpoint.c:16620
 msgid "Show mode of breakpoint condition evaluation."
 msgstr ""
 
-#: breakpoint.c:16234
+#: breakpoint.c:16621
 msgid ""
 "When this is set to \"host\", breakpoint conditions will be\n"
 "evaluated on the host's side by GDB.  When it is set to \"target\",\n"
@@ -4491,7 +4486,7 @@ msgid ""
 "be set to \"gdb\""
 msgstr ""
 
-#: breakpoint.c:16247
+#: breakpoint.c:16634
 msgid ""
 "Set a breakpoint for an address range.\n"
 "break-range START-LOCATION, END-LOCATION\n"
@@ -4509,24 +4504,23 @@ msgid ""
 "range (including START-LOCATION and END-LOCATION)."
 msgstr ""
 
-#: breakpoint.c:16263
+#: breakpoint.c:16650
 msgid ""
-"Set a dynamic printf at specified line or function.\n"
+"Set a dynamic printf at specified location.\n"
 "dprintf location,format string,arg1,arg2,...\n"
-"location may be a line number, function name, or \"*\" and an address.\n"
-"If a line number is specified, break at start of code for that line.\n"
-"If a function is specified, break at start of code for that function."
+"location may be a linespec, explicit, or address location.\n"
+"\n"
 msgstr ""
 
-#: breakpoint.c:16272
+#: breakpoint.c:16658
 msgid "Set the style of usage for dynamic printf."
 msgstr ""
 
-#: breakpoint.c:16273
+#: breakpoint.c:16659
 msgid "Show the style of usage for dynamic printf."
 msgstr ""
 
-#: breakpoint.c:16274
+#: breakpoint.c:16660
 msgid ""
 "This setting chooses how GDB will do a dynamic printf.\n"
 "If the value is \"gdb\", then the printing is done by GDB to its own\n"
@@ -4536,37 +4530,37 @@ msgid ""
 "output stream by setting dprintf-function and dprintf-channel."
 msgstr ""
 
-#: breakpoint.c:16286
+#: breakpoint.c:16672
 msgid "Set the function to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16287
+#: breakpoint.c:16673
 msgid "Show the function to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16294
+#: breakpoint.c:16680
 msgid "Set the channel to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16295
+#: breakpoint.c:16681
 msgid "Show the channel to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16301
+#: breakpoint.c:16687
 msgid "Set whether dprintf continues after GDB disconnects."
 msgstr ""
 
-#: breakpoint.c:16302
+#: breakpoint.c:16688
 msgid "Show whether dprintf continues after GDB disconnects."
 msgstr ""
 
-#: breakpoint.c:16303
+#: breakpoint.c:16689
 msgid ""
 "Use this to let dprintf commands continue to hit and produce output\n"
 "even if GDB disconnects or detaches from the target."
 msgstr ""
 
-#: breakpoint.c:16310
+#: breakpoint.c:16696
 msgid ""
 "agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n"
 "(target agent only) This is useful for formatted output in user-defined "
@@ -4623,217 +4617,249 @@ msgstr ""
 msgid "Set current context from pcb address"
 msgstr ""
 
-#: bsd-uthread.c:99
+#: bsd-uthread.c:103
 msgid "Bad magic"
 msgstr ""
 
-#: btrace.c:632
+#: btrace.c:1016
 #, possible-c-format
-msgid "Recorded trace may be corrupted around %s."
+msgid "Recorded trace may be corrupted at instruction %u (pc = %s)."
 msgstr ""
 
-#: btrace.c:673
+#: btrace.c:1062
 #, possible-c-format
-msgid "Recorded trace may be incomplete around %s."
+msgid "Recorded trace may be incomplete at instruction %u (pc = %s)."
 msgstr ""
 
-#: btrace.c:752 btrace.c:2400
+#: btrace.c:1148 btrace.c:2956
 #, possible-c-format
-msgid "Failed to synchronize onto the Intel(R) Processor Trace stream: %s."
+msgid "Failed to synchronize onto the Intel Processor Trace stream: %s."
 msgstr ""
 
-#: btrace.c:809
+#: btrace.c:1176
 #, possible-c-format
 msgid ""
-"Failed to decode Intel(R) Processor Trace near trace offset 0x%<PRIx64> near "
-"recorded PC 0x%<PRIx64>: %s."
+"Non-contiguous trace at instruction %u (offset = 0x%<PRIx64>, pc = 0x%"
+"<PRIx64>)."
 msgstr ""
 
-#: btrace.c:819
-msgid "The recorded execution trace may have gaps."
+#: btrace.c:1193
+#, possible-c-format
+msgid "Overflow at instruction %u (offset = 0x%<PRIx64>, pc = 0x%<PRIx64>)."
+msgstr ""
+
+#: btrace.c:1230
+#, possible-c-format
+msgid ""
+"Decode error (%d) at instruction %u (offset = 0x%<PRIx64>, pc = 0x%"
+"<PRIx64>): %s."
 msgstr ""
 
-#: btrace.c:909 btrace.c:926 btrace.c:2434
+#: btrace.c:1326 btrace.c:1343 btrace.c:2990
 #, possible-c-format
-msgid "Failed to configure the Intel(R) Processor Trace decoder: %s."
+msgid "Failed to configure the Intel Processor Trace decoder: %s."
 msgstr ""
 
-#: btrace.c:914 btrace.c:2439
-msgid "Failed to allocate the Intel(R) Processor Trace decoder."
+#: btrace.c:1331 btrace.c:2995
+msgid "Failed to allocate the Intel Processor Trace decoder."
 msgstr ""
 
-#: btrace.c:922
-msgid "Failed to configure the Intel(R) Processor Trace decoder."
+#: btrace.c:1339
+msgid "Failed to configure the Intel Processor Trace decoder."
 msgstr ""
 
-#: btrace.c:956
+#: btrace.c:1374
 msgid "Unexpected branch trace format."
 msgstr ""
 
-#: btrace.c:983 btrace.c:1196 common/btrace-common.c:72
-#: common/btrace-common.c:92 common/btrace-common.c:179
-#: nat/linux-btrace.c:1090 record-btrace.c:377
+#: btrace.c:1402 btrace.c:1682 common/btrace-common.c:92
+#: common/btrace-common.c:112 common/btrace-common.c:199
+#: nat/linux-btrace.c:1152 record-btrace.c:403
 msgid "Unkown branch trace format."
 msgstr ""
 
-#: btrace.c:1024 remote.c:12009 remote.c:12060 remote.c:12106
+#: btrace.c:1480
+msgid "GDB does not support Intel Processor Trace."
+msgstr ""
+
+#: btrace.c:1484 remote.c:13285 remote.c:13336 remote.c:13381
 msgid "Target does not support branch tracing."
 msgstr ""
 
-#: btrace.c:1137
+#: btrace.c:1623
 msgid "Error while trying to read delta trace.  Falling back to a full read."
 msgstr ""
 
-#: btrace.c:1298
+#: btrace.c:1737
+msgid "instruction overflow"
+msgstr ""
+
+#: btrace.c:1740
+msgid "unknown instruction"
+msgstr ""
+
+#: btrace.c:1752
+msgid "trace decode cancelled"
+msgstr ""
+
+#: btrace.c:1755
+msgid "disabled"
+msgstr ""
+
+#: btrace.c:1758
+msgid "overflow"
+msgstr ""
+
+#: btrace.c:1837
 msgid "Failed to read branch trace."
 msgstr ""
 
-#: btrace.c:1375
+#: btrace.c:1924
 #, possible-c-format
 msgid "Unsupported btrace version: \"%s\""
 msgstr ""
 
-#: btrace.c:1402
+#: btrace.c:1951
 msgid "Btrace format error."
 msgstr ""
 
-#: btrace.c:1428
+#: btrace.c:1974
 msgid "Bad raw data size."
 msgstr ""
 
-#: btrace.c:1442
+#: btrace.c:1990
 msgid "Bad hex encoding."
 msgstr ""
 
-#: btrace.c:1572
+#: btrace.c:2120
 msgid "btrace"
 msgstr ""
 
-#: btrace.c:1575
+#: btrace.c:2123
 msgid "Error parsing branch trace."
 msgstr ""
 
-#: btrace.c:1582
+#: btrace.c:2130
 msgid "Cannot process branch trace.  XML parsing is not supported."
 msgstr ""
 
-#: btrace.c:1667
+#: btrace.c:2215
 msgid "btrace-conf"
 msgstr ""
 
-#: btrace.c:1670
+#: btrace.c:2218
 msgid "Error parsing branch trace configuration."
 msgstr ""
 
-#: btrace.c:1674
+#: btrace.c:2222
 msgid "XML parsing is not supported."
 msgstr ""
 
-#: btrace.c:1728 btrace.c:1745 btrace.c:2027 btrace.c:2043 record-btrace.c:120
-#: record-btrace.c:1735
+#: btrace.c:2276 btrace.c:2293 btrace.c:2558 btrace.c:2574 record-btrace.c:125
+#: record-btrace.c:1961 record-btrace.c:2747
 msgid "No trace."
 msgstr ""
 
-#: btrace.c:2395
+#: btrace.c:2951
 #, possible-c-format
 msgid "Error at trace offset 0x%<PRIx64>: %s."
 msgstr ""
 
-#: btrace.c:2577 btrace.c:2599 record.c:395 record.c:415
+#: btrace.c:3133 btrace.c:3155 record.c:437 record.c:457
 #, possible-c-format
 msgid "Expected positive number, got: %s."
 msgstr ""
 
-#: btrace.c:2581
+#: btrace.c:3137
 msgid "Number too big."
 msgstr ""
 
-#: btrace.c:2610 record.c:365 record.c:377 record.c:426
+#: btrace.c:3166 record.c:407 record.c:419 record.c:468
 #, possible-c-format
 msgid "Junk after argument: %s."
 msgstr ""
 
-#: btrace.c:2624 btrace.c:2731 btrace.c:2753 btrace.c:2817 record-btrace.c:115
-#: record-btrace.c:394
+#: btrace.c:3180 btrace.c:3287 btrace.c:3309 btrace.c:3373 record-btrace.c:118
+#: record-btrace.c:420 record-btrace.c:1270
 msgid "No thread."
 msgstr ""
 
-#: btrace.c:2632
+#: btrace.c:3188
 msgid "No trace.\n"
 msgstr ""
 
-#: btrace.c:2656
+#: btrace.c:3212
 #, possible-c-format
 msgid "'%u' is out of range."
 msgstr ""
 
-#: btrace.c:2727 btrace.c:2749 btrace.c:2813 record-btrace.c:2360
-#: record-btrace.c:2382 record-btrace.c:2404
+#: btrace.c:3283 btrace.c:3305 btrace.c:3369 record-btrace.c:2894
+#: record-btrace.c:2916 record-btrace.c:2938
 msgid "Invalid argument."
 msgstr ""
 
-#: btrace.c:2823
+#: btrace.c:3379
 msgid "No btrace configuration."
 msgstr ""
 
-#: btrace.c:2825
+#: btrace.c:3381
 #, possible-c-format
 msgid "Format: %s.\n"
 msgstr ""
 
-#: btrace.c:2834 btrace.c:2850
+#: btrace.c:3390 btrace.c:3406
 #, possible-c-format
 msgid "Number of packets: %u.\n"
 msgstr ""
 
-#: btrace.c:2845
+#: btrace.c:3401
 #, possible-c-format
 msgid "Version: %u.%u.%u%s.\n"
 msgstr ""
 
-#: btrace.c:2866
+#: btrace.c:3422
 #, possible-c-format
 msgid "Skip PAD packets is %s.\n"
 msgstr ""
 
-#: btrace.c:2877
+#: btrace.c:3433
 msgid "Info about branch tracing data."
 msgstr ""
 
-#: btrace.c:2880
+#: btrace.c:3436
 msgid "Branch tracing maintenance commands."
 msgstr ""
 
-#: btrace.c:2884
+#: btrace.c:3440
 msgid "Set branch tracing specific variables."
 msgstr ""
 
-#: btrace.c:2889
-msgid "Set Intel(R) Processor Trace specific variables."
+#: btrace.c:3445
+msgid "Set Intel Processor Trace specific variables."
 msgstr ""
 
-#: btrace.c:2894
+#: btrace.c:3450
 msgid "Show branch tracing specific variables."
 msgstr ""
 
-#: btrace.c:2899
-msgid "Show Intel(R) Processor Trace specific variables."
+#: btrace.c:3455
+msgid "Show Intel Processor Trace specific variables."
 msgstr ""
 
-#: btrace.c:2905
+#: btrace.c:3461
 msgid "Set whether PAD packets should be skipped in the btrace packet history."
 msgstr ""
 
-#: btrace.c:2906
+#: btrace.c:3462
 msgid ""
 "Show whether PAD packets should be skipped in the btrace packet history."
 msgstr ""
 
-#: btrace.c:2907
+#: btrace.c:3463
 msgid "When enabled, PAD packets are ignored in the btrace packet history."
 msgstr ""
 
-#: btrace.c:2914
+#: btrace.c:3470
 msgid ""
 "Print the raw branch tracing data.\n"
 "With no argument, print ten more packets after the previous ten-line print.\n"
@@ -4845,13 +4871,13 @@ msgid ""
 "first.\n"
 msgstr ""
 
-#: btrace.c:2926
+#: btrace.c:3482
 msgid ""
 "Clears the branch tracing packet history.\n"
 "Discards the raw branch tracing data but not the execution history data.\n"
 msgstr ""
 
-#: btrace.c:2932
+#: btrace.c:3488
 msgid ""
 "Clears the branch tracing data.\n"
 "Discards the raw branch tracing data and the execution history data.\n"
@@ -4873,217 +4899,215 @@ msgstr ""
 msgid "\"%s\": separate debug info file has no debug info"
 msgstr ""
 
-#: buildsym.c:443
+#: buildsym.c:448
 #, possible-c-format
 msgid "block end address less than block start address in %s (patched it)"
 msgstr ""
 
-#: buildsym.c:450
+#: buildsym.c:455
 #, possible-c-format
 msgid "block end address %s less than block start address %s (patched it)"
 msgstr ""
 
-#: buildsym.c:483
+#: buildsym.c:488
 #, possible-c-format
 msgid "inner block not inside outer block in %s"
 msgstr ""
 
-#: buildsym.c:489
+#: buildsym.c:494
 #, possible-c-format
 msgid "inner block (%s-%s) not inside outer block (%s-%s)"
 msgstr ""
 
-#: buildsym.c:642
+#: buildsym.c:655
 #, possible-c-format
 msgid "block at %s out of order"
 msgstr ""
 
-#: buildsym.c:863 buildsym.c:877 common/print-utils.c:77
-#: common/print-utils.c:120 common/print-utils.c:288 dbxread.c:3051 exec.c:483
-#: exec.c:768 language.c:534 mdebugread.c:3668 monitor.c:311 monitor.c:341
-#: monitor.c:1309 printcmd.c:472 printcmd.c:827 printcmd.c:2445 psymtab.c:706
-#: psymtab.c:724 remote-mips.c:2719 target.c:676 target.c:760 target.c:787
-#: utils.c:1923 valprint.c:1042
+#: buildsym.c:874 buildsym.c:888 common/print-utils.c:77
+#: common/print-utils.c:120 common/print-utils.c:288 dbxread.c:2843 exec.c:545
+#: exec.c:830 language.c:548 mdebugread.c:3657 printcmd.c:477 printcmd.c:1049
+#: printcmd.c:2696 psymtab.c:696 psymtab.c:709 target.c:711 target.c:795
+#: target.c:836 utils.c:1876 valprint.c:1420
 msgid "failed internal consistency check"
 msgstr ""
 
-#: buildsym.c:1232
+#: buildsym.c:1247
 msgid "Context stack not empty in end_symtab"
 msgstr ""
 
-#: buildsym.c:1582
+#: buildsym.c:1598
 msgid "Context stack not empty in augment_type_symtab"
 msgstr ""
 
-#: buildsym.c:1586
+#: buildsym.c:1602
 msgid "Blocks in a type symtab"
 msgstr ""
 
-#: buildsym.c:1588
+#: buildsym.c:1604
 msgid "Macro in a type symtab"
 msgstr ""
 
-#: buildsym.c:1591
+#: buildsym.c:1607
 msgid "Line numbers recorded in a type symtab"
 msgstr ""
 
-#: c-exp.y:487
+#: c-exp.y:432
 #, possible-c-format
 msgid "%s is not an ObjC Class"
 msgstr ""
 
-#: c-exp.y:880
+#: c-exp.y:825
 msgid "Undefined string concatenation."
 msgstr ""
 
-#: c-exp.y:953 go-exp.y:590
+#: c-exp.y:899 go-exp.y:541
 #, possible-c-format
 msgid "@entry can be used only for function parameters, not for \"%s\""
 msgstr ""
 
-#: c-exp.y:968 m2-exp.y:602 p-exp.y:702
+#: c-exp.y:915 m2-exp.y:548 p-exp.y:649
 #, possible-c-format
 msgid "No symbol \"%s\" in specified context."
 msgstr ""
 
-#: c-exp.y:990 c-exp.y:1006 p-exp.y:717
+#: c-exp.y:936 c-exp.y:952 d-exp.y:504 p-exp.y:664
 #, possible-c-format
 msgid "`%s' is not defined as an aggregate type."
 msgstr ""
 
-#: c-exp.y:1025
+#: c-exp.y:971
 #, possible-c-format
 msgid "No type \"%s\" within class or namespace \"%s\"."
 msgstr ""
 
-#: c-exp.y:1056 c-exp.y:1108 d-exp.y:1300 f-exp.y:544 go-exp.y:641
-#: jv-exp.y:1446 m2-exp.y:658 p-exp.y:754 p-exp.y:824 printcmd.c:1254
-#: valops.c:2698
+#: c-exp.y:1002 c-exp.y:1051 d-exp.y:458 d-exp.y:498 f-exp.y:487 go-exp.y:589
+#: m2-exp.y:601 p-exp.y:701 p-exp.y:768 printcmd.c:1498 valops.c:2708
 #, possible-c-format
 msgid "No symbol \"%s\" in current context."
 msgstr ""
 
-#: c-exp.y:1733
+#: c-exp.y:1671
 msgid "parameter types following 'void'"
 msgstr ""
 
-#: c-exp.y:1738
+#: c-exp.y:1676
 msgid "'void' invalid as parameter type"
 msgstr ""
 
-#: c-exp.y:1917 d-exp.y:815 go-exp.y:840 p-exp.y:1000
+#: c-exp.y:1855 d-exp.y:825 go-exp.y:788 p-exp.y:944
 msgid "Numeric constant too large."
 msgstr ""
 
-#: c-exp.y:2019
+#: c-exp.y:1957
 msgid "\\x escape without a following hex digit"
 msgstr ""
 
-#: c-exp.y:2069
+#: c-exp.y:2007
 #, possible-c-format
 msgid "\\%c escape without a following hex digit"
 msgstr ""
 
-#: c-exp.y:2245 d-exp.y:926 go-exp.y:974 macroexp.c:408 p-exp.y:1404
+#: c-exp.y:2183 d-exp.y:936 go-exp.y:922 macroexp.c:408 p-exp.y:1348
 msgid "Unterminated string in expression."
 msgstr ""
 
-#: c-exp.y:2247 d-exp.y:928 go-exp.y:976 macroexp.c:351 p-exp.y:1235
+#: c-exp.y:2185 d-exp.y:938 go-exp.y:924 macroexp.c:351 p-exp.y:1179
 msgid "Unmatched single quote."
 msgstr ""
 
-#: c-exp.y:2645 d-exp.y:1457 f-exp.y:1126 go-exp.y:1199 m2-exp.y:975
-#: p-exp.y:1331
+#: c-exp.y:2585 d-exp.y:1180 f-exp.y:1069 go-exp.y:1147 m2-exp.y:918
+#: p-exp.y:1275
 #, possible-c-format
 msgid "Invalid number \"%s\"."
 msgstr ""
 
-#: c-exp.y:2718 d-exp.y:1509 go-exp.y:1251 p-exp.y:1222
+#: c-exp.y:2658 d-exp.y:1232 go-exp.y:1199 p-exp.y:1166
 msgid "Empty character constant."
 msgstr ""
 
-#: c-exp.y:2728 d-exp.y:1517 go-exp.y:1259 p-exp.y:1241
+#: c-exp.y:2668 d-exp.y:1240 go-exp.y:1207 p-exp.y:1185
 msgid "Invalid character constant."
 msgstr ""
 
 #. We must have come across a bad character (e.g. ';').
-#: c-exp.y:2737 f-exp.y:1160 go-exp.y:1268 m2-exp.y:984 p-exp.y:1416
+#: c-exp.y:2677 f-exp.y:1103 go-exp.y:1216 m2-exp.y:927 p-exp.y:1360
 #, possible-c-format
 msgid "Invalid character '%c' in expression."
 msgstr ""
 
-#: c-exp.y:3051
+#: c-exp.y:2995
 msgid "not reached"
 msgstr ""
 
-#: c-exp.y:3324 d-exp.y:1634 f-exp.y:1283 go-exp.y:1646 m2-exp.y:1115
-#: p-exp.y:1772
+#: c-exp.y:3269 d-exp.y:1655 f-exp.y:1227 go-exp.y:1596 m2-exp.y:1058
+#: p-exp.y:1722
 #, possible-c-format
 msgid "A %s in expression, near `%s'."
 msgstr ""
 
-#: charset.c:225
+#: charset.c:237
 #, possible-c-format
 msgid "The host character set is \"auto; currently %s\".\n"
 msgstr ""
 
-#: charset.c:228
+#: charset.c:240
 #, possible-c-format
 msgid "The host character set is \"%s\".\n"
 msgstr ""
 
-#: charset.c:238
+#: charset.c:250
 #, possible-c-format
 msgid "The target character set is \"auto; currently %s\".\n"
 msgstr ""
 
-#: charset.c:242
+#: charset.c:254
 #, possible-c-format
 msgid "The target character set is \"%s\".\n"
 msgstr ""
 
-#: charset.c:255
+#: charset.c:267
 #, possible-c-format
 msgid "The target wide character set is \"auto; currently %s\".\n"
 msgstr ""
 
-#: charset.c:259
+#: charset.c:271
 #, possible-c-format
 msgid "The target wide character set is \"%s\".\n"
 msgstr ""
 
-#: charset.c:334 charset.c:340
+#: charset.c:352 charset.c:358
 #, possible-c-format
 msgid "Cannot convert between character sets `%s' and `%s'"
 msgstr ""
 
-#: charset.c:496 charset.c:603
+#: charset.c:514 charset.c:602
 msgid "Converting character sets"
 msgstr ""
 
-#: charset.c:532
+#: charset.c:550
 #, possible-c-format
 msgid "Could not convert character to `%s' character set"
 msgstr ""
 
-#: charset.c:563 charset.c:705
+#: charset.c:581 charset.c:678
 msgid "Internal error while converting character sets"
 msgstr ""
 
 #. No valid charset found, generate error here.
-#: charset.c:1005
+#: charset.c:978
 msgid "Unable to find a vaild charset for string conversions"
 msgstr ""
 
-#: charset.c:1048
+#: charset.c:1021
 msgid "Set the host and target character sets."
 msgstr ""
 
-#: charset.c:1049
+#: charset.c:1022
 msgid "Show the host and target character sets."
 msgstr ""
 
-#: charset.c:1050
+#: charset.c:1023
 msgid ""
 "The `host character set' is the one used by the system GDB is running on.\n"
 "The `target character set' is the one used by the program being debugged.\n"
@@ -5092,15 +5116,15 @@ msgid ""
 "To see a list of the character sets GDB supports, type `set charset <TAB>'."
 msgstr ""
 
-#: charset.c:1064
+#: charset.c:1037
 msgid "Set the host character set."
 msgstr ""
 
-#: charset.c:1065
+#: charset.c:1038
 msgid "Show the host character set."
 msgstr ""
 
-#: charset.c:1066
+#: charset.c:1039
 msgid ""
 "The `host character set' is the one used by the system GDB is running on.\n"
 "You may only use supersets of ASCII for your host character set; GDB does\n"
@@ -5109,15 +5133,15 @@ msgid ""
 "<TAB>'."
 msgstr ""
 
-#: charset.c:1076
+#: charset.c:1049
 msgid "Set the target character set."
 msgstr ""
 
-#: charset.c:1077
+#: charset.c:1050
 msgid "Show the target character set."
 msgstr ""
 
-#: charset.c:1078
+#: charset.c:1051
 msgid ""
 "The `target character set' is the one used by the program being debugged.\n"
 "GDB translates characters and strings between the host and target\n"
@@ -5126,15 +5150,15 @@ msgid ""
 "charset'<TAB>"
 msgstr ""
 
-#: charset.c:1089
+#: charset.c:1062
 msgid "Set the target wide character set."
 msgstr ""
 
-#: charset.c:1090
+#: charset.c:1063
 msgid "Show the target wide character set."
 msgstr ""
 
-#: charset.c:1091
+#: charset.c:1064
 msgid ""
 "The `target wide character set' is the one used by the program being "
 "debugged.\n"
@@ -5145,37 +5169,37 @@ msgid ""
 "`set target-wide-charset'<TAB>"
 msgstr ""
 
-#: c-lang.c:66 c-lang.c:613
+#: c-lang.c:65 c-lang.c:609
 msgid "unhandled c_string_type"
 msgstr ""
 
-#: c-lang.c:366
+#: c-lang.c:362
 #, possible-c-format
 msgid "Trying to read string with inappropriate type `%s'."
 msgstr ""
 
-#: c-lang.c:370
+#: c-lang.c:366
 msgid "Trying to read string with inappropriate type."
 msgstr ""
 
-#: c-lang.c:471
+#: c-lang.c:467
 msgid "Malformed escape sequence"
 msgstr ""
 
-#: c-lang.c:498
+#: c-lang.c:494
 msgid "\\x used with no following hex digits."
 msgstr ""
 
-#: c-lang.c:520
+#: c-lang.c:516
 msgid "\\u used with no following hex digits"
 msgstr ""
 
-#: c-lang.c:672
+#: c-lang.c:668
 msgid "Could not convert character constant to target character set"
 msgstr ""
 
 #. To avoid memory corruption.
-#: c-lang.c:698 eval.c:924
+#: c-lang.c:694 eval.c:905
 msgid "Too many array elements"
 msgstr ""
 
@@ -5183,240 +5207,240 @@ msgstr ""
 msgid "Missing filename."
 msgstr ""
 
-#: cli/cli-dump.c:113 cli/cli-dump.c:133
+#: cli/cli-dump.c:111 cli/cli-dump.c:129
 #, possible-c-format
 msgid "Failed to open %s: %s."
 msgstr ""
 
-#: cli/cli-dump.c:118
+#: cli/cli-dump.c:115
 #, possible-c-format
 msgid "'%s' is not a recognized file format."
 msgstr ""
 
-#: cli/cli-dump.c:137
+#: cli/cli-dump.c:132
 #, possible-c-format
-msgid "bfd_openw_with_cleanup: %s."
+msgid "bfd_openw_or_error: %s."
 msgstr ""
 
 #. Append to existing file.
 #. FIXME -- doesn't work...
-#: cli/cli-dump.c:141
+#: cli/cli-dump.c:136
 msgid "bfd_openw does not work with append."
 msgstr ""
 
-#: cli/cli-dump.c:144
+#: cli/cli-dump.c:139
 #, possible-c-format
-msgid "bfd_openw_with_cleanup: unknown mode %s."
+msgid "bfd_openw_or_error: unknown mode %s."
 msgstr ""
 
-#: cli/cli-dump.c:161
+#: cli/cli-dump.c:156
 msgid ""
 "\"dump\" must be followed by a subcommand.\n"
 "\n"
 msgstr ""
 
-#: cli/cli-dump.c:168
+#: cli/cli-dump.c:163
 msgid ""
 "\"append\" must be followed by a subcommand.\n"
 "\n"
 msgstr ""
 
-#: cli/cli-dump.c:203
+#: cli/cli-dump.c:197
 #, possible-c-format
 msgid "writing dump file '%s' (%s)"
 msgstr ""
 
-#: cli/cli-dump.c:224
+#: cli/cli-dump.c:217
 msgid "Missing start address."
 msgstr ""
 
-#: cli/cli-dump.c:229
+#: cli/cli-dump.c:222
 msgid "Missing stop address."
 msgstr ""
 
-#: cli/cli-dump.c:235
+#: cli/cli-dump.c:228
 msgid "Invalid memory address range (start >= end)."
 msgstr ""
 
-#: cli/cli-dump.c:275
+#: cli/cli-dump.c:267
 #, possible-c-format
 msgid "No value to %s."
 msgstr ""
 
-#: cli/cli-dump.c:278
+#: cli/cli-dump.c:270
 msgid "Invalid expression."
 msgstr ""
 
-#: cli/cli-dump.c:297
+#: cli/cli-dump.c:289
 msgid "value is not an lval: address assumed to be zero"
 msgstr ""
 
 #. No, no useable data in this section.
-#: cli/cli-dump.c:469
+#: cli/cli-dump.c:461
 #, possible-c-format
 msgid "skipping section %s...\n"
 msgstr ""
 
-#: cli/cli-dump.c:488
+#: cli/cli-dump.c:480
 #, possible-c-format
 msgid "Failed to read bfd file %s: '%s'."
 msgstr ""
 
-#: cli/cli-dump.c:511 cli/cli-dump.c:564
+#: cli/cli-dump.c:503 cli/cli-dump.c:555
 #, possible-c-format
 msgid "restore: memory write failed (%s)."
 msgstr ""
 
-#: cli/cli-dump.c:535
+#: cli/cli-dump.c:526
 #, possible-c-format
 msgid "Start address is greater than length of binary file %s."
 msgstr ""
 
-#: cli/cli-dump.c:611
+#: cli/cli-dump.c:603
 msgid "Start must be less than end."
 msgstr ""
 
-#: cli/cli-dump.c:640
+#: cli/cli-dump.c:631
 msgid "\"dump srec\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:647
+#: cli/cli-dump.c:638
 msgid "\"dump ihex\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:654
+#: cli/cli-dump.c:645
 msgid "\"dump verilog\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:661
+#: cli/cli-dump.c:652
 msgid "\"dump tekhex\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:668
+#: cli/cli-dump.c:659
 msgid "\"dump binary\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:675
+#: cli/cli-dump.c:666
 msgid "\"append binary\" must be followed by a subcommand.\n"
 msgstr ""
 
-#: cli/cli-dump.c:688
+#: cli/cli-dump.c:679
 msgid "Dump target code/data to a local file."
 msgstr ""
 
-#: cli/cli-dump.c:693
+#: cli/cli-dump.c:684
 msgid "Append target code/data to a local file."
 msgstr ""
 
-#: cli/cli-dump.c:709
+#: cli/cli-dump.c:700
 msgid "Write target code/data to an srec file."
 msgstr ""
 
-#: cli/cli-dump.c:715
+#: cli/cli-dump.c:706
 msgid "Write target code/data to an intel hex file."
 msgstr ""
 
-#: cli/cli-dump.c:721
+#: cli/cli-dump.c:712
 msgid "Write target code/data to a verilog hex file."
 msgstr ""
 
-#: cli/cli-dump.c:727
+#: cli/cli-dump.c:718
 msgid "Write target code/data to a tekhex file."
 msgstr ""
 
-#: cli/cli-dump.c:733
+#: cli/cli-dump.c:724
 msgid "Write target code/data to a raw binary file."
 msgstr ""
 
-#: cli/cli-dump.c:739
+#: cli/cli-dump.c:730
 msgid "Append target code/data to a raw binary file."
 msgstr ""
 
-#: cli/cli-dump.c:744
+#: cli/cli-dump.c:735
 msgid ""
 "Write contents of memory to an srec file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory\n"
 "within the range [START .. STOP) to the specified FILE in srec format."
 msgstr ""
 
-#: cli/cli-dump.c:750
+#: cli/cli-dump.c:741
 msgid ""
 "Write the value of an expression to an srec file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in srec format."
 msgstr ""
 
-#: cli/cli-dump.c:756
+#: cli/cli-dump.c:747
 msgid ""
 "Write contents of memory to an ihex file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory within\n"
 "the range [START .. STOP) to the specified FILE in intel hex format."
 msgstr ""
 
-#: cli/cli-dump.c:762
+#: cli/cli-dump.c:753
 msgid ""
 "Write the value of an expression to an ihex file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in intel hex format."
 msgstr ""
 
-#: cli/cli-dump.c:768
+#: cli/cli-dump.c:759
 msgid ""
 "Write contents of memory to a verilog hex file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory within\n"
 "the range [START .. STOP) to the specified FILE in verilog hex format."
 msgstr ""
 
-#: cli/cli-dump.c:774
+#: cli/cli-dump.c:765
 msgid ""
 "Write the value of an expression to a verilog hex file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in verilog hex format."
 msgstr ""
 
-#: cli/cli-dump.c:780
+#: cli/cli-dump.c:771
 msgid ""
 "Write contents of memory to a tekhex file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory\n"
 "within the range [START .. STOP) to the specified FILE in tekhex format."
 msgstr ""
 
-#: cli/cli-dump.c:786
+#: cli/cli-dump.c:777
 msgid ""
 "Write the value of an expression to a tekhex file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in tekhex format."
 msgstr ""
 
-#: cli/cli-dump.c:792
+#: cli/cli-dump.c:783
 msgid ""
 "Write contents of memory to a raw binary file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory\n"
 "within the range [START .. STOP) to the specified FILE in binary format."
 msgstr ""
 
-#: cli/cli-dump.c:798
+#: cli/cli-dump.c:789
 msgid ""
 "Write the value of an expression to a raw binary file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in raw target ordered bytes."
 msgstr ""
 
-#: cli/cli-dump.c:804
+#: cli/cli-dump.c:795
 msgid ""
 "Append contents of memory to a raw binary file.\n"
 "Arguments are FILE START STOP.  Writes the contents of memory within the\n"
 "range [START .. STOP) to the specified FILE in raw target ordered bytes."
 msgstr ""
 
-#: cli/cli-dump.c:810
+#: cli/cli-dump.c:801
 msgid ""
 "Append the value of an expression to a raw binary file.\n"
 "Arguments are FILE EXPRESSION.  Writes the value of EXPRESSION\n"
 "to the specified FILE in raw target ordered bytes."
 msgstr ""
 
-#: cli/cli-dump.c:816
+#: cli/cli-dump.c:807
 msgid ""
 "Restore the contents of FILE to target memory.\n"
 "Arguments are FILE OFFSET START END where all except FILE are optional.\n"
@@ -5473,236 +5497,245 @@ msgstr ""
 msgid "gdb internal error: bad var_type in do_setshow_command"
 msgstr ""
 
-#: cli/cli-setshow.c:613
+#: cli/cli-setshow.c:610
 msgid "do_show_command: invalid var_auto_boolean"
 msgstr ""
 
-#: cli/cli-setshow.c:643
+#: cli/cli-setshow.c:640
 msgid "gdb internal error: bad var_type in do_show_command"
 msgstr ""
 
-#: cli/cli-decode.c:1452
+#: cli/cli-decode.c:1459
 #, possible-c-format
 msgid "Undefined %scommand: \"%s\".  Try \"help%s%.*s\"."
 msgstr ""
 
-#: cli/cli-decode.c:1485
+#: cli/cli-decode.c:1492
 #, possible-c-format
 msgid "Lack of needed %scommand"
 msgstr ""
 
-#: cli/cli-decode.c:1550
+#: cli/cli-decode.c:1557
 #, possible-c-format
 msgid "Ambiguous %scommand \"%s\": %s."
 msgstr ""
 
-#: cli/cli-decode.c:1558
+#: cli/cli-decode.c:1565
 msgid "Argument must be preceded by space."
 msgstr ""
 
-#: cli/cli-decode.c:1888
+#: cli/cli-decode.c:1893
 msgid "Invalid command"
 msgstr ""
 
-#: cli/cli-cmds.c:207
+#: cli/cli-cmds.c:209
 #, possible-c-format
 msgid "Argument required (%s)."
 msgstr ""
 
-#: cli/cli-cmds.c:217
+#: cli/cli-cmds.c:219
 msgid "\"info\" must be followed by the name of an info command.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:257
+#: cli/cli-cmds.c:259
 msgid "max-completions is zero, completion is disabled.\n"
 msgstr ""
 
 #. ARG_PREFIX and POINT are included in the output so that emacs
 #. will include the message in the output.
-#: cli/cli-cmds.c:314
+#: cli/cli-cmds.c:316
 #, possible-c-format
 msgid "%s%s %s\n"
 msgstr ""
 
-#: cli/cli-cmds.c:346 cli/cli-script.c:1572 infcmd.c:1191 infcmd.c:1208
-#: infcmd.c:1308 infcmd.c:1893 infcmd.c:2418 symfile.c:1169 symfile.c:1339
-#: symfile.c:2370 symfile.c:2452 tracepoint.c:2286 tracepoint.c:2292
+#: cli/cli-cmds.c:359 cli/cli-script.c:1525 infcmd.c:1229 infcmd.c:1246
+#: infcmd.c:1348 infcmd.c:2050 infcmd.c:2578 symfile.c:1163 symfile.c:1332
+#: symfile.c:2358 symfile.c:2438 tracepoint.c:2161 tracepoint.c:2167
 msgid "Not confirmed."
 msgstr ""
 
-#: cli/cli-cmds.c:357
+#: cli/cli-cmds.c:370
 #, possible-c-format
 msgid "The \"pwd\" command does not take an argument: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:359
+#: cli/cli-cmds.c:372
 #, possible-c-format
 msgid "Error finding name of working directory: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:363
+#: cli/cli-cmds.c:376
 #, possible-c-format
 msgid ""
 "Working directory %s\n"
 " (canonically %s).\n"
 msgstr ""
 
-#: cli/cli-cmds.c:366
+#: cli/cli-cmds.c:379
 #, possible-c-format
 msgid "Working directory %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:481
+#: cli/cli-cmds.c:494
 #, possible-c-format
 msgid "Script filename extension recognition is \"%s\".\n"
 msgstr ""
 
-#: cli/cli-cmds.c:587
+#: cli/cli-cmds.c:606
 msgid "source command requires file name of file to source."
 msgstr ""
 
-#: cli/cli-cmds.c:775
+#: cli/cli-cmds.c:794
 msgid "Fork failed"
 msgstr ""
 
-#: cli/cli-cmds.c:802
+#: cli/cli-cmds.c:820
 msgid "No default source file yet."
 msgstr ""
 
-#: cli/cli-cmds.c:829 cli/cli-cmds.c:1007
+#: cli/cli-cmds.c:854 cli/cli-cmds.c:1054
 msgid "Junk at end of line specification."
 msgstr ""
 
-#: cli/cli-cmds.c:840 cli/cli-cmds.c:1025
+#: cli/cli-cmds.c:865 cli/cli-cmds.c:1072
 #, possible-c-format
 msgid "No source file for address %s."
 msgstr ""
 
-#: cli/cli-cmds.c:862 cli/cli-cmds.c:1046
+#: cli/cli-cmds.c:887 cli/cli-cmds.c:1093
 #, possible-c-format
 msgid "No line number known for %s."
 msgstr ""
 
-#: cli/cli-cmds.c:1011
+#: cli/cli-cmds.c:957
+#, possible-c-format
+msgid "Already at the start of %s."
+msgstr ""
+
+#: cli/cli-cmds.c:1058
 msgid "Specified start and end are in different files."
 msgstr ""
 
-#: cli/cli-cmds.c:1013
+#: cli/cli-cmds.c:1060
 msgid "Two empty args do not say what lines to list."
 msgstr ""
 
-#: cli/cli-cmds.c:1055 cli/cli-cmds.c:1061
+#: cli/cli-cmds.c:1102 cli/cli-cmds.c:1108
 msgid "No default source file yet.  Do \"help list\"."
 msgstr ""
 
-#: cli/cli-cmds.c:1127 dwarf2loc.c:2055 python/py-symbol.c:387 stack.c:2126
-#: stack.c:2208 valops.c:1298
+#: cli/cli-cmds.c:1175 dwarf2loc.c:2234 dwarf2loc.c:2269
+#: python/py-symbol.c:393 stack.c:2147 stack.c:2229 valops.c:1310
 msgid "No frame selected."
 msgstr ""
 
-#: cli/cli-cmds.c:1131
+#: cli/cli-cmds.c:1179
 msgid "No function contains program counter for selected frame."
 msgstr ""
 
-#: cli/cli-cmds.c:1177 record.c:448 record.c:590
+#: cli/cli-cmds.c:1235 record.c:490 record.c:633
 msgid "Missing modifier."
 msgstr ""
 
-#: cli/cli-cmds.c:1190
+#: cli/cli-cmds.c:1251
 msgid "Invalid disassembly modifier."
 msgstr ""
 
-#: cli/cli-cmds.c:1211
+#: cli/cli-cmds.c:1260
+msgid "Cannot specify both /m and /s."
+msgstr ""
+
+#: cli/cli-cmds.c:1276
 msgid "No function contains specified address."
 msgstr ""
 
-#: cli/cli-cmds.c:1270
+#: cli/cli-cmds.c:1335
 msgid "Not a user command."
 msgstr ""
 
-#: cli/cli-cmds.c:1293
+#: cli/cli-cmds.c:1358
 msgid "REGEXP string is empty"
 msgstr ""
 
-#: cli/cli-cmds.c:1309
+#: cli/cli-cmds.c:1374
 #, possible-c-format
 msgid "Error in regular expression: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:1371
+#: cli/cli-cmds.c:1430
 msgid "Usage: alias [-a] [--] ALIAS = COMMAND"
 msgstr ""
 
-#: cli/cli-cmds.c:1410
+#: cli/cli-cmds.c:1482
 #, possible-c-format
 msgid "Invalid command name: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:1412
+#: cli/cli-cmds.c:1484
 #, possible-c-format
 msgid "Invalid command element name: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:1426
+#: cli/cli-cmds.c:1497
 #, possible-c-format
 msgid "Invalid command to alias to: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:1433
+#: cli/cli-cmds.c:1503
 #, possible-c-format
 msgid "Alias already exists: %s"
 msgstr ""
 
-#: cli/cli-cmds.c:1457
+#: cli/cli-cmds.c:1526
 msgid "Mismatched command length between ALIAS and COMMAND."
 msgstr ""
 
-#: cli/cli-cmds.c:1477
+#: cli/cli-cmds.c:1544
 msgid "ALIAS and COMMAND prefixes do not match."
 msgstr ""
 
-#: cli/cli-cmds.c:1499
+#: cli/cli-cmds.c:1566
 #, possible-c-format
 msgid "file: \"%s\", line number: %d\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1589
+#: cli/cli-cmds.c:1656
 msgid "\"set debug\" must be followed by the name of a debug subcommand.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1613
+#: cli/cli-cmds.c:1680
 #, possible-c-format
 msgid "Verbose printing of informational messages is %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1616
+#: cli/cli-cmds.c:1683
 #, possible-c-format
 msgid "Verbosity is %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1623
+#: cli/cli-cmds.c:1690
 #, possible-c-format
 msgid "History expansion on command input is %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1631
+#: cli/cli-cmds.c:1698
 #, possible-c-format
 msgid "Debugging of remote protocol is %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1640
+#: cli/cli-cmds.c:1707
 #, possible-c-format
 msgid "Timeout limit to wait for target to respond is %s.\n"
 msgstr ""
 
-#: cli/cli-cmds.c:1649
+#: cli/cli-cmds.c:1716
 #, possible-c-format
 msgid "The max call depth for user-defined commands is %s.\n"
 msgstr ""
 
 #. Define the classes of commands.
 #. They will appear in the help list in alphabetical order.
-#: cli/cli-cmds.c:1665
+#: cli/cli-cmds.c:1732
 msgid ""
 "Maintenance commands.\n"
 "Some gdb commands are provided just for use by gdb maintainers.\n"
@@ -5710,42 +5743,42 @@ msgid ""
 "well documented as user commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1671
+#: cli/cli-cmds.c:1738
 msgid "Obscure features."
 msgstr ""
 
-#: cli/cli-cmds.c:1673
+#: cli/cli-cmds.c:1740
 msgid "Aliases of other commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1674
+#: cli/cli-cmds.c:1741
 msgid ""
 "User-defined commands.\n"
 "The commands in this class are those defined by the user.\n"
 "Use the \"define\" command to define a command."
 msgstr ""
 
-#: cli/cli-cmds.c:1678
+#: cli/cli-cmds.c:1745
 msgid "Support facilities."
 msgstr ""
 
-#: cli/cli-cmds.c:1680
+#: cli/cli-cmds.c:1747
 msgid "Status inquiries."
 msgstr ""
 
-#: cli/cli-cmds.c:1681
+#: cli/cli-cmds.c:1748
 msgid "Specifying and examining files."
 msgstr ""
 
-#: cli/cli-cmds.c:1684
+#: cli/cli-cmds.c:1751
 msgid "Making program stop at certain points."
 msgstr ""
 
-#: cli/cli-cmds.c:1685
+#: cli/cli-cmds.c:1752
 msgid "Examining data."
 msgstr ""
 
-#: cli/cli-cmds.c:1686
+#: cli/cli-cmds.c:1753
 msgid ""
 "Examining the stack.\n"
 "The stack is made up of stack frames.  Gdb assigns numbers to stack frames\n"
@@ -5757,23 +5790,23 @@ msgid ""
 "The commands below can be used to select other frames by number or address."
 msgstr ""
 
-#: cli/cli-cmds.c:1695
+#: cli/cli-cmds.c:1762
 msgid "Running the program."
 msgstr ""
 
 #. Define general commands.
-#: cli/cli-cmds.c:1699
+#: cli/cli-cmds.c:1766
 msgid "Print working directory.  This is used for your program as well."
 msgstr ""
 
-#: cli/cli-cmds.c:1702
+#: cli/cli-cmds.c:1769
 msgid ""
 "Set working directory to DIR for debugger and program being debugged.\n"
 "The change does not take effect for the program being debugged\n"
 "until the next time it is started."
 msgstr ""
 
-#: cli/cli-cmds.c:1708
+#: cli/cli-cmds.c:1775
 msgid ""
 "Print a constant string.  Give string as argument.\n"
 "C escape sequences may be used in the argument.\n"
@@ -5784,15 +5817,15 @@ msgid ""
 "to be printed or after trailing whitespace."
 msgstr ""
 
-#: cli/cli-cmds.c:1718
+#: cli/cli-cmds.c:1785
 msgid "Set mode for script filename extension recognition."
 msgstr ""
 
-#: cli/cli-cmds.c:1719
+#: cli/cli-cmds.c:1786
 msgid "Show mode for script filename extension recognition."
 msgstr ""
 
-#: cli/cli-cmds.c:1720
+#: cli/cli-cmds.c:1787
 msgid ""
 "off  == no filename extension recognition (all sourced files are GDB "
 "scripts)\n"
@@ -5802,7 +5835,7 @@ msgid ""
 "supported"
 msgstr ""
 
-#: cli/cli-cmds.c:1730
+#: cli/cli-cmds.c:1797
 msgid ""
 "Exit gdb.\n"
 "Usage: quit [EXPR]\n"
@@ -5810,113 +5843,113 @@ msgid ""
 "used as GDB's exit code.  The default is zero."
 msgstr ""
 
-#: cli/cli-cmds.c:1736
+#: cli/cli-cmds.c:1803
 msgid "Print list of commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1741
+#: cli/cli-cmds.c:1808
 msgid "Set verbosity."
 msgstr ""
 
-#: cli/cli-cmds.c:1742
+#: cli/cli-cmds.c:1809
 msgid "Show verbosity."
 msgstr ""
 
-#: cli/cli-cmds.c:1749
+#: cli/cli-cmds.c:1816
 msgid "Generic command for setting command history parameters."
 msgstr ""
 
-#: cli/cli-cmds.c:1752
+#: cli/cli-cmds.c:1819
 msgid "Generic command for showing command history parameters."
 msgstr ""
 
-#: cli/cli-cmds.c:1755
+#: cli/cli-cmds.c:1822
 msgid "Set history expansion on command input."
 msgstr ""
 
-#: cli/cli-cmds.c:1756
+#: cli/cli-cmds.c:1823
 msgid "Show history expansion on command input."
 msgstr ""
 
-#: cli/cli-cmds.c:1757
+#: cli/cli-cmds.c:1824
 msgid "Without an argument, history expansion is enabled."
 msgstr ""
 
-#: cli/cli-cmds.c:1763
+#: cli/cli-cmds.c:1830
 msgid "Generic command for showing things about the program being debugged."
 msgstr ""
 
-#: cli/cli-cmds.c:1770
+#: cli/cli-cmds.c:1837
 msgid "List the completions for the rest of the line as a command."
 msgstr ""
 
-#: cli/cli-cmds.c:1772
+#: cli/cli-cmds.c:1839
 msgid "Generic command for showing things about the debugger."
 msgstr ""
 
 #. Another way to get at the same thing.
-#: cli/cli-cmds.c:1776
+#: cli/cli-cmds.c:1843
 msgid "Show all GDB settings."
 msgstr ""
 
-#: cli/cli-cmds.c:1778
+#: cli/cli-cmds.c:1845
 msgid ""
 "Show the history of commands you typed.\n"
 "You can supply a command number to start with, or a `+' to start after\n"
 "the previous command number shown."
 msgstr ""
 
-#: cli/cli-cmds.c:1785
+#: cli/cli-cmds.c:1852
 msgid "Show what version of GDB this is."
 msgstr ""
 
-#: cli/cli-cmds.c:1788
+#: cli/cli-cmds.c:1855
 msgid "Show how GDB was configured at build time."
 msgstr ""
 
-#: cli/cli-cmds.c:1790
+#: cli/cli-cmds.c:1857
 msgid "Set debugging of remote protocol."
 msgstr ""
 
-#: cli/cli-cmds.c:1791
+#: cli/cli-cmds.c:1858
 msgid "Show debugging of remote protocol."
 msgstr ""
 
-#: cli/cli-cmds.c:1792
+#: cli/cli-cmds.c:1859
 msgid ""
 "When enabled, each packet sent or received with the remote target\n"
 "is displayed."
 msgstr ""
 
-#: cli/cli-cmds.c:1800
+#: cli/cli-cmds.c:1867
 msgid "Set timeout limit to wait for target to respond."
 msgstr ""
 
-#: cli/cli-cmds.c:1801
+#: cli/cli-cmds.c:1868
 msgid "Show timeout limit to wait for target to respond."
 msgstr ""
 
-#: cli/cli-cmds.c:1802
+#: cli/cli-cmds.c:1869
 msgid ""
 "This value is used to set the time limit for gdb to wait for a response\n"
 "from the target."
 msgstr ""
 
-#: cli/cli-cmds.c:1810
+#: cli/cli-cmds.c:1877
 msgid "Generic command for setting gdb debugging flags"
 msgstr ""
 
-#: cli/cli-cmds.c:1814
+#: cli/cli-cmds.c:1881
 msgid "Generic command for showing gdb debugging flags"
 msgstr ""
 
-#: cli/cli-cmds.c:1817
+#: cli/cli-cmds.c:1884
 msgid ""
 "Execute the rest of the line as a shell command.\n"
 "With no arguments, run an inferior shell."
 msgstr ""
 
-#: cli/cli-cmds.c:1822
+#: cli/cli-cmds.c:1889
 msgid ""
 "Edit specified file or function.\n"
 "With no argument, edits file containing most recent line listed.\n"
@@ -5928,7 +5961,7 @@ msgid ""
 "Uses EDITOR environment variable contents as editor (or ex as default)."
 msgstr ""
 
-#: cli/cli-cmds.c:1834
+#: cli/cli-cmds.c:1901
 msgid ""
 "List specified function or line.\n"
 "With no argument, lists ten more lines after or around previous listing.\n"
@@ -5941,16 +5974,33 @@ msgid ""
 "  FUNCTION, to list around beginning of that function,\n"
 "  FILE:FUNCTION, to distinguish among like-named static functions.\n"
 "  *ADDRESS, to list around the line containing that address.\n"
-"With two args if one is empty it stands for ten lines away from the other "
-"arg."
+"With two args, if one is empty, it stands for ten lines away from\n"
+"the other arg.\n"
+"\n"
+"By default, when a single location is given, display ten lines.\n"
+"This can be changed using \"set listsize\", and the current value\n"
+"can be shown using \"show listsize\"."
 msgstr ""
 
-#: cli/cli-cmds.c:1854
+#: cli/cli-cmds.c:1925
 msgid ""
 "Disassemble a specified section of memory.\n"
 "Default is the function surrounding the pc of the selected frame.\n"
+"\n"
 "With a /m modifier, source lines are included (if available).\n"
+"This view is \"source centric\": the output is in source line order,\n"
+"regardless of any optimization that is present.  Only the main source file\n"
+"is displayed, not those of, e.g., any inlined functions.\n"
+"This modifier hasn't proved useful in practice and is deprecated\n"
+"in favor of /s.\n"
+"\n"
+"With a /s modifier, source lines are included (if available).\n"
+"This differs from /m in two important respects:\n"
+"- the output is still in pc address order, and\n"
+"- file names and contents for all relevant source files are displayed.\n"
+"\n"
 "With a /r modifier, raw instructions in hex are included.\n"
+"\n"
 "With a single argument, the function surrounding that address is dumped.\n"
 "Two arguments (separated by a comma) are taken as a range of memory to "
 "dump,\n"
@@ -5962,42 +6012,42 @@ msgid ""
 "you must type \"disassemble 'foo.c'::bar\" and not \"disassemble foo.c:bar\"."
 msgstr ""
 
-#: cli/cli-cmds.c:1871
+#: cli/cli-cmds.c:1955
 msgid "Run the ``make'' program using the rest of the line as arguments."
 msgstr ""
 
-#: cli/cli-cmds.c:1874
+#: cli/cli-cmds.c:1958
 msgid ""
 "Show definitions of non-python/scheme user defined commands.\n"
 "Argument is the name of the user defined command.\n"
 "With no argument, show definitions of all user defined commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1879
+#: cli/cli-cmds.c:1963
 msgid "Search for commands matching a REGEXP"
 msgstr ""
 
-#: cli/cli-cmds.c:1882
+#: cli/cli-cmds.c:1966
 msgid "Set the max call depth for non-python/scheme user-defined commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1883
+#: cli/cli-cmds.c:1967
 msgid "Show the max call depth for non-python/scheme user-defined commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1889
+#: cli/cli-cmds.c:1973
 msgid "Set tracing of GDB CLI commands."
 msgstr ""
 
-#: cli/cli-cmds.c:1890
+#: cli/cli-cmds.c:1974
 msgid "Show state of GDB CLI command tracing."
 msgstr ""
 
-#: cli/cli-cmds.c:1891
+#: cli/cli-cmds.c:1975
 msgid "When 'on', each command is displayed as it is executed."
 msgstr ""
 
-#: cli/cli-cmds.c:1897
+#: cli/cli-cmds.c:1981
 msgid ""
 "Define a new command that is an alias of an existing command.\n"
 "Usage: alias [-a] [--] ALIAS = COMMAND\n"
@@ -6013,7 +6063,7 @@ msgid ""
 "  alias -a set print elms = set print elements"
 msgstr ""
 
-#: cli/cli-cmds.c:1918
+#: cli/cli-cmds.c:2002
 #, possible-c-format
 msgid ""
 "Read commands from a file named FILE.\n"
@@ -6027,125 +6077,116 @@ msgid ""
 "when GDB is started."
 msgstr ""
 
-#: cli/cli-script.c:109
+#: cli/cli-script.c:151
 msgid "if/while commands require arguments."
 msgstr ""
 
-#: cli/cli-script.c:144
+#: cli/cli-script.c:183
 msgid "Error reading in canned sequence of commands."
 msgstr ""
 
-#: cli/cli-script.c:372
+#: cli/cli-script.c:412
 msgid "Max user call depth exceeded -- command aborted."
 msgstr ""
 
-#: cli/cli-script.c:394
+#: cli/cli-script.c:433
 msgid "Error executing canned sequence of commands."
 msgstr ""
 
-#: cli/cli-script.c:632
+#: cli/cli-script.c:656
 msgid "Invalid control type in canned commands structure."
 msgstr ""
 
-#: cli/cli-script.c:708
-msgid "arg_cleanup called with no user args.\n"
-msgstr ""
-
-#: cli/cli-script.c:746
-#, possible-c-format
-msgid "user defined function may only have %d arguments."
-msgstr ""
-
-#: cli/cli-script.c:843
+#: cli/cli-script.c:836
 #, possible-c-format
-msgid "Missing argument %d in user function."
+msgid "Missing argument %ld in user function."
 msgstr ""
 
-#: cli/cli-script.c:943
+#: cli/cli-script.c:889
 msgid "Control nesting too deep!"
 msgstr ""
 
-#: cli/cli-script.c:1152
+#: cli/cli-script.c:1105
 msgid "Recursed on a simple control type."
 msgstr ""
 
-#: cli/cli-script.c:1155
+#: cli/cli-script.c:1108
 msgid "Allocated body is smaller than this command type needs."
 msgstr ""
 
-#: cli/cli-script.c:1453
+#: cli/cli-script.c:1406
 msgid "name of command to define"
 msgstr ""
 
-#: cli/cli-script.c:1476
+#: cli/cli-script.c:1429
 #, possible-c-format
 msgid "\"%s\" is not a prefix command."
 msgstr ""
 
-#: cli/cli-script.c:1487
+#: cli/cli-script.c:1440
 #, possible-c-format
 msgid "Junk in argument list: \"%s\""
 msgstr ""
 
-#: cli/cli-script.c:1537
+#: cli/cli-script.c:1490
 #, possible-c-format
 msgid "Redefine command \"%s\"? "
 msgstr ""
 
-#: cli/cli-script.c:1539
+#: cli/cli-script.c:1492
 #, possible-c-format
 msgid "Really redefine built-in command \"%s\"? "
 msgstr ""
 
-#: cli/cli-script.c:1541
+#: cli/cli-script.c:1494
 #, possible-c-format
 msgid "Command \"%s\" not redefined."
 msgstr ""
 
-#: cli/cli-script.c:1568
+#: cli/cli-script.c:1521
 #, possible-c-format
 msgid "Your new `%s' command does not hook any existing command."
 msgstr ""
 
-#: cli/cli-script.c:1571
+#: cli/cli-script.c:1524
 msgid "Proceed? "
 msgstr ""
 
 #. Should never come here as hookc would be 0.
-#: cli/cli-script.c:1613 common/common-exceptions.c:143
-#: common/common-exceptions.c:159 common/common-exceptions.c:175
-#: complaints.c:309 hppa-tdep.c:3176 hppa-tdep.c:3189 infcall.c:844
-#: infcmd.c:1557 language.c:446 mi/mi-out.c:334 mi/mi-out.c:352
-#: mips-tdep.c:273 mips-tdep.c:477 mips-tdep.c:2216 mips-tdep.c:5750
-#: mips-tdep.c:6937 mn10300-tdep.c:123 reggroups.c:247 remote.c:1399
-#: remote.c:7156 remote.c:8452 utils.c:736 utils.c:763
+#: cli/cli-script.c:1566 common/common-exceptions.c:145
+#: common/common-exceptions.c:161 common/common-exceptions.c:177
+#: complaints.c:302 hppa-tdep.c:3146 hppa-tdep.c:3159 infcall.c:939
+#: infcmd.c:1640 language.c:464 mi/mi-out.c:213 mi/mi-out.c:233
+#: mips-tdep.c:292 mips-tdep.c:496 mips-tdep.c:2208 mips-tdep.c:5726
+#: mips-tdep.c:6905 mn10300-tdep.c:123 reggroups.c:248 remote.c:1559
+#: remote.c:8259 remote.c:9588 utils.c:644 utils.c:671
 msgid "bad switch"
 msgstr ""
 
-#: cli/cli-script.c:1634
+#: cli/cli-script.c:1587
 #, possible-c-format
 msgid "Command \"%s\" is built-in."
 msgstr ""
 
-#: cli/cli-script.c:1692
+#: cli/cli-script.c:1645
 msgid "called with NULL file pointer!"
 msgstr ""
 
-#: cli/cli-script.c:1714
+#: cli/cli-script.c:1665
 #, possible-c-format
 msgid ""
 "%s:%d: Error in sourced command file:\n"
 "%s"
 msgstr ""
 
-#: cli/cli-script.c:1759
+#: cli/cli-script.c:1710
 msgid ""
 "Document a user-defined command.\n"
 "Give command name as argument.  Give documentation on following lines.\n"
 "End with a line of just \"end\"."
 msgstr ""
 
-#: cli/cli-script.c:1763
+#: cli/cli-script.c:1714
 msgid ""
 "Define a new command name.  Command name is argument.\n"
 "Definition appears on following lines, one command per line.\n"
@@ -6154,7 +6195,7 @@ msgid ""
 "Commands defined in this way may have up to ten arguments."
 msgstr ""
 
-#: cli/cli-script.c:1770
+#: cli/cli-script.c:1721
 msgid ""
 "Execute nested commands WHILE the conditional expression is non zero.\n"
 "The conditional expression must follow the word `while' and must in turn be\n"
@@ -6162,7 +6203,7 @@ msgid ""
 "and should be terminated by the word `end'."
 msgstr ""
 
-#: cli/cli-script.c:1776
+#: cli/cli-script.c:1727
 msgid ""
 "Execute nested commands once IF the conditional expression is non zero.\n"
 "The conditional expression must follow the word `if' and must in turn be\n"
@@ -6171,37 +6212,33 @@ msgid ""
 "is used, the same rules apply to its nested commands as to the first ones."
 msgstr ""
 
-#: cli/cli-logging.c:43
+#: cli/cli-logging.c:32
 #, possible-c-format
 msgid "The current logfile is \"%s\".\n"
 msgstr ""
 
-#: cli/cli-logging.c:53
+#: cli/cli-logging.c:42
 #, possible-c-format
 msgid ""
 "Currently logging to %s.  Turn the logging off and on to make the new "
 "setting effective."
 msgstr ""
 
-#: cli/cli-logging.c:62
+#: cli/cli-logging.c:57
 #, possible-c-format
 msgid "Whether logging overwrites or appends to the log file is %s.\n"
 msgstr ""
 
-#: cli/cli-logging.c:110 cli/cli-logging.c:200 cli/cli-logging.c:210
-msgid "set logging"
-msgstr ""
-
-#: cli/cli-logging.c:139 cli/cli-logging.c:249 guile/scm-ports.c:531 top.c:511
-msgid "Current output protocol does not support redirection"
-msgstr ""
-
-#: cli/cli-logging.c:148
+#: cli/cli-logging.c:75
 #, possible-c-format
 msgid "The logging output mode is %s.\n"
 msgstr ""
 
-#: cli/cli-logging.c:282
+#: cli/cli-logging.c:120
+msgid "set logging"
+msgstr ""
+
+#: cli/cli-logging.c:177
 msgid ""
 "\"set logging\" lets you log output to a file.\n"
 "Usage: set logging on [FILENAME]\n"
@@ -6211,115 +6248,107 @@ msgid ""
 "       set logging redirect [on|off]\n"
 msgstr ""
 
-#: cli/cli-logging.c:294
+#: cli/cli-logging.c:189
 #, possible-c-format
 msgid "Currently logging to \"%s\".\n"
 msgstr ""
 
-#: cli/cli-logging.c:297
+#: cli/cli-logging.c:192
 #, possible-c-format
 msgid "Future logs will be written to %s.\n"
 msgstr ""
 
-#: cli/cli-logging.c:301
+#: cli/cli-logging.c:196
 msgid "Logs will overwrite the log file.\n"
 msgstr ""
 
-#: cli/cli-logging.c:303
+#: cli/cli-logging.c:198
 msgid "Logs will be appended to the log file.\n"
 msgstr ""
 
-#: cli/cli-logging.c:308
-msgid "Output is being sent only to the log file.\n"
-msgstr ""
-
-#: cli/cli-logging.c:310
-msgid "Output is being logged and displayed.\n"
-msgstr ""
-
-#: cli/cli-logging.c:315
+#: cli/cli-logging.c:201
 msgid "Output will be sent only to the log file.\n"
 msgstr ""
 
-#: cli/cli-logging.c:317
+#: cli/cli-logging.c:203
 msgid "Output will be logged and displayed.\n"
 msgstr ""
 
-#: cli/cli-logging.c:330
+#: cli/cli-logging.c:215
 msgid "Set logging options"
 msgstr ""
 
-#: cli/cli-logging.c:333
+#: cli/cli-logging.c:218
 msgid "Show logging options"
 msgstr ""
 
-#: cli/cli-logging.c:335
+#: cli/cli-logging.c:220
 msgid "Set whether logging overwrites or appends to the log file."
 msgstr ""
 
-#: cli/cli-logging.c:336
+#: cli/cli-logging.c:221
 msgid "Show whether logging overwrites or appends to the log file."
 msgstr ""
 
-#: cli/cli-logging.c:337
+#: cli/cli-logging.c:222
 msgid "If set, logging overrides the log file."
 msgstr ""
 
-#: cli/cli-logging.c:342
+#: cli/cli-logging.c:227
 msgid "Set the logging output mode."
 msgstr ""
 
-#: cli/cli-logging.c:343
+#: cli/cli-logging.c:228
 msgid "Show the logging output mode."
 msgstr ""
 
-#: cli/cli-logging.c:344
+#: cli/cli-logging.c:229
 msgid ""
 "If redirect is off, output will go to both the screen and the log file.\n"
 "If redirect is on, output will go only to the log file."
 msgstr ""
 
-#: cli/cli-logging.c:350
+#: cli/cli-logging.c:235
 msgid "Set the current logfile."
 msgstr ""
 
-#: cli/cli-logging.c:351
+#: cli/cli-logging.c:236
 msgid "Show the current logfile."
 msgstr ""
 
-#: cli/cli-logging.c:352
+#: cli/cli-logging.c:237
 msgid "The logfile is used when directing GDB's output."
 msgstr ""
 
-#: cli/cli-logging.c:358
+#: cli/cli-logging.c:243
 msgid "Enable logging."
 msgstr ""
 
-#: cli/cli-logging.c:360
+#: cli/cli-logging.c:245
 msgid "Disable logging."
 msgstr ""
 
-#: cli/cli-utils.c:51
+#: cli/cli-utils.c:44
 msgid "History value must have integer type.\n"
 msgstr ""
 
-#: cli/cli-utils.c:72
+#: cli/cli-utils.c:65
 msgid "Convenience variable must have integer value.\n"
 msgstr ""
 
-#: cli/cli-utils.c:162
+#: cli/cli-utils.c:179
 msgid "inverted range"
 msgstr ""
 
-#: cli/cli-utils.c:176
+#: cli/cli-utils.c:193
 msgid "negative value"
 msgstr ""
 
-#: cli/cli-utils.c:218
+#: cli/cli-utils.c:232
 msgid "Args must be numbers or '$' variables."
 msgstr ""
 
-#: coff-pe-read.c:175
+#: coff-pe-read.c:176
 #, possible-c-format
 msgid "Unknown section type for \"%s\" for entry \"%s\" in dll \"%s\"\n"
 msgstr ""
@@ -6329,150 +6358,155 @@ msgstr ""
 msgid "Adding exported symbol \"%s\" in dll \"%s\"\n"
 msgstr ""
 
-#: coff-pe-read.c:235
+#: coff-pe-read.c:236
 #, possible-c-format
 msgid ""
 "Unable to find function \"%s\" in dll \"%s\", forward of \"%s\" in dll \"%s"
 "\"\n"
 msgstr ""
 
-#: coff-pe-read.c:243
+#: coff-pe-read.c:244
 #, possible-c-format
 msgid ""
 "Adding forwarded exported symbol \"%s\" in dll \"%s\", pointing to \"%s\"\n"
 msgstr ""
 
-#: coff-pe-read.c:439
+#: coff-pe-read.c:438
 #, possible-c-format
 msgid "Export RVA for dll \"%s\" is in section \"%s\"\n"
 msgstr ""
 
-#: coff-pe-read.c:444
+#: coff-pe-read.c:443
 #, possible-c-format
 msgid "Wrong value of export RVA for dll \"%s\": 0x%lx instead of 0x%lx\n"
 msgstr ""
 
-#: coff-pe-read.c:543
+#: coff-pe-read.c:542
 #, possible-c-format
 msgid "DLL \"%s\" has %ld export entries, base=%ld\n"
 msgstr ""
 
-#: coff-pe-read.c:616
+#: coff-pe-read.c:615
 #, possible-c-format
 msgid "Export name \"%s\" ord. %lu, RVA 0x%lx in dll \"%s\" not handled\n"
 msgstr ""
 
-#: coff-pe-read.c:623
+#: coff-pe-read.c:622
 #, possible-c-format
 msgid "Finished reading \"%s\", exports %ld, forwards %ld, total %ld/%ld.\n"
 msgstr ""
 
-#: coff-pe-read.c:699
+#: coff-pe-read.c:698
 #, possible-c-format
 msgid "Coff PE read debugging is %s.\n"
 msgstr ""
 
-#: coff-pe-read.c:713
+#: coff-pe-read.c:712
 msgid "Set coff PE read debugging."
 msgstr ""
 
-#: coff-pe-read.c:714
+#: coff-pe-read.c:713
 msgid "Show coff PE read debugging."
 msgstr ""
 
-#: coff-pe-read.c:715
+#: coff-pe-read.c:714
 msgid ""
 "When set, debugging messages for coff reading of exported symbols are "
 "displayed."
 msgstr ""
 
-#: coffread.c:640
+#: coffread.c:639
 #, possible-c-format
 msgid "\"%s\": error reading line numbers."
 msgstr ""
 
-#: coffread.c:648
+#: coffread.c:647
 #, possible-c-format
 msgid "\"%s\": can't get string table"
 msgstr ""
 
-#: coffread.c:713
+#: coffread.c:708
 #, possible-c-format
 msgid ""
 "The debugging information in `%s' is corrupted.\n"
 "The file has a `.stabs' section, but no `.stabstr' section."
 msgstr ""
 
-#: coffread.c:908
+#: coffread.c:902
 #, possible-c-format
 msgid "Bad n_sclass for symbol %s"
 msgstr ""
 
-#: coffread.c:1076
+#: coffread.c:1070
 #, possible-c-format
 msgid "`.bf' symbol %d has no aux entry"
 msgstr ""
 
-#: coffread.c:1094
+#: coffread.c:1088
 msgid "Bad coff function information."
 msgstr ""
 
-#: coffread.c:1103
+#: coffread.c:1097
 #, possible-c-format
 msgid ""
 "`.ef' symbol without matching `.bf' symbol ignored starting at symnum %d"
 msgstr ""
 
-#: coffread.c:1115
+#: coffread.c:1109
 #, possible-c-format
 msgid "Unmatched .ef symbol(s) ignored starting at symnum %d"
 msgstr ""
 
-#: coffread.c:1124
+#: coffread.c:1118
 #, possible-c-format
 msgid "`.ef' symbol %d has no aux entry"
 msgstr ""
 
-#: coffread.c:1170
+#: coffread.c:1164
 #, possible-c-format
 msgid ""
 "`.eb' symbol without matching `.bb' symbol ignored starting at symnum %d"
 msgstr ""
 
-#: coffread.c:1180 xcoffread.c:192
+#: coffread.c:1174 xcoffread.c:198
 #, possible-c-format
 msgid "Mismatched .eb symbol ignored starting at symnum %d"
 msgstr ""
 
-#: coffread.c:1246 coffread.c:1253 coffread.c:1263
+#: coffread.c:1240 coffread.c:1247 coffread.c:1257
 #, possible-c-format
 msgid "%s: error reading symbols"
 msgstr ""
 
-#: coffread.c:1277
+#: coffread.c:1271
 #, c-format
 msgid "thumb symbol %s, class 0x%x\n"
 msgstr ""
 
-#: coffread.c:1403
+#: coffread.c:1397
 msgid "coff file name too long"
 msgstr ""
 
-#: coffread.c:1490
+#: coffread.c:1484
 #, possible-c-format
 msgid "Line number pointer %ld lower than start of line numbers"
 msgstr ""
 
-#: coffread.c:1887
+#: coffread.c:1881
 #, possible-c-format
 msgid "Symbol table entry for %s has bad tagndx value"
 msgstr ""
 
-#: coffread.c:2057
+#: coffread.c:2051
 #, possible-c-format
 msgid "Unexpected type for symbol %s"
 msgstr ""
 
+#: common/common-regcache.c:34 frame.c:1167 regcache.c:763
+#, possible-c-format
+msgid "Register %d is not available"
+msgstr ""
+
 #: common/agent.c:117
 msgid "Error reading helper thread's id in lib"
 msgstr ""
@@ -6505,7 +6539,7 @@ msgstr ""
 msgid "Error reading capability of agent"
 msgstr ""
 
-#: common/common-exceptions.c:127 common/common-exceptions.c:172
+#: common/common-exceptions.c:129 common/common-exceptions.c:174
 msgid "bad state"
 msgstr ""
 
@@ -6518,24 +6552,25 @@ msgid "Branch Trace Store"
 msgstr ""
 
 #: common/btrace-common.c:38
-msgid "Intel(R) Processor Trace"
+msgid "Intel Processor Trace"
 msgstr ""
 
-#: common/btrace-common.c:41 nat/linux-btrace.c:634 remote.c:11904
+#: common/btrace-common.c:41 common/btrace-common.c:61 nat/linux-btrace.c:662
+#: remote.c:13126
 msgid "Unknown branch trace format"
 msgstr ""
 
-#: common/cleanups.c:266
+#: common/cleanups.c:265
 msgid "restore_my_cleanups has found a stale cleanup"
 msgstr ""
 
-#: common/signals.c:348
+#: common/signals.c:352
 msgid "GDB bug: target.c (gdb_signal_from_host): unrecognized real-time signal"
 msgstr ""
 
 #. The user might be trying to do "signal SIGSAK" where this system
 #. doesn't have SIGSAK.
-#: common/signals.c:639
+#: common/signals.c:647
 #, possible-c-format
 msgid "Signal %s does not exist on this system."
 msgstr ""
@@ -6552,7 +6587,7 @@ msgstr ""
 msgid "pipe not available on this host"
 msgstr ""
 
-#: common/common-utils.c:129
+#: common/common-utils.c:135
 msgid "vasprintf call failed"
 msgstr ""
 
@@ -6589,43 +6624,47 @@ msgstr ""
 msgid "Unrecognized escape character \\%c in format string."
 msgstr ""
 
-#: common/format.c:290
+#: common/format.c:289
 msgid "`*' not supported for precision or width in printf"
 msgstr ""
 
-#: common/format.c:293
+#: common/format.c:292
 msgid "Format specifier `n' not supported in printf"
 msgstr ""
 
-#: common/format.c:296
+#: common/format.c:295
 msgid "Incomplete format specifier at end of format string"
 msgstr ""
 
-#: common/format.c:299
+#: common/format.c:298
 #, possible-c-format
 msgid "Unrecognized format specifier '%c' in printf"
 msgstr ""
 
-#: common/format.c:303
+#: common/format.c:302
 #, possible-c-format
 msgid "Inappropriate modifiers to format specifier '%c' in printf"
 msgstr ""
 
+#: common/signals-state-save-restore.c:64
+msgid "unexpected signal handler"
+msgstr ""
+
 #: compile/compile-loc2c.c:97
 msgid "inconsistent stack depths"
 msgstr ""
 
-#: compile/compile-loc2c.c:359 compile/compile-loc2c.c:1120
+#: compile/compile-loc2c.c:360 compile/compile-loc2c.c:1120
 #, possible-c-format
 msgid "unhandled DWARF op: %s"
 msgstr ""
 
-#: compile/compile-loc2c.c:635 compile/compile-c-symbols.c:245
+#: compile/compile-loc2c.c:635 compile/compile-c-symbols.c:246
 #, possible-c-format
 msgid "Symbol \"%s\" cannot be used because there is no selected frame"
 msgstr ""
 
-#: compile/compile-loc2c.c:641 compile/compile-c-symbols.c:252
+#: compile/compile-loc2c.c:641 compile/compile-c-symbols.c:253
 #, possible-c-format
 msgid ""
 "Symbol \"%s\" cannot be used for compilation evaluation as its address has "
@@ -6633,22 +6672,22 @@ msgid ""
 msgstr ""
 
 #. Probably TLS here.
-#: compile/compile-loc2c.c:645 compile/compile-c-symbols.c:227
+#: compile/compile-loc2c.c:645 compile/compile-c-symbols.c:228
 #, possible-c-format
 msgid ""
 "Symbol \"%s\" is thread-local and currently can only be referenced from the "
 "current thread in compiled code."
 msgstr ""
 
-#: compile/compile-loc2c.c:888 dwarf2loc.c:3132
+#: compile/compile-loc2c.c:888 dwarf2loc.c:3281
 msgid "No block found for address"
 msgstr ""
 
-#: compile/compile-loc2c.c:893 dwarf2loc.c:3137
+#: compile/compile-loc2c.c:893 dwarf2loc.c:3286
 msgid "No function found for block"
 msgstr ""
 
-#: compile/compile-loc2c.c:970 dwarf2loc.c:3194
+#: compile/compile-loc2c.c:970 dwarf2loc.c:3343
 #, possible-c-format
 msgid "Unsupported size %d in %s"
 msgstr ""
@@ -6658,75 +6697,76 @@ msgstr ""
 msgid "Compile debugging is %s.\n"
 msgstr ""
 
-#: compile/compile.c:99
+#: compile/compile.c:98
 msgid "You must provide a filename for this command."
 msgstr ""
 
-#: compile/compile.c:111
+#: compile/compile.c:110
 msgid "You must provide a filename with the raw option set."
 msgstr ""
 
-#: compile/compile.c:114 compile/compile.c:150
+#: compile/compile.c:113 compile/compile.c:147
 msgid "Unknown argument specified."
 msgstr ""
 
-#: compile/compile.c:225
+#: compile/compile.c:218
 #, possible-c-format
 msgid "Could not remove temporary directory %s"
 msgstr ""
 
-#: compile/compile.c:248
+#: compile/compile.c:241
 msgid "Command not supported on this host."
 msgstr ""
 
-#: compile/compile.c:251
+#: compile/compile.c:244
 msgid "Could not make temporary directory"
 msgstr ""
 
-#: compile/compile.c:328
+#: compile/compile.c:323
 #, possible-c-format
 msgid "Compile command command-line arguments are \"%s\".\n"
 msgstr ""
 
-#: compile/compile.c:486
+#: compile/compile.c:476
 msgid "The program must be running for the compile command to work."
 msgstr ""
 
-#: compile/compile.c:494
-msgid "No compiler support for this language."
+#: compile/compile.c:484
+#, possible-c-format
+msgid "No compiler support for language %s."
 msgstr ""
 
-#: compile/compile.c:525
+#: compile/compile.c:515
 msgid "Neither a simple expression, or a multi-line specified."
 msgstr ""
 
-#: compile/compile.c:568
+#: compile/compile.c:556
 msgid "Could not open source file for writing"
 msgstr ""
 
-#: compile/compile.c:571
+#: compile/compile.c:560
 msgid "Could not write to source file"
 msgstr ""
 
-#: compile/compile.c:583
+#: compile/compile.c:572
 msgid "Compilation failed."
 msgstr ""
 
-#: compile/compile.c:658
+#: compile/compile.c:639
 #, possible-c-format
 msgid "Invalid register name \"%s\"."
 msgstr ""
 
-#: compile/compile.c:665
+#: compile/compile.c:646
 #, possible-c-format
 msgid "Cannot find gdbarch register \"%s\"."
 msgstr ""
 
-#: compile/compile.c:676
+#: compile/compile.c:657
 msgid "Command to compile source code and inject it into the inferior."
 msgstr ""
 
-#: compile/compile.c:682
+#: compile/compile.c:663
 msgid ""
 "Compile, inject, and execute code.\n"
 "\n"
@@ -6745,7 +6785,7 @@ msgid ""
 "indicate the end of the expression."
 msgstr ""
 
-#: compile/compile.c:701
+#: compile/compile.c:682
 msgid ""
 "Evaluate a file containing source code.\n"
 "\n"
@@ -6753,7 +6793,7 @@ msgid ""
 "-r|-raw: Suppress automatic 'void _gdb_expr () { CODE }' wrapping."
 msgstr ""
 
-#: compile/compile.c:710
+#: compile/compile.c:691
 msgid ""
 "Evaluate EXPR by using the compiler and print result.\n"
 "\n"
@@ -6772,76 +6812,76 @@ msgid ""
 "but no count or size letter (see \"x\" command)."
 msgstr ""
 
-#: compile/compile.c:728
+#: compile/compile.c:709
 msgid "Set compile command debugging."
 msgstr ""
 
-#: compile/compile.c:729
+#: compile/compile.c:710
 msgid "Show compile command debugging."
 msgstr ""
 
-#: compile/compile.c:730
+#: compile/compile.c:711
 msgid "When on, compile command debugging is enabled."
 msgstr ""
 
-#: compile/compile.c:737
+#: compile/compile.c:718
 msgid "Set compile command GCC command-line arguments"
 msgstr ""
 
-#: compile/compile.c:738
+#: compile/compile.c:719
 msgid "Show compile command GCC command-line arguments"
 msgstr ""
 
-#: compile/compile.c:739
+#: compile/compile.c:720
 msgid ""
 "Use options like -I (include file directory) or ABI settings.\n"
 "String quoting is parsed like in shell, for example:\n"
 "  -mno-align-double \"-I/dir with a space/include\""
 msgstr ""
 
-#: compile/compile-c-symbols.c:123 utils.c:993
+#: compile/compile-c-symbols.c:123 utils.c:901
 #, possible-c-format
 msgid "%s"
 msgstr ""
 
-#: compile/compile-c-symbols.c:206
+#: compile/compile-c-symbols.c:207
 #, possible-c-format
 msgid "Unsupported LOC_CONST_BYTES for symbol \"%s\"."
 msgstr ""
 
-#: compile/compile-c-symbols.c:210
+#: compile/compile-c-symbols.c:211
 #, possible-c-format
 msgid "LOC_UNDEF found for \"%s\"."
 msgstr ""
 
-#: compile/compile-c-symbols.c:214
+#: compile/compile-c-symbols.c:215
 #, possible-c-format
 msgid ""
 "Fortran common block is unsupported for compilation evaluaton of symbol \"%s"
 "\"."
 msgstr ""
 
-#: compile/compile-c-symbols.c:219
+#: compile/compile-c-symbols.c:220
 #, possible-c-format
 msgid ""
 "Symbol \"%s\" cannot be used for compilation evaluation as it is optimized "
 "out."
 msgstr ""
 
-#: compile/compile-c-symbols.c:690
+#: compile/compile-c-symbols.c:689
 msgid "Local symbol unhandled when generating C code."
 msgstr ""
 
-#: compile/compile-c-symbols.c:693
+#: compile/compile-c-symbols.c:692
 msgid "LOC_COMPUTED variable missing a method."
 msgstr ""
 
-#: compile/compile-object-load.c:168
+#: compile/compile-object-load.c:169
 #, possible-c-format
 msgid "Inferior compiled module address %s is not aligned to BFD required %s."
 msgstr ""
 
-#: compile/compile-object-load.c:210
+#: compile/compile-object-load.c:211
 #, possible-c-format
 msgid "Compiled module \"%s\": multiple symbol definitions: %s"
 msgstr ""
@@ -6851,231 +6891,235 @@ msgstr ""
 msgid "Compiled module \"%s\" section \"%s\": warning: %s"
 msgstr ""
 
-#: compile/compile-object-load.c:236
+#: compile/compile-object-load.c:234
 #, possible-c-format
 msgid ""
 "Cannot resolve relocation to \"%s\" from compiled module \"%s\" section \"%s"
 "\"."
 msgstr ""
 
-#: compile/compile-object-load.c:262
+#: compile/compile-object-load.c:257
 #, possible-c-format
 msgid "Compiled module \"%s\" section \"%s\": dangerous relocation: %s\n"
 msgstr ""
 
-#: compile/compile-object-load.c:276
+#: compile/compile-object-load.c:270
 #, possible-c-format
 msgid "Compiled module \"%s\" section \"%s\": unattached relocation: %s\n"
 msgstr ""
 
-#: compile/compile-object-load.c:300
+#: compile/compile-object-load.c:293
 #, possible-c-format
 msgid "Compile module: warning: %s"
 msgstr ""
 
-#: compile/compile-object-load.c:397
+#: compile/compile-object-load.c:391
 #, possible-c-format
 msgid "Cannot map compiled module \"%s\" section \"%s\": %s"
 msgstr ""
 
-#: compile/compile-object-load.c:405
+#: compile/compile-object-load.c:399
 #, possible-c-format
 msgid ""
 "Cannot write compiled module \"%s\" section \"%s\" to inferior memory range %"
 "s-%s."
 msgstr ""
 
-#: compile/compile-object-load.c:474 compile/compile-object-load.c:482
+#: compile/compile-object-load.c:468 compile/compile-object-load.c:476
 #, possible-c-format
 msgid "No \"%s\" symbol found"
 msgstr ""
 
-#: compile/compile-object-load.c:486
+#: compile/compile-object-load.c:480
 #, possible-c-format
 msgid "Type of \"%s\" is not a pointer"
 msgstr ""
 
-#: compile/compile-object-load.c:492
+#: compile/compile-object-load.c:486
 #, possible-c-format
 msgid "Expected address scope in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:498 compile/compile-object-load.c:512
+#: compile/compile-object-load.c:492 compile/compile-object-load.c:506
 #, possible-c-format
 msgid "Invalid type code %d of symbol \"%s\" in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:519
+#: compile/compile-object-load.c:513
 #, possible-c-format
 msgid ""
 "Referenced types do not match for symbols \"%s\" and \"%s\" in compiled "
 "module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:543
+#: compile/compile-object-load.c:537
 #, possible-c-format
 msgid ""
 "Invalid type code %d of first parameter of function \"%s\" in compiled "
 "module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:550
+#: compile/compile-object-load.c:544
 #, possible-c-format
 msgid ""
 "Invalid type code %d of dereferenced first parameter of function \"%s\" in "
 "compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:585
+#: compile/compile-object-load.c:579
 #, possible-c-format
 msgid "Invalid register \"%s\" position %s bits or size %s bits"
 msgstr ""
 
-#: compile/compile-object-load.c:591
+#: compile/compile-object-load.c:585
 #, possible-c-format
 msgid "Invalid register \"%s\" type code %d"
 msgstr ""
 
-#: compile/compile-object-load.c:598
+#: compile/compile-object-load.c:592
 #, possible-c-format
 msgid "Register \"%s\" is optimized out."
 msgstr ""
 
-#: compile/compile-object-load.c:600
+#: compile/compile-object-load.c:594
 #, possible-c-format
 msgid "Register \"%s\" is not available."
 msgstr ""
 
-#: compile/compile-object-load.c:605
+#: compile/compile-object-load.c:599
 #, possible-c-format
 msgid "Cannot write register \"%s\" to inferior memory at %s."
 msgstr ""
 
-#: compile/compile-object-load.c:647
+#: compile/compile-object-load.c:638
 #, possible-c-format
 msgid "\"%s\": could not open as compiled module: %s"
 msgstr ""
 
-#: compile/compile-object-load.c:652
+#: compile/compile-object-load.c:642
 #, possible-c-format
 msgid "\"%s\": not in loadable format: %s"
 msgstr ""
 
-#: compile/compile-object-load.c:656
+#: compile/compile-object-load.c:646
 #, possible-c-format
 msgid "\"%s\": not in object format."
 msgstr ""
 
-#: compile/compile-object-load.c:669
+#: compile/compile-object-load.c:659
 #, possible-c-format
 msgid "Cannot read symbols of compiled module \"%s\": %s"
 msgstr ""
 
-#: compile/compile-object-load.c:681
+#: compile/compile-object-load.c:671
 #, possible-c-format
 msgid "Cannot find function \"%s\" in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:685
+#: compile/compile-object-load.c:675
 #, possible-c-format
 msgid "Invalid type code %d of function \"%s\" in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:706
+#: compile/compile-object-load.c:696
 #, possible-c-format
 msgid "invalid scope %d"
 msgstr ""
 
-#: compile/compile-object-load.c:709
+#: compile/compile-object-load.c:699
 #, possible-c-format
 msgid "Invalid %d parameters of function \"%s\" in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:714
+#: compile/compile-object-load.c:704
 #, possible-c-format
 msgid "Invalid return type of function \"%s\" in compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:724
+#: compile/compile-object-load.c:715
 #, possible-c-format
 msgid "Cannot parse symbols of compiled module \"%s\": %s"
 msgstr ""
 
-#: compile/compile-object-load.c:772
+#: compile/compile-object-load.c:763
 #, possible-c-format
 msgid "Could not find symbol \"%s\" for compiled module \"%s\"."
 msgstr ""
 
-#: compile/compile-object-load.c:779
+#: compile/compile-object-load.c:770
 #, possible-c-format
 msgid "%ld symbols were missing, cannot continue."
 msgstr ""
 
-#: compile/compile-c-support.c:51
+#: compile/compile-c-support.c:52
 #, possible-c-format
 msgid "Invalid GCC mode size %d."
 msgstr ""
 
-#: compile/compile-c-support.c:87
+#: compile/compile-c-support.c:88
 #, possible-c-format
 msgid "could not find symbol %s in library %s"
 msgstr ""
 
-#: compile/compile-c-support.c:112
+#: compile/compile-c-support.c:113
 msgid ""
 "The loaded version of GCC does not support the required version of the API."
 msgstr ""
 
-#: compile/compile-c-support.c:214 compile/compile-c-support.c:235
+#: compile/compile-c-support.c:222 compile/compile-c-support.c:243
 msgid "Unknown compiler scope reached."
 msgstr ""
 
-#: compile/compile-c-types.c:114
+#: compile/compile-c-types.c:82
+msgid "Unexpected type id from GCC, check you use recent enough GCC."
+msgstr ""
+
+#: compile/compile-c-types.c:115
 msgid "array type with non-constant lower bound is not supported"
 msgstr ""
 
-#: compile/compile-c-types.c:118
+#: compile/compile-c-types.c:119
 msgid "cannot convert array type with non-zero lower bound to C"
 msgstr ""
 
-#: compile/compile-c-types.c:129
+#: compile/compile-c-types.c:130
 msgid "variably-sized vector type is not supported"
 msgstr ""
 
-#: compile/compile-c-types.c:371
+#: compile/compile-c-types.c:372
 msgid "cannot convert gdb type to gcc type"
 msgstr ""
 
-#: complaints.c:324
+#: complaints.c:317
 #, possible-c-format
 msgid "Max number of complaints about incorrect symbols is %s.\n"
 msgstr ""
 
-#: complaints.c:333
+#: complaints.c:326
 msgid "Set max number of complaints about incorrect symbols."
 msgstr ""
 
-#: complaints.c:334
+#: complaints.c:327
 msgid "Show max number of complaints about incorrect symbols."
 msgstr ""
 
-#: completer.c:861
+#: completer.c:1038
 msgid "Max completions reached."
 msgstr ""
 
-#: completer.c:1199
+#: completer.c:1377
 msgid "*** List may be truncated, max-completions reached. ***"
 msgstr ""
 
-#: completer.c:1781
+#: completer.c:1959
 msgid "Set maximum number of completion candidates."
 msgstr ""
 
-#: completer.c:1782
+#: completer.c:1960
 msgid "Show maximum number of completion candidates."
 msgstr ""
 
-#: completer.c:1783
+#: completer.c:1961
 msgid ""
 "Use this to limit the number of candidates considered\n"
 "during completion.  Specifying \"unlimited\" or -1\n"
@@ -7091,15 +7135,15 @@ msgstr ""
 msgid "Various kinds of warranty you do not have."
 msgstr ""
 
-#: corefile.c:168
+#: corefile.c:167
 msgid "core file may not match specified executable file."
 msgstr ""
 
-#: corefile.c:170
+#: corefile.c:169
 msgid "exec file is newer than core file."
 msgstr ""
 
-#: corefile.c:186
+#: corefile.c:185
 msgid ""
 "No executable file specified.\n"
 "Use the \"file\" or \"exec-file\" command."
@@ -7107,37 +7151,37 @@ msgstr ""
 
 #. Actually, address between memaddr and memaddr + len was out of
 #. bounds.
-#: corefile.c:201
+#: corefile.c:200
 #, possible-c-format
 msgid "Cannot access memory at address %s"
 msgstr ""
 
-#: corefile.c:204
+#: corefile.c:203
 #, possible-c-format
 msgid "Memory at address %s unavailable."
 msgstr ""
 
-#: corefile.c:447
+#: corefile.c:465
 #, possible-c-format
 msgid "The current BFD target is \"%s\".\n"
 msgstr ""
 
-#: corefile.c:507
+#: corefile.c:525
 msgid ""
 "Use FILE as core dump for examining memory and registers.\n"
 "No arg means have no core file.  This command has been superseded by the\n"
 "`target core' and `detach' commands."
 msgstr ""
 
-#: corefile.c:515
+#: corefile.c:533
 msgid "Set the current BFD target."
 msgstr ""
 
-#: corefile.c:516
+#: corefile.c:534
 msgid "Show the current BFD target."
 msgstr ""
 
-#: corefile.c:517
+#: corefile.c:535
 msgid "Use `set gnutarget auto' to specify automatic detection."
 msgstr ""
 
@@ -7151,39 +7195,43 @@ msgstr ""
 msgid "\"%s\": no core file handler recognizes format"
 msgstr ""
 
-#: corelow.c:287
+#: corelow.c:286
 msgid "No core file specified.  (Use `detach' to stop debugging a core file.)"
 msgstr ""
 
-#: corelow.c:290
+#: corelow.c:289
 msgid "No core file specified."
 msgstr ""
 
-#: corelow.c:327
+#. Do it after the err msg
+#. FIXME: should be checking for errors from bfd_close (for one
+#. thing, on error it does not free all the storage associated
+#. with the bfd).
+#: corelow.c:325
 #, possible-c-format
 msgid "\"%s\" is not a core dump: %s"
 msgstr ""
 
-#: corelow.c:352 record-full.c:814
+#: corelow.c:350 record-full.c:811
 #, possible-c-format
 msgid "\"%s\": Can't find sections: %s"
 msgstr ""
 
-#: corelow.c:426
+#: corelow.c:424
 #, possible-c-format
 msgid "Core was generated by `%s'.\n"
 msgstr ""
 
-#: corelow.c:446
+#: corelow.c:444
 #, possible-c-format
 msgid "Program terminated with signal %s, %s.\n"
 msgstr ""
 
-#: corelow.c:483 guile/scm-utils.c:512
+#: corelow.c:481 guile/scm-utils.c:512
 msgid "Too many arguments"
 msgstr ""
 
-#: corelow.c:487
+#: corelow.c:485
 msgid "No core file now.\n"
 msgstr ""
 
@@ -7219,7 +7267,7 @@ msgstr ""
 msgid "Couldn't read SPU section in core file."
 msgstr ""
 
-#: corelow.c:1050
+#: corelow.c:1070
 #, possible-c-format
 msgid "init_core_ops: core target already exists (\"%s\")."
 msgstr ""
@@ -7322,29 +7370,29 @@ msgstr ""
 msgid "invalid character"
 msgstr ""
 
-#: cp-namespace.c:1094
+#: cp-namespace.c:997
 msgid "cp_lookup_nested_symbol called on a non-aggregate type."
 msgstr ""
 
-#: cp-namespace.c:1175
+#: cp-namespace.c:1078
 msgid "The `maint namespace' command was removed.\n"
 msgstr ""
 
-#: cp-namespace.c:1188
+#: cp-namespace.c:1091
 msgid "Deprecated placeholder for removed functionality."
 msgstr ""
 
-#: cp-support.c:606
+#: cp-support.c:572
 #, possible-c-format
 msgid "internal error: string \"%s\" failed to be canonicalized"
 msgstr ""
 
-#: cp-support.c:1462
+#: cp-support.c:1425
 #, possible-c-format
 msgid "RTTI symbol not found for class '%s'"
 msgstr ""
 
-#: cp-support.c:1468
+#: cp-support.c:1431
 #, possible-c-format
 msgid "RTTI symbol for class '%s' is not a type"
 msgstr ""
@@ -7353,41 +7401,41 @@ msgstr ""
 #. symbols for namespaces with the same name as the struct.
 #. This warning is an indication of a bug in the lookup order
 #. or a bug in the way that the symbol tables are populated.
-#: cp-support.c:1483
+#: cp-support.c:1446
 #, possible-c-format
 msgid "RTTI symbol for class '%s' is a namespace"
 msgstr ""
 
-#: cp-support.c:1486
+#: cp-support.c:1449
 #, possible-c-format
 msgid "RTTI symbol for class '%s' has bad type"
 msgstr ""
 
-#: cp-support.c:1590
+#: cp-support.c:1553
 #, possible-c-format
 msgid "unable to demangle '%s' (demangler failed with signal %d)"
 msgstr ""
 
-#: cp-support.c:1603
+#: cp-support.c:1568
 #, possible-c-format
 msgid ""
 "%s\n"
 "Attempting to dump core.\n"
 msgstr ""
 
-#: cp-support.c:1628
+#: cp-support.c:1602
 msgid "\"maintenance cplus\" must be followed by the name of a command.\n"
 msgstr ""
 
-#: cp-support.c:1676
+#: cp-support.c:1650
 msgid "C++ maintenance commands."
 msgstr ""
 
-#: cp-support.c:1687
+#: cp-support.c:1661
 msgid "Print the first class/namespace component of NAME."
 msgstr ""
 
-#: cp-support.c:1691
+#: cp-support.c:1665
 msgid ""
 "Show the virtual function table for a C++ object.\n"
 "Usage: info vtbl EXPRESSION\n"
@@ -7395,15 +7443,15 @@ msgid ""
 "resulting object."
 msgstr ""
 
-#: cp-support.c:1698
+#: cp-support.c:1672
 msgid "Set whether to attempt to catch demangler crashes."
 msgstr ""
 
-#: cp-support.c:1699
+#: cp-support.c:1673
 msgid "Show whether to attempt to catch demangler crashes."
 msgstr ""
 
-#: cp-support.c:1700
+#: cp-support.c:1674
 msgid ""
 "If enabled GDB will attempt to catch demangler crashes and\n"
 "display the offending symbol."
@@ -7424,129 +7472,113 @@ msgstr ""
 msgid "Printing of C++ static members is %s.\n"
 msgstr ""
 
-#: cp-valprint.c:293 jv-valprint.c:392 p-valprint.c:627 valprint.c:321
+#: cp-valprint.c:295 p-valprint.c:631 valprint.c:351
 msgid "<synthetic pointer>"
 msgstr ""
 
-#: cp-valprint.c:326 guile/scm-pretty-print.c:640 mi/mi-cmd-stack.c:562
-#: python/py-framefilter.c:465 python/py-prettyprint.c:295 stack.c:293
+#: cp-valprint.c:328 guile/scm-pretty-print.c:640 mi/mi-cmd-stack.c:559
+#: python/py-framefilter.c:447 python/py-prettyprint.c:271 stack.c:304
 #, possible-c-format
 msgid "<error reading variable: %s>"
 msgstr ""
 
-#: cp-valprint.c:819
+#: cp-valprint.c:817
 msgid "Set printing of C++ static members."
 msgstr ""
 
-#: cp-valprint.c:820
+#: cp-valprint.c:818
 msgid "Show printing of C++ static members."
 msgstr ""
 
-#: cp-valprint.c:827
+#: cp-valprint.c:825
 msgid "Set printing of C++ virtual function tables."
 msgstr ""
 
-#: cp-valprint.c:828
+#: cp-valprint.c:826
 msgid "Show printing of C++ virtual function tables."
 msgstr ""
 
-#: cp-valprint.c:835
+#: cp-valprint.c:833
 msgid "Set printing of object's derived type based on vtable info."
 msgstr ""
 
-#: cp-valprint.c:836
+#: cp-valprint.c:834
 msgid "Show printing of object's derived type based on vtable info."
 msgstr ""
 
-#: cris-tdep.c:283 i386-linux-tdep.c:316
+#: cris-tdep.c:283 i386-linux-tdep.c:319
 msgid "Couldn't recognize signal trampoline."
 msgstr ""
 
 #. Invalid (unimplemented) register.  Should not happen as there are
 #. no unimplemented CRISv32 registers.
-#: cris-tdep.c:1641
+#: cris-tdep.c:1632
 #, possible-c-format
 msgid "crisv32_register_type: unknown regno %d"
 msgstr ""
 
-#: cris-tdep.c:1675
+#: cris-tdep.c:1666
 msgid "cris_store_return_value: type length too large."
 msgstr ""
 
-#: cris-tdep.c:1846
+#: cris-tdep.c:1834
 msgid "cris_extract_return_value: type length too large"
 msgstr ""
 
 #. Could not find a target.  Things are likely to go downhill
 #. from here.
-#: cris-tdep.c:2089
+#: cris-tdep.c:2077
 msgid "CRIS software single step could not find a step target."
 msgstr ""
 
-#: cris-tdep.c:3871
+#: cris-tdep.c:3857
 msgid "wrong size gregset struct in core file"
 msgstr ""
 
-#: cris-tdep.c:3908
+#: cris-tdep.c:3892
 msgid "Set the current CRIS version."
 msgstr ""
 
-#: cris-tdep.c:3909
+#: cris-tdep.c:3893
 msgid "Show the current CRIS version."
 msgstr ""
 
-#: cris-tdep.c:3910
+#: cris-tdep.c:3894
 msgid ""
 "Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n"
 "Defaults to 10. "
 msgstr ""
 
-#: cris-tdep.c:3920
+#: cris-tdep.c:3904
 msgid "Set the current CRIS mode."
 msgstr ""
 
-#: cris-tdep.c:3921
+#: cris-tdep.c:3905
 msgid "Show the current CRIS mode."
 msgstr ""
 
-#: cris-tdep.c:3922
+#: cris-tdep.c:3906
 msgid ""
 "Set to CRIS_MODE_GURU when debugging in guru mode.\n"
 "Makes GDB use the NRP register instead of the ERP register in certain cases."
 msgstr ""
 
-#: cris-tdep.c:3931
+#: cris-tdep.c:3915
 msgid "Set the usage of Dwarf-2 CFI for CRIS."
 msgstr ""
 
-#: cris-tdep.c:3932
+#: cris-tdep.c:3916
 msgid "Show the usage of Dwarf-2 CFI for CRIS."
 msgstr ""
 
-#: cris-tdep.c:3933
+#: cris-tdep.c:3917
 msgid "Set this to \"off\" if using gcc-cris < R59."
 msgstr ""
 
-#: cris-tdep.c:3971 cris-tdep.c:3997
+#: cris-tdep.c:3955 cris-tdep.c:3981
 msgid "cris_gdbarch_update: failed to update architecture."
 msgstr ""
 
-#: cris-tdep.c:4056
-msgid "cris_gdbarch_init: big endian byte order in info"
-msgstr ""
-
-#: cris-tdep.c:4061
-msgid "cris_gdbarch_init: unknown byte order in info"
-msgstr ""
-
-#: cris-tdep.c:4091
-msgid "cris_gdbarch_init: unsupported CRIS version"
-msgstr ""
-
-#: cris-tdep.c:4133
-msgid "cris_gdbarch_init: unknown CRIS version"
-msgstr ""
-
 #: ctf.c:115
 #, possible-c-format
 msgid "Unable to write metadata file (%s)"
@@ -7562,127 +7594,127 @@ msgstr ""
 msgid "Unable to seek file for saving trace data (%s)"
 msgstr ""
 
-#: ctf.c:330
+#: ctf.c:323
 #, possible-c-format
 msgid "Unable to open directory '%s' for saving trace data (%s)"
 msgstr ""
 
-#: ctf.c:340 ctf.c:350 tracefile-tfile.c:89
+#: ctf.c:333 ctf.c:343 tracefile-tfile.c:94
 #, possible-c-format
 msgid "Unable to open file '%s' for saving trace data (%s)"
 msgstr ""
 
-#: ctf.c:872
+#: ctf.c:874
 msgid "Unable to create bt_context"
 msgstr ""
 
-#: ctf.c:877
+#: ctf.c:879
 #, possible-c-format
 msgid "Unable to use libbabeltrace on directory \"%s\""
 msgstr ""
 
-#: ctf.c:886
+#: ctf.c:888
 msgid "Unable to create bt_iterator"
 msgstr ""
 
-#: ctf.c:1095
+#: ctf.c:1103
 msgid "No CTF directory specified."
 msgstr ""
 
-#: ctf.c:1107
+#: ctf.c:1115
 msgid "Wrong event id of the first event"
 msgstr ""
 
-#: ctf.c:1114
+#: ctf.c:1122
 msgid "Wrong event id of the second event"
 msgstr ""
 
-#: ctf.c:1131
+#: ctf.c:1139
 msgid "Wrong event id of the first event of the second packet"
 msgstr ""
 
-#: ctf.c:1280
+#: ctf.c:1288
 msgid "ctf_xfer_partial: trace file is read-only"
 msgstr ""
 
-#: ctf.c:1607 tracefile-tfile.c:681
+#: ctf.c:1615 tracefile-tfile.c:737
 msgid "unknown tfind type"
 msgstr ""
 
-#: ctf.c:1687
+#: ctf.c:1695
 #, possible-c-format
 msgid "Unhandled trace block type (%s) while building trace frame info."
 msgstr ""
 
-#: c-typeprint.c:390
+#: c-typeprint.c:389
 msgid "type not handled in c_type_print_varspec_prefix()"
 msgstr ""
 
-#: c-typeprint.c:769
+#: c-typeprint.c:765
 msgid "type not handled in c_type_print_varspec_suffix()"
 msgstr ""
 
-#: c-typeprint.c:806
+#: c-typeprint.c:802
 #, possible-c-format
 msgid "[with %s = "
 msgstr ""
 
-#: c-typeprint.c:821
+#: c-typeprint.c:817
 msgid "] "
 msgstr ""
 
-#: c-typeprint.c:860 m2-typeprint.c:84
+#: c-typeprint.c:856 m2-typeprint.c:84
 msgid "<type unknown>"
 msgstr ""
 
-#: c-typeprint.c:888
+#: c-typeprint.c:884
 msgid "<unnamed typedef>"
 msgstr ""
 
-#: c-typeprint.c:980
+#: c-typeprint.c:976 c-typeprint.c:1418
 msgid "<incomplete type>\n"
 msgstr ""
 
-#: c-typeprint.c:983
+#: c-typeprint.c:979 c-typeprint.c:1421
 msgid "<no data fields>\n"
 msgstr ""
 
-#: c-typeprint.c:1215
+#: c-typeprint.c:1211
 #, possible-c-format
 msgid "<undefined type> %s;\n"
 msgstr ""
 
-#: c-typeprint.c:1265
+#: c-typeprint.c:1261
 #, possible-c-format
 msgid "<badly mangled name '%s'>"
 msgstr ""
 
-#: c-typeprint.c:1410
+#: c-typeprint.c:1455
 msgid "struct <unknown>"
 msgstr ""
 
 #. This should not occur.
-#: c-typeprint.c:1419
+#: c-typeprint.c:1464
 msgid "<range type>"
 msgstr ""
 
 #. At least for dump_symtab, it is important that this not
 #. be an error ().
-#: c-typeprint.c:1441
+#: c-typeprint.c:1486
 #, possible-c-format
 msgid "<invalid type code %d>"
 msgstr ""
 
-#: c-valprint.c:160 valprint.c:400
+#: c-valprint.c:253 valprint.c:440
 msgid "Could not determine the array high bound"
 msgstr ""
 
-#: c-valprint.c:226
+#: c-valprint.c:321
 #, possible-c-format
 msgid "%d vtable entries"
 msgstr ""
 
-#: c-valprint.c:559
+#: c-valprint.c:669
 msgid " [incomplete object]"
 msgstr ""
 
@@ -7695,379 +7727,389 @@ msgstr ""
 msgid "<anonymous union>"
 msgstr ""
 
-#: darwin-nat.c:186
+#: darwin-nat.c:191
 #, possible-c-format
 msgid "[%d inferior]: "
 msgstr ""
 
-#: darwin-nat.c:198
+#: darwin-nat.c:203
 msgid "[UNKNOWN]"
 msgstr ""
 
-#: darwin-nat.c:200
+#: darwin-nat.c:205
 #, possible-c-format
 msgid "Mach error at \"%s:%u\" in function \"%s\": %s (0x%lx)"
 msgstr ""
 
-#: darwin-nat.c:232
+#: darwin-nat.c:237
 #, c-format
 msgid "unknown (%d)"
 msgstr ""
 
-#: darwin-nat.c:257
+#: darwin-nat.c:262
 #, possible-c-format
-msgid "ptrace (%s, %d, 0x%x, %d): %d (%s)\n"
+msgid "ptrace (%s, %d, 0x%lx, %d): %d (%s)\n"
 msgstr ""
 
-#: darwin-nat.c:259
+#: darwin-nat.c:264
 msgid "no error"
 msgstr ""
 
-#: darwin-nat.c:334
+#: darwin-nat.c:340
 #, possible-c-format
 msgid " new_ix:%d/%d, old_ix:%d/%d, new_id:0x%x old_id:0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:496
+#: darwin-nat.c:509
 msgid "message header:\n"
 msgstr ""
 
-#: darwin-nat.c:497
+#: darwin-nat.c:510
 #, possible-c-format
 msgid " bits: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:498
+#: darwin-nat.c:511
 #, possible-c-format
 msgid " size: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:499
+#: darwin-nat.c:512
 #, possible-c-format
 msgid " remote-port: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:500
+#: darwin-nat.c:513
 #, possible-c-format
 msgid " local-port: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:501
+#: darwin-nat.c:514
 #, possible-c-format
 msgid " reserved: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:502
+#: darwin-nat.c:515
 #, possible-c-format
 msgid " id: 0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:521
+#: darwin-nat.c:534
 #, possible-c-format
 msgid "body: descriptor_count=%u\n"
 msgstr ""
 
-#: darwin-nat.c:530
+#: darwin-nat.c:543
 #, possible-c-format
 msgid " descr %d: type=%u (port) name=0x%x, dispo=%d\n"
 msgstr ""
 
-#: darwin-nat.c:534
+#: darwin-nat.c:547
 #, possible-c-format
 msgid " descr %d: type=%u\n"
 msgstr ""
 
-#: darwin-nat.c:544
+#: darwin-nat.c:557
 #, possible-c-format
 msgid "NDR: mig=%02x if=%02x encod=%02x int=%02x char=%02x float=%02x\n"
 msgstr ""
 
-#: darwin-nat.c:552
+#: darwin-nat.c:565
 msgid "  data:"
 msgstr ""
 
-#: darwin-nat.c:720
+#: darwin-nat.c:717
+#, possible-c-format
+msgid "darwin_decode_exception_message: unknown task 0x%x\n"
+msgstr ""
+
+#: darwin-nat.c:853
 #, possible-c-format
 msgid "darwin_resume_thread: state=%d, thread=0x%x, step=%d nsignal=%d\n"
 msgstr ""
 
-#: darwin-nat.c:733
+#: darwin-nat.c:866
 #, possible-c-format
 msgid "ptrace THUP: res=%d\n"
 msgstr ""
 
-#: darwin-nat.c:740
+#: darwin-nat.c:873
 #, possible-c-format
 msgid "darwin_resume_thread: kill 0x%x %d: %d\n"
 msgstr ""
 
-#: darwin-nat.c:748
+#. Set or reset single step.
+#: darwin-nat.c:879
 #, possible-c-format
 msgid "darwin_set_sstep (thread=0x%x, enable=%d)\n"
 msgstr ""
 
-#: darwin-nat.c:838
+#: darwin-nat.c:968
 #, possible-c-format
-msgid "darwin_resume: pid=%d, tid=0x%x, step=%d, signal=%d\n"
+msgid "darwin_resume: pid=%d, tid=0x%lx, step=%d, signal=%d\n"
 msgstr ""
 
-#: darwin-nat.c:919
+#: darwin-nat.c:1049
 #, possible-c-format
 msgid "darwin_wait: ill-formatted message (id=0x%x)\n"
 msgstr ""
 
-#: darwin-nat.c:936
+#: darwin-nat.c:1066
 #, possible-c-format
 msgid "darwin_wait: thread=0x%x, got %s\n"
 msgstr ""
 
-#: darwin-nat.c:959
+#: darwin-nat.c:1089
 #, possible-c-format
 msgid "  (signal %d: %s)\n"
 msgstr ""
 
-#: darwin-nat.c:1006
+#: darwin-nat.c:1130
+#, possible-c-format
+msgid "darwin_wait: ill-formatted message (id=0x%x, res=%d)\n"
+msgstr ""
+
+#: darwin-nat.c:1153
 #, possible-c-format
 msgid "wait4: res=%d: %s\n"
 msgstr ""
 
-#: darwin-nat.c:1022
+#: darwin-nat.c:1169
 #, possible-c-format
 msgid "darwin_wait: pid=%d exit, status=0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:1032
+#: darwin-nat.c:1180
 #, possible-c-format
 msgid "darwin_wait: pid=%d\n"
 msgstr ""
 
 #. Unknown message.
-#: darwin-nat.c:1041
+#: darwin-nat.c:1189
 #, possible-c-format
 msgid "darwin: got unknown message, id: 0x%x"
 msgstr ""
 
-#: darwin-nat.c:1091
+#: darwin-nat.c:1239
 #, possible-c-format
 msgid "darwin_wait: waiting for a message pid=%d thread=%lx\n"
 msgstr ""
 
-#: darwin-nat.c:1125
+#: darwin-nat.c:1273
 #, possible-c-format
 msgid "mach_msg: ret=0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:1162
+#: darwin-nat.c:1310
 #, possible-c-format
 msgid "darwin_wait: mach_msg(pending) ret=0x%x\n"
 msgstr ""
 
-#: darwin-nat.c:1184
+#: darwin-nat.c:1332
 #, possible-c-format
 msgid "darwin_wait: thread 0x%x hit a non-gdb breakpoint\n"
 msgstr ""
 
-#: darwin-nat.c:1188
+#: darwin-nat.c:1336
 msgid "darwin_wait: unhandled pending message\n"
 msgstr ""
 
-#: darwin-nat.c:1310
+#: darwin-nat.c:1464
 #, possible-c-format
 msgid "cannot kill: %s"
 msgstr ""
 
-#: darwin-nat.c:1384
+#: darwin-nat.c:1534
+#, possible-c-format
+msgid "Unable to save exception ports, task_get_exception_portsreturned: %d"
+msgstr ""
+
+#: darwin-nat.c:1546
+#, possible-c-format
+msgid "Unable to set exception ports, task_set_exception_portsreturned: %d"
+msgstr ""
+
+#: darwin-nat.c:1580
 #, possible-c-format
 msgid "Failed to kill inferior: kill (%d, 9) returned [%s]"
 msgstr ""
 
-#: darwin-nat.c:1412
+#: darwin-nat.c:1598
+#, possible-c-format
+msgid ""
+"Termination notification request failed, mach_port_request_notification\n"
+"returned: %d"
+msgstr ""
+
+#. This is unexpected, as there should not be any previously
+#. registered notification request.  But this is not a fatal
+#. issue, so just emit a warning.
+#: darwin-nat.c:1607
+msgid ""
+"A task termination request was registered before the debugger registered\n"
+"its own.  This is unexpected, but should otherwise not have any actual\n"
+"impact on the debugging session."
+msgstr ""
+
+#: darwin-nat.c:1636
 #, possible-c-format
 msgid ""
 "Unable to find Mach task port for process-id %d: %s (0x%lx).\n"
 " (please check gdb is codesigned - see taskgated(8))"
 msgstr ""
 
-#: darwin-nat.c:1417
+#: darwin-nat.c:1641
 #, possible-c-format
 msgid "inferior task: 0x%x, pid: %d\n"
 msgstr ""
 
-#: darwin-nat.c:1426
+#: darwin-nat.c:1650
 #, possible-c-format
 msgid "Unable to create exception port, mach_port_allocate returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1433
+#: darwin-nat.c:1657
 #, possible-c-format
 msgid "Unable to create exception port, mach_port_insert_right returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1441
+#: darwin-nat.c:1665
 #, possible-c-format
 msgid "Unable to create port set, mach_port_allocate returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1447
+#: darwin-nat.c:1671
 #, possible-c-format
 msgid ""
 "Unable to move exception port into new port set, mach_port_move_member\n"
 "returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1457
+#: darwin-nat.c:1681
 #, possible-c-format
 msgid "Unable to create notification port, mach_port_allocate returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1464
+#: darwin-nat.c:1688
 #, possible-c-format
 msgid ""
 "Unable to move notification port into new port set, mach_port_move_member\n"
 "returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1475
-#, possible-c-format
-msgid ""
-"Termination notification request failed, mach_port_request_notification\n"
-"returned: %d"
-msgstr ""
-
-#. This is unexpected, as there should not be any previously
-#. registered notification request.  But this is not a fatal
-#. issue, so just emit a warning.
-#: darwin-nat.c:1484
-msgid ""
-"A task termination request was registered before the debugger registered\n"
-"its own.  This is unexpected, but should otherwise not have any actual\n"
-"impact on the debugging session."
-msgstr ""
-
-#: darwin-nat.c:1492
-#, possible-c-format
-msgid "Unable to save exception ports, task_get_exception_portsreturned: %d"
-msgstr ""
-
-#: darwin-nat.c:1504
-#, possible-c-format
-msgid "Unable to set exception ports, task_set_exception_portsreturned: %d"
-msgstr ""
-
-#: darwin-nat.c:1548
+#: darwin-nat.c:1738
 #, possible-c-format
 msgid "unable to read from pipe, read returned: %d"
 msgstr ""
 
-#: darwin-nat.c:1569
+#: darwin-nat.c:1764
 #, possible-c-format
 msgid "unable to create a pipe: %s"
 msgstr ""
 
 #. Trying to masturbate?
-#: darwin-nat.c:1688 gnu-nat.c:2187 inf-ptrace.c:172
+#: darwin-nat.c:1883 gnu-nat.c:2195 inf-ptrace.c:173
 msgid "I refuse to debug myself!"
 msgstr ""
 
-#: darwin-nat.c:1695 inf-ptrace.c:187 remote.c:4703
+#: darwin-nat.c:1890 inf-ptrace.c:188 remote.c:5325
 #, possible-c-format
 msgid "Attaching to program: %s, %s\n"
 msgstr ""
 
-#: darwin-nat.c:1698 inf-ptrace.c:190 procfs.c:3043 remote.c:4706
+#: darwin-nat.c:1893 inf-ptrace.c:191 procfs.c:3048 remote.c:5328
 #, possible-c-format
 msgid "Attaching to %s\n"
 msgstr ""
 
-#: darwin-nat.c:1705
+#: darwin-nat.c:1900
 #, possible-c-format
 msgid "Can't attach to process %d: %s (%d)"
 msgstr ""
 
-#: darwin-nat.c:1750 inf-ptrace.c:248 procfs.c:3070 remote.c:4584
-#, possible-c-format
-msgid "Detaching from program: %s, %s\n"
-msgstr ""
-
-#: darwin-nat.c:1766
+#: darwin-nat.c:1953
 #, possible-c-format
 msgid "Unable to detach from process-id %d: %s (%d)"
 msgstr ""
 
-#: darwin-nat.c:1794
+#: darwin-nat.c:1981
 #, c-format
 msgid "Thread 0x%lx of process %u"
 msgstr ""
 
-#: darwin-nat.c:1828
+#: darwin-nat.c:2014
 #, possible-c-format
 msgid "darwin_read_write_inferior(task=0x%x, %s, len=%s)\n"
 msgstr ""
 
-#: darwin-nat.c:1837
+#: darwin-nat.c:2031
 #, possible-c-format
 msgid "darwin_read_write_inferior: mach_vm_read failed at %s: %s"
 msgstr ""
 
-#: darwin-nat.c:1869
+#: darwin-nat.c:2061
 #, possible-c-format
 msgid "darwin_read_write_inferior: mach_vm_region_recurse failed at %s: %s\n"
 msgstr ""
 
-#: darwin-nat.c:1877
+#: darwin-nat.c:2069
 #, possible-c-format
 msgid ""
 "darwin_read_write_inferior: mach_vm_region_recurse addr=%s, start=%s, len=%"
 "s\n"
 msgstr ""
 
-#: darwin-nat.c:1886
+#: darwin-nat.c:2078
 #, possible-c-format
 msgid "No memory at %s (vs %s+0x%x).  Nothing written"
 msgstr ""
 
-#: darwin-nat.c:1904
+#: darwin-nat.c:2105
 #, possible-c-format
-msgid "darwin_read_write_inf: mach_vm_protect max failed at %s: %s"
+msgid ""
+"darwin_read_write_inferior: mach_vm_protect failed at %s (len=0x%lx, prot=0x%"
+"x): %s"
 msgstr ""
 
-#: darwin-nat.c:1919
+#: darwin-nat.c:2124
 #, possible-c-format
-msgid "darwin_read_write_inf: mach_vm_protect failed at %s (len=0x%lx): %s"
+msgid "darwin_read_write_inferior: mach_vm_write failed: %s"
 msgstr ""
 
-#: darwin-nat.c:1933
+#: darwin-nat.c:2136
 #, possible-c-format
-msgid "darwin_read_write_inferior: mach_vm_write failed: %s"
+msgid ""
+"darwin_read_write_inferior: mach_vm_protect restore failed at %s (len=0x%"
+"lx): %s"
 msgstr ""
 
-#: darwin-nat.c:1984
+#: darwin-nat.c:2196
 #, possible-c-format
 msgid "darwin_xfer_partial(%s, %s, rbuf=%s, wbuf=%s) pid=%u\n"
 msgstr ""
 
-#: darwin-nat.c:2173
+#: darwin-nat.c:2385
 #, possible-c-format
 msgid "GDB task: 0x%lx, pid: %d\n"
 msgstr ""
 
-#: darwin-nat.c:2177
+#: darwin-nat.c:2389
 msgid "Set if printing inferior communication debugging statements."
 msgstr ""
 
-#: darwin-nat.c:2178
+#: darwin-nat.c:2390
 msgid "Show if printing inferior communication debugging statements."
 msgstr ""
 
-#: darwin-nat.c:2184
+#: darwin-nat.c:2396
 msgid "Set if mach exceptions are caught."
 msgstr ""
 
-#: darwin-nat.c:2185
+#: darwin-nat.c:2397
 msgid "Show if mach exceptions are caught."
 msgstr ""
 
-#: darwin-nat.c:2186
+#: darwin-nat.c:2398
 msgid ""
 "When this mode is on, all low level exceptions are reported before being\n"
 "reported by the kernel."
@@ -8103,7 +8145,7 @@ msgstr ""
 msgid "    %s is %d unknown task port\n"
 msgstr ""
 
-#: darwin-nat-info.c:120 darwin-nat-info.c:813 darwin-nat-info.c:834
+#: darwin-nat-info.c:120 darwin-nat-info.c:812 darwin-nat-info.c:833
 msgid "No inferior running\n"
 msgstr ""
 
@@ -8319,7 +8361,7 @@ msgstr ""
 msgid "???"
 msgstr ""
 
-#: darwin-nat-info.c:473 darwin-nat-info.c:762
+#: darwin-nat-info.c:473 darwin-nat-info.c:761
 msgid "default"
 msgstr ""
 
@@ -8425,208 +8467,208 @@ msgstr ""
 msgid "obj"
 msgstr ""
 
-#: darwin-nat-info.c:742
+#: darwin-nat-info.c:741
 msgid "Inferior not available"
 msgstr ""
 
-#: darwin-nat-info.c:753
+#: darwin-nat-info.c:752
 #, possible-c-format
 msgid "%d exceptions:\n"
 msgstr ""
 
-#: darwin-nat-info.c:758
+#: darwin-nat-info.c:757
 #, possible-c-format
 msgid "port 0x%04x, behavior: "
 msgstr ""
 
-#: darwin-nat-info.c:765
+#: darwin-nat-info.c:764
 msgid "state"
 msgstr ""
 
-#: darwin-nat-info.c:768
+#: darwin-nat-info.c:767
 msgid "state-identity"
 msgstr ""
 
-#: darwin-nat-info.c:771
+#: darwin-nat-info.c:770
 #, possible-c-format
 msgid "0x%x"
 msgstr ""
 
-#: darwin-nat-info.c:773
+#: darwin-nat-info.c:772
 msgid ", masks:"
 msgstr ""
 
-#: darwin-nat-info.c:775
+#: darwin-nat-info.c:774
 msgid " BAD_ACCESS"
 msgstr ""
 
-#: darwin-nat-info.c:777
+#: darwin-nat-info.c:776
 msgid " BAD_INSTRUCTION"
 msgstr ""
 
-#: darwin-nat-info.c:779
+#: darwin-nat-info.c:778
 msgid " ARITHMETIC"
 msgstr ""
 
-#: darwin-nat-info.c:781
+#: darwin-nat-info.c:780
 msgid " EMULATION"
 msgstr ""
 
-#: darwin-nat-info.c:783
+#: darwin-nat-info.c:782
 msgid " SOFTWARE"
 msgstr ""
 
-#: darwin-nat-info.c:785
+#: darwin-nat-info.c:784
 msgid " BREAKPOINT"
 msgstr ""
 
-#: darwin-nat-info.c:787
+#: darwin-nat-info.c:786
 msgid " SYSCALL"
 msgstr ""
 
-#: darwin-nat-info.c:789
+#: darwin-nat-info.c:788
 msgid " MACH_SYSCALL"
 msgstr ""
 
-#: darwin-nat-info.c:791
+#: darwin-nat-info.c:790
 msgid " RPC_ALERT"
 msgstr ""
 
-#: darwin-nat-info.c:793
+#: darwin-nat-info.c:792
 msgid " CRASH"
 msgstr ""
 
-#: darwin-nat-info.c:827
+#: darwin-nat-info.c:826
 msgid "Parameter is saved, host or none"
 msgstr ""
 
-#: darwin-nat-info.c:852
+#: darwin-nat-info.c:851
 msgid "Get list of tasks in system."
 msgstr ""
 
-#: darwin-nat-info.c:854
+#: darwin-nat-info.c:853
 msgid "Get list of ports in a task."
 msgstr ""
 
-#: darwin-nat-info.c:856
+#: darwin-nat-info.c:855
 msgid "Get info on a specific port."
 msgstr ""
 
-#: darwin-nat-info.c:858
+#: darwin-nat-info.c:857
 msgid "Get info on a specific task."
 msgstr ""
 
-#: darwin-nat-info.c:860
+#: darwin-nat-info.c:859
 msgid "Get list of threads in a task."
 msgstr ""
 
-#: darwin-nat-info.c:862
+#: darwin-nat-info.c:861
 msgid "Get info on a specific thread."
 msgstr ""
 
-#: darwin-nat-info.c:865
+#: darwin-nat-info.c:864
 msgid "Get information on all mach region for the task."
 msgstr ""
 
-#: darwin-nat-info.c:867
+#: darwin-nat-info.c:866
 msgid "Get information on all mach sub region for the task."
 msgstr ""
 
-#: darwin-nat-info.c:869
+#: darwin-nat-info.c:868
 msgid "Get information on mach region at given address."
 msgstr ""
 
-#: darwin-nat-info.c:872
+#: darwin-nat-info.c:871
 msgid "Disp mach exceptions."
 msgstr ""
 
-#: dbxread.c:170 mdebugread.c:3403
+#: dbxread.c:166 mdebugread.c:3396
 #, possible-c-format
 msgid "unknown symbol type %s"
 msgstr ""
 
-#: dbxread.c:177
+#: dbxread.c:173
 #, possible-c-format
 msgid "N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"
 msgstr ""
 
-#: dbxread.c:184
+#: dbxread.c:180
 #, possible-c-format
 msgid "\"repeated\" header file %s not previously seen, at symtab pos %d"
 msgstr ""
 
-#: dbxread.c:229
+#: dbxread.c:225
 msgid "Can't find any code sections in symbol file"
 msgstr ""
 
-#: dbxread.c:636
+#: dbxread.c:612
 msgid "Can't find .text section in symbol file"
 msgstr ""
 
-#: dbxread.c:698
+#: dbxread.c:674
 #, possible-c-format
 msgid "ridiculous string table size (%d bytes)."
 msgstr ""
 
-#: dbxread.c:829
+#: dbxread.c:805
 msgid "Premature end of file reading symbol table"
 msgstr ""
 
-#: dbxread.c:970
+#: dbxread.c:946
 #, possible-c-format
 msgid "bad string table offset in symbol %d"
 msgstr ""
 
-#: dbxread.c:1166 mdebugread.c:2244 xcoffread.c:2181
+#: dbxread.c:1004 mdebugread.c:2256 xcoffread.c:2178
 #, possible-c-format
 msgid "function `%s' appears to be defined outside of all compilation units"
 msgstr ""
 
-#: dbxread.c:1407
+#: dbxread.c:1245
 #, possible-c-format
 msgid "string table offset backs up at %d"
 msgstr ""
 
-#: dbxread.c:1555
+#: dbxread.c:1394
 #, possible-c-format
 msgid "N_BINCL %s not in entries for any file, at symtab pos %d"
 msgstr ""
 
-#: dbxread.c:2016 mdebugread.c:3338 xcoffread.c:2893
+#: dbxread.c:1844 mdebugread.c:3331 xcoffread.c:2886
 #, possible-c-format
 msgid "unknown symbol descriptor `%c'"
 msgstr ""
 
-#: dbxread.c:2551
+#: dbxread.c:2369
 msgid "First symbol in segment of executable not a source symbol"
 msgstr ""
 
-#: dbxread.c:2846
+#: dbxread.c:2639
 msgid ""
 "misplaced N_LBRAC entry; discarding local symbols which have no enclosing "
 "block"
 msgstr ""
 
-#: dbxread.c:2867
+#: dbxread.c:2660
 msgid "block start larger than block end"
 msgstr ""
 
-#: dbxread.c:3157
+#: dbxread.c:2941
 #, possible-c-format
 msgid "unmatched N_LBRAC before symtab pos %d"
 msgstr ""
 
-#: dbxread.c:3305 dbxread.c:3399 dbxread.c:3494
+#: dbxread.c:3084 dbxread.c:3173 dbxread.c:3268
 #, possible-c-format
 msgid "ridiculous string table size: %d bytes"
 msgstr ""
 
-#: dbxread.c:3472
+#: dbxread.c:3246
 #, possible-c-format
 msgid "stabsect_build_psymtabs:  Found stabs (%s), but not string section (%s)"
 msgstr ""
 
-#: dbxread.c:3481
+#: dbxread.c:3255
 #, possible-c-format
 msgid "Can't find %s section in symbol file"
 msgstr ""
@@ -8636,56 +8678,56 @@ msgstr ""
 msgid "Deprecated remotecache flag is %s.\n"
 msgstr ""
 
-#: dcache.c:554 dcache.c:619
+#: dcache.c:552 dcache.c:617
 msgid "No data cache available.\n"
 msgstr ""
 
-#: dcache.c:569
+#: dcache.c:567
 msgid "No such cache line exists.\n"
 msgstr ""
 
-#: dcache.c:575 dcache.c:635
+#: dcache.c:573 dcache.c:633
 #, possible-c-format
 msgid "Line %d: address %s [%d hits]\n"
 msgstr ""
 
-#: dcache.c:604
+#: dcache.c:602
 msgid "Usage: info dcache [linenumber]\n"
 msgstr ""
 
-#: dcache.c:612
+#: dcache.c:610
 #, possible-c-format
 msgid "Dcache %u lines of %u bytes each.\n"
 msgstr ""
 
-#: dcache.c:623
+#: dcache.c:621
 #, possible-c-format
 msgid "Contains data for %s\n"
 msgstr ""
 
-#: dcache.c:643
+#: dcache.c:641
 #, possible-c-format
 msgid "Cache state: %d active lines, %d hits\n"
 msgstr ""
 
-#: dcache.c:659
+#: dcache.c:657
 msgid "Dcache size must be greater than 0."
 msgstr ""
 
-#: dcache.c:673
+#: dcache.c:671
 #, possible-c-format
 msgid "Invalid dcache line size: %u (must be power of 2)."
 msgstr ""
 
-#: dcache.c:696
+#: dcache.c:694
 msgid "Set cache use for remote targets."
 msgstr ""
 
-#: dcache.c:697
+#: dcache.c:695
 msgid "Show cache use for remote targets."
 msgstr ""
 
-#: dcache.c:698
+#: dcache.c:696
 msgid ""
 "This used to enable the data cache for remote targets.  The cache\n"
 "functionality is now controlled by the memory region system and the\n"
@@ -8693,7 +8735,7 @@ msgid ""
 "exists only for compatibility reasons."
 msgstr ""
 
-#: dcache.c:708
+#: dcache.c:706
 msgid ""
 "Print information on the dcache performance.\n"
 "With no arguments, this command prints the cache configuration and a\n"
@@ -8701,28 +8743,28 @@ msgid ""
 "the contents of a given line."
 msgstr ""
 
-#: dcache.c:714
+#: dcache.c:712
 msgid "Use this command to set number of lines in dcache and line-size."
 msgstr ""
 
 #. allow_unknown
-#: dcache.c:717
+#: dcache.c:715
 msgid "Show dcachesettings."
 msgstr ""
 
-#: dcache.c:722
+#: dcache.c:720
 msgid "Set dcache line size in bytes (must be power of 2)."
 msgstr ""
 
-#: dcache.c:723
+#: dcache.c:721
 msgid "Show dcache line size."
 msgstr ""
 
-#: dcache.c:730
+#: dcache.c:728
 msgid "Set number of dcache lines."
 msgstr ""
 
-#: dcache.c:731
+#: dcache.c:729
 msgid "Show number of dcache lines."
 msgstr ""
 
@@ -8796,12 +8838,12 @@ msgid ""
 "If LANGUAGE is not specified, NAME is demangled in the current language."
 msgstr ""
 
-#: d-exp.y:1298 jv-exp.y:1444
+#: d-exp.y:456
 msgid "No symbol table is loaded.  Use the \"file\" command"
 msgstr ""
 
 #. We must have come across a bad character (e.g. ';').
-#: d-exp.y:1526 jv-exp.y:1123
+#: d-exp.y:1249
 #, possible-c-format
 msgid "Invalid character '%c' in expression"
 msgstr ""
@@ -8829,73 +8871,87 @@ msgstr ""
 msgid "Comparison with an invalid number (NaN)."
 msgstr ""
 
-#: dicos-tdep.c:83 dicos-tdep.c:97
+#: dicos-tdep.c:81 dicos-tdep.c:95
 #, possible-c-format
 msgid "Can't read elf symbols from %s: %s"
 msgstr ""
 
-#: dictionary.c:602
+#: dictionary.c:598
 msgid "dict_add_symbol: non-expandable dictionary"
 msgstr ""
 
-#: doublest.c:796
-#, possible-c-format
-msgid "Unrecognized %d-bit floating-point type."
+#: disasm.c:706
+msgid "--- no source info for this pc ---\n"
 msgstr ""
 
-#. If we don't know the floating-point format of FROM_TYPE or
-#. TO_TYPE, there's not much we can do.  We might make the
-#. assumption that if the length of FROM_TYPE and TO_TYPE match,
-#. their floating-point format would match too, but that
-#. assumption might be wrong on targets that support
-#. floating-point types that only differ in endianness for
-#. example.  So we warn instead, and zero out the target buffer.
-#: doublest.c:877
-msgid "Can't convert floating-point number to desired type."
+#: disasm.c:950
+msgid "'set disassembler-options ...' is not supported on this architecture.\n"
 msgstr ""
 
-#: dsrec.c:63
+#: disasm.c:965
 #, possible-c-format
-msgid "Unable to open file %s\n"
+msgid "Invalid disassembler option value: '%s'.\n"
 msgstr ""
 
-#: dsrec.c:70
-msgid "File is not an object file\n"
+#: disasm.c:993
+#, possible-c-format
+msgid "The current disassembler options are '%s'\n"
 msgstr ""
 
-#: dsrec.c:129 dsrec.c:143 symfile.c:1995
-msgid "Canceled the download"
+#: disasm.c:1001
+msgid ""
+"\n"
+"The following disassembler options are supported for use with the\n"
+"'set disassembler-options <option>[,<option>...]' command:\n"
 msgstr ""
 
-#: dsrec.c:258
-#, possible-c-format
-msgid "make_srec:  Bad address (%s), or bad flags (0x%x)."
+#: disasm.c:1076
+msgid ""
+"Set the disassembler options.\n"
+"Usage: set disassembler-options <option>[,<option>...]\n"
+"\n"
+"See: 'show disassembler-options' for valid option values.\n"
+msgstr ""
+
+#: disasm.c:1079
+msgid "Show the disassembler options."
+msgstr ""
+
+#. If we don't know the floating-point format of FROM_TYPE or
+#. TO_TYPE, there's not much we can do.  We might make the
+#. assumption that if the length of FROM_TYPE and TO_TYPE match,
+#. their floating-point format would match too, but that
+#. assumption might be wrong on targets that support
+#. floating-point types that only differ in endianness for
+#. example.  So we warn instead, and zero out the target buffer.
+#: doublest.c:854
+msgid "Can't convert floating-point number to desired type."
 msgstr ""
 
-#: dtrace-probe.c:547
+#: dtrace-probe.c:552
 #, possible-c-format
 msgid "skipping section '%s' which does not contain valid DOF data."
 msgstr ""
 
-#: dtrace-probe.c:639
+#: dtrace-probe.c:644
 #, possible-c-format
 msgid "could not obtain the contents ofsection '%s' in objfile `%s'."
 msgstr ""
 
-#: dtrace-probe.c:780
+#: dtrace-probe.c:785
 msgid "Enabled"
 msgstr ""
 
-#: dtrace-probe.c:823 dtrace-probe.c:855
+#: dtrace-probe.c:828 dtrace-probe.c:860
 msgid "No inferior running"
 msgstr ""
 
-#: dtrace-probe.c:864
+#: dtrace-probe.c:869
 #, possible-c-format
 msgid "Probe %s:%s cannot be disabled: no enablers."
 msgstr ""
 
-#: dtrace-probe.c:913
+#: dtrace-probe.c:918
 msgid ""
 "Show information about DTrace static probes.\n"
 "Usage: info probes dtrace [PROVIDER [NAME [OBJECT]]]\n"
@@ -8905,149 +8961,126 @@ msgid ""
 "OBJECT matches the executable or shared library name."
 msgstr ""
 
-#: dummy-frame.c:414
+#: dummy-frame.c:415
 msgid "maintenance print dummy-frames"
 msgstr ""
 
-#: dummy-frame.c:427
+#: dummy-frame.c:426
 msgid "Print the contents of the internal dummy-frame stack."
 msgstr ""
 
-#: dwarf2expr.c:78
+#: dwarf2expr.c:75
 #, possible-c-format
 msgid "Unsupported address size in DWARF expressions: %d bits"
 msgstr ""
 
-#: dwarf2expr.c:181
+#: dwarf2expr.c:159
 msgid "dwarf expression stack underflow"
 msgstr ""
 
-#: dwarf2expr.c:191 dwarf2expr.c:291
+#: dwarf2expr.c:169 dwarf2expr.c:269
 #, possible-c-format
 msgid "Asked for position %d of stack, stack only has %d elements on it."
 msgstr ""
 
-#: dwarf2expr.c:205
+#: dwarf2expr.c:183
 msgid "integral type expected in DWARF expression"
 msgstr ""
 
-#: dwarf2expr.c:225
+#: dwarf2expr.c:203
 msgid "no unsigned variant found for type, while evaluating DWARF expression"
 msgstr ""
 
-#: dwarf2expr.c:247
+#: dwarf2expr.c:225
 msgid "no signed variant found for type, while evaluating DWARF expression"
 msgstr ""
 
-#: dwarf2expr.c:378
+#: dwarf2expr.c:353
 msgid "DWARF expression error: ran off end of buffer reading uleb128 value"
 msgstr ""
 
-#: dwarf2expr.c:390
+#: dwarf2expr.c:365
 msgid "DWARF expression error: ran off end of buffer reading sleb128 value"
 msgstr ""
 
-#: dwarf2expr.c:399
+#: dwarf2expr.c:374
 msgid "DWARF expression error: ran off end of buffer reading leb128 value"
 msgstr ""
 
-#: dwarf2expr.c:415
+#: dwarf2expr.c:389
 #, possible-c-format
 msgid ""
 "DWARF-2 expression error: `%s' operations must be used either alone or in "
 "conjunction with DW_OP_piece or DW_OP_bit_piece."
 msgstr ""
 
-#: dwarf2expr.c:449
-msgid "Could not find type for DW_OP_GNU_const_type"
-msgstr ""
-
-#: dwarf2expr.c:451
-msgid "DW_OP_GNU_const_type has different sizes for type and data"
-msgstr ""
-
-#: dwarf2expr.c:651
+#: dwarf2expr.c:600
 #, possible-c-format
 msgid "DWARF-2 expression error: Loop detected (%d)."
 msgstr ""
 
-#: dwarf2expr.c:826
-msgid ""
-"DWARF-2 expression error: DW_OP_reg operations must be used either alone or "
-"in conjunction with DW_OP_piece or DW_OP_bit_piece."
-msgstr ""
-
-#: dwarf2expr.c:850 dwarf2loc.c:3048
+#: dwarf2expr.c:793 dwarf2loc.c:3197
 msgid "DW_OP_implicit_value: too few bytes available."
 msgstr ""
 
-#: dwarf2expr.c:870
+#: dwarf2expr.c:814
 msgid ""
-"DWARF-2 expression error: DW_OP_GNU_implicit_pointer is not allowed in frame "
+"DWARF-2 expression error: DW_OP_implicit_pointer is not allowed in frame "
 "context"
 msgstr ""
 
-#: dwarf2expr.c:962
+#: dwarf2expr.c:903
 msgid "Not implemented: computing frame base using explicit value operator"
 msgstr ""
 
-#: dwarf2expr.c:992
+#: dwarf2expr.c:933
 #, possible-c-format
 msgid "Not enough elements for DW_OP_swap.  Need 2, have %d."
 msgstr ""
 
-#: dwarf2expr.c:1012
+#: dwarf2expr.c:953
 #, possible-c-format
 msgid "Not enough elements for DW_OP_rot.  Need 3, have %d."
 msgstr ""
 
-#: dwarf2expr.c:1126
+#: dwarf2expr.c:1068
 msgid "Incompatible types on DWARF stack"
 msgstr ""
 
-#: dwarf2expr.c:1249
+#: dwarf2expr.c:1191
 msgid "Can't be reached."
 msgstr ""
 
-#: dwarf2expr.c:1335
+#: dwarf2expr.c:1278
 msgid ""
 "DWARF-2 expression error: DW_OP_GNU_uninit must always be the very last op."
 msgstr ""
 
-#: dwarf2expr.c:1369
-msgid "DW_OP_GNU_entry_value: too few bytes available."
+#: dwarf2expr.c:1313
+msgid "DW_OP_entry_value: too few bytes available."
 msgstr ""
 
-#: dwarf2expr.c:1396
+#: dwarf2expr.c:1338
 msgid ""
-"DWARF-2 expression error: DW_OP_GNU_entry_value is supported only for single "
+"DWARF-2 expression error: DW_OP_entry_value is supported only for single "
 "DW_OP_reg* or for DW_OP_breg*(0)+DW_OP_deref*"
 msgstr ""
 
-#: dwarf2expr.c:1472
-msgid "DW_OP_GNU_reinterpret has wrong size"
+#: dwarf2expr.c:1417
+msgid "DW_OP_reinterpret has wrong size"
 msgstr ""
 
-#: dwarf2expr.c:1487
+#: dwarf2expr.c:1432
 #, possible-c-format
 msgid "Unhandled dwarf expression opcode 0x%x"
 msgstr ""
 
-#: dwarf2expr.c:1513 dwarf2expr.c:1521 dwarf2expr.c:1529 dwarf2expr.c:1537
-#: dwarf2expr.c:1545 dwarf2expr.c:1574
+#: dwarf2expr.h:167 dwarf2-frame.c:396
 #, possible-c-format
 msgid "%s is invalid in this context"
 msgstr ""
 
-#: dwarf2expr.c:1553
-msgid "Support for typed DWARF is not supported in this context"
-msgstr ""
-
-#: dwarf2expr.c:1566
-msgid "Support for DW_OP_GNU_entry_value is unimplemented"
-msgstr ""
-
-#: dwarf2-frame.c:339
+#: dwarf2-frame.c:323
 #, possible-c-format
 msgid ""
 "incomplete CFI data; DW_CFA_restore unspecified\n"
@@ -9057,478 +9090,496 @@ msgstr ""
 #. This is actually invalid DWARF, but if we ever do run across
 #. it somehow, we might as well support it.  So, instead, report
 #. it as unimplemented.
-#: dwarf2-frame.c:398
+#: dwarf2-frame.c:428
 msgid ""
 "Not implemented: computing unwound register using explicit value operator"
 msgstr ""
 
-#: dwarf2-frame.c:530
+#: dwarf2-frame.c:558
 #, possible-c-format
 msgid "bad CFI data; mismatched DW_CFA_restore_state at %s"
 msgstr ""
 
-#: dwarf2-frame.c:689
+#: dwarf2-frame.c:717
 msgid "Unknown CFI encountered."
 msgstr ""
 
-#: dwarf2-frame.c:912
+#: dwarf2-frame.c:945
 msgid "Could not compute CFA; needed to translate this expression"
 msgstr ""
 
-#: dwarf2-frame.c:942 dwarf2loc.c:2269 dwarf2loc.c:2784
-#, possible-c-format
-msgid "Unable to access DWARF register number %d"
-msgstr ""
-
-#: dwarf2-frame.c:960 dwarf2-frame.c:1125
+#: dwarf2-frame.c:988 dwarf2-frame.c:1153
 msgid "Unknown CFA rule."
 msgstr ""
 
-#: dwarf2-frame.c:1183
+#: dwarf2-frame.c:1208
 #, possible-c-format
 msgid "incomplete CFI data; unspecified registers (e.g., %s) at %s"
 msgstr ""
 
-#: dwarf2-frame.c:1380
+#: dwarf2-frame.c:1405
 msgid "Unknown register rule."
 msgstr ""
 
-#: dwarf2-frame.c:1510
+#: dwarf2-frame.c:1535
 msgid "cfa not available for record btrace target"
 msgstr ""
 
-#: dwarf2-frame.c:1516
+#: dwarf2-frame.c:1541
 msgid ""
 "can't compute CFA for this frame: required registers or memory are "
 "unavailable"
 msgstr ""
 
-#: dwarf2-frame.c:1521
+#: dwarf2-frame.c:1546
 msgid "can't compute CFA for this frame: frame base not available"
 msgstr ""
 
-#: dwarf2-frame.c:1594
+#: dwarf2-frame.c:1619
 msgid "Unsupported address size"
 msgstr ""
 
-#: dwarf2-frame.c:1611
+#: dwarf2-frame.c:1636
 msgid "Unsupported encoding: DW_EH_PE_indirect"
 msgstr ""
 
-#: dwarf2-frame.c:1644 dwarf2-frame.c:1692
+#: dwarf2-frame.c:1669 dwarf2-frame.c:1717
 msgid "Invalid or unsupported encoding"
 msgstr ""
 
-#: dwarf2-frame.c:1902
+#: dwarf2-frame.c:1930
 msgid "Found a CIE when not expecting it."
 msgstr ""
 
-#: dwarf2-frame.c:2076
+#: dwarf2-frame.c:2102
 msgid "Found an FDE when not expecting it."
 msgstr ""
 
-#: dwarf2-frame.c:2219
+#: dwarf2-frame.c:2243
 #, possible-c-format
 msgid "Corrupt data in %s:%s; align 4 workaround apparently succeeded"
 msgstr ""
 
-#: dwarf2-frame.c:2226
+#: dwarf2-frame.c:2250
 #, possible-c-format
 msgid "Corrupt data in %s:%s; align 8 workaround apparently succeeded"
 msgstr ""
 
-#: dwarf2-frame.c:2234
+#: dwarf2-frame.c:2258
 #, possible-c-format
 msgid "Corrupt data in %s:%s"
 msgstr ""
 
-#: dwarf2-frame.c:2324
+#: dwarf2-frame.c:2348
 #, possible-c-format
 msgid "skipping .eh_frame info of %s: %s"
 msgstr ""
 
-#: dwarf2-frame.c:2365
+#: dwarf2-frame.c:2389
 #, possible-c-format
 msgid "skipping .debug_frame info of %s: %s"
 msgstr ""
 
-#: dwarf2loc.c:91
+#: dwarf2loc.c:99
 msgid "access outside bounds of object referenced via synthetic pointer"
 msgstr ""
 
-#: dwarf2loc.c:251
+#: dwarf2loc.c:316
 msgid "dwarf2_find_location_expression: Corrupted DWARF expression."
 msgstr ""
 
-#: dwarf2loc.c:354
-msgid "frame address is not available."
-msgstr ""
-
-#: dwarf2loc.c:428
+#: dwarf2loc.c:518
 #, possible-c-format
 msgid "Could not find the frame base for \"%s\"."
 msgstr ""
 
-#: dwarf2loc.c:518
+#: dwarf2loc.c:591
+msgid "Could not find type for DW_OP_const_type"
+msgstr ""
+
+#: dwarf2loc.c:593
+msgid "DW_OP_const_type has different sizes for type and data"
+msgstr ""
+
+#: dwarf2loc.c:611
+msgid "Location address is not set."
+msgstr ""
+
+#: dwarf2loc.c:643 dwarf2loc.c:1328
+msgid "Cannot resolve DW_AT_call_data_value"
+msgstr ""
+
+#: dwarf2loc.c:675
+msgid "frame address is not available."
+msgstr ""
+
+#: dwarf2loc.c:731
 #, possible-c-format
 msgid "Entry values and tail call frames debugging is %s.\n"
 msgstr ""
 
-#: dwarf2loc.c:547
+#: dwarf2loc.c:760
 #, possible-c-format
-msgid "DW_AT_GNU_call_site_target is not specified at %s in %s"
+msgid "DW_AT_call_target is not specified at %s in %s"
 msgstr ""
 
-#: dwarf2loc.c:560
+#: dwarf2loc.c:772
 #, possible-c-format
 msgid ""
-"DW_AT_GNU_call_site_target DWARF block resolving requires known frame which "
-"is currently not available at %s in %s"
+"DW_AT_call_target DWARF block resolving requires known frame which is "
+"currently not available at %s in %s"
 msgstr ""
 
-#: dwarf2loc.c:594
+#: dwarf2loc.c:805
 #, possible-c-format
 msgid "Cannot find function \"%s\" for a call site target at %s in %s"
 msgstr ""
 
-#: dwarf2loc.c:608
+#: dwarf2loc.c:819
 msgid "invalid call site target kind"
 msgstr ""
 
-#: dwarf2loc.c:624
+#: dwarf2loc.c:835
 #, possible-c-format
-msgid ""
-"DW_TAG_GNU_call_site resolving failed to find function name for address %s"
+msgid "DW_TAG_call_site resolving failed to find function name for address %s"
 msgstr ""
 
-#: dwarf2loc.c:693
+#: dwarf2loc.c:893
 #, possible-c-format
 msgid ""
-"DW_OP_GNU_entry_value resolving has found function \"%s\" at %s can call "
-"itself via tail calls"
+"DW_OP_entry_value resolving has found function \"%s\" at %s can call itself "
+"via tail calls"
 msgstr ""
 
-#: dwarf2loc.c:861
+#: dwarf2loc.c:1045
 #, possible-c-format
 msgid "Unable to find function for PC %s"
 msgstr ""
 
-#: dwarf2loc.c:960
+#: dwarf2loc.c:1132
 #, possible-c-format
 msgid ""
 "There are no unambiguously determinable intermediate callers or callees "
 "between caller function \"%s\" at %s and callee function \"%s\" at %s"
 msgstr ""
 
-#: dwarf2loc.c:1065
+#: dwarf2loc.c:1235
 #, possible-c-format
 msgid ""
-"DW_OP_GNU_entry_value resolving callee gdbarch %s (of %s (%s)) does not "
-"match caller gdbarch %s"
+"DW_OP_entry_value resolving callee gdbarch %s (of %s (%s)) does not match "
+"caller gdbarch %s"
 msgstr ""
 
-#: dwarf2loc.c:1079
+#: dwarf2loc.c:1249
 #, possible-c-format
-msgid "DW_OP_GNU_entry_value resolving requires caller of %s (%s)"
+msgid "DW_OP_entry_value resolving requires caller of %s (%s)"
 msgstr ""
 
-#: dwarf2loc.c:1096
+#: dwarf2loc.c:1266
 #, possible-c-format
 msgid ""
-"DW_OP_GNU_entry_value resolving expects callee %s at %s but the called frame "
-"is for %s at %s"
+"DW_OP_entry_value resolving expects callee %s at %s but the called frame is "
+"for %s at %s"
 msgstr ""
 
-#. DW_TAG_GNU_call_site_parameter will be missing just if GCC could not
+#. DW_TAG_call_site_parameter will be missing just if GCC could not
 #. determine its value.
-#: dwarf2loc.c:1122
+#: dwarf2loc.c:1292
 #, possible-c-format
-msgid "Cannot find matching parameter at DW_TAG_GNU_call_site %s at %s"
-msgstr ""
-
-#: dwarf2loc.c:1158 dwarf2loc.c:1205
-msgid "Cannot resolve DW_AT_GNU_call_site_data_value"
+msgid "Cannot find matching parameter at DW_TAG_call_site %s at %s"
 msgstr ""
 
-#: dwarf2loc.c:1250
-msgid "Location address is not set."
-msgstr ""
-
-#: dwarf2loc.c:1387
+#: dwarf2loc.c:1472
 msgid ""
-"DWARF-2 expression error: DW_OP_GNU_entry_value is supported only for single "
+"DWARF-2 expression error: DW_OP_entry_value is supported only for single "
 "DW_OP_reg* or for DW_OP_fbreg(*)"
 msgstr ""
 
-#: dwarf2loc.c:1625
-msgid "Should not be able to create a lazy value with an enclosing type"
+#: dwarf2loc.c:1687
+#, possible-c-format
+msgid "copy_bitwise %s != %s (%u+%u -> %u)"
 msgstr ""
 
-#: dwarf2loc.c:1717
-#, possible-c-format
-msgid "Unable to access DWARF register number %s"
+#: dwarf2loc.c:1774
+msgid "Should not be able to create a lazy value with an enclosing type"
 msgstr ""
 
-#: dwarf2loc.c:1774 dwarf2loc.c:2376
+#: dwarf2loc.c:1913 dwarf2loc.c:2533
 msgid "invalid location type"
 msgstr ""
 
-#: dwarf2loc.c:1900
+#: dwarf2loc.c:2025
 msgid ""
 "Can't do read-modify-write to update bitfield; containing word has been "
 "optimized out"
 msgstr ""
 
-#: dwarf2loc.c:1905
+#: dwarf2loc.c:2030
 msgid ""
 "Can't do read-modify-write to update bitfield; containing word is unavailable"
 msgstr ""
 
-#: dwarf2loc.c:1920
-#, possible-c-format
-msgid "Unable to write to DWARF register number %s"
-msgstr ""
-
-#: dwarf2loc.c:2049
-msgid "Invalid use of DW_OP_GNU_implicit_pointer"
+#: dwarf2loc.c:2227
+msgid "Invalid use of DW_OP_implicit_pointer"
 msgstr ""
 
-#: dwarf2loc.c:2266
+#: dwarf2loc.c:2416
 msgid "cannot use offset on synthetic pointer to register"
 msgstr ""
 
-#: dwarf2loc.c:2527
+#: dwarf2loc.c:2681
 msgid "cannot find reference address for offset property"
 msgstr ""
 
-#: dwarf2loc.c:2769
+#: dwarf2loc.c:2886
 #, possible-c-format
 msgid "DWARF operator %s cannot be translated to an agent expression"
 msgstr ""
 
-#: dwarf2loc.c:2772
+#: dwarf2loc.c:2889
 #, possible-c-format
 msgid ""
 "Unknown DWARF operator 0x%02x cannot be translated to an agent expression"
 msgstr ""
 
-#: dwarf2loc.c:3050
+#: dwarf2loc.c:2908
+#, possible-c-format
+msgid "bad DWARF register number %d"
+msgstr ""
+
+#: dwarf2loc.c:2923
+#, possible-c-format
+msgid "Unable to access DWARF register number %d"
+msgstr ""
+
+#: dwarf2loc.c:2924
+#, possible-c-format
+msgid "Unable to access DWARF register number %s"
+msgstr ""
+
+#: dwarf2loc.c:3199
 #, possible-c-format
 msgid "Cannot translate DW_OP_implicit_value of %d bytes"
 msgstr ""
 
-#: dwarf2loc.c:3412
+#: dwarf2loc.c:3562
 msgid "Cannot translate empty pieces to agent expressions"
 msgstr ""
 
-#: dwarf2loc.c:3425
+#: dwarf2loc.c:3575
 msgid "Expression pieces exceed word size"
 msgstr ""
 
-#: dwarf2loc.c:3513
+#: dwarf2loc.c:3663
 msgid "invalid label"
 msgstr ""
 
-#: dwarf2loc.c:3597 dwarf2loc.c:3606
+#. The text is output as "$bad_register_number".
+#. That is why we use the underscores.
+#: dwarf2loc.c:3737
+msgid "bad_register_number"
+msgstr ""
+
+#: dwarf2loc.c:3760 dwarf2loc.c:3769
 #, possible-c-format
 msgid "a variable in $%s"
 msgstr ""
 
-#: dwarf2loc.c:3627
+#: dwarf2loc.c:3790
 #, possible-c-format
 msgid "No block found for address for symbol \"%s\"."
 msgstr ""
 
-#: dwarf2loc.c:3633
+#: dwarf2loc.c:3796
 #, possible-c-format
 msgid "No function found for block for symbol \"%s\"."
 msgstr ""
 
-#: dwarf2loc.c:3646
+#: dwarf2loc.c:3809
 #, possible-c-format
 msgid "Unexpected opcode after DW_OP_breg%u for symbol \"%s\"."
 msgstr ""
 
-#: dwarf2loc.c:3664
+#: dwarf2loc.c:3827
 #, possible-c-format
 msgid "a variable at frame base reg $%s offset %s+%s"
 msgstr ""
 
-#: dwarf2loc.c:3676
+#: dwarf2loc.c:3839
 #, possible-c-format
 msgid "a variable at offset %s from base reg $%s"
 msgstr ""
 
-#: dwarf2loc.c:3707 dwarf2loc.c:3730
+#: dwarf2loc.c:3871 dwarf2loc.c:3895
 #, possible-c-format
 msgid ""
 "a thread-local variable at offset 0x%s in the thread-local storage for `%s'"
 msgstr ""
 
-#: dwarf2loc.c:3741
+#: dwarf2loc.c:3906
 #, possible-c-format
 msgid "the constant %d"
 msgstr ""
 
-#: dwarf2loc.c:3775
+#: dwarf2loc.c:3940
 #, possible-c-format
 msgid "Unrecognized DWARF opcode 0x%02x at %ld"
 msgstr ""
 
-#: dwarf2loc.c:4137
+#: dwarf2loc.c:4309
 msgid ", and "
 msgstr ""
 
-#: dwarf2loc.c:4153
+#: dwarf2loc.c:4325
 msgid "a complex DWARF expression:\n"
 msgstr ""
 
-#: dwarf2loc.c:4175
+#: dwarf2loc.c:4347
 #, possible-c-format
 msgid "an empty %s-byte piece"
 msgstr ""
 
-#: dwarf2loc.c:4178
+#: dwarf2loc.c:4350
 #, possible-c-format
 msgid " [%s-byte piece]"
 msgstr ""
 
-#: dwarf2loc.c:4190
+#: dwarf2loc.c:4362
 #, possible-c-format
 msgid "an empty %s-bit piece"
 msgstr ""
 
-#: dwarf2loc.c:4194
+#: dwarf2loc.c:4366
 #, possible-c-format
 msgid " [%s-bit piece, offset %s bits]"
 msgstr ""
 
-#: dwarf2loc.c:4206
+#: dwarf2loc.c:4378
 #, possible-c-format
 msgid "Corrupted DWARF2 expression for \"%s\"."
 msgstr ""
 
-#: dwarf2loc.c:4258 dwarf2loc.c:4464
+#: dwarf2loc.c:4433 dwarf2loc.c:4646
 #, possible-c-format
 msgid "symbol \"%s\" is optimized out"
 msgstr ""
 
-#: dwarf2loc.c:4363
+#: dwarf2loc.c:4543
 msgid "multi-location:\n"
 msgstr ""
 
-#: dwarf2loc.c:4390
+#: dwarf2loc.c:4570
 #, possible-c-format
 msgid "  Base address %s"
 msgstr ""
 
-#: dwarf2loc.c:4398
+#: dwarf2loc.c:4578
 #, possible-c-format
 msgid "Corrupted DWARF expression for symbol \"%s\"."
 msgstr ""
 
 #. (It would improve readability to print only the minimum
 #. necessary digits of the second number of the range.)
-#: dwarf2loc.c:4416
+#: dwarf2loc.c:4596
 #, possible-c-format
 msgid "  Range %s-%s: "
 msgstr ""
 
-#: dwarf2loc.c:4492
+#: dwarf2loc.c:4674
 msgid "Set entry values and tail call frames debugging."
 msgstr ""
 
-#: dwarf2loc.c:4494
+#: dwarf2loc.c:4676
 msgid "Show entry values and tail call frames debugging."
 msgstr ""
 
-#: dwarf2loc.c:4496
+#: dwarf2loc.c:4678
 msgid ""
 "When non-zero, the process of determining parameter values from function "
 "entry point and tail call frames will be printed."
 msgstr ""
 
-#: dwarf2read.c:1384
+#: dwarf2read.c:1415
 #, possible-c-format
 msgid "The upper bound on the age of cached DWARF compilation units is %s.\n"
 msgstr ""
 
-#: dwarf2read.c:1881
+#: dwarf2read.c:1945
 msgid "statement list doesn't fit in .debug_line section"
 msgstr ""
 
-#: dwarf2read.c:1888
+#: dwarf2read.c:1952
 msgid ".debug_line section has line data without a file"
 msgstr ""
 
-#: dwarf2read.c:1895
+#: dwarf2read.c:1959
 msgid ".debug_line section has line program sequence without an end"
 msgstr ""
 
-#: dwarf2read.c:1902
+#: dwarf2read.c:1966
 msgid "location expression too complex"
 msgstr ""
 
-#: dwarf2read.c:1910
+#: dwarf2read.c:1974
 #, possible-c-format
 msgid "const value length mismatch for '%s', got %d, expected %d"
 msgstr ""
 
-#: dwarf2read.c:1918
+#: dwarf2read.c:1982
 #, possible-c-format
 msgid "debug info runs off end of %s section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:1928
+#: dwarf2read.c:1992
 #, possible-c-format
 msgid ""
 "macro debug info contains a malformed macro definition:\n"
 "`%s'"
 msgstr ""
 
-#: dwarf2read.c:1937
+#: dwarf2read.c:2001
 #, possible-c-format
 msgid "invalid attribute class or form for '%s' in '%s'"
 msgstr ""
 
-#: dwarf2read.c:2292
+#: dwarf2read.c:2372
 #, possible-c-format
 msgid ""
 "Dwarf Error: DWP format V2 with relocations is not supported in section %s "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:2336
+#: dwarf2read.c:2416
 #, possible-c-format
 msgid "Dwarf Error: Can't read DWARF data in section %s [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:2466
+#: dwarf2read.c:2546
 #, possible-c-format
 msgid "could not read '.gnu_debugaltlink' section: %s"
 msgstr ""
 
-#: dwarf2read.c:2505
+#: dwarf2read.c:2582
 #, possible-c-format
 msgid "could not find '.gnu_debugaltlink' file for %s"
 msgstr ""
 
-#: dwarf2read.c:2914
+#: dwarf2read.c:2992
 #, possible-c-format
 msgid ".gdb_index address table has invalid range (%s - %s)"
 msgstr ""
 
-#: dwarf2read.c:2922
+#: dwarf2read.c:3000
 #, possible-c-format
 msgid ".gdb_index address table has invalid CU number %u"
 msgstr ""
 
-#: dwarf2read.c:3079
+#: dwarf2read.c:3157
 #, possible-c-format
 msgid "Skipping obsolete .gdb_index section in %s."
 msgstr ""
 
-#: dwarf2read.c:3098
+#: dwarf2read.c:3176
 #, possible-c-format
 msgid ""
 "Skipping deprecated .gdb_index section in %s.\n"
@@ -9536,286 +9587,311 @@ msgid ""
 "to use the section anyway."
 msgstr ""
 
-#: dwarf2read.c:3192
+#: dwarf2read.c:3270
 #, possible-c-format
 msgid "could not read '.gdb_index' section from %s; skipping"
 msgstr ""
 
-#: dwarf2read.c:3593 dwarf2read.c:4015
+#: dwarf2read.c:3670 dwarf2read.c:4084
 #, possible-c-format
 msgid ".gdb_index entry has bad CU index [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:3713
+#: dwarf2read.c:3790
 #, possible-c-format
 msgid "  Number of read CUs: %d\n"
 msgstr ""
 
-#: dwarf2read.c:3714
+#: dwarf2read.c:3791
 #, possible-c-format
 msgid "  Number of unread CUs: %d\n"
 msgstr ""
 
-#: dwarf2read.c:4088
+#: dwarf2read.c:4157
 #, possible-c-format
 msgid "(Internal error: pc %s in read in CU, but not in symtab.)"
 msgstr ""
 
-#: dwarf2read.c:4336
+#: dwarf2read.c:4409
+msgid "read_comp_unit_head: invalid section_kind"
+msgstr ""
+
+#: dwarf2read.c:4420
+#, possible-c-format
+msgid ""
+"Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_compile, "
+"should be DW_UT_type) [in module %s]"
+msgstr ""
+
+#: dwarf2read.c:4428
+#, possible-c-format
+msgid ""
+"Dwarf Error: wrong unit_type in compilation unit header (is %d, should be %d "
+"or %d) [in module %s]"
+msgstr ""
+
+#: dwarf2read.c:4447
 msgid "read_comp_unit_head: dwarf from non elf file"
 msgstr ""
 
-#: dwarf2read.c:4371
+#: dwarf2read.c:4461
+#, possible-c-format
+msgid ""
+"Dwarf Error: Too big type_offset in compilation unit header (is %s) [in "
+"module %s]"
+msgstr ""
+
+#: dwarf2read.c:4497
 #, possible-c-format
 msgid ""
 "Dwarf Error: wrong version in compilation unit header (is %d, should be 2, "
-"3, or 4) [in module %s]"
+"3, 4 or 5) [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:4377
+#: dwarf2read.c:4503
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + "
 "6) [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:4386
+#: dwarf2read.c:4512
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + "
 "0) [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:4727
+#: dwarf2read.c:4812
 #, possible-c-format
 msgid ""
 "debug type entry at offset 0x%x is duplicate to the entry at offset 0x%x, "
 "signature %s"
 msgstr ""
 
-#: dwarf2read.c:5150
+#: dwarf2read.c:5256
 #, possible-c-format
 msgid ""
 "Dwarf Error: signature mismatch %s vs %s while reading TU at offset 0x%x [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:5290
+#: dwarf2read.c:5391
 #, possible-c-format
 msgid "Dwarf Error: missing dwo_id for dwo_name %s [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:5579
+#: dwarf2read.c:5680
 #, possible-c-format
 msgid ""
 "compilation unit with DW_AT_GNU_dwo_name has children (offset 0x%x) [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:6705 dwarf2read.c:8207
+#: dwarf2read.c:6797 dwarf2read.c:8300
 #, possible-c-format
 msgid ""
 "Dwarf Error: DW_TAG_imported_unit is not supported in type units [in module %"
 "s]"
 msgstr ""
 
-#: dwarf2read.c:6823
+#: dwarf2read.c:6914
 #, possible-c-format
 msgid "unhandled containing DIE tag %d for DIE at %d"
 msgstr ""
 
-#: dwarf2read.c:7183 dwarf2read.c:15641
+#: dwarf2read.c:7268 dwarf2read.c:15949
 msgid "malformed enumerator DIE ignored"
 msgstr ""
 
-#: dwarf2read.c:7221
+#: dwarf2read.c:7306
 #, possible-c-format
 msgid ""
 "Dwarf Error: Could not find abbrev number %d in %s at offset 0x%x [in module "
 "%s]"
 msgstr ""
 
-#: dwarf2read.c:7278 dwarf2read.c:15865
+#: dwarf2read.c:7362 dwarf2read.c:16171
 msgid "ignoring absolute DW_AT_sibling"
 msgstr ""
 
-#: dwarf2read.c:7286 dwarf2read.c:15873
+#: dwarf2read.c:7370 dwarf2read.c:16179
 msgid "DW_AT_sibling points backwards"
 msgstr ""
 
-#: dwarf2read.c:7371 dwarf2read.c:16382
+#: dwarf2read.c:7459 dwarf2read.c:16721
 #, possible-c-format
 msgid "Dwarf Error: Cannot handle %s in DWARF reader [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:7416
+#: dwarf2read.c:7504
 #, possible-c-format
 msgid "bug: psymtab for %s is already read in."
 msgstr ""
 
-#: dwarf2read.c:7423 mdebugread.c:282
+#: dwarf2read.c:7511 mdebugread.c:283
 #, possible-c-format
 msgid "Reading in symbols for %s..."
 msgstr ""
 
-#: dwarf2read.c:7451 mdebugread.c:295 psymtab.c:101 symfile.c:1223
+#: dwarf2read.c:7542 mdebugread.c:296 psymtab.c:97 symfile.c:1218
 msgid "done.\n"
 msgstr ""
 
-#: dwarf2read.c:7832
+#: dwarf2read.c:7925
 #, possible-c-format
 msgid "Symtab %s has objects from two different Go packages: %s and %s"
 msgstr ""
 
-#: dwarf2read.c:8330
+#: dwarf2read.c:8423
 #, possible-c-format
 msgid "Tag '%s' has unexpected children"
 msgstr ""
 
-#: dwarf2read.c:8542
+#: dwarf2read.c:8628
 msgid "template parameter missing DW_AT_type"
 msgstr ""
 
-#: dwarf2read.c:8558
+#: dwarf2read.c:8644
 msgid "template parameter missing DW_AT_const_value"
 msgstr ""
 
-#: dwarf2read.c:8772
+#: dwarf2read.c:8845
 #, possible-c-format
 msgid ""
 "Computed physname <%s> does not match demangled <%s> (from linkage <%s>) - "
 "DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:8836
+#: dwarf2read.c:8910
 #, possible-c-format
 msgid "DIE at 0x%x has too many recursively imported declarations"
 msgstr ""
 
-#: dwarf2read.c:8881 dwarf2read.c:8972
+#: dwarf2read.c:8973 dwarf2read.c:9065
 #, possible-c-format
 msgid "Tag '%s' has no DW_AT_import"
 msgstr ""
 
-#: dwarf2read.c:8963
+#: dwarf2read.c:9056
 #, possible-c-format
 msgid "child DW_TAG_imported_declaration expected - DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:8984
+#: dwarf2read.c:9077
 #, possible-c-format
 msgid ""
 "child DW_TAG_imported_declaration has unknown imported name - DIE at 0x%x "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9241
-msgid "CU refers to both DW_AT_GNU_macros and DW_AT_macro_info"
+#: dwarf2read.c:9326
+msgid "CU refers to both DW_AT_macros and DW_AT_macro_info"
 msgstr ""
 
-#: dwarf2read.c:9532
+#: dwarf2read.c:9620
 #, possible-c-format
 msgid ""
 "Dwarf Error: debug entry at offset 0x%x is missing its dwo_id [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9608
+#: dwarf2read.c:9690
 #, possible-c-format
 msgid "Multiple CUs in DWO file %s [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9796
+#: dwarf2read.c:9878
 #, possible-c-format
 msgid "Dwarf Error: unsupported DWP file version (%s) [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9802
+#: dwarf2read.c:9884
 #, possible-c-format
 msgid ""
 "Dwarf Error: number of slots in DWP hash table (%s) is not power of 2 [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:9824
+#: dwarf2read.c:9906
 #, possible-c-format
 msgid "Empty DWP but nr_slots,nr_units,nr_columns not all zero [in modules %s]"
 msgstr ""
 
-#: dwarf2read.c:9848
+#: dwarf2read.c:9930
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, too few columns in section table [in module "
 "%s]"
 msgstr ""
 
-#: dwarf2read.c:9854
+#: dwarf2read.c:9936
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, too many columns in section table [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:9866
+#: dwarf2read.c:9948
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, bad section id %d in section table [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:9872
+#: dwarf2read.c:9954
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, duplicate section id %d in section table "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9884
+#: dwarf2read.c:9966
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, missing/duplicate DWO info/types section "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9891
+#: dwarf2read.c:9973
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, missing DWO abbrev section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:9903
+#: dwarf2read.c:9985
 #, possible-c-format
 msgid "Dwarf Error: DWP index section is corrupt (too small) [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:10055
+#: dwarf2read.c:10136
 #, possible-c-format
 msgid ""
 "Dwarf Error: bad DWP hash table, section number too large [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:10063
+#: dwarf2read.c:10144
 #, possible-c-format
 msgid "Dwarf Error: bad DWP hash table, invalid section found [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:10073
+#: dwarf2read.c:10154
 #, possible-c-format
 msgid "Dwarf Error: bad DWP hash table, missing DWO sections [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:10079
+#: dwarf2read.c:10160
 #, possible-c-format
 msgid "Dwarf Error: bad DWP hash table, too many DWO sections [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:10186
+#: dwarf2read.c:10268
 #, possible-c-format
 msgid ""
 "Dwarf Error: Bad DWP V2 section info, doesn't fit in section %s [in module %"
 "s]"
 msgstr ""
 
-#: dwarf2read.c:10431
+#: dwarf2read.c:10513
 #, possible-c-format
 msgid "Dwarf Error: bad DWP hash table, lookup didn't terminate [in module %s]"
 msgstr ""
@@ -9823,263 +9899,276 @@ msgstr ""
 #. Technically speaking, we should try to limp along, but this is
 #. pretty bizarre.  We use pulongest here because that's the established
 #. portability solution (e.g, we cannot use %u for uint32_t).
-#: dwarf2read.c:10866
+#: dwarf2read.c:10957
 #, possible-c-format
 msgid ""
 "Dwarf Error: DWP file CU version %s doesn't match TU version %s [in DWP file "
 "%s]"
 msgstr ""
 
-#: dwarf2read.c:11027
+#: dwarf2read.c:11120
 #, possible-c-format
 msgid ""
 "Could not find DWO %s %s(%s)%s referenced by %s at offset 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11211
+#: dwarf2read.c:11302
 #, possible-c-format
 msgid "DIE 0x%x and its abstract origin 0x%x have different tags"
 msgstr ""
 
-#: dwarf2read.c:11265
+#: dwarf2read.c:11357
 #, possible-c-format
 msgid "Child DIE 0x%x and its abstract origin 0x%x have different tags"
 msgstr ""
 
-#: dwarf2read.c:11270
+#: dwarf2read.c:11362
 #, possible-c-format
 msgid "Child DIE 0x%x and its abstract origin 0x%x have different parents"
 msgstr ""
 
-#: dwarf2read.c:11282
+#: dwarf2read.c:11374
 #, possible-c-format
 msgid ""
 "Multiple children of DIE 0x%x refer to DIE 0x%x as their abstract origin"
 msgstr ""
 
-#: dwarf2read.c:11351
+#: dwarf2read.c:11443
 #, possible-c-format
 msgid "missing name for subprogram DIE at %d"
 msgstr ""
 
-#: dwarf2read.c:11362
+#: dwarf2read.c:11455
 #, possible-c-format
 msgid "cannot get low and high bounds for subprogram DIE at %d"
 msgstr ""
 
-#: dwarf2read.c:11567
+#: dwarf2read.c:11690
 #, possible-c-format
-msgid "missing DW_AT_low_pc for DW_TAG_GNU_call_site DIE 0x%x [in module %s]"
+msgid ""
+"missing DW_AT_call_return_pc for DW_TAG_call_site DIE 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11584
+#: dwarf2read.c:11707
 #, possible-c-format
-msgid "Duplicate PC %s for DW_TAG_GNU_call_site DIE 0x%x [in module %s]"
+msgid "Duplicate PC %s for DW_TAG_call_site DIE 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11600
+#: dwarf2read.c:11724
 #, possible-c-format
 msgid ""
-"Tag %d is not DW_TAG_GNU_call_site_parameter in DW_TAG_GNU_call_site child "
-"DIE 0x%x [in module %s]"
+"Tag %d is not DW_TAG_call_site_parameter in DW_TAG_call_site child DIE 0x%x "
+"[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11659
+#: dwarf2read.c:11787
 #, possible-c-format
-msgid ""
-"Cannot find function owning DW_TAG_GNU_call_site DIE 0x%x [in module %s]"
+msgid "Cannot find function owning DW_TAG_call_site DIE 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11705
+#: dwarf2read.c:11840
 #, possible-c-format
 msgid ""
-"DW_AT_GNU_call_site_target target DIE has invalid physname, for referencing "
-"DIE 0x%x [in module %s]"
+"DW_AT_call_target target DIE has invalid physname, for referencing DIE 0x%x "
+"[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11718
+#: dwarf2read.c:11854
 #, possible-c-format
 msgid ""
-"DW_AT_GNU_call_site_target target DIE has invalid low pc, for referencing "
-"DIE 0x%x [in module %s]"
+"DW_AT_call_target target DIE has invalid low pc, for referencing DIE 0x%x "
+"[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11730
+#: dwarf2read.c:11866
 #, possible-c-format
 msgid ""
-"DW_TAG_GNU_call_site DW_AT_GNU_call_site_target is neither block nor "
-"reference, for DIE 0x%x [in module %s]"
+"DW_TAG_call_site DW_AT_call_target is neither block nor reference, for DIE 0x"
+"%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11770
+#: dwarf2read.c:11913
 #, possible-c-format
 msgid ""
-"DW_AT_abstract_origin offset is not in CU for DW_TAG_GNU_call_site child DIE "
-"0x%x [in module %s]"
+"DW_AT_call_parameter offset is not in CU for DW_TAG_call_site child DIE 0x%x "
+"[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11782
+#: dwarf2read.c:11924
 #, possible-c-format
 msgid ""
-"No DW_FORM_block* DW_AT_location for DW_TAG_GNU_call_site child DIE 0x%x [in "
+"No DW_FORM_block* DW_AT_location for DW_TAG_call_site child DIE 0x%x [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:11800
+#: dwarf2read.c:11942
 #, possible-c-format
 msgid ""
 "Only single DW_OP_reg or DW_OP_fbreg is supported for DW_FORM_block* "
-"DW_AT_location is supported for DW_TAG_GNU_call_site child DIE 0x%x [in "
-"module %s]"
+"DW_AT_location is supported for DW_TAG_call_site child DIE 0x%x [in module %"
+"s]"
 msgstr ""
 
-#: dwarf2read.c:11813
+#: dwarf2read.c:11957
 #, possible-c-format
 msgid ""
-"No DW_FORM_block* DW_AT_GNU_call_site_value for DW_TAG_GNU_call_site child "
-"DIE 0x%x [in module %s]"
+"No DW_FORM_block* DW_AT_call_value for DW_TAG_call_site child DIE 0x%x [in "
+"module %s]"
 msgstr ""
 
-#: dwarf2read.c:11831
+#: dwarf2read.c:11977
 #, possible-c-format
 msgid ""
-"No DW_FORM_block* DW_AT_GNU_call_site_data_value for DW_TAG_GNU_call_site "
-"child DIE 0x%x [in module %s]"
+"No DW_FORM_block* DW_AT_call_data_value for DW_TAG_call_site child DIE 0x%x "
+"[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:11876
+#: dwarf2read.c:12024 dwarf2read.c:12197
 #, possible-c-format
 msgid "Offset %d out of bounds for DW_AT_ranges attribute"
 msgstr ""
 
-#: dwarf2read.c:11930 dwarf2read.c:12276
-msgid "Invalid .debug_ranges data (no base address)"
+#: dwarf2read.c:12106 dwarf2read.c:12119
+msgid "Invalid .debug_rnglists data (no base address)"
 msgstr ""
 
-#: dwarf2read.c:11938 dwarf2read.c:12285
-msgid "Invalid .debug_ranges data (inverted range)"
+#: dwarf2read.c:12127
+msgid "Invalid .debug_rnglists data (inverted range)"
 msgstr ""
 
-#: dwarf2read.c:11955 dwarf2read.c:12302
+#: dwarf2read.c:12144
 #, possible-c-format
-msgid ".debug_ranges entry has start address of zero [in module %s]"
+msgid ".debug_rnglists entry has start address of zero [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:12243
+#: dwarf2read.c:12155
 #, possible-c-format
-msgid "Offset %lu out of bounds for DW_AT_ranges attribute"
+msgid "Offset %d is not terminated for DW_AT_ranges attribute"
 msgstr ""
 
-#: dwarf2read.c:12730
-#, possible-c-format
-msgid "unsupported accessibility %d"
+#: dwarf2read.c:12237
+msgid "Invalid .debug_ranges data (no base address)"
 msgstr ""
 
-#: dwarf2read.c:12742
-msgid "unexpected virtuality in component of Ada type"
+#: dwarf2read.c:12245
+msgid "Invalid .debug_ranges data (inverted range)"
 msgstr ""
 
-#: dwarf2read.c:12795
-msgid "unexpected member function in Ada type"
+#: dwarf2read.c:12262
+#, possible-c-format
+msgid ".debug_ranges entry has start address of zero [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:12878
+#: dwarf2read.c:13005
+#, possible-c-format
+msgid "unsupported accessibility %d"
+msgstr ""
+
+#: dwarf2read.c:13017
+msgid "unexpected virtuality in component of Ada type"
+msgstr ""
+
+#: dwarf2read.c:13070
+msgid "unexpected member function in Ada type"
+msgstr ""
+
+#: dwarf2read.c:13153
 #, possible-c-format
 msgid "member function type missing for '%s'"
 msgstr ""
 
-#: dwarf2read.c:12958
+#: dwarf2read.c:13226
 #, possible-c-format
 msgid "cannot determine context for virtual member function \"%s\" (offset %d)"
 msgstr ""
 
-#: dwarf2read.c:12986
+#: dwarf2read.c:13254
 #, possible-c-format
 msgid ""
 "Member function \"%s\" (offset %d) is virtual but the vtable offset is not "
 "specified"
 msgstr ""
 
-#: dwarf2read.c:13005
+#: dwarf2read.c:13273
 msgid "unexpected member functions in Ada type"
 msgstr ""
 
-#: dwarf2read.c:13336
+#: dwarf2read.c:13623
 #, possible-c-format
 msgid "virtual function table pointer not found when defining class '%s'"
 msgstr ""
 
-#: dwarf2read.c:13779
+#: dwarf2read.c:14064
 msgid "DW_AT_byte_size for array type smaller than the total size of elements"
 msgstr ""
 
-#: dwarf2read.c:14000
+#: dwarf2read.c:14287
 #, possible-c-format
 msgid ""
 "Variable in common block has DW_AT_data_member_location - DIE at 0x%x [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:14123
+#: dwarf2read.c:14409
 #, possible-c-format
 msgid "DW_TAG_module has no name, offset 0x%x"
 msgstr ""
 
-#: dwarf2read.c:14239
+#: dwarf2read.c:14523
 #, possible-c-format
 msgid "invalid pointer size %d"
 msgstr ""
 
-#: dwarf2read.c:14677
+#: dwarf2read.c:14948
 #, possible-c-format
 msgid "Self-referential DW_TAG_typedef - DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:14714
+#: dwarf2read.c:15003
 msgid "DW_AT_name missing from DW_TAG_base_type"
 msgstr ""
 
-#: dwarf2read.c:14767
+#: dwarf2read.c:15061
 #, possible-c-format
 msgid "unsupported DW_AT_encoding: '%s'"
 msgstr ""
 
-#: dwarf2read.c:14950
+#: dwarf2read.c:15242
 #, possible-c-format
 msgid "Missing DW_AT_lower_bound - DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:15192
+#: dwarf2read.c:15484
 #, possible-c-format
 msgid "Dwarf Error: could not find abbrev number %d [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:15625
+#: dwarf2read.c:15933
 #, possible-c-format
 msgid ""
 "DW_TAG_typedef has childen - GCC PR debug/47510 bug - DIE at 0x%x [in module "
 "%s]"
 msgstr ""
 
-#: dwarf2read.c:15943
+#: dwarf2read.c:16253
 #, possible-c-format
 msgid "DW_AT_low_pc %s is zero for DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:15954
+#: dwarf2read.c:16264
 #, possible-c-format
 msgid ""
 "DW_AT_low_pc %s is not < DW_AT_high_pc %s for DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16009
+#: dwarf2read.c:16320
 #, possible-c-format
 msgid ""
 "Dwarf Error: Type Unit at offset 0x%lx contains external reference to offset "
 "0x%lx [in module %s].\n"
 msgstr ""
 
-#: dwarf2read.c:16044
+#: dwarf2read.c:16355
 #, possible-c-format
 msgid "could not find partial DIE 0x%x in cache [from module %s]\n"
 msgstr ""
@@ -10088,124 +10177,139 @@ msgstr ""
 #. Later we can turn this into a complaint.
 #. For now flag a hard error.
 #. Later we can turn this into a complaint if warranted.
-#: dwarf2read.c:16356 dwarf2read.c:16368
+#: dwarf2read.c:16695 dwarf2read.c:16707
 #, possible-c-format
 msgid "Dwarf Error: %s found in non-DWO CU [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16403
+#: dwarf2read.c:16742
 #, possible-c-format
 msgid "Suspicious DW_AT_byte_size value treated as zero instead of %s"
 msgstr ""
 
-#: dwarf2read.c:16488
+#: dwarf2read.c:16828
 #, possible-c-format
 msgid "read_address: bad switch, signed [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16507
+#: dwarf2read.c:16847
 #, possible-c-format
 msgid "read_address: bad switch, unsigned [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16601
+#: dwarf2read.c:16941
 msgid "intermixed 32-bit and 64-bit DWARF sections"
 msgstr ""
 
-#: dwarf2read.c:16638
+#: dwarf2read.c:16978
 #, possible-c-format
 msgid "read_offset_1: bad switch [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16677
+#: dwarf2read.c:17023
 #, possible-c-format
-msgid "DW_FORM_strp used without .debug_str section [in module %s]"
+msgid "%s used without %s section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16680
+#: dwarf2read.c:17026
 #, possible-c-format
-msgid "DW_FORM_strp pointing outside of .debug_str section [in module %s]"
+msgid "%s pointing outside of %s section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16700
+#: dwarf2read.c:17066
 #, possible-c-format
 msgid "DW_FORM_GNU_strp_alt used without .debug_str section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16704
+#: dwarf2read.c:17070
 #, possible-c-format
 msgid ""
 "DW_FORM_GNU_strp_alt pointing outside of .debug_str section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16795
+#: dwarf2read.c:17177
 #, possible-c-format
 msgid "DW_FORM_addr_index used without .debug_addr section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16798
+#: dwarf2read.c:17180
 #, possible-c-format
 msgid ""
 "DW_FORM_addr_index pointing outside of .debug_addr section [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16928
+#: dwarf2read.c:17310
 #, possible-c-format
 msgid ""
 "%s used without .debug_str.dwo section in CU at offset 0x%lx [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16932
+#: dwarf2read.c:17314
 #, possible-c-format
 msgid ""
 "%s used without .debug_str_offsets.dwo section in CU at offset 0x%lx [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:16936
+#: dwarf2read.c:17318
 #, possible-c-format
 msgid ""
 "%s pointing outside of .debug_str_offsets.dwo section in CU at offset 0x%lx "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:16946
+#: dwarf2read.c:17328
 #, possible-c-format
 msgid ""
 "Offset from %s pointing outside of .debug_str.dwo section in CU at offset 0x%"
 "lx [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:17267
+#: dwarf2read.c:17474
+#, possible-c-format
+msgid "string type expected for attribute %s for DIE at 0x%x in module %s"
+msgstr ""
+
+#: dwarf2read.c:17726
+#, possible-c-format
+msgid "Unknown format content type %s"
+msgstr ""
+
+#: dwarf2read.c:17809
 msgid "missing .debug_line.dwo section"
 msgstr ""
 
-#: dwarf2read.c:17269
+#: dwarf2read.c:17811
 msgid "missing .debug_line section"
 msgstr ""
 
-#: dwarf2read.c:17314
+#: dwarf2read.c:17856
 msgid "unsupported version in .debug_line section"
 msgstr ""
 
-#: dwarf2read.c:17333
+#: dwarf2read.c:17872
+#, possible-c-format
+msgid "unsupported segment selector size %u in .debug_line section"
+msgstr ""
+
+#: dwarf2read.c:17894
 msgid "invalid maximum_ops_per_instruction in `.debug_line' section"
 msgstr ""
 
-#: dwarf2read.c:17383
+#: dwarf2read.c:17955
 msgid "line number info header doesn't fit in `.debug_line' section"
 msgstr ""
 
-#: dwarf2read.c:17734
+#: dwarf2read.c:18306
 #, possible-c-format
 msgid ".debug_line address at offset 0x%lx is 0 [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:17894 dwarf2read.c:17903
+#: dwarf2read.c:18466 dwarf2read.c:18475
 msgid "mangled .debug_line section"
 msgstr ""
 
-#: dwarf2read.c:18321
+#: dwarf2read.c:18893
 msgid "file index out of range"
 msgstr ""
 
@@ -10213,350 +10317,367 @@ msgstr ""
 #. trash data, but since we must specifically ignore things
 #. we don't recognize, there is nothing else we should do at
 #. this point.
-#: dwarf2read.c:18615
+#: dwarf2read.c:19184
 #, possible-c-format
 msgid "unsupported tag: '%s'"
 msgstr ""
 
-#: dwarf2read.c:18780 dwarf2read.c:20196
+#: dwarf2read.c:19350 dwarf2read.c:20770
 #, possible-c-format
 msgid "unsupported const value attribute form: '%s'"
 msgstr ""
 
-#: dwarf2read.c:18899
+#: dwarf2read.c:19468
 #, possible-c-format
 msgid ""
 "Dwarf Error: Problem turning containing type into gdb type [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:18913
+#: dwarf2read.c:19482
 #, possible-c-format
 msgid "<unknown type in %s, CU 0x%x, DIE 0x%x>"
 msgstr ""
 
-#: dwarf2read.c:18965
+#: dwarf2read.c:19534
 #, possible-c-format
 msgid "Dwarf Error: Bad type attribute %s in DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:19091
+#: dwarf2read.c:19660
 #, possible-c-format
 msgid "unexpected tag in read_type_die: '%s'"
 msgstr ""
 
-#: dwarf2read.c:19307
+#: dwarf2read.c:19877
 #, possible-c-format
 msgid "template param type '%s' defined within parent '%s'"
 msgstr ""
 
-#: dwarf2read.c:19855
+#: dwarf2read.c:20412
 #, possible-c-format
 msgid "unsupported die ref attribute form: '%s'"
 msgstr ""
 
-#: dwarf2read.c:19877
+#: dwarf2read.c:20435
 #, possible-c-format
 msgid "Attribute value is not a constant (%s)"
 msgstr ""
 
-#: dwarf2read.c:19900
+#: dwarf2read.c:20458
 #, possible-c-format
 msgid "Dwarf Error: Expected reference attribute [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:19974
+#: dwarf2read.c:20533
 #, possible-c-format
 msgid ""
 "Dwarf Error: Cannot find DIE at 0x%x referenced from DIE at 0x%x [in module %"
 "s]"
 msgstr ""
 
-#: dwarf2read.c:20005 dwarf2read.c:20106
+#. We shouldn't get here for a dummy CU, but don't crash on the user.
+#. Instead just throw an error, not much else we can do.
+#: dwarf2read.c:20565 dwarf2read.c:20673
+#, possible-c-format
+msgid "Dwarf Error: Dummy CU at 0x%x referenced in module %s"
+msgstr ""
+
+#: dwarf2read.c:20571 dwarf2read.c:20679
 #, possible-c-format
 msgid "Dwarf Error: Cannot find DIE at 0x%x referenced in module %s"
 msgstr ""
 
-#: dwarf2read.c:20032
+#: dwarf2read.c:20598
 #, possible-c-format
 msgid ""
 "Dwarf Error: DIE at 0x%x referenced in module %s is neither DW_FORM_block* "
 "nor DW_FORM_exprloc"
 msgstr ""
 
-#: dwarf2read.c:20288 dwarf2read.c:20325
+#: dwarf2read.c:20861 dwarf2read.c:20898
 #, possible-c-format
 msgid ""
 "Dwarf Error: Cannot find signatured DIE %s referenced from DIE at 0x%x [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:20298 dwarf2read.c:20357
+#: dwarf2read.c:20871 dwarf2read.c:20930
 #, possible-c-format
 msgid ""
 "Dwarf Error: Problem reading signatured DIE %s referenced from DIE at 0x%x "
 "[in module %s]"
 msgstr ""
 
-#: dwarf2read.c:20347
+#: dwarf2read.c:20920
 #, possible-c-format
 msgid ""
 "Dwarf Error: Cannot build signatured type %s referenced from DIE at 0x%x [in "
 "module %s]"
 msgstr ""
 
-#: dwarf2read.c:20390
+#: dwarf2read.c:20963
 #, possible-c-format
 msgid ""
 "Dwarf Error: DW_AT_signature has bad form %s in DIE at 0x%x [in module %s]"
 msgstr ""
 
-#: dwarf2read.c:20709
+#: dwarf2read.c:21283
 #, possible-c-format
 msgid "unsupported stack op: '%s'"
 msgstr ""
 
-#: dwarf2read.c:20712
+#: dwarf2read.c:21286
 #, possible-c-format
 msgid "unsupported stack op: '%02x'"
 msgstr ""
 
-#: dwarf2read.c:20724
+#: dwarf2read.c:21298
 msgid "location description stack overflow"
 msgstr ""
 
-#: dwarf2read.c:20731
+#: dwarf2read.c:21305
 msgid "location description stack underflow"
 msgstr ""
 
-#: dwarf2read.c:20797
+#: dwarf2read.c:21367
 #, possible-c-format
 msgid "bad file number in macro information (%d)"
 msgstr ""
 
-#: dwarf2read.c:20873
+#: dwarf2read.c:21444
 #, possible-c-format
 msgid ""
 "macro definition contains spaces in formal argument list:\n"
 "`%s'"
 msgstr ""
 
-#: dwarf2read.c:21097
+#: dwarf2read.c:21672
 #, possible-c-format
 msgid "invalid form 0x%x in `%s'"
 msgstr ""
 
-#: dwarf2read.c:21125
+#: dwarf2read.c:21700
 #, possible-c-format
 msgid "unrecognized DW_MACFINO opcode 0x%x"
 msgstr ""
 
-#: dwarf2read.c:21170
+#: dwarf2read.c:21746
 #, possible-c-format
 msgid "unrecognized version `%d' in .debug_macro section"
 msgstr ""
 
-#: dwarf2read.c:21312
+#: dwarf2read.c:21888
 #, possible-c-format
 msgid "debug info with no main source gives macro %s on line %d: %s"
 msgstr ""
 
-#: dwarf2read.c:21314 dwarf2read.c:21323
+#: dwarf2read.c:21890 dwarf2read.c:21899
 msgid "definition"
 msgstr ""
 
-#: dwarf2read.c:21314 dwarf2read.c:21323
+#: dwarf2read.c:21890 dwarf2read.c:21899
 msgid "undefinition"
 msgstr ""
 
-#: dwarf2read.c:21321
+#: dwarf2read.c:21897
 #, possible-c-format
 msgid "debug info gives %s macro %s with %s line %d: %s"
 msgstr ""
 
-#: dwarf2read.c:21322 dwarf2read.c:21353
+#: dwarf2read.c:21898 dwarf2read.c:21929
 msgid "command-line"
 msgstr ""
 
-#: dwarf2read.c:21322
+#: dwarf2read.c:21898
 msgid "in-file"
 msgstr ""
 
-#: dwarf2read.c:21324 dwarf2read.c:21354
+#: dwarf2read.c:21900 dwarf2read.c:21930
 msgid "zero"
 msgstr ""
 
-#: dwarf2read.c:21324 dwarf2read.c:21354
+#: dwarf2read.c:21900 dwarf2read.c:21930
 msgid "non-zero"
 msgstr ""
 
-#: dwarf2read.c:21351
+#: dwarf2read.c:21927
 #, possible-c-format
 msgid "debug info gives source %d included from %s at %s line %d"
 msgstr ""
 
-#: dwarf2read.c:21353
+#: dwarf2read.c:21929 skip.c:331
 msgid "file"
 msgstr ""
 
-#: dwarf2read.c:21370
+#: dwarf2read.c:21946
 msgid "macro debug info has an unmatched `close_file' directive"
 msgstr ""
 
-#: dwarf2read.c:21396
+#: dwarf2read.c:21974
 msgid "no terminating 0-type entry for macros in `.debug_macinfo' section"
 msgstr ""
 
-#: dwarf2read.c:21439
-msgid "recursive DW_MACRO_GNU_transparent_include in .debug_macro section"
+#: dwarf2read.c:22016
+msgid "recursive DW_MACRO_import in .debug_macro section"
 msgstr ""
 
-#: dwarf2read.c:21531
+#: dwarf2read.c:22108
 #, possible-c-format
 msgid "missing %s section"
 msgstr ""
 
-#: dwarf2read.c:21811
+#: dwarf2read.c:22395
 msgid "Location list used without specifying the CU base address."
 msgstr ""
 
-#: dwarf2read.c:21979
+#: dwarf2read.c:22571
 #, possible-c-format
 msgid ""
 "Dwarf Error: could not find partial DIE containing offset 0x%lx [in module %"
 "s]"
 msgstr ""
 
-#: dwarf2read.c:21992
+#: dwarf2read.c:22584
 #, possible-c-format
 msgid "invalid dwarf2 offset %u"
 msgstr ""
 
-#: dwarf2read.c:22290
+#: dwarf2read.c:22871
+#, possible-c-format
+msgid "DW_AT_allocated has the wrong form (%s) at DIE 0x%x"
+msgstr ""
+
+#: dwarf2read.c:22886
+#, possible-c-format
+msgid "DW_AT_associated has the wrong form (%s) at DIE 0x%x"
+msgstr ""
+
+#: dwarf2read.c:22915
 #, possible-c-format
 msgid "A problem internal to GDB: DIE 0x%x has type already set"
 msgstr ""
 
-#: dwarf2read.c:23029
+#: dwarf2read.c:23665
 msgid "Ada is not currently supported by the index"
 msgstr ""
 
-#: dwarf2read.c:23053
+#: dwarf2read.c:23689
 msgid "couldn't data write to file"
 msgstr ""
 
-#: dwarf2read.c:23162
+#: dwarf2read.c:23787
 msgid "Cannot use an index to create the index"
 msgstr ""
 
-#: dwarf2read.c:23165
+#: dwarf2read.c:23790
 msgid "Cannot make an index when the file has multiple .debug_types sections"
 msgstr ""
 
-#: dwarf2read.c:23179
+#: dwarf2read.c:23804
 #, possible-c-format
 msgid "Can't open `%s' for writing"
 msgstr ""
 
-#: dwarf2read.c:23340
+#: dwarf2read.c:23962
 msgid "usage: save gdb-index DIRECTORY"
 msgstr ""
 
-#: dwarf2read.c:23361
+#: dwarf2read.c:23985
 #, possible-c-format
 msgid "Error while writing index for `%s': "
 msgstr ""
 
-#: dwarf2read.c:23378
+#: dwarf2read.c:24002
 #, possible-c-format
 msgid "Whether to always disassemble DWARF expressions is %s.\n"
 msgstr ""
 
-#: dwarf2read.c:23388
+#: dwarf2read.c:24012
 #, possible-c-format
 msgid "Whether to check \"physname\" is %s.\n"
 msgstr ""
 
-#: dwarf2read.c:23402
+#: dwarf2read.c:24026
 msgid ""
 "Set DWARF specific variables.\n"
 "Configure DWARF variables such as the cache size"
 msgstr ""
 
 #. allow-unknown
-#: dwarf2read.c:23408
+#: dwarf2read.c:24032
 msgid ""
 "Show DWARF specific variables\n"
 "Show DWARF variables such as the cache size"
 msgstr ""
 
-#: dwarf2read.c:23415
+#: dwarf2read.c:24039
 msgid "Set the upper bound on the age of cached DWARF compilation units."
 msgstr ""
 
-#: dwarf2read.c:23416
+#: dwarf2read.c:24040
 msgid "Show the upper bound on the age of cached DWARF compilation units."
 msgstr ""
 
-#: dwarf2read.c:23417
+#: dwarf2read.c:24041
 msgid ""
 "A higher limit means that cached compilation units will be stored\n"
 "in memory longer, and more total memory will be used.  Zero disables\n"
 "caching, which can slow down startup."
 msgstr ""
 
-#: dwarf2read.c:23427
+#: dwarf2read.c:24051
 msgid "Set whether `info address' always disassembles DWARF expressions."
 msgstr ""
 
-#: dwarf2read.c:23428
+#: dwarf2read.c:24052
 msgid "Show whether `info address' always disassembles DWARF expressions."
 msgstr ""
 
-#: dwarf2read.c:23429
+#: dwarf2read.c:24053
 msgid ""
 "When enabled, DWARF expressions are always printed in an assembly-like\n"
 "syntax.  When disabled, expressions will be printed in a more\n"
 "conversational style, when possible."
 msgstr ""
 
-#: dwarf2read.c:23438
+#: dwarf2read.c:24062
 msgid "Set debugging of the DWARF reader."
 msgstr ""
 
-#: dwarf2read.c:23439
+#: dwarf2read.c:24063
 msgid "Show debugging of the DWARF reader."
 msgstr ""
 
-#: dwarf2read.c:23440
+#: dwarf2read.c:24064
 msgid ""
 "When enabled (non-zero), debugging messages are printed during DWARF\n"
 "reading and symtab expansion.  A value of 1 (one) provides basic\n"
 "information.  A value greater than 1 provides more verbose information."
 msgstr ""
 
-#: dwarf2read.c:23448
+#: dwarf2read.c:24072
 msgid "Set debugging of the DWARF DIE reader."
 msgstr ""
 
-#: dwarf2read.c:23449
+#: dwarf2read.c:24073
 msgid "Show debugging of the DWARF DIE reader."
 msgstr ""
 
-#: dwarf2read.c:23450
+#: dwarf2read.c:24074
 msgid ""
 "When enabled (non-zero), DIEs are dumped after they are read in.\n"
 "The value is the maximum depth to print."
 msgstr ""
 
-#: dwarf2read.c:23457
+#: dwarf2read.c:24081
 msgid "Set debugging of the dwarf line reader."
 msgstr ""
 
-#: dwarf2read.c:23458
+#: dwarf2read.c:24082
 msgid "Show debugging of the dwarf line reader."
 msgstr ""
 
-#: dwarf2read.c:23459
+#: dwarf2read.c:24083
 msgid ""
 "When enabled (non-zero), line number entries are dumped as they are read "
 "in.\n"
@@ -10564,29 +10685,29 @@ msgid ""
 "A value greater than 1 provides more verbose information."
 msgstr ""
 
-#: dwarf2read.c:23467
+#: dwarf2read.c:24091
 msgid "Set cross-checking of \"physname\" code against demangler."
 msgstr ""
 
-#: dwarf2read.c:23468
+#: dwarf2read.c:24092
 msgid "Show cross-checking of \"physname\" code against demangler."
 msgstr ""
 
-#: dwarf2read.c:23469
+#: dwarf2read.c:24093
 msgid ""
 "When enabled, GDB's internal \"physname\" code is checked against\n"
 "the demangler."
 msgstr ""
 
-#: dwarf2read.c:23476
+#: dwarf2read.c:24100
 msgid "Set whether to use deprecated gdb_index sections."
 msgstr ""
 
-#: dwarf2read.c:23477
+#: dwarf2read.c:24101
 msgid "Show whether to use deprecated gdb_index sections."
 msgstr ""
 
-#: dwarf2read.c:23478
+#: dwarf2read.c:24102
 msgid ""
 "When enabled, deprecated .gdb_index sections are used anyway.\n"
 "Normally they are ignored either because of a missing feature or\n"
@@ -10594,154 +10715,154 @@ msgid ""
 "Warning: This option must be enabled before gdb reads the file."
 msgstr ""
 
-#: dwarf2read.c:23488
+#: dwarf2read.c:24112
 msgid ""
 "Save a gdb-index file.\n"
 "Usage: save gdb-index DIRECTORY"
 msgstr ""
 
-#: elfread.c:149
+#: elfread.c:151
 #, possible-c-format
 msgid "Loadable section \"%s\" outside of ELF segments"
 msgstr ""
 
 #. This case indicates buggy inferior program, the resolved address
 #. should never change.
-#: elfread.c:717
+#: elfread.c:725
 #, possible-c-format
 msgid ""
 "gnu-indirect-function \"%s\" has changed its resolved function_address from %"
 "s to %s"
 msgstr ""
 
-#: elfread.c:970
+#: elfread.c:986
 #, possible-c-format
 msgid "handle_inferior_event: Invalid gnu-indirect-function breakpoint type %d"
 msgstr ""
 
-#: elfread.c:1050 elfread.c:1063 elfread.c:1088 machoread.c:857
-#: machoread.c:875
+#: elfread.c:1066 elfread.c:1079 elfread.c:1105 machoread.c:829
+#: machoread.c:846
 #, possible-c-format
 msgid "Can't read symbols from %s: %s"
 msgstr ""
 
-#: eval.c:330
+#: eval.c:310
 msgid "too many initializers"
 msgstr ""
 
-#: eval.c:334
+#: eval.c:314
 msgid "don't know which variant you want to set"
 msgstr ""
 
-#: eval.c:395
+#: eval.c:375
 msgid "tuple index out of range"
 msgstr ""
 
-#: eval.c:803
+#: eval.c:784
 #, possible-c-format
 msgid "Symbol \"%s\" does not have any specific entry value"
 msgstr ""
 
-#: eval.c:825
+#: eval.c:806
 #, possible-c-format
 msgid "Register $%s not available."
 msgstr ""
 
-#: eval.c:839
+#: eval.c:820
 #, possible-c-format
 msgid "Value of register %s not available."
 msgstr ""
 
-#: eval.c:950
+#: eval.c:931
 msgid "(power)set type with unknown size"
 msgstr ""
 
 #. different element modes.
-#: eval.c:973
+#: eval.c:954
 msgid "POWERSET tuple elements of different mode"
 msgstr ""
 
-#: eval.c:977
+#: eval.c:958
 msgid "incompatible POWERSET tuple elements"
 msgstr ""
 
-#: eval.c:980
+#: eval.c:961
 msgid "empty POWERSET tuple range"
 msgstr ""
 
-#: eval.c:984
+#: eval.c:965
 msgid "POWERSET tuple element out of range"
 msgstr ""
 
-#: eval.c:1150
+#: eval.c:1130
 msgid "no 'respondsTo:' or 'respondsToSelector:' method"
 msgstr ""
 
-#: eval.c:1159
+#: eval.c:1139
 msgid "no 'methodFor:' or 'methodForSelector:' method"
 msgstr ""
 
-#: eval.c:1178
+#: eval.c:1158
 msgid "Target does not respond to this message selector."
 msgstr ""
 
-#: eval.c:1263
+#: eval.c:1243
 msgid "method address has symbol information with non-function type; skipping"
 msgstr ""
 
-#: eval.c:1316
+#: eval.c:1296
 msgid "Expression of type other than \"method returning ...\" used as a method"
 msgstr ""
 
-#: eval.c:1410
+#: eval.c:1390
 msgid "Non-pointer-to-member value used in pointer-to-member construct"
 msgstr ""
 
 #. For the time being, we don't handle this.
-#: eval.c:1632
+#: eval.c:1612
 #, possible-c-format
 msgid "Call to overloaded function %s requires `this' pointer"
 msgstr ""
 
-#: eval.c:1725
+#: eval.c:1705
 msgid "Cannot evaluate function -- may be inlined"
 msgstr ""
 
-#: eval.c:1751 valarith.c:495 valarith.c:614
+#: eval.c:1731 valarith.c:495 valarith.c:614
 msgid "Xmethod is missing return type."
 msgstr ""
 
-#: eval.c:1759
+#: eval.c:1739
 msgid ""
 "Expression of type other than \"Function returning ...\" used as function"
 msgstr ""
 
-#: eval.c:1844
+#: eval.c:1824
 msgid "Cannot perform substring on this type"
 msgstr ""
 
-#: eval.c:1960
+#: eval.c:1941
 msgid "non-pointer-to-member value used in pointer-to-member construct"
 msgstr ""
 
-#: eval.c:2232
+#: eval.c:2213
 #, possible-c-format
 msgid "Too many subscripts for F77 (%d Max)"
 msgstr ""
 
-#: eval.c:2237
+#: eval.c:2218
 msgid "Wrong number of subscripts"
 msgstr ""
 
-#: eval.c:2431
+#: eval.c:2413
 msgid "Non-integral right operand for \"@\" operator."
 msgstr ""
 
-#: eval.c:2502
+#: eval.c:2484
 msgid "Attempt to dereference pointer to member without an object"
 msgstr ""
 
-#: eval.c:2800
+#: eval.c:2782
 msgid "Attempt to use a type as an expression"
 msgstr ""
 
@@ -10753,136 +10874,147 @@ msgstr ""
 #. If there are any cases landing here which mean a user error,
 #. then they should be separate cases, with more descriptive
 #. error messages.
-#: eval.c:2829
+#: eval.c:2811
 msgid "GDB does not (yet) know how to evaluate that kind of expression"
 msgstr ""
 
-#: eval.c:2906
+#: eval.c:2888
 msgid "Attempt to take address of register or constant."
 msgstr ""
 
-#: eval.c:2939 valops.c:1446 valops.c:1461 valops.c:1495
+#: eval.c:2921 valops.c:1445 valops.c:1460 valops.c:1509
 msgid "Attempt to take address of value not located in memory."
 msgstr ""
 
-#: eval.c:3114
+#: eval.c:3095
 msgid "Internal error in eval_type."
 msgstr ""
 
-#: eval.c:3125
+#: eval.c:3106
 msgid "Can't get dimensions for a non-array type"
 msgstr ""
 
-#: event-loop.c:408 event-loop.c:417 event-loop.c:481 event-loop.c:585
-#: event-loop.c:690 event-loop.c:755 event-loop.c:838 event-loop.c:1199
+#: event-loop.c:433 event-loop.c:442 event-loop.c:506 event-loop.c:610
+#: event-loop.c:715 event-loop.c:780 event-loop.c:863 event-loop.c:1234
 msgid "use_poll without HAVE_POLL"
 msgstr ""
 
-#: event-loop.c:679
+#: event-loop.c:704
 #, possible-c-format
 msgid "Error detected on fd %d\n"
 msgstr ""
 
-#: event-loop.c:682
+#: event-loop.c:707
 #, possible-c-format
 msgid "Invalid or non-`poll'able fd %d\n"
 msgstr ""
 
-#: event-loop.c:697
+#: event-loop.c:722
 #, possible-c-format
 msgid "Exception condition detected on fd %d\n"
 msgstr ""
 
-#: event-top.c:420
+#: event-top.c:373
+msgid "double prompt"
+msgstr ""
+
+#. If stdin died, we may as well kill gdb.
+#: event-top.c:491
 msgid "error detected on stdin\n"
 msgstr ""
 
 #. This message is based on ANSI C, section 4.7.  Note that integer
 #. divide by zero causes this, so "float" is a misnomer.
-#: event-top.c:1020
+#: event-top.c:1221
 msgid "Erroneous arithmetic operation."
 msgstr ""
 
-#: exceptions.c:104
+#: exceptions.c:105
 msgid "Bad switch."
 msgstr ""
 
-#: exec.c:72
+#: exec.c:73
 #, possible-c-format
 msgid "Writing into executable and core files is %s.\n"
 msgstr ""
 
-#: exec.c:135 exec.c:213
+#: exec.c:136 exec.c:273
 msgid "No executable file now.\n"
 msgstr ""
 
-#: exec.c:237
+#: exec.c:214
+msgid ""
+"No executable has been specified and target does not support\n"
+"determining executable automatically.  Try using the \"file\" command."
+msgstr ""
+
+#: exec.c:297
 #, possible-c-format
 msgid "writing into executable files is not supported for %s sysroots"
 msgstr ""
 
-#: exec.c:286
+#: exec.c:348
 #, possible-c-format
-msgid "\"%s\": could not open as an executable file: %s"
+msgid "\"%s\": could not open as an executable file: %s."
 msgstr ""
 
-#: exec.c:303
+#: exec.c:365
 #, possible-c-format
 msgid "\"%s\": not in executable format: %s"
 msgstr ""
 
-#: exec.c:313
+#: exec.c:375
 #, possible-c-format
 msgid "\"%s\": can't find the file sections: %s"
 msgstr ""
 
-#: exec.c:355
+#: exec.c:417
 msgid ""
 "A program is being debugged already.\n"
 "Are you sure you want to change the file? "
 msgstr ""
 
-#: exec.c:357
+#: exec.c:419
 msgid "File not changed."
 msgstr ""
 
-#: exec.c:373
+#: exec.c:435
 msgid "No executable file name was specified"
 msgstr ""
 
-#: exec.c:865 maint.c:355 maint.c:387
+#: exec.c:927 maint.c:353 maint.c:385
 #, possible-c-format
 msgid "file type %s.\n"
 msgstr ""
 
-#: exec.c:891
+#: exec.c:953
 #, possible-c-format
 msgid "Cannot find section for the entry point of %s."
 msgstr ""
 
-#: exec.c:897
+#: exec.c:959
 #, possible-c-format
 msgid "\tEntry point: %s\n"
 msgstr ""
 
-#: exec.c:930
+#: exec.c:992
 msgid "\t<no file loaded>\n"
 msgstr ""
 
-#: exec.c:945
+#: exec.c:1007
 msgid "Must specify section name and its virtual address"
 msgstr ""
 
-#: exec.c:973
+#: exec.c:1035
 #, possible-c-format
 msgid "Section %s not found"
 msgstr ""
 
-#: exec.c:1020
+#: exec.c:1092
 msgid "Can't create a corefile"
 msgstr ""
 
-#: exec.c:1056
+#: exec.c:1128
 msgid ""
 "Use FILE as program to be debugged.\n"
 "It is read for its symbols, for getting the contents of pure memory,\n"
@@ -10892,7 +11024,7 @@ msgid ""
 "No arg means to have no executable file and no symbols."
 msgstr ""
 
-#: exec.c:1066
+#: exec.c:1138
 msgid ""
 "Use FILE as program for getting contents of pure memory.\n"
 "If FILE cannot be found as specified, your execution directory path\n"
@@ -10900,7 +11032,7 @@ msgid ""
 "No arg means have no executable file."
 msgstr ""
 
-#: exec.c:1073
+#: exec.c:1145
 msgid ""
 "Change the base address of section SECTION of the exec file to ADDR.\n"
 "This can be used if the exec file does not contain section addresses,\n"
@@ -10909,11 +11041,11 @@ msgid ""
 "``info files'' command lists all the sections and their addresses."
 msgstr ""
 
-#: exec.c:1080
+#: exec.c:1152
 msgid "Set writing into executable and core files."
 msgstr ""
 
-#: exec.c:1081
+#: exec.c:1153
 msgid "Show writing into executable and core files."
 msgstr ""
 
@@ -10926,7 +11058,7 @@ msgstr ""
 #. Not found; don't try to keep going because we don't know how
 #. to interpret further elements.  For example, this happens
 #. if opcode is OP_TYPE.
-#: expprint.c:502 expprint.c:578
+#: expprint.c:502 expprint.c:598
 msgid "Invalid expression"
 msgstr ""
 
@@ -10935,36 +11067,99 @@ msgstr ""
 msgid "<language %s has no 'this'>"
 msgstr ""
 
-#: extension.c:195
+#: extension.c:196
 #, possible-c-format
 msgid "Scripting in the \"%s\" language is not supported in this copy of GDB."
 msgstr ""
 
-#: extension.c:927
+#: extension.c:928
 #, possible-c-format
 msgid "Error while looking for matching xmethod workers defined in %s."
 msgstr ""
 
-#: extension.c:960
+#: extension.c:961
 #, possible-c-format
 msgid "Error while looking for arg types of a xmethod worker defined in %s."
 msgstr ""
 
-#: extension.c:985
+#: extension.c:986
 #, possible-c-format
 msgid "Error while fetching result type of an xmethod worker defined in %s."
 msgstr ""
 
-#: fbsd-nat.c:88
+#: fbsd-nat.c:91
 msgid "Couldn't fetch VM map entries."
 msgstr ""
 
-#: fbsd-nat.c:170
+#: fbsd-nat.c:173
 #, possible-c-format
 msgid "Couldn't open %s."
 msgstr ""
 
-#: f-exp.y:781 m2-exp.y:746
+#: fbsd-nat.c:297
+#, possible-c-format
+msgid "Debugging of FreeBSD lwp module is %s.\n"
+msgstr ""
+
+#: fbsd-nat.c:774 linux-nat.c:1036 procfs.c:3637 procfs.c:3775
+#, possible-c-format
+msgid "[%s exited]\n"
+msgstr ""
+
+#: fbsd-nat.c:1107
+msgid "Set debugging of FreeBSD lwp module."
+msgstr ""
+
+#: fbsd-nat.c:1108
+msgid "Show debugging of FreeBSD lwp module."
+msgstr ""
+
+#: fbsd-nat.c:1109 linux-nat.c:4982 linux-nat.c:4991
+msgid "Enables printf debugging output."
+msgstr ""
+
+#: fbsd-tdep.c:304
+msgid "Executable path"
+msgstr ""
+
+#: fbsd-tdep.c:305
+msgid "Canary for SSP"
+msgstr ""
+
+#: fbsd-tdep.c:307
+msgid "OSRELDATE"
+msgstr ""
+
+#: fbsd-tdep.c:308
+msgid "Number of CPUs"
+msgstr ""
+
+#: fbsd-tdep.c:309
+msgid "Pagesizes"
+msgstr ""
+
+#: fbsd-tdep.c:310
+msgid "Number of pagesizes"
+msgstr ""
+
+#: fbsd-tdep.c:311
+msgid "Pointer to timehands"
+msgstr ""
+
+#: fbsd-tdep.c:312
+msgid "Initial stack protection"
+msgstr ""
+
+#. FreeBSD doesn't use gdbarch_get_syscall_number since FreeBSD
+#. native targets fetch the system call number from the
+#. 'pl_syscall_code' member of struct ptrace_lwpinfo in fbsd_wait.
+#. However, system call catching requires this function to be
+#. set.
+#: fbsd-tdep.c:334
+msgid "fbsd_get_sycall_number called"
+msgstr ""
+
+#: f-exp.y:724 m2-exp.y:689
 msgid "Overflow on numeric constant."
 msgstr ""
 
@@ -11001,43 +11196,43 @@ msgid ""
 "knowledge of the target operating system."
 msgstr ""
 
-#: findcmd.c:76
+#: findcmd.c:77
 msgid "Missing search parameters."
 msgstr ""
 
-#: findcmd.c:108
+#: findcmd.c:109
 msgid "Invalid size granularity."
 msgstr ""
 
-#: findcmd.c:134
+#: findcmd.c:135
 msgid "Empty search range.\n"
 msgstr ""
 
-#: findcmd.c:138
+#: findcmd.c:139
 msgid "Invalid length."
 msgstr ""
 
-#: findcmd.c:142
+#: findcmd.c:143
 msgid "Search space too large."
 msgstr ""
 
-#: findcmd.c:152
+#: findcmd.c:153
 msgid "Invalid search space, end precedes start."
 msgstr ""
 
-#: findcmd.c:158
+#: findcmd.c:159
 msgid "Overflow in address range computation, choose smaller range."
 msgstr ""
 
-#: findcmd.c:225
+#: findcmd.c:227
 msgid "Missing search pattern."
 msgstr ""
 
-#: findcmd.c:230
+#: findcmd.c:232
 msgid "Search space too small to contain pattern."
 msgstr ""
 
-#: findcmd.c:324
+#: findcmd.c:326
 msgid ""
 "Search memory for a sequence of bytes.\n"
 "Usage:\n"
@@ -11055,255 +11250,261 @@ msgid ""
 "Convenience variable \"$numfound\" is set to the number of matches."
 msgstr ""
 
-#: findvar.c:58 findvar.c:93
+#: findvar.c:59 findvar.c:94
 #, possible-c-format
 msgid "That operation is not available on integers of more than %d bytes."
 msgstr ""
 
-#: findvar.c:174
+#: findvar.c:175
 msgid "extract_typed_address: type is not a pointer or reference"
 msgstr ""
 
-#: findvar.c:247
+#: findvar.c:248
 msgid "store_typed_address: type is not a pointer or reference"
 msgstr ""
 
-#: findvar.c:493 findvar.c:505
+#: findvar.c:570
+#, possible-c-format
+msgid "No frame is currently executing in block %s."
+msgstr ""
+
+#: findvar.c:573
+msgid "No frame is currently executing in specified block"
+msgstr ""
+
+#: findvar.c:604
+#, possible-c-format
+msgid "Cannot read `%s' without registers"
+msgstr ""
+
+#: findvar.c:670 findvar.c:682
 #, possible-c-format
 msgid "Unknown argument list address for `%s'."
 msgstr ""
 
-#: findvar.c:519
+#: findvar.c:696
 #, possible-c-format
 msgid "Cannot look up value of a typedef `%s'."
 msgstr ""
 
-#: findvar.c:546 findvar.c:556
+#: findvar.c:723 findvar.c:733
 #, possible-c-format
 msgid "Value of register variable not available for `%s'."
 msgstr ""
 
-#: findvar.c:582
+#: findvar.c:769
 #, possible-c-format
-msgid "No global symbol \"%s\"."
+msgid "Missing %s symbol \"%s\"."
 msgstr ""
 
-#: findvar.c:601
+#: findvar.c:793
 #, possible-c-format
 msgid "Cannot look up value of a botched symbol `%s'."
 msgstr ""
 
+#: findvar.c:960
+#, possible-c-format
+msgid "Invalid register #%d, expecting 0 <= # < %d"
+msgstr ""
+
 #: f-lang.c:67
 msgid "unrecognized character type"
 msgstr ""
 
-#: fork-child.c:328
+#: fork-child.c:368
 msgid "setpgrp failed in child"
 msgstr ""
 
-#: fork-child.c:466
+#: fork-child.c:511
 #, possible-c-format
 msgid "During startup program terminated with signal %s, %s."
 msgstr ""
 
-#: fork-child.c:475
+#: fork-child.c:520
 #, possible-c-format
 msgid "During startup program exited with code %d."
 msgstr ""
 
-#: fork-child.c:478
+#: fork-child.c:523
 msgid "During startup program exited normally."
 msgstr ""
 
-#: fork-child.c:545
+#: fork-child.c:590
 #, possible-c-format
 msgid "Use of shell to start subprocesses is %s.\n"
 msgstr ""
 
-#: fork-child.c:555
+#: fork-child.c:600
 msgid ""
 "Set a wrapper for running programs.\n"
 "The wrapper prepares the system and environment for the new program."
 msgstr ""
 
-#: fork-child.c:558
+#: fork-child.c:603
 msgid "Show the wrapper for running programs."
 msgstr ""
 
-#: fork-child.c:564
+#: fork-child.c:609
 msgid "Disable use of an execution wrapper."
 msgstr ""
 
-#: fork-child.c:568
+#: fork-child.c:613
 msgid "Set use of shell to start subprocesses.  The default is on."
 msgstr ""
 
-#: fork-child.c:569
+#: fork-child.c:614
 msgid "Show use of shell to start subprocesses."
 msgstr ""
 
-#: frame.c:270
+#: frame.c:279
 #, possible-c-format
 msgid "Frame debugging is %s.\n"
 msgstr ""
 
-#: frame.c:281
+#: frame.c:290
 #, possible-c-format
 msgid "Whether backtraces should continue past \"main\" is %s.\n"
 msgstr ""
 
-#: frame.c:291
+#: frame.c:300
 #, possible-c-format
 msgid ""
 "Whether backtraces should continue past the entry point of a program is %s.\n"
 msgstr ""
 
-#: frame.c:302
+#: frame.c:311
 #, possible-c-format
 msgid "An upper bound on the number of backtrace levels is %s.\n"
 msgstr ""
 
-#: frame.c:854
+#: frame.c:928
 msgid "No unwind_pc method"
 msgstr ""
 
-#: frame.c:860 frame.c:925
+#: frame.c:934 frame.c:1006
 msgid "PC not available"
 msgstr ""
 
-#: frame.c:862
+#: frame.c:936
 msgid "PC not saved"
 msgstr ""
 
-#: frame.c:971
+#: frame.c:1052
 msgid "Cannot pop the initial frame."
 msgstr ""
 
-#: frame.c:1078
-#, possible-c-format
-msgid "Register %d was not saved"
+#: frame.c:1059 infcmd.c:2064
+msgid "Cannot find the caller frame."
 msgstr ""
 
-#: frame.c:1081
+#: frame.c:1164
 #, possible-c-format
-msgid "Register %d is not available"
+msgid "Register %d was not saved"
 msgstr ""
 
-#: frame.c:1233
+#: frame.c:1319
 msgid "Attempt to assign to a register that was not saved."
 msgstr ""
 
-#: frame.c:1245
+#: frame.c:1331
 msgid "Attempt to assign to an unmodifiable value."
 msgstr ""
 
-#: frame.c:1303
+#: frame.c:1389
 #, possible-c-format
 msgid ""
 "Bad debug information detected: Attempt to read %d bytes from registers."
 msgstr ""
 
-#: frame.c:1469 ia64-libunwind-tdep.c:332 ia64-tdep.c:1925 ia64-tdep.c:2300
+#: frame.c:1536 ia64-libunwind-tdep.c:348 ia64-tdep.c:1927 ia64-tdep.c:2302
 msgid "No registers."
 msgstr ""
 
-#: frame.c:1471 stack.c:1737 thread.c:1574
+#: frame.c:1538 stack.c:1334 stack.c:1738 thread.c:1962
 msgid "No stack."
 msgstr ""
 
-#: frame.c:1473
+#: frame.c:1540
 msgid "No memory."
 msgstr ""
 
-#: frame.c:1478
-msgid "No selected thread."
-msgstr ""
-
-#: frame.c:1480 infcmd.c:1931
-msgid "Invalid selected thread."
-msgstr ""
-
-#: frame.c:1482
-msgid "Target is executing."
-msgstr ""
-
-#: frame.c:2592
+#: frame.c:2763
 msgid "Missing unwind SP method"
 msgstr ""
 
-#: frame.c:2729
+#: frame.c:2900
 msgid ""
 "Set backtrace specific variables.\n"
 "Configure backtrace variables such as the backtrace limit"
 msgstr ""
 
 #. allow-unknown
-#: frame.c:2734
+#: frame.c:2905
 msgid ""
 "Show backtrace specific variables\n"
 "Show backtrace variables such as the backtrace limit"
 msgstr ""
 
-#: frame.c:2741
+#: frame.c:2912
 msgid "Set whether backtraces should continue past \"main\"."
 msgstr ""
 
-#: frame.c:2742
+#: frame.c:2913
 msgid "Show whether backtraces should continue past \"main\"."
 msgstr ""
 
-#: frame.c:2743
+#: frame.c:2914
 msgid ""
 "Normally the caller of \"main\" is not of interest, so GDB will terminate\n"
 "the backtrace at \"main\".  Set this variable if you need to see the rest\n"
 "of the stack trace."
 msgstr ""
 
-#: frame.c:2753
+#: frame.c:2924
 msgid ""
 "Set whether backtraces should continue past the entry point of a program."
 msgstr ""
 
-#: frame.c:2755
+#: frame.c:2926
 msgid ""
 "Show whether backtraces should continue past the entry point of a program."
 msgstr ""
 
-#: frame.c:2757
+#: frame.c:2928
 msgid ""
 "Normally there are no callers beyond the entry point of a program, so GDB\n"
 "will terminate the backtrace there.  Set this variable if you need to see\n"
 "the rest of the stack trace."
 msgstr ""
 
-#: frame.c:2767
+#: frame.c:2938
 msgid "Set an upper bound on the number of backtrace levels."
 msgstr ""
 
-#: frame.c:2768
+#: frame.c:2939
 msgid "Show the upper bound on the number of backtrace levels."
 msgstr ""
 
-#: frame.c:2769
+#: frame.c:2940
 msgid ""
 "No more than the specified number of frames can be displayed or examined.\n"
 "Literal \"unlimited\" or zero means no limit."
 msgstr ""
 
 #. Debug this files internals.
-#: frame.c:2778
+#: frame.c:2949
 msgid "Set frame debugging."
 msgstr ""
 
-#: frame.c:2779
+#: frame.c:2950
 msgid "Show frame debugging."
 msgstr ""
 
-#: frame.c:2780
+#: frame.c:2951
 msgid "When non-zero, frame specific internal debugging is enabled."
 msgstr ""
 
-#: frame-unwind.c:163
+#: frame-unwind.c:166
 msgid "frame_unwind_find_by_frame failed"
 msgstr ""
 
@@ -11315,214 +11516,266 @@ msgstr ""
 msgid "not a signal trampoline"
 msgstr ""
 
-#: frv-tdep.c:425
+#: frv-tdep.c:424
 #, possible-c-format
 msgid "Bad register number %d"
 msgstr ""
 
-#: frv-tdep.c:1141
+#: frv-tdep.c:1136
 #, possible-c-format
 msgid "Illegal return value length: %d"
 msgstr ""
 
-#: frv-tdep.c:1346
+#: frv-tdep.c:1341
 #, possible-c-format
 msgid "Don't know how to return a %d-byte value."
 msgstr ""
 
-#: f-typeprint.c:375
+#: f-typeprint.c:402
 #, possible-c-format
 msgid "Invalid type code (%d) in symbol table."
 msgstr ""
 
-#: f-valprint.c:61
+#: f-valprint.c:50
 msgid "Lower bound may not be '*' in F77"
 msgstr ""
 
-#: f-valprint.c:224
+#: f-valprint.c:186
 #, possible-c-format
 msgid "Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"
 msgstr ""
 
-#: f-valprint.c:438
+#: f-valprint.c:416
 #, possible-c-format
 msgid "Contents of F77 COMMON block '%s':\n"
 msgstr ""
 
-#: f-valprint.c:441
+#: f-valprint.c:419
 msgid "Contents of blank COMMON block:\n"
 msgstr ""
 
-#: f-valprint.c:491 stack.c:2186
+#: f-valprint.c:469 stack.c:2207
 msgid "No symbol table info available.\n"
 msgstr ""
 
-#: f-valprint.c:508
+#: f-valprint.c:486
 #, possible-c-format
 msgid "No common block '%s'.\n"
 msgstr ""
 
-#: f-valprint.c:510
+#: f-valprint.c:488
 msgid "No common blocks.\n"
 msgstr ""
 
-#: f-valprint.c:518
+#: f-valprint.c:496
 msgid "Print out the values contained in a Fortran COMMON block."
 msgstr ""
 
-#: gcore.c:57
+#: gcore.c:59
 #, possible-c-format
 msgid "Failed to open '%s' for output."
 msgstr ""
 
-#: gcore.c:85
+#: gcore.c:87
 msgid "Target does not support core file generation."
 msgstr ""
 
-#: gcore.c:93
+#: gcore.c:95
 #, possible-c-format
 msgid "Failed to create 'note' section for corefile: %s"
 msgstr ""
 
-#: gcore.c:102
+#: gcore.c:104
 msgid "gcore: failed to get corefile memory sections from target."
 msgstr ""
 
-#: gcore.c:106
+#: gcore.c:108
 #, possible-c-format
 msgid "writing note section (%s)"
 msgstr ""
 
-#: gcore.c:204
+#: gcore.c:191
 msgid "Can't find default bfd machine type (need execfile)."
 msgstr ""
 
-#: gcore.c:218
+#: gcore.c:205
 msgid "Can't find bfd architecture for corefile (need execfile)."
 msgstr ""
 
-#: gcore.c:485
+#: gcore.c:472
 #, possible-c-format
 msgid "Couldn't make gcore segment: %s"
 msgstr ""
 
-#: gcore.c:587
+#: gcore.c:574
 #, possible-c-format
 msgid "Memory read failed for corefile section, %s bytes at %s."
 msgstr ""
 
-#: gcore.c:595
+#: gcore.c:582
 #, possible-c-format
 msgid "Failed to write corefile contents (%s)."
 msgstr ""
 
-#: gcore.c:634
+#: gcore.c:621
 msgid ""
 "Save a core file with the current state of the debugged process.\n"
 "Argument is optional filename.  Default filename is 'core.<process_id>'."
 msgstr ""
 
-#: gdbarch.c:65
+#: gdbarch.c:66
 #, possible-c-format
 msgid "Architecture debugging is %s.\n"
 msgstr ""
 
-#: gdbarch.c:673
+#: gdbarch.c:701
 #, possible-c-format
 msgid "verify_gdbarch: the following are invalid ...%s"
 msgstr ""
 
-#: gdbarch.c:4919
+#: gdbarch.c:5166
 msgid "gdbarch_architecture_names: multi-arch unknown"
 msgstr ""
 
-#: gdbarch.c:4945
+#: gdbarch.c:5192
 #, possible-c-format
 msgid "gdbarch: Attempt to register unknown architecture (%d)"
 msgstr ""
 
-#: gdbarch.c:4956
+#: gdbarch.c:5203
 #, possible-c-format
 msgid "gdbarch: Duplicate registration of architecture (%s)"
 msgstr ""
 
-#: gdbarch.c:5153
+#: gdbarch.c:5400
 msgid "Set architecture debugging."
 msgstr ""
 
-#: gdbarch.c:5154
+#: gdbarch.c:5401
 msgid "Show architecture debugging."
 msgstr ""
 
-#: gdbarch.c:5155
+#: gdbarch.c:5402
 msgid "When non-zero, architecture debugging is enabled."
 msgstr ""
 
-#: gdb_bfd.c:427
+#: gdb_bfd.c:122
+#, possible-c-format
+msgid "BFD sharing is %s.\n"
+msgstr ""
+
+#: gdb_bfd.c:132
+#, possible-c-format
+msgid "BFD cache debugging is %s.\n"
+msgstr ""
+
+#: gdb_bfd.c:493
 #, possible-c-format
 msgid "cannot close \"%s\": %s"
 msgstr ""
 
-#: gdb_bfd.c:604
+#: gdb_bfd.c:708
 #, possible-c-format
 msgid "Can't read data for section '%s' in file '%s'"
 msgstr ""
 
-#: gdb_bfd.c:626 gdb_bfd.c:639
+#: gdb_bfd.c:730 gdb_bfd.c:743
 #, possible-c-format
 msgid "Problem reading \"%s\" for CRC: %s"
 msgstr ""
 
-#: gdb_bfd.c:900
+#: gdb_bfd.c:1004
 msgid "List the BFDs that are currently open."
 msgstr ""
 
+#: gdb_bfd.c:1009
+msgid "Set whether gdb will share bfds that appear to be the same file."
+msgstr ""
+
+#: gdb_bfd.c:1010
+msgid "Show whether gdb will share bfds that appear to be the same file."
+msgstr ""
+
+#: gdb_bfd.c:1011
+msgid ""
+"When enabled gdb will reuse existing bfds rather than reopening the\n"
+"same file.  To decide if two files are the same then gdb compares the\n"
+"filename, file size, file modification time, and file inode."
+msgstr ""
+
+#: gdb_bfd.c:1021
+msgid "Set bfd cache debugging."
+msgstr ""
+
+#: gdb_bfd.c:1022
+msgid "Show bfd cache debugging."
+msgstr ""
+
+#: gdb_bfd.c:1023
+msgid "When non-zero, bfd cache specific debugging is enabled."
+msgstr ""
+
 #: gdb-dlfcn.c:80 gdb-dlfcn.c:94
 #, possible-c-format
 msgid "Could not load %s: %s"
 msgstr ""
 
-#: gdbserver/ax.c:832 printcmd.c:2315
+#: gdbserver/ax.c:834 printcmd.c:2566
 msgid "Wrong number of arguments for specified format-string"
 msgstr ""
 
-#: gdbserver/ax.c:879
+#: gdbserver/ax.c:881
 msgid "long long not supported in agent printf"
 msgstr ""
 
-#: gdbserver/ax.c:910
+#: gdbserver/ax.c:912
 #, possible-c-format
 msgid "Format directive in '%s' not supported in agent printf"
 msgstr ""
 
-#: gdbserver/ax.c:1317
+#: gdbserver/ax.c:1319
 msgid "Unterminated format string in printf bytecode"
 msgstr ""
 
-#: gdbserver/linux-x86-low.c:1166 gdbserver/linux-tile-low.c:167
+#: gdbserver/regcache.c:439
+#, possible-c-format
+msgid "That operation is not available on integers of more than%d bytes."
+msgstr ""
+
+#: gdbserver/linux-x86-low.c:744 gdbserver/linux-tile-low.c:159
 msgid "Can't debug 64-bit process with 32-bit GDBserver"
 msgstr ""
 
-#: gdbserver/linux-x86-low.c:1169
+#: gdbserver/linux-x86-low.c:747
 msgid "Can't debug x86-64 process with 32-bit GDBserver"
 msgstr ""
 
-#: gdbserver/thread-db.c:766
+#: gdbserver/thread-db.c:631
 #, possible-c-format
 msgid "libthread-db-search-path component too long, ignored: %s."
 msgstr ""
 
-#: gdbserver/linux-low.c:561 linux-nat.c:2213
+#: gdbserver/linux-low.c:731 linux-nat.c:2164
 #, possible-c-format
 msgid "unknown ptrace event %d"
 msgstr ""
 
-#: gdbserver/linux-low.c:944 linux-nat.c:1236
+#: gdbserver/linux-low.c:1152 linux-nat.c:1162
 #, possible-c-format
 msgid "Cannot attach to lwp %d: %s"
 msgstr ""
 
-#: gdbserver/linux-low.c:1289 linux-nat.c:1493
+#: gdbserver/linux-low.c:1556 linux-nat.c:1463
+#, possible-c-format
+msgid "Couldn't reap LWP %d while detaching: %s"
+msgstr ""
+
+#: gdbserver/linux-low.c:1561 linux-nat.c:1468
+#, possible-c-format
+msgid "Reaping LWP %d while detaching returned unexpected status 0x%x"
+msgstr ""
+
+#: gdbserver/linux-low.c:1568 linux-nat.c:1475
 #, possible-c-format
 msgid "Can't detach %s: %s"
 msgstr ""
@@ -11544,367 +11797,355 @@ msgstr ""
 msgid "Strict type checking is %s.\n"
 msgstr ""
 
-#: gdbtypes.c:543
+#: gdbtypes.c:555
 #, possible-c-format
 msgid "Unknown address space specifier: \"%s\""
 msgstr ""
 
-#: gdbtypes.c:1394
+#: gdbtypes.c:1409
 #, possible-c-format
 msgid "Invalid anonymous type %s [in module %s], GCC PR debug/47510 bug?"
 msgstr ""
 
-#: gdbtypes.c:1418
+#: gdbtypes.c:1432
 #, possible-c-format
 msgid "No type named %s."
 msgstr ""
 
-#: gdbtypes.c:1460 objc-lang.c:95
+#: gdbtypes.c:1474 objc-lang.c:95
 #, possible-c-format
 msgid "No struct type named %s."
 msgstr ""
 
-#: gdbtypes.c:1464 gdbtypes.c:1539 objc-lang.c:102
+#: gdbtypes.c:1478 gdbtypes.c:1553 objc-lang.c:102
 #, possible-c-format
 msgid "This context has class, union or enum %s, not a struct."
 msgstr ""
 
-#: gdbtypes.c:1482
+#: gdbtypes.c:1496
 #, possible-c-format
 msgid "No union type named %s."
 msgstr ""
 
 #. If we get here, it's not a union.
-#: gdbtypes.c:1490
+#: gdbtypes.c:1504
 #, possible-c-format
 msgid "This context has class, struct or enum %s, not a union."
 msgstr ""
 
-#: gdbtypes.c:1505
+#: gdbtypes.c:1519
 #, possible-c-format
 msgid "No enum type named %s."
 msgstr ""
 
-#: gdbtypes.c:1509
+#: gdbtypes.c:1523
 #, possible-c-format
 msgid "This context has class, struct or union %s, not an enum."
 msgstr ""
 
-#: gdbtypes.c:1535
+#: gdbtypes.c:1549
 #, possible-c-format
 msgid "No template type named %s."
 msgstr ""
 
-#: gdbtypes.c:1577
+#: gdbtypes.c:1589
 #, possible-c-format
 msgid "Type %s is not a structure or union type."
 msgstr ""
 
-#: gdbtypes.c:1631
+#: gdbtypes.c:1643
 #, possible-c-format
 msgid "Type %s has no component named %s."
 msgstr ""
 
-#: gdbtypes.c:1784
+#: gdbtypes.c:1796
 msgid "stub type has NULL name"
 msgstr ""
 
-#: gdbtypes.c:2022
+#: gdbtypes.c:2058
 msgid "Cannot determine struct field location (invalid location kind)"
 msgstr ""
 
-#: gdbtypes.c:2439
+#: gdbtypes.c:2511
 #, possible-c-format
 msgid "Internal: Cannot demangle mangled name `%s'."
 msgstr ""
 
-#: gdbtypes.c:3261
+#: gdbtypes.c:3446
 #, possible-c-format
 msgid "Unsupported field kind %d by check_types_equal"
 msgstr ""
 
-#: gdbtypes.c:3826
+#: gdbtypes.c:4035
 #, possible-c-format
 msgid ") length %d\n"
 msgstr ""
 
-#: gdbtypes.c:3975
+#: gdbtypes.c:4184
 msgid " <same as already seen type>\n"
 msgstr ""
 
-#: gdbtypes.c:4437
+#: gdbtypes.c:4647
 #, possible-c-format
 msgid "Unexpected type field location kind: %d"
 msgstr ""
 
-#: gdbtypes.c:5067
+#: gdbtypes.c:5290
 msgid "Set debugging of C++ overloading."
 msgstr ""
 
-#: gdbtypes.c:5068
+#: gdbtypes.c:5291
 msgid "Show debugging of C++ overloading."
 msgstr ""
 
-#: gdbtypes.c:5069
+#: gdbtypes.c:5292
 msgid "When enabled, ranking of the functions is displayed."
 msgstr ""
 
-#: gdbtypes.c:5078
+#: gdbtypes.c:5301
 msgid ""
 "Set resolution of opaque struct/class/union types (if set before loading "
 "symbols)."
 msgstr ""
 
-#: gdbtypes.c:5080
+#: gdbtypes.c:5303
 msgid ""
 "Show resolution of opaque struct/class/union types (if set before loading "
 "symbols)."
 msgstr ""
 
-#: gdbtypes.c:5089
+#: gdbtypes.c:5312
 msgid "Set strict type checking."
 msgstr ""
 
-#: gdbtypes.c:5090
+#: gdbtypes.c:5313
 msgid "Show strict type checking."
 msgstr ""
 
 #. * A helper macro that returns the name of a type or "unnamed type"
 #. if the type has no name.
-#: gdbtypes.h:1467
+#: gdbtypes.h:1439
 msgid "<unnamed type>"
 msgstr ""
 
 #. * A helper macro that returns the name of an error type.  If the
 #. type has a name, it is used; otherwise, a default is used.
-#: gdbtypes.h:1473
+#: gdbtypes.h:1445
 msgid "<error type>"
 msgstr ""
 
-#: gnu-nat.c:331
+#: gnu-nat.c:340
 #, possible-c-format
 msgid "Stopped %s."
 msgstr ""
 
-#: gnu-nat.c:469 gnu-nat.c:499
+#: gnu-nat.c:478 gnu-nat.c:508
 #, possible-c-format
 msgid "Error setting exception port for %s: %s"
 msgstr ""
 
-#: gnu-nat.c:576
+#: gnu-nat.c:585
 #, possible-c-format
 msgid "Couldn't request notification for port %lu: %s"
 msgstr ""
 
-#: gnu-nat.c:726
+#: gnu-nat.c:735
 #, possible-c-format
 msgid "Error allocating event port: %s"
 msgstr ""
 
-#: gnu-nat.c:751
+#: gnu-nat.c:760
 #, possible-c-format
 msgid "Error getting task for pid %d: %s"
 msgstr ""
 
-#. Allow I/O.
-#: gnu-nat.c:858
+#: gnu-nat.c:864
 #, possible-c-format
 msgid "Pid %d has an additional task suspend count of %d; clear it? "
 msgstr ""
 
-#: gnu-nat.c:864
+#: gnu-nat.c:867
 msgid "Additional task suspend count left untouched."
 msgstr ""
 
-#: gnu-nat.c:891 gnu-nat.c:896
+#: gnu-nat.c:894 gnu-nat.c:899
 #, possible-c-format
 msgid "Can't modify tracing state for pid %d: %s"
 msgstr ""
 
-#: gnu-nat.c:1368
+#: gnu-nat.c:1371
 #, possible-c-format
 msgid "Can't forward spontaneous exception (%s)."
 msgstr ""
 
 #. Can't do too much...
-#: gnu-nat.c:1408
+#: gnu-nat.c:1411
 #, possible-c-format
 msgid "Can't deliver signal %s: No signal thread."
 msgstr ""
 
-#: gnu-nat.c:1410
+#: gnu-nat.c:1413
 #, possible-c-format
 msgid "Delivering signal %s: %s"
 msgstr ""
 
-#: gnu-nat.c:1441
+#: gnu-nat.c:1444
 #, possible-c-format
 msgid "Can't continue process: %s"
 msgstr ""
 
-#: gnu-nat.c:1481
+#: gnu-nat.c:1485
 msgid "There are no threads; try again later."
 msgstr ""
 
-#: gnu-nat.c:1505
+#: gnu-nat.c:1509
 #, possible-c-format
 msgid "wait request failed: %s"
 msgstr ""
 
-#: gnu-nat.c:1541
+#: gnu-nat.c:1545
 #, possible-c-format
 msgid "Couldn't wait for an event: %s"
 msgstr ""
 
 #. Whatever it is, it's something strange.
-#: gnu-nat.c:1561
+#: gnu-nat.c:1565
 #, possible-c-format
 msgid "Got a strange event, msg id = %d."
 msgstr ""
 
-#: gnu-nat.c:1564
+#: gnu-nat.c:1568
 #, possible-c-format
 msgid "Handling event, msgid = %d: %s"
 msgstr ""
 
-#: gnu-nat.c:1745
+#: gnu-nat.c:1749
 #, possible-c-format
 msgid "Pid %d died with unknown exit status, using SIGKILL."
 msgstr ""
 
-#: gnu-nat.c:1798
+#: gnu-nat.c:1802
 #, possible-c-format
 msgid "illegal rpc: %s"
 msgstr ""
 
-#: gnu-nat.c:1843
+#: gnu-nat.c:1847
 #, possible-c-format
 msgid "Can't wait for pid %d: %s"
 msgstr ""
 
-#: gnu-nat.c:1947
+#: gnu-nat.c:1951
 #, possible-c-format
 msgid "Signal delivery failed: %s"
 msgstr ""
 
-#: gnu-nat.c:2020
+#: gnu-nat.c:2024
 #, possible-c-format
 msgid "Aborting %s with unforwarded exception %s."
 msgstr ""
 
-#: gnu-nat.c:2049
+#: gnu-nat.c:2053
 #, possible-c-format
 msgid "Can't run single thread id %s: no such thread!"
 msgstr ""
 
-#: gnu-nat.c:2059
+#: gnu-nat.c:2063
 #, possible-c-format
 msgid "Can't step thread id %s: no such thread."
 msgstr ""
 
-#: gnu-nat.c:2131
-msgid "ptrace (PTRACE_TRACEME) failed!"
-msgstr ""
-
-#: gnu-nat.c:2277
+#: gnu-nat.c:2285
 msgid "to_stop target function not implemented"
 msgstr ""
 
-#: gnu-nat.c:2311
+#: gnu-nat.c:2319
 #, possible-c-format
 msgid "Read from inferior faulted: %s"
 msgstr ""
 
-#: gnu-nat.c:2317
+#: gnu-nat.c:2325
 #, possible-c-format
 msgid "gnu_read_inferior vm_deallocate failed: %s"
 msgstr ""
 
-#: gnu-nat.c:2404
+#: gnu-nat.c:2412
 #, possible-c-format
 msgid "No memory at 0x%lx. Nothing written"
 msgstr ""
 
-#: gnu-nat.c:2413
+#: gnu-nat.c:2421
 #, possible-c-format
 msgid "Memory at address 0x%lx is unwritable. Nothing written"
 msgstr ""
 
-#: gnu-nat.c:2488
+#: gnu-nat.c:2494 skip.c:220
 #, possible-c-format
 msgid "%s: %s"
 msgstr ""
 
-#: gnu-nat.c:2596
+#: gnu-nat.c:2602
 #, possible-c-format
 msgid "vm_region failed: %s"
 msgstr ""
 
-#: gnu-nat.c:2749
+#: gnu-nat.c:2755
 #, possible-c-format
 msgid "Illegal argument for \"%s\" command, should be an integer."
 msgstr ""
 
-#: gnu-nat.c:2761
+#: gnu-nat.c:2767
 #, possible-c-format
 msgid "Illegal argument for \"%s\" command, should be \"%s\" or \"%s\"."
 msgstr ""
 
-#: gnu-nat.c:2773
+#: gnu-nat.c:2779
 #, possible-c-format
 msgid "Garbage after \"%s\" command: `%s'"
 msgstr ""
 
-#: gnu-nat.c:2784
+#: gnu-nat.c:2790
 msgid "No current thread."
 msgstr ""
 
-#: gnu-nat.c:2795
+#: gnu-nat.c:2801
 msgid "No current process."
 msgstr ""
 
-#: gnu-nat.c:2909
+#: gnu-nat.c:2921
 msgid "No inferior task."
 msgstr ""
 
-#: gnu-nat.c:2915
+#: gnu-nat.c:2927
 #, possible-c-format
 msgid "Couldn't extract send right %lu from inferior: %s"
 msgstr ""
 
-#: gnu-nat.c:2931
+#: gnu-nat.c:2943
 #, possible-c-format
 msgid "Can't set exception port for %s: %s"
 msgstr ""
 
-#: gnu-nat.c:2942
+#: gnu-nat.c:2954
 msgid "No argument to \"set task exception-port\" command."
 msgstr ""
 
-#: gnu-nat.c:2968
+#: gnu-nat.c:2980
 msgid ""
 "Illegal argument to \"set signal-thread\" command.\n"
-"Should be an integer thread ID, or `none'."
-msgstr ""
-
-#: gnu-nat.c:2978
-#, possible-c-format
-msgid ""
-"Thread ID %s not known.  Use the \"info threads\" command to\n"
-"see the IDs of currently known threads."
+"Should be a thread ID, or \"none\"."
 msgstr ""
 
-#: gnu-nat.c:3113
+#: gnu-nat.c:3131
 #, possible-c-format
 msgid "%ld: %s."
 msgstr ""
 
-#: gnu-nat.c:3123 utils.c:973
+#: gnu-nat.c:3141 utils.c:881
 #, possible-c-format
 msgid "%s."
 msgstr ""
 
-#: gnu-nat.c:3163
+#: gnu-nat.c:3181
 msgid ""
 "Set whether the new threads are suspended while gdb has control.\n"
 "This property normally has no effect because the whole task is\n"
@@ -11912,78 +12153,78 @@ msgid ""
 "The default value is \"off\"."
 msgstr ""
 
-#: gnu-nat.c:3169
+#: gnu-nat.c:3187
 msgid "Show whether new threads are suspended while gdb has control."
 msgstr ""
 
-#: gnu-nat.c:3173
+#: gnu-nat.c:3191
 msgid "Set whether new threads are allowed to run (once gdb has noticed them)."
 msgstr ""
 
-#: gnu-nat.c:3176
+#: gnu-nat.c:3194
 msgid ""
 "Show whether new threads are allowed to run (once gdb has noticed them)."
 msgstr ""
 
-#: gnu-nat.c:3181
+#: gnu-nat.c:3199
 msgid "Set the default detach-suspend-count value for new threads."
 msgstr ""
 
-#: gnu-nat.c:3184
+#: gnu-nat.c:3202
 msgid "Show the default detach-suspend-count value for new threads."
 msgstr ""
 
-#: gnu-nat.c:3187
+#: gnu-nat.c:3205
 msgid ""
 "Set whether the inferior process's signals will be intercepted.\n"
 "Mach exceptions (such as breakpoint traps) are not affected."
 msgstr ""
 
-#: gnu-nat.c:3192
+#: gnu-nat.c:3210
 msgid "Show whether the inferior process's signals will be intercepted."
 msgstr ""
 
-#: gnu-nat.c:3197
+#: gnu-nat.c:3215
 msgid ""
 "Set the thread that gdb thinks is the libc signal thread.\n"
 "This thread is run when delivering a signal to a non-stopped process."
 msgstr ""
 
-#: gnu-nat.c:3202
+#: gnu-nat.c:3220
 msgid "Set the thread that gdb thinks is the libc signal thread."
 msgstr ""
 
-#: gnu-nat.c:3207
+#: gnu-nat.c:3225
 msgid ""
 "Set whether gdb thinks the inferior process is stopped as with SIGSTOP.\n"
 "Stopped process will be continued by sending them a signal."
 msgstr ""
 
-#: gnu-nat.c:3211
+#: gnu-nat.c:3229
 msgid ""
 "Show whether gdb thinks the inferior process is stopped as with SIGSTOP."
 msgstr ""
 
-#: gnu-nat.c:3215
+#: gnu-nat.c:3233
 msgid ""
 "Set whether exceptions in the inferior process will be trapped.\n"
 "When exceptions are turned off, neither breakpoints nor single-stepping\n"
 "will work."
 msgstr ""
 
-#: gnu-nat.c:3222
+#: gnu-nat.c:3240
 msgid "Show whether exceptions in the inferior process will be trapped."
 msgstr ""
 
-#: gnu-nat.c:3227
+#: gnu-nat.c:3245
 msgid "Command prefix for setting task attributes."
 msgstr ""
 
-#: gnu-nat.c:3230
+#: gnu-nat.c:3248
 msgid "Command prefix for showing task attributes."
 msgstr ""
 
-#: gnu-nat.c:3233
+#: gnu-nat.c:3251
 msgid ""
 "Set whether the task is suspended while gdb has control.\n"
 "A value of \"on\" takes effect immediately, otherwise nothing happens\n"
@@ -11992,19 +12233,19 @@ msgid ""
 "used to pause individual threads by default instead."
 msgstr ""
 
-#: gnu-nat.c:3241
+#: gnu-nat.c:3259
 msgid "Show whether the task is suspended while gdb has control."
 msgstr ""
 
-#: gnu-nat.c:3245
+#: gnu-nat.c:3263
 msgid "Set the suspend count will leave on the thread when detaching."
 msgstr ""
 
-#: gnu-nat.c:3248
+#: gnu-nat.c:3266
 msgid "Show the suspend count will leave on the thread when detaching."
 msgstr ""
 
-#: gnu-nat.c:3252
+#: gnu-nat.c:3270
 msgid ""
 "Set the task exception port to which we forward exceptions.\n"
 "The argument should be the value of the send right in the task."
@@ -12012,54 +12253,54 @@ msgstr ""
 
 #. A convenient way of turning on all options require to noninvasively
 #. debug running tasks.
-#: gnu-nat.c:3262
+#: gnu-nat.c:3280
 msgid ""
 "Set task options so that we interfere as little as possible.\n"
 "This is the same as setting `task pause', `exceptions', and\n"
 "`signals' to the opposite value."
 msgstr ""
 
-#: gnu-nat.c:3270
+#: gnu-nat.c:3288
 msgid "Show information about the task's send rights"
 msgstr ""
 
-#: gnu-nat.c:3273
+#: gnu-nat.c:3290
 msgid "Show information about the task's receive rights"
 msgstr ""
 
-#: gnu-nat.c:3276
+#: gnu-nat.c:3292
 msgid "Show information about the task's port rights"
 msgstr ""
 
-#: gnu-nat.c:3279
+#: gnu-nat.c:3294
 msgid "Show information about the task's port sets"
 msgstr ""
 
-#: gnu-nat.c:3282
+#: gnu-nat.c:3296
 msgid "Show information about the task's dead names"
 msgstr ""
 
-#: gnu-nat.c:3360
+#: gnu-nat.c:3373
 msgid "No argument to \"set thread exception-port\" command."
 msgstr ""
 
-#: gnu-nat.c:3403
+#: gnu-nat.c:3416
 msgid "Command prefix for setting thread properties."
 msgstr ""
 
-#: gnu-nat.c:3406
+#: gnu-nat.c:3419
 msgid "Command prefix for setting default thread properties."
 msgstr ""
 
-#: gnu-nat.c:3410
+#: gnu-nat.c:3423
 msgid "Command prefix for showing thread properties."
 msgstr ""
 
-#: gnu-nat.c:3413
+#: gnu-nat.c:3426
 msgid "Command prefix for showing default thread properties."
 msgstr ""
 
-#: gnu-nat.c:3417
+#: gnu-nat.c:3430
 msgid ""
 "Set whether the current thread is suspended while gdb has control.\n"
 "A value of \"on\" takes effect immediately, otherwise nothing happens\n"
@@ -12069,55 +12310,55 @@ msgid ""
 "The default value is \"off\"."
 msgstr ""
 
-#: gnu-nat.c:3425
+#: gnu-nat.c:3438
 msgid "Show whether the current thread is suspended while gdb has control."
 msgstr ""
 
-#: gnu-nat.c:3430
+#: gnu-nat.c:3443
 msgid "Set whether the current thread is allowed to run."
 msgstr ""
 
-#: gnu-nat.c:3433
+#: gnu-nat.c:3446
 msgid "Show whether the current thread is allowed to run."
 msgstr ""
 
-#: gnu-nat.c:3436
+#: gnu-nat.c:3449
 msgid ""
 "Set the suspend count will leave on the thread when detaching.\n"
 "Note that this is relative to suspend count when gdb noticed the thread;\n"
 "use the `thread takeover-suspend-count' to force it to an absolute value."
 msgstr ""
 
-#: gnu-nat.c:3441
+#: gnu-nat.c:3454
 msgid ""
 "Show the suspend count will leave on the thread when detaching.\n"
 "Note that this is relative to suspend count when gdb noticed the thread;\n"
 "use the `thread takeover-suspend-count' to force it to an absolute value."
 msgstr ""
 
-#: gnu-nat.c:3447
+#: gnu-nat.c:3460
 msgid ""
 "Set the thread exception port to which we forward exceptions.\n"
 "This overrides the task exception port.\n"
 "The argument should be the value of the send right in the task."
 msgstr ""
 
-#: gnu-nat.c:3456
+#: gnu-nat.c:3469
 msgid ""
 "Force the threads absolute suspend-count to be gdb's.\n"
 "Prior to giving this command, gdb's thread suspend-counts are relative\n"
 "to the thread's initial suspend-count when gdb notices the threads."
 msgstr ""
 
-#: gnu-nat.c:3477
+#: gnu-nat.c:3490
 msgid "Set debugging output for the gnu backend."
 msgstr ""
 
-#: gnu-nat.c:3478
+#: gnu-nat.c:3491
 msgid "Show debugging output for the gnu backend."
 msgstr ""
 
-#: gnu-nat.c:3505
+#: gnu-nat.c:3518
 #, possible-c-format
 msgid "Error flushing inferior's cache : %s"
 msgstr ""
@@ -12134,62 +12375,62 @@ msgstr ""
 msgid "Baseclass offset not found"
 msgstr ""
 
-#: gnu-v3-abi.c:335
+#: gnu-v3-abi.c:332
 #, possible-c-format
 msgid "can't find linker symbol for virtual table for `%s' value"
 msgstr ""
 
-#: gnu-v3-abi.c:338
+#: gnu-v3-abi.c:335
 #, possible-c-format
 msgid "  found `%s' instead"
 msgstr ""
 
-#: gnu-v3-abi.c:420
+#: gnu-v3-abi.c:417
 msgid "Only classes can have virtual functions."
 msgstr ""
 
-#: gnu-v3-abi.c:471
+#: gnu-v3-abi.c:467
 msgid "Expected a negative vbase offset (old compiler?)"
 msgstr ""
 
-#: gnu-v3-abi.c:475
+#: gnu-v3-abi.c:471
 msgid "Misaligned vbase offset."
 msgstr ""
 
-#: gnu-v3-abi.c:897
+#: gnu-v3-abi.c:895
 #, possible-c-format
 msgid "vtable for '%s' @ %s (subobject @ %s):\n"
 msgstr ""
 
-#: gnu-v3-abi.c:925 printcmd.c:1802 stack.c:1536 value.c:2585
+#: gnu-v3-abi.c:923 printcmd.c:2051 stack.c:1535 value.c:2698
 #, possible-c-format
 msgid "<error: %s>"
 msgstr ""
 
-#: gnu-v3-abi.c:977
+#: gnu-v3-abi.c:974
 msgid "This object does not have a virtual function table\n"
 msgstr ""
 
-#: gnu-v3-abi.c:1106
+#: gnu-v3-abi.c:1103
 msgid "cannot find typeinfo for unnamed type"
 msgstr ""
 
-#: gnu-v3-abi.c:1133
+#: gnu-v3-abi.c:1126
 #, possible-c-format
 msgid "cannot find typeinfo for object of type '%s'"
 msgstr ""
 
-#: gnu-v3-abi.c:1148
+#: gnu-v3-abi.c:1139
 #, possible-c-format
 msgid "could not find typeinfo symbol for '%s'"
 msgstr ""
 
-#: gnu-v3-abi.c:1172
+#: gnu-v3-abi.c:1162
 #, possible-c-format
 msgid "could not find minimal symbol for typeinfo address %s"
 msgstr ""
 
-#: gnu-v3-abi.c:1180
+#: gnu-v3-abi.c:1170
 #, possible-c-format
 msgid "typeinfo symbol '%s' has unexpected name"
 msgstr ""
@@ -12338,7 +12579,7 @@ msgid ""
 "the `info dos ldt' command."
 msgstr ""
 
-#: go-exp.y:1410
+#: go-exp.y:1358
 #, possible-c-format
 msgid "Unknown function in `unsafe' package: %s"
 msgstr ""
@@ -12355,28 +12596,28 @@ msgstr ""
 msgid "<invalid length: "
 msgstr ""
 
-#: guile/scm-symbol.c:274
+#: guile/scm-symbol.c:275
 msgid "<gdb:symbol>"
 msgstr ""
 
-#: guile/scm-symbol.c:538
+#: guile/scm-symbol.c:539
 msgid "cannot get the value of a typedef"
 msgstr ""
 
-#: guile/scm-symbol.c:547
+#: guile/scm-symbol.c:548
 msgid "Invalid frame"
 msgstr ""
 
-#: guile/scm-symbol.c:551
+#: guile/scm-symbol.c:552
 msgid "Symbol requires a frame to compute its value"
 msgstr ""
 
-#: guile/scm-symbol.c:608 valops.c:3738
+#: guile/scm-symbol.c:613 valops.c:3746
 msgid "no frame selected"
 msgstr ""
 
-#: guile/scm-param.c:241 guile/scm-cmd.c:693 python/py-cmd.c:620
-#: python/py-param.c:322
+#: guile/scm-param.c:241 guile/scm-cmd.c:694 python/py-cmd.c:583
+#: python/py-param.c:320
 msgid "This command is not documented."
 msgstr ""
 
@@ -12402,7 +12643,7 @@ msgstr ""
 msgid "Error occurred showing parameter."
 msgstr ""
 
-#: guile/scm-param.c:497 guile/scm-objfile.c:290 guile/scm-value.c:844
+#: guile/scm-param.c:497 guile/scm-objfile.c:290 guile/scm-value.c:835
 #: guile/scm-pretty-print.c:255 guile/scm-progspace.c:331
 msgid "list"
 msgstr ""
@@ -12411,89 +12652,89 @@ msgstr ""
 msgid "enumeration list is empty"
 msgstr ""
 
-#: guile/scm-param.c:518 guile/scm-param.c:705 guile/scm-type.c:986
-#: guile/scm-type.c:1031 guile/scm-utils.c:207 guile/scm-value.c:718
+#: guile/scm-param.c:517 guile/scm-param.c:704 guile/scm-type.c:964
+#: guile/scm-type.c:1009 guile/scm-utils.c:207 guile/scm-value.c:708
 #: guile/scm-pretty-print.c:156
 msgid "string"
 msgstr ""
 
-#: guile/scm-param.c:654
+#: guile/scm-param.c:653
 msgid "program error: unhandled type"
 msgstr ""
 
-#: guile/scm-param.c:676
+#: guile/scm-param.c:675
 msgid "string or #f for non-PARAM_FILENAME parameters"
 msgstr ""
 
-#: guile/scm-param.c:718
+#: guile/scm-param.c:717
 msgid "not member of enumeration"
 msgstr ""
 
-#: guile/scm-param.c:726 guile/scm-utils.c:217 guile/scm-breakpoint.c:579
-#: guile/scm-breakpoint.c:617
+#: guile/scm-param.c:725 guile/scm-utils.c:217 guile/scm-breakpoint.c:590
+#: guile/scm-breakpoint.c:628
 msgid "boolean"
 msgstr ""
 
-#: guile/scm-param.c:734
+#: guile/scm-param.c:733
 msgid "boolean or #:auto"
 msgstr ""
 
-#: guile/scm-param.c:753
+#: guile/scm-param.c:752
 msgid "integer or #:unlimited"
 msgstr ""
 
-#: guile/scm-param.c:766 guile/scm-type.c:1116 guile/scm-ports.c:1228
-#: guile/scm-ports.c:1270 guile/scm-breakpoint.c:654
-#: guile/scm-breakpoint.c:694
+#: guile/scm-param.c:765 guile/scm-type.c:1094 guile/scm-ports.c:1182
+#: guile/scm-ports.c:1224 guile/scm-breakpoint.c:665
+#: guile/scm-breakpoint.c:705
 msgid "integer"
 msgstr ""
 
-#: guile/scm-param.c:785
+#: guile/scm-param.c:784
 msgid "must be >= -1"
 msgstr ""
 
-#: guile/scm-param.c:898 guile/scm-cmd.c:720
+#: guile/scm-param.c:897 guile/scm-cmd.c:721
 msgid "invalid command class argument"
 msgstr ""
 
-#: guile/scm-param.c:904
+#: guile/scm-param.c:903
 msgid "invalid parameter type argument"
 msgstr ""
 
-#: guile/scm-param.c:909
+#: guile/scm-param.c:908
 msgid "#:enum-values can only be provided with PARAM_ENUM"
 msgstr ""
 
-#: guile/scm-param.c:914
+#: guile/scm-param.c:913
 msgid "PARAM_ENUM requires an enum-values argument"
 msgstr ""
 
-#: guile/scm-param.c:919 guile/scm-param.c:924 guile/scm-iterator.c:162
-#: guile/scm-cmd.c:713 guile/scm-pretty-print.c:158
+#: guile/scm-param.c:918 guile/scm-param.c:923 guile/scm-iterator.c:162
+#: guile/scm-cmd.c:714 guile/scm-pretty-print.c:158
 msgid "procedure"
 msgstr ""
 
-#: guile/scm-param.c:995
+#: guile/scm-param.c:994
 msgid "parameter is already registered"
 msgstr ""
 
-#: guile/scm-param.c:1008
+#: guile/scm-param.c:1007
 msgid "parameter exists, \"set\" command is already defined"
 msgstr ""
 
-#: guile/scm-param.c:1013
+#: guile/scm-param.c:1012
 msgid "parameter exists, \"show\" command is already defined"
 msgstr ""
 
-#: guile/scm-param.c:1051
+#: guile/scm-param.c:1050
 msgid "<gdb:parameter> or string"
 msgstr ""
 
-#: guile/scm-param.c:1091
+#: guile/scm-param.c:1090
 msgid "parameter not found"
 msgstr ""
 
-#: guile/scm-param.c:1096
+#: guile/scm-param.c:1095
 msgid "not a parameter"
 msgstr ""
 
@@ -12527,27 +12768,27 @@ msgstr ""
 msgid "<gdb:objfile>"
 msgstr ""
 
-#: guile/scm-frame.c:332
+#: guile/scm-frame.c:327
 msgid "inferior"
 msgstr ""
 
-#: guile/scm-frame.c:335
+#: guile/scm-frame.c:330
 msgid "inferior has changed"
 msgstr ""
 
-#: guile/scm-frame.c:449 guile/scm-frame.c:490 guile/scm-frame.c:520
-#: guile/scm-frame.c:551 guile/scm-frame.c:586 guile/scm-frame.c:619
-#: guile/scm-frame.c:670 guile/scm-frame.c:707 guile/scm-frame.c:744
-#: guile/scm-frame.c:780 guile/scm-frame.c:828 guile/scm-frame.c:875
+#: guile/scm-frame.c:444 guile/scm-frame.c:485 guile/scm-frame.c:515
+#: guile/scm-frame.c:546 guile/scm-frame.c:581 guile/scm-frame.c:614
+#: guile/scm-frame.c:665 guile/scm-frame.c:702 guile/scm-frame.c:739
+#: guile/scm-frame.c:775 guile/scm-frame.c:823 guile/scm-frame.c:871
 #: guile/scm-frame.c:980
 msgid "<gdb:frame>"
 msgstr ""
 
-#: guile/scm-frame.c:629
+#: guile/scm-frame.c:624
 msgid "cannot find block for frame"
 msgstr ""
 
-#: guile/scm-frame.c:834
+#: guile/scm-frame.c:829
 msgid "unknown register"
 msgstr ""
 
@@ -12567,23 +12808,23 @@ msgstr ""
 msgid "type is not a structure, union, or enum type"
 msgstr ""
 
-#: guile/scm-type.c:733 python/py-type.c:542
+#: guile/scm-type.c:711 python/py-type.c:517
 msgid "Array length must not be negative"
 msgstr ""
 
-#: guile/scm-type.c:824
+#: guile/scm-type.c:802
 msgid "ranged type"
 msgstr ""
 
-#: guile/scm-type.c:1014
+#: guile/scm-type.c:992
 msgid "Unknown field"
 msgstr ""
 
-#: guile/scm-type.c:1174
+#: guile/scm-type.c:1152
 msgid "enum type"
 msgstr ""
 
-#: guile/scm-type.c:1191
+#: guile/scm-type.c:1169
 msgid "non-enum type"
 msgstr ""
 
@@ -12689,31 +12930,31 @@ msgstr ""
 msgid "Missing value for keyword argument"
 msgstr ""
 
-#: guile/guile.c:181 guile/guile.c:417
+#: guile/guile.c:180 guile/guile.c:410
 msgid "guile-repl currently does not take any arguments."
 msgstr ""
 
-#: guile/guile.c:270
+#: guile/guile.c:269
 msgid "Invalid \"guile\" block structure."
 msgstr ""
 
-#: guile/guile.c:418 guile/guile.c:426
+#: guile/guile.c:411 guile/guile.c:419
 msgid "Guile scripting is not supported in this copy of GDB."
 msgstr ""
 
-#: guile/guile.c:470
+#: guile/guile.c:463
 msgid "\"info guile\" must be followed by the name of an info command.\n"
 msgstr ""
 
-#: guile/guile.c:574
+#: guile/guile.c:568
 msgid "Error in function ~s:~%"
 msgstr ""
 
-#: guile/guile.c:598
+#: guile/guile.c:592
 msgid "Throw to key `~a' with args `~s'.~%"
 msgstr ""
 
-#: guile/guile.c:613
+#: guile/guile.c:607
 #, possible-c-format
 msgid ""
 "Could not complete Guile gdb module initialization from:\n"
@@ -12722,7 +12963,7 @@ msgid ""
 "Suggest passing --data-directory=/path/to/gdb/data-directory.\n"
 msgstr ""
 
-#: guile/guile.c:757
+#: guile/guile.c:751
 msgid ""
 "Start an interactive Guile prompt.\n"
 "\n"
@@ -12730,7 +12971,7 @@ msgid ""
 "prompt) or ,quit."
 msgstr ""
 
-#: guile/guile.c:763
+#: guile/guile.c:757
 msgid ""
 "Start a Guile interactive prompt.\n"
 "\n"
@@ -12738,7 +12979,7 @@ msgid ""
 "This command is only a placeholder."
 msgstr ""
 
-#: guile/guile.c:776
+#: guile/guile.c:770
 msgid ""
 "Evaluate one or more Guile expressions.\n"
 "\n"
@@ -12763,7 +13004,7 @@ msgid ""
 "Type \",help\" once in a Guile interactive session."
 msgstr ""
 
-#: guile/guile.c:799
+#: guile/guile.c:793
 msgid ""
 "Evaluate a Guile expression.\n"
 "\n"
@@ -12771,94 +13012,78 @@ msgid ""
 "This command is only a placeholder."
 msgstr ""
 
-#: guile/guile.c:809 guile/guile.c:815
+#: guile/guile.c:803 guile/guile.c:809
 msgid "Prefix command for Guile preference settings."
 msgstr ""
 
-#: guile/guile.c:821
+#: guile/guile.c:815
 msgid "Prefix command for Guile info displays."
 msgstr ""
 
-#: guile/guile.c:829
+#: guile/guile.c:823
 msgid "Set mode for Guile exception printing on error."
 msgstr ""
 
-#: guile/guile.c:830
+#: guile/guile.c:824
 msgid "Show the mode of Guile exception printing on error."
 msgstr ""
 
-#: guile/guile.c:831 python/python.c:1701
+#: guile/guile.c:825 python/python.c:1770
 msgid ""
 "none  == no stack or message will be printed.\n"
 "full == a message and a stack will be printed.\n"
 "message == an error message without a stack will be printed."
 msgstr ""
 
-#: guile/scm-ports.c:435
-msgid "ioscm_file_port_delete: bad magic number"
-msgstr ""
-
-#: guile/scm-ports.c:446
-msgid "ioscm_file_port_rewind: bad magic number"
-msgstr ""
-
-#: guile/scm-ports.c:460
-msgid "ioscm_file_port_put: bad magic number"
-msgstr ""
-
-#: guile/scm-ports.c:474
-msgid "ioscm_pot_file_write: bad magic number"
-msgstr ""
-
-#: guile/scm-ports.c:508
+#: guile/scm-ports.c:467
 msgid "output port"
 msgstr ""
 
-#: guile/scm-ports.c:510
+#: guile/scm-ports.c:469
 msgid "thunk"
 msgstr ""
 
-#: guile/scm-ports.c:642
+#: guile/scm-ports.c:595
 msgid "error reading memory"
 msgstr ""
 
-#: guile/scm-ports.c:665
+#: guile/scm-ports.c:618
 msgid "overflow in offset calculation"
 msgstr ""
 
-#: guile/scm-ports.c:677
+#: guile/scm-ports.c:630
 msgid "bad offset"
 msgstr ""
 
-#: guile/scm-ports.c:702 guile/scm-ports.c:727
+#: guile/scm-ports.c:655 guile/scm-ports.c:681
 msgid "writing beyond end of memory range"
 msgstr ""
 
-#: guile/scm-ports.c:707 guile/scm-ports.c:734 guile/scm-ports.c:766
+#: guile/scm-ports.c:660 guile/scm-ports.c:688 guile/scm-ports.c:720
 msgid "error writing memory"
 msgstr ""
 
-#: guile/scm-ports.c:862
+#: guile/scm-ports.c:816
 msgid "bad seek"
 msgstr ""
 
-#: guile/scm-ports.c:950 guile/scm-ports.c:963
+#: guile/scm-ports.c:904 guile/scm-ports.c:917
 msgid "bad mode string"
 msgstr ""
 
-#: guile/scm-ports.c:1052
+#: guile/scm-ports.c:1006
 msgid "port is unbuffered: ~a"
 msgstr ""
 
-#: guile/scm-ports.c:1061
+#: guile/scm-ports.c:1015
 msgid "read buffer not empty: ~a"
 msgstr ""
 
-#: guile/scm-ports.c:1068
+#: guile/scm-ports.c:1022
 msgid "write buffer not empty: ~a"
 msgstr ""
 
-#: guile/scm-ports.c:1152 guile/scm-disasm.c:268
+#: guile/scm-ports.c:1106 guile/scm-disasm.c:233
 msgid "start+size overflows"
 msgstr ""
 
@@ -12892,7 +13117,7 @@ msgstr ""
 msgid "Bad completer result: "
 msgstr ""
 
-#: guile/scm-cmd.c:499 guile/scm-cmd.c:707
+#: guile/scm-cmd.c:499 guile/scm-cmd.c:708
 msgid "no command name found"
 msgstr ""
 
@@ -12906,15 +13131,15 @@ msgstr ""
 msgid "'%s' is not a prefix command"
 msgstr ""
 
-#: guile/scm-cmd.c:727
+#: guile/scm-cmd.c:728
 msgid "integer or procedure"
 msgstr ""
 
-#: guile/scm-cmd.c:733
+#: guile/scm-cmd.c:734
 msgid "invalid completion type argument"
 msgstr ""
 
-#: guile/scm-cmd.c:762
+#: guile/scm-cmd.c:763
 msgid "command is already registered"
 msgstr ""
 
@@ -12942,81 +13167,81 @@ msgstr ""
 msgid "No type allowed"
 msgstr ""
 
-#: guile/scm-breakpoint.c:319
+#: guile/scm-breakpoint.c:323
 msgid "<gdb:breakpoint>"
 msgstr ""
 
-#: guile/scm-breakpoint.c:369
+#: guile/scm-breakpoint.c:373
 msgid "access type with breakpoint is not allowed"
 msgstr ""
 
-#: guile/scm-breakpoint.c:382
+#: guile/scm-breakpoint.c:386
 msgid "invalid watchpoint class"
 msgstr ""
 
-#: guile/scm-breakpoint.c:388
+#: guile/scm-breakpoint.c:392
 msgid "invalid breakpoint type"
 msgstr ""
 
-#: guile/scm-breakpoint.c:414
+#: guile/scm-breakpoint.c:421
 msgid "not a Scheme breakpoint"
 msgstr ""
 
-#: guile/scm-breakpoint.c:417
+#: guile/scm-breakpoint.c:424
 msgid "breakpoint is already registered"
 msgstr ""
 
-#: guile/scm-breakpoint.c:703
+#: guile/scm-breakpoint.c:714
 msgid "hit-count must be zero"
 msgstr ""
 
-#: guile/scm-breakpoint.c:740
+#: guile/scm-breakpoint.c:751
 msgid "invalid thread id"
 msgstr ""
 
-#: guile/scm-breakpoint.c:746 guile/scm-breakpoint.c:800
+#: guile/scm-breakpoint.c:757 guile/scm-breakpoint.c:811
 msgid "integer or #f"
 msgstr ""
 
-#: guile/scm-breakpoint.c:794
+#: guile/scm-breakpoint.c:805
 msgid "invalid task id"
 msgstr ""
 
-#: guile/scm-breakpoint.c:887
+#: guile/scm-breakpoint.c:898
 msgid "string or #f"
 msgstr ""
 
-#: guile/scm-breakpoint.c:934
+#: guile/scm-breakpoint.c:945
 msgid "procedure or #f"
 msgstr ""
 
-#: guile/scm-value.c:530
+#: guile/scm-value.c:520
 msgid ""
 "Trying to get the referenced value from a value which is neither a pointer "
 "nor a reference"
 msgstr ""
 
-#: guile/scm-value.c:793
+#: guile/scm-value.c:784
 msgid "Cannot subscript requested type"
 msgstr ""
 
-#: guile/scm-value.c:841
+#: guile/scm-value.c:832
 msgid "function (value of TYPE_CODE_FUNC)"
 msgstr ""
 
-#: guile/scm-value.c:962 guile/scm-value.c:1005
+#: guile/scm-value.c:953 guile/scm-value.c:996
 msgid "integer-like gdb value"
 msgstr ""
 
-#: guile/scm-value.c:1051
+#: guile/scm-value.c:1042
 msgid "number"
 msgstr ""
 
-#: guile/scm-value.c:1066
+#: guile/scm-value.c:1057
 msgid "number can't be converted to a double"
 msgstr ""
 
-#: guile/scm-value.c:1130
+#: guile/scm-value.c:1121
 msgid "invalid error kind"
 msgstr ""
 
@@ -13040,7 +13265,7 @@ msgstr ""
 msgid "invalid result from pretty-printer to-string"
 msgstr ""
 
-#: guile/scm-pretty-print.c:630 python/py-prettyprint.c:293 valprint.c:792
+#: guile/scm-pretty-print.c:630 python/py-prettyprint.c:269 valprint.c:1124
 msgid "<error reading variable>"
 msgstr ""
 
@@ -13064,11 +13289,11 @@ msgstr ""
 msgid "first element of pretty-printer children iterator is not a string"
 msgstr ""
 
-#: guile/scm-disasm.c:244
+#: guile/scm-disasm.c:209
 msgid "input port"
 msgstr ""
 
-#: guile/scm-disasm.c:254
+#: guile/scm-disasm.c:219
 msgid "offset provided but port is missing"
 msgstr ""
 
@@ -13096,33 +13321,33 @@ msgstr ""
 msgid "cannot create a value from NULL"
 msgstr ""
 
-#: h8300-tdep.c:774 h8300-tdep.c:807
+#: h8300-tdep.c:772 h8300-tdep.c:804
 msgid "I don't know how this 8 byte value is returned."
 msgstr ""
 
 #. long long, double and long double
 #. are all defined as 4 byte types so
 #. far so this shouldn't happen.
-#: h8300-tdep.c:870
+#: h8300-tdep.c:867
 msgid "I don't know how to return an 8 byte value."
 msgstr ""
 
-#: h8300-tdep.c:968
+#: h8300-tdep.c:965
 #, possible-c-format
 msgid "h8300_register_name: illegal register number %d"
 msgstr ""
 
-#: h8300-tdep.c:986
+#: h8300-tdep.c:983
 #, possible-c-format
 msgid "h8300s_register_name: illegal register number %d"
 msgstr ""
 
-#: h8300-tdep.c:1004
+#: h8300-tdep.c:1001
 #, possible-c-format
 msgid "h8300sx_register_name: illegal register number %d"
 msgstr ""
 
-#: h8300-tdep.c:1140
+#: h8300-tdep.c:1137
 #, possible-c-format
 msgid "h8300_register_type: illegal register number %d"
 msgstr ""
@@ -13132,86 +13357,81 @@ msgstr ""
 msgid "Invalid register number %d."
 msgstr ""
 
-#: hppa-linux-nat.c:233 i386-linux-nat.c:116 ia64-linux-nat.c:754
-#: inf-ptrace.c:739 m68klinux-nat.c:125
+#: hppa-linux-nat.c:233 i386-linux-nat.c:116 ia64-linux-nat.c:757
+#: inf-ptrace.c:742 m68k-linux-nat.c:125
 #, possible-c-format
 msgid "Couldn't read register %s (#%d): %s."
 msgstr ""
 
-#: hppa-linux-nat.c:261 i386-linux-nat.c:145 ia64-linux-nat.c:813
-#: inf-ptrace.c:798 m68klinux-nat.c:184
+#: hppa-linux-nat.c:261 i386-linux-nat.c:145 ia64-linux-nat.c:816
+#: inf-ptrace.c:801 m68k-linux-nat.c:184
 #, possible-c-format
 msgid "Couldn't write register %s (#%d): %s."
 msgstr ""
 
-#: hppa-linux-tdep.c:49 hppa-tdep.c:704
-#, possible-c-format
-msgid "Unmapped DWARF DBX Register #%d encountered."
-msgstr ""
-
-#: hppa-tdep.c:516
+#: hppa-tdep.c:519
 msgid "Internal error reading unwind information."
 msgstr ""
 
-#: hppa-tdep.c:2007
+#: hppa-tdep.c:2001
 #, possible-c-format
 msgid "Cannot read instruction at %s."
 msgstr ""
 
-#: hppa-tdep.c:2505
+#: hppa-tdep.c:2483
 msgid "Requesting registers from null frame."
 msgstr ""
 
-#: hppa-tdep.c:3018
+#: hppa-tdep.c:2996
 #, possible-c-format
 msgid "Cannot resolve PLT stub at %s."
 msgstr ""
 
-#: hppa-tdep.c:3125
+#: hppa-tdep.c:3095
 #, possible-c-format
 msgid "Unsupported address size: %d"
 msgstr ""
 
-#: hppa-tdep.c:3233
+#: hppa-tdep.c:3202
 msgid "Print unwind table entry at given address."
 msgstr ""
 
 #. Debug this files internals.
-#: hppa-tdep.c:3237
+#: hppa-tdep.c:3206
 msgid ""
 "Set whether hppa target specific debugging information should be displayed."
 msgstr ""
 
-#: hppa-tdep.c:3239
+#: hppa-tdep.c:3208
 msgid "Show whether hppa target specific debugging information is displayed."
 msgstr ""
 
-#: hppa-tdep.c:3240
+#: hppa-tdep.c:3209
 msgid ""
 "This flag controls whether hppa target specific debugging information is\n"
 "displayed.  This information is particularly useful for debugging frame\n"
 "unwinding problems."
 msgstr ""
 
-#: i386bsd-nat.c:257
+#: i386-bsd-nat.c:254
 msgid "Couldn't write XMM registers"
 msgstr ""
 
-#: i386bsd-nat.c:413
+#: i386-bsd-nat.c:332
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n"
 "Please report this to <bug-gdb@gnu.org>."
 msgstr ""
 
-#: i386bsd-nat.c:426
+#: i386-bsd-nat.c:345
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n"
 "Please report this to <bug-gdb@gnu.org>."
 msgstr ""
 
-#: i386bsd-nat.c:439
+#: i386-bsd-nat.c:358
 #, possible-c-format
 msgid ""
 "offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n"
@@ -13243,55 +13463,55 @@ msgstr ""
 msgid "darwin_set_sstep: unknown flavour: %d"
 msgstr ""
 
-#: i386fbsd-tdep.c:264 i386-linux-tdep.c:602
+#: i386-fbsd-tdep.c:264 i386-linux-tdep.c:667
 msgid "Couldn't read `xcr0' bytes from `.reg-xstate' section in core file."
 msgstr ""
 
-#: i386gnu-nat.c:67 i386gnu-nat.c:157
+#: i386-gnu-nat.c:71 i386-gnu-nat.c:161
 #, possible-c-format
 msgid "Couldn't fetch floating-point state from %s"
 msgstr ""
 
-#: i386gnu-nat.c:97
+#: i386-gnu-nat.c:101
 #, possible-c-format
 msgid "Can't fetch registers from thread %s: No such thread"
 msgstr ""
 
-#: i386gnu-nat.c:108
+#: i386-gnu-nat.c:112
 #, possible-c-format
 msgid "Couldn't fetch registers from %s"
 msgstr ""
 
-#: i386gnu-nat.c:170
+#: i386-gnu-nat.c:174
 #, possible-c-format
 msgid "Couldn't store floating-point state into %s"
 msgstr ""
 
-#: i386gnu-nat.c:190
+#: i386-gnu-nat.c:194
 #, possible-c-format
 msgid "Couldn't store registers into thread %s: No such thread"
 msgstr ""
 
-#: i386gnu-nat.c:207
+#: i386-gnu-nat.c:211
 #, possible-c-format
 msgid "Couldn't store registers into %s"
 msgstr ""
 
-#: i386gnu-nat.c:228
+#: i386-gnu-nat.c:232
 #, possible-c-format
 msgid "Register %s changed after the thread was aborted"
 msgstr ""
 
-#: i386gnu-nat.c:235
+#: i386-gnu-nat.c:239
 msgid "... also writing this register!  Suspicious..."
 msgstr ""
 
-#: i386gnu-nat.c:287
+#: i386-gnu-nat.c:291
 #, possible-c-format
 msgid "Couldn't fetch debug state from %s"
 msgstr ""
 
-#: i386gnu-nat.c:301
+#: i386-gnu-nat.c:305
 #, possible-c-format
 msgid "Couldn't store debug state into %s"
 msgstr ""
@@ -13308,36 +13528,62 @@ msgstr ""
 msgid "Couldn't write floating-point and SSE registers"
 msgstr ""
 
-#: i386-linux-nat.c:529 m32r-linux-nat.c:214 m68klinux-nat.c:456
+#: i386-linux-nat.c:529 m32r-linux-nat.c:214 m68k-linux-nat.c:456
 #, possible-c-format
 msgid "Got request for bad register number %d."
 msgstr ""
 
-#: i386-linux-nat.c:598 m32r-linux-nat.c:239 m68klinux-nat.c:504
+#: i386-linux-nat.c:598 m32r-linux-nat.c:239 m68k-linux-nat.c:504
 #, possible-c-format
 msgid "Got request to store bad register number %d."
 msgstr ""
 
-#: i386-tdep.c:2762
+#: i386-linux-tdep.c:435
+msgid "Upper bound violation"
+msgstr ""
+
+#: i386-linux-tdep.c:437
+msgid "Lower bound violation"
+msgstr ""
+
+#: i386-linux-tdep.c:439
+msgid " while accessing address "
+msgstr ""
+
+#: i386-linux-tdep.c:442
+msgid ""
+"\n"
+"Bounds: [lower = "
+msgstr ""
+
+#: i386-linux-tdep.c:445
+msgid ", upper = "
+msgstr ""
+
+#: i386-linux-tdep.c:448
+msgid "]"
+msgstr ""
+
+#: i386-tdep.c:2793
 msgid "Cannot find floating-point return value."
 msgstr ""
 
-#: i386-tdep.c:2793 m68k-tdep.c:309
+#: i386-tdep.c:2824 m68k-tdep.c:304
 #, possible-c-format
 msgid "Cannot extract return value of %d bytes long."
 msgstr ""
 
-#: i386-tdep.c:2815
+#: i386-tdep.c:2846
 msgid "Cannot set floating-point return value."
 msgstr ""
 
-#: i386-tdep.c:2858 m68k-tdep.c:350
+#: i386-tdep.c:2889 m68k-tdep.c:345
 #, possible-c-format
 msgid "Cannot store return value of %d bytes long."
 msgstr ""
 
-#: i386-tdep.c:4832 i386-tdep.c:5723 i386-tdep.c:6397 i386-tdep.c:6952
-#: i386-tdep.c:7009
+#: i386-tdep.c:4938 i386-tdep.c:5846 i386-tdep.c:6515 i386-tdep.c:7065
+#: i386-tdep.c:7117
 #, possible-c-format
 msgid ""
 "Process record ignores the memory change of instruction at address %s\n"
@@ -13347,241 +13593,246 @@ msgstr ""
 
 #. XXX
 #. int3
-#: i386-tdep.c:6738
+#: i386-tdep.c:6854
 msgid "Process record does not support instruction int3.\n"
 msgstr ""
 
-#: i386-tdep.c:6755
+#: i386-tdep.c:6871
 #, possible-c-format
 msgid "Process record does not support instruction int 0x%02x.\n"
 msgstr ""
 
 #. XXX
 #. into
-#: i386-tdep.c:6769
+#: i386-tdep.c:6885
 msgid "Process record does not support instruction into.\n"
 msgstr ""
 
 #. bound
-#: i386-tdep.c:6780
+#: i386-tdep.c:6896
 msgid "Process record does not support instruction bound.\n"
 msgstr ""
 
 #. wrmsr
-#: i386-tdep.c:6816
+#: i386-tdep.c:6932
 msgid "Process record does not support instruction wrmsr.\n"
 msgstr ""
 
 #. rdmsr
-#: i386-tdep.c:6823
+#: i386-tdep.c:6939
 msgid "Process record does not support instruction rdmsr.\n"
 msgstr ""
 
-#: i386-tdep.c:6844
+#: i386-tdep.c:6960
 msgid "Process record does not support instruction sysenter.\n"
 msgstr ""
 
 #. sysexit
-#: i386-tdep.c:6856
+#: i386-tdep.c:6972
 msgid "Process record does not support instruction sysexit.\n"
 msgstr ""
 
-#: i386-tdep.c:6867
+#: i386-tdep.c:6983
 msgid "Process record does not support instruction syscall.\n"
 msgstr ""
 
 #. sysret
-#: i386-tdep.c:6879
+#: i386-tdep.c:6995
 msgid "Process record does not support instruction sysret.\n"
 msgstr ""
 
 #. hlt
-#: i386-tdep.c:6893
+#: i386-tdep.c:7009
 msgid "Process record does not support instruction hlt.\n"
 msgstr ""
 
-#: i386-tdep.c:8021
+#: i386-tdep.c:8127
 #, possible-c-format
 msgid "Process record does not support instruction 0x%02x at address %s.\n"
 msgstr ""
 
-#: i386-tdep.c:8089
+#: i386-tdep.c:8188
 #, possible-c-format
 msgid ""
 "; instruction is only %d bytes long, need at least %d bytes for the jump"
 msgstr ""
 
-#: i386-tdep.c:8639
+#: i386-tdep.c:8789
 #, possible-c-format
 msgid "BNDCFGU register invalid, read status %d."
 msgstr ""
 
-#: i386-tdep.c:8687
-msgid "operation not supported"
+#: i386-tdep.c:8835
+msgid ""
+"bound table examination not supported for 64-bit process with 32-bit GDB"
 msgstr ""
 
-#: i386-tdep.c:8704
+#: i386-tdep.c:8853
 #, possible-c-format
 msgid "Invalid bounds directory entry at %s."
 msgstr ""
 
-#: i386-tdep.c:8778 i386-tdep.c:8815
-msgid "Intel(R) Memory Protection Extensions not supported on this target."
+#: i386-tdep.c:8929
+msgid "Intel Memory Protection Extensions not supported on this target.\n"
+msgstr ""
+
+#: i386-tdep.c:8936
+msgid "Address of pointer variable expected.\n"
 msgstr ""
 
-#: i386-tdep.c:8782
-msgid "Address of pointer variable expected."
+#: i386-tdep.c:8972
+msgid "Intel Memory Protection Extensions not supported on this target."
 msgstr ""
 
-#: i386-tdep.c:8819
+#: i386-tdep.c:8976
 msgid "Pointer value expected."
 msgstr ""
 
-#: i386-tdep.c:8826
+#: i386-tdep.c:8983
 msgid "wrong number of arguments: missing lower and upper bound."
 msgstr ""
 
-#: i386-tdep.c:8832
+#: i386-tdep.c:8989
 msgid "Wrong number of arguments; Missing upper bound."
 msgstr ""
 
-#: i386-tdep.c:8878
+#: i386-tdep.c:9036
 msgid "Set the disassembly flavor."
 msgstr ""
 
-#: i386-tdep.c:8879
+#: i386-tdep.c:9037
 msgid "Show the disassembly flavor."
 msgstr ""
 
-#: i386-tdep.c:8880
+#: i386-tdep.c:9038
 msgid ""
 "The valid values are \"att\" and \"intel\", and the default value is \"att\"."
 msgstr ""
 
-#: i386-tdep.c:8889
+#: i386-tdep.c:9047
 msgid "Set the convention for returning small structs."
 msgstr ""
 
-#: i386-tdep.c:8890
+#: i386-tdep.c:9048
 msgid "Show the convention for returning small structs."
 msgstr ""
 
-#: i386-tdep.c:8891
+#: i386-tdep.c:9049
 msgid ""
 "Valid values are \"default\", \"pcc\" and \"reg\", and the default value\n"
 "is \"default\"."
 msgstr ""
 
 #. Add "mpx" prefix for the set commands.
-#: i386-tdep.c:8900
-msgid "Set Intel(R) Memory Protection Extensions specific variables."
+#: i386-tdep.c:9058
+msgid "Set Intel Memory Protection Extensions specific variables."
 msgstr ""
 
 #. allow-unknown
 #. Add "mpx" prefix for the show commands.
-#: i386-tdep.c:8907
-msgid "Show Intel(R) Memory Protection Extensions specific variables."
+#: i386-tdep.c:9065
+msgid "Show Intel Memory Protection Extensions specific variables."
 msgstr ""
 
 #: i387-tdep.c:122 i387-tdep.c:160 i387-tdep.c:308 i387-tdep.c:318
 #: i387-tdep.c:320 i387-tdep.c:322 i387-tdep.c:324 i387-tdep.c:326
-#: i387-tdep.c:330 tui/tui-stack.c:391 valprint.c:353
+#: i387-tdep.c:330 tui/tui-stack.c:388 valprint.c:385
 msgid "<unavailable>"
 msgstr ""
 
-#: i387-tdep.c:370 m68k-tdep.c:214
+#: i387-tdep.c:370 m68k-tdep.c:209
 msgid ""
 "Cannot convert floating-point register value to non-floating-point type."
 msgstr ""
 
-#: i387-tdep.c:401 m68k-tdep.c:246
+#: i387-tdep.c:401 m68k-tdep.c:241
 msgid ""
 "Cannot convert non-floating-point type to floating-point register value."
 msgstr ""
 
-#: i387-tdep.c:1526 i387-tdep.c:1629
+#: i387-tdep.c:1600 i387-tdep.c:1716
 msgid "invalid i387 regclass"
 msgstr ""
 
-#: ia64-libunwind-tdep.c:220
+#: ia64-libunwind-tdep.c:235
 msgid "Can't get libunwind sp register."
 msgstr ""
 
-#: ia64-libunwind-tdep.c:507 ia64-libunwind-tdep.c:510
+#: ia64-libunwind-tdep.c:525 ia64-libunwind-tdep.c:528
 #, possible-c-format
 msgid "[GDB failed to load %s: %s]\n"
 msgstr ""
 
-#: ia64-tdep.c:533
+#: ia64-tdep.c:531
 msgid ""
 "Can't fetch instructions for slot numbers greater than 2.\n"
 "Using slot 0 instead"
 msgstr ""
 
-#: ia64-tdep.c:649 ia64-tdep.c:836
+#: ia64-tdep.c:647 ia64-tdep.c:840
 msgid "Can't insert breakpoint for slot numbers greater than 2."
 msgstr ""
 
-#: ia64-tdep.c:682 ia64-tdep.c:864
+#: ia64-tdep.c:680 ia64-tdep.c:868
 msgid "Can't insert breakpoint for non-existing slot X"
 msgstr ""
 
-#: ia64-tdep.c:720
+#: ia64-tdep.c:718
 #, possible-c-format
 msgid "Address %s already contains a breakpoint."
 msgstr ""
 
-#: ia64-tdep.c:773
+#: ia64-tdep.c:769
 #, possible-c-format
 msgid ""
 "Cannot remove breakpoint at address %s from non-existing X-type slot, memory "
 "has changed underneath"
 msgstr ""
 
-#: ia64-tdep.c:794
+#: ia64-tdep.c:789
 #, possible-c-format
 msgid ""
 "Cannot remove breakpoint at address %s, no break instruction at such address."
 msgstr ""
 
-#: infcall.c:79
+#: infcall.c:81
 #, possible-c-format
 msgid "Coercion of floats to doubles when calling functions is %s.\n"
 msgstr ""
 
-#: infcall.c:97
+#: infcall.c:99
 #, possible-c-format
 msgid ""
 "Unwinding of stack if a signal is received while in a call dummy is %s.\n"
 msgstr ""
 
-#: infcall.c:123
+#: infcall.c:125
 #, possible-c-format
 msgid ""
 "Unwind stack if a C++ exception is unhandled while in a call dummy is %s.\n"
 msgstr ""
 
-#: infcall.c:315
+#: infcall.c:317
 msgid "Invalid data type for function to be called."
 msgstr ""
 
-#: infcall.c:637
+#: infcall.c:732
 msgid "May not call functions while looking at trace frames."
 msgstr ""
 
-#: infcall.c:640
+#: infcall.c:735
 msgid "Cannot call functions in reverse mode."
 msgstr ""
 
-#: infcall.c:646
+#: infcall.c:741
 msgid "This target does not support function calls."
 msgstr ""
 
-#: infcall.c:848
+#: infcall.c:943
 msgid "Too few arguments in function call."
 msgstr ""
 
-#: infcall.c:1062
+#: infcall.c:1204
 #, possible-c-format
 msgid ""
 "%s\n"
@@ -13594,7 +13845,7 @@ msgstr ""
 #. We could discard the dummy frame here given that the program exited,
 #. but it will get garbage collected the next time the program is
 #. run anyway.
-#: infcall.c:1090
+#: infcall.c:1232
 #, possible-c-format
 msgid ""
 "The program being debugged exited while in a function called from GDB.\n"
@@ -13602,7 +13853,7 @@ msgid ""
 "(%s) will be abandoned."
 msgstr ""
 
-#: infcall.c:1110
+#: infcall.c:1252
 #, possible-c-format
 msgid ""
 "The program received a signal in another thread while\n"
@@ -13612,7 +13863,7 @@ msgid ""
 "When the function is done executing, GDB will silently stop."
 msgstr ""
 
-#: infcall.c:1118
+#: infcall.c:1260
 #, possible-c-format
 msgid ""
 "The program stopped in another thread while making a function call from "
@@ -13624,7 +13875,7 @@ msgstr ""
 
 #. FIXME: Insert a bunch of wrap_here; name can be very
 #. long if it's a C++ name with arguments and stuff.
-#: infcall.c:1154
+#: infcall.c:1295
 #, possible-c-format
 msgid ""
 "The program being debugged was signaled while in a function called from "
@@ -13637,7 +13888,7 @@ msgstr ""
 
 #. FIXME: Insert a bunch of wrap_here; name can be very
 #. long if it's a C++ name with arguments and stuff.
-#: infcall.c:1172
+#: infcall.c:1313
 #, possible-c-format
 msgid ""
 "The program being debugged was signaled while in a function called from "
@@ -13649,7 +13900,7 @@ msgid ""
 "When the function is done executing, GDB will silently stop."
 msgstr ""
 
-#: infcall.c:1193
+#: infcall.c:1334
 #, possible-c-format
 msgid ""
 "The program being debugged entered a std::terminate call, most likely\n"
@@ -13669,7 +13920,7 @@ msgstr ""
 #. someday this will be implemented (it would not be easy).
 #. FIXME: Insert a bunch of wrap_here; name can be very long if it's
 #. a C++ name with arguments and stuff.
-#: infcall.c:1220
+#: infcall.c:1361
 #, possible-c-format
 msgid ""
 "The program being debugged stopped while in a function called from GDB.\n"
@@ -13678,20 +13929,15 @@ msgid ""
 "When the function is done executing, GDB will silently stop."
 msgstr ""
 
-#. The above code errors out, so ...
-#: infcall.c:1229
-msgid "... should not be here"
-msgstr ""
-
-#: infcall.c:1297
+#: infcall.c:1383
 msgid "Set coercion of floats to doubles when calling functions."
 msgstr ""
 
-#: infcall.c:1298
+#: infcall.c:1384
 msgid "Show coercion of floats to doubles when calling functions"
 msgstr ""
 
-#: infcall.c:1299
+#: infcall.c:1385
 msgid ""
 "Variables of type float should generally be converted to doubles before\n"
 "calling an unprototyped function, and left alone when calling a prototyped\n"
@@ -13702,15 +13948,15 @@ msgid ""
 "The default is to perform the conversion.\n"
 msgstr ""
 
-#: infcall.c:1312
+#: infcall.c:1398
 msgid "Set unwinding of stack if a signal is received while in a call dummy."
 msgstr ""
 
-#: infcall.c:1313
+#: infcall.c:1399
 msgid "Show unwinding of stack if a signal is received while in a call dummy."
 msgstr ""
 
-#: infcall.c:1314
+#: infcall.c:1400
 msgid ""
 "The unwindonsignal lets the user determine what gdb should do if a signal\n"
 "is received while in a function called from gdb (call dummy).  If set, gdb\n"
@@ -13719,16 +13965,16 @@ msgid ""
 "The default is to stop in the frame where the signal was received."
 msgstr ""
 
-#: infcall.c:1324
+#: infcall.c:1410
 msgid "Set unwinding of stack if std::terminate is called while in call dummy."
 msgstr ""
 
-#: infcall.c:1325
+#: infcall.c:1411
 msgid ""
 "Show unwinding of stack if std::terminate() is called while in a call dummy."
 msgstr ""
 
-#: infcall.c:1327
+#: infcall.c:1413
 msgid ""
 "The unwind on terminating exception flag lets the user determine\n"
 "what gdb should do if a std::terminate() call is made from the\n"
@@ -13742,311 +13988,318 @@ msgstr ""
 msgid "Argument given to \"disconnect\"."
 msgstr ""
 
-#: infcmd.c:104 infcmd.c:2416 infcmd.c:2779 linux-fork.c:662
-#: record-btrace.c:216 remote-sim.c:894
+#: infcmd.c:105 infcmd.c:2576 infcmd.c:2987 linux-fork.c:685
+#: record-btrace.c:239 remote-sim.c:895
 msgid "The program is not being run."
 msgstr ""
 
-#: infcmd.c:182
+#: infcmd.c:187
 #, possible-c-format
 msgid "Terminal for future runs of program being debugged is \"%s\".\n"
 msgstr ""
 
-#: infcmd.c:346
+#: infcmd.c:351
 msgid "can't handle command-line argument containing whitespace"
 msgstr ""
 
-#: infcmd.c:450
+#: infcmd.c:455
 msgid ""
 "platform-specific solib_create_inferior_hook did not load initial shared "
 "libraries."
 msgstr ""
 
-#: infcmd.c:490
+#: infcmd.c:495
 msgid ""
 "The program being debugged has been started already.\n"
 "Start it from the beginning? "
 msgstr ""
 
-#: infcmd.c:492
+#: infcmd.c:497
 msgid "Program not restarted."
 msgstr ""
 
-#: infcmd.c:505
+#: infcmd.c:510
 msgid "Asynchronous execution not supported on this target."
 msgstr ""
 
-#: infcmd.c:565
+#: infcmd.c:569
 msgid "The target does not support running in non-stop mode."
 msgstr ""
 
-#: infcmd.c:654
+#: infcmd.c:658
 msgid "No symbol table loaded.  Use the \"file\" command."
 msgstr ""
 
-#: infcmd.c:686
+#: infcmd.c:690
 msgid "Cannot execute this command without a live selected thread."
 msgstr ""
 
-#: infcmd.c:697
+#: infcmd.c:701
 msgid "Cannot execute this command while looking at trace frames."
 msgstr ""
 
-#: infcmd.c:705
+#: infcmd.c:709
 msgid "Cannot execute this command while the selected thread is running."
 msgstr ""
 
-#: infcmd.c:794
+#: infcmd.c:796
 msgid "`-a' is meaningless in all-stop mode."
 msgstr ""
 
-#: infcmd.c:797
+#: infcmd.c:799
 msgid "Can't resume all threads and specify proceed count simultaneously."
 msgstr ""
 
-#: infcmd.c:846
+#: infcmd.c:859
 msgid "Continuing.\n"
 msgstr ""
 
-#: infcmd.c:1093 infcmd.c:1713
+#: infcmd.c:1145 infcmd.c:1871
 msgid "Cannot find bounds of current function"
 msgstr ""
 
-#: infcmd.c:1096
+#: infcmd.c:1148
 #, possible-c-format
 msgid ""
 "Single stepping until exit from function %s,\n"
 "which has no line number information.\n"
 msgstr ""
 
-#: infcmd.c:1164
+#: infcmd.c:1202
 msgid "starting address"
 msgstr ""
 
-#: infcmd.c:1169
+#: infcmd.c:1207
 msgid "Unreasonable jump request"
 msgstr ""
 
-#: infcmd.c:1179
+#: infcmd.c:1217
 msgid "No source file has been specified."
 msgstr ""
 
-#: infcmd.c:1188
+#: infcmd.c:1226
 #, possible-c-format
 msgid "Line %d is not in `%s'.  Jump anyway? "
 msgstr ""
 
-#: infcmd.c:1205
+#: infcmd.c:1243
 msgid "WARNING!!!  Destination is in unmapped overlay!  Jump anyway? "
 msgstr ""
 
-#: infcmd.c:1218
+#: infcmd.c:1256
 msgid "Continuing at "
 msgstr ""
 
-#: infcmd.c:1249 infcmd.c:1338
+#: infcmd.c:1287 infcmd.c:1378
 msgid "signal number"
 msgstr ""
 
-#: infcmd.c:1294
+#: infcmd.c:1334
 msgid "Note:\n"
 msgstr ""
 
-#: infcmd.c:1295
+#: infcmd.c:1335
 #, possible-c-format
-msgid "  Thread %d previously stopped with signal %s, %s.\n"
+msgid "  Thread %s previously stopped with signal %s, %s.\n"
 msgstr ""
 
-#: infcmd.c:1304
+#: infcmd.c:1344
 #, possible-c-format
 msgid ""
-"Continuing thread %d (the current thread) with specified signal will\n"
+"Continuing thread %s (the current thread) with specified signal will\n"
 "still deliver the signals noted above to their respective threads.\n"
 "Continue anyway? "
 msgstr ""
 
-#: infcmd.c:1314
+#: infcmd.c:1354
 msgid "Continuing with no signal.\n"
 msgstr ""
 
-#: infcmd.c:1316
+#: infcmd.c:1356
 #, possible-c-format
 msgid "Continuing with signal %s.\n"
 msgstr ""
 
-#: infcmd.c:1358
+#: infcmd.c:1398
 msgid "Signal handling set to not pass this signal to the program."
 msgstr ""
 
-#: infcmd.c:1418
+#: infcmd.c:1519
 msgid "Execution is not within a known function."
 msgstr ""
 
-#: infcmd.c:1495
+#: infcmd.c:1585
 msgid "a location"
 msgstr ""
 
-#: infcmd.c:1657
+#: infcmd.c:1796
 msgid "finish_command: function has no target type"
 msgstr ""
 
-#: infcmd.c:1829
+#: infcmd.c:1987
 msgid "The \"finish\" command does not take any arguments."
 msgstr ""
 
 #. Finishing from an inline frame is completely different.  We don't
-#. try to show the "return value" - no way to locate it.  So we do
-#. not need a completion.
-#: infcmd.c:1834 infcmd.c:1843
+#. try to show the "return value" - no way to locate it.
+#: infcmd.c:1992 infcmd.c:2006
 msgid "No selected frame."
 msgstr ""
 
-#: infcmd.c:1836
+#: infcmd.c:1994
 msgid "\"finish\" not meaningful in the outermost frame."
 msgstr ""
 
-#: infcmd.c:1864 infcmd.c:1894
+#: infcmd.c:2026 infcmd.c:2051
 msgid "Run till exit from "
 msgstr ""
 
-#: infcmd.c:1886
+#: infcmd.c:2043
 msgid "Run back to call of "
 msgstr ""
 
-#: infcmd.c:1890
+#: infcmd.c:2047
 #, possible-c-format
 msgid ""
 "warning: Function %s does not return normally.\n"
 "Try to finish anyway? "
 msgstr ""
 
-#: infcmd.c:1917
+#: infcmd.c:2081
 msgid "The program being debugged is not being run.\n"
 msgstr ""
 
-#: infcmd.c:1933 infrun.c:7163
+#: infcmd.c:2095
+msgid "Invalid selected thread."
+msgstr ""
+
+#: infcmd.c:2097 thread.c:1141
 msgid "Selected thread is running."
 msgstr ""
 
-#: infcmd.c:1940
+#: infcmd.c:2104
 #, possible-c-format
 msgid "Program stopped at %s.\n"
 msgstr ""
 
-#: infcmd.c:1943
+#: infcmd.c:2107
 msgid "It stopped after being stepped.\n"
 msgstr ""
 
-#: infcmd.c:1952
+#: infcmd.c:2116
 msgid "It stopped at a breakpoint that has since been deleted.\n"
 msgstr ""
 
-#: infcmd.c:1956
+#: infcmd.c:2120
 #, possible-c-format
 msgid "It stopped at breakpoint %d.\n"
 msgstr ""
 
-#: infcmd.c:1962
+#: infcmd.c:2126
 #, possible-c-format
 msgid "It stopped with signal %s, %s.\n"
 msgstr ""
 
-#: infcmd.c:1969
+#: infcmd.c:2133
 msgid "Type \"info stack\" or \"info registers\" for more information.\n"
 msgstr ""
 
-#: infcmd.c:2014
+#: infcmd.c:2178
 msgid "environment variable and value"
 msgstr ""
 
-#: infcmd.c:2038
+#: infcmd.c:2202
 msgid "environment variable to set"
 msgstr ""
 
-#: infcmd.c:2060
+#: infcmd.c:2224
 #, possible-c-format
 msgid "Setting environment variable \"%s\" to null value.\n"
 msgstr ""
 
 #. If there is no argument, delete all environment variables.
 #. Ask for confirmation if reading from the terminal.
-#: infcmd.c:2077
+#: infcmd.c:2241
 msgid "Delete all environment variables? "
 msgstr ""
 
-#: infcmd.c:2255 infcmd.c:2401 infcmd.c:2900
+#: infcmd.c:2415 infcmd.c:2561 infcmd.c:3119
 msgid "The program has no registers now."
 msgstr ""
 
-#: infcmd.c:2279
+#: infcmd.c:2439
 msgid "Missing register name"
 msgstr ""
 
 #. Nothing matched.
-#: infcmd.c:2352
+#: infcmd.c:2512
 #, possible-c-format
 msgid "Invalid register `%.*s'"
 msgstr ""
 
-#: infcmd.c:2417
+#: infcmd.c:2577
 msgid "Kill the program being debugged? "
 msgstr ""
 
-#: infcmd.c:2431
+#: infcmd.c:2591
 #, possible-c-format
 msgid "In %s,\n"
 msgstr ""
 
-#: infcmd.c:2595 target.c:2179
+#: infcmd.c:2810 target.c:2242
 msgid "A program is being debugged already.  Kill it? "
 msgstr ""
 
-#: infcmd.c:2598
+#: infcmd.c:2813
 msgid "Not killed."
 msgstr ""
 
-#: infcmd.c:2613
+#: infcmd.c:2828
 msgid "Cannot attach to this target in non-stop mode"
 msgstr ""
 
-#: infcmd.c:2863
+#: infcmd.c:3082
 msgid "-a is meaningless in all-stop mode."
 msgstr ""
 
-#: infcmd.c:2909
+#: infcmd.c:3128
 msgid "\"unset\" must be followed by the name of an unset subcommand.\n"
 msgstr ""
 
-#: infcmd.c:2926 procfs.c:5110
+#: infcmd.c:3145 procfs.c:5113
 msgid "Not supported on this target."
 msgstr ""
 
-#: infcmd.c:3003
+#: infcmd.c:3222
 msgid "Set terminal for future runs of program being debugged."
 msgstr ""
 
-#: infcmd.c:3004
+#: infcmd.c:3223
 msgid "Show terminal for future runs of program being debugged."
 msgstr ""
 
-#: infcmd.c:3005
-msgid "Usage: set inferior-tty /dev/pts/1"
+#: infcmd.c:3224
+msgid ""
+"Usage: set inferior-tty [TTY]\n"
+"\n"
+"If TTY is omitted, the default behavior of using the same terminal as GDB\n"
+"is restored."
 msgstr ""
 
-#: infcmd.c:3014
+#: infcmd.c:3235
 msgid "Set argument list to give program being debugged when it is started."
 msgstr ""
 
-#: infcmd.c:3015
+#: infcmd.c:3236
 msgid "Show argument list to give program being debugged when it is started."
 msgstr ""
 
-#: infcmd.c:3016
+#: infcmd.c:3237
 msgid ""
 "Follow this command with any number of args, to be passed to the program."
 msgstr ""
 
-#: infcmd.c:3025
+#: infcmd.c:3246
 msgid ""
 "The environment to give the program, or one variable's value.\n"
 "With an argument VAR, prints the value of environment variable VAR to\n"
@@ -14054,17 +14307,17 @@ msgid ""
 "environment to be given to the program."
 msgstr ""
 
-#: infcmd.c:3033
+#: infcmd.c:3254
 msgid "Complement to certain \"set\" commands."
 msgstr ""
 
-#: infcmd.c:3036
+#: infcmd.c:3257
 msgid ""
 "Cancel environment variable VAR for the program.\n"
 "This does not affect the program until the next \"run\" command."
 msgstr ""
 
-#: infcmd.c:3042
+#: infcmd.c:3263
 msgid ""
 "Set environment variable value to give the program.\n"
 "Arguments are VAR VALUE where VAR is variable name and VALUE is value.\n"
@@ -14072,7 +14325,7 @@ msgid ""
 "This does not affect the program until the next \"run\" command."
 msgstr ""
 
-#: infcmd.c:3050
+#: infcmd.c:3271
 msgid ""
 "Add directory DIR(s) to beginning of search path for object files.\n"
 "$cwd in the path means the current working directory.\n"
@@ -14081,7 +14334,7 @@ msgid ""
 "fully linked executable files and separately compiled object files as needed."
 msgstr ""
 
-#: infcmd.c:3059
+#: infcmd.c:3280
 msgid ""
 "Current search path for finding object files.\n"
 "$cwd in the path means the current working directory.\n"
@@ -14090,11 +14343,11 @@ msgid ""
 "fully linked executable files and separately compiled object files as needed."
 msgstr ""
 
-#: infcmd.c:3070
+#: infcmd.c:3291
 msgid "Kill execution of program being debugged."
 msgstr ""
 
-#: infcmd.c:3073
+#: infcmd.c:3294
 msgid ""
 "Attach to a process or file outside of GDB.\n"
 "This command attaches to another target, of the same type as your last\n"
@@ -14109,21 +14362,21 @@ msgid ""
 "to specify the program, and to load its symbol table."
 msgstr ""
 
-#: infcmd.c:3086
+#: infcmd.c:3307
 msgid ""
 "Detach a process or file previously attached.\n"
 "If a process, it is no longer traced, and it continues its execution.  If\n"
 "you were debugging a file, the file is closed and gdb no longer accesses it."
 msgstr ""
 
-#: infcmd.c:3092
+#: infcmd.c:3313
 msgid ""
 "Disconnect from a target.\n"
 "The target will wait for another debugger to connect.  Not available for\n"
 "all targets."
 msgstr ""
 
-#: infcmd.c:3097
+#: infcmd.c:3318
 msgid ""
 "Continue program with the specified signal.\n"
 "Usage: signal SIGNAL\n"
@@ -14138,7 +14391,7 @@ msgid ""
 "the current thread only."
 msgstr ""
 
-#: infcmd.c:3110
+#: infcmd.c:3331
 msgid ""
 "Queue a signal to be delivered to the current thread when it is resumed.\n"
 "Usage: queue-signal SIGNAL\n"
@@ -14153,28 +14406,28 @@ msgid ""
 "the current thread only."
 msgstr ""
 
-#: infcmd.c:3124
+#: infcmd.c:3345
 msgid ""
 "Step one instruction exactly.\n"
 "Usage: stepi [N]\n"
 "Argument N means step N times (or till program stops for another reason)."
 msgstr ""
 
-#: infcmd.c:3131
+#: infcmd.c:3352
 msgid ""
 "Step one instruction, but proceed through subroutine calls.\n"
 "Usage: nexti [N]\n"
 "Argument N means step N times (or till program stops for another reason)."
 msgstr ""
 
-#: infcmd.c:3138
+#: infcmd.c:3359
 msgid ""
 "Execute until selected stack frame returns.\n"
 "Usage: finish\n"
 "Upon return, the value returned is printed and put in the value history."
 msgstr ""
 
-#: infcmd.c:3144
+#: infcmd.c:3365
 msgid ""
 "Step program, proceeding through subroutine calls.\n"
 "Usage: next [N]\n"
@@ -14183,28 +14436,28 @@ msgid ""
 "the call, in effect treating it as a single source line."
 msgstr ""
 
-#: infcmd.c:3152
+#: infcmd.c:3373
 msgid ""
 "Step program until it reaches a different source line.\n"
 "Usage: step [N]\n"
 "Argument N means step N times (or till program stops for another reason)."
 msgstr ""
 
-#: infcmd.c:3159
+#: infcmd.c:3380
 msgid ""
 "Execute until the program reaches a source line greater than the current\n"
 "or a specified location (same args as break command) within the current "
 "frame."
 msgstr ""
 
-#: infcmd.c:3166
+#: infcmd.c:3387
 msgid ""
 "Continue the program up to the given location (same form as args for break "
 "command).\n"
 "Execution will also stop upon exit from the current stack frame."
 msgstr ""
 
-#: infcmd.c:3172
+#: infcmd.c:3393
 msgid ""
 "Continue program being debugged at specified line or address.\n"
 "Usage: jump <location>\n"
@@ -14212,7 +14465,7 @@ msgid ""
 "for an address to start at."
 msgstr ""
 
-#: infcmd.c:3180
+#: infcmd.c:3401
 msgid ""
 "Continue program being debugged, after signal or breakpoint.\n"
 "Usage: continue [N]\n"
@@ -14226,7 +14479,7 @@ msgid ""
 "Specifying -a and an ignore count simultaneously is an error."
 msgstr ""
 
-#: infcmd.c:3194
+#: infcmd.c:3415
 msgid ""
 "Start debugged program.  You may specify arguments to give it.\n"
 "Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n"
@@ -14238,14 +14491,14 @@ msgid ""
 "use \"set args\" without arguments."
 msgstr ""
 
-#: infcmd.c:3206
+#: infcmd.c:3427
 msgid ""
 "Run the debugged program until the beginning of the main procedure.\n"
 "You may specify arguments to give to your program, just as with the\n"
 "\"run\" command."
 msgstr ""
 
-#: infcmd.c:3213
+#: infcmd.c:3434
 msgid ""
 "Interrupt the execution of the debugged program.\n"
 "If non-stop mode is enabled, interrupt only the current thread,\n"
@@ -14253,182 +14506,178 @@ msgid ""
 "interrupt all running threads in non-stop mode, use the -a option."
 msgstr ""
 
-#: infcmd.c:3218
+#: infcmd.c:3439
 msgid ""
 "List of integer registers and their contents, for selected stack frame.\n"
 "Register name as argument means describe only that register."
 msgstr ""
 
-#: infcmd.c:3224
+#: infcmd.c:3445
 msgid ""
 "List of all registers and their contents, for selected stack frame.\n"
 "Register name as argument means describe only that register."
 msgstr ""
 
-#: infcmd.c:3230
+#: infcmd.c:3451
 msgid "Execution status of the program."
 msgstr ""
 
-#: infcmd.c:3233
+#: infcmd.c:3454
 msgid "Print the status of the floating point unit\n"
 msgstr ""
 
-#: infcmd.c:3236
+#: infcmd.c:3457
 msgid "Print the status of the vector unit\n"
 msgstr ""
 
-#: infcmd.c:3239
+#: infcmd.c:3460
 msgid ""
 "Show /proc process information about any running process.\n"
 "Specify any process id, or use the program being debugged by default."
 msgstr ""
 
 #. allow-unknown
-#: infcmd.c:3245
+#: infcmd.c:3466
 msgid "List of mapped memory regions."
 msgstr ""
 
-#: infcmd.c:3249
+#: infcmd.c:3470
 msgid "List process info from /proc/PID/stat."
 msgstr ""
 
-#: infcmd.c:3253
+#: infcmd.c:3474
 msgid "List process info from /proc/PID/status."
 msgstr ""
 
-#: infcmd.c:3257
+#: infcmd.c:3478
 msgid "List current working directory of the process."
 msgstr ""
 
-#: infcmd.c:3261
+#: infcmd.c:3482
 msgid "List command line arguments of the process."
 msgstr ""
 
-#: infcmd.c:3265
+#: infcmd.c:3486
 msgid "List absolute filename for executable of the process."
 msgstr ""
 
-#: infcmd.c:3269
+#: infcmd.c:3490
 msgid "List all available /proc info."
 msgstr ""
 
-#: inferior.c:160
+#: inferior.c:169
 #, possible-c-format
 msgid "[New inferior %d]\n"
 msgstr ""
 
-#: inferior.c:228 inferior.c:289
+#: inferior.c:281
 #, possible-c-format
 msgid "[Inferior %d exited]\n"
 msgstr ""
 
-#: inferior.c:316
+#: inferior.c:308
 #, possible-c-format
 msgid "[Inferior %d detached]\n"
 msgstr ""
 
-#: inferior.c:542
-msgid "<null>"
+#: inferior.c:563
+msgid "<noexec>"
+msgstr ""
+
+#: inferior.c:565
+#, possible-c-format
+msgid "[Switching to inferior %d [%s] (%s)]\n"
 msgstr ""
 
-#: inferior.c:611
+#: inferior.c:634
 msgid ""
 "\n"
 "\tis vfork child of inferior "
 msgstr ""
 
-#: inferior.c:616
+#: inferior.c:639
 msgid ""
 "\n"
 "\tis vfork parent of inferior "
 msgstr ""
 
-#: inferior.c:635
+#: inferior.c:656
 msgid "Requires argument (inferior id(s) to detach)"
 msgstr ""
 
-#: inferior.c:644 inferior.c:680 inferior.c:711 inferior.c:784 inferior.c:940
+#: inferior.c:665 inferior.c:704 inferior.c:740 inferior.c:794 inferior.c:952
 #, possible-c-format
 msgid "Inferior ID %d not known."
 msgstr ""
 
-#: inferior.c:653 inferior.c:689
+#: inferior.c:672 inferior.c:711
 #, possible-c-format
-msgid "Inferior ID %d has no threads."
-msgstr ""
-
-#: inferior.c:671
-msgid "Requires argument (inferior id(s) to kill)"
+msgid "Inferior ID %d is not running."
 msgstr ""
 
-#: inferior.c:713
+#: inferior.c:679 inferior.c:718
 #, possible-c-format
-msgid "[Switching to inferior %d [%s] (%s)]\n"
+msgid "Inferior ID %d has no threads."
 msgstr ""
 
-#: inferior.c:718
-msgid "<noexec>"
+#: inferior.c:695
+msgid "Requires argument (inferior id(s) to kill)"
 msgstr ""
 
-#: inferior.c:728 mi/mi-main.c:427
+#: inferior.c:750 mi/mi-main.c:422
 msgid "Inferior has no threads."
 msgstr ""
 
-#: inferior.c:733
-#, possible-c-format
-msgid "[Switching to thread %d (%s)] "
-msgstr ""
-
-#: inferior.c:774
+#: inferior.c:784
 msgid "Requires an argument (inferior id(s) to remove)"
 msgstr ""
 
-#: inferior.c:790
+#: inferior.c:800
 #, possible-c-format
-msgid "Can not remove current symbol inferior %d."
+msgid "Can not remove current inferior %d."
 msgstr ""
 
-#: inferior.c:796
+#: inferior.c:806
 #, possible-c-format
 msgid "Can not remove active inferior %d."
 msgstr ""
 
-#: inferior.c:857 inferior.c:921
+#: inferior.c:869 inferior.c:933
 msgid "No argument to -copies"
 msgstr ""
 
-#: inferior.c:864
+#: inferior.c:876
 msgid "No argument to -exec"
 msgstr ""
 
-#: inferior.c:870 inferior.c:944 mi/mi-main.c:1800
+#: inferior.c:882 inferior.c:956 mi/mi-main.c:1794
 msgid "Invalid argument"
 msgstr ""
 
-#: inferior.c:880
+#: inferior.c:892
 #, possible-c-format
 msgid "Added inferior %d\n"
 msgstr ""
 
-#: inferior.c:925
+#: inferior.c:937
 msgid "Invalid copies number"
 msgstr ""
 
-#: inferior.c:977
+#: inferior.c:989
 #, possible-c-format
 msgid "Added inferior %d.\n"
 msgstr ""
 
-#: inferior.c:992
+#: inferior.c:1004
 #, possible-c-format
 msgid "Printing of inferior events is %s.\n"
 msgstr ""
 
-#: inferior.c:1015
+#: inferior.c:1047
 msgid "IDs of specified inferiors (all inferiors if no argument)."
 msgstr ""
 
-#: inferior.c:1017
+#: inferior.c:1049
 msgid ""
 "Add a new inferior.\n"
 "Usage: add-inferior [-copies <N>] [-exec <FILENAME>]\n"
@@ -14437,13 +14686,13 @@ msgid ""
 "as main program."
 msgstr ""
 
-#: inferior.c:1025
+#: inferior.c:1057
 msgid ""
 "Remove inferior ID (or list of IDs).\n"
 "Usage: remove-inferiors ID..."
 msgstr ""
 
-#: inferior.c:1029
+#: inferior.c:1061
 msgid ""
 "Clone inferior ID.\n"
 "Usage: clone-inferior [-copies <N>] [ID]\n"
@@ -14453,151 +14702,134 @@ msgid ""
 "that is cloned."
 msgstr ""
 
-#: inferior.c:1037
+#: inferior.c:1069
 msgid "Detach from inferior ID (or list of IDS)."
 msgstr ""
 
-#: inferior.c:1041
+#: inferior.c:1073
 msgid "Kill inferior ID (or list of IDs)."
 msgstr ""
 
-#: inferior.c:1045
+#: inferior.c:1077
 msgid ""
 "Use this command to switch between inferiors.\n"
 "The new inferior ID must be currently known."
 msgstr ""
 
-#: inferior.c:1051
+#: inferior.c:1083
 msgid "Set printing of inferior events (e.g., inferior start and exit)."
 msgstr ""
 
-#: inferior.c:1052
+#: inferior.c:1084
 msgid "Show printing of inferior events (e.g., inferior start and exit)."
 msgstr ""
 
-#: inf-loop.c:144
+#: inf-loop.c:83
 msgid "Event type not recognized.\n"
 msgstr ""
 
-#: inflow.c:591
+#: inflow.c:550
 msgid "This GDB does not control a terminal.\n"
 msgstr ""
 
-#: inflow.c:601
+#: inflow.c:560
 msgid "Inferior's terminal status (currently saved by GDB):\n"
 msgstr ""
 
 #. Mention GDB in warning because it will appear in the inferior's
 #. terminal instead of GDB's.
-#: inflow.c:749
+#: inflow.c:708
 #, possible-c-format
 msgid "GDB: Failed to set controlling terminal: %s"
 msgstr ""
 
-#: inflow.c:838
+#: inflow.c:797
 #, possible-c-format
 msgid "Failed to create new terminal session: setsid: %s"
 msgstr ""
 
-#: inflow.c:900
+#: inflow.c:859
 msgid "Print inferior's saved terminal status."
 msgstr ""
 
-#: inflow.c:903
-msgid "Set whether GDB's standard input is a terminal."
-msgstr ""
-
-#: inflow.c:904
-msgid "Show whether GDB's standard input is a terminal."
-msgstr ""
-
-#: inflow.c:905
-msgid ""
-"If on, GDB assumes that standard input is a terminal.  In practice, it\n"
-"means that GDB should wait for the user to answer queries associated to\n"
-"commands entered at the command prompt.  If off, GDB assumes that standard\n"
-"input is not a terminal, and uses the default answer to all queries.\n"
-"If auto (the default), determine which mode to use based on the standard\n"
-"input settings."
-msgstr ""
-
-#: inf-ptrace.c:202
+#: inf-ptrace.c:203
 msgid "This system does not support attaching to a process"
 msgstr ""
 
-#: inf-ptrace.c:265
+#: inf-ptrace.c:258
 msgid "This system does not support detaching from a process"
 msgstr ""
 
-#: inf-ptrace.c:389 obsd-nat.c:103 rs6000-nat.c:496
+#: inf-ptrace.c:392 obsd-nat.c:103 rs6000-nat.c:495
 #, possible-c-format
 msgid "Child process unexpectedly missing: %s.\n"
 msgstr ""
 
-#: inf-ptrace.c:618
+#: inf-ptrace.c:621
 #, possible-c-format
 msgid "\tUsing the running image of %s %s.\n"
 msgstr ""
 
-#: infrun.c:112
+#: infrun.c:152
 #, possible-c-format
 msgid "Mode of the step operation is %s.\n"
 msgstr ""
 
-#: infrun.c:137
+#: infrun.c:173
 #, possible-c-format
 msgid "Displace stepping debugging is %s.\n"
 msgstr ""
 
-#: infrun.c:145
+#: infrun.c:181
 #, possible-c-format
 msgid "Inferior debugging is %s.\n"
 msgstr ""
 
-#: infrun.c:159
+#: infrun.c:195
 #, possible-c-format
 msgid "Disabling randomization of debuggee's virtual address space is %s.\n"
 msgstr ""
 
-#: infrun.c:163
+#: infrun.c:199
 msgid ""
 "Disabling randomization of debuggee's virtual address space is unsupported "
 "on\n"
 "this platform.\n"
 msgstr ""
 
-#: infrun.c:173
+#: infrun.c:209
 msgid ""
 "Disabling randomization of debuggee's virtual address space is unsupported "
 "on\n"
 "this platform."
 msgstr ""
 
-#: infrun.c:190 infrun.c:219 mi/mi-main.c:121 target.c:3759 target.c:3807
+#: infrun.c:226 infrun.c:255 mi/mi-main.c:113 target.c:4047 target.c:4100
+#: target.c:4156
 msgid "Cannot change this setting while the inferior is running."
 msgstr ""
 
-#: infrun.c:201
+#: infrun.c:237
 #, possible-c-format
 msgid "Controlling the inferior in non-stop mode is %s.\n"
 msgstr ""
 
-#: infrun.c:244 infrun.c:274
+#: infrun.c:280 infrun.c:310
 #, possible-c-format
 msgid "Observer mode is now %s.\n"
 msgstr ""
 
-#: infrun.c:252
+#: infrun.c:288
 #, possible-c-format
 msgid "Observer mode is %s.\n"
 msgstr ""
 
-#: infrun.c:347
+#: infrun.c:383
 #, possible-c-format
 msgid "Stopping for shared library events is %s.\n"
 msgstr ""
 
-#: infrun.c:385
+#: infrun.c:416
 #, possible-c-format
 msgid "Debugger response to a program call of fork or vfork is \"%s\".\n"
 msgstr ""
@@ -14607,24 +14839,24 @@ msgstr ""
 #. the parent stays blocked.  If we're telling the parent to run
 #. in the foreground, the user will not be able to ctrl-c to get
 #. back the terminal, effectively hanging the debug session.
-#: infrun.c:418
+#: infrun.c:449
 msgid ""
 "Can not resume the parent process over vfork in the foreground while\n"
 "holding the child stopped.  Try \"set detach-on-fork\" or \"set schedule-"
 "multiple\".\n"
 msgstr ""
 
-#: infrun.c:453
+#: infrun.c:482
 #, possible-c-format
 msgid "Detaching after %s from child %s.\n"
 msgstr ""
 
-#: infrun.c:541
+#: infrun.c:570
 #, possible-c-format
 msgid "Attaching after %s %s to child %s.\n"
 msgstr ""
 
-#: infrun.c:589
+#: infrun.c:618
 #, possible-c-format
 msgid "Detaching after fork from child %s.\n"
 msgstr ""
@@ -14635,183 +14867,195 @@ msgstr ""
 #. forked.  In that case, the resume command
 #. issued is most likely not applicable to the
 #. child, so just warn, and refuse to resume.
-#: infrun.c:775
-msgid "Not resuming: switched threads before following fork child.\n"
+#: infrun.c:804
+msgid "Not resuming: switched threads before following fork child."
 msgstr ""
 
-#: infrun.c:934
+#: infrun.c:963
 #, possible-c-format
 msgid "Detaching vfork parent process %d after child exec.\n"
 msgstr ""
 
-#: infrun.c:941
+#: infrun.c:970
 #, possible-c-format
 msgid "Detaching vfork parent process %d after child exit.\n"
 msgstr ""
 
-#: infrun.c:1048
+#: infrun.c:1077
 #, possible-c-format
 msgid "Follow exec mode is \"%s\".\n"
 msgstr ""
 
-#. What is this a.out's name?
-#: infrun.c:1125
+#: infrun.c:1158
 #, possible-c-format
 msgid "%s is executing new program: %s\n"
 msgstr ""
 
-#: infrun.c:1569
+#: infrun.c:1177
+#, possible-c-format
+msgid ""
+"Could not load symbols for executable %s.\n"
+"Do you need \"set sysroot\"?"
+msgstr ""
+
+#: infrun.c:1668
 #, possible-c-format
 msgid ""
 "Debugger's willingness to use displaced stepping to step over breakpoints is "
 "%s (currently %s).\n"
 msgstr ""
 
-#: infrun.c:1574
+#: infrun.c:1673
 #, possible-c-format
 msgid ""
 "Debugger's willingness to use displaced stepping to step over breakpoints is "
 "%s.\n"
 msgstr ""
 
-#: infrun.c:1721
+#: infrun.c:1843
 #, possible-c-format
 msgid ""
 "Error accessing memory address %s (%s) for displaced-stepping scratch space."
 msgstr ""
 
-#: infrun.c:1978
+#: infrun.c:1921
+#, possible-c-format
+msgid "disabling displaced stepping: %s"
+msgstr ""
+
+#: infrun.c:2145 infrun.c:3182 infrun.c:3192 utils.c:703
+msgid "Command aborted."
+msgstr ""
+
+#: infrun.c:2227
 #, possible-c-format
 msgid "Mode for locking scheduler during execution is \"%s\".\n"
 msgstr ""
 
-#: infrun.c:1989
+#: infrun.c:2238
 #, possible-c-format
 msgid "Target '%s' cannot support this command."
 msgstr ""
 
-#: infrun.c:3150
+#: infrun.c:2424
+#, possible-c-format
+msgid "Couldn't deliver signal %s to %s."
+msgstr ""
+
+#: infrun.c:3708
 msgid "Program exited while detaching"
 msgstr ""
 
-#: infrun.c:3366
+#: infrun.c:4016
 msgid "completed.\n"
 msgstr ""
 
-#: infrun.c:3874
+#: infrun.c:5026
 #, possible-c-format
 msgid "unhandled stop_soon: %d"
 msgstr ""
 
-#: infrun.c:3945
+#: infrun.c:5106
 msgid "Cannot fill $_exitsignal with the correct signal number.\n"
 msgstr ""
 
-#: infrun.c:6527
+#: infrun.c:8063
 msgid "Unknown value."
 msgstr ""
 
-#: infrun.c:6607 linux-fork.c:376 linux-fork.c:408
+#: infrun.c:8117
+msgid ""
+"Cannot remove breakpoints because program is no longer writable.\n"
+"Further execution is probably impossible.\n"
+msgstr ""
+
+#: infrun.c:8274 linux-fork.c:400 linux-fork.c:432
 #, possible-c-format
 msgid "[Switching to %s]\n"
 msgstr ""
 
-#: infrun.c:6618
+#: infrun.c:8287
 msgid "No unwaited-for children left.\n"
 msgstr ""
 
-#: infrun.c:6627
-msgid ""
-"Cannot remove breakpoints because program is no longer writable.\n"
-"Further execution is probably impossible.\n"
+#: infrun.c:8476
+msgid "Signal        Stop\tPrint\tPass to program\tDescription\n"
 msgstr ""
 
-#: infrun.c:6861
-msgid "Signal        Stop\tPrint\tPass to program\tDescription\n"
-msgstr ""
-
-#: infrun.c:6898
+#: infrun.c:8513
 msgid "signal to handle"
 msgstr ""
 
 #. Not a number and not a recognized flag word => complain.
-#: infrun.c:7001
+#: infrun.c:8616
 #, possible-c-format
 msgid "Unrecognized or ambiguous flag word: \"%s\"."
 msgstr ""
 
-#: infrun.c:7016
+#: infrun.c:8631
 #, possible-c-format
 msgid ""
 "%s is used by the debugger.\n"
 "Are you sure you want to change it? "
 msgstr ""
 
-#: infrun.c:7024
+#: infrun.c:8639
 msgid "Not confirmed, unchanged.\n"
 msgstr ""
 
-#: infrun.c:7100
+#: infrun.c:8715
 msgid ""
 "Only signals 1-15 are valid as numeric signals.\n"
 "Use \"info signals\" for a list of symbolic signals."
 msgstr ""
 
-#: infrun.c:7143
+#: infrun.c:8758
 msgid ""
 "\n"
 "Use the \"handle\" command to change these tables.\n"
 msgstr ""
 
-#: infrun.c:7155
-msgid "No thread selected."
-msgstr ""
-
-#: infrun.c:7159
-msgid "The current thread has terminated"
-msgstr ""
-
-#: infrun.c:7194
+#: infrun.c:8792
 msgid "Unable to read siginfo"
 msgstr ""
 
-#: infrun.c:7215
+#: infrun.c:8815
 msgid "Unable to write siginfo"
 msgstr ""
 
-#: infrun.c:7438 stack.c:1850 stack.c:2068
+#: infrun.c:9037 stack.c:1851 stack.c:2070
 msgid "Unable to restore previously selected frame."
 msgstr ""
 
-#: infrun.c:7585
+#: infrun.c:9182
 msgid "Target does not support this operation."
 msgstr ""
 
-#: infrun.c:7595
+#: infrun.c:9192
 msgid "Forward.\n"
 msgstr ""
 
-#: infrun.c:7598
+#: infrun.c:9195
 msgid "Reverse.\n"
 msgstr ""
 
-#: infrun.c:7602
+#: infrun.c:9199
 #, possible-c-format
 msgid "bogus execution_direction value: %d"
 msgstr ""
 
-#: infrun.c:7611
+#: infrun.c:9208
 #, possible-c-format
 msgid "Resuming the execution of threads of all processes is %s.\n"
 msgstr ""
 
-#: infrun.c:7631
+#: infrun.c:9241
 msgid ""
 "What debugger does when program gets various signals.\n"
 "Specify a signal as argument to print info on that signal only."
 msgstr ""
 
-#: infrun.c:7636
+#: infrun.c:9246
 msgid ""
 "Specify how to handle signals.\n"
 "Usage: handle SIGNAL [ACTIONS]\n"
@@ -14838,46 +15082,46 @@ msgid ""
 "all signals cumulatively specified."
 msgstr ""
 
-#: infrun.c:7664
+#: infrun.c:9274
 msgid ""
 "There is no `stop' command, but you can set a hook on `stop'.\n"
 "This allows you to set a list of commands to be run each time execution\n"
 "of the program stops."
 msgstr ""
 
-#: infrun.c:7669
+#: infrun.c:9279
 msgid "Set inferior debugging."
 msgstr ""
 
-#: infrun.c:7670
+#: infrun.c:9280
 msgid "Show inferior debugging."
 msgstr ""
 
-#: infrun.c:7671
+#: infrun.c:9281
 msgid "When non-zero, inferior specific debugging is enabled."
 msgstr ""
 
-#: infrun.c:7678
+#: infrun.c:9288
 msgid "Set displaced stepping debugging."
 msgstr ""
 
-#: infrun.c:7679
+#: infrun.c:9289
 msgid "Show displaced stepping debugging."
 msgstr ""
 
-#: infrun.c:7680
+#: infrun.c:9290
 msgid "When non-zero, displaced stepping specific debugging is enabled."
 msgstr ""
 
-#: infrun.c:7687
+#: infrun.c:9297
 msgid "Set whether gdb controls the inferior in non-stop mode."
 msgstr ""
 
-#: infrun.c:7688
+#: infrun.c:9298
 msgid "Show whether gdb controls the inferior in non-stop mode."
 msgstr ""
 
-#: infrun.c:7689
+#: infrun.c:9299
 msgid ""
 "When debugging a multi-threaded program and this setting is\n"
 "off (the default, also called all-stop mode), when one thread stops\n"
@@ -14892,30 +15136,30 @@ msgid ""
 "leave it stopped or free to run as needed."
 msgstr ""
 
-#: infrun.c:7764
+#: infrun.c:9383
 msgid "Set stopping for shared library events."
 msgstr ""
 
-#: infrun.c:7765
+#: infrun.c:9384
 msgid "Show stopping for shared library events."
 msgstr ""
 
-#: infrun.c:7766
+#: infrun.c:9385
 msgid ""
 "If nonzero, gdb will give control to the user when the dynamic linker\n"
 "notifies gdb of shared library events.  The most common event of interest\n"
 "to the user would be loading/unloading of a new library."
 msgstr ""
 
-#: infrun.c:7776
+#: infrun.c:9395
 msgid "Set debugger response to a program call of fork or vfork."
 msgstr ""
 
-#: infrun.c:7777
+#: infrun.c:9396
 msgid "Show debugger response to a program call of fork or vfork."
 msgstr ""
 
-#: infrun.c:7778
+#: infrun.c:9397
 msgid ""
 "A fork or vfork creates a new process.  follow-fork-mode can be:\n"
 "  parent  - the original process is debugged after a fork\n"
@@ -14924,15 +15168,15 @@ msgid ""
 "By default, the debugger will follow the parent process."
 msgstr ""
 
-#: infrun.c:7790
+#: infrun.c:9409
 msgid "Set debugger response to a program call of exec."
 msgstr ""
 
-#: infrun.c:7791
+#: infrun.c:9410
 msgid "Show debugger response to a program call of exec."
 msgstr ""
 
-#: infrun.c:7792
+#: infrun.c:9411
 msgid ""
 "An exec call replaces the program image of a process.\n"
 "\n"
@@ -14951,32 +15195,36 @@ msgid ""
 "By default, the debugger will use the same inferior."
 msgstr ""
 
-#: infrun.c:7813
+#: infrun.c:9432
 msgid "Set mode for locking scheduler during execution."
 msgstr ""
 
-#: infrun.c:7814
+#: infrun.c:9433
 msgid "Show mode for locking scheduler during execution."
 msgstr ""
 
-#: infrun.c:7815
+#: infrun.c:9434
 msgid ""
-"off  == no locking (threads may preempt at any time)\n"
-"on   == full locking (no thread except the current thread may run)\n"
-"step == scheduler locked during stepping commands (step, next, stepi, "
+"off    == no locking (threads may preempt at any time)\n"
+"on     == full locking (no thread except the current thread may run)\n"
+"          This applies to both normal execution and replay mode.\n"
+"step   == scheduler locked during stepping commands (step, next, stepi, "
 "nexti).\n"
-"\tIn this mode, other threads may run during other commands."
+"          In this mode, other threads may run during other commands.\n"
+"          This applies to both normal execution and replay mode.\n"
+"replay == scheduler locked in replay mode and unlocked during normal "
+"execution."
 msgstr ""
 
-#: infrun.c:7824
+#: infrun.c:9446
 msgid "Set mode for resuming threads of all processes."
 msgstr ""
 
-#: infrun.c:7825
+#: infrun.c:9447
 msgid "Show mode for resuming threads of all processes."
 msgstr ""
 
-#: infrun.c:7826
+#: infrun.c:9448
 msgid ""
 "When on, execution commands (such as 'continue' or 'next') resume all\n"
 "threads of all processes.  When off (which is the default), execution\n"
@@ -14985,30 +15233,30 @@ msgid ""
 "mode (see help set scheduler-locking)."
 msgstr ""
 
-#: infrun.c:7836
+#: infrun.c:9458
 msgid "Set mode of the step operation."
 msgstr ""
 
-#: infrun.c:7837
+#: infrun.c:9459
 msgid "Show mode of the step operation."
 msgstr ""
 
-#: infrun.c:7838
+#: infrun.c:9460
 msgid ""
 "When set, doing a step over a function without debug line information\n"
 "will stop at the first instruction of that function. Otherwise, the\n"
 "function is skipped and the step command stops at a different source line."
 msgstr ""
 
-#: infrun.c:7847
+#: infrun.c:9469
 msgid "Set debugger's willingness to use displaced stepping."
 msgstr ""
 
-#: infrun.c:7848
+#: infrun.c:9470
 msgid "Show debugger's willingness to use displaced stepping."
 msgstr ""
 
-#: infrun.c:7849
+#: infrun.c:9471
 msgid ""
 "If on, gdb will use displaced stepping to step over breakpoints if it is\n"
 "supported by the target architecture.  If off, gdb will not use displaced\n"
@@ -15020,57 +15268,57 @@ msgid ""
 "use it in all-stop mode (see help set non-stop)."
 msgstr ""
 
-#: infrun.c:7861
+#: infrun.c:9483
 msgid ""
 "Set direction of execution.\n"
 "Options are 'forward' or 'reverse'."
 msgstr ""
 
-#: infrun.c:7863
+#: infrun.c:9485
 msgid "Show direction of execution (forward/reverse)."
 msgstr ""
 
-#: infrun.c:7864
+#: infrun.c:9486
 msgid "Tells gdb whether to execute forward or backward."
 msgstr ""
 
 #. Set/show detach-on-fork: user-settable mode.
-#: infrun.c:7870
+#: infrun.c:9492
 msgid "Set whether gdb will detach the child of a fork."
 msgstr ""
 
-#: infrun.c:7871
+#: infrun.c:9493
 msgid "Show whether gdb will detach the child of a fork."
 msgstr ""
 
-#: infrun.c:7872
+#: infrun.c:9494
 msgid "Tells gdb whether to detach the child of a fork."
 msgstr ""
 
-#: infrun.c:7879
+#: infrun.c:9501
 msgid "Set disabling of debuggee's virtual address space randomization."
 msgstr ""
 
-#: infrun.c:7880
+#: infrun.c:9502
 msgid "Show disabling of debuggee's virtual address space randomization."
 msgstr ""
 
-#: infrun.c:7881
+#: infrun.c:9503
 msgid ""
 "When this mode is on (which is the default), randomization of the virtual\n"
 "address space is disabled.  Standalone programs run with the randomization\n"
 "enabled by default on some platforms."
 msgstr ""
 
-#: infrun.c:7905
+#: infrun.c:9527
 msgid "Set whether gdb controls the inferior in observer mode."
 msgstr ""
 
-#: infrun.c:7906
+#: infrun.c:9528
 msgid "Show whether gdb controls the inferior in observer mode."
 msgstr ""
 
-#: infrun.c:7907
+#: infrun.c:9529
 msgid ""
 "In observer mode, GDB can get data from the inferior, but not\n"
 "affect its execution.  Registers and memory may not be changed,\n"
@@ -15078,149 +15326,144 @@ msgid ""
 "or signalled."
 msgstr ""
 
-#: interps.c:146
+#: interps.c:124
 #, possible-c-format
-msgid "Could not suspend interpreter \"%s\"."
+msgid "interpreter factory already registered: \"%s\"\n"
 msgstr ""
 
-#: interps.c:191
+#: interps.c:264
 #, possible-c-format
-msgid "Failed to initialize new interp \"%s\" %s"
+msgid "Interpreter `%s' unrecognized"
 msgstr ""
 
-#: interps.c:392
+#: interps.c:417
 msgid "interpreter-exec command"
 msgstr ""
 
-#: interps.c:402
+#: interps.c:427
 msgid "usage: interpreter-exec <interpreter> [ <command> ... ]"
 msgstr ""
 
-#: interps.c:408
+#: interps.c:433
 #, possible-c-format
 msgid "Could not find interpreter \"%s\"."
 msgstr ""
 
-#: interps.c:415
-#, possible-c-format
-msgid "Could not switch to interpreter \"%s\"."
-msgstr ""
-
-#: interps.c:426
+#: interps.c:444
 #, possible-c-format
 msgid "error in command: \"%s\"."
 msgstr ""
 
-#: interps.c:495
+#: interps.c:520
 msgid ""
 "Execute a command in an interpreter.  It takes two arguments:\n"
 "The first argument is the name of the interpreter to use.\n"
 "The second argument is the command to execute.\n"
 msgstr ""
 
-#: iq2000-tdep.c:485
+#: iq2000-tdep.c:476
 #, possible-c-format
 msgid "breakpoint_from_pc: invalid breakpoint address 0x%lx"
 msgstr ""
 
-#: jit.c:69
+#: jit.c:72
 #, possible-c-format
 msgid "JIT debugging is %s.\n"
 msgstr ""
 
-#: jit.c:175
+#: jit.c:178
 #, possible-c-format
 msgid "Opening shared object %s.\n"
 msgstr ""
 
-#: jit.c:182
+#: jit.c:185
 #, possible-c-format
 msgid "Could not locate initialization function: %s."
 msgstr ""
 
-#: jit.c:186
+#: jit.c:189
 msgid "Reader not GPL compatible."
 msgstr ""
 
-#: jit.c:190
+#: jit.c:193
 msgid "Reader version does not match GDB version."
 msgstr ""
 
-#: jit.c:209
+#: jit.c:212
 msgid "No reader name provided."
 msgstr ""
 
-#: jit.c:212
+#: jit.c:217
 msgid "JIT reader already loaded.  Run jit-reader-unload first."
 msgstr ""
 
-#: jit.c:230
+#: jit.c:239
 msgid "No JIT reader loaded."
 msgstr ""
 
-#: jit.c:375
+#: jit.c:388
 msgid "Unable to read JIT descriptor from remote memory\n"
 msgstr ""
 
-#: jit.c:420
+#: jit.c:433
 msgid "Unable to read JIT code entry from remote memory!"
 msgstr ""
 
-#: jit.c:896
+#: jit.c:914
 msgid "Error opening JITed symbol file, ignoring it.\n"
 msgstr ""
 
-#: jit.c:904
+#: jit.c:922
 msgid "JITed symbol file is not an object file, ignoring it.\n"
 msgstr ""
 
-#: jit.c:913
+#: jit.c:930
 #, possible-c-format
 msgid ""
 "JITed object file architecture %s is not compatible with target architecture "
 "%s."
 msgstr ""
 
-#: jit.c:1107
+#: jit.c:1127
 #, possible-c-format
 msgid "Could not recognize DWARF regnum %d"
 msgstr ""
 
-#: jit.c:1206
+#: jit.c:1223
 msgid "Successfully unwound frame using JIT reader.\n"
 msgstr ""
 
-#: jit.c:1211
+#: jit.c:1228
 msgid "Could not unwind frame using JIT reader.\n"
 msgstr ""
 
-#: jit.c:1336
+#: jit.c:1362
 #, possible-c-format
 msgid "Unsupported JIT protocol version %ld in descriptor (expected 1)\n"
 msgstr ""
 
-#: jit.c:1423
+#: jit.c:1457
 #, possible-c-format
 msgid "Unable to find JITed code entry at address: %s\n"
 msgstr ""
 
-#: jit.c:1431
+#: jit.c:1465
 msgid "Unknown action_flag value in JIT descriptor!"
 msgstr ""
 
-#: jit.c:1478
+#: jit.c:1519
 msgid "Set JIT debugging."
 msgstr ""
 
-#: jit.c:1479
+#: jit.c:1520
 msgid "Show JIT debugging."
 msgstr ""
 
-#: jit.c:1480
+#: jit.c:1521
 msgid "When non-zero, JIT debugging is enabled."
 msgstr ""
 
-#: jit.c:1496
+#: jit.c:1540
 msgid ""
 "Load FILE as debug info reader and unwinder for JIT compiled code.\n"
 "Usage: jit-reader-load FILE\n"
@@ -15228,93 +15471,14 @@ msgid ""
 "JIT compiled code.  The file is loaded from "
 msgstr ""
 
-#: jit.c:1502
+#: jit.c:1549
 msgid ""
 "Unload the currently loaded JIT debug info reader.\n"
-"Usage: jit-reader-unload FILE\n"
+"Usage: jit-reader-unload\n"
 "\n"
 "Do \"help jit-reader-load\" for info on loading debug info readers."
 msgstr ""
 
-#: jv-exp.y:412
-msgid "FIXME - ClassInstanceCreationExpression"
-msgstr ""
-
-#: jv-exp.y:431 jv-exp.y:434
-msgid "FIXME - ArrayCreationExpression"
-msgstr ""
-
-#: jv-exp.y:480 jv-exp.y:482
-msgid "Form of method invocation not implemented"
-msgstr ""
-
-#: jv-exp.y:578
-msgid "Invalid cast expression"
-msgstr ""
-
-#: jv-exp.y:823
-msgid "Numeric constant too large"
-msgstr ""
-
-#: jv-exp.y:935
-msgid "Empty character constant"
-msgstr ""
-
-#: jv-exp.y:948
-msgid "Unmatched single quote"
-msgstr ""
-
-#: jv-exp.y:953
-msgid "Invalid character constant"
-msgstr ""
-
-#: jv-exp.y:1039
-#, possible-c-format
-msgid "Invalid number \"%s\""
-msgstr ""
-
-#: jv-exp.y:1111
-msgid "Unterminated string in expression"
-msgstr ""
-
-#: jv-exp.y:1250
-#, possible-c-format
-msgid "%s: near `%s'"
-msgstr ""
-
-#: jv-exp.y:1252
-#, possible-c-format
-msgid "error in expression, near `%s'"
-msgstr ""
-
-#: jv-exp.y:1261
-#, possible-c-format
-msgid "No class named `%s'"
-msgstr ""
-
-#: jv-exp.y:1401
-#, possible-c-format
-msgid "unknown type `%.*s'"
-msgstr ""
-
-#: jv-lang.c:595
-msgid "cannot find java.lang.Object"
-msgstr ""
-
-#: jv-lang.c:659 jv-lang.c:735
-#, possible-c-format
-msgid "unknown signature '%c' for primitive type"
-msgstr ""
-
-#: jv-lang.c:835
-msgid "not implemented - java_value_string"
-msgstr ""
-
-#: jv-lang.c:972
-#, possible-c-format
-msgid "array index (%ld) out of bounds (length: %ld)"
-msgstr ""
-
 #: language.c:125
 #, possible-c-format
 msgid "The current source language is \"auto; currently %s\".\n"
@@ -15325,55 +15489,56 @@ msgstr ""
 msgid "The current source language is \"%s\".\n"
 msgstr ""
 
-#: language.c:210
+#: language.c:228
 #, possible-c-format
 msgid "Range checking is \"auto; currently %s\".\n"
 msgstr ""
 
-#: language.c:214
+#: language.c:232
 #, possible-c-format
 msgid "Range checking is \"%s\".\n"
 msgstr ""
 
-#: language.c:218 language.c:253
+#: language.c:236 language.c:271
 msgid "the current range check setting does not match the language.\n"
 msgstr ""
 
-#: language.c:250
+#: language.c:268
 #, possible-c-format
 msgid "Unrecognized range check setting: \"%s\""
 msgstr ""
 
-#: language.c:281
+#: language.c:299
 #, possible-c-format
 msgid "Case sensitivity in name search is \"auto; currently %s\".\n"
 msgstr ""
 
-#: language.c:287
+#: language.c:305
 #, possible-c-format
 msgid "Case sensitivity in name search is \"%s\".\n"
 msgstr ""
 
-#: language.c:291 language.c:324
+#: language.c:309 language.c:342
 msgid "the current case sensitivity setting does not match the language.\n"
 msgstr ""
 
-#: language.c:377
+#: language.c:395
 #, possible-c-format
 msgid "Current language:  %s\n"
 msgstr ""
 
-#: language.c:382
+#: language.c:400
 #, possible-c-format
 msgid "Range checking:    %s\n"
 msgstr ""
 
-#: language.c:384
+#: language.c:402
 #, possible-c-format
 msgid "Case sensitivity:  %s\n"
 msgstr ""
 
-#: language.c:563
+#: language.c:586
+#, c-format
 msgid ""
 "Set the current source language.\n"
 "The currently understood settings are:\n"
@@ -15381,292 +15546,302 @@ msgid ""
 "local or auto    Automatic setting based on source file\n"
 msgstr ""
 
-#: language.c:591
+#: language.c:610
 msgid "Show the current source language."
 msgstr ""
 
-#: language.c:689
+#: language.c:723
 msgid "Getting a string is unsupported in this language."
 msgstr ""
 
-#: language.c:703
+#: language.c:737
 msgid "Attempted to parse an expression with unknown language"
 msgstr ""
 
-#: language.c:710
+#: language.c:744
 msgid "internal error - unimplemented function unk_lang_emit_char called."
 msgstr ""
 
-#: language.c:717
+#: language.c:751
 msgid "internal error - unimplemented function unk_lang_printchar called."
 msgstr ""
 
-#: language.c:727
+#: language.c:761
 msgid "internal error - unimplemented function unk_lang_printstr called."
 msgstr ""
 
-#: language.c:736
+#: language.c:770
 msgid "internal error - unimplemented function unk_lang_print_type called."
 msgstr ""
 
-#: language.c:747
+#: language.c:781
 msgid "internal error - unimplemented function unk_lang_val_print called."
 msgstr ""
 
-#: language.c:755
+#: language.c:789
 msgid "internal error - unimplemented function unk_lang_value_print called."
 msgstr ""
 
-#: language.c:1141
+#: language.c:1177
 msgid "Set the status of the type/range checker."
 msgstr ""
 
-#: language.c:1147
+#: language.c:1183
 msgid "Show the status of the type/range checker."
 msgstr ""
 
-#: language.c:1154
+#: language.c:1190
 msgid "Set range checking.  (on/warn/off/auto)"
 msgstr ""
 
-#: language.c:1155
+#: language.c:1191
 msgid "Show range checking.  (on/warn/off/auto)"
 msgstr ""
 
-#: language.c:1161
+#: language.c:1197
 msgid "Set case sensitivity in name search.  (on/off/auto)"
 msgstr ""
 
-#: language.c:1162
+#: language.c:1198
 msgid "Show case sensitivity in name search.  (on/off/auto)"
 msgstr ""
 
-#: language.c:1163
+#: language.c:1199
 msgid "For Fortran the default is off; for other languages the default is on."
 msgstr ""
 
-#: linespec.c:618
+#: linespec.c:594
 msgid "unmatched quote"
 msgstr ""
 
-#: linespec.c:1436
+#: linespec.c:1366
 msgid ""
 "[0] cancel\n"
 "[1] all\n"
 msgstr ""
 
-#: linespec.c:1458
+#: linespec.c:1386
 msgid "canceled"
 msgstr ""
 
-#: linespec.c:1474
+#: linespec.c:1402
 #, possible-c-format
 msgid "No choice number %d.\n"
 msgstr ""
 
-#: linespec.c:1486
+#: linespec.c:1414
 #, possible-c-format
 msgid "duplicate request for %d ignored.\n"
 msgstr ""
 
-#: linespec.c:1523
+#: linespec.c:1451
 #, possible-c-format
 msgid ""
 "Undefined convenience variable or function \"%s\" not defined in \"%s\"."
 msgstr ""
 
-#: linespec.c:1527
+#: linespec.c:1455
 #, possible-c-format
 msgid "Undefined convenience variable or function \"%s\" not defined."
 msgstr ""
 
-#: linespec.c:1534
+#: linespec.c:1462
 #, possible-c-format
 msgid "Function \"%s\" not defined in \"%s\"."
 msgstr ""
 
-#: linespec.c:1538
+#: linespec.c:1466
 #, possible-c-format
 msgid "Function \"%s\" not defined."
 msgstr ""
 
-#: linespec.c:1565
+#: linespec.c:1492
 #, possible-c-format
 msgid "malformed linespec error: unexpected %s, \"%s\""
 msgstr ""
 
-#: linespec.c:1570
+#: linespec.c:1497
 #, possible-c-format
 msgid "malformed linespec error: unexpected %s"
 msgstr ""
 
-#: linespec.c:1749
+#: linespec.c:1508
 #, possible-c-format
 msgid "No label \"%s\" defined in function \"%s\"."
 msgstr ""
 
-#: linespec.c:2000
+#: linespec.c:1512
+#, possible-c-format
+msgid "No label \"%s\" defined in current function."
+msgstr ""
+
+#: linespec.c:1521
+#, possible-c-format
+msgid "No source file named %s."
+msgstr ""
+
+#: linespec.c:1544
+#, possible-c-format
+msgid "malformed line offset: \"%s\""
+msgstr ""
+
+#: linespec.c:1929
 #, possible-c-format
 msgid "No line %d in the current file."
 msgstr ""
 
-#: linespec.c:2549 linespec.c:2571
+#: linespec.c:2636 linespec.c:2664
 msgid "Empty line specification."
 msgstr ""
 
-#: linespec.c:2559 linespec.c:2581
+#: linespec.c:2648 linespec.c:2676
 #, possible-c-format
 msgid "Junk at end of line specification: %s"
 msgstr ""
 
 #. The error message doesn't really matter, because this case
 #. should only hit during breakpoint reset.
-#: linespec.c:2617
+#: linespec.c:2714
 msgid "cannot evaluate expressions while program space is in startup"
 msgstr ""
 
 #. Throw an NOT_FOUND_ERROR.  This will be caught by the caller
 #. and other attempts to locate the symbol will be made.
-#: linespec.c:2981
+#: linespec.c:3093
 msgid "see caller, this text doesn't matter"
 msgstr ""
 
-#: linespec.c:3058
-#, possible-c-format
-msgid "No source file named %s."
-msgstr ""
-
-#: linespec.c:3386
+#: linespec.c:3519
 msgid "History values used in line specs must have integer values."
 msgstr ""
 
-#: linespec.c:3409
+#: linespec.c:3542
 msgid "Convenience variables used in line specs must have integer values."
 msgstr ""
 
-#: linux-fork.c:396 linux-fork.c:542
+#: linux-fork.c:420 linux-fork.c:566
 #, possible-c-format
 msgid "Unable to detach %s"
 msgstr ""
 
-#: linux-fork.c:491
+#: linux-fork.c:515
 msgid "Requires argument (checkpoint id to delete)"
 msgstr ""
 
-#: linux-fork.c:495 linux-fork.c:535
+#: linux-fork.c:519 linux-fork.c:559
 #, possible-c-format
 msgid "No such checkpoint id, %s"
 msgstr ""
 
-#: linux-fork.c:498
+#: linux-fork.c:522
 msgid "Please switch to another checkpoint before deleting the current one"
 msgstr ""
 
-#: linux-fork.c:502
+#: linux-fork.c:526
 #, possible-c-format
 msgid "Unable to kill pid %s"
 msgstr ""
 
-#: linux-fork.c:509
+#: linux-fork.c:533
 #, possible-c-format
 msgid "Killed %s\n"
 msgstr ""
 
-#: linux-fork.c:521
+#: linux-fork.c:545
 #, possible-c-format
 msgid "Unable to wait pid %s"
 msgstr ""
 
-#: linux-fork.c:531
+#: linux-fork.c:555
 msgid "Requires argument (checkpoint id to detach)"
 msgstr ""
 
-#: linux-fork.c:538
+#: linux-fork.c:562
 msgid "Please switch to another checkpoint before detaching the current one"
 msgstr ""
 
-#: linux-fork.c:545
+#: linux-fork.c:569
 #, possible-c-format
 msgid "Detached %s\n"
 msgstr ""
 
-#: linux-fork.c:583
+#: linux-fork.c:607
 msgid " (main process)"
 msgstr ""
 
-#: linux-fork.c:584
+#: linux-fork.c:608
 msgid " at "
 msgstr ""
 
-#: linux-fork.c:589
+#: linux-fork.c:613
 #, possible-c-format
 msgid ", file %s"
 msgstr ""
 
-#: linux-fork.c:592
+#: linux-fork.c:616
 #, possible-c-format
 msgid ", line %d"
 msgstr ""
 
-#: linux-fork.c:607
+#: linux-fork.c:631
 #, possible-c-format
 msgid "No checkpoint number %d.\n"
 msgstr ""
 
-#: linux-fork.c:609
+#: linux-fork.c:633
 msgid "No checkpoints.\n"
 msgstr ""
 
-#: linux-fork.c:667
+#: linux-fork.c:690
 msgid "checkpoint: can't checkpoint multiple threads."
 msgstr ""
 
-#: linux-fork.c:677
+#: linux-fork.c:700
 msgid "checkpoint: can't find fork function in inferior."
 msgstr ""
 
 #. Probably can't happen.
-#: linux-fork.c:689
+#: linux-fork.c:714
 msgid "checkpoint: call_function_by_hand returned null."
 msgstr ""
 
-#: linux-fork.c:700
+#: linux-fork.c:725
 #, possible-c-format
 msgid "checkpoint %d: fork returned pid %ld.\n"
 msgstr ""
 
-#: linux-fork.c:707
+#: linux-fork.c:732
 #, possible-c-format
 msgid "   gdb says parent = %ld.\n"
 msgstr ""
 
-#: linux-fork.c:713
+#: linux-fork.c:738
 msgid "Failed to find new fork"
 msgstr ""
 
-#: linux-fork.c:734
+#: linux-fork.c:759
 #, possible-c-format
 msgid "Switching to %s\n"
 msgstr ""
 
-#: linux-fork.c:747
+#: linux-fork.c:772
 msgid "Requires argument (checkpoint id to restart)"
 msgstr ""
 
-#: linux-fork.c:750
+#: linux-fork.c:775
 #, possible-c-format
 msgid "Not found: checkpoint id %s"
 msgstr ""
 
 #. Checkpoint command: create a fork of the inferior process
 #. and set it aside for later debugging.
-#: linux-fork.c:763
+#: linux-fork.c:788
 msgid "Fork a duplicate process (experimental)."
 msgstr ""
 
 #. Restart command: restore the context of a specified checkpoint
 #. process.
-#: linux-fork.c:769
+#: linux-fork.c:794
 msgid ""
 "restart <n>: restore program context from a checkpoint.\n"
 "Argument 'n' is checkpoint ID, as displayed by 'info checkpoints'."
@@ -15674,140 +15849,116 @@ msgstr ""
 
 #. Delete checkpoint command: kill the process and remove it from
 #. the fork list.
-#: linux-fork.c:776
+#: linux-fork.c:801
 msgid "Delete a checkpoint (experimental)."
 msgstr ""
 
 #. Detach checkpoint command: release the process to run independently,
 #. and remove it from the fork list.
-#: linux-fork.c:783
+#: linux-fork.c:808
 msgid "Detach from a checkpoint (experimental)."
 msgstr ""
 
-#: linux-fork.c:791
+#: linux-fork.c:816
 msgid "IDs of currently known checkpoints."
 msgstr ""
 
-#: linux-nat.c:209
+#: linux-nat.c:230
 #, possible-c-format
 msgid "Debugging of GNU/Linux lwp module is %s.\n"
 msgstr ""
 
-#: linux-nat.c:498
+#: linux-nat.c:520
 msgid "Couldn't do single step"
 msgstr ""
 
-#: linux-nat.c:500
+#: linux-nat.c:522
 msgid "Couldn't wait vfork process"
 msgstr ""
 
-#: linux-nat.c:966 procfs.c:3637 procfs.c:3775
-#, possible-c-format
-msgid "[%s exited]\n"
-msgstr ""
-
-#: linux-nat.c:1017
-#, possible-c-format
-msgid "%s is a cloned process"
-msgstr ""
-
-#. If we fail to attach to the thread, issue a warning,
-#. but continue.  One way this can happen is if thread
-#. creation is interrupted; as of Linux kernel 2.6.19, a
-#. bug may place threads in the thread list and then fail
-#. to create them.
-#: linux-nat.c:1141
-#, possible-c-format
-msgid "Can't attach %s: %s"
-msgstr ""
-
-#: linux-nat.c:1324
+#: linux-nat.c:1258
 msgid "Unable to attach: program exited normally."
 msgstr ""
 
-#: linux-nat.c:1326
+#: linux-nat.c:1260
 #, possible-c-format
 msgid "Unable to attach: program exited with code %d."
 msgstr ""
 
-#: linux-nat.c:1337
+#: linux-nat.c:1271
 #, possible-c-format
 msgid "Unable to attach: program terminated with signal %s, %s."
 msgstr ""
 
-#: linux-nat.c:1344
+#: linux-nat.c:1278
 #, possible-c-format
 msgid "unexpected status %d for PID %ld"
 msgstr ""
 
-#: linux-nat.c:2026
+#: linux-nat.c:2006
 msgid "waiting for new child"
 msgstr ""
 
-#: linux-nat.c:2029
+#: linux-nat.c:2009
 #, possible-c-format
 msgid "wait returned unexpected PID %d"
 msgstr ""
 
-#: linux-nat.c:2032
+#: linux-nat.c:2012
 #, possible-c-format
 msgid "wait returned unexpected status 0x%x"
 msgstr ""
 
-#: linux-nat.c:4320 linux-nat.c:4333
+#: linux-nat.c:4161 linux-nat.c:4174
 #, possible-c-format
 msgid "Could not parse signal set: %s"
 msgstr ""
 
-#: linux-nat.c:4367
+#: linux-nat.c:4208
 #, possible-c-format
 msgid "Could not open %s"
 msgstr ""
 
-#: linux-nat.c:5138
+#: linux-nat.c:4980
 msgid "Set debugging of GNU/Linux lwp module."
 msgstr ""
 
-#: linux-nat.c:5139
+#: linux-nat.c:4981
 msgid "Show debugging of GNU/Linux lwp module."
 msgstr ""
 
-#: linux-nat.c:5140 linux-nat.c:5149
-msgid "Enables printf debugging output."
-msgstr ""
-
-#: linux-nat.c:5147
+#: linux-nat.c:4989
 msgid "Set debugging of GNU/Linux namespaces module."
 msgstr ""
 
-#: linux-nat.c:5148
+#: linux-nat.c:4990
 msgid "Show debugging of GNU/Linux namespaces module."
 msgstr ""
 
-#: linux-record.c:247
+#: linux-record.c:257
 msgid ""
 "The next instruction is syscall exit.  It will make the program exit.  Do "
 "you want to stop the program?"
 msgstr ""
 
-#: linux-record.c:495
+#: linux-record.c:494
 msgid ""
 "Process record and replay target doesn't support ioctl request "
 "TIOCSERGSTRUCT\n"
 msgstr ""
 
-#: linux-record.c:501
+#: linux-record.c:500
 #, possible-c-format
 msgid "Process record and replay target doesn't support ioctl request 0x%s.\n"
 msgstr ""
 
-#: linux-record.c:680
+#: linux-record.c:656
 msgid ""
 "The next instruction is syscall reboot.  It will restart the computer.  Do "
 "you want to stop the program?"
 msgstr ""
 
-#: linux-record.c:711
+#: linux-record.c:679
 #, possible-c-format
 msgid ""
 "The next instruction is syscall munmap.\n"
@@ -15816,316 +15967,316 @@ msgid ""
 "Do you want to stop the program?"
 msgstr ""
 
-#: linux-record.c:1059
+#: linux-record.c:1009
 #, possible-c-format
 msgid "Process record and replay target doesn't support socketcall call 0x%s\n"
 msgstr ""
 
 #. XXX RECORD_SEMCTL still not supported.
-#: linux-record.c:1224
+#: linux-record.c:1149
 #, possible-c-format
 msgid "Process record and replay target doesn't support ipc number %s\n"
 msgstr ""
 
-#: linux-record.c:1933
+#: linux-record.c:1739
 msgid ""
 "The next instruction is syscall exit_group.  It will make the program exit.  "
 "Do you want to stop the program?"
 msgstr ""
 
-#: linux-record.c:2278 ppc-linux-tdep.c:811
+#: linux-record.c:2033 ppc-linux-tdep.c:814
 #, possible-c-format
 msgid "Process record and replay target doesn't support syscall number %d\n"
 msgstr ""
 
-#: linux-tdep.c:500
+#: linux-tdep.c:526
 msgid "Could not compile regex to match /dev/zero filename"
 msgstr ""
 
-#: linux-tdep.c:508
+#: linux-tdep.c:534
 msgid "Could not compile regex to match shmem filenames"
 msgstr ""
 
-#: linux-tdep.c:524
+#: linux-tdep.c:550
 msgid "Could not compile regex to match '<file> (deleted)'"
 msgstr ""
 
-#: linux-tdep.c:707 procfs.c:5136
+#: linux-tdep.c:733 procfs.c:5139
 msgid "No current process: you must name one."
 msgstr ""
 
-#: linux-tdep.c:709
+#: linux-tdep.c:735
 msgid "Can't determine the current process's PID: you must name one."
 msgstr ""
 
-#: linux-tdep.c:716
+#: linux-tdep.c:742
 #, possible-c-format
 msgid "Too many parameters: %s"
 msgstr ""
 
-#: linux-tdep.c:718
+#: linux-tdep.c:744
 #, possible-c-format
 msgid "process %ld\n"
 msgstr ""
 
-#: linux-tdep.c:730 linux-tdep.c:817 linux-tdep.c:830 linux-tdep.c:967
-#: nat/linux-procfs.c:41 nat/linux-procfs.c:90
+#: linux-tdep.c:756 linux-tdep.c:843 linux-tdep.c:856 linux-tdep.c:993
+#: linux-tdep.c:2366 nat/linux-procfs.c:41 nat/linux-procfs.c:140
 #, possible-c-format
 msgid "unable to open /proc file '%s'"
 msgstr ""
 
-#: linux-tdep.c:743 linux-tdep.c:756
+#: linux-tdep.c:769 linux-tdep.c:782
 #, possible-c-format
 msgid "unable to read link '%s'"
 msgstr ""
 
 #. No output for summary mode.
-#: linux-tdep.c:767 linux-tdep.c:1020 procfs.c:5064
+#: linux-tdep.c:793 linux-tdep.c:1046 procfs.c:5067
 msgid ""
 "Mapped address spaces:\n"
 "\n"
 msgstr ""
 
-#: linux-tdep.c:841
+#: linux-tdep.c:867
 #, possible-c-format
 msgid "Process: %s\n"
 msgstr ""
 
-#: linux-tdep.c:860
+#: linux-tdep.c:886
 #, possible-c-format
 msgid "State: %c\n"
 msgstr ""
 
-#: linux-tdep.c:863
+#: linux-tdep.c:889
 #, possible-c-format
 msgid "Parent process: %s\n"
 msgstr ""
 
-#: linux-tdep.c:866
+#: linux-tdep.c:892
 #, possible-c-format
 msgid "Process group: %s\n"
 msgstr ""
 
-#: linux-tdep.c:869
+#: linux-tdep.c:895
 #, possible-c-format
 msgid "Session id: %s\n"
 msgstr ""
 
-#: linux-tdep.c:872
+#: linux-tdep.c:898
 #, possible-c-format
 msgid "TTY: %s\n"
 msgstr ""
 
-#: linux-tdep.c:875
+#: linux-tdep.c:901
 #, possible-c-format
 msgid "TTY owner process group: %s\n"
 msgstr ""
 
-#: linux-tdep.c:879
+#: linux-tdep.c:905
 #, possible-c-format
 msgid "Flags: %s\n"
 msgstr ""
 
-#: linux-tdep.c:882
+#: linux-tdep.c:908
 #, possible-c-format
 msgid "Minor faults (no memory page): %s\n"
 msgstr ""
 
-#: linux-tdep.c:885
+#: linux-tdep.c:911
 #, possible-c-format
 msgid "Minor faults, children: %s\n"
 msgstr ""
 
-#: linux-tdep.c:888
+#: linux-tdep.c:914
 #, possible-c-format
 msgid "Major faults (memory page faults): %s\n"
 msgstr ""
 
-#: linux-tdep.c:891
+#: linux-tdep.c:917
 #, possible-c-format
 msgid "Major faults, children: %s\n"
 msgstr ""
 
-#: linux-tdep.c:894
+#: linux-tdep.c:920
 #, possible-c-format
 msgid "utime: %s\n"
 msgstr ""
 
-#: linux-tdep.c:897
+#: linux-tdep.c:923
 #, possible-c-format
 msgid "stime: %s\n"
 msgstr ""
 
-#: linux-tdep.c:900
+#: linux-tdep.c:926
 #, possible-c-format
 msgid "utime, children: %s\n"
 msgstr ""
 
-#: linux-tdep.c:903
+#: linux-tdep.c:929
 #, possible-c-format
 msgid "stime, children: %s\n"
 msgstr ""
 
-#: linux-tdep.c:906
+#: linux-tdep.c:932
 #, possible-c-format
 msgid "jiffies remaining in current time slice: %s\n"
 msgstr ""
 
-#: linux-tdep.c:910
+#: linux-tdep.c:936
 #, possible-c-format
 msgid "'nice' value: %s\n"
 msgstr ""
 
-#: linux-tdep.c:913
+#: linux-tdep.c:939
 #, possible-c-format
 msgid "jiffies until next timeout: %s\n"
 msgstr ""
 
-#: linux-tdep.c:916
+#: linux-tdep.c:942
 #, possible-c-format
 msgid "jiffies until next SIGALRM: %s\n"
 msgstr ""
 
-#: linux-tdep.c:919
+#: linux-tdep.c:945
 #, possible-c-format
 msgid "start time (jiffies since system boot): %s\n"
 msgstr ""
 
-#: linux-tdep.c:923
+#: linux-tdep.c:949
 #, possible-c-format
 msgid "Virtual memory size: %s\n"
 msgstr ""
 
-#: linux-tdep.c:926
+#: linux-tdep.c:952
 #, possible-c-format
 msgid "Resident set size: %s\n"
 msgstr ""
 
-#: linux-tdep.c:929
+#: linux-tdep.c:955
 #, possible-c-format
 msgid "rlim: %s\n"
 msgstr ""
 
-#: linux-tdep.c:932
+#: linux-tdep.c:958
 #, possible-c-format
 msgid "Start of text: %s\n"
 msgstr ""
 
-#: linux-tdep.c:935
+#: linux-tdep.c:961
 #, possible-c-format
 msgid "End of text: %s\n"
 msgstr ""
 
-#: linux-tdep.c:938
+#: linux-tdep.c:964
 #, possible-c-format
 msgid "Start of stack: %s\n"
 msgstr ""
 
-#: linux-tdep.c:943
+#: linux-tdep.c:969
 #, possible-c-format
 msgid "Kernel stack pointer: %s\n"
 msgstr ""
 
-#: linux-tdep.c:946
+#: linux-tdep.c:972
 #, possible-c-format
 msgid "Kernel instr pointer: %s\n"
 msgstr ""
 
-#: linux-tdep.c:949
+#: linux-tdep.c:975
 #, possible-c-format
 msgid "Pending signals bitmap: %s\n"
 msgstr ""
 
-#: linux-tdep.c:952
+#: linux-tdep.c:978
 #, possible-c-format
 msgid "Blocked signals bitmap: %s\n"
 msgstr ""
 
-#: linux-tdep.c:955
+#: linux-tdep.c:981
 #, possible-c-format
 msgid "Ignored signals bitmap: %s\n"
 msgstr ""
 
-#: linux-tdep.c:958
+#: linux-tdep.c:984
 #, possible-c-format
 msgid "Catched signals bitmap: %s\n"
 msgstr ""
 
-#: linux-tdep.c:961
+#: linux-tdep.c:987
 #, possible-c-format
 msgid "wchan (system call): %s\n"
 msgstr ""
 
-#: linux-tdep.c:989
+#: linux-tdep.c:1015
 msgid "unable to find mappings in core file"
 msgstr ""
 
-#: linux-tdep.c:998
+#: linux-tdep.c:1024
 msgid "malformed core note - too short for header"
 msgstr ""
 
-#: linux-tdep.c:1003
+#: linux-tdep.c:1029
 msgid "could not get core note contents"
 msgstr ""
 
-#: linux-tdep.c:1009
+#: linux-tdep.c:1035
 msgid "malformed note - does not end with \\0"
 msgstr ""
 
-#: linux-tdep.c:1018
+#: linux-tdep.c:1044
 msgid "malformed note - too short for supplied file count"
 msgstr ""
 
-#: linux-tdep.c:1042
+#: linux-tdep.c:1068
 msgid "malformed note - filenames end too early"
 msgstr ""
 
-#: linux-tdep.c:1091
+#: linux-tdep.c:1117
 msgid "unable to find command name in core file"
 msgstr ""
 
-#: linux-tdep.c:1098
+#: linux-tdep.c:1124
 msgid "unable to handle request"
 msgstr ""
 
-#: linux-tdep.c:1213
+#: linux-tdep.c:1242
 #, possible-c-format
 msgid "Error parsing {s,}maps file '%s'"
 msgstr ""
 
-#: linux-tdep.c:1233
+#: linux-tdep.c:1262
 #, possible-c-format
 msgid "Error parsing {s,}maps file '%s' number"
 msgstr ""
 
-#: linux-tdep.c:2347
+#: linux-tdep.c:2435
 #, possible-c-format
 msgid "Failed inferior mmap call for %s bytes, errno is changed."
 msgstr ""
 
-#: linux-tdep.c:2376
+#: linux-tdep.c:2464
 #, possible-c-format
 msgid "Failed inferior munmap call at %s for %s bytes, errno is changed."
 msgstr ""
 
-#: linux-tdep.c:2396
+#: linux-tdep.c:2485
 msgid "Cannot find AT_ENTRY auxiliary vector entry."
 msgstr ""
 
-#: linux-tdep.c:2419
+#: linux-tdep.c:2508
 #, possible-c-format
 msgid "Use of /proc/PID/coredump_filter file to generate corefiles is %s.\n"
 msgstr ""
 
-#: linux-tdep.c:2463
+#: linux-tdep.c:2552
 msgid "Set whether gcore should consider /proc/PID/coredump_filter."
 msgstr ""
 
-#: linux-tdep.c:2465
+#: linux-tdep.c:2554
 msgid "Show whether gcore should consider /proc/PID/coredump_filter."
 msgstr ""
 
-#: linux-tdep.c:2467
+#: linux-tdep.c:2556
 msgid ""
 "Use this command to set whether gcore should consider the contents\n"
 "of /proc/PID/coredump_filter when generating the corefile.  For more "
@@ -16133,221 +16284,178 @@ msgid ""
 "about this file, refer to the manpage of core(5)."
 msgstr ""
 
-#: linux-thread-db.c:97
+#: linux-thread-db.c:89
 #, possible-c-format
 msgid "Auto-loading of inferior specific libthread_db is %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:121
+#: linux-thread-db.c:113
 #, possible-c-format
 msgid "libthread-db debugging is %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:431
+#: linux-thread-db.c:357
 #, possible-c-format
 msgid "Cannot find user-level thread for LWP %ld: %s"
 msgstr ""
 
-#: linux-thread-db.c:436
+#: linux-thread-db.c:362
 #, possible-c-format
 msgid "thread_get_info_callback: cannot get thread info: %s"
 msgstr ""
 
-#: linux-thread-db.c:473
+#: linux-thread-db.c:396
 #, possible-c-format
 msgid "Symbol \"%s\" not found in libthread_db: %s"
 msgstr ""
 
-#: linux-thread-db.c:573
-#, possible-c-format
-msgid "Unable to set global thread event mask: %s"
-msgstr ""
-
-#: linux-thread-db.c:587
-#, possible-c-format
-msgid "Unable to get location for thread creation breakpoint: %s"
-msgstr ""
-
-#: linux-thread-db.c:596
-#, possible-c-format
-msgid "Unable to get location for thread death breakpoint: %s"
-msgstr ""
-
-#: linux-thread-db.c:642
+#: linux-thread-db.c:472
 msgid "Warning: couldn't activate thread debugging using libthread_db: "
 msgstr ""
 
-#: linux-thread-db.c:687
+#: linux-thread-db.c:528
 #, possible-c-format
 msgid "Cannot initialize libthread_db: %s"
 msgstr ""
 
-#: linux-thread-db.c:704
+#: linux-thread-db.c:543
 #, possible-c-format
 msgid "td_ta_new failed: %s\n"
 msgstr ""
 
-#: linux-thread-db.c:718
+#: linux-thread-db.c:557
 #, possible-c-format
 msgid "td_ta_new failed: %s"
 msgstr ""
 
-#: linux-thread-db.c:776 sol-thread.c:616
+#: linux-thread-db.c:610 sol-thread.c:642
 msgid "[Thread debugging using libthread_db enabled]\n"
 msgstr ""
 
-#: linux-thread-db.c:792
+#: linux-thread-db.c:626
 #, possible-c-format
 msgid "Using host libthread_db library \"%s\".\n"
 msgstr ""
 
-#: linux-thread-db.c:819
+#: linux-thread-db.c:649
 #, possible-c-format
 msgid "Trying host libthread_db library: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:829
+#: linux-thread-db.c:659
 #, possible-c-format
 msgid "open failed: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:834
+#: linux-thread-db.c:664
 #, possible-c-format
 msgid ""
 "auto-load: Loading libthread-db library \"%s\" from explicit directory.\n"
 msgstr ""
 
-#: linux-thread-db.c:845
+#: linux-thread-db.c:675
 #, possible-c-format
 msgid "dlopen failed: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:859
+#: linux-thread-db.c:689
 #, possible-c-format
 msgid "Host %s resolved to: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:893
+#: linux-thread-db.c:724
 #, possible-c-format
 msgid "Expected absolute pathname for libpthread in the inferior, but got %s."
 msgstr ""
 
-#: linux-thread-db.c:1051
+#: linux-thread-db.c:884
 #, possible-c-format
 msgid "thread_db_load_search returning %d\n"
 msgstr ""
 
-#: linux-thread-db.c:1098
+#: linux-thread-db.c:931
 msgid ""
 "Unable to find libthread_db matching inferior's thread library, thread "
 "debugging will not be available."
 msgstr ""
 
-#: linux-thread-db.c:1205
+#: linux-thread-db.c:1021
 msgid ""
 "Target and debugger are in different PID namespaces; thread lists and other "
-"data are likely unreliable"
-msgstr ""
-
-#: linux-thread-db.c:1344
-#, possible-c-format
-msgid "Cannot enable thread event reporting for %s: %s"
-msgstr ""
-
-#: linux-thread-db.c:1465
-#, possible-c-format
-msgid "Cannot get thread event message: %s"
-msgstr ""
-
-#: linux-thread-db.c:1471
-#, possible-c-format
-msgid "Cannot get thread info: %s"
+"data are likely unreliable.  Connect to gdbserver inside the container."
 msgstr ""
 
-#: linux-thread-db.c:1487
-msgid "Spurious thread death event."
-msgstr ""
-
-#: linux-thread-db.c:1494
-msgid "Spurious thread event."
-msgstr ""
-
-#: linux-thread-db.c:1584
+#: linux-thread-db.c:1184
 #, possible-c-format
 msgid "find_new_threads_callback: cannot get thread info: %s"
 msgstr ""
 
-#: linux-thread-db.c:1618
-#, possible-c-format
-msgid "Cannot enable thread event reporting for LWP %d: %s"
-msgstr ""
-
-#: linux-thread-db.c:1701
+#: linux-thread-db.c:1276
 #, possible-c-format
 msgid "Found %d new threads in iteration %d.\n"
 msgstr ""
 
-#: linux-thread-db.c:1744
+#: linux-thread-db.c:1319
 #, possible-c-format
 msgid "Cannot find new threads: %s"
 msgstr ""
 
-#: linux-thread-db.c:1887
+#: linux-thread-db.c:1446
 msgid "No TLS library support"
 msgstr ""
 
-#: linux-thread-db.c:1902
+#: linux-thread-db.c:1461
 msgid "TLS load module not found"
 msgstr ""
 
-#: linux-thread-db.c:1922
+#: linux-thread-db.c:1481
 msgid "TLS not allocated yet"
 msgstr ""
 
-#: linux-thread-db.c:2006
+#: linux-thread-db.c:1565
 msgid "'info auto-load libthread-db' does not accept any parameters"
 msgstr ""
 
-#: linux-thread-db.c:2112
+#: linux-thread-db.c:1670
 msgid "No auto-loaded libthread-db.\n"
 msgstr ""
 
-#: linux-thread-db.c:2157
+#: linux-thread-db.c:1714
 msgid "Set search path for libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2158
+#: linux-thread-db.c:1715
 msgid "Show the current search path or libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2159
+#: linux-thread-db.c:1716
 msgid ""
 "This path is used to search for libthread_db to be loaded into gdb itself.\n"
 "Its value is a colon (':') separate list of directories to search.\n"
 "Setting the search path to an empty list resets it to its default value."
 msgstr ""
 
-#: linux-thread-db.c:2169
+#: linux-thread-db.c:1726
 msgid "Set libthread-db debugging."
 msgstr ""
 
-#: linux-thread-db.c:2170
+#: linux-thread-db.c:1727
 msgid "Show libthread-db debugging."
 msgstr ""
 
-#: linux-thread-db.c:2171
+#: linux-thread-db.c:1728
 msgid "When non-zero, libthread-db debugging is enabled."
 msgstr ""
 
-#: linux-thread-db.c:2178
+#: linux-thread-db.c:1735
 msgid "Enable or disable auto-loading of inferior specific libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2179
+#: linux-thread-db.c:1736
 msgid "Show whether auto-loading inferior specific libthread_db is enabled."
 msgstr ""
 
-#: linux-thread-db.c:2180
+#: linux-thread-db.c:1737
 msgid ""
 "If enabled, libthread_db will be searched in 'set libthread-db-search-path'\n"
 "locations to load libthread_db compatible with the inferior.\n"
@@ -16355,55 +16463,74 @@ msgid ""
 "This options has security implications for untrusted inferiors."
 msgstr ""
 
-#: linux-thread-db.c:2190
+#: linux-thread-db.c:1747
 msgid ""
 "Print the list of loaded inferior specific libthread_db.\n"
 "Usage: info auto-load libthread-db"
 msgstr ""
 
-#: lm32-tdep.c:365
+#: lm32-tdep.c:361
 msgid "lm32_store_return_value: type length too large."
 msgstr ""
 
-#: m2-exp.y:333 m2-exp.y:337 m2-exp.y:341 m2-exp.y:345 m2-exp.y:347
+#: location.c:463
+#, possible-c-format
+msgid "Unmatched quote, %s."
+msgstr ""
+
+#: location.c:584
+#, possible-c-format
+msgid "invalid explicit location argument, \"%s\""
+msgstr ""
+
+#: location.c:603
+#, possible-c-format
+msgid "missing argument for \"%s\""
+msgstr ""
+
+#: location.c:620
+msgid "Source filename requires function, label, or line offset."
+msgstr ""
+
+#: m2-exp.y:278 m2-exp.y:282 m2-exp.y:286 m2-exp.y:290 m2-exp.y:292
 msgid "Sets are not implemented."
 msgstr ""
 
-#: m2-exp.y:656
+#: m2-exp.y:599
 msgid "No symbol table is loaded.  Use the \"symbol-file\" command."
 msgstr ""
 
-#: m2-exp.y:715
+#: m2-exp.y:658
 msgid "Floating point numbers must be base 10."
 msgstr ""
 
-#: m2-exp.y:717
+#: m2-exp.y:660
 #, possible-c-format
 msgid "Invalid digit '%c' in number."
 msgstr ""
 
-#: m2-exp.y:725
+#: m2-exp.y:668
 #, possible-c-format
 msgid "Invalid digit '%c' in octal number."
 msgstr ""
 
-#: m2-exp.y:766
+#: m2-exp.y:709
 msgid "Overflow on numeric constant -- number too large."
 msgstr ""
 
-#: m2-exp.y:928
+#: m2-exp.y:871
 msgid "Unterminated string or character constant."
 msgstr ""
 
-#: m2-exp.y:1062
+#: m2-exp.y:1005
 msgid "internal:  Undefined class in m2lex()"
 msgstr ""
 
-#: m2-exp.y:1066
+#: m2-exp.y:1009
 msgid "internal:  Unforseen case in m2lex()"
 msgstr ""
 
-#: m2-exp.y:1069
+#: m2-exp.y:1012
 msgid "unhandled token in m2lex()"
 msgstr ""
 
@@ -16462,38 +16589,37 @@ msgstr ""
 msgid "bit test is out of range"
 msgstr ""
 
-#. This happens (without TYPE_FLAG_STUB set) on systems which
-#. don't use dbx xrefs (NO_DBX_XREFS in gcc) if a file has a
-#. "struct foo *bar" and no complete type for struct foo in that
-#. file.
-#: m2-valprint.c:412 valprint.c:677 valprint.c:759
+#. This happens (without TYPE_STUB set) on systems which don't use
+#. dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
+#. and no complete type for struct foo in that file.
+#: m2-valprint.c:411 valprint.c:1031 valprint.c:1091
 msgid "<incomplete type>"
 msgstr ""
 
-#: m2-valprint.c:429
+#: m2-valprint.c:428
 msgid "<error value>"
 msgstr ""
 
-#: m32c-tdep.c:2252
+#: m32c-tdep.c:2239
 msgid ""
 "The return value is stored in memory at 'mem0', but GDB cannot find\n"
 "its address."
 msgstr ""
 
-#: m32c-tdep.c:2284
+#: m32c-tdep.c:2271
 msgid ""
 "The return value is stored in memory at 'mem0', but GDB cannot find\n"
 " its address."
 msgstr ""
 
-#: m32c-tdep.c:2465
+#: m32c-tdep.c:2452
 #, possible-c-format
 msgid ""
 "Cannot convert code address %s to function pointer:\n"
 "couldn't find a symbol at that address, to find trampoline."
 msgstr ""
 
-#: m32c-tdep.c:2499
+#: m32c-tdep.c:2486
 #, possible-c-format
 msgid ""
 "Cannot convert code address %s to function pointer:\n"
@@ -16503,112 +16629,30 @@ msgid ""
 "but will most likely not be useful otherwise.\n"
 msgstr ""
 
-#: m32r-rom.c:133
-#, possible-c-format
-msgid "Unable to open file %s."
-msgstr ""
-
-#: m32r-rom.c:136
-msgid "File is not an object file."
-msgstr ""
-
-#: m32r-rom.c:441
-msgid "No ethernet connection!"
-msgstr ""
-
-#. empty
-#: m32r-rom.c:451
-msgid "Please use 'set board-address' to set the M32R-EVA board's IP address."
-msgstr ""
-
-#: m32r-rom.c:463
-msgid "Couldn't initialize WINSOCK."
-msgstr ""
-
-#. failed?
-#: m32r-rom.c:483
-msgid "Need to know gdb host computer's IP address (use 'set server-address')"
-msgstr ""
-
-#: m32r-rom.c:496
-msgid "Need to know default download path (use 'set download-path')"
-msgstr ""
-
-#: m32r-rom.c:518
-#, possible-c-format
-msgid ""
-"Upload file not found: %s.srec\n"
-"Check IP addresses and download path."
-msgstr ""
-
-#: m32r-rom.c:602
-msgid "Set the default path for downloadable SREC files."
-msgstr ""
-
-#: m32r-rom.c:603
-msgid "Show the default path for downloadable SREC files."
-msgstr ""
-
-#: m32r-rom.c:604
-msgid "Determines the default path for downloadable SREC files."
-msgstr ""
-
-#: m32r-rom.c:611
-msgid "Set IP address for M32R-EVA target board."
-msgstr ""
-
-#: m32r-rom.c:612
-msgid "Show IP address for M32R-EVA target board."
-msgstr ""
-
-#: m32r-rom.c:613
-msgid "Determine the IP address for M32R-EVA target board."
-msgstr ""
-
-#: m32r-rom.c:620
-msgid "Set IP address for download server (GDB's host computer)."
-msgstr ""
-
-#: m32r-rom.c:621
-msgid "Show IP address for download server (GDB's host computer)."
-msgstr ""
-
-#: m32r-rom.c:622
-msgid "Determine the IP address for download server (GDB's host computer)."
-msgstr ""
-
-#: m32r-rom.c:630
-msgid "Upload the srec file via the monitor's Ethernet upload capability."
-msgstr ""
-
-#: m32r-rom.c:633
-msgid "test upload command."
-msgstr ""
-
 #: m68hc11-tdep.c:254
 msgid ""
 "No frame soft register found in the symbol table.\n"
 "Stack backtrace will not work."
 msgstr ""
 
-#: m68hc11-tdep.c:1279
+#: m68hc11-tdep.c:1272
 msgid "return of value > 4 is not supported."
 msgstr ""
 
-#: m68hc11-tdep.c:1316 sh64-tdep.c:1274 sh-tdep.c:1325
+#: m68hc11-tdep.c:1309 sh64-tdep.c:1275 sh-tdep.c:1332
 msgid "bad size for return value"
 msgstr ""
 
-#: m68k-tdep.c:177
+#: m68k-tdep.c:172
 #, possible-c-format
 msgid "m68k_register_name: illegal register number %d"
 msgstr ""
 
-#: m68k-tdep.c:1027
+#: m68k-tdep.c:1022
 msgid "m68k_get_longjmp_target: not implemented"
 msgstr ""
 
-#: machoread.c:206
+#: machoread.c:207
 msgid "Unexpected empty N_SO stab"
 msgstr ""
 
@@ -16622,134 +16666,134 @@ msgstr ""
 msgid "Empty SO section"
 msgstr ""
 
-#: machoread.c:253
+#: machoread.c:252
 msgid "Three SO in a raw"
 msgstr ""
 
-#: machoread.c:262
+#: machoread.c:261
 #, possible-c-format
 msgid "stabs debugging not supported for %s"
 msgstr ""
 
-#: machoread.c:275
+#: machoread.c:274
 msgid "Unexpected stab after SO"
 msgstr ""
 
-#: machoread.c:293
+#: machoread.c:292
 msgid "Missing nul SO"
 msgstr ""
 
-#: machoread.c:323
+#: machoread.c:321
 msgid "unhandled stab for dwarf OSO file"
 msgstr ""
 
-#: machoread.c:330
+#: machoread.c:328
 msgid "non-debugging symbol within SO"
 msgstr ""
 
-#: machoread.c:336
+#: machoread.c:334
 msgid "missing nul SO"
 msgstr ""
 
-#: machoread.c:424
+#: machoread.c:422
 #, possible-c-format
 msgid "can't find symbol '%s' in minsymtab"
 msgstr ""
 
-#: machoread.c:450
+#: machoread.c:449
 #, possible-c-format
 msgid "Loading debugging symbols from oso: %s\n"
 msgstr ""
 
-#: machoread.c:454 symfile.c:1770
+#: machoread.c:453 symfile.c:1759
 #, possible-c-format
 msgid "`%s': can't read symbols: %s."
 msgstr ""
 
-#: machoread.c:462
+#: machoread.c:460
 #, possible-c-format
 msgid "`%s': file time stamp mismatch."
 msgstr ""
 
-#: machoread.c:471
+#: machoread.c:468
 #, possible-c-format
 msgid "`%s': can't create hash table"
 msgstr ""
 
-#: machoread.c:520
+#: machoread.c:516
 #, possible-c-format
 msgid "Duplicated symbol %s in symbol table"
 msgstr ""
 
-#: machoread.c:527
+#: machoread.c:523
 #, possible-c-format
 msgid "Adding symbol %s (addr: %s)\n"
 msgstr ""
 
-#: machoread.c:601
+#: machoread.c:597
 #, possible-c-format
 msgid "resolve sect %s with %s (set to %s)\n"
 msgstr ""
 
-#: machoread.c:680
+#: machoread.c:669
 #, possible-c-format
 msgid "Could not open OSO archive file \"%s\""
 msgstr ""
 
-#: machoread.c:687
+#: machoread.c:676
 #, possible-c-format
 msgid "OSO archive file \"%s\" not an archive."
 msgstr ""
 
-#: machoread.c:698
+#: machoread.c:687
 #, possible-c-format
 msgid "Could not read archive members out of OSO archive \"%s\""
 msgstr ""
 
-#: machoread.c:743
+#: machoread.c:725
 #, possible-c-format
 msgid "Could not find specified archive member for OSO name \"%s\""
 msgstr ""
 
-#: machoread.c:754 symfile.c:1761
+#: machoread.c:734 symfile.c:1752
 #, possible-c-format
 msgid "`%s': can't open to read symbols: %s."
 msgstr ""
 
-#: machoread.c:801 machoread.c:821
+#: machoread.c:778 machoread.c:797
 #, possible-c-format
 msgid "can't find UUID in %s"
 msgstr ""
 
-#: machoread.c:807
+#: machoread.c:784
 #, possible-c-format
 msgid "can't open dsym file %s"
 msgstr ""
 
-#: machoread.c:814
+#: machoread.c:790
 #, possible-c-format
 msgid "bad dsym file format: %s"
 msgstr ""
 
-#: machoread.c:828
+#: machoread.c:803
 #, possible-c-format
 msgid "dsym file UUID doesn't match the one in %s"
 msgstr ""
 
-#: machoread.c:901
+#: machoread.c:871
 msgid "dsym file found\n"
 msgstr ""
 
-#: machoread.c:950
+#: machoread.c:919
 #, possible-c-format
 msgid "Relocate section '%s' of %s\n"
 msgstr ""
 
-#: machoread.c:1039
+#: machoread.c:1007
 msgid "Set if printing Mach-O symbols processing."
 msgstr ""
 
-#: machoread.c:1040
+#: machoread.c:1008
 msgid "Show if printing Mach-O symbols processing."
 msgstr ""
 
@@ -16765,53 +16809,53 @@ msgid ""
 "you want to expand."
 msgstr ""
 
-#: macrocmd.c:231
+#: macrocmd.c:217
 #, possible-c-format
 msgid ""
 "Unrecognized option '%s' to info macro command.  Try \"help info macro\"."
 msgstr ""
 
-#: macrocmd.c:241
+#: macrocmd.c:227
 msgid ""
 "You must follow the `info macro' command with the name of the macro\n"
 "whose definition you want to see."
 msgstr ""
 
-#: macrocmd.c:375
+#: macrocmd.c:368
 msgid "usage: macro define NAME[(ARGUMENT-LIST)] [REPLACEMENT-LIST]"
 msgstr ""
 
-#: macrocmd.c:385 macrocmd.c:460
+#: macrocmd.c:378 macrocmd.c:453
 msgid "Invalid macro name."
 msgstr ""
 
-#: macrocmd.c:413
+#: macrocmd.c:406
 msgid "Macro is missing an argument."
 msgstr ""
 
-#: macrocmd.c:419
+#: macrocmd.c:412
 msgid "Two macro arguments with identical names."
 msgstr ""
 
-#: macrocmd.c:429
+#: macrocmd.c:422
 msgid "',' or ')' expected at end of macro arguments."
 msgstr ""
 
-#: macrocmd.c:455
+#: macrocmd.c:448
 msgid "usage: macro undef NAME"
 msgstr ""
 
-#: macrocmd.c:503
+#: macrocmd.c:495
 msgid "Prefix for commands dealing with C preprocessor macros."
 msgstr ""
 
-#: macrocmd.c:506
+#: macrocmd.c:498
 msgid ""
 "Fully expand any C/C++ preprocessor macro invocations in EXPRESSION.\n"
 "Show the expanded expression."
 msgstr ""
 
-#: macrocmd.c:511
+#: macrocmd.c:503
 msgid ""
 "Expand C/C++ preprocessor macro invocations appearing directly in "
 "EXPRESSION.\n"
@@ -16826,7 +16870,7 @@ msgid ""
 "expression work together to yield a pre-processed expression."
 msgstr ""
 
-#: macrocmd.c:526
+#: macrocmd.c:518
 msgid ""
 "Show the definition of MACRO, and it's source location.\n"
 "Usage: info macro [-a|-all] [--] MACRO\n"
@@ -16836,14 +16880,14 @@ msgid ""
 "  --           Specify the end of arguments and the beginning of the MACRO."
 msgstr ""
 
-#: macrocmd.c:536
+#: macrocmd.c:526
 msgid ""
 "Show the definitions of all macros at LINESPEC, or the current source "
 "location.\n"
 "Usage: info macros [LINESPEC]"
 msgstr ""
 
-#: macrocmd.c:541
+#: macrocmd.c:530
 msgid ""
 "Define a new C/C++ preprocessor macro.\n"
 "The GDB command `macro define DEFINITION' is equivalent to placing a\n"
@@ -16854,12 +16898,12 @@ msgid ""
 "  (gdb) macro define MIN(x,y) ((x) < (y) ? (x) : (y))"
 msgstr ""
 
-#: macrocmd.c:551
+#: macrocmd.c:540
 msgid ""
 "Remove the definition of the C/C++ preprocessor macro with the given name."
 msgstr ""
 
-#: macrocmd.c:556
+#: macrocmd.c:545
 msgid "List all the macros defined using the `macro define' command."
 msgstr ""
 
@@ -16884,32 +16928,32 @@ msgstr ""
 msgid "Malformed argument list for macro `%s'."
 msgstr ""
 
-#: macroexp.c:1011
+#: macroexp.c:1012
 msgid "Stringification operator requires an argument."
 msgstr ""
 
-#: macroexp.c:1016
+#: macroexp.c:1017
 msgid "Argument to stringification operator must name a macro parameter."
 msgstr ""
 
-#: macroexp.c:1030
+#: macroexp.c:1031
 msgid "Stray splicing operator"
 msgstr ""
 
-#: macroexp.c:1062
+#: macroexp.c:1063
 msgid "Splicing operator at end of macro"
 msgstr ""
 
-#: macroexp.c:1271
+#: macroexp.c:1272
 #, possible-c-format
 msgid "Wrong number of arguments to macro `%s' (expected %d, got %d)."
 msgstr ""
 
-#: macroexp.c:1305
+#: macroexp.c:1306
 msgid "bad macro definition kind"
 msgstr ""
 
-#: macroexp.c:1437
+#: macroexp.c:1438
 msgid "Expand-once not implemented yet."
 msgstr ""
 
@@ -16920,101 +16964,91 @@ msgid ""
 "is not covered in the compilation unit's macro information"
 msgstr ""
 
-#: macrotab.c:481
+#: macrotab.c:482
 #, possible-c-format
 msgid "both `%s' and `%s' allegedly #included at %s:%d"
 msgstr ""
 
-#: macrotab.c:731
+#: macrotab.c:734
 #, possible-c-format
 msgid "macro `%s' redefined at %s:%d; original definition at %s:%d"
 msgstr ""
 
-#: macrotab.c:860
+#: macrotab.c:863
 #, possible-c-format
 msgid "macro '%s' is #undefined twice, at %s:%d and %s:%d"
 msgstr ""
 
-#: macrotab.c:881
+#: macrotab.c:884
 #, possible-c-format
 msgid "no definition for macro `%s' in scope to #undef at %s:%d"
 msgstr ""
 
-#: main.c:122 source.c:580
+#: main.c:120 source.c:582
 #, possible-c-format
 msgid "%s is not a directory."
 msgstr ""
 
-#: main.c:540
+#: main.c:551
 msgid "error finding working directory"
 msgstr ""
 
-#: main.c:709
+#: main.c:720
 #, possible-c-format
 msgid "%s: TUI mode is not supported"
 msgstr ""
 
-#: main.c:775
+#: main.c:770
 #, possible-c-format
 msgid "%s: empty path for `--data-directory'"
 msgstr ""
 
-#: main.c:786
+#: main.c:781
 #, possible-c-format
 msgid "%s: unable to load tclcommand file \"%s\""
 msgstr ""
 
-#: main.c:829
+#: main.c:818
 #, possible-c-format
 msgid "could not set baud rate to `%s'."
 msgstr ""
 
-#: main.c:842
+#: main.c:831
 #, possible-c-format
 msgid "could not set timeout limit to `%s'."
 msgstr ""
 
-#: main.c:850
+#: main.c:839
 #, possible-c-format
 msgid "Use `%s --help' for a complete list of options."
 msgstr ""
 
-#: main.c:873
+#: main.c:862
 #, possible-c-format
 msgid "%s: `--args' specified but no program specified"
 msgstr ""
 
-#: main.c:908
+#: main.c:897
 #, possible-c-format
 msgid "Excess command line arguments ignored. (%s%s)\n"
 msgstr ""
 
-#: main.c:972
-#, possible-c-format
-msgid "Interpreter `%s' unrecognized"
-msgstr ""
-
-#: main.c:975
-#, possible-c-format
-msgid "Interpreter `%s' failed to initialize."
-msgstr ""
-
-#: main.c:997
+#: main.c:976
 msgid ""
 "\n"
 "warning: "
 msgstr ""
 
-#: main.c:1067
+#: main.c:1049
 msgid "Can't attach to process and specify a core file at the same time."
 msgstr ""
 
 #. Error messages should no longer be distinguished with extra output.
-#: main.c:1096
+#: main.c:1078
 msgid "warning: "
 msgstr ""
 
-#: main.c:1106
+#: main.c:1088
 #, possible-c-format
 msgid "auto-load: Loading .gdbinit file \"%s\".\n"
 msgstr ""
@@ -17147,165 +17181,165 @@ msgstr ""
 msgid "Report bugs to \"%s\".\n"
 msgstr ""
 
-#: maint.c:80
+#: maint.c:78
 #, possible-c-format
 msgid "Watchdog timer is %s.\n"
 msgstr ""
 
-#: maint.c:88
+#: maint.c:86
 msgid ""
 "\"maintenance\" must be followed by the name of a maintenance command.\n"
 msgstr ""
 
-#: maint.c:97
+#: maint.c:95
 msgid "Should GDB dump core? "
 msgstr ""
 
-#: maint.c:149
+#: maint.c:147
 msgid "This command has been moved to \"demangle\".\n"
 msgstr ""
 
-#: maint.c:156
+#: maint.c:154
 msgid "\"maintenance time\" takes a numeric argument.\n"
 msgstr ""
 
-#: maint.c:177
+#: maint.c:175
 msgid "\"maintenance info\" must be followed by the name of an info command.\n"
 msgstr ""
 
-#: maint.c:352
+#: maint.c:350
 msgid "Exec file:\n"
 msgstr ""
 
-#: maint.c:370
+#: maint.c:368
 #, possible-c-format
 msgid "  Object file: %s\n"
 msgstr ""
 
-#: maint.c:384
+#: maint.c:382
 msgid "Core file:\n"
 msgstr ""
 
-#: maint.c:412 regcache.c:1471
+#: maint.c:409 regcache.c:1513
 msgid "maintenance print architecture"
 msgstr ""
 
-#: maint.c:426
+#: maint.c:421
 msgid ""
 "\"maintenance print\" must be followed by the name of a print command.\n"
 msgstr ""
 
-#: maint.c:447
+#: maint.c:442
 msgid "requires argument (address or section + address)"
 msgstr ""
 
 #. End of command?
-#: maint.c:457
+#: maint.c:452
 msgid "Need to specify <section-name> and <address>"
 msgstr ""
 
-#: maint.c:468
+#: maint.c:463
 #, possible-c-format
 msgid "Unknown section %s."
 msgstr ""
 
-#: maint.c:497
+#: maint.c:492
 #, possible-c-format
 msgid "%s + %s in section %s of %s\n"
 msgstr ""
 
-#: maint.c:501
+#: maint.c:496
 #, possible-c-format
 msgid "%s + %s in section %s\n"
 msgstr ""
 
-#: maint.c:505
+#: maint.c:500
 #, possible-c-format
 msgid "%s + %s\n"
 msgstr ""
 
-#: maint.c:508
+#: maint.c:503
 #, possible-c-format
 msgid "no symbol at %s:%s\n"
 msgstr ""
 
-#: maint.c:511
+#: maint.c:506
 #, possible-c-format
 msgid "no symbol at %s\n"
 msgstr ""
 
-#: maint.c:526
+#: maint.c:521
 msgid ""
 "\"maintenance deprecate\" takes an argument,\n"
 "the command you want to deprecate, and optionally the replacement command\n"
 "enclosed in quotes.\n"
 msgstr ""
 
-#: maint.c:541
+#: maint.c:536
 msgid ""
 "\"maintenance undeprecate\" takes an argument, \n"
 "the command you want to undeprecate.\n"
 msgstr ""
 
-#: maint.c:573
+#: maint.c:568
 #, possible-c-format
 msgid "Can't find command '%s' to deprecate.\n"
 msgstr ""
 
-#: maint.c:652
+#: maint.c:647
 msgid "\"maintenance set\" must be followed by the name of a set command.\n"
 msgstr ""
 
-#: maint.c:671
+#: maint.c:666
 #, possible-c-format
 msgid "Internal profiling is %s.\n"
 msgstr ""
 
-#: maint.c:733
+#: maint.c:728
 msgid "Profiling support is not available on this system."
 msgstr ""
 
-#: maint.c:854
+#: maint.c:830
 #, possible-c-format
-msgid "Startup time: %ld.%06ld (cpu), %ld.%06ld (wall)\n"
+msgid "Startup time: %.6f (cpu), %.6f (wall)\n"
 msgstr ""
 
-#: maint.c:855
+#: maint.c:831
 #, possible-c-format
-msgid "Command execution time: %ld.%06ld (cpu), %ld.%06ld (wall)\n"
+msgid "Command execution time: %.6f (cpu), %.6f (wall)\n"
 msgstr ""
 
-#: maint.c:870
+#: maint.c:845
 #, possible-c-format
 msgid "Space used: %ld (%s%ld during startup)\n"
 msgstr ""
 
-#: maint.c:871
+#: maint.c:846
 #, possible-c-format
 msgid "Space used: %ld (%s%ld for this command)\n"
 msgstr ""
 
-#: maint.c:883
+#: maint.c:858
 #, possible-c-format
 msgid "#symtabs: %d (+%d), #compunits: %d (+%d), #blocks: %d (+%d)\n"
 msgstr ""
 
-#: maint.c:966
+#: maint.c:924
 msgid "Bad value for 'mt set per-command no'."
 msgstr ""
 
-#: maint.c:990
+#: maint.c:958
 msgid ""
 "Commands for use by GDB maintainers.\n"
 "Includes commands to dump specific internal GDB structures in\n"
 "a human readable form, to cause GDB to deliberately dump core, etc."
 msgstr ""
 
-#: maint.c:999
+#: maint.c:967
 msgid "Commands for showing internal info about the program being debugged."
 msgstr ""
 
-#: maint.c:1005
+#: maint.c:973
 msgid ""
 "List the BFD sections of the exec and core files. \n"
 "Arguments may be any combination of:\n"
@@ -17318,97 +17352,97 @@ msgid ""
 "lists all sections from all object files, including shared libraries."
 msgstr ""
 
-#: maint.c:1018
+#: maint.c:986
 msgid "Maintenance command for printing GDB internal state."
 msgstr ""
 
-#: maint.c:1022
+#: maint.c:990
 msgid ""
 "Set GDB internal variables used by the GDB maintainer.\n"
 "Configure variables internal to GDB that aid in GDB's maintenance"
 msgstr ""
 
-#: maint.c:1029
+#: maint.c:997
 msgid ""
 "Show GDB internal variables used by the GDB maintainer.\n"
 "Configure variables internal to GDB that aid in GDB's maintenance"
 msgstr ""
 
-#: maint.c:1037
+#: maint.c:1005
 msgid ""
 "Get fatal error; make debugger dump its core.\n"
 "GDB sets its handling of SIGQUIT back to SIG_DFL and then sends\n"
 "itself a SIGQUIT signal."
 msgstr ""
 
-#: maint.c:1045
+#: maint.c:1013
 msgid ""
 "Give GDB an internal error.\n"
 "Cause GDB to behave as if an internal error was detected."
 msgstr ""
 
-#: maint.c:1051
+#: maint.c:1019
 msgid ""
 "Give GDB an internal warning.\n"
 "Cause GDB to behave as if an internal warning was reported."
 msgstr ""
 
-#: maint.c:1057
+#: maint.c:1025
 msgid ""
 "Give GDB a demangler warning.\n"
 "Cause GDB to behave as if a demangler warning was reported."
 msgstr ""
 
-#: maint.c:1062
+#: maint.c:1030
 msgid "This command has been moved to \"demangle\"."
 msgstr ""
 
-#: maint.c:1067
+#: maint.c:1035
 msgid "Per-command statistics settings."
 msgstr ""
 
 #. allow-unknown
-#: maint.c:1072
+#: maint.c:1040
 msgid "Show per-command statistics settings."
 msgstr ""
 
-#: maint.c:1078
+#: maint.c:1046
 msgid "Set whether to display per-command execution time."
 msgstr ""
 
-#: maint.c:1079
+#: maint.c:1047
 msgid "Show whether to display per-command execution time."
 msgstr ""
 
-#: maint.c:1081
+#: maint.c:1049
 msgid ""
 "If enabled, the execution time for each command will be\n"
 "displayed following the command's output."
 msgstr ""
 
-#: maint.c:1088
+#: maint.c:1056
 msgid "Set whether to display per-command space usage."
 msgstr ""
 
-#: maint.c:1089
+#: maint.c:1057
 msgid "Show whether to display per-command space usage."
 msgstr ""
 
-#: maint.c:1091
+#: maint.c:1059
 msgid ""
 "If enabled, the space usage for each command will be\n"
 "displayed following the command's output."
 msgstr ""
 
-#: maint.c:1098
+#: maint.c:1066
 msgid "Set whether to display per-command symtab statistics."
 msgstr ""
 
-#: maint.c:1099
+#: maint.c:1067
 msgid "Show whether to display per-command symtab statistics."
 msgstr ""
 
-#: maint.c:1101
+#: maint.c:1069
 msgid ""
 "If enabled, the basic symtab statistics for each command will be\n"
 "displayed following the command's output."
@@ -17416,7 +17450,7 @@ msgstr ""
 
 #. This is equivalent to "mt set per-command time on".
 #. Kept because some people are used to typing "mt time 1".
-#: maint.c:1109
+#: maint.c:1077
 msgid ""
 "Set the display of time usage.\n"
 "If nonzero, will cause the execution time for each command to be\n"
@@ -17425,35 +17459,35 @@ msgstr ""
 
 #. This is equivalent to "mt set per-command space on".
 #. Kept because some people are used to typing "mt space 1".
-#: maint.c:1117
+#: maint.c:1085
 msgid ""
 "Set the display of space usage.\n"
 "If nonzero, will cause the execution space for each command to be\n"
 "displayed, following the command's output."
 msgstr ""
 
-#: maint.c:1123
+#: maint.c:1091
 msgid ""
 "Print a type chain for a given symbol.\n"
 "For each node in a type chain, print the raw data for each member of\n"
 "the type structure, and the interpretation of the data."
 msgstr ""
 
-#: maint.c:1130
+#: maint.c:1098
 msgid "Print statistics about internal gdb state."
 msgstr ""
 
-#: maint.c:1134
+#: maint.c:1102
 msgid ""
 "Print the internal architecture configuration.\n"
 "Takes an optional file parameter."
 msgstr ""
 
-#: maint.c:1141
+#: maint.c:1109
 msgid "Translate a section name and address to a symbol."
 msgstr ""
 
-#: maint.c:1144
+#: maint.c:1112
 msgid ""
 "Deprecate a command.  Note that this is just in here so the \n"
 "testsuite can check the command deprecator. You probably shouldn't use "
@@ -17463,7 +17497,7 @@ msgid ""
 "replacement is optional."
 msgstr ""
 
-#: maint.c:1151
+#: maint.c:1119
 msgid ""
 "Undeprecate a command.  Note that this is just in here so the \n"
 "testsuite can check the command deprecator. You probably shouldn't use "
@@ -17471,30 +17505,38 @@ msgid ""
 "If you decide you want to use it: maintenance undeprecate 'commandname'"
 msgstr ""
 
-#: maint.c:1157
+#: maint.c:1125
+msgid ""
+"Run gdb's unit tests.\n"
+"Usage: maintenance selftest\n"
+"This will run any unit tests that were built in to gdb.\n"
+"gdb will abort if any test fails."
+msgstr ""
+
+#: maint.c:1132
 msgid "Set watchdog timer."
 msgstr ""
 
-#: maint.c:1158
+#: maint.c:1133
 msgid "Show watchdog timer."
 msgstr ""
 
-#: maint.c:1159
+#: maint.c:1134
 msgid ""
 "When non-zero, this timeout is used instead of waiting forever for a target\n"
 "to finish a low-level step or continue operation.  If the specified amount\n"
 "of time passes without a response from the target, an error occurs."
 msgstr ""
 
-#: maint.c:1168
+#: maint.c:1143
 msgid "Set internal profiling."
 msgstr ""
 
-#: maint.c:1169
+#: maint.c:1144
 msgid "Show internal profiling."
 msgstr ""
 
-#: maint.c:1170
+#: maint.c:1145
 msgid "When enabled GDB is profiled."
 msgstr ""
 
@@ -17528,140 +17570,145 @@ msgstr ""
 msgid "unexpected type code for %s"
 msgstr ""
 
-#: mdebugread.c:378
+#: mdebugread.c:380
 #, possible-c-format
 msgid ""
 "\n"
 "%s not compiled with -g, debugging support is limited.\n"
 msgstr ""
 
-#: mdebugread.c:381
+#: mdebugread.c:383
 msgid "You should compile with -g2 or -g3 for best debugging support.\n"
 msgstr ""
 
-#: mdebugread.c:724 mdebugread.c:1336
+#: mdebugread.c:530 stabsread.c:173
+#, possible-c-format
+msgid "bad register number %d (max %d) in symbol %s"
+msgstr ""
+
+#: mdebugread.c:756 mdebugread.c:1368
 #, possible-c-format
 msgid "unknown symbol type 0x%x"
 msgstr ""
 
-#: mdebugread.c:942
+#: mdebugread.c:974
 #, possible-c-format
 msgid "declaration block contains unhandled symbol type %d"
 msgstr ""
 
-#: mdebugread.c:1224
+#: mdebugread.c:1256
 #, possible-c-format
 msgid "stEnd with storage class %d not handled"
 msgstr ""
 
-#: mdebugread.c:1601
+#: mdebugread.c:1611
 #, possible-c-format
 msgid "can't handle TIR fBitfield for %s"
 msgstr ""
 
-#: mdebugread.c:1631
+#: mdebugread.c:1641
 #, possible-c-format
 msgid "unable to cross ref btIndirect for %s"
 msgstr ""
 
-#: mdebugread.c:1749
+#: mdebugread.c:1761
 #, possible-c-format
 msgid "unable to cross ref btTypedef for %s"
 msgstr ""
 
-#: mdebugread.c:1796
+#: mdebugread.c:1808
 #, possible-c-format
 msgid "illegal TIR continued for %s"
 msgstr ""
 
-#: mdebugread.c:1859
+#: mdebugread.c:1871
 #, possible-c-format
 msgid "illegal array index type for %s, assuming int"
 msgstr ""
 
-#: mdebugread.c:1907
+#: mdebugread.c:1919
 #, possible-c-format
 msgid "unknown type qualifier 0x%x"
 msgstr ""
 
-#: mdebugread.c:1940
+#: mdebugread.c:1952
 #, possible-c-format
 msgid "can't handle PDR for static proc at 0x%lx"
 msgstr ""
 
-#: mdebugread.c:2003
+#: mdebugread.c:2015
 #, possible-c-format
 msgid "PDR for %s, but no symbol"
 msgstr ""
 
-#: mdebugread.c:2128
+#: mdebugread.c:2140
 #, possible-c-format
 msgid "Warning: %s `%s' is undefined (in %s)\n"
 msgstr ""
 
-#: mdebugread.c:2230
+#: mdebugread.c:2242
 #, possible-c-format
 msgid "guessed size of linetable for %s incorrectly"
 msgstr ""
 
-#: mdebugread.c:2493
+#: mdebugread.c:2504
 #, possible-c-format
 msgid "bad ifd for external symbol: %d (max %ld)"
 msgstr ""
 
-#: mdebugread.c:2500
+#: mdebugread.c:2511
 #, possible-c-format
 msgid "bad iss for external symbol: %ld (max %ld)"
 msgstr ""
 
-#: mdebugread.c:3506
+#: mdebugread.c:3498
 #, possible-c-format
 msgid "bad proc end in aux found from symbol %s"
 msgstr ""
 
-#: mdebugread.c:3619
+#: mdebugread.c:3608
 #, possible-c-format
 msgid "bad aux index at block symbol %s"
 msgstr ""
 
 #. Both complaints are valid:  one gives symbol name,
 #. the other the offending symbol type.
-#: mdebugread.c:3639
+#: mdebugread.c:3628
 #, possible-c-format
 msgid "unknown local symbol %s"
 msgstr ""
 
-#: mdebugread.c:3641
+#: mdebugread.c:3630
 #, possible-c-format
 msgid "with type %d"
 msgstr ""
 
-#: mdebugread.c:3804
+#: mdebugread.c:3794
 #, possible-c-format
 msgid "bad file number %ld"
 msgstr ""
 
-#: mdebugread.c:4117
+#: mdebugread.c:4107
 #, possible-c-format
 msgid "unknown stabs symbol %s"
 msgstr ""
 
-#: mdebugread.c:4311
+#: mdebugread.c:4301
 #, possible-c-format
 msgid "File %s contains %d unresolved references:"
 msgstr ""
 
-#: mdebugread.c:4488
+#: mdebugread.c:4478
 #, possible-c-format
 msgid "illegal tq0 in forward typedef for %s"
 msgstr ""
 
-#: mdebugread.c:4526
+#: mdebugread.c:4515
 #, possible-c-format
 msgid "illegal bt %d in forward typedef for %s"
 msgstr ""
 
-#: mdebugread.c:4899
+#: mdebugread.c:4885
 #, possible-c-format
 msgid "Error reading ECOFF debugging information: %s"
 msgstr ""
@@ -17729,16 +17776,16 @@ msgstr ""
 msgid "There are no memory regions defined.\n"
 msgstr ""
 
-#: memattr.c:560 memattr.c:607 memattr.c:649 memattr.c:659
+#: memattr.c:560 memattr.c:605 memattr.c:644 memattr.c:654
 #, possible-c-format
 msgid "No memory region number %d.\n"
 msgstr ""
 
-#: memattr.c:678
+#: memattr.c:670
 msgid "Delete all memory regions? "
 msgstr ""
 
-#: memattr.c:707
+#: memattr.c:699
 msgid ""
 "Define attributes for memory region or reset memory region handling to\n"
 "target-based.\n"
@@ -17749,7 +17796,7 @@ msgid ""
 "      <cache> may be cache or nocache"
 msgstr ""
 
-#: memattr.c:716
+#: memattr.c:708
 msgid ""
 "Enable memory region.\n"
 "Arguments are the code numbers of the memory regions to enable.\n"
@@ -17757,7 +17804,7 @@ msgid ""
 "Do \"info mem\" to see current list of code numbers."
 msgstr ""
 
-#: memattr.c:722
+#: memattr.c:714
 msgid ""
 "Disable memory region.\n"
 "Arguments are the code numbers of the memory regions to disable.\n"
@@ -17765,7 +17812,7 @@ msgid ""
 "Do \"info mem\" to see current list of code numbers."
 msgstr ""
 
-#: memattr.c:728
+#: memattr.c:720
 msgid ""
 "Delete memory region.\n"
 "Arguments are the code numbers of the memory regions to delete.\n"
@@ -17773,91 +17820,71 @@ msgid ""
 "Do \"info mem\" to see current list of code numbers."
 msgstr ""
 
-#: memattr.c:735
+#: memattr.c:727
 msgid "Memory region attributes"
 msgstr ""
 
 #. allow-unknown
-#: memattr.c:737 memattr.c:741
+#: memattr.c:729 memattr.c:733
 msgid "Memory regions settings"
 msgstr ""
 
-#: memattr.c:747
+#: memattr.c:739
 msgid "Set handling of unknown memory regions."
 msgstr ""
 
-#: memattr.c:748
+#: memattr.c:740
 msgid "Show handling of unknown memory regions."
 msgstr ""
 
-#: memattr.c:749
+#: memattr.c:741
 msgid ""
 "If on, and some memory map is defined, debugger will emit errors on\n"
 "accesses to memory not defined in the memory map. If off, accesses to all\n"
 "memory addresses will be allowed."
 msgstr ""
 
-#: mem-break.c:49 microblaze-linux-tdep.c:53 ppc-linux-tdep.c:226
-msgid "Software breakpoints not implemented for this target."
-msgstr ""
-
 #: memory-map.c:33
 msgid "Can not parse XML memory map; XML support was disabled at compile time"
 msgstr ""
 
-#: memory-map.c:85
+#: memory-map.c:90
 msgid "Flash block size is not set"
 msgstr ""
 
-#: memory-map.c:120
+#: memory-map.c:127
 #, possible-c-format
 msgid "Unknown property \"%s\""
 msgstr ""
 
-#: memory-map.c:182
+#: memory-map.c:189
 msgid "target memory map"
 msgstr ""
 
 #. Return values larger than a single register are returned in
 #. memory, pointed to by R0.  Unfortunately, we can't count on R0
 #. pointing to the return buffer, so we raise an error here.
-#: mep-tdep.c:2180 mep-tdep.c:2207
+#: mep-tdep.c:2173 mep-tdep.c:2200
 msgid ""
 "GDB cannot set return values larger than four bytes; the Media Processor's\n"
 "calling conventions do not provide enough information to do this.\n"
 "Try using the 'return' command with no argument."
 msgstr ""
 
-#: mep-tdep.c:2422
+#: mep-tdep.c:2418
 #, possible-c-format
 msgid ""
 "the MeP module '%s' is %s-endian, but the executable\n"
 "%s is %s-endian."
 msgstr ""
 
-#: mep-tdep.c:2427
+#: mep-tdep.c:2423
 #, possible-c-format
 msgid ""
 "the selected MeP module is %s-endian, but the executable\n"
 "%s is %s-endian."
 msgstr ""
 
-#: mi/mi-console.c:74
-msgid "mi_console_file_delete: bad magic number"
-msgstr ""
-
-#: mi/mi-console.c:104
-msgid "mi_console_raw_packet: bad magic number"
-msgstr ""
-
-#: mi/mi-console.c:133
-msgid "mi_console_file_flush: bad magic number"
-msgstr ""
-
-#: mi/mi-console.c:151
-msgid "mi_console_file_set_raw: bad magic number"
-msgstr ""
-
 #: mi/mi-getopt.c:37
 msgid "mi_getopt_long: oind out of bounds"
 msgstr ""
@@ -17901,60 +17928,69 @@ msgstr ""
 msgid "-inferior-tty-show: Usage: No args"
 msgstr ""
 
-#: mi/mi-cmd-break.c:243
+#: mi/mi-cmd-break.c:273
 #, possible-c-format
 msgid "-%s-insert: Missing <location>"
 msgstr ""
 
-#: mi/mi-cmd-break.c:251
+#: mi/mi-cmd-break.c:280
 msgid "-dprintf-insert: does not support -h or -a"
 msgstr ""
 
-#: mi/mi-cmd-break.c:253
+#: mi/mi-cmd-break.c:282
 msgid "-dprintf-insert: Missing <format>"
 msgstr ""
 
-#: mi/mi-cmd-break.c:261
+#: mi/mi-cmd-break.c:293
+msgid "-break-insert: Garbage following explicit location"
+msgstr ""
+
+#: mi/mi-cmd-break.c:298
 msgid "-break-insert: Garbage following <location>"
 msgstr ""
 
-#: mi/mi-cmd-break.c:333
+#: mi/mi-cmd-break.c:337
+#, possible-c-format
+msgid "-%s-insert: --source option requires --function, --label, or --line"
+msgstr ""
+
+#: mi/mi-cmd-break.c:397
 msgid "Usage: tracepoint-number passcount"
 msgstr ""
 
-#: mi/mi-cmd-break.c:346
+#: mi/mi-cmd-break.c:410
 #, possible-c-format
 msgid "Could not find tracepoint %d"
 msgstr ""
 
-#: mi/mi-cmd-break.c:394
+#: mi/mi-cmd-break.c:458
 msgid "-break-watch: Missing <expression>"
 msgstr ""
 
-#: mi/mi-cmd-break.c:396
+#: mi/mi-cmd-break.c:460
 msgid "-break-watch: Garbage following <expression>"
 msgstr ""
 
-#: mi/mi-cmd-break.c:412
+#: mi/mi-cmd-break.c:476
 msgid "-break-watch: Unknown watchpoint type."
 msgstr ""
 
-#: mi/mi-cmd-break.c:443
+#: mi/mi-cmd-break.c:507
 #, possible-c-format
 msgid "USAGE: %s <BKPT> [<COMMAND> [<COMMAND>...]]"
 msgstr ""
 
-#: mi/mi-cmd-break.c:447
+#: mi/mi-cmd-break.c:511
 #, possible-c-format
 msgid "breakpoint number argument \"%s\" is not a number."
 msgstr ""
 
-#: mi/mi-cmd-break.c:450
+#: mi/mi-cmd-break.c:514
 #, possible-c-format
 msgid "junk at the end of breakpoint number argument \"%s\"."
 msgstr ""
 
-#: mi/mi-cmd-break.c:455
+#: mi/mi-cmd-break.c:519
 #, possible-c-format
 msgid "breakpoint %d not found."
 msgstr ""
@@ -18018,37 +18054,37 @@ msgstr ""
 msgid "-stack-info-depth: Usage: [MAX_DEPTH]"
 msgstr ""
 
-#: mi/mi-cmd-stack.c:261
+#: mi/mi-cmd-stack.c:259
 msgid ""
 "-stack-list-locals: Usage: [--no-frame-filters] [--skip-unavailable] "
 "PRINT_VALUES"
 msgstr ""
 
-#: mi/mi-cmd-stack.c:334
+#: mi/mi-cmd-stack.c:332
 msgid ""
 "-stack-list-arguments: Usage: [--no-frame-filters] [--skip-unavailable] "
 "PRINT_VALUES [FRAME_LOW FRAME_HIGH]"
 msgstr ""
 
-#: mi/mi-cmd-stack.c:361
+#: mi/mi-cmd-stack.c:359
 msgid "-stack-list-arguments: Not enough frames in stack."
 msgstr ""
 
-#: mi/mi-cmd-stack.c:457
+#: mi/mi-cmd-stack.c:454
 msgid ""
 "-stack-list-variables: Usage: [--no-frame-filters] [--skip-unavailable] "
 "PRINT_VALUES"
 msgstr ""
 
-#: mi/mi-cmd-stack.c:701
+#: mi/mi-cmd-stack.c:697
 msgid "-stack-select-frame: Usage: FRAME_SPEC"
 msgstr ""
 
-#: mi/mi-cmd-stack.c:710
+#: mi/mi-cmd-stack.c:706
 msgid "-stack-info-frame: No arguments allowed"
 msgstr ""
 
-#: mi/mi-cmd-catch.c:80 mi/mi-cmd-catch.c:152 mi/mi-main.c:480
+#: mi/mi-cmd-catch.c:80 mi/mi-cmd-catch.c:152 mi/mi-main.c:474 skip.c:298
 #, possible-c-format
 msgid "Invalid argument: %s"
 msgstr ""
@@ -18065,39 +18101,39 @@ msgstr ""
 msgid "-catch-load/unload: Garbage following the <library name>"
 msgstr ""
 
-#: mi/mi-cmd-disas.c:136
+#: mi/mi-cmd-disas.c:137
 msgid ""
 "-data-disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s "
 "startaddr -e endaddr]) [--] mode."
 msgstr ""
 
-#: mi/mi-cmd-disas.c:140
+#: mi/mi-cmd-disas.c:141
 msgid ""
 "-data-disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s "
 "startaddr -e endaddr] [--] mode."
 msgstr ""
 
-#: mi/mi-cmd-disas.c:145
-msgid "-data-disassemble: Mode argument must be 0, 1, 2, or 3."
+#: mi/mi-cmd-disas.c:146
+msgid "-data-disassemble: Mode argument must be in the range 0-5."
 msgstr ""
 
-#: mi/mi-cmd-disas.c:162
+#: mi/mi-cmd-disas.c:181
 msgid "-data-disassemble: Invalid filename."
 msgstr ""
 
-#: mi/mi-cmd-disas.c:164
+#: mi/mi-cmd-disas.c:183
 msgid "-data-disassemble: Invalid line number"
 msgstr ""
 
-#: mi/mi-cmd-disas.c:166
+#: mi/mi-cmd-disas.c:185
 msgid "-data-disassemble: No function contains specified address"
 msgstr ""
 
-#: mi/mi-interp.c:235
+#: mi/mi-interp.c:213
 msgid "-interpreter-exec: Usage: -interpreter-exec interp command"
 msgstr ""
 
-#: mi/mi-interp.c:240
+#: mi/mi-interp.c:218
 #, possible-c-format
 msgid "-interpreter-exec: could not find interpreter \"%s\""
 msgstr ""
@@ -18122,398 +18158,402 @@ msgstr ""
 msgid "-target-file-delete: Usage: REMOTE_FILE"
 msgstr ""
 
-#: mi/mi-cmd-var.c:114
+#: mi/mi-cmd-var.c:104
 msgid "-var-create: Usage: NAME FRAME EXPRESSION."
 msgstr ""
 
-#: mi/mi-cmd-var.c:133
+#: mi/mi-cmd-var.c:123
 msgid "-var-create: name of object must begin with a letter"
 msgstr ""
 
-#: mi/mi-cmd-var.c:153
+#: mi/mi-cmd-var.c:143
 msgid "-var-create: unable to create variable object"
 msgstr ""
 
-#: mi/mi-cmd-var.c:173
+#: mi/mi-cmd-var.c:163
 msgid "-var-delete: Usage: [-c] EXPRESSION."
 msgstr ""
 
-#: mi/mi-cmd-var.c:185
+#: mi/mi-cmd-var.c:175
 msgid "-var-delete: Missing required argument after '-c': variable object name"
 msgstr ""
 
-#: mi/mi-cmd-var.c:188
+#: mi/mi-cmd-var.c:178
 msgid "-var-delete: Illegal variable object name"
 msgstr ""
 
-#: mi/mi-cmd-var.c:196
+#: mi/mi-cmd-var.c:186
 msgid "-var-delete: Invalid option."
 msgstr ""
 
-#: mi/mi-cmd-var.c:238
+#: mi/mi-cmd-var.c:230
 msgid ""
 "Must specify the format as: \"natural\", \"binary\", \"decimal\", "
-"\"hexadecimal\", or \"octal\""
+"\"hexadecimal\", \"octal\" or \"zero-hexadecimal\""
 msgstr ""
 
-#: mi/mi-cmd-var.c:251
+#: mi/mi-cmd-var.c:242
 msgid "-var-set-format: Usage: NAME FORMAT."
 msgstr ""
 
-#: mi/mi-cmd-var.c:276
+#: mi/mi-cmd-var.c:266
 msgid "Usage: NAME VISUALIZER_FUNCTION."
 msgstr ""
 
-#: mi/mi-cmd-var.c:281 varobj.c:483
+#: mi/mi-cmd-var.c:271 varobj.c:472
 msgid "Variable object not found"
 msgstr ""
 
-#: mi/mi-cmd-var.c:293
+#: mi/mi-cmd-var.c:283
 msgid "-var-set-format: Usage: NAME FROZEN_FLAG."
 msgstr ""
 
-#: mi/mi-cmd-var.c:302
+#: mi/mi-cmd-var.c:292
 msgid "Invalid flag value"
 msgstr ""
 
-#: mi/mi-cmd-var.c:319
+#: mi/mi-cmd-var.c:309
 msgid "-var-show-format: Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:337
+#: mi/mi-cmd-var.c:327
 msgid "-var-info-num-children: Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:390
+#: mi/mi-cmd-var.c:379
 msgid "-var-list-children: Usage: [PRINT_VALUES] NAME [FROM TO]"
 msgstr ""
 
-#: mi/mi-cmd-var.c:458
+#: mi/mi-cmd-var.c:443
 msgid "-var-info-type: Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:477
+#: mi/mi-cmd-var.c:459
 msgid "Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:496
+#: mi/mi-cmd-var.c:477
 msgid "-var-info-expression: Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:519
+#: mi/mi-cmd-var.c:499
 msgid "-var-show-attributes: Usage: NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:570
+#: mi/mi-cmd-var.c:550
 msgid "Cannot specify format more than once"
 msgstr ""
 
-#: mi/mi-cmd-var.c:579
+#: mi/mi-cmd-var.c:559
 msgid "Usage: [-f FORMAT] NAME"
 msgstr ""
 
-#: mi/mi-cmd-var.c:582
+#: mi/mi-cmd-var.c:562
 msgid "Garbage at end of command"
 msgstr ""
 
-#: mi/mi-cmd-var.c:612
+#: mi/mi-cmd-var.c:588
 msgid "-var-assign: Usage: NAME EXPRESSION."
 msgstr ""
 
-#: mi/mi-cmd-var.c:618
+#: mi/mi-cmd-var.c:594
 msgid "-var-assign: Variable object is not editable"
 msgstr ""
 
-#: mi/mi-cmd-var.c:629
+#: mi/mi-cmd-var.c:604
 msgid "-var-assign: Could not assign expression to variable object"
 msgstr ""
 
-#: mi/mi-cmd-var.c:685
+#: mi/mi-cmd-var.c:657
 msgid "-var-update: Usage: [PRINT_VALUES] NAME."
 msgstr ""
 
-#: mi/mi-cmd-var.c:837
+#: mi/mi-cmd-var.c:803
 msgid "-enable-pretty-printing: no arguments allowed"
 msgstr ""
 
-#: mi/mi-cmd-var.c:849
+#: mi/mi-cmd-var.c:815
 msgid "-var-set-update-range: Usage: VAROBJ FROM TO"
 msgstr ""
 
-#: mi/mi-cmds.c:257
+#: mi/mi-cmds.c:260
 #, possible-c-format
 msgid "command `%s' appears to be duplicated"
 msgstr ""
 
-#: mi/mi-main.c:133
+#: mi/mi-main.c:125
 #, possible-c-format
 msgid "Whether MI is in asynchronous mode is %s.\n"
 msgstr ""
 
-#: mi/mi-main.c:334
+#: mi/mi-main.c:327
 msgid "Already in reverse mode."
 msgstr ""
 
-#: mi/mi-main.c:337 reverse.c:57
+#: mi/mi-main.c:330 reverse.c:57
 #, possible-c-format
 msgid "Target %s does not support this command."
 msgstr ""
 
-#: mi/mi-main.c:514
+#: mi/mi-main.c:510
 msgid "Usage: -target-detach [pid | thread-group]"
 msgstr ""
 
-#: mi/mi-main.c:529
+#: mi/mi-main.c:525
 #, possible-c-format
 msgid "Invalid syntax of thread-group id '%s'"
 msgstr ""
 
-#: mi/mi-main.c:533
+#: mi/mi-main.c:529
 #, possible-c-format
 msgid "Non-existent thread-group id '%d'"
 msgstr ""
 
-#: mi/mi-main.c:543
+#: mi/mi-main.c:539
 #, possible-c-format
 msgid "Invalid identifier '%s'"
 msgstr ""
 
-#: mi/mi-main.c:550
+#: mi/mi-main.c:546
 msgid "Thread group is empty"
 msgstr ""
 
-#: mi/mi-main.c:565
+#: mi/mi-main.c:568
 msgid "-thread-select: USAGE: threadnum."
 msgstr ""
 
-#: mi/mi-main.c:583
+#: mi/mi-main.c:597
 msgid "-thread-list-ids: No arguments required."
 msgstr ""
 
-#: mi/mi-main.c:598 mi/mi-main.c:2679
+#: mi/mi-main.c:612 mi/mi-main.c:2680
 msgid "Invalid MI command"
 msgstr ""
 
-#: mi/mi-main.c:931
+#: mi/mi-main.c:946
 msgid "only '0' and '1' are valid values for the '--recurse' option"
 msgstr ""
 
-#: mi/mi-main.c:943 mi/mi-main.c:948
+#: mi/mi-main.c:958 mi/mi-main.c:963
 #, possible-c-format
 msgid "invalid syntax of group id '%s'"
 msgstr ""
 
-#: mi/mi-main.c:969
+#: mi/mi-main.c:984
 #, possible-c-format
 msgid "Non-existent thread group id '%d'"
 msgstr ""
 
-#: mi/mi-main.c:1033 mi/mi-main.c:1114 mi/mi-main.c:1239 mi/mi-main.c:1338
+#: mi/mi-main.c:1047 mi/mi-main.c:1127 mi/mi-main.c:1252 mi/mi-main.c:1347
 msgid "bad register number"
 msgstr ""
 
-#: mi/mi-main.c:1089 mi/mi-main.c:1108
+#: mi/mi-main.c:1102 mi/mi-main.c:1121
 msgid "-data-list-changed-registers: Unable to read register contents."
 msgstr ""
 
-#: mi/mi-main.c:1201
+#: mi/mi-main.c:1214
 msgid ""
 "-data-list-register-values: Usage: -data-list-register-values [--skip-"
 "unavailable] <format> [<regnum1>...<regnumN>]"
 msgstr ""
 
-#: mi/mi-main.c:1308
+#: mi/mi-main.c:1317
 msgid ""
 "-data-write-register-values: Usage: -data-write-register-values <format> "
 "[<regnum1> <value1>...<regnumN> <valueN>]"
 msgstr ""
 
-#: mi/mi-main.c:1312
+#: mi/mi-main.c:1321
 msgid "-data-write-register-values: No registers."
 msgstr ""
 
-#: mi/mi-main.c:1315
+#: mi/mi-main.c:1324
 msgid "-data-write-register-values: No regs and values specified."
 msgstr ""
 
-#: mi/mi-main.c:1318
+#: mi/mi-main.c:1327
 msgid "-data-write-register-values: Regs and vals are not in pairs."
 msgstr ""
 
-#: mi/mi-main.c:1360
+#: mi/mi-main.c:1363
 msgid "-data-evaluate-expression: Usage: -data-evaluate-expression expression"
 msgstr ""
 
-#: mi/mi-main.c:1444
+#: mi/mi-main.c:1443
 msgid ""
 "-data-read-memory: Usage: ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS "
 "[ASCHAR]."
 msgstr ""
 
-#: mi/mi-main.c:1481
+#: mi/mi-main.c:1480
 msgid "-data-read-memory: invalid number of rows."
 msgstr ""
 
-#: mi/mi-main.c:1486
+#: mi/mi-main.c:1485
 msgid "-data-read-memory: invalid number of columns."
 msgstr ""
 
-#: mi/mi-main.c:1505 mi/mi-main.c:1638
+#: mi/mi-main.c:1504 mi/mi-main.c:1632
 msgid "Unable to read memory."
 msgstr ""
 
-#: mi/mi-main.c:1628
+#: mi/mi-main.c:1622
 msgid "Usage: [ -o OFFSET ] ADDR LENGTH."
 msgstr ""
 
-#: mi/mi-main.c:1730
+#: mi/mi-main.c:1724
 msgid ""
 "-data-write-memory: Usage: [-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE."
 msgstr ""
 
-#: mi/mi-main.c:1773
+#: mi/mi-main.c:1767
 msgid "Usage: ADDR DATA [COUNT]."
 msgstr ""
 
-#: mi/mi-main.c:1781
+#: mi/mi-main.c:1775
 #, possible-c-format
 msgid ""
 "Hex-encoded '%s' must represent an integral number of addressable memory "
 "units."
 msgstr ""
 
-#: mi/mi-main.c:1854
+#: mi/mi-main.c:1848
 #, possible-c-format
 msgid "-enable-timings: Usage: %s {yes|no}"
 msgstr ""
 
-#: mi/mi-main.c:1884
+#: mi/mi-main.c:1878
 msgid "-list-features should be passed no arguments"
 msgstr ""
 
-#: mi/mi-main.c:1904
+#: mi/mi-main.c:1898
 msgid "-list-target-features should be passed no arguments"
 msgstr ""
 
-#: mi/mi-main.c:1913
+#: mi/mi-main.c:1907
 msgid "-add-inferior should be passed no arguments"
 msgstr ""
 
-#: mi/mi-main.c:1939
+#: mi/mi-main.c:1933
 msgid "-remove-inferior should be passed a single argument"
 msgstr ""
 
-#: mi/mi-main.c:1942
+#: mi/mi-main.c:1936
 msgid "the thread group id is syntactically invalid"
 msgstr ""
 
-#: mi/mi-main.c:1946
+#: mi/mi-main.c:1940
 msgid "the specified thread group does not exist"
 msgstr ""
 
-#: mi/mi-main.c:1949
+#: mi/mi-main.c:1943
 msgid "cannot remove an active inferior"
 msgstr ""
 
-#: mi/mi-main.c:1958
+#: mi/mi-main.c:1952
 msgid "Cannot remove last inferior"
 msgstr ""
 
-#: mi/mi-main.c:2194
+#: mi/mi-main.c:2228
 msgid "Cannot specify --thread-group together with --all"
 msgstr ""
 
-#: mi/mi-main.c:2197
+#: mi/mi-main.c:2231
 msgid "Cannot specify --thread together with --all"
 msgstr ""
 
-#: mi/mi-main.c:2200
+#: mi/mi-main.c:2234
 msgid "Cannot specify --thread together with --thread-group"
 msgstr ""
 
-#: mi/mi-main.c:2203
+#: mi/mi-main.c:2237
 msgid "Cannot specify --frame without --thread"
 msgstr ""
 
-#: mi/mi-main.c:2211
+#: mi/mi-main.c:2245
 msgid "Invalid thread group for the --thread-group option"
 msgstr ""
 
-#: mi/mi-main.c:2230
+#: mi/mi-main.c:2264
 #, possible-c-format
 msgid "Invalid thread id: %d"
 msgstr ""
 
-#: mi/mi-main.c:2233
+#: mi/mi-main.c:2267
 #, possible-c-format
 msgid "Thread id: %d has terminated"
 msgstr ""
 
-#: mi/mi-main.c:2248
+#: mi/mi-main.c:2282
 #, possible-c-format
 msgid "Invalid frame id: %d"
 msgstr ""
 
-#: mi/mi-main.c:2499
+#: mi/mi-main.c:2495
 msgid "Usage: -trace-define-variable VARIABLE [VALUE]"
 msgstr ""
 
-#: mi/mi-main.c:2503 tracepoint.c:403
+#: mi/mi-main.c:2499 tracepoint.c:402
 msgid "Name of trace variable should start with '$'"
 msgstr ""
 
-#: mi/mi-main.c:2521
+#: mi/mi-main.c:2517
 msgid "-trace-list-variables: no arguments allowed"
 msgstr ""
 
-#: mi/mi-main.c:2532
+#: mi/mi-main.c:2528
 msgid "trace selection mode is required"
 msgstr ""
 
-#: mi/mi-main.c:2547
+#: mi/mi-main.c:2543
 msgid "frame number is required"
 msgstr ""
 
-#: mi/mi-main.c:2553
+#: mi/mi-main.c:2549
 msgid "tracepoint number is required"
 msgstr ""
 
-#: mi/mi-main.c:2559
+#: mi/mi-main.c:2555
 msgid "PC is required"
 msgstr ""
 
-#: mi/mi-main.c:2565 mi/mi-main.c:2572
+#: mi/mi-main.c:2561 mi/mi-main.c:2568
 msgid "Start and end PC are required"
 msgstr ""
 
-#: mi/mi-main.c:2584
+#: mi/mi-main.c:2580
 msgid "Line is required"
 msgstr ""
 
-#: mi/mi-main.c:2593 mi/mi-main.c:2598
+#: mi/mi-main.c:2589 mi/mi-main.c:2594
 msgid "Could not find the specified line"
 msgstr ""
 
-#: mi/mi-main.c:2603
+#: mi/mi-main.c:2599
 #, possible-c-format
 msgid "Invalid mode '%s'"
 msgstr ""
 
-#: mi/mi-main.c:2803
+#: mi/mi-main.c:2644
+msgid "Exactly one argument required (file in which to save trace data)"
+msgstr ""
+
+#: mi/mi-main.c:2799
 msgid ""
 "Usage: -trace-frame-collected [--var-print-values PRINT_VALUES] [--comp-"
 "print-values PRINT_VALUES] [--registers-format FORMAT][--memory-contents]"
 msgstr ""
 
-#: mi/mi-main.c:2985
+#: mi/mi-main.c:2992
 msgid "Set whether MI asynchronous mode is enabled."
 msgstr ""
 
-#: mi/mi-main.c:2986
+#: mi/mi-main.c:2993
 msgid "Show whether MI asynchronous mode is enabled."
 msgstr ""
 
-#: mi/mi-main.c:2987
+#: mi/mi-main.c:2994
 msgid "Tells GDB whether MI should be in asynchronous mode."
 msgstr ""
 
@@ -18525,27 +18565,27 @@ msgstr ""
 msgid "-file-list-exec-source-file: No symtab"
 msgstr ""
 
-#: mi/mi-cmd-file.c:90
+#: mi/mi-cmd-file.c:88
 msgid "-file-list-exec-source-files: Usage: No args"
 msgstr ""
 
-#: microblaze-tdep.c:552
+#: microblaze-tdep.c:547
 msgid "Unsupported return value size requested"
 msgstr ""
 
-#: microblaze-tdep.c:777
+#: microblaze-tdep.c:776
 msgid "Set microblaze debugging."
 msgstr ""
 
-#: microblaze-tdep.c:778
+#: microblaze-tdep.c:777
 msgid "Show microblaze debugging."
 msgstr ""
 
-#: microblaze-tdep.c:779
+#: microblaze-tdep.c:778
 msgid "When non-zero, microblaze specific debugging is enabled."
 msgstr ""
 
-#: minidebug.c:279
+#: minidebug.c:280
 msgid "Cannot parse .gnu_debugdata section; not a BFD object"
 msgstr ""
 
@@ -18555,25 +18595,25 @@ msgid ""
 "time"
 msgstr ""
 
-#: minsyms.c:830
+#: minsyms.c:812
 #, possible-c-format
 msgid ""
 "GDB cannot resolve STT_GNU_IFUNC symbol at address %s without the ELF "
 "support compiled in."
 msgstr ""
 
-#: minsyms.c:841
+#: minsyms.c:823
 #, possible-c-format
 msgid ""
 "GDB cannot resolve STT_GNU_IFUNC symbol \"%s\" without the ELF support "
 "compiled in."
 msgstr ""
 
-#: minsyms.c:852
+#: minsyms.c:834
 msgid "elf_gnu_ifunc_resolver_stop cannot be reached."
 msgstr ""
 
-#: minsyms.c:861
+#: minsyms.c:843
 msgid "elf_gnu_ifunc_resolver_return_stop cannot be reached."
 msgstr ""
 
@@ -18582,16 +18622,16 @@ msgstr ""
 msgid "Bogon register number %d."
 msgstr ""
 
-#: mips-linux-nat.c:281 mips-linux-nat.c:358 ppcfbsd-nat.c:137
-#: ppcfbsd-nat.c:168 ppcnbsd-nat.c:103 ppcnbsd-nat.c:138
+#: mips-linux-nat.c:281 mips-linux-nat.c:358 ppc-fbsd-nat.c:137
+#: ppc-fbsd-nat.c:168 ppc-nbsd-nat.c:103 ppc-nbsd-nat.c:138
 msgid "Couldn't get FP registers"
 msgstr ""
 
-#: mips-linux-nat.c:349 shnbsd-nat.c:83
+#: mips-linux-nat.c:349 sh-nbsd-nat.c:83
 msgid "Couldn't set registers"
 msgstr ""
 
-#: mips-linux-nat.c:364 ppcfbsd-nat.c:174 ppcnbsd-nat.c:145
+#: mips-linux-nat.c:364 ppc-fbsd-nat.c:174 ppc-nbsd-nat.c:145
 msgid "Couldn't set FP registers"
 msgstr ""
 
@@ -18599,41 +18639,41 @@ msgstr ""
 msgid "Couldn't check DSP support"
 msgstr ""
 
-#: mips-linux-nat.c:618 mips-linux-nat.c:638 nat/x86-linux-dregs.c:70
+#: mips-linux-nat.c:619 mips-linux-nat.c:639 nat/x86-linux-dregs.c:70
 msgid "Couldn't write debug register"
 msgstr ""
 
-#: mips-linux-nat.c:774
+#: mips-linux-nat.c:776
 msgid "Set whether to show variables that mirror the mips debug registers."
 msgstr ""
 
-#: mips-linux-nat.c:775
+#: mips-linux-nat.c:777
 msgid "Show whether to show variables that mirror the mips debug registers."
 msgstr ""
 
-#: mipsread.c:82
+#: mipsread.c:81
 #, possible-c-format
 msgid "Error reading symbol table: %s"
 msgstr ""
 
-#: mips-tdep.c:667
+#: mips-tdep.c:664
 #, possible-c-format
 msgid "mips_register_name: bad register number %d"
 msgstr ""
 
-#: mips-tdep.c:768 mips-tdep.c:797 mips-tdep.c:837
+#: mips-tdep.c:765 mips-tdep.c:794 mips-tdep.c:834
 msgid "bad register size"
 msgstr ""
 
-#: mips-tdep.c:869
+#: mips-tdep.c:866
 msgid "32-bit compatibility mode not supported"
 msgstr ""
 
-#: mips-tdep.c:949
+#: mips-tdep.c:946
 msgid "mips_register_to_value: unrecognized case"
 msgstr ""
 
-#: mips-tdep.c:997
+#: mips-tdep.c:994
 msgid "mips_value_to_register: unrecognized case"
 msgstr ""
 
@@ -18645,83 +18685,83 @@ msgstr ""
 msgid "show_mask_address: bad switch"
 msgstr ""
 
-#: mips-tdep.c:1450 mips-tdep.c:1536
+#: mips-tdep.c:1450 mips-tdep.c:1534
 msgid "invalid ISA"
 msgstr ""
 
-#: mips-tdep.c:2715
+#: mips-tdep.c:2708
 msgid "Invalid number of argument registers encoded in SAVE."
 msgstr ""
 
-#: mips-tdep.c:2720
+#: mips-tdep.c:2713
 msgid "Invalid number of static registers encoded in SAVE."
 msgstr ""
 
-#: mips-tdep.c:4248
+#: mips-tdep.c:4227
 #, possible-c-format
 msgid "GDB can't find the start of the function at %s."
 msgstr ""
 
-#: mips-tdep.c:6211 mips-tdep.c:6248 mips-tdep.c:6563 sh64-tdep.c:1930
+#: mips-tdep.c:6184 mips-tdep.c:6221 mips-tdep.c:6536 sh64-tdep.c:1930
 #, possible-c-format
 msgid "can't read register %d (%s)"
 msgstr ""
 
-#: mips-tdep.c:6257
+#: mips-tdep.c:6230
 msgid "mips_read_fp_register_double: bad access to odd-numbered FP register"
 msgstr ""
 
-#: mips-tdep.c:6599 sh64-tdep.c:2089 sh64-tdep.c:2147
+#: mips-tdep.c:6572 sh64-tdep.c:2092 sh64-tdep.c:2150
 msgid "Not a valid register for the current processor type"
 msgstr ""
 
-#: mips-tdep.c:6968 mips-tdep.c:6982 mips-tdep.c:6996
+#: mips-tdep.c:6936 mips-tdep.c:6950 mips-tdep.c:6964
 msgid "set mipsfpu failed"
 msgstr ""
 
-#: mips-tdep.c:8122
+#: mips-tdep.c:8012
 #, possible-c-format
 msgid "unsupported ABI %s."
 msgstr ""
 
-#: mips-tdep.c:8136
+#: mips-tdep.c:8026
 msgid "unrecognized .gcc_compiled_longXX"
 msgstr ""
 
-#: mips-tdep.c:8148
+#: mips-tdep.c:8038
 msgid "unknown ABI string"
 msgstr ""
 
-#: mips-tdep.c:8165
+#: mips-tdep.c:8055
 msgid "unknown compressed ISA string"
 msgstr ""
 
-#: mips-tdep.c:8735 mips-tdep.c:8784
+#: mips-tdep.c:8615 mips-tdep.c:8664
 msgid "unknown ABI in switch"
 msgstr ""
 
-#: mips-tdep.c:9015
+#: mips-tdep.c:8894
 #, possible-c-format
 msgid "The compressed ISA encoding used is %s.\n"
 msgstr ""
 
-#: mips-tdep.c:9095
+#: mips-tdep.c:8974
 msgid "mips_abi_strings out of sync"
 msgstr ""
 
-#: mips-tdep.c:9111 mips-tdep.c:9115
+#: mips-tdep.c:8990 mips-tdep.c:8994
 msgid "Various MIPS specific commands."
 msgstr ""
 
-#: mips-tdep.c:9120
+#: mips-tdep.c:8999
 msgid "Set the MIPS ABI used by this program."
 msgstr ""
 
-#: mips-tdep.c:9121
+#: mips-tdep.c:9000
 msgid "Show the MIPS ABI used by this program."
 msgstr ""
 
-#: mips-tdep.c:9122
+#: mips-tdep.c:9001
 msgid ""
 "This option can be set to one of:\n"
 "  auto  - the default ABI associated with the current binary\n"
@@ -18733,15 +18773,15 @@ msgid ""
 "  eabi64"
 msgstr ""
 
-#: mips-tdep.c:9140
+#: mips-tdep.c:9019
 msgid "Set the compressed ISA encoding used by MIPS code."
 msgstr ""
 
-#: mips-tdep.c:9141
+#: mips-tdep.c:9020
 msgid "Show the compressed ISA encoding used by MIPS code."
 msgstr ""
 
-#: mips-tdep.c:9142
+#: mips-tdep.c:9021
 msgid ""
 "Select the compressed ISA encoding used in functions that have no symbol\n"
 "information available.  The encoding can be set to either of:\n"
@@ -18750,70 +18790,70 @@ msgid ""
 "and is updated automatically from ELF file flags if available."
 msgstr ""
 
-#: mips-tdep.c:9156
+#: mips-tdep.c:9035
 msgid "Set use of MIPS floating-point coprocessor."
 msgstr ""
 
-#: mips-tdep.c:9159
+#: mips-tdep.c:9038
 msgid "Select single-precision MIPS floating-point coprocessor."
 msgstr ""
 
-#: mips-tdep.c:9162
+#: mips-tdep.c:9041
 msgid "Select double-precision MIPS floating-point coprocessor."
 msgstr ""
 
-#: mips-tdep.c:9168
+#: mips-tdep.c:9047
 msgid "Select no MIPS floating-point coprocessor."
 msgstr ""
 
-#: mips-tdep.c:9173
+#: mips-tdep.c:9052
 msgid "Select MIPS floating-point coprocessor automatically."
 msgstr ""
 
-#: mips-tdep.c:9176
+#: mips-tdep.c:9055
 msgid "Show current use of MIPS floating-point coprocessor target."
 msgstr ""
 
-#: mips-tdep.c:9197
+#: mips-tdep.c:9076
 msgid "Set zeroing of upper 32 bits of 64-bit addresses."
 msgstr ""
 
-#: mips-tdep.c:9198
+#: mips-tdep.c:9077
 msgid "Show zeroing of upper 32 bits of 64-bit addresses."
 msgstr ""
 
-#: mips-tdep.c:9199
+#: mips-tdep.c:9078
 msgid ""
 "Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to\n"
 "allow GDB to determine the correct value."
 msgstr ""
 
-#: mips-tdep.c:9208
+#: mips-tdep.c:9087
 msgid ""
 "Set compatibility with 64-bit MIPS target that transfers 32-bit quantities."
 msgstr ""
 
-#: mips-tdep.c:9210
+#: mips-tdep.c:9089
 msgid ""
 "Show compatibility with 64-bit MIPS target that transfers 32-bit quantities."
 msgstr ""
 
-#: mips-tdep.c:9212
+#: mips-tdep.c:9091
 msgid ""
 "Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n"
 "that would transfer 32 bits for some registers (e.g. SR, FSR) and\n"
 "64 bits for others.  Use \"off\" to disable compatibility mode"
 msgstr ""
 
-#: mips-tdep.c:9224
+#: mips-tdep.c:9103
 msgid "Set mips debugging."
 msgstr ""
 
-#: mips-tdep.c:9225
+#: mips-tdep.c:9104
 msgid "Show mips debugging."
 msgstr ""
 
-#: mips-tdep.c:9226
+#: mips-tdep.c:9105
 msgid "When non-zero, mips specific debugging is enabled."
 msgstr ""
 
@@ -18827,304 +18867,191 @@ msgstr ""
 msgid "Cannot extract return value %d bytes long."
 msgstr ""
 
-#: mn10300-tdep.c:1387
-#, possible-c-format
-msgid "Bogus register number in debug info: %d"
-msgstr ""
-
-#: mn10300-tdep.c:1430
+#: mn10300-tdep.c:1421
 msgid "mn10300_gdbarch_init: Unknown mn10300 variant"
 msgstr ""
 
-#: monitor.c:220
+#: moxie-tdep.c:286
 #, possible-c-format
-msgid "%s (%s): %s: %s%c"
+msgid "Process record: error reading memory at addr 0x%s len = %d.\n"
 msgstr ""
 
-#: monitor.c:224
-#, possible-c-format
-msgid "%s (%s): %s: %s"
+#: msp430-tdep.c:899
+msgid "Unknown msp430x code memory model"
 msgstr ""
 
-#: monitor.c:398 monitor.c:474
-msgid "Timeout reading from remote system."
+#: msp430-tdep.c:921
+msgid "Unknown msp430 isa"
 msgstr ""
 
-#: monitor.c:400 monitor.c:476
-msgid "remote-monitor"
-msgstr ""
-
-#: monitor.c:470
-msgid "GDB serial timeout has expired.  Target detached."
-msgstr ""
-
-#: monitor.c:689
-#, possible-c-format
-msgid "compile_pattern: Can't compile pattern string `%s': %s!"
-msgstr ""
-
-#: monitor.c:707
-msgid "Magic number of monitor_ops struct wrong."
-msgstr ""
-
-#: monitor.c:713
+#: mt-tdep.c:301
 #, possible-c-format
-msgid ""
-"Use `target %s DEVICE-NAME' to use a serial port, or\n"
-"`target %s HOST-NAME:PORT-NUMBER' to use a network connection."
+msgid "mt_register_type: illegal register number %d"
 msgstr ""
 
-#: monitor.c:815
-#, possible-c-format
-msgid "Remote target %s connected to %s\n"
+#: nat/aarch64-linux-hw-point.c:87
+msgid "Unrecognized breakpoint/watchpoint type"
 msgstr ""
 
-#: monitor.c:868
-#, possible-c-format
-msgid "Ending remote %s debugging\n"
+#: nat/aarch64-linux-hw-point.c:583
+msgid "Unexpected error setting hardware debug registers"
 msgstr ""
 
-#: monitor.c:908
+#: nat/aarch64-linux-hw-point.c:640
 #, possible-c-format
-msgid "monitor_supply_register (%d):  bad value from monitor: %s."
-msgstr ""
-
-#: monitor.c:1021 nto-procfs.c:683 remote.c:5319 remote-mips.c:2288
 msgid ""
-"Interrupted while waiting for the program.\n"
-"Give up (and stop debugging it)? "
-msgstr ""
-
-#: monitor.c:1222
-#, possible-c-format
-msgid "Bad value returned from monitor while fetching register %x."
-msgstr ""
-
-#: monitor.c:1424
-#, possible-c-format
-msgid "\tAttached to %s at %d baud.\n"
-msgstr ""
-
-#: monitor.c:1962
-msgid "Failed to read via monitor"
-msgstr ""
-
-#: monitor.c:2065
-msgid "Args are not supported by the monitor."
-msgstr ""
-
-#: monitor.c:2098
-msgid "No set_break defined for this monitor"
-msgstr ""
-
-#: monitor.c:2119
-#, possible-c-format
-msgid "Too many breakpoints (> %d) for monitor."
-msgstr ""
-
-#: monitor.c:2134
-msgid "No clr_break defined for this monitor"
-msgstr ""
-
-#: monitor.c:2198 symfile.c:2084
-msgid "file to load"
-msgstr ""
-
-#: monitor.c:2216 symfile.c:2101
-#, possible-c-format
-msgid "Invalid download offset:%s."
-msgstr ""
-
-#: monitor.c:2219 symfile.c:2104
-msgid "Too many parameters."
+"Unexpected number of hardware watchpoint registers reported by ptrace, got %"
+"d, expected %d."
 msgstr ""
 
-#: monitor.c:2278
-msgid "monitor target not open."
+#: nat/aarch64-linux-hw-point.c:648
+msgid "Unable to determine the number of hardware watchpoints available."
 msgstr ""
 
-#: monitor.c:2305
+#: nat/aarch64-linux-hw-point.c:662
 #, possible-c-format
-msgid "Reply contains invalid hex digit 0x%x"
-msgstr ""
-
-#: monitor.c:2398
-msgid "Set display of activity while downloading a file."
-msgstr ""
-
-#: monitor.c:2399
-msgid "Show display of activity while downloading a file."
-msgstr ""
-
-#: monitor.c:2400
-msgid "When enabled, a hashmark '#' is displayed."
-msgstr ""
-
-#: monitor.c:2406
-msgid "Set debugging of remote monitor communication."
-msgstr ""
-
-#: monitor.c:2407
-msgid "Show debugging of remote monitor communication."
-msgstr ""
-
-#: monitor.c:2408
 msgid ""
-"When enabled, communication between GDB and the remote monitor\n"
-"is displayed."
-msgstr ""
-
-#: moxie-tdep.c:294
-#, possible-c-format
-msgid "Process record: error reading memory at addr 0x%s len = %d.\n"
-msgstr ""
-
-#: msp430-tdep.c:904
-msgid "Unknown msp430x code memory model"
-msgstr ""
-
-#: msp430-tdep.c:926
-msgid "Unknown msp430 isa"
+"Unexpected number of hardware breakpoint registers reported by ptrace, got %"
+"d, expected %d."
 msgstr ""
 
-#: mt-tdep.c:301
-#, possible-c-format
-msgid "mt_register_type: illegal register number %d"
+#: nat/aarch64-linux-hw-point.c:670
+msgid "Unable to determine the number of hardware breakpoints available."
 msgstr ""
 
-#: nat/linux-ptrace.c:42
+#: nat/linux-ptrace.c:46
 #, possible-c-format
 msgid "process %d is already traced by process %d"
 msgstr ""
 
-#: nat/linux-ptrace.c:47
+#: nat/linux-ptrace.c:51
 #, possible-c-format
 msgid "process %d is a zombie - the process has already terminated"
 msgstr ""
 
-#: nat/linux-ptrace.c:107
+#: nat/linux-ptrace.c:113
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot mmap: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:119
+#: nat/linux-ptrace.c:125
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot fork: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:127
+#: nat/linux-ptrace.c:133
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot PTRACE_TRACEME: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:157
+#: nat/linux-ptrace.c:163
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: waitpid returned %ld: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:165
+#: nat/linux-ptrace.c:171
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: WTERMSIG %d is not SIGKILL!"
 msgstr ""
 
-#: nat/linux-ptrace.c:168
+#: nat/linux-ptrace.c:174
 msgid ""
 "Cannot call inferior functions, Linux kernel PaX protection forbids return "
 "to non-executable pages!"
 msgstr ""
 
-#: nat/linux-ptrace.c:175
+#: nat/linux-ptrace.c:181
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: status %d is not WIFSTOPPED!"
 msgstr ""
 
-#: nat/linux-ptrace.c:183
+#: nat/linux-ptrace.c:189
 #, possible-c-format
 msgid ""
 "linux_ptrace_test_ret_to_nx: WSTOPSIG %d is neither SIGTRAP nor SIGSEGV!"
 msgstr ""
 
-#: nat/linux-ptrace.c:201
+#: nat/linux-ptrace.c:198
 #, possible-c-format
-msgid "linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: %s"
+msgid "linux_ptrace_test_ret_to_nx: Cannot PTRACE_GETREGS: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:215
+#: nat/linux-ptrace.c:217
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: PTRACE_KILL waitpid returned %ld: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:222
+#: nat/linux-ptrace.c:224
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: PTRACE_KILL status %d is not WIFSIGNALED!"
 msgstr ""
 
-#: nat/linux-ptrace.c:243
+#: nat/linux-ptrace.c:245
 #, possible-c-format
 msgid ""
 "linux_ptrace_test_ret_to_nx: PC %p is neither near return address %p nor is "
 "the return instruction %p!"
 msgstr ""
 
-#: nat/linux-ptrace.c:247
+#: nat/linux-ptrace.c:249
 msgid ""
 "Cannot call inferior functions on this system - Linux kernel with broken "
 "i386 NX (non-executable pages) support detected!"
 msgstr ""
 
-#: nat/linux-ptrace.c:352
+#: nat/linux-ptrace.c:354
 #, possible-c-format
 msgid "linux_check_ptrace_features: waitpid: unexpected result %d."
 msgstr ""
 
-#: nat/linux-ptrace.c:355
+#: nat/linux-ptrace.c:357
 #, possible-c-format
 msgid "linux_check_ptrace_features: waitpid: unexpected status %d."
 msgstr ""
 
-#: nat/linux-ptrace.c:370
+#: nat/linux-ptrace.c:372
 msgid "linux_check_ptrace_features: failed to kill child"
 msgstr ""
 
-#: nat/linux-ptrace.c:430
+#: nat/linux-ptrace.c:432
 msgid "linux_test_for_tracefork: failed to resume child"
 msgstr ""
 
-#: nat/linux-ptrace.c:459
+#: nat/linux-ptrace.c:461
 msgid "linux_test_for_tracefork: failed to kill second child"
 msgstr ""
 
-#: nat/linux-ptrace.c:465
+#: nat/linux-ptrace.c:467
 #, possible-c-format
 msgid ""
 "linux_test_for_tracefork: unexpected result from waitpid (%d, status 0x%x)"
 msgstr ""
 
-#: nat/linux-namespaces.c:726
+#: nat/linux-namespaces.c:739
 msgid "mount namespace helper vanished?"
 msgstr ""
 
-#: nat/linux-namespaces.c:729
+#: nat/linux-namespaces.c:742
 #, possible-c-format
 msgid "unhandled error %d"
 msgstr ""
 
-#: nat/linux-namespaces.c:734
+#: nat/linux-namespaces.c:747
 #, possible-c-format
 msgid "mount namespace helper exited with status %d"
 msgstr ""
 
-#: nat/linux-namespaces.c:737
+#: nat/linux-namespaces.c:750
 #, possible-c-format
 msgid "mount namespace helper killed by signal %d"
 msgstr ""
 
-#: nat/linux-namespaces.c:741
+#: nat/linux-namespaces.c:754
 #, possible-c-format
 msgid "unhandled status %d"
 msgstr ""
 
-#: nat/linux-namespaces.c:745
+#: nat/linux-namespaces.c:758
 #, possible-c-format
 msgid "unknown pid %d"
 msgstr ""
@@ -19140,75 +19067,75 @@ msgstr ""
 msgid "Unrecognized watch register style"
 msgstr ""
 
-#: nat/linux-btrace.c:333
+#: nat/linux-btrace.c:361
 msgid "Branch trace may be incomplete."
 msgstr ""
 
-#: nat/linux-btrace.c:373
+#: nat/linux-btrace.c:401
 #, possible-c-format
 msgid "test bts: cannot fork: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:380
+#: nat/linux-btrace.c:408
 #, possible-c-format
 msgid "test bts: cannot PTRACE_TRACEME: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:388
+#: nat/linux-btrace.c:416
 #, possible-c-format
 msgid "test bts: cannot raise SIGTRAP: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:399 nat/linux-btrace.c:431
+#: nat/linux-btrace.c:427 nat/linux-btrace.c:459
 #, possible-c-format
 msgid "test bts: bad pid %ld, error: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:406
+#: nat/linux-btrace.c:434
 #, possible-c-format
 msgid "test bts: expected stop. status: %d."
 msgstr ""
 
-#: nat/linux-btrace.c:434
+#: nat/linux-btrace.c:462
 #, possible-c-format
 msgid "test bts: expected killed. status: %d."
 msgstr ""
 
-#: nat/linux-btrace.c:456
+#: nat/linux-btrace.c:484
 #, possible-c-format
 msgid "test pt: cannot fork: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:463
+#: nat/linux-btrace.c:491
 #, possible-c-format
 msgid "test pt: cannot PTRACE_TRACEME: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:471
+#: nat/linux-btrace.c:499
 #, possible-c-format
 msgid "test pt: cannot raise SIGTRAP: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:482 nat/linux-btrace.c:518
+#: nat/linux-btrace.c:510 nat/linux-btrace.c:546
 #, possible-c-format
 msgid "test pt: bad pid %ld, error: %s."
 msgstr ""
 
-#: nat/linux-btrace.c:489
+#: nat/linux-btrace.c:517
 #, possible-c-format
 msgid "test pt: expected stop. status: %d."
 msgstr ""
 
-#: nat/linux-btrace.c:521
+#: nat/linux-btrace.c:549
 #, possible-c-format
 msgid "test pt: expected killed. status: %d."
 msgstr ""
 
-#: nat/linux-btrace.c:1059
+#: nat/linux-btrace.c:1121
 msgid "Unkown btrace read type."
 msgstr ""
 
-#: nat/linux-procfs.c:206
+#: nat/linux-procfs.c:296
 #, possible-c-format
 msgid "Could not open /proc/%ld/task."
 msgstr ""
@@ -19242,74 +19169,96 @@ msgstr ""
 msgid "Error disabling address space randomization: %s"
 msgstr ""
 
-#: nios2-tdep.c:152
+#: nds32-tdep.c:419 nds32-tdep.c:434
+#, possible-c-format
+msgid "Unknown nds32 pseudo register %d."
+msgstr ""
+
+#. If use_fpr, but no floating-point register exists,
+#. then it is an error.
+#: nds32-tdep.c:1716
+msgid "Fail to call. FPU registers are required."
+msgstr ""
+
+#: nds32-tdep.c:1743
+#, possible-c-format
+msgid "Cannot extract return value of %d bytes long floating-point."
+msgstr ""
+
+#: nds32-tdep.c:1833
 #, possible-c-format
-msgid "Dwarf-2 uses unmapped register #%d"
+msgid "Cannot store return value of %d bytes long floating-point."
 msgstr ""
 
-#: nios2-tdep.c:1823
+#: nios2-tdep.c:2384
 msgid "Set Nios II debugging."
 msgstr ""
 
-#: nios2-tdep.c:1824
+#: nios2-tdep.c:2385
 msgid "Show Nios II debugging."
 msgstr ""
 
-#: nios2-tdep.c:1825
+#: nios2-tdep.c:2386
 msgid "When on, Nios II specific debugging is enabled."
 msgstr ""
 
-#: nto-procfs.c:90
+#: nto-procfs.c:96
 msgid "Lost the QNX node.  Debug session probably over."
 msgstr ""
 
-#: nto-procfs.c:159
+#: nto-procfs.c:166
 msgid "Invalid procfs arg"
 msgstr ""
 
-#: nto-procfs.c:168 nto-procfs.c:186
+#: nto-procfs.c:175 nto-procfs.c:193
 msgid "Devctl failed."
 msgstr ""
 
-#: nto-procfs.c:178
+#: nto-procfs.c:185
 msgid "alloca failed."
 msgstr ""
 
-#: nto-procfs.c:193
+#: nto-procfs.c:200
 msgid "Invalid target CPU."
 msgstr ""
 
-#: nto-procfs.c:613 procfs.c:3033
+#: nto-procfs.c:658 procfs.c:3038
 msgid "Attaching GDB to itself is not a good idea..."
 msgstr ""
 
-#: nto-procfs.c:657
+#: nto-procfs.c:702
 #, possible-c-format
 msgid "Couldn't open proc file %s, error %d (%s)"
 msgstr ""
 
-#: nto-procfs.c:660
+#: nto-procfs.c:705
 msgid "Couldn't stop process"
 msgstr ""
 
-#: nto-procfs.c:1016
+#: nto-procfs.c:726
+msgid ""
+"Interrupted while waiting for the program.\n"
+"Give up (and stop debugging it)? "
+msgstr ""
+
+#: nto-procfs.c:1087
 msgid "run error!\n"
 msgstr ""
 
-#: nto-procfs.c:1189
+#: nto-procfs.c:1260
 #, possible-c-format
 msgid "Error spawning %s: %d (%s)"
 msgstr ""
 
-#: nto-procfs.c:1489
+#: nto-procfs.c:1556
 msgid "pidlist"
 msgstr ""
 
-#: nto-procfs.c:1490
+#: nto-procfs.c:1557
 msgid "memory information"
 msgstr ""
 
-#: nto-procfs.c:1520
+#: nto-procfs.c:1587
 msgid "Failed to set hardware watchpoint"
 msgstr ""
 
@@ -19325,96 +19274,96 @@ msgstr ""
 msgid "NSString: internal error -- no way to create new NSString"
 msgstr ""
 
-#: objc-lang.c:479
+#: objc-lang.c:494
 #, possible-c-format
 msgid "Can't find selector \"%s\""
 msgstr ""
 
-#: objc-lang.c:526
+#: objc-lang.c:541
 msgid "internal: compare_selectors(1)"
 msgstr ""
 
-#: objc-lang.c:531
+#: objc-lang.c:546
 msgid "internal: compare_selectors(2)"
 msgstr ""
 
-#: objc-lang.c:576 objc-lang.c:727
+#: objc-lang.c:591 objc-lang.c:742
 #, possible-c-format
 msgid "Regexp is too long: %s"
 msgstr ""
 
-#: objc-lang.c:609
+#: objc-lang.c:624
 #, possible-c-format
 msgid "Bad method name '%s'"
 msgstr ""
 
-#: objc-lang.c:626
+#: objc-lang.c:641
 #, possible-c-format
 msgid ""
 "Selectors matching \"%s\":\n"
 "\n"
 msgstr ""
 
-#: objc-lang.c:673
+#: objc-lang.c:688
 #, possible-c-format
 msgid "No selectors matching \"%s\"\n"
 msgstr ""
 
-#: objc-lang.c:692
+#: objc-lang.c:707
 msgid "internal: compare_classes(1)"
 msgstr ""
 
-#: objc-lang.c:764
+#: objc-lang.c:779
 #, possible-c-format
 msgid ""
 "Classes matching \"%s\":\n"
 "\n"
 msgstr ""
 
-#: objc-lang.c:803
+#: objc-lang.c:818
 #, possible-c-format
 msgid "No classes matching \"%s\"\n"
 msgstr ""
 
-#: objc-lang.c:1197
+#: objc-lang.c:1209
 msgid "Unable to locate _NSPrintForDebugger in child process"
 msgstr ""
 
-#: objc-lang.c:1203
+#: objc-lang.c:1215
 msgid "object returns null description"
 msgstr ""
 
-#: objc-lang.c:1214
+#: objc-lang.c:1226
 msgid "<object returns empty description>"
 msgstr ""
 
 #. INFO SELECTORS command.
-#: objc-lang.c:1369
+#: objc-lang.c:1381
 msgid "All Objective-C selectors, or those matching REGEXP."
 msgstr ""
 
 #. INFO CLASSES   command.
-#: objc-lang.c:1371
+#: objc-lang.c:1383
 msgid "All Objective-C classes, or those matching REGEXP."
 msgstr ""
 
-#: objc-lang.c:1373
+#: objc-lang.c:1385
 msgid "Ask an Objective-C object to print itself."
 msgstr ""
 
-#: objfiles.c:397
+#: objfiles.c:482
 msgid "Entry point address is not known."
 msgstr ""
 
-#: objfiles.c:463
+#: objfiles.c:548
 msgid "put_objfile_before: before objfile not in list"
 msgstr ""
 
-#: objfiles.c:495
+#: objfiles.c:580
 msgid "unlink_objfile: objfile already unlinked"
 msgstr ""
 
-#: objfiles.c:1239
+#: objfiles.c:1327
 #, possible-c-format
 msgid ""
 "unexpected overlap between:\n"
@@ -19423,15 +19372,15 @@ msgid ""
 "Will ignore section B"
 msgstr ""
 
-#: objfiles.h:674
+#: objfiles.h:658
 msgid "sect_index_data not initialized"
 msgstr ""
 
-#: objfiles.h:680
+#: objfiles.h:664
 msgid "sect_index_rodata not initialized"
 msgstr ""
 
-#: objfiles.h:686
+#: objfiles.h:670
 msgid "sect_index_text not initialized"
 msgstr ""
 
@@ -19465,7 +19414,7 @@ msgstr ""
 
 #: opencl-lang.c:183 opencl-lang.c:212 opencl-lang.c:391 opencl-lang.c:508
 #: opencl-lang.c:601 opencl-lang.c:912 valarith.c:1400 valarith.c:1446
-#: valarith.c:1804 valarith.c:1840 valops.c:882
+#: valarith.c:1804 valarith.c:1840 valops.c:885
 msgid "Could not determine the vector bounds"
 msgstr ""
 
@@ -19504,72 +19453,72 @@ msgstr ""
 msgid "Cannot perform conditional operation on vectors with different sizes"
 msgstr ""
 
-#: osabi.c:162
+#: osabi.c:157
 #, possible-c-format
 msgid ""
 "gdbarch_register_osabi: An attempt to register a handler for OS ABI \"%s\" "
 "for architecture %s was made.  The handler will not be registered"
 msgstr ""
 
-#: osabi.c:180
+#: osabi.c:175
 #, possible-c-format
 msgid ""
 "gdbarch_register_osabi: A handler for OS ABI \"%s\" has already been "
 "registered for architecture %s"
 msgstr ""
 
-#: osabi.c:274
+#: osabi.c:267
 #, possible-c-format
 msgid ""
 "gdbarch_lookup_osabi: invalid OS ABI (%d) from sniffer for architecture %s "
 "flavour %d"
 msgstr ""
 
-#: osabi.c:293
+#: osabi.c:286
 #, possible-c-format
 msgid ""
 "gdbarch_lookup_osabi: multiple %sspecific OS ABI match for architecture %s "
 "flavour %d: first match \"%s\", second match \"%s\""
 msgstr ""
 
-#: osabi.c:496
+#: osabi.c:489
 #, possible-c-format
 msgid "GNU ABI tag value %u unrecognized."
 msgstr ""
 
-#: osabi.c:637
+#: osabi.c:628
 #, possible-c-format
 msgid "Invalid OS ABI \"%s\" passed to command handler."
 msgstr ""
 
-#: osabi.c:645
+#: osabi.c:636
 msgid "Updating OS ABI failed."
 msgstr ""
 
-#: osabi.c:654
+#: osabi.c:645
 #, possible-c-format
 msgid "The current OS ABI is \"auto\" (currently \"%s\").\n"
 msgstr ""
 
-#: osabi.c:658
+#: osabi.c:649
 #, possible-c-format
 msgid "The current OS ABI is \"%s\".\n"
 msgstr ""
 
-#: osabi.c:662
+#: osabi.c:653
 #, possible-c-format
 msgid "The default OS ABI is \"%s\".\n"
 msgstr ""
 
-#: osabi.c:674
+#: osabi.c:665
 msgid "_initialize_gdb_osabi: gdb_osabi_names[] is inconsistent"
 msgstr ""
 
-#: osabi.c:684
+#: osabi.c:675
 msgid "Set OS ABI of target."
 msgstr ""
 
-#: osabi.c:685
+#: osabi.c:676
 msgid "Show OS ABI of target."
 msgstr ""
 
@@ -19581,74 +19530,74 @@ msgstr ""
 msgid "Seen more than on osdata element"
 msgstr ""
 
-#: osdata.c:173
+#: osdata.c:174
 msgid "osdata"
 msgstr ""
 
-#: osdata.c:256
+#: osdata.c:257
 msgid "Empty data returned by target.  Wrong osdata type?"
 msgstr ""
 
-#: osdata.c:258
+#: osdata.c:259
 msgid "Empty type list returned by target.  No type data?"
 msgstr ""
 
-#: osdata.c:267
+#: osdata.c:268
 msgid "Can not fetch data now."
 msgstr ""
 
-#: osdata.c:305
+#: osdata.c:306
 msgid "Available types of OS data not reported."
 msgstr ""
 
-#: osdata.c:415
+#: osdata.c:416
 msgid "Show OS data ARG."
 msgstr ""
 
-#: parse.c:97
+#: parse.c:98
 #, possible-c-format
 msgid "Expression debugging is %s.\n"
 msgstr ""
 
-#: parse.c:108
+#: parse.c:109
 #, possible-c-format
 msgid "Parser debugging is %s.\n"
 msgstr ""
 
-#: parse.c:868
+#: parse.c:870
 msgid "?error in operator_length_standard"
 msgstr ""
 
-#: parse.c:1154
+#: parse.c:1157
 msgid "expression to compute"
 msgstr ""
 
-#: parse.c:1267
+#: parse.c:1268
 msgid "Junk after end of expression."
 msgstr ""
 
-#: parse.c:1943
+#: parse.c:1936
 msgid "Set expression debugging."
 msgstr ""
 
-#: parse.c:1944
+#: parse.c:1937
 msgid "Show expression debugging."
 msgstr ""
 
-#: parse.c:1945
+#: parse.c:1938
 msgid ""
 "When non-zero, the internal representation of expressions will be printed."
 msgstr ""
 
-#: parse.c:1952
+#: parse.c:1945
 msgid "Set parser debugging."
 msgstr ""
 
-#: parse.c:1953
+#: parse.c:1946
 msgid "Show parser debugging."
 msgstr ""
 
-#: parse.c:1954
+#: parse.c:1947
 msgid "When non-zero, expression parser tracing will be enabled."
 msgstr ""
 
@@ -19661,7 +19610,7 @@ msgid "Unable to fetch AltiVec register"
 msgstr ""
 
 #. Anything else needs to be reported.
-#: ppc-linux-nat.c:440 ppc-linux-nat.c:2420
+#: ppc-linux-nat.c:440 ppc-linux-nat.c:2419
 msgid "Unable to fetch SPE registers"
 msgstr ""
 
@@ -19674,7 +19623,7 @@ msgstr ""
 msgid "Unable to fetch VSX registers"
 msgstr ""
 
-#: ppc-linux-nat.c:654 ppc-linux-nat.c:2446
+#: ppc-linux-nat.c:654 ppc-linux-nat.c:2447
 msgid "Unable to fetch AltiVec registers"
 msgstr ""
 
@@ -19723,282 +19672,295 @@ msgstr ""
 msgid "Couldn't set floating-point registers."
 msgstr ""
 
-#: ppc-linux-nat.c:1560
+#: ppc-linux-nat.c:1559
 msgid "Unexpected error setting breakpoint or watchpoint"
 msgstr ""
 
-#: ppc-linux-nat.c:1607
+#: ppc-linux-nat.c:1606
 msgid "Unexpected error deleting breakpoint or watchpoint"
 msgstr ""
 
-#: ppc-linux-nat.c:2282
+#: ppc-linux-nat.c:2281
 msgid "The given mask covers kernel address space and cannot be used.\n"
 msgstr ""
 
-#: ppc-linux-tdep.c:1549
+#: ppc-linux-tdep.c:1550
 msgid "unexpected wordsize"
 msgstr ""
 
 #. Can't happen.
-#: ppc-sysv-tdep.c:668
+#: ppc-sysv-tdep.c:669
 msgid "Unknown decimal float size."
 msgstr ""
 
-#: printcmd.c:90
+#: printcmd.c:91
 #, possible-c-format
 msgid "The largest offset that will be printed in <symbol+1234> form is %s.\n"
 msgstr ""
 
-#: printcmd.c:102
+#: printcmd.c:103
 #, possible-c-format
 msgid "Printing of source filename and line number with <symbol> is %s.\n"
 msgstr ""
 
-#: printcmd.c:424 printcmd.c:500
+#: printcmd.c:429 printcmd.c:505
 #, possible-c-format
 msgid "Undefined output size \"%c\"."
 msgstr ""
 
-#: printcmd.c:526
+#: printcmd.c:531
 #, possible-c-format
 msgid "Undefined output format \"%c\"."
 msgstr ""
 
-#: printcmd.c:854
+#. We reach here when line info is not available.  In this case,
+#. we print a message and just exit the loop.  The return value
+#. is calculated after the loop.
+#: printcmd.c:832
+msgid "No line number information available for address "
+msgstr ""
+
+#. The read was unsuccessful, so exit the loop.
+#: printcmd.c:921
+#, possible-c-format
+msgid "Cannot access memory at address %s\n"
+msgstr ""
+
+#: printcmd.c:1076
 #, possible-c-format
 msgid "Unable to display strings with size '%c', using 'b' instead."
 msgstr ""
 
-#: printcmd.c:922
+#: printcmd.c:1179
 #, possible-c-format
 msgid "Size letters are meaningless in \"%s\" command."
 msgstr ""
 
-#: printcmd.c:924
+#: printcmd.c:1181
 #, possible-c-format
 msgid "Item count other than 1 is meaningless in \"%s\" command."
 msgstr ""
 
-#: printcmd.c:927
+#: printcmd.c:1184
 #, possible-c-format
 msgid "Format letter \"%c\" is meaningless in \"%s\" command."
 msgstr ""
 
-#: printcmd.c:1095
+#: printcmd.c:1340
 msgid "Expression is not an assignment (and might have no effect)"
 msgstr ""
 
-#: printcmd.c:1113
+#: printcmd.c:1357
 msgid "address"
 msgstr ""
 
-#: printcmd.c:1136
+#: printcmd.c:1380
 msgid "mapped"
 msgstr ""
 
-#: printcmd.c:1136
+#: printcmd.c:1380
 msgid "unmapped"
 msgstr ""
 
-#: printcmd.c:1157
+#: printcmd.c:1401
 #, possible-c-format
 msgid "%s in load address range of %s overlay section %s of %s\n"
 msgstr ""
 
-#: printcmd.c:1161
+#: printcmd.c:1405
 #, possible-c-format
 msgid "%s in load address range of section %s of %s\n"
 msgstr ""
 
-#: printcmd.c:1166
+#: printcmd.c:1410
 #, possible-c-format
 msgid "%s in %s overlay section %s of %s\n"
 msgstr ""
 
-#: printcmd.c:1169
+#: printcmd.c:1413
 #, possible-c-format
 msgid "%s in section %s of %s\n"
 msgstr ""
 
-#: printcmd.c:1174
+#: printcmd.c:1418
 #, possible-c-format
 msgid "%s in load address range of %s overlay section %s\n"
 msgstr ""
 
-#: printcmd.c:1178
+#: printcmd.c:1422
 #, possible-c-format
 msgid "%s in load address range of section %s\n"
 msgstr ""
 
-#: printcmd.c:1182
+#: printcmd.c:1426
 #, possible-c-format
 msgid "%s in %s overlay section %s\n"
 msgstr ""
 
-#: printcmd.c:1185
+#: printcmd.c:1429
 #, possible-c-format
 msgid "%s in section %s\n"
 msgstr ""
 
-#: printcmd.c:1192
+#: printcmd.c:1436
 #, possible-c-format
 msgid "No symbol matches %s.\n"
 msgstr ""
 
-#: printcmd.c:1208
+#: printcmd.c:1452
 msgid "Argument required."
 msgstr ""
 
-#: printcmd.c:1311
+#: printcmd.c:1555
 #, possible-c-format
 msgid "an argument in register %s"
 msgstr ""
 
-#: printcmd.c:1314
+#: printcmd.c:1558
 #, possible-c-format
 msgid "a variable in register %s"
 msgstr ""
 
-#: printcmd.c:1319 printcmd.c:1389
+#: printcmd.c:1563 printcmd.c:1636
 msgid "static storage at address "
 msgstr ""
 
-#: printcmd.c:1325 printcmd.c:1362 printcmd.c:1394
+#: printcmd.c:1569 printcmd.c:1606 printcmd.c:1641
 msgid ""
 ",\n"
 " -- loaded at "
 msgstr ""
 
-#: printcmd.c:1327 printcmd.c:1364 printcmd.c:1396
+#: printcmd.c:1571 printcmd.c:1608 printcmd.c:1643
 #, possible-c-format
 msgid " in overlay section %s"
 msgstr ""
 
-#: printcmd.c:1335
+#: printcmd.c:1579
 #, possible-c-format
 msgid "address of an argument in register %s"
 msgstr ""
 
-#: printcmd.c:1340
+#: printcmd.c:1584
 #, possible-c-format
 msgid "an argument at offset %ld"
 msgstr ""
 
-#: printcmd.c:1344
+#: printcmd.c:1588
 #, possible-c-format
 msgid "a local variable at frame offset %ld"
 msgstr ""
 
-#: printcmd.c:1348
+#: printcmd.c:1592
 #, possible-c-format
 msgid "a reference argument at offset %ld"
 msgstr ""
 
-#: printcmd.c:1352
+#: printcmd.c:1596
 msgid "a typedef"
 msgstr ""
 
-#: printcmd.c:1356
+#: printcmd.c:1600
 msgid "a function at address "
 msgstr ""
 
-#: printcmd.c:1383
+#: printcmd.c:1628
 #, possible-c-format
 msgid ""
 "a thread-local variable at offset %s in the thread-local storage for `%s'"
 msgstr ""
 
-#: printcmd.c:1405
+#: printcmd.c:1652
 msgid "optimized out"
 msgstr ""
 
-#: printcmd.c:1409
+#: printcmd.c:1656
 msgid "of unknown (botched) type"
 msgstr ""
 
-#: printcmd.c:1465
+#: printcmd.c:1709
 msgid "starting display address"
 msgstr ""
 
-#: printcmd.c:1613
+#: printcmd.c:1864
 msgid "one or more display numbers"
 msgstr ""
 
-#: printcmd.c:1623
+#: printcmd.c:1874
 #, possible-c-format
 msgid "bad display number at or near '%s'"
 msgstr ""
 
-#: printcmd.c:1632 printcmd.c:1841
+#: printcmd.c:1883 printcmd.c:2089
 #, possible-c-format
 msgid "No display number %d.\n"
 msgstr ""
 
-#: printcmd.c:1654
+#: printcmd.c:1905
 msgid "Delete all auto-display expressions? "
 msgstr ""
 
-#: printcmd.c:1704
+#: printcmd.c:1953
 #, possible-c-format
 msgid "Unable to display \"%s\": %s"
 msgstr ""
 
-#: printcmd.c:1768
+#: printcmd.c:2017
 #, possible-c-format
 msgid "<error: %s>\n"
 msgstr ""
 
-#: printcmd.c:1851
+#: printcmd.c:2099
 #, possible-c-format
 msgid "Disabling display %d to avoid infinite recursion.\n"
 msgstr ""
 
-#: printcmd.c:1864
+#: printcmd.c:2112
 msgid "There are no auto-display expressions now.\n"
 msgstr ""
 
-#: printcmd.c:1866
+#: printcmd.c:2114
 msgid ""
 "Auto-display expressions now in effect:\n"
 "Num Enb Expression\n"
 msgstr ""
 
-#: printcmd.c:1879
+#: printcmd.c:2127
 msgid " (cannot be evaluated in the current context)"
 msgstr ""
 
-#: printcmd.c:2259
+#: printcmd.c:2510
 msgid "format-control string and values to print"
 msgstr ""
 
-#: printcmd.c:2344
+#: printcmd.c:2595
 #, possible-c-format
 msgid "expected wchar_t argument for %%lc"
 msgstr ""
 
-#: printcmd.c:2374 printcmd.c:2391 value.c:2671
+#: printcmd.c:2625 printcmd.c:2642 value.c:2784
 msgid "Invalid floating value found in program."
 msgstr ""
 
-#: printcmd.c:2398
+#: printcmd.c:2649
 msgid "long double not supported in printf"
 msgstr ""
 
-#: printcmd.c:2409
+#: printcmd.c:2660
 msgid "long long not supported in printf"
 msgstr ""
 
-#: printcmd.c:2493
+#: printcmd.c:2739
 msgid "Describe where symbol SYM is stored."
 msgstr ""
 
-#: printcmd.c:2495
+#: printcmd.c:2741
 msgid ""
 "Describe what symbol is at location ADDR.\n"
 "Only for symbols with fixed locations (global or static scope)."
 msgstr ""
 
-#: printcmd.c:2499
+#: printcmd.c:2745
 msgid ""
 "Examine memory: x/FMT ADDRESS.\n"
 "ADDRESS is an expression for the memory address to examine.\n"
@@ -20008,22 +19970,23 @@ msgid ""
 "  and z(hex, zero padded on the left).\n"
 "Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n"
 "The specified number of objects of the specified size are printed\n"
-"according to the format.\n"
+"according to the format.  If a negative number is specified, memory is\n"
+"examined backward from the address.\n"
 "\n"
 "Defaults for format and size letters are those previously used.\n"
 "Default count is 1.  Default address is following last thing printed\n"
 "with this command or \"print\"."
 msgstr ""
 
-#: printcmd.c:2515
+#: printcmd.c:2762
 msgid "Print line number and file of definition of variable."
 msgstr ""
 
-#: printcmd.c:2518
+#: printcmd.c:2765
 msgid "Expressions to display when program stops, with code numbers."
 msgstr ""
 
-#: printcmd.c:2521
+#: printcmd.c:2768
 msgid ""
 "Cancel some expressions to be displayed when program stops.\n"
 "Arguments are the code numbers of the expressions to stop displaying.\n"
@@ -20032,7 +19995,7 @@ msgid ""
 "Do \"info display\" to see current list of code numbers."
 msgstr ""
 
-#: printcmd.c:2529
+#: printcmd.c:2776
 msgid ""
 "Print value of expression EXP each time the program stops.\n"
 "/FMT may be used before EXP as in the \"print\" command.\n"
@@ -20044,7 +20007,7 @@ msgid ""
 "Use \"undisplay\" to cancel display requests previously made."
 msgstr ""
 
-#: printcmd.c:2538
+#: printcmd.c:2785
 msgid ""
 "Enable some expressions to be displayed when program stops.\n"
 "Arguments are the code numbers of the expressions to resume displaying.\n"
@@ -20052,7 +20015,7 @@ msgid ""
 "Do \"info display\" to see current list of code numbers."
 msgstr ""
 
-#: printcmd.c:2544
+#: printcmd.c:2791
 msgid ""
 "Disable some expressions to be displayed when program stops.\n"
 "Arguments are the code numbers of the expressions to stop displaying.\n"
@@ -20060,7 +20023,7 @@ msgid ""
 "Do \"info display\" to see current list of code numbers."
 msgstr ""
 
-#: printcmd.c:2550
+#: printcmd.c:2797
 msgid ""
 "Cancel some expressions to be displayed when program stops.\n"
 "Arguments are the code numbers of the expressions to stop displaying.\n"
@@ -20068,19 +20031,19 @@ msgid ""
 "Do \"info display\" to see current list of code numbers."
 msgstr ""
 
-#: printcmd.c:2556
+#: printcmd.c:2803
 msgid ""
 "printf \"printf format string\", arg1, arg2, arg3, ..., argn\n"
 "This is useful for formatted output in user-defined commands."
 msgstr ""
 
-#: printcmd.c:2560
+#: printcmd.c:2807
 msgid ""
 "Like \"print\" but don't put in value history and don't print newline.\n"
 "This is useful in user-defined commands."
 msgstr ""
 
-#: printcmd.c:2564 printcmd.c:2576
+#: printcmd.c:2811 printcmd.c:2823
 msgid ""
 "Evaluate expression EXP and assign result to variable VAR, using assignment\n"
 "syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n"
@@ -20094,7 +20057,7 @@ msgid ""
 msgstr ""
 
 #. "call" is the same as "set", but handy for dbx users to call fns.
-#: printcmd.c:2587
+#: printcmd.c:2834
 msgid ""
 "Call a function in the program.\n"
 "The argument is the function name and arguments, in the notation of the\n"
@@ -20102,7 +20065,7 @@ msgid ""
 "history, if it is not void."
 msgstr ""
 
-#: printcmd.c:2594
+#: printcmd.c:2841
 msgid ""
 "Evaluate expression EXP and assign result to variable VAR, using assignment\n"
 "syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n"
@@ -20112,7 +20075,7 @@ msgid ""
 "This may usually be abbreviated to simply \"set\"."
 msgstr ""
 
-#: printcmd.c:2603
+#: printcmd.c:2850
 msgid ""
 "Print value of expression EXP.\n"
 "Variables accessible are those of the lexical environment of the selected\n"
@@ -20138,15 +20101,15 @@ msgid ""
 "but no count or size letter (see \"x\" command)."
 msgstr ""
 
-#: printcmd.c:2630
+#: printcmd.c:2877
 msgid "Set the largest offset that will be printed in <symbol+1234> form."
 msgstr ""
 
-#: printcmd.c:2631
+#: printcmd.c:2878
 msgid "Show the largest offset that will be printed in <symbol+1234> form."
 msgstr ""
 
-#: printcmd.c:2632
+#: printcmd.c:2879
 msgid ""
 "Tell GDB to only display the symbolic form of an address if the\n"
 "offset between the closest earlier symbol and the address is less than\n"
@@ -20156,112 +20119,112 @@ msgid ""
 "it.  Zero is equivalent to \"unlimited\"."
 msgstr ""
 
-#: printcmd.c:2642
+#: printcmd.c:2889
 msgid "Set printing of source filename and line number with <symbol>."
 msgstr ""
 
-#: printcmd.c:2643
+#: printcmd.c:2890
 msgid "Show printing of source filename and line number with <symbol>."
 msgstr ""
 
-#: printcmd.c:2649
+#: printcmd.c:2896
 msgid ""
 "Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n"
 "a command line, and call it."
 msgstr ""
 
-#: probe.c:65
+#: probe.c:128
 #, possible-c-format
 msgid "'%s' is not a probe linespec"
 msgstr ""
 
-#: probe.c:70
+#: probe.c:133
 #, possible-c-format
 msgid "argument to `%s' missing"
 msgstr ""
 
-#: probe.c:108
+#: probe.c:171
 msgid "no probe name specified"
 msgstr ""
 
-#: probe.c:110
+#: probe.c:173
 msgid "invalid provider name"
 msgstr ""
 
-#: probe.c:112
+#: probe.c:175
 msgid "invalid objfile name"
 msgstr ""
 
-#: probe.c:165
+#: probe.c:194
 #, possible-c-format
 msgid "No probe matching objfile=`%s', provider=`%s', name=`%s'"
 msgstr ""
 
-#: probe.c:166 probe.c:167
+#: probe.c:195 probe.c:196
 msgid "<any>"
 msgstr ""
 
-#: probe.c:266
+#: probe.c:298
 msgid "Invalid provider regexp"
 msgstr ""
 
-#: probe.c:268
+#: probe.c:300
 msgid "Invalid probe regexp"
 msgstr ""
 
-#: probe.c:270
+#: probe.c:302
 msgid "Invalid object file regexp"
 msgstr ""
 
-#: probe.c:436
+#: probe.c:468
 msgid "n/a"
 msgstr ""
 
-#: probe.c:622
+#: probe.c:655
 msgid "Type"
 msgstr ""
 
-#: probe.c:624
+#: probe.c:657
 msgid "Provider"
 msgstr ""
 
-#: probe.c:625
+#: probe.c:658
 msgid "Name"
 msgstr ""
 
-#: probe.c:626
+#: probe.c:659
 msgid "Where"
 msgstr ""
 
-#: probe.c:644
+#: probe.c:676
 msgid "Object"
 msgstr ""
 
-#: probe.c:687 probe.c:717 probe.c:763
+#: probe.c:719 probe.c:749 probe.c:793
 msgid "No probes matched.\n"
 msgstr ""
 
-#: probe.c:732
+#: probe.c:763
 #, possible-c-format
 msgid "Probe %s:%s enabled.\n"
 msgstr ""
 
-#: probe.c:737
+#: probe.c:767
 #, possible-c-format
 msgid "Probe %s:%s cannot be enabled.\n"
 msgstr ""
 
-#: probe.c:778
+#: probe.c:807
 #, possible-c-format
 msgid "Probe %s:%s disabled.\n"
 msgstr ""
 
-#: probe.c:783
+#: probe.c:811
 #, possible-c-format
 msgid "Probe %s:%s cannot be disabled.\n"
 msgstr ""
 
-#: probe.c:915
+#: probe.c:943
 msgid ""
 "Show available static probes.\n"
 "Usage: info probes [all|TYPE [ARGS]]\n"
@@ -20273,26 +20236,26 @@ msgid ""
 "will show information about all types of probes."
 msgstr ""
 
-#: probe.c:951 probe.c:983
+#: probe.c:979 probe.c:1011
 #, possible-c-format
 msgid "No probe at PC %s"
 msgstr ""
 
-#: probe.c:958
+#: probe.c:986
 #, possible-c-format
 msgid "Invalid probe argument %d -- probe has %u arguments available"
 msgstr ""
 
-#: probe.c:997
+#: probe.c:1025
 #, possible-c-format
 msgid "Invalid probe argument %d -- probe has %d arguments available"
 msgstr ""
 
-#: probe.c:1048
+#: probe.c:1076
 msgid "Show information about all type of probes."
 msgstr ""
 
-#: probe.c:1052
+#: probe.c:1080
 msgid ""
 "Enable probes.\n"
 "Usage: enable probes [PROVIDER [NAME [OBJECT]]]\n"
@@ -20304,7 +20267,7 @@ msgid ""
 "all defined probes."
 msgstr ""
 
-#: probe.c:1063
+#: probe.c:1091
 msgid ""
 "Disable probes.\n"
 "Usage: disable probes [PROVIDER [NAME [OBJECT]]]\n"
@@ -20332,79 +20295,84 @@ msgstr ""
 msgid "Show filename for /proc tracefile."
 msgstr ""
 
-#: procfs.c:482
+#: procfs.c:483
 #, possible-c-format
 msgid "procfs: couldn't find pid %d (kernel thread %d) in procinfo list."
 msgstr ""
 
-#: procfs.c:486
+#: procfs.c:487
 #, possible-c-format
 msgid "procfs: couldn't find pid %d in procinfo list."
 msgstr ""
 
-#: procfs.c:883
+#: procfs.c:884
 #, possible-c-format
 msgid "load_syscalls: Can't open /proc/%d/sysent"
 msgstr ""
 
-#: procfs.c:890 procfs.c:904
+#: procfs.c:891 procfs.c:905
 #, possible-c-format
 msgid "load_syscalls: Error reading /proc/%d/sysent"
 msgstr ""
 
-#: procfs.c:895
+#: procfs.c:896
 #, possible-c-format
 msgid "load_syscalls: /proc/%d/sysent contains no syscalls!"
 msgstr ""
 
-#: procfs.c:1364
+#: procfs.c:1365
 #, possible-c-format
 msgid "procfs: modify_flag failed to turn %s %s"
 msgstr ""
 
-#: procfs.c:1608
+#: procfs.c:1609
 msgid "procfs: set_traced_signals failed"
 msgstr ""
 
-#: procfs.c:2567
+#: procfs.c:2572
 #, possible-c-format
 msgid "procfs_find_LDT_entry: could not find procinfo for %d:%ld."
 msgstr ""
 
-#: procfs.c:2574
+#: procfs.c:2579
 #, possible-c-format
 msgid "procfs_find_LDT_entry: could not read gregs for %d:%ld."
 msgstr ""
 
-#: procfs.c:3040
+#: procfs.c:3045
 #, possible-c-format
 msgid "Attaching to program `%s', %s\n"
 msgstr ""
 
-#: procfs.c:3091
+#: procfs.c:3075 target.c:3304
+#, possible-c-format
+msgid "Detaching from program: %s, %s\n"
+msgstr ""
+
+#: procfs.c:3096
 msgid "procfs: out of memory in 'attach'"
 msgstr ""
 
-#: procfs.c:3181
+#: procfs.c:3186
 msgid "Was stopped when attached, make it runnable again? "
 msgstr ""
 
-#: procfs.c:3224
+#: procfs.c:3229
 #, possible-c-format
 msgid "procfs: fetch_registers failed to find procinfo for %s"
 msgstr ""
 
-#: procfs.c:3273
+#: procfs.c:3278
 #, possible-c-format
 msgid "procfs: store_registers: failed to find procinfo for %s"
 msgstr ""
 
-#: procfs.c:3418
+#: procfs.c:3422
 #, possible-c-format
 msgid "Failed to create a bfd: %s."
 msgstr ""
 
-#: procfs.c:3441
+#: procfs.c:3444
 msgid "Failed to insert dbx_link breakpoint."
 msgstr ""
 
@@ -20469,98 +20437,135 @@ msgstr ""
 msgid "procfs:%d -- Can't find shell %s in PATH"
 msgstr ""
 
-#: procfs.c:5157
+#: procfs.c:5160
 #, possible-c-format
 msgid "process %d flags:\n"
 msgstr ""
 
-#: procfs.c:5167
+#: procfs.c:5170
 #, possible-c-format
 msgid "thread %d flags:\n"
 msgstr ""
 
-#: procfs.c:5227
+#: procfs.c:5230
 msgid "you must be debugging a process to use this command."
 msgstr ""
 
-#: procfs.c:5230
+#: procfs.c:5233
 msgid "system call to trace"
 msgstr ""
 
-#: procfs.c:5275
+#: procfs.c:5278
 msgid "Give a trace of entries into the syscall."
 msgstr ""
 
-#: procfs.c:5277
+#: procfs.c:5280
 msgid "Give a trace of exits from the syscall."
 msgstr ""
 
-#: procfs.c:5279
+#: procfs.c:5282
 msgid "Cancel a trace of entries into the syscall."
 msgstr ""
 
-#: procfs.c:5281
+#: procfs.c:5284
 msgid "Cancel a trace of exits from the syscall."
 msgstr ""
 
-#: procfs.c:5474
+#: procfs.c:5478
 msgid "gcore not implemented for this host."
 msgstr ""
 
-#: progspace.c:381
+#: progspace.c:390
 #, possible-c-format
 msgid "program space ID %d not known."
 msgstr ""
 
-#: progspace.c:508
+#: progspace.c:517
 msgid "Info about currently known program spaces."
 msgstr ""
 
-#: psymtab.c:87 symfile.c:1186
+#: psymtab.c:83 symfile.c:1181
 #, possible-c-format
 msgid "Reading symbols from %s..."
 msgstr ""
 
-#: psymtab.c:97 symfile.c:1214
+#: psymtab.c:93 symfile.c:1209
 msgid "(no debugging symbols found)..."
 msgstr ""
 
 #. Might want to error() here (in case symtab is corrupt and
 #. will cause a core dump), but maybe we can successfully
 #. continue, so let's not.
-#: psymtab.c:392
+#: psymtab.c:388
 #, possible-c-format
 msgid "(Internal error: pc %s in read in psymtab, but not in symtab.)\n"
 msgstr ""
 
-#: psymtab.c:858
+#: psymtab.c:843
 msgid "select_source_symtab: readin pst found and no symtabs."
 msgstr ""
 
-#: psymtab.c:1071
+#: psymtab.c:1056
 #, possible-c-format
 msgid "  Number of psym tables (not yet expanded): %d\n"
 msgstr ""
 
-#: psymtab.c:1903
-msgid "print-psymbols takes an output file name and optional symbol file name"
+#: psymtab.c:1929 symmisc.c:426
+msgid "Missing pc value"
+msgstr ""
+
+#: psymtab.c:1935 symmisc.c:432
+msgid "Missing source file"
+msgstr ""
+
+#: psymtab.c:1941 symmisc.c:438 symmisc.c:729
+msgid "Missing objfile name"
+msgstr ""
+
+#. Future proofing: Don't allow OUTFILE to begin with "-".
+#: psymtab.c:1953 symmisc.c:450 symmisc.c:741
+#, possible-c-format
+msgid "Unknown option: %s"
+msgstr ""
+
+#: psymtab.c:1961 symmisc.c:458
+msgid "Must specify at most one of -pc and -source"
+msgstr ""
+
+#: psymtab.c:1970 symmisc.c:467 symmisc.c:755
+msgid "Junk at end of command"
 msgstr ""
 
-#: psymtab.c:2140
+#: psymtab.c:2061
+#, possible-c-format
+msgid "No partial symtab for address: %s"
+msgstr ""
+
+#: psymtab.c:2063
+#, possible-c-format
+msgid "No partial symtab for source file: %s"
+msgstr ""
+
+#: psymtab.c:2274
 msgid ""
 "Print dump of current partial symbol definitions.\n"
-"Entries in the partial symbol table are dumped to file OUTFILE.\n"
-"If a SOURCE file is specified, dump only that file's partial symbols."
+"Usage: mt print psymbols [-objfile objfile] [-pc address] [--] [outfile]\n"
+"       mt print psymbols [-objfile objfile] [-source source] [--] [outfile]\n"
+"Entries in the partial symbol table are dumped to file OUTFILE,\n"
+"or the terminal if OUTFILE is unspecified.\n"
+"If ADDRESS is provided, dump only the file for that address.\n"
+"If SOURCE is provided, dump only that file's symbols.\n"
+"If OBJFILE is provided, dump only that file's minimal symbols."
 msgstr ""
 
-#: psymtab.c:2146
+#: psymtab.c:2285
 msgid ""
 "List the partial symbol tables for all object files.\n"
 "This does not include information about individual partial symbols,\n"
 "just the symbol table structures themselves."
 msgstr ""
 
-#: psymtab.c:2153
+#: psymtab.c:2292
 msgid "Check consistency of currently expanded psymtabs versus symtabs."
 msgstr ""
 
@@ -20572,80 +20577,80 @@ msgstr ""
 msgid "type not handled in pascal_type_print_varspec_suffix()"
 msgstr ""
 
-#: p-valprint.c:410
+#: p-valprint.c:413
 #, possible-c-format
 msgid "Invalid pascal type code %d in symbol table."
 msgstr ""
 
-#: p-valprint.c:458
+#: p-valprint.c:461
 #, possible-c-format
 msgid "Printing of pascal static members is %s.\n"
 msgstr ""
 
-#: p-valprint.c:897
+#: p-valprint.c:901
 msgid "Set printing of pascal static members."
 msgstr ""
 
-#: p-valprint.c:898
+#: p-valprint.c:902
 msgid "Show printing of pascal static members."
 msgstr ""
 
-#: python/py-cmd.c:128 python/py-cmd.c:248
+#: python/py-cmd.c:121 python/py-cmd.c:234
 msgid "Invalid invocation of Python command object."
 msgstr ""
 
-#: python/py-cmd.c:137
+#: python/py-cmd.c:129
 msgid "Python command object missing 'invoke' method."
 msgstr ""
 
-#: python/py-cmd.c:146
+#: python/py-cmd.c:139
 msgid "Could not convert arguments to Python string."
 msgstr ""
 
 #. An error occurred computing the string representation of the
 #. error message.  This is rare, but we should inform the user.
-#: python/py-cmd.c:174
+#: python/py-cmd.c:165
 msgid ""
 "An error occurred in a Python command\n"
 "and then another occurred computing the error message.\n"
 msgstr ""
 
-#: python/py-cmd.c:193
+#: python/py-cmd.c:184
 #, possible-c-format
 msgid "Error occurred in Python command: %s"
 msgstr ""
 
-#: python/py-cmd.c:195
+#: python/py-cmd.c:186
 msgid "Error occurred in Python command."
 msgstr ""
 
-#: python/py-cmd.c:257 python/py-cmd.c:262
+#: python/py-cmd.c:244 python/py-cmd.c:248
 msgid "Could not convert argument to Python string."
 msgstr ""
 
-#: python/py-cmd.c:444
+#: python/py-cmd.c:410
 msgid "No command name found."
 msgstr ""
 
-#: python/py-cmd.c:476
+#: python/py-cmd.c:442
 #, possible-c-format
 msgid "Could not find command prefix %s."
 msgstr ""
 
-#: python/py-cmd.c:490
+#: python/py-cmd.c:456
 #, possible-c-format
 msgid "'%s' is not a prefix command."
 msgstr ""
 
-#: python/py-cmd.c:537
+#: python/py-cmd.c:503
 msgid "Command object already initialized."
 msgstr ""
 
-#: python/py-cmd.c:553 python/py-param.c:677
+#: python/py-cmd.c:519 python/py-param.c:662
 msgid "Invalid command class argument."
 msgstr ""
 
-#: python/py-cmd.c:560
+#: python/py-cmd.c:526
 msgid "Invalid completion type argument."
 msgstr ""
 
@@ -20658,7 +20663,7 @@ msgstr ""
 msgid "Cannot delete `name' attribute."
 msgstr ""
 
-#: python/py-infthread.c:102
+#: python/py-infthread.c:104
 msgid "The value of `name' must be a string."
 msgstr ""
 
@@ -20666,117 +20671,117 @@ msgstr ""
 #. exception if it is invalid.
 #. Require that BREAKPOINT be a valid breakpoint ID; throw a Python
 #. exception if it is invalid.  This macro is for use in setter functions.
-#: python/python-internal.h:274 python/python-internal.h:284
+#: python/python-internal.h:283 python/python-internal.h:293
 #, possible-c-format
 msgid "Breakpoint %d is invalid."
 msgstr ""
 
-#: python/py-xmethods.c:457
+#: python/py-xmethods.c:387
 msgid ""
 "Arg type returned by the get_arg_types method of a debug method worker "
 "object is not a gdb.Type object."
 msgstr ""
 
-#: python/py-xmethods.c:476
+#: python/py-xmethods.c:406
 msgid ""
 "Arg type returned by the get_arg_types method of an xmethod worker object is "
 "not a gdb.Type object."
 msgstr ""
 
-#: python/py-xmethods.c:593
+#: python/py-xmethods.c:521
 msgid ""
 "Type returned by the get_result_type method of an xmethod worker object is "
 "not a gdb.Type object."
 msgstr ""
 
-#: python/py-xmethods.c:649 python/py-xmethods.c:657 python/py-xmethods.c:673
-#: python/py-xmethods.c:683 python/py-xmethods.c:693 python/python.c:360
-#: python/python.c:464 python/python.c:485 python/py-function.c:152
-#: python/py-prettyprint.c:668
+#: python/py-xmethods.c:571 python/py-xmethods.c:578 python/py-xmethods.c:592
+#: python/py-xmethods.c:603 python/py-xmethods.c:612 python/python.c:323
+#: python/python.c:416 python/python.c:432 python/py-function.c:141
+#: python/py-prettyprint.c:623
 msgid "Error while executing Python code."
 msgstr ""
 
 #. Require that OBJF be a valid objfile.
-#: python/py-objfile.c:66
+#: python/py-objfile.c:67
 msgid "Objfile no longer exists."
 msgstr ""
 
-#: python/py-objfile.c:263
+#: python/py-objfile.c:260
 msgid "Cannot delete the pretty_printers attribute."
 msgstr ""
 
-#: python/py-objfile.c:270
+#: python/py-objfile.c:267
 msgid "The pretty_printers attribute must be a list."
 msgstr ""
 
-#: python/py-objfile.c:304
+#: python/py-objfile.c:301
 msgid "Cannot delete the frame filters attribute."
 msgstr ""
 
-#: python/py-objfile.c:311
+#: python/py-objfile.c:308
 msgid "The frame_filters attribute must be a dictionary."
 msgstr ""
 
-#: python/py-objfile.c:346
+#: python/py-objfile.c:343
 msgid "Cannot delete the frame unwinders attribute."
 msgstr ""
 
-#: python/py-objfile.c:353
+#: python/py-objfile.c:350
 msgid "The frame_unwinders attribute must be a list."
 msgstr ""
 
-#: python/py-objfile.c:399
+#: python/py-objfile.c:396
 msgid "Cannot delete the type_printers attribute."
 msgstr ""
 
-#: python/py-objfile.c:406
+#: python/py-objfile.c:403
 msgid "The type_printers attribute must be a list."
 msgstr ""
 
-#: python/py-objfile.c:590
+#: python/py-objfile.c:586
 msgid "Not a valid build id."
 msgstr ""
 
-#: python/py-objfile.c:606
+#: python/py-objfile.c:602
 msgid "Objfile not found."
 msgstr ""
 
 #. Require a valid frame.  This must be called inside a TRY_CATCH, or
 #. another context in which a gdb exception is allowed.
-#: python/py-frame.c:54
+#: python/py-frame.c:55
 msgid "Frame is invalid."
 msgstr ""
 
-#: python/py-frame.c:279
+#: python/py-frame.c:273
 msgid "Unknown register."
 msgstr ""
 
-#: python/py-frame.c:318
+#: python/py-frame.c:312
 msgid "Cannot locate block for frame."
 msgstr ""
 
-#: python/py-frame.c:531 python/py-type.c:956
+#: python/py-frame.c:525 python/py-type.c:911
 msgid "Second argument must be block."
 msgstr ""
 
-#: python/py-frame.c:556
+#: python/py-frame.c:551
 #, possible-c-format
 msgid "Variable '%s' not found."
 msgstr ""
 
-#: python/py-frame.c:567
+#: python/py-frame.c:559
 msgid "Argument must be a symbol or string."
 msgstr ""
 
-#: python/py-frame.c:665
+#: python/py-frame.c:657
 msgid "Invalid frame stop reason."
 msgstr ""
 
-#: python/py-value.c:129
+#: python/py-value.c:130
 msgid "Value object creation takes only 1 argument"
 msgstr ""
 
-#: python/py-value.c:137
+#: python/py-value.c:138
 msgid "Could not allocate memory to create Value object."
 msgstr ""
 
@@ -20786,64 +20791,64 @@ msgid ""
 "nor a reference."
 msgstr ""
 
-#: python/py-value.c:508
+#: python/py-value.c:497
 msgid "Argument must be a type."
 msgstr ""
 
-#: python/py-value.c:569 python/py-value.c:1376 python/py-value.c:1418
+#: python/py-value.c:557 python/py-value.c:1367 python/py-value.c:1398
 msgid "Invalid operation on gdb.Value."
 msgstr ""
 
-#: python/py-value.c:592
+#: python/py-value.c:579
 msgid "'parent_type' attribute of gdb.Field object is not agdb.Type object."
 msgstr ""
 
-#: python/py-value.c:655
+#: python/py-value.c:637
 msgid "'type' attribute of gdb.Field object is not a gdb.Type object."
 msgstr ""
 
-#: python/py-value.c:691
+#: python/py-value.c:673
 msgid "Invalid lookup for a field not contained in the value."
 msgstr ""
 
-#: python/py-value.c:730
+#: python/py-value.c:706
 msgid "gdb.Field object has no name and no 'bitpos' attribute."
 msgstr ""
 
-#: python/py-value.c:790
+#: python/py-value.c:765
 msgid "Cannot subscript requested type."
 msgstr ""
 
-#: python/py-value.c:816
+#: python/py-value.c:789
 msgid "Setting of struct elements is not currently supported."
 msgstr ""
 
-#: python/py-value.c:845
+#: python/py-value.c:818
 msgid "Value is not callable (not TYPE_CODE_FUNC)."
 msgstr ""
 
-#: python/py-value.c:852
+#: python/py-value.c:825
 msgid "Inferior arguments must be provided in a tuple."
 msgstr ""
 
-#: python/py-value.c:1453
+#: python/py-value.c:1434
 msgid "Cannot convert value to int."
 msgstr ""
 
-#: python/py-value.c:1481
+#: python/py-value.c:1462
 msgid "Cannot convert value to long."
 msgstr ""
 
-#: python/py-value.c:1507
+#: python/py-value.c:1491
 msgid "Cannot convert value to float."
 msgstr ""
 
-#: python/py-value.c:1655
+#: python/py-value.c:1633
 #, possible-c-format
 msgid "Could not convert Python object: %S."
 msgstr ""
 
-#: python/py-value.c:1658
+#: python/py-value.c:1636
 #, possible-c-format
 msgid "Could not convert Python object: %s."
 msgstr ""
@@ -20853,123 +20858,123 @@ msgstr ""
 msgid "The value of the '%s' attribute is not a pointer."
 msgstr ""
 
-#: python/py-unwind.c:449
+#: python/py-unwind.c:442
 msgid "frame_id should have 'sp' attribute."
 msgstr ""
 
-#: python/py-unwind.c:567
+#: python/py-unwind.c:560
 msgid "A Unwinder should return gdb.UnwindInfo instance."
 msgstr ""
 
-#: python/py-unwind.c:665
+#: python/py-unwind.c:654
 msgid "Set Python unwinder debugging."
 msgstr ""
 
-#: python/py-unwind.c:666
+#: python/py-unwind.c:655
 msgid "Show Python unwinder debugging."
 msgstr ""
 
-#: python/py-unwind.c:667
+#: python/py-unwind.c:656
 msgid "When non-zero, Python unwinder debugging is enabled."
 msgstr ""
 
-#: python/py-type.c:526
+#: python/py-type.c:501
 msgid "Array bound must be an integer"
 msgstr ""
 
-#: python/py-type.c:613
+#: python/py-type.c:586
 msgid "This type does not have a range."
 msgstr ""
 
-#: python/py-type.c:689
+#: python/py-type.c:649
 msgid "Type does not have a target."
 msgstr ""
 
-#: python/py-type.c:880
+#: python/py-type.c:839
 msgid "Null type name."
 msgstr ""
 
-#: python/py-type.c:911
+#: python/py-type.c:868
 msgid "Type is not a template."
 msgstr ""
 
-#: python/py-type.c:924 python/py-type.c:981
+#: python/py-type.c:880 python/py-type.c:936
 #, possible-c-format
 msgid "No argument %d in template."
 msgstr ""
 
-#: python/py-type.c:992
+#: python/py-type.c:947
 msgid "Template argument is optimized out"
 msgstr ""
 
-#: python/py-type.c:1423
+#: python/py-type.c:1362
 msgid "'block' argument must be a Block."
 msgstr ""
 
-#: python/py-utils.c:98
+#: python/py-utils.c:56
 msgid "Expected a string or unicode object."
 msgstr ""
 
-#: python/py-utils.c:346
+#: python/py-utils.c:285
 msgid "Overflow converting to address."
 msgstr ""
 
-#: python/py-linetable.c:75
+#: python/py-linetable.c:76
 msgid "Symbol Table in line table is invalid."
 msgstr ""
 
-#: python/py-linetable.c:216 python/py-linetable.c:249
+#: python/py-linetable.c:206 python/py-linetable.c:237
 msgid "Linetable information not found in symbol table"
 msgstr ""
 
-#: python/python.c:226 python/python.c:1957
-msgid "internal error: Unhandled Python exception"
+#: python/python.c:213
+msgid "Python not initialized"
 msgstr ""
 
-#: python/python.c:254
-msgid "Python not initialized"
+#: python/python.c:233 python/python.c:1863
+msgid "internal error: Unhandled Python exception"
 msgstr ""
 
-#: python/python.c:404
+#: python/python.c:359
 #, possible-c-format
 msgid "Error while opening file: %s"
 msgstr ""
 
-#: python/python.c:456
+#: python/python.c:408
 msgid "Invalid \"python\" block structure."
 msgstr ""
 
-#: python/python.c:559
+#: python/python.c:505
 msgid "Programmer error: unhandled type."
 msgstr ""
 
-#: python/python.c:593
+#: python/python.c:539
 #, possible-c-format
 msgid "Could not find parameter `%s'."
 msgstr ""
 
-#: python/python.c:597
+#: python/python.c:543
 #, possible-c-format
 msgid "`%s' is not a parameter."
 msgstr ""
 
-#: python/python.c:984
+#: python/python.c:924
 msgid "Posted event is not callable"
 msgstr ""
 
-#: python/python.c:1076
+#: python/python.c:1012
 msgid "Return from prompt_hook must be either a Python string, or None"
 msgstr ""
 
-#: python/python.c:1242
+#: python/python.c:1173
 msgid "Error occurred computing Python errormessage.\n"
 msgstr ""
 
-#: python/python.c:1550
+#: python/python.c:1455
 msgid "Python scripting is not supported in this copy of GDB."
 msgstr ""
 
-#: python/python.c:1642
+#: python/python.c:1711
 msgid ""
 "Start an interactive Python prompt.\n"
 "\n"
@@ -20984,7 +20989,7 @@ msgid ""
 "    5\n"
 msgstr ""
 
-#: python/python.c:1656
+#: python/python.c:1725
 msgid ""
 "Start a Python interactive prompt.\n"
 "\n"
@@ -20992,7 +20997,7 @@ msgid ""
 "This command is only a placeholder."
 msgstr ""
 
-#: python/python.c:1667
+#: python/python.c:1736
 msgid ""
 "Evaluate a Python command.\n"
 "\n"
@@ -21005,7 +21010,7 @@ msgid ""
 "the end of the command."
 msgstr ""
 
-#: python/python.c:1678
+#: python/python.c:1747
 msgid ""
 "Evaluate a Python command.\n"
 "\n"
@@ -21013,21 +21018,21 @@ msgid ""
 "This command is only a placeholder."
 msgstr ""
 
-#: python/python.c:1689 python/python.c:1694
+#: python/python.c:1758 python/python.c:1763
 msgid "Prefix command for python preference settings."
 msgstr ""
 
-#: python/python.c:1699
+#: python/python.c:1768
 msgid "Set mode for Python stack dump on error."
 msgstr ""
 
-#: python/python.c:1700
+#: python/python.c:1769
 msgid "Show the mode of Python stack printing on error."
 msgstr ""
 
 #. This is passed in one call to warning so that blank lines aren't
 #. inserted between each line of text.
-#: python/python.c:1937
+#: python/python.c:1836
 #, possible-c-format
 msgid ""
 "\n"
@@ -21041,38 +21046,38 @@ msgstr ""
 msgid "Inferior no longer exists."
 msgstr ""
 
-#: python/py-inferior.c:634
+#: python/py-inferior.c:563
 #, possible-c-format
 msgid "Memory buffer for address %s, which is %s bytes long."
 msgstr ""
 
-#: python/py-inferior.c:666
+#: python/py-inferior.c:595
 msgid "The memory buffer supports only one segment."
 msgstr ""
 
-#: python/py-inferior.c:744
+#: python/py-inferior.c:674
 msgid "The pattern is not a Python buffer."
 msgstr ""
 
-#: python/py-inferior.c:762
+#: python/py-inferior.c:694
 msgid "Search range is empty."
 msgstr ""
 
-#: python/py-inferior.c:770
+#: python/py-inferior.c:702
 msgid "The search range is too large."
 msgstr ""
 
 #. Require a valid symbol.  All access to symbol_object->symbol should be
 #. gated by this call.
-#: python/py-symbol.c:47
+#: python/py-symbol.c:48
 msgid "Symbol is invalid."
 msgstr ""
 
-#: python/py-symbol.c:275
+#: python/py-symbol.c:276
 msgid "invalid frame"
 msgstr ""
 
-#: python/py-symbol.c:279
+#: python/py-symbol.c:280
 msgid "symbol requires a frame to compute its value"
 msgstr ""
 
@@ -21088,208 +21093,244 @@ msgstr ""
 msgid "Source block for iterator is invalid."
 msgstr ""
 
-#: python/py-block.c:323
+#: python/py-block.c:324
 msgid "Symbol is null."
 msgstr ""
 
-#: python/py-block.c:396
+#: python/py-block.c:397
 msgid "Cannot locate object file for block."
 msgstr ""
 
-#: python/py-function.c:86
+#: python/py-function.c:80
 msgid "No method named 'invoke' in object."
 msgstr ""
 
 #. An error occurred computing the string representation of the
 #. error message.  This is rare, but we should inform the user.
-#: python/py-function.c:113
+#: python/py-function.c:103
 msgid ""
 "An error occurred in a Python convenience function\n"
 "and then another occurred computing the error message.\n"
 msgstr ""
 
-#: python/py-function.c:133
+#: python/py-function.c:123
 #, possible-c-format
 msgid "Error occurred in Python convenience function: %s"
 msgstr ""
 
-#: python/py-function.c:136
+#: python/py-function.c:126
 msgid "Error occurred in Python convenience function."
 msgstr ""
 
-#: python/py-function.c:194
+#: python/py-function.c:177
 msgid "This function is not documented."
 msgstr ""
 
-#: python/py-framefilter.c:90
+#: python/py-framefilter.c:97
 msgid "Unexpected value.  Expecting a gdb.Symbol or a Python string."
 msgstr ""
 
-#: python/py-framefilter.c:579
+#: python/py-framefilter.c:548
 msgid "No symbol or value provided."
 msgstr ""
 
-#: python/py-framefilter.c:1227
+#: python/py-framefilter.c:1110
 msgid "FrameDecorator.function: expecting a String, integer or None."
 msgstr ""
 
+#: python/py-record.c:70 python/py-record.c:86 python/py-record.c:99
+#: python/py-record.c:112 python/py-record.c:125 python/py-record.c:138
+#: python/py-record.c:151 python/py-record.c:164
+msgid "Not implemented."
+msgstr ""
+
 #. Require a valid symbol table.  All access to symtab_object->symtab
 #. should be gated by this call.
-#: python/py-symtab.c:52
+#: python/py-symtab.c:53
 msgid "Symbol Table is invalid."
 msgstr ""
 
 #. Require a valid symbol table and line object.  All access to
 #. sal_object->sal should be gated by this call.
-#: python/py-symtab.c:83
+#: python/py-symtab.c:84
 msgid "Symbol Table and Line is invalid."
 msgstr ""
 
-#: python/py-breakpoint.c:123
+#: python/py-record-btrace.c:42 python/py-record-btrace.c:52
+#: python/py-record-btrace.c:871
+msgid "Empty branch trace."
+msgstr ""
+
+#: python/py-record-btrace.c:45 record-btrace.c:2787
+msgid "No such instruction."
+msgstr ""
+
+#: python/py-record-btrace.c:55
+msgid "No such call segment."
+msgstr ""
+
+#: python/py-record-btrace.c:572
+#, possible-c-format
+msgid "Index out of range: %zd."
+msgstr ""
+
+#: python/py-record-btrace.c:600
+msgid "Index must be int or slice."
+msgstr ""
+
+#: python/py-record-btrace.c:657
+msgid "Not in list."
+msgstr ""
+
+#: python/py-record-btrace.c:877
+msgid "Argument must be instruction."
+msgstr ""
+
+#: python/py-breakpoint.c:125
 msgid "Cannot delete `enabled' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:130
+#: python/py-breakpoint.c:132
 msgid "The value of `enabled' must be a boolean."
 msgstr ""
 
-#: python/py-breakpoint.c:166
+#: python/py-breakpoint.c:168
 msgid "Cannot delete `silent' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:172
+#: python/py-breakpoint.c:174
 msgid "The value of `silent' must be a boolean."
 msgstr ""
 
-#: python/py-breakpoint.c:197
+#: python/py-breakpoint.c:199
 msgid "Cannot delete `thread' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:208
+#: python/py-breakpoint.c:210
 msgid "Invalid thread ID."
 msgstr ""
 
-#: python/py-breakpoint.c:217
+#: python/py-breakpoint.c:219
 msgid "The value of `thread' must be an integer or None."
 msgstr ""
 
-#: python/py-breakpoint.c:239
+#: python/py-breakpoint.c:241
 msgid "Cannot delete `task' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:260
+#: python/py-breakpoint.c:262
 msgid "Invalid task ID."
 msgstr ""
 
-#: python/py-breakpoint.c:269
+#: python/py-breakpoint.c:271
 msgid "The value of `task' must be an integer or None."
 msgstr ""
 
-#: python/py-breakpoint.c:316
+#: python/py-breakpoint.c:318
 msgid "Cannot delete `ignore_count' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:322
+#: python/py-breakpoint.c:324
 msgid "The value of `ignore_count' must be an integer."
 msgstr ""
 
-#: python/py-breakpoint.c:356
+#: python/py-breakpoint.c:358
 msgid "Cannot delete `hit_count' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:369
+#: python/py-breakpoint.c:371
 msgid "The value of `hit_count' must be zero."
 msgstr ""
 
-#: python/py-breakpoint.c:451
+#: python/py-breakpoint.c:453
 msgid "Cannot delete `condition' attribute."
 msgstr ""
 
-#: python/py-breakpoint.c:692
+#: python/py-breakpoint.c:710
 msgid "Cannot understand watchpoint access type."
 msgstr ""
 
-#: python/py-breakpoint.c:696
+#: python/py-breakpoint.c:714
 msgid "Do not understand breakpoint type to set."
 msgstr ""
 
-#: python/py-breakpoint.c:891
+#: python/py-breakpoint.c:892
 msgid "Error while creating breakpoint from GDB."
 msgstr ""
 
-#: python/py-param.c:137
+#: python/py-param.c:138
 msgid "String required for filename."
 msgstr ""
 
-#: python/py-param.c:170
+#: python/py-param.c:169
 msgid "ENUM arguments must be a string."
 msgstr ""
 
-#: python/py-param.c:184
+#: python/py-param.c:183
 msgid "The value must be member of an enumeration."
 msgstr ""
 
-#: python/py-param.c:195
+#: python/py-param.c:194
 msgid "A boolean argument is required."
 msgstr ""
 
-#: python/py-param.c:208
+#: python/py-param.c:207
 msgid "A boolean or None is required"
 msgstr ""
 
-#: python/py-param.c:236
+#: python/py-param.c:235
 msgid "The value must be integer."
 msgstr ""
 
-#: python/py-param.c:261
+#: python/py-param.c:260
 msgid "Range exceeded."
 msgstr ""
 
-#: python/py-param.c:271
+#: python/py-param.c:270
 msgid "Unhandled type in parameter value."
 msgstr ""
 
-#: python/py-param.c:292
+#: python/py-param.c:291
 msgid "Cannot delete a parameter's value."
 msgstr ""
 
-#: python/py-param.c:349
+#: python/py-param.c:346
 msgid "Parameter must return a string value."
 msgstr ""
 
-#: python/py-param.c:576
+#: python/py-param.c:563
 msgid "An enumeration is required for PARAM_ENUM."
 msgstr ""
 
-#: python/py-param.c:583
+#: python/py-param.c:570
 msgid "The enumeration is not a sequence."
 msgstr ""
 
-#: python/py-param.c:593
+#: python/py-param.c:580
 msgid "The enumeration is empty."
 msgstr ""
 
-#: python/py-param.c:615
+#: python/py-param.c:600
 msgid "The enumeration item not a string."
 msgstr ""
 
-#: python/py-param.c:689
+#: python/py-param.c:674
 msgid "Invalid parameter class argument."
 msgstr ""
 
-#: python/py-param.c:696
+#: python/py-param.c:681
 msgid "Only PARAM_ENUM accepts a fourth argument."
 msgstr ""
 
-#: python/py-varobj.c:113
+#: python/py-varobj.c:109
 msgid "Invalid item from the child list"
 msgstr ""
 
-#: python/py-varobj.c:187
+#: python/py-varobj.c:178
 msgid "Null value returned for children"
 msgstr ""
 
-#: python/py-varobj.c:196
+#: python/py-varobj.c:185
 msgid "Could not get children iterator"
 msgstr ""
 
@@ -21306,20 +21347,20 @@ msgid "A lazy string's type cannot be NU
 msgstr ""
 
 #. Require a valid Architecture.
-#: python/py-arch.c:40
+#: python/py-arch.c:41
 msgid "Architecture is invalid."
 msgstr ""
 
-#: python/py-arch.c:153
+#: python/py-arch.c:154
 msgid "Argument 'end_pc' should be a (long) integer."
 msgstr ""
 
-#: python/py-arch.c:163
+#: python/py-arch.c:162
 msgid ""
 "Argument 'end_pc' should be greater than or equal to the argument 'start_pc'."
 msgstr ""
 
-#: python/py-arch.c:177
+#: python/py-arch.c:174
 msgid "Argument 'count' should be an non-negative integer."
 msgstr ""
 
@@ -21365,228 +21406,192 @@ msgstr ""
 msgid "Print the list of automatically loaded Python scripts, deprecated."
 msgstr ""
 
-#: python/py-finishbreakpoint.c:190 python/py-finishbreakpoint.c:213
+#: python/py-finishbreakpoint.c:187 python/py-finishbreakpoint.c:210
 msgid "Invalid ID for the `frame' object."
 msgstr ""
 
-#: python/py-finishbreakpoint.c:198
+#: python/py-finishbreakpoint.c:195
 msgid "\"FinishBreakpoint\" not meaningful in the outermost frame."
 msgstr ""
 
-#: python/py-finishbreakpoint.c:205
+#: python/py-finishbreakpoint.c:202
 msgid "\"FinishBreakpoint\" cannot be set on a dummy frame."
 msgstr ""
 
-#: python/py-finishbreakpoint.c:231
+#: python/py-finishbreakpoint.c:228
 msgid "No thread currently selected."
 msgstr ""
 
-#: python/py-finishbreakpoint.c:241
+#: python/py-finishbreakpoint.c:238
 msgid "The value of `internal' must be a boolean."
 msgstr ""
 
-#: python/py-prettyprint.c:560
+#: python/py-prettyprint.c:522
 msgid "Result of children iterator not a tuple of two elements."
 msgstr ""
 
-#: python/py-prettyprint.c:572
+#: python/py-prettyprint.c:533
 msgid "Bad result from children iterator.\n"
 msgstr ""
 
-#: python/py-prettyprint.c:860
+#: python/py-prettyprint.c:779
 msgid "Argument must be a gdb.Value."
 msgstr ""
 
-#: ravenscar-thread.c:394
+#: ravenscar-thread.c:393
 msgid "\"set ravenscar\" must be followed by the name of a setting.\n"
 msgstr ""
 
-#: ravenscar-thread.c:415
+#: ravenscar-thread.c:414
 msgid "Support for Ravenscar task/thread switching is enabled\n"
 msgstr ""
 
-#: ravenscar-thread.c:418
+#: ravenscar-thread.c:417
 msgid "Support for Ravenscar task/thread switching is disabled\n"
 msgstr ""
 
-#: ravenscar-thread.c:441
+#: ravenscar-thread.c:440
 msgid "Prefix command for changing Ravenscar-specific settings"
 msgstr ""
 
-#: ravenscar-thread.c:445
+#: ravenscar-thread.c:444
 msgid "Prefix command for showing Ravenscar-specific settings"
 msgstr ""
 
-#: ravenscar-thread.c:449
+#: ravenscar-thread.c:448
 msgid "Enable or disable support for GNAT Ravenscar tasks"
 msgstr ""
 
-#: ravenscar-thread.c:450
+#: ravenscar-thread.c:449
 msgid "Show whether support for GNAT Ravenscar tasks is enabled"
 msgstr ""
 
-#: ravenscar-thread.c:452
+#: ravenscar-thread.c:451
 msgid ""
 "Enable or disable support for task/thread switching with the GNAT\n"
 "Ravenscar run-time library for bareboard configuration."
 msgstr ""
 
-#: record-btrace.c:219
-msgid "Record btrace can't debug inferior in non-stop mode."
-msgstr ""
-
-#: record-btrace.c:335 record-btrace.c:351
+#: record-btrace.c:361 record-btrace.c:377
 #, possible-c-format
 msgid "Buffer size: %u%s.\n"
 msgstr ""
 
-#: record-btrace.c:360
+#: record-btrace.c:386
 #, possible-c-format
 msgid "Recording format: %s.\n"
 msgstr ""
 
-#: record-btrace.c:444
+#: record-btrace.c:456
 #, possible-c-format
 msgid ""
-"Recorded %u instructions in %u functions (%u gaps) for thread %d (%s).\n"
+"Recorded %u instructions in %u functions (%u gaps) for thread %s (%s).\n"
 msgstr ""
 
-#: record-btrace.c:449
+#: record-btrace.c:461
 #, possible-c-format
 msgid "Replay in progress.  At instruction %u.\n"
 msgstr ""
 
-#: record-btrace.c:477
-msgid "instruction overflow"
-msgstr ""
-
-#: record-btrace.c:481
-msgid "unknown instruction"
-msgstr ""
-
-#: record-btrace.c:492
-msgid "trace decode cancelled"
-msgstr ""
-
-#: record-btrace.c:497
-msgid "disabled"
-msgstr ""
-
-#: record-btrace.c:502
-msgid "overflow"
-msgstr ""
-
-#: record-btrace.c:514
+#: record-btrace.c:473
 msgid "["
 msgstr ""
 
-#: record-btrace.c:517
+#: record-btrace.c:477
 msgid "decode error ("
 msgstr ""
 
-#: record-btrace.c:519
+#: record-btrace.c:479
 msgid "): "
 msgstr ""
 
-#: record-btrace.c:522
+#: record-btrace.c:482
 msgid "]\n"
 msgstr ""
 
-#: record-btrace.c:599 record-btrace.c:731
+#: record-btrace.c:737 record-btrace.c:869
 msgid "Bad record instruction-history-size."
 msgstr ""
 
-#: record-btrace.c:659 record-btrace.c:1021
+#: record-btrace.c:797 record-btrace.c:1161
 msgid "At the start of the branch trace record.\n"
 msgstr ""
 
-#: record-btrace.c:661 record-btrace.c:1023
+#: record-btrace.c:799 record-btrace.c:1163
 msgid "At the end of the branch trace record.\n"
 msgstr ""
 
-#: record-btrace.c:692 record-btrace.c:695 record-btrace.c:1054
-#: record-btrace.c:1057
+#: record-btrace.c:830 record-btrace.c:833 record-btrace.c:1196
+#: record-btrace.c:1199
 msgid "Bad range."
 msgstr ""
 
-#: record-btrace.c:701 record-btrace.c:1063
+#: record-btrace.c:839 record-btrace.c:1205
 msgid "Range out of bounds."
 msgstr ""
 
-#: record-btrace.c:927
+#: record-btrace.c:1066
 msgid "\tinst "
 msgstr ""
 
-#: record-btrace.c:933
+#: record-btrace.c:1072
 msgid "\tat "
 msgstr ""
 
-#: record-btrace.c:958 record-btrace.c:1093
+#: record-btrace.c:1098 record-btrace.c:1237
 msgid "Bad record function-call-history-size."
 msgstr ""
 
-#: record-btrace.c:1298
-msgid "This record target does not allow writing registers."
+#: record-btrace.c:1470
+msgid "Cannot write registers while replaying."
 msgstr ""
 
-#: record-btrace.c:1464
+#: record-btrace.c:1640
 msgid "Registers are not available in btrace record history"
 msgstr ""
 
-#: record-btrace.c:1473
+#: record-btrace.c:1649
 msgid "No caller in btrace record history"
 msgstr ""
 
-#: record-btrace.c:1654
-msgid "Thread already moving."
-msgstr ""
-
-#: record-btrace.c:1807
-msgid "Cannot find thread to resume."
-msgstr ""
-
-#: record-btrace.c:1929
+#: record-btrace.c:2373
 msgid "invalid stepping type."
 msgstr ""
 
-#: record-btrace.c:2261
+#: record-btrace.c:2779
 msgid "Instruction number out of range."
 msgstr ""
 
-#: record-btrace.c:2267
-msgid "No such instruction."
-msgstr ""
-
-#: record-btrace.c:2452
+#: record-btrace.c:2986
 #, possible-c-format
 msgid "Replay memory access is %s.\n"
 msgstr ""
 
-#: record-btrace.c:2461
+#: record-btrace.c:2995
 msgid ""
 "\"set record btrace bts\" must be followed by an appropriate subcommand.\n"
 msgstr ""
 
-#: record-btrace.c:2480
+#: record-btrace.c:3014
 msgid ""
 "\"set record btrace pt\" must be followed by an appropriate subcommand.\n"
 msgstr ""
 
-#: record-btrace.c:2501
+#: record-btrace.c:3035
 #, possible-c-format
 msgid "The record/replay bts buffer size is %s.\n"
 msgstr ""
 
-#: record-btrace.c:2512
+#: record-btrace.c:3046
 #, possible-c-format
 msgid "The record/replay pt buffer size is %s.\n"
 msgstr ""
 
-#: record-btrace.c:2524
+#: record-btrace.c:3058
 msgid "Start branch trace recording."
 msgstr ""
 
-#: record-btrace.c:2529
+#: record-btrace.c:3063
 msgid ""
 "Start branch trace recording in Branch Trace Store (BTS) format.\n"
 "\n"
@@ -21594,30 +21599,30 @@ msgid ""
 "This format may not be available on all processors."
 msgstr ""
 
-#: record-btrace.c:2537
+#: record-btrace.c:3071
 msgid ""
-"Start branch trace recording in Intel(R) Processor Trace format.\n"
+"Start branch trace recording in Intel Processor Trace format.\n"
 "\n"
 "This format may not be available on all processors."
 msgstr ""
 
-#: record-btrace.c:2544 record.c:774 record-full.c:2823
+#: record-btrace.c:3078 record.c:817 record-full.c:2864
 msgid "Set record options"
 msgstr ""
 
-#: record-btrace.c:2548 record.c:778 record-full.c:2827
+#: record-btrace.c:3082 record.c:821 record-full.c:2868
 msgid "Show record options"
 msgstr ""
 
-#: record-btrace.c:2552
+#: record-btrace.c:3086
 msgid "Set what memory accesses are allowed during replay."
 msgstr ""
 
-#: record-btrace.c:2553
+#: record-btrace.c:3087
 msgid "Show what memory accesses are allowed during replay."
 msgstr ""
 
-#: record-btrace.c:2555
+#: record-btrace.c:3089
 msgid ""
 "Default is READ-ONLY.\n"
 "\n"
@@ -21630,23 +21635,23 @@ msgid ""
 "replay."
 msgstr ""
 
-#: record-btrace.c:2567
+#: record-btrace.c:3101
 msgid "Set record btrace bts options"
 msgstr ""
 
-#: record-btrace.c:2572
+#: record-btrace.c:3106
 msgid "Show record btrace bts options"
 msgstr ""
 
-#: record-btrace.c:2578
+#: record-btrace.c:3112
 msgid "Set the record/replay bts buffer size."
 msgstr ""
 
-#: record-btrace.c:2579
+#: record-btrace.c:3113
 msgid "Show the record/replay bts buffer size."
 msgstr ""
 
-#: record-btrace.c:2579
+#: record-btrace.c:3113
 msgid ""
 "When starting recording request a trace buffer of this size.  The actual "
 "buffer size may differ from the requested size.  Use \"info record\" to see "
@@ -21658,23 +21663,23 @@ msgid ""
 "The trace buffer size may not be changed while recording."
 msgstr ""
 
-#: record-btrace.c:2591
+#: record-btrace.c:3125
 msgid "Set record btrace pt options"
 msgstr ""
 
-#: record-btrace.c:2596
+#: record-btrace.c:3130
 msgid "Show record btrace pt options"
 msgstr ""
 
-#: record-btrace.c:2602
+#: record-btrace.c:3136
 msgid "Set the record/replay pt buffer size."
 msgstr ""
 
-#: record-btrace.c:2603
+#: record-btrace.c:3137
 msgid "Show the record/replay pt buffer size."
 msgstr ""
 
-#: record-btrace.c:2603
+#: record-btrace.c:3137
 msgid ""
 "Bigger buffers allow longer recording but also take more time to process the "
 "recorded execution.\n"
@@ -21694,134 +21699,142 @@ msgid ""
 "recording first."
 msgstr ""
 
-#: record.c:217
+#: record.c:104 record.c:111 record.c:122
+msgid "Invalid format."
+msgstr ""
+
+#: record.c:125
+msgid "Invalid method."
+msgstr ""
+
+#: record.c:259
 #, possible-c-format
 msgid "Debugging of process record target is %s.\n"
 msgstr ""
 
-#: record.c:239
+#: record.c:281
 msgid "Already at end of record list.\n"
 msgstr ""
 
-#: record.c:245
+#: record.c:287
 msgid "The current record target does not support this operation.\n"
 msgstr ""
 
-#: record.c:250
+#: record.c:292
 msgid ""
 "Delete the log from this point forward and begin to record the running "
 "message at current PC?"
 msgstr ""
 
-#: record.c:268
+#: record.c:310
 msgid "Process record is stopped and all execution logs are deleted.\n"
 msgstr ""
 
-#: record.c:279
+#: record.c:321
 msgid "\"set record\" must be followed by an apporpriate subcommand.\n"
 msgstr ""
 
-#: record.c:302
+#: record.c:344
 msgid "No record target is currently active.\n"
 msgstr ""
 
-#: record.c:306
+#: record.c:348
 #, possible-c-format
 msgid "Active record target: %s\n"
 msgstr ""
 
-#: record.c:340
+#: record.c:382
 msgid "Command requires an argument (insn number to go to)."
 msgstr ""
 
-#: record.c:474 record.c:612
+#: record.c:517 record.c:655
 #, possible-c-format
 msgid "Invalid modifier: %c."
 msgstr ""
 
-#: record.c:704
+#: record.c:747
 #, possible-c-format
 msgid "integer %u out of range"
 msgstr ""
 
-#: record.c:744
+#: record.c:787
 msgid "Set debugging of record/replay feature."
 msgstr ""
 
-#: record.c:745
+#: record.c:788
 msgid "Show debugging of record/replay feature."
 msgstr ""
 
-#: record.c:746
+#: record.c:789
 msgid "When enabled, debugging output for record/replay feature is displayed."
 msgstr ""
 
-#: record.c:752
+#: record.c:795
 msgid "Set number of instructions to print in \"record instruction-history\"."
 msgstr ""
 
-#: record.c:753
+#: record.c:796
 msgid "Show number of instructions to print in \"record instruction-history\"."
 msgstr ""
 
-#: record.c:754
+#: record.c:797
 msgid ""
 "A size of \"unlimited\" means unlimited instructions.  The default is 10."
 msgstr ""
 
-#: record.c:760
+#: record.c:803
 msgid "Set number of function to print in \"record function-call-history\"."
 msgstr ""
 
-#: record.c:761
+#: record.c:804
 msgid "Show number of functions to print in \"record function-call-history\"."
 msgstr ""
 
-#: record.c:762
+#: record.c:805
 msgid "A size of \"unlimited\" means unlimited lines.  The default is 10."
 msgstr ""
 
-#: record.c:768
+#: record.c:811
 msgid "Start recording."
 msgstr ""
 
-#: record.c:782
+#: record.c:825
 msgid "Info record options"
 msgstr ""
 
-#: record.c:787
+#: record.c:830
 msgid ""
 "Save the execution log to a file.\n"
 "Argument is optional filename.\n"
 "Default filename is 'gdb_record.<process_id>'."
 msgstr ""
 
-#: record.c:794
+#: record.c:837
 msgid "Delete the rest of execution log and start recording it anew."
 msgstr ""
 
-#: record.c:800
+#: record.c:843
 msgid "Stop the record/replay target."
 msgstr ""
 
-#: record.c:804
+#: record.c:847
 msgid ""
 "Restore the program to its state at instruction number N.\n"
 "Argument is instruction number, as shown by 'info record'."
 msgstr ""
 
-#: record.c:810
+#: record.c:853
 msgid "Go to the beginning of the execution log."
 msgstr ""
 
-#: record.c:815
+#: record.c:858
 msgid "Go to the end of the execution log."
 msgstr ""
 
-#: record.c:818
+#: record.c:861
 msgid ""
 "Print disassembled instructions stored in the execution log.\n"
-"With a /m modifier, source lines are included (if available).\n"
+"With a /m or /s modifier, source lines are included (if available).\n"
 "With a /r modifier, raw instructions in hex are included.\n"
 "With a /f modifier, function names are omitted.\n"
 "With a /p modifier, current position markers are omitted.\n"
@@ -21839,7 +21852,7 @@ msgid ""
 "instruction-history-size\"."
 msgstr ""
 
-#: record.c:838
+#: record.c:881
 msgid ""
 "Prints the execution history at function granularity.\n"
 "It prints one line for each sequence of instructions that belong to the same "
@@ -21861,201 +21874,201 @@ msgid ""
 "call-history-size\"."
 msgstr ""
 
-#: record-full.c:549
+#: record-full.c:546
 msgid ""
 "Do you want to auto delete previous execution log entries when record/replay "
 "buffer becomes full (record full stop-at-limit)?"
 msgstr ""
 
-#: record-full.c:557
+#: record-full.c:549
 msgid "Process record: stopped by user."
 msgstr ""
 
-#: record-full.c:628
+#: record-full.c:621
 msgid "Process record: inferior program stopped."
 msgstr ""
 
-#: record-full.c:630 record-full.c:1433 record-full.c:1442 record-full.c:1448
+#: record-full.c:623 record-full.c:1430 record-full.c:1439 record-full.c:1445
 msgid "Process record: failed to record execution log."
 msgstr ""
 
-#: record-full.c:749
+#: record-full.c:744
 #, possible-c-format
 msgid "Process record: error writing memory at addr = %s len = %d."
 msgstr ""
 
-#: record-full.c:832
+#: record-full.c:829
 msgid "Process record: the program is not being run."
 msgstr ""
 
-#: record-full.c:834
+#: record-full.c:831
 msgid "Process record target can't debug inferior in non-stop mode (non-stop)."
 msgstr ""
 
-#: record-full.c:838
+#: record-full.c:835
 msgid ""
 "Process record: the current architecture doesn't support record function."
 msgstr ""
 
-#: record-full.c:1476
+#: record-full.c:1473
 msgid ""
 "Because GDB is in replay mode, changing the value of a register will make "
 "the execution log unusable from this point onward.  Change all registers?"
 msgstr ""
 
-#: record-full.c:1482
+#: record-full.c:1479
 #, possible-c-format
 msgid ""
 "Because GDB is in replay mode, changing the value of a register will make "
 "the execution log unusable from this point onward.  Change register %s?"
 msgstr ""
 
-#: record-full.c:1504 record-full.c:1538
+#: record-full.c:1501 record-full.c:1535
 msgid "Process record canceled the operation."
 msgstr ""
 
 #. Let user choose if he wants to write memory or not.
-#: record-full.c:1534
+#: record-full.c:1531
 #, possible-c-format
 msgid ""
 "Because GDB is in replay mode, writing to memory will make the execution log "
 "unusable from this point onward.  Write memory at address %s?"
 msgstr ""
 
-#: record-full.c:1769 reverse.c:271
+#: record-full.c:1787 reverse.c:268
 #, possible-c-format
 msgid "Unbalanced quotes: %s"
 msgstr ""
 
-#: record-full.c:1794
+#: record-full.c:1820
 msgid "Replay mode:\n"
 msgstr ""
 
-#: record-full.c:1796
+#: record-full.c:1822
 msgid "Record mode:\n"
 msgstr ""
 
 #. Display instruction number for first instruction in the log.
-#: record-full.c:1808
+#: record-full.c:1834
 #, possible-c-format
 msgid "Lowest recorded instruction number is %s.\n"
 msgstr ""
 
-#: record-full.c:1813
+#: record-full.c:1839
 #, possible-c-format
 msgid "Current instruction number is %s.\n"
 msgstr ""
 
 #. Display instruction number for last instruction in the log.
-#: record-full.c:1817
+#: record-full.c:1843
 #, possible-c-format
 msgid "Highest recorded instruction number is %s.\n"
 msgstr ""
 
 #. Display log count.
-#: record-full.c:1821
+#: record-full.c:1847
 #, possible-c-format
 msgid "Log contains %u instructions.\n"
 msgstr ""
 
-#: record-full.c:1825
+#: record-full.c:1851
 msgid "No instructions have been logged.\n"
 msgstr ""
 
 #. Display max log size.
-#: record-full.c:1828
+#: record-full.c:1854
 #, possible-c-format
 msgid "Max logged instructions is %u.\n"
 msgstr ""
 
-#: record-full.c:1854
+#: record-full.c:1892
 msgid "Target insn not found."
 msgstr ""
 
-#: record-full.c:1856
+#: record-full.c:1894
 msgid "Already at target insn."
 msgstr ""
 
-#: record-full.c:1859
+#: record-full.c:1897
 #, possible-c-format
 msgid "Go forward to insn number %s\n"
 msgstr ""
 
-#: record-full.c:1865
+#: record-full.c:1903
 #, possible-c-format
 msgid "Go backward to insn number %s\n"
 msgstr ""
 
-#: record-full.c:2032 record-full.c:2126 target.c:572
+#: record-full.c:2083 record-full.c:2175 target.c:607
 msgid "You can't do that without a process to debug."
 msgstr ""
 
-#: record-full.c:2265
+#: record-full.c:2317
 #, possible-c-format
 msgid "Failed to read %d bytes from core file %s ('%s')."
 msgstr ""
 
-#: record-full.c:2337
+#: record-full.c:2389
 #, possible-c-format
 msgid "Version mis-match or file format error in core file %s."
 msgstr ""
 
-#: record-full.c:2442
+#: record-full.c:2494
 #, possible-c-format
 msgid "Bad entry type in core file %s."
 msgstr ""
 
-#: record-full.c:2463
+#: record-full.c:2515
 #, possible-c-format
 msgid "Auto increase record/replay buffer limit to %u."
 msgstr ""
 
 #. Succeeded.
-#: record-full.c:2468
+#: record-full.c:2520
 #, possible-c-format
 msgid "Restored records from core file %s.\n"
 msgstr ""
 
-#: record-full.c:2484
+#: record-full.c:2536
 #, possible-c-format
 msgid "Failed to write %d bytes to core file %s ('%s')."
 msgstr ""
 
-#: record-full.c:2581
+#: record-full.c:2622
 #, possible-c-format
 msgid "Failed to create 'precord' section for corefile %s: %s"
 msgstr ""
 
 #. Succeeded.
-#: record-full.c:2712
+#: record-full.c:2753
 #, possible-c-format
 msgid "Saved core file %s with execution log.\n"
 msgstr ""
 
-#: record-full.c:2773
+#: record-full.c:2814
 msgid "\"set record full\" must be followed by an apporpriate subcommand.\n"
 msgstr ""
 
-#: record-full.c:2807
+#: record-full.c:2848
 msgid "Start full execution recording."
 msgstr ""
 
-#: record-full.c:2811
+#: record-full.c:2852
 msgid ""
 "Restore the execution log from a file.\n"
 "Argument is filename.  File must be created with 'record save'."
 msgstr ""
 
-#: record-full.c:2832
+#: record-full.c:2873
 msgid "Set whether record/replay stops when record/replay buffer becomes full."
 msgstr ""
 
-#: record-full.c:2833
+#: record-full.c:2874
 msgid ""
 "Show whether record/replay stops when record/replay buffer becomes full."
 msgstr ""
 
-#: record-full.c:2835
+#: record-full.c:2876
 msgid ""
 "Default is ON.\n"
 "When ON, if the record/replay buffer becomes full, ask user what to do.\n"
@@ -22063,82 +22076,82 @@ msgid ""
 "delete the oldest recorded instruction to make room for each new one."
 msgstr ""
 
-#: record-full.c:2852
+#: record-full.c:2893
 msgid "Set record/replay buffer limit."
 msgstr ""
 
-#: record-full.c:2853
+#: record-full.c:2894
 msgid "Show record/replay buffer limit."
 msgstr ""
 
-#: record-full.c:2853
+#: record-full.c:2894
 msgid ""
 "Set the maximum number of instructions to be stored in the\n"
 "record/replay buffer.  A value of either \"unlimited\" or zero means no\n"
 "limit.  Default is 200000."
 msgstr ""
 
-#: record-full.c:2870
+#: record-full.c:2911
 msgid ""
 "Set whether query if PREC cannot record memory change of next instruction."
 msgstr ""
 
-#: record-full.c:2872
+#: record-full.c:2913
 msgid ""
 "Show whether query if PREC cannot record memory change of next instruction."
 msgstr ""
 
-#: record-full.c:2874
+#: record-full.c:2915
 msgid ""
 "Default is OFF.\n"
 "When ON, query if PREC cannot record memory change of next instruction."
 msgstr ""
 
-#: regcache.c:1190
+#: regcache.c:1233
 msgid "PC register is not available"
 msgstr ""
 
-#: regcache.c:1196
+#: regcache.c:1239
 msgid "regcache_read_pc: Unable to find PC"
 msgstr ""
 
-#: regcache.c:1212
+#: regcache.c:1255
 msgid "regcache_write_pc: Unable to update PC"
 msgstr ""
 
-#: regcache.c:1226
+#: regcache.c:1269
 msgid "Register cache flushed.\n"
 msgstr ""
 
-#: regcache.c:1520
+#: regcache.c:1560
 msgid "Force gdb to flush its register cache (maintainer command)"
 msgstr ""
 
-#: regcache.c:1523
+#: regcache.c:1563
 msgid ""
 "Print the internal register configuration.\n"
 "Takes an optional file parameter."
 msgstr ""
 
-#: regcache.c:1527
+#: regcache.c:1567
 msgid ""
 "Print the internal register configuration including raw values.\n"
 "Takes an optional file parameter."
 msgstr ""
 
-#: regcache.c:1532
+#: regcache.c:1572
 msgid ""
 "Print the internal register configuration including cooked values.\n"
 "Takes an optional file parameter."
 msgstr ""
 
-#: regcache.c:1537
+#: regcache.c:1577
 msgid ""
 "Print the internal register configuration including each register's group.\n"
 "Takes an optional file parameter."
 msgstr ""
 
-#: regcache.c:1542
+#: regcache.c:1582
 msgid ""
 "Print the internal register configuration including each register's\n"
 "remote register number and buffer offset in the g/G packets.\n"
@@ -22149,7 +22162,7 @@ msgstr ""
 msgid "maintenance print reggroups"
 msgstr ""
 
-#: reggroups.c:317
+#: reggroups.c:315
 msgid ""
 "Print the internal register group names.\n"
 "Takes an optional file parameter."
@@ -22157,120 +22170,115 @@ msgstr ""
 
 #. malformed packet error
 #. general case:
-#: remote.c:475
+#: remote.c:566
 msgid "remote.c: error in outgoing packet."
 msgstr ""
 
-#: remote.c:477
+#: remote.c:568
 #, possible-c-format
 msgid "remote.c: error in outgoing packet at field #%ld."
 msgstr ""
 
-#: remote.c:480
+#: remote.c:571
 #, possible-c-format
 msgid "Target returns error code '%s'."
 msgstr ""
 
-#: remote.c:509
+#: remote.c:600
 #, possible-c-format
 msgid "invalid qRelocInsn packet: %s"
 msgstr ""
 
-#: remote.c:538
+#: remote.c:629
 msgid "warning: relocating instruction: "
 msgstr ""
 
-#: remote.c:803
+#: remote.c:954
 msgid ""
 "Send the ASCII ETX character (Ctrl-c) to the remote target to interrupt the "
 "execution of the program.\n"
 msgstr ""
 
-#: remote.c:808
+#: remote.c:959
 msgid ""
 "send a break signal to the remote target to interrupt the execution of the "
 "program.\n"
 msgstr ""
 
-#: remote.c:812
+#: remote.c:963
 msgid ""
 "Send a break signal and 'g' a.k.a. Magic SysRq g to the remote target to "
 "interrupt the execution of Linux kernel.\n"
 msgstr ""
 
-#: remote.c:817 remote.c:3426
+#: remote.c:968 remote.c:3752
 #, possible-c-format
 msgid "Invalid value for interrupt_sequence_mode: %s."
 msgstr ""
 
-#: remote.c:956
+#: remote.c:1099
 msgid "Argument required (integer, `fixed' or `limited')."
 msgstr ""
 
-#: remote.c:969
+#: remote.c:1112
 #, possible-c-format
 msgid "Invalid %s (bad syntax)."
 msgstr ""
 
-#: remote.c:976
-#, possible-c-format
-msgid "Invalid %s (too large)."
-msgstr ""
-
-#: remote.c:982
+#: remote.c:1126
 #, possible-c-format
 msgid ""
 "The target may not be able to correctly handle a %s\n"
 "of %ld bytes. Change the packet size? "
 msgstr ""
 
-#: remote.c:985
+#: remote.c:1129
 msgid "Packet size not changed."
 msgstr ""
 
-#: remote.c:995
+#: remote.c:1139
 #, possible-c-format
 msgid "The %s is %ld. "
 msgstr ""
 
-#: remote.c:997
+#: remote.c:1141
 #, possible-c-format
 msgid "Packets are fixed at %ld bytes.\n"
 msgstr ""
 
-#: remote.c:1000
+#: remote.c:1144
 #, possible-c-format
 msgid "Packets are limited to %ld bytes.\n"
 msgstr ""
 
-#: remote.c:1118
+#: remote.c:1262
 #, possible-c-format
 msgid "Support for the `%s' packet is auto-detected, currently %s.\n"
 msgstr ""
 
-#: remote.c:1124
+#: remote.c:1268
 #, possible-c-format
 msgid "Support for the `%s' packet is currently %s.\n"
 msgstr ""
 
-#: remote.c:1203
+#: remote.c:1347
 msgid "packet_ok: attempt to use a disabled packet"
 msgstr ""
 
 #. If the stub previously indicated that the packet was
 #. supported then there is a protocol error.
-#: remote.c:1227
+#: remote.c:1371
 #, possible-c-format
 msgid "Protocol error: %s (%s) conflicting enabled responses."
 msgstr ""
 
 #. The user set it wrong.
-#: remote.c:1233
+#: remote.c:1377
 #, possible-c-format
 msgid "Enabled packet %s (%s) not recognized by stub"
 msgstr ""
 
-#: remote.c:1431
+#: remote.c:1591
 #, possible-c-format
 msgid "Could not find config for %s"
 msgstr ""
@@ -22279,42 +22287,39 @@ msgstr ""
 #. We're out of sync with the target now.  Did it continue
 #. or not?  We can't tell which thread it was in non-stop,
 #. so just ignore this.
-#. Error of some sort.
-#. We're out of sync with the target now.  Did it continue or
-#. not?  Not is more likely, so report a stop.
-#: remote.c:1583 remote.c:3111 remote.c:3138 remote.c:3260 remote.c:4267
-#: remote.c:6184 remote.c:6291 remote.c:7537 remote.c:8955
+#: remote.c:1767 remote.c:3453 remote.c:3480 remote.c:3601 remote.c:4813
+#: remote.c:7271 remote.c:7371 remote.c:8667 remote.c:10067 remote.c:13784
 #, possible-c-format
 msgid "Remote failure reply: %s"
 msgstr ""
 
-#: remote.c:2149
+#: remote.c:2456
 #, possible-c-format
 msgid "invalid remote ptid: %s"
 msgstr ""
 
-#: remote.c:2423
+#: remote.c:2738
 msgid "Incomplete response to threadinfo request."
 msgstr ""
 
 #. This is an answer to a different request.
-#: remote.c:2426
+#: remote.c:2741
 msgid "ERROR RMT Thread info mismatch."
 msgstr ""
 
-#: remote.c:2440
+#: remote.c:2755
 msgid "ERROR RMT: threadinfo tag mismatch."
 msgstr ""
 
-#: remote.c:2448
+#: remote.c:2763
 msgid "ERROR RMT: length of threadid is not 16."
 msgstr ""
 
-#: remote.c:2463
+#: remote.c:2778
 msgid "ERROR RMT: 'exists' length too long."
 msgstr ""
 
-#: remote.c:2487
+#: remote.c:2802
 msgid "ERROR RMT: unknown thread info tag."
 msgstr ""
 
@@ -22326,807 +22331,870 @@ msgstr ""
 #. exit
 #. wait for packet, then exit
 #.
-#: remote.c:2595
+#: remote.c:2910
 msgid "HMM: threadlist did not echo arg thread, dropping it."
 msgstr ""
 
-#: remote.c:2602
+#: remote.c:2917
 msgid "RMT ERROR : failed to get remote thread list."
 msgstr ""
 
-#: remote.c:2610
+#: remote.c:2925
 msgid "RMT ERROR: threadlist response longer than requested."
 msgstr ""
 
-#: remote.c:2638
+#: remote.c:2953
 msgid "Remote fetch threadlist -infinite loop-."
 msgstr ""
 
-#: remote.c:2848
+#: remote.c:3188
 msgid "threads"
 msgstr ""
 
-#: remote.c:3028
+#: remote.c:3370
 msgid "remote_threads_extra_info"
 msgstr ""
 
-#: remote.c:3295 remote.c:3322
+#: remote.c:3636 remote.c:3663
 #, possible-c-format
 msgid "Target reported unsupported offsets: %s"
 msgstr ""
 
-#: remote.c:3320
+#: remote.c:3661
 #, possible-c-format
 msgid "Malformed response to offset query, %s"
 msgstr ""
 
-#: remote.c:3368
+#: remote.c:3709
 msgid "Can not handle qOffsets TextSeg response with this symbol file"
 msgstr ""
 
-#: remote.c:3614
+#: remote.c:4097
+#, possible-c-format
+msgid "Remote replied unexpectedly to '%s': %s"
+msgstr ""
+
+#: remote.c:4150
 msgid "Non-stop mode requested, but remote does not support non-stop"
 msgstr ""
 
-#: remote.c:3621
+#: remote.c:4157
 #, possible-c-format
 msgid "Remote refused setting non-stop mode with: %s"
 msgstr ""
 
-#: remote.c:3637
+#: remote.c:4173
 #, possible-c-format
 msgid "Remote refused setting all-stop mode with: %s"
 msgstr ""
 
-#: remote.c:3664 remote.c:3775
+#: remote.c:4196 remote.c:4305
 msgid "The target is not running (try extended-remote?)"
 msgstr ""
 
-#: remote.c:3791
-msgid "remote didn't report the current thread in non-stop mode"
-msgstr ""
-
-#: remote.c:3817
+#: remote.c:4342
 msgid "Trace is already running on the target.\n"
 msgstr ""
 
-#: remote.c:3957
+#: remote.c:4491
 msgid ""
 "The remote protocol may be unreliable over UDP.\n"
 "Some events may be lost, rendering further debugging impossible."
 msgstr ""
 
-#: remote.c:3993
+#: remote.c:4527
 #, possible-c-format
 msgid "Remote refused setting permissions with: %s"
 msgstr ""
 
-#: remote.c:4030
+#: remote.c:4564
 #, possible-c-format
 msgid "Remote qSupported response supplied an unexpected value for \"%s\"."
 msgstr ""
 
-#: remote.c:4052
+#: remote.c:4586
 #, possible-c-format
 msgid "Remote target reported \"%s\" without a size."
 msgstr ""
 
-#: remote.c:4061
+#: remote.c:4595
 #, possible-c-format
 msgid "Remote target reported \"%s\" with a bad size: \"%s\"."
 msgstr ""
 
-#: remote.c:4068
-#, possible-c-format
-msgid "limiting remote suggested packet size (%d bytes) to %d"
-msgstr ""
-
-#: remote.c:4297
+#: remote.c:4843
 msgid "empty item in \"qSupported\" response"
 msgstr ""
 
-#: remote.c:4328
+#: remote.c:4874
 #, possible-c-format
 msgid "unrecognized item \"%s\" in \"qSupported\" response"
 msgstr ""
 
-#: remote.c:4384
+#: remote.c:4950
+msgid ""
+"The target is not responding to GDB commands.\n"
+"Stop debugging it? "
+msgstr ""
+
+#: remote.c:4979 remote.c:6252
+msgid "Disconnected from target."
+msgstr ""
+
+#: remote.c:4989
 msgid ""
 "To open a remote debug connection, you need to specify what\n"
 "serial device is attached to the remote system\n"
 "(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.)."
 msgstr ""
 
-#: remote.c:4398
+#: remote.c:5003
 msgid "Already connected to a remote target.  Disconnect? "
 msgstr ""
 
-#: remote.c:4399
+#: remote.c:5004
 msgid "Still connected."
 msgstr ""
 
-#: remote.c:4554
+#: remote.c:5164
 msgid "Remote doesn't know how to detach"
 msgstr ""
 
-#: remote.c:4556
+#: remote.c:5166
 msgid "Can't detach process."
 msgstr ""
 
-#: remote.c:4574 remote-mips.c:1744
+#: remote.c:5184
 msgid "Argument given to \"detach\" when remotely debugging."
 msgstr ""
 
-#: remote.c:4577
+#: remote.c:5187
 msgid "No process to detach from."
 msgstr ""
 
-#: remote.c:4593
+#: remote.c:5196
 msgid "Ending remote debugging.\n"
 msgstr ""
 
-#: remote.c:4668
+#: remote.c:5289
 msgid "Argument given to \"disconnect\" when remotely debugging."
 msgstr ""
 
-#: remote.c:4696 remote.c:4732
+#: remote.c:5318 remote.c:5354
 msgid "This target does not support attaching to a process"
 msgstr ""
 
-#: remote.c:4727
+#: remote.c:5349
 #, possible-c-format
 msgid "Attaching to %s failed with: %s"
 msgstr ""
 
-#: remote.c:4734
+#: remote.c:5356
 #, possible-c-format
 msgid "Attaching to %s failed"
 msgstr ""
 
-#: remote.c:5040
-#, possible-c-format
-msgid "Unexpected vCont reply in non-stop mode: %s"
-msgstr ""
-
-#: remote.c:5085
+#: remote.c:5632
 #, possible-c-format
 msgid " - Can't pass signal %d to target in reverse: ignored."
 msgstr ""
 
-#: remote.c:5089
+#: remote.c:5636
 msgid "Remote reverse-step not supported."
 msgstr ""
 
-#: remote.c:5091
+#: remote.c:5638
 msgid "Remote reverse-continue not supported."
 msgstr ""
 
-#: remote.c:5232
+#: remote.c:5734 remote.c:5861
+#, possible-c-format
+msgid "Unexpected vCont reply in non-stop mode: %s"
+msgstr ""
+
+#: remote.c:6097
 msgid "Remote server does not support stopping threads"
 msgstr ""
 
-#: remote.c:5265
+#: remote.c:6130
 #, possible-c-format
 msgid "Stopping %s failed: %s"
 msgstr ""
 
+#: remote.c:6178
+msgid "No support for interrupting the remote target."
+msgstr ""
+
+#: remote.c:6180
+#, possible-c-format
+msgid "Interrupting target failed: %s"
+msgstr ""
+
+#: remote.c:6248
+msgid ""
+"The target is not responding to interrupt requests.\n"
+"Stop debugging it? "
+msgstr ""
+
+#: remote.c:6257
+msgid ""
+"Interrupted while waiting for the program.\n"
+"Give up waiting? "
+msgstr ""
+
 #. We got an unknown stop reply.
-#: remote.c:5460
+#: remote.c:6389
 msgid "Unknown stop reply"
 msgstr ""
 
-#: remote.c:5827
+#: remote.c:6838
 #, possible-c-format
 msgid ""
 "Malformed packet(a) (missing colon): %s\n"
 "Packet: '%s'\n"
 msgstr ""
 
-#: remote.c:5831
+#: remote.c:6842
 #, possible-c-format
 msgid ""
 "Malformed packet(a) (missing register number): %s\n"
 "Packet: '%s'\n"
 msgstr ""
 
-#: remote.c:5859
+#: remote.c:6886
 msgid "Unexpected swbreak stop reason"
 msgstr ""
 
-#: remote.c:5873
+#: remote.c:6900
 msgid "Unexpected hwbreak stop reason"
 msgstr ""
 
-#: remote.c:5928
+#: remote.c:6992
 #, possible-c-format
 msgid ""
 "Remote sent bad register number %s: %s\n"
 "Packet: '%s'\n"
 msgstr ""
 
-#: remote.c:5941
+#: remote.c:7005
 #, possible-c-format
 msgid "Remote reply is too short: %s"
 msgstr ""
 
-#: remote.c:5954
+#: remote.c:7018
 #, possible-c-format
 msgid ""
 "Remote register badly formatted: %s\n"
 "here: %s"
 msgstr ""
 
-#: remote.c:6022 remote.c:6025
+#: remote.c:7048
+#, possible-c-format
+msgid "stop reply packet badly formatted: %s"
+msgstr ""
+
+#: remote.c:7099 remote.c:7102
 #, possible-c-format
 msgid "unknown stop reply packet: %s"
 msgstr ""
 
-#: remote.c:6032
+#: remote.c:7113
 #, possible-c-format
 msgid "No process or thread specified in stop reply: %s"
 msgstr ""
 
-#: remote.c:6190 remote.c:6337
+#: remote.c:7277 remote.c:7422
 #, possible-c-format
 msgid "Invalid remote reply: %s"
 msgstr ""
 
-#: remote.c:6424
+#: remote.c:7510
 #, possible-c-format
 msgid "Could not fetch register \"%s\"; remote failure reply '%s'"
 msgstr ""
 
-#: remote.c:6443
+#: remote.c:7529
 msgid "fetch_register_using_p: early buf termination"
 msgstr ""
 
-#: remote.c:6481
+#: remote.c:7567
 #, possible-c-format
 msgid "Remote 'g' packet reply is of odd length: %s"
 msgstr ""
 
-#: remote.c:6500
+#: remote.c:7586
 #, possible-c-format
 msgid "Remote 'g' packet reply is too long: %s"
 msgstr ""
 
-#: remote.c:6543 remote.c:6561
+#: remote.c:7613
+#, possible-c-format
+msgid "Truncated register %d in remote 'g' packet"
+msgstr ""
+
+#: remote.c:7642 remote.c:7661
 msgid "unexpected end of 'g' packet reply"
 msgstr ""
 
-#: remote.c:6603
+#: remote.c:7703
 msgid "could not set remote traceframe"
 msgstr ""
 
-#: remote.c:6711
+#: remote.c:7810
 #, possible-c-format
 msgid "Could not write register \"%s\"; remote failure reply '%s'"
 msgstr ""
 
-#: remote.c:6716 remote.c:8261
+#: remote.c:7815 remote.c:9402
 msgid "Bad result from packet_ok"
 msgstr ""
 
-#: remote.c:6757
+#: remote.c:7856
 #, possible-c-format
 msgid "Could not write registers; remote failure reply '%s'"
 msgstr ""
 
-#: remote.c:6993
+#: remote.c:8092
 msgid "remote_write_bytes_aux: bad packet format"
 msgstr ""
 
-#: remote.c:7039
+#: remote.c:8142
 msgid "minimum packet size too small to write data"
 msgstr ""
 
-#: remote.c:7154
+#: remote.c:8257
 msgid "remote_write_bytes: bad internal state"
 msgstr ""
 
-#: remote.c:7362
+#: remote.c:8466
 msgid "Too long remote packet."
 msgstr ""
 
-#: remote.c:7365 remote.c:9598
+#: remote.c:8469 remote.c:10714
 msgid "Communication problem with target."
 msgstr ""
 
-#: remote.c:7404
+#: remote.c:8508
 msgid "Remote target does not support flash erase"
 msgstr ""
 
-#: remote.c:7406
+#: remote.c:8510
 msgid "Error erasing flash with vFlashErase packet"
 msgstr ""
 
-#: remote.c:7447
+#: remote.c:8551
 msgid "Remote target does not support vFlashDone"
 msgstr ""
 
-#: remote.c:7449
+#: remote.c:8553
 msgid "Error finishing flash operation"
 msgstr ""
 
-#: remote.c:7497 remote-m32r-sdi.c:723 remote-m32r-sdi.c:729
-#: remote-m32r-sdi.c:745
+#: remote.c:8614
 msgid "Remote connection closed"
 msgstr ""
 
-#: remote.c:7500 remote.c:7519
+#: remote.c:8617 remote.c:8644
 msgid "Remote communication error.  Target disconnected."
 msgstr ""
 
-#: remote.c:7606
+#: remote.c:8729
 msgid ""
 "Cannot execute this command while the target is running.\n"
 "Use the \"interrupt\" command to stop the target\n"
 "and then try again."
 msgstr ""
 
-#: remote.c:7934
+#: remote.c:9064
 #, possible-c-format
 msgid "Invalid run length encoding: %s\n"
 msgstr ""
 
-#: remote.c:8043
+#: remote.c:9170
 msgid "Watchdog timeout has expired.  Target detached."
 msgstr ""
 
 #. We have tried hard enough, and just can't receive the
 #. packet/notification.  Give up.
-#: remote.c:8065
+#: remote.c:9192
 msgid "Ignoring packet error, continuing...\n"
 msgstr ""
 
-#: remote.c:8160 remote.c:8190
+#: remote.c:9290 remote.c:9320
 #, possible-c-format
 msgid "Can't kill fork child process %d"
 msgstr ""
 
-#: remote.c:8296
+#: remote.c:9376
 msgid "Can't kill process"
 msgstr ""
 
-#: remote.c:8388
+#: remote.c:9523
 msgid "Target does not support QDisableRandomization."
 msgstr ""
 
-#: remote.c:8390
+#: remote.c:9525
 #, possible-c-format
 msgid "Bogus QDisableRandomization reply from target: %s"
 msgstr ""
 
-#: remote.c:8408
+#: remote.c:9544
 msgid "Remote file name too long for run packet"
 msgstr ""
 
-#: remote.c:8424
+#: remote.c:9560
 msgid "Argument list too long for run packet"
 msgstr ""
 
-#: remote.c:8446
+#: remote.c:9582
 msgid ""
 "Running the default executable on the remote target failed; try \"set remote "
 "exec-file\"?"
 msgstr ""
 
-#: remote.c:8449
+#: remote.c:9585
 #, possible-c-format
 msgid "Running \"%s\" on the remote target failed"
 msgstr ""
 
-#: remote.c:8487
+#: remote.c:9624
 msgid "Remote target does not support \"set remote exec-file\""
 msgstr ""
 
-#: remote.c:8489
+#: remote.c:9626
 msgid "Remote target does not support \"set args\" or run <ARGS>"
 msgstr ""
 
-#: remote.c:8643
+#: remote.c:9763
 msgid "Target doesn't support breakpoints that have target side commands."
 msgstr ""
 
-#: remote.c:8700
+#: remote.c:9821
 #, possible-c-format
 msgid "hw_bp_to_z: bad watchpoint type %d"
 msgstr ""
 
-#: remote.c:8741
+#: remote.c:9861
 msgid "remote_insert_watchpoint: reached end of function"
 msgstr ""
 
-#: remote.c:8789
+#: remote.c:9908
 msgid "remote_remove_watchpoint: reached end of function"
 msgstr ""
 
-#: remote.c:8966
+#: remote.c:10076
 msgid "remote_insert_hw_breakpoint: reached end of function"
 msgstr ""
 
-#: remote.c:9007
+#: remote.c:10117
 msgid "remote_remove_hw_breakpoint: reached end of function"
 msgstr ""
 
-#: remote.c:9077
+#: remote.c:10187
 msgid "command cannot be used without an exec file"
 msgstr ""
 
-#: remote.c:9114
+#: remote.c:10224
 #, possible-c-format
 msgid "target memory fault, section %s, range %s -- %s"
 msgstr ""
 
-#: remote.c:9132
+#: remote.c:10242
 msgid ""
 "One or more sections of the target image does not match\n"
 "the loaded file\n"
 msgstr ""
 
-#: remote.c:9135
+#: remote.c:10245
 #, possible-c-format
 msgid "No loaded section named '%s'.\n"
 msgstr ""
 
-#: remote.c:9235
+#: remote.c:10345
 #, possible-c-format
 msgid "Unknown remote qXfer reply: %s"
 msgstr ""
 
-#: remote.c:9241
+#: remote.c:10351
 msgid "Remote qXfer reply contained no data."
 msgstr ""
 
-#: remote.c:9445
+#: remote.c:10553
 msgid "remote query is only available after target open"
 msgstr ""
 
-#: remote.c:9540
+#: remote.c:10656
 msgid "Pattern is too large to transmit to remote target."
 msgstr ""
 
-#: remote.c:9562 remote.c:9567
+#: remote.c:10678 remote.c:10683
 #, possible-c-format
 msgid "Unknown qSearch:memory reply: %s"
 msgstr ""
 
-#: remote.c:9580
+#: remote.c:10696
 msgid "remote rcmd is only available after target open"
 msgstr ""
 
-#: remote.c:9592
+#: remote.c:10708
 #, possible-c-format
 msgid "\"monitor\" command ``%s'' is too long."
 msgstr ""
 
-#: remote.c:9619 remote.c:10981 remote.c:11268 remote.c:11364 remote.c:11472
-#: remote.c:11523 remote.c:11601 remote.c:11664 remote.c:11692
+#: remote.c:10735 remote.c:12210 remote.c:12490 remote.c:12586 remote.c:12694
+#: remote.c:12745 remote.c:12823 remote.c:12886 remote.c:12914
 msgid "Target does not support this command."
 msgstr ""
 
-#: remote.c:9630
+#: remote.c:10746
 msgid "Protocol error with Rcmd"
 msgstr ""
 
-#: remote.c:9666 remote.c:10672 remote.c:10763 remote.c:10817
+#: remote.c:10782 remote.c:11904 remote.c:11995 remote.c:12050
 msgid "command can only be used with remote target"
 msgstr ""
 
-#: remote.c:9669
+#: remote.c:10785
 msgid "remote-packet command requires packet text as argument"
 msgstr ""
 
-#: remote.c:9710
+#: remote.c:10826
 msgid "Remote threadset test\n"
 msgstr ""
 
-#: remote.c:9816
+#: remote.c:10932
 msgid "Fetch and print the remote list of thread identifiers, one pkt only"
 msgstr ""
 
-#: remote.c:9819
+#: remote.c:10935
 msgid "Fetch and display info about one thread"
 msgstr ""
 
-#: remote.c:9821
+#: remote.c:10937
 msgid "Test setting to a different thread"
 msgstr ""
 
-#: remote.c:9823
+#: remote.c:10939
 msgid "Iterate through updating all remote thread info"
 msgstr ""
 
-#: remote.c:9825
+#: remote.c:10941
 msgid " Remote thread alive test "
 msgstr ""
 
-#: remote.c:9915
+#: remote.c:11031
 msgid "Remote target doesn't support qGetTLSAddr packet"
 msgstr ""
 
-#: remote.c:9918
+#: remote.c:11034
 msgid "Remote target failed to process qGetTLSAddr request"
 msgstr ""
 
-#: remote.c:9922
+#: remote.c:11038
 msgid "TLS not supported or disabled on this target"
 msgstr ""
 
-#: remote.c:9959
+#: remote.c:11075
 msgid "Remote target doesn't support qGetTIBAddr packet"
 msgstr ""
 
-#: remote.c:9961
+#: remote.c:11077
 msgid "Remote target failed to process qGetTIBAddr request"
 msgstr ""
 
-#: remote.c:9964
+#: remote.c:11080
 msgid "qGetTIBAddr not supported or disabled on this target"
 msgstr ""
 
-#: remote.c:10012
+#: remote.c:11129
 #, possible-c-format
 msgid "Duplicate g packet description added for size %d"
 msgstr ""
 
-#: remote.c:10079 remote.c:10100 remote.c:10122
+#: remote.c:11198 remote.c:11219 remote.c:11241
 msgid "Packet too long for target."
 msgstr ""
 
-#: remote.c:10391
+#: remote.c:11457
+#, possible-c-format
+msgid "Reading %s from remote target...\n"
+msgstr ""
+
+#: remote.c:11462
+msgid ""
+"File transfers from remote targets can be slow. Use \"set sysroot\" to "
+"access files locally instead."
+msgstr ""
+
+#: remote.c:11551
 #, possible-c-format
 msgid "Read returned %d, but %d bytes."
 msgstr ""
 
-#: remote.c:10471
+#: remote.c:11703
 #, possible-c-format
 msgid "Readlink returned %d, but %d bytes."
 msgstr ""
 
-#: remote.c:10526
+#: remote.c:11758
 #, possible-c-format
 msgid "vFile:fstat returned %d, but %d bytes."
 msgstr ""
 
-#: remote.c:10529
+#: remote.c:11761
 #, possible-c-format
 msgid "vFile:fstat returned %d bytes, but expecting %d."
 msgstr ""
 
-#: remote.c:10575
+#: remote.c:11807
 msgid ""
 "remote target does not support file transfer, attempting to access files "
 "from local filesystem."
 msgstr ""
 
-#: remote.c:10645
+#: remote.c:11877
 #, possible-c-format
 msgid "Unknown remote I/O error %d"
 msgstr ""
 
-#: remote.c:10647
+#: remote.c:11879
 #, possible-c-format
 msgid "Remote I/O error: %s"
 msgstr ""
 
-#: remote.c:10707
+#: remote.c:11939
 #, possible-c-format
 msgid "Error reading %s."
 msgstr ""
 
-#: remote.c:10731
+#: remote.c:11963
 #, possible-c-format
 msgid "Remote write of %d bytes returned 0!"
 msgstr ""
 
-#: remote.c:10748
+#: remote.c:11980
 #, possible-c-format
 msgid "Successfully sent file \"%s\".\n"
 msgstr ""
 
-#: remote.c:10806
+#: remote.c:12039
 #, possible-c-format
 msgid "Successfully fetched file \"%s\".\n"
 msgstr ""
 
-#: remote.c:10825
+#: remote.c:12058
 #, possible-c-format
 msgid "Successfully deleted file \"%s\".\n"
 msgstr ""
 
-#: remote.c:10835
+#: remote.c:12068
 msgid "file to put"
 msgstr ""
 
-#: remote.c:10840
+#: remote.c:12073
 msgid "Invalid parameters to remote put"
 msgstr ""
 
-#: remote.c:10854
+#: remote.c:12087
 msgid "file to get"
 msgstr ""
 
-#: remote.c:10859
+#: remote.c:12092
 msgid "Invalid parameters to remote get"
 msgstr ""
 
-#: remote.c:10873
+#: remote.c:12106
 msgid "file to delete"
 msgstr ""
 
-#: remote.c:10878
+#: remote.c:12111
 msgid "Invalid parameters to remote delete"
 msgstr ""
 
-#: remote.c:11026 remote.c:11041 remote.c:11202 remote.c:11213
+#: remote.c:12255 remote.c:12270 remote.c:12424 remote.c:12435
 msgid "Target does not support source download."
 msgstr ""
 
-#: remote.c:11095
+#: remote.c:12320
 msgid "Fast tracepoint not valid during download"
 msgstr ""
 
 #. Fast tracepoints are functionally identical to regular
 #. tracepoints, so don't take lack of support as a reason to
 #. give up on the trace run.
-#: remote.c:11102
+#: remote.c:12327
 #, possible-c-format
 msgid ""
 "Target does not support fast tracepoints, downloading %d as regular "
 "tracepoint"
 msgstr ""
 
-#: remote.c:11116
+#: remote.c:12341
 msgid "Static tracepoint not valid during download"
 msgstr ""
 
 #. Fast tracepoints are functionally identical to regular
 #. tracepoints, so don't take lack of support as a reason
 #. to give up on the trace run.
-#: remote.c:11122
+#: remote.c:12347
 msgid "Target does not support static tracepoints"
 msgstr ""
 
-#: remote.c:11143
+#: remote.c:12366
 #, possible-c-format
 msgid "Target does not support conditional tracepoints, ignoring tp %d cond"
 msgstr ""
 
-#: remote.c:11152
+#: remote.c:12375
 msgid "Target does not support tracepoints."
 msgstr ""
 
-#: remote.c:11169 remote.c:11186
+#: remote.c:12392 remote.c:12409
 msgid "Error on target while setting tracepoints."
 msgstr ""
 
-#: remote.c:11262
+#: remote.c:12484
 msgid "Trace state variable name too long for tsv definition packet"
 msgstr ""
 
-#: remote.c:11270
+#: remote.c:12492
 msgid "Error on target while downloading trace state variable."
 msgstr ""
 
-#: remote.c:11286
+#: remote.c:12508
 msgid ""
 "Target does not support enabling tracepoints while a trace run is ongoing."
 msgstr ""
 
-#: remote.c:11288
+#: remote.c:12510
 msgid "Error on target while enabling tracepoint."
 msgstr ""
 
-#: remote.c:11304
+#: remote.c:12526
 msgid ""
 "Target does not support disabling tracepoints while a trace run is ongoing."
 msgstr ""
 
-#: remote.c:11306
+#: remote.c:12528
 msgid "Error on target while disabling tracepoint."
 msgstr ""
 
-#: remote.c:11343
+#: remote.c:12565
 msgid "Too many sections for read-only sections definition packet."
 msgstr ""
 
-#: remote.c:11366 remote.c:11474 remote.c:11548 remote.c:11551 remote.c:11603
-#: remote.c:11666 remote.c:11694 remote.c:11778 remote.c:11824
+#: remote.c:12588 remote.c:12696 remote.c:12770 remote.c:12773 remote.c:12825
+#: remote.c:12888 remote.c:12916 remote.c:13000 remote.c:13046
 #, possible-c-format
 msgid "Bogus reply from target: %s"
 msgstr ""
 
-#: remote.c:11410
+#: remote.c:12632
 #, possible-c-format
 msgid "Bogus trace status reply from target: %s"
 msgstr ""
 
-#: remote.c:11517
+#: remote.c:12739
 #, possible-c-format
 msgid "Unknown trace find type %d"
 msgstr ""
 
-#: remote.c:11532
+#: remote.c:12754
 msgid "Unable to parse trace frame number"
 msgstr ""
 
-#: remote.c:11542
+#: remote.c:12764
 msgid "Unable to parse tracepoint number"
 msgstr ""
 
-#: remote.c:11595
+#: remote.c:12817
 msgid "Remote file name too long for trace save packet"
 msgstr ""
 
-#: remote.c:11669
+#: remote.c:12891
 msgid "Target does not support disconnected tracing."
 msgstr ""
 
-#: remote.c:11934
+#: remote.c:13156
 #, possible-c-format
 msgid "Failed to configure the BTS buffer size: %s"
 msgstr ""
 
-#: remote.c:11936
+#: remote.c:13158
 msgid "Failed to configure the BTS buffer size."
 msgstr ""
 
-#: remote.c:11956
+#: remote.c:13178
 #, possible-c-format
 msgid "Failed to configure the trace buffer size: %s"
 msgstr ""
 
-#: remote.c:11958
+#: remote.c:13180
 msgid "Failed to configure the trace buffer size."
 msgstr ""
 
-#: remote.c:12022
-#, possible-c-format
-msgid "Could not enable branch tracing for %s: %s"
-msgstr ""
+#: remote.c:13235
+msgid ""
+"GDB does not support Intel Processor Trace. \"record\" will not work in this "
+"session."
+msgstr ""
+
+#: remote.c:13250
+#, possible-c-format
+msgid "Target is recording using %s.\n"
+msgstr ""
+
+#: remote.c:13298
+#, possible-c-format
+msgid "Could not enable branch tracing for %s: %s"
+msgstr ""
 
-#: remote.c:12025
+#: remote.c:13301
 #, possible-c-format
 msgid "Could not enable branch tracing for %s."
 msgstr ""
 
-#: remote.c:12071
+#: remote.c:13347
 #, possible-c-format
 msgid "Could not disable branch tracing for %s: %s"
 msgstr ""
 
-#: remote.c:12074
+#: remote.c:13350
 #, possible-c-format
 msgid "Could not disable branch tracing for %s."
 msgstr ""
 
-#: remote.c:12109
+#: remote.c:13384
 msgid "Cannot process branch tracing result. XML parsing not supported."
 msgstr ""
 
-#: remote.c:12125
+#: remote.c:13400
 #, possible-c-format
 msgid "Bad branch tracing read type: %u."
 msgstr ""
 
-#: remote.c:12183
+#: remote.c:13458
 #, possible-c-format
 msgid "not currently attached to process %d"
 msgstr ""
 
-#: remote.c:12544
+#: remote.c:13781
+#, possible-c-format
+msgid "Remote refused setting thread events: %s"
+msgstr ""
+
+#: remote.c:13900
 #, possible-c-format
 msgid "Debugger's willingness to use range stepping is %s.\n"
 msgstr ""
 
-#: remote.c:12570
+#: remote.c:13926
 msgid "Range stepping is not supported by the current target"
 msgstr ""
 
 #. set/show remote ...
 #. allow-unknown
-#: remote.c:12617 remote.c:12623
+#: remote.c:13970 remote.c:13976
 msgid ""
 "Remote protocol specific variables\n"
 "Configure various remote-protocol specific variables such as\n"
@@ -23134,14 +23202,14 @@ msgid ""
 msgstr ""
 
 #. allow-unknown
-#: remote.c:12630
+#: remote.c:13983
 msgid ""
 "Compare section data on target to the exec file.\n"
 "Argument is a single section name (default: all loaded sections).\n"
 "To compare only read-only loaded sections, specify the -r option."
 msgstr ""
 
-#: remote.c:12636
+#: remote.c:13989
 msgid ""
 "Send an arbitrary packet to a remote target.\n"
 "   maintenance packet TEXT\n"
@@ -23151,57 +23219,57 @@ msgid ""
 "terminating `#' character and checksum."
 msgstr ""
 
-#: remote.c:12645
+#: remote.c:13998
 msgid "Set whether to send break if interrupted."
 msgstr ""
 
-#: remote.c:12646
+#: remote.c:13999
 msgid "Show whether to send break if interrupted."
 msgstr ""
 
-#: remote.c:12647
+#: remote.c:14000
 msgid "If set, a break, instead of a cntrl-c, is sent to the remote target."
 msgstr ""
 
-#: remote.c:12660
+#: remote.c:14013
 msgid "Set interrupt sequence to remote target."
 msgstr ""
 
-#: remote.c:12661
+#: remote.c:14014
 msgid "Show interrupt sequence to remote target."
 msgstr ""
 
-#: remote.c:12662
+#: remote.c:14015
 msgid ""
 "Valid value is \"Ctrl-C\", \"BREAK\" or \"BREAK-g\". The default is \"Ctrl-C"
 "\"."
 msgstr ""
 
-#: remote.c:12669
+#: remote.c:14022
 msgid ""
 "Set whether interrupt-sequence is sent to remote target when gdb connects to."
 msgstr ""
 
-#: remote.c:12670
+#: remote.c:14023
 msgid ""
 "\t\tShow whether interrupt-sequence is sent to remote target when gdb "
 "connects to."
 msgstr ""
 
-#: remote.c:12671
+#: remote.c:14024
 msgid "\t\tIf set, interrupt sequence is sent to remote target."
 msgstr ""
 
 #. Install commands for configuring memory read/write packets.
-#: remote.c:12678
+#: remote.c:14031
 msgid "Set the maximum number of bytes per memory write packet (deprecated)."
 msgstr ""
 
-#: remote.c:12681
+#: remote.c:14034
 msgid "Show the maximum number of bytes per memory write packet (deprecated)."
 msgstr ""
 
-#: remote.c:12685
+#: remote.c:14038
 msgid ""
 "Set the maximum number of bytes per memory-write packet.\n"
 "Specify the number of bytes in a packet or 0 (zero) for the\n"
@@ -23210,7 +23278,7 @@ msgid ""
 "further restriction and ``limit'' to enable that restriction."
 msgstr ""
 
-#: remote.c:12693
+#: remote.c:14046
 msgid ""
 "Set the maximum number of bytes per memory-read packet.\n"
 "Specify the number of bytes in a packet or 0 (zero) for the\n"
@@ -23219,99 +23287,99 @@ msgid ""
 "further restriction and ``limit'' to enable that restriction."
 msgstr ""
 
-#: remote.c:12702
+#: remote.c:14055
 msgid "Show the maximum number of bytes per memory-write packet."
 msgstr ""
 
-#: remote.c:12706
+#: remote.c:14059
 msgid "Show the maximum number of bytes per memory-read packet."
 msgstr ""
 
-#: remote.c:12710
+#: remote.c:14063
 msgid "Set the maximum number of target hardware watchpoints."
 msgstr ""
 
-#: remote.c:12711
+#: remote.c:14064
 msgid "Show the maximum number of target hardware watchpoints."
 msgstr ""
 
-#: remote.c:12712 remote.c:12721 remote.c:12730
+#: remote.c:14065 remote.c:14074 remote.c:14083
 msgid "Specify a negative limit for unlimited."
 msgstr ""
 
-#: remote.c:12719
+#: remote.c:14072
 msgid "Set the maximum length (in bytes) of a target hardware watchpoint."
 msgstr ""
 
-#: remote.c:12720
+#: remote.c:14073
 msgid "Show the maximum length (in bytes) of a target hardware watchpoint."
 msgstr ""
 
-#: remote.c:12728
+#: remote.c:14081
 msgid "Set the maximum number of target hardware breakpoints."
 msgstr ""
 
-#: remote.c:12729
+#: remote.c:14082
 msgid "Show the maximum number of target hardware breakpoints."
 msgstr ""
 
-#: remote.c:12738
+#: remote.c:14091
 msgid "Set the maximum size of the address (in bits) in a memory packet."
 msgstr ""
 
-#: remote.c:12739
+#: remote.c:14092
 msgid "Show the maximum size of the address (in bits) in a memory packet."
 msgstr ""
 
-#: remote.c:13003
+#: remote.c:14376
 msgid "Set use of remote protocol `Z' packets"
 msgstr ""
 
-#: remote.c:13004
+#: remote.c:14377
 msgid "Show use of remote protocol `Z' packets "
 msgstr ""
 
-#: remote.c:13005
+#: remote.c:14378
 msgid ""
 "When set, GDB will attempt to use the remote breakpoint and watchpoint\n"
 "packets."
 msgstr ""
 
-#: remote.c:13014
+#: remote.c:14387
 msgid ""
 "Manipulate files on the remote system\n"
 "Transfer files to and from the remote target system."
 msgstr ""
 
-#: remote.c:13021
+#: remote.c:14394
 msgid "Copy a local file to the remote system."
 msgstr ""
 
-#: remote.c:13025
+#: remote.c:14398
 msgid "Copy a remote file to the local system."
 msgstr ""
 
-#: remote.c:13029
+#: remote.c:14402
 msgid "Delete a remote file."
 msgstr ""
 
-#: remote.c:13034
+#: remote.c:14406
 msgid "Set the remote pathname for \"run\""
 msgstr ""
 
-#: remote.c:13035
+#: remote.c:14407
 msgid "Show the remote pathname for \"run\""
 msgstr ""
 
-#: remote.c:13040
+#: remote.c:14415
 msgid "Enable or disable range stepping."
 msgstr ""
 
-#: remote.c:13041
+#: remote.c:14416
 msgid "Show whether target-assisted range stepping is enabled."
 msgstr ""
 
-#: remote.c:13042
+#: remote.c:14417
 msgid ""
 "If on, and the target supports it, when stepping a source line, GDB\n"
 "tells the target to step the corresponding range of addresses itself "
@@ -23321,670 +23389,672 @@ msgid ""
 "stepping is supported by the target.  The default is on."
 msgstr ""
 
-#: remote-fileio.c:1352
+#: remote-fileio.c:1288
 msgid "Illegal argument for \"set remote system-call-allowed\" command"
 msgstr ""
 
-#: remote-fileio.c:1359
+#: remote-fileio.c:1295
 #, possible-c-format
 msgid "Garbage after \"show remote system-call-allowed\" command: `%s'"
 msgstr ""
 
-#: remote-fileio.c:1374
+#: remote-fileio.c:1307
 msgid "Set if the host system(3) call is allowed for the target."
 msgstr ""
 
-#: remote-fileio.c:1378
+#: remote-fileio.c:1311
 msgid "Show if the host system(3) call is allowed for the target."
 msgstr ""
 
-#: remote-m32r-sdi.c:328
-msgid "Cannot pass arguments to remote STDEBUG process"
+#: remote-notif.c:280
+msgid "Set debugging of async remote notification."
 msgstr ""
 
-#: remote-m32r-sdi.c:331 remote-mips.c:2343
-msgid "No executable file specified"
+#: remote-notif.c:281
+msgid "Show debugging of async remote notification."
 msgstr ""
 
-#: remote-m32r-sdi.c:391
-msgid "Connection refused."
+#: remote-notif.c:282
+msgid ""
+"When non-zero, debugging output about async remote notifications is enabled."
 msgstr ""
 
-#: remote-m32r-sdi.c:394 remote-m32r-sdi.c:397
-msgid "Cannot connect to SDI target."
+#: remote-sim.c:188
+#, possible-c-format
+msgid "Unable to create simulator instance for inferior %d."
 msgstr ""
 
-#: remote-m32r-sdi.c:1212
-msgid "Too many breakpoints"
+#: remote-sim.c:203
+#, possible-c-format
+msgid ""
+"Inferior %d and inferior %d would have identical simulator state.\n"
+"(This simulator does not support the running of more than one inferior.)"
 msgstr ""
 
-#: remote-m32r-sdi.c:1274
-#, possible-c-format
-msgid "Unknown option `%s'"
+#: remote-sim.c:529
+msgid "Register size different to expected"
 msgstr ""
 
-#: remote-m32r-sdi.c:1286 symfile.c:2119
+#: remote-sim.c:532
 #, possible-c-format
-msgid "\"%s\" is not an object file: %s"
+msgid "Register %d not updated"
 msgstr ""
 
-#: remote-m32r-sdi.c:1337
+#: remote-sim.c:534
 #, possible-c-format
-msgid "Error while downloading %s section."
+msgid "Register %s not updated"
 msgstr ""
 
-#: remote-m32r-sdi.c:1458
-msgid "Too many watchpoints"
+#: remote-sim.c:573
+msgid "program to load"
 msgstr ""
 
-#: remote-m32r-sdi.c:1701
-msgid "Reset SDI connection."
+#: remote-sim.c:581
+msgid "GDB sim does not yet support a load offset."
 msgstr ""
 
-#: remote-m32r-sdi.c:1704
-msgid "Show status of SDI connection."
+#: remote-sim.c:590
+msgid "unable to load program"
 msgstr ""
 
-#: remote-m32r-sdi.c:1707
-msgid "Debug M32R/Chaos."
+#: remote-sim.c:617
+msgid "No executable file specified."
 msgstr ""
 
-#: remote-m32r-sdi.c:1710
-msgid "Use debug DMA mem access."
+#: remote-sim.c:619 remote-sim.c:1083
+msgid "No program loaded."
 msgstr ""
 
-#: remote-m32r-sdi.c:1712
-msgid "Use mon code mem access."
+#: remote-sim.c:651
+msgid "Unable to create sim inferior."
 msgstr ""
 
-#: remote-m32r-sdi.c:1715
-msgid "Set breakpoints by IB break."
+#: remote-sim.c:741
+msgid "unable to create simulator instance"
 msgstr ""
 
-#: remote-m32r-sdi.c:1717
-msgid "Set breakpoints by dbt."
+#: remote-sim.c:862
+#, possible-c-format
+msgid "gdbsim_resume: pid %d, step %d, signal %d\n"
 msgstr ""
 
-#: remote-mips.c:495
-msgid "Ending remote MIPS debugging: "
+#: remote-sim.c:941
+#, possible-c-format
+msgid "Can't stop pid %d.  No inferior found."
 msgstr ""
 
-#: remote-mips.c:664
-msgid "Watchdog has expired.  Target detached."
+#: remote-sim.c:991
+#, possible-c-format
+msgid "Unable to wait for pid %d.  Inferior not found."
 msgstr ""
 
-#: remote-mips.c:668
-msgid "End of file from remote"
+#. PREVIOUSLY: The user may give a command before the simulator
+#. is opened. [...] (??? assuming of course one wishes to
+#. continue to allow commands to be sent to unopened simulators,
+#. which isn't entirely unreasonable).
+#. The simulator is a builtin abstraction of a remote target.
+#. Consistent with that model, access to the simulator, via sim
+#. commands, is restricted to the period when the channel to the
+#. simulator is open.
+#: remote-sim.c:1214
+msgid "Not connected to the simulator target"
 msgstr ""
 
-#: remote-mips.c:670
-#, possible-c-format
-msgid "Error reading from remote: %s"
+#: remote-sim.c:1350
+msgid "Send a command to the simulator."
 msgstr ""
 
-#. At this point, about the only thing we can do is abort the command
-#. in progress and get back to command level as quickly as possible.
-#: remote-mips.c:705
-msgid "Remote board reset, debug protocol re-initialized."
+#: reverse.c:53
+#, possible-c-format
+msgid "Already in reverse mode.  Use '%s' or 'set exec-dir forward'."
 msgstr ""
 
-#: remote-mips.c:763
-#, possible-c-format
-msgid "Debug protocol failure:  more than %d characters before a sync."
+#: reverse.c:142
+msgid "target_get_bookmark failed."
 msgstr ""
 
-#: remote-mips.c:853
+#: reverse.c:166
 #, possible-c-format
-msgid "MIPS protocol data packet too long: %s"
+msgid "Saved bookmark %d at %s\n"
 msgstr ""
 
-#: remote-mips.c:891 remote-mips.c:1151 remote-mips.c:1192
-#, possible-c-format
-msgid "write to target failed: %s"
+#: reverse.c:221
+msgid "No bookmarks."
 msgstr ""
 
-#: remote-mips.c:998
-msgid "Remote did not acknowledge packet"
+#: reverse.c:227
+msgid "Delete all bookmarks? "
 msgstr ""
 
-#: remote-mips.c:1029 remote-mips.c:1069
-msgid "Timed out waiting for remote packet"
+#. Not found.
+#: reverse.c:239
+#, possible-c-format
+msgid "No bookmark #%d."
 msgstr ""
 
-#: remote-mips.c:1091
-msgid "Timed out waiting for packet"
+#: reverse.c:253 thread.c:2017
+msgid "Command requires an argument."
 msgstr ""
 
-#: remote-mips.c:1249
-msgid "mips_request: Trying to send command before reply"
+#: reverse.c:277
+#, possible-c-format
+msgid "goto-bookmark: invalid bookmark number '%s'."
 msgstr ""
 
-#: remote-mips.c:1269
-msgid "mips_request: Trying to get reply before command"
+#. Not found.
+#: reverse.c:290
+#, possible-c-format
+msgid "goto-bookmark: no bookmark found for '%s'."
 msgstr ""
 
-#: remote-mips.c:1280
-msgid "Bad response from remote board"
+#: reverse.c:324
+msgid "No bookmarks.\n"
 msgstr ""
 
-#: remote-mips.c:1356
-msgid "Failed to initialize (didn't receive packet)."
+#: reverse.c:345
+msgid ""
+"Step program backward until it reaches the beginning of another source "
+"line.\n"
+"Argument N means do this N times (or till program stops for another reason)."
 msgstr ""
 
-#: remote-mips.c:1412
-msgid "internal error: mips_initialize called twice"
+#: reverse.c:351
+msgid ""
+"Step program backward, proceeding through subroutine calls.\n"
+"Like the \"reverse-step\" command as long as subroutine calls do not "
+"happen;\n"
+"when they do, the call is treated as one instruction.\n"
+"Argument N means do this N times (or till program stops for another reason)."
 msgstr ""
 
-#: remote-mips.c:1488
-msgid "Failed to initialize."
+#: reverse.c:359
+msgid ""
+"Step backward exactly one instruction.\n"
+"Argument N means do this N times (or till program stops for another reason)."
 msgstr ""
 
-#: remote-mips.c:1545
+#: reverse.c:365
 msgid ""
-"To open a MIPS remote debugging connection, you need to specify what\n"
-"serial device is attached to the target board (e.g., /dev/ttya).\n"
-"If you want to use TFTP to download to the board, specify the name of a\n"
-"temporary file to be used by GDB for downloads as the second argument.\n"
-"This filename must be in the form host:filename, where host is the name\n"
-"of the host running the TFTP server, and the file must be readable by the\n"
-"world.  If the local name of the temporary file differs from the name as\n"
-"seen from the board via TFTP, specify that name as the third parameter.\n"
+"Step backward one instruction, but proceed through called subroutines.\n"
+"Argument N means do this N times (or till program stops for another reason)."
 msgstr ""
 
-#: remote-mips.c:1599
-msgid "Unable to open UDP port"
+#: reverse.c:371
+msgid ""
+"Continue program being debugged but run it in reverse.\n"
+"If proceeding from breakpoint, a number N may be used as an argument,\n"
+"which means to set the ignore count of that breakpoint to N - 1 (so that\n"
+"the breakpoint won't break until the Nth time it is reached)."
 msgstr ""
 
-#: remote-mips.c:1848
-#, possible-c-format
-msgid "Remote failure: %s"
+#: reverse.c:378
+msgid "Execute backward until just before selected stack frame is called."
 msgstr ""
 
-#: remote-mips.c:2046
-#, possible-c-format
-msgid "Can't read register %d: %s"
+#: reverse.c:381
+msgid ""
+"Set a bookmark in the program's execution history.\n"
+"A bookmark represents a point in the execution history \n"
+"that can be returned to at a later point in the debug session."
 msgstr ""
 
-#: remote-mips.c:2085
-#, possible-c-format
-msgid "Can't write register %d: %s"
+#: reverse.c:385
+msgid ""
+"Status of user-settable bookmarks.\n"
+"Bookmarks are user-settable markers representing a point in the \n"
+"execution history that can be returned to later in the same debug \n"
+"session."
 msgstr ""
 
-#: remote-mips.c:2336
-msgid "Can't pass arguments to remote MIPS board; arguments ignored."
+#: reverse.c:390
+msgid ""
+"Delete a bookmark from the bookmark list.\n"
+"Argument is a bookmark number or numbers,\n"
+" or no argument to delete all bookmarks.\n"
 msgstr ""
 
-#: remote-mips.c:2601
-#, possible-c-format
-msgid "mips_common_breakpoint: Attempt to clear bogus breakpoint at %s"
+#: reverse.c:395
+msgid ""
+"Go to an earlier-bookmarked point in the program's execution history.\n"
+"Argument is the bookmark number of a bookmark saved earlier by using \n"
+"the 'bookmark' command, or the special arguments:\n"
+"  start (beginning of recording)\n"
+"  end   (end of recording)\n"
 msgstr ""
 
-#: remote-mips.c:2616 remote-mips.c:2669 remote-mips.c:2741
+#: rl78-tdep.c:853
 #, possible-c-format
-msgid "mips_common_breakpoint: Bad response from remote board: %s"
+msgid "Undefined mapping for opc reg %d"
 msgstr ""
 
-#: remote-mips.c:2780
-msgid "Timeout during download."
+#: rs6000-aix-tdep.c:1020
+#, possible-c-format
+msgid "cannot find .ldinfo section from core file: %s"
 msgstr ""
 
-#: remote-mips.c:2790
+#: rs6000-aix-tdep.c:1029
 #, possible-c-format
-msgid "Download got unexpected ack char: 0x%x, retrying."
+msgid "unable to read .ldinfo section from core file: %s"
 msgstr ""
 
-#: remote-mips.c:3549
-msgid "mips_load:  Couldn't get into monitor mode."
+#. FIXME: this happens 3 times at the start of each 64-bit program.
+#: rs6000-nat.c:213
+msgid "ptrace read"
 msgstr ""
 
-#: remote-mips.c:3707
-msgid "Set timeout in seconds for remote MIPS serial I/O."
+#: rs6000-nat.c:274
+msgid "ptrace write"
 msgstr ""
 
-#: remote-mips.c:3708
-msgid "Show timeout in seconds for remote MIPS serial I/O."
+#: rs6000-nat.c:578
+msgid "rs6000_create_inferior: failed to select architecture"
 msgstr ""
 
-#: remote-mips.c:3715
-msgid "Set retransmit timeout in seconds for remote MIPS serial I/O."
+#: rs6000-nat.c:610
+msgid "ptrace ldinfo"
 msgstr ""
 
-#: remote-mips.c:3716
-msgid "Show retransmit timeout in seconds for remote MIPS serial I/O."
+#: rs6000-tdep.c:2906
+#, possible-c-format
+msgid "rs6000_pseudo_register_read: called on unexpected register '%s' (%d)"
 msgstr ""
 
-#: remote-mips.c:3717
-msgid ""
-"This is the number of seconds to wait for an acknowledgement to a packet\n"
-"before resending the packet."
+#: rs6000-tdep.c:2931
+#, possible-c-format
+msgid "rs6000_pseudo_register_write: called on unexpected register '%s' (%d)"
 msgstr ""
 
-#: remote-mips.c:3725
-msgid "Set the maximum number of characters to ignore when scanning for a SYN."
+#: rs6000-tdep.c:2973
+#, possible-c-format
+msgid "rs6000_pseudo_register_collect: called on unexpected register '%s' (%d)"
 msgstr ""
 
-#: remote-mips.c:3726
-msgid ""
-"Show the maximum number of characters to ignore when scanning for a SYN."
+#: rs6000-tdep.c:6638
+msgid "\"set powerpc\" must be followed by an appropriate subcommand.\n"
 msgstr ""
 
-#: remote-mips.c:3727
-msgid ""
-"This is the maximum number of characters GDB will ignore when trying to\n"
-"synchronize with the remote system.  A value of -1 means that there is no\n"
-"limit. (Note that these characters are printed out even though they are\n"
-"ignored.)"
+#: rs6000-tdep.c:6679
+#, possible-c-format
+msgid "Invalid vector ABI accepted: %s."
 msgstr ""
 
-#: remote-mips.c:3737
-msgid "Set the prompt that GDB expects from the monitor."
+#: rs6000-tdep.c:6695
+#, possible-c-format
+msgid "Use of exact watchpoints is %s.\n"
 msgstr ""
 
-#: remote-mips.c:3738
-msgid "Show the prompt that GDB expects from the monitor."
+#: rs6000-tdep.c:6802 rs6000-tdep.c:6806
+msgid "Various PowerPC-specific commands."
 msgstr ""
 
-#: remote-mips.c:3745
-msgid "Set printing of monitor warnings."
+#: rs6000-tdep.c:6812
+msgid "Set whether to use a soft-float ABI."
 msgstr ""
 
-#: remote-mips.c:3746
-msgid "Show printing of monitor warnings."
+#: rs6000-tdep.c:6813
+msgid "Show whether to use a soft-float ABI."
 msgstr ""
 
-#: remote-mips.c:3747
-msgid ""
-"When enabled, monitor warnings about hardware breakpoints will be displayed."
+#: rs6000-tdep.c:6820
+msgid "Set the vector ABI."
 msgstr ""
 
-#: remote-mips.c:3754
-msgid "Send a packet to PMON (must be in debug mode)."
+#: rs6000-tdep.c:6821
+msgid "Show the vector ABI."
 msgstr ""
 
-#: remote-mips.c:3756
-msgid ""
-"Set zeroing of upper 32 bits of 64-bit addresses when talking to PMON "
-"targets."
+#: rs6000-tdep.c:6827
+msgid "Set whether to use just one debug register for watchpoints on scalars."
 msgstr ""
 
-#: remote-mips.c:3757
-msgid ""
-"Show zeroing of upper 32 bits of 64-bit addresses when talking to PMON "
-"targets."
+#: rs6000-tdep.c:6829
+msgid "Show whether to use just one debug register for watchpoints on scalars."
 msgstr ""
 
-#: remote-mips.c:3758
-msgid "Use \"on\" to enable the masking and \"off\" to disable it."
+#: rs6000-tdep.c:6831
+msgid ""
+"If true, GDB will use only one debug register when watching a variable of\n"
+"scalar type, thus assuming that the variable is accessed through the "
+"address\n"
+"of its first byte."
 msgstr ""
 
-#: remote-notif.c:280
-msgid "Set debugging of async remote notification."
+#: rust-exp.y:385
+msgid "Tuple expressions not supported yet"
 msgstr ""
 
-#: remote-notif.c:281
-msgid "Show debugging of async remote notification."
+#: rust-exp.y:950
+msgid "Could not find crate for current location"
 msgstr ""
 
-#: remote-notif.c:282
-msgid ""
-"When non-zero, debugging output about async remote notifications is enabled."
+#: rust-exp.y:970
+msgid "Couldn't find namespace scope for self::"
 msgstr ""
 
-#: remote-sim.c:187
+#: rust-exp.y:992
 #, possible-c-format
-msgid "Unable to create simulator instance for inferior %d."
+msgid "Too many super:: uses from '%s'"
 msgstr ""
 
-#: remote-sim.c:202
+#: rust-exp.y:1036
 #, possible-c-format
-msgid ""
-"Inferior %d and inferior %d would have identical simulator state.\n"
-"(This simulator does not support the running of more than one inferior.)"
+msgid "Could not find Rust type %s"
 msgstr ""
 
-#: remote-sim.c:528
-msgid "Register size different to expected"
+#: rust-exp.y:1068
+msgid "Not enough hex digits seen"
 msgstr ""
 
-#: remote-sim.c:531
-#, possible-c-format
-msgid "Register %d not updated"
+#: rust-exp.y:1072
+msgid "Overlong hex escape"
 msgstr ""
 
-#: remote-sim.c:533
-#, possible-c-format
-msgid "Register %s not updated"
+#: rust-exp.y:1097
+msgid "Unicode escape in byte literal"
 msgstr ""
 
-#: remote-sim.c:572
-msgid "program to load"
+#: rust-exp.y:1100
+msgid "Missing '{' in Unicode escape"
 msgstr ""
 
-#: remote-sim.c:580
-msgid "GDB sim does not yet support a load offset."
+#: rust-exp.y:1105
+msgid "Missing '}' in Unicode escape"
 msgstr ""
 
-#: remote-sim.c:589
-msgid "unable to load program"
+#: rust-exp.y:1139
+#, possible-c-format
+msgid "Invalid escape \\%c in literal"
 msgstr ""
 
-#: remote-sim.c:616
-msgid "No executable file specified."
+#: rust-exp.y:1170
+msgid "Unterminated character literal"
 msgstr ""
 
-#: remote-sim.c:618 remote-sim.c:1085
-msgid "No program loaded."
+#: rust-exp.y:1241 rust-exp.y:1268
+msgid "Unexpected EOF in string"
 msgstr ""
 
-#: remote-sim.c:650
-msgid "Unable to create sim inferior."
+#: rust-exp.y:1245
+msgid "Non-ASCII value in raw byte string"
 msgstr ""
 
-#: remote-sim.c:740
-msgid "unable to create simulator instance"
+#: rust-exp.y:1273
+msgid "Non-ASCII value in byte string"
 msgstr ""
 
-#: remote-sim.c:861
+#: rust-exp.y:1982
 #, possible-c-format
-msgid "gdbsim_resume: pid %d, step %d, signal %d\n"
+msgid "No typed name '%s' in current context"
 msgstr ""
 
-#: remote-sim.c:940
-#, possible-c-format
-msgid "Can't stop pid %d.  No inferior found."
+#: rust-exp.y:1993
+msgid "Negative array length"
 msgstr ""
 
-#: remote-sim.c:993
+#: rust-exp.y:2056
 #, possible-c-format
-msgid "Unable to wait for pid %d.  Inferior not found."
+msgid "could not find tuple type '%s'"
 msgstr ""
 
-#. PREVIOUSLY: The user may give a command before the simulator
-#. is opened. [...] (??? assuming of course one wishes to
-#. continue to allow commands to be sent to unopened simulators,
-#. which isn't entirely unreasonable).
-#. The simulator is a builtin abstraction of a remote target.
-#. Consistent with that model, access to the simulator, via sim
-#. commands, is restricted to the period when the channel to the
-#. simulator is open.
-#: remote-sim.c:1215
-msgid "Not connected to the simulator target"
-msgstr ""
-
-#: remote-sim.c:1350
-msgid "Send a command to the simulator."
-msgstr ""
-
-#: reverse.c:53
+#: rust-exp.y:2260
 #, possible-c-format
-msgid "Already in reverse mode.  Use '%s' or 'set exec-dir forward'."
-msgstr ""
-
-#: reverse.c:142
-msgid "target_get_bookmark failed."
+msgid "Type %s is not a tuple struct"
 msgstr ""
 
-#: reverse.c:166
+#: rust-exp.y:2332
 #, possible-c-format
-msgid "Saved bookmark %d at %s\n"
+msgid "No symbol '%s' in current context"
 msgstr ""
 
-#: reverse.c:224
-msgid "No bookmarks."
+#: rust-exp.y:2388
+#, possible-c-format
+msgid "Could not find type '%s'"
 msgstr ""
 
-#: reverse.c:230
-msgid "Delete all bookmarks? "
+#: rust-exp.y:2393
+msgid "Struct expression applied to non-struct type"
 msgstr ""
 
-#. Not found.
-#: reverse.c:242
+#: rust-exp.y:2477
 #, possible-c-format
-msgid "No bookmark #%d."
+msgid "%s in expression, near `%s'."
 msgstr ""
 
-#: reverse.c:256 thread.c:1608
-msgid "Command requires an argument."
+#: rust-lang.c:135
+msgid "Encountered void enum value"
 msgstr ""
 
-#: reverse.c:280
+#: rust-lang.c:152
 #, possible-c-format
-msgid "goto-bookmark: invalid bookmark number '%s'."
+msgid "Only expected one field in %s type"
 msgstr ""
 
-#. Not found.
-#: reverse.c:293
+#: rust-lang.c:178
 #, possible-c-format
-msgid "goto-bookmark: no bookmark found for '%s'."
-msgstr ""
-
-#: reverse.c:329
-msgid "No bookmarks.\n"
-msgstr ""
-
-#: reverse.c:352
-msgid ""
-"Step program backward until it reaches the beginning of another source "
-"line.\n"
-"Argument N means do this N times (or till program stops for another reason)."
+msgid "%s refers to field after end of member type"
 msgstr ""
 
-#: reverse.c:358
-msgid ""
-"Step program backward, proceeding through subroutine calls.\n"
-"Like the \"reverse-step\" command as long as subroutine calls do not "
-"happen;\n"
-"when they do, the call is treated as one instruction.\n"
-"Argument N means do this N times (or till program stops for another reason)."
-msgstr ""
-
-#: reverse.c:366
-msgid ""
-"Step backward exactly one instruction.\n"
-"Argument N means do this N times (or till program stops for another reason)."
-msgstr ""
-
-#: reverse.c:372
-msgid ""
-"Step backward one instruction, but proceed through called subroutines.\n"
-"Argument N means do this N times (or till program stops for another reason)."
+#: rust-lang.c:186
+#, possible-c-format
+msgid "Invalid form for %s"
 msgstr ""
 
-#: reverse.c:378
-msgid ""
-"Continue program being debugged but run it in reverse.\n"
-"If proceeding from breakpoint, a number N may be used as an argument,\n"
-"which means to set the ignore count of that breakpoint to N - 1 (so that\n"
-"the breakpoint won't break until the Nth time it is reached)."
+#. This is a bounds check and should never be hit unless Rust
+#. has changed its debuginfo format.
+#: rust-lang.c:210
+msgid "Could not find enum discriminant field"
 msgstr ""
 
-#: reverse.c:385
-msgid "Execute backward until just before selected stack frame is called."
+#: rust-lang.c:226
+msgid "Rust debug format has changed"
 msgstr ""
 
-#: reverse.c:388
-msgid ""
-"Set a bookmark in the program's execution history.\n"
-"A bookmark represents a point in the execution history \n"
-"that can be returned to at a later point in the debug session."
+#. Somehow the discriminant wasn't found.
+#: rust-lang.c:265
+#, possible-c-format
+msgid "Could not find variant of %s with discriminant %s"
 msgstr ""
 
-#: reverse.c:392
-msgid ""
-"Status of user-settable bookmarks.\n"
-"Bookmarks are user-settable markers representing a point in the \n"
-"execution history that can be returned to later in the same debug \n"
-"session."
+#: rust-lang.c:630
+msgid "Could not determine the array bounds"
 msgstr ""
 
-#: reverse.c:397
-msgid ""
-"Delete a bookmark from the bookmark list.\n"
-"Argument is a bookmark number or numbers,\n"
-" or no argument to delete all bookmarks.\n"
+#: rust-lang.c:1041
+msgid "Could not compute alignment of type"
 msgstr ""
 
-#: reverse.c:402
-msgid ""
-"Go to an earlier-bookmarked point in the program's execution history.\n"
-"Argument is the bookmark number of a bookmark saved earlier by using \n"
-"the 'bookmark' command, or the special arguments:\n"
-"  start (beginning of recording)\n"
-"  end   (end of recording)\n"
+#: rust-lang.c:1270
+msgid "Method calls only supported on struct or enum types"
 msgstr ""
 
-#: rl78-tdep.c:837
-#, possible-c-format
-msgid "Undefined mapping for opc reg %d"
+#: rust-lang.c:1272
+msgid "Method call on nameless type"
 msgstr ""
 
-#: rl78-tdep.c:1219 rx-tdep.c:1014
+#: rust-lang.c:1279
 #, possible-c-format
-msgid "Undefined dwarf2 register mapping of reg %d"
+msgid "Could not find function named '%s'"
 msgstr ""
 
-#: rs6000-aix-tdep.c:1017
+#: rust-lang.c:1283
 #, possible-c-format
-msgid "cannot find .ldinfo section from core file: %s"
+msgid "Function '%s' takes no arguments"
 msgstr ""
 
-#: rs6000-aix-tdep.c:1026
-#, possible-c-format
-msgid "unable to read .ldinfo section from core file: %s"
+#: rust-lang.c:1348
+msgid "Range expression with different types"
 msgstr ""
 
-#. FIXME: this happens 3 times at the start of each 64-bit program.
-#: rs6000-nat.c:214
-msgid "ptrace read"
+#: rust-lang.c:1454
+msgid "Can't take slice of array without '&'"
 msgstr ""
 
-#: rs6000-nat.c:275
-msgid "ptrace write"
+#: rust-lang.c:1477
+msgid "Can't compute array bounds"
 msgstr ""
 
-#: rs6000-nat.c:579
-msgid "rs6000_create_inferior: failed to select architecture"
+#: rust-lang.c:1479
+msgid "Found array with non-zero lower bound"
 msgstr ""
 
-#: rs6000-nat.c:611
-msgid "ptrace ldinfo"
+#: rust-lang.c:1498
+msgid "Cannot subscript non-array type"
 msgstr ""
 
-#: rs6000-tdep.c:2835
-#, possible-c-format
-msgid "rs6000_pseudo_register_read: called on unexpected register '%s' (%d)"
+#: rust-lang.c:1504
+msgid "Index less than zero"
 msgstr ""
 
-#: rs6000-tdep.c:2860
-#, possible-c-format
-msgid "rs6000_pseudo_register_write: called on unexpected register '%s' (%d)"
+#: rust-lang.c:1506
+msgid "Index greater than length"
 msgstr ""
 
-#: rs6000-tdep.c:6027
-msgid "\"set powerpc\" must be followed by an appropriate subcommand.\n"
+#: rust-lang.c:1522
+msgid "High index less than zero"
 msgstr ""
 
-#: rs6000-tdep.c:6068
-#, possible-c-format
-msgid "Invalid vector ABI accepted: %s."
+#: rust-lang.c:1524
+msgid "Low index greater than high index"
 msgstr ""
 
-#: rs6000-tdep.c:6084
-#, possible-c-format
-msgid "Use of exact watchpoints is %s.\n"
+#: rust-lang.c:1526
+msgid "High index greater than length"
 msgstr ""
 
-#: rs6000-tdep.c:6191 rs6000-tdep.c:6195
-msgid "Various PowerPC-specific commands."
+#: rust-lang.c:1667
+msgid "Array with negative number of elements"
 msgstr ""
 
-#: rs6000-tdep.c:6201
-msgid "Set whether to use a soft-float ABI."
+#: rust-lang.c:1726
+#, possible-c-format
+msgid "Cannot access field %d of variant %s, there are only %d fields"
 msgstr ""
 
-#: rs6000-tdep.c:6202
-msgid "Show whether to use a soft-float ABI."
+#: rust-lang.c:1735
+#, possible-c-format
+msgid "Variant %s is not a tuple variant"
 msgstr ""
 
-#: rs6000-tdep.c:6209
-msgid "Set the vector ABI."
+#: rust-lang.c:1746
+#, possible-c-format
+msgid "Cannot access field %d of %s, there are only %d fields"
 msgstr ""
 
-#: rs6000-tdep.c:6210
-msgid "Show the vector ABI."
+#: rust-lang.c:1751
+#, possible-c-format
+msgid ""
+"Attempting to access anonymous field %d of %s, which is not a tuple, tuple "
+"struct, or tuple-like variant"
 msgstr ""
 
-#: rs6000-tdep.c:6216
-msgid "Set whether to use just one debug register for watchpoints on scalars."
+#: rust-lang.c:1758
+msgid ""
+"Anonymous field access is only allowed on tuples, tuple structs, and tuple-"
+"like enum variants"
 msgstr ""
 
-#: rs6000-tdep.c:6218
-msgid "Show whether to use just one debug register for watchpoints on scalars."
+#. We didn't find it.
+#: rust-lang.c:1790 rust-lang.c:1815
+#, possible-c-format
+msgid "Could not find field %s of struct variant %s"
 msgstr ""
 
-#: rs6000-tdep.c:6220
+#: rust-lang.c:1799
+#, possible-c-format
 msgid ""
-"If true, GDB will use only one debug register when watching a variable of\n"
-"scalar type, thus assuming that the variable is accessed through the "
-"address\n"
-"of its first byte."
+"Attempting to access named field %s of tuple variant %s, which has only "
+"anonymous fields"
 msgstr ""
 
-#: s390-linux-nat.c:308 s390-linux-nat.c:328
+#: s390-linux-nat.c:322 s390-linux-nat.c:342
 msgid "Couldn't get register set"
 msgstr ""
 
-#: s390-linux-nat.c:333
+#: s390-linux-nat.c:347
 msgid "Couldn't set register set"
 msgstr ""
 
-#: s390-linux-nat.c:463 s390-linux-nat.c:512
+#: s390-linux-nat.c:599
+msgid "Couldn't retrieve debug regs"
+msgstr ""
+
+#: s390-linux-nat.c:637
 msgid "Couldn't retrieve watchpoint status"
 msgstr ""
 
-#: s390-linux-nat.c:473
+#: s390-linux-nat.c:647
 msgid "Couldn't clear watchpoint status"
 msgstr ""
 
-#: s390-linux-nat.c:528
+#: s390-linux-nat.c:753
 msgid "Couldn't modify watchpoint status"
 msgstr ""
 
-#: s390-linux-tdep.c:2718
+#: s390-linux-nat.c:1041
+msgid "Set whether to show the PER (debug) hardware state."
+msgstr ""
+
+#: s390-linux-nat.c:1042
+msgid "Show whether to show the PER (debug) hardware state."
+msgstr ""
+
+#: s390-linux-nat.c:1043
+msgid ""
+"Use \"on\" to enable, \"off\" to disable.\n"
+"If enabled, the PER state is shown after it is changed by GDB,\n"
+"and when the inferior triggers a breakpoint or watchpoint."
+msgstr ""
+
+#: s390-linux-tdep.c:3384
 msgid "Stack overflow"
 msgstr ""
 
-#: s390-linux-tdep.c:2840
+#: s390-linux-tdep.c:3506
 msgid "invalid return type"
 msgstr ""
 
-#: s390-linux-tdep.c:2879 spu-tdep.c:1547
+#: s390-linux-tdep.c:3545 spu-tdep.c:1548
 msgid "Cannot set function return value."
 msgstr ""
 
-#: s390-linux-tdep.c:2881 spu-tdep.c:1563
+#: s390-linux-tdep.c:3547 spu-tdep.c:1564
 msgid "Function return value unknown."
 msgstr ""
 
-#: score-tdep.c:158 score-tdep.c:250 score-tdep.c:320 score-tdep.c:833
+#: score-tdep.c:158 score-tdep.c:250 score-tdep.c:321 score-tdep.c:835
 #, possible-c-format
 msgid "Error: target_read_memory in file:%s, line:%d!"
 msgstr ""
 
-#: score-tdep.c:438
+#: score-tdep.c:449
 #, possible-c-format
 msgid "Error: score_xfer_register in file:%s, line:%d!"
 msgstr ""
 
-#: score-tdep.c:821
+#: selftest-arch.c:81
+#, possible-c-format
+msgid "Self test failed: arch %s: "
+msgstr ""
+
+#: selftest.c:53
+msgid "Self test failed: "
+msgstr ""
+
+#: selftest.c:58
+#, possible-c-format
+msgid "Ran %lu unit tests, %d failed\n"
+msgstr ""
+
+#. Check that VALUE is true, and, if not, throw an exception.
+#: selftest.h:41
 #, possible-c-format
-msgid "Error: malloc size < 0 in file:%s, line:%d!"
+msgid "self-test failed at %s:%d"
 msgstr ""
 
 #. The sentinel frame is used as a starting point for creating the
 #. previous (inner most) frame.  That frame's THIS_ID method will be
 #. called to determine the inner most frame's ID.  Not this one.
-#: sentinel-frame.c:66
+#: sentinel-frame.c:67
 msgid "sentinel_frame_this_id called"
 msgstr ""
 
@@ -23992,152 +24062,152 @@ msgstr ""
 #. timer tick
 #. keyboard
 #. slave icu
-#: ser-go32.c:925
+#: ser-go32.c:946
 msgid "Set COM1 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:926
+#: ser-go32.c:947
 msgid "Show COM1 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:932
+#: ser-go32.c:953
 msgid "Set COM1 interrupt request."
 msgstr ""
 
-#: ser-go32.c:933
+#: ser-go32.c:954
 msgid "Show COM1 interrupt request."
 msgstr ""
 
-#: ser-go32.c:939
+#: ser-go32.c:960
 msgid "Set COM2 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:940
+#: ser-go32.c:961
 msgid "Show COM2 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:946
+#: ser-go32.c:967
 msgid "Set COM2 interrupt request."
 msgstr ""
 
-#: ser-go32.c:947
+#: ser-go32.c:968
 msgid "Show COM2 interrupt request."
 msgstr ""
 
-#: ser-go32.c:953
+#: ser-go32.c:974
 msgid "Set COM3 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:954
+#: ser-go32.c:975
 msgid "Show COM3 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:960
+#: ser-go32.c:981
 msgid "Set COM3 interrupt request."
 msgstr ""
 
-#: ser-go32.c:961
+#: ser-go32.c:982
 msgid "Show COM3 interrupt request."
 msgstr ""
 
-#: ser-go32.c:967
+#: ser-go32.c:988
 msgid "Set COM4 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:968
+#: ser-go32.c:989
 msgid "Show COM4 base i/o port address."
 msgstr ""
 
-#: ser-go32.c:974
+#: ser-go32.c:995
 msgid "Set COM4 interrupt request."
 msgstr ""
 
-#: ser-go32.c:975
+#: ser-go32.c:996
 msgid "Show COM4 interrupt request."
 msgstr ""
 
-#: ser-go32.c:982
+#: ser-go32.c:1003
 msgid "Print DOS serial port status."
 msgstr ""
 
-#: serial.c:380
+#: serial.c:391
 msgid "serial_readchar: blocking read in async mode"
 msgstr ""
 
-#: serial.c:645
+#: serial.c:656
 #, possible-c-format
 msgid "Baud rate for remote serial I/O is %s.\n"
 msgstr ""
 
-#: serial.c:677
+#: serial.c:688
 msgid ""
 "Connect the terminal directly up to the command monitor.\n"
 "Use <CR>~. or <CR>~^D to break out."
 msgstr ""
 
-#: serial.c:682
+#: serial.c:693
 msgid "Set default serial/parallel port configuration."
 msgstr ""
 
-#: serial.c:688
+#: serial.c:699
 msgid "Show default serial/parallel port configuration."
 msgstr ""
 
 #. If target is open when baud changes, it doesn't take effect until
 #. the next open (I think, not sure).
-#: serial.c:696
+#: serial.c:707
 msgid "Set baud rate for remote serial I/O."
 msgstr ""
 
-#: serial.c:697
+#: serial.c:708
 msgid "Show baud rate for remote serial I/O."
 msgstr ""
 
-#: serial.c:698
+#: serial.c:709
 msgid ""
 "This value is used to set the speed of the serial port when debugging\n"
 "using remote targets."
 msgstr ""
 
-#: serial.c:706
+#: serial.c:717
 msgid "Set parity for remote serial I/O"
 msgstr ""
 
-#: serial.c:707
+#: serial.c:718
 msgid "Show parity for remote serial I/O"
 msgstr ""
 
-#: serial.c:713
+#: serial.c:724
 msgid "Set filename for remote session recording."
 msgstr ""
 
-#: serial.c:714
+#: serial.c:725
 msgid "Show filename for remote session recording."
 msgstr ""
 
-#: serial.c:715
+#: serial.c:726
 msgid ""
 "This file is used to record the remote session for future playback\n"
 "by gdbserver."
 msgstr ""
 
-#: serial.c:723
+#: serial.c:734
 msgid "Set numerical base for remote session logging"
 msgstr ""
 
-#: serial.c:724
+#: serial.c:735
 msgid "Show numerical base for remote session logging"
 msgstr ""
 
-#: serial.c:731
+#: serial.c:742
 msgid "Set serial debugging."
 msgstr ""
 
-#: serial.c:732
+#: serial.c:743
 msgid "Show serial debugging."
 msgstr ""
 
-#: serial.c:733
+#: serial.c:744
 msgid "When non-zero, serial port debugging is enabled."
 msgstr ""
 
@@ -24153,52 +24223,52 @@ msgstr ""
 msgid "ser_windows_wait_handle: reseting mask failed (2)"
 msgstr ""
 
-#: ser-mingw.c:874
+#: ser-mingw.c:872
 msgid "child command"
 msgstr ""
 
-#: ser-mingw.c:880
+#: ser-mingw.c:878
 msgid "missing child command"
 msgstr ""
 
-#: ser-mingw.c:907
+#: ser-mingw.c:905
 #, possible-c-format
 msgid "error starting child process '%s': %s: %s"
 msgstr ""
 
-#: ser-mingw.c:910
+#: ser-mingw.c:908
 #, possible-c-format
 msgid "error starting child process '%s': %s"
 msgstr ""
 
-#: ser-tcp.c:182
+#: ser-tcp.c:184
 msgid "net_open: No colon in host name!"
 msgstr ""
 
 #. allow-unknown
-#: ser-tcp.c:416 ser-tcp.c:421
+#: ser-tcp.c:422 ser-tcp.c:427
 msgid ""
 "TCP protocol specific variables\n"
 "Configure variables specific to remote TCP connections"
 msgstr ""
 
-#: ser-tcp.c:428
+#: ser-tcp.c:434
 msgid "Set auto-retry on socket connect"
 msgstr ""
 
-#: ser-tcp.c:429
+#: ser-tcp.c:435
 msgid "Show auto-retry on socket connect"
 msgstr ""
 
-#: ser-tcp.c:435
+#: ser-tcp.c:441
 msgid "Set timeout limit in seconds for socket connection"
 msgstr ""
 
-#: ser-tcp.c:436
+#: ser-tcp.c:442
 msgid "Show timeout limit in seconds for socket connection"
 msgstr ""
 
-#: ser-tcp.c:437
+#: ser-tcp.c:443
 msgid ""
 "If set to \"unlimited\", GDB will keep attempting to establish a\n"
 "connection forever, unless interrupted with Ctrl-c.\n"
@@ -24210,41 +24280,41 @@ msgstr ""
 msgid "Hardware flow control is %s.\n"
 msgstr ""
 
-#: ser-unix.c:795
+#: ser-unix.c:718
 #, possible-c-format
 msgid "Invalid baud rate %d.  Closest values are %d and %d."
 msgstr ""
 
-#: ser-unix.c:801
+#: ser-unix.c:724
 #, possible-c-format
 msgid "Invalid baud rate %d.  Minimum value is %d."
 msgstr ""
 
 #. The requested speed was too large.
-#: ser-unix.c:810
+#: ser-unix.c:733
 #, possible-c-format
 msgid "Invalid baud rate %d.  Maximum value is %d."
 msgstr ""
 
-#: ser-unix.c:993
+#: ser-unix.c:916
 msgid "Set use of hardware flow control for remote serial I/O."
 msgstr ""
 
-#: ser-unix.c:994
+#: ser-unix.c:917
 msgid "Show use of hardware flow control for remote serial I/O."
 msgstr ""
 
-#: ser-unix.c:995
+#: ser-unix.c:918
 msgid ""
 "Enable or disable hardware flow control (RTS/CTS) on the serial port\n"
 "when debugging using remote targets."
 msgstr ""
 
-#: sh64-tdep.c:1469
+#: sh64-tdep.c:1470
 msgid "sh64_register_convert_to_virtual called with non DR register number"
 msgstr ""
 
-#: sh64-tdep.c:1494
+#: sh64-tdep.c:1495
 msgid "sh64_register_convert_to_raw called with non DR register number"
 msgstr ""
 
@@ -24253,114 +24323,153 @@ msgstr ""
 msgid "Invalid pseudo register number %d\n"
 msgstr ""
 
-#: sh64-tdep.c:2066
+#: sh64-tdep.c:2069
 #, possible-c-format
 msgid "Invalid register number %d\n"
 msgstr ""
 
-#: sh64-tdep.c:2150
+#: sh64-tdep.c:2153
 msgid "Not a valid register for the current processor mode."
 msgstr ""
 
-#: sh-tdep.c:1589
+#: sh-tdep.c:1596
 msgid "sh_register_convert_to_raw called with non DR register number"
 msgstr ""
 
-#: sh-tdep.c:2448
+#: sh-tdep.c:2456
 msgid "Set calling convention used when calling target functions from GDB."
 msgstr ""
 
-#: sh-tdep.c:2450
+#: sh-tdep.c:2458
 msgid "Show calling convention used when calling target functions from GDB."
 msgstr ""
 
-#: sh-tdep.c:2452
+#: sh-tdep.c:2460
 msgid ""
 "gcc       - Use GCC calling convention (default).\n"
 "renesas   - Enforce Renesas calling convention."
 msgstr ""
 
-#: skip.c:81
+#: skip.c:148
 msgid "No default file now."
 msgstr ""
 
-#: skip.c:92
+#: skip.c:159
 #, possible-c-format
-msgid "No source file named %s.\n"
-msgstr ""
-
-#: skip.c:93
-msgid "Ignore file pending future shared library load? "
+msgid "File %s will be skipped when stepping.\n"
 msgstr ""
 
-#: skip.c:108
+#: skip.c:170
 #, possible-c-format
-msgid "File %s will be skipped when stepping.\n"
+msgid "Function %s will be skipped when stepping.\n"
 msgstr ""
 
-#: skip.c:122
+#: skip.c:183
 msgid "No default function now."
 msgstr ""
 
-#: skip.c:127
+#: skip.c:188
 #, possible-c-format
 msgid "No function found containing current program point %s."
 msgstr ""
 
-#: skip.c:137
+#: skip.c:257 skip.c:265 skip.c:273 skip.c:281
 #, possible-c-format
-msgid "No function found named %s.\n"
+msgid "Missing value for %s option."
 msgstr ""
 
-#: skip.c:139
-msgid "Ignore function pending future shared library load? "
+#: skip.c:286
+#, possible-c-format
+msgid "Invalid skip option: %s"
 msgstr ""
 
-#: skip.c:171
-msgid "Not skipping any files or functions.\n"
+#: skip.c:302
+msgid "Cannot specify both -file and -gfile."
+msgstr ""
+
+#: skip.c:305
+msgid "Cannot specify both -function and -rfunction."
+msgstr ""
+
+#: skip.c:318
+msgid "regexp"
+msgstr ""
+
+#: skip.c:330
+msgid "File(s)"
+msgstr ""
+
+#: skip.c:330
+msgid "File"
+msgstr ""
+
+#: skip.c:331
+msgid "file(s)"
+msgstr ""
+
+#: skip.c:333
+msgid "Function(s)"
+msgstr ""
+
+#: skip.c:333
+msgid "Function"
 msgstr ""
 
-#: skip.c:175
+#: skip.c:337 skip.c:342
 #, possible-c-format
-msgid "No skiplist entries found with number %s.\n"
+msgid "%s %s will be skipped when stepping.\n"
+msgstr ""
+
+#: skip.c:347
+#, possible-c-format
+msgid "%s %s in %s %s will be skipped when stepping.\n"
 msgstr ""
 
-#: skip.c:207
-msgid "Skiplist entry should have either a filename or a function name."
+#: skip.c:376
+msgid "Not skipping any files or functions.\n"
 msgstr ""
 
-#: skip.c:241 skip.c:258 skip.c:287
+#: skip.c:379
 #, possible-c-format
-msgid "No skiplist entries found with number %s."
+msgid "No skiplist entries found with number %s.\n"
 msgstr ""
 
-#: skip.c:303
+#: skip.c:449 skip.c:466 skip.c:493
 #, possible-c-format
-msgid "Function %s will be skipped when stepping.\n"
+msgid "No skiplist entries found with number %s."
 msgstr ""
 
-#: skip.c:399
+#: skip.c:685
 msgid ""
 "Ignore a function while stepping.\n"
-"Usage: skip [FUNCTION NAME]\n"
-"If no function name is given, ignore the current function."
+"\n"
+"Usage: skip [FUNCTION-NAME]\n"
+"       skip [<file-spec>] [<function-spec>]\n"
+"If no arguments are given, ignore the current function.\n"
+"\n"
+"<file-spec> is one of:\n"
+"       -fi|-file FILE-NAME\n"
+"       -gfi|-gfile GLOB-FILE-PATTERN\n"
+"<function-spec> is one of:\n"
+"       -fu|-function FUNCTION-NAME\n"
+"       -rfu|-rfunction FUNCTION-NAME-REGULAR-EXPRESSION"
 msgstr ""
 
-#: skip.c:405
+#: skip.c:700
 msgid ""
 "Ignore a file while stepping.\n"
-"Usage: skip file [FILENAME]\n"
+"Usage: skip file [FILE-NAME]\n"
 "If no filename is given, ignore the current file."
 msgstr ""
 
-#: skip.c:412
+#: skip.c:707
 msgid ""
 "Ignore a function while stepping.\n"
-"Usage: skip function [FUNCTION NAME]\n"
+"Usage: skip function [FUNCTION-NAME]\n"
 "If no function name is given, skip the current function."
 msgstr ""
 
-#: skip.c:419
+#: skip.c:714
 msgid ""
 "Enable skip entries.  You can specify numbers (e.g. \"skip enable 1 3\"), "
 "ranges (e.g. \"skip enable 4-8\"), or both (e.g. \"skip enable 1 3 4-8\").\n"
@@ -24370,7 +24479,7 @@ msgid ""
 "Usage: skip enable [NUMBERS AND/OR RANGES]"
 msgstr ""
 
-#: skip.c:426
+#: skip.c:721
 msgid ""
 "Disable skip entries.  You can specify numbers (e.g. \"skip disable 1 3\"), "
 "ranges (e.g. \"skip disable 4-8\"), or both (e.g. \"skip disable 1 3 4-8"
@@ -24381,7 +24490,7 @@ msgid ""
 "Usage: skip disable [NUMBERS AND/OR RANGES]"
 msgstr ""
 
-#: skip.c:433
+#: skip.c:728
 msgid ""
 "Delete skip entries.  You can specify numbers (e.g. \"skip delete 1 3\"), "
 "ranges (e.g. \"skip delete 4-8\"), or both (e.g. \"skip delete 1 3 4-8\").\n"
@@ -24391,7 +24500,7 @@ msgid ""
 "Usage: skip delete [NUMBERS AND/OR RANGES]"
 msgstr ""
 
-#: skip.c:440
+#: skip.c:735
 msgid ""
 "Display the status of skips.  You can specify numbers (e.g. \"skip info 1 3"
 "\"), ranges (e.g. \"skip info 4-8\"), or both (e.g. \"skip info 1 3 4-8\").\n"
@@ -24404,26 +24513,26 @@ msgid ""
 "\tfunction    - ignored function"
 msgstr ""
 
-#: solib-aix.c:137 solib-target.c:65
+#: solib-aix.c:138 solib-target.c:65
 msgid ""
 "Can not parse XML library list; XML support was disabled at compile time"
 msgstr ""
 
-#: solib-aix.c:200 solib-target.c:158
+#: solib-aix.c:201 solib-target.c:161
 #, possible-c-format
 msgid "Library list has unsupported version \"%s\""
 msgstr ""
 
-#: solib-aix.c:269
+#: solib-aix.c:270
 msgid "aix library list"
 msgstr ""
 
-#: solib-aix.c:310
+#: solib-aix.c:311
 #, possible-c-format
 msgid "%s (failed to read TARGET_OBJECT_LIBRARIES_AIX)"
 msgstr ""
 
-#: solib-aix.c:324
+#: solib-aix.c:325
 #, possible-c-format
 msgid "%s (missing XML support?)"
 msgstr ""
@@ -24435,102 +24544,102 @@ msgstr ""
 #. Should never happen, but recover as best as we can (trying
 #. to open pathname without decoding, possibly leading to
 #. a failure), rather than triggering an assert failure).
-#: solib-aix.c:662
+#: solib-aix.c:652
 #, possible-c-format
 msgid "missing '(' in shared object pathname: %s"
 msgstr ""
 
-#: solib-aix.c:675 solib.c:469
+#: solib-aix.c:670 solib.c:488
 #, possible-c-format
 msgid "Could not open `%s' as an executable file: %s"
 msgstr ""
 
-#: solib-aix.c:689
+#: solib-aix.c:680
 #, possible-c-format
 msgid "\"%s\": not in executable format: %s."
 msgstr ""
 
-#: solib-aix.c:711
+#: solib-aix.c:698
 #, possible-c-format
 msgid "\"%s\": member \"%s\" missing."
 msgstr ""
 
-#: solib-aix.c:719
+#: solib-aix.c:705
 #, possible-c-format
 msgid "%s(%s): not in object format: %s."
 msgstr ""
 
-#: solib-aix.c:767
+#: solib-aix.c:751
 #, possible-c-format
 msgid "unable to find TOC entry for pc %s (no section contains this PC)"
 msgstr ""
 
-#: solib-aix.c:773
+#: solib-aix.c:757
 #, possible-c-format
 msgid "unable to find TOC entry for pc %s (%s has no data section)"
 msgstr ""
 
-#: solib-aix.c:808
+#: solib-aix.c:792
 #, possible-c-format
 msgid "solib-aix debugging is %s.\n"
 msgstr ""
 
-#: solib-aix.c:841
+#: solib-aix.c:823
 msgid "Control the debugging traces for the solib-aix module."
 msgstr ""
 
-#: solib-aix.c:842
+#: solib-aix.c:824
 msgid "Show whether solib-aix debugging traces are enabled."
 msgstr ""
 
-#: solib-aix.c:843
+#: solib-aix.c:825
 msgid "When on, solib-aix debugging traces are enabled."
 msgstr ""
 
-#: solib.c:103
+#: solib.c:105
 #, possible-c-format
 msgid ""
 "The search path for loading non-absolute shared library symbol files is %s.\n"
 msgstr ""
 
-#: solib.c:507
+#: solib.c:523
 #, possible-c-format
 msgid "`%s': not in executable format: %s"
 msgstr ""
 
-#: solib.c:514
+#: solib.c:529
 #, possible-c-format
 msgid ""
 "`%s': Shared library architecture %s is not compatible with target "
 "architecture %s."
 msgstr ""
 
-#: solib.c:560
+#: solib.c:575
 msgid "Shared library file name is too long."
 msgstr ""
 
-#: solib.c:565
+#: solib.c:580
 #, possible-c-format
 msgid "Can't find the file sections in `%s': %s"
 msgstr ""
 
-#: solib.c:711
+#: solib.c:726
 #, possible-c-format
 msgid "Error while reading shared library symbols for %s:\n"
 msgstr ""
 
-#: solib.c:903 solib.c:1403
+#: solib.c:918 solib.c:1389
 msgid "Error while mapping shared library sections:\n"
 msgstr ""
 
-#: solib.c:921
+#: solib.c:936
 #, possible-c-format
 msgid ""
 "Could not load shared library symbols for %s.\n"
 "Do you need \"set solib-search-path\" or \"set sysroot\"?"
 msgstr ""
 
-#: solib.c:926
+#: solib.c:941
 #, possible-c-format
 msgid ""
 "Could not load shared library symbols for %d libraries, e.g. %s.\n"
@@ -24538,68 +24647,68 @@ msgid ""
 "Do you need \"set solib-search-path\" or \"set sysroot\"?"
 msgstr ""
 
-#: solib.c:974
+#: solib.c:989
 #, possible-c-format
 msgid "Loading symbols for shared libraries: %s\n"
 msgstr ""
 
-#: solib.c:978 solib.c:1354
+#: solib.c:993 solib.c:1340
 msgid "Loading symbols for shared libraries.\n"
 msgstr ""
 
-#: solib.c:1021
+#: solib.c:1038
 #, possible-c-format
 msgid "Symbols already loaded for %s\n"
 msgstr ""
 
-#: solib.c:1150
+#: solib.c:1160
 msgid "No shared libraries matched.\n"
 msgstr ""
 
-#: solib.c:1153
+#: solib.c:1162
 msgid "No shared libraries loaded at this time.\n"
 msgstr ""
 
-#: solib.c:1159
+#: solib.c:1167
 msgid "(*): Shared library is missing debugging information.\n"
 msgstr ""
 
-#: solib.c:1491
+#: solib.c:1475
 #, possible-c-format
 msgid "\"%s\" is deprecated, use \"%s\" instead."
 msgstr ""
 
-#: solib.c:1493
+#: solib.c:1477
 #, possible-c-format
 msgid "sysroot set to \"%s\"."
 msgstr ""
 
-#: solib.c:1506
+#: solib.c:1490
 #, possible-c-format
 msgid "Autoloading of shared library symbols is %s.\n"
 msgstr ""
 
-#: solib.c:1670
+#: solib.c:1656
 msgid "Load shared object library symbols for files matching REGEXP."
 msgstr ""
 
-#: solib.c:1672
+#: solib.c:1658
 msgid "Status of loaded shared object libraries."
 msgstr ""
 
-#: solib.c:1675
+#: solib.c:1661
 msgid "Unload all shared object library symbols."
 msgstr ""
 
-#: solib.c:1678
+#: solib.c:1664
 msgid "Set autoloading of shared library symbols."
 msgstr ""
 
-#: solib.c:1679
+#: solib.c:1665
 msgid "Show autoloading of shared library symbols."
 msgstr ""
 
-#: solib.c:1680
+#: solib.c:1666
 msgid ""
 "If \"on\", symbols from all shared object libraries will be loaded\n"
 "automatically when the inferior begins execution, when the dynamic linker\n"
@@ -24607,108 +24716,108 @@ msgid ""
 "inferior.  Otherwise, symbols must be loaded manually, using `sharedlibrary'."
 msgstr ""
 
-#: solib.c:1691
+#: solib.c:1677
 msgid "Set an alternate system root."
 msgstr ""
 
-#: solib.c:1692
+#: solib.c:1678
 msgid "Show the current system root."
 msgstr ""
 
-#: solib.c:1693
+#: solib.c:1679
 msgid ""
 "The system root is used to load absolute shared library symbol files.\n"
 "For other (relative) files, you can add directories using\n"
 "`set solib-search-path'."
 msgstr ""
 
-#: solib.c:1707
+#: solib.c:1693
 msgid ""
 "Set the search path for loading non-absolute shared library symbol files."
 msgstr ""
 
-#: solib.c:1709
+#: solib.c:1695
 msgid ""
 "Show the search path for loading non-absolute shared library symbol files."
 msgstr ""
 
-#: solib.c:1711
+#: solib.c:1697
 msgid ""
 "This takes precedence over the environment variables PATH and "
 "LD_LIBRARY_PATH."
 msgstr ""
 
-#: solib-darwin.c:514
+#: solib-darwin.c:542
 #, possible-c-format
 msgid "unhandled dyld version (%d)"
 msgstr ""
 
-#: solib-darwin.c:601
+#: solib-darwin.c:641
 #, possible-c-format
 msgid "`%s': not a shared-library: %s"
 msgstr ""
 
-#: solib-dsbt.c:200
+#: solib-dsbt.c:201
 #, possible-c-format
 msgid "Unsupported map version: %d\n"
 msgstr ""
 
-#: solib-dsbt.c:296
+#: solib-dsbt.c:297
 msgid "Error reading DSBT exec loadmap"
 msgstr ""
 
-#: solib-dsbt.c:306
+#: solib-dsbt.c:307
 msgid "Error reading DSBT interp loadmap"
 msgstr ""
 
-#: solib-dsbt.c:672
+#: solib-dsbt.c:673
 msgid ""
 "dsbt_current_sos: Unable to read link map entry.  Shared object chain may be "
 "incomplete."
 msgstr ""
 
-#: solib-dsbt.c:686
+#: solib-dsbt.c:687
 msgid ""
 "dsbt_current_sos: Unable to read dsbt index.  Shared object chain may be "
 "incomplete."
 msgstr ""
 
-#: solib-dsbt.c:707
+#: solib-dsbt.c:708
 msgid ""
 "dsbt_current_sos: Unable to fetch load map.  Shared object chain may be "
 "incomplete."
 msgstr ""
 
-#: solib-dsbt.c:723 solib-frv.c:408
+#: solib-dsbt.c:724 solib-frv.c:408
 #, possible-c-format
 msgid "Can't read pathname for link map entry: %s."
 msgstr ""
 
-#: solib-dsbt.c:771 solib-frv.c:479 solib-svr4.c:2438
+#: solib-dsbt.c:772 solib-frv.c:479 solib-svr4.c:2515
 msgid ""
 "Unable to find dynamic linker breakpoint function.\n"
 "GDB will be unable to debug shared library initializers\n"
 "and track explicitly loaded dynamic code."
 msgstr ""
 
-#: solib-dsbt.c:1007 solib-frv.c:865
+#: solib-dsbt.c:996 solib-frv.c:849
 msgid "shared library handler failed to enable breakpoint"
 msgstr ""
 
-#: solib-dsbt.c:1060
+#: solib-dsbt.c:1049
 #, possible-c-format
 msgid "solib-dsbt debugging is %s.\n"
 msgstr ""
 
-#: solib-dsbt.c:1086
+#: solib-dsbt.c:1074
 msgid "Set internal debugging of shared library code for DSBT ELF."
 msgstr ""
 
-#: solib-dsbt.c:1087
+#: solib-dsbt.c:1075
 msgid "Show internal debugging of shared library code for DSBT ELF."
 msgstr ""
 
-#: solib-dsbt.c:1088
+#: solib-dsbt.c:1076
 msgid "When non-zero, DSBT solib specific internal debugging is enabled."
 msgstr ""
 
@@ -24724,56 +24833,56 @@ msgid ""
 "incomplete."
 msgstr ""
 
-#: solib-frv.c:578
+#: solib-frv.c:576
 msgid "Unable to determine dynamic linker loadmap address."
 msgstr ""
 
-#: solib-frv.c:592
+#: solib-frv.c:589
 #, possible-c-format
 msgid "Unable to load dynamic linker loadmap at address %s."
 msgstr ""
 
-#: solib-frv.c:626
+#: solib-frv.c:624
 msgid "Could not find symbol _dl_debug_addr in dynamic linker"
 msgstr ""
 
-#: solib-frv.c:650
+#: solib-frv.c:647
 #, possible-c-format
 msgid ""
 "Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic "
 "linker"
 msgstr ""
 
-#: solib-frv.c:676
+#: solib-frv.c:673
 #, possible-c-format
 msgid ""
 "Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker"
 msgstr ""
 
-#: solib-frv.c:688
+#: solib-frv.c:684
 #, possible-c-format
 msgid ""
 "Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from "
 "dynamic linker"
 msgstr ""
 
-#: solib-frv.c:798
+#: solib-frv.c:782
 msgid "Unable to load the executable's loadmap."
 msgstr ""
 
-#: solib-frv.c:1189
+#: solib-frv.c:1171
 msgid "Set internal debugging of shared library code for FR-V."
 msgstr ""
 
-#: solib-frv.c:1190
+#: solib-frv.c:1172
 msgid "Show internal debugging of shared library code for FR-V."
 msgstr ""
 
-#: solib-frv.c:1191
+#: solib-frv.c:1173
 msgid "When non-zero, FR-V solib specific internal debugging is enabled."
 msgstr ""
 
-#: solib-spu.c:366
+#: solib-spu.c:363
 #, possible-c-format
 msgid "Cannot read SPE executable at %s"
 msgstr ""
@@ -24804,35 +24913,35 @@ msgid ""
 "version mismatch?)"
 msgstr ""
 
-#: solib-svr4.c:995
+#: solib-svr4.c:1031
 msgid "Attempt to reload symbols from process? "
 msgstr ""
 
-#: solib-svr4.c:1035
+#: solib-svr4.c:1071
 #, possible-c-format
 msgid "failed to read exec filename from attached file: %s"
 msgstr ""
 
-#: solib-svr4.c:1167
+#: solib-svr4.c:1208
 #, possible-c-format
 msgid "SVR4 Library list has unsupported version \"%s\""
 msgstr ""
 
-#: solib-svr4.c:1224 solib-target.c:236
+#: solib-svr4.c:1265 solib-target.c:239
 msgid "target library list"
 msgstr ""
 
-#: solib-svr4.c:1344
+#: solib-svr4.c:1385
 #, possible-c-format
 msgid "Corrupted shared library list: %s != %s"
 msgstr ""
 
-#: solib-svr4.c:1376
+#: solib-svr4.c:1417
 #, possible-c-format
 msgid "Can't read pathname for load map: %s."
 msgstr ""
 
-#: solib-svr4.c:1846
+#: solib-svr4.c:1903
 msgid ""
 "Probes-based dynamic linker interface failed.\n"
 "Reverting to original interface.\n"
@@ -24841,272 +24950,272 @@ msgstr ""
 #. It can be printed repeatedly as there is no easy way to check
 #. the executable symbols/file has been already relocated to
 #. displacement.
-#: solib-svr4.c:2911
+#: solib-svr4.c:2980
 #, possible-c-format
 msgid ""
 "Using PIE (Position Independent Executable) displacement %s for \"%s\".\n"
 msgstr ""
 
-#: solib-target.c:90 solib-target.c:107
+#: solib-target.c:91 solib-target.c:109
 msgid "Library list with both segments and sections"
 msgstr ""
 
-#: solib-target.c:138
+#: solib-target.c:141
 msgid "No segment or section bases defined"
 msgstr ""
 
-#: solib-target.c:365
+#: solib-target.c:364
 #, possible-c-format
 msgid ""
 "Could not relocate shared library \"%s\": wrong number of ALLOC sections"
 msgstr ""
 
-#: solib-target.c:414
+#: solib-target.c:413
 #, possible-c-format
 msgid "Could not relocate shared library \"%s\": no segments"
 msgstr ""
 
-#: solib-target.c:430
+#: solib-target.c:429
 #, possible-c-format
 msgid "Could not relocate shared library \"%s\": bad offsets"
 msgstr ""
 
-#: sol-thread.c:252
+#: sol-thread.c:278
 #, possible-c-format
 msgid "thread_to_lwp: td_ta_map_id2thr %s"
 msgstr ""
 
-#: sol-thread.c:258
+#: sol-thread.c:284
 #, possible-c-format
 msgid "thread_to_lwp: td_thr_get_info: %s"
 msgstr ""
 
-#: sol-thread.c:264
+#: sol-thread.c:290
 #, possible-c-format
 msgid "thread_to_lwp: thread state not active: %s"
 msgstr ""
 
-#: sol-thread.c:295
+#: sol-thread.c:321
 #, possible-c-format
 msgid "lwp_to_thread: td_ta_map_lwp2thr: %s."
 msgstr ""
 
-#: sol-thread.c:301
+#: sol-thread.c:327
 #, possible-c-format
 msgid "lwp_to_thread: td_thr_validate: %s."
 msgstr ""
 
-#: sol-thread.c:307
+#: sol-thread.c:333
 #, possible-c-format
 msgid "lwp_to_thread: td_thr_get_info: %s."
 msgstr ""
 
 #. Inactive thread.
-#: sol-thread.c:359 sol-thread.c:395
+#: sol-thread.c:385 sol-thread.c:421
 msgid "This version of Solaris can't start inactive threads."
 msgstr ""
 
-#: sol-thread.c:361 sol-thread.c:397
+#: sol-thread.c:387 sol-thread.c:423
 #, possible-c-format
 msgid "Specified thread %ld seems to have terminated"
 msgstr ""
 
-#: sol-thread.c:450
+#: sol-thread.c:476
 msgid "sol_thread_fetch_registers: thread == 0"
 msgstr ""
 
-#: sol-thread.c:454
+#: sol-thread.c:480
 #, possible-c-format
 msgid "sol_thread_fetch_registers: td_ta_map_id2thr: %s"
 msgstr ""
 
-#: sol-thread.c:461
+#: sol-thread.c:487
 #, possible-c-format
 msgid "sol_thread_fetch_registers: td_thr_getgregs %s"
 msgstr ""
 
-#: sol-thread.c:471
+#: sol-thread.c:497
 #, possible-c-format
 msgid "sol_thread_fetch_registers: td_thr_getfpregs %s"
 msgstr ""
 
-#: sol-thread.c:506
+#: sol-thread.c:532
 #, possible-c-format
 msgid "sol_thread_store_registers: td_ta_map_id2thr %s"
 msgstr ""
 
-#: sol-thread.c:519
+#: sol-thread.c:545
 #, possible-c-format
 msgid "sol_thread_store_registers: td_thr_getgregs %s"
 msgstr ""
 
-#: sol-thread.c:523
+#: sol-thread.c:549
 #, possible-c-format
 msgid "sol_thread_store_registers: td_thr_getfpregs %s"
 msgstr ""
 
-#: sol-thread.c:535
+#: sol-thread.c:561
 #, possible-c-format
 msgid "sol_thread_store_registers: td_thr_setgregs %s"
 msgstr ""
 
-#: sol-thread.c:539
+#: sol-thread.c:565
 #, possible-c-format
 msgid "sol_thread_store_registers: td_thr_setfpregs %s"
 msgstr ""
 
-#: sol-thread.c:603
+#: sol-thread.c:629
 #, possible-c-format
 msgid "sol_thread_new_objfile: td_init: %s"
 msgstr ""
 
-#: sol-thread.c:631
+#: sol-thread.c:657
 #, possible-c-format
 msgid "Cannot initialize thread debugging library: %s"
 msgstr ""
 
-#: sol-thread.c:1166
+#: sol-thread.c:1192
 msgid "info sol-thread: failed to get info for thread."
 msgstr ""
 
-#: sol-thread.c:1282
+#: sol-thread.c:1308
 msgid "Show info on Solaris user threads."
 msgstr ""
 
-#: source.c:103
+#: source.c:105
 #, possible-c-format
 msgid "Number of source lines gdb will list by default is %s.\n"
 msgstr ""
 
-#: source.c:126
+#: source.c:128
 #, possible-c-format
 msgid "Filenames are displayed as \"%s\".\n"
 msgstr ""
 
-#: source.c:321
+#: source.c:323
 msgid "Can't find a default source file"
 msgstr ""
 
-#: source.c:432
+#: source.c:434
 msgid "Reinitialize source path to empty? "
 msgstr ""
 
-#: source.c:661
+#: source.c:663
 msgid "No current source file.\n"
 msgstr ""
 
-#: source.c:666
+#: source.c:668
 #, possible-c-format
 msgid "Current source file is %s\n"
 msgstr ""
 
-#: source.c:668
+#: source.c:670
 #, possible-c-format
 msgid "Compilation directory is %s\n"
 msgstr ""
 
-#: source.c:670
+#: source.c:672
 #, possible-c-format
 msgid "Located in %s\n"
 msgstr ""
 
-#: source.c:672
+#: source.c:674
 #, possible-c-format
 msgid "Contains %d line%s.\n"
 msgstr ""
 
-#: source.c:675
+#: source.c:677
 #, possible-c-format
 msgid "Source language is %s.\n"
 msgstr ""
 
-#: source.c:676
+#: source.c:678
 #, possible-c-format
 msgid "Producer is %s.\n"
 msgstr ""
 
-#: source.c:679
+#: source.c:681
 #, possible-c-format
 msgid "Compiled with %s debugging format.\n"
 msgstr ""
 
-#: source.c:681
+#: source.c:683
 #, possible-c-format
 msgid "%s preprocessor macro info.\n"
 msgstr ""
 
-#: source.c:1180
+#: source.c:1208
 msgid "invalid filename_display_string"
 msgstr ""
 
-#: source.c:1210
+#: source.c:1238
 msgid "Source file is more recent than executable."
 msgstr ""
 
-#: source.c:1416
+#: source.c:1441
 #, possible-c-format
 msgid "Line number %d out of range; %s has %d lines."
 msgstr ""
 
-#: source.c:1536
+#: source.c:1560
 msgid "No line number information available"
 msgstr ""
 
 #. Is there any case in which we get here, and have an address
 #. which the user would want to see?  If we have debugging symbols
 #. and no line numbers?
-#: source.c:1596
+#: source.c:1620
 #, possible-c-format
 msgid "Line number %d is out of range for \"%s\".\n"
 msgstr ""
 
-#: source.c:1632 source.c:1721
+#: source.c:1656 source.c:1745
 msgid "Expression not found"
 msgstr ""
 
-#: source.c:1689 source.c:1775
+#: source.c:1713 source.c:1799
 msgid "Expression not found\n"
 msgstr ""
 
-#: source.c:1886
+#: source.c:1909
 msgid "Too many arguments in command"
 msgstr ""
 
-#: source.c:1895
+#: source.c:1918
 #, possible-c-format
 msgid "Source path substitution rule matching `%s':\n"
 msgstr ""
 
-#: source.c:1897
+#: source.c:1920
 msgid "List of all source path substitution rules:\n"
 msgstr ""
 
-#: source.c:1924 source.c:1980
+#: source.c:1947 source.c:2003
 msgid "Incorrect usage, too many arguments in command"
 msgstr ""
 
-#: source.c:1934
+#: source.c:1957
 msgid "Delete all source path substitution rules? "
 msgstr ""
 
-#: source.c:1935
+#: source.c:1958
 msgid "Canceled"
 msgstr ""
 
-#: source.c:1957
+#: source.c:1980
 #, possible-c-format
 msgid "No substitution rule defined for `%s'"
 msgstr ""
 
-#: source.c:1977
+#: source.c:2000
 msgid "Incorrect usage, too few arguments in command"
 msgstr ""
 
-#: source.c:1983
+#: source.c:2006
 msgid "First argument must be at least one character long"
 msgstr ""
 
-#: source.c:2020
+#: source.c:2043
 msgid ""
 "Add directory DIR to beginning of search path for source files.\n"
 "Forget cached info on source file locations and line positions.\n"
@@ -25115,15 +25224,15 @@ msgid ""
 "With no argument, reset the search path to $cdir:$cwd, the default."
 msgstr ""
 
-#: source.c:2036
+#: source.c:2059
 msgid "Set the search path for finding source files."
 msgstr ""
 
-#: source.c:2038
+#: source.c:2061
 msgid "Show the search path for finding source files."
 msgstr ""
 
-#: source.c:2040
+#: source.c:2063
 msgid ""
 "$cwd in the path means the current working directory.\n"
 "$cdir in the path means the compilation directory of the source file.\n"
@@ -25132,11 +25241,11 @@ msgid ""
 "Setting the value to an empty string sets it to $cdir:$cwd, the default."
 msgstr ""
 
-#: source.c:2051
+#: source.c:2074
 msgid "Information about the current source file."
 msgstr ""
 
-#: source.c:2053
+#: source.c:2076
 msgid ""
 "Core addresses of the code for a source line.\n"
 "Line can be specified as\n"
@@ -25151,35 +25260,35 @@ msgid ""
 "The address is also stored as the value of \"$_\"."
 msgstr ""
 
-#: source.c:2065
+#: source.c:2088
 msgid ""
 "Search for regular expression (see regex(3)) from last line listed.\n"
 "The matching line number is also stored as the value of \"$_\"."
 msgstr ""
 
-#: source.c:2071
+#: source.c:2094
 msgid ""
 "Search backward for regular expression (see regex(3)) from last line "
 "listed.\n"
 "The matching line number is also stored as the value of \"$_\"."
 msgstr ""
 
-#: source.c:2076
+#: source.c:2099
 msgid "Set number of source lines gdb will list by default."
 msgstr ""
 
-#: source.c:2077
+#: source.c:2100
 msgid "Show number of source lines gdb will list by default."
 msgstr ""
 
-#: source.c:2078
+#: source.c:2101
 msgid ""
 "Use this to choose how many source lines the \"list\" displays (unless\n"
 "the \"list\" argument explicitly specifies some other number).\n"
 "A value of \"unlimited\", or zero, means there's no limit."
 msgstr ""
 
-#: source.c:2087
+#: source.c:2110
 msgid ""
 "Usage: set substitute-path FROM TO\n"
 "Add a substitution rule replacing FROM into TO in source file names.\n"
@@ -25187,7 +25296,7 @@ msgid ""
 "is replaced by the new one."
 msgstr ""
 
-#: source.c:2095
+#: source.c:2118
 msgid ""
 "Usage: unset substitute-path [FROM]\n"
 "Delete the rule for substituting FROM in source file names.  If FROM\n"
@@ -25195,22 +25304,22 @@ msgid ""
 "If the debugger cannot find a rule for FROM, it will display a warning."
 msgstr ""
 
-#: source.c:2103
+#: source.c:2126
 msgid ""
 "Usage: show substitute-path [FROM]\n"
 "Print the rule for substituting FROM in source file names. If FROM\n"
 "is not specified, print all substitution rules."
 msgstr ""
 
-#: source.c:2111
+#: source.c:2134
 msgid "Set how to display filenames."
 msgstr ""
 
-#: source.c:2112
+#: source.c:2135
 msgid "Show how to display filenames."
 msgstr ""
 
-#: source.c:2113
+#: source.c:2136
 msgid ""
 "filename-display can be:\n"
 "  basename - display only basename of a filename\n"
@@ -25219,6 +25328,16 @@ msgid ""
 "By default, relative filenames are displayed."
 msgstr ""
 
+#: sparc64-tdep.c:288
+#, possible-c-format
+msgid "sparc64_pseudo_register_name: bad register number %d"
+msgstr ""
+
+#: sparc64-tdep.c:328
+#, possible-c-format
+msgid "sparc64_pseudo_register_type: bad register number %d"
+msgstr ""
+
 #: sparc-nat.c:235
 msgid "Couldn't get floating-point registers"
 msgstr ""
@@ -25231,215 +25350,221 @@ msgstr ""
 msgid "Couldn't get StackGhost cookie"
 msgstr ""
 
-#: spu-linux-nat.c:480
+#: sparc-tdep.c:345
+#, possible-c-format
+msgid "sparc32_pseudo_register_name: bad register number %d"
+msgstr ""
+
+#: sparc-tdep.c:432
+#, possible-c-format
+msgid "sparc32_pseudo_register_type: bad register number %d"
+msgstr ""
+
+#: spu-linux-nat.c:474
 #, possible-c-format
 msgid "Child process unexpectedly missing: %s"
 msgstr ""
 
-#: spu-tdep.c:1671 spu-tdep.c:1675
-msgid "Could not determine address of single-step breakpoint."
+#: spu-tdep.c:1629
+#, possible-c-format
+msgid "Could not read instruction at %s."
 msgstr ""
 
-#: spu-tdep.c:2096 spu-tdep.c:2153 spu-tdep.c:2274 spu-tdep.c:2516
-#: spu-tdep.c:2595
+#: spu-tdep.c:2078 spu-tdep.c:2135 spu-tdep.c:2256 spu-tdep.c:2497
+#: spu-tdep.c:2576
 msgid "\"info spu\" is only supported on the SPU architecture."
 msgstr ""
 
-#: spu-tdep.c:2104
+#: spu-tdep.c:2086
 msgid "Could not read event_status."
 msgstr ""
 
-#: spu-tdep.c:2112
+#: spu-tdep.c:2094
 msgid "Could not read event_mask."
 msgstr ""
 
-#: spu-tdep.c:2127
+#: spu-tdep.c:2109
 #, possible-c-format
 msgid "Event Status 0x%s\n"
 msgstr ""
 
-#: spu-tdep.c:2128
+#: spu-tdep.c:2110
 #, possible-c-format
 msgid "Event Mask   0x%s\n"
 msgstr ""
 
-#: spu-tdep.c:2160
+#: spu-tdep.c:2142
 msgid "Could not read signal1."
 msgstr ""
 
-#: spu-tdep.c:2171
+#: spu-tdep.c:2153
 msgid "Could not read signal1_type."
 msgstr ""
 
-#: spu-tdep.c:2178
+#: spu-tdep.c:2160
 msgid "Could not read signal2."
 msgstr ""
 
-#: spu-tdep.c:2189
+#: spu-tdep.c:2171
 msgid "Could not read signal2_type."
 msgstr ""
 
-#: spu-tdep.c:2207
+#: spu-tdep.c:2189
 #, possible-c-format
 msgid "Signal 1 control word 0x%s "
 msgstr ""
 
-#: spu-tdep.c:2209
+#: spu-tdep.c:2191
 msgid "Signal 1 not pending "
 msgstr ""
 
-#: spu-tdep.c:2212 spu-tdep.c:2222
+#: spu-tdep.c:2194 spu-tdep.c:2204
 msgid "(Type Or)\n"
 msgstr ""
 
-#: spu-tdep.c:2214 spu-tdep.c:2224
+#: spu-tdep.c:2196 spu-tdep.c:2206
 msgid "(Type Overwrite)\n"
 msgstr ""
 
-#: spu-tdep.c:2217
+#: spu-tdep.c:2199
 #, possible-c-format
 msgid "Signal 2 control word 0x%s "
 msgstr ""
 
-#: spu-tdep.c:2219
+#: spu-tdep.c:2201
 msgid "Signal 2 not pending "
 msgstr ""
 
-#: spu-tdep.c:2284
+#: spu-tdep.c:2266
 msgid "Could not read mbox_info."
 msgstr ""
 
-#: spu-tdep.c:2293
+#: spu-tdep.c:2275
 msgid "Could not read ibox_info."
 msgstr ""
 
-#: spu-tdep.c:2302
+#: spu-tdep.c:2284
 msgid "Could not read wbox_info."
 msgstr ""
 
-#: spu-tdep.c:2524
+#: spu-tdep.c:2505
 msgid "Could not read dma_info."
 msgstr ""
 
-#: spu-tdep.c:2554 spu-tdep.c:2627
+#: spu-tdep.c:2535 spu-tdep.c:2608
 msgid "no query pending"
 msgstr ""
 
-#: spu-tdep.c:2559 spu-tdep.c:2628
+#: spu-tdep.c:2540 spu-tdep.c:2609
 msgid "'any' query pending"
 msgstr ""
 
-#: spu-tdep.c:2560 spu-tdep.c:2629
+#: spu-tdep.c:2541 spu-tdep.c:2610
 msgid "'all' query pending"
 msgstr ""
 
-#: spu-tdep.c:2561 spu-tdep.c:2630
+#: spu-tdep.c:2542 spu-tdep.c:2611
 msgid "undefined query type"
 msgstr ""
 
-#: spu-tdep.c:2564 spu-tdep.c:2633
+#: spu-tdep.c:2545 spu-tdep.c:2614
 #, possible-c-format
 msgid "Tag-Group Status  0x%s\n"
 msgstr ""
 
-#: spu-tdep.c:2566 spu-tdep.c:2635
+#: spu-tdep.c:2547 spu-tdep.c:2616
 #, possible-c-format
 msgid "Tag-Group Mask    0x%s (%s)\n"
 msgstr ""
 
-#: spu-tdep.c:2568
+#: spu-tdep.c:2549
 #, possible-c-format
 msgid "Stall-and-Notify  0x%s\n"
 msgstr ""
 
-#: spu-tdep.c:2570
+#: spu-tdep.c:2551
 #, possible-c-format
 msgid "Atomic Cmd Status 0x%s\n"
 msgstr ""
 
-#: spu-tdep.c:2603
+#: spu-tdep.c:2584
 msgid "Could not read proxydma_info."
 msgstr ""
 
-#: spu-tdep.c:2647
+#: spu-tdep.c:2628
 msgid "\"info spu\" must be followed by the name of an SPU facility.\n"
 msgstr ""
 
-#: spu-tdep.c:2671
+#: spu-tdep.c:2652
 #, possible-c-format
 msgid "Stopping for new SPE threads is %s.\n"
 msgstr ""
 
-#: spu-tdep.c:2679
+#: spu-tdep.c:2660
 #, possible-c-format
 msgid "Automatic software-cache flush is %s.\n"
 msgstr ""
 
-#: spu-tdep.c:2825 spu-tdep.c:2828 spu-tdep.c:2863
+#: spu-tdep.c:2807 spu-tdep.c:2810 spu-tdep.c:2845
 msgid "Various SPU specific commands."
 msgstr ""
 
-#: spu-tdep.c:2834
+#: spu-tdep.c:2816
 msgid "Set whether to stop for new SPE threads."
 msgstr ""
 
-#: spu-tdep.c:2836
+#: spu-tdep.c:2818
 msgid "Show whether to stop for new SPE threads."
 msgstr ""
 
-#: spu-tdep.c:2838
+#: spu-tdep.c:2820
 msgid ""
 "Use \"on\" to give control to the user when a new SPE thread\n"
 "enters its \"main\" function.\n"
 "Use \"off\" to disable stopping for new SPE threads."
 msgstr ""
 
-#: spu-tdep.c:2849
+#: spu-tdep.c:2831
 msgid "Set whether to automatically flush the software-managed cache."
 msgstr ""
 
-#: spu-tdep.c:2851
+#: spu-tdep.c:2833
 msgid "Show whether to automatically flush the software-managed cache."
 msgstr ""
 
-#: spu-tdep.c:2853
+#: spu-tdep.c:2835
 msgid ""
 "Use \"on\" to automatically flush the software-managed cache\n"
 "whenever SPE execution stops.\n"
 "Use \"off\" to never automatically flush the software-managed cache."
 msgstr ""
 
-#: spu-tdep.c:2868
+#: spu-tdep.c:2850
 msgid "Display SPU event facility status.\n"
 msgstr ""
 
-#: spu-tdep.c:2871
+#: spu-tdep.c:2853
 msgid "Display SPU signal notification facility status.\n"
 msgstr ""
 
-#: spu-tdep.c:2874
+#: spu-tdep.c:2856
 msgid "Display SPU mailbox facility status.\n"
 msgstr ""
 
-#: spu-tdep.c:2877
+#: spu-tdep.c:2859
 msgid "Display MFC DMA status.\n"
 msgstr ""
 
-#: spu-tdep.c:2880
+#: spu-tdep.c:2862
 msgid "Display MFC Proxy-DMA status.\n"
 msgstr ""
 
-#: stabsread.c:165
+#: stabsread.c:166
 #, possible-c-format
 msgid "invalid C++ abbreviation `%s'"
 msgstr ""
 
-#: stabsread.c:172
-#, possible-c-format
-msgid "register number %d too large (max %d) in symbol %s"
-msgstr ""
-
-#: stabsread.c:251
+#: stabsread.c:252
 #, possible-c-format
 msgid "Invalid symbol data: type number (%d,%d) out of range at symtab pos %d."
 msgstr ""
@@ -25448,92 +25573,92 @@ msgstr ""
 msgid "GDB internal error: bad real_filenum"
 msgstr ""
 
-#: stabsread.c:658
+#: stabsread.c:676
 #, possible-c-format
 msgid "Bad stabs string '%s'"
 msgstr ""
 
-#: stabsread.c:710
+#: stabsread.c:728
 #, possible-c-format
 msgid "Unknown C++ symbol name `%s'"
 msgstr ""
 
-#: stabsread.c:1474
+#: stabsread.c:1496
 msgid "couldn't parse type; debugger out of date?"
 msgstr ""
 
-#: stabsread.c:1595
+#: stabsread.c:1617
 #, possible-c-format
 msgid "Unrecognized cross-reference type `%c'"
 msgstr ""
 
-#: stabsread.c:1823
+#: stabsread.c:1847
 #, possible-c-format
 msgid ""
 "Prototyped function type didn't end arguments with `#':\n"
 "%s"
 msgstr ""
 
-#: stabsread.c:1936
+#: stabsread.c:1960
 #, possible-c-format
 msgid "invalid (minimal) member type data format at symtab pos %d."
 msgstr ""
 
-#: stabsread.c:2040
+#: stabsread.c:2064
 msgid "GDB internal error, type is NULL in stabsread.c."
 msgstr ""
 
-#: stabsread.c:2068
+#: stabsread.c:2092
 #, possible-c-format
 msgid "Unknown builtin type %d"
 msgstr ""
 
-#: stabsread.c:2244
+#: stabsread.c:2259
 #, possible-c-format
 msgid "Method has bad physname %s\n"
 msgstr ""
 
-#: stabsread.c:2440
+#: stabsread.c:2451
 #, possible-c-format
 msgid "const/volatile indicator missing, got '%c'"
 msgstr ""
 
-#: stabsread.c:2524
+#: stabsread.c:2535
 #, possible-c-format
 msgid "member function type missing, got '%c'"
 msgstr ""
 
-#: stabsread.c:2801
+#: stabsread.c:2812
 #, possible-c-format
 msgid "C++ abbreviated type name unknown at symtab pos %d"
 msgstr ""
 
-#: stabsread.c:3163
+#: stabsread.c:3174
 #, possible-c-format
 msgid "Unknown virtual character `%c' for baseclass"
 msgstr ""
 
-#: stabsread.c:3181
+#: stabsread.c:3192
 #, possible-c-format
 msgid "Unknown visibility `%c' for baseclass"
 msgstr ""
 
-#: stabsread.c:3290
+#: stabsread.c:3301
 #, possible-c-format
 msgid "virtual function table pointer not found when defining class `%s'"
 msgstr ""
 
-#: stabsread.c:3403
+#: stabsread.c:3414
 #, possible-c-format
 msgid "Unknown visibility `%c' for field"
 msgstr ""
 
-#: stabsread.c:3445
+#: stabsread.c:3456
 #, possible-c-format
 msgid "struct/union type gets multiply defined: %s%s"
 msgstr ""
 
-#: stabsread.c:4250
+#: stabsread.c:4254
 #, possible-c-format
 msgid "base type %d of range type is not defined"
 msgstr ""
@@ -25542,33 +25667,33 @@ msgstr ""
 #. output contained `(0,41),(0,42)=@s8;-16;,(0,43),(0,1);' where should
 #. have been present ";-16,(0,43)" reference instead.  This way the
 #. excessive ";" marker prematurely stops the parameters parsing.
-#: stabsread.c:4291
+#: stabsread.c:4295
 msgid "Invalid (empty) method arguments"
 msgstr ""
 
-#: stabsread.c:4335
+#: stabsread.c:4338
 msgid "Invalid symbol data: common block within common block"
 msgstr ""
 
-#: stabsread.c:4361
+#: stabsread.c:4364
 msgid "ECOMM symbol unmatched by BCOMM"
 msgstr ""
 
-#: stabsread.c:4563
+#: stabsread.c:4566
 msgid "need a type name"
 msgstr ""
 
-#: stabsread.c:4590
+#: stabsread.c:4593
 #, possible-c-format
 msgid "forward-referenced types left unresolved, type code %d."
 msgstr ""
 
-#: stabsread.c:4742
+#: stabsread.c:4745
 #, possible-c-format
 msgid "%s: common block `%s' from global_sym_chain unresolved"
 msgstr ""
 
-#: stabsread.c:4823 stabsread.c:4828
+#: stabsread.c:4826 stabsread.c:4831
 #, possible-c-format
 msgid "invalid symbol name \"%s\""
 msgstr ""
@@ -25582,16 +25707,16 @@ msgstr ""
 msgid "Trying to set NULL pspace."
 msgstr ""
 
-#: stack.c:1321 stack.c:1401
+#: stack.c:1322 stack.c:1402
 msgid "Too many args in frame specification"
 msgstr ""
 
-#: stack.c:1490
+#: stack.c:1485
 #, possible-c-format
 msgid "Stack level %d, frame at "
 msgstr ""
 
-#: stack.c:1495
+#: stack.c:1490
 msgid "Stack frame at "
 msgstr ""
 
@@ -25600,32 +25725,32 @@ msgstr ""
 msgid " Outermost frame: %s\n"
 msgstr ""
 
-#: stack.c:1861
+#: stack.c:1862
 msgid "(More stack frames follow...)\n"
 msgstr ""
 
-#: stack.c:1871
+#: stack.c:1872
 #, possible-c-format
 msgid "Backtrace stopped: %s\n"
 msgstr ""
 
-#: stack.c:2096
+#: stack.c:2099
 msgid "PC unavailable, cannot determine locals.\n"
 msgstr ""
 
-#: stack.c:2120
+#: stack.c:2141
 msgid "No locals.\n"
 msgstr ""
 
-#: stack.c:2179
+#: stack.c:2200
 msgid "PC unavailable, cannot determine args.\n"
 msgstr ""
 
-#: stack.c:2202
+#: stack.c:2223
 msgid "No arguments.\n"
 msgstr ""
 
-#: stack.c:2314
+#: stack.c:2344
 msgid "Initial frame selected; you cannot go up."
 msgstr ""
 
@@ -25633,44 +25758,44 @@ msgstr ""
 #. "down" means to really go down (and let me know if that is
 #. impossible), but "down 9999" can be used to mean go all the
 #. way down without getting an error.
-#: stack.c:2351
+#: stack.c:2381
 msgid "Bottom (innermost) frame selected; you cannot go down."
 msgstr ""
 
-#: stack.c:2388
+#: stack.c:2417
 msgid "Can not force return from an inlined function."
 msgstr ""
 
-#: stack.c:2412
+#: stack.c:2440
 msgid ""
 "Return value type not available for selected stack frame.\n"
 "Please use an explicit cast of the value to return."
 msgstr ""
 
-#: stack.c:2460
+#: stack.c:2487
 #, possible-c-format
 msgid "%sMake selected stack frame return now? "
 msgstr ""
 
-#: stack.c:2465
+#: stack.c:2492
 msgid "Function does not return normally to caller."
 msgstr ""
 
-#: stack.c:2466
+#: stack.c:2493
 #, possible-c-format
 msgid "%sMake %s return now? "
 msgstr ""
 
-#: stack.c:2470
+#: stack.c:2497
 msgid "Not confirmed"
 msgstr ""
 
-#: stack.c:2558
+#: stack.c:2583
 #, possible-c-format
 msgid "'%s' not within current stack frame.\n"
 msgstr ""
 
-#: stack.c:2615
+#: stack.c:2595
 msgid ""
 "Make selected stack frame return to its caller.\n"
 "Control remains in the debugger, but when you continue\n"
@@ -25678,49 +25803,47 @@ msgid ""
 "If an argument is given, it is an expression for the value to return."
 msgstr ""
 
-#: stack.c:2621
+#: stack.c:2601
 msgid ""
 "Select and print stack frame that called this one.\n"
 "An argument says how many frames up to go."
 msgstr ""
 
-#: stack.c:2624
+#: stack.c:2604
 msgid ""
 "Same as the `up' command, but does not print anything.\n"
 "This is useful in command scripts."
 msgstr ""
 
-#: stack.c:2628
+#: stack.c:2608
 msgid ""
 "Select and print stack frame called by this one.\n"
 "An argument says how many frames down to go."
 msgstr ""
 
-#: stack.c:2633
+#: stack.c:2613
 msgid ""
 "Same as the `down' command, but does not print anything.\n"
 "This is useful in command scripts."
 msgstr ""
 
-#: stack.c:2637
+#: stack.c:2617
 msgid ""
 "Select and print a stack frame.\n"
 "With no argument, print the selected stack frame.  (See also \"info frame"
 "\").\n"
 "An argument specifies the frame to select.\n"
 "It can be a stack frame number or the address of the frame.\n"
-"With argument, nothing is printed if input is coming from\n"
-"a command file or a user-defined command."
 msgstr ""
 
-#: stack.c:2647
+#: stack.c:2625
 msgid ""
 "Select a stack frame without printing anything.\n"
 "An argument specifies the frame to select.\n"
 "It can be a stack frame number or the address of the frame.\n"
 msgstr ""
 
-#: stack.c:2652
+#: stack.c:2631
 msgid ""
 "Print backtrace of all stack frames, or innermost COUNT frames.\n"
 "With a negative argument, print outermost -COUNT frames.\n"
@@ -25729,61 +25852,61 @@ msgid ""
 "on this backtrace.\n"
 msgstr ""
 
-#: stack.c:2662
+#: stack.c:2641
 msgid "Backtrace of the stack, or innermost COUNT frames."
 msgstr ""
 
-#: stack.c:2665
+#: stack.c:2644
 msgid "All about selected stack frame, or frame at ADDR."
 msgstr ""
 
-#: stack.c:2668
+#: stack.c:2647
 msgid "Local variables of current stack frame."
 msgstr ""
 
-#: stack.c:2670
+#: stack.c:2649
 msgid "Argument variables of current stack frame."
 msgstr ""
 
-#: stack.c:2673
+#: stack.c:2652
 msgid ""
 "Select the stack frame that contains <func>.\n"
 "Usage: func <name>\n"
 msgstr ""
 
-#: stack.c:2679
+#: stack.c:2658
 msgid "Set printing of non-scalar frame arguments"
 msgstr ""
 
-#: stack.c:2680
+#: stack.c:2659
 msgid "Show printing of non-scalar frame arguments"
 msgstr ""
 
-#: stack.c:2684
+#: stack.c:2663
 msgid "Set whether to print frame arguments in raw form."
 msgstr ""
 
-#: stack.c:2685
+#: stack.c:2664
 msgid "Show whether to print frame arguments in raw form."
 msgstr ""
 
-#: stack.c:2686
+#: stack.c:2665
 msgid ""
 "If set, frame arguments are printed in raw form, bypassing any\n"
 "pretty-printers for that value."
 msgstr ""
 
-#: stack.c:2693
+#: stack.c:2672
 msgid ""
 "Set whether to disassemble next source line or insn when execution stops."
 msgstr ""
 
-#: stack.c:2695
+#: stack.c:2674
 msgid ""
 "Show whether to disassemble next source line or insn when execution stops."
 msgstr ""
 
-#: stack.c:2697
+#: stack.c:2676
 msgid ""
 "If ON, GDB will display disassembly of the next source line, in addition\n"
 "to displaying the source line itself.  If the next source line cannot\n"
@@ -25796,15 +25919,15 @@ msgid ""
 "source line."
 msgstr ""
 
-#: stack.c:2714
+#: stack.c:2693
 msgid "Set printing of function arguments at function entry"
 msgstr ""
 
-#: stack.c:2716
+#: stack.c:2695
 msgid "Show printing of function arguments at function entry"
 msgstr ""
 
-#: stack.c:2718
+#: stack.c:2697
 msgid ""
 "GDB can sometimes determine the values of function arguments at entry,\n"
 "in addition to their current values.  This option tells GDB whether\n"
@@ -25817,13 +25940,14 @@ msgstr ""
 msgid "SystemTap Probe expression debugging is %s.\n"
 msgstr ""
 
-#: stap-probe.c:317
+#: stap-probe.c:316
 #, possible-c-format
 msgid "Invalid opcode in expression `%s' for SystemTapprobe"
 msgstr ""
 
-#: stap-probe.c:365
-msgid "Undefined bitness for probe."
+#: stap-probe.c:364
+#, possible-c-format
+msgid "Undefined bitness for probe '%s'."
 msgstr ""
 
 #: stap-probe.c:639
@@ -25883,61 +26007,69 @@ msgstr ""
 msgid "unrecognized bitness %s%c' for probe `%s'"
 msgstr ""
 
-#: stap-probe.c:1229
+#: stap-probe.c:1230
 msgid ""
 "The SystemTap SDT probe support is not fully implemented on this target;\n"
 "you will not be able to inspect the arguments of the probes.\n"
 "Please report a bug against GDB requesting a port to this target."
 msgstr ""
 
-#: stap-probe.c:1387
+#: stap-probe.c:1297
+#, possible-c-format
+msgid ""
+"Probe '%s' apparently does not have arguments, but \n"
+"GDB is requesting its argument number %u anyway.  This should not happen.  "
+"Please report this bug."
+msgstr ""
+
+#: stap-probe.c:1402
 msgid "Could not read the value of a SystemTap semaphore."
 msgstr ""
 
-#: stap-probe.c:1404
+#: stap-probe.c:1419
 msgid "Could not write the value of a SystemTap semaphore."
 msgstr ""
 
-#: stap-probe.c:1481
+#: stap-probe.c:1497
 #, possible-c-format
 msgid "corrupt probe name when reading `%s'"
 msgstr ""
 
-#: stap-probe.c:1517
+#: stap-probe.c:1534
 #, possible-c-format
 msgid "corrupt probe argument when reading `%s'"
 msgstr ""
 
-#: stap-probe.c:1558
+#: stap-probe.c:1575
 #, possible-c-format
 msgid "could not obtain base address for SystemTap section on objfile `%s'."
 msgstr ""
 
 #. If we are here, it means we have failed to parse every known
 #. probe.
-#: stap-probe.c:1618
+#: stap-probe.c:1635
 msgid "could not parse SystemTap probe(s) from inferior"
 msgstr ""
 
-#: stap-probe.c:1647
+#: stap-probe.c:1664
 msgid "Semaphore"
 msgstr ""
 
-#: stap-probe.c:1708
+#: stap-probe.c:1725
 msgid "Set SystemTap expression debugging."
 msgstr ""
 
-#: stap-probe.c:1709
+#: stap-probe.c:1726
 msgid "Show SystemTap expression debugging."
 msgstr ""
 
-#: stap-probe.c:1710
+#: stap-probe.c:1727
 msgid ""
 "When non-zero, the internal representation of SystemTap expressions will be "
 "printed."
 msgstr ""
 
-#: stap-probe.c:1717
+#: stap-probe.c:1734
 msgid ""
 "Show information about SystemTap static probes.\n"
 "Usage: info probes stap [PROVIDER [NAME [OBJECT]]]\n"
@@ -25955,89 +26087,111 @@ msgstr ""
 msgid "Standard register ``$ps'' is not available for this target"
 msgstr ""
 
-#: symfile.c:589
+#: symfile.c:585
 #, possible-c-format
 msgid "no loadable sections found in added symbol-file %s"
 msgstr ""
 
-#: symfile.c:704
+#: symfile.c:699
 #, possible-c-format
 msgid "section %s not found in %s"
 msgstr ""
 
-#: symfile.c:1168
+#: symfile.c:1162
 #, possible-c-format
 msgid "Load new symbol table from \"%s\"? "
 msgstr ""
 
-#: symfile.c:1202
+#: symfile.c:1197
 msgid "expanding to full symbols..."
 msgstr ""
 
-#: symfile.c:1336
+#: symfile.c:1329
 #, possible-c-format
 msgid "Discard symbol table from `%s'? "
 msgstr ""
 
-#: symfile.c:1338
+#: symfile.c:1331
 msgid "Discard symbol table? "
 msgstr ""
 
-#: symfile.c:1349
+#: symfile.c:1342
 msgid "No symbol file now.\n"
 msgstr ""
 
-#: symfile.c:1424
+#: symfile.c:1411
 #, possible-c-format
 msgid ""
 "the debug information found in \"%s\" does not match \"%s\" (CRC mismatch).\n"
 msgstr ""
 
-#: symfile.c:1440
+#: symfile.c:1427
 #, possible-c-format
 msgid ""
 "The directory where separate debug symbols are searched for is \"%s\".\n"
 msgstr ""
 
-#: symfile.c:1663 tracefile.c:328
+#: symfile.c:1655 tracefile.c:331
 #, possible-c-format
 msgid "unknown option `%s'"
 msgstr ""
 
-#: symfile.c:1674
+#: symfile.c:1666
 msgid "no symbol file name was specified"
 msgstr ""
 
-#: symfile.c:1828
+#: symfile.c:1816
 #, possible-c-format
 msgid "I'm sorry, Dave, I can't do that.  Symbol format `%s' unknown."
 msgstr ""
 
-#: symfile.c:1979
+#: symfile.c:1969
 #, possible-c-format
 msgid "Download verify read failed at %s"
 msgstr ""
 
-#: symfile.c:1982
+#: symfile.c:1972
 #, possible-c-format
 msgid "Download verify compare failed at %s"
 msgstr ""
 
-#: symfile.c:2132
+#: symfile.c:1985
+msgid "Canceled the download"
+msgstr ""
+
+#: symfile.c:2077
+msgid "file to load"
+msgstr ""
+
+#: symfile.c:2094
+#, possible-c-format
+msgid "Invalid download offset:%s."
+msgstr ""
+
+#: symfile.c:2097
+msgid "Too many parameters."
+msgstr ""
+
+#: symfile.c:2110
+#, possible-c-format
+msgid "\"%s\" is not an object file: %s"
+msgstr ""
+
+#: symfile.c:2125
 msgid "Load failed"
 msgstr ""
 
-#: symfile.c:2265
+#: symfile.c:2253
 msgid "add-symbol-file takes a file name and an address"
 msgstr ""
 
-#: symfile.c:2324
+#: symfile.c:2312
 msgid ""
 "USAGE: add-symbol-file <filename> <textaddress> [-readnow] [-s <secname> "
 "<addr>]*"
 msgstr ""
 
-#: symfile.c:2334
+#: symfile.c:2322
 #, possible-c-format
 msgid "The address where %s has been loaded is missing"
 msgstr ""
@@ -26047,142 +26201,142 @@ msgstr ""
 #. functions.  We have to split this up into separate print
 #. statements because hex_string returns a local static
 #. string.
-#: symfile.c:2342
+#: symfile.c:2330
 #, possible-c-format
 msgid "add symbol table from file \"%s\" at\n"
 msgstr ""
 
-#: symfile.c:2398
+#: symfile.c:2384
 msgid "remove-symbol-file: no symbol file provided"
 msgstr ""
 
-#: symfile.c:2410
+#: symfile.c:2396
 msgid "Missing address argument"
 msgstr ""
 
-#: symfile.c:2413 symfile.c:2431
+#: symfile.c:2399 symfile.c:2417
 #, possible-c-format
 msgid "Junk after %s"
 msgstr ""
 
-#: symfile.c:2447
+#: symfile.c:2433
 msgid "No symbol file found"
 msgstr ""
 
-#: symfile.c:2450
+#: symfile.c:2436
 #, possible-c-format
 msgid "Remove symbol table from file \"%s\"? "
 msgstr ""
 
 #. FIXME, should use print_sys_errmsg but it's not filtered.
-#: symfile.c:2504
+#: symfile.c:2490
 #, possible-c-format
 msgid "`%s' has disappeared; keeping its symbols.\n"
 msgstr ""
 
-#: symfile.c:2516
+#: symfile.c:2502
 #, possible-c-format
 msgid "`%s' has changed; re-reading symbols.\n"
 msgstr ""
 
-#: symfile.c:2580
+#: symfile.c:2562
 #, possible-c-format
 msgid "Can't open %s to read symbols."
 msgstr ""
 
-#: symfile.c:2590
+#: symfile.c:2570
 #, possible-c-format
 msgid "Can't read symbols from %s: %s."
 msgstr ""
 
-#: symfile.c:2672
+#: symfile.c:2652
 msgid "(no debugging symbols found)\n"
 msgstr ""
 
-#: symfile.c:2753
+#: symfile.c:2730
 #, possible-c-format
 msgid "Mapping between filename extension and source language is \"%s\".\n"
 msgstr ""
 
-#: symfile.c:2767
+#: symfile.c:2745
 #, possible-c-format
 msgid "'%s': Filename extension must begin with '.'"
 msgstr ""
 
-#: symfile.c:2774 symfile.c:2785
+#: symfile.c:2752 symfile.c:2763
 #, possible-c-format
 msgid "'%s': two arguments required -- filename extension and language"
 msgstr ""
 
-#: symfile.c:2821
+#: symfile.c:2804
 msgid "Filename extensions and the languages they represent:"
 msgstr ""
 
-#: symfile.c:3364
+#: symfile.c:3311
 msgid "No sections are mapped.\n"
 msgstr ""
 
-#: symfile.c:3377 symfile.c:3422
+#: symfile.c:3324 symfile.c:3369
 msgid ""
 "Overlay debugging not enabled.  Use either the 'overlay auto' or\n"
 "the 'overlay manual' command."
 msgstr ""
 
-#: symfile.c:3382 symfile.c:3427
+#: symfile.c:3329 symfile.c:3374
 msgid "Argument required: name of an overlay section"
 msgstr ""
 
-#: symfile.c:3401
+#: symfile.c:3348
 #, possible-c-format
 msgid "Note: section %s unmapped by overlap\n"
 msgstr ""
 
-#: symfile.c:3408 symfile.c:3438
+#: symfile.c:3355 symfile.c:3385
 #, possible-c-format
 msgid "No overlay section called %s"
 msgstr ""
 
-#: symfile.c:3434
+#: symfile.c:3381
 #, possible-c-format
 msgid "Section %s is not mapped"
 msgstr ""
 
-#: symfile.c:3451
+#: symfile.c:3398
 msgid "Automatic overlay debugging enabled."
 msgstr ""
 
-#: symfile.c:3464
+#: symfile.c:3411
 msgid "Overlay debugging enabled."
 msgstr ""
 
-#: symfile.c:3477
+#: symfile.c:3424
 msgid "Overlay debugging disabled."
 msgstr ""
 
-#: symfile.c:3488
+#: symfile.c:3435
 msgid "This target does not know how to read its overlay state."
 msgstr ""
 
-#: symfile.c:3591
+#: symfile.c:3538
 msgid ""
 "Error reading inferior's overlay table: couldn't find `_novlys' variable\n"
 "in inferior.  Use `overlay manual' mode."
 msgstr ""
 
-#: symfile.c:3600 symfile.c:3686
+#: symfile.c:3547 symfile.c:3630
 msgid ""
 "Error reading inferior's overlay table: couldn't find `_ovly_table' array\n"
 "in inferior.  Use `overlay manual' mode."
 msgstr ""
 
-#: symfile.c:3960
+#: symfile.c:3901
 msgid ""
 "Load symbol table from executable file FILE.\n"
 "The `file' command can also load symbol tables, as well as setting the file\n"
 "to execute."
 msgstr ""
 
-#: symfile.c:3966
+#: symfile.c:3907
 msgid ""
 "Load symbols from FILE, assuming FILE has been dynamically loaded.\n"
 "Usage: add-symbol-file FILE ADDR [-s <SECT> <SECT_ADDR> -s <SECT> "
@@ -26193,7 +26347,7 @@ msgid ""
 "with the text.  SECT is a section name to be loaded at SECT_ADDR."
 msgstr ""
 
-#: symfile.c:3977
+#: symfile.c:3918
 msgid ""
 "Remove a symbol file added via the add-symbol-file command.\n"
 "Usage: remove-symbol-file FILENAME\n"
@@ -26202,84 +26356,87 @@ msgid ""
 "that lies within the boundaries of this symbol file in memory."
 msgstr ""
 
-#: symfile.c:3985
+#: symfile.c:3926
 msgid ""
 "Dynamically load FILE into the running program, and record its symbols\n"
 "for access from GDB.\n"
-"A load OFFSET may also be given."
+"An optional load OFFSET may also be given as a literal address.\n"
+"When OFFSET is provided, FILE must also be provided.  FILE can be provided\n"
+"on its own.\n"
+"Usage: load [FILE] [OFFSET]"
 msgstr ""
 
-#: symfile.c:3992
+#: symfile.c:3936
 msgid "Commands for debugging overlays."
 msgstr ""
 
-#: symfile.c:3999
+#: symfile.c:3943
 msgid "Assert that an overlay section is mapped."
 msgstr ""
 
-#: symfile.c:4002
+#: symfile.c:3946
 msgid "Assert that an overlay section is unmapped."
 msgstr ""
 
-#: symfile.c:4005
+#: symfile.c:3949
 msgid "List mappings of overlay sections."
 msgstr ""
 
-#: symfile.c:4008
+#: symfile.c:3952
 msgid "Enable overlay debugging."
 msgstr ""
 
-#: symfile.c:4010
+#: symfile.c:3954
 msgid "Disable overlay debugging."
 msgstr ""
 
-#: symfile.c:4012
+#: symfile.c:3956
 msgid "Enable automatic overlay debugging."
 msgstr ""
 
-#: symfile.c:4014
+#: symfile.c:3958
 msgid "Read the overlay mapping state from the target."
 msgstr ""
 
-#: symfile.c:4019
+#: symfile.c:3962
 msgid "Set mapping between filename extension and source language."
 msgstr ""
 
-#: symfile.c:4020
+#: symfile.c:3963
 msgid "Show mapping between filename extension and source language."
 msgstr ""
 
-#: symfile.c:4021
+#: symfile.c:3964
 msgid "Usage: set extension-language .foo bar"
 msgstr ""
 
-#: symfile.c:4028
+#: symfile.c:3971
 msgid "All filename extensions associated with a source language."
 msgstr ""
 
-#: symfile.c:4031
+#: symfile.c:3974
 msgid "Set the directories where separate debug symbols are searched for."
 msgstr ""
 
-#: symfile.c:4032
+#: symfile.c:3975
 msgid "Show the directories where separate debug symbols are searched for."
 msgstr ""
 
-#: symfile.c:4033
+#: symfile.c:3976
 msgid ""
 "Separate debug symbols are first searched for in the same\n"
 "directory as the binary, then in the `"
 msgstr ""
 
-#: symfile.c:4044
+#: symfile.c:3987
 msgid "Set printing of symbol loading messages."
 msgstr ""
 
-#: symfile.c:4045
+#: symfile.c:3988
 msgid "Show printing of symbol loading messages."
 msgstr ""
 
-#: symfile.c:4046
+#: symfile.c:3989
 msgid ""
 "off   == turn all messages off\n"
 "brief == print messages for the executable,\n"
@@ -26288,174 +26445,233 @@ msgid ""
 "         and messages for each shared library."
 msgstr ""
 
-#: symfile-debug.c:654
+#: symfile-debug.c:673
 #, possible-c-format
 msgid "Symfile debugging is %s.\n"
 msgstr ""
 
-#: symfile-debug.c:665
+#: symfile-debug.c:684
 msgid "Set debugging of the symfile functions."
 msgstr ""
 
-#: symfile-debug.c:666
+#: symfile-debug.c:685
 msgid "Show debugging of the symfile functions."
 msgstr ""
 
-#: symfile-debug.c:667
+#: symfile-debug.c:686
 msgid "When enabled, all calls to the symfile functions are logged."
 msgstr ""
 
-#: symfile-mem.c:96
+#: symfile-mem.c:97
 msgid "add-symbol-file-from-memory not supported for this target"
 msgstr ""
 
-#: symfile-mem.c:101
+#: symfile-mem.c:102
 msgid "Failed to read a valid object file image from memory."
 msgstr ""
 
-#: symfile-mem.c:113
+#: symfile-mem.c:115
 #, possible-c-format
 msgid "Got object file from memory but can't read symbols: %s."
 msgstr ""
 
-#: symfile-mem.c:150
+#: symfile-mem.c:154
 msgid "add-symbol-file-from-memory requires an expression argument"
 msgstr ""
 
-#: symfile-mem.c:160
+#: symfile-mem.c:164
 msgid "Must use symbol-file or exec-file before add-symbol-file-from-memory."
 msgstr ""
 
-#: symfile-mem.c:215
-msgid ""
-"Could not load vsyscall page because no executable was specified\n"
-"try using the \"file\" command first."
+#: symfile-mem.c:220
+msgid "Could not load vsyscall page because no executable was specified"
 msgstr ""
 
-#: symfile-mem.c:245
+#: symfile-mem.c:249
 msgid ""
 "Load the symbols out of memory from a dynamically loaded object file.\n"
 "Give an expression for the address of the file's shared object file header."
 msgstr ""
 
-#: symmisc.c:84
+#: symmisc.c:80
 #, possible-c-format
 msgid "Byte cache statistics for '%s':\n"
 msgstr ""
 
-#: symmisc.c:108
+#: symmisc.c:104
 #, possible-c-format
 msgid "Statistics for '%s':\n"
 msgstr ""
 
-#: symmisc.c:110
+#: symmisc.c:106
 #, possible-c-format
 msgid "  Number of \"stab\" symbols read: %d\n"
 msgstr ""
 
-#: symmisc.c:113
+#: symmisc.c:109
 #, possible-c-format
 msgid "  Number of \"minimal\" symbols read: %d\n"
 msgstr ""
 
-#: symmisc.c:116
+#: symmisc.c:112
 #, possible-c-format
 msgid "  Number of \"partial\" symbols read: %d\n"
 msgstr ""
 
-#: symmisc.c:119
+#: symmisc.c:115
 #, possible-c-format
 msgid "  Number of \"full\" symbols read: %d\n"
 msgstr ""
 
-#: symmisc.c:122
+#: symmisc.c:118
 #, possible-c-format
 msgid "  Number of \"types\" defined: %d\n"
 msgstr ""
 
-#: symmisc.c:135
+#: symmisc.c:131
 #, possible-c-format
 msgid "  Number of symbol tables: %d\n"
 msgstr ""
 
-#: symmisc.c:136
+#: symmisc.c:132
 #, possible-c-format
 msgid "  Number of symbol tables with line tables: %d\n"
 msgstr ""
 
-#: symmisc.c:138
+#: symmisc.c:134
 #, possible-c-format
 msgid "  Number of symbol tables with blockvectors: %d\n"
 msgstr ""
 
-#: symmisc.c:142
+#: symmisc.c:138
 #, possible-c-format
-msgid "  Space used by a.out string tables: %d\n"
+msgid "  Space used by string tables: %d\n"
 msgstr ""
 
-#: symmisc.c:144
+#: symmisc.c:140
 #, possible-c-format
 msgid "  Total memory used for objfile obstack: %s\n"
 msgstr ""
 
-#: symmisc.c:147
+#: symmisc.c:143
 #, possible-c-format
 msgid "  Total memory used for BFD obstack: %s\n"
 msgstr ""
 
-#: symmisc.c:150
+#: symmisc.c:146
 #, possible-c-format
 msgid "  Total memory used for psymbol cache: %d\n"
 msgstr ""
 
-#: symmisc.c:153
+#: symmisc.c:149
 #, possible-c-format
 msgid "  Total memory used for macro cache: %d\n"
 msgstr ""
 
-#: symmisc.c:155
+#: symmisc.c:151
 #, possible-c-format
 msgid "  Total memory used for file name cache: %d\n"
 msgstr ""
 
-#: symmisc.c:278
+#: symmisc.c:274
 #, possible-c-format
 msgid "internal error:  minimal symbol count %d != %d"
 msgstr ""
 
-#: symmisc.c:423
-msgid "Arguments missing: an output file name and an optional symbol file name"
+#: symmisc.c:481
+#, possible-c-format
+msgid "No symtab for address: %s"
 msgstr ""
 
-#: symmisc.c:656
-msgid "print-msymbols takes an output file name and optional symbol file name"
+#: symmisc.c:521
+#, possible-c-format
+msgid "No symtab for source file: %s"
 msgstr ""
 
-#: symmisc.c:915
+#: symmisc.c:962
 msgid "Extra arguments after regexp."
 msgstr ""
 
-#: symmisc.c:961
+#: symmisc.c:1021
+#, possible-c-format
+msgid "objfile: %s ((struct objfile *) %s)\n"
+msgstr ""
+
+#: symmisc.c:1024
+#, possible-c-format
+msgid "compunit_symtab: ((struct compunit_symtab *) %s)\n"
+msgstr ""
+
+#: symmisc.c:1026
+#, possible-c-format
+msgid "symtab: %s ((struct symtab *) %s)\n"
+msgstr ""
+
+#: symmisc.c:1030
+#, possible-c-format
+msgid "linetable: ((struct linetable *) %s):\n"
+msgstr ""
+
+#: symmisc.c:1034
+msgid "No line table.\n"
+msgstr ""
+
+#: symmisc.c:1036
+msgid "Line table has no lines.\n"
+msgstr ""
+
+#. Leave space for 6 digits of index and line number.  After that the
+#. tables will just not format as well.
+#: symmisc.c:1043
+#, possible-c-format
+msgid "%-6s %6s %s\n"
+msgstr ""
+
+#: symmisc.c:1044
+msgid "INDEX"
+msgstr ""
+
+#: symmisc.c:1044
+msgid "LINE"
+msgstr ""
+
+#: symmisc.c:1044
+msgid "ADDRESS"
+msgstr ""
+
+#: symmisc.c:1051
+#, possible-c-format
+msgid "%-6d %6d %s\n"
+msgstr ""
+
+#: symmisc.c:1103
 msgid ""
 "Print dump of current symbol definitions.\n"
-"Entries in the full symbol table are dumped to file OUTFILE.\n"
-"If a SOURCE file is specified, dump only that file's symbols."
+"Usage: mt print symbols [-pc address] [--] [outfile]\n"
+"       mt print symbols [-objfile objfile] [-source source] [--] [outfile]\n"
+"Entries in the full symbol table are dumped to file OUTFILE,\n"
+"or the terminal if OUTFILE is unspecified.\n"
+"If ADDRESS is provided, dump only the file for that address.\n"
+"If SOURCE is provided, dump only that file's symbols.\n"
+"If OBJFILE is provided, dump only that file's minimal symbols."
 msgstr ""
 
-#: symmisc.c:967
+#: symmisc.c:1114
 msgid ""
 "Print dump of current minimal symbol definitions.\n"
-"Entries in the minimal symbol table are dumped to file OUTFILE.\n"
-"If a SOURCE file is specified, dump only that file's minimal symbols."
+"Usage: mt print msymbols [-objfile objfile] [--] [outfile]\n"
+"Entries in the minimal symbol table are dumped to file OUTFILE,\n"
+"or the terminal if OUTFILE is unspecified.\n"
+"If OBJFILE is provided, dump only that file's minimal symbols."
 msgstr ""
 
-#: symmisc.c:974
+#: symmisc.c:1123
 msgid ""
 "Print dump of current object file definitions.\n"
 "With an argument REGEXP, list the object files with matching names."
 msgstr ""
 
-#: symmisc.c:978
+#: symmisc.c:1127
 msgid ""
 "List the full symbol tables for all object files.\n"
 "This does not include information about individual symbols, blocks, or\n"
@@ -26463,41 +26679,48 @@ msgid ""
 "With an argument REGEXP, list the symbol tables with matching names."
 msgstr ""
 
-#: symmisc.c:986
+#: symmisc.c:1134
+msgid ""
+"List the contents of all line tables, from all symbol tables.\n"
+"With an argument REGEXP, list just the line tables for the symbol\n"
+"tables with matching names."
+msgstr ""
+
+#: symmisc.c:1141
 msgid "Check consistency of currently expanded symtabs."
 msgstr ""
 
-#: symmisc.c:991
+#: symmisc.c:1146
 msgid ""
 "Expand symbol tables.\n"
 "With an argument REGEXP, only expand the symbol tables with matching names."
 msgstr ""
 
-#: symtab.c:1384
+#: symtab.c:1273
 #, possible-c-format
 msgid "Symbol cache size is too large, max is %u."
 msgstr ""
 
-#: symtab.c:1621
+#: symtab.c:1517
 #, possible-c-format
 msgid ""
 "Symbol cache for pspace %d\n"
 "%s:\n"
 msgstr ""
 
-#: symtab.c:1692
+#: symtab.c:1589
 #, possible-c-format
 msgid ""
 "Symbol cache statistics for pspace %d\n"
 "%s:\n"
 msgstr ""
 
-#: symtab.c:2143
+#: symtab.c:1998
 #, possible-c-format
 msgid "Internal error: `%s' is not an aggregate"
 msgstr ""
 
-#: symtab.c:2414
+#: symtab.c:2270
 #, possible-c-format
 msgid ""
 "Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n"
@@ -26505,91 +26728,91 @@ msgid ""
 "\t (if a template, try specifying an instantiation: %s<type>)."
 msgstr ""
 
-#: symtab.c:4027
+#: symtab.c:3885
 msgid "mismatched quoting on brackets, try 'operator\\[\\]'"
 msgstr ""
 
-#: symtab.c:4035
+#: symtab.c:3893
 msgid "nothing is allowed between '[' and ']'"
 msgstr ""
 
-#: symtab.c:4091
+#: symtab.c:3949
 msgid "`operator ()' must be specified without whitespace in `()'"
 msgstr ""
 
-#: symtab.c:4097
+#: symtab.c:3955
 msgid "`operator ?:' must be specified without whitespace in `?:'"
 msgstr ""
 
-#: symtab.c:4103
+#: symtab.c:3961
 msgid "`operator []' must be specified without whitespace in `[]'"
 msgstr ""
 
-#: symtab.c:4108
+#: symtab.c:3966
 #, possible-c-format
 msgid "`operator %s' not supported"
 msgstr ""
 
-#: symtab.c:4818
+#: symtab.c:4647
 #, possible-c-format
 msgid "All %ss matching regular expression \"%s\":\n"
 msgstr ""
 
-#: symtab.c:4821
+#: symtab.c:4650
 #, possible-c-format
 msgid "All defined %ss:\n"
 msgstr ""
 
-#: symtab.c:4831
+#: symtab.c:4660
 msgid ""
 "\n"
 "Non-debugging symbols:\n"
 msgstr ""
 
-#: symtab.c:6250 symtab.c:6253
+#: symtab.c:6057 symtab.c:6060
 msgid "All global and static variable names, or those matching REGEXP."
 msgstr ""
 
-#: symtab.c:6257
+#: symtab.c:6064
 msgid "All function names, or those matching REGEXP."
 msgstr ""
 
-#: symtab.c:6268
+#: symtab.c:6075
 msgid "All type names, or those matching REGEXP."
 msgstr ""
 
-#: symtab.c:6271
+#: symtab.c:6078
 msgid "Source files in the program."
 msgstr ""
 
-#: symtab.c:6274
+#: symtab.c:6081
 msgid "Set a breakpoint for all functions matching REGEXP."
 msgstr ""
 
-#: symtab.c:6278
+#: symtab.c:6085
 msgid ""
 "Set the debugger behavior when more than one symbol are possible matches\n"
 "in an expression."
 msgstr ""
 
-#: symtab.c:6280
+#: symtab.c:6087
 msgid "Show how the debugger handles ambiguities in expressions."
 msgstr ""
 
-#: symtab.c:6281
+#: symtab.c:6088
 msgid ""
 "Valid values are \"ask\", \"all\", \"cancel\", and the default is \"all\"."
 msgstr ""
 
-#: symtab.c:6286
+#: symtab.c:6093
 msgid "Set whether a source file may have multiple base names."
 msgstr ""
 
-#: symtab.c:6287
+#: symtab.c:6094
 msgid "Show whether a source file may have multiple base names."
 msgstr ""
 
-#: symtab.c:6288
+#: symtab.c:6095
 msgid ""
 "(A \"base name\" is the name of a file with the directory part removed.\n"
 "Example: The base name of \"/home/user/hello.c\" is \"hello.c\".)\n"
@@ -26600,69 +26823,69 @@ msgid ""
 "one base name, and gdb will do file name comparisons more efficiently."
 msgstr ""
 
-#: symtab.c:6300
+#: symtab.c:6107
 msgid "Set debugging of symbol table creation."
 msgstr ""
 
-#: symtab.c:6301
+#: symtab.c:6108
 msgid "Show debugging of symbol table creation."
 msgstr ""
 
-#: symtab.c:6301
+#: symtab.c:6108
 msgid ""
 "When enabled (non-zero), debugging messages are printed when building\n"
 "symbol tables.  A value of 1 (one) normally provides enough information.\n"
 "A value greater than 1 provides more verbose information."
 msgstr ""
 
-#: symtab.c:6310
+#: symtab.c:6117
 msgid "Set debugging of symbol lookup."
 msgstr ""
 
-#: symtab.c:6311
+#: symtab.c:6118
 msgid "Show debugging of symbol lookup."
 msgstr ""
 
-#: symtab.c:6312
+#: symtab.c:6119
 msgid "When enabled (non-zero), symbol lookups are logged."
 msgstr ""
 
-#: symtab.c:6319
+#: symtab.c:6126
 msgid "Set the size of the symbol cache."
 msgstr ""
 
-#: symtab.c:6320
+#: symtab.c:6127
 msgid "Show the size of the symbol cache."
 msgstr ""
 
-#: symtab.c:6320
+#: symtab.c:6127
 msgid ""
 "The size of the symbol cache.\n"
 "If zero then the symbol cache is disabled."
 msgstr ""
 
-#: symtab.c:6328
+#: symtab.c:6135
 msgid "Dump the symbol cache for each program space."
 msgstr ""
 
-#: symtab.c:6333
+#: symtab.c:6140
 msgid "Print symbol cache statistics for each program space."
 msgstr ""
 
-#: symtab.c:6338
+#: symtab.c:6145
 msgid "Flush the symbol cache for each program space."
 msgstr ""
 
-#: symtab.h:913
+#: symtab.h:970
 msgid "Section index is uninitialized"
 msgstr ""
 
-#: target.c:179
+#: target.c:182
 #, possible-c-format
 msgid "Target debugging is %s.\n"
 msgstr ""
 
-#: target.c:378
+#: target.c:381
 msgid ""
 "Connect to a target machine or process.\n"
 "The first argument is the type or protocol of the target machine.\n"
@@ -26671,38 +26894,38 @@ msgid ""
 "`help target ' followed by the protocol name."
 msgstr ""
 
-#: target.c:565
+#: target.c:600
 #, possible-c-format
 msgid "You can't do that when your target is `%s'"
 msgstr ""
 
-#: target.c:578
+#: target.c:613
 msgid "No saved terminal information.\n"
 msgstr ""
 
-#: target.c:718
+#: target.c:753
 msgid "Attempt to unpush the dummy target"
 msgstr ""
 
-#: target.c:803 target.c:885
+#: target.c:852 target.c:934
 msgid "Cannot find thread-local variables on this target"
 msgstr ""
 
-#: target.c:838
+#: target.c:887
 msgid "Cannot find thread-local variables in this thread library."
 msgstr ""
 
-#: target.c:843
+#: target.c:892
 #, possible-c-format
 msgid "Cannot find shared library `%s' in dynamic linker's load module list"
 msgstr ""
 
-#: target.c:846
+#: target.c:895
 #, possible-c-format
 msgid "Cannot find executable file `%s' in dynamic linker's load module list"
 msgstr ""
 
-#: target.c:851
+#: target.c:900
 #, possible-c-format
 msgid ""
 "The inferior has not yet allocated storage for thread-local variables in\n"
@@ -26710,7 +26933,7 @@ msgid ""
 "for %s"
 msgstr ""
 
-#: target.c:857
+#: target.c:906
 #, possible-c-format
 msgid ""
 "The inferior has not yet allocated storage for thread-local variables in\n"
@@ -26718,82 +26941,82 @@ msgid ""
 "for %s"
 msgstr ""
 
-#: target.c:865
+#: target.c:914
 #, possible-c-format
 msgid ""
 "Cannot find thread-local storage for %s, shared library %s:\n"
 "%s"
 msgstr ""
 
-#: target.c:870
+#: target.c:919
 #, possible-c-format
 msgid ""
 "Cannot find thread-local storage for %s, executable file %s:\n"
 "%s"
 msgstr ""
 
-#: target.c:1043
+#: target.c:1092
 msgid "Writing to flash memory forbidden in this context"
 msgstr ""
 
-#: target.c:1296
+#: target.c:1346
 #, possible-c-format
 msgid "Writing to memory is not allowed (addr %s, len %s)"
 msgstr ""
 
-#: target.c:1531
+#: target.c:1579
 msgid "Overlapping regions in memory map: ignoring"
 msgstr ""
 
-#: target.c:1558
+#: target.c:1606
 #, possible-c-format
 msgid "Mode for reading from readonly sections is %s.\n"
 msgstr ""
 
-#: target.c:2006
+#: target.c:2062
 #, possible-c-format
 msgid "target object %d, annex %s, contained unexpected null characters"
 msgstr ""
 
-#: target.c:2049
+#: target.c:2105
 msgid "May not insert breakpoints"
 msgstr ""
 
-#: target.c:2069
+#: target.c:2126
 msgid "May not remove breakpoints"
 msgstr ""
 
-#: target.c:2084
+#: target.c:2141
 #, possible-c-format
 msgid "Symbols from \"%s\".\n"
 msgstr ""
 
-#: target.c:2095
+#: target.c:2152
 msgid "\tWhile running this, GDB does not access memory from...\n"
 msgstr ""
 
-#: target.c:2182
+#: target.c:2245
 msgid "Program not killed."
 msgstr ""
 
-#: target.c:2279
+#: target.c:2379
 msgid "could not find a target to follow fork"
 msgstr ""
 
-#: target.c:2296
+#: target.c:2404
 msgid "could not find a target to follow mourn inferior"
 msgstr ""
 
-#: target.c:2345
+#: target.c:2454
 msgid "Unable to allocate memory to perform the search."
 msgstr ""
 
-#: target.c:2353 target.c:2408
+#: target.c:2462 target.c:2519
 #, possible-c-format
 msgid "Unable to access %s bytes of target memory at %s, halting search."
 msgstr ""
 
-#: target.c:2483
+#: target.c:2594
 #, possible-c-format
 msgid ""
 "The \"%s\" target does not support \"run\".  Try \"help target\" or "
@@ -26803,222 +27026,256 @@ msgstr ""
 #. This function is only called if the target is running.  In that
 #. case there should have been a process_stratum target and it
 #. should either know how to create inferiors, or not...
-#: target.c:2491
+#: target.c:2602
 msgid "No targets found"
 msgstr ""
 
-#: target.c:2503
+#: target.c:2614
 #, possible-c-format
 msgid "Whether GDB may automatically connect to the native target is %s.\n"
 msgstr ""
 
-#: target.c:2542
+#: target.c:2653
 #, possible-c-format
 msgid "Don't know how to %s.  Try \"help target\"."
 msgstr ""
 
-#: target.c:2676
+#: target.c:2795
 #, possible-c-format
 msgid "Can't determine the current address space of thread %s\n"
 msgstr ""
 
-#: target.c:3076
+#: target.c:3219
 #, possible-c-format
 msgid "target file %s contained unexpected null characters"
 msgstr ""
 
-#: target.c:3202 target.c:3211
+#: target.c:3367 target.c:3376
 msgid "Command not implemented for this target."
 msgstr ""
 
-#: target.c:3269
+#: target.c:3434 target.c:3446
 msgid "May not interrupt or stop the target, ignoring attempt"
 msgstr ""
 
-#: target.c:3400
+#: target.c:3599
 #, possible-c-format
 msgid "Writing to registers is not allowed (regno %d)"
 msgstr ""
 
-#: target.c:3719
+#: target.c:3944
 msgid "\"monitor\" command not supported by this target."
 msgstr ""
 
-#: target.c:3736
+#: target.c:3983
+msgid "Erasing flash memory region at address "
+msgstr ""
+
+#: target.c:3997
+msgid "No flash memory regions found.\n"
+msgstr ""
+
+#: target.c:4007
 msgid "The current target stack is:\n"
 msgstr ""
 
-#: target.c:3771
+#: target.c:4059
 #, possible-c-format
 msgid "Controlling the inferior in asynchronous mode is %s.\n"
 msgstr ""
 
-#: target.c:3840
+#: target.c:4115
+#, possible-c-format
+msgid "Whether the target is always in non-stop mode is %s (currently %s).\n"
+msgstr ""
+
+#: target.c:4120
+#, possible-c-format
+msgid "Whether the target is always in non-stop mode is %s.\n"
+msgstr ""
+
+#: target.c:4189
 msgid "Set target debugging."
 msgstr ""
 
-#: target.c:3841
+#: target.c:4190
 msgid "Show target debugging."
 msgstr ""
 
-#: target.c:3842
+#: target.c:4191
 msgid ""
 "When non-zero, target debugging is enabled.  Higher numbers are more\n"
 "verbose."
 msgstr ""
 
-#: target.c:3850
+#: target.c:4199
 msgid "Set mode for reading from readonly sections."
 msgstr ""
 
-#: target.c:3851
+#: target.c:4200
 msgid "Show mode for reading from readonly sections."
 msgstr ""
 
-#: target.c:3852
+#: target.c:4201
 msgid ""
 "When this mode is on, memory reads from readonly sections (such as .text)\n"
 "will be read from the object file instead of from the target.  This will\n"
 "result in significant performance improvement for remote targets."
 msgstr ""
 
-#: target.c:3861
+#: target.c:4210
 msgid "Send a command to the remote monitor (remote targets only)."
 msgstr ""
 
-#: target.c:3864
+#: target.c:4213
 msgid "Print the name of each layer of the internal target stack."
 msgstr ""
 
-#: target.c:3868
+#: target.c:4217
 msgid "Set whether gdb controls the inferior in asynchronous mode."
 msgstr ""
 
-#: target.c:3869
+#: target.c:4218
 msgid "Show whether gdb controls the inferior in asynchronous mode."
 msgstr ""
 
-#: target.c:3870
+#: target.c:4219
 msgid "Tells gdb whether to control the inferior in asynchronous mode."
 msgstr ""
 
-#: target.c:3878
+#: target.c:4227
+msgid "Set whether gdb always controls the inferior in non-stop mode."
+msgstr ""
+
+#: target.c:4228
+msgid "Show whether gdb always controls the inferior in non-stop mode."
+msgstr ""
+
+#: target.c:4229
+msgid "Tells gdb whether to control the inferior in non-stop mode."
+msgstr ""
+
+#: target.c:4237
 msgid "Set permission to write into registers."
 msgstr ""
 
-#: target.c:3879
+#: target.c:4238
 msgid "Show permission to write into registers."
 msgstr ""
 
-#: target.c:3880
+#: target.c:4239
 msgid ""
 "When this permission is on, GDB may write into the target's registers.\n"
 "Otherwise, any sort of write attempt will result in an error."
 msgstr ""
 
-#: target.c:3887
+#: target.c:4246
 msgid "Set permission to write into target memory."
 msgstr ""
 
-#: target.c:3888
+#: target.c:4247
 msgid "Show permission to write into target memory."
 msgstr ""
 
-#: target.c:3889
+#: target.c:4248
 msgid ""
 "When this permission is on, GDB may write into the target's memory.\n"
 "Otherwise, any sort of write attempt will result in an error."
 msgstr ""
 
-#: target.c:3896
+#: target.c:4255
 msgid "Set permission to insert breakpoints in the target."
 msgstr ""
 
-#: target.c:3897
+#: target.c:4256
 msgid "Show permission to insert breakpoints in the target."
 msgstr ""
 
-#: target.c:3898
+#: target.c:4257
 msgid ""
 "When this permission is on, GDB may insert breakpoints in the program.\n"
 "Otherwise, any sort of insertion attempt will result in an error."
 msgstr ""
 
-#: target.c:3905
+#: target.c:4264
 msgid "Set permission to insert tracepoints in the target."
 msgstr ""
 
-#: target.c:3906
+#: target.c:4265
 msgid "Show permission to insert tracepoints in the target."
 msgstr ""
 
-#: target.c:3907
+#: target.c:4266
 msgid ""
 "When this permission is on, GDB may insert tracepoints in the program.\n"
 "Otherwise, any sort of insertion attempt will result in an error."
 msgstr ""
 
-#: target.c:3914
+#: target.c:4273
 msgid "Set permission to insert fast tracepoints in the target."
 msgstr ""
 
-#: target.c:3915
+#: target.c:4274
 msgid "Show permission to insert fast tracepoints in the target."
 msgstr ""
 
-#: target.c:3916
+#: target.c:4275
 msgid ""
 "When this permission is on, GDB may insert fast tracepoints.\n"
 "Otherwise, any sort of insertion attempt will result in an error."
 msgstr ""
 
-#: target.c:3923
+#: target.c:4282
 msgid "Set permission to interrupt or signal the target."
 msgstr ""
 
-#: target.c:3924
+#: target.c:4283
 msgid "Show permission to interrupt or signal the target."
 msgstr ""
 
-#: target.c:3925
+#: target.c:4284
 msgid ""
 "When this permission is on, GDB may interrupt/stop the target's execution.\n"
 "Otherwise, any attempt to interrupt or stop will be ignored."
 msgstr ""
 
-#: target.c:3932
+#: target.c:4291
+msgid "Erase all flash memory regions."
+msgstr ""
+
+#: target.c:4294
 msgid "Set whether GDB may automatically connect to the native target."
 msgstr ""
 
-#: target.c:3933
+#: target.c:4295
 msgid "Show whether GDB may automatically connect to the native target."
 msgstr ""
 
-#: target.c:3934
+#: target.c:4296
 msgid ""
 "When on, and GDB is not connected to a target yet, GDB\n"
 "attempts \"run\" and other commands with the native target."
 msgstr ""
 
-#: target-dcache.c:116
+#: target-dcache.c:120
 #, possible-c-format
 msgid "Cache use for stack accesses is %s.\n"
 msgstr ""
 
-#: target-dcache.c:156
+#: target-dcache.c:160
 #, possible-c-format
 msgid "Cache use for code accesses is %s.\n"
 msgstr ""
 
-#: target-dcache.c:174
+#: target-dcache.c:178
 msgid "Set cache use for stack access."
 msgstr ""
 
-#: target-dcache.c:175
+#: target-dcache.c:179
 msgid "Show cache use for stack access."
 msgstr ""
 
-#: target-dcache.c:176
+#: target-dcache.c:180
 msgid ""
 "When on, use the target memory cache for all stack access, regardless of "
 "any\n"
@@ -27026,15 +27283,15 @@ msgid ""
 "By default, caching for stack access is on."
 msgstr ""
 
-#: target-dcache.c:185
+#: target-dcache.c:189
 msgid "Set cache use for code segment access."
 msgstr ""
 
-#: target-dcache.c:186
+#: target-dcache.c:190
 msgid "Show cache use for code segment access."
 msgstr ""
 
-#: target-dcache.c:187
+#: target-dcache.c:191
 msgid ""
 "When on, use the target memory cache for all code segment accesses,\n"
 "regardless of any configured memory regions.  This improves remote\n"
@@ -27042,215 +27299,239 @@ msgid ""
 "access is on."
 msgstr ""
 
-#: target-descriptions.c:366
+#: target-descriptions.c:357
 msgid "Architecture rejected target-supplied description"
 msgstr ""
 
-#: target-descriptions.c:374
+#: target-descriptions.c:366
 msgid "Target-supplied registers are not supported by the current architecture"
 msgstr ""
 
-#: target-descriptions.c:401
+#: target-descriptions.c:393
 msgid "Could not remove target-supplied description"
 msgstr ""
 
-#: target-descriptions.c:992 target-descriptions.c:1014
+#: target-descriptions.c:1033 target-descriptions.c:1055
 #, possible-c-format
 msgid "Register \"%s\" has an unsupported size (%d bits)"
 msgstr ""
 
-#: target-descriptions.c:1505
+#: target-descriptions.c:1609
 #, possible-c-format
 msgid "Attempted to add duplicate compatible architecture \"%s\""
 msgstr ""
 
-#: target-descriptions.c:1525
+#: target-descriptions.c:1629
 #, possible-c-format
 msgid "Attempted to add duplicate property \"%s\""
 msgstr ""
 
-#: target-descriptions.c:1588
+#: target-descriptions.c:1692
 #, possible-c-format
 msgid "The target description will be read from \"%s\".\n"
 msgstr ""
 
-#: target-descriptions.c:1591
+#: target-descriptions.c:1695
 msgid "The target description will be read from the target.\n"
 msgstr ""
 
-#: target-descriptions.c:1626
+#: target-descriptions.c:1729
 msgid "There is no target description to print."
 msgstr ""
 
-#: target-descriptions.c:1629
+#: target-descriptions.c:1732
 msgid "The current target description did not come from an XML file."
 msgstr ""
 
-#: target-descriptions.c:1810
+#: target-descriptions.c:1958
 #, possible-c-format
 msgid "C output is not supported type \"%s\"."
 msgstr ""
 
-#: target-descriptions.c:1843
+#: target-descriptions.c:1991
 msgid "Set target description specific variables."
 msgstr ""
 
 #. allow-unknown
-#: target-descriptions.c:1847
+#: target-descriptions.c:1995
 msgid "Show target description specific variables."
 msgstr ""
 
 #. allow-unknown
-#: target-descriptions.c:1851
+#: target-descriptions.c:1999
 msgid "Unset target description specific variables."
 msgstr ""
 
-#: target-descriptions.c:1858
+#: target-descriptions.c:2006
 msgid "Set the file to read for an XML target description"
 msgstr ""
 
-#: target-descriptions.c:1859
+#: target-descriptions.c:2007
 msgid "Show the file to read for an XML target description"
 msgstr ""
 
-#: target-descriptions.c:1860
+#: target-descriptions.c:2008
 msgid ""
 "When set, GDB will read the target description from a local\n"
 "file instead of querying the remote target."
 msgstr ""
 
-#: target-descriptions.c:1867
+#: target-descriptions.c:2015
 msgid ""
 "Unset the file to read for an XML target description.  When unset,\n"
 "GDB will read the description from the target."
 msgstr ""
 
-#: target-descriptions.c:1872
+#: target-descriptions.c:2020
 msgid "Print the current target description as a C source file."
 msgstr ""
 
-#: target-memory.c:427
+#: target-memory.c:430
 msgid "Error writing data to flash"
 msgstr ""
 
-#: thread.c:298
+#: thread.c:327
 #, possible-c-format
 msgid "[New %s]\n"
 msgstr ""
 
-#: thread.c:1018
-msgid "No threads.\n"
+#: thread.c:1129
+msgid "No thread selected."
 msgstr ""
 
-#: thread.c:1020
-#, possible-c-format
-msgid "No threads match '%s'.\n"
+#: thread.c:1133
+msgid "The current thread has terminated"
 msgstr ""
 
-#: thread.c:1046
+#: thread.c:1201
 msgid "Requested thread not found in requested process"
 msgstr ""
 
-#: thread.c:1272
+#: thread.c:1254
+msgid "No threads.\n"
+msgstr ""
+
+#: thread.c:1256
+#, possible-c-format
+msgid "No threads match '%s'.\n"
+msgstr ""
+
+#: thread.c:1540
 #, possible-c-format
 msgid ""
 "Couldn't restore frame #%d in current thread.  Bottom (innermost) frame "
 "selected:"
 msgstr ""
 
-#: thread.c:1440 thread.c:1512
-msgid "Please specify a command following the thread ID list"
+#: thread.c:1782 thread.c:1866
+msgid "Please specify a command following the thread ID list"
+msgstr ""
+
+#: thread.c:1827 thread.c:1926
+#, possible-c-format
+msgid ""
+"\n"
+"Thread %s (%s):\n"
+msgstr ""
+
+#: thread.c:1851
+msgid "Please specify a thread ID list"
+msgstr ""
+
+#: thread.c:1894
+#, possible-c-format
+msgid "Unknown inferior %d"
 msgstr ""
 
-#: thread.c:1485 thread.c:1539
+#: thread.c:1912
 #, possible-c-format
-msgid ""
-"\n"
-"Thread %d (%s):\n"
+msgid "Unknown thread %d.%d"
 msgstr ""
 
-#: thread.c:1507
-msgid "Please specify a thread ID list"
+#: thread.c:1914
+#, possible-c-format
+msgid "Unknown thread %d"
 msgstr ""
 
-#: thread.c:1534
+#: thread.c:1920
 #, possible-c-format
-msgid "Thread %d has terminated."
+msgid "Thread %s has terminated."
 msgstr ""
 
-#: thread.c:1560 thread.c:1589
+#: thread.c:1946 thread.c:1998
 msgid "No thread selected"
 msgstr ""
 
-#: thread.c:1565
+#: thread.c:1953
 #, possible-c-format
-msgid "[Current thread is %d (%s) (exited)]\n"
+msgid "[Current thread is %s (%s) (exited)]\n"
 msgstr ""
 
-#: thread.c:1569
+#: thread.c:1957
 #, possible-c-format
-msgid "[Current thread is %d (%s)]\n"
+msgid "[Current thread is %s (%s)]\n"
 msgstr ""
 
-#: thread.c:1619
+#: thread.c:2028
 #, possible-c-format
-msgid "Thread %d has name '%s'\n"
+msgid "Thread %s has name '%s'\n"
 msgstr ""
 
-#: thread.c:1627
+#: thread.c:2036
 #, possible-c-format
-msgid "Thread %d has target name '%s'\n"
+msgid "Thread %s has target name '%s'\n"
 msgstr ""
 
-#: thread.c:1635
+#: thread.c:2044
 #, possible-c-format
-msgid "Thread %d has target id '%s'\n"
+msgid "Thread %s has target id '%s'\n"
 msgstr ""
 
-#: thread.c:1643
+#: thread.c:2052
 #, possible-c-format
-msgid "Thread %d has extra info '%s'\n"
+msgid "Thread %s has extra info '%s'\n"
 msgstr ""
 
-#: thread.c:1649
+#: thread.c:2058
 #, possible-c-format
 msgid "No threads match '%s'\n"
 msgstr ""
 
-#: thread.c:1659
+#: thread.c:2068
 #, possible-c-format
 msgid "Printing of thread events is %s.\n"
 msgstr ""
 
-#: thread.c:1674 windows-tdep.c:381
+#: thread.c:2084
 #, possible-c-format
 msgid "Thread ID %d not known."
 msgstr ""
 
-#: thread.c:1677 windows-tdep.c:384
+#: thread.c:2093
 #, possible-c-format
-msgid "Thread ID %d has terminated."
+msgid "Thread ID %s has terminated."
 msgstr ""
 
-#: thread.c:1772
+#: thread.c:2251
 msgid ""
 "Display currently known threads.\n"
-"Usage: info threads [ID]...\n"
-"Optional arguments are thread IDs with spaces between.\n"
-"If no arguments, all threads are displayed."
+"Usage: info threads [-gid] [ID]...\n"
+"-gid: Show global thread IDs.\n"
+"If ID is given, it is a space-separated list of IDs of threads to display.\n"
+"Otherwise, all threads are displayed."
 msgstr ""
 
-#: thread.c:1777
+#: thread.c:2257
 msgid ""
 "Use this command to switch between threads.\n"
 "The new thread ID must be currently known."
 msgstr ""
 
-#: thread.c:1783
+#: thread.c:2263
 msgid "Apply a command to a list of threads."
 msgstr ""
 
-#: thread.c:1787
+#: thread.c:2267
 msgid ""
 "Apply a command to all threads.\n"
 "\n"
@@ -27259,260 +27540,305 @@ msgid ""
 "            The default is descending order."
 msgstr ""
 
-#: thread.c:1797
+#: thread.c:2277
 msgid ""
 "Set the current thread's name.\n"
 "Usage: thread name [NAME]\n"
 "If NAME is not given, then any existing name is removed."
 msgstr ""
 
-#: thread.c:1801
+#: thread.c:2281
 msgid ""
 "Find threads that match a regular expression.\n"
 "Usage: thread find REGEXP\n"
 "Will display thread ids whose name, target ID, or extra info matches REGEXP."
 msgstr ""
 
-#: thread.c:1810
+#: thread.c:2290
 msgid "Set printing of thread events (such as thread start and exit)."
 msgstr ""
 
-#: thread.c:1811
+#: thread.c:2291
 msgid "Show printing of thread events (such as thread start and exit)."
 msgstr ""
 
-#: tic6x-tdep.c:882
+#: tic6x-tdep.c:886
 #, possible-c-format
 msgid "unexpected length %d of type"
 msgstr ""
 
-#: tic6x-tdep.c:1106
+#: tic6x-tdep.c:1110
 #, possible-c-format
 msgid "unexpected type %d of arg %d"
 msgstr ""
 
-#: tic6x-tdep.c:1111
+#: tic6x-tdep.c:1115
 #, possible-c-format
 msgid "unexpected length %d of arg %d"
 msgstr ""
 
-#: top.c:99
+#: tid-parse.c:31
+#, possible-c-format
+msgid "Invalid thread ID: %s"
+msgstr ""
+
+#: tid-parse.c:47 tid-parse.c:242
+#, possible-c-format
+msgid "negative value: %s"
+msgstr ""
+
+#: tid-parse.c:77
+#, possible-c-format
+msgid "No inferior number '%d'"
+msgstr ""
+
+#: tid-parse.c:103
+#, possible-c-format
+msgid "Unknown thread %d.%d."
+msgstr ""
+
+#: tid-parse.c:105
+#, possible-c-format
+msgid "Unknown thread %d."
+msgstr ""
+
+#: tid-parse.c:148 tid-parse.c:165
+msgid "unhandled state"
+msgstr ""
+
+#: top.c:126
 #, possible-c-format
 msgid "Whether to confirm potentially dangerous operations is %s.\n"
 msgstr ""
 
-#: top.c:464
+#: top.c:355
+msgid "opening terminal failed"
+msgstr ""
+
+#: top.c:384
+msgid "usage: new-ui <interpreter> <tty>"
+msgstr ""
+
+#: top.c:670
 msgid "That is not a command, just a help topic."
 msgstr ""
 
-#: top.c:685
+#: top.c:855
 #, possible-c-format
 msgid "Saving of the history record on exit is %s.\n"
 msgstr ""
 
-#: top.c:697
+#: top.c:867
 #, possible-c-format
 msgid "The size of the command history is %s.\n"
 msgstr ""
 
-#: top.c:710
+#: top.c:880
 #, possible-c-format
 msgid "The number of history entries to look back at for duplicates is %s.\n"
 msgstr ""
 
-#: top.c:720
+#: top.c:890
 #, possible-c-format
 msgid "The filename in which to record the command history is \"%s\".\n"
 msgstr ""
 
-#: top.c:971 top.c:1000
+#: top.c:1165 top.c:1194
 #, possible-c-format
 msgid "Could not rename %s to %s: %s"
 msgstr ""
 
-#: top.c:1267
+#: top.c:1365
 msgid ""
 "\n"
 "For bug reporting instructions, please see:\n"
 msgstr ""
 
-#: top.c:1271
+#: top.c:1369
 msgid ""
 "Find the GDB manual and other documentation resources online at:\n"
 "<http://www.gnu.org/software/gdb/documentation/>.\n"
 msgstr ""
 
-#: top.c:1273
+#: top.c:1371
 msgid "For help, type \"help\".\n"
 msgstr ""
 
-#: top.c:1274
+#: top.c:1372
 msgid "Type \"apropos word\" to search for commands related to \"word\"."
 msgstr ""
 
-#: top.c:1282
+#: top.c:1380
 #, possible-c-format
 msgid ""
 "This GDB was configured as follows:\n"
 "   configure --host=%s --target=%s\n"
 msgstr ""
 
-#: top.c:1286
+#: top.c:1384
 #, possible-c-format
 msgid ""
 "             --with-auto-load-dir=%s\n"
 "             --with-auto-load-safe-path=%s\n"
 msgstr ""
 
-#: top.c:1291
+#: top.c:1389
 msgid "             --with-expat\n"
 msgstr ""
 
-#: top.c:1295
+#: top.c:1393
 msgid "             --without-expat\n"
 msgstr ""
 
-#: top.c:1300
+#: top.c:1398
 #, possible-c-format
 msgid "             --with-gdb-datadir=%s%s\n"
 msgstr ""
 
-#: top.c:1304
+#: top.c:1402
 #, possible-c-format
 msgid "             --with-iconv-bin=%s%s\n"
 msgstr ""
 
-#: top.c:1309
+#: top.c:1407
 #, possible-c-format
 msgid "             --with-jit-reader-dir=%s%s\n"
 msgstr ""
 
-#: top.c:1313
+#: top.c:1411
 msgid "             --with-libunwind-ia64\n"
 msgstr ""
 
-#: top.c:1317
+#: top.c:1415
 msgid "             --without-libunwind-ia64\n"
 msgstr ""
 
-#: top.c:1322
+#: top.c:1420
 msgid "             --with-lzma\n"
 msgstr ""
 
-#: top.c:1326
+#: top.c:1424
 msgid "             --without-lzma\n"
 msgstr ""
 
-#: top.c:1331
+#: top.c:1429
 #, possible-c-format
 msgid "             --with-python=%s%s\n"
 msgstr ""
 
-#: top.c:1336
+#: top.c:1434
 msgid "             --with-guile\n"
 msgstr ""
 
-#: top.c:1340
+#: top.c:1438
 msgid "             --without-guile\n"
 msgstr ""
 
-#: top.c:1345
+#: top.c:1443
 #, possible-c-format
 msgid "             --with-relocated-sources=%s\n"
 msgstr ""
 
-#: top.c:1350
+#: top.c:1448
 #, possible-c-format
 msgid "             --with-separate-debug-dir=%s%s\n"
 msgstr ""
 
-#: top.c:1354
+#: top.c:1452
 #, possible-c-format
 msgid "             --with-sysroot=%s%s\n"
 msgstr ""
 
-#: top.c:1358
+#: top.c:1456
 #, possible-c-format
 msgid "             --with-system-gdbinit=%s%s\n"
 msgstr ""
 
-#: top.c:1362
+#: top.c:1460
 msgid "             --with-babeltrace\n"
 msgstr ""
 
-#: top.c:1366
+#: top.c:1464
 msgid "             --without-babeltrace\n"
 msgstr ""
 
 #. We assume "relocatable" will be printed at least once, thus we always
 #. print this text.  It's a reasonably safe assumption for now.
-#: top.c:1372
+#: top.c:1470
 msgid ""
 "\n"
 "(\"Relocatable\" means the directory can be moved with the GDB installation\n"
 "tree, and GDB will still find it.)\n"
 msgstr ""
 
-#: top.c:1453
+#: top.c:1551
 #, possible-c-format
 msgid "\tInferior %d [%s] will be detached.\n"
 msgstr ""
 
-#: top.c:1457
+#: top.c:1555
 #, possible-c-format
 msgid "\tInferior %d [%s] will be killed.\n"
 msgstr ""
 
-#: top.c:1482
+#: top.c:1574
 msgid ""
 "A debugging session is active.\n"
 "\n"
 msgstr ""
 
-#: top.c:1484
+#: top.c:1576
 msgid ""
 "\n"
 "Quit anyway? "
 msgstr ""
 
-#: top.c:1688
+#: top.c:1821
 msgid "\"set history\" must be followed by the name of a history subcommand.\n"
 msgstr ""
 
-#: top.c:1797
+#: top.c:1930
 #, possible-c-format
 msgid "Gdb's prompt is \"%s\".\n"
 msgstr ""
 
-#: top.c:1804
+#: top.c:1948
 #, possible-c-format
 msgid "Editing of command lines as they are typed is %s.\n"
 msgstr ""
 
-#: top.c:1813
+#: top.c:1950
+msgid "on"
+msgstr ""
+
+#: top.c:1950
+msgid "off"
+msgstr ""
+
+#: top.c:1957
 #, possible-c-format
 msgid "Annotation_level is %s.\n"
 msgstr ""
 
-#: top.c:1820
+#: top.c:1964
 #, possible-c-format
 msgid "Notification of completion for asynchronous execution commands is %s.\n"
 msgstr ""
 
-#: top.c:1843
+#: top.c:1987
 #, possible-c-format
 msgid "GDB's data directory is \"%s\".\n"
 msgstr ""
 
-#: top.c:1889
+#: top.c:2031
 msgid "Set gdb's prompt"
 msgstr ""
 
-#: top.c:1890
+#: top.c:2032
 msgid "Show gdb's prompt"
 msgstr ""
 
-#: top.c:1895
+#: top.c:2037
 msgid ""
 "Don't repeat this command.\n"
 "Primarily used inside of user-defined commands that should not be repeated "
@@ -27520,44 +27846,44 @@ msgid ""
 "hitting return."
 msgstr ""
 
-#: top.c:1901
+#: top.c:2043
 msgid "Set editing of command lines as they are typed."
 msgstr ""
 
-#: top.c:1902
+#: top.c:2044
 msgid "Show editing of command lines as they are typed."
 msgstr ""
 
-#: top.c:1903
+#: top.c:2045
 msgid ""
 "Use \"on\" to enable the editing, and \"off\" to disable it.\n"
 "Without an argument, command line editing is enabled.  To edit, use\n"
 "EMACS-like or VI-like commands like control-P or ESC."
 msgstr ""
 
-#: top.c:1911
+#: top.c:2053
 msgid "Set saving of the history record on exit."
 msgstr ""
 
-#: top.c:1912
+#: top.c:2054
 msgid "Show saving of the history record on exit."
 msgstr ""
 
-#: top.c:1913
+#: top.c:2055
 msgid ""
 "Use \"on\" to enable the saving, and \"off\" to disable it.\n"
 "Without an argument, saving is enabled."
 msgstr ""
 
-#: top.c:1921
+#: top.c:2063
 msgid "Set the size of the command history,"
 msgstr ""
 
-#: top.c:1922
+#: top.c:2064
 msgid "Show the size of the command history,"
 msgstr ""
 
-#: top.c:1923
+#: top.c:2065
 msgid ""
 "ie. the number of previous commands to keep a record of.\n"
 "If set to \"unlimited\", the number of commands kept in the history\n"
@@ -27565,15 +27891,15 @@ msgid ""
 "variable \"GDBHISTSIZE\", or to 256 if this variable is not set."
 msgstr ""
 
-#: top.c:1933
+#: top.c:2075
 msgid "Set how far back in history to look for and remove duplicate entries."
 msgstr ""
 
-#: top.c:1934
+#: top.c:2076
 msgid "Show how far back in history to look for and remove duplicate entries."
 msgstr ""
 
-#: top.c:1935
+#: top.c:2077
 msgid ""
 "If set to a nonzero value N, GDB will look back at the last N history "
 "entries\n"
@@ -27585,99 +27911,124 @@ msgid ""
 "By default this option is set to 0."
 msgstr ""
 
-#: top.c:1947
+#: top.c:2089
 msgid "Set the filename in which to record the command history"
 msgstr ""
 
-#: top.c:1948
+#: top.c:2090
 msgid "Show the filename in which to record the command history"
 msgstr ""
 
-#: top.c:1949
+#: top.c:2091
 msgid "(the list of previous commands of which a record is kept)."
 msgstr ""
 
-#: top.c:1955
+#: top.c:2097
 msgid "Set whether to confirm potentially dangerous operations."
 msgstr ""
 
-#: top.c:1956
+#: top.c:2098
 msgid "Show whether to confirm potentially dangerous operations."
 msgstr ""
 
-#: top.c:1962
+#: top.c:2104
 msgid "Set annotation_level."
 msgstr ""
 
-#: top.c:1963
+#: top.c:2105
 msgid "Show annotation_level."
 msgstr ""
 
-#: top.c:1964
+#: top.c:2106
 msgid ""
 "0 == normal;     1 == fullname (for use when running under emacs)\n"
 "2 == output annotated suitably for use by programs that control GDB."
 msgstr ""
 
-#: top.c:1972
+#: top.c:2114
 msgid "Set notification of completion for asynchronous execution commands."
 msgstr ""
 
-#: top.c:1973
+#: top.c:2115
 msgid "Show notification of completion for asynchronous execution commands."
 msgstr ""
 
-#: top.c:1974
+#: top.c:2116
 msgid "Use \"on\" to enable the notification, and \"off\" to disable it."
 msgstr ""
 
-#: top.c:1981
+#: top.c:2123
 msgid "Set GDB's data directory."
 msgstr ""
 
-#: top.c:1982
+#: top.c:2124
 msgid "Show GDB's data directory."
 msgstr ""
 
-#: top.c:1983
+#: top.c:2125
 msgid "When set, GDB uses the specified path to search for data files."
 msgstr ""
 
-#: tracefile.c:75
+#: top.c:2132
+msgid "Set whether GDB's standard input is a terminal."
+msgstr ""
+
+#: top.c:2133
+msgid "Show whether GDB's standard input is a terminal."
+msgstr ""
+
+#: top.c:2134
+msgid ""
+"If on, GDB assumes that standard input is a terminal.  In practice, it\n"
+"means that GDB should wait for the user to answer queries associated to\n"
+"commands entered at the command prompt.  If off, GDB assumes that standard\n"
+"input is not a terminal, and uses the default answer to all queries.\n"
+"If auto (the default), determine which mode to use based on the standard\n"
+"input settings."
+msgstr ""
+
+#: top.c:2145
+msgid ""
+"Create a new UI.  It takes two arguments:\n"
+"The first argument is the name of the interpreter to run.\n"
+"The second argument is the terminal the UI runs on.\n"
+msgstr ""
+
+#: tracefile.c:73
 #, possible-c-format
 msgid "Target failed to save trace data to '%s'."
 msgstr ""
 
-#: tracefile.c:142 tracefile.c:189 tracefile.c:203 tracefile.c:218
-#: tracefile.c:251 tracefile.c:272
+#: tracefile.c:145 tracefile.c:192 tracefile.c:206 tracefile.c:221
+#: tracefile.c:254 tracefile.c:275
 msgid "Failure to get requested trace buffer data"
 msgstr ""
 
-#: tracefile.c:286 tracefile-tfile.c:772
+#: tracefile.c:289 tracefile-tfile.c:828
 #, possible-c-format
 msgid "Unknown block type '%c' (0x%x) in trace frame"
 msgstr ""
 
-#: tracefile.c:316 tracefile.c:334
+#: tracefile.c:319 tracefile.c:337
 msgid "file in which to save trace data"
 msgstr ""
 
-#: tracefile.c:346
+#: tracefile.c:349
 #, possible-c-format
 msgid "Trace data saved to %s '%s'.\n"
 msgstr ""
 
-#: tracefile.c:418
+#: tracefile.c:407
 #, possible-c-format
 msgid "Tracepoint %d has multiple locations, cannot infer $pc"
 msgstr ""
 
-#: tracefile.c:426
+#: tracefile.c:415
 #, possible-c-format
 msgid "Tracepoint %d does while-stepping, cannot infer $pc"
 msgstr ""
 
-#: tracefile.c:518
+#: tracefile.c:503
 msgid ""
 "Save the trace data to a file.\n"
 "Use the '-ctf' option to save the data to CTF format.\n"
@@ -27685,532 +28036,536 @@ msgid ""
 "using its own filesystem."
 msgstr ""
 
-#: tracefile-tfile.c:375
+#: tracefile-tfile.c:419
 msgid "Premature end of file while reading trace file"
 msgstr ""
 
-#: tracefile-tfile.c:396
+#: tracefile-tfile.c:440
 msgid "No trace file specified."
 msgstr ""
 
-#: tracefile-tfile.c:429
+#: tracefile-tfile.c:476
 msgid "File is not a valid trace file."
 msgstr ""
 
-#: tracefile-tfile.c:467
+#: tracefile-tfile.c:514
 msgid "Excessively long lines in trace file"
 msgstr ""
 
-#: tracefile-tfile.c:476
+#: tracefile-tfile.c:526
 msgid "No register block size recorded in trace file"
 msgstr ""
 
-#: tracefile-tfile.c:491
+#: tracefile-tfile.c:541
 msgid "No traceframes present in this file."
 msgstr ""
 
-#: tracefile-tfile.c:534
+#: tracefile-tfile.c:589
 #, possible-c-format
 msgid "Ignoring trace file definition \"%s\""
 msgstr ""
 
-#: tracefile-tfile.c:851
+#: tracefile-tfile.c:906
+msgid "tfile_xfer_partial: tdesc is read-only"
+msgstr ""
+
+#: tracefile-tfile.c:937
 msgid "tfile_xfer_partial: trace file is read-only"
 msgstr ""
 
-#: tracefile-tfile.c:1008
+#: tracefile-tfile.c:1094
 #, possible-c-format
 msgid "Unhandled trace block type (%d) '%c ' while building trace frame info."
 msgstr ""
 
-#: tracepoint.c:358
+#: tracepoint.c:357
 #, possible-c-format
 msgid "No trace variable named \"$%s\", not deleting"
 msgstr ""
 
-#: tracepoint.c:370
+#: tracepoint.c:369
 msgid "Must supply a non-empty variable name"
 msgstr ""
 
-#: tracepoint.c:377 tracepoint.c:382
+#: tracepoint.c:376 tracepoint.c:381
 #, possible-c-format
 msgid "$%s is not a valid trace state variable name"
 msgstr ""
 
-#: tracepoint.c:397
+#: tracepoint.c:396
 msgid "Syntax is $NAME [ = EXPR ]"
 msgstr ""
 
-#: tracepoint.c:413
+#: tracepoint.c:412
 msgid "Syntax must be $NAME [ = EXPR ]"
 msgstr ""
 
-#: tracepoint.c:429
+#: tracepoint.c:428
 #, possible-c-format
 msgid "Trace state variable $%s now has initial value %s.\n"
 msgstr ""
 
-#: tracepoint.c:442
+#: tracepoint.c:441
 #, possible-c-format
 msgid "Trace state variable $%s created, with initial value %s.\n"
 msgstr ""
 
-#: tracepoint.c:458
+#: tracepoint.c:457
 msgid "Delete all trace state variables? "
 msgstr ""
 
-#: tracepoint.c:473
+#: tracepoint.c:472
 #, possible-c-format
 msgid "Name \"%s\" not prefixed with '$', ignoring"
 msgstr ""
 
-#: tracepoint.c:492
+#: tracepoint.c:491
 msgid "No trace state variables.\n"
 msgstr ""
 
-#: tracepoint.c:584
+#: tracepoint.c:583
 msgid "This command cannot be used at the top level."
 msgstr ""
 
-#: tracepoint.c:590 tracepoint.c:596 tracepoint.c:602
+#: tracepoint.c:589 tracepoint.c:595 tracepoint.c:601
 msgid "This command can only be used in a tracepoint actions list."
 msgstr ""
 
-#: tracepoint.c:637
+#: tracepoint.c:636
 msgid "Target does not support \"/s\" option for string tracing."
 msgstr ""
 
-#: tracepoint.c:640
+#: tracepoint.c:639
 #, possible-c-format
 msgid "Undefined collection format \"%c\"."
 msgstr ""
 
-#: tracepoint.c:679
+#: tracepoint.c:678
 msgid "expression is malformed"
 msgstr ""
 
-#: tracepoint.c:685
+#: tracepoint.c:684
 msgid "expression has min height < 0"
 msgstr ""
 
-#: tracepoint.c:694 tracepoint.c:785 tracepoint.c:821
+#: tracepoint.c:693 tracepoint.c:782 tracepoint.c:814
 msgid "Expression is too complicated."
 msgstr ""
 
-#: tracepoint.c:725
+#: tracepoint.c:722
 #, possible-c-format
 msgid "`%s' is not a tracepoint action, or is ambiguous."
 msgstr ""
 
-#: tracepoint.c:764
+#: tracepoint.c:760
 #, possible-c-format
 msgid "constant `%s' (value %s) will not be collected."
 msgstr ""
 
-#: tracepoint.c:772
+#: tracepoint.c:768
 #, possible-c-format
 msgid "`%s' is optimized away and cannot be collected."
 msgstr ""
 
-#: tracepoint.c:839
+#: tracepoint.c:830
 #, possible-c-format
 msgid "while-stepping step count `%s' is malformed."
 msgstr ""
 
-#: tracepoint.c:847
+#: tracepoint.c:838
 #, possible-c-format
 msgid "`%s' is not a supported tracepoint action."
 msgstr ""
 
-#: tracepoint.c:922
+#: tracepoint.c:901
 #, possible-c-format
 msgid "Internal: register number %d too large for tracepoint"
 msgstr ""
 
-#: tracepoint.c:1172
+#: tracepoint.c:1136
 msgid "Can't collect locals; no symbol table info available.\n"
 msgstr ""
 
-#: tracepoint.c:1179
+#: tracepoint.c:1143
 msgid "No locals found in scope."
 msgstr ""
 
-#: tracepoint.c:1187
+#: tracepoint.c:1151
 msgid "Can't collect args; no symbol table info available."
 msgstr ""
 
-#: tracepoint.c:1193
+#: tracepoint.c:1157
 msgid "No args found in scope."
 msgstr ""
 
-#: tracepoint.c:1415 tracepoint.c:2890
+#: tracepoint.c:1341 tracepoint.c:2773
 #, possible-c-format
 msgid "Bad action list item: %s"
 msgstr ""
 
-#: tracepoint.c:1641
+#: tracepoint.c:1546
 #, possible-c-format
 msgid "Invalid tracepoint command '%s'"
 msgstr ""
 
-#: tracepoint.c:1757
+#: tracepoint.c:1635
 msgid "Pending tracepoints will not be resolved while GDB is disconnected\n"
 msgstr ""
 
-#: tracepoint.c:1788
+#: tracepoint.c:1666
 msgid "No tracepoints defined, not starting trace"
 msgstr ""
 
-#: tracepoint.c:1804
+#: tracepoint.c:1679
 #, possible-c-format
 msgid "May not insert %stracepoints, skipping tracepoint %d"
 msgstr ""
 
-#: tracepoint.c:1811
+#: tracepoint.c:1686
 msgid "No tracepoints enabled"
 msgstr ""
 
-#: tracepoint.c:1817
+#: tracepoint.c:1692
 msgid "No tracepoints enabled, not starting trace"
 msgstr ""
 
-#: tracepoint.c:1824
+#: tracepoint.c:1699
 msgid "No tracepoints that may be downloaded, not starting trace"
 msgstr ""
 
-#: tracepoint.c:1890
+#: tracepoint.c:1765
 msgid "Target does not support trace user/notes, info ignored"
 msgstr ""
 
-#: tracepoint.c:1914
+#: tracepoint.c:1789
 msgid "A trace is running already.  Start a new run? "
 msgstr ""
 
-#: tracepoint.c:1915
+#: tracepoint.c:1790
 msgid "New trace run not started."
 msgstr ""
 
-#: tracepoint.c:1930
+#: tracepoint.c:1805
 msgid "Trace is not running."
 msgstr ""
 
-#: tracepoint.c:1976 tracepoint.c:3139
+#: tracepoint.c:1851 tracepoint.c:3020
 msgid "Target does not support trace notes, note ignored"
 msgstr ""
 
-#: tracepoint.c:1996
+#: tracepoint.c:1871
 msgid "Using a trace file.\n"
 msgstr ""
 
-#: tracepoint.c:1999
+#: tracepoint.c:1874
 msgid "Trace can not be run on this target.\n"
 msgstr ""
 
-#: tracepoint.c:2006
+#: tracepoint.c:1881
 msgid "Run/stop status is unknown.\n"
 msgstr ""
 
-#: tracepoint.c:2010
+#: tracepoint.c:1885
 msgid "Trace is running on the target.\n"
 msgstr ""
 
-#: tracepoint.c:2017
+#: tracepoint.c:1892
 msgid "No trace has been run on the target.\n"
 msgstr ""
 
-#: tracepoint.c:2021
+#: tracepoint.c:1896
 #, possible-c-format
 msgid "Trace stopped by a tstop command (%s).\n"
 msgstr ""
 
-#: tracepoint.c:2024
+#: tracepoint.c:1899
 msgid "Trace stopped by a tstop command.\n"
 msgstr ""
 
-#: tracepoint.c:2027
+#: tracepoint.c:1902
 msgid "Trace stopped because the buffer was full.\n"
 msgstr ""
 
-#: tracepoint.c:2030
+#: tracepoint.c:1905
 msgid "Trace stopped because of disconnection.\n"
 msgstr ""
 
-#: tracepoint.c:2033
+#: tracepoint.c:1908
 #, possible-c-format
 msgid "Trace stopped by tracepoint %d.\n"
 msgstr ""
 
-#: tracepoint.c:2038
+#: tracepoint.c:1913
 #, possible-c-format
 msgid "Trace stopped by an error (%s, tracepoint %d).\n"
 msgstr ""
 
-#: tracepoint.c:2042
+#: tracepoint.c:1917
 #, possible-c-format
 msgid "Trace stopped by an error (%s).\n"
 msgstr ""
 
-#: tracepoint.c:2046
+#: tracepoint.c:1921
 msgid "Trace stopped for an unknown reason.\n"
 msgstr ""
 
-#: tracepoint.c:2049
+#: tracepoint.c:1924
 #, possible-c-format
 msgid "Trace stopped for some other reason (%d).\n"
 msgstr ""
 
-#: tracepoint.c:2058
+#: tracepoint.c:1933
 #, possible-c-format
 msgid "Buffer contains %d trace frames (of %d created total).\n"
 msgstr ""
 
-#: tracepoint.c:2064
+#: tracepoint.c:1939
 #, possible-c-format
 msgid "Collected %d trace frames.\n"
 msgstr ""
 
-#: tracepoint.c:2072
+#: tracepoint.c:1947
 #, possible-c-format
 msgid "Trace buffer has %d bytes of %d bytes free"
 msgstr ""
 
-#: tracepoint.c:2075
+#: tracepoint.c:1950
 #, possible-c-format
 msgid " (%d%% full)"
 msgstr ""
 
-#: tracepoint.c:2079
+#: tracepoint.c:1954
 msgid ".\n"
 msgstr ""
 
-#: tracepoint.c:2082
+#: tracepoint.c:1957
 #, possible-c-format
 msgid "Trace buffer has %d bytes free.\n"
 msgstr ""
 
-#: tracepoint.c:2087
+#: tracepoint.c:1962
 msgid "Trace will continue if GDB disconnects.\n"
 msgstr ""
 
-#: tracepoint.c:2089
+#: tracepoint.c:1964
 msgid "Trace will stop if GDB disconnects.\n"
 msgstr ""
 
-#: tracepoint.c:2092
+#: tracepoint.c:1967
 msgid "Trace buffer is circular.\n"
 msgstr ""
 
-#: tracepoint.c:2095
+#: tracepoint.c:1970
 #, possible-c-format
 msgid "Trace user is %s.\n"
 msgstr ""
 
-#: tracepoint.c:2098
+#: tracepoint.c:1973
 #, possible-c-format
 msgid "Trace notes: %s.\n"
 msgstr ""
 
-#: tracepoint.c:2102
+#: tracepoint.c:1977
 #, possible-c-format
 msgid "Looking at trace frame %d, tracepoint %d.\n"
 msgstr ""
 
-#: tracepoint.c:2105
+#: tracepoint.c:1980
 msgid "Not looking at any trace frame.\n"
 msgstr ""
 
 #. Reporting a run time is more readable than two long numbers.
-#: tracepoint.c:2115
+#: tracepoint.c:1990
 #, possible-c-format
 msgid "Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"
 msgstr ""
 
-#: tracepoint.c:2122
+#: tracepoint.c:1997
 #, possible-c-format
 msgid "Trace started at %ld.%06ld secs.\n"
 msgstr ""
 
-#: tracepoint.c:2127
+#: tracepoint.c:2002
 #, possible-c-format
 msgid "Trace stopped at %ld.%06ld secs.\n"
 msgstr ""
 
-#: tracepoint.c:2284
+#: tracepoint.c:2159
 msgid "Trace is running and will continue after detach; detach anyway? "
 msgstr ""
 
-#: tracepoint.c:2290
+#: tracepoint.c:2165
 msgid "Trace is running but will stop on detach; detach anyway? "
 msgstr ""
 
-#: tracepoint.c:2365
+#: tracepoint.c:2240
 msgid "Target failed to find requested trace frame."
 msgstr ""
 
-#: tracepoint.c:2407
+#: tracepoint.c:2282
 #, possible-c-format
 msgid "Found trace frame %d, tracepoint %d\n"
 msgstr ""
 
-#: tracepoint.c:2416
+#: tracepoint.c:2291
 msgid "No longer looking at any trace frame\n"
 msgstr ""
 
 #. This case may never occur, check.
-#: tracepoint.c:2418
+#: tracepoint.c:2293
 msgid "No trace frame found\n"
 msgstr ""
 
-#: tracepoint.c:2452 tracepoint.c:2677
+#: tracepoint.c:2327 tracepoint.c:2551
 msgid "May not look at trace frames while trace is running."
 msgstr ""
 
-#: tracepoint.c:2487
+#: tracepoint.c:2362
 msgid "not debugging trace buffer"
 msgstr ""
 
-#: tracepoint.c:2489
+#: tracepoint.c:2364
 msgid "already at start of trace buffer"
 msgstr ""
 
-#: tracepoint.c:2500
+#: tracepoint.c:2375
 #, possible-c-format
 msgid "invalid input (%d is less than zero)"
 msgstr ""
 
-#: tracepoint.c:2547
+#: tracepoint.c:2422
 msgid "No current tracepoint -- please supply an argument."
 msgstr ""
 
-#: tracepoint.c:2598
+#: tracepoint.c:2472
 msgid "No line number information available."
 msgstr ""
 
-#: tracepoint.c:2619
+#: tracepoint.c:2493
 msgid "Cannot find a good line."
 msgstr ""
 
 #. Is there any case in which we get here, and have an address
 #. which the user would want to see?  If we have debugging
 #. symbols and no line numbers?
-#: tracepoint.c:2626
+#: tracepoint.c:2500
 #, possible-c-format
 msgid "Line number %d is out of range for \"%s\"."
 msgstr ""
 
-#: tracepoint.c:2717
+#: tracepoint.c:2593
 msgid "requires an argument (function, line or *addr) to define a scope"
 msgstr ""
 
-#: tracepoint.c:2979
+#: tracepoint.c:2862
 msgid "No current trace frame."
 msgstr ""
 
-#: tracepoint.c:2984
+#: tracepoint.c:2867
 #, possible-c-format
 msgid "No known tracepoint matches 'current' tracepoint #%d."
 msgstr ""
 
-#: tracepoint.c:3084
+#: tracepoint.c:2965
 msgid "Buffer too small for source encoding"
 msgstr ""
 
-#: tracepoint.c:3089
+#: tracepoint.c:2970
 msgid "Source string too long for buffer"
 msgstr ""
 
-#: tracepoint.c:3127
+#: tracepoint.c:3008
 msgid "Target does not support trace notes, user ignored"
 msgstr ""
 
-#: tracepoint.c:3151
+#: tracepoint.c:3032
 msgid "Target does not support trace notes, stop note ignored"
 msgstr ""
 
-#: tracepoint.c:3208
+#: tracepoint.c:3089
 msgid "could not change traceframe"
 msgstr ""
 
-#: tracepoint.c:3398
+#: tracepoint.c:3283
 #, possible-c-format
 msgid "Assuming tracepoint %d is same as target's tracepoint %d at %s.\n"
 msgstr ""
 
-#: tracepoint.c:3423
+#: tracepoint.c:3308
 #, possible-c-format
 msgid "Created tracepoint %d for target's tracepoint %d at %s.\n"
 msgstr ""
 
-#: tracepoint.c:3428
+#: tracepoint.c:3313
 #, possible-c-format
 msgid ""
 "Failed to create tracepoint for target's tracepoint %d at %s, skipping it.\n"
 msgstr ""
 
-#: tracepoint.c:3525
+#: tracepoint.c:3410
 #, possible-c-format
 msgid "Assuming trace state variable $%s is same as target's variable %d.\n"
 msgstr ""
 
-#: tracepoint.c:3533
+#: tracepoint.c:3418
 #, possible-c-format
 msgid "Created trace state variable $%s for target's variable %d.\n"
 msgstr ""
 
-#: tracepoint.c:3587
+#: tracepoint.c:3472
 #, possible-c-format
 msgid ""
 "Malformed trace status, at %s\n"
 "Status line: '%s'\n"
 msgstr ""
 
-#: tracepoint.c:3796
+#: tracepoint.c:3681
 #, possible-c-format
 msgid "Unrecognized char '%c' in tracepoint definition, skipping rest"
 msgstr ""
 
 #. Don't error out, the target might be sending us optional
 #. info that we don't care about.
-#: tracepoint.c:3850
+#: tracepoint.c:3735
 #, possible-c-format
 msgid "Unrecognized tracepoint piece '%c', ignoring"
 msgstr ""
 
-#: tracepoint.c:3919
+#: tracepoint.c:3805
 #, possible-c-format
 msgid "bad marker definition: %s"
 msgstr ""
 
-#: tracepoint.c:4031
+#: tracepoint.c:3916
 msgid "Data: \""
 msgstr ""
 
-#: tracepoint.c:4045
+#: tracepoint.c:3930
 msgid "Probed by static tracepoints: "
 msgstr ""
 
-#: tracepoint.c:4161
+#: tracepoint.c:4046
 msgid ""
 "Can not parse XML trace frame info; XML support was disabled at compile time"
 msgstr ""
 
-#: tracepoint.c:4255
+#: tracepoint.c:4143
 msgid "trace frame info"
 msgstr ""
 
-#: tracepoint.c:4353
+#: tracepoint.c:4241
 msgid "List the variables local to a scope"
 msgstr ""
 
-#: tracepoint.c:4356
+#: tracepoint.c:4244
 msgid "Tracing of program execution without stopping the program."
 msgstr ""
 
-#: tracepoint.c:4360
+#: tracepoint.c:4248
 msgid "Print everything collected at the current tracepoint."
 msgstr ""
 
-#: tracepoint.c:4362
+#: tracepoint.c:4250
 msgid ""
 "Define a trace state variable.\n"
 "Argument is a $-prefixed name, optionally followed\n"
@@ -28218,7 +28573,7 @@ msgid ""
 "at the start of tracing."
 msgstr ""
 
-#: tracepoint.c:4369
+#: tracepoint.c:4257
 msgid ""
 "Delete one or more trace state variables.\n"
 "Arguments are the names of the variables to delete.\n"
@@ -28226,33 +28581,33 @@ msgid ""
 msgstr ""
 
 #. FIXME add a trace variable completer.
-#: tracepoint.c:4375
+#: tracepoint.c:4263
 msgid "Status of trace state variables and their values.\n"
 msgstr ""
 
-#: tracepoint.c:4380
+#: tracepoint.c:4268
 msgid "List target static tracepoints markers.\n"
 msgstr ""
 
-#: tracepoint.c:4384
+#: tracepoint.c:4272
 msgid ""
 "Select a trace frame;\n"
 "No argument means forward by one frame; '-' means backward by one frame."
 msgstr ""
 
-#: tracepoint.c:4389
+#: tracepoint.c:4277
 msgid ""
 "Select a trace frame whose PC is outside the given range (exclusive).\n"
 "Usage: tfind outside addr1, addr2"
 msgstr ""
 
-#: tracepoint.c:4394
+#: tracepoint.c:4282
 msgid ""
 "Select a trace frame whose PC is in the given range (inclusive).\n"
 "Usage: tfind range addr1,addr2"
 msgstr ""
 
-#: tracepoint.c:4399
+#: tracepoint.c:4287
 msgid ""
 "Select a trace frame by source line.\n"
 "Argument can be a line number (with optional source file),\n"
@@ -28260,31 +28615,31 @@ msgid ""
 "Default argument is 'the next source line that was traced'."
 msgstr ""
 
-#: tracepoint.c:4406
+#: tracepoint.c:4294
 msgid ""
 "Select a trace frame by tracepoint number.\n"
 "Default is the tracepoint for the current trace frame."
 msgstr ""
 
-#: tracepoint.c:4411
+#: tracepoint.c:4299
 msgid ""
 "Select a trace frame by PC.\n"
 "Default is the current PC, or the PC of the current trace frame."
 msgstr ""
 
-#: tracepoint.c:4416
+#: tracepoint.c:4304
 msgid "De-select any trace frame and resume 'live' debugging."
 msgstr ""
 
-#: tracepoint.c:4423
+#: tracepoint.c:4311
 msgid "Select the first trace frame in the trace buffer."
 msgstr ""
 
-#: tracepoint.c:4427
+#: tracepoint.c:4315
 msgid "Display the status of the current trace data collection."
 msgstr ""
 
-#: tracepoint.c:4429
+#: tracepoint.c:4317
 msgid ""
 "Stop trace data collection.\n"
 "Usage: tstop [ <notes> ... ]\n"
@@ -28292,7 +28647,7 @@ msgid ""
 "reported by tstatus (if the target supports trace notes)."
 msgstr ""
 
-#: tracepoint.c:4435
+#: tracepoint.c:4323
 msgid ""
 "Start trace data collection.\n"
 "Usage: tstart [ <notes> ... ]\n"
@@ -28300,7 +28655,7 @@ msgid ""
 "reported by tstatus (if the target supports trace notes)."
 msgstr ""
 
-#: tracepoint.c:4441
+#: tracepoint.c:4329
 msgid ""
 "Ends a list of commands or actions.\n"
 "Several GDB commands allow you to enter a list of commands or actions.\n"
@@ -28310,7 +28665,7 @@ msgid ""
 "Note: the \"end\" command cannot be used at the gdb prompt."
 msgstr ""
 
-#: tracepoint.c:4448
+#: tracepoint.c:4336
 msgid ""
 "Specify single-stepping behavior at a tracepoint.\n"
 "Argument is number of instructions to trace in single-step mode\n"
@@ -28321,7 +28676,7 @@ msgid ""
 "Note: this command can only be used in a tracepoint \"actions\" list."
 msgstr ""
 
-#: tracepoint.c:4459
+#: tracepoint.c:4347
 msgid ""
 "Specify one or more data items to be collected at a tracepoint.\n"
 "Accepts a comma-separated list of (one or more) expressions.  GDB will\n"
@@ -28334,7 +28689,7 @@ msgid ""
 "Note: this command can only be used in a tracepoint \"actions\" list."
 msgstr ""
 
-#: tracepoint.c:4470
+#: tracepoint.c:4358
 msgid ""
 "Specify one or more expressions to be evaluated at a tracepoint.\n"
 "Accepts a comma-separated list of (one or more) expressions.\n"
@@ -28342,7 +28697,7 @@ msgid ""
 "Note: this command can only be used in a tracepoint \"actions\" list."
 msgstr ""
 
-#: tracepoint.c:4476
+#: tracepoint.c:4364
 msgid ""
 "Specify the actions to be taken at a tracepoint.\n"
 "Tracepoint actions may include collecting of specified data,\n"
@@ -28350,80 +28705,80 @@ msgid ""
 "depending on target's capabilities."
 msgstr ""
 
-#: tracepoint.c:4484
+#: tracepoint.c:4372
 msgid "Set the list of expressions to collect by default"
 msgstr ""
 
-#: tracepoint.c:4485
+#: tracepoint.c:4373
 msgid "Show the list of expressions to collect by default"
 msgstr ""
 
-#: tracepoint.c:4491
+#: tracepoint.c:4379
 msgid "Set whether tracing continues after GDB disconnects."
 msgstr ""
 
-#: tracepoint.c:4492
+#: tracepoint.c:4380
 msgid "Show whether tracing continues after GDB disconnects."
 msgstr ""
 
-#: tracepoint.c:4493
+#: tracepoint.c:4381
 msgid ""
 "Use this to continue a tracing run even if GDB disconnects\n"
 "or detaches from the target.  You can reconnect later and look at\n"
 "trace data collected in the meantime."
 msgstr ""
 
-#: tracepoint.c:4503
+#: tracepoint.c:4391
 msgid "Set target's use of circular trace buffer."
 msgstr ""
 
-#: tracepoint.c:4504
+#: tracepoint.c:4392
 msgid "Show target's use of circular trace buffer."
 msgstr ""
 
-#: tracepoint.c:4505
+#: tracepoint.c:4393
 msgid ""
 "Use this to make the trace buffer into a circular buffer,\n"
 "which will discard traceframes (oldest first) instead of filling\n"
 "up and stopping the trace run."
 msgstr ""
 
-#: tracepoint.c:4515
+#: tracepoint.c:4403
 msgid "Set requested size of trace buffer."
 msgstr ""
 
-#: tracepoint.c:4516
+#: tracepoint.c:4404
 msgid "Show requested size of trace buffer."
 msgstr ""
 
-#: tracepoint.c:4517
+#: tracepoint.c:4405
 msgid ""
 "Use this to choose a size for the trace buffer.  Some targets\n"
 "may have fixed or limited buffer sizes.  Specifying \"unlimited\" or -1\n"
 "disables any attempt to set the buffer size and lets the target choose."
 msgstr ""
 
-#: tracepoint.c:4525
+#: tracepoint.c:4413
 msgid "Set the user name to use for current and future trace runs"
 msgstr ""
 
-#: tracepoint.c:4526
+#: tracepoint.c:4414
 msgid "Show the user name to use for current and future trace runs"
 msgstr ""
 
-#: tracepoint.c:4532
+#: tracepoint.c:4420
 msgid "Set notes string to use for current and future trace runs"
 msgstr ""
 
-#: tracepoint.c:4533
+#: tracepoint.c:4421
 msgid "Show the notes string to use for current and future trace runs"
 msgstr ""
 
-#: tracepoint.c:4539
+#: tracepoint.c:4427
 msgid "Set notes string to use for future tstop commands"
 msgstr ""
 
-#: tracepoint.c:4540
+#: tracepoint.c:4428
 msgid "Show the notes string to use for future tstop commands"
 msgstr ""
 
@@ -28455,17 +28810,17 @@ msgstr ""
 msgid "Disable TUI display mode."
 msgstr ""
 
-#: tui/tui-stack.c:501
+#: tui/tui-stack.c:498
 msgid ""
 "Update the source window and locator to display the current execution "
 "point.\n"
 msgstr ""
 
-#: tui/tui-io.c:555
+#: tui/tui-io.c:543
 msgid "Cannot create pipe for readline"
 msgstr ""
 
-#: tui/tui-io.c:559
+#: tui/tui-io.c:547
 msgid "Cannot redirect readline output"
 msgstr ""
 
@@ -28496,7 +28851,7 @@ msgid ""
 "%s"
 msgstr ""
 
-#: tui/tui-interp.c:194
+#: tui/tui-interp.c:302
 msgid "tui_exec called"
 msgstr ""
 
@@ -28520,34 +28875,6 @@ msgstr ""
 msgid "TUI command to control the register window."
 msgstr ""
 
-#: tui/tui-file.c:78
-msgid "tui_file_delete: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:128
-msgid "tui_file_isatty: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:142
-msgid "tui_file_rewind: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:155
-msgid "tui_file_put: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:196
-msgid "tui_file_get_strbuf: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:211
-msgid "tui_file_adjust_strbuf: bad magic number"
-msgstr ""
-
-#: tui/tui-file.c:239
-msgid "tui_file_flush: bad magic number"
-msgstr ""
-
 #: tui/tui-win.c:210
 #, possible-c-format
 msgid "The attribute mode to use for the active TUI window border is \"%s\".\n"
@@ -28571,23 +28898,23 @@ msgstr ""
 msgid "Text User Interface commands."
 msgstr ""
 
-#: tui/tui-win.c:438 tui/tui-win.c:442
+#: tui/tui-win.c:452 tui/tui-win.c:456
 msgid "TUI configuration variables"
 msgstr ""
 
-#: tui/tui-win.c:447
+#: tui/tui-win.c:461
 msgid "Refresh the terminal display.\n"
 msgstr ""
 
-#: tui/tui-win.c:448
+#: tui/tui-win.c:462
 msgid ""
 "Set the width (in characters) of tab stops.\n"
 "Usage: tabset <n>\n"
 msgstr ""
 
-#: tui/tui-win.c:451
+#: tui/tui-win.c:465
 msgid ""
-"Set the height of a specified window.\n"
+"Set or modify the height of a specified window.\n"
 "Usage: winheight <win_name> [+ | -] <#lines>\n"
 "Window names are:\n"
 "src  : the source window\n"
@@ -28596,11 +28923,11 @@ msgid ""
 "regs : the register display\n"
 msgstr ""
 
-#: tui/tui-win.c:461
+#: tui/tui-win.c:476
 msgid "List of all displayed windows.\n"
 msgstr ""
 
-#: tui/tui-win.c:462
+#: tui/tui-win.c:477
 msgid ""
 "Set focus to named window or next/prev window.\n"
 "Usage: focus {<win> | next | prev}\n"
@@ -28611,39 +28938,39 @@ msgid ""
 "cmd  : the command window\n"
 msgstr ""
 
-#: tui/tui-win.c:472
+#: tui/tui-win.c:487
 msgid ""
 "Scroll window forward.\n"
 "Usage: + [win] [n]\n"
 msgstr ""
 
-#: tui/tui-win.c:475
+#: tui/tui-win.c:490
 msgid ""
 "Scroll window backward.\n"
 "Usage: - [win] [n]\n"
 msgstr ""
 
-#: tui/tui-win.c:478
+#: tui/tui-win.c:493
 msgid ""
 "Scroll window text to the left.\n"
 "Usage: < [win] [n]\n"
 msgstr ""
 
-#: tui/tui-win.c:481
+#: tui/tui-win.c:496
 msgid ""
 "Scroll window text to the right.\n"
 "Usage: > [win] [n]\n"
 msgstr ""
 
-#: tui/tui-win.c:487
+#: tui/tui-win.c:502
 msgid "Set the kind of border for TUI windows."
 msgstr ""
 
-#: tui/tui-win.c:488
+#: tui/tui-win.c:503
 msgid "Show the kind of border for TUI windows."
 msgstr ""
 
-#: tui/tui-win.c:489
+#: tui/tui-win.c:504
 msgid ""
 "This variable controls the border of TUI windows:\n"
 "space           use a white space\n"
@@ -28651,15 +28978,15 @@ msgid ""
 "acs             use the Alternate Character Set"
 msgstr ""
 
-#: tui/tui-win.c:499
+#: tui/tui-win.c:514
 msgid "Set the attribute mode to use for the TUI window borders."
 msgstr ""
 
-#: tui/tui-win.c:500
+#: tui/tui-win.c:515
 msgid "Show the attribute mode to use for the TUI window borders."
 msgstr ""
 
-#: tui/tui-win.c:501
+#: tui/tui-win.c:516
 msgid ""
 "This variable controls the attributes to use for the window borders:\n"
 "normal          normal display\n"
@@ -28671,15 +28998,15 @@ msgid ""
 "bold-standout   use extra bright or bold with standout mode"
 msgstr ""
 
-#: tui/tui-win.c:515
+#: tui/tui-win.c:530
 msgid "Set the attribute mode to use for the active TUI window border."
 msgstr ""
 
-#: tui/tui-win.c:516
+#: tui/tui-win.c:531
 msgid "Show the attribute mode to use for the active TUI window border."
 msgstr ""
 
-#: tui/tui-win.c:517
+#: tui/tui-win.c:532
 msgid ""
 "This variable controls the attributes to use for the active window border:\n"
 "normal          normal display\n"
@@ -28691,67 +29018,67 @@ msgid ""
 "bold-standout   use extra bright or bold with standout mode"
 msgstr ""
 
-#: tui/tui-win.c:1050 tui/tui-win.c:1176 tui/tui-win.c:1702
+#: tui/tui-win.c:1065 tui/tui-win.c:1192 tui/tui-win.c:1715
 msgid ""
 "Invalid window specified. \n"
 "The window name specified must be valid and visible.\n"
 msgstr ""
 
-#: tui/tui-win.c:1061
+#: tui/tui-win.c:1076
 #, possible-c-format
 msgid "Focus set to %s window.\n"
 msgstr ""
 
-#: tui/tui-win.c:1066
+#: tui/tui-win.c:1080
 #, possible-c-format
 msgid ""
 "Incorrect Number of Arguments.\n"
 "%s"
 msgstr ""
 
-#: tui/tui-win.c:1144
+#: tui/tui-win.c:1158
 msgid "Tab widths greater than 0 must be specified."
 msgstr ""
 
-#: tui/tui-win.c:1211 tui/tui-win.c:1217
+#: tui/tui-win.c:1227 tui/tui-win.c:1233
 #, possible-c-format
 msgid ""
 "Invalid window height specified.\n"
 "%s"
 msgstr ""
 
-#: typeprint.c:349
+#: typeprint.c:351
 msgid "Language not supported."
 msgstr ""
 
-#: typeprint.c:440
+#: typeprint.c:433
 #, possible-c-format
 msgid "unrecognized flag '%c'"
 msgstr ""
 
-#: typeprint.c:446
+#: typeprint.c:439
 msgid "flag expected"
 msgstr ""
 
-#: typeprint.c:448
+#: typeprint.c:441
 msgid "expected space after format"
 msgstr ""
 
-#: typeprint.c:583
+#: typeprint.c:575
 msgid "internal error: unhandled type in print_type_scalar"
 msgstr ""
 
-#: typeprint.c:659
+#: typeprint.c:647
 #, possible-c-format
 msgid "Printing of methods defined in a class in %s\n"
 msgstr ""
 
-#: typeprint.c:675
+#: typeprint.c:663
 #, possible-c-format
 msgid "Printing of typedefs defined in a class in %s\n"
 msgstr ""
 
-#: typeprint.c:684
+#: typeprint.c:672
 msgid ""
 "Print definition of type TYPE.\n"
 "Usage: ptype[/FLAGS] TYPE | EXPRESSION\n"
@@ -28769,171 +29096,107 @@ msgid ""
 "  /T    print typedefs defined in a class"
 msgstr ""
 
-#: typeprint.c:702
+#: typeprint.c:690
 msgid ""
 "Print data type of expression EXP.\n"
 "Only one level of typedefs is unrolled.  See also \"ptype\"."
 msgstr ""
 
-#: typeprint.c:707
+#: typeprint.c:695
 msgid "Generic command for showing type-printing settings."
 msgstr ""
 
-#: typeprint.c:710
+#: typeprint.c:698
 msgid "Generic command for setting how types print."
 msgstr ""
 
-#: typeprint.c:714
+#: typeprint.c:702
 msgid "Set printing of methods defined in classes."
 msgstr ""
 
-#: typeprint.c:715
+#: typeprint.c:703
 msgid "Show printing of methods defined in classes."
 msgstr ""
 
-#: typeprint.c:721
+#: typeprint.c:709
 msgid "Set printing of typedefs defined in classes."
 msgstr ""
 
-#: typeprint.c:722
+#: typeprint.c:710
 msgid "Show printing of typedefs defined in classes."
 msgstr ""
 
-#: ui-file.c:187
-msgid "ui_file_data: bad magic number"
-msgstr ""
-
-#: ui-file.c:420
-msgid "mem_file_delete: bad magic number"
-msgstr ""
-
-#: ui-file.c:439
-msgid "mem_file_rewind: bad magic number"
-msgstr ""
-
-#: ui-file.c:452
-msgid "mem_file_put: bad magic number"
-msgstr ""
-
-#: ui-file.c:466
-msgid "mem_file_write: bad magic number"
-msgstr ""
-
-#: ui-file.c:541
-msgid "stdio_file_delete: bad magic number"
-msgstr ""
-
-#: ui-file.c:556
-msgid "stdio_file_flush: bad magic number"
-msgstr ""
-
-#: ui-file.c:567
-msgid "stdio_file_read: bad magic number"
-msgstr ""
-
-#: ui-file.c:590
-msgid "stdio_file_write: bad magic number"
-msgstr ""
-
-#: ui-file.c:629
-msgid "stdio_file_fputs: bad magic number"
-msgstr ""
-
-#: ui-file.c:644
-msgid "stdio_file_isatty: bad magic number"
-msgstr ""
-
-#: ui-file.c:655
-msgid "stdio_file_fseek: bad magic number"
-msgstr ""
-
-#: ui-file.c:776
-msgid "tee_file_delete: bad magic number"
+#: typeprint.c:722
+msgid "<not allocated>"
 msgstr ""
 
-#: ui-file.c:792
-msgid "tee_file_flush: bad magic number"
+#: typeprint.c:730
+msgid "<not associated>"
 msgstr ""
 
-#: ui-file.c:804
-msgid "tee_file_write: bad magic number"
+#: ui-out.c:210
+msgid ""
+"extra table_body call not allowed; there must be only one table_body after a "
+"table_begin and before a table_end."
 msgstr ""
 
-#: ui-file.c:816
-msgid "tee_file_fputs: bad magic number"
+#: ui-out.c:218
+msgid "number of headers differ from number of table columns."
 msgstr ""
 
-#: ui-file.c:828
-msgid "tee_file_isatty: bad magic number"
+#: ui-out.c:233
+msgid "table header must be specified after table_begin and before table_body."
 msgstr ""
 
-#: ui-out.c:292
+#: ui-out.c:352
 msgid "tables cannot be nested; table_begin found before previous table_end."
 msgstr ""
 
-#: ui-out.c:313
+#: ui-out.c:366
 msgid ""
-"table_body outside a table is not valid; it must be after a table_begin and "
-"before a table_end."
+"table_header outside a table is not valid; it must be after a table_begin "
+"and before a table_body."
 msgstr ""
 
-#: ui-out.c:317
+#: ui-out.c:379
 msgid ""
-"extra table_body call not allowed; there must be only one table_body after a "
-"table_begin and before a table_end."
-msgstr ""
-
-#: ui-out.c:321
-msgid "number of headers differ from number of table columns."
+"table_body outside a table is not valid; it must be after a table_begin and "
+"before a table_end."
 msgstr ""
 
-#: ui-out.c:335
+#: ui-out.c:392
 msgid "misplaced table_end or missing table_begin."
 msgstr ""
 
-#: ui-out.c:352
-msgid "table header must be specified after table_begin and before table_body."
-msgstr ""
-
-#: ui-out.c:385
-msgid ""
-"table header or table_body expected; lists must be specified after "
-"table_body."
-msgstr ""
-
-#: ui-out.c:1035
+#: ui-out.c:653
 msgid ""
 "table_body missing; table fields must be specified after table_body and "
 "inside a list."
 msgstr ""
 
-#: ui-out.c:1052
+#: ui-out.c:666
 msgid "ui-out internal error in handling headers."
 msgstr ""
 
-#: user-regs.c:246
+#: user-regs.c:249
 msgid "List the names of the current user registers.\n"
 msgstr ""
 
-#: utils.c:134
+#: utils.c:118
 #, possible-c-format
 msgid "Printing of 8-bit characters in strings as \\nnn is %s.\n"
 msgstr ""
 
-#: utils.c:148
+#: utils.c:132
 #, possible-c-format
 msgid "State of pagination is %s.\n"
 msgstr ""
 
-#: utils.c:250
-msgid "Cannot restore redirection of the current output protocol"
-msgstr ""
-
-#: utils.c:482
+#: utils.c:383
 msgid "free_current_contents: NULL pointer"
 msgstr ""
 
-#: utils.c:599
+#: utils.c:504
 #, possible-c-format
 msgid ""
 "%s\n"
@@ -28941,20 +29204,20 @@ msgid ""
 "time.\n"
 msgstr ""
 
-#: utils.c:729
+#: utils.c:637
 #, possible-c-format
 msgid ""
 "%s\n"
 "Quit this debugging session? "
 msgstr ""
 
-#: utils.c:738
+#: utils.c:646
 msgid ""
 "\n"
 "This is a bug, please report it."
 msgstr ""
 
-#: utils.c:740
+#: utils.c:648
 #, possible-c-format
 msgid ""
 "  For instructions, see:\n"
@@ -28964,73 +29227,69 @@ msgstr ""
 #. Default (yes/batch case) is to dump core.  This leaves a GDB
 #. `dropping' so that it is easier to see that something went
 #. wrong in GDB.
-#: utils.c:755
+#: utils.c:663
 #, possible-c-format
 msgid ""
 "%s\n"
 "Create a core file of GDB? "
 msgstr ""
 
-#: utils.c:795
-msgid "Command aborted."
-msgstr ""
-
-#: utils.c:868
+#: utils.c:776
 #, possible-c-format
 msgid "Configure what GDB does when %s is detected."
 msgstr ""
 
-#: utils.c:871
+#: utils.c:779
 #, possible-c-format
 msgid "Show what GDB does when %s is detected."
 msgstr ""
 
-#: utils.c:890
+#: utils.c:798
 #, possible-c-format
 msgid "Set whether GDB should quit when an %s is detected"
 msgstr ""
 
-#: utils.c:893
+#: utils.c:801
 #, possible-c-format
 msgid "Show whether GDB will quit when an %s is detected"
 msgstr ""
 
-#: utils.c:913
+#: utils.c:821
 #, possible-c-format
 msgid "Set whether GDB should create a core file of GDB when %s is detected"
 msgstr ""
 
-#: utils.c:916
+#: utils.c:824
 #, possible-c-format
 msgid "Show whether GDB will create a core file of GDB when %s is detected"
 msgstr ""
 
-#: utils.c:1054
+#: utils.c:978
 #, possible-c-format
 msgid "virtual memory exhausted: can't allocate %ld bytes."
 msgstr ""
 
-#: utils.c:1059
+#: utils.c:983
 msgid "virtual memory exhausted."
 msgstr ""
 
-#: utils.c:1233
+#: utils.c:1188
 #, possible-c-format
 msgid "(%s or %s) [answered %c; input not from terminal]\n"
 msgstr ""
 
-#: utils.c:1248
+#: utils.c:1210
 #, possible-c-format
 msgid "%s%s(%s or %s) %s"
 msgstr ""
 
 #. Invalid entries are not defaulted and require another selection.
-#: utils.c:1293
+#: utils.c:1259
 #, possible-c-format
 msgid "Please answer %s or %s.\n"
 msgstr ""
 
-#: utils.c:1477
+#: utils.c:1440
 #, possible-c-format
 msgid ""
 "The escape sequence `\\%c' is equivalent to plain `%c', which has no "
@@ -29038,101 +29297,101 @@ msgid ""
 "in the `%s' character set."
 msgstr ""
 
-#: utils.c:1588
+#: utils.c:1551
 #, possible-c-format
 msgid "Number of lines gdb thinks are in a page is %s.\n"
 msgstr ""
 
-#: utils.c:1599
+#: utils.c:1562
 #, possible-c-format
 msgid "Number of characters gdb thinks are in a line is %s.\n"
 msgstr ""
 
-#: utils.c:2674
+#: utils.c:2627
 #, possible-c-format
 msgid "Timestamping debugging messages is %s.\n"
 msgstr ""
 
-#: utils.c:2682
+#: utils.c:2635
 msgid "Set number of characters where GDB should wrap lines of its output."
 msgstr ""
 
-#: utils.c:2683
+#: utils.c:2636
 msgid "Show number of characters where GDB should wrap lines of its output."
 msgstr ""
 
-#: utils.c:2684
+#: utils.c:2637
 msgid ""
 "This affects where GDB wraps its output to fit the screen width.\n"
 "Setting this to \"unlimited\" or zero prevents GDB from wrapping its output."
 msgstr ""
 
-#: utils.c:2691
+#: utils.c:2644
 msgid "Set number of lines in a page for GDB output pagination."
 msgstr ""
 
-#: utils.c:2692
+#: utils.c:2645
 msgid "Show number of lines in a page for GDB output pagination."
 msgstr ""
 
-#: utils.c:2693
+#: utils.c:2646
 msgid ""
 "This affects the number of lines after which GDB will pause\n"
 "its output and ask you whether to continue.\n"
 "Setting this to \"unlimited\" or zero causes GDB never pause during output."
 msgstr ""
 
-#: utils.c:2702
+#: utils.c:2655
 msgid "Set state of GDB output pagination."
 msgstr ""
 
-#: utils.c:2703
+#: utils.c:2656
 msgid "Show state of GDB output pagination."
 msgstr ""
 
-#: utils.c:2704
+#: utils.c:2657
 msgid ""
 "When pagination is ON, GDB pauses at end of each screenful of\n"
 "its output and asks you whether to continue.\n"
 "Turning pagination off is an alternative to \"set height unlimited\"."
 msgstr ""
 
-#: utils.c:2713
+#: utils.c:2666
 msgid "Set printing of 8-bit characters in strings as \\nnn."
 msgstr ""
 
-#: utils.c:2714
+#: utils.c:2667
 msgid "Show printing of 8-bit characters in strings as \\nnn."
 msgstr ""
 
-#: utils.c:2721
+#: utils.c:2674
 msgid "Set timestamping of debugging messages."
 msgstr ""
 
-#: utils.c:2722
+#: utils.c:2675
 msgid "Show timestamping of debugging messages."
 msgstr ""
 
-#: utils.c:2723
+#: utils.c:2676
 msgid ""
 "When set, debugging messages will be marked with seconds and microseconds."
 msgstr ""
 
-#: utils.c:2807
+#: utils.c:2760
 #, possible-c-format
 msgid "invalid hex \"%s\""
 msgstr ""
 
-#: utils.c:2820
+#: utils.c:2773
 #, possible-c-format
 msgid "invalid decimal \"%s\""
 msgstr ""
 
-#: utils.c:3102
+#: utils.c:3055
 msgid "process-id to attach"
 msgstr ""
 
-#: utils.c:3108
+#: utils.c:3061
 #, possible-c-format
 msgid "Illegal process-id: %s."
 msgstr ""
@@ -29168,7 +29427,15 @@ msgstr ""
 msgid "not an array or string"
 msgstr ""
 
-#: valarith.c:201
+#: valarith.c:202
+msgid "no such vector element (vector not associated)"
+msgstr ""
+
+#: valarith.c:204
+msgid "no such vector element (vector not allocated)"
+msgstr ""
+
+#: valarith.c:206
 msgid "no such vector element"
 msgstr ""
 
@@ -29332,178 +29599,169 @@ msgstr ""
 msgid "No memory available to program: call to malloc failed"
 msgstr ""
 
-#: valops.c:411
+#: valops.c:412
 msgid "array element type size does not divide object size in cast"
 msgstr ""
 
-#: valops.c:526
+#: valops.c:527
 msgid "value truncated"
 msgstr ""
 
-#: valops.c:548
+#: valops.c:549
 msgid "Cannot convert between vector values of different sizes"
 msgstr ""
 
-#: valops.c:551
+#: valops.c:552
 msgid "can only cast scalar to vector of same size"
 msgstr ""
 
-#: valops.c:571
+#: valops.c:572
 msgid "Invalid cast."
 msgstr ""
 
-#: valops.c:622
+#: valops.c:623
 msgid "Invalid reinterpret_cast"
 msgstr ""
 
-#: valops.c:736
+#: valops.c:739
 msgid "Argument to dynamic_cast must be a pointer or reference type"
 msgstr ""
 
-#: valops.c:739
+#: valops.c:742
 msgid "Argument to dynamic_cast must be pointer to class or `void *'"
 msgstr ""
 
-#: valops.c:747
+#: valops.c:750
 msgid "Argument to dynamic_cast does not have pointer type"
 msgstr ""
 
-#: valops.c:752
+#: valops.c:755
 msgid "Argument to dynamic_cast does not have pointer to class type"
 msgstr ""
 
-#: valops.c:765
+#: valops.c:768
 msgid "Argument to dynamic_cast does not have class type"
 msgstr ""
 
-#: valops.c:778
+#: valops.c:781
 msgid "Ambiguous dynamic_cast"
 msgstr ""
 
-#: valops.c:783
+#: valops.c:786
 msgid "Couldn't determine value's most derived type for dynamic_cast"
 msgstr ""
 
-#: valops.c:836
+#: valops.c:839
 msgid "dynamic_cast failed"
 msgstr ""
 
-#: valops.c:894
+#: valops.c:897
 msgid "Not a numeric type."
 msgstr ""
 
-#: valops.c:1080 valops.c:1129
+#: valops.c:1089 valops.c:1145
 #, possible-c-format
 msgid "Can't handle bitfields which don't fit in a %d bit word."
 msgstr ""
 
-#: valops.c:1111
+#: valops.c:1127
 msgid "Value being assigned to is no longer active."
 msgstr ""
 
-#: valops.c:1139 value.c:1150
+#: valops.c:1155 value.c:1238
 msgid "value has been optimized out"
 msgstr ""
 
-#: valops.c:1142 value.c:1169
+#: valops.c:1158 value.c:1257
 msgid "value is not available"
 msgstr ""
 
-#: valops.c:1191
+#: valops.c:1205
 msgid "Left operand of assignment is not an lvalue."
 msgstr ""
 
-#: valops.c:1274
+#: valops.c:1288
 msgid "Only values in memory can be extended with '@'."
 msgstr ""
 
-#: valops.c:1276
+#: valops.c:1290
 #, possible-c-format
 msgid "Invalid number %d of repetitions."
 msgstr ""
 
-#: valops.c:1306
-#, possible-c-format
-msgid "No frame is currently executing in block %s."
-msgstr ""
-
-#: valops.c:1309
-msgid "No frame is currently executing in specified block"
-msgstr ""
-
-#: valops.c:1351
+#: valops.c:1350
 #, possible-c-format
 msgid "Address requested for identifier \"%s\" which is in register $%s"
 msgstr ""
 
-#: valops.c:1358
+#: valops.c:1357
 #, possible-c-format
 msgid "Can't take address of \"%s\" which isn't an lvalue."
 msgstr ""
 
-#: valops.c:1609
+#: valops.c:1623
 #, possible-c-format
 msgid "bad array bounds (%d, %d)"
 msgstr ""
 
-#: valops.c:1616
+#: valops.c:1631
 msgid "array elements must all be the same size"
 msgstr ""
 
-#: valops.c:1704
+#: valops.c:1719
 msgid "typecmp: no argument list"
 msgstr ""
 
-#: valops.c:1783
+#: valops.c:1798
 #, possible-c-format
 msgid "base class '%s' is ambiguous in type '%s'"
 msgstr ""
 
-#: valops.c:1914 valops.c:2070
+#: valops.c:1929 valops.c:2084
 msgid "virtual baseclass botch"
 msgstr ""
 
-#: valops.c:2012
+#: valops.c:2026
 #, possible-c-format
 msgid "cannot resolve overloaded method `%s': no arguments supplied"
 msgstr ""
 
-#: valops.c:2152 valops.c:2240
+#: valops.c:2166 valops.c:2252
 #, possible-c-format
 msgid "Attempt to extract a component of a value that is not a %s."
 msgstr ""
 
-#: valops.c:2175
+#: valops.c:2189
 #, possible-c-format
 msgid "Cannot take address of method %s."
 msgstr ""
 
-#: valops.c:2179
+#: valops.c:2193
 #, possible-c-format
 msgid "There is no member or method named %s."
 msgstr ""
 
-#: valops.c:2191
+#: valops.c:2205
 #, possible-c-format
 msgid ""
 "One of the arguments you tried to pass to %s could not be converted to what "
 "the function wants."
 msgstr ""
 
-#: valops.c:2208
+#: valops.c:2222
 #, possible-c-format
 msgid "Structure has no component named %s."
 msgstr ""
 
-#: valops.c:2251
+#: valops.c:2263
 msgid "No field with matching bitpos and type."
 msgstr ""
 
-#: valops.c:2402
+#: valops.c:2414
 msgid "Attempt to extract a component of a value that is not a struct or union"
 msgstr ""
 
-#: valops.c:2538
+#: valops.c:2549
 #, possible-c-format
 msgid "Couldn't find method %s%s%s"
 msgstr ""
@@ -29512,354 +29770,354 @@ msgstr ""
 #. FIXME: GDB does not support the general ambiguous case.
 #. All candidates should be collected and presented the
 #. user.
-#: valops.c:2712
+#: valops.c:2722
 msgid "Ambiguous overload resolution"
 msgstr ""
 
 #. Incomparable top contenders.
 #. This is an error incompatible candidates
 #. should not have been proposed.
-#: valops.c:2717
+#: valops.c:2727
 msgid "Internal error: incompatible overload candidates proposed"
 msgstr ""
 
-#: valops.c:2729
+#: valops.c:2739
 msgid "Internal error: unexpected overload comparison result"
 msgstr ""
 
-#: valops.c:2745
+#: valops.c:2755
 #, possible-c-format
 msgid "Cannot resolve method %s%s%s to any overloaded instance"
 msgstr ""
 
-#: valops.c:2750
+#: valops.c:2760
 #, possible-c-format
 msgid "Cannot resolve function %s to any overloaded instance"
 msgstr ""
 
-#: valops.c:2756
+#: valops.c:2766
 #, possible-c-format
 msgid ""
 "Using non-standard conversion to match method %s%s%s to supplied arguments"
 msgstr ""
 
-#: valops.c:2762
+#: valops.c:2772
 #, possible-c-format
 msgid ""
 "Using non-standard conversion to match function %s to supplied arguments"
 msgstr ""
 
-#: valops.c:3176
+#: valops.c:3184
 msgid "name of destructor must equal name of class"
 msgstr ""
 
-#: valops.c:3215
+#: valops.c:3223
 #, possible-c-format
 msgid "no constant named \"%s\" in enum \"%s\""
 msgstr ""
 
-#: valops.c:3246
+#: valops.c:3254
 msgid "non-aggregate type in value_aggregate_elt"
 msgstr ""
 
-#: valops.c:3322
+#: valops.c:3330
 msgid "Internal error: non-aggregate type to value_struct_elt_for_reference"
 msgstr ""
 
-#: valops.c:3419
+#: valops.c:3427
 msgid "no member function matches that type instantiation"
 msgstr ""
 
-#: valops.c:3445
+#: valops.c:3453
 #, possible-c-format
 msgid "non-unique member `%s' requires type instantiation"
 msgstr ""
 
-#: valops.c:3452
+#: valops.c:3460
 msgid "no matching member function"
 msgstr ""
 
-#: valops.c:3483
+#: valops.c:3491
 #, possible-c-format
 msgid "Cannot reference virtual member function \"%s\""
 msgstr ""
 
-#: valops.c:3638
+#: valops.c:3646
 msgid "Unexpected value type."
 msgstr ""
 
-#: valops.c:3704
+#: valops.c:3712
 #, possible-c-format
 msgid ""
 "Couldn't retrieve complete object of RTTI type %s; object may be in register"
 "(s)."
 msgstr ""
 
-#: valops.c:3736
+#: valops.c:3744
 msgid "no `this' in current language"
 msgstr ""
 
-#: valops.c:3744
+#: valops.c:3752
 #, possible-c-format
 msgid "current stack frame does not contain a variable named `%s'"
 msgstr ""
 
-#: valops.c:3789
+#: valops.c:3797
 msgid "slice from bad array or bitstring"
 msgstr ""
 
-#: valops.c:3793
+#: valops.c:3801
 msgid "slice out of range"
 msgstr ""
 
-#: valops.c:3881
+#: valops.c:3888
 msgid "cannot cast non-number to complex"
 msgstr ""
 
-#: valops.c:3888
+#: valops.c:3895
 msgid "Set overload resolution in evaluating C++ functions."
 msgstr ""
 
-#: valops.c:3889
+#: valops.c:3896
 msgid "Show overload resolution in evaluating C++ functions."
 msgstr ""
 
-#: valprint.c:158
+#: valprint.c:164
 #, possible-c-format
 msgid "Limit on string chars or array elements to print is %s.\n"
 msgstr ""
 
-#: valprint.c:172
+#: valprint.c:178
 #, possible-c-format
 msgid "Default input radix for entering numbers is %s.\n"
 msgstr ""
 
-#: valprint.c:182
+#: valprint.c:188
 #, possible-c-format
 msgid "Default output radix for printing of values is %s.\n"
 msgstr ""
 
-#: valprint.c:193
+#: valprint.c:199
 #, possible-c-format
 msgid "Printing of array indexes is %s.\n"
 msgstr ""
 
-#: valprint.c:204
+#: valprint.c:210
 #, possible-c-format
 msgid "Threshold for repeated print elements is %s.\n"
 msgstr ""
 
-#: valprint.c:215
+#: valprint.c:221
 #, possible-c-format
 msgid "Printing of char arrays to stop at first null char is %s.\n"
 msgstr ""
 
-#: valprint.c:226
+#: valprint.c:232
 #, possible-c-format
 msgid "Pretty formatting of structures is %s.\n"
 msgstr ""
 
-#: valprint.c:235
+#: valprint.c:241
 #, possible-c-format
 msgid "Pretty formatting of arrays is %s.\n"
 msgstr ""
 
-#: valprint.c:246
+#: valprint.c:252
 #, possible-c-format
 msgid "Printing of unions interior to structures is %s.\n"
 msgstr ""
 
-#: valprint.c:256
+#: valprint.c:262
 #, possible-c-format
 msgid "Printing of addresses is %s.\n"
 msgstr ""
 
-#: valprint.c:264
+#: valprint.c:270
 #, possible-c-format
 msgid "Printing of symbols when printing pointers is %s.\n"
 msgstr ""
 
-#: valprint.c:341
+#: valprint.c:373
 msgid "<optimized out>"
 msgstr ""
 
-#: valprint.c:347
+#: valprint.c:379
 msgid "<not saved>"
 msgstr ""
 
-#: valprint.c:359
+#: valprint.c:391
 msgid "<invalid address>"
 msgstr ""
 
-#: valprint.c:710
+#: valprint.c:1043
 #, possible-c-format
 msgid "Unhandled type code %d in symbol table."
 msgstr ""
 
-#: valprint.c:807
+#: valprint.c:1139
 msgid "<address of value unknown>"
 msgstr ""
 
-#: valprint.c:831
+#: valprint.c:1163
 #, possible-c-format
 msgid "<internal function %s>"
 msgstr ""
 
-#: valprint.c:1064
+#: valprint.c:1442
 msgid "Value out of range."
 msgstr ""
 
-#: valprint.c:1307 valprint.c:1357
+#: valprint.c:1685 valprint.c:1735
 msgid "Internal error in octal conversion;"
 msgstr ""
 
-#: valprint.c:1658
+#: valprint.c:2036
 msgid "unable to get positions in array, use bounds instead"
 msgstr ""
 
-#: valprint.c:2617
+#: valprint.c:2990
 #, possible-c-format
 msgid "Nonsense input radix ``decimal %u''; input radix unchanged."
 msgstr ""
 
-#: valprint.c:2623
+#: valprint.c:2996
 #, possible-c-format
 msgid "Input radix now set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2659
+#: valprint.c:3032
 #, possible-c-format
 msgid "Unsupported output radix ``decimal %u''; output radix unchanged."
 msgstr ""
 
-#: valprint.c:2666
+#: valprint.c:3039
 #, possible-c-format
 msgid "Output radix now set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2690
+#: valprint.c:3063
 #, possible-c-format
 msgid "Input and output radices now set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2705
+#: valprint.c:3078
 #, possible-c-format
 msgid "Input and output radices set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2711
+#: valprint.c:3084
 #, possible-c-format
 msgid "Input radix set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2714
+#: valprint.c:3087
 #, possible-c-format
 msgid "Output radix set to decimal %u, hex %x, octal %o.\n"
 msgstr ""
 
-#: valprint.c:2755
+#: valprint.c:3128
 msgid "Generic command for setting how things print."
 msgstr ""
 
-#: valprint.c:2762
+#: valprint.c:3135
 msgid "Generic command for showing print settings."
 msgstr ""
 
-#: valprint.c:2768
+#: valprint.c:3141
 msgid "Generic command for setting what things to print in \"raw\" mode."
 msgstr ""
 
-#: valprint.c:2772
+#: valprint.c:3145
 msgid "Generic command for showing \"print raw\" settings."
 msgstr ""
 
-#: valprint.c:2776
+#: valprint.c:3149
 msgid "Set limit on string chars or array elements to print."
 msgstr ""
 
-#: valprint.c:2777
+#: valprint.c:3150
 msgid "Show limit on string chars or array elements to print."
 msgstr ""
 
-#: valprint.c:2778
+#: valprint.c:3151
 msgid "\"set print elements unlimited\" causes there to be no limit."
 msgstr ""
 
-#: valprint.c:2785
+#: valprint.c:3158
 msgid "Set printing of char arrays to stop at first null char."
 msgstr ""
 
-#: valprint.c:2786
+#: valprint.c:3159
 msgid "Show printing of char arrays to stop at first null char."
 msgstr ""
 
-#: valprint.c:2793
+#: valprint.c:3166
 msgid "Set threshold for repeated print elements."
 msgstr ""
 
-#: valprint.c:2794
+#: valprint.c:3167
 msgid "Show threshold for repeated print elements."
 msgstr ""
 
-#: valprint.c:2795
+#: valprint.c:3168
 msgid ""
 "\"set print repeats unlimited\" causes all elements to be individually "
 "printed."
 msgstr ""
 
-#: valprint.c:2802
+#: valprint.c:3175
 msgid "Set pretty formatting of structures."
 msgstr ""
 
-#: valprint.c:2803
+#: valprint.c:3176
 msgid "Show pretty formatting of structures."
 msgstr ""
 
-#: valprint.c:2810
+#: valprint.c:3183
 msgid "Set printing of unions interior to structures."
 msgstr ""
 
-#: valprint.c:2811
+#: valprint.c:3184
 msgid "Show printing of unions interior to structures."
 msgstr ""
 
-#: valprint.c:2818
+#: valprint.c:3191
 msgid "Set pretty formatting of arrays."
 msgstr ""
 
-#: valprint.c:2819
+#: valprint.c:3192
 msgid "Show pretty formatting of arrays."
 msgstr ""
 
-#: valprint.c:2826
+#: valprint.c:3199
 msgid "Set printing of addresses."
 msgstr ""
 
-#: valprint.c:2827
+#: valprint.c:3200
 msgid "Show printing of addresses."
 msgstr ""
 
-#: valprint.c:2834
+#: valprint.c:3207
 msgid "Set printing of symbol names when printing pointers."
 msgstr ""
 
-#: valprint.c:2835
+#: valprint.c:3208
 msgid "Show printing of symbol names when printing pointers."
 msgstr ""
 
-#: valprint.c:2842
+#: valprint.c:3215
 msgid "Set default input radix for entering numbers."
 msgstr ""
 
-#: valprint.c:2843
+#: valprint.c:3216
 msgid "Show default input radix for entering numbers."
 msgstr ""
 
-#: valprint.c:2850
+#: valprint.c:3223
 msgid "Set default output radix for printing of values."
 msgstr ""
 
-#: valprint.c:2851
+#: valprint.c:3224
 msgid "Show default output radix for printing of values."
 msgstr ""
 
@@ -29870,67 +30128,91 @@ msgstr ""
 #. add_show_from_set() commands aren't really appropriate.
 #. FIXME: i18n: With the new add_setshow_integer command, that is no
 #. longer true - show can display anything.
-#: valprint.c:2864
+#: valprint.c:3237
 msgid ""
 "Set default input and output number radices.\n"
 "Use 'set input-radix' or 'set output-radix' to independently set each.\n"
 "Without an argument, sets both radices back to the default value of 10."
 msgstr ""
 
-#: valprint.c:2869
+#: valprint.c:3242
 msgid ""
 "Show the default input and output number radices.\n"
 "Use 'show input-radix' or 'show output-radix' to independently show each."
 msgstr ""
 
-#: valprint.c:2875
+#: valprint.c:3248
 msgid "Set printing of array indexes."
 msgstr ""
 
-#: valprint.c:2876
+#: valprint.c:3249
 msgid "Show printing of array indexes"
 msgstr ""
 
-#: value.c:1159
+#: value.c:990
+#, possible-c-format
+msgid "max-value-size set too low, increasing to %d bytes"
+msgstr ""
+
+#: value.c:1002
+msgid "Maximum value size is unlimited.\n"
+msgstr ""
+
+#: value.c:1004
+#, possible-c-format
+msgid "Maximum value size is %d bytes.\n"
+msgstr ""
+
+#: value.c:1022
+#, possible-c-format
+msgid "value of type `%s' requires %u bytes, which is more than max-value-size"
+msgstr ""
+
+#: value.c:1025
+#, possible-c-format
+msgid "value requires %u bytes, which is more than max-value-size"
+msgstr ""
+
+#: value.c:1247
 msgid "register has not been saved in frame"
 msgstr ""
 
-#: value.c:1846
+#: value.c:1950
 msgid "The history is empty."
 msgstr ""
 
-#: value.c:1848
+#: value.c:1952
 msgid "There is only one value in the history."
 msgstr ""
 
-#: value.c:1850
+#: value.c:1954
 #, possible-c-format
 msgid "History does not go back to $$%d."
 msgstr ""
 
-#: value.c:1853
+#: value.c:1957
 #, possible-c-format
 msgid "History has not yet reached $%d."
 msgstr ""
 
-#: value.c:2012
+#: value.c:2114
 msgid "Init-if-undefined requires an assignment expression."
 msgstr ""
 
-#: value.c:2017
+#: value.c:2119
 msgid "The first parameter to init-if-undefined should be a GDB variable."
 msgstr ""
 
-#: value.c:2201
+#: value.c:2300
 msgid "bad kind"
 msgstr ""
 
 #. We can never get a component of any other kind.
-#: value.c:2290
+#: value.c:2394
 msgid "set_internalvar_component"
 msgstr ""
 
-#: value.c:2301
+#: value.c:2405
 #, possible-c-format
 msgid "Cannot overwrite convenience function %s"
 msgstr ""
@@ -29939,55 +30221,55 @@ msgstr ""
 #. The user can't create them except via Python, and if Python support
 #. is installed this message will never be printed ($_streq will
 #. exist).
-#: value.c:2597
+#: value.c:2710
 msgid ""
 "No debugger convenience variables now defined.\n"
 "Convenience variables have names starting with \"$\";\n"
 "use \"set\" as in \"set $foo = 5\" to define them.\n"
 msgstr ""
 
-#: value.c:2835
+#: value.c:2948
 msgid "Value can't be converted to integer."
 msgstr ""
 
 #. FIXME: would like to include fieldval in the message, but
 #. we don't have a sprintf_longest.
-#: value.c:3367
+#: value.c:3503
 #, possible-c-format
-msgid "Value does not fit in %d bits."
+msgid "Value does not fit in %s bits."
 msgstr ""
 
-#: value.c:3418
+#: value.c:3554
 #, possible-c-format
 msgid "Unexpected type (%d) encountered for integer constant."
 msgstr ""
 
-#: value.c:3454
+#: value.c:3590
 #, possible-c-format
 msgid "Unexpected type (%d) encountered for unsigned integer constant."
 msgstr ""
 
-#: value.c:3574
+#: value.c:3710
 msgid "Unexpected type encountered for floating constant."
 msgstr ""
 
-#: value.c:3744
+#: value.c:3903
 msgid "Function return type unknown."
 msgstr ""
 
-#: value.c:3880
+#: value.c:4039
 msgid "infinite loop while fetching a register"
 msgstr ""
 
-#: value.c:3947
+#: value.c:4109
 msgid "Unexpected lazy value type."
 msgstr ""
 
-#: value.c:3963
+#: value.c:4124
 msgid "You must provide one argument for $_isvoid."
 msgstr ""
 
-#: value.c:3973
+#: value.c:4134
 msgid ""
 "Debugger convenience (\"$foo\") variables and functions.\n"
 "Convenience variables are created when you assign them values;\n"
@@ -30000,11 +30282,11 @@ msgid ""
 "Convenience functions are defined via the Python API."
 msgstr ""
 
-#: value.c:3988
+#: value.c:4149
 msgid "Elements of value history around item number IDX (or last ten)."
 msgstr ""
 
-#: value.c:3992
+#: value.c:4153
 msgid ""
 "Initialize a convenience variable if necessary.\n"
 "init-if-undefined VARIABLE = EXPRESSION\n"
@@ -30013,80 +30295,92 @@ msgid ""
 "VARIABLE is already initialized."
 msgstr ""
 
-#: value.c:3999
+#: value.c:4160
 msgid "Placeholder command for showing help on convenience functions."
 msgstr ""
 
-#: value.c:4003
+#: value.c:4164
 msgid ""
 "Check whether an expression is void.\n"
 "Usage: $_isvoid (expression)\n"
 "Return 1 if the expression is void, zero otherwise."
 msgstr ""
 
-#: varobj.c:48
-#, possible-c-format
-msgid "Varobj debugging is %s.\n"
+#: value.c:4171
+msgid "Set maximum sized value gdb will load from the inferior."
 msgstr ""
 
-#: varobj.c:380
-msgid "Failed to find the specified frame"
+#: value.c:4172
+msgid "Show maximum sized value gdb will load from the inferior."
+msgstr ""
+
+#: value.c:4173
+msgid ""
+"Use this to control the maximum size, in bytes, of a value that gdb\n"
+"will load from the inferior.  Setting this value to 'unlimited'\n"
+"disables checking.\n"
+"Setting this does not invalidate already allocated values, it only\n"
+"prevents future values, larger than this size, from being allocated."
 msgstr ""
 
-#: varobj.c:545
+#: varobj.c:49
 #, possible-c-format
-msgid "varobj_delete: assertion failed - mycount(=%d) <> 0"
+msgid "Varobj debugging is %s.\n"
+msgstr ""
+
+#: varobj.c:369
+msgid "Failed to find the specified frame"
 msgstr ""
 
-#: varobj.c:773
+#: varobj.c:715
 msgid "requested an iterator from a non-dynamic varobj"
 msgstr ""
 
-#: varobj.c:1202
+#: varobj.c:1142
 msgid "Cannot instantiate printer for default visualizer"
 msgstr ""
 
-#: varobj.c:1564
+#: varobj.c:1490
 #, possible-c-format
 msgid "Could not evaluate visualizer expression: %s"
 msgstr ""
 
-#: varobj.c:1576
+#: varobj.c:1499
 msgid "Python support required"
 msgstr ""
 
-#: varobj.c:1955
+#: varobj.c:1875
 msgid "Duplicate variable object name"
 msgstr ""
 
-#: varobj.c:2038
+#: varobj.c:1958
 #, possible-c-format
 msgid "Assertion failed: Could not find varobj \"%s\" in root list"
 msgstr ""
 
-#: varobj.c:2802
+#: varobj.c:2653
 msgid "Set varobj debugging."
 msgstr ""
 
-#: varobj.c:2803
+#: varobj.c:2654
 msgid "Show varobj debugging."
 msgstr ""
 
-#: varobj.c:2804
+#: varobj.c:2655
 msgid "When non-zero, varobj debugging is enabled."
 msgstr ""
 
-#: windows-nat.c:318
+#: windows-nat.c:355
 #, possible-c-format
 msgid "SuspendThread (tid=0x%x) failed. (winerr %u)"
 msgstr ""
 
-#: windows-nat.c:407
+#: windows-nat.c:444
 #, possible-c-format
 msgid "[%s exited with code %u]\n"
 msgstr ""
 
-#: windows-nat.c:628
+#: windows-nat.c:666
 msgid "dll path too long"
 msgstr ""
 
@@ -30097,222 +30391,257 @@ msgstr ""
 #. 4 mysterious UNLOAD_DLL_DEBUG_EVENTs during the startup phase (these
 #. events are apparently caused by the WOW layer, the interface between
 #. 32bit and 64bit worlds).
-#: windows-nat.c:791
+#: windows-nat.c:824
 #, possible-c-format
 msgid "dll starting at %s not found."
 msgstr ""
 
-#: windows-nat.c:1172
+#: windows-nat.c:845
+msgid "signal-event requires an argument (integer event id)"
+msgstr ""
+
+#: windows-nat.c:851
+#, possible-c-format
+msgid "Failed to convert `%s' to event id"
+msgstr ""
+
+#: windows-nat.c:1262
 #, possible-c-format
 msgid ""
 "Failed to resume program execution (ContinueDebugEvent failed, error %u)"
 msgstr ""
 
-#: windows-nat.c:1191
+#: windows-nat.c:1281
 #, possible-c-format
 msgid "OpenProcess call failed, GetLastError = %u"
 msgstr ""
 
-#: windows-nat.c:1316
+#: windows-nat.c:1406
 msgid "Could not interrupt program.  Press Ctrl-c in the program console."
 msgstr ""
 
-#: windows-nat.c:1426
+#: windows-nat.c:1516
 #, possible-c-format
 msgid "During startup program exited with code 0x%x."
 msgstr ""
 
-#: windows-nat.c:1800
+#: windows-nat.c:1888
 msgid "Can't attach to process."
 msgstr ""
 
-#: windows-nat.c:1832
+#: windows-nat.c:1920
 #, possible-c-format
 msgid "Can't detach process %u (error %u)"
 msgstr ""
 
-#: windows-nat.c:1890 windows-nat.c:1900
+#: windows-nat.c:1978 windows-nat.c:1988
 #, possible-c-format
 msgid "Error getting executable filename: %u."
 msgstr ""
 
-#: windows-nat.c:1894
+#: windows-nat.c:1982
 #, possible-c-format
 msgid "Error converting executable filename to POSIX: %d."
 msgstr ""
 
-#: windows-nat.c:2068
+#: windows-nat.c:2456
 msgid "No executable specified, use `target exec'."
 msgstr ""
 
-#: windows-nat.c:2085 windows-nat.c:2090
+#: windows-nat.c:2473 windows-nat.c:2478
 #, possible-c-format
 msgid "Error starting executable: %d"
 msgstr ""
 
-#: windows-nat.c:2103
+#: windows-nat.c:2491
 #, possible-c-format
 msgid "Error starting executable via shell: %d"
 msgstr ""
 
-#: windows-nat.c:2227
+#: windows-nat.c:2603
+#, possible-c-format
+msgid "Error in redirection: %s."
+msgstr ""
+
+#: windows-nat.c:2620
 #, possible-c-format
 msgid "Warning: Failed to open TTY %s, error %#x."
 msgstr ""
 
-#: windows-nat.c:2279
+#: windows-nat.c:2704
 #, possible-c-format
 msgid "Error creating process %s, (error %u)."
 msgstr ""
 
-#: windows-nat.c:2543
+#: windows-nat.c:2976
+msgid ""
+"Signal a crashed process with event ID, to allow its debugging.\n"
+"This command is needed in support of setting up GDB as JIT debugger on MS-"
+"Windows.  The command should be invoked from the GDB command line using the "
+"'-ex' command-line option.  The ID of the event that blocks the crashed "
+"process will be supplied by the Windows JIT debugging mechanism."
+msgstr ""
+
+#: windows-nat.c:2984
 msgid "Set use of shell to start subprocess."
 msgstr ""
 
-#: windows-nat.c:2544
+#: windows-nat.c:2985
 msgid "Show use of shell to start subprocess."
 msgstr ""
 
-#: windows-nat.c:2551
+#: windows-nat.c:2992
 msgid "Break when an exception is detected in the Cygwin DLL itself."
 msgstr ""
 
-#: windows-nat.c:2552
+#: windows-nat.c:2993
 msgid "Show whether gdb breaks on exceptions in the Cygwin DLL itself."
 msgstr ""
 
-#: windows-nat.c:2559
+#: windows-nat.c:3000
 msgid "Set creation of new console when creating child process."
 msgstr ""
 
-#: windows-nat.c:2560
+#: windows-nat.c:3001
 msgid "Show creation of new console when creating child process."
 msgstr ""
 
-#: windows-nat.c:2566
+#: windows-nat.c:3007
 msgid "Set creation of new group when creating child process."
 msgstr ""
 
-#: windows-nat.c:2567
+#: windows-nat.c:3008
 msgid "Show creation of new group when creating child process."
 msgstr ""
 
-#: windows-nat.c:2573
+#: windows-nat.c:3014
 msgid "Set whether to display execution in child process."
 msgstr ""
 
-#: windows-nat.c:2574
+#: windows-nat.c:3015
 msgid "Show whether to display execution in child process."
 msgstr ""
 
-#: windows-nat.c:2580
+#: windows-nat.c:3021
 msgid "Set whether to display kernel events in child process."
 msgstr ""
 
-#: windows-nat.c:2581
+#: windows-nat.c:3022
 msgid "Show whether to display kernel events in child process."
 msgstr ""
 
-#: windows-nat.c:2587
+#: windows-nat.c:3028
 msgid "Set whether to display memory accesses in child process."
 msgstr ""
 
-#: windows-nat.c:2588
+#: windows-nat.c:3029
 msgid "Show whether to display memory accesses in child process."
 msgstr ""
 
-#: windows-nat.c:2595
+#: windows-nat.c:3036
 msgid "Set whether to display kernel exceptions in child process."
 msgstr ""
 
-#: windows-nat.c:2596
+#: windows-nat.c:3037
 msgid "Show whether to display kernel exceptions in child process."
 msgstr ""
 
-#: windows-nat.c:2605
+#: windows-nat.c:3046
 msgid "Display selectors infos."
 msgstr ""
 
-#: windows-nat.c:2619
+#: windows-nat.c:3060
 #, possible-c-format
 msgid "Invalid register %d in cygwin_set_dr.\n"
 msgstr ""
 
-#: windows-nat.c:2706
+#: windows-nat.c:3147
 #, possible-c-format
 msgid "obsolete '%s' found. Rename to '%s'."
 msgstr ""
 
 #. This will probably fail on Windows 9x/Me.  Let the user know
 #. that we're missing some functionality.
-#: windows-nat.c:2837
+#: windows-nat.c:3275
 msgid ""
 "cannot automatically find executable file or library to read symbols.\n"
 "Use \"file\" or \"dll\" command to load executable/libraries directly."
 msgstr ""
 
-#: windows-tdep.c:254
+#: windows-tdep.c:251
 msgid "Unable to read tlb"
 msgstr ""
 
-#: windows-tdep.c:264
+#: windows-tdep.c:261
 msgid "Impossible to change the Thread Local Base"
 msgstr ""
 
-#: windows-tdep.c:328
+#: windows-tdep.c:325
 #, possible-c-format
 msgid "Unable to get thread local base for %s\n"
 msgstr ""
 
-#: windows-tdep.c:336
+#: windows-tdep.c:333
 #, possible-c-format
 msgid "Unable to read thread information block for %s at address %s\n"
 msgstr ""
 
-#: windows-tdep.c:343
+#: windows-tdep.c:340
 #, possible-c-format
 msgid "Thread Information Block %s at %s\n"
 msgstr ""
 
-#: windows-tdep.c:355
+#: windows-tdep.c:352
 #, possible-c-format
 msgid "%s is 0x%s\n"
 msgstr ""
 
-#: windows-tdep.c:357
+#: windows-tdep.c:354
 #, possible-c-format
 msgid "TIB[0x%s] is 0x%s\n"
 msgstr ""
 
-#: windows-tdep.c:464
+#: windows-tdep.c:440
 #, possible-c-format
 msgid "Show all non-zero elements of Thread Information Block is %s.\n"
 msgstr ""
 
-#: windows-tdep.c:481
+#: windows-tdep.c:457
 msgid "Print information specific to Win32 debugging."
 msgstr ""
 
-#: windows-tdep.c:520
+#: windows-tdep.c:496
 msgid "Display thread information block."
 msgstr ""
 
-#: windows-tdep.c:526
+#: windows-tdep.c:502
 msgid "Set whether to display all non-zero fields of thread information block."
 msgstr ""
 
-#: windows-tdep.c:527
+#: windows-tdep.c:503
 msgid ""
 "Show whether to display all non-zero fields of thread information block."
 msgstr ""
 
-#: windows-tdep.c:528
+#: windows-tdep.c:504
 msgid ""
 "Use \"on\" to enable, \"off\" to disable.\n"
 "If enabled, all non-zero fields of thread information block are displayed,\n"
 "even if their meaning is unknown."
 msgstr ""
 
+#: x86-bsd-nat.c:67
+msgid "Couldn't read debug registers"
+msgstr ""
+
+#: x86-bsd-nat.c:80
+msgid "Couldn't get debug registers"
+msgstr ""
+
+#: x86-bsd-nat.c:94
+msgid "Couldn't write debug registers"
+msgstr ""
+
 #: x86-linux-nat.c:141
 msgid "Couldn't get CS register"
 msgstr ""
@@ -30325,28 +30654,28 @@ msgstr ""
 msgid "Can't debug 64-bit process with 32-bit GDB"
 msgstr ""
 
-#: x86-linux-nat.c:264
+#: x86-linux-nat.c:276
 #, possible-c-format
 msgid "Could not enable branch tracing for %s: %s."
 msgstr ""
 
-#: x86-linux-nat.c:285
+#: x86-linux-nat.c:291
 msgid "Could not disable branch tracing."
 msgstr ""
 
-#: x86-nat.c:273
+#: x86-nat.c:269
 msgid "Set whether to show variables that mirror the x86 debug registers."
 msgstr ""
 
-#: x86-nat.c:274
+#: x86-nat.c:270
 msgid "Show whether to show variables that mirror the x86 debug registers."
 msgstr ""
 
-#: xcoffread.c:178
+#: xcoffread.c:184
 msgid "line numbers off, `.bf' symbol not found"
 msgstr ""
 
-#: xcoffread.c:185
+#: xcoffread.c:191
 #, possible-c-format
 msgid "Mismatched .ef symbol ignored starting at symnum %d"
 msgstr ""
@@ -30356,19 +30685,19 @@ msgstr ""
 #. This can happen with old versions of GCC.
 #. GCC 2.3.3-930426 does not exhibit this on a test case which
 #. a user said produced the message for him.
-#: xcoffread.c:553
+#: xcoffread.c:559
 msgid "Nested C_BINCL symbols"
 msgstr ""
 
-#: xcoffread.c:570
+#: xcoffread.c:576
 msgid "Mismatched C_BINCL/C_EINCL pair"
 msgstr ""
 
-#: xcoffread.c:857
+#: xcoffread.c:858
 msgid "Bad line table offset in C_EINCL directive"
 msgstr ""
 
-#: xcoffread.c:980 xcoffread.c:994
+#: xcoffread.c:979 xcoffread.c:993
 msgid "Unexpected symbol continuation"
 msgstr ""
 
@@ -30377,49 +30706,49 @@ msgstr ""
 msgid "Unrecognized storage class %d."
 msgstr ""
 
-#: xcoffread.c:1612
+#: xcoffread.c:1613
 #, possible-c-format
 msgid "Unexpected storage class: %d"
 msgstr ""
 
-#: xcoffread.c:1697
+#: xcoffread.c:1698
 msgid "Invalid symbol offset"
 msgstr ""
 
-#: xcoffread.c:1964
+#: xcoffread.c:1965
 #, possible-c-format
 msgid "cannot seek to string table in %s: %s"
 msgstr ""
 
-#: xcoffread.c:1991
+#: xcoffread.c:1992
 #, possible-c-format
 msgid "cannot read string table from %s: %s"
 msgstr ""
 
-#: xcoffread.c:1994
+#: xcoffread.c:1995
 msgid "bad symbol file: string table does not end with null character"
 msgstr ""
 
-#: xcoffread.c:2360
+#: xcoffread.c:2357
 msgid "More than one XMC_TC0 symbol found."
 msgstr ""
 
-#: xcoffread.c:2513
+#: xcoffread.c:2509
 #, possible-c-format
 msgid "Storage class %d not recognized during scan"
 msgstr ""
 
-#: xcoffread.c:2984
+#: xcoffread.c:2979
 #, possible-c-format
 msgid "Error reading .debug section of `%s': %s"
 msgstr ""
 
-#: xcoffread.c:2997
+#: xcoffread.c:2992
 #, possible-c-format
 msgid "Error reading symbols from %s: %s"
 msgstr ""
 
-#: xcoffread.c:3005
+#: xcoffread.c:3000
 msgid "reading symbol table"
 msgstr ""
 
@@ -30468,91 +30797,91 @@ msgstr ""
 msgid "Required element <%s> is missing"
 msgstr ""
 
-#: xml-support.c:502
+#: xml-support.c:503
 #, possible-c-format
 msgid "could not locate built-in DTD %s"
 msgstr ""
 
-#: xml-support.c:547
+#: xml-support.c:548
 #, possible-c-format
 msgid "XML_UseForeignDTD failed: %s"
 msgstr ""
 
-#: xml-support.c:564
+#: xml-support.c:565
 #, possible-c-format
 msgid ""
 "Starting:\n"
 "%s"
 msgstr ""
 
-#: xml-support.c:590
+#: xml-support.c:591
 #, possible-c-format
 msgid "while parsing %s (at line %d): %s"
 msgstr ""
 
-#: xml-support.c:593
+#: xml-support.c:594
 #, possible-c-format
 msgid "while parsing %s: %s"
 msgstr ""
 
-#: xml-support.c:650
+#: xml-support.c:651
 #, possible-c-format
 msgid "Can't convert \"%s\" to an integer"
 msgstr ""
 
-#: xml-support.c:666
+#: xml-support.c:667
 #, possible-c-format
 msgid "Can't convert %s=\"%s\" to an integer"
 msgstr ""
 
-#: xml-support.c:700
+#: xml-support.c:703
 #, possible-c-format
 msgid "Unknown attribute value %s=\"%s\""
 msgstr ""
 
-#: xml-support.c:762
+#: xml-support.c:766
 #, possible-c-format
 msgid "Processing XInclude of \"%s\""
 msgstr ""
 
-#: xml-support.c:765
+#: xml-support.c:769
 #, possible-c-format
 msgid "Maximum XInclude depth (%d) exceeded"
 msgstr ""
 
-#: xml-support.c:770
+#: xml-support.c:774
 #, possible-c-format
 msgid "Could not load XML document \"%s\""
 msgstr ""
 
-#: xml-support.c:777
+#: xml-support.c:781
 #, possible-c-format
 msgid "Parsing \"%s\" failed"
 msgstr ""
 
-#: xml-support.c:911
+#: xml-support.c:919
 msgid "XInclude processing succeeded."
 msgstr ""
 
-#: xml-support.c:972
+#: xml-support.c:980
 #, possible-c-format
 msgid "XML debugging is %s.\n"
 msgstr ""
 
-#: xml-support.c:1055
+#: xml-support.c:1063
 #, possible-c-format
 msgid "Read error from \"%s\""
 msgstr ""
 
-#: xml-support.c:1082
+#: xml-support.c:1090
 msgid "Set XML parser debugging."
 msgstr ""
 
-#: xml-support.c:1083
+#: xml-support.c:1091
 msgid "Show XML parser debugging."
 msgstr ""
 
-#: xml-support.c:1084
+#: xml-support.c:1092
 msgid "When set, debugging messages for XML parsers are displayed."
 msgstr ""
 
@@ -30562,254 +30891,302 @@ msgid ""
 "time."
 msgstr ""
 
-#: xml-syscall.c:191
+#: xml-syscall.c:303
 #, possible-c-format
 msgid "Unknown attribute name '%s'."
 msgstr ""
 
-#: xml-syscall.c:229
+#: xml-syscall.c:342
 msgid "syscalls info"
 msgstr ""
 
-#: xml-syscall.c:238
+#: xml-syscall.c:351
 msgid "Could not load XML syscalls info; ignoring"
 msgstr ""
 
-#: xml-syscall.c:308
+#: xml-syscall.c:421
 #, possible-c-format
 msgid "Could not load the syscall XML file `%s/%s'."
 msgstr ""
 
-#: xml-syscall.c:311
+#: xml-syscall.c:424
 msgid "There is no XML file to open."
 msgstr ""
 
-#: xml-syscall.c:313
+#: xml-syscall.c:426
 msgid ""
 "GDB will not be able to display syscall names nor to verify if\n"
 "any provided syscall numbers are valid."
 msgstr ""
 
-#: xml-tdesc.c:45
+#: xml-tdesc.c:50
 msgid ""
 "Can not parse XML target description; XML support was disabled at compile "
 "time"
 msgstr ""
 
-#: xml-tdesc.c:109
+#: xml-tdesc.c:111
 #, possible-c-format
 msgid "Target description specified unknown architecture \"%s\""
 msgstr ""
 
-#: xml-tdesc.c:126
+#: xml-tdesc.c:128
 #, possible-c-format
 msgid "Target description specified unknown osabi \"%s\""
 msgstr ""
 
-#: xml-tdesc.c:157
+#: xml-tdesc.c:159
 #, possible-c-format
 msgid "Target description has unsupported version \"%s\""
 msgstr ""
 
-#: xml-tdesc.c:216
+#: xml-tdesc.c:218
 #, possible-c-format
 msgid "Register \"%s\" has unknown type \"%s\""
 msgstr ""
 
-#: xml-tdesc.c:324
+#: xml-tdesc.c:267
 #, possible-c-format
-msgid "Cannot add typed field \"%s\" to flags"
+msgid "Struct size %s is larger than maximum (%d)"
 msgstr ""
 
-#: xml-tdesc.c:328
+#: xml-tdesc.c:289
 #, possible-c-format
-msgid "Explicitly sized type can not contain non-bitfield \"%s\""
+msgid "Flags size %s is larger than maximum (%d)"
 msgstr ""
 
-#: xml-tdesc.c:334
+#: xml-tdesc.c:312
 #, possible-c-format
-msgid "Field \"%s\" references undefined type \"%s\""
+msgid "Enum size %s is larger than maximum (%d)"
+msgstr ""
+
+#: xml-tdesc.c:357
+#, possible-c-format
+msgid "Field start %s is larger than maximum (%d)"
 msgstr ""
 
-#: xml-tdesc.c:350
+#: xml-tdesc.c:373
 #, possible-c-format
-msgid "Implicitly sized type can not contain bitfield \"%s\""
+msgid "Field end %s is larger than maximum (%d)"
 msgstr ""
 
-#: xml-tdesc.c:356
+#: xml-tdesc.c:389
+msgid "Missing end value"
+msgstr ""
+
+#: xml-tdesc.c:393
+msgid "Bitfields must live in explicitly sized types"
+msgstr ""
+
+#: xml-tdesc.c:400
+msgid "Boolean fields must be one bit in size"
+msgstr ""
+
+#: xml-tdesc.c:405
 #, possible-c-format
 msgid "Bitfield \"%s\" goes past 64 bits (unsupported)"
 msgstr ""
 
-#: xml-tdesc.c:365
+#: xml-tdesc.c:413
 #, possible-c-format
 msgid "Bitfield \"%s\" has start after end"
 msgstr ""
 
-#: xml-tdesc.c:370
+#: xml-tdesc.c:417
 #, possible-c-format
 msgid "Bitfield \"%s\" does not fit in struct"
 msgstr ""
 
-#: xml-tdesc.c:376
+#: xml-tdesc.c:427
+msgid "End specified but not start"
+msgstr ""
+
+#: xml-tdesc.c:434
+#, possible-c-format
+msgid "Explicitly sized type cannot contain non-bitfield \"%s\""
+msgstr ""
+
+#: xml-tdesc.c:439
+#, possible-c-format
+msgid "Field \"%s\" references undefined type \"%s\""
+msgstr ""
+
+#: xml-tdesc.c:446
 #, possible-c-format
 msgid "Field \"%s\" has neither type nor bit position"
 msgstr ""
 
-#: xml-tdesc.c:400
+#: xml-tdesc.c:471
+#, possible-c-format
+msgid "Enum value %s is larger than maximum (%d)"
+msgstr ""
+
+#: xml-tdesc.c:500
+#, possible-c-format
+msgid "Vector size %s is larger than maximum (%d)"
+msgstr ""
+
+#: xml-tdesc.c:506
 #, possible-c-format
 msgid "Vector \"%s\" references undefined type \"%s\""
 msgstr ""
 
 #. Expand all XInclude directives.
-#: xml-tdesc.c:513 xml-tdesc.c:538
+#: xml-tdesc.c:640 xml-tdesc.c:665 xml-tdesc.c:790
 msgid "target description"
 msgstr ""
 
-#: xml-tdesc.c:517 xml-tdesc.c:553
+#: xml-tdesc.c:644 xml-tdesc.c:680 xml-tdesc.c:796
 msgid "Could not load XML target description; ignoring"
 msgstr ""
 
-#: xml-tdesc.c:575
+#: xml-tdesc.c:702
 #, possible-c-format
 msgid "Could not open \"%s\""
 msgstr ""
 
+#: xml-tdesc.c:774
+msgid ""
+"Can not fetch XML target description; XML support was disabled at compile "
+"time"
+msgstr ""
+
 #: xstormy16-tdep.c:114
 #, possible-c-format
 msgid "xstormy16_register_name: illegal register number %d"
 msgstr ""
 
-#: xtensa-linux-nat.c:236 xtensa-linux-nat.c:252
+#: xtensa-linux-nat.c:229 xtensa-linux-nat.c:245
 msgid "Couldn't get extended registers"
 msgstr ""
 
-#: xtensa-linux-nat.c:260
+#: xtensa-linux-nat.c:253
 msgid "Couldn't write extended registers"
 msgstr ""
 
-#: xtensa-tdep.c:252
+#: xtensa-tdep.c:254
 #, possible-c-format
 msgid "invalid register %d"
 msgstr ""
 
-#: xtensa-tdep.c:358
-#, possible-c-format
-msgid "invalid dwarf/stabs register number %d"
-msgstr ""
-
-#: xtensa-tdep.c:421 xtensa-tdep.c:500
+#: xtensa-tdep.c:422 xtensa-tdep.c:501
 msgid "size of all masks is larger than the register"
 msgstr ""
 
-#: xtensa-tdep.c:602
+#: xtensa-tdep.c:603
 #, possible-c-format
 msgid "cannot read register %s"
 msgstr ""
 
-#: xtensa-tdep.c:614 xtensa-tdep.c:621
+#: xtensa-tdep.c:615 xtensa-tdep.c:622
 msgid "cannot read register"
 msgstr ""
 
-#: xtensa-tdep.c:692
+#: xtensa-tdep.c:693
 #, possible-c-format
 msgid "cannot write register %s"
 msgstr ""
 
-#: xtensa-tdep.c:704 xtensa-tdep.c:712
+#: xtensa-tdep.c:705 xtensa-tdep.c:713
 msgid "cannot write register"
 msgstr ""
 
-#: xtensa-tdep.c:1419
+#: xtensa-tdep.c:1420
 msgid ""
 "\n"
 "Unrecognised function prologue. Stack trace cannot be resolved. This message "
 "will not be repeated in this session.\n"
 msgstr ""
 
-#: xtensa-tdep.c:1586
+#: xtensa-tdep.c:1587
 #, possible-c-format
 msgid "cannot extract return value of %d bytes long"
 msgstr ""
 
-#: xtensa-tdep.c:1641
+#: xtensa-tdep.c:1642
 #, possible-c-format
 msgid "unimplemented for this length: %d"
 msgstr ""
 
-#: xtensa-tdep.c:2446
+#: xtensa-tdep.c:2448
 msgid "Unable to read target memory ..."
 msgstr ""
 
-#: xtensa-tdep.c:2943
+#: xtensa-tdep.c:2944
 msgid "Unable to decode Xtensa Window Interrupt Handler's code."
 msgstr ""
 
-#: xtensa-tdep.c:2974
+#: xtensa-tdep.c:2975
 msgid "Unable to read Xtensa register EPC1"
 msgstr ""
 
-#: xtensa-tdep.c:3077
-#, possible-c-format
+#: xtensa-tdep.c:3071
+#, c-format
 msgid ""
 "\n"
 "\tnum_aregs: Number of AR registers (%d) is not a power of two!"
 msgstr ""
 
-#: xtensa-tdep.c:3084
+#: xtensa-tdep.c:3078
+#, c-format
 msgid ""
 "\n"
 "\tpc_regnum: No PC register"
 msgstr ""
 
-#: xtensa-tdep.c:3086
+#: xtensa-tdep.c:3080
+#, c-format
 msgid ""
 "\n"
 "\tps_regnum: No PS register"
 msgstr ""
 
-#: xtensa-tdep.c:3091
+#: xtensa-tdep.c:3085
+#, c-format
 msgid ""
 "\n"
 "\twb_regnum: No WB register"
 msgstr ""
 
-#: xtensa-tdep.c:3093
+#: xtensa-tdep.c:3087
+#, c-format
 msgid ""
 "\n"
 "\tws_regnum: No WS register"
 msgstr ""
 
-#: xtensa-tdep.c:3095
+#: xtensa-tdep.c:3089
+#, c-format
 msgid ""
 "\n"
 "\tar_base: No AR registers"
 msgstr ""
 
-#: xtensa-tdep.c:3099
+#: xtensa-tdep.c:3093
+#, c-format
 msgid ""
 "\n"
 "\ta0_base: No Ax registers"
 msgstr ""
 
-#: xtensa-tdep.c:3105
+#: xtensa-tdep.c:3097
 #, possible-c-format
 msgid "the following are invalid: %s"
 msgstr ""
 
-#: xtensa-tdep.c:3282
+#: xtensa-tdep.c:3278
 msgid "xtensa_dump_tdep(): not implemented"
 msgstr ""
 
-#: xtensa-tdep.c:3299
+#: xtensa-tdep.c:3293
 msgid "Set Xtensa debugging."
 msgstr ""
 
-#: xtensa-tdep.c:3300
+#: xtensa-tdep.c:3294
 msgid "Show Xtensa debugging."
 msgstr ""
 
-#: xtensa-tdep.c:3300
+#: xtensa-tdep.c:3294
 msgid ""
 "When non-zero, Xtensa-specific debugging is enabled. Can be 1, 2, 3, or 4 "
 "indicating the level of debugging."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/posix-hdep.c ./gdb/posix-hdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/posix-hdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/posix-hdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Host support routines for MinGW, for GDB, the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,16 +30,3 @@ gdb_select (int n, fd_set *readfds, fd_s
 {
   return select (n, readfds, writefds, exceptfds, timeout);
 }
-
-/* Wrapper for the body of signal handlers.  Nothing special needed on
-   POSIX platforms.  */
-
-void
-gdb_call_async_signal_handler (struct async_signal_handler *handler,
-			       int immediate_p)
-{
-  if (immediate_p)
-    call_async_signal_handler (handler);
-  else
-    mark_async_signal_handler (handler);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc64-tdep.c ./gdb/ppc64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target-dependent code for ppc64 GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -454,8 +454,8 @@ ppc64_standard_linkage4_target (struct f
    When the execution direction is EXEC_REVERSE, scan backward to
    check whether we are in the middle of a PLT stub.  */
 
-CORE_ADDR
-ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
+static CORE_ADDR
+ppc64_skip_trampoline_code_1 (struct frame_info *frame, CORE_ADDR pc)
 {
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
   unsigned int insns[MAX (MAX (MAX (ARRAY_SIZE (ppc64_standard_linkage1),
@@ -530,6 +530,20 @@ ppc64_skip_trampoline_code (struct frame
   return 0;
 }
 
+/* Wrapper of ppc64_skip_trampoline_code_1 checking also
+   ppc_elfv2_skip_entrypoint.  */
+
+CORE_ADDR
+ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
+{
+  struct gdbarch *gdbarch = get_frame_arch (frame);
+
+  pc = ppc64_skip_trampoline_code_1 (frame, pc);
+  if (pc != 0 && gdbarch_skip_entrypoint_p (gdbarch))
+    pc = gdbarch_skip_entrypoint (gdbarch, pc);
+  return pc;
+}
+
 /* Support for convert_from_func_ptr_addr (ARCH, ADDR, TARG) on PPC64
    GNU/Linux.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc64-tdep.h ./gdb/ppc64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Common target-dependent code for ppc64.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcbug-rom.c ./gdb/ppcbug-rom.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcbug-rom.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcbug-rom.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,224 +0,0 @@
-/* Remote debugging interface for PPCbug (PowerPC) Rom monitor
-   for GDB, the GNU debugger.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
-
-   Written by Stu Grossman of Cygnus Support
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-static void
-ppcbug_supply_register (struct regcache *regcache, char *regname,
-			int regnamelen, char *val, int vallen)
-{
-  int regno = 0;
-
-  if (regnamelen < 2 || regnamelen > 4)
-    return;
-
-  switch (regname[0])
-    {
-    case 'R':
-      if (regname[1] < '0' || regname[1] > '9')
-	return;
-      if (regnamelen == 2)
-	regno = regname[1] - '0';
-      else if (regnamelen == 3 && regname[2] >= '0' && regname[2] <= '9')
-	regno = (regname[1] - '0') * 10 + (regname[2] - '0');
-      else
-	return;
-      break;
-    case 'F':
-      if (regname[1] != 'R' || regname[2] < '0' || regname[2] > '9')
-	return;
-      if (regnamelen == 3)
-	regno = 32 + regname[2] - '0';
-      else if (regnamelen == 4 && regname[3] >= '0' && regname[3] <= '9')
-	regno = 32 + (regname[2] - '0') * 10 + (regname[3] - '0');
-      else
-	return;
-      break;
-    case 'I':
-      if (regnamelen != 2 || regname[1] != 'P')
-	return;
-      regno = 64;
-      break;
-    case 'M':
-      if (regnamelen != 3 || regname[1] != 'S' || regname[2] != 'R')
-	return;
-      regno = 65;
-      break;
-    case 'C':
-      if (regnamelen != 2 || regname[1] != 'R')
-	return;
-      regno = 66;
-      break;
-    case 'S':
-      if (regnamelen != 4 || regname[1] != 'P' || regname[2] != 'R')
-	return;
-      else if (regname[3] == '8')
-	regno = 67;
-      else if (regname[3] == '9')
-	regno = 68;
-      else if (regname[3] == '1')
-	regno = 69;
-      else if (regname[3] == '0')
-	regno = 70;
-      else
-	return;
-      break;
-    default:
-      return;
-    }
-
-  monitor_supply_register (regcache, regno, val);
-}
-
-/*
- * This array of registers needs to match the indexes used by GDB.  The
- * whole reason this exists is because the various ROM monitors use
- * different names than GDB does, and don't support all the
- * registers either.  So, typing "info reg sp" becomes an "A7".
- */
-
-static char *ppcbug_regnames[] =
-{
-  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-  "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
-  "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
-
-  "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
-  "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
-  "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
-  "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31",
-
-/* pc      ps      cnd     lr      cnt     xer     mq */
-  "ip", "msr", "cr", "spr8", "spr9", "spr1", "spr0"
-};
-
-/*
- * Define the monitor command strings.  Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings.  We also need a CR or LF on the end.
- */
-
-static struct target_ops ppcbug_ops0;
-static struct target_ops ppcbug_ops1;
-
-static char *ppcbug_inits[] =
-{"\r", NULL};
-
-static void
-init_ppc_cmds (char *LOAD_CMD,
-	       struct monitor_ops *OPS,
-	       struct target_ops *targops)
-{
-  OPS->flags = MO_CLR_BREAK_USES_ADDR | MO_HANDLE_NL;
-  OPS->init = ppcbug_inits;	/* Init strings */
-  OPS->cont = "g\r";		/* continue command */
-  OPS->step = "t\r";		/* single step */
-  OPS->stop = NULL;		/* interrupt command */
-  OPS->set_break = "br %x\r";	/* set a breakpoint */
-  OPS->clr_break = "nobr %x\r";	/* clear a breakpoint */
-  OPS->clr_all_break = "nobr\r";	/* clear all breakpoints */
-  OPS->fill = "bf %x:%x %x;b\r";	/* fill (start count val) */
-  OPS->setmem.cmdb = "ms %x %02x\r";	/* setmem.cmdb (addr, value) */
-  OPS->setmem.cmdw = "ms %x %04x\r";	/* setmem.cmdw (addr, value) */
-  OPS->setmem.cmdl = "ms %x %08x\r";	/* setmem.cmdl (addr, value) */
-  OPS->setmem.cmdll = NULL;	/* setmem.cmdll (addr, value) */
-  OPS->setmem.resp_delim = NULL;	/* setreg.resp_delim */
-  OPS->setmem.term = NULL;	/* setreg.term */
-  OPS->setmem.term_cmd = NULL;	/* setreg.term_cmd */
-  OPS->getmem.cmdb = "md %x:%x;b\r";	/* getmem.cmdb (addr, len) */
-  OPS->getmem.cmdw = "md %x:%x;b\r";	/* getmem.cmdw (addr, len) */
-  OPS->getmem.cmdl = "md %x:%x;b\r";	/* getmem.cmdl (addr, len) */
-  OPS->getmem.cmdll = NULL;	/* getmem.cmdll (addr, len) */
-  OPS->getmem.resp_delim = " ";	/* getmem.resp_delim */
-  OPS->getmem.term = NULL;	/* getmem.term */
-  OPS->getmem.term_cmd = NULL;	/* getmem.term_cmd */
-  OPS->setreg.cmd = "rs %s %x\r";	/* setreg.cmd (name, value) */
-  OPS->setreg.resp_delim = NULL;	/* setreg.resp_delim */
-  OPS->setreg.term = NULL;	/* setreg.term */
-  OPS->setreg.term_cmd = NULL;	/* setreg.term_cmd */
-  OPS->getreg.cmd = "rs %s\r";	/* getreg.cmd (name) */
-  OPS->getreg.resp_delim = "=";	/* getreg.resp_delim */
-  OPS->getreg.term = NULL;	/* getreg.term */
-  OPS->getreg.term_cmd = NULL;	/* getreg.term_cmd */
-				/* register_pattern */
-  OPS->register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)";
-  OPS->supply_register = ppcbug_supply_register;
-  OPS->dump_registers = "rd\r";	/* dump all registers */
-  OPS->load = LOAD_CMD;		/* download command */
-  OPS->loadresp = NULL;		/* load response */
-  OPS->prompt = "PPC1-Bug>";	/* monitor command prompt */
-  OPS->line_term = "\r";	/* end-of-line terminator */
-  OPS->cmd_end = NULL;		/* optional command terminator */
-  OPS->target = targops;	/* target operations */
-  OPS->stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  OPS->regnames = ppcbug_regnames;	/* registers names */
-  OPS->magic = MONITOR_OPS_MAGIC;	/* magic */
-}
-
-
-static struct monitor_ops ppcbug_cmds0;
-static struct monitor_ops ppcbug_cmds1;
-
-static void
-ppcbug_open0 (const char *args, int from_tty)
-{
-  monitor_open (args, &ppcbug_cmds0, from_tty);
-}
-
-static void
-ppcbug_open1 (const char *args, int from_tty)
-{
-  monitor_open (args, &ppcbug_cmds1, from_tty);
-}
-
-extern initialize_file_ftype _initialize_ppcbug_rom; /* -Wmissing-prototypes */
-
-void
-_initialize_ppcbug_rom (void)
-{
-  init_ppc_cmds ("lo 0\r", &ppcbug_cmds0, &ppcbug_ops0);
-  init_ppc_cmds ("lo 1\r", &ppcbug_cmds1, &ppcbug_ops1);
-  init_monitor_ops (&ppcbug_ops0);
-
-  ppcbug_ops0.to_shortname = "ppcbug";
-  ppcbug_ops0.to_longname = "PowerPC PPCBug monitor on port 0";
-  ppcbug_ops0.to_doc = "Debug via the PowerPC PPCBug monitor using port 0.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  ppcbug_ops0.to_open = ppcbug_open0;
-
-  add_target (&ppcbug_ops0);
-
-  init_monitor_ops (&ppcbug_ops1);
-
-  ppcbug_ops1.to_shortname = "ppcbug1";
-  ppcbug_ops1.to_longname = "PowerPC PPCBug monitor on port 1";
-  ppcbug_ops1.to_doc = "Debug via the PowerPC PPCBug monitor using port 1.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-  ppcbug_ops1.to_open = ppcbug_open1;
-
-  add_target (&ppcbug_ops1);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-nat.c ./gdb/ppc-fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,219 @@
+/* Native-dependent code for PowerPC's running FreeBSD, for GDB.
+
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/procfs.h>
+#include <sys/ptrace.h>
+#include <sys/signal.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+#include <machine/reg.h>
+
+#include "fbsd-nat.h"
+#include "gregset.h"
+#include "ppc-tdep.h"
+#include "ppc-fbsd-tdep.h"
+#include "inf-ptrace.h"
+#include "bsd-kvm.h"
+
+/* Fill GDB's register array with the general-purpose register values
+   in *GREGSETP.  */
+
+void
+supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
+{
+  const struct regset *regset = ppc_fbsd_gregset (sizeof (long));
+
+  ppc_supply_gregset (regset, regcache, -1, gregsetp, sizeof (*gregsetp));
+}
+
+/* Fill register REGNO (if a gpr) in *GREGSETP with the value in GDB's
+   register array. If REGNO is -1 do it for all registers.  */
+
+void
+fill_gregset (const struct regcache *regcache,
+	      gdb_gregset_t *gregsetp, int regno)
+{
+  const struct regset *regset = ppc_fbsd_gregset (sizeof (long));
+
+  if (regno == -1)
+    memset (gregsetp, 0, sizeof (*gregsetp));
+  ppc_collect_gregset (regset, regcache, regno, gregsetp, sizeof (*gregsetp));
+}
+
+/* Fill GDB's register array with the floating-point register values
+   in *FPREGSETP.  */
+
+void
+supply_fpregset (struct regcache *regcache, const gdb_fpregset_t * fpregsetp)
+{
+  const struct regset *regset = ppc_fbsd_fpregset ();
+
+  ppc_supply_fpregset (regset, regcache, -1,
+		       fpregsetp, sizeof (*fpregsetp));
+}
+
+/* Fill register REGNO in *FGREGSETP with the value in GDB's
+   register array. If REGNO is -1 do it for all registers.  */
+
+void
+fill_fpregset (const struct regcache *regcache,
+	       gdb_fpregset_t *fpregsetp, int regno)
+{
+  const struct regset *regset = ppc_fbsd_fpregset ();
+
+  ppc_collect_fpregset (regset, regcache, regno,
+			fpregsetp, sizeof (*fpregsetp));
+}
+
+/* Returns true if PT_GETFPREGS fetches this register.  */
+
+static int
+getfpregs_supplies (struct gdbarch *gdbarch, int regno)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+	 point registers.  Traditionally, GDB's register set has still
+	 listed the floating point registers for such machines, so this
+	 code is harmless.  However, the new E500 port actually omits the
+	 floating point registers entirely from the register set --- they
+	 don't even have register numbers assigned to them.
+
+	 It's not clear to me how best to update this code, so this assert
+	 will alert the first person to encounter the NetBSD/E500
+	 combination to the problem.  */
+
+  gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
+  return ((regno >= tdep->ppc_fp0_regnum
+	   && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
+	  || regno == tdep->ppc_fpscr_regnum);
+}
+
+/* Fetch register REGNO from the child process. If REGNO is -1, do it
+   for all registers.  */
+
+static void
+ppcfbsd_fetch_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regno)
+{
+  gdb_gregset_t regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_lwp (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  supply_gregset (regcache, &regs);
+
+  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
+    {
+      const struct regset *fpregset = ppc_fbsd_fpregset ();
+      gdb_fpregset_t fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_lwp (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get FP registers"));
+
+      ppc_supply_fpregset (fpregset, regcache, regno, &fpregs, sizeof fpregs);
+    }
+}
+
+/* Store register REGNO back into the child process. If REGNO is -1,
+   do this for all registers.  */
+
+static void
+ppcfbsd_store_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regno)
+{
+  gdb_gregset_t regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_lwp (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  fill_gregset (regcache, &regs, regno);
+
+  if (ptrace (PT_SETREGS, ptid_get_lwp (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't write registers"));
+
+  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
+    {
+      gdb_fpregset_t fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_lwp (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get FP registers"));
+
+      fill_fpregset (regcache, &fpregs, regno);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_lwp (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't set FP registers"));
+    }
+}
+
+/* Architecture specific function that reconstructs the
+   register state from PCB (Process Control Block) and supplies it
+   to REGCACHE.  */
+
+static int
+ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int i, regnum;
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp);
+  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &pcb->pcb_cr);
+  regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &pcb->pcb_lr);
+  for (i = 0, regnum = tdep->ppc_gp0_regnum + 14; i < 20; i++, regnum++)
+    regcache_raw_supply (regcache, regnum, &pcb->pcb_context[i]);
+
+  return 1;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+
+void _initialize_ppcfbsd_nat (void);
+
+void
+_initialize_ppcfbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add in local overrides.  */
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = ppcfbsd_fetch_inferior_registers;
+  t->to_store_registers = ppcfbsd_store_inferior_registers;
+  fbsd_nat_add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (ppcfbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-nat.c ./gdb/ppcfbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcfbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,219 +0,0 @@
-/* Native-dependent code for PowerPC's running FreeBSD, for GDB.
-
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/procfs.h>
-#include <sys/ptrace.h>
-#include <sys/signal.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-#include <machine/reg.h>
-
-#include "fbsd-nat.h"
-#include "gregset.h"
-#include "ppc-tdep.h"
-#include "ppcfbsd-tdep.h"
-#include "inf-ptrace.h"
-#include "bsd-kvm.h"
-
-/* Fill GDB's register array with the general-purpose register values
-   in *GREGSETP.  */
-
-void
-supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
-{
-  const struct regset *regset = ppc_fbsd_gregset (sizeof (long));
-
-  ppc_supply_gregset (regset, regcache, -1, gregsetp, sizeof (*gregsetp));
-}
-
-/* Fill register REGNO (if a gpr) in *GREGSETP with the value in GDB's
-   register array. If REGNO is -1 do it for all registers.  */
-
-void
-fill_gregset (const struct regcache *regcache,
-	      gdb_gregset_t *gregsetp, int regno)
-{
-  const struct regset *regset = ppc_fbsd_gregset (sizeof (long));
-
-  if (regno == -1)
-    memset (gregsetp, 0, sizeof (*gregsetp));
-  ppc_collect_gregset (regset, regcache, regno, gregsetp, sizeof (*gregsetp));
-}
-
-/* Fill GDB's register array with the floating-point register values
-   in *FPREGSETP.  */
-
-void
-supply_fpregset (struct regcache *regcache, const gdb_fpregset_t * fpregsetp)
-{
-  const struct regset *regset = ppc_fbsd_fpregset ();
-
-  ppc_supply_fpregset (regset, regcache, -1,
-		       fpregsetp, sizeof (*fpregsetp));
-}
-
-/* Fill register REGNO in *FGREGSETP with the value in GDB's
-   register array. If REGNO is -1 do it for all registers.  */
-
-void
-fill_fpregset (const struct regcache *regcache,
-	       gdb_fpregset_t *fpregsetp, int regno)
-{
-  const struct regset *regset = ppc_fbsd_fpregset ();
-
-  ppc_collect_fpregset (regset, regcache, regno,
-			fpregsetp, sizeof (*fpregsetp));
-}
-
-/* Returns true if PT_GETFPREGS fetches this register.  */
-
-static int
-getfpregs_supplies (struct gdbarch *gdbarch, int regno)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
-	 point registers.  Traditionally, GDB's register set has still
-	 listed the floating point registers for such machines, so this
-	 code is harmless.  However, the new E500 port actually omits the
-	 floating point registers entirely from the register set --- they
-	 don't even have register numbers assigned to them.
-
-	 It's not clear to me how best to update this code, so this assert
-	 will alert the first person to encounter the NetBSD/E500
-	 combination to the problem.  */
-
-  gdb_assert (ppc_floating_point_unit_p (gdbarch));
-
-  return ((regno >= tdep->ppc_fp0_regnum
-	   && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
-	  || regno == tdep->ppc_fpscr_regnum);
-}
-
-/* Fetch register REGNO from the child process. If REGNO is -1, do it
-   for all registers.  */
-
-static void
-ppcfbsd_fetch_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regno)
-{
-  gdb_gregset_t regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  supply_gregset (regcache, &regs);
-
-  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
-    {
-      const struct regset *fpregset = ppc_fbsd_fpregset ();
-      gdb_fpregset_t fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get FP registers"));
-
-      ppc_supply_fpregset (fpregset, regcache, regno, &fpregs, sizeof fpregs);
-    }
-}
-
-/* Store register REGNO back into the child process. If REGNO is -1,
-   do this for all registers.  */
-
-static void
-ppcfbsd_store_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regno)
-{
-  gdb_gregset_t regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  fill_gregset (regcache, &regs, regno);
-
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't write registers"));
-
-  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
-    {
-      gdb_fpregset_t fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get FP registers"));
-
-      fill_fpregset (regcache, &fpregs, regno);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't set FP registers"));
-    }
-}
-
-/* Architecture specific function that reconstructs the
-   register state from PCB (Process Control Block) and supplies it
-   to REGCACHE.  */
-
-static int
-ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  int i, regnum;
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp);
-  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &pcb->pcb_cr);
-  regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &pcb->pcb_lr);
-  for (i = 0, regnum = tdep->ppc_gp0_regnum + 14; i < 20; i++, regnum++)
-    regcache_raw_supply (regcache, regnum, &pcb->pcb_context[i]);
-
-  return 1;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-
-void _initialize_ppcfbsd_nat (void);
-
-void
-_initialize_ppcfbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add in local overrides.  */
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = ppcfbsd_fetch_inferior_registers;
-  t->to_store_registers = ppcfbsd_store_inferior_registers;
-  fbsd_nat_add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (ppcfbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-tdep.c ./gdb/ppc-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,352 @@
+/* Target-dependent code for PowerPC systems running FreeBSD.
+
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "frame-unwind.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "target.h"
+#include "trad-frame.h"
+
+#include "ppc-tdep.h"
+#include "ppc64-tdep.h"
+#include "ppc-fbsd-tdep.h"
+#include "fbsd-tdep.h"
+#include "solib-svr4.h"
+
+
+/* 32-bit regset descriptions.  */
+
+static const struct ppc_reg_offsets ppc32_fbsd_reg_offsets =
+  {
+	/* General-purpose registers.  */
+	/* .r0_offset = */     0,
+	/* .gpr_size = */      4,
+	/* .xr_size = */       4,
+	/* .pc_offset = */     144,
+	/* .ps_offset = */     -1,
+	/* .cr_offset = */     132,
+	/* .lr_offset = */     128,
+	/* .ctr_offset = */    140,
+	/* .xer_offset = */    136,
+	/* .mq_offset = */     -1,
+
+	/* Floating-point registers.  */
+	/* .f0_offset = */     0,
+	/* .fpscr_offset = */  256,
+	/* .fpscr_size = */    8,
+#ifdef NOTYET
+	/* AltiVec registers.  */
+	/* .vr0_offset = */    0,
+	/* .vscr_offset = */   512 + 12,
+	/* .vrsave_offset = */ 512
+#endif
+  };
+
+/* 64-bit regset descriptions.  */
+
+static const struct ppc_reg_offsets ppc64_fbsd_reg_offsets =
+  {
+	/* General-purpose registers.  */
+	/* .r0_offset = */     0,
+	/* .gpr_size = */      8,
+	/* .xr_size = */       8,
+	/* .pc_offset = */     288,
+	/* .ps_offset = */     -1,
+	/* .cr_offset = */     264,
+	/* .lr_offset = */     256,
+	/* .ctr_offset = */    280,
+	/* .xer_offset = */    272,
+	/* .mq_offset = */     -1,
+
+	/* Floating-point registers.  */
+	/* .f0_offset = */     0,
+	/* .fpscr_offset = */  256,
+	/* .fpscr_size = */    8,
+#ifdef NOYET
+	/* AltiVec registers.  */
+	/* .vr0_offset = */    0,
+	/* .vscr_offset = */   512 + 12,
+	/* .vrsave_offset = */ 528
+#endif
+  };
+
+/* 32-bit general-purpose register set.  */
+
+static const struct regset ppc32_fbsd_gregset = {
+  &ppc32_fbsd_reg_offsets,
+  ppc_supply_gregset,
+  ppc_collect_gregset
+};
+
+/* 64-bit general-purpose register set.  */
+
+static const struct regset ppc64_fbsd_gregset = {
+  &ppc64_fbsd_reg_offsets,
+  ppc_supply_gregset,
+  ppc_collect_gregset
+};
+
+/* 32-/64-bit floating-point register set.  */
+
+static const struct regset ppc32_fbsd_fpregset = {
+  &ppc32_fbsd_reg_offsets,
+  ppc_supply_fpregset,
+  ppc_collect_fpregset
+};
+
+const struct regset *
+ppc_fbsd_gregset (int wordsize)
+{
+  return wordsize == 8 ? &ppc64_fbsd_gregset : &ppc32_fbsd_gregset;
+}
+
+const struct regset *
+ppc_fbsd_fpregset (void)
+{
+  return &ppc32_fbsd_fpregset;
+}
+
+/* Iterate over core file register note sections.  */
+
+static void
+ppcfbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				      iterate_over_regset_sections_cb *cb,
+				      void *cb_data,
+				      const struct regcache *regcache)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->wordsize == 4)
+    cb (".reg", 148, &ppc32_fbsd_gregset, NULL, cb_data);
+  else
+    cb (".reg", 296, &ppc64_fbsd_gregset, NULL, cb_data);
+  cb (".reg2", 264, &ppc32_fbsd_fpregset, NULL, cb_data);
+}
+
+/* Default page size.  */
+
+static const int ppcfbsd_page_size = 4096;
+
+/* Offset for sigreturn(2).  */
+
+static const int ppcfbsd_sigreturn_offset[] = {
+  0xc,				/* FreeBSD 32-bit  */
+  -1
+};
+
+/* Signal trampolines.  */
+
+static int
+ppcfbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				struct frame_info *this_frame,
+				void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  CORE_ADDR start_pc = (pc & ~(ppcfbsd_page_size - 1));
+  const int *offset;
+  const char *name;
+
+  /* A stack trampoline is detected if no name is associated
+   to the current pc and if it points inside a trampoline
+   sequence.  */
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+
+  /* If we have a name, we have no trampoline, return.  */
+  if (name)
+    return 0;
+
+  for (offset = ppcfbsd_sigreturn_offset; *offset != -1; offset++)
+    {
+      gdb_byte buf[2 * PPC_INSN_SIZE];
+      unsigned long insn;
+
+      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
+				     buf, sizeof buf))
+	continue;
+
+      /* Check for "li r0,SYS_sigreturn".  */
+      insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
+      if (insn != 0x380001a1)
+	continue;
+
+      /* Check for "sc".  */
+      insn = extract_unsigned_integer (buf + PPC_INSN_SIZE,
+				       PPC_INSN_SIZE, byte_order);
+      if (insn != 0x44000002)
+	continue;
+
+      return 1;
+    }
+
+  return 0;
+}
+
+static struct trad_frame_cache *
+ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  struct trad_frame_cache *cache;
+  CORE_ADDR addr, base, func;
+  gdb_byte buf[PPC_INSN_SIZE];
+  int i;
+
+  if (*this_cache)
+    return (struct trad_frame_cache *) *this_cache;
+
+  cache = trad_frame_cache_zalloc (this_frame);
+  *this_cache = cache;
+
+  func = get_frame_pc (this_frame);
+  func &= ~(ppcfbsd_page_size - 1);
+  if (!safe_frame_unwind_memory (this_frame, func, buf, sizeof buf))
+    return cache;
+
+  base = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch));
+  addr = base + 0x10 + 2 * tdep->wordsize;
+  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
+    {
+      int regnum = i + tdep->ppc_gp0_regnum;
+      trad_frame_set_reg_addr (cache, regnum, addr);
+    }
+  trad_frame_set_reg_addr (cache, tdep->ppc_lr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_cr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_xer_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_ctr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, gdbarch_pc_regnum (gdbarch), addr);
+  /* SRR0?  */
+  addr += tdep->wordsize;
+
+  /* Construct the frame ID using the function start.  */
+  trad_frame_set_id (cache, frame_id_build (base, func));
+
+  return cache;
+}
+
+static void
+ppcfbsd_sigtramp_frame_this_id (struct frame_info *this_frame,
+				void **this_cache, struct frame_id *this_id)
+{
+  struct trad_frame_cache *cache =
+    ppcfbsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  trad_frame_get_id (cache, this_id);
+}
+
+static struct value *
+ppcfbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
+				      void **this_cache, int regnum)
+{
+  struct trad_frame_cache *cache =
+    ppcfbsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_register (cache, this_frame, regnum);
+}
+
+static const struct frame_unwind ppcfbsd_sigtramp_frame_unwind = {
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  ppcfbsd_sigtramp_frame_this_id,
+  ppcfbsd_sigtramp_frame_prev_register,
+  NULL,
+  ppcfbsd_sigtramp_frame_sniffer
+};
+
+static enum return_value_convention
+ppcfbsd_return_value (struct gdbarch *gdbarch, struct value *function,
+		      struct type *valtype, struct regcache *regcache,
+		      gdb_byte *readbuf, const gdb_byte *writebuf)
+{
+  return ppc_sysv_abi_broken_return_value (gdbarch, function, valtype,
+					   regcache, readbuf, writebuf);
+}
+
+
+static void
+ppcfbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Generic FreeBSD support. */
+  fbsd_init_abi (info, gdbarch);
+
+  /* FreeBSD doesn't support the 128-bit `long double' from the psABI.  */
+  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
+
+  if (tdep->wordsize == 4)
+    {
+      set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
+
+      set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+      set_solib_svr4_fetch_link_map_offsets (gdbarch,
+					     svr4_ilp32_fetch_link_map_offsets);
+
+      frame_unwind_append_unwinder (gdbarch, &ppcfbsd_sigtramp_frame_unwind);
+      set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpc");
+    }
+
+  if (tdep->wordsize == 8)
+    {
+      set_gdbarch_convert_from_func_ptr_addr
+	(gdbarch, ppc64_convert_from_func_ptr_addr);
+      set_gdbarch_elf_make_msymbol_special (gdbarch,
+					    ppc64_elf_make_msymbol_special);
+
+      set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
+      set_solib_svr4_fetch_link_map_offsets (gdbarch,
+					     svr4_lp64_fetch_link_map_offsets);
+      set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpc");
+    }
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, ppcfbsd_iterate_over_regset_sections);
+
+  set_gdbarch_fetch_tls_load_module_address (gdbarch,
+					     svr4_fetch_objfile_link_map);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+
+void _initialize_ppcfbsd_tdep (void);
+
+void
+_initialize_ppcfbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_FREEBSD,
+			  ppcfbsd_init_abi);
+  gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_FREEBSD,
+			  ppcfbsd_init_abi);
+  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_FREEBSD,
+			  ppcfbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-tdep.c ./gdb/ppcfbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcfbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,354 +0,0 @@
-/* Target-dependent code for PowerPC systems running FreeBSD.
-
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "gdbcore.h"
-#include "frame-unwind.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "symtab.h"
-#include "target.h"
-#include "trad-frame.h"
-
-#include "ppc-tdep.h"
-#include "ppc64-tdep.h"
-#include "ppcfbsd-tdep.h"
-#include "fbsd-tdep.h"
-#include "solib-svr4.h"
-
-
-/* 32-bit regset descriptions.  */
-
-static const struct ppc_reg_offsets ppc32_fbsd_reg_offsets =
-  {
-	/* General-purpose registers.  */
-	/* .r0_offset = */     0,
-	/* .gpr_size = */      4,
-	/* .xr_size = */       4,
-	/* .pc_offset = */     144,
-	/* .ps_offset = */     -1,
-	/* .cr_offset = */     132,
-	/* .lr_offset = */     128,
-	/* .ctr_offset = */    140,
-	/* .xer_offset = */    136,
-	/* .mq_offset = */     -1,
-
-	/* Floating-point registers.  */
-	/* .f0_offset = */     0,
-	/* .fpscr_offset = */  256,
-	/* .fpscr_size = */    8,
-#ifdef NOTYET
-	/* AltiVec registers.  */
-	/* .vr0_offset = */    0,
-	/* .vscr_offset = */   512 + 12,
-	/* .vrsave_offset = */ 512
-#endif
-  };
-
-/* 64-bit regset descriptions.  */
-
-static const struct ppc_reg_offsets ppc64_fbsd_reg_offsets =
-  {
-	/* General-purpose registers.  */
-	/* .r0_offset = */     0,
-	/* .gpr_size = */      8,
-	/* .xr_size = */       8,
-	/* .pc_offset = */     288,
-	/* .ps_offset = */     -1,
-	/* .cr_offset = */     264,
-	/* .lr_offset = */     256,
-	/* .ctr_offset = */    280,
-	/* .xer_offset = */    272,
-	/* .mq_offset = */     -1,
-
-	/* Floating-point registers.  */
-	/* .f0_offset = */     0,
-	/* .fpscr_offset = */  256,
-	/* .fpscr_size = */    8,
-#ifdef NOYET
-	/* AltiVec registers.  */
-	/* .vr0_offset = */    0,
-	/* .vscr_offset = */   512 + 12,
-	/* .vrsave_offset = */ 528
-#endif
-  };
-
-/* 32-bit general-purpose register set.  */
-
-static const struct regset ppc32_fbsd_gregset = {
-  &ppc32_fbsd_reg_offsets,
-  ppc_supply_gregset,
-  ppc_collect_gregset
-};
-
-/* 64-bit general-purpose register set.  */
-
-static const struct regset ppc64_fbsd_gregset = {
-  &ppc64_fbsd_reg_offsets,
-  ppc_supply_gregset,
-  ppc_collect_gregset
-};
-
-/* 32-/64-bit floating-point register set.  */
-
-static const struct regset ppc32_fbsd_fpregset = {
-  &ppc32_fbsd_reg_offsets,
-  ppc_supply_fpregset,
-  ppc_collect_fpregset
-};
-
-const struct regset *
-ppc_fbsd_gregset (int wordsize)
-{
-  return wordsize == 8 ? &ppc64_fbsd_gregset : &ppc32_fbsd_gregset;
-}
-
-const struct regset *
-ppc_fbsd_fpregset (void)
-{
-  return &ppc32_fbsd_fpregset;
-}
-
-/* Iterate over core file register note sections.  */
-
-static void
-ppcfbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				      iterate_over_regset_sections_cb *cb,
-				      void *cb_data,
-				      const struct regcache *regcache)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  if (tdep->wordsize == 4)
-    cb (".reg", 148, &ppc32_fbsd_gregset, NULL, cb_data);
-  else
-    cb (".reg", 296, &ppc64_fbsd_gregset, NULL, cb_data);
-  cb (".reg2", 264, &ppc32_fbsd_fpregset, NULL, cb_data);
-}
-
-/* Default page size.  */
-
-static const int ppcfbsd_page_size = 4096;
-
-/* Offset for sigreturn(2).  */
-
-static const int ppcfbsd_sigreturn_offset[] = {
-  0xc,				/* FreeBSD 32-bit  */
-  -1
-};
-
-/* Signal trampolines.  */
-
-static int
-ppcfbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				struct frame_info *this_frame,
-				void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  CORE_ADDR start_pc = (pc & ~(ppcfbsd_page_size - 1));
-  const int *offset;
-  const char *name;
-
-  /* A stack trampoline is detected if no name is associated
-   to the current pc and if it points inside a trampoline
-   sequence.  */
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-
-  /* If we have a name, we have no trampoline, return.  */
-  if (name)
-    return 0;
-
-  for (offset = ppcfbsd_sigreturn_offset; *offset != -1; offset++)
-    {
-      gdb_byte buf[2 * PPC_INSN_SIZE];
-      unsigned long insn;
-
-      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
-				     buf, sizeof buf))
-	continue;
-
-      /* Check for "li r0,SYS_sigreturn".  */
-      insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
-      if (insn != 0x380001a1)
-	continue;
-
-      /* Check for "sc".  */
-      insn = extract_unsigned_integer (buf + PPC_INSN_SIZE,
-				       PPC_INSN_SIZE, byte_order);
-      if (insn != 0x44000002)
-	continue;
-
-      return 1;
-    }
-
-  return 0;
-}
-
-static struct trad_frame_cache *
-ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct trad_frame_cache *cache;
-  CORE_ADDR addr, base, func;
-  gdb_byte buf[PPC_INSN_SIZE];
-  int i;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-  *this_cache = cache;
-
-  func = get_frame_pc (this_frame);
-  func &= ~(ppcfbsd_page_size - 1);
-  if (!safe_frame_unwind_memory (this_frame, func, buf, sizeof buf))
-    return cache;
-
-  base = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch));
-  addr = base + 0x10 + 2 * tdep->wordsize;
-  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
-    {
-      int regnum = i + tdep->ppc_gp0_regnum;
-      trad_frame_set_reg_addr (cache, regnum, addr);
-    }
-  trad_frame_set_reg_addr (cache, tdep->ppc_lr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_cr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_xer_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_ctr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, gdbarch_pc_regnum (gdbarch), addr);
-  /* SRR0?  */
-  addr += tdep->wordsize;
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (cache, frame_id_build (base, func));
-
-  return cache;
-}
-
-static void
-ppcfbsd_sigtramp_frame_this_id (struct frame_info *this_frame,
-				void **this_cache, struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    ppcfbsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-ppcfbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
-				      void **this_cache, int regnum)
-{
-  struct trad_frame_cache *cache =
-    ppcfbsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static const struct frame_unwind ppcfbsd_sigtramp_frame_unwind = {
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  ppcfbsd_sigtramp_frame_this_id,
-  ppcfbsd_sigtramp_frame_prev_register,
-  NULL,
-  ppcfbsd_sigtramp_frame_sniffer
-};
-
-static enum return_value_convention
-ppcfbsd_return_value (struct gdbarch *gdbarch, struct value *function,
-		      struct type *valtype, struct regcache *regcache,
-		      gdb_byte *readbuf, const gdb_byte *writebuf)
-{
-  return ppc_sysv_abi_broken_return_value (gdbarch, function, valtype,
-					   regcache, readbuf, writebuf);
-}
-
-
-static void
-ppcfbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Generic FreeBSD support. */
-  fbsd_init_abi (info, gdbarch);
-
-  /* FreeBSD doesn't support the 128-bit `long double' from the psABI.  */
-  set_gdbarch_long_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
-
-  if (tdep->wordsize == 4)
-    {
-      set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
-
-      set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
-      set_solib_svr4_fetch_link_map_offsets (gdbarch,
-					     svr4_ilp32_fetch_link_map_offsets);
-
-      frame_unwind_append_unwinder (gdbarch, &ppcfbsd_sigtramp_frame_unwind);
-      set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpc");
-    }
-
-  if (tdep->wordsize == 8)
-    {
-      set_gdbarch_convert_from_func_ptr_addr
-	(gdbarch, ppc64_convert_from_func_ptr_addr);
-      set_gdbarch_elf_make_msymbol_special (gdbarch,
-					    ppc64_elf_make_msymbol_special);
-
-      set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
-      set_solib_svr4_fetch_link_map_offsets (gdbarch,
-					     svr4_lp64_fetch_link_map_offsets);
-      set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpc");
-    }
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, ppcfbsd_iterate_over_regset_sections);
-
-  set_gdbarch_fetch_tls_load_module_address (gdbarch,
-					     svr4_fetch_objfile_link_map);
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-
-void _initialize_ppcfbsd_tdep (void);
-
-void
-_initialize_ppcfbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_FREEBSD_ELF,
-			  ppcfbsd_init_abi);
-  gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64,
-			  GDB_OSABI_FREEBSD_ELF,
-			  ppcfbsd_init_abi);
-  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_FREEBSD_ELF,
-			  ppcfbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-tdep.h ./gdb/ppc-fbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-fbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-fbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+/* Target-dependent code for GDB on PowerPC systems running FreeBSD.
+
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef PPC_FBSD_TDEP_H
+#define PPC_FBSD_TDEP_H
+
+struct regset;
+
+/* From ppc-fbsd-tdep.c ...  */
+const struct regset *ppc_fbsd_gregset (int);
+const struct regset *ppc_fbsd_fpregset (void);
+
+#endif /* PPC_FBSD_TDEP_H  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-tdep.h ./gdb/ppcfbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcfbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcfbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-/* Target-dependent code for GDB on PowerPC systems running FreeBSD.
-
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef PPCFBSD_TDEP_H
-#define PPCFBSD_TDEP_H
-
-struct regset;
-
-/* From ppcfbsd-tdep.c ...  */
-const struct regset *ppc_fbsd_gregset (int);
-const struct regset *ppc_fbsd_fpregset (void);
-
-#endif /* PPCFBSD_TDEP_H  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-nat.c ./gdb/ppc-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* PPC GNU/Linux native support.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,7 +33,7 @@
 #include "gdb_wait.h"
 #include <fcntl.h>
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 /* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
@@ -1391,7 +1391,7 @@ have_ptrace_hwdebug_interface (void)
 
 static int
 ppc_linux_can_use_hw_breakpoint (struct target_ops *self,
-				 int type, int cnt, int ot)
+				 enum bptype type, int cnt, int ot)
 {
   int total_hw_wp, total_hw_bp;
 
@@ -1528,9 +1528,8 @@ hwdebug_find_thread_points_by_tid (int t
      if the wanted one does not exist?  */
   if (alloc_new)
     {
-      t = xmalloc (sizeof (struct thread_points));
-      t->hw_breaks
-	= xzalloc (max_slots_number * sizeof (struct hw_break_tuple));
+      t = XNEW (struct thread_points);
+      t->hw_breaks = XCNEWVEC (struct hw_break_tuple, max_slots_number);
       t->tid = tid;
       VEC_safe_push (thread_points_p, ppc_threads, t);
     }
@@ -1546,7 +1545,7 @@ hwdebug_insert_point (struct ppc_hw_brea
 {
   int i;
   long slot;
-  struct ppc_hw_breakpoint *p = xmalloc (sizeof (struct ppc_hw_breakpoint));
+  struct ppc_hw_breakpoint *p = XNEW (struct ppc_hw_breakpoint);
   struct hw_break_tuple *hw_breaks;
   struct cleanup *c = make_cleanup (xfree, p);
   struct thread_points *t;
@@ -1699,13 +1698,13 @@ ppc_linux_remove_hw_breakpoint (struct t
 }
 
 static int
-get_trigger_type (int rw)
+get_trigger_type (enum target_hw_bp_type type)
 {
   int t;
 
-  if (rw == hw_read)
+  if (type == hw_read)
     t = PPC_BREAKPOINT_TRIGGER_READ;
-  else if (rw == hw_write)
+  else if (type == hw_write)
     t = PPC_BREAKPOINT_TRIGGER_WRITE;
   else
     t = PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE;
@@ -1720,7 +1719,7 @@ get_trigger_type (int rw)
 
 static int
 ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
-				  CORE_ADDR mask, int rw)
+				  CORE_ADDR mask, enum target_hw_bp_type rw)
 {
   struct lwp_info *lp;
   struct ppc_hw_breakpoint p;
@@ -1748,7 +1747,7 @@ ppc_linux_insert_mask_watchpoint (struct
 
 static int
 ppc_linux_remove_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
-				  CORE_ADDR mask, int rw)
+				  CORE_ADDR mask, enum target_hw_bp_type rw)
 {
   struct lwp_info *lp;
   struct ppc_hw_breakpoint p;
@@ -1984,8 +1983,8 @@ ppc_linux_can_accel_watchpoint_condition
 
 static void
 create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
-			   int len, int rw, struct expression *cond,
-			   int insert)
+			   int len, enum target_hw_bp_type type,
+			   struct expression *cond, int insert)
 {
   if (len == 1
       || !(hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE))
@@ -2024,13 +2023,13 @@ create_watchpoint_request (struct ppc_hw
     }
 
   p->version = PPC_DEBUG_CURRENT_VERSION;
-  p->trigger_type = get_trigger_type (rw);
+  p->trigger_type = get_trigger_type (type);
   p->addr = (uint64_t) addr;
 }
 
 static int
-ppc_linux_insert_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int rw,
+ppc_linux_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+			     enum target_hw_bp_type type,
 			     struct expression *cond)
 {
   struct lwp_info *lp;
@@ -2040,7 +2039,7 @@ ppc_linux_insert_watchpoint (struct targ
     {
       struct ppc_hw_breakpoint p;
 
-      create_watchpoint_request (&p, addr, len, rw, cond, 1);
+      create_watchpoint_request (&p, addr, len, type, cond, 1);
 
       ALL_LWPS (lp)
 	hwdebug_insert_point (&p, ptid_get_lwp (lp->ptid));
@@ -2068,7 +2067,7 @@ ppc_linux_insert_watchpoint (struct targ
 	}
 
       dabr_value = addr & ~(read_mode | write_mode);
-      switch (rw)
+      switch (type)
 	{
 	  case hw_read:
 	    /* Set read and translate bits.  */
@@ -2098,8 +2097,8 @@ ppc_linux_insert_watchpoint (struct targ
 }
 
 static int
-ppc_linux_remove_watchpoint (struct target_ops *self,
-			     CORE_ADDR addr, int len, int rw,
+ppc_linux_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+			     enum target_hw_bp_type type,
 			     struct expression *cond)
 {
   struct lwp_info *lp;
@@ -2109,7 +2108,7 @@ ppc_linux_remove_watchpoint (struct targ
     {
       struct ppc_hw_breakpoint p;
 
-      create_watchpoint_request (&p, addr, len, rw, cond, 0);
+      create_watchpoint_request (&p, addr, len, type, cond, 0);
 
       ALL_LWPS (lp)
 	hwdebug_remove_point (&p, ptid_get_lwp (lp->ptid));
@@ -2420,7 +2419,8 @@ ppc_linux_read_description (struct targe
 	perror_with_name (_("Unable to fetch SPE registers"));
     }
 
-  if (have_ptrace_getsetvsxregs)
+  if (have_ptrace_getsetvsxregs
+      && (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_VSX))
     {
       gdb_vsxregset_t vsxregset;
 
@@ -2433,7 +2433,8 @@ ppc_linux_read_description (struct targe
 	perror_with_name (_("Unable to fetch VSX registers"));
     }
 
-  if (have_ptrace_getvrregs)
+  if (have_ptrace_getvrregs
+      && (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_ALTIVEC))
     {
       gdb_vrregset_t vrregset;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-tdep.c ./gdb/ppc-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -222,8 +222,6 @@ ppc_linux_memory_remove_breakpoint (stru
 
   /* Determine appropriate breakpoint contents and size for this address.  */
   bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-  if (bp == NULL)
-    error (_("Software breakpoints not implemented for this target."));
 
   /* Make sure we see the memory breakpoints.  */
   cleanup = make_show_memory_breakpoints_cleanup (1);
@@ -373,7 +371,8 @@ ppc_linux_supply_gregset (const struct r
 			  struct regcache *regcache,
 			  int regnum, const void *gregs, size_t len)
 {
-  const struct ppc_reg_offsets *offsets = regset->regmap;
+  const struct ppc_reg_offsets *offsets
+    = (const struct ppc_reg_offsets *) regset->regmap;
 
   ppc_supply_gregset (regset, regcache, regnum, gregs, len);
 
@@ -381,13 +380,13 @@ ppc_linux_supply_gregset (const struct r
     {
       /* "orig_r3" is stored 2 slots after "pc".  */
       if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
-	ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+	ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, (const gdb_byte *) gregs,
 			offsets->pc_offset + 2 * offsets->gpr_size,
 			offsets->gpr_size);
 
       /* "trap" is stored 8 slots after "pc".  */
       if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
-	ppc_supply_reg (regcache, PPC_TRAP_REGNUM, gregs,
+	ppc_supply_reg (regcache, PPC_TRAP_REGNUM, (const gdb_byte *) gregs,
 			offsets->pc_offset + 8 * offsets->gpr_size,
 			offsets->gpr_size);
     }
@@ -398,7 +397,8 @@ ppc_linux_collect_gregset (const struct 
 			   const struct regcache *regcache,
 			   int regnum, void *gregs, size_t len)
 {
-  const struct ppc_reg_offsets *offsets = regset->regmap;
+  const struct ppc_reg_offsets *offsets
+    = (const struct ppc_reg_offsets *) regset->regmap;
 
   /* Clear areas in the linux gregset not written elsewhere.  */
   if (regnum == -1)
@@ -410,13 +410,13 @@ ppc_linux_collect_gregset (const struct 
     {
       /* "orig_r3" is stored 2 slots after "pc".  */
       if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
-	ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+	ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, (gdb_byte *) gregs,
 			 offsets->pc_offset + 2 * offsets->gpr_size,
 			 offsets->gpr_size);
 
       /* "trap" is stored 8 slots after "pc".  */
       if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
-	ppc_collect_reg (regcache, PPC_TRAP_REGNUM, gregs,
+	ppc_collect_reg (regcache, PPC_TRAP_REGNUM, (gdb_byte *) gregs,
 			 offsets->pc_offset + 8 * offsets->gpr_size,
 			 offsets->gpr_size);
     }
@@ -765,29 +765,32 @@ static struct linux_record_tdep ppc64_li
 static enum gdb_syscall
 ppc_canonicalize_syscall (int syscall)
 {
+  int result = -1;
+
   if (syscall <= 165)
-    return syscall;
+    result = syscall;
   else if (syscall >= 167 && syscall <= 190)	/* Skip query_module 166 */
-    return syscall + 1;
+    result = syscall + 1;
   else if (syscall >= 192 && syscall <= 197)	/* mmap2 */
-    return syscall;
+    result = syscall;
   else if (syscall == 208)			/* tkill */
-    return gdb_sys_tkill;
+    result = gdb_sys_tkill;
   else if (syscall >= 207 && syscall <= 220)	/* gettid */
-    return syscall + 224 - 207;
+    result = syscall + 224 - 207;
   else if (syscall >= 234 && syscall <= 239)	/* exit_group */
-    return syscall + 252 - 234;
-  else if (syscall >= 240 && syscall <=248)	/* timer_create */
-    return syscall += 259 - 240;
-  else if (syscall >= 250 && syscall <=251)	/* tgkill */
-    return syscall + 270 - 250;
+    result = syscall + 252 - 234;
+  else if (syscall >= 240 && syscall <= 248)	/* timer_create */
+    result = syscall += 259 - 240;
+  else if (syscall >= 250 && syscall <= 251)	/* tgkill */
+    result = syscall + 270 - 250;
   else if (syscall == 336)
-    return gdb_sys_recv;
+    result = gdb_sys_recv;
   else if (syscall == 337)
-    return gdb_sys_recvfrom;
+    result = gdb_sys_recvfrom;
   else if (syscall == 342)
-    return gdb_sys_recvmsg;
-  return -1;
+    result = gdb_sys_recvmsg;
+
+  return (enum gdb_syscall) result;
 }
 
 /* Record registers which might be clobbered during system call.
@@ -1076,7 +1079,7 @@ ppc_stap_parse_special_token (struct gdb
 	}
 
       len = s - p->arg;
-      regname = alloca (len + 2);
+      regname = (char *) alloca (len + 2);
       regname[0] = 'r';
 
       strncpy (regname + 1, p->arg, len);
@@ -1137,7 +1140,7 @@ ppc_linux_spe_context_lookup (struct obj
     {
       spe_context_objfile = objfile;
       spe_context_lm_addr = svr4_fetch_objfile_link_map (objfile);
-      spe_context_offset = BMSYMBOL_VALUE_ADDRESS (sym);
+      spe_context_offset = MSYMBOL_VALUE_RAW_ADDRESS (sym.minsym);
       spe_context_cache_ptid = minus_one_ptid;
       spe_context_cache_address = 0;
       return;
@@ -1254,7 +1257,7 @@ struct ppu2spu_cache
 static struct gdbarch *
 ppu2spu_prev_arch (struct frame_info *this_frame, void **this_cache)
 {
-  struct ppu2spu_cache *cache = *this_cache;
+  struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
   return get_regcache_arch (cache->regcache);
 }
 
@@ -1262,7 +1265,7 @@ static void
 ppu2spu_this_id (struct frame_info *this_frame,
 		 void **this_cache, struct frame_id *this_id)
 {
-  struct ppu2spu_cache *cache = *this_cache;
+  struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
   *this_id = cache->frame_id;
 }
 
@@ -1270,11 +1273,11 @@ static struct value *
 ppu2spu_prev_register (struct frame_info *this_frame,
 		       void **this_cache, int regnum)
 {
-  struct ppu2spu_cache *cache = *this_cache;
+  struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
   struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
   gdb_byte *buf;
 
-  buf = alloca (register_size (gdbarch, regnum));
+  buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
 
   if (regnum < gdbarch_num_regs (gdbarch))
     regcache_raw_read (cache->regcache, regnum, buf);
@@ -1292,10 +1295,10 @@ struct ppu2spu_data
   gdb_byte gprs[128*16];
 };
 
-static int
+static enum register_status
 ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf)
 {
-  struct ppu2spu_data *data = src;
+  struct ppu2spu_data *data = (struct ppu2spu_data *) src;
   enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
 
   if (regnum >= 0 && regnum < SPU_NUM_GPRS)
@@ -1347,7 +1350,7 @@ ppu2spu_sniffer (const struct frame_unwi
       info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
       info.byte_order = BFD_ENDIAN_BIG;
       info.osabi = GDB_OSABI_LINUX;
-      info.tdep_info = (void *) &data.id;
+      info.tdep_info = &data.id;
       data.gdbarch = gdbarch_find_by_info (info);
       if (!data.gdbarch)
 	return 0;
@@ -1379,7 +1382,7 @@ ppu2spu_sniffer (const struct frame_unwi
 static void
 ppu2spu_dealloc_cache (struct frame_info *self, void *this_cache)
 {
-  struct ppu2spu_cache *cache = this_cache;
+  struct ppu2spu_cache *cache = (struct ppu2spu_cache *) this_cache;
   regcache_xfree (cache->regcache);
 }
 
@@ -1418,8 +1421,8 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_flock = 32;
       record_tdep->size_oldold_utsname = 45;
       record_tdep->size_ustat = 32;
-      record_tdep->size_old_sigaction = 152;
-      record_tdep->size_old_sigset_t = 128;
+      record_tdep->size_old_sigaction = 32;
+      record_tdep->size_old_sigset_t = 8;
       record_tdep->size_rlimit = 16;
       record_tdep->size_rusage = 144;
       record_tdep->size_timeval = 16;
@@ -1427,8 +1430,7 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_old_gid_t = 4;
       record_tdep->size_old_uid_t = 4;
       record_tdep->size_fd_set = 128;
-      record_tdep->size_dirent = 280;
-      record_tdep->size_dirent64 = 280;
+      record_tdep->size_old_dirent = 280;
       record_tdep->size_statfs = 120;
       record_tdep->size_statfs64 = 120;
       record_tdep->size_sockaddr = 16;
@@ -1451,9 +1453,9 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_pollfd = 8;
       record_tdep->size_NFS_FHSIZE = 32;
       record_tdep->size_knfsd_fh = 132;
-      record_tdep->size_TASK_COMM_LEN = 32;
-      record_tdep->size_sigaction = 152;
-      record_tdep->size_sigset_t = 128;
+      record_tdep->size_TASK_COMM_LEN = 16;
+      record_tdep->size_sigaction = 32;
+      record_tdep->size_sigset_t = 8;
       record_tdep->size_siginfo_t = 128;
       record_tdep->size_cap_user_data_t = 8;
       record_tdep->size_stack_t = 24;
@@ -1468,7 +1470,6 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_epoll_event = 16;
       record_tdep->size_itimerspec = 32;
       record_tdep->size_mq_attr = 64;
-      record_tdep->size_siginfo = 128;
       record_tdep->size_termios = 44;
       record_tdep->size_pid_t = 4;
       record_tdep->size_winsize = 8;
@@ -1476,6 +1477,7 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_serial_icounter_struct = 80;
       record_tdep->size_size_t = 8;
       record_tdep->size_iovec = 16;
+      record_tdep->size_time_t = 8;
     }
   else if (wordsize == 4)
     {
@@ -1486,8 +1488,8 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_flock = 16;
       record_tdep->size_oldold_utsname = 45;
       record_tdep->size_ustat = 20;
-      record_tdep->size_old_sigaction = 152;
-      record_tdep->size_old_sigset_t = 128;
+      record_tdep->size_old_sigaction = 16;
+      record_tdep->size_old_sigset_t = 4;
       record_tdep->size_rlimit = 8;
       record_tdep->size_rusage = 72;
       record_tdep->size_timeval = 8;
@@ -1495,8 +1497,7 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_old_gid_t = 4;
       record_tdep->size_old_uid_t = 4;
       record_tdep->size_fd_set = 128;
-      record_tdep->size_dirent = 268;
-      record_tdep->size_dirent64 = 280;
+      record_tdep->size_old_dirent = 268;
       record_tdep->size_statfs = 64;
       record_tdep->size_statfs64 = 88;
       record_tdep->size_sockaddr = 16;
@@ -1519,9 +1520,9 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_pollfd = 8;
       record_tdep->size_NFS_FHSIZE = 32;
       record_tdep->size_knfsd_fh = 132;
-      record_tdep->size_TASK_COMM_LEN = 32;
-      record_tdep->size_sigaction = 140;
-      record_tdep->size_sigset_t = 128;
+      record_tdep->size_TASK_COMM_LEN = 16;
+      record_tdep->size_sigaction = 20;
+      record_tdep->size_sigset_t = 8;
       record_tdep->size_siginfo_t = 128;
       record_tdep->size_cap_user_data_t = 4;
       record_tdep->size_stack_t = 12;
@@ -1536,7 +1537,6 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_epoll_event = 16;
       record_tdep->size_itimerspec = 16;
       record_tdep->size_mq_attr = 32;
-      record_tdep->size_siginfo = 128;
       record_tdep->size_termios = 44;
       record_tdep->size_pid_t = 4;
       record_tdep->size_winsize = 8;
@@ -1544,6 +1544,7 @@ ppc_init_linux_record_tdep (struct linux
       record_tdep->size_serial_icounter_struct = 80;
       record_tdep->size_size_t = 4;
       record_tdep->size_iovec = 8;
+      record_tdep->size_time_t = 4;
     }
   else
     internal_error (__FILE__, __LINE__, _("unexpected wordsize"));
@@ -1625,12 +1626,32 @@ ppc_init_linux_record_tdep (struct linux
   record_tdep->ioctl_FIOQSIZE = 0x40086680;
 }
 
+/* Return a floating-point format for a floating-point variable of
+   length LEN in bits.  If non-NULL, NAME is the name of its type.
+   If no suitable type is found, return NULL.  */
+
+const struct floatformat **
+ppc_floatformat_for_type (struct gdbarch *gdbarch,
+                          const char *name, int len)
+{
+  if (len == 128 && name)
+    if (strcmp (name, "__float128") == 0
+        || strcmp (name, "_Float128") == 0
+        || strcmp (name, "_Float64x") == 0
+        || strcmp (name, "complex _Float128") == 0
+        || strcmp (name, "complex _Float64x") == 0)
+      return floatformats_ia64_quad;
+
+  return default_floatformat_for_type (gdbarch, name, len);
+}
+
 static void
 ppc_linux_init_abi (struct gdbarch_info info,
                     struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+  struct tdesc_arch_data *tdesc_data
+    = (struct tdesc_arch_data *) info.tdep_info;
   static const char *const stap_integer_prefixes[] = { "i", NULL };
   static const char *const stap_register_indirection_prefixes[] = { "(",
 								    NULL };
@@ -1647,6 +1668,9 @@ ppc_linux_init_abi (struct gdbarch_info 
   set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
   set_gdbarch_long_double_format (gdbarch, floatformats_ibm_long_double);
 
+  /* Support for floating-point data type variants.  */
+  set_gdbarch_floatformat_for_type (gdbarch, ppc_floatformat_for_type);
+
   /* Handle inferior calls during interrupted system calls.  */
   set_gdbarch_write_pc (gdbarch, ppc_linux_write_pc);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-tdep.h ./gdb/ppc-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #ifndef PPC_LINUX_TDEP_H
 #define PPC_LINUX_TDEP_H
 
+#include "ppc-tdep.h"  /* For PPC_NUM_REGS.  */
+
 struct regset;
 
 /* From ppc-linux-tdep.c ...  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-nat.c ./gdb/ppc-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,197 @@
+/* Native-dependent code for NetBSD/powerpc.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include "ppc-tdep.h"
+#include "ppc-nbsd-tdep.h"
+#include "bsd-kvm.h"
+#include "inf-ptrace.h"
+
+/* Returns true if PT_GETREGS fetches this register.  */
+
+static int
+getregs_supplies (struct gdbarch *gdbarch, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  return ((regnum >= tdep->ppc_gp0_regnum
+           && regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
+          || regnum == tdep->ppc_lr_regnum
+          || regnum == tdep->ppc_cr_regnum
+          || regnum == tdep->ppc_xer_regnum
+          || regnum == tdep->ppc_ctr_regnum
+	  || regnum == gdbarch_pc_regnum (gdbarch));
+}
+
+/* Like above, but for PT_GETFPREGS.  */
+
+static int
+getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+     point registers.  Traditionally, GDB's register set has still
+     listed the floating point registers for such machines, so this
+     code is harmless.  However, the new E500 port actually omits the
+     floating point registers entirely from the register set --- they
+     don't even have register numbers assigned to them.
+
+     It's not clear to me how best to update this code, so this assert
+     will alert the first person to encounter the NetBSD/E500
+     combination to the problem.  */
+  gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
+  return ((regnum >= tdep->ppc_fp0_regnum
+           && regnum < tdep->ppc_fp0_regnum + ppc_num_fprs)
+	  || regnum == tdep->ppc_fpscr_regnum);
+}
+
+static void
+ppcnbsd_fetch_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+        perror_with_name (_("Couldn't get registers"));
+
+      ppc_supply_gregset (&ppcnbsd_gregset, regcache,
+			  regnum, &regs, sizeof regs);
+    }
+
+  if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get FP registers"));
+
+      ppc_supply_fpregset (&ppcnbsd_fpregset, regcache,
+			   regnum, &fpregs, sizeof fpregs);
+    }
+}
+
+static void
+ppcnbsd_store_inferior_registers (struct target_ops *ops,
+				  struct regcache *regcache, int regnum)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
+    {
+      struct reg regs;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      ppc_collect_gregset (&ppcnbsd_gregset, regcache,
+			   regnum, &regs, sizeof regs);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+	perror_with_name (_("Couldn't write registers"));
+    }
+
+  if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get FP registers"));
+
+      ppc_collect_fpregset (&ppcnbsd_fpregset, regcache,
+			    regnum, &fpregs, sizeof fpregs);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't set FP registers"));
+    }
+}
+
+static int
+ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct switchframe sf;
+  struct callframe cf;
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int i;
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
+  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+  for (i = 0 ; i < 19 ; i++)
+    regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 13 + i,
+			 &sf.fixreg[i]);
+
+  read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf));
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 1, &cf.sp);
+
+  read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
+  regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr);
+  regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
+
+  return 1;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_ppcnbsd_nat (void);
+
+void
+_initialize_ppcnbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (ppcnbsd_supply_pcb);
+
+  /* Add in local overrides.  */
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = ppcnbsd_fetch_inferior_registers;
+  t->to_store_registers = ppcnbsd_store_inferior_registers;
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-nat.c ./gdb/ppcnbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcnbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,197 +0,0 @@
-/* Native-dependent code for NetBSD/powerpc.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include "ppc-tdep.h"
-#include "ppcnbsd-tdep.h"
-#include "bsd-kvm.h"
-#include "inf-ptrace.h"
-
-/* Returns true if PT_GETREGS fetches this register.  */
-
-static int
-getregs_supplies (struct gdbarch *gdbarch, int regnum)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  return ((regnum >= tdep->ppc_gp0_regnum
-           && regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
-          || regnum == tdep->ppc_lr_regnum
-          || regnum == tdep->ppc_cr_regnum
-          || regnum == tdep->ppc_xer_regnum
-          || regnum == tdep->ppc_ctr_regnum
-	  || regnum == gdbarch_pc_regnum (gdbarch));
-}
-
-/* Like above, but for PT_GETFPREGS.  */
-
-static int
-getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
-     point registers.  Traditionally, GDB's register set has still
-     listed the floating point registers for such machines, so this
-     code is harmless.  However, the new E500 port actually omits the
-     floating point registers entirely from the register set --- they
-     don't even have register numbers assigned to them.
-
-     It's not clear to me how best to update this code, so this assert
-     will alert the first person to encounter the NetBSD/E500
-     combination to the problem.  */
-  gdb_assert (ppc_floating_point_unit_p (gdbarch));
-
-  return ((regnum >= tdep->ppc_fp0_regnum
-           && regnum < tdep->ppc_fp0_regnum + ppc_num_fprs)
-	  || regnum == tdep->ppc_fpscr_regnum);
-}
-
-static void
-ppcnbsd_fetch_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
-
-      ppc_supply_gregset (&ppcnbsd_gregset, regcache,
-			  regnum, &regs, sizeof regs);
-    }
-
-  if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get FP registers"));
-
-      ppc_supply_fpregset (&ppcnbsd_fpregset, regcache,
-			   regnum, &fpregs, sizeof fpregs);
-    }
-}
-
-static void
-ppcnbsd_store_inferior_registers (struct target_ops *ops,
-				  struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-  if (regnum == -1 || getregs_supplies (gdbarch, regnum))
-    {
-      struct reg regs;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      ppc_collect_gregset (&ppcnbsd_gregset, regcache,
-			   regnum, &regs, sizeof regs);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-	perror_with_name (_("Couldn't write registers"));
-    }
-
-  if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get FP registers"));
-
-      ppc_collect_fpregset (&ppcnbsd_fpregset, regcache,
-			    regnum, &fpregs, sizeof fpregs);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't set FP registers"));
-    }
-}
-
-static int
-ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct switchframe sf;
-  struct callframe cf;
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  int i;
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
-  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
-  for (i = 0 ; i < 19 ; i++)
-    regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 13 + i,
-			 &sf.fixreg[i]);
-
-  read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf));
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 1, &cf.sp);
-
-  read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
-  regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr);
-  regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
-
-  return 1;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_ppcnbsd_nat (void);
-
-void
-_initialize_ppcnbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (ppcnbsd_supply_pcb);
-
-  /* Add in local overrides.  */
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = ppcnbsd_fetch_inferior_registers;
-  t->to_store_registers = ppcnbsd_store_inferior_registers;
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-tdep.c ./gdb/ppc-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,227 @@
+/* Target-dependent code for NetBSD/powerpc.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "trad-frame.h"
+#include "tramp-frame.h"
+
+#include "ppc-tdep.h"
+#include "ppc-nbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Register offsets from <machine/reg.h>.  */
+struct ppc_reg_offsets ppcnbsd_reg_offsets;
+
+
+/* Core file support.  */
+
+/* NetBSD/powerpc register sets.  */
+
+const struct regset ppcnbsd_gregset =
+{
+  &ppcnbsd_reg_offsets,
+  ppc_supply_gregset
+};
+
+const struct regset ppcnbsd_fpregset =
+{
+  &ppcnbsd_reg_offsets,
+  ppc_supply_fpregset
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+ppcnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				      iterate_over_regset_sections_cb *cb,
+				      void *cb_data,
+				      const struct regcache *regcache)
+{
+  cb (".reg", 148, &ppcnbsd_gregset, NULL, cb_data);
+  cb (".reg2", 264, &ppcnbsd_fpregset, NULL, cb_data);
+}
+
+
+/* NetBSD is confused.  It appears that 1.5 was using the correct SVR4
+   convention but, 1.6 switched to the below broken convention.  For
+   the moment use the broken convention.  Ulgh!  */
+
+static enum return_value_convention
+ppcnbsd_return_value (struct gdbarch *gdbarch, struct value *function,
+		      struct type *valtype, struct regcache *regcache,
+		      gdb_byte *readbuf, const gdb_byte *writebuf)
+{
+#if 0
+  if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+       || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+      && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
+	    && TYPE_VECTOR (valtype))
+      && !(TYPE_LENGTH (valtype) == 1
+	   || TYPE_LENGTH (valtype) == 2
+	   || TYPE_LENGTH (valtype) == 4
+	   || TYPE_LENGTH (valtype) == 8))
+    return RETURN_VALUE_STRUCT_CONVENTION;
+  else
+#endif
+    return ppc_sysv_abi_broken_return_value (gdbarch, function, valtype,
+					     regcache, readbuf, writebuf);
+}
+
+
+/* Signal trampolines.  */
+
+extern const struct tramp_frame ppcnbsd2_sigtramp;
+
+static void
+ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
+			     struct frame_info *this_frame,
+			     struct trad_frame_cache *this_cache,
+			     CORE_ADDR func)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  CORE_ADDR addr, base;
+  int i;
+
+  base = get_frame_register_unsigned (this_frame,
+				      gdbarch_sp_regnum (gdbarch));
+  if (self == &ppcnbsd2_sigtramp)
+    addr = base + 0x10 + 2 * tdep->wordsize;
+  else
+    addr = base + 0x18 + 2 * tdep->wordsize;
+  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
+    {
+      int regnum = i + tdep->ppc_gp0_regnum;
+      trad_frame_set_reg_addr (this_cache, regnum, addr);
+    }
+  trad_frame_set_reg_addr (this_cache, tdep->ppc_lr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (this_cache, tdep->ppc_xer_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (this_cache, gdbarch_pc_regnum (gdbarch),
+			   addr); /* SRR0?  */
+  addr += tdep->wordsize;
+
+  /* Construct the frame ID using the function start.  */
+  trad_frame_set_id (this_cache, frame_id_build (base, func));
+}
+
+static const struct tramp_frame ppcnbsd_sigtramp =
+{
+  SIGTRAMP_FRAME,
+  4,
+  {
+    { 0x3821fff0, -1 },		/* add r1,r1,-16 */
+    { 0x4e800021, -1 },		/* blrl */
+    { 0x38610018, -1 },		/* addi r3,r1,24 */
+    { 0x38000127, -1 },		/* li r0,295 */
+    { 0x44000002, -1 },		/* sc */
+    { 0x38000001, -1 },		/* li r0,1 */
+    { 0x44000002, -1 },		/* sc */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  ppcnbsd_sigtramp_cache_init
+};
+
+/* NetBSD 2.0 introduced a slightly different signal trampoline.  */
+
+const struct tramp_frame ppcnbsd2_sigtramp =
+{
+  SIGTRAMP_FRAME,
+  4,
+  {
+    { 0x3821fff0, -1 },		/* add r1,r1,-16 */
+    { 0x4e800021, -1 },		/* blrl */
+    { 0x38610010, -1 },		/* addi r3,r1,16 */
+    { 0x38000127, -1 },		/* li r0,295 */
+    { 0x44000002, -1 },		/* sc */
+    { 0x38000001, -1 },		/* li r0,1 */
+    { 0x44000002, -1 },		/* sc */
+    { TRAMP_SENTINEL_INSN, -1 }
+  },
+  ppcnbsd_sigtramp_cache_init
+};
+
+
+static void
+ppcnbsd_init_abi (struct gdbarch_info info,
+                  struct gdbarch *gdbarch)
+{
+  /* For NetBSD, this is an on again, off again thing.  Some systems
+     do use the broken struct convention, and some don't.  */
+  set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);
+
+  /* NetBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, ppcnbsd_iterate_over_regset_sections);
+
+  tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd_sigtramp);
+  tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd2_sigtramp);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_ppcnbsd_tdep (void);
+
+void
+_initialize_ppcnbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD,
+			  ppcnbsd_init_abi);
+
+  /* Avoid initializing the register offsets again if they were
+     already initialized by ppcnbsd-nat.c.  */
+  if (ppcnbsd_reg_offsets.pc_offset == 0)
+    {
+      /* General-purpose registers.  */
+      ppcnbsd_reg_offsets.r0_offset = 0;
+      ppcnbsd_reg_offsets.gpr_size = 4;
+      ppcnbsd_reg_offsets.xr_size = 4;
+      ppcnbsd_reg_offsets.lr_offset = 128;
+      ppcnbsd_reg_offsets.cr_offset = 132;
+      ppcnbsd_reg_offsets.xer_offset = 136;
+      ppcnbsd_reg_offsets.ctr_offset = 140;
+      ppcnbsd_reg_offsets.pc_offset = 144;
+      ppcnbsd_reg_offsets.ps_offset = -1;
+      ppcnbsd_reg_offsets.mq_offset = -1;
+
+      /* Floating-point registers.  */
+      ppcnbsd_reg_offsets.f0_offset = 0;
+      ppcnbsd_reg_offsets.fpscr_offset = 256;
+      ppcnbsd_reg_offsets.fpscr_size = 4;
+
+      /* AltiVec registers.  */
+      ppcnbsd_reg_offsets.vr0_offset = 0;
+      ppcnbsd_reg_offsets.vrsave_offset = 512;
+      ppcnbsd_reg_offsets.vscr_offset = 524;
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-tdep.c ./gdb/ppcnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,227 +0,0 @@
-/* Target-dependent code for NetBSD/powerpc.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "trad-frame.h"
-#include "tramp-frame.h"
-
-#include "ppc-tdep.h"
-#include "ppcnbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Register offsets from <machine/reg.h>.  */
-struct ppc_reg_offsets ppcnbsd_reg_offsets;
-
-
-/* Core file support.  */
-
-/* NetBSD/powerpc register sets.  */
-
-const struct regset ppcnbsd_gregset =
-{
-  &ppcnbsd_reg_offsets,
-  ppc_supply_gregset
-};
-
-const struct regset ppcnbsd_fpregset =
-{
-  &ppcnbsd_reg_offsets,
-  ppc_supply_fpregset
-};
-
-/* Iterate over core file register note sections.  */
-
-static void
-ppcnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				      iterate_over_regset_sections_cb *cb,
-				      void *cb_data,
-				      const struct regcache *regcache)
-{
-  cb (".reg", 148, &ppcnbsd_gregset, NULL, cb_data);
-  cb (".reg2", 264, &ppcnbsd_fpregset, NULL, cb_data);
-}
-
-
-/* NetBSD is confused.  It appears that 1.5 was using the correct SVR4
-   convention but, 1.6 switched to the below broken convention.  For
-   the moment use the broken convention.  Ulgh!  */
-
-static enum return_value_convention
-ppcnbsd_return_value (struct gdbarch *gdbarch, struct value *function,
-		      struct type *valtype, struct regcache *regcache,
-		      gdb_byte *readbuf, const gdb_byte *writebuf)
-{
-#if 0
-  if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
-       || TYPE_CODE (valtype) == TYPE_CODE_UNION)
-      && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
-	    && TYPE_VECTOR (valtype))
-      && !(TYPE_LENGTH (valtype) == 1
-	   || TYPE_LENGTH (valtype) == 2
-	   || TYPE_LENGTH (valtype) == 4
-	   || TYPE_LENGTH (valtype) == 8))
-    return RETURN_VALUE_STRUCT_CONVENTION;
-  else
-#endif
-    return ppc_sysv_abi_broken_return_value (gdbarch, function, valtype,
-					     regcache, readbuf, writebuf);
-}
-
-
-/* Signal trampolines.  */
-
-extern const struct tramp_frame ppcnbsd2_sigtramp;
-
-static void
-ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
-			     struct frame_info *this_frame,
-			     struct trad_frame_cache *this_cache,
-			     CORE_ADDR func)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  CORE_ADDR addr, base;
-  int i;
-
-  base = get_frame_register_unsigned (this_frame,
-				      gdbarch_sp_regnum (gdbarch));
-  if (self == &ppcnbsd2_sigtramp)
-    addr = base + 0x10 + 2 * tdep->wordsize;
-  else
-    addr = base + 0x18 + 2 * tdep->wordsize;
-  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
-    {
-      int regnum = i + tdep->ppc_gp0_regnum;
-      trad_frame_set_reg_addr (this_cache, regnum, addr);
-    }
-  trad_frame_set_reg_addr (this_cache, tdep->ppc_lr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (this_cache, tdep->ppc_xer_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (this_cache, gdbarch_pc_regnum (gdbarch),
-			   addr); /* SRR0?  */
-  addr += tdep->wordsize;
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (this_cache, frame_id_build (base, func));
-}
-
-static const struct tramp_frame ppcnbsd_sigtramp =
-{
-  SIGTRAMP_FRAME,
-  4,
-  {
-    { 0x3821fff0, -1 },		/* add r1,r1,-16 */
-    { 0x4e800021, -1 },		/* blrl */
-    { 0x38610018, -1 },		/* addi r3,r1,24 */
-    { 0x38000127, -1 },		/* li r0,295 */
-    { 0x44000002, -1 },		/* sc */
-    { 0x38000001, -1 },		/* li r0,1 */
-    { 0x44000002, -1 },		/* sc */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  ppcnbsd_sigtramp_cache_init
-};
-
-/* NetBSD 2.0 introduced a slightly different signal trampoline.  */
-
-const struct tramp_frame ppcnbsd2_sigtramp =
-{
-  SIGTRAMP_FRAME,
-  4,
-  {
-    { 0x3821fff0, -1 },		/* add r1,r1,-16 */
-    { 0x4e800021, -1 },		/* blrl */
-    { 0x38610010, -1 },		/* addi r3,r1,16 */
-    { 0x38000127, -1 },		/* li r0,295 */
-    { 0x44000002, -1 },		/* sc */
-    { 0x38000001, -1 },		/* li r0,1 */
-    { 0x44000002, -1 },		/* sc */
-    { TRAMP_SENTINEL_INSN, -1 }
-  },
-  ppcnbsd_sigtramp_cache_init
-};
-
-
-static void
-ppcnbsd_init_abi (struct gdbarch_info info,
-                  struct gdbarch *gdbarch)
-{
-  /* For NetBSD, this is an on again, off again thing.  Some systems
-     do use the broken struct convention, and some don't.  */
-  set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);
-
-  /* NetBSD uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, ppcnbsd_iterate_over_regset_sections);
-
-  tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd_sigtramp);
-  tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd2_sigtramp);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_ppcnbsd_tdep (void);
-
-void
-_initialize_ppcnbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD_ELF,
-			  ppcnbsd_init_abi);
-
-  /* Avoid initializing the register offsets again if they were
-     already initailized by ppcnbsd-nat.c.  */
-  if (ppcnbsd_reg_offsets.pc_offset == 0)
-    {
-      /* General-purpose registers.  */
-      ppcnbsd_reg_offsets.r0_offset = 0;
-      ppcnbsd_reg_offsets.gpr_size = 4;
-      ppcnbsd_reg_offsets.xr_size = 4;
-      ppcnbsd_reg_offsets.lr_offset = 128;
-      ppcnbsd_reg_offsets.cr_offset = 132;
-      ppcnbsd_reg_offsets.xer_offset = 136;
-      ppcnbsd_reg_offsets.ctr_offset = 140;
-      ppcnbsd_reg_offsets.pc_offset = 144;
-      ppcnbsd_reg_offsets.ps_offset = -1;
-      ppcnbsd_reg_offsets.mq_offset = -1;
-
-      /* Floating-point registers.  */
-      ppcnbsd_reg_offsets.f0_offset = 0;
-      ppcnbsd_reg_offsets.fpscr_offset = 256;
-      ppcnbsd_reg_offsets.fpscr_size = 4;
-
-      /* AltiVec registers.  */
-      ppcnbsd_reg_offsets.vr0_offset = 0;
-      ppcnbsd_reg_offsets.vrsave_offset = 512;
-      ppcnbsd_reg_offsets.vscr_offset = 524;
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-tdep.h ./gdb/ppc-nbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-nbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-nbsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+/* Target-dependent code for NetBSD/powerpc.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef PPC_NBSD_TDEP_H
+#define PPC_NBSD_TDEP_H
+
+struct regset;
+
+/* Register offsets for NetBSD/powerpc.  */
+extern struct ppc_reg_offsets ppcnbsd_reg_offsets;
+
+/* Register sets for NetBSD/powerpc.  */
+extern const struct regset ppcnbsd_gregset;
+extern const struct regset ppcnbsd_fpregset;
+
+#endif /* ppc-nbsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-tdep.h ./gdb/ppcnbsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcnbsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcnbsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-/* Target-dependent code for NetBSD/powerpc.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef PPCNBSD_TDEP_H
-#define PPCNBSD_TDEP_H
-
-struct regset;
-
-/* Register offsets for NetBSD/powerpc.  */
-extern struct ppc_reg_offsets ppcnbsd_reg_offsets;
-
-/* Register sets for NetBSD/powerpc.  */
-extern const struct regset ppcnbsd_gregset;
-extern const struct regset ppcnbsd_fpregset;
-
-#endif /* ppcnbsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-nat.c ./gdb/ppc-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,231 @@
+/* Native-dependent code for OpenBSD/powerpc.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/signal.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+#include <machine/reg.h>
+
+#include "ppc-tdep.h"
+#include "ppc-obsd-tdep.h"
+#include "inf-ptrace.h"
+#include "obsd-nat.h"
+#include "bsd-kvm.h"
+
+/* OpenBSD/powerpc didn't have PT_GETFPREGS/PT_SETFPREGS until release
+   4.0.  On older releases the floating-point registers are handled by
+   PT_GETREGS/PT_SETREGS, but fpscr wasn't available..  */
+
+#ifdef PT_GETFPREGS
+
+/* Returns true if PT_GETFPREGS fetches this register.  */
+
+static int
+getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+     point registers.  Traditionally, GDB's register set has still
+     listed the floating point registers for such machines, so this
+     code is harmless.  However, the new E500 port actually omits the
+     floating point registers entirely from the register set --- they
+     don't even have register numbers assigned to them.
+
+     It's not clear to me how best to update this code, so this assert
+     will alert the first person to encounter the NetBSD/E500
+     combination to the problem.  */
+  gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
+  return ((regnum >= tdep->ppc_fp0_regnum
+           && regnum < tdep->ppc_fp0_regnum + ppc_num_fprs)
+	  || regnum == tdep->ppc_fpscr_regnum);
+}
+
+#endif /* PT_GETFPREGS */
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers.  */
+
+static void
+ppcobsd_fetch_registers (struct target_ops *ops,
+			 struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  ppc_supply_gregset (&ppcobsd_gregset, regcache, -1,
+		      &regs, sizeof regs);
+#ifndef PT_GETFPREGS
+  ppc_supply_fpregset (&ppcobsd_gregset, regcache, -1,
+		       &regs, sizeof regs);
+#endif
+
+#ifdef PT_GETFPREGS
+  if (regnum == -1
+      || getfpregs_supplies (get_regcache_arch (regcache), regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      ppc_supply_fpregset (&ppcobsd_fpregset, regcache, -1,
+			   &fpregs, sizeof fpregs);
+    }
+#endif
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers.  */
+
+static void
+ppcobsd_store_registers (struct target_ops *ops,
+			 struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  ppc_collect_gregset (&ppcobsd_gregset, regcache,
+		       regnum, &regs, sizeof regs);
+#ifndef PT_GETFPREGS
+  ppc_collect_fpregset (&ppcobsd_gregset, regcache,
+			regnum, &regs, sizeof regs);
+#endif
+
+  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't write registers"));
+
+#ifdef PT_GETFPREGS
+  if (regnum == -1
+      || getfpregs_supplies (get_regcache_arch (regcache), regnum))
+    {
+      struct fpreg fpregs;
+
+      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't get floating point status"));
+
+      ppc_collect_fpregset (&ppcobsd_fpregset, regcache,
+			    regnum, &fpregs, sizeof fpregs);
+
+      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+	perror_with_name (_("Couldn't write floating point status"));
+    }
+#endif
+}
+
+
+static int
+ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  struct switchframe sf;
+  struct callframe cf;
+  int i, regnum;
+
+  /* The following is true for OpenBSD 3.7:
+
+     The pcb contains %r1 (the stack pointer) at the point of the
+     context switch in cpu_switch().  At that point we have a stack
+     frame as described by `struct switchframe', and below that a call
+     frame as described by `struct callframe'.  From this information
+     we reconstruct the register state as it would look when we are in
+     cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
+  regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &sf.sp);
+  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+  for (i = 0, regnum = tdep->ppc_gp0_regnum + 13; i < 19; i++, regnum++)
+    regcache_raw_supply (regcache, regnum, &sf.fixreg[i]);
+
+  read_memory (sf.sp, (gdb_byte *)&cf, sizeof cf);
+  regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
+  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_ppcobsd_nat (void);
+
+void
+_initialize_ppcobsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add in local overrides.  */
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = ppcobsd_fetch_registers;
+  t->to_store_registers = ppcobsd_store_registers;
+  obsd_add_target (t);
+
+  /* General-purpose registers.  */
+  ppcobsd_reg_offsets.r0_offset = offsetof (struct reg, gpr);
+  ppcobsd_reg_offsets.gpr_size = 4;
+  ppcobsd_reg_offsets.xr_size = 4;
+  ppcobsd_reg_offsets.pc_offset = offsetof (struct reg, pc);
+  ppcobsd_reg_offsets.ps_offset = offsetof (struct reg, ps);
+  ppcobsd_reg_offsets.cr_offset = offsetof (struct reg, cnd);
+  ppcobsd_reg_offsets.lr_offset = offsetof (struct reg, lr);
+  ppcobsd_reg_offsets.ctr_offset = offsetof (struct reg, cnt);
+  ppcobsd_reg_offsets.xer_offset = offsetof (struct reg, xer);
+  ppcobsd_reg_offsets.mq_offset = offsetof (struct reg, mq);
+
+  /* Floating-point registers.  */
+  ppcobsd_reg_offsets.f0_offset = offsetof (struct reg, fpr);
+  ppcobsd_reg_offsets.fpscr_offset = -1;
+#ifdef PT_GETFPREGS
+  ppcobsd_fpreg_offsets.f0_offset = offsetof (struct fpreg, fpr);
+  ppcobsd_fpreg_offsets.fpscr_offset = offsetof (struct fpreg, fpscr);
+  ppcobsd_fpreg_offsets.fpscr_size = 4;
+#endif
+
+  /* AltiVec registers.  */
+  ppcobsd_reg_offsets.vr0_offset = offsetof (struct vreg, vreg);
+  ppcobsd_reg_offsets.vscr_offset = offsetof (struct vreg, vscr);
+  ppcobsd_reg_offsets.vrsave_offset = offsetof (struct vreg, vrsave);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (ppcobsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-nat.c ./gdb/ppcobsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcobsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,231 +0,0 @@
-/* Native-dependent code for OpenBSD/powerpc.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/signal.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-#include <machine/reg.h>
-
-#include "ppc-tdep.h"
-#include "ppcobsd-tdep.h"
-#include "inf-ptrace.h"
-#include "obsd-nat.h"
-#include "bsd-kvm.h"
-
-/* OpenBSD/powerpc didn't have PT_GETFPREGS/PT_SETFPREGS until release
-   4.0.  On older releases the floating-point registers are handled by
-   PT_GETREGS/PT_SETREGS, but fpscr wasn't available..  */
-
-#ifdef PT_GETFPREGS
-
-/* Returns true if PT_GETFPREGS fetches this register.  */
-
-static int
-getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
-     point registers.  Traditionally, GDB's register set has still
-     listed the floating point registers for such machines, so this
-     code is harmless.  However, the new E500 port actually omits the
-     floating point registers entirely from the register set --- they
-     don't even have register numbers assigned to them.
-
-     It's not clear to me how best to update this code, so this assert
-     will alert the first person to encounter the NetBSD/E500
-     combination to the problem.  */
-  gdb_assert (ppc_floating_point_unit_p (gdbarch));
-
-  return ((regnum >= tdep->ppc_fp0_regnum
-           && regnum < tdep->ppc_fp0_regnum + ppc_num_fprs)
-	  || regnum == tdep->ppc_fpscr_regnum);
-}
-
-#endif /* PT_GETFPREGS */
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers.  */
-
-static void
-ppcobsd_fetch_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  ppc_supply_gregset (&ppcobsd_gregset, regcache, -1,
-		      &regs, sizeof regs);
-#ifndef PT_GETFPREGS
-  ppc_supply_fpregset (&ppcobsd_gregset, regcache, -1,
-		       &regs, sizeof regs);
-#endif
-
-#ifdef PT_GETFPREGS
-  if (regnum == -1
-      || getfpregs_supplies (get_regcache_arch (regcache), regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      ppc_supply_fpregset (&ppcobsd_fpregset, regcache, -1,
-			   &fpregs, sizeof fpregs);
-    }
-#endif
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers.  */
-
-static void
-ppcobsd_store_registers (struct target_ops *ops,
-			 struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  ppc_collect_gregset (&ppcobsd_gregset, regcache,
-		       regnum, &regs, sizeof regs);
-#ifndef PT_GETFPREGS
-  ppc_collect_fpregset (&ppcobsd_gregset, regcache,
-			regnum, &regs, sizeof regs);
-#endif
-
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't write registers"));
-
-#ifdef PT_GETFPREGS
-  if (regnum == -1
-      || getfpregs_supplies (get_regcache_arch (regcache), regnum))
-    {
-      struct fpreg fpregs;
-
-      if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't get floating point status"));
-
-      ppc_collect_fpregset (&ppcobsd_fpregset, regcache,
-			    regnum, &fpregs, sizeof fpregs);
-
-      if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-	perror_with_name (_("Couldn't write floating point status"));
-    }
-#endif
-}
-
-
-static int
-ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  struct switchframe sf;
-  struct callframe cf;
-  int i, regnum;
-
-  /* The following is true for OpenBSD 3.7:
-
-     The pcb contains %r1 (the stack pointer) at the point of the
-     context switch in cpu_switch().  At that point we have a stack
-     frame as described by `struct switchframe', and below that a call
-     frame as described by `struct callframe'.  From this information
-     we reconstruct the register state as it would look when we are in
-     cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
-  regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &sf.sp);
-  regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
-  for (i = 0, regnum = tdep->ppc_gp0_regnum + 13; i < 19; i++, regnum++)
-    regcache_raw_supply (regcache, regnum, &sf.fixreg[i]);
-
-  read_memory (sf.sp, (gdb_byte *)&cf, sizeof cf);
-  regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
-  regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_ppcobsd_nat (void);
-
-void
-_initialize_ppcobsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add in local overrides.  */
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = ppcobsd_fetch_registers;
-  t->to_store_registers = ppcobsd_store_registers;
-  obsd_add_target (t);
-
-  /* General-purpose registers.  */
-  ppcobsd_reg_offsets.r0_offset = offsetof (struct reg, gpr);
-  ppcobsd_reg_offsets.gpr_size = 4;
-  ppcobsd_reg_offsets.xr_size = 4;
-  ppcobsd_reg_offsets.pc_offset = offsetof (struct reg, pc);
-  ppcobsd_reg_offsets.ps_offset = offsetof (struct reg, ps);
-  ppcobsd_reg_offsets.cr_offset = offsetof (struct reg, cnd);
-  ppcobsd_reg_offsets.lr_offset = offsetof (struct reg, lr);
-  ppcobsd_reg_offsets.ctr_offset = offsetof (struct reg, cnt);
-  ppcobsd_reg_offsets.xer_offset = offsetof (struct reg, xer);
-  ppcobsd_reg_offsets.mq_offset = offsetof (struct reg, mq);
-
-  /* Floating-point registers.  */
-  ppcobsd_reg_offsets.f0_offset = offsetof (struct reg, fpr);
-  ppcobsd_reg_offsets.fpscr_offset = -1;
-#ifdef PT_GETFPREGS
-  ppcobsd_fpreg_offsets.f0_offset = offsetof (struct fpreg, fpr);
-  ppcobsd_fpreg_offsets.fpscr_offset = offsetof (struct fpreg, fpscr);
-  ppcobsd_fpreg_offsets.fpscr_size = 4;
-#endif
-
-  /* AltiVec registers.  */
-  ppcobsd_reg_offsets.vr0_offset = offsetof (struct vreg, vreg);
-  ppcobsd_reg_offsets.vscr_offset = offsetof (struct vreg, vscr);
-  ppcobsd_reg_offsets.vrsave_offset = offsetof (struct vreg, vrsave);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (ppcobsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-tdep.c ./gdb/ppc-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,309 @@
+/* Target-dependent code for OpenBSD/powerpc.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "trad-frame.h"
+
+#include "ppc-tdep.h"
+#include "ppc-obsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Register offsets from <machine/reg.h>.  */
+struct ppc_reg_offsets ppcobsd_reg_offsets;
+struct ppc_reg_offsets ppcobsd_fpreg_offsets;
+
+
+/* Core file support.  */
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+   from the buffer specified by GREGS and LEN to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+void
+ppcobsd_supply_gregset (const struct regset *regset,
+			struct regcache *regcache, int regnum,
+			const void *gregs, size_t len)
+{
+  ppc_supply_gregset (regset, regcache, regnum, gregs, len);
+  ppc_supply_fpregset (regset, regcache, regnum, gregs, len);
+}
+
+/* Collect register REGNUM in the general-purpose register set
+   REGSET, from register cache REGCACHE into the buffer specified by
+   GREGS and LEN.  If REGNUM is -1, do this for all registers in
+   REGSET.  */
+
+void
+ppcobsd_collect_gregset (const struct regset *regset,
+			 const struct regcache *regcache, int regnum,
+			 void *gregs, size_t len)
+{
+  ppc_collect_gregset (regset, regcache, regnum, gregs, len);
+  ppc_collect_fpregset (regset, regcache, regnum, gregs, len);
+}
+
+/* OpenBSD/powerpc register set.  */
+
+const struct regset ppcobsd_gregset =
+{
+  &ppcobsd_reg_offsets,
+  ppcobsd_supply_gregset
+};
+
+const struct regset ppcobsd_fpregset =
+{
+  &ppcobsd_fpreg_offsets,
+  ppc_supply_fpregset
+};
+
+/* Iterate over core file register note sections.  */
+
+static void
+ppcobsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+				      iterate_over_regset_sections_cb *cb,
+				      void *cb_data,
+				      const struct regcache *regcache)
+{
+  cb (".reg", 412, &ppcobsd_gregset, NULL, cb_data);
+}
+
+
+/* Signal trampolines.  */
+
+/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
+   in virtual memory.  The randomness makes it somewhat tricky to
+   detect it, but fortunately we can rely on the fact that the start
+   of the sigtramp routine is page-aligned.  We recognize the
+   trampoline by looking for the code that invokes the sigreturn
+   system call.  The offset where we can find that code varies from
+   release to release.
+
+   By the way, the mapping mentioned above is read-only, so you cannot
+   place a breakpoint in the signal trampoline.  */
+
+/* Default page size.  */
+static const int ppcobsd_page_size = 4096;
+
+/* Offset for sigreturn(2).  */
+static const int ppcobsd_sigreturn_offset[] = {
+  0x98,				/* OpenBSD 3.8 */
+  0x0c,				/* OpenBSD 3.2 */
+  -1
+};
+
+static int
+ppcobsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				struct frame_info *this_frame,
+				void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  CORE_ADDR start_pc = (pc & ~(ppcobsd_page_size - 1));
+  const int *offset;
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (name)
+    return 0;
+
+  for (offset = ppcobsd_sigreturn_offset; *offset != -1; offset++)
+    {
+      gdb_byte buf[2 * PPC_INSN_SIZE];
+      unsigned long insn;
+
+      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
+				     buf, sizeof buf))
+	continue;
+
+      /* Check for "li r0,SYS_sigreturn".  */
+      insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
+      if (insn != 0x38000067)
+	continue;
+
+      /* Check for "sc".  */
+      insn = extract_unsigned_integer (buf + PPC_INSN_SIZE,
+				       PPC_INSN_SIZE, byte_order);
+      if (insn != 0x44000002)
+	continue;
+
+      return 1;
+    }
+
+  return 0;
+}
+
+static struct trad_frame_cache *
+ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  struct trad_frame_cache *cache;
+  CORE_ADDR addr, base, func;
+  gdb_byte buf[PPC_INSN_SIZE];
+  unsigned long insn, sigcontext_offset;
+  int i;
+
+  if (*this_cache)
+    return (struct trad_frame_cache *) *this_cache;
+
+  cache = trad_frame_cache_zalloc (this_frame);
+  *this_cache = cache;
+
+  func = get_frame_pc (this_frame);
+  func &= ~(ppcobsd_page_size - 1);
+  if (!safe_frame_unwind_memory (this_frame, func, buf, sizeof buf))
+    return cache;
+
+  /* Calculate the offset where we can find `struct sigcontext'.  We
+     base our calculation on the amount of stack space reserved by the
+     first instruction of the signal trampoline.  */
+  insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
+  sigcontext_offset = (0x10000 - (insn & 0x0000ffff)) + 8;
+
+  base = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch));
+  addr = base + sigcontext_offset + 2 * tdep->wordsize;
+  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
+    {
+      int regnum = i + tdep->ppc_gp0_regnum;
+      trad_frame_set_reg_addr (cache, regnum, addr);
+    }
+  trad_frame_set_reg_addr (cache, tdep->ppc_lr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_cr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_xer_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, tdep->ppc_ctr_regnum, addr);
+  addr += tdep->wordsize;
+  trad_frame_set_reg_addr (cache, gdbarch_pc_regnum (gdbarch), addr);
+  /* SRR0?  */
+  addr += tdep->wordsize;
+
+  /* Construct the frame ID using the function start.  */
+  trad_frame_set_id (cache, frame_id_build (base, func));
+
+  return cache;
+}
+
+static void
+ppcobsd_sigtramp_frame_this_id (struct frame_info *this_frame,
+				void **this_cache, struct frame_id *this_id)
+{
+  struct trad_frame_cache *cache =
+    ppcobsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  trad_frame_get_id (cache, this_id);
+}
+
+static struct value *
+ppcobsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
+				      void **this_cache, int regnum)
+{
+  struct trad_frame_cache *cache =
+    ppcobsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_register (cache, this_frame, regnum);
+}
+
+static const struct frame_unwind ppcobsd_sigtramp_frame_unwind = {
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  ppcobsd_sigtramp_frame_this_id,
+  ppcobsd_sigtramp_frame_prev_register,
+  NULL,
+  ppcobsd_sigtramp_frame_sniffer
+};
+
+
+static void
+ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* OpenBSD doesn't support the 128-bit `long double' from the psABI.  */
+  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
+
+  /* OpenBSD currently uses a broken GCC.  */
+  set_gdbarch_return_value (gdbarch, ppc_sysv_abi_broken_return_value);
+
+  /* OpenBSD uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, ppcobsd_iterate_over_regset_sections);
+
+  frame_unwind_append_unwinder (gdbarch, &ppcobsd_sigtramp_frame_unwind);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_ppcobsd_tdep (void);
+
+void
+_initialize_ppcobsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_OPENBSD,
+			  ppcobsd_init_abi);
+  gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_OPENBSD,
+			  ppcobsd_init_abi);
+
+  /* Avoid initializing the register offsets again if they were
+     already initialized by ppcobsd-nat.c.  */
+  if (ppcobsd_reg_offsets.pc_offset == 0)
+    {
+      /* General-purpose registers.  */
+      ppcobsd_reg_offsets.r0_offset = 0;
+      ppcobsd_reg_offsets.gpr_size = 4;
+      ppcobsd_reg_offsets.xr_size = 4;
+      ppcobsd_reg_offsets.pc_offset = 384;
+      ppcobsd_reg_offsets.ps_offset = 388;
+      ppcobsd_reg_offsets.cr_offset = 392;
+      ppcobsd_reg_offsets.lr_offset = 396;
+      ppcobsd_reg_offsets.ctr_offset = 400;
+      ppcobsd_reg_offsets.xer_offset = 404;
+      ppcobsd_reg_offsets.mq_offset = 408;
+
+      /* Floating-point registers.  */
+      ppcobsd_reg_offsets.f0_offset = 128;
+      ppcobsd_reg_offsets.fpscr_offset = -1;
+
+      /* AltiVec registers.  */
+      ppcobsd_reg_offsets.vr0_offset = 0;
+      ppcobsd_reg_offsets.vscr_offset = 512;
+      ppcobsd_reg_offsets.vrsave_offset = 520;
+    }
+
+  if (ppcobsd_fpreg_offsets.fpscr_offset == 0)
+    {
+      /* Floating-point registers.  */
+      ppcobsd_reg_offsets.f0_offset = 0;
+      ppcobsd_reg_offsets.fpscr_offset = 256;
+      ppcobsd_reg_offsets.fpscr_size = 4;
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-tdep.c ./gdb/ppcobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,327 +0,0 @@
-/* Target-dependent code for OpenBSD/powerpc.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "symtab.h"
-#include "trad-frame.h"
-
-#include "ppc-tdep.h"
-#include "ppcobsd-tdep.h"
-#include "solib-svr4.h"
-
-/* Register offsets from <machine/reg.h>.  */
-struct ppc_reg_offsets ppcobsd_reg_offsets;
-struct ppc_reg_offsets ppcobsd_fpreg_offsets;
-
-
-/* Core file support.  */
-
-/* Supply register REGNUM in the general-purpose register set REGSET
-   from the buffer specified by GREGS and LEN to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-void
-ppcobsd_supply_gregset (const struct regset *regset,
-			struct regcache *regcache, int regnum,
-			const void *gregs, size_t len)
-{
-  ppc_supply_gregset (regset, regcache, regnum, gregs, len);
-  ppc_supply_fpregset (regset, regcache, regnum, gregs, len);
-}
-
-/* Collect register REGNUM in the general-purpose register set
-   REGSET, from register cache REGCACHE into the buffer specified by
-   GREGS and LEN.  If REGNUM is -1, do this for all registers in
-   REGSET.  */
-
-void
-ppcobsd_collect_gregset (const struct regset *regset,
-			 const struct regcache *regcache, int regnum,
-			 void *gregs, size_t len)
-{
-  ppc_collect_gregset (regset, regcache, regnum, gregs, len);
-  ppc_collect_fpregset (regset, regcache, regnum, gregs, len);
-}
-
-/* OpenBSD/powerpc register set.  */
-
-const struct regset ppcobsd_gregset =
-{
-  &ppcobsd_reg_offsets,
-  ppcobsd_supply_gregset
-};
-
-const struct regset ppcobsd_fpregset =
-{
-  &ppcobsd_fpreg_offsets,
-  ppc_supply_fpregset
-};
-
-/* Iterate over core file register note sections.  */
-
-static void
-ppcobsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
-				      iterate_over_regset_sections_cb *cb,
-				      void *cb_data,
-				      const struct regcache *regcache)
-{
-  cb (".reg", 412, &ppcobsd_gregset, NULL, cb_data);
-}
-
-
-/* Signal trampolines.  */
-
-/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
-   in virtual memory.  The randomness makes it somewhat tricky to
-   detect it, but fortunately we can rely on the fact that the start
-   of the sigtramp routine is page-aligned.  We recognize the
-   trampoline by looking for the code that invokes the sigreturn
-   system call.  The offset where we can find that code varies from
-   release to release.
-
-   By the way, the mapping mentioned above is read-only, so you cannot
-   place a breakpoint in the signal trampoline.  */
-
-/* Default page size.  */
-static const int ppcobsd_page_size = 4096;
-
-/* Offset for sigreturn(2).  */
-static const int ppcobsd_sigreturn_offset[] = {
-  0x98,				/* OpenBSD 3.8 */
-  0x0c,				/* OpenBSD 3.2 */
-  -1
-};
-
-static int
-ppcobsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				struct frame_info *this_frame,
-				void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  CORE_ADDR start_pc = (pc & ~(ppcobsd_page_size - 1));
-  const int *offset;
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (name)
-    return 0;
-
-  for (offset = ppcobsd_sigreturn_offset; *offset != -1; offset++)
-    {
-      gdb_byte buf[2 * PPC_INSN_SIZE];
-      unsigned long insn;
-
-      if (!safe_frame_unwind_memory (this_frame, start_pc + *offset,
-				     buf, sizeof buf))
-	continue;
-
-      /* Check for "li r0,SYS_sigreturn".  */
-      insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
-      if (insn != 0x38000067)
-	continue;
-
-      /* Check for "sc".  */
-      insn = extract_unsigned_integer (buf + PPC_INSN_SIZE,
-				       PPC_INSN_SIZE, byte_order);
-      if (insn != 0x44000002)
-	continue;
-
-      return 1;
-    }
-
-  return 0;
-}
-
-static struct trad_frame_cache *
-ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct trad_frame_cache *cache;
-  CORE_ADDR addr, base, func;
-  gdb_byte buf[PPC_INSN_SIZE];
-  unsigned long insn, sigcontext_offset;
-  int i;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-  *this_cache = cache;
-
-  func = get_frame_pc (this_frame);
-  func &= ~(ppcobsd_page_size - 1);
-  if (!safe_frame_unwind_memory (this_frame, func, buf, sizeof buf))
-    return cache;
-
-  /* Calculate the offset where we can find `struct sigcontext'.  We
-     base our calculation on the amount of stack space reserved by the
-     first instruction of the signal trampoline.  */
-  insn = extract_unsigned_integer (buf, PPC_INSN_SIZE, byte_order);
-  sigcontext_offset = (0x10000 - (insn & 0x0000ffff)) + 8;
-
-  base = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch));
-  addr = base + sigcontext_offset + 2 * tdep->wordsize;
-  for (i = 0; i < ppc_num_gprs; i++, addr += tdep->wordsize)
-    {
-      int regnum = i + tdep->ppc_gp0_regnum;
-      trad_frame_set_reg_addr (cache, regnum, addr);
-    }
-  trad_frame_set_reg_addr (cache, tdep->ppc_lr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_cr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_xer_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, tdep->ppc_ctr_regnum, addr);
-  addr += tdep->wordsize;
-  trad_frame_set_reg_addr (cache, gdbarch_pc_regnum (gdbarch), addr);
-  /* SRR0?  */
-  addr += tdep->wordsize;
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (cache, frame_id_build (base, func));
-
-  return cache;
-}
-
-static void
-ppcobsd_sigtramp_frame_this_id (struct frame_info *this_frame,
-				void **this_cache, struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    ppcobsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-ppcobsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
-				      void **this_cache, int regnum)
-{
-  struct trad_frame_cache *cache =
-    ppcobsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static const struct frame_unwind ppcobsd_sigtramp_frame_unwind = {
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  ppcobsd_sigtramp_frame_this_id,
-  ppcobsd_sigtramp_frame_prev_register,
-  NULL,
-  ppcobsd_sigtramp_frame_sniffer
-};
-
-
-static void
-ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* OpenBSD doesn't support the 128-bit `long double' from the psABI.  */
-  set_gdbarch_long_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
-
-  /* OpenBSD currently uses a broken GCC.  */
-  set_gdbarch_return_value (gdbarch, ppc_sysv_abi_broken_return_value);
-
-  /* OpenBSD uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, ppcobsd_iterate_over_regset_sections);
-
-  frame_unwind_append_unwinder (gdbarch, &ppcobsd_sigtramp_frame_unwind);
-}
-
-
-/* OpenBSD uses uses the traditional NetBSD core file format, even for
-   ports that use ELF.  */
-#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
-
-static enum gdb_osabi
-ppcobsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_CORE;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_ppcobsd_tdep (void);
-
-void
-_initialize_ppcobsd_tdep (void)
-{
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_powerpc, bfd_target_unknown_flavour,
-                                  ppcobsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_OPENBSD_ELF,
-			  ppcobsd_init_abi);
-  gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_OPENBSD_ELF,
-			  ppcobsd_init_abi);
-
-  /* Avoid initializing the register offsets again if they were
-     already initailized by ppcobsd-nat.c.  */
-  if (ppcobsd_reg_offsets.pc_offset == 0)
-    {
-      /* General-purpose registers.  */
-      ppcobsd_reg_offsets.r0_offset = 0;
-      ppcobsd_reg_offsets.gpr_size = 4;
-      ppcobsd_reg_offsets.xr_size = 4;
-      ppcobsd_reg_offsets.pc_offset = 384;
-      ppcobsd_reg_offsets.ps_offset = 388;
-      ppcobsd_reg_offsets.cr_offset = 392;
-      ppcobsd_reg_offsets.lr_offset = 396;
-      ppcobsd_reg_offsets.ctr_offset = 400;
-      ppcobsd_reg_offsets.xer_offset = 404;
-      ppcobsd_reg_offsets.mq_offset = 408;
-
-      /* Floating-point registers.  */
-      ppcobsd_reg_offsets.f0_offset = 128;
-      ppcobsd_reg_offsets.fpscr_offset = -1;
-
-      /* AltiVec registers.  */
-      ppcobsd_reg_offsets.vr0_offset = 0;
-      ppcobsd_reg_offsets.vscr_offset = 512;
-      ppcobsd_reg_offsets.vrsave_offset = 520;
-    }
-
-  if (ppcobsd_fpreg_offsets.fpscr_offset == 0)
-    {
-      /* Floating-point registers.  */
-      ppcobsd_reg_offsets.f0_offset = 0;
-      ppcobsd_reg_offsets.fpscr_offset = 256;
-      ppcobsd_reg_offsets.fpscr_size = 4;
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-tdep.h ./gdb/ppc-obsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-obsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ppc-obsd-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,52 @@
+/* Target-dependent code for OpenBSD/powerpc.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef PPC_OBSD_TDEP_H
+#define PPC_OBSD_TDEP_H
+
+struct regset;
+struct regcache;
+
+/* Register offsets for OpenBSD/powerpc.  */
+extern struct ppc_reg_offsets ppcobsd_reg_offsets;
+extern struct ppc_reg_offsets ppcobsd_fpreg_offsets;
+
+/* Register sets for OpenBSD/powerpc.  */
+extern const struct regset ppcobsd_gregset;
+extern const struct regset ppcobsd_fpregset;
+
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+   from the buffer specified by GREGS and LEN to register cache
+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
+
+extern void ppcobsd_supply_gregset (const struct regset *regset,
+				    struct regcache *regcache, int regnum,
+				    const void *gregs, size_t len);
+
+/* Collect register REGNUM in the general-purpose register set
+   REGSET, from register cache REGCACHE into the buffer specified by
+   GREGS and LEN.  If REGNUM is -1, do this for all registers in
+   REGSET.  */
+
+extern void ppcobsd_collect_gregset (const struct regset *regset,
+				     const struct regcache *regcache,
+				     int regnum, void *gregs, size_t len);
+
+#endif /* ppc-obsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-tdep.h ./gdb/ppcobsd-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppcobsd-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppcobsd-tdep.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,52 +0,0 @@
-/* Target-dependent code for OpenBSD/powerpc.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef PPCOBSD_TDEP_H
-#define PPCOBSD_TDEP_H
-
-struct regset;
-struct regcache;
-
-/* Register offsets for OpenBSD/powerpc.  */
-extern struct ppc_reg_offsets ppcobsd_reg_offsets;
-extern struct ppc_reg_offsets ppcobsd_fpreg_offsets;
-
-/* Register sets for OpenBSD/powerpc.  */
-extern const struct regset ppcobsd_gregset;
-extern const struct regset ppcobsd_fpregset;
-
-
-/* Supply register REGNUM in the general-purpose register set REGSET
-   from the buffer specified by GREGS and LEN to register cache
-   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-
-extern void ppcobsd_supply_gregset (const struct regset *regset,
-				    struct regcache *regcache, int regnum,
-				    const void *gregs, size_t len);
-
-/* Collect register REGNUM in the general-purpose register set
-   REGSET, from register cache REGCACHE into the buffer specified by
-   GREGS and LEN.  If REGNUM is -1, do this for all registers in
-   REGSET.  */
-
-extern void ppcobsd_collect_gregset (const struct regset *regset,
-				     const struct regcache *regcache,
-				     int regnum, void *gregs, size_t len);
-
-#endif /* ppcobsd-tdep.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-ravenscar-thread.c ./gdb/ppc-ravenscar-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-ravenscar-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-ravenscar-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ravenscar PowerPC target support.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -123,7 +123,7 @@ supply_register_at_address (struct regca
   int buf_size = register_size (gdbarch, regnum);
   gdb_byte *buf;
 
-  buf = alloca (buf_size);
+  buf = (gdb_byte *) alloca (buf_size);
   read_memory (register_addr, buf, buf_size);
   regcache_raw_supply (regcache, regnum, buf);
 }
@@ -148,7 +148,6 @@ ppc_ravenscar_generic_fetch_registers
    struct regcache *regcache, int regnum)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const int sp_regnum = gdbarch_sp_regnum (gdbarch);
   const int num_regs = gdbarch_num_regs (gdbarch);
   int current_regnum;
   CORE_ADDR current_address;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-ravenscar-thread.h ./gdb/ppc-ravenscar-thread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-ravenscar-thread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-ravenscar-thread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ravenscar PowerPC target support.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-sysv-tdep.c ./gdb/ppc-sysv-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-sysv-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-sysv-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for PowerPC systems using the SVR4 ABI
    for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "objfiles.h"
 #include "infcall.h"
 #include "dwarf2.h"
+#include <algorithm>
 
 
 /* Check whether FTPYE is a (pointer to) function type that should use
@@ -608,7 +609,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
 }
 
 /* Handle the return-value conventions for Decimal Floating Point values.  */
-static int
+static enum return_value_convention
 get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
 				struct regcache *regcache, gdb_byte *readbuf,
 				const gdb_byte *writebuf)
@@ -1189,7 +1190,7 @@ ppc64_aggregate_candidate (struct type *
 	      if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
 		count += sub_count;
 	      else
-		count = max (count, sub_count);
+		count = std::max (count, sub_count);
 	    }
 
 	  /* There must be no padding.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-tdep.h ./gdb/ppc-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ppc-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ppc-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -76,7 +76,7 @@ int ppc_altivec_support_p (struct gdbarc
 /* Return non-zero if the architecture described by GDBARCH has
    VSX registers (vsr0 --- vsr63).  */
 int vsx_support_p (struct gdbarch *gdbarch);
-int ppc_deal_with_atomic_sequence (struct frame_info *frame);
+VEC (CORE_ADDR) *ppc_deal_with_atomic_sequence (struct regcache *regcache);
 
 
 /* Register set description.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/printcmd.c ./gdb/printcmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/printcmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/printcmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Print values for GNU debugger GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,6 +45,7 @@
 #include "charset.h"
 #include "arch-utils.h"
 #include "cli/cli-utils.h"
+#include "cli/cli-script.h"
 #include "format.h"
 #include "source.h"
 
@@ -119,7 +120,7 @@ struct display
     char *exp_string;
 
     /* Expression to be evaluated and displayed.  */
-    struct expression *exp;
+    expression_up exp;
 
     /* Item number of this auto-display item.  */
     int number;
@@ -186,8 +187,13 @@ decode_format (const char **string_ptr, 
   val.count = 1;
   val.raw = 0;
 
+  if (*p == '-')
+    {
+      val.count = -1;
+      p++;
+    }
   if (*p >= '0' && *p <= '9')
-    val.count = atoi (p);
+    val.count *= atoi (p);
   while (*p >= '0' && *p <= '9')
     p++;
 
@@ -317,7 +323,6 @@ print_formatted (struct value *val, int 
     /* User specified format, so don't look to the type to tell us
        what to do.  */
     val_print_scalar_formatted (type,
-				value_contents_for_printing (val),
 				value_embedded_offset (val),
 				val,
 				options, size, stream);
@@ -346,7 +351,7 @@ float_type_from_length (struct type *typ
    supported at this level.  */
 
 void
-print_scalar_formatted (const void *valaddr, struct type *type,
+print_scalar_formatted (const gdb_byte *valaddr, struct type *type,
 			const struct value_print_options *options,
 			int size, struct ui_file *stream)
 {
@@ -358,9 +363,9 @@ print_scalar_formatted (const void *vala
   /* String printing should go through val_print_scalar_formatted.  */
   gdb_assert (options->format != 's');
 
-  if (len > sizeof(LONGEST) &&
-      (TYPE_CODE (type) == TYPE_CODE_INT
-       || TYPE_CODE (type) == TYPE_CODE_ENUM))
+  if (len > sizeof(LONGEST)
+      && (TYPE_CODE (type) == TYPE_CODE_INT
+	  || TYPE_CODE (type) == TYPE_CODE_ENUM))
     {
       switch (options->format)
 	{
@@ -785,6 +790,221 @@ print_address_demangle (const struct val
 }
 
 
+/* Find the address of the instruction that is INST_COUNT instructions before
+   the instruction at ADDR.
+   Since some architectures have variable-length instructions, we can't just
+   simply subtract INST_COUNT * INSN_LEN from ADDR.  Instead, we use line
+   number information to locate the nearest known instruction boundary,
+   and disassemble forward from there.  If we go out of the symbol range
+   during disassembling, we return the lowest address we've got so far and
+   set the number of instructions read to INST_READ.  */
+
+static CORE_ADDR
+find_instruction_backward (struct gdbarch *gdbarch, CORE_ADDR addr,
+                           int inst_count, int *inst_read)
+{
+  /* The vector PCS is used to store instruction addresses within
+     a pc range.  */
+  CORE_ADDR loop_start, loop_end, p;
+  VEC (CORE_ADDR) *pcs = NULL;
+  struct symtab_and_line sal;
+  struct cleanup *cleanup = make_cleanup (VEC_cleanup (CORE_ADDR), &pcs);
+
+  *inst_read = 0;
+  loop_start = loop_end = addr;
+
+  /* In each iteration of the outer loop, we get a pc range that ends before
+     LOOP_START, then we count and store every instruction address of the range
+     iterated in the loop.
+     If the number of instructions counted reaches INST_COUNT, return the
+     stored address that is located INST_COUNT instructions back from ADDR.
+     If INST_COUNT is not reached, we subtract the number of counted
+     instructions from INST_COUNT, and go to the next iteration.  */
+  do
+    {
+      VEC_truncate (CORE_ADDR, pcs, 0);
+      sal = find_pc_sect_line (loop_start, NULL, 1);
+      if (sal.line <= 0)
+        {
+          /* We reach here when line info is not available.  In this case,
+             we print a message and just exit the loop.  The return value
+             is calculated after the loop.  */
+          printf_filtered (_("No line number information available "
+                             "for address "));
+          wrap_here ("  ");
+          print_address (gdbarch, loop_start - 1, gdb_stdout);
+          printf_filtered ("\n");
+          break;
+        }
+
+      loop_end = loop_start;
+      loop_start = sal.pc;
+
+      /* This loop pushes instruction addresses in the range from
+         LOOP_START to LOOP_END.  */
+      for (p = loop_start; p < loop_end;)
+        {
+          VEC_safe_push (CORE_ADDR, pcs, p);
+          p += gdb_insn_length (gdbarch, p);
+        }
+
+      inst_count -= VEC_length (CORE_ADDR, pcs);
+      *inst_read += VEC_length (CORE_ADDR, pcs);
+    }
+  while (inst_count > 0);
+
+  /* After the loop, the vector PCS has instruction addresses of the last
+     source line we processed, and INST_COUNT has a negative value.
+     We return the address at the index of -INST_COUNT in the vector for
+     the reason below.
+     Let's assume the following instruction addresses and run 'x/-4i 0x400e'.
+       Line X of File
+          0x4000
+          0x4001
+          0x4005
+       Line Y of File
+          0x4009
+          0x400c
+       => 0x400e
+          0x4011
+     find_instruction_backward is called with INST_COUNT = 4 and expected to
+     return 0x4001.  When we reach here, INST_COUNT is set to -1 because
+     it was subtracted by 2 (from Line Y) and 3 (from Line X).  The value
+     4001 is located at the index 1 of the last iterated line (= Line X),
+     which is simply calculated by -INST_COUNT.
+     The case when the length of PCS is 0 means that we reached an area for
+     which line info is not available.  In such case, we return LOOP_START,
+     which was the lowest instruction address that had line info.  */
+  p = VEC_length (CORE_ADDR, pcs) > 0
+    ? VEC_index (CORE_ADDR, pcs, -inst_count)
+    : loop_start;
+
+  /* INST_READ includes all instruction addresses in a pc range.  Need to
+     exclude the beginning part up to the address we're returning.  That
+     is, exclude {0x4000} in the example above.  */
+  if (inst_count < 0)
+    *inst_read += inst_count;
+
+  do_cleanups (cleanup);
+  return p;
+}
+
+/* Backward read LEN bytes of target memory from address MEMADDR + LEN,
+   placing the results in GDB's memory from MYADDR + LEN.  Returns
+   a count of the bytes actually read.  */
+
+static int
+read_memory_backward (struct gdbarch *gdbarch,
+                      CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+{
+  int errcode;
+  int nread;      /* Number of bytes actually read.  */
+
+  /* First try a complete read.  */
+  errcode = target_read_memory (memaddr, myaddr, len);
+  if (errcode == 0)
+    {
+      /* Got it all.  */
+      nread = len;
+    }
+  else
+    {
+      /* Loop, reading one byte at a time until we get as much as we can.  */
+      memaddr += len;
+      myaddr += len;
+      for (nread = 0; nread < len; ++nread)
+        {
+          errcode = target_read_memory (--memaddr, --myaddr, 1);
+          if (errcode != 0)
+            {
+              /* The read was unsuccessful, so exit the loop.  */
+              printf_filtered (_("Cannot access memory at address %s\n"),
+                               paddress (gdbarch, memaddr));
+              break;
+            }
+        }
+    }
+  return nread;
+}
+
+/* Returns true if X (which is LEN bytes wide) is the number zero.  */
+
+static int
+integer_is_zero (const gdb_byte *x, int len)
+{
+  int i = 0;
+
+  while (i < len && x[i] == 0)
+    ++i;
+  return (i == len);
+}
+
+/* Find the start address of a string in which ADDR is included.
+   Basically we search for '\0' and return the next address,
+   but if OPTIONS->PRINT_MAX is smaller than the length of a string,
+   we stop searching and return the address to print characters as many as
+   PRINT_MAX from the string.  */
+
+static CORE_ADDR
+find_string_backward (struct gdbarch *gdbarch,
+                      CORE_ADDR addr, int count, int char_size,
+                      const struct value_print_options *options,
+                      int *strings_counted)
+{
+  const int chunk_size = 0x20;
+  gdb_byte *buffer = NULL;
+  struct cleanup *cleanup = NULL;
+  int read_error = 0;
+  int chars_read = 0;
+  int chars_to_read = chunk_size;
+  int chars_counted = 0;
+  int count_original = count;
+  CORE_ADDR string_start_addr = addr;
+
+  gdb_assert (char_size == 1 || char_size == 2 || char_size == 4);
+  buffer = (gdb_byte *) xmalloc (chars_to_read * char_size);
+  cleanup = make_cleanup (xfree, buffer);
+  while (count > 0 && read_error == 0)
+    {
+      int i;
+
+      addr -= chars_to_read * char_size;
+      chars_read = read_memory_backward (gdbarch, addr, buffer,
+                                         chars_to_read * char_size);
+      chars_read /= char_size;
+      read_error = (chars_read == chars_to_read) ? 0 : 1;
+      /* Searching for '\0' from the end of buffer in backward direction.  */
+      for (i = 0; i < chars_read && count > 0 ; ++i, ++chars_counted)
+        {
+          int offset = (chars_to_read - i - 1) * char_size;
+
+          if (integer_is_zero (buffer + offset, char_size)
+              || chars_counted == options->print_max)
+            {
+              /* Found '\0' or reached print_max.  As OFFSET is the offset to
+                 '\0', we add CHAR_SIZE to return the start address of
+                 a string.  */
+              --count;
+              string_start_addr = addr + offset + char_size;
+              chars_counted = 0;
+            }
+        }
+    }
+
+  /* Update STRINGS_COUNTED with the actual number of loaded strings.  */
+  *strings_counted = count_original - count;
+
+  if (read_error != 0)
+    {
+      /* In error case, STRING_START_ADDR is pointing to the string that
+         was last successfully loaded.  Rewind the partially loaded string.  */
+      string_start_addr -= chars_counted * char_size;
+    }
+
+  do_cleanups (cleanup);
+  return string_start_addr;
+}
+
 /* Examine data at address ADDR in format FMT.
    Fetch it from memory and print on gdb_stdout.  */
 
@@ -798,6 +1018,8 @@ do_examine (struct format_data fmt, stru
   int i;
   int maxelts;
   struct value_print_options opts;
+  int need_to_update_next_address = 0;
+  CORE_ADDR addr_rewound = 0;
 
   format = fmt.format;
   size = fmt.size;
@@ -868,6 +1090,38 @@ do_examine (struct format_data fmt, stru
 
   get_formatted_print_options (&opts, format);
 
+  if (count < 0)
+    {
+      /* This is the negative repeat count case.
+         We rewind the address based on the given repeat count and format,
+         then examine memory from there in forward direction.  */
+
+      count = -count;
+      if (format == 'i')
+        {
+          next_address = find_instruction_backward (gdbarch, addr, count,
+                                                    &count);
+        }
+      else if (format == 's')
+        {
+          next_address = find_string_backward (gdbarch, addr, count,
+                                               TYPE_LENGTH (val_type),
+                                               &opts, &count);
+        }
+      else
+        {
+          next_address = addr - count * TYPE_LENGTH (val_type);
+        }
+
+      /* The following call to print_formatted updates next_address in every
+         iteration.  In backward case, we store the start address here
+         and update next_address with it before exiting the function.  */
+      addr_rewound = (format == 's'
+                      ? next_address - TYPE_LENGTH (val_type)
+                      : next_address);
+      need_to_update_next_address = 1;
+    }
+
   /* Print as many objects as specified in COUNT, at most maxelts per line,
      with the address of the next one at the start of each line.  */
 
@@ -913,6 +1167,9 @@ do_examine (struct format_data fmt, stru
       printf_filtered ("\n");
       gdb_flush (gdb_stdout);
     }
+
+  if (need_to_update_next_address)
+    next_address = addr_rewound;
 }
 
 static void
@@ -986,8 +1243,6 @@ print_value (struct value *val, const st
 static void
 print_command_1 (const char *exp, int voidprint)
 {
-  struct expression *expr;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   struct value *val;
   struct format_data fmt;
 
@@ -995,9 +1250,8 @@ print_command_1 (const char *exp, int vo
 
   if (exp && *exp)
     {
-      expr = parse_expression (exp);
-      make_cleanup (free_current_contents, &expr);
-      val = evaluate_expression (expr);
+      expression_up expr = parse_expression (exp);
+      val = evaluate_expression (expr.get ());
     }
   else
     val = access_value_history (0);
@@ -1005,8 +1259,6 @@ print_command_1 (const char *exp, int vo
   if (voidprint || (val && value_type (val) &&
 		    TYPE_CODE (value_type (val)) != TYPE_CODE_VOID))
     print_value (val, &fmt);
-
-  do_cleanups (old_chain);
 }
 
 static void
@@ -1035,8 +1287,6 @@ output_command (char *exp, int from_tty)
 void
 output_command_const (const char *exp, int from_tty)
 {
-  struct expression *expr;
-  struct cleanup *old_chain;
   char format = 0;
   struct value *val;
   struct format_data fmt;
@@ -1053,10 +1303,9 @@ output_command_const (const char *exp, i
       format = fmt.format;
     }
 
-  expr = parse_expression (exp);
-  old_chain = make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_expression (exp);
 
-  val = evaluate_expression (expr);
+  val = evaluate_expression (expr.get ());
 
   annotate_value_begin (value_type (val));
 
@@ -1068,16 +1317,12 @@ output_command_const (const char *exp, i
 
   wrap_here ("");
   gdb_flush (gdb_stdout);
-
-  do_cleanups (old_chain);
 }
 
 static void
 set_command (char *exp, int from_tty)
 {
-  struct expression *expr = parse_expression (exp);
-  struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_expression (exp);
 
   if (expr->nelts >= 1)
     switch (expr->elts[0].opcode)
@@ -1095,8 +1340,7 @@ set_command (char *exp, int from_tty)
 	  (_("Expression is not an assignment (and might have no effect)"));
       }
 
-  evaluate_expression (expr);
-  do_cleanups (old_chain);
+  evaluate_expression (expr.get ());
 }
 
 static void
@@ -1208,7 +1452,7 @@ address_info (char *exp, int from_tty)
     error (_("Argument required."));
 
   sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN,
-		       &is_a_field_of_this);
+		       &is_a_field_of_this).symbol;
   if (sym == NULL)
     {
       if (is_a_field_of_this.type != NULL)
@@ -1376,16 +1620,19 @@ address_info (char *exp, int from_tty)
 	else
 	  {
 	    section = MSYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
-	    load_addr = BMSYMBOL_VALUE_ADDRESS (msym);
 
 	    if (section
 		&& (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
-	      printf_filtered (_("a thread-local variable at offset %s "
-				 "in the thread-local storage for `%s'"),
-			       paddress (gdbarch, load_addr),
-			       objfile_name (section->objfile));
+	      {
+		load_addr = MSYMBOL_VALUE_RAW_ADDRESS (msym.minsym);
+		printf_filtered (_("a thread-local variable at offset %s "
+				   "in the thread-local storage for `%s'"),
+				 paddress (gdbarch, load_addr),
+				 objfile_name (section->objfile));
+	      }
 	    else
 	      {
+		load_addr = BMSYMBOL_VALUE_ADDRESS (msym);
 		printf_filtered (_("static storage at address "));
 		fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout);
 		if (section_is_overlay (section))
@@ -1416,7 +1663,6 @@ address_info (char *exp, int from_tty)
 static void
 x_command (char *exp, int from_tty)
 {
-  struct expression *expr;
   struct format_data fmt;
   struct cleanup *old_chain;
   struct value *val;
@@ -1438,14 +1684,13 @@ x_command (char *exp, int from_tty)
 
   if (exp != 0 && *exp != 0)
     {
-      expr = parse_expression (exp);
+      expression_up expr = parse_expression (exp);
       /* Cause expression not to be there any more if this command is
          repeated with Newline.  But don't clobber a user-defined
          command's definition.  */
       if (from_tty)
 	*exp = 0;
-      old_chain = make_cleanup (free_current_contents, &expr);
-      val = evaluate_expression (expr);
+      val = evaluate_expression (expr.get ());
       if (TYPE_CODE (value_type (val)) == TYPE_CODE_REF)
 	val = coerce_ref (val);
       /* In rvalue contexts, such as this, functions are coerced into
@@ -1458,7 +1703,6 @@ x_command (char *exp, int from_tty)
 	next_address = value_as_address (val);
 
       next_gdbarch = expr->gdbarch;
-      do_cleanups (old_chain);
     }
 
   if (!next_gdbarch)
@@ -1504,7 +1748,6 @@ static void
 display_command (char *arg, int from_tty)
 {
   struct format_data fmt;
-  struct expression *expr;
   struct display *newobj;
   const char *exp = arg;
 
@@ -1532,19 +1775,29 @@ display_command (char *arg, int from_tty
     }
 
   innermost_block = NULL;
-  expr = parse_expression (exp);
+  expression_up expr = parse_expression (exp);
 
-  newobj = (struct display *) xmalloc (sizeof (struct display));
+  newobj = new display ();
 
   newobj->exp_string = xstrdup (exp);
-  newobj->exp = expr;
+  newobj->exp = std::move (expr);
   newobj->block = innermost_block;
   newobj->pspace = current_program_space;
-  newobj->next = display_chain;
   newobj->number = ++display_number;
   newobj->format = fmt;
   newobj->enabled_p = 1;
-  display_chain = newobj;
+  newobj->next = NULL;
+
+  if (display_chain == NULL)
+    display_chain = newobj;
+  else
+    {
+      struct display *last;
+
+      for (last = display_chain; last->next != NULL; last = last->next)
+	;
+      last->next = newobj;
+    }
 
   if (from_tty)
     do_one_display (newobj);
@@ -1556,8 +1809,7 @@ static void
 free_display (struct display *d)
 {
   xfree (d->exp_string);
-  xfree (d->exp);
-  xfree (d);
+  delete d;
 }
 
 /* Clear out the display_chain.  Done when new symtabs are loaded,
@@ -1606,19 +1858,18 @@ map_display_numbers (char *args,
 				       void *),
 		     void *data)
 {
-  struct get_number_or_range_state state;
   int num;
 
   if (args == NULL)
     error_no_arg (_("one or more display numbers"));
 
-  init_number_or_range (&state, args);
+  number_or_range_parser parser (args);
 
-  while (!state.finished)
+  while (!parser.finished ())
     {
-      const char *p = state.string;
+      const char *p = parser.cur_tok ();
 
-      num = get_number_or_range (&state);
+      num = parser.get_number ();
       if (num == 0)
 	warning (_("bad display number at or near '%s'"), p);
       else
@@ -1668,7 +1919,6 @@ undisplay_command (char *args, int from_
 static void
 do_one_display (struct display *d)
 {
-  struct cleanup *old_chain;
   int within_current_scope;
 
   if (d->enabled_p == 0)
@@ -1683,8 +1933,7 @@ do_one_display (struct display *d)
      expression if the current architecture has changed.  */
   if (d->exp != NULL && d->exp->gdbarch != get_current_arch ())
     {
-      xfree (d->exp);
-      d->exp = NULL;
+      d->exp.reset ();
       d->block = NULL;
     }
 
@@ -1720,8 +1969,8 @@ do_one_display (struct display *d)
   if (!within_current_scope)
     return;
 
-  old_chain = make_cleanup_restore_integer (&current_display_number);
-  current_display_number = d->number;
+  scoped_restore save_display_number
+    = make_scoped_restore (&current_display_number, d->number);
 
   annotate_display_begin ();
   printf_filtered ("%d", d->number);
@@ -1757,7 +2006,7 @@ do_one_display (struct display *d)
 	  struct value *val;
 	  CORE_ADDR addr;
 
-	  val = evaluate_expression (d->exp);
+	  val = evaluate_expression (d->exp.get ());
 	  addr = value_as_address (val);
 	  if (d->format.format == 'i')
 	    addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr);
@@ -1794,7 +2043,7 @@ do_one_display (struct display *d)
         {
 	  struct value *val;
 
-	  val = evaluate_expression (d->exp);
+	  val = evaluate_expression (d->exp.get ());
 	  print_formatted (val, d->format.size, &opts, gdb_stdout);
 	}
       CATCH (ex, RETURN_MASK_ERROR)
@@ -1809,7 +2058,6 @@ do_one_display (struct display *d)
   annotate_display_end ();
 
   gdb_flush (gdb_stdout);
-  do_cleanups (old_chain);
 }
 
 /* Display all of the values on the auto-display chain which can be
@@ -1955,10 +2203,9 @@ clear_dangling_display_expressions (stru
 	continue;
 
       if (lookup_objfile_from_block (d->block) == objfile
-	  || (d->exp && exp_uses_objfile (d->exp, objfile)))
+	  || (d->exp != NULL && exp_uses_objfile (d->exp.get (), objfile)))
       {
-	xfree (d->exp);
-	d->exp = NULL;
+	d->exp.reset ();
 	d->block = NULL;
       }
     }
@@ -1988,7 +2235,11 @@ print_variable_and_value (const char *na
       struct value *val;
       struct value_print_options opts;
 
-      val = read_var_value (var, frame);
+      /* READ_VAR_VALUE needs a block in order to deal with non-local
+	 references (i.e. to handle nested functions).  In this context, we
+	 print variables that are local to this frame, so we can avoid passing
+	 a block to it.  */
+      val = read_var_value (var, NULL, frame);
       get_user_print_options (&opts);
       opts.deref_ref = 1;
       common_val_print (val, stream, indent, &opts, current_language);
@@ -2057,7 +2308,7 @@ printf_wide_c_string (struct ui_file *st
   struct type *wctype = lookup_typename (current_language, gdbarch,
 					 "wchar_t", NULL, 0);
   int wcwidth = TYPE_LENGTH (wctype);
-  gdb_byte *buf = alloca (wcwidth);
+  gdb_byte *buf = (gdb_byte *) alloca (wcwidth);
   struct obstack output;
   struct cleanup *inner_cleanup;
 
@@ -2196,7 +2447,7 @@ printf_pointer (struct ui_file *stream, 
   long val = value_as_long (value);
 #endif
 
-  fmt = alloca (strlen (format) + 5);
+  fmt = (char *) alloca (strlen (format) + 5);
 
   /* Copy up to the leading %.  */
   p = format;
@@ -2252,7 +2503,7 @@ ui_printf (const char *arg, struct ui_fi
   int allocated_args = 20;
   struct cleanup *old_cleanups;
 
-  val_args = xmalloc (allocated_args * sizeof (struct value *));
+  val_args = XNEWVEC (struct value *, allocated_args);
   old_cleanups = make_cleanup (free_current_contents, &val_args);
 
   if (s == 0)
@@ -2466,18 +2717,13 @@ printf_command (char *arg, int from_tty)
 static void
 eval_command (char *arg, int from_tty)
 {
-  struct ui_file *ui_out = mem_fileopen ();
-  struct cleanup *cleanups = make_cleanup_ui_file_delete (ui_out);
-  char *expanded;
-
-  ui_printf (arg, ui_out);
+  string_file stb;
 
-  expanded = ui_file_xstrdup (ui_out, NULL);
-  make_cleanup (xfree, expanded);
+  ui_printf (arg, &stb);
 
-  execute_command (expanded, from_tty);
+  std::string expanded = insert_user_defined_cmd_args (stb.c_str ());
 
-  do_cleanups (cleanups);
+  execute_command (&expanded[0], from_tty);
 }
 
 void
@@ -2505,7 +2751,8 @@ Format letters are o(octal), x(hex), d(d
   and z(hex, zero padded on the left).\n\
 Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
 The specified number of objects of the specified size are printed\n\
-according to the format.\n\n\
+according to the format.  If a negative number is specified, memory is\n\
+examined backward from the address.\n\n\
 Defaults for format and size letters are those previously used.\n\
 Default count is 1.  Default address is following last thing printed\n\
 with this command or \"print\"."));
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/probe.c ./gdb/probe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/probe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/probe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic static probe support for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,33 +33,96 @@
 #include "value.h"
 #include "ax.h"
 #include "ax-gdb.h"
+#include "location.h"
 #include <ctype.h>
+#include <algorithm>
 
 typedef struct bound_probe bound_probe_s;
 DEF_VEC_O (bound_probe_s);
 
 
 
+/* A helper for parse_probes that decodes a probe specification in
+   SEARCH_PSPACE.  It appends matching SALs to RESULT.  */
+
+static void
+parse_probes_in_pspace (const struct probe_ops *probe_ops,
+			struct program_space *search_pspace,
+			const char *objfile_namestr,
+			const char *provider,
+			const char *name,
+			struct symtabs_and_lines *result)
+{
+  struct objfile *objfile;
+
+  ALL_PSPACE_OBJFILES (search_pspace, objfile)
+    {
+      VEC (probe_p) *probes;
+      struct probe *probe;
+      int ix;
+
+      if (!objfile->sf || !objfile->sf->sym_probe_fns)
+	continue;
+
+      if (objfile_namestr
+	  && FILENAME_CMP (objfile_name (objfile), objfile_namestr) != 0
+	  && FILENAME_CMP (lbasename (objfile_name (objfile)),
+			   objfile_namestr) != 0)
+	continue;
+
+      probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile);
+
+      for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
+	{
+	  struct symtab_and_line *sal;
+
+	  if (probe_ops != &probe_ops_any && probe->pops != probe_ops)
+	    continue;
+
+	  if (provider && strcmp (probe->provider, provider) != 0)
+	    continue;
+
+	  if (strcmp (probe->name, name) != 0)
+	    continue;
+
+	  ++result->nelts;
+	  result->sals = XRESIZEVEC (struct symtab_and_line, result->sals,
+				     result->nelts);
+	  sal = &result->sals[result->nelts - 1];
+
+	  init_sal (sal);
+
+	  sal->pc = get_probe_address (probe, objfile);
+	  sal->explicit_pc = 1;
+	  sal->section = find_pc_overlay (sal->pc);
+	  sal->pspace = search_pspace;
+	  sal->probe = probe;
+	  sal->objfile = objfile;
+	}
+    }
+}
+
 /* See definition in probe.h.  */
 
 struct symtabs_and_lines
-parse_probes (char **argptr, struct linespec_result *canonical)
+parse_probes (const struct event_location *location,
+	      struct program_space *search_pspace,
+	      struct linespec_result *canonical)
 {
-  char *arg_start, *arg_end, *arg;
+  char *arg_end, *arg;
   char *objfile_namestr = NULL, *provider = NULL, *name, *p;
   struct cleanup *cleanup;
   struct symtabs_and_lines result;
-  struct objfile *objfile;
-  struct program_space *pspace;
   const struct probe_ops *probe_ops;
-  const char *cs;
+  const char *arg_start, *cs;
 
   result.sals = NULL;
   result.nelts = 0;
 
-  arg_start = *argptr;
+  gdb_assert (event_location_type (location) == PROBE_LOCATION);
+  arg_start = get_probe_location (location);
 
-  cs = *argptr;
+  cs = arg_start;
   probe_ops = probe_linespec_to_ops (&cs);
   if (probe_ops == NULL)
     error (_("'%s' is not a probe linespec"), arg_start);
@@ -111,53 +174,19 @@ parse_probes (char **argptr, struct line
   if (objfile_namestr && *objfile_namestr == '\0')
     error (_("invalid objfile name"));
 
-  ALL_PSPACES (pspace)
-    ALL_PSPACE_OBJFILES (pspace, objfile)
-      {
-	VEC (probe_p) *probes;
-	struct probe *probe;
-	int ix;
-
-	if (!objfile->sf || !objfile->sf->sym_probe_fns)
-	  continue;
-
-	if (objfile_namestr
-	    && FILENAME_CMP (objfile_name (objfile), objfile_namestr) != 0
-	    && FILENAME_CMP (lbasename (objfile_name (objfile)),
-			     objfile_namestr) != 0)
-	  continue;
-
-	probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile);
-
-	for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
-	  {
-	    struct symtab_and_line *sal;
-
-	    if (probe_ops != &probe_ops_any && probe->pops != probe_ops)
-	      continue;
-
-	    if (provider && strcmp (probe->provider, provider) != 0)
-	      continue;
-
-	    if (strcmp (probe->name, name) != 0)
-	      continue;
-
-	    ++result.nelts;
-	    result.sals = xrealloc (result.sals,
-				    result.nelts
-				    * sizeof (struct symtab_and_line));
-	    sal = &result.sals[result.nelts - 1];
-
-	    init_sal (sal);
-
-	    sal->pc = get_probe_address (probe, objfile);
-	    sal->explicit_pc = 1;
-	    sal->section = find_pc_overlay (sal->pc);
-	    sal->pspace = pspace;
-	    sal->probe = probe;
-	    sal->objfile = objfile;
-	  }
-      }
+  if (search_pspace != NULL)
+    {
+      parse_probes_in_pspace (probe_ops, search_pspace, objfile_namestr,
+			      provider, name, &result);
+    }
+  else
+    {
+      struct program_space *pspace;
+
+      ALL_PSPACES (pspace)
+	parse_probes_in_pspace (probe_ops, pspace, objfile_namestr,
+				provider, name, &result);
+    }
 
   if (result.nelts == 0)
     {
@@ -170,12 +199,15 @@ parse_probes (char **argptr, struct line
 
   if (canonical)
     {
+      char *canon;
+
+      canon = savestring (arg_start, arg_end - arg_start);
+      make_cleanup (xfree, canon);
       canonical->special_display = 1;
       canonical->pre_expanded = 1;
-      canonical->addr_string = savestring (*argptr, arg_end - *argptr);
+      canonical->location = new_probe_location (canon);
     }
 
-  *argptr = arg_end;
   do_cleanups (cleanup);
 
   return result;
@@ -401,13 +433,13 @@ gen_ui_out_table_header_info (VEC (bound
 	      if (val == NULL)
 		continue;
 
-	      size_max = max (strlen (val), size_max);
+	      size_max = std::max (strlen (val), size_max);
 	    }
 	  do_cleanups (c2);
 	}
 
-      ui_out_table_header (current_uiout, size_max, ui_left,
-			   column->field_name, column->print_name);
+      current_uiout->table_header (size_max, ui_left,
+				   column->field_name, column->print_name);
     }
 
   do_cleanups (c);
@@ -433,7 +465,7 @@ print_ui_out_not_applicables (const stru
   for (ix = 0;
        VEC_iterate (info_probe_column_s, headings, ix, column);
        ++ix)
-    ui_out_field_string (current_uiout, column->field_name, _("n/a"));
+    current_uiout->field_string (column->field_name, _("n/a"));
 
   do_cleanups (c);
 }
@@ -479,9 +511,9 @@ print_ui_out_info (struct probe *probe)
       const char *val = VEC_index (const_char_ptr, values, j++);
 
       if (val == NULL)
-	ui_out_field_skip (current_uiout, column->field_name);
+	current_uiout->field_skip (column->field_name);
       else
-	ui_out_field_string (current_uiout, column->field_name, val);
+	current_uiout->field_string (column->field_name, val);
     }
 
   do_cleanups (c);
@@ -613,17 +645,18 @@ info_probes_for_ops (const char *arg, in
     {
       const char *probe_type = probe->probe->pops->type_name (probe->probe);
 
-      size_type = max (strlen (probe_type), size_type);
-      size_name = max (strlen (probe->probe->name), size_name);
-      size_provider = max (strlen (probe->probe->provider), size_provider);
-      size_objname = max (strlen (objfile_name (probe->objfile)), size_objname);
+      size_type = std::max (strlen (probe_type), size_type);
+      size_name = std::max (strlen (probe->probe->name), size_name);
+      size_provider = std::max (strlen (probe->probe->provider), size_provider);
+      size_objname = std::max (strlen (objfile_name (probe->objfile)),
+			       size_objname);
     }
 
-  ui_out_table_header (current_uiout, size_type, ui_left, "type", _("Type"));
-  ui_out_table_header (current_uiout, size_provider, ui_left, "provider",
-		       _("Provider"));
-  ui_out_table_header (current_uiout, size_name, ui_left, "name", _("Name"));
-  ui_out_table_header (current_uiout, size_addr, ui_left, "addr", _("Where"));
+  current_uiout->table_header (size_type, ui_left, "type", _("Type"));
+  current_uiout->table_header (size_provider, ui_left, "provider",
+			       _("Provider"));
+  current_uiout->table_header (size_name, ui_left, "name", _("Name"));
+  current_uiout->table_header (size_addr, ui_left, "addr", _("Where"));
 
   if (pops == NULL)
     {
@@ -640,9 +673,8 @@ info_probes_for_ops (const char *arg, in
   else
     gen_ui_out_table_header_info (probes, pops);
 
-  ui_out_table_header (current_uiout, size_objname, ui_left, "object",
-		       _("Object"));
-  ui_out_table_body (current_uiout);
+  current_uiout->table_header (size_objname, ui_left, "object", _("Object"));
+  current_uiout->table_body ();
 
   for (i = 0; VEC_iterate (bound_probe_s, probes, i, probe); ++i)
     {
@@ -651,12 +683,12 @@ info_probes_for_ops (const char *arg, in
 
       inner = make_cleanup_ui_out_tuple_begin_end (current_uiout, "probe");
 
-      ui_out_field_string (current_uiout, "type",probe_type);
-      ui_out_field_string (current_uiout, "provider", probe->probe->provider);
-      ui_out_field_string (current_uiout, "name", probe->probe->name);
-      ui_out_field_core_addr (current_uiout, "addr",
-			      probe->probe->arch,
-			      get_probe_address (probe->probe, probe->objfile));
+      current_uiout->field_string ("type",probe_type);
+      current_uiout->field_string ("provider", probe->probe->provider);
+      current_uiout->field_string ("name", probe->probe->name);
+      current_uiout->field_core_addr (
+	"addr", probe->probe->arch,
+	get_probe_address (probe->probe, probe->objfile));
 
       if (pops == NULL)
 	{
@@ -673,9 +705,9 @@ info_probes_for_ops (const char *arg, in
       else
 	print_ui_out_info (probe->probe);
 
-      ui_out_field_string (current_uiout, "object",
+      current_uiout->field_string ("object",
 			   objfile_name (probe->objfile));
-      ui_out_text (current_uiout, "\n");
+      current_uiout->text ("\n");
 
       do_cleanups (inner);
     }
@@ -684,7 +716,7 @@ info_probes_for_ops (const char *arg, in
   do_cleanups (cleanup);
 
   if (!any_found)
-    ui_out_message (current_uiout, 0, _("No probes matched.\n"));
+    current_uiout->message (_("No probes matched.\n"));
 }
 
 /* Implementation of the `info probes' command.  */
@@ -714,7 +746,7 @@ enable_probes_command (char *arg, int fr
   probes = collect_probes (objname, provider, probe_name, NULL);
   if (VEC_empty (bound_probe_s, probes))
     {
-      ui_out_message (current_uiout, 0, _("No probes matched.\n"));
+      current_uiout->message (_("No probes matched.\n"));
       do_cleanups (cleanup);
       return;
     }
@@ -728,14 +760,12 @@ enable_probes_command (char *arg, int fr
       if (pops->enable_probe != NULL)
 	{
 	  pops->enable_probe (probe->probe);
-	  ui_out_message (current_uiout, 0,
-			  _("Probe %s:%s enabled.\n"),
-			  probe->probe->provider, probe->probe->name);
+	  current_uiout->message (_("Probe %s:%s enabled.\n"),
+				  probe->probe->provider, probe->probe->name);
 	}
       else
-	ui_out_message (current_uiout, 0,
-			_("Probe %s:%s cannot be enabled.\n"),
-			probe->probe->provider, probe->probe->name);
+	current_uiout->message (_("Probe %s:%s cannot be enabled.\n"),
+				probe->probe->provider, probe->probe->name);
     }
 
   do_cleanups (cleanup);
@@ -760,7 +790,7 @@ disable_probes_command (char *arg, int f
   probes = collect_probes (objname, provider, probe_name, NULL /* pops */);
   if (VEC_empty (bound_probe_s, probes))
     {
-      ui_out_message (current_uiout, 0, _("No probes matched.\n"));
+      current_uiout->message (_("No probes matched.\n"));
       do_cleanups (cleanup);
       return;
     }
@@ -774,14 +804,12 @@ disable_probes_command (char *arg, int f
       if (pops->disable_probe != NULL)
 	{
 	  pops->disable_probe (probe->probe);
-	  ui_out_message (current_uiout, 0,
-			  _("Probe %s:%s disabled.\n"),
-			  probe->probe->provider, probe->probe->name);
+	  current_uiout->message (_("Probe %s:%s disabled.\n"),
+				  probe->probe->provider, probe->probe->name);
 	}
       else
-	ui_out_message (current_uiout, 0,
-			_("Probe %s:%s cannot be disabled.\n"),
-			probe->probe->provider, probe->probe->name);
+	current_uiout->message (_("Probe %s:%s cannot be disabled.\n"),
+				probe->probe->provider, probe->probe->name);
     }
 
   do_cleanups (cleanup);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/probe.h ./gdb/probe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/probe.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/probe.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic SDT probe support for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #if !defined (PROBE_H)
 #define PROBE_H 1
 
+struct event_location;
+
 #include "gdb_vecs.h"
 
 /* Definition of a vector of probes.  */
@@ -70,7 +72,8 @@ struct probe_ops
     CORE_ADDR (*get_probe_address) (struct probe *probe,
 				    struct objfile *objfile);
 
-    /* Return the number of arguments of PROBE.  */
+    /* Return the number of arguments of PROBE.  This function can
+       throw an exception.  */
 
     unsigned (*get_probe_argument_count) (struct probe *probe,
 					  struct frame_info *frame);
@@ -82,7 +85,8 @@ struct probe_ops
     int (*can_evaluate_probe_arguments) (struct probe *probe);
 
     /* Evaluate the Nth argument from the PROBE, returning a value
-       corresponding to it.  The argument number is represented N.  */
+       corresponding to it.  The argument number is represented N.
+       This function can throw an exception.  */
 
     struct value *(*evaluate_probe_argument) (struct probe *probe,
 					      unsigned n,
@@ -141,13 +145,15 @@ struct probe_ops
 
     /* Enable a probe.  The semantics of "enabling" a probe depend on
        the specific backend and the field can be NULL in case enabling
-       probes is not supported.  */
+       probes is not supported.  This function can throw an
+       exception.  */
 
     void (*enable_probe) (struct probe *probe);
 
     /* Disable a probe.  The semantics of "disabling" a probe depend
        on the specific backend and the field can be NULL in case
-       disabling probes is not supported.  */
+       disabling probes is not supported.  This function can throw an
+       exception.  */
 
     void (*disable_probe) (struct probe *probe);
   };
@@ -219,9 +225,10 @@ struct bound_probe
   };
 
 /* A helper for linespec that decodes a probe specification.  It returns a
-   symtabs_and_lines object and updates *ARGPTR or throws an error.  */
+   symtabs_and_lines object and updates LOC or throws an error.  */
 
-extern struct symtabs_and_lines parse_probes (char **argptr,
+extern struct symtabs_and_lines parse_probes (const struct event_location *loc,
+					      struct program_space *pspace,
 					      struct linespec_result *canon);
 
 /* Helper function to register the proper probe_ops to a newly created probe.
@@ -264,7 +271,9 @@ extern struct cmd_list_element **info_pr
 extern CORE_ADDR get_probe_address (struct probe *probe,
 				    struct objfile *objfile);
 
-/* Return the argument count of the specified probe.  */
+/* Return the argument count of the specified probe.
+
+   This function can throw an exception.  */
 
 extern unsigned get_probe_argument_count (struct probe *probe,
 					  struct frame_info *frame);
@@ -276,7 +285,9 @@ extern unsigned get_probe_argument_count
 extern int can_evaluate_probe_arguments (struct probe *probe);
 
 /* Evaluate argument N of the specified probe.  N must be between 0
-   inclusive and get_probe_argument_count exclusive.  */
+   inclusive and get_probe_argument_count exclusive.
+
+   This function can throw an exception.  */
 
 extern struct value *evaluate_probe_argument (struct probe *probe,
 					      unsigned n,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-api.c ./gdb/proc-api.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-api.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-api.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine independent support for SVR4 /proc (process file system) for GDB.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-events.c ./gdb/proc-events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-events.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-events.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine-independent support for SVR4 /proc (process file system)
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
@@ -1536,6 +1536,9 @@ static struct trans signal_table[] = 
 #ifdef SIGAIO
   { SIGAIO, "SIGAIO", "Asynchronous I/O signal" },
 #endif
+#ifdef SIGLIBRT
+  { SIGLIBRT, "SIGLIBRT", "Used by librt" },
+#endif
 
   /* FIXME: add real-time signals.  */
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-flags.c ./gdb/proc-flags.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-flags.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-flags.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Machine independent support for SVR4 /proc (process file system) for GDB.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/procfs.c ./gdb/procfs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/procfs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/procfs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine independent support for SVR4 /proc (process file system) for GDB.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
@@ -30,6 +30,7 @@
 #include "gdbthread.h"
 #include "regcache.h"
 #include "inf-child.h"
+#include "filestuff.h"
 
 #if defined (NEW_PROC_API)
 #define _STRUCTURED_PROC 1	/* Should be done by configure script.  */
@@ -111,7 +112,7 @@ static void procfs_attach (struct target
 static void procfs_detach (struct target_ops *, const char *, int);
 static void procfs_resume (struct target_ops *,
 			   ptid_t, int, enum gdb_signal);
-static void procfs_stop (struct target_ops *self, ptid_t);
+static void procfs_interrupt (struct target_ops *self, ptid_t);
 static void procfs_files_info (struct target_ops *);
 static void procfs_fetch_registers (struct target_ops *,
 				    struct regcache *, int);
@@ -143,7 +144,7 @@ static char * procfs_make_note_section (
 					bfd *, int *);
 
 static int procfs_can_use_hw_breakpoint (struct target_ops *self,
-					 int, int, int);
+					 enum bptype, int, int);
 
 static void procfs_info_proc (struct target_ops *, const char *,
 			      enum info_proc_what);
@@ -194,7 +195,7 @@ procfs_target (void)
   t->to_xfer_partial = procfs_xfer_partial;
   t->to_pass_signals = procfs_pass_signals;
   t->to_files_info = procfs_files_info;
-  t->to_stop = procfs_stop;
+  t->to_interrupt = procfs_interrupt;
 
   t->to_update_thread_list = procfs_update_thread_list;
   t->to_thread_alive = procfs_thread_alive;
@@ -689,7 +690,7 @@ create_procinfo (int pid, int tid)
 						   create it if it
 						   doesn't exist yet?  */
 
-  pi = (procinfo *) xmalloc (sizeof (procinfo));
+  pi = XNEW (procinfo);
   memset (pi, 0, sizeof (procinfo));
   pi->pid = pid;
   pi->tid = tid;
@@ -790,7 +791,7 @@ destroy_procinfo (procinfo *pi)
 static void
 do_destroy_procinfo_cleanup (void *pi)
 {
-  destroy_procinfo (pi);
+  destroy_procinfo ((procinfo *) pi);
 }
 
 enum { NOKILL, KILL };
@@ -844,7 +845,7 @@ sysset_t_alloc (procinfo * pi)
   sysset_t *ret;
   int size = sysset_t_size (pi);
 
-  ret = xmalloc (size);
+  ret = (sysset_t *) xmalloc (size);
 #ifdef DYNAMIC_SYSCALLS
   ret->pr_size = ((pi->num_syscalls + (8 * sizeof (uint64_t) - 1))
 		  / (8 * sizeof (uint64_t)));
@@ -917,7 +918,7 @@ load_syscalls (procinfo *pi)
       maxcall = syscalls[i].pr_number;
 
   pi->num_syscalls = maxcall+1;
-  pi->syscall_names = xmalloc (pi->num_syscalls * sizeof (char *));
+  pi->syscall_names = XNEWVEC (char *, pi->num_syscalls);
 
   for (i = 0; i < pi->num_syscalls; i++)
     pi->syscall_names[i] = NULL;
@@ -1674,7 +1675,7 @@ proc_set_traced_sysentry (procinfo *pi, 
 		  - sizeof (sysset_t)
 		  + sysset_t_size (pi);
 
-    argp = xmalloc (argp_size);
+    argp = (struct gdb_proc_ctl_pcsentry *) xmalloc (argp_size);
 
     argp->cmd = PCSENTRY;
     memcpy (&argp->sysset, sysset, sysset_t_size (pi));
@@ -1719,7 +1720,7 @@ proc_set_traced_sysexit (procinfo *pi, s
 		  - sizeof (sysset_t)
 		  + sysset_t_size (pi);
 
-    argp = xmalloc (argp_size);
+    argp = (struct gdb_proc_ctl_pcsexit *) xmalloc (argp_size);
 
     argp->cmd = PCSEXIT;
     memcpy (&argp->sysset, sysset, sysset_t_size (pi));
@@ -2489,7 +2490,7 @@ proc_get_LDT_entry (procinfo *pi, int ke
   /* Allocate space for one LDT entry.
      This alloc must persist, because we return a pointer to it.  */
   if (ldt_entry == NULL)
-    ldt_entry = (struct ssd *) xmalloc (sizeof (struct ssd));
+    ldt_entry = XNEW (struct ssd);
 
   /* Open the file descriptor for the LDT table.  */
   sprintf (pathname, "/proc/%d/ldt", pi->pid);
@@ -2511,9 +2512,13 @@ proc_get_LDT_entry (procinfo *pi, int ke
 	break;	/* end of table */
       /* If key matches, return this entry.  */
       if (ldt_entry->sel == key)
-	return ldt_entry;
+	{
+	  do_cleanups (old_chain);
+	  return ldt_entry;
+	}
     }
   /* Loop ended, match not found.  */
+  do_cleanups (old_chain);
   return NULL;
 #else
   int nldt, i;
@@ -2730,7 +2735,7 @@ proc_update_threads (procinfo *pi)
   if ((nlwp = proc_get_nthreads (pi)) <= 1)
     return 1;	/* Process is not multi-threaded; nothing to do.  */
 
-  prstatus = xmalloc (sizeof (gdb_prstatus_t) * (nlwp + 1));
+  prstatus = XNEWVEC (gdb_prstatus_t, nlwp + 1);
 
   old_chain = make_cleanup (xfree, prstatus);
   if (ioctl (pi->ctl_fd, PIOCLSTATUS, prstatus) < 0)
@@ -2755,7 +2760,7 @@ proc_update_threads (procinfo *pi)
 static void
 do_closedir_cleanup (void *dir)
 {
-  closedir (dir);
+  closedir ((DIR *) dir);
 }
 
 static int
@@ -2824,7 +2829,7 @@ proc_update_threads (procinfo *pi)
   if (nthreads < 2)
     return 0;		/* Nothing to do for 1 or fewer threads.  */
 
-  threads = xmalloc (nthreads * sizeof (tid_t));
+  threads = XNEWVEC (tid_t, nthreads);
 
   if (ioctl (pi->ctl_fd, PIOCTLIST, threads) < 0)
     proc_error (pi, "procfs: update_threads (PIOCTLIST)", __LINE__);
@@ -3408,26 +3413,24 @@ dbx_link_addr (bfd *abfd)
 static int
 insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored)
 {
-  bfd *abfd;
   long storage_needed;
   CORE_ADDR sym_addr;
 
-  abfd = gdb_bfd_fdopenr ("unamed", 0, fd);
+  gdb_bfd_ref_ptr abfd (gdb_bfd_fdopenr ("unamed", 0, fd));
   if (abfd == NULL)
     {
       warning (_("Failed to create a bfd: %s."), bfd_errmsg (bfd_get_error ()));
       return 0;
     }
 
-  if (!bfd_check_format (abfd, bfd_object))
+  if (!bfd_check_format (abfd.get (), bfd_object))
     {
       /* Not the correct format, so we can not possibly find the dbx_link
 	 symbol in it.	*/
-      gdb_bfd_unref (abfd);
       return 0;
     }
 
-  sym_addr = dbx_link_addr (abfd);
+  sym_addr = dbx_link_addr (abfd.get ());
   if (sym_addr != 0)
     {
       struct breakpoint *dbx_link_bpt;
@@ -3439,14 +3442,11 @@ insert_dbx_link_bpt_in_file (int fd, COR
       if (dbx_link_bpt == NULL)
 	{
 	  warning (_("Failed to insert dbx_link breakpoint."));
-	  gdb_bfd_unref (abfd);
 	  return 0;
 	}
-      gdb_bfd_unref (abfd);
       return 1;
     }
 
-  gdb_bfd_unref (abfd);
   return 0;
 }
 
@@ -3715,7 +3715,7 @@ wait_again:
 		    else
 		      {
 			/* How to keep going without returning to wfi: */
-			target_resume (ptid, 0, GDB_SIGNAL_0);
+			target_continue_no_signal (ptid);
 			goto wait_again;
 		      }
 		  }
@@ -3741,7 +3741,7 @@ wait_again:
 		    /* This is an internal event and should be transparent
 		       to wfi, so resume the execution and wait again.	See
 		       comment in procfs_init_inferior() for more details.  */
-		    target_resume (ptid, 0, GDB_SIGNAL_0);
+		    target_continue_no_signal (ptid);
 		    goto wait_again;
 		  }
 #endif
@@ -3835,7 +3835,7 @@ wait_again:
 		      add_thread (temp_ptid);
 
 		    status->kind = TARGET_WAITKIND_STOPPED;
-		    status->value.sig = 0;
+		    status->value.sig = GDB_SIGNAL_0;
 		    return retval;
 		  }
 #endif
@@ -4204,7 +4204,7 @@ procfs_files_info (struct target_ops *ig
    kill(SIGINT) to the child's process group.  */
 
 static void
-procfs_stop (struct target_ops *self, ptid_t ptid)
+procfs_interrupt (struct target_ops *self, ptid_t ptid)
 {
   kill (-inferior_process_group (), SIGINT);
 }
@@ -4272,7 +4272,7 @@ procfs_kill_inferior (struct target_ops 
 
       if (pi)
 	unconditionally_kill_inferior (pi);
-      target_mourn_inferior ();
+      target_mourn_inferior (inferior_ptid);
     }
 }
 
@@ -4566,7 +4566,7 @@ procfs_create_inferior (struct target_op
       if (path == NULL)
 	path = "/bin:/usr/bin";
 
-      tryname = alloca (strlen (path) + strlen (shell_file) + 2);
+      tryname = (char *) alloca (strlen (path) + strlen (shell_file) + 2);
       for (p = path; p != NULL; p = p1 ? p1 + 1: NULL)
 	{
 	  p1 = strchr (p, ':');
@@ -4764,7 +4764,8 @@ procfs_set_watchpoint (ptid_t ptid, CORE
 
 static int
 procfs_can_use_hw_breakpoint (struct target_ops *self,
-			      int type, int cnt, int othertype)
+			      enum bptype type,
+			      int cnt, int othertype)
 {
   /* Due to the way that proc_set_watchpoint() is implemented, host
      and target pointers must be of the same size.  If they are not,
@@ -4828,7 +4829,8 @@ procfs_stopped_data_address (struct targ
 
 static int
 procfs_insert_watchpoint (struct target_ops *self,
-			  CORE_ADDR addr, int len, int type,
+			  CORE_ADDR addr, int len,
+			  enum target_hw_bp_type type,
 			  struct expression *cond)
 {
   if (!target_have_steppable_watchpoint
@@ -4851,7 +4853,8 @@ procfs_insert_watchpoint (struct target_
 
 static int
 procfs_remove_watchpoint (struct target_ops *self,
-			  CORE_ADDR addr, int len, int type,
+			  CORE_ADDR addr, int len,
+			  enum target_hw_bp_type type,
 			  struct expression *cond)
 {
   return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
@@ -5363,7 +5366,8 @@ struct procfs_corefile_thread_data {
 static int
 procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
 {
-  struct procfs_corefile_thread_data *args = data;
+  struct procfs_corefile_thread_data *args
+    = (struct procfs_corefile_thread_data *) data;
 
   if (pi != NULL)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/procfs.h ./gdb/procfs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/procfs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/procfs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native debugging support for procfs targets.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-service.c ./gdb/proc-service.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-service.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-service.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* <proc_service.h> implementation.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -140,7 +140,7 @@ ps_err_e
 ps_pdread (gdb_ps_prochandle_t ph, psaddr_t addr,
 	   gdb_ps_read_buf_t buf, gdb_ps_size_t size)
 {
-  return ps_xfer_memory (ph, addr, buf, size, 0);
+  return ps_xfer_memory (ph, addr, (gdb_byte *) buf, size, 0);
 }
 
 /* Write SIZE bytes from BUF into the target process PH at address ADDR.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-service.list ./gdb/proc-service.list
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-service.list	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-service.list	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* -Wl,--dynamic-list symbols exported for libthread_db.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-utils.h ./gdb/proc-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-utils.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Machine independent support for SVR4 /proc (process file system) for GDB.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-why.c ./gdb/proc-why.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/proc-why.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/proc-why.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Machine-independent support for SVR4 /proc (process file system)
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/progspace.c ./gdb/progspace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/progspace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/progspace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Program and address space management, for GDB, the GNU debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -133,8 +133,16 @@ add_program_space (struct address_space 
 
   program_space_alloc_data (pspace);
 
-  pspace->next = program_spaces;
-  program_spaces = pspace;
+  if (program_spaces == NULL)
+    program_spaces = pspace;
+  else
+    {
+      struct program_space *last;
+
+      for (last = program_spaces; last->next != NULL; last = last->next)
+	;
+      last->next = pspace;
+    }
 
   return pspace;
 }
@@ -215,7 +223,7 @@ set_current_program_space (struct progra
 static void
 restore_program_space (void *arg)
 {
-  struct program_space *saved_pspace = arg;
+  struct program_space *saved_pspace = (struct program_space *) arg;
 
   set_current_program_space (saved_pspace);
 }
@@ -235,8 +243,8 @@ save_current_program_space (void)
 
 /* Returns true iff there's no inferior bound to PSPACE.  */
 
-static int
-pspace_empty_p (struct program_space *pspace)
+int
+program_space_empty_p (struct program_space *pspace)
 {
   if (find_inferior_for_program_space (pspace) != NULL)
       return 0;
@@ -244,30 +252,31 @@ pspace_empty_p (struct program_space *ps
   return 1;
 }
 
-/* Prune away automatically added program spaces that aren't required
-   anymore.  */
+/* Remove a program space from the program spaces list and release it.  It is
+   an error to call this function while PSPACE is the current program space. */
 
 void
-prune_program_spaces (void)
+delete_program_space (struct program_space *pspace)
 {
   struct program_space *ss, **ss_link;
-  struct program_space *current = current_program_space;
+  gdb_assert (pspace != NULL);
+  gdb_assert (pspace != current_program_space);
 
   ss = program_spaces;
   ss_link = &program_spaces;
-  while (ss)
+  while (ss != NULL)
     {
-      if (ss == current || !pspace_empty_p (ss))
+      if (ss == pspace)
 	{
-	  ss_link = &ss->next;
-	  ss = *ss_link;
-	  continue;
+	  *ss_link = ss->next;
+	  break;
 	}
 
-      *ss_link = ss->next;
-      release_program_space (ss);
+      ss_link = &ss->next;
       ss = *ss_link;
     }
+
+  release_program_space (pspace);
 }
 
 /* Prints the list of program spaces and their details on UIOUT.  If
@@ -294,10 +303,10 @@ print_program_space (struct ui_out *uiou
   gdb_assert (count > 0);
 
   old_chain = make_cleanup_ui_out_table_begin_end (uiout, 3, count, "pspaces");
-  ui_out_table_header (uiout, 1, ui_left, "current", "");
-  ui_out_table_header (uiout, 4, ui_left, "id", "Id");
-  ui_out_table_header (uiout, 17, ui_left, "exec", "Executable");
-  ui_out_table_body (uiout);
+  uiout->table_header (1, ui_left, "current", "");
+  uiout->table_header (4, ui_left, "id", "Id");
+  uiout->table_header (17, ui_left, "exec", "Executable");
+  uiout->table_body ();
 
   ALL_PSPACES (pspace)
     {
@@ -311,16 +320,16 @@ print_program_space (struct ui_out *uiou
       chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
       if (pspace == current_program_space)
-	ui_out_field_string (uiout, "current", "*");
+	uiout->field_string ("current", "*");
       else
-	ui_out_field_skip (uiout, "current");
+	uiout->field_skip ("current");
 
-      ui_out_field_int (uiout, "id", pspace->num);
+      uiout->field_int ("id", pspace->num);
 
       if (pspace->pspace_exec_filename)
-	ui_out_field_string (uiout, "exec", pspace->pspace_exec_filename);
+	uiout->field_string ("exec", pspace->pspace_exec_filename);
       else
-	ui_out_field_skip (uiout, "exec");
+	uiout->field_skip ("exec");
 
       /* Print extra info that doesn't really fit in tabular form.
 	 Currently, we print the list of inferiors bound to a pspace.
@@ -344,7 +353,7 @@ print_program_space (struct ui_out *uiou
 			       target_pid_to_str (pid_to_ptid (inf->pid)));
 	  }
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
       do_cleanups (chain2);
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/progspace.h ./gdb/progspace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/progspace.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/progspace.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Program and address space management, for GDB, the GNU debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -236,9 +236,16 @@ extern struct program_space *current_pro
    pointer to the new object.  */
 extern struct program_space *add_program_space (struct address_space *aspace);
 
+/* Remove a program space from the program spaces list and release it.  It is
+   an error to call this function while PSPACE is the current program space. */
+extern void delete_program_space (struct program_space *pspace);
+
 /* Returns the number of program spaces listed.  */
 extern int number_of_program_spaces (void);
 
+/* Returns true iff there's no inferior bound to PSPACE.  */
+extern int program_space_empty_p (struct program_space *pspace);
+
 /* Copies program space SRC to DEST.  Copies the main executable file,
    and the main symbol file.  Returns DEST.  */
 extern struct program_space *clone_program_space (struct program_space *dest,
@@ -289,10 +296,6 @@ extern int address_space_num (struct add
    mappings.  */
 extern void update_address_spaces (void);
 
-/* Prune away automatically added program spaces that aren't required
-   anymore.  */
-extern void prune_program_spaces (void);
-
 /* Reset saved solib data at the start of an solib event.  This lets
    us properly collect the data when calling solib_add, so it can then
    later be printed.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/prologue-value.c ./gdb/prologue-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/prologue-value.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/prologue-value.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Prologue value handling for GDB.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -314,7 +314,7 @@ struct pv_area
 struct pv_area *
 make_pv_area (int base_reg, int addr_bit)
 {
-  struct pv_area *a = (struct pv_area *) xmalloc (sizeof (*a));
+  struct pv_area *a = XNEW (struct pv_area);
 
   memset (a, 0, sizeof (*a));
 
@@ -490,7 +490,7 @@ pv_area_store (struct pv_area *area,
   else
     {
       CORE_ADDR offset = addr.k;
-      struct area_entry *e = (struct area_entry *) xmalloc (sizeof (*e));
+      struct area_entry *e = XNEW (struct area_entry);
 
       e->offset = offset;
       e->size = size;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/prologue-value.h ./gdb/prologue-value.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/prologue-value.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/prologue-value.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Interface to prologue value handling for GDB.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psympriv.h ./gdb/psympriv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psympriv.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/psympriv.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Private partial symbol table definitions.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 #define PSYMPRIV_H
 
 #include "psymtab.h"
+#include "objfiles.h"
 
 struct psymbol_allocation_list;
 
@@ -28,7 +29,7 @@ struct psymbol_allocation_list;
    symbols whose types we have not parsed yet.  For functions, it also
    contains their memory address, so we can find them from a PC value.
    Each partial_symbol sits in a partial_symtab, all of which are chained
-   on a  partial symtab list and which points to the corresponding 
+   on a  partial symtab list and which points to the corresponding
    normal symtab once the partial_symtab has been referenced.  */
 
 /* This structure is space critical.  See space comments at the top of
@@ -36,21 +37,19 @@ struct psymbol_allocation_list;
 
 struct partial_symbol
 {
-
   /* The general symbol info required for all types of symbols.  */
 
   struct general_symbol_info ginfo;
 
   /* Name space code.  */
 
-  ENUM_BITFIELD(domain_enum_tag) domain : 6;
+  ENUM_BITFIELD(domain_enum_tag) domain : SYMBOL_DOMAIN_BITS;
 
   /* Address class (for info_symbols).  Note that we don't allow
      synthetic "aclass" values here at present, simply because there's
      no need.  */
 
-  ENUM_BITFIELD(address_class) aclass : 6;
-
+  ENUM_BITFIELD(address_class) aclass : SYMBOL_ACLASS_BITS;
 };
 
 #define PSYMBOL_DOMAIN(psymbol)	(psymbol)->domain
@@ -79,7 +78,6 @@ enum psymtab_search_status
 
 struct partial_symtab
 {
-
   /* Chain of all existing partial symtabs.  */
 
   struct partial_symtab *next;
@@ -126,7 +124,7 @@ struct partial_symtab
      In DWARF terms, a shared psymtab is a DW_TAG_partial_unit; but
      of course using a name based on that would be too confusing, so
      "shared" was chosen instead.
-     
+
      Only a single user is needed because, when expanding a shared
      psymtab, we only need to expand its "canonical" non-shared user.
      The choice of which one should be canonical is left to the
@@ -204,15 +202,13 @@ struct partial_symtab
   void *read_symtab_private;
 };
 
-extern void sort_pst_symbols (struct objfile *, struct partial_symtab *);
-
 /* Add any kind of symbol to a psymbol_allocation_list.  */
 
 extern void add_psymbol_to_list (const char *, int,
 				 int, domain_enum,
 				 enum address_class,
 				 struct psymbol_allocation_list *,
-				 long, CORE_ADDR,
+				 CORE_ADDR,
 				 enum language, struct objfile *);
 
 extern void init_psymbol_list (struct objfile *, int);
@@ -222,13 +218,48 @@ extern struct partial_symtab *start_psym
 						    struct partial_symbol **,
 						    struct partial_symbol **);
 
+extern void end_psymtab_common (struct objfile *, struct partial_symtab *);
+
 extern struct partial_symtab *allocate_psymtab (const char *,
 						struct objfile *)
   ATTRIBUTE_NONNULL (1);
 
 extern void discard_psymtab (struct objfile *, struct partial_symtab *);
 
-extern struct cleanup *make_cleanup_discard_psymtabs (struct objfile *);
+/* Used when recording partial symbol tables.  On destruction,
+   discards any partial symbol tables that have been built.  However,
+   the tables can be kept by calling the "keep" method.  */
+class psymtab_discarder
+{
+ public:
+
+  psymtab_discarder (struct objfile *objfile)
+    : m_objfile (objfile),
+      m_psymtab (objfile->psymtabs)
+  {
+  }
+
+  ~psymtab_discarder ()
+  {
+    if (m_objfile != NULL)
+      while (m_objfile->psymtabs != m_psymtab)
+	discard_psymtab (m_objfile, m_objfile->psymtabs);
+  }
+
+  /* Keep any partial symbol tables that were built.  */
+  void keep ()
+  {
+    m_objfile = NULL;
+  }
+
+ private:
+
+  /* The objfile.  If NULL this serves as a sentinel to indicate that
+     the psymtabs should be kept.  */
+  struct objfile *m_objfile;
+  /* How far back to free.  */
+  struct partial_symtab *m_psymtab;
+};
 
 /* Traverse all psymtabs in one objfile.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psymtab.c ./gdb/psymtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psymtab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/psymtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Partial symbol tables.
-   
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,10 +36,6 @@
 #include "cp-support.h"
 #include "gdbcmd.h"
 
-#ifndef DEV_TTY
-#define DEV_TTY "/dev/tty"
-#endif
-
 struct psymbol_bcache
 {
   struct bcache *bcache;
@@ -127,13 +123,12 @@ require_partial_symbols (struct objfile 
 /* Helper function for psym_map_symtabs_matching_filename that
    expands the symtabs and calls the iterator.  */
 
-static int
+static bool
 partial_map_expand_apply (struct objfile *objfile,
 			  const char *name,
 			  const char *real_path,
 			  struct partial_symtab *pst,
-			  int (*callback) (struct symtab *, void *),
-			  void *data)
+			  gdb::function_view<bool (symtab *)> callback)
 {
   struct compunit_symtab *last_made = objfile->compunit_symtabs;
 
@@ -149,20 +144,19 @@ partial_map_expand_apply (struct objfile
      all of them.  */
   psymtab_to_symtab (objfile, pst);
 
-  return iterate_over_some_symtabs (name, real_path, callback, data,
-				    objfile->compunit_symtabs, last_made);
+  return iterate_over_some_symtabs (name, real_path, objfile->compunit_symtabs,
+				    last_made, callback);
 }
 
 /*  Psymtab version of map_symtabs_matching_filename.  See its definition in
     the definition of quick_symbol_functions in symfile.h.  */
 
-static int
-psym_map_symtabs_matching_filename (struct objfile *objfile,
-				    const char *name,
-				    const char *real_path,
-				    int (*callback) (struct symtab *,
-						     void *),
-				    void *data)
+static bool
+psym_map_symtabs_matching_filename
+  (struct objfile *objfile,
+   const char *name,
+   const char *real_path,
+   gdb::function_view<bool (symtab *)> callback)
 {
   struct partial_symtab *pst;
   const char *name_basename = lbasename (name);
@@ -181,8 +175,8 @@ psym_map_symtabs_matching_filename (stru
     if (compare_filenames_for_search (pst->filename, name))
       {
 	if (partial_map_expand_apply (objfile, name, real_path,
-				      pst, callback, data))
-	  return 1;
+				      pst, callback))
+	  return true;
 	continue;
       }
 
@@ -195,8 +189,8 @@ psym_map_symtabs_matching_filename (stru
     if (compare_filenames_for_search (psymtab_to_fullname (pst), name))
       {
 	if (partial_map_expand_apply (objfile, name, real_path,
-				      pst, callback, data))
-	  return 1;
+				      pst, callback))
+	  return true;
 	continue;
       }
 
@@ -209,14 +203,14 @@ psym_map_symtabs_matching_filename (stru
 	if (filename_cmp (psymtab_to_fullname (pst), real_path) == 0)
 	  {
 	    if (partial_map_expand_apply (objfile, name, real_path,
-					  pst, callback, data))
-	      return 1;
+					  pst, callback))
+	      return true;
 	    continue;
 	  }
       }
   }
 
-  return 0;
+  return false;
 }
 
 /* Find which partial symtab contains PC and SECTION starting at psymtab PST.
@@ -238,12 +232,12 @@ find_pc_sect_psymtab_closer (struct objf
      many partial symbol tables containing the PC, but
      we want the partial symbol table that contains the
      function containing the PC.  */
-  if (!(objfile->flags & OBJF_REORDERED) &&
-      section == 0)	/* Can't validate section this way.  */
+  if (!(objfile->flags & OBJF_REORDERED)
+      && section == NULL)  /* Can't validate section this way.  */
     return pst;
 
   if (msymbol.minsym == NULL)
-    return (pst);
+    return pst;
 
   /* The code range of partial symtabs sometimes overlap, so, in
      the loop below, we need to check all partial symtabs and
@@ -265,8 +259,8 @@ find_pc_sect_psymtab_closer (struct objf
 	     object's symbol table.  */
 	  p = find_pc_sect_psymbol (objfile, tpst, pc, section);
 	  if (p != NULL
-	      && SYMBOL_VALUE_ADDRESS (p)
-	      == BMSYMBOL_VALUE_ADDRESS (msymbol))
+	      && (SYMBOL_VALUE_ADDRESS (p)
+		  == BMSYMBOL_VALUE_ADDRESS (msymbol)))
 	    return tpst;
 
 	  /* Also accept the textlow value of a psymtab as a
@@ -298,10 +292,11 @@ find_pc_sect_psymtab_closer (struct objf
   return best_pst;
 }
 
-/* Find which partial symtab contains PC and SECTION.  Return 0 if
+/* Find which partial symtab contains PC and SECTION.  Return NULL if
    none.  We return the psymtab that contains a symbol whose address
    exactly matches PC, or, if we cannot find an exact match, the
    psymtab that contains a symbol whose address is closest to PC.  */
+
 static struct partial_symtab *
 find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
 		      struct obj_section *section,
@@ -314,13 +309,14 @@ find_pc_sect_psymtab (struct objfile *ob
 
   if (objfile->psymtabs_addrmap != NULL)
     {
-      pst = addrmap_find (objfile->psymtabs_addrmap, pc);
+      pst = ((struct partial_symtab *)
+	     addrmap_find (objfile->psymtabs_addrmap, pc));
       if (pst != NULL)
 	{
 	  /* FIXME: addrmaps currently do not handle overlayed sections,
 	     so fall back to the non-addrmap case if we're debugging
 	     overlays and the addrmap returned the wrong section.  */
-	  if (overlay_debugging && msymbol.minsym && section)
+	  if (overlay_debugging && msymbol.minsym != NULL && section != NULL)
 	    {
 	      struct partial_symbol *p;
 
@@ -329,9 +325,9 @@ find_pc_sect_psymtab (struct objfile *ob
 		 true; the debug info might be much richer than the
 		 object's symbol table.  */
 	      p = find_pc_sect_psymbol (objfile, pst, pc, section);
-	      if (!p
-		  || SYMBOL_VALUE_ADDRESS (p)
-		  != BMSYMBOL_VALUE_ADDRESS (msymbol))
+	      if (p == NULL
+		  || (SYMBOL_VALUE_ADDRESS (p)
+		      != BMSYMBOL_VALUE_ADDRESS (msymbol)))
 		goto next;
 	    }
 
@@ -371,8 +367,8 @@ find_pc_sect_psymtab (struct objfile *ob
   return NULL;
 }
 
-/*  Psymtab version of find_pc_sect_compunit_symtab.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of find_pc_sect_compunit_symtab.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static struct compunit_symtab *
 psym_find_pc_sect_compunit_symtab (struct objfile *objfile,
@@ -383,7 +379,7 @@ psym_find_pc_sect_compunit_symtab (struc
 {
   struct partial_symtab *ps = find_pc_sect_psymtab (objfile, pc, section,
 						    msymbol);
-  if (ps)
+  if (ps != NULL)
     {
       if (warn_if_readin && ps->readin)
 	/* Might want to error() here (in case symtab is corrupt and
@@ -399,7 +395,7 @@ psym_find_pc_sect_compunit_symtab (struc
 }
 
 /* Find which partial symbol within a psymtab matches PC and SECTION.
-   Return 0 if none.  */
+   Return NULL if none.  */
 
 static struct partial_symbol *
 find_pc_sect_psymbol (struct objfile *objfile,
@@ -418,8 +414,8 @@ find_pc_sect_psymbol (struct objfile *ob
      find_pc_partial_function doesn't use a minimal symbol and thus
      cache a bad endaddr.  */
   for (pp = objfile->global_psymbols.list + psymtab->globals_offset;
-    (pp - (objfile->global_psymbols.list + psymtab->globals_offset)
-     < psymtab->n_global_syms);
+       (pp - (objfile->global_psymbols.list + psymtab->globals_offset)
+	< psymtab->n_global_syms);
        pp++)
     {
       p = *pp;
@@ -430,7 +426,7 @@ find_pc_sect_psymbol (struct objfile *ob
 	      || (psymtab->textlow == 0
 		  && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0)))
 	{
-	  if (section)		/* Match on a specific section.  */
+	  if (section != NULL)  /* Match on a specific section.  */
 	    {
 	      fixup_psymbol_section (p, objfile);
 	      if (!matching_obj_sections (SYMBOL_OBJ_SECTION (objfile, p),
@@ -443,8 +439,8 @@ find_pc_sect_psymbol (struct objfile *ob
     }
 
   for (pp = objfile->static_psymbols.list + psymtab->statics_offset;
-    (pp - (objfile->static_psymbols.list + psymtab->statics_offset)
-     < psymtab->n_static_syms);
+       (pp - (objfile->static_psymbols.list + psymtab->statics_offset)
+	< psymtab->n_static_syms);
        pp++)
     {
       p = *pp;
@@ -455,7 +451,7 @@ find_pc_sect_psymbol (struct objfile *ob
 	      || (psymtab->textlow == 0
 		  && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0)))
 	{
-	  if (section)		/* Match on a specific section.  */
+	  if (section != NULL)  /* Match on a specific section.  */
 	    {
 	      fixup_psymbol_section (p, objfile);
 	      if (!matching_obj_sections (SYMBOL_OBJ_SECTION (objfile, p),
@@ -475,7 +471,7 @@ fixup_psymbol_section (struct partial_sy
 {
   CORE_ADDR addr;
 
-  if (!psym)
+  if (psym == NULL)
     return;
 
   if (SYMBOL_SECTION (psym) >= 0)
@@ -499,8 +495,8 @@ fixup_psymbol_section (struct partial_sy
   fixup_section (&psym->ginfo, addr, objfile);
 }
 
-/*  Psymtab version of lookup_symbol.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of lookup_symbol.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static struct compunit_symtab *
 psym_lookup_symbol (struct objfile *objfile,
@@ -589,9 +585,6 @@ match_partial_symbol (struct objfile *ob
 	{
 	  center = bottom + (top - bottom) / 2;
 	  gdb_assert (center < top);
-	  if (!do_linear_search
-	      && (SYMBOL_LANGUAGE (*center) == language_java))
-	    do_linear_search = 1;
 	  if (ordered_compare (SYMBOL_SEARCH_NAME (*center), name) >= 0)
 	    top = center;
 	  else
@@ -640,7 +633,6 @@ psymtab_search_name (const char *name)
   switch (current_language->la_language)
     {
     case language_cplus:
-    case language_java:
       {
 	if (strchr (name, '('))
 	  {
@@ -675,9 +667,7 @@ lookup_partial_symbol (struct objfile *o
   struct cleanup *cleanup;
 
   if (length == 0)
-    {
-      return (NULL);
-    }
+    return NULL;
 
   search_name = psymtab_search_name (name);
   cleanup = make_cleanup (xfree, search_name);
@@ -704,11 +694,6 @@ lookup_partial_symbol (struct objfile *o
 	  if (!(center < top))
 	    internal_error (__FILE__, __LINE__,
 			    _("failed internal consistency check"));
-	  if (!do_linear_search
-	      && SYMBOL_LANGUAGE (*center) == language_java)
-	    {
-	      do_linear_search = 1;
-	    }
 	  if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center),
 				 search_name) >= 0)
 	    {
@@ -737,7 +722,7 @@ lookup_partial_symbol (struct objfile *o
 				     SYMBOL_DOMAIN (*top), domain))
 	    {
 	      do_cleanups (cleanup);
-	      return (*top);
+	      return *top;
 	    }
 	  top++;
 	}
@@ -755,13 +740,13 @@ lookup_partial_symbol (struct objfile *o
 	      && SYMBOL_MATCHES_SEARCH_NAME (*psym, search_name))
 	    {
 	      do_cleanups (cleanup);
-	      return (*psym);
+	      return *psym;
 	    }
 	}
     }
 
   do_cleanups (cleanup);
-  return (NULL);
+  return NULL;
 }
 
 /* Get the symbol table that corresponds to a partial_symtab.
@@ -794,8 +779,8 @@ psymtab_to_symtab (struct objfile *objfi
   return pst->compunit_symtab;
 }
 
-/*  Psymtab version of relocate.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of relocate.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_relocate (struct objfile *objfile,
@@ -831,14 +816,14 @@ psym_relocate (struct objfile *objfile,
     }
 }
 
-/*  Psymtab version of find_last_source_symtab.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of find_last_source_symtab.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static struct symtab *
 psym_find_last_source_symtab (struct objfile *ofp)
 {
   struct partial_symtab *ps;
-  struct partial_symtab *cs_pst = 0;
+  struct partial_symtab *cs_pst = NULL;
 
   ALL_OBJFILE_PSYMTABS_REQUIRED (ofp, ps)
     {
@@ -870,8 +855,8 @@ psym_find_last_source_symtab (struct obj
   return NULL;
 }
 
-/*  Psymtab version of forget_cached_source_info.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of forget_cached_source_info.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_forget_cached_source_info (struct objfile *objfile)
@@ -1053,8 +1038,8 @@ dump_psymtab (struct objfile *objfile, s
   fprintf_filtered (outfile, "\n");
 }
 
-/*  Psymtab version of print_stats.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of print_stats.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_print_stats (struct objfile *objfile)
@@ -1071,8 +1056,8 @@ psym_print_stats (struct objfile *objfil
   printf_filtered (_("  Number of psym tables (not yet expanded): %d\n"), i);
 }
 
-/*  Psymtab version of dump.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of dump.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_dump (struct objfile *objfile)
@@ -1096,8 +1081,8 @@ psym_dump (struct objfile *objfile)
     }
 }
 
-/*  Psymtab version of expand_symtabs_for_function.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of expand_symtabs_for_function.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_expand_symtabs_for_function (struct objfile *objfile,
@@ -1118,8 +1103,8 @@ psym_expand_symtabs_for_function (struct
   }
 }
 
-/*  Psymtab version of expand_all_symtabs.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of expand_all_symtabs.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_expand_all_symtabs (struct objfile *objfile)
@@ -1132,8 +1117,8 @@ psym_expand_all_symtabs (struct objfile 
     }
 }
 
-/*  Psymtab version of expand_symtabs_with_fullname.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of expand_symtabs_with_fullname.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_expand_symtabs_with_fullname (struct objfile *objfile,
@@ -1156,8 +1141,8 @@ psym_expand_symtabs_with_fullname (struc
     }
 }
 
-/*  Psymtab version of map_symbol_filenames.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of map_symbol_filenames.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_map_symbol_filenames (struct objfile *objfile,
@@ -1224,7 +1209,8 @@ psymtab_to_fullname (struct partial_symt
 	  if (ps->dirname == NULL || IS_ABSOLUTE_PATH (ps->filename))
 	    fullname = xstrdup (ps->filename);
 	  else
-	    fullname = concat (ps->dirname, SLASH_STRING, ps->filename, NULL);
+	    fullname = concat (ps->dirname, SLASH_STRING,
+			       ps->filename, (char *) NULL);
 
 	  back_to = make_cleanup (xfree, fullname);
 	  ps->fullname = rewrite_source_path (fullname);
@@ -1232,15 +1218,15 @@ psymtab_to_fullname (struct partial_symt
 	    ps->fullname = xstrdup (fullname);
 	  do_cleanups (back_to);
 	}
-    } 
+    }
 
   return ps->fullname;
 }
 
-/*  For all symbols, s, in BLOCK that are in DOMAIN and match NAME
-    according to the function MATCH, call CALLBACK(BLOCK, s, DATA).
-    BLOCK is assumed to come from OBJFILE.  Returns 1 iff CALLBACK
-    ever returns non-zero, and otherwise returns 0.  */
+/* For all symbols, s, in BLOCK that are in DOMAIN and match NAME
+   according to the function MATCH, call CALLBACK(BLOCK, s, DATA).
+   BLOCK is assumed to come from OBJFILE.  Returns 1 iff CALLBACK
+   ever returns non-zero, and otherwise returns 0.  */
 
 static int
 map_block (const char *name, domain_enum domain, struct objfile *objfile,
@@ -1254,7 +1240,7 @@ map_block (const char *name, domain_enum
   for (sym = block_iter_match_first (block, name, match, &iter);
        sym != NULL; sym = block_iter_match_next (name, match, &iter))
     {
-      if (symbol_matches_domain (SYMBOL_LANGUAGE (sym), 
+      if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
 				 SYMBOL_DOMAIN (sym), domain))
 	{
 	  if (callback (block, sym, data))
@@ -1265,8 +1251,8 @@ map_block (const char *name, domain_enum
   return 0;
 }
 
-/*  Psymtab version of map_matching_symbols.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of map_matching_symbols.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_map_matching_symbols (struct objfile *objfile,
@@ -1301,24 +1287,22 @@ psym_map_matching_symbols (struct objfil
 	    return;
 	}
     }
-}	    
+}
 
-/* A helper for psym_expand_symtabs_matching that handles
-   searching included psymtabs.  This returns 1 if a symbol is found,
-   and zero otherwise.  It also updates the 'searched_flag' on the
+/* A helper for psym_expand_symtabs_matching that handles searching
+   included psymtabs.  This returns true if a symbol is found, and
+   false otherwise.  It also updates the 'searched_flag' on the
    various psymtabs that it searches.  */
 
-static int
-recursively_search_psymtabs (struct partial_symtab *ps,
-			     struct objfile *objfile,
-			     enum search_domain kind,
-			     expand_symtabs_symbol_matcher_ftype *sym_matcher,
-			     void *data)
+static bool
+recursively_search_psymtabs
+  (struct partial_symtab *ps, struct objfile *objfile, enum search_domain kind,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> sym_matcher)
 {
   struct partial_symbol **psym;
   struct partial_symbol **bound, **gbound, **sbound;
   int keep_going = 1;
-  int result = PST_SEARCHED_AND_NOT_FOUND;
+  enum psymtab_search_status result = PST_SEARCHED_AND_NOT_FOUND;
   int i;
 
   if (ps->searched_flag != PST_NOT_SEARCHED)
@@ -1335,11 +1319,11 @@ recursively_search_psymtabs (struct part
 	continue;
 
       r = recursively_search_psymtabs (ps->dependencies[i],
-				       objfile, kind, sym_matcher, data);
+				       objfile, kind, sym_matcher);
       if (r != 0)
 	{
 	  ps->searched_flag = PST_SEARCHED_AND_FOUND;
-	  return 1;
+	  return true;
 	}
     }
 
@@ -1377,7 +1361,7 @@ recursively_search_psymtabs (struct part
 		   && PSYMBOL_CLASS (*psym) == LOC_BLOCK)
 	       || (kind == TYPES_DOMAIN
 		   && PSYMBOL_CLASS (*psym) == LOC_TYPEDEF))
-	      && (*sym_matcher) (SYMBOL_SEARCH_NAME (*psym), data))
+	      && sym_matcher (SYMBOL_SEARCH_NAME (*psym)))
 	    {
 	      /* Found a match, so notify our caller.  */
 	      result = PST_SEARCHED_AND_FOUND;
@@ -1391,17 +1375,16 @@ recursively_search_psymtabs (struct part
   return result == PST_SEARCHED_AND_FOUND;
 }
 
-/*  Psymtab version of expand_symtabs_matching.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of expand_symtabs_matching.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static void
 psym_expand_symtabs_matching
   (struct objfile *objfile,
-   expand_symtabs_file_matcher_ftype *file_matcher,
-   expand_symtabs_symbol_matcher_ftype *symbol_matcher,
-   expand_symtabs_exp_notify_ftype *expansion_notify,
-   enum search_domain kind,
-   void *data)
+   gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+   enum search_domain kind)
 {
   struct partial_symtab *ps;
 
@@ -1425,37 +1408,37 @@ psym_expand_symtabs_matching
 
       if (file_matcher)
 	{
-	  int match;
+	  bool match;
 
 	  if (ps->anonymous)
 	    continue;
 
-	  match = (*file_matcher) (ps->filename, data, 0);
+	  match = file_matcher (ps->filename, false);
 	  if (!match)
 	    {
 	      /* Before we invoke realpath, which can get expensive when many
 		 files are involved, do a quick comparison of the basenames.  */
 	      if (basenames_may_differ
-		  || (*file_matcher) (lbasename (ps->filename), data, 1))
-		match = (*file_matcher) (psymtab_to_fullname (ps), data, 0);
+		  || file_matcher (lbasename (ps->filename), true))
+		match = file_matcher (psymtab_to_fullname (ps), false);
 	    }
 	  if (!match)
 	    continue;
 	}
 
-      if (recursively_search_psymtabs (ps, objfile, kind, symbol_matcher, data))
+      if (recursively_search_psymtabs (ps, objfile, kind, symbol_matcher))
 	{
 	  struct compunit_symtab *symtab =
 	    psymtab_to_symtab (objfile, ps);
 
 	  if (expansion_notify != NULL)
-	    expansion_notify (symtab, data);
+	    expansion_notify (symtab);
 	}
     }
 }
 
-/*  Psymtab version of has_symbols.  See its definition in
-    the definition of quick_symbol_functions in symfile.h.  */
+/* Psymtab version of has_symbols.  See its definition in
+   the definition of quick_symbol_functions in symfile.h.  */
 
 static int
 psym_has_symbols (struct objfile *objfile)
@@ -1490,14 +1473,14 @@ const struct quick_symbol_functions psym
 static int
 compare_psymbols (const void *s1p, const void *s2p)
 {
-  struct partial_symbol *const *s1 = s1p;
-  struct partial_symbol *const *s2 = s2p;
+  struct partial_symbol *const *s1 = (struct partial_symbol * const*) s1p;
+  struct partial_symbol *const *s2 = (struct partial_symbol * const*) s2p;
 
   return strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*s1),
 			    SYMBOL_SEARCH_NAME (*s2));
 }
 
-void
+static void
 sort_pst_symbols (struct objfile *objfile, struct partial_symtab *pst)
 {
   /* Sort the global list; don't sort the static list.  */
@@ -1525,7 +1508,22 @@ start_psymtab_common (struct objfile *ob
   psymtab->texthigh = psymtab->textlow;		/* default */
   psymtab->globals_offset = global_syms - objfile->global_psymbols.list;
   psymtab->statics_offset = static_syms - objfile->static_psymbols.list;
-  return (psymtab);
+  return psymtab;
+}
+
+/* Perform "finishing up" operations of a partial symtab.  */
+
+void
+end_psymtab_common (struct objfile *objfile, struct partial_symtab *pst)
+{
+  pst->n_global_syms
+    = objfile->global_psymbols.next - (objfile->global_psymbols.list
+				       + pst->globals_offset);
+  pst->n_static_syms
+    = objfile->static_psymbols.next - (objfile->static_psymbols.list
+				       + pst->statics_offset);
+
+  sort_pst_symbols (objfile, pst);
 }
 
 /* Calculate a hash code for the given partial symbol.  The hash is
@@ -1561,7 +1559,7 @@ psymbol_compare (const void *addr1, cons
   struct partial_symbol *sym1 = (struct partial_symbol *) addr1;
   struct partial_symbol *sym2 = (struct partial_symbol *) addr2;
 
-  return (memcmp (&sym1->ginfo.value, &sym1->ginfo.value,
+  return (memcmp (&sym1->ginfo.value, &sym2->ginfo.value,
                   sizeof (sym1->ginfo.value)) == 0
 	  && sym1->ginfo.language == sym2->ginfo.language
           && PSYMBOL_DOMAIN (sym1) == PSYMBOL_DOMAIN (sym2)
@@ -1575,11 +1573,13 @@ struct psymbol_bcache *
 psymbol_bcache_init (void)
 {
   struct psymbol_bcache *bcache = XCNEW (struct psymbol_bcache);
+
   bcache->bcache = bcache_xmalloc (psymbol_hash, psymbol_compare);
   return bcache;
 }
 
 /* Free a partial symbol bcache.  */
+
 void
 psymbol_bcache_free (struct psymbol_bcache *bcache)
 {
@@ -1608,13 +1608,12 @@ psymbol_bcache_full (struct partial_symb
                      struct psymbol_bcache *bcache,
                      int *added)
 {
-  return bcache_full (sym,
-                      sizeof (struct partial_symbol),
-                      bcache->bcache,
-                      added);
+  return ((const struct partial_symbol *)
+	  bcache_full (sym, sizeof (struct partial_symbol), bcache->bcache,
+		       added));
 }
 
-/* Helper function, initialises partial symbol structure and stashes 
+/* Helper function, initialises partial symbol structure and stashes
    it into objfile's bcache.  Note that our caching mechanism will
    use all fields of struct partial_symbol to determine hash value of the
    structure.  In other words, having two symbols with the same name but
@@ -1624,8 +1623,7 @@ static const struct partial_symbol *
 add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
 		       domain_enum domain,
 		       enum address_class theclass,
-		       long val,	/* Value as a long */
-		       CORE_ADDR coreaddr,	/* Value as a CORE_ADDR */
+		       CORE_ADDR coreaddr,
 		       enum language language, struct objfile *objfile,
 		       int *added)
 {
@@ -1636,15 +1634,7 @@ add_psymbol_to_bcache (const char *name,
      holes.  */
   memset (&psymbol, 0, sizeof (psymbol));
 
-  /* val and coreaddr are mutually exclusive, one of them *will* be zero.  */
-  if (val != 0)
-    {
-      SYMBOL_VALUE (&psymbol) = val;
-    }
-  else
-    {
-      SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
-    }
+  SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
   SYMBOL_SECTION (&psymbol) = -1;
   SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
   PSYMBOL_DOMAIN (&psymbol) = domain;
@@ -1653,9 +1643,7 @@ add_psymbol_to_bcache (const char *name,
   SYMBOL_SET_NAMES (&psymbol, name, namelength, copy_name, objfile);
 
   /* Stash the partial symbol away in the cache.  */
-  return psymbol_bcache_full (&psymbol,
-                              objfile->psymbol_cache,
-                              added);
+  return psymbol_bcache_full (&psymbol, objfile->psymbol_cache, added);
 }
 
 /* Increase the space allocated for LISTP, which is probably
@@ -1671,8 +1659,7 @@ extend_psymbol_list (struct psymbol_allo
   if (listp->size == 0)
     {
       new_size = 255;
-      listp->list = (struct partial_symbol **)
-	xmalloc (new_size * sizeof (struct partial_symbol *));
+      listp->list = XNEWVEC (struct partial_symbol *, new_size);
     }
   else
     {
@@ -1687,8 +1674,7 @@ extend_psymbol_list (struct psymbol_allo
   listp->size = new_size;
 }
 
-/* Helper function, adds partial symbol to the given partial symbol
-   list.  */
+/* Helper function, adds partial symbol to the given partial symbol list.  */
 
 static void
 append_psymbol_to_list (struct psymbol_allocation_list *list,
@@ -1703,15 +1689,16 @@ append_psymbol_to_list (struct psymbol_a
 
 /* Add a symbol with a long value to a psymtab.
    Since one arg is a struct, we pass in a ptr and deref it (sigh).
+   The only value we need to store for psyms is an address.
+   For all other psyms pass zero for COREADDR.
    Return the partial symbol that has been added.  */
 
 void
 add_psymbol_to_list (const char *name, int namelength, int copy_name,
 		     domain_enum domain,
 		     enum address_class theclass,
-		     struct psymbol_allocation_list *list, 
-		     long val,	/* Value as a long */
-		     CORE_ADDR coreaddr,	/* Value as a CORE_ADDR */
+		     struct psymbol_allocation_list *list,
+		     CORE_ADDR coreaddr,
 		     enum language language, struct objfile *objfile)
 {
   const struct partial_symbol *psym;
@@ -1720,7 +1707,7 @@ add_psymbol_to_list (const char *name, i
 
   /* Stash the partial symbol away in the cache.  */
   psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, theclass,
-				val, coreaddr, language, objfile, &added);
+				coreaddr, language, objfile, &added);
 
   /* Do not duplicate global partial symbols.  */
   if (list == &objfile->global_psymbols
@@ -1739,13 +1726,9 @@ init_psymbol_list (struct objfile *objfi
   /* Free any previously allocated psymbol lists.  */
 
   if (objfile->global_psymbols.list)
-    {
-      xfree (objfile->global_psymbols.list);
-    }
+    xfree (objfile->global_psymbols.list);
   if (objfile->static_psymbols.list)
-    {
-      xfree (objfile->static_psymbols.list);
-    }
+    xfree (objfile->static_psymbols.list);
 
   /* Current best guess is that approximately a twentieth
      of the total symbols (in a debugging file) are global or static
@@ -1757,16 +1740,14 @@ init_psymbol_list (struct objfile *objfi
   if (objfile->global_psymbols.size > 0)
     {
       objfile->global_psymbols.next =
-	objfile->global_psymbols.list = (struct partial_symbol **)
-	xmalloc ((objfile->global_psymbols.size
-		  * sizeof (struct partial_symbol *)));
+	objfile->global_psymbols.list =
+	  XNEWVEC (struct partial_symbol *, objfile->global_psymbols.size);
     }
   if (objfile->static_psymbols.size > 0)
     {
       objfile->static_psymbols.next =
-	objfile->static_psymbols.list = (struct partial_symbol **)
-	xmalloc ((objfile->static_psymbols.size
-		  * sizeof (struct partial_symbol *)));
+	objfile->static_psymbols.list =
+	  XNEWVEC (struct partial_symbol *, objfile->static_psymbols.size);
     }
 }
 
@@ -1786,8 +1767,9 @@ allocate_psymtab (const char *filename, 
 		     sizeof (struct partial_symtab));
 
   memset (psymtab, 0, sizeof (struct partial_symtab));
-  psymtab->filename = bcache (filename, strlen (filename) + 1,
-			      objfile->per_bfd->filename_cache);
+  psymtab->filename
+    = (const char *) bcache (filename, strlen (filename) + 1,
+			     objfile->per_bfd->filename_cache);
   psymtab->compunit_symtab = NULL;
 
   /* Prepend it to the psymtab list for the objfile it belongs to.
@@ -1817,7 +1799,7 @@ allocate_psymtab (const char *filename, 
 			  host_address_to_string (psymtab), filename);
     }
 
-  return (psymtab);
+  return psymtab;
 }
 
 void
@@ -1845,95 +1827,247 @@ discard_psymtab (struct objfile *objfile
   objfile->free_psymtabs = pst;
 }
 
-/* An object of this type is passed to discard_psymtabs_upto.  */
+
 
-struct psymtab_state
-{
-  /* The objfile where psymtabs are discarded.  */
+/* We need to pass a couple of items to the addrmap_foreach function,
+   so use a struct.  */
 
+struct dump_psymtab_addrmap_data
+{
   struct objfile *objfile;
+  struct partial_symtab *psymtab;
+  struct ui_file *outfile;
 
-  /* The first psymtab to save.  */
-
-  struct partial_symtab *save;
+  /* Non-zero if the previously printed addrmap entry was for PSYMTAB.
+     If so, we want to print the next one as well (since the next addrmap
+     entry defines the end of the range).  */
+  int previous_matched;
 };
 
-/* A cleanup function used by make_cleanup_discard_psymtabs.  */
+/* Helper function for dump_psymtab_addrmap to print an addrmap entry.  */
 
-static void
-discard_psymtabs_upto (void *arg)
+static int
+dump_psymtab_addrmap_1 (void *datap, CORE_ADDR start_addr, void *obj)
 {
-  struct psymtab_state *state = arg;
+  struct dump_psymtab_addrmap_data *data
+    = (struct dump_psymtab_addrmap_data *) datap;
+  struct gdbarch *gdbarch = get_objfile_arch (data->objfile);
+  struct partial_symtab *addrmap_psymtab = (struct partial_symtab *) obj;
+  const char *psymtab_address_or_end = NULL;
+
+  QUIT;
+
+  if (data->psymtab == NULL
+      || data->psymtab == addrmap_psymtab)
+    psymtab_address_or_end = host_address_to_string (addrmap_psymtab);
+  else if (data->previous_matched)
+    psymtab_address_or_end = "<ends here>";
+
+  if (data->psymtab == NULL
+      || data->psymtab == addrmap_psymtab
+      || data->previous_matched)
+    {
+      fprintf_filtered (data->outfile, "  %s%s %s\n",
+			data->psymtab != NULL ? "  " : "",
+			paddress (gdbarch, start_addr),
+			psymtab_address_or_end);
+    }
 
-  while (state->objfile->psymtabs != state->save)
-    discard_psymtab (state->objfile, state->objfile->psymtabs);
+  data->previous_matched = (data->psymtab == NULL
+			    || data->psymtab == addrmap_psymtab);
+
+  return 0;
 }
 
-/* Return a new cleanup that discards all psymtabs created in OBJFILE
-   after this function is called.  */
+/* Helper function for maintenance_print_psymbols to print the addrmap
+   of PSYMTAB.  If PSYMTAB is NULL print the entire addrmap.  */
 
-struct cleanup *
-make_cleanup_discard_psymtabs (struct objfile *objfile)
+static void
+dump_psymtab_addrmap (struct objfile *objfile, struct partial_symtab *psymtab,
+		      struct ui_file *outfile)
 {
-  struct psymtab_state *state = XNEW (struct psymtab_state);
-
-  state->objfile = objfile;
-  state->save = objfile->psymtabs;
+  struct dump_psymtab_addrmap_data addrmap_dump_data;
 
-  return make_cleanup_dtor (discard_psymtabs_upto, state, xfree);
+  if ((psymtab == NULL
+       || psymtab->psymtabs_addrmap_supported)
+      && objfile->psymtabs_addrmap != NULL)
+    {
+      addrmap_dump_data.objfile = objfile;
+      addrmap_dump_data.psymtab = psymtab;
+      addrmap_dump_data.outfile = outfile;
+      addrmap_dump_data.previous_matched = 0;
+      fprintf_filtered (outfile, "%sddress map:\n",
+			psymtab == NULL ? "Entire a" : "  A");
+      addrmap_foreach (objfile->psymtabs_addrmap, dump_psymtab_addrmap_1,
+		       &addrmap_dump_data);
+    }
 }
 
-
-
 static void
 maintenance_print_psymbols (char *args, int from_tty)
 {
   char **argv;
-  struct ui_file *outfile;
+  struct ui_file *outfile = gdb_stdout;
   struct cleanup *cleanups;
-  char *symname = NULL;
-  char *filename = DEV_TTY;
+  char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
   struct objfile *objfile;
   struct partial_symtab *ps;
+  int i, outfile_idx, found;
+  CORE_ADDR pc = 0;
+  struct obj_section *section = NULL;
 
   dont_repeat ();
 
-  if (args == NULL)
-    {
-      error (_("\
-print-psymbols takes an output file name and optional symbol file name"));
-    }
   argv = gdb_buildargv (args);
   cleanups = make_cleanup_freeargv (argv);
 
-  if (argv[0] != NULL)
+  for (i = 0; argv != NULL && argv[i] != NULL; ++i)
     {
-      filename = argv[0];
-      /* If a second arg is supplied, it is a source file name to match on.  */
-      if (argv[1] != NULL)
+      if (strcmp (argv[i], "-pc") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing pc value"));
+	  address_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "-source") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing source file"));
+	  source_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "-objfile") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing objfile name"));
+	  objfile_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "--") == 0)
+	{
+	  /* End of options.  */
+	  ++i;
+	  break;
+	}
+      else if (argv[i][0] == '-')
 	{
-	  symname = argv[1];
+	  /* Future proofing: Don't allow OUTFILE to begin with "-".  */
+	  error (_("Unknown option: %s"), argv[i]);
 	}
+      else
+	break;
     }
+  outfile_idx = i;
 
-  filename = tilde_expand (filename);
-  make_cleanup (xfree, filename);
+  if (address_arg != NULL && source_arg != NULL)
+    error (_("Must specify at most one of -pc and -source"));
 
-  outfile = gdb_fopen (filename, FOPEN_WT);
-  if (outfile == 0)
-    perror_with_name (filename);
-  make_cleanup_ui_file_delete (outfile);
+  stdio_file arg_outfile;
 
-  ALL_PSYMTABS (objfile, ps)
+  if (argv != NULL && argv[outfile_idx] != NULL)
     {
+      char *outfile_name;
+
+      if (argv[outfile_idx + 1] != NULL)
+	error (_("Junk at end of command"));
+      outfile_name = tilde_expand (argv[outfile_idx]);
+      make_cleanup (xfree, outfile_name);
+      if (!arg_outfile.open (outfile_name, FOPEN_WT))
+	perror_with_name (outfile_name);
+      outfile = &arg_outfile;
+    }
+
+  if (address_arg != NULL)
+    {
+      pc = parse_and_eval_address (address_arg);
+      /* If we fail to find a section, that's ok, try the lookup anyway.  */
+      section = find_pc_section (pc);
+    }
+
+  found = 0;
+  ALL_OBJFILES (objfile)
+    {
+      int printed_objfile_header = 0;
+      int print_for_objfile = 1;
+
       QUIT;
-      if (symname == NULL || filename_cmp (symname, ps->filename) == 0)
-	dump_psymtab (objfile, ps, outfile);
+      if (objfile_arg != NULL)
+	print_for_objfile
+	  = compare_filenames_for_search (objfile_name (objfile),
+					  objfile_arg);
+      if (!print_for_objfile)
+	continue;
+
+      if (address_arg != NULL)
+	{
+	  struct bound_minimal_symbol msymbol = { NULL, NULL };
+
+	  /* We don't assume each pc has a unique objfile (this is for
+	     debugging).  */
+	  ps = find_pc_sect_psymtab (objfile, pc, section, msymbol);
+	  if (ps != NULL)
+	    {
+	      if (!printed_objfile_header)
+		{
+		  outfile->printf ("\nPartial symtabs for objfile %s\n",
+				  objfile_name (objfile));
+		  printed_objfile_header = 1;
+		}
+	      dump_psymtab (objfile, ps, outfile);
+	      dump_psymtab_addrmap (objfile, ps, outfile);
+	      found = 1;
+	    }
+	}
+      else
+	{
+	  ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
+	    {
+	      int print_for_source = 0;
+
+	      QUIT;
+	      if (source_arg != NULL)
+		{
+		  print_for_source
+		    = compare_filenames_for_search (ps->filename, source_arg);
+		  found = 1;
+		}
+	      if (source_arg == NULL
+		  || print_for_source)
+		{
+		  if (!printed_objfile_header)
+		    {
+		      outfile->printf ("\nPartial symtabs for objfile %s\n",
+				       objfile_name (objfile));
+		      printed_objfile_header = 1;
+		    }
+		  dump_psymtab (objfile, ps, outfile);
+		  dump_psymtab_addrmap (objfile, ps, outfile);
+		}
+	    }
+	}
+
+      /* If we're printing all the objfile's symbols dump the full addrmap.  */
+
+      if (address_arg == NULL
+	  && source_arg == NULL
+	  && objfile->psymtabs_addrmap != NULL)
+	{
+	  outfile->puts ("\n");
+	  dump_psymtab_addrmap (objfile, NULL, outfile);
+	}
     }
+
+  if (!found)
+    {
+      if (address_arg != NULL)
+	error (_("No partial symtab for address: %s"), address_arg);
+      if (source_arg != NULL)
+	error (_("No partial symtab for source file: %s"), source_arg);
+    }
+
   do_cleanups (cleanups);
 }
 
 /* List all the partial symbol tables whose names match REGEXP (optional).  */
+
 static void
 maintenance_info_psymtabs (char *regexp, int from_tty)
 {
@@ -1964,14 +2098,14 @@ maintenance_info_psymtabs (char *regexp,
 		{
 		  printf_filtered ("{ objfile %s ", objfile_name (objfile));
 		  wrap_here ("  ");
-		  printf_filtered ("((struct objfile *) %s)\n", 
+		  printf_filtered ("((struct objfile *) %s)\n",
 				   host_address_to_string (objfile));
 		  printed_objfile_start = 1;
 		}
 
 	      printf_filtered ("  { psymtab %s ", psymtab->filename);
 	      wrap_here ("    ");
-	      printf_filtered ("((struct partial_symtab *) %s)\n", 
+	      printf_filtered ("((struct partial_symtab *) %s)\n",
 			       host_address_to_string (psymtab));
 
 	      printf_filtered ("    readin %s\n",
@@ -2022,7 +2156,7 @@ maintenance_info_psymtabs (char *regexp,
 		      /* Note the string concatenation there --- no comma.  */
 		      printf_filtered ("      psymtab %s "
 				       "((struct partial_symtab *) %s)\n",
-				       dep->filename, 
+				       dep->filename,
 				       host_address_to_string (dep));
 		    }
 		  printf_filtered ("    }\n");
@@ -2139,8 +2273,13 @@ _initialize_psymtab (void)
 {
   add_cmd ("psymbols", class_maintenance, maintenance_print_psymbols, _("\
 Print dump of current partial symbol definitions.\n\
-Entries in the partial symbol table are dumped to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's partial symbols."),
+Usage: mt print psymbols [-objfile objfile] [-pc address] [--] [outfile]\n\
+       mt print psymbols [-objfile objfile] [-source source] [--] [outfile]\n\
+Entries in the partial symbol table are dumped to file OUTFILE,\n\
+or the terminal if OUTFILE is unspecified.\n\
+If ADDRESS is provided, dump only the file for that address.\n\
+If SOURCE is provided, dump only that file's symbols.\n\
+If OBJFILE is provided, dump only that file's minimal symbols."),
 	   &maintenanceprintlist);
 
   add_cmd ("psymtabs", class_maintenance, maintenance_info_psymtabs, _("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psymtab.h ./gdb/psymtab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/psymtab.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/psymtab.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Public partial symbol table definitions.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ptrace.m4 ./gdb/ptrace.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ptrace.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ptrace.m4	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,94 @@
+dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+dnl Check the return and argument types of ptrace.
+
+AC_DEFUN([GDB_AC_PTRACE],
+[
+
+AC_CHECK_HEADERS([sys/ptrace.h ptrace.h])
+
+gdb_ptrace_headers='
+#include <sys/types.h>
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+AC_CHECK_DECLS(ptrace, [], [
+  : ${gdb_cv_func_ptrace_ret='int'}
+  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+], $gdb_ptrace_headers)
+# Check return type.  Varargs (used on GNU/Linux) conflict with the
+# empty argument list, so check for that explicitly.
+AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
+  AC_TRY_COMPILE($gdb_ptrace_headers,
+    [extern long ptrace (enum __ptrace_request, ...);],
+    gdb_cv_func_ptrace_ret='long',
+    AC_TRY_COMPILE($gdb_ptrace_headers,
+      [extern int ptrace ();],
+      gdb_cv_func_ptrace_ret='int',
+      gdb_cv_func_ptrace_ret='long')))
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
+  [Define as the return type of ptrace.])
+# Check argument types.
+AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
+  AC_TRY_COMPILE($gdb_ptrace_headers,
+    [extern long ptrace (enum __ptrace_request, ...);],
+    [gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'],[
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
+   for gdb_arg4 in 'int' 'long' 'void *'; do
+     AC_TRY_COMPILE($gdb_ptrace_headers, [
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+    break 4;])
+    for gdb_arg5 in 'int *' 'int' 'long'; do
+     AC_TRY_COMPILE($gdb_ptrace_headers, [
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+], [
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+    break 5;])
+    done
+   done
+  done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+])])
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG1, $[1],
+  [Define to the type of arg 1 for ptrace.])
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3],
+  [Define to the type of arg 3 for ptrace.])
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG4, $[4],
+  [Define to the type of arg 4 for ptrace.])
+if test -n "$[5]"; then
+  AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5],
+    [Define to the type of arg 5 for ptrace.])
+fi
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-typeprint.c ./gdb/p-typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-typeprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/p-typeprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Support for printing Pascal types for GDB, the GNU debugger.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,7 +55,7 @@ pascal_print_type (struct type *type, co
   code = TYPE_CODE (type);
 
   if (show > 0)
-    CHECK_TYPEDEF (type);
+    type = check_typedef (type);
 
   if ((code == TYPE_CODE_FUNC
        || code == TYPE_CODE_METHOD))
@@ -96,7 +96,7 @@ void
 pascal_print_typedef (struct type *type, struct symbol *new_symbol,
 		      struct ui_file *stream)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   fprintf_filtered (stream, "type ");
   fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
   type_print (type, "", stream, 0);
@@ -479,7 +479,7 @@ pascal_type_print_base (struct type *typ
       return;
     }
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-valprint.c ./gdb/p-valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/p-valprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/p-valprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for printing Pascal values for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,17 +49,19 @@ static const struct generic_val_print_de
   " * I",
   "true",
   "false",
-  "void"
+  "void",
+  "{",
+  "}"
 };
 
 /* See val_print for a description of the various parameters of this
    function; they are identical.  */
 
 void
-pascal_val_print (struct type *type, const gdb_byte *valaddr,
+pascal_val_print (struct type *type,
 		  int embedded_offset, CORE_ADDR address,
 		  struct ui_file *stream, int recurse,
-		  const struct value *original_value,
+		  struct value *original_value,
 		  const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
@@ -73,8 +75,9 @@ pascal_val_print (struct type *type, con
   struct type *char_type;
   CORE_ADDR addr;
   int want_space = 0;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_ARRAY:
@@ -130,7 +133,7 @@ pascal_val_print (struct type *type, con
 		{
 		  i = 0;
 		}
-	      val_print_array_elements (type, valaddr, embedded_offset,
+	      val_print_array_elements (type, embedded_offset,
 					address, stream, recurse,
 					original_value, options, i);
 	      fprintf_filtered (stream, "}");
@@ -144,7 +147,7 @@ pascal_val_print (struct type *type, con
     case TYPE_CODE_PTR:
       if (options->format && options->format != 's')
 	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
+	  val_print_scalar_formatted (type, embedded_offset,
 				      original_value, options, 0, stream);
 	  break;
 	}
@@ -203,11 +206,11 @@ pascal_val_print (struct type *type, con
 	  && addr != 0)
 	{
 	  ULONGEST string_length;
-	  void *buffer;
+	  gdb_byte *buffer;
 
 	  if (want_space)
 	    fputs_filtered (" ", stream);
-	  buffer = xmalloc (length_size);
+	  buffer = (gdb_byte *) xmalloc (length_size);
 	  read_memory (addr + length_pos, buffer, length_size);
 	  string_length = extract_unsigned_integer (buffer, length_size,
 						    byte_order);
@@ -239,9 +242,9 @@ pascal_val_print (struct type *type, con
 	  if (vt_address && options->vtblprint)
 	    {
 	      struct value *vt_val;
-	      struct symbol *wsym = (struct symbol *) NULL;
+	      struct symbol *wsym = NULL;
 	      struct type *wtype;
-	      struct block *block = (struct block *) NULL;
+	      struct block *block = NULL;
 	      struct field_of_this_result is_this_fld;
 
 	      if (want_space)
@@ -250,7 +253,7 @@ pascal_val_print (struct type *type, con
 	      if (msymbol.minsym != NULL)
 		wsym = lookup_symbol (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
 				      block,
-				      VAR_DOMAIN, &is_this_fld);
+				      VAR_DOMAIN, &is_this_fld).symbol;
 
 	      if (wsym)
 		{
@@ -285,7 +288,7 @@ pascal_val_print (struct type *type, con
     case TYPE_CODE_UNDEF:
     case TYPE_CODE_BOOL:
     case TYPE_CODE_CHAR:
-      generic_val_print (type, valaddr, embedded_offset, address,
+      generic_val_print (type, embedded_offset, address,
 			 stream, recurse, original_value, options,
 			 &p_decorations);
       break;
@@ -336,7 +339,7 @@ pascal_val_print (struct type *type, con
 
     case TYPE_CODE_SET:
       elttype = TYPE_INDEX_TYPE (type);
-      CHECK_TYPEDEF (elttype);
+      elttype = check_typedef (elttype);
       if (TYPE_STUB (elttype))
 	{
 	  fprintf_filtered (stream, "<incomplete type>");
@@ -467,9 +470,9 @@ static void pascal_object_print_static_f
 					      const struct value_print_options *);
 
 static void pascal_object_print_value (struct type *, const gdb_byte *,
-				       int,
+				       LONGEST,
 				       CORE_ADDR, struct ui_file *, int,
-				       const struct value *,
+				       struct value *,
 				       const struct value_print_options *,
 				       struct type **);
 
@@ -526,18 +529,19 @@ pascal_object_is_vtbl_member (struct typ
 
 void
 pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
-				  int offset,
+				  LONGEST offset,
 				  CORE_ADDR address, struct ui_file *stream,
 				  int recurse,
-				  const struct value *val,
+				  struct value *val,
 				  const struct value_print_options *options,
 				  struct type **dont_print_vb,
 				  int dont_print_statmem)
 {
   int i, len, n_baseclasses;
-  char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
+  char *last_dont_print
+    = (char *) obstack_next_free (&dont_print_statmem_obstack);
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   fprintf_filtered (stream, "{");
   len = TYPE_NFIELDS (type);
@@ -667,7 +671,7 @@ pascal_object_print_value_fields (struct
 		     address + TYPE_FIELD_BITPOS (type, i) / 8, 0,
 		     stream, format, 0, recurse + 1, pretty); */
 		  val_print (TYPE_FIELD_TYPE (type, i),
-			     valaddr, offset + TYPE_FIELD_BITPOS (type, i) / 8,
+			     offset + TYPE_FIELD_BITPOS (type, i) / 8,
 			     address, stream, recurse + 1, val, &opts,
 			     current_language);
 		}
@@ -697,10 +701,10 @@ pascal_object_print_value_fields (struct
 
 static void
 pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
-			   int offset,
+			   LONGEST offset,
 			   CORE_ADDR address, struct ui_file *stream,
 			   int recurse,
-			   const struct value *val,
+			   struct value *val,
 			   const struct value_print_options *options,
 			   struct type **dont_print_vb)
 {
@@ -720,11 +724,11 @@ pascal_object_print_value (struct type *
 
   for (i = 0; i < n_baseclasses; i++)
     {
-      int boffset = 0;
+      LONGEST boffset = 0;
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
       const char *basename = type_name_no_tag (baseclass);
       const gdb_byte *base_valaddr = NULL;
-      int thisoffset;
+      LONGEST thisoffset;
       int skip = 0;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
@@ -768,7 +772,7 @@ pascal_object_print_value (struct type *
 	      gdb_byte *buf;
 	      struct cleanup *back_to;
 
-	      buf = xmalloc (TYPE_LENGTH (baseclass));
+	      buf = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass));
 	      back_to = make_cleanup (xfree, buf);
 
 	      base_valaddr = buf;
@@ -872,7 +876,7 @@ pascal_object_print_static_field (struct
       obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
 		    sizeof (CORE_ADDR));
 
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
       pascal_object_print_value_fields (type,
 					value_contents_for_printing (val),
 					value_embedded_offset (val),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/explore.py ./gdb/python/lib/gdb/command/explore.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/explore.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/explore.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # GDB 'explore' command.
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/frame_filters.py ./gdb/python/lib/gdb/command/frame_filters.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/frame_filters.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/frame_filters.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Frame-filter commands.
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,52 +56,44 @@ class InfoFrameFilter(gdb.Command):
         else:
             return "No"
 
-    def list_frame_filters(self, frame_filters):
-        """ Internal worker function to list and print frame filters
-        in a dictionary.
-
-        Arguments:
-           frame_filters: The name of the dictionary, as
-           specified by GDB user commands.
-        """
-
+    def print_list(self, title, frame_filters, blank_line):
         sorted_frame_filters = sorted(frame_filters.items(),
                                       key=lambda i: gdb.frames.get_priority(i[1]),
                                       reverse=True)
 
         if len(sorted_frame_filters) == 0:
-            print("  No frame filters registered.")
-        else:
-            print("  Priority  Enabled  Name")
-            for frame_filter in sorted_frame_filters:
-                name = frame_filter[0]
-                try:
-                    priority = '{:<8}'.format(
-                        str(gdb.frames.get_priority(frame_filter[1])))
-                    enabled = '{:<7}'.format(
-                        self.enabled_string(gdb.frames.get_enabled(frame_filter[1])))
-                except Exception:
-                    e = sys.exc_info()[1]
-                    print("  Error printing filter '"+name+"': "+str(e))
-                else:
-                    print("  %s  %s  %s" % (priority, enabled, name))
+            return 0
 
-    def print_list(self, title, filter_list, blank_line):
         print(title)
-        self.list_frame_filters(filter_list)
+        print("  Priority  Enabled  Name")
+        for frame_filter in sorted_frame_filters:
+            name = frame_filter[0]
+            try:
+                priority = '{:<8}'.format(
+                    str(gdb.frames.get_priority(frame_filter[1])))
+                enabled = '{:<7}'.format(
+                    self.enabled_string(gdb.frames.get_enabled(frame_filter[1])))
+                print("  %s  %s  %s" % (priority, enabled, name))
+            except Exception:
+                e = sys.exc_info()[1]
+                print("  Error printing filter '"+name+"': "+str(e))
         if blank_line:
             print("")
+        return 1
 
     def invoke(self, arg, from_tty):
-        self.print_list("global frame-filters:", gdb.frame_filters, True)
+        any_printed = self.print_list("global frame-filters:", gdb.frame_filters, True)
 
         cp = gdb.current_progspace()
-        self.print_list("progspace %s frame-filters:" % cp.filename,
-                        cp.frame_filters, True)
+        any_printed += self.print_list("progspace %s frame-filters:" % cp.filename,
+                                       cp.frame_filters, True)
 
         for objfile in gdb.objfiles():
-            self.print_list("objfile %s frame-filters:" % objfile.filename,
-                            objfile.frame_filters, False)
+            any_printed += self.print_list("objfile %s frame-filters:" % objfile.filename,
+                                           objfile.frame_filters, False)
+
+        if any_printed == 0:
+            print ("No frame filters.")
 
 # Internal enable/disable functions.
 
@@ -150,7 +142,7 @@ def _do_enable_frame_filter(command_tupl
         try:
             ff = op_list[frame_filter]
         except KeyError:
-            msg = "frame-filter '" + str(name) + "' not found."
+            msg = "frame-filter '" + str(frame_filter) + "' not found."
             raise gdb.GdbError(msg)
 
         gdb.frames.set_enabled(ff, flag)
@@ -347,7 +339,7 @@ class SetFrameFilterPriority(gdb.Command
         try:
             ff = op_list[frame_filter]
         except KeyError:
-            msg = "frame-filter '" + str(name) + "' not found."
+            msg = "frame-filter '" + str(frame_filter) + "' not found."
             raise gdb.GdbError(msg)
 
         gdb.frames.set_priority(ff, priority)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/__init__.py ./gdb/python/lib/gdb/command/__init__.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/__init__.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/__init__.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/pretty_printers.py ./gdb/python/lib/gdb/command/pretty_printers.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/pretty_printers.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/pretty_printers.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Pretty-printer commands.
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/prompt.py ./gdb/python/lib/gdb/command/prompt.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/prompt.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/prompt.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Extended prompt.
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/type_printers.py ./gdb/python/lib/gdb/command/type_printers.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/type_printers.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/type_printers.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Type printer commands.
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ class InfoTypePrinter(gdb.Command):
         sep = ''
         for objfile in gdb.objfiles():
             if objfile.type_printers:
-                print ("%sType printers for %s:" % (sep, objfile.name))
+                print ("%sType printers for %s:" % (sep, objfile.filename))
                 self.list_type_printers(objfile.type_printers)
                 sep = '\n'
         if gdb.current_progspace().type_printers:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/unwinders.py ./gdb/python/lib/gdb/command/unwinders.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/unwinders.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/unwinders.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Unwinder commands.
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -136,6 +136,8 @@ def do_enable_unwinder(arg, flag):
         if locus_re.match(objfile.filename):
             total += do_enable_unwinder1(objfile.frame_unwinders, name_re,
                                          flag)
+    if total > 0:
+        gdb.invalidate_cached_frames()
     print("%d unwinder%s %s" % (total, "" if total == 1 else "s",
                                 "enabled" if flag else "disabled"))
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/xmethods.py ./gdb/python/lib/gdb/command/xmethods.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/command/xmethods.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/command/xmethods.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Xmethod commands.
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/FrameDecorator.py ./gdb/python/lib/gdb/FrameDecorator.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/FrameDecorator.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/FrameDecorator.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/FrameIterator.py ./gdb/python/lib/gdb/FrameIterator.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/FrameIterator.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/FrameIterator.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/frames.py ./gdb/python/lib/gdb/frames.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/frames.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/frames.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Frame-filter commands.
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/as_string.py ./gdb/python/lib/gdb/function/as_string.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/as_string.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/lib/gdb/function/as_string.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import gdb
+
+
+class _AsString(gdb.Function):
+    """Return the string representation of a value.
+
+Usage:
+  $_as_string(value)
+
+Arguments:
+
+  value: A gdb.Value.
+
+Returns:
+  The string representation of the value.
+"""
+
+    def __init__(self):
+        super(_AsString, self).__init__("_as_string")
+
+    def invoke(self, val):
+        return str(val)
+
+_AsString()
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/caller_is.py ./gdb/python/lib/gdb/function/caller_is.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/caller_is.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/function/caller_is.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Caller-is functions.
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/__init__.py ./gdb/python/lib/gdb/function/__init__.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/__init__.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/function/__init__.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/strfns.py ./gdb/python/lib/gdb/function/strfns.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/function/strfns.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/function/strfns.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Useful gdb string convenience functions.
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/__init__.py ./gdb/python/lib/gdb/__init__.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/__init__.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/__init__.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printer/bound_registers.py ./gdb/python/lib/gdb/printer/bound_registers.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printer/bound_registers.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/printer/bound_registers.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Pretty-printers for bounds registers.
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printer/__init__.py ./gdb/python/lib/gdb/printer/__init__.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printer/__init__.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/printer/__init__.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printing.py ./gdb/python/lib/gdb/printing.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/printing.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/printing.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Pretty-printer utilities.
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -239,7 +239,7 @@ class _EnumInstance:
         if not any_found or v != 0:
             # Leftover value.
             flag_list.append('<unknown: 0x%x>' % v)
-        return "0x%x [%s]" % (self.val, " | ".join(flag_list))
+        return "0x%x [%s]" % (int(self.val), " | ".join(flag_list))
 
 class FlagEnumerationPrinter(PrettyPrinter):
     """A pretty-printer which can be used to print a flag-style enumeration.
@@ -263,7 +263,7 @@ class FlagEnumerationPrinter(PrettyPrint
                 self.enumerators.append((field.name, field.enumval))
             # Sorting the enumerators by value usually does the right
             # thing.
-            self.enumerators.sort(key = lambda x: x.enumval)
+            self.enumerators.sort(key = lambda x: x[1])
 
         if self.enabled:
             return _EnumInstance(self.enumerators, val)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/prompt.py ./gdb/python/lib/gdb/prompt.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/prompt.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/prompt.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Extended prompt utilities.
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/types.py ./gdb/python/lib/gdb/types.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/types.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/types.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Type utilities.
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/unwinder.py ./gdb/python/lib/gdb/unwinder.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/unwinder.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/unwinder.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -92,3 +92,4 @@ def register_unwinder(locus, unwinder, r
                                    unwinder.name)
         i += 1
     locus.frame_unwinders.insert(0, unwinder)
+    gdb.invalidate_cached_frames()
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/xmethod.py ./gdb/python/lib/gdb/xmethod.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/lib/gdb/xmethod.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/lib/gdb/xmethod.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Python side of the support for xmethods.
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-arch.c ./gdb/python/py-arch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-arch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-arch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to architecture
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #include "arch-utils.h"
 #include "disasm.h"
 #include "python-internal.h"
+#include "py-ref.h"
 
 typedef struct arch_object_type_object {
   PyObject_HEAD
@@ -120,7 +121,7 @@ archpy_disassemble (PyObject *self, PyOb
   CORE_ADDR pc;
   gdb_py_ulongest start_temp;
   long count = 0, i;
-  PyObject *result_list, *end_obj = NULL, *count_obj = NULL;
+  PyObject *end_obj = NULL, *count_obj = NULL;
   struct gdbarch *gdbarch = NULL;
 
   ARCHPY_REQUIRE_VALID (self, gdbarch);
@@ -141,14 +142,14 @@ archpy_disassemble (PyObject *self, PyOb
 	 conversion process.  */
       if (PyLong_Check (end_obj))
         end = PyLong_AsUnsignedLongLong (end_obj);
+#if PY_MAJOR_VERSION == 2
       else if (PyInt_Check (end_obj))
         /* If the end_pc value is specified without a trailing 'L', end_obj will
            be an integer and not a long integer.  */
         end = PyInt_AsLong (end_obj);
+#endif
       else
         {
-          Py_DECREF (end_obj);
-          Py_XDECREF (count_obj);
           PyErr_SetString (PyExc_TypeError,
                            _("Argument 'end_pc' should be a (long) integer."));
 
@@ -157,8 +158,6 @@ archpy_disassemble (PyObject *self, PyOb
 
       if (end < start)
         {
-          Py_DECREF (end_obj);
-          Py_XDECREF (count_obj);
           PyErr_SetString (PyExc_ValueError,
                            _("Argument 'end_pc' should be greater than or "
                              "equal to the argument 'start_pc'."));
@@ -171,8 +170,6 @@ archpy_disassemble (PyObject *self, PyOb
       count = PyInt_AsLong (count_obj);
       if (PyErr_Occurred () || count < 0)
         {
-          Py_DECREF (count_obj);
-          Py_XDECREF (end_obj);
           PyErr_SetString (PyExc_TypeError,
                            _("Argument 'count' should be an non-negative "
                              "integer."));
@@ -181,7 +178,7 @@ archpy_disassemble (PyObject *self, PyOb
         }
     }
 
-  result_list = PyList_New (0);
+  gdbpy_ref<> result_list (PyList_New (0));
   if (result_list == NULL)
     return NULL;
 
@@ -196,63 +193,41 @@ archpy_disassemble (PyObject *self, PyOb
        || (end_obj == NULL && count_obj == NULL && pc == start);)
     {
       int insn_len = 0;
-      char *as = NULL;
-      struct ui_file *memfile = mem_fileopen ();
-      PyObject *insn_dict = PyDict_New ();
+      gdbpy_ref<> insn_dict (PyDict_New ());
 
       if (insn_dict == NULL)
-        {
-          Py_DECREF (result_list);
-          ui_file_delete (memfile);
-
-          return NULL;
-        }
-      if (PyList_Append (result_list, insn_dict))
-        {
-          Py_DECREF (result_list);
-          Py_DECREF (insn_dict);
-          ui_file_delete (memfile);
+	return NULL;
+      if (PyList_Append (result_list.get (), insn_dict.get ()))
+	return NULL;  /* PyList_Append Sets the exception.  */
 
-          return NULL;  /* PyList_Append Sets the exception.  */
-        }
+      string_file stb;
 
       TRY
         {
-          insn_len = gdb_print_insn (gdbarch, pc, memfile, NULL);
+          insn_len = gdb_print_insn (gdbarch, pc, &stb, NULL);
         }
       CATCH (except, RETURN_MASK_ALL)
         {
-          Py_DECREF (result_list);
-          ui_file_delete (memfile);
-
 	  gdbpy_convert_exception (except);
 	  return NULL;
         }
       END_CATCH
 
-      as = ui_file_xstrdup (memfile, NULL);
-      if (PyDict_SetItemString (insn_dict, "addr",
+      if (PyDict_SetItemString (insn_dict.get (), "addr",
                                 gdb_py_long_from_ulongest (pc))
-          || PyDict_SetItemString (insn_dict, "asm",
-                                   PyString_FromString (*as ? as : "<unknown>"))
-          || PyDict_SetItemString (insn_dict, "length",
+          || PyDict_SetItemString (insn_dict.get (), "asm",
+                                   PyString_FromString (!stb.empty ()
+							? stb.c_str ()
+							: "<unknown>"))
+          || PyDict_SetItemString (insn_dict.get (), "length",
                                    PyInt_FromLong (insn_len)))
-        {
-          Py_DECREF (result_list);
-
-          ui_file_delete (memfile);
-          xfree (as);
-
-          return NULL;
-        }
+	return NULL;
 
       pc += insn_len;
       i++;
-      ui_file_delete (memfile);
-      xfree (as);
     }
 
-  return result_list;
+  return result_list.release ();
 }
 
 /* Initializes the Architecture class in the gdb module.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-auto-load.c ./gdb/python/py-auto-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-auto-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-auto-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB routines for supporting auto-loaded scripts.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-block.c ./gdb/python/py-block.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-block.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-block.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to blocks.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -256,7 +256,8 @@ set_block (block_object *obj, const stru
   if (objfile)
     {
       obj->objfile = objfile;
-      obj->next = objfile_data (objfile, blpy_objfile_data_key);
+      obj->next = ((struct blpy_block_object *)
+		   objfile_data (objfile, blpy_objfile_data_key));
       if (obj->next)
 	obj->next->prev = obj;
       set_objfile_data (objfile, blpy_objfile_data_key, obj);
@@ -411,7 +412,7 @@ gdbpy_block_for_pc (PyObject *self, PyOb
 static void
 del_objfile_blocks (struct objfile *objfile, void *datum)
 {
-  block_object *obj = datum;
+  block_object *obj = (block_object *) datum;
 
   while (obj)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-bpevent.c ./gdb/python/py-bpevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-bpevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-bpevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior breakpoint stop events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "py-stopevent.h"
+#include "py-ref.h"
 
 extern PyTypeObject breakpoint_event_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
@@ -29,26 +30,22 @@ extern PyTypeObject breakpoint_event_obj
 PyObject *
 create_breakpoint_event_object (PyObject *breakpoint_list, PyObject *first_bp)
 {
-  PyObject *breakpoint_event_obj =
-      create_stop_event_object (&breakpoint_event_object_type);
+  gdbpy_ref<> breakpoint_event_obj
+    (create_stop_event_object (&breakpoint_event_object_type));
 
-  if (!breakpoint_event_obj)
-    goto fail;
+  if (breakpoint_event_obj == NULL)
+    return NULL;
 
-  if (evpy_add_attribute (breakpoint_event_obj,
+  if (evpy_add_attribute (breakpoint_event_obj.get (),
                           "breakpoint",
                           first_bp) < 0)
-    goto fail;
-  if (evpy_add_attribute (breakpoint_event_obj,
+    return NULL;
+  if (evpy_add_attribute (breakpoint_event_obj.get (),
                           "breakpoints",
                           breakpoint_list) < 0)
-    goto fail;
+    return NULL;
 
-  return breakpoint_event_obj;
-
- fail:
-  Py_XDECREF (breakpoint_event_obj);
-  return NULL;
+  return breakpoint_event_obj.release ();
 }
 
 GDBPY_NEW_EVENT_TYPE (breakpoint,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-breakpoint.c ./gdb/python/py-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-breakpoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to breakpoints
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,8 @@
 #include "ada-lang.h"
 #include "arch-utils.h"
 #include "language.h"
+#include "location.h"
+#include "py-event.h"
 
 /* Number of live breakpoints.  */
 static int bppy_live;
@@ -202,7 +204,7 @@ bppy_set_thread (PyObject *self, PyObjec
       if (! gdb_py_int_as_long (newvalue, &id))
 	return -1;
 
-      if (! valid_thread_id (id))
+      if (!valid_global_thread_id (id))
 	{
 	  PyErr_SetString (PyExc_RuntimeError,
 			   _("Invalid thread ID."));
@@ -380,7 +382,7 @@ bppy_set_hit_count (PyObject *self, PyOb
 static PyObject *
 bppy_get_location (PyObject *self, void *closure)
 {
-  char *str;
+  const char *str;
   gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
 
   BPPY_REQUIRE_VALID (obj);
@@ -388,11 +390,10 @@ bppy_get_location (PyObject *self, void 
   if (obj->bp->type != bp_breakpoint)
     Py_RETURN_NONE;
 
-  str = obj->bp->addr_string;
-
+  str = event_location_to_string (obj->bp->location);
   if (! str)
     str = "";
-  return PyString_Decode (str, strlen (str), host_charset (), NULL);
+  return host_string_to_python_string (str);
 }
 
 /* Python function to get the breakpoint expression.  */
@@ -414,7 +415,7 @@ bppy_get_expression (PyObject *self, voi
   if (! str)
     str = "";
 
-  return PyString_Decode (str, strlen (str), host_charset (), NULL);
+  return host_string_to_python_string (str);
 }
 
 /* Python function to get the condition expression of a breakpoint.  */
@@ -430,7 +431,7 @@ bppy_get_condition (PyObject *self, void
   if (! str)
     Py_RETURN_NONE;
 
-  return PyString_Decode (str, strlen (str), host_charset (), NULL);
+  return host_string_to_python_string (str);
 }
 
 /* Returns 0 on success.  Returns -1 on error, with a python exception set.
@@ -439,7 +440,8 @@ bppy_get_condition (PyObject *self, void
 static int
 bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
 {
-  char *exp;
+  gdb::unique_xmalloc_ptr<char> exp_holder;
+  const char *exp = NULL;
   gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
   struct gdb_exception except = exception_none;
 
@@ -455,9 +457,10 @@ bppy_set_condition (PyObject *self, PyOb
     exp = "";
   else
     {
-      exp = python_string_to_host_string (newvalue);
-      if (exp == NULL)
+      exp_holder = python_string_to_host_string (newvalue);
+      if (exp_holder == NULL)
 	return -1;
+      exp = exp_holder.get ();
     }
 
   TRY
@@ -470,9 +473,6 @@ bppy_set_condition (PyObject *self, PyOb
     }
   END_CATCH
 
-  if (newvalue != Py_None)
-    xfree (exp);
-
   GDB_PY_SET_HANDLE_EXCEPTION (except);
 
   return 0;
@@ -485,39 +485,30 @@ bppy_get_commands (PyObject *self, void 
   gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
   struct breakpoint *bp = self_bp->bp;
   long length;
-  struct ui_file *string_file;
-  struct cleanup *chain;
   PyObject *result;
-  char *cmdstr;
 
   BPPY_REQUIRE_VALID (self_bp);
 
   if (! self_bp->bp->commands)
     Py_RETURN_NONE;
 
-  string_file = mem_fileopen ();
-  chain = make_cleanup_ui_file_delete (string_file);
+  string_file stb;
 
-  ui_out_redirect (current_uiout, string_file);
+  current_uiout->redirect (&stb);
   TRY
     {
       print_command_lines (current_uiout, breakpoint_commands (bp), 0);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      ui_out_redirect (current_uiout, NULL);
-      do_cleanups (chain);
+      current_uiout->redirect (NULL);
       gdbpy_convert_exception (except);
       return NULL;
     }
   END_CATCH
 
-  ui_out_redirect (current_uiout, NULL);
-  cmdstr = ui_file_xstrdup (string_file, &length);
-  make_cleanup (xfree, cmdstr);
-  result = PyString_Decode (cmdstr, strlen (cmdstr), host_charset (), NULL);
-  do_cleanups (chain);
-  return result;
+  current_uiout->redirect (NULL);
+  return host_string_to_python_string (stb.c_str ());
 }
 
 /* Python function to get the breakpoint type.  */
@@ -540,10 +531,10 @@ bppy_get_visibility (PyObject *self, voi
 
   BPPY_REQUIRE_VALID (self_bp);
 
-  if (self_bp->bp->number < 0)
-    Py_RETURN_FALSE;
+  if (user_breakpoint_p (self_bp->bp))
+    Py_RETURN_TRUE;
 
-  Py_RETURN_TRUE;
+  Py_RETURN_FALSE;
 }
 
 /* Python function to determine if the breakpoint is a temporary
@@ -563,6 +554,24 @@ bppy_get_temporary (PyObject *self, void
   Py_RETURN_FALSE;
 }
 
+/* Python function to determine if the breakpoint is a pending
+   breakpoint.  */
+
+static PyObject *
+bppy_get_pending (PyObject *self, void *closure)
+{
+  gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
+
+  BPPY_REQUIRE_VALID (self_bp);
+
+  if (is_watchpoint (self_bp->bp))
+    Py_RETURN_FALSE;
+  if (pending_breakpoint_p (self_bp->bp))
+    Py_RETURN_TRUE;
+
+  Py_RETURN_FALSE;
+}
+
 /* Python function to get the breakpoint's number.  */
 static PyObject *
 bppy_get_number (PyObject *self, void *closure)
@@ -663,21 +672,30 @@ bppy_init (PyObject *self, PyObject *arg
 
   TRY
     {
-      char *copy = xstrdup (spec);
-      struct cleanup *cleanup = make_cleanup (xfree, copy);
+      gdb::unique_xmalloc_ptr<char>
+	copy_holder (xstrdup (skip_spaces_const (spec)));
+      char *copy = copy_holder.get ();
 
       switch (type)
 	{
 	case bp_breakpoint:
 	  {
+	    struct event_location *location;
+	    struct cleanup *cleanup;
+
+	    location
+	      = string_to_event_location_basic (&copy, current_language);
+	    cleanup = make_cleanup_delete_event_location (location);
 	    create_breakpoint (python_gdbarch,
-			       copy, NULL, -1, NULL,
+			       location, NULL, -1, NULL,
 			       0,
 			       temporary_bp, bp_breakpoint,
 			       0,
 			       AUTO_BOOLEAN_TRUE,
 			       &bkpt_breakpoint_ops,
 			       0, 1, internal_bp, 0);
+
+	    do_cleanups (cleanup);
 	    break;
 	  }
         case bp_watchpoint:
@@ -695,11 +713,10 @@ bppy_init (PyObject *self, PyObject *arg
 	default:
 	  error(_("Do not understand breakpoint type to set."));
 	}
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
+      bppy_pending_object = NULL;
       PyErr_Format (except.reason == RETURN_QUIT
 		    ? PyExc_KeyboardInterrupt : PyExc_RuntimeError,
 		    "%s", except.message);
@@ -716,7 +733,7 @@ bppy_init (PyObject *self, PyObject *arg
 static int
 build_bp_list (struct breakpoint *b, void *arg)
 {
-  PyObject *list = arg;
+  PyObject *list = (PyObject *) arg;
   PyObject *bp = (PyObject *) b->py_bp_object;
   int iserr = 0;
 
@@ -738,28 +755,20 @@ build_bp_list (struct breakpoint *b, voi
 PyObject *
 gdbpy_breakpoints (PyObject *self, PyObject *args)
 {
-  PyObject *list, *tuple;
-
   if (bppy_live == 0)
-    Py_RETURN_NONE;
+    return PyTuple_New (0);
 
-  list = PyList_New (0);
-  if (!list)
+  gdbpy_ref<> list (PyList_New (0));
+  if (list == NULL)
     return NULL;
 
-  /* If iteratre_over_breakpoints returns non NULL it signals an error
+  /* If iterate_over_breakpoints returns non NULL it signals an error
      condition.  In that case abandon building the list and return
      NULL.  */
-  if (iterate_over_breakpoints (build_bp_list, list) != NULL)
-    {
-      Py_DECREF (list);
-      return NULL;
-    }
-
-  tuple = PyList_AsTuple (list);
-  Py_DECREF (list);
+  if (iterate_over_breakpoints (build_bp_list, list.get ()) != NULL)
+    return NULL;
 
-  return tuple;
+  return PyList_AsTuple (list.get ());
 }
 
 /* Call the "stop" method (if implemented) in the breakpoint
@@ -775,26 +784,26 @@ gdbpy_breakpoint_cond_says_stop (const s
   struct gdbpy_breakpoint_object *bp_obj = b->py_bp_object;
   PyObject *py_bp = (PyObject *) bp_obj;
   struct gdbarch *garch;
-  struct cleanup *cleanup;
 
   if (bp_obj == NULL)
     return EXT_LANG_BP_STOP_UNSET;
 
   stop = -1;
   garch = b->gdbarch ? b->gdbarch : get_current_arch ();
-  cleanup = ensure_python_env (garch, current_language);
+
+  gdbpy_enter enter_py (garch, current_language);
 
   if (bp_obj->is_finish_bp)
     bpfinishpy_pre_stop_hook (bp_obj);
 
   if (PyObject_HasAttrString (py_bp, stop_func))
     {
-      PyObject *result = PyObject_CallMethod (py_bp, stop_func, NULL);
+      gdbpy_ref<> result (PyObject_CallMethod (py_bp, stop_func, NULL));
 
       stop = 1;
-      if (result)
+      if (result != NULL)
 	{
-	  int evaluate = PyObject_IsTrue (result);
+	  int evaluate = PyObject_IsTrue (result.get ());
 
 	  if (evaluate == -1)
 	    gdbpy_print_stack ();
@@ -803,8 +812,6 @@ gdbpy_breakpoint_cond_says_stop (const s
 	     the Python breakpoint wants GDB to continue.  */
 	  if (! evaluate)
 	    stop = 0;
-
-	  Py_DECREF (result);
 	}
       else
 	gdbpy_print_stack ();
@@ -813,8 +820,6 @@ gdbpy_breakpoint_cond_says_stop (const s
   if (bp_obj->is_finish_bp)
     bpfinishpy_post_stop_hook (bp_obj);
 
-  do_cleanups (cleanup);
-
   if (stop < 0)
     return EXT_LANG_BP_STOP_UNSET;
   return stop ? EXT_LANG_BP_STOP_YES : EXT_LANG_BP_STOP_NO;
@@ -828,21 +833,17 @@ int
 gdbpy_breakpoint_has_cond (const struct extension_language_defn *extlang,
 			   struct breakpoint *b)
 {
-  int has_func;
   PyObject *py_bp;
   struct gdbarch *garch;
-  struct cleanup *cleanup;
 
   if (b->py_bp_object == NULL)
     return 0;
 
   py_bp = (PyObject *) b->py_bp_object;
   garch = b->gdbarch ? b->gdbarch : get_current_arch ();
-  cleanup = ensure_python_env (garch, current_language);
-  has_func = PyObject_HasAttrString (py_bp, stop_func);
-  do_cleanups (cleanup);
 
-  return has_func;
+  gdbpy_enter enter_py (garch, current_language);
+  return PyObject_HasAttrString (py_bp, stop_func);
 }
 
 
@@ -857,7 +858,7 @@ gdbpy_breakpoint_created (struct breakpo
   gdbpy_breakpoint_object *newbp;
   PyGILState_STATE state;
 
-  if (bp->number < 0 && bppy_pending_object == NULL)
+  if (!user_breakpoint_p (bp) && bppy_pending_object == NULL)
     return;
 
   if (bp->type != bp_breakpoint
@@ -892,6 +893,13 @@ gdbpy_breakpoint_created (struct breakpo
       gdbpy_print_stack ();
     }
 
+  if (!evregpy_no_listeners_p (gdb_py_events.breakpoint_created))
+    {
+      if (evpy_emit_event ((PyObject *) newbp,
+			   gdb_py_events.breakpoint_created) < 0)
+	gdbpy_print_stack ();
+    }
+
   PyGILState_Release (state);
 }
 
@@ -903,18 +911,51 @@ gdbpy_breakpoint_deleted (struct breakpo
   int num = b->number;
   PyGILState_STATE state;
   struct breakpoint *bp = NULL;
-  gdbpy_breakpoint_object *bp_obj;
 
   state = PyGILState_Ensure ();
   bp = get_breakpoint (num);
   if (bp)
     {
-      bp_obj = bp->py_bp_object;
-      if (bp_obj)
+      gdbpy_ref<gdbpy_breakpoint_object> bp_obj (bp->py_bp_object);
+      if (bp_obj != NULL)
 	{
+	  if (!evregpy_no_listeners_p (gdb_py_events.breakpoint_deleted))
+	    {
+	      if (evpy_emit_event ((PyObject *) bp_obj.get (),
+				   gdb_py_events.breakpoint_deleted) < 0)
+		gdbpy_print_stack ();
+	    }
+
 	  bp_obj->bp = NULL;
 	  --bppy_live;
-	  Py_DECREF (bp_obj);
+	}
+    }
+  PyGILState_Release (state);
+}
+
+/* Callback that is used when a breakpoint is modified.  */
+
+static void
+gdbpy_breakpoint_modified (struct breakpoint *b)
+{
+  int num = b->number;
+  PyGILState_STATE state;
+  struct breakpoint *bp = NULL;
+  gdbpy_breakpoint_object *bp_obj;
+
+  state = PyGILState_Ensure ();
+  bp = get_breakpoint (num);
+  if (bp)
+    {
+      PyObject *bp_obj = (PyObject *) bp->py_bp_object;
+      if (bp_obj)
+	{
+	  if (!evregpy_no_listeners_p (gdb_py_events.breakpoint_modified))
+	    {
+	      if (evpy_emit_event (bp_obj,
+				   gdb_py_events.breakpoint_modified) < 0)
+		gdbpy_print_stack ();
+	    }
 	}
     }
   PyGILState_Release (state);
@@ -938,6 +979,7 @@ gdbpy_initialize_breakpoints (void)
 
   observer_attach_breakpoint_created (gdbpy_breakpoint_created);
   observer_attach_breakpoint_deleted (gdbpy_breakpoint_deleted);
+  observer_attach_breakpoint_modified (gdbpy_breakpoint_modified);
 
   /* Add breakpoint types constants.  */
   for (i = 0; pybp_codes[i].name; ++i)
@@ -972,7 +1014,7 @@ static int
 local_setattro (PyObject *self, PyObject *name, PyObject *v)
 {
   gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
-  char *attr = python_string_to_host_string (name);
+  gdb::unique_xmalloc_ptr<char> attr (python_string_to_host_string (name));
 
   if (attr == NULL)
     return -1;
@@ -980,7 +1022,7 @@ local_setattro (PyObject *self, PyObject
   /* If the attribute trying to be set is the "stop" method,
      but we already have a condition set in the CLI or other extension
      language, disallow this operation.  */
-  if (strcmp (attr, stop_func) == 0)
+  if (strcmp (attr.get (), stop_func) == 0)
     {
       const struct extension_language_defn *extlang = NULL;
 
@@ -992,7 +1034,6 @@ local_setattro (PyObject *self, PyObject
 	{
 	  char *error_text;
 
-	  xfree (attr);
 	  error_text
 	    = xstrprintf (_("Only one stop condition allowed.  There is"
 			    " currently a %s stop condition defined for"
@@ -1004,8 +1045,6 @@ local_setattro (PyObject *self, PyObject
 	}
     }
 
-  xfree (attr);
-
   return PyObject_GenericSetAttr ((PyObject *)self, name, v);
 }
 
@@ -1048,6 +1087,8 @@ or None if no condition set."},
     "Whether the breakpoint is visible to the user."},
   { "temporary", bppy_get_temporary, NULL,
     "Whether this breakpoint is a temporary breakpoint."},
+  { "pending", bppy_get_pending, NULL,
+    "Whether this breakpoint is a pending breakpoint."},
   { NULL }  /* Sentinel.  */
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-cmd.c ./gdb/python/py-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-cmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* gdb commands implemented in Python
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "cli/cli-decode.h"
 #include "completer.h"
 #include "language.h"
+#include "py-ref.h"
 
 /* Struct representing built-in completion types.  */
 struct cmdpy_completer
@@ -94,23 +95,17 @@ cmdpy_dont_repeat (PyObject *self, PyObj
 static void
 cmdpy_destroyer (struct cmd_list_element *self, void *context)
 {
-  cmdpy_object *cmd;
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   /* Release our hold on the command object.  */
-  cmd = (cmdpy_object *) context;
+  gdbpy_ref<cmdpy_object> cmd ((cmdpy_object *) context);
   cmd->command = NULL;
-  Py_DECREF (cmd);
 
   /* We allocated the name, doc string, and perhaps the prefix
      name.  */
   xfree ((char *) self->name);
   xfree ((char *) self->doc);
   xfree ((char *) self->prefixname);
-
-  do_cleanups (cleanup);
 }
 
 /* Called by gdb to invoke the command.  */
@@ -119,10 +114,8 @@ static void
 cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
 {
   cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
-  PyObject *argobj, *ttyobj, *result;
-  struct cleanup *cleanup;
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   if (! obj)
     error (_("Invalid invocation of Python command object."));
@@ -131,7 +124,6 @@ cmdpy_function (struct cmd_list_element 
       if (obj->command->prefixname)
 	{
 	  /* A prefix command does not need an invoke method.  */
-	  do_cleanups (cleanup);
 	  return;
 	}
       error (_("Python command object missing 'invoke' method."));
@@ -139,24 +131,23 @@ cmdpy_function (struct cmd_list_element 
 
   if (! args)
     args = "";
-  argobj = PyUnicode_Decode (args, strlen (args), host_charset (), NULL);
-  if (! argobj)
+  gdbpy_ref<> argobj (PyUnicode_Decode (args, strlen (args), host_charset (),
+					NULL));
+  if (argobj == NULL)
     {
       gdbpy_print_stack ();
       error (_("Could not convert arguments to Python string."));
     }
 
-  ttyobj = from_tty ? Py_True : Py_False;
-  Py_INCREF (ttyobj);
-  result = PyObject_CallMethodObjArgs ((PyObject *) obj, invoke_cst, argobj,
-				       ttyobj, NULL);
-  Py_DECREF (argobj);
-  Py_DECREF (ttyobj);
+  gdbpy_ref<> ttyobj (from_tty ? Py_True : Py_False);
+  Py_INCREF (ttyobj.get ());
+  gdbpy_ref<> result (PyObject_CallMethodObjArgs ((PyObject *) obj, invoke_cst,
+						  argobj.get (), ttyobj.get (),
+						  NULL));
 
-  if (! result)
+  if (result == NULL)
     {
       PyObject *ptype, *pvalue, *ptraceback;
-      char *msg;
 
       PyErr_Fetch (&ptype, &pvalue, &ptraceback);
 
@@ -164,8 +155,8 @@ cmdpy_function (struct cmd_list_element 
 	 When fetching the error message we need to make our own copy,
 	 we no longer own ptype, pvalue after the call to PyErr_Restore.  */
 
-      msg = gdbpy_exception_to_string (ptype, pvalue);
-      make_cleanup (xfree, msg);
+      gdb::unique_xmalloc_ptr<char>
+	msg (gdbpy_exception_to_string (ptype, pvalue));
 
       if (msg == NULL)
 	{
@@ -190,7 +181,7 @@ cmdpy_function (struct cmd_list_element 
 	  PyErr_Restore (ptype, pvalue, ptraceback);
 	  gdbpy_print_stack ();
 	  if (msg != NULL && *msg != '\0')
-	    error (_("Error occurred in Python command: %s"), msg);
+	    error (_("Error occurred in Python command: %s"), msg.get ());
 	  else
 	    error (_("Error occurred in Python command."));
 	}
@@ -199,12 +190,9 @@ cmdpy_function (struct cmd_list_element 
 	  Py_XDECREF (ptype);
 	  Py_XDECREF (pvalue);
 	  Py_XDECREF (ptraceback);
-	  error ("%s", msg);
+	  error ("%s", msg.get ());
 	}
     }
-
-  Py_DECREF (result);
-  do_cleanups (cleanup);
 }
 
 /* Helper function for the Python command completers (both "pure"
@@ -241,8 +229,6 @@ cmdpy_completer_helper (struct cmd_list_
 			const char *text, const char *word)
 {
   cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
-  PyObject *textobj, *wordobj;
-  PyObject *resultobj;
 
   if (obj == NULL)
     error (_("Invalid invocation of Python command object."));
@@ -252,29 +238,26 @@ cmdpy_completer_helper (struct cmd_list_
       return NULL;
     }
 
-  textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL);
+  gdbpy_ref<> textobj (PyUnicode_Decode (text, strlen (text), host_charset (),
+					 NULL));
   if (textobj == NULL)
     error (_("Could not convert argument to Python string."));
-  wordobj = PyUnicode_Decode (word, strlen (word), host_charset (), NULL);
+  gdbpy_ref<> wordobj (PyUnicode_Decode (word, strlen (word), host_charset (),
+					 NULL));
   if (wordobj == NULL)
-    {
-      Py_DECREF (textobj);
-      error (_("Could not convert argument to Python string."));
-    }
+    error (_("Could not convert argument to Python string."));
 
-  resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
-					  textobj, wordobj, NULL);
-  Py_DECREF (textobj);
-  Py_DECREF (wordobj);
-  if (!resultobj)
+  gdbpy_ref<> resultobj (PyObject_CallMethodObjArgs ((PyObject *) obj,
+						     complete_cst,
+						     textobj.get (),
+						     wordobj.get (), NULL));
+  if (resultobj == NULL)
     {
       /* Just swallow errors here.  */
       PyErr_Clear ();
     }
 
-  Py_XINCREF (resultobj);
-
-  return resultobj;
+  return resultobj.release ();
 }
 
 /* Python function called to determine the break characters of a
@@ -286,27 +269,24 @@ static void
 cmdpy_completer_handle_brkchars (struct cmd_list_element *command,
 				 const char *text, const char *word)
 {
-  PyObject *resultobj = NULL;
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   /* Calling our helper to obtain the PyObject of the Python
      function.  */
-  resultobj = cmdpy_completer_helper (command, text, word);
+  gdbpy_ref<> resultobj (cmdpy_completer_helper (command, text, word));
 
   /* Check if there was an error.  */
   if (resultobj == NULL)
-    goto done;
+    return;
 
-  if (PyInt_Check (resultobj))
+  if (PyInt_Check (resultobj.get ()))
     {
       /* User code may also return one of the completion constants,
 	 thus requesting that sort of completion.  We are only
 	 interested in this kind of return.  */
       long value;
 
-      if (!gdb_py_int_as_long (resultobj, &value))
+      if (!gdb_py_int_as_long (resultobj.get (), &value))
 	{
 	  /* Ignore.  */
 	  PyErr_Clear ();
@@ -320,11 +300,6 @@ cmdpy_completer_handle_brkchars (struct 
 	    (completers[value].completer);
 	}
     }
-
- done:
-
-  Py_XDECREF (resultobj);
-  do_cleanups (cleanup);
 }
 
 /* Called by gdb for command completion.  */
@@ -333,30 +308,28 @@ static VEC (char_ptr) *
 cmdpy_completer (struct cmd_list_element *command,
 		 const char *text, const char *word)
 {
-  PyObject *resultobj = NULL;
   VEC (char_ptr) *result = NULL;
-  struct cleanup *cleanup;
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   /* Calling our helper to obtain the PyObject of the Python
      function.  */
-  resultobj = cmdpy_completer_helper (command, text, word);
+  gdbpy_ref<> resultobj (cmdpy_completer_helper (command, text, word));
 
   /* If the result object of calling the Python function is NULL, it
      means that there was an error.  In this case, just give up and
      return NULL.  */
   if (resultobj == NULL)
-    goto done;
+    return NULL;
 
   result = NULL;
-  if (PyInt_Check (resultobj))
+  if (PyInt_Check (resultobj.get ()))
     {
       /* User code may also return one of the completion constants,
 	 thus requesting that sort of completion.  */
       long value;
 
-      if (! gdb_py_int_as_long (resultobj, &value))
+      if (! gdb_py_int_as_long (resultobj.get (), &value))
 	{
 	  /* Ignore.  */
 	  PyErr_Clear ();
@@ -366,46 +339,39 @@ cmdpy_completer (struct cmd_list_element
     }
   else
     {
-      PyObject *iter = PyObject_GetIter (resultobj);
-      PyObject *elt;
+      gdbpy_ref<> iter (PyObject_GetIter (resultobj.get ()));
 
       if (iter == NULL)
-	goto done;
+	return NULL;
 
-      while ((elt = PyIter_Next (iter)) != NULL)
+      while (true)
 	{
-	  char *item;
+	  gdbpy_ref<> elt (PyIter_Next (iter.get ()));
+	  if (elt == NULL)
+	    break;
 
-	  if (! gdbpy_is_string (elt))
+	  if (! gdbpy_is_string (elt.get ()))
 	    {
 	      /* Skip problem elements.  */
-	      Py_DECREF (elt);
 	      continue;
 	    }
-	  item = python_string_to_host_string (elt);
-	  Py_DECREF (elt);
+	  gdb::unique_xmalloc_ptr<char>
+	    item (python_string_to_host_string (elt.get ()));
 	  if (item == NULL)
 	    {
 	      /* Skip problem elements.  */
 	      PyErr_Clear ();
 	      continue;
 	    }
-	  VEC_safe_push (char_ptr, result, item);
+	  VEC_safe_push (char_ptr, result, item.release ());
 	}
 
-      Py_DECREF (iter);
-
       /* If we got some results, ignore problems.  Otherwise, report
 	 the problem.  */
       if (result != NULL && PyErr_Occurred ())
 	PyErr_Clear ();
     }
 
- done:
-
-  Py_XDECREF (resultobj);
-  do_cleanups (cleanup);
-
   return result;
 }
 
@@ -452,7 +418,7 @@ gdbpy_parse_command_name (const char *na
 		   || name[i - 1] == '_');
        --i)
     ;
-  result = xmalloc (lastchar - i + 2);
+  result = (char *) xmalloc (lastchar - i + 2);
   memcpy (result, &name[i], lastchar - i + 1);
   result[lastchar - i + 1] = '\0';
 
@@ -465,7 +431,7 @@ gdbpy_parse_command_name (const char *na
       return result;
     }
 
-  prefix_text = xmalloc (i + 2);
+  prefix_text = (char *) xmalloc (i + 2);
   memcpy (prefix_text, name, i + 1);
   prefix_text[i + 1] = '\0';
 
@@ -574,7 +540,7 @@ cmdpy_init (PyObject *self, PyObject *ar
 	  int i, out;
 	
 	  /* Make a normalized form of the command name.  */
-	  pfx_name = xmalloc (strlen (name) + 2);
+	  pfx_name = (char *) xmalloc (strlen (name) + 2);
 	
 	  i = 0;
 	  out = 0;
@@ -600,21 +566,18 @@ cmdpy_init (PyObject *self, PyObject *ar
     }
   if (PyObject_HasAttr (self, gdbpy_doc_cst))
     {
-      PyObject *ds_obj = PyObject_GetAttr (self, gdbpy_doc_cst);
+      gdbpy_ref<> ds_obj (PyObject_GetAttr (self, gdbpy_doc_cst));
 
-      if (ds_obj && gdbpy_is_string (ds_obj))
+      if (ds_obj != NULL && gdbpy_is_string (ds_obj.get ()))
 	{
-	  docstring = python_string_to_host_string (ds_obj);
+	  docstring = python_string_to_host_string (ds_obj.get ()).release ();
 	  if (docstring == NULL)
 	    {
 	      xfree (cmd_name);
 	      xfree (pfx_name);
-	      Py_DECREF (ds_obj);
 	      return -1;
 	    }
 	}
-
-      Py_XDECREF (ds_obj);
     }
   if (! docstring)
     docstring = xstrdup (_("This command is not documented."));
@@ -785,13 +748,12 @@ PyTypeObject cmdpy_object_type =
 PyObject *
 gdbpy_string_to_argv (PyObject *self, PyObject *args)
 {
-  PyObject *py_argv;
   const char *input;
 
   if (!PyArg_ParseTuple (args, "s", &input))
     return NULL;
 
-  py_argv = PyList_New (0);
+  gdbpy_ref<> py_argv (PyList_New (0));
   if (py_argv == NULL)
     return NULL;
 
@@ -806,21 +768,18 @@ gdbpy_string_to_argv (PyObject *self, Py
 
       for (i = 0; c_argv[i] != NULL; ++i)
 	{
-	  PyObject *argp = PyString_FromString (c_argv[i]);
+	  gdbpy_ref<> argp (PyString_FromString (c_argv[i]));
 
 	  if (argp == NULL
-	      || PyList_Append (py_argv, argp) < 0)
+	      || PyList_Append (py_argv.get (), argp.get ()) < 0)
 	    {
-	      Py_XDECREF (argp);
-	      Py_DECREF (py_argv);
 	      freeargv (c_argv);
 	      return NULL;
 	    }
-	  Py_DECREF (argp);
 	}
 
       freeargv (c_argv);
     }
 
-  return py_argv;
+  return py_argv.release ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-continueevent.c ./gdb/python/py-continueevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-continueevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-continueevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior continue events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "py-event.h"
+#include "py-ref.h"
 
 extern PyTypeObject continue_event_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
@@ -36,14 +37,12 @@ create_continue_event_object (void)
 int
 emit_continue_event (ptid_t ptid)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.cont))
     return 0;
 
-  event = create_continue_event_object ();
-  if (event)
-    return evpy_emit_event (event, gdb_py_events.cont);
+  gdbpy_ref<> event (create_continue_event_object ());
+  if (event != NULL)
+    return evpy_emit_event (event.get (), gdb_py_events.cont);
   return -1;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-event.c ./gdb/python/py-event.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-event.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-event.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,21 +30,15 @@ evpy_dealloc (PyObject *self)
 PyObject *
 create_event_object (PyTypeObject *py_type)
 {
-  event_object *event_obj;
-
-  event_obj = PyObject_New (event_object, py_type);
-  if (!event_obj)
-    goto fail;
+  gdbpy_ref<event_object> event_obj (PyObject_New (event_object, py_type));
+  if (event_obj == NULL)
+    return NULL;
 
   event_obj->dict = PyDict_New ();
   if (!event_obj->dict)
-    goto fail;
-
-  return (PyObject*) event_obj;
+    return NULL;
 
- fail:
-  Py_XDECREF (event_obj);
-  return NULL;
+  return (PyObject*) event_obj.release ();
 }
 
 /* Add the attribute ATTR to the event object EVENT.  In
@@ -89,26 +83,25 @@ int
 evpy_emit_event (PyObject *event,
                  eventregistry_object *registry)
 {
-  PyObject *callback_list_copy = NULL;
   Py_ssize_t i;
 
   /* Create a copy of call back list and use that for
      notifying listeners to avoid skipping callbacks
      in the case of a callback being disconnected during
      a notification.  */
-  callback_list_copy = PySequence_List (registry->callbacks);
-  if (!callback_list_copy)
-    goto fail;
+  gdbpy_ref<> callback_list_copy (PySequence_List (registry->callbacks));
+  if (callback_list_copy == NULL)
+    return -1;
 
-  for (i = 0; i < PyList_Size (callback_list_copy); i++)
+  for (i = 0; i < PyList_Size (callback_list_copy.get ()); i++)
     {
-      PyObject *func = PyList_GetItem (callback_list_copy, i);
-      PyObject *func_result;
+      PyObject *func = PyList_GetItem (callback_list_copy.get (), i);
 
       if (func == NULL)
-	goto fail;
+	return -1;
 
-      func_result = PyObject_CallFunctionObjArgs (func, event, NULL);
+      gdbpy_ref<> func_result (PyObject_CallFunctionObjArgs (func, event,
+							     NULL));
 
       if (func_result == NULL)
 	{
@@ -116,21 +109,9 @@ evpy_emit_event (PyObject *event,
 	     call all of the callbacks even if one is broken.  */
 	  gdbpy_print_stack ();
 	}
-      else
-	{
-	  Py_DECREF (func_result);
-	}
     }
 
-  Py_XDECREF (callback_list_copy);
-  Py_XDECREF (event);
   return 0;
-
- fail:
-  gdbpy_print_stack ();
-  Py_XDECREF (callback_list_copy);
-  Py_XDECREF (event);
-  return -1;
 }
 
 static PyGetSetDef event_object_getset[] =
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-event.h ./gdb/python/py-event.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-event.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-event.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "command.h"
 #include "python-internal.h"
 #include "inferior.h"
+#include "py-ref.h"
 
 /* This macro creates the following functions:
 
@@ -121,8 +122,7 @@ extern int emit_register_changed_event (
 				        int regnum);
 extern int emit_memory_changed_event (CORE_ADDR addr, ssize_t len);
 extern int evpy_emit_event (PyObject *event,
-                            eventregistry_object *registry)
-  CPYCHECKER_STEALS_REFERENCE_TO_ARG (1);
+                            eventregistry_object *registry);
 
 extern PyObject *create_event_object (PyTypeObject *py_type);
 extern PyObject *create_thread_event_object (PyTypeObject *py_type);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-events.h ./gdb/python/py-events.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-events.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-events.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,6 +50,10 @@ typedef struct
   eventregistry_object *inferior_call;
   eventregistry_object *memory_changed;
   eventregistry_object *register_changed;
+  eventregistry_object *breakpoint_created;
+  eventregistry_object *breakpoint_deleted;
+  eventregistry_object *breakpoint_modified;
+  eventregistry_object *before_prompt;
 
   PyObject *module;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-evtregistry.c ./gdb/python/py-evtregistry.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-evtregistry.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-evtregistry.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior thread event registries.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,7 @@
 #include "defs.h"
 #include "command.h"
 #include "py-events.h"
+#include "py-ref.h"
 
 events_object gdb_py_events;
 
@@ -79,22 +80,18 @@ evregpy_disconnect (PyObject *self, PyOb
 eventregistry_object *
 create_eventregistry_object (void)
 {
-  eventregistry_object *eventregistry_obj;
+  gdbpy_ref<eventregistry_object>
+    eventregistry_obj (PyObject_New (eventregistry_object,
+				     &eventregistry_object_type));
 
-  eventregistry_obj = PyObject_New (eventregistry_object,
-                                    &eventregistry_object_type);
-
-  if (!eventregistry_obj)
+  if (eventregistry_obj == NULL)
     return NULL;
 
   eventregistry_obj->callbacks = PyList_New (0);
   if (!eventregistry_obj->callbacks)
-    {
-      Py_DECREF (eventregistry_obj);
-      return NULL;
-    }
+    return NULL;
 
-  return eventregistry_obj;
+  return eventregistry_obj.release ();
 }
 
 static void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-evts.c ./gdb/python/py-evts.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-evts.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-evts.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,8 +40,6 @@ static struct PyModuleDef EventModuleDef
 static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
 add_new_registry (eventregistry_object **registryp, char *name)
 {
-  int result;
-
   *registryp = create_eventregistry_object ();
 
   if (*registryp == NULL)
@@ -91,6 +89,20 @@ gdbpy_initialize_py_events (void)
   if (add_new_registry (&gdb_py_events.clear_objfiles, "clear_objfiles") < 0)
     return -1;
 
+  if (add_new_registry (&gdb_py_events.breakpoint_created,
+			"breakpoint_created") < 0)
+    return -1;
+
+  if (add_new_registry (&gdb_py_events.breakpoint_deleted,
+			"breakpoint_deleted") < 0)
+    return -1;
+  if (add_new_registry (&gdb_py_events.breakpoint_modified,
+			"breakpoint_modified") < 0)
+    return -1;
+
+  if (add_new_registry (&gdb_py_events.before_prompt, "before_prompt") < 0)
+    return -1;
+
   if (gdb_pymodule_addobject (gdb_module,
 			      "events",
 			      (PyObject *) gdb_py_events.module) < 0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-exitedevent.c ./gdb/python/py-exitedevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-exitedevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-exitedevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior exit events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,42 +26,29 @@ extern PyTypeObject exited_event_object_
 static PyObject *
 create_exited_event_object (const LONGEST *exit_code, struct inferior *inf)
 {
-  PyObject *exited_event;
-  PyObject *inf_obj = NULL;
+  gdbpy_ref<> exited_event (create_event_object (&exited_event_object_type));
 
-  exited_event = create_event_object (&exited_event_object_type);
-
-  if (!exited_event)
-    goto fail;
+  if (exited_event == NULL)
+    return NULL;
 
   if (exit_code)
     {
-      PyObject *exit_code_obj = PyLong_FromLongLong (*exit_code);
-      int failed;
+      gdbpy_ref<> exit_code_obj (PyLong_FromLongLong (*exit_code));
 
       if (exit_code_obj == NULL)
-	goto fail;
-
-      failed = evpy_add_attribute (exited_event, "exit_code",
-				   exit_code_obj) < 0;
-      Py_DECREF (exit_code_obj);
-      if (failed)
-	goto fail;
+	return NULL;
+      if (evpy_add_attribute (exited_event.get (), "exit_code",
+			      exit_code_obj.get ()) < 0)
+	return NULL;
     }
 
-  inf_obj = inferior_to_inferior_object (inf);
-  if (!inf_obj || evpy_add_attribute (exited_event,
-                                      "inferior",
-                                      inf_obj) < 0)
-    goto fail;
-  Py_DECREF (inf_obj);
-
-  return exited_event;
-
- fail:
-  Py_XDECREF (inf_obj);
-  Py_XDECREF (exited_event);
-  return NULL;
+  gdbpy_ref<> inf_obj (inferior_to_inferior_object (inf));
+  if (inf_obj == NULL || evpy_add_attribute (exited_event.get (),
+					     "inferior",
+					     inf_obj.get ()) < 0)
+    return NULL;
+
+  return exited_event.release ();
 }
 
 /* Callback that is used when an exit event occurs.  This function
@@ -70,15 +57,13 @@ create_exited_event_object (const LONGES
 int
 emit_exited_event (const LONGEST *exit_code, struct inferior *inf)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.exited))
     return 0;
 
-  event = create_exited_event_object (exit_code, inf);
+  gdbpy_ref<> event (create_exited_event_object (exit_code, inf));
 
-  if (event)
-    return evpy_emit_event (event, gdb_py_events.exited);
+  if (event != NULL)
+    return evpy_emit_event (event.get (), gdb_py_events.exited);
 
   return -1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-finishbreakpoint.c ./gdb/python/py-finishbreakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-finishbreakpoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-finishbreakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to finish breakpoints
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,6 +29,8 @@
 #include "observer.h"
 #include "inferior.h"
 #include "block.h"
+#include "location.h"
+#include "py-ref.h"
 
 /* Function that is called when a Python finish bp is found out of scope.  */
 static char * const outofscope_func = "out_of_scope";
@@ -106,10 +108,7 @@ bpfinishpy_pre_stop_hook (struct gdbpy_b
         value_object_to_value (self_finishbp->function_value);
       struct type *value_type =
         type_object_to_type (self_finishbp->return_type);
-
-      /* bpfinishpy_init cannot finish into DUMMY_FRAME (throws an error
-         in such case) so it is OK to always pass CTX_SAVER as NULL.  */
-      struct value *ret = get_return_value (function, value_type, NULL);
+      struct value *ret = get_return_value (function, value_type);
 
       if (ret)
         {
@@ -160,7 +159,6 @@ bpfinishpy_init (PyObject *self, PyObjec
   static char *keywords[] = { "frame", "internal", NULL };
   struct finish_breakpoint_object *self_bpfinish =
       (struct finish_breakpoint_object *) self;
-  int type = bp_breakpoint;
   PyObject *frame_obj = NULL;
   int thread;
   struct frame_info *frame = NULL; /* init for gcc -Wall */
@@ -168,8 +166,7 @@ bpfinishpy_init (PyObject *self, PyObjec
   struct frame_id frame_id;
   PyObject *internal = NULL;
   int internal_bp = 0;
-  CORE_ADDR finish_pc, pc;
-  char *addr_str, small_buf[100];
+  CORE_ADDR pc;
   struct symbol *function;
 
   if (!PyArg_ParseTupleAndKeywords (args, kwargs, "|OO", keywords,
@@ -224,7 +221,7 @@ bpfinishpy_init (PyObject *self, PyObjec
   if (PyErr_Occurred ())
     return -1;
 
-  thread = pid_to_thread_id (inferior_ptid);
+  thread = ptid_to_global_thread_id (inferior_ptid);
   if (thread == 0)
     {
       PyErr_SetString (PyExc_ValueError,
@@ -265,7 +262,7 @@ bpfinishpy_init (PyObject *self, PyObjec
                   /* Ignore Python errors at this stage.  */
                   self_bpfinish->return_type = type_to_type_object (ret_type);
                   PyErr_Clear ();
-                  func_value = read_var_value (function, frame);
+                  func_value = read_var_value (function, NULL, frame);
                   self_bpfinish->function_value =
                       value_to_value_object (func_value);
                   PyErr_Clear ();
@@ -296,13 +293,14 @@ bpfinishpy_init (PyObject *self, PyObjec
 
   TRY
     {
-      /* Set a breakpoint on the return address.  */
-      finish_pc = get_frame_pc (prev_frame);
-      xsnprintf (small_buf, sizeof (small_buf), "*%s", hex_string (finish_pc));
-      addr_str = small_buf;
+      struct event_location *location;
+      struct cleanup *back_to;
 
+      /* Set a breakpoint on the return address.  */
+      location = new_address_location (get_frame_pc (prev_frame), NULL, 0);
+      back_to = make_cleanup_delete_event_location (location);
       create_breakpoint (python_gdbarch,
-                         addr_str, NULL, thread, NULL,
+                         location, NULL, thread, NULL,
                          0,
                          1 /*temp_flag*/,
                          bp_breakpoint,
@@ -310,6 +308,7 @@ bpfinishpy_init (PyObject *self, PyObjec
                          AUTO_BOOLEAN_TRUE,
                          &bkpt_breakpoint_ops,
                          0, 1, internal_bp, 0);
+      do_cleanups (back_to);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -339,12 +338,10 @@ bpfinishpy_out_of_scope (struct finish_b
   if (bpfinish_obj->py_bp.bp->enable_state == bp_enabled
       && PyObject_HasAttrString (py_obj, outofscope_func))
     {
-      PyObject *meth_result;
-
-      meth_result = PyObject_CallMethod (py_obj, outofscope_func, NULL);
+      gdbpy_ref<> meth_result (PyObject_CallMethod (py_obj, outofscope_func,
+						    NULL));
       if (meth_result == NULL)
 	gdbpy_print_stack ();
-      Py_XDECREF (meth_result);
     }
 
   delete_breakpoint (bpfinish_obj->py_bp.bp);
@@ -358,7 +355,6 @@ bpfinishpy_detect_out_scope_cb (struct b
 {
   struct breakpoint *bp_stopped = (struct breakpoint *) args;
   PyObject *py_bp = (PyObject *) b->py_bp_object;
-  struct gdbarch *garch = b->gdbarch ? b->gdbarch : get_current_arch ();
 
   /* Trigger out_of_scope if this is a FinishBreakpoint and its frame is
      not anymore in the current callstack.  */
@@ -395,13 +391,10 @@ bpfinishpy_detect_out_scope_cb (struct b
 static void
 bpfinishpy_handle_stop (struct bpstats *bs, int print_frame)
 {
-  struct cleanup *cleanup = ensure_python_env (get_current_arch (),
-                                               current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb,
                             bs == NULL ? NULL : bs->breakpoint_at);
-
-  do_cleanups (cleanup);
 }
 
 /* Attached to `exit' notifications, triggers all the necessary out of
@@ -410,12 +403,9 @@ bpfinishpy_handle_stop (struct bpstats *
 static void
 bpfinishpy_handle_exit (struct inferior *inf)
 {
-  struct cleanup *cleanup = ensure_python_env (target_gdbarch (),
-                                               current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, NULL);
-
-  do_cleanups (cleanup);
 }
 
 /* Initialize the Python finish breakpoint code.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-frame.c ./gdb/python/py-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to stack frames
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "user-regs.h"
+#include "py-ref.h"
 
 typedef struct {
   PyObject_HEAD
@@ -80,17 +81,10 @@ frame_object_to_frame_info (PyObject *ob
 static PyObject *
 frapy_str (PyObject *self)
 {
-  char *s;
-  PyObject *result;
-  struct ui_file *strfile;
-
-  strfile = mem_fileopen ();
-  fprint_frame_id (strfile, ((frame_object *) self)->frame_id);
-  s = ui_file_xstrdup (strfile, NULL);
-  result = PyString_FromString (s);
-  xfree (s);
+  string_file strfile;
 
-  return result;
+  fprint_frame_id (&strfile, ((frame_object *) self)->frame_id);
+  return PyString_FromString (strfile.c_str ());
 }
 
 /* Implementation of gdb.Frame.is_valid (self) -> Boolean.
@@ -340,9 +334,13 @@ frapy_function (PyObject *self, PyObject
 
   TRY
     {
+      char *funname;
+      enum language funlang;
+
       FRAPY_REQUIRE_VALID (self, frame);
 
-      sym = find_pc_function (get_frame_address_in_block (frame));
+      find_frame_funname (frame, &funname, &funlang, &sym);
+      xfree (funname);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -362,9 +360,8 @@ frapy_function (PyObject *self, PyObject
 PyObject *
 frame_info_to_frame_object (struct frame_info *frame)
 {
-  frame_object *frame_obj;
-
-  frame_obj = PyObject_New (frame_object, &frame_object_type);
+  gdbpy_ref<frame_object> frame_obj (PyObject_New (frame_object,
+						   &frame_object_type));
   if (frame_obj == NULL)
     return NULL;
 
@@ -390,13 +387,12 @@ frame_info_to_frame_object (struct frame
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      Py_DECREF (frame_obj);
       gdbpy_convert_exception (except);
       return NULL;
     }
   END_CATCH
 
-  return (PyObject *) frame_obj;
+  return (PyObject *) frame_obj.release ();
 }
 
 /* Implementation of gdb.Frame.older (self) -> gdb.Frame.
@@ -504,6 +500,7 @@ frapy_read_var (PyObject *self, PyObject
   struct frame_info *frame;
   PyObject *sym_obj, *block_obj = NULL;
   struct symbol *var = NULL;	/* gcc-4.3.2 false warning.  */
+  const struct block *block = NULL;
   struct value *val = NULL;
 
   if (!PyArg_ParseTuple (args, "O|O", &sym_obj, &block_obj))
@@ -513,14 +510,11 @@ frapy_read_var (PyObject *self, PyObject
     var = symbol_object_to_symbol (sym_obj);
   else if (gdbpy_is_string (sym_obj))
     {
-      char *var_name;
-      const struct block *block = NULL;
-      struct cleanup *cleanup;
+      gdb::unique_xmalloc_ptr<char>
+	var_name (python_string_to_target_string (sym_obj));
 
-      var_name = python_string_to_target_string (sym_obj);
       if (!var_name)
 	return NULL;
-      cleanup = make_cleanup (xfree, var_name);
 
       if (block_obj)
 	{
@@ -529,22 +523,23 @@ frapy_read_var (PyObject *self, PyObject
 	    {
 	      PyErr_SetString (PyExc_RuntimeError,
 			       _("Second argument must be block."));
-	      do_cleanups (cleanup);
 	      return NULL;
 	    }
 	}
 
       TRY
 	{
+	  struct block_symbol lookup_sym;
 	  FRAPY_REQUIRE_VALID (self, frame);
 
 	  if (!block)
 	    block = get_frame_block (frame, NULL);
-	  var = lookup_symbol (var_name, block, VAR_DOMAIN, NULL);
+	  lookup_sym = lookup_symbol (var_name.get (), block, VAR_DOMAIN, NULL);
+	  var = lookup_sym.symbol;
+	  block = lookup_sym.block;
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
-	  do_cleanups (cleanup);
 	  gdbpy_convert_exception (except);
 	  return NULL;
 	}
@@ -553,13 +548,10 @@ frapy_read_var (PyObject *self, PyObject
       if (!var)
 	{
 	  PyErr_Format (PyExc_ValueError,
-			_("Variable '%s' not found."), var_name);
-	  do_cleanups (cleanup);
+			_("Variable '%s' not found."), var_name.get ());
 
 	  return NULL;
 	}
-
-      do_cleanups (cleanup);
     }
   else
     {
@@ -572,7 +564,7 @@ frapy_read_var (PyObject *self, PyObject
     {
       FRAPY_REQUIRE_VALID (self, frame);
 
-      val = read_var_value (var, frame);
+      val = read_var_value (var, block, frame);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -666,7 +658,7 @@ gdbpy_frame_stop_reason_string (PyObject
       return NULL;
     }
 
-  str = unwind_stop_reason_to_string (reason);
+  str = unwind_stop_reason_to_string ((enum unwind_stop_reason) reason);
   return PyUnicode_Decode (str, strlen (str), host_charset (), NULL);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-framefilter.c ./gdb/python/py-framefilter.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-framefilter.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-framefilter.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python frame filters
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,8 @@
 #include "demangle.h"
 #include "mi/mi-cmds.h"
 #include "python-internal.h"
+#include "py-ref.h"
+#include "common/gdb_optional.h"
 
 enum mi_print_types
 {
@@ -43,28 +45,29 @@ enum mi_print_types
    NAME is a  pass-through argument where the name of  the symbol will
    be written.  NAME is allocated in  this function, but the caller is
    responsible for clean up.  SYM is a pass-through argument where the
-   symbol will be written.  In the case of the API returning a string,
-   this will be set to NULL.  LANGUAGE is also a pass-through argument
-   denoting the language attributed to the Symbol.  In the case of SYM
-   being  NULL, this  will be  set to  the current  language.  Returns
-   EXT_LANG_BT_ERROR on error with the appropriate Python exception set, and
-   EXT_LANG_BT_OK on success.  */
+   symbol will be written and  SYM_BLOCK is a pass-through argument to
+   write  the block where the symbol lies in.  In the case of the  API
+   returning a  string,  this will be set to NULL.  LANGUAGE is also a
+   pass-through  argument  denoting  the  language  attributed  to the
+   Symbol.  In the case of SYM being  NULL, this  will be  set to  the
+   current  language.  Returns  EXT_LANG_BT_ERROR  on  error  with the
+   appropriate Python exception set, and EXT_LANG_BT_OK on success.  */
 
 static enum ext_lang_bt_status
-extract_sym (PyObject *obj, char **name, struct symbol **sym,
+extract_sym (PyObject *obj, gdb::unique_xmalloc_ptr<char> *name,
+	     struct symbol **sym, struct block **sym_block,
 	     const struct language_defn **language)
 {
-  PyObject *result = PyObject_CallMethod (obj, "symbol", NULL);
+  gdbpy_ref<> result (PyObject_CallMethod (obj, "symbol", NULL));
 
   if (result == NULL)
     return EXT_LANG_BT_ERROR;
 
   /* For 'symbol' callback, the function can return a symbol or a
      string.  */
-  if (gdbpy_is_string (result))
+  if (gdbpy_is_string (result.get ()))
     {
-      *name = python_string_to_host_string (result);
-      Py_DECREF (result);
+      *name = python_string_to_host_string (result.get ());
 
       if (*name == NULL)
 	return EXT_LANG_BT_ERROR;
@@ -75,14 +78,18 @@ extract_sym (PyObject *obj, char **name,
 	python_language.  */
       *language = python_language;
       *sym = NULL;
+      *sym_block = NULL;
     }
   else
     {
       /* This type checks 'result' during the conversion so we
 	 just call it unconditionally and check the return.  */
-      *sym = symbol_object_to_symbol (result);
-
-      Py_DECREF (result);
+      *sym = symbol_object_to_symbol (result.get ());
+      /* TODO: currently, we have no way to recover the block in which SYMBOL
+	 was found, so we have no block to return.  Trying to evaluate SYMBOL
+	 will yield an incorrect value when it's located in a FRAME and
+	 evaluated from another frame (as permitted in nested functions).  */
+      *sym_block = NULL;
 
       if (*sym == NULL)
 	{
@@ -94,7 +101,7 @@ extract_sym (PyObject *obj, char **name,
 
       /* Duplicate the symbol name, so the caller has consistency
 	 in garbage collection.  */
-      *name = xstrdup (SYMBOL_PRINT_NAME (*sym));
+      name->reset (xstrdup (SYMBOL_PRINT_NAME (*sym)));
 
       /* If a symbol is specified attempt to determine the language
 	 from the symbol.  If mode is not "auto", then the language
@@ -122,7 +129,7 @@ extract_value (PyObject *obj, struct val
 {
   if (PyObject_HasAttrString (obj, "value"))
     {
-      PyObject *vresult = PyObject_CallMethod (obj, "value", NULL);
+      gdbpy_ref<> vresult (PyObject_CallMethod (obj, "value", NULL));
 
       if (vresult == NULL)
 	return EXT_LANG_BT_ERROR;
@@ -132,14 +139,12 @@ extract_value (PyObject *obj, struct val
 	 value.  */
       if (vresult == Py_None)
 	{
-	  Py_DECREF (vresult);
 	  *value = NULL;
 	  return EXT_LANG_BT_OK;
 	}
       else
 	{
-	  *value = convert_value_from_python (vresult);
-	  Py_DECREF (vresult);
+	  *value = convert_value_from_python (vresult.get ());
 
 	  if (*value == NULL)
 	    return EXT_LANG_BT_ERROR;
@@ -204,16 +209,11 @@ py_print_type (struct ui_out *out, struc
 
   TRY
     {
-      struct type *type;
-      struct ui_file *stb;
-      struct cleanup *cleanup;
-
-      stb = mem_fileopen ();
-      cleanup = make_cleanup_ui_file_delete (stb);
-      type = check_typedef (value_type (val));
-      type_print (value_type (val), "", stb, -1);
-      ui_out_field_stream (out, "type", stb);
-      do_cleanups (cleanup);
+      check_typedef (value_type (val));
+
+      string_file stb;
+      type_print (value_type (val), "", &stb, -1);
+      out->field_stream ("type", stb);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -242,11 +242,6 @@ py_print_value (struct ui_out *out, stru
 		const struct language_defn *language)
 {
   int should_print = 0;
-  int local_indent = (4 * indent);
-
-  /* Never set an indent level for common_val_print if MI.  */
-  if (ui_out_is_mi_like_p (out))
-    local_indent = 0;
 
   /* MI does not print certain values, differentiated by type,
      depending on what ARGS_TYPE indicates.  Test type against option.
@@ -282,14 +277,10 @@ py_print_value (struct ui_out *out, stru
     {
       TRY
 	{
-	  struct ui_file *stb;
-	  struct cleanup *cleanup;
+	  string_file stb;
 
-	  stb = mem_fileopen ();
-	  cleanup = make_cleanup_ui_file_delete (stb);
-	  common_val_print (val, stb, indent, opts, language);
-	  ui_out_field_stream (out, "value", stb);
-	  do_cleanups (cleanup);
+	  common_val_print (val, &stb, indent, opts, language);
+	  out->field_stream ("value", stb);
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
@@ -314,20 +305,17 @@ get_py_iter_from_func (PyObject *filter,
 {
   if (PyObject_HasAttrString (filter, func))
     {
-      PyObject *result = PyObject_CallMethod (filter, func, NULL);
+      gdbpy_ref<> result (PyObject_CallMethod (filter, func, NULL));
 
       if (result != NULL)
 	{
 	  if (result == Py_None)
 	    {
-	      return result;
+	      return result.release ();
 	    }
 	  else
 	    {
-	      PyObject *iterator = PyObject_GetIter (result);
-
-	      Py_DECREF (result);
-	      return iterator;
+	      return PyObject_GetIter (result.get ());
 	    }
 	}
     }
@@ -378,7 +366,7 @@ py_print_single_arg (struct ui_out *out,
 
   TRY
     {
-      struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+      gdb::optional<ui_out_emit_tuple> maybe_tuple;
 
       /*  MI has varying rules for tuples, but generally if there is only
       one element in each item in the list, do not start a tuple.  The
@@ -386,10 +374,10 @@ py_print_single_arg (struct ui_out *out,
       if the value is a frame argument.  This is denoted in this
       function with PRINT_ARGS_FIELD which is flag from the caller to
       emit the ARGS field.  */
-      if (ui_out_is_mi_like_p (out))
+      if (out->is_mi_like_p ())
 	{
 	  if (print_args_field || args_type != NO_VALUES)
-	    make_cleanup_ui_out_tuple_begin_end (out, NULL);
+	    maybe_tuple.emplace (out, nullptr);
 	}
 
       annotate_arg_begin ();
@@ -398,39 +386,35 @@ py_print_single_arg (struct ui_out *out,
 	 entry value options.  */
       if (fa != NULL)
 	{
-	  struct ui_file *stb;
+	  string_file stb;
 
-	  stb = mem_fileopen ();
-	  make_cleanup_ui_file_delete (stb);
-	  fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (fa->sym),
+	  fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (fa->sym),
 				   SYMBOL_LANGUAGE (fa->sym),
 				   DMGL_PARAMS | DMGL_ANSI);
 	  if (fa->entry_kind == print_entry_values_compact)
 	    {
-	      fputs_filtered ("=", stb);
+	      stb.puts ("=");
 
-	      fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (fa->sym),
+	      fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (fa->sym),
 				       SYMBOL_LANGUAGE (fa->sym),
 				       DMGL_PARAMS | DMGL_ANSI);
 	    }
 	  if (fa->entry_kind == print_entry_values_only
 	      || fa->entry_kind == print_entry_values_compact)
-	    {
-	      fputs_filtered ("@entry", stb);
-	    }
-	  ui_out_field_stream (out, "name", stb);
+	    stb.puts ("@entry");
+	  out->field_stream ("name", stb);
 	}
       else
 	/* Otherwise, just output the name.  */
-	ui_out_field_string (out, "name", sym_name);
+	out->field_string ("name", sym_name);
 
       annotate_arg_name_end ();
 
-      if (! ui_out_is_mi_like_p (out))
-	ui_out_text (out, "=");
+      if (! out->is_mi_like_p ())
+	out->text ("=");
 
       if (print_args_field)
-	ui_out_field_int (out, "arg", 1);
+	out->field_int ("arg", 1);
 
       /* For MI print the type, but only for simple values.  This seems
 	 weird, but this is how MI choose to format the various output
@@ -438,40 +422,37 @@ py_print_single_arg (struct ui_out *out,
       if (args_type == MI_PRINT_SIMPLE_VALUES && val != NULL)
 	{
 	  if (py_print_type (out, val) == EXT_LANG_BT_ERROR)
-	    {
-	      retval = EXT_LANG_BT_ERROR;
-	      do_cleanups (cleanups);
-	      continue;
-	    }
+	    retval = EXT_LANG_BT_ERROR;
 	}
 
-      if (val != NULL)
-	annotate_arg_value (value_type (val));
-
-      /* If the output is to the CLI, and the user option "set print
-	 frame-arguments" is set to none, just output "...".  */
-      if (! ui_out_is_mi_like_p (out) && args_type == NO_VALUES)
-	ui_out_field_string (out, "value", "...");
-      else
+      if (retval != EXT_LANG_BT_ERROR)
 	{
-	  /* Otherwise, print the value for both MI and the CLI, except
-	     for the case of MI_PRINT_NO_VALUES.  */
-	  if (args_type != NO_VALUES)
+	  if (val != NULL)
+	    annotate_arg_value (value_type (val));
+
+	  /* If the output is to the CLI, and the user option "set print
+	     frame-arguments" is set to none, just output "...".  */
+	  if (! out->is_mi_like_p () && args_type == NO_VALUES)
+	    out->field_string ("value", "...");
+	  else
 	    {
-	      if (val == NULL)
+	      /* Otherwise, print the value for both MI and the CLI, except
+		 for the case of MI_PRINT_NO_VALUES.  */
+	      if (args_type != NO_VALUES)
 		{
-		  gdb_assert (fa != NULL && fa->error != NULL);
-		  ui_out_field_fmt (out, "value",
-				    _("<error reading variable: %s>"),
-				    fa->error);
+		  if (val == NULL)
+		    {
+		      gdb_assert (fa != NULL && fa->error != NULL);
+		      out->field_fmt ("value",
+					_("<error reading variable: %s>"),
+					fa->error);
+		    }
+		  else if (py_print_value (out, val, opts, 0, args_type, language)
+			   == EXT_LANG_BT_ERROR)
+		    retval = EXT_LANG_BT_ERROR;
 		}
-	      else if (py_print_value (out, val, opts, 0, args_type, language)
-		       == EXT_LANG_BT_ERROR)
-		retval = EXT_LANG_BT_ERROR;
 	    }
 	}
-
-      do_cleanups (cleanups);
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
@@ -500,7 +481,6 @@ enumerate_args (PyObject *iter,
 		int print_args_field,
 		struct frame_info *frame)
 {
-  PyObject *item;
   struct value_print_options opts;
 
   get_user_print_options (&opts);
@@ -520,7 +500,7 @@ enumerate_args (PyObject *iter,
   CATCH (except, RETURN_MASK_ALL)
     {
       gdbpy_convert_exception (except);
-      goto error;
+      return EXT_LANG_BT_ERROR;
     }
   END_CATCH
 
@@ -528,42 +508,31 @@ enumerate_args (PyObject *iter,
       commas in the argument output is correct.  At the end of the
       loop block collect another item from the iterator, and, if it is
       not null emit a comma.  */
-  item = PyIter_Next (iter);
+  gdbpy_ref<> item (PyIter_Next (iter));
   if (item == NULL && PyErr_Occurred ())
-    goto error;
+    return EXT_LANG_BT_ERROR;
 
-  while (item)
+  while (item != NULL)
     {
       const struct language_defn *language;
-      char *sym_name;
+      gdb::unique_xmalloc_ptr<char> sym_name;
       struct symbol *sym;
+      struct block *sym_block;
       struct value *val;
       enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
 
-      success = extract_sym (item, &sym_name, &sym, &language);
+      success = extract_sym (item.get (), &sym_name, &sym, &sym_block,
+			     &language);
       if (success == EXT_LANG_BT_ERROR)
-	{
-	  Py_DECREF (item);
-	  goto error;
-	}
+	return EXT_LANG_BT_ERROR;
 
-      success = extract_value (item, &val);
+      success = extract_value (item.get (), &val);
       if (success == EXT_LANG_BT_ERROR)
-	{
-	  xfree (sym_name);
-	  Py_DECREF (item);
-	  goto error;
-	}
-
-      Py_DECREF (item);
-      item = NULL;
+	return EXT_LANG_BT_ERROR;
 
-      if (sym && ui_out_is_mi_like_p (out)
+      if (sym && out->is_mi_like_p ()
 	  && ! mi_should_print (sym, MI_PRINT_ARGS))
-	{
-	  xfree (sym_name);
-	  continue;
-	}
+	continue;
 
       /* If the object did not provide a value, read it using
 	 read_frame_args and account for entry values, if any.  */
@@ -577,8 +546,7 @@ enumerate_args (PyObject *iter,
 	    {
 	      PyErr_SetString (PyExc_RuntimeError,
 			       _("No symbol or value provided."));
-	      xfree (sym_name);
-	      goto error;
+	      return EXT_LANG_BT_ERROR;
 	    }
 
 	  TRY
@@ -587,9 +555,8 @@ enumerate_args (PyObject *iter,
 	    }
 	  CATCH (except, RETURN_MASK_ALL)
 	    {
-	      xfree (sym_name);
 	      gdbpy_convert_exception (except);
-	      goto error;
+	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
 
@@ -607,8 +574,7 @@ enumerate_args (PyObject *iter,
 		{
 		  xfree (arg.error);
 		  xfree (entryarg.error);
-		  xfree (sym_name);
-		  goto error;
+		  return EXT_LANG_BT_ERROR;
 		}
 	    }
 
@@ -618,16 +584,15 @@ enumerate_args (PyObject *iter,
 		{
 		  TRY
 		    {
-		      ui_out_text (out, ", ");
-		      ui_out_wrap_hint (out, "    ");
+		      out->text (", ");
+		      out->wrap_hint ("    ");
 		    }
 		  CATCH (except, RETURN_MASK_ALL)
 		    {
 		      xfree (arg.error);
 		      xfree (entryarg.error);
-		      xfree (sym_name);
 		      gdbpy_convert_exception (except);
-		      goto error;
+		      return EXT_LANG_BT_ERROR;
 		    }
 		  END_CATCH
 		}
@@ -636,10 +601,9 @@ enumerate_args (PyObject *iter,
 				       args_type, print_args_field, NULL)
 		  == EXT_LANG_BT_ERROR)
 		{
-		      xfree (arg.error);
-		      xfree (entryarg.error);
-		      xfree (sym_name);
-		      goto error;
+		  xfree (arg.error);
+		  xfree (entryarg.error);
+		  return EXT_LANG_BT_ERROR;
 		}
 	    }
 
@@ -651,38 +615,32 @@ enumerate_args (PyObject *iter,
 	  /* If the object has provided a value, we just print that.  */
 	  if (val != NULL)
 	    {
-	      if (py_print_single_arg (out, sym_name, NULL, val, &opts,
+	      if (py_print_single_arg (out, sym_name.get (), NULL, val, &opts,
 				       args_type, print_args_field,
 				       language) == EXT_LANG_BT_ERROR)
-		{
-		  xfree (sym_name);
-		  goto error;
-		}
+		return EXT_LANG_BT_ERROR;
 	    }
 	}
 
-      xfree (sym_name);
-
       /* Collect the next item from the iterator.  If
 	 this is the last item, do not print the
 	 comma.  */
-      item = PyIter_Next (iter);
+      item.reset (PyIter_Next (iter));
       if (item != NULL)
 	{
 	  TRY
 	    {
-	      ui_out_text (out, ", ");
+	      out->text (", ");
 	    }
 	  CATCH (except, RETURN_MASK_ALL)
 	    {
-	      Py_DECREF (item);
 	      gdbpy_convert_exception (except);
-	      goto error;
+	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
 	}
       else if (PyErr_Occurred ())
-	goto error;
+	return EXT_LANG_BT_ERROR;
 
       TRY
 	{
@@ -690,17 +648,13 @@ enumerate_args (PyObject *iter,
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
-	  Py_DECREF (item);
 	  gdbpy_convert_exception (except);
-	  goto error;
+	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
     }
 
   return EXT_LANG_BT_OK;
-
- error:
-  return EXT_LANG_BT_ERROR;
 }
 
 
@@ -723,59 +677,50 @@ enumerate_locals (PyObject *iter,
 		  int print_args_field,
 		  struct frame_info *frame)
 {
-  PyObject *item;
   struct value_print_options opts;
 
   get_user_print_options (&opts);
   opts.deref_ref = 1;
 
-  while ((item = PyIter_Next (iter)))
+  while (true)
     {
       const struct language_defn *language;
-      char *sym_name;
+      gdb::unique_xmalloc_ptr<char> sym_name;
       struct value *val;
       enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
       struct symbol *sym;
+      struct block *sym_block;
       int local_indent = 8 + (8 * indent);
-      struct cleanup *locals_cleanups;
+      gdb::optional<ui_out_emit_tuple> tuple;
 
-      locals_cleanups = make_cleanup_py_decref (item);
+      gdbpy_ref<> item (PyIter_Next (iter));
+      if (item == NULL)
+	break;
 
-      success = extract_sym (item, &sym_name, &sym, &language);
+      success = extract_sym (item.get (), &sym_name, &sym, &sym_block,
+			     &language);
       if (success == EXT_LANG_BT_ERROR)
-	{
-	  do_cleanups (locals_cleanups);
-	  goto error;
-	}
-
-      make_cleanup (xfree, sym_name);
+	return EXT_LANG_BT_ERROR;
 
-      success = extract_value (item, &val);
+      success = extract_value (item.get (), &val);
       if (success == EXT_LANG_BT_ERROR)
-	{
-	  do_cleanups (locals_cleanups);
-	  goto error;
-	}
+	return EXT_LANG_BT_ERROR;
 
-      if (sym != NULL && ui_out_is_mi_like_p (out)
+      if (sym != NULL && out->is_mi_like_p ()
 	  && ! mi_should_print (sym, MI_PRINT_LOCALS))
-	{
-	  do_cleanups (locals_cleanups);
-	  continue;
-	}
+	continue;
 
       /* If the object did not provide a value, read it.  */
       if (val == NULL)
 	{
 	  TRY
 	    {
-	      val = read_var_value (sym, frame);
+	      val = read_var_value (sym, sym_block, frame);
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
 	      gdbpy_convert_exception (except);
-	      do_cleanups (locals_cleanups);
-	      goto error;
+	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
 	}
@@ -783,53 +728,46 @@ enumerate_locals (PyObject *iter,
       /* With PRINT_NO_VALUES, MI does not emit a tuple normally as
 	 each output contains only one field.  The exception is
 	 -stack-list-variables, which always provides a tuple.  */
-      if (ui_out_is_mi_like_p (out))
+      if (out->is_mi_like_p ())
 	{
 	  if (print_args_field || args_type != NO_VALUES)
-	    make_cleanup_ui_out_tuple_begin_end (out, NULL);
+	    tuple.emplace (out, nullptr);
 	}
       TRY
 	{
-	  if (! ui_out_is_mi_like_p (out))
+	  if (! out->is_mi_like_p ())
 	    {
 	      /* If the output is not MI we indent locals.  */
-	      ui_out_spaces (out, local_indent);
+	      out->spaces (local_indent);
 	    }
 
-	  ui_out_field_string (out, "name", sym_name);
+	  out->field_string ("name", sym_name.get ());
 
-	  if (! ui_out_is_mi_like_p (out))
-	    ui_out_text (out, " = ");
+	  if (! out->is_mi_like_p ())
+	    out->text (" = ");
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  gdbpy_convert_exception (except);
-	  do_cleanups (locals_cleanups);
-	  goto error;
+	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
 
       if (args_type == MI_PRINT_SIMPLE_VALUES)
 	{
 	  if (py_print_type (out, val) == EXT_LANG_BT_ERROR)
-	    {
-	      do_cleanups (locals_cleanups);
-	      goto error;
-	    }
+	    return EXT_LANG_BT_ERROR;
 	}
 
       /* CLI always prints values for locals.  MI uses the
 	 simple/no/all system.  */
-      if (! ui_out_is_mi_like_p (out))
+      if (! out->is_mi_like_p ())
 	{
 	  int val_indent = (indent + 1) * 4;
 
 	  if (py_print_value (out, val, &opts, val_indent, args_type,
 			      language) == EXT_LANG_BT_ERROR)
-	    {
-	      do_cleanups (locals_cleanups);
-	      goto error;
-	    }
+	    return EXT_LANG_BT_ERROR;
 	}
       else
 	{
@@ -837,33 +775,25 @@ enumerate_locals (PyObject *iter,
 	    {
 	      if (py_print_value (out, val, &opts, 0, args_type,
 				  language) == EXT_LANG_BT_ERROR)
-		{
-		  do_cleanups (locals_cleanups);
-		  goto error;
-		}
+		return EXT_LANG_BT_ERROR;
 	    }
 	}
 
-      do_cleanups (locals_cleanups);
-
       TRY
 	{
-	  ui_out_text (out, "\n");
+	  out->text ("\n");
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  gdbpy_convert_exception (except);
-	  goto error;
+	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
     }
 
-  if (item == NULL && PyErr_Occurred ())
-    goto error;
-
-  return EXT_LANG_BT_OK;
+  if (!PyErr_Occurred ())
+    return EXT_LANG_BT_OK;
 
- error:
   return EXT_LANG_BT_ERROR;
 }
 
@@ -876,38 +806,27 @@ py_mi_print_variables (PyObject *filter,
 		       enum ext_lang_frame_args args_type,
 		       struct frame_info *frame)
 {
-  struct cleanup *old_chain;
-  PyObject *args_iter;
-  PyObject *locals_iter;
-
-  args_iter = get_py_iter_from_func (filter, "frame_args");
-  old_chain = make_cleanup_py_xdecref (args_iter);
+  gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
   if (args_iter == NULL)
-    goto error;
+    return EXT_LANG_BT_ERROR;
 
-  locals_iter = get_py_iter_from_func (filter, "frame_locals");
+  gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals"));
   if (locals_iter == NULL)
-    goto error;
+    return EXT_LANG_BT_ERROR;
 
-  make_cleanup_py_decref (locals_iter);
-  make_cleanup_ui_out_list_begin_end (out, "variables");
+  ui_out_emit_list list_emitter (out, "variables");
 
-  if (args_iter != Py_None)
-    if (enumerate_args (args_iter, out, args_type, 1, frame)
-	== EXT_LANG_BT_ERROR)
-      goto error;
-
-  if (locals_iter != Py_None)
-    if (enumerate_locals (locals_iter, out, 1, args_type, 1, frame)
-	== EXT_LANG_BT_ERROR)
-      goto error;
+  if (args_iter != Py_None
+      && (enumerate_args (args_iter.get (), out, args_type, 1, frame)
+	  == EXT_LANG_BT_ERROR))
+    return EXT_LANG_BT_ERROR;
 
-  do_cleanups (old_chain);
-  return EXT_LANG_BT_OK;
+  if (locals_iter != Py_None
+      && (enumerate_locals (locals_iter.get (), out, 1, args_type, 1, frame)
+	  == EXT_LANG_BT_ERROR))
+    return EXT_LANG_BT_ERROR;
 
- error:
-  do_cleanups (old_chain);
-  return EXT_LANG_BT_ERROR;
+  return EXT_LANG_BT_OK;
 }
 
 /* Helper function for printing locals.  This function largely just
@@ -921,26 +840,18 @@ py_print_locals (PyObject *filter,
 		 int indent,
 		 struct frame_info *frame)
 {
-  PyObject *locals_iter = get_py_iter_from_func (filter,
-						 "frame_locals");
-  struct cleanup *old_chain = make_cleanup_py_xdecref (locals_iter);
-
+  gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals"));
   if (locals_iter == NULL)
-    goto locals_error;
+    return EXT_LANG_BT_ERROR;
 
-  make_cleanup_ui_out_list_begin_end (out, "locals");
+  ui_out_emit_list list_emitter (out, "locals");
 
-  if (locals_iter != Py_None)
-    if (enumerate_locals (locals_iter, out, indent, args_type,
-			  0, frame) == EXT_LANG_BT_ERROR)
-      goto locals_error;
+  if (locals_iter != Py_None
+      && (enumerate_locals (locals_iter.get (), out, indent, args_type,
+			    0, frame) == EXT_LANG_BT_ERROR))
+    return EXT_LANG_BT_ERROR;
 
-  do_cleanups (old_chain);
   return EXT_LANG_BT_OK;
-
- locals_error:
-  do_cleanups (old_chain);
-  return EXT_LANG_BT_ERROR;
 }
 
 /* Helper function for printing frame arguments.  This function
@@ -954,50 +865,43 @@ py_print_args (PyObject *filter,
 	       enum ext_lang_frame_args args_type,
 	       struct frame_info *frame)
 {
-  PyObject *args_iter  = get_py_iter_from_func (filter, "frame_args");
-  struct cleanup *old_chain = make_cleanup_py_xdecref (args_iter);
-
+  gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
   if (args_iter == NULL)
-    goto args_error;
+    return EXT_LANG_BT_ERROR;
 
-  make_cleanup_ui_out_list_begin_end (out, "args");
+  ui_out_emit_list list_emitter (out, "args");
 
   TRY
     {
       annotate_frame_args ();
-      if (! ui_out_is_mi_like_p (out))
-	ui_out_text (out, " (");
+      if (! out->is_mi_like_p ())
+	out->text (" (");
     }
   CATCH (except, RETURN_MASK_ALL)
     {
       gdbpy_convert_exception (except);
-      goto args_error;
+      return EXT_LANG_BT_ERROR;
     }
   END_CATCH
 
-  if (args_iter != Py_None)
-    if (enumerate_args (args_iter, out, args_type, 0, frame)
-	== EXT_LANG_BT_ERROR)
-      goto args_error;
+  if (args_iter != Py_None
+      && (enumerate_args (args_iter.get (), out, args_type, 0, frame)
+	  == EXT_LANG_BT_ERROR))
+    return EXT_LANG_BT_ERROR;
 
   TRY
     {
-      if (! ui_out_is_mi_like_p (out))
-	ui_out_text (out, ")");
+      if (! out->is_mi_like_p ())
+	out->text (")");
     }
   CATCH (except, RETURN_MASK_ALL)
     {
       gdbpy_convert_exception (except);
-      goto args_error;
+      return EXT_LANG_BT_ERROR;
     }
   END_CATCH
 
-  do_cleanups (old_chain);
   return EXT_LANG_BT_OK;
-
- args_error:
-  do_cleanups (old_chain);
-  return EXT_LANG_BT_ERROR;
 }
 
 /*  Print a single frame to the designated output stream, detecting
@@ -1024,10 +928,9 @@ py_print_frame (PyObject *filter, int fl
   CORE_ADDR address = 0;
   struct gdbarch *gdbarch = NULL;
   struct frame_info *frame = NULL;
-  struct cleanup *cleanup_stack;
   struct value_print_options opts;
-  PyObject *py_inf_frame;
   int print_level, print_frame_info, print_args, print_locals;
+  gdb::unique_xmalloc_ptr<char> function_to_free;
 
   /* Extract print settings from FLAGS.  */
   print_level = (flags & PRINT_LEVEL) ? 1 : 0;
@@ -1040,14 +943,12 @@ py_print_frame (PyObject *filter, int fl
   /* Get the underlying frame.  This is needed to determine GDB
   architecture, and also, in the cases of frame variables/arguments to
   read them if they returned filter object requires us to do so.  */
-  py_inf_frame = PyObject_CallMethod (filter, "inferior_frame", NULL);
+  gdbpy_ref<> py_inf_frame (PyObject_CallMethod (filter, "inferior_frame",
+						 NULL));
   if (py_inf_frame == NULL)
     return EXT_LANG_BT_ERROR;
 
-  frame = frame_object_to_frame_info (py_inf_frame);;
-
-  Py_DECREF (py_inf_frame);
-
+  frame = frame_object_to_frame_info (py_inf_frame.get ());
   if (frame == NULL)
     return EXT_LANG_BT_ERROR;
 
@@ -1071,12 +972,12 @@ py_print_frame (PyObject *filter, int fl
       return EXT_LANG_BT_COMPLETED;
     }
 
-  cleanup_stack = make_cleanup (null_cleanup, NULL);
+  gdb::optional<ui_out_emit_tuple> tuple;
 
   /* -stack-list-locals does not require a
      wrapping frame attribute.  */
   if (print_frame_info || (print_args && ! print_locals))
-    make_cleanup_ui_out_tuple_begin_end (out, "frame");
+    tuple.emplace (out, "frame");
 
   if (print_frame_info)
     {
@@ -1086,12 +987,11 @@ py_print_frame (PyObject *filter, int fl
 	{
 	  TRY
 	    {
-	      ui_out_spaces (out, indent*4);
+	      out->spaces (indent * 4);
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
 	      gdbpy_convert_exception (except);
-	      do_cleanups (cleanup_stack);
 	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
@@ -1101,20 +1001,18 @@ py_print_frame (PyObject *filter, int fl
 	 address printing.  */
       if (PyObject_HasAttrString (filter, "address"))
 	{
-	  PyObject *paddr = PyObject_CallMethod (filter, "address", NULL);
+	  gdbpy_ref<> paddr (PyObject_CallMethod (filter, "address", NULL));
 
 	  if (paddr == NULL)
-	    {
-	      do_cleanups (cleanup_stack);
-	      return EXT_LANG_BT_ERROR;
-	    }
+	    return EXT_LANG_BT_ERROR;
 
 	  if (paddr != Py_None)
 	    {
-	      address = PyLong_AsLong (paddr);
+	      if (get_addr_from_python (paddr.get (), &address) < 0)
+		return EXT_LANG_BT_ERROR;
+
 	      has_addr = 1;
 	    }
-	  Py_DECREF (paddr);
 	}
     }
 
@@ -1136,21 +1034,20 @@ py_print_frame (PyObject *filter, int fl
 	     architecture from the eliding frame.  If that is the case, do
 	     not print 'level', but print spaces.  */
 	  if (*slot == frame)
-	    ui_out_field_skip (out, "level");
+	    out->field_skip ("level");
 	  else
 	    {
 	      *slot = frame;
 	      annotate_frame_begin (print_level ? level : 0,
 				    gdbarch, address);
-	      ui_out_text (out, "#");
-	      ui_out_field_fmt_int (out, 2, ui_left, "level",
+	      out->text ("#");
+	      out->field_fmt_int (2, ui_left, "level",
 				    level);
 	    }
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  gdbpy_convert_exception (except);
-	  do_cleanups (cleanup_stack);
 	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
@@ -1165,14 +1062,13 @@ py_print_frame (PyObject *filter, int fl
 	  TRY
 	    {
 	      annotate_frame_address ();
-	      ui_out_field_core_addr (out, "addr", gdbarch, address);
+	      out->field_core_addr ("addr", gdbarch, address);
 	      annotate_frame_address_end ();
-	      ui_out_text (out, " in ");
+	      out->text (" in ");
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
 	      gdbpy_convert_exception (except);
-	      do_cleanups (cleanup_stack);
 	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
@@ -1181,41 +1077,28 @@ py_print_frame (PyObject *filter, int fl
       /* Print frame function name.  */
       if (PyObject_HasAttrString (filter, "function"))
 	{
-	  PyObject *py_func = PyObject_CallMethod (filter, "function", NULL);
-	  struct cleanup *py_func_cleanup;
+	  gdbpy_ref<> py_func (PyObject_CallMethod (filter, "function", NULL));
 	  const char *function = NULL;
 
 	  if (py_func == NULL)
-	    {
-	      do_cleanups (cleanup_stack);
-	      return EXT_LANG_BT_ERROR;
-	    }
-	  py_func_cleanup = make_cleanup_py_decref (py_func);
+	    return EXT_LANG_BT_ERROR;
 
-	  if (gdbpy_is_string (py_func))
+	  if (gdbpy_is_string (py_func.get ()))
 	    {
-	      char *function_to_free;
+	      function_to_free = python_string_to_host_string (py_func.get ());
 
-	      function = function_to_free =
-		python_string_to_host_string (py_func);
+	      if (function_to_free == NULL)
+		return EXT_LANG_BT_ERROR;
 
-	      if (function == NULL)
-		{
-		  do_cleanups (cleanup_stack);
-		  return EXT_LANG_BT_ERROR;
-		}
-	      make_cleanup (xfree, function_to_free);
+	      function = function_to_free.get ();
 	    }
-	  else if (PyLong_Check (py_func))
+	  else if (PyLong_Check (py_func.get ()))
 	    {
-	      CORE_ADDR addr = PyLong_AsUnsignedLongLong (py_func);
+	      CORE_ADDR addr;
 	      struct bound_minimal_symbol msymbol;
 
-	      if (PyErr_Occurred ())
-		{
-		  do_cleanups (cleanup_stack);
-		  return EXT_LANG_BT_ERROR;
-		}
+	      if (get_addr_from_python (py_func.get (), &addr) < 0)
+		return EXT_LANG_BT_ERROR;
 
 	      msymbol = lookup_minimal_symbol_by_pc (addr);
 	      if (msymbol.minsym != NULL)
@@ -1226,7 +1109,6 @@ py_print_frame (PyObject *filter, int fl
 	      PyErr_SetString (PyExc_RuntimeError,
 			       _("FrameDecorator.function: expecting a " \
 				 "String, integer or None."));
-	      do_cleanups (cleanup_stack);
 	      return EXT_LANG_BT_ERROR;
 	    }
 
@@ -1234,19 +1116,16 @@ py_print_frame (PyObject *filter, int fl
 	    {
 	      annotate_frame_function_name ();
 	      if (function == NULL)
-		ui_out_field_skip (out, "func");
+		out->field_skip ("func");
 	      else
-		ui_out_field_string (out, "func", function);
+		out->field_string ("func", function);
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
 	      gdbpy_convert_exception (except);
-	      do_cleanups (cleanup_stack);
 	      return EXT_LANG_BT_ERROR;
 	    }
 	  END_CATCH
-
-	  do_cleanups (py_func_cleanup);
 	}
     }
 
@@ -1256,10 +1135,7 @@ py_print_frame (PyObject *filter, int fl
   if (print_args)
     {
       if (py_print_args (filter, out, args_type, frame) == EXT_LANG_BT_ERROR)
-	{
-	  do_cleanups (cleanup_stack);
-	  return EXT_LANG_BT_ERROR;
-	}
+	return EXT_LANG_BT_ERROR;
     }
 
   /* File name/source/line number information.  */
@@ -1272,100 +1148,84 @@ py_print_frame (PyObject *filter, int fl
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  gdbpy_convert_exception (except);
-	  do_cleanups (cleanup_stack);
 	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
 
       if (PyObject_HasAttrString (filter, "filename"))
 	{
-	  PyObject *py_fn = PyObject_CallMethod (filter, "filename", NULL);
-	  struct cleanup *py_fn_cleanup;
+	  gdbpy_ref<> py_fn (PyObject_CallMethod (filter, "filename", NULL));
 
 	  if (py_fn == NULL)
-	    {
-	      do_cleanups (cleanup_stack);
-	      return EXT_LANG_BT_ERROR;
-	    }
-	  py_fn_cleanup = make_cleanup_py_decref (py_fn);
+	    return EXT_LANG_BT_ERROR;
 
 	  if (py_fn != Py_None)
 	    {
-	      char *filename = python_string_to_host_string (py_fn);
+	      gdb::unique_xmalloc_ptr<char>
+		filename (python_string_to_host_string (py_fn.get ()));
 
 	      if (filename == NULL)
-		{
-		  do_cleanups (cleanup_stack);
-		  return EXT_LANG_BT_ERROR;
-		}
+		return EXT_LANG_BT_ERROR;
 
-	      make_cleanup (xfree, filename);
 	      TRY
 		{
-		  ui_out_wrap_hint (out, "   ");
-		  ui_out_text (out, " at ");
+		  out->wrap_hint ("   ");
+		  out->text (" at ");
 		  annotate_frame_source_file ();
-		  ui_out_field_string (out, "file", filename);
+		  out->field_string ("file", filename.get ());
 		  annotate_frame_source_file_end ();
 		}
 	      CATCH (except, RETURN_MASK_ERROR)
 		{
 		  gdbpy_convert_exception (except);
-		  do_cleanups (cleanup_stack);
 		  return EXT_LANG_BT_ERROR;
 		}
 	      END_CATCH
 	    }
-	  do_cleanups (py_fn_cleanup);
 	}
 
       if (PyObject_HasAttrString (filter, "line"))
 	{
-	  PyObject *py_line = PyObject_CallMethod (filter, "line", NULL);
-	  struct cleanup *py_line_cleanup;
+	  gdbpy_ref<> py_line (PyObject_CallMethod (filter, "line", NULL));
 	  int line;
 
 	  if (py_line == NULL)
-	    {
-	      do_cleanups (cleanup_stack);
-	      return EXT_LANG_BT_ERROR;
-	    }
-	  py_line_cleanup = make_cleanup_py_decref (py_line);
+	    return EXT_LANG_BT_ERROR;
 
 	  if (py_line != Py_None)
 	    {
-	      line = PyLong_AsLong (py_line);
+	      line = PyLong_AsLong (py_line.get ());
+	      if (PyErr_Occurred ())
+		return EXT_LANG_BT_ERROR;
+
 	      TRY
 		{
-		  ui_out_text (out, ":");
+		  out->text (":");
 		  annotate_frame_source_line ();
-		  ui_out_field_int (out, "line", line);
+		  out->field_int ("line", line);
 		}
 	      CATCH (except, RETURN_MASK_ERROR)
 		{
 		  gdbpy_convert_exception (except);
-		  do_cleanups (cleanup_stack);
 		  return EXT_LANG_BT_ERROR;
 		}
 	      END_CATCH
 	    }
-	  do_cleanups (py_line_cleanup);
 	}
     }
 
   /* For MI we need to deal with the "children" list population of
      elided frames, so if MI output detected do not send newline.  */
-  if (! ui_out_is_mi_like_p (out))
+  if (! out->is_mi_like_p ())
     {
       TRY
 	{
 	  annotate_frame_end ();
-	  ui_out_text (out, "\n");
+	  out->text ("\n");
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  gdbpy_convert_exception (except);
-	  do_cleanups (cleanup_stack);
 	  return EXT_LANG_BT_ERROR;
 	}
       END_CATCH
@@ -1375,61 +1235,41 @@ py_print_frame (PyObject *filter, int fl
     {
       if (py_print_locals (filter, out, args_type, indent,
 			   frame) == EXT_LANG_BT_ERROR)
-	{
-	  do_cleanups (cleanup_stack);
-	  return EXT_LANG_BT_ERROR;
-	}
+	return EXT_LANG_BT_ERROR;
     }
 
   {
-    PyObject *elided;
-    struct cleanup *elided_cleanup;
-
     /* Finally recursively print elided frames, if any.  */
-    elided = get_py_iter_from_func (filter, "elided");
+    gdbpy_ref<> elided (get_py_iter_from_func (filter, "elided"));
     if (elided == NULL)
-      {
-	do_cleanups (cleanup_stack);
-	return EXT_LANG_BT_ERROR;
-      }
-    elided_cleanup = make_cleanup_py_decref (elided);
+      return EXT_LANG_BT_ERROR;
 
     if (elided != Py_None)
       {
 	PyObject *item;
 
-	make_cleanup_ui_out_list_begin_end (out, "children");
+	ui_out_emit_list inner_list_emiter (out, "children");
 
-	if (! ui_out_is_mi_like_p (out))
+	if (! out->is_mi_like_p ())
 	  indent++;
 
-	while ((item = PyIter_Next (elided)))
+	while ((item = PyIter_Next (elided.get ())))
 	  {
-	    struct cleanup *item_cleanup = make_cleanup_py_decref (item);
+	    gdbpy_ref<> item_ref (item);
 
 	    enum ext_lang_bt_status success = py_print_frame (item, flags,
 							      args_type, out,
 							      indent,
 							      levels_printed);
 
-	    do_cleanups (item_cleanup);
-
 	    if (success == EXT_LANG_BT_ERROR)
-	      {
-		do_cleanups (cleanup_stack);
-		return EXT_LANG_BT_ERROR;
-	      }
+	      return EXT_LANG_BT_ERROR;
 	  }
 	if (item == NULL && PyErr_Occurred ())
-	  {
-	    do_cleanups (cleanup_stack);
-	    return EXT_LANG_BT_ERROR;
-	  }
+	  return EXT_LANG_BT_ERROR;
       }
-    do_cleanups (elided_cleanup);
   }
 
-  do_cleanups (cleanup_stack);
   return EXT_LANG_BT_COMPLETED;
 }
 
@@ -1440,60 +1280,39 @@ static PyObject *
 bootstrap_python_frame_filters (struct frame_info *frame,
 				int frame_low, int frame_high)
 {
-  struct cleanup *cleanups =
-    make_cleanup (null_cleanup, NULL);
-  PyObject *module, *sort_func, *iterable, *frame_obj, *iterator;
-  PyObject *py_frame_low, *py_frame_high;
-
-  frame_obj = frame_info_to_frame_object (frame);
+  gdbpy_ref<> frame_obj (frame_info_to_frame_object (frame));
   if (frame_obj == NULL)
-    goto error;
-  make_cleanup_py_decref (frame_obj);
+    return NULL;
 
-  module = PyImport_ImportModule ("gdb.frames");
+  gdbpy_ref<> module (PyImport_ImportModule ("gdb.frames"));
   if (module == NULL)
-    goto error;
-  make_cleanup_py_decref (module);
+    return NULL;
 
-  sort_func = PyObject_GetAttrString (module, "execute_frame_filters");
+  gdbpy_ref<> sort_func (PyObject_GetAttrString (module.get (),
+						 "execute_frame_filters"));
   if (sort_func == NULL)
-    goto error;
-  make_cleanup_py_decref (sort_func);
+    return NULL;
 
-  py_frame_low = PyInt_FromLong (frame_low);
+  gdbpy_ref<> py_frame_low (PyInt_FromLong (frame_low));
   if (py_frame_low == NULL)
-    goto error;
-  make_cleanup_py_decref (py_frame_low);
+    return NULL;
 
-  py_frame_high = PyInt_FromLong (frame_high);
+  gdbpy_ref<> py_frame_high (PyInt_FromLong (frame_high));
   if (py_frame_high == NULL)
-    goto error;
-  make_cleanup_py_decref (py_frame_high);
+    return NULL;
 
-  iterable = PyObject_CallFunctionObjArgs (sort_func, frame_obj,
-					   py_frame_low,
-					   py_frame_high,
-					   NULL);
+  gdbpy_ref<> iterable (PyObject_CallFunctionObjArgs (sort_func.get (),
+						      frame_obj.get (),
+						      py_frame_low.get (),
+						      py_frame_high.get (),
+						      NULL));
   if (iterable == NULL)
-    goto error;
-
-  do_cleanups (cleanups);
+    return NULL;
 
   if (iterable != Py_None)
-    {
-      iterator = PyObject_GetIter (iterable);
-      Py_DECREF (iterable);
-    }
+    return PyObject_GetIter (iterable.get ());
   else
-    {
-      return iterable;
-    }
-
-  return iterator;
-
- error:
-  do_cleanups (cleanups);
-  return NULL;
+    return iterable.release ();
 }
 
 /*  This is the only publicly exported function in this file.  FRAME
@@ -1518,11 +1337,7 @@ gdbpy_apply_frame_filter (const struct e
 			  struct ui_out *out, int frame_low, int frame_high)
 {
   struct gdbarch *gdbarch = NULL;
-  struct cleanup *cleanups;
   enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
-  PyObject *iterable;
-  PyObject *item;
-  htab_t levels_printed;
 
   if (!gdb_python_initialized)
     return EXT_LANG_BT_NO_FILTERS;
@@ -1538,9 +1353,10 @@ gdbpy_apply_frame_filter (const struct e
     }
   END_CATCH
 
-  cleanups = ensure_python_env (gdbarch, current_language);
+  gdbpy_enter enter_py (gdbarch, current_language);
 
-  iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
+  gdbpy_ref<> iterable (bootstrap_python_frame_filters (frame, frame_low,
+							frame_high));
 
   if (iterable == NULL)
     {
@@ -1558,34 +1374,36 @@ gdbpy_apply_frame_filter (const struct e
 	 default backtrace.  */
 
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
       return EXT_LANG_BT_NO_FILTERS;
     }
 
   /* If iterable is None, then there are no frame filters registered.
      If this is the case, defer to default GDB printing routines in MI
      and CLI.  */
-  make_cleanup_py_decref (iterable);
   if (iterable == Py_None)
-    {
-      success = EXT_LANG_BT_NO_FILTERS;
-      goto done;
-    }
+    return EXT_LANG_BT_NO_FILTERS;
 
-  levels_printed = htab_create (20,
-				htab_hash_pointer,
-				htab_eq_pointer,
-				NULL);
-  make_cleanup_htab_delete (levels_printed);
+  htab_up levels_printed (htab_create (20,
+				       htab_hash_pointer,
+				       htab_eq_pointer,
+				       NULL));
 
-  while ((item = PyIter_Next (iterable)))
+  while (true)
     {
-      struct cleanup *item_cleanup = make_cleanup_py_decref (item);
+      gdbpy_ref<> item (PyIter_Next (iterable.get ()));
 
-      success = py_print_frame (item, flags, args_type, out, 0,
-				levels_printed);
+      if (item == NULL)
+	{
+	  if (PyErr_Occurred ())
+	    {
+	      gdbpy_print_stack ();
+	      return EXT_LANG_BT_ERROR;
+	    }
+	  break;
+	}
 
-      do_cleanups (item_cleanup);
+      success = py_print_frame (item.get (), flags, args_type, out, 0,
+				levels_printed.get ());
 
       /* Do not exit on error printing a single frame.  Print the
 	 error and continue with other frames.  */
@@ -1593,17 +1411,5 @@ gdbpy_apply_frame_filter (const struct e
 	gdbpy_print_stack ();
     }
 
-  if (item == NULL && PyErr_Occurred ())
-    goto error;
-
- done:
-  do_cleanups (cleanups);
   return success;
-
-  /* Exit and abandon backtrace on error, printing the exception that
-     is set.  */
- error:
-  gdbpy_print_stack ();
-  do_cleanups (cleanups);
-  return EXT_LANG_BT_ERROR;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-function.c ./gdb/python/py-function.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-function.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-function.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Convenience functions implemented in Python.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "completer.h"
 #include "expression.h"
 #include "language.h"
+#include "py-ref.h"
 
 extern PyTypeObject fnpy_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
@@ -37,22 +38,19 @@ static PyObject *
 convert_values_to_python (int argc, struct value **argv)
 {
   int i;
-  PyObject *result = PyTuple_New (argc);
+  gdbpy_ref<> result (PyTuple_New (argc));
 
-  if (! result)
+  if (result == NULL)
     return NULL;
 
   for (i = 0; i < argc; ++i)
     {
-      PyObject *elt = value_to_value_object (argv[i]);
-      if (! elt)
-	{
-	  Py_DECREF (result);
-	  return NULL;
-	}
-      PyTuple_SetItem (result, i, elt);
+      gdbpy_ref<> elt (value_to_value_object (argv[i]));
+      if (elt == NULL)
+	return NULL;
+      PyTuple_SetItem (result.get (), i, elt.release ());
     }
-  return result;
+  return result.release ();
 }
 
 /* Call a Python function object's invoke method.  */
@@ -61,40 +59,32 @@ static struct value *
 fnpy_call (struct gdbarch *gdbarch, const struct language_defn *language,
 	   void *cookie, int argc, struct value **argv)
 {
-  struct value *value = NULL;
-  /* 'result' must be set to NULL, this initially indicates whether
-     the function was called, or not.  */
-  PyObject *result = NULL;
-  PyObject *callable, *args;
-  struct cleanup *cleanup;
+  /* The gdbpy_enter object needs to be placed first, so that it's the last to
+     be destroyed.  */
+  gdbpy_enter enter_py (gdbarch, language);
+  struct value *value;
+  gdbpy_ref<> result;
+  gdbpy_ref<> args (convert_values_to_python (argc, argv));
 
-  cleanup = ensure_python_env (gdbarch, language);
-
-  args = convert_values_to_python (argc, argv);
   /* convert_values_to_python can return NULL on error.  If we
      encounter this, do not call the function, but allow the Python ->
      error code conversion below to deal with the Python exception.
      Note, that this is different if the function simply does not
      have arguments.  */
 
-  if (args)
+  if (args != NULL)
     {
-      callable = PyObject_GetAttrString ((PyObject *) cookie, "invoke");
-      if (! callable)
-	{
-	  Py_DECREF (args);
-	  error (_("No method named 'invoke' in object."));
-	}
+      gdbpy_ref<> callable (PyObject_GetAttrString ((PyObject *) cookie,
+						    "invoke"));
+      if (callable == NULL)
+	error (_("No method named 'invoke' in object."));
 
-      result = PyObject_Call (callable, args, NULL);
-      Py_DECREF (callable);
-      Py_DECREF (args);
+      result.reset (PyObject_Call (callable.get (), args.get (), NULL));
     }
 
-  if (!result)
+  if (result == NULL)
     {
       PyObject *ptype, *pvalue, *ptraceback;
-      char *msg;
 
       PyErr_Fetch (&ptype, &pvalue, &ptraceback);
 
@@ -102,8 +92,8 @@ fnpy_call (struct gdbarch *gdbarch, cons
 	 When fetching the error message we need to make our own copy,
 	 we no longer own ptype, pvalue after the call to PyErr_Restore.  */
 
-      msg = gdbpy_exception_to_string (ptype, pvalue);
-      make_cleanup (xfree, msg);
+      gdb::unique_xmalloc_ptr<char>
+	msg (gdbpy_exception_to_string (ptype, pvalue));
 
       if (msg == NULL)
 	{
@@ -131,7 +121,7 @@ fnpy_call (struct gdbarch *gdbarch, cons
 	  gdbpy_print_stack ();
 	  if (msg != NULL && *msg != '\0')
 	    error (_("Error occurred in Python convenience function: %s"),
-		   msg);
+		   msg.get ());
 	  else
 	    error (_("Error occurred in Python convenience function."));
 	}
@@ -140,21 +130,17 @@ fnpy_call (struct gdbarch *gdbarch, cons
 	  Py_XDECREF (ptype);
 	  Py_XDECREF (pvalue);
 	  Py_XDECREF (ptraceback);
-	  error ("%s", msg);
+	  error ("%s", msg.get ());
 	}
     }
 
-  value = convert_value_from_python (result);
+  value = convert_value_from_python (result.get ());
   if (value == NULL)
     {
-      Py_DECREF (result);
       gdbpy_print_stack ();
       error (_("Error while executing Python code."));
     }
 
-  Py_DECREF (result);
-  do_cleanups (cleanup);
-
   return value;
 }
 
@@ -165,7 +151,7 @@ static int
 fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
 {
   const char *name;
-  char *docstring = NULL;
+  gdb::unique_xmalloc_ptr<char> docstring;
 
   if (! PyArg_ParseTuple (args, "s", &name))
     return -1;
@@ -173,27 +159,24 @@ fnpy_init (PyObject *self, PyObject *arg
 
   if (PyObject_HasAttrString (self, "__doc__"))
     {
-      PyObject *ds_obj = PyObject_GetAttrString (self, "__doc__");
+      gdbpy_ref<> ds_obj (PyObject_GetAttrString (self, "__doc__"));
       if (ds_obj != NULL)
 	{
-	  if (gdbpy_is_string (ds_obj))
+	  if (gdbpy_is_string (ds_obj.get ()))
 	    {
-	      docstring = python_string_to_host_string (ds_obj);
+	      docstring = python_string_to_host_string (ds_obj.get ());
 	      if (docstring == NULL)
 		{
 		  Py_DECREF (self);
-		  Py_DECREF (ds_obj);
 		  return -1;
 		}
 	    }
-
-	  Py_DECREF (ds_obj);
 	}
     }
   if (! docstring)
-    docstring = xstrdup (_("This function is not documented."));
+    docstring.reset (xstrdup (_("This function is not documented.")));
 
-  add_internal_function (name, docstring, fnpy_call, self);
+  add_internal_function (name, docstring.release (), fnpy_call, self);
   return 0;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-gdb-readline.c ./gdb/python/py-gdb-readline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-gdb-readline.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-gdb-readline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Readline support for Python.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 #include "python-internal.h"
 #include "top.h"
 #include "cli/cli-utils.h"
+
 /* Readline function suitable for PyOS_ReadlineFunctionPointer, which
    is used for Python's interactive parser and raw_input.  In both
    cases, sys_stdin and sys_stdout are always stdin and stdout
@@ -63,7 +64,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin,
   /* Detect EOF (Ctrl-D).  */
   if (p == NULL)
     {
-      q = PyMem_Malloc (1);
+      q = (char *) PyMem_RawMalloc (1);
       if (q != NULL)
 	q[0] = '\0';
       return q;
@@ -72,7 +73,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin,
   n = strlen (p);
 
   /* Copy the line to Python and return.  */
-  q = PyMem_Malloc (n + 2);
+  q = (char *) PyMem_RawMalloc (n + 2);
   if (q != NULL)
     {
       strncpy (q, p, n);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-inferior.c ./gdb/python/py-inferior.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-inferior.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-inferior.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferiors.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -81,7 +81,6 @@ extern PyTypeObject membuf_object_type
 static void
 python_on_normal_stop (struct bpstats *bs, int print_frame)
 {
-  struct cleanup *cleanup;
   enum gdb_signal stop_signal;
 
   if (!gdb_python_initialized)
@@ -92,28 +91,22 @@ python_on_normal_stop (struct bpstats *b
 
   stop_signal = inferior_thread ()->suspend.stop_signal;
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   if (emit_stop_event (bs, stop_signal) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 static void
 python_on_resume (ptid_t ptid)
 {
-  struct cleanup *cleanup;
-
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (emit_continue_event (ptid) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 /* Callback, registered as an observer, that notifies Python listeners
@@ -122,14 +115,10 @@ python_on_resume (ptid_t ptid)
 static void
 python_on_inferior_call_pre (ptid_t thread, CORE_ADDR address)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (emit_inferior_call_event (INFERIOR_CALL_PRE, thread, address) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 /* Callback, registered as an observer, that notifies Python listeners
@@ -138,14 +127,10 @@ python_on_inferior_call_pre (ptid_t thre
 static void
 python_on_inferior_call_post (ptid_t thread, CORE_ADDR address)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (emit_inferior_call_event (INFERIOR_CALL_POST, thread, address) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 /* Callback, registered as an observer, that notifies Python listeners
@@ -155,14 +140,10 @@ python_on_inferior_call_post (ptid_t thr
 static void
 python_on_memory_change (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (emit_memory_changed_event (addr, len) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 /* Callback, registered as an observer, that notifies Python listeners
@@ -172,34 +153,27 @@ python_on_memory_change (struct inferior
 static void
 python_on_register_change (struct frame_info *frame, int regnum)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (emit_register_changed_event (frame, regnum) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 static void
 python_inferior_exit (struct inferior *inf)
 {
-  struct cleanup *cleanup;
   const LONGEST *exit_code = NULL;
 
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (target_gdbarch (), current_language);
+  gdbpy_enter enter_py (target_gdbarch (), current_language);
 
   if (inf->has_exit_code)
     exit_code = &inf->exit_code;
 
   if (emit_exited_event (exit_code, inf) < 0)
     gdbpy_print_stack ();
-
-  do_cleanups (cleanup);
 }
 
 /* Callback used to notify Python listeners about new objfiles loaded in the
@@ -209,15 +183,13 @@ python_inferior_exit (struct inferior *i
 static void
 python_new_objfile (struct objfile *objfile)
 {
-  struct cleanup *cleanup;
-
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (objfile != NULL
-			       ? get_objfile_arch (objfile)
-			       : target_gdbarch (),
-			       current_language);
+  gdbpy_enter enter_py (objfile != NULL
+			? get_objfile_arch (objfile)
+			: target_gdbarch (),
+			current_language);
 
   if (objfile == NULL)
     {
@@ -229,8 +201,6 @@ python_new_objfile (struct objfile *objf
       if (emit_new_objfile_event (objfile) < 0)
 	gdbpy_print_stack ();
     }
-
-  do_cleanups (cleanup);
 }
 
 /* Return a reference to the Python object of type Inferior
@@ -242,7 +212,7 @@ inferior_to_inferior_object (struct infe
 {
   inferior_object *inf_obj;
 
-  inf_obj = inferior_data (inferior, infpy_inf_data_key);
+  inf_obj = (inferior_object *) inferior_data (inferior, infpy_inf_data_key);
   if (!inf_obj)
     {
       inf_obj = PyObject_New (inferior_object, &inferior_object_type);
@@ -281,30 +251,19 @@ find_thread_object (ptid_t ptid)
 {
   int pid;
   struct threadlist_entry *thread;
-  PyObject *inf_obj;
-  thread_object *found = NULL;
 
   pid = ptid_get_pid (ptid);
   if (pid == 0)
     return NULL;
 
-  inf_obj = find_inferior_object (pid);
-
-  if (! inf_obj)
+  gdbpy_ref<> inf_obj (find_inferior_object (pid));
+  if (inf_obj == NULL)
     return NULL;
 
-  for (thread = ((inferior_object *)inf_obj)->threads; thread;
+  for (thread = ((inferior_object *)(inf_obj.get ()))->threads; thread;
        thread = thread->next)
     if (ptid_equal (thread->thread_obj->thread->ptid, ptid))
-      {
-	found = thread->thread_obj;
-	break;
-      }
-
-  Py_DECREF (inf_obj);
-
-  if (found)
-    return found;
+      return thread->thread_obj;
 
   return NULL;
 }
@@ -312,7 +271,6 @@ find_thread_object (ptid_t ptid)
 static void
 add_thread_object (struct thread_info *tp)
 {
-  struct cleanup *cleanup;
   thread_object *thread_obj;
   inferior_object *inf_obj;
   struct threadlist_entry *entry;
@@ -320,47 +278,39 @@ add_thread_object (struct thread_info *t
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (python_gdbarch, python_language);
+  gdbpy_enter enter_py (python_gdbarch, python_language);
 
   thread_obj = create_thread_object (tp);
   if (!thread_obj)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanup);
       return;
     }
 
   inf_obj = (inferior_object *) thread_obj->inf_obj;
 
-  entry = xmalloc (sizeof (struct threadlist_entry));
+  entry = XNEW (struct threadlist_entry);
   entry->thread_obj = thread_obj;
   entry->next = inf_obj->threads;
 
   inf_obj->threads = entry;
   inf_obj->nthreads++;
-
-  do_cleanups (cleanup);
 }
 
 static void
 delete_thread_object (struct thread_info *tp, int ignore)
 {
-  struct cleanup *cleanup;
-  inferior_object *inf_obj;
   struct threadlist_entry **entry, *tmp;
 
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (python_gdbarch, python_language);
+  gdbpy_enter enter_py (python_gdbarch, python_language);
 
-  inf_obj
-    = (inferior_object *) find_inferior_object (ptid_get_pid (tp->ptid));
-  if (!inf_obj)
-    {
-      do_cleanups (cleanup);
-      return;
-    }
+  gdbpy_ref<inferior_object> inf_obj
+    ((inferior_object *) find_inferior_object (ptid_get_pid (tp->ptid)));
+  if (inf_obj == NULL)
+    return;
 
   /* Find thread entry in its inferior's thread_list.  */
   for (entry = &inf_obj->threads; *entry != NULL; entry =
@@ -369,11 +319,7 @@ delete_thread_object (struct thread_info
       break;
 
   if (!*entry)
-    {
-      Py_DECREF (inf_obj);
-      do_cleanups (cleanup);
-      return;
-    }
+    return;
 
   tmp = *entry;
   tmp->thread_obj->thread = NULL;
@@ -382,10 +328,7 @@ delete_thread_object (struct thread_info
   inf_obj->nthreads--;
 
   Py_DECREF (tmp->thread_obj);
-  Py_DECREF (inf_obj);
   xfree (tmp);
-
-  do_cleanups (cleanup);
 }
 
 static PyObject *
@@ -456,20 +399,13 @@ infpy_get_was_attached (PyObject *self, 
 static int
 build_inferior_list (struct inferior *inf, void *arg)
 {
-  PyObject *list = arg;
-  PyObject *inferior = inferior_to_inferior_object (inf);
-  int success = 0;
+  PyObject *list = (PyObject *) arg;
+  gdbpy_ref<> inferior (inferior_to_inferior_object (inf));
 
-  if (! inferior)
+  if (inferior  == NULL)
     return 0;
 
-  success = PyList_Append (list, inferior);
-  Py_DECREF (inferior);
-
-  if (success)
-    return 1;
-
-  return 0;
+  return PyList_Append (list, inferior.get ()) ? 1 : 0;
 }
 
 /* Implementation of gdb.inferiors () -> (gdb.Inferior, ...).
@@ -477,22 +413,14 @@ build_inferior_list (struct inferior *in
 PyObject *
 gdbpy_inferiors (PyObject *unused, PyObject *unused2)
 {
-  PyObject *list, *tuple;
-
-  list = PyList_New (0);
-  if (!list)
+  gdbpy_ref<> list (PyList_New (0));
+  if (list == NULL)
     return NULL;
 
-  if (iterate_over_inferiors (build_inferior_list, list))
-    {
-      Py_DECREF (list);
-      return NULL;
-    }
-
-  tuple = PyList_AsTuple (list);
-  Py_DECREF (list);
+  if (iterate_over_inferiors (build_inferior_list, list.get ()))
+    return NULL;
 
-  return tuple;
+  return PyList_AsTuple (list.get ());
 }
 
 /* Membuf and memory manipulation.  */
@@ -505,8 +433,7 @@ static PyObject *
 infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw)
 {
   CORE_ADDR addr, length;
-  void *buffer = NULL;
-  membuf_object *membuf_obj;
+  gdb_byte *buffer = NULL;
   PyObject *addr_obj, *length_obj, *result;
   static char *keywords[] = { "address", "length", NULL };
 
@@ -520,7 +447,7 @@ infpy_read_memory (PyObject *self, PyObj
 
   TRY
     {
-      buffer = xmalloc (length);
+      buffer = (gdb_byte *) xmalloc (length);
 
       read_memory (addr, buffer, length);
     }
@@ -531,7 +458,8 @@ infpy_read_memory (PyObject *self, PyObj
     }
   END_CATCH
 
-  membuf_obj = PyObject_New (membuf_object, &membuf_object_type);
+  gdbpy_ref<membuf_object> membuf_obj (PyObject_New (membuf_object,
+						     &membuf_object_type));
   if (membuf_obj == NULL)
     {
       xfree (buffer);
@@ -543,12 +471,11 @@ infpy_read_memory (PyObject *self, PyObj
   membuf_obj->length = length;
 
 #ifdef IS_PY3K
-  result = PyMemoryView_FromObject ((PyObject *) membuf_obj);
+  result = PyMemoryView_FromObject ((PyObject *) membuf_obj.get ());
 #else
-  result = PyBuffer_FromReadWriteObject ((PyObject *) membuf_obj, 0,
+  result = PyBuffer_FromReadWriteObject ((PyObject *) membuf_obj.get (), 0,
 					 Py_END_OF_BUFFER);
 #endif
-  Py_DECREF (membuf_obj);
 
   return result;
 }
@@ -564,7 +491,7 @@ infpy_write_memory (PyObject *self, PyOb
 {
   struct gdb_exception except = exception_none;
   Py_ssize_t buf_len;
-  const char *buffer;
+  const gdb_byte *buffer;
   CORE_ADDR addr, length;
   PyObject *addr_obj, *length_obj = NULL;
   static char *keywords[] = { "address", "buffer", "length", NULL };
@@ -576,13 +503,15 @@ infpy_write_memory (PyObject *self, PyOb
 				     &length_obj))
     return NULL;
 
-  buffer = pybuf.buf;
+  buffer = (const gdb_byte *) pybuf.buf;
   buf_len = pybuf.len;
 #else
   if (! PyArg_ParseTupleAndKeywords (args, kw, "Os#|O", keywords,
 				     &addr_obj, &buffer, &buf_len,
 				     &length_obj))
     return NULL;
+
+  buffer = (const gdb_byte *) buffer;
 #endif
 
   if (get_addr_from_python (addr_obj, &addr) < 0)
@@ -595,7 +524,7 @@ infpy_write_memory (PyObject *self, PyOb
 
   TRY
     {
-      write_memory_with_notification (addr, (gdb_byte *) buffer, length);
+      write_memory_with_notification (addr, buffer, length);
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
@@ -717,7 +646,7 @@ infpy_search_memory (PyObject *self, PyO
   static char *keywords[] = { "address", "length", "pattern", NULL };
   PyObject *start_addr_obj, *length_obj;
   Py_ssize_t pattern_size;
-  const void *buffer;
+  const gdb_byte *buffer;
   CORE_ADDR found_addr;
   int found = 0;
 #ifdef IS_PY3K
@@ -728,10 +657,11 @@ infpy_search_memory (PyObject *self, PyO
 				     &pybuf))
     return NULL;
 
-  buffer = pybuf.buf;
+  buffer = (const gdb_byte *) pybuf.buf;
   pattern_size = pybuf.len;
 #else
   PyObject *pattern;
+  const void *vbuffer;
 
   if (! PyArg_ParseTupleAndKeywords (args, kw, "OOO", keywords,
  				     &start_addr_obj, &length_obj,
@@ -746,8 +676,10 @@ infpy_search_memory (PyObject *self, PyO
       return NULL;
     }
 
-  if (PyObject_AsReadBuffer (pattern, &buffer, &pattern_size) == -1)
+  if (PyObject_AsReadBuffer (pattern, &vbuffer, &pattern_size) == -1)
     return NULL;
+
+  buffer = (const gdb_byte *) vbuffer;
 #endif
 
   if (get_addr_from_python (start_addr_obj, &start_addr) < 0)
@@ -831,15 +763,13 @@ infpy_dealloc (PyObject *obj)
 static void
 py_free_inferior (struct inferior *inf, void *datum)
 {
-
-  struct cleanup *cleanup;
-  inferior_object *inf_obj = datum;
+  gdbpy_ref<inferior_object> inf_obj ((inferior_object *) datum);
   struct threadlist_entry *th_entry, *th_tmp;
 
   if (!gdb_python_initialized)
     return;
 
-  cleanup = ensure_python_env (python_gdbarch, python_language);
+  gdbpy_enter enter_py (python_gdbarch, python_language);
 
   inf_obj->inferior = NULL;
 
@@ -854,9 +784,6 @@ py_free_inferior (struct inferior *inf, 
     }
 
   inf_obj->nthreads = 0;
-
-  Py_DECREF ((PyObject *) inf_obj);
-  do_cleanups (cleanup);
 }
 
 /* Implementation of gdb.selected_inferior() -> gdb.Inferior.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-infevents.c ./gdb/python/py-infevents.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-infevents.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-infevents.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior function events.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "py-event.h"
+#include "py-ref.h"
 
 extern PyTypeObject inferior_call_pre_event_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
@@ -36,54 +37,36 @@ static PyObject *
 create_inferior_call_event_object (inferior_call_kind flag, ptid_t ptid,
 				   CORE_ADDR addr)
 {
-  int pid;
-  long tid, lwp;
-  PyObject *event;
-  PyObject *ptid_obj = NULL;
-  PyObject *addr_obj = NULL;
+  gdbpy_ref<> event;
   int failed;
-  struct cleanup *cleanups;
-  struct cleanup *member_cleanups;
 
   switch (flag)
     {
     case INFERIOR_CALL_PRE:
-      event = create_event_object (&inferior_call_pre_event_object_type);
+      event.reset (create_event_object (&inferior_call_pre_event_object_type));
       break;
     case INFERIOR_CALL_POST:
-      event = create_event_object (&inferior_call_post_event_object_type);
+      event.reset (create_event_object (&inferior_call_post_event_object_type));
       break;
     default:
-      return NULL;
+      gdb_assert_not_reached ("invalid inferior_call_kind");
     }
 
-  cleanups = make_cleanup_py_decref (event);
-
-  ptid_obj = gdbpy_create_ptid_object (ptid);
+  gdbpy_ref<> ptid_obj (gdbpy_create_ptid_object (ptid));
   if (ptid_obj == NULL)
-    goto fail;
-  member_cleanups = make_cleanup_py_decref (ptid_obj);
+    return NULL;
 
-  failed = evpy_add_attribute (event, "ptid", ptid_obj) < 0;
-  if (failed)
-    goto fail;
+  if (evpy_add_attribute (event.get (), "ptid", ptid_obj.get ()) < 0)
+    return NULL;
 
-  addr_obj = PyLong_FromLongLong (addr);
+  gdbpy_ref<> addr_obj (PyLong_FromLongLong (addr));
   if (addr_obj == NULL)
-    goto fail;
-  make_cleanup_py_decref (addr_obj);
+    return NULL;
+
+  if (evpy_add_attribute (event.get (), "address", addr_obj.get ()) < 0)
+    return NULL;
 
-  failed = evpy_add_attribute (event, "address", addr_obj) < 0;
-  if (failed)
-    goto fail;
-
-  do_cleanups (member_cleanups);
-  discard_cleanups (cleanups);
-  return event;
-
- fail:
-  do_cleanups (cleanups);
-  return NULL;
+  return event.release ();
 }
 
 /* Construct a gdb.RegisterChangedEvent containing the affected
@@ -93,44 +76,25 @@ static PyObject *
 create_register_changed_event_object (struct frame_info *frame, 
 				      int regnum)
 {
-  PyObject *event;
-  PyObject *frame_obj = NULL;
-  PyObject *regnum_obj = NULL;
-  int failed;
-  struct cleanup *cleanups;
-  struct cleanup *member_cleanups;
-
-  event = create_event_object (&register_changed_event_object_type);
+  gdbpy_ref<> event (create_event_object (&register_changed_event_object_type));
   if (event == NULL)
     return NULL;
 
-  cleanups = make_cleanup_py_decref (event);
-
-  frame_obj = frame_info_to_frame_object (frame);
+  gdbpy_ref<> frame_obj (frame_info_to_frame_object (frame));
   if (frame_obj == NULL)
-    goto fail;
-  member_cleanups = make_cleanup_py_decref (frame_obj);
+    return NULL;
 
-  failed = evpy_add_attribute (event, "frame", frame_obj) < 0;
-  if (failed)
-    goto fail;
+  if (evpy_add_attribute (event.get (), "frame", frame_obj.get ()) < 0)
+    return NULL;
 
-  regnum_obj = PyLong_FromLongLong (regnum);
+  gdbpy_ref<> regnum_obj (PyLong_FromLongLong (regnum));
   if (regnum_obj == NULL)
-    goto fail;
-  make_cleanup_py_decref (regnum_obj);
+    return NULL;
 
-  failed = evpy_add_attribute (event, "regnum", regnum_obj) < 0;
-  if (failed)
-    goto fail;
-
-  do_cleanups (member_cleanups);
-  discard_cleanups (cleanups);
-  return event;
-
- fail:
-  do_cleanups (cleanups);
-  return NULL;
+  if (evpy_add_attribute (event.get (), "regnum", regnum_obj.get ()) < 0)
+    return NULL;
+
+  return event.release ();
 }
 
 /* Construct a gdb.MemoryChangedEvent describing the extent of the
@@ -139,44 +103,26 @@ create_register_changed_event_object (st
 static PyObject *
 create_memory_changed_event_object (CORE_ADDR addr, ssize_t len)
 {
-  PyObject *event;
-  PyObject *addr_obj = NULL;
-  PyObject *len_obj = NULL;
-  int failed;
-  struct cleanup *cleanups;
-  struct cleanup *member_cleanups;
-
-  event = create_event_object (&memory_changed_event_object_type);
+  gdbpy_ref<> event (create_event_object (&memory_changed_event_object_type));
 
   if (event == NULL)
     return NULL;
-  cleanups = make_cleanup_py_decref (event);
 
-  addr_obj = PyLong_FromLongLong (addr);
+  gdbpy_ref<> addr_obj (PyLong_FromLongLong (addr));
   if (addr_obj == NULL)
-    goto fail;
-  member_cleanups = make_cleanup_py_decref (addr_obj);
+    return NULL;
 
-  failed = evpy_add_attribute (event, "address", addr_obj) < 0;
-  if (failed)
-    goto fail;
+  if (evpy_add_attribute (event.get (), "address", addr_obj.get ()) < 0)
+    return NULL;
 
-  len_obj = PyLong_FromLong (len);
+  gdbpy_ref<> len_obj (PyLong_FromLong (len));
   if (len_obj == NULL)
-    goto fail;
-  make_cleanup_py_decref (len_obj);
+    return NULL;
+
+  if (evpy_add_attribute (event.get (), "length", len_obj.get ()) < 0)
+    return NULL;
 
-  failed = evpy_add_attribute (event, "length", len_obj) < 0;
-  if (failed)
-    goto fail;
-
-  do_cleanups (member_cleanups);
-  discard_cleanups (cleanups);
-  return event;
-
- fail:
-  do_cleanups (cleanups);
-  return NULL;
+  return event.release ();
 }
 
 /* Callback function which notifies observers when an event occurs which
@@ -188,14 +134,12 @@ int
 emit_inferior_call_event (inferior_call_kind flag, ptid_t thread,
 			  CORE_ADDR addr)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.inferior_call))
     return 0;
 
-  event = create_inferior_call_event_object (flag, thread, addr);
+  gdbpy_ref<> event (create_inferior_call_event_object (flag, thread, addr));
   if (event != NULL)
-    return evpy_emit_event (event, gdb_py_events.inferior_call);
+    return evpy_emit_event (event.get (), gdb_py_events.inferior_call);
   return -1;
 }
 
@@ -205,14 +149,12 @@ emit_inferior_call_event (inferior_call_
 int
 emit_memory_changed_event (CORE_ADDR addr, ssize_t len)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.memory_changed))
     return 0;
 
-  event = create_memory_changed_event_object (addr, len);
+  gdbpy_ref<> event (create_memory_changed_event_object (addr, len));
   if (event != NULL)
-    return evpy_emit_event (event, gdb_py_events.memory_changed);
+    return evpy_emit_event (event.get (), gdb_py_events.memory_changed);
   return -1;
 }
 
@@ -222,14 +164,12 @@ emit_memory_changed_event (CORE_ADDR add
 int
 emit_register_changed_event (struct frame_info* frame, int regnum)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.register_changed))
     return 0;
 
-  event = create_register_changed_event_object (frame, regnum);
+  gdbpy_ref<> event (create_register_changed_event_object (frame, regnum));
   if (event != NULL)
-    return evpy_emit_event (event, gdb_py_events.register_changed);
+    return evpy_emit_event (event.get (), gdb_py_events.register_changed);
   return -1;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-infthread.c ./gdb/python/py-infthread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-infthread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-infthread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior threads.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -62,7 +62,7 @@ static PyObject *
 thpy_get_name (PyObject *self, void *ignore)
 {
   thread_object *thread_obj = (thread_object *) self;
-  char *name;
+  const char *name;
 
   THPY_REQUIRE_VALID (thread_obj);
 
@@ -80,7 +80,7 @@ static int
 thpy_set_name (PyObject *self, PyObject *newvalue, void *ignore)
 {
   thread_object *thread_obj = (thread_object *) self;
-  char *name;
+  gdb::unique_xmalloc_ptr<char> name;
 
   if (! thread_obj->thread)
     {
@@ -95,7 +95,9 @@ thpy_set_name (PyObject *self, PyObject 
       return -1;
     }
   else if (newvalue == Py_None)
-    name = NULL;
+    {
+      /* Nothing.  */
+    }
   else if (! gdbpy_is_string (newvalue))
     {
       PyErr_SetString (PyExc_TypeError,
@@ -110,11 +112,13 @@ thpy_set_name (PyObject *self, PyObject 
     }
 
   xfree (thread_obj->thread->name);
-  thread_obj->thread->name = name;
+  thread_obj->thread->name = name.release ();
 
   return 0;
 }
 
+/* Getter for InferiorThread.num.  */
+
 static PyObject *
 thpy_get_num (PyObject *self, void *closure)
 {
@@ -122,7 +126,19 @@ thpy_get_num (PyObject *self, void *clos
 
   THPY_REQUIRE_VALID (thread_obj);
 
-  return PyLong_FromLong (thread_obj->thread->num);
+  return PyLong_FromLong (thread_obj->thread->per_inf_num);
+}
+
+/* Getter for InferiorThread.global_num.  */
+
+static PyObject *
+thpy_get_global_num (PyObject *self, void *closure)
+{
+  thread_object *thread_obj = (thread_object *) self;
+
+  THPY_REQUIRE_VALID (thread_obj);
+
+  return PyLong_FromLong (thread_obj->thread->global_num);
 }
 
 /* Getter for InferiorThread.ptid  -> (pid, lwp, tid).
@@ -131,8 +147,6 @@ thpy_get_num (PyObject *self, void *clos
 static PyObject *
 thpy_get_ptid (PyObject *self, void *closure)
 {
-  int pid;
-  long tid, lwp;
   thread_object *thread_obj = (thread_object *) self;
 
   THPY_REQUIRE_VALID (thread_obj);
@@ -140,6 +154,18 @@ thpy_get_ptid (PyObject *self, void *clo
   return gdbpy_create_ptid_object (thread_obj->thread->ptid);
 }
 
+/* Getter for InferiorThread.inferior -> Inferior.  */
+
+static PyObject *
+thpy_get_inferior (PyObject *self, void *ignore)
+{
+  thread_object *thread_obj = (thread_object *) self;
+
+  THPY_REQUIRE_VALID (thread_obj);
+
+  return thread_obj->inf_obj;
+}
+
 /* Implementation of InferiorThread.switch ().
    Makes this the GDB selected thread.  */
 
@@ -282,9 +308,14 @@ static PyGetSetDef thread_object_getset[
 {
   { "name", thpy_get_name, thpy_set_name,
     "The name of the thread, as set by the user or the OS.", NULL },
-  { "num", thpy_get_num, NULL, "ID of the thread, as assigned by GDB.", NULL },
+  { "num", thpy_get_num, NULL,
+    "Per-inferior number of the thread, as assigned by GDB.", NULL },
+  { "global_num", thpy_get_global_num, NULL,
+    "Global number of the thread, as assigned by GDB.", NULL },
   { "ptid", thpy_get_ptid, NULL, "ID of the thread, as assigned by the OS.",
     NULL },
+  { "inferior", thpy_get_inferior, NULL,
+    "The Inferior object this thread belongs to.", NULL },
 
   { NULL }
 };
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-lazy-string.c ./gdb/python/py-lazy-string.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-lazy-string.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-lazy-string.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to lazy strings.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -180,14 +180,13 @@ gdbpy_is_lazy_string (PyObject *result)
 }
 
 /* Extract the parameters from the lazy string object STRING.
-   ENCODING will either be set to NULL, or will be allocated with
-   xmalloc, in which case the callers is responsible for freeing
-   it.  */
+   ENCODING may be set to NULL, if no encoding is found.  */
 
 void
 gdbpy_extract_lazy_string (PyObject *string, CORE_ADDR *addr,
 			   struct type **str_type,
-			   long *length, char **encoding)
+			   long *length,
+			   gdb::unique_xmalloc_ptr<char> *encoding)
 {
   lazy_string_object *lazy;
 
@@ -198,7 +197,7 @@ gdbpy_extract_lazy_string (PyObject *str
   *addr = lazy->address;
   *str_type = lazy->type;
   *length = lazy->length;
-  *encoding = lazy->encoding ? xstrdup (lazy->encoding) : NULL;
+  encoding->reset (lazy->encoding ? xstrdup (lazy->encoding) : NULL);
 }
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-linetable.c ./gdb/python/py-linetable.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-linetable.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-linetable.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to line tables.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "python-internal.h"
+#include "py-ref.h"
 
 typedef struct {
   PyObject_HEAD
@@ -55,7 +56,7 @@ typedef struct {
 extern PyTypeObject ltpy_iterator_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");
 
-/* Internal helper function to extract gdb.Symtab from a gdb.Linetable
+/* Internal helper function to extract gdb.Symtab from a gdb.LineTable
    object.  */
 
 static PyObject *
@@ -124,7 +125,6 @@ static PyObject *
 build_line_table_tuple_from_pcs (int line, VEC (CORE_ADDR) *vec)
 {
   int vec_len = 0;
-  PyObject *tuple;
   CORE_ADDR pc;
   int i;
 
@@ -132,31 +132,22 @@ build_line_table_tuple_from_pcs (int lin
   if (vec_len < 1)
     Py_RETURN_NONE;
 
-  tuple = PyTuple_New (vec_len);
+  gdbpy_ref<> tuple (PyTuple_New (vec_len));
 
   if (tuple == NULL)
     return NULL;
 
   for (i = 0; VEC_iterate (CORE_ADDR, vec, i, pc); ++i)
     {
-      PyObject *obj = build_linetable_entry (line, pc);
+      gdbpy_ref<> obj (build_linetable_entry (line, pc));
 
       if (obj == NULL)
-	{
-	  Py_DECREF (tuple);
-	  tuple = NULL;
-	  break;
-	}
-      else if (PyTuple_SetItem (tuple, i, obj) != 0)
-	{
-	  Py_DECREF (obj);
-	  Py_DECREF (tuple);
-	  tuple = NULL;
-	  break;
-	}
+	return NULL;
+      else if (PyTuple_SetItem (tuple.get (), i, obj.release ()) != 0)
+	return NULL;
     }
 
-  return tuple;
+  return tuple.release ();
 }
 
 /* Implementation of gdb.LineTable.line (self) -> Tuple.  Returns a
@@ -169,7 +160,6 @@ ltpy_get_pcs_for_line (PyObject *self, P
   struct symtab *symtab;
   gdb_py_longest py_line;
   struct linetable_entry *best_entry = NULL;
-  linetable_entry_object *result;
   VEC (CORE_ADDR) *pcs = NULL;
   PyObject *tuple;
 
@@ -227,8 +217,8 @@ ltpy_has_line (PyObject *self, PyObject 
   Py_RETURN_FALSE;
 }
 
-/* Implementation of gdb.LineTable.source_lines (self) -> FrozenSet.
-   Returns a Python FrozenSet that contains source line entries in the
+/* Implementation of gdb.LineTable.source_lines (self) -> List.
+   Returns a Python List that contains source line entries in the
    line table.  This function will just return the source lines
    without corresponding addresses.  */
 
@@ -237,9 +227,7 @@ ltpy_get_all_source_lines (PyObject *sel
 {
   struct symtab *symtab;
   Py_ssize_t index;
-  PyObject *source_list, *source_dict, *line;
   struct linetable_entry *item;
-  Py_ssize_t list_size;
 
   LTPY_REQUIRE_VALID (self, symtab);
 
@@ -250,7 +238,7 @@ ltpy_get_all_source_lines (PyObject *sel
       return NULL;
     }
 
-  source_dict = PyDict_New ();
+  gdbpy_ref<> source_dict (PyDict_New ());
   if (source_dict == NULL)
     return NULL;
 
@@ -262,40 +250,26 @@ ltpy_get_all_source_lines (PyObject *sel
 	 include in the source set. */
       if (item->line > 0)
 	{
-	  line = gdb_py_object_from_longest (item->line);
+	  gdbpy_ref<> line (gdb_py_object_from_longest (item->line));
 
 	  if (line == NULL)
-	    {
-	      Py_DECREF (source_dict);
-	      return NULL;
-	    }
-
-	  if (PyDict_SetItem (source_dict, line, Py_None) == -1)
-	    {
-	      Py_DECREF (line);
-	      Py_DECREF (source_dict);
-	      return NULL;
-	    }
+	    return NULL;
 
-	  Py_DECREF (line);
+	  if (PyDict_SetItem (source_dict.get (), line.get (), Py_None) == -1)
+	    return NULL;
 	}
     }
 
-
-  source_list = PyDict_Keys (source_dict);
-  Py_DECREF (source_dict);
-
-  return source_list;
+  return PyDict_Keys (source_dict.get ());
 }
 
-/* Implementation of gdb.Linetable.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTable.is_valid (self) -> Boolean.
    Returns True if this line table object still exists in GDB.  */
 
 static PyObject *
 ltpy_is_valid (PyObject *self, PyObject *args)
 {
   struct symtab *symtab = NULL;
-  linetable_object *obj = (linetable_object *) self;
 
   symtab = symtab_object_to_symtab (get_symtab (self));
 
@@ -349,7 +323,7 @@ gdbpy_initialize_linetable (void)
   return 0;
 }
 
-/* Linetable entry object get functions.  */
+/* LineTable entry object get functions.  */
 
 /* Implementation of gdb.LineTableEntry.line (self) -> Long.  Returns
    a long integer associated with the line table entry.  */
@@ -373,7 +347,7 @@ ltpy_entry_get_pc (PyObject *self, void 
   return  gdb_py_object_from_longest (obj->pc);
 }
 
-/* Linetable iterator functions.  */
+/* LineTable iterator functions.  */
 
 /* Return a new line table iterator.  */
 
@@ -427,14 +401,16 @@ ltpy_iternext (PyObject *self)
 {
   ltpy_iterator_object *iter_obj = (ltpy_iterator_object *) self;
   struct symtab *symtab;
-  int index;
   PyObject *obj;
   struct linetable_entry *item;
 
   LTPY_REQUIRE_VALID (iter_obj->source, symtab);
 
   if (iter_obj->current_index >= SYMTAB_LINETABLE (symtab)->nitems)
-    goto stop_iteration;
+    {
+      PyErr_SetNone (PyExc_StopIteration);
+      return NULL;
+    }
 
   item = &(SYMTAB_LINETABLE (symtab)->item[iter_obj->current_index]);
 
@@ -446,7 +422,10 @@ ltpy_iternext (PyObject *self)
 
       /* Exit if the internal value is the last item in the line table.  */
       if (iter_obj->current_index >= SYMTAB_LINETABLE (symtab)->nitems)
-	goto stop_iteration;
+	{
+	  PyErr_SetNone (PyExc_StopIteration);
+	  return NULL;
+	}
       item = &(SYMTAB_LINETABLE (symtab)->item[iter_obj->current_index]);
     }
 
@@ -454,13 +433,9 @@ ltpy_iternext (PyObject *self)
   iter_obj->current_index++;
 
   return obj;
-
- stop_iteration:
-  PyErr_SetNone (PyExc_StopIteration);
-  return NULL;
 }
 
-/* Implementation of gdb.LinetableIterator.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTableIterator.is_valid (self) -> Boolean.
    Returns True if this line table iterator object still exists in
    GDB.  */
 
@@ -488,11 +463,11 @@ Return executable locations for a given 
     "has_line (lineno) -> Boolean\n\
 Return TRUE if this line has executable information, FALSE if not." },
   { "source_lines", ltpy_get_all_source_lines, METH_NOARGS,
-    "source_lines () -> FrozenSet\n\
-Return a frozen set of all executable source lines." },
+    "source_lines () -> List\n\
+Return a list of all executable source lines." },
   { "is_valid", ltpy_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable is valid, False if not." },
+Return True if this LineTable is valid, False if not." },
   {NULL}  /* Sentinel */
 };
 
@@ -539,7 +514,7 @@ PyTypeObject linetable_object_type = {
 static PyMethodDef ltpy_iterator_methods[] = {
   { "is_valid", ltpy_iter_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable iterator is valid, False if not." },
+Return True if this LineTable iterator is valid, False if not." },
   {NULL}  /* Sentinel */
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-newobjfileevent.c ./gdb/python/py-newobjfileevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-newobjfileevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-newobjfileevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to new object file loading events.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,26 +28,22 @@ extern PyTypeObject clear_objfiles_event
 static PyObject *
 create_new_objfile_event_object (struct objfile *objfile)
 {
-  PyObject *objfile_event;
   PyObject *py_objfile;
 
-  objfile_event = create_event_object (&new_objfile_event_object_type);
-  if (!objfile_event)
-    goto fail;
+  gdbpy_ref<> objfile_event
+    (create_event_object (&new_objfile_event_object_type));
+  if (objfile_event == NULL)
+    return NULL;
 
   /* Note that objfile_to_objfile_object returns a borrowed reference,
      so we don't need a decref here.  */
   py_objfile = objfile_to_objfile_object (objfile);
-  if (!py_objfile || evpy_add_attribute (objfile_event,
+  if (!py_objfile || evpy_add_attribute (objfile_event.get (),
                                          "new_objfile",
                                          py_objfile) < 0)
-    goto fail;
+    return NULL;
 
-  return objfile_event;
-
- fail:
-  Py_XDECREF (objfile_event);
-  return NULL;
+  return objfile_event.release ();
 }
 
 /* Callback function which notifies observers when a new objfile event occurs.
@@ -57,14 +53,12 @@ create_new_objfile_event_object (struct 
 int
 emit_new_objfile_event (struct objfile *objfile)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.new_objfile))
     return 0;
 
-  event = create_new_objfile_event_object (objfile);
-  if (event)
-    return evpy_emit_event (event, gdb_py_events.new_objfile);
+  gdbpy_ref<> event (create_new_objfile_event_object (objfile));
+  if (event != NULL)
+    return evpy_emit_event (event.get (), gdb_py_events.new_objfile);
   return -1;
 }
 
@@ -79,26 +73,22 @@ GDBPY_NEW_EVENT_TYPE (new_objfile,
 static PyObject *
 create_clear_objfiles_event_object (void)
 {
-  PyObject *objfile_event;
   PyObject *py_progspace;
 
-  objfile_event = create_event_object (&clear_objfiles_event_object_type);
-  if (!objfile_event)
-    goto fail;
+  gdbpy_ref<> objfile_event
+    (create_event_object (&clear_objfiles_event_object_type));
+  if (objfile_event == NULL)
+    return NULL;
 
   /* Note that pspace_to_pspace_object returns a borrowed reference,
      so we don't need a decref here.  */
   py_progspace = pspace_to_pspace_object (current_program_space);
-  if (!py_progspace || evpy_add_attribute (objfile_event,
+  if (!py_progspace || evpy_add_attribute (objfile_event.get (),
 					   "progspace",
 					   py_progspace) < 0)
-    goto fail;
+    return NULL;
 
-  return objfile_event;
-
- fail:
-  Py_XDECREF (objfile_event);
-  return NULL;
+  return objfile_event.release ();
 }
 
 /* Callback function which notifies observers when the "clear objfiles"
@@ -109,14 +99,12 @@ create_clear_objfiles_event_object (void
 int
 emit_clear_objfiles_event (void)
 {
-  PyObject *event;
-
   if (evregpy_no_listeners_p (gdb_py_events.clear_objfiles))
     return 0;
 
-  event = create_clear_objfiles_event_object ();
-  if (event)
-    return evpy_emit_event (event, gdb_py_events.clear_objfiles);
+  gdbpy_ref<> event (create_clear_objfiles_event_object ());
+  if (event != NULL)
+    return evpy_emit_event (event.get (), gdb_py_events.clear_objfiles);
   return -1;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-objfile.c ./gdb/python/py-objfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-objfile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-objfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to objfiles.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "language.h"
 #include "build-id.h"
 #include "symtab.h"
+#include "py-ref.h"
 
 typedef struct
 {
@@ -78,9 +79,7 @@ objfpy_get_filename (PyObject *self, voi
   objfile_object *obj = (objfile_object *) self;
 
   if (obj->objfile)
-    return PyString_Decode (objfile_name (obj->objfile),
-			    strlen (objfile_name (obj->objfile)),
-			    host_charset (), NULL);
+    return host_string_to_python_string (objfile_name (obj->objfile));
   Py_RETURN_NONE;
 }
 
@@ -96,8 +95,7 @@ objfpy_get_username (PyObject *self, voi
     {
       const char *username = obj->objfile->original_name;
 
-      return PyString_Decode (username, strlen (username),
-			      host_charset (), NULL);
+      return host_string_to_python_string (username);
     }
 
   Py_RETURN_NONE;
@@ -152,8 +150,7 @@ objfpy_get_build_id (PyObject *self, voi
       char *hex_form = make_hex_string (build_id->data, build_id->size);
       PyObject *result;
 
-      result = PyString_Decode (hex_form, strlen (hex_form),
-				host_charset (), NULL);
+      result = host_string_to_python_string (hex_form);
       xfree (hex_form);
       return result;
     }
@@ -200,7 +197,10 @@ static int
 objfpy_initialize (objfile_object *self)
 {
   self->objfile = NULL;
-  self->dict = NULL;
+
+  self->dict = PyDict_New ();
+  if (self->dict == NULL)
+    return 0;
 
   self->printers = PyList_New (0);
   if (self->printers == NULL)
@@ -228,18 +228,15 @@ objfpy_initialize (objfile_object *self)
 static PyObject *
 objfpy_new (PyTypeObject *type, PyObject *args, PyObject *keywords)
 {
-  objfile_object *self = (objfile_object *) type->tp_alloc (type, 0);
+  gdbpy_ref<objfile_object> self ((objfile_object *) type->tp_alloc (type, 0));
 
-  if (self)
+  if (self != NULL)
     {
-      if (!objfpy_initialize (self))
-	{
-	  Py_DECREF (self);
-	  return NULL;
-	}
+      if (!objfpy_initialize (self.get ()))
+	return NULL;
     }
 
-  return (PyObject *) self;
+  return (PyObject *) self.release ();
 }
 
 PyObject *
@@ -438,7 +435,6 @@ objfpy_add_separate_debug_file (PyObject
   static char *keywords[] = { "file_name", NULL };
   objfile_object *obj = (objfile_object *) self;
   const char *file_name;
-  int symfile_flags = 0;
 
   OBJFPY_REQUIRE_VALID (obj);
 
@@ -447,9 +443,9 @@ objfpy_add_separate_debug_file (PyObject
 
   TRY
     {
-      bfd *abfd = symfile_bfd_open (file_name);
+      gdb_bfd_ref_ptr abfd (symfile_bfd_open (file_name));
 
-      symbol_file_add_separate (abfd, file_name, symfile_flags, obj->objfile);
+      symbol_file_add_separate (abfd.get (), file_name, 0, obj->objfile);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -614,13 +610,9 @@ gdbpy_lookup_objfile (PyObject *self, Py
 static void
 py_free_objfile (struct objfile *objfile, void *datum)
 {
-  struct cleanup *cleanup;
-  objfile_object *object = datum;
-
-  cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
+  gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
+  gdbpy_ref<objfile_object> object ((objfile_object *) datum);
   object->objfile = NULL;
-  Py_DECREF ((PyObject *) object);
-  do_cleanups (cleanup);
 }
 
 /* Return a borrowed reference to the Python object of type Objfile
@@ -631,26 +623,22 @@ py_free_objfile (struct objfile *objfile
 PyObject *
 objfile_to_objfile_object (struct objfile *objfile)
 {
-  objfile_object *object;
-
-  object = objfile_data (objfile, objfpy_objfile_data_key);
-  if (!object)
+  gdbpy_ref<objfile_object> object
+    ((objfile_object *) objfile_data (objfile, objfpy_objfile_data_key));
+  if (object == NULL)
     {
-      object = PyObject_New (objfile_object, &objfile_object_type);
-      if (object)
+      object.reset (PyObject_New (objfile_object, &objfile_object_type));
+      if (object != NULL)
 	{
-	  if (!objfpy_initialize (object))
-	    {
-	      Py_DECREF (object);
-	      return NULL;
-	    }
+	  if (!objfpy_initialize (object.get ()))
+	    return NULL;
 
 	  object->objfile = objfile;
-	  set_objfile_data (objfile, objfpy_objfile_data_key, object);
+	  set_objfile_data (objfile, objfpy_objfile_data_key, object.get ());
 	}
     }
 
-  return (PyObject *) object;
+  return (PyObject *) object.release ();
 }
 
 int
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-param.c ./gdb/python/py-param.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-param.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-param.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB parameters implemented in Python
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "completer.h"
 #include "language.h"
 #include "arch-utils.h"
+#include "py-ref.h"
 
 /* Parameter constants and their values.  */
 struct parm_constant
@@ -148,21 +149,19 @@ set_parameter_value (parmpy_object *self
 	}
       else
 	{
-	  char *string;
-
-	  string = python_string_to_host_string (value);
+	  gdb::unique_xmalloc_ptr<char>
+	    string (python_string_to_host_string (value));
 	  if (string == NULL)
 	    return -1;
 
 	  xfree (self->value.stringval);
-	  self->value.stringval = string;
+	  self->value.stringval = string.release ();
 	}
       break;
 
     case var_enum:
       {
 	int i;
-	char *str;
 
 	if (! gdbpy_is_string (value))
 	  {
@@ -171,13 +170,13 @@ set_parameter_value (parmpy_object *self
 	    return -1;
 	  }
 
-	str = python_string_to_host_string (value);
+	gdb::unique_xmalloc_ptr<char>
+	  str (python_string_to_host_string (value));
 	if (str == NULL)
 	  return -1;
 	for (i = 0; self->enumeration[i]; ++i)
-	  if (! strcmp (self->enumeration[i], str))
+	  if (! strcmp (self->enumeration[i], str.get ()))
 	    break;
-	xfree (str);
 	if (! self->enumeration[i])
 	  {
 	    PyErr_SetString (PyExc_RuntimeError,
@@ -301,25 +300,24 @@ set_attr (PyObject *obj, PyObject *attr_
 /* A helper function which returns a documentation string for an
    object. */
 
-static char *
+static gdb::unique_xmalloc_ptr<char>
 get_doc_string (PyObject *object, PyObject *attr)
 {
-  char *result = NULL;
+  gdb::unique_xmalloc_ptr<char> result;
 
   if (PyObject_HasAttr (object, attr))
     {
-      PyObject *ds_obj = PyObject_GetAttr (object, attr);
+      gdbpy_ref<> ds_obj (PyObject_GetAttr (object, attr));
 
-      if (ds_obj && gdbpy_is_string (ds_obj))
+      if (ds_obj != NULL && gdbpy_is_string (ds_obj.get ()))
 	{
-	  result = python_string_to_host_string (ds_obj);
+	  result = python_string_to_host_string (ds_obj.get ());
 	  if (result == NULL)
 	    gdbpy_print_stack ();
 	}
-      Py_XDECREF (ds_obj);
     }
   if (! result)
-    result = xstrdup (_("This command is not documented."));
+    result.reset (xstrdup (_("This command is not documented.")));
   return result;
 }
 
@@ -327,19 +325,18 @@ get_doc_string (PyObject *object, PyObje
    argument ARG.  ARG can be NULL.  METHOD should return a Python
    string.  If this function returns NULL, there has been an error and
    the appropriate exception set.  */
-static char *
+static gdb::unique_xmalloc_ptr<char>
 call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
 {
-  char *data = NULL;
-  PyObject *result = PyObject_CallMethodObjArgs (obj, method, arg, NULL);
+  gdb::unique_xmalloc_ptr<char> data;
+  gdbpy_ref<> result (PyObject_CallMethodObjArgs (obj, method, arg, NULL));
 
-  if (! result)
+  if (result == NULL)
     return NULL;
 
-  if (gdbpy_is_string (result))
+  if (gdbpy_is_string (result.get ()))
     {
-      data = python_string_to_host_string (result);
-      Py_DECREF (result);
+      data = python_string_to_host_string (result.get ());
       if (! data)
 	return NULL;
     }
@@ -347,7 +344,6 @@ call_doc_function (PyObject *obj, PyObje
     {
       PyErr_SetString (PyExc_RuntimeError,
 		       _("Parameter must return a string value."));
-      Py_DECREF (result);
       return NULL;
     }
 
@@ -365,19 +361,25 @@ get_set_value (char *args, int from_tty,
 	       struct cmd_list_element *c)
 {
   PyObject *obj = (PyObject *) get_cmd_context (c);
-  char *set_doc_string;
-  struct cleanup *cleanup = ensure_python_env (get_current_arch (),
-					       current_language);
-  PyObject *set_doc_func = PyString_FromString ("get_set_string");
+  gdb::unique_xmalloc_ptr<char> set_doc_string;
+
+  gdbpy_enter enter_py (get_current_arch (), current_language);
+  gdbpy_ref<> set_doc_func (PyString_FromString ("get_set_string"));
 
-  if (! set_doc_func)
-    goto error;
+  if (set_doc_func == NULL)
+    {
+      gdbpy_print_stack ();
+      return;
+    }
 
-  if (PyObject_HasAttr (obj, set_doc_func))
+  if (PyObject_HasAttr (obj, set_doc_func.get ()))
     {
-      set_doc_string = call_doc_function (obj, set_doc_func, NULL);
+      set_doc_string = call_doc_function (obj, set_doc_func.get (), NULL);
       if (! set_doc_string)
-	goto error;
+	{
+	  gdbpy_print_stack ();
+	  return;
+	}
     }
   else
     {
@@ -387,18 +389,7 @@ get_set_value (char *args, int from_tty,
       set_doc_string  = get_doc_string (obj, set_doc_cst);
     }
 
-  make_cleanup (xfree, set_doc_string);
-  fprintf_filtered (gdb_stdout, "%s\n", set_doc_string);
-
-  Py_XDECREF (set_doc_func);
-  do_cleanups (cleanup);
-  return;
-
- error:
-  Py_XDECREF (set_doc_func);
-  gdbpy_print_stack ();
-  do_cleanups (cleanup);
-  return;
+  fprintf_filtered (gdb_stdout, "%s\n", set_doc_string.get ());
 }
 
 /* A callback function that is registered against the respective
@@ -413,29 +404,36 @@ get_show_value (struct ui_file *file, in
 		const char *value)
 {
   PyObject *obj = (PyObject *) get_cmd_context (c);
-  char *show_doc_string = NULL;
-  struct cleanup *cleanup = ensure_python_env (get_current_arch (),
-					       current_language);
-  PyObject *show_doc_func = PyString_FromString ("get_show_string");
+  gdb::unique_xmalloc_ptr<char> show_doc_string;
 
-  if (! show_doc_func)
-    goto error;
+  gdbpy_enter enter_py (get_current_arch (), current_language);
+  gdbpy_ref<> show_doc_func (PyString_FromString ("get_show_string"));
 
-  if (PyObject_HasAttr (obj, show_doc_func))
+  if (show_doc_func == NULL)
     {
-      PyObject *val_obj = PyString_FromString (value);
+      gdbpy_print_stack ();
+      return;
+    }
 
-      if (! val_obj)
-	goto error;
+  if (PyObject_HasAttr (obj, show_doc_func.get ()))
+    {
+      gdbpy_ref<> val_obj (PyString_FromString (value));
 
-      show_doc_string = call_doc_function (obj, show_doc_func, val_obj);
-      Py_DECREF (val_obj);
-      if (! show_doc_string)
-	goto error;
+      if (val_obj == NULL)
+	{
+	  gdbpy_print_stack ();
+	  return;
+	}
 
-      make_cleanup (xfree, show_doc_string);
+      show_doc_string = call_doc_function (obj, show_doc_func.get (),
+					   val_obj.get ());
+      if (! show_doc_string)
+	{
+	  gdbpy_print_stack ();
+	  return;
+	}
 
-      fprintf_filtered (file, "%s\n", show_doc_string);
+      fprintf_filtered (file, "%s\n", show_doc_string.get ());
     }
   else
     {
@@ -443,19 +441,8 @@ get_show_value (struct ui_file *file, in
 	 callback function does not exist, then attempt to read the
 	 show_doc attribute.  */
       show_doc_string  = get_doc_string (obj, show_doc_cst);
-      make_cleanup (xfree, show_doc_string);
-      fprintf_filtered (file, "%s %s\n", show_doc_string, value);
+      fprintf_filtered (file, "%s %s\n", show_doc_string.get (), value);
     }
-
-  Py_XDECREF (show_doc_func);
-  do_cleanups (cleanup);
-  return;
-
- error:
-  Py_XDECREF (show_doc_func);
-  gdbpy_print_stack ();
-  do_cleanups (cleanup);
-  return;
 }
 
 
@@ -594,29 +581,27 @@ compute_enum_values (parmpy_object *self
       return 0;
     }
 
-  self->enumeration = xmalloc ((size + 1) * sizeof (char *));
+  self->enumeration = XCNEWVEC (const char *, size + 1);
   back_to = make_cleanup (free_current_contents, &self->enumeration);
-  memset (self->enumeration, 0, (size + 1) * sizeof (char *));
 
   for (i = 0; i < size; ++i)
     {
-      PyObject *item = PySequence_GetItem (enum_values, i);
+      gdbpy_ref<> item (PySequence_GetItem (enum_values, i));
 
-      if (! item)
+      if (item == NULL)
 	{
 	  do_cleanups (back_to);
 	  return 0;
 	}
-      if (! gdbpy_is_string (item))
+      if (! gdbpy_is_string (item.get ()))
 	{
-	  Py_DECREF (item);
 	  do_cleanups (back_to);
 	  PyErr_SetString (PyExc_RuntimeError,
 			   _("The enumeration item not a string."));
 	  return 0;
 	}
-      self->enumeration[i] = python_string_to_host_string (item);
-      Py_DECREF (item);
+      self->enumeration[i]
+	= python_string_to_host_string (item.get ()).release ();
       if (self->enumeration[i] == NULL)
 	{
 	  do_cleanups (back_to);
@@ -717,9 +702,9 @@ parmpy_init (PyObject *self, PyObject *a
   if (! cmd_name)
     return -1;
 
-  set_doc = get_doc_string (self, set_doc_cst);
-  show_doc = get_doc_string (self, show_doc_cst);
-  doc = get_doc_string (self, gdbpy_doc_cst);
+  set_doc = get_doc_string (self, set_doc_cst).release ();
+  show_doc = get_doc_string (self, show_doc_cst).release ();
+  doc = get_doc_string (self, gdbpy_doc_cst).release ();
 
   Py_INCREF (self);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-prettyprint.c ./gdb/python/py-prettyprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-prettyprint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-prettyprint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python pretty-printing
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 #include "extension-priv.h"
 #include "python.h"
 #include "python-internal.h"
+#include "py-ref.h"
 
 /* Return type of print_string_repr.  */
 
@@ -48,25 +49,23 @@ static PyObject *
 search_pp_list (PyObject *list, PyObject *value)
 {
   Py_ssize_t pp_list_size, list_index;
-  PyObject *function, *printer = NULL;
 
   pp_list_size = PyList_Size (list);
   for (list_index = 0; list_index < pp_list_size; list_index++)
     {
-      function = PyList_GetItem (list, list_index);
+      PyObject *function = PyList_GetItem (list, list_index);
       if (! function)
 	return NULL;
 
       /* Skip if disabled.  */
       if (PyObject_HasAttr (function, gdbpy_enabled_cst))
 	{
-	  PyObject *attr = PyObject_GetAttr (function, gdbpy_enabled_cst);
+	  gdbpy_ref<> attr (PyObject_GetAttr (function, gdbpy_enabled_cst));
 	  int cmp;
 
-	  if (!attr)
+	  if (attr == NULL)
 	    return NULL;
-	  cmp = PyObject_IsTrue (attr);
-	  Py_DECREF (attr);
+	  cmp = PyObject_IsTrue (attr.get ());
 	  if (cmp == -1)
 	    return NULL;
 
@@ -74,13 +73,12 @@ search_pp_list (PyObject *list, PyObject
 	    continue;
 	}
 
-      printer = PyObject_CallFunctionObjArgs (function, value, NULL);
-      if (! printer)
+      gdbpy_ref<> printer (PyObject_CallFunctionObjArgs (function, value,
+							 NULL));
+      if (printer == NULL)
 	return NULL;
       else if (printer != Py_None)
-	return printer;
-
-      Py_DECREF (printer);
+	return printer.release ();
     }
 
   Py_RETURN_NONE;
@@ -95,8 +93,6 @@ search_pp_list (PyObject *list, PyObject
 static PyObject *
 find_pretty_printer_from_objfiles (PyObject *value)
 {
-  PyObject *pp_list;
-  PyObject *function;
   struct objfile *obj;
 
   ALL_OBJFILES (obj)
@@ -109,18 +105,15 @@ find_pretty_printer_from_objfiles (PyObj
 	continue;
       }
 
-    pp_list = objfpy_get_printers (objf, NULL);
-    function = search_pp_list (pp_list, value);
-    Py_XDECREF (pp_list);
+    gdbpy_ref<> pp_list (objfpy_get_printers (objf, NULL));
+    gdbpy_ref<> function (search_pp_list (pp_list.get (), value));
 
     /* If there is an error in any objfile list, abort the search and exit.  */
-    if (! function)
+    if (function == NULL)
       return NULL;
 
     if (function != Py_None)
-      return function;
-
-    Py_DECREF (function);
+      return function.release ();
   }
 
   Py_RETURN_NONE;
@@ -135,16 +128,12 @@ find_pretty_printer_from_objfiles (PyObj
 static PyObject *
 find_pretty_printer_from_progspace (PyObject *value)
 {
-  PyObject *pp_list;
-  PyObject *function;
   PyObject *obj = pspace_to_pspace_object (current_program_space);
 
   if (!obj)
     return NULL;
-  pp_list = pspy_get_printers (obj, NULL);
-  function = search_pp_list (pp_list, value);
-  Py_XDECREF (pp_list);
-  return function;
+  gdbpy_ref<> pp_list (pspy_get_printers (obj, NULL));
+  return search_pp_list (pp_list.get (), value);
 }
 
 /* Subroutine of find_pretty_printer to simplify it.
@@ -156,23 +145,16 @@ find_pretty_printer_from_progspace (PyOb
 static PyObject *
 find_pretty_printer_from_gdb (PyObject *value)
 {
-  PyObject *pp_list;
-  PyObject *function;
-
   /* Fetch the global pretty printer list.  */
   if (gdb_python_module == NULL
       || ! PyObject_HasAttrString (gdb_python_module, "pretty_printers"))
     Py_RETURN_NONE;
-  pp_list = PyObject_GetAttrString (gdb_python_module, "pretty_printers");
-  if (pp_list == NULL || ! PyList_Check (pp_list))
-    {
-      Py_XDECREF (pp_list);
-      Py_RETURN_NONE;
-    }
+  gdbpy_ref<> pp_list (PyObject_GetAttrString (gdb_python_module,
+					       "pretty_printers"));
+  if (pp_list == NULL || ! PyList_Check (pp_list.get ()))
+    Py_RETURN_NONE;
 
-  function = search_pp_list (pp_list, value);
-  Py_XDECREF (pp_list);
-  return function;
+  return search_pp_list (pp_list.get (), value);
 }
 
 /* Find the pretty-printing constructor function for VALUE.  If no
@@ -182,24 +164,19 @@ find_pretty_printer_from_gdb (PyObject *
 static PyObject *
 find_pretty_printer (PyObject *value)
 {
-  PyObject *function;
-
   /* Look at the pretty-printer list for each objfile
      in the current program-space.  */
-  function = find_pretty_printer_from_objfiles (value);
+  gdbpy_ref<> function (find_pretty_printer_from_objfiles (value));
   if (function == NULL || function != Py_None)
-    return function;
-  Py_DECREF (function);
+    return function.release ();
 
   /* Look at the pretty-printer list for the current program-space.  */
-  function = find_pretty_printer_from_progspace (value);
+  function.reset (find_pretty_printer_from_progspace (value));
   if (function == NULL || function != Py_None)
-    return function;
-  Py_DECREF (function);
+    return function.release ();
 
   /* Look at the pretty-printer list in the gdb module.  */
-  function = find_pretty_printer_from_gdb (value);
-  return function;
+  return find_pretty_printer_from_gdb (value);
 }
 
 /* Pretty-print a single value, via the printer object PRINTER.
@@ -213,21 +190,22 @@ find_pretty_printer (PyObject *value)
 static PyObject *
 pretty_print_one_value (PyObject *printer, struct value **out_value)
 {
-  PyObject *result = NULL;
+  gdbpy_ref<> result;
 
   *out_value = NULL;
   TRY
     {
-      result = PyObject_CallMethodObjArgs (printer, gdbpy_to_string_cst, NULL);
-      if (result)
+      result.reset (PyObject_CallMethodObjArgs (printer, gdbpy_to_string_cst,
+						NULL));
+      if (result != NULL)
 	{
-	  if (! gdbpy_is_string (result) && ! gdbpy_is_lazy_string (result)
+	  if (! gdbpy_is_string (result.get ())
+	      && ! gdbpy_is_lazy_string (result.get ())
 	      && result != Py_None)
 	    {
-	      *out_value = convert_value_from_python (result);
+	      *out_value = convert_value_from_python (result.get ());
 	      if (PyErr_Occurred ())
 		*out_value = NULL;
-	      Py_DECREF (result);
 	      result = NULL;
 	    }
 	}
@@ -237,32 +215,31 @@ pretty_print_one_value (PyObject *printe
     }
   END_CATCH
 
-  return result;
+  return result.release ();
 }
 
 /* Return the display hint for the object printer, PRINTER.  Return
    NULL if there is no display_hint method, or if the method did not
    return a string.  On error, print stack trace and return NULL.  On
    success, return an xmalloc()d string.  */
-char *
+gdb::unique_xmalloc_ptr<char>
 gdbpy_get_display_hint (PyObject *printer)
 {
-  PyObject *hint;
-  char *result = NULL;
+  gdb::unique_xmalloc_ptr<char> result;
 
   if (! PyObject_HasAttr (printer, gdbpy_display_hint_cst))
     return NULL;
 
-  hint = PyObject_CallMethodObjArgs (printer, gdbpy_display_hint_cst, NULL);
-  if (hint)
+  gdbpy_ref<> hint (PyObject_CallMethodObjArgs (printer, gdbpy_display_hint_cst,
+						NULL));
+  if (hint != NULL)
     {
-      if (gdbpy_is_string (hint))
+      if (gdbpy_is_string (hint.get ()))
 	{
-	  result = python_string_to_host_string (hint);
+	  result = python_string_to_host_string (hint.get ());
 	  if (result == NULL)
 	    gdbpy_print_stack ();
 	}
-      Py_DECREF (hint);
     }
   else
     gdbpy_print_stack ();
@@ -277,24 +254,22 @@ print_stack_unless_memory_error (struct 
 {
   if (PyErr_ExceptionMatches (gdbpy_gdb_memory_error))
     {
-      struct cleanup *cleanup;
       PyObject *type, *value, *trace;
-      char *msg;
 
       PyErr_Fetch (&type, &value, &trace);
-      cleanup = make_cleanup_py_decref (type);
-      make_cleanup_py_decref (value);
-      make_cleanup_py_decref (trace);
 
-      msg = gdbpy_exception_to_string (type, value);
-      make_cleanup (xfree, msg);
+      gdbpy_ref<> type_ref (type);
+      gdbpy_ref<> value_ref (value);
+      gdbpy_ref<> trace_ref (trace);
+
+      gdb::unique_xmalloc_ptr<char>
+	msg (gdbpy_exception_to_string (type, value));
 
       if (msg == NULL || *msg == '\0')
 	fprintf_filtered (stream, _("<error reading variable>"));
       else
-	fprintf_filtered (stream, _("<error reading variable: %s>"), msg);
-
-      do_cleanups (cleanup);
+	fprintf_filtered (stream, _("<error reading variable: %s>"),
+			  msg.get ());
     }
   else
     gdbpy_print_stack ();
@@ -311,50 +286,44 @@ print_string_repr (PyObject *printer, co
 		   struct gdbarch *gdbarch)
 {
   struct value *replacement = NULL;
-  PyObject *py_str = NULL;
   enum string_repr_result result = string_repr_ok;
 
-  py_str = pretty_print_one_value (printer, &replacement);
-  if (py_str)
+  gdbpy_ref<> py_str (pretty_print_one_value (printer, &replacement));
+  if (py_str != NULL)
     {
-      struct cleanup *cleanup = make_cleanup_py_decref (py_str);
-
       if (py_str == Py_None)
 	result = string_repr_none;
-      else if (gdbpy_is_lazy_string (py_str))
+      else if (gdbpy_is_lazy_string (py_str.get ()))
 	{
 	  CORE_ADDR addr;
 	  long length;
 	  struct type *type;
-	  char *encoding = NULL;
+	  gdb::unique_xmalloc_ptr<char> encoding;
 	  struct value_print_options local_opts = *options;
 
-	  make_cleanup (free_current_contents, &encoding);
-	  gdbpy_extract_lazy_string (py_str, &addr, &type,
+	  gdbpy_extract_lazy_string (py_str.get (), &addr, &type,
 				     &length, &encoding);
 
 	  local_opts.addressprint = 0;
-	  val_print_string (type, encoding, addr, (int) length,
+	  val_print_string (type, encoding.get (), addr, (int) length,
 			    stream, &local_opts);
 	}
       else
 	{
-	  PyObject *string;
-
-	  string = python_string_to_target_python_string (py_str);
-	  if (string)
+	  gdbpy_ref<> string
+	    (python_string_to_target_python_string (py_str.get ()));
+	  if (string != NULL)
 	    {
 	      char *output;
 	      long length;
 	      struct type *type;
 
-	      make_cleanup_py_decref (string);
 #ifdef IS_PY3K
-	      output = PyBytes_AS_STRING (string);
-	      length = PyBytes_GET_SIZE (string);
+	      output = PyBytes_AS_STRING (string.get ());
+	      length = PyBytes_GET_SIZE (string.get ());
 #else
-	      output = PyString_AsString (string);
-	      length = PyString_Size (string);
+	      output = PyString_AsString (string.get ());
+	      length = PyString_Size (string.get ());
 #endif
 	      type = builtin_type (gdbarch)->builtin_char;
 
@@ -370,8 +339,6 @@ print_string_repr (PyObject *printer, co
 	      print_stack_unless_memory_error (stream);
 	    }
 	}
-
-      do_cleanups (cleanup);
     }
   else if (replacement)
     {
@@ -390,80 +357,84 @@ print_string_repr (PyObject *printer, co
 }
 
 #ifndef IS_PY3K
-static void
-py_restore_tstate (void *p)
-{
-  PyFrameObject *frame = p;
-  PyThreadState *tstate = PyThreadState_GET ();
-
-  tstate->frame = frame;
-}
 
 /* Create a dummy PyFrameObject, needed to work around
    a Python-2.4 bug with generators.  */
-static PyObject *
-push_dummy_python_frame (void)
+class dummy_python_frame
 {
-  PyObject *empty_string, *null_tuple, *globals;
-  PyCodeObject *code;
-  PyFrameObject *frame;
-  PyThreadState *tstate;
+ public:
 
-  empty_string = PyString_FromString ("");
-  if (!empty_string)
-    return NULL;
+  dummy_python_frame ();
 
-  null_tuple = PyTuple_New (0);
-  if (!null_tuple)
-    {
-      Py_DECREF (empty_string);
-      return NULL;
-    }
+  ~dummy_python_frame ()
+  {
+    if (m_valid)
+      m_tstate->frame = m_saved_frame;
+  }
 
-  code = PyCode_New (0,			/* argcount */
-		     0,			/* nlocals */
-		     0,			/* stacksize */
-		     0,			/* flags */
-		     empty_string,	/* code */
-		     null_tuple,	/* consts */
-		     null_tuple,	/* names */
-		     null_tuple,	/* varnames */
-#if PYTHON_API_VERSION >= 1010
-		     null_tuple,	/* freevars */
-		     null_tuple,	/* cellvars */
-#endif
-		     empty_string,	/* filename */
-		     empty_string,	/* name */
-		     1,			/* firstlineno */
-		     empty_string	/* lnotab */
-		    );
+  bool failed () const
+  {
+    return !m_valid;
+  }
 
-  Py_DECREF (empty_string);
-  Py_DECREF (null_tuple);
+ private:
 
-  if (!code)
-    return NULL;
+  bool m_valid;
+  PyFrameObject *m_saved_frame;
+  gdbpy_ref<> m_frame;
+  PyThreadState *m_tstate;
+};
+
+dummy_python_frame::dummy_python_frame ()
+: m_valid (false),
+  m_saved_frame (NULL),
+  m_tstate (NULL)
+{
+  PyCodeObject *code;
+  PyFrameObject *frame;
 
-  globals = PyDict_New ();
-  if (!globals)
-    {
-      Py_DECREF (code);
-      return NULL;
-    }
+  gdbpy_ref<> empty_string (PyString_FromString (""));
+  if (empty_string == NULL)
+    return;
 
-  tstate = PyThreadState_GET ();
+  gdbpy_ref<> null_tuple (PyTuple_New (0));
+  if (null_tuple == NULL)
+    return;
 
-  frame = PyFrame_New (tstate, code, globals, NULL);
+  code = PyCode_New (0,			  /* argcount */
+		     0,			  /* locals */
+		     0,			  /* stacksize */
+		     0,			  /* flags */
+		     empty_string.get (), /* code */
+		     null_tuple.get (),	  /* consts */
+		     null_tuple.get (),	  /* names */
+		     null_tuple.get (),	  /* varnames */
+#if PYTHON_API_VERSION >= 1010
+		     null_tuple.get (),	  /* freevars */
+		     null_tuple.get (),	  /* cellvars */
+#endif
+		     empty_string.get (), /* filename */
+		     empty_string.get (), /* name */
+		     1,			  /* firstlineno */
+		     empty_string.get ()  /* lnotab */
+		     );
+  if (code == NULL)
+    return;
+  gdbpy_ref<> code_holder ((PyObject *) code);
 
-  Py_DECREF (globals);
-  Py_DECREF (code);
+  gdbpy_ref<> globals (PyDict_New ());
+  if (globals == NULL)
+    return;
 
-  if (!frame)
-    return NULL;
+  m_tstate = PyThreadState_GET ();
+  frame = PyFrame_New (m_tstate, code, globals.get (), NULL);
+  if (frame == NULL)
+    return;
 
-  tstate->frame = frame;
-  make_cleanup (py_restore_tstate, frame->f_back);
-  return (PyObject *) frame;
+  m_frame.reset ((PyObject *) frame);
+  m_tstate->frame = frame;
+  m_saved_frame = frame->f_back;
+  m_valid = true;
 }
 #endif
 
@@ -479,11 +450,6 @@ print_children (PyObject *printer, const
 {
   int is_map, is_array, done_flag, pretty;
   unsigned int i;
-  PyObject *children, *iter;
-#ifndef IS_PY3K
-  PyObject *frame;
-#endif
-  struct cleanup *cleanups;
 
   if (! PyObject_HasAttr (printer, gdbpy_children_cst))
     return;
@@ -493,23 +459,20 @@ print_children (PyObject *printer, const
   is_map = hint && ! strcmp (hint, "map");
   is_array = hint && ! strcmp (hint, "array");
 
-  children = PyObject_CallMethodObjArgs (printer, gdbpy_children_cst,
-					 NULL);
-  if (! children)
+  gdbpy_ref<> children (PyObject_CallMethodObjArgs (printer, gdbpy_children_cst,
+						    NULL));
+  if (children == NULL)
     {
       print_stack_unless_memory_error (stream);
       return;
     }
 
-  cleanups = make_cleanup_py_decref (children);
-
-  iter = PyObject_GetIter (children);
-  if (!iter)
+  gdbpy_ref<> iter (PyObject_GetIter (children.get ()));
+  if (iter == NULL)
     {
       print_stack_unless_memory_error (stream);
-      goto done;
+      return;
     }
-  make_cleanup_py_decref (iter);
 
   /* Use the prettyformat_arrays option if we are printing an array,
      and the pretty option otherwise.  */
@@ -527,23 +490,22 @@ print_children (PyObject *printer, const
      where it insists on having a non-NULL tstate->frame when
      a generator is called.  */
 #ifndef IS_PY3K
-  frame = push_dummy_python_frame ();
-  if (!frame)
+  dummy_python_frame frame;
+  if (frame.failed ())
     {
       gdbpy_print_stack ();
-      goto done;
+      return;
     }
-  make_cleanup_py_decref (frame);
 #endif
 
   done_flag = 0;
   for (i = 0; i < options->print_max; ++i)
     {
-      PyObject *py_v, *item = PyIter_Next (iter);
+      PyObject *py_v;
       const char *name;
-      struct cleanup *inner_cleanup;
 
-      if (! item)
+      gdbpy_ref<> item (PyIter_Next (iter.get ()));
+      if (item == NULL)
 	{
 	  if (PyErr_Occurred ())
 	    print_stack_unless_memory_error (stream);
@@ -554,16 +516,15 @@ print_children (PyObject *printer, const
 	  break;
 	}
 
-      if (! PyTuple_Check (item) || PyTuple_Size (item) != 2)
+      if (! PyTuple_Check (item.get ()) || PyTuple_Size (item.get ()) != 2)
 	{
 	  PyErr_SetString (PyExc_TypeError,
 			   _("Result of children iterator not a tuple"
 			     " of two elements."));
 	  gdbpy_print_stack ();
-	  Py_DECREF (item);
 	  continue;
 	}
-      if (! PyArg_ParseTuple (item, "sO", &name, &py_v))
+      if (! PyArg_ParseTuple (item.get (), "sO", &name, &py_v))
 	{
 	  /* The user won't necessarily get a stack trace here, so provide
 	     more context.  */
@@ -571,10 +532,8 @@ print_children (PyObject *printer, const
 	    fprintf_unfiltered (gdb_stderr,
 				_("Bad result from children iterator.\n"));
 	  gdbpy_print_stack ();
-	  Py_DECREF (item);
 	  continue;
 	}
-      inner_cleanup = make_cleanup_py_decref (item);
 
       /* Print initial "{".  For other elements, there are three
 	 cases:
@@ -635,28 +594,24 @@ print_children (PyObject *printer, const
 	  CORE_ADDR addr;
 	  struct type *type;
 	  long length;
-	  char *encoding = NULL;
+	  gdb::unique_xmalloc_ptr<char> encoding;
 	  struct value_print_options local_opts = *options;
 
-	  make_cleanup (free_current_contents, &encoding);
 	  gdbpy_extract_lazy_string (py_v, &addr, &type, &length, &encoding);
 
 	  local_opts.addressprint = 0;
-	  val_print_string (type, encoding, addr, (int) length, stream,
+	  val_print_string (type, encoding.get (), addr, (int) length, stream,
 			    &local_opts);
 	}
       else if (gdbpy_is_string (py_v))
 	{
-	  char *output;
+	  gdb::unique_xmalloc_ptr<char> output;
 
 	  output = python_string_to_host_string (py_v);
 	  if (!output)
 	    gdbpy_print_stack ();
 	  else
-	    {
-	      fputs_filtered (output, stream);
-	      xfree (output);
-	    }
+	    fputs_filtered (output.get (), stream);
 	}
       else
 	{
@@ -673,8 +628,6 @@ print_children (PyObject *printer, const
 
       if (is_map && i % 2 == 0)
 	fputs_filtered ("] = ", stream);
-
-      do_cleanups (inner_cleanup);
     }
 
   if (i)
@@ -695,28 +648,21 @@ print_children (PyObject *printer, const
 	}
       fputs_filtered ("}", stream);
     }
-
- done:
-  do_cleanups (cleanups);
 }
 
 enum ext_lang_rc
 gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang,
-				struct type *type, const gdb_byte *valaddr,
-				int embedded_offset, CORE_ADDR address,
+				struct type *type,
+				LONGEST embedded_offset, CORE_ADDR address,
 				struct ui_file *stream, int recurse,
-				const struct value *val,
+				struct value *val,
 				const struct value_print_options *options,
 				const struct language_defn *language)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
-  PyObject *printer = NULL;
-  PyObject *val_obj = NULL;
   struct value *value;
-  char *hint = NULL;
-  struct cleanup *cleanups;
-  enum ext_lang_rc result = EXT_LANG_RC_NOP;
   enum string_repr_result print_result;
+  const gdb_byte *valaddr = value_contents_for_printing (val);
 
   /* No pretty-printer support for unavailable values.  */
   if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
@@ -725,64 +671,42 @@ gdbpy_apply_val_pretty_printer (const st
   if (!gdb_python_initialized)
     return EXT_LANG_RC_NOP;
 
-  cleanups = ensure_python_env (gdbarch, language);
+  gdbpy_enter enter_py (gdbarch, language);
 
   /* Instantiate the printer.  */
-  if (valaddr)
-    valaddr += embedded_offset;
-  value = value_from_contents_and_address (type, valaddr,
-					   address + embedded_offset);
-
-  set_value_component_location (value, val);
-  /* set_value_component_location resets the address, so we may
-     need to set it again.  */
-  if (VALUE_LVAL (value) != lval_internalvar
-      && VALUE_LVAL (value) != lval_internalvar_component
-      && VALUE_LVAL (value) != lval_computed)
-    set_value_address (value, address + embedded_offset);
+  value = value_from_component (val, type, embedded_offset);
 
-  val_obj = value_to_value_object (value);
-  if (! val_obj)
+  gdbpy_ref<> val_obj (value_to_value_object (value));
+  if (val_obj == NULL)
     {
-      result = EXT_LANG_RC_ERROR;
-      goto done;
+      print_stack_unless_memory_error (stream);
+      return EXT_LANG_RC_ERROR;
     }
 
   /* Find the constructor.  */
-  printer = find_pretty_printer (val_obj);
-  Py_DECREF (val_obj);
-
+  gdbpy_ref<> printer (find_pretty_printer (val_obj.get ()));
   if (printer == NULL)
     {
-      result = EXT_LANG_RC_ERROR;
-      goto done;
+      print_stack_unless_memory_error (stream);
+      return EXT_LANG_RC_ERROR;
     }
 
-  make_cleanup_py_decref (printer);
   if (printer == Py_None)
-    {
-      result = EXT_LANG_RC_NOP;
-      goto done;
-    }
+    return EXT_LANG_RC_NOP;
 
   /* If we are printing a map, we want some special formatting.  */
-  hint = gdbpy_get_display_hint (printer);
-  make_cleanup (free_current_contents, &hint);
+  gdb::unique_xmalloc_ptr<char> hint (gdbpy_get_display_hint (printer.get ()));
 
   /* Print the section */
-  print_result = print_string_repr (printer, hint, stream, recurse,
-				    options, language, gdbarch);
+  print_result = print_string_repr (printer.get (), hint.get (), stream,
+				    recurse, options, language, gdbarch);
   if (print_result != string_repr_error)
-    print_children (printer, hint, stream, recurse, options, language,
-		    print_result == string_repr_none);
+    print_children (printer.get (), hint.get (), stream, recurse, options,
+		    language, print_result == string_repr_none);
 
-  result = EXT_LANG_RC_OK;
-
- done:
   if (PyErr_Occurred ())
     print_stack_unless_memory_error (stream);
-  do_cleanups (cleanups);
-  return result;
+  return EXT_LANG_RC_OK;
 }
 
 
@@ -818,9 +742,6 @@ apply_varobj_pretty_printer (PyObject *p
 PyObject *
 gdbpy_get_varobj_pretty_printer (struct value *value)
 {
-  PyObject *val_obj;
-  PyObject *pretty_printer = NULL;
-
   TRY
     {
       value = value_copy (value);
@@ -831,13 +752,11 @@ gdbpy_get_varobj_pretty_printer (struct 
     }
   END_CATCH
 
-  val_obj = value_to_value_object (value);
-  if (! val_obj)
+  gdbpy_ref<> val_obj (value_to_value_object (value));
+  if (val_obj == NULL)
     return NULL;
 
-  pretty_printer = find_pretty_printer (val_obj);
-  Py_DECREF (val_obj);
-  return pretty_printer;
+  return find_pretty_printer (val_obj.get ());
 }
 
 /* A Python function which wraps find_pretty_printer and instantiates
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-progspace.c ./gdb/python/py-progspace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-progspace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-progspace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to program spaces.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "objfiles.h"
 #include "language.h"
 #include "arch-utils.h"
+#include "py-ref.h"
 
 typedef struct
 {
@@ -71,9 +72,7 @@ pspy_get_filename (PyObject *self, void 
       struct objfile *objfile = obj->pspace->symfile_object_file;
 
       if (objfile)
-	return PyString_Decode (objfile_name (objfile),
-				strlen (objfile_name (objfile)),
-				host_charset (), NULL);
+	return host_string_to_python_string (objfile_name (objfile));
     }
   Py_RETURN_NONE;
 }
@@ -99,7 +98,10 @@ static int
 pspy_initialize (pspace_object *self)
 {
   self->pspace = NULL;
-  self->dict = NULL;
+
+  self->dict = PyDict_New ();
+  if (self->dict == NULL)
+    return 0;
 
   self->printers = PyList_New (0);
   if (self->printers == NULL)
@@ -127,18 +129,15 @@ pspy_initialize (pspace_object *self)
 static PyObject *
 pspy_new (PyTypeObject *type, PyObject *args, PyObject *keywords)
 {
-  pspace_object *self = (pspace_object *) type->tp_alloc (type, 0);
+  gdbpy_ref<pspace_object> self ((pspace_object *) type->tp_alloc (type, 0));
 
-  if (self)
+  if (self != NULL)
     {
-      if (!pspy_initialize (self))
-	{
-	  Py_DECREF (self);
-	  return NULL;
-	}
+      if (!pspy_initialize (self.get ()))
+	return NULL;
     }
 
-  return (PyObject *) self;
+  return (PyObject *) self.release ();
 }
 
 PyObject *
@@ -322,8 +321,6 @@ pspy_set_type_printers (PyObject *o, PyO
 static void
 py_free_pspace (struct program_space *pspace, void *datum)
 {
-  struct cleanup *cleanup;
-  pspace_object *object = datum;
   /* This is a fiction, but we're in a nasty spot: The pspace is in the
      process of being deleted, we can't rely on anything in it.  Plus
      this is one time when the current program space and current inferior
@@ -335,10 +332,9 @@ py_free_pspace (struct program_space *ps
      being deleted.  */
   struct gdbarch *arch = target_gdbarch ();
 
-  cleanup = ensure_python_env (arch, current_language);
+  gdbpy_enter enter_py (arch, current_language);
+  gdbpy_ref<pspace_object> object ((pspace_object *) datum);
   object->pspace = NULL;
-  Py_DECREF ((PyObject *) object);
-  do_cleanups (cleanup);
 }
 
 /* Return a borrowed reference to the Python object of type Pspace
@@ -349,26 +345,22 @@ py_free_pspace (struct program_space *ps
 PyObject *
 pspace_to_pspace_object (struct program_space *pspace)
 {
-  pspace_object *object;
-
-  object = program_space_data (pspace, pspy_pspace_data_key);
-  if (!object)
+  gdbpy_ref<pspace_object> object
+    ((pspace_object *) program_space_data (pspace, pspy_pspace_data_key));
+  if (object == NULL)
     {
-      object = PyObject_New (pspace_object, &pspace_object_type);
-      if (object)
+      object.reset (PyObject_New (pspace_object, &pspace_object_type));
+      if (object != NULL)
 	{
-	  if (!pspy_initialize (object))
-	    {
-	      Py_DECREF (object);
-	      return NULL;
-	    }
+	  if (!pspy_initialize (object.get ()))
+	    return NULL;
 
 	  object->pspace = pspace;
-	  set_program_space_data (pspace, pspy_pspace_data_key, object);
+	  set_program_space_data (pspace, pspy_pspace_data_key, object.get ());
 	}
     }
 
-  return (PyObject *) object;
+  return (PyObject *) object.release ();
 }
 
 int
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-btrace.c ./gdb/python/py-record-btrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-btrace.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-record-btrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,1001 @@
+/* Python interface to btrace instruction history.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
+#include "gdbthread.h"
+#include "btrace.h"
+#include "py-record-btrace.h"
+#include "disasm.h"
+
+#if defined (IS_PY3K)
+
+#define BTPY_PYSLICE(x) (x)
+
+#else
+
+#define BTPY_PYSLICE(x) ((PySliceObject *) x)
+
+#endif
+
+#define BTPY_REQUIRE_VALID_INSN(obj, iter)				\
+    do {								\
+      struct thread_info *tinfo = find_thread_ptid (obj->ptid);		\
+      if (tinfo == NULL || btrace_is_empty (tinfo))			\
+	return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));\
+      if (0 == btrace_find_insn_by_number (&iter, &tinfo->btrace,	\
+					   obj->number))		\
+	return PyErr_Format (gdbpy_gdb_error, _("No such instruction."));\
+    } while (0)
+
+#define BTPY_REQUIRE_VALID_CALL(obj, iter)				\
+    do {								\
+      struct thread_info *tinfo = find_thread_ptid (obj->ptid);		\
+      if (tinfo == NULL || btrace_is_empty (tinfo))			\
+	return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));\
+      if (0 == btrace_find_call_by_number (&iter, &tinfo->btrace,	\
+					   obj->number))		\
+	return PyErr_Format (gdbpy_gdb_error, _("No such call segment."));\
+    } while (0)
+
+/* This can either be a btrace instruction or a function call segment,
+   depending on the chosen type.  */
+
+typedef struct {
+  PyObject_HEAD
+
+  /* The thread this object belongs to.  */
+  ptid_t ptid;
+
+  /* Instruction number or function call segment number, depending on the type
+     of this object.  */
+  Py_ssize_t number;
+} btpy_object;
+
+/* Python object for btrace record lists.  */
+
+typedef struct {
+  PyObject_HEAD
+
+  /* The thread this list belongs to.  */
+  ptid_t ptid;
+
+  /* The first index being part of this list.  */
+  Py_ssize_t first;
+
+  /* The last index begin part of this list.  */
+  Py_ssize_t last;
+
+  /* Stride size.  */
+  Py_ssize_t step;
+
+  /* Either &BTPY_CALL_TYPE or &BTPY_INSN_TYPE.  */
+  PyTypeObject* element_type;
+} btpy_list_object;
+
+/* Python type for btrace instructions.  */
+
+static PyTypeObject btpy_insn_type = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+};
+
+/* Python type for btrace function-calls.  */
+
+static PyTypeObject btpy_call_type = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+};
+
+/* Python type for btrace lists.  */
+
+static PyTypeObject btpy_list_type = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+};
+
+/* Create a new gdb.BtraceInstruction or gdb.BtraceFunctionCall object,
+   depending on TYPE.  */
+
+static PyObject *
+btpy_new (ptid_t ptid, Py_ssize_t number, PyTypeObject* type)
+{
+  btpy_object * const obj = PyObject_New (btpy_object, type);
+
+  if (obj == NULL)
+    return NULL;
+
+  obj->ptid = ptid;
+  obj->number = number;
+
+  return (PyObject *) obj;
+}
+
+/* Create a new gdb.BtraceInstruction object.  */
+
+static PyObject *
+btpy_insn_new (ptid_t ptid, Py_ssize_t number)
+{
+  return btpy_new (ptid, number, &btpy_insn_type);
+}
+
+/* Create a new gdb.BtraceFunctionCall object.  */
+
+static PyObject *
+btpy_call_new (ptid_t ptid, Py_ssize_t number)
+{
+  return btpy_new (ptid, number, &btpy_call_type);
+}
+
+/* Create a new gdb.BtraceList object.  */
+
+static PyObject *
+btpy_list_new (ptid_t ptid, Py_ssize_t first, Py_ssize_t last, Py_ssize_t step,
+	       PyTypeObject *element_type)
+{
+  btpy_list_object * const obj = PyObject_New (btpy_list_object,
+					       &btpy_list_type);
+
+  if (obj == NULL)
+    return NULL;
+
+  obj->ptid = ptid;
+  obj->first = first;
+  obj->last = last;
+  obj->step = step;
+  obj->element_type = element_type;
+
+  return (PyObject *) obj;
+}
+
+/* Implementation of BtraceInstruction.number [int] and
+   BtraceFunctionCall.number [int].  */
+
+static PyObject *
+btpy_number (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+
+  return PyInt_FromSsize_t (obj->number);
+}
+
+/* Implementation of BtraceInstruction.__hash__ () -> int and
+   BtraceFunctionCall.__hash__ () -> int.  */
+
+static Py_hash_t
+btpy_hash (PyObject *self)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+
+  return obj->number;
+}
+
+/* Implementation of BtraceInstruction.error [int].  Returns the
+   error code for gaps.  */
+
+static PyObject *
+btpy_insn_error (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  struct btrace_insn_iterator iter;
+  int error;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  error = btrace_insn_get_error (&iter);
+
+  if (error == 0)
+    Py_RETURN_NONE;
+
+  return PyInt_FromLong (error);
+}
+
+/* Implementation of BtraceInstruction.sal [gdb.Symtab_and_line].
+   Return the SAL associated with this instruction.  */
+
+static PyObject *
+btpy_insn_sal (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+  PyObject *result = NULL;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    Py_RETURN_NONE;
+
+  TRY
+    {
+      result = symtab_and_line_to_sal_object (find_pc_line (insn->pc, 0));
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      GDB_PY_HANDLE_EXCEPTION (except);
+    }
+  END_CATCH
+
+  return result;
+}
+
+/* Implementation of BtraceInstruction.pc [int].  Returns
+   the instruction address.  */
+
+static PyObject *
+btpy_insn_pc (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    Py_RETURN_NONE;
+
+  return gdb_py_long_from_ulongest (insn->pc);
+}
+
+/* Implementation of BtraceInstruction.size [int].  Returns
+   the instruction size.  */
+
+static PyObject *
+btpy_insn_size (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    Py_RETURN_NONE;
+
+  return PyInt_FromLong (insn->size);
+}
+
+/* Implementation of BtraceInstruction.is_speculative [bool].
+   Returns if this instruction was executed speculatively.  */
+
+static PyObject *
+btpy_insn_is_speculative (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    Py_RETURN_NONE;
+
+  if (insn->flags & BTRACE_INSN_FLAG_SPECULATIVE)
+    Py_RETURN_TRUE;
+  else
+    Py_RETURN_FALSE;
+}
+
+/* Implementation of BtraceInstruction.data [buffer].
+   Returns raw instruction data.  */
+
+static PyObject *
+btpy_insn_data (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+  gdb_byte *buffer = NULL;
+  PyObject *object;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    Py_RETURN_NONE;
+
+  TRY
+    {
+      buffer = (gdb_byte *) xmalloc (insn->size);
+      read_memory (insn->pc, buffer, insn->size);
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      xfree (buffer);
+      GDB_PY_HANDLE_EXCEPTION (except);
+    }
+  END_CATCH
+
+  object = PyBytes_FromStringAndSize ((const char*) buffer, insn->size);
+  xfree (buffer);
+
+  if (object == NULL)
+    return NULL;
+
+  return PyMemoryView_FromObject (object);
+}
+
+/* Implementation of BtraceInstruction.decode [str].  Returns
+   the instruction as human readable string.  */
+
+static PyObject *
+btpy_insn_decode (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_insn *insn;
+  struct btrace_insn_iterator iter;
+  string_file strfile;
+
+  BTPY_REQUIRE_VALID_INSN (obj, iter);
+
+  insn = btrace_insn_get (&iter);
+  if (insn == NULL)
+    {
+      int error_code = btrace_insn_get_error (&iter);
+      const struct btrace_config *config;
+
+      config = btrace_conf (&find_thread_ptid (obj->ptid)->btrace);
+      return PyBytes_FromString (btrace_decode_error (config->format,
+						      error_code));
+    }
+
+  TRY
+    {
+      gdb_print_insn (target_gdbarch (), insn->pc, &strfile, NULL);
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      gdbpy_convert_exception (except);
+      return NULL;
+    }
+  END_CATCH
+
+
+  return PyBytes_FromString (strfile.string ().c_str ());
+}
+
+/* Implementation of BtraceFunctionCall.level [int].  Returns the
+   call level.  */
+
+static PyObject *
+btpy_call_level (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  return PyInt_FromLong (iter.btinfo->level + func->level);
+}
+
+/* Implementation of BtraceFunctionCall.symbol [gdb.Symbol].  Returns
+   the symbol associated with this function call.  */
+
+static PyObject *
+btpy_call_symbol (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  if (func->sym == NULL)
+    Py_RETURN_NONE;
+
+  return symbol_to_symbol_object (func->sym);
+}
+
+/* Implementation of BtraceFunctionCall.instructions [list].
+   Return the list of instructions that belong to this function call.  */
+
+static PyObject *
+btpy_call_instructions (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+  unsigned int len;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  len = VEC_length (btrace_insn_s, func->insn);
+
+  /* Gaps count as one instruction.  */
+  if (len == 0)
+    len = 1;
+
+  return btpy_list_new (obj->ptid, func->insn_offset, func->insn_offset + len,
+			1, &btpy_insn_type);
+}
+
+/* Implementation of BtraceFunctionCall.up [gdb.BtraceRecordCall].
+   Return the caller / returnee of this function.  */
+
+static PyObject *
+btpy_call_up (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  if (func->up == NULL)
+    Py_RETURN_NONE;
+
+  return btpy_call_new (obj->ptid, func->up->number);
+}
+
+/* Implementation of BtraceFunctionCall.prev_sibling [BtraceFunctionCall].
+   Return a previous segment of this function.  */
+
+static PyObject *
+btpy_call_prev_sibling (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  if (func->segment.prev == NULL)
+    Py_RETURN_NONE;
+
+  return btpy_call_new (obj->ptid, func->segment.prev->number);
+}
+
+/* Implementation of BtraceFunctionCall.next_sibling [BtraceFunctionCall].
+   Return a following segment of this function.  */
+
+static PyObject *
+btpy_call_next_sibling (PyObject *self, void *closure)
+{
+  const btpy_object * const obj = (btpy_object *) self;
+  const struct btrace_function *func;
+  struct btrace_call_iterator iter;
+
+  BTPY_REQUIRE_VALID_CALL (obj, iter);
+
+  func = btrace_call_get (&iter);
+  if (func == NULL)
+    Py_RETURN_NONE;
+
+  if (func->segment.next == NULL)
+    Py_RETURN_NONE;
+
+  return btpy_call_new (obj->ptid, func->segment.next->number);
+}
+
+/* Python rich compare function to allow for equality and inequality checks
+   in Python.  */
+
+static PyObject *
+btpy_richcompare (PyObject *self, PyObject *other, int op)
+{
+  const btpy_object * const obj1 = (btpy_object *) self;
+  const btpy_object * const obj2 = (btpy_object *) other;
+
+  if (Py_TYPE (self) != Py_TYPE (other))
+    {
+      Py_INCREF (Py_NotImplemented);
+      return Py_NotImplemented;
+    }
+
+  switch (op)
+  {
+    case Py_EQ:
+      if (ptid_equal (obj1->ptid, obj2->ptid) && obj1->number == obj2->number)
+	Py_RETURN_TRUE;
+      else
+	Py_RETURN_FALSE;
+
+    case Py_NE:
+      if (!ptid_equal (obj1->ptid, obj2->ptid) || obj1->number != obj2->number)
+	Py_RETURN_TRUE;
+      else
+	Py_RETURN_FALSE;
+
+    default:
+      break;
+  }
+
+  Py_INCREF (Py_NotImplemented);
+  return Py_NotImplemented;
+}
+
+/* Implementation of BtraceList.__len__ (self) -> int.  */
+
+static Py_ssize_t
+btpy_list_length (PyObject *self)
+{
+  const btpy_list_object * const obj = (btpy_list_object *) self;
+  const Py_ssize_t distance = obj->last - obj->first;
+  const Py_ssize_t result = distance / obj->step;
+
+  if ((distance % obj->step) == 0)
+    return result;
+
+  return result + 1;
+}
+
+/* Implementation of
+   BtraceList.__getitem__ (self, key) -> BtraceInstruction and
+   BtraceList.__getitem__ (self, key) -> BtraceFunctionCall.  */
+
+static PyObject *
+btpy_list_item (PyObject *self, Py_ssize_t index)
+{
+  const btpy_list_object * const obj = (btpy_list_object *) self;
+  struct thread_info * const tinfo = find_thread_ptid (obj->ptid);
+
+  if (index < 0 || index >= btpy_list_length (self))
+    return PyErr_Format (PyExc_IndexError, _("Index out of range: %zd."),
+			 index);
+
+  return btpy_new (obj->ptid, obj->first + (obj->step * index),
+		   obj->element_type);
+}
+
+/* Implementation of BtraceList.__getitem__ (self, slice) -> BtraceList.  */
+
+static PyObject *
+btpy_list_slice (PyObject *self, PyObject *value)
+{
+  const btpy_list_object * const obj = (btpy_list_object *) self;
+  const Py_ssize_t length = btpy_list_length (self);
+  Py_ssize_t start, stop, step, slicelength;
+
+  if (PyInt_Check (value))
+    {
+      Py_ssize_t index = PyInt_AsSsize_t (value);
+
+      /* Emulate Python behavior for negative indices.  */
+      if (index < 0)
+	index += length;
+
+      return btpy_list_item (self, index);
+    }
+
+  if (!PySlice_Check (value))
+    return PyErr_Format (PyExc_TypeError, _("Index must be int or slice."));
+
+  if (0 != PySlice_GetIndicesEx (BTPY_PYSLICE (value), length, &start, &stop,
+				 &step, &slicelength))
+    return NULL;
+
+  return btpy_list_new (obj->ptid, obj->first + obj->step * start,
+			obj->first + obj->step * stop, obj->step * step,
+			obj->element_type);
+}
+
+/* Helper function that returns the position of an element in a BtraceList
+   or -1 if the element is not in the list.  */
+
+static LONGEST
+btpy_list_position (PyObject *self, PyObject *value)
+{
+  const btpy_list_object * const list_obj = (btpy_list_object *) self;
+  const btpy_object * const obj = (btpy_object *) value;
+  Py_ssize_t index = obj->number;
+
+  if (list_obj->element_type != Py_TYPE (value))
+    return -1;
+
+  if (!ptid_equal (list_obj->ptid, obj->ptid))
+    return -1;
+
+  if (index < list_obj->first || index > list_obj->last)
+    return -1;
+
+  index -= list_obj->first;
+
+  if (index % list_obj->step != 0)
+    return -1;
+
+  return index / list_obj->step;
+}
+
+/* Implementation of "in" operator for BtraceLists.  */
+
+static int
+btpy_list_contains (PyObject *self, PyObject *value)
+{
+  if (btpy_list_position (self, value) < 0)
+    return 0;
+
+  return 1;
+}
+
+/* Implementation of BtraceLists.index (self, value) -> int.  */
+
+static PyObject *
+btpy_list_index (PyObject *self, PyObject *value)
+{
+  const LONGEST index = btpy_list_position (self, value);
+
+  if (index < 0)
+    return PyErr_Format (PyExc_ValueError, _("Not in list."));
+
+  return gdb_py_long_from_longest (index);
+}
+
+/* Implementation of BtraceList.count (self, value) -> int.  */
+
+static PyObject *
+btpy_list_count (PyObject *self, PyObject *value)
+{
+  /* We know that if an element is in the list, it is so exactly one time,
+     enabling us to reuse the "is element of" check.  */
+  return PyInt_FromLong (btpy_list_contains (self, value));
+}
+
+/* Python rich compare function to allow for equality and inequality checks
+   in Python.  */
+
+static PyObject *
+btpy_list_richcompare (PyObject *self, PyObject *other, int op)
+{
+  const btpy_list_object * const obj1 = (btpy_list_object *) self;
+  const btpy_list_object * const obj2 = (btpy_list_object *) other;
+
+  if (Py_TYPE (self) != Py_TYPE (other))
+    {
+      Py_INCREF (Py_NotImplemented);
+      return Py_NotImplemented;
+    }
+
+  switch (op)
+  {
+    case Py_EQ:
+      if (ptid_equal (obj1->ptid, obj2->ptid)
+	  && obj1->element_type == obj2->element_type
+	  && obj1->first == obj2->first
+	  && obj1->last == obj2->last
+	  && obj1->step == obj2->step)
+	Py_RETURN_TRUE;
+      else
+	Py_RETURN_FALSE;
+
+    case Py_NE:
+      if (!ptid_equal (obj1->ptid, obj2->ptid)
+	  || obj1->element_type != obj2->element_type
+	  || obj1->first != obj2->first
+	  || obj1->last != obj2->last
+	  || obj1->step != obj2->step)
+	Py_RETURN_TRUE;
+      else
+	Py_RETURN_FALSE;
+
+    default:
+      break;
+  }
+
+  Py_INCREF (Py_NotImplemented);
+  return Py_NotImplemented;
+}
+
+/* Implementation of
+   BtraceRecord.method [str].  */
+
+PyObject *
+recpy_bt_method (PyObject *self, void *closure)
+{
+  return PyString_FromString ("btrace");
+}
+
+/* Implementation of
+   BtraceRecord.format [str].  */
+
+PyObject *
+recpy_bt_format (PyObject *self, void *closure)
+{
+  const struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+  const struct btrace_config * config;
+
+  if (tinfo == NULL)
+    Py_RETURN_NONE;
+
+  config = btrace_conf (&tinfo->btrace);
+
+  if (config == NULL)
+    Py_RETURN_NONE;
+
+  return PyString_FromString (btrace_format_short_string (config->format));
+}
+
+/* Implementation of
+   BtraceRecord.replay_position [BtraceInstruction].  */
+
+PyObject *
+recpy_bt_replay_position (PyObject *self, void *closure)
+{
+  const struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+
+  if (tinfo == NULL)
+    Py_RETURN_NONE;
+
+  if (tinfo->btrace.replay == NULL)
+    Py_RETURN_NONE;
+
+  return btpy_insn_new (inferior_ptid,
+			btrace_insn_number (tinfo->btrace.replay));
+}
+
+/* Implementation of
+   BtraceRecord.begin [BtraceInstruction].  */
+
+PyObject *
+recpy_bt_begin (PyObject *self, void *closure)
+{
+  struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+  struct btrace_insn_iterator iterator;
+
+  if (tinfo == NULL)
+    Py_RETURN_NONE;
+
+  btrace_fetch (tinfo);
+
+  if (btrace_is_empty (tinfo))
+    Py_RETURN_NONE;
+
+  btrace_insn_begin (&iterator, &tinfo->btrace);
+  return btpy_insn_new (inferior_ptid, btrace_insn_number (&iterator));
+}
+
+/* Implementation of
+   BtraceRecord.end [BtraceInstruction].  */
+
+PyObject *
+recpy_bt_end (PyObject *self, void *closure)
+{
+  struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+  struct btrace_insn_iterator iterator;
+
+  if (tinfo == NULL)
+    Py_RETURN_NONE;
+
+  btrace_fetch (tinfo);
+
+  if (btrace_is_empty (tinfo))
+    Py_RETURN_NONE;
+
+  btrace_insn_end (&iterator, &tinfo->btrace);
+  return btpy_insn_new (inferior_ptid, btrace_insn_number (&iterator));
+}
+
+/* Implementation of
+   BtraceRecord.instruction_history [list].  */
+
+PyObject *
+recpy_bt_instruction_history (PyObject *self, void *closure)
+{
+  struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+  struct btrace_insn_iterator iterator;
+  unsigned long first = 0;
+  unsigned long last = 0;
+
+   if (tinfo == NULL)
+     Py_RETURN_NONE;
+
+   btrace_fetch (tinfo);
+
+   if (btrace_is_empty (tinfo))
+     Py_RETURN_NONE;
+
+   btrace_insn_begin (&iterator, &tinfo->btrace);
+   first = btrace_insn_number (&iterator);
+
+   btrace_insn_end (&iterator, &tinfo->btrace);
+   last = btrace_insn_number (&iterator);
+
+   return btpy_list_new (inferior_ptid, first, last, 1, &btpy_insn_type);
+}
+
+/* Implementation of
+   BtraceRecord.function_call_history [list].  */
+
+PyObject *
+recpy_bt_function_call_history (PyObject *self, void *closure)
+{
+    struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+    struct btrace_call_iterator iterator;
+    unsigned long first = 0;
+    unsigned long last = 0;
+
+    if (tinfo == NULL)
+      Py_RETURN_NONE;
+
+    btrace_fetch (tinfo);
+
+    if (btrace_is_empty (tinfo))
+      Py_RETURN_NONE;
+
+    btrace_call_begin (&iterator, &tinfo->btrace);
+    first = btrace_call_number (&iterator);
+
+    btrace_call_end (&iterator, &tinfo->btrace);
+    last = btrace_call_number (&iterator);
+
+    return btpy_list_new (inferior_ptid, first, last, 1, &btpy_call_type);
+}
+
+/* Implementation of BtraceRecord.goto (self, BtraceInstruction) -> None.  */
+
+PyObject *
+recpy_bt_goto (PyObject *self, PyObject *args)
+{
+  struct thread_info * const tinfo = find_thread_ptid (inferior_ptid);
+  const btpy_object *obj;
+
+  if (tinfo == NULL || btrace_is_empty (tinfo))
+	return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));
+
+  if (!PyArg_ParseTuple (args, "O", &obj))
+    return NULL;
+
+  if (Py_TYPE (obj) != &btpy_insn_type)
+    return PyErr_Format (PyExc_TypeError, _("Argument must be instruction."));
+
+  TRY
+    {
+      struct btrace_insn_iterator iter;
+
+      btrace_insn_end (&iter, &tinfo->btrace);
+
+      if (btrace_insn_number (&iter) == obj->number)
+	target_goto_record_end ();
+      else
+	target_goto_record (obj->number);
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      GDB_PY_HANDLE_EXCEPTION (except);
+    }
+  END_CATCH
+
+  Py_RETURN_NONE;
+}
+
+/* BtraceInstruction members.  */
+
+struct PyGetSetDef btpy_insn_getset[] =
+{
+  { "number", btpy_number, NULL, "instruction number", NULL},
+  { "error", btpy_insn_error, NULL, "error number for gaps", NULL},
+  { "sal", btpy_insn_sal, NULL, "associated symbol and line", NULL},
+  { "pc", btpy_insn_pc, NULL, "instruction address", NULL},
+  { "data", btpy_insn_data, NULL, "raw instruction data", NULL},
+  { "decoded", btpy_insn_decode, NULL, "decoded instruction or error message \
+if the instruction is a gap", NULL},
+  { "size", btpy_insn_size, NULL, "instruction size in byte", NULL},
+  { "is_speculative", btpy_insn_is_speculative, NULL, "if the instruction was \
+executed speculatively", NULL},
+  {NULL}
+};
+
+/* BtraceFunctionCall members.  */
+
+static PyGetSetDef btpy_call_getset[] =
+{
+  { "number", btpy_number, NULL, "function call number", NULL},
+  { "level", btpy_call_level, NULL, "call stack level", NULL},
+  { "symbol", btpy_call_symbol, NULL, "associated line and symbol", NULL},
+  { "instructions", btpy_call_instructions, NULL, "list of instructions in \
+this function segment", NULL},
+  { "up", btpy_call_up, NULL, "caller or returned-to function segment", NULL},
+  { "prev_sibling", btpy_call_prev_sibling, NULL, "previous segment of this \
+function", NULL},
+  { "next_sibling", btpy_call_next_sibling, NULL, "next segment of this \
+function", NULL},
+  {NULL}
+};
+
+/* BtraceList methods.  */
+
+struct PyMethodDef btpy_list_methods[] =
+{
+  { "count", btpy_list_count, METH_O, "count number of occurences"},
+  { "index", btpy_list_index, METH_O, "index of entry"},
+  {NULL}
+};
+
+/* BtraceList sequence methods.  */
+
+static PySequenceMethods btpy_list_sequence_methods =
+{
+  NULL
+};
+
+/* BtraceList mapping methods.  Necessary for slicing.  */
+
+static PyMappingMethods btpy_list_mapping_methods =
+{
+  NULL
+};
+
+/* Sets up the btrace record API.  */
+
+int
+gdbpy_initialize_btrace (void)
+{
+  btpy_insn_type.tp_new = PyType_GenericNew;
+  btpy_insn_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  btpy_insn_type.tp_basicsize = sizeof (btpy_object);
+  btpy_insn_type.tp_name = "gdb.BtraceInstruction";
+  btpy_insn_type.tp_doc = "GDB btrace instruction object";
+  btpy_insn_type.tp_getset = btpy_insn_getset;
+  btpy_insn_type.tp_richcompare = btpy_richcompare;
+  btpy_insn_type.tp_hash = btpy_hash;
+
+  btpy_call_type.tp_new = PyType_GenericNew;
+  btpy_call_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  btpy_call_type.tp_basicsize = sizeof (btpy_object);
+  btpy_call_type.tp_name = "gdb.BtraceFunctionCall";
+  btpy_call_type.tp_doc = "GDB btrace call object";
+  btpy_call_type.tp_getset = btpy_call_getset;
+  btpy_call_type.tp_richcompare = btpy_richcompare;
+  btpy_call_type.tp_hash = btpy_hash;
+
+  btpy_list_type.tp_new = PyType_GenericNew;
+  btpy_list_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  btpy_list_type.tp_basicsize = sizeof (btpy_list_object);
+  btpy_list_type.tp_name = "gdb.BtraceObjectList";
+  btpy_list_type.tp_doc = "GDB btrace list object";
+  btpy_list_type.tp_methods = btpy_list_methods;
+  btpy_list_type.tp_as_sequence = &btpy_list_sequence_methods;
+  btpy_list_type.tp_as_mapping = &btpy_list_mapping_methods;
+  btpy_list_type.tp_richcompare = btpy_list_richcompare;
+
+  btpy_list_sequence_methods.sq_item = btpy_list_item;
+  btpy_list_sequence_methods.sq_length = btpy_list_length;
+  btpy_list_sequence_methods.sq_contains = btpy_list_contains;
+
+  btpy_list_mapping_methods.mp_subscript = btpy_list_slice;
+
+  if (PyType_Ready (&btpy_insn_type) < 0
+      || PyType_Ready (&btpy_call_type) < 0
+      || PyType_Ready (&btpy_list_type) < 0)
+    return -1;
+  else
+    return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-btrace.h ./gdb/python/py-record-btrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-btrace.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-record-btrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,49 @@
+/* Python interface to btrace record targets.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_PY_RECORD_BTRACE_H
+#define GDB_PY_RECORD_BTRACE_H
+
+#include "python-internal.h"
+
+/* Implementation of record.method [str].  */
+extern PyObject *recpy_bt_method (PyObject *self, void *closure);
+
+/* Implementation of record.format [str].  */
+extern PyObject *recpy_bt_format (PyObject *self, void *closure);
+
+/* Implementation of record.goto (instruction) -> None.  */
+extern PyObject *recpy_bt_goto (PyObject *self, PyObject *value);
+
+/* Implementation of record.instruction_history [list].  */
+extern PyObject *recpy_bt_instruction_history (PyObject *self, void *closure);
+
+/* Implementation of record.function_call_history [list].  */
+extern PyObject *recpy_bt_function_call_history (PyObject *self, void *closure);
+
+/* Implementation of record.replay_position [instruction].  */
+extern PyObject *recpy_bt_replay_position (PyObject *self, void *closure);
+
+/* Implementation of record.begin [instruction].  */
+extern PyObject *recpy_bt_begin (PyObject *self, void *closure);
+
+/* Implementation of record.end [instruction].  */
+extern PyObject *recpy_bt_end (PyObject *self, void *closure);
+
+#endif /* GDB_PY_RECORD_BTRACE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record.c ./gdb/python/py-record.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-record.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,275 @@
+/* Python interface to record targets.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "record.h"
+#include "python-internal.h"
+#include "py-record-btrace.h"
+#include "py-record-full.h"
+#include "target.h"
+
+/* Python Record object.  */
+
+typedef struct
+{
+  PyObject_HEAD
+
+  /* The ptid this object refers to.  */
+  ptid_t ptid;
+
+  /* The current recording method.  */
+  enum record_method method;
+} recpy_record_object;
+
+/* Python Record type.  */
+
+static PyTypeObject recpy_record_type = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+};
+
+/* Implementation of record.ptid.  */
+
+static PyObject *
+recpy_ptid (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  return gdbpy_create_ptid_object (obj->ptid);
+}
+
+/* Implementation of record.method.  */
+
+static PyObject *
+recpy_method (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_FULL)
+    return recpy_full_method (self, closure);
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_method (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.format.  */
+
+static PyObject *
+recpy_format (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_FULL)
+    return recpy_full_format (self, closure);
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_format (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.goto (instruction) -> None.  */
+
+static PyObject *
+recpy_goto (PyObject *self, PyObject *value)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_goto (self, value);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.replay_position [instruction]  */
+
+static PyObject *
+recpy_replay_position (PyObject *self, void *closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_replay_position (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.instruction_history [list].  */
+
+static PyObject *
+recpy_instruction_history (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_instruction_history (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.function_call_history [list].  */
+
+static PyObject *
+recpy_function_call_history (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_function_call_history (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.begin [instruction].  */
+
+static PyObject *
+recpy_begin (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_begin (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Implementation of record.end [instruction].  */
+
+static PyObject *
+recpy_end (PyObject *self, void* closure)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_end (self, closure);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
+/* Record method list.  */
+
+static PyMethodDef recpy_record_methods[] = {
+  { "goto", recpy_goto, METH_VARARGS,
+    "goto (instruction|function_call) -> None.\n\
+Rewind to given location."},
+  { NULL }
+};
+
+/* Record member list.  */
+
+static PyGetSetDef recpy_record_getset[] = {
+  { "ptid", recpy_ptid, NULL, "Current thread.", NULL },
+  { "method", recpy_method, NULL, "Current recording method.", NULL },
+  { "format", recpy_format, NULL, "Current recording format.", NULL },
+  { "replay_position", recpy_replay_position, NULL, "Current replay position.",
+    NULL },
+  { "instruction_history", recpy_instruction_history, NULL,
+    "List of instructions in current recording.", NULL },
+  { "function_call_history", recpy_function_call_history, NULL,
+    "List of function calls in current recording.", NULL },
+  { "begin", recpy_begin, NULL,
+    "First instruction in current recording.", NULL },
+  { "end", recpy_end, NULL,
+    "One past the last instruction in current recording.  This is typically \
+the current instruction and is used for e.g. record.goto (record.end).", NULL },
+  { NULL }
+};
+
+/* Sets up the record API in the gdb module.  */
+
+int
+gdbpy_initialize_record (void)
+{
+  recpy_record_type.tp_new = PyType_GenericNew;
+  recpy_record_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  recpy_record_type.tp_basicsize = sizeof (recpy_record_object);
+  recpy_record_type.tp_name = "gdb.Record";
+  recpy_record_type.tp_doc = "GDB record object";
+  recpy_record_type.tp_methods = recpy_record_methods;
+  recpy_record_type.tp_getset = recpy_record_getset;
+
+  return PyType_Ready (&recpy_record_type);
+}
+
+/* Implementation of gdb.start_recording (method) -> gdb.Record.  */
+
+PyObject *
+gdbpy_start_recording (PyObject *self, PyObject *args)
+{
+  const char *method = NULL;
+  const char *format = NULL;
+  PyObject *ret = NULL;
+
+  if (!PyArg_ParseTuple (args, "|ss", &method, &format))
+    return NULL;
+
+  TRY
+    {
+      record_start (method, format, 0);
+      ret = gdbpy_current_recording (self, args);
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      gdbpy_convert_exception (except);
+    }
+  END_CATCH
+
+  return ret;
+}
+
+/* Implementation of gdb.current_recording (self) -> gdb.Record.  */
+
+PyObject *
+gdbpy_current_recording (PyObject *self, PyObject *args)
+{
+  recpy_record_object *ret = NULL;
+
+  if (find_record_target () == NULL)
+    Py_RETURN_NONE;
+
+  ret = PyObject_New (recpy_record_object, &recpy_record_type);
+  ret->ptid = inferior_ptid;
+  ret->method = target_record_method (inferior_ptid);
+
+  return (PyObject *) ret;
+}
+
+/* Implementation of gdb.stop_recording (self) -> None.  */
+
+PyObject *
+gdbpy_stop_recording (PyObject *self, PyObject *args)
+{
+  PyObject *ret = NULL;
+
+  TRY
+    {
+      record_stop (0);
+      ret = Py_None;
+      Py_INCREF (Py_None);
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      gdbpy_convert_exception (except);
+    }
+  END_CATCH
+
+  return ret;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-full.c ./gdb/python/py-record-full.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-full.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-record-full.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+/* Python interface to btrace instruction history.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "py-record-full.h"
+
+/* Implementation of
+   BtraceRecord.method [str].  */
+
+PyObject *
+recpy_full_method (PyObject *self, void *closure)
+{
+  return PyString_FromString ("full");
+}
+
+/* Implementation of
+   BtraceRecord.format [str].  */
+
+PyObject *
+recpy_full_format (PyObject *self, void *closure)
+{
+  return PyString_FromString ("full");
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-full.h ./gdb/python/py-record-full.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-record-full.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-record-full.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+/* Python interface to full record targets.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_PY_RECORD_FULL_H
+#define GDB_PY_RECORD_FULL_H
+
+#include "python-internal.h"
+
+/* Implementation of record.method [str].  */
+extern PyObject *recpy_full_method (PyObject *self, void *value);
+
+/* Implementation of record.format [str].  */
+extern PyObject *recpy_full_format (PyObject *self, void *value);
+
+#endif /* GDB_PY_RECORD_FULL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-ref.h ./gdb/python/py-ref.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-ref.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/python/py-ref.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,45 @@
+/* Python reference-holding class
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_PYTHON_REF_H
+#define GDB_PYTHON_REF_H
+
+#include "common/gdb_ref_ptr.h"
+
+/* A policy class for gdb::ref_ptr for Python reference counting.  */
+template<typename T>
+struct gdbpy_ref_policy
+{
+  static void incref (T *ptr)
+  {
+    Py_INCREF (ptr);
+  }
+
+  static void decref (T *ptr)
+  {
+    Py_DECREF (ptr);
+  }
+};
+
+/* A gdb::ref_ptr that has been specialized for Python objects or
+   their "subclasses".  */
+template<typename T = PyObject> using gdbpy_ref
+  = gdb::ref_ptr<T, gdbpy_ref_policy<T>>;
+
+#endif /* GDB_PYTHON_REF_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-signalevent.c ./gdb/python/py-signalevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-signalevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-signalevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior signal stop events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,30 +27,23 @@ PyObject *
 create_signal_event_object (enum gdb_signal stop_signal)
 {
   const char *signal_name;
-  PyObject *signal_name_obj = NULL;
-  PyObject *signal_event_obj =
-      create_stop_event_object (&signal_event_object_type);
+  gdbpy_ref<> signal_event_obj
+    (create_stop_event_object (&signal_event_object_type));
 
-  if (!signal_event_obj)
-    goto fail;
+  if (signal_event_obj == NULL)
+    return NULL;
 
   signal_name = gdb_signal_to_name (stop_signal);
 
-  signal_name_obj = PyString_FromString (signal_name);
+  gdbpy_ref<> signal_name_obj (PyString_FromString (signal_name));
   if (signal_name_obj == NULL)
-    goto fail;
-  if (evpy_add_attribute (signal_event_obj,
+    return NULL;
+  if (evpy_add_attribute (signal_event_obj.get (),
                           "stop_signal",
-                          signal_name_obj) < 0)
-    goto fail;
-  Py_DECREF (signal_name_obj);
-
-  return signal_event_obj;
-
- fail:
-  Py_XDECREF (signal_name_obj);
-  Py_XDECREF (signal_event_obj);
-  return NULL;
+                          signal_name_obj.get ()) < 0)
+    return NULL;
+
+  return signal_event_obj.release ();
 }
 
 GDBPY_NEW_EVENT_TYPE (signal,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-stopevent.c ./gdb/python/py-stopevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-stopevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-stopevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior stop events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,16 +23,7 @@
 PyObject *
 create_stop_event_object (PyTypeObject *py_type)
 {
-  PyObject *stop_event_obj = create_thread_event_object (py_type);
-
-  if (!stop_event_obj)
-    goto fail;
-
-  return stop_event_obj;
-
-  fail:
-   Py_XDECREF (stop_event_obj);
-   return NULL;
+  return create_thread_event_object (py_type);
 }
 
 /* Callback observers when a stop event occurs.  This function will create a
@@ -45,8 +36,8 @@ create_stop_event_object (PyTypeObject *
 int
 emit_stop_event (struct bpstats *bs, enum gdb_signal stop_signal)
 {
-  PyObject *stop_event_obj = NULL; /* Appease GCC warning.  */
-  PyObject *list = NULL;
+  gdbpy_ref<> stop_event_obj;
+  gdbpy_ref<> list;
   PyObject *first_bp = NULL;
   struct bpstats *current_bs;
 
@@ -64,13 +55,13 @@ emit_stop_event (struct bpstats *bs, enu
 
           if (list == NULL)
             {
-              list = PyList_New (0);
-              if (!list)
-                goto fail;
+              list.reset (PyList_New (0));
+              if (list == NULL)
+		return -1;
             }
 
-          if (PyList_Append (list, current_py_bp))
-            goto fail;
+          if (PyList_Append (list.get (), current_py_bp))
+	    return -1;
 
           if (first_bp == NULL)
             first_bp = current_py_bp;
@@ -79,36 +70,31 @@ emit_stop_event (struct bpstats *bs, enu
 
   if (list != NULL)
     {
-      stop_event_obj = create_breakpoint_event_object (list, first_bp);
-      if (!stop_event_obj)
-        goto fail;
-      Py_DECREF (list);
+      stop_event_obj.reset (create_breakpoint_event_object (list.get (),
+							    first_bp));
+      if (stop_event_obj == NULL)
+	return -1;
     }
 
   /* Check if the signal is "Signal 0" or "Trace/breakpoint trap".  */
   if (stop_signal != GDB_SIGNAL_0
       && stop_signal != GDB_SIGNAL_TRAP)
     {
-      stop_event_obj =
-	  create_signal_event_object (stop_signal);
-      if (!stop_event_obj)
-	goto fail;
+      stop_event_obj.reset (create_signal_event_object (stop_signal));
+      if (stop_event_obj == NULL)
+	return -1;
     }
 
   /* If all fails emit an unknown stop event.  All event types should
      be known and this should eventually be unused.  */
-  if (!stop_event_obj)
+  if (stop_event_obj == NULL)
     {
-      stop_event_obj = create_stop_event_object (&stop_event_object_type);
-      if (!stop_event_obj)
-        goto fail;
+      stop_event_obj.reset (create_stop_event_object (&stop_event_object_type));
+      if (stop_event_obj == NULL)
+	return -1;
     }
 
-  return evpy_emit_event (stop_event_obj, gdb_py_events.stop);
-
- fail:
-  Py_XDECREF (list);
-  return -1;
+  return evpy_emit_event (stop_event_obj.get (), gdb_py_events.stop);
 }
 
 GDBPY_NEW_EVENT_TYPE (stop,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-stopevent.h ./gdb/python/py-stopevent.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-stopevent.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-stopevent.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to inferior events.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-symbol.c ./gdb/python/py-symbol.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-symbol.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-symbol.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to symbols.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 #include "symtab.h"
 #include "python-internal.h"
 #include "objfiles.h"
+#include "py-ref.h"
 
 typedef struct sympy_symbol_object {
   PyObject_HEAD
@@ -278,7 +279,11 @@ sympy_value (PyObject *self, PyObject *a
       if (symbol_read_needs_frame (symbol) && frame_info == NULL)
 	error (_("symbol requires a frame to compute its value"));
 
-      value = read_var_value (symbol, frame_info);
+      /* TODO: currently, we have no way to recover the block in which SYMBOL
+	 was found, so we have no block to pass to read_var_value.  This will
+	 yield an incorrect value when symbol is not local to FRAME_INFO (this
+	 can happen with nested functions).  */
+      value = read_var_value (symbol, NULL, frame_info);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -304,7 +309,8 @@ set_symbol (symbol_object *obj, struct s
     {
       struct objfile *objfile = symbol_objfile (symbol);
 
-      obj->next = objfile_data (objfile, sympy_objfile_data_key);
+      obj->next = ((struct sympy_symbol_object *)
+		   objfile_data (objfile, sympy_objfile_data_key));
       if (obj->next)
 	obj->next->prev = obj;
       set_objfile_data (objfile, sympy_objfile_data_key, obj);
@@ -369,7 +375,7 @@ gdbpy_lookup_symbol (PyObject *self, PyO
   const char *name;
   static char *keywords[] = { "name", "block", "domain", NULL };
   struct symbol *symbol = NULL;
-  PyObject *block_obj = NULL, *ret_tuple, *sym_obj, *bool_obj;
+  PyObject *block_obj = NULL, *sym_obj, *bool_obj;
   const struct block *block = NULL;
 
   if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!i", keywords, &name,
@@ -396,7 +402,8 @@ gdbpy_lookup_symbol (PyObject *self, PyO
 
   TRY
     {
-      symbol = lookup_symbol (name, block, domain, &is_a_field_of_this);
+      symbol = lookup_symbol (name, block, (domain_enum) domain,
+			      &is_a_field_of_this).symbol;
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -404,31 +411,28 @@ gdbpy_lookup_symbol (PyObject *self, PyO
     }
   END_CATCH
 
-  ret_tuple = PyTuple_New (2);
-  if (!ret_tuple)
+  gdbpy_ref<> ret_tuple (PyTuple_New (2));
+  if (ret_tuple == NULL)
     return NULL;
 
   if (symbol)
     {
       sym_obj = symbol_to_symbol_object (symbol);
       if (!sym_obj)
-	{
-	  Py_DECREF (ret_tuple);
-	  return NULL;
-	}
+	return NULL;
     }
   else
     {
       sym_obj = Py_None;
       Py_INCREF (Py_None);
     }
-  PyTuple_SET_ITEM (ret_tuple, 0, sym_obj);
+  PyTuple_SET_ITEM (ret_tuple.get (), 0, sym_obj);
 
   bool_obj = (is_a_field_of_this.type != NULL) ? Py_True : Py_False;
   Py_INCREF (bool_obj);
-  PyTuple_SET_ITEM (ret_tuple, 1, bool_obj);
+  PyTuple_SET_ITEM (ret_tuple.get (), 1, bool_obj);
 
-  return ret_tuple;
+  return ret_tuple.release ();
 }
 
 /* Implementation of
@@ -449,7 +453,7 @@ gdbpy_lookup_global_symbol (PyObject *se
 
   TRY
     {
-      symbol = lookup_global_symbol (name, NULL, domain);
+      symbol = lookup_global_symbol (name, NULL, (domain_enum) domain).symbol;
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -480,7 +484,7 @@ gdbpy_lookup_global_symbol (PyObject *se
 static void
 del_objfile_symbols (struct objfile *objfile, void *datum)
 {
-  symbol_object *obj = datum;
+  symbol_object *obj = (symbol_object *) datum;
   while (obj)
     {
       symbol_object *next = obj->next;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-symtab.c ./gdb/python/py-symtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-symtab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-symtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to symbol tables.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "python-internal.h"
 #include "objfiles.h"
 #include "block.h"
+#include "py-ref.h"
 
 typedef struct stpy_symtab_object {
   PyObject_HEAD
@@ -108,8 +109,7 @@ stpy_get_filename (PyObject *self, void 
   STPY_REQUIRE_VALID (self, symtab);
   filename = symtab_to_filename_for_display (symtab);
 
-  str_obj = PyString_Decode (filename, strlen (filename),
-			     host_charset (), NULL);
+  str_obj = host_string_to_python_string (filename);
   return str_obj;
 }
 
@@ -140,8 +140,7 @@ stpy_get_producer (PyObject *self, void 
     {
       const char *producer = COMPUNIT_PRODUCER (cust);
 
-      return PyString_Decode (producer, strlen (producer),
-			      host_charset (), NULL);
+      return host_string_to_python_string (producer);
     }
 
   Py_RETURN_NONE;
@@ -157,7 +156,7 @@ stpy_fullname (PyObject *self, PyObject 
 
   fullname = symtab_to_fullname (symtab);
 
-  return PyString_Decode (fullname, strlen (fullname), host_charset (), NULL);
+  return host_string_to_python_string (fullname);
 }
 
 /* Implementation of gdb.Symtab.is_valid (self) -> Boolean.
@@ -207,8 +206,8 @@ stpy_static_block (PyObject *self, PyObj
   return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
 }
 
-/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
-   Returns a gdb.Linetable object corresponding to this symbol
+/* Implementation of gdb.Symtab.linetable (self) -> gdb.LineTable.
+   Returns a gdb.LineTable object corresponding to this symbol
    table.  */
 
 static PyObject *
@@ -370,8 +369,9 @@ set_sal (sal_object *sal_obj, struct sym
       Py_INCREF (Py_None);
     }
 
-  sal_obj->sal = xmemdup (&sal, sizeof (struct symtab_and_line),
-			  sizeof (struct symtab_and_line));
+  sal_obj->sal = ((struct symtab_and_line *)
+		  xmemdup (&sal, sizeof (struct symtab_and_line),
+			   sizeof (struct symtab_and_line)));
   sal_obj->symtab = symtab_obj;
   sal_obj->prev = NULL;
 
@@ -379,8 +379,10 @@ set_sal (sal_object *sal_obj, struct sym
      objfile cleanup observer linked list.  */
   if (sal_obj->symtab != (symtab_object *)Py_None)
     {
-      sal_obj->next = objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
-				    salpy_objfile_data_key);
+      sal_obj->next
+	= ((struct salpy_sal_object *)
+	   objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
+			 salpy_objfile_data_key));
       if (sal_obj->next)
 	sal_obj->next->prev = sal_obj;
 
@@ -405,8 +407,9 @@ set_symtab (symtab_object *obj, struct s
   obj->prev = NULL;
   if (symtab)
     {
-      obj->next = objfile_data (SYMTAB_OBJFILE (symtab),
-				stpy_objfile_data_key);
+      obj->next
+	= ((struct stpy_symtab_object *)
+	   objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key));
       if (obj->next)
 	obj->next->prev = obj;
       set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj);
@@ -434,20 +437,14 @@ symtab_to_symtab_object (struct symtab *
 PyObject *
 symtab_and_line_to_sal_object (struct symtab_and_line sal)
 {
-  sal_object *sal_obj;
-  int success = 0;
-
-  sal_obj = PyObject_New (sal_object, &sal_object_type);
-  if (sal_obj)
+  gdbpy_ref<sal_object> sal_obj (PyObject_New (sal_object, &sal_object_type));
+  if (sal_obj != NULL)
     {
-      if (set_sal (sal_obj, sal) < 0)
-	{
-	  Py_DECREF (sal_obj);
-	  return NULL;
-	}
+      if (set_sal (sal_obj.get (), sal) < 0)
+	return NULL;
     }
 
-  return (PyObject *) sal_obj;
+  return (PyObject *) sal_obj.release ();
 }
 
 /* Return struct symtab_and_line reference that is wrapped by this
@@ -477,7 +474,7 @@ symtab_object_to_symtab (PyObject *obj)
 static void
 del_objfile_symtab (struct objfile *objfile, void *datum)
 {
-  symtab_object *obj = datum;
+  symtab_object *obj = (symtab_object *) datum;
 
   while (obj)
     {
@@ -498,7 +495,7 @@ del_objfile_symtab (struct objfile *objf
 static void
 del_objfile_sal (struct objfile *objfile, void *datum)
 {
-  sal_object *obj = datum;
+  sal_object *obj = (sal_object *) datum;
 
   while (obj)
     {
@@ -571,8 +568,8 @@ Return the global block of the symbol ta
     "static_block () -> gdb.Block.\n\
 Return the static block of the symbol table." },
     { "linetable", stpy_get_linetable, METH_NOARGS,
-    "linetable () -> gdb.Linetable.\n\
-Return the Linetable associated with this symbol table" },
+    "linetable () -> gdb.LineTable.\n\
+Return the LineTable associated with this symbol table" },
   {NULL}  /* Sentinel */
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python.c ./gdb/python/python.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/python.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General python/gdb code
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,6 +34,8 @@
 #include "extension-priv.h"
 #include "cli/cli-utils.h"
 #include <ctype.h>
+#include "location.h"
+#include "ser-event.h"
 
 /* Declared constants and enum for python stack printing.  */
 static const char python_excp_none[] = "none";
@@ -97,6 +99,8 @@ const struct extension_language_defn ext
 #include "gdbthread.h"
 #include "interps.h"
 #include "event-top.h"
+#include "py-ref.h"
+#include "py-event.h"
 
 /* True if Python has been successfully initialized, false
    otherwise.  */
@@ -144,7 +148,6 @@ static enum ext_lang_rc gdbpy_apply_type
    const struct ext_lang_type_printers *, struct type *, char **);
 static void gdbpy_free_type_printers (const struct extension_language_defn *,
 				      struct ext_lang_type_printers *);
-static void gdbpy_clear_quit_flag (const struct extension_language_defn *);
 static void gdbpy_set_quit_flag (const struct extension_language_defn *);
 static int gdbpy_check_quit_flag (const struct extension_language_defn *);
 static enum ext_lang_rc gdbpy_before_prompt_hook
@@ -182,7 +185,6 @@ const struct extension_language_ops pyth
   gdbpy_breakpoint_has_cond,
   gdbpy_breakpoint_cond_says_stop,
 
-  gdbpy_clear_quit_flag,
   gdbpy_set_quit_flag,
   gdbpy_check_quit_flag,
 
@@ -201,80 +203,43 @@ const struct extension_language_ops pyth
 struct gdbarch *python_gdbarch;
 const struct language_defn *python_language;
 
-/* Restore global language and architecture and Python GIL state
-   when leaving the Python interpreter.  */
-
-struct python_env
-{
-  struct active_ext_lang_state *previous_active;
-  PyGILState_STATE state;
-  struct gdbarch *gdbarch;
-  const struct language_defn *language;
-  PyObject *error_type, *error_value, *error_traceback;
-};
-
-static void
-restore_python_env (void *p)
-{
-  struct python_env *env = (struct python_env *)p;
-
-  /* Leftover Python error is forbidden by Python Exception Handling.  */
-  if (PyErr_Occurred ())
-    {
-      /* This order is similar to the one calling error afterwards. */
-      gdbpy_print_stack ();
-      warning (_("internal error: Unhandled Python exception"));
-    }
-
-  PyErr_Restore (env->error_type, env->error_value, env->error_traceback);
-
-  PyGILState_Release (env->state);
-  python_gdbarch = env->gdbarch;
-  python_language = env->language;
-
-  restore_active_ext_lang (env->previous_active);
-
-  xfree (env);
-}
-
-/* Called before entering the Python interpreter to install the
-   current language and architecture to be used for Python values.
-   Also set the active extension language for GDB so that SIGINT's
-   are directed our way, and if necessary install the right SIGINT
-   handler.  */
-
-struct cleanup *
-ensure_python_env (struct gdbarch *gdbarch,
-                   const struct language_defn *language)
+gdbpy_enter::gdbpy_enter  (struct gdbarch *gdbarch,
+			   const struct language_defn *language)
+: m_gdbarch (python_gdbarch),
+  m_language (python_language)
 {
-  struct python_env *env = xmalloc (sizeof *env);
-
   /* We should not ever enter Python unless initialized.  */
   if (!gdb_python_initialized)
     error (_("Python not initialized"));
 
-  env->previous_active = set_active_ext_lang (&extension_language_python);
+  m_previous_active = set_active_ext_lang (&extension_language_python);
 
-  env->state = PyGILState_Ensure ();
-  env->gdbarch = python_gdbarch;
-  env->language = python_language;
+  m_state = PyGILState_Ensure ();
 
   python_gdbarch = gdbarch;
   python_language = language;
 
   /* Save it and ensure ! PyErr_Occurred () afterwards.  */
-  PyErr_Fetch (&env->error_type, &env->error_value, &env->error_traceback);
-
-  return make_cleanup (restore_python_env, env);
+  PyErr_Fetch (&m_error_type, &m_error_value, &m_error_traceback);
 }
 
-/* Clear the quit flag.  */
-
-static void
-gdbpy_clear_quit_flag (const struct extension_language_defn *extlang)
+gdbpy_enter::~gdbpy_enter ()
 {
-  /* This clears the flag as a side effect.  */
-  PyOS_InterruptOccurred ();
+  /* Leftover Python error is forbidden by Python Exception Handling.  */
+  if (PyErr_Occurred ())
+    {
+      /* This order is similar to the one calling error afterwards. */
+      gdbpy_print_stack ();
+      warning (_("internal error: Unhandled Python exception"));
+    }
+
+  PyErr_Restore (m_error_type, m_error_value, m_error_traceback);
+
+  PyGILState_Release (m_state);
+  python_gdbarch = m_gdbarch;
+  python_language = m_language;
+
+  restore_active_ext_lang (m_previous_active);
 }
 
 /* Set the quit flag.  */
@@ -300,7 +265,7 @@ gdbpy_check_quit_flag (const struct exte
 static int
 eval_python_command (const char *command)
 {
-  PyObject *m, *d, *v;
+  PyObject *m, *d;
 
   m = PyImport_AddModule ("__main__");
   if (m == NULL)
@@ -309,11 +274,10 @@ eval_python_command (const char *command
   d = PyModule_GetDict (m);
   if (d == NULL)
     return -1;
-  v = PyRun_StringFlags (command, Py_single_input, d, d, NULL);
+  gdbpy_ref<> v (PyRun_StringFlags (command, Py_single_input, d, d, NULL));
   if (v == NULL)
     return -1;
 
-  Py_DECREF (v);
 #ifndef IS_PY3K
   if (Py_FlushLine ())
     PyErr_Clear ();
@@ -327,20 +291,19 @@ eval_python_command (const char *command
 static void
 python_interactive_command (char *arg, int from_tty)
 {
-  struct cleanup *cleanup;
+  struct ui *ui = current_ui;
   int err;
 
-  cleanup = make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   arg = skip_spaces (arg);
 
-  ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   if (arg && *arg)
     {
       int len = strlen (arg);
-      char *script = xmalloc (len + 2);
+      char *script = (char *) xmalloc (len + 2);
 
       strcpy (script, arg);
       script[len] = '\n';
@@ -350,7 +313,7 @@ python_interactive_command (char *arg, i
     }
   else
     {
-      err = PyRun_InteractiveLoop (instream, "<stdin>");
+      err = PyRun_InteractiveLoop (ui->instream, "<stdin>");
       dont_repeat ();
     }
 
@@ -359,8 +322,6 @@ python_interactive_command (char *arg, i
       gdbpy_print_stack ();
       error (_("Error while executing Python code."));
     }
-
-  do_cleanups (cleanup);
 }
 
 /* A wrapper around PyRun_SimpleFile.  FILE is the Python script to run
@@ -388,25 +349,17 @@ python_run_simple_file (FILE *file, cons
 
 #else /* _WIN32 */
 
-  char *full_path;
-  PyObject *python_file;
-  struct cleanup *cleanup;
-
   /* Because we have a string for a filename, and are using Python to
      open the file, we need to expand any tilde in the path first.  */
-  full_path = tilde_expand (filename);
-  cleanup = make_cleanup (xfree, full_path);
-  python_file = PyFile_FromString (full_path, "r");
-  if (! python_file)
+  gdb::unique_xmalloc_ptr<char> full_path (tilde_expand (filename));
+  gdbpy_ref<> python_file (PyFile_FromString (full_path.get (), "r"));
+  if (python_file == NULL)
     {
-      do_cleanups (cleanup);
       gdbpy_print_stack ();
-      error (_("Error while opening file: %s"), full_path);
+      error (_("Error while opening file: %s"), full_path.get ());
     }
 
-  make_cleanup_py_decref (python_file);
-  PyRun_SimpleFile (PyFile_AsFile (python_file), filename);
-  do_cleanups (cleanup);
+  PyRun_SimpleFile (PyFile_AsFile (python_file.get ()), filename);
 
 #endif /* _WIN32 */
 }
@@ -427,7 +380,7 @@ compute_python_string (struct command_li
   for (iter = l; iter; iter = iter->next)
     size += strlen (iter->line) + 1;
 
-  script = xmalloc (size + 1);
+  script = (char *) xmalloc (size + 1);
   here = 0;
   for (iter = l; iter; iter = iter->next)
     {
@@ -450,20 +403,17 @@ gdbpy_eval_from_control_command (const s
 {
   int ret;
   char *script;
-  struct cleanup *cleanup;
 
   if (cmd->body_count != 1)
     error (_("Invalid \"python\" block structure."));
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   script = compute_python_string (cmd->body_list[0]);
   ret = PyRun_SimpleString (script);
   xfree (script);
   if (ret)
     error (_("Error while executing Python code."));
-
-  do_cleanups (cleanup);
 }
 
 /* Implementation of the gdb "python" command.  */
@@ -471,12 +421,9 @@ gdbpy_eval_from_control_command (const s
 static void
 python_command (char *arg, int from_tty)
 {
-  struct cleanup *cleanup;
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
-
-  make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
   arg = skip_spaces (arg);
   if (arg && *arg)
@@ -487,12 +434,11 @@ python_command (char *arg, int from_tty)
   else
     {
       struct command_line *l = get_command_line (python_control, "");
+      struct cleanup *cleanup = make_cleanup_free_command_lines (&l);
 
-      make_cleanup_free_command_lines (&l);
       execute_control_command_untraced (l);
+      do_cleanups (cleanup);
     }
-
-  do_cleanups (cleanup);
 }
 
 
@@ -515,7 +461,7 @@ gdbpy_parameter_value (enum var_types ty
 
 	if (! str)
 	  str = "";
-	return PyString_Decode (str, strlen (str), host_charset (), NULL);
+	return host_string_to_python_string (str);
       }
 
     case var_boolean:
@@ -562,7 +508,7 @@ gdbpy_parameter_value (enum var_types ty
 /* A Python function which returns a gdb parameter's value as a Python
    value.  */
 
-PyObject *
+static PyObject *
 gdbpy_parameter (PyObject *self, PyObject *args)
 {
   struct gdb_exception except = exception_none;
@@ -627,7 +573,6 @@ execute_gdb_command (PyObject *self, PyO
   PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
   int from_tty, to_string;
   static char *keywords[] = {"command", "from_tty", "to_string", NULL };
-  char *result = NULL;
 
   if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg,
 				     &PyBool_Type, &from_tty_obj,
@@ -652,25 +597,28 @@ execute_gdb_command (PyObject *self, PyO
       to_string = cmp;
     }
 
+  std::string to_string_res;
+
   TRY
     {
       /* Copy the argument text in case the command modifies it.  */
-      char *copy = xstrdup (arg);
-      struct cleanup *cleanup = make_cleanup (xfree, copy);
+      std::string copy (arg);
+      struct interp *interp;
+
+      scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
+
+      scoped_restore save_uiout = make_scoped_restore (&current_uiout);
 
-      make_cleanup_restore_integer (&interpreter_async);
-      interpreter_async = 0;
+      /* Use the console interpreter uiout to have the same print format
+	for console or MI.  */
+      interp = interp_lookup (current_ui, "console");
+      current_uiout = interp_ui_out (interp);
 
-      prevent_dont_repeat ();
+      scoped_restore preventer = prevent_dont_repeat ();
       if (to_string)
-	result = execute_command_to_string (copy, from_tty);
+	to_string_res = execute_command_to_string (&copy[0], from_tty);
       else
-	{
-	  result = NULL;
-	  execute_command (copy, from_tty);
-	}
-
-      do_cleanups (cleanup);
+	execute_command (&copy[0], from_tty);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -681,12 +629,8 @@ execute_gdb_command (PyObject *self, PyO
   /* Do any commands attached to breakpoint we stopped at.  */
   bpstat_do_actions ();
 
-  if (result)
-    {
-      PyObject *r = PyString_FromString (result);
-      xfree (result);
-      return r;
-    }
+  if (to_string)
+    return PyString_FromString (to_string_res.c_str ());
   Py_RETURN_NONE;
 }
 
@@ -698,14 +642,14 @@ gdbpy_solib_name (PyObject *self, PyObje
 {
   char *soname;
   PyObject *str_obj;
-  gdb_py_longest pc;
+  gdb_py_ulongest pc;
 
-  if (!PyArg_ParseTuple (args, GDB_PY_LL_ARG, &pc))
+  if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc))
     return NULL;
 
   soname = solib_name_from_address (current_program_space, pc);
   if (soname)
-    str_obj = PyString_Decode (soname, strlen (soname), host_charset (), NULL);
+    str_obj = host_string_to_python_string (soname);
   else
     {
       str_obj = Py_None;
@@ -724,12 +668,11 @@ gdbpy_decode_line (PyObject *self, PyObj
   struct symtabs_and_lines sals = { NULL, 0 }; /* Initialize to
 						  appease gcc.  */
   struct symtab_and_line sal;
-  const char *arg = NULL;
-  char *copy_to_free = NULL, *copy = NULL;
+  char *arg = NULL;
   struct cleanup *cleanups;
-  PyObject *result = NULL;
-  PyObject *return_result = NULL;
-  PyObject *unparsed = NULL;
+  gdbpy_ref<> result;
+  gdbpy_ref<> unparsed;
+  struct event_location *location = NULL;
 
   if (! PyArg_ParseTuple (args, "|s", &arg))
     return NULL;
@@ -738,14 +681,16 @@ gdbpy_decode_line (PyObject *self, PyObj
 
   sals.sals = NULL;
 
+  if (arg != NULL)
+    {
+      location = string_to_event_location_basic (&arg, python_language);
+      make_cleanup_delete_event_location (location);
+    }
+
   TRY
     {
-      if (arg)
-	{
-	  copy = xstrdup (arg);
-	  copy_to_free = copy;
-	  sals = decode_line_1 (&copy, 0, 0, 0);
-	}
+      if (location != NULL)
+	sals = decode_line_1 (location, 0, NULL, NULL, 0);
       else
 	{
 	  set_default_source_symtab_and_line ();
@@ -761,10 +706,7 @@ gdbpy_decode_line (PyObject *self, PyObj
   END_CATCH
 
   if (sals.sals != NULL && sals.sals != &sal)
-    {
-      make_cleanup (xfree, copy_to_free);
-      make_cleanup (xfree, sals.sals);
-    }
+    make_cleanup (xfree, sals.sals);
 
   if (except.reason < 0)
     {
@@ -778,9 +720,12 @@ gdbpy_decode_line (PyObject *self, PyObj
     {
       int i;
 
-      result = PyTuple_New (sals.nelts);
-      if (! result)
-	goto error;
+      result.reset (PyTuple_New (sals.nelts));
+      if (result == NULL)
+	{
+	  do_cleanups (cleanups);
+	  return NULL;
+	}
       for (i = 0; i < sals.nelts; ++i)
 	{
 	  PyObject *obj;
@@ -788,50 +733,47 @@ gdbpy_decode_line (PyObject *self, PyObj
 	  obj = symtab_and_line_to_sal_object (sals.sals[i]);
 	  if (! obj)
 	    {
-	      Py_DECREF (result);
-	      goto error;
+	      do_cleanups (cleanups);
+	      return NULL;
 	    }
 
-	  PyTuple_SetItem (result, i, obj);
+	  PyTuple_SetItem (result.get (), i, obj);
 	}
     }
   else
     {
-      result = Py_None;
+      result.reset (Py_None);
       Py_INCREF (Py_None);
     }
 
-  return_result = PyTuple_New (2);
-  if (! return_result)
+  gdbpy_ref<> return_result (PyTuple_New (2));
+  if (return_result == NULL)
     {
-      Py_DECREF (result);
-      goto error;
+      do_cleanups (cleanups);
+      return NULL;
     }
 
-  if (copy && strlen (copy) > 0)
+  if (arg != NULL && strlen (arg) > 0)
     {
-      unparsed = PyString_FromString (copy);
+      unparsed.reset (PyString_FromString (arg));
       if (unparsed == NULL)
 	{
-	  Py_DECREF (result);
-	  Py_DECREF (return_result);
-	  return_result = NULL;
-	  goto error;
+	  do_cleanups (cleanups);
+	  return NULL;
 	}
     }
   else
     {
-      unparsed = Py_None;
+      unparsed.reset (Py_None);
       Py_INCREF (Py_None);
     }
 
-  PyTuple_SetItem (return_result, 0, unparsed);
-  PyTuple_SetItem (return_result, 1, result);
+  PyTuple_SetItem (return_result.get (), 0, unparsed.release ());
+  PyTuple_SetItem (return_result.get (), 1, result.release ());
 
- error:
   do_cleanups (cleanups);
 
-  return return_result;
+  return return_result.release ();
 }
 
 /* Parse a string and evaluate it as an expression.  */
@@ -887,6 +829,15 @@ gdbpy_find_pc_line (PyObject *self, PyOb
   return result;
 }
 
+/* Implementation of gdb.invalidate_cached_frames.  */
+
+static PyObject *
+gdbpy_invalidate_cached_frames (PyObject *self, PyObject *args)
+{
+  reinit_frame_cache ();
+  Py_RETURN_NONE;
+}
+
 /* Read a file as Python code.
    This is the extension_language_script_ops.script_sourcer "method".
    FILE is the file to load.  FILENAME is name of the file FILE.
@@ -897,11 +848,8 @@ static void
 gdbpy_source_script (const struct extension_language_defn *extlang,
 		     FILE *file, const char *filename)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
   python_run_simple_file (file, filename);
-  do_cleanups (cleanup);
 }
 
 
@@ -922,31 +870,26 @@ static struct gdbpy_event *gdbpy_event_l
 /* The final link of the event list.  */
 static struct gdbpy_event **gdbpy_event_list_end;
 
-/* We use a file handler, and not an async handler, so that we can
-   wake up the main thread even when it is blocked in poll().  */
-static struct serial *gdbpy_event_fds[2];
+/* So that we can wake up the main thread even when it is blocked in
+   poll().  */
+static struct serial_event *gdbpy_serial_event;
 
 /* The file handler callback.  This reads from the internal pipe, and
    then processes the Python event queue.  This will always be run in
    the main gdb thread.  */
 
 static void
-gdbpy_run_events (struct serial *scb, void *context)
+gdbpy_run_events (int error, gdb_client_data client_data)
 {
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
-  /* Flush the fd.  Do this before flushing the events list, so that
-     any new event post afterwards is sure to re-awake the event
+  /* Clear the event fd.  Do this before flushing the events list, so
+     that any new event post afterwards is sure to re-awake the event
      loop.  */
-  while (serial_readchar (gdbpy_event_fds[0], 0) >= 0)
-    ;
+  serial_event_clear (gdbpy_serial_event);
 
   while (gdbpy_event_list)
     {
-      PyObject *call_result;
-
       /* Dispatching the event might push a new element onto the event
 	 loop, so we update here "atomically enough".  */
       struct gdbpy_event *item = gdbpy_event_list;
@@ -955,16 +898,13 @@ gdbpy_run_events (struct serial *scb, vo
 	gdbpy_event_list_end = &gdbpy_event_list;
 
       /* Ignore errors.  */
-      call_result = PyObject_CallObject (item->event, NULL);
+      gdbpy_ref<> call_result (PyObject_CallObject (item->event, NULL));
       if (call_result == NULL)
 	PyErr_Clear ();
 
-      Py_XDECREF (call_result);
       Py_DECREF (item->event);
       xfree (item);
     }
-
-  do_cleanups (cleanup);
 }
 
 /* Submit an event to the gdb thread.  */
@@ -999,12 +939,7 @@ gdbpy_post_event (PyObject *self, PyObje
 
   /* Wake up gdb when needed.  */
   if (wakeup)
-    {
-      char c = 'q';		/* Anything. */
-
-      if (serial_write (gdbpy_event_fds[1], &c, 1))
-        return PyErr_SetFromErrno (PyExc_IOError);
-    }
+    serial_event_set (gdbpy_serial_event);
 
   Py_RETURN_NONE;
 }
@@ -1013,11 +948,11 @@ gdbpy_post_event (PyObject *self, PyObje
 static int
 gdbpy_initialize_events (void)
 {
-  if (serial_pipe (gdbpy_event_fds) == 0)
-    {
-      gdbpy_event_list_end = &gdbpy_event_list;
-      serial_async (gdbpy_event_fds[0], gdbpy_run_events, NULL);
-    }
+  gdbpy_event_list_end = &gdbpy_event_list;
+
+  gdbpy_serial_event = make_serial_event ();
+  add_file_handler (serial_event_fd (gdbpy_serial_event),
+		    gdbpy_run_events, NULL);
 
   return 0;
 }
@@ -1030,78 +965,74 @@ static enum ext_lang_rc
 gdbpy_before_prompt_hook (const struct extension_language_defn *extlang,
 			  const char *current_gdb_prompt)
 {
-  struct cleanup *cleanup;
-  char *prompt = NULL;
-
   if (!gdb_python_initialized)
     return EXT_LANG_RC_NOP;
 
-  cleanup = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
+
+  if (!evregpy_no_listeners_p (gdb_py_events.before_prompt)
+      && evpy_emit_event (NULL, gdb_py_events.before_prompt) < 0)
+    return EXT_LANG_RC_ERROR;
 
   if (gdb_python_module
       && PyObject_HasAttrString (gdb_python_module, "prompt_hook"))
     {
-      PyObject *hook;
-
-      hook = PyObject_GetAttrString (gdb_python_module, "prompt_hook");
+      gdbpy_ref<> hook (PyObject_GetAttrString (gdb_python_module,
+						"prompt_hook"));
       if (hook == NULL)
-	goto fail;
-
-      make_cleanup_py_decref (hook);
-
-      if (PyCallable_Check (hook))
 	{
-	  PyObject *result;
-	  PyObject *current_prompt;
+	  gdbpy_print_stack ();
+	  return EXT_LANG_RC_ERROR;
+	}
 
-	  current_prompt = PyString_FromString (current_gdb_prompt);
+      if (PyCallable_Check (hook.get ()))
+	{
+	  gdbpy_ref<> current_prompt (PyString_FromString (current_gdb_prompt));
 	  if (current_prompt == NULL)
-	    goto fail;
-
-	  result = PyObject_CallFunctionObjArgs (hook, current_prompt, NULL);
-
-	  Py_DECREF (current_prompt);
+	    {
+	      gdbpy_print_stack ();
+	      return EXT_LANG_RC_ERROR;
+	    }
 
+	  gdbpy_ref<> result
+	    (PyObject_CallFunctionObjArgs (hook.get (), current_prompt.get (),
+					   NULL));
 	  if (result == NULL)
-	    goto fail;
-
-	  make_cleanup_py_decref (result);
+	    {
+	      gdbpy_print_stack ();
+	      return EXT_LANG_RC_ERROR;
+	    }
 
 	  /* Return type should be None, or a String.  If it is None,
 	     fall through, we will not set a prompt.  If it is a
 	     string, set  PROMPT.  Anything else, set an exception.  */
-	  if (result != Py_None && ! PyString_Check (result))
+	  if (result != Py_None && ! PyString_Check (result.get ()))
 	    {
 	      PyErr_Format (PyExc_RuntimeError,
 			    _("Return from prompt_hook must " \
 			      "be either a Python string, or None"));
-	      goto fail;
+	      gdbpy_print_stack ();
+	      return EXT_LANG_RC_ERROR;
 	    }
 
 	  if (result != Py_None)
 	    {
-	      prompt = python_string_to_host_string (result);
+	      gdb::unique_xmalloc_ptr<char>
+		prompt (python_string_to_host_string (result.get ()));
 
 	      if (prompt == NULL)
-		goto fail;
-	      else
-		make_cleanup (xfree, prompt);
+		{
+		  gdbpy_print_stack ();
+		  return EXT_LANG_RC_ERROR;
+		}
+
+	      set_prompt (prompt.get ());
+	      return EXT_LANG_RC_OK;
 	    }
 	}
     }
 
-  /* If a prompt has been set, PROMPT will not be NULL.  If it is
-     NULL, do not set the prompt.  */
-  if (prompt != NULL)
-    set_prompt (prompt);
-
-  do_cleanups (cleanup);
-  return prompt != NULL ? EXT_LANG_RC_OK : EXT_LANG_RC_NOP;
-
- fail:
-  gdbpy_print_stack ();
-  do_cleanups (cleanup);
-  return EXT_LANG_RC_ERROR;
+  return EXT_LANG_RC_NOP;
 }
 
 
@@ -1224,13 +1155,13 @@ gdbpy_print_stack (void)
   else
     {
       PyObject *ptype, *pvalue, *ptraceback;
-      char *msg = NULL, *type = NULL;
 
       PyErr_Fetch (&ptype, &pvalue, &ptraceback);
 
       /* Fetch the error message contained within ptype, pvalue.  */
-      msg = gdbpy_exception_to_string (ptype, pvalue);
-      type = gdbpy_obj_to_string (ptype);
+      gdb::unique_xmalloc_ptr<char>
+	msg (gdbpy_exception_to_string (ptype, pvalue));
+      gdb::unique_xmalloc_ptr<char> type (gdbpy_obj_to_string (ptype));
 
       TRY
 	{
@@ -1244,7 +1175,7 @@ gdbpy_print_stack (void)
 	    }
 	  else
 	    fprintf_filtered (gdb_stderr, "Python Exception %s %s: \n",
-			      type, msg);
+			      type.get (), msg.get ());
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
@@ -1254,7 +1185,6 @@ gdbpy_print_stack (void)
       Py_XDECREF (ptype);
       Py_XDECREF (pvalue);
       Py_XDECREF (ptraceback);
-      xfree (msg);
     }
 }
 
@@ -1280,24 +1210,20 @@ static PyObject *
 gdbpy_progspaces (PyObject *unused1, PyObject *unused2)
 {
   struct program_space *ps;
-  PyObject *list;
 
-  list = PyList_New (0);
-  if (!list)
+  gdbpy_ref<> list (PyList_New (0));
+  if (list == NULL)
     return NULL;
 
   ALL_PSPACES (ps)
   {
     PyObject *item = pspace_to_pspace_object (ps);
 
-    if (!item || PyList_Append (list, item) == -1)
-      {
-	Py_DECREF (list);
-	return NULL;
-      }
+    if (!item || PyList_Append (list.get (), item) == -1)
+      return NULL;
   }
 
-  return list;
+  return list.release ();
 }
 
 
@@ -1319,17 +1245,14 @@ gdbpy_source_objfile_script (const struc
 			     struct objfile *objfile, FILE *file,
 			     const char *filename)
 {
-  struct cleanup *cleanups;
-
   if (!gdb_python_initialized)
     return;
 
-  cleanups = ensure_python_env (get_objfile_arch (objfile), current_language);
+  gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
   gdbpy_current_objfile = objfile;
 
   python_run_simple_file (file, filename);
 
-  do_cleanups (cleanups);
   gdbpy_current_objfile = NULL;
 }
 
@@ -1344,17 +1267,14 @@ gdbpy_execute_objfile_script (const stru
 			      struct objfile *objfile, const char *name,
 			      const char *script)
 {
-  struct cleanup *cleanups;
-
   if (!gdb_python_initialized)
     return;
 
-  cleanups = ensure_python_env (get_objfile_arch (objfile), current_language);
+  gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
   gdbpy_current_objfile = objfile;
 
   PyRun_SimpleString (script);
 
-  do_cleanups (cleanups);
   gdbpy_current_objfile = NULL;
 }
 
@@ -1380,24 +1300,20 @@ static PyObject *
 gdbpy_objfiles (PyObject *unused1, PyObject *unused2)
 {
   struct objfile *objf;
-  PyObject *list;
 
-  list = PyList_New (0);
-  if (!list)
+  gdbpy_ref<> list (PyList_New (0));
+  if (list == NULL)
     return NULL;
 
   ALL_OBJFILES (objf)
   {
     PyObject *item = objfile_to_objfile_object (objf);
 
-    if (!item || PyList_Append (list, item) == -1)
-      {
-	Py_DECREF (list);
-	return NULL;
-      }
+    if (!item || PyList_Append (list.get (), item) == -1)
+      return NULL;
   }
 
-  return list;
+  return list.release ();
 }
 
 /* Compute the list of active python type printers and store them in
@@ -1409,38 +1325,33 @@ static void
 gdbpy_start_type_printers (const struct extension_language_defn *extlang,
 			   struct ext_lang_type_printers *ext_printers)
 {
-  struct cleanup *cleanups;
-  PyObject *type_module, *func = NULL, *printers_obj = NULL;
+  PyObject *printers_obj = NULL;
 
   if (!gdb_python_initialized)
     return;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
-  type_module = PyImport_ImportModule ("gdb.types");
+  gdbpy_ref<> type_module (PyImport_ImportModule ("gdb.types"));
   if (type_module == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return;
     }
 
-  func = PyObject_GetAttrString (type_module, "get_type_recognizers");
+  gdbpy_ref<> func (PyObject_GetAttrString (type_module.get (),
+					    "get_type_recognizers"));
   if (func == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return;
     }
 
-  printers_obj = PyObject_CallFunctionObjArgs (func, (char *) NULL);
+  printers_obj = PyObject_CallFunctionObjArgs (func.get (), (char *) NULL);
   if (printers_obj == NULL)
     gdbpy_print_stack ();
   else
     ext_printers->py_type_printers = printers_obj;
-
- done:
-  Py_XDECREF (type_module);
-  Py_XDECREF (func);
-  do_cleanups (cleanups);
 }
 
 /* If TYPE is recognized by some type printer, store in *PRETTIED_TYPE
@@ -1455,11 +1366,8 @@ gdbpy_apply_type_printers (const struct 
 			   const struct ext_lang_type_printers *ext_printers,
 			   struct type *type, char **prettied_type)
 {
-  struct cleanup *cleanups;
-  PyObject *type_obj, *type_module = NULL, *func = NULL;
-  PyObject *result_obj = NULL;
-  PyObject *printers_obj = ext_printers->py_type_printers;
-  char *result = NULL;
+  PyObject *printers_obj = (PyObject *) ext_printers->py_type_printers;
+  gdb::unique_xmalloc_ptr<char> result;
 
   if (printers_obj == NULL)
     return EXT_LANG_RC_NOP;
@@ -1467,53 +1375,52 @@ gdbpy_apply_type_printers (const struct 
   if (!gdb_python_initialized)
     return EXT_LANG_RC_NOP;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
-  type_obj = type_to_type_object (type);
+  gdbpy_ref<> type_obj (type_to_type_object (type));
   if (type_obj == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return EXT_LANG_RC_ERROR;
     }
 
-  type_module = PyImport_ImportModule ("gdb.types");
+  gdbpy_ref<> type_module (PyImport_ImportModule ("gdb.types"));
   if (type_module == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return EXT_LANG_RC_ERROR;
     }
 
-  func = PyObject_GetAttrString (type_module, "apply_type_recognizers");
+  gdbpy_ref<> func (PyObject_GetAttrString (type_module.get (),
+					    "apply_type_recognizers"));
   if (func == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return EXT_LANG_RC_ERROR;
     }
 
-  result_obj = PyObject_CallFunctionObjArgs (func, printers_obj,
-					     type_obj, (char *) NULL);
+  gdbpy_ref<> result_obj (PyObject_CallFunctionObjArgs (func.get (),
+							printers_obj,
+							type_obj.get (),
+							(char *) NULL));
   if (result_obj == NULL)
     {
       gdbpy_print_stack ();
-      goto done;
+      return EXT_LANG_RC_ERROR;
     }
 
-  if (result_obj != Py_None)
+  if (result_obj == Py_None)
+    return EXT_LANG_RC_NOP;
+
+  result = python_string_to_host_string (result_obj.get ());
+  if (result == NULL)
     {
-      result = python_string_to_host_string (result_obj);
-      if (result == NULL)
-	gdbpy_print_stack ();
+      gdbpy_print_stack ();
+      return EXT_LANG_RC_ERROR;
     }
 
- done:
-  Py_XDECREF (type_obj);
-  Py_XDECREF (type_module);
-  Py_XDECREF (func);
-  Py_XDECREF (result_obj);
-  do_cleanups (cleanups);
-  if (result != NULL)
-    *prettied_type = result;
-  return result != NULL ? EXT_LANG_RC_OK : EXT_LANG_RC_ERROR;
+  *prettied_type = result.release ();
+  return EXT_LANG_RC_OK;
 }
 
 /* Free the result of start_type_printers.
@@ -1523,8 +1430,7 @@ static void
 gdbpy_free_type_printers (const struct extension_language_defn *extlang,
 			  struct ext_lang_type_printers *ext_printers)
 {
-  struct cleanup *cleanups;
-  PyObject *printers = ext_printers->py_type_printers;
+  PyObject *printers = (PyObject *) ext_printers->py_type_printers;
 
   if (printers == NULL)
     return;
@@ -1532,9 +1438,8 @@ gdbpy_free_type_printers (const struct e
   if (!gdb_python_initialized)
     return;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
   Py_DECREF (printers);
-  do_cleanups (cleanups);
 }
 
 #else /* HAVE_PYTHON */
@@ -1625,8 +1530,10 @@ finalize_python (void *ignore)
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 extern initialize_file_ftype _initialize_python;
 
-void
-_initialize_python (void)
+#ifdef HAVE_PYTHON
+
+static bool
+do_start_initialization ()
 {
   char *progname;
 #ifdef IS_PY3K
@@ -1636,77 +1543,6 @@ _initialize_python (void)
   wchar_t *progname_copy;
 #endif
 
-  add_com ("python-interactive", class_obscure,
-	   python_interactive_command,
-#ifdef HAVE_PYTHON
-	   _("\
-Start an interactive Python prompt.\n\
-\n\
-To return to GDB, type the EOF character (e.g., Ctrl-D on an empty\n\
-prompt).\n\
-\n\
-Alternatively, a single-line Python command can be given as an\n\
-argument, and if the command is an expression, the result will be\n\
-printed.  For example:\n\
-\n\
-    (gdb) python-interactive 2 + 3\n\
-    5\n\
-")
-#else /* HAVE_PYTHON */
-	   _("\
-Start a Python interactive prompt.\n\
-\n\
-Python scripting is not supported in this copy of GDB.\n\
-This command is only a placeholder.")
-#endif /* HAVE_PYTHON */
-	   );
-  add_com_alias ("pi", "python-interactive", class_obscure, 1);
-
-  add_com ("python", class_obscure, python_command,
-#ifdef HAVE_PYTHON
-	   _("\
-Evaluate a Python command.\n\
-\n\
-The command can be given as an argument, for instance:\n\
-\n\
-    python print 23\n\
-\n\
-If no argument is given, the following lines are read and used\n\
-as the Python commands.  Type a line containing \"end\" to indicate\n\
-the end of the command.")
-#else /* HAVE_PYTHON */
-	   _("\
-Evaluate a Python command.\n\
-\n\
-Python scripting is not supported in this copy of GDB.\n\
-This command is only a placeholder.")
-#endif /* HAVE_PYTHON */
-	   );
-  add_com_alias ("py", "python", class_obscure, 1);
-
-  /* Add set/show python print-stack.  */
-  add_prefix_cmd ("python", no_class, user_show_python,
-		  _("Prefix command for python preference settings."),
-		  &user_show_python_list, "show python ", 0,
-		  &showlist);
-
-  add_prefix_cmd ("python", no_class, user_set_python,
-		  _("Prefix command for python preference settings."),
-		  &user_set_python_list, "set python ", 0,
-		  &setlist);
-
-  add_setshow_enum_cmd ("print-stack", no_class, python_excp_enums,
-			&gdbpy_should_print_stack, _("\
-Set mode for Python stack dump on error."), _("\
-Show the mode of Python stack printing on error."), _("\
-none  == no stack or message will be printed.\n\
-full == a message and a stack will be printed.\n\
-message == an error message without a stack will be printed."),
-			NULL, NULL,
-			&user_set_python_list,
-			&user_show_python_list);
-
-#ifdef HAVE_PYTHON
 #ifdef WITH_PYTHON_PATH
   /* Work around problem where python gets confused about where it is,
      and then can't find its libraries, etc.
@@ -1715,29 +1551,27 @@ message == an error message without a st
      /foo/lib/pythonX.Y/...
      This must be done before calling Py_Initialize.  */
   progname = concat (ldirname (python_libdir), SLASH_STRING, "bin",
-		     SLASH_STRING, "python", NULL);
+		     SLASH_STRING, "python", (char *) NULL);
 #ifdef IS_PY3K
-  oldloc = setlocale (LC_ALL, NULL);
+  oldloc = xstrdup (setlocale (LC_ALL, NULL));
   setlocale (LC_ALL, "");
   progsize = strlen (progname);
-  if (progsize == (size_t) -1)
-    {
-      fprintf (stderr, "Could not convert python path to string\n");
-      return;
-    }
-  progname_copy = PyMem_Malloc ((progsize + 1) * sizeof (wchar_t));
+  progname_copy = (wchar_t *) PyMem_Malloc ((progsize + 1) * sizeof (wchar_t));
   if (!progname_copy)
     {
+      xfree (oldloc);
       fprintf (stderr, "out of memory\n");
-      return;
+      return false;
     }
   count = mbstowcs (progname_copy, progname, progsize + 1);
   if (count == (size_t) -1)
     {
+      xfree (oldloc);
       fprintf (stderr, "Could not convert python path to string\n");
-      return;
+      return false;
     }
   setlocale (LC_ALL, oldloc);
+  xfree (oldloc);
 
   /* Note that Py_SetProgramName expects the string it is passed to
      remain alive for the duration of the program's execution, so
@@ -1759,7 +1593,7 @@ message == an error message without a st
   gdb_module = Py_InitModule ("_gdb", python_GdbMethods);
 #endif
   if (gdb_module == NULL)
-    goto fail;
+    return false;
 
   /* The casts to (char*) are for python 2.4.  */
   if (PyModule_AddStringConstant (gdb_module, "VERSION", (char*) version) < 0
@@ -1767,31 +1601,31 @@ message == an error message without a st
 				     (char*) host_name) < 0
       || PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG",
 				     (char*) target_name) < 0)
-    goto fail;
+    return false;
 
   /* Add stream constants.  */
   if (PyModule_AddIntConstant (gdb_module, "STDOUT", 0) < 0
       || PyModule_AddIntConstant (gdb_module, "STDERR", 1) < 0
       || PyModule_AddIntConstant (gdb_module, "STDLOG", 2) < 0)
-    goto fail;
+    return false;
 
   gdbpy_gdb_error = PyErr_NewException ("gdb.error", PyExc_RuntimeError, NULL);
   if (gdbpy_gdb_error == NULL
       || gdb_pymodule_addobject (gdb_module, "error", gdbpy_gdb_error) < 0)
-    goto fail;
+    return false;
 
   gdbpy_gdb_memory_error = PyErr_NewException ("gdb.MemoryError",
 					       gdbpy_gdb_error, NULL);
   if (gdbpy_gdb_memory_error == NULL
       || gdb_pymodule_addobject (gdb_module, "MemoryError",
 				 gdbpy_gdb_memory_error) < 0)
-    goto fail;
+    return false;
 
   gdbpy_gdberror_exc = PyErr_NewException ("gdb.GdbError", NULL, NULL);
   if (gdbpy_gdberror_exc == NULL
       || gdb_pymodule_addobject (gdb_module, "GdbError",
 				 gdbpy_gdberror_exc) < 0)
-    goto fail;
+    return false;
 
   gdbpy_initialize_gdb_readline ();
 
@@ -1799,6 +1633,8 @@ message == an error message without a st
       || gdbpy_initialize_values () < 0
       || gdbpy_initialize_frames () < 0
       || gdbpy_initialize_commands () < 0
+      || gdbpy_initialize_record () < 0
+      || gdbpy_initialize_btrace () < 0
       || gdbpy_initialize_symbols () < 0
       || gdbpy_initialize_symtabs () < 0
       || gdbpy_initialize_blocks () < 0
@@ -1832,26 +1668,26 @@ message == an error message without a st
       || gdbpy_initialize_arch () < 0
       || gdbpy_initialize_xmethods () < 0
       || gdbpy_initialize_unwind () < 0)
-    goto fail;
+    return false;
 
   gdbpy_to_string_cst = PyString_FromString ("to_string");
   if (gdbpy_to_string_cst == NULL)
-    goto fail;
+    return false;
   gdbpy_children_cst = PyString_FromString ("children");
   if (gdbpy_children_cst == NULL)
-    goto fail;
+    return false;
   gdbpy_display_hint_cst = PyString_FromString ("display_hint");
   if (gdbpy_display_hint_cst == NULL)
-    goto fail;
+    return false;
   gdbpy_doc_cst = PyString_FromString ("__doc__");
   if (gdbpy_doc_cst == NULL)
-    goto fail;
+    return false;
   gdbpy_enabled_cst = PyString_FromString ("enabled");
   if (gdbpy_enabled_cst == NULL)
-    goto fail;
+    return false;
   gdbpy_value_cst = PyString_FromString ("value");
   if (gdbpy_value_cst == NULL)
-    goto fail;
+    return false;
 
   /* Release the GIL while gdb runs.  */
   PyThreadState_Swap (NULL);
@@ -1859,39 +1695,108 @@ message == an error message without a st
 
   make_final_cleanup (finalize_python, NULL);
 
+  /* Only set this when initialization has succeeded.  */
   gdb_python_initialized = 1;
-  return;
+  return true;
+}
 
- fail:
-  gdbpy_print_stack ();
-  /* Do not set 'gdb_python_initialized'.  */
-  return;
+#endif /* HAVE_PYTHON */
 
+void
+_initialize_python (void)
+{
+  add_com ("python-interactive", class_obscure,
+	   python_interactive_command,
+#ifdef HAVE_PYTHON
+	   _("\
+Start an interactive Python prompt.\n\
+\n\
+To return to GDB, type the EOF character (e.g., Ctrl-D on an empty\n\
+prompt).\n\
+\n\
+Alternatively, a single-line Python command can be given as an\n\
+argument, and if the command is an expression, the result will be\n\
+printed.  For example:\n\
+\n\
+    (gdb) python-interactive 2 + 3\n\
+    5\n\
+")
+#else /* HAVE_PYTHON */
+	   _("\
+Start a Python interactive prompt.\n\
+\n\
+Python scripting is not supported in this copy of GDB.\n\
+This command is only a placeholder.")
+#endif /* HAVE_PYTHON */
+	   );
+  add_com_alias ("pi", "python-interactive", class_obscure, 1);
+
+  add_com ("python", class_obscure, python_command,
+#ifdef HAVE_PYTHON
+	   _("\
+Evaluate a Python command.\n\
+\n\
+The command can be given as an argument, for instance:\n\
+\n\
+    python print 23\n\
+\n\
+If no argument is given, the following lines are read and used\n\
+as the Python commands.  Type a line containing \"end\" to indicate\n\
+the end of the command.")
+#else /* HAVE_PYTHON */
+	   _("\
+Evaluate a Python command.\n\
+\n\
+Python scripting is not supported in this copy of GDB.\n\
+This command is only a placeholder.")
+#endif /* HAVE_PYTHON */
+	   );
+  add_com_alias ("py", "python", class_obscure, 1);
+
+  /* Add set/show python print-stack.  */
+  add_prefix_cmd ("python", no_class, user_show_python,
+		  _("Prefix command for python preference settings."),
+		  &user_show_python_list, "show python ", 0,
+		  &showlist);
+
+  add_prefix_cmd ("python", no_class, user_set_python,
+		  _("Prefix command for python preference settings."),
+		  &user_set_python_list, "set python ", 0,
+		  &setlist);
+
+  add_setshow_enum_cmd ("print-stack", no_class, python_excp_enums,
+			&gdbpy_should_print_stack, _("\
+Set mode for Python stack dump on error."), _("\
+Show the mode of Python stack printing on error."), _("\
+none  == no stack or message will be printed.\n\
+full == a message and a stack will be printed.\n\
+message == an error message without a stack will be printed."),
+			NULL, NULL,
+			&user_set_python_list,
+			&user_show_python_list);
+
+#ifdef HAVE_PYTHON
+  if (!do_start_initialization () && PyErr_Occurred ())
+    gdbpy_print_stack ();
 #endif /* HAVE_PYTHON */
 }
 
 #ifdef HAVE_PYTHON
 
-/* Perform the remaining python initializations.
-   These must be done after GDB is at least mostly initialized.
-   E.g., The "info pretty-printer" command needs the "info" prefix
-   command installed.
-   This is the extension_language_ops.finish_initialization "method".  */
+/* Helper function for gdbpy_finish_initialization.  This does the
+   work and then returns false if an error has occurred and must be
+   displayed, or true on success.  */
 
-static void
-gdbpy_finish_initialization (const struct extension_language_defn *extlang)
+static bool
+do_finish_initialization (const struct extension_language_defn *extlang)
 {
   PyObject *m;
-  char *gdb_pythondir;
   PyObject *sys_path;
-  struct cleanup *cleanup;
-
-  cleanup = ensure_python_env (get_current_arch (), current_language);
 
   /* Add the initial data-directory to sys.path.  */
 
-  gdb_pythondir = concat (gdb_datadir, SLASH_STRING, "python", NULL);
-  make_cleanup (xfree, gdb_pythondir);
+  std::string gdb_pythondir = (std::string (gdb_datadir) + SLASH_STRING
+			       + "python");
 
   sys_path = PySys_GetObject ("path");
 
@@ -1907,27 +1812,21 @@ gdbpy_finish_initialization (const struc
     }
   if (sys_path && PyList_Check (sys_path))
     {
-      PyObject *pythondir;
-      int err;
-
-      pythondir = PyString_FromString (gdb_pythondir);
-      if (pythondir == NULL)
-	goto fail;
-
-      err = PyList_Insert (sys_path, 0, pythondir);
-      Py_DECREF (pythondir);
-      if (err)
-	goto fail;
+      gdbpy_ref<> pythondir (PyString_FromString (gdb_pythondir.c_str ()));
+      if (pythondir == NULL || PyList_Insert (sys_path, 0, pythondir.get ()))
+	return false;
     }
   else
-    goto fail;
+    return false;
 
   /* Import the gdb module to finish the initialization, and
      add it to __main__ for convenience.  */
   m = PyImport_AddModule ("__main__");
   if (m == NULL)
-    goto fail;
+    return false;
 
+  /* Keep the reference to gdb_python_module since it is in a global
+     variable.  */
   gdb_python_module = PyImport_ImportModule ("gdb");
   if (gdb_python_module == NULL)
     {
@@ -1938,24 +1837,31 @@ gdbpy_finish_initialization (const struc
 		 "Could not load the Python gdb module from `%s'.\n"
 		 "Limited Python support is available from the _gdb module.\n"
 		 "Suggest passing --data-directory=/path/to/gdb/data-directory.\n"),
-		 gdb_pythondir);
-      do_cleanups (cleanup);
-      return;
+	       gdb_pythondir.c_str ());
+      /* We return "success" here as we've already emitted the
+	 warning.  */
+      return true;
     }
 
-  if (gdb_pymodule_addobject (m, "gdb", gdb_python_module) < 0)
-    goto fail;
+  return gdb_pymodule_addobject (m, "gdb", gdb_python_module) >= 0;
+}
 
-  /* Keep the reference to gdb_python_module since it is in a global
-     variable.  */
+/* Perform the remaining python initializations.
+   These must be done after GDB is at least mostly initialized.
+   E.g., The "info pretty-printer" command needs the "info" prefix
+   command installed.
+   This is the extension_language_ops.finish_initialization "method".  */
 
-  do_cleanups (cleanup);
-  return;
+static void
+gdbpy_finish_initialization (const struct extension_language_defn *extlang)
+{
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
- fail:
-  gdbpy_print_stack ();
-  warning (_("internal error: Unhandled Python exception"));
-  do_cleanups (cleanup);
+  if (!do_finish_initialization (extlang))
+    {
+      gdbpy_print_stack ();
+      warning (_("internal error: Unhandled Python exception"));
+    }
 }
 
 /* Return non-zero if Python has successfully initialized.
@@ -2011,6 +1917,18 @@ Return the selected frame object." },
     "stop_reason_string (Integer) -> String.\n\
 Return a string explaining unwind stop reason." },
 
+  { "start_recording", gdbpy_start_recording, METH_VARARGS,
+    "start_recording ([method] [, format]) -> gdb.Record.\n\
+Start recording with the given method.  If no method is given, will fall back\n\
+to the system default method.  If no format is given, will fall back to the\n\
+default format for the given method."},
+  { "current_recording", gdbpy_current_recording, METH_NOARGS,
+    "current_recording () -> gdb.Record.\n\
+Return current recording object." },
+  { "stop_recording", gdbpy_stop_recording, METH_NOARGS,
+    "stop_recording () -> None.\n\
+Stop current recording." },
+
   { "lookup_type", (PyCFunction) gdbpy_lookup_type,
     METH_VARARGS | METH_KEYWORDS,
     "lookup_type (name [, block]) -> type\n\
@@ -2081,6 +1999,12 @@ Return the selected inferior object." },
   { "inferiors", gdbpy_inferiors, METH_NOARGS,
     "inferiors () -> (gdb.Inferior, ...).\n\
 Return a tuple containing all inferiors." },
+
+  { "invalidate_cached_frames", gdbpy_invalidate_cached_frames, METH_NOARGS,
+    "invalidate_cached_frames () -> None.\n\
+Invalidate any cached frame objects in gdb.\n\
+Intended for internal use only." },
+
   {NULL, NULL, 0, NULL}
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python.h ./gdb/python/python.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/python.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python/gdb header for generic use in gdb
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python-internal.h ./gdb/python/python-internal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/python-internal.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/python-internal.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Gdb/Python header for private use by Python module.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -104,7 +104,9 @@
 
 #define PyInt_Check PyLong_Check
 #define PyInt_FromLong PyLong_FromLong
+#define PyInt_FromSsize_t PyLong_FromSsize_t
 #define PyInt_AsLong PyLong_AsLong
+#define PyInt_AsSsize_t PyLong_AsSsize_t
 
 #define PyString_FromString PyUnicode_FromString
 #define PyString_Decode PyUnicode_Decode
@@ -172,6 +174,13 @@ typedef unsigned long gdb_py_ulongest;
 typedef long Py_hash_t;
 #endif
 
+/* PyMem_RawMalloc appeared in Python 3.4.  For earlier versions, we can just
+   fall back to PyMem_Malloc.  */
+
+#if PY_VERSION_HEX < 0x03040000
+#define PyMem_RawMalloc PyMem_Malloc
+#endif
+
 /* Python 2.6 did not wrap Py_DECREF in 'do {...} while (0)', leading
    to 'suggest explicit braces to avoid ambiguous â€˜elseâ€™' gcc errors.
    Wrap it ourselves, so that callers don't need to care.  */
@@ -315,10 +324,10 @@ extern int gdbpy_auto_load_enabled (cons
 
 extern enum ext_lang_rc gdbpy_apply_val_pretty_printer
   (const struct extension_language_defn *,
-   struct type *type, const gdb_byte *valaddr,
-   int embedded_offset, CORE_ADDR address,
+   struct type *type,
+   LONGEST embedded_offset, CORE_ADDR address,
    struct ui_file *stream, int recurse,
-   const struct value *val,
+   struct value *val,
    const struct value_print_options *options,
    const struct language_defn *language);
 extern enum ext_lang_bt_status gdbpy_apply_frame_filter
@@ -362,6 +371,9 @@ PyObject *gdbpy_frame_stop_reason_string
 PyObject *gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw);
 PyObject *gdbpy_lookup_global_symbol (PyObject *self, PyObject *args,
 				      PyObject *kw);
+PyObject *gdbpy_start_recording (PyObject *self, PyObject *args);
+PyObject *gdbpy_current_recording (PyObject *self, PyObject *args);
+PyObject *gdbpy_stop_recording (PyObject *self, PyObject *args);
 PyObject *gdbpy_newest_frame (PyObject *self, PyObject *args);
 PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args);
 PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args);
@@ -375,7 +387,6 @@ PyObject *gdbpy_create_ptid_object (ptid
 PyObject *gdbpy_selected_thread (PyObject *self, PyObject *args);
 PyObject *gdbpy_selected_inferior (PyObject *self, PyObject *args);
 PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);
-PyObject *gdbpy_parameter (PyObject *self, PyObject *args);
 PyObject *gdbpy_parameter_value (enum var_types type, void *var);
 char *gdbpy_parse_command_name (const char *name,
 				struct cmd_list_element ***base_list,
@@ -430,6 +441,10 @@ int gdbpy_initialize_values (void)
   CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
 int gdbpy_initialize_frames (void)
   CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
+int gdbpy_initialize_btrace (void)
+  CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
+int gdbpy_initialize_record (void)
+  CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
 int gdbpy_initialize_symtabs (void)
   CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
 int gdbpy_initialize_commands (void)
@@ -499,11 +514,42 @@ int gdbpy_initialize_xmethods (void)
 int gdbpy_initialize_unwind (void)
   CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
 
-struct cleanup *make_cleanup_py_decref (PyObject *py);
-struct cleanup *make_cleanup_py_xdecref (PyObject *py);
+/* Called before entering the Python interpreter to install the
+   current language and architecture to be used for Python values.
+   Also set the active extension language for GDB so that SIGINT's
+   are directed our way, and if necessary install the right SIGINT
+   handler.  */
+class gdbpy_enter
+{
+ public:
+
+  gdbpy_enter (struct gdbarch *gdbarch, const struct language_defn *language);
+
+  ~gdbpy_enter ();
+
+  gdbpy_enter (const gdbpy_enter &) = delete;
+  gdbpy_enter &operator= (const gdbpy_enter &) = delete;
+
+ private:
+
+  struct active_ext_lang_state *m_previous_active;
+  PyGILState_STATE m_state;
+  struct gdbarch *m_gdbarch;
+  const struct language_defn *m_language;
+  PyObject *m_error_type, *m_error_value, *m_error_traceback;
+};
+
+/* Like gdbpy_enter, but takes a varobj.  This is a subclass just to
+   make constructor delegation a little nicer.  */
+class gdbpy_enter_varobj : public gdbpy_enter
+{
+ public:
+
+  /* This is defined in varobj.c, where it can access varobj
+     internals.  */
+  gdbpy_enter_varobj (const struct varobj *var);
 
-struct cleanup *ensure_python_env (struct gdbarch *gdbarch,
-				   const struct language_defn *language);
+};
 
 extern struct gdbarch *python_gdbarch;
 extern const struct language_defn *python_language;
@@ -534,18 +580,21 @@ int gdbpy_print_python_errors_p (void);
 void gdbpy_print_stack (void);
 
 PyObject *python_string_to_unicode (PyObject *obj);
-char *unicode_to_target_string (PyObject *unicode_str);
-char *python_string_to_target_string (PyObject *obj);
+gdb::unique_xmalloc_ptr<char> unicode_to_target_string (PyObject *unicode_str);
+gdb::unique_xmalloc_ptr<char> python_string_to_target_string (PyObject *obj);
 PyObject *python_string_to_target_python_string (PyObject *obj);
-char *python_string_to_host_string (PyObject *obj);
+gdb::unique_xmalloc_ptr<char> python_string_to_host_string (PyObject *obj);
+PyObject *host_string_to_python_string (const char *str);
 int gdbpy_is_string (PyObject *obj);
-char *gdbpy_obj_to_string (PyObject *obj);
-char *gdbpy_exception_to_string (PyObject *ptype, PyObject *pvalue);
+gdb::unique_xmalloc_ptr<char> gdbpy_obj_to_string (PyObject *obj);
+gdb::unique_xmalloc_ptr<char> gdbpy_exception_to_string (PyObject *ptype,
+							 PyObject *pvalue);
 
 int gdbpy_is_lazy_string (PyObject *result);
 void gdbpy_extract_lazy_string (PyObject *string, CORE_ADDR *addr,
 				struct type **str_type,
-				long *length, char **encoding);
+				long *length,
+				gdb::unique_xmalloc_ptr<char> *encoding);
 
 int gdbpy_is_value_object (PyObject *obj);
 
@@ -555,7 +604,7 @@ PyObject *apply_varobj_pretty_printer (P
 				       struct value **replacement,
 				       struct ui_file *stream);
 PyObject *gdbpy_get_varobj_pretty_printer (struct value *value);
-char *gdbpy_get_display_hint (PyObject *printer);
+gdb::unique_xmalloc_ptr<char> gdbpy_get_display_hint (PyObject *printer);
 PyObject *gdbpy_default_visualizer (PyObject *self, PyObject *args);
 
 void bpfinishpy_pre_stop_hook (struct gdbpy_breakpoint_object *bp_obj);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-threadevent.c ./gdb/python/py-threadevent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-threadevent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-threadevent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -51,26 +51,21 @@ PyObject *
 create_thread_event_object (PyTypeObject *py_type)
 {
   PyObject *thread = NULL;
-  PyObject *thread_event_obj = NULL;
 
-  thread_event_obj = create_event_object (py_type);
-  if (!thread_event_obj)
-    goto fail;
+  gdbpy_ref<> thread_event_obj (create_event_object (py_type));
+  if (thread_event_obj == NULL)
+    return NULL;
 
   thread = get_event_thread ();
   if (!thread)
-    goto fail;
+    return NULL;
 
-  if (evpy_add_attribute (thread_event_obj,
+  if (evpy_add_attribute (thread_event_obj.get (),
                           "inferior_thread",
                           thread) < 0)
-    goto fail;
+    return NULL;
 
-  return thread_event_obj;
-
-  fail:
-   Py_XDECREF (thread_event_obj);
-   return NULL;
+  return thread_event_obj.release ();
 }
 
 GDBPY_NEW_EVENT_TYPE (thread,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-type.c ./gdb/python/py-type.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-type.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-type.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to types.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "language.h"
 #include "vec.h"
 #include "typeprint.h"
+#include "py-ref.h"
 
 typedef struct pyty_type_object
 {
@@ -129,18 +130,16 @@ field_dealloc (PyObject *obj)
 static PyObject *
 field_new (void)
 {
-  field_object *result = PyObject_New (field_object, &field_object_type);
+  gdbpy_ref<field_object> result (PyObject_New (field_object,
+						&field_object_type));
 
-  if (result)
+  if (result != NULL)
     {
       result->dict = PyDict_New ();
       if (!result->dict)
-	{
-	  Py_DECREF (result);
-	  result = NULL;
-	}
+	return NULL;
     }
-  return (PyObject *) result;
+  return (PyObject *) result.release ();
 }
 
 
@@ -168,18 +167,16 @@ typy_get_code (PyObject *self, void *clo
 static PyObject *
 convert_field (struct type *type, int field)
 {
-  PyObject *result = field_new ();
-  PyObject *arg;
+  gdbpy_ref<> result (field_new ());
 
-  if (!result)
+  if (result == NULL)
     return NULL;
 
-  arg = type_to_type_object (type);
+  gdbpy_ref<> arg (type_to_type_object (type));
   if (arg == NULL)
-    goto fail;
-  if (PyObject_SetAttrString (result, "parent_type", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
+    return NULL;
+  if (PyObject_SetAttrString (result.get (), "parent_type", arg.get ()) < 0)
+    return NULL;
 
   if (!field_is_static (&TYPE_FIELD (type, field)))
     {
@@ -187,88 +184,79 @@ convert_field (struct type *type, int fi
 
       if (TYPE_CODE (type) == TYPE_CODE_ENUM)
 	{
-	  arg = gdb_py_long_from_longest (TYPE_FIELD_ENUMVAL (type, field));
+	  arg.reset (gdb_py_long_from_longest (TYPE_FIELD_ENUMVAL (type,
+								   field)));
 	  attrstring = "enumval";
 	}
       else
 	{
-	  arg = gdb_py_long_from_longest (TYPE_FIELD_BITPOS (type, field));
+	  arg.reset (gdb_py_long_from_longest (TYPE_FIELD_BITPOS (type,
+								  field)));
 	  attrstring = "bitpos";
 	}
 
-      if (!arg)
-	goto fail;
+      if (arg == NULL)
+	return NULL;
 
       /* At least python-2.4 had the second parameter non-const.  */
-      if (PyObject_SetAttrString (result, (char *) attrstring, arg) < 0)
-	goto failarg;
-      Py_DECREF (arg);
+      if (PyObject_SetAttrString (result.get (), (char *) attrstring,
+				  arg.get ()) < 0)
+	return NULL;
     }
 
-  arg = NULL;
+  arg.reset (NULL);
   if (TYPE_FIELD_NAME (type, field))
     {
       const char *field_name = TYPE_FIELD_NAME (type, field);
 
       if (field_name[0] != '\0')
 	{
-	  arg = PyString_FromString (TYPE_FIELD_NAME (type, field));
+	  arg.reset (PyString_FromString (TYPE_FIELD_NAME (type, field)));
 	  if (arg == NULL)
-	    goto fail;
+	    return NULL;
 	}
     }
   if (arg == NULL)
     {
-      arg = Py_None;
-      Py_INCREF (arg);
+      arg.reset (Py_None);
+      Py_INCREF (arg.get ());
     }
-  if (PyObject_SetAttrString (result, "name", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
-
-  arg = TYPE_FIELD_ARTIFICIAL (type, field) ? Py_True : Py_False;
-  Py_INCREF (arg);
-  if (PyObject_SetAttrString (result, "artificial", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
+  if (PyObject_SetAttrString (result.get (), "name", arg.get ()) < 0)
+    return NULL;
+
+  arg.reset (TYPE_FIELD_ARTIFICIAL (type, field) ? Py_True : Py_False);
+  Py_INCREF (arg.get ());
+  if (PyObject_SetAttrString (result.get (), "artificial", arg.get ()) < 0)
+    return NULL;
 
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
-    arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
+    arg.reset (field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False);
   else
-    arg = Py_False;
-  Py_INCREF (arg);
-  if (PyObject_SetAttrString (result, "is_base_class", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
-
-  arg = PyLong_FromLong (TYPE_FIELD_BITSIZE (type, field));
-  if (!arg)
-    goto fail;
-  if (PyObject_SetAttrString (result, "bitsize", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
+    arg.reset (Py_False);
+  Py_INCREF (arg.get ());
+  if (PyObject_SetAttrString (result.get (), "is_base_class", arg.get ()) < 0)
+    return NULL;
+
+  arg.reset (PyLong_FromLong (TYPE_FIELD_BITSIZE (type, field)));
+  if (arg == NULL)
+    return NULL;
+  if (PyObject_SetAttrString (result.get (), "bitsize", arg.get ()) < 0)
+    return NULL;
 
   /* A field can have a NULL type in some situations.  */
   if (TYPE_FIELD_TYPE (type, field) == NULL)
     {
-      arg = Py_None;
-      Py_INCREF (arg);
+      arg.reset (Py_None);
+      Py_INCREF (arg.get ());
     }
   else
-    arg = type_to_type_object (TYPE_FIELD_TYPE (type, field));
-  if (!arg)
-    goto fail;
-  if (PyObject_SetAttrString (result, "type", arg) < 0)
-    goto failarg;
-  Py_DECREF (arg);
-
-  return result;
+    arg.reset (type_to_type_object (TYPE_FIELD_TYPE (type, field)));
+  if (arg == NULL)
+    return NULL;
+  if (PyObject_SetAttrString (result.get (), "type", arg.get ()) < 0)
+    return NULL;
 
- failarg:
-  Py_DECREF (arg);
- fail:
-  Py_DECREF (result);
-  return NULL;
+  return result.release ();
 }
 
 /* Helper function to return the name of a field, as a gdb.Field object.
@@ -298,39 +286,29 @@ field_name (struct type *type, int field
 static PyObject *
 make_fielditem (struct type *type, int i, enum gdbpy_iter_kind kind)
 {
-  PyObject *item = NULL, *key = NULL, *value = NULL;
-
   switch (kind)
     {
     case iter_items:
-      key = field_name (type, i);
-      if (key == NULL)
-	goto fail;
-      value = convert_field (type, i);
-      if (value == NULL)
-	goto fail;
-      item = PyTuple_New (2);
-      if (item == NULL)
-	goto fail;
-      PyTuple_SET_ITEM (item, 0, key);
-      PyTuple_SET_ITEM (item, 1, value);
-      break;
+      {
+	gdbpy_ref<> key (field_name (type, i));
+	if (key == NULL)
+	  return NULL;
+	gdbpy_ref<> value (convert_field (type, i));
+	if (value == NULL)
+	  return NULL;
+	gdbpy_ref<> item (PyTuple_New (2));
+	if (item == NULL)
+	  return NULL;
+	PyTuple_SET_ITEM (item.get (), 0, key.release ());
+	PyTuple_SET_ITEM (item.get (), 1, value.release ());
+	return item.release ();
+      }
     case iter_keys:
-      item = field_name (type, i);
-      break;
+      return field_name (type, i);
     case iter_values:
-      item =  convert_field (type, i);
-      break;
-    default:
-      gdb_assert_not_reached ("invalid gdbpy_iter_kind");
+      return convert_field (type, i);
     }
-  return item;
-
- fail:
-  Py_XDECREF (key);
-  Py_XDECREF (value);
-  Py_XDECREF (item);
-  return NULL;
+  gdb_assert_not_reached ("invalid gdbpy_iter_kind");
 }
 
 /* Return a sequence of all field names, fields, or (name, field) pairs.
@@ -346,7 +324,7 @@ typy_fields_items (PyObject *self, enum 
 
   TRY
     {
-      CHECK_TYPEDEF (checked_type);
+      checked_type = check_typedef (checked_type);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -389,7 +367,6 @@ static PyObject *
 typy_fields (PyObject *self, PyObject *args)
 {
   struct type *type = ((type_object *) self)->type;
-  PyObject *r, *rl;
 
   if (TYPE_CODE (type) != TYPE_CODE_ARRAY)
     return typy_fields_items (self, iter_values);
@@ -397,14 +374,11 @@ typy_fields (PyObject *self, PyObject *a
   /* Array type.  Handle this as a special case because the common
      machinery wants struct or union or enum types.  Build a list of
      one entry which is the range for the array.  */
-  r = convert_field (type, 0);
+  gdbpy_ref<> r (convert_field (type, 0));
   if (r == NULL)
     return NULL;
 
-  rl = Py_BuildValue ("[O]", r);
-  Py_DECREF (r);
-
-  return rl;
+  return Py_BuildValue ("[O]", r.get ());
 }
 
 /* Return a sequence of all field names.  Each field is a gdb.Field object.  */
@@ -477,7 +451,7 @@ typy_get_composite (struct type *type)
     {
       TRY
 	{
-	  CHECK_TYPEDEF (type);
+	  type = check_typedef (type);
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
@@ -495,10 +469,11 @@ typy_get_composite (struct type *type)
      exception.  */
   if (TYPE_CODE (type) != TYPE_CODE_STRUCT
       && TYPE_CODE (type) != TYPE_CODE_UNION
-      && TYPE_CODE (type) != TYPE_CODE_ENUM)
+      && TYPE_CODE (type) != TYPE_CODE_ENUM
+      && TYPE_CODE (type) != TYPE_CODE_FUNC)
     {
       PyErr_SetString (PyExc_TypeError,
-		       "Type is not a structure, union, or enum type.");
+		       "Type is not a structure, union, enum, or function type.");
       return NULL;
     }
 
@@ -600,8 +575,6 @@ static PyObject *
 typy_range (PyObject *self, PyObject *args)
 {
   struct type *type = ((type_object *) self)->type;
-  PyObject *result;
-  PyObject *low_bound = NULL, *high_bound = NULL;
   /* Initialize these to appease GCC warnings.  */
   LONGEST low = 0, high = 0;
 
@@ -627,35 +600,22 @@ typy_range (PyObject *self, PyObject *ar
       break;
     }
 
-  low_bound = PyLong_FromLong (low);
-  if (!low_bound)
-    goto failarg;
-
-  high_bound = PyLong_FromLong (high);
-  if (!high_bound)
-    goto failarg;
+  gdbpy_ref<> low_bound (PyLong_FromLong (low));
+  if (low_bound == NULL)
+    return NULL;
 
-  result = PyTuple_New (2);
-  if (!result)
-    goto failarg;
+  gdbpy_ref<> high_bound (PyLong_FromLong (high));
+  if (high_bound == NULL)
+    return NULL;
 
-  if (PyTuple_SetItem (result, 0, low_bound) != 0)
-    {
-      Py_DECREF (result);
-      goto failarg;
-    }
-  if (PyTuple_SetItem (result, 1, high_bound) != 0)
-    {
-      Py_DECREF (high_bound);
-      Py_DECREF (result);
-      return NULL;
-    }
-  return result;
+  gdbpy_ref<> result (PyTuple_New (2));
+  if (result == NULL)
+    return NULL;
 
- failarg:
-  Py_XDECREF (high_bound);
-  Py_XDECREF (low_bound);
-  return NULL;
+  if (PyTuple_SetItem (result.get (), 0, low_bound.release ()) != 0
+      || PyTuple_SetItem (result.get (), 1, high_bound.release ()) != 0)
+    return NULL;
+  return result.release ();
 }
 
 /* Return a Type object which represents a reference to SELF.  */
@@ -870,10 +830,9 @@ typy_legacy_template_argument (struct ty
 {
   int i;
   struct demangle_component *demangled;
-  struct demangle_parse_info *info = NULL;
+  std::unique_ptr<demangle_parse_info> info;
   const char *err;
   struct type *argtype;
-  struct cleanup *cleanup;
 
   if (TYPE_NAME (type) == NULL)
     {
@@ -898,7 +857,6 @@ typy_legacy_template_argument (struct ty
       return NULL;
     }
   demangled = info->tree;
-  cleanup = make_cleanup_cp_demangled_name_parse_free (info);
 
   /* Strip off component names.  */
   while (demangled->type == DEMANGLE_COMPONENT_QUAL_NAME
@@ -907,7 +865,6 @@ typy_legacy_template_argument (struct ty
 
   if (demangled->type != DEMANGLE_COMPONENT_TEMPLATE)
     {
-      do_cleanups (cleanup);
       PyErr_SetString (PyExc_RuntimeError, _("Type is not a template."));
       return NULL;
     }
@@ -920,14 +877,12 @@ typy_legacy_template_argument (struct ty
 
   if (! demangled)
     {
-      do_cleanups (cleanup);
       PyErr_Format (PyExc_RuntimeError, _("No argument %d in template."),
 		    argno);
       return NULL;
     }
 
   argtype = typy_lookup_type (demangled->u.s_binary.left, block);
-  do_cleanups (cleanup);
   if (! argtype)
     return NULL;
 
@@ -1009,35 +964,22 @@ typy_template_argument (PyObject *self, 
 static PyObject *
 typy_str (PyObject *self)
 {
-  char *thetype = NULL;
-  long length = 0;
+  string_file thetype;
   PyObject *result;
 
   TRY
     {
-      struct cleanup *old_chain;
-      struct ui_file *stb;
-
-      stb = mem_fileopen ();
-      old_chain = make_cleanup_ui_file_delete (stb);
-
-      LA_PRINT_TYPE (type_object_to_type (self), "", stb, -1, 0,
+      LA_PRINT_TYPE (type_object_to_type (self), "", &thetype, -1, 0,
 		     &type_print_raw_options);
-
-      thetype = ui_file_xstrdup (stb, &length);
-      do_cleanups (old_chain);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      xfree (thetype);
       GDB_PY_HANDLE_EXCEPTION (except);
     }
   END_CATCH
 
-  result = PyUnicode_Decode (thetype, length, host_charset (), NULL);
-  xfree (thetype);
-
-  return result;
+  return PyUnicode_Decode (thetype.c_str (), thetype.size (),
+			   host_charset (), NULL);
 }
 
 /* Implement the richcompare method.  */
@@ -1086,16 +1028,15 @@ static const struct objfile_data *typy_o
 static void
 save_objfile_types (struct objfile *objfile, void *datum)
 {
-  type_object *obj = datum;
+  type_object *obj = (type_object *) datum;
   htab_t copied_types;
-  struct cleanup *cleanup;
 
   if (!gdb_python_initialized)
     return;
 
   /* This prevents another thread from freeing the objects we're
      operating on.  */
-  cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
+  gdbpy_enter enter_py (get_objfile_arch (objfile), current_language);
 
   copied_types = create_copied_types_hash (objfile);
 
@@ -1114,8 +1055,6 @@ save_objfile_types (struct objfile *objf
     }
 
   htab_delete (copied_types);
-
-  do_cleanups (cleanup);
 }
 
 static void
@@ -1127,7 +1066,8 @@ set_type (type_object *obj, struct type 
     {
       struct objfile *objfile = TYPE_OBJFILE (type);
 
-      obj->next = objfile_data (objfile, typy_objfile_data_key);
+      obj->next = ((struct pyty_type_object *)
+		   objfile_data (objfile, typy_objfile_data_key));
       if (obj->next)
 	obj->next->prev = obj;
       set_objfile_data (objfile, typy_objfile_data_key, obj);
@@ -1197,10 +1137,9 @@ static PyObject *
 typy_getitem (PyObject *self, PyObject *key)
 {
   struct type *type = ((type_object *) self)->type;
-  char *field;
   int i;
 
-  field = python_string_to_host_string (key);
+  gdb::unique_xmalloc_ptr<char> field = python_string_to_host_string (key);
   if (field == NULL)
     return NULL;
 
@@ -1216,7 +1155,7 @@ typy_getitem (PyObject *self, PyObject *
     {
       const char *t_field_name = TYPE_FIELD_NAME (type, i);
 
-      if (t_field_name && (strcmp_iw (t_field_name, field) == 0))
+      if (t_field_name && (strcmp_iw (t_field_name, field.get ()) == 0))
 	{
 	  return convert_field (type, i);
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-unwind.c ./gdb/python/py-unwind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-unwind.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-unwind.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python frame unwinder interface.
 
-   Copyright (C) 2015 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "regcache.h"
 #include "valprint.h"
 #include "user-regs.h"
+#include "py-ref.h"
 
 #define TRACE_PY_UNWIND(level, args...) if (pyuw_debug >= level)  \
   { fprintf_unfiltered (gdb_stdlog, args); }
@@ -116,12 +117,12 @@ pyuw_parse_register_id (struct gdbarch *
     return 0;
   if (gdbpy_is_string (pyo_reg_id))
     {
-      const char *reg_name = gdbpy_obj_to_string (pyo_reg_id);
+      gdb::unique_xmalloc_ptr<char> reg_name (gdbpy_obj_to_string (pyo_reg_id));
 
       if (reg_name == NULL)
         return 0;
-      *reg_num = user_reg_map_name_to_regnum (gdbarch, reg_name,
-                                              strlen (reg_name));
+      *reg_num = user_reg_map_name_to_regnum (gdbarch, reg_name.get (),
+                                              strlen (reg_name.get ()));
       return *reg_num >= 0;
     }
   else if (PyInt_Check (pyo_reg_id))
@@ -176,19 +177,17 @@ pyuw_object_attribute_to_pointer (PyObje
 
   if (PyObject_HasAttrString (pyo, attr_name))
     {
-      PyObject *pyo_value = PyObject_GetAttrString (pyo, attr_name);
-      struct value *value;
+      gdbpy_ref<> pyo_value (PyObject_GetAttrString (pyo, attr_name));
 
       if (pyo_value != NULL && pyo_value != Py_None)
         {
-          rc = pyuw_value_obj_to_pointer (pyo_value, addr);
+          rc = pyuw_value_obj_to_pointer (pyo_value.get (), addr);
           if (!rc)
             PyErr_Format (
                 PyExc_ValueError,
                 _("The value of the '%s' attribute is not a pointer."),
                 attr_name);
         }
-      Py_XDECREF (pyo_value);
     }
   return rc;
 }
@@ -199,14 +198,11 @@ pyuw_object_attribute_to_pointer (PyObje
 static PyObject *
 unwind_infopy_str (PyObject *self)
 {
-  struct ui_file *strfile = mem_fileopen ();
   unwind_info_object *unwind_info = (unwind_info_object *) self;
-  pending_frame_object *pending_frame
-      = (pending_frame_object *) (unwind_info->pending_frame);
-  PyObject *result;
+  string_file stb;
 
-  fprintf_unfiltered (strfile, "Frame ID: ");
-  fprint_frame_id (strfile, unwind_info->frame_id);
+  stb.puts ("Frame ID: ");
+  fprint_frame_id (&stb, unwind_info->frame_id);
   {
     char *sep = "";
     int i;
@@ -214,20 +210,18 @@ unwind_infopy_str (PyObject *self)
     saved_reg *reg;
 
     get_user_print_options (&opts);
-    fprintf_unfiltered (strfile, "\nSaved registers: (");
-    for (i = 0;
-         i < VEC_iterate (saved_reg, unwind_info->saved_regs, i, reg);
-         i++)
+    stb.printf ("\nSaved registers: (");
+    for (i = 0; VEC_iterate (saved_reg, unwind_info->saved_regs, i, reg); i++)
       {
         struct value *value = value_object_to_value (reg->value);
 
-        fprintf_unfiltered (strfile, "%s(%d, ", sep, reg->number);
+        stb.printf ("%s(%d, ", sep, reg->number);
         if (value != NULL)
           {
             TRY
               {
-                value_print (value, strfile, &opts);
-                fprintf_unfiltered (strfile, ")");
+                value_print (value, &stb, &opts);
+                stb.puts (")");
               }
             CATCH (except, RETURN_MASK_ALL)
               {
@@ -236,19 +230,13 @@ unwind_infopy_str (PyObject *self)
             END_CATCH
           }
         else
-          fprintf_unfiltered (strfile, "<BAD>)");
+          stb.puts ("<BAD>)");
         sep = ", ";
       }
-    fprintf_unfiltered (strfile, ")");
+    stb.puts (")");
   }
-  {
-    char *s = ui_file_xstrdup (strfile, NULL);
 
-    result = PyString_FromString (s);
-    xfree (s);
-  }
-  ui_file_delete (strfile);
-  return result;
+  return PyString_FromString (stb.c_str ());
 }
 
 /* Create UnwindInfo instance for given PendingFrame and frame ID.
@@ -415,7 +403,12 @@ pending_framepy_read_register (PyObject 
 
   TRY
     {
-      val = get_frame_register_value (pending_frame->frame_info, regnum);
+      /* Fetch the value associated with a register, whether it's
+	 a real register or a so called "user" register, like "pc",
+	 which maps to a real register.  In the past,
+	 get_frame_register_value() was used here, which did not
+	 handle the user register case.  */
+      val = value_of_register (regnum, pending_frame->frame_info);
       if (val == NULL)
         PyErr_Format (PyExc_ValueError,
                       "Cannot read register %d from frame.",
@@ -468,15 +461,6 @@ pending_framepy_create_unwind_info (PyOb
                                     frame_id_build_special (sp, pc, special));
 }
 
-/* Invalidate PendingFrame instance.  */
-
-static void
-pending_frame_invalidate (void *pyo_pending_frame)
-{
-  if (pyo_pending_frame != NULL)
-    ((pending_frame_object *) pyo_pending_frame)->frame_info = NULL;
-}
-
 /* frame_unwind.this_id method.  */
 
 static void
@@ -498,7 +482,7 @@ static struct value *
 pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr,
                     int regnum)
 {
-  cached_frame_info *cached_frame = *cache_ptr;
+  cached_frame_info *cached_frame = (cached_frame_info *) *cache_ptr;
   struct reg_info *reg_info = cached_frame->reg;
   struct reg_info *reg_info_end = reg_info + cached_frame->reg_count;
 
@@ -520,25 +504,26 @@ pyuw_sniffer (const struct frame_unwind 
               void **cache_ptr)
 {
   struct gdbarch *gdbarch = (struct gdbarch *) (self->unwind_data);
-  struct cleanup *cleanups = ensure_python_env (gdbarch, current_language);
-  PyObject *pyo_execute;
-  PyObject *pyo_pending_frame;
-  PyObject *pyo_unwind_info;
   cached_frame_info *cached_frame;
 
+  gdbpy_enter enter_py (gdbarch, current_language);
+
   TRACE_PY_UNWIND (3, "%s (SP=%s, PC=%s)\n", __FUNCTION__,
                    paddress (gdbarch, get_frame_sp (this_frame)),
                    paddress (gdbarch, get_frame_pc (this_frame)));
 
   /* Create PendingFrame instance to pass to sniffers.  */
-  pyo_pending_frame  = (PyObject *) PyObject_New (pending_frame_object,
-                                                  &pending_frame_object_type);
+  pending_frame_object *pfo = PyObject_New (pending_frame_object,
+					    &pending_frame_object_type);
+  gdbpy_ref<> pyo_pending_frame ((PyObject *) pfo);
   if (pyo_pending_frame == NULL)
-    goto error;
-  ((pending_frame_object *) pyo_pending_frame)->gdbarch = gdbarch;
-  ((pending_frame_object *) pyo_pending_frame)->frame_info = this_frame;
-  make_cleanup (pending_frame_invalidate, (void *) pyo_pending_frame);
-  make_cleanup_py_decref (pyo_pending_frame);
+    {
+      gdbpy_print_stack ();
+      return 0;
+    }
+  pfo->gdbarch = gdbarch;
+  scoped_restore invalidate_frame = make_scoped_restore (&pfo->frame_info,
+							 this_frame);
 
   /* Run unwinders.  */
   if (gdb_python_module == NULL
@@ -547,33 +532,44 @@ pyuw_sniffer (const struct frame_unwind 
       PyErr_SetString (PyExc_NameError,
                        "Installation error: gdb.execute_unwinders function "
                        "is missing");
-      goto error;
+      gdbpy_print_stack ();
+      return 0;
     }
-  pyo_execute = PyObject_GetAttrString (gdb_python_module, "execute_unwinders");
+  gdbpy_ref<> pyo_execute (PyObject_GetAttrString (gdb_python_module,
+						   "execute_unwinders"));
   if (pyo_execute == NULL)
-    goto error;
-  make_cleanup_py_decref (pyo_execute);
-  pyo_unwind_info
-      = PyObject_CallFunctionObjArgs (pyo_execute, pyo_pending_frame, NULL);
+    {
+      gdbpy_print_stack ();
+      return 0;
+    }
+
+  gdbpy_ref<> pyo_unwind_info
+    (PyObject_CallFunctionObjArgs (pyo_execute.get (),
+				   pyo_pending_frame.get (), NULL));
   if (pyo_unwind_info == NULL)
-    goto error;
-  make_cleanup_py_decref (pyo_unwind_info);
+    {
+      gdbpy_print_stack ();
+      return 0;
+    }
   if (pyo_unwind_info == Py_None)
-    goto cannot_unwind;
+    return 0;
 
   /* Received UnwindInfo, cache data.  */
-  if (PyObject_IsInstance (pyo_unwind_info,
+  if (PyObject_IsInstance (pyo_unwind_info.get (),
                            (PyObject *) &unwind_info_object_type) <= 0)
     error (_("A Unwinder should return gdb.UnwindInfo instance."));
 
   {
-    unwind_info_object *unwind_info = (unwind_info_object *) pyo_unwind_info;
+    unwind_info_object *unwind_info =
+      (unwind_info_object *) pyo_unwind_info.get ();
     int reg_count = VEC_length (saved_reg, unwind_info->saved_regs);
     saved_reg *reg;
     int i;
 
-    cached_frame = xmalloc (sizeof (*cached_frame) +
-                            reg_count * sizeof (cached_frame->reg[0]));
+    cached_frame
+      = ((cached_frame_info *)
+	 xmalloc (sizeof (*cached_frame)
+		  + reg_count * sizeof (cached_frame->reg[0])));
     cached_frame->gdbarch = gdbarch;
     cached_frame->frame_id = unwind_info->frame_id;
     cached_frame->reg_count = reg_count;
@@ -596,15 +592,7 @@ pyuw_sniffer (const struct frame_unwind 
   }
 
   *cache_ptr = cached_frame;
-  do_cleanups (cleanups);
   return 1;
-
- error:
-  gdbpy_print_stack ();
-  /* Fallthrough.  */
- cannot_unwind:
-  do_cleanups (cleanups);
-  return 0;
 }
 
 /* Frame cache release shim.  */
@@ -634,8 +622,9 @@ pyuw_gdbarch_data_init (struct gdbarch *
 static void
 pyuw_on_new_gdbarch (struct gdbarch *newarch)
 {
-  struct pyuw_gdbarch_data_type *data =
-      gdbarch_data (newarch, pyuw_gdbarch_data);
+  struct pyuw_gdbarch_data_type *data
+    = (struct pyuw_gdbarch_data_type *) gdbarch_data (newarch,
+						      pyuw_gdbarch_data);
 
   if (!data->unwinder_registered)
     {
@@ -646,7 +635,7 @@ pyuw_on_new_gdbarch (struct gdbarch *new
       unwinder->stop_reason = default_frame_unwind_stop_reason;
       unwinder->this_id = pyuw_this_id;
       unwinder->prev_register = pyuw_prev_register;
-      unwinder->unwind_data = (void *) newarch;
+      unwinder->unwind_data = (const struct frame_data *) newarch;
       unwinder->sniffer = pyuw_sniffer;
       unwinder->dealloc_cache = pyuw_dealloc_cache;
       frame_unwind_prepend_unwinder (newarch, unwinder);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-utils.c ./gdb/python/py-utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-utils.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-utils.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* General utility routines for GDB/Python.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,49 +21,7 @@
 #include "charset.h"
 #include "value.h"
 #include "python-internal.h"
-
-
-/* This is a cleanup function which decrements the refcount on a
-   Python object.  */
-
-static void
-py_decref (void *p)
-{
-  PyObject *py = p;
-
-  Py_DECREF (py);
-}
-
-/* Return a new cleanup which will decrement the Python object's
-   refcount when run.  */
-
-struct cleanup *
-make_cleanup_py_decref (PyObject *py)
-{
-  return make_cleanup (py_decref, (void *) py);
-}
-
-/* This is a cleanup function which decrements the refcount on a
-   Python object.  This function accounts appropriately for NULL
-   references.  */
-
-static void
-py_xdecref (void *p)
-{
-  PyObject *py = p;
-
-  Py_XDECREF (py);
-}
-
-/* Return a new cleanup which will decrement the Python object's
-   refcount when run.  Account for and operate on NULL references
-   correctly.  */
-
-struct cleanup *
-make_cleanup_py_xdecref (PyObject *py)
-{
-  return make_cleanup (py_xdecref, py);
-}
+#include "py-ref.h"
 
 /* Converts a Python 8-bit string to a unicode string object.  Assumes the
    8-bit string is in the host charset.  If an error occurs during conversion,
@@ -107,25 +65,22 @@ python_string_to_unicode (PyObject *obj)
    conversion, NULL will be returned and a python exception will be set.
 
    The caller is responsible for xfree'ing the string.  */
-static char *
+static gdb::unique_xmalloc_ptr<char>
 unicode_to_encoded_string (PyObject *unicode_str, const char *charset)
 {
-  char *result;
-  PyObject *string;
+  gdb::unique_xmalloc_ptr<char> result;
 
   /* Translate string to named charset.  */
-  string = PyUnicode_AsEncodedString (unicode_str, charset, NULL);
+  gdbpy_ref<> string (PyUnicode_AsEncodedString (unicode_str, charset, NULL));
   if (string == NULL)
     return NULL;
 
 #ifdef IS_PY3K
-  result = xstrdup (PyBytes_AsString (string));
+  result.reset (xstrdup (PyBytes_AsString (string.get ())));
 #else
-  result = xstrdup (PyString_AsString (string));
+  result.reset (xstrdup (PyString_AsString (string.get ())));
 #endif
 
-  Py_DECREF (string);
-
   return result;
 }
 
@@ -140,12 +95,11 @@ unicode_to_encoded_python_string (PyObje
   return PyUnicode_AsEncodedString (unicode_str, charset, NULL);
 }
 
-/* Returns a newly allocated string with the contents of the given unicode
-   string object converted to the target's charset.  If an error occurs during
-   the conversion, NULL will be returned and a python exception will be set.
-
-   The caller is responsible for xfree'ing the string.  */
-char *
+/* Returns a newly allocated string with the contents of the given
+   unicode string object converted to the target's charset.  If an
+   error occurs during the conversion, NULL will be returned and a
+   python exception will be set.  */
+gdb::unique_xmalloc_ptr<char>
 unicode_to_target_string (PyObject *unicode_str)
 {
   return unicode_to_encoded_string (unicode_str,
@@ -164,22 +118,16 @@ unicode_to_target_python_string (PyObjec
 }
 
 /* Converts a python string (8-bit or unicode) to a target string in
-   the target's charset.  Returns NULL on error, with a python exception set.
-
-   The caller is responsible for xfree'ing the string.  */
-char *
+   the target's charset.  Returns NULL on error, with a python
+   exception set.  */
+gdb::unique_xmalloc_ptr<char>
 python_string_to_target_string (PyObject *obj)
 {
-  PyObject *str;
-  char *result;
-
-  str = python_string_to_unicode (obj);
+  gdbpy_ref<> str (python_string_to_unicode (obj));
   if (str == NULL)
     return NULL;
 
-  result = unicode_to_target_string (str);
-  Py_DECREF (str);
-  return result;
+  return unicode_to_target_string (str.get ());
 }
 
 /* Converts a python string (8-bit or unicode) to a target string in the
@@ -190,35 +138,32 @@ python_string_to_target_string (PyObject
 PyObject *
 python_string_to_target_python_string (PyObject *obj)
 {
-  PyObject *str;
-  PyObject *result;
-
-  str = python_string_to_unicode (obj);
+  gdbpy_ref<> str (python_string_to_unicode (obj));
   if (str == NULL)
     return NULL;
 
-  result = unicode_to_target_python_string (str);
-  Py_DECREF (str);
-  return result;
+  return unicode_to_target_python_string (str.get ());
 }
 
 /* Converts a python string (8-bit or unicode) to a target string in
-   the host's charset.  Returns NULL on error, with a python exception set.
-
-   The caller is responsible for xfree'ing the string.  */
-char *
+   the host's charset.  Returns NULL on error, with a python exception
+   set.  */
+gdb::unique_xmalloc_ptr<char>
 python_string_to_host_string (PyObject *obj)
 {
-  PyObject *str;
-  char *result;
-
-  str = python_string_to_unicode (obj);
+  gdbpy_ref<> str (python_string_to_unicode (obj));
   if (str == NULL)
     return NULL;
 
-  result = unicode_to_encoded_string (str, host_charset ());
-  Py_DECREF (str);
-  return result;
+  return unicode_to_encoded_string (str.get (), host_charset ());
+}
+
+/* Convert a host string to a python string.  */
+
+PyObject *
+host_string_to_python_string (const char *str)
+{
+  return PyString_Decode (str, strlen (str), host_charset (), NULL);
 }
 
 /* Return true if OBJ is a Python string or unicode object, false
@@ -235,23 +180,23 @@ gdbpy_is_string (PyObject *obj)
 }
 
 /* Return the string representation of OBJ, i.e., str (obj).
-   Space for the result is malloc'd, the caller must free.
    If the result is NULL a python error occurred, the caller must clear it.  */
 
-char *
+gdb::unique_xmalloc_ptr<char>
 gdbpy_obj_to_string (PyObject *obj)
 {
-  PyObject *str_obj = PyObject_Str (obj);
+  gdbpy_ref<> str_obj (PyObject_Str (obj));
 
   if (str_obj != NULL)
     {
+      gdb::unique_xmalloc_ptr<char> msg;
+
 #ifdef IS_PY3K
-      char *msg = python_string_to_host_string (str_obj);
+      msg = python_string_to_host_string (str_obj.get ());
 #else
-      char *msg = xstrdup (PyString_AsString (str_obj));
+      msg.reset (xstrdup (PyString_AsString (str_obj.get ())));
 #endif
 
-      Py_DECREF (str_obj);
       return msg;
     }
 
@@ -261,14 +206,11 @@ gdbpy_obj_to_string (PyObject *obj)
 /* Return the string representation of the exception represented by
    TYPE, VALUE which is assumed to have been obtained with PyErr_Fetch,
    i.e., the error indicator is currently clear.
-   Space for the result is malloc'd, the caller must free.
    If the result is NULL a python error occurred, the caller must clear it.  */
 
-char *
+gdb::unique_xmalloc_ptr<char>
 gdbpy_exception_to_string (PyObject *ptype, PyObject *pvalue)
 {
-  char *str;
-
   /* There are a few cases to consider.
      For example:
      pvalue is a string when PyErr_SetString is used.
@@ -280,11 +222,9 @@ gdbpy_exception_to_string (PyObject *pty
      gdb.GdbError ("message").  */
 
   if (pvalue && pvalue != Py_None)
-    str = gdbpy_obj_to_string (pvalue);
+    return gdbpy_obj_to_string (pvalue);
   else
-    str = gdbpy_obj_to_string (ptype);
-
-  return str;
+    return gdbpy_obj_to_string (ptype);
 }
 
 /* Convert a GDB exception to the appropriate Python exception.
@@ -329,14 +269,13 @@ get_addr_from_python (PyObject *obj, COR
     }
   else
     {
-      PyObject *num = PyNumber_Long (obj);
+      gdbpy_ref<> num (PyNumber_Long (obj));
       gdb_py_ulongest val;
 
       if (num == NULL)
 	return -1;
 
-      val = gdb_py_long_as_ulongest (num);
-      Py_XDECREF (num);
+      val = gdb_py_long_as_ulongest (num.get ());
       if (PyErr_Occurred ())
 	return -1;
 
@@ -420,7 +359,7 @@ PyObject *
 gdb_py_generic_dict (PyObject *self, void *closure)
 {
   PyObject *result;
-  PyTypeObject *type_obj = closure;
+  PyTypeObject *type_obj = (PyTypeObject *) closure;
   char *raw_ptr;
 
   raw_ptr = (char *) self + type_obj->tp_dictoffset;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-value.c ./gdb/python/py-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-value.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-value.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Python interface to values.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,6 +29,7 @@
 #include "python.h"
 
 #include "python-internal.h"
+#include "py-ref.h"
 
 /* Even though Python scalar types directly map to host types, we use
    target types here to remain consistent with the values system in
@@ -177,11 +178,10 @@ valpy_dereference (PyObject *self, PyObj
   TRY
     {
       struct value *res_val;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       res_val = value_ind (((value_object *) self)->value);
       result = value_to_value_object (res_val);
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -208,7 +208,7 @@ valpy_referenced_value (PyObject *self, 
   TRY
     {
       struct value *self_val, *res_val;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       self_val = ((value_object *) self)->value;
       switch (TYPE_CODE (check_typedef (value_type (self_val))))
@@ -225,7 +225,6 @@ valpy_referenced_value (PyObject *self, 
         }
 
       result = value_to_value_object (res_val);
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -246,12 +245,10 @@ valpy_reference_value (PyObject *self, P
   TRY
     {
       struct value *self_val;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       self_val = ((value_object *) self)->value;
       result = value_to_value_object (value_ref (self_val));
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -272,13 +269,11 @@ valpy_const_value (PyObject *self, PyObj
   TRY
     {
       struct value *self_val, *res_val;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       self_val = ((value_object *) self)->value;
       res_val = make_cv_value (1, 0, self_val);
       result = value_to_value_object (res_val);
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -300,12 +295,10 @@ valpy_get_address (PyObject *self, void 
       TRY
 	{
 	  struct value *res_val;
-	  struct cleanup *cleanup
-	    = make_cleanup_value_free_to_mark (value_mark ());
+	  scoped_value_mark free_values;
 
 	  res_val = value_addr (val_obj->value);
 	  val_obj->address = value_to_value_object (res_val);
-	  do_cleanups (cleanup);
 	}
       CATCH (except, RETURN_MASK_ALL)
 	{
@@ -353,10 +346,10 @@ valpy_get_dynamic_type (PyObject *self, 
   TRY
     {
       struct value *val = obj->value;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       type = value_type (val);
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
 
       if (((TYPE_CODE (type) == TYPE_CODE_PTR)
 	   || (TYPE_CODE (type) == TYPE_CODE_REF))
@@ -386,8 +379,6 @@ valpy_get_dynamic_type (PyObject *self, 
 	  /* Re-use object's static type.  */
 	  type = NULL;
 	}
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -427,7 +418,7 @@ valpy_lazy_string (PyObject *self, PyObj
 
   TRY
     {
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       if (TYPE_CODE (value_type (value)) == TYPE_CODE_PTR)
 	value = value_ind (value);
@@ -435,8 +426,6 @@ valpy_lazy_string (PyObject *self, PyObj
       str_obj = gdbpy_create_lazy_string_object (value_address (value), length,
 						 user_encoding,
 						 value_type (value));
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -513,7 +502,7 @@ valpy_do_cast (PyObject *self, PyObject 
     {
       struct value *val = ((value_object *) self)->value;
       struct value *res_val;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       if (op == UNOP_DYNAMIC_CAST)
 	res_val = value_dynamic_cast (type, val);
@@ -526,7 +515,6 @@ valpy_do_cast (PyObject *self, PyObject 
 	}
 
       result = value_to_value_object (res_val);
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -578,14 +566,13 @@ value_has_field (struct value *v, PyObje
 {
   struct type *parent_type, *val_type;
   enum type_code type_code;
-  PyObject *type_object = PyObject_GetAttrString (field, "parent_type");
+  gdbpy_ref<> type_object (PyObject_GetAttrString (field, "parent_type"));
   int has_field = 0;
 
   if (type_object == NULL)
     return -1;
 
-  parent_type = type_object_to_type (type_object);
-  Py_DECREF (type_object);
+  parent_type = type_object_to_type (type_object.get ());
   if (parent_type == NULL)
     {
       PyErr_SetString (PyExc_TypeError,
@@ -625,16 +612,12 @@ value_has_field (struct value *v, PyObje
 static int
 get_field_flag (PyObject *field, const char *flag_name)
 {
-  int flag_value;
-  PyObject *flag_object = PyObject_GetAttrString (field, flag_name);
+  gdbpy_ref<> flag_object (PyObject_GetAttrString (field, flag_name));
 
   if (flag_object == NULL)
     return -1;
 
-  flag_value = PyObject_IsTrue (flag_object);
-  Py_DECREF (flag_object);
-
-  return flag_value;
+  return PyObject_IsTrue (flag_object.get ());
 }
 
 /* Return the "type" attribute of a gdb.Field object.
@@ -643,13 +626,12 @@ get_field_flag (PyObject *field, const c
 static struct type *
 get_field_type (PyObject *field)
 {
-  PyObject *ftype_obj = PyObject_GetAttrString (field, "type");
+  gdbpy_ref<> ftype_obj (PyObject_GetAttrString (field, "type"));
   struct type *ftype;
 
   if (ftype_obj == NULL)
     return NULL;
-  ftype = type_object_to_type (ftype_obj);
-  Py_DECREF (ftype_obj);
+  ftype = type_object_to_type (ftype_obj.get ());
   if (ftype == NULL)
     PyErr_SetString (PyExc_TypeError,
 		     _("'type' attribute of gdb.Field object is not a "
@@ -667,7 +649,7 @@ valpy_getitem (PyObject *self, PyObject 
 {
   struct gdb_exception except = exception_none;
   value_object *self_value = (value_object *) self;
-  char *field = NULL;
+  gdb::unique_xmalloc_ptr<char> field;
   struct type *base_class_type = NULL, *field_type = NULL;
   long bitpos = -1;
   PyObject *result = NULL;
@@ -705,25 +687,19 @@ valpy_getitem (PyObject *self, PyObject 
 	}
       else
 	{
-	  PyObject *name_obj = PyObject_GetAttrString (key, "name");
+	  gdbpy_ref<> name_obj (PyObject_GetAttrString (key, "name"));
 
 	  if (name_obj == NULL)
 	    return NULL;
 
 	  if (name_obj != Py_None)
 	    {
-	      field = python_string_to_host_string (name_obj);
-	      Py_DECREF (name_obj);
+	      field = python_string_to_host_string (name_obj.get ());
 	      if (field == NULL)
 		return NULL;
 	    }
 	  else
 	    {
-	      PyObject *bitpos_obj;
-	      int valid;
-
-	      Py_DECREF (name_obj);
-
 	      if (!PyObject_HasAttrString (key, "bitpos"))
 		{
 		  PyErr_SetString (PyExc_AttributeError,
@@ -732,12 +708,10 @@ valpy_getitem (PyObject *self, PyObject 
 
 		  return NULL;
 		}
-	      bitpos_obj = PyObject_GetAttrString (key, "bitpos");
+	      gdbpy_ref<> bitpos_obj (PyObject_GetAttrString (key, "bitpos"));
 	      if (bitpos_obj == NULL)
 		return NULL;
-	      valid = gdb_py_int_as_long (bitpos_obj, &bitpos);
-	      Py_DECREF (bitpos_obj);
-	      if (!valid)
+	      if (!gdb_py_int_as_long (bitpos_obj.get (), &bitpos))
 		return NULL;
 
 	      field_type = get_field_type (key);
@@ -750,11 +724,12 @@ valpy_getitem (PyObject *self, PyObject 
   TRY
     {
       struct value *tmp = self_value->value;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
       struct value *res_val = NULL;
+      scoped_value_mark free_values;
 
       if (field)
-	res_val = value_struct_elt (&tmp, NULL, field, 0, NULL);
+	res_val = value_struct_elt (&tmp, NULL, field.get (), NULL,
+				    "struct/class/union");
       else if (bitpos >= 0)
 	res_val = value_struct_elt_bitpos (&tmp, bitpos, field_type,
 					   "struct/class/union");
@@ -795,7 +770,6 @@ valpy_getitem (PyObject *self, PyObject 
 
       if (res_val)
 	result = value_to_value_object (res_val);
-      do_cleanups (cleanup);
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
@@ -803,7 +777,6 @@ valpy_getitem (PyObject *self, PyObject 
     }
   END_CATCH
 
-  xfree (field);
   GDB_PY_HANDLE_EXCEPTION (except);
 
   return result;
@@ -858,7 +831,7 @@ valpy_call (PyObject *self, PyObject *ar
     {
       int i;
 
-      vargs = alloca (sizeof (struct value *) * args_count);
+      vargs = XALLOCAVEC (struct value *, args_count);
       for (i = 0; i < args_count; i++)
 	{
 	  PyObject *item = PyTuple_GetItem (args, i);
@@ -874,12 +847,11 @@ valpy_call (PyObject *self, PyObject *ar
 
   TRY
     {
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (mark);
+      scoped_value_mark free_values;
       struct value *return_value;
 
       return_value = call_function_by_hand (function, args_count, vargs);
       result = value_to_value_object (return_value);
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -895,23 +867,17 @@ valpy_call (PyObject *self, PyObject *ar
 static PyObject *
 valpy_str (PyObject *self)
 {
-  char *s = NULL;
-  PyObject *result;
   struct value_print_options opts;
 
   get_user_print_options (&opts);
   opts.deref_ref = 0;
 
+  string_file stb;
+
   TRY
     {
-      struct ui_file *stb = mem_fileopen ();
-      struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
-
-      common_val_print (((value_object *) self)->value, stb, 0,
+      common_val_print (((value_object *) self)->value, &stb, 0,
 			&opts, python_language);
-      s = ui_file_xstrdup (stb, NULL);
-
-      do_cleanups (old_chain);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -919,10 +885,7 @@ valpy_str (PyObject *self)
     }
   END_CATCH
 
-  result = PyUnicode_Decode (s, strlen (s), host_charset (), NULL);
-  xfree (s);
-
-  return result;
+  return PyUnicode_Decode (stb.c_str (), stb.size (), host_charset (), NULL);
 }
 
 /* Implements gdb.Value.is_optimized_out.  */
@@ -1018,133 +981,141 @@ enum valpy_opcode
 #define STRIP_REFERENCE(TYPE) \
   ((TYPE_CODE (TYPE) == TYPE_CODE_REF) ? (TYPE_TARGET_TYPE (TYPE)) : (TYPE))
 
-/* Returns a value object which is the result of applying the operation
-   specified by OPCODE to the given arguments.  Returns NULL on error, with
-   a python exception set.  */
+/* Helper for valpy_binop.  Returns a value object which is the result
+   of applying the operation specified by OPCODE to the given
+   arguments.  Throws a GDB exception on error.  */
+
 static PyObject *
-valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
+valpy_binop_throw (enum valpy_opcode opcode, PyObject *self, PyObject *other)
 {
   PyObject *result = NULL;
 
-  TRY
-    {
-      struct value *arg1, *arg2;
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
-      struct value *res_val = NULL;
-      enum exp_opcode op = OP_NULL;
-      int handled = 0;
-
-      /* If the gdb.Value object is the second operand, then it will be passed
-	 to us as the OTHER argument, and SELF will be an entirely different
-	 kind of object, altogether.  Because of this, we can't assume self is
-	 a gdb.Value object and need to convert it from python as well.  */
-      arg1 = convert_value_from_python (self);
-      if (arg1 == NULL)
-	{
-	  do_cleanups (cleanup);
-	  break;
-	}
+  struct value *arg1, *arg2;
+  struct value *res_val = NULL;
+  enum exp_opcode op = OP_NULL;
+  int handled = 0;
+
+  scoped_value_mark free_values;
+
+  /* If the gdb.Value object is the second operand, then it will be
+     passed to us as the OTHER argument, and SELF will be an entirely
+     different kind of object, altogether.  Because of this, we can't
+     assume self is a gdb.Value object and need to convert it from
+     python as well.  */
+  arg1 = convert_value_from_python (self);
+  if (arg1 == NULL)
+    return NULL;
 
-      arg2 = convert_value_from_python (other);
-      if (arg2 == NULL)
-	{
-	  do_cleanups (cleanup);
-	  break;
-	}
+  arg2 = convert_value_from_python (other);
+  if (arg2 == NULL)
+    return NULL;
 
-      switch (opcode)
-	{
-	case VALPY_ADD:
+  switch (opcode)
+    {
+    case VALPY_ADD:
+      {
+	struct type *ltype = value_type (arg1);
+	struct type *rtype = value_type (arg2);
+
+	ltype = check_typedef (ltype);
+	ltype = STRIP_REFERENCE (ltype);
+	rtype = check_typedef (rtype);
+	rtype = STRIP_REFERENCE (rtype);
+
+	handled = 1;
+	if (TYPE_CODE (ltype) == TYPE_CODE_PTR
+	    && is_integral_type (rtype))
+	  res_val = value_ptradd (arg1, value_as_long (arg2));
+	else if (TYPE_CODE (rtype) == TYPE_CODE_PTR
+		 && is_integral_type (ltype))
+	  res_val = value_ptradd (arg2, value_as_long (arg1));
+	else
 	  {
-	    struct type *ltype = value_type (arg1);
-	    struct type *rtype = value_type (arg2);
-
-	    CHECK_TYPEDEF (ltype);
-	    ltype = STRIP_REFERENCE (ltype);
-	    CHECK_TYPEDEF (rtype);
-	    rtype = STRIP_REFERENCE (rtype);
-
-	    handled = 1;
-	    if (TYPE_CODE (ltype) == TYPE_CODE_PTR
-		&& is_integral_type (rtype))
-	      res_val = value_ptradd (arg1, value_as_long (arg2));
-	    else if (TYPE_CODE (rtype) == TYPE_CODE_PTR
-		     && is_integral_type (ltype))
-	      res_val = value_ptradd (arg2, value_as_long (arg1));
-	    else
-	      {
-		handled = 0;
-		op = BINOP_ADD;
-	      }
+	    handled = 0;
+	    op = BINOP_ADD;
 	  }
-	  break;
-	case VALPY_SUB:
+      }
+      break;
+    case VALPY_SUB:
+      {
+	struct type *ltype = value_type (arg1);
+	struct type *rtype = value_type (arg2);
+
+	ltype = check_typedef (ltype);
+	ltype = STRIP_REFERENCE (ltype);
+	rtype = check_typedef (rtype);
+	rtype = STRIP_REFERENCE (rtype);
+
+	handled = 1;
+	if (TYPE_CODE (ltype) == TYPE_CODE_PTR
+	    && TYPE_CODE (rtype) == TYPE_CODE_PTR)
+	  /* A ptrdiff_t for the target would be preferable here.  */
+	  res_val = value_from_longest (builtin_type_pyint,
+					value_ptrdiff (arg1, arg2));
+	else if (TYPE_CODE (ltype) == TYPE_CODE_PTR
+		 && is_integral_type (rtype))
+	  res_val = value_ptradd (arg1, - value_as_long (arg2));
+	else
 	  {
-	    struct type *ltype = value_type (arg1);
-	    struct type *rtype = value_type (arg2);
-
-	    CHECK_TYPEDEF (ltype);
-	    ltype = STRIP_REFERENCE (ltype);
-	    CHECK_TYPEDEF (rtype);
-	    rtype = STRIP_REFERENCE (rtype);
-
-	    handled = 1;
-	    if (TYPE_CODE (ltype) == TYPE_CODE_PTR
-		&& TYPE_CODE (rtype) == TYPE_CODE_PTR)
-	      /* A ptrdiff_t for the target would be preferable here.  */
-	      res_val = value_from_longest (builtin_type_pyint,
-					    value_ptrdiff (arg1, arg2));
-	    else if (TYPE_CODE (ltype) == TYPE_CODE_PTR
-		     && is_integral_type (rtype))
-	      res_val = value_ptradd (arg1, - value_as_long (arg2));
-	    else
-	      {
-		handled = 0;
-		op = BINOP_SUB;
-	      }
+	    handled = 0;
+	    op = BINOP_SUB;
 	  }
-	  break;
-	case VALPY_MUL:
-	  op = BINOP_MUL;
-	  break;
-	case VALPY_DIV:
-	  op = BINOP_DIV;
-	  break;
-	case VALPY_REM:
-	  op = BINOP_REM;
-	  break;
-	case VALPY_POW:
-	  op = BINOP_EXP;
-	  break;
-	case VALPY_LSH:
-	  op = BINOP_LSH;
-	  break;
-	case VALPY_RSH:
-	  op = BINOP_RSH;
-	  break;
-	case VALPY_BITAND:
-	  op = BINOP_BITWISE_AND;
-	  break;
-	case VALPY_BITOR:
-	  op = BINOP_BITWISE_IOR;
-	  break;
-	case VALPY_BITXOR:
-	  op = BINOP_BITWISE_XOR;
-	  break;
-	}
+      }
+      break;
+    case VALPY_MUL:
+      op = BINOP_MUL;
+      break;
+    case VALPY_DIV:
+      op = BINOP_DIV;
+      break;
+    case VALPY_REM:
+      op = BINOP_REM;
+      break;
+    case VALPY_POW:
+      op = BINOP_EXP;
+      break;
+    case VALPY_LSH:
+      op = BINOP_LSH;
+      break;
+    case VALPY_RSH:
+      op = BINOP_RSH;
+      break;
+    case VALPY_BITAND:
+      op = BINOP_BITWISE_AND;
+      break;
+    case VALPY_BITOR:
+      op = BINOP_BITWISE_IOR;
+      break;
+    case VALPY_BITXOR:
+      op = BINOP_BITWISE_XOR;
+      break;
+    }
 
-      if (!handled)
-	{
-	  if (binop_user_defined_p (op, arg1, arg2))
-	    res_val = value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
-	  else
-	    res_val = value_binop (arg1, arg2, op);
-	}
+  if (!handled)
+    {
+      if (binop_user_defined_p (op, arg1, arg2))
+	res_val = value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
+      else
+	res_val = value_binop (arg1, arg2, op);
+    }
 
-      if (res_val)
-	result = value_to_value_object (res_val);
+  if (res_val)
+    result = value_to_value_object (res_val);
 
-      do_cleanups (cleanup);
+  return result;
+}
+
+/* Returns a value object which is the result of applying the operation
+   specified by OPCODE to the given arguments.  Returns NULL on error, with
+   a python exception set.  */
+static PyObject *
+valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
+{
+  PyObject *result = NULL;
+
+  TRY
+    {
+      result = valpy_binop_throw (opcode, self, other);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1209,12 +1180,11 @@ valpy_negative (PyObject *self)
   TRY
     {
       /* Perhaps overkill, but consistency has some virtue.  */
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
       struct value *val;
 
       val = value_neg (((value_object *) self)->value);
       result = value_to_value_object (val);
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1239,12 +1209,10 @@ valpy_absolute (PyObject *self)
 
   TRY
     {
-      struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
+      scoped_value_mark free_values;
 
       if (value_less (value, value_zero (value_type (value), not_lval)))
 	isabs = 0;
-
-      do_cleanups (cleanup);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1351,6 +1319,60 @@ valpy_xor (PyObject *self, PyObject *oth
   return valpy_binop (VALPY_BITXOR, self, other);
 }
 
+/* Helper for valpy_richcompare.  Implements comparison operations for
+   value objects.  Returns true/false on success.  Returns -1 with a
+   Python exception set if a Python error is detected.  Throws a GDB
+   exception on other errors (memory error, etc.).  */
+
+static int
+valpy_richcompare_throw (PyObject *self, PyObject *other, int op)
+{
+  int result;
+  struct value *value_other;
+  struct value *value_self;
+
+  scoped_value_mark free_values;
+
+  value_other = convert_value_from_python (other);
+  if (value_other == NULL)
+    return -1;
+
+  value_self = ((value_object *) self)->value;
+
+  switch (op)
+    {
+    case Py_LT:
+      result = value_less (value_self, value_other);
+      break;
+    case Py_LE:
+      result = value_less (value_self, value_other)
+	|| value_equal (value_self, value_other);
+      break;
+    case Py_EQ:
+      result = value_equal (value_self, value_other);
+      break;
+    case Py_NE:
+      result = !value_equal (value_self, value_other);
+      break;
+    case Py_GT:
+      result = value_less (value_other, value_self);
+      break;
+    case Py_GE:
+      result = (value_less (value_other, value_self)
+		|| value_equal (value_self, value_other));
+      break;
+    default:
+      /* Can't happen.  */
+      PyErr_SetString (PyExc_NotImplementedError,
+		       _("Invalid operation on gdb.Value."));
+      result = -1;
+      break;
+    }
+
+  return result;
+}
+
+
 /* Implements comparison operations for value objects.  Returns NULL on error,
    with a python exception set.  */
 static PyObject *
@@ -1379,48 +1401,7 @@ valpy_richcompare (PyObject *self, PyObj
 
   TRY
     {
-      struct value *value_other, *mark = value_mark ();
-      struct cleanup *cleanup;
-
-      value_other = convert_value_from_python (other);
-      if (value_other == NULL)
-	{
-	  result = -1;
-	  break;
-	}
-
-      cleanup = make_cleanup_value_free_to_mark (mark);
-
-      switch (op) {
-        case Py_LT:
-	  result = value_less (((value_object *) self)->value, value_other);
-	  break;
-	case Py_LE:
-	  result = value_less (((value_object *) self)->value, value_other)
-	    || value_equal (((value_object *) self)->value, value_other);
-	  break;
-	case Py_EQ:
-	  result = value_equal (((value_object *) self)->value, value_other);
-	  break;
-	case Py_NE:
-	  result = !value_equal (((value_object *) self)->value, value_other);
-	  break;
-        case Py_GT:
-	  result = value_less (value_other, ((value_object *) self)->value);
-	  break;
-	case Py_GE:
-	  result = value_less (value_other, ((value_object *) self)->value)
-	    || value_equal (((value_object *) self)->value, value_other);
-	  break;
-	default:
-	  /* Can't happen.  */
-	  PyErr_SetString (PyExc_NotImplementedError,
-			   _("Invalid operation on gdb.Value."));
-	  result = -1;
-	  break;
-      }
-
-      do_cleanups (cleanup);
+      result = valpy_richcompare_throw (self, other, op);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1474,7 +1455,7 @@ valpy_long (PyObject *self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
 
       if (!is_integral_type (type)
 	  && TYPE_CODE (type) != TYPE_CODE_PTR)
@@ -1488,7 +1469,10 @@ valpy_long (PyObject *self)
     }
   END_CATCH
 
-  return gdb_py_long_from_longest (l);
+  if (TYPE_UNSIGNED (type))
+    return gdb_py_long_from_ulongest (l);
+  else
+    return gdb_py_long_from_longest (l);
 }
 
 /* Implements conversion to float.  */
@@ -1501,7 +1485,7 @@ valpy_float (PyObject *self)
 
   TRY
     {
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
 
       if (TYPE_CODE (type) != TYPE_CODE_FLT)
 	error (_("Cannot convert value to float."));
@@ -1588,13 +1572,13 @@ convert_value_from_python (PyObject *obj
 	         ULONGEST instead.  */
 	      if (PyErr_ExceptionMatches (PyExc_OverflowError))
 		{
-		  PyObject *etype, *evalue, *etraceback, *zero;
+		  PyObject *etype, *evalue, *etraceback;
 
 		  PyErr_Fetch (&etype, &evalue, &etraceback);
-		  zero = PyInt_FromLong (0);
+		  gdbpy_ref<> zero (PyInt_FromLong (0));
 
 		  /* Check whether obj is positive.  */
-		  if (PyObject_RichCompareBool (obj, zero, Py_GT) > 0)
+		  if (PyObject_RichCompareBool (obj, zero.get (), Py_GT) > 0)
 		    {
 		      ULONGEST ul;
 
@@ -1605,13 +1589,12 @@ convert_value_from_python (PyObject *obj
 		  else
 		    /* There's nothing we can do.  */
 		    PyErr_Restore (etype, evalue, etraceback);
-
-		  Py_DECREF (zero);
 		}
 	    }
 	  else
 	    value = value_from_longest (builtin_type_pylong, l);
 	}
+#if PY_MAJOR_VERSION == 2
       else if (PyInt_Check (obj))
 	{
 	  long l = PyInt_AsLong (obj);
@@ -1619,6 +1602,7 @@ convert_value_from_python (PyObject *obj
 	  if (! PyErr_Occurred ())
 	    value = value_from_longest (builtin_type_pyint, l);
 	}
+#endif
       else if (PyFloat_Check (obj))
 	{
 	  double d = PyFloat_AsDouble (obj);
@@ -1628,17 +1612,11 @@ convert_value_from_python (PyObject *obj
 	}
       else if (gdbpy_is_string (obj))
 	{
-	  char *s;
-
-	  s = python_string_to_target_string (obj);
+	  gdb::unique_xmalloc_ptr<char> s
+	    = python_string_to_target_string (obj);
 	  if (s != NULL)
-	    {
-	      struct cleanup *old;
-
-	      old = make_cleanup (xfree, s);
-	      value = value_cstring (s, strlen (s), builtin_type_pychar);
-	      do_cleanups (old);
-	    }
+	    value = value_cstring (s.get (), strlen (s.get ()),
+				   builtin_type_pychar);
 	}
       else if (PyObject_TypeCheck (obj, &value_object_type))
 	value = value_copy (((value_object *) obj)->value);
@@ -1797,6 +1775,9 @@ static PyNumberMethods value_object_as_n
   NULL,                       /* nb_inplace_add */
   NULL,                       /* nb_inplace_subtract */
   NULL,                       /* nb_inplace_multiply */
+#ifndef IS_PY3K
+  NULL,                       /* nb_inplace_divide */
+#endif
   NULL,                       /* nb_inplace_remainder */
   NULL,                       /* nb_inplace_power */
   NULL,                       /* nb_inplace_lshift */
@@ -1805,7 +1786,13 @@ static PyNumberMethods value_object_as_n
   NULL,                       /* nb_inplace_xor */
   NULL,                       /* nb_inplace_or */
   NULL,                       /* nb_floor_divide */
-  valpy_divide                /* nb_true_divide */
+  valpy_divide,               /* nb_true_divide */
+  NULL,			      /* nb_inplace_floor_divide */
+  NULL,			      /* nb_inplace_true_divide */
+#ifndef HAVE_LIBPYTHON2_4
+  /* This was added in Python 2.5.  */
+  valpy_long,		      /* nb_index */
+#endif /* HAVE_LIBPYTHON2_4 */
 };
 
 static PyMappingMethods value_object_as_mapping = {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-varobj.c ./gdb/python/py-varobj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-varobj.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-varobj.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 #include "python-internal.h"
 #include "varobj.h"
 #include "varobj-iter.h"
+#include "py-ref.h"
 
 /* A dynamic varobj iterator "class" for python pretty-printed
    varobjs.  This inherits struct varobj_iter.  */
@@ -38,11 +39,8 @@ static void
 py_varobj_iter_dtor (struct varobj_iter *self)
 {
   struct py_varobj_iter *dis = (struct py_varobj_iter *) self;
-  struct cleanup *back_to = varobj_ensure_python_env (self->var);
-
+  gdbpy_enter_varobj enter_py (self->var);
   Py_XDECREF (dis->iter);
-
-  do_cleanups (back_to);
 }
 
 /* Implementation of the 'next' method of pretty-printed varobj
@@ -52,8 +50,6 @@ static varobj_item *
 py_varobj_iter_next (struct varobj_iter *self)
 {
   struct py_varobj_iter *t = (struct py_varobj_iter *) self;
-  struct cleanup *back_to;
-  PyObject *item;
   PyObject *py_v;
   varobj_item *vitem;
   const char *name = NULL;
@@ -61,9 +57,9 @@ py_varobj_iter_next (struct varobj_iter 
   if (!gdb_python_initialized)
     return NULL;
 
-  back_to = varobj_ensure_python_env (self->var);
+  gdbpy_enter_varobj enter_py (self->var);
 
-  item = PyIter_Next (t->iter);
+  gdbpy_ref<> item (PyIter_Next (t->iter));
 
   if (item == NULL)
     {
@@ -75,10 +71,11 @@ py_varobj_iter_next (struct varobj_iter 
       if (PyErr_ExceptionMatches (gdbpy_gdb_memory_error))
 	{
 	  PyObject *type, *value, *trace;
-	  char *name_str, *value_str;
+	  char *name_str;
 
 	  PyErr_Fetch (&type, &value, &trace);
-	  value_str = gdbpy_exception_to_string (type, value);
+	  gdb::unique_xmalloc_ptr<char>
+	    value_str (gdbpy_exception_to_string (type, value));
 	  Py_XDECREF (type);
 	  Py_XDECREF (value);
 	  Py_XDECREF (trace);
@@ -90,9 +87,8 @@ py_varobj_iter_next (struct varobj_iter 
 
 	  name_str = xstrprintf ("<error at %d>",
 				 self->next_raw_index++);
-	  item = Py_BuildValue ("(ss)", name_str, value_str);
+	  item.reset (Py_BuildValue ("(ss)", name_str, value_str.get ()));
 	  xfree (name_str);
-	  xfree (value_str);
 	  if (item == NULL)
 	    {
 	      gdbpy_print_stack ();
@@ -107,20 +103,19 @@ py_varobj_iter_next (struct varobj_iter 
 	}
     }
 
-  if (!PyArg_ParseTuple (item, "sO", &name, &py_v))
+  if (!PyArg_ParseTuple (item.get (), "sO", &name, &py_v))
     {
       gdbpy_print_stack ();
       error (_("Invalid item from the child list"));
     }
 
-  vitem = xmalloc (sizeof *vitem);
+  vitem = new varobj_item ();
   vitem->value = convert_value_from_python (py_v);
   if (vitem->value == NULL)
     gdbpy_print_stack ();
-  vitem->name = xstrdup (name);
+  vitem->name = name;
 
   self->next_raw_index++;
-  do_cleanups (back_to);
   return vitem;
 }
 
@@ -167,29 +162,23 @@ py_varobj_iter_new (struct varobj *var, 
 struct varobj_iter *
 py_varobj_get_iterator (struct varobj *var, PyObject *printer)
 {
-  PyObject *children;
-  int i;
   PyObject *iter;
   struct py_varobj_iter *py_iter;
-  struct cleanup *back_to = varobj_ensure_python_env (var);
+
+  gdbpy_enter_varobj enter_py (var);
 
   if (!PyObject_HasAttr (printer, gdbpy_children_cst))
-    {
-      do_cleanups (back_to);
-      return NULL;
-    }
+    return NULL;
 
-  children = PyObject_CallMethodObjArgs (printer, gdbpy_children_cst,
-					 NULL);
+  gdbpy_ref<> children (PyObject_CallMethodObjArgs (printer, gdbpy_children_cst,
+						    NULL));
   if (children == NULL)
     {
       gdbpy_print_stack ();
       error (_("Null value returned for children"));
     }
 
-  make_cleanup_py_decref (children);
-
-  iter = PyObject_GetIter (children);
+  iter = PyObject_GetIter (children.get ());
   if (iter == NULL)
     {
       gdbpy_print_stack ();
@@ -198,7 +187,5 @@ py_varobj_get_iterator (struct varobj *v
 
   py_iter = py_varobj_iter_new (var, iter);
 
-  do_cleanups (back_to);
-
   return &py_iter->base;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-xmethods.c ./gdb/python/py-xmethods.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/python/py-xmethods.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/python/py-xmethods.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support for debug methods in Python.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,18 +26,16 @@
 
 #include "python.h"
 #include "python-internal.h"
+#include "py-ref.h"
 
 static const char enabled_field_name[] = "enabled";
 static const char match_method_name[] = "match";
 static const char get_arg_types_method_name[] = "get_arg_types";
 static const char get_result_type_method_name[] = "get_result_type";
-static const char invoke_method_name[] = "invoke";
 static const char matchers_attr_str[] = "xmethods";
 
 static PyObject *py_match_method_name = NULL;
 static PyObject *py_get_arg_types_method_name = NULL;
-static PyObject *py_get_result_type_method_name = NULL;
-static PyObject *py_invoke_method_name = NULL;
 
 struct gdbpy_worker_data
 {
@@ -54,19 +52,16 @@ void
 gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang,
 				void *data)
 {
-  struct gdbpy_worker_data *worker_data = data;
-  struct cleanup *cleanups;
+  struct gdbpy_worker_data *worker_data = (struct gdbpy_worker_data *) data;
 
   gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
 
   /* We don't do much here, but we still need the GIL.  */
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   Py_DECREF (worker_data->worker);
   Py_DECREF (worker_data->this_type);
   xfree (worker_data);
-
-  do_cleanups (cleanups);
 }
 
 /* Implementation of clone_xmethod_worker_data for Python.  */
@@ -75,13 +70,13 @@ void *
 gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang,
 				 void *data)
 {
-  struct gdbpy_worker_data *worker_data = data, *new_data;
-  struct cleanup *cleanups;
+  struct gdbpy_worker_data *worker_data
+    = (struct gdbpy_worker_data *) data, *new_data;
 
   gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
 
   /* We don't do much here, but we still need the GIL.  */
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   new_data = XCNEW (struct gdbpy_worker_data);
   new_data->worker = worker_data->worker;
@@ -89,8 +84,6 @@ gdbpy_clone_xmethod_worker_data (const s
   Py_INCREF (new_data->worker);
   Py_INCREF (new_data->this_type);
 
-  do_cleanups (cleanups);
-
   return new_data;
 }
 
@@ -101,59 +94,34 @@ static PyObject *
 invoke_match_method (PyObject *matcher, PyObject *py_obj_type,
 		     const char *xmethod_name)
 {
-  PyObject *py_xmethod_name;
-  PyObject *match_method, *enabled_field, *match_result;
-  struct cleanup *cleanups;
   int enabled;
 
-  cleanups = make_cleanup (null_cleanup, NULL);
-
-  enabled_field = PyObject_GetAttrString (matcher, enabled_field_name);
+  gdbpy_ref<> enabled_field (PyObject_GetAttrString (matcher,
+						     enabled_field_name));
   if (enabled_field == NULL)
-    {
-      do_cleanups (cleanups);
-      return NULL;
-    }
-  make_cleanup_py_decref (enabled_field);
+    return NULL;
 
-  enabled = PyObject_IsTrue (enabled_field);
+  enabled = PyObject_IsTrue (enabled_field.get ());
   if (enabled == -1)
-    {
-      do_cleanups (cleanups);
-      return NULL;
-    }
+    return NULL;
   if (enabled == 0)
     {
       /* Return 'None' if the matcher is not enabled.  */
-      do_cleanups (cleanups);
       Py_RETURN_NONE;
     }
 
-  match_method = PyObject_GetAttrString (matcher, match_method_name);
+  gdbpy_ref<> match_method (PyObject_GetAttrString (matcher,
+						    match_method_name));
   if (match_method == NULL)
-    {
-      do_cleanups (cleanups);
-      return NULL;
-    }
-  make_cleanup_py_decref (match_method);
+    return NULL;
 
-  py_xmethod_name = PyString_FromString (xmethod_name);
+  gdbpy_ref<> py_xmethod_name (PyString_FromString (xmethod_name));
   if (py_xmethod_name == NULL)
-    {
-      do_cleanups (cleanups);
-      return NULL;
-    }
-  make_cleanup_py_decref (py_xmethod_name);
-
-  match_result = PyObject_CallMethodObjArgs (matcher,
-					     py_match_method_name,
-					     py_obj_type,
-					     py_xmethod_name,
-					     NULL);
+    return NULL;
 
-  do_cleanups (cleanups);
-
-  return match_result;
+  return PyObject_CallMethodObjArgs (matcher, py_match_method_name,
+				     py_obj_type, py_xmethod_name.get (),
+				     NULL);
 }
 
 /* Implementation of get_matching_xmethod_workers for Python.  */
@@ -164,33 +132,26 @@ gdbpy_get_matching_xmethod_workers
    struct type *obj_type, const char *method_name,
    xmethod_worker_vec **dm_vec)
 {
-  struct cleanup *cleanups;
   struct objfile *objfile;
   VEC (xmethod_worker_ptr) *worker_vec = NULL;
-  PyObject *py_type, *py_progspace;
-  PyObject *py_xmethod_matcher_list = NULL, *list_iter, *matcher;
+  PyObject *py_progspace;
 
   gdb_assert (obj_type != NULL && method_name != NULL);
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
-  py_type = type_to_type_object (obj_type);
+  gdbpy_ref<> py_type (type_to_type_object (obj_type));
   if (py_type == NULL)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
-  make_cleanup_py_decref (py_type);
 
   /* Create an empty list of debug methods.  */
-  py_xmethod_matcher_list = PyList_New (0);
+  gdbpy_ref<> py_xmethod_matcher_list (PyList_New (0));
   if (py_xmethod_matcher_list == NULL)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
 
@@ -200,28 +161,23 @@ gdbpy_get_matching_xmethod_workers
   ALL_OBJFILES (objfile)
     {
       PyObject *py_objfile = objfile_to_objfile_object (objfile);
-      PyObject *objfile_matchers, *temp = py_xmethod_matcher_list;
 
       if (py_objfile == NULL)
 	{
 	  gdbpy_print_stack ();
-	  Py_DECREF (py_xmethod_matcher_list);
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
 
-      objfile_matchers = objfpy_get_xmethods (py_objfile, NULL);
-      py_xmethod_matcher_list = PySequence_Concat (temp, objfile_matchers);
-      Py_DECREF (temp);
-      Py_DECREF (objfile_matchers);
-      if (py_xmethod_matcher_list == NULL)
+      gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile, NULL));
+      gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
+					   objfile_matchers.get ()));
+      if (temp == NULL)
 	{
 	  gdbpy_print_stack ();
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
+
+      py_xmethod_matcher_list = std::move (temp);
     }
 
   /* Gather debug methods matchers registered with the current program
@@ -229,26 +185,21 @@ gdbpy_get_matching_xmethod_workers
   py_progspace = pspace_to_pspace_object (current_program_space);
   if (py_progspace != NULL)
     {
-      PyObject *temp = py_xmethod_matcher_list;
-      PyObject *pspace_matchers = pspy_get_xmethods (py_progspace, NULL);
+      gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace, NULL));
 
-      py_xmethod_matcher_list = PySequence_Concat (temp, pspace_matchers);
-      Py_DECREF (temp);
-      Py_DECREF (pspace_matchers);
-      if (py_xmethod_matcher_list == NULL)
+      gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
+					   pspace_matchers.get ()));
+      if (temp == NULL)
 	{
 	  gdbpy_print_stack ();
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
+
+      py_xmethod_matcher_list = std::move (temp);
     }
   else
     {
       gdbpy_print_stack ();
-      Py_DECREF (py_xmethod_matcher_list);
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
 
@@ -256,117 +207,96 @@ gdbpy_get_matching_xmethod_workers
   if (gdb_python_module != NULL
       && PyObject_HasAttrString (gdb_python_module, matchers_attr_str))
     {
-      PyObject *gdb_matchers;
-      PyObject *temp = py_xmethod_matcher_list;
-
-      gdb_matchers = PyObject_GetAttrString (gdb_python_module,
-					     matchers_attr_str);
+      gdbpy_ref<> gdb_matchers (PyObject_GetAttrString (gdb_python_module,
+							matchers_attr_str));
       if (gdb_matchers != NULL)
 	{
-	  py_xmethod_matcher_list = PySequence_Concat (temp, gdb_matchers);
-	  Py_DECREF (temp);
-	  Py_DECREF (gdb_matchers);
-	  if (py_xmethod_matcher_list == NULL)
+	  gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
+					       gdb_matchers.get ()));
+	  if (temp == NULL)
 	    {
 	      gdbpy_print_stack ();
-	      do_cleanups (cleanups);
-
 	      return EXT_LANG_RC_ERROR;
 	    }
+
+	  py_xmethod_matcher_list = std::move (temp);
 	}
       else
 	{
 	  gdbpy_print_stack ();
-	  Py_DECREF (py_xmethod_matcher_list);
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
     }
 
-  /* Safe to make a cleanup for py_xmethod_matcher_list now as it
-     will not change any more.  */
-  make_cleanup_py_decref (py_xmethod_matcher_list);
-
-  list_iter = PyObject_GetIter (py_xmethod_matcher_list);
+  gdbpy_ref<> list_iter (PyObject_GetIter (py_xmethod_matcher_list.get ()));
   if (list_iter == NULL)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
-  while ((matcher = PyIter_Next (list_iter)) != NULL)
+  while (true)
     {
-      PyObject *match_result = invoke_match_method (matcher, py_type,
-						    method_name);
+      gdbpy_ref<> matcher (PyIter_Next (list_iter.get ()));
+      if (matcher == NULL)
+	{
+	  if (PyErr_Occurred ())
+	    {
+	      gdbpy_print_stack ();
+	      return EXT_LANG_RC_ERROR;
+	    }
+	  break;
+	}
+
+      gdbpy_ref<> match_result (invoke_match_method (matcher.get (),
+						     py_type.get (),
+						     method_name));
 
       if (match_result == NULL)
 	{
 	  gdbpy_print_stack ();
-	  Py_DECREF (matcher);
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
       if (match_result == Py_None)
 	; /* This means there was no match.  */
-      else if (PySequence_Check (match_result))
+      else if (PySequence_Check (match_result.get ()))
 	{
-	  PyObject *iter = PyObject_GetIter (match_result);
-	  PyObject *py_worker;
+	  gdbpy_ref<> iter (PyObject_GetIter (match_result.get ()));
 
 	  if (iter == NULL)
 	    {
 	      gdbpy_print_stack ();
-	      Py_DECREF (matcher);
-	      Py_DECREF (match_result);
-	      do_cleanups (cleanups);
-
 	      return EXT_LANG_RC_ERROR;
 	    }
-	  while ((py_worker = PyIter_Next (iter)) != NULL)
+	  while (true)
 	    {
 	      struct xmethod_worker *worker;
 
-	      worker = new_python_xmethod_worker (py_worker, py_type);
-	      VEC_safe_push (xmethod_worker_ptr, worker_vec, worker);
-	      Py_DECREF (py_worker);
-	    }
-	  Py_DECREF (iter);
-	  /* Report any error that could have occurred while iterating.  */
-	  if (PyErr_Occurred ())
-	    {
-	      gdbpy_print_stack ();
-	      Py_DECREF (matcher);
-	      Py_DECREF (match_result);
-	      do_cleanups (cleanups);
+	      gdbpy_ref<> py_worker (PyIter_Next (iter.get ()));
+	      if (py_worker == NULL)
+		{
+		  if (PyErr_Occurred ())
+		    {
+		      gdbpy_print_stack ();
+		      return EXT_LANG_RC_ERROR;
+		    }
+		  break;
+		}
 
-	      return EXT_LANG_RC_ERROR;
+	      worker = new_python_xmethod_worker (py_worker.get (),
+						  py_type.get ());
+	      VEC_safe_push (xmethod_worker_ptr, worker_vec, worker);
 	    }
 	}
       else
 	{
 	  struct xmethod_worker *worker;
 
-	  worker = new_python_xmethod_worker (match_result, py_type);
+	  worker = new_python_xmethod_worker (match_result.get (),
+					      py_type.get ());
 	  VEC_safe_push (xmethod_worker_ptr, worker_vec, worker);
 	}
-
-      Py_DECREF (match_result);
-      Py_DECREF (matcher);
-    }
-  Py_DECREF (list_iter);
-  /* Report any error that could have occurred while iterating.  */
-  if (PyErr_Occurred ())
-    {
-      gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
-      return EXT_LANG_RC_ERROR;
     }
 
-  do_cleanups (cleanups);
   *dm_vec = worker_vec;
 
   return EXT_LANG_RC_OK;
@@ -379,88 +309,88 @@ gdbpy_get_xmethod_arg_types (const struc
 			     struct xmethod_worker *worker,
 			     int *nargs, struct type ***arg_types)
 {
-  struct gdbpy_worker_data *worker_data = worker->data;
+  /* The gdbpy_enter object needs to be placed first, so that it's the last to
+     be destroyed.  */
+  gdbpy_enter enter_py (get_current_arch (), current_language);
+  struct gdbpy_worker_data *worker_data
+    = (struct gdbpy_worker_data *) worker->data;
   PyObject *py_worker = worker_data->worker;
-  PyObject *get_arg_types_method;
-  PyObject *py_argtype_list, *list_iter = NULL, *item;
-  struct cleanup *cleanups;
-  struct type **type_array, *obj_type;
+  struct type *obj_type;
   int i = 1, arg_count;
+  gdbpy_ref<> list_iter;
 
   /* Set nargs to -1 so that any premature return from this function returns
      an invalid/unusable number of arg types.  */
   *nargs = -1;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
-
-  get_arg_types_method =  PyObject_GetAttrString (py_worker,
-						  get_arg_types_method_name);
+  gdbpy_ref<> get_arg_types_method
+    (PyObject_GetAttrString (py_worker, get_arg_types_method_name));
   if (get_arg_types_method == NULL)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
-  make_cleanup_py_decref (get_arg_types_method);
 
-  py_argtype_list = PyObject_CallMethodObjArgs (py_worker,
-						py_get_arg_types_method_name,
-						NULL);
+  gdbpy_ref<> py_argtype_list
+    (PyObject_CallMethodObjArgs (py_worker, py_get_arg_types_method_name,
+				 NULL));
   if (py_argtype_list == NULL)
     {
       gdbpy_print_stack ();
-      do_cleanups (cleanups);
-
       return EXT_LANG_RC_ERROR;
     }
-  make_cleanup_py_decref (py_argtype_list);
+
   if (py_argtype_list == Py_None)
     arg_count = 0;
-  else if (PySequence_Check (py_argtype_list))
+  else if (PySequence_Check (py_argtype_list.get ()))
     {
-      arg_count = PySequence_Size (py_argtype_list);
+      arg_count = PySequence_Size (py_argtype_list.get ());
       if (arg_count == -1)
 	{
 	  gdbpy_print_stack ();
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
 
-      list_iter = PyObject_GetIter (py_argtype_list);
+      list_iter.reset (PyObject_GetIter (py_argtype_list.get ()));
       if (list_iter == NULL)
 	{
 	  gdbpy_print_stack ();
-	  do_cleanups (cleanups);
-
 	  return EXT_LANG_RC_ERROR;
 	}
-      make_cleanup_py_decref (list_iter);
     }
   else
     arg_count = 1;
 
   /* Include the 'this' argument in the size.  */
-  type_array = XCNEWVEC (struct type *, arg_count + 1);
+  gdb::unique_xmalloc_ptr<struct type *> type_array
+    (XCNEWVEC (struct type *, arg_count + 1));
   i = 1;
   if (list_iter != NULL)
     {
-      while ((item = PyIter_Next (list_iter)) != NULL)
+      while (true)
 	{
-	  struct type *arg_type = type_object_to_type (item);
+	  gdbpy_ref<> item (PyIter_Next (list_iter.get ()));
+	  if (item == NULL)
+	    {
+	      if (PyErr_Occurred ())
+		{
+		  gdbpy_print_stack ();
+		  return EXT_LANG_RC_ERROR;
+		}
+	      break;
+	    }
 
-	  Py_DECREF (item);
+	  struct type *arg_type = type_object_to_type (item.get ());
 	  if (arg_type == NULL)
 	    {
 	      PyErr_SetString (PyExc_TypeError,
 			       _("Arg type returned by the get_arg_types "
 				 "method of a debug method worker object is "
 				 "not a gdb.Type object."));
-	      break;
+	      return EXT_LANG_RC_ERROR;
 	    }
 
-	  type_array[i] = arg_type;
+	  (type_array.get ())[i] = arg_type;
 	  i++;
 	}
     }
@@ -468,7 +398,7 @@ gdbpy_get_xmethod_arg_types (const struc
     {
       /* py_argtype_list is not actually a list but a single gdb.Type
 	 object.  */
-      struct type *arg_type = type_object_to_type (py_argtype_list);
+      struct type *arg_type = type_object_to_type (py_argtype_list.get ());
 
       if (arg_type == NULL)
 	{
@@ -476,30 +406,23 @@ gdbpy_get_xmethod_arg_types (const struc
 			   _("Arg type returned by the get_arg_types method "
 			     "of an xmethod worker object is not a gdb.Type "
 			     "object."));
+	  return EXT_LANG_RC_ERROR;
 	}
       else
 	{
-	  type_array[i] = arg_type;
+	  (type_array.get ())[i] = arg_type;
 	  i++;
 	}
     }
-  if (PyErr_Occurred ())
-    {
-      gdbpy_print_stack ();
-      do_cleanups (cleanups);
-      xfree (type_array);
-
-      return EXT_LANG_RC_ERROR;
-    }
 
   /* Add the type of 'this' as the first argument.  The 'this' pointer should
      be a 'const' value.  Hence, create a 'const' variant of the 'this' pointer
      type.  */
   obj_type = type_object_to_type (worker_data->this_type);
-  type_array[0] = make_cv_type (1, 0, lookup_pointer_type (obj_type), NULL);
+  (type_array.get ())[0] = make_cv_type (1, 0, lookup_pointer_type (obj_type),
+					 NULL);
   *nargs = i;
-  *arg_types = type_array;
-  do_cleanups (cleanups);
+  *arg_types = type_array.release ();
 
   return EXT_LANG_RC_OK;
 }
@@ -513,28 +436,24 @@ gdbpy_get_xmethod_result_type (const str
 			       struct value **args, int nargs,
 			       struct type **result_type_ptr)
 {
-  struct gdbpy_worker_data *worker_data = worker->data;
+  struct gdbpy_worker_data *worker_data
+    = (struct gdbpy_worker_data *) worker->data;
   PyObject *py_worker = worker_data->worker;
-  PyObject *py_value_obj, *py_arg_tuple, *py_result_type;
-  PyObject *get_result_type_method;
   struct type *obj_type, *this_type;
-  struct cleanup *cleanups;
   int i;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   /* First see if there is a get_result_type method.
      If not this could be an old xmethod (pre 7.9.1).  */
-  get_result_type_method
-    = PyObject_GetAttrString (py_worker, get_result_type_method_name);
+  gdbpy_ref<> get_result_type_method
+    (PyObject_GetAttrString (py_worker, get_result_type_method_name));
   if (get_result_type_method == NULL)
     {
       PyErr_Clear ();
-      do_cleanups (cleanups);
       *result_type_ptr = NULL;
       return EXT_LANG_RC_OK;
     }
-  make_cleanup_py_decref (get_result_type_method);
 
   obj_type = check_typedef (value_type (obj));
   this_type = check_typedef (type_object_to_type (worker_data->this_type));
@@ -557,51 +476,55 @@ gdbpy_get_xmethod_result_type (const str
       if (!types_equal (obj_type, this_type))
 	obj = value_cast (this_type, obj);
     }
-  py_value_obj = value_to_value_object (obj);
+  gdbpy_ref<> py_value_obj (value_to_value_object (obj));
   if (py_value_obj == NULL)
-    goto Fail;
-  make_cleanup_py_decref (py_value_obj);
+    {
+      gdbpy_print_stack ();
+      return EXT_LANG_RC_ERROR;
+    }
 
-  py_arg_tuple = PyTuple_New (nargs + 1);
+  gdbpy_ref<> py_arg_tuple (PyTuple_New (nargs + 1));
   if (py_arg_tuple == NULL)
-    goto Fail;
-  make_cleanup_py_decref (py_arg_tuple);
+    {
+      gdbpy_print_stack ();
+      return EXT_LANG_RC_ERROR;
+    }
 
-  /* PyTuple_SET_ITEM steals the reference of the element.  Hence INCREF the
-     reference to the 'this' object as we have a cleanup to DECREF it.  */
-  Py_INCREF (py_value_obj);
-  PyTuple_SET_ITEM (py_arg_tuple, 0, py_value_obj);
+  /* PyTuple_SET_ITEM steals the reference of the element, hence the
+     release.  */
+  PyTuple_SET_ITEM (py_arg_tuple.get (), 0, py_value_obj.release ());
 
   for (i = 0; i < nargs; i++)
     {
       PyObject *py_value_arg = value_to_value_object (args[i]);
 
       if (py_value_arg == NULL)
-	goto Fail;
-      PyTuple_SET_ITEM (py_arg_tuple, i + 1, py_value_arg);
+	{
+	  gdbpy_print_stack ();
+	  return EXT_LANG_RC_ERROR;
+	}
+      PyTuple_SET_ITEM (py_arg_tuple.get (), i + 1, py_value_arg);
     }
 
-  py_result_type = PyObject_CallObject (get_result_type_method, py_arg_tuple);
+  gdbpy_ref<> py_result_type
+    (PyObject_CallObject (get_result_type_method.get (), py_arg_tuple.get ()));
   if (py_result_type == NULL)
-    goto Fail;
-  make_cleanup_py_decref (py_result_type);
+    {
+      gdbpy_print_stack ();
+      return EXT_LANG_RC_ERROR;
+    }
 
-  *result_type_ptr = type_object_to_type (py_result_type);
+  *result_type_ptr = type_object_to_type (py_result_type.get ());
   if (*result_type_ptr == NULL)
     {
       PyErr_SetString (PyExc_TypeError,
 		       _("Type returned by the get_result_type method of an"
 			 " xmethod worker object is not a gdb.Type object."));
-      goto Fail;
+      gdbpy_print_stack ();
+      return EXT_LANG_RC_ERROR;
     }
 
-  do_cleanups (cleanups);
   return EXT_LANG_RC_OK;
-
- Fail:
-  gdbpy_print_stack ();
-  do_cleanups (cleanups);
-  return EXT_LANG_RC_ERROR;
 }
 
 /* Implementation of invoke_xmethod for Python.  */
@@ -612,14 +535,13 @@ gdbpy_invoke_xmethod (const struct exten
 		      struct value *obj, struct value **args, int nargs)
 {
   int i;
-  struct cleanup *cleanups;
-  PyObject *py_value_obj, *py_arg_tuple, *py_result;
   struct type *obj_type, *this_type;
   struct value *res = NULL;
-  struct gdbpy_worker_data *worker_data = worker->data;
+  struct gdbpy_worker_data *worker_data
+    = (struct gdbpy_worker_data *) worker->data;
   PyObject *xmethod_worker = worker_data->worker;
 
-  cleanups = ensure_python_env (get_current_arch (), current_language);
+  gdbpy_enter enter_py (get_current_arch (), current_language);
 
   obj_type = check_typedef (value_type (obj));
   this_type = check_typedef (type_object_to_type (worker_data->this_type));
@@ -642,26 +564,23 @@ gdbpy_invoke_xmethod (const struct exten
       if (!types_equal (obj_type, this_type))
 	obj = value_cast (this_type, obj);
     }
-  py_value_obj = value_to_value_object (obj);
+  gdbpy_ref<> py_value_obj (value_to_value_object (obj));
   if (py_value_obj == NULL)
     {
       gdbpy_print_stack ();
       error (_("Error while executing Python code."));
     }
-  make_cleanup_py_decref (py_value_obj);
 
-  py_arg_tuple = PyTuple_New (nargs + 1);
+  gdbpy_ref<> py_arg_tuple (PyTuple_New (nargs + 1));
   if (py_arg_tuple == NULL)
     {
       gdbpy_print_stack ();
       error (_("Error while executing Python code."));
     }
-  make_cleanup_py_decref (py_arg_tuple);
 
-  /* PyTuple_SET_ITEM steals the reference of the element.  Hence INCREF the
-     reference to the 'this' object as we have a cleanup to DECREF it.  */
-  Py_INCREF (py_value_obj);
-  PyTuple_SET_ITEM (py_arg_tuple, 0, py_value_obj);
+  /* PyTuple_SET_ITEM steals the reference of the element, hence the
+     release.  */
+  PyTuple_SET_ITEM (py_arg_tuple.get (), 0, py_value_obj.release ());
 
   for (i = 0; i < nargs; i++)
     {
@@ -673,20 +592,20 @@ gdbpy_invoke_xmethod (const struct exten
 	  error (_("Error while executing Python code."));
 	}
 
-      PyTuple_SET_ITEM (py_arg_tuple, i + 1, py_value_arg);
+      PyTuple_SET_ITEM (py_arg_tuple.get (), i + 1, py_value_arg);
     }
 
-  py_result = PyObject_CallObject (xmethod_worker, py_arg_tuple);
+  gdbpy_ref<> py_result (PyObject_CallObject (xmethod_worker,
+					      py_arg_tuple.get ()));
   if (py_result == NULL)
     {
       gdbpy_print_stack ();
       error (_("Error while executing Python code."));
     }
-  make_cleanup_py_decref (py_result);
 
   if (py_result != Py_None)
     {
-      res = convert_value_from_python (py_result);
+      res = convert_value_from_python (py_result.get ());
       if (res == NULL)
 	{
 	  gdbpy_print_stack ();
@@ -699,8 +618,6 @@ gdbpy_invoke_xmethod (const struct exten
 					     "void", NULL, 0));
     }
 
-  do_cleanups (cleanups);
-
   return res;
 }
 
@@ -731,19 +648,10 @@ gdbpy_initialize_xmethods (void)
   if (py_match_method_name == NULL)
     return -1;
 
-  py_invoke_method_name = PyString_FromString (invoke_method_name);
-  if (py_invoke_method_name == NULL)
-    return -1;
-
   py_get_arg_types_method_name
     = PyString_FromString (get_arg_types_method_name);
   if (py_get_arg_types_method_name == NULL)
     return -1;
 
-  py_get_result_type_method_name
-    = PyString_FromString (get_result_type_method_name);
-  if (py_get_result_type_method_name == NULL)
-    return -1;
-
   return 1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ravenscar-thread.c ./gdb/ravenscar-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ravenscar-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ravenscar-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ada Ravenscar thread support.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -167,7 +167,7 @@ get_running_thread_id (void)
   object_addr = BMSYMBOL_VALUE_ADDRESS (object_msym);
   object_size = TYPE_LENGTH (builtin_type_void_data_ptr);
   buf_size = object_size;
-  buf = alloca (buf_size);
+  buf = (gdb_byte *) alloca (buf_size);
   read_memory (object_addr, buf, buf_size);
   return extract_typed_address (buf, builtin_type_void_data_ptr);
 }
@@ -338,10 +338,9 @@ ravenscar_mourn_inferior (struct target_
 static void
 ravenscar_inferior_created (struct target_ops *target, int from_tty)
 {
-  struct ravenscar_arch_ops *ops;
 
   if (!ravenscar_task_support
-      || gdbarch_ravenscar_ops (current_inferior ()->gdbarch) == NULL
+      || gdbarch_ravenscar_ops (target_gdbarch ()) == NULL
       || !has_ravenscar_runtime ())
     return;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ravenscar-thread.h ./gdb/ravenscar-thread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ravenscar-thread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ravenscar-thread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ada Ravenscar thread support.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-btrace.c ./gdb/record-btrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-btrace.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/record-btrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Branch trace support for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -21,6 +21,7 @@
 
 #include "defs.h"
 #include "record.h"
+#include "record-btrace.h"
 #include "gdbthread.h"
 #include "target.h"
 #include "gdbcmd.h"
@@ -37,6 +38,8 @@
 #include "infrun.h"
 #include "event-loop.h"
 #include "inf-loop.h"
+#include "vec.h"
+#include <algorithm>
 
 /* The target_ops of record-btrace.  */
 static struct target_ops record_btrace_ops;
@@ -114,6 +117,8 @@ require_btrace_thread (void)
   if (tp == NULL)
     error (_("No thread."));
 
+  validate_registers_access ();
+
   btrace_fetch (tp);
 
   if (btrace_is_empty (tp))
@@ -159,9 +164,7 @@ record_btrace_enable_warn (struct thread
 static void
 record_btrace_disable_callback (void *arg)
 {
-  struct thread_info *tp;
-
-  tp = arg;
+  struct thread_info *tp = (struct thread_info *) arg;
 
   btrace_disable (tp);
 }
@@ -200,6 +203,26 @@ record_btrace_handle_async_inferior_even
   inferior_event_handler (INF_REG_EVENT, NULL);
 }
 
+/* See record-btrace.h.  */
+
+void
+record_btrace_push_target (void)
+{
+  const char *format;
+
+  record_btrace_auto_enable ();
+
+  push_target (&record_btrace_ops);
+
+  record_btrace_async_inferior_event_handler
+    = create_async_event_handler (record_btrace_handle_async_inferior_event,
+				  NULL);
+  record_btrace_generating_corefile = 0;
+
+  format = btrace_format_short_string (record_btrace_conf.format);
+  observer_notify_record_changed (current_inferior (), 1, "btrace", format);
+}
+
 /* The to_open method of target record-btrace.  */
 
 static void
@@ -215,30 +238,18 @@ record_btrace_open (const char *args, in
   if (!target_has_execution)
     error (_("The program is not being run."));
 
-  if (non_stop)
-    error (_("Record btrace can't debug inferior in non-stop mode."));
-
   gdb_assert (record_btrace_thread_observer == NULL);
 
   disable_chain = make_cleanup (null_cleanup, NULL);
   ALL_NON_EXITED_THREADS (tp)
-    if (args == NULL || *args == 0 || number_is_in_list (args, tp->num))
+    if (args == NULL || *args == 0 || number_is_in_list (args, tp->global_num))
       {
 	btrace_enable (tp, &record_btrace_conf);
 
 	make_cleanup (record_btrace_disable_callback, tp);
       }
 
-  record_btrace_auto_enable ();
-
-  push_target (&record_btrace_ops);
-
-  record_btrace_async_inferior_event_handler
-    = create_async_event_handler (record_btrace_handle_async_inferior_event,
-				  NULL);
-  record_btrace_generating_corefile = 0;
-
-  observer_notify_record_changed (current_inferior (),  1);
+  record_btrace_push_target ();
 
   discard_cleanups (disable_chain);
 }
@@ -259,6 +270,21 @@ record_btrace_stop_recording (struct tar
       btrace_disable (tp);
 }
 
+/* The to_disconnect method of target record-btrace.  */
+
+static void
+record_btrace_disconnect (struct target_ops *self, const char *args,
+			  int from_tty)
+{
+  struct target_ops *beneath = self->beneath;
+
+  /* Do not stop recording, just clean up GDB side.  */
+  unpush_target (self);
+
+  /* Forward disconnect.  */
+  beneath->to_disconnect (beneath, args, from_tty);
+}
+
 /* The to_close method of target record-btrace.  */
 
 static void
@@ -336,7 +362,7 @@ record_btrace_print_bts_conf (const stru
     }
 }
 
-/* Print an Intel(R) Processor Trace configuration.  */
+/* Print an Intel Processor Trace configuration.  */
 
 static void
 record_btrace_print_pt_conf (const struct btrace_config_pt *conf)
@@ -393,6 +419,8 @@ record_btrace_info (struct target_ops *s
   if (tp == NULL)
     error (_("No thread."));
 
+  validate_registers_access ();
+
   btinfo = &tp->btrace;
 
   conf = btrace_conf (btinfo);
@@ -415,35 +443,19 @@ record_btrace_info (struct target_ops *s
       calls = btrace_call_number (&call);
 
       btrace_insn_end (&insn, btinfo);
-
       insns = btrace_insn_number (&insn);
-      if (insns != 0)
-	{
-	  /* The last instruction does not really belong to the trace.  */
-	  insns -= 1;
-	}
-      else
-	{
-	  unsigned int steps;
-
-	  /* Skip gaps at the end.  */
-	  do
-	    {
-	      steps = btrace_insn_prev (&insn, 1);
-	      if (steps == 0)
-		break;
 
-	      insns = btrace_insn_number (&insn);
-	    }
-	  while (insns == 0);
-	}
+      /* If the last instruction is not a gap, it is the current instruction
+	 that is not actually part of the record.  */
+      if (btrace_insn_get (&insn) != NULL)
+	insns -= 1;
 
       gaps = btinfo->ngaps;
     }
 
   printf_unfiltered (_("Recorded %u instructions in %u functions (%u gaps) "
-		       "for thread %d (%s).\n"), insns, calls, gaps,
-		     tp->num, target_pid_to_str (tp->ptid));
+		       "for thread %s (%s).\n"), insns, calls, gaps,
+		     print_thread_id (tp), target_pid_to_str (tp->ptid));
 
   if (btrace_is_replaying (tp))
     printf_unfiltered (_("Replay in progress.  At instruction %u.\n"),
@@ -456,78 +468,160 @@ static void
 btrace_ui_out_decode_error (struct ui_out *uiout, int errcode,
 			    enum btrace_format format)
 {
-  const char *errstr;
-  int is_error;
+  const char *errstr = btrace_decode_error (format, errcode);
 
-  errstr = _("unknown");
-  is_error = 1;
+  uiout->text (_("["));
+  /* ERRCODE > 0 indicates notifications on BTRACE_FORMAT_PT.  */
+  if (!(format == BTRACE_FORMAT_PT && errcode > 0))
+    {
+      uiout->text (_("decode error ("));
+      uiout->field_int ("errcode", errcode);
+      uiout->text (_("): "));
+    }
+  uiout->text (errstr);
+  uiout->text (_("]\n"));
+}
 
-  switch (format)
-    {
-    default:
-      break;
+/* Print an unsigned int.  */
 
-    case BTRACE_FORMAT_BTS:
-      switch (errcode)
-	{
-	default:
-	  break;
+static void
+ui_out_field_uint (struct ui_out *uiout, const char *fld, unsigned int val)
+{
+  uiout->field_fmt (fld, "%u", val);
+}
 
-	case BDE_BTS_OVERFLOW:
-	  errstr = _("instruction overflow");
-	  break;
+/* A range of source lines.  */
 
-	case BDE_BTS_INSN_SIZE:
-	  errstr = _("unknown instruction");
-	  break;
-	}
-      break;
+struct btrace_line_range
+{
+  /* The symtab this line is from.  */
+  struct symtab *symtab;
 
-#if defined (HAVE_LIBIPT)
-    case BTRACE_FORMAT_PT:
-      switch (errcode)
-	{
-	case BDE_PT_USER_QUIT:
-	  is_error = 0;
-	  errstr = _("trace decode cancelled");
-	  break;
+  /* The first line (inclusive).  */
+  int begin;
 
-	case BDE_PT_DISABLED:
-	  is_error = 0;
-	  errstr = _("disabled");
-	  break;
+  /* The last line (exclusive).  */
+  int end;
+};
 
-	case BDE_PT_OVERFLOW:
-	  is_error = 0;
-	  errstr = _("overflow");
-	  break;
+/* Construct a line range.  */
 
-	default:
-	  if (errcode < 0)
-	    errstr = pt_errstr (pt_errcode (errcode));
-	  break;
-	}
-      break;
-#endif /* defined (HAVE_LIBIPT)  */
+static struct btrace_line_range
+btrace_mk_line_range (struct symtab *symtab, int begin, int end)
+{
+  struct btrace_line_range range;
+
+  range.symtab = symtab;
+  range.begin = begin;
+  range.end = end;
+
+  return range;
+}
+
+/* Add a line to a line range.  */
+
+static struct btrace_line_range
+btrace_line_range_add (struct btrace_line_range range, int line)
+{
+  if (range.end <= range.begin)
+    {
+      /* This is the first entry.  */
+      range.begin = line;
+      range.end = line + 1;
     }
+  else if (line < range.begin)
+    range.begin = line;
+  else if (range.end < line)
+    range.end = line;
+
+  return range;
+}
+
+/* Return non-zero if RANGE is empty, zero otherwise.  */
+
+static int
+btrace_line_range_is_empty (struct btrace_line_range range)
+{
+  return range.end <= range.begin;
+}
+
+/* Return non-zero if LHS contains RHS, zero otherwise.  */
+
+static int
+btrace_line_range_contains_range (struct btrace_line_range lhs,
+				  struct btrace_line_range rhs)
+{
+  return ((lhs.symtab == rhs.symtab)
+	  && (lhs.begin <= rhs.begin)
+	  && (rhs.end <= lhs.end));
+}
+
+/* Find the line range associated with PC.  */
 
-  ui_out_text (uiout, _("["));
-  if (is_error)
+static struct btrace_line_range
+btrace_find_line_range (CORE_ADDR pc)
+{
+  struct btrace_line_range range;
+  struct linetable_entry *lines;
+  struct linetable *ltable;
+  struct symtab *symtab;
+  int nlines, i;
+
+  symtab = find_pc_line_symtab (pc);
+  if (symtab == NULL)
+    return btrace_mk_line_range (NULL, 0, 0);
+
+  ltable = SYMTAB_LINETABLE (symtab);
+  if (ltable == NULL)
+    return btrace_mk_line_range (symtab, 0, 0);
+
+  nlines = ltable->nitems;
+  lines = ltable->item;
+  if (nlines <= 0)
+    return btrace_mk_line_range (symtab, 0, 0);
+
+  range = btrace_mk_line_range (symtab, 0, 0);
+  for (i = 0; i < nlines - 1; i++)
     {
-      ui_out_text (uiout, _("decode error ("));
-      ui_out_field_int (uiout, "errcode", errcode);
-      ui_out_text (uiout, _("): "));
+      if ((lines[i].pc == pc) && (lines[i].line != 0))
+	range = btrace_line_range_add (range, lines[i].line);
     }
-  ui_out_text (uiout, errstr);
-  ui_out_text (uiout, _("]\n"));
+
+  return range;
 }
 
-/* Print an unsigned int.  */
+/* Print source lines in LINES to UIOUT.
+
+   UI_ITEM_CHAIN is a cleanup chain for the last source line and the
+   instructions corresponding to that source line.  When printing a new source
+   line, we do the cleanups for the open chain and open a new cleanup chain for
+   the new source line.  If the source line range in LINES is not empty, this
+   function will leave the cleanup chain for the last printed source line open
+   so instructions can be added to it.  */
 
 static void
-ui_out_field_uint (struct ui_out *uiout, const char *fld, unsigned int val)
+btrace_print_lines (struct btrace_line_range lines, struct ui_out *uiout,
+		    struct cleanup **ui_item_chain, int flags)
 {
-  ui_out_field_fmt (uiout, fld, "%u", val);
+  print_source_lines_flags psl_flags;
+  int line;
+
+  psl_flags = 0;
+  if (flags & DISASSEMBLY_FILENAME)
+    psl_flags |= PRINT_SOURCE_LINES_FILENAME;
+
+  for (line = lines.begin; line < lines.end; ++line)
+    {
+      if (*ui_item_chain != NULL)
+	do_cleanups (*ui_item_chain);
+
+      *ui_item_chain
+	= make_cleanup_ui_out_tuple_begin_end (uiout, "src_and_asm_line");
+
+      print_source_lines (lines.symtab, line, line + 1, psl_flags);
+
+      make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn");
+    }
 }
 
 /* Disassemble a section of the recorded instruction trace.  */
@@ -538,13 +632,26 @@ btrace_insn_history (struct ui_out *uiou
 		     const struct btrace_insn_iterator *begin,
 		     const struct btrace_insn_iterator *end, int flags)
 {
+  struct cleanup *cleanups, *ui_item_chain;
   struct gdbarch *gdbarch;
   struct btrace_insn_iterator it;
+  struct btrace_line_range last_lines;
 
   DEBUG ("itrace (0x%x): [%u; %u)", flags, btrace_insn_number (begin),
 	 btrace_insn_number (end));
 
+  flags |= DISASSEMBLY_SPECULATIVE;
+
   gdbarch = target_gdbarch ();
+  last_lines = btrace_mk_line_range (NULL, 0, 0);
+
+  cleanups = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns");
+
+  /* UI_ITEM_CHAIN is a cleanup chain for the last source line and the
+     instructions corresponding to that line.  */
+  ui_item_chain = NULL;
+
+  gdb_pretty_print_disassembler disasm (gdbarch);
 
   for (it = *begin; btrace_insn_cmp (&it, end) != 0; btrace_insn_next (&it, 1))
     {
@@ -562,21 +669,52 @@ btrace_insn_history (struct ui_out *uiou
 	  /* We have trace so we must have a configuration.  */
 	  gdb_assert (conf != NULL);
 
-	  btrace_ui_out_decode_error (uiout, it.function->errcode,
+	  uiout->field_fmt ("insn-number", "%u",
+			    btrace_insn_number (&it));
+	  uiout->text ("\t");
+
+	  btrace_ui_out_decode_error (uiout, btrace_insn_get_error (&it),
 				      conf->format);
 	}
       else
 	{
-	  /* Print the instruction index.  */
-	  ui_out_field_uint (uiout, "index", btrace_insn_number (&it));
-	  ui_out_text (uiout, "\t");
-
-	  /* Disassembly with '/m' flag may not produce the expected result.
-	     See PR gdb/11833.  */
-	  gdb_disassembly (gdbarch, uiout, NULL, flags, 1, insn->pc,
-			   insn->pc + 1);
+	  struct disasm_insn dinsn;
+
+	  if ((flags & DISASSEMBLY_SOURCE) != 0)
+	    {
+	      struct btrace_line_range lines;
+
+	      lines = btrace_find_line_range (insn->pc);
+	      if (!btrace_line_range_is_empty (lines)
+		  && !btrace_line_range_contains_range (last_lines, lines))
+		{
+		  btrace_print_lines (lines, uiout, &ui_item_chain, flags);
+		  last_lines = lines;
+		}
+	      else if (ui_item_chain == NULL)
+		{
+		  ui_item_chain
+		    = make_cleanup_ui_out_tuple_begin_end (uiout,
+							   "src_and_asm_line");
+		  /* No source information.  */
+		  make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn");
+		}
+
+	      gdb_assert (ui_item_chain != NULL);
+	    }
+
+	  memset (&dinsn, 0, sizeof (dinsn));
+	  dinsn.number = btrace_insn_number (&it);
+	  dinsn.addr = insn->pc;
+
+	  if ((insn->flags & BTRACE_INSN_FLAG_SPECULATIVE) != 0)
+	    dinsn.is_speculative = 1;
+
+	  disasm.pretty_print_insn (uiout, &dinsn, flags);
 	}
     }
+
+  do_cleanups (cleanups);
 }
 
 /* The to_insn_history method of target record-btrace.  */
@@ -767,7 +905,7 @@ btrace_call_history_insn_range (struct u
   end = begin + size - 1;
 
   ui_out_field_uint (uiout, "insn begin", begin);
-  ui_out_text (uiout, ",");
+  uiout->text (",");
   ui_out_field_uint (uiout, "insn end", end);
 }
 
@@ -803,8 +941,8 @@ btrace_compute_src_line_range (const str
       if (sal.symtab != symtab || sal.line == 0)
 	continue;
 
-      begin = min (begin, sal.line);
-      end = max (end, sal.line);
+      begin = std::min (begin, sal.line);
+      end = std::max (end, sal.line);
     }
 
  out:
@@ -825,21 +963,21 @@ btrace_call_history_src_line (struct ui_
   if (sym == NULL)
     return;
 
-  ui_out_field_string (uiout, "file",
+  uiout->field_string ("file",
 		       symtab_to_filename_for_display (symbol_symtab (sym)));
 
   btrace_compute_src_line_range (bfun, &begin, &end);
   if (end < begin)
     return;
 
-  ui_out_text (uiout, ":");
-  ui_out_field_int (uiout, "min line", begin);
+  uiout->text (":");
+  uiout->field_int ("min line", begin);
 
   if (end == begin)
     return;
 
-  ui_out_text (uiout, ",");
-  ui_out_field_int (uiout, "max line", end);
+  uiout->text (",");
+  uiout->field_int ("max line", end);
 }
 
 /* Get the name of a branch trace function.  */
@@ -871,11 +1009,12 @@ btrace_call_history (struct ui_out *uiou
 		     const struct btrace_thread_info *btinfo,
 		     const struct btrace_call_iterator *begin,
 		     const struct btrace_call_iterator *end,
-		     enum record_print_flag flags)
+		     int int_flags)
 {
   struct btrace_call_iterator it;
+  record_print_flags flags = (enum record_print_flag) int_flags;
 
-  DEBUG ("ftrace (0x%x): [%u; %u)", flags, btrace_call_number (begin),
+  DEBUG ("ftrace (0x%x): [%u; %u)", int_flags, btrace_call_number (begin),
 	 btrace_call_number (end));
 
   for (it = *begin; btrace_call_cmp (&it, end) < 0; btrace_call_next (&it, 1))
@@ -890,7 +1029,7 @@ btrace_call_history (struct ui_out *uiou
 
       /* Print the function index.  */
       ui_out_field_uint (uiout, "index", bfun->number);
-      ui_out_text (uiout, "\t");
+      uiout->text ("\t");
 
       /* Indicate gaps in the trace.  */
       if (bfun->errcode != 0)
@@ -912,36 +1051,36 @@ btrace_call_history (struct ui_out *uiou
 	  int level = bfun->level + btinfo->level, i;
 
 	  for (i = 0; i < level; ++i)
-	    ui_out_text (uiout, "  ");
+	    uiout->text ("  ");
 	}
 
       if (sym != NULL)
-	ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (sym));
+	uiout->field_string ("function", SYMBOL_PRINT_NAME (sym));
       else if (msym != NULL)
-	ui_out_field_string (uiout, "function", MSYMBOL_PRINT_NAME (msym));
-      else if (!ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "function", "??");
+	uiout->field_string ("function", MSYMBOL_PRINT_NAME (msym));
+      else if (!uiout->is_mi_like_p ())
+	uiout->field_string ("function", "??");
 
       if ((flags & RECORD_PRINT_INSN_RANGE) != 0)
 	{
-	  ui_out_text (uiout, _("\tinst "));
+	  uiout->text (_("\tinst "));
 	  btrace_call_history_insn_range (uiout, bfun);
 	}
 
       if ((flags & RECORD_PRINT_SRC_LINE) != 0)
 	{
-	  ui_out_text (uiout, _("\tat "));
+	  uiout->text (_("\tat "));
 	  btrace_call_history_src_line (uiout, bfun);
 	}
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
     }
 }
 
 /* The to_call_history method of target record-btrace.  */
 
 static void
-record_btrace_call_history (struct target_ops *self, int size, int flags)
+record_btrace_call_history (struct target_ops *self, int size, int int_flags)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_call_history *history;
@@ -949,6 +1088,7 @@ record_btrace_call_history (struct targe
   struct cleanup *uiout_cleanup;
   struct ui_out *uiout;
   unsigned int context, covered;
+  record_print_flags flags = (enum record_print_flag) int_flags;
 
   uiout = current_uiout;
   uiout_cleanup = make_cleanup_ui_out_tuple_begin_end (uiout,
@@ -963,7 +1103,7 @@ record_btrace_call_history (struct targe
     {
       struct btrace_insn_iterator *replay;
 
-      DEBUG ("call-history (0x%x): %d", flags, size);
+      DEBUG ("call-history (0x%x): %d", int_flags, size);
 
       /* If we're replaying, we start at the replay position.  Otherwise, we
 	 start at the tail of the trace.  */
@@ -998,7 +1138,7 @@ record_btrace_call_history (struct targe
       begin = history->begin;
       end = history->end;
 
-      DEBUG ("call-history (0x%x): %d, prev: [%u; %u)", flags, size,
+      DEBUG ("call-history (0x%x): %d, prev: [%u; %u)", int_flags, size,
 	     btrace_call_number (&begin), btrace_call_number (&end));
 
       if (size < 0)
@@ -1031,7 +1171,8 @@ record_btrace_call_history (struct targe
 
 static void
 record_btrace_call_history_range (struct target_ops *self,
-				  ULONGEST from, ULONGEST to, int flags)
+				  ULONGEST from, ULONGEST to,
+				  int int_flags)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_call_history *history;
@@ -1040,6 +1181,7 @@ record_btrace_call_history_range (struct
   struct ui_out *uiout;
   unsigned int low, high;
   int found;
+  record_print_flags flags = (enum record_print_flag) int_flags;
 
   uiout = current_uiout;
   uiout_cleanup = make_cleanup_ui_out_tuple_begin_end (uiout,
@@ -1047,7 +1189,7 @@ record_btrace_call_history_range (struct
   low = from;
   high = to;
 
-  DEBUG ("call-history (0x%x): [%u; %u)", flags, low, high);
+  DEBUG ("call-history (0x%x): [%u; %u)", int_flags, low, high);
 
   /* Check for wrap-arounds.  */
   if (low != from || high != to)
@@ -1084,9 +1226,11 @@ record_btrace_call_history_range (struct
 
 static void
 record_btrace_call_history_from (struct target_ops *self,
-				 ULONGEST from, int size, int flags)
+				 ULONGEST from, int size,
+				 int int_flags)
 {
   ULONGEST begin, end, context;
+  record_print_flags flags = (enum record_print_flag) int_flags;
 
   context = abs (size);
   if (context == 0)
@@ -1114,20 +1258,45 @@ record_btrace_call_history_from (struct 
   record_btrace_call_history_range (self, begin, end, flags);
 }
 
+/* The to_record_method method of target record-btrace.  */
+
+static enum record_method
+record_btrace_record_method (struct target_ops *self, ptid_t ptid)
+{
+  const struct btrace_config *config;
+  struct thread_info * const tp = find_thread_ptid (ptid);
+
+  if (tp == NULL)
+    error (_("No thread."));
+
+  if (tp->btrace.target == NULL)
+    return RECORD_METHOD_NONE;
+
+  return RECORD_METHOD_BTRACE;
+}
+
 /* The to_record_is_replaying method of target record-btrace.  */
 
 static int
-record_btrace_is_replaying (struct target_ops *self)
+record_btrace_is_replaying (struct target_ops *self, ptid_t ptid)
 {
   struct thread_info *tp;
 
   ALL_NON_EXITED_THREADS (tp)
-    if (btrace_is_replaying (tp))
+    if (ptid_match (tp->ptid, ptid) && btrace_is_replaying (tp))
       return 1;
 
   return 0;
 }
 
+/* The to_record_will_replay method of target record-btrace.  */
+
+static int
+record_btrace_will_replay (struct target_ops *self, ptid_t ptid, int dir)
+{
+  return dir == EXEC_REVERSE || record_btrace_is_replaying (self, ptid);
+}
+
 /* The to_xfer_partial method of target record-btrace.  */
 
 static enum target_xfer_status
@@ -1141,7 +1310,7 @@ record_btrace_xfer_partial (struct targe
   /* Filter out requests that don't make sense during replay.  */
   if (replay_memory_access == replay_memory_access_read_only
       && !record_btrace_generating_corefile
-      && record_btrace_is_replaying (ops))
+      && record_btrace_is_replaying (ops, inferior_ptid))
     {
       switch (object)
 	{
@@ -1166,7 +1335,7 @@ record_btrace_xfer_partial (struct targe
 		     & SEC_READONLY) != 0)
 		  {
 		    /* Truncate the request to fit into this section.  */
-		    len = min (len, section->endaddr - offset);
+		    len = std::min (len, section->endaddr - offset);
 		    break;
 		  }
 	      }
@@ -1219,7 +1388,8 @@ record_btrace_insert_breakpoint (struct 
 static int
 record_btrace_remove_breakpoint (struct target_ops *ops,
 				 struct gdbarch *gdbarch,
-				 struct bp_target_info *bp_tgt)
+				 struct bp_target_info *bp_tgt,
+				 enum remove_bp_reason reason)
 {
   const char *old;
   int ret;
@@ -1232,7 +1402,8 @@ record_btrace_remove_breakpoint (struct 
   ret = 0;
   TRY
     {
-      ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch, bp_tgt);
+      ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch, bp_tgt,
+						reason);
     }
   CATCH (except, RETURN_MASK_ALL)
     {
@@ -1294,8 +1465,9 @@ record_btrace_store_registers (struct ta
 {
   struct target_ops *t;
 
-  if (!record_btrace_generating_corefile && record_btrace_is_replaying (ops))
-    error (_("This record target does not allow writing registers."));
+  if (!record_btrace_generating_corefile
+      && record_btrace_is_replaying (ops, inferior_ptid))
+    error (_("Cannot write registers while replaying."));
 
   gdb_assert (may_write_registers != 0);
 
@@ -1311,7 +1483,8 @@ record_btrace_prepare_to_store (struct t
 {
   struct target_ops *t;
 
-  if (!record_btrace_generating_corefile && record_btrace_is_replaying (ops))
+  if (!record_btrace_generating_corefile
+      && record_btrace_is_replaying (ops, inferior_ptid))
     return;
 
   t = ops->beneath;
@@ -1341,7 +1514,8 @@ static htab_t bfcache;
 static hashval_t
 bfcache_hash (const void *arg)
 {
-  const struct btrace_frame_cache *cache = arg;
+  const struct btrace_frame_cache *cache
+    = (const struct btrace_frame_cache *) arg;
 
   return htab_hash_pointer (cache->frame);
 }
@@ -1351,8 +1525,10 @@ bfcache_hash (const void *arg)
 static int
 bfcache_eq (const void *arg1, const void *arg2)
 {
-  const struct btrace_frame_cache *cache1 = arg1;
-  const struct btrace_frame_cache *cache2 = arg2;
+  const struct btrace_frame_cache *cache1
+    = (const struct btrace_frame_cache *) arg1;
+  const struct btrace_frame_cache *cache2
+    = (const struct btrace_frame_cache *) arg2;
 
   return cache1->frame == cache2->frame;
 }
@@ -1391,7 +1567,7 @@ btrace_get_frame_function (struct frame_
   if (slot == NULL)
     return NULL;
 
-  cache = *slot;
+  cache = (const struct btrace_frame_cache *) *slot;
   return cache->bfun;
 }
 
@@ -1404,7 +1580,7 @@ record_btrace_frame_unwind_stop_reason (
   const struct btrace_frame_cache *cache;
   const struct btrace_function *bfun;
 
-  cache = *this_cache;
+  cache = (const struct btrace_frame_cache *) *this_cache;
   bfun = cache->bfun;
   gdb_assert (bfun != NULL);
 
@@ -1424,7 +1600,7 @@ record_btrace_frame_this_id (struct fram
   const struct btrace_function *bfun;
   CORE_ADDR code, special;
 
-  cache = *this_cache;
+  cache = (const struct btrace_frame_cache *) *this_cache;
 
   bfun = cache->bfun;
   gdb_assert (bfun != NULL);
@@ -1463,7 +1639,7 @@ record_btrace_frame_prev_register (struc
     throw_error (NOT_AVAILABLE_ERROR,
 		 _("Registers are not available in btrace record history"));
 
-  cache = *this_cache;
+  cache = (const struct btrace_frame_cache *) *this_cache;
   bfun = cache->bfun;
   gdb_assert (bfun != NULL);
 
@@ -1586,7 +1762,7 @@ record_btrace_frame_dealloc_cache (struc
   struct btrace_frame_cache *cache;
   void **slot;
 
-  cache = this_cache;
+  cache = (struct btrace_frame_cache *) this_cache;
 
   slot = htab_find_slot (bfcache, cache, NO_INSERT);
   gdb_assert (slot != NULL);
@@ -1638,6 +1814,32 @@ record_btrace_to_get_tailcall_unwinder (
   return &record_btrace_tailcall_frame_unwind;
 }
 
+/* Return a human-readable string for FLAG.  */
+
+static const char *
+btrace_thread_flag_to_str (enum btrace_thread_flag flag)
+{
+  switch (flag)
+    {
+    case BTHR_STEP:
+      return "step";
+
+    case BTHR_RSTEP:
+      return "reverse-step";
+
+    case BTHR_CONT:
+      return "cont";
+
+    case BTHR_RCONT:
+      return "reverse-cont";
+
+    case BTHR_STOP:
+      return "stop";
+    }
+
+  return "<invalid>";
+}
+
 /* Indicate that TP should be resumed according to FLAG.  */
 
 static void
@@ -1646,31 +1848,66 @@ record_btrace_resume_thread (struct thre
 {
   struct btrace_thread_info *btinfo;
 
-  DEBUG ("resuming %d (%s): %u", tp->num, target_pid_to_str (tp->ptid), flag);
+  DEBUG ("resuming thread %s (%s): %x (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid), flag, btrace_thread_flag_to_str (flag));
 
   btinfo = &tp->btrace;
 
-  if ((btinfo->flags & BTHR_MOVE) != 0)
-    error (_("Thread already moving."));
-
   /* Fetch the latest branch trace.  */
   btrace_fetch (tp);
 
+  /* A resume request overwrites a preceding resume or stop request.  */
+  btinfo->flags &= ~(BTHR_MOVE | BTHR_STOP);
   btinfo->flags |= flag;
 }
 
-/* Find the thread to resume given a PTID.  */
+/* Get the current frame for TP.  */
 
-static struct thread_info *
-record_btrace_find_resume_thread (ptid_t ptid)
+static struct frame_info *
+get_thread_current_frame (struct thread_info *tp)
 {
-  struct thread_info *tp;
+  struct frame_info *frame;
+  ptid_t old_inferior_ptid;
+  int executing;
 
-  /* When asked to resume everything, we pick the current thread.  */
-  if (ptid_equal (minus_one_ptid, ptid) || ptid_is_pid (ptid))
-    ptid = inferior_ptid;
+  /* Set INFERIOR_PTID, which is implicitly used by get_current_frame.  */
+  old_inferior_ptid = inferior_ptid;
+  inferior_ptid = tp->ptid;
+
+  /* Clear the executing flag to allow changes to the current frame.
+     We are not actually running, yet.  We just started a reverse execution
+     command or a record goto command.
+     For the latter, EXECUTING is false and this has no effect.
+     For the former, EXECUTING is true and we're in to_wait, about to
+     move the thread.  Since we need to recompute the stack, we temporarily
+     set EXECUTING to flase.  */
+  executing = is_executing (inferior_ptid);
+  set_executing (inferior_ptid, 0);
 
-  return find_thread_ptid (ptid);
+  frame = NULL;
+  TRY
+    {
+      frame = get_current_frame ();
+    }
+  CATCH (except, RETURN_MASK_ALL)
+    {
+      /* Restore the previous execution state.  */
+      set_executing (inferior_ptid, executing);
+
+      /* Restore the previous inferior_ptid.  */
+      inferior_ptid = old_inferior_ptid;
+
+      throw_exception (except);
+    }
+  END_CATCH
+
+  /* Restore the previous execution state.  */
+  set_executing (inferior_ptid, executing);
+
+  /* Restore the previous inferior_ptid.  */
+  inferior_ptid = old_inferior_ptid;
+
+  return frame;
 }
 
 /* Start replaying a thread.  */
@@ -1680,7 +1917,6 @@ record_btrace_start_replaying (struct th
 {
   struct btrace_insn_iterator *replay;
   struct btrace_thread_info *btinfo;
-  int executing;
 
   btinfo = &tp->btrace;
   replay = NULL;
@@ -1689,16 +1925,6 @@ record_btrace_start_replaying (struct th
   if (btinfo->begin == NULL)
     return NULL;
 
-  /* Clear the executing flag to allow changes to the current frame.
-     We are not actually running, yet.  We just started a reverse execution
-     command or a record goto command.
-     For the latter, EXECUTING is false and this has no effect.
-     For the former, EXECUTING is true and we're in to_wait, about to
-     move the thread.  Since we need to recompute the stack, we temporarily
-     set EXECUTING to flase.  */
-  executing = is_executing (tp->ptid);
-  set_executing (tp->ptid, 0);
-
   /* GDB stores the current frame_id when stepping in order to detects steps
      into subroutines.
      Since frames are computed differently when we're replaying, we need to
@@ -1711,7 +1937,7 @@ record_btrace_start_replaying (struct th
       int upd_step_frame_id, upd_step_stack_frame_id;
 
       /* The current frame without replaying - computed via normal unwind.  */
-      frame = get_current_frame ();
+      frame = get_thread_current_frame (tp);
       frame_id = get_frame_id (frame);
 
       /* Check if we need to update any stepping-related frame id's.  */
@@ -1722,7 +1948,7 @@ record_btrace_start_replaying (struct th
 
       /* We start replaying at the end of the branch trace.  This corresponds
 	 to the current instruction.  */
-      replay = xmalloc (sizeof (*replay));
+      replay = XNEW (struct btrace_insn_iterator);
       btrace_insn_end (replay, btinfo);
 
       /* Skip gaps at the end of the trace.  */
@@ -1743,7 +1969,7 @@ record_btrace_start_replaying (struct th
       registers_changed_ptid (tp->ptid);
 
       /* The current frame with replaying - computed via btrace unwind.  */
-      frame = get_current_frame ();
+      frame = get_thread_current_frame (tp);
       frame_id = get_frame_id (frame);
 
       /* Replace stepping related frames where necessary.  */
@@ -1754,9 +1980,6 @@ record_btrace_start_replaying (struct th
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      /* Restore the previous execution state.  */
-      set_executing (tp->ptid, executing);
-
       xfree (btinfo->replay);
       btinfo->replay = NULL;
 
@@ -1766,9 +1989,6 @@ record_btrace_start_replaying (struct th
     }
   END_CATCH
 
-  /* Restore the previous execution state.  */
-  set_executing (tp->ptid, executing);
-
   return replay;
 }
 
@@ -1788,51 +2008,93 @@ record_btrace_stop_replaying (struct thr
   registers_changed_ptid (tp->ptid);
 }
 
+/* Stop replaying TP if it is at the end of its execution history.  */
+
+static void
+record_btrace_stop_replaying_at_end (struct thread_info *tp)
+{
+  struct btrace_insn_iterator *replay, end;
+  struct btrace_thread_info *btinfo;
+
+  btinfo = &tp->btrace;
+  replay = btinfo->replay;
+
+  if (replay == NULL)
+    return;
+
+  btrace_insn_end (&end, btinfo);
+
+  if (btrace_insn_cmp (replay, &end) == 0)
+    record_btrace_stop_replaying (tp);
+}
+
 /* The to_resume method of target record-btrace.  */
 
 static void
 record_btrace_resume (struct target_ops *ops, ptid_t ptid, int step,
 		      enum gdb_signal signal)
 {
-  struct thread_info *tp, *other;
-  enum btrace_thread_flag flag;
+  struct thread_info *tp;
+  enum btrace_thread_flag flag, cflag;
 
-  DEBUG ("resume %s: %s", target_pid_to_str (ptid), step ? "step" : "cont");
+  DEBUG ("resume %s: %s%s", target_pid_to_str (ptid),
+	 execution_direction == EXEC_REVERSE ? "reverse-" : "",
+	 step ? "step" : "cont");
 
-  /* Store the execution direction of the last resume.  */
-  record_btrace_resume_exec_dir = execution_direction;
+  /* Store the execution direction of the last resume.
 
-  tp = record_btrace_find_resume_thread (ptid);
-  if (tp == NULL)
-    error (_("Cannot find thread to resume."));
+     If there is more than one to_resume call, we have to rely on infrun
+     to not change the execution direction in-between.  */
+  record_btrace_resume_exec_dir = execution_direction;
 
-  /* Stop replaying other threads if the thread to resume is not replaying.  */
-  if (!btrace_is_replaying (tp) && execution_direction != EXEC_REVERSE)
-    ALL_NON_EXITED_THREADS (other)
-      record_btrace_stop_replaying (other);
+  /* As long as we're not replaying, just forward the request.
 
-  /* As long as we're not replaying, just forward the request.  */
-  if (!record_btrace_is_replaying (ops) && execution_direction != EXEC_REVERSE)
+     For non-stop targets this means that no thread is replaying.  In order to
+     make progress, we may need to explicitly move replaying threads to the end
+     of their execution history.  */
+  if ((execution_direction != EXEC_REVERSE)
+      && !record_btrace_is_replaying (ops, minus_one_ptid))
     {
       ops = ops->beneath;
-      return ops->to_resume (ops, ptid, step, signal);
+      ops->to_resume (ops, ptid, step, signal);
+      return;
     }
 
   /* Compute the btrace thread flag for the requested move.  */
-  if (step == 0)
-    flag = execution_direction == EXEC_REVERSE ? BTHR_RCONT : BTHR_CONT;
+  if (execution_direction == EXEC_REVERSE)
+    {
+      flag = step == 0 ? BTHR_RCONT : BTHR_RSTEP;
+      cflag = BTHR_RCONT;
+    }
   else
-    flag = execution_direction == EXEC_REVERSE ? BTHR_RSTEP : BTHR_STEP;
-
-  /* At the moment, we only move a single thread.  We could also move
-     all threads in parallel by single-stepping each resumed thread
-     until the first runs into an event.
-     When we do that, we would want to continue all other threads.
-     For now, just resume one thread to not confuse to_wait.  */
-  record_btrace_resume_thread (tp, flag);
+    {
+      flag = step == 0 ? BTHR_CONT : BTHR_STEP;
+      cflag = BTHR_CONT;
+    }
 
   /* We just indicate the resume intent here.  The actual stepping happens in
-     record_btrace_wait below.  */
+     record_btrace_wait below.
+
+     For all-stop targets, we only step INFERIOR_PTID and continue others.  */
+  if (!target_is_non_stop_p ())
+    {
+      gdb_assert (ptid_match (inferior_ptid, ptid));
+
+      ALL_NON_EXITED_THREADS (tp)
+	if (ptid_match (tp->ptid, ptid))
+	  {
+	    if (ptid_match (tp->ptid, inferior_ptid))
+	      record_btrace_resume_thread (tp, flag);
+	    else
+	      record_btrace_resume_thread (tp, cflag);
+	  }
+    }
+  else
+    {
+      ALL_NON_EXITED_THREADS (tp)
+	if (ptid_match (tp->ptid, ptid))
+	  record_btrace_resume_thread (tp, flag);
+    }
 
   /* Async support.  */
   if (target_can_async_p ())
@@ -1842,24 +2104,34 @@ record_btrace_resume (struct target_ops 
     }
 }
 
-/* Find a thread to move.  */
+/* The to_commit_resume method of target record-btrace.  */
 
-static struct thread_info *
-record_btrace_find_thread_to_move (ptid_t ptid)
+static void
+record_btrace_commit_resume (struct target_ops *ops)
 {
-  struct thread_info *tp;
+  if ((execution_direction != EXEC_REVERSE)
+      && !record_btrace_is_replaying (ops, minus_one_ptid))
+    ops->beneath->to_commit_resume (ops->beneath);
+}
 
-  /* First check the parameter thread.  */
-  tp = find_thread_ptid (ptid);
-  if (tp != NULL && (tp->btrace.flags & BTHR_MOVE) != 0)
-    return tp;
+/* Cancel resuming TP.  */
 
-  /* Otherwise, find one other thread that has been resumed.  */
-  ALL_NON_EXITED_THREADS (tp)
-    if ((tp->btrace.flags & BTHR_MOVE) != 0)
-      return tp;
+static void
+record_btrace_cancel_resume (struct thread_info *tp)
+{
+  enum btrace_thread_flag flags;
 
-  return NULL;
+  flags = tp->btrace.flags & (BTHR_MOVE | BTHR_STOP);
+  if (flags == 0)
+    return;
+
+  DEBUG ("cancel resume thread %s (%s): %x (%s)",
+	 print_thread_id (tp),
+	 target_pid_to_str (tp->ptid), flags,
+	 btrace_thread_flag_to_str (flags));
+
+  tp->btrace.flags &= ~(BTHR_MOVE | BTHR_STOP);
+  record_btrace_stop_replaying_at_end (tp);
 }
 
 /* Return a target_waitstatus indicating that we ran out of history.  */
@@ -1887,6 +2159,56 @@ btrace_step_stopped (void)
   return status;
 }
 
+/* Return a target_waitstatus indicating that a thread was stopped as
+   requested.  */
+
+static struct target_waitstatus
+btrace_step_stopped_on_request (void)
+{
+  struct target_waitstatus status;
+
+  status.kind = TARGET_WAITKIND_STOPPED;
+  status.value.sig = GDB_SIGNAL_0;
+
+  return status;
+}
+
+/* Return a target_waitstatus indicating a spurious stop.  */
+
+static struct target_waitstatus
+btrace_step_spurious (void)
+{
+  struct target_waitstatus status;
+
+  status.kind = TARGET_WAITKIND_SPURIOUS;
+
+  return status;
+}
+
+/* Return a target_waitstatus indicating that the thread was not resumed.  */
+
+static struct target_waitstatus
+btrace_step_no_resumed (void)
+{
+  struct target_waitstatus status;
+
+  status.kind = TARGET_WAITKIND_NO_RESUMED;
+
+  return status;
+}
+
+/* Return a target_waitstatus indicating that we should wait again.  */
+
+static struct target_waitstatus
+btrace_step_again (void)
+{
+  struct target_waitstatus status;
+
+  status.kind = TARGET_WAITKIND_IGNORE;
+
+  return status;
+}
+
 /* Clear the record histories.  */
 
 static void
@@ -1899,157 +2221,225 @@ record_btrace_clear_histories (struct bt
   btinfo->call_history = NULL;
 }
 
-/* Step a single thread.  */
+/* Check whether TP's current replay position is at a breakpoint.  */
 
-static struct target_waitstatus
-record_btrace_step_thread (struct thread_info *tp)
+static int
+record_btrace_replay_at_breakpoint (struct thread_info *tp)
 {
-  struct btrace_insn_iterator *replay, end;
+  struct btrace_insn_iterator *replay;
   struct btrace_thread_info *btinfo;
-  struct address_space *aspace;
+  const struct btrace_insn *insn;
   struct inferior *inf;
-  enum btrace_thread_flag flags;
-  unsigned int steps;
 
-  /* We can't step without an execution history.  */
-  if (btrace_is_empty (tp))
-    return btrace_step_no_history ();
+  btinfo = &tp->btrace;
+  replay = btinfo->replay;
+
+  if (replay == NULL)
+    return 0;
+
+  insn = btrace_insn_get (replay);
+  if (insn == NULL)
+    return 0;
+
+  inf = find_inferior_ptid (tp->ptid);
+  if (inf == NULL)
+    return 0;
+
+  return record_check_stopped_by_breakpoint (inf->aspace, insn->pc,
+					     &btinfo->stop_reason);
+}
+
+/* Step one instruction in forward direction.  */
+
+static struct target_waitstatus
+record_btrace_single_step_forward (struct thread_info *tp)
+{
+  struct btrace_insn_iterator *replay, end, start;
+  struct btrace_thread_info *btinfo;
 
   btinfo = &tp->btrace;
   replay = btinfo->replay;
 
-  flags = btinfo->flags & BTHR_MOVE;
-  btinfo->flags &= ~BTHR_MOVE;
+  /* We're done if we're not replaying.  */
+  if (replay == NULL)
+    return btrace_step_no_history ();
 
-  DEBUG ("stepping %d (%s): %u", tp->num, target_pid_to_str (tp->ptid), flags);
+  /* Check if we're stepping a breakpoint.  */
+  if (record_btrace_replay_at_breakpoint (tp))
+    return btrace_step_stopped ();
 
-  switch (flags)
+  /* Skip gaps during replay.  If we end up at a gap (at the end of the trace),
+     jump back to the instruction at which we started.  */
+  start = *replay;
+  do
     {
-    default:
-      internal_error (__FILE__, __LINE__, _("invalid stepping type."));
+      unsigned int steps;
 
-    case BTHR_STEP:
-      /* We're done if we're not replaying.  */
-      if (replay == NULL)
-	return btrace_step_no_history ();
+      /* We will bail out here if we continue stepping after reaching the end
+	 of the execution history.  */
+      steps = btrace_insn_next (replay, 1);
+      if (steps == 0)
+	{
+	  *replay = start;
+	  return btrace_step_no_history ();
+	}
+    }
+  while (btrace_insn_get (replay) == NULL);
+
+  /* Determine the end of the instruction trace.  */
+  btrace_insn_end (&end, btinfo);
+
+  /* The execution trace contains (and ends with) the current instruction.
+     This instruction has not been executed, yet, so the trace really ends
+     one instruction earlier.  */
+  if (btrace_insn_cmp (replay, &end) == 0)
+    return btrace_step_no_history ();
+
+  return btrace_step_spurious ();
+}
+
+/* Step one instruction in backward direction.  */
+
+static struct target_waitstatus
+record_btrace_single_step_backward (struct thread_info *tp)
+{
+  struct btrace_insn_iterator *replay, start;
+  struct btrace_thread_info *btinfo;
+
+  btinfo = &tp->btrace;
+  replay = btinfo->replay;
 
-      /* Skip gaps during replay.  */
-      do
+  /* Start replaying if we're not already doing so.  */
+  if (replay == NULL)
+    replay = record_btrace_start_replaying (tp);
+
+  /* If we can't step any further, we reached the end of the history.
+     Skip gaps during replay.  If we end up at a gap (at the beginning of
+     the trace), jump back to the instruction at which we started.  */
+  start = *replay;
+  do
+    {
+      unsigned int steps;
+
+      steps = btrace_insn_prev (replay, 1);
+      if (steps == 0)
 	{
-	  steps = btrace_insn_next (replay, 1);
-	  if (steps == 0)
-	    {
-	      record_btrace_stop_replaying (tp);
-	      return btrace_step_no_history ();
-	    }
+	  *replay = start;
+	  return btrace_step_no_history ();
 	}
-      while (btrace_insn_get (replay) == NULL);
+    }
+  while (btrace_insn_get (replay) == NULL);
 
-      /* Determine the end of the instruction trace.  */
-      btrace_insn_end (&end, btinfo);
+  /* Check if we're stepping a breakpoint.
+
+     For reverse-stepping, this check is after the step.  There is logic in
+     infrun.c that handles reverse-stepping separately.  See, for example,
+     proceed and adjust_pc_after_break.
 
-      /* We stop replaying if we reached the end of the trace.  */
-      if (btrace_insn_cmp (replay, &end) == 0)
-	record_btrace_stop_replaying (tp);
+     This code assumes that for reverse-stepping, PC points to the last
+     de-executed instruction, whereas for forward-stepping PC points to the
+     next to-be-executed instruction.  */
+  if (record_btrace_replay_at_breakpoint (tp))
+    return btrace_step_stopped ();
+
+  return btrace_step_spurious ();
+}
+
+/* Step a single thread.  */
+
+static struct target_waitstatus
+record_btrace_step_thread (struct thread_info *tp)
+{
+  struct btrace_thread_info *btinfo;
+  struct target_waitstatus status;
+  enum btrace_thread_flag flags;
+
+  btinfo = &tp->btrace;
+
+  flags = btinfo->flags & (BTHR_MOVE | BTHR_STOP);
+  btinfo->flags &= ~(BTHR_MOVE | BTHR_STOP);
+
+  DEBUG ("stepping thread %s (%s): %x (%s)", print_thread_id (tp),
+	 target_pid_to_str (tp->ptid), flags,
+	 btrace_thread_flag_to_str (flags));
+
+  /* We can't step without an execution history.  */
+  if ((flags & BTHR_MOVE) != 0 && btrace_is_empty (tp))
+    return btrace_step_no_history ();
+
+  switch (flags)
+    {
+    default:
+      internal_error (__FILE__, __LINE__, _("invalid stepping type."));
+
+    case BTHR_STOP:
+      return btrace_step_stopped_on_request ();
+
+    case BTHR_STEP:
+      status = record_btrace_single_step_forward (tp);
+      if (status.kind != TARGET_WAITKIND_SPURIOUS)
+	break;
 
       return btrace_step_stopped ();
 
     case BTHR_RSTEP:
-      /* Start replaying if we're not already doing so.  */
-      if (replay == NULL)
-	replay = record_btrace_start_replaying (tp);
-
-      /* If we can't step any further, we reached the end of the history.
-	 Skip gaps during replay.  */
-      do
-	{
-	  steps = btrace_insn_prev (replay, 1);
-	  if (steps == 0)
-	    return btrace_step_no_history ();
-
-	}
-      while (btrace_insn_get (replay) == NULL);
+      status = record_btrace_single_step_backward (tp);
+      if (status.kind != TARGET_WAITKIND_SPURIOUS)
+	break;
 
       return btrace_step_stopped ();
 
     case BTHR_CONT:
-      /* We're done if we're not replaying.  */
-      if (replay == NULL)
-	return btrace_step_no_history ();
+      status = record_btrace_single_step_forward (tp);
+      if (status.kind != TARGET_WAITKIND_SPURIOUS)
+	break;
 
-      inf = find_inferior_ptid (tp->ptid);
-      aspace = inf->aspace;
+      btinfo->flags |= flags;
+      return btrace_step_again ();
 
-      /* Determine the end of the instruction trace.  */
-      btrace_insn_end (&end, btinfo);
+    case BTHR_RCONT:
+      status = record_btrace_single_step_backward (tp);
+      if (status.kind != TARGET_WAITKIND_SPURIOUS)
+	break;
+
+      btinfo->flags |= flags;
+      return btrace_step_again ();
+    }
 
-      for (;;)
-	{
-	  const struct btrace_insn *insn;
+  /* We keep threads moving at the end of their execution history.  The to_wait
+     method will stop the thread for whom the event is reported.  */
+  if (status.kind == TARGET_WAITKIND_NO_HISTORY)
+    btinfo->flags |= flags;
 
-	  /* Skip gaps during replay.  */
-	  do
-	    {
-	      steps = btrace_insn_next (replay, 1);
-	      if (steps == 0)
-		{
-		  record_btrace_stop_replaying (tp);
-		  return btrace_step_no_history ();
-		}
+  return status;
+}
 
-	      insn = btrace_insn_get (replay);
-	    }
-	  while (insn == NULL);
+/* A vector of threads.  */
 
-	  /* We stop replaying if we reached the end of the trace.  */
-	  if (btrace_insn_cmp (replay, &end) == 0)
-	    {
-	      record_btrace_stop_replaying (tp);
-	      return btrace_step_no_history ();
-	    }
+typedef struct thread_info * tp_t;
+DEF_VEC_P (tp_t);
 
-	  DEBUG ("stepping %d (%s) ... %s", tp->num,
-		 target_pid_to_str (tp->ptid),
-		 core_addr_to_string_nz (insn->pc));
-
-	  if (record_check_stopped_by_breakpoint (aspace, insn->pc,
-						  &btinfo->stop_reason))
-	    return btrace_step_stopped ();
-	}
+/* Announce further events if necessary.  */
 
-    case BTHR_RCONT:
-      /* Start replaying if we're not already doing so.  */
-      if (replay == NULL)
-	replay = record_btrace_start_replaying (tp);
+static void
+record_btrace_maybe_mark_async_event (const VEC (tp_t) *moving,
+				      const VEC (tp_t) *no_history)
+{
+  int more_moving, more_no_history;
 
-      inf = find_inferior_ptid (tp->ptid);
-      aspace = inf->aspace;
+  more_moving = !VEC_empty (tp_t, moving);
+  more_no_history = !VEC_empty (tp_t, no_history);
 
-      for (;;)
-	{
-	  const struct btrace_insn *insn;
+  if (!more_moving && !more_no_history)
+    return;
 
-	  /* If we can't step any further, we reached the end of the history.
-	     Skip gaps during replay.  */
-	  do
-	    {
-	      steps = btrace_insn_prev (replay, 1);
-	      if (steps == 0)
-		return btrace_step_no_history ();
+  if (more_moving)
+    DEBUG ("movers pending");
 
-	      insn = btrace_insn_get (replay);
-	    }
-	  while (insn == NULL);
+  if (more_no_history)
+    DEBUG ("no-history pending");
 
-	  DEBUG ("reverse-stepping %d (%s) ... %s", tp->num,
-		 target_pid_to_str (tp->ptid),
-		 core_addr_to_string_nz (insn->pc));
-
-	  if (record_check_stopped_by_breakpoint (aspace, insn->pc,
-						  &btinfo->stop_reason))
-	    return btrace_step_stopped ();
-	}
-    }
+  mark_async_event_handler (record_btrace_async_inferior_event_handler);
 }
 
 /* The to_wait method of target record-btrace.  */
@@ -2058,44 +2448,162 @@ static ptid_t
 record_btrace_wait (struct target_ops *ops, ptid_t ptid,
 		    struct target_waitstatus *status, int options)
 {
-  struct thread_info *tp, *other;
+  VEC (tp_t) *moving, *no_history;
+  struct thread_info *tp, *eventing;
+  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
 
   DEBUG ("wait %s (0x%x)", target_pid_to_str (ptid), options);
 
   /* As long as we're not replaying, just forward the request.  */
-  if (!record_btrace_is_replaying (ops) && execution_direction != EXEC_REVERSE)
+  if ((execution_direction != EXEC_REVERSE)
+      && !record_btrace_is_replaying (ops, minus_one_ptid))
     {
       ops = ops->beneath;
       return ops->to_wait (ops, ptid, status, options);
     }
 
-  /* Let's find a thread to move.  */
-  tp = record_btrace_find_thread_to_move (ptid);
-  if (tp == NULL)
+  moving = NULL;
+  no_history = NULL;
+
+  make_cleanup (VEC_cleanup (tp_t), &moving);
+  make_cleanup (VEC_cleanup (tp_t), &no_history);
+
+  /* Keep a work list of moving threads.  */
+  ALL_NON_EXITED_THREADS (tp)
+    if (ptid_match (tp->ptid, ptid)
+	&& ((tp->btrace.flags & (BTHR_MOVE | BTHR_STOP)) != 0))
+      VEC_safe_push (tp_t, moving, tp);
+
+  if (VEC_empty (tp_t, moving))
+    {
+      *status = btrace_step_no_resumed ();
+
+      DEBUG ("wait ended by %s: %s", target_pid_to_str (null_ptid),
+	     target_waitstatus_to_string (status));
+
+      do_cleanups (cleanups);
+      return null_ptid;
+    }
+
+  /* Step moving threads one by one, one step each, until either one thread
+     reports an event or we run out of threads to step.
+
+     When stepping more than one thread, chances are that some threads reach
+     the end of their execution history earlier than others.  If we reported
+     this immediately, all-stop on top of non-stop would stop all threads and
+     resume the same threads next time.  And we would report the same thread
+     having reached the end of its execution history again.
+
+     In the worst case, this would starve the other threads.  But even if other
+     threads would be allowed to make progress, this would result in far too
+     many intermediate stops.
+
+     We therefore delay the reporting of "no execution history" until we have
+     nothing else to report.  By this time, all threads should have moved to
+     either the beginning or the end of their execution history.  There will
+     be a single user-visible stop.  */
+  eventing = NULL;
+  while ((eventing == NULL) && !VEC_empty (tp_t, moving))
+    {
+      unsigned int ix;
+
+      ix = 0;
+      while ((eventing == NULL) && VEC_iterate (tp_t, moving, ix, tp))
+	{
+	  *status = record_btrace_step_thread (tp);
+
+	  switch (status->kind)
+	    {
+	    case TARGET_WAITKIND_IGNORE:
+	      ix++;
+	      break;
+
+	    case TARGET_WAITKIND_NO_HISTORY:
+	      VEC_safe_push (tp_t, no_history,
+			     VEC_ordered_remove (tp_t, moving, ix));
+	      break;
+
+	    default:
+	      eventing = VEC_unordered_remove (tp_t, moving, ix);
+	      break;
+	    }
+	}
+    }
+
+  if (eventing == NULL)
     {
-      DEBUG ("wait %s: no thread", target_pid_to_str (ptid));
+      /* We started with at least one moving thread.  This thread must have
+	 either stopped or reached the end of its execution history.
+
+	 In the former case, EVENTING must not be NULL.
+	 In the latter case, NO_HISTORY must not be empty.  */
+      gdb_assert (!VEC_empty (tp_t, no_history));
+
+      /* We kept threads moving at the end of their execution history.  Stop
+	 EVENTING now that we are going to report its stop.  */
+      eventing = VEC_unordered_remove (tp_t, no_history, 0);
+      eventing->btrace.flags &= ~BTHR_MOVE;
 
-      status->kind = TARGET_WAITKIND_IGNORE;
-      return minus_one_ptid;
+      *status = btrace_step_no_history ();
     }
 
-  /* We only move a single thread.  We're not able to correlate threads.  */
-  *status = record_btrace_step_thread (tp);
+  gdb_assert (eventing != NULL);
+
+  /* We kept threads replaying at the end of their execution history.  Stop
+     replaying EVENTING now that we are going to report its stop.  */
+  record_btrace_stop_replaying_at_end (eventing);
 
   /* Stop all other threads. */
-  if (!non_stop)
-    ALL_NON_EXITED_THREADS (other)
-      other->btrace.flags &= ~BTHR_MOVE;
+  if (!target_is_non_stop_p ())
+    ALL_NON_EXITED_THREADS (tp)
+      record_btrace_cancel_resume (tp);
+
+  /* In async mode, we need to announce further events.  */
+  if (target_is_async_p ())
+    record_btrace_maybe_mark_async_event (moving, no_history);
 
   /* Start record histories anew from the current position.  */
-  record_btrace_clear_histories (&tp->btrace);
+  record_btrace_clear_histories (&eventing->btrace);
 
   /* We moved the replay position but did not update registers.  */
-  registers_changed_ptid (tp->ptid);
+  registers_changed_ptid (eventing->ptid);
+
+  DEBUG ("wait ended by thread %s (%s): %s",
+	 print_thread_id (eventing),
+	 target_pid_to_str (eventing->ptid),
+	 target_waitstatus_to_string (status));
 
-  return tp->ptid;
+  do_cleanups (cleanups);
+  return eventing->ptid;
 }
 
+/* The to_stop method of target record-btrace.  */
+
+static void
+record_btrace_stop (struct target_ops *ops, ptid_t ptid)
+{
+  DEBUG ("stop %s", target_pid_to_str (ptid));
+
+  /* As long as we're not replaying, just forward the request.  */
+  if ((execution_direction != EXEC_REVERSE)
+      && !record_btrace_is_replaying (ops, minus_one_ptid))
+    {
+      ops = ops->beneath;
+      ops->to_stop (ops, ptid);
+    }
+  else
+    {
+      struct thread_info *tp;
+
+      ALL_NON_EXITED_THREADS (tp)
+       if (ptid_match (tp->ptid, ptid))
+         {
+           tp->btrace.flags &= ~BTHR_MOVE;
+           tp->btrace.flags |= BTHR_STOP;
+         }
+    }
+ }
+
 /* The to_can_execute_reverse method of target record-btrace.  */
 
 static int
@@ -2109,7 +2617,7 @@ record_btrace_can_execute_reverse (struc
 static int
 record_btrace_stopped_by_sw_breakpoint (struct target_ops *ops)
 {
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     {
       struct thread_info *tp = inferior_thread ();
 
@@ -2125,7 +2633,7 @@ record_btrace_stopped_by_sw_breakpoint (
 static int
 record_btrace_supports_stopped_by_sw_breakpoint (struct target_ops *ops)
 {
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     return 1;
 
   return ops->beneath->to_supports_stopped_by_sw_breakpoint (ops->beneath);
@@ -2136,7 +2644,7 @@ record_btrace_supports_stopped_by_sw_bre
 static int
 record_btrace_stopped_by_hw_breakpoint (struct target_ops *ops)
 {
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     {
       struct thread_info *tp = inferior_thread ();
 
@@ -2152,7 +2660,7 @@ record_btrace_stopped_by_hw_breakpoint (
 static int
 record_btrace_supports_stopped_by_hw_breakpoint (struct target_ops *ops)
 {
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     return 1;
 
   return ops->beneath->to_supports_stopped_by_hw_breakpoint (ops->beneath);
@@ -2164,7 +2672,7 @@ static void
 record_btrace_update_thread_list (struct target_ops *ops)
 {
   /* We don't add or remove threads during replay.  */
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     return;
 
   /* Forward the request.  */
@@ -2178,7 +2686,7 @@ static int
 record_btrace_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
   /* We don't add or remove threads during replay.  */
-  if (record_btrace_is_replaying (ops))
+  if (record_btrace_is_replaying (ops, minus_one_ptid))
     return find_thread_ptid (ptid) != NULL;
 
   /* Forward the request.  */
@@ -2212,6 +2720,9 @@ record_btrace_set_replay (struct thread_
 
   /* Start anew from the new replay position.  */
   record_btrace_clear_histories (btinfo);
+
+  stop_pc = regcache_read_pc (get_current_regcache ());
+  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
 }
 
 /* The to_goto_record_begin method of target record-btrace.  */
@@ -2225,9 +2736,18 @@ record_btrace_goto_begin (struct target_
   tp = require_btrace_thread ();
 
   btrace_insn_begin (&begin, &tp->btrace);
-  record_btrace_set_replay (tp, &begin);
 
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+  /* Skip gaps at the beginning of the trace.  */
+  while (btrace_insn_get (&begin) == NULL)
+    {
+      unsigned int steps;
+
+      steps = btrace_insn_next (&begin, 1);
+      if (steps == 0)
+	error (_("No trace."));
+    }
+
+  record_btrace_set_replay (tp, &begin);
 }
 
 /* The to_goto_record_end method of target record-btrace.  */
@@ -2240,8 +2760,6 @@ record_btrace_goto_end (struct target_op
   tp = require_btrace_thread ();
 
   record_btrace_set_replay (tp, NULL);
-
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
 }
 
 /* The to_goto_record method of target record-btrace.  */
@@ -2263,12 +2781,23 @@ record_btrace_goto (struct target_ops *s
   tp = require_btrace_thread ();
 
   found = btrace_find_insn_by_number (&it, &tp->btrace, number);
-  if (found == 0)
+
+  /* Check if the instruction could not be found or is a gap.  */
+  if (found == 0 || btrace_insn_get (&it) == NULL)
     error (_("No such instruction."));
 
   record_btrace_set_replay (tp, &it);
+}
 
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+/* The to_record_stop_replaying method of target record-btrace.  */
+
+static void
+record_btrace_stop_replaying_all (struct target_ops *self)
+{
+  struct thread_info *tp;
+
+  ALL_NON_EXITED_THREADS (tp)
+    record_btrace_stop_replaying (tp);
 }
 
 /* The to_execution_direction target method.  */
@@ -2310,7 +2839,7 @@ init_record_btrace_ops (void)
   ops->to_close = record_btrace_close;
   ops->to_async = record_btrace_async;
   ops->to_detach = record_detach;
-  ops->to_disconnect = record_disconnect;
+  ops->to_disconnect = record_btrace_disconnect;
   ops->to_mourn_inferior = record_mourn_inferior;
   ops->to_kill = record_kill;
   ops->to_stop_recording = record_btrace_stop_recording;
@@ -2321,7 +2850,10 @@ init_record_btrace_ops (void)
   ops->to_call_history = record_btrace_call_history;
   ops->to_call_history_from = record_btrace_call_history_from;
   ops->to_call_history_range = record_btrace_call_history_range;
+  ops->to_record_method = record_btrace_record_method;
   ops->to_record_is_replaying = record_btrace_is_replaying;
+  ops->to_record_will_replay = record_btrace_will_replay;
+  ops->to_record_stop_replaying = record_btrace_stop_replaying_all;
   ops->to_xfer_partial = record_btrace_xfer_partial;
   ops->to_remove_breakpoint = record_btrace_remove_breakpoint;
   ops->to_insert_breakpoint = record_btrace_insert_breakpoint;
@@ -2331,7 +2863,9 @@ init_record_btrace_ops (void)
   ops->to_get_unwinder = &record_btrace_to_get_unwinder;
   ops->to_get_tailcall_unwinder = &record_btrace_to_get_tailcall_unwinder;
   ops->to_resume = record_btrace_resume;
+  ops->to_commit_resume = record_btrace_commit_resume;
   ops->to_wait = record_btrace_wait;
+  ops->to_stop = record_btrace_stop;
   ops->to_update_thread_list = record_btrace_update_thread_list;
   ops->to_thread_alive = record_btrace_thread_alive;
   ops->to_goto_record_begin = record_btrace_goto_begin;
@@ -2373,7 +2907,7 @@ cmd_record_btrace_bts_start (char *args,
   END_CATCH
 }
 
-/* Start recording Intel(R) Processor Trace.  */
+/* Start recording in Intel Processor Trace format.  */
 
 static void
 cmd_record_btrace_pt_start (char *args, int from_tty)
@@ -2535,7 +3069,7 @@ This format may not be available on all 
 
   add_cmd ("pt", class_obscure, cmd_record_btrace_pt_start,
 	   _("\
-Start branch trace recording in Intel(R) Processor Trace format.\n\n\
+Start branch trace recording in Intel Processor Trace format.\n\n\
 This format may not be available on all processors."),
 	   &record_btrace_cmdlist);
   add_alias_cmd ("pt", "btrace pt", class_obscure, 1, &record_cmdlist);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-btrace.h ./gdb/record-btrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-btrace.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/record-btrace.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* Branch trace support for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   Contributed by Intel Corp. <tim.wiederhake@intel.com>
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef RECORD_BTRACE_H
+#define RECORD_BTRACE_H
+
+/* Push the record_btrace target.  */
+extern void record_btrace_push_target (void);
+
+#endif /* RECORD_BTRACE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record.c ./gdb/record.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/record.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -93,6 +93,48 @@ record_preopen (void)
 
 /* See record.h.  */
 
+void
+record_start (const char *method, const char *format, int from_tty)
+{
+  if (method == NULL)
+    {
+      if (format == NULL)
+	execute_command_to_string ("record", from_tty);
+      else
+	error (_("Invalid format."));
+    }
+  else if (strcmp (method, "full") == 0)
+    {
+      if (format == NULL)
+	execute_command_to_string ("record full", from_tty);
+      else
+	error (_("Invalid format."));
+    }
+  else if (strcmp (method, "btrace") == 0)
+    {
+      if (format == NULL)
+	execute_command_to_string ("record btrace", from_tty);
+      else if (strcmp (format, "bts") == 0)
+	execute_command_to_string ("record btrace bts", from_tty);
+      else if (strcmp (format, "pt") == 0)
+	execute_command_to_string ("record btrace pt", from_tty);
+      else
+	error (_("Invalid format."));
+    }
+  else
+    error (_("Invalid method."));
+}
+
+/* See record.h.  */
+
+void
+record_stop (int from_tty)
+{
+  execute_command_to_string ("record stop", from_tty);
+}
+
+/* See record.h.  */
+
 int
 record_read_memory (struct gdbarch *gdbarch,
 		    CORE_ADDR memaddr, gdb_byte *myaddr,
@@ -170,7 +212,7 @@ record_mourn_inferior (struct target_ops
      threads are discarded.  */
   record_unpush (t);
 
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 /* See record.h.  */
@@ -234,7 +276,7 @@ cmd_record_delete (char *args, int from_
 {
   require_record_target ();
 
-  if (!target_record_is_replaying ())
+  if (!target_record_is_replaying (inferior_ptid))
     {
       printf_unfiltered (_("Already at end of record list.\n"));
       return;
@@ -268,7 +310,7 @@ cmd_record_stop (char *args, int from_tt
   printf_unfiltered (_("Process record is stopped and all execution "
 		       "logs are deleted.\n"));
 
-  observer_notify_record_changed (current_inferior (), 0);
+  observer_notify_record_changed (current_inferior (), 0, NULL, NULL);
 }
 
 /* The "set record" command.  */
@@ -458,6 +500,7 @@ get_insn_history_modifiers (char **arg)
 	  switch (*args)
 	    {
 	    case 'm':
+	    case 's':
 	      modifiers |= DISASSEMBLY_SOURCE;
 	      modifiers |= DISASSEMBLY_FILENAME;
 	      break;
@@ -817,7 +860,7 @@ Argument is instruction number, as shown
 
   add_cmd ("instruction-history", class_obscure, cmd_record_insn_history, _("\
 Print disassembled instructions stored in the execution log.\n\
-With a /m modifier, source lines are included (if available).\n\
+With a /m or /s modifier, source lines are included (if available).\n\
 With a /r modifier, raw instructions in hex are included.\n\
 With a /f modifier, function names are omitted.\n\
 With a /p modifier, current position markers are omitted.\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-full.c ./gdb/record-full.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-full.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/record-full.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,6 +35,7 @@
 #include "gdb_bfd.h"
 #include "observer.h"
 #include "infrun.h"
+#include "common/gdb_unlinker.h"
 
 #include <signal.h>
 
@@ -244,7 +245,7 @@ record_full_reg_alloc (struct regcache *
   struct record_full_entry *rec;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
-  rec = xcalloc (1, sizeof (struct record_full_entry));
+  rec = XCNEW (struct record_full_entry);
   rec->type = record_full_reg;
   rec->u.reg.num = regnum;
   rec->u.reg.len = register_size (gdbarch, regnum);
@@ -272,7 +273,7 @@ record_full_mem_alloc (CORE_ADDR addr, i
 {
   struct record_full_entry *rec;
 
-  rec = xcalloc (1, sizeof (struct record_full_entry));
+  rec = XCNEW (struct record_full_entry);
   rec->type = record_full_mem;
   rec->u.mem.addr = addr;
   rec->u.mem.len = len;
@@ -300,7 +301,7 @@ record_full_end_alloc (void)
 {
   struct record_full_entry *rec;
 
-  rec = xcalloc (1, sizeof (struct record_full_entry));
+  rec = XCNEW (struct record_full_entry);
   rec->type = record_full_end;
 
   return rec;
@@ -535,26 +536,18 @@ record_full_arch_list_add_end (void)
 }
 
 static void
-record_full_check_insn_num (int set_terminal)
+record_full_check_insn_num (void)
 {
   if (record_full_insn_num == record_full_insn_max_num)
     {
       /* Ask user what to do.  */
       if (record_full_stop_at_limit)
 	{
-	  int q;
-
-	  if (set_terminal)
-	    target_terminal_ours ();
-	  q = yquery (_("Do you want to auto delete previous execution "
+	  if (!yquery (_("Do you want to auto delete previous execution "
 			"log entries when record/replay buffer becomes "
-			"full (record full stop-at-limit)?"));
-	  if (set_terminal)
-	    target_terminal_inferior ();
-	  if (q)
-	    record_full_stop_at_limit = 0;
-	  else
+			"full (record full stop-at-limit)?")))
 	    error (_("Process record: stopped by user."));
+	  record_full_stop_at_limit = 0;
 	}
     }
 }
@@ -583,7 +576,7 @@ record_full_message (struct regcache *re
   record_full_arch_list_tail = NULL;
 
   /* Check record_full_insn_num.  */
-  record_full_check_insn_num (1);
+  record_full_check_insn_num ();
 
   /* If gdb sends a signal value to target_resume,
      save it in the 'end' field of the previous instruction.
@@ -651,7 +644,8 @@ struct record_full_message_args {
 static int
 record_full_message_wrapper (void *args)
 {
-  struct record_full_message_args *record_full_args = args;
+  struct record_full_message_args *record_full_args
+    = (struct record_full_message_args *) args;
 
   return record_full_message (record_full_args->regcache,
 			      record_full_args->signal);
@@ -666,7 +660,7 @@ record_full_message_wrapper_safe (struct
   args.regcache = regcache;
   args.signal = signal;
 
-  return catch_errors (record_full_message_wrapper, &args, NULL,
+  return catch_errors (record_full_message_wrapper, &args, "",
 		       RETURN_MASK_ALL);
 }
 
@@ -725,7 +719,8 @@ record_full_exec_insn (struct regcache *
 	/* Nothing to do if the entry is flagged not_accessible.  */
         if (!entry->u.mem.mem_entry_not_accessible)
           {
-            gdb_byte *mem = alloca (entry->u.mem.len);
+            gdb_byte *mem = (gdb_byte *) xmalloc (entry->u.mem.len);
+            struct cleanup *cleanup = make_cleanup (xfree, mem);
 
             if (record_debug > 1)
               fprintf_unfiltered (gdb_stdlog,
@@ -770,6 +765,8 @@ record_full_exec_insn (struct regcache *
 		      record_full_stop_reason = TARGET_STOPPED_BY_WATCHPOINT;
 		  }
               }
+
+	    do_cleanups (cleanup);
           }
       }
       break;
@@ -800,7 +797,7 @@ record_full_core_open_1 (const char *nam
 
   /* Get record_full_core_regbuf.  */
   target_fetch_registers (regcache, -1);
-  record_full_core_regbuf = xmalloc (MAX_REGISTER_SIZE * regnum);
+  record_full_core_regbuf = (gdb_byte *) xmalloc (MAX_REGISTER_SIZE * regnum);
   for (i = 0; i < regnum; i ++)
     regcache_raw_collect (regcache, i,
 			  record_full_core_regbuf + MAX_REGISTER_SIZE * i);
@@ -825,7 +822,7 @@ static void
 record_full_open_1 (const char *name, int from_tty)
 {
   if (record_debug)
-    fprintf_unfiltered (gdb_stdlog, "Process record: record_full_open\n");
+    fprintf_unfiltered (gdb_stdlog, "Process record: record_full_open_1\n");
 
   /* check exec */
   if (!target_has_execution)
@@ -873,7 +870,7 @@ record_full_open (const char *name, int 
 
   record_full_init_record_breakpoints ();
 
-  observer_notify_record_changed (current_inferior (),  1);
+  observer_notify_record_changed (current_inferior (),  1, "full", NULL);
 }
 
 /* "to_close" target method.  Close the process record target.  */
@@ -973,24 +970,14 @@ record_full_resume (struct target_ops *o
             }
           else
             {
-              /* This arch support soft sigle step.  */
+              /* This arch supports soft single step.  */
               if (thread_has_single_step_breakpoints_set (inferior_thread ()))
                 {
                   /* This is a soft single step.  */
                   record_full_resume_step = 1;
                 }
               else
-                {
-                  /* This is a continue.
-                     Try to insert a soft single step breakpoint.  */
-                  if (!gdbarch_software_single_step (gdbarch,
-                                                     get_current_frame ()))
-                    {
-                      /* This system don't want use soft single step.
-                         Use hard sigle step.  */
-                      step = 1;
-                    }
-                }
+		step = !insert_single_step_breakpoints (gdbarch);
             }
         }
 
@@ -1006,6 +993,15 @@ record_full_resume (struct target_ops *o
     target_async (1);
 }
 
+/* "to_commit_resume" method for process record target.  */
+
+static void
+record_full_commit_resume (struct target_ops *ops)
+{
+  if (!RECORD_FULL_IS_REPLAY)
+    ops->beneath->to_commit_resume (ops->beneath);
+}
+
 static int record_full_get_sig = 0;
 
 /* SIGINT signal handler, registered by "to_wait" method.  */
@@ -1163,9 +1159,9 @@ record_full_wait_1 (struct target_ops *o
 			     If insert success, set step to 0.  */
 			  set_executing (inferior_ptid, 0);
 			  reinit_frame_cache ();
-			  if (gdbarch_software_single_step (gdbarch,
-                                                            get_current_frame ()))
-			    step = 0;
+
+			  step = !insert_single_step_breakpoints (gdbarch);
+
 			  set_executing (inferior_ptid, 1);
 			}
 
@@ -1176,6 +1172,7 @@ record_full_wait_1 (struct target_ops *o
 					    "target beneath\n");
 		      ops->beneath->to_resume (ops->beneath, ptid, step,
 					       GDB_SIGNAL_0);
+		      ops->beneath->to_commit_resume (ops->beneath);
 		      continue;
 		    }
 		}
@@ -1416,7 +1413,7 @@ static void
 record_full_registers_change (struct regcache *regcache, int regnum)
 {
   /* Check record_full_insn_num.  */
-  record_full_check_insn_num (0);
+  record_full_check_insn_num ();
 
   record_full_arch_list_head = NULL;
   record_full_arch_list_tail = NULL;
@@ -1542,7 +1539,7 @@ record_full_xfer_partial (struct target_
 	}
 
       /* Check record_full_insn_num */
-      record_full_check_insn_num (0);
+      record_full_check_insn_num ();
 
       /* Record registers change to list as an instruction.  */
       record_full_arch_list_head = NULL;
@@ -1646,6 +1643,7 @@ record_full_insert_breakpoint (struct ta
 {
   struct record_full_breakpoint *bp;
   int in_target_beneath = 0;
+  int ix;
 
   if (!RECORD_FULL_IS_REPLAY)
     {
@@ -1653,7 +1651,7 @@ record_full_insert_breakpoint (struct ta
 	 really need to install regular breakpoints in the inferior.
 	 However, we do have to insert software single-step
 	 breakpoints, in case the target can't hardware step.  To keep
-	 things single, we always insert.  */
+	 things simple, we always insert.  */
       struct cleanup *old_cleanups;
       int ret;
 
@@ -1667,6 +1665,22 @@ record_full_insert_breakpoint (struct ta
       in_target_beneath = 1;
     }
 
+  /* Use the existing entries if found in order to avoid duplication
+     in record_full_breakpoints.  */
+
+  for (ix = 0;
+       VEC_iterate (record_full_breakpoint_p,
+		    record_full_breakpoints, ix, bp);
+       ++ix)
+    {
+      if (bp->addr == bp_tgt->placed_address
+	  && bp->address_space == bp_tgt->placed_address_space)
+	{
+	  gdb_assert (bp->in_target_beneath == in_target_beneath);
+	  return 0;
+	}
+    }
+
   bp = XNEW (struct record_full_breakpoint);
   bp->addr = bp_tgt->placed_address;
   bp->address_space = bp_tgt->placed_address_space;
@@ -1680,7 +1694,8 @@ record_full_insert_breakpoint (struct ta
 static int
 record_full_remove_breakpoint (struct target_ops *ops,
 			       struct gdbarch *gdbarch,
-			       struct bp_target_info *bp_tgt)
+			       struct bp_target_info *bp_tgt,
+			       enum remove_bp_reason reason)
 {
   struct record_full_breakpoint *bp;
   int ix;
@@ -1700,15 +1715,18 @@ record_full_remove_breakpoint (struct ta
 
 	      old_cleanups = record_full_gdb_operation_disable_set ();
 	      ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch,
-							bp_tgt);
+							bp_tgt, reason);
 	      do_cleanups (old_cleanups);
 
 	      if (ret != 0)
 		return ret;
 	    }
 
-	  VEC_unordered_remove (record_full_breakpoint_p,
-				record_full_breakpoints, ix);
+	  if (reason == REMOVE_BREAKPOINT)
+	    {
+	      VEC_unordered_remove (record_full_breakpoint_p,
+				    record_full_breakpoints, ix);
+	    }
 	  return 0;
 	}
     }
@@ -1785,6 +1803,14 @@ record_full_execution_direction (struct 
   return record_full_execution_dir;
 }
 
+/* The to_record_method method of target record-full.  */
+
+enum record_method
+record_full_record_method (struct target_ops *self, ptid_t ptid)
+{
+  return RECORD_METHOD_FULL;
+}
+
 static void
 record_full_info (struct target_ops *self)
 {
@@ -1840,11 +1866,23 @@ record_full_delete (struct target_ops *s
 /* The "to_record_is_replaying" target method.  */
 
 static int
-record_full_is_replaying (struct target_ops *self)
+record_full_is_replaying (struct target_ops *self, ptid_t ptid)
 {
   return RECORD_FULL_IS_REPLAY;
 }
 
+/* The "to_record_will_replay" target method.  */
+
+static int
+record_full_will_replay (struct target_ops *self, ptid_t ptid, int dir)
+{
+  /* We can currently only record when executing forwards.  Should we be able
+     to record when executing backwards on targets that support reverse
+     execution, this needs to be changed.  */
+
+  return RECORD_FULL_IS_REPLAY || dir == EXEC_REVERSE;
+}
+
 /* Go to a specific entry.  */
 
 static void
@@ -1869,6 +1907,7 @@ record_full_goto_entry (struct record_fu
 
   registers_changed ();
   reinit_frame_cache ();
+  stop_pc = regcache_read_pc (get_current_regcache ());
   print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
 }
 
@@ -1916,6 +1955,14 @@ record_full_goto (struct target_ops *sel
   record_full_goto_entry (p);
 }
 
+/* The "to_record_stop_replaying" target method.  */
+
+static void
+record_full_stop_replaying (struct target_ops *self)
+{
+  record_full_goto_end (self);
+}
+
 static void
 init_record_full_ops (void)
 {
@@ -1927,6 +1974,7 @@ init_record_full_ops (void)
   record_full_ops.to_close = record_full_close;
   record_full_ops.to_async = record_full_async;
   record_full_ops.to_resume = record_full_resume;
+  record_full_ops.to_commit_resume = record_full_commit_resume;
   record_full_ops.to_wait = record_full_wait;
   record_full_ops.to_disconnect = record_disconnect;
   record_full_ops.to_detach = record_detach;
@@ -1952,10 +2000,13 @@ init_record_full_ops (void)
   record_full_ops.to_get_bookmark = record_full_get_bookmark;
   record_full_ops.to_goto_bookmark = record_full_goto_bookmark;
   record_full_ops.to_execution_direction = record_full_execution_direction;
+  record_full_ops.to_record_method = record_full_record_method;
   record_full_ops.to_info_record = record_full_info;
   record_full_ops.to_save_record = record_full_save;
   record_full_ops.to_delete_record = record_full_delete;
   record_full_ops.to_record_is_replaying = record_full_is_replaying;
+  record_full_ops.to_record_will_replay = record_full_will_replay;
+  record_full_ops.to_record_stop_replaying = record_full_stop_replaying;
   record_full_ops.to_goto_record_begin = record_full_goto_begin;
   record_full_ops.to_goto_record_end = record_full_goto_end;
   record_full_ops.to_goto_record = record_full_goto;
@@ -2083,9 +2134,7 @@ record_full_core_xfer_partial (struct ta
 		      if (!entry)
 			{
 			  /* Add a new entry.  */
-			  entry = (struct record_full_core_buf_entry *)
-			    xmalloc
-			    (sizeof (struct record_full_core_buf_entry));
+			  entry = XNEW (struct record_full_core_buf_entry);
 			  entry->p = p;
 			  if (!bfd_malloc_and_get_section
 			        (p->the_bfd_section->owner,
@@ -2146,7 +2195,8 @@ record_full_core_insert_breakpoint (stru
 static int
 record_full_core_remove_breakpoint (struct target_ops *ops,
 				    struct gdbarch *gdbarch,
-				    struct bp_target_info *bp_tgt)
+				    struct bp_target_info *bp_tgt,
+				    enum remove_bp_reason reason)
 {
   return 0;
 }
@@ -2201,9 +2251,11 @@ init_record_full_core_ops (void)
   record_full_core_ops.to_goto_bookmark = record_full_goto_bookmark;
   record_full_core_ops.to_execution_direction
     = record_full_execution_direction;
+  record_full_core_ops.to_record_method = record_full_record_method;
   record_full_core_ops.to_info_record = record_full_info;
   record_full_core_ops.to_delete_record = record_full_delete;
   record_full_core_ops.to_record_is_replaying = record_full_is_replaying;
+  record_full_core_ops.to_record_will_replay = record_full_will_replay;
   record_full_core_ops.to_goto_record_begin = record_full_goto_begin;
   record_full_core_ops.to_goto_record_end = record_full_goto_end;
   record_full_core_ops.to_goto_record = record_full_goto;
@@ -2420,7 +2472,7 @@ record_full_restore (void)
 	  bfdcore_read (core_bfd, osec, &signal, 
 			sizeof (signal), &bfd_offset);
 	  signal = netorder32 (signal);
-	  rec->u.end.sigval = signal;
+	  rec->u.end.sigval = (enum gdb_signal) signal;
 
 	  /* Get insn count.  */
 	  bfdcore_read (core_bfd, osec, &count, 
@@ -2496,17 +2548,6 @@ cmd_record_full_restore (char *args, int
   record_full_open (args, from_tty);
 }
 
-static void
-record_full_save_cleanups (void *data)
-{
-  bfd *obfd = data;
-  char *pathname = xstrdup (bfd_get_filename (obfd));
-
-  gdb_bfd_unref (obfd);
-  unlink (pathname);
-  xfree (pathname);
-}
-
 /* Save the execution log to a file.  We use a modified elf corefile
    format, with an extra section for our data.  */
 
@@ -2517,9 +2558,7 @@ record_full_save (struct target_ops *sel
   uint32_t magic;
   struct regcache *regcache;
   struct gdbarch *gdbarch;
-  struct cleanup *old_cleanups;
   struct cleanup *set_cleanups;
-  bfd *obfd;
   int save_size = 0;
   asection *osec = NULL;
   int bfd_offset = 0;
@@ -2530,8 +2569,10 @@ record_full_save (struct target_ops *sel
 			recfilename);
 
   /* Open the output file.  */
-  obfd = create_gcore_bfd (recfilename);
-  old_cleanups = make_cleanup (record_full_save_cleanups, obfd);
+  gdb_bfd_ref_ptr obfd (create_gcore_bfd (recfilename));
+
+  /* Arrange to remove the output file on failure.  */
+  gdb::unlinker unlink_file (recfilename);
 
   /* Save the current record entry to "cur_record_full_list".  */
   cur_record_full_list = record_full_list;
@@ -2574,20 +2615,20 @@ record_full_save (struct target_ops *sel
       }
 
   /* Make the new bfd section.  */
-  osec = bfd_make_section_anyway_with_flags (obfd, "precord",
+  osec = bfd_make_section_anyway_with_flags (obfd.get (), "precord",
                                              SEC_HAS_CONTENTS
                                              | SEC_READONLY);
   if (osec == NULL)
     error (_("Failed to create 'precord' section for corefile %s: %s"),
 	   recfilename,
            bfd_errmsg (bfd_get_error ()));
-  bfd_set_section_size (obfd, osec, save_size);
-  bfd_set_section_vma (obfd, osec, 0);
-  bfd_set_section_alignment (obfd, osec, 0);
-  bfd_section_lma (obfd, osec) = 0;
+  bfd_set_section_size (obfd.get (), osec, save_size);
+  bfd_set_section_vma (obfd.get (), osec, 0);
+  bfd_set_section_alignment (obfd.get (), osec, 0);
+  bfd_section_lma (obfd.get (), osec) = 0;
 
   /* Save corefile state.  */
-  write_gcore_file (obfd);
+  write_gcore_file (obfd.get ());
 
   /* Write out the record log.  */
   /* Write the magic code.  */
@@ -2597,7 +2638,7 @@ record_full_save (struct target_ops *sel
 			"  Writing 4-byte magic cookie "
 			"RECORD_FULL_FILE_MAGIC (0x%s)\n",
 		      phex_nz (magic, 4));
-  bfdcore_write (obfd, osec, &magic, sizeof (magic), &bfd_offset);
+  bfdcore_write (obfd.get (), osec, &magic, sizeof (magic), &bfd_offset);
 
   /* Save the entries to recfd and forward execute to the end of
      record list.  */
@@ -2612,7 +2653,7 @@ record_full_save (struct target_ops *sel
           uint64_t addr;
 
 	  type = record_full_list->type;
-          bfdcore_write (obfd, osec, &type, sizeof (type), &bfd_offset);
+          bfdcore_write (obfd.get (), osec, &type, sizeof (type), &bfd_offset);
 
           switch (record_full_list->type)
             {
@@ -2627,11 +2668,11 @@ record_full_save (struct target_ops *sel
 
               /* Write regnum.  */
               regnum = netorder32 (record_full_list->u.reg.num);
-              bfdcore_write (obfd, osec, &regnum,
+              bfdcore_write (obfd.get (), osec, &regnum,
 			     sizeof (regnum), &bfd_offset);
 
               /* Write regval.  */
-              bfdcore_write (obfd, osec,
+              bfdcore_write (obfd.get (), osec,
 			     record_full_get_loc (record_full_list),
 			     record_full_list->u.reg.len, &bfd_offset);
               break;
@@ -2649,15 +2690,16 @@ record_full_save (struct target_ops *sel
 
 	      /* Write memlen.  */
 	      len = netorder32 (record_full_list->u.mem.len);
-	      bfdcore_write (obfd, osec, &len, sizeof (len), &bfd_offset);
+	      bfdcore_write (obfd.get (), osec, &len, sizeof (len),
+			     &bfd_offset);
 
 	      /* Write memaddr.  */
 	      addr = netorder64 (record_full_list->u.mem.addr);
-	      bfdcore_write (obfd, osec, &addr, 
+	      bfdcore_write (obfd.get (), osec, &addr, 
 			     sizeof (addr), &bfd_offset);
 
 	      /* Write memval.  */
-	      bfdcore_write (obfd, osec,
+	      bfdcore_write (obfd.get (), osec,
 			     record_full_get_loc (record_full_list),
 			     record_full_list->u.mem.len, &bfd_offset);
               break;
@@ -2671,12 +2713,12 @@ record_full_save (struct target_ops *sel
 				      (unsigned long) sizeof (count));
 		/* Write signal value.  */
 		signal = netorder32 (record_full_list->u.end.sigval);
-		bfdcore_write (obfd, osec, &signal,
+		bfdcore_write (obfd.get (), osec, &signal,
 			       sizeof (signal), &bfd_offset);
 
 		/* Write insn count.  */
 		count = netorder32 (record_full_list->u.end.insn_num);
-		bfdcore_write (obfd, osec, &count,
+		bfdcore_write (obfd.get (), osec, &count,
 			       sizeof (count), &bfd_offset);
                 break;
             }
@@ -2705,8 +2747,7 @@ record_full_save (struct target_ops *sel
     }
 
   do_cleanups (set_cleanups);
-  gdb_bfd_unref (obfd);
-  discard_cleanups (old_cleanups);
+  unlink_file.keep ();
 
   /* Succeeded.  */
   printf_filtered (_("Saved core file %s with execution log.\n"),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-full.h ./gdb/record-full.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record-full.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/record-full.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target for GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record.h ./gdb/record.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/record.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/record.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Process record and replay target for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 #define _RECORD_H_
 
 #include "target/waitstatus.h" /* For enum target_stop_reason.  */
+#include "common/enum-flags.h"
 
 struct cmd_list_element;
 
@@ -36,6 +37,19 @@ extern struct cmd_list_element *info_rec
 extern const struct frame_unwind record_btrace_frame_unwind;
 extern const struct frame_unwind record_btrace_tailcall_frame_unwind;
 
+/* A list of different recording methods.  */
+enum record_method
+{
+  /* No or unknown record method.  */
+  RECORD_METHOD_NONE,
+
+  /* Record method "full".  */
+  RECORD_METHOD_FULL,
+
+  /* Record method "btrace".  */
+  RECORD_METHOD_BTRACE
+};
+
 /* A list of flags specifying what record target methods should print.  */
 enum record_print_flag
 {
@@ -48,6 +62,7 @@ enum record_print_flag
   /* Indent based on call stack depth (if applicable).  */
   RECORD_PRINT_INDENT_CALLS = (1 << 2)
 };
+DEF_ENUM_FLAGS_TYPE (enum record_print_flag, record_print_flags);
 
 /* Determined whether the target is stopped at a software or hardware
    breakpoint, based on PC and the breakpoint tables.  The breakpoint
@@ -89,4 +104,12 @@ extern struct target_ops *find_record_ta
    it does anything.  */
 extern void record_preopen (void);
 
+/* Start recording with the given METHOD and FORMAT.  NULL means default method
+   or format.  Throw on failure or invalid method / format.  */
+extern void record_start (const char *method, const char *format,
+			  int from_tty);
+
+/* Stop recording.  Throw on failure.  */
+extern void record_stop (int from_tty);
+
 #endif /* _RECORD_H_ */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regcache.c ./gdb/regcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regcache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cache and manage the values of registers for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -147,7 +147,8 @@ init_regcache_descr (struct gdbarch *gdb
 static struct regcache_descr *
 regcache_descr (struct gdbarch *gdbarch)
 {
-  return gdbarch_data (gdbarch, regcache_descr_handle);
+  return (struct regcache_descr *) gdbarch_data (gdbarch,
+						 regcache_descr_handle);
 }
 
 /* Utility functions returning useful register attributes stored in
@@ -178,6 +179,14 @@ register_size (struct gdbarch *gdbarch, 
   return size;
 }
 
+/* See common/common-regcache.h.  */
+
+int
+regcache_register_size (const struct regcache *regcache, int n)
+{
+  return register_size (get_regcache_arch (regcache), n);
+}
+
 /* The register cache for storing raw register values.  */
 
 struct regcache
@@ -256,7 +265,7 @@ regcache_xfree (struct regcache *regcach
 static void
 do_regcache_xfree (void *data)
 {
-  regcache_xfree (data);
+  regcache_xfree ((struct regcache *) data);
 }
 
 struct cleanup *
@@ -276,7 +285,7 @@ struct register_to_invalidate
 static void
 do_regcache_invalidate (void *data)
 {
-  struct register_to_invalidate *reg = data;
+  struct register_to_invalidate *reg = (struct register_to_invalidate *) data;
 
   regcache_invalidate (reg->regcache, reg->regnum);
 }
@@ -386,7 +395,7 @@ regcache_restore (struct regcache *dst,
 static enum register_status
 do_cooked_read (void *src, int regnum, gdb_byte *buf)
 {
-  struct regcache *regcache = src;
+  struct regcache *regcache = (struct regcache *) src;
 
   return regcache_cooked_read (regcache, regnum, buf);
 }
@@ -452,7 +461,7 @@ regcache_register_status (const struct r
   else
     gdb_assert (regnum < regcache->descr->nr_raw_registers);
 
-  return regcache->register_status[regnum];
+  return (enum register_status) regcache->register_status[regnum];
 }
 
 void
@@ -496,7 +505,7 @@ get_thread_arch_aspace_regcache (ptid_t 
   new_regcache = regcache_xmalloc_1 (gdbarch, aspace, 0);
   new_regcache->ptid = ptid;
 
-  list = xmalloc (sizeof (struct regcache_list));
+  list = XNEW (struct regcache_list);
   list->regcache = new_regcache;
   list->next = current_regcache;
   current_regcache = list;
@@ -633,15 +642,17 @@ registers_changed (void)
   alloca (0);
 }
 
-enum register_status
-regcache_raw_read (struct regcache *regcache, int regnum, gdb_byte *buf)
+void
+regcache_raw_update (struct regcache *regcache, int regnum)
 {
-  gdb_assert (regcache != NULL && buf != NULL);
+  gdb_assert (regcache != NULL);
   gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+
   /* Make certain that the register cache is up-to-date with respect
      to the current thread.  This switching shouldn't be necessary
      only there is still only one target side register cache.  Sigh!
      On the bright side, at least there is a regcache object.  */
+
   if (!regcache->readonly_p
       && regcache_register_status (regcache, regnum) == REG_UNKNOWN)
     {
@@ -657,6 +668,13 @@ regcache_raw_read (struct regcache *regc
       if (regcache->register_status[regnum] == REG_UNKNOWN)
 	regcache->register_status[regnum] = REG_UNAVAILABLE;
     }
+}
+
+enum register_status
+regcache_raw_read (struct regcache *regcache, int regnum, gdb_byte *buf)
+{
+  gdb_assert (buf != NULL);
+  regcache_raw_update (regcache, regnum);
 
   if (regcache->register_status[regnum] != REG_VALID)
     memset (buf, 0, regcache->descr->sizeof_register[regnum]);
@@ -664,7 +682,7 @@ regcache_raw_read (struct regcache *regc
     memcpy (buf, register_buffer (regcache, regnum),
 	    regcache->descr->sizeof_register[regnum]);
 
-  return regcache->register_status[regnum];
+  return (enum register_status) regcache->register_status[regnum];
 }
 
 enum register_status
@@ -675,7 +693,7 @@ regcache_raw_read_signed (struct regcach
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   status = regcache_raw_read (regcache, regnum, buf);
   if (status == REG_VALID)
     *val = extract_signed_integer
@@ -695,7 +713,7 @@ regcache_raw_read_unsigned (struct regca
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   status = regcache_raw_read (regcache, regnum, buf);
   if (status == REG_VALID)
     *val = extract_unsigned_integer
@@ -709,11 +727,11 @@ regcache_raw_read_unsigned (struct regca
 void
 regcache_raw_write_signed (struct regcache *regcache, int regnum, LONGEST val)
 {
-  void *buf;
+  gdb_byte *buf;
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   store_signed_integer (buf, regcache->descr->sizeof_register[regnum],
 			gdbarch_byte_order (regcache->descr->gdbarch), val);
   regcache_raw_write (regcache, regnum, buf);
@@ -723,16 +741,29 @@ void
 regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
 			     ULONGEST val)
 {
-  void *buf;
+  gdb_byte *buf;
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum],
 			  gdbarch_byte_order (regcache->descr->gdbarch), val);
   regcache_raw_write (regcache, regnum, buf);
 }
 
+LONGEST
+regcache_raw_get_signed (struct regcache *regcache, int regnum)
+{
+  LONGEST value;
+  enum register_status status;
+
+  status = regcache_raw_read_signed (regcache, regnum, &value);
+  if (status == REG_UNAVAILABLE)
+    throw_error (NOT_AVAILABLE_ERROR,
+		 _("Register %d is not available"), regnum);
+  return value;
+}
+
 enum register_status
 regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
 {
@@ -751,7 +782,7 @@ regcache_cooked_read (struct regcache *r
       else
 	memset (buf, 0, regcache->descr->sizeof_register[regnum]);
 
-      return regcache->register_status[regnum];
+      return (enum register_status) regcache->register_status[regnum];
     }
   else if (gdbarch_pseudo_register_read_value_p (regcache->descr->gdbarch))
     {
@@ -822,7 +853,7 @@ regcache_cooked_read_signed (struct regc
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_cooked_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   status = regcache_cooked_read (regcache, regnum, buf);
   if (status == REG_VALID)
     *val = extract_signed_integer
@@ -842,7 +873,7 @@ regcache_cooked_read_unsigned (struct re
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_cooked_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   status = regcache_cooked_read (regcache, regnum, buf);
   if (status == REG_VALID)
     *val = extract_unsigned_integer
@@ -857,11 +888,11 @@ void
 regcache_cooked_write_signed (struct regcache *regcache, int regnum,
 			      LONGEST val)
 {
-  void *buf;
+  gdb_byte *buf;
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >=0 && regnum < regcache->descr->nr_cooked_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   store_signed_integer (buf, regcache->descr->sizeof_register[regnum],
 			gdbarch_byte_order (regcache->descr->gdbarch), val);
   regcache_cooked_write (regcache, regnum, buf);
@@ -871,16 +902,27 @@ void
 regcache_cooked_write_unsigned (struct regcache *regcache, int regnum,
 				ULONGEST val)
 {
-  void *buf;
+  gdb_byte *buf;
 
   gdb_assert (regcache != NULL);
   gdb_assert (regnum >=0 && regnum < regcache->descr->nr_cooked_registers);
-  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  buf = (gdb_byte *) alloca (regcache->descr->sizeof_register[regnum]);
   store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum],
 			  gdbarch_byte_order (regcache->descr->gdbarch), val);
   regcache_cooked_write (regcache, regnum, buf);
 }
 
+/* See regcache.h.  */
+
+void
+regcache_raw_set_cached_value (struct regcache *regcache, int regnum,
+			       const gdb_byte *buf)
+{
+  memcpy (register_buffer (regcache, regnum), buf,
+	  regcache->descr->sizeof_register[regnum]);
+  regcache->register_status[regnum] = REG_VALID;
+}
+
 void
 regcache_raw_write (struct regcache *regcache, int regnum,
 		    const gdb_byte *buf)
@@ -908,9 +950,7 @@ regcache_raw_write (struct regcache *reg
   inferior_ptid = regcache->ptid;
 
   target_prepare_to_store (regcache);
-  memcpy (register_buffer (regcache, regnum), buf,
-	  regcache->descr->sizeof_register[regnum]);
-  regcache->register_status[regnum] = REG_VALID;
+  regcache_raw_set_cached_value (regcache, regnum, buf);
 
   /* Register a cleanup function for invalidating the register after it is
      written, in case of a failure.  */
@@ -957,7 +997,8 @@ regcache_xfer_part (struct regcache *reg
 				   const gdb_byte *buf))
 {
   struct regcache_descr *descr = regcache->descr;
-  gdb_byte reg[MAX_REGISTER_SIZE];
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  gdb_byte *reg = (gdb_byte *) alloca (register_size (gdbarch, regnum));
 
   gdb_assert (offset >= 0 && offset <= descr->sizeof_register[regnum]);
   gdb_assert (len >= 0 && offset + len <= descr->sizeof_register[regnum]);
@@ -1095,7 +1136,9 @@ regcache_transfer_regset (const struct r
   const struct regcache_map_entry *map;
   int offs = 0, count;
 
-  for (map = regset->regmap; (count = map->count) != 0; map++)
+  for (map = (const struct regcache_map_entry *) regset->regmap;
+       (count = map->count) != 0;
+       map++)
     {
       int regno = map->regno;
       int slot_size = map->size;
@@ -1464,14 +1507,11 @@ regcache_print (char *args, enum regcach
     regcache_dump (get_current_regcache (), gdb_stdout, what_to_dump);
   else
     {
-      struct cleanup *cleanups;
-      struct ui_file *file = gdb_fopen (args, "w");
+      stdio_file file;
 
-      if (file == NULL)
+      if (!file.open (args, "w"))
 	perror_with_name (_("maintenance print architecture"));
-      cleanups = make_cleanup_ui_file_delete (file);
-      regcache_dump (get_current_regcache (), file, what_to_dump);
-      do_cleanups (cleanups);
+      regcache_dump (get_current_regcache (), &file, what_to_dump);
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regcache.h ./gdb/regcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cache and manage the values of registers for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -47,27 +47,13 @@ extern struct gdbarch *get_regcache_arch
 
 extern struct address_space *get_regcache_aspace (const struct regcache *);
 
-enum register_status
-  {
-    /* The register value is not in the cache, and we don't know yet
-       whether it's available in the target (or traceframe).  */
-    REG_UNKNOWN = 0,
-
-    /* The register value is valid and cached.  */
-    REG_VALID = 1,
-
-    /* The register value is unavailable.  E.g., we're inspecting a
-       traceframe, and this register wasn't collected.  Note that this
-       is different a different "unavailable" from saying the register
-       does not exist in the target's architecture --- in that case,
-       the target should have given us a target description that does
-       not include the register in the first place.  */
-    REG_UNAVAILABLE = -1
-  };
-
 enum register_status regcache_register_status (const struct regcache *regcache,
 					       int regnum);
 
+/* Make certain that the register REGNUM in REGCACHE is up-to-date.  */
+
+void regcache_raw_update (struct regcache *regcache, int regnum);
+
 /* Transfer a raw register [0..NUM_REGS) between core-gdb and the
    regcache.  The read variants return the status of the register.  */
 
@@ -78,14 +64,26 @@ void regcache_raw_write (struct regcache
 extern enum register_status
   regcache_raw_read_signed (struct regcache *regcache,
 			    int regnum, LONGEST *val);
-extern enum register_status
-  regcache_raw_read_unsigned (struct regcache *regcache,
-			      int regnum, ULONGEST *val);
+
 extern void regcache_raw_write_signed (struct regcache *regcache,
 				       int regnum, LONGEST val);
 extern void regcache_raw_write_unsigned (struct regcache *regcache,
 					 int regnum, ULONGEST val);
 
+/* Return the register's value in signed or throw if it's not
+   available.  */
+
+extern LONGEST regcache_raw_get_signed (struct regcache *regcache,
+					int regnum);
+
+/* Set a raw register's value in the regcache's buffer.  Unlike
+   regcache_raw_write, this is not write-through.  The intention is
+   allowing to change the buffer contents of a read-only regcache
+   allocated with regcache_xmalloc.  */
+
+extern void regcache_raw_set_cached_value
+  (struct regcache *regcache, int regnum, const gdb_byte *buf);
+
 /* Partial transfer of raw registers.  These perform read, modify,
    write style operations.  The read variant returns the status of the
    register.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-iwmmxt.dat ./gdb/regformats/arm/arm-with-iwmmxt.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-iwmmxt.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/arm/arm-with-iwmmxt.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,53 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: arm/arm-with-iwmmxt.xml
+name:arm_with_iwmmxt
+xmltarget:arm-with-iwmmxt.xml
+expedite:r11,sp,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:sp
+32:lr
+32:pc
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+32:cpsr
+64:wR0
+64:wR1
+64:wR2
+64:wR3
+64:wR4
+64:wR5
+64:wR6
+64:wR7
+64:wR8
+64:wR9
+64:wR10
+64:wR11
+64:wR12
+64:wR13
+64:wR14
+64:wR15
+32:wCSSF
+32:wCASF
+32:wCGR0
+32:wCGR1
+32:wCGR2
+32:wCGR3
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-neon.dat ./gdb/regformats/arm/arm-with-neon.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-neon.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/arm/arm-with-neon.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,64 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: arm/arm-with-neon.xml
+name:arm_with_neon
+xmltarget:arm-with-neon.xml
+expedite:r11,sp,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:sp
+32:lr
+32:pc
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+32:cpsr
+64:d0
+64:d1
+64:d2
+64:d3
+64:d4
+64:d5
+64:d6
+64:d7
+64:d8
+64:d9
+64:d10
+64:d11
+64:d12
+64:d13
+64:d14
+64:d15
+64:d16
+64:d17
+64:d18
+64:d19
+64:d20
+64:d21
+64:d22
+64:d23
+64:d24
+64:d25
+64:d26
+64:d27
+64:d28
+64:d29
+64:d30
+64:d31
+32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-vfpv2.dat ./gdb/regformats/arm/arm-with-vfpv2.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-vfpv2.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/arm/arm-with-vfpv2.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: arm/arm-with-vfpv2.xml
+name:arm_with_vfpv2
+xmltarget:arm-with-vfpv2.xml
+expedite:r11,sp,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:sp
+32:lr
+32:pc
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+32:cpsr
+64:d0
+64:d1
+64:d2
+64:d3
+64:d4
+64:d5
+64:d6
+64:d7
+64:d8
+64:d9
+64:d10
+64:d11
+64:d12
+64:d13
+64:d14
+64:d15
+32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-vfpv3.dat ./gdb/regformats/arm/arm-with-vfpv3.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm/arm-with-vfpv3.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/arm/arm-with-vfpv3.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,64 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: arm/arm-with-vfpv3.xml
+name:arm_with_vfpv3
+xmltarget:arm-with-vfpv3.xml
+expedite:r11,sp,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:sp
+32:lr
+32:pc
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+0:
+32:cpsr
+64:d0
+64:d1
+64:d2
+64:d3
+64:d4
+64:d5
+64:d6
+64:d7
+64:d8
+64:d9
+64:d10
+64:d11
+64:d12
+64:d13
+64:d14
+64:d15
+64:d16
+64:d17
+64:d18
+64:d19
+64:d20
+64:d21
+64:d22
+64:d23
+64:d24
+64:d25
+64:d26
+64:d27
+64:d28
+64:d29
+64:d30
+64:d31
+32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-iwmmxt.dat ./gdb/regformats/arm-with-iwmmxt.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-iwmmxt.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/arm-with-iwmmxt.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: arm-with-iwmmxt.xml
-name:arm_with_iwmmxt
-xmltarget:arm-with-iwmmxt.xml
-expedite:r11,sp,pc
-32:r0
-32:r1
-32:r2
-32:r3
-32:r4
-32:r5
-32:r6
-32:r7
-32:r8
-32:r9
-32:r10
-32:r11
-32:r12
-32:sp
-32:lr
-32:pc
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-32:cpsr
-64:wR0
-64:wR1
-64:wR2
-64:wR3
-64:wR4
-64:wR5
-64:wR6
-64:wR7
-64:wR8
-64:wR9
-64:wR10
-64:wR11
-64:wR12
-64:wR13
-64:wR14
-64:wR15
-32:wCSSF
-32:wCASF
-32:wCGR0
-32:wCGR1
-32:wCGR2
-32:wCGR3
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-neon.dat ./gdb/regformats/arm-with-neon.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-neon.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/arm-with-neon.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: arm-with-neon.xml
-name:arm_with_neon
-xmltarget:arm-with-neon.xml
-expedite:r11,sp,pc
-32:r0
-32:r1
-32:r2
-32:r3
-32:r4
-32:r5
-32:r6
-32:r7
-32:r8
-32:r9
-32:r10
-32:r11
-32:r12
-32:sp
-32:lr
-32:pc
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-32:cpsr
-64:d0
-64:d1
-64:d2
-64:d3
-64:d4
-64:d5
-64:d6
-64:d7
-64:d8
-64:d9
-64:d10
-64:d11
-64:d12
-64:d13
-64:d14
-64:d15
-64:d16
-64:d17
-64:d18
-64:d19
-64:d20
-64:d21
-64:d22
-64:d23
-64:d24
-64:d25
-64:d26
-64:d27
-64:d28
-64:d29
-64:d30
-64:d31
-32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-vfpv2.dat ./gdb/regformats/arm-with-vfpv2.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-vfpv2.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/arm-with-vfpv2.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: arm-with-vfpv2.xml
-name:arm_with_vfpv2
-xmltarget:arm-with-vfpv2.xml
-expedite:r11,sp,pc
-32:r0
-32:r1
-32:r2
-32:r3
-32:r4
-32:r5
-32:r6
-32:r7
-32:r8
-32:r9
-32:r10
-32:r11
-32:r12
-32:sp
-32:lr
-32:pc
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-32:cpsr
-64:d0
-64:d1
-64:d2
-64:d3
-64:d4
-64:d5
-64:d6
-64:d7
-64:d8
-64:d9
-64:d10
-64:d11
-64:d12
-64:d13
-64:d14
-64:d15
-32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-vfpv3.dat ./gdb/regformats/arm-with-vfpv3.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/arm-with-vfpv3.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/arm-with-vfpv3.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: arm-with-vfpv3.xml
-name:arm_with_vfpv3
-xmltarget:arm-with-vfpv3.xml
-expedite:r11,sp,pc
-32:r0
-32:r1
-32:r2
-32:r3
-32:r4
-32:r5
-32:r6
-32:r7
-32:r8
-32:r9
-32:r10
-32:r11
-32:r12
-32:sp
-32:lr
-32:pc
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-0:
-32:cpsr
-64:d0
-64:d1
-64:d2
-64:d3
-64:d4
-64:d5
-64:d6
-64:d7
-64:d8
-64:d9
-64:d10
-64:d11
-64:d12
-64:d13
-64:d14
-64:d15
-64:d16
-64:d17
-64:d18
-64:d19
-64:d20
-64:d21
-64:d22
-64:d23
-64:d24
-64:d25
-64:d26
-64:d27
-64:d28
-64:d29
-64:d30
-64:d31
-32:fpscr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx512.dat ./gdb/regformats/i386/amd64-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx512.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx512.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,156 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/amd64-avx512.xml
-name:amd64_avx512
-xmltarget:amd64-avx512.xml
-expedite:rbp,rsp,rip
-64:rax
-64:rbx
-64:rcx
-64:rdx
-64:rsi
-64:rdi
-64:rbp
-64:rsp
-64:r8
-64:r9
-64:r10
-64:r11
-64:r12
-64:r13
-64:r14
-64:r15
-64:rip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-128:xmm8
-128:xmm9
-128:xmm10
-128:xmm11
-128:xmm12
-128:xmm13
-128:xmm14
-128:xmm15
-32:mxcsr
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-128:xmm16
-128:xmm17
-128:xmm18
-128:xmm19
-128:xmm20
-128:xmm21
-128:xmm22
-128:xmm23
-128:xmm24
-128:xmm25
-128:xmm26
-128:xmm27
-128:xmm28
-128:xmm29
-128:xmm30
-128:xmm31
-128:ymm16h
-128:ymm17h
-128:ymm18h
-128:ymm19h
-128:ymm20h
-128:ymm21h
-128:ymm22h
-128:ymm23h
-128:ymm24h
-128:ymm25h
-128:ymm26h
-128:ymm27h
-128:ymm28h
-128:ymm29h
-128:ymm30h
-128:ymm31h
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
-256:zmm8h
-256:zmm9h
-256:zmm10h
-256:zmm11h
-256:zmm12h
-256:zmm13h
-256:zmm14h
-256:zmm15h
-256:zmm16h
-256:zmm17h
-256:zmm18h
-256:zmm19h
-256:zmm20h
-256:zmm21h
-256:zmm22h
-256:zmm23h
-256:zmm24h
-256:zmm25h
-256:zmm26h
-256:zmm27h
-256:zmm28h
-256:zmm29h
-256:zmm30h
-256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx512-linux.dat ./gdb/regformats/i386/amd64-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx512-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,157 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/amd64-avx512-linux.xml
-name:amd64_avx512_linux
-xmltarget:amd64-avx512-linux.xml
-expedite:rbp,rsp,rip
-64:rax
-64:rbx
-64:rcx
-64:rdx
-64:rsi
-64:rdi
-64:rbp
-64:rsp
-64:r8
-64:r9
-64:r10
-64:r11
-64:r12
-64:r13
-64:r14
-64:r15
-64:rip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-128:xmm8
-128:xmm9
-128:xmm10
-128:xmm11
-128:xmm12
-128:xmm13
-128:xmm14
-128:xmm15
-32:mxcsr
-64:orig_rax
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-128:xmm16
-128:xmm17
-128:xmm18
-128:xmm19
-128:xmm20
-128:xmm21
-128:xmm22
-128:xmm23
-128:xmm24
-128:xmm25
-128:xmm26
-128:xmm27
-128:xmm28
-128:xmm29
-128:xmm30
-128:xmm31
-128:ymm16h
-128:ymm17h
-128:ymm18h
-128:ymm19h
-128:ymm20h
-128:ymm21h
-128:ymm22h
-128:ymm23h
-128:ymm24h
-128:ymm25h
-128:ymm26h
-128:ymm27h
-128:ymm28h
-128:ymm29h
-128:ymm30h
-128:ymm31h
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
-256:zmm8h
-256:zmm9h
-256:zmm10h
-256:zmm11h
-256:zmm12h
-256:zmm13h
-256:zmm14h
-256:zmm15h
-256:zmm16h
-256:zmm17h
-256:zmm18h
-256:zmm19h
-256:zmm20h
-256:zmm21h
-256:zmm22h
-256:zmm23h
-256:zmm24h
-256:zmm25h
-256:zmm26h
-256:zmm27h
-256:zmm28h
-256:zmm29h
-256:zmm30h
-256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-avx512.dat ./gdb/regformats/i386/amd64-avx-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-avx512.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-avx512.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,150 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-avx512.xml
+name:amd64_avx_avx512
+xmltarget:amd64-avx-avx512.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-avx512-linux.dat ./gdb/regformats/i386/amd64-avx-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-avx512-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,153 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-avx512-linux.xml
+name:amd64_avx_avx512_linux
+xmltarget:amd64-avx-avx512-linux.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+64:orig_rax
+64:fs_base
+64:gs_base
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-linux.dat ./gdb/regformats/i386/amd64-avx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -61,6 +61,8 @@ expedite:rbp,rsp,rip
 128:xmm15
 32:mxcsr
 64:orig_rax
+64:fs_base
+64:gs_base
 128:ymm0h
 128:ymm1h
 128:ymm2h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-avx512-pku.dat ./gdb/regformats/i386/amd64-avx-mpx-avx512-pku.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-avx512-pku.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-mpx-avx512-pku.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,160 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-mpx-avx512-pku.xml
+name:amd64_avx_mpx_avx512_pku
+xmltarget:amd64-avx-mpx-avx512-pku.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+64:orig_rax
+64:fs_base
+64:gs_base
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
+32:pkru
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat ./gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,159 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-mpx-avx512-pku-linux.xml
+name:amd64_avx_mpx_avx512_pku_linux
+xmltarget:amd64-avx-mpx-avx512-pku-linux.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+64:orig_rax
+64:fs_base
+64:gs_base
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx.dat ./gdb/regformats/i386/amd64-avx-mpx.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-mpx.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,84 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-mpx.xml
+name:amd64_avx_mpx
+xmltarget:amd64-avx-mpx.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-linux.dat ./gdb/regformats/i386/amd64-avx-mpx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-avx-mpx-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/amd64-avx-mpx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,87 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/amd64-avx-mpx-linux.xml
+name:amd64_avx_mpx_linux
+xmltarget:amd64-avx-mpx-linux.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+64:orig_rax
+64:fs_base
+64:gs_base
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-linux.dat ./gdb/regformats/i386/amd64-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -61,3 +61,5 @@ expedite:rbp,rsp,rip
 128:xmm15
 32:mxcsr
 64:orig_rax
+64:fs_base
+64:gs_base
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-mpx.dat ./gdb/regformats/i386/amd64-mpx.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-mpx.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-mpx.dat	2017-03-06 01:49:07.000000000 +0000
@@ -60,22 +60,6 @@ expedite:rbp,rsp,rip
 128:xmm14
 128:xmm15
 32:mxcsr
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
 128:bnd0raw
 128:bnd1raw
 128:bnd2raw
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-mpx-linux.dat ./gdb/regformats/i386/amd64-mpx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/amd64-mpx-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/amd64-mpx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -61,22 +61,8 @@ expedite:rbp,rsp,rip
 128:xmm15
 32:mxcsr
 64:orig_rax
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
+64:fs_base
+64:gs_base
 128:bnd0raw
 128:bnd1raw
 128:bnd2raw
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx512.dat ./gdb/regformats/i386/i386-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx512.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx512.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,76 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/i386-avx512.xml
-name:i386_avx512
-xmltarget:i386-avx512.xml
-expedite:ebp,esp,eip
-32:eax
-32:ecx
-32:edx
-32:ebx
-32:esp
-32:ebp
-32:esi
-32:edi
-32:eip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-32:mxcsr
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx512-linux.dat ./gdb/regformats/i386/i386-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx512-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,77 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/i386-avx512-linux.xml
-name:i386_avx512_linux
-xmltarget:i386-avx512-linux.xml
-expedite:ebp,esp,eip
-32:eax
-32:ecx
-32:edx
-32:ebx
-32:esp
-32:ebp
-32:esi
-32:edi
-32:eip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-32:mxcsr
-32:orig_eax
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-avx512.dat ./gdb/regformats/i386/i386-avx-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-avx512.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-avx512.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,70 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-avx512.xml
+name:i386_avx_avx512
+xmltarget:i386-avx-avx512.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-avx512-linux.dat ./gdb/regformats/i386/i386-avx-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-avx512-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-avx512-linux.xml
+name:i386_avx_avx512_linux
+xmltarget:i386-avx-avx512-linux.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+32:orig_eax
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-avx512-pku.dat ./gdb/regformats/i386/i386-avx-mpx-avx512-pku.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-avx512-pku.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-mpx-avx512-pku.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,77 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-mpx-avx512-pku.xml
+name:i386_avx_mpx_avx512_pku
+xmltarget:i386-avx-mpx-avx512-pku.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+32:pkru
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat ./gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,78 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-mpx-avx512-pku-linux.xml
+name:i386_avx_mpx_avx512_pku_linux
+xmltarget:i386-avx-mpx-avx512-pku-linux.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+32:orig_eax
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+32:pkru
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx.dat ./gdb/regformats/i386/i386-avx-mpx.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-mpx.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,60 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-mpx.xml
+name:i386_avx_mpx
+xmltarget:i386-avx-mpx.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-linux.dat ./gdb/regformats/i386/i386-avx-mpx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-avx-mpx-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/i386-avx-mpx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,61 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/i386-avx-mpx-linux.xml
+name:i386_avx_mpx_linux
+xmltarget:i386-avx-mpx-linux.xml
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+32:mxcsr
+32:orig_eax
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:bnd0raw
+128:bnd1raw
+128:bnd2raw
+128:bnd3raw
+64:bndcfgu
+64:bndstatus
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-mpx.dat ./gdb/regformats/i386/i386-mpx.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-mpx.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/i386-mpx.dat	2017-03-06 01:49:07.000000000 +0000
@@ -44,14 +44,6 @@ expedite:ebp,esp,eip
 128:xmm6
 128:xmm7
 32:mxcsr
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
 128:bnd0raw
 128:bnd1raw
 128:bnd2raw
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-mpx-linux.dat ./gdb/regformats/i386/i386-mpx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/i386-mpx-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/i386-mpx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -45,14 +45,6 @@ expedite:ebp,esp,eip
 128:xmm7
 32:mxcsr
 32:orig_eax
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
 128:bnd0raw
 128:bnd1raw
 128:bnd2raw
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx512.dat ./gdb/regformats/i386/x32-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx512.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/x32-avx512.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,156 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/x32-avx512.xml
-name:x32_avx512
-xmltarget:x32-avx512.xml
-expedite:rbp,rsp,rip
-64:rax
-64:rbx
-64:rcx
-64:rdx
-64:rsi
-64:rdi
-64:rbp
-64:rsp
-64:r8
-64:r9
-64:r10
-64:r11
-64:r12
-64:r13
-64:r14
-64:r15
-64:rip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-128:xmm8
-128:xmm9
-128:xmm10
-128:xmm11
-128:xmm12
-128:xmm13
-128:xmm14
-128:xmm15
-32:mxcsr
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-128:xmm16
-128:xmm17
-128:xmm18
-128:xmm19
-128:xmm20
-128:xmm21
-128:xmm22
-128:xmm23
-128:xmm24
-128:xmm25
-128:xmm26
-128:xmm27
-128:xmm28
-128:xmm29
-128:xmm30
-128:xmm31
-128:ymm16h
-128:ymm17h
-128:ymm18h
-128:ymm19h
-128:ymm20h
-128:ymm21h
-128:ymm22h
-128:ymm23h
-128:ymm24h
-128:ymm25h
-128:ymm26h
-128:ymm27h
-128:ymm28h
-128:ymm29h
-128:ymm30h
-128:ymm31h
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
-256:zmm8h
-256:zmm9h
-256:zmm10h
-256:zmm11h
-256:zmm12h
-256:zmm13h
-256:zmm14h
-256:zmm15h
-256:zmm16h
-256:zmm17h
-256:zmm18h
-256:zmm19h
-256:zmm20h
-256:zmm21h
-256:zmm22h
-256:zmm23h
-256:zmm24h
-256:zmm25h
-256:zmm26h
-256:zmm27h
-256:zmm28h
-256:zmm29h
-256:zmm30h
-256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx512-linux.dat ./gdb/regformats/i386/x32-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx512-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/x32-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
@@ -1,157 +0,0 @@
-# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
-# Generated from: i386/x32-avx512-linux.xml
-name:x32_avx512_linux
-xmltarget:x32-avx512-linux.xml
-expedite:rbp,rsp,rip
-64:rax
-64:rbx
-64:rcx
-64:rdx
-64:rsi
-64:rdi
-64:rbp
-64:rsp
-64:r8
-64:r9
-64:r10
-64:r11
-64:r12
-64:r13
-64:r14
-64:r15
-64:rip
-32:eflags
-32:cs
-32:ss
-32:ds
-32:es
-32:fs
-32:gs
-80:st0
-80:st1
-80:st2
-80:st3
-80:st4
-80:st5
-80:st6
-80:st7
-32:fctrl
-32:fstat
-32:ftag
-32:fiseg
-32:fioff
-32:foseg
-32:fooff
-32:fop
-128:xmm0
-128:xmm1
-128:xmm2
-128:xmm3
-128:xmm4
-128:xmm5
-128:xmm6
-128:xmm7
-128:xmm8
-128:xmm9
-128:xmm10
-128:xmm11
-128:xmm12
-128:xmm13
-128:xmm14
-128:xmm15
-32:mxcsr
-64:orig_rax
-128:ymm0h
-128:ymm1h
-128:ymm2h
-128:ymm3h
-128:ymm4h
-128:ymm5h
-128:ymm6h
-128:ymm7h
-128:ymm8h
-128:ymm9h
-128:ymm10h
-128:ymm11h
-128:ymm12h
-128:ymm13h
-128:ymm14h
-128:ymm15h
-128:bnd0raw
-128:bnd1raw
-128:bnd2raw
-128:bnd3raw
-64:bndcfgu
-64:bndstatus
-128:xmm16
-128:xmm17
-128:xmm18
-128:xmm19
-128:xmm20
-128:xmm21
-128:xmm22
-128:xmm23
-128:xmm24
-128:xmm25
-128:xmm26
-128:xmm27
-128:xmm28
-128:xmm29
-128:xmm30
-128:xmm31
-128:ymm16h
-128:ymm17h
-128:ymm18h
-128:ymm19h
-128:ymm20h
-128:ymm21h
-128:ymm22h
-128:ymm23h
-128:ymm24h
-128:ymm25h
-128:ymm26h
-128:ymm27h
-128:ymm28h
-128:ymm29h
-128:ymm30h
-128:ymm31h
-64:k0
-64:k1
-64:k2
-64:k3
-64:k4
-64:k5
-64:k6
-64:k7
-256:zmm0h
-256:zmm1h
-256:zmm2h
-256:zmm3h
-256:zmm4h
-256:zmm5h
-256:zmm6h
-256:zmm7h
-256:zmm8h
-256:zmm9h
-256:zmm10h
-256:zmm11h
-256:zmm12h
-256:zmm13h
-256:zmm14h
-256:zmm15h
-256:zmm16h
-256:zmm17h
-256:zmm18h
-256:zmm19h
-256:zmm20h
-256:zmm21h
-256:zmm22h
-256:zmm23h
-256:zmm24h
-256:zmm25h
-256:zmm26h
-256:zmm27h
-256:zmm28h
-256:zmm29h
-256:zmm30h
-256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-avx512.dat ./gdb/regformats/i386/x32-avx-avx512.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-avx512.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/x32-avx-avx512.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,150 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/x32-avx-avx512.xml
+name:x32_avx_avx512
+xmltarget:x32-avx-avx512.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-avx512-linux.dat ./gdb/regformats/i386/x32-avx-avx512-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-avx512-linux.dat	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/regformats/i386/x32-avx-avx512-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,153 @@
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: i386/x32-avx-avx512-linux.xml
+name:x32_avx_avx512_linux
+xmltarget:x32-avx-avx512-linux.xml
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+128:xmm0
+128:xmm1
+128:xmm2
+128:xmm3
+128:xmm4
+128:xmm5
+128:xmm6
+128:xmm7
+128:xmm8
+128:xmm9
+128:xmm10
+128:xmm11
+128:xmm12
+128:xmm13
+128:xmm14
+128:xmm15
+32:mxcsr
+64:orig_rax
+64:fs_base
+64:gs_base
+128:ymm0h
+128:ymm1h
+128:ymm2h
+128:ymm3h
+128:ymm4h
+128:ymm5h
+128:ymm6h
+128:ymm7h
+128:ymm8h
+128:ymm9h
+128:ymm10h
+128:ymm11h
+128:ymm12h
+128:ymm13h
+128:ymm14h
+128:ymm15h
+128:xmm16
+128:xmm17
+128:xmm18
+128:xmm19
+128:xmm20
+128:xmm21
+128:xmm22
+128:xmm23
+128:xmm24
+128:xmm25
+128:xmm26
+128:xmm27
+128:xmm28
+128:xmm29
+128:xmm30
+128:xmm31
+128:ymm16h
+128:ymm17h
+128:ymm18h
+128:ymm19h
+128:ymm20h
+128:ymm21h
+128:ymm22h
+128:ymm23h
+128:ymm24h
+128:ymm25h
+128:ymm26h
+128:ymm27h
+128:ymm28h
+128:ymm29h
+128:ymm30h
+128:ymm31h
+64:k0
+64:k1
+64:k2
+64:k3
+64:k4
+64:k5
+64:k6
+64:k7
+256:zmm0h
+256:zmm1h
+256:zmm2h
+256:zmm3h
+256:zmm4h
+256:zmm5h
+256:zmm6h
+256:zmm7h
+256:zmm8h
+256:zmm9h
+256:zmm10h
+256:zmm11h
+256:zmm12h
+256:zmm13h
+256:zmm14h
+256:zmm15h
+256:zmm16h
+256:zmm17h
+256:zmm18h
+256:zmm19h
+256:zmm20h
+256:zmm21h
+256:zmm22h
+256:zmm23h
+256:zmm24h
+256:zmm25h
+256:zmm26h
+256:zmm27h
+256:zmm28h
+256:zmm29h
+256:zmm30h
+256:zmm31h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-linux.dat ./gdb/regformats/i386/x32-avx-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-avx-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/x32-avx-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -61,6 +61,8 @@ expedite:rbp,rsp,rip
 128:xmm15
 32:mxcsr
 64:orig_rax
+64:fs_base
+64:gs_base
 128:ymm0h
 128:ymm1h
 128:ymm2h
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-linux.dat ./gdb/regformats/i386/x32-linux.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/i386/x32-linux.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/i386/x32-linux.dat	2017-03-06 01:49:07.000000000 +0000
@@ -61,3 +61,5 @@ expedite:rbp,rsp,rip
 128:xmm15
 32:mxcsr
 64:orig_rax
+64:fs_base
+64:gs_base
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/regdat.sh ./gdb/regformats/regdat.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/regdat.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/regdat.sh	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 #!/bin/sh -u
 
 # Register protocol definitions for GDB, the GNU debugger.
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/regdef.h ./gdb/regformats/regdef.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/regdef.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/regdef.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Register protocol definition structures for the GNU Debugger
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-32l.dat ./gdb/regformats/rs6000/powerpc-isa205-32l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-32l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-32l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-32l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-32l.xml
 name:powerpc_isa205_32l
 xmltarget:powerpc-isa205-32l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-64l.dat ./gdb/regformats/rs6000/powerpc-isa205-64l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-64l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-64l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-64l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-64l.xml
 name:powerpc_isa205_64l
 xmltarget:powerpc-isa205-64l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-altivec32l.dat ./gdb/regformats/rs6000/powerpc-isa205-altivec32l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-altivec32l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-altivec32l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-altivec32l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-altivec32l.xml
 name:powerpc_isa205_altivec32l
 xmltarget:powerpc-isa205-altivec32l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-altivec64l.dat ./gdb/regformats/rs6000/powerpc-isa205-altivec64l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-altivec64l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-altivec64l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-altivec64l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-altivec64l.xml
 name:powerpc_isa205_altivec64l
 xmltarget:powerpc-isa205-altivec64l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-vsx32l.dat ./gdb/regformats/rs6000/powerpc-isa205-vsx32l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-vsx32l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-vsx32l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-vsx32l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-vsx32l.xml
 name:powerpc_isa205_vsx32l
 xmltarget:powerpc-isa205-vsx32l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-vsx64l.dat ./gdb/regformats/rs6000/powerpc-isa205-vsx64l.dat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regformats/rs6000/powerpc-isa205-vsx64l.dat	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regformats/rs6000/powerpc-isa205-vsx64l.dat	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,5 @@
-# DO NOT EDIT: generated from rs6000/powerpc-isa205-vsx64l.xml
+# THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
+# Generated from: rs6000/powerpc-isa205-vsx64l.xml
 name:powerpc_isa205_vsx64l
 xmltarget:powerpc-isa205-vsx64l.xml
 expedite:r1,pc
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reggroups.c ./gdb/reggroups.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reggroups.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/reggroups.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Register groupings for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -102,13 +102,14 @@ add_group (struct reggroups *groups, str
 void
 reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
 {
-  struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+  struct reggroups *groups
+    = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
 
   if (groups == NULL)
     {
       /* ULGH, called during architecture initialization.  Patch
          things up.  */
-      groups = reggroups_init (gdbarch);
+      groups = (struct reggroups *) reggroups_init (gdbarch);
       deprecated_set_gdbarch_data (gdbarch, reggroups_data, groups);
     }
   add_group (groups, group,
@@ -129,7 +130,7 @@ reggroup_next (struct gdbarch *gdbarch, 
 
   /* Don't allow this function to be called during architecture
      creation.  If there are no groups, use the default groups list.  */
-  groups = gdbarch_data (gdbarch, reggroups_data);
+  groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
   gdb_assert (groups != NULL);
   if (groups->first == NULL)
     groups = &default_groups;
@@ -161,7 +162,7 @@ reggroup_prev (struct gdbarch *gdbarch, 
 
   /* Don't allow this function to be called during architecture
      creation.  If there are no groups, use the default groups list.  */
-  groups = gdbarch_data (gdbarch, reggroups_data);
+  groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
   gdb_assert (groups != NULL);
   if (groups->first == NULL)
     groups = &default_groups;
@@ -269,14 +270,11 @@ maintenance_print_reggroups (char *args,
     reggroups_dump (gdbarch, gdb_stdout);
   else
     {
-      struct cleanup *cleanups;
-      struct ui_file *file = gdb_fopen (args, "w");
+      stdio_file file;
 
-      if (file == NULL)
+      if (!file.open (args, "w"))
 	perror_with_name (_("maintenance print reggroups"));
-      cleanups = make_cleanup_ui_file_delete (file);
-      reggroups_dump (gdbarch, file);
-      do_cleanups (cleanups);
+      reggroups_dump (gdbarch, &file);
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reggroups.h ./gdb/reggroups.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reggroups.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/reggroups.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Register groupings for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/registry.c ./gdb/registry.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/registry.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/registry.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support functions for general registry objects.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/registry.h ./gdb/registry.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/registry.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/registry.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Macros for general registry objects.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regset.h ./gdb/regset.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/regset.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/regset.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Manage register sets.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote.c ./gdb/remote.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Remote target communications for serial-line targets in custom GDB protocol
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,8 +44,10 @@
 #include "gdb_bfd.h"
 #include "filestuff.h"
 #include "rsp-low.h"
+#include "disasm.h"
+#include "location.h"
 
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 #include "event-loop.h"
 #include "event-top.h"
@@ -68,11 +70,22 @@
 #include "ax-gdb.h"
 #include "agent.h"
 #include "btrace.h"
+#include "record-btrace.h"
+#include <algorithm>
 
 /* Temp hacks for tracepoint encoding migration.  */
 static char *target_buf;
 static long target_buf_size;
 
+/* Per-program-space data key.  */
+static const struct program_space_data *remote_pspace_data;
+
+/* The variable registered as the control variable used by the
+   remote exec-file commands.  While the remote exec-file setting is
+   per-program-space, the set/show machinery uses this as the 
+   location of the remote exec-file value.  */
+static char *remote_exec_file_var;
+
 /* The size to align memory write packets, when practical.  The protocol
    does not guarantee any alignment, and gdb will generate short
    writes and unaligned writes, but even as a best-effort attempt this
@@ -86,14 +99,10 @@ static long target_buf_size;
 enum { REMOTE_ALIGN_WRITES = 16 };
 
 /* Prototypes for local functions.  */
-static void async_cleanup_sigint_signal_handler (void *dummy);
 static int getpkt_sane (char **buf, long *sizeof_buf, int forever);
 static int getpkt_or_notif_sane (char **buf, long *sizeof_buf,
 				 int forever, int *is_notif);
 
-static void async_handle_remote_sigint (int);
-static void async_handle_remote_sigint_twice (int);
-
 static void remote_files_info (struct target_ops *ignore);
 
 static void remote_prepare_to_store (struct target_ops *self,
@@ -108,12 +117,12 @@ struct remote_state;
 
 static int remote_vkill (int pid, struct remote_state *rs);
 
+static void remote_kill_k (void);
+
 static void remote_mourn (struct target_ops *ops);
 
 static void extended_remote_restart (void);
 
-static void extended_remote_mourn (struct target_ops *);
-
 static void remote_send (char **buf, long *sizeof_buf_p);
 
 static int readchar (int timeout);
@@ -128,7 +137,7 @@ static int remote_is_async_p (struct tar
 
 static void remote_async (struct target_ops *ops, int enable);
 
-static void sync_remote_interrupt_twice (int signo);
+static void remote_thread_events (struct target_ops *ops, int enable);
 
 static void interrupt_query (void);
 
@@ -224,6 +233,14 @@ static int remote_can_run_breakpoint_com
 
 static void remote_btrace_reset (void);
 
+static void remote_btrace_maybe_reopen (void);
+
+static int stop_reply_queue_length (void);
+
+static void readahead_cache_invalidate (void);
+
+static void remote_unpush_and_throw (void);
+
 /* For "remote".  */
 
 static struct cmd_list_element *remote_cmdlist;
@@ -245,6 +262,12 @@ struct vCont_action_support
 
   /* vCont;r */
   int r;
+
+  /* vCont;s */
+  int s;
+
+  /* vCont;S */
+  int S;
 };
 
 /* Controls whether GDB is willing to use range stepping.  */
@@ -260,6 +283,34 @@ typedef unsigned char threadref[OPAQUETH
 
 #define MAXTHREADLISTRESULTS 32
 
+/* The max number of chars in debug output.  The rest of chars are
+   omitted.  */
+
+#define REMOTE_DEBUG_MAX_CHAR 512
+
+/* Data for the vFile:pread readahead cache.  */
+
+struct readahead_cache
+{
+  /* The file descriptor for the file that is being cached.  -1 if the
+     cache is invalid.  */
+  int fd;
+
+  /* The offset into the file that the cache buffer corresponds
+     to.  */
+  ULONGEST offset;
+
+  /* The buffer holding the cache contents.  */
+  gdb_byte *buf;
+  /* The buffer's size.  We try to read as much as fits into a packet
+     at a time.  */
+  size_t bufsize;
+
+  /* Cache hit and miss counters.  */
+  ULONGEST hit_count;
+  ULONGEST miss_count;
+};
+
 /* Description of the remote protocol state for the currently
    connected target.  This is per-target state, and independent of the
    selected architecture.  */
@@ -317,6 +368,14 @@ struct remote_state
      responded to that.  */
   int ctrlc_pending_p;
 
+  /* True if we saw a Ctrl-C while reading or writing from/to the
+     remote descriptor.  At that point it is not safe to send a remote
+     interrupt packet, so we instead remember we saw the Ctrl-C and
+     process it once we're done with sending/receiving the current
+     packet, which should be shortly.  If however that takes too long,
+     and the user presses Ctrl-C again, we offer to disconnect.  */
+  int got_ctrlc_during_io;
+
   /* Descriptor for I/O to remote machine.  Initialize it to NULL so that
      remote_open knows that we don't have a file open when the program
      starts.  */
@@ -343,6 +402,9 @@ struct remote_state
 
   int last_sent_step;
 
+  /* The execution direction of the last resume we got.  */
+  enum exec_direction_kind last_resume_exec_dir;
+
   char *finished_object;
   char *finished_annex;
   ULONGEST finished_offset;
@@ -357,13 +419,6 @@ struct remote_state
   int use_threadinfo_query;
   int use_threadextra_query;
 
-  /* This is set to the data address of the access causing the target
-     to stop for a watchpoint.  */
-  CORE_ADDR remote_watch_data_address;
-
-  /* Whether the target stopped for a breakpoint/watchpoint.  */
-  enum target_stop_reason stop_reason;
-
   threadref echo_nextthread;
   threadref nextthread;
   threadref resultthreadlist[MAXTHREADLISTRESULTS];
@@ -379,19 +434,54 @@ struct remote_state
      Initialized to -1 to indicate that no "vFile:setfs:" packet
      has yet been sent.  */
   int fs_pid;
+
+  /* A readahead cache for vFile:pread.  Often, reading a binary
+     involves a sequence of small reads.  E.g., when parsing an ELF
+     file.  A readahead cache helps mostly the case of remote
+     debugging on a connection with higher latency, due to the
+     request/reply nature of the RSP.  We only cache data for a single
+     file descriptor at a time.  */
+  struct readahead_cache readahead_cache;
 };
 
 /* Private data that we'll store in (struct thread_info)->private.  */
 struct private_thread_info
 {
   char *extra;
+  char *name;
   int core;
+
+  /* Whether the target stopped for a breakpoint/watchpoint.  */
+  enum target_stop_reason stop_reason;
+
+  /* This is set to the data address of the access causing the target
+     to stop for a watchpoint.  */
+  CORE_ADDR watch_data_address;
+
+  /* Fields used by the vCont action coalescing implemented in
+     remote_resume / remote_commit_resume.  remote_resume stores each
+     thread's last resume request in these fields, so that a later
+     remote_commit_resume knows which is the proper action for this
+     thread to include in the vCont packet.  */
+
+  /* True if the last target_resume call for this thread was a step
+     request, false if a continue request.  */
+  int last_resume_step;
+
+  /* The signal specified in the last target_resume call for this
+     thread.  */
+  enum gdb_signal last_resume_sig;
+
+  /* Whether this thread was already vCont-resumed on the remote
+     side.  */
+  int vcont_resumed;
 };
 
 static void
 free_private_thread_info (struct private_thread_info *info)
 {
   xfree (info->extra);
+  xfree (info->name);
   xfree (info);
 }
 
@@ -418,9 +508,10 @@ new_remote_state (void)
   /* The default buffer size is unimportant; it will be expanded
      whenever a larger buffer is needed. */
   result->buf_size = 400;
-  result->buf = xmalloc (result->buf_size);
+  result->buf = (char *) xmalloc (result->buf_size);
   result->remote_traceframe_number = -1;
   result->last_sent_signal = GDB_SIGNAL_0;
+  result->last_resume_exec_dir = EXEC_FORWARD;
   result->fs_pid = -1;
 
   return result;
@@ -563,7 +654,9 @@ static struct gdbarch_data *remote_gdbar
 static struct remote_arch_state *
 get_remote_arch_state (void)
 {
-  return gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle);
+  gdb_assert (target_gdbarch () != NULL);
+  return ((struct remote_arch_state *)
+	  gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle));
 }
 
 /* Fetch the global remote target state.  */
@@ -581,11 +674,71 @@ get_remote_state (void)
   return get_remote_state_raw ();
 }
 
+/* Cleanup routine for the remote module's pspace data.  */
+
+static void
+remote_pspace_data_cleanup (struct program_space *pspace, void *arg)
+{
+  char *remote_exec_file = (char *) arg;
+
+  xfree (remote_exec_file);
+}
+
+/* Fetch the remote exec-file from the current program space.  */
+
+static const char *
+get_remote_exec_file (void)
+{
+  char *remote_exec_file;
+
+  remote_exec_file
+    = (char *) program_space_data (current_program_space,
+				   remote_pspace_data);
+  if (remote_exec_file == NULL)
+    return "";
+
+  return remote_exec_file;
+}
+
+/* Set the remote exec file for PSPACE.  */
+
+static void
+set_pspace_remote_exec_file (struct program_space *pspace,
+			char *remote_exec_file)
+{
+  char *old_file = (char *) program_space_data (pspace, remote_pspace_data);
+
+  xfree (old_file);
+  set_program_space_data (pspace, remote_pspace_data,
+			  xstrdup (remote_exec_file));
+}
+
+/* The "set/show remote exec-file" set command hook.  */
+
+static void
+set_remote_exec_file (char *ignored, int from_tty,
+		      struct cmd_list_element *c)
+{
+  gdb_assert (remote_exec_file_var != NULL);
+  set_pspace_remote_exec_file (current_program_space, remote_exec_file_var);
+}
+
+/* The "set/show remote exec-file" show command hook.  */
+
+static void
+show_remote_exec_file (struct ui_file *file, int from_tty,
+		       struct cmd_list_element *cmd, const char *value)
+{
+  fprintf_filtered (file, "%s\n", remote_exec_file_var);
+}
+
 static int
 compare_pnums (const void *lhs_, const void *rhs_)
 {
-  const struct packet_reg * const *lhs = lhs_;
-  const struct packet_reg * const *rhs = rhs_;
+  const struct packet_reg * const *lhs
+    = (const struct packet_reg * const *) lhs_;
+  const struct packet_reg * const *rhs
+    = (const struct packet_reg * const *) rhs_;
 
   if ((*lhs)->pnum < (*rhs)->pnum)
     return -1;
@@ -618,8 +771,7 @@ map_regcache_remote_table (struct gdbarc
      with a remote protocol number, in order of ascending protocol
      number.  */
 
-  remote_regs = alloca (gdbarch_num_regs (gdbarch)
-			* sizeof (struct packet_reg *));
+  remote_regs = XALLOCAVEC (struct packet_reg *, gdbarch_num_regs (gdbarch));
   for (num_remote_regs = 0, regnum = 0;
        regnum < gdbarch_num_regs (gdbarch);
        regnum++)
@@ -649,16 +801,15 @@ int
 remote_register_number_and_offset (struct gdbarch *gdbarch, int regnum,
 				   int *pnum, int *poffset)
 {
-  int sizeof_g_packet;
   struct packet_reg *regs;
   struct cleanup *old_chain;
 
   gdb_assert (regnum < gdbarch_num_regs (gdbarch));
 
-  regs = xcalloc (gdbarch_num_regs (gdbarch), sizeof (struct packet_reg));
+  regs = XCNEWVEC (struct packet_reg, gdbarch_num_regs (gdbarch));
   old_chain = make_cleanup (xfree, regs);
 
-  sizeof_g_packet = map_regcache_remote_table (gdbarch, regs);
+  map_regcache_remote_table (gdbarch, regs);
 
   *pnum = regs[regnum].pnum;
   *poffset = regs[regnum].offset;
@@ -712,7 +863,7 @@ init_remote_state (struct gdbarch *gdbar
   if (rs->buf_size < rsa->remote_packet_size)
     {
       rs->buf_size = 2 * rsa->remote_packet_size;
-      rs->buf = xrealloc (rs->buf, rs->buf_size);
+      rs->buf = (char *) xrealloc (rs->buf, rs->buf_size);
     }
 
   return rsa;
@@ -863,10 +1014,6 @@ static unsigned int remote_address_size;
 
 static int remote_async_terminal_ours_p;
 
-/* The executable file to use for "run" on the remote side.  */
-
-static char *remote_exec_file = "";
-
 
 /* User configurable variables for the number of characters in a
    memory read/write packet.  MIN (rsa->remote_packet_size,
@@ -883,6 +1030,16 @@ struct memory_packet_config
   int fixed_p;
 };
 
+/* The default max memory-write-packet-size.  The 16k is historical.
+   (It came from older GDB's using alloca for buffers and the
+   knowledge (folklore?) that some hosts don't cope very well with
+   large alloca calls.)  */
+#define DEFAULT_MAX_MEMORY_PACKET_SIZE 16384
+
+/* The minimum remote packet size for memory transfers.  Ensures we
+   can write at least one byte.  */
+#define MIN_MEMORY_PACKET_SIZE 20
+
 /* Compute the current size of a read/write packet.  Since this makes
    use of ``actual_register_packet_size'' the computation is dynamic.  */
 
@@ -892,23 +1049,11 @@ get_memory_packet_size (struct memory_pa
   struct remote_state *rs = get_remote_state ();
   struct remote_arch_state *rsa = get_remote_arch_state ();
 
-  /* NOTE: The somewhat arbitrary 16k comes from the knowledge (folk
-     law?) that some hosts don't cope very well with large alloca()
-     calls.  Eventually the alloca() code will be replaced by calls to
-     xmalloc() and make_cleanups() allowing this restriction to either
-     be lifted or removed.  */
-#ifndef MAX_REMOTE_PACKET_SIZE
-#define MAX_REMOTE_PACKET_SIZE 16384
-#endif
-  /* NOTE: 20 ensures we can write at least one byte.  */
-#ifndef MIN_REMOTE_PACKET_SIZE
-#define MIN_REMOTE_PACKET_SIZE 20
-#endif
   long what_they_get;
   if (config->fixed_p)
     {
       if (config->size <= 0)
-	what_they_get = MAX_REMOTE_PACKET_SIZE;
+	what_they_get = DEFAULT_MAX_MEMORY_PACKET_SIZE;
       else
 	what_they_get = config->size;
     }
@@ -927,17 +1072,15 @@ get_memory_packet_size (struct memory_pa
 	  && what_they_get > rsa->actual_register_packet_size)
 	what_they_get = rsa->actual_register_packet_size;
     }
-  if (what_they_get > MAX_REMOTE_PACKET_SIZE)
-    what_they_get = MAX_REMOTE_PACKET_SIZE;
-  if (what_they_get < MIN_REMOTE_PACKET_SIZE)
-    what_they_get = MIN_REMOTE_PACKET_SIZE;
+  if (what_they_get < MIN_MEMORY_PACKET_SIZE)
+    what_they_get = MIN_MEMORY_PACKET_SIZE;
 
   /* Make sure there is room in the global buffer for this packet
      (including its trailing NUL byte).  */
   if (rs->buf_size < what_they_get + 1)
     {
       rs->buf_size = 2 * what_they_get;
-      rs->buf = xrealloc (rs->buf, 2 * what_they_get);
+      rs->buf = (char *) xrealloc (rs->buf, 2 * what_they_get);
     }
 
   return what_they_get;
@@ -967,15 +1110,16 @@ set_memory_packet_size (char *args, stru
       size = strtoul (args, &end, 0);
       if (args == end)
 	error (_("Invalid %s (bad syntax)."), config->name);
-#if 0
-      /* Instead of explicitly capping the size of a packet to
-         MAX_REMOTE_PACKET_SIZE or dissallowing it, the user is
-         instead allowed to set the size to something arbitrarily
-         large.  */
-      if (size > MAX_REMOTE_PACKET_SIZE)
-	error (_("Invalid %s (too large)."), config->name);
-#endif
+
+      /* Instead of explicitly capping the size of a packet to or
+	 disallowing it, the user is allowed to set the size to
+	 something arbitrarily large.  */
     }
+
+  /* So that the query shows the correct value.  */
+  if (size <= 0)
+    size = DEFAULT_MAX_MEMORY_PACKET_SIZE;
+
   /* Extra checks?  */
   if (fixed_p && !config->fixed_p)
     {
@@ -1282,6 +1426,7 @@ enum {
   PACKET_qSupported,
   PACKET_qTStatus,
   PACKET_QPassSignals,
+  PACKET_QCatchSyscalls,
   PACKET_QProgramSignals,
   PACKET_qCRC,
   PACKET_qSearch_memory,
@@ -1328,6 +1473,9 @@ enum {
   /* Support for the QNonStop packet.  */
   PACKET_QNonStop,
 
+  /* Support for the QThreadEvents packet.  */
+  PACKET_QThreadEvents,
+
   /* Support for multi-process extensions.  */
   PACKET_multiprocess_feature,
 
@@ -1366,6 +1514,18 @@ enum {
   /* Support for the Qbtrace-conf:pt:size packet.  */
   PACKET_Qbtrace_conf_pt_size,
 
+  /* Support for exec events.  */
+  PACKET_exec_event_feature,
+
+  /* Support for query supported vCont actions.  */
+  PACKET_vContSupported,
+
+  /* Support remote CTRL-C.  */
+  PACKET_vCtrlC,
+
+  /* Support TARGET_WAITKIND_NO_RESUMED.  */
+  PACKET_no_resumed,
+
   PACKET_MAX
 };
 
@@ -1496,6 +1656,14 @@ remote_vfork_event_p (struct remote_stat
   return packet_support (PACKET_vfork_event_feature) == PACKET_ENABLE;
 }
 
+/* Returns true if exec events are supported.  */
+
+static int
+remote_exec_event_p (struct remote_state *rs)
+{
+  return packet_support (PACKET_exec_event_feature) == PACKET_ENABLE;
+}
+
 /* Insert fork catchpoint target routine.  If fork events are enabled
    then return success, nothing more to do.  */
 
@@ -1536,9 +1704,25 @@ remote_remove_vfork_catchpoint (struct t
   return 0;
 }
 
-/* Tokens for use by the asynchronous signal handlers for SIGINT.  */
-static struct async_signal_handler *async_sigint_remote_twice_token;
-static struct async_signal_handler *async_sigint_remote_token;
+/* Insert exec catchpoint target routine.  If exec events are
+   enabled, just return success.  */
+
+static int
+remote_insert_exec_catchpoint (struct target_ops *ops, int pid)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  return !remote_exec_event_p (rs);
+}
+
+/* Remove exec catchpoint target routine.  Nothing to do, just
+   return success.  */
+
+static int
+remote_remove_exec_catchpoint (struct target_ops *ops, int pid)
+{
+  return 0;
+}
 
 
 /* Asynchronous signal handle registered as event loop source for
@@ -1639,18 +1823,22 @@ remote_add_inferior (int fake_pid_p, int
   /* 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)
-    exec_file_locate_attach (pid, 1);
+    exec_file_locate_attach (pid, 0, 1);
 
   return inf;
 }
 
+static struct private_thread_info *
+  get_private_info_thread (struct thread_info *info);
+
 /* Add thread PTID to GDB's thread list.  Tag it as executing/running
    according to RUNNING.  */
 
 static void
-remote_add_thread (ptid_t ptid, int running)
+remote_add_thread (ptid_t ptid, int running, int executing)
 {
   struct remote_state *rs = get_remote_state ();
+  struct thread_info *thread;
 
   /* GDB historically didn't pull threads in the initial connection
      setup.  If the remote target doesn't even have a concept of
@@ -1659,11 +1847,12 @@ remote_add_thread (ptid_t ptid, int runn
      might be confusing to the user.  Be silent then, preserving the
      age old behavior.  */
   if (rs->starting_up)
-    add_thread_silent (ptid);
+    thread = add_thread_silent (ptid);
   else
-    add_thread (ptid);
+    thread = add_thread (ptid);
 
-  set_executing (ptid, running);
+  get_private_info_thread (thread)->vcont_resumed = executing;
+  set_executing (ptid, executing);
   set_running (ptid, running);
 }
 
@@ -1671,11 +1860,17 @@ remote_add_thread (ptid_t ptid, int runn
    It may be the first time we hear about such thread, so take the
    opportunity to add it to GDB's thread list.  In case this is the
    first time we're noticing its corresponding inferior, add it to
-   GDB's inferior list as well.  */
+   GDB's inferior list as well.  EXECUTING indicates whether the
+   thread is (internally) executing or stopped.  */
 
 static void
-remote_notice_new_inferior (ptid_t currthread, int running)
+remote_notice_new_inferior (ptid_t currthread, int executing)
 {
+  /* In non-stop mode, we assume new found threads are (externally)
+     running until proven otherwise with a stop reply.  In all-stop,
+     we can only get here if all threads are stopped.  */
+  int running = target_is_non_stop_p () ? 1 : 0;
+
   /* If this is a new thread, add it to GDB's thread list.
      If we leave it up to WFI to do this, bad things will happen.  */
 
@@ -1683,7 +1878,7 @@ remote_notice_new_inferior (ptid_t currt
     {
       /* We're seeing an event on a thread id we knew had exited.
 	 This has to be a new thread reusing the old id.  Add it.  */
-      remote_add_thread (currthread, running);
+      remote_add_thread (currthread, running, executing);
       return;
     }
 
@@ -1704,7 +1899,7 @@ remote_notice_new_inferior (ptid_t currt
 	    thread_change_ptid (inferior_ptid, currthread);
 	  else
 	    {
-	      remote_add_thread (currthread, running);
+	      remote_add_thread (currthread, running, executing);
 	      inferior_ptid = currthread;
 	    }
 	  return;
@@ -1735,7 +1930,7 @@ remote_notice_new_inferior (ptid_t currt
 	}
 
       /* This is really a new thread.  Add it.  */
-      remote_add_thread (currthread, running);
+      remote_add_thread (currthread, running, executing);
 
       /* If we found a new inferior, let the common code do whatever
 	 it needs to with it (e.g., read shared libraries, insert
@@ -1745,30 +1940,46 @@ remote_notice_new_inferior (ptid_t currt
 	{
 	  struct remote_state *rs = get_remote_state ();
 
-	  if (non_stop || !rs->starting_up)
-	    notice_new_inferior (currthread, running, 0);
+	  if (!rs->starting_up)
+	    notice_new_inferior (currthread, executing, 0);
 	}
     }
 }
 
-/* Return the private thread data, creating it if necessary.  */
+/* Return THREAD's private thread data, creating it if necessary.  */
 
 static struct private_thread_info *
-demand_private_info (ptid_t ptid)
+get_private_info_thread (struct thread_info *thread)
 {
-  struct thread_info *info = find_thread_ptid (ptid);
-
-  gdb_assert (info);
+  gdb_assert (thread != NULL);
 
-  if (!info->priv)
+  if (thread->priv == NULL)
     {
-      info->priv = xmalloc (sizeof (*(info->priv)));
-      info->private_dtor = free_private_thread_info;
-      info->priv->core = -1;
-      info->priv->extra = 0;
+      struct private_thread_info *priv = XNEW (struct private_thread_info);
+
+      thread->private_dtor = free_private_thread_info;
+      thread->priv = priv;
+
+      priv->core = -1;
+      priv->extra = NULL;
+      priv->name = NULL;
+      priv->name = NULL;
+      priv->last_resume_step = 0;
+      priv->last_resume_sig = GDB_SIGNAL_0;
+      priv->vcont_resumed = 0;
     }
 
-  return info->priv;
+  return thread->priv;
+}
+
+/* Return PTID's private thread data, creating it if necessary.  */
+
+static struct private_thread_info *
+get_private_info_ptid (ptid_t ptid)
+{
+  struct thread_info *info = find_thread_ptid (ptid);
+
+  return get_private_info_thread (info);
 }
 
 /* Call this function as a result of
@@ -1801,7 +2012,7 @@ remote_pass_signals (struct target_ops *
 	  if (pass_signals[i])
 	    count++;
 	}
-      pass_packet = xmalloc (count * 3 + strlen ("QPassSignals:") + 1);
+      pass_packet = (char *) xmalloc (count * 3 + strlen ("QPassSignals:") + 1);
       strcpy (pass_packet, "QPassSignals:");
       p = pass_packet + strlen (pass_packet);
       for (i = 0; i < numsigs; i++)
@@ -1833,6 +2044,93 @@ remote_pass_signals (struct target_ops *
     }
 }
 
+/* If 'QCatchSyscalls' is supported, tell the remote stub
+   to report syscalls to GDB.  */
+
+static int
+remote_set_syscall_catchpoint (struct target_ops *self,
+			       int pid, int needed, int any_count,
+			       int table_size, int *table)
+{
+  char *catch_packet;
+  enum packet_result result;
+  int n_sysno = 0;
+
+  if (packet_support (PACKET_QCatchSyscalls) == PACKET_DISABLE)
+    {
+      /* Not supported.  */
+      return 1;
+    }
+
+  if (needed && !any_count)
+    {
+      int i;
+
+      /* Count how many syscalls are to be caught (table[sysno] != 0).  */
+      for (i = 0; i < table_size; i++)
+	{
+	  if (table[i] != 0)
+	    n_sysno++;
+	}
+    }
+
+  if (remote_debug)
+    {
+      fprintf_unfiltered (gdb_stdlog,
+			  "remote_set_syscall_catchpoint "
+			  "pid %d needed %d any_count %d n_sysno %d\n",
+			  pid, needed, any_count, n_sysno);
+    }
+
+  if (needed)
+    {
+      /* Prepare a packet with the sysno list, assuming max 8+1
+	 characters for a sysno.  If the resulting packet size is too
+	 big, fallback on the non-selective packet.  */
+      const int maxpktsz = strlen ("QCatchSyscalls:1") + n_sysno * 9 + 1;
+
+      catch_packet = (char *) xmalloc (maxpktsz);
+      strcpy (catch_packet, "QCatchSyscalls:1");
+      if (!any_count)
+	{
+	  int i;
+	  char *p;
+
+	  p = catch_packet;
+	  p += strlen (p);
+
+	  /* Add in catch_packet each syscall to be caught (table[i] != 0).  */
+	  for (i = 0; i < table_size; i++)
+	    {
+	      if (table[i] != 0)
+		p += xsnprintf (p, catch_packet + maxpktsz - p, ";%x", i);
+	    }
+	}
+      if (strlen (catch_packet) > get_remote_packet_size ())
+	{
+	  /* catch_packet too big.  Fallback to less efficient
+	     non selective mode, with GDB doing the filtering.  */
+	  catch_packet[sizeof ("QCatchSyscalls:1") - 1] = 0;
+	}
+    }
+  else
+    catch_packet = xstrdup ("QCatchSyscalls:0");
+
+  {
+    struct cleanup *old_chain = make_cleanup (xfree, catch_packet);
+    struct remote_state *rs = get_remote_state ();
+
+    putpkt (catch_packet);
+    getpkt (&rs->buf, &rs->buf_size, 0);
+    result = packet_ok (rs->buf, &remote_protocol_packets[PACKET_QCatchSyscalls]);
+    do_cleanups (old_chain);
+    if (result == PACKET_OK)
+      return 0;
+    else
+      return -1;
+  }
+}
+
 /* If 'QProgramSignals' is supported, tell the remote stub what
    signals it should pass through to the inferior when detaching.  */
 
@@ -1852,7 +2150,7 @@ remote_program_signals (struct target_op
 	  if (signals[i])
 	    count++;
 	}
-      packet = xmalloc (count * 3 + strlen ("QProgramSignals:") + 1);
+      packet = (char *) xmalloc (count * 3 + strlen ("QProgramSignals:") + 1);
       strcpy (packet, "QProgramSignals:");
       p = packet + strlen (packet);
       for (i = 0; i < numsigs; i++)
@@ -1944,7 +2242,7 @@ set_general_process (void)
   struct remote_state *rs = get_remote_state ();
 
   /* If the remote can't handle multiple processes, don't bother.  */
-  if (!rs->extended || !remote_multi_process_p (rs))
+  if (!remote_multi_process_p (rs))
     return;
 
   /* We only need to change the remote current thread if it's pointing
@@ -1960,9 +2258,6 @@ set_general_process (void)
 static int
 remote_thread_always_alive (struct target_ops *ops, ptid_t ptid)
 {
-  struct remote_state *rs = get_remote_state ();
-  char *p, *endp;
-
   if (ptid_equal (ptid, magic_null_ptid))
     /* The main thread is always alive.  */
     return 1;
@@ -2001,6 +2296,18 @@ remote_thread_alive (struct target_ops *
   return (rs->buf[0] == 'O' && rs->buf[1] == 'K');
 }
 
+/* Return a pointer to a thread name if we know it and NULL otherwise.
+   The thread_info object owns the memory for the name.  */
+
+static const char *
+remote_thread_name (struct target_ops *ops, struct thread_info *info)
+{
+  if (info->priv != NULL)
+    return info->priv->name;
+
+  return NULL;
+}
+
 /* About these extended threadlist and threadinfo packets.  They are
    variable length packets but, the fields within them are often fixed
    length.  They are redundent enough to send over UDP as is the
@@ -2158,6 +2465,14 @@ read_ptid (char *buf, char **obuf)
   /* No multi-process.  Just a tid.  */
   pp = unpack_varlen_hex (p, &tid);
 
+  /* Return null_ptid when no thread id is found.  */
+  if (p == pp)
+    {
+      if (obuf)
+	*obuf = pp;
+      return null_ptid;
+    }
+
   /* Since the stub is not sending a process id, then default to
      what's in inferior_ptid, unless it's null at this point.  If so,
      then since there's no way to know the pid of the reported
@@ -2673,6 +2988,9 @@ typedef struct thread_item
   /* The thread's extra info.  May be NULL.  */
   char *extra;
 
+  /* The thread's name.  May be NULL.  */
+  char *name;
+
   /* The core the thread was running on.  -1 if not known.  */
   int core;
 } thread_item_t;
@@ -2693,12 +3011,16 @@ struct threads_listing_context
 static void
 clear_threads_listing_context (void *p)
 {
-  struct threads_listing_context *context = p;
+  struct threads_listing_context *context
+    = (struct threads_listing_context *) p;
   int i;
   struct thread_item *item;
 
   for (i = 0; VEC_iterate (thread_item_t, context->items, i, item); ++i)
-    xfree (item->extra);
+    {
+      xfree (item->extra);
+      xfree (item->name);
+    }
 
   VEC_free (thread_item_t, context->items);
 }
@@ -2727,12 +3049,14 @@ threads_listing_context_remove (struct t
 static int
 remote_newthread_step (threadref *ref, void *data)
 {
-  struct threads_listing_context *context = data;
+  struct threads_listing_context *context
+    = (struct threads_listing_context *) data;
   struct thread_item item;
   int pid = ptid_get_pid (inferior_ptid);
 
   item.ptid = ptid_build (pid, threadref_to_int (ref), 0);
   item.core = -1;
+  item.name = NULL;
   item.extra = NULL;
 
   VEC_safe_push (thread_item_t, context->items, &item);
@@ -2750,7 +3074,17 @@ remote_current_thread (ptid_t oldpid)
   putpkt ("qC");
   getpkt (&rs->buf, &rs->buf_size, 0);
   if (rs->buf[0] == 'Q' && rs->buf[1] == 'C')
-    return read_ptid (&rs->buf[2], NULL);
+    {
+      char *obuf;
+      ptid_t result;
+
+      result = read_ptid (&rs->buf[2], &obuf);
+      if (*obuf != '\0' && remote_debug)
+        fprintf_unfiltered (gdb_stdlog,
+	                    "warning: garbage in qC reply\n");
+
+      return result;
+    }
   else
     return oldpid;
 }
@@ -2775,13 +3109,14 @@ start_thread (struct gdb_xml_parser *par
 	      const struct gdb_xml_element *element,
 	      void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct threads_listing_context *data = user_data;
+  struct threads_listing_context *data
+    = (struct threads_listing_context *) user_data;
 
   struct thread_item item;
   char *id;
   struct gdb_xml_value *attr;
 
-  id = xml_find_attribute (attributes, "id")->value;
+  id = (char *) xml_find_attribute (attributes, "id")->value;
   item.ptid = read_ptid (id, NULL);
 
   attr = xml_find_attribute (attributes, "core");
@@ -2790,6 +3125,9 @@ start_thread (struct gdb_xml_parser *par
   else
     item.core = -1;
 
+  attr = xml_find_attribute (attributes, "name");
+  item.name = attr != NULL ? xstrdup ((const char *) attr->value) : NULL;
+
   item.extra = 0;
 
   VEC_safe_push (thread_item_t, data->items, &item);
@@ -2800,7 +3138,8 @@ end_thread (struct gdb_xml_parser *parse
 	    const struct gdb_xml_element *element,
 	    void *user_data, const char *body_text)
 {
-  struct threads_listing_context *data = user_data;
+  struct threads_listing_context *data
+    = (struct threads_listing_context *) user_data;
 
   if (body_text && *body_text)
     VEC_last (thread_item_t, data->items)->extra = xstrdup (body_text);
@@ -2809,6 +3148,7 @@ end_thread (struct gdb_xml_parser *parse
 const struct gdb_xml_attribute thread_attributes[] = {
   { "id", GDB_XML_AF_NONE, NULL, NULL },
   { "core", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_ulongest, NULL },
+  { "name", GDB_XML_AF_OPTIONAL, NULL, NULL },
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
@@ -2882,6 +3222,7 @@ remote_get_threads_with_qthreadinfo (str
 
 		  item.ptid = read_ptid (bufp, &bufp);
 		  item.core = -1;
+		  item.name = NULL;
 		  item.extra = NULL;
 
 		  VEC_safe_push (thread_item_t, context->items, &item);
@@ -2909,7 +3250,6 @@ remote_get_threads_with_qthreadinfo (str
 static void
 remote_update_thread_list (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
   struct threads_listing_context context;
   struct cleanup *old_chain;
   int got_list = 0;
@@ -2976,17 +3316,19 @@ remote_update_thread_list (struct target
 	    {
 	      struct private_thread_info *info;
 	      /* In non-stop mode, we assume new found threads are
-		 running until proven otherwise with a stop reply.  In
-		 all-stop, we can only get here if all threads are
+		 executing until proven otherwise with a stop reply.
+		 In all-stop, we can only get here if all threads are
 		 stopped.  */
-	      int running = non_stop ? 1 : 0;
+	      int executing = target_is_non_stop_p () ? 1 : 0;
 
-	      remote_notice_new_inferior (item->ptid, running);
+	      remote_notice_new_inferior (item->ptid, executing);
 
-	      info = demand_private_info (item->ptid);
+	      info = get_private_info_ptid (item->ptid);
 	      info->core = item->core;
 	      info->extra = item->extra;
 	      item->extra = NULL;
+	      info->name = item->name;
+	      item->name = NULL;
 	    }
 	}
     }
@@ -3056,7 +3398,7 @@ remote_threads_extra_info (struct target
       getpkt (&rs->buf, &rs->buf_size, 0);
       if (rs->buf[0] != 0)
 	{
-	  n = min (strlen (rs->buf) / 2, sizeof (display_buf));
+	  n = std::min (strlen (rs->buf) / 2, sizeof (display_buf));
 	  result = hex2bin (rs->buf, (gdb_byte *) display_buf, n);
 	  display_buf [result] = '\0';
 	  return display_buf;
@@ -3206,8 +3548,7 @@ remote_close (struct target_ops *self)
   if (rs->remote_desc == NULL)
     return; /* already closed */
 
-  /* Make sure we leave stdin registered in the event loop, and we
-     don't leave the async SIGINT signal handler installed.  */
+  /* Make sure we leave stdin registered in the event loop.  */
   remote_terminal_ours (self);
 
   serial_close (rs->remote_desc);
@@ -3391,21 +3732,6 @@ get_offsets (void)
   objfile_relocate (symfile_objfile, offs);
 }
 
-/* Callback for iterate_over_threads.  Set the STOP_REQUESTED flags in
-   threads we know are stopped already.  This is used during the
-   initial remote connection in non-stop mode --- threads that are
-   reported as already being stopped are left stopped.  */
-
-static int
-set_stop_requested_callback (struct thread_info *thread, void *data)
-{
-  /* If we have a stop reply for this thread, it must be stopped.  */
-  if (peek_stop_reply (thread->ptid))
-    set_stop_requested (thread->ptid, 1);
-
-  return 0;
-}
-
 /* Send interrupt_sequence to remote target.  */
 static void
 send_interrupt_sequence (void)
@@ -3474,7 +3800,7 @@ stop_reply_extract_thread (char *stop_re
 static ptid_t
 get_current_thread (char *wait_status)
 {
-  ptid_t ptid;
+  ptid_t ptid = null_ptid;
 
   /* Note we don't use remote_parse_stop_reply as that makes use of
      the target architecture, which we haven't yet fully determined at
@@ -3503,7 +3829,7 @@ add_current_inferior_and_thread (char *w
 {
   struct remote_state *rs = get_remote_state ();
   int fake_pid_p = 0;
-  ptid_t ptid = null_ptid;
+  ptid_t ptid;
 
   inferior_ptid = null_ptid;
 
@@ -3533,67 +3859,277 @@ add_current_inferior_and_thread (char *w
   add_thread_silent (inferior_ptid);
 }
 
+/* Print info about a thread that was found already stopped on
+   connection.  */
+
 static void
-remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
+print_one_stopped_thread (struct thread_info *thread)
 {
-  struct remote_state *rs = get_remote_state ();
-  struct packet_config *noack_config;
-  char *wait_status = NULL;
+  struct target_waitstatus *ws = &thread->suspend.waitstatus;
 
-  immediate_quit++;		/* Allow user to interrupt it.  */
-  QUIT;
+  switch_to_thread (thread->ptid);
+  stop_pc = get_frame_pc (get_current_frame ());
+  set_current_sal_from_frame (get_current_frame ());
 
-  if (interrupt_on_connect)
-    send_interrupt_sequence ();
+  thread->suspend.waitstatus_pending_p = 0;
 
-  /* Ack any packet which the remote side has already sent.  */
-  serial_write (rs->remote_desc, "+", 1);
+  if (ws->kind == TARGET_WAITKIND_STOPPED)
+    {
+      enum gdb_signal sig = ws->value.sig;
 
-  /* Signal other parts that we're going through the initial setup,
-     and so things may not be stable yet.  */
-  rs->starting_up = 1;
+      if (signal_print_state (sig))
+	observer_notify_signal_received (sig);
+    }
+  observer_notify_normal_stop (NULL, 1);
+}
 
-  /* The first packet we send to the target is the optional "supported
-     packets" request.  If the target can answer this, it will tell us
-     which later probes to skip.  */
-  remote_query_supported ();
+/* Process all initial stop replies the remote side sent in response
+   to the ? packet.  These indicate threads that were already stopped
+   on initial connection.  We mark these threads as stopped and print
+   their current frame before giving the user the prompt.  */
 
-  /* If the stub wants to get a QAllow, compose one and send it.  */
-  if (packet_support (PACKET_QAllow) != PACKET_DISABLE)
-    remote_set_permissions (target);
+static void
+process_initial_stop_replies (int from_tty)
+{
+  int pending_stop_replies = stop_reply_queue_length ();
+  struct inferior *inf;
+  struct thread_info *thread;
+  struct thread_info *selected = NULL;
+  struct thread_info *lowest_stopped = NULL;
+  struct thread_info *first = NULL;
+
+  /* Consume the initial pending events.  */
+  while (pending_stop_replies-- > 0)
+    {
+      ptid_t waiton_ptid = minus_one_ptid;
+      ptid_t event_ptid;
+      struct target_waitstatus ws;
+      int ignore_event = 0;
+      struct thread_info *thread;
 
-  /* Next, we possibly activate noack mode.
+      memset (&ws, 0, sizeof (ws));
+      event_ptid = target_wait (waiton_ptid, &ws, TARGET_WNOHANG);
+      if (remote_debug)
+	print_target_wait_results (waiton_ptid, event_ptid, &ws);
 
-     If the QStartNoAckMode packet configuration is set to AUTO,
-     enable noack mode if the stub reported a wish for it with
-     qSupported.
+      switch (ws.kind)
+	{
+	case TARGET_WAITKIND_IGNORE:
+	case TARGET_WAITKIND_NO_RESUMED:
+	case TARGET_WAITKIND_SIGNALLED:
+	case TARGET_WAITKIND_EXITED:
+	  /* We shouldn't see these, but if we do, just ignore.  */
+	  if (remote_debug)
+	    fprintf_unfiltered (gdb_stdlog, "remote: event ignored\n");
+	  ignore_event = 1;
+	  break;
 
-     If set to TRUE, then enable noack mode even if the stub didn't
-     report it in qSupported.  If the stub doesn't reply OK, the
-     session ends with an error.
+	case TARGET_WAITKIND_EXECD:
+	  xfree (ws.value.execd_pathname);
+	  break;
+	default:
+	  break;
+	}
 
-     If FALSE, then don't activate noack mode, regardless of what the
-     stub claimed should be the default with qSupported.  */
+      if (ignore_event)
+	continue;
 
-  noack_config = &remote_protocol_packets[PACKET_QStartNoAckMode];
-  if (packet_config_support (noack_config) != PACKET_DISABLE)
-    {
-      putpkt ("QStartNoAckMode");
-      getpkt (&rs->buf, &rs->buf_size, 0);
-      if (packet_ok (rs->buf, noack_config) == PACKET_OK)
-	rs->noack_mode = 1;
-    }
+      thread = find_thread_ptid (event_ptid);
 
-  if (extended_p)
-    {
-      /* Tell the remote that we are using the extended protocol.  */
-      putpkt ("!");
-      getpkt (&rs->buf, &rs->buf_size, 0);
-    }
+      if (ws.kind == TARGET_WAITKIND_STOPPED)
+	{
+	  enum gdb_signal sig = ws.value.sig;
 
-  /* Let the target know which signals it is allowed to pass down to
-     the program.  */
-  update_signals_program_target ();
+	  /* Stubs traditionally report SIGTRAP as initial signal,
+	     instead of signal 0.  Suppress it.  */
+	  if (sig == GDB_SIGNAL_TRAP)
+	    sig = GDB_SIGNAL_0;
+	  thread->suspend.stop_signal = sig;
+	  ws.value.sig = sig;
+	}
+
+      thread->suspend.waitstatus = ws;
+
+      if (ws.kind != TARGET_WAITKIND_STOPPED
+	  || ws.value.sig != GDB_SIGNAL_0)
+	thread->suspend.waitstatus_pending_p = 1;
+
+      set_executing (event_ptid, 0);
+      set_running (event_ptid, 0);
+      thread->priv->vcont_resumed = 0;
+    }
+
+  /* "Notice" the new inferiors before anything related to
+     registers/memory.  */
+  ALL_INFERIORS (inf)
+    {
+      if (inf->pid == 0)
+	continue;
+
+      inf->needs_setup = 1;
+
+      if (non_stop)
+	{
+	  thread = any_live_thread_of_process (inf->pid);
+	  notice_new_inferior (thread->ptid,
+			       thread->state == THREAD_RUNNING,
+			       from_tty);
+	}
+    }
+
+  /* If all-stop on top of non-stop, pause all threads.  Note this
+     records the threads' stop pc, so must be done after "noticing"
+     the inferiors.  */
+  if (!non_stop)
+    {
+      stop_all_threads ();
+
+      /* If all threads of an inferior were already stopped, we
+	 haven't setup the inferior yet.  */
+      ALL_INFERIORS (inf)
+	{
+	  if (inf->pid == 0)
+	    continue;
+
+	  if (inf->needs_setup)
+	    {
+	      thread = any_live_thread_of_process (inf->pid);
+	      switch_to_thread_no_regs (thread);
+	      setup_inferior (0);
+	    }
+	}
+    }
+
+  /* Now go over all threads that are stopped, and print their current
+     frame.  If all-stop, then if there's a signalled thread, pick
+     that as current.  */
+  ALL_NON_EXITED_THREADS (thread)
+    {
+      if (first == NULL)
+	first = thread;
+
+      if (!non_stop)
+	set_running (thread->ptid, 0);
+      else if (thread->state != THREAD_STOPPED)
+	continue;
+
+      if (selected == NULL
+	  && thread->suspend.waitstatus_pending_p)
+	selected = thread;
+
+      if (lowest_stopped == NULL
+	  || thread->inf->num < lowest_stopped->inf->num
+	  || thread->per_inf_num < lowest_stopped->per_inf_num)
+	lowest_stopped = thread;
+
+      if (non_stop)
+	print_one_stopped_thread (thread);
+    }
+
+  /* In all-stop, we only print the status of one thread, and leave
+     others with their status pending.  */
+  if (!non_stop)
+    {
+      thread = selected;
+      if (thread == NULL)
+	thread = lowest_stopped;
+      if (thread == NULL)
+	thread = first;
+
+      print_one_stopped_thread (thread);
+    }
+
+  /* For "info program".  */
+  thread = inferior_thread ();
+  if (thread->state == THREAD_STOPPED)
+    set_last_target_status (inferior_ptid, thread->suspend.waitstatus);
+}
+
+/* Start the remote connection and sync state.  */
+
+static void
+remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
+{
+  struct remote_state *rs = get_remote_state ();
+  struct packet_config *noack_config;
+  char *wait_status = NULL;
+
+  /* Signal other parts that we're going through the initial setup,
+     and so things may not be stable yet.  E.g., we don't try to
+     install tracepoints until we've relocated symbols.  Also, a
+     Ctrl-C before we're connected and synced up can't interrupt the
+     target.  Instead, it offers to drop the (potentially wedged)
+     connection.  */
+  rs->starting_up = 1;
+
+  QUIT;
+
+  if (interrupt_on_connect)
+    send_interrupt_sequence ();
+
+  /* Ack any packet which the remote side has already sent.  */
+  remote_serial_write ("+", 1);
+
+  /* The first packet we send to the target is the optional "supported
+     packets" request.  If the target can answer this, it will tell us
+     which later probes to skip.  */
+  remote_query_supported ();
+
+  /* If the stub wants to get a QAllow, compose one and send it.  */
+  if (packet_support (PACKET_QAllow) != PACKET_DISABLE)
+    remote_set_permissions (target);
+
+  /* gdbserver < 7.7 (before its fix from 2013-12-11) did reply to any
+     unknown 'v' packet with string "OK".  "OK" gets interpreted by GDB
+     as a reply to known packet.  For packet "vFile:setfs:" it is an
+     invalid reply and GDB would return error in
+     remote_hostio_set_filesystem, making remote files access impossible.
+     Disable "vFile:setfs:" in such case.  Do not disable other 'v' packets as
+     other "vFile" packets get correctly detected even on gdbserver < 7.7.  */
+  {
+    const char v_mustreplyempty[] = "vMustReplyEmpty";
+
+    putpkt (v_mustreplyempty);
+    getpkt (&rs->buf, &rs->buf_size, 0);
+    if (strcmp (rs->buf, "OK") == 0)
+      remote_protocol_packets[PACKET_vFile_setfs].support = PACKET_DISABLE;
+    else if (strcmp (rs->buf, "") != 0)
+      error (_("Remote replied unexpectedly to '%s': %s"), v_mustreplyempty,
+	     rs->buf);
+  }
+
+  /* Next, we possibly activate noack mode.
+
+     If the QStartNoAckMode packet configuration is set to AUTO,
+     enable noack mode if the stub reported a wish for it with
+     qSupported.
+
+     If set to TRUE, then enable noack mode even if the stub didn't
+     report it in qSupported.  If the stub doesn't reply OK, the
+     session ends with an error.
+
+     If FALSE, then don't activate noack mode, regardless of what the
+     stub claimed should be the default with qSupported.  */
+
+  noack_config = &remote_protocol_packets[PACKET_QStartNoAckMode];
+  if (packet_config_support (noack_config) != PACKET_DISABLE)
+    {
+      putpkt ("QStartNoAckMode");
+      getpkt (&rs->buf, &rs->buf_size, 0);
+      if (packet_ok (rs->buf, noack_config) == PACKET_OK)
+	rs->noack_mode = 1;
+    }
+
+  if (extended_p)
+    {
+      /* Tell the remote that we are using the extended protocol.  */
+      putpkt ("!");
+      getpkt (&rs->buf, &rs->buf_size, 0);
+    }
+
+  /* Let the target know which signals it is allowed to pass down to
+     the program.  */
+  update_signals_program_target ();
 
   /* Next, if the target can specify a description, read it.  We do
      this before anything involving memory or registers.  */
@@ -3608,7 +4144,7 @@ remote_start_remote (int from_tty, struc
   if (gdbarch_has_global_solist (target_gdbarch ()))
     solib_add (NULL, from_tty, target, auto_solib_add);
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     {
       if (packet_support (PACKET_QNonStop) != PACKET_ENABLE)
 	error (_("Non-stop mode requested, but remote "
@@ -3652,12 +4188,8 @@ remote_start_remote (int from_tty, struc
   putpkt ("?");
   getpkt (&rs->buf, &rs->buf_size, 0);
 
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
-      ptid_t ptid;
-      int fake_pid_p = 0;
-      struct inferior *inf;
-
       if (rs->buf[0] == 'W' || rs->buf[0] == 'X')
 	{
 	  if (!extended_p)
@@ -3671,7 +4203,7 @@ remote_start_remote (int from_tty, struc
       else
 	{
 	  /* Save the reply for later.  */
-	  wait_status = alloca (strlen (rs->buf) + 1);
+	  wait_status = (char *) alloca (strlen (rs->buf) + 1);
 	  strcpy (wait_status, rs->buf);
 	}
 
@@ -3701,6 +4233,12 @@ remote_start_remote (int from_tty, struc
 		 tell us which thread was current (no "thread"
 		 register in T stop reply?).  Just pick the first
 		 thread in the thread list then.  */
+	      
+	      if (remote_debug)
+		fprintf_unfiltered (gdb_stdlog,
+		                    "warning: couldn't determine remote "
+				    "current thread; picking first in list.\n");
+
 	      inferior_ptid = thread_list->ptid;
 	    }
 	}
@@ -3734,7 +4272,6 @@ remote_start_remote (int from_tty, struc
       strcpy (rs->buf, wait_status);
       rs->cached_wait_status = 1;
 
-      immediate_quit--;
       start_remote (from_tty); /* Initialize gdb process mechanisms.  */
     }
   else
@@ -3760,15 +4297,8 @@ remote_start_remote (int from_tty, struc
 	  rs->notif_state->pending_event[notif_client_stop.id]
 	    = remote_notif_parse (notif, rs->buf);
 	  remote_notif_get_pending_events (notif);
-
-	  /* Make sure that threads that were stopped remain
-	     stopped.  */
-	  iterate_over_threads (set_stop_requested_callback, NULL);
 	}
 
-      if (target_can_async_p ())
-	target_async (1);
-
       if (thread_count () == 0)
 	{
 	  if (!extended_p)
@@ -3780,24 +4310,19 @@ remote_start_remote (int from_tty, struc
 	  return;
 	}
 
-      /* Let the stub know that we want it to return the thread.  */
-
-      /* Force the stub to choose a thread.  */
-      set_general_thread (null_ptid);
-
-      /* Query it.  */
-      inferior_ptid = remote_current_thread (minus_one_ptid);
-      if (ptid_equal (inferior_ptid, minus_one_ptid))
-	error (_("remote didn't report the current thread in non-stop mode"));
-
-      get_offsets ();		/* Get text, data & bss offsets.  */
-
       /* In non-stop mode, any cached wait status will be stored in
 	 the stop reply queue.  */
       gdb_assert (wait_status == NULL);
 
       /* Report all signals during attach/startup.  */
       remote_pass_signals (target, 0, NULL);
+
+      /* If there are already stopped threads, mark them stopped and
+	 report their stops before giving the prompt to the user.  */
+      process_initial_stop_replies (from_tty);
+
+      if (target_can_async_p ())
+	target_async (1);
     }
 
   /* If we connected to a live target, do some additional setup.  */
@@ -3821,6 +4346,10 @@ remote_start_remote (int from_tty, struc
       merge_uploaded_tracepoints (&uploaded_tps);
     }
 
+  /* Possibly the target has been engaged in a btrace record started
+     previously; find out where things are at.  */
+  remote_btrace_maybe_reopen ();
+
   /* The thread and inferior lists are now synchronized with the
      target, our symbols have been relocated, and we're merged the
      target's tracepoints with ours.  We're done with basic start
@@ -3883,8 +4412,9 @@ remote_check_symbols (void)
 {
   struct remote_state *rs = get_remote_state ();
   char *msg, *reply, *tmp;
-  struct bound_minimal_symbol sym;
   int end;
+  long reply_size;
+  struct cleanup *old_chain;
 
   /* The remote side has no concept of inferiors that aren't running
      yet, it only knows about running processes.  If we're connected
@@ -3903,14 +4433,17 @@ remote_check_symbols (void)
 
   /* Allocate a message buffer.  We can't reuse the input buffer in RS,
      because we need both at the same time.  */
-  msg = alloca (get_remote_packet_size ());
+  msg = (char *) xmalloc (get_remote_packet_size ());
+  old_chain = make_cleanup (xfree, msg);
+  reply = (char *) xmalloc (get_remote_packet_size ());
+  make_cleanup (free_current_contents, &reply);
+  reply_size = get_remote_packet_size ();
 
   /* Invite target to request symbol lookups.  */
 
   putpkt ("qSymbol::");
-  getpkt (&rs->buf, &rs->buf_size, 0);
-  packet_ok (rs->buf, &remote_protocol_packets[PACKET_qSymbol]);
-  reply = rs->buf;
+  getpkt (&reply, &reply_size, 0);
+  packet_ok (reply, &remote_protocol_packets[PACKET_qSymbol]);
 
   while (startswith (reply, "qSymbol:"))
     {
@@ -3938,9 +4471,10 @@ remote_check_symbols (void)
 	}
   
       putpkt (msg);
-      getpkt (&rs->buf, &rs->buf_size, 0);
-      reply = rs->buf;
+      getpkt (&reply, &reply_size, 0);
     }
+
+  do_cleanups (old_chain);
 }
 
 static struct serial *
@@ -4063,13 +4597,6 @@ remote_packet_size (const struct protoco
       return;
     }
 
-  if (packet_size > MAX_REMOTE_PACKET_SIZE)
-    {
-      warning (_("limiting remote suggested packet size (%d bytes) to %d"),
-	       packet_size, MAX_REMOTE_PACKET_SIZE);
-      packet_size = MAX_REMOTE_PACKET_SIZE;
-    }
-
   /* Record the new maximum packet size.  */
   rs->explicit_packet_size = packet_size;
 }
@@ -4102,6 +4629,8 @@ static const struct protocol_feature rem
     PACKET_qXfer_traceframe_info },
   { "QPassSignals", PACKET_DISABLE, remote_supported_packet,
     PACKET_QPassSignals },
+  { "QCatchSyscalls", PACKET_DISABLE, remote_supported_packet,
+    PACKET_QCatchSyscalls },
   { "QProgramSignals", PACKET_DISABLE, remote_supported_packet,
     PACKET_QProgramSignals },
   { "QStartNoAckMode", PACKET_DISABLE, remote_supported_packet,
@@ -4162,8 +4691,13 @@ static const struct protocol_feature rem
     PACKET_fork_event_feature },
   { "vfork-events", PACKET_DISABLE, remote_supported_packet,
     PACKET_vfork_event_feature },
+  { "exec-events", PACKET_DISABLE, remote_supported_packet,
+    PACKET_exec_event_feature },
   { "Qbtrace-conf:pt:size", PACKET_DISABLE, remote_supported_packet,
-    PACKET_Qbtrace_conf_pt_size }
+    PACKET_Qbtrace_conf_pt_size },
+  { "vContSupported", PACKET_DISABLE, remote_supported_packet, PACKET_vContSupported },
+  { "QThreadEvents", PACKET_DISABLE, remote_supported_packet, PACKET_QThreadEvents },
+  { "no-resumed", PACKET_DISABLE, remote_supported_packet, PACKET_no_resumed },
 };
 
 static char *remote_support_xml;
@@ -4230,27 +4764,39 @@ remote_query_supported (void)
       char *q = NULL;
       struct cleanup *old_chain = make_cleanup (free_current_contents, &q);
 
-      q = remote_query_supported_append (q, "multiprocess+");
+      if (packet_set_cmd_state (PACKET_multiprocess_feature) != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "multiprocess+");
 
       if (packet_set_cmd_state (PACKET_swbreak_feature) != AUTO_BOOLEAN_FALSE)
 	q = remote_query_supported_append (q, "swbreak+");
       if (packet_set_cmd_state (PACKET_hwbreak_feature) != AUTO_BOOLEAN_FALSE)
 	q = remote_query_supported_append (q, "hwbreak+");
 
-      if (remote_support_xml)
-	q = remote_query_supported_append (q, remote_support_xml);
-
       q = remote_query_supported_append (q, "qRelocInsn+");
 
-      if (rs->extended)
-	{
-	  if (packet_set_cmd_state (PACKET_fork_event_feature)
-	      != AUTO_BOOLEAN_FALSE)
-	    q = remote_query_supported_append (q, "fork-events+");
-	  if (packet_set_cmd_state (PACKET_vfork_event_feature)
-	      != AUTO_BOOLEAN_FALSE)
-	    q = remote_query_supported_append (q, "vfork-events+");
-	}
+      if (packet_set_cmd_state (PACKET_fork_event_feature)
+	  != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "fork-events+");
+      if (packet_set_cmd_state (PACKET_vfork_event_feature)
+	  != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "vfork-events+");
+      if (packet_set_cmd_state (PACKET_exec_event_feature)
+	  != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "exec-events+");
+
+      if (packet_set_cmd_state (PACKET_vContSupported) != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "vContSupported+");
+
+      if (packet_set_cmd_state (PACKET_QThreadEvents) != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "QThreadEvents+");
+
+      if (packet_set_cmd_state (PACKET_no_resumed) != AUTO_BOOLEAN_FALSE)
+	q = remote_query_supported_append (q, "no-resumed+");
+
+      /* Keep this one last to work around a gdbserver <= 7.10 bug in
+	 the qSupported:xmlRegisters=i386 handling.  */
+      if (remote_support_xml != NULL)
+	q = remote_query_supported_append (q, remote_support_xml);
 
       q = reconcat (q, "qSupported:", q, (char *) NULL);
       putpkt (q);
@@ -4351,7 +4897,7 @@ remote_query_supported (void)
   if (rs->buf_size < rs->explicit_packet_size)
     {
       rs->buf_size = rs->explicit_packet_size;
-      rs->buf = xrealloc (rs->buf, rs->buf_size);
+      rs->buf = (char *) xrealloc (rs->buf, rs->buf_size);
     }
 
   /* Handle the defaults for unmentioned features.  */
@@ -4365,13 +4911,72 @@ remote_query_supported (void)
       }
 }
 
+/* Serial QUIT handler for the remote serial descriptor.
+
+   Defers handling a Ctrl-C until we're done with the current
+   command/response packet sequence, unless:
+
+   - We're setting up the connection.  Don't send a remote interrupt
+     request, as we're not fully synced yet.  Quit immediately
+     instead.
+
+   - The target has been resumed in the foreground
+     (target_terminal_is_ours is false) with a synchronous resume
+     packet, and we're blocked waiting for the stop reply, thus a
+     Ctrl-C should be immediately sent to the target.
+
+   - We get a second Ctrl-C while still within the same serial read or
+     write.  In that case the serial is seemingly wedged --- offer to
+     quit/disconnect.
+
+   - We see a second Ctrl-C without target response, after having
+     previously interrupted the target.  In that case the target/stub
+     is probably wedged --- offer to quit/disconnect.
+*/
+
+static void
+remote_serial_quit_handler (void)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  if (check_quit_flag ())
+    {
+      /* If we're starting up, we're not fully synced yet.  Quit
+	 immediately.  */
+      if (rs->starting_up)
+	quit ();
+      else if (rs->got_ctrlc_during_io)
+	{
+	  if (query (_("The target is not responding to GDB commands.\n"
+		       "Stop debugging it? ")))
+	    remote_unpush_and_throw ();
+	}
+      /* If ^C has already been sent once, offer to disconnect.  */
+      else if (!target_terminal_is_ours () && rs->ctrlc_pending_p)
+	interrupt_query ();
+      /* All-stop protocol, and blocked waiting for stop reply.  Send
+	 an interrupt request.  */
+      else if (!target_terminal_is_ours () && rs->waiting_for_stop_reply)
+	target_interrupt (inferior_ptid);
+      else
+	rs->got_ctrlc_during_io = 1;
+    }
+}
+
 /* Remove any of the remote.c targets from target stack.  Upper targets depend
    on it so remove them first.  */
 
 static void
 remote_unpush_target (void)
 {
-  pop_all_targets_above (process_stratum - 1);
+  pop_all_targets_at_and_above (process_stratum);
+}
+
+static void
+remote_unpush_and_throw (void)
+{
+  remote_unpush_target ();
+  throw_error (TARGET_CLOSE_ERROR, _("Disconnected from target."));
 }
 
 static void
@@ -4463,20 +5068,25 @@ remote_open_1 (const char *name, int fro
   rs->extended = extended_p;
   rs->waiting_for_stop_reply = 0;
   rs->ctrlc_pending_p = 0;
+  rs->got_ctrlc_during_io = 0;
 
   rs->general_thread = not_sent_ptid;
   rs->continue_thread = not_sent_ptid;
   rs->remote_traceframe_number = -1;
 
+  rs->last_resume_exec_dir = EXEC_FORWARD;
+
   /* Probe for ability to use "ThreadInfo" query, as required.  */
   rs->use_threadinfo_query = 1;
   rs->use_threadextra_query = 1;
 
+  readahead_cache_invalidate ();
+
+  /* Start out by owning the terminal.  */
+  remote_async_terminal_ours_p = 1;
+
   if (target_async_permitted)
     {
-      /* With this target we start out by owning the terminal.  */
-      remote_async_terminal_ours_p = 1;
-
       /* FIXME: cagney/1999-09-23: During the initial connection it is
 	 assumed that the target is already ready and able to respond to
 	 requests.  Unfortunately remote_start_remote() eventually calls
@@ -4576,20 +5186,13 @@ remote_detach_1 (const char *args, int f
   if (!target_has_execution)
     error (_("No process to detach from."));
 
-  if (from_tty)
-    {
-      char *exec_file = get_exec_file (0);
-      if (exec_file == NULL)
-	exec_file = "";
-      printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
-			 target_pid_to_str (pid_to_ptid (pid)));
-      gdb_flush (gdb_stdout);
-    }
+  target_announce_detach (from_tty);
 
   /* Tell the remote target to detach.  */
   remote_detach_pid (pid);
 
-  if (from_tty && !rs->extended)
+  /* Exit only if this is the only active inferior.  */
+  if (from_tty && !rs->extended && number_of_live_inferiors () == 1)
     puts_filtered (_("Ending remote debugging.\n"));
 
   /* Check to see if we are detaching a fork parent.  Note that if we
@@ -4600,7 +5203,7 @@ remote_detach_1 (const char *args, int f
   /* If doing detach-on-fork, we don't mourn, because that will delete
      breakpoints that should be available for the followed inferior.  */
   if (!is_fork_parent)
-    target_mourn_inferior ();
+    target_mourn_inferior (inferior_ptid);
   else
     {
       inferior_ptid = null_ptid;
@@ -4659,6 +5262,24 @@ remote_follow_fork (struct target_ops *o
   return 0;
 }
 
+/* Target follow-exec function for remote targets.  Save EXECD_PATHNAME
+   in the program space of the new inferior.  On entry and at return the
+   current inferior is the exec'ing inferior.  INF is the new exec'd
+   inferior, which may be the same as the exec'ing inferior unless
+   follow-exec-mode is "new".  */
+
+static void
+remote_follow_exec (struct target_ops *ops,
+		    struct inferior *inf, char *execd_pathname)
+{
+  /* We know that this is a target file name, so if it has the "target:"
+     prefix we strip it off before saving it in the program space.  */
+  if (is_target_filename (execd_pathname))
+    execd_pathname += strlen (TARGET_SYSROOT_PREFIX);
+
+  set_pspace_remote_exec_file (inf->pspace, execd_pathname);
+}
+
 /* Same as remote_detach, but don't send the "D" packet; just disconnect.  */
 
 static void
@@ -4667,10 +5288,11 @@ remote_disconnect (struct target_ops *ta
   if (args)
     error (_("Argument given to \"disconnect\" when remotely debugging."));
 
-  /* Make sure we unpush even the extended remote targets; mourn
-     won't do it.  So call remote_mourn directly instead of
-     target_mourn_inferior.  */
-  remote_mourn (target);
+  /* Make sure we unpush even the extended remote targets.  Calling
+     target_mourn_inferior won't unpush, and remote_mourn won't
+     unpush if there is more than one inferior left.  */
+  unpush_target (target);
+  generic_mourn_inferior ();
 
   if (from_tty)
     puts_filtered ("Ending remote debugging.\n");
@@ -4717,10 +5339,10 @@ extended_remote_attach (struct target_op
 		     &remote_protocol_packets[PACKET_vAttach]))
     {
     case PACKET_OK:
-      if (!non_stop)
+      if (!target_is_non_stop_p ())
 	{
 	  /* Save the reply for later.  */
-	  wait_status = alloca (strlen (rs->buf) + 1);
+	  wait_status = (char *) alloca (strlen (rs->buf) + 1);
 	  strcpy (wait_status, rs->buf);
 	}
       else if (strcmp (rs->buf, "OK") != 0)
@@ -4739,7 +5361,7 @@ extended_remote_attach (struct target_op
 
   inferior_ptid = pid_to_ptid (pid);
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     {
       struct thread_info *thread;
 
@@ -4768,7 +5390,7 @@ extended_remote_attach (struct target_op
      this before anything involving memory or registers.  */
   target_find_description ();
 
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     {
       /* Use the previously fetched status.  */
       gdb_assert (wait_status != NULL);
@@ -4798,6 +5420,9 @@ extended_remote_attach (struct target_op
 static void
 extended_remote_post_attach (struct target_ops *ops, int pid)
 {
+  /* Get text, data & bss offsets.  */
+  get_offsets ();
+
   /* In certain cases GDB might not have had the chance to start
      symbol lookup up until now.  This could happen if the debugged
      binary is not using shared libraries, the vsyscall page is not
@@ -4825,10 +5450,10 @@ remote_vcont_probe (struct remote_state 
   if (startswith (buf, "vCont"))
     {
       char *p = &buf[5];
-      int support_s, support_S, support_c, support_C;
+      int support_c, support_C;
 
-      support_s = 0;
-      support_S = 0;
+      rs->supports_vCont.s = 0;
+      rs->supports_vCont.S = 0;
       support_c = 0;
       support_C = 0;
       rs->supports_vCont.t = 0;
@@ -4837,9 +5462,9 @@ remote_vcont_probe (struct remote_state 
 	{
 	  p++;
 	  if (*p == 's' && (*(p + 1) == ';' || *(p + 1) == 0))
-	    support_s = 1;
+	    rs->supports_vCont.s = 1;
 	  else if (*p == 'S' && (*(p + 1) == ';' || *(p + 1) == 0))
-	    support_S = 1;
+	    rs->supports_vCont.S = 1;
 	  else if (*p == 'c' && (*(p + 1) == ';' || *(p + 1) == 0))
 	    support_c = 1;
 	  else if (*p == 'C' && (*(p + 1) == ';' || *(p + 1) == 0))
@@ -4852,9 +5477,9 @@ remote_vcont_probe (struct remote_state 
 	  p = strchr (p, ';');
 	}
 
-      /* If s, S, c, and C are not all supported, we can't use vCont.  Clearing
-         BUF will make packet_ok disable the packet.  */
-      if (!support_s || !support_S || !support_c || !support_C)
+      /* If c, and C are not all supported, we can't use vCont.  Clearing
+	 BUF will make packet_ok disable the packet.  */
+      if (!support_c || !support_C)
 	buf[0] = 0;
     }
 
@@ -4941,6 +5566,18 @@ append_resumption (char *p, char *endp,
   return p;
 }
 
+/* Clear the thread's private info on resume.  */
+
+static void
+resume_clear_thread_private_info (struct thread_info *thread)
+{
+  if (thread->priv != NULL)
+    {
+      thread->priv->stop_reason = TARGET_STOPPED_BY_NO_REASON;
+      thread->priv->watch_data_address = 0;
+    }
+}
+
 /* Append a vCont continue-with-signal action for threads that have a
    non-zero stop signal.  */
 
@@ -4957,11 +5594,64 @@ append_pending_thread_resumptions (char 
 	p = append_resumption (p, endp, thread->ptid,
 			       0, thread->suspend.stop_signal);
 	thread->suspend.stop_signal = GDB_SIGNAL_0;
+	resume_clear_thread_private_info (thread);
       }
 
   return p;
 }
 
+/* Set the target running, using the packets that use Hc
+   (c/s/C/S).  */
+
+static void
+remote_resume_with_hc (struct target_ops *ops,
+		       ptid_t ptid, int step, enum gdb_signal siggnal)
+{
+  struct remote_state *rs = get_remote_state ();
+  struct thread_info *thread;
+  char *buf;
+
+  rs->last_sent_signal = siggnal;
+  rs->last_sent_step = step;
+
+  /* The c/s/C/S resume packets use Hc, so set the continue
+     thread.  */
+  if (ptid_equal (ptid, minus_one_ptid))
+    set_continue_thread (any_thread_ptid);
+  else
+    set_continue_thread (ptid);
+
+  ALL_NON_EXITED_THREADS (thread)
+    resume_clear_thread_private_info (thread);
+
+  buf = rs->buf;
+  if (execution_direction == EXEC_REVERSE)
+    {
+      /* We don't pass signals to the target in reverse exec mode.  */
+      if (info_verbose && siggnal != GDB_SIGNAL_0)
+	warning (_(" - Can't pass signal %d to target in reverse: ignored."),
+		 siggnal);
+
+      if (step && packet_support (PACKET_bs) == PACKET_DISABLE)
+	error (_("Remote reverse-step not supported."));
+      if (!step && packet_support (PACKET_bc) == PACKET_DISABLE)
+	error (_("Remote reverse-continue not supported."));
+
+      strcpy (buf, step ? "bs" : "bc");
+    }
+  else if (siggnal != GDB_SIGNAL_0)
+    {
+      buf[0] = step ? 'S' : 'C';
+      buf[1] = tohex (((int) siggnal >> 4) & 0xf);
+      buf[2] = tohex (((int) siggnal) & 0xf);
+      buf[3] = '\0';
+    }
+  else
+    strcpy (buf, step ? "s" : "c");
+
+  putpkt (buf);
+}
+
 /* Resume the remote inferior by using a "vCont" packet.  The thread
    to be resumed is PTID; STEP and SIGGNAL indicate whether the
    resumed thread should be single-stepped and/or signalled.  If PTID
@@ -4969,16 +5659,20 @@ append_pending_thread_resumptions (char 
    be stepped and/or signalled is given in the global INFERIOR_PTID.
    This function returns non-zero iff it resumes the inferior.
 
-   This function issues a strict subset of all possible vCont commands at the
-   moment.  */
+   This function issues a strict subset of all possible vCont commands
+   at the moment.  */
 
 static int
-remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal)
+remote_resume_with_vcont (ptid_t ptid, int step, enum gdb_signal siggnal)
 {
   struct remote_state *rs = get_remote_state ();
   char *p;
   char *endp;
 
+  /* No reverse execution actions defined for vCont.  */
+  if (execution_direction == EXEC_REVERSE)
+    return 0;
+
   if (packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN)
     remote_vcont_probe (rs);
 
@@ -5030,7 +5724,7 @@ remote_vcont_resume (ptid_t ptid, int st
   gdb_assert (strlen (rs->buf) < get_remote_packet_size ());
   putpkt (rs->buf);
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     {
       /* In non-stop, the stub replies to vCont with "OK".  The stop
 	 reply will be reported asynchronously by means of a `%Stop'
@@ -5050,7 +5744,26 @@ remote_resume (struct target_ops *ops,
 	       ptid_t ptid, int step, enum gdb_signal siggnal)
 {
   struct remote_state *rs = get_remote_state ();
-  char *buf;
+
+  /* When connected in non-stop mode, the core resumes threads
+     individually.  Resuming remote threads directly in target_resume
+     would thus result in sending one packet per thread.  Instead, to
+     minimize roundtrip latency, here we just store the resume
+     request; the actual remote resumption will be done in
+     target_commit_resume / remote_commit_resume, where we'll be able
+     to do vCont action coalescing.  */
+  if (target_is_non_stop_p () && execution_direction != EXEC_REVERSE)
+    {
+      struct private_thread_info *remote_thr;
+
+      if (ptid_equal (minus_one_ptid, ptid) || ptid_is_pid (ptid))
+	remote_thr = get_private_info_ptid (inferior_ptid);
+      else
+	remote_thr = get_private_info_ptid (ptid);
+      remote_thr->last_resume_step = step;
+      remote_thr->last_resume_sig = siggnal;
+      return;
+    }
 
   /* In all-stop, we can't mark REMOTE_ASYNC_GET_PENDING_EVENTS_TOKEN
      (explained in remote-notif.c:handle_notification) so
@@ -5058,53 +5771,15 @@ remote_resume (struct target_ops *ops,
      it is safe to start a 'vNotif' sequence.  It is good to do it
      before resuming inferior, because inferior was stopped and no RSP
      traffic at that moment.  */
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     remote_notif_process (rs->notif_state, &notif_client_stop);
 
-  rs->last_sent_signal = siggnal;
-  rs->last_sent_step = step;
-
-  /* The vCont packet doesn't need to specify threads via Hc.  */
-  /* No reverse support (yet) for vCont.  */
-  if (execution_direction != EXEC_REVERSE)
-    if (remote_vcont_resume (ptid, step, siggnal))
-      goto done;
-
-  /* All other supported resume packets do use Hc, so set the continue
-     thread.  */
-  if (ptid_equal (ptid, minus_one_ptid))
-    set_continue_thread (any_thread_ptid);
-  else
-    set_continue_thread (ptid);
+  rs->last_resume_exec_dir = execution_direction;
 
-  buf = rs->buf;
-  if (execution_direction == EXEC_REVERSE)
-    {
-      /* We don't pass signals to the target in reverse exec mode.  */
-      if (info_verbose && siggnal != GDB_SIGNAL_0)
-	warning (_(" - Can't pass signal %d to target in reverse: ignored."),
-		 siggnal);
+  /* Prefer vCont, and fallback to s/c/S/C, which use Hc.  */
+  if (!remote_resume_with_vcont (ptid, step, siggnal))
+    remote_resume_with_hc (ops, ptid, step, siggnal);
 
-      if (step && packet_support (PACKET_bs) == PACKET_DISABLE)
-	error (_("Remote reverse-step not supported."));
-      if (!step && packet_support (PACKET_bc) == PACKET_DISABLE)
-	error (_("Remote reverse-continue not supported."));
-
-      strcpy (buf, step ? "bs" : "bc");
-    }
-  else if (siggnal != GDB_SIGNAL_0)
-    {
-      buf[0] = step ? 'S' : 'C';
-      buf[1] = tohex (((int) siggnal >> 4) & 0xf);
-      buf[2] = tohex (((int) siggnal) & 0xf);
-      buf[3] = '\0';
-    }
-  else
-    strcpy (buf, step ? "s" : "c");
-
-  putpkt (buf);
-
- done:
   /* We are about to start executing the inferior, let's register it
      with the event loop.  NOTE: this is the one place where all the
      execution commands end up.  We could alternatively do this in each
@@ -5122,98 +5797,288 @@ remote_resume (struct target_ops *ops,
      only to the base all-stop protocol, however.  In non-stop (which
      only supports vCont), the stub replies with an "OK", and is
      immediate able to process further serial input.  */
-  if (!non_stop)
+  if (!target_is_non_stop_p ())
     rs->waiting_for_stop_reply = 1;
 }
-
 
-/* Set up the signal handler for SIGINT, while the target is
-   executing, ovewriting the 'regular' SIGINT signal handler.  */
-static void
-async_initialize_sigint_signal_handler (void)
-{
-  signal (SIGINT, async_handle_remote_sigint);
-}
+static void check_pending_events_prevent_wildcard_vcont
+  (int *may_global_wildcard_vcont);
+static int is_pending_fork_parent_thread (struct thread_info *thread);
 
-/* Signal handler for SIGINT, while the target is executing.  */
-static void
-async_handle_remote_sigint (int sig)
+/* Private per-inferior info for target remote processes.  */
+
+struct private_inferior
 {
-  signal (sig, async_handle_remote_sigint_twice);
-  /* Note we need to go through gdb_call_async_signal_handler in order
-     to wake up the event loop on Windows.  */
-  gdb_call_async_signal_handler (async_sigint_remote_token, 0);
-}
+  /* Whether we can send a wildcard vCont for this process.  */
+  int may_wildcard_vcont;
+};
 
-/* Signal handler for SIGINT, installed after SIGINT has already been
-   sent once.  It will take effect the second time that the user sends
-   a ^C.  */
-static void
-async_handle_remote_sigint_twice (int sig)
+/* Structure used to track the construction of a vCont packet in the
+   outgoing packet buffer.  This is used to send multiple vCont
+   packets if we have more actions than would fit a single packet.  */
+
+struct vcont_builder
 {
-  signal (sig, async_handle_remote_sigint);
-  /* See note in async_handle_remote_sigint.  */
-  gdb_call_async_signal_handler (async_sigint_remote_twice_token, 0);
-}
+  /* Pointer to the first action.  P points here if no action has been
+     appended yet.  */
+  char *first_action;
+
+  /* Where the next action will be appended.  */
+  char *p;
+
+  /* The end of the buffer.  Must never write past this.  */
+  char *endp;
+};
+
+/* Prepare the outgoing buffer for a new vCont packet.  */
 
-/* Perform the real interruption of the target execution, in response
-   to a ^C.  */
 static void
-async_remote_interrupt (gdb_client_data arg)
+vcont_builder_restart (struct vcont_builder *builder)
 {
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "async_remote_interrupt called\n");
+  struct remote_state *rs = get_remote_state ();
 
-  target_stop (inferior_ptid);
+  builder->p = rs->buf;
+  builder->endp = rs->buf + get_remote_packet_size ();
+  builder->p += xsnprintf (builder->p, builder->endp - builder->p, "vCont");
+  builder->first_action = builder->p;
 }
 
-/* Perform interrupt, if the first attempt did not succeed.  Just give
-   up on the target alltogether.  */
+/* If the vCont packet being built has any action, send it to the
+   remote end.  */
+
 static void
-async_remote_interrupt_twice (gdb_client_data arg)
+vcont_builder_flush (struct vcont_builder *builder)
 {
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "async_remote_interrupt_twice called\n");
+  struct remote_state *rs;
 
-  interrupt_query ();
-}
+  if (builder->p == builder->first_action)
+    return;
 
-/* Reinstall the usual SIGINT handlers, after the target has
-   stopped.  */
-static void
-async_cleanup_sigint_signal_handler (void *dummy)
-{
-  signal (SIGINT, handle_sigint);
+  rs = get_remote_state ();
+  putpkt (rs->buf);
+  getpkt (&rs->buf, &rs->buf_size, 0);
+  if (strcmp (rs->buf, "OK") != 0)
+    error (_("Unexpected vCont reply in non-stop mode: %s"), rs->buf);
 }
 
-/* Send ^C to target to halt it.  Target will respond, and send us a
-   packet.  */
-static void (*ofunc) (int);
+/* The largest action is range-stepping, with its two addresses.  This
+   is more than sufficient.  If a new, bigger action is created, it'll
+   quickly trigger a failed assertion in append_resumption (and we'll
+   just bump this).  */
+#define MAX_ACTION_SIZE 200
+
+/* Append a new vCont action in the outgoing packet being built.  If
+   the action doesn't fit the packet along with previous actions, push
+   what we've got so far to the remote end and start over a new vCont
+   packet (with the new action).  */
 
-/* The command line interface's stop routine.  This function is installed
-   as a signal handler for SIGINT.  The first time a user requests a
-   stop, we call remote_stop to send a break or ^C.  If there is no
-   response from the target (it didn't stop when the user requested it),
-   we ask the user if he'd like to detach from the target.  */
 static void
-sync_remote_interrupt (int signo)
+vcont_builder_push_action (struct vcont_builder *builder,
+			   ptid_t ptid, int step, enum gdb_signal siggnal)
 {
-  /* If this doesn't work, try more severe steps.  */
-  signal (signo, sync_remote_interrupt_twice);
+  char buf[MAX_ACTION_SIZE + 1];
+  char *endp;
+  size_t rsize;
 
-  gdb_call_async_signal_handler (async_sigint_remote_token, 1);
+  endp = append_resumption (buf, buf + sizeof (buf),
+			    ptid, step, siggnal);
+
+  /* Check whether this new action would fit in the vCont packet along
+     with previous actions.  If not, send what we've got so far and
+     start a new vCont packet.  */
+  rsize = endp - buf;
+  if (rsize > builder->endp - builder->p)
+    {
+      vcont_builder_flush (builder);
+      vcont_builder_restart (builder);
+
+      /* Should now fit.  */
+      gdb_assert (rsize <= builder->endp - builder->p);
+    }
+
+  memcpy (builder->p, buf, rsize);
+  builder->p += rsize;
+  *builder->p = '\0';
 }
 
-/* The user typed ^C twice.  */
+/* to_commit_resume implementation.  */
 
 static void
-sync_remote_interrupt_twice (int signo)
+remote_commit_resume (struct target_ops *ops)
 {
-  signal (signo, ofunc);
-  gdb_call_async_signal_handler (async_sigint_remote_twice_token, 1);
-  signal (signo, sync_remote_interrupt);
+  struct remote_state *rs = get_remote_state ();
+  struct inferior *inf;
+  struct thread_info *tp;
+  int any_process_wildcard;
+  int may_global_wildcard_vcont;
+  struct vcont_builder vcont_builder;
+
+  /* If connected in all-stop mode, we'd send the remote resume
+     request directly from remote_resume.  Likewise if
+     reverse-debugging, as there are no defined vCont actions for
+     reverse execution.  */
+  if (!target_is_non_stop_p () || execution_direction == EXEC_REVERSE)
+    return;
+
+  /* Try to send wildcard actions ("vCont;c" or "vCont;c:pPID.-1")
+     instead of resuming all threads of each process individually.
+     However, if any thread of a process must remain halted, we can't
+     send wildcard resumes and must send one action per thread.
+
+     Care must be taken to not resume threads/processes the server
+     side already told us are stopped, but the core doesn't know about
+     yet, because the events are still in the vStopped notification
+     queue.  For example:
+
+       #1 => vCont s:p1.1;c
+       #2 <= OK
+       #3 <= %Stopped T05 p1.1
+       #4 => vStopped
+       #5 <= T05 p1.2
+       #6 => vStopped
+       #7 <= OK
+       #8 (infrun handles the stop for p1.1 and continues stepping)
+       #9 => vCont s:p1.1;c
+
+     The last vCont above would resume thread p1.2 by mistake, because
+     the server has no idea that the event for p1.2 had not been
+     handled yet.
+
+     The server side must similarly ignore resume actions for the
+     thread that has a pending %Stopped notification (and any other
+     threads with events pending), until GDB acks the notification
+     with vStopped.  Otherwise, e.g., the following case is
+     mishandled:
+
+       #1 => g  (or any other packet)
+       #2 <= [registers]
+       #3 <= %Stopped T05 p1.2
+       #4 => vCont s:p1.1;c
+       #5 <= OK
+
+     Above, the server must not resume thread p1.2.  GDB can't know
+     that p1.2 stopped until it acks the %Stopped notification, and
+     since from GDB's perspective all threads should be running, it
+     sends a "c" action.
+
+     Finally, special care must also be given to handling fork/vfork
+     events.  A (v)fork event actually tells us that two processes
+     stopped -- the parent and the child.  Until we follow the fork,
+     we must not resume the child.  Therefore, if we have a pending
+     fork follow, we must not send a global wildcard resume action
+     (vCont;c).  We can still send process-wide wildcards though.  */
+
+  /* Start by assuming a global wildcard (vCont;c) is possible.  */
+  may_global_wildcard_vcont = 1;
+
+  /* And assume every process is individually wildcard-able too.  */
+  ALL_NON_EXITED_INFERIORS (inf)
+    {
+      if (inf->priv == NULL)
+	inf->priv = XNEW (struct private_inferior);
+      inf->priv->may_wildcard_vcont = 1;
+    }
+
+  /* Check for any pending events (not reported or processed yet) and
+     disable process and global wildcard resumes appropriately.  */
+  check_pending_events_prevent_wildcard_vcont (&may_global_wildcard_vcont);
+
+  ALL_NON_EXITED_THREADS (tp)
+    {
+      /* If a thread of a process is not meant to be resumed, then we
+	 can't wildcard that process.  */
+      if (!tp->executing)
+	{
+	  tp->inf->priv->may_wildcard_vcont = 0;
+
+	  /* And if we can't wildcard a process, we can't wildcard
+	     everything either.  */
+	  may_global_wildcard_vcont = 0;
+	  continue;
+	}
+
+      /* If a thread is the parent of an unfollowed fork, then we
+	 can't do a global wildcard, as that would resume the fork
+	 child.  */
+      if (is_pending_fork_parent_thread (tp))
+	may_global_wildcard_vcont = 0;
+    }
+
+  /* Now let's build the vCont packet(s).  Actions must be appended
+     from narrower to wider scopes (thread -> process -> global).  If
+     we end up with too many actions for a single packet vcont_builder
+     flushes the current vCont packet to the remote side and starts a
+     new one.  */
+  vcont_builder_restart (&vcont_builder);
+
+  /* Threads first.  */
+  ALL_NON_EXITED_THREADS (tp)
+    {
+      struct private_thread_info *remote_thr = tp->priv;
+
+      if (!tp->executing || remote_thr->vcont_resumed)
+	continue;
+
+      gdb_assert (!thread_is_in_step_over_chain (tp));
+
+      if (!remote_thr->last_resume_step
+	  && remote_thr->last_resume_sig == GDB_SIGNAL_0
+	  && tp->inf->priv->may_wildcard_vcont)
+	{
+	  /* We'll send a wildcard resume instead.  */
+	  remote_thr->vcont_resumed = 1;
+	  continue;
+	}
+
+      vcont_builder_push_action (&vcont_builder, tp->ptid,
+				 remote_thr->last_resume_step,
+				 remote_thr->last_resume_sig);
+      remote_thr->vcont_resumed = 1;
+    }
+
+  /* Now check whether we can send any process-wide wildcard.  This is
+     to avoid sending a global wildcard in the case nothing is
+     supposed to be resumed.  */
+  any_process_wildcard = 0;
+
+  ALL_NON_EXITED_INFERIORS (inf)
+    {
+      if (inf->priv->may_wildcard_vcont)
+	{
+	  any_process_wildcard = 1;
+	  break;
+	}
+    }
+
+  if (any_process_wildcard)
+    {
+      /* If all processes are wildcard-able, then send a single "c"
+	 action, otherwise, send an "all (-1) threads of process"
+	 continue action for each running process, if any.  */
+      if (may_global_wildcard_vcont)
+	{
+	  vcont_builder_push_action (&vcont_builder, minus_one_ptid,
+				     0, GDB_SIGNAL_0);
+	}
+      else
+	{
+	  ALL_NON_EXITED_INFERIORS (inf)
+	    {
+	      if (inf->priv->may_wildcard_vcont)
+		{
+		  vcont_builder_push_action (&vcont_builder,
+					     pid_to_ptid (inf->pid),
+					     0, GDB_SIGNAL_0);
+		}
+	    }
+	}
+    }
+
+  vcont_builder_flush (&vcont_builder);
 }
 
+
+
 /* Non-stop version of target_stop.  Uses `vCont;t' to stop a remote
    thread, all threads of a remote process, or all threads of all
    processes.  */
@@ -5265,12 +6130,12 @@ remote_stop_ns (ptid_t ptid)
     error (_("Stopping %s failed: %s"), target_pid_to_str (ptid), rs->buf);
 }
 
-/* All-stop version of target_stop.  Sends a break or a ^C to stop the
-   remote target.  It is undefined which thread of which process
-   reports the stop.  */
+/* All-stop version of target_interrupt.  Sends a break or a ^C to
+   interrupt the remote target.  It is undefined which thread of which
+   process reports the interrupt.  */
 
 static void
-remote_stop_as (ptid_t ptid)
+remote_interrupt_as (void)
 {
   struct remote_state *rs = get_remote_state ();
 
@@ -5286,9 +6151,37 @@ remote_stop_as (ptid_t ptid)
   send_interrupt_sequence ();
 }
 
-/* This is the generic stop called via the target vector.  When a target
-   interrupt is requested, either by the command line or the GUI, we
-   will eventually end up here.  */
+/* Non-stop version of target_interrupt.  Uses `vCtrlC' to interrupt
+   the remote target.  It is undefined which thread of which process
+   reports the interrupt.  Throws an error if the packet is not
+   supported by the server.  */
+
+static void
+remote_interrupt_ns (void)
+{
+  struct remote_state *rs = get_remote_state ();
+  char *p = rs->buf;
+  char *endp = rs->buf + get_remote_packet_size ();
+
+  xsnprintf (p, endp - p, "vCtrlC");
+
+  /* In non-stop, we get an immediate OK reply.  The stop reply will
+     come in asynchronously by notification.  */
+  putpkt (rs->buf);
+  getpkt (&rs->buf, &rs->buf_size, 0);
+
+  switch (packet_ok (rs->buf, &remote_protocol_packets[PACKET_vCtrlC]))
+    {
+    case PACKET_OK:
+      break;
+    case PACKET_UNKNOWN:
+      error (_("No support for interrupting the remote target."));
+    case PACKET_ERROR:
+      error (_("Interrupting target failed: %s"), rs->buf);
+    }
+}
+
+/* Implement the to_stop function for the remote targets.  */
 
 static void
 remote_stop (struct target_ops *self, ptid_t ptid)
@@ -5296,10 +6189,51 @@ remote_stop (struct target_ops *self, pt
   if (remote_debug)
     fprintf_unfiltered (gdb_stdlog, "remote_stop called\n");
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     remote_stop_ns (ptid);
   else
-    remote_stop_as (ptid);
+    {
+      /* We don't currently have a way to transparently pause the
+	 remote target in all-stop mode.  Interrupt it instead.  */
+      remote_interrupt_as ();
+    }
+}
+
+/* Implement the to_interrupt function for the remote targets.  */
+
+static void
+remote_interrupt (struct target_ops *self, ptid_t ptid)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  if (remote_debug)
+    fprintf_unfiltered (gdb_stdlog, "remote_interrupt called\n");
+
+  if (target_is_non_stop_p ())
+    remote_interrupt_ns ();
+  else
+    remote_interrupt_as ();
+}
+
+/* Implement the to_pass_ctrlc function for the remote targets.  */
+
+static void
+remote_pass_ctrlc (struct target_ops *self)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  if (remote_debug)
+    fprintf_unfiltered (gdb_stdlog, "remote_pass_ctrlc called\n");
+
+  /* If we're starting up, we're not fully synced yet.  Quit
+     immediately.  */
+  if (rs->starting_up)
+    quit ();
+  /* If ^C has already been sent once, offer to disconnect.  */
+  else if (rs->ctrlc_pending_p)
+    interrupt_query ();
+  else
+    target_interrupt (inferior_ptid);
 }
 
 /* Ask the user what to do when an interrupt is received.  */
@@ -5307,24 +6241,23 @@ remote_stop (struct target_ops *self, pt
 static void
 interrupt_query (void)
 {
-  target_terminal_ours ();
+  struct remote_state *rs = get_remote_state ();
 
-  if (target_is_async_p ())
-    {
-      signal (SIGINT, handle_sigint);
-      quit ();
-    }
-  else
+  if (rs->waiting_for_stop_reply && rs->ctrlc_pending_p)
     {
-      if (query (_("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? ")))
+      if (query (_("The target is not responding to interrupt requests.\n"
+		   "Stop debugging it? ")))
 	{
 	  remote_unpush_target ();
-	  quit ();
+	  throw_error (TARGET_CLOSE_ERROR, _("Disconnected from target."));
 	}
     }
-
-  target_terminal_inferior ();
+  else
+    {
+      if (query (_("Interrupted while waiting for the program.\n"
+		   "Give up waiting? ")))
+	quit ();
+    }
 }
 
 /* Enable/disable target terminal ownership.  Most targets can use
@@ -5335,10 +6268,6 @@ Give up (and stop debugging it)? ")))
 static void
 remote_terminal_inferior (struct target_ops *self)
 {
-  if (!target_async_permitted)
-    /* Nothing to do.  */
-    return;
-
   /* FIXME: cagney/1999-09-27: Make calls to target_terminal_*()
      idempotent.  The event-loop GDB talking to an asynchronous target
      with a synchronous command calls this function from both
@@ -5347,9 +6276,7 @@ remote_terminal_inferior (struct target_
      can go away.  */
   if (!remote_async_terminal_ours_p)
     return;
-  delete_file_handler (input_fd);
   remote_async_terminal_ours_p = 0;
-  async_initialize_sigint_signal_handler ();
   /* NOTE: At this point we could also register our selves as the
      recipient of all input.  Any characters typed could then be
      passed on down to the target.  */
@@ -5358,15 +6285,9 @@ remote_terminal_inferior (struct target_
 static void
 remote_terminal_ours (struct target_ops *self)
 {
-  if (!target_async_permitted)
-    /* Nothing to do.  */
-    return;
-
   /* See FIXME in remote_terminal_inferior.  */
   if (remote_async_terminal_ours_p)
     return;
-  async_cleanup_sigint_signal_handler (NULL);
-  add_file_handler (input_fd, stdin_event_handler, 0);
   remote_async_terminal_ours_p = 1;
 }
 
@@ -5390,7 +6311,7 @@ remote_console_output (char *msg)
 typedef struct cached_reg
 {
   int num;
-  gdb_byte data[MAX_REGISTER_SIZE];
+  gdb_byte *data;
 } cached_reg_t;
 
 DEF_VEC_O(cached_reg_t);
@@ -5439,6 +6360,14 @@ stop_reply_xfree (struct stop_reply *r)
   notif_event_xfree ((struct notif_event *) r);
 }
 
+/* Return the length of the stop reply queue.  */
+
+static int
+stop_reply_queue_length (void)
+{
+  return QUEUE_length (stop_reply_p, stop_reply_queue);
+}
+
 static void
 remote_notif_stop_parse (struct notif_client *self, char *buf,
 			 struct notif_event *event)
@@ -5453,7 +6382,7 @@ remote_notif_stop_ack (struct notif_clie
   struct stop_reply *stop_reply = (struct stop_reply *) event;
 
   /* acknowledge */
-  putpkt ((char *) self->ack_command);
+  putpkt (self->ack_command);
 
   if (stop_reply->ws.kind == TARGET_WAITKIND_IGNORE)
       /* We got an unknown stop reply.  */
@@ -5478,6 +6407,13 @@ static void
 stop_reply_dtr (struct notif_event *event)
 {
   struct stop_reply *r = (struct stop_reply *) event;
+  cached_reg_t *reg;
+  int ix;
+
+  for (ix = 0;
+       VEC_iterate (cached_reg_t, r->regcache, ix, reg);
+       ix++)
+    xfree (reg->data);
 
   VEC_free (cached_reg_t, r->regcache);
 }
@@ -5485,8 +6421,8 @@ stop_reply_dtr (struct notif_event *even
 static struct notif_event *
 remote_notif_stop_alloc_reply (void)
 {
-  struct notif_event *r
-    = (struct notif_event *) XNEW (struct stop_reply);
+  /* We cast to a pointer to the "base class".  */
+  struct notif_event *r = (struct notif_event *) XNEW (struct stop_reply);
 
   r->dtr = stop_reply_dtr;
 
@@ -5514,7 +6450,7 @@ struct queue_iter_param
   struct stop_reply *output;
 };
 
-/* Determine if THREAD is a pending fork parent thread.  ARG contains
+/* Determine if THREAD_PTID is a pending fork parent thread.  ARG contains
    the pid of the process that owns the threads we want to check, or
    -1 if we want to check all threads.  */
 
@@ -5532,6 +6468,29 @@ is_pending_fork_parent (struct target_wa
   return 0;
 }
 
+/* Return the thread's pending status used to determine whether the
+   thread is a fork parent stopped at a fork event.  */
+
+static struct target_waitstatus *
+thread_pending_fork_status (struct thread_info *thread)
+{
+  if (thread->suspend.waitstatus_pending_p)
+    return &thread->suspend.waitstatus;
+  else
+    return &thread->pending_follow;
+}
+
+/* Determine if THREAD is a pending fork parent thread.  */
+
+static int
+is_pending_fork_parent_thread (struct thread_info *thread)
+{
+  struct target_waitstatus *ws = thread_pending_fork_status (thread);
+  int pid = -1;
+
+  return is_pending_fork_parent (ws, pid, thread->ptid);
+}
+
 /* Check whether EVENT is a fork event, and if it is, remove the
    fork child from the context list passed in DATA.  */
 
@@ -5541,14 +6500,14 @@ remove_child_of_pending_fork (QUEUE (sto
 			      stop_reply_p event,
 			      void *data)
 {
-  struct queue_iter_param *param = data;
-  struct threads_listing_context *context = param->input;
+  struct queue_iter_param *param = (struct queue_iter_param *) data;
+  struct threads_listing_context *context
+    = (struct threads_listing_context *) param->input;
 
   if (event->ws.kind == TARGET_WAITKIND_FORKED
-      || event->ws.kind == TARGET_WAITKIND_VFORKED)
-    {
-      threads_listing_context_remove (&event->ws, context);
-    }
+      || event->ws.kind == TARGET_WAITKIND_VFORKED
+      || event->ws.kind == TARGET_WAITKIND_THREAD_EXITED)
+    threads_listing_context_remove (&event->ws, context);
 
   return 1;
 }
@@ -5571,7 +6530,7 @@ remove_new_fork_children (struct threads
      fork child threads from the CONTEXT list.  */
   ALL_NON_EXITED_THREADS (thread)
     {
-      struct target_waitstatus *ws = &thread->pending_follow;
+      struct target_waitstatus *ws = thread_pending_fork_status (thread);
 
       if (is_pending_fork_parent (ws, pid, thread->ptid))
 	{
@@ -5589,6 +6548,56 @@ remove_new_fork_children (struct threads
 		 remove_child_of_pending_fork, &param);
 }
 
+/* Check whether EVENT would prevent a global or process wildcard
+   vCont action.  */
+
+static int
+check_pending_event_prevents_wildcard_vcont_callback
+  (QUEUE (stop_reply_p) *q,
+   QUEUE_ITER (stop_reply_p) *iter,
+   stop_reply_p event,
+   void *data)
+{
+  struct inferior *inf;
+  int *may_global_wildcard_vcont = (int *) data;
+
+  if (event->ws.kind == TARGET_WAITKIND_NO_RESUMED
+      || event->ws.kind == TARGET_WAITKIND_NO_HISTORY)
+    return 1;
+
+  if (event->ws.kind == TARGET_WAITKIND_FORKED
+      || event->ws.kind == TARGET_WAITKIND_VFORKED)
+    *may_global_wildcard_vcont = 0;
+
+  inf = find_inferior_ptid (event->ptid);
+
+  /* This may be the first time we heard about this process.
+     Regardless, we must not do a global wildcard resume, otherwise
+     we'd resume this process too.  */
+  *may_global_wildcard_vcont = 0;
+  if (inf != NULL)
+    inf->priv->may_wildcard_vcont = 0;
+
+  return 1;
+}
+
+/* Check whether any event pending in the vStopped queue would prevent
+   a global or process wildcard vCont action.  Clear
+   *may_global_wildcard if we can't do a global wildcard (vCont;c),
+   and clear the event inferior's may_wildcard_vcont flag if we can't
+   do a process-wide wildcard resume (vCont;c:pPID.-1).  */
+
+static void
+check_pending_events_prevent_wildcard_vcont (int *may_global_wildcard)
+{
+  struct notif_client *notif = &notif_client_stop;
+
+  remote_notif_get_pending_events (notif);
+  QUEUE_iterate (stop_reply_p, stop_reply_queue,
+		 check_pending_event_prevents_wildcard_vcont_callback,
+		 may_global_wildcard);
+}
+
 /* Remove stop replies in the queue if its pid is equal to the given
    inferior's pid.  */
 
@@ -5598,8 +6607,8 @@ remove_stop_reply_for_inferior (QUEUE (s
 				stop_reply_p event,
 				void *data)
 {
-  struct queue_iter_param *param = data;
-  struct inferior *inf = param->input;
+  struct queue_iter_param *param = (struct queue_iter_param *) data;
+  struct inferior *inf = (struct inferior *) param->input;
 
   if (ptid_get_pid (event->ptid) == inf->pid)
     {
@@ -5615,7 +6624,6 @@ remove_stop_reply_for_inferior (QUEUE (s
 static void
 discard_pending_stop_replies (struct inferior *inf)
 {
-  int i;
   struct queue_iter_param param;
   struct stop_reply *reply;
   struct remote_state *rs = get_remote_state ();
@@ -5652,8 +6660,8 @@ remove_stop_reply_of_remote_state (QUEUE
 				   stop_reply_p event,
 				   void *data)
 {
-  struct queue_iter_param *param = data;
-  struct remote_state *rs = param->input;
+  struct queue_iter_param *param = (struct queue_iter_param *) data;
+  struct remote_state *rs = (struct remote_state *) param->input;
 
   if (event->rs == rs)
     {
@@ -5687,8 +6695,8 @@ remote_notif_remove_once_on_match (QUEUE
 				   stop_reply_p event,
 				   void *data)
 {
-  struct queue_iter_param *param = data;
-  ptid_t *ptid = param->input;
+  struct queue_iter_param *param = (struct queue_iter_param *) data;
+  ptid_t *ptid = (ptid_t *) param->input;
 
   if (ptid_match (event->ptid, *ptid))
     {
@@ -5763,7 +6771,7 @@ stop_reply_match_ptid_and_ws (QUEUE (sto
 			      struct stop_reply *event,
 			      void *data)
 {
-  ptid_t *ptid = data;
+  ptid_t *ptid = (ptid_t *) data;
 
   return !(ptid_equal (*ptid, event->ptid)
 	   && event->ws.kind == TARGET_WAITKIND_STOPPED);
@@ -5778,14 +6786,16 @@ peek_stop_reply (ptid_t ptid)
 			 stop_reply_match_ptid_and_ws, &ptid);
 }
 
-/* Skip PACKET until the next semi-colon (or end of string).  */
+/* Helper for remote_parse_stop_reply.  Return nonzero if the substring
+   starting with P and ending with PEND matches PREFIX.  */
 
-static char *
-skip_to_semicolon (char *p)
+static int
+strprefix (const char *p, const char *pend, const char *prefix)
 {
-  while (*p != '\0' && *p != ';')
-    p++;
-  return p;
+  for ( ; p < pend; p++, prefix++)
+    if (*p != *prefix)
+      return 0;
+  return *prefix == '\0';
 }
 
 /* Parse the stop reply in BUF.  Either the function succeeds, and the
@@ -5797,6 +6807,7 @@ remote_parse_stop_reply (char *buf, stru
   struct remote_arch_state *rsa = get_remote_arch_state ();
   ULONGEST addr;
   char *p;
+  int skipregs = 0;
 
   event->ptid = null_ptid;
   event->rs = get_remote_state ();
@@ -5839,17 +6850,33 @@ Packet: '%s'\n"),
 	     the server only sends such a packet if it knows the
 	     client understands it.  */
 
-	  if (strncmp (p, "thread", p1 - p) == 0)
+	  if (strprefix (p, p1, "thread"))
 	    event->ptid = read_ptid (++p1, &p);
-	  else if ((strncmp (p, "watch", p1 - p) == 0)
-		   || (strncmp (p, "rwatch", p1 - p) == 0)
-		   || (strncmp (p, "awatch", p1 - p) == 0))
+	  else if (strprefix (p, p1, "syscall_entry"))
+	    {
+	      ULONGEST sysno;
+
+	      event->ws.kind = TARGET_WAITKIND_SYSCALL_ENTRY;
+	      p = unpack_varlen_hex (++p1, &sysno);
+	      event->ws.value.syscall_number = (int) sysno;
+	    }
+	  else if (strprefix (p, p1, "syscall_return"))
+	    {
+	      ULONGEST sysno;
+
+	      event->ws.kind = TARGET_WAITKIND_SYSCALL_RETURN;
+	      p = unpack_varlen_hex (++p1, &sysno);
+	      event->ws.value.syscall_number = (int) sysno;
+	    }
+	  else if (strprefix (p, p1, "watch")
+		   || strprefix (p, p1, "rwatch")
+		   || strprefix (p, p1, "awatch"))
 	    {
 	      event->stop_reason = TARGET_STOPPED_BY_WATCHPOINT;
 	      p = unpack_varlen_hex (++p1, &addr);
 	      event->watch_data_address = (CORE_ADDR) addr;
 	    }
-	  else if (strncmp (p, "swbreak", p1 - p) == 0)
+	  else if (strprefix (p, p1, "swbreak"))
 	    {
 	      event->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
 
@@ -5861,9 +6888,9 @@ Packet: '%s'\n"),
 	      /* The value part is documented as "must be empty",
 		 though we ignore it, in case we ever decide to make
 		 use of it in a backward compatible way.  */
-	      p = skip_to_semicolon (p1 + 1);
+	      p = strchrnul (p1 + 1, ';');
 	    }
-	  else if (strncmp (p, "hwbreak", p1 - p) == 0)
+	  else if (strprefix (p, p1, "hwbreak"))
 	    {
 	      event->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
 
@@ -5873,47 +6900,83 @@ Packet: '%s'\n"),
 		error (_("Unexpected hwbreak stop reason"));
 
 	      /* See above.  */
-	      p = skip_to_semicolon (p1 + 1);
+	      p = strchrnul (p1 + 1, ';');
 	    }
-	  else if (strncmp (p, "library", p1 - p) == 0)
+	  else if (strprefix (p, p1, "library"))
 	    {
 	      event->ws.kind = TARGET_WAITKIND_LOADED;
-	      p = skip_to_semicolon (p1 + 1);
+	      p = strchrnul (p1 + 1, ';');
 	    }
-	  else if (strncmp (p, "replaylog", p1 - p) == 0)
+	  else if (strprefix (p, p1, "replaylog"))
 	    {
 	      event->ws.kind = TARGET_WAITKIND_NO_HISTORY;
 	      /* p1 will indicate "begin" or "end", but it makes
 		 no difference for now, so ignore it.  */
-	      p = skip_to_semicolon (p1 + 1);
+	      p = strchrnul (p1 + 1, ';');
 	    }
-	  else if (strncmp (p, "core", p1 - p) == 0)
+	  else if (strprefix (p, p1, "core"))
 	    {
 	      ULONGEST c;
 
 	      p = unpack_varlen_hex (++p1, &c);
 	      event->core = c;
 	    }
-	  else if (strncmp (p, "fork", p1 - p) == 0)
+	  else if (strprefix (p, p1, "fork"))
 	    {
 	      event->ws.value.related_pid = read_ptid (++p1, &p);
 	      event->ws.kind = TARGET_WAITKIND_FORKED;
 	    }
-	  else if (strncmp (p, "vfork", p1 - p) == 0)
+	  else if (strprefix (p, p1, "vfork"))
 	    {
 	      event->ws.value.related_pid = read_ptid (++p1, &p);
 	      event->ws.kind = TARGET_WAITKIND_VFORKED;
 	    }
-	  else if (strncmp (p, "vforkdone", p1 - p) == 0)
+	  else if (strprefix (p, p1, "vforkdone"))
 	    {
 	      event->ws.kind = TARGET_WAITKIND_VFORK_DONE;
-	      p = skip_to_semicolon (p1 + 1);
+	      p = strchrnul (p1 + 1, ';');
+	    }
+	  else if (strprefix (p, p1, "exec"))
+	    {
+	      ULONGEST ignored;
+	      char pathname[PATH_MAX];
+	      int pathlen;
+
+	      /* Determine the length of the execd pathname.  */
+	      p = unpack_varlen_hex (++p1, &ignored);
+	      pathlen = (p - p1) / 2;
+
+	      /* Save the pathname for event reporting and for
+		 the next run command.  */
+	      hex2bin (p1, (gdb_byte *) pathname, pathlen);
+	      pathname[pathlen] = '\0';
+
+	      /* This is freed during event handling.  */
+	      event->ws.value.execd_pathname = xstrdup (pathname);
+	      event->ws.kind = TARGET_WAITKIND_EXECD;
+
+	      /* Skip the registers included in this packet, since
+		 they may be for an architecture different from the
+		 one used by the original program.  */
+	      skipregs = 1;
+	    }
+	  else if (strprefix (p, p1, "create"))
+	    {
+	      event->ws.kind = TARGET_WAITKIND_THREAD_CREATED;
+	      p = strchrnul (p1 + 1, ';');
 	    }
 	  else
 	    {
 	      ULONGEST pnum;
 	      char *p_temp;
 
+	      if (skipregs)
+		{
+		  p = strchrnul (p1 + 1, ';');
+		  p++;
+		  continue;
+		}
+
 	      /* Maybe a real ``P'' register number.  */
 	      p_temp = unpack_varlen_hex (p, &pnum);
 	      /* If the first invalid character is the colon, we got a
@@ -5923,6 +6986,7 @@ Packet: '%s'\n"),
 		{
 		  struct packet_reg *reg = packet_reg_from_pnum (rsa, pnum);
 		  cached_reg_t cached_reg;
+		  struct gdbarch *gdbarch = target_gdbarch ();
 
 		  if (reg == NULL)
 		    error (_("Remote sent bad register number %s: %s\n\
@@ -5930,14 +6994,14 @@ Packet: '%s'\n"),
 			   hex_string (pnum), p, buf);
 
 		  cached_reg.num = reg->regnum;
+		  cached_reg.data = (gdb_byte *)
+		    xmalloc (register_size (gdbarch, reg->regnum));
 
 		  p = p1 + 1;
 		  fieldsize = hex2bin (p, cached_reg.data,
-				       register_size (target_gdbarch (),
-						      reg->regnum));
+				       register_size (gdbarch, reg->regnum));
 		  p += 2 * fieldsize;
-		  if (fieldsize < register_size (target_gdbarch (),
-						 reg->regnum))
+		  if (fieldsize < register_size (gdbarch, reg->regnum))
 		    warning (_("Remote reply is too short: %s"), buf);
 
 		  VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
@@ -5946,7 +7010,7 @@ Packet: '%s'\n"),
 		{
 		  /* Not a number.  Silently skip unknown optional
 		     info.  */
-		  p = skip_to_semicolon (p1 + 1);
+		  p = strchrnul (p1 + 1, ';');
 		}
 	    }
 
@@ -5972,6 +7036,19 @@ Packet: '%s'\n"),
 	  event->ws.value.sig = GDB_SIGNAL_UNKNOWN;
       }
       break;
+    case 'w':		/* Thread exited.  */
+      {
+	char *p;
+	ULONGEST value;
+
+	event->ws.kind = TARGET_WAITKIND_THREAD_EXITED;
+	p = unpack_varlen_hex (&buf[1], &value);
+	event->ws.value.integer = value;
+	if (*p != ';')
+	  error (_("stop reply packet badly formatted: %s"), buf);
+	event->ptid = read_ptid (++p, NULL);
+	break;
+      }
     case 'W':		/* Target exited.  */
     case 'X':
       {
@@ -6026,9 +7103,13 @@ Packet: '%s'\n"),
 	event->ptid = pid_to_ptid (pid);
       }
       break;
+    case 'N':
+      event->ws.kind = TARGET_WAITKIND_NO_RESUMED;
+      event->ptid = minus_one_ptid;
+      break;
     }
 
-  if (non_stop && ptid_equal (event->ptid, null_ptid))
+  if (target_is_non_stop_p () && ptid_equal (event->ptid, null_ptid))
     error (_("No process or thread specified in stop reply: %s"), buf);
 }
 
@@ -6127,9 +7208,10 @@ process_stop_reply (struct stop_reply *s
     ptid = inferior_ptid;
 
   if (status->kind != TARGET_WAITKIND_EXITED
-      && status->kind != TARGET_WAITKIND_SIGNALLED)
+      && status->kind != TARGET_WAITKIND_SIGNALLED
+      && status->kind != TARGET_WAITKIND_NO_RESUMED)
     {
-      struct remote_state *rs = get_remote_state ();
+      struct private_thread_info *remote_thr;
 
       /* Expedited registers.  */
       if (stop_reply->regcache)
@@ -6140,17 +7222,22 @@ process_stop_reply (struct stop_reply *s
 	  int ix;
 
 	  for (ix = 0;
-	       VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
+	       VEC_iterate (cached_reg_t, stop_reply->regcache, ix, reg);
 	       ix++)
+	  {
 	    regcache_raw_supply (regcache, reg->num, reg->data);
+	    xfree (reg->data);
+	  }
+
 	  VEC_free (cached_reg_t, stop_reply->regcache);
 	}
 
-      rs->stop_reason = stop_reply->stop_reason;
-      rs->remote_watch_data_address = stop_reply->watch_data_address;
-
       remote_notice_new_inferior (ptid, 0);
-      demand_private_info (ptid)->core = stop_reply->core;
+      remote_thr = get_private_info_ptid (ptid);
+      remote_thr->core = stop_reply->core;
+      remote_thr->stop_reason = stop_reply->stop_reason;
+      remote_thr->watch_data_address = stop_reply->watch_data_address;
+      remote_thr->vcont_resumed = 0;
     }
 
   stop_reply_xfree (stop_reply);
@@ -6242,17 +7329,13 @@ remote_wait_as (ptid_t ptid, struct targ
     {
       int ret;
       int is_notif;
+      int forever = ((options & TARGET_WNOHANG) == 0
+		     && wait_forever_enabled_p);
 
-      if (!target_is_async_p ())
+      if (!rs->waiting_for_stop_reply)
 	{
-	  ofunc = signal (SIGINT, sync_remote_interrupt);
-	  /* If the user hit C-c before this packet, or between packets,
-	     pretend that it was hit right here.  */
-	  if (check_quit_flag ())
-	    {
-	      clear_quit_flag ();
-	      sync_remote_interrupt (SIGINT);
-	    }
+	  status->kind = TARGET_WAITKIND_NO_RESUMED;
+	  return minus_one_ptid;
 	}
 
       /* FIXME: cagney/1999-09-27: If we're in async mode we should
@@ -6260,24 +7343,19 @@ remote_wait_as (ptid_t ptid, struct targ
 	 However, before we do that we need to ensure that the caller
 	 knows how to take the target into/out of async mode.  */
       ret = getpkt_or_notif_sane (&rs->buf, &rs->buf_size,
-				  wait_forever_enabled_p, &is_notif);
-
-      if (!target_is_async_p ())
-	signal (SIGINT, ofunc);
+				  forever, &is_notif);
 
       /* GDB gets a notification.  Return to core as this event is
 	 not interesting.  */
       if (ret != -1 && is_notif)
 	return minus_one_ptid;
+
+      if (ret == -1 && (options & TARGET_WNOHANG) != 0)
+	return minus_one_ptid;
     }
 
   buf = rs->buf;
 
-  rs->stop_reason = TARGET_STOPPED_BY_NO_REASON;
-
-  /* We got something.  */
-  rs->waiting_for_stop_reply = 0;
-
   /* Assume that the target has acknowledged Ctrl-C unless we receive
      an 'F' or 'O' packet.  */
   if (buf[0] != 'F' && buf[0] != 'O')
@@ -6288,17 +7366,32 @@ remote_wait_as (ptid_t ptid, struct targ
     case 'E':		/* Error of some sort.	*/
       /* We're out of sync with the target now.  Did it continue or
 	 not?  Not is more likely, so report a stop.  */
+      rs->waiting_for_stop_reply = 0;
+
       warning (_("Remote failure reply: %s"), buf);
       status->kind = TARGET_WAITKIND_STOPPED;
       status->value.sig = GDB_SIGNAL_0;
       break;
     case 'F':		/* File-I/O request.  */
+      /* GDB may access the inferior memory while handling the File-I/O
+	 request, but we don't want GDB accessing memory while waiting
+	 for a stop reply.  See the comments in putpkt_binary.  Set
+	 waiting_for_stop_reply to 0 temporarily.  */
+      rs->waiting_for_stop_reply = 0;
       remote_fileio_request (buf, rs->ctrlc_pending_p);
       rs->ctrlc_pending_p = 0;
+      /* GDB handled the File-I/O request, and the target is running
+	 again.  Keep waiting for events.  */
+      rs->waiting_for_stop_reply = 1;
       break;
-    case 'T': case 'S': case 'X': case 'W':
+    case 'N': case 'T': case 'S': case 'X': case 'W':
       {
-	struct stop_reply *stop_reply
+	struct stop_reply *stop_reply;
+
+	/* There is a stop reply to handle.  */
+	rs->waiting_for_stop_reply = 0;
+
+	stop_reply
 	  = (struct stop_reply *) remote_notif_parse (&notif_client_stop,
 						      rs->buf);
 
@@ -6307,10 +7400,6 @@ remote_wait_as (ptid_t ptid, struct targ
       }
     case 'O':		/* Console output.  */
       remote_console_output (buf + 1);
-
-      /* The target didn't really stop; keep waiting.  */
-      rs->waiting_for_stop_reply = 1;
-
       break;
     case '\0':
       if (rs->last_sent_signal != GDB_SIGNAL_0)
@@ -6324,23 +7413,19 @@ remote_wait_as (ptid_t ptid, struct targ
 	  rs->last_sent_signal = GDB_SIGNAL_0;
 	  target_terminal_inferior ();
 
-	  strcpy ((char *) buf, rs->last_sent_step ? "s" : "c");
-	  putpkt ((char *) buf);
-
-	  /* We just told the target to resume, so a stop reply is in
-	     order.  */
-	  rs->waiting_for_stop_reply = 1;
+	  strcpy (buf, rs->last_sent_step ? "s" : "c");
+	  putpkt (buf);
 	  break;
 	}
       /* else fallthrough */
     default:
       warning (_("Invalid remote reply: %s"), buf);
-      /* Keep waiting.  */
-      rs->waiting_for_stop_reply = 1;
       break;
     }
 
-  if (status->kind == TARGET_WAITKIND_IGNORE)
+  if (status->kind == TARGET_WAITKIND_NO_RESUMED)
+    return minus_one_ptid;
+  else if (status->kind == TARGET_WAITKIND_IGNORE)
     {
       /* Nothing interesting happened.  If we're doing a non-blocking
 	 poll, we're done.  Otherwise, go back to waiting.  */
@@ -6373,7 +7458,7 @@ remote_wait (struct target_ops *ops,
 {
   ptid_t event_ptid;
 
-  if (non_stop)
+  if (target_is_non_stop_p ())
     event_ptid = remote_wait_ns (ptid, status, options);
   else
     event_ptid = remote_wait_as (ptid, status, options);
@@ -6394,9 +7479,10 @@ remote_wait (struct target_ops *ops,
 static int
 fetch_register_using_p (struct regcache *regcache, struct packet_reg *reg)
 {
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct remote_state *rs = get_remote_state ();
   char *buf, *p;
-  char regp[MAX_REGISTER_SIZE];
+  gdb_byte *regp = (gdb_byte *) alloca (register_size (gdbarch, reg->regnum));
   int i;
 
   if (packet_support (PACKET_p) == PACKET_DISABLE)
@@ -6511,21 +7597,34 @@ process_g_packet (struct regcache *regca
      the 'p' packet must be used.  */
   if (buf_len < 2 * rsa->sizeof_g_packet)
     {
-      rsa->sizeof_g_packet = buf_len / 2;
+      long sizeof_g_packet = buf_len / 2;
 
       for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
 	{
+	  long offset = rsa->regs[i].offset;
+	  long reg_size = register_size (gdbarch, i);
+
 	  if (rsa->regs[i].pnum == -1)
 	    continue;
 
-	  if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
+	  if (offset >= sizeof_g_packet)
 	    rsa->regs[i].in_g_packet = 0;
+	  else if (offset + reg_size > sizeof_g_packet)
+	    error (_("Truncated register %d in remote 'g' packet"), i);
 	  else
 	    rsa->regs[i].in_g_packet = 1;
 	}
+
+      /* Looks valid enough, we can assume this is the correct length
+         for a 'g' packet.  It's important not to adjust
+         rsa->sizeof_g_packet if we have truncated registers otherwise
+         this "if" won't be run the next time the method is called
+         with a packet of the same size and one of the internal errors
+         below will trigger instead.  */
+      rsa->sizeof_g_packet = sizeof_g_packet;
     }
 
-  regs = alloca (rsa->sizeof_g_packet);
+  regs = (char *) alloca (rsa->sizeof_g_packet);
 
   /* Unimplemented registers read as all bits zero.  */
   memset (regs, 0, rsa->sizeof_g_packet);
@@ -6552,10 +7651,11 @@ process_g_packet (struct regcache *regca
   for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
     {
       struct packet_reg *r = &rsa->regs[i];
+      long reg_size = register_size (gdbarch, i);
 
       if (r->in_g_packet)
 	{
-	  if (r->offset * 2 >= strlen (rs->buf))
+	  if ((r->offset + reg_size) * 2 > strlen (rs->buf))
 	    /* This shouldn't happen - we adjusted in_g_packet above.  */
 	    internal_error (__FILE__, __LINE__,
 			    _("unexpected end of 'g' packet reply"));
@@ -6659,7 +7759,6 @@ remote_prepare_to_store (struct target_o
 {
   struct remote_arch_state *rsa = get_remote_arch_state ();
   int i;
-  gdb_byte buf[MAX_REGISTER_SIZE];
 
   /* Make sure the entire registers array is valid.  */
   switch (packet_support (PACKET_P))
@@ -6669,7 +7768,7 @@ remote_prepare_to_store (struct target_o
       /* Make sure all the necessary registers are cached.  */
       for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
 	if (rsa->regs[i].in_g_packet)
-	  regcache_raw_read (regcache, rsa->regs[i].regnum, buf);
+	  regcache_raw_update (regcache, rsa->regs[i].regnum);
       break;
     case PACKET_ENABLE:
       break;
@@ -6687,7 +7786,7 @@ store_register_using_P (const struct reg
   struct remote_state *rs = get_remote_state ();
   /* Try storing a single register.  */
   char *buf = rs->buf;
-  gdb_byte regp[MAX_REGISTER_SIZE];
+  gdb_byte *regp = (gdb_byte *) alloca (register_size (gdbarch, reg->regnum));
   char *p;
 
   if (packet_support (PACKET_P) == PACKET_DISABLE)
@@ -6733,7 +7832,7 @@ store_registers_using_G (const struct re
   {
     int i;
 
-    regs = alloca (rsa->sizeof_g_packet);
+    regs = (gdb_byte *) alloca (rsa->sizeof_g_packet);
     memset (regs, 0, rsa->sizeof_g_packet);
     for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
       {
@@ -6815,7 +7914,7 @@ hexnumlen (ULONGEST num)
   for (i = 0; num != 0; i++)
     num >>= 4;
 
-  return max (i, 1);
+  return std::max (i, 1);
 }
 
 /* Set BUF to the minimum number of hex digits representing NUM.  */
@@ -7020,18 +8119,22 @@ remote_write_bytes_aux (const char *head
   if (packet_format == 'X')
     {
       /* Best guess at number of bytes that will fit.  */
-      todo_units = min (len_units, payload_capacity_bytes / unit_size);
+      todo_units = std::min (len_units,
+			     (ULONGEST) payload_capacity_bytes / unit_size);
       if (use_length)
 	payload_capacity_bytes -= hexnumlen (todo_units);
-      todo_units = min (todo_units, payload_capacity_bytes / unit_size);
+      todo_units = std::min (todo_units, payload_capacity_bytes / unit_size);
     }
   else
     {
       /* Number of bytes that will fit.  */
-      todo_units = min (len_units, (payload_capacity_bytes / unit_size) / 2);
+      todo_units
+	= std::min (len_units,
+		    (ULONGEST) (payload_capacity_bytes / unit_size) / 2);
       if (use_length)
 	payload_capacity_bytes -= hexnumlen (todo_units);
-      todo_units = min (todo_units, (payload_capacity_bytes / unit_size) / 2);
+      todo_units = std::min (todo_units,
+			     (payload_capacity_bytes / unit_size) / 2);
     }
 
   if (todo_units <= 0)
@@ -7190,7 +8293,8 @@ remote_read_bytes_1 (CORE_ADDR memaddr, 
      get_memory_packet_size ensures this.  */
 
   /* Number of units that will fit.  */
-  todo_units = min (len_units, (buf_size_bytes / unit_size) / 2);
+  todo_units = std::min (len_units,
+			 (ULONGEST) (buf_size_bytes / unit_size) / 2);
 
   /* Construct "m"<memaddr>","<len>".  */
   memaddr = remote_address_masked (memaddr);
@@ -7477,16 +8581,29 @@ unpush_and_perror (const char *string)
 	       safe_strerror (saved_errno));
 }
 
-/* Read a single character from the remote end.  */
+/* Read a single character from the remote end.  The current quit
+   handler is overridden to avoid quitting in the middle of packet
+   sequence, as that would break communication with the remote server.
+   See remote_serial_quit_handler for more detail.  */
 
 static int
 readchar (int timeout)
 {
   int ch;
   struct remote_state *rs = get_remote_state ();
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup_override_quit_handler (remote_serial_quit_handler);
+
+  rs->got_ctrlc_during_io = 0;
 
   ch = serial_readchar (rs->remote_desc, timeout);
 
+  if (rs->got_ctrlc_during_io)
+    set_quit_flag ();
+
+  do_cleanups (old_chain);
+
   if (ch >= 0)
     return ch;
 
@@ -7507,18 +8624,31 @@ readchar (int timeout)
 }
 
 /* Wrapper for serial_write that closes the target and throws if
-   writing fails.  */
+   writing fails.  The current quit handler is overridden to avoid
+   quitting in the middle of packet sequence, as that would break
+   communication with the remote server.  See
+   remote_serial_quit_handler for more detail.  */
 
 static void
 remote_serial_write (const char *str, int len)
 {
   struct remote_state *rs = get_remote_state ();
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup_override_quit_handler (remote_serial_quit_handler);
+
+  rs->got_ctrlc_during_io = 0;
 
   if (serial_write (rs->remote_desc, str, len))
     {
       unpush_and_perror (_("Remote communication error.  "
 			   "Target disconnected."));
     }
+
+  if (rs->got_ctrlc_during_io)
+    set_quit_flag ();
+
+  do_cleanups (old_chain);
 }
 
 /* Send the command in *BUF to the remote machine, and read the reply
@@ -7537,25 +8667,16 @@ remote_send (char **buf,
     error (_("Remote failure reply: %s"), *buf);
 }
 
-/* Return a pointer to an xmalloc'ed string representing an escaped
-   version of BUF, of len N.  E.g. \n is converted to \\n, \t to \\t,
-   etc.  The caller is responsible for releasing the returned
-   memory.  */
+/* Return a string representing an escaped version of BUF, of len N.
+   E.g. \n is converted to \\n, \t to \\t, etc.  */
 
-static char *
+static std::string
 escape_buffer (const char *buf, int n)
 {
-  struct cleanup *old_chain;
-  struct ui_file *stb;
-  char *str;
+  string_file stb;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
-
-  fputstrn_unfiltered (buf, n, '\\', stb);
-  str = ui_file_xstrdup (stb, NULL);
-  do_cleanups (old_chain);
-  return str;
+  stb.putstrn (buf, n, '\\');
+  return std::move (stb.string ());
 }
 
 /* Display a null-terminated packet on stdout, for debugging, using C
@@ -7587,12 +8708,12 @@ putpkt_binary (const char *buf, int cnt)
   struct remote_state *rs = get_remote_state ();
   int i;
   unsigned char csum = 0;
-  char *buf2 = alloca (cnt + 6);
+  char *buf2 = (char *) xmalloc (cnt + 6);
+  struct cleanup *old_chain = make_cleanup (xfree, buf2);
 
   int ch;
   int tcount = 0;
   char *p;
-  char *message;
 
   /* Catch cases like trying to read memory or listing threads while
      we're waiting for a stop reply.  The remote server wouldn't be
@@ -7601,7 +8722,9 @@ putpkt_binary (const char *buf, int cnt)
      case it's not possible to issue a command while the target is
      running.  This is not a problem in non-stop mode, because in that
      case, the stub is always ready to process serial input.  */
-  if (!non_stop && target_is_async_p () && rs->waiting_for_stop_reply)
+  if (!target_is_non_stop_p ()
+      && target_is_async_p ()
+      && rs->waiting_for_stop_reply)
     {
       error (_("Cannot execute this command while the target is running.\n"
 	       "Use the \"interrupt\" command to stop the target\n"
@@ -7629,21 +8752,30 @@ putpkt_binary (const char *buf, int cnt)
 
   /* Send it over and over until we get a positive ack.  */
 
-  while (1)
-    {
-      int started_error_output = 0;
+  while (1)
+    {
+      int started_error_output = 0;
+
+      if (remote_debug)
+	{
+	  *p = '\0';
+
+	  int len = (int) (p - buf2);
+
+	  std::string str
+	    = escape_buffer (buf2, std::min (len, REMOTE_DEBUG_MAX_CHAR));
+
+	  fprintf_unfiltered (gdb_stdlog, "Sending packet: %s", str.c_str ());
+
+	  if (str.length () > REMOTE_DEBUG_MAX_CHAR)
+	    {
+	      fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
+				  str.length () - REMOTE_DEBUG_MAX_CHAR);
+	    }
 
-      if (remote_debug)
-	{
-	  struct cleanup *old_chain;
-	  char *str;
+	  fprintf_unfiltered (gdb_stdlog, "...");
 
-	  *p = '\0';
-	  str = escape_buffer (buf2, p - buf2);
-	  old_chain = make_cleanup (xfree, str);
-	  fprintf_unfiltered (gdb_stdlog, "Sending packet: %s...", str);
 	  gdb_flush (gdb_stdlog);
-	  do_cleanups (old_chain);
 	}
       remote_serial_write (buf2, p - buf2);
 
@@ -7680,6 +8812,7 @@ putpkt_binary (const char *buf, int cnt)
 	    case '+':
 	      if (remote_debug)
 		fprintf_unfiltered (gdb_stdlog, "Ack\n");
+	      do_cleanups (old_chain);
 	      return 1;
 	    case '-':
 	      if (remote_debug)
@@ -7688,7 +8821,10 @@ putpkt_binary (const char *buf, int cnt)
 	    case SERIAL_TIMEOUT:
 	      tcount++;
 	      if (tcount > 3)
-		return 0;
+		{
+		  do_cleanups (old_chain);
+		  return 0;
+		}
 	      break;		/* Retransmit buffer.  */
 	    case '$':
 	      {
@@ -7717,15 +8853,11 @@ putpkt_binary (const char *buf, int cnt)
 		  {
 		    if (remote_debug)
 		      {
-			struct cleanup *old_chain;
-			char *str;
+			std::string str = escape_buffer (rs->buf, val);
 
-			str = escape_buffer (rs->buf, val);
-			old_chain = make_cleanup (xfree, str);
 			fprintf_unfiltered (gdb_stdlog,
 					    "  Notification received: %s\n",
-					    str);
-			do_cleanups (old_chain);
+					    str.c_str ());
 		      }
 		    handle_notification (rs->notif_state, rs->buf);
 		    /* We're in sync now, rewait for the ack.  */
@@ -7775,6 +8907,8 @@ putpkt_binary (const char *buf, int cnt)
 	}
 #endif
     }
+
+  do_cleanups (old_chain);
   return 0;
 }
 
@@ -7889,16 +9023,12 @@ read_frame (char **buf_p,
 
 	    if (remote_debug)
 	      {
-		struct cleanup *old_chain;
-		char *str;
+		std::string str = escape_buffer (buf, bc);
 
-		str = escape_buffer (buf, bc);
-		old_chain = make_cleanup (xfree, str);
 		fprintf_unfiltered (gdb_stdlog,
 				    "Bad checksum, sentsum=0x%x, "
 				    "csum=0x%x, buf=%s\n",
-				    pktcsum, csum, str);
-		do_cleanups (old_chain);
+				    pktcsum, csum, str.c_str ());
 	      }
 	    /* Number of characters in buffer ignoring trailing
                NULL.  */
@@ -7921,7 +9051,7 @@ read_frame (char **buf_p,
 		  {
 		    /* Make some more room in the buffer.  */
 		    *sizeof_buf += repeat;
-		    *buf_p = xrealloc (*buf_p, *sizeof_buf);
+		    *buf_p = (char *) xrealloc (*buf_p, *sizeof_buf);
 		    buf = *buf_p;
 		  }
 
@@ -7939,7 +9069,7 @@ read_frame (char **buf_p,
 	    {
 	      /* Make some more room in the buffer.  */
 	      *sizeof_buf *= 2;
-	      *buf_p = xrealloc (*buf_p, *sizeof_buf);
+	      *buf_p = (char *) xrealloc (*buf_p, *sizeof_buf);
 	      buf = *buf_p;
 	    }
 
@@ -7964,9 +9094,7 @@ getpkt (char **buf,
 	long *sizeof_buf,
 	int forever)
 {
-  int timed_out;
-
-  timed_out = getpkt_sane (buf, sizeof_buf, forever);
+  getpkt_sane (buf, sizeof_buf, forever);
 }
 
 
@@ -8037,7 +9165,6 @@ getpkt_or_notif_sane_1 (char **buf, long
 
 	      if (forever)	/* Watchdog went off?  Kill the target.  */
 		{
-		  QUIT;
 		  remote_unpush_target ();
 		  throw_error (TARGET_CLOSE_ERROR,
 			       _("Watchdog timeout has expired.  "
@@ -8075,13 +9202,20 @@ getpkt_or_notif_sane_1 (char **buf, long
 	{
 	  if (remote_debug)
 	    {
-	     struct cleanup *old_chain;
-	     char *str;
+	      std::string str
+		= escape_buffer (*buf,
+				 std::min (val, REMOTE_DEBUG_MAX_CHAR));
 
-	     str = escape_buffer (*buf, val);
-	     old_chain = make_cleanup (xfree, str);
-	     fprintf_unfiltered (gdb_stdlog, "Packet received: %s\n", str);
-	     do_cleanups (old_chain);
+	      fprintf_unfiltered (gdb_stdlog, "Packet received: %s",
+				  str.c_str ());
+
+	      if (str.length () >  REMOTE_DEBUG_MAX_CHAR)
+		{
+		  fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
+				      str.length () - REMOTE_DEBUG_MAX_CHAR);
+		}
+
+	      fprintf_unfiltered (gdb_stdlog, "\n");
 	    }
 
 	  /* Skip the ack char if we're in no-ack mode.  */
@@ -8100,15 +9234,11 @@ getpkt_or_notif_sane_1 (char **buf, long
 
 	  if (remote_debug)
 	    {
-	      struct cleanup *old_chain;
-	      char *str;
+	      std::string str = escape_buffer (*buf, val);
 
-	      str = escape_buffer (*buf, val);
-	      old_chain = make_cleanup (xfree, str);
 	      fprintf_unfiltered (gdb_stdlog,
 				  "  Notification received: %s\n",
-				  str);
-	      do_cleanups (old_chain);
+				  str.c_str ());
 	    }
 	  if (is_notif != NULL)
 	    *is_notif = 1;
@@ -8146,7 +9276,7 @@ kill_child_of_pending_fork (QUEUE (stop_
 			    stop_reply_p event,
 			    void *data)
 {
-  struct queue_iter_param *param = data;
+  struct queue_iter_param *param = (struct queue_iter_param *) data;
   int parent_pid = *(int *) param->input;
 
   if (is_pending_fork_parent (&event->ws, parent_pid, event->ptid))
@@ -8201,42 +9331,53 @@ kill_new_fork_children (int pid, struct 
 }
 
 
+/* Target hook to kill the current inferior.  */
+
 static void
 remote_kill (struct target_ops *ops)
 {
+  int res = -1;
+  int pid = ptid_get_pid (inferior_ptid);
+  struct remote_state *rs = get_remote_state ();
 
-  /* Catch errors so the user can quit from gdb even when we
-     aren't on speaking terms with the remote system.  */
-  TRY
-    {
-      putpkt ("k");
-    }
-  CATCH (ex, RETURN_MASK_ERROR)
+  if (packet_support (PACKET_vKill) != PACKET_DISABLE)
     {
-      if (ex.error == TARGET_CLOSE_ERROR)
+      /* If we're stopped while forking and we haven't followed yet,
+	 kill the child task.  We need to do this before killing the
+	 parent task because if this is a vfork then the parent will
+	 be sleeping.  */
+      kill_new_fork_children (pid, rs);
+
+      res = remote_vkill (pid, rs);
+      if (res == 0)
 	{
-	  /* If we got an (EOF) error that caused the target
-	     to go away, then we're done, that's what we wanted.
-	     "k" is susceptible to cause a premature EOF, given
-	     that the remote server isn't actually required to
-	     reply to "k", and it can happen that it doesn't
-	     even get to reply ACK to the "k".  */
+	  target_mourn_inferior (inferior_ptid);
 	  return;
 	}
+    }
 
-	/* Otherwise, something went wrong.  We didn't actually kill
-	   the target.  Just propagate the exception, and let the
-	   user or higher layers decide what to do.  */
-	throw_exception (ex);
+  /* If we are in 'target remote' mode and we are killing the only
+     inferior, then we will tell gdbserver to exit and unpush the
+     target.  */
+  if (res == -1 && !remote_multi_process_p (rs)
+      && number_of_live_inferiors () == 1)
+    {
+      remote_kill_k ();
+
+      /* We've killed the remote end, we get to mourn it.  If we are
+	 not in extended mode, mourning the inferior also unpushes
+	 remote_ops from the target stack, which closes the remote
+	 connection.  */
+      target_mourn_inferior (inferior_ptid);
+
+      return;
     }
-  END_CATCH
 
-  /* We've killed the remote end, we get to mourn it.  Since this is
-     target remote, single-process, mourning the inferior also
-     unpushes remote_ops.  */
-  target_mourn_inferior ();
+  error (_("Can't kill process"));
 }
 
+/* Send a kill request to the target using the 'vKill' packet.  */
+
 static int
 remote_vkill (int pid, struct remote_state *rs)
 {
@@ -8262,55 +9403,52 @@ remote_vkill (int pid, struct remote_sta
     }
 }
 
+/* Send a kill request to the target using the 'k' packet.  */
+
 static void
-extended_remote_kill (struct target_ops *ops)
+remote_kill_k (void)
 {
-  int res;
-  int pid = ptid_get_pid (inferior_ptid);
-  struct remote_state *rs = get_remote_state ();
-
-  /* If we're stopped while forking and we haven't followed yet, kill the
-     child task.  We need to do this before killing the parent task
-     because if this is a vfork then the parent will be sleeping.  */
-  kill_new_fork_children (pid, rs);
-
-  res = remote_vkill (pid, rs);
-  if (res == -1 && !(rs->extended && remote_multi_process_p (rs)))
+  /* Catch errors so the user can quit from gdb even when we
+     aren't on speaking terms with the remote system.  */
+  TRY
     {
-      /* Don't try 'k' on a multi-process aware stub -- it has no way
-	 to specify the pid.  */
-
       putpkt ("k");
-#if 0
-      getpkt (&rs->buf, &rs->buf_size, 0);
-      if (rs->buf[0] != 'O' || rs->buf[0] != 'K')
-	res = 1;
-#else
-      /* Don't wait for it to die.  I'm not really sure it matters whether
-	 we do or not.  For the existing stubs, kill is a noop.  */
-      res = 0;
-#endif
     }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error == TARGET_CLOSE_ERROR)
+	{
+	  /* If we got an (EOF) error that caused the target
+	     to go away, then we're done, that's what we wanted.
+	     "k" is susceptible to cause a premature EOF, given
+	     that the remote server isn't actually required to
+	     reply to "k", and it can happen that it doesn't
+	     even get to reply ACK to the "k".  */
+	  return;
+	}
 
-  if (res != 0)
-    error (_("Can't kill process"));
-
-  target_mourn_inferior ();
+      /* Otherwise, something went wrong.  We didn't actually kill
+	 the target.  Just propagate the exception, and let the
+	 user or higher layers decide what to do.  */
+      throw_exception (ex);
+    }
+  END_CATCH
 }
 
 static void
 remote_mourn (struct target_ops *target)
 {
-  unpush_target (target);
+  struct remote_state *rs = get_remote_state ();
 
-  /* remote_close takes care of doing most of the clean up.  */
-  generic_mourn_inferior ();
-}
+  /* In 'target remote' mode with one inferior, we close the connection.  */
+  if (!rs->extended && number_of_live_inferiors () <= 1)
+    {
+      unpush_target (target);
 
-static void
-extended_remote_mourn (struct target_ops *target)
-{
-  struct remote_state *rs = get_remote_state ();
+      /* remote_close takes care of doing most of the clean up.  */
+      generic_mourn_inferior ();
+      return;
+    }
 
   /* In case we got here due to an error, but we're going to stay
      connected.  */
@@ -8341,10 +9479,7 @@ extended_remote_mourn (struct target_ops
      current thread.  */
   record_currthread (rs, minus_one_ptid);
 
-  /* Unlike "target remote", we do not want to unpush the target; then
-     the next time the user says "run", we won't be connected.  */
-
-  /* Call common code to mark the inferior as not running.	*/
+  /* Call common code to mark the inferior as not running.  */
   generic_mourn_inferior ();
 
   if (!have_inferiors ())
@@ -8395,6 +9530,7 @@ extended_remote_run (char *args)
 {
   struct remote_state *rs = get_remote_state ();
   int len;
+  const char *remote_exec_file = get_remote_exec_file ();
 
   /* If the user has disabled vRun support, or we have detected that
      support is not available, do not try it.  */
@@ -8467,6 +9603,7 @@ extended_remote_create_inferior (struct 
   int run_worked;
   char *stop_reply;
   struct remote_state *rs = get_remote_state ();
+  const char *remote_exec_file = get_remote_exec_file ();
 
   /* If running asynchronously, register the target file descriptor
      with the event loop.  */
@@ -8520,26 +9657,19 @@ remote_add_target_side_condition (struct
 				  struct bp_target_info *bp_tgt, char *buf,
 				  char *buf_end)
 {
-  struct agent_expr *aexpr = NULL;
-  int i, ix;
-  char *pkt;
-  char *buf_start = buf;
-
-  if (VEC_empty (agent_expr_p, bp_tgt->conditions))
+  if (bp_tgt->conditions.empty ())
     return 0;
 
   buf += strlen (buf);
   xsnprintf (buf, buf_end - buf, "%s", ";");
   buf++;
 
-  /* Send conditions to the target and free the vector.  */
-  for (ix = 0;
-       VEC_iterate (agent_expr_p, bp_tgt->conditions, ix, aexpr);
-       ix++)
+  /* Send conditions to the target.  */
+  for (agent_expr *aexpr : bp_tgt->conditions)
     {
       xsnprintf (buf, buf_end - buf, "X%x,", aexpr->len);
       buf += strlen (buf);
-      for (i = 0; i < aexpr->len; ++i)
+      for (int i = 0; i < aexpr->len; ++i)
 	buf = pack_hex_byte (buf, aexpr->buf[i]);
       *buf = '\0';
     }
@@ -8550,10 +9680,7 @@ static void
 remote_add_target_side_commands (struct gdbarch *gdbarch,
 				 struct bp_target_info *bp_tgt, char *buf)
 {
-  struct agent_expr *aexpr = NULL;
-  int i, ix;
-
-  if (VEC_empty (agent_expr_p, bp_tgt->tcommands))
+  if (bp_tgt->tcommands.empty ())
     return;
 
   buf += strlen (buf);
@@ -8563,13 +9690,11 @@ remote_add_target_side_commands (struct 
 
   /* Concatenate all the agent expressions that are commands into the
      cmds parameter.  */
-  for (ix = 0;
-       VEC_iterate (agent_expr_p, bp_tgt->tcommands, ix, aexpr);
-       ix++)
+  for (agent_expr *aexpr : bp_tgt->tcommands)
     {
       sprintf (buf, "X%x,", aexpr->len);
       buf += strlen (buf);
-      for (i = 0; i < aexpr->len; ++i)
+      for (int i = 0; i < aexpr->len; ++i)
 	buf = pack_hex_byte (buf, aexpr->buf[i]);
       *buf = '\0';
     }
@@ -8595,15 +9720,12 @@ remote_insert_breakpoint (struct target_
       struct remote_state *rs;
       char *p, *endbuf;
       int bpsize;
-      struct condition_list *cond = NULL;
 
       /* Make sure the remote is pointing at the right process, if
 	 necessary.  */
       if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
 	set_general_process ();
 
-      gdbarch_remote_breakpoint_from_pc (gdbarch, &addr, &bpsize);
-
       rs = get_remote_state ();
       p = rs->buf;
       endbuf = rs->buf + get_remote_packet_size ();
@@ -8613,7 +9735,7 @@ remote_insert_breakpoint (struct target_
       *(p++) = ',';
       addr = (ULONGEST) remote_address_masked (addr);
       p += hexnumstr (p, addr);
-      xsnprintf (p, endbuf - p, ",%d", bpsize);
+      xsnprintf (p, endbuf - p, ",%d", bp_tgt->kind);
 
       if (remote_supports_cond_breakpoints (ops))
 	remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
@@ -8629,8 +9751,6 @@ remote_insert_breakpoint (struct target_
 	case PACKET_ERROR:
 	  return -1;
 	case PACKET_OK:
-	  bp_tgt->placed_address = addr;
-	  bp_tgt->placed_size = bpsize;
 	  return 0;
 	case PACKET_UNKNOWN:
 	  break;
@@ -8639,7 +9759,7 @@ remote_insert_breakpoint (struct target_
 
   /* If this breakpoint has target-side commands but this stub doesn't
      support Z0 packets, throw error.  */
-  if (!VEC_empty (agent_expr_p, bp_tgt->tcommands))
+  if (!bp_tgt->tcommands.empty ())
     throw_error (NOT_SUPPORTED_ERROR, _("\
 Target doesn't support breakpoints that have target side commands."));
 
@@ -8649,7 +9769,8 @@ Target doesn't support breakpoints that 
 static int
 remote_remove_breakpoint (struct target_ops *ops,
 			  struct gdbarch *gdbarch,
-			  struct bp_target_info *bp_tgt)
+			  struct bp_target_info *bp_tgt,
+			  enum remove_bp_reason reason)
 {
   CORE_ADDR addr = bp_tgt->placed_address;
   struct remote_state *rs = get_remote_state ();
@@ -8670,7 +9791,7 @@ remote_remove_breakpoint (struct target_
 
       addr = (ULONGEST) remote_address_masked (bp_tgt->placed_address);
       p += hexnumstr (p, addr);
-      xsnprintf (p, endbuf - p, ",%d", bp_tgt->placed_size);
+      xsnprintf (p, endbuf - p, ",%d", bp_tgt->kind);
 
       putpkt (rs->buf);
       getpkt (&rs->buf, &rs->buf_size, 0);
@@ -8678,10 +9799,10 @@ remote_remove_breakpoint (struct target_
       return (rs->buf[0] == 'E');
     }
 
-  return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
+  return memory_remove_breakpoint (ops, gdbarch, bp_tgt, reason);
 }
 
-static int
+static enum Z_packet_type
 watchpoint_to_Z_packet (int type)
 {
   switch (type)
@@ -8702,9 +9823,8 @@ watchpoint_to_Z_packet (int type)
 }
 
 static int
-remote_insert_watchpoint (struct target_ops *self,
-			  CORE_ADDR addr, int len, int type,
-			  struct expression *cond)
+remote_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+			  enum target_hw_bp_type type, struct expression *cond)
 {
   struct remote_state *rs = get_remote_state ();
   char *endbuf = rs->buf + get_remote_packet_size ();
@@ -8752,9 +9872,8 @@ remote_watchpoint_addr_within_range (str
 
 
 static int
-remote_remove_watchpoint (struct target_ops *self,
-			  CORE_ADDR addr, int len, int type,
-			  struct expression *cond)
+remote_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+			  enum target_hw_bp_type type, struct expression *cond)
 {
   struct remote_state *rs = get_remote_state ();
   char *endbuf = rs->buf + get_remote_packet_size ();
@@ -8810,7 +9929,7 @@ remote_region_ok_for_hw_watchpoint (stru
 
 static int
 remote_check_watch_resources (struct target_ops *self,
-			      int type, int cnt, int ot)
+			      enum bptype type, int cnt, int ot)
 {
   if (type == bp_hardware_breakpoint)
     {
@@ -8840,9 +9959,10 @@ remote_check_watch_resources (struct tar
 static int
 remote_stopped_by_sw_breakpoint (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
+  struct thread_info *thread = inferior_thread ();
 
-  return rs->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT;
+  return (thread->priv != NULL
+	  && thread->priv->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT);
 }
 
 /* The to_supports_stopped_by_sw_breakpoint method of target
@@ -8851,8 +9971,6 @@ remote_stopped_by_sw_breakpoint (struct 
 static int
 remote_supports_stopped_by_sw_breakpoint (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
-
   return (packet_support (PACKET_swbreak_feature) == PACKET_ENABLE);
 }
 
@@ -8861,9 +9979,10 @@ remote_supports_stopped_by_sw_breakpoint
 static int
 remote_stopped_by_hw_breakpoint (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
+  struct thread_info *thread = inferior_thread ();
 
-  return rs->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT;
+  return (thread->priv != NULL
+	  && thread->priv->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT);
 }
 
 /* The to_supports_stopped_by_hw_breakpoint method of target
@@ -8872,32 +9991,31 @@ remote_stopped_by_hw_breakpoint (struct 
 static int
 remote_supports_stopped_by_hw_breakpoint (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
-
   return (packet_support (PACKET_hwbreak_feature) == PACKET_ENABLE);
 }
 
 static int
 remote_stopped_by_watchpoint (struct target_ops *ops)
 {
-  struct remote_state *rs = get_remote_state ();
+  struct thread_info *thread = inferior_thread ();
 
-  return rs->stop_reason == TARGET_STOPPED_BY_WATCHPOINT;
+  return (thread->priv != NULL
+	  && thread->priv->stop_reason == TARGET_STOPPED_BY_WATCHPOINT);
 }
 
 static int
 remote_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
 {
-  struct remote_state *rs = get_remote_state ();
-  int rc = 0;
+  struct thread_info *thread = inferior_thread ();
 
-  if (remote_stopped_by_watchpoint (target))
+  if (thread->priv != NULL
+      && thread->priv->stop_reason == TARGET_STOPPED_BY_WATCHPOINT)
     {
-      *addr_p = rs->remote_watch_data_address;
-      rc = 1;
+      *addr_p = thread->priv->watch_data_address;
+      return 1;
     }
 
-  return rc;
+  return 0;
 }
 
 
@@ -8909,12 +10027,6 @@ remote_insert_hw_breakpoint (struct targ
   struct remote_state *rs;
   char *p, *endbuf;
   char *message;
-  int bpsize;
-
-  /* The length field should be set to the size of a breakpoint
-     instruction, even though we aren't inserting one ourselves.  */
-
-  gdbarch_remote_breakpoint_from_pc (gdbarch, &addr, &bpsize);
 
   if (packet_support (PACKET_Z1) == PACKET_DISABLE)
     return -1;
@@ -8934,7 +10046,7 @@ remote_insert_hw_breakpoint (struct targ
 
   addr = remote_address_masked (addr);
   p += hexnumstr (p, (ULONGEST) addr);
-  xsnprintf (p, endbuf - p, ",%x", bpsize);
+  xsnprintf (p, endbuf - p, ",%x", bp_tgt->kind);
 
   if (remote_supports_cond_breakpoints (self))
     remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
@@ -8958,8 +10070,6 @@ remote_insert_hw_breakpoint (struct targ
     case PACKET_UNKNOWN:
       return -1;
     case PACKET_OK:
-      bp_tgt->placed_address = addr;
-      bp_tgt->placed_size = bpsize;
       return 0;
     }
   internal_error (__FILE__, __LINE__,
@@ -8990,7 +10100,7 @@ remote_remove_hw_breakpoint (struct targ
 
   addr = remote_address_masked (bp_tgt->placed_address);
   p += hexnumstr (p, (ULONGEST) addr);
-  xsnprintf (p, endbuf  - p, ",%x", bp_tgt->placed_size);
+  xsnprintf (p, endbuf  - p, ",%x", bp_tgt->kind);
 
   putpkt (rs->buf);
   getpkt (&rs->buf, &rs->buf_size, 0);
@@ -9104,7 +10214,7 @@ compare_sections_command (char *args, in
       matched = 1;		/* Do this section.  */
       lma = s->lma;
 
-      sectdata = xmalloc (size);
+      sectdata = (gdb_byte *) xmalloc (size);
       old_chain = make_cleanup (xfree, sectdata);
       bfd_get_section_contents (exec_bfd, s, sectdata, 0, size);
 
@@ -9217,7 +10327,7 @@ remote_read_qxfer (struct target_ops *op
      may not, since we don't know how much of it will need to be escaped;
      the target is free to respond with slightly less data.  We subtract
      five to account for the response type and the protocol frame.  */
-  n = min (get_remote_packet_size () - 5, len);
+  n = std::min<LONGEST> (get_remote_packet_size () - 5, len);
   snprintf (rs->buf, get_remote_packet_size () - 4, "qXfer:%s:read:%s:%s,%s",
 	    object_name, annex ? annex : "",
 	    phex_nz (offset, sizeof offset),
@@ -9338,8 +10448,6 @@ remote_xfer_partial (struct target_ops *
   /* Only handle flash writes.  */
   if (writebuf != NULL)
     {
-      LONGEST xfered;
-
       switch (object)
 	{
 	case TARGET_OBJECT_FLASH:
@@ -9478,6 +10586,14 @@ remote_xfer_partial (struct target_ops *
   return TARGET_XFER_OK;
 }
 
+/* Implementation of to_get_memory_xfer_limit.  */
+
+static ULONGEST
+remote_get_memory_xfer_limit (struct target_ops *ops)
+{
+  return get_memory_write_packet_size ();
+}
+
 static int
 remote_search_memory (struct target_ops* ops,
 		      CORE_ADDR start_addr, ULONGEST search_space_len,
@@ -9863,7 +10979,7 @@ remote_pid_to_str (struct target_ops *op
     {
       if (ptid_equal (magic_null_ptid, ptid))
 	xsnprintf (buf, sizeof buf, "Thread <main>");
-      else if (rs->extended && remote_multi_process_p (rs))
+      else if (remote_multi_process_p (rs))
 	if (ptid_get_lwp (ptid) == 0)
 	  return normal_pid_to_str (ptid);
 	else
@@ -9998,7 +11114,8 @@ register_remote_g_packet_guess (struct g
 				const struct target_desc *tdesc)
 {
   struct remote_g_packet_data *data
-    = gdbarch_data (gdbarch, remote_g_packet_data_handle);
+    = ((struct remote_g_packet_data *)
+       gdbarch_data (gdbarch, remote_g_packet_data_handle));
   struct remote_g_packet_guess new_guess, *guess;
   int ix;
 
@@ -10024,7 +11141,8 @@ static int
 remote_read_description_p (struct target_ops *target)
 {
   struct remote_g_packet_data *data
-    = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+    = ((struct remote_g_packet_data *)
+       gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
 
   if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
     return 1;
@@ -10036,7 +11154,8 @@ static const struct target_desc *
 remote_read_description (struct target_ops *target)
 {
   struct remote_g_packet_data *data
-    = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+    = ((struct remote_g_packet_data *)
+       gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
 
   /* Do not try this during initial connection, when we do not know
      whether there is a running but stopped thread.  */
@@ -10261,6 +11380,27 @@ remote_hostio_send_command (int command_
   return ret;
 }
 
+/* Invalidate the readahead cache.  */
+
+static void
+readahead_cache_invalidate (void)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  rs->readahead_cache.fd = -1;
+}
+
+/* Invalidate the readahead cache if it is holding data for FD.  */
+
+static void
+readahead_cache_invalidate_fd (int fd)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  if (rs->readahead_cache.fd == fd)
+    rs->readahead_cache.fd = -1;
+}
+
 /* Set the filesystem remote_hostio functions that take FILENAME
    arguments will use.  Return 0 on success, or -1 if an error
    occurs (and set *REMOTE_ERRNO).  */
@@ -10303,12 +11443,29 @@ remote_hostio_set_filesystem (struct inf
 static int
 remote_hostio_open (struct target_ops *self,
 		    struct inferior *inf, const char *filename,
-		    int flags, int mode, int *remote_errno)
+		    int flags, int mode, int warn_if_slow,
+		    int *remote_errno)
 {
   struct remote_state *rs = get_remote_state ();
   char *p = rs->buf;
   int left = get_remote_packet_size () - 1;
 
+  if (warn_if_slow)
+    {
+      static int warning_issued = 0;
+
+      printf_unfiltered (_("Reading %s from remote target...\n"),
+			 filename);
+
+      if (!warning_issued)
+	{
+	  warning (_("File transfers from remote targets can be slow."
+		     " Use \"set sysroot\" to access files locally"
+		     " instead."));
+	  warning_issued = 1;
+	}
+    }
+
   if (remote_hostio_set_filesystem (inf, remote_errno) != 0)
     return -1;
 
@@ -10339,6 +11496,8 @@ remote_hostio_pwrite (struct target_ops 
   int left = get_remote_packet_size ();
   int out_len;
 
+  readahead_cache_invalidate_fd (fd);
+
   remote_buffer_add_string (&p, &left, "vFile:pwrite:");
 
   remote_buffer_add_int (&p, &left, fd);
@@ -10354,12 +11513,13 @@ remote_hostio_pwrite (struct target_ops 
 				     remote_errno, NULL, NULL);
 }
 
-/* Implementation of to_fileio_pread.  */
+/* Helper for the implementation of to_fileio_pread.  Read the file
+   from the remote side with vFile:pread.  */
 
 static int
-remote_hostio_pread (struct target_ops *self,
-		     int fd, gdb_byte *read_buf, int len,
-		     ULONGEST offset, int *remote_errno)
+remote_hostio_pread_vFile (struct target_ops *self,
+			   int fd, gdb_byte *read_buf, int len,
+			   ULONGEST offset, int *remote_errno)
 {
   struct remote_state *rs = get_remote_state ();
   char *p = rs->buf;
@@ -10393,6 +11553,76 @@ remote_hostio_pread (struct target_ops *
   return ret;
 }
 
+/* Serve pread from the readahead cache.  Returns number of bytes
+   read, or 0 if the request can't be served from the cache.  */
+
+static int
+remote_hostio_pread_from_cache (struct remote_state *rs,
+				int fd, gdb_byte *read_buf, size_t len,
+				ULONGEST offset)
+{
+  struct readahead_cache *cache = &rs->readahead_cache;
+
+  if (cache->fd == fd
+      && cache->offset <= offset
+      && offset < cache->offset + cache->bufsize)
+    {
+      ULONGEST max = cache->offset + cache->bufsize;
+
+      if (offset + len > max)
+	len = max - offset;
+
+      memcpy (read_buf, cache->buf + offset - cache->offset, len);
+      return len;
+    }
+
+  return 0;
+}
+
+/* Implementation of to_fileio_pread.  */
+
+static int
+remote_hostio_pread (struct target_ops *self,
+		     int fd, gdb_byte *read_buf, int len,
+		     ULONGEST offset, int *remote_errno)
+{
+  int ret;
+  struct remote_state *rs = get_remote_state ();
+  struct readahead_cache *cache = &rs->readahead_cache;
+
+  ret = remote_hostio_pread_from_cache (rs, fd, read_buf, len, offset);
+  if (ret > 0)
+    {
+      cache->hit_count++;
+
+      if (remote_debug)
+	fprintf_unfiltered (gdb_stdlog, "readahead cache hit %s\n",
+			    pulongest (cache->hit_count));
+      return ret;
+    }
+
+  cache->miss_count++;
+  if (remote_debug)
+    fprintf_unfiltered (gdb_stdlog, "readahead cache miss %s\n",
+			pulongest (cache->miss_count));
+
+  cache->fd = fd;
+  cache->offset = offset;
+  cache->bufsize = get_remote_packet_size ();
+  cache->buf = (gdb_byte *) xrealloc (cache->buf, cache->bufsize);
+
+  ret = remote_hostio_pread_vFile (self, cache->fd, cache->buf, cache->bufsize,
+				   cache->offset, remote_errno);
+  if (ret <= 0)
+    {
+      readahead_cache_invalidate_fd (fd);
+      return ret;
+    }
+
+  cache->bufsize = ret;
+  return remote_hostio_pread_from_cache (rs, fd, read_buf, len, offset);
+}
+
 /* Implementation of to_fileio_close.  */
 
 static int
@@ -10402,6 +11632,8 @@ remote_hostio_close (struct target_ops *
   char *p = rs->buf;
   int left = get_remote_packet_size () - 1;
 
+  readahead_cache_invalidate_fd (fd);
+
   remote_buffer_add_string (&p, &left, "vFile:close:");
 
   remote_buffer_add_int (&p, &left, fd);
@@ -10463,7 +11695,7 @@ remote_hostio_readlink (struct target_op
   if (len < 0)
     return NULL;
 
-  ret = xmalloc (len + 1);
+  ret = (char *) xmalloc (len + 1);
 
   read_len = remote_unescape_input ((gdb_byte *) attachment, attachment_len,
 				    (gdb_byte *) ret, len);
@@ -10557,7 +11789,7 @@ remote_filesystem_is_local (struct targe
 	     filename is irrelevant, we only care about whether
 	     the stub recognizes the packet or not.  */
 	  fd = remote_hostio_open (self, NULL, "just probing",
-				   FILEIO_O_RDONLY, 0700,
+				   FILEIO_O_RDONLY, 0700, 0,
 				   &remote_errno);
 
 	  if (fd >= 0)
@@ -10679,14 +11911,14 @@ remote_file_put (const char *local_file,
   fd = remote_hostio_open (find_target_at (process_stratum), NULL,
 			   remote_file, (FILEIO_O_WRONLY | FILEIO_O_CREAT
 					 | FILEIO_O_TRUNC),
-			   0700, &remote_errno);
+			   0700, 0, &remote_errno);
   if (fd == -1)
     remote_hostio_error (remote_errno);
 
   /* Send up to this many bytes at once.  They won't all fit in the
      remote packet limit, so we'll transfer slightly fewer.  */
   io_size = get_remote_packet_size ();
-  buffer = xmalloc (io_size);
+  buffer = (gdb_byte *) xmalloc (io_size);
   make_cleanup (xfree, buffer);
 
   close_cleanup = make_cleanup (remote_hostio_close_cleanup, &fd);
@@ -10763,7 +11995,8 @@ remote_file_get (const char *remote_file
     error (_("command can only be used with remote target"));
 
   fd = remote_hostio_open (find_target_at (process_stratum), NULL,
-			   remote_file, FILEIO_O_RDONLY, 0, &remote_errno);
+			   remote_file, FILEIO_O_RDONLY, 0, 0,
+			   &remote_errno);
   if (fd == -1)
     remote_hostio_error (remote_errno);
 
@@ -10775,7 +12008,7 @@ remote_file_get (const char *remote_file
   /* Send up to this many bytes at once.  They won't all fit in the
      remote packet limit, so we'll transfer slightly fewer.  */
   io_size = get_remote_packet_size ();
-  buffer = xmalloc (io_size);
+  buffer = (gdb_byte *) xmalloc (io_size);
   make_cleanup (xfree, buffer);
 
   close_cleanup = make_cleanup (remote_hostio_close_cleanup, &fd);
@@ -10916,11 +12149,7 @@ remote_supports_multi_process (struct ta
 {
   struct remote_state *rs = get_remote_state ();
 
-  /* Only extended-remote handles being attached to multiple
-     processes, even though plain remote can use the multi-process
-     thread id extensions, so that GDB knows the target process's
-     PID.  */
-  return rs->extended && remote_multi_process_p (rs);
+  return remote_multi_process_p (rs);
 }
 
 static int
@@ -10986,7 +12215,7 @@ static void free_actions_list_cleanup_wr
 static void
 free_actions_list_cleanup_wrapper (void *al)
 {
-  free_actions_list (al);
+  free_actions_list ((char **) al);
 }
 
 static void
@@ -11055,8 +12284,6 @@ remote_download_tracepoint (struct targe
   char **stepping_actions;
   int ndx;
   struct cleanup *old_chain = NULL;
-  struct agent_expr *aexpr;
-  struct cleanup *aexpr_chain = NULL;
   char *pkt;
   struct breakpoint *b = loc->owner;
   struct tracepoint *t = (struct tracepoint *) b;
@@ -11082,12 +12309,10 @@ remote_download_tracepoint (struct targe
 	 target capabilities at definition time.  */
       if (remote_supports_fast_tracepoints ())
 	{
-	  int isize;
-
-	  if (gdbarch_fast_tracepoint_valid_at (target_gdbarch (),
-						tpaddr, &isize, NULL))
+	  if (gdbarch_fast_tracepoint_valid_at (loc->gdbarch, tpaddr,
+						NULL))
 	    xsnprintf (buf + strlen (buf), BUF_SIZE - strlen (buf), ":F%x",
-		       isize);
+		       gdb_insn_length (loc->gdbarch, tpaddr));
 	  else
 	    /* If it passed validation at definition but fails now,
 	       something is very wrong.  */
@@ -11129,15 +12354,13 @@ remote_download_tracepoint (struct targe
 	 capabilities at definition time.  */
       if (remote_supports_cond_tracepoints ())
 	{
-	  aexpr = gen_eval_for_expr (tpaddr, loc->cond);
-	  aexpr_chain = make_cleanup_free_agent_expr (aexpr);
+	  agent_expr_up aexpr = gen_eval_for_expr (tpaddr, loc->cond.get ());
 	  xsnprintf (buf + strlen (buf), BUF_SIZE - strlen (buf), ":X%x,",
 		     aexpr->len);
 	  pkt = buf + strlen (buf);
 	  for (ndx = 0; ndx < aexpr->len; ++ndx)
 	    pkt = pack_hex_byte (pkt, aexpr->buf[ndx]);
 	  *pkt = '\0';
-	  do_cleanups (aexpr_chain);
 	}
       else
 	warning (_("Target does not support conditional tracepoints, "
@@ -11189,13 +12412,12 @@ remote_download_tracepoint (struct targe
 
   if (packet_support (PACKET_TracepointSource) == PACKET_ENABLE)
     {
-      if (b->addr_string)
+      if (b->location != NULL)
 	{
 	  strcpy (buf, "QTDPsrc:");
-	  encode_source_string (b->number, loc->address,
-				"at", b->addr_string, buf + strlen (buf),
-				2048 - strlen (buf));
-
+	  encode_source_string (b->number, loc->address, "at",
+				event_location_to_string (b->location),
+				buf + strlen (buf), 2048 - strlen (buf));
 	  putpkt (buf);
 	  remote_get_noisy_reply (&target_buf, &target_buf_size);
 	  if (strcmp (target_buf, "OK"))
@@ -11982,6 +13204,60 @@ btrace_read_config (struct btrace_config
     }
 }
 
+/* Maybe reopen target btrace.  */
+
+static void
+remote_btrace_maybe_reopen (void)
+{
+  struct remote_state *rs = get_remote_state ();
+  struct cleanup *cleanup;
+  struct thread_info *tp;
+  int btrace_target_pushed = 0;
+  int warned = 0;
+
+  cleanup = make_cleanup_restore_current_thread ();
+  ALL_NON_EXITED_THREADS (tp)
+    {
+      set_general_thread (tp->ptid);
+
+      memset (&rs->btrace_config, 0x00, sizeof (struct btrace_config));
+      btrace_read_config (&rs->btrace_config);
+
+      if (rs->btrace_config.format == BTRACE_FORMAT_NONE)
+	continue;
+
+#if !defined (HAVE_LIBIPT)
+      if (rs->btrace_config.format == BTRACE_FORMAT_PT)
+	{
+	  if (!warned)
+	    {
+	      warned = 1;
+	      warning (_("GDB does not support Intel Processor Trace. "
+			 "\"record\" will not work in this session."));
+	    }
+
+	  continue;
+	}
+#endif /* !defined (HAVE_LIBIPT) */
+
+      /* Push target, once, but before anything else happens.  This way our
+	 changes to the threads will be cleaned up by unpushing the target
+	 in case btrace_read_config () throws.  */
+      if (!btrace_target_pushed)
+	{
+	  btrace_target_pushed = 1;
+	  record_btrace_push_target ();
+	  printf_filtered (_("Target is recording using %s.\n"),
+			   btrace_format_string (rs->btrace_config.format));
+	}
+
+      tp->btrace.target = XCNEW (struct btrace_target_info);
+      tp->btrace.target->ptid = tp->ptid;
+      tp->btrace.target->conf = rs->btrace_config;
+    }
+  do_cleanups (cleanup);
+}
+
 /* Enable branch tracing.  */
 
 static struct btrace_target_info *
@@ -12026,7 +13302,7 @@ remote_enable_btrace (struct target_ops 
 	       target_pid_to_str (ptid));
     }
 
-  tinfo = xzalloc (sizeof (*tinfo));
+  tinfo = XCNEW (struct btrace_target_info);
   tinfo->ptid = ptid;
 
   /* If we fail to read the configuration, we lose some information, but the
@@ -12097,7 +13373,6 @@ remote_read_btrace (struct target_ops *s
 		    enum btrace_read_type type)
 {
   struct packet_config *packet = &remote_protocol_packets[PACKET_qXfer_btrace];
-  struct remote_state *rs = get_remote_state ();
   struct cleanup *cleanup;
   const char *annex;
   char *xml;
@@ -12186,7 +13461,7 @@ remote_pid_to_exec_file (struct target_o
     {
       const int annex_size = 9;
 
-      annex = alloca (annex_size);
+      annex = (char *) alloca (annex_size);
       xsnprintf (annex, annex_size, "%x", pid);
     }
 
@@ -12196,6 +13471,40 @@ remote_pid_to_exec_file (struct target_o
   return filename;
 }
 
+/* Implement the to_can_do_single_step target_ops method.  */
+
+static int
+remote_can_do_single_step (struct target_ops *ops)
+{
+  /* We can only tell whether target supports single step or not by
+     supported s and S vCont actions if the stub supports vContSupported
+     feature.  If the stub doesn't support vContSupported feature,
+     we have conservatively to think target doesn't supports single
+     step.  */
+  if (packet_support (PACKET_vContSupported) == PACKET_ENABLE)
+    {
+      struct remote_state *rs = get_remote_state ();
+
+      if (packet_support (PACKET_vCont) == PACKET_SUPPORT_UNKNOWN)
+	remote_vcont_probe (rs);
+
+      return rs->supports_vCont.s && rs->supports_vCont.S;
+    }
+  else
+    return 0;
+}
+
+/* Implementation of the to_execution_direction method for the remote
+   target.  */
+
+static enum exec_direction_kind
+remote_execution_direction (struct target_ops *self)
+{
+  struct remote_state *rs = get_remote_state ();
+
+  return rs->last_resume_exec_dir;
+}
+
 static void
 init_remote_ops (void)
 {
@@ -12210,6 +13519,7 @@ Specify the serial device it is connecte
   remote_ops.to_detach = remote_detach;
   remote_ops.to_disconnect = remote_disconnect;
   remote_ops.to_resume = remote_resume;
+  remote_ops.to_commit_resume = remote_commit_resume;
   remote_ops.to_wait = remote_wait;
   remote_ops.to_fetch_registers = remote_fetch_registers;
   remote_ops.to_store_registers = remote_store_registers;
@@ -12236,14 +13546,19 @@ Specify the serial device it is connecte
   remote_ops.to_load = remote_load;
   remote_ops.to_mourn_inferior = remote_mourn;
   remote_ops.to_pass_signals = remote_pass_signals;
+  remote_ops.to_set_syscall_catchpoint = remote_set_syscall_catchpoint;
   remote_ops.to_program_signals = remote_program_signals;
   remote_ops.to_thread_alive = remote_thread_alive;
+  remote_ops.to_thread_name = remote_thread_name;
   remote_ops.to_update_thread_list = remote_update_thread_list;
   remote_ops.to_pid_to_str = remote_pid_to_str;
   remote_ops.to_extra_thread_info = remote_threads_extra_info;
   remote_ops.to_get_ada_task_ptid = remote_get_ada_task_ptid;
   remote_ops.to_stop = remote_stop;
+  remote_ops.to_interrupt = remote_interrupt;
+  remote_ops.to_pass_ctrlc = remote_pass_ctrlc;
   remote_ops.to_xfer_partial = remote_xfer_partial;
+  remote_ops.to_get_memory_xfer_limit = remote_get_memory_xfer_limit;
   remote_ops.to_rcmd = remote_rcmd;
   remote_ops.to_pid_to_exec_file = remote_pid_to_exec_file;
   remote_ops.to_log_command = serial_log_command;
@@ -12265,6 +13580,8 @@ Specify the serial device it is connecte
   remote_ops.to_can_async_p = remote_can_async_p;
   remote_ops.to_is_async_p = remote_is_async_p;
   remote_ops.to_async = remote_async;
+  remote_ops.to_thread_events = remote_thread_events;
+  remote_ops.to_can_do_single_step = remote_can_do_single_step;
   remote_ops.to_terminal_inferior = remote_terminal_inferior;
   remote_ops.to_terminal_ours = remote_terminal_ours;
   remote_ops.to_supports_non_stop = remote_supports_non_stop;
@@ -12327,6 +13644,15 @@ Specify the serial device it is connecte
   remote_ops.to_btrace_conf = remote_btrace_conf;
   remote_ops.to_augmented_libraries_svr4_read =
     remote_augmented_libraries_svr4_read;
+  remote_ops.to_follow_fork = remote_follow_fork;
+  remote_ops.to_follow_exec = remote_follow_exec;
+  remote_ops.to_insert_fork_catchpoint = remote_insert_fork_catchpoint;
+  remote_ops.to_remove_fork_catchpoint = remote_remove_fork_catchpoint;
+  remote_ops.to_insert_vfork_catchpoint = remote_insert_vfork_catchpoint;
+  remote_ops.to_remove_vfork_catchpoint = remote_remove_vfork_catchpoint;
+  remote_ops.to_insert_exec_catchpoint = remote_insert_exec_catchpoint;
+  remote_ops.to_remove_exec_catchpoint = remote_remove_exec_catchpoint;
+  remote_ops.to_execution_direction = remote_execution_direction;
 }
 
 /* Set up the extended remote vector by making a copy of the standard
@@ -12345,22 +13671,11 @@ init_extended_remote_ops (void)
 Specify the serial device it is connected to (e.g. /dev/ttya).";
   extended_remote_ops.to_open = extended_remote_open;
   extended_remote_ops.to_create_inferior = extended_remote_create_inferior;
-  extended_remote_ops.to_mourn_inferior = extended_remote_mourn;
   extended_remote_ops.to_detach = extended_remote_detach;
   extended_remote_ops.to_attach = extended_remote_attach;
   extended_remote_ops.to_post_attach = extended_remote_post_attach;
-  extended_remote_ops.to_kill = extended_remote_kill;
   extended_remote_ops.to_supports_disable_randomization
     = extended_remote_supports_disable_randomization;
-  extended_remote_ops.to_follow_fork = remote_follow_fork;
-  extended_remote_ops.to_insert_fork_catchpoint
-    = remote_insert_fork_catchpoint;
-  extended_remote_ops.to_remove_fork_catchpoint
-    = remote_remove_fork_catchpoint;
-  extended_remote_ops.to_insert_vfork_catchpoint
-    = remote_insert_vfork_catchpoint;
-  extended_remote_ops.to_remove_vfork_catchpoint
-    = remote_remove_vfork_catchpoint;
 }
 
 static int
@@ -12368,8 +13683,9 @@ remote_can_async_p (struct target_ops *o
 {
   struct remote_state *rs = get_remote_state ();
 
+  /* We don't go async if the user has explicitly prevented it with the
+     "maint set target-async" command.  */
   if (!target_async_permitted)
-    /* We only enable async when the user specifically asks for it.  */
     return 0;
 
   /* We're async whenever the serial device is.  */
@@ -12398,8 +13714,6 @@ static serial_event_ftype remote_async_s
 static void
 remote_async_serial_handler (struct serial *scb, void *context)
 {
-  struct remote_state *rs = context;
-
   /* Don't propogate error information up to the client.  Instead let
      the client find out about the error by querying the target.  */
   inferior_event_handler (INF_REG_EVENT, NULL);
@@ -12424,11 +13738,53 @@ remote_async (struct target_ops *ops, in
 	 event loop to process them.  */
       if (!QUEUE_is_empty (stop_reply_p, stop_reply_queue))
 	mark_async_event_handler (remote_async_inferior_event_token);
+      /* For simplicity, below we clear the pending events token
+	 without remembering whether it is marked, so here we always
+	 mark it.  If there's actually no pending notification to
+	 process, this ends up being a no-op (other than a spurious
+	 event-loop wakeup).  */
+      if (target_is_non_stop_p ())
+	mark_async_event_handler (rs->notif_state->get_pending_events_token);
     }
   else
     {
       serial_async (rs->remote_desc, NULL, NULL);
+      /* If the core is disabling async, it doesn't want to be
+	 disturbed with target events.  Clear all async event sources
+	 too.  */
       clear_async_event_handler (remote_async_inferior_event_token);
+      if (target_is_non_stop_p ())
+	clear_async_event_handler (rs->notif_state->get_pending_events_token);
+    }
+}
+
+/* Implementation of the to_thread_events method.  */
+
+static void
+remote_thread_events (struct target_ops *ops, int enable)
+{
+  struct remote_state *rs = get_remote_state ();
+  size_t size = get_remote_packet_size ();
+
+  if (packet_support (PACKET_QThreadEvents) == PACKET_DISABLE)
+    return;
+
+  xsnprintf (rs->buf, size, "QThreadEvents:%x", enable ? 1 : 0);
+  putpkt (rs->buf);
+  getpkt (&rs->buf, &rs->buf_size, 0);
+
+  switch (packet_ok (rs->buf,
+		     &remote_protocol_packets[PACKET_QThreadEvents]))
+    {
+    case PACKET_OK:
+      if (strcmp (rs->buf, "OK") != 0)
+	error (_("Remote refused setting thread events: %s"), rs->buf);
+      break;
+    case PACKET_ERROR:
+      warning (_("Remote failure reply: %s"), rs->buf);
+      break;
+    case PACKET_UNKNOWN:
+      break;
     }
 }
 
@@ -12460,10 +13816,10 @@ show_remote_cmd (char *args, int from_tt
 	struct cleanup *option_chain
 	  = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
 
-	ui_out_field_string (uiout, "name", list->name);
-	ui_out_text (uiout, ":  ");
+	uiout->field_string ("name", list->name);
+	uiout->text (":  ");
 	if (list->type == show_cmd)
-	  do_show_command ((char *) NULL, from_tty, list);
+	  do_show_command (NULL, from_tty, list);
 	else
 	  cmd_func (list, NULL, from_tty);
 	/* Close the tuple.  */
@@ -12574,7 +13930,6 @@ set_range_stepping (char *ignore_args, i
 void
 _initialize_remote (void)
 {
-  struct remote_state *rs;
   struct cmd_list_element *cmd;
   const char *cmd_name;
 
@@ -12584,6 +13939,10 @@ _initialize_remote (void)
   remote_g_packet_data_handle =
     gdbarch_data_register_pre_init (remote_g_packet_data_init);
 
+  remote_pspace_data
+    = register_program_space_data_with_cleanup (NULL,
+						remote_pspace_data_cleanup);
+
   /* Initialize the per-target state.  At the moment there is only one
      of these, not one per target.  Only one target is active at a
      time.  */
@@ -12601,12 +13960,6 @@ _initialize_remote (void)
      when it exits.  */
   observer_attach_inferior_exit (discard_pending_stop_replies);
 
-  /* Set up signal handlers.  */
-  async_sigint_remote_token =
-    create_async_signal_handler (async_remote_interrupt, NULL);
-  async_sigint_remote_twice_token =
-    create_async_signal_handler (async_remote_interrupt_twice, NULL);
-
 #if 0
   init_remote_threadtests ();
 #endif
@@ -12753,6 +14106,9 @@ Show the maximum size of the address (in
   add_packet_config_cmd (&remote_protocol_packets[PACKET_QPassSignals],
 			 "QPassSignals", "pass-signals", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_QCatchSyscalls],
+			 "QCatchSyscalls", "catch-syscalls", 0);
+
   add_packet_config_cmd (&remote_protocol_packets[PACKET_QProgramSignals],
 			 "QProgramSignals", "program-signals", 0);
 
@@ -12945,6 +14301,9 @@ Show the maximum size of the address (in
   add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_bts_size],
        "Qbtrace-conf:bts:size", "btrace-conf-bts-size", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_multiprocess_feature],
+       "multiprocess-feature", "multiprocess-feature", 0);
+
   add_packet_config_cmd (&remote_protocol_packets[PACKET_swbreak_feature],
                          "swbreak-feature", "swbreak-feature", 0);
 
@@ -12960,6 +14319,21 @@ Show the maximum size of the address (in
   add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_pt_size],
        "Qbtrace-conf:pt:size", "btrace-conf-pt-size", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_vContSupported],
+			 "vContSupported", "verbose-resume-supported", 0);
+
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_exec_event_feature],
+			 "exec-event-feature", "exec-event-feature", 0);
+
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_vCtrlC],
+			 "vCtrlC", "ctrl-c", 0);
+
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_QThreadEvents],
+			 "QThreadEvents", "thread-events", 0);
+
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_no_resumed],
+			 "N stop reply", "no-resumed-stop-reply", 0);
+
   /* Assert that we've registered "set remote foo-packet" commands
      for all packet configs.  */
   {
@@ -12974,7 +14348,6 @@ Show the maximum size of the address (in
 	switch (i)
 	  {
 	  case PACKET_QNonStop:
-	  case PACKET_multiprocess_feature:
 	  case PACKET_EnableDisableTracepoints_feature:
 	  case PACKET_tracenz_feature:
 	  case PACKET_DisconnectedTracing_feature:
@@ -13029,12 +14402,14 @@ Transfer files to and from the remote ta
 	   _("Delete a remote file."),
 	   &remote_cmdlist);
 
-  remote_exec_file = xstrdup ("");
   add_setshow_string_noescape_cmd ("exec-file", class_files,
-				   &remote_exec_file, _("\
+				   &remote_exec_file_var, _("\
 Set the remote pathname for \"run\""), _("\
-Show the remote pathname for \"run\""), NULL, NULL, NULL,
-				   &remote_set_cmdlist, &remote_show_cmdlist);
+Show the remote pathname for \"run\""), NULL,
+				   set_remote_exec_file,
+				   show_remote_exec_file,
+				   &remote_set_cmdlist,
+				   &remote_show_cmdlist);
 
   add_setshow_boolean_cmd ("range-stepping", class_run,
 			   &use_range_stepping, _("\
@@ -13060,6 +14435,6 @@ stepping is supported by the target.  Th
   any_thread_ptid = ptid_build (42000, 0, 1);
 
   target_buf_size = 2048;
-  target_buf = xmalloc (target_buf_size);
+  target_buf = (char *) xmalloc (target_buf_size);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-fileio.c ./gdb/remote-fileio.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-fileio.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-fileio.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Remote File-I/O communications
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,7 @@
 #include "filestuff.h"
 
 #include <fcntl.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #ifdef __CYGWIN__
 #include <sys/cygwin.h>		/* For cygwin_conv_path.  */
 #endif
@@ -48,8 +48,6 @@ static struct {
 
 static int remote_fio_system_call_allowed = 0;
 
-static struct async_signal_handler *sigint_fileio_token;
-
 static int
 remote_fileio_init_fd_map (void)
 {
@@ -57,7 +55,7 @@ remote_fileio_init_fd_map (void)
 
   if (!remote_fio_data.fd_map)
     {
-      remote_fio_data.fd_map = (int *) xmalloc (10 * sizeof (int));
+      remote_fio_data.fd_map = XNEWVEC (int, 10);
       remote_fio_data.fd_map_size = 10;
       remote_fio_data.fd_map[0] = FIO_FD_CONSOLE_IN;
       remote_fio_data.fd_map[1] = FIO_FD_CONSOLE_OUT;
@@ -300,74 +298,26 @@ remote_fileio_to_fio_timeval (struct tim
   remote_fileio_to_fio_long (tv->tv_usec, ftv->ftv_usec);
 }
 
-static int remote_fio_ctrl_c_flag = 0;
-static int remote_fio_no_longjmp = 0;
-
-#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
-static struct sigaction remote_fio_sa;
-static struct sigaction remote_fio_osa;
-#else
-static void (*remote_fio_ofunc)(int);
-#endif
+/* The quit handler originally installed.  */
+static quit_handler_ftype *remote_fileio_o_quit_handler;
 
-static void
-remote_fileio_sig_init (void)
-{
-#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
-  remote_fio_sa.sa_handler = SIG_IGN;
-  sigemptyset (&remote_fio_sa.sa_mask);
-  remote_fio_sa.sa_flags = 0;
-  sigaction (SIGINT, &remote_fio_sa, &remote_fio_osa);
-#else
-  remote_fio_ofunc = signal (SIGINT, SIG_IGN);
-#endif
-}
+/* What to do on a QUIT call while handling a file I/O request.  We
+   throw a quit exception, which is caught by remote_fileio_request
+   and translated to an EINTR reply back to the target.  */
 
 static void
-remote_fileio_sig_set (void (*sigint_func)(int))
+remote_fileio_quit_handler (void)
 {
-#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
-  remote_fio_sa.sa_handler = sigint_func;
-  sigemptyset (&remote_fio_sa.sa_mask);
-  remote_fio_sa.sa_flags = 0;
-  sigaction (SIGINT, &remote_fio_sa, NULL);
-#else
-  signal (SIGINT, sigint_func);
-#endif
-}
-
-static void
-remote_fileio_sig_exit (void)
-{
-#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
-  sigaction (SIGINT, &remote_fio_osa, NULL);
-#else
-  signal (SIGINT, remote_fio_ofunc);
-#endif
-}
-
-static void
-async_remote_fileio_interrupt (gdb_client_data arg)
-{
-  quit ();
-}
-
-static void
-remote_fileio_ctrl_c_signal_handler (int signo)
-{
-  remote_fileio_sig_set (SIG_IGN);
-  remote_fio_ctrl_c_flag = 1;
-  if (!remote_fio_no_longjmp)
-    gdb_call_async_signal_handler (sigint_fileio_token, 1);
-  remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+  if (check_quit_flag ())
+    quit ();
 }
 
 static void
 remote_fileio_reply (int retcode, int error)
 {
   char buf[32];
+  int ctrl_c = check_quit_flag ();
 
-  remote_fileio_sig_set (SIG_IGN);
   strcpy (buf, "F");
   if (retcode < 0)
     {
@@ -375,9 +325,9 @@ remote_fileio_reply (int retcode, int er
       retcode = -retcode;
     }
   sprintf (buf + strlen (buf), "%x", retcode);
-  if (error || remote_fio_ctrl_c_flag)
+  if (error || ctrl_c)
     {
-      if (error && remote_fio_ctrl_c_flag)
+      if (error && ctrl_c)
         error = FILEIO_EINTR;
       if (error < 0)
         {
@@ -385,10 +335,10 @@ remote_fileio_reply (int retcode, int er
 	  error = -error;
 	}
       sprintf (buf + strlen (buf), ",%x", error);
-      if (remote_fio_ctrl_c_flag)
+      if (ctrl_c)
         strcat (buf, ",C");
     }
-  remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+  quit_handler = remote_fileio_o_quit_handler;
   putpkt (buf);
 }
 
@@ -450,7 +400,7 @@ remote_fileio_func_open (char *buf)
   mode = remote_fileio_mode_to_host (num, 1);
 
   /* Request pathname.  */
-  pathname = alloca (length);
+  pathname = (char *) alloca (length);
   if (target_read_memory (ptrval, (gdb_byte *) pathname, length) != 0)
     {
       remote_fileio_ioerror ();
@@ -475,7 +425,6 @@ remote_fileio_func_open (char *buf)
 	}
     }
 
-  remote_fio_no_longjmp = 1;
   fd = gdb_open_cloexec (pathname, flags, mode);
   if (fd < 0)
     {
@@ -506,7 +455,6 @@ remote_fileio_func_close (char *buf)
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   if (fd != FIO_FD_CONSOLE_IN && fd != FIO_FD_CONSOLE_OUT && close (fd))
     remote_fileio_return_errno (-1);
   remote_fileio_close_target_fd ((int) num);
@@ -564,7 +512,6 @@ remote_fileio_func_read (char *buf)
 	  buffer = (gdb_byte *) xmalloc (16384);
 	  if (remaining_buf)
 	    {
-	      remote_fio_no_longjmp = 1;
 	      if (remaining_length > length)
 		{
 		  memcpy (buffer, remaining_buf, length);
@@ -595,7 +542,6 @@ remote_fileio_func_read (char *buf)
 		 safe margin, in case the limit depends on system
 		 resources or version.  */
 	      ret = ui_file_read (gdb_stdtargin, (char *) buffer, 16383);
-	      remote_fio_no_longjmp = 1;
 	      if (ret > 0 && (size_t)ret > length)
 		{
 		  remaining_buf = (char *) xmalloc (ret - length);
@@ -614,7 +560,6 @@ remote_fileio_func_read (char *buf)
 	   Therefore a complete solution must check how many bytes have been
 	   read on EINTR to return a more reliable value to the target */
 	old_offset = lseek (fd, 0, SEEK_CUR);
-	remote_fio_no_longjmp = 1;
 	ret = read (fd, buffer, length);
 	if (ret < 0 && errno == EINTR)
 	  {
@@ -687,7 +632,6 @@ remote_fileio_func_write (char *buf)
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   switch (fd)
     {
       case FIO_FD_CONSOLE_IN:
@@ -761,7 +705,6 @@ remote_fileio_func_lseek (char *buf)
       return;
     }
   
-  remote_fio_no_longjmp = 1;
   ret = lseek (fd, offset, flag);
 
   if (ret == (off_t) -1)
@@ -794,7 +737,7 @@ remote_fileio_func_rename (char *buf)
     }
   
   /* Request oldpath using 'm' packet */
-  oldpath = alloca (old_len);
+  oldpath = (char *) alloca (old_len);
   if (target_read_memory (old_ptr, (gdb_byte *) oldpath, old_len) != 0)
     {
       remote_fileio_ioerror ();
@@ -802,7 +745,7 @@ remote_fileio_func_rename (char *buf)
     }
   
   /* Request newpath using 'm' packet */
-  newpath = alloca (new_len);
+  newpath = (char *) alloca (new_len);
   if (target_read_memory (new_ptr, (gdb_byte *) newpath, new_len) != 0)
     {
       remote_fileio_ioerror ();
@@ -819,7 +762,6 @@ remote_fileio_func_rename (char *buf)
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   ret = rename (oldpath, newpath);
 
   if (ret == -1)
@@ -880,7 +822,7 @@ remote_fileio_func_unlink (char *buf)
       return;
     }
   /* Request pathname using 'm' packet */
-  pathname = alloca (length);
+  pathname = (char *) alloca (length);
   if (target_read_memory (ptrval, (gdb_byte *) pathname, length) != 0)
     {
       remote_fileio_ioerror ();
@@ -895,7 +837,6 @@ remote_fileio_func_unlink (char *buf)
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   ret = unlink (pathname);
 
   if (ret == -1)
@@ -930,14 +871,13 @@ remote_fileio_func_stat (char *buf)
   statptr = (CORE_ADDR) lnum;
   
   /* Request pathname using 'm' packet */
-  pathname = alloca (namelength);
+  pathname = (char *) alloca (namelength);
   if (target_read_memory (nameptr, (gdb_byte *) pathname, namelength) != 0)
     {
       remote_fileio_ioerror ();
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   ret = stat (pathname, &st);
 
   if (ret == -1)
@@ -997,7 +937,6 @@ remote_fileio_func_fstat (char *buf)
     }
   ptrval = (CORE_ADDR) lnum;
 
-  remote_fio_no_longjmp = 1;
   if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
     {
       host_to_fileio_uint (1, fst.fst_dev);
@@ -1073,7 +1012,6 @@ remote_fileio_func_gettimeofday (char *b
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   ret = gettimeofday (&tv, NULL);
 
   if (ret == -1)
@@ -1108,7 +1046,6 @@ remote_fileio_func_isatty (char *buf)
       remote_fileio_ioerror ();
       return;
     }
-  remote_fio_no_longjmp = 1;
   fd = remote_fileio_map_fd ((int) target_fd);
   remote_fileio_return_success (fd == FIO_FD_CONSOLE_IN ||
   				fd == FIO_FD_CONSOLE_OUT ? 1 : 0);
@@ -1131,7 +1068,7 @@ remote_fileio_func_system (char *buf)
   if (length)
     {
       /* Request commandline using 'm' packet */
-      cmdline = alloca (length);
+      cmdline = (char *) alloca (length);
       if (target_read_memory (ptrval, (gdb_byte *) cmdline, length) != 0)
 	{
 	  remote_fileio_ioerror ();
@@ -1152,7 +1089,6 @@ remote_fileio_func_system (char *buf)
       return;
     }
 
-  remote_fio_no_longjmp = 1;
   ret = system (cmdline);
 
   if (!length)
@@ -1185,11 +1121,11 @@ static struct {
 static int
 do_remote_fileio_request (struct ui_out *uiout, void *buf_arg)
 {
-  char *buf = buf_arg;
+  char *buf = (char *) buf_arg;
   char *c;
   int idx;
 
-  remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+  quit_handler = remote_fileio_quit_handler;
 
   c = strchr (++buf, ',');
   if (c)
@@ -1236,22 +1172,22 @@ remote_fileio_request (char *buf, int ct
 {
   int ex;
 
-  remote_fileio_sig_init ();
+  /* Save the previous quit handler, so we can restore it.  No need
+     for a cleanup since we catch all exceptions below.  Note that the
+     quit handler is also restored by remote_fileio_reply just before
+     pushing a packet.  */
+  remote_fileio_o_quit_handler = quit_handler;
 
   if (ctrlc_pending_p)
     {
       /* If the target hasn't responded to the Ctrl-C sent
 	 asynchronously earlier, take this opportunity to send the
 	 Ctrl-C synchronously.  */
-      remote_fio_ctrl_c_flag = 1;
-      remote_fio_no_longjmp = 0;
+      set_quit_flag ();
       remote_fileio_reply (-1, FILEIO_EINTR);
     }
   else
     {
-      remote_fio_ctrl_c_flag = 0;
-      remote_fio_no_longjmp = 0;
-
       ex = catch_exceptions (current_uiout,
 			     do_remote_fileio_request, (void *)buf,
 			     RETURN_MASK_ALL);
@@ -1268,7 +1204,7 @@ remote_fileio_request (char *buf, int ct
 	}
     }
 
-  remote_fileio_sig_exit ();
+  quit_handler = remote_fileio_o_quit_handler;
 }
 
 
@@ -1366,9 +1302,6 @@ void
 initialize_remote_fileio (struct cmd_list_element *remote_set_cmdlist,
 			  struct cmd_list_element *remote_show_cmdlist)
 {
-  sigint_fileio_token =
-    create_async_signal_handler (async_remote_fileio_interrupt, NULL);
-
   add_cmd ("system-call-allowed", no_class,
 	   set_system_call_allowed,
 	   _("Set if the host system(3) call is allowed for the target."),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-fileio.h ./gdb/remote-fileio.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-fileio.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-fileio.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Remote File-I/O communications
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote.h ./gdb/remote.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote target communications for serial-line targets in custom GDB protocol
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-m32r-sdi.c ./gdb/remote-m32r-sdi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-m32r-sdi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-m32r-sdi.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,1722 +0,0 @@
-/* Remote debugging interface for M32R/SDI.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   Contributed by Renesas Technology Co.
-   Written by Kei Sakamoto <sakamoto.kei@renesas.com>.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcmd.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "infrun.h"
-#include "target.h"
-#include "regcache.h"
-#include "gdbthread.h"
-#include <ctype.h>
-#include <signal.h>
-#ifdef __MINGW32__
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#endif
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-#include "gdb_bfd.h"
-#include "cli/cli-utils.h"
-#include "symfile.h"
-#include "serial.h"
-
-/* Descriptor for I/O to remote machine.  */
-
-static struct serial *sdi_desc = NULL;
-
-#define SDI_TIMEOUT 30
-
-
-#define SDIPORT 3232
-
-static char chip_name[64];
-
-static int step_mode;
-static unsigned long last_pc_addr = 0xffffffff;
-static unsigned char last_pc_addr_data[2];
-
-static int mmu_on = 0;
-
-static int use_ib_breakpoints = 1;
-
-#define MAX_BREAKPOINTS 1024
-static int max_ib_breakpoints;
-static unsigned long bp_address[MAX_BREAKPOINTS];
-static unsigned char bp_data[MAX_BREAKPOINTS][4];
-
-/* dbt -> nop */
-static const unsigned char dbt_bp_entry[] = {
-  0x10, 0xe0, 0x70, 0x00
-};
-
-#define MAX_ACCESS_BREAKS 4
-static int max_access_breaks;
-static unsigned long ab_address[MAX_ACCESS_BREAKS];
-static unsigned int ab_type[MAX_ACCESS_BREAKS];
-static unsigned int ab_size[MAX_ACCESS_BREAKS];
-static CORE_ADDR hit_watchpoint_addr = 0;
-
-static int interrupted = 0;
-
-/* Forward data declarations */
-extern struct target_ops m32r_ops;
-
-/* This is the ptid we use while we're connected to the remote.  Its
-   value is arbitrary, as the target doesn't have a notion of
-   processes or threads, but we need something non-null to place in
-   inferior_ptid.  */
-static ptid_t remote_m32r_ptid;
-
-/* Commands */
-#define SDI_OPEN                 1
-#define SDI_CLOSE                2
-#define SDI_RELEASE              3
-#define SDI_READ_CPU_REG         4
-#define SDI_WRITE_CPU_REG        5
-#define SDI_READ_MEMORY          6
-#define SDI_WRITE_MEMORY         7
-#define SDI_EXEC_CPU             8
-#define SDI_STOP_CPU             9
-#define SDI_WAIT_FOR_READY      10
-#define SDI_GET_ATTR            11
-#define SDI_SET_ATTR            12
-#define SDI_STATUS              13
-
-/* Attributes */
-#define SDI_ATTR_NAME            1
-#define SDI_ATTR_BRK             2
-#define SDI_ATTR_ABRK            3
-#define SDI_ATTR_CACHE           4
-#define SDI_CACHE_TYPE_M32102    0
-#define SDI_CACHE_TYPE_CHAOS     1
-#define SDI_ATTR_MEM_ACCESS      5
-#define SDI_MEM_ACCESS_DEBUG_DMA 0
-#define SDI_MEM_ACCESS_MON_CODE  1
-
-/* Registers */
-#define SDI_REG_R0               0
-#define SDI_REG_R1               1
-#define SDI_REG_R2               2
-#define SDI_REG_R3               3
-#define SDI_REG_R4               4
-#define SDI_REG_R5               5
-#define SDI_REG_R6               6
-#define SDI_REG_R7               7
-#define SDI_REG_R8               8
-#define SDI_REG_R9               9
-#define SDI_REG_R10             10
-#define SDI_REG_R11             11
-#define SDI_REG_R12             12
-#define SDI_REG_FP              13
-#define SDI_REG_LR              14
-#define SDI_REG_SP              15
-#define SDI_REG_PSW             16
-#define SDI_REG_CBR             17
-#define SDI_REG_SPI             18
-#define SDI_REG_SPU             19
-#define SDI_REG_CR4             20
-#define SDI_REG_EVB             21
-#define SDI_REG_BPC             22
-#define SDI_REG_CR7             23
-#define SDI_REG_BBPSW           24
-#define SDI_REG_CR9             25
-#define SDI_REG_CR10            26
-#define SDI_REG_CR11            27
-#define SDI_REG_CR12            28
-#define SDI_REG_WR              29
-#define SDI_REG_BBPC            30
-#define SDI_REG_PBP             31
-#define SDI_REG_ACCH            32
-#define SDI_REG_ACCL            33
-#define SDI_REG_ACC1H           34
-#define SDI_REG_ACC1L           35
-
-
-/* Low level communication functions.  */
-
-/* Check an ack packet from the target.  */
-static int
-get_ack (void)
-{
-  int c;
-
-  if (!sdi_desc)
-    return -1;
-
-  c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-
-  if (c < 0)
-    return -1;
-
-  if (c != '+')			/* error */
-    return -1;
-
-  return 0;
-}
-
-/* Send data to the target and check an ack packet.  */
-static int
-send_data (const void *buf, int len)
-{
-  if (!sdi_desc)
-    return -1;
-
-  if (serial_write (sdi_desc, buf, len) != 0)
-    return -1;
-
-  if (get_ack () == -1)
-    return -1;
-
-  return len;
-}
-
-/* Receive data from the target.  */
-static int
-recv_data (void *buf, int len)
-{
-  int total = 0;
-  int c;
-
-  if (!sdi_desc)
-    return -1;
-
-  while (total < len)
-    {
-      c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-
-      if (c < 0)
-	return -1;
-
-      ((unsigned char *) buf)[total++] = c;
-    }
-
-  return len;
-}
-
-/* Store unsigned long parameter on packet.  */
-static void
-store_long_parameter (void *buf, long val)
-{
-  val = htonl (val);
-  memcpy (buf, &val, 4);
-}
-
-static int
-send_cmd (unsigned char cmd)
-{
-  unsigned char buf[1];
-
-  buf[0] = cmd;
-  return send_data (buf, 1);
-}
-
-static int
-send_one_arg_cmd (unsigned char cmd, unsigned char arg1)
-{
-  unsigned char buf[2];
-
-  buf[0] = cmd;
-  buf[1] = arg1;
-  return send_data (buf, 2);
-}
-
-static int
-send_two_arg_cmd (unsigned char cmd, unsigned char arg1, unsigned long arg2)
-{
-  unsigned char buf[6];
-
-  buf[0] = cmd;
-  buf[1] = arg1;
-  store_long_parameter (buf + 2, arg2);
-  return send_data (buf, 6);
-}
-
-static int
-send_three_arg_cmd (unsigned char cmd, unsigned long arg1, unsigned long arg2,
-		    unsigned long arg3)
-{
-  unsigned char buf[13];
-
-  buf[0] = cmd;
-  store_long_parameter (buf + 1, arg1);
-  store_long_parameter (buf + 5, arg2);
-  store_long_parameter (buf + 9, arg3);
-  return send_data (buf, 13);
-}
-
-static unsigned char
-recv_char_data (void)
-{
-  unsigned char val;
-
-  recv_data (&val, 1);
-  return val;
-}
-
-static unsigned long
-recv_long_data (void)
-{
-  unsigned long val;
-
-  recv_data (&val, 4);
-  return ntohl (val);
-}
-
-
-/* Check if MMU is on.  */
-static void
-check_mmu_status (void)
-{
-  unsigned long val;
-
-  /* Read PC address.  */
-  if (send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BPC) == -1)
-    return;
-  val = recv_long_data ();
-  if ((val & 0xc0000000) == 0x80000000)
-    {
-      mmu_on = 1;
-      return;
-    }
-
-  /* Read EVB address.  */
-  if (send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_EVB) == -1)
-    return;
-  val = recv_long_data ();
-  if ((val & 0xc0000000) == 0x80000000)
-    {
-      mmu_on = 1;
-      return;
-    }
-
-  mmu_on = 0;
-}
-
-
-/* This is called not only when we first attach, but also when the
-   user types "run" after having attached.  */
-static void
-m32r_create_inferior (struct target_ops *ops, char *execfile,
-		      char *args, char **env, int from_tty)
-{
-  CORE_ADDR entry_pt;
-
-  if (args && *args)
-    error (_("Cannot pass arguments to remote STDEBUG process"));
-
-  if (execfile == 0 || exec_bfd == 0)
-    error (_("No executable file specified"));
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_create_inferior(%s,%s)\n", execfile,
-			args);
-
-  entry_pt = bfd_get_start_address (exec_bfd);
-
-  /* The "process" (board) is already stopped awaiting our commands, and
-     the program is already downloaded.  We just set its PC and go.  */
-
-  clear_proceed_status (0);
-
-  /* Tell wait_for_inferior that we've started a new process.  */
-  init_wait_for_inferior ();
-
-  /* Set up the "saved terminal modes" of the inferior
-     based on what modes we are starting it with.  */
-  target_terminal_init ();
-
-  /* Install inferior's terminal modes.  */
-  target_terminal_inferior ();
-
-  regcache_write_pc (get_current_regcache (), entry_pt);
-}
-
-/* Open a connection to a remote debugger.
-   NAME is the filename used for communication.  */
-
-static void
-m32r_open (const char *args, int from_tty)
-{
-  struct hostent *host_ent;
-  struct sockaddr_in server_addr;
-  char hostname[256];
-  const char *port_str;
-  int port;
-  int i, n;
-  int yes = 1;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_open(%d)\n", from_tty);
-
-  target_preopen (from_tty);
-
-  push_target (&m32r_ops);
-
-  if (args == NULL)
-    xsnprintf (hostname, sizeof (hostname), "localhost:%d", SDIPORT);
-  else
-    {
-      port_str = strchr (args, ':');
-      if (port_str == NULL)
-	xsnprintf (hostname, sizeof (hostname), "%s:%d", args, SDIPORT);
-      else
-	xsnprintf (hostname, sizeof (hostname), "%s", args);
-    }
-
-  sdi_desc = serial_open (hostname);
-  if (!sdi_desc)
-    error (_("Connection refused."));
-
-  if (get_ack () == -1)
-    error (_("Cannot connect to SDI target."));
-
-  if (send_cmd (SDI_OPEN) == -1)
-    error (_("Cannot connect to SDI target."));
-
-  /* Get maximum number of ib breakpoints.  */
-  send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_BRK);
-  max_ib_breakpoints = recv_char_data ();
-  if (remote_debug)
-    printf_filtered ("Max IB Breakpoints = %d\n", max_ib_breakpoints);
-
-  /* Initialize breakpoints.  */
-  for (i = 0; i < MAX_BREAKPOINTS; i++)
-    bp_address[i] = 0xffffffff;
-
-  /* Get maximum number of access breaks.  */
-  send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_ABRK);
-  max_access_breaks = recv_char_data ();
-  if (remote_debug)
-    printf_filtered ("Max Access Breaks = %d\n", max_access_breaks);
-
-  /* Initialize access breask.  */
-  for (i = 0; i < MAX_ACCESS_BREAKS; i++)
-    ab_address[i] = 0x00000000;
-
-  check_mmu_status ();
-
-  /* Get the name of chip on target board.  */
-  send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_NAME);
-  recv_data (chip_name, 64);
-
-  if (from_tty)
-    printf_filtered ("Remote %s connected to %s\n", target_shortname,
-		     chip_name);
-}
-
-/* Close out all files and local state before this target loses control.  */
-
-static void
-m32r_close (struct target_ops *self)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_close()\n");
-
-  if (sdi_desc)
-    {
-      send_cmd (SDI_CLOSE);
-      serial_close (sdi_desc);
-      sdi_desc = NULL;
-    }
-
-  inferior_ptid = null_ptid;
-  delete_thread_silent (remote_m32r_ptid);
-  return;
-}
-
-/* Tell the remote machine to resume.  */
-
-static void
-m32r_resume (struct target_ops *ops,
-	     ptid_t ptid, int step, enum gdb_signal sig)
-{
-  unsigned long pc_addr, bp_addr, ab_addr;
-  int ib_breakpoints;
-  unsigned char buf[13];
-  int i;
-
-  if (remote_debug)
-    {
-      if (step)
-	fprintf_unfiltered (gdb_stdlog, "\nm32r_resume(step)\n");
-      else
-	fprintf_unfiltered (gdb_stdlog, "\nm32r_resume(cont)\n");
-    }
-
-  check_mmu_status ();
-
-  pc_addr = regcache_read_pc (get_current_regcache ());
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "pc <= 0x%lx\n", pc_addr);
-
-  /* At pc address there is a parallel instruction with +2 offset,
-     so we have to make it a serial instruction or avoid it.  */
-  if (pc_addr == last_pc_addr)
-    {
-      /* Avoid a parallel nop.  */
-      if (last_pc_addr_data[0] == 0xf0 && last_pc_addr_data[1] == 0x00)
-	{
-	  pc_addr += 2;
-	  /* Now we can forget this instruction.  */
-	  last_pc_addr = 0xffffffff;
-	}
-      /* Clear a parallel bit.  */
-      else
-	{
-	  buf[0] = SDI_WRITE_MEMORY;
-	  if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	    store_long_parameter (buf + 1, pc_addr);
-	  else
-	    store_long_parameter (buf + 1, pc_addr - 1);
-	  store_long_parameter (buf + 5, 1);
-	  buf[9] = last_pc_addr_data[0] & 0x7f;
-	  send_data (buf, 10);
-	}
-    }
-
-  /* Set PC.  */
-  send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BPC, pc_addr);
-
-  /* step mode.  */
-  step_mode = step;
-  if (step)
-    {
-      /* Set PBP.  */
-      send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PBP, pc_addr | 1);
-    }
-  else
-    {
-      /* Unset PBP.  */
-      send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PBP, 0x00000000);
-    }
-
-  if (use_ib_breakpoints)
-    ib_breakpoints = max_ib_breakpoints;
-  else
-    ib_breakpoints = 0;
-
-  /* Set ib breakpoints.  */
-  for (i = 0; i < ib_breakpoints; i++)
-    {
-      bp_addr = bp_address[i];
-
-      if (bp_addr == 0xffffffff)
-	continue;
-
-      /* Set PBP.  */
-      if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
-			    0x00000006);
-      else
-	send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
-			    0x06000000);
-
-      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8080 + 4 * i, 4, bp_addr);
-    }
-
-  /* Set dbt breakpoints.  */
-  for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
-    {
-      bp_addr = bp_address[i];
-
-      if (bp_addr == 0xffffffff)
-	continue;
-
-      if (!mmu_on)
-	bp_addr &= 0x7fffffff;
-
-      /* Write DBT instruction.  */
-      buf[0] = SDI_WRITE_MEMORY;
-      store_long_parameter (buf + 1, (bp_addr & 0xfffffffc));
-      store_long_parameter (buf + 5, 4);
-      if ((bp_addr & 2) == 0 && bp_addr != (pc_addr & 0xfffffffc))
-	{
-	  if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	    {
-	      buf[9] = dbt_bp_entry[0];
-	      buf[10] = dbt_bp_entry[1];
-	      buf[11] = dbt_bp_entry[2];
-	      buf[12] = dbt_bp_entry[3];
-	    }
-	  else
-	    {
-	      buf[9] = dbt_bp_entry[3];
-	      buf[10] = dbt_bp_entry[2];
-	      buf[11] = dbt_bp_entry[1];
-	      buf[12] = dbt_bp_entry[0];
-	    }
-	}
-      else
-	{
-	  if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	    {
-	      if ((bp_addr & 2) == 0)
-		{
-		  buf[9] = dbt_bp_entry[0];
-		  buf[10] = dbt_bp_entry[1];
-		  buf[11] = bp_data[i][2] & 0x7f;
-		  buf[12] = bp_data[i][3];
-		}
-	      else
-		{
-		  buf[9] = bp_data[i][0];
-		  buf[10] = bp_data[i][1];
-		  buf[11] = dbt_bp_entry[0];
-		  buf[12] = dbt_bp_entry[1];
-		}
-	    }
-	  else
-	    {
-	      if ((bp_addr & 2) == 0)
-		{
-		  buf[9] = bp_data[i][0];
-		  buf[10] = bp_data[i][1] & 0x7f;
-		  buf[11] = dbt_bp_entry[1];
-		  buf[12] = dbt_bp_entry[0];
-		}
-	      else
-		{
-		  buf[9] = dbt_bp_entry[1];
-		  buf[10] = dbt_bp_entry[0];
-		  buf[11] = bp_data[i][2];
-		  buf[12] = bp_data[i][3];
-		}
-	    }
-	}
-      send_data (buf, 13);
-    }
-
-  /* Set access breaks.  */
-  for (i = 0; i < max_access_breaks; i++)
-    {
-      ab_addr = ab_address[i];
-
-      if (ab_addr == 0x00000000)
-	continue;
-
-      /* DBC register.  */
-      if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	{
-	  switch (ab_type[i])
-	    {
-	    case 0:		/* write watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x00000086);
-	      break;
-	    case 1:		/* read watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x00000046);
-	      break;
-	    case 2:		/* access watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x00000006);
-	      break;
-	    }
-	}
-      else
-	{
-	  switch (ab_type[i])
-	    {
-	    case 0:		/* write watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x86000000);
-	      break;
-	    case 1:		/* read watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x46000000);
-	      break;
-	    case 2:		/* access watch */
-	      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-				  0x06000000);
-	      break;
-	    }
-	}
-
-      /* DBAH register.  */
-      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8180 + 4 * i, 4, ab_addr);
-
-      /* DBAL register.  */
-      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8200 + 4 * i, 4,
-			  0xffffffff);
-
-      /* DBD register.  */
-      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8280 + 4 * i, 4,
-			  0x00000000);
-
-      /* DBDM register.  */
-      send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8300 + 4 * i, 4,
-			  0x00000000);
-    }
-
-  /* Resume program.  */
-  send_cmd (SDI_EXEC_CPU);
-
-  /* Without this, some commands which require an active target (such as kill)
-     won't work.  This variable serves (at least) double duty as both the pid
-     of the target process (if it has such), and as a flag indicating that a
-     target is active.  These functions should be split out into seperate
-     variables, especially since GDB will someday have a notion of debugging
-     several processes.  */
-  inferior_ptid = remote_m32r_ptid;
-  add_thread_silent (remote_m32r_ptid);
-
-  return;
-}
-
-/* Wait until the remote machine stops, then return,
-   storing status in STATUS just as `wait' would.  */
-
-static void
-gdb_cntrl_c (int signo)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "interrupt\n");
-  interrupted = 1;
-}
-
-static ptid_t
-m32r_wait (struct target_ops *ops,
-	   ptid_t ptid, struct target_waitstatus *status, int options)
-{
-  static RETSIGTYPE (*prev_sigint) ();
-  unsigned long bp_addr, pc_addr;
-  int ib_breakpoints;
-  long i;
-  unsigned char buf[13];
-  int ret, c;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_wait()\n");
-
-  status->kind = TARGET_WAITKIND_EXITED;
-  status->value.sig = GDB_SIGNAL_0;
-
-  interrupted = 0;
-  prev_sigint = signal (SIGINT, gdb_cntrl_c);
-
-  /* Wait for ready.  */
-  buf[0] = SDI_WAIT_FOR_READY;
-  if (serial_write (sdi_desc, buf, 1) != 0)
-    error (_("Remote connection closed"));
-
-  while (1)
-    {
-      c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-      if (c < 0)
-	error (_("Remote connection closed"));
-
-      if (c == '-')		/* error */
-	{
-	  status->kind = TARGET_WAITKIND_STOPPED;
-	  status->value.sig = GDB_SIGNAL_HUP;
-	  return inferior_ptid;
-	}
-      else if (c == '+')	/* stopped */
-	break;
-
-      if (interrupted)
-	ret = serial_write (sdi_desc, "!", 1);	/* packet to interrupt */
-      else
-	ret = serial_write (sdi_desc, ".", 1);	/* packet to wait */
-      if (ret != 0)
-	error (_("Remote connection closed"));
-    }
-
-  status->kind = TARGET_WAITKIND_STOPPED;
-  if (interrupted)
-    status->value.sig = GDB_SIGNAL_INT;
-  else
-    status->value.sig = GDB_SIGNAL_TRAP;
-
-  interrupted = 0;
-  signal (SIGINT, prev_sigint);
-
-  check_mmu_status ();
-
-  /* Recover parallel bit.  */
-  if (last_pc_addr != 0xffffffff)
-    {
-      buf[0] = SDI_WRITE_MEMORY;
-      if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-	store_long_parameter (buf + 1, last_pc_addr);
-      else
-	store_long_parameter (buf + 1, last_pc_addr - 1);
-      store_long_parameter (buf + 5, 1);
-      buf[9] = last_pc_addr_data[0];
-      send_data (buf, 10);
-      last_pc_addr = 0xffffffff;
-    }
-
-  if (use_ib_breakpoints)
-    ib_breakpoints = max_ib_breakpoints;
-  else
-    ib_breakpoints = 0;
-
-  /* Set back pc by 2 if m32r is stopped with dbt.  */
-  last_pc_addr = 0xffffffff;
-  send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BPC);
-  pc_addr = recv_long_data () - 2;
-  for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
-    {
-      if (pc_addr == bp_address[i])
-	{
-	  send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BPC, pc_addr);
-
-	  /* If there is a parallel instruction with +2 offset at pc
-	     address, we have to take care of it later.  */
-	  if ((pc_addr & 0x2) != 0)
-	    {
-	      if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-		{
-		  if ((bp_data[i][2] & 0x80) != 0)
-		    {
-		      last_pc_addr = pc_addr;
-		      last_pc_addr_data[0] = bp_data[i][2];
-		      last_pc_addr_data[1] = bp_data[i][3];
-		    }
-		}
-	      else
-		{
-		  if ((bp_data[i][1] & 0x80) != 0)
-		    {
-		      last_pc_addr = pc_addr;
-		      last_pc_addr_data[0] = bp_data[i][1];
-		      last_pc_addr_data[1] = bp_data[i][0];
-		    }
-		}
-	    }
-	  break;
-	}
-    }
-
-  /* Remove ib breakpoints.  */
-  for (i = 0; i < ib_breakpoints; i++)
-    {
-      if (bp_address[i] != 0xffffffff)
-	send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
-			    0x00000000);
-    }
-  /* Remove dbt breakpoints.  */
-  for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
-    {
-      bp_addr = bp_address[i];
-      if (bp_addr != 0xffffffff)
-	{
-	  if (!mmu_on)
-	    bp_addr &= 0x7fffffff;
-	  buf[0] = SDI_WRITE_MEMORY;
-	  store_long_parameter (buf + 1, bp_addr & 0xfffffffc);
-	  store_long_parameter (buf + 5, 4);
-	  buf[9] = bp_data[i][0];
-	  buf[10] = bp_data[i][1];
-	  buf[11] = bp_data[i][2];
-	  buf[12] = bp_data[i][3];
-	  send_data (buf, 13);
-	}
-    }
-
-  /* Remove access breaks.  */
-  hit_watchpoint_addr = 0;
-  for (i = 0; i < max_access_breaks; i++)
-    {
-      if (ab_address[i] != 0x00000000)
-	{
-	  buf[0] = SDI_READ_MEMORY;
-	  store_long_parameter (buf + 1, 0xffff8100 + 4 * i);
-	  store_long_parameter (buf + 5, 4);
-	  serial_write (sdi_desc, buf, 9);
-	  c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-	  if (c != '-' && recv_data (buf, 4) != -1)
-	    {
-	      if (gdbarch_byte_order (target_gdbarch ()) == BFD_ENDIAN_BIG)
-		{
-		  if ((buf[3] & 0x1) == 0x1)
-		    hit_watchpoint_addr = ab_address[i];
-		}
-	      else
-		{
-		  if ((buf[0] & 0x1) == 0x1)
-		    hit_watchpoint_addr = ab_address[i];
-		}
-	    }
-
-	  send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
-			      0x00000000);
-	}
-    }
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "pc => 0x%lx\n", pc_addr);
-
-  return inferior_ptid;
-}
-
-/* Terminate the open connection to the remote debugger.
-   Use this when you want to detach and do something else
-   with your gdb.  */
-static void
-m32r_detach (struct target_ops *ops, const char *args, int from_tty)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_detach(%d)\n", from_tty);
-
-  m32r_resume (ops, inferior_ptid, 0, GDB_SIGNAL_0);
-
-  /* Calls m32r_close to do the real work.  */
-  unpush_target (ops);
-  if (from_tty)
-    fprintf_unfiltered (gdb_stdlog, "Ending remote %s debugging\n",
-			target_shortname);
-}
-
-/* Return the id of register number REGNO.  */
-
-static int
-get_reg_id (int regno)
-{
-  switch (regno)
-    {
-    case 20:
-      return SDI_REG_BBPC;
-    case 21:
-      return SDI_REG_BPC;
-    case 22:
-      return SDI_REG_ACCL;
-    case 23:
-      return SDI_REG_ACCH;
-    case 24:
-      return SDI_REG_EVB;
-    }
-
-  return regno;
-}
-
-/* Fetch register REGNO, or all registers if REGNO is -1.
-   Returns errno value.  */
-static void
-m32r_fetch_register (struct target_ops *ops,
-		     struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  unsigned long val, val2, regid;
-
-  if (regno == -1)
-    {
-      for (regno = 0;
-	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
-	   regno++)
-	m32r_fetch_register (ops, regcache, regno);
-    }
-  else
-    {
-      gdb_byte buffer[MAX_REGISTER_SIZE];
-
-      regid = get_reg_id (regno);
-      send_one_arg_cmd (SDI_READ_CPU_REG, regid);
-      val = recv_long_data ();
-
-      if (regid == SDI_REG_PSW)
-	{
-	  send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BBPSW);
-	  val2 = recv_long_data ();
-	  val = ((0x00cf & val2) << 8) | ((0xcf00 & val) >> 8);
-	}
-
-      if (remote_debug)
-	fprintf_unfiltered (gdb_stdlog, "m32r_fetch_register(%d,0x%08lx)\n",
-			    regno, val);
-
-      /* We got the number the register holds, but gdb expects to see a
-         value in the target byte ordering.  */
-      store_unsigned_integer (buffer, 4, byte_order, val);
-      regcache_raw_supply (regcache, regno, buffer);
-    }
-  return;
-}
-
-/* Store register REGNO, or all if REGNO == 0.
-   Return errno value.  */
-static void
-m32r_store_register (struct target_ops *ops,
-		     struct regcache *regcache, int regno)
-{
-  int regid;
-  ULONGEST regval, tmp;
-
-  if (regno == -1)
-    {
-      for (regno = 0;
-	   regno < gdbarch_num_regs (get_regcache_arch (regcache));
-	   regno++)
-	m32r_store_register (ops, regcache, regno);
-    }
-  else
-    {
-      regcache_cooked_read_unsigned (regcache, regno, &regval);
-      regid = get_reg_id (regno);
-
-      if (regid == SDI_REG_PSW)
-	{
-	  unsigned long psw, bbpsw;
-
-	  send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_PSW);
-	  psw = recv_long_data ();
-
-	  send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BBPSW);
-	  bbpsw = recv_long_data ();
-
-	  tmp = (0x00cf & psw) | ((0x00cf & regval) << 8);
-	  send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PSW, tmp);
-
-	  tmp = (0x0030 & bbpsw) | ((0xcf00 & regval) >> 8);
-	  send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BBPSW, tmp);
-	}
-      else
-	{
-	  send_two_arg_cmd (SDI_WRITE_CPU_REG, regid, regval);
-	}
-
-      if (remote_debug)
-	fprintf_unfiltered (gdb_stdlog, "m32r_store_register(%d,0x%08lu)\n",
-			    regno, (unsigned long) regval);
-    }
-}
-
-/* Get ready to modify the registers array.  On machines which store
-   individual registers, this doesn't need to do anything.  On machines
-   which store all the registers in one fell swoop, this makes sure
-   that registers contains all the registers from the program being
-   debugged.  */
-
-static void
-m32r_prepare_to_store (struct target_ops *self, struct regcache *regcache)
-{
-  /* Do nothing, since we can store individual regs.  */
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_prepare_to_store()\n");
-}
-
-static void
-m32r_files_info (struct target_ops *target)
-{
-  const char *file = "nothing";
-
-  if (exec_bfd)
-    {
-      file = bfd_get_filename (exec_bfd);
-      printf_filtered ("\tAttached to %s running program %s\n",
-		       chip_name, file);
-    }
-}
-
-/* Helper for m32r_xfer_partial that handles memory transfers.
-   Arguments are like target_xfer_partial.  */
-
-static enum target_xfer_status
-m32r_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-		  ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
-{
-  unsigned long taddr;
-  unsigned char buf[0x2000];
-  int ret, c;
-
-  taddr = memaddr;
-
-  if (!mmu_on)
-    {
-      if ((taddr & 0xa0000000) == 0x80000000)
-	taddr &= 0x7fffffff;
-    }
-
-  if (remote_debug)
-    {
-      if (writebuf != NULL)
-	fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%s,write)\n",
-			    paddress (target_gdbarch (), memaddr),
-			    plongest (len));
-      else
-	fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%s,read)\n",
-			    paddress (target_gdbarch (), memaddr),
-			    plongest (len));
-    }
-
-  if (writebuf != NULL)
-    {
-      buf[0] = SDI_WRITE_MEMORY;
-      store_long_parameter (buf + 1, taddr);
-      store_long_parameter (buf + 5, len);
-      if (len < 0x1000)
-	{
-	  memcpy (buf + 9, writebuf, len);
-	  ret = send_data (buf, len + 9) - 9;
-	}
-      else
-	{
-	  if (serial_write (sdi_desc, buf, 9) != 0)
-	    {
-	      if (remote_debug)
-		fprintf_unfiltered (gdb_stdlog,
-				    "m32r_xfer_memory() failed\n");
-	      return TARGET_XFER_EOF;
-	    }
-	  ret = send_data (writebuf, len);
-	}
-    }
-  else
-    {
-      buf[0] = SDI_READ_MEMORY;
-      store_long_parameter (buf + 1, taddr);
-      store_long_parameter (buf + 5, len);
-      if (serial_write (sdi_desc, buf, 9) != 0)
-	{
-	  if (remote_debug)
-	    fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory() failed\n");
-	  return TARGET_XFER_EOF;
-	}
-
-      c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-      if (c < 0 || c == '-')
-	{
-	  if (remote_debug)
-	    fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory() failed\n");
-	  return TARGET_XFER_EOF;
-	}
-
-      ret = recv_data (readbuf, len);
-    }
-
-  if (ret <= 0)
-    {
-      if (remote_debug)
-	fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory() fails\n");
-      return TARGET_XFER_E_IO;
-    }
-
-  *xfered_len = ret;
-  return TARGET_XFER_OK;
-}
-
-/* Target to_xfer_partial implementation.  */
-
-static enum target_xfer_status
-m32r_xfer_partial (struct target_ops *ops, enum target_object object,
-		   const char *annex, gdb_byte *readbuf,
-		   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
-		   ULONGEST *xfered_len)
-{
-  switch (object)
-    {
-    case TARGET_OBJECT_MEMORY:
-      return m32r_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
-
-    default:
-      return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
-					    readbuf, writebuf, offset, len,
-					    xfered_len);
-    }
-}
-
-static void
-m32r_kill (struct target_ops *ops)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_kill()\n");
-
-  inferior_ptid = null_ptid;
-  delete_thread_silent (remote_m32r_ptid);
-
-  return;
-}
-
-/* Clean up when a program exits.
-
-   The program actually lives on in the remote processor's RAM, and may be
-   run again without a download.  Don't leave it full of breakpoint
-   instructions.  */
-
-static void
-m32r_mourn_inferior (struct target_ops *ops)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_mourn_inferior()\n");
-
-  remove_breakpoints ();
-  generic_mourn_inferior ();
-}
-
-static int
-m32r_insert_breakpoint (struct target_ops *ops,
-			struct gdbarch *gdbarch,
-			struct bp_target_info *bp_tgt)
-{
-  CORE_ADDR addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
-  int ib_breakpoints;
-  unsigned char buf[13];
-  int i, c;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_insert_breakpoint(%s,...)\n",
-			paddress (gdbarch, addr));
-
-  if (use_ib_breakpoints)
-    ib_breakpoints = max_ib_breakpoints;
-  else
-    ib_breakpoints = 0;
-
-  for (i = 0; i < MAX_BREAKPOINTS; i++)
-    {
-      if (bp_address[i] == 0xffffffff)
-	{
-	  bp_address[i] = addr;
-	  if (i >= ib_breakpoints)
-	    {
-	      buf[0] = SDI_READ_MEMORY;
-	      if (mmu_on)
-		store_long_parameter (buf + 1, addr & 0xfffffffc);
-	      else
-		store_long_parameter (buf + 1, addr & 0x7ffffffc);
-	      store_long_parameter (buf + 5, 4);
-	      serial_write (sdi_desc, buf, 9);
-	      c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-	      if (c != '-')
-		recv_data (bp_data[i], 4);
-	    }
-	  return 0;
-	}
-    }
-
-  error (_("Too many breakpoints"));
-  return 1;
-}
-
-static int
-m32r_remove_breakpoint (struct target_ops *ops,
-			struct gdbarch *gdbarch,
-			struct bp_target_info *bp_tgt)
-{
-  CORE_ADDR addr = bp_tgt->placed_address;
-  int i;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_remove_breakpoint(%s)\n",
-			paddress (gdbarch, addr));
-
-  for (i = 0; i < MAX_BREAKPOINTS; i++)
-    {
-      if (bp_address[i] == addr)
-	{
-	  bp_address[i] = 0xffffffff;
-	  break;
-	}
-    }
-
-  return 0;
-}
-
-static void
-m32r_load (struct target_ops *self, const char *args, int from_tty)
-{
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  asection *section;
-  bfd *pbfd;
-  bfd_vma entry;
-  char *filename;
-  int quiet;
-  int nostart;
-  struct timeval start_time, end_time;
-  unsigned long data_count;	/* Number of bytes transferred to memory.  */
-  static RETSIGTYPE (*prev_sigint) ();
-
-  /* for direct tcp connections, we can do a fast binary download.  */
-  quiet = 0;
-  nostart = 0;
-  filename = NULL;
-
-  while (*args != '\000')
-    {
-      char *arg = extract_arg_const (&args);
-
-      if (arg == NULL)
-	break;
-      make_cleanup (xfree, arg);
-
-      if (*arg != '-')
-	filename = arg;
-      else if (startswith ("-quiet", arg))
-	quiet = 1;
-      else if (startswith ("-nostart", arg))
-	nostart = 1;
-      else
-	error (_("Unknown option `%s'"), arg);
-    }
-
-  if (!filename)
-    filename = get_exec_file (1);
-
-  pbfd = gdb_bfd_open (filename, gnutarget, -1);
-  if (pbfd == NULL)
-    perror_with_name (filename);
-  make_cleanup_bfd_unref (pbfd);
-
-  if (!bfd_check_format (pbfd, bfd_object))
-    error (_("\"%s\" is not an object file: %s"), filename,
-	   bfd_errmsg (bfd_get_error ()));
-
-  gettimeofday (&start_time, NULL);
-  data_count = 0;
-
-  interrupted = 0;
-  prev_sigint = signal (SIGINT, gdb_cntrl_c);
-
-  for (section = pbfd->sections; section; section = section->next)
-    {
-      if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
-	{
-	  bfd_vma section_address;
-	  bfd_size_type section_size;
-	  file_ptr fptr;
-	  int n;
-
-	  section_address = bfd_section_lma (pbfd, section);
-	  section_size = bfd_get_section_size (section);
-
-	  if (!mmu_on)
-	    {
-	      if ((section_address & 0xa0000000) == 0x80000000)
-		section_address &= 0x7fffffff;
-	    }
-
-	  if (!quiet)
-	    printf_filtered ("[Loading section %s at 0x%lx (%d bytes)]\n",
-			     bfd_get_section_name (pbfd, section),
-			     (unsigned long) section_address,
-			     (int) section_size);
-
-	  fptr = 0;
-
-	  data_count += section_size;
-
-	  n = 0;
-	  while (section_size > 0)
-	    {
-	      char unsigned buf[0x1000 + 9];
-	      int count;
-
-	      count = min (section_size, 0x1000);
-
-	      buf[0] = SDI_WRITE_MEMORY;
-	      store_long_parameter (buf + 1, section_address);
-	      store_long_parameter (buf + 5, count);
-
-	      bfd_get_section_contents (pbfd, section, buf + 9, fptr, count);
-	      if (send_data (buf, count + 9) <= 0)
-		error (_("Error while downloading %s section."),
-		       bfd_get_section_name (pbfd, section));
-
-	      if (!quiet)
-		{
-		  printf_unfiltered (".");
-		  if (n++ > 60)
-		    {
-		      printf_unfiltered ("\n");
-		      n = 0;
-		    }
-		  gdb_flush (gdb_stdout);
-		}
-
-	      section_address += count;
-	      fptr += count;
-	      section_size -= count;
-
-	      if (interrupted)
-		break;
-	    }
-
-	  if (!quiet && !interrupted)
-	    {
-	      printf_unfiltered ("done.\n");
-	      gdb_flush (gdb_stdout);
-	    }
-	}
-
-      if (interrupted)
-	{
-	  printf_unfiltered ("Interrupted.\n");
-	  break;
-	}
-    }
-
-  interrupted = 0;
-  signal (SIGINT, prev_sigint);
-
-  gettimeofday (&end_time, NULL);
-
-  /* Make the PC point at the start address.  */
-  if (exec_bfd)
-    regcache_write_pc (get_current_regcache (),
-		       bfd_get_start_address (exec_bfd));
-
-  inferior_ptid = null_ptid;	/* No process now.  */
-  delete_thread_silent (remote_m32r_ptid);
-
-  /* This is necessary because many things were based on the PC at the time
-     that we attached to the monitor, which is no longer valid now that we
-     have loaded new code (and just changed the PC).  Another way to do this
-     might be to call normal_stop, except that the stack may not be valid,
-     and things would get horribly confused...  */
-
-  clear_symtab_users (0);
-
-  if (!nostart)
-    {
-      entry = bfd_get_start_address (pbfd);
-
-      if (!quiet)
-	printf_unfiltered ("[Starting %s at 0x%lx]\n", filename,
-			   (unsigned long) entry);
-    }
-
-  print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
-			      &end_time);
-
-  do_cleanups (old_chain);
-}
-
-static void
-m32r_stop (struct target_ops *self, ptid_t ptid)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_stop()\n");
-
-  send_cmd (SDI_STOP_CPU);
-
-  return;
-}
-
-
-/* Tell whether this target can support a hardware breakpoint.  CNT
-   is the number of hardware breakpoints already installed.  This
-   implements the target_can_use_hardware_watchpoint macro.  */
-
-static int
-m32r_can_use_hw_watchpoint (struct target_ops *self,
-			    int type, int cnt, int othertype)
-{
-  return sdi_desc != NULL && cnt < max_access_breaks;
-}
-
-/* Set a data watchpoint.  ADDR and LEN should be obvious.  TYPE is 0
-   for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write
-   watchpoint.  */
-
-static int
-m32r_insert_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
-			struct expression *cond)
-{
-  int i;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
-			paddress (target_gdbarch (), addr), len, type);
-
-  for (i = 0; i < MAX_ACCESS_BREAKS; i++)
-    {
-      if (ab_address[i] == 0x00000000)
-	{
-	  ab_address[i] = addr;
-	  ab_size[i] = len;
-	  ab_type[i] = type;
-	  return 0;
-	}
-    }
-
-  error (_("Too many watchpoints"));
-  return 1;
-}
-
-static int
-m32r_remove_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
-			struct expression *cond)
-{
-  int i;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
-			paddress (target_gdbarch (), addr), len, type);
-
-  for (i = 0; i < MAX_ACCESS_BREAKS; i++)
-    {
-      if (ab_address[i] == addr)
-	{
-	  ab_address[i] = 0x00000000;
-	  break;
-	}
-    }
-
-  return 0;
-}
-
-static int
-m32r_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
-{
-  int rc = 0;
-
-  if (hit_watchpoint_addr != 0x00000000)
-    {
-      *addr_p = hit_watchpoint_addr;
-      rc = 1;
-    }
-  return rc;
-}
-
-static int
-m32r_stopped_by_watchpoint (struct target_ops *ops)
-{
-  CORE_ADDR addr;
-
-  return m32r_stopped_data_address (&current_target, &addr);
-}
-
-/* Check to see if a thread is still alive.  */
-
-static int
-m32r_thread_alive (struct target_ops *ops, ptid_t ptid)
-{
-  if (ptid_equal (ptid, remote_m32r_ptid))
-    /* The main task is always alive.  */
-    return 1;
-
-  return 0;
-}
-
-/* Convert a thread ID to a string.  Returns the string in a static
-   buffer.  */
-
-static char *
-m32r_pid_to_str (struct target_ops *ops, ptid_t ptid)
-{
-  static char buf[64];
-
-  if (ptid_equal (remote_m32r_ptid, ptid))
-    {
-      xsnprintf (buf, sizeof buf, "Thread <main>");
-      return buf;
-    }
-
-  return normal_pid_to_str (ptid);
-}
-
-static void
-sdireset_command (char *args, int from_tty)
-{
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_sdireset()\n");
-
-  send_cmd (SDI_OPEN);
-
-  inferior_ptid = null_ptid;
-  delete_thread_silent (remote_m32r_ptid);
-}
-
-
-static void
-sdistatus_command (char *args, int from_tty)
-{
-  unsigned char buf[4096];
-  int i, c;
-
-  if (remote_debug)
-    fprintf_unfiltered (gdb_stdlog, "m32r_sdireset()\n");
-
-  if (!sdi_desc)
-    return;
-
-  send_cmd (SDI_STATUS);
-  for (i = 0; i < 4096; i++)
-    {
-      c = serial_readchar (sdi_desc, SDI_TIMEOUT);
-      if (c < 0)
-	return;
-      buf[i] = c;
-      if (c == 0)
-	break;
-    }
-
-  printf_filtered ("%s", buf);
-}
-
-
-static void
-debug_chaos_command (char *args, int from_tty)
-{
-  unsigned char buf[3];
-
-  buf[0] = SDI_SET_ATTR;
-  buf[1] = SDI_ATTR_CACHE;
-  buf[2] = SDI_CACHE_TYPE_CHAOS;
-  send_data (buf, 3);
-}
-
-
-static void
-use_debug_dma_command (char *args, int from_tty)
-{
-  unsigned char buf[3];
-
-  buf[0] = SDI_SET_ATTR;
-  buf[1] = SDI_ATTR_MEM_ACCESS;
-  buf[2] = SDI_MEM_ACCESS_DEBUG_DMA;
-  send_data (buf, 3);
-}
-
-static void
-use_mon_code_command (char *args, int from_tty)
-{
-  unsigned char buf[3];
-
-  buf[0] = SDI_SET_ATTR;
-  buf[1] = SDI_ATTR_MEM_ACCESS;
-  buf[2] = SDI_MEM_ACCESS_MON_CODE;
-  send_data (buf, 3);
-}
-
-
-static void
-use_ib_breakpoints_command (char *args, int from_tty)
-{
-  use_ib_breakpoints = 1;
-}
-
-static void
-use_dbt_breakpoints_command (char *args, int from_tty)
-{
-  use_ib_breakpoints = 0;
-}
-
-static int
-m32r_return_one (struct target_ops *target)
-{
-  return 1;
-}
-
-/* Implementation of the to_has_execution method.  */
-
-static int
-m32r_has_execution (struct target_ops *target, ptid_t the_ptid)
-{
-  return 1;
-}
-
-/* Define the target subroutine names.  */
-
-struct target_ops m32r_ops;
-
-static void
-init_m32r_ops (void)
-{
-  m32r_ops.to_shortname = "m32rsdi";
-  m32r_ops.to_longname = "Remote M32R debugging over SDI interface";
-  m32r_ops.to_doc = "Use an M32R board using SDI debugging protocol.";
-  m32r_ops.to_open = m32r_open;
-  m32r_ops.to_close = m32r_close;
-  m32r_ops.to_detach = m32r_detach;
-  m32r_ops.to_resume = m32r_resume;
-  m32r_ops.to_wait = m32r_wait;
-  m32r_ops.to_fetch_registers = m32r_fetch_register;
-  m32r_ops.to_store_registers = m32r_store_register;
-  m32r_ops.to_prepare_to_store = m32r_prepare_to_store;
-  m32r_ops.to_xfer_partial = m32r_xfer_partial;
-  m32r_ops.to_files_info = m32r_files_info;
-  m32r_ops.to_insert_breakpoint = m32r_insert_breakpoint;
-  m32r_ops.to_remove_breakpoint = m32r_remove_breakpoint;
-  m32r_ops.to_can_use_hw_breakpoint = m32r_can_use_hw_watchpoint;
-  m32r_ops.to_insert_watchpoint = m32r_insert_watchpoint;
-  m32r_ops.to_remove_watchpoint = m32r_remove_watchpoint;
-  m32r_ops.to_stopped_by_watchpoint = m32r_stopped_by_watchpoint;
-  m32r_ops.to_stopped_data_address = m32r_stopped_data_address;
-  m32r_ops.to_kill = m32r_kill;
-  m32r_ops.to_load = m32r_load;
-  m32r_ops.to_create_inferior = m32r_create_inferior;
-  m32r_ops.to_mourn_inferior = m32r_mourn_inferior;
-  m32r_ops.to_stop = m32r_stop;
-  m32r_ops.to_log_command = serial_log_command;
-  m32r_ops.to_thread_alive = m32r_thread_alive;
-  m32r_ops.to_pid_to_str = m32r_pid_to_str;
-  m32r_ops.to_stratum = process_stratum;
-  m32r_ops.to_has_all_memory = m32r_return_one;
-  m32r_ops.to_has_memory = m32r_return_one;
-  m32r_ops.to_has_stack = m32r_return_one;
-  m32r_ops.to_has_registers = m32r_return_one;
-  m32r_ops.to_has_execution = m32r_has_execution;
-  m32r_ops.to_magic = OPS_MAGIC;
-};
-
-
-extern initialize_file_ftype _initialize_remote_m32r;
-
-void
-_initialize_remote_m32r (void)
-{
-  int i;
-
-  init_m32r_ops ();
-
-  /* Initialize breakpoints.  */
-  for (i = 0; i < MAX_BREAKPOINTS; i++)
-    bp_address[i] = 0xffffffff;
-
-  /* Initialize access breaks.  */
-  for (i = 0; i < MAX_ACCESS_BREAKS; i++)
-    ab_address[i] = 0x00000000;
-
-  add_target (&m32r_ops);
-
-  add_com ("sdireset", class_obscure, sdireset_command,
-	   _("Reset SDI connection."));
-
-  add_com ("sdistatus", class_obscure, sdistatus_command,
-	   _("Show status of SDI connection."));
-
-  add_com ("debug_chaos", class_obscure, debug_chaos_command,
-	   _("Debug M32R/Chaos."));
-
-  add_com ("use_debug_dma", class_obscure, use_debug_dma_command,
-	   _("Use debug DMA mem access."));
-  add_com ("use_mon_code", class_obscure, use_mon_code_command,
-	   _("Use mon code mem access."));
-
-  add_com ("use_ib_break", class_obscure, use_ib_breakpoints_command,
-	   _("Set breakpoints by IB break."));
-  add_com ("use_dbt_break", class_obscure, use_dbt_breakpoints_command,
-	   _("Set breakpoints by dbt."));
-
-  /* Yes, 42000 is arbitrary.  The only sense out of it, is that it
-     isn't 0.  */
-  remote_m32r_ptid = ptid_build (42000, 0, 42000);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-mips.c ./gdb/remote-mips.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-mips.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-mips.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,3764 +0,0 @@
-/* Remote debugging interface for MIPS remote debugging protocol.
-
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
-
-   Contributed by Cygnus Support.  Written by Ian Lance Taylor
-   <ian@cygnus.com>.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "infrun.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "gdbcmd.h"
-#include "gdbcore.h"
-#include "serial.h"
-#include "target.h"
-#include <sys/stat.h>
-#include "gdb_usleep.h"
-#include "regcache.h"
-#include <ctype.h>
-#include "mips-tdep.h"
-#include "gdbthread.h"
-#include "gdb_bfd.h"
-
-
-/* Breakpoint types.  Values 0, 1, and 2 must agree with the watch
-   types passed by breakpoint.c to target_insert_watchpoint.
-   Value 3 is our own invention, and is used for ordinary instruction
-   breakpoints.  Value 4 is used to mark an unused watchpoint in tables.  */
-enum break_type
-  {
-    BREAK_WRITE,		/* 0 */
-    BREAK_READ,			/* 1 */
-    BREAK_ACCESS,		/* 2 */
-    BREAK_FETCH,		/* 3 */
-    BREAK_UNUSED		/* 4 */
-  };
-
-/* Prototypes for local functions.  */
-
-static int mips_readchar (int timeout);
-
-static int mips_receive_header (unsigned char *hdr, int *pgarbage,
-				int ch, int timeout);
-
-static int mips_receive_trailer (unsigned char *trlr, int *pgarbage,
-				 int *pch, int timeout);
-
-static int mips_cksum (const unsigned char *hdr,
-		       const char *data, int len);
-
-static void mips_send_packet (const char *s, int get_ack);
-
-static void mips_send_command (const char *cmd, int prompt);
-
-static int mips_receive_packet (char *buff, int throw_error, int timeout);
-
-static ULONGEST mips_request (int cmd, ULONGEST addr, ULONGEST data,
-			      int *perr, int timeout, char *buff);
-
-static void mips_initialize (void);
-
-static void mips_close (struct target_ops *self);
-
-static int mips_map_regno (struct gdbarch *, int);
-
-static void mips_set_register (int regno, ULONGEST value);
-
-static void mips_prepare_to_store (struct target_ops *self,
-				   struct regcache *regcache);
-
-static int mips_fetch_word (CORE_ADDR addr, unsigned int *valp);
-
-static int mips_store_word (CORE_ADDR addr, unsigned int value,
-			    int *old_contents);
-
-static enum target_xfer_status mips_xfer_memory (gdb_byte *readbuf,
-						 const gdb_byte *writebuf,
-						 ULONGEST memaddr,
-						 ULONGEST len,
-						 ULONGEST *xfered_len);
-
-static void mips_files_info (struct target_ops *ignore);
-
-static void mips_mourn_inferior (struct target_ops *ops);
-
-static int pmon_makeb64 (unsigned long v, char *p, int n, unsigned int *chksum);
-
-static int pmon_zeroset (int recsize, char **buff, unsigned int *amount,
-			 unsigned int *chksum);
-
-static int pmon_checkset (int recsize, char **buff, unsigned int *value);
-
-static void pmon_make_fastrec (char **outbuf, unsigned char *inbuf,
-			       int *inptr, int inamount, int *recsize,
-			       unsigned int *csum, unsigned int *zerofill);
-
-static int pmon_check_ack (char *mesg);
-
-static void pmon_start_download (void);
-
-static void pmon_end_download (int final, int bintotal);
-
-static void pmon_download (char *buffer, int length);
-
-static void mips_load (struct target_ops *self, const char *file, int from_tty);
-
-static int mips_make_srec (char *buffer, int type, CORE_ADDR memaddr,
-			   unsigned char *myaddr, int len);
-
-static int mips_set_breakpoint (CORE_ADDR addr, int len, enum break_type type);
-
-static int mips_clear_breakpoint (CORE_ADDR addr, int len,
-				  enum break_type type);
-
-static int mips_common_breakpoint (int set, CORE_ADDR addr, int len,
-				   enum break_type type);
-
-/* Forward declarations.  */
-extern struct target_ops mips_ops;
-extern struct target_ops pmon_ops;
-extern struct target_ops ddb_ops;
-extern struct target_ops rockhopper_ops;
-/* *INDENT-OFF* */
-/* The MIPS remote debugging interface is built on top of a simple
-   packet protocol.  Each packet is organized as follows:
-
-   SYN  The first character is always a SYN (ASCII 026, or ^V).  SYN
-   may not appear anywhere else in the packet.  Any time a SYN is
-   seen, a new packet should be assumed to have begun.
-
-   TYPE_LEN
-   This byte contains the upper five bits of the logical length
-   of the data section, plus a single bit indicating whether this
-   is a data packet or an acknowledgement.  The documentation
-   indicates that this bit is 1 for a data packet, but the actual
-   board uses 1 for an acknowledgement.  The value of the byte is
-   0x40 + (ack ? 0x20 : 0) + (len >> 6)
-   (we always have 0 <= len < 1024).  Acknowledgement packets do
-   not carry data, and must have a data length of 0.
-
-   LEN1 This byte contains the lower six bits of the logical length of
-   the data section.  The value is
-   0x40 + (len & 0x3f)
-
-   SEQ  This byte contains the six bit sequence number of the packet.
-   The value is
-   0x40 + seq
-   An acknowlegment packet contains the sequence number of the
-   packet being acknowledged plus 1 modulo 64.  Data packets are
-   transmitted in sequence.  There may only be one outstanding
-   unacknowledged data packet at a time.  The sequence numbers
-   are independent in each direction.  If an acknowledgement for
-   the previous packet is received (i.e., an acknowledgement with
-   the sequence number of the packet just sent) the packet just
-   sent should be retransmitted.  If no acknowledgement is
-   received within a timeout period, the packet should be
-   retransmitted.  This has an unfortunate failure condition on a
-   high-latency line, as a delayed acknowledgement may lead to an
-   endless series of duplicate packets.
-
-   DATA The actual data bytes follow.  The following characters are
-   escaped inline with DLE (ASCII 020, or ^P):
-   SYN (026)    DLE S
-   DLE (020)    DLE D
-   ^C  (003)    DLE C
-   ^S  (023)    DLE s
-   ^Q  (021)    DLE q
-   The additional DLE characters are not counted in the logical
-   length stored in the TYPE_LEN and LEN1 bytes.
-
-   CSUM1
-   CSUM2
-   CSUM3
-   These bytes contain an 18 bit checksum of the complete
-   contents of the packet excluding the SEQ byte and the
-   CSUM[123] bytes.  The checksum is simply the twos complement
-   addition of all the bytes treated as unsigned characters.  The
-   values of the checksum bytes are:
-   CSUM1: 0x40 + ((cksum >> 12) & 0x3f)
-   CSUM2: 0x40 + ((cksum >> 6) & 0x3f)
-   CSUM3: 0x40 + (cksum & 0x3f)
-
-   It happens that the MIPS remote debugging protocol always
-   communicates with ASCII strings.  Because of this, this
-   implementation doesn't bother to handle the DLE quoting mechanism,
-   since it will never be required.  */
-/* *INDENT-ON* */
-
-
-/* The SYN character which starts each packet.  */
-#define SYN '\026'
-
-/* The 0x40 used to offset each packet (this value ensures that all of
-   the header and trailer bytes, other than SYN, are printable ASCII
-   characters).  */
-#define HDR_OFFSET 0x40
-
-/* The indices of the bytes in the packet header.  */
-#define HDR_INDX_SYN 0
-#define HDR_INDX_TYPE_LEN 1
-#define HDR_INDX_LEN1 2
-#define HDR_INDX_SEQ 3
-#define HDR_LENGTH 4
-
-/* The data/ack bit in the TYPE_LEN header byte.  */
-#define TYPE_LEN_DA_BIT 0x20
-#define TYPE_LEN_DATA 0
-#define TYPE_LEN_ACK TYPE_LEN_DA_BIT
-
-/* How to compute the header bytes.  */
-#define HDR_SET_SYN(data, len, seq) (SYN)
-#define HDR_SET_TYPE_LEN(data, len, seq) \
-  (HDR_OFFSET \
-   + ((data) ? TYPE_LEN_DATA : TYPE_LEN_ACK) \
-   + (((len) >> 6) & 0x1f))
-#define HDR_SET_LEN1(data, len, seq) (HDR_OFFSET + ((len) & 0x3f))
-#define HDR_SET_SEQ(data, len, seq) (HDR_OFFSET + (seq))
-
-/* Check that a header byte is reasonable.  */
-#define HDR_CHECK(ch) (((ch) & HDR_OFFSET) == HDR_OFFSET)
-
-/* Get data from the header.  These macros evaluate their argument
-   multiple times.  */
-#define HDR_IS_DATA(hdr) \
-  (((hdr)[HDR_INDX_TYPE_LEN] & TYPE_LEN_DA_BIT) == TYPE_LEN_DATA)
-#define HDR_GET_LEN(hdr) \
-  ((((hdr)[HDR_INDX_TYPE_LEN] & 0x1f) << 6) + (((hdr)[HDR_INDX_LEN1] & 0x3f)))
-#define HDR_GET_SEQ(hdr) ((unsigned int)(hdr)[HDR_INDX_SEQ] & 0x3f)
-
-/* The maximum data length.  */
-#define DATA_MAXLEN 1023
-
-/* The trailer offset.  */
-#define TRLR_OFFSET HDR_OFFSET
-
-/* The indices of the bytes in the packet trailer.  */
-#define TRLR_INDX_CSUM1 0
-#define TRLR_INDX_CSUM2 1
-#define TRLR_INDX_CSUM3 2
-#define TRLR_LENGTH 3
-
-/* How to compute the trailer bytes.  */
-#define TRLR_SET_CSUM1(cksum) (TRLR_OFFSET + (((cksum) >> 12) & 0x3f))
-#define TRLR_SET_CSUM2(cksum) (TRLR_OFFSET + (((cksum) >>  6) & 0x3f))
-#define TRLR_SET_CSUM3(cksum) (TRLR_OFFSET + (((cksum)      ) & 0x3f))
-
-/* Check that a trailer byte is reasonable.  */
-#define TRLR_CHECK(ch) (((ch) & TRLR_OFFSET) == TRLR_OFFSET)
-
-/* Get data from the trailer.  This evaluates its argument multiple
-   times.  */
-#define TRLR_GET_CKSUM(trlr) \
-  ((((trlr)[TRLR_INDX_CSUM1] & 0x3f) << 12) \
-   + (((trlr)[TRLR_INDX_CSUM2] & 0x3f) <<  6) \
-   + ((trlr)[TRLR_INDX_CSUM3] & 0x3f))
-
-/* The sequence number modulos.  */
-#define SEQ_MODULOS (64)
-
-/* PMON commands to load from the serial port or UDP socket.  */
-#define LOAD_CMD	"load -b -s tty0\r"
-#define LOAD_CMD_UDP	"load -b -s udp\r"
-
-/* The target vectors for the four different remote MIPS targets.
-   These are initialized with code in _initialize_remote_mips instead
-   of static initializers, to make it easier to extend the target_ops
-   vector later.  */
-struct target_ops mips_ops, pmon_ops, ddb_ops, rockhopper_ops, lsi_ops;
-
-enum mips_monitor_type
-  {
-    /* IDT/SIM monitor being used: */
-    MON_IDT,
-    /* PMON monitor being used: */
-    MON_PMON,			/* 3.0.83 [COGENT,EB,FP,NET]
-				   Algorithmics Ltd. Nov  9 1995 17:19:50 */
-    MON_DDB,			/* 2.7.473 [DDBVR4300,EL,FP,NET]
-				   Risq Modular Systems,
-				   Thu Jun 6 09:28:40 PDT 1996 */
-    MON_LSI,			/* 4.3.12 [EB,FP],
-				   LSI LOGIC Corp. Tue Feb 25 13:22:14 1997 */
-    MON_ROCKHOPPER,
-    /* Last and unused value, for sizing vectors, etc.  */
-    MON_LAST
-  };
-static enum mips_monitor_type mips_monitor = MON_LAST;
-
-/* The monitor prompt text.  If the user sets the PMON prompt
-   to some new value, the GDB `set monitor-prompt' command must also
-   be used to inform GDB about the expected prompt.  Otherwise, GDB
-   will not be able to connect to PMON in mips_initialize().
-   If the `set monitor-prompt' command is not used, the expected
-   default prompt will be set according the target:
-   target               prompt
-   -----                -----
-   pmon         PMON> 
-   ddb          NEC010>
-   lsi          PMON>
- */
-static char *mips_monitor_prompt;
-
-/* Set to 1 if the target is open.  */
-static int mips_is_open;
-
-/* Currently active target description (if mips_is_open == 1).  */
-static struct target_ops *current_ops;
-
-/* Set to 1 while the connection is being initialized.  */
-static int mips_initializing;
-
-/* Set to 1 while the connection is being brought down.  */
-static int mips_exiting;
-
-/* The next sequence number to send.  */
-static unsigned int mips_send_seq;
-
-/* The next sequence number we expect to receive.  */
-static unsigned int mips_receive_seq;
-
-/* The time to wait before retransmitting a packet, in seconds.  */
-static int mips_retransmit_wait = 3;
-
-/* The number of times to try retransmitting a packet before giving up.  */
-static int mips_send_retries = 10;
-
-/* The number of garbage characters to accept when looking for an
-   SYN for the next packet.  */
-static int mips_syn_garbage = 10;
-
-/* The time to wait for a packet, in seconds.  */
-static int mips_receive_wait = 5;
-
-/* Set if we have sent a packet to the board but have not yet received
-   a reply.  */
-static int mips_need_reply = 0;
-
-/* Handle used to access serial I/O stream.  */
-static struct serial *mips_desc;
-
-/* UDP handle used to download files to target.  */
-static struct serial *udp_desc;
-static int udp_in_use;
-
-/* TFTP filename used to download files to DDB board, in the form
-   host:filename.  */
-static char *tftp_name;		/* host:filename */
-static char *tftp_localname;	/* filename portion of above */
-static int tftp_in_use;
-static FILE *tftp_file;
-
-/* Counts the number of times the user tried to interrupt the target (usually
-   via ^C.  */
-static int interrupt_count;
-
-/* If non-zero, means that the target is running.  */
-static int mips_wait_flag = 0;
-
-/* If non-zero, monitor supports breakpoint commands.  */
-static int monitor_supports_breakpoints = 0;
-
-/* Data cache header.  */
-
-#if 0				/* not used (yet?)  */
-static DCACHE *mips_dcache;
-#endif
-
-/* Non-zero means that we've just hit a read or write watchpoint.  */
-static int hit_watchpoint;
-
-/* Table of breakpoints/watchpoints (used only on LSI PMON target).
-   The table is indexed by a breakpoint number, which is an integer
-   from 0 to 255 returned by the LSI PMON when a breakpoint is set.  */
-
-#define MAX_LSI_BREAKPOINTS 256
-struct lsi_breakpoint_info
-  {
-    enum break_type type;	/* type of breakpoint */
-    CORE_ADDR addr;		/* address of breakpoint */
-    int len;			/* length of region being watched */
-    unsigned long value;	/* value to watch */
-  }
-lsi_breakpoints[MAX_LSI_BREAKPOINTS];
-
-/* Error/warning codes returned by LSI PMON for breakpoint commands.
-   Warning values may be ORed together; error values may not.  */
-#define W_WARN	0x100		/* This bit is set if the error code
-				   is a warning */
-#define W_MSK   0x101		/* warning: Range feature is supported
-				   via mask */
-#define W_VAL   0x102		/* warning: Value check is not
-				   supported in hardware */
-#define W_QAL   0x104		/* warning: Requested qualifiers are
-				   not supported in hardware */
-
-#define E_ERR	0x200		/* This bit is set if the error code
-				   is an error */
-#define E_BPT   0x200		/* error: No such breakpoint number */
-#define E_RGE   0x201		/* error: Range is not supported */
-#define E_QAL   0x202		/* error: The requested qualifiers can
-				   not be used */
-#define E_OUT   0x203		/* error: Out of hardware resources */
-#define E_NON   0x204		/* error: Hardware breakpoint not supported */
-
-struct lsi_error
-  {
-    int code;			/* error code */
-    char *string;		/* string associated with this code */
-  };
-
-struct lsi_error lsi_warning_table[] =
-{
-  {W_MSK, "Range feature is supported via mask"},
-  {W_VAL, "Value check is not supported in hardware"},
-  {W_QAL, "Requested qualifiers are not supported in hardware"},
-  {0, NULL}
-};
-
-struct lsi_error lsi_error_table[] =
-{
-  {E_BPT, "No such breakpoint number"},
-  {E_RGE, "Range is not supported"},
-  {E_QAL, "The requested qualifiers can not be used"},
-  {E_OUT, "Out of hardware resources"},
-  {E_NON, "Hardware breakpoint not supported"},
-  {0, NULL}
-};
-
-/* Set to 1 with the 'set monitor-warnings' command to enable printing
-   of warnings returned by PMON when hardware breakpoints are used.  */
-static int monitor_warnings;
-
-/* This is the ptid we use while we're connected to the remote.  Its
-   value is arbitrary, as the remote-mips target doesn't have a notion of
-   processes or threads, but we need something non-null to place in
-   inferior_ptid.  */
-static ptid_t remote_mips_ptid;
-
-/* Close any ports which might be open.  Reset certain globals indicating
-   the state of those ports.  */
-
-static void
-close_ports (void)
-{
-  mips_is_open = 0;
-  serial_close (mips_desc);
-
-  if (udp_in_use)
-    {
-      serial_close (udp_desc);
-      udp_in_use = 0;
-    }
-  tftp_in_use = 0;
-}
-
-/* Handle low-level error that we can't recover from.  Note that just
-   error()ing out from target_wait or some such low-level place will cause
-   all hell to break loose--the rest of GDB will tend to get left in an
-   inconsistent state.  */
-
-static void ATTRIBUTE_NORETURN
-mips_error (char *string,...)
-{
-  va_list args;
-  char *fmt;
-
-  target_terminal_ours ();
-  wrap_here ("");		/* Force out any buffered output.  */
-  gdb_flush (gdb_stdout);
-  gdb_flush (gdb_stderr);
-
-  /* Clean up in such a way that mips_close won't try to talk to the
-     board (it almost surely won't work since we weren't able to talk to
-     it).  */
-  close_ports ();
-
-  if (!ptid_equal (inferior_ptid, null_ptid))
-    target_mourn_inferior ();
-
-  fmt = concat (_("Ending remote MIPS debugging: "),
-		string, (char *) NULL);
-  make_cleanup (xfree, fmt);
-
-  va_start (args, string);
-  throw_verror (TARGET_CLOSE_ERROR, fmt, args);
-  va_end (args);
-}
-
-/* putc_readable - print a character, displaying non-printable chars in
-   ^x notation or in hex.  */
-
-static void
-fputc_readable (int ch, struct ui_file *file)
-{
-  if (ch == '\n')
-    fputc_unfiltered ('\n', file);
-  else if (ch == '\r')
-    fprintf_unfiltered (file, "\\r");
-  else if (ch < 0x20)		/* ASCII control character */
-    fprintf_unfiltered (file, "^%c", ch + '@');
-  else if (ch >= 0x7f)		/* non-ASCII characters (rubout or greater) */
-    fprintf_unfiltered (file, "[%02x]", ch & 0xff);
-  else
-    fputc_unfiltered (ch, file);
-}
-
-
-/* puts_readable - print a string, displaying non-printable chars in
-   ^x notation or in hex.  */
-
-static void
-fputs_readable (const char *string, struct ui_file *file)
-{
-  int c;
-
-  while ((c = *string++) != '\0')
-    fputc_readable (c, file);
-}
-
-
-/* Read P as a hex value.  Return true if every character made sense,
-   storing the result in *RESULT.  Leave *RESULT unchanged otherwise.  */
-
-static int
-read_hex_value (const char *p, ULONGEST *result)
-{
-  ULONGEST retval;
-
-  retval = 0;
-  while (*p != 0)
-    {
-      retval <<= 4;
-      if (*p >= '0' && *p <= '9')
-	retval |= *p - '0';
-      else if (*p >= 'A' && *p <= 'F')
-	retval |= *p - 'A' + 10;
-      else if (*p >= 'a' && *p <= 'f')
-	retval |= *p - 'a' + 10;
-      else
-	return 0;
-      p++;
-    }
-  *result = retval;
-  return 1;
-}
-
-
-/* Wait until STRING shows up in mips_desc.  Returns 1 if successful, else 0 if
-   timed out.  TIMEOUT specifies timeout value in seconds.  */
-
-static int
-mips_expect_timeout (const char *string, int timeout)
-{
-  const char *p = string;
-
-  if (remote_debug)
-    {
-      fprintf_unfiltered (gdb_stdlog, "Expected \"");
-      fputs_readable (string, gdb_stdlog);
-      fprintf_unfiltered (gdb_stdlog, "\", got \"");
-    }
-
-  immediate_quit++;
-  QUIT;
-  while (1)
-    {
-      int c;
-
-      /* Must use serial_readchar() here cuz mips_readchar would get
-	 confused if we were waiting for the mips_monitor_prompt...  */
-
-      c = serial_readchar (mips_desc, timeout);
-
-      if (c == SERIAL_TIMEOUT)
-	{
-	  if (remote_debug)
-	    fprintf_unfiltered (gdb_stdlog, "\": FAIL\n");
-	  return 0;
-	}
-
-      if (remote_debug)
-	fputc_readable (c, gdb_stdlog);
-
-      if (c == *p++)
-	{
-	  if (*p == '\0')
-	    {
-	      immediate_quit--;
-	      if (remote_debug)
-		fprintf_unfiltered (gdb_stdlog, "\": OK\n");
-	      return 1;
-	    }
-	}
-      else
-	{
-	  p = string;
-	  if (c == *p)
-	    p++;
-	}
-    }
-}
-
-/* Wait until STRING shows up in mips_desc.  Returns 1 if successful, else 0 if
-   timed out.  The timeout value is hard-coded to 2 seconds.  Use
-   mips_expect_timeout if a different timeout value is needed.  */
-
-static int
-mips_expect (const char *string)
-{
-  return mips_expect_timeout (string, remote_timeout);
-}
-
-/* Read a character from the remote, aborting on error.  Returns
-   SERIAL_TIMEOUT on timeout (since that's what serial_readchar()
-   returns).  FIXME: If we see the string mips_monitor_prompt from the
-   board, then we are debugging on the main console port, and we have
-   somehow dropped out of remote debugging mode.  In this case, we
-   automatically go back in to remote debugging mode.  This is a hack,
-   put in because I can't find any way for a program running on the
-   remote board to terminate without also ending remote debugging
-   mode.  I assume users won't have any trouble with this; for one
-   thing, the IDT documentation generally assumes that the remote
-   debugging port is not the console port.  This is, however, very
-   convenient for DejaGnu when you only have one connected serial
-   port.  */
-
-static int
-mips_readchar (int timeout)
-{
-  int ch;
-  static int state = 0;
-  int mips_monitor_prompt_len = strlen (mips_monitor_prompt);
-
-  { /* FIXME this whole block is dead code!  */
-    int i;
-
-    i = timeout;
-    if (i == -1 && watchdog > 0)
-      i = watchdog;
-  }
-
-  if (state == mips_monitor_prompt_len)
-    timeout = 1;
-  ch = serial_readchar (mips_desc, timeout);
-
-  if (ch == SERIAL_TIMEOUT && timeout == -1)	/* Watchdog went off.  */
-    {
-      target_mourn_inferior ();
-      error (_("Watchdog has expired.  Target detached."));
-    }
-
-  if (ch == SERIAL_EOF)
-    mips_error (_("End of file from remote"));
-  if (ch == SERIAL_ERROR)
-    mips_error (_("Error reading from remote: %s"), safe_strerror (errno));
-  if (remote_debug > 1)
-    {
-      /* Don't use _filtered; we can't deal with a QUIT out of
-         target_wait, and I think this might be called from there.  */
-      if (ch != SERIAL_TIMEOUT)
-	fprintf_unfiltered (gdb_stdlog, "Read '%c' %d 0x%x\n", ch, ch, ch);
-      else
-	fprintf_unfiltered (gdb_stdlog, "Timed out in read\n");
-    }
-
-  /* If we have seen mips_monitor_prompt and we either time out, or
-     we see a @ (which was echoed from a packet we sent), reset the
-     board as described above.  The first character in a packet after
-     the SYN (which is not echoed) is always an @ unless the packet is
-     more than 64 characters long, which ours never are.  */
-  if ((ch == SERIAL_TIMEOUT || ch == '@')
-      && state == mips_monitor_prompt_len
-      && !mips_initializing
-      && !mips_exiting)
-    {
-      if (remote_debug > 0)
-	/* Don't use _filtered; we can't deal with a QUIT out of
-	   target_wait, and I think this might be called from there.  */
-	fprintf_unfiltered (gdb_stdlog,
-			    "Reinitializing MIPS debugging mode\n");
-
-      mips_need_reply = 0;
-      mips_initialize ();
-
-      state = 0;
-
-      /* At this point, about the only thing we can do is abort the command
-         in progress and get back to command level as quickly as possible.  */
-
-      error (_("Remote board reset, debug protocol re-initialized."));
-    }
-
-  if (ch == mips_monitor_prompt[state])
-    ++state;
-  else
-    state = 0;
-
-  return ch;
-}
-
-/* Get a packet header, putting the data in the supplied buffer.
-   PGARBAGE is a pointer to the number of garbage characters received
-   so far.  CH is the last character received.  Returns 0 for success,
-   or -1 for timeout.  */
-
-static int
-mips_receive_header (unsigned char *hdr, int *pgarbage, int ch, int timeout)
-{
-  int i;
-
-  while (1)
-    {
-      /* Wait for a SYN.  mips_syn_garbage is intended to prevent
-         sitting here indefinitely if the board sends us one garbage
-         character per second.  ch may already have a value from the
-         last time through the loop.  */
-      while (ch != SYN)
-	{
-	  ch = mips_readchar (timeout);
-	  if (ch == SERIAL_TIMEOUT)
-	    return -1;
-	  if (ch != SYN)
-	    {
-	      /* Printing the character here lets the user of gdb see
-	         what the program is outputting, if the debugging is
-	         being done on the console port.  Don't use _filtered:
-	         we can't deal with a QUIT out of target_wait and
-	         buffered target output confuses the user.  */
- 	      if (!mips_initializing || remote_debug > 0)
-  		{
-		  if (isprint (ch) || isspace (ch))
-		    {
-		      fputc_unfiltered (ch, gdb_stdtarg);
-		    }
-		  else
-		    {
-		      fputc_readable (ch, gdb_stdtarg);
-		    }
-		  gdb_flush (gdb_stdtarg);
-  		}
-	      
-	      /* Only count unprintable characters.  */
-	      if (! (isprint (ch) || isspace (ch)))
-		(*pgarbage) += 1;
-
-	      if (mips_syn_garbage > 0
-		  && *pgarbage > mips_syn_garbage)
-		mips_error (_("Debug protocol failure:  more "
-			    "than %d characters before a sync."),
-			    mips_syn_garbage);
-	    }
-	}
-
-      /* Get the packet header following the SYN.  */
-      for (i = 1; i < HDR_LENGTH; i++)
-	{
-	  ch = mips_readchar (timeout);
-	  if (ch == SERIAL_TIMEOUT)
-	    return -1;
-	  /* Make sure this is a header byte.  */
-	  if (ch == SYN || !HDR_CHECK (ch))
-	    break;
-
-	  hdr[i] = ch;
-	}
-
-      /* If we got the complete header, we can return.  Otherwise we
-         loop around and keep looking for SYN.  */
-      if (i >= HDR_LENGTH)
-	return 0;
-    }
-}
-
-/* Get a packet header, putting the data in the supplied buffer.
-   PGARBAGE is a pointer to the number of garbage characters received
-   so far.  The last character read is returned in *PCH.  Returns 0
-   for success, -1 for timeout, -2 for error.  */
-
-static int
-mips_receive_trailer (unsigned char *trlr, int *pgarbage,
-		      int *pch, int timeout)
-{
-  int i;
-  int ch;
-
-  for (i = 0; i < TRLR_LENGTH; i++)
-    {
-      ch = mips_readchar (timeout);
-      *pch = ch;
-      if (ch == SERIAL_TIMEOUT)
-	return -1;
-      if (!TRLR_CHECK (ch))
-	return -2;
-      trlr[i] = ch;
-    }
-  return 0;
-}
-
-/* Get the checksum of a packet.  HDR points to the packet header.
-   DATASTR points to the packet data.  LEN is the length of DATASTR.  */
-
-static int
-mips_cksum (const unsigned char *hdr, const char *datastr, int len)
-{
-  const unsigned char *p;
-  const unsigned char *data = (const unsigned char *) datastr;
-  int c;
-  int cksum;
-
-  cksum = 0;
-
-  /* The initial SYN is not included in the checksum.  */
-  c = HDR_LENGTH - 1;
-  p = hdr + 1;
-  while (c-- != 0)
-    cksum += *p++;
-
-  c = len;
-  p = data;
-  while (c-- != 0)
-    cksum += *p++;
-
-  return cksum;
-}
-
-/* Send a packet containing the given ASCII string.  */
-
-static void
-mips_send_packet (const char *s, int get_ack)
-{
-  /* unsigned */ int len;
-  unsigned char *packet;
-  int cksum;
-  int attempt;
-
-  len = strlen (s);
-  if (len > DATA_MAXLEN)
-    mips_error (_("MIPS protocol data packet too long: %s"), s);
-
-  packet = (unsigned char *) alloca (HDR_LENGTH + len + TRLR_LENGTH + 1);
-
-  packet[HDR_INDX_SYN] = HDR_SET_SYN (1, len, mips_send_seq);
-  packet[HDR_INDX_TYPE_LEN] = HDR_SET_TYPE_LEN (1, len, mips_send_seq);
-  packet[HDR_INDX_LEN1] = HDR_SET_LEN1 (1, len, mips_send_seq);
-  packet[HDR_INDX_SEQ] = HDR_SET_SEQ (1, len, mips_send_seq);
-
-  memcpy (packet + HDR_LENGTH, s, len);
-
-  cksum = mips_cksum (packet, (char *) packet + HDR_LENGTH, len);
-  packet[HDR_LENGTH + len + TRLR_INDX_CSUM1] = TRLR_SET_CSUM1 (cksum);
-  packet[HDR_LENGTH + len + TRLR_INDX_CSUM2] = TRLR_SET_CSUM2 (cksum);
-  packet[HDR_LENGTH + len + TRLR_INDX_CSUM3] = TRLR_SET_CSUM3 (cksum);
-
-  /* Increment the sequence number.  This will set mips_send_seq to
-     the sequence number we expect in the acknowledgement.  */
-  mips_send_seq = (mips_send_seq + 1) % SEQ_MODULOS;
-
-  /* We can only have one outstanding data packet, so we just wait for
-     the acknowledgement here.  Keep retransmitting the packet until
-     we get one, or until we've tried too many times.  */
-  for (attempt = 0; attempt < mips_send_retries; attempt++)
-    {
-      int garbage;
-      int ch;
-
-      if (remote_debug > 0)
-	{
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  packet[HDR_LENGTH + len + TRLR_LENGTH] = '\0';
-	  fprintf_unfiltered (gdb_stdlog, "Writing \"%s\"\n", packet + 1);
-	}
-
-      if (serial_write (mips_desc, packet,
-			HDR_LENGTH + len + TRLR_LENGTH) != 0)
-	mips_error (_("write to target failed: %s"), safe_strerror (errno));
-
-      if (!get_ack)
-	return;
-
-      garbage = 0;
-      ch = 0;
-      while (1)
-	{
-	  unsigned char hdr[HDR_LENGTH + 1];
-	  unsigned char trlr[TRLR_LENGTH + 1];
-	  int err;
-	  unsigned int seq;
-
-	  /* Get the packet header.  If we time out, resend the data
-	     packet.  */
-	  err = mips_receive_header (hdr, &garbage, ch, mips_retransmit_wait);
-	  if (err != 0)
-	    break;
-
-	  ch = 0;
-
-	  /* If we get a data packet, assume it is a duplicate and
-	     ignore it.  FIXME: If the acknowledgement is lost, this
-	     data packet may be the packet the remote sends after the
-	     acknowledgement.  */
-	  if (HDR_IS_DATA (hdr))
-	    {
-	      int i;
-
-	      /* Ignore any errors raised whilst attempting to ignore
-	         packet.  */
-
-	      len = HDR_GET_LEN (hdr);
-
-	      for (i = 0; i < len; i++)
-		{
-		  int rch;
-
-		  rch = mips_readchar (remote_timeout);
-		  if (rch == SYN)
-		    {
-		      ch = SYN;
-		      break;
-		    }
-		  if (rch == SERIAL_TIMEOUT)
-		    break;
-		  /* Ignore the character.  */
-		}
-
-	      if (i == len)
-		(void) mips_receive_trailer (trlr, &garbage, &ch,
-					     remote_timeout);
-
-	      /* We don't bother checking the checksum, or providing an
-	         ACK to the packet.  */
-	      continue;
-	    }
-
-	  /* If the length is not 0, this is a garbled packet.  */
-	  if (HDR_GET_LEN (hdr) != 0)
-	    continue;
-
-	  /* Get the packet trailer.  */
-	  err = mips_receive_trailer (trlr, &garbage, &ch,
-				      mips_retransmit_wait);
-
-	  /* If we timed out, resend the data packet.  */
-	  if (err == -1)
-	    break;
-
-	  /* If we got a bad character, reread the header.  */
-	  if (err != 0)
-	    continue;
-
-	  /* If the checksum does not match the trailer checksum, this
-	     is a bad packet; ignore it.  */
-	  if (mips_cksum (hdr, NULL, 0) != TRLR_GET_CKSUM (trlr))
-	    continue;
-
-	  if (remote_debug > 0)
-	    {
-	      hdr[HDR_LENGTH] = '\0';
-	      trlr[TRLR_LENGTH] = '\0';
-	      /* Don't use _filtered; we can't deal with a QUIT out of
-	         target_wait, and I think this might be called from there.  */
-	      fprintf_unfiltered (gdb_stdlog, "Got ack %d \"%s%s\"\n",
-				  HDR_GET_SEQ (hdr), hdr + 1, trlr);
-	    }
-
-	  /* If this ack is for the current packet, we're done.  */
-	  seq = HDR_GET_SEQ (hdr);
-	  if (seq == mips_send_seq)
-	    return;
-
-	  /* If this ack is for the last packet, resend the current
-	     packet.  */
-	  if ((seq + 1) % SEQ_MODULOS == mips_send_seq)
-	    break;
-
-	  /* Otherwise this is a bad ack; ignore it.  Increment the
-	     garbage count to ensure that we do not stay in this loop
-	     forever.  */
-	  ++garbage;
-	}
-    }
-
-  mips_error (_("Remote did not acknowledge packet"));
-}
-
-/* Receive and acknowledge a packet, returning the data in BUFF (which
-   should be DATA_MAXLEN + 1 bytes).  The protocol documentation
-   implies that only the sender retransmits packets, so this code just
-   waits silently for a packet.  It returns the length of the received
-   packet.  If THROW_ERROR is nonzero, call error() on errors.  If not,
-   don't print an error message and return -1.  */
-
-static int
-mips_receive_packet (char *buff, int throw_error, int timeout)
-{
-  int ch;
-  int garbage;
-  int len;
-  unsigned char ack[HDR_LENGTH + TRLR_LENGTH + 1];
-  int cksum;
-
-  ch = 0;
-  garbage = 0;
-  while (1)
-    {
-      unsigned char hdr[HDR_LENGTH];
-      unsigned char trlr[TRLR_LENGTH];
-      int i;
-      int err;
-
-      if (mips_receive_header (hdr, &garbage, ch, timeout) != 0)
-	{
-	  if (throw_error)
-	    mips_error (_("Timed out waiting for remote packet"));
-	  else
-	    return -1;
-	}
-
-      ch = 0;
-
-      /* An acknowledgement is probably a duplicate; ignore it.  */
-      if (!HDR_IS_DATA (hdr))
-	{
-	  len = HDR_GET_LEN (hdr);
-	  /* Check if the length is valid for an ACK, we may aswell
-	     try and read the remainder of the packet: */
-	  if (len == 0)
-	    {
-	      /* Ignore the error condition, since we are going to
-	         ignore the packet anyway.  */
-	      (void) mips_receive_trailer (trlr, &garbage, &ch, timeout);
-	    }
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  if (remote_debug > 0)
-	    fprintf_unfiltered (gdb_stdlog, "Ignoring unexpected ACK\n");
-	  continue;
-	}
-
-      len = HDR_GET_LEN (hdr);
-      for (i = 0; i < len; i++)
-	{
-	  int rch;
-
-	  rch = mips_readchar (timeout);
-	  if (rch == SYN)
-	    {
-	      ch = SYN;
-	      break;
-	    }
-	  if (rch == SERIAL_TIMEOUT)
-	    {
-	      if (throw_error)
-		mips_error (_("Timed out waiting for remote packet"));
-	      else
-		return -1;
-	    }
-	  buff[i] = rch;
-	}
-
-      if (i < len)
-	{
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  if (remote_debug > 0)
-	    fprintf_unfiltered (gdb_stdlog,
-				"Got new SYN after %d chars (wanted %d)\n",
-				i, len);
-	  continue;
-	}
-
-      err = mips_receive_trailer (trlr, &garbage, &ch, timeout);
-      if (err == -1)
-	{
-	  if (throw_error)
-	    mips_error (_("Timed out waiting for packet"));
-	  else
-	    return -1;
-	}
-      if (err == -2)
-	{
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  if (remote_debug > 0)
-	    fprintf_unfiltered (gdb_stdlog, "Got SYN when wanted trailer\n");
-	  continue;
-	}
-
-      /* If this is the wrong sequence number, ignore it.  */
-      if (HDR_GET_SEQ (hdr) != mips_receive_seq)
-	{
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  if (remote_debug > 0)
-	    fprintf_unfiltered (gdb_stdlog,
-				"Ignoring sequence number %d (want %d)\n",
-				HDR_GET_SEQ (hdr), mips_receive_seq);
-	  continue;
-	}
-
-      if (mips_cksum (hdr, buff, len) == TRLR_GET_CKSUM (trlr))
-	break;
-
-      if (remote_debug > 0)
-	/* Don't use _filtered; we can't deal with a QUIT out of
-	   target_wait, and I think this might be called from there.  */
-	printf_unfiltered ("Bad checksum; data %d, trailer %d\n",
-			   mips_cksum (hdr, buff, len),
-			   TRLR_GET_CKSUM (trlr));
-
-      /* The checksum failed.  Send an acknowledgement for the
-         previous packet to tell the remote to resend the packet.  */
-      ack[HDR_INDX_SYN] = HDR_SET_SYN (0, 0, mips_receive_seq);
-      ack[HDR_INDX_TYPE_LEN] = HDR_SET_TYPE_LEN (0, 0, mips_receive_seq);
-      ack[HDR_INDX_LEN1] = HDR_SET_LEN1 (0, 0, mips_receive_seq);
-      ack[HDR_INDX_SEQ] = HDR_SET_SEQ (0, 0, mips_receive_seq);
-
-      cksum = mips_cksum (ack, NULL, 0);
-
-      ack[HDR_LENGTH + TRLR_INDX_CSUM1] = TRLR_SET_CSUM1 (cksum);
-      ack[HDR_LENGTH + TRLR_INDX_CSUM2] = TRLR_SET_CSUM2 (cksum);
-      ack[HDR_LENGTH + TRLR_INDX_CSUM3] = TRLR_SET_CSUM3 (cksum);
-
-      if (remote_debug > 0)
-	{
-	  ack[HDR_LENGTH + TRLR_LENGTH] = '\0';
-	  /* Don't use _filtered; we can't deal with a QUIT out of
-	     target_wait, and I think this might be called from there.  */
-	  printf_unfiltered ("Writing ack %d \"%s\"\n", mips_receive_seq,
-			     ack + 1);
-	}
-
-      if (serial_write (mips_desc, ack, HDR_LENGTH + TRLR_LENGTH) != 0)
-	{
-	  if (throw_error)
-	    mips_error (_("write to target failed: %s"),
-	                safe_strerror (errno));
-	  else
-	    return -1;
-	}
-    }
-
-  if (remote_debug > 0)
-    {
-      buff[len] = '\0';
-      /* Don't use _filtered; we can't deal with a QUIT out of
-         target_wait, and I think this might be called from there.  */
-      printf_unfiltered ("Got packet \"%s\"\n", buff);
-    }
-
-  /* We got the packet.  Send an acknowledgement.  */
-  mips_receive_seq = (mips_receive_seq + 1) % SEQ_MODULOS;
-
-  ack[HDR_INDX_SYN] = HDR_SET_SYN (0, 0, mips_receive_seq);
-  ack[HDR_INDX_TYPE_LEN] = HDR_SET_TYPE_LEN (0, 0, mips_receive_seq);
-  ack[HDR_INDX_LEN1] = HDR_SET_LEN1 (0, 0, mips_receive_seq);
-  ack[HDR_INDX_SEQ] = HDR_SET_SEQ (0, 0, mips_receive_seq);
-
-  cksum = mips_cksum (ack, NULL, 0);
-
-  ack[HDR_LENGTH + TRLR_INDX_CSUM1] = TRLR_SET_CSUM1 (cksum);
-  ack[HDR_LENGTH + TRLR_INDX_CSUM2] = TRLR_SET_CSUM2 (cksum);
-  ack[HDR_LENGTH + TRLR_INDX_CSUM3] = TRLR_SET_CSUM3 (cksum);
-
-  if (remote_debug > 0)
-    {
-      ack[HDR_LENGTH + TRLR_LENGTH] = '\0';
-      /* Don't use _filtered; we can't deal with a QUIT out of
-         target_wait, and I think this might be called from there.  */
-      printf_unfiltered ("Writing ack %d \"%s\"\n", mips_receive_seq,
-			 ack + 1);
-    }
-
-  if (serial_write (mips_desc, ack, HDR_LENGTH + TRLR_LENGTH) != 0)
-    {
-      if (throw_error)
-	mips_error (_("write to target failed: %s"), safe_strerror (errno));
-      else
-	return -1;
-    }
-
-  return len;
-}
-
-/* Optionally send a request to the remote system and optionally wait
-   for the reply.  This implements the remote debugging protocol,
-   which is built on top of the packet protocol defined above.  Each
-   request has an ADDR argument and a DATA argument.  The following
-   requests are defined:
-
-   \0   don't send a request; just wait for a reply
-   i    read word from instruction space at ADDR
-   d    read word from data space at ADDR
-   I    write DATA to instruction space at ADDR
-   D    write DATA to data space at ADDR
-   r    read register number ADDR
-   R    set register number ADDR to value DATA
-   c    continue execution (if ADDR != 1, set pc to ADDR)
-   s    single step (if ADDR != 1, set pc to ADDR)
-
-   The read requests return the value requested.  The write requests
-   return the previous value in the changed location.  The execution
-   requests return a UNIX wait value (the approximate signal which
-   caused execution to stop is in the upper eight bits).
-
-   If PERR is not NULL, this function waits for a reply.  If an error
-   occurs, it sets *PERR to 1 and sets errno according to what the
-   target board reports.  */
-
-static ULONGEST
-mips_request (int cmd,
-	      ULONGEST addr,
-	      ULONGEST data,
-	      int *perr,
-	      int timeout,
-	      char *buff)
-{
-  int addr_size = gdbarch_addr_bit (target_gdbarch ()) / 8;
-  char myBuff[DATA_MAXLEN + 1];
-  char response_string[17];
-  int len;
-  int rpid;
-  char rcmd;
-  int rerrflg;
-  ULONGEST rresponse;
-
-  if (buff == (char *) NULL)
-    buff = myBuff;
-
-  if (cmd != '\0')
-    {
-      if (mips_need_reply)
-	internal_error (__FILE__, __LINE__,
-			_("mips_request: Trying to send "
-			  "command before reply"));
-      /* 'T' sets a register to a 64-bit value, so make sure we use
-	 the right conversion function.  */
-      if (cmd == 'T')
-	sprintf (buff, "0x0 %c 0x%s 0x%s", cmd,
-		 phex_nz (addr, addr_size), phex_nz (data, 8));
-      else
-	sprintf (buff, "0x0 %c 0x%s 0x%s", cmd,
-	         phex_nz (addr, addr_size), phex_nz (data, addr_size));
-
-      mips_send_packet (buff, 1);
-      mips_need_reply = 1;
-    }
-
-  if (perr == (int *) NULL)
-    return 0;
-
-  if (!mips_need_reply)
-    internal_error (__FILE__, __LINE__,
-		    _("mips_request: Trying to get reply before command"));
-
-  mips_need_reply = 0;
-
-  len = mips_receive_packet (buff, 1, timeout);
-  buff[len] = '\0';
-
-  if (sscanf (buff, "0x%x %c 0x%x 0x%16s",
-	      &rpid, &rcmd, &rerrflg, response_string) != 4
-      || !read_hex_value (response_string, &rresponse)
-      || (cmd != '\0' && rcmd != cmd))
-    mips_error (_("Bad response from remote board"));
-
-  if (rerrflg != 0)
-    {
-      *perr = 1;
-
-      /* FIXME: This will returns MIPS errno numbers, which may or may
-         not be the same as errno values used on other systems.  If
-         they stick to common errno values, they will be the same, but
-         if they don't, they must be translated.  */
-      errno = rresponse;
-
-      return 0;
-    }
-
-  *perr = 0;
-  return rresponse;
-}
-
-/* Cleanup associated with mips_initialize().  */
-
-static void
-mips_initialize_cleanups (void *arg)
-{
-  mips_initializing = 0;
-}
-
-/* Cleanup associated with mips_exit_debug().  */
-
-static void
-mips_exit_cleanups (void *arg)
-{
-  mips_exiting = 0;
-}
-
-/* Send a command and wait for that command to be echoed back.  Wait,
-   too, for the following prompt.  */
-
-static void
-mips_send_command (const char *cmd, int prompt)
-{
-  serial_write (mips_desc, cmd, strlen (cmd));
-  mips_expect (cmd);
-  mips_expect ("\n");
-  if (prompt)
-    mips_expect (mips_monitor_prompt);
-}
-
-/* Enter remote (dbx) debug mode: */
-
-static void
-mips_enter_debug (void)
-{
-  /* Reset the sequence numbers, ready for the new debug sequence: */
-  mips_send_seq = 0;
-  mips_receive_seq = 0;
-
-  if (mips_monitor != MON_IDT)
-    mips_send_command ("debug\r", 0);
-  else				/* Assume IDT monitor by default.  */
-    mips_send_command ("db tty0\r", 0);
-
-  gdb_usleep (1000000);
-  serial_write (mips_desc, "\r", sizeof "\r" - 1);
-
-  /* We don't need to absorb any spurious characters here, since the
-     mips_receive_header will eat up a reasonable number of characters
-     whilst looking for the SYN, however this avoids the "garbage"
-     being displayed to the user.  */
-  if (mips_monitor != MON_IDT)
-    mips_expect ("\r");
-
-  {
-    char buff[DATA_MAXLEN + 1];
-
-    if (mips_receive_packet (buff, 1, 3) < 0)
-      mips_error (_("Failed to initialize (didn't receive packet)."));
-  }
-}
-
-/* Exit remote (dbx) debug mode, returning to the monitor prompt: */
-
-static int
-mips_exit_debug (void)
-{
-  int err;
-  struct cleanup *old_cleanups = make_cleanup (mips_exit_cleanups, NULL);
-
-  mips_exiting = 1;
-
-  if (mips_monitor != MON_IDT && mips_monitor != MON_ROCKHOPPER)
-    {
-      /* The DDB (NEC) and MiniRISC (LSI) versions of PMON exit immediately,
-         so we do not get a reply to this command: */
-      mips_request ('x', 0, 0, NULL, mips_receive_wait, NULL);
-      mips_need_reply = 0;
-      if (!mips_expect (" break!"))
-	{
-	  do_cleanups (old_cleanups);
-	  return -1;
-	}
-    }
-  else
-    mips_request ('x', 0, 0, &err, mips_receive_wait, NULL);
-
-  if (!mips_expect (mips_monitor_prompt))
-    {
-      do_cleanups (old_cleanups);
-      return -1;
-    }
-
-  do_cleanups (old_cleanups);
-
-  return 0;
-}
-
-/* Initialize a new connection to the MIPS board, and make sure we are
-   really connected.  */
-
-static void
-mips_initialize (void)
-{
-  int err;
-  struct cleanup *old_cleanups;
-  int j;
-
-  /* What is this code doing here?  I don't see any way it can happen, and
-     it might mean mips_initializing didn't get cleared properly.
-     So I'll make it a warning.  */
-
-  if (mips_initializing)
-    {
-      warning (_("internal error: mips_initialize called twice"));
-      return;
-    }
-
-  old_cleanups = make_cleanup (mips_initialize_cleanups, NULL);
-
-  mips_wait_flag = 0;
-  mips_initializing = 1;
-
-  /* At this point, the packit protocol isn't responding.  We'll try getting
-     into the monitor, and restarting the protocol.  */
-
-  /* Force the system into the monitor.  After this we *should* be at
-     the mips_monitor_prompt.  */
-  if (mips_monitor != MON_IDT)
-    j = 0;			/* Start by checking if we are already
-				   at the prompt.  */
-  else
-    j = 1;			/* Start by sending a break.  */
-  for (; j <= 4; j++)
-    {
-      switch (j)
-	{
-	case 0:		/* First, try sending a CR.  */
-	  serial_flush_input (mips_desc);
-	  serial_write (mips_desc, "\r", 1);
-	  break;
-	case 1:		/* First, try sending a break.  */
-	  serial_send_break (mips_desc);
-	  break;
-	case 2:		/* Then, try a ^C.  */
-	  serial_write (mips_desc, "\003", 1);
-	  break;
-	case 3:		/* Then, try escaping from download.  */
-	  {
-	    if (mips_monitor != MON_IDT)
-	      {
-		char tbuff[7];
-
-		/* We shouldn't need to send multiple termination
-		   sequences, since the target performs line (or
-		   block) reads, and then processes those
-		   packets.  In-case we were downloading a large packet
-		   we flush the output buffer before inserting a
-		   termination sequence.  */
-		serial_flush_output (mips_desc);
-		sprintf (tbuff, "\r/E/E\r");
-		serial_write (mips_desc, tbuff, 6);
-	      }
-	    else
-	      {
-		char srec[10];
-		int i;
-
-		/* We are possibly in binary download mode, having
-		   aborted in the middle of an S-record.  ^C won't
-		   work because of binary mode.  The only reliable way
-		   out is to send enough termination packets (8 bytes)
-		   to fill up and then overflow the largest size
-		   S-record (255 bytes in this case).  This amounts to
-		   256/8 + 1 packets.  */
-
-		mips_make_srec (srec, '7', 0, NULL, 0);
-
-		for (i = 1; i <= 33; i++)
-		  {
-		    serial_write (mips_desc, srec, 8);
-
-		    if (serial_readchar (mips_desc, 0) >= 0)
-		      break;	/* Break immediatly if we get something from
-				   the board.  */
-		  }
-	      }
-	  }
-	  break;
-	case 4:
-	  mips_error (_("Failed to initialize."));
-	}
-
-      if (mips_expect (mips_monitor_prompt))
-	break;
-    }
-
-  if (mips_monitor != MON_IDT)
-    {
-      /* Sometimes PMON ignores the first few characters in the first
-         command sent after a load.  Sending a blank command gets
-         around that.  */
-      mips_send_command ("\r", -1);
-
-      /* Ensure the correct target state: */
-      if (mips_monitor != MON_LSI)
-	mips_send_command ("set regsize 64\r", -1);
-      mips_send_command ("set hostport tty0\r", -1);
-      mips_send_command ("set brkcmd \"\"\r", -1);
-      /* Delete all the current breakpoints: */
-      mips_send_command ("db *\r", -1);
-      /* NOTE: PMON does not have breakpoint support through the
-         "debug" mode, only at the monitor command-line.  */
-    }
-
-  mips_enter_debug ();
-
-  /* Clear all breakpoints: */
-  if ((mips_monitor == MON_IDT
-       && mips_clear_breakpoint (-1, 0, BREAK_UNUSED) == 0)
-      || mips_monitor == MON_LSI)
-    monitor_supports_breakpoints = 1;
-  else
-    monitor_supports_breakpoints = 0;
-
-  do_cleanups (old_cleanups);
-
-  /* If this doesn't call error, we have connected; we don't care if
-     the request itself succeeds or fails.  */
-
-  mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
-}
-
-/* Open a connection to the remote board.  */
-
-static void
-common_open (struct target_ops *ops, const char *name, int from_tty,
-	     enum mips_monitor_type new_monitor,
-	     const char *new_monitor_prompt)
-{
-  char *serial_port_name;
-  char *remote_name = 0;
-  char *local_name = 0;
-  char **argv;
-  struct cleanup *cleanup;
-
-  if (name == 0)
-    error (_("\
-To open a MIPS remote debugging connection, you need to specify what\n\
-serial device is attached to the target board (e.g., /dev/ttya).\n\
-If you want to use TFTP to download to the board, specify the name of a\n\
-temporary file to be used by GDB for downloads as the second argument.\n\
-This filename must be in the form host:filename, where host is the name\n\
-of the host running the TFTP server, and the file must be readable by the\n\
-world.  If the local name of the temporary file differs from the name as\n\
-seen from the board via TFTP, specify that name as the third parameter.\n"));
-
-  /* Parse the serial port name, the optional TFTP name, and the
-     optional local TFTP name.  */
-  argv = gdb_buildargv (name);
-  cleanup = make_cleanup_freeargv (argv);
-
-  serial_port_name = xstrdup (argv[0]);
-  if (argv[1])			/* Remote TFTP name specified?  */
-    {
-      remote_name = argv[1];
-      if (argv[2])		/* Local TFTP filename specified?  */
-	local_name = argv[2];
-    }
-
-  target_preopen (from_tty);
-
-  if (mips_is_open)
-    unpush_target (current_ops);
-
-  /* Open and initialize the serial port.  */
-  mips_desc = serial_open (serial_port_name);
-  if (mips_desc == NULL)
-    perror_with_name (serial_port_name);
-
-  if (baud_rate != -1)
-    {
-      if (serial_setbaudrate (mips_desc, baud_rate))
-	{
-	  serial_close (mips_desc);
-	  perror_with_name (serial_port_name);
-	}
-    }
-
-  serial_raw (mips_desc);
-
-  /* Open and initialize the optional download port.  If it is in the form
-     hostname#portnumber, it's a UDP socket.  If it is in the form
-     hostname:filename, assume it's the TFTP filename that must be
-     passed to the DDB board to tell it where to get the load file.  */
-  if (remote_name)
-    {
-      if (strchr (remote_name, '#'))
-	{
-	  udp_desc = serial_open (remote_name);
-	  if (!udp_desc)
-	    perror_with_name (_("Unable to open UDP port"));
-	  udp_in_use = 1;
-	}
-      else
-	{
-	  /* Save the remote and local names of the TFTP temp file.  If
-	     the user didn't specify a local name, assume it's the same
-	     as the part of the remote name after the "host:".  */
-	  if (tftp_name)
-	    xfree (tftp_name);
-	  if (tftp_localname)
-	    xfree (tftp_localname);
-	  if (local_name == NULL)
-	    if ((local_name = strchr (remote_name, ':')) != NULL)
-	      local_name++;	/* Skip over the colon.  */
-	  if (local_name == NULL)
-	    local_name = remote_name;	/* Local name same as remote name.  */
-	  tftp_name = xstrdup (remote_name);
-	  tftp_localname = xstrdup (local_name);
-	  tftp_in_use = 1;
-	}
-    }
-
-  current_ops = ops;
-  mips_is_open = 1;
-
-  /* Reset the expected monitor prompt if it's never been set before.  */
-  if (mips_monitor_prompt == NULL)
-    mips_monitor_prompt = xstrdup (new_monitor_prompt);
-  mips_monitor = new_monitor;
-
-  mips_initialize ();
-
-  if (from_tty)
-    printf_unfiltered ("Remote MIPS debugging using %s\n", serial_port_name);
-
-  /* Switch to using remote target now.  */
-  push_target (ops);
-
-  inferior_ptid = remote_mips_ptid;
-  inferior_appeared (current_inferior (), ptid_get_pid (inferior_ptid));
-  add_thread_silent (inferior_ptid);
-
-  /* Try to figure out the processor model if possible.  */
-  deprecated_mips_set_processor_regs_hack ();
-
-  /* This is really the job of start_remote however, that makes an
-     assumption that the target is about to print out a status message
-     of some sort.  That doesn't happen here (in fact, it may not be
-     possible to get the monitor to send the appropriate packet).  */
-
-  reinit_frame_cache ();
-  registers_changed ();
-  stop_pc = regcache_read_pc (get_current_regcache ());
-  print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1);
-  xfree (serial_port_name);
-
-  do_cleanups (cleanup);
-}
-
-/* Open a connection to an IDT board.  */
-
-static void
-mips_open (const char *name, int from_tty)
-{
-  const char *monitor_prompt = NULL;
-  if (gdbarch_bfd_arch_info (target_gdbarch ()) != NULL
-      && gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_mips)
-    {
-    switch (gdbarch_bfd_arch_info (target_gdbarch ())->mach)
-      {
-      case bfd_mach_mips4100:
-      case bfd_mach_mips4300:
-      case bfd_mach_mips4600:
-      case bfd_mach_mips4650:
-      case bfd_mach_mips5000:
-	monitor_prompt = "<RISQ> ";
-	break;
-      }
-    }
-  if (monitor_prompt == NULL)
-    monitor_prompt = "<IDT>";
-  common_open (&mips_ops, name, from_tty, MON_IDT, monitor_prompt);
-}
-
-/* Open a connection to a PMON board.  */
-
-static void
-pmon_open (const char *name, int from_tty)
-{
-  common_open (&pmon_ops, name, from_tty, MON_PMON, "PMON> ");
-}
-
-/* Open a connection to a DDB board.  */
-
-static void
-ddb_open (const char *name, int from_tty)
-{
-  common_open (&ddb_ops, name, from_tty, MON_DDB, "NEC010>");
-}
-
-/* Open a connection to a rockhopper board.  */
-
-static void
-rockhopper_open (const char *name, int from_tty)
-{
-  common_open (&rockhopper_ops, name, from_tty, MON_ROCKHOPPER, "NEC01>");
-}
-
-/* Open a connection to an LSI board.  */
-
-static void
-lsi_open (const char *name, int from_tty)
-{
-  int i;
-
-  /* Clear the LSI breakpoint table.  */
-  for (i = 0; i < MAX_LSI_BREAKPOINTS; i++)
-    lsi_breakpoints[i].type = BREAK_UNUSED;
-
-  common_open (&lsi_ops, name, from_tty, MON_LSI, "PMON> ");
-}
-
-/* Close a connection to the remote board.  */
-
-static void
-mips_close (struct target_ops *self)
-{
-  if (mips_is_open)
-    {
-      /* Get the board out of remote debugging mode.  */
-      (void) mips_exit_debug ();
-
-      close_ports ();
-    }
-
-  generic_mourn_inferior ();
-}
-
-/* Detach from the remote board.  */
-
-static void
-mips_detach (struct target_ops *ops, const char *args, int from_tty)
-{
-  if (args)
-    error (_("Argument given to \"detach\" when remotely debugging."));
-
-  unpush_target (ops);
-
-  if (from_tty)
-    printf_unfiltered ("Ending remote MIPS debugging.\n");
-}
-
-/* Tell the target board to resume.  This does not wait for a reply
-   from the board, except in the case of single-stepping on LSI boards,
-   where PMON does return a reply.  */
-
-static void
-mips_resume (struct target_ops *ops,
-	     ptid_t ptid, int step, enum gdb_signal siggnal)
-{
-  int err;
-
-  /* LSI PMON requires returns a reply packet "0x1 s 0x0 0x57f" after
-     a single step, so we wait for that.  */
-  mips_request (step ? 's' : 'c', 1, siggnal,
-		mips_monitor == MON_LSI && step ? &err : (int *) NULL,
-		mips_receive_wait, NULL);
-}
-
-/* Return the signal corresponding to SIG, where SIG is the number which
-   the MIPS protocol uses for the signal.  */
-
-static enum gdb_signal
-mips_signal_from_protocol (int sig)
-{
-  /* We allow a few more signals than the IDT board actually returns, on
-     the theory that there is at least *some* hope that perhaps the numbering
-     for these signals is widely agreed upon.  */
-  if (sig <= 0
-      || sig > 31)
-    return GDB_SIGNAL_UNKNOWN;
-
-  /* Don't want to use gdb_signal_from_host because we are converting
-     from MIPS signal numbers, not host ones.  Our internal numbers
-     match the MIPS numbers for the signals the board can return, which
-     are: SIGINT, SIGSEGV, SIGBUS, SIGILL, SIGFPE, SIGTRAP.  */
-  return (enum gdb_signal) sig;
-}
-
-/* Set the register designated by REGNO to the value designated by VALUE.  */
-
-static void
-mips_set_register (int regno, ULONGEST value)
-{
-  gdb_byte buf[MAX_REGISTER_SIZE];
-  struct regcache *regcache = get_current_regcache ();
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-
-  /* We got the number the register holds, but gdb expects to see a
-     value in the target byte ordering.  */
-
-  if (mips_monitor != MON_ROCKHOPPER
-      && (regno == mips_regnum (gdbarch)->pc || regno < 32))
-    /* Some 64-bit boards have monitors that only send the bottom 32 bits.
-       In such cases we can only really debug 32-bit code properly so,
-       when reading a GPR or the PC, assume that the full 64-bit
-       value is the sign extension of the lower 32 bits.  */
-    store_signed_integer (buf, register_size (gdbarch, regno), byte_order,
-                          value);
-  else
-    store_unsigned_integer (buf, register_size (gdbarch, regno), byte_order,
-                            value);
-
-  regcache_raw_supply (regcache, regno, buf);
-}
-
-/* Wait until the remote stops, and return a wait status.  */
-
-static ptid_t
-mips_wait (struct target_ops *ops,
-	   ptid_t ptid, struct target_waitstatus *status, int options)
-{
-  int rstatus;
-  int err;
-  char buff[DATA_MAXLEN];
-  ULONGEST rpc, rfp, rsp;
-  char pc_string[17], fp_string[17], sp_string[17], flags[20];
-  int nfields;
-
-  interrupt_count = 0;
-  hit_watchpoint = 0;
-
-  /* If we have not sent a single step or continue command, then the
-     board is waiting for us to do something.  Return a status
-     indicating that it is stopped.  */
-  if (!mips_need_reply)
-    {
-      status->kind = TARGET_WAITKIND_STOPPED;
-      status->value.sig = GDB_SIGNAL_TRAP;
-      return inferior_ptid;
-    }
-
-  /* No timeout; we sit here as long as the program continues to execute.  */
-  mips_wait_flag = 1;
-  rstatus = mips_request ('\000', 0, 0, &err, -1, buff);
-  mips_wait_flag = 0;
-  if (err)
-    mips_error (_("Remote failure: %s"), safe_strerror (errno));
-
-  /* On returning from a continue, the PMON monitor seems to start
-     echoing back the messages we send prior to sending back the
-     ACK.  The code can cope with this, but to try and avoid the
-     unnecessary serial traffic, and "spurious" characters displayed
-     to the user, we cheat and reset the debug protocol.  The problems
-     seems to be caused by a check on the number of arguments, and the
-     command length, within the monitor causing it to echo the command
-     as a bad packet.  */
-  if (mips_monitor == MON_PMON)
-    {
-      mips_exit_debug ();
-      mips_enter_debug ();
-    }
-
-  /* See if we got back extended status.  If so, pick out the pc, fp,
-     sp, etc...  */
-
-  nfields = sscanf (buff,
-		    "0x%*x %*c 0x%*x 0x%*x 0x%16s 0x%16s 0x%16s 0x%*x %s",
-		    pc_string, fp_string, sp_string, flags);
-  if (nfields >= 3
-      && read_hex_value (pc_string, &rpc)
-      && read_hex_value (fp_string, &rfp)
-      && read_hex_value (sp_string, &rsp))
-    {
-      struct regcache *regcache = get_current_regcache ();
-      struct gdbarch *gdbarch = get_regcache_arch (regcache);
-
-      mips_set_register (gdbarch_pc_regnum (gdbarch), rpc);
-      mips_set_register (30, rfp);
-      mips_set_register (gdbarch_sp_regnum (gdbarch), rsp);
-
-      if (nfields == 9)
-	{
-	  int i;
-
-	  for (i = 0; i <= 2; i++)
-	    if (flags[i] == 'r' || flags[i] == 'w')
-	      hit_watchpoint = 1;
-	    else if (flags[i] == '\000')
-	      break;
-	}
-    }
-
-  if (strcmp (target_shortname, "lsi") == 0)
-    {
-#if 0
-      /* If this is an LSI PMON target, see if we just hit a
-         hardrdware watchpoint.  Right now, PMON doesn't give us
-         enough information to determine which breakpoint we hit.  So
-         we have to look up the PC in our own table of breakpoints,
-         and if found, assume it's just a normal instruction fetch
-         breakpoint, not a data watchpoint.  FIXME when PMON provides
-         some way to tell us what type of breakpoint it is.  */
-      int i;
-      CORE_ADDR pc = regcache_read_pc (get_current_regcache ());
-
-      hit_watchpoint = 1;
-      for (i = 0; i < MAX_LSI_BREAKPOINTS; i++)
-	{
-	  if (lsi_breakpoints[i].addr == pc
-	      && lsi_breakpoints[i].type == BREAK_FETCH)
-	    {
-	      hit_watchpoint = 0;
-	      break;
-	    }
-	}
-#else
-      /* If a data breakpoint was hit, PMON returns the following packet:
-         0x1 c 0x0 0x57f 0x1
-         The return packet from an ordinary breakpoint doesn't have the
-         extra 0x01 field tacked onto the end.  */
-      if (nfields == 1 && rpc == 1)
-	hit_watchpoint = 1;
-#endif
-    }
-
-  /* NOTE: The following (sig) numbers are defined by PMON:
-     SPP_SIGTRAP     5       breakpoint
-     SPP_SIGINT      2
-     SPP_SIGSEGV     11
-     SPP_SIGBUS      10
-     SPP_SIGILL      4
-     SPP_SIGFPE      8
-     SPP_SIGTERM     15 */
-
-  /* Translate a MIPS waitstatus.  We use constants here rather than WTERMSIG
-     and so on, because the constants we want here are determined by the
-     MIPS protocol and have nothing to do with what host we are running on.  */
-  if ((rstatus & 0xff) == 0)
-    {
-      status->kind = TARGET_WAITKIND_EXITED;
-      status->value.integer = (((rstatus) >> 8) & 0xff);
-    }
-  else if ((rstatus & 0xff) == 0x7f)
-    {
-      status->kind = TARGET_WAITKIND_STOPPED;
-      status->value.sig = mips_signal_from_protocol (((rstatus) >> 8) & 0xff);
-
-      /* If the stop PC is in the _exit function, assume
-         we hit the 'break 0x3ff' instruction in _exit, so this
-         is not a normal breakpoint.  */
-      if (strcmp (target_shortname, "lsi") == 0)
-	{
-	  const char *func_name;
-	  CORE_ADDR func_start;
-	  CORE_ADDR pc = regcache_read_pc (get_current_regcache ());
-
-	  find_pc_partial_function (pc, &func_name, &func_start, NULL);
-	  if (func_name != NULL && strcmp (func_name, "_exit") == 0
-	      && func_start == pc)
-	    status->kind = TARGET_WAITKIND_EXITED;
-	}
-    }
-  else
-    {
-      status->kind = TARGET_WAITKIND_SIGNALLED;
-      status->value.sig = mips_signal_from_protocol (rstatus & 0x7f);
-    }
-
-  return inferior_ptid;
-}
-
-/* We have to map between the register numbers used by gdb and the
-   register numbers used by the debugging protocol.  */
-
-#define REGNO_OFFSET 96
-
-static int
-mips_map_regno (struct gdbarch *gdbarch, int regno)
-{
-  if (regno < 32)
-    return regno;
-  if (regno >= mips_regnum (gdbarch)->fp0
-      && regno < mips_regnum (gdbarch)->fp0 + 32)
-    return regno - mips_regnum (gdbarch)->fp0 + 32;
-  else if (regno == mips_regnum (gdbarch)->pc)
-    return REGNO_OFFSET + 0;
-  else if (regno == mips_regnum (gdbarch)->cause)
-    return REGNO_OFFSET + 1;
-  else if (regno == mips_regnum (gdbarch)->hi)
-    return REGNO_OFFSET + 2;
-  else if (regno == mips_regnum (gdbarch)->lo)
-    return REGNO_OFFSET + 3;
-  else if (regno == mips_regnum (gdbarch)->fp_control_status)
-    return REGNO_OFFSET + 4;
-  else if (regno == mips_regnum (gdbarch)->fp_implementation_revision)
-    return REGNO_OFFSET + 5;
-  else
-    /* FIXME: Is there a way to get the status register?  */
-    return 0;
-}
-
-/* Fetch the remote registers.  */
-
-static void
-mips_fetch_registers (struct target_ops *ops,
-		      struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  ULONGEST val;
-  int err;
-
-  if (regno == -1)
-    {
-      for (regno = 0; regno < gdbarch_num_regs (gdbarch); regno++)
-	mips_fetch_registers (ops, regcache, regno);
-      return;
-    }
-
-  if (regno == gdbarch_deprecated_fp_regnum (gdbarch)
-      || regno == MIPS_ZERO_REGNUM)
-    /* gdbarch_deprecated_fp_regnum on the mips is a hack which is just
-       supposed to read zero (see also mips-nat.c).  */
-    val = 0;
-  else
-    {
-      /* If PMON doesn't support this register, don't waste serial
-         bandwidth trying to read it.  */
-      int pmon_reg = mips_map_regno (gdbarch, regno);
-
-      if (regno != 0 && pmon_reg == 0)
-	val = 0;
-      else
-	{
-	  /* Unfortunately the PMON version in the Vr4300 board has been
-	     compiled without the 64bit register access commands.  This
-	     means we cannot get hold of the full register width.  */
-	  if (mips_monitor == MON_DDB || mips_monitor == MON_ROCKHOPPER)
-	    val = mips_request ('t', pmon_reg, 0,
-				&err, mips_receive_wait, NULL);
-	  else
-	    val = mips_request ('r', pmon_reg, 0,
-				&err, mips_receive_wait, NULL);
-	  if (err)
-	    mips_error (_("Can't read register %d: %s"), regno,
-			safe_strerror (errno));
-	}
-    }
-
-  mips_set_register (regno, val);
-}
-
-/* Prepare to store registers.  The MIPS protocol can store individual
-   registers, so this function doesn't have to do anything.  */
-
-static void
-mips_prepare_to_store (struct target_ops *self, struct regcache *regcache)
-{
-}
-
-/* Store remote register(s).  */
-
-static void
-mips_store_registers (struct target_ops *ops,
-		      struct regcache *regcache, int regno)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  ULONGEST val;
-  int err;
-
-  if (regno == -1)
-    {
-      for (regno = 0; regno < gdbarch_num_regs (gdbarch); regno++)
-	mips_store_registers (ops, regcache, regno);
-      return;
-    }
-
-  regcache_cooked_read_unsigned (regcache, regno, &val);
-  mips_request (mips_monitor == MON_ROCKHOPPER ? 'T' : 'R',
-  		mips_map_regno (gdbarch, regno),
-		val,
-		&err, mips_receive_wait, NULL);
-  if (err)
-    mips_error (_("Can't write register %d: %s"), regno,
-                safe_strerror (errno));
-}
-
-/* Fetch a word from the target board.  Return word fetched in location
-   addressed by VALP.  Return 0 when successful; return positive error
-   code when not.  */
-
-static int
-mips_fetch_word (CORE_ADDR addr, unsigned int *valp)
-{
-  int err;
-
-  *valp = mips_request ('d', addr, 0, &err, mips_receive_wait, NULL);
-  if (err)
-    {
-      /* Data space failed; try instruction space.  */
-      *valp = mips_request ('i', addr, 0, &err,
-			    mips_receive_wait, NULL);
-    }
-  return err;
-}
-
-/* Store a word to the target board.  Returns errno code or zero for
-   success.  If OLD_CONTENTS is non-NULL, put the old contents of that
-   memory location there.  */
-
-/* FIXME! make sure only 32-bit quantities get stored!  */
-static int
-mips_store_word (CORE_ADDR addr, unsigned int val, int *old_contents)
-{
-  int err;
-  unsigned int oldcontents;
-
-  oldcontents = mips_request ('D', addr, val, &err,
-			      mips_receive_wait, NULL);
-  if (err)
-    {
-      /* Data space failed; try instruction space.  */
-      oldcontents = mips_request ('I', addr, val, &err,
-				  mips_receive_wait, NULL);
-      if (err)
-	return errno;
-    }
-  if (old_contents != NULL)
-    *old_contents = oldcontents;
-  return 0;
-}
-
-/* Helper for mips_xfer_partial that handles memory transfers.
-   Arguments are like target_xfer_partial.  Note that the protocol
-   gives us the correct value for a longword, since it transfers
-   values in ASCII.  We want the byte values, so we have to swap the
-   longword values.  */
-
-static int mask_address_p = 1;
-
-static enum target_xfer_status
-mips_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-		  ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  int i;
-  CORE_ADDR addr;
-  int count;
-  gdb_byte *buffer;
-  int status;
-
-  /* PMON targets do not cope well with 64 bit addresses.  Mask the
-     value down to 32 bits.  */
-  if (mask_address_p)
-    memaddr &= (CORE_ADDR) 0xffffffff;
-
-  /* Round starting address down to longword boundary.  */
-  addr = memaddr & ~3;
-  /* Round ending address up; get number of longwords that makes.  */
-  count = (((memaddr + len) - addr) + 3) / 4;
-  /* Allocate buffer of that many longwords.  */
-  buffer = alloca (count * 4);
-
-  if (writebuf != NULL)
-    {
-      /* Fill start and end extra bytes of buffer with existing data.  */
-      if (addr != memaddr || len < 4)
-	{
-	  unsigned int val;
-
-	  if (mips_fetch_word (addr, &val))
-	    return TARGET_XFER_E_IO;
-
-	  /* Need part of initial word -- fetch it.  */
-	  store_unsigned_integer (&buffer[0], 4, byte_order, val);
-	}
-
-      if (count > 1)
-	{
-	  unsigned int val;
-
-	  /* Need part of last word -- fetch it.  FIXME: we do this even
-	     if we don't need it.  */
-	  if (mips_fetch_word (addr + (count - 1) * 4, &val))
-	    return TARGET_XFER_E_IO;
-
-	  store_unsigned_integer (&buffer[(count - 1) * 4],
-				  4, byte_order, val);
-	}
-
-      /* Copy data to be written over corresponding part of buffer.  */
-
-      memcpy ((char *) buffer + (memaddr & 3), writebuf, len);
-
-      /* Write the entire buffer.  */
-
-      for (i = 0; i < count; i++, addr += 4)
-	{
-	  int word;
-
-	  word = extract_unsigned_integer (&buffer[i * 4], 4, byte_order);
-	  status = mips_store_word (addr, word, NULL);
-	  /* Report each kilobyte (we download 32-bit words at a time).  */
-	  if (i % 256 == 255)
-	    {
-	      printf_unfiltered ("*");
-	      gdb_flush (gdb_stdout);
-	    }
-	  if (status)
-	    return TARGET_XFER_E_IO;
-	  /* FIXME: Do we want a QUIT here?  */
-	}
-      if (count >= 256)
-	printf_unfiltered ("\n");
-    }
-  else
-    {
-      /* Read all the longwords.  */
-      for (i = 0; i < count; i++, addr += 4)
-	{
-	  unsigned int val;
-
-	  if (mips_fetch_word (addr, &val))
-	    return TARGET_XFER_E_IO;
-
-	  store_unsigned_integer (&buffer[i * 4], 4, byte_order, val);
-	  QUIT;
-	}
-
-      /* Copy appropriate bytes out of the buffer.  */
-      memcpy (readbuf, buffer + (memaddr & 3), len);
-    }
-  *xfered_len = len;
-  return TARGET_XFER_OK;
-}
-
-/* Target to_xfer_partial implementation.  */
-
-static enum target_xfer_status
-mips_xfer_partial (struct target_ops *ops, enum target_object object,
-		   const char *annex, gdb_byte *readbuf,
-		   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
-		   ULONGEST *xfered_len)
-{
-  switch (object)
-    {
-    case TARGET_OBJECT_MEMORY:
-      return mips_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
-
-    default:
-      return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
-					    readbuf, writebuf, offset, len,
-					    xfered_len);
-    }
-}
-
-/* Print info on this target.  */
-
-static void
-mips_files_info (struct target_ops *ignore)
-{
-  printf_unfiltered ("Debugging a MIPS board over a serial line.\n");
-}
-
-/* Kill the process running on the board.  This will actually only
-   work if we are doing remote debugging over the console input.  I
-   think that if IDT/sim had the remote debug interrupt enabled on the
-   right port, we could interrupt the process with a break signal.  */
-
-static void
-mips_kill (struct target_ops *ops)
-{
-  if (!mips_wait_flag)
-    {
-      target_mourn_inferior ();
-      return;
-    }
-
-  interrupt_count++;
-
-  if (interrupt_count >= 2)
-    {
-      interrupt_count = 0;
-
-      target_terminal_ours ();
-
-      if (query (_("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? ")))
-	{
-	  /* Clean up in such a way that mips_close won't try to talk
-	     to the board (it almost surely won't work since we
-	     weren't able to talk to it).  */
-	  mips_wait_flag = 0;
-	  close_ports ();
-
-	  printf_unfiltered ("Ending remote MIPS debugging.\n");
-	  target_mourn_inferior ();
-	  quit ();
-	}
-
-      target_terminal_inferior ();
-    }
-
-  if (remote_debug > 0)
-    printf_unfiltered ("Sending break\n");
-
-  serial_send_break (mips_desc);
-
-  target_mourn_inferior ();
-
-#if 0
-  if (mips_is_open)
-    {
-      char cc;
-
-      /* Send a ^C.  */
-      cc = '\003';
-      serial_write (mips_desc, &cc, 1);
-      sleep (1);
-      target_mourn_inferior ();
-    }
-#endif
-}
-
-/* Start running on the target board.  */
-
-static void
-mips_create_inferior (struct target_ops *ops, char *execfile,
-		      char *args, char **env, int from_tty)
-{
-  CORE_ADDR entry_pt;
-
-  if (args && *args)
-    {
-      warning (_("\
-Can't pass arguments to remote MIPS board; arguments ignored."));
-      /* And don't try to use them on the next "run" command.  */
-      execute_command ("set args", 0);
-    }
-
-  if (execfile == 0 || exec_bfd == 0)
-    error (_("No executable file specified"));
-
-  entry_pt = (CORE_ADDR) bfd_get_start_address (exec_bfd);
-
-  init_wait_for_inferior ();
-
-  regcache_write_pc (get_current_regcache (), entry_pt);
-}
-
-/* Clean up after a process. The bulk of the work is done in mips_close(),
-   which is called when unpushing the target.  */
-
-static void
-mips_mourn_inferior (struct target_ops *ops)
-{
-  if (current_ops != NULL)
-    unpush_target (current_ops);
-}
-
-/* We can write a breakpoint and read the shadow contents in one
-   operation.  */
-
-/* Insert a breakpoint.  On targets that don't have built-in
-   breakpoint support, we read the contents of the target location and
-   stash it, then overwrite it with a breakpoint instruction.  ADDR is
-   the target location in the target machine.  BPT is the breakpoint
-   being inserted or removed, which contains memory for saving the
-   target contents.  */
-
-static int
-mips_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			struct bp_target_info *bp_tgt)
-{
-  if (monitor_supports_breakpoints)
-    {
-      bp_tgt->placed_address = bp_tgt->reqstd_address;
-      return mips_set_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
-				  BREAK_FETCH);
-    }
-  else
-    return memory_insert_breakpoint (ops, gdbarch, bp_tgt);
-}
-
-/* Remove a breakpoint.  */
-
-static int
-mips_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
-			struct bp_target_info *bp_tgt)
-{
-  if (monitor_supports_breakpoints)
-    return mips_clear_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
-				  BREAK_FETCH);
-  else
-    return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
-}
-
-/* Tell whether this target can support a hardware breakpoint.  CNT
-   is the number of hardware breakpoints already installed.  This
-   implements the target_can_use_hardware_watchpoint macro.  */
-
-static int
-mips_can_use_watchpoint (struct target_ops *self,
-			 int type, int cnt, int othertype)
-{
-  return cnt < MAX_LSI_BREAKPOINTS && strcmp (target_shortname, "lsi") == 0;
-}
-
-
-/* Compute a don't care mask for the region bounding ADDR and ADDR + LEN - 1.
-   This is used for memory ref breakpoints.  */
-
-static unsigned long
-calculate_mask (CORE_ADDR addr, int len)
-{
-  unsigned long mask;
-  int i;
-
-  mask = addr ^ (addr + len - 1);
-
-  for (i = 32; i >= 0; i--)
-    if (mask == 0)
-      break;
-    else
-      mask >>= 1;
-
-  mask = (unsigned long) 0xffffffff >> i;
-
-  return mask;
-}
-
-
-/* Set a data watchpoint.  ADDR and LEN should be obvious.  TYPE is 0
-   for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write
-   watchpoint.  */
-
-static int
-mips_insert_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
-			struct expression *cond)
-{
-  if (mips_set_breakpoint (addr, len, type))
-    return -1;
-
-  return 0;
-}
-
-/* Remove a watchpoint.  */
-
-static int
-mips_remove_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
-			struct expression *cond)
-{
-  if (mips_clear_breakpoint (addr, len, type))
-    return -1;
-
-  return 0;
-}
-
-/* Test to see if a watchpoint has been hit.  Return 1 if so; return 0,
-   if not.  */
-
-static int
-mips_stopped_by_watchpoint (struct target_ops *ops)
-{
-  return hit_watchpoint;
-}
-
-
-/* Insert a breakpoint.  */
-
-static int
-mips_set_breakpoint (CORE_ADDR addr, int len, enum break_type type)
-{
-  return mips_common_breakpoint (1, addr, len, type);
-}
-
-
-/* Clear a breakpoint.  */
-
-static int
-mips_clear_breakpoint (CORE_ADDR addr, int len, enum break_type type)
-{
-  return mips_common_breakpoint (0, addr, len, type);
-}
-
-
-/* Check the error code from the return packet for an LSI breakpoint
-   command.  If there's no error, just return 0.  If it's a warning,
-   print the warning text and return 0.  If it's an error, print
-   the error text and return 1.  <ADDR> is the address of the breakpoint
-   that was being set.  <RERRFLG> is the error code returned by PMON.
-   This is a helper function for mips_common_breakpoint.  */
-
-static int
-mips_check_lsi_error (CORE_ADDR addr, int rerrflg)
-{
-  struct lsi_error *err;
-  const char *saddr = paddress (target_gdbarch (), addr);
-
-  if (rerrflg == 0)		/* no error */
-    return 0;
-
-  /* Warnings can be ORed together, so check them all.  */
-  if (rerrflg & W_WARN)
-    {
-      if (monitor_warnings)
-	{
-	  int found = 0;
-
-	  for (err = lsi_warning_table; err->code != 0; err++)
-	    {
-	      if ((err->code & rerrflg) == err->code)
-		{
-		  found = 1;
-		  fprintf_unfiltered (gdb_stderr, "\
-mips_common_breakpoint (%s): Warning: %s\n",
-				      saddr,
-				      err->string);
-		}
-	    }
-	  if (!found)
-	    fprintf_unfiltered (gdb_stderr, "\
-mips_common_breakpoint (%s): Unknown warning: 0x%x\n",
-				saddr,
-				rerrflg);
-	}
-      return 0;
-    }
-
-  /* Errors are unique, i.e. can't be ORed together.  */
-  for (err = lsi_error_table; err->code != 0; err++)
-    {
-      if ((err->code & rerrflg) == err->code)
-	{
-	  fprintf_unfiltered (gdb_stderr, "\
-mips_common_breakpoint (%s): Error: %s\n",
-			      saddr,
-			      err->string);
-	  return 1;
-	}
-    }
-  fprintf_unfiltered (gdb_stderr, "\
-mips_common_breakpoint (%s): Unknown error: 0x%x\n",
-		      saddr,
-		      rerrflg);
-  return 1;
-}
-
-
-/* This routine sends a breakpoint command to the remote target.
-
-   <SET> is 1 if setting a breakpoint, or 0 if clearing a breakpoint.
-   <ADDR> is the address of the breakpoint.
-   <LEN> the length of the region to break on.
-   <TYPE> is the type of breakpoint:
-   0 = write                    (BREAK_WRITE)
-   1 = read                     (BREAK_READ)
-   2 = read/write               (BREAK_ACCESS)
-   3 = instruction fetch        (BREAK_FETCH)
-
-   Return 0 if successful; otherwise 1.  */
-
-static int
-mips_common_breakpoint (int set, CORE_ADDR addr, int len, enum break_type type)
-{
-  int addr_size = gdbarch_addr_bit (target_gdbarch ()) / 8;
-  char buf[DATA_MAXLEN + 1];
-  char cmd, rcmd;
-  int rpid, rerrflg, rresponse, rlen;
-  int nfields;
-
-  addr = gdbarch_addr_bits_remove (target_gdbarch (), addr);
-
-  if (mips_monitor == MON_LSI)
-    {
-      if (set == 0)		/* clear breakpoint */
-	{
-	  /* The LSI PMON "clear breakpoint" has this form:
-	     <pid> 'b' <bptn> 0x0
-	     reply:
-	     <pid> 'b' 0x0 <code>
-
-	     <bptn> is a breakpoint number returned by an earlier 'B' command.
-	     Possible return codes: OK, E_BPT.  */
-
-	  int i;
-
-	  /* Search for the breakpoint in the table.  */
-	  for (i = 0; i < MAX_LSI_BREAKPOINTS; i++)
-	    if (lsi_breakpoints[i].type == type
-		&& lsi_breakpoints[i].addr == addr
-		&& lsi_breakpoints[i].len == len)
-	      break;
-
-	  /* Clear the table entry and tell PMON to clear the breakpoint.  */
-	  if (i == MAX_LSI_BREAKPOINTS)
-	    {
-	      warning (_("\
-mips_common_breakpoint: Attempt to clear bogus breakpoint at %s"),
-		       paddress (target_gdbarch (), addr));
-	      return 1;
-	    }
-
-	  lsi_breakpoints[i].type = BREAK_UNUSED;
-	  sprintf (buf, "0x0 b 0x%x 0x0", i);
-	  mips_send_packet (buf, 1);
-
-	  rlen = mips_receive_packet (buf, 1, mips_receive_wait);
-	  buf[rlen] = '\0';
-
-	  nfields = sscanf (buf, "0x%x b 0x0 0x%x", &rpid, &rerrflg);
-	  if (nfields != 2)
-	    mips_error (_("mips_common_breakpoint: "
-			"Bad response from remote board: %s"),
-			buf);
-
-	  return (mips_check_lsi_error (addr, rerrflg));
-	}
-      else
-	/* set a breakpoint */
-	{
-	  /* The LSI PMON "set breakpoint" command has this form:
-	     <pid> 'B' <addr> 0x0
-	     reply:
-	     <pid> 'B' <bptn> <code>
-
-	     The "set data breakpoint" command has this form:
-
-	     <pid> 'A' <addr1> <type> [<addr2>  [<value>]]
-
-	     where: type= "0x1" = read
-	     "0x2" = write
-	     "0x3" = access (read or write)
-
-	     The reply returns two values:
-	     bptn - a breakpoint number, which is a small integer with
-	     possible values of zero through 255.
-	     code - an error return code, a value of zero indicates a
-	     succesful completion, other values indicate various
-	     errors and warnings.
-
-	     Possible return codes: OK, W_QAL, E_QAL, E_OUT, E_NON.  */
-
-	  if (type == BREAK_FETCH)	/* instruction breakpoint */
-	    {
-	      cmd = 'B';
-	      sprintf (buf, "0x0 B 0x%s 0x0", phex_nz (addr, addr_size));
-	    }
-	  else
-	    /* watchpoint */
-	    {
-	      cmd = 'A';
-	      sprintf (buf, "0x0 A 0x%s 0x%x 0x%s",
-		       phex_nz (addr, addr_size),
-		       type == BREAK_READ ? 1 : (type == BREAK_WRITE ? 2 : 3),
-		       phex_nz (addr + len - 1, addr_size));
-	    }
-	  mips_send_packet (buf, 1);
-
-	  rlen = mips_receive_packet (buf, 1, mips_receive_wait);
-	  buf[rlen] = '\0';
-
-	  nfields = sscanf (buf, "0x%x %c 0x%x 0x%x",
-			    &rpid, &rcmd, &rresponse, &rerrflg);
-	  if (nfields != 4 || rcmd != cmd || rresponse > 255)
-	    mips_error (_("mips_common_breakpoint: "
-			"Bad response from remote board: %s"),
-			buf);
-
-	  if (rerrflg != 0)
-	    if (mips_check_lsi_error (addr, rerrflg))
-	      return 1;
-
-	  /* rresponse contains PMON's breakpoint number.  Record the
-	     information for this breakpoint so we can clear it later.  */
-	  lsi_breakpoints[rresponse].type = type;
-	  lsi_breakpoints[rresponse].addr = addr;
-	  lsi_breakpoints[rresponse].len = len;
-
-	  return 0;
-	}
-    }
-  else
-    {
-      /* On non-LSI targets, the breakpoint command has this form:
-         0x0 <CMD> <ADDR> <MASK> <FLAGS>
-         <MASK> is a don't care mask for addresses.
-         <FLAGS> is any combination of `r', `w', or `f' for 
-	 read/write/fetch.  */
-
-      unsigned long mask;
-
-      mask = calculate_mask (addr, len);
-      addr &= ~mask;
-
-      if (set)			/* set a breakpoint */
-	{
-	  char *flags;
-
-	  switch (type)
-	    {
-	    case BREAK_WRITE:	/* write */
-	      flags = "w";
-	      break;
-	    case BREAK_READ:	/* read */
-	      flags = "r";
-	      break;
-	    case BREAK_ACCESS:	/* read/write */
-	      flags = "rw";
-	      break;
-	    case BREAK_FETCH:	/* fetch */
-	      flags = "f";
-	      break;
-	    default:
-	      internal_error (__FILE__, __LINE__,
-			      _("failed internal consistency check"));
-	    }
-
-	  cmd = 'B';
-	  sprintf (buf, "0x0 B 0x%s 0x%s %s", phex_nz (addr, addr_size),
-		   phex_nz (mask, addr_size), flags);
-	}
-      else
-	{
-	  cmd = 'b';
-	  sprintf (buf, "0x0 b 0x%s", phex_nz (addr, addr_size));
-	}
-
-      mips_send_packet (buf, 1);
-
-      rlen = mips_receive_packet (buf, 1, mips_receive_wait);
-      buf[rlen] = '\0';
-
-      nfields = sscanf (buf, "0x%x %c 0x%x 0x%x",
-			&rpid, &rcmd, &rerrflg, &rresponse);
-
-      if (nfields != 4 || rcmd != cmd)
-	mips_error (_("mips_common_breakpoint: "
-		    "Bad response from remote board: %s"),
-		    buf);
-
-      if (rerrflg != 0)
-	{
-	  /* Ddb returns "0x0 b 0x16 0x0\000", whereas
-	     Cogent returns "0x0 b 0xffffffff 0x16\000": */
-	  if (mips_monitor == MON_DDB)
-	    rresponse = rerrflg;
-	  if (rresponse != 22)	/* invalid argument */
-	    fprintf_unfiltered (gdb_stderr, "\
-mips_common_breakpoint (%s):  Got error: 0x%x\n",
-				paddress (target_gdbarch (), addr), rresponse);
-	  return 1;
-	}
-    }
-  return 0;
-}
-
-/* Send one S record as specified by SREC of length LEN, starting
-   at ADDR.  Note, however, that ADDR is not used except to provide
-   a useful message to the user in the event that a NACK is received
-   from the board.  */
-
-static void
-send_srec (char *srec, int len, CORE_ADDR addr)
-{
-  while (1)
-    {
-      int ch;
-
-      serial_write (mips_desc, srec, len);
-
-      ch = mips_readchar (remote_timeout);
-
-      switch (ch)
-	{
-	case SERIAL_TIMEOUT:
-	  error (_("Timeout during download."));
-	  break;
-	case 0x6:		/* ACK */
-	  return;
-	case 0x15:		/* NACK */
-	  fprintf_unfiltered (gdb_stderr,
-			      "Download got a NACK at byte %s!  Retrying.\n",
-			      paddress (target_gdbarch (), addr));
-	  continue;
-	default:
-	  error (_("Download got unexpected ack char: 0x%x, retrying."),
-		 ch);
-	}
-    }
-}
-
-/*  Download a binary file by converting it to S records.  */
-
-static void
-mips_load_srec (const char *args)
-{
-  bfd *abfd;
-  asection *s;
-  char srec[1024];
-  bfd_byte *buffer;
-  unsigned int i;
-  unsigned int srec_frame = 200;
-  int reclen;
-  struct cleanup *cleanup;
-  static int hashmark = 1;
-
-  buffer = alloca (srec_frame * 2 + 256);
-
-  abfd = gdb_bfd_open (args, NULL, -1);
-  if (!abfd)
-    {
-      printf_filtered ("Unable to open file %s\n", args);
-      return;
-    }
-
-  cleanup = make_cleanup_bfd_unref (abfd);
-  if (bfd_check_format (abfd, bfd_object) == 0)
-    {
-      printf_filtered ("File is not an object file\n");
-      do_cleanups (cleanup);
-      return;
-    }
-
-/* This actually causes a download in the IDT binary format: */
-  mips_send_command (LOAD_CMD, 0);
-
-  for (s = abfd->sections; s; s = s->next)
-    {
-      if (s->flags & SEC_LOAD)
-	{
-	  unsigned int numbytes;
-
-	  /* FIXME!  vma too small?????  */
-	  printf_filtered ("%s\t: 0x%4lx .. 0x%4lx  ", s->name,
-			   (long) s->vma,
-			   (long) (s->vma + bfd_get_section_size (s)));
-	  gdb_flush (gdb_stdout);
-
-	  for (i = 0; i < bfd_get_section_size (s); i += numbytes)
-	    {
-	      numbytes = min (srec_frame, bfd_get_section_size (s) - i);
-
-	      bfd_get_section_contents (abfd, s, buffer, i, numbytes);
-
-	      reclen = mips_make_srec (srec, '3', s->vma + i, 
-				       buffer, numbytes);
-	      send_srec (srec, reclen, s->vma + i);
-
-	      if (deprecated_ui_load_progress_hook)
-		deprecated_ui_load_progress_hook (s->name, i);
-
-	      if (hashmark)
-		{
-		  putchar_unfiltered ('#');
-		  gdb_flush (gdb_stdout);
-		}
-
-	    }			/* Per-packet (or S-record) loop */
-
-	  putchar_unfiltered ('\n');
-	}			/* Loadable sections */
-    }
-  if (hashmark)
-    putchar_unfiltered ('\n');
-
-  /* Write a type 7 terminator record. no data for a type 7, and there
-     is no data, so len is 0.  */
-
-  reclen = mips_make_srec (srec, '7', abfd->start_address, NULL, 0);
-
-  send_srec (srec, reclen, abfd->start_address);
-
-  serial_flush_input (mips_desc);
-  do_cleanups (cleanup);
-}
-
-/*
- * mips_make_srec -- make an srecord.  This writes each line, one at a
- *      time, each with it's own header and trailer line.
- *      An srecord looks like this:
- *
- * byte count-+     address
- * start ---+ |        |       data        +- checksum
- *          | |        |                   |
- *        S01000006F6B692D746573742E73726563E4
- *        S315000448600000000000000000FC00005900000000E9
- *        S31A0004000023C1400037DE00F023604000377B009020825000348D
- *        S30B0004485A0000000000004E
- *        S70500040000F6
- *
- *      S<type><length><address><data><checksum>
- *
- *      Where
- *      - length
- *        is the number of bytes following upto the checksum.  Note that
- *        this is not the number of chars following, since it takes two
- *        chars to represent a byte.
- *      - type
- *        is one of:
- *        0) header record
- *        1) two byte address data record
- *        2) three byte address data record
- *        3) four byte address data record
- *        7) four byte address termination record
- *        8) three byte address termination record
- *        9) two byte address termination record
- *       
- *      - address
- *        is the start address of the data following, or in the case of
- *        a termination record, the start address of the image
- *      - data
- *        is the data.
- *      - checksum
- *        is the sum of all the raw byte data in the record, from the length
- *        upwards, modulo 256 and subtracted from 255.
- *
- * This routine returns the length of the S-record.
- *
- */
-
-static int
-mips_make_srec (char *buf, int type, CORE_ADDR memaddr, unsigned char *myaddr,
-		int len)
-{
-  unsigned char checksum;
-  int i;
-
-  /* Create the header for the srec.  addr_size is the number of bytes
-     in the address, and 1 is the number of bytes in the count.  */
-
-  /* FIXME!! bigger buf required for 64-bit!  */
-  buf[0] = 'S';
-  buf[1] = type;
-  buf[2] = len + 4 + 1;		/* len + 4 byte address + 1 byte checksum */
-  /* This assumes S3 style downloads (4byte addresses).  There should
-     probably be a check, or the code changed to make it more
-     explicit.  */
-  buf[3] = memaddr >> 24;
-  buf[4] = memaddr >> 16;
-  buf[5] = memaddr >> 8;
-  buf[6] = memaddr;
-  memcpy (&buf[7], myaddr, len);
-
-  /* Note that the checksum is calculated on the raw data, not the
-     hexified data.  It includes the length, address and the data
-     portions of the packet.  */
-  checksum = 0;
-  buf += 2;			/* Point at length byte.  */
-  for (i = 0; i < len + 4 + 1; i++)
-    checksum += *buf++;
-
-  *buf = ~checksum;
-
-  return len + 8;
-}
-
-/* The following manifest controls whether we enable the simple flow
-   control support provided by the monitor.  If enabled the code will
-   wait for an affirmative ACK between transmitting packets.  */
-#define DOETXACK (1)
-
-/* The PMON fast-download uses an encoded packet format constructed of
-   3byte data packets (encoded as 4 printable ASCII characters), and
-   escape sequences (preceded by a '/'):
-
-   'K'     clear checksum
-   'C'     compare checksum (12bit value, not included in checksum calculation)
-   'S'     define symbol name (for addr) terminated with ","
-           and padded to 4char boundary
-   'Z'     zero fill multiple of 3bytes
-   'B'     byte (12bit encoded value, of 8bit data)
-   'A'     address (36bit encoded value)
-   'E'     define entry as original address, and exit load
-
-   The packets are processed in 4 character chunks, so the escape
-   sequences that do not have any data (or variable length data)
-   should be padded to a 4 character boundary.  The decoder will give
-   an error if the complete message block size is not a multiple of
-   4bytes (size of record).
-
-   The encoding of numbers is done in 6bit fields.  The 6bit value is
-   used to index into this string to get the specific character
-   encoding for the value: */
-static char encoding[] =
-  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,.";
-
-/* Convert the number of bits required into an encoded number, 6bits
-   at a time (range 0..63).  Keep a checksum if required (passed
-   pointer non-NULL).  The function returns the number of encoded
-   characters written into the buffer.  */
-
-static int
-pmon_makeb64 (unsigned long v, char *p, int n, unsigned int *chksum)
-{
-  int count = (n / 6);
-
-  if ((n % 12) != 0)
-    {
-      fprintf_unfiltered (gdb_stderr,
-			  "Fast encoding bitcount must be a "
-			  "multiple of 12bits: %dbit%s\n",
-			  n, (n == 1) ? "" : "s");
-      return (0);
-    }
-  if (n > 36)
-    {
-      fprintf_unfiltered (gdb_stderr,
-			  "Fast encoding cannot process more "
-			  "than 36bits at the moment: %dbits\n", n);
-      return (0);
-    }
-
-  /* Deal with the checksum: */
-  if (chksum != NULL)
-    {
-      switch (n)
-	{
-	case 36:
-	  *chksum += ((v >> 24) & 0xFFF);
-	case 24:
-	  *chksum += ((v >> 12) & 0xFFF);
-	case 12:
-	  *chksum += ((v >> 0) & 0xFFF);
-	}
-    }
-
-  do
-    {
-      n -= 6;
-      *p++ = encoding[(v >> n) & 0x3F];
-    }
-  while (n > 0);
-
-  return (count);
-}
-
-/* Shorthand function (that could be in-lined) to output the zero-fill
-   escape sequence into the data stream.  */
-
-static int
-pmon_zeroset (int recsize, char **buff,
-	      unsigned int *amount, unsigned int *chksum)
-{
-  int count;
-
-  sprintf (*buff, "/Z");
-  count = pmon_makeb64 (*amount, (*buff + 2), 12, chksum);
-  *buff += (count + 2);
-  *amount = 0;
-  return (recsize + count + 2);
-}
-
-/* Add the checksum specified by *VALUE to end of the record under
-   construction.  *BUF specifies the location at which to begin
-   writing characters comprising the checksum information.  RECSIZE
-   specifies the size of the record constructed thus far.  (A trailing
-   NUL character may be present in the buffer holding the record, but
-   the record size does not include this character.)
-
-   Return the total size of the record after adding the checksum escape,
-   the checksum itself, and the trailing newline.
-   
-   The checksum specified by *VALUE is zeroed out prior to returning.
-   Additionally, *BUF is updated to refer to the location just beyond
-   the record elements added by this call.  */
-
-static int
-pmon_checkset (int recsize, char **buff, unsigned int *value)
-{
-  int count;
-
-  /* Add the checksum (without updating the value): */
-  sprintf (*buff, "/C");
-  count = pmon_makeb64 (*value, (*buff + 2), 12, NULL);
-  *buff += (count + 2);
-  sprintf (*buff, "\n");
-  *buff += 2;			/* Include zero terminator.  */
-  /* Forcing a checksum validation clears the sum: */
-  *value = 0;
-  return (recsize + count + 3);
-}
-
-/* Amount of padding we leave after at the end of the output buffer,
-   for the checksum and line termination characters: */
-#define CHECKSIZE (4 + 4 + 4 + 2)
-/* zero-fill, checksum, transfer end and line termination space.  */
-
-/* The amount of binary data loaded from the object file in a single
-   operation: */
-#define BINCHUNK (1024)
-
-/* Maximum line of data accepted by the monitor: */
-#define MAXRECSIZE (550)
-/* NOTE: This constant depends on the monitor being used.  This value
-   is for PMON 5.x on the Cogent Vr4300 board.  */
-
-/* Create a FastLoad format record.
-
-   *OUTBUF is the buffer into which a FastLoad formatted record is
-   written.  On return, the pointer position represented by *OUTBUF
-   is updated to point at the end of the data, i.e. the next position
-   in the buffer that may be written.  No attempt is made to NUL-
-   terminate this portion of the record written to the buffer.
-   
-   INBUF contains the binary input data from which the FastLoad
-   formatted record will be built.  *INPTR is an index into this
-   buffer.  *INPTR is updated as the input is consumed.  Thus, on
-   return, the caller has access to the position of the next input
-   byte yet to be processed.  INAMOUNT is the size, in bytes, of the
-   input data.
-
-   *RECSIZE will be written with the size of the record written to the
-   output buffer prior to returning.  This size does not include a
-   NUL-termination byte as none is written to the output buffer.
-
-   *CSUM is the output buffer checksum.  It is updated as data is
-   written to the output buffer.
-   
-   *ZEROFILL is the current number of 3-byte zero sequences that have
-   been encountered.  It is both an input and an output to this
-   function.  */
-
-static void
-pmon_make_fastrec (char **outbuf, unsigned char *inbuf, int *inptr,
-		   int inamount, int *recsize, unsigned int *csum,
-		   unsigned int *zerofill)
-{
-  int count = 0;
-  char *p = *outbuf;
-
-  /* This is a simple check to ensure that our data will fit within
-     the maximum allowable record size.  Each record output is 4bytes
-     in length.  We must allow space for a pending zero fill command,
-     the record, and a checksum record.  */
-  while ((*recsize < (MAXRECSIZE - CHECKSIZE)) && ((inamount - *inptr) > 0))
-    {
-      /* Process the binary data: */
-      if ((inamount - *inptr) < 3)
-	{
-	  if (*zerofill != 0)
-	    *recsize = pmon_zeroset (*recsize, &p, zerofill, csum);
-	  sprintf (p, "/B");
-	  count = pmon_makeb64 (inbuf[*inptr], &p[2], 12, csum);
-	  p += (2 + count);
-	  *recsize += (2 + count);
-	  (*inptr)++;
-	}
-      else
-	{
-	  unsigned int value = ((inbuf[*inptr + 0] << 16)
-				| (inbuf[*inptr + 1] << 8)
-				| (inbuf[*inptr + 2]));
-
-	  /* Simple check for zero data.  TODO: A better check would be
-	     to check the last, and then the middle byte for being zero
-	     (if the first byte is not).  We could then check for
-	     following runs of zeros, and if above a certain size it is
-	     worth the 4 or 8 character hit of the byte insertions used
-	     to pad to the start of the zeroes.  NOTE: This also depends
-	     on the alignment at the end of the zero run.  */
-	  if (value == 0x00000000)
-	    {
-	      (*zerofill)++;
-	      if (*zerofill == 0xFFF)	/* 12bit counter */
-		*recsize = pmon_zeroset (*recsize, &p, zerofill, csum);
-	    }
-	  else
-	    {
-	      if (*zerofill != 0)
-		*recsize = pmon_zeroset (*recsize, &p, zerofill, csum);
-	      count = pmon_makeb64 (value, p, 24, csum);
-	      p += count;
-	      *recsize += count;
-	    }
-	  *inptr += 3;
-	}
-    }
-
-  *outbuf = p;
-  return;
-}
-
-/* Attempt to read an ACK.  If an ACK is not read in a timely manner,
-   output the message specified by MESG.  Return -1 for failure, 0
-   for success.  */
-
-static int
-pmon_check_ack (char *mesg)
-{
-#if defined(DOETXACK)
-  int c;
-
-  if (!tftp_in_use)
-    {
-      c = serial_readchar (udp_in_use ? udp_desc : mips_desc,
-			   remote_timeout);
-      if ((c == SERIAL_TIMEOUT) || (c != 0x06))
-	{
-	  fprintf_unfiltered (gdb_stderr,
-			      "Failed to receive valid ACK for %s\n", mesg);
-	  return (-1);		/* Terminate the download.  */
-	}
-    }
-#endif /* DOETXACK */
-  return (0);
-}
-
-/* pmon_download - Send a sequence of characters to the PMON download port,
-   which is either a serial port or a UDP socket.  */
-
-static void
-pmon_start_download (void)
-{
-  if (tftp_in_use)
-    {
-      /* Create the temporary download file.  */
-      if ((tftp_file = fopen (tftp_localname, "w")) == NULL)
-	perror_with_name (tftp_localname);
-    }
-  else
-    {
-      mips_send_command (udp_in_use ? LOAD_CMD_UDP : LOAD_CMD, 0);
-      mips_expect ("Downloading from ");
-      mips_expect (udp_in_use ? "udp" : "tty0");
-      mips_expect (", ^C to abort\r\n");
-    }
-}
-
-/* Look for the string specified by STRING sent from the target board
-   during a download operation.  If the string in question is not
-   seen, output an error message, remove the temporary file, if
-   appropriate, and return 0.  Otherwise, return 1 to indicate
-   success.  */
-
-static int
-mips_expect_download (char *string)
-{
-  if (!mips_expect (string))
-    {
-      fprintf_unfiltered (gdb_stderr, "Load did not complete successfully.\n");
-      if (tftp_in_use)
-	remove (tftp_localname);	/* Remove temporary file.  */
-      return 0;
-    }
-  else
-    return 1;
-}
-
-/* Look for messages from the target board associated with the entry
-   address.
-
-   NOTE: This function doesn't indicate success or failure, so we
-   have no way to determine whether or not the output from the board
-   was correctly seen.  However, given that other items are checked
-   after this, it seems unlikely that those checks will pass if this
-   check doesn't first (silently) pass.  */
-
-static void
-pmon_check_entry_address (char *entry_address, int final)
-{
-  char hexnumber[9];		/* Includes '\0' space.  */
-
-  mips_expect_timeout (entry_address, tftp_in_use ? 15 : remote_timeout);
-  sprintf (hexnumber, "%x", final);
-  mips_expect (hexnumber);
-  mips_expect ("\r\n");
-}
-
-/* Look for messages from the target board showing the total number of
-   bytes downloaded to the board.  Output 1 for success if the tail
-   end of the message was read correctly, 0 otherwise.  */
-
-static int
-pmon_check_total (int bintotal)
-{
-  char hexnumber[9];		/* Includes '\0' space.  */
-
-  mips_expect ("\r\ntotal = 0x");
-  sprintf (hexnumber, "%x", bintotal);
-  mips_expect (hexnumber);
-  return mips_expect_download (" bytes\r\n");
-}
-
-/* Look for the termination messages associated with the end of
-   a download to the board.
-
-   Also, when `tftp_in_use' is set, issue the load command to the
-   board causing the file to be transferred.  (This is done prior
-   to looking for the above mentioned termination messages.)  */
-   
-static void
-pmon_end_download (int final, int bintotal)
-{
-  char hexnumber[9];		/* Includes '\0' space.  */
-
-  if (tftp_in_use)
-    {
-      static char *load_cmd_prefix = "load -b -s ";
-      char *cmd;
-      struct stat stbuf;
-
-      /* Close off the temporary file containing the load data.  */
-      fclose (tftp_file);
-      tftp_file = NULL;
-
-      /* Make the temporary file readable by the world.  */
-      if (stat (tftp_localname, &stbuf) == 0)
-	chmod (tftp_localname, stbuf.st_mode | S_IROTH);
-
-      /* Must reinitialize the board to prevent PMON from crashing.  */
-      if (mips_monitor != MON_ROCKHOPPER)
-	mips_send_command ("initEther\r", -1);
-
-      /* Send the load command.  */
-      cmd = xmalloc (strlen (load_cmd_prefix) + strlen (tftp_name) + 2);
-      strcpy (cmd, load_cmd_prefix);
-      strcat (cmd, tftp_name);
-      strcat (cmd, "\r");
-      mips_send_command (cmd, 0);
-      xfree (cmd);
-      if (!mips_expect_download ("Downloading from "))
-	return;
-      if (!mips_expect_download (tftp_name))
-	return;
-      if (!mips_expect_download (", ^C to abort\r\n"))
-	return;
-    }
-
-  /* Wait for the stuff that PMON prints after the load has completed.
-     The timeout value for use in the tftp case (15 seconds) was picked
-     arbitrarily but might be too small for really large downloads.  FIXME.  */
-  switch (mips_monitor)
-    {
-    case MON_LSI:
-      pmon_check_ack ("termination");
-      pmon_check_entry_address ("Entry address is ", final);
-      if (!pmon_check_total (bintotal))
-	return;
-      break;
-    case MON_ROCKHOPPER:
-      if (!pmon_check_total (bintotal))
-	return;
-      pmon_check_entry_address ("Entry Address  = ", final);
-      break;
-    default:
-      pmon_check_entry_address ("Entry Address  = ", final);
-      pmon_check_ack ("termination");
-      if (!pmon_check_total (bintotal))
-	return;
-      break;
-    }
-
-  if (tftp_in_use)
-    remove (tftp_localname);	/* Remove temporary file.  */
-}
-
-/* Write the buffer specified by BUFFER of length LENGTH to either
-   the board or the temporary file that'll eventually be transferred
-   to the board.  */
-
-static void
-pmon_download (char *buffer, int length)
-{
-  if (tftp_in_use)
-    {
-      size_t written;
-
-      written = fwrite (buffer, 1, length, tftp_file);
-      if (written < length)
-	perror_with_name (tftp_localname);
-    }
-  else
-    serial_write (udp_in_use ? udp_desc : mips_desc, buffer, length);
-}
-
-/* Open object or executable file, FILE, and send it to the board
-   using the FastLoad format.  */
-
-static void
-pmon_load_fast (const char *file)
-{
-  bfd *abfd;
-  asection *s;
-  unsigned char *binbuf;
-  char *buffer;
-  int reclen;
-  unsigned int csum = 0;
-  int hashmark = !tftp_in_use;
-  int bintotal = 0;
-  int final = 0;
-  int finished = 0;
-  struct cleanup *cleanup;
-
-  buffer = (char *) xmalloc (MAXRECSIZE + 1);
-  binbuf = (unsigned char *) xmalloc (BINCHUNK);
-
-  abfd = gdb_bfd_open (file, NULL, -1);
-  if (!abfd)
-    {
-      printf_filtered ("Unable to open file %s\n", file);
-      return;
-    }
-  cleanup = make_cleanup_bfd_unref (abfd);
-
-  if (bfd_check_format (abfd, bfd_object) == 0)
-    {
-      printf_filtered ("File is not an object file\n");
-      do_cleanups (cleanup);
-      return;
-    }
-
-  /* Setup the required download state: */
-  mips_send_command ("set dlproto etxack\r", -1);
-  mips_send_command ("set dlecho off\r", -1);
-  /* NOTE: We get a "cannot set variable" message if the variable is
-     already defined to have the argument we give.  The code doesn't
-     care, since it just scans to the next prompt anyway.  */
-  /* Start the download: */
-  pmon_start_download ();
-
-  /* Zero the checksum.  */
-  sprintf (buffer, "/Kxx\n");
-  reclen = strlen (buffer);
-  pmon_download (buffer, reclen);
-  finished = pmon_check_ack ("/Kxx");
-
-  for (s = abfd->sections; s && !finished; s = s->next)
-    if (s->flags & SEC_LOAD)	/* Only deal with loadable sections.  */
-      {
-	bintotal += bfd_get_section_size (s);
-	final = (s->vma + bfd_get_section_size (s));
-
-	printf_filtered ("%s\t: 0x%4x .. 0x%4x  ", s->name,
-			 (unsigned int) s->vma,
-			 (unsigned int) (s->vma + bfd_get_section_size (s)));
-	gdb_flush (gdb_stdout);
-
-	/* Output the starting address.  */
-	sprintf (buffer, "/A");
-	reclen = pmon_makeb64 (s->vma, &buffer[2], 36, &csum);
-	buffer[2 + reclen] = '\n';
-	buffer[3 + reclen] = '\0';
-	reclen += 3;	/* For the initial escape code and carriage return.  */
-	pmon_download (buffer, reclen);
-	finished = pmon_check_ack ("/A");
-
-	if (!finished)
-	  {
-	    unsigned int binamount;
-	    unsigned int zerofill = 0;
-	    char *bp = buffer;
-	    unsigned int i;
-
-	    reclen = 0;
-
-	    for (i = 0;
-		 i < bfd_get_section_size (s) && !finished;
-		 i += binamount)
-	      {
-		int binptr = 0;
-
-		binamount = min (BINCHUNK, bfd_get_section_size (s) - i);
-
-		bfd_get_section_contents (abfd, s, binbuf, i, binamount);
-
-		/* This keeps a rolling checksum, until we decide to output
-		   the line: */
-		for (; ((binamount - binptr) > 0);)
-		  {
-		    pmon_make_fastrec (&bp, binbuf, &binptr, binamount, 
-				       &reclen, &csum, &zerofill);
-		    if (reclen >= (MAXRECSIZE - CHECKSIZE))
-		      {
-			reclen = pmon_checkset (reclen, &bp, &csum);
-			pmon_download (buffer, reclen);
-			finished = pmon_check_ack ("data record");
-			if (finished)
-			  {
-			    zerofill = 0;	/* Do not transmit pending
-						   zerofills.  */
-			    break;
-			  }
-
-			if (deprecated_ui_load_progress_hook)
-			  deprecated_ui_load_progress_hook (s->name, i);
-
-			if (hashmark)
-			  {
-			    putchar_unfiltered ('#');
-			    gdb_flush (gdb_stdout);
-			  }
-
-			bp = buffer;
-			reclen = 0;	/* buffer processed */
-		      }
-		  }
-	      }
-
-	    /* Ensure no out-standing zerofill requests: */
-	    if (zerofill != 0)
-	      reclen = pmon_zeroset (reclen, &bp, &zerofill, &csum);
-
-	    /* and then flush the line: */
-	    if (reclen > 0)
-	      {
-		reclen = pmon_checkset (reclen, &bp, &csum);
-		/* Currently pmon_checkset outputs the line terminator by
-		   default, so we write out the buffer so far: */
-		pmon_download (buffer, reclen);
-		finished = pmon_check_ack ("record remnant");
-	      }
-	  }
-
-	putchar_unfiltered ('\n');
-      }
-
-  /* Terminate the transfer.  We know that we have an empty output
-     buffer at this point.  */
-  sprintf (buffer, "/E/E\n");	/* Include dummy padding characters.  */
-  reclen = strlen (buffer);
-  pmon_download (buffer, reclen);
-
-  if (finished)
-    {				/* Ignore the termination message: */
-      serial_flush_input (udp_in_use ? udp_desc : mips_desc);
-    }
-  else
-    {				/* Deal with termination message: */
-      pmon_end_download (final, bintotal);
-    }
-
-  do_cleanups (cleanup);
-  return;
-}
-
-/* mips_load -- download a file.  */
-
-static void
-mips_load (struct target_ops *self, const char *file, int from_tty)
-{
-  struct regcache *regcache;
-
-  /* Get the board out of remote debugging mode.  */
-  if (mips_exit_debug ())
-    error (_("mips_load:  Couldn't get into monitor mode."));
-
-  if (mips_monitor != MON_IDT)
-    pmon_load_fast (file);
-  else
-    mips_load_srec (file);
-
-  mips_initialize ();
-
-  /* Finally, make the PC point at the start address.  */
-  regcache = get_current_regcache ();
-  if (mips_monitor != MON_IDT)
-    {
-      /* Work around problem where PMON monitor updates the PC after a load
-         to a different value than GDB thinks it has.  The following ensures
-         that the regcache_write_pc() WILL update the PC value: */
-      regcache_invalidate (regcache,
-			   mips_regnum (get_regcache_arch (regcache))->pc);
-    }
-  if (exec_bfd)
-    regcache_write_pc (regcache, bfd_get_start_address (exec_bfd));
-}
-
-/* Check to see if a thread is still alive.  */
- 
-static int
-mips_thread_alive (struct target_ops *ops, ptid_t ptid)
-{
-  if (ptid_equal (ptid, remote_mips_ptid))
-    /* The monitor's task is always alive.  */
-    return 1;
-
-  return 0;
-}
-
-/* Convert a thread ID to a string.  Returns the string in a static
-   buffer.  */
-
-static char *
-mips_pid_to_str (struct target_ops *ops, ptid_t ptid)
-{
-  static char buf[64];
-
-  if (ptid_equal (ptid, remote_mips_ptid))
-    {
-      xsnprintf (buf, sizeof buf, "Thread <main>");
-      return buf;
-    }
-
-  return normal_pid_to_str (ptid);
-}
-
-/* Pass the command argument as a packet to PMON verbatim.  */
-
-static void
-pmon_command (char *args, int from_tty)
-{
-  char buf[DATA_MAXLEN + 1];
-  int rlen;
-
-  sprintf (buf, "0x0 %s", args);
-  mips_send_packet (buf, 1);
-  printf_filtered ("Send packet: %s\n", buf);
-
-  rlen = mips_receive_packet (buf, 1, mips_receive_wait);
-  buf[rlen] = '\0';
-  printf_filtered ("Received packet: %s\n", buf);
-}
-
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_remote_mips;
-
-/* Initialize mips_ops, lsi_ops, ddb_ops, pmon_ops, and rockhopper_ops.
-   Create target specific commands and perform other initializations
-   specific to this file.  */
-
-void
-_initialize_remote_mips (void)
-{
-  /* Initialize the fields in mips_ops that are common to all four targets.  */
-  mips_ops.to_longname = "Remote MIPS debugging over serial line";
-  mips_ops.to_close = mips_close;
-  mips_ops.to_detach = mips_detach;
-  mips_ops.to_resume = mips_resume;
-  mips_ops.to_fetch_registers = mips_fetch_registers;
-  mips_ops.to_store_registers = mips_store_registers;
-  mips_ops.to_prepare_to_store = mips_prepare_to_store;
-  mips_ops.to_xfer_partial = mips_xfer_partial;
-  mips_ops.to_files_info = mips_files_info;
-  mips_ops.to_insert_breakpoint = mips_insert_breakpoint;
-  mips_ops.to_remove_breakpoint = mips_remove_breakpoint;
-  mips_ops.to_insert_watchpoint = mips_insert_watchpoint;
-  mips_ops.to_remove_watchpoint = mips_remove_watchpoint;
-  mips_ops.to_stopped_by_watchpoint = mips_stopped_by_watchpoint;
-  mips_ops.to_can_use_hw_breakpoint = mips_can_use_watchpoint;
-  mips_ops.to_kill = mips_kill;
-  mips_ops.to_load = mips_load;
-  mips_ops.to_create_inferior = mips_create_inferior;
-  mips_ops.to_mourn_inferior = mips_mourn_inferior;
-  mips_ops.to_thread_alive = mips_thread_alive;
-  mips_ops.to_pid_to_str = mips_pid_to_str;
-  mips_ops.to_log_command = serial_log_command;
-  mips_ops.to_stratum = process_stratum;
-  mips_ops.to_has_all_memory = default_child_has_all_memory;
-  mips_ops.to_has_memory = default_child_has_memory;
-  mips_ops.to_has_stack = default_child_has_stack;
-  mips_ops.to_has_registers = default_child_has_registers;
-  mips_ops.to_has_execution = default_child_has_execution;
-  mips_ops.to_magic = OPS_MAGIC;
-
-  /* Copy the common fields to all four target vectors.  */
-  rockhopper_ops = pmon_ops = ddb_ops = lsi_ops = mips_ops;
-
-  /* Initialize target-specific fields in the target vectors.  */
-  mips_ops.to_shortname = "mips";
-  mips_ops.to_doc = "\
-Debug a board using the MIPS remote debugging protocol over a serial line.\n\
-The argument is the device it is connected to or, if it contains a colon,\n\
-HOST:PORT to access a board over a network";
-  mips_ops.to_open = mips_open;
-  mips_ops.to_wait = mips_wait;
-
-  pmon_ops.to_shortname = "pmon";
-  pmon_ops.to_doc = "\
-Debug a board using the PMON MIPS remote debugging protocol over a serial\n\
-line. The argument is the device it is connected to or, if it contains a\n\
-colon, HOST:PORT to access a board over a network";
-  pmon_ops.to_open = pmon_open;
-  pmon_ops.to_wait = mips_wait;
-
-  ddb_ops.to_shortname = "ddb";
-  ddb_ops.to_doc = "\
-Debug a board using the PMON MIPS remote debugging protocol over a serial\n\
-line. The first argument is the device it is connected to or, if it contains\n\
-a colon, HOST:PORT to access a board over a network.  The optional second\n\
-parameter is the temporary file in the form HOST:FILENAME to be used for\n\
-TFTP downloads to the board.  The optional third parameter is the local name\n\
-of the TFTP temporary file, if it differs from the filename seen by the board.";
-  ddb_ops.to_open = ddb_open;
-  ddb_ops.to_wait = mips_wait;
-
-  rockhopper_ops.to_shortname = "rockhopper";
-  rockhopper_ops.to_doc = ddb_ops.to_doc;
-  rockhopper_ops.to_open = rockhopper_open;
-  rockhopper_ops.to_wait = mips_wait;
-
-  lsi_ops.to_shortname = "lsi";
-  lsi_ops.to_doc = pmon_ops.to_doc;
-  lsi_ops.to_open = lsi_open;
-  lsi_ops.to_wait = mips_wait;
-
-  /* Add the targets.  */
-  add_target (&mips_ops);
-  add_target (&pmon_ops);
-  add_target (&ddb_ops);
-  add_target (&lsi_ops);
-  add_target (&rockhopper_ops);
-
-  add_setshow_zinteger_cmd ("timeout", no_class, &mips_receive_wait, _("\
-Set timeout in seconds for remote MIPS serial I/O."), _("\
-Show timeout in seconds for remote MIPS serial I/O."), NULL,
-			    NULL,
-			    NULL, /* FIXME: i18n: */
-			    &setlist, &showlist);
-
-  add_setshow_zinteger_cmd ("retransmit-timeout", no_class,
-			    &mips_retransmit_wait, _("\
-Set retransmit timeout in seconds for remote MIPS serial I/O."), _("\
-Show retransmit timeout in seconds for remote MIPS serial I/O."), _("\
-This is the number of seconds to wait for an acknowledgement to a packet\n\
-before resending the packet."),
-			    NULL,
-			    NULL, /* FIXME: i18n: */
-			    &setlist, &showlist);
-
-  add_setshow_zinteger_cmd ("syn-garbage-limit", no_class,
-			    &mips_syn_garbage,  _("\
-Set the maximum number of characters to ignore when scanning for a SYN."), _("\
-Show the maximum number of characters to ignore when scanning for a SYN."), _("\
-This is the maximum number of characters GDB will ignore when trying to\n\
-synchronize with the remote system.  A value of -1 means that there is no\n\
-limit. (Note that these characters are printed out even though they are\n\
-ignored.)"),
-			    NULL,
-			    NULL, /* FIXME: i18n: */
-			    &setlist, &showlist);
-
-  add_setshow_string_cmd ("monitor-prompt", class_obscure,
-			  &mips_monitor_prompt, _("\
-Set the prompt that GDB expects from the monitor."), _("\
-Show the prompt that GDB expects from the monitor."), NULL,
-			  NULL,
-			  NULL, /* FIXME: i18n: */
-			  &setlist, &showlist);
-
-  add_setshow_zinteger_cmd ("monitor-warnings", class_obscure,
-			    &monitor_warnings, _("\
-Set printing of monitor warnings."), _("\
-Show printing of monitor warnings."), _("\
-When enabled, monitor warnings about hardware breakpoints will be displayed."),
-			    NULL,
-			    NULL, /* FIXME: i18n: */
-			    &setlist, &showlist);
-
-  add_com ("pmon", class_obscure, pmon_command,
-	   _("Send a packet to PMON (must be in debug mode)."));
-
-  add_setshow_boolean_cmd ("mask-address", no_class, &mask_address_p, _("\
-Set zeroing of upper 32 bits of 64-bit addresses when talking to PMON targets."), _("\
-Show zeroing of upper 32 bits of 64-bit addresses when talking to PMON targets."), _("\
-Use \"on\" to enable the masking and \"off\" to disable it."),
-			   NULL,
-			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
-  remote_mips_ptid = ptid_build (42000, 0, 42000);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-notif.c ./gdb/remote-notif.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-notif.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-notif.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Remote notification in GDB protocol
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -116,8 +116,8 @@ remote_notif_process (struct remote_noti
 static void
 remote_async_get_pending_events_handler (gdb_client_data data)
 {
-  gdb_assert (non_stop);
-  remote_notif_process (data, NULL);
+  gdb_assert (target_is_non_stop_p ());
+  remote_notif_process ((struct remote_notif_state *) data, NULL);
 }
 
 /* Remote notification handler.  Parse BUF, queue notification and
@@ -166,7 +166,7 @@ handle_notification (struct remote_notif
       /* Notify the event loop there's a stop reply to acknowledge
 	 and that there may be more events to fetch.  */
       QUEUE_enque (notif_client_p, state->notif_queue, nc);
-      if (non_stop)
+      if (target_is_non_stop_p ())
 	{
 	  /* In non-stop, We mark REMOTE_ASYNC_GET_PENDING_EVENTS_TOKEN
 	     in order to go on what we were doing and postpone
@@ -230,7 +230,7 @@ notif_event_xfree (struct notif_event *e
 static void
 do_notif_event_xfree (void *arg)
 {
-  notif_event_xfree (arg);
+  notif_event_xfree ((struct notif_event *) arg);
 }
 
 /* Return an allocated remote_notif_state.  */
@@ -238,7 +238,7 @@ do_notif_event_xfree (void *arg)
 struct remote_notif_state *
 remote_notif_state_allocate (void)
 {
-  struct remote_notif_state *notif_state = xzalloc (sizeof (*notif_state));
+  struct remote_notif_state *notif_state = XCNEW (struct remote_notif_state);
 
   notif_state->notif_queue = QUEUE_alloc (notif_client_p, NULL);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-notif.h ./gdb/remote-notif.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-notif.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-notif.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Remote notification in GDB protocol
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-sim.c ./gdb/remote-sim.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/remote-sim.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/remote-sim.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic remote debugging interface for simulators.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
    Steve Chamberlain (sac@cygnus.com).
@@ -88,7 +88,7 @@ static void gdbsim_files_info (struct ta
 
 static void gdbsim_mourn_inferior (struct target_ops *target);
 
-static void gdbsim_stop (struct target_ops *self, ptid_t ptid);
+static void gdbsim_interrupt (struct target_ops *self, ptid_t ptid);
 
 void simulator_command (char *args, int from_tty);
 
@@ -152,9 +152,10 @@ static int
 check_for_duplicate_sim_descriptor (struct inferior *inf, void *arg)
 {
   struct sim_inferior_data *sim_data;
-  SIM_DESC new_sim_desc = arg;
+  SIM_DESC new_sim_desc = (SIM_DESC) arg;
 
-  sim_data = inferior_data (inf, sim_inferior_data_key);
+  sim_data = ((struct sim_inferior_data *)
+	      inferior_data (inf, sim_inferior_data_key));
 
   return (sim_data != NULL && sim_data->gdbsim_desc == new_sim_desc);
 }
@@ -172,7 +173,7 @@ get_sim_inferior_data (struct inferior *
 {
   SIM_DESC sim_desc = NULL;
   struct sim_inferior_data *sim_data
-    = inferior_data (inf, sim_inferior_data_key);
+    = (struct sim_inferior_data *) inferior_data (inf, sim_inferior_data_key);
 
   /* Try to allocate a new sim instance, if needed.  We do this ahead of
      a potential allocation of a sim_inferior_data struct in order to
@@ -257,7 +258,7 @@ get_sim_inferior_data_by_ptid (ptid_t pt
 static void
 sim_inferior_data_cleanup (struct inferior *inf, void *data)
 {
-  struct sim_inferior_data *sim_data = data;
+  struct sim_inferior_data *sim_data = (struct sim_inferior_data *) data;
 
   if (sim_data != NULL)
     {
@@ -553,7 +554,7 @@ gdbsim_kill (struct target_ops *ops)
 
   /* There is no need to `kill' running simulator - the simulator is
      not running.  Mourning it is enough.  */
-  target_mourn_inferior ();
+  target_mourn_inferior (inferior_ptid);
 }
 
 /* Load an executable file into the target process.  This is expected to
@@ -766,8 +767,8 @@ gdbsim_open (const char *args, int from_
 static int
 gdbsim_close_inferior (struct inferior *inf, void *arg)
 {
-  struct sim_inferior_data *sim_data = inferior_data (inf,
-						      sim_inferior_data_key);
+  struct sim_inferior_data *sim_data
+    = (struct sim_inferior_data *) inferior_data (inf, sim_inferior_data_key);
   if (sim_data != NULL)
     {
       ptid_t ptid = sim_data->remote_sim_ptid;
@@ -849,7 +850,7 @@ gdbsim_resume_inferior (struct inferior 
 {
   struct sim_inferior_data *sim_data
     = get_sim_inferior_data (inf, SIM_INSTANCE_NOT_NEEDED);
-  struct resume_data *rd = arg;
+  struct resume_data *rd = (struct resume_data *) arg;
 
   if (sim_data)
     {
@@ -894,17 +895,17 @@ gdbsim_resume (struct target_ops *ops,
     error (_("The program is not being run."));
 }
 
-/* Notify the simulator of an asynchronous request to stop.
+/* Notify the simulator of an asynchronous request to interrupt.
 
-   The simulator shall ensure that the stop request is eventually
+   The simulator shall ensure that the interrupt request is eventually
    delivered to the simulator.  If the call is made while the
-   simulator is not running then the stop request is processed when
+   simulator is not running then the interrupt request is processed when
    the simulator is next resumed.
 
    For simulators that do not support this operation, just abort.  */
 
 static int
-gdbsim_stop_inferior (struct inferior *inf, void *arg)
+gdbsim_interrupt_inferior (struct inferior *inf, void *arg)
 {
   struct sim_inferior_data *sim_data
     = get_sim_inferior_data (inf, SIM_INSTANCE_NEEDED);
@@ -924,13 +925,13 @@ gdbsim_stop_inferior (struct inferior *i
 }
 
 static void
-gdbsim_stop (struct target_ops *self, ptid_t ptid)
+gdbsim_interrupt (struct target_ops *self, ptid_t ptid)
 {
   struct sim_inferior_data *sim_data;
 
   if (ptid_equal (ptid, minus_one_ptid))
     {
-      iterate_over_inferiors (gdbsim_stop_inferior, NULL);
+      iterate_over_inferiors (gdbsim_interrupt_inferior, NULL);
     }
   else
     {
@@ -940,7 +941,7 @@ gdbsim_stop (struct target_ops *self, pt
 	error (_("Can't stop pid %d.  No inferior found."),
 	       ptid_get_pid (ptid));
 
-      gdbsim_stop_inferior (inf, NULL);
+      gdbsim_interrupt_inferior (inf, NULL);
     }
 }
 
@@ -954,10 +955,7 @@ gdb_os_poll_quit (host_callback *p)
     deprecated_ui_loop_hook (0);
 
   if (check_quit_flag ())	/* gdb's idea of quit */
-    {
-      clear_quit_flag ();	/* we've stolen it */
-      return 1;
-    }
+    return 1;
   return 0;
 }
 
@@ -968,7 +966,7 @@ gdb_os_poll_quit (host_callback *p)
 static void
 gdbsim_cntrl_c (int signo)
 {
-  gdbsim_stop (NULL, minus_one_ptid);
+  gdbsim_interrupt (NULL, minus_one_ptid);
 }
 
 static ptid_t
@@ -976,7 +974,7 @@ gdbsim_wait (struct target_ops *ops,
 	     ptid_t ptid, struct target_waitstatus *status, int options)
 {
   struct sim_inferior_data *sim_data;
-  static RETSIGTYPE (*prev_sigint) ();
+  static sighandler_t prev_sigint;
   int sigrc = 0;
   enum sim_stop reason = sim_running;
 
@@ -1034,13 +1032,13 @@ gdbsim_wait (struct target_ops *ops,
 	case GDB_SIGNAL_TRAP:
 	default:
 	  status->kind = TARGET_WAITKIND_STOPPED;
-	  status->value.sig = sigrc;
+	  status->value.sig = (enum gdb_signal) sigrc;
 	  break;
 	}
       break;
     case sim_signalled:
       status->kind = TARGET_WAITKIND_SIGNALLED;
-      status->value.sig = sigrc;
+      status->value.sig = (enum gdb_signal) sigrc;
       break;
     case sim_running:
     case sim_polling:
@@ -1198,7 +1196,8 @@ simulator_command (char *args, int from_
      thus allocating memory that would not be garbage collected until
      the ultimate destruction of the associated inferior.  */
 
-  sim_data  = inferior_data (current_inferior (), sim_inferior_data_key);
+  sim_data  = ((struct sim_inferior_data *)
+	       inferior_data (current_inferior (), sim_inferior_data_key));
   if (sim_data == NULL || sim_data->gdbsim_desc == NULL)
     {
 
@@ -1231,7 +1230,8 @@ sim_command_completer (struct cmd_list_e
   int i;
   VEC (char_ptr) *result = NULL;
 
-  sim_data = inferior_data (current_inferior (), sim_inferior_data_key);
+  sim_data = ((struct sim_inferior_data *)
+	      inferior_data (current_inferior (), sim_inferior_data_key));
   if (sim_data == NULL || sim_data->gdbsim_desc == NULL)
     return NULL;
 
@@ -1326,7 +1326,7 @@ init_gdbsim_ops (void)
   gdbsim_ops.to_load = gdbsim_load;
   gdbsim_ops.to_create_inferior = gdbsim_create_inferior;
   gdbsim_ops.to_mourn_inferior = gdbsim_mourn_inferior;
-  gdbsim_ops.to_stop = gdbsim_stop;
+  gdbsim_ops.to_interrupt = gdbsim_interrupt;
   gdbsim_ops.to_thread_alive = gdbsim_thread_alive;
   gdbsim_ops.to_pid_to_str = gdbsim_pid_to_str;
   gdbsim_ops.to_stratum = process_stratum;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reply_mig_hack.awk ./gdb/reply_mig_hack.awk
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reply_mig_hack.awk	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/reply_mig_hack.awk	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Reply server mig-output massager
 #
-#   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 #
 #   Written by Miles Bader <miles@gnu.ai.mit.edu>
 #
@@ -95,7 +95,7 @@ parse_phase == 4 {
   print; next;
 }
 
-parse_phase == 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ {
+parse_phase == 5 && /^[ \t]*(auto |static )?const mach_msg_type_t/ {
   # The type check structure for an argument.
   arg_check_name[num_checks] = $(NF - 2);
   num_checks++;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reverse.c ./gdb/reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/reverse.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/reverse.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Reverse execution and reverse debugging.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -142,7 +142,7 @@ save_bookmark_command (char *args, int f
     error (_("target_get_bookmark failed."));
 
   /* Set up a bookmark struct.  */
-  b = xcalloc (1, sizeof (struct bookmark));
+  b = XCNEW (struct bookmark);
   b->number = ++bookmark_count;
   init_sal (&b->sal);
   b->pc = regcache_read_pc (get_current_regcache ());
@@ -216,9 +216,6 @@ delete_all_bookmarks (void)
 static void
 delete_bookmark_command (char *args, int from_tty)
 {
-  int num;
-  struct get_number_or_range_state state;
-
   if (bookmark_chain == NULL)
     {
       warning (_("No bookmarks."));
@@ -233,10 +230,10 @@ delete_bookmark_command (char *args, int
       return;
     }
 
-  init_number_or_range (&state, args);
-  while (!state.finished)
+  number_or_range_parser parser (args);
+  while (!parser.finished ())
     {
-      num = get_number_or_range (&state);
+      int num = parser.get_number ();
       if (!delete_one_bookmark (num))
 	/* Not found.  */
 	warning (_("No bookmark #%d."), num);
@@ -323,20 +320,16 @@ bookmark_1 (int bnum)
 static void
 bookmarks_info (char *args, int from_tty)
 {
-  int bnum = -1;
-
   if (!bookmark_chain)
     printf_filtered (_("No bookmarks.\n"));
   else if (args == NULL || *args == '\0')
     bookmark_1 (-1);
   else
     {
-      struct get_number_or_range_state state;
-
-      init_number_or_range (&state, args);
-      while (!state.finished)
+      number_or_range_parser parser (args);
+      while (!parser.finished ())
 	{
-	  bnum = get_number_or_range (&state);
+	  int bnum = parser.get_number ();
 	  bookmark_1 (bnum);
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rl78-tdep.c ./gdb/rl78-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rl78-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rl78-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Renesas RL78 for GDB, the GNU debugger.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
@@ -261,6 +261,30 @@ struct rl78_prologue
   int reg_offset[RL78_NUM_TOTAL_REGS];
 };
 
+/* Construct type for PSW register.  */
+
+static struct type *
+rl78_psw_type (struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->rl78_psw_type == NULL)
+    {
+      tdep->rl78_psw_type = arch_flags_type (gdbarch,
+					     "builtin_type_rl78_psw", 1);
+      append_flags_type_flag (tdep->rl78_psw_type, 0, "CY");
+      append_flags_type_flag (tdep->rl78_psw_type, 1, "ISP0");
+      append_flags_type_flag (tdep->rl78_psw_type, 2, "ISP1");
+      append_flags_type_flag (tdep->rl78_psw_type, 3, "RBS0");
+      append_flags_type_flag (tdep->rl78_psw_type, 4, "AC");
+      append_flags_type_flag (tdep->rl78_psw_type, 5, "RBS1");
+      append_flags_type_flag (tdep->rl78_psw_type, 6, "Z");
+      append_flags_type_flag (tdep->rl78_psw_type, 7, "IE");
+    }
+
+  return tdep->rl78_psw_type;
+}
+
 /* Implement the "register_type" gdbarch method.  */
 
 static struct type *
@@ -273,7 +297,7 @@ rl78_register_type (struct gdbarch *gdba
   else if (reg_nr == RL78_RAW_PC_REGNUM)
     return tdep->rl78_uint32;
   else if (reg_nr == RL78_PSW_REGNUM)
-    return (tdep->rl78_psw_type);
+    return rl78_psw_type (gdbarch);
   else if (reg_nr <= RL78_MEM_REGNUM
            || (RL78_X_REGNUM <= reg_nr && reg_nr <= RL78_H_REGNUM)
 	   || (RL78_BANK0_R0_REGNUM <= reg_nr
@@ -768,21 +792,13 @@ rl78_pseudo_register_write (struct gdbar
     gdb_assert_not_reached ("invalid pseudo register number");
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
+/* The documented BRK instruction is actually a two byte sequence,
+   {0x61, 0xcc}, but instructions may be as short as one byte.
+   Correspondence with Renesas revealed that the one byte sequence
+   0xff is used when a one byte breakpoint instruction is required.  */
+constexpr gdb_byte rl78_break_insn[] = { 0xff };
 
-static const gdb_byte *
-rl78_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-                         int *lenptr)
-{
-  /* The documented BRK instruction is actually a two byte sequence,
-     {0x61, 0xcc}, but instructions may be as short as one byte.
-     Correspondence with Renesas revealed that the one byte sequence
-     0xff is used when a one byte breakpoint instruction is required.  */
-  static gdb_byte breakpoint[] = { 0xff };
-
-  *lenptr = sizeof breakpoint;
-  return breakpoint;
-}
+typedef BP_MANIPULATION (rl78_break_insn) rl78_breakpoint;
 
 /* Define a "handle" struct for fetching the next opcode.  */
 
@@ -851,7 +867,8 @@ opc_reg_to_gdb_regnum (int opcreg)
 static int
 rl78_get_opcode_byte (void *handle)
 {
-  struct rl78_get_opcode_byte_handle *opcdata = handle;
+  struct rl78_get_opcode_byte_handle *opcdata
+    = (struct rl78_get_opcode_byte_handle *) handle;
   int status;
   gdb_byte byte;
 
@@ -1104,10 +1121,11 @@ rl78_analyze_frame_prologue (struct fram
       if (!func_start)
 	stop_addr = func_start;
 
-      rl78_analyze_prologue (func_start, stop_addr, *this_prologue_cache);
+      rl78_analyze_prologue (func_start, stop_addr,
+			     (struct rl78_prologue *) *this_prologue_cache);
     }
 
-  return *this_prologue_cache;
+  return (struct rl78_prologue *) *this_prologue_cache;
 }
 
 /* Given a frame and a prologue cache, return this frame's base.  */
@@ -1215,9 +1233,7 @@ rl78_dwarf_reg_to_regnum (struct gdbarch
   else if (reg == 37)
     return RL78_PC_REGNUM;
   else
-    internal_error (__FILE__, __LINE__,
-                    _("Undefined dwarf2 register mapping of reg %d"),
-		    reg);
+    return -1;
 }
 
 /* Implement the `register_sim_regno' gdbarch method.  */
@@ -1396,7 +1412,7 @@ rl78_gdbarch_init (struct gdbarch_info i
 
   /* None found, create a new architecture from the information
      provided.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
 
@@ -1410,26 +1426,9 @@ rl78_gdbarch_init (struct gdbarch_info i
   tdep->rl78_int32 = arch_integer_type (gdbarch, 32, 0, "int32_t");
 
   tdep->rl78_data_pointer
-    = arch_type (gdbarch, TYPE_CODE_PTR, 16 / TARGET_CHAR_BIT,
-                 xstrdup ("rl78_data_addr_t"));
-  TYPE_TARGET_TYPE (tdep->rl78_data_pointer) = tdep->rl78_void;
-  TYPE_UNSIGNED (tdep->rl78_data_pointer) = 1;
-
+    = arch_pointer_type (gdbarch, 16, "rl78_data_addr_t", tdep->rl78_void);
   tdep->rl78_code_pointer
-    = arch_type (gdbarch, TYPE_CODE_PTR, 32 / TARGET_CHAR_BIT,
-                 xstrdup ("rl78_code_addr_t"));
-  TYPE_TARGET_TYPE (tdep->rl78_code_pointer) = tdep->rl78_void;
-  TYPE_UNSIGNED (tdep->rl78_code_pointer) = 1;
-
-  tdep->rl78_psw_type = arch_flags_type (gdbarch, "builtin_type_rl78_psw", 1);
-  append_flags_type_flag (tdep->rl78_psw_type, 0, "CY");
-  append_flags_type_flag (tdep->rl78_psw_type, 1, "ISP0");
-  append_flags_type_flag (tdep->rl78_psw_type, 2, "ISP1");
-  append_flags_type_flag (tdep->rl78_psw_type, 3, "RBS0");
-  append_flags_type_flag (tdep->rl78_psw_type, 4, "AC");
-  append_flags_type_flag (tdep->rl78_psw_type, 5, "RBS1");
-  append_flags_type_flag (tdep->rl78_psw_type, 6, "Z");
-  append_flags_type_flag (tdep->rl78_psw_type, 7, "IE");
+    = arch_pointer_type (gdbarch, 32, "rl78_code_addr_t", tdep->rl78_void);
 
   /* Registers.  */
   set_gdbarch_num_regs (gdbarch, RL78_NUM_REGS);
@@ -1467,7 +1466,8 @@ rl78_gdbarch_init (struct gdbarch_info i
   set_gdbarch_addr_bits_remove (gdbarch, rl78_addr_bits_remove);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, rl78_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, rl78_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, rl78_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
 
   /* Disassembly.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-aix-tdep.c ./gdb/rs6000-aix-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-aix-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-aix-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native support code for PPC AIX, for GDB the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Free Software Foundation, Inc.
 
@@ -290,8 +290,6 @@ rs6000_push_dummy_call (struct gdbarch *
       else
 	{
 	  /* Argument can fit in one register.  No problem.  */
-	  int adj = gdbarch_byte_order (gdbarch)
-		    == BFD_ENDIAN_BIG ? reg_size - len : 0;
 	  gdb_byte word[MAX_REGISTER_SIZE];
 
 	  memset (word, 0, reg_size);
@@ -599,10 +597,10 @@ rs6000_convert_from_func_ptr_addr (struc
 /* Calculate the destination of a branch/jump.  Return -1 if not a branch.  */
 
 static CORE_ADDR
-branch_dest (struct frame_info *frame, int opcode, int instr,
+branch_dest (struct regcache *regcache, int opcode, int instr,
 	     CORE_ADDR pc, CORE_ADDR safety)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR dest;
@@ -635,29 +633,33 @@ branch_dest (struct frame_info *frame, i
 
       if (ext_op == 16)		/* br conditional register */
 	{
-          dest = get_frame_register_unsigned (frame, tdep->ppc_lr_regnum) & ~3;
+          dest = regcache_raw_get_unsigned (regcache, tdep->ppc_lr_regnum) & ~3;
 
 	  /* If we are about to return from a signal handler, dest is
 	     something like 0x3c90.  The current frame is a signal handler
 	     caller frame, upon completion of the sigreturn system call
 	     execution will return to the saved PC in the frame.  */
 	  if (dest < AIX_TEXT_SEGMENT_BASE)
-	    dest = read_memory_unsigned_integer
-		     (get_frame_base (frame) + SIG_FRAME_PC_OFFSET,
-		      tdep->wordsize, byte_order);
+	    {
+	      struct frame_info *frame = get_current_frame ();
+
+	      dest = read_memory_unsigned_integer
+		(get_frame_base (frame) + SIG_FRAME_PC_OFFSET,
+		 tdep->wordsize, byte_order);
+	    }
 	}
 
       else if (ext_op == 528)	/* br cond to count reg */
 	{
-          dest = get_frame_register_unsigned (frame,
-					      tdep->ppc_ctr_regnum) & ~3;
+          dest = regcache_raw_get_unsigned (regcache,
+					    tdep->ppc_ctr_regnum) & ~3;
 
 	  /* If we are about to execute a system call, dest is something
 	     like 0x22fc or 0x3b00.  Upon completion the system call
 	     will return to the address in the link register.  */
 	  if (dest < AIX_TEXT_SEGMENT_BASE)
-            dest = get_frame_register_unsigned (frame,
-						tdep->ppc_lr_regnum) & ~3;
+            dest = regcache_raw_get_unsigned (regcache,
+					      tdep->ppc_lr_regnum) & ~3;
 	}
       else
 	return -1;
@@ -671,27 +673,28 @@ branch_dest (struct frame_info *frame, i
 
 /* AIX does not support PT_STEP.  Simulate it.  */
 
-static int
-rs6000_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+rs6000_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int ii, insn;
   CORE_ADDR loc;
   CORE_ADDR breaks[2];
   int opcode;
+  VEC (CORE_ADDR) *next_pcs;
 
-  loc = get_frame_pc (frame);
+  loc = regcache_read_pc (regcache);
 
   insn = read_memory_integer (loc, 4, byte_order);
 
-  if (ppc_deal_with_atomic_sequence (frame))
-    return 1;
+  next_pcs = ppc_deal_with_atomic_sequence (regcache);
+  if (next_pcs != NULL)
+    return next_pcs;
   
   breaks[0] = loc + PPC_INSN_SIZE;
   opcode = insn >> 26;
-  breaks[1] = branch_dest (frame, opcode, insn, loc, breaks[0]);
+  breaks[1] = branch_dest (regcache, opcode, insn, loc, breaks[0]);
 
   /* Don't put two breakpoints on the same address.  */
   if (breaks[1] == breaks[0])
@@ -702,12 +705,12 @@ rs6000_software_single_step (struct fram
       /* ignore invalid breakpoint.  */
       if (breaks[ii] == -1)
 	continue;
-      insert_single_step_breakpoint (gdbarch, aspace, breaks[ii]);
+      VEC_safe_push (CORE_ADDR, next_pcs, breaks[ii]);
     }
 
   errno = 0;			/* FIXME, don't ignore errors!  */
   /* What errors?  {read,write}_memory call error().  */
-  return 1;
+  return next_pcs;
 }
 
 /* Implement the "auto_wide_charset" gdbarch method for this platform.  */
@@ -983,7 +986,7 @@ rs6000_aix_ld_info_to_xml (struct gdbarc
 
   obstack_grow_str0 (&obstack, "</library-list-aix>\n");
 
-  buf = obstack_finish (&obstack);
+  buf = (const char *) obstack_finish (&obstack);
   len_avail = strlen (buf);
   if (offset >= len_avail)
     len= 0;
@@ -1018,7 +1021,7 @@ rs6000_aix_core_xfer_shared_libraries_ai
 	   bfd_errmsg (bfd_get_error ()));
   ldinfo_size = bfd_get_section_size (ldinfo_sec);
 
-  ldinfo_buf = xmalloc (ldinfo_size);
+  ldinfo_buf = (gdb_byte *) xmalloc (ldinfo_size);
   cleanup = make_cleanup (xfree, ldinfo_buf);
 
   if (! bfd_get_section_contents (core_bfd, ldinfo_sec,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-aix-tdep.h ./gdb/rs6000-aix-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-aix-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-aix-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-lynx178-tdep.c ./gdb/rs6000-lynx178-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-lynx178-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-lynx178-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -142,8 +142,6 @@ rs6000_lynx178_push_dummy_call (struct g
       else
 	{
 	  /* Argument can fit in one register.  No problem.  */
-	  int adj = gdbarch_byte_order (gdbarch)
-		    == BFD_ENDIAN_BIG ? reg_size - len : 0;
 	  gdb_byte word[MAX_REGISTER_SIZE];
 
 	  memset (word, 0, reg_size);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-nat.c ./gdb/rs6000-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,6 @@
 #include "gdbcore.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "libbfd.h"		/* For bfd_default_set_arch_mach (FIXME) */
 #include "bfd.h"
 #include "gdb-stabs.h"
 #include "regcache.h"
@@ -143,9 +142,9 @@ rs6000_ptrace64 (int req, int id, long l
 {
 #ifdef ARCH3264
 #  ifdef HAVE_PTRACE64
-  int ret = ptrace64 (req, id, addr, data, buf);
+  int ret = ptrace64 (req, id, addr, data, (PTRACE_TYPE_ARG5) buf);
 #  else
-  int ret = ptracex (req, id, addr, data, buf);
+  int ret = ptracex (req, id, addr, data, (PTRACE_TYPE_ARG5) buf);
 #  endif
 #else
   int ret = 0;
@@ -593,7 +592,7 @@ rs6000_ptrace_ldinfo (ptid_t ptid)
 {
   const int pid = ptid_get_pid (ptid);
   int ldi_size = 1024;
-  gdb_byte *ldi = xmalloc (ldi_size);
+  void *ldi = xmalloc (ldi_size);
   int rc = -1;
 
   while (1)
@@ -615,7 +614,7 @@ rs6000_ptrace_ldinfo (ptid_t ptid)
       ldi = xrealloc (ldi, ldi_size);
     }
 
-  return ldi;
+  return (gdb_byte *) ldi;
 }
 
 /* Implement the to_xfer_partial target_ops method for
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-tdep.c ./gdb/rs6000-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,7 +43,6 @@
 #include "record-full.h"
 #include "auxv.h"
 
-#include "libbfd.h"		/* for bfd_default_set_arch_mach */
 #include "coff/internal.h"	/* for libcoff.h */
 #include "libcoff.h"		/* for xcoff_data */
 #include "coff/xcoff.h"
@@ -63,6 +62,10 @@
 #include "frame-unwind.h"
 #include "frame-base.h"
 
+#include "ax.h"
+#include "ax-gdb.h"
+#include <algorithm>
+
 #include "features/rs6000/powerpc-32.c"
 #include "features/rs6000/powerpc-altivec32.c"
 #include "features/rs6000/powerpc-vsx32.c"
@@ -103,6 +106,9 @@
     && (regnum) >= (tdep)->ppc_efpr0_regnum \
     && (regnum) < (tdep)->ppc_efpr0_regnum + ppc_num_efprs)
 
+/* Holds the current set of options to be passed to the disassembler.  */
+static char *powerpc_disassembler_options;
+
 /* The list of available "set powerpc ..." and "show powerpc ..."
    commands.  */
 static struct cmd_list_element *setpowerpccmdlist = NULL;
@@ -328,7 +334,7 @@ init_sim_regno_table (struct gdbarch *ar
     set_sim_regno (sim_regno, tdep->ppc_acc_regnum, sim_ppc_acc_regnum);
   /* spefscr is a special-purpose register, so the code below handles it.  */
 
-#ifdef WITH_SIM
+#ifdef WITH_PPC_SIM
   /* Now handle all special-purpose registers.  Verify that they
      haven't mistakenly been assigned numbers by any of the above
      code.  */
@@ -507,7 +513,8 @@ ppc_supply_gregset (const struct regset 
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  const struct ppc_reg_offsets *offsets = regset->regmap;
+  const struct ppc_reg_offsets *offsets
+    = (const struct ppc_reg_offsets *) regset->regmap;
   size_t offset;
   int regsize;
 
@@ -519,27 +526,31 @@ ppc_supply_gregset (const struct regset 
       for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
 	   i < tdep->ppc_gp0_regnum + ppc_num_gprs;
 	   i++, offset += gpr_size)
-	ppc_supply_reg (regcache, i, gregs, offset, gpr_size);
+	ppc_supply_reg (regcache, i, (const gdb_byte *) gregs, offset,
+			gpr_size);
 
       ppc_supply_reg (regcache, gdbarch_pc_regnum (gdbarch),
-		      gregs, offsets->pc_offset, gpr_size);
+		      (const gdb_byte *) gregs, offsets->pc_offset, gpr_size);
       ppc_supply_reg (regcache, tdep->ppc_ps_regnum,
-		      gregs, offsets->ps_offset, gpr_size);
+		      (const gdb_byte *) gregs, offsets->ps_offset, gpr_size);
       ppc_supply_reg (regcache, tdep->ppc_lr_regnum,
-		      gregs, offsets->lr_offset, gpr_size);
+		      (const gdb_byte *) gregs, offsets->lr_offset, gpr_size);
       ppc_supply_reg (regcache, tdep->ppc_ctr_regnum,
-		      gregs, offsets->ctr_offset, gpr_size);
+		      (const gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
       ppc_supply_reg (regcache, tdep->ppc_cr_regnum,
-		      gregs, offsets->cr_offset, offsets->xr_size);
+		      (const gdb_byte *) gregs, offsets->cr_offset,
+		      offsets->xr_size);
       ppc_supply_reg (regcache, tdep->ppc_xer_regnum,
-		      gregs, offsets->xer_offset, offsets->xr_size);
+		      (const gdb_byte *) gregs, offsets->xer_offset,
+		      offsets->xr_size);
       ppc_supply_reg (regcache, tdep->ppc_mq_regnum,
-		      gregs, offsets->mq_offset, offsets->xr_size);
+		      (const gdb_byte *) gregs, offsets->mq_offset,
+		      offsets->xr_size);
       return;
     }
 
   offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, &regsize);
-  ppc_supply_reg (regcache, regnum, gregs, offset, regsize);
+  ppc_supply_reg (regcache, regnum, (const gdb_byte *) gregs, offset, regsize);
 }
 
 /* Supply register REGNUM in the floating-point register set REGSET
@@ -559,7 +570,7 @@ ppc_supply_fpregset (const struct regset
     return;
 
   tdep = gdbarch_tdep (gdbarch);
-  offsets = regset->regmap;
+  offsets = (const struct ppc_reg_offsets *) regset->regmap;
   if (regnum == -1)
     {
       int i;
@@ -567,15 +578,16 @@ ppc_supply_fpregset (const struct regset
       for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
 	   i < tdep->ppc_fp0_regnum + ppc_num_fprs;
 	   i++, offset += 8)
-	ppc_supply_reg (regcache, i, fpregs, offset, 8);
+	ppc_supply_reg (regcache, i, (const gdb_byte *) fpregs, offset, 8);
 
       ppc_supply_reg (regcache, tdep->ppc_fpscr_regnum,
-		      fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+		      (const gdb_byte *) fpregs, offsets->fpscr_offset,
+		      offsets->fpscr_size);
       return;
     }
 
   offset = ppc_fpreg_offset (tdep, offsets, regnum);
-  ppc_supply_reg (regcache, regnum, fpregs, offset,
+  ppc_supply_reg (regcache, regnum, (const gdb_byte *) fpregs, offset,
 		  regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
 }
 
@@ -602,12 +614,12 @@ ppc_supply_vsxregset (const struct regse
       for (i = tdep->ppc_vsr0_upper_regnum;
 	   i < tdep->ppc_vsr0_upper_regnum + 32;
 	   i++)
-	ppc_supply_reg (regcache, i, vsxregs, 0, 8);
+	ppc_supply_reg (regcache, i, (const gdb_byte *) vsxregs, 0, 8);
 
       return;
     }
   else
-    ppc_supply_reg (regcache, regnum, vsxregs, 0, 8);
+    ppc_supply_reg (regcache, regnum, (const gdb_byte *) vsxregs, 0, 8);
 }
 
 /* Supply register REGNUM in the Altivec register set REGSET
@@ -627,7 +639,7 @@ ppc_supply_vrregset (const struct regset
     return;
 
   tdep = gdbarch_tdep (gdbarch);
-  offsets = regset->regmap;
+  offsets = (const struct ppc_reg_offsets *) regset->regmap;
   if (regnum == -1)
     {
       int i;
@@ -635,23 +647,23 @@ ppc_supply_vrregset (const struct regset
       for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
 	   i < tdep->ppc_vr0_regnum + ppc_num_vrs;
 	   i++, offset += 16)
-        ppc_supply_reg (regcache, i, vrregs, offset, 16);
+        ppc_supply_reg (regcache, i, (const gdb_byte *) vrregs, offset, 16);
 
       ppc_supply_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
-		      vrregs, offsets->vscr_offset, 4);
+		      (const gdb_byte *) vrregs, offsets->vscr_offset, 4);
 
       ppc_supply_reg (regcache, tdep->ppc_vrsave_regnum,
-		      vrregs, offsets->vrsave_offset, 4);
+		      (const gdb_byte *) vrregs, offsets->vrsave_offset, 4);
       return;
     }
 
   offset = ppc_vrreg_offset (tdep, offsets, regnum);
   if (regnum != tdep->ppc_vrsave_regnum
       && regnum != tdep->ppc_vrsave_regnum - 1)
-    ppc_supply_reg (regcache, regnum, vrregs, offset, 16);
+    ppc_supply_reg (regcache, regnum, (const gdb_byte *) vrregs, offset, 16);
   else
     ppc_supply_reg (regcache, regnum,
-		    vrregs, offset, 4);
+		    (const gdb_byte *) vrregs, offset, 4);
 }
 
 /* Collect register REGNUM in the general-purpose register set
@@ -666,7 +678,8 @@ ppc_collect_gregset (const struct regset
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  const struct ppc_reg_offsets *offsets = regset->regmap;
+  const struct ppc_reg_offsets *offsets
+    = (const struct ppc_reg_offsets *) regset->regmap;
   size_t offset;
   int regsize;
 
@@ -678,27 +691,30 @@ ppc_collect_gregset (const struct regset
       for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
 	   i < tdep->ppc_gp0_regnum + ppc_num_gprs;
 	   i++, offset += gpr_size)
-	ppc_collect_reg (regcache, i, gregs, offset, gpr_size);
+	ppc_collect_reg (regcache, i, (gdb_byte *) gregs, offset, gpr_size);
 
       ppc_collect_reg (regcache, gdbarch_pc_regnum (gdbarch),
-		       gregs, offsets->pc_offset, gpr_size);
+		       (gdb_byte *) gregs, offsets->pc_offset, gpr_size);
       ppc_collect_reg (regcache, tdep->ppc_ps_regnum,
-		       gregs, offsets->ps_offset, gpr_size);
+		       (gdb_byte *) gregs, offsets->ps_offset, gpr_size);
       ppc_collect_reg (regcache, tdep->ppc_lr_regnum,
-		       gregs, offsets->lr_offset, gpr_size);
+		       (gdb_byte *) gregs, offsets->lr_offset, gpr_size);
       ppc_collect_reg (regcache, tdep->ppc_ctr_regnum,
-		       gregs, offsets->ctr_offset, gpr_size);
+		       (gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
       ppc_collect_reg (regcache, tdep->ppc_cr_regnum,
-		       gregs, offsets->cr_offset, offsets->xr_size);
+		       (gdb_byte *) gregs, offsets->cr_offset,
+		       offsets->xr_size);
       ppc_collect_reg (regcache, tdep->ppc_xer_regnum,
-		       gregs, offsets->xer_offset, offsets->xr_size);
+		       (gdb_byte *) gregs, offsets->xer_offset,
+		       offsets->xr_size);
       ppc_collect_reg (regcache, tdep->ppc_mq_regnum,
-		       gregs, offsets->mq_offset, offsets->xr_size);
+		       (gdb_byte *) gregs, offsets->mq_offset,
+		       offsets->xr_size);
       return;
     }
 
   offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, &regsize);
-  ppc_collect_reg (regcache, regnum, gregs, offset, regsize);
+  ppc_collect_reg (regcache, regnum, (gdb_byte *) gregs, offset, regsize);
 }
 
 /* Collect register REGNUM in the floating-point register set
@@ -720,7 +736,7 @@ ppc_collect_fpregset (const struct regse
     return;
 
   tdep = gdbarch_tdep (gdbarch);
-  offsets = regset->regmap;
+  offsets = (const struct ppc_reg_offsets *) regset->regmap;
   if (regnum == -1)
     {
       int i;
@@ -728,15 +744,16 @@ ppc_collect_fpregset (const struct regse
       for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
 	   i < tdep->ppc_fp0_regnum + ppc_num_fprs;
 	   i++, offset += 8)
-	ppc_collect_reg (regcache, i, fpregs, offset, 8);
+	ppc_collect_reg (regcache, i, (gdb_byte *) fpregs, offset, 8);
 
       ppc_collect_reg (regcache, tdep->ppc_fpscr_regnum,
-		       fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+		       (gdb_byte *) fpregs, offsets->fpscr_offset,
+		       offsets->fpscr_size);
       return;
     }
 
   offset = ppc_fpreg_offset (tdep, offsets, regnum);
-  ppc_collect_reg (regcache, regnum, fpregs, offset,
+  ppc_collect_reg (regcache, regnum, (gdb_byte *) fpregs, offset,
 		   regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
 }
 
@@ -765,12 +782,12 @@ ppc_collect_vsxregset (const struct regs
       for (i = tdep->ppc_vsr0_upper_regnum;
 	   i < tdep->ppc_vsr0_upper_regnum + 32;
 	   i++)
-	ppc_collect_reg (regcache, i, vsxregs, 0, 8);
+	ppc_collect_reg (regcache, i, (gdb_byte *) vsxregs, 0, 8);
 
       return;
     }
   else
-    ppc_collect_reg (regcache, regnum, vsxregs, 0, 8);
+    ppc_collect_reg (regcache, regnum, (gdb_byte *) vsxregs, 0, 8);
 }
 
 
@@ -793,7 +810,7 @@ ppc_collect_vrregset (const struct regse
     return;
 
   tdep = gdbarch_tdep (gdbarch);
-  offsets = regset->regmap;
+  offsets = (const struct ppc_reg_offsets *) regset->regmap;
   if (regnum == -1)
     {
       int i;
@@ -801,23 +818,23 @@ ppc_collect_vrregset (const struct regse
       for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
 	   i < tdep->ppc_vr0_regnum + ppc_num_vrs;
 	   i++, offset += 16)
-	ppc_collect_reg (regcache, i, vrregs, offset, 16);
+	ppc_collect_reg (regcache, i, (gdb_byte *) vrregs, offset, 16);
 
       ppc_collect_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
-		       vrregs, offsets->vscr_offset, 4);
+		       (gdb_byte *) vrregs, offsets->vscr_offset, 4);
 
       ppc_collect_reg (regcache, tdep->ppc_vrsave_regnum,
-		       vrregs, offsets->vrsave_offset, 4);
+		       (gdb_byte *) vrregs, offsets->vrsave_offset, 4);
       return;
     }
 
   offset = ppc_vrreg_offset (tdep, offsets, regnum);
   if (regnum != tdep->ppc_vrsave_regnum
       && regnum != tdep->ppc_vrsave_regnum - 1)
-    ppc_collect_reg (regcache, regnum, vrregs, offset, 16);
+    ppc_collect_reg (regcache, regnum, (gdb_byte *) vrregs, offset, 16);
   else
     ppc_collect_reg (regcache, regnum,
-		    vrregs, offset, 4);
+		    (gdb_byte *) vrregs, offset, 4);
 }
 
 
@@ -953,18 +970,11 @@ rs6000_fetch_pointer_argument (struct fr
 
 /* Sequence of bytes for breakpoint instruction.  */
 
-static const unsigned char *
-rs6000_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
-			   int *bp_size)
-{
-  static unsigned char big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 };
-  static unsigned char little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d };
-  *bp_size = 4;
-  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
-    return big_breakpoint;
-  else
-    return little_breakpoint;
-}
+constexpr gdb_byte big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 };
+constexpr gdb_byte little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d };
+
+typedef BP_MANIPULATION_ENDIAN (little_breakpoint, big_breakpoint)
+  rs6000_breakpoint;
 
 /* Instruction masks for displaced stepping.  */
 #define BRANCH_MASK 0xfc000000
@@ -974,6 +984,81 @@ rs6000_breakpoint_from_pc (struct gdbarc
 #define BXL_INSN 0x4c000000
 #define BP_INSN 0x7C000008
 
+/* Instruction masks used during single-stepping of atomic
+   sequences.  */
+#define LOAD_AND_RESERVE_MASK 0xfc0007fe
+#define LWARX_INSTRUCTION 0x7c000028
+#define LDARX_INSTRUCTION 0x7c0000A8
+#define LBARX_INSTRUCTION 0x7c000068
+#define LHARX_INSTRUCTION 0x7c0000e8
+#define LQARX_INSTRUCTION 0x7c000228
+#define STORE_CONDITIONAL_MASK 0xfc0007ff
+#define STWCX_INSTRUCTION 0x7c00012d
+#define STDCX_INSTRUCTION 0x7c0001ad
+#define STBCX_INSTRUCTION 0x7c00056d
+#define STHCX_INSTRUCTION 0x7c0005ad
+#define STQCX_INSTRUCTION 0x7c00016d
+
+/* Check if insn is one of the Load And Reserve instructions used for atomic
+   sequences.  */
+#define IS_LOAD_AND_RESERVE_INSN(insn)	((insn & LOAD_AND_RESERVE_MASK) == LWARX_INSTRUCTION \
+					 || (insn & LOAD_AND_RESERVE_MASK) == LDARX_INSTRUCTION \
+					 || (insn & LOAD_AND_RESERVE_MASK) == LBARX_INSTRUCTION \
+					 || (insn & LOAD_AND_RESERVE_MASK) == LHARX_INSTRUCTION \
+					 || (insn & LOAD_AND_RESERVE_MASK) == LQARX_INSTRUCTION)
+/* Check if insn is one of the Store Conditional instructions used for atomic
+   sequences.  */
+#define IS_STORE_CONDITIONAL_INSN(insn)	((insn & STORE_CONDITIONAL_MASK) == STWCX_INSTRUCTION \
+					 || (insn & STORE_CONDITIONAL_MASK) == STDCX_INSTRUCTION \
+					 || (insn & STORE_CONDITIONAL_MASK) == STBCX_INSTRUCTION \
+					 || (insn & STORE_CONDITIONAL_MASK) == STHCX_INSTRUCTION \
+					 || (insn & STORE_CONDITIONAL_MASK) == STQCX_INSTRUCTION)
+
+/* We can't displaced step atomic sequences.  Otherwise this is just
+   like simple_displaced_step_copy_insn.  */
+
+static struct displaced_step_closure *
+ppc_displaced_step_copy_insn (struct gdbarch *gdbarch,
+			      CORE_ADDR from, CORE_ADDR to,
+			      struct regcache *regs)
+{
+  size_t len = gdbarch_max_insn_length (gdbarch);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len);
+  struct cleanup *old_chain = make_cleanup (xfree, buf);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  int insn;
+
+  read_memory (from, buf, len);
+
+  insn = extract_signed_integer (buf, PPC_INSN_SIZE, byte_order);
+
+  /* Assume all atomic sequences start with a Load and Reserve instruction.  */
+  if (IS_LOAD_AND_RESERVE_INSN (insn))
+    {
+      if (debug_displaced)
+	{
+	  fprintf_unfiltered (gdb_stdlog,
+			      "displaced: can't displaced step "
+			      "atomic sequence at %s\n",
+			      paddress (gdbarch, from));
+	}
+      do_cleanups (old_chain);
+      return NULL;
+    }
+
+  write_memory (to, buf, len);
+
+  if (debug_displaced)
+    {
+      fprintf_unfiltered (gdb_stdlog, "displaced: copy %s->%s: ",
+                          paddress (gdbarch, from), paddress (gdbarch, to));
+      displaced_step_dump_bytes (gdb_stdlog, buf, len);
+    }
+
+  discard_cleanups (old_chain);
+  return (struct displaced_step_closure *) buf;
+}
+
 /* Fix up the state of registers and memory after having single-stepped
    a displaced instruction.  */
 static void
@@ -983,8 +1068,7 @@ ppc_displaced_step_fixup (struct gdbarch
 			  struct regcache *regs)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  /* Since we use simple_displaced_step_copy_insn, our closure is a
-     copy of the instruction.  */
+  /* Our closure is a copy of the instruction.  */
   ULONGEST insn  = extract_unsigned_integer ((gdb_byte *) closure,
 					      PPC_INSN_SIZE, byte_order);
   ULONGEST opcode = 0;
@@ -1077,26 +1161,16 @@ ppc_displaced_step_hw_singlestep (struct
   return 1;
 }
 
-/* Instruction masks used during single-stepping of atomic sequences.  */
-#define LWARX_MASK 0xfc0007fe
-#define LWARX_INSTRUCTION 0x7c000028
-#define LDARX_INSTRUCTION 0x7c0000A8
-#define STWCX_MASK 0xfc0007ff
-#define STWCX_INSTRUCTION 0x7c00012d
-#define STDCX_INSTRUCTION 0x7c0001ad
-
-/* Checks for an atomic sequence of instructions beginning with a LWARX/LDARX
-   instruction and ending with a STWCX/STDCX instruction.  If such a sequence
-   is found, attempt to step through it.  A breakpoint is placed at the end of 
-   the sequence.  */
-
-int 
-ppc_deal_with_atomic_sequence (struct frame_info *frame)
+/* Checks for an atomic sequence of instructions beginning with a
+   Load And Reserve instruction and ending with a Store Conditional
+   instruction.  If such a sequence is found, attempt to step through it.
+   A breakpoint is placed at the end of the sequence.  */
+VEC (CORE_ADDR) *
+ppc_deal_with_atomic_sequence (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR pc = get_frame_pc (frame);
+  CORE_ADDR pc = regcache_read_pc (regcache);
   CORE_ADDR breaks[2] = {-1, -1};
   CORE_ADDR loc = pc;
   CORE_ADDR closing_insn; /* Instruction that closes the atomic sequence.  */
@@ -1105,13 +1179,12 @@ ppc_deal_with_atomic_sequence (struct fr
   int index;
   int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */  
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
-  int opcode; /* Branch instruction's OPcode.  */
   int bc_insn_count = 0; /* Conditional branch instruction count.  */
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  /* Assume all atomic sequences start with a lwarx/ldarx instruction.  */
-  if ((insn & LWARX_MASK) != LWARX_INSTRUCTION
-      && (insn & LWARX_MASK) != LDARX_INSTRUCTION)
-    return 0;
+  /* Assume all atomic sequences start with a Load And Reserve instruction.  */
+  if (!IS_LOAD_AND_RESERVE_INSN (insn))
+    return NULL;
 
   /* Assume that no atomic sequence is longer than "atomic_sequence_length" 
      instructions.  */
@@ -1141,15 +1214,14 @@ ppc_deal_with_atomic_sequence (struct fr
 	  last_breakpoint++;
         }
 
-      if ((insn & STWCX_MASK) == STWCX_INSTRUCTION
-          || (insn & STWCX_MASK) == STDCX_INSTRUCTION)
+      if (IS_STORE_CONDITIONAL_INSN (insn))
         break;
     }
 
-  /* Assume that the atomic sequence ends with a stwcx/stdcx instruction.  */
-  if ((insn & STWCX_MASK) != STWCX_INSTRUCTION
-      && (insn & STWCX_MASK) != STDCX_INSTRUCTION)
-    return 0;
+  /* Assume that the atomic sequence ends with a Store Conditional
+     instruction.  */
+  if (!IS_STORE_CONDITIONAL_INSN (insn))
+    return NULL;
 
   closing_insn = loc;
   loc += PPC_INSN_SIZE;
@@ -1165,11 +1237,10 @@ ppc_deal_with_atomic_sequence (struct fr
 	  || (breaks[1] >= pc && breaks[1] <= closing_insn)))
     last_breakpoint = 0;
 
-  /* Effectively inserts the breakpoints.  */
   for (index = 0; index <= last_breakpoint; index++)
-    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    VEC_safe_push (CORE_ADDR, next_pcs, breaks[index]);
 
-  return 1;
+  return next_pcs;
 }
 
 
@@ -2127,7 +2198,7 @@ rs6000_skip_prologue (struct gdbarch *gd
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -2606,7 +2677,7 @@ e500_move_ev_register (move_ev_register_
   struct gdbarch *arch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (arch); 
   int reg_index;
-  gdb_byte *byte_buffer = buffer;
+  gdb_byte *byte_buffer = (gdb_byte *) buffer;
   enum register_status status;
 
   gdb_assert (IS_SPE_PSEUDOREG (tdep, ev_reg));
@@ -2635,13 +2706,13 @@ e500_move_ev_register (move_ev_register_
 static enum register_status
 do_regcache_raw_read (struct regcache *regcache, int regnum, void *buffer)
 {
-  return regcache_raw_read (regcache, regnum, buffer);
+  return regcache_raw_read (regcache, regnum, (gdb_byte *) buffer);
 }
 
 static enum register_status
 do_regcache_raw_write (struct regcache *regcache, int regnum, void *buffer)
 {
-  regcache_raw_write (regcache, regnum, buffer);
+  regcache_raw_write (regcache, regnum, (const gdb_byte *) buffer);
 
   return REG_VALID;
 }
@@ -2862,6 +2933,62 @@ rs6000_pseudo_register_write (struct gdb
 		    gdbarch_register_name (gdbarch, reg_nr), reg_nr);
 }
 
+static int
+rs6000_ax_pseudo_register_collect (struct gdbarch *gdbarch,
+				   struct agent_expr *ax, int reg_nr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  if (IS_SPE_PSEUDOREG (tdep, reg_nr))
+    {
+      int reg_index = reg_nr - tdep->ppc_ev0_regnum;
+      ax_reg_mask (ax, tdep->ppc_gp0_regnum + reg_index);
+      ax_reg_mask (ax, tdep->ppc_ev0_upper_regnum + reg_index);
+    }
+  else if (IS_DFP_PSEUDOREG (tdep, reg_nr))
+    {
+      int reg_index = reg_nr - tdep->ppc_dl0_regnum;
+      ax_reg_mask (ax, tdep->ppc_fp0_regnum + 2 * reg_index);
+      ax_reg_mask (ax, tdep->ppc_fp0_regnum + 2 * reg_index + 1);
+    }
+  else if (IS_VSX_PSEUDOREG (tdep, reg_nr))
+    {
+      int reg_index = reg_nr - tdep->ppc_vsr0_regnum;
+      if (reg_index > 31)
+        {
+          ax_reg_mask (ax, tdep->ppc_vr0_regnum + reg_index - 32);
+	}
+      else
+        {
+          ax_reg_mask (ax, tdep->ppc_fp0_regnum + reg_index);
+          ax_reg_mask (ax, tdep->ppc_vsr0_upper_regnum + reg_index);
+        }
+    }
+  else if (IS_EFP_PSEUDOREG (tdep, reg_nr))
+    {
+      int reg_index = reg_nr - tdep->ppc_efpr0_regnum;
+      ax_reg_mask (ax, tdep->ppc_vr0_regnum + reg_index);
+    }
+  else
+    internal_error (__FILE__, __LINE__,
+		    _("rs6000_pseudo_register_collect: "
+		    "called on unexpected register '%s' (%d)"),
+		    gdbarch_register_name (gdbarch, reg_nr), reg_nr);
+  return 0;
+}
+
+
+static void
+rs6000_gen_return_address (struct gdbarch *gdbarch,
+			   struct agent_expr *ax, struct axs_value *value,
+			   CORE_ADDR scope)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  value->type = register_type (gdbarch, tdep->ppc_lr_regnum);
+  value->kind = axs_lvalue_register;
+  value->u.reg = tdep->ppc_lr_regnum;
+}
+
+
 /* Convert a DBX STABS register number to a GDB register number.  */
 static int
 rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
@@ -3087,7 +3214,7 @@ static struct variant variants[] =
   {"rs2", "IBM POWER RS2", bfd_arch_rs6000,
    bfd_mach_rs6k_rs2, &tdesc_rs6000},
 
-  {0, 0, 0, 0, 0}
+  {0, 0, (enum bfd_architecture) 0, 0, 0}
 };
 
 /* Return the variant corresponding to architecture ARCH and machine number
@@ -3134,6 +3261,13 @@ struct rs6000_frame_cache
   CORE_ADDR base;
   CORE_ADDR initial_sp;
   struct trad_frame_saved_reg *saved_regs;
+
+  /* Set BASE_P to true if this frame cache is properly initialized.
+     Otherwise set to false because some registers or memory cannot
+     collected.  */
+  int base_p;
+  /* Cache PC for building unavailable frame.  */
+  CORE_ADDR pc;
 };
 
 static struct rs6000_frame_cache *
@@ -3145,27 +3279,39 @@ rs6000_frame_cache (struct frame_info *t
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct rs6000_framedata fdata;
   int wordsize = tdep->wordsize;
-  CORE_ADDR func, pc;
+  CORE_ADDR func = 0, pc = 0;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct rs6000_frame_cache *) (*this_cache);
   cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
   (*this_cache) = cache;
+  cache->pc = 0;
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
 
-  func = get_frame_func (this_frame);
-  pc = get_frame_pc (this_frame);
-  skip_prologue (gdbarch, func, pc, &fdata);
-
-  /* Figure out the parent's stack pointer.  */
-
-  /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most
-     address of the current frame.  Things might be easier if the
-     ->frame pointed to the outer-most address of the frame.  In
-     the mean time, the address of the prev frame is used as the
-     base address of this frame.  */
-  cache->base = get_frame_register_unsigned
-		(this_frame, gdbarch_sp_regnum (gdbarch));
+  TRY
+    {
+      func = get_frame_func (this_frame);
+      cache->pc = func;
+      pc = get_frame_pc (this_frame);
+      skip_prologue (gdbarch, func, pc, &fdata);
+
+      /* Figure out the parent's stack pointer.  */
+
+      /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most
+	 address of the current frame.  Things might be easier if the
+	 ->frame pointed to the outer-most address of the frame.  In
+	 the mean time, the address of the prev frame is used as the
+	 base address of this frame.  */
+      cache->base = get_frame_register_unsigned
+	(this_frame, gdbarch_sp_regnum (gdbarch));
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      if (ex.error != NOT_AVAILABLE_ERROR)
+	throw_exception (ex);
+      return (struct rs6000_frame_cache *) (*this_cache);
+    }
+  END_CATCH
 
   /* If the function appears to be frameless, check a couple of likely
      indicators that we have simply failed to find the frame setup.
@@ -3201,10 +3347,10 @@ rs6000_frame_cache (struct frame_info *t
   if (!fdata.frameless)
     {
       /* Frameless really means stackless.  */
-      LONGEST backchain;
+      ULONGEST backchain;
 
-      if (safe_read_memory_integer (cache->base, wordsize,
-				    byte_order, &backchain))
+      if (safe_read_memory_unsigned_integer (cache->base, wordsize,
+					     byte_order, &backchain))
         cache->base = (CORE_ADDR) backchain;
     }
 
@@ -3314,6 +3460,7 @@ rs6000_frame_cache (struct frame_info *t
     cache->initial_sp
       = get_frame_register_unsigned (this_frame, fdata.alloca_reg);
 
+  cache->base_p = 1;
   return cache;
 }
 
@@ -3323,6 +3470,13 @@ rs6000_frame_this_id (struct frame_info 
 {
   struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame,
 							this_cache);
+
+  if (!info->base_p)
+    {
+      (*this_id) = frame_id_build_unavailable_stack (info->pc);
+      return;
+    }
+
   /* This marks the outermost frame.  */
   if (info->base == 0)
     return;
@@ -3360,7 +3514,7 @@ rs6000_epilogue_frame_cache (struct fram
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   if (*this_cache)
-    return *this_cache;
+    return (struct rs6000_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
   (*this_cache) = cache;
@@ -3567,7 +3721,7 @@ bfd_uses_spe_extensions (bfd *abfd)
     return 0;
 
   size = bfd_get_section_size (sect);
-  contents = xmalloc (size);
+  contents = (gdb_byte *) xmalloc (size);
   if (!bfd_get_section_contents (abfd, sect, contents, 0, size))
     {
       xfree (contents);
@@ -3675,6 +3829,7 @@ bfd_uses_spe_extensions (bfd *abfd)
 #define PPC_T(insn)	PPC_FIELD (insn, 6, 5)
 #define PPC_D(insn)	PPC_SEXT (PPC_FIELD (insn, 16, 16), 16)
 #define PPC_DS(insn)	PPC_SEXT (PPC_FIELD (insn, 16, 14), 14)
+#define PPC_DQ(insn)	PPC_SEXT (PPC_FIELD (insn, 16, 12), 12)
 #define PPC_BIT(insn,n)	((insn & (1 << (31 - (n)))) ? 1 : 0)
 #define PPC_OE(insn)	PPC_BIT (insn, 21)
 #define PPC_RC(insn)	PPC_BIT (insn, 31)
@@ -3722,6 +3877,7 @@ ppc_process_record_op4 (struct gdbarch *
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int ext = PPC_FIELD (insn, 21, 11);
+  int vra = PPC_FIELD (insn, 11, 5);
 
   switch (ext & 0x3f)
     {
@@ -3733,6 +3889,7 @@ ppc_process_record_op4 (struct gdbarch *
       /* FALL-THROUGH */
     case 42:		/* Vector Select */
     case 43:		/* Vector Permute */
+    case 59:		/* Vector Permute Right-indexed */
     case 44:		/* Vector Shift Left Double by Octet Immediate */
     case 45:		/* Vector Permute and Exclusive-OR */
     case 60:		/* Vector Add Extended Unsigned Quadword Modulo */
@@ -3740,6 +3897,7 @@ ppc_process_record_op4 (struct gdbarch *
     case 62:		/* Vector Subtract Extended Unsigned Quadword Modulo */
     case 63:		/* Vector Subtract Extended & write Carry Unsigned Quadword */
     case 34:		/* Vector Multiply-Low-Add Unsigned Halfword Modulo */
+    case 35:		/* Vector Multiply-Sum Unsigned Doubleword Modulo */
     case 36:		/* Vector Multiply-Sum Unsigned Byte Modulo */
     case 37:		/* Vector Multiply-Sum Mixed Byte Modulo */
     case 38:		/* Vector Multiply-Sum Unsigned Halfword Modulo */
@@ -3749,14 +3907,37 @@ ppc_process_record_op4 (struct gdbarch *
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_vr0_regnum + PPC_VRT (insn));
       return 0;
+
+    case 48:		/* Multiply-Add High Doubleword */
+    case 49:		/* Multiply-Add High Doubleword Unsigned */
+    case 51:		/* Multiply-Add Low Doubleword */
+      record_full_arch_list_add_reg (regcache,
+				     tdep->ppc_gp0_regnum + PPC_RT (insn));
+      return 0;
     }
 
   switch ((ext & 0x1ff))
     {
+    case 385:
+      if (vra != 0	/* Decimal Convert To Signed Quadword */
+	  && vra != 2	/* Decimal Convert From Signed Quadword */
+	  && vra != 4	/* Decimal Convert To Zoned */
+	  && vra != 5	/* Decimal Convert To National */
+	  && vra != 6	/* Decimal Convert From Zoned */
+	  && vra != 7	/* Decimal Convert From National */
+	  && vra != 31)	/* Decimal Set Sign */
+	break;
 			/* 5.16 Decimal Integer Arithmetic Instructions */
     case 1:		/* Decimal Add Modulo */
     case 65:		/* Decimal Subtract Modulo */
 
+    case 193:		/* Decimal Shift */
+    case 129:		/* Decimal Unsigned Shift */
+    case 449:		/* Decimal Shift and Round */
+
+    case 257:		/* Decimal Truncate */
+    case 321:		/* Decimal Unsigned Truncate */
+
       /* Bit-21 should be set.  */
       if (!PPC_BIT (insn, 21))
 	break;
@@ -3786,6 +3967,12 @@ ppc_process_record_op4 (struct gdbarch *
     case 198:		/* Vector Compare Equal To Single-Precision */
     case 454:		/* Vector Compare Greater Than or Equal To Single-Precision */
     case 710:		/* Vector Compare Greater Than Single-Precision */
+    case 7:		/* Vector Compare Not Equal Byte */
+    case 71:		/* Vector Compare Not Equal Halfword */
+    case 135:		/* Vector Compare Not Equal Word */
+    case 263:		/* Vector Compare Not Equal or Zero Byte */
+    case 327:		/* Vector Compare Not Equal or Zero Halfword */
+    case 391:		/* Vector Compare Not Equal or Zero Word */
       if (PPC_Rc (insn))
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache,
@@ -3793,6 +3980,38 @@ ppc_process_record_op4 (struct gdbarch *
       return 0;
     }
 
+  if (ext  == 1538)
+    {
+      switch (vra)
+	{
+	case 0:		/* Vector Count Leading Zero Least-Significant Bits
+			   Byte */
+	case 1:		/* Vector Count Trailing Zero Least-Significant Bits
+			   Byte */
+	  record_full_arch_list_add_reg (regcache,
+					 tdep->ppc_gp0_regnum + PPC_RT (insn));
+	  return 0;
+
+	case 6:		/* Vector Negate Word */
+	case 7:		/* Vector Negate Doubleword */
+	case 8:		/* Vector Parity Byte Word */
+	case 9:		/* Vector Parity Byte Doubleword */
+	case 10:	/* Vector Parity Byte Quadword */
+	case 16:	/* Vector Extend Sign Byte To Word */
+	case 17:	/* Vector Extend Sign Halfword To Word */
+	case 24:	/* Vector Extend Sign Byte To Doubleword */
+	case 25:	/* Vector Extend Sign Halfword To Doubleword */
+	case 26:	/* Vector Extend Sign Word To Doubleword */
+	case 28:	/* Vector Count Trailing Zeros Byte */
+	case 29:	/* Vector Count Trailing Zeros Halfword */
+	case 30:	/* Vector Count Trailing Zeros Word */
+	case 31:	/* Vector Count Trailing Zeros Doubleword */
+	  record_full_arch_list_add_reg (regcache,
+					 tdep->ppc_vr0_regnum + PPC_VRT (insn));
+	  return 0;
+	}
+    }
+
   switch (ext)
     {
     case 142:		/* Vector Pack Unsigned Halfword Unsigned Saturate */
@@ -3964,10 +4183,44 @@ ppc_process_record_op4 (struct gdbarch *
     case 1923:		/* Vector Population Count Word */
     case 1987:		/* Vector Population Count Doubleword */
     case 1356:		/* Vector Bit Permute Quadword */
+    case 1484:		/* Vector Bit Permute Doubleword */
+    case 513:		/* Vector Multiply-by-10 Unsigned Quadword */
+    case 1:		/* Vector Multiply-by-10 & write Carry Unsigned
+			   Quadword */
+    case 577:		/* Vector Multiply-by-10 Extended Unsigned Quadword */
+    case 65:		/* Vector Multiply-by-10 Extended & write Carry
+			   Unsigned Quadword */
+    case 1027:		/* Vector Absolute Difference Unsigned Byte */
+    case 1091:		/* Vector Absolute Difference Unsigned Halfword */
+    case 1155:		/* Vector Absolute Difference Unsigned Word */
+    case 1796:		/* Vector Shift Right Variable */
+    case 1860:		/* Vector Shift Left Variable */
+    case 133:		/* Vector Rotate Left Word then Mask Insert */
+    case 197:		/* Vector Rotate Left Doubleword then Mask Insert */
+    case 389:		/* Vector Rotate Left Word then AND with Mask */
+    case 453:		/* Vector Rotate Left Doubleword then AND with Mask */
+    case 525:		/* Vector Extract Unsigned Byte */
+    case 589:		/* Vector Extract Unsigned Halfword */
+    case 653:		/* Vector Extract Unsigned Word */
+    case 717:		/* Vector Extract Doubleword */
+    case 781:		/* Vector Insert Byte */
+    case 845:		/* Vector Insert Halfword */
+    case 909:		/* Vector Insert Word */
+    case 973:		/* Vector Insert Doubleword */
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_vr0_regnum + PPC_VRT (insn));
       return 0;
 
+    case 1549:		/* Vector Extract Unsigned Byte Left-Indexed */
+    case 1613:		/* Vector Extract Unsigned Halfword Left-Indexed */
+    case 1677:		/* Vector Extract Unsigned Word Left-Indexed */
+    case 1805:		/* Vector Extract Unsigned Byte Right-Indexed */
+    case 1869:		/* Vector Extract Unsigned Halfword Right-Indexed */
+    case 1933:		/* Vector Extract Unsigned Word Right-Indexed */
+      record_full_arch_list_add_reg (regcache,
+				     tdep->ppc_gp0_regnum + PPC_RT (insn));
+      return 0;
+
     case 1604:		/* Move To Vector Status and Control Register */
       record_full_arch_list_add_reg (regcache, PPC_VSCR_REGNUM);
       return 0;
@@ -3975,6 +4228,11 @@ ppc_process_record_op4 (struct gdbarch *
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_vr0_regnum + PPC_VRT (insn));
       return 0;
+    case 833:		/* Decimal Copy Sign */
+      record_full_arch_list_add_reg (regcache,
+				     tdep->ppc_vr0_regnum + PPC_VRT (insn));
+      record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
+      return 0;
     }
 
   fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
@@ -3992,6 +4250,14 @@ ppc_process_record_op19 (struct gdbarch 
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int ext = PPC_EXTOP (insn);
 
+  switch (ext & 0x01f)
+    {
+    case 2:		/* Add PC Immediate Shifted */
+      record_full_arch_list_add_reg (regcache,
+				     tdep->ppc_gp0_regnum + PPC_RT (insn));
+      return 0;
+    }
+
   switch (ext)
     {
     case 0:		/* Move Condition Register Field */
@@ -4097,6 +4363,15 @@ ppc_process_record_op31 (struct gdbarch 
       return 0;
     }
 
+  if ((ext & 0xff) == 170)
+    {
+      /* Add Extended using alternate carry bits */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_xer_regnum);
+      record_full_arch_list_add_reg (regcache,
+				     tdep->ppc_gp0_regnum + PPC_RT (insn));
+      return 0;
+    }
+
   switch (ext)
     {
     case 78:		/* Determine Leftmost Zero Byte */
@@ -4115,6 +4390,9 @@ ppc_process_record_op31 (struct gdbarch 
     case 302:		/* Move From Branch History Rolling Buffer */
     case 339:		/* Move From Special Purpose Register */
     case 371:		/* Move From Time Base [Phased-Out]  */
+    case 309:		/* Load Doubleword Monitored Indexed  */
+    case 128:		/* Set Boolean */
+    case 755:		/* Deliver A Random Number */
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_gp0_regnum + PPC_RT (insn));
       return 0;
@@ -4131,6 +4409,7 @@ ppc_process_record_op31 (struct gdbarch 
     case 282:		/* Convert Declets To Binary Coded Decimal */
     case 314:		/* Convert Binary Coded Decimal To Declets */
     case 508:		/* Compare bytes */
+    case 307:		/* Move From VSR Lower Doubleword */
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_gp0_regnum + PPC_RA (insn));
       return 0;
@@ -4149,6 +4428,12 @@ ppc_process_record_op31 (struct gdbarch 
     case 32:		/* Compare logical */
     case 144:		/* Move To Condition Register Fields */
 			/* Move To One Condition Register Field */
+    case 192:		/* Compare Ranged Byte */
+    case 224:		/* Compare Equal Byte */
+    case 576:		/* Move XER to CR Extended */
+    case 902:		/* Paste (should always fail due to single-stepping and
+			   the memory location might not be accessible, so
+			   record only CR) */
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       return 0;
 
@@ -4175,6 +4460,12 @@ ppc_process_record_op31 (struct gdbarch 
     case 790:		/* Load Halfword Byte-Reverse Indexed */
     case 534:		/* Load Word Byte-Reverse Indexed */
     case 532:		/* Load Doubleword Byte-Reverse Indexed */
+    case 582:		/* Load Word Atomic */
+    case 614:		/* Load Doubleword Atomic */
+    case 265:		/* Modulo Unsigned Doubleword */
+    case 777:		/* Modulo Signed Doubleword */
+    case 267:		/* Modulo Unsigned Word */
+    case 779:		/* Modulo Signed Word */
       record_full_arch_list_add_reg (regcache,
 				     tdep->ppc_gp0_regnum + PPC_RT (insn));
       return 0;
@@ -4253,6 +4544,16 @@ ppc_process_record_op31 (struct gdbarch 
     case 844:		/* Load VSX Vector Doubleword*2 Indexed */
     case 332:		/* Load VSX Vector Doubleword & Splat Indexed */
     case 780:		/* Load VSX Vector Word*4 Indexed */
+    case 268:		/* Load VSX Vector Indexed */
+    case 364:		/* Load VSX Vector Word & Splat Indexed */
+    case 812:		/* Load VSX Vector Halfword*8 Indexed */
+    case 876:		/* Load VSX Vector Byte*16 Indexed */
+    case 269:		/* Load VSX Vector with Length */
+    case 301:		/* Load VSX Vector Left-justified with Length */
+    case 781:		/* Load VSX Scalar as Integer Byte & Zero Indexed */
+    case 813:		/* Load VSX Scalar as Integer Halfword & Zero Indexed */
+    case 403:		/* Move To VSR Word & Splat */
+    case 435:		/* Move To VSR Double Doubleword */
       ppc_record_vsr (regcache, tdep, PPC_XT (insn));
       return 0;
 
@@ -4274,6 +4575,10 @@ ppc_process_record_op31 (struct gdbarch 
     case 922:		/* Extend Sign Halfword */
     case 954:		/* Extend Sign Byte */
     case 986:		/* Extend Sign Word */
+    case 538:		/* Count Trailing Zeros Word */
+    case 570:		/* Count Trailing Zeros Doubleword */
+    case 890:		/* Extend-Sign Word and Shift Left Immediate (445) */
+    case 890 | 1:	/* Extend-Sign Word and Shift Left Immediate (445) */
       if (PPC_RC (insn))
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache,
@@ -4316,6 +4621,11 @@ ppc_process_record_op31 (struct gdbarch 
     case 727:		/* Store Floating-Point Double Indexed */
     case 919:		/* Store Floating-Point Double Pair Indexed */
     case 983:		/* Store Floating-Point as Integer Word Indexed */
+    case 396:		/* Store VSX Vector Indexed */
+    case 940:		/* Store VSX Vector Halfword*8 Indexed */
+    case 1004:		/* Store VSX Vector Byte*16 Indexed */
+    case 909:		/* Store VSX Scalar as Integer Byte Indexed */
+    case 941:		/* Store VSX Scalar as Integer Halfword Indexed */
       if (ext == 694 || ext == 726 || ext == 150 || ext == 214 || ext == 182)
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
 
@@ -4345,6 +4655,7 @@ ppc_process_record_op31 (struct gdbarch 
 	case 135:	/* Store Vector Element Byte Indexed */
 	case 215:	/* Store Byte Indexed */
 	case 694:	/* Store Byte Conditional Indexed */
+	case 909:	/* Store VSX Scalar as Integer Byte Indexed */
 	  size = 1;
 	  break;
 	case 439:	/* Store Halfword with Update Indexed */
@@ -4352,6 +4663,7 @@ ppc_process_record_op31 (struct gdbarch 
 	case 407:	/* Store Halfword Indexed */
 	case 726:	/* Store Halfword Conditional Indexed */
 	case 918:	/* Store Halfword Byte-Reverse Indexed */
+	case 941:	/* Store VSX Scalar as Integer Halfword Indexed */
 	  size = 2;
 	  break;
 	case 181:	/* Store Doubleword with Update Indexed */
@@ -4369,6 +4681,9 @@ ppc_process_record_op31 (struct gdbarch 
 	case 231:	/* Store Vector Indexed */
 	case 487:	/* Store Vector Indexed LRU */
 	case 919:	/* Store Floating-Point Double Pair Indexed */
+	case 396:	/* Store VSX Vector Indexed */
+	case 940:	/* Store VSX Vector Halfword*8 Indexed */
+	case 1004:	/* Store VSX Vector Byte*16 Indexed */
 	  size = 16;
 	  break;
 	default:
@@ -4395,10 +4710,47 @@ ppc_process_record_op31 (struct gdbarch 
       record_full_arch_list_add_mem (addr, size);
       return 0;
 
+    case 397:		/* Store VSX Vector with Length */
+    case 429:		/* Store VSX Vector Left-justified with Length */
+      ra = 0;
+      if (PPC_RA (insn) != 0)
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
+      ea = ra;
+      regcache_raw_read_unsigned (regcache,
+				  tdep->ppc_gp0_regnum + PPC_RB (insn), &rb);
+      /* Store up to 16 bytes.  */
+      nb = (rb & 0xff) > 16 ? 16 : (rb & 0xff);
+      if (nb > 0)
+	record_full_arch_list_add_mem (ea, nb);
+      return 0;
+
+    case 710:		/* Store Word Atomic */
+    case 742:		/* Store Doubleword Atomic */
+      ra = 0;
+      if (PPC_RA (insn) != 0)
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
+      ea = ra;
+      switch (ext)
+	{
+	case 710:	/* Store Word Atomic */
+	  size = 8;
+	  break;
+	case 742:	/* Store Doubleword Atomic */
+	  size = 16;
+	  break;
+	default:
+	  gdb_assert (0);
+	}
+      record_full_arch_list_add_mem (ea, size);
+      return 0;
+
     case 725:		/* Store String Word Immediate */
       ra = 0;
       if (PPC_RA (insn) != 0)
-	regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
       ea += ra;
 
       nb = PPC_NB (insn);
@@ -4412,7 +4764,8 @@ ppc_process_record_op31 (struct gdbarch 
     case 661:		/* Store String Word Indexed */
       ra = 0;
       if (PPC_RA (insn) != 0)
-	regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
       ea += ra;
 
       regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &xer);
@@ -4420,7 +4773,9 @@ ppc_process_record_op31 (struct gdbarch 
 
       if (nb != 0)
 	{
-	  regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &rb);
+	  regcache_raw_read_unsigned (regcache,
+				      tdep->ppc_gp0_regnum + PPC_RB (insn),
+				      &rb);
 	  ea += rb;
 	  record_full_arch_list_add_mem (ea, nb);
 	}
@@ -4460,6 +4815,7 @@ ppc_process_record_op31 (struct gdbarch 
     case 430:		/* Clear BHRB */
     case 598:		/* Synchronize */
     case 62:		/* Wait for Interrupt */
+    case 30:		/* Wait */
     case 22:		/* Instruction Cache Block Touch */
     case 854:		/* Enforce In-order Execution of I/O */
     case 246:		/* Data Cache Block Touch for Store */
@@ -4468,27 +4824,30 @@ ppc_process_record_op31 (struct gdbarch 
     case 278:		/* Data Cache Block Touch */
     case 758:		/* Data Cache Block Allocate */
     case 982:		/* Instruction Cache Block Invalidate */
+    case 774:		/* Copy */
+    case 838:		/* CP_Abort */
       return 0;
 
     case 654:		/* Transaction Begin */
     case 686:		/* Transaction End */
-    case 718:		/* Transaction Check */
     case 750:		/* Transaction Suspend or Resume */
     case 782:		/* Transaction Abort Word Conditional */
     case 814:		/* Transaction Abort Doubleword Conditional */
     case 846:		/* Transaction Abort Word Conditional Immediate */
     case 878:		/* Transaction Abort Doubleword Conditional Immediate */
     case 910:		/* Transaction Abort */
-      fprintf_unfiltered (gdb_stdlog, "Cannot record Transaction instructions. "
-			  "%08x at %s, 31-%d.\n",
-			  insn, paddress (gdbarch, addr), ext);
-      return -1;
+      record_full_arch_list_add_reg (regcache, tdep->ppc_ps_regnum);
+      /* FALL-THROUGH */
+    case 718:		/* Transaction Check */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
+      return 0;
 
     case 1014:		/* Data Cache Block set to Zero */
       if (target_auxv_search (&current_target, AT_DCACHEBSIZE, &at_dcsz) <= 0
 	  || at_dcsz == 0)
 	at_dcsz = 128; /* Assume 128-byte cache line size (POWER8)  */
 
+      ra = 0;
       if (PPC_RA (insn) != 0)
 	regcache_raw_read_unsigned (regcache,
 				    tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
@@ -4566,6 +4925,7 @@ ppc_process_record_op59 (struct gdbarch 
     case 226:		/* DFP Test Data Group */
     case 642:		/* DFP Compare Unordered */
     case 674:		/* DFP Test Significance */
+    case 675:		/* DFP Test Significance Immediate */
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
       return 0;
@@ -4665,7 +5025,16 @@ ppc_process_record_op60 (struct gdbarch 
     case 217:		/* ditto */
     case 104:		/* VSX Vector Subtract Double-Precision */
     case 72:		/* VSX Vector Subtract Single-Precision */
+    case 128:		/* VSX Scalar Maximum Type-C Double-Precision */
+    case 136:		/* VSX Scalar Minimum Type-C Double-Precision */
+    case 144:		/* VSX Scalar Maximum Type-J Double-Precision */
+    case 152:		/* VSX Scalar Minimum Type-J Double-Precision */
+    case 3:		/* VSX Scalar Compare Equal Double-Precision */
+    case 11:		/* VSX Scalar Compare Greater Than Double-Precision */
+    case 19:		/* VSX Scalar Compare Greater Than or Equal
+			   Double-Precision */
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+      /* FALL-THROUGH */
     case 240:		/* VSX Vector Copy Sign Double-Precision */
     case 208:		/* VSX Vector Copy Sign Single-Precision */
     case 130:		/* VSX Logical AND */
@@ -4686,6 +5055,14 @@ ppc_process_record_op60 (struct gdbarch 
     case 2 | 0x20:	/* VSX Shift Left Double by Word Immediate (SHW=1) */
     case 2 | 0x40:	/* VSX Shift Left Double by Word Immediate (SHW=2) */
     case 2 | 0x60:	/* VSX Shift Left Double by Word Immediate (SHW=3) */
+    case 216:		/* VSX Vector Insert Exponent Single-Precision */
+    case 248:		/* VSX Vector Insert Exponent Double-Precision */
+    case 26:		/* VSX Vector Permute */
+    case 58:		/* VSX Vector Permute Right-indexed */
+    case 213:		/* VSX Vector Test Data Class Single-Precision (DC=0) */
+    case 213 | 0x8:	/* VSX Vector Test Data Class Single-Precision (DC=1) */
+    case 245:		/* VSX Vector Test Data Class Double-Precision (DC=0) */
+    case 245 | 0x8:	/* VSX Vector Test Data Class Double-Precision (DC=1) */
       ppc_record_vsr (regcache, tdep, PPC_XT (insn));
       return 0;
 
@@ -4697,6 +5074,7 @@ ppc_process_record_op60 (struct gdbarch 
 
     case 35:		/* VSX Scalar Compare Unordered Double-Precision */
     case 43:		/* VSX Scalar Compare Ordered Double-Precision */
+    case 59:		/* VSX Scalar Compare Exponents Double-Precision */
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
       return 0;
@@ -4843,6 +5221,7 @@ ppc_process_record_op60 (struct gdbarch 
     case 203:		/* VSX Vector Square Root Double-Precision */
     case 139:		/* VSX Vector Square Root Single-Precision */
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+      /* FALL-THROUGH */
     case 345:		/* VSX Scalar Absolute Value Double-Precision */
     case 267:		/* VSX Scalar Convert Scalar Single-Precision to
 			   Vector Single-Precision format Non-signalling */
@@ -4857,9 +5236,15 @@ ppc_process_record_op60 (struct gdbarch 
     case 505:		/* VSX Vector Negate Double-Precision */
     case 441:		/* VSX Vector Negate Single-Precision */
     case 164:		/* VSX Splat Word */
+    case 165:		/* VSX Vector Extract Unsigned Word */
+    case 181:		/* VSX Vector Insert Word */
       ppc_record_vsr (regcache, tdep, PPC_XT (insn));
       return 0;
 
+    case 298:		/* VSX Scalar Test Data Class Single-Precision */
+    case 362:		/* VSX Scalar Test Data Class Double-Precision */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+      /* FALL-THROUGH */
     case 106:		/* VSX Scalar Test for software Square Root
 			   Double-Precision */
     case 234:		/* VSX Vector Test for software Square Root
@@ -4868,6 +5253,60 @@ ppc_process_record_op60 (struct gdbarch 
 			   Single-Precision */
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       return 0;
+
+    case 347:
+      switch (PPC_FIELD (insn, 11, 5))
+	{
+	case 0:		/* VSX Scalar Extract Exponent Double-Precision */
+	case 1:		/* VSX Scalar Extract Significand Double-Precision */
+          record_full_arch_list_add_reg (regcache,
+					 tdep->ppc_gp0_regnum + PPC_RT (insn));
+	  return 0;
+	case 16:	/* VSX Scalar Convert Half-Precision format to
+			   Double-Precision format */
+	case 17:	/* VSX Scalar round & Convert Double-Precision format
+			   to Half-Precision format */
+	  record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+	  ppc_record_vsr (regcache, tdep, PPC_XT (insn));
+	  return 0;
+	}
+      break;
+
+    case 475:
+      switch (PPC_FIELD (insn, 11, 5))
+	{
+	case 24:	/* VSX Vector Convert Half-Precision format to
+			   Single-Precision format */
+	case 25:	/* VSX Vector round and Convert Single-Precision format
+			   to Half-Precision format */
+	  record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+	  /* FALL-THROUGH */
+	case 0:		/* VSX Vector Extract Exponent Double-Precision */
+	case 1:		/* VSX Vector Extract Significand Double-Precision */
+	case 7:		/* VSX Vector Byte-Reverse Halfword */
+	case 8:		/* VSX Vector Extract Exponent Single-Precision */
+	case 9:		/* VSX Vector Extract Significand Single-Precision */
+	case 15:	/* VSX Vector Byte-Reverse Word */
+	case 23:	/* VSX Vector Byte-Reverse Doubleword */
+	case 31:	/* VSX Vector Byte-Reverse Quadword */
+	  ppc_record_vsr (regcache, tdep, PPC_XT (insn));
+	  return 0;
+	}
+      break;
+    }
+
+  switch (ext)
+    {
+    case 360:		/* VSX Vector Splat Immediate Byte */
+      if (PPC_FIELD (insn, 11, 2) == 0)
+	{
+	  ppc_record_vsr (regcache, tdep, PPC_XT (insn));
+	  return 0;
+	}
+      break;
+    case 918:		/* VSX Scalar Insert Exponent Double-Precision */
+      ppc_record_vsr (regcache, tdep, PPC_XT (insn));
+      return 0;
     }
 
   if (((ext >> 3) & 0x3) == 3)	/* VSX Select */
@@ -4881,6 +5320,65 @@ ppc_process_record_op60 (struct gdbarch 
   return -1;
 }
 
+/* Parse and record instructions of primary opcode-61 at ADDR.
+   Return 0 if successful.  */
+
+static int
+ppc_process_record_op61 (struct gdbarch *gdbarch, struct regcache *regcache,
+			   CORE_ADDR addr, uint32_t insn)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  ULONGEST ea = 0;
+  int size;
+
+  switch (insn & 0x3)
+    {
+    case 0:		/* Store Floating-Point Double Pair */
+    case 2:		/* Store VSX Scalar Doubleword */
+    case 3:		/* Store VSX Scalar Single */
+      if (PPC_RA (insn) != 0)
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn),
+				    &ea);
+      ea += PPC_DS (insn) << 2;
+      switch (insn & 0x3)
+	{
+	case 0:		/* Store Floating-Point Double Pair */
+	  size = 16;
+	  break;
+	case 2:		/* Store VSX Scalar Doubleword */
+	  size = 8;
+	  break;
+	case 3:		/* Store VSX Scalar Single */
+	  size = 4;
+	  break;
+	default:
+	  gdb_assert (0);
+	}
+      record_full_arch_list_add_mem (ea, size);
+      return 0;
+    }
+
+  switch (insn & 0x7)
+    {
+    case 1:		/* Load VSX Vector */
+      ppc_record_vsr (regcache, tdep, PPC_XT (insn));
+      return 0;
+    case 5:		/* Store VSX Vector */
+      if (PPC_RA (insn) != 0)
+	regcache_raw_read_unsigned (regcache,
+				    tdep->ppc_gp0_regnum + PPC_RA (insn),
+				    &ea);
+      ea += PPC_DQ (insn) << 4;
+      record_full_arch_list_add_mem (ea, 16);
+      return 0;
+    }
+
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+		      "at %s.\n", insn, paddress (gdbarch, addr));
+  return -1;
+}
+
 /* Parse and record instructions of primary opcode-63 at ADDR.
    Return 0 if successful.  */
 
@@ -4917,6 +5415,17 @@ ppc_process_record_op63 (struct gdbarch 
 				     tdep->ppc_fp0_regnum + PPC_FRT (insn));
       if (PPC_RC (insn))
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
+      return 0;
+    }
+
+  switch (ext & 0xff)
+    {
+    case 5:		/* VSX Scalar Round to Quad-Precision Integer */
+    case 37:		/* VSX Scalar Round Quad-Precision to Double-Extended
+			   Precision */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+      ppc_record_vsr (regcache, tdep, PPC_VRT (insn) + 32);
+      return 0;
     }
 
   switch (ext)
@@ -4948,6 +5457,7 @@ ppc_process_record_op63 (struct gdbarch 
     case 226:		/* DFP Test Data Group Quad */
     case 642:		/* DFP Compare Unordered Quad */
     case 674:		/* DFP Test Significance Quad */
+    case 675:		/* DFP Test Significance Immediate Quad */
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
       return 0;
@@ -4969,7 +5479,7 @@ ppc_process_record_op63 (struct gdbarch 
       if (PPC_RC (insn))
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
-      break;
+      return 0;
 
     case 354:		/* DFP Extract Biased Exponent Quad */
       record_full_arch_list_add_reg (regcache,
@@ -5004,7 +5514,26 @@ ppc_process_record_op63 (struct gdbarch 
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
       return 0;
 
-    case 583:		/* Move From FPSCR */
+    case 583:
+      switch (PPC_FIELD (insn, 11, 5))
+        {
+	  case 1:	/* Move From FPSCR & Clear Enables */
+	  case 20:	/* Move From FPSCR Control & set DRN */
+	  case 21:	/* Move From FPSCR Control & set DRN Immediate */
+	  case 22:	/* Move From FPSCR Control & set RN */
+	  case 23:	/* Move From FPSCR Control & set RN Immediate */
+	    record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+	  case 0:	/* Move From FPSCR */
+	  case 24:	/* Move From FPSCR Lightweight */
+	    if (PPC_FIELD (insn, 11, 5) == 0 && PPC_RC (insn))
+	      record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
+	    record_full_arch_list_add_reg (regcache,
+					   tdep->ppc_fp0_regnum
+					   + PPC_FRT (insn));
+	    return 0;
+        }
+      break;
+
     case 8:		/* Floating Copy Sign */
     case 40:		/* Floating Negate */
     case 72:		/* Floating Move Register */
@@ -5029,11 +5558,15 @@ ppc_process_record_op63 (struct gdbarch 
       if (PPC_RC (insn))
 	record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
-      break;
+      return 0;
 
     case 0:		/* Floating Compare Unordered */
     case 32:		/* Floating Compare Ordered */
     case 64:		/* Move to Condition Register from FPSCR */
+    case 132:		/* VSX Scalar Compare Ordered Quad-Precision */
+    case 164:		/* VSX Scalar Compare Exponents Quad-Precision */
+    case 644:		/* VSX Scalar Compare Unordered Quad-Precision */
+    case 708:		/* VSX Scalar Test Data Class Quad-Precision */
       record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
       /* FALL-THROUGH */
     case 128:		/* Floating Test for software Divide */
@@ -5041,10 +5574,65 @@ ppc_process_record_op63 (struct gdbarch 
       record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
       return 0;
 
+    case 4:		/* VSX Scalar Add Quad-Precision */
+    case 36:		/* VSX Scalar Multiply Quad-Precision */
+    case 388:		/* VSX Scalar Multiply-Add Quad-Precision */
+    case 420:		/* VSX Scalar Multiply-Subtract Quad-Precision */
+    case 452:		/* VSX Scalar Negative Multiply-Add Quad-Precision */
+    case 484:		/* VSX Scalar Negative Multiply-Subtract
+			   Quad-Precision */
+    case 516:		/* VSX Scalar Subtract Quad-Precision */
+    case 548:		/* VSX Scalar Divide Quad-Precision */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+      /* FALL-THROUGH */
+    case 100:		/* VSX Scalar Copy Sign Quad-Precision */
+    case 868:		/* VSX Scalar Insert Exponent Quad-Precision */
+      ppc_record_vsr (regcache, tdep, PPC_VRT (insn) + 32);
+      return 0;
+
+    case 804:
+      switch (PPC_FIELD (insn, 11, 5))
+	{
+	case 27:	/* VSX Scalar Square Root Quad-Precision */
+	  record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+	  /* FALL-THROUGH */
+	case 0:		/* VSX Scalar Absolute Quad-Precision */
+	case 2:		/* VSX Scalar Extract Exponent Quad-Precision */
+	case 8:		/* VSX Scalar Negative Absolute Quad-Precision */
+	case 16:	/* VSX Scalar Negate Quad-Precision */
+	case 18:	/* VSX Scalar Extract Significand Quad-Precision */
+	  ppc_record_vsr (regcache, tdep, PPC_VRT (insn) + 32);
+	  return 0;
+	}
+      break;
+
+    case 836:
+      switch (PPC_FIELD (insn, 11, 5))
+	{
+	case 1:		/* VSX Scalar truncate & Convert Quad-Precision format
+			   to Unsigned Word format */
+	case 2:		/* VSX Scalar Convert Unsigned Doubleword format to
+			   Quad-Precision format */
+	case 9:		/* VSX Scalar truncate & Convert Quad-Precision format
+			   to Signed Word format */
+	case 10:	/* VSX Scalar Convert Signed Doubleword format to
+			   Quad-Precision format */
+	case 17:	/* VSX Scalar truncate & Convert Quad-Precision format
+			   to Unsigned Doubleword format */
+	case 20:	/* VSX Scalar round & Convert Quad-Precision format to
+			   Double-Precision format */
+	case 22:	/* VSX Scalar Convert Double-Precision format to
+			   Quad-Precision format */
+	case 25:	/* VSX Scalar truncate & Convert Quad-Precision format
+			   to Signed Doubleword format */
+	  record_full_arch_list_add_reg (regcache, tdep->ppc_fpscr_regnum);
+	  ppc_record_vsr (regcache, tdep, PPC_VRT (insn) + 32);
+	  return 0;
+	}
     }
 
   fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
-		      "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext);
+		      "at %s, 63-%d.\n", insn, paddress (gdbarch, addr), ext);
   return -1;
 }
 
@@ -5255,12 +5843,21 @@ ppc_process_record (struct gdbarch *gdba
 	}
       break;
 
-    case 57:		/* Load Floating-Point Double Pair */
-      if (PPC_FIELD (insn, 30, 2) != 0)
-	goto UNKNOWN_OP;
-      tmp = tdep->ppc_fp0_regnum + (PPC_RT (insn) & ~1);
-      record_full_arch_list_add_reg (regcache, tmp);
-      record_full_arch_list_add_reg (regcache, tmp + 1);
+    case 57:
+      switch (insn & 0x3)
+        {
+	case 0:		/* Load Floating-Point Double Pair */
+	  tmp = tdep->ppc_fp0_regnum + (PPC_RT (insn) & ~1);
+	  record_full_arch_list_add_reg (regcache, tmp);
+	  record_full_arch_list_add_reg (regcache, tmp + 1);
+	  break;
+	case 2:		/* Load VSX Scalar Doubleword */
+	case 3:		/* Load VSX Scalar Single */
+	  ppc_record_vsr (regcache, tdep, PPC_VRT (insn) + 32);
+	  break;
+	default:
+	  goto UNKNOWN_OP;
+	}
       break;
 
     case 58:		/* Load Doubleword */
@@ -5286,7 +5883,11 @@ ppc_process_record (struct gdbarch *gdba
 	return -1;
       break;
 
-    case 61:		/* Store Floating-Point Double Pair */
+    case 61:
+      if (ppc_process_record_op61 (gdbarch, regcache, addr, insn) != 0)
+	return -1;
+      break;
+
     case 62:		/* Store Doubleword */
 			/* Store Doubleword with Update */
 			/* Store Quadword with Update */
@@ -5295,7 +5896,7 @@ ppc_process_record (struct gdbarch *gdba
 	  int size;
 	  int sub2 = PPC_FIELD (insn, 30, 2);
 
-	  if ((op6 == 61 && sub2 != 0) || (op6 == 62 && sub2 > 2))
+	  if (sub2 > 2)
 	    goto UNKNOWN_OP;
 
 	  if (PPC_RA (insn) != 0)
@@ -5303,7 +5904,7 @@ ppc_process_record (struct gdbarch *gdba
 					tdep->ppc_gp0_regnum + PPC_RA (insn),
 					&addr);
 
-	  size = ((op6 == 61) || sub2 == 2) ? 16 : 8;
+	  size = (sub2 == 2) ? 16 : 8;
 
 	  addr += PPC_DS (insn) << 2;
 	  record_full_arch_list_add_mem (addr, size);
@@ -5815,7 +6416,6 @@ rs6000_gdbarch_init (struct gdbarch_info
 
   set_gdbarch_pc_regnum (gdbarch, PPC_PC_REGNUM);
   set_gdbarch_sp_regnum (gdbarch, PPC_R0_REGNUM + 1);
-  set_gdbarch_deprecated_fp_regnum (gdbarch, PPC_R0_REGNUM + 1);
   set_gdbarch_fp0_regnum (gdbarch, tdep->ppc_fp0_regnum);
   set_gdbarch_register_sim_regno (gdbarch, rs6000_register_sim_regno);
 
@@ -5840,8 +6440,12 @@ rs6000_gdbarch_init (struct gdbarch_info
       set_gdbarch_pseudo_register_read (gdbarch, rs6000_pseudo_register_read);
       set_gdbarch_pseudo_register_write (gdbarch,
 					 rs6000_pseudo_register_write);
+      set_gdbarch_ax_pseudo_register_collect (gdbarch,
+	      rs6000_ax_pseudo_register_collect);
     }
 
+  set_gdbarch_gen_return_address (gdbarch, rs6000_gen_return_address);
+
   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
 
   /* Select instruction printer.  */
@@ -5894,7 +6498,11 @@ rs6000_gdbarch_init (struct gdbarch_info
   set_gdbarch_skip_main_prologue (gdbarch, rs6000_skip_main_prologue);
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, rs6000_breakpoint_from_pc);
+
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       rs6000_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       rs6000_breakpoint::bp_from_kind);
 
   /* The value of symbols of type N_SO and N_FUN maybe null when
      it shouldn't be.  */
@@ -5923,7 +6531,7 @@ rs6000_gdbarch_init (struct gdbarch_info
 
   /* Setup displaced stepping.  */
   set_gdbarch_displaced_step_copy_insn (gdbarch,
-					simple_displaced_step_copy_insn);
+					ppc_displaced_step_copy_insn);
   set_gdbarch_displaced_step_hw_singlestep (gdbarch,
 					    ppc_displaced_step_hw_singlestep);
   set_gdbarch_displaced_step_fixup (gdbarch, ppc_displaced_step_fixup);
@@ -5936,14 +6544,13 @@ rs6000_gdbarch_init (struct gdbarch_info
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
   info.target_desc = tdesc;
-  info.tdep_info = (void *) tdesc_data;
+  info.tdep_info = tdesc_data;
   gdbarch_init_osabi (info, gdbarch);
 
   switch (info.osabi)
     {
     case GDB_OSABI_LINUX:
-    case GDB_OSABI_NETBSD_AOUT:
-    case GDB_OSABI_NETBSD_ELF:
+    case GDB_OSABI_NETBSD:
     case GDB_OSABI_UNKNOWN:
       set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc);
       frame_unwind_append_unwinder (gdbarch, &rs6000_epilogue_frame_unwind);
@@ -6005,6 +6612,10 @@ rs6000_gdbarch_init (struct gdbarch_info
   else
     register_ppc_ravenscar_ops (gdbarch);
 
+  set_gdbarch_disassembler_options (gdbarch, &powerpc_disassembler_options);
+  set_gdbarch_valid_disassembler_options (gdbarch,
+					  disassembler_options_powerpc ());
+
   return gdbarch;
 }
 
@@ -6060,7 +6671,7 @@ powerpc_set_vector_abi (char *args, int 
     if (strcmp (powerpc_vector_abi_string,
 		powerpc_vector_strings[vector_abi]) == 0)
       {
-	powerpc_vector_abi_global = vector_abi;
+	powerpc_vector_abi_global = (enum powerpc_vector_abi) vector_abi;
 	break;
       }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-tdep.h ./gdb/rs6000-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rs6000-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rs6000-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-exp.c ./gdb/rust-exp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-exp.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/rust-exp.c	2017-03-06 01:53:01.000000000 +0000
@@ -0,0 +1,4921 @@
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.4.1"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
+#line 22 "rust-exp.y"
+
+
+#include "defs.h"
+
+#include "block.h"
+#include "charset.h"
+#include "cp-support.h"
+#include "gdb_obstack.h"
+#include "gdb_regex.h"
+#include "rust-lang.h"
+#include "parser-defs.h"
+#include "selftest.h"
+#include "value.h"
+#include "vec.h"
+
+#define GDB_YY_REMAP_PREFIX rust
+#include "yy-remap.h"
+
+#define RUSTSTYPE YYSTYPE
+
+extern initialize_file_ftype _initialize_rust_exp;
+
+struct rust_op;
+typedef const struct rust_op *rust_op_ptr;
+DEF_VEC_P (rust_op_ptr);
+
+/* A typed integer constant.  */
+
+struct typed_val_int
+{
+  LONGEST val;
+  struct type *type;
+};
+
+/* A typed floating point constant.  */
+
+struct typed_val_float
+{
+  DOUBLEST dval;
+  struct type *type;
+};
+
+/* An identifier and an expression.  This is used to represent one
+   element of a struct initializer.  */
+
+struct set_field
+{
+  struct stoken name;
+  const struct rust_op *init;
+};
+
+typedef struct set_field set_field;
+
+DEF_VEC_O (set_field);
+
+
+static int rustyylex (void);
+static void rust_push_back (char c);
+static const char *rust_copy_name (const char *, int);
+static struct stoken rust_concat3 (const char *, const char *, const char *);
+static struct stoken make_stoken (const char *);
+static struct block_symbol rust_lookup_symbol (const char *name,
+					       const struct block *block,
+					       const domain_enum domain);
+static struct type *rust_lookup_type (const char *name,
+				      const struct block *block);
+static struct type *rust_type (const char *name);
+
+static const struct rust_op *crate_name (const struct rust_op *name);
+static const struct rust_op *super_name (const struct rust_op *name,
+					 unsigned int n_supers);
+
+static const struct rust_op *ast_operation (enum exp_opcode opcode,
+					    const struct rust_op *left,
+					    const struct rust_op *right);
+static const struct rust_op *ast_compound_assignment
+  (enum exp_opcode opcode, const struct rust_op *left,
+   const struct rust_op *rust_op);
+static const struct rust_op *ast_literal (struct typed_val_int val);
+static const struct rust_op *ast_dliteral (struct typed_val_float val);
+static const struct rust_op *ast_structop (const struct rust_op *left,
+					   const char *name,
+					   int completing);
+static const struct rust_op *ast_structop_anonymous
+  (const struct rust_op *left, struct typed_val_int number);
+static const struct rust_op *ast_unary (enum exp_opcode opcode,
+					const struct rust_op *expr);
+static const struct rust_op *ast_cast (const struct rust_op *expr,
+				       const struct rust_op *type);
+static const struct rust_op *ast_call_ish (enum exp_opcode opcode,
+					   const struct rust_op *expr,
+					   VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_path (struct stoken name,
+				       VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_string (struct stoken str);
+static const struct rust_op *ast_struct (const struct rust_op *name,
+					 VEC (set_field) **fields);
+static const struct rust_op *ast_range (const struct rust_op *lhs,
+					const struct rust_op *rhs);
+static const struct rust_op *ast_array_type (const struct rust_op *lhs,
+					     struct typed_val_int val);
+static const struct rust_op *ast_slice_type (const struct rust_op *type);
+static const struct rust_op *ast_reference_type (const struct rust_op *type);
+static const struct rust_op *ast_pointer_type (const struct rust_op *type,
+					       int is_mut);
+static const struct rust_op *ast_function_type (const struct rust_op *result,
+						VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_tuple_type (VEC (rust_op_ptr) **params);
+
+/* The state of the parser, used internally when we are parsing the
+   expression.  */
+
+static struct parser_state *pstate = NULL;
+
+/* A regular expression for matching Rust numbers.  This is split up
+   since it is very long and this gives us a way to comment the
+   sections.  */
+
+static const char *number_regex_text =
+  /* subexpression 1: allows use of alternation, otherwise uninteresting */
+  "^("
+  /* First comes floating point.  */
+  /* Recognize number after the decimal point, with optional
+     exponent and optional type suffix.
+     subexpression 2: allows "?", otherwise uninteresting
+     subexpression 3: if present, type suffix
+  */
+  "[0-9][0-9_]*\\.[0-9][0-9_]*([eE][-+]?[0-9][0-9_]*)?(f32|f64)?"
+#define FLOAT_TYPE1 3
+  "|"
+  /* Recognize exponent without decimal point, with optional type
+     suffix.
+     subexpression 4: if present, type suffix
+  */
+#define FLOAT_TYPE2 4
+  "[0-9][0-9_]*[eE][-+]?[0-9][0-9_]*(f32|f64)?"
+  "|"
+  /* "23." is a valid floating point number, but "23.e5" and
+     "23.f32" are not.  So, handle the trailing-. case
+     separately.  */
+  "[0-9][0-9_]*\\."
+  "|"
+  /* Finally come integers.
+     subexpression 5: text of integer
+     subexpression 6: if present, type suffix
+     subexpression 7: allows use of alternation, otherwise uninteresting
+  */
+#define INT_TEXT 5
+#define INT_TYPE 6
+  "(0x[a-fA-F0-9_]+|0o[0-7_]+|0b[01_]+|[0-9][0-9_]*)"
+  "([iu](size|8|16|32|64))?"
+  ")";
+/* The number of subexpressions to allocate space for, including the
+   "0th" whole match subexpression.  */
+#define NUM_SUBEXPRESSIONS 8
+
+/* The compiled number-matching regex.  */
+
+static regex_t number_regex;
+
+/* True if we're running unit tests.  */
+
+static int unit_testing;
+
+/* Obstack for data temporarily allocated during parsing.  */
+
+static struct obstack work_obstack;
+
+/* Result of parsing.  Points into work_obstack.  */
+
+static const struct rust_op *rust_ast;
+
+
+
+/* Line 189 of yacc.c  */
+#line 248 "rust-exp.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     GDBVAR = 258,
+     IDENT = 259,
+     COMPLETE = 260,
+     INTEGER = 261,
+     DECIMAL_INTEGER = 262,
+     STRING = 263,
+     BYTESTRING = 264,
+     FLOAT = 265,
+     COMPOUND_ASSIGN = 266,
+     KW_AS = 267,
+     KW_IF = 268,
+     KW_TRUE = 269,
+     KW_FALSE = 270,
+     KW_SUPER = 271,
+     KW_SELF = 272,
+     KW_MUT = 273,
+     KW_EXTERN = 274,
+     KW_CONST = 275,
+     KW_FN = 276,
+     KW_SIZEOF = 277,
+     DOTDOT = 278,
+     OROR = 279,
+     ANDAND = 280,
+     EQEQ = 281,
+     NOTEQ = 282,
+     LTEQ = 283,
+     GTEQ = 284,
+     LSH = 285,
+     RSH = 286,
+     COLONCOLON = 287,
+     ARROW = 288,
+     UNARY = 289
+   };
+#endif
+/* Tokens.  */
+#define GDBVAR 258
+#define IDENT 259
+#define COMPLETE 260
+#define INTEGER 261
+#define DECIMAL_INTEGER 262
+#define STRING 263
+#define BYTESTRING 264
+#define FLOAT 265
+#define COMPOUND_ASSIGN 266
+#define KW_AS 267
+#define KW_IF 268
+#define KW_TRUE 269
+#define KW_FALSE 270
+#define KW_SUPER 271
+#define KW_SELF 272
+#define KW_MUT 273
+#define KW_EXTERN 274
+#define KW_CONST 275
+#define KW_FN 276
+#define KW_SIZEOF 277
+#define DOTDOT 278
+#define OROR 279
+#define ANDAND 280
+#define EQEQ 281
+#define NOTEQ 282
+#define LTEQ 283
+#define GTEQ 284
+#define LSH 285
+#define RSH 286
+#define COLONCOLON 287
+#define ARROW 288
+#define UNARY 289
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c  */
+#line 197 "rust-exp.y"
+
+  /* A typed integer constant.  */
+  struct typed_val_int typed_val_int;
+
+  /* A typed floating point constant.  */
+  struct typed_val_float typed_val_float;
+
+  /* An identifier or string.  */
+  struct stoken sval;
+
+  /* A token representing an opcode, like "==".  */
+  enum exp_opcode opcode;
+
+  /* A list of expressions; for example, the arguments to a function
+     call.  */
+  VEC (rust_op_ptr) **params;
+
+  /* A list of field initializers.  */
+  VEC (set_field) **field_inits;
+
+  /* A single field initializer.  */
+  struct set_field one_field_init;
+
+  /* An expression.  */
+  const struct rust_op *op;
+
+  /* A plain integer, for example used to count the number of
+     "super::" prefixes on a path.  */
+  unsigned int depth;
+
+
+
+/* Line 214 of yacc.c  */
+#line 385 "rust-exp.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+/* Line 264 of yacc.c  */
+#line 228 "rust-exp.y"
+
+
+  /* Rust AST operations.  We build a tree of these; then lower them
+     to gdb expressions when parsing has completed.  */
+
+struct rust_op
+{
+  /* The opcode.  */
+  enum exp_opcode opcode;
+  /* If OPCODE is OP_TYPE, then this holds information about what type
+     is described by this node.  */
+  enum type_code typecode;
+  /* Indicates whether OPCODE actually represents a compound
+     assignment.  For example, if OPCODE is GTGT and this is false,
+     then this rust_op represents an ordinary ">>"; but if this is
+     true, then this rust_op represents ">>=".  Unused in other
+     cases.  */
+  unsigned int compound_assignment : 1;
+  /* Only used by a field expression; if set, indicates that the field
+     name occurred at the end of the expression and is eligible for
+     completion.  */
+  unsigned int completing : 1;
+  /* Operands of expression.  Which one is used and how depends on the
+     particular opcode.  */
+  RUSTSTYPE left;
+  RUSTSTYPE right;
+};
+
+
+
+/* Line 264 of yacc.c  */
+#line 428 "rust-exp.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or xmalloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined xmalloc) \
+	     && (defined YYFREE || defined xfree)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC xmalloc
+#   if ! defined xmalloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE xfree
+#   if ! defined xfree && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void xfree (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  60
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   1031
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  58
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  35
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  121
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  213
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   289
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    57,     2,     2,     2,    45,    39,     2,
+      49,    51,    43,    41,    50,    42,    48,    44,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    54,    56,
+      35,    34,    36,     2,    40,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    47,     2,    55,    38,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    52,    37,    53,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    46
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
+      19,    21,    23,    25,    27,    29,    31,    37,    40,    45,
+      48,    52,    53,    55,    61,    66,    70,    77,    83,    86,
+      90,    93,    95,    97,    99,   101,   103,   105,   107,   109,
+     113,   117,   121,   126,   129,   132,   135,   138,   141,   145,
+     150,   152,   154,   156,   158,   162,   166,   170,   174,   178,
+     182,   186,   190,   194,   198,   202,   206,   210,   214,   218,
+     222,   226,   230,   234,   238,   242,   246,   250,   252,   256,
+     257,   259,   263,   266,   267,   270,   273,   277,   279,   281,
+     283,   285,   289,   293,   296,   299,   301,   305,   311,   317,
+     319,   323,   327,   330,   333,   335,   339,   341,   346,   351,
+     353,   359,   365,   370,   373,   377,   381,   388,   392,   393,
+     395,   397
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      59,     0,    -1,    60,    -1,    68,    -1,    84,    -1,    61,
+      -1,    62,    -1,    63,    -1,    69,    -1,    66,    -1,    70,
+      -1,    67,    -1,    71,    -1,    72,    -1,    77,    -1,    81,
+      -1,    49,    60,    50,    79,    51,    -1,    49,    51,    -1,
+      85,    52,    65,    53,    -1,    23,    60,    -1,     4,    54,
+      60,    -1,    -1,    64,    -1,     4,    54,    60,    50,    65,
+      -1,    47,    18,    78,    55,    -1,    47,    78,    55,    -1,
+      47,    18,    60,    56,    60,    55,    -1,    47,    60,    56,
+      60,    55,    -1,    60,    23,    -1,    60,    23,    60,    -1,
+      23,    60,    -1,    23,    -1,     6,    -1,     7,    -1,    10,
+      -1,     8,    -1,     9,    -1,    14,    -1,    15,    -1,    60,
+      48,     4,    -1,    60,    48,     5,    -1,    60,    48,     7,
+      -1,    60,    47,    60,    55,    -1,    41,    60,    -1,    42,
+      60,    -1,    57,    60,    -1,    43,    60,    -1,    39,    60,
+      -1,    39,    18,    60,    -1,    22,    49,    60,    51,    -1,
+      73,    -1,    74,    -1,    75,    -1,    76,    -1,    60,    43,
+      60,    -1,    60,    40,    60,    -1,    60,    44,    60,    -1,
+      60,    45,    60,    -1,    60,    35,    60,    -1,    60,    36,
+      60,    -1,    60,    39,    60,    -1,    60,    37,    60,    -1,
+      60,    38,    60,    -1,    60,    41,    60,    -1,    60,    42,
+      60,    -1,    60,    24,    60,    -1,    60,    25,    60,    -1,
+      60,    26,    60,    -1,    60,    27,    60,    -1,    60,    28,
+      60,    -1,    60,    29,    60,    -1,    60,    30,    60,    -1,
+      60,    31,    60,    -1,    60,    12,    90,    -1,    60,    34,
+      60,    -1,    60,    11,    60,    -1,    49,    60,    51,    -1,
+      60,    -1,    78,    50,    60,    -1,    -1,    78,    -1,    49,
+      79,    51,    -1,    60,    80,    -1,    -1,    17,    32,    -1,
+      16,    32,    -1,    83,    16,    32,    -1,    85,    -1,     3,
+      -1,    17,    -1,    86,    -1,    17,    32,    86,    -1,    82,
+      83,    86,    -1,    32,    86,    -1,    19,    86,    -1,     4,
+      -1,    86,    32,     4,    -1,    86,    32,    35,    92,    36,
+      -1,    86,    32,    35,    92,    31,    -1,    89,    -1,    17,
+      32,    89,    -1,    82,    83,    89,    -1,    32,    89,    -1,
+      19,    89,    -1,     4,    -1,    88,    32,     4,    -1,    88,
+      -1,    88,    35,    92,    36,    -1,    88,    35,    92,    31,
+      -1,    87,    -1,    47,    90,    56,     6,    55,    -1,    47,
+      90,    56,     7,    55,    -1,    39,    47,    90,    55,    -1,
+      39,    90,    -1,    43,    18,    90,    -1,    43,    20,    90,
+      -1,    21,    49,    91,    51,    33,    90,    -1,    49,    91,
+      51,    -1,    -1,    92,    -1,    90,    -1,    92,    50,    90,
+      -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   353,   353,   366,   367,   368,   369,   370,   371,   372,
+     373,   374,   375,   376,   377,   378,   382,   390,   407,   412,
+     422,   434,   439,   449,   461,   463,   465,   467,   472,   474,
+     476,   478,   483,   485,   487,   489,   518,   520,   529,   541,
+     543,   548,   553,   558,   561,   564,   573,   576,   579,   581,
+     586,   587,   588,   589,   593,   596,   599,   602,   605,   608,
+     611,   614,   617,   620,   623,   626,   629,   632,   635,   638,
+     641,   644,   647,   652,   657,   662,   668,   673,   679,   688,
+     693,   698,   705,   709,   711,   715,   717,   722,   724,   726,
+     731,   732,   734,   736,   738,   750,   752,   758,   760,   768,
+     769,   771,   773,   775,   787,   789,   798,   799,   801,   809,
+     810,   812,   814,   816,   818,   820,   822,   824,   830,   831,
+     836,   845
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "GDBVAR", "IDENT", "COMPLETE", "INTEGER",
+  "DECIMAL_INTEGER", "STRING", "BYTESTRING", "FLOAT", "COMPOUND_ASSIGN",
+  "KW_AS", "KW_IF", "KW_TRUE", "KW_FALSE", "KW_SUPER", "KW_SELF", "KW_MUT",
+  "KW_EXTERN", "KW_CONST", "KW_FN", "KW_SIZEOF", "DOTDOT", "OROR",
+  "ANDAND", "EQEQ", "NOTEQ", "LTEQ", "GTEQ", "LSH", "RSH", "COLONCOLON",
+  "ARROW", "'='", "'<'", "'>'", "'|'", "'^'", "'&'", "'@'", "'+'", "'-'",
+  "'*'", "'/'", "'%'", "UNARY", "'['", "'.'", "'('", "','", "')'", "'{'",
+  "'}'", "':'", "']'", "';'", "'!'", "$accept", "start", "expr",
+  "tuple_expr", "unit_expr", "struct_expr", "struct_expr_tail",
+  "struct_expr_list", "array_expr", "range_expr", "literal", "field_expr",
+  "idx_expr", "unop_expr", "binop_expr", "binop_expr_expr",
+  "type_cast_expr", "assignment_expr", "compound_assignment_expr",
+  "paren_expr", "expr_list", "maybe_expr_list", "paren_expr_list",
+  "call_expr", "maybe_self_path", "super_path", "path_expr",
+  "path_for_expr", "identifier_path_for_expr", "path_for_type",
+  "just_identifiers_for_type", "identifier_path_for_type", "type",
+  "maybe_type_list", "type_list", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,    61,    60,    62,   124,    94,    38,
+      64,    43,    45,    42,    47,    37,   289,    91,    46,    40,
+      44,    41,   123,   125,    58,    93,    59,    33
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    58,    59,    60,    60,    60,    60,    60,    60,    60,
+      60,    60,    60,    60,    60,    60,    61,    62,    63,    64,
+      64,    65,    65,    65,    66,    66,    66,    66,    67,    67,
+      67,    67,    68,    68,    68,    68,    68,    68,    68,    69,
+      69,    69,    70,    71,    71,    71,    71,    71,    71,    71,
+      72,    72,    72,    72,    73,    73,    73,    73,    73,    73,
+      73,    73,    73,    73,    73,    73,    73,    73,    73,    73,
+      73,    73,    73,    74,    75,    76,    77,    78,    78,    79,
+      79,    80,    81,    82,    82,    83,    83,    84,    84,    84,
+      85,    85,    85,    85,    85,    86,    86,    86,    86,    87,
+      87,    87,    87,    87,    88,    88,    89,    89,    89,    90,
+      90,    90,    90,    90,    90,    90,    90,    90,    91,    91,
+      92,    92
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     5,     2,     4,     2,
+       3,     0,     1,     5,     4,     3,     6,     5,     2,     3,
+       2,     1,     1,     1,     1,     1,     1,     1,     1,     3,
+       3,     3,     4,     2,     2,     2,     2,     2,     3,     4,
+       1,     1,     1,     1,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     1,     3,     0,
+       1,     3,     2,     0,     2,     2,     3,     1,     1,     1,
+       1,     3,     3,     2,     2,     1,     3,     5,     5,     1,
+       3,     3,     2,     2,     1,     3,     1,     4,     4,     1,
+       5,     5,     4,     2,     3,     3,     6,     3,     0,     1,
+       1,     3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+      83,    88,    95,    32,    33,    35,    36,    34,    37,    38,
+      89,     0,     0,    31,     0,    83,    83,    83,    83,    83,
+      83,    83,     0,     2,     5,     6,     7,     9,    11,     3,
+       8,    10,    12,    13,    50,    51,    52,    53,    14,    15,
+       0,     4,    87,    90,    84,    94,    83,    30,    93,    83,
+      47,    43,    44,    46,    83,    77,     0,    17,     0,    45,
+       1,    83,    83,    28,    83,    83,    83,    83,    83,    83,
+      83,    83,    83,    83,    83,    83,    83,    83,    83,    83,
+      83,    83,    83,    83,    83,     0,    79,    82,     0,     0,
+      21,     0,    91,     0,    48,    77,     0,    83,    83,    25,
+      79,    76,    75,   104,     0,     0,     0,     0,    83,     0,
+      83,    83,     0,   109,   106,    99,    73,    29,    65,    66,
+      67,    68,    69,    70,    71,    72,    74,    58,    59,    61,
+      62,    60,    55,    63,    64,    54,    56,    57,     0,    39,
+      40,    41,    77,    80,     0,    85,     0,    92,     0,    83,
+      22,     0,    96,    83,    49,    83,    24,     0,    78,     0,
+      84,   103,    83,   102,    83,   113,    83,    83,     0,   120,
+       0,   119,     0,     0,    83,    42,    81,    86,    83,    19,
+      18,     0,     0,    27,    16,   100,     0,     0,   114,   115,
+       0,   117,    83,   101,   105,     0,    20,    98,    97,    26,
+       0,   112,     0,     0,   121,   108,   107,    21,    83,   110,
+     111,    23,   116
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,    22,   142,    24,    25,    26,   150,   151,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+     143,   144,    87,    39,    40,    89,    41,    42,    43,   113,
+     114,   115,   169,   170,   171
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -151
+static const yytype_int16 yypact[] =
+{
+     384,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,
+     -20,    41,    -2,   119,    41,   176,   384,   384,   384,   228,
+     280,   384,    56,   742,  -151,  -151,  -151,  -151,  -151,  -151,
+    -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,
+      42,  -151,     8,    30,    41,    30,   384,   781,    30,   384,
+      68,    68,    68,    68,   384,   425,   -28,  -151,   620,    68,
+    -151,   384,   209,   119,   384,   384,   384,   384,   384,   384,
+     384,   384,   384,   384,   384,   384,   384,   384,   384,   384,
+     384,   384,   384,   384,   384,    96,   332,  -151,    53,    10,
+       6,     5,    30,   661,    68,   464,     2,   384,   384,  -151,
+     332,  -151,   820,  -151,    78,   109,    71,   109,   261,    15,
+     209,   396,    42,  -151,    73,  -151,  -151,   781,   854,   888,
+     922,   922,   922,   922,   162,   162,   820,   922,   922,   942,
+     962,   982,    47,   313,   313,   -11,   -11,   -11,   503,  -151,
+    -151,  -151,   742,    74,    70,  -151,    98,    30,    77,   384,
+    -151,    86,  -151,   209,  -151,   384,  -151,   542,   742,    89,
+     109,  -151,   396,  -151,   209,  -151,   209,   209,    87,  -151,
+      93,    95,    27,   142,   209,  -151,  -151,  -151,   384,   742,
+    -151,    -8,   581,  -151,  -151,  -151,    99,   -50,  -151,  -151,
+     112,  -151,   209,  -151,  -151,    -6,   702,  -151,  -151,  -151,
+     114,  -151,    97,   101,  -151,  -151,  -151,     6,   209,  -151,
+    -151,  -151,  -151
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
+{
+    -151,  -151,     0,  -151,  -151,  -151,  -151,   -53,  -151,  -151,
+    -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,  -151,
+     -15,    57,  -151,  -151,   -60,    51,  -151,  -151,    -3,  -151,
+    -151,   -73,   -55,     3,  -150
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -119
+static const yytype_int16 yytable[] =
+{
+      23,    62,   112,   181,    56,   201,   190,   116,    45,   152,
+     148,    48,    44,    47,     2,    50,    51,    52,    53,    55,
+      58,    59,    98,   197,   195,   205,   146,    99,   198,   149,
+     206,   103,   161,   166,   163,   167,    84,    85,    86,    96,
+     153,    92,   192,   146,   192,     2,    93,    46,   112,    94,
+     112,   112,    98,   165,    95,   168,    60,   156,    88,    62,
+      90,   102,    91,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
+     134,   135,   136,   137,   138,   145,   147,   185,    79,    80,
+      81,    82,    83,   112,    84,    85,    86,   157,   158,   193,
+     139,   140,   112,   141,   112,   173,   112,   112,   174,   187,
+     160,   188,   189,   103,   112,    84,    85,    86,   202,   203,
+     162,   176,     1,     2,    98,     3,     4,     5,     6,     7,
+     177,   178,   112,     8,     9,   -83,    10,   204,    11,   180,
+     184,    12,  -119,   190,   191,   192,   194,   208,   112,   179,
+     200,    14,   209,   212,   211,   182,   210,   159,    15,     0,
+      16,    17,    18,   172,     0,   186,    19,     0,    20,     0,
+       0,     0,     0,     0,    62,     0,    21,     0,   196,     1,
+       2,     0,     3,     4,     5,     6,     7,     0,     0,     0,
+       8,     9,     0,    10,    49,    11,     0,     0,    12,    13,
+       0,     0,    78,    79,    80,    81,    82,    83,    14,    84,
+      85,    86,     0,   103,     0,    15,     0,    16,    17,    18,
+       0,     0,     0,    19,     0,    20,   104,     0,   105,     0,
+     106,     1,     2,    21,     3,     4,     5,     6,     7,     0,
+       0,   107,     8,     9,     0,    10,    54,    11,   108,     0,
+      12,    13,   109,     0,     0,     0,   110,     0,   111,     0,
+      14,     0,     0,     0,     0,   103,     0,    15,     0,    16,
+      17,    18,     0,     0,     0,    19,     0,    20,   104,     0,
+     105,     0,   106,     1,     2,    21,     3,     4,     5,     6,
+       7,     0,     0,   107,     8,     9,     0,    10,     0,    11,
+     108,     0,    12,    13,   109,     0,     0,     0,   164,     0,
+     111,     0,    14,     0,     0,     0,     0,     0,     0,    15,
+       0,    16,    17,    18,     0,    62,     0,    19,     0,    20,
+       0,    57,     0,     0,     0,     1,     2,    21,     3,     4,
+       5,     6,     7,     0,     0,     0,     8,     9,   -83,    10,
+       0,    11,     0,     0,    12,    13,    81,    82,    83,     0,
+      84,    85,    86,     0,    14,     0,     0,     0,     0,     0,
+       0,    15,     0,    16,    17,    18,     0,     0,     0,    19,
+       0,    20,     0,     0,     0,     0,     0,     1,     2,    21,
+       3,     4,     5,     6,     7,     0,     0,     0,     8,     9,
+     103,    10,     0,    11,     0,     0,    12,    13,     0,     0,
+       0,     0,     0,   104,     0,   105,    14,   106,     0,     0,
+       0,     0,     0,    15,     0,    16,    17,    18,   107,     0,
+       0,    19,     0,    20,     0,   108,    61,    62,     0,   109,
+       0,    21,     0,   110,     0,   111,     0,  -118,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,     0,     0,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,     0,    84,    85,    86,    61,    62,     0,     0,     0,
+       0,    97,     0,     0,     0,     0,     0,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,     0,     0,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+       0,    84,    85,    86,    61,    62,     0,     0,     0,     0,
+     155,     0,     0,     0,     0,     0,    63,    64,    65,    66,
+      67,    68,    69,    70,    71,     0,     0,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,     0,
+      84,    85,    86,    61,    62,     0,     0,     0,   175,     0,
+       0,     0,     0,     0,     0,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,     0,     0,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    61,    62,     0,     0,     0,   183,     0,     0,
+       0,     0,     0,     0,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,     0,     0,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,     0,    84,    85,
+      86,    61,    62,     0,     0,     0,   199,     0,     0,     0,
+       0,     0,     0,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,     0,     0,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,     0,    84,    85,    86,
+     100,   101,    61,    62,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,     0,     0,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,     0,    84,    85,
+      86,     0,   154,    61,    62,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,     0,     0,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,   207,    61,    62,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,     0,     0,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    61,    62,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  -119,    64,    65,    66,    67,    68,
+      69,    70,    71,     0,     0,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,     0,    84,    85,
+      86,    61,    62,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    64,    65,    66,    67,    68,    69,
+      70,    71,     0,     0,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    62,    84,    85,    86,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,    69,    70,    71,     0,     0,     0,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      62,    84,    85,    86,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    66,    67,    68,    69,    70,    71,
+       0,     0,     0,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    62,    84,    85,    86,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  -119,  -119,
+    -119,  -119,    70,    71,    62,     0,     0,  -119,  -119,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    70,    71,    62,     0,     0,     0,     0,     0,
+      76,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    70,    71,    62,     0,     0,     0,     0,     0,
+       0,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    70,    71,     0,     0,     0,     0,     0,     0,
+       0,     0,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86
+};
+
+static const yytype_int16 yycheck[] =
+{
+       0,    12,    62,   153,    19,    55,    56,    62,    11,     4,
+       4,    14,    32,    13,     4,    15,    16,    17,    18,    19,
+      20,    21,    50,    31,   174,    31,    16,    55,    36,    23,
+      36,     4,   105,    18,   107,    20,    47,    48,    49,    54,
+      35,    44,    50,    16,    50,     4,    46,    49,   108,    49,
+     110,   111,    50,   108,    54,   110,     0,    55,    16,    12,
+      52,    61,    32,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    32,    89,   160,    41,    42,
+      43,    44,    45,   153,    47,    48,    49,    97,    98,   172,
+       4,     5,   162,     7,   164,    32,   166,   167,    35,   164,
+      32,   166,   167,     4,   174,    47,    48,    49,     6,     7,
+      49,    51,     3,     4,    50,     6,     7,     8,     9,    10,
+      32,    54,   192,    14,    15,    16,    17,   192,    19,    53,
+      51,    22,    23,    56,    51,    50,     4,    33,   208,   149,
+      51,    32,    55,   208,   207,   155,    55,   100,    39,    -1,
+      41,    42,    43,   112,    -1,   162,    47,    -1,    49,    -1,
+      -1,    -1,    -1,    -1,    12,    -1,    57,    -1,   178,     3,
+       4,    -1,     6,     7,     8,     9,    10,    -1,    -1,    -1,
+      14,    15,    -1,    17,    18,    19,    -1,    -1,    22,    23,
+      -1,    -1,    40,    41,    42,    43,    44,    45,    32,    47,
+      48,    49,    -1,     4,    -1,    39,    -1,    41,    42,    43,
+      -1,    -1,    -1,    47,    -1,    49,    17,    -1,    19,    -1,
+      21,     3,     4,    57,     6,     7,     8,     9,    10,    -1,
+      -1,    32,    14,    15,    -1,    17,    18,    19,    39,    -1,
+      22,    23,    43,    -1,    -1,    -1,    47,    -1,    49,    -1,
+      32,    -1,    -1,    -1,    -1,     4,    -1,    39,    -1,    41,
+      42,    43,    -1,    -1,    -1,    47,    -1,    49,    17,    -1,
+      19,    -1,    21,     3,     4,    57,     6,     7,     8,     9,
+      10,    -1,    -1,    32,    14,    15,    -1,    17,    -1,    19,
+      39,    -1,    22,    23,    43,    -1,    -1,    -1,    47,    -1,
+      49,    -1,    32,    -1,    -1,    -1,    -1,    -1,    -1,    39,
+      -1,    41,    42,    43,    -1,    12,    -1,    47,    -1,    49,
+      -1,    51,    -1,    -1,    -1,     3,     4,    57,     6,     7,
+       8,     9,    10,    -1,    -1,    -1,    14,    15,    16,    17,
+      -1,    19,    -1,    -1,    22,    23,    43,    44,    45,    -1,
+      47,    48,    49,    -1,    32,    -1,    -1,    -1,    -1,    -1,
+      -1,    39,    -1,    41,    42,    43,    -1,    -1,    -1,    47,
+      -1,    49,    -1,    -1,    -1,    -1,    -1,     3,     4,    57,
+       6,     7,     8,     9,    10,    -1,    -1,    -1,    14,    15,
+       4,    17,    -1,    19,    -1,    -1,    22,    23,    -1,    -1,
+      -1,    -1,    -1,    17,    -1,    19,    32,    21,    -1,    -1,
+      -1,    -1,    -1,    39,    -1,    41,    42,    43,    32,    -1,
+      -1,    47,    -1,    49,    -1,    39,    11,    12,    -1,    43,
+      -1,    57,    -1,    47,    -1,    49,    -1,    51,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    -1,    -1,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    -1,    47,    48,    49,    11,    12,    -1,    -1,    -1,
+      -1,    56,    -1,    -1,    -1,    -1,    -1,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      -1,    47,    48,    49,    11,    12,    -1,    -1,    -1,    -1,
+      56,    -1,    -1,    -1,    -1,    -1,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    -1,    -1,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    -1,
+      47,    48,    49,    11,    12,    -1,    -1,    -1,    55,    -1,
+      -1,    -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    11,    12,    -1,    -1,    -1,    55,    -1,    -1,
+      -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    -1,    -1,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    -1,    47,    48,
+      49,    11,    12,    -1,    -1,    -1,    55,    -1,    -1,    -1,
+      -1,    -1,    -1,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    -1,    47,    48,    49,
+      50,    51,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    -1,    -1,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    -1,    47,    48,
+      49,    -1,    51,    11,    12,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    50,    11,    12,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    -1,    -1,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    -1,    47,    48,
+      49,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    12,    47,    48,    49,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    -1,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      12,    47,    48,    49,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    -1,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    12,    47,    48,    49,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    26,    27,
+      28,    29,    30,    31,    12,    -1,    -1,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    30,    31,    12,    -1,    -1,    -1,    -1,    -1,
+      38,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    30,    31,    12,    -1,    -1,    -1,    -1,    -1,
+      -1,    39,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    40,    41,    42,    43,    44,    45,    -1,    47,
+      48,    49
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     3,     4,     6,     7,     8,     9,    10,    14,    15,
+      17,    19,    22,    23,    32,    39,    41,    42,    43,    47,
+      49,    57,    59,    60,    61,    62,    63,    66,    67,    68,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    81,
+      82,    84,    85,    86,    32,    86,    49,    60,    86,    18,
+      60,    60,    60,    60,    18,    60,    78,    51,    60,    60,
+       0,    11,    12,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    47,    48,    49,    80,    16,    83,
+      52,    32,    86,    60,    60,    60,    78,    56,    50,    55,
+      50,    51,    60,     4,    17,    19,    21,    32,    39,    43,
+      47,    49,    82,    87,    88,    89,    90,    60,    60,    60,
+      60,    60,    60,    60,    60,    60,    60,    60,    60,    60,
+      60,    60,    60,    60,    60,    60,    60,    60,    60,     4,
+       5,     7,    60,    78,    79,    32,    16,    86,     4,    23,
+      64,    65,     4,    35,    51,    56,    55,    60,    60,    79,
+      32,    89,    49,    89,    47,    90,    18,    20,    90,    90,
+      91,    92,    83,    32,    35,    55,    51,    32,    54,    60,
+      53,    92,    60,    55,    51,    89,    91,    90,    90,    90,
+      56,    51,    50,    89,     4,    92,    60,    31,    36,    55,
+      51,    55,     6,     7,    90,    31,    36,    50,    33,    55,
+      55,    65,    90
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  YYUSE (yyvaluep);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to xreallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to xreallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+
+/* Line 1455 of yacc.c  */
+#line 354 "rust-exp.y"
+    {
+		  /* If we are completing and see a valid parse,
+		     rust_ast will already have been set.  */
+		  if (rust_ast == NULL)
+		    rust_ast = (yyvsp[(1) - (1)].op);
+		}
+    break;
+
+  case 16:
+
+/* Line 1455 of yacc.c  */
+#line 383 "rust-exp.y"
+    {
+		  VEC_safe_insert (rust_op_ptr, *(yyvsp[(4) - (5)].params), 0, (yyvsp[(2) - (5)].op));
+		  error (_("Tuple expressions not supported yet"));
+		}
+    break;
+
+  case 17:
+
+/* Line 1455 of yacc.c  */
+#line 391 "rust-exp.y"
+    {
+		  struct typed_val_int val;
+
+		  val.type
+		    = language_lookup_primitive_type (parse_language (pstate),
+						      parse_gdbarch (pstate),
+						      "()");
+		  val.val = 0;
+		  (yyval.op) = ast_literal (val);
+		}
+    break;
+
+  case 18:
+
+/* Line 1455 of yacc.c  */
+#line 408 "rust-exp.y"
+    { (yyval.op) = ast_struct ((yyvsp[(1) - (4)].op), (yyvsp[(3) - (4)].field_inits)); }
+    break;
+
+  case 19:
+
+/* Line 1455 of yacc.c  */
+#line 413 "rust-exp.y"
+    {
+		  struct set_field sf;
+
+		  sf.name.ptr = NULL;
+		  sf.name.length = 0;
+		  sf.init = (yyvsp[(2) - (2)].op);
+
+		  (yyval.one_field_init) = sf;
+		}
+    break;
+
+  case 20:
+
+/* Line 1455 of yacc.c  */
+#line 423 "rust-exp.y"
+    {
+		  struct set_field sf;
+
+		  sf.name = (yyvsp[(1) - (3)].sval);
+		  sf.init = (yyvsp[(3) - (3)].op);
+		  (yyval.one_field_init) = sf;
+		}
+    break;
+
+  case 21:
+
+/* Line 1455 of yacc.c  */
+#line 434 "rust-exp.y"
+    {
+		  VEC (set_field) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+		  (yyval.field_inits) = result;
+		}
+    break;
+
+  case 22:
+
+/* Line 1455 of yacc.c  */
+#line 440 "rust-exp.y"
+    {
+		  VEC (set_field) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+
+		  make_cleanup (VEC_cleanup (set_field), result);
+		  VEC_safe_push (set_field, *result, &(yyvsp[(1) - (1)].one_field_init));
+
+		  (yyval.field_inits) = result;
+		}
+    break;
+
+  case 23:
+
+/* Line 1455 of yacc.c  */
+#line 450 "rust-exp.y"
+    {
+		  struct set_field sf;
+
+		  sf.name = (yyvsp[(1) - (5)].sval);
+		  sf.init = (yyvsp[(3) - (5)].op);
+		  VEC_safe_push (set_field, *(yyvsp[(5) - (5)].field_inits), &sf);
+		  (yyval.field_inits) = (yyvsp[(5) - (5)].field_inits);
+		}
+    break;
+
+  case 24:
+
+/* Line 1455 of yacc.c  */
+#line 462 "rust-exp.y"
+    { (yyval.op) = ast_call_ish (OP_ARRAY, NULL, (yyvsp[(3) - (4)].params)); }
+    break;
+
+  case 25:
+
+/* Line 1455 of yacc.c  */
+#line 464 "rust-exp.y"
+    { (yyval.op) = ast_call_ish (OP_ARRAY, NULL, (yyvsp[(2) - (3)].params)); }
+    break;
+
+  case 26:
+
+/* Line 1455 of yacc.c  */
+#line 466 "rust-exp.y"
+    { (yyval.op) = ast_operation (OP_RUST_ARRAY, (yyvsp[(3) - (6)].op), (yyvsp[(5) - (6)].op)); }
+    break;
+
+  case 27:
+
+/* Line 1455 of yacc.c  */
+#line 468 "rust-exp.y"
+    { (yyval.op) = ast_operation (OP_RUST_ARRAY, (yyvsp[(2) - (5)].op), (yyvsp[(4) - (5)].op)); }
+    break;
+
+  case 28:
+
+/* Line 1455 of yacc.c  */
+#line 473 "rust-exp.y"
+    { (yyval.op) = ast_range ((yyvsp[(1) - (2)].op), NULL); }
+    break;
+
+  case 29:
+
+/* Line 1455 of yacc.c  */
+#line 475 "rust-exp.y"
+    { (yyval.op) = ast_range ((yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 30:
+
+/* Line 1455 of yacc.c  */
+#line 477 "rust-exp.y"
+    { (yyval.op) = ast_range (NULL, (yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 31:
+
+/* Line 1455 of yacc.c  */
+#line 479 "rust-exp.y"
+    { (yyval.op) = ast_range (NULL, NULL); }
+    break;
+
+  case 32:
+
+/* Line 1455 of yacc.c  */
+#line 484 "rust-exp.y"
+    { (yyval.op) = ast_literal ((yyvsp[(1) - (1)].typed_val_int)); }
+    break;
+
+  case 33:
+
+/* Line 1455 of yacc.c  */
+#line 486 "rust-exp.y"
+    { (yyval.op) = ast_literal ((yyvsp[(1) - (1)].typed_val_int)); }
+    break;
+
+  case 34:
+
+/* Line 1455 of yacc.c  */
+#line 488 "rust-exp.y"
+    { (yyval.op) = ast_dliteral ((yyvsp[(1) - (1)].typed_val_float)); }
+    break;
+
+  case 35:
+
+/* Line 1455 of yacc.c  */
+#line 490 "rust-exp.y"
+    {
+		  const struct rust_op *str = ast_string ((yyvsp[(1) - (1)].sval));
+		  VEC (set_field) **fields;
+		  struct set_field field;
+		  struct typed_val_int val;
+		  struct stoken token;
+
+		  fields = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+		  make_cleanup (VEC_cleanup (set_field), fields);
+
+		  /* Wrap the raw string in the &str struct.  */
+		  field.name.ptr = "data_ptr";
+		  field.name.length = strlen (field.name.ptr);
+		  field.init = ast_unary (UNOP_ADDR, ast_string ((yyvsp[(1) - (1)].sval)));
+		  VEC_safe_push (set_field, *fields, &field);
+
+		  val.type = rust_type ("usize");
+		  val.val = (yyvsp[(1) - (1)].sval).length;
+
+		  field.name.ptr = "length";
+		  field.name.length = strlen (field.name.ptr);
+		  field.init = ast_literal (val);
+		  VEC_safe_push (set_field, *fields, &field);
+
+		  token.ptr = "&str";
+		  token.length = strlen (token.ptr);
+		  (yyval.op) = ast_struct (ast_path (token, NULL), fields);
+		}
+    break;
+
+  case 36:
+
+/* Line 1455 of yacc.c  */
+#line 519 "rust-exp.y"
+    { (yyval.op) = ast_string ((yyvsp[(1) - (1)].sval)); }
+    break;
+
+  case 37:
+
+/* Line 1455 of yacc.c  */
+#line 521 "rust-exp.y"
+    {
+		  struct typed_val_int val;
+
+		  val.type = language_bool_type (parse_language (pstate),
+						 parse_gdbarch (pstate));
+		  val.val = 1;
+		  (yyval.op) = ast_literal (val);
+		}
+    break;
+
+  case 38:
+
+/* Line 1455 of yacc.c  */
+#line 530 "rust-exp.y"
+    {
+		  struct typed_val_int val;
+
+		  val.type = language_bool_type (parse_language (pstate),
+						 parse_gdbarch (pstate));
+		  val.val = 0;
+		  (yyval.op) = ast_literal (val);
+		}
+    break;
+
+  case 39:
+
+/* Line 1455 of yacc.c  */
+#line 542 "rust-exp.y"
+    { (yyval.op) = ast_structop ((yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].sval).ptr, 0); }
+    break;
+
+  case 40:
+
+/* Line 1455 of yacc.c  */
+#line 544 "rust-exp.y"
+    {
+		  (yyval.op) = ast_structop ((yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].sval).ptr, 1);
+		  rust_ast = (yyval.op);
+		}
+    break;
+
+  case 41:
+
+/* Line 1455 of yacc.c  */
+#line 549 "rust-exp.y"
+    { (yyval.op) = ast_structop_anonymous ((yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].typed_val_int)); }
+    break;
+
+  case 42:
+
+/* Line 1455 of yacc.c  */
+#line 554 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_SUBSCRIPT, (yyvsp[(1) - (4)].op), (yyvsp[(3) - (4)].op)); }
+    break;
+
+  case 43:
+
+/* Line 1455 of yacc.c  */
+#line 559 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_PLUS, (yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 44:
+
+/* Line 1455 of yacc.c  */
+#line 562 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_NEG, (yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 45:
+
+/* Line 1455 of yacc.c  */
+#line 565 "rust-exp.y"
+    {
+		  /* Note that we provide a Rust-specific evaluator
+		     override for UNOP_COMPLEMENT, so it can do the
+		     right thing for both bool and integral
+		     values.  */
+		  (yyval.op) = ast_unary (UNOP_COMPLEMENT, (yyvsp[(2) - (2)].op));
+		}
+    break;
+
+  case 46:
+
+/* Line 1455 of yacc.c  */
+#line 574 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_IND, (yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 47:
+
+/* Line 1455 of yacc.c  */
+#line 577 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_ADDR, (yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 48:
+
+/* Line 1455 of yacc.c  */
+#line 580 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_ADDR, (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 49:
+
+/* Line 1455 of yacc.c  */
+#line 582 "rust-exp.y"
+    { (yyval.op) = ast_unary (UNOP_SIZEOF, (yyvsp[(3) - (4)].op)); }
+    break;
+
+  case 54:
+
+/* Line 1455 of yacc.c  */
+#line 594 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_MUL, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 55:
+
+/* Line 1455 of yacc.c  */
+#line 597 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_REPEAT, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 56:
+
+/* Line 1455 of yacc.c  */
+#line 600 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_DIV, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 57:
+
+/* Line 1455 of yacc.c  */
+#line 603 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_REM, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 58:
+
+/* Line 1455 of yacc.c  */
+#line 606 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_LESS, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 59:
+
+/* Line 1455 of yacc.c  */
+#line 609 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_GTR, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 60:
+
+/* Line 1455 of yacc.c  */
+#line 612 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_BITWISE_AND, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 61:
+
+/* Line 1455 of yacc.c  */
+#line 615 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_BITWISE_IOR, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 62:
+
+/* Line 1455 of yacc.c  */
+#line 618 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_BITWISE_XOR, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 63:
+
+/* Line 1455 of yacc.c  */
+#line 621 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_ADD, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 64:
+
+/* Line 1455 of yacc.c  */
+#line 624 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_SUB, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 65:
+
+/* Line 1455 of yacc.c  */
+#line 627 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_LOGICAL_OR, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 66:
+
+/* Line 1455 of yacc.c  */
+#line 630 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_LOGICAL_AND, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 67:
+
+/* Line 1455 of yacc.c  */
+#line 633 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_EQUAL, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 68:
+
+/* Line 1455 of yacc.c  */
+#line 636 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_NOTEQUAL, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 69:
+
+/* Line 1455 of yacc.c  */
+#line 639 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_LEQ, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 70:
+
+/* Line 1455 of yacc.c  */
+#line 642 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_GEQ, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 71:
+
+/* Line 1455 of yacc.c  */
+#line 645 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_LSH, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 72:
+
+/* Line 1455 of yacc.c  */
+#line 648 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_RSH, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 73:
+
+/* Line 1455 of yacc.c  */
+#line 653 "rust-exp.y"
+    { (yyval.op) = ast_cast ((yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 74:
+
+/* Line 1455 of yacc.c  */
+#line 658 "rust-exp.y"
+    { (yyval.op) = ast_operation (BINOP_ASSIGN, (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 75:
+
+/* Line 1455 of yacc.c  */
+#line 663 "rust-exp.y"
+    { (yyval.op) = ast_compound_assignment ((yyvsp[(2) - (3)].opcode), (yyvsp[(1) - (3)].op), (yyvsp[(3) - (3)].op)); }
+    break;
+
+  case 76:
+
+/* Line 1455 of yacc.c  */
+#line 669 "rust-exp.y"
+    { (yyval.op) = (yyvsp[(2) - (3)].op); }
+    break;
+
+  case 77:
+
+/* Line 1455 of yacc.c  */
+#line 674 "rust-exp.y"
+    {
+		  (yyval.params) = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+		  make_cleanup (VEC_cleanup (rust_op_ptr), (yyval.params));
+		  VEC_safe_push (rust_op_ptr, *(yyval.params), (yyvsp[(1) - (1)].op));
+		}
+    break;
+
+  case 78:
+
+/* Line 1455 of yacc.c  */
+#line 680 "rust-exp.y"
+    {
+		  VEC_safe_push (rust_op_ptr, *(yyvsp[(1) - (3)].params), (yyvsp[(3) - (3)].op));
+		  (yyval.params) = (yyvsp[(1) - (3)].params);
+		}
+    break;
+
+  case 79:
+
+/* Line 1455 of yacc.c  */
+#line 688 "rust-exp.y"
+    {
+		  /* The result can't be NULL.  */
+		  (yyval.params) = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+		  make_cleanup (VEC_cleanup (rust_op_ptr), (yyval.params));
+		}
+    break;
+
+  case 80:
+
+/* Line 1455 of yacc.c  */
+#line 694 "rust-exp.y"
+    { (yyval.params) = (yyvsp[(1) - (1)].params); }
+    break;
+
+  case 81:
+
+/* Line 1455 of yacc.c  */
+#line 701 "rust-exp.y"
+    { (yyval.params) = (yyvsp[(2) - (3)].params); }
+    break;
+
+  case 82:
+
+/* Line 1455 of yacc.c  */
+#line 706 "rust-exp.y"
+    { (yyval.op) = ast_call_ish (OP_FUNCALL, (yyvsp[(1) - (2)].op), (yyvsp[(2) - (2)].params)); }
+    break;
+
+  case 85:
+
+/* Line 1455 of yacc.c  */
+#line 716 "rust-exp.y"
+    { (yyval.depth) = 1; }
+    break;
+
+  case 86:
+
+/* Line 1455 of yacc.c  */
+#line 718 "rust-exp.y"
+    { (yyval.depth) = (yyvsp[(1) - (3)].depth) + 1; }
+    break;
+
+  case 87:
+
+/* Line 1455 of yacc.c  */
+#line 723 "rust-exp.y"
+    { (yyval.op) = (yyvsp[(1) - (1)].op); }
+    break;
+
+  case 88:
+
+/* Line 1455 of yacc.c  */
+#line 725 "rust-exp.y"
+    { (yyval.op) = ast_path ((yyvsp[(1) - (1)].sval), NULL); }
+    break;
+
+  case 89:
+
+/* Line 1455 of yacc.c  */
+#line 727 "rust-exp.y"
+    { (yyval.op) = ast_path (make_stoken ("self"), NULL); }
+    break;
+
+  case 91:
+
+/* Line 1455 of yacc.c  */
+#line 733 "rust-exp.y"
+    { (yyval.op) = super_name ((yyvsp[(3) - (3)].op), 0); }
+    break;
+
+  case 92:
+
+/* Line 1455 of yacc.c  */
+#line 735 "rust-exp.y"
+    { (yyval.op) = super_name ((yyvsp[(3) - (3)].op), (yyvsp[(2) - (3)].depth)); }
+    break;
+
+  case 93:
+
+/* Line 1455 of yacc.c  */
+#line 737 "rust-exp.y"
+    { (yyval.op) = crate_name ((yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 94:
+
+/* Line 1455 of yacc.c  */
+#line 739 "rust-exp.y"
+    {
+		  /* This is a gdb extension to make it possible to
+		     refer to items in other crates.  It just bypasses
+		     adding the current crate to the front of the
+		     name.  */
+		  (yyval.op) = ast_path (rust_concat3 ("::", (yyvsp[(2) - (2)].op)->left.sval.ptr, NULL),
+				 (yyvsp[(2) - (2)].op)->right.params);
+		}
+    break;
+
+  case 95:
+
+/* Line 1455 of yacc.c  */
+#line 751 "rust-exp.y"
+    { (yyval.op) = ast_path ((yyvsp[(1) - (1)].sval), NULL); }
+    break;
+
+  case 96:
+
+/* Line 1455 of yacc.c  */
+#line 753 "rust-exp.y"
+    {
+		  (yyval.op) = ast_path (rust_concat3 ((yyvsp[(1) - (3)].op)->left.sval.ptr, "::",
+					       (yyvsp[(3) - (3)].sval).ptr),
+				 NULL);
+		}
+    break;
+
+  case 97:
+
+/* Line 1455 of yacc.c  */
+#line 759 "rust-exp.y"
+    { (yyval.op) = ast_path ((yyvsp[(1) - (5)].op)->left.sval, (yyvsp[(4) - (5)].params)); }
+    break;
+
+  case 98:
+
+/* Line 1455 of yacc.c  */
+#line 761 "rust-exp.y"
+    {
+		  (yyval.op) = ast_path ((yyvsp[(1) - (5)].op)->left.sval, (yyvsp[(4) - (5)].params));
+		  rust_push_back ('>');
+		}
+    break;
+
+  case 100:
+
+/* Line 1455 of yacc.c  */
+#line 770 "rust-exp.y"
+    { (yyval.op) = super_name ((yyvsp[(3) - (3)].op), 0); }
+    break;
+
+  case 101:
+
+/* Line 1455 of yacc.c  */
+#line 772 "rust-exp.y"
+    { (yyval.op) = super_name ((yyvsp[(3) - (3)].op), (yyvsp[(2) - (3)].depth)); }
+    break;
+
+  case 102:
+
+/* Line 1455 of yacc.c  */
+#line 774 "rust-exp.y"
+    { (yyval.op) = crate_name ((yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 103:
+
+/* Line 1455 of yacc.c  */
+#line 776 "rust-exp.y"
+    {
+		  /* This is a gdb extension to make it possible to
+		     refer to items in other crates.  It just bypasses
+		     adding the current crate to the front of the
+		     name.  */
+		  (yyval.op) = ast_path (rust_concat3 ("::", (yyvsp[(2) - (2)].op)->left.sval.ptr, NULL),
+				 (yyvsp[(2) - (2)].op)->right.params);
+		}
+    break;
+
+  case 104:
+
+/* Line 1455 of yacc.c  */
+#line 788 "rust-exp.y"
+    { (yyval.op) = ast_path ((yyvsp[(1) - (1)].sval), NULL); }
+    break;
+
+  case 105:
+
+/* Line 1455 of yacc.c  */
+#line 790 "rust-exp.y"
+    {
+		  (yyval.op) = ast_path (rust_concat3 ((yyvsp[(1) - (3)].op)->left.sval.ptr, "::",
+					       (yyvsp[(3) - (3)].sval).ptr),
+				 NULL);
+		}
+    break;
+
+  case 107:
+
+/* Line 1455 of yacc.c  */
+#line 800 "rust-exp.y"
+    { (yyval.op) = ast_path ((yyvsp[(1) - (4)].op)->left.sval, (yyvsp[(3) - (4)].params)); }
+    break;
+
+  case 108:
+
+/* Line 1455 of yacc.c  */
+#line 802 "rust-exp.y"
+    {
+		  (yyval.op) = ast_path ((yyvsp[(1) - (4)].op)->left.sval, (yyvsp[(3) - (4)].params));
+		  rust_push_back ('>');
+		}
+    break;
+
+  case 110:
+
+/* Line 1455 of yacc.c  */
+#line 811 "rust-exp.y"
+    { (yyval.op) = ast_array_type ((yyvsp[(2) - (5)].op), (yyvsp[(4) - (5)].typed_val_int)); }
+    break;
+
+  case 111:
+
+/* Line 1455 of yacc.c  */
+#line 813 "rust-exp.y"
+    { (yyval.op) = ast_array_type ((yyvsp[(2) - (5)].op), (yyvsp[(4) - (5)].typed_val_int)); }
+    break;
+
+  case 112:
+
+/* Line 1455 of yacc.c  */
+#line 815 "rust-exp.y"
+    { (yyval.op) = ast_slice_type ((yyvsp[(3) - (4)].op)); }
+    break;
+
+  case 113:
+
+/* Line 1455 of yacc.c  */
+#line 817 "rust-exp.y"
+    { (yyval.op) = ast_reference_type ((yyvsp[(2) - (2)].op)); }
+    break;
+
+  case 114:
+
+/* Line 1455 of yacc.c  */
+#line 819 "rust-exp.y"
+    { (yyval.op) = ast_pointer_type ((yyvsp[(3) - (3)].op), 1); }
+    break;
+
+  case 115:
+
+/* Line 1455 of yacc.c  */
+#line 821 "rust-exp.y"
+    { (yyval.op) = ast_pointer_type ((yyvsp[(3) - (3)].op), 0); }
+    break;
+
+  case 116:
+
+/* Line 1455 of yacc.c  */
+#line 823 "rust-exp.y"
+    { (yyval.op) = ast_function_type ((yyvsp[(6) - (6)].op), (yyvsp[(3) - (6)].params)); }
+    break;
+
+  case 117:
+
+/* Line 1455 of yacc.c  */
+#line 825 "rust-exp.y"
+    { (yyval.op) = ast_tuple_type ((yyvsp[(2) - (3)].params)); }
+    break;
+
+  case 118:
+
+/* Line 1455 of yacc.c  */
+#line 830 "rust-exp.y"
+    { (yyval.params) = NULL; }
+    break;
+
+  case 119:
+
+/* Line 1455 of yacc.c  */
+#line 832 "rust-exp.y"
+    { (yyval.params) = (yyvsp[(1) - (1)].params); }
+    break;
+
+  case 120:
+
+/* Line 1455 of yacc.c  */
+#line 837 "rust-exp.y"
+    {
+		  VEC (rust_op_ptr) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+
+		  make_cleanup (VEC_cleanup (rust_op_ptr), result);
+		  VEC_safe_push (rust_op_ptr, *result, (yyvsp[(1) - (1)].op));
+		  (yyval.params) = result;
+		}
+    break;
+
+  case 121:
+
+/* Line 1455 of yacc.c  */
+#line 846 "rust-exp.y"
+    {
+		  VEC_safe_push (rust_op_ptr, *(yyvsp[(1) - (3)].params), (yyvsp[(3) - (3)].op));
+		  (yyval.params) = (yyvsp[(1) - (3)].params);
+		}
+    break;
+
+
+
+/* Line 1455 of yacc.c  */
+#line 2819 "rust-exp.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (yymsg);
+	  }
+	else
+	  {
+	    yyerror (YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+/* Line 1675 of yacc.c  */
+#line 852 "rust-exp.y"
+
+
+/* A struct of this type is used to describe a token.  */
+
+struct token_info
+{
+  const char *name;
+  int value;
+  enum exp_opcode opcode;
+};
+
+/* Identifier tokens.  */
+
+static const struct token_info identifier_tokens[] =
+{
+  { "as", KW_AS, OP_NULL },
+  { "false", KW_FALSE, OP_NULL },
+  { "if", 0, OP_NULL },
+  { "mut", KW_MUT, OP_NULL },
+  { "const", KW_CONST, OP_NULL },
+  { "self", KW_SELF, OP_NULL },
+  { "super", KW_SUPER, OP_NULL },
+  { "true", KW_TRUE, OP_NULL },
+  { "extern", KW_EXTERN, OP_NULL },
+  { "fn", KW_FN, OP_NULL },
+  { "sizeof", KW_SIZEOF, OP_NULL },
+};
+
+/* Operator tokens, sorted longest first.  */
+
+static const struct token_info operator_tokens[] =
+{
+  { ">>=", COMPOUND_ASSIGN, BINOP_RSH },
+  { "<<=", COMPOUND_ASSIGN, BINOP_LSH },
+
+  { "<<", LSH, OP_NULL },
+  { ">>", RSH, OP_NULL },
+  { "&&", ANDAND, OP_NULL },
+  { "||", OROR, OP_NULL },
+  { "==", EQEQ, OP_NULL },
+  { "!=", NOTEQ, OP_NULL },
+  { "<=", LTEQ, OP_NULL },
+  { ">=", GTEQ, OP_NULL },
+  { "+=", COMPOUND_ASSIGN, BINOP_ADD },
+  { "-=", COMPOUND_ASSIGN, BINOP_SUB },
+  { "*=", COMPOUND_ASSIGN, BINOP_MUL },
+  { "/=", COMPOUND_ASSIGN, BINOP_DIV },
+  { "%=", COMPOUND_ASSIGN, BINOP_REM },
+  { "&=", COMPOUND_ASSIGN, BINOP_BITWISE_AND },
+  { "|=", COMPOUND_ASSIGN, BINOP_BITWISE_IOR },
+  { "^=", COMPOUND_ASSIGN, BINOP_BITWISE_XOR },
+
+  { "::", COLONCOLON, OP_NULL },
+  { "..", DOTDOT, OP_NULL },
+  { "->", ARROW, OP_NULL }
+};
+
+/* Helper function to copy to the name obstack.  */
+
+static const char *
+rust_copy_name (const char *name, int len)
+{
+  return (const char *) obstack_copy0 (&work_obstack, name, len);
+}
+
+/* Helper function to make an stoken from a C string.  */
+
+static struct stoken
+make_stoken (const char *p)
+{
+  struct stoken result;
+
+  result.ptr = p;
+  result.length = strlen (result.ptr);
+  return result;
+}
+
+/* Helper function to concatenate three strings on the name
+   obstack.  */
+
+static struct stoken
+rust_concat3 (const char *s1, const char *s2, const char *s3)
+{
+  return make_stoken (obconcat (&work_obstack, s1, s2, s3, (char *) NULL));
+}
+
+/* Return an AST node referring to NAME, but relative to the crate's
+   name.  */
+
+static const struct rust_op *
+crate_name (const struct rust_op *name)
+{
+  std::string crate = rust_crate_for_block (expression_context_block);
+  struct stoken result;
+
+  gdb_assert (name->opcode == OP_VAR_VALUE);
+
+  if (crate.empty ())
+    error (_("Could not find crate for current location"));
+  result = make_stoken (obconcat (&work_obstack, "::", crate.c_str (), "::",
+				  name->left.sval.ptr, (char *) NULL));
+
+  return ast_path (result, name->right.params);
+}
+
+/* Create an AST node referring to a "super::" qualified name.  IDENT
+   is the base name and N_SUPERS is how many "super::"s were
+   provided.  N_SUPERS can be zero.  */
+
+static const struct rust_op *
+super_name (const struct rust_op *ident, unsigned int n_supers)
+{
+  const char *scope = block_scope (expression_context_block);
+  int offset;
+
+  gdb_assert (ident->opcode == OP_VAR_VALUE);
+
+  if (scope[0] == '\0')
+    error (_("Couldn't find namespace scope for self::"));
+
+  if (n_supers > 0)
+    {
+      int i;
+      int len;
+      std::vector<int> offsets;
+      unsigned int current_len;
+
+      current_len = cp_find_first_component (scope);
+      while (scope[current_len] != '\0')
+	{
+	  offsets.push_back (current_len);
+	  gdb_assert (scope[current_len] == ':');
+	  /* The "::".  */
+	  current_len += 2;
+	  current_len += cp_find_first_component (scope
+						  + current_len);
+	}
+
+      len = offsets.size ();
+      if (n_supers >= len)
+	error (_("Too many super:: uses from '%s'"), scope);
+
+      offset = offsets[len - n_supers];
+    }
+  else
+    offset = strlen (scope);
+
+  obstack_grow (&work_obstack, "::", 2);
+  obstack_grow (&work_obstack, scope, offset);
+  obstack_grow (&work_obstack, "::", 2);
+  obstack_grow0 (&work_obstack, ident->left.sval.ptr, ident->left.sval.length);
+
+  return ast_path (make_stoken ((const char *) obstack_finish (&work_obstack)),
+		   ident->right.params);
+}
+
+/* A helper that updates innermost_block as appropriate.  */
+
+static void
+update_innermost_block (struct block_symbol sym)
+{
+  if (symbol_read_needs_frame (sym.symbol)
+      && (innermost_block == NULL
+	  || contained_in (sym.block, innermost_block)))
+    innermost_block = sym.block;
+}
+
+/* A helper to look up a Rust type, or fail.  This only works for
+   types defined by rust_language_arch_info.  */
+
+static struct type *
+rust_type (const char *name)
+{
+  struct type *type;
+
+  /* When unit testing, we don't bother checking the types, so avoid a
+     possibly-failing lookup here.  */
+  if (unit_testing)
+    return NULL;
+
+  type = language_lookup_primitive_type (parse_language (pstate),
+					 parse_gdbarch (pstate),
+					 name);
+  if (type == NULL)
+    error (_("Could not find Rust type %s"), name);
+  return type;
+}
+
+/* Lex a hex number with at least MIN digits and at most MAX
+   digits.  */
+
+static uint32_t
+lex_hex (int min, int max)
+{
+  uint32_t result = 0;
+  int len = 0;
+  /* We only want to stop at MAX if we're lexing a byte escape.  */
+  int check_max = min == max;
+
+  while ((check_max ? len <= max : 1)
+	 && ((lexptr[0] >= 'a' && lexptr[0] <= 'f')
+	     || (lexptr[0] >= 'A' && lexptr[0] <= 'F')
+	     || (lexptr[0] >= '0' && lexptr[0] <= '9')))
+    {
+      result *= 16;
+      if (lexptr[0] >= 'a' && lexptr[0] <= 'f')
+	result = result + 10 + lexptr[0] - 'a';
+      else if (lexptr[0] >= 'A' && lexptr[0] <= 'F')
+	result = result + 10 + lexptr[0] - 'A';
+      else
+	result = result + lexptr[0] - '0';
+      ++lexptr;
+      ++len;
+    }
+
+  if (len < min)
+    error (_("Not enough hex digits seen"));
+  if (len > max)
+    {
+      gdb_assert (min != max);
+      error (_("Overlong hex escape"));
+    }
+
+  return result;
+}
+
+/* Lex an escape.  IS_BYTE is true if we're lexing a byte escape;
+   otherwise we're lexing a character escape.  */
+
+static uint32_t
+lex_escape (int is_byte)
+{
+  uint32_t result;
+
+  gdb_assert (lexptr[0] == '\\');
+  ++lexptr;
+  switch (lexptr[0])
+    {
+    case 'x':
+      ++lexptr;
+      result = lex_hex (2, 2);
+      break;
+
+    case 'u':
+      if (is_byte)
+	error (_("Unicode escape in byte literal"));
+      ++lexptr;
+      if (lexptr[0] != '{')
+	error (_("Missing '{' in Unicode escape"));
+      ++lexptr;
+      result = lex_hex (1, 6);
+      /* Could do range checks here.  */
+      if (lexptr[0] != '}')
+	error (_("Missing '}' in Unicode escape"));
+      ++lexptr;
+      break;
+
+    case 'n':
+      result = '\n';
+      ++lexptr;
+      break;
+    case 'r':
+      result = '\r';
+      ++lexptr;
+      break;
+    case 't':
+      result = '\t';
+      ++lexptr;
+      break;
+    case '\\':
+      result = '\\';
+      ++lexptr;
+      break;
+    case '0':
+      result = '\0';
+      ++lexptr;
+      break;
+    case '\'':
+      result = '\'';
+      ++lexptr;
+      break;
+    case '"':
+      result = '"';
+      ++lexptr;
+      break;
+
+    default:
+      error (_("Invalid escape \\%c in literal"), lexptr[0]);
+    }
+
+  return result;
+}
+
+/* Lex a character constant.  */
+
+static int
+lex_character (void)
+{
+  int is_byte = 0;
+  uint32_t value;
+
+  if (lexptr[0] == 'b')
+    {
+      is_byte = 1;
+      ++lexptr;
+    }
+  gdb_assert (lexptr[0] == '\'');
+  ++lexptr;
+  /* This should handle UTF-8 here.  */
+  if (lexptr[0] == '\\')
+    value = lex_escape (is_byte);
+  else
+    {
+      value = lexptr[0] & 0xff;
+      ++lexptr;
+    }
+
+  if (lexptr[0] != '\'')
+    error (_("Unterminated character literal"));
+  ++lexptr;
+
+  rustyylval.typed_val_int.val = value;
+  rustyylval.typed_val_int.type = rust_type (is_byte ? "u8" : "char");
+
+  return INTEGER;
+}
+
+/* Return the offset of the double quote if STR looks like the start
+   of a raw string, or 0 if STR does not start a raw string.  */
+
+static int
+starts_raw_string (const char *str)
+{
+  const char *save = str;
+
+  if (str[0] != 'r')
+    return 0;
+  ++str;
+  while (str[0] == '#')
+    ++str;
+  if (str[0] == '"')
+    return str - save;
+  return 0;
+}
+
+/* Return true if STR looks like the end of a raw string that had N
+   hashes at the start.  */
+
+static bool
+ends_raw_string (const char *str, int n)
+{
+  int i;
+
+  gdb_assert (str[0] == '"');
+  for (i = 0; i < n; ++i)
+    if (str[i + 1] != '#')
+      return false;
+  return true;
+}
+
+/* Lex a string constant.  */
+
+static int
+lex_string (void)
+{
+  int is_byte = lexptr[0] == 'b';
+  int raw_length;
+  int len_in_chars = 0;
+
+  if (is_byte)
+    ++lexptr;
+  raw_length = starts_raw_string (lexptr);
+  lexptr += raw_length;
+  gdb_assert (lexptr[0] == '"');
+  ++lexptr;
+
+  while (1)
+    {
+      uint32_t value;
+
+      if (raw_length > 0)
+	{
+	  if (lexptr[0] == '"' && ends_raw_string (lexptr, raw_length - 1))
+	    {
+	      /* Exit with lexptr pointing after the final "#".  */
+	      lexptr += raw_length;
+	      break;
+	    }
+	  else if (lexptr[0] == '\0')
+	    error (_("Unexpected EOF in string"));
+
+	  value = lexptr[0] & 0xff;
+	  if (is_byte && value > 127)
+	    error (_("Non-ASCII value in raw byte string"));
+	  obstack_1grow (&work_obstack, value);
+
+	  ++lexptr;
+	}
+      else if (lexptr[0] == '"')
+	{
+	  /* Make sure to skip the quote.  */
+	  ++lexptr;
+	  break;
+	}
+      else if (lexptr[0] == '\\')
+	{
+	  value = lex_escape (is_byte);
+
+	  if (is_byte)
+	    obstack_1grow (&work_obstack, value);
+	  else
+	    convert_between_encodings ("UTF-32", "UTF-8", (gdb_byte *) &value,
+				       sizeof (value), sizeof (value),
+				       &work_obstack, translit_none);
+	}
+      else if (lexptr[0] == '\0')
+	error (_("Unexpected EOF in string"));
+      else
+	{
+	  value = lexptr[0] & 0xff;
+	  if (is_byte && value > 127)
+	    error (_("Non-ASCII value in byte string"));
+	  obstack_1grow (&work_obstack, value);
+	  ++lexptr;
+	}
+    }
+
+  rustyylval.sval.length = obstack_object_size (&work_obstack);
+  rustyylval.sval.ptr = (const char *) obstack_finish (&work_obstack);
+  return is_byte ? BYTESTRING : STRING;
+}
+
+/* Return true if STRING starts with whitespace followed by a digit.  */
+
+static bool
+space_then_number (const char *string)
+{
+  const char *p = string;
+
+  while (p[0] == ' ' || p[0] == '\t')
+    ++p;
+  if (p == string)
+    return false;
+
+  return *p >= '0' && *p <= '9';
+}
+
+/* Return true if C can start an identifier.  */
+
+static bool
+rust_identifier_start_p (char c)
+{
+  return ((c >= 'a' && c <= 'z')
+	  || (c >= 'A' && c <= 'Z')
+	  || c == '_'
+	  || c == '$');
+}
+
+/* Lex an identifier.  */
+
+static int
+lex_identifier (void)
+{
+  const char *start = lexptr;
+  unsigned int length;
+  const struct token_info *token;
+  int i;
+  int is_gdb_var = lexptr[0] == '$';
+
+  gdb_assert (rust_identifier_start_p (lexptr[0]));
+
+  ++lexptr;
+
+  /* For the time being this doesn't handle Unicode rules.  Non-ASCII
+     identifiers are gated anyway.  */
+  while ((lexptr[0] >= 'a' && lexptr[0] <= 'z')
+	 || (lexptr[0] >= 'A' && lexptr[0] <= 'Z')
+	 || lexptr[0] == '_'
+	 || (is_gdb_var && lexptr[0] == '$')
+	 || (lexptr[0] >= '0' && lexptr[0] <= '9'))
+    ++lexptr;
+
+
+  length = lexptr - start;
+  token = NULL;
+  for (i = 0; i < ARRAY_SIZE (identifier_tokens); ++i)
+    {
+      if (length == strlen (identifier_tokens[i].name)
+	  && strncmp (identifier_tokens[i].name, start, length) == 0)
+	{
+	  token = &identifier_tokens[i];
+	  break;
+	}
+    }
+
+  if (token != NULL)
+    {
+      if (token->value == 0)
+	{
+	  /* Leave the terminating token alone.  */
+	  lexptr = start;
+	  return 0;
+	}
+    }
+  else if (token == NULL
+	   && (strncmp (start, "thread", length) == 0
+	       || strncmp (start, "task", length) == 0)
+	   && space_then_number (lexptr))
+    {
+      /* "task" or "thread" followed by a number terminates the
+	 parse, per gdb rules.  */
+      lexptr = start;
+      return 0;
+    }
+
+  if (token == NULL || (parse_completion && lexptr[0] == '\0'))
+    rustyylval.sval = make_stoken (rust_copy_name (start, length));
+
+  if (parse_completion && lexptr[0] == '\0')
+    {
+      /* Prevent rustyylex from returning two COMPLETE tokens.  */
+      prev_lexptr = lexptr;
+      return COMPLETE;
+    }
+
+  if (token != NULL)
+    return token->value;
+  if (is_gdb_var)
+    return GDBVAR;
+  return IDENT;
+}
+
+/* Lex an operator.  */
+
+static int
+lex_operator (void)
+{
+  const struct token_info *token = NULL;
+  int i;
+
+  for (i = 0; i < ARRAY_SIZE (operator_tokens); ++i)
+    {
+      if (strncmp (operator_tokens[i].name, lexptr,
+		   strlen (operator_tokens[i].name)) == 0)
+	{
+	  lexptr += strlen (operator_tokens[i].name);
+	  token = &operator_tokens[i];
+	  break;
+	}
+    }
+
+  if (token != NULL)
+    {
+      rustyylval.opcode = token->opcode;
+      return token->value;
+    }
+
+  return *lexptr++;
+}
+
+/* Lex a number.  */
+
+static int
+lex_number (void)
+{
+  regmatch_t subexps[NUM_SUBEXPRESSIONS];
+  int match;
+  int is_integer = 0;
+  int could_be_decimal = 1;
+  int implicit_i32 = 0;
+  const char *type_name = NULL;
+  struct type *type;
+  int end_index;
+  int type_index = -1;
+  int i;
+
+  match = regexec (&number_regex, lexptr, ARRAY_SIZE (subexps), subexps, 0);
+  /* Failure means the regexp is broken.  */
+  gdb_assert (match == 0);
+
+  if (subexps[INT_TEXT].rm_so != -1)
+    {
+      /* Integer part matched.  */
+      is_integer = 1;
+      end_index = subexps[INT_TEXT].rm_eo;
+      if (subexps[INT_TYPE].rm_so == -1)
+	{
+	  type_name = "i32";
+	  implicit_i32 = 1;
+	}
+      else
+	{
+	  type_index = INT_TYPE;
+	  could_be_decimal = 0;
+	}
+    }
+  else if (subexps[FLOAT_TYPE1].rm_so != -1)
+    {
+      /* Found floating point type suffix.  */
+      end_index = subexps[FLOAT_TYPE1].rm_so;
+      type_index = FLOAT_TYPE1;
+    }
+  else if (subexps[FLOAT_TYPE2].rm_so != -1)
+    {
+      /* Found floating point type suffix.  */
+      end_index = subexps[FLOAT_TYPE2].rm_so;
+      type_index = FLOAT_TYPE2;
+    }
+  else
+    {
+      /* Any other floating point match.  */
+      end_index = subexps[0].rm_eo;
+      type_name = "f64";
+    }
+
+  /* We need a special case if the final character is ".".  In this
+     case we might need to parse an integer.  For example, "23.f()" is
+     a request for a trait method call, not a syntax error involving
+     the floating point number "23.".  */
+  gdb_assert (subexps[0].rm_eo > 0);
+  if (lexptr[subexps[0].rm_eo - 1] == '.')
+    {
+      const char *next = skip_spaces_const (&lexptr[subexps[0].rm_eo]);
+
+      if (rust_identifier_start_p (*next) || *next == '.')
+	{
+	  --subexps[0].rm_eo;
+	  is_integer = 1;
+	  end_index = subexps[0].rm_eo;
+	  type_name = "i32";
+	  could_be_decimal = 1;
+	  implicit_i32 = 1;
+	}
+    }
+
+  /* Compute the type name if we haven't already.  */
+  std::string type_name_holder;
+  if (type_name == NULL)
+    {
+      gdb_assert (type_index != -1);
+      type_name_holder = std::string (lexptr + subexps[type_index].rm_so,
+				      (subexps[type_index].rm_eo
+				       - subexps[type_index].rm_so));
+      type_name = type_name_holder.c_str ();
+    }
+
+  /* Look up the type.  */
+  type = rust_type (type_name);
+
+  /* Copy the text of the number and remove the "_"s.  */
+  std::string number;
+  for (i = 0; i < end_index && lexptr[i]; ++i)
+    {
+      if (lexptr[i] == '_')
+	could_be_decimal = 0;
+      else
+	number.push_back (lexptr[i]);
+    }
+
+  /* Advance past the match.  */
+  lexptr += subexps[0].rm_eo;
+
+  /* Parse the number.  */
+  if (is_integer)
+    {
+      uint64_t value;
+      int radix = 10;
+      int offset = 0;
+
+      if (number[0] == '0')
+	{
+	  if (number[1] == 'x')
+	    radix = 16;
+	  else if (number[1] == 'o')
+	    radix = 8;
+	  else if (number[1] == 'b')
+	    radix = 2;
+	  if (radix != 10)
+	    {
+	      offset = 2;
+	      could_be_decimal = 0;
+	    }
+	}
+
+      value = strtoul (number.c_str () + offset, NULL, radix);
+      if (implicit_i32 && value >= ((uint64_t) 1) << 31)
+	type = rust_type ("i64");
+
+      rustyylval.typed_val_int.val = value;
+      rustyylval.typed_val_int.type = type;
+    }
+  else
+    {
+      rustyylval.typed_val_float.dval = strtod (number.c_str (), NULL);
+      rustyylval.typed_val_float.type = type;
+    }
+
+  return is_integer ? (could_be_decimal ? DECIMAL_INTEGER : INTEGER) : FLOAT;
+}
+
+/* The lexer.  */
+
+static int
+rustyylex (void)
+{
+  /* Skip all leading whitespace.  */
+  while (lexptr[0] == ' ' || lexptr[0] == '\t' || lexptr[0] == '\r'
+	 || lexptr[0] == '\n')
+    ++lexptr;
+
+  /* If we hit EOF and we're completing, then return COMPLETE -- maybe
+     we're completing an empty string at the end of a field_expr.
+     But, we don't want to return two COMPLETE tokens in a row.  */
+  if (lexptr[0] == '\0' && lexptr == prev_lexptr)
+    return 0;
+  prev_lexptr = lexptr;
+  if (lexptr[0] == '\0')
+    {
+      if (parse_completion)
+	{
+	  rustyylval.sval = make_stoken ("");
+	  return COMPLETE;
+	}
+      return 0;
+    }
+
+  if (lexptr[0] >= '0' && lexptr[0] <= '9')
+    return lex_number ();
+  else if (lexptr[0] == 'b' && lexptr[1] == '\'')
+    return lex_character ();
+  else if (lexptr[0] == 'b' && lexptr[1] == '"')
+    return lex_string ();
+  else if (lexptr[0] == 'b' && starts_raw_string (lexptr + 1))
+    return lex_string ();
+  else if (starts_raw_string (lexptr))
+    return lex_string ();
+  else if (rust_identifier_start_p (lexptr[0]))
+    return lex_identifier ();
+  else if (lexptr[0] == '"')
+    return lex_string ();
+  else if (lexptr[0] == '\'')
+    return lex_character ();
+  else if (lexptr[0] == '}' || lexptr[0] == ']')
+    {
+      /* Falls through to lex_operator.  */
+      --paren_depth;
+    }
+  else if (lexptr[0] == '(' || lexptr[0] == '{')
+    {
+      /* Falls through to lex_operator.  */
+      ++paren_depth;
+    }
+  else if (lexptr[0] == ',' && comma_terminates && paren_depth == 0)
+    return 0;
+
+  return lex_operator ();
+}
+
+/* Push back a single character to be re-lexed.  */
+
+static void
+rust_push_back (char c)
+{
+  /* Can't be called before any lexing.  */
+  gdb_assert (prev_lexptr != NULL);
+
+  --lexptr;
+  gdb_assert (*lexptr == c);
+}
+
+
+
+/* Make an arbitrary operation and fill in the fields.  */
+
+static const struct rust_op *
+ast_operation (enum exp_opcode opcode, const struct rust_op *left,
+		const struct rust_op *right)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->left.op = left;
+  result->right.op = right;
+
+  return result;
+}
+
+/* Make a compound assignment operation.  */
+
+static const struct rust_op *
+ast_compound_assignment (enum exp_opcode opcode, const struct rust_op *left,
+			  const struct rust_op *right)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->compound_assignment = 1;
+  result->left.op = left;
+  result->right.op = right;
+
+  return result;
+}
+
+/* Make a typed integer literal operation.  */
+
+static const struct rust_op *
+ast_literal (struct typed_val_int val)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_LONG;
+  result->left.typed_val_int = val;
+
+  return result;
+}
+
+/* Make a typed floating point literal operation.  */
+
+static const struct rust_op *
+ast_dliteral (struct typed_val_float val)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_DOUBLE;
+  result->left.typed_val_float = val;
+
+  return result;
+}
+
+/* Make a unary operation.  */
+
+static const struct rust_op *
+ast_unary (enum exp_opcode opcode, const struct rust_op *expr)
+{
+  return ast_operation (opcode, expr, NULL);
+}
+
+/* Make a cast operation.  */
+
+static const struct rust_op *
+ast_cast (const struct rust_op *expr, const struct rust_op *type)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = UNOP_CAST;
+  result->left.op = expr;
+  result->right.op = type;
+
+  return result;
+}
+
+/* Make a call-like operation.  This is nominally a function call, but
+   when lowering we may discover that it actually represents the
+   creation of a tuple struct.  */
+
+static const struct rust_op *
+ast_call_ish (enum exp_opcode opcode, const struct rust_op *expr,
+	       VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->left.op = expr;
+  result->right.params = params;
+
+  return result;
+}
+
+/* Make a structure creation operation.  */
+
+static const struct rust_op *
+ast_struct (const struct rust_op *name, VEC (set_field) **fields)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_AGGREGATE;
+  result->left.op = name;
+  result->right.field_inits = fields;
+
+  return result;
+}
+
+/* Make an identifier path.  */
+
+static const struct rust_op *
+ast_path (struct stoken path, VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_VAR_VALUE;
+  result->left.sval = path;
+  result->right.params = params;
+
+  return result;
+}
+
+/* Make a string constant operation.  */
+
+static const struct rust_op *
+ast_string (struct stoken str)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_STRING;
+  result->left.sval = str;
+
+  return result;
+}
+
+/* Make a field expression.  */
+
+static const struct rust_op *
+ast_structop (const struct rust_op *left, const char *name, int completing)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = STRUCTOP_STRUCT;
+  result->completing = completing;
+  result->left.op = left;
+  result->right.sval = make_stoken (name);
+
+  return result;
+}
+
+/* Make an anonymous struct operation, like 'x.0'.  */
+
+static const struct rust_op *
+ast_structop_anonymous (const struct rust_op *left,
+			 struct typed_val_int number)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = STRUCTOP_ANONYMOUS;
+  result->left.op = left;
+  result->right.typed_val_int = number;
+
+  return result;
+}
+
+/* Make a range operation.  */
+
+static const struct rust_op *
+ast_range (const struct rust_op *lhs, const struct rust_op *rhs)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_RANGE;
+  result->left.op = lhs;
+  result->right.op = rhs;
+
+  return result;
+}
+
+/* A helper function to make a type-related AST node.  */
+
+static struct rust_op *
+ast_basic_type (enum type_code typecode)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_TYPE;
+  result->typecode = typecode;
+  return result;
+}
+
+/* Create an AST node describing an array type.  */
+
+static const struct rust_op *
+ast_array_type (const struct rust_op *lhs, struct typed_val_int val)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_ARRAY);
+
+  result->left.op = lhs;
+  result->right.typed_val_int = val;
+  return result;
+}
+
+/* Create an AST node describing a reference type.  */
+
+static const struct rust_op *
+ast_slice_type (const struct rust_op *type)
+{
+  /* Use TYPE_CODE_COMPLEX just because it is handy.  */
+  struct rust_op *result = ast_basic_type (TYPE_CODE_COMPLEX);
+
+  result->left.op = type;
+  return result;
+}
+
+/* Create an AST node describing a reference type.  */
+
+static const struct rust_op *
+ast_reference_type (const struct rust_op *type)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_REF);
+
+  result->left.op = type;
+  return result;
+}
+
+/* Create an AST node describing a pointer type.  */
+
+static const struct rust_op *
+ast_pointer_type (const struct rust_op *type, int is_mut)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_PTR);
+
+  result->left.op = type;
+  /* For the time being we ignore is_mut.  */
+  return result;
+}
+
+/* Create an AST node describing a function type.  */
+
+static const struct rust_op *
+ast_function_type (const struct rust_op *rtype, VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_FUNC);
+
+  result->left.op = rtype;
+  result->right.params = params;
+  return result;
+}
+
+/* Create an AST node describing a tuple type.  */
+
+static const struct rust_op *
+ast_tuple_type (VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_STRUCT);
+
+  result->left.params = params;
+  return result;
+}
+
+/* A helper to appropriately munge NAME and BLOCK depending on the
+   presence of a leading "::".  */
+
+static void
+munge_name_and_block (const char **name, const struct block **block)
+{
+  /* If it is a global reference, skip the current block in favor of
+     the static block.  */
+  if (strncmp (*name, "::", 2) == 0)
+    {
+      *name += 2;
+      *block = block_static_block (*block);
+    }
+}
+
+/* Like lookup_symbol, but handles Rust namespace conventions, and
+   doesn't require field_of_this_result.  */
+
+static struct block_symbol
+rust_lookup_symbol (const char *name, const struct block *block,
+		    const domain_enum domain)
+{
+  struct block_symbol result;
+
+  munge_name_and_block (&name, &block);
+
+  result = lookup_symbol (name, block, domain, NULL);
+  if (result.symbol != NULL)
+    update_innermost_block (result);
+  return result;
+}
+
+/* Look up a type, following Rust namespace conventions.  */
+
+static struct type *
+rust_lookup_type (const char *name, const struct block *block)
+{
+  struct block_symbol result;
+  struct type *type;
+
+  munge_name_and_block (&name, &block);
+
+  result = lookup_symbol (name, block, STRUCT_DOMAIN, NULL);
+  if (result.symbol != NULL)
+    {
+      update_innermost_block (result);
+      return SYMBOL_TYPE (result.symbol);
+    }
+
+  type = lookup_typename (parse_language (pstate), parse_gdbarch (pstate),
+			  name, NULL, 1);
+  if (type != NULL)
+    return type;
+
+  /* Last chance, try a built-in type.  */
+  return language_lookup_primitive_type (parse_language (pstate),
+					 parse_gdbarch (pstate),
+					 name);
+}
+
+static struct type *convert_ast_to_type (struct parser_state *state,
+					 const struct rust_op *operation);
+static const char *convert_name (struct parser_state *state,
+				 const struct rust_op *operation);
+
+/* Convert a vector of rust_ops representing types to a vector of
+   types.  */
+
+static std::vector<struct type *>
+convert_params_to_types (struct parser_state *state, VEC (rust_op_ptr) *params)
+{
+  int i;
+  const struct rust_op *op;
+  std::vector<struct type *> result;
+
+  for (i = 0; VEC_iterate (rust_op_ptr, params, i, op); ++i)
+    result.push_back (convert_ast_to_type (state, op));
+
+  return result;
+}
+
+/* Convert a rust_op representing a type to a struct type *.  */
+
+static struct type *
+convert_ast_to_type (struct parser_state *state,
+		     const struct rust_op *operation)
+{
+  struct type *type, *result = NULL;
+
+  if (operation->opcode == OP_VAR_VALUE)
+    {
+      const char *varname = convert_name (state, operation);
+
+      result = rust_lookup_type (varname, expression_context_block);
+      if (result == NULL)
+	error (_("No typed name '%s' in current context"), varname);
+      return result;
+    }
+
+  gdb_assert (operation->opcode == OP_TYPE);
+
+  switch (operation->typecode)
+    {
+    case TYPE_CODE_ARRAY:
+      type = convert_ast_to_type (state, operation->left.op);
+      if (operation->right.typed_val_int.val < 0)
+	error (_("Negative array length"));
+      result = lookup_array_range_type (type, 0,
+					operation->right.typed_val_int.val - 1);
+      break;
+
+    case TYPE_CODE_COMPLEX:
+      {
+	struct type *usize = rust_type ("usize");
+
+	type = convert_ast_to_type (state, operation->left.op);
+	result = rust_slice_type ("&[*gdb*]", type, usize);
+      }
+      break;
+
+    case TYPE_CODE_REF:
+    case TYPE_CODE_PTR:
+      /* For now we treat &x and *x identically.  */
+      type = convert_ast_to_type (state, operation->left.op);
+      result = lookup_pointer_type (type);
+      break;
+
+    case TYPE_CODE_FUNC:
+      {
+	std::vector<struct type *> args
+	  (convert_params_to_types (state, *operation->right.params));
+	struct type **argtypes = NULL;
+
+	type = convert_ast_to_type (state, operation->left.op);
+	if (!args.empty ())
+	  argtypes = args.data ();
+
+	result
+	  = lookup_function_type_with_arguments (type, args.size (),
+						 argtypes);
+	result = lookup_pointer_type (result);
+      }
+      break;
+
+    case TYPE_CODE_STRUCT:
+      {
+	std::vector<struct type *> args
+	  (convert_params_to_types (state, *operation->left.params));
+	int i;
+	struct type *type;
+	const char *name;
+
+	obstack_1grow (&work_obstack, '(');
+	for (i = 0; i < args.size (); ++i)
+	  {
+	    std::string type_name = type_to_string (args[i]);
+
+	    if (i > 0)
+	      obstack_1grow (&work_obstack, ',');
+	    obstack_grow_str (&work_obstack, type_name.c_str ());
+	  }
+
+	obstack_grow_str0 (&work_obstack, ")");
+	name = (const char *) obstack_finish (&work_obstack);
+
+	/* We don't allow creating new tuple types (yet), but we do
+	   allow looking up existing tuple types.  */
+	result = rust_lookup_type (name, expression_context_block);
+	if (result == NULL)
+	  error (_("could not find tuple type '%s'"), name);
+      }
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled opcode in convert_ast_to_type");
+    }
+
+  gdb_assert (result != NULL);
+  return result;
+}
+
+/* A helper function to turn a rust_op representing a name into a full
+   name.  This applies generic arguments as needed.  The returned name
+   is allocated on the work obstack.  */
+
+static const char *
+convert_name (struct parser_state *state, const struct rust_op *operation)
+{
+  int i;
+
+  gdb_assert (operation->opcode == OP_VAR_VALUE);
+
+  if (operation->right.params == NULL)
+    return operation->left.sval.ptr;
+
+  std::vector<struct type *> types
+    (convert_params_to_types (state, *operation->right.params));
+
+  obstack_grow_str (&work_obstack, operation->left.sval.ptr);
+  obstack_1grow (&work_obstack, '<');
+  for (i = 0; i < types.size (); ++i)
+    {
+      std::string type_name = type_to_string (types[i]);
+
+      if (i > 0)
+	obstack_1grow (&work_obstack, ',');
+
+      obstack_grow_str (&work_obstack, type_name.c_str ());
+    }
+  obstack_grow_str0 (&work_obstack, ">");
+
+  return (const char *) obstack_finish (&work_obstack);
+}
+
+static void convert_ast_to_expression (struct parser_state *state,
+				       const struct rust_op *operation,
+				       const struct rust_op *top);
+
+/* A helper function that converts a vec of rust_ops to a gdb
+   expression.  */
+
+static void
+convert_params_to_expression (struct parser_state *state,
+			      VEC (rust_op_ptr) *params,
+			      const struct rust_op *top)
+{
+  int i;
+  rust_op_ptr elem;
+
+  for (i = 0; VEC_iterate (rust_op_ptr, params, i, elem); ++i)
+    convert_ast_to_expression (state, elem, top);
+}
+
+/* Lower a rust_op to a gdb expression.  STATE is the parser state.
+   OPERATION is the operation to lower.  TOP is a pointer to the
+   top-most operation; it is used to handle the special case where the
+   top-most expression is an identifier and can be optionally lowered
+   to OP_TYPE.  */
+
+static void
+convert_ast_to_expression (struct parser_state *state,
+			   const struct rust_op *operation,
+			   const struct rust_op *top)
+{
+  switch (operation->opcode)
+    {
+    case OP_LONG:
+      write_exp_elt_opcode (state, OP_LONG);
+      write_exp_elt_type (state, operation->left.typed_val_int.type);
+      write_exp_elt_longcst (state, operation->left.typed_val_int.val);
+      write_exp_elt_opcode (state, OP_LONG);
+      break;
+
+    case OP_DOUBLE:
+      write_exp_elt_opcode (state, OP_DOUBLE);
+      write_exp_elt_type (state, operation->left.typed_val_float.type);
+      write_exp_elt_dblcst (state, operation->left.typed_val_float.dval);
+      write_exp_elt_opcode (state, OP_DOUBLE);
+      break;
+
+    case STRUCTOP_STRUCT:
+      {
+	convert_ast_to_expression (state, operation->left.op, top);
+
+	if (operation->completing)
+	  mark_struct_expression (state);
+	write_exp_elt_opcode (state, STRUCTOP_STRUCT);
+	write_exp_string (state, operation->right.sval);
+	write_exp_elt_opcode (state, STRUCTOP_STRUCT);
+      }
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      {
+	convert_ast_to_expression (state, operation->left.op, top);
+
+	write_exp_elt_opcode (state, STRUCTOP_ANONYMOUS);
+	write_exp_elt_longcst (state, operation->right.typed_val_int.val);
+	write_exp_elt_opcode (state, STRUCTOP_ANONYMOUS);
+      }
+      break;
+
+    case UNOP_PLUS:
+    case UNOP_NEG:
+    case UNOP_COMPLEMENT:
+    case UNOP_IND:
+    case UNOP_ADDR:
+    case UNOP_SIZEOF:
+      convert_ast_to_expression (state, operation->left.op, top);
+      write_exp_elt_opcode (state, operation->opcode);
+      break;
+
+    case BINOP_SUBSCRIPT:
+    case BINOP_MUL:
+    case BINOP_REPEAT:
+    case BINOP_DIV:
+    case BINOP_REM:
+    case BINOP_LESS:
+    case BINOP_GTR:
+    case BINOP_BITWISE_AND:
+    case BINOP_BITWISE_IOR:
+    case BINOP_BITWISE_XOR:
+    case BINOP_ADD:
+    case BINOP_SUB:
+    case BINOP_LOGICAL_OR:
+    case BINOP_LOGICAL_AND:
+    case BINOP_EQUAL:
+    case BINOP_NOTEQUAL:
+    case BINOP_LEQ:
+    case BINOP_GEQ:
+    case BINOP_LSH:
+    case BINOP_RSH:
+    case BINOP_ASSIGN:
+    case OP_RUST_ARRAY:
+      convert_ast_to_expression (state, operation->left.op, top);
+      convert_ast_to_expression (state, operation->right.op, top);
+      if (operation->compound_assignment)
+	{
+	  write_exp_elt_opcode (state, BINOP_ASSIGN_MODIFY);
+	  write_exp_elt_opcode (state, operation->opcode);
+	  write_exp_elt_opcode (state, BINOP_ASSIGN_MODIFY);
+	}
+      else
+	write_exp_elt_opcode (state, operation->opcode);
+
+      if (operation->compound_assignment
+	  || operation->opcode == BINOP_ASSIGN)
+	{
+	  struct type *type;
+
+	  type = language_lookup_primitive_type (parse_language (state),
+						 parse_gdbarch (state),
+						 "()");
+
+	  write_exp_elt_opcode (state, OP_LONG);
+	  write_exp_elt_type (state, type);
+	  write_exp_elt_longcst (state, 0);
+	  write_exp_elt_opcode (state, OP_LONG);
+
+	  write_exp_elt_opcode (state, BINOP_COMMA);
+	}
+      break;
+
+    case UNOP_CAST:
+      {
+	struct type *type = convert_ast_to_type (state, operation->right.op);
+
+	convert_ast_to_expression (state, operation->left.op, top);
+	write_exp_elt_opcode (state, UNOP_CAST);
+	write_exp_elt_type (state, type);
+	write_exp_elt_opcode (state, UNOP_CAST);
+      }
+      break;
+
+    case OP_FUNCALL:
+      {
+	if (operation->left.op->opcode == OP_VAR_VALUE)
+	  {
+	    struct type *type;
+	    const char *varname = convert_name (state, operation->left.op);
+
+	    type = rust_lookup_type (varname, expression_context_block);
+	    if (type != NULL)
+	      {
+		/* This is actually a tuple struct expression, not a
+		   call expression.  */
+		rust_op_ptr elem;
+		int i;
+		VEC (rust_op_ptr) *params = *operation->right.params;
+
+		if (TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
+		  {
+		    if (!rust_tuple_struct_type_p (type))
+		      error (_("Type %s is not a tuple struct"), varname);
+
+		    for (i = 0;
+			 VEC_iterate (rust_op_ptr, params, i, elem);
+			 ++i)
+		      {
+			char *cell = get_print_cell ();
+
+			xsnprintf (cell, PRINT_CELL_SIZE, "__%d", i);
+			write_exp_elt_opcode (state, OP_NAME);
+			write_exp_string (state, make_stoken (cell));
+			write_exp_elt_opcode (state, OP_NAME);
+
+			convert_ast_to_expression (state, elem, top);
+		      }
+
+		    write_exp_elt_opcode (state, OP_AGGREGATE);
+		    write_exp_elt_type (state, type);
+		    write_exp_elt_longcst (state,
+					   2 * VEC_length (rust_op_ptr,
+							   params));
+		    write_exp_elt_opcode (state, OP_AGGREGATE);
+		    break;
+		  }
+	      }
+	  }
+	convert_ast_to_expression (state, operation->left.op, top);
+	convert_params_to_expression (state, *operation->right.params, top);
+	write_exp_elt_opcode (state, OP_FUNCALL);
+	write_exp_elt_longcst (state, VEC_length (rust_op_ptr,
+						  *operation->right.params));
+	write_exp_elt_longcst (state, OP_FUNCALL);
+      }
+      break;
+
+    case OP_ARRAY:
+      gdb_assert (operation->left.op == NULL);
+      convert_params_to_expression (state, *operation->right.params, top);
+      write_exp_elt_opcode (state, OP_ARRAY);
+      write_exp_elt_longcst (state, 0);
+      write_exp_elt_longcst (state, VEC_length (rust_op_ptr,
+						*operation->right.params) - 1);
+      write_exp_elt_longcst (state, OP_ARRAY);
+      break;
+
+    case OP_VAR_VALUE:
+      {
+	struct block_symbol sym;
+	const char *varname;
+
+	if (operation->left.sval.ptr[0] == '$')
+	  {
+	    write_dollar_variable (state, operation->left.sval);
+	    break;
+	  }
+
+	varname = convert_name (state, operation);
+	sym = rust_lookup_symbol (varname, expression_context_block,
+				  VAR_DOMAIN);
+	if (sym.symbol != NULL)
+	  {
+	    write_exp_elt_opcode (state, OP_VAR_VALUE);
+	    write_exp_elt_block (state, sym.block);
+	    write_exp_elt_sym (state, sym.symbol);
+	    write_exp_elt_opcode (state, OP_VAR_VALUE);
+	  }
+	else
+	  {
+	    struct type *type;
+
+	    type = rust_lookup_type (varname, expression_context_block);
+	    if (type == NULL)
+	      error (_("No symbol '%s' in current context"), varname);
+
+	    if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+		&& TYPE_NFIELDS (type) == 0)
+	      {
+		/* A unit-like struct.  */
+		write_exp_elt_opcode (state, OP_AGGREGATE);
+		write_exp_elt_type (state, type);
+		write_exp_elt_longcst (state, 0);
+		write_exp_elt_opcode (state, OP_AGGREGATE);
+	      }
+	    else if (operation == top)
+	      {
+		write_exp_elt_opcode (state, OP_TYPE);
+		write_exp_elt_type (state, type);
+		write_exp_elt_opcode (state, OP_TYPE);
+		break;
+	      }
+	  }
+      }
+      break;
+
+    case OP_AGGREGATE:
+      {
+	int i;
+	int length;
+	struct set_field *init;
+	VEC (set_field) *fields = *operation->right.field_inits;
+	struct type *type;
+	const char *name;
+
+	length = 0;
+	for (i = 0; VEC_iterate (set_field, fields, i, init); ++i)
+	  {
+	    if (init->name.ptr != NULL)
+	      {
+		write_exp_elt_opcode (state, OP_NAME);
+		write_exp_string (state, init->name);
+		write_exp_elt_opcode (state, OP_NAME);
+		++length;
+	      }
+
+	    convert_ast_to_expression (state, init->init, top);
+	    ++length;
+
+	    if (init->name.ptr == NULL)
+	      {
+		/* This is handled differently from Ada in our
+		   evaluator.  */
+		write_exp_elt_opcode (state, OP_OTHERS);
+	      }
+	  }
+
+	name = convert_name (state, operation->left.op);
+	type = rust_lookup_type (name, expression_context_block);
+	if (type == NULL)
+	  error (_("Could not find type '%s'"), operation->left.sval.ptr);
+
+	if (TYPE_CODE (type) != TYPE_CODE_STRUCT
+	    || rust_tuple_type_p (type)
+	    || rust_tuple_struct_type_p (type))
+	  error (_("Struct expression applied to non-struct type"));
+
+	write_exp_elt_opcode (state, OP_AGGREGATE);
+	write_exp_elt_type (state, type);
+	write_exp_elt_longcst (state, length);
+	write_exp_elt_opcode (state, OP_AGGREGATE);
+      }
+      break;
+
+    case OP_STRING:
+      {
+	write_exp_elt_opcode (state, OP_STRING);
+	write_exp_string (state, operation->left.sval);
+	write_exp_elt_opcode (state, OP_STRING);
+      }
+      break;
+
+    case OP_RANGE:
+      {
+	enum range_type kind = BOTH_BOUND_DEFAULT;
+
+	if (operation->left.op != NULL)
+	  {
+	    convert_ast_to_expression (state, operation->left.op, top);
+	    kind = HIGH_BOUND_DEFAULT;
+	  }
+	if (operation->right.op != NULL)
+	  {
+	    convert_ast_to_expression (state, operation->right.op, top);
+	    if (kind == BOTH_BOUND_DEFAULT)
+	      kind = LOW_BOUND_DEFAULT;
+	    else
+	      {
+		gdb_assert (kind == HIGH_BOUND_DEFAULT);
+		kind = NONE_BOUND_DEFAULT;
+	      }
+	  }
+	write_exp_elt_opcode (state, OP_RANGE);
+	write_exp_elt_longcst (state, kind);
+	write_exp_elt_opcode (state, OP_RANGE);
+      }
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled opcode in convert_ast_to_expression");
+    }
+}
+
+
+
+/* The parser as exposed to gdb.  */
+
+int
+rust_parse (struct parser_state *state)
+{
+  int result;
+  struct cleanup *cleanup;
+
+  obstack_init (&work_obstack);
+  cleanup = make_cleanup_obstack_free (&work_obstack);
+  rust_ast = NULL;
+
+  pstate = state;
+  result = rustyyparse ();
+
+  if (!result || (parse_completion && rust_ast != NULL))
+    {
+      const struct rust_op *ast = rust_ast;
+
+      rust_ast = NULL;
+      gdb_assert (ast != NULL);
+      convert_ast_to_expression (state, ast, ast);
+    }
+
+  do_cleanups (cleanup);
+  return result;
+}
+
+/* The parser error handler.  */
+
+void
+rustyyerror (char *msg)
+{
+  const char *where = prev_lexptr ? prev_lexptr : lexptr;
+  error (_("%s in expression, near `%s'."), (msg ? msg : "Error"), where);
+}
+
+
+
+#if GDB_SELF_TEST
+
+/* Initialize the lexer for testing.  */
+
+static void
+rust_lex_test_init (const char *input)
+{
+  prev_lexptr = NULL;
+  lexptr = input;
+  paren_depth = 0;
+}
+
+/* A test helper that lexes a string, expecting a single token.  It
+   returns the lexer data for this token.  */
+
+static RUSTSTYPE
+rust_lex_test_one (const char *input, int expected)
+{
+  int token;
+  RUSTSTYPE result;
+
+  rust_lex_test_init (input);
+
+  token = rustyylex ();
+  SELF_CHECK (token == expected);
+  result = rustyylval;
+
+  if (token)
+    {
+      token = rustyylex ();
+      SELF_CHECK (token == 0);
+    }
+
+  return result;
+}
+
+/* Test that INPUT lexes as the integer VALUE.  */
+
+static void
+rust_lex_int_test (const char *input, int value, int kind)
+{
+  RUSTSTYPE result = rust_lex_test_one (input, kind);
+  SELF_CHECK (result.typed_val_int.val == value);
+}
+
+/* Test that INPUT throws an exception with text ERR.  */
+
+static void
+rust_lex_exception_test (const char *input, const char *err)
+{
+  TRY
+    {
+      /* The "kind" doesn't matter.  */
+      rust_lex_test_one (input, DECIMAL_INTEGER);
+      SELF_CHECK (0);
+    }
+  CATCH (except, RETURN_MASK_ERROR)
+    {
+      SELF_CHECK (strcmp (except.message, err) == 0);
+    }
+  END_CATCH
+}
+
+/* Test that INPUT lexes as the identifier, string, or byte-string
+   VALUE.  KIND holds the expected token kind.  */
+
+static void
+rust_lex_stringish_test (const char *input, const char *value, int kind)
+{
+  RUSTSTYPE result = rust_lex_test_one (input, kind);
+  SELF_CHECK (result.sval.length == strlen (value));
+  SELF_CHECK (strncmp (result.sval.ptr, value, result.sval.length) == 0);
+}
+
+/* Helper to test that a string parses as a given token sequence.  */
+
+static void
+rust_lex_test_sequence (const char *input, int len, const int expected[])
+{
+  int i;
+
+  lexptr = input;
+  paren_depth = 0;
+
+  for (i = 0; i < len; ++i)
+    {
+      int token = rustyylex ();
+
+      SELF_CHECK (token == expected[i]);
+    }
+}
+
+/* Tests for an integer-parsing corner case.  */
+
+static void
+rust_lex_test_trailing_dot (void)
+{
+  const int expected1[] = { DECIMAL_INTEGER, '.', IDENT, '(', ')', 0 };
+  const int expected2[] = { INTEGER, '.', IDENT, '(', ')', 0 };
+  const int expected3[] = { FLOAT, EQEQ, '(', ')', 0 };
+  const int expected4[] = { DECIMAL_INTEGER, DOTDOT, DECIMAL_INTEGER, 0 };
+
+  rust_lex_test_sequence ("23.g()", ARRAY_SIZE (expected1), expected1);
+  rust_lex_test_sequence ("23_0.g()", ARRAY_SIZE (expected2), expected2);
+  rust_lex_test_sequence ("23.==()", ARRAY_SIZE (expected3), expected3);
+  rust_lex_test_sequence ("23..25", ARRAY_SIZE (expected4), expected4);
+}
+
+/* Tests of completion.  */
+
+static void
+rust_lex_test_completion (void)
+{
+  const int expected[] = { IDENT, '.', COMPLETE, 0 };
+
+  parse_completion = 1;
+
+  rust_lex_test_sequence ("something.wha", ARRAY_SIZE (expected), expected);
+  rust_lex_test_sequence ("something.", ARRAY_SIZE (expected), expected);
+
+  parse_completion = 0;
+}
+
+/* Test pushback.  */
+
+static void
+rust_lex_test_push_back (void)
+{
+  int token;
+
+  rust_lex_test_init (">>=");
+
+  token = rustyylex ();
+  SELF_CHECK (token == COMPOUND_ASSIGN);
+  SELF_CHECK (rustyylval.opcode == BINOP_RSH);
+
+  rust_push_back ('=');
+
+  token = rustyylex ();
+  SELF_CHECK (token == '=');
+
+  token = rustyylex ();
+  SELF_CHECK (token == 0);
+}
+
+/* Unit test the lexer.  */
+
+static void
+rust_lex_tests (void)
+{
+  int i;
+
+  obstack_init (&work_obstack);
+  unit_testing = 1;
+
+  rust_lex_test_one ("", 0);
+  rust_lex_test_one ("    \t  \n \r  ", 0);
+  rust_lex_test_one ("thread 23", 0);
+  rust_lex_test_one ("task 23", 0);
+  rust_lex_test_one ("th 104", 0);
+  rust_lex_test_one ("ta 97", 0);
+
+  rust_lex_int_test ("'z'", 'z', INTEGER);
+  rust_lex_int_test ("'\\xff'", 0xff, INTEGER);
+  rust_lex_int_test ("'\\u{1016f}'", 0x1016f, INTEGER);
+  rust_lex_int_test ("b'z'", 'z', INTEGER);
+  rust_lex_int_test ("b'\\xfe'", 0xfe, INTEGER);
+  rust_lex_int_test ("b'\\xFE'", 0xfe, INTEGER);
+  rust_lex_int_test ("b'\\xfE'", 0xfe, INTEGER);
+
+  /* Test all escapes in both modes.  */
+  rust_lex_int_test ("'\\n'", '\n', INTEGER);
+  rust_lex_int_test ("'\\r'", '\r', INTEGER);
+  rust_lex_int_test ("'\\t'", '\t', INTEGER);
+  rust_lex_int_test ("'\\\\'", '\\', INTEGER);
+  rust_lex_int_test ("'\\0'", '\0', INTEGER);
+  rust_lex_int_test ("'\\''", '\'', INTEGER);
+  rust_lex_int_test ("'\\\"'", '"', INTEGER);
+
+  rust_lex_int_test ("b'\\n'", '\n', INTEGER);
+  rust_lex_int_test ("b'\\r'", '\r', INTEGER);
+  rust_lex_int_test ("b'\\t'", '\t', INTEGER);
+  rust_lex_int_test ("b'\\\\'", '\\', INTEGER);
+  rust_lex_int_test ("b'\\0'", '\0', INTEGER);
+  rust_lex_int_test ("b'\\''", '\'', INTEGER);
+  rust_lex_int_test ("b'\\\"'", '"', INTEGER);
+
+  rust_lex_exception_test ("'z", "Unterminated character literal");
+  rust_lex_exception_test ("b'\\x0'", "Not enough hex digits seen");
+  rust_lex_exception_test ("b'\\u{0}'", "Unicode escape in byte literal");
+  rust_lex_exception_test ("'\\x0'", "Not enough hex digits seen");
+  rust_lex_exception_test ("'\\u0'", "Missing '{' in Unicode escape");
+  rust_lex_exception_test ("'\\u{0", "Missing '}' in Unicode escape");
+  rust_lex_exception_test ("'\\u{0000007}", "Overlong hex escape");
+  rust_lex_exception_test ("'\\u{}", "Not enough hex digits seen");
+  rust_lex_exception_test ("'\\Q'", "Invalid escape \\Q in literal");
+  rust_lex_exception_test ("b'\\Q'", "Invalid escape \\Q in literal");
+
+  rust_lex_int_test ("23", 23, DECIMAL_INTEGER);
+  rust_lex_int_test ("2_344__29", 234429, INTEGER);
+  rust_lex_int_test ("0x1f", 0x1f, INTEGER);
+  rust_lex_int_test ("23usize", 23, INTEGER);
+  rust_lex_int_test ("23i32", 23, INTEGER);
+  rust_lex_int_test ("0x1_f", 0x1f, INTEGER);
+  rust_lex_int_test ("0b1_101011__", 0x6b, INTEGER);
+  rust_lex_int_test ("0o001177i64", 639, INTEGER);
+
+  rust_lex_test_trailing_dot ();
+
+  rust_lex_test_one ("23.", FLOAT);
+  rust_lex_test_one ("23.99f32", FLOAT);
+  rust_lex_test_one ("23e7", FLOAT);
+  rust_lex_test_one ("23E-7", FLOAT);
+  rust_lex_test_one ("23e+7", FLOAT);
+  rust_lex_test_one ("23.99e+7f64", FLOAT);
+  rust_lex_test_one ("23.82f32", FLOAT);
+
+  rust_lex_stringish_test ("hibob", "hibob", IDENT);
+  rust_lex_stringish_test ("hibob__93", "hibob__93", IDENT);
+  rust_lex_stringish_test ("thread", "thread", IDENT);
+
+  rust_lex_stringish_test ("\"string\"", "string", STRING);
+  rust_lex_stringish_test ("\"str\\ting\"", "str\ting", STRING);
+  rust_lex_stringish_test ("\"str\\\"ing\"", "str\"ing", STRING);
+  rust_lex_stringish_test ("r\"str\\ing\"", "str\\ing", STRING);
+  rust_lex_stringish_test ("r#\"str\\ting\"#", "str\\ting", STRING);
+  rust_lex_stringish_test ("r###\"str\\\"ing\"###", "str\\\"ing", STRING);
+
+  rust_lex_stringish_test ("b\"string\"", "string", BYTESTRING);
+  rust_lex_stringish_test ("b\"\x73tring\"", "string", BYTESTRING);
+  rust_lex_stringish_test ("b\"str\\\"ing\"", "str\"ing", BYTESTRING);
+  rust_lex_stringish_test ("br####\"\\x73tring\"####", "\\x73tring",
+			   BYTESTRING);
+
+  for (i = 0; i < ARRAY_SIZE (identifier_tokens); ++i)
+    rust_lex_test_one (identifier_tokens[i].name, identifier_tokens[i].value);
+
+  for (i = 0; i < ARRAY_SIZE (operator_tokens); ++i)
+    rust_lex_test_one (operator_tokens[i].name, operator_tokens[i].value);
+
+  rust_lex_test_completion ();
+  rust_lex_test_push_back ();
+
+  obstack_free (&work_obstack, NULL);
+  unit_testing = 0;
+}
+
+#endif /* GDB_SELF_TEST */
+
+void
+_initialize_rust_exp (void)
+{
+  int code = regcomp (&number_regex, number_regex_text, REG_EXTENDED);
+  /* If the regular expression was incorrect, it was a programming
+     error.  */
+  gdb_assert (code == 0);
+
+#if GDB_SELF_TEST
+  register_self_test (rust_lex_tests);
+#endif
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-exp.y ./gdb/rust-exp.y
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-exp.y	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/rust-exp.y	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,2742 @@
+/* Bison parser for Rust expressions, for GDB.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Removing the last conflict seems difficult.  */
+%expect 1
+
+%{
+
+#include "defs.h"
+
+#include "block.h"
+#include "charset.h"
+#include "cp-support.h"
+#include "gdb_obstack.h"
+#include "gdb_regex.h"
+#include "rust-lang.h"
+#include "parser-defs.h"
+#include "selftest.h"
+#include "value.h"
+#include "vec.h"
+
+#define GDB_YY_REMAP_PREFIX rust
+#include "yy-remap.h"
+
+#define RUSTSTYPE YYSTYPE
+
+extern initialize_file_ftype _initialize_rust_exp;
+
+struct rust_op;
+typedef const struct rust_op *rust_op_ptr;
+DEF_VEC_P (rust_op_ptr);
+
+/* A typed integer constant.  */
+
+struct typed_val_int
+{
+  LONGEST val;
+  struct type *type;
+};
+
+/* A typed floating point constant.  */
+
+struct typed_val_float
+{
+  DOUBLEST dval;
+  struct type *type;
+};
+
+/* An identifier and an expression.  This is used to represent one
+   element of a struct initializer.  */
+
+struct set_field
+{
+  struct stoken name;
+  const struct rust_op *init;
+};
+
+typedef struct set_field set_field;
+
+DEF_VEC_O (set_field);
+
+
+static int rustyylex (void);
+static void rust_push_back (char c);
+static const char *rust_copy_name (const char *, int);
+static struct stoken rust_concat3 (const char *, const char *, const char *);
+static struct stoken make_stoken (const char *);
+static struct block_symbol rust_lookup_symbol (const char *name,
+					       const struct block *block,
+					       const domain_enum domain);
+static struct type *rust_lookup_type (const char *name,
+				      const struct block *block);
+static struct type *rust_type (const char *name);
+
+static const struct rust_op *crate_name (const struct rust_op *name);
+static const struct rust_op *super_name (const struct rust_op *name,
+					 unsigned int n_supers);
+
+static const struct rust_op *ast_operation (enum exp_opcode opcode,
+					    const struct rust_op *left,
+					    const struct rust_op *right);
+static const struct rust_op *ast_compound_assignment
+  (enum exp_opcode opcode, const struct rust_op *left,
+   const struct rust_op *rust_op);
+static const struct rust_op *ast_literal (struct typed_val_int val);
+static const struct rust_op *ast_dliteral (struct typed_val_float val);
+static const struct rust_op *ast_structop (const struct rust_op *left,
+					   const char *name,
+					   int completing);
+static const struct rust_op *ast_structop_anonymous
+  (const struct rust_op *left, struct typed_val_int number);
+static const struct rust_op *ast_unary (enum exp_opcode opcode,
+					const struct rust_op *expr);
+static const struct rust_op *ast_cast (const struct rust_op *expr,
+				       const struct rust_op *type);
+static const struct rust_op *ast_call_ish (enum exp_opcode opcode,
+					   const struct rust_op *expr,
+					   VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_path (struct stoken name,
+				       VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_string (struct stoken str);
+static const struct rust_op *ast_struct (const struct rust_op *name,
+					 VEC (set_field) **fields);
+static const struct rust_op *ast_range (const struct rust_op *lhs,
+					const struct rust_op *rhs);
+static const struct rust_op *ast_array_type (const struct rust_op *lhs,
+					     struct typed_val_int val);
+static const struct rust_op *ast_slice_type (const struct rust_op *type);
+static const struct rust_op *ast_reference_type (const struct rust_op *type);
+static const struct rust_op *ast_pointer_type (const struct rust_op *type,
+					       int is_mut);
+static const struct rust_op *ast_function_type (const struct rust_op *result,
+						VEC (rust_op_ptr) **params);
+static const struct rust_op *ast_tuple_type (VEC (rust_op_ptr) **params);
+
+/* The state of the parser, used internally when we are parsing the
+   expression.  */
+
+static struct parser_state *pstate = NULL;
+
+/* A regular expression for matching Rust numbers.  This is split up
+   since it is very long and this gives us a way to comment the
+   sections.  */
+
+static const char *number_regex_text =
+  /* subexpression 1: allows use of alternation, otherwise uninteresting */
+  "^("
+  /* First comes floating point.  */
+  /* Recognize number after the decimal point, with optional
+     exponent and optional type suffix.
+     subexpression 2: allows "?", otherwise uninteresting
+     subexpression 3: if present, type suffix
+  */
+  "[0-9][0-9_]*\\.[0-9][0-9_]*([eE][-+]?[0-9][0-9_]*)?(f32|f64)?"
+#define FLOAT_TYPE1 3
+  "|"
+  /* Recognize exponent without decimal point, with optional type
+     suffix.
+     subexpression 4: if present, type suffix
+  */
+#define FLOAT_TYPE2 4
+  "[0-9][0-9_]*[eE][-+]?[0-9][0-9_]*(f32|f64)?"
+  "|"
+  /* "23." is a valid floating point number, but "23.e5" and
+     "23.f32" are not.  So, handle the trailing-. case
+     separately.  */
+  "[0-9][0-9_]*\\."
+  "|"
+  /* Finally come integers.
+     subexpression 5: text of integer
+     subexpression 6: if present, type suffix
+     subexpression 7: allows use of alternation, otherwise uninteresting
+  */
+#define INT_TEXT 5
+#define INT_TYPE 6
+  "(0x[a-fA-F0-9_]+|0o[0-7_]+|0b[01_]+|[0-9][0-9_]*)"
+  "([iu](size|8|16|32|64))?"
+  ")";
+/* The number of subexpressions to allocate space for, including the
+   "0th" whole match subexpression.  */
+#define NUM_SUBEXPRESSIONS 8
+
+/* The compiled number-matching regex.  */
+
+static regex_t number_regex;
+
+/* True if we're running unit tests.  */
+
+static int unit_testing;
+
+/* Obstack for data temporarily allocated during parsing.  */
+
+static struct obstack work_obstack;
+
+/* Result of parsing.  Points into work_obstack.  */
+
+static const struct rust_op *rust_ast;
+
+%}
+
+%union
+{
+  /* A typed integer constant.  */
+  struct typed_val_int typed_val_int;
+
+  /* A typed floating point constant.  */
+  struct typed_val_float typed_val_float;
+
+  /* An identifier or string.  */
+  struct stoken sval;
+
+  /* A token representing an opcode, like "==".  */
+  enum exp_opcode opcode;
+
+  /* A list of expressions; for example, the arguments to a function
+     call.  */
+  VEC (rust_op_ptr) **params;
+
+  /* A list of field initializers.  */
+  VEC (set_field) **field_inits;
+
+  /* A single field initializer.  */
+  struct set_field one_field_init;
+
+  /* An expression.  */
+  const struct rust_op *op;
+
+  /* A plain integer, for example used to count the number of
+     "super::" prefixes on a path.  */
+  unsigned int depth;
+}
+
+%{
+
+  /* Rust AST operations.  We build a tree of these; then lower them
+     to gdb expressions when parsing has completed.  */
+
+struct rust_op
+{
+  /* The opcode.  */
+  enum exp_opcode opcode;
+  /* If OPCODE is OP_TYPE, then this holds information about what type
+     is described by this node.  */
+  enum type_code typecode;
+  /* Indicates whether OPCODE actually represents a compound
+     assignment.  For example, if OPCODE is GTGT and this is false,
+     then this rust_op represents an ordinary ">>"; but if this is
+     true, then this rust_op represents ">>=".  Unused in other
+     cases.  */
+  unsigned int compound_assignment : 1;
+  /* Only used by a field expression; if set, indicates that the field
+     name occurred at the end of the expression and is eligible for
+     completion.  */
+  unsigned int completing : 1;
+  /* Operands of expression.  Which one is used and how depends on the
+     particular opcode.  */
+  RUSTSTYPE left;
+  RUSTSTYPE right;
+};
+
+%}
+
+%token <sval> GDBVAR
+%token <sval> IDENT
+%token <sval> COMPLETE
+%token <typed_val_int> INTEGER
+%token <typed_val_int> DECIMAL_INTEGER
+%token <sval> STRING
+%token <sval> BYTESTRING
+%token <typed_val_float> FLOAT
+%token <opcode> COMPOUND_ASSIGN
+
+/* Keyword tokens.  */
+%token <voidval> KW_AS
+%token <voidval> KW_IF
+%token <voidval> KW_TRUE
+%token <voidval> KW_FALSE
+%token <voidval> KW_SUPER
+%token <voidval> KW_SELF
+%token <voidval> KW_MUT
+%token <voidval> KW_EXTERN
+%token <voidval> KW_CONST
+%token <voidval> KW_FN
+%token <voidval> KW_SIZEOF
+
+/* Operator tokens.  */
+%token <voidval> DOTDOT
+%token <voidval> OROR
+%token <voidval> ANDAND
+%token <voidval> EQEQ
+%token <voidval> NOTEQ
+%token <voidval> LTEQ
+%token <voidval> GTEQ
+%token <voidval> LSH RSH
+%token <voidval> COLONCOLON
+%token <voidval> ARROW
+
+%type <op> type
+%type <op> path_for_expr
+%type <op> identifier_path_for_expr
+%type <op> path_for_type
+%type <op> identifier_path_for_type
+%type <op> just_identifiers_for_type
+
+%type <params> maybe_type_list
+%type <params> type_list
+
+%type <depth> super_path
+
+%type <op> literal
+%type <op> expr
+%type <op> field_expr
+%type <op> idx_expr
+%type <op> unop_expr
+%type <op> binop_expr
+%type <op> binop_expr_expr
+%type <op> type_cast_expr
+%type <op> assignment_expr
+%type <op> compound_assignment_expr
+%type <op> paren_expr
+%type <op> call_expr
+%type <op> path_expr
+%type <op> tuple_expr
+%type <op> unit_expr
+%type <op> struct_expr
+%type <op> array_expr
+%type <op> range_expr
+
+%type <params> expr_list
+%type <params> maybe_expr_list
+%type <params> paren_expr_list
+
+%type <field_inits> struct_expr_list
+%type <one_field_init> struct_expr_tail
+
+/* Precedence.  */
+%nonassoc DOTDOT
+%right '=' COMPOUND_ASSIGN
+%left OROR
+%left ANDAND
+%nonassoc EQEQ NOTEQ '<' '>' LTEQ GTEQ
+%left '|'
+%left '^'
+%left '&'
+%left LSH RSH
+%left '@'
+%left '+' '-'
+%left '*' '/' '%'
+/* These could be %precedence in Bison, but that isn't a yacc
+   feature.  */
+%left KW_AS
+%left UNARY
+%left '[' '.' '('
+
+%%
+
+start:
+	expr
+		{
+		  /* If we are completing and see a valid parse,
+		     rust_ast will already have been set.  */
+		  if (rust_ast == NULL)
+		    rust_ast = $1;
+		}
+;
+
+/* Note that the Rust grammar includes a method_call_expr, but we
+   handle this differently, to avoid a shift/reduce conflict with
+   call_expr.  */
+expr:
+	literal
+|	path_expr
+|	tuple_expr
+|	unit_expr
+|	struct_expr
+|	field_expr
+|	array_expr
+|	idx_expr
+|	range_expr
+|	unop_expr /* Must precede call_expr because of ambiguity with sizeof.  */
+|	binop_expr
+|	paren_expr
+|	call_expr
+;
+
+tuple_expr:
+	'(' expr ',' maybe_expr_list ')'
+		{
+		  VEC_safe_insert (rust_op_ptr, *$4, 0, $2);
+		  error (_("Tuple expressions not supported yet"));
+		}
+;
+
+unit_expr:
+	'(' ')'
+		{
+		  struct typed_val_int val;
+
+		  val.type
+		    = language_lookup_primitive_type (parse_language (pstate),
+						      parse_gdbarch (pstate),
+						      "()");
+		  val.val = 0;
+		  $$ = ast_literal (val);
+		}
+;
+
+/* To avoid a shift/reduce conflict with call_expr, we don't handle
+   tuple struct expressions here, but instead when examining the
+   AST.  */
+struct_expr:
+	path_for_expr '{' struct_expr_list '}'
+		{ $$ = ast_struct ($1, $3); }
+;
+
+struct_expr_tail:
+	DOTDOT expr
+		{
+		  struct set_field sf;
+
+		  sf.name.ptr = NULL;
+		  sf.name.length = 0;
+		  sf.init = $2;
+
+		  $$ = sf;
+		}
+|	IDENT ':' expr
+		{
+		  struct set_field sf;
+
+		  sf.name = $1;
+		  sf.init = $3;
+		  $$ = sf;
+		}
+;
+
+struct_expr_list:
+	/* %empty */
+		{
+		  VEC (set_field) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+		  $$ = result;
+		}
+|	struct_expr_tail
+		{
+		  VEC (set_field) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+
+		  make_cleanup (VEC_cleanup (set_field), result);
+		  VEC_safe_push (set_field, *result, &$1);
+
+		  $$ = result;
+		}
+|	IDENT ':' expr ',' struct_expr_list
+		{
+		  struct set_field sf;
+
+		  sf.name = $1;
+		  sf.init = $3;
+		  VEC_safe_push (set_field, *$5, &sf);
+		  $$ = $5;
+		}
+;
+
+array_expr:
+	'[' KW_MUT expr_list ']'
+		{ $$ = ast_call_ish (OP_ARRAY, NULL, $3); }
+|	'[' expr_list ']'
+		{ $$ = ast_call_ish (OP_ARRAY, NULL, $2); }
+|	'[' KW_MUT expr ';' expr ']'
+		{ $$ = ast_operation (OP_RUST_ARRAY, $3, $5); }
+|	'[' expr ';' expr ']'
+		{ $$ = ast_operation (OP_RUST_ARRAY, $2, $4); }
+;
+
+range_expr:
+	expr DOTDOT
+		{ $$ = ast_range ($1, NULL); }
+|	expr DOTDOT expr
+		{ $$ = ast_range ($1, $3); }
+|	DOTDOT expr
+		{ $$ = ast_range (NULL, $2); }
+|	DOTDOT
+		{ $$ = ast_range (NULL, NULL); }
+;
+
+literal:
+	INTEGER
+		{ $$ = ast_literal ($1); }
+|	DECIMAL_INTEGER
+		{ $$ = ast_literal ($1); }
+|	FLOAT
+		{ $$ = ast_dliteral ($1); }
+|	STRING
+		{
+		  const struct rust_op *str = ast_string ($1);
+		  VEC (set_field) **fields;
+		  struct set_field field;
+		  struct typed_val_int val;
+		  struct stoken token;
+
+		  fields = OBSTACK_ZALLOC (&work_obstack, VEC (set_field) *);
+		  make_cleanup (VEC_cleanup (set_field), fields);
+
+		  /* Wrap the raw string in the &str struct.  */
+		  field.name.ptr = "data_ptr";
+		  field.name.length = strlen (field.name.ptr);
+		  field.init = ast_unary (UNOP_ADDR, ast_string ($1));
+		  VEC_safe_push (set_field, *fields, &field);
+
+		  val.type = rust_type ("usize");
+		  val.val = $1.length;
+
+		  field.name.ptr = "length";
+		  field.name.length = strlen (field.name.ptr);
+		  field.init = ast_literal (val);
+		  VEC_safe_push (set_field, *fields, &field);
+
+		  token.ptr = "&str";
+		  token.length = strlen (token.ptr);
+		  $$ = ast_struct (ast_path (token, NULL), fields);
+		}
+|	BYTESTRING
+		{ $$ = ast_string ($1); }
+|	KW_TRUE
+		{
+		  struct typed_val_int val;
+
+		  val.type = language_bool_type (parse_language (pstate),
+						 parse_gdbarch (pstate));
+		  val.val = 1;
+		  $$ = ast_literal (val);
+		}
+|	KW_FALSE
+		{
+		  struct typed_val_int val;
+
+		  val.type = language_bool_type (parse_language (pstate),
+						 parse_gdbarch (pstate));
+		  val.val = 0;
+		  $$ = ast_literal (val);
+		}
+;
+
+field_expr:
+	expr '.' IDENT
+		{ $$ = ast_structop ($1, $3.ptr, 0); }
+|	expr '.' COMPLETE
+		{
+		  $$ = ast_structop ($1, $3.ptr, 1);
+		  rust_ast = $$;
+		}
+|	expr '.' DECIMAL_INTEGER
+		{ $$ = ast_structop_anonymous ($1, $3); }
+;
+
+idx_expr:
+	expr '[' expr ']'
+		{ $$ = ast_operation (BINOP_SUBSCRIPT, $1, $3); }
+;
+
+unop_expr:
+	'+' expr	%prec UNARY
+		{ $$ = ast_unary (UNOP_PLUS, $2); }
+
+|	'-' expr	%prec UNARY
+		{ $$ = ast_unary (UNOP_NEG, $2); }
+
+|	'!' expr	%prec UNARY
+		{
+		  /* Note that we provide a Rust-specific evaluator
+		     override for UNOP_COMPLEMENT, so it can do the
+		     right thing for both bool and integral
+		     values.  */
+		  $$ = ast_unary (UNOP_COMPLEMENT, $2);
+		}
+
+|	'*' expr	%prec UNARY
+		{ $$ = ast_unary (UNOP_IND, $2); }
+
+|	'&' expr	%prec UNARY
+		{ $$ = ast_unary (UNOP_ADDR, $2); }
+
+|	'&' KW_MUT expr	%prec UNARY
+		{ $$ = ast_unary (UNOP_ADDR, $3); }
+|   KW_SIZEOF '(' expr ')' %prec UNARY
+        { $$ = ast_unary (UNOP_SIZEOF, $3); }
+;
+
+binop_expr:
+	binop_expr_expr
+|	type_cast_expr
+|	assignment_expr
+|	compound_assignment_expr
+;
+
+binop_expr_expr:
+	expr '*' expr
+		{ $$ = ast_operation (BINOP_MUL, $1, $3); }
+
+|	expr '@' expr
+		{ $$ = ast_operation (BINOP_REPEAT, $1, $3); }
+
+|	expr '/' expr
+		{ $$ = ast_operation (BINOP_DIV, $1, $3); }
+
+|	expr '%' expr
+		{ $$ = ast_operation (BINOP_REM, $1, $3); }
+
+|	expr '<' expr
+		{ $$ = ast_operation (BINOP_LESS, $1, $3); }
+
+|	expr '>' expr
+		{ $$ = ast_operation (BINOP_GTR, $1, $3); }
+
+|	expr '&' expr
+		{ $$ = ast_operation (BINOP_BITWISE_AND, $1, $3); }
+
+|	expr '|' expr
+		{ $$ = ast_operation (BINOP_BITWISE_IOR, $1, $3); }
+
+|	expr '^' expr
+		{ $$ = ast_operation (BINOP_BITWISE_XOR, $1, $3); }
+
+|	expr '+' expr
+		{ $$ = ast_operation (BINOP_ADD, $1, $3); }
+
+|	expr '-' expr
+		{ $$ = ast_operation (BINOP_SUB, $1, $3); }
+
+|	expr OROR expr
+		{ $$ = ast_operation (BINOP_LOGICAL_OR, $1, $3); }
+
+|	expr ANDAND expr
+		{ $$ = ast_operation (BINOP_LOGICAL_AND, $1, $3); }
+
+|	expr EQEQ expr
+		{ $$ = ast_operation (BINOP_EQUAL, $1, $3); }
+
+|	expr NOTEQ expr
+		{ $$ = ast_operation (BINOP_NOTEQUAL, $1, $3); }
+
+|	expr LTEQ expr
+		{ $$ = ast_operation (BINOP_LEQ, $1, $3); }
+
+|	expr GTEQ expr
+		{ $$ = ast_operation (BINOP_GEQ, $1, $3); }
+
+|	expr LSH expr
+		{ $$ = ast_operation (BINOP_LSH, $1, $3); }
+
+|	expr RSH expr
+		{ $$ = ast_operation (BINOP_RSH, $1, $3); }
+;
+
+type_cast_expr:
+	expr KW_AS type
+		{ $$ = ast_cast ($1, $3); }
+;
+
+assignment_expr:
+	expr '=' expr
+		{ $$ = ast_operation (BINOP_ASSIGN, $1, $3); }
+;
+
+compound_assignment_expr:
+	expr COMPOUND_ASSIGN expr
+		{ $$ = ast_compound_assignment ($2, $1, $3); }
+
+;
+
+paren_expr:
+	'(' expr ')'
+		{ $$ = $2; }
+;
+
+expr_list:
+	expr
+		{
+		  $$ = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+		  make_cleanup (VEC_cleanup (rust_op_ptr), $$);
+		  VEC_safe_push (rust_op_ptr, *$$, $1);
+		}
+|	expr_list ',' expr
+		{
+		  VEC_safe_push (rust_op_ptr, *$1, $3);
+		  $$ = $1;
+		}
+;
+
+maybe_expr_list:
+	/* %empty */
+		{
+		  /* The result can't be NULL.  */
+		  $$ = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+		  make_cleanup (VEC_cleanup (rust_op_ptr), $$);
+		}
+|	expr_list
+		{ $$ = $1; }
+;
+
+paren_expr_list:
+	'('
+	maybe_expr_list
+	')'
+		{ $$ = $2; }
+;
+
+call_expr:
+	expr paren_expr_list
+		{ $$ = ast_call_ish (OP_FUNCALL, $1, $2); }
+;
+
+maybe_self_path:
+	/* %empty */
+|	KW_SELF COLONCOLON
+;
+
+super_path:
+	KW_SUPER COLONCOLON
+		{ $$ = 1; }
+|	super_path KW_SUPER COLONCOLON
+		{ $$ = $1 + 1; }
+;
+
+path_expr:
+	path_for_expr
+		{ $$ = $1; }
+|	GDBVAR
+		{ $$ = ast_path ($1, NULL); }
+|	KW_SELF
+		{ $$ = ast_path (make_stoken ("self"), NULL); }
+;
+
+path_for_expr:
+	identifier_path_for_expr
+|	KW_SELF COLONCOLON identifier_path_for_expr
+		{ $$ = super_name ($3, 0); }
+|	maybe_self_path super_path identifier_path_for_expr
+		{ $$ = super_name ($3, $2); }
+|	COLONCOLON identifier_path_for_expr
+		{ $$ = crate_name ($2); }
+|	KW_EXTERN identifier_path_for_expr
+		{
+		  /* This is a gdb extension to make it possible to
+		     refer to items in other crates.  It just bypasses
+		     adding the current crate to the front of the
+		     name.  */
+		  $$ = ast_path (rust_concat3 ("::", $2->left.sval.ptr, NULL),
+				 $2->right.params);
+		}
+;
+
+identifier_path_for_expr:
+	IDENT
+		{ $$ = ast_path ($1, NULL); }
+|	identifier_path_for_expr COLONCOLON IDENT
+		{
+		  $$ = ast_path (rust_concat3 ($1->left.sval.ptr, "::",
+					       $3.ptr),
+				 NULL);
+		}
+|	identifier_path_for_expr COLONCOLON '<' type_list '>'
+		{ $$ = ast_path ($1->left.sval, $4); }
+|	identifier_path_for_expr COLONCOLON '<' type_list RSH
+		{
+		  $$ = ast_path ($1->left.sval, $4);
+		  rust_push_back ('>');
+		}
+;
+
+path_for_type:
+	identifier_path_for_type
+|	KW_SELF COLONCOLON identifier_path_for_type
+		{ $$ = super_name ($3, 0); }
+|	maybe_self_path super_path identifier_path_for_type
+		{ $$ = super_name ($3, $2); }
+|	COLONCOLON identifier_path_for_type
+		{ $$ = crate_name ($2); }
+|	KW_EXTERN identifier_path_for_type
+		{
+		  /* This is a gdb extension to make it possible to
+		     refer to items in other crates.  It just bypasses
+		     adding the current crate to the front of the
+		     name.  */
+		  $$ = ast_path (rust_concat3 ("::", $2->left.sval.ptr, NULL),
+				 $2->right.params);
+		}
+;
+
+just_identifiers_for_type:
+	IDENT
+	  	{ $$ = ast_path ($1, NULL); }
+|	just_identifiers_for_type COLONCOLON IDENT
+		{
+		  $$ = ast_path (rust_concat3 ($1->left.sval.ptr, "::",
+					       $3.ptr),
+				 NULL);
+		}
+;
+
+identifier_path_for_type:
+	just_identifiers_for_type
+|	just_identifiers_for_type '<' type_list '>'
+		{ $$ = ast_path ($1->left.sval, $3); }
+|	just_identifiers_for_type '<' type_list RSH
+		{
+		  $$ = ast_path ($1->left.sval, $3);
+		  rust_push_back ('>');
+		}
+;
+
+type:
+	path_for_type
+|	'[' type ';' INTEGER ']'
+		{ $$ = ast_array_type ($2, $4); }
+|	'[' type ';' DECIMAL_INTEGER ']'
+		{ $$ = ast_array_type ($2, $4); }
+|	'&' '[' type ']'
+		{ $$ = ast_slice_type ($3); }
+|	'&' type
+		{ $$ = ast_reference_type ($2); }
+|	'*' KW_MUT type
+		{ $$ = ast_pointer_type ($3, 1); }
+|	'*' KW_CONST type
+		{ $$ = ast_pointer_type ($3, 0); }
+|	KW_FN '(' maybe_type_list ')' ARROW type
+		{ $$ = ast_function_type ($6, $3); }
+|	'(' maybe_type_list ')'
+		{ $$ = ast_tuple_type ($2); }
+;
+
+maybe_type_list:
+	/* %empty */
+		{ $$ = NULL; }
+|	type_list
+		{ $$ = $1; }
+;
+
+type_list:
+	type
+		{
+		  VEC (rust_op_ptr) **result
+		    = OBSTACK_ZALLOC (&work_obstack, VEC (rust_op_ptr) *);
+
+		  make_cleanup (VEC_cleanup (rust_op_ptr), result);
+		  VEC_safe_push (rust_op_ptr, *result, $1);
+		  $$ = result;
+		}
+|	type_list ',' type
+		{
+		  VEC_safe_push (rust_op_ptr, *$1, $3);
+		  $$ = $1;
+		}
+;
+
+%%
+
+/* A struct of this type is used to describe a token.  */
+
+struct token_info
+{
+  const char *name;
+  int value;
+  enum exp_opcode opcode;
+};
+
+/* Identifier tokens.  */
+
+static const struct token_info identifier_tokens[] =
+{
+  { "as", KW_AS, OP_NULL },
+  { "false", KW_FALSE, OP_NULL },
+  { "if", 0, OP_NULL },
+  { "mut", KW_MUT, OP_NULL },
+  { "const", KW_CONST, OP_NULL },
+  { "self", KW_SELF, OP_NULL },
+  { "super", KW_SUPER, OP_NULL },
+  { "true", KW_TRUE, OP_NULL },
+  { "extern", KW_EXTERN, OP_NULL },
+  { "fn", KW_FN, OP_NULL },
+  { "sizeof", KW_SIZEOF, OP_NULL },
+};
+
+/* Operator tokens, sorted longest first.  */
+
+static const struct token_info operator_tokens[] =
+{
+  { ">>=", COMPOUND_ASSIGN, BINOP_RSH },
+  { "<<=", COMPOUND_ASSIGN, BINOP_LSH },
+
+  { "<<", LSH, OP_NULL },
+  { ">>", RSH, OP_NULL },
+  { "&&", ANDAND, OP_NULL },
+  { "||", OROR, OP_NULL },
+  { "==", EQEQ, OP_NULL },
+  { "!=", NOTEQ, OP_NULL },
+  { "<=", LTEQ, OP_NULL },
+  { ">=", GTEQ, OP_NULL },
+  { "+=", COMPOUND_ASSIGN, BINOP_ADD },
+  { "-=", COMPOUND_ASSIGN, BINOP_SUB },
+  { "*=", COMPOUND_ASSIGN, BINOP_MUL },
+  { "/=", COMPOUND_ASSIGN, BINOP_DIV },
+  { "%=", COMPOUND_ASSIGN, BINOP_REM },
+  { "&=", COMPOUND_ASSIGN, BINOP_BITWISE_AND },
+  { "|=", COMPOUND_ASSIGN, BINOP_BITWISE_IOR },
+  { "^=", COMPOUND_ASSIGN, BINOP_BITWISE_XOR },
+
+  { "::", COLONCOLON, OP_NULL },
+  { "..", DOTDOT, OP_NULL },
+  { "->", ARROW, OP_NULL }
+};
+
+/* Helper function to copy to the name obstack.  */
+
+static const char *
+rust_copy_name (const char *name, int len)
+{
+  return (const char *) obstack_copy0 (&work_obstack, name, len);
+}
+
+/* Helper function to make an stoken from a C string.  */
+
+static struct stoken
+make_stoken (const char *p)
+{
+  struct stoken result;
+
+  result.ptr = p;
+  result.length = strlen (result.ptr);
+  return result;
+}
+
+/* Helper function to concatenate three strings on the name
+   obstack.  */
+
+static struct stoken
+rust_concat3 (const char *s1, const char *s2, const char *s3)
+{
+  return make_stoken (obconcat (&work_obstack, s1, s2, s3, (char *) NULL));
+}
+
+/* Return an AST node referring to NAME, but relative to the crate's
+   name.  */
+
+static const struct rust_op *
+crate_name (const struct rust_op *name)
+{
+  std::string crate = rust_crate_for_block (expression_context_block);
+  struct stoken result;
+
+  gdb_assert (name->opcode == OP_VAR_VALUE);
+
+  if (crate.empty ())
+    error (_("Could not find crate for current location"));
+  result = make_stoken (obconcat (&work_obstack, "::", crate.c_str (), "::",
+				  name->left.sval.ptr, (char *) NULL));
+
+  return ast_path (result, name->right.params);
+}
+
+/* Create an AST node referring to a "super::" qualified name.  IDENT
+   is the base name and N_SUPERS is how many "super::"s were
+   provided.  N_SUPERS can be zero.  */
+
+static const struct rust_op *
+super_name (const struct rust_op *ident, unsigned int n_supers)
+{
+  const char *scope = block_scope (expression_context_block);
+  int offset;
+
+  gdb_assert (ident->opcode == OP_VAR_VALUE);
+
+  if (scope[0] == '\0')
+    error (_("Couldn't find namespace scope for self::"));
+
+  if (n_supers > 0)
+    {
+      int i;
+      int len;
+      std::vector<int> offsets;
+      unsigned int current_len;
+
+      current_len = cp_find_first_component (scope);
+      while (scope[current_len] != '\0')
+	{
+	  offsets.push_back (current_len);
+	  gdb_assert (scope[current_len] == ':');
+	  /* The "::".  */
+	  current_len += 2;
+	  current_len += cp_find_first_component (scope
+						  + current_len);
+	}
+
+      len = offsets.size ();
+      if (n_supers >= len)
+	error (_("Too many super:: uses from '%s'"), scope);
+
+      offset = offsets[len - n_supers];
+    }
+  else
+    offset = strlen (scope);
+
+  obstack_grow (&work_obstack, "::", 2);
+  obstack_grow (&work_obstack, scope, offset);
+  obstack_grow (&work_obstack, "::", 2);
+  obstack_grow0 (&work_obstack, ident->left.sval.ptr, ident->left.sval.length);
+
+  return ast_path (make_stoken ((const char *) obstack_finish (&work_obstack)),
+		   ident->right.params);
+}
+
+/* A helper that updates innermost_block as appropriate.  */
+
+static void
+update_innermost_block (struct block_symbol sym)
+{
+  if (symbol_read_needs_frame (sym.symbol)
+      && (innermost_block == NULL
+	  || contained_in (sym.block, innermost_block)))
+    innermost_block = sym.block;
+}
+
+/* A helper to look up a Rust type, or fail.  This only works for
+   types defined by rust_language_arch_info.  */
+
+static struct type *
+rust_type (const char *name)
+{
+  struct type *type;
+
+  /* When unit testing, we don't bother checking the types, so avoid a
+     possibly-failing lookup here.  */
+  if (unit_testing)
+    return NULL;
+
+  type = language_lookup_primitive_type (parse_language (pstate),
+					 parse_gdbarch (pstate),
+					 name);
+  if (type == NULL)
+    error (_("Could not find Rust type %s"), name);
+  return type;
+}
+
+/* Lex a hex number with at least MIN digits and at most MAX
+   digits.  */
+
+static uint32_t
+lex_hex (int min, int max)
+{
+  uint32_t result = 0;
+  int len = 0;
+  /* We only want to stop at MAX if we're lexing a byte escape.  */
+  int check_max = min == max;
+
+  while ((check_max ? len <= max : 1)
+	 && ((lexptr[0] >= 'a' && lexptr[0] <= 'f')
+	     || (lexptr[0] >= 'A' && lexptr[0] <= 'F')
+	     || (lexptr[0] >= '0' && lexptr[0] <= '9')))
+    {
+      result *= 16;
+      if (lexptr[0] >= 'a' && lexptr[0] <= 'f')
+	result = result + 10 + lexptr[0] - 'a';
+      else if (lexptr[0] >= 'A' && lexptr[0] <= 'F')
+	result = result + 10 + lexptr[0] - 'A';
+      else
+	result = result + lexptr[0] - '0';
+      ++lexptr;
+      ++len;
+    }
+
+  if (len < min)
+    error (_("Not enough hex digits seen"));
+  if (len > max)
+    {
+      gdb_assert (min != max);
+      error (_("Overlong hex escape"));
+    }
+
+  return result;
+}
+
+/* Lex an escape.  IS_BYTE is true if we're lexing a byte escape;
+   otherwise we're lexing a character escape.  */
+
+static uint32_t
+lex_escape (int is_byte)
+{
+  uint32_t result;
+
+  gdb_assert (lexptr[0] == '\\');
+  ++lexptr;
+  switch (lexptr[0])
+    {
+    case 'x':
+      ++lexptr;
+      result = lex_hex (2, 2);
+      break;
+
+    case 'u':
+      if (is_byte)
+	error (_("Unicode escape in byte literal"));
+      ++lexptr;
+      if (lexptr[0] != '{')
+	error (_("Missing '{' in Unicode escape"));
+      ++lexptr;
+      result = lex_hex (1, 6);
+      /* Could do range checks here.  */
+      if (lexptr[0] != '}')
+	error (_("Missing '}' in Unicode escape"));
+      ++lexptr;
+      break;
+
+    case 'n':
+      result = '\n';
+      ++lexptr;
+      break;
+    case 'r':
+      result = '\r';
+      ++lexptr;
+      break;
+    case 't':
+      result = '\t';
+      ++lexptr;
+      break;
+    case '\\':
+      result = '\\';
+      ++lexptr;
+      break;
+    case '0':
+      result = '\0';
+      ++lexptr;
+      break;
+    case '\'':
+      result = '\'';
+      ++lexptr;
+      break;
+    case '"':
+      result = '"';
+      ++lexptr;
+      break;
+
+    default:
+      error (_("Invalid escape \\%c in literal"), lexptr[0]);
+    }
+
+  return result;
+}
+
+/* Lex a character constant.  */
+
+static int
+lex_character (void)
+{
+  int is_byte = 0;
+  uint32_t value;
+
+  if (lexptr[0] == 'b')
+    {
+      is_byte = 1;
+      ++lexptr;
+    }
+  gdb_assert (lexptr[0] == '\'');
+  ++lexptr;
+  /* This should handle UTF-8 here.  */
+  if (lexptr[0] == '\\')
+    value = lex_escape (is_byte);
+  else
+    {
+      value = lexptr[0] & 0xff;
+      ++lexptr;
+    }
+
+  if (lexptr[0] != '\'')
+    error (_("Unterminated character literal"));
+  ++lexptr;
+
+  rustyylval.typed_val_int.val = value;
+  rustyylval.typed_val_int.type = rust_type (is_byte ? "u8" : "char");
+
+  return INTEGER;
+}
+
+/* Return the offset of the double quote if STR looks like the start
+   of a raw string, or 0 if STR does not start a raw string.  */
+
+static int
+starts_raw_string (const char *str)
+{
+  const char *save = str;
+
+  if (str[0] != 'r')
+    return 0;
+  ++str;
+  while (str[0] == '#')
+    ++str;
+  if (str[0] == '"')
+    return str - save;
+  return 0;
+}
+
+/* Return true if STR looks like the end of a raw string that had N
+   hashes at the start.  */
+
+static bool
+ends_raw_string (const char *str, int n)
+{
+  int i;
+
+  gdb_assert (str[0] == '"');
+  for (i = 0; i < n; ++i)
+    if (str[i + 1] != '#')
+      return false;
+  return true;
+}
+
+/* Lex a string constant.  */
+
+static int
+lex_string (void)
+{
+  int is_byte = lexptr[0] == 'b';
+  int raw_length;
+  int len_in_chars = 0;
+
+  if (is_byte)
+    ++lexptr;
+  raw_length = starts_raw_string (lexptr);
+  lexptr += raw_length;
+  gdb_assert (lexptr[0] == '"');
+  ++lexptr;
+
+  while (1)
+    {
+      uint32_t value;
+
+      if (raw_length > 0)
+	{
+	  if (lexptr[0] == '"' && ends_raw_string (lexptr, raw_length - 1))
+	    {
+	      /* Exit with lexptr pointing after the final "#".  */
+	      lexptr += raw_length;
+	      break;
+	    }
+	  else if (lexptr[0] == '\0')
+	    error (_("Unexpected EOF in string"));
+
+	  value = lexptr[0] & 0xff;
+	  if (is_byte && value > 127)
+	    error (_("Non-ASCII value in raw byte string"));
+	  obstack_1grow (&work_obstack, value);
+
+	  ++lexptr;
+	}
+      else if (lexptr[0] == '"')
+	{
+	  /* Make sure to skip the quote.  */
+	  ++lexptr;
+	  break;
+	}
+      else if (lexptr[0] == '\\')
+	{
+	  value = lex_escape (is_byte);
+
+	  if (is_byte)
+	    obstack_1grow (&work_obstack, value);
+	  else
+	    convert_between_encodings ("UTF-32", "UTF-8", (gdb_byte *) &value,
+				       sizeof (value), sizeof (value),
+				       &work_obstack, translit_none);
+	}
+      else if (lexptr[0] == '\0')
+	error (_("Unexpected EOF in string"));
+      else
+	{
+	  value = lexptr[0] & 0xff;
+	  if (is_byte && value > 127)
+	    error (_("Non-ASCII value in byte string"));
+	  obstack_1grow (&work_obstack, value);
+	  ++lexptr;
+	}
+    }
+
+  rustyylval.sval.length = obstack_object_size (&work_obstack);
+  rustyylval.sval.ptr = (const char *) obstack_finish (&work_obstack);
+  return is_byte ? BYTESTRING : STRING;
+}
+
+/* Return true if STRING starts with whitespace followed by a digit.  */
+
+static bool
+space_then_number (const char *string)
+{
+  const char *p = string;
+
+  while (p[0] == ' ' || p[0] == '\t')
+    ++p;
+  if (p == string)
+    return false;
+
+  return *p >= '0' && *p <= '9';
+}
+
+/* Return true if C can start an identifier.  */
+
+static bool
+rust_identifier_start_p (char c)
+{
+  return ((c >= 'a' && c <= 'z')
+	  || (c >= 'A' && c <= 'Z')
+	  || c == '_'
+	  || c == '$');
+}
+
+/* Lex an identifier.  */
+
+static int
+lex_identifier (void)
+{
+  const char *start = lexptr;
+  unsigned int length;
+  const struct token_info *token;
+  int i;
+  int is_gdb_var = lexptr[0] == '$';
+
+  gdb_assert (rust_identifier_start_p (lexptr[0]));
+
+  ++lexptr;
+
+  /* For the time being this doesn't handle Unicode rules.  Non-ASCII
+     identifiers are gated anyway.  */
+  while ((lexptr[0] >= 'a' && lexptr[0] <= 'z')
+	 || (lexptr[0] >= 'A' && lexptr[0] <= 'Z')
+	 || lexptr[0] == '_'
+	 || (is_gdb_var && lexptr[0] == '$')
+	 || (lexptr[0] >= '0' && lexptr[0] <= '9'))
+    ++lexptr;
+
+
+  length = lexptr - start;
+  token = NULL;
+  for (i = 0; i < ARRAY_SIZE (identifier_tokens); ++i)
+    {
+      if (length == strlen (identifier_tokens[i].name)
+	  && strncmp (identifier_tokens[i].name, start, length) == 0)
+	{
+	  token = &identifier_tokens[i];
+	  break;
+	}
+    }
+
+  if (token != NULL)
+    {
+      if (token->value == 0)
+	{
+	  /* Leave the terminating token alone.  */
+	  lexptr = start;
+	  return 0;
+	}
+    }
+  else if (token == NULL
+	   && (strncmp (start, "thread", length) == 0
+	       || strncmp (start, "task", length) == 0)
+	   && space_then_number (lexptr))
+    {
+      /* "task" or "thread" followed by a number terminates the
+	 parse, per gdb rules.  */
+      lexptr = start;
+      return 0;
+    }
+
+  if (token == NULL || (parse_completion && lexptr[0] == '\0'))
+    rustyylval.sval = make_stoken (rust_copy_name (start, length));
+
+  if (parse_completion && lexptr[0] == '\0')
+    {
+      /* Prevent rustyylex from returning two COMPLETE tokens.  */
+      prev_lexptr = lexptr;
+      return COMPLETE;
+    }
+
+  if (token != NULL)
+    return token->value;
+  if (is_gdb_var)
+    return GDBVAR;
+  return IDENT;
+}
+
+/* Lex an operator.  */
+
+static int
+lex_operator (void)
+{
+  const struct token_info *token = NULL;
+  int i;
+
+  for (i = 0; i < ARRAY_SIZE (operator_tokens); ++i)
+    {
+      if (strncmp (operator_tokens[i].name, lexptr,
+		   strlen (operator_tokens[i].name)) == 0)
+	{
+	  lexptr += strlen (operator_tokens[i].name);
+	  token = &operator_tokens[i];
+	  break;
+	}
+    }
+
+  if (token != NULL)
+    {
+      rustyylval.opcode = token->opcode;
+      return token->value;
+    }
+
+  return *lexptr++;
+}
+
+/* Lex a number.  */
+
+static int
+lex_number (void)
+{
+  regmatch_t subexps[NUM_SUBEXPRESSIONS];
+  int match;
+  int is_integer = 0;
+  int could_be_decimal = 1;
+  int implicit_i32 = 0;
+  const char *type_name = NULL;
+  struct type *type;
+  int end_index;
+  int type_index = -1;
+  int i;
+
+  match = regexec (&number_regex, lexptr, ARRAY_SIZE (subexps), subexps, 0);
+  /* Failure means the regexp is broken.  */
+  gdb_assert (match == 0);
+
+  if (subexps[INT_TEXT].rm_so != -1)
+    {
+      /* Integer part matched.  */
+      is_integer = 1;
+      end_index = subexps[INT_TEXT].rm_eo;
+      if (subexps[INT_TYPE].rm_so == -1)
+	{
+	  type_name = "i32";
+	  implicit_i32 = 1;
+	}
+      else
+	{
+	  type_index = INT_TYPE;
+	  could_be_decimal = 0;
+	}
+    }
+  else if (subexps[FLOAT_TYPE1].rm_so != -1)
+    {
+      /* Found floating point type suffix.  */
+      end_index = subexps[FLOAT_TYPE1].rm_so;
+      type_index = FLOAT_TYPE1;
+    }
+  else if (subexps[FLOAT_TYPE2].rm_so != -1)
+    {
+      /* Found floating point type suffix.  */
+      end_index = subexps[FLOAT_TYPE2].rm_so;
+      type_index = FLOAT_TYPE2;
+    }
+  else
+    {
+      /* Any other floating point match.  */
+      end_index = subexps[0].rm_eo;
+      type_name = "f64";
+    }
+
+  /* We need a special case if the final character is ".".  In this
+     case we might need to parse an integer.  For example, "23.f()" is
+     a request for a trait method call, not a syntax error involving
+     the floating point number "23.".  */
+  gdb_assert (subexps[0].rm_eo > 0);
+  if (lexptr[subexps[0].rm_eo - 1] == '.')
+    {
+      const char *next = skip_spaces_const (&lexptr[subexps[0].rm_eo]);
+
+      if (rust_identifier_start_p (*next) || *next == '.')
+	{
+	  --subexps[0].rm_eo;
+	  is_integer = 1;
+	  end_index = subexps[0].rm_eo;
+	  type_name = "i32";
+	  could_be_decimal = 1;
+	  implicit_i32 = 1;
+	}
+    }
+
+  /* Compute the type name if we haven't already.  */
+  std::string type_name_holder;
+  if (type_name == NULL)
+    {
+      gdb_assert (type_index != -1);
+      type_name_holder = std::string (lexptr + subexps[type_index].rm_so,
+				      (subexps[type_index].rm_eo
+				       - subexps[type_index].rm_so));
+      type_name = type_name_holder.c_str ();
+    }
+
+  /* Look up the type.  */
+  type = rust_type (type_name);
+
+  /* Copy the text of the number and remove the "_"s.  */
+  std::string number;
+  for (i = 0; i < end_index && lexptr[i]; ++i)
+    {
+      if (lexptr[i] == '_')
+	could_be_decimal = 0;
+      else
+	number.push_back (lexptr[i]);
+    }
+
+  /* Advance past the match.  */
+  lexptr += subexps[0].rm_eo;
+
+  /* Parse the number.  */
+  if (is_integer)
+    {
+      uint64_t value;
+      int radix = 10;
+      int offset = 0;
+
+      if (number[0] == '0')
+	{
+	  if (number[1] == 'x')
+	    radix = 16;
+	  else if (number[1] == 'o')
+	    radix = 8;
+	  else if (number[1] == 'b')
+	    radix = 2;
+	  if (radix != 10)
+	    {
+	      offset = 2;
+	      could_be_decimal = 0;
+	    }
+	}
+
+      value = strtoul (number.c_str () + offset, NULL, radix);
+      if (implicit_i32 && value >= ((uint64_t) 1) << 31)
+	type = rust_type ("i64");
+
+      rustyylval.typed_val_int.val = value;
+      rustyylval.typed_val_int.type = type;
+    }
+  else
+    {
+      rustyylval.typed_val_float.dval = strtod (number.c_str (), NULL);
+      rustyylval.typed_val_float.type = type;
+    }
+
+  return is_integer ? (could_be_decimal ? DECIMAL_INTEGER : INTEGER) : FLOAT;
+}
+
+/* The lexer.  */
+
+static int
+rustyylex (void)
+{
+  /* Skip all leading whitespace.  */
+  while (lexptr[0] == ' ' || lexptr[0] == '\t' || lexptr[0] == '\r'
+	 || lexptr[0] == '\n')
+    ++lexptr;
+
+  /* If we hit EOF and we're completing, then return COMPLETE -- maybe
+     we're completing an empty string at the end of a field_expr.
+     But, we don't want to return two COMPLETE tokens in a row.  */
+  if (lexptr[0] == '\0' && lexptr == prev_lexptr)
+    return 0;
+  prev_lexptr = lexptr;
+  if (lexptr[0] == '\0')
+    {
+      if (parse_completion)
+	{
+	  rustyylval.sval = make_stoken ("");
+	  return COMPLETE;
+	}
+      return 0;
+    }
+
+  if (lexptr[0] >= '0' && lexptr[0] <= '9')
+    return lex_number ();
+  else if (lexptr[0] == 'b' && lexptr[1] == '\'')
+    return lex_character ();
+  else if (lexptr[0] == 'b' && lexptr[1] == '"')
+    return lex_string ();
+  else if (lexptr[0] == 'b' && starts_raw_string (lexptr + 1))
+    return lex_string ();
+  else if (starts_raw_string (lexptr))
+    return lex_string ();
+  else if (rust_identifier_start_p (lexptr[0]))
+    return lex_identifier ();
+  else if (lexptr[0] == '"')
+    return lex_string ();
+  else if (lexptr[0] == '\'')
+    return lex_character ();
+  else if (lexptr[0] == '}' || lexptr[0] == ']')
+    {
+      /* Falls through to lex_operator.  */
+      --paren_depth;
+    }
+  else if (lexptr[0] == '(' || lexptr[0] == '{')
+    {
+      /* Falls through to lex_operator.  */
+      ++paren_depth;
+    }
+  else if (lexptr[0] == ',' && comma_terminates && paren_depth == 0)
+    return 0;
+
+  return lex_operator ();
+}
+
+/* Push back a single character to be re-lexed.  */
+
+static void
+rust_push_back (char c)
+{
+  /* Can't be called before any lexing.  */
+  gdb_assert (prev_lexptr != NULL);
+
+  --lexptr;
+  gdb_assert (*lexptr == c);
+}
+
+
+
+/* Make an arbitrary operation and fill in the fields.  */
+
+static const struct rust_op *
+ast_operation (enum exp_opcode opcode, const struct rust_op *left,
+		const struct rust_op *right)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->left.op = left;
+  result->right.op = right;
+
+  return result;
+}
+
+/* Make a compound assignment operation.  */
+
+static const struct rust_op *
+ast_compound_assignment (enum exp_opcode opcode, const struct rust_op *left,
+			  const struct rust_op *right)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->compound_assignment = 1;
+  result->left.op = left;
+  result->right.op = right;
+
+  return result;
+}
+
+/* Make a typed integer literal operation.  */
+
+static const struct rust_op *
+ast_literal (struct typed_val_int val)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_LONG;
+  result->left.typed_val_int = val;
+
+  return result;
+}
+
+/* Make a typed floating point literal operation.  */
+
+static const struct rust_op *
+ast_dliteral (struct typed_val_float val)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_DOUBLE;
+  result->left.typed_val_float = val;
+
+  return result;
+}
+
+/* Make a unary operation.  */
+
+static const struct rust_op *
+ast_unary (enum exp_opcode opcode, const struct rust_op *expr)
+{
+  return ast_operation (opcode, expr, NULL);
+}
+
+/* Make a cast operation.  */
+
+static const struct rust_op *
+ast_cast (const struct rust_op *expr, const struct rust_op *type)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = UNOP_CAST;
+  result->left.op = expr;
+  result->right.op = type;
+
+  return result;
+}
+
+/* Make a call-like operation.  This is nominally a function call, but
+   when lowering we may discover that it actually represents the
+   creation of a tuple struct.  */
+
+static const struct rust_op *
+ast_call_ish (enum exp_opcode opcode, const struct rust_op *expr,
+	       VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = opcode;
+  result->left.op = expr;
+  result->right.params = params;
+
+  return result;
+}
+
+/* Make a structure creation operation.  */
+
+static const struct rust_op *
+ast_struct (const struct rust_op *name, VEC (set_field) **fields)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_AGGREGATE;
+  result->left.op = name;
+  result->right.field_inits = fields;
+
+  return result;
+}
+
+/* Make an identifier path.  */
+
+static const struct rust_op *
+ast_path (struct stoken path, VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_VAR_VALUE;
+  result->left.sval = path;
+  result->right.params = params;
+
+  return result;
+}
+
+/* Make a string constant operation.  */
+
+static const struct rust_op *
+ast_string (struct stoken str)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_STRING;
+  result->left.sval = str;
+
+  return result;
+}
+
+/* Make a field expression.  */
+
+static const struct rust_op *
+ast_structop (const struct rust_op *left, const char *name, int completing)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = STRUCTOP_STRUCT;
+  result->completing = completing;
+  result->left.op = left;
+  result->right.sval = make_stoken (name);
+
+  return result;
+}
+
+/* Make an anonymous struct operation, like 'x.0'.  */
+
+static const struct rust_op *
+ast_structop_anonymous (const struct rust_op *left,
+			 struct typed_val_int number)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = STRUCTOP_ANONYMOUS;
+  result->left.op = left;
+  result->right.typed_val_int = number;
+
+  return result;
+}
+
+/* Make a range operation.  */
+
+static const struct rust_op *
+ast_range (const struct rust_op *lhs, const struct rust_op *rhs)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_RANGE;
+  result->left.op = lhs;
+  result->right.op = rhs;
+
+  return result;
+}
+
+/* A helper function to make a type-related AST node.  */
+
+static struct rust_op *
+ast_basic_type (enum type_code typecode)
+{
+  struct rust_op *result = OBSTACK_ZALLOC (&work_obstack, struct rust_op);
+
+  result->opcode = OP_TYPE;
+  result->typecode = typecode;
+  return result;
+}
+
+/* Create an AST node describing an array type.  */
+
+static const struct rust_op *
+ast_array_type (const struct rust_op *lhs, struct typed_val_int val)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_ARRAY);
+
+  result->left.op = lhs;
+  result->right.typed_val_int = val;
+  return result;
+}
+
+/* Create an AST node describing a reference type.  */
+
+static const struct rust_op *
+ast_slice_type (const struct rust_op *type)
+{
+  /* Use TYPE_CODE_COMPLEX just because it is handy.  */
+  struct rust_op *result = ast_basic_type (TYPE_CODE_COMPLEX);
+
+  result->left.op = type;
+  return result;
+}
+
+/* Create an AST node describing a reference type.  */
+
+static const struct rust_op *
+ast_reference_type (const struct rust_op *type)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_REF);
+
+  result->left.op = type;
+  return result;
+}
+
+/* Create an AST node describing a pointer type.  */
+
+static const struct rust_op *
+ast_pointer_type (const struct rust_op *type, int is_mut)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_PTR);
+
+  result->left.op = type;
+  /* For the time being we ignore is_mut.  */
+  return result;
+}
+
+/* Create an AST node describing a function type.  */
+
+static const struct rust_op *
+ast_function_type (const struct rust_op *rtype, VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_FUNC);
+
+  result->left.op = rtype;
+  result->right.params = params;
+  return result;
+}
+
+/* Create an AST node describing a tuple type.  */
+
+static const struct rust_op *
+ast_tuple_type (VEC (rust_op_ptr) **params)
+{
+  struct rust_op *result = ast_basic_type (TYPE_CODE_STRUCT);
+
+  result->left.params = params;
+  return result;
+}
+
+/* A helper to appropriately munge NAME and BLOCK depending on the
+   presence of a leading "::".  */
+
+static void
+munge_name_and_block (const char **name, const struct block **block)
+{
+  /* If it is a global reference, skip the current block in favor of
+     the static block.  */
+  if (strncmp (*name, "::", 2) == 0)
+    {
+      *name += 2;
+      *block = block_static_block (*block);
+    }
+}
+
+/* Like lookup_symbol, but handles Rust namespace conventions, and
+   doesn't require field_of_this_result.  */
+
+static struct block_symbol
+rust_lookup_symbol (const char *name, const struct block *block,
+		    const domain_enum domain)
+{
+  struct block_symbol result;
+
+  munge_name_and_block (&name, &block);
+
+  result = lookup_symbol (name, block, domain, NULL);
+  if (result.symbol != NULL)
+    update_innermost_block (result);
+  return result;
+}
+
+/* Look up a type, following Rust namespace conventions.  */
+
+static struct type *
+rust_lookup_type (const char *name, const struct block *block)
+{
+  struct block_symbol result;
+  struct type *type;
+
+  munge_name_and_block (&name, &block);
+
+  result = lookup_symbol (name, block, STRUCT_DOMAIN, NULL);
+  if (result.symbol != NULL)
+    {
+      update_innermost_block (result);
+      return SYMBOL_TYPE (result.symbol);
+    }
+
+  type = lookup_typename (parse_language (pstate), parse_gdbarch (pstate),
+			  name, NULL, 1);
+  if (type != NULL)
+    return type;
+
+  /* Last chance, try a built-in type.  */
+  return language_lookup_primitive_type (parse_language (pstate),
+					 parse_gdbarch (pstate),
+					 name);
+}
+
+static struct type *convert_ast_to_type (struct parser_state *state,
+					 const struct rust_op *operation);
+static const char *convert_name (struct parser_state *state,
+				 const struct rust_op *operation);
+
+/* Convert a vector of rust_ops representing types to a vector of
+   types.  */
+
+static std::vector<struct type *>
+convert_params_to_types (struct parser_state *state, VEC (rust_op_ptr) *params)
+{
+  int i;
+  const struct rust_op *op;
+  std::vector<struct type *> result;
+
+  for (i = 0; VEC_iterate (rust_op_ptr, params, i, op); ++i)
+    result.push_back (convert_ast_to_type (state, op));
+
+  return result;
+}
+
+/* Convert a rust_op representing a type to a struct type *.  */
+
+static struct type *
+convert_ast_to_type (struct parser_state *state,
+		     const struct rust_op *operation)
+{
+  struct type *type, *result = NULL;
+
+  if (operation->opcode == OP_VAR_VALUE)
+    {
+      const char *varname = convert_name (state, operation);
+
+      result = rust_lookup_type (varname, expression_context_block);
+      if (result == NULL)
+	error (_("No typed name '%s' in current context"), varname);
+      return result;
+    }
+
+  gdb_assert (operation->opcode == OP_TYPE);
+
+  switch (operation->typecode)
+    {
+    case TYPE_CODE_ARRAY:
+      type = convert_ast_to_type (state, operation->left.op);
+      if (operation->right.typed_val_int.val < 0)
+	error (_("Negative array length"));
+      result = lookup_array_range_type (type, 0,
+					operation->right.typed_val_int.val - 1);
+      break;
+
+    case TYPE_CODE_COMPLEX:
+      {
+	struct type *usize = rust_type ("usize");
+
+	type = convert_ast_to_type (state, operation->left.op);
+	result = rust_slice_type ("&[*gdb*]", type, usize);
+      }
+      break;
+
+    case TYPE_CODE_REF:
+    case TYPE_CODE_PTR:
+      /* For now we treat &x and *x identically.  */
+      type = convert_ast_to_type (state, operation->left.op);
+      result = lookup_pointer_type (type);
+      break;
+
+    case TYPE_CODE_FUNC:
+      {
+	std::vector<struct type *> args
+	  (convert_params_to_types (state, *operation->right.params));
+	struct type **argtypes = NULL;
+
+	type = convert_ast_to_type (state, operation->left.op);
+	if (!args.empty ())
+	  argtypes = args.data ();
+
+	result
+	  = lookup_function_type_with_arguments (type, args.size (),
+						 argtypes);
+	result = lookup_pointer_type (result);
+      }
+      break;
+
+    case TYPE_CODE_STRUCT:
+      {
+	std::vector<struct type *> args
+	  (convert_params_to_types (state, *operation->left.params));
+	int i;
+	struct type *type;
+	const char *name;
+
+	obstack_1grow (&work_obstack, '(');
+	for (i = 0; i < args.size (); ++i)
+	  {
+	    std::string type_name = type_to_string (args[i]);
+
+	    if (i > 0)
+	      obstack_1grow (&work_obstack, ',');
+	    obstack_grow_str (&work_obstack, type_name.c_str ());
+	  }
+
+	obstack_grow_str0 (&work_obstack, ")");
+	name = (const char *) obstack_finish (&work_obstack);
+
+	/* We don't allow creating new tuple types (yet), but we do
+	   allow looking up existing tuple types.  */
+	result = rust_lookup_type (name, expression_context_block);
+	if (result == NULL)
+	  error (_("could not find tuple type '%s'"), name);
+      }
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled opcode in convert_ast_to_type");
+    }
+
+  gdb_assert (result != NULL);
+  return result;
+}
+
+/* A helper function to turn a rust_op representing a name into a full
+   name.  This applies generic arguments as needed.  The returned name
+   is allocated on the work obstack.  */
+
+static const char *
+convert_name (struct parser_state *state, const struct rust_op *operation)
+{
+  int i;
+
+  gdb_assert (operation->opcode == OP_VAR_VALUE);
+
+  if (operation->right.params == NULL)
+    return operation->left.sval.ptr;
+
+  std::vector<struct type *> types
+    (convert_params_to_types (state, *operation->right.params));
+
+  obstack_grow_str (&work_obstack, operation->left.sval.ptr);
+  obstack_1grow (&work_obstack, '<');
+  for (i = 0; i < types.size (); ++i)
+    {
+      std::string type_name = type_to_string (types[i]);
+
+      if (i > 0)
+	obstack_1grow (&work_obstack, ',');
+
+      obstack_grow_str (&work_obstack, type_name.c_str ());
+    }
+  obstack_grow_str0 (&work_obstack, ">");
+
+  return (const char *) obstack_finish (&work_obstack);
+}
+
+static void convert_ast_to_expression (struct parser_state *state,
+				       const struct rust_op *operation,
+				       const struct rust_op *top);
+
+/* A helper function that converts a vec of rust_ops to a gdb
+   expression.  */
+
+static void
+convert_params_to_expression (struct parser_state *state,
+			      VEC (rust_op_ptr) *params,
+			      const struct rust_op *top)
+{
+  int i;
+  rust_op_ptr elem;
+
+  for (i = 0; VEC_iterate (rust_op_ptr, params, i, elem); ++i)
+    convert_ast_to_expression (state, elem, top);
+}
+
+/* Lower a rust_op to a gdb expression.  STATE is the parser state.
+   OPERATION is the operation to lower.  TOP is a pointer to the
+   top-most operation; it is used to handle the special case where the
+   top-most expression is an identifier and can be optionally lowered
+   to OP_TYPE.  */
+
+static void
+convert_ast_to_expression (struct parser_state *state,
+			   const struct rust_op *operation,
+			   const struct rust_op *top)
+{
+  switch (operation->opcode)
+    {
+    case OP_LONG:
+      write_exp_elt_opcode (state, OP_LONG);
+      write_exp_elt_type (state, operation->left.typed_val_int.type);
+      write_exp_elt_longcst (state, operation->left.typed_val_int.val);
+      write_exp_elt_opcode (state, OP_LONG);
+      break;
+
+    case OP_DOUBLE:
+      write_exp_elt_opcode (state, OP_DOUBLE);
+      write_exp_elt_type (state, operation->left.typed_val_float.type);
+      write_exp_elt_dblcst (state, operation->left.typed_val_float.dval);
+      write_exp_elt_opcode (state, OP_DOUBLE);
+      break;
+
+    case STRUCTOP_STRUCT:
+      {
+	convert_ast_to_expression (state, operation->left.op, top);
+
+	if (operation->completing)
+	  mark_struct_expression (state);
+	write_exp_elt_opcode (state, STRUCTOP_STRUCT);
+	write_exp_string (state, operation->right.sval);
+	write_exp_elt_opcode (state, STRUCTOP_STRUCT);
+      }
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      {
+	convert_ast_to_expression (state, operation->left.op, top);
+
+	write_exp_elt_opcode (state, STRUCTOP_ANONYMOUS);
+	write_exp_elt_longcst (state, operation->right.typed_val_int.val);
+	write_exp_elt_opcode (state, STRUCTOP_ANONYMOUS);
+      }
+      break;
+
+    case UNOP_PLUS:
+    case UNOP_NEG:
+    case UNOP_COMPLEMENT:
+    case UNOP_IND:
+    case UNOP_ADDR:
+    case UNOP_SIZEOF:
+      convert_ast_to_expression (state, operation->left.op, top);
+      write_exp_elt_opcode (state, operation->opcode);
+      break;
+
+    case BINOP_SUBSCRIPT:
+    case BINOP_MUL:
+    case BINOP_REPEAT:
+    case BINOP_DIV:
+    case BINOP_REM:
+    case BINOP_LESS:
+    case BINOP_GTR:
+    case BINOP_BITWISE_AND:
+    case BINOP_BITWISE_IOR:
+    case BINOP_BITWISE_XOR:
+    case BINOP_ADD:
+    case BINOP_SUB:
+    case BINOP_LOGICAL_OR:
+    case BINOP_LOGICAL_AND:
+    case BINOP_EQUAL:
+    case BINOP_NOTEQUAL:
+    case BINOP_LEQ:
+    case BINOP_GEQ:
+    case BINOP_LSH:
+    case BINOP_RSH:
+    case BINOP_ASSIGN:
+    case OP_RUST_ARRAY:
+      convert_ast_to_expression (state, operation->left.op, top);
+      convert_ast_to_expression (state, operation->right.op, top);
+      if (operation->compound_assignment)
+	{
+	  write_exp_elt_opcode (state, BINOP_ASSIGN_MODIFY);
+	  write_exp_elt_opcode (state, operation->opcode);
+	  write_exp_elt_opcode (state, BINOP_ASSIGN_MODIFY);
+	}
+      else
+	write_exp_elt_opcode (state, operation->opcode);
+
+      if (operation->compound_assignment
+	  || operation->opcode == BINOP_ASSIGN)
+	{
+	  struct type *type;
+
+	  type = language_lookup_primitive_type (parse_language (state),
+						 parse_gdbarch (state),
+						 "()");
+
+	  write_exp_elt_opcode (state, OP_LONG);
+	  write_exp_elt_type (state, type);
+	  write_exp_elt_longcst (state, 0);
+	  write_exp_elt_opcode (state, OP_LONG);
+
+	  write_exp_elt_opcode (state, BINOP_COMMA);
+	}
+      break;
+
+    case UNOP_CAST:
+      {
+	struct type *type = convert_ast_to_type (state, operation->right.op);
+
+	convert_ast_to_expression (state, operation->left.op, top);
+	write_exp_elt_opcode (state, UNOP_CAST);
+	write_exp_elt_type (state, type);
+	write_exp_elt_opcode (state, UNOP_CAST);
+      }
+      break;
+
+    case OP_FUNCALL:
+      {
+	if (operation->left.op->opcode == OP_VAR_VALUE)
+	  {
+	    struct type *type;
+	    const char *varname = convert_name (state, operation->left.op);
+
+	    type = rust_lookup_type (varname, expression_context_block);
+	    if (type != NULL)
+	      {
+		/* This is actually a tuple struct expression, not a
+		   call expression.  */
+		rust_op_ptr elem;
+		int i;
+		VEC (rust_op_ptr) *params = *operation->right.params;
+
+		if (TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
+		  {
+		    if (!rust_tuple_struct_type_p (type))
+		      error (_("Type %s is not a tuple struct"), varname);
+
+		    for (i = 0;
+			 VEC_iterate (rust_op_ptr, params, i, elem);
+			 ++i)
+		      {
+			char *cell = get_print_cell ();
+
+			xsnprintf (cell, PRINT_CELL_SIZE, "__%d", i);
+			write_exp_elt_opcode (state, OP_NAME);
+			write_exp_string (state, make_stoken (cell));
+			write_exp_elt_opcode (state, OP_NAME);
+
+			convert_ast_to_expression (state, elem, top);
+		      }
+
+		    write_exp_elt_opcode (state, OP_AGGREGATE);
+		    write_exp_elt_type (state, type);
+		    write_exp_elt_longcst (state,
+					   2 * VEC_length (rust_op_ptr,
+							   params));
+		    write_exp_elt_opcode (state, OP_AGGREGATE);
+		    break;
+		  }
+	      }
+	  }
+	convert_ast_to_expression (state, operation->left.op, top);
+	convert_params_to_expression (state, *operation->right.params, top);
+	write_exp_elt_opcode (state, OP_FUNCALL);
+	write_exp_elt_longcst (state, VEC_length (rust_op_ptr,
+						  *operation->right.params));
+	write_exp_elt_longcst (state, OP_FUNCALL);
+      }
+      break;
+
+    case OP_ARRAY:
+      gdb_assert (operation->left.op == NULL);
+      convert_params_to_expression (state, *operation->right.params, top);
+      write_exp_elt_opcode (state, OP_ARRAY);
+      write_exp_elt_longcst (state, 0);
+      write_exp_elt_longcst (state, VEC_length (rust_op_ptr,
+						*operation->right.params) - 1);
+      write_exp_elt_longcst (state, OP_ARRAY);
+      break;
+
+    case OP_VAR_VALUE:
+      {
+	struct block_symbol sym;
+	const char *varname;
+
+	if (operation->left.sval.ptr[0] == '$')
+	  {
+	    write_dollar_variable (state, operation->left.sval);
+	    break;
+	  }
+
+	varname = convert_name (state, operation);
+	sym = rust_lookup_symbol (varname, expression_context_block,
+				  VAR_DOMAIN);
+	if (sym.symbol != NULL)
+	  {
+	    write_exp_elt_opcode (state, OP_VAR_VALUE);
+	    write_exp_elt_block (state, sym.block);
+	    write_exp_elt_sym (state, sym.symbol);
+	    write_exp_elt_opcode (state, OP_VAR_VALUE);
+	  }
+	else
+	  {
+	    struct type *type;
+
+	    type = rust_lookup_type (varname, expression_context_block);
+	    if (type == NULL)
+	      error (_("No symbol '%s' in current context"), varname);
+
+	    if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+		&& TYPE_NFIELDS (type) == 0)
+	      {
+		/* A unit-like struct.  */
+		write_exp_elt_opcode (state, OP_AGGREGATE);
+		write_exp_elt_type (state, type);
+		write_exp_elt_longcst (state, 0);
+		write_exp_elt_opcode (state, OP_AGGREGATE);
+	      }
+	    else if (operation == top)
+	      {
+		write_exp_elt_opcode (state, OP_TYPE);
+		write_exp_elt_type (state, type);
+		write_exp_elt_opcode (state, OP_TYPE);
+		break;
+	      }
+	  }
+      }
+      break;
+
+    case OP_AGGREGATE:
+      {
+	int i;
+	int length;
+	struct set_field *init;
+	VEC (set_field) *fields = *operation->right.field_inits;
+	struct type *type;
+	const char *name;
+
+	length = 0;
+	for (i = 0; VEC_iterate (set_field, fields, i, init); ++i)
+	  {
+	    if (init->name.ptr != NULL)
+	      {
+		write_exp_elt_opcode (state, OP_NAME);
+		write_exp_string (state, init->name);
+		write_exp_elt_opcode (state, OP_NAME);
+		++length;
+	      }
+
+	    convert_ast_to_expression (state, init->init, top);
+	    ++length;
+
+	    if (init->name.ptr == NULL)
+	      {
+		/* This is handled differently from Ada in our
+		   evaluator.  */
+		write_exp_elt_opcode (state, OP_OTHERS);
+	      }
+	  }
+
+	name = convert_name (state, operation->left.op);
+	type = rust_lookup_type (name, expression_context_block);
+	if (type == NULL)
+	  error (_("Could not find type '%s'"), operation->left.sval.ptr);
+
+	if (TYPE_CODE (type) != TYPE_CODE_STRUCT
+	    || rust_tuple_type_p (type)
+	    || rust_tuple_struct_type_p (type))
+	  error (_("Struct expression applied to non-struct type"));
+
+	write_exp_elt_opcode (state, OP_AGGREGATE);
+	write_exp_elt_type (state, type);
+	write_exp_elt_longcst (state, length);
+	write_exp_elt_opcode (state, OP_AGGREGATE);
+      }
+      break;
+
+    case OP_STRING:
+      {
+	write_exp_elt_opcode (state, OP_STRING);
+	write_exp_string (state, operation->left.sval);
+	write_exp_elt_opcode (state, OP_STRING);
+      }
+      break;
+
+    case OP_RANGE:
+      {
+	enum range_type kind = BOTH_BOUND_DEFAULT;
+
+	if (operation->left.op != NULL)
+	  {
+	    convert_ast_to_expression (state, operation->left.op, top);
+	    kind = HIGH_BOUND_DEFAULT;
+	  }
+	if (operation->right.op != NULL)
+	  {
+	    convert_ast_to_expression (state, operation->right.op, top);
+	    if (kind == BOTH_BOUND_DEFAULT)
+	      kind = LOW_BOUND_DEFAULT;
+	    else
+	      {
+		gdb_assert (kind == HIGH_BOUND_DEFAULT);
+		kind = NONE_BOUND_DEFAULT;
+	      }
+	  }
+	write_exp_elt_opcode (state, OP_RANGE);
+	write_exp_elt_longcst (state, kind);
+	write_exp_elt_opcode (state, OP_RANGE);
+      }
+      break;
+
+    default:
+      gdb_assert_not_reached ("unhandled opcode in convert_ast_to_expression");
+    }
+}
+
+
+
+/* The parser as exposed to gdb.  */
+
+int
+rust_parse (struct parser_state *state)
+{
+  int result;
+  struct cleanup *cleanup;
+
+  obstack_init (&work_obstack);
+  cleanup = make_cleanup_obstack_free (&work_obstack);
+  rust_ast = NULL;
+
+  pstate = state;
+  result = rustyyparse ();
+
+  if (!result || (parse_completion && rust_ast != NULL))
+    {
+      const struct rust_op *ast = rust_ast;
+
+      rust_ast = NULL;
+      gdb_assert (ast != NULL);
+      convert_ast_to_expression (state, ast, ast);
+    }
+
+  do_cleanups (cleanup);
+  return result;
+}
+
+/* The parser error handler.  */
+
+void
+rustyyerror (char *msg)
+{
+  const char *where = prev_lexptr ? prev_lexptr : lexptr;
+  error (_("%s in expression, near `%s'."), (msg ? msg : "Error"), where);
+}
+
+
+
+#if GDB_SELF_TEST
+
+/* Initialize the lexer for testing.  */
+
+static void
+rust_lex_test_init (const char *input)
+{
+  prev_lexptr = NULL;
+  lexptr = input;
+  paren_depth = 0;
+}
+
+/* A test helper that lexes a string, expecting a single token.  It
+   returns the lexer data for this token.  */
+
+static RUSTSTYPE
+rust_lex_test_one (const char *input, int expected)
+{
+  int token;
+  RUSTSTYPE result;
+
+  rust_lex_test_init (input);
+
+  token = rustyylex ();
+  SELF_CHECK (token == expected);
+  result = rustyylval;
+
+  if (token)
+    {
+      token = rustyylex ();
+      SELF_CHECK (token == 0);
+    }
+
+  return result;
+}
+
+/* Test that INPUT lexes as the integer VALUE.  */
+
+static void
+rust_lex_int_test (const char *input, int value, int kind)
+{
+  RUSTSTYPE result = rust_lex_test_one (input, kind);
+  SELF_CHECK (result.typed_val_int.val == value);
+}
+
+/* Test that INPUT throws an exception with text ERR.  */
+
+static void
+rust_lex_exception_test (const char *input, const char *err)
+{
+  TRY
+    {
+      /* The "kind" doesn't matter.  */
+      rust_lex_test_one (input, DECIMAL_INTEGER);
+      SELF_CHECK (0);
+    }
+  CATCH (except, RETURN_MASK_ERROR)
+    {
+      SELF_CHECK (strcmp (except.message, err) == 0);
+    }
+  END_CATCH
+}
+
+/* Test that INPUT lexes as the identifier, string, or byte-string
+   VALUE.  KIND holds the expected token kind.  */
+
+static void
+rust_lex_stringish_test (const char *input, const char *value, int kind)
+{
+  RUSTSTYPE result = rust_lex_test_one (input, kind);
+  SELF_CHECK (result.sval.length == strlen (value));
+  SELF_CHECK (strncmp (result.sval.ptr, value, result.sval.length) == 0);
+}
+
+/* Helper to test that a string parses as a given token sequence.  */
+
+static void
+rust_lex_test_sequence (const char *input, int len, const int expected[])
+{
+  int i;
+
+  lexptr = input;
+  paren_depth = 0;
+
+  for (i = 0; i < len; ++i)
+    {
+      int token = rustyylex ();
+
+      SELF_CHECK (token == expected[i]);
+    }
+}
+
+/* Tests for an integer-parsing corner case.  */
+
+static void
+rust_lex_test_trailing_dot (void)
+{
+  const int expected1[] = { DECIMAL_INTEGER, '.', IDENT, '(', ')', 0 };
+  const int expected2[] = { INTEGER, '.', IDENT, '(', ')', 0 };
+  const int expected3[] = { FLOAT, EQEQ, '(', ')', 0 };
+  const int expected4[] = { DECIMAL_INTEGER, DOTDOT, DECIMAL_INTEGER, 0 };
+
+  rust_lex_test_sequence ("23.g()", ARRAY_SIZE (expected1), expected1);
+  rust_lex_test_sequence ("23_0.g()", ARRAY_SIZE (expected2), expected2);
+  rust_lex_test_sequence ("23.==()", ARRAY_SIZE (expected3), expected3);
+  rust_lex_test_sequence ("23..25", ARRAY_SIZE (expected4), expected4);
+}
+
+/* Tests of completion.  */
+
+static void
+rust_lex_test_completion (void)
+{
+  const int expected[] = { IDENT, '.', COMPLETE, 0 };
+
+  parse_completion = 1;
+
+  rust_lex_test_sequence ("something.wha", ARRAY_SIZE (expected), expected);
+  rust_lex_test_sequence ("something.", ARRAY_SIZE (expected), expected);
+
+  parse_completion = 0;
+}
+
+/* Test pushback.  */
+
+static void
+rust_lex_test_push_back (void)
+{
+  int token;
+
+  rust_lex_test_init (">>=");
+
+  token = rustyylex ();
+  SELF_CHECK (token == COMPOUND_ASSIGN);
+  SELF_CHECK (rustyylval.opcode == BINOP_RSH);
+
+  rust_push_back ('=');
+
+  token = rustyylex ();
+  SELF_CHECK (token == '=');
+
+  token = rustyylex ();
+  SELF_CHECK (token == 0);
+}
+
+/* Unit test the lexer.  */
+
+static void
+rust_lex_tests (void)
+{
+  int i;
+
+  obstack_init (&work_obstack);
+  unit_testing = 1;
+
+  rust_lex_test_one ("", 0);
+  rust_lex_test_one ("    \t  \n \r  ", 0);
+  rust_lex_test_one ("thread 23", 0);
+  rust_lex_test_one ("task 23", 0);
+  rust_lex_test_one ("th 104", 0);
+  rust_lex_test_one ("ta 97", 0);
+
+  rust_lex_int_test ("'z'", 'z', INTEGER);
+  rust_lex_int_test ("'\\xff'", 0xff, INTEGER);
+  rust_lex_int_test ("'\\u{1016f}'", 0x1016f, INTEGER);
+  rust_lex_int_test ("b'z'", 'z', INTEGER);
+  rust_lex_int_test ("b'\\xfe'", 0xfe, INTEGER);
+  rust_lex_int_test ("b'\\xFE'", 0xfe, INTEGER);
+  rust_lex_int_test ("b'\\xfE'", 0xfe, INTEGER);
+
+  /* Test all escapes in both modes.  */
+  rust_lex_int_test ("'\\n'", '\n', INTEGER);
+  rust_lex_int_test ("'\\r'", '\r', INTEGER);
+  rust_lex_int_test ("'\\t'", '\t', INTEGER);
+  rust_lex_int_test ("'\\\\'", '\\', INTEGER);
+  rust_lex_int_test ("'\\0'", '\0', INTEGER);
+  rust_lex_int_test ("'\\''", '\'', INTEGER);
+  rust_lex_int_test ("'\\\"'", '"', INTEGER);
+
+  rust_lex_int_test ("b'\\n'", '\n', INTEGER);
+  rust_lex_int_test ("b'\\r'", '\r', INTEGER);
+  rust_lex_int_test ("b'\\t'", '\t', INTEGER);
+  rust_lex_int_test ("b'\\\\'", '\\', INTEGER);
+  rust_lex_int_test ("b'\\0'", '\0', INTEGER);
+  rust_lex_int_test ("b'\\''", '\'', INTEGER);
+  rust_lex_int_test ("b'\\\"'", '"', INTEGER);
+
+  rust_lex_exception_test ("'z", "Unterminated character literal");
+  rust_lex_exception_test ("b'\\x0'", "Not enough hex digits seen");
+  rust_lex_exception_test ("b'\\u{0}'", "Unicode escape in byte literal");
+  rust_lex_exception_test ("'\\x0'", "Not enough hex digits seen");
+  rust_lex_exception_test ("'\\u0'", "Missing '{' in Unicode escape");
+  rust_lex_exception_test ("'\\u{0", "Missing '}' in Unicode escape");
+  rust_lex_exception_test ("'\\u{0000007}", "Overlong hex escape");
+  rust_lex_exception_test ("'\\u{}", "Not enough hex digits seen");
+  rust_lex_exception_test ("'\\Q'", "Invalid escape \\Q in literal");
+  rust_lex_exception_test ("b'\\Q'", "Invalid escape \\Q in literal");
+
+  rust_lex_int_test ("23", 23, DECIMAL_INTEGER);
+  rust_lex_int_test ("2_344__29", 234429, INTEGER);
+  rust_lex_int_test ("0x1f", 0x1f, INTEGER);
+  rust_lex_int_test ("23usize", 23, INTEGER);
+  rust_lex_int_test ("23i32", 23, INTEGER);
+  rust_lex_int_test ("0x1_f", 0x1f, INTEGER);
+  rust_lex_int_test ("0b1_101011__", 0x6b, INTEGER);
+  rust_lex_int_test ("0o001177i64", 639, INTEGER);
+
+  rust_lex_test_trailing_dot ();
+
+  rust_lex_test_one ("23.", FLOAT);
+  rust_lex_test_one ("23.99f32", FLOAT);
+  rust_lex_test_one ("23e7", FLOAT);
+  rust_lex_test_one ("23E-7", FLOAT);
+  rust_lex_test_one ("23e+7", FLOAT);
+  rust_lex_test_one ("23.99e+7f64", FLOAT);
+  rust_lex_test_one ("23.82f32", FLOAT);
+
+  rust_lex_stringish_test ("hibob", "hibob", IDENT);
+  rust_lex_stringish_test ("hibob__93", "hibob__93", IDENT);
+  rust_lex_stringish_test ("thread", "thread", IDENT);
+
+  rust_lex_stringish_test ("\"string\"", "string", STRING);
+  rust_lex_stringish_test ("\"str\\ting\"", "str\ting", STRING);
+  rust_lex_stringish_test ("\"str\\\"ing\"", "str\"ing", STRING);
+  rust_lex_stringish_test ("r\"str\\ing\"", "str\\ing", STRING);
+  rust_lex_stringish_test ("r#\"str\\ting\"#", "str\\ting", STRING);
+  rust_lex_stringish_test ("r###\"str\\\"ing\"###", "str\\\"ing", STRING);
+
+  rust_lex_stringish_test ("b\"string\"", "string", BYTESTRING);
+  rust_lex_stringish_test ("b\"\x73tring\"", "string", BYTESTRING);
+  rust_lex_stringish_test ("b\"str\\\"ing\"", "str\"ing", BYTESTRING);
+  rust_lex_stringish_test ("br####\"\\x73tring\"####", "\\x73tring",
+			   BYTESTRING);
+
+  for (i = 0; i < ARRAY_SIZE (identifier_tokens); ++i)
+    rust_lex_test_one (identifier_tokens[i].name, identifier_tokens[i].value);
+
+  for (i = 0; i < ARRAY_SIZE (operator_tokens); ++i)
+    rust_lex_test_one (operator_tokens[i].name, operator_tokens[i].value);
+
+  rust_lex_test_completion ();
+  rust_lex_test_push_back ();
+
+  obstack_free (&work_obstack, NULL);
+  unit_testing = 0;
+}
+
+#endif /* GDB_SELF_TEST */
+
+void
+_initialize_rust_exp (void)
+{
+  int code = regcomp (&number_regex, number_regex_text, REG_EXTENDED);
+  /* If the regular expression was incorrect, it was a programming
+     error.  */
+  gdb_assert (code == 0);
+
+#if GDB_SELF_TEST
+  register_self_test (rust_lex_tests);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-lang.c ./gdb/rust-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-lang.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/rust-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,2191 @@
+/* Rust language support routines for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+
+#include <ctype.h>
+
+#include "block.h"
+#include "c-lang.h"
+#include "charset.h"
+#include "cp-support.h"
+#include "demangle.h"
+#include "gdbarch.h"
+#include "infcall.h"
+#include "objfiles.h"
+#include "rust-lang.h"
+#include "valprint.h"
+#include "varobj.h"
+#include <string>
+#include <vector>
+
+extern initialize_file_ftype _initialize_rust_language;
+
+/* Returns the last segment of a Rust path like foo::bar::baz.  Will
+   not handle cases where the last segment contains generics.  This
+   will return NULL if the last segment cannot be found.  */
+
+static const char *
+rust_last_path_segment (const char * path)
+{
+  const char *result = strrchr (path, ':');
+
+  if (result == NULL)
+    return NULL;
+  return result + 1;
+}
+
+/* See rust-lang.h.  */
+
+std::string
+rust_crate_for_block (const struct block *block)
+{
+  const char *scope = block_scope (block);
+
+  if (scope[0] == '\0')
+    return std::string ();
+
+  return std::string (scope, cp_find_first_component (scope));
+}
+
+/* Information about the discriminant/variant of an enum */
+
+struct disr_info
+{
+  /* Name of field.  */
+  std::string name;
+  /* Field number in union.  Negative on error.  For an encoded enum,
+     the "hidden" member will always be field 1, and the "real" member
+     will always be field 0.  */
+  int field_no;
+  /* True if this is an encoded enum that has a single "real" member
+     and a single "hidden" member.  */
+  unsigned int is_encoded : 1;
+};
+
+/* The prefix of a specially-encoded enum.  */
+
+#define RUST_ENUM_PREFIX "RUST$ENCODED$ENUM$"
+
+/* The number of the real field.  */
+
+#define RUST_ENCODED_ENUM_REAL 0
+
+/* The number of the hidden field.  */
+
+#define RUST_ENCODED_ENUM_HIDDEN 1
+
+/* Whether or not a TYPE_CODE_UNION value is an untagged union
+   as opposed to being a regular Rust enum.  */
+static bool
+rust_union_is_untagged (struct type *type)
+{
+  /* Unions must have at least one field.  */
+  if (TYPE_NFIELDS (type) == 0)
+    return false;
+  /* If the first field is named, but the name has the rust enum prefix,
+     it is an enum.  */
+  if (strncmp (TYPE_FIELD_NAME (type, 0), RUST_ENUM_PREFIX,
+	       strlen (RUST_ENUM_PREFIX)) == 0)
+    return false;
+  /* Unions only have named fields.  */
+  for (int i = 0; i < TYPE_NFIELDS (type); ++i)
+    {
+      if (strlen (TYPE_FIELD_NAME (type, i)) == 0)
+        return false;
+    }
+  return true;
+}
+
+/* Utility function to get discriminant info for a given value.  */
+
+static struct disr_info
+rust_get_disr_info (struct type *type, const gdb_byte *valaddr,
+                    int embedded_offset, CORE_ADDR address,
+                    struct value *val)
+{
+  int i;
+  struct disr_info ret;
+  struct type *disr_type;
+  struct value_print_options opts;
+  const char *name_segment;
+
+  get_no_prettyformat_print_options (&opts);
+
+  ret.field_no = -1;
+  ret.is_encoded = 0;
+
+  if (TYPE_NFIELDS (type) == 0)
+    error (_("Encountered void enum value"));
+
+  /* If an enum has two values where one is empty and the other holds
+     a pointer that cannot be zero; then the Rust compiler optimizes
+     away the discriminant and instead uses a zero value in the
+     pointer field to indicate the empty variant.  */
+  if (strncmp (TYPE_FIELD_NAME (type, 0), RUST_ENUM_PREFIX,
+	       strlen (RUST_ENUM_PREFIX)) == 0)
+    {
+      char *tail, *token, *saveptr = NULL;
+      unsigned long fieldno;
+      struct type *member_type;
+      LONGEST value;
+
+      ret.is_encoded = 1;
+
+      if (TYPE_NFIELDS (type) != 1)
+	error (_("Only expected one field in %s type"), RUST_ENUM_PREFIX);
+
+      /* Optimized enums have only one field.  */
+      member_type = TYPE_FIELD_TYPE (type, 0);
+
+      std::string name (TYPE_FIELD_NAME (type, 0));
+      tail = &name[0] + strlen (RUST_ENUM_PREFIX);
+
+      /* The location of the value that doubles as a discriminant is
+         stored in the name of the field, as
+         RUST$ENCODED$ENUM$<fieldno>$<fieldno>$...$<variantname>
+         where the fieldnos are the indices of the fields that should be
+         traversed in order to find the field (which may be several fields deep)
+         and the variantname is the name of the variant of the case when the
+         field is zero.  */
+      for (token = strtok_r (tail, "$", &saveptr);
+           token != NULL;
+           token = strtok_r (NULL, "$", &saveptr))
+        {
+	  if (sscanf (token, "%lu", &fieldno) != 1)
+	    {
+	      /* We have reached the enum name, which cannot start
+		 with a digit.  */
+	      break;
+	    }
+          if (fieldno >= TYPE_NFIELDS (member_type))
+	    error (_("%s refers to field after end of member type"),
+		   RUST_ENUM_PREFIX);
+
+          embedded_offset += TYPE_FIELD_BITPOS (member_type, fieldno) / 8;
+          member_type = TYPE_FIELD_TYPE (member_type, fieldno);
+        }
+
+      if (token == NULL)
+	error (_("Invalid form for %s"), RUST_ENUM_PREFIX);
+      value = unpack_long (member_type, valaddr + embedded_offset);
+
+      if (value == 0)
+	{
+	  ret.field_no = RUST_ENCODED_ENUM_HIDDEN;
+	  ret.name = std::string (TYPE_NAME (type)) + "::" + token;
+	}
+      else
+	{
+	  ret.field_no = RUST_ENCODED_ENUM_REAL;
+	  ret.name = (std::string (TYPE_NAME (type)) + "::"
+		      + rust_last_path_segment (TYPE_NAME (TYPE_FIELD_TYPE (type, 0))));
+	}
+
+      return ret;
+    }
+
+  disr_type = TYPE_FIELD_TYPE (type, 0);
+
+  if (TYPE_NFIELDS (disr_type) == 0)
+    {
+      /* This is a bounds check and should never be hit unless Rust
+	 has changed its debuginfo format.  */
+      error (_("Could not find enum discriminant field"));
+    }
+  else if (TYPE_NFIELDS (type) == 1)
+    {
+      /* Sometimes univariant enums are encoded without a
+         discriminant.  In that case, treating it as an encoded enum
+         with the first field being the actual type works.  */
+      const char *field_name = TYPE_NAME (TYPE_FIELD_TYPE (type, 0));
+      const char *last = rust_last_path_segment (field_name);
+      ret.name = std::string (TYPE_NAME (type)) + "::" + last;
+      ret.field_no = RUST_ENCODED_ENUM_REAL;
+      ret.is_encoded = 1;
+      return ret;
+    }
+
+  if (strcmp (TYPE_FIELD_NAME (disr_type, 0), "RUST$ENUM$DISR") != 0)
+    error (_("Rust debug format has changed"));
+
+  string_file temp_file;
+  /* The first value of the first field (or any field)
+     is the discriminant value.  */
+  c_val_print (TYPE_FIELD_TYPE (disr_type, 0),
+	       (embedded_offset + TYPE_FIELD_BITPOS (type, 0) / 8
+		+ TYPE_FIELD_BITPOS (disr_type, 0) / 8),
+	       address, &temp_file,
+	       0, val, &opts);
+
+  ret.name = std::move (temp_file.string ());
+  name_segment = rust_last_path_segment (ret.name.c_str ());
+  if (name_segment != NULL)
+    {
+      for (i = 0; i < TYPE_NFIELDS (type); ++i)
+	{
+	  /* Sadly, the discriminant value paths do not match the type
+	     field name paths ('core::option::Option::Some' vs
+	     'core::option::Some').  However, enum variant names are
+	     unique in the last path segment and the generics are not
+	     part of this path, so we can just compare those.  This is
+	     hackish and would be better fixed by improving rustc's
+	     metadata for enums.  */
+	  const char *field_type = TYPE_NAME (TYPE_FIELD_TYPE (type, i));
+
+	  if (field_type != NULL
+	      && strcmp (name_segment,
+			 rust_last_path_segment (field_type)) == 0)
+	    {
+	      ret.field_no = i;
+	      break;
+	    }
+	}
+    }
+
+  if (ret.field_no == -1 && !ret.name.empty ())
+    {
+      /* Somehow the discriminant wasn't found.  */
+      error (_("Could not find variant of %s with discriminant %s"),
+	     TYPE_TAG_NAME (type), ret.name.c_str ());
+    }
+
+  return ret;
+}
+
+/* See rust-lang.h.  */
+
+bool
+rust_tuple_type_p (struct type *type)
+{
+  /* The current implementation is a bit of a hack, but there's
+     nothing else in the debuginfo to distinguish a tuple from a
+     struct.  */
+  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	  && TYPE_TAG_NAME (type) != NULL
+	  && TYPE_TAG_NAME (type)[0] == '(');
+}
+
+
+/* Return true if all non-static fields of a structlike type are in a
+   sequence like __0, __1, __2.  OFFSET lets us skip fields.  */
+
+static bool
+rust_underscore_fields (struct type *type, int offset)
+{
+  int i, field_number;
+
+  field_number = 0;
+
+  if (TYPE_CODE (type) != TYPE_CODE_STRUCT)
+    return false;
+  for (i = 0; i < TYPE_NFIELDS (type); ++i)
+    {
+      if (!field_is_static (&TYPE_FIELD (type, i)))
+	{
+	  if (offset > 0)
+	    offset--;
+	  else
+	    {
+	      char buf[20];
+
+	      xsnprintf (buf, sizeof (buf), "__%d", field_number);
+	      if (strcmp (buf, TYPE_FIELD_NAME (type, i)) != 0)
+		return false;
+	      field_number++;
+	    }
+	}
+    }
+  return true;
+}
+
+/* See rust-lang.h.  */
+
+bool
+rust_tuple_struct_type_p (struct type *type)
+{
+  /* This is just an approximation until DWARF can represent Rust more
+     precisely.  We exclude zero-length structs because they may not
+     be tuple structs, and there's no way to tell.  */
+  return TYPE_NFIELDS (type) > 0 && rust_underscore_fields (type, 0);
+}
+
+/* Return true if a variant TYPE is a tuple variant, false otherwise.  */
+
+static bool
+rust_tuple_variant_type_p (struct type *type)
+{
+  /* First field is discriminant */
+  return rust_underscore_fields (type, 1);
+}
+
+/* Return true if TYPE is a slice type, otherwise false.  */
+
+static bool
+rust_slice_type_p (struct type *type)
+{
+  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	  && TYPE_TAG_NAME (type) != NULL
+	  && strncmp (TYPE_TAG_NAME (type), "&[", 2) == 0);
+}
+
+/* Return true if TYPE is a range type, otherwise false.  */
+
+static bool
+rust_range_type_p (struct type *type)
+{
+  int i;
+
+  if (TYPE_CODE (type) != TYPE_CODE_STRUCT
+      || TYPE_NFIELDS (type) > 2
+      || TYPE_TAG_NAME (type) == NULL
+      || strstr (TYPE_TAG_NAME (type), "::Range") == NULL)
+    return false;
+
+  if (TYPE_NFIELDS (type) == 0)
+    return true;
+
+  i = 0;
+  if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
+    {
+      if (TYPE_NFIELDS (type) == 1)
+	return true;
+      i = 1;
+    }
+  else if (TYPE_NFIELDS (type) == 2)
+    {
+      /* First field had to be "start".  */
+      return false;
+    }
+
+  return strcmp (TYPE_FIELD_NAME (type, i), "end") == 0;
+}
+
+/* Return true if TYPE seems to be the type "u8", otherwise false.  */
+
+static bool
+rust_u8_type_p (struct type *type)
+{
+  return (TYPE_CODE (type) == TYPE_CODE_INT
+	  && TYPE_UNSIGNED (type)
+	  && TYPE_LENGTH (type) == 1);
+}
+
+/* Return true if TYPE is a Rust character type.  */
+
+static bool
+rust_chartype_p (struct type *type)
+{
+  return (TYPE_CODE (type) == TYPE_CODE_CHAR
+	  && TYPE_LENGTH (type) == 4
+	  && TYPE_UNSIGNED (type));
+}
+
+
+
+/* la_emitchar implementation for Rust.  */
+
+static void
+rust_emitchar (int c, struct type *type, struct ui_file *stream, int quoter)
+{
+  if (!rust_chartype_p (type))
+    generic_emit_char (c, type, stream, quoter,
+		       target_charset (get_type_arch (type)));
+  else if (c == '\\' || c == quoter)
+    fprintf_filtered (stream, "\\%c", c);
+  else if (c == '\n')
+    fputs_filtered ("\\n", stream);
+  else if (c == '\r')
+    fputs_filtered ("\\r", stream);
+  else if (c == '\t')
+    fputs_filtered ("\\t", stream);
+  else if (c == '\0')
+    fputs_filtered ("\\0", stream);
+  else if (c >= 32 && c <= 127 && isprint (c))
+    fputc_filtered (c, stream);
+  else if (c <= 255)
+    fprintf_filtered (stream, "\\x%02x", c);
+  else
+    fprintf_filtered (stream, "\\u{%06x}", c);
+}
+
+/* la_printchar implementation for Rust.  */
+
+static void
+rust_printchar (int c, struct type *type, struct ui_file *stream)
+{
+  fputs_filtered ("'", stream);
+  LA_EMIT_CHAR (c, type, stream, '\'');
+  fputs_filtered ("'", stream);
+}
+
+/* la_printstr implementation for Rust.  */
+
+static void
+rust_printstr (struct ui_file *stream, struct type *type,
+	       const gdb_byte *string, unsigned int length,
+	       const char *user_encoding, int force_ellipses,
+	       const struct value_print_options *options)
+{
+  /* Rust always uses UTF-8, but let the caller override this if need
+     be.  */
+  const char *encoding = user_encoding;
+  if (user_encoding == NULL || !*user_encoding)
+    {
+      /* In Rust strings, characters are "u8".  */
+      if (rust_u8_type_p (type))
+	encoding = "UTF-8";
+      else
+	{
+	  /* This is probably some C string, so let's let C deal with
+	     it.  */
+	  c_printstr (stream, type, string, length, user_encoding,
+		      force_ellipses, options);
+	  return;
+	}
+    }
+
+  /* This is not ideal as it doesn't use our character printer.  */
+  generic_printstr (stream, type, string, length, encoding, force_ellipses,
+		    '"', 0, options);
+}
+
+
+
+/* rust_print_type branch for structs and untagged unions.  */
+
+static void
+val_print_struct (struct type *type, int embedded_offset,
+		  CORE_ADDR address, struct ui_file *stream,
+		  int recurse, struct value *val,
+		  const struct value_print_options *options)
+{
+  int i;
+  int first_field;
+  bool is_tuple = rust_tuple_type_p (type);
+  bool is_tuple_struct = !is_tuple && rust_tuple_struct_type_p (type);
+  struct value_print_options opts;
+
+  if (!is_tuple)
+    {
+      if (TYPE_TAG_NAME (type) != NULL)
+        fprintf_filtered (stream, "%s", TYPE_TAG_NAME (type));
+
+      if (TYPE_NFIELDS (type) == 0)
+        return;
+
+      if (TYPE_TAG_NAME (type) != NULL)
+        fputs_filtered (" ", stream);
+    }
+
+  if (is_tuple || is_tuple_struct)
+    fputs_filtered ("(", stream);
+  else
+    fputs_filtered ("{", stream);
+
+  opts = *options;
+  opts.deref_ref = 0;
+
+  first_field = 1;
+  for (i = 0; i < TYPE_NFIELDS (type); ++i)
+    {
+      if (field_is_static (&TYPE_FIELD (type, i)))
+        continue;
+
+      if (!first_field)
+        fputs_filtered (",", stream);
+
+      if (options->prettyformat)
+        {
+	  fputs_filtered ("\n", stream);
+	  print_spaces_filtered (2 + 2 * recurse, stream);
+        }
+      else if (!first_field)
+        fputs_filtered (" ", stream);
+
+      first_field = 0;
+
+      if (!is_tuple && !is_tuple_struct)
+        {
+	  fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
+	  fputs_filtered (": ", stream);
+        }
+
+      val_print (TYPE_FIELD_TYPE (type, i),
+		 embedded_offset + TYPE_FIELD_BITPOS (type, i) / 8,
+		 address,
+		 stream, recurse + 1, val, &opts,
+		 current_language);
+    }
+
+  if (options->prettyformat)
+    {
+      fputs_filtered ("\n", stream);
+      print_spaces_filtered (2 * recurse, stream);
+    }
+
+  if (is_tuple || is_tuple_struct)
+    fputs_filtered (")", stream);
+  else
+    fputs_filtered ("}", stream);
+}
+
+static const struct generic_val_print_decorations rust_decorations =
+{
+  /* Complex isn't used in Rust, but we provide C-ish values just in
+     case.  */
+  "",
+  " + ",
+  " * I",
+  "true",
+  "false",
+  "()",
+  "[",
+  "]"
+};
+
+/* la_val_print implementation for Rust.  */
+
+static void
+rust_val_print (struct type *type, int embedded_offset,
+		CORE_ADDR address, struct ui_file *stream, int recurse,
+		struct value *val,
+		const struct value_print_options *options)
+{
+  const gdb_byte *valaddr = value_contents_for_printing (val);
+
+  type = check_typedef (type);
+  switch (TYPE_CODE (type))
+    {
+    case TYPE_CODE_PTR:
+      {
+	LONGEST low_bound, high_bound;
+	
+	if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY
+	    && rust_u8_type_p (TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (type)))
+	    && get_array_bounds (TYPE_TARGET_TYPE (type), &low_bound,
+				 &high_bound)) {
+	  /* We have a pointer to a byte string, so just print
+	     that.  */
+	  struct type *elttype = check_typedef (TYPE_TARGET_TYPE (type));
+	  CORE_ADDR addr;
+	  struct gdbarch *arch = get_type_arch (type);
+	  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+
+	  addr = unpack_pointer (type, valaddr + embedded_offset * unit_size);
+	  if (options->addressprint)
+	    {
+	      fputs_filtered (paddress (arch, addr), stream);
+	      fputs_filtered (" ", stream);
+	    }
+
+	  fputs_filtered ("b", stream);
+	  val_print_string (TYPE_TARGET_TYPE (elttype), "ASCII", addr,
+			    high_bound - low_bound + 1, stream,
+			    options);
+	  break;
+	}
+      }
+      /* Fall through.  */
+
+    case TYPE_CODE_METHODPTR:
+    case TYPE_CODE_MEMBERPTR:
+      c_val_print (type, embedded_offset, address, stream,
+		   recurse, val, options);
+      break;
+
+    case TYPE_CODE_INT:
+      /* Recognize the unit type.  */
+      if (TYPE_UNSIGNED (type) && TYPE_LENGTH (type) == 0
+	  && TYPE_NAME (type) != NULL && strcmp (TYPE_NAME (type), "()") == 0)
+	{
+	  fputs_filtered ("()", stream);
+	  break;
+	}
+      goto generic_print;
+
+    case TYPE_CODE_STRING:
+      {
+	struct gdbarch *arch = get_type_arch (type);
+	int unit_size = gdbarch_addressable_memory_unit_size (arch);
+	LONGEST low_bound, high_bound;
+
+	if (!get_array_bounds (type, &low_bound, &high_bound))
+	  error (_("Could not determine the array bounds"));
+
+	/* If we see a plain TYPE_CODE_STRING, then we're printing a
+	   byte string, hence the choice of "ASCII" as the
+	   encoding.  */
+	fputs_filtered ("b", stream);
+	rust_printstr (stream, TYPE_TARGET_TYPE (type),
+		       valaddr + embedded_offset * unit_size,
+		       high_bound - low_bound + 1, "ASCII", 0, options);
+      }
+      break;
+
+    case TYPE_CODE_ARRAY:
+      {
+	LONGEST low_bound, high_bound;
+
+	if (get_array_bounds (type, &low_bound, &high_bound)
+	    && high_bound - low_bound + 1 == 0)
+	  fputs_filtered ("[]", stream);
+	else
+	  goto generic_print;
+      }
+      break;
+
+    case TYPE_CODE_UNION:
+      {
+	int j, nfields, first_field, is_tuple, start;
+	struct type *variant_type;
+	struct disr_info disr;
+	struct value_print_options opts;
+
+	/* Untagged unions are printed as if they are structs.
+	   Since the field bit positions overlap in the debuginfo,
+	   the code for printing a union is same as that for a struct,
+	   the only difference is that the input type will have overlapping
+	   fields.  */
+	if (rust_union_is_untagged (type))
+	  {
+	    val_print_struct (type, embedded_offset, address, stream,
+			      recurse, val, options);
+	    break;
+	  }
+
+	opts = *options;
+	opts.deref_ref = 0;
+
+	disr = rust_get_disr_info (type, valaddr, embedded_offset, address,
+				   val);
+
+	if (disr.is_encoded && disr.field_no == RUST_ENCODED_ENUM_HIDDEN)
+	  {
+	    fprintf_filtered (stream, "%s", disr.name.c_str ());
+	    break;
+	  }
+
+	first_field = 1;
+	variant_type = TYPE_FIELD_TYPE (type, disr.field_no);
+	nfields = TYPE_NFIELDS (variant_type);
+
+	is_tuple = (disr.is_encoded
+		    ? rust_tuple_struct_type_p (variant_type)
+		    : rust_tuple_variant_type_p (variant_type));
+	start = disr.is_encoded ? 0 : 1;
+
+	if (nfields > start)
+	  {
+	    /* In case of a non-nullary variant, we output 'Foo(x,y,z)'. */
+	    if (is_tuple)
+	      fprintf_filtered (stream, "%s(", disr.name.c_str ());
+	    else
+	      {
+		/* struct variant.  */
+		fprintf_filtered (stream, "%s{", disr.name.c_str ());
+	      }
+	  }
+	else
+	  {
+	    /* In case of a nullary variant like 'None', just output
+	       the name. */
+	    fprintf_filtered (stream, "%s", disr.name.c_str ());
+	    break;
+	  }
+
+	for (j = start; j < TYPE_NFIELDS (variant_type); j++)
+	  {
+	    if (!first_field)
+	      fputs_filtered (", ", stream);
+	    first_field = 0;
+
+	    if (!is_tuple)
+	      fprintf_filtered (stream, "%s: ",
+				TYPE_FIELD_NAME (variant_type, j));
+
+	    val_print (TYPE_FIELD_TYPE (variant_type, j),
+		       (embedded_offset
+			+ TYPE_FIELD_BITPOS (type, disr.field_no) / 8
+			+ TYPE_FIELD_BITPOS (variant_type, j) / 8),
+		       address,
+		       stream, recurse + 1, val, &opts,
+		       current_language);
+	  }
+
+	if (is_tuple)
+	  fputs_filtered (")", stream);
+	else
+	  fputs_filtered ("}", stream);
+      }
+      break;
+
+    case TYPE_CODE_STRUCT:
+      val_print_struct (type, embedded_offset, address, stream,
+			recurse, val, options);
+      break;
+
+    default:
+    generic_print:
+      /* Nothing special yet.  */
+      generic_val_print (type, embedded_offset, address, stream,
+			 recurse, val, options, &rust_decorations);
+    }
+}
+
+
+
+static void
+rust_print_type (struct type *type, const char *varstring,
+		 struct ui_file *stream, int show, int level,
+		 const struct type_print_options *flags);
+
+/* Print a struct or union typedef.  */
+static void
+rust_print_struct_def (struct type *type, const char *varstring,
+		       struct ui_file *stream, int show, int level,
+		       const struct type_print_options *flags)
+{
+  bool is_tuple_struct;
+  int i;
+
+  /* Print a tuple type simply.  */
+  if (rust_tuple_type_p (type))
+    {
+      fputs_filtered (TYPE_TAG_NAME (type), stream);
+      return;
+    }
+
+  /* If we see a base class, delegate to C.  */
+  if (TYPE_N_BASECLASSES (type) > 0)
+    c_print_type (type, varstring, stream, show, level, flags);
+
+  /* This code path is also used by unions.  */
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+    fputs_filtered ("struct ", stream);
+  else
+    fputs_filtered ("union ", stream);
+
+  if (TYPE_TAG_NAME (type) != NULL)
+    fputs_filtered (TYPE_TAG_NAME (type), stream);
+
+  is_tuple_struct = rust_tuple_struct_type_p (type);
+
+  if (TYPE_NFIELDS (type) == 0 && !rust_tuple_type_p (type))
+    return;
+  fputs_filtered (is_tuple_struct ? " (\n" : " {\n", stream);
+
+  for (i = 0; i < TYPE_NFIELDS (type); ++i)
+    {
+      const char *name;
+
+      QUIT;
+      if (field_is_static (&TYPE_FIELD (type, i)))
+	continue;
+
+      /* We'd like to print "pub" here as needed, but rustc
+	 doesn't emit the debuginfo, and our types don't have
+	 cplus_struct_type attached.  */
+
+      /* For a tuple struct we print the type but nothing
+	 else.  */
+      print_spaces_filtered (level + 2, stream);
+      if (!is_tuple_struct)
+	fprintf_filtered (stream, "%s: ", TYPE_FIELD_NAME (type, i));
+
+      rust_print_type (TYPE_FIELD_TYPE (type, i), NULL,
+		       stream, show - 1, level + 2,
+		       flags);
+      fputs_filtered (",\n", stream);
+    }
+
+  fprintfi_filtered (level, stream, is_tuple_struct ? ")" : "}");
+}
+
+/* la_print_typedef implementation for Rust.  */
+
+static void
+rust_print_typedef (struct type *type,
+		    struct symbol *new_symbol,
+		    struct ui_file *stream)
+{
+  type = check_typedef (type);
+  fprintf_filtered (stream, "type %s = ", SYMBOL_PRINT_NAME (new_symbol));
+  type_print (type, "", stream, 0);
+  fprintf_filtered (stream, ";\n");
+}
+
+/* la_print_type implementation for Rust.  */
+
+static void
+rust_print_type (struct type *type, const char *varstring,
+		 struct ui_file *stream, int show, int level,
+		 const struct type_print_options *flags)
+{
+  int i;
+
+  QUIT;
+  if (show <= 0
+      && TYPE_NAME (type) != NULL)
+    {
+      /* Rust calls the unit type "void" in its debuginfo,
+         but we don't want to print it as that.  */
+      if (TYPE_CODE (type) == TYPE_CODE_VOID)
+        fputs_filtered ("()", stream);
+      else
+        fputs_filtered (TYPE_NAME (type), stream);
+      return;
+    }
+
+  type = check_typedef (type);
+  switch (TYPE_CODE (type))
+    {
+    case TYPE_CODE_VOID:
+      fputs_filtered ("()", stream);
+      break;
+
+    case TYPE_CODE_FUNC:
+      /* Delegate varargs to the C printer.  */
+      if (TYPE_VARARGS (type))
+	goto c_printer;
+
+      fputs_filtered ("fn ", stream);
+      if (varstring != NULL)
+	fputs_filtered (varstring, stream);
+      fputs_filtered ("(", stream);
+      for (i = 0; i < TYPE_NFIELDS (type); ++i)
+	{
+	  QUIT;
+	  if (i > 0)
+	    fputs_filtered (", ", stream);
+	  rust_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0,
+			   flags);
+	}
+      fputs_filtered (")", stream);
+      /* If it returns unit, we can omit the return type.  */
+      if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+        {
+          fputs_filtered (" -> ", stream);
+          rust_print_type (TYPE_TARGET_TYPE (type), "", stream, -1, 0, flags);
+        }
+      break;
+
+    case TYPE_CODE_ARRAY:
+      {
+	LONGEST low_bound, high_bound;
+
+	fputs_filtered ("[", stream);
+	rust_print_type (TYPE_TARGET_TYPE (type), NULL,
+			 stream, show - 1, level, flags);
+	fputs_filtered ("; ", stream);
+
+	if (TYPE_HIGH_BOUND_KIND (TYPE_INDEX_TYPE (type)) == PROP_LOCEXPR
+	    || TYPE_HIGH_BOUND_KIND (TYPE_INDEX_TYPE (type)) == PROP_LOCLIST)
+	  fprintf_filtered (stream, "variable length");
+	else if (get_array_bounds (type, &low_bound, &high_bound))
+	  fprintf_filtered (stream, "%s", 
+			    plongest (high_bound - low_bound + 1));
+	fputs_filtered ("]", stream);
+      }
+      break;
+
+    case TYPE_CODE_STRUCT:
+      rust_print_struct_def (type, varstring, stream, show, level, flags);
+      break;
+
+    case TYPE_CODE_ENUM:
+      {
+	int i, len = 0;
+
+	fputs_filtered ("enum ", stream);
+	if (TYPE_TAG_NAME (type) != NULL)
+	  {
+	    fputs_filtered (TYPE_TAG_NAME (type), stream);
+	    fputs_filtered (" ", stream);
+	    len = strlen (TYPE_TAG_NAME (type));
+	  }
+	fputs_filtered ("{\n", stream);
+
+	for (i = 0; i < TYPE_NFIELDS (type); ++i)
+	  {
+	    const char *name = TYPE_FIELD_NAME (type, i);
+
+	    QUIT;
+
+	    if (len > 0
+		&& strncmp (name, TYPE_TAG_NAME (type), len) == 0
+		&& name[len] == ':'
+		&& name[len + 1] == ':')
+	      name += len + 2;
+	    fprintfi_filtered (level + 2, stream, "%s,\n", name);
+	  }
+
+	fputs_filtered ("}", stream);
+      }
+      break;
+
+    case TYPE_CODE_UNION:
+      {
+	/* ADT enums.  */
+	int i, len = 0;
+	/* Skip the discriminant field.  */
+	int skip_to = 1;
+
+	/* Unions and structs have the same syntax in Rust,
+	   the only difference is that structs are declared with `struct`
+	   and union with `union`. This difference is handled in the struct
+	   printer.  */
+	if (rust_union_is_untagged (type))
+	  {
+	    rust_print_struct_def (type, varstring, stream, show, level, flags);
+	    break;
+	  }
+
+	fputs_filtered ("enum ", stream);
+	if (TYPE_TAG_NAME (type) != NULL)
+	  {
+	    fputs_filtered (TYPE_TAG_NAME (type), stream);
+	    fputs_filtered (" ", stream);
+	  }
+	fputs_filtered ("{\n", stream);
+
+	if (strncmp (TYPE_FIELD_NAME (type, 0), RUST_ENUM_PREFIX,
+		     strlen (RUST_ENUM_PREFIX)) == 0)
+	  {
+	    const char *zero_field = strrchr (TYPE_FIELD_NAME (type, 0), '$');
+	    if (zero_field != NULL && strlen (zero_field) > 1)
+	      {
+		fprintfi_filtered (level + 2, stream, "%s,\n", zero_field + 1);
+		/* There is no explicit discriminant field, skip nothing.  */
+		skip_to = 0;
+	      }
+	  }
+	else if (TYPE_NFIELDS (type) == 1)
+	  skip_to = 0;
+
+	for (i = 0; i < TYPE_NFIELDS (type); ++i)
+	  {
+	    struct type *variant_type = TYPE_FIELD_TYPE (type, i);
+	    const char *name
+	      = rust_last_path_segment (TYPE_NAME (variant_type));
+
+	    fprintfi_filtered (level + 2, stream, "%s", name);
+
+	    if (TYPE_NFIELDS (variant_type) > skip_to)
+	      {
+		int first = 1;
+		bool is_tuple = (TYPE_NFIELDS (type) == 1
+				 ? rust_tuple_struct_type_p (variant_type)
+				 : rust_tuple_variant_type_p (variant_type));
+		int j;
+
+		fputs_filtered (is_tuple ? "(" : "{", stream);
+		for (j = skip_to; j < TYPE_NFIELDS (variant_type); j++)
+		  {
+		    if (first)
+		      first = 0;
+		    else
+		      fputs_filtered (", ", stream);
+
+		    if (!is_tuple)
+		      fprintf_filtered (stream, "%s: ",
+					TYPE_FIELD_NAME (variant_type, j));
+
+		    rust_print_type (TYPE_FIELD_TYPE (variant_type, j), NULL,
+				     stream, show - 1, level + 2,
+				     flags);
+		  }
+		fputs_filtered (is_tuple ? ")" : "}", stream);
+	      }
+
+	    fputs_filtered (",\n", stream);
+	  }
+
+	fputs_filtered ("}", stream);
+      }
+      break;
+
+    default:
+    c_printer:
+      c_print_type (type, varstring, stream, show, level, flags);
+    }
+}
+
+
+
+/* Compute the alignment of the type T.  */
+
+static int
+rust_type_alignment (struct type *t)
+{
+  t = check_typedef (t);
+  switch (TYPE_CODE (t))
+    {
+    default:
+      error (_("Could not compute alignment of type"));
+
+    case TYPE_CODE_PTR:
+    case TYPE_CODE_ENUM:
+    case TYPE_CODE_INT:
+    case TYPE_CODE_FLT:
+    case TYPE_CODE_REF:
+    case TYPE_CODE_CHAR:
+    case TYPE_CODE_BOOL:
+      return TYPE_LENGTH (t);
+
+    case TYPE_CODE_ARRAY:
+    case TYPE_CODE_COMPLEX:
+      return rust_type_alignment (TYPE_TARGET_TYPE (t));
+
+    case TYPE_CODE_STRUCT:
+    case TYPE_CODE_UNION:
+      {
+	int i;
+	int align = 1;
+
+	for (i = 0; i < TYPE_NFIELDS (t); ++i)
+	  {
+	    int a = rust_type_alignment (TYPE_FIELD_TYPE (t, i));
+	    if (a > align)
+	      align = a;
+	  }
+	return align;
+      }
+    }
+}
+
+/* Like arch_composite_type, but uses TYPE to decide how to allocate
+   -- either on an obstack or on a gdbarch.  */
+
+static struct type *
+rust_composite_type (struct type *original,
+		     const char *name,
+		     const char *field1, struct type *type1,
+		     const char *field2, struct type *type2)
+{
+  struct type *result = alloc_type_copy (original);
+  int i, nfields, bitpos;
+
+  nfields = 0;
+  if (field1 != NULL)
+    ++nfields;
+  if (field2 != NULL)
+    ++nfields;
+
+  TYPE_CODE (result) = TYPE_CODE_STRUCT;
+  TYPE_NAME (result) = name;
+  TYPE_TAG_NAME (result) = name;
+
+  TYPE_NFIELDS (result) = nfields;
+  TYPE_FIELDS (result)
+    = (struct field *) TYPE_ZALLOC (result, nfields * sizeof (struct field));
+
+  i = 0;
+  bitpos = 0;
+  if (field1 != NULL)
+    {
+      struct field *field = &TYPE_FIELD (result, i);
+
+      SET_FIELD_BITPOS (*field, bitpos);
+      bitpos += TYPE_LENGTH (type1) * TARGET_CHAR_BIT;
+
+      FIELD_NAME (*field) = field1;
+      FIELD_TYPE (*field) = type1;
+      ++i;
+    }
+  if (field2 != NULL)
+    {
+      struct field *field = &TYPE_FIELD (result, i);
+      int align = rust_type_alignment (type2);
+
+      if (align != 0)
+	{
+	  int delta;
+
+	  align *= TARGET_CHAR_BIT;
+	  delta = bitpos % align;
+	  if (delta != 0)
+	    bitpos += align - delta;
+	}
+      SET_FIELD_BITPOS (*field, bitpos);
+
+      FIELD_NAME (*field) = field2;
+      FIELD_TYPE (*field) = type2;
+      ++i;
+    }
+
+  if (i > 0)
+    TYPE_LENGTH (result)
+      = (TYPE_FIELD_BITPOS (result, i - 1) / TARGET_CHAR_BIT +
+	 TYPE_LENGTH (TYPE_FIELD_TYPE (result, i - 1)));
+  return result;
+}
+
+/* See rust-lang.h.  */
+
+struct type *
+rust_slice_type (const char *name, struct type *elt_type,
+		 struct type *usize_type)
+{
+  struct type *type;
+
+  elt_type = lookup_pointer_type (elt_type);
+  type = rust_composite_type (elt_type, name,
+			      "data_ptr", elt_type,
+			      "length", usize_type);
+
+  return type;
+}
+
+enum rust_primitive_types
+{
+  rust_primitive_bool,
+  rust_primitive_char,
+  rust_primitive_i8,
+  rust_primitive_u8,
+  rust_primitive_i16,
+  rust_primitive_u16,
+  rust_primitive_i32,
+  rust_primitive_u32,
+  rust_primitive_i64,
+  rust_primitive_u64,
+  rust_primitive_isize,
+  rust_primitive_usize,
+  rust_primitive_f32,
+  rust_primitive_f64,
+  rust_primitive_unit,
+  rust_primitive_str,
+  nr_rust_primitive_types
+};
+
+/* la_language_arch_info implementation for Rust.  */
+
+static void
+rust_language_arch_info (struct gdbarch *gdbarch,
+			 struct language_arch_info *lai)
+{
+  const struct builtin_type *builtin = builtin_type (gdbarch);
+  struct type *tem;
+  struct type **types;
+  unsigned int length;
+
+  types = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_rust_primitive_types + 1,
+				  struct type *);
+
+  types[rust_primitive_bool] = arch_boolean_type (gdbarch, 8, 1, "bool");
+  types[rust_primitive_char] = arch_character_type (gdbarch, 32, 1, "char");
+  types[rust_primitive_i8] = arch_integer_type (gdbarch, 8, 0, "i8");
+  types[rust_primitive_u8] = arch_integer_type (gdbarch, 8, 1, "u8");
+  types[rust_primitive_i16] = arch_integer_type (gdbarch, 16, 0, "i16");
+  types[rust_primitive_u16] = arch_integer_type (gdbarch, 16, 1, "u16");
+  types[rust_primitive_i32] = arch_integer_type (gdbarch, 32, 0, "i32");
+  types[rust_primitive_u32] = arch_integer_type (gdbarch, 32, 1, "u32");
+  types[rust_primitive_i64] = arch_integer_type (gdbarch, 64, 0, "i64");
+  types[rust_primitive_u64] = arch_integer_type (gdbarch, 64, 1, "u64");
+
+  length = 8 * TYPE_LENGTH (builtin->builtin_data_ptr);
+  types[rust_primitive_isize] = arch_integer_type (gdbarch, length, 0, "isize");
+  types[rust_primitive_usize] = arch_integer_type (gdbarch, length, 1, "usize");
+
+  types[rust_primitive_f32] = arch_float_type (gdbarch, 32, "f32",
+					       floatformats_ieee_single);
+  types[rust_primitive_f64] = arch_float_type (gdbarch, 64, "f64",
+					       floatformats_ieee_double);
+
+  types[rust_primitive_unit] = arch_integer_type (gdbarch, 0, 1, "()");
+
+  tem = make_cv_type (1, 0, types[rust_primitive_u8], NULL);
+  types[rust_primitive_str] = rust_slice_type ("&str", tem,
+					       types[rust_primitive_usize]);
+
+  lai->primitive_type_vector = types;
+  lai->bool_type_default = types[rust_primitive_bool];
+  lai->string_char_type = types[rust_primitive_u8];
+}
+
+
+
+/* A helper for rust_evaluate_subexp that handles OP_FUNCALL.  */
+
+static struct value *
+rust_evaluate_funcall (struct expression *exp, int *pos, enum noside noside)
+{
+  int i;
+  int num_args = exp->elts[*pos + 1].longconst;
+  const char *method;
+  struct value *function, *result, *arg0;
+  struct type *type, *fn_type;
+  const struct block *block;
+  struct block_symbol sym;
+
+  /* For an ordinary function call we can simply defer to the
+     generic implementation.  */
+  if (exp->elts[*pos + 3].opcode != STRUCTOP_STRUCT)
+    return evaluate_subexp_standard (NULL, exp, pos, noside);
+
+  /* Skip over the OP_FUNCALL and the STRUCTOP_STRUCT.  */
+  *pos += 4;
+  method = &exp->elts[*pos + 1].string;
+  *pos += 3 + BYTES_TO_EXP_ELEM (exp->elts[*pos].longconst + 1);
+
+  /* Evaluate the argument to STRUCTOP_STRUCT, then find its
+     type in order to look up the method.  */
+  arg0 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+  if (noside == EVAL_SKIP)
+    {
+      for (i = 0; i < num_args; ++i)
+	evaluate_subexp (NULL_TYPE, exp, pos, noside);
+      return arg0;
+    }
+
+  std::vector<struct value *> args (num_args + 1);
+  args[0] = arg0;
+
+  /* We don't yet implement real Deref semantics.  */
+  while (TYPE_CODE (value_type (args[0])) == TYPE_CODE_PTR)
+    args[0] = value_ind (args[0]);
+
+  type = value_type (args[0]);
+  if ((TYPE_CODE (type) != TYPE_CODE_STRUCT
+       && TYPE_CODE (type) != TYPE_CODE_UNION
+       && TYPE_CODE (type) != TYPE_CODE_ENUM)
+      || rust_tuple_type_p (type))
+    error (_("Method calls only supported on struct or enum types"));
+  if (TYPE_TAG_NAME (type) == NULL)
+    error (_("Method call on nameless type"));
+
+  std::string name = std::string (TYPE_TAG_NAME (type)) + "::" + method;
+
+  block = get_selected_block (0);
+  sym = lookup_symbol (name.c_str (), block, VAR_DOMAIN, NULL);
+  if (sym.symbol == NULL)
+    error (_("Could not find function named '%s'"), name.c_str ());
+
+  fn_type = SYMBOL_TYPE (sym.symbol);
+  if (TYPE_NFIELDS (fn_type) == 0)
+    error (_("Function '%s' takes no arguments"), name.c_str ());
+
+  if (TYPE_CODE (TYPE_FIELD_TYPE (fn_type, 0)) == TYPE_CODE_PTR)
+    args[0] = value_addr (args[0]);
+
+  function = address_of_variable (sym.symbol, block);
+
+  for (i = 0; i < num_args; ++i)
+    args[i + 1] = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+  if (noside == EVAL_AVOID_SIDE_EFFECTS)
+    result = value_zero (TYPE_TARGET_TYPE (fn_type), not_lval);
+  else
+    result = call_function_by_hand (function, num_args + 1, args.data ());
+  return result;
+}
+
+/* A helper for rust_evaluate_subexp that handles OP_RANGE.  */
+
+static struct value *
+rust_range (struct expression *exp, int *pos, enum noside noside)
+{
+  enum range_type kind;
+  struct value *low = NULL, *high = NULL;
+  struct value *addrval, *result;
+  CORE_ADDR addr;
+  struct type *range_type;
+  struct type *index_type;
+  struct type *temp_type;
+  const char *name;
+
+  kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
+  *pos += 3;
+
+  if (kind == HIGH_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT)
+    low = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+  if (kind == LOW_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT)
+    high = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+  if (noside == EVAL_SKIP)
+    return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1);
+
+  if (low == NULL)
+    {
+      if (high == NULL)
+	{
+	  index_type = NULL;
+	  name = "std::ops::RangeFull";
+	}
+      else
+	{
+	  index_type = value_type (high);
+	  name = "std::ops::RangeTo";
+	}
+    }
+  else
+    {
+      if (high == NULL)
+	{
+	  index_type = value_type (low);
+	  name = "std::ops::RangeFrom";
+	}
+      else
+	{
+	  if (!types_equal (value_type (low), value_type (high)))
+	    error (_("Range expression with different types"));
+	  index_type = value_type (low);
+	  name = "std::ops::Range";
+	}
+    }
+
+  /* If we don't have an index type, just allocate this on the
+     arch.  Here any type will do.  */
+  temp_type = (index_type == NULL
+	       ? language_bool_type (exp->language_defn, exp->gdbarch)
+	       : index_type);
+  /* It would be nicer to cache the range type.  */
+  range_type = rust_composite_type (temp_type, name,
+				    low == NULL ? NULL : "start", index_type,
+				    high == NULL ? NULL : "end", index_type);
+
+  if (noside == EVAL_AVOID_SIDE_EFFECTS)
+    return value_zero (range_type, lval_memory);
+
+  addrval = value_allocate_space_in_inferior (TYPE_LENGTH (range_type));
+  addr = value_as_long (addrval);
+  result = value_at_lazy (range_type, addr);
+
+  if (low != NULL)
+    {
+      struct value *start = value_struct_elt (&result, NULL, "start", NULL,
+					      "range");
+
+      value_assign (start, low);
+    }
+
+  if (high != NULL)
+    {
+      struct value *end = value_struct_elt (&result, NULL, "end", NULL,
+					    "range");
+
+      value_assign (end, high);
+    }
+
+  result = value_at_lazy (range_type, addr);
+  return result;
+}
+
+/* A helper function to compute the range and kind given a range
+   value.  TYPE is the type of the range value.  RANGE is the range
+   value.  LOW, HIGH, and KIND are out parameters.  The LOW and HIGH
+   parameters might be filled in, or might not be, depending on the
+   kind of range this is.  KIND will always be set to the appropriate
+   value describing the kind of range, and this can be used to
+   determine whether LOW or HIGH are valid.  */
+
+static void
+rust_compute_range (struct type *type, struct value *range,
+		    LONGEST *low, LONGEST *high,
+		    enum range_type *kind)
+{
+  int i;
+
+  *low = 0;
+  *high = 0;
+  *kind = BOTH_BOUND_DEFAULT;
+
+  if (TYPE_NFIELDS (type) == 0)
+    return;
+
+  i = 0;
+  if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
+    {
+      *kind = HIGH_BOUND_DEFAULT;
+      *low = value_as_long (value_field (range, 0));
+      ++i;
+    }
+  if (TYPE_NFIELDS (type) > i
+      && strcmp (TYPE_FIELD_NAME (type, i), "end") == 0)
+    {
+      *kind = (*kind == BOTH_BOUND_DEFAULT
+	       ? LOW_BOUND_DEFAULT : NONE_BOUND_DEFAULT);
+      *high = value_as_long (value_field (range, i));
+    }
+}
+
+/* A helper for rust_evaluate_subexp that handles BINOP_SUBSCRIPT.  */
+
+static struct value *
+rust_subscript (struct expression *exp, int *pos, enum noside noside,
+		int for_addr)
+{
+  struct value *lhs, *rhs, *result;
+  struct type *rhstype;
+  LONGEST low, high_bound;
+  /* Initialized to appease the compiler.  */
+  enum range_type kind = BOTH_BOUND_DEFAULT;
+  LONGEST high = 0;
+  int want_slice = 0;
+
+  ++*pos;
+  lhs = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+  rhs = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+  if (noside == EVAL_SKIP)
+    return lhs;
+
+  rhstype = check_typedef (value_type (rhs));
+  if (rust_range_type_p (rhstype))
+    {
+      if (!for_addr)
+	error (_("Can't take slice of array without '&'"));
+      rust_compute_range (rhstype, rhs, &low, &high, &kind);
+      want_slice = 1;
+    }
+  else
+    low = value_as_long (rhs);
+
+  if (noside == EVAL_AVOID_SIDE_EFFECTS)
+    {
+      struct type *type = check_typedef (value_type (lhs));
+
+      result = value_zero (TYPE_TARGET_TYPE (type), VALUE_LVAL (lhs));
+    }
+  else
+    {
+      LONGEST low_bound;
+      struct value *base;
+      struct type *type = check_typedef (value_type (lhs));
+
+      if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+	{
+	  base = lhs;
+	  if (!get_array_bounds (type, &low_bound, &high_bound))
+	    error (_("Can't compute array bounds"));
+	  if (low_bound != 0)
+	    error (_("Found array with non-zero lower bound"));
+	  ++high_bound;
+	}
+      else if (rust_slice_type_p (type))
+	{
+	  struct value *len;
+
+	  base = value_struct_elt (&lhs, NULL, "data_ptr", NULL, "slice");
+	  len = value_struct_elt (&lhs, NULL, "length", NULL, "slice");
+	  low_bound = 0;
+	  high_bound = value_as_long (len);
+	}
+      else if (TYPE_CODE (type) == TYPE_CODE_PTR)
+	{
+	  base = lhs;
+	  low_bound = 0;
+	  high_bound = LONGEST_MAX;
+	}
+      else
+	error (_("Cannot subscript non-array type"));
+
+      if (want_slice
+	  && (kind == BOTH_BOUND_DEFAULT || kind == LOW_BOUND_DEFAULT))
+	low = low_bound;
+      if (low < 0)
+	error (_("Index less than zero"));
+      if (low > high_bound)
+	error (_("Index greater than length"));
+
+      result = value_subscript (base, low);
+    }
+
+  if (for_addr)
+    {
+      if (want_slice)
+	{
+	  struct type *usize, *slice;
+	  CORE_ADDR addr;
+	  struct value *addrval, *tem;
+
+	  if (kind == BOTH_BOUND_DEFAULT || kind == HIGH_BOUND_DEFAULT)
+	    high = high_bound;
+	  if (high < 0)
+	    error (_("High index less than zero"));
+	  if (low > high)
+	    error (_("Low index greater than high index"));
+	  if (high > high_bound)
+	    error (_("High index greater than length"));
+
+	  usize = language_lookup_primitive_type (exp->language_defn,
+						  exp->gdbarch,
+						  "usize");
+	  slice = rust_slice_type ("&[*gdb*]", value_type (result),
+				   usize);
+
+	  addrval = value_allocate_space_in_inferior (TYPE_LENGTH (slice));
+	  addr = value_as_long (addrval);
+	  tem = value_at_lazy (slice, addr);
+
+	  value_assign (value_field (tem, 0), value_addr (result));
+	  value_assign (value_field (tem, 1),
+			value_from_longest (usize, high - low));
+
+	  result = value_at_lazy (slice, addr);
+	}
+      else
+	result = value_addr (result);
+    }
+
+  return result;
+}
+
+/* evaluate_exp implementation for Rust.  */
+
+static struct value *
+rust_evaluate_subexp (struct type *expect_type, struct expression *exp,
+		      int *pos, enum noside noside)
+{
+  struct value *result;
+
+  switch (exp->elts[*pos].opcode)
+    {
+    case UNOP_COMPLEMENT:
+      {
+	struct value *value;
+
+	++*pos;
+	value = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+	if (noside == EVAL_SKIP)
+	  {
+	    /* Preserving the type is enough.  */
+	    return value;
+	  }
+	if (TYPE_CODE (value_type (value)) == TYPE_CODE_BOOL)
+	  result = value_from_longest (value_type (value),
+				       value_logical_not (value));
+	else
+	  result = value_complement (value);
+      }
+      break;
+
+    case BINOP_SUBSCRIPT:
+      result = rust_subscript (exp, pos, noside, 0);
+      break;
+
+    case OP_FUNCALL:
+      result = rust_evaluate_funcall (exp, pos, noside);
+      break;
+
+    case OP_AGGREGATE:
+      {
+	int pc = (*pos)++;
+	struct type *type = exp->elts[pc + 1].type;
+	int arglen = longest_to_int (exp->elts[pc + 2].longconst);
+	int i;
+	CORE_ADDR addr = 0;
+	struct value *addrval = NULL;
+
+	*pos += 3;
+
+	if (noside == EVAL_NORMAL)
+	  {
+	    addrval = value_allocate_space_in_inferior (TYPE_LENGTH (type));
+	    addr = value_as_long (addrval);
+	    result = value_at_lazy (type, addr);
+	  }
+
+	if (arglen > 0 && exp->elts[*pos].opcode == OP_OTHERS)
+	  {
+	    struct value *init;
+
+	    ++*pos;
+	    init = rust_evaluate_subexp (NULL, exp, pos, noside);
+	    if (noside == EVAL_NORMAL)
+	      {
+		/* This isn't quite right but will do for the time
+		   being, seeing that we can't implement the Copy
+		   trait anyway.  */
+		value_assign (result, init);
+	      }
+
+	    --arglen;
+	  }
+
+	gdb_assert (arglen % 2 == 0);
+	for (i = 0; i < arglen; i += 2)
+	  {
+	    int len;
+	    const char *fieldname;
+	    struct value *value, *field;
+
+	    gdb_assert (exp->elts[*pos].opcode == OP_NAME);
+	    ++*pos;
+	    len = longest_to_int (exp->elts[*pos].longconst);
+	    ++*pos;
+	    fieldname = &exp->elts[*pos].string;
+	    *pos += 2 + BYTES_TO_EXP_ELEM (len + 1);
+
+	    value = rust_evaluate_subexp (NULL, exp, pos, noside);
+	    if (noside == EVAL_NORMAL)
+	      {
+		field = value_struct_elt (&result, NULL, fieldname, NULL,
+					  "structure");
+		value_assign (field, value);
+	      }
+	  }
+
+	if (noside == EVAL_SKIP)
+	  return value_from_longest (builtin_type (exp->gdbarch)->builtin_int,
+				     1);
+	else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+	  result = allocate_value (type);
+	else
+	  result = value_at_lazy (type, addr);
+      }
+      break;
+
+    case OP_RUST_ARRAY:
+      {
+	int pc = (*pos)++;
+	int copies;
+	struct value *elt;
+	struct value *ncopies;
+
+	elt = rust_evaluate_subexp (NULL, exp, pos, noside);
+	ncopies = rust_evaluate_subexp (NULL, exp, pos, noside);
+	copies = value_as_long (ncopies);
+	if (copies < 0)
+	  error (_("Array with negative number of elements"));
+
+	if (noside == EVAL_NORMAL)
+	  {
+	    CORE_ADDR addr;
+	    int i;
+	    std::vector<struct value *> eltvec (copies);
+
+	    for (i = 0; i < copies; ++i)
+	      eltvec[i] = elt;
+	    result = value_array (0, copies - 1, eltvec.data ());
+	  }
+	else
+	  {
+	    struct type *arraytype
+	      = lookup_array_range_type (value_type (elt), 0, copies - 1);
+	    result = allocate_value (arraytype);
+	  }
+      }
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      {
+        /* Anonymous field access, i.e. foo.1.  */
+        struct value *lhs;
+        int pc, field_number, nfields;
+        struct type *type, *variant_type;
+        struct disr_info disr;
+
+        pc = (*pos)++;
+        field_number = longest_to_int (exp->elts[pc + 1].longconst);
+        (*pos) += 2;
+        lhs = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+        type = value_type (lhs);
+        /* Untagged unions can't have anonymous field access since
+           they can only have named fields.  */
+        if (TYPE_CODE (type) == TYPE_CODE_UNION
+            && !rust_union_is_untagged (type))
+	  {
+	    disr = rust_get_disr_info (type, value_contents (lhs),
+				       value_embedded_offset (lhs),
+				       value_address (lhs), lhs);
+
+	    if (disr.is_encoded && disr.field_no == RUST_ENCODED_ENUM_HIDDEN)
+	      {
+		variant_type = NULL;
+		nfields = 0;
+	      }
+	    else
+	      {
+		variant_type = TYPE_FIELD_TYPE (type, disr.field_no);
+		nfields = TYPE_NFIELDS (variant_type);
+	      }
+
+	    if (!disr.is_encoded)
+	      ++field_number;
+
+	    if (field_number >= nfields || field_number < 0)
+	      error(_("Cannot access field %d of variant %s, \
+there are only %d fields"),
+		    disr.is_encoded ? field_number : field_number - 1,
+		    disr.name.c_str (),
+		    disr.is_encoded ? nfields : nfields - 1);
+
+	    if (!(disr.is_encoded
+		  ? rust_tuple_struct_type_p (variant_type)
+		  : rust_tuple_variant_type_p (variant_type)))
+	      error(_("Variant %s is not a tuple variant"), disr.name.c_str ());
+
+	    result = value_primitive_field (lhs, 0, field_number,
+					    variant_type);
+	  }
+	else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+	  {
+	    /* Tuples and tuple structs */
+	    nfields = TYPE_NFIELDS(type);
+
+	    if (field_number >= nfields || field_number < 0)
+	      error(_("Cannot access field %d of %s, there are only %d fields"),
+		    field_number, TYPE_TAG_NAME (type), nfields);
+
+	    /* Tuples are tuple structs too.  */
+	    if (!rust_tuple_struct_type_p (type))
+	      error(_("Attempting to access anonymous field %d of %s, which is \
+not a tuple, tuple struct, or tuple-like variant"),
+		    field_number, TYPE_TAG_NAME (type));
+
+	    result = value_primitive_field (lhs, 0, field_number, type);
+	  }
+	else
+	  error(_("Anonymous field access is only allowed on tuples, \
+tuple structs, and tuple-like enum variants"));
+      }
+      break;
+
+    case STRUCTOP_STRUCT:
+      {
+        struct value* lhs;
+        struct type *type;
+        int tem, pc;
+
+        pc = (*pos)++;
+        tem = longest_to_int (exp->elts[pc + 1].longconst);
+        (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
+        lhs = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+        type = value_type (lhs);
+        if (TYPE_CODE (type) == TYPE_CODE_UNION
+            && !rust_union_is_untagged (type))
+	  {
+	    int i, start;
+	    struct disr_info disr;
+	    struct type* variant_type;
+	    char* field_name;
+
+	    field_name = &exp->elts[pc + 2].string;
+
+	    disr = rust_get_disr_info (type, value_contents (lhs),
+				       value_embedded_offset (lhs),
+				       value_address (lhs), lhs);
+
+	    if (disr.is_encoded && disr.field_no == RUST_ENCODED_ENUM_HIDDEN)
+	      error(_("Could not find field %s of struct variant %s"),
+		    field_name, disr.name.c_str ());
+
+	    variant_type = TYPE_FIELD_TYPE (type, disr.field_no);
+
+	    if (variant_type == NULL
+	        || (disr.is_encoded
+	            ? rust_tuple_struct_type_p (variant_type)
+	            : rust_tuple_variant_type_p (variant_type)))
+	      error(_("Attempting to access named field %s of tuple variant %s, \
+which has only anonymous fields"),
+		    field_name, disr.name.c_str ());
+
+	    start = disr.is_encoded ? 0 : 1;
+	    for (i = start; i < TYPE_NFIELDS (variant_type); i++)
+	      {
+		if (strcmp (TYPE_FIELD_NAME (variant_type, i),
+			    field_name) == 0) {
+		  result = value_primitive_field (lhs, 0, i, variant_type);
+		  break;
+		}
+	      }
+
+	    if (i == TYPE_NFIELDS (variant_type))
+	      /* We didn't find it.  */
+	      error(_("Could not find field %s of struct variant %s"),
+		    field_name, disr.name.c_str ());
+	  }
+	else
+	  {
+	    /* Field access in structs and untagged unions works like C.  */
+	    *pos = pc;
+	    result = evaluate_subexp_standard (expect_type, exp, pos, noside);
+	  }
+      }
+      break;
+
+    case OP_RANGE:
+      result = rust_range (exp, pos, noside);
+      break;
+
+    case UNOP_ADDR:
+      /* We might have &array[range], in which case we need to make a
+	 slice.  */
+      if (exp->elts[*pos + 1].opcode == BINOP_SUBSCRIPT)
+	{
+	  ++*pos;
+	  result = rust_subscript (exp, pos, noside, 1);
+	  break;
+	}
+      /* Fall through.  */
+    default:
+      result = evaluate_subexp_standard (expect_type, exp, pos, noside);
+      break;
+    }
+
+  return result;
+}
+
+/* operator_length implementation for Rust.  */
+
+static void
+rust_operator_length (const struct expression *exp, int pc, int *oplenp,
+		      int *argsp)
+{
+  int oplen = 1;
+  int args = 0;
+
+  switch (exp->elts[pc - 1].opcode)
+    {
+    case OP_AGGREGATE:
+      /* We handle aggregate as a type and argument count.  The first
+	 argument might be OP_OTHERS.  After that the arguments
+	 alternate: first an OP_NAME, then an expression.  */
+      oplen = 4;
+      args = longest_to_int (exp->elts[pc - 2].longconst);
+      break;
+
+    case OP_OTHERS:
+      oplen = 1;
+      args = 1;
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      oplen = 3;
+      args = 1;
+      break;
+
+    case OP_RUST_ARRAY:
+      oplen = 1;
+      args = 2;
+      break;
+
+    default:
+      operator_length_standard (exp, pc, oplenp, argsp);
+      return;
+    }
+
+  *oplenp = oplen;
+  *argsp = args;
+}
+
+/* op_name implementation for Rust.  */
+
+static char *
+rust_op_name (enum exp_opcode opcode)
+{
+  switch (opcode)
+    {
+    case OP_AGGREGATE:
+      return "OP_AGGREGATE";
+    case OP_OTHERS:
+      return "OP_OTHERS";
+    default:
+      return op_name_standard (opcode);
+    }
+}
+
+/* dump_subexp_body implementation for Rust.  */
+
+static int
+rust_dump_subexp_body (struct expression *exp, struct ui_file *stream,
+		       int elt)
+{
+  switch (exp->elts[elt].opcode)
+    {
+    case OP_AGGREGATE:
+      {
+	int length = longest_to_int (exp->elts[elt + 2].longconst);
+	int i;
+
+	fprintf_filtered (stream, "Type @");
+	gdb_print_host_address (exp->elts[elt + 1].type, stream);
+	fprintf_filtered (stream, " (");
+	type_print (exp->elts[elt + 1].type, NULL, stream, 0);
+	fprintf_filtered (stream, "), length %d", length);
+
+	elt += 4;
+	for (i = 0; i < length; ++i)
+	  elt = dump_subexp (exp, stream, elt);
+      }
+      break;
+
+    case OP_STRING:
+    case OP_NAME:
+      {
+	LONGEST len = exp->elts[elt + 1].longconst;
+
+	fprintf_filtered (stream, "%s: %s",
+			  (exp->elts[elt].opcode == OP_STRING
+			   ? "string" : "name"),
+			  &exp->elts[elt + 2].string);
+	elt += 4 + BYTES_TO_EXP_ELEM (len + 1);
+      }
+      break;
+
+    case OP_OTHERS:
+      elt = dump_subexp (exp, stream, elt + 1);
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      {
+	int field_number;
+
+	field_number = longest_to_int (exp->elts[elt].longconst);
+
+	fprintf_filtered (stream, "Field number: %d", field_number);
+	elt = dump_subexp (exp, stream, elt + 2);
+      }
+      break;
+
+    case OP_RUST_ARRAY:
+      break;
+
+    default:
+      elt = dump_subexp_body_standard (exp, stream, elt);
+      break;
+    }
+
+  return elt;
+}
+
+/* print_subexp implementation for Rust.  */
+
+static void
+rust_print_subexp (struct expression *exp, int *pos, struct ui_file *stream,
+		   enum precedence prec)
+{
+  switch (exp->elts[*pos].opcode)
+    {
+    case OP_AGGREGATE:
+      {
+	int length = longest_to_int (exp->elts[*pos + 2].longconst);
+	int i;
+
+	type_print (exp->elts[*pos + 1].type, "", stream, 0);
+	fputs_filtered (" { ", stream);
+
+	*pos += 4;
+	for (i = 0; i < length; ++i)
+	  {
+	    rust_print_subexp (exp, pos, stream, prec);
+	    fputs_filtered (", ", stream);
+	  }
+	fputs_filtered (" }", stream);
+      }
+      break;
+
+    case OP_NAME:
+      {
+	LONGEST len = exp->elts[*pos + 1].longconst;
+
+	fputs_filtered (&exp->elts[*pos + 2].string, stream);
+	*pos += 4 + BYTES_TO_EXP_ELEM (len + 1);
+      }
+      break;
+
+    case OP_OTHERS:
+      {
+	fputs_filtered ("<<others>> (", stream);
+	++*pos;
+	rust_print_subexp (exp, pos, stream, prec);
+	fputs_filtered (")", stream);
+      }
+      break;
+
+    case STRUCTOP_ANONYMOUS:
+      {
+	int tem = longest_to_int (exp->elts[*pos + 1].longconst);
+
+	(*pos) += 3;
+	print_subexp (exp, pos, stream, PREC_SUFFIX);
+	fprintf_filtered (stream, ".%d", tem);
+      }
+      return;
+
+    case OP_RUST_ARRAY:
+      ++*pos;
+      fprintf_filtered (stream, "[");
+      rust_print_subexp (exp, pos, stream, prec);
+      fprintf_filtered (stream, "; ");
+      rust_print_subexp (exp, pos, stream, prec);
+      fprintf_filtered (stream, "]");
+      break;
+
+    default:
+      print_subexp_standard (exp, pos, stream, prec);
+      break;
+    }
+}
+
+/* operator_check implementation for Rust.  */
+
+static int
+rust_operator_check (struct expression *exp, int pos,
+		     int (*objfile_func) (struct objfile *objfile,
+					  void *data),
+		     void *data)
+{
+  switch (exp->elts[pos].opcode)
+    {
+    case OP_AGGREGATE:
+      {
+	struct type *type = exp->elts[pos + 1].type;
+	struct objfile *objfile = TYPE_OBJFILE (type);
+
+	if (objfile != NULL && (*objfile_func) (objfile, data))
+	  return 1;
+      }
+      break;
+
+    case OP_OTHERS:
+    case OP_NAME:
+    case OP_RUST_ARRAY:
+      break;
+
+    default:
+      return operator_check_standard (exp, pos, objfile_func, data);
+    }
+
+  return 0;
+}
+
+
+
+/* Implementation of la_lookup_symbol_nonlocal for Rust.  */
+
+static struct block_symbol
+rust_lookup_symbol_nonlocal (const struct language_defn *langdef,
+			     const char *name,
+			     const struct block *block,
+			     const domain_enum domain)
+{
+  struct block_symbol result = {NULL, NULL};
+
+  if (symbol_lookup_debug)
+    {
+      fprintf_unfiltered (gdb_stdlog,
+			  "rust_lookup_symbol_non_local"
+			  " (%s, %s (scope %s), %s)\n",
+			  name, host_address_to_string (block),
+			  block_scope (block), domain_name (domain));
+    }
+
+  /* Look up bare names in the block's scope.  */
+  if (name[cp_find_first_component (name)] == '\0')
+    {
+      const char *scope = block_scope (block);
+
+      if (scope[0] != '\0')
+	{
+	  std::string scopedname = std::string (scope) + "::" + name;
+
+	  result = lookup_symbol_in_static_block (scopedname.c_str (), block,
+						  domain);
+	  if (result.symbol == NULL)
+	    result = lookup_global_symbol (scopedname.c_str (), block, domain);
+	}
+    }
+  return result;
+}
+
+
+
+/* la_sniff_from_mangled_name for Rust.  */
+
+static int
+rust_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = gdb_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
+  return *demangled != NULL;
+}
+
+
+
+static const struct exp_descriptor exp_descriptor_rust = 
+{
+  rust_print_subexp,
+  rust_operator_length,
+  rust_operator_check,
+  rust_op_name,
+  rust_dump_subexp_body,
+  rust_evaluate_subexp
+};
+
+static const char *rust_extensions[] =
+{
+  ".rs", NULL
+};
+
+static const struct language_defn rust_language_defn =
+{
+  "rust",
+  "Rust",
+  language_rust,
+  range_check_on,
+  case_sensitive_on,
+  array_row_major,
+  macro_expansion_no,
+  rust_extensions,
+  &exp_descriptor_rust,
+  rust_parse,
+  rustyyerror,
+  null_post_parser,
+  rust_printchar,		/* Print a character constant */
+  rust_printstr,		/* Function to print string constant */
+  rust_emitchar,		/* Print a single char */
+  rust_print_type,		/* Print a type using appropriate syntax */
+  rust_print_typedef,		/* Print a typedef using appropriate syntax */
+  rust_val_print,		/* Print a value using appropriate syntax */
+  c_value_print,		/* Print a top-level value */
+  default_read_var_value,	/* la_read_var_value */
+  NULL,				/* Language specific skip_trampoline */
+  NULL,				/* name_of_this */
+  rust_lookup_symbol_nonlocal,	/* lookup_symbol_nonlocal */
+  basic_lookup_transparent_type,/* lookup_transparent_type */
+  gdb_demangle,			/* Language specific symbol demangler */
+  rust_sniff_from_mangled_name,
+  NULL,				/* Language specific
+				   class_name_from_physname */
+  c_op_print_tab,		/* expression operators for printing */
+  1,				/* c-style arrays */
+  0,				/* String lower bound */
+  default_word_break_characters,
+  default_make_symbol_completion_list,
+  rust_language_arch_info,
+  default_print_array_index,
+  default_pass_by_reference,
+  c_get_string,
+  NULL,				/* la_get_symbol_name_cmp */
+  iterate_over_symbols,
+  &default_varobj_ops,
+  NULL,
+  NULL,
+  LANG_MAGIC
+};
+
+void
+_initialize_rust_language (void)
+{
+  add_language (&rust_language_defn);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-lang.h ./gdb/rust-lang.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rust-lang.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/rust-lang.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,49 @@
+/* Rust language support definitions for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef RUST_LANG_H
+#define RUST_LANG_H
+
+struct parser_state;
+struct type;
+
+/* The la_parser implementation for Rust.  */
+extern int rust_parse (struct parser_state *);
+
+/* The la_error implementation for Rust.  */
+extern void rustyyerror (char *);
+
+/* Return true if TYPE is a tuple type; otherwise false.  */
+extern bool rust_tuple_type_p (struct type *type);
+
+/* Return true if TYPE is a tuple struct type; otherwise false.  */
+extern bool rust_tuple_struct_type_p (struct type *type);
+
+/* Given a block, find the name of the block's crate. Returns an empty
+   stringif no crate name can be found.  */
+extern std::string rust_crate_for_block (const struct block *block);
+
+/* Create a new slice type.  NAME is the name of the type.  ELT_TYPE
+   is the type of the elements of the slice.  USIZE_TYPE is the Rust
+   "usize" type to use.  The new type is allocated whereever ELT_TYPE
+   is allocated.  */
+struct type *rust_slice_type (const char *name, struct type *elt_type,
+			      struct type *usize_type);
+
+#endif /* RUST_LANG_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rx-tdep.c ./gdb/rx-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/rx-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/rx-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Renesas RX for GDB, the GNU debugger.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
@@ -36,6 +36,7 @@
 
 #include "elf/rx.h"
 #include "elf-bfd.h"
+#include <algorithm>
 
 /* Certain important register numbers.  */
 enum
@@ -149,6 +150,66 @@ rx_register_name (struct gdbarch *gdbarc
   return reg_names[regnr];
 }
 
+/* Construct the flags type for PSW and BPSW.  */
+
+static struct type *
+rx_psw_type (struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->rx_psw_type == NULL)
+    {
+      tdep->rx_psw_type = arch_flags_type (gdbarch, "rx_psw_type", 4);
+      append_flags_type_flag (tdep->rx_psw_type, 0, "C");
+      append_flags_type_flag (tdep->rx_psw_type, 1, "Z");
+      append_flags_type_flag (tdep->rx_psw_type, 2, "S");
+      append_flags_type_flag (tdep->rx_psw_type, 3, "O");
+      append_flags_type_flag (tdep->rx_psw_type, 16, "I");
+      append_flags_type_flag (tdep->rx_psw_type, 17, "U");
+      append_flags_type_flag (tdep->rx_psw_type, 20, "PM");
+      append_flags_type_flag (tdep->rx_psw_type, 24, "IPL0");
+      append_flags_type_flag (tdep->rx_psw_type, 25, "IPL1");
+      append_flags_type_flag (tdep->rx_psw_type, 26, "IPL2");
+      append_flags_type_flag (tdep->rx_psw_type, 27, "IPL3");
+    }
+  return tdep->rx_psw_type;
+}
+
+/* Construct flags type for FPSW.  */
+
+static struct type *
+rx_fpsw_type (struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->rx_psw_type == NULL)
+    {
+      tdep->rx_fpsw_type = arch_flags_type (gdbarch, "rx_fpsw_type", 4);
+      append_flags_type_flag (tdep->rx_fpsw_type, 0, "RM0");
+      append_flags_type_flag (tdep->rx_fpsw_type, 1, "RM1");
+      append_flags_type_flag (tdep->rx_fpsw_type, 2, "CV");
+      append_flags_type_flag (tdep->rx_fpsw_type, 3, "CO");
+      append_flags_type_flag (tdep->rx_fpsw_type, 4, "CZ");
+      append_flags_type_flag (tdep->rx_fpsw_type, 5, "CU");
+      append_flags_type_flag (tdep->rx_fpsw_type, 6, "CX");
+      append_flags_type_flag (tdep->rx_fpsw_type, 7, "CE");
+      append_flags_type_flag (tdep->rx_fpsw_type, 8, "DN");
+      append_flags_type_flag (tdep->rx_fpsw_type, 10, "EV");
+      append_flags_type_flag (tdep->rx_fpsw_type, 11, "EO");
+      append_flags_type_flag (tdep->rx_fpsw_type, 12, "EZ");
+      append_flags_type_flag (tdep->rx_fpsw_type, 13, "EU");
+      append_flags_type_flag (tdep->rx_fpsw_type, 14, "EX");
+      append_flags_type_flag (tdep->rx_fpsw_type, 26, "FV");
+      append_flags_type_flag (tdep->rx_fpsw_type, 27, "FO");
+      append_flags_type_flag (tdep->rx_fpsw_type, 28, "FZ");
+      append_flags_type_flag (tdep->rx_fpsw_type, 29, "FU");
+      append_flags_type_flag (tdep->rx_fpsw_type, 30, "FX");
+      append_flags_type_flag (tdep->rx_fpsw_type, 31, "FS");
+    }
+
+  return tdep->rx_fpsw_type;
+}
+
 /* Implement the "register_type" gdbarch method.  */
 static struct type *
 rx_register_type (struct gdbarch *gdbarch, int reg_nr)
@@ -158,9 +219,9 @@ rx_register_type (struct gdbarch *gdbarc
   if (reg_nr == RX_PC_REGNUM)
     return builtin_type (gdbarch)->builtin_func_ptr;
   else if (reg_nr == RX_PSW_REGNUM || reg_nr == RX_BPSW_REGNUM)
-    return tdep->rx_psw_type;
+    return rx_psw_type (gdbarch);
   else if (reg_nr == RX_FPSW_REGNUM)
-    return tdep->rx_fpsw_type;
+    return rx_fpsw_type (gdbarch);
   else if (reg_nr == RX_ACC_REGNUM)
     return builtin_type (gdbarch)->builtin_unsigned_long_long;
   else
@@ -200,11 +261,12 @@ struct rx_get_opcode_byte_handle
 static int
 rx_get_opcode_byte (void *handle)
 {
-  struct rx_get_opcode_byte_handle *opcdata = handle;
+  struct rx_get_opcode_byte_handle *opcdata
+    = (struct rx_get_opcode_byte_handle *) handle;
   int status;
   gdb_byte byte;
 
-  status = target_read_memory (opcdata->pc, &byte, 1);
+  status = target_read_code (opcdata->pc, &byte, 1);
   if (status == 0)
     {
       opcdata->pc += 1;
@@ -445,10 +507,10 @@ rx_analyze_frame_prologue (struct frame_
 	stop_addr = func_start;
 
       rx_analyze_prologue (func_start, stop_addr, frame_type,
-                           *this_prologue_cache);
+			   (struct rx_prologue *) *this_prologue_cache);
     }
 
-  return *this_prologue_cache;
+  return (struct rx_prologue *) *this_prologue_cache;
 }
 
 /* Determine type of frame by scanning the function for a return
@@ -469,7 +531,7 @@ rx_frame_type (struct frame_info *this_f
 
   if (*this_cache != NULL)
     {
-      struct rx_prologue *p = *this_cache;
+      struct rx_prologue *p = (struct rx_prologue *) *this_cache;
 
       return p->frame_type;
     }
@@ -643,7 +705,7 @@ rx_frame_sniffer_common (const struct fr
     }
   else
     {
-      struct rx_prologue *p = *this_cache;
+      struct rx_prologue *p = (struct rx_prologue *) *this_cache;
 
       return sniff_p (p->frame_type);
     }
@@ -812,7 +874,8 @@ rx_push_dummy_call (struct gdbarch *gdba
 						struct_addr);
 	    }
 	  else if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT
-		   && TYPE_CODE (arg_type) != TYPE_CODE_UNION)
+		   && TYPE_CODE (arg_type) != TYPE_CODE_UNION
+		   && arg_size <= 8)
 	    {
 	      /* Argument is a scalar.  */
 	      if (arg_size == 8)
@@ -895,7 +958,7 @@ rx_push_dummy_call (struct gdbarch *gdba
 		      && arg_size <= 4 * (RX_R4_REGNUM - arg_reg + 1)
 		      && arg_size % 4 == 0)
 		    {
-		      int len = min (arg_size, 4);
+		      int len = std::min (arg_size, (ULONGEST) 4);
 
 		      if (write_pass)
 			regcache_cooked_write_unsigned (regcache, arg_reg,
@@ -958,7 +1021,7 @@ rx_return_value (struct gdbarch *gdbarch
 
       while (valtype_len > 0)
 	{
-	  int len = min (valtype_len, 4);
+	  int len = std::min (valtype_len, (ULONGEST) 4);
 
 	  regcache_cooked_read_unsigned (regcache, argreg, &u);
 	  store_unsigned_integer (readbuf + offset, len, byte_order, u);
@@ -976,7 +1039,7 @@ rx_return_value (struct gdbarch *gdbarch
 
       while (valtype_len > 0)
 	{
-	  int len = min (valtype_len, 4);
+	  int len = std::min (valtype_len, (ULONGEST) 4);
 
 	  u = extract_unsigned_integer (writebuf + offset, len, byte_order);
 	  regcache_cooked_write_unsigned (regcache, argreg, u);
@@ -989,14 +1052,9 @@ rx_return_value (struct gdbarch *gdbarch
   return RETURN_VALUE_REGISTER_CONVENTION;
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
-static const gdb_byte *
-rx_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
-{
-  static gdb_byte breakpoint[] = { 0x00 };
-  *lenptr = sizeof breakpoint;
-  return breakpoint;
-}
+constexpr gdb_byte rx_break_insn[] = { 0x00 };
+
+typedef BP_MANIPULATION (rx_break_insn) rx_breakpoint;
 
 /* Implement the dwarf_reg_to_regnum" gdbarch method.  */
 
@@ -1010,9 +1068,7 @@ rx_dwarf_reg_to_regnum (struct gdbarch *
   else if (reg == 17)
     return RX_PC_REGNUM;
   else
-    internal_error (__FILE__, __LINE__,
-                    _("Undefined dwarf2 register mapping of reg %d"),
-		    reg);
+    return -1;
 }
 
 /* Allocate and initialize a gdbarch object.  */
@@ -1045,49 +1101,10 @@ rx_gdbarch_init (struct gdbarch_info inf
 
   /* None found, create a new architecture from the information
      provided.  */
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
 
-  /* Initialize the flags type for PSW and BPSW.  */
-
-  tdep->rx_psw_type = arch_flags_type (gdbarch, "rx_psw_type", 4);
-  append_flags_type_flag (tdep->rx_psw_type, 0, "C");
-  append_flags_type_flag (tdep->rx_psw_type, 1, "Z");
-  append_flags_type_flag (tdep->rx_psw_type, 2, "S");
-  append_flags_type_flag (tdep->rx_psw_type, 3, "O");
-  append_flags_type_flag (tdep->rx_psw_type, 16, "I");
-  append_flags_type_flag (tdep->rx_psw_type, 17, "U");
-  append_flags_type_flag (tdep->rx_psw_type, 20, "PM");
-  append_flags_type_flag (tdep->rx_psw_type, 24, "IPL0");
-  append_flags_type_flag (tdep->rx_psw_type, 25, "IPL1");
-  append_flags_type_flag (tdep->rx_psw_type, 26, "IPL2");
-  append_flags_type_flag (tdep->rx_psw_type, 27, "IPL3");
-
-  /* Initialize flags type for FPSW.  */
-
-  tdep->rx_fpsw_type = arch_flags_type (gdbarch, "rx_fpsw_type", 4);
-  append_flags_type_flag (tdep->rx_fpsw_type, 0, "RM0");
-  append_flags_type_flag (tdep->rx_fpsw_type, 1, "RM1");
-  append_flags_type_flag (tdep->rx_fpsw_type, 2, "CV");
-  append_flags_type_flag (tdep->rx_fpsw_type, 3, "CO");
-  append_flags_type_flag (tdep->rx_fpsw_type, 4, "CZ");
-  append_flags_type_flag (tdep->rx_fpsw_type, 5, "CU");
-  append_flags_type_flag (tdep->rx_fpsw_type, 6, "CX");
-  append_flags_type_flag (tdep->rx_fpsw_type, 7, "CE");
-  append_flags_type_flag (tdep->rx_fpsw_type, 8, "DN");
-  append_flags_type_flag (tdep->rx_fpsw_type, 10, "EV");
-  append_flags_type_flag (tdep->rx_fpsw_type, 11, "EO");
-  append_flags_type_flag (tdep->rx_fpsw_type, 12, "EZ");
-  append_flags_type_flag (tdep->rx_fpsw_type, 13, "EU");
-  append_flags_type_flag (tdep->rx_fpsw_type, 14, "EX");
-  append_flags_type_flag (tdep->rx_fpsw_type, 26, "FV");
-  append_flags_type_flag (tdep->rx_fpsw_type, 27, "FO");
-  append_flags_type_flag (tdep->rx_fpsw_type, 28, "FZ");
-  append_flags_type_flag (tdep->rx_fpsw_type, 29, "FU");
-  append_flags_type_flag (tdep->rx_fpsw_type, 30, "FX");
-  append_flags_type_flag (tdep->rx_fpsw_type, 31, "FS");
-
   set_gdbarch_num_regs (gdbarch, RX_NUM_REGS);
   set_gdbarch_num_pseudo_regs (gdbarch, 0);
   set_gdbarch_register_name (gdbarch, rx_register_name);
@@ -1096,7 +1113,8 @@ rx_gdbarch_init (struct gdbarch_info inf
   set_gdbarch_sp_regnum (gdbarch, RX_SP_REGNUM);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
-  set_gdbarch_breakpoint_from_pc (gdbarch, rx_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, rx_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, rx_breakpoint::bp_from_kind);
   set_gdbarch_skip_prologue (gdbarch, rx_skip_prologue);
 
   set_gdbarch_print_insn (gdbarch, print_insn_rx);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-nat.c ./gdb/s390-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/s390-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* S390 native-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
    for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -28,16 +28,18 @@
 #include "gregset.h"
 #include "regset.h"
 #include "nat/linux-ptrace.h"
+#include "gdbcmd.h"
 
 #include "s390-linux-tdep.h"
 #include "elf/common.h"
 
 #include <asm/ptrace.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/types.h>
 #include <sys/procfs.h>
 #include <sys/ucontext.h>
 #include <elf.h>
+#include <algorithm>
 
 /* Per-thread arch-specific data.  */
 
@@ -92,6 +94,18 @@ static const struct regset s390_64_gregs
 #define S390_PSWA_OFFSET 8
 #endif
 
+/* PER-event mask bits and PER control bits (CR9).  */
+
+#define PER_BIT(n)			(1UL << (63 - (n)))
+#define PER_EVENT_BRANCH		PER_BIT (32)
+#define PER_EVENT_IFETCH		PER_BIT (33)
+#define PER_EVENT_STORE			PER_BIT (34)
+#define PER_EVENT_NULLIFICATION		PER_BIT (39)
+#define PER_CONTROL_BRANCH_ADDRESS	PER_BIT (40)
+#define PER_CONTROL_SUSPENSION		PER_BIT (41)
+#define PER_CONTROL_ALTERATION		PER_BIT (42)
+
+
 /* Fill GDB's register array with the general-purpose register values
    in *REGP.
 
@@ -223,7 +237,7 @@ fetch_regs (struct regcache *regcache, i
   parea.len = sizeof (regs);
   parea.process_addr = (addr_t) &regs;
   parea.kernel_addr = offsetof (struct user_regs_struct, psw);
-  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't get registers"));
 
   supply_gregset (regcache, (const gregset_t *) &regs);
@@ -240,12 +254,12 @@ store_regs (const struct regcache *regca
   parea.len = sizeof (regs);
   parea.process_addr = (addr_t) &regs;
   parea.kernel_addr = offsetof (struct user_regs_struct, psw);
-  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't get registers"));
 
   fill_gregset (regcache, &regs, regnum);
 
-  if (ptrace (PTRACE_POKEUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_POKEUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't write registers"));
 }
 
@@ -260,7 +274,7 @@ fetch_fpregs (struct regcache *regcache,
   parea.len = sizeof (fpregs);
   parea.process_addr = (addr_t) &fpregs;
   parea.kernel_addr = offsetof (struct user_regs_struct, fp_regs);
-  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't get floating point status"));
 
   supply_fpregset (regcache, (const fpregset_t *) &fpregs);
@@ -277,12 +291,12 @@ store_fpregs (const struct regcache *reg
   parea.len = sizeof (fpregs);
   parea.process_addr = (addr_t) &fpregs;
   parea.kernel_addr = offsetof (struct user_regs_struct, fp_regs);
-  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't get floating point status"));
 
   fill_fpregset (regcache, &fpregs, regnum);
 
-  if (ptrace (PTRACE_POKEUSR_AREA, tid, (long) &parea) < 0)
+  if (ptrace (PTRACE_POKEUSR_AREA, tid, (long) &parea, 0) < 0)
     perror_with_name (_("Couldn't write floating point status"));
 }
 
@@ -294,7 +308,7 @@ static void
 fetch_regset (struct regcache *regcache, int tid,
 	      int regset_id, int regsize, const struct regset *regset)
 {
-  gdb_byte *buf = alloca (regsize);
+  void *buf = alloca (regsize);
   struct iovec iov;
 
   iov.iov_base = buf;
@@ -318,7 +332,7 @@ static void
 store_regset (struct regcache *regcache, int tid,
 	      int regset_id, int regsize, const struct regset *regset)
 {
-  gdb_byte *buf = alloca (regsize);
+  void *buf = alloca (regsize);
   struct iovec iov;
 
   iov.iov_base = buf;
@@ -338,7 +352,7 @@ store_regset (struct regcache *regcache,
 static int
 check_regset (int tid, int regset, int regsize)
 {
-  gdb_byte *buf = alloca (regsize);
+  void *buf = alloca (regsize);
   struct iovec iov;
 
   iov.iov_base = buf;
@@ -430,36 +444,196 @@ s390_linux_store_inferior_registers (str
 
 /* Hardware-assisted watchpoint handling.  */
 
-/* We maintain a list of all currently active watchpoints in order
-   to properly handle watchpoint removal.
+/* For each process we maintain a list of all currently active
+   watchpoints, in order to properly handle watchpoint removal.
 
    The only thing we actually need is the total address space area
    spanned by the watchpoints.  */
 
-struct watch_area
+typedef struct watch_area
 {
-  struct watch_area *next;
   CORE_ADDR lo_addr;
   CORE_ADDR hi_addr;
+} s390_watch_area;
+
+DEF_VEC_O (s390_watch_area);
+
+/* Hardware debug state.  */
+
+struct s390_debug_reg_state
+{
+  VEC_s390_watch_area *watch_areas;
+  VEC_s390_watch_area *break_areas;
 };
 
-static struct watch_area *watch_base = NULL;
+/* Per-process data.  */
+
+struct s390_process_info
+{
+  struct s390_process_info *next;
+  pid_t pid;
+  struct s390_debug_reg_state state;
+};
+
+static struct s390_process_info *s390_process_list = NULL;
+
+/* Find process data for process PID.  */
+
+static struct s390_process_info *
+s390_find_process_pid (pid_t pid)
+{
+  struct s390_process_info *proc;
+
+  for (proc = s390_process_list; proc; proc = proc->next)
+    if (proc->pid == pid)
+      return proc;
+
+  return NULL;
+}
+
+/* Add process data for process PID.  Returns newly allocated info
+   object.  */
+
+static struct s390_process_info *
+s390_add_process (pid_t pid)
+{
+  struct s390_process_info *proc = XCNEW (struct s390_process_info);
+
+  proc->pid = pid;
+  proc->next = s390_process_list;
+  s390_process_list = proc;
+
+  return proc;
+}
+
+/* Get data specific info for process PID, creating it if necessary.
+   Never returns NULL.  */
+
+static struct s390_process_info *
+s390_process_info_get (pid_t pid)
+{
+  struct s390_process_info *proc;
+
+  proc = s390_find_process_pid (pid);
+  if (proc == NULL)
+    proc = s390_add_process (pid);
+
+  return proc;
+}
+
+/* Get hardware debug state for process PID.  */
+
+static struct s390_debug_reg_state *
+s390_get_debug_reg_state (pid_t pid)
+{
+  return &s390_process_info_get (pid)->state;
+}
+
+/* Called whenever GDB is no longer debugging process PID.  It deletes
+   data structures that keep track of hardware debug state.  */
+
+static void
+s390_forget_process (pid_t pid)
+{
+  struct s390_process_info *proc, **proc_link;
+
+  proc = s390_process_list;
+  proc_link = &s390_process_list;
+
+  while (proc != NULL)
+    {
+      if (proc->pid == pid)
+	{
+	  VEC_free (s390_watch_area, proc->state.watch_areas);
+	  VEC_free (s390_watch_area, proc->state.break_areas);
+	  *proc_link = proc->next;
+	  xfree (proc);
+	  return;
+	}
+
+      proc_link = &proc->next;
+      proc = *proc_link;
+    }
+}
+
+/* linux_nat_new_fork hook.   */
+
+static void
+s390_linux_new_fork (struct lwp_info *parent, pid_t child_pid)
+{
+  pid_t parent_pid;
+  struct s390_debug_reg_state *parent_state;
+  struct s390_debug_reg_state *child_state;
+
+  /* NULL means no watchpoint has ever been set in the parent.  In
+     that case, there's nothing to do.  */
+  if (lwp_arch_private_info (parent) == NULL)
+    return;
+
+  /* GDB core assumes the child inherits the watchpoints/hw breakpoints of
+     the parent.  So copy the debug state from parent to child.  */
+
+  parent_pid = ptid_get_pid (parent->ptid);
+  parent_state = s390_get_debug_reg_state (parent_pid);
+  child_state = s390_get_debug_reg_state (child_pid);
+
+  child_state->watch_areas = VEC_copy (s390_watch_area,
+				       parent_state->watch_areas);
+  child_state->break_areas = VEC_copy (s390_watch_area,
+				       parent_state->break_areas);
+}
+
+/* Dump PER state.  */
+
+static void
+s390_show_debug_regs (int tid, const char *where)
+{
+  per_struct per_info;
+  ptrace_area parea;
+
+  parea.len = sizeof (per_info);
+  parea.process_addr = (addr_t) &per_info;
+  parea.kernel_addr = offsetof (struct user_regs_struct, per_info);
+
+  if (ptrace (PTRACE_PEEKUSR_AREA, tid, &parea, 0) < 0)
+    perror_with_name (_("Couldn't retrieve debug regs"));
+
+  debug_printf ("PER (debug) state for %d -- %s\n"
+		"  cr9-11: %lx %lx %lx\n"
+		"  start, end: %lx %lx\n"
+		"  code/ATMID: %x  address: %lx  PAID: %x\n",
+		tid,
+		where,
+		per_info.control_regs.words.cr[0],
+		per_info.control_regs.words.cr[1],
+		per_info.control_regs.words.cr[2],
+		per_info.starting_addr,
+		per_info.ending_addr,
+		per_info.lowcore.words.perc_atmid,
+		per_info.lowcore.words.address,
+		per_info.lowcore.words.access_id);
+}
 
 static int
 s390_stopped_by_watchpoint (struct target_ops *ops)
 {
+  struct s390_debug_reg_state *state
+    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
   per_lowcore_bits per_lowcore;
   ptrace_area parea;
   int result;
 
+  if (show_debug_regs)
+    s390_show_debug_regs (s390_inferior_tid (), "stop");
+
   /* Speed up common case.  */
-  if (!watch_base)
+  if (VEC_empty (s390_watch_area, state->watch_areas))
     return 0;
 
   parea.len = sizeof (per_lowcore);
   parea.process_addr = (addr_t) & per_lowcore;
   parea.kernel_addr = offsetof (struct user_regs_struct, per_info.lowcore);
-  if (ptrace (PTRACE_PEEKUSR_AREA, s390_inferior_tid (), &parea) < 0)
+  if (ptrace (PTRACE_PEEKUSR_AREA, s390_inferior_tid (), &parea, 0) < 0)
     perror_with_name (_("Couldn't retrieve watchpoint status"));
 
   result = (per_lowcore.perc_storage_alteration == 1
@@ -469,7 +643,7 @@ s390_stopped_by_watchpoint (struct targe
     {
       /* Do not report this watchpoint again.  */
       memset (&per_lowcore, 0, sizeof (per_lowcore));
-      if (ptrace (PTRACE_POKEUSR_AREA, s390_inferior_tid (), &parea) < 0)
+      if (ptrace (PTRACE_POKEUSR_AREA, s390_inferior_tid (), &parea, 0) < 0)
 	perror_with_name (_("Couldn't clear watchpoint status"));
     }
 
@@ -482,65 +656,115 @@ static void
 s390_prepare_to_resume (struct lwp_info *lp)
 {
   int tid;
+  pid_t pid = ptid_get_pid (ptid_of_lwp (lp));
 
   per_struct per_info;
   ptrace_area parea;
 
   CORE_ADDR watch_lo_addr = (CORE_ADDR)-1, watch_hi_addr = 0;
-  struct watch_area *area;
+  unsigned ix;
+  s390_watch_area *area;
+  struct arch_lwp_info *lp_priv = lwp_arch_private_info (lp);
+  struct s390_debug_reg_state *state = s390_get_debug_reg_state (pid);
+  int step = lwp_is_stepping (lp);
 
-  if (lp->arch_private == NULL
-      || !lp->arch_private->per_info_changed)
+  /* Nothing to do if there was never any PER info for this thread.  */
+  if (lp_priv == NULL)
     return;
 
-  lp->arch_private->per_info_changed = 0;
-
-  tid = ptid_get_lwp (lp->ptid);
-  if (tid == 0)
-    tid = ptid_get_pid (lp->ptid);
-
-  for (area = watch_base; area; area = area->next)
+  /* If PER info has changed, update it.  When single-stepping, disable
+     hardware breakpoints (if any).  Otherwise we're done.  */
+  if (!lp_priv->per_info_changed)
     {
-      watch_lo_addr = min (watch_lo_addr, area->lo_addr);
-      watch_hi_addr = max (watch_hi_addr, area->hi_addr);
+      if (!step || VEC_empty (s390_watch_area, state->break_areas))
+	return;
     }
 
+  lp_priv->per_info_changed = 0;
+
+  tid = ptid_get_lwp (ptid_of_lwp (lp));
+  if (tid == 0)
+    tid = pid;
+
   parea.len = sizeof (per_info);
   parea.process_addr = (addr_t) & per_info;
   parea.kernel_addr = offsetof (struct user_regs_struct, per_info);
-  if (ptrace (PTRACE_PEEKUSR_AREA, tid, &parea) < 0)
-    perror_with_name (_("Couldn't retrieve watchpoint status"));
 
-  if (watch_base)
+  /* Clear PER info, but adjust the single_step field (used by older
+     kernels only).  */
+  memset (&per_info, 0, sizeof (per_info));
+  per_info.single_step = (step != 0);
+
+  if (!VEC_empty (s390_watch_area, state->watch_areas))
     {
-      per_info.control_regs.bits.em_storage_alteration = 1;
-      per_info.control_regs.bits.storage_alt_space_ctl = 1;
+      for (ix = 0;
+	   VEC_iterate (s390_watch_area, state->watch_areas, ix, area);
+	   ix++)
+	{
+	  watch_lo_addr = std::min (watch_lo_addr, area->lo_addr);
+	  watch_hi_addr = std::max (watch_hi_addr, area->hi_addr);
+	}
+
+      /* Enable storage-alteration events.  */
+      per_info.control_regs.words.cr[0] |= (PER_EVENT_STORE
+					    | PER_CONTROL_ALTERATION);
     }
-  else
+
+  if (!VEC_empty (s390_watch_area, state->break_areas))
     {
-      per_info.control_regs.bits.em_storage_alteration = 0;
-      per_info.control_regs.bits.storage_alt_space_ctl = 0;
+      /* Don't install hardware breakpoints while single-stepping, since
+	 our PER settings (e.g. the nullification bit) might then conflict
+	 with the kernel's.  But re-install them afterwards.  */
+      if (step)
+	lp_priv->per_info_changed = 1;
+      else
+	{
+	  for (ix = 0;
+	       VEC_iterate (s390_watch_area, state->break_areas, ix, area);
+	       ix++)
+	    {
+	      watch_lo_addr = std::min (watch_lo_addr, area->lo_addr);
+	      watch_hi_addr = std::max (watch_hi_addr, area->hi_addr);
+	    }
+
+	  /* If there's just one breakpoint, enable instruction-fetching
+	     nullification events for the breakpoint address (fast).
+	     Otherwise stop after any instruction within the PER area and
+	     after any branch into it (slow).  */
+	  if (watch_hi_addr == watch_lo_addr)
+	    per_info.control_regs.words.cr[0] |= (PER_EVENT_NULLIFICATION
+						  | PER_EVENT_IFETCH);
+	  else
+	    {
+	      /* The PER area must include the instruction before the
+		 first breakpoint address.  */
+	      watch_lo_addr = watch_lo_addr > 6 ? watch_lo_addr - 6 : 0;
+	      per_info.control_regs.words.cr[0]
+		|= (PER_EVENT_BRANCH
+		    | PER_EVENT_IFETCH
+		    | PER_CONTROL_BRANCH_ADDRESS);
+	    }
+	}
     }
   per_info.starting_addr = watch_lo_addr;
   per_info.ending_addr = watch_hi_addr;
 
-  if (ptrace (PTRACE_POKEUSR_AREA, tid, &parea) < 0)
+  if (ptrace (PTRACE_POKEUSR_AREA, tid, &parea, 0) < 0)
     perror_with_name (_("Couldn't modify watchpoint status"));
+
+  if (show_debug_regs)
+    s390_show_debug_regs (tid, "resume");
 }
 
-/* Make sure that LP is stopped and mark its PER info as changed, so
-   the next resume will update it.  */
+/* Mark the PER info as changed, so the next resume will update it.  */
 
 static void
-s390_refresh_per_info (struct lwp_info *lp)
+s390_mark_per_info_changed (struct lwp_info *lp)
 {
-  if (lp->arch_private == NULL)
-    lp->arch_private = XCNEW (struct arch_lwp_info);
+  if (lwp_arch_private_info (lp) == NULL)
+    lwp_set_arch_private_info (lp, XCNEW (struct arch_lwp_info));
 
-  lp->arch_private->per_info_changed = 1;
-
-  if (!lp->stopped)
-    linux_stop_lwp (lp);
+  lwp_arch_private_info (lp)->per_info_changed = 1;
 }
 
 /* When attaching to a new thread, mark its PER info as changed.  */
@@ -548,66 +772,129 @@ s390_refresh_per_info (struct lwp_info *
 static void
 s390_new_thread (struct lwp_info *lp)
 {
-  lp->arch_private = XCNEW (struct arch_lwp_info);
-  lp->arch_private->per_info_changed = 1;
+  s390_mark_per_info_changed (lp);
 }
 
+/* Iterator callback for s390_refresh_per_info.  */
+
 static int
-s390_insert_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
-			struct expression *cond)
+s390_refresh_per_info_cb (struct lwp_info *lp, void *arg)
 {
-  struct lwp_info *lp;
-  struct watch_area *area = xmalloc (sizeof (struct watch_area));
+  s390_mark_per_info_changed (lp);
 
-  if (!area)
-    return -1;
+  if (!lwp_is_stopped (lp))
+    linux_stop_lwp (lp);
+  return 0;
+}
 
-  area->lo_addr = addr;
-  area->hi_addr = addr + len - 1;
+/* Make sure that threads are stopped and mark PER info as changed.  */
 
-  area->next = watch_base;
-  watch_base = area;
+static int
+s390_refresh_per_info (void)
+{
+  ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ()));
 
-  ALL_LWPS (lp)
-    s390_refresh_per_info (lp);
+  iterate_over_lwps (pid_ptid, s390_refresh_per_info_cb, NULL);
   return 0;
 }
 
 static int
-s390_remove_watchpoint (struct target_ops *self,
-			CORE_ADDR addr, int len, int type,
+s390_insert_watchpoint (struct target_ops *self,
+			CORE_ADDR addr, int len, enum target_hw_bp_type type,
 			struct expression *cond)
 {
-  struct lwp_info *lp;
-  struct watch_area *area, **parea;
+  s390_watch_area area;
+  struct s390_debug_reg_state *state
+    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+
+  area.lo_addr = addr;
+  area.hi_addr = addr + len - 1;
+  VEC_safe_push (s390_watch_area, state->watch_areas, &area);
 
-  for (parea = &watch_base; *parea; parea = &(*parea)->next)
-    if ((*parea)->lo_addr == addr
-	&& (*parea)->hi_addr == addr + len - 1)
-      break;
+  return s390_refresh_per_info ();
+}
 
-  if (!*parea)
+static int
+s390_remove_watchpoint (struct target_ops *self,
+			CORE_ADDR addr, int len, enum target_hw_bp_type type,
+			struct expression *cond)
+{
+  unsigned ix;
+  s390_watch_area *area;
+  struct s390_debug_reg_state *state
+    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+
+  for (ix = 0;
+       VEC_iterate (s390_watch_area, state->watch_areas, ix, area);
+       ix++)
     {
-      fprintf_unfiltered (gdb_stderr,
-			  "Attempt to remove nonexistent watchpoint.\n");
-      return -1;
+      if (area->lo_addr == addr && area->hi_addr == addr + len - 1)
+	{
+	  VEC_unordered_remove (s390_watch_area, state->watch_areas, ix);
+	  return s390_refresh_per_info ();
+	}
     }
 
-  area = *parea;
-  *parea = area->next;
-  xfree (area);
+  fprintf_unfiltered (gdb_stderr,
+		      "Attempt to remove nonexistent watchpoint.\n");
+  return -1;
+}
+
+/* Implement the "can_use_hw_breakpoint" target_ops method. */
 
-  ALL_LWPS (lp)
-    s390_refresh_per_info (lp);
+static int
+s390_can_use_hw_breakpoint (struct target_ops *self,
+			    enum bptype type, int cnt, int othertype)
+{
+  if (type == bp_hardware_watchpoint || type == bp_hardware_breakpoint)
+    return 1;
   return 0;
 }
 
+/* Implement the "insert_hw_breakpoint" target_ops method.  */
+
 static int
-s390_can_use_hw_breakpoint (struct target_ops *self,
-			    int type, int cnt, int othertype)
+s390_insert_hw_breakpoint (struct target_ops *self,
+			   struct gdbarch *gdbarch,
+			   struct bp_target_info *bp_tgt)
+{
+  s390_watch_area area;
+  struct s390_debug_reg_state *state;
+
+  area.lo_addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
+  area.hi_addr = area.lo_addr;
+  state = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+  VEC_safe_push (s390_watch_area, state->break_areas, &area);
+
+  return s390_refresh_per_info ();
+}
+
+/* Implement the "remove_hw_breakpoint" target_ops method.  */
+
+static int
+s390_remove_hw_breakpoint (struct target_ops *self,
+			   struct gdbarch *gdbarch,
+			   struct bp_target_info *bp_tgt)
 {
-  return type == bp_hardware_watchpoint;
+  unsigned ix;
+  struct watch_area *area;
+  struct s390_debug_reg_state *state;
+
+  state = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+  for (ix = 0;
+       VEC_iterate (s390_watch_area, state->break_areas, ix, area);
+       ix++)
+    {
+      if (area->lo_addr == bp_tgt->placed_address)
+	{
+	  VEC_unordered_remove (s390_watch_area, state->break_areas, ix);
+	  return s390_refresh_per_info ();
+	}
+    }
+
+  fprintf_unfiltered (gdb_stderr,
+		      "Attempt to remove nonexistent breakpoint.\n");
+  return -1;
 }
 
 static int
@@ -730,6 +1017,8 @@ _initialize_s390_nat (void)
 
   /* Add our watchpoint methods.  */
   t->to_can_use_hw_breakpoint = s390_can_use_hw_breakpoint;
+  t->to_insert_hw_breakpoint = s390_insert_hw_breakpoint;
+  t->to_remove_hw_breakpoint = s390_remove_hw_breakpoint;
   t->to_region_ok_for_hw_watchpoint = s390_region_ok_for_hw_watchpoint;
   t->to_have_continuable_watchpoint = 1;
   t->to_stopped_by_watchpoint = s390_stopped_by_watchpoint;
@@ -744,4 +1033,19 @@ _initialize_s390_nat (void)
   linux_nat_add_target (t);
   linux_nat_set_new_thread (t, s390_new_thread);
   linux_nat_set_prepare_to_resume (t, s390_prepare_to_resume);
+  linux_nat_set_forget_process (t, s390_forget_process);
+  linux_nat_set_new_fork (t, s390_linux_new_fork);
+
+  /* A maintenance command to enable showing the PER state.  */
+  add_setshow_boolean_cmd ("show-debug-regs", class_maintenance,
+			   &show_debug_regs, _("\
+Set whether to show the PER (debug) hardware state."), _("\
+Show whether to show the PER (debug) hardware state."), _("\
+Use \"on\" to enable, \"off\" to disable.\n\
+If enabled, the PER state is shown after it is changed by GDB,\n\
+and when the inferior triggers a breakpoint or watchpoint."),
+			   NULL,
+			   NULL,
+			   &maintenance_set_cmdlist,
+			   &maintenance_show_cmdlist);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-tdep.c ./gdb/s390-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/s390-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
    for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -44,6 +44,8 @@
 #include "prologue-value.h"
 #include "linux-tdep.h"
 #include "s390-linux-tdep.h"
+#include "linux-record.h"
+#include "record-full.h"
 #include "auxv.h"
 #include "xml-syscall.h"
 
@@ -56,6 +58,7 @@
 #include "elf/common.h"
 #include "elf/s390.h"
 #include "elf-bfd.h"
+#include <algorithm>
 
 #include "features/s390-linux32.c"
 #include "features/s390-linux32v1.c"
@@ -76,6 +79,9 @@
 #define XML_SYSCALL_FILENAME_S390 "syscalls/s390-linux.xml"
 #define XML_SYSCALL_FILENAME_S390X "syscalls/s390x-linux.xml"
 
+/* Holds the current set of options to be passed to the disassembler.  */
+static char *s390_disassembler_options;
+
 enum s390_abi_kind
 {
   ABI_LINUX_S390,
@@ -165,6 +171,40 @@ s390_write_pc (struct regcache *regcache
     regcache_cooked_write_unsigned (regcache, S390_SYSTEM_CALL_REGNUM, 0);
 }
 
+/* The "guess_tracepoint_registers" gdbarch method.  */
+
+static void
+s390_guess_tracepoint_registers (struct gdbarch *gdbarch,
+				 struct regcache *regcache,
+				 CORE_ADDR addr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int sz = register_size (gdbarch, S390_PSWA_REGNUM);
+  gdb_byte *reg = (gdb_byte *) alloca (sz);
+  ULONGEST pswm, pswa;
+
+  /* Set PSWA from the location and a default PSWM (the only part we're
+     unlikely to get right is the CC).  */
+  if (tdep->abi == ABI_LINUX_S390)
+    {
+      /* 31-bit PSWA needs high bit set (it's very unlikely the target
+	 was in 24-bit mode).  */
+      pswa = addr | 0x80000000UL;
+      pswm = 0x070d0000UL;
+    }
+  else
+    {
+      pswa = addr;
+      pswm = 0x0705000180000000ULL;
+    }
+
+  store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswa);
+  regcache_raw_supply (regcache, S390_PSWA_REGNUM, reg);
+
+  store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswm);
+  regcache_raw_supply (regcache, S390_PSWM_REGNUM, reg);
+}
+
 
 /* DWARF Register Mapping.  */
 
@@ -523,6 +563,212 @@ s390_pseudo_register_reggroup_p (struct 
   return default_register_reggroup_p (gdbarch, regnum, group);
 }
 
+/* The "ax_pseudo_register_collect" gdbarch method.  */
+
+static int
+s390_ax_pseudo_register_collect (struct gdbarch *gdbarch,
+				 struct agent_expr *ax, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  if (regnum == tdep->pc_regnum)
+    {
+      ax_reg_mask (ax, S390_PSWA_REGNUM);
+    }
+  else if (regnum == tdep->cc_regnum)
+    {
+      ax_reg_mask (ax, S390_PSWM_REGNUM);
+    }
+  else if (regnum_is_gpr_full (tdep, regnum))
+    {
+      regnum -= tdep->gpr_full_regnum;
+      ax_reg_mask (ax, S390_R0_REGNUM + regnum);
+      ax_reg_mask (ax, S390_R0_UPPER_REGNUM + regnum);
+    }
+  else if (regnum_is_vxr_full (tdep, regnum))
+    {
+      regnum -= tdep->v0_full_regnum;
+      ax_reg_mask (ax, S390_F0_REGNUM + regnum);
+      ax_reg_mask (ax, S390_V0_LOWER_REGNUM + regnum);
+    }
+  else
+    {
+      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+    }
+  return 0;
+}
+
+/* The "ax_pseudo_register_push_stack" gdbarch method.  */
+
+static int
+s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
+				    struct agent_expr *ax, int regnum)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  if (regnum == tdep->pc_regnum)
+    {
+      ax_reg (ax, S390_PSWA_REGNUM);
+      if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
+	{
+	  ax_zero_ext (ax, 31);
+	}
+    }
+  else if (regnum == tdep->cc_regnum)
+    {
+      ax_reg (ax, S390_PSWM_REGNUM);
+      if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
+	ax_const_l (ax, 12);
+      else
+	ax_const_l (ax, 44);
+      ax_simple (ax, aop_rsh_unsigned);
+      ax_zero_ext (ax, 2);
+    }
+  else if (regnum_is_gpr_full (tdep, regnum))
+    {
+      regnum -= tdep->gpr_full_regnum;
+      ax_reg (ax, S390_R0_REGNUM + regnum);
+      ax_reg (ax, S390_R0_UPPER_REGNUM + regnum);
+      ax_const_l (ax, 32);
+      ax_simple (ax, aop_lsh);
+      ax_simple (ax, aop_bit_or);
+    }
+  else if (regnum_is_vxr_full (tdep, regnum))
+    {
+      /* Too large to stuff on the stack.  */
+      return 1;
+    }
+  else
+    {
+      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+    }
+  return 0;
+}
+
+/* The "gen_return_address" gdbarch method.  Since this is supposed to be
+   just a best-effort method, and we don't really have the means to run
+   the full unwinder here, just collect the link register.  */
+
+static void
+s390_gen_return_address (struct gdbarch *gdbarch,
+			 struct agent_expr *ax, struct axs_value *value,
+			 CORE_ADDR scope)
+{
+  value->type = register_type (gdbarch, S390_R14_REGNUM);
+  value->kind = axs_lvalue_register;
+  value->u.reg = S390_R14_REGNUM;
+}
+
+
+/* A helper for s390_software_single_step, decides if an instruction
+   is a partial-execution instruction that needs to be executed until
+   completion when in record mode.  If it is, returns 1 and writes
+   instruction length to a pointer.  */
+
+static int
+s390_is_partial_instruction (struct gdbarch *gdbarch, CORE_ADDR loc, int *len)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  uint16_t insn;
+
+  insn = read_memory_integer (loc, 2, byte_order);
+
+  switch (insn >> 8)
+    {
+    case 0xa8: /* MVCLE */
+      *len = 4;
+      return 1;
+
+    case 0xeb:
+      {
+        insn = read_memory_integer (loc + 4, 2, byte_order);
+        if ((insn & 0xff) == 0x8e)
+          {
+            /* MVCLU */
+            *len = 6;
+            return 1;
+          }
+      }
+      break;
+    }
+
+  switch (insn)
+    {
+    case 0xb255: /* MVST */
+    case 0xb263: /* CMPSC */
+    case 0xb2a5: /* TRE */
+    case 0xb2a6: /* CU21 */
+    case 0xb2a7: /* CU12 */
+    case 0xb9b0: /* CU14 */
+    case 0xb9b1: /* CU24 */
+    case 0xb9b2: /* CU41 */
+    case 0xb9b3: /* CU42 */
+    case 0xb92a: /* KMF */
+    case 0xb92b: /* KMO */
+    case 0xb92f: /* KMC */
+    case 0xb92d: /* KMCTR */
+    case 0xb92e: /* KM */
+    case 0xb93c: /* PPNO */
+    case 0xb990: /* TRTT */
+    case 0xb991: /* TRTO */
+    case 0xb992: /* TROT */
+    case 0xb993: /* TROO */
+      *len = 4;
+      return 1;
+    }
+
+  return 0;
+}
+
+/* Implement the "software_single_step" gdbarch method, needed to single step
+   through instructions like MVCLE in record mode, to make sure they are
+   executed to completion.  Without that, record will save the full length
+   of destination buffer on every iteration, even though the CPU will only
+   process about 4kiB of it each time, leading to O(n**2) memory and time
+   complexity.  */
+
+static VEC (CORE_ADDR) *
+s390_software_single_step (struct regcache *regcache)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  CORE_ADDR loc = regcache_read_pc (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  int len;
+  uint16_t insn;
+  VEC (CORE_ADDR) *next_pcs = NULL;
+
+  /* Special handling only if recording.  */
+  if (!record_full_is_used ())
+    return NULL;
+
+  /* First, match a partial instruction.  */
+  if (!s390_is_partial_instruction (gdbarch, loc, &len))
+    return NULL;
+
+  loc += len;
+
+  /* Second, look for a branch back to it.  */
+  insn = read_memory_integer (loc, 2, byte_order);
+  if (insn != 0xa714) /* BRC with mask 1 */
+    return NULL;
+
+  insn = read_memory_integer (loc + 2, 2, byte_order);
+  if (insn != (uint16_t) -(len / 2))
+    return NULL;
+
+  loc += 4;
+
+  /* Found it, step past the whole thing.  */
+  VEC_safe_push (CORE_ADDR, next_pcs, loc);
+
+  return next_pcs;
+}
+
+static int
+s390_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
+				   struct displaced_step_closure *closure)
+{
+  return 1;
+}
+
 
 /* Maps for register sets.  */
 
@@ -601,7 +847,6 @@ s390_supply_tdb_regset (const struct reg
 {
   ULONGEST tdw;
   enum register_status ret;
-  int i;
 
   regcache_supply_regset (regset, regcache, regnum, regs, len);
   ret = regcache_cooked_read_unsigned (regcache, S390_TDB_DWORD0_REGNUM, &tdw);
@@ -686,7 +931,7 @@ s390_iterate_over_regset_sections (struc
     cb (".reg-s390-last-break", 8,
 	(gdbarch_ptr_bit (gdbarch) == 32
 	 ? &s390_last_break_regset : &s390x_last_break_regset),
-	"s930 last-break address", cb_data);
+	"s390 last-break address", cb_data);
 
   if (tdep->have_linux_v2)
     cb (".reg-s390-system-call", 4, &s390_system_call_regset,
@@ -1168,7 +1413,7 @@ static void
 s390_check_for_saved (void *data_untyped, pv_t addr,
 		      CORE_ADDR size, pv_t value)
 {
-  struct s390_prologue_data *data = data_untyped;
+  struct s390_prologue_data *data = (struct s390_prologue_data *) data_untyped;
   int i, offset;
 
   if (!pv_is_register (addr, S390_SP_REGNUM))
@@ -1418,13 +1663,25 @@ s390_analyze_prologue (struct gdbarch *g
 	    break;
 	}
 
+      /* BRC/BRCL -- branch relative on condition.  Ignore "branch
+	 never", branch to following instruction, and "conditional
+	 trap" (BRC +2).  Otherwise terminate search.  */
+      else if (is_ri (insn, op1_brc, op2_brc, &r1, &i2))
+	{
+	  if (r1 != 0 && i2 != 1 && i2 != 2)
+	    break;
+	}
+      else if (is_ril (insn, op1_brcl, op2_brcl, &r1, &i2))
+	{
+	  if (r1 != 0 && i2 != 3)
+	    break;
+	}
+
       /* Terminate search when hitting any other branch instruction.  */
       else if (is_rr (insn, op_basr, &r1, &r2)
 	       || is_rx (insn, op_bas, &r1, &d2, &x2, &b2)
 	       || is_rr (insn, op_bcr, &r1, &r2)
 	       || is_rx (insn, op_bc, &r1, &d2, &x2, &b2)
-	       || is_ri (insn, op1_brc, op2_brc, &r1, &i2)
-	       || is_ril (insn, op1_brcl, op2_brcl, &r1, &i2)
 	       || is_ril (insn, op1_brasl, op2_brasl, &r2, &i2))
 	break;
 
@@ -1480,7 +1737,7 @@ s390_skip_prologue (struct gdbarch *gdba
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (pc, post_prologue_pc);
+	return std::max (pc, post_prologue_pc);
     }
 
   skip_pc = s390_analyze_prologue (gdbarch, pc, (CORE_ADDR)-1, &data);
@@ -1539,6 +1796,116 @@ s390_stack_frame_destroyed_p (struct gdb
 
 /* Displaced stepping.  */
 
+/* Return true if INSN is a non-branch RIL-b or RIL-c format
+   instruction.  */
+
+static int
+is_non_branch_ril (gdb_byte *insn)
+{
+  gdb_byte op1 = insn[0];
+
+  if (op1 == 0xc4)
+    {
+      gdb_byte op2 = insn[1] & 0x0f;
+
+      switch (op2)
+	{
+	case 0x02: /* llhrl */
+	case 0x04: /* lghrl */
+	case 0x05: /* lhrl */
+	case 0x06: /* llghrl */
+	case 0x07: /* sthrl */
+	case 0x08: /* lgrl */
+	case 0x0b: /* stgrl */
+	case 0x0c: /* lgfrl */
+	case 0x0d: /* lrl */
+	case 0x0e: /* llgfrl */
+	case 0x0f: /* strl */
+	  return 1;
+	}
+    }
+  else if (op1 == 0xc6)
+    {
+      gdb_byte op2 = insn[1] & 0x0f;
+
+      switch (op2)
+	{
+	case 0x00: /* exrl */
+	case 0x02: /* pfdrl */
+	case 0x04: /* cghrl */
+	case 0x05: /* chrl */
+	case 0x06: /* clghrl */
+	case 0x07: /* clhrl */
+	case 0x08: /* cgrl */
+	case 0x0a: /* clgrl */
+	case 0x0c: /* cgfrl */
+	case 0x0d: /* crl */
+	case 0x0e: /* clgfrl */
+	case 0x0f: /* clrl */
+	  return 1;
+	}
+    }
+
+  return 0;
+}
+
+/* Implementation of gdbarch_displaced_step_copy_insn.  */
+
+static struct displaced_step_closure *
+s390_displaced_step_copy_insn (struct gdbarch *gdbarch,
+			       CORE_ADDR from, CORE_ADDR to,
+			       struct regcache *regs)
+{
+  size_t len = gdbarch_max_insn_length (gdbarch);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len);
+  struct cleanup *old_chain = make_cleanup (xfree, buf);
+
+  read_memory (from, buf, len);
+
+  /* Adjust the displacement field of PC-relative RIL instructions,
+     except branches.  The latter are handled in the fixup hook.  */
+  if (is_non_branch_ril (buf))
+    {
+      LONGEST offset;
+
+      offset = extract_signed_integer (buf + 2, 4, BFD_ENDIAN_BIG);
+      offset = (from - to + offset * 2) / 2;
+
+      /* If the instruction is too far from the jump pad, punt.  This
+	 will usually happen with instructions in shared libraries.
+	 We could probably support these by rewriting them to be
+	 absolute or fully emulating them.  */
+      if (offset < INT32_MIN || offset > INT32_MAX)
+	{
+	  /* Let the core fall back to stepping over the breakpoint
+	     in-line.  */
+	  if (debug_displaced)
+	    {
+	      fprintf_unfiltered (gdb_stdlog,
+				  "displaced: can't displaced step "
+				  "RIL instruction: offset %s out of range\n",
+				  plongest (offset));
+	    }
+	  do_cleanups (old_chain);
+	  return NULL;
+	}
+
+      store_signed_integer (buf + 2, 4, BFD_ENDIAN_BIG, offset);
+    }
+
+  write_memory (to, buf, len);
+
+  if (debug_displaced)
+    {
+      fprintf_unfiltered (gdb_stdlog, "displaced: copy %s->%s: ",
+                          paddress (gdbarch, from), paddress (gdbarch, to));
+      displaced_step_dump_bytes (gdb_stdlog, buf, len);
+    }
+
+  discard_cleanups (old_chain);
+  return (struct displaced_step_closure *) buf;
+}
+
 /* Fix up the state of registers and memory after having single-stepped
    a displaced instruction.  */
 static void
@@ -1547,8 +1914,7 @@ s390_displaced_step_fixup (struct gdbarc
 			   CORE_ADDR from, CORE_ADDR to,
 			   struct regcache *regs)
 {
-  /* Since we use simple_displaced_step_copy_insn, our closure is a
-     copy of the instruction.  */
+  /* Our closure is a copy of the instruction.  */
   gdb_byte *insn = (gdb_byte *) closure;
   static int s390_instrlen[] = { 2, 4, 4, 6 };
   int insnlen = s390_instrlen[insn[0] >> 6];
@@ -1753,9 +2119,12 @@ s390_prologue_frame_unwind_cache (struct
      bother searching for it -- with modern compilers this would be mostly
      pointless anyway.  Trust that we'll either have valid DWARF-2 CFI data
      or else a valid backchain ...  */
-  func = get_frame_func (this_frame);
-  if (!func)
-    return 0;
+  if (!get_frame_func_if_available (this_frame, &info->func))
+    {
+      info->func = -1;
+      return 0;
+    }
+  func = info->func;
 
   /* Try to analyze the prologue.  */
   result = s390_analyze_prologue (gdbarch, func,
@@ -1909,7 +2278,6 @@ s390_prologue_frame_unwind_cache (struct
       info->local_base = prev_sp - size;
     }
 
-  info->func = func;
   return 1;
 }
 
@@ -1922,7 +2290,7 @@ s390_backchain_frame_unwind_cache (struc
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR backchain;
   ULONGEST reg;
-  LONGEST sp;
+  LONGEST sp, tmp;
   int i;
 
   /* Set up ABI call-saved/call-clobbered registers.  */
@@ -1935,7 +2303,9 @@ s390_backchain_frame_unwind_cache (struc
 
   /* Get the backchain.  */
   reg = get_frame_register_unsigned (this_frame, S390_SP_REGNUM);
-  backchain = read_memory_unsigned_integer (reg, word_size, byte_order);
+  if (!safe_read_memory_integer (reg, word_size, byte_order, &tmp))
+    tmp = 0;
+  backchain = (CORE_ADDR) tmp;
 
   /* A zero backchain terminates the frame chain.  As additional
      sanity check, let's verify that the spill slot for SP in the
@@ -1972,7 +2342,7 @@ s390_frame_unwind_cache (struct frame_in
   struct s390_unwind_cache *info;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct s390_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct s390_unwind_cache);
   *this_prologue_cache = info;
@@ -2007,7 +2377,11 @@ s390_frame_this_id (struct frame_info *t
     = s390_frame_unwind_cache (this_frame, this_prologue_cache);
 
   if (info->frame_base == -1)
-    return;
+    {
+      if (info->func != -1)
+	*this_id = frame_id_build_unavailable_stack (info->func);
+      return;
+    }
 
   *this_id = frame_id_build (info->frame_base, info->func);
 }
@@ -2016,7 +2390,6 @@ static struct value *
 s390_frame_prev_register (struct frame_info *this_frame,
 			  void **this_prologue_cache, int regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct s390_unwind_cache *info
     = s390_frame_unwind_cache (this_frame, this_prologue_cache);
 
@@ -2053,7 +2426,7 @@ s390_stub_frame_unwind_cache (struct fra
   ULONGEST reg;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct s390_stub_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct s390_stub_unwind_cache);
   *this_prologue_cache = info;
@@ -2137,7 +2510,7 @@ s390_sigtramp_frame_unwind_cache (struct
   int i;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct s390_sigtramp_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct s390_sigtramp_unwind_cache);
   *this_prologue_cache = info;
@@ -2310,6 +2683,301 @@ s390_linux_get_syscall_number (struct gd
   return svc_number;
 }
 
+/* Process record-replay */
+
+static struct linux_record_tdep s390_linux_record_tdep;
+static struct linux_record_tdep s390x_linux_record_tdep;
+
+/* Record all registers but PC register for process-record.  */
+
+static int
+s390_all_but_pc_registers_record (struct regcache *regcache)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int i;
+
+  for (i = 0; i < 16; i++)
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + i))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + i))
+        return -1;
+      if (tdep->gpr_full_regnum != -1)
+        if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
+          return -1;
+      if (tdep->v0_full_regnum != -1)
+        {
+          if (record_full_arch_list_add_reg (regcache, S390_V0_LOWER_REGNUM + i))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_V16_REGNUM + i))
+            return -1;
+        }
+    }
+  if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+    return -1;
+  if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+    return -1;
+
+  return 0;
+}
+
+static enum gdb_syscall
+s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
+{
+  switch (syscall)
+    {
+    /* s390 syscall numbers < 222 are mostly the same as x86, so just list
+       the exceptions.  */
+    case 0:
+      return gdb_sys_no_syscall;
+    case 7:
+      return gdb_sys_restart_syscall;
+    /* These syscalls work only on 31-bit.  */
+    case 13: /* time */
+    case 16: /* lchown[16] */
+    case 23: /* setuid[16] */
+    case 24: /* getuid[16] */
+    case 25: /* stime */
+    case 46: /* setgid[16] */
+    case 47: /* getgid[16] */
+    case 49: /* seteuid[16] */
+    case 50: /* getegid[16] */
+    case 70: /* setreuid[16] */
+    case 71: /* setregid[16] */
+    case 76: /* [old_]getrlimit */
+    case 80: /* getgroups[16] */
+    case 81: /* setgroups[16] */
+    case 95: /* fchown[16] */
+    case 101: /* ioperm */
+    case 138: /* setfsuid[16] */
+    case 139: /* setfsgid[16] */
+    case 140: /* _llseek */
+    case 164: /* setresuid[16] */
+    case 165: /* getresuid[16] */
+    case 170: /* setresgid[16] */
+    case 171: /* getresgid[16] */
+    case 182: /* chown[16] */
+    case 192: /* mmap2 */
+    case 193: /* truncate64 */
+    case 194: /* ftruncate64 */
+    case 195: /* stat64 */
+    case 196: /* lstat64 */
+    case 197: /* fstat64 */
+    case 221: /* fcntl64 */
+      if (abi == ABI_LINUX_S390)
+        return (enum gdb_syscall) syscall;
+      return gdb_sys_no_syscall;
+    /* These syscalls don't exist on s390.  */
+    case 17: /* break */
+    case 18: /* oldstat */
+    case 28: /* oldfstat */
+    case 31: /* stty */
+    case 32: /* gtty */
+    case 35: /* ftime */
+    case 44: /* prof */
+    case 53: /* lock */
+    case 56: /* mpx */
+    case 58: /* ulimit */
+    case 59: /* oldolduname */
+    case 68: /* sgetmask */
+    case 69: /* ssetmask */
+    case 82: /* [old_]select */
+    case 84: /* oldlstat */
+    case 98: /* profil */
+    case 109: /* olduname */
+    case 113: /* vm86old */
+    case 123: /* modify_ldt */
+    case 166: /* vm86 */
+      return gdb_sys_no_syscall;
+    case 110:
+      return gdb_sys_lookup_dcookie;
+    /* Here come the differences.  */
+    case 222:
+      return gdb_sys_readahead;
+    case 223:
+      if (abi == ABI_LINUX_S390)
+        return gdb_sys_sendfile64;
+      return gdb_sys_no_syscall;
+    /* 224-235 handled below */
+    case 236:
+      return gdb_sys_gettid;
+    case 237:
+      return gdb_sys_tkill;
+    case 238:
+      return gdb_sys_futex;
+    case 239:
+      return gdb_sys_sched_setaffinity;
+    case 240:
+      return gdb_sys_sched_getaffinity;
+    case 241:
+      return gdb_sys_tgkill;
+    /* 242 reserved */
+    case 243:
+      return gdb_sys_io_setup;
+    case 244:
+      return gdb_sys_io_destroy;
+    case 245:
+      return gdb_sys_io_getevents;
+    case 246:
+      return gdb_sys_io_submit;
+    case 247:
+      return gdb_sys_io_cancel;
+    case 248:
+      return gdb_sys_exit_group;
+    case 249:
+      return gdb_sys_epoll_create;
+    case 250:
+      return gdb_sys_epoll_ctl;
+    case 251:
+      return gdb_sys_epoll_wait;
+    case 252:
+      return gdb_sys_set_tid_address;
+    case 253:
+      return gdb_sys_fadvise64;
+    /* 254-262 handled below */
+    /* 263 reserved */
+    case 264:
+      if (abi == ABI_LINUX_S390)
+        return gdb_sys_fadvise64_64;
+      return gdb_sys_no_syscall;
+    case 265:
+      return gdb_sys_statfs64;
+    case 266:
+      return gdb_sys_fstatfs64;
+    case 267:
+      return gdb_sys_remap_file_pages;
+    /* 268-270 reserved */
+    /* 271-277 handled below */
+    case 278:
+      return gdb_sys_add_key;
+    case 279:
+      return gdb_sys_request_key;
+    case 280:
+      return gdb_sys_keyctl;
+    case 281:
+      return gdb_sys_waitid;
+    /* 282-312 handled below */
+    case 293:
+      if (abi == ABI_LINUX_S390)
+        return gdb_sys_fstatat64;
+      return gdb_sys_newfstatat;
+    /* 313+ not yet supported */
+    default:
+      {
+	int ret;
+
+	/* Most "old" syscalls copied from i386.  */
+	if (syscall <= 221)
+	  ret = syscall;
+	/* xattr syscalls.  */
+	else if (syscall >= 224 && syscall <= 235)
+	  ret = syscall + 2;
+	/* timer syscalls.  */
+	else if (syscall >= 254 && syscall <= 262)
+	  ret = syscall + 5;
+	/* mq_* and kexec_load */
+	else if (syscall >= 271 && syscall <= 277)
+	  ret = syscall + 6;
+	/* ioprio_set .. epoll_pwait */
+	else if (syscall >= 282 && syscall <= 312)
+	  ret = syscall + 7;
+	else
+	  ret = gdb_sys_no_syscall;
+
+	return (enum gdb_syscall) ret;
+      }
+    }
+}
+
+static int
+s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  int ret;
+  enum gdb_syscall syscall_gdb;
+
+  /* On s390, syscall number can be passed either as immediate field of svc
+     instruction, or in %r1 (with svc 0).  */
+  if (syscall_native == 0)
+    regcache_raw_read_signed (regcache, S390_R1_REGNUM, &syscall_native);
+
+  syscall_gdb = s390_canonicalize_syscall (syscall_native, tdep->abi);
+
+  if (syscall_gdb < 0)
+    {
+      printf_unfiltered (_("Process record and replay target doesn't "
+                           "support syscall number %s\n"),
+                         plongest (syscall_native));
+      return -1;
+    }
+
+  if (syscall_gdb == gdb_sys_sigreturn
+      || syscall_gdb == gdb_sys_rt_sigreturn)
+    {
+      if (s390_all_but_pc_registers_record (regcache))
+        return -1;
+      return 0;
+    }
+
+  if (tdep->abi == ABI_LINUX_ZSERIES)
+    ret = record_linux_system_call (syscall_gdb, regcache,
+                                    &s390x_linux_record_tdep);
+  else
+    ret = record_linux_system_call (syscall_gdb, regcache,
+                                    &s390_linux_record_tdep);
+
+  if (ret)
+    return ret;
+
+  /* Record the return value of the system call.  */
+  if (record_full_arch_list_add_reg (regcache, S390_R2_REGNUM))
+    return -1;
+
+  return 0;
+}
+
+static int
+s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
+                          enum gdb_signal signal)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  /* There are two kinds of signal frames on s390. rt_sigframe is always
+     the larger one, so don't even bother with sigframe.  */
+  const int sizeof_rt_sigframe = (tdep->abi == ABI_LINUX_ZSERIES ?
+                                  160 + 8 + 128 + 1024 : 96 + 8 + 128 + 1000);
+  ULONGEST sp;
+  int i;
+
+  for (i = 0; i < 16; i++)
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+        return -1;
+      if (tdep->gpr_full_regnum != -1)
+        if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
+          return -1;
+    }
+  if (record_full_arch_list_add_reg (regcache, S390_PSWA_REGNUM))
+    return -1;
+  if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+    return -1;
+
+  /* Record the change in the stack.
+     frame-size = sizeof (struct rt_sigframe) + SIGNAL_FRAMESIZE  */
+  regcache_raw_read_unsigned (regcache, S390_SP_REGNUM, &sp);
+  sp -= sizeof_rt_sigframe;
+
+  if (record_full_arch_list_add_mem (sp, sizeof_rt_sigframe))
+    return -1;
+
+  if (record_full_arch_list_add_end ())
+    return -1;
+
+  return 0;
+}
 
 /* Frame base handling.  */
 
@@ -2368,8 +3036,6 @@ s390_dwarf2_frame_init_reg (struct gdbar
 			    struct dwarf2_frame_state_reg *reg,
 			    struct frame_info *this_frame)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   /* The condition code (and thus PSW mask) is call-clobbered.  */
   if (regnum == S390_PSWM_REGNUM)
     reg->how = DWARF2_FRAME_REG_UNDEFINED;
@@ -2886,17 +3552,9 @@ s390_return_value (struct gdbarch *gdbar
 
 
 /* Breakpoints.  */
+constexpr gdb_byte s390_break_insn[] = { 0x0, 0x1 };
 
-static const gdb_byte *
-s390_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
-{
-  static const gdb_byte breakpoint[] = { 0x0, 0x1 };
-
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
-
+typedef BP_MANIPULATION (s390_break_insn) s390_breakpoint;
 
 /* Address handling.  */
 
@@ -2970,6 +3628,4107 @@ s390_stap_is_single_operand (struct gdba
 	  || isdigit (*s)); /* Literal number.  */
 }
 
+/* Process record and replay helpers.  */
+
+/* Takes the intermediate sum of address calculations and masks off upper
+   bits according to current addressing mode.  */
+
+static CORE_ADDR
+s390_record_address_mask (struct gdbarch *gdbarch, struct regcache *regcache,
+                         CORE_ADDR val) {
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  ULONGEST pswm, pswa;
+  int am;
+  if (tdep->abi == ABI_LINUX_S390)
+    {
+      regcache_raw_read_unsigned (regcache, S390_PSWA_REGNUM, &pswa);
+      am = pswa >> 31 & 1;
+    }
+  else
+    {
+      regcache_raw_read_unsigned (regcache, S390_PSWM_REGNUM, &pswm);
+      am = pswm >> 31 & 3;
+    }
+  switch (am)
+    {
+    case 0:
+      return val & 0xffffff;
+    case 1:
+      return val & 0x7fffffff;
+    case 3:
+      return val;
+    default:
+      fprintf_unfiltered (gdb_stdlog, "Warning: Addressing mode %d used.", am);
+      return 0;
+    }
+}
+
+/* Calculates memory address using pre-calculated index, raw instruction word
+   with b and d/dl fields, and raw instruction byte with dh field.  Index and
+   dh should be set to 0 if unused.  */
+
+static CORE_ADDR
+s390_record_calc_disp_common (struct gdbarch *gdbarch, struct regcache *regcache,
+                             ULONGEST x, uint16_t bd, int8_t dh)
+{
+  uint8_t rb = bd >> 12 & 0xf;
+  int32_t d = (bd & 0xfff) | ((int32_t)dh << 12);
+  ULONGEST b;
+  CORE_ADDR res = d + x;
+  if (rb)
+    {
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + rb, &b);
+      res += b;
+    }
+  return s390_record_address_mask (gdbarch, regcache, res);
+}
+
+/* Calculates memory address using raw x, b + d/dl, dh fields from
+   instruction.  rx and dh should be set to 0 if unused.  */
+
+static CORE_ADDR
+s390_record_calc_disp (struct gdbarch *gdbarch, struct regcache *regcache,
+                      uint8_t rx, uint16_t bd, int8_t dh)
+{
+  ULONGEST x = 0;
+  if (rx)
+    regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + rx, &x);
+  return s390_record_calc_disp_common (gdbarch, regcache, x, bd, dh);
+}
+
+/* Calculates memory address for VSCE[GF] instructions.  */
+
+static int
+s390_record_calc_disp_vsce (struct gdbarch *gdbarch, struct regcache *regcache,
+                            uint8_t vx, uint8_t el, uint8_t es, uint16_t bd,
+                            int8_t dh, CORE_ADDR *res)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  ULONGEST x;
+  gdb_byte buf[16];
+  if (tdep->v0_full_regnum == -1 || el * es >= 16)
+    return -1;
+  if (vx < 16)
+    regcache_cooked_read (regcache, tdep->v0_full_regnum + vx, buf);
+  else
+    regcache_raw_read (regcache, S390_V16_REGNUM + vx - 16, buf);
+  x = extract_unsigned_integer (buf + el * es, es, byte_order);
+  *res = s390_record_calc_disp_common (gdbarch, regcache, x, bd, dh);
+  return 0;
+}
+
+/* Calculates memory address for instructions with relative long addressing.  */
+
+static CORE_ADDR
+s390_record_calc_rl (struct gdbarch *gdbarch, struct regcache *regcache,
+                    CORE_ADDR addr, uint16_t i1, uint16_t i2)
+{
+  int32_t ri = i1 << 16 | i2;
+  return s390_record_address_mask (gdbarch, regcache, addr + (LONGEST)ri * 2);
+}
+
+/* Population count helper.  */
+
+static int s390_popcnt (unsigned int x) {
+  int res = 0;
+  while (x)
+    {
+      if (x & 1)
+        res++;
+      x >>= 1;
+    }
+  return res;
+}
+
+/* Record 64-bit register.  */
+
+static int
+s390_record_gpr_g (struct gdbarch *gdbarch, struct regcache *regcache, int i)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+    return -1;
+  if (tdep->abi == ABI_LINUX_S390)
+    if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
+      return -1;
+  return 0;
+}
+
+/* Record high 32 bits of a register.  */
+
+static int
+s390_record_gpr_h (struct gdbarch *gdbarch, struct regcache *regcache, int i)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  if (tdep->abi == ABI_LINUX_S390)
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
+        return -1;
+    }
+  else
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+        return -1;
+    }
+  return 0;
+}
+
+/* Record vector register.  */
+
+static int
+s390_record_vr (struct gdbarch *gdbarch, struct regcache *regcache, int i)
+{
+  if (i < 16)
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + i))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_V0_LOWER_REGNUM + i))
+        return -1;
+    }
+  else
+    {
+      if (record_full_arch_list_add_reg (regcache, S390_V16_REGNUM + i - 16))
+        return -1;
+    }
+  return 0;
+}
+
+static int
+s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
+                    CORE_ADDR addr)
+{
+  uint16_t insn[3] = {0};
+  /* Instruction as bytes.  */
+  uint8_t ibyte[6];
+  /* Instruction as nibbles.  */
+  uint8_t inib[12];
+  /* Instruction vector registers.  */
+  uint8_t ivec[4];
+  CORE_ADDR oaddr, oaddr2, oaddr3;
+  ULONGEST tmp;
+  int i, n;
+  /* if EX/EXRL instruction used, here's the reg parameter */
+  int ex = -1;
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+  /* Attempting to use EX or EXRL jumps back here */
+ex:
+
+  /* Read instruction.  */
+  insn[0] = read_memory_unsigned_integer (addr, 2, byte_order);
+  /* If execute was involved, do the adjustment.  */
+  if (ex != -1)
+    insn[0] |= ex & 0xff;
+  /* Two highest bits determine instruction size.  */
+  if (insn[0] >= 0x4000)
+    insn[1] = read_memory_unsigned_integer (addr+2, 2, byte_order);
+  else
+    /* Not necessary, but avoids uninitialized variable warnings.  */
+    insn[1] = 0;
+  if (insn[0] >= 0xc000)
+    insn[2] = read_memory_unsigned_integer (addr+4, 2, byte_order);
+  else
+    insn[2] = 0;
+  /* Split instruction into bytes and nibbles.  */
+  for (i = 0; i < 3; i++)
+    {
+      ibyte[i*2] = insn[i] >> 8 & 0xff;
+      ibyte[i*2+1] = insn[i] & 0xff;
+    }
+  for (i = 0; i < 6; i++)
+    {
+      inib[i*2] = ibyte[i] >> 4 & 0xf;
+      inib[i*2+1] = ibyte[i] & 0xf;
+    }
+  /* Compute vector registers, if applicable.  */
+  ivec[0] = (inib[9] >> 3 & 1) << 4 | inib[2];
+  ivec[1] = (inib[9] >> 2 & 1) << 4 | inib[3];
+  ivec[2] = (inib[9] >> 1 & 1) << 4 | inib[4];
+  ivec[3] = (inib[9] >> 0 & 1) << 4 | inib[8];
+
+  switch (ibyte[0])
+    {
+    /* 0x00 undefined */
+
+    case 0x01:
+      /* E-format instruction */
+      switch (ibyte[1])
+        {
+        /* 0x00 undefined */
+        /* 0x01 unsupported: PR - program return */
+        /* 0x02 unsupported: UPT */
+        /* 0x03 undefined */
+        /* 0x04 privileged: PTFF - perform timing facility function */
+        /* 0x05-0x06 undefined */
+        /* 0x07 privileged: SCKPF - set clock programmable field */
+        /* 0x08-0x09 undefined */
+
+        case 0x0a: /* PFPO - perform floating point operation */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          if (!(tmp & 0x80000000u))
+            {
+              uint8_t ofc = tmp >> 16 & 0xff;
+              switch (ofc)
+                {
+                case 0x00: /* HFP32 */
+                case 0x01: /* HFP64 */
+                case 0x05: /* BFP32 */
+                case 0x06: /* BFP64 */
+                case 0x08: /* DFP32 */
+                case 0x09: /* DFP64 */
+                  if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM))
+                    return -1;
+                  break;
+                case 0x02: /* HFP128 */
+                case 0x07: /* BFP128 */
+                case 0x0a: /* DFP128 */
+                  if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM))
+                    return -1;
+                  if (record_full_arch_list_add_reg (regcache, S390_F2_REGNUM))
+                    return -1;
+                  break;
+                default:
+                  fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PFPO OFC %02x at %s.\n",
+                                      ofc, paddress (gdbarch, addr));
+                  return -1;
+                }
+
+              if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_R1_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0x0b: /* TAM - test address mode */
+        case 0x0c: /* SAM24 - set address mode 24 */
+        case 0x0d: /* SAM31 - set address mode 31 */
+        case 0x0e: /* SAM64 - set address mode 64 */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0x0f-0xfe undefined */
+
+        /* 0xff unsupported: TRAP */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0x02 undefined */
+    /* 0x03 undefined */
+
+    case 0x04: /* SPM - set program mask */
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x05: /* BALR - branch and link */
+    case 0x45: /* BAL - branch and link */
+    case 0x06: /* BCTR - branch on count */
+    case 0x46: /* BCT - branch on count */
+    case 0x0d: /* BASR - branch and save */
+    case 0x4d: /* BAS - branch and save */
+    case 0x84: /* BRXH - branch relative on index high */
+    case 0x85: /* BRXLE - branch relative on index low or equal */
+    case 0x86: /* BXH - branch on index high */
+    case 0x87: /* BXLE - branch on index low or equal */
+      /* BA[SL]* use native-size destination for linkage info, BCT*, BRX*, BX*
+         use 32-bit destination as counter.  */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      break;
+
+    case 0x07: /* BCR - branch on condition */
+    case 0x47: /* BC - branch on condition */
+      /* No effect other than PC transfer.  */
+      break;
+
+    /* 0x08 undefined */
+    /* 0x09 undefined */
+
+    case 0x0a:
+      /* SVC - supervisor call */
+      if (s390_linux_syscall_record (regcache, ibyte[1]))
+        return -1;
+      break;
+
+    case 0x0b: /* BSM - branch and set mode */
+      if (inib[2])
+        if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+          return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x0c: /* BASSM - branch and save and set mode */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x0e: /* MVCL - move long [interruptible] */
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[2], &tmp);
+      oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[2] | 1), &tmp);
+      tmp &= 0xffffff;
+      if (record_full_arch_list_add_mem (oaddr, tmp))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[3] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x0f: /* CLCL - compare logical long [interruptible] */
+    case 0xa9: /* CLCLE - compare logical long extended [partial] */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[3] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x10: /* LPR - load positive */
+    case 0x11: /* LNR - load negative */
+    case 0x12: /* LTR - load and test */
+    case 0x13: /* LCR - load complement */
+    case 0x14: /* NR - and */
+    case 0x16: /* OR - or */
+    case 0x17: /* XR - xor */
+    case 0x1a: /* AR - add */
+    case 0x1b: /* SR - subtract */
+    case 0x1e: /* ALR - add logical */
+    case 0x1f: /* SLR - subtract logical */
+    case 0x54: /* N - and */
+    case 0x56: /* O - or */
+    case 0x57: /* X - xor */
+    case 0x5a: /* A - add */
+    case 0x5b: /* S - subtract */
+    case 0x5e: /* AL - add logical */
+    case 0x5f: /* SL - subtract logical */
+    case 0x4a: /* AH - add halfword */
+    case 0x4b: /* SH - subtract halfword */
+    case 0x8a: /* SRA - shift right single */
+    case 0x8b: /* SLA - shift left single */
+    case 0xbf: /* ICM - insert characters under mask */
+      /* 32-bit destination + flags */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x15: /* CLR - compare logical */
+    case 0x55: /* CL - compare logical */
+    case 0x19: /* CR - compare */
+    case 0x29: /* CDR - compare */
+    case 0x39: /* CER - compare */
+    case 0x49: /* CH - compare halfword */
+    case 0x59: /* C - compare */
+    case 0x69: /* CD - compare */
+    case 0x79: /* CE - compare */
+    case 0x91: /* TM - test under mask */
+    case 0x95: /* CLI - compare logical */
+    case 0xbd: /* CLM - compare logical under mask */
+    case 0xd5: /* CLC - compare logical */
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x18: /* LR - load */
+    case 0x48: /* LH - load halfword */
+    case 0x58: /* L - load */
+    case 0x41: /* LA - load address */
+    case 0x43: /* IC - insert character */
+    case 0x4c: /* MH - multiply halfword */
+    case 0x71: /* MS - multiply single */
+    case 0x88: /* SRL - shift right single logical */
+    case 0x89: /* SLL - shift left single logical */
+      /* 32-bit, 8-bit (IC), or native width (LA) destination, no flags */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      break;
+
+    case 0x1c: /* MR - multiply */
+    case 0x5c: /* M - multiply */
+    case 0x1d: /* DR - divide */
+    case 0x5d: /* D - divide */
+    case 0x8c: /* SRDL - shift right double logical */
+    case 0x8d: /* SLDL - shift left double logical */
+      /* 32-bit pair destination, no flags */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      break;
+
+    case 0x20: /* LPDR - load positive */
+    case 0x30: /* LPER - load positive */
+    case 0x21: /* LNDR - load negative */
+    case 0x31: /* LNER - load negative */
+    case 0x22: /* LTDR - load and test */
+    case 0x32: /* LTER - load and test */
+    case 0x23: /* LCDR - load complement */
+    case 0x33: /* LCER - load complement */
+    case 0x2a: /* ADR - add */
+    case 0x3a: /* AER - add */
+    case 0x6a: /* AD - add */
+    case 0x7a: /* AE - add */
+    case 0x2b: /* SDR - subtract */
+    case 0x3b: /* SER - subtract */
+    case 0x6b: /* SD - subtract */
+    case 0x7b: /* SE - subtract */
+    case 0x2e: /* AWR - add unnormalized */
+    case 0x3e: /* AUR - add unnormalized */
+    case 0x6e: /* AW - add unnormalized */
+    case 0x7e: /* AU - add unnormalized */
+    case 0x2f: /* SWR - subtract unnormalized */
+    case 0x3f: /* SUR - subtract unnormalized */
+    case 0x6f: /* SW - subtract unnormalized */
+    case 0x7f: /* SU - subtract unnormalized */
+      /* float destination + flags */
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x24: /* HDR - halve */
+    case 0x34: /* HER - halve */
+    case 0x25: /* LDXR - load rounded */
+    case 0x35: /* LEDR - load rounded */
+    case 0x28: /* LDR - load */
+    case 0x38: /* LER - load */
+    case 0x68: /* LD - load */
+    case 0x78: /* LE - load */
+    case 0x2c: /* MDR - multiply */
+    case 0x3c: /* MDER - multiply */
+    case 0x6c: /* MD - multiply */
+    case 0x7c: /* MDE - multiply */
+    case 0x2d: /* DDR - divide */
+    case 0x3d: /* DER - divide */
+    case 0x6d: /* DD - divide */
+    case 0x7d: /* DE - divide */
+      /* float destination, no flags */
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+        return -1;
+      break;
+
+    case 0x26: /* MXR - multiply */
+    case 0x27: /* MXDR - multiply */
+    case 0x67: /* MXD - multiply */
+      /* float pair destination, no flags */
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[2] | 2)))
+        return -1;
+      break;
+
+    case 0x36: /* AXR - add */
+    case 0x37: /* SXR - subtract */
+      /* float pair destination + flags */
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[2] | 2)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x40: /* STH - store halfword */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 2))
+        return -1;
+      break;
+
+    case 0x42: /* STC - store character */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 1))
+        return -1;
+      break;
+
+    case 0x44: /* EX - execute */
+      if (ex != -1)
+        {
+          fprintf_unfiltered (gdb_stdlog, "Warning: Double execute at %s.\n",
+                              paddress (gdbarch, addr));
+          return -1;
+        }
+      addr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+      if (inib[2])
+        {
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[2], &tmp);
+          ex = tmp & 0xff;
+        }
+      else
+        {
+          ex = 0;
+        }
+      goto ex;
+
+    case 0x4e: /* CVD - convert to decimal */
+    case 0x60: /* STD - store */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 8))
+        return -1;
+      break;
+
+    case 0x4f: /* CVB - convert to binary */
+      /* 32-bit gpr destination + FPC (DXC write) */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    case 0x50: /* ST - store */
+    case 0x70: /* STE - store */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 4))
+        return -1;
+      break;
+
+    case 0x51: /* LAE - load address extended */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + inib[2]))
+        return -1;
+      break;
+
+    /* 0x52 undefined */
+    /* 0x53 undefined */
+
+    /* 0x61-0x66 undefined */
+
+    /* 0x72-0x77 undefined */
+
+    /* 0x80 privileged: SSM - set system mask */
+    /* 0x81 undefined */
+    /* 0x82 privileged: LPSW - load PSW */
+    /* 0x83 privileged: diagnose */
+
+    case 0x8e: /* SRDA - shift right double */
+    case 0x8f: /* SLDA - shift left double */
+      /* 32-bit pair destination + flags */
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x90: /* STM - store multiple */
+    case 0x9b: /* STAM - store access multiple */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (inib[2] <= inib[3])
+        n = inib[3] - inib[2] + 1;
+      else
+        n = inib[3] + 0x10 - inib[2] + 1;
+      if (record_full_arch_list_add_mem (oaddr, n * 4))
+        return -1;
+      break;
+
+    case 0x92: /* MVI - move */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 1))
+        return -1;
+      break;
+
+    case 0x93: /* TS - test and set */
+    case 0x94: /* NI - and */
+    case 0x96: /* OI - or */
+    case 0x97: /* XI - xor */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 1))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0x98: /* LM - load multiple */
+      for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+        if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+          return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+        return -1;
+      break;
+
+    /* 0x99 privileged: TRACE */
+
+    case 0x9a: /* LAM - load access multiple */
+      for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+        if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + i))
+          return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + inib[3]))
+        return -1;
+      break;
+
+    /* 0x9c-0x9f privileged and obsolete (old I/O) */
+    /* 0xa0-0xa4 undefined */
+
+    case 0xa5:
+    case 0xa7:
+      /* RI-format instruction */
+      switch (ibyte[0] << 4 | inib[3])
+        {
+        case 0xa50: /* IIHH - insert immediate */
+        case 0xa51: /* IIHL - insert immediate */
+          /* high 32-bit destination */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        case 0xa52: /* IILH - insert immediate */
+        case 0xa53: /* IILL - insert immediate */
+        case 0xa75: /* BRAS - branch relative and save */
+        case 0xa76: /* BRCT - branch relative on count */
+        case 0xa78: /* LHI - load halfword immediate */
+        case 0xa7c: /* MHI - multiply halfword immediate */
+          /* 32-bit or native destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        case 0xa54: /* NIHH - and immediate */
+        case 0xa55: /* NIHL - and immediate */
+        case 0xa58: /* OIHH - or immediate */
+        case 0xa59: /* OIHL - or immediate */
+          /* high 32-bit destination + flags */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xa56: /* NILH - and immediate */
+        case 0xa57: /* NILL - and immediate */
+        case 0xa5a: /* OILH - or immediate */
+        case 0xa5b: /* OILL - or immediate */
+        case 0xa7a: /* AHI - add halfword immediate */
+          /* 32-bit destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xa5c: /* LLIHH - load logical immediate */
+        case 0xa5d: /* LLIHL - load logical immediate */
+        case 0xa5e: /* LLILH - load logical immediate */
+        case 0xa5f: /* LLILL - load logical immediate */
+        case 0xa77: /* BRCTG - branch relative on count */
+        case 0xa79: /* LGHI - load halfword immediate */
+        case 0xa7d: /* MGHI - multiply halfword immediate */
+          /* 64-bit destination */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        case 0xa70: /* TMLH - test under mask */
+        case 0xa71: /* TMLL - test under mask */
+        case 0xa72: /* TMHH - test under mask */
+        case 0xa73: /* TMHL - test under mask */
+        case 0xa7e: /* CHI - compare halfword immediate */
+        case 0xa7f: /* CGHI - compare halfword immediate */
+          /* flags only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xa74: /* BRC - branch relative on condition */
+          /* no register change */
+          break;
+
+        case 0xa7b: /* AGHI - add halfword immediate */
+          /* 64-bit destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xa6 undefined */
+
+    case 0xa8: /* MVCLE - move long extended [partial] */
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[2], &tmp);
+      oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[2] | 1), &tmp);
+      if (record_full_arch_list_add_mem (oaddr, tmp))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[3] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    /* 0xaa-0xab undefined */
+    /* 0xac privileged: STNSM - store then and system mask */
+    /* 0xad privileged: STOSM - store then or system mask */
+    /* 0xae privileged: SIGP - signal processor */
+    /* 0xaf unsupported: MC - monitor call */
+    /* 0xb0 undefined */
+    /* 0xb1 privileged: LRA - load real address */
+
+    case 0xb2:
+    case 0xb3:
+    case 0xb9:
+      /* S/RRD/RRE/RRF/IE-format instruction */
+      switch (insn[0])
+        {
+        /* 0xb200-0xb204 undefined or privileged */
+
+        case 0xb205: /* STCK - store clock */
+        case 0xb27c: /* STCKF - store clock fast */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb206-0xb219 undefined, privileged, or unsupported */
+        /* 0xb21a unsupported: CFC */
+        /* 0xb21b-0xb221 undefined or privileged */
+
+        case 0xb222: /* IPM - insert program mask */
+        case 0xb24f: /* EAR - extract access */
+        case 0xb252: /* MSR - multiply single */
+        case 0xb2ec: /* ETND - extract transaction nesting depth */
+        case 0xb38c: /* EFPC - extract fpc */
+        case 0xb91f: /* LRVR - load reversed */
+        case 0xb926: /* LBR - load byte */
+        case 0xb927: /* LHR - load halfword */
+        case 0xb994: /* LLCR - load logical character */
+        case 0xb995: /* LLHR - load logical halfword */
+        case 0xb9f2: /* LOCR - load on condition */
+          /* 32-bit gpr destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          break;
+
+        /* 0xb223-0xb22c privileged or unsupported */
+
+        case 0xb22d: /* DXR - divide */
+        case 0xb325: /* LXDR - load lengthened */
+        case 0xb326: /* LXER - load lengthened */
+        case 0xb336: /* SQXR - square root */
+        case 0xb365: /* LXR - load */
+        case 0xb367: /* FIXR - load fp integer */
+        case 0xb376: /* LZXR - load zero */
+        case 0xb3b6: /* CXFR - convert from fixed */
+        case 0xb3c6: /* CXGR - convert from fixed */
+        case 0xb3fe: /* IEXTR - insert biased exponent */
+          /* float pair destination */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[6] | 2)))
+            return -1;
+          break;
+
+        /* 0xb22e-0xb240 undefined, privileged, or unsupported */
+
+        case 0xb241: /* CKSM - checksum [partial] */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb242-0xb243 undefined */
+
+        case 0xb244: /* SQDR - square root */
+        case 0xb245: /* SQER - square root */
+        case 0xb324: /* LDER - load lengthened */
+        case 0xb337: /* MEER - multiply */
+        case 0xb366: /* LEXR - load rounded */
+        case 0xb370: /* LPDFR - load positive */
+        case 0xb371: /* LNDFR - load negative */
+        case 0xb372: /* CSDFR - copy sign */
+        case 0xb373: /* LCDFR - load complement */
+        case 0xb374: /* LZER - load zero */
+        case 0xb375: /* LZDR - load zero */
+        case 0xb377: /* FIER - load fp integer */
+        case 0xb37f: /* FIDR - load fp integer */
+        case 0xb3b4: /* CEFR - convert from fixed */
+        case 0xb3b5: /* CDFR - convert from fixed */
+        case 0xb3c1: /* LDGR - load fpr from gr */
+        case 0xb3c4: /* CEGR - convert from fixed */
+        case 0xb3c5: /* CDGR - convert from fixed */
+        case 0xb3f6: /* IEDTR - insert biased exponent */
+          /* float destination */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          break;
+
+        /* 0xb246-0xb24c: privileged or unsupported */
+
+        case 0xb24d: /* CPYA - copy access */
+        case 0xb24e: /* SAR - set access */
+          if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + inib[6]))
+            return -1;
+          break;
+
+        /* 0xb250-0xb251 undefined or privileged */
+        /* 0xb253-0xb254 undefined or privileged */
+
+        case 0xb255: /* MVST - move string [partial] */
+          {
+            uint8_t end;
+            gdb_byte cur;
+            ULONGEST num = 0;
+            /* Read ending byte.  */
+            regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+            end = tmp & 0xff;
+            /* Get address of second operand.  */
+            regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[7], &tmp);
+            oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+            /* Search for ending byte and compute length.  */
+            do {
+              num++;
+              if (target_read_memory (oaddr, &cur, 1))
+                return -1;
+              oaddr++;
+            } while (cur != end);
+            /* Get address of first operand and record it.  */
+            regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+            oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+            if (record_full_arch_list_add_mem (oaddr, num))
+              return -1;
+            /* Record the registers.  */
+            if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+              return -1;
+            if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+              return -1;
+            if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+              return -1;
+          }
+          break;
+
+        /* 0xb256 undefined */
+
+        case 0xb257: /* CUSE - compare until substring equal [interruptible] */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb258-0xb25c undefined, privileged, or unsupported */
+
+        case 0xb25d: /* CLST - compare logical string [partial] */
+        case 0xb25e: /* SRST - search string [partial] */
+        case 0xb9be: /* SRSTU - search string unicode [partial] */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb25f-0xb262 undefined */
+
+        case 0xb263: /* CMPSC - compression call [interruptible] */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R1_REGNUM))
+            return -1;
+          /* DXC may be written */
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb264-0xb277 undefined, privileged, or unsupported */
+
+        case 0xb278: /* STCKE - store clock extended */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 16))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb279-0xb27b undefined or unsupported */
+        /* 0xb27d-0xb298 undefined or privileged */
+
+        case 0xb299: /* SRNM - set rounding mode */
+        case 0xb2b8: /* SRNMB - set bfp rounding mode */
+        case 0xb2b9: /* SRNMT - set dfp rounding mode */
+        case 0xb29d: /* LFPC - load fpc */
+        case 0xb2bd: /* LFAS - load fpc and signal */
+        case 0xb384: /* SFPC - set fpc */
+        case 0xb385: /* SFASR - set fpc and signal */
+        case 0xb960: /* CGRT - compare and trap */
+        case 0xb961: /* CLGRT - compare logical and trap */
+        case 0xb972: /* CRT - compare and trap */
+        case 0xb973: /* CLRT - compare logical and trap */
+          /* fpc only - including possible DXC write for trapping insns */
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb29a-0xb29b undefined */
+
+        case 0xb29c: /* STFPC - store fpc */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          break;
+
+        /* 0xb29e-0xb2a4 undefined */
+
+        case 0xb2a5: /* TRE - translate extended [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb2a6: /* CU21 - convert UTF-16 to UTF-8 [partial] */
+        case 0xb2a7: /* CU12 - convert UTF-8 to UTF-16 [partial] */
+        case 0xb9b0: /* CU14 - convert UTF-8 to UTF-32 [partial] */
+        case 0xb9b1: /* CU24 - convert UTF-16 to UTF-32 [partial] */
+        case 0xb9b2: /* CU41 - convert UTF-32 to UTF-8 [partial] */
+        case 0xb9b3: /* CU42 - convert UTF-32 to UTF-16 [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb2a8-0xb2af undefined */
+
+        case 0xb2b0: /* STFLE - store facility list extended */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0xff;
+          if (record_full_arch_list_add_mem (oaddr, 8 * (tmp + 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb2b1-0xb2b7 undefined or privileged */
+        /* 0xb2ba-0xb2bc undefined */
+        /* 0xb2be-0xb2e7 undefined */
+        /* 0xb2e9-0xb2eb undefined */
+        /* 0xb2ed-0xb2f7 undefined */
+        /* 0xb2f8 unsupported: TEND */
+        /* 0xb2f9 undefined */
+
+        case 0xb2e8: /* PPA - perform processor assist */
+        case 0xb2fa: /* NIAI - next instruction access intent */
+          /* no visible effects */
+          break;
+
+        /* 0xb2fb undefined */
+        /* 0xb2fc unsupported: TABORT */
+        /* 0xb2fd-0xb2fe undefined */
+        /* 0xb2ff unsupported: TRAP */
+
+        case 0xb300: /* LPEBR - load positive */
+        case 0xb301: /* LNEBR - load negative */
+        case 0xb303: /* LCEBR - load complement */
+        case 0xb310: /* LPDBR - load positive */
+        case 0xb311: /* LNDBR - load negative */
+        case 0xb313: /* LCDBR - load complement */
+        case 0xb350: /* TBEDR - convert hfp to bfp */
+        case 0xb351: /* TBDR - convert hfp to bfp */
+        case 0xb358: /* THDER - convert bfp to hfp */
+        case 0xb359: /* THDR - convert bfp to hfp */
+          /* float destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb304: /* LDEBR - load lengthened */
+        case 0xb30c: /* MDEBR - multiply */
+        case 0xb30d: /* DEBR - divide */
+        case 0xb314: /* SQEBR - square root */
+        case 0xb315: /* SQDBR - square root */
+        case 0xb317: /* MEEBR - multiply */
+        case 0xb31c: /* MDBR - multiply */
+        case 0xb31d: /* DDBR - divide */
+        case 0xb344: /* LEDBRA - load rounded */
+        case 0xb345: /* LDXBRA - load rounded */
+        case 0xb346: /* LEXBRA - load rounded */
+        case 0xb357: /* FIEBRA - load fp integer */
+        case 0xb35f: /* FIDBRA - load fp integer */
+        case 0xb390: /* CELFBR - convert from logical */
+        case 0xb391: /* CDLFBR - convert from logical */
+        case 0xb394: /* CEFBR - convert from fixed */
+        case 0xb395: /* CDFBR - convert from fixed */
+        case 0xb3a0: /* CELGBR - convert from logical */
+        case 0xb3a1: /* CDLGBR - convert from logical */
+        case 0xb3a4: /* CEGBR - convert from fixed */
+        case 0xb3a5: /* CDGBR - convert from fixed */
+        case 0xb3d0: /* MDTR - multiply */
+        case 0xb3d1: /* DDTR - divide */
+        case 0xb3d4: /* LDETR - load lengthened */
+        case 0xb3d5: /* LEDTR - load lengthened */
+        case 0xb3d7: /* FIDTR - load fp integer */
+        case 0xb3dd: /* LDXTR - load lengthened */
+        case 0xb3f1: /* CDGTR - convert from fixed */
+        case 0xb3f2: /* CDUTR - convert from unsigned packed */
+        case 0xb3f3: /* CDSTR - convert from signed packed */
+        case 0xb3f5: /* QADTR - quantize */
+        case 0xb3f7: /* RRDTR - reround */
+        case 0xb951: /* CDFTR - convert from fixed */
+        case 0xb952: /* CDLGTR - convert from logical */
+        case 0xb953: /* CDLFTR - convert from logical */
+          /* float destination + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xb305: /* LXDBR - load lengthened */
+        case 0xb306: /* LXEBR - load lengthened */
+        case 0xb307: /* MXDBR - multiply */
+        case 0xb316: /* SQXBR - square root */
+        case 0xb34c: /* MXBR - multiply */
+        case 0xb34d: /* DXBR - divide */
+        case 0xb347: /* FIXBRA - load fp integer */
+        case 0xb392: /* CXLFBR - convert from logical */
+        case 0xb396: /* CXFBR - convert from fixed */
+        case 0xb3a2: /* CXLGBR - convert from logical */
+        case 0xb3a6: /* CXGBR - convert from fixed */
+        case 0xb3d8: /* MXTR - multiply */
+        case 0xb3d9: /* DXTR - divide */
+        case 0xb3dc: /* LXDTR - load lengthened */
+        case 0xb3df: /* FIXTR - load fp integer */
+        case 0xb3f9: /* CXGTR - convert from fixed */
+        case 0xb3fa: /* CXUTR - convert from unsigned packed */
+        case 0xb3fb: /* CXSTR - convert from signed packed */
+        case 0xb3fd: /* QAXTR - quantize */
+        case 0xb3ff: /* RRXTR - reround */
+        case 0xb959: /* CXFTR - convert from fixed */
+        case 0xb95a: /* CXLGTR - convert from logical */
+        case 0xb95b: /* CXLFTR - convert from logical */
+          /* float pair destination + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[6] | 2)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xb308: /* KEBR - compare and signal */
+        case 0xb309: /* CEBR - compare */
+        case 0xb318: /* KDBR - compare and signal */
+        case 0xb319: /* CDBR - compare */
+        case 0xb348: /* KXBR - compare and signal */
+        case 0xb349: /* CXBR - compare */
+        case 0xb3e0: /* KDTR - compare and signal */
+        case 0xb3e4: /* CDTR - compare */
+        case 0xb3e8: /* KXTR - compare and signal */
+        case 0xb3ec: /* CXTR - compare */
+          /* flags + fpc only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xb302: /* LTEBR - load and test */
+        case 0xb312: /* LTDBR - load and test */
+        case 0xb30a: /* AEBR - add */
+        case 0xb30b: /* SEBR - subtract */
+        case 0xb31a: /* ADBR - add */
+        case 0xb31b: /* SDBR - subtract */
+        case 0xb3d2: /* ADTR - add */
+        case 0xb3d3: /* SDTR - subtract */
+        case 0xb3d6: /* LTDTR - load and test */
+          /* float destination + flags + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xb30e: /* MAEBR - multiply and add */
+        case 0xb30f: /* MSEBR - multiply and subtract */
+        case 0xb31e: /* MADBR - multiply and add */
+        case 0xb31f: /* MSDBR - multiply and subtract */
+          /* float destination [RRD] + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[4]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb320-0xb323 undefined */
+        /* 0xb327-0xb32d undefined */
+
+        case 0xb32e: /* MAER - multiply and add */
+        case 0xb32f: /* MSER - multiply and subtract */
+        case 0xb338: /* MAYLR - multiply and add unnormalized */
+        case 0xb339: /* MYLR - multiply unnormalized */
+        case 0xb33c: /* MAYHR - multiply and add unnormalized */
+        case 0xb33d: /* MYHR - multiply unnormalized */
+        case 0xb33e: /* MADR - multiply and add */
+        case 0xb33f: /* MSDR - multiply and subtract */
+          /* float destination [RRD] */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[4]))
+            return -1;
+          break;
+
+        /* 0xb330-0xb335 undefined */
+
+        case 0xb33a: /* MAYR - multiply and add unnormalized */
+        case 0xb33b: /* MYR - multiply unnormalized */
+          /* float pair destination [RRD] */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[4]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[4] | 2)))
+            return -1;
+          break;
+
+        case 0xb340: /* LPXBR - load positive */
+        case 0xb341: /* LNXBR - load negative */
+        case 0xb343: /* LCXBR - load complement */
+        case 0xb360: /* LPXR - load positive */
+        case 0xb361: /* LNXR - load negative */
+        case 0xb362: /* LTXR - load and test */
+        case 0xb363: /* LCXR - load complement */
+          /* float pair destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[6] | 2)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb342: /* LTXBR - load and test */
+        case 0xb34a: /* AXBR - add */
+        case 0xb34b: /* SXBR - subtract */
+        case 0xb3da: /* AXTR - add */
+        case 0xb3db: /* SXTR - subtract */
+        case 0xb3de: /* LTXTR - load and test */
+          /* float pair destination + flags + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[6] | 2)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb34e-0xb34f undefined */
+        /* 0xb352 undefined */
+
+        case 0xb353: /* DIEBR - divide to integer */
+        case 0xb35b: /* DIDBR - divide to integer */
+          /* two float destinations + flags + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[4]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb354-0xb356 undefined */
+        /* 0xb35a undefined */
+
+        /* 0xb35c-0xb35e undefined */
+        /* 0xb364 undefined */
+        /* 0xb368 undefined */
+
+        case 0xb369: /* CXR - compare */
+        case 0xb3f4: /* CEDTR - compare biased exponent */
+        case 0xb3fc: /* CEXTR - compare biased exponent */
+        case 0xb920: /* CGR - compare */
+        case 0xb921: /* CLGR - compare logical */
+        case 0xb930: /* CGFR - compare */
+        case 0xb931: /* CLGFR - compare logical */
+        case 0xb9cd: /* CHHR - compare high */
+        case 0xb9cf: /* CLHHR - compare logical high */
+        case 0xb9dd: /* CHLR - compare high */
+        case 0xb9df: /* CLHLR - compare logical high */
+          /* flags only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb36a-0xb36f undefined */
+        /* 0xb377-0xb37e undefined */
+        /* 0xb380-0xb383 undefined */
+        /* 0xb386-0xb38b undefined */
+        /* 0xb38d-0xb38f undefined */
+        /* 0xb393 undefined */
+        /* 0xb397 undefined */
+
+        case 0xb398: /* CFEBR - convert to fixed */
+        case 0xb399: /* CFDBR - convert to fixed */
+        case 0xb39a: /* CFXBR - convert to fixed */
+        case 0xb39c: /* CLFEBR - convert to logical */
+        case 0xb39d: /* CLFDBR - convert to logical */
+        case 0xb39e: /* CLFXBR - convert to logical */
+        case 0xb941: /* CFDTR - convert to fixed */
+        case 0xb949: /* CFXTR - convert to fixed */
+        case 0xb943: /* CLFDTR - convert to logical */
+        case 0xb94b: /* CLFXTR - convert to logical */
+          /* 32-bit gpr destination + flags + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb39b undefined */
+        /* 0xb39f undefined */
+
+        /* 0xb3a3 undefined */
+        /* 0xb3a7 undefined */
+
+        case 0xb3a8: /* CGEBR - convert to fixed */
+        case 0xb3a9: /* CGDBR - convert to fixed */
+        case 0xb3aa: /* CGXBR - convert to fixed */
+        case 0xb3ac: /* CLGEBR - convert to logical */
+        case 0xb3ad: /* CLGDBR - convert to logical */
+        case 0xb3ae: /* CLGXBR - convert to logical */
+        case 0xb3e1: /* CGDTR - convert to fixed */
+        case 0xb3e9: /* CGXTR - convert to fixed */
+        case 0xb942: /* CLGDTR - convert to logical */
+        case 0xb94a: /* CLGXTR - convert to logical */
+          /* 64-bit gpr destination + flags + fpc */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb3ab undefined */
+        /* 0xb3af-0xb3b3 undefined */
+        /* 0xb3b7 undefined */
+
+        case 0xb3b8: /* CFER - convert to fixed */
+        case 0xb3b9: /* CFDR - convert to fixed */
+        case 0xb3ba: /* CFXR - convert to fixed */
+        case 0xb998: /* ALCR - add logical with carry */
+        case 0xb999: /* SLBR - subtract logical with borrow */
+        case 0xb9f4: /* NRK - and */
+        case 0xb9f6: /* ORK - or */
+        case 0xb9f7: /* XRK - xor */
+        case 0xb9f8: /* ARK - add */
+        case 0xb9f9: /* SRK - subtract */
+        case 0xb9fa: /* ALRK - add logical */
+        case 0xb9fb: /* SLRK - subtract logical */
+          /* 32-bit gpr destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb3c8: /* CGER - convert to fixed */
+        case 0xb3c9: /* CGDR - convert to fixed */
+        case 0xb3ca: /* CGXR - convert to fixed */
+        case 0xb900: /* LPGR - load positive */
+        case 0xb901: /* LNGR - load negative */
+        case 0xb902: /* LTGR - load and test */
+        case 0xb903: /* LCGR - load complement */
+        case 0xb908: /* AGR - add */
+        case 0xb909: /* SGR - subtract */
+        case 0xb90a: /* ALGR - add logical */
+        case 0xb90b: /* SLGR - subtract logical */
+        case 0xb910: /* LPGFR - load positive */
+        case 0xb911: /* LNGFR - load negative */
+        case 0xb912: /* LTGFR - load and test */
+        case 0xb913: /* LCGFR - load complement */
+        case 0xb918: /* AGFR - add */
+        case 0xb919: /* SGFR - subtract */
+        case 0xb91a: /* ALGFR - add logical */
+        case 0xb91b: /* SLGFR - subtract logical */
+        case 0xb980: /* NGR - and */
+        case 0xb981: /* OGR - or */
+        case 0xb982: /* XGR - xor */
+        case 0xb988: /* ALCGR - add logical with carry */
+        case 0xb989: /* SLBGR - subtract logical with borrow */
+        case 0xb9e1: /* POPCNT - population count */
+        case 0xb9e4: /* NGRK - and */
+        case 0xb9e6: /* OGRK - or */
+        case 0xb9e7: /* XGRK - xor */
+        case 0xb9e8: /* AGRK - add */
+        case 0xb9e9: /* SGRK - subtract */
+        case 0xb9ea: /* ALGRK - add logical */
+        case 0xb9eb: /* SLGRK - subtract logical */
+          /* 64-bit gpr destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb3bb-0xb3c0 undefined */
+        /* 0xb3c2-0xb3c3 undefined */
+        /* 0xb3c7 undefined */
+        /* 0xb3cb-0xb3cc undefined */
+
+        case 0xb3cd: /* LGDR - load gr from fpr */
+        case 0xb3e2: /* CUDTR - convert to unsigned packed */
+        case 0xb3e3: /* CSDTR - convert to signed packed */
+        case 0xb3e5: /* EEDTR - extract biased exponent */
+        case 0xb3e7: /* ESDTR - extract significance */
+        case 0xb3ed: /* EEXTR - extract biased exponent */
+        case 0xb3ef: /* ESXTR - extract significance */
+        case 0xb904: /* LGR - load */
+        case 0xb906: /* LGBR - load byte */
+        case 0xb907: /* LGHR - load halfword */
+        case 0xb90c: /* MSGR - multiply single */
+        case 0xb90f: /* LRVGR - load reversed */
+        case 0xb914: /* LGFR - load */
+        case 0xb916: /* LLGFR - load logical */
+        case 0xb917: /* LLGTR - load logical thirty one bits */
+        case 0xb91c: /* MSGFR - load */
+        case 0xb946: /* BCTGR - branch on count */
+        case 0xb984: /* LLGCR - load logical character */
+        case 0xb985: /* LLGHR - load logical halfword */
+        case 0xb9e2: /* LOCGR - load on condition */
+          /* 64-bit gpr destination  */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
+            return -1;
+          break;
+
+        /* 0xb3ce-0xb3cf undefined */
+        /* 0xb3e6 undefined */
+
+        case 0xb3ea: /* CUXTR - convert to unsigned packed */
+        case 0xb3eb: /* CSXTR - convert to signed packed */
+        case 0xb90d: /* DSGR - divide single */
+        case 0xb91d: /* DSGFR - divide single */
+        case 0xb986: /* MLGR - multiply logical */
+        case 0xb987: /* DLGR - divide logical */
+          /* 64-bit gpr pair destination  */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6] | 1))
+            return -1;
+          break;
+
+        /* 0xb3ee undefined */
+        /* 0xb3f0 undefined */
+        /* 0xb3f8 undefined */
+
+        /* 0xb905 privileged */
+
+        /* 0xb90e unsupported: EREGG */
+
+        /* 0xb915 undefined */
+
+        case 0xb91e: /* KMAC - compute message authentication code [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0xff;
+          switch (tmp)
+            {
+              case 0x00: /* KMAC-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* KMAC-DEA */
+              case 0x02: /* KMAC-TDEA-128 */
+              case 0x03: /* KMAC-TDEA-192 */
+              case 0x09: /* KMAC-Encrypted-DEA */
+              case 0x0a: /* KMAC-Encrypted-TDEA-128 */
+              case 0x0b: /* KMAC-Encrypted-TDEA-192 */
+                if (record_full_arch_list_add_mem (oaddr, 8))
+                  return -1;
+                break;
+
+              case 0x12: /* KMAC-AES-128 */
+              case 0x13: /* KMAC-AES-192 */
+              case 0x14: /* KMAC-AES-256 */
+              case 0x1a: /* KMAC-Encrypted-AES-128 */
+              case 0x1b: /* KMAC-Encrypted-AES-192 */
+              case 0x1c: /* KMAC-Encrypted-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (tmp != 0)
+            {
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb922-0xb924 undefined */
+        /* 0xb925 privileged */
+        /* 0xb928 privileged */
+        /* 0xb929 undefined */
+
+        case 0xb92a: /* KMF - cipher message with cipher feedback [partial] */
+        case 0xb92b: /* KMO - cipher message with output feedback [partial] */
+        case 0xb92f: /* KMC - cipher message with chaining [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0x7f;
+          switch (tmp)
+            {
+              case 0x00: /* KM*-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* KM*-DEA */
+              case 0x02: /* KM*-TDEA-128 */
+              case 0x03: /* KM*-TDEA-192 */
+              case 0x09: /* KM*-Encrypted-DEA */
+              case 0x0a: /* KM*-Encrypted-TDEA-128 */
+              case 0x0b: /* KM*-Encrypted-TDEA-192 */
+                if (record_full_arch_list_add_mem (oaddr, 8))
+                  return -1;
+                break;
+
+              case 0x12: /* KM*-AES-128 */
+              case 0x13: /* KM*-AES-192 */
+              case 0x14: /* KM*-AES-256 */
+              case 0x1a: /* KM*-Encrypted-AES-128 */
+              case 0x1b: /* KM*-Encrypted-AES-192 */
+              case 0x1c: /* KM*-Encrypted-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x43: /* KMC-PRNG */
+                /* Only valid for KMC.  */
+                if (insn[0] == 0xb92f)
+                  {
+                    if (record_full_arch_list_add_mem (oaddr, 8))
+                      return -1;
+                    break;
+                  }
+                /* For other instructions, fallthru.  */
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KM* function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (tmp != 0)
+            {
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+              oaddr2 = s390_record_address_mask (gdbarch, regcache, tmp);
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[7] | 1), &tmp);
+              if (record_full_arch_list_add_mem (oaddr2, tmp))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb92c: /* PCC - perform cryptographic computation [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0x7f;
+          switch (tmp)
+            {
+              case 0x00: /* PCC-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* PCC-Compute-Last-Block-CMAC-Using-DEA */
+              case 0x02: /* PCC-Compute-Last-Block-CMAC-Using-TDEA-128 */
+              case 0x03: /* PCC-Compute-Last-Block-CMAC-Using-TDEA-192 */
+              case 0x09: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-DEA */
+              case 0x0a: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-TDEA-128 */
+              case 0x0b: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-TDEA-192 */
+                if (record_full_arch_list_add_mem (oaddr + 0x10, 8))
+                  return -1;
+                break;
+
+              case 0x12: /* PCC-Compute-Last-Block-CMAC-Using-AES-128 */
+              case 0x13: /* PCC-Compute-Last-Block-CMAC-Using-AES-192 */
+              case 0x14: /* PCC-Compute-Last-Block-CMAC-Using-AES-256 */
+              case 0x1a: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-AES-128 */
+              case 0x1b: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-AES-192 */
+              case 0x1c: /* PCC-Compute-Last-Block-CMAC-Using-Encrypted-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr + 0x18, 16))
+                  return -1;
+                break;
+
+              case 0x32: /* PCC-Compute-XTS-Parameter-Using-AES-128 */
+                if (record_full_arch_list_add_mem (oaddr + 0x30, 32))
+                  return -1;
+                break;
+
+              case 0x34: /* PCC-Compute-XTS-Parameter-Using-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr + 0x40, 32))
+                  return -1;
+                break;
+
+              case 0x3a: /* PCC-Compute-XTS-Parameter-Using-Encrypted-AES-128 */
+                if (record_full_arch_list_add_mem (oaddr + 0x50, 32))
+                  return -1;
+                break;
+
+              case 0x3c: /* PCC-Compute-XTS-Parameter-Using-Encrypted-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr + 0x60, 32))
+                  return -1;
+                break;
+
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PCC function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb92d: /* KMCTR - cipher message with counter [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0x7f;
+          switch (tmp)
+            {
+              case 0x00: /* KMCTR-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* KMCTR-DEA */
+              case 0x02: /* KMCTR-TDEA-128 */
+              case 0x03: /* KMCTR-TDEA-192 */
+              case 0x09: /* KMCTR-Encrypted-DEA */
+              case 0x0a: /* KMCTR-Encrypted-TDEA-128 */
+              case 0x0b: /* KMCTR-Encrypted-TDEA-192 */
+              case 0x12: /* KMCTR-AES-128 */
+              case 0x13: /* KMCTR-AES-192 */
+              case 0x14: /* KMCTR-AES-256 */
+              case 0x1a: /* KMCTR-Encrypted-AES-128 */
+              case 0x1b: /* KMCTR-Encrypted-AES-192 */
+              case 0x1c: /* KMCTR-Encrypted-AES-256 */
+                break;
+
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMCTR function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (tmp != 0)
+            {
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+              oaddr2 = s390_record_address_mask (gdbarch, regcache, tmp);
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[7] | 1), &tmp);
+              if (record_full_arch_list_add_mem (oaddr2, tmp))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[4]))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb92e: /* KM - cipher message [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0x7f;
+          switch (tmp)
+            {
+              case 0x00: /* KM-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* KM-DEA */
+              case 0x02: /* KM-TDEA-128 */
+              case 0x03: /* KM-TDEA-192 */
+              case 0x09: /* KM-Encrypted-DEA */
+              case 0x0a: /* KM-Encrypted-TDEA-128 */
+              case 0x0b: /* KM-Encrypted-TDEA-192 */
+              case 0x12: /* KM-AES-128 */
+              case 0x13: /* KM-AES-192 */
+              case 0x14: /* KM-AES-256 */
+              case 0x1a: /* KM-Encrypted-AES-128 */
+              case 0x1b: /* KM-Encrypted-AES-192 */
+              case 0x1c: /* KM-Encrypted-AES-256 */
+                break;
+
+              case 0x32: /* KM-XTS-AES-128 */
+                if (record_full_arch_list_add_mem (oaddr + 0x10, 16))
+                  return -1;
+                break;
+
+              case 0x34: /* KM-XTS-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr + 0x20, 16))
+                  return -1;
+                break;
+
+              case 0x3a: /* KM-XTS-Encrypted-AES-128 */
+                if (record_full_arch_list_add_mem (oaddr + 0x30, 16))
+                  return -1;
+                break;
+
+              case 0x3c: /* KM-XTS-Encrypted-AES-256 */
+                if (record_full_arch_list_add_mem (oaddr + 0x40, 16))
+                  return -1;
+                break;
+
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KM function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (tmp != 0)
+            {
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+              oaddr2 = s390_record_address_mask (gdbarch, regcache, tmp);
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[7] | 1), &tmp);
+              if (record_full_arch_list_add_mem (oaddr2, tmp))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb932-0xb93b undefined */
+
+        case 0xb93c: /* PPNO - perform pseudorandom number operation [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0xff;
+          switch (tmp)
+            {
+              case 0x00: /* PPNO-Query */
+              case 0x80: /* PPNO-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x03: /* PPNO-SHA-512-DRNG - generate */
+                if (record_full_arch_list_add_mem (oaddr, 240))
+                  return -1;
+                regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+                oaddr2 = s390_record_address_mask (gdbarch, regcache, tmp);
+                regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
+                if (record_full_arch_list_add_mem (oaddr2, tmp))
+                  return -1;
+                if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+                  return -1;
+                if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+                  return -1;
+                break;
+
+              case 0x83: /* PPNO-SHA-512-DRNG - seed */
+                if (record_full_arch_list_add_mem (oaddr, 240))
+                  return -1;
+                if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                  return -1;
+                if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                  return -1;
+                break;
+
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PPNO function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          /* DXC may be written */
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb93d undefined */
+
+        case 0xb93e: /* KIMD - compute intermediate message digest [partial] */
+        case 0xb93f: /* KLMD - compute last message digest [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+          tmp &= 0xff;
+          switch (tmp)
+            {
+              case 0x00: /* K*MD-Query */
+                if (record_full_arch_list_add_mem (oaddr, 16))
+                  return -1;
+                break;
+
+              case 0x01: /* K*MD-SHA-1 */
+                if (record_full_arch_list_add_mem (oaddr, 20))
+                  return -1;
+                break;
+
+              case 0x02: /* K*MD-SHA-256 */
+                if (record_full_arch_list_add_mem (oaddr, 32))
+                  return -1;
+                break;
+
+              case 0x03: /* K*MD-SHA-512 */
+                if (record_full_arch_list_add_mem (oaddr, 64))
+                  return -1;
+                break;
+
+              case 0x41: /* KIMD-GHASH */
+                /* Only valid for KIMD.  */
+                if (insn[0] == 0xb93e)
+                  {
+                    if (record_full_arch_list_add_mem (oaddr, 16))
+                      return -1;
+                    break;
+                  }
+                /* For KLMD, fallthru.  */
+              default:
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown KMAC function %02x at %s.\n",
+                                    (int)tmp, paddress (gdbarch, addr));
+                return -1;
+            }
+          if (tmp != 0)
+            {
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+                return -1;
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[7] | 1)))
+                return -1;
+            }
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb940 undefined */
+        /* 0xb944-0xb945 undefined */
+        /* 0xb947-0xb948 undefined */
+        /* 0xb94c-0xb950 undefined */
+        /* 0xb954-0xb958 undefined */
+        /* 0xb95c-0xb95f undefined */
+        /* 0xb962-0xb971 undefined */
+        /* 0xb974-0xb97f undefined */
+
+        case 0xb983: /* FLOGR - find leftmost one */
+          /* 64-bit gpr pair destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[6] | 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb98a privileged */
+        /* 0xb98b-0xb98c undefined */
+
+        case 0xb98d: /* EPSW - extract psw */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (inib[7])
+            if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+              return -1;
+          break;
+
+        /* 0xb98e-0xb98f privileged */
+
+        case 0xb990: /* TRTT - translate two to two [partial] */
+        case 0xb991: /* TRTO - translate two to one [partial] */
+        case 0xb992: /* TROT - translate one to two [partial] */
+        case 0xb993: /* TROO - translate one to one [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
+          /* tmp is source length, we want destination length.  Adjust.  */
+          if (insn[0] == 0xb991)
+            tmp >>= 1;
+          if (insn[0] == 0xb992)
+            tmp <<= 1;
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xb996: /* MLR - multiply logical */
+        case 0xb997: /* DLR - divide logical */
+          /* 32-bit gpr pair destination  */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          break;
+
+        /* 0xb99a-0xb9af unsupported, privileged, or undefined */
+        /* 0xb9b4-0xb9bc undefined */
+
+        case 0xb9bd: /* TRTRE - translate and test reverse extended [partial] */
+        case 0xb9bf: /* TRTE - translate and test extended [partial] */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[6] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[7]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb9c0-0xb9c7 undefined */
+
+        case 0xb9c8: /* AHHHR - add high */
+        case 0xb9c9: /* SHHHR - subtract high */
+        case 0xb9ca: /* ALHHHR - add logical high */
+        case 0xb9cb: /* SLHHHR - subtract logical high */
+        case 0xb9d8: /* AHHLR - add high */
+        case 0xb9d9: /* SHHLR - subtract high */
+        case 0xb9da: /* ALHHLR - add logical high */
+        case 0xb9db: /* SLHHLR - subtract logical high */
+          /* 32-bit high gpr destination + flags */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[6]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xb9cc undefined */
+        /* 0xb9ce undefined */
+        /* 0xb9d0-0xb9d7 undefined */
+        /* 0xb9dc undefined */
+        /* 0xb9de undefined */
+
+        case 0xb9e0: /* LOCFHR - load high on condition */
+          /* 32-bit high gpr destination */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[6]))
+            return -1;
+          break;
+
+        /* 0xb9e3 undefined */
+        /* 0xb9e5 undefined */
+        /* 0xb9ec-0xb9f1 undefined */
+        /* 0xb9f3 undefined */
+        /* 0xb9f5 undefined */
+        /* 0xb9fc-0xb9ff undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xb4-0xb5 undefined */
+    /* 0xb6 privileged: STCTL - store control */
+    /* 0xb7 privileged: LCTL - load control */
+    /* 0xb8 undefined */
+
+    case 0xba: /* CS - compare and swap */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 4))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0xbb: /* CDS - compare double and swap */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 8))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    /* 0xbc undefined */
+
+    case 0xbe: /* STCM - store characters under mask */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, s390_popcnt (inib[3])))
+        return -1;
+      break;
+
+    case 0xc0:
+    case 0xc2:
+    case 0xc4:
+    case 0xc6:
+    case 0xcc:
+      /* RIL-format instruction */
+      switch (ibyte[0] << 4 | inib[3])
+        {
+        case 0xc00: /* LARL - load address relative long */
+        case 0xc05: /* BRASL - branch relative and save long */
+        case 0xc09: /* IILF - insert immediate */
+        case 0xc21: /* MSFI - multiply single immediate */
+        case 0xc42: /* LLHRL - load logical halfword relative long */
+        case 0xc45: /* LHRL - load halfword relative long */
+        case 0xc4d: /* LRL - load relative long */
+          /* 32-bit or native gpr destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        case 0xc01: /* LGFI - load immediate */
+        case 0xc0e: /* LLIHF - load logical immediate */
+        case 0xc0f: /* LLILF - load logical immediate */
+        case 0xc20: /* MSGFI - multiply single immediate */
+        case 0xc44: /* LGHRL - load halfword relative long */
+        case 0xc46: /* LLGHRL - load logical halfword relative long */
+        case 0xc48: /* LGRL - load relative long */
+        case 0xc4c: /* LGFRL - load relative long */
+        case 0xc4e: /* LLGFRL - load logical relative long */
+          /* 64-bit gpr destination */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xc02-0xc03 undefined */
+
+        case 0xc04: /* BRCL - branch relative on condition long */
+        case 0xc62: /* PFDRL - prefetch data relative long */
+          break;
+
+        case 0xc06: /* XIHF - xor immediate */
+        case 0xc0a: /* NIHF - and immediate */
+        case 0xc0c: /* OIHF - or immediate */
+        case 0xcc8: /* AIH - add immediate high */
+        case 0xcca: /* ALSIH - add logical with signed immediate high */
+          /* 32-bit high gpr destination + flags */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xc07: /* XILF - xor immediate */
+        case 0xc0b: /* NILF - and immediate */
+        case 0xc0d: /* OILF - or immediate */
+        case 0xc25: /* SLFI - subtract logical immediate */
+        case 0xc29: /* AFI - add immediate */
+        case 0xc2b: /* ALFI - add logical immediate */
+          /* 32-bit gpr destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xc08: /* IIHF - insert immediate */
+        case 0xcc6: /* BRCTH - branch relative on count high */
+        case 0xccb: /* ALSIHN - add logical with signed immediate high */
+          /* 32-bit high gpr destination */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xc22-0xc23 undefined */
+
+        case 0xc24: /* SLGFI - subtract logical immediate */
+        case 0xc28: /* AGFI - add immediate */
+        case 0xc2a: /* ALGFI - add logical immediate */
+          /* 64-bit gpr destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xc26-0xc27 undefined */
+
+        case 0xc2c: /* CGFI - compare immediate */
+        case 0xc2d: /* CFI - compare immediate */
+        case 0xc2e: /* CLGFI - compare logical immediate */
+        case 0xc2f: /* CLFI - compare logical immediate */
+        case 0xc64: /* CGHRL - compare halfword relative long */
+        case 0xc65: /* CHRL - compare halfword relative long */
+        case 0xc66: /* CLGHRL - compare logical halfword relative long */
+        case 0xc67: /* CLHRL - compare logical halfword relative long */
+        case 0xc68: /* CGRL - compare relative long */
+        case 0xc6a: /* CLGRL - compare logical relative long */
+        case 0xc6c: /* CGFRL - compare relative long */
+        case 0xc6d: /* CRL - compare relative long */
+        case 0xc6e: /* CLGFRL - compare logical relative long */
+        case 0xc6f: /* CLRL - compare logical relative long */
+        case 0xccd: /* CIH - compare immediate high */
+        case 0xccf: /* CLIH - compare logical immediate high */
+          /* flags only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xc40-0xc41 undefined */
+        /* 0xc43 undefined */
+
+        case 0xc47: /* STHRL - store halfword relative long */
+          oaddr = s390_record_calc_rl (gdbarch, regcache, addr, insn[1], insn[2]);
+          if (record_full_arch_list_add_mem (oaddr, 2))
+            return -1;
+          break;
+
+        /* 0xc49-0xc4a undefined */
+
+        case 0xc4b: /* STGRL - store relative long */
+          oaddr = s390_record_calc_rl (gdbarch, regcache, addr, insn[1], insn[2]);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          break;
+
+        case 0xc4f: /* STRL - store relative long */
+          oaddr = s390_record_calc_rl (gdbarch, regcache, addr, insn[1], insn[2]);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          break;
+
+        case 0xc60: /* EXRL - execute relative long */
+          if (ex != -1)
+            {
+              fprintf_unfiltered (gdb_stdlog, "Warning: Double execute at %s.\n",
+                                  paddress (gdbarch, addr));
+              return -1;
+            }
+          addr = s390_record_calc_rl (gdbarch, regcache, addr, insn[1], insn[2]);
+          if (inib[2])
+            {
+              regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[2], &tmp);
+              ex = tmp & 0xff;
+            }
+          else
+            {
+              ex = 0;
+            }
+          goto ex;
+
+        /* 0xc61 undefined */
+        /* 0xc63 undefined */
+        /* 0xc69 undefined */
+        /* 0xc6b undefined */
+        /* 0xcc0-0xcc5 undefined */
+        /* 0xcc7 undefined */
+        /* 0xcc9 undefined */
+        /* 0xccc undefined */
+        /* 0xcce undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xc1 undefined */
+    /* 0xc3 undefined */
+
+    case 0xc5: /* BPRP - branch prediction relative preload */
+    case 0xc7: /* BPP - branch prediction preload */
+      /* no visible effect */
+      break;
+
+    case 0xc8:
+      /* SSF-format instruction */
+      switch (ibyte[0] << 4 | inib[3])
+        {
+        /* 0xc80 unsupported */
+
+        case 0xc81: /* ECTG - extract cpu time */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, 0))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, 1))
+            return -1;
+          break;
+
+        case 0xc82: /* CSST - compare and swap and store */
+          {
+            uint8_t fc, sc;
+            regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+            fc = tmp & 0xff;
+            sc = tmp >> 8 & 0xff;
+
+            /* First and third operands.  */
+            oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+            switch (fc)
+              {
+                case 0x00: /* 32-bit */
+                  if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+                    return -1;
+                  if (record_full_arch_list_add_mem (oaddr, 4))
+                    return -1;
+                  break;
+
+                case 0x01: /* 64-bit */
+                  if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+                    return -1;
+                  if (record_full_arch_list_add_mem (oaddr, 8))
+                    return -1;
+                  break;
+
+                case 0x02: /* 128-bit */
+                  if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+                    return -1;
+                  if (s390_record_gpr_g (gdbarch, regcache, inib[2] | 1))
+                    return -1;
+                  if (record_full_arch_list_add_mem (oaddr, 16))
+                    return -1;
+                  break;
+
+                default:
+                  fprintf_unfiltered (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n",
+                                      fc, paddress (gdbarch, addr));
+                  return -1;
+              }
+
+            /* Second operand.  */
+            oaddr2 = s390_record_calc_disp (gdbarch, regcache, 0, insn[2], 0);
+            if (sc > 4)
+              {
+                fprintf_unfiltered (gdb_stdlog, "Warning: Unknown CSST FC %02x at %s.\n",
+                                    sc, paddress (gdbarch, addr));
+                return -1;
+              }
+
+            if (record_full_arch_list_add_mem (oaddr2, 1 << sc))
+              return -1;
+
+            /* Flags.  */
+            if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+              return -1;
+          }
+          break;
+
+        /* 0xc83 undefined */
+
+        case 0xc84: /* LPD - load pair disjoint */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xc85: /* LPDG - load pair disjoint */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2] | 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xc86-0xc8f undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xc9-0xcb undefined */
+    /* 0xcd-0xcf undefined */
+
+    case 0xd0: /* TRTR - translate and test reversed */
+    case 0xdd: /* TRT - translate and test */
+      if (record_full_arch_list_add_reg (regcache, S390_R1_REGNUM))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R2_REGNUM))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0xd1: /* MVN - move numbers */
+    case 0xd2: /* MVC - move */
+    case 0xd3: /* MVZ - move zones */
+    case 0xdc: /* TR - translate */
+    case 0xe8: /* MVCIN - move inverse */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, ibyte[1] + 1))
+        return -1;
+      break;
+
+    case 0xd4: /* NC - and */
+    case 0xd6: /* OC - or*/
+    case 0xd7: /* XC - xor */
+    case 0xe2: /* UNPKU - unpack unicode */
+    case 0xea: /* UNPKA - unpack ASCII */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, ibyte[1] + 1))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0xde: /* ED - edit */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, ibyte[1] + 1))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      /* DXC may be written */
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    case 0xdf: /* EDMK - edit and mark */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, ibyte[1] + 1))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_R1_REGNUM))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      /* DXC may be written */
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    /* 0xd8 undefined */
+    /* 0xd9 unsupported: MVCK - move with key */
+    /* 0xda unsupported: MVCP - move to primary */
+    /* 0xdb unsupported: MVCS - move to secondary */
+    /* 0xe0 undefined */
+
+    case 0xe1: /* PKU - pack unicode */
+    case 0xe9: /* PKA - pack ASCII */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, 16))
+        return -1;
+      break;
+
+    case 0xe3:
+    case 0xe7:
+    case 0xeb:
+    case 0xed:
+      /* RXY/RXE/RXF/RSL/RSY/SIY/V*-format instruction */
+      switch (ibyte[0] << 8 | ibyte[5])
+        {
+        /* 0xe300-0xe301 undefined */
+
+        case 0xe302: /* LTG - load and test */
+        case 0xe308: /* AG - add */
+        case 0xe309: /* SG - subtract */
+        case 0xe30a: /* ALG - add logical */
+        case 0xe30b: /* SLG - subtract logical */
+        case 0xe318: /* AGF - add */
+        case 0xe319: /* SGF - subtract */
+        case 0xe31a: /* ALGF - add logical */
+        case 0xe31b: /* SLGF - subtract logical */
+        case 0xe332: /* LTGF - load and test */
+        case 0xe380: /* NG - and */
+        case 0xe381: /* OG - or */
+        case 0xe382: /* XG - xor */
+        case 0xe388: /* ALCG - add logical with carry */
+        case 0xe389: /* SLBG - subtract logical with borrow */
+        case 0xeb0a: /* SRAG - shift right single */
+        case 0xeb0b: /* SLAG - shift left single */
+          /* 64-bit gpr destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe303 privileged */
+
+        case 0xe304: /* LG - load */
+        case 0xe30c: /* MSG - multiply single */
+        case 0xe30f: /* LRVG - load reversed */
+        case 0xe314: /* LGF - load */
+        case 0xe315: /* LGH - load halfword */
+        case 0xe316: /* LLGF - load logical */
+        case 0xe317: /* LLGT - load logical thirty one bits */
+        case 0xe31c: /* MSGF - multiply single */
+        case 0xe32a: /* LZRG - load and zero rightmost byte */
+        case 0xe33a: /* LLZRGF - load logical and zero rightmost byte */
+        case 0xe346: /* BCTG - branch on count */
+        case 0xe377: /* LGB - load byte */
+        case 0xe390: /* LLGC - load logical character */
+        case 0xe391: /* LLGH - load logical halfword */
+        case 0xeb0c: /* SRLG - shift right single logical */
+        case 0xeb0d: /* SLLG - shift left single logical */
+        case 0xeb1c: /* RLLG - rotate left single logical */
+        case 0xeb44: /* BXHG - branch on index high */
+        case 0xeb45: /* BXLEG - branch on index low or equal */
+        case 0xeb4c: /* ECAG - extract cpu attribute */
+        case 0xebe2: /* LOCG - load on condition */
+          /* 64-bit gpr destination */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xe305 undefined */
+
+        case 0xe306: /* CVBY - convert to binary */
+          /* 32-bit or native gpr destination + FPC (DXC write) */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe307 undefined */
+
+        case 0xe30d: /* DSG - divide single */
+        case 0xe31d: /* DSGF - divide single */
+        case 0xe386: /* MLG - multiply logical */
+        case 0xe387: /* DLG - divide logical */
+        case 0xe38f: /* LPQ - load pair from quadword */
+          /* 64-bit gpr pair destination  */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2] | 1))
+            return -1;
+          break;
+
+        case 0xe30e: /* CVBG - convert to binary */
+          /* 64-bit gpr destination + FPC (DXC write) */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe310-0xe311 undefined */
+
+        case 0xe312: /* LT - load and test */
+        case 0xe354: /* NY - and */
+        case 0xe356: /* OY - or */
+        case 0xe357: /* XY - xor */
+        case 0xe35a: /* AY - add */
+        case 0xe35b: /* SY - subtract */
+        case 0xe35e: /* ALY - add logical */
+        case 0xe35f: /* SLY - subtract logical */
+        case 0xe37a: /* AHY - add halfword */
+        case 0xe37b: /* SHY - subtract halfword */
+        case 0xe398: /* ALC - add logical with carry */
+        case 0xe399: /* SLB - subtract logical with borrow */
+        case 0xe727: /* LCBB - load count to block bounduary */
+        case 0xeb81: /* ICMY - insert characters under mask */
+        case 0xebdc: /* SRAK - shift left single */
+        case 0xebdd: /* SLAK - shift left single */
+          /* 32-bit gpr destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe313 privileged */
+
+        case 0xe31e: /* LRV - load reversed */
+        case 0xe31f: /* LRVH - load reversed */
+        case 0xe33b: /* LZRF - load and zero rightmost byte */
+        case 0xe351: /* MSY - multiply single */
+        case 0xe358: /* LY - load */
+        case 0xe371: /* LAY - load address */
+        case 0xe373: /* ICY - insert character */
+        case 0xe376: /* LB - load byte */
+        case 0xe378: /* LHY - load */
+        case 0xe37c: /* MHY - multiply halfword */
+        case 0xe394: /* LLC - load logical character */
+        case 0xe395: /* LLH - load logical halfword */
+        case 0xeb1d: /* RLL - rotate left single logical */
+        case 0xebde: /* SRLK - shift left single logical */
+        case 0xebdf: /* SLLK - shift left single logical */
+        case 0xebf2: /* LOC - load on condition */
+          /* 32-bit or native gpr destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        case 0xe320: /* CG - compare */
+        case 0xe321: /* CLG - compare logical */
+        case 0xe330: /* CGF - compare */
+        case 0xe331: /* CLGF - compare logical */
+        case 0xe334: /* CGH - compare halfword */
+        case 0xe355: /* CLY - compare logical */
+        case 0xe359: /* CY - compare */
+        case 0xe379: /* CHY - compare halfword */
+        case 0xe3cd: /* CHF - compare high */
+        case 0xe3cf: /* CLHF - compare logical high */
+        case 0xeb20: /* CLMH - compare logical under mask high */
+        case 0xeb21: /* CLMY - compare logical under mask */
+        case 0xeb51: /* TMY - test under mask */
+        case 0xeb55: /* CLIY - compare logical */
+        case 0xebc0: /* TP - test decimal */
+        case 0xed10: /* TCEB - test data class */
+        case 0xed11: /* TCDB - test data class */
+        case 0xed12: /* TCXB - test data class */
+        case 0xed50: /* TDCET - test data class */
+        case 0xed51: /* TDGET - test data group */
+        case 0xed54: /* TDCDT - test data class */
+        case 0xed55: /* TDGDT - test data group */
+        case 0xed58: /* TDCXT - test data class */
+        case 0xed59: /* TDGXT - test data group */
+          /* flags only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe322-0xe323 undefined */
+
+        case 0xe324: /* STG - store */
+        case 0xe325: /* NTSTG - nontransactional store */
+        case 0xe326: /* CVDY - convert to decimal */
+        case 0xe32f: /* STRVG - store reversed */
+        case 0xebe3: /* STOCG - store on condition */
+        case 0xed67: /* STDY - store */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          break;
+
+        /* 0xe327-0xe329 undefined */
+        /* 0xe32b-0xe32d undefined */
+
+        case 0xe32e: /* CVDG - convert to decimal */
+        case 0xe38e: /* STPQ - store pair to quadword */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 16))
+            return -1;
+          break;
+
+        /* 0xe333 undefined */
+        /* 0xe335 undefined */
+
+        case 0xe336: /* PFD - prefetch data */
+          break;
+
+        /* 0xe337-0xe339 undefined */
+        /* 0xe33c-0xe33d undefined */
+
+        case 0xe33e: /* STRV - store reversed */
+        case 0xe350: /* STY - store */
+        case 0xe3cb: /* STFH - store high */
+        case 0xebe1: /* STOCFH - store high on condition */
+        case 0xebf3: /* STOC - store on condition */
+        case 0xed66: /* STEY - store */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          break;
+
+        case 0xe33f: /* STRVH - store reversed */
+        case 0xe370: /* STHY - store halfword */
+        case 0xe3c7: /* STHH - store halfword high */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 2))
+            return -1;
+          break;
+
+        /* 0xe340-0xe345 undefined */
+        /* 0xe347-0xe34f undefined */
+        /* 0xe352-0xe353 undefined */
+
+        case 0xe35c: /* MFY - multiply */
+        case 0xe396: /* ML - multiply logical */
+        case 0xe397: /* DL - divide logical */
+          /* 32-bit gpr pair destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+            return -1;
+          break;
+
+        /* 0xe35d undefined */
+        /* 0xe360-0xe36f undefined */
+
+        case 0xe372: /* STCY - store character */
+        case 0xe3c3: /* STCH - store character high */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 1))
+            return -1;
+          break;
+
+        /* 0xe374 undefined */
+
+        case 0xe375: /* LAEY - load address extended */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        /* 0xe37d-0xe37f undefined */
+        /* 0xe383-0xe384 undefined */
+
+        case 0xe385: /* LGAT - load and trap */
+        case 0xe39c: /* LLGTAT - load logical thirty one bits and trap */
+        case 0xe39d: /* LLGFAT - load logical and trap */
+        case 0xe721: /* VLGV - vector load gr from vr element */
+          /* 64-bit gpr destination + fpc for possible DXC write */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe38a-0xe38d undefined */
+        /* 0xe392-0xe393 undefined */
+        /* 0xe39a-0xe39b undefined */
+        /* 0xe39e undefined */
+
+        case 0xe39f: /* LAT - load and trap */
+          /* 32-bit gpr destination + fpc for possible DXC write */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe3a0-0xe3bf undefined */
+
+        case 0xe3c0: /* LBH - load byte high */
+        case 0xe3c2: /* LLCH - load logical character high */
+        case 0xe3c4: /* LHH - load halfword high */
+        case 0xe3c6: /* LLHH - load logical halfword high */
+        case 0xe3ca: /* LFH - load high */
+        case 0xebe0: /* LOCFH - load high on condition */
+          /* 32-bit high gpr destination */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xe3c1 undefined */
+        /* 0xe3c5 undefined */
+
+        case 0xe3c8: /* LFHAT - load high and trap */
+          /* 32-bit high gpr destination + fpc for possible DXC write */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe3c9 undefined */
+        /* 0xe3cc undefined */
+        /* 0xe3ce undefined */
+        /* 0xe3d0-0xe3ff undefined */
+
+        case 0xe700: /* VLEB - vector load element */
+        case 0xe701: /* VLEH - vector load element */
+        case 0xe702: /* VLEG - vector load element */
+        case 0xe703: /* VLEF - vector load element */
+        case 0xe704: /* VLLEZ - vector load logical element and zero */
+        case 0xe705: /* VLREP - vector load and replicate */
+        case 0xe706: /* VL - vector load */
+        case 0xe707: /* VLBB - vector load to block bounduary */
+        case 0xe712: /* VGEG - vector gather element */
+        case 0xe713: /* VGEF - vector gather element */
+        case 0xe722: /* VLVG - vector load vr element from gr */
+        case 0xe730: /* VESL - vector element shift left */
+        case 0xe733: /* VERLL - vector element rotate left logical */
+        case 0xe737: /* VLL - vector load with length */
+        case 0xe738: /* VESRL - vector element shift right logical */
+        case 0xe73a: /* VESRA - vector element shift right arithmetic */
+        case 0xe740: /* VLEIB - vector load element immediate */
+        case 0xe741: /* VLEIH - vector load element immediate */
+        case 0xe742: /* VLEIG - vector load element immediate */
+        case 0xe743: /* VLEIF - vector load element immediate */
+        case 0xe744: /* VGBM - vector generate byte mask */
+        case 0xe745: /* VREPI - vector replicate immediate */
+        case 0xe746: /* VGM - vector generate mask */
+        case 0xe74d: /* VREP - vector replicate */
+        case 0xe750: /* VPOPCT - vector population count */
+        case 0xe752: /* VCTZ - vector count trailing zeros */
+        case 0xe753: /* VCLZ - vector count leading zeros */
+        case 0xe756: /* VLR - vector load */
+        case 0xe75f: /* VSEG -vector sign extend to doubleword */
+        case 0xe760: /* VMRL - vector merge low */
+        case 0xe761: /* VMRH - vector merge high */
+        case 0xe762: /* VLVGP - vector load vr from grs disjoint */
+        case 0xe764: /* VSUM - vector sum across word */
+        case 0xe765: /* VSUMG - vector sum across doubleword */
+        case 0xe766: /* VCKSM - vector checksum */
+        case 0xe767: /* VSUMQ - vector sum across quadword */
+        case 0xe768: /* VN - vector and */
+        case 0xe769: /* VNC - vector and with complement */
+        case 0xe76a: /* VO - vector or */
+        case 0xe76b: /* VNO - vector nor */
+        case 0xe76d: /* VX - vector xor */
+        case 0xe770: /* VESLV - vector element shift left */
+        case 0xe772: /* VERIM - vector element rotate and insert under mask */
+        case 0xe773: /* VERLLV - vector element rotate left logical */
+        case 0xe774: /* VSL - vector shift left */
+        case 0xe775: /* VSLB - vector shift left by byte */
+        case 0xe777: /* VSLDB - vector shift left double by byte */
+        case 0xe778: /* VESRLV - vector element shift right logical */
+        case 0xe77a: /* VESRAV - vector element shift right arithmetic */
+        case 0xe77c: /* VSRL - vector shift right logical */
+        case 0xe77d: /* VSRLB - vector shift right logical by byte */
+        case 0xe77e: /* VSRA - vector shift right arithmetic */
+        case 0xe77f: /* VSRAB - vector shift right arithmetic by byte */
+        case 0xe784: /* VPDI - vector permute doubleword immediate */
+        case 0xe78c: /* VPERM - vector permute */
+        case 0xe78d: /* VSEL - vector select */
+        case 0xe78e: /* VFMS - vector fp multiply and subtract */
+        case 0xe78f: /* VFMA - vector fp multiply and add */
+        case 0xe794: /* VPK - vector pack */
+        case 0xe7a1: /* VMLH - vector multiply logical high */
+        case 0xe7a2: /* VML - vector multiply low */
+        case 0xe7a3: /* VMH - vector multiply high */
+        case 0xe7a4: /* VMLE - vector multiply logical even */
+        case 0xe7a5: /* VMLO - vector multiply logical odd */
+        case 0xe7a6: /* VME - vector multiply even */
+        case 0xe7a7: /* VMO - vector multiply odd */
+        case 0xe7a9: /* VMALH - vector multiply and add logical high */
+        case 0xe7aa: /* VMAL - vector multiply and add low */
+        case 0xe7ab: /* VMAH - vector multiply and add high */
+        case 0xe7ac: /* VMALE - vector multiply and add logical even */
+        case 0xe7ad: /* VMALO - vector multiply and add logical odd */
+        case 0xe7ae: /* VMAE - vector multiply and add even */
+        case 0xe7af: /* VMAO - vector multiply and add odd */
+        case 0xe7b4: /* VGFM - vector Galois field multiply sum */
+        case 0xe7b9: /* VACCC - vector add with carry compute carry */
+        case 0xe7bb: /* VAC - vector add with carry */
+        case 0xe7bc: /* VGFMA - vector Galois field multiply sum and accumulate */
+        case 0xe7bd: /* VSBCBI - vector subtract with borrow compute borrow indication */
+        case 0xe7bf: /* VSBI - vector subtract with borrow indication */
+        case 0xe7c0: /* VCLGD - vector convert to logical 64-bit */
+        case 0xe7c1: /* VCDLG - vector convert from logical 64-bit */
+        case 0xe7c2: /* VCGD - vector convert to fixed 64-bit */
+        case 0xe7c3: /* VCDG - vector convert from fixed 64-bit */
+        case 0xe7c4: /* VLDE - vector fp load lengthened */
+        case 0xe7c5: /* VLED - vector fp load rounded */
+        case 0xe7c7: /* VFI - vector load fp integer */
+        case 0xe7cc: /* VFPSO - vector fp perform sign operation */
+        case 0xe7ce: /* VFSQ - vector fp square root */
+        case 0xe7d4: /* VUPLL - vector unpack logical low */
+        case 0xe7d6: /* VUPL - vector unpack low */
+        case 0xe7d5: /* VUPLH - vector unpack logical high */
+        case 0xe7d7: /* VUPH - vector unpack high */
+        case 0xe7de: /* VLC - vector load complement */
+        case 0xe7df: /* VLP - vector load positive */
+        case 0xe7e2: /* VFA - vector fp subtract */
+        case 0xe7e3: /* VFA - vector fp add */
+        case 0xe7e5: /* VFD - vector fp divide */
+        case 0xe7e7: /* VFM - vector fp multiply */
+        case 0xe7f0: /* VAVGL - vector average logical */
+        case 0xe7f1: /* VACC - vector add and compute carry */
+        case 0xe7f2: /* VAVG - vector average */
+        case 0xe7f3: /* VA - vector add */
+        case 0xe7f5: /* VSCBI - vector subtract compute borrow indication */
+        case 0xe7f7: /* VS - vector subtract */
+        case 0xe7fc: /* VMNL - vector minimum logical */
+        case 0xe7fd: /* VMXL - vector maximum logical */
+        case 0xe7fe: /* VMN - vector minimum */
+        case 0xe7ff: /* VMX - vector maximum */
+          /* vector destination + FPC */
+          if (s390_record_vr (gdbarch, regcache, ivec[0]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe708: /* VSTEB - vector store element */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe709: /* VSTEH - vector store element */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 2))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe70a: /* VSTEG - vector store element */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe70b: /* VSTEF - vector store element */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe70c-0xe70d undefined */
+
+        case 0xe70e: /* VST - vector store */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 16))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe70f-0xe711 undefined */
+        /* 0xe714-0xe719 undefined */
+
+        case 0xe71a: /* VSCEG - vector scatter element */
+          if (s390_record_calc_disp_vsce (gdbarch, regcache, ivec[1], inib[8], 8, insn[1], 0, &oaddr))
+            return -1;
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe71b: /* VSCEF - vector scatter element */
+          if (s390_record_calc_disp_vsce (gdbarch, regcache, ivec[1], inib[8], 4, insn[1], 0, &oaddr))
+            return -1;
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe71c-0xe720 undefined */
+        /* 0xe723-0xe726 undefined */
+        /* 0xe728-0xe72f undefined */
+        /* 0xe731-0xe732 undefined */
+        /* 0xe734-0xe735 undefined */
+
+        case 0xe736: /* VLM - vector load multiple */
+          for (i = ivec[0]; i != ivec[1]; i++, i &= 0x1f)
+            if (s390_record_vr (gdbarch, regcache, i))
+              return -1;
+          if (s390_record_vr (gdbarch, regcache, ivec[1]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe739 undefined */
+        /* 0xe73b-0xe73d undefined */
+
+        case 0xe73e: /* VSTM - vector store multiple */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (ivec[0] <= ivec[1])
+            n = ivec[1] - ivec[0] + 1;
+          else
+            n = ivec[1] + 0x20 - ivec[0] + 1;
+          if (record_full_arch_list_add_mem (oaddr, n * 16))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xe73f: /* VSTL - vector store with length */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[3], &tmp);
+          tmp &= 0xffffffffu;
+          if (tmp > 16)
+            tmp = 16;
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe747-0xe749 undefined */
+
+        case 0xe74a: /* VFTCI - vector fp test data class immediate */
+        case 0xe75c: /* VISTR - vector isolate string */
+        case 0xe780: /* VFEE - vector find element equal */
+        case 0xe781: /* VFENE - vector find element not equal */
+        case 0xe782: /* VFA - vector find any element equal */
+        case 0xe78a: /* VSTRC - vector string range compare */
+        case 0xe795: /* VPKLS - vector pack logical saturate */
+        case 0xe797: /* VPKS - vector pack saturate */
+        case 0xe7e8: /* VFCE - vector fp compare equal */
+        case 0xe7ea: /* VFCHE - vector fp compare high or equal */
+        case 0xe7eb: /* VFCE - vector fp compare high */
+        case 0xe7f8: /* VCEQ - vector compare equal */
+        case 0xe7f9: /* VCHL - vector compare high logical */
+        case 0xe7fb: /* VCH - vector compare high */
+          /* vector destination + flags + FPC */
+          if (s390_record_vr (gdbarch, regcache, ivec[0]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe74b-0xe74c undefined */
+        /* 0xe74e-0xe74f undefined */
+        /* 0xe751 undefined */
+        /* 0xe754-0xe755 undefined */
+        /* 0xe757-0xe75b undefined */
+        /* 0xe75d-0xe75e undefined */
+        /* 0xe763 undefined */
+        /* 0xe76c undefined */
+        /* 0xe76e-0xe76f undefined */
+        /* 0xe771 undefined */
+        /* 0xe776 undefined */
+        /* 0xe779 undefined */
+        /* 0xe77b undefined */
+        /* 0xe783 undefined */
+        /* 0xe785-0xe789 undefined */
+        /* 0xe78b undefined */
+        /* 0xe790-0xe793 undefined */
+        /* 0xe796 undefined */
+        /* 0xe798-0xe7a0 undefined */
+        /* 0xe7a8 undefined */
+        /* 0xe7b0-0xe7b3 undefined */
+        /* 0xe7b5-0xe7b8 undefined */
+        /* 0xe7ba undefined */
+        /* 0xe7be undefined */
+        /* 0xe7c6 undefined */
+        /* 0xe7c8-0xe7c9 undefined */
+
+        case 0xe7ca: /* WFK - vector fp compare and signal scalar */
+        case 0xe7cb: /* WFC - vector fp compare scalar */
+        case 0xe7d8: /* VTM - vector test under mask */
+        case 0xe7d9: /* VECL - vector element compare logical */
+        case 0xe7db: /* VEC - vector element compare */
+        case 0xed08: /* KEB - compare and signal */
+        case 0xed09: /* CEB - compare */
+        case 0xed18: /* KDB - compare and signal */
+        case 0xed19: /* CDB - compare */
+          /* flags + fpc only */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe7cd undefined */
+        /* 0xe7cf-0xe7d3 undefined */
+        /* 0xe7da undefined */
+        /* 0xe7dc-0xe7dd undefined */
+        /* 0xe7e0-0xe7e1 undefined */
+        /* 0xe7e4 undefined */
+        /* 0xe7e6 undefined */
+        /* 0xe7e9 undefined */
+        /* 0xe7ec-0xe7ef undefined */
+        /* 0xe7f4 undefined */
+        /* 0xe7f6 undefined */
+        /* 0xe7fa undefined */
+
+        /* 0xeb00-0xeb03 undefined */
+
+        case 0xeb04: /* LMG - load multiple */
+          for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+            if (s390_record_gpr_g (gdbarch, regcache, i))
+              return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[3]))
+            return -1;
+          break;
+
+        /* 0xeb05-0xeb09 undefined */
+        /* 0xeb0e undefined */
+        /* 0xeb0f privileged: TRACG */
+        /* 0xeb10-0xeb13 undefined */
+
+        case 0xeb14: /* CSY - compare and swap */
+        case 0xebf4: /* LAN - load and and */
+        case 0xebf6: /* LAO - load and or */
+        case 0xebf7: /* LAX - load and xor */
+        case 0xebf8: /* LAA - load and add */
+        case 0xebfa: /* LAAL - load and add logical */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb15-0xeb1b undefined */
+        /* 0xeb1e-0xeb1f undefined */
+        /* 0xeb22 undefined */
+
+        case 0xeb23: /* CLT - compare logical and trap */
+        case 0xeb2b: /* CLGT - compare logical and trap */
+          /* fpc only - including possible DXC write for trapping insns */
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xeb24: /* STMG - store multiple */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (inib[2] <= inib[3])
+            n = inib[3] - inib[2] + 1;
+          else
+            n = inib[3] + 0x10 - inib[2] + 1;
+          if (record_full_arch_list_add_mem (oaddr, n * 8))
+            return -1;
+          break;
+
+        /* 0xeb25 privileged */
+
+        case 0xeb26: /* STMH - store multiple high */
+        case 0xeb90: /* STMY - store multiple */
+        case 0xeb9b: /* STAMY - store access multiple */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (inib[2] <= inib[3])
+            n = inib[3] - inib[2] + 1;
+          else
+            n = inib[3] + 0x10 - inib[2] + 1;
+          if (record_full_arch_list_add_mem (oaddr, n * 4))
+            return -1;
+          break;
+
+        /* 0xeb27-0xeb2a undefined */
+
+        case 0xeb2c: /* STCMH - store characters under mask */
+        case 0xeb2d: /* STCMY - store characters under mask */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, s390_popcnt (inib[3])))
+            return -1;
+          break;
+
+        /* 0xeb2e undefined */
+        /* 0xeb2f privileged */
+
+        case 0xeb30: /* CSG - compare and swap */
+        case 0xebe4: /* LANG - load and and */
+        case 0xebe6: /* LAOG - load and or */
+        case 0xebe7: /* LAXG - load and xor */
+        case 0xebe8: /* LAAG - load and add */
+        case 0xebea: /* LAALG - load and add logical */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xeb31: /* CDSY - compare double and swap */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb32-0xeb3d undefined */
+
+        case 0xeb3e: /* CDSG - compare double and swap */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 16))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2] | 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb3f-0xeb43 undefined */
+        /* 0xeb46-0xeb4b undefined */
+        /* 0xeb4d-0xeb50 undefined */
+
+        case 0xeb52: /* MVIY - move */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 1))
+            return -1;
+          break;
+
+        case 0xeb54: /* NIY - and */
+        case 0xeb56: /* OIY - or */
+        case 0xeb57: /* XIY - xor */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb53 undefined */
+        /* 0xeb58-0xeb69 undefined */
+
+        case 0xeb6a: /* ASI - add immediate */
+        case 0xeb6e: /* ALSI - add immediate */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb6b-0xeb6d undefined */
+        /* 0xeb6f-0xeb79 undefined */
+
+        case 0xeb7a: /* AGSI - add immediate */
+        case 0xeb7e: /* ALGSI - add immediate */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], ibyte[4]);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb7b-0xeb7d undefined */
+        /* 0xeb7f undefined */
+
+        case 0xeb80: /* ICMH - insert characters under mask */
+          /* 32-bit high gpr destination + flags */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb82-0xeb8d undefined */
+
+        case 0xeb8e: /* MVCLU - move long unicode [partial] */
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[2], &tmp);
+          oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
+          regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[2] | 1), &tmp);
+          if (record_full_arch_list_add_mem (oaddr, tmp))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[3] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        case 0xeb8f: /* CLCLU - compare logical long unicode [partial] */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[2] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + (inib[3] | 1)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xeb91-0xeb95 undefined */
+
+        case 0xeb96: /* LMH - load multiple high */
+          for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+            if (s390_record_gpr_h (gdbarch, regcache, i))
+              return -1;
+          if (s390_record_gpr_h (gdbarch, regcache, inib[3]))
+            return -1;
+          break;
+
+        /* 0xeb97 undefined */
+
+        case 0xeb98: /* LMY - load multiple */
+          for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+            if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
+              return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+            return -1;
+          break;
+
+        /* 0xeb99 undefined */
+
+        case 0xeb9a: /* LAMY - load access multiple */
+          for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+            if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + i))
+              return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + inib[3]))
+            return -1;
+          break;
+
+        /* 0xeb9c-0xebbf undefined */
+        /* 0xebc1-0xebdb undefined */
+        /* 0xebe5 undefined */
+        /* 0xebe9 undefined */
+        /* 0xebeb-0xebf1 undefined */
+        /* 0xebf5 undefined */
+        /* 0xebf9 undefined */
+        /* 0xebfb-0xebff undefined */
+
+        /* 0xed00-0xed03 undefined */
+
+        case 0xed04: /* LDEB - load lengthened */
+        case 0xed0c: /* MDEB - multiply */
+        case 0xed0d: /* DEB - divide */
+        case 0xed14: /* SQEB - square root */
+        case 0xed15: /* SQDB - square root */
+        case 0xed17: /* MEEB - multiply */
+        case 0xed1c: /* MDB - multiply */
+        case 0xed1d: /* DDB - divide */
+          /* float destination + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xed05: /* LXDB - load lengthened */
+        case 0xed06: /* LXEB - load lengthened */
+        case 0xed07: /* MXDB - multiply */
+          /* float pair destination + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[2] | 2)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xed0a: /* AEB - add */
+        case 0xed0b: /* SEB - subtract */
+        case 0xed1a: /* ADB - add */
+        case 0xed1b: /* SDB - subtract */
+          /* float destination + flags + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        case 0xed0e: /* MAEB - multiply and add */
+        case 0xed0f: /* MSEB - multiply and subtract */
+        case 0xed1e: /* MADB - multiply and add */
+        case 0xed1f: /* MSDB - multiply and subtract */
+        case 0xed40: /* SLDT - shift significand left */
+        case 0xed41: /* SRDT - shift significand right */
+        case 0xedaa: /* CDZT - convert from zoned */
+        case 0xedae: /* CDPT - convert from packed */
+          /* float destination [RXF] + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[8]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xed13 undefined */
+        /* 0xed16 undefined */
+        /* 0xed20-0xed23 undefined */
+
+        case 0xed24: /* LDE - load lengthened */
+        case 0xed34: /* SQE - square root */
+        case 0xed35: /* SQD - square root */
+        case 0xed37: /* MEE - multiply */
+        case 0xed64: /* LEY - load */
+        case 0xed65: /* LDY - load */
+          /* float destination */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        case 0xed25: /* LXD - load lengthened */
+        case 0xed26: /* LXE - load lengthened */
+          /* float pair destination */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[2] | 2)))
+            return -1;
+          break;
+
+        /* 0xed27-0xed2d undefined */
+
+        case 0xed2e: /* MAE - multiply and add */
+        case 0xed2f: /* MSE - multiply and subtract */
+        case 0xed38: /* MAYL - multiply and add unnormalized */
+        case 0xed39: /* MYL - multiply unnormalized */
+        case 0xed3c: /* MAYH - multiply and add unnormalized */
+        case 0xed3d: /* MYH - multiply unnormalized */
+        case 0xed3e: /* MAD - multiply and add */
+        case 0xed3f: /* MSD - multiply and subtract */
+          /* float destination [RXF] */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[8]))
+            return -1;
+          break;
+
+        /* 0xed30-0xed33 undefined */
+        /* 0xed36 undefined */
+
+        case 0xed3a: /* MAY - multiply and add unnormalized */
+        case 0xed3b: /* MY - multiply unnormalized */
+          /* float pair destination [RXF] */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[8]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[8] | 2)))
+            return -1;
+          break;
+
+        /* 0xed42-0xed47 undefind */
+
+        case 0xed48: /* SLXT - shift significand left */
+        case 0xed49: /* SRXT - shift significand right */
+        case 0xedab: /* CXZT - convert from zoned */
+        case 0xedaf: /* CXPT - convert from packed */
+          /* float pair destination [RXF] + fpc */
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[8]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + (inib[8] | 2)))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xed4a-0xed4f undefind */
+        /* 0xed52-0xed53 undefind */
+        /* 0xed56-0xed57 undefind */
+        /* 0xed5a-0xed63 undefind */
+        /* 0xed68-0xeda7 undefined */
+
+        case 0xeda8: /* CZDT - convert to zoned */
+        case 0xeda9: /* CZXT - convert to zoned */
+        case 0xedac: /* CPDT - convert to packed */
+        case 0xedad: /* CPXT - convert to packed */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, ibyte[1] + 1))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xedb0-0xedff undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xe4 undefined */
+
+    case 0xe5:
+      /* SSE/SIL-format instruction */
+      switch (insn[0])
+        {
+        /* 0xe500-0xe543 undefined, privileged, or unsupported */
+
+        case 0xe544: /* MVHHI - move */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 2))
+            return -1;
+          break;
+
+        /* 0xe545-0xe547 undefined */
+
+        case 0xe548: /* MVGHI - move */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 8))
+            return -1;
+          break;
+
+        /* 0xe549-0xe54b undefined */
+
+        case 0xe54c: /* MVHI - move */
+          oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+          if (record_full_arch_list_add_mem (oaddr, 4))
+            return -1;
+          break;
+
+        /* 0xe54d-0xe553 undefined */
+
+        case 0xe554: /* CHHSI - compare halfword immediate */
+        case 0xe555: /* CLHHSI - compare logical immediate */
+        case 0xe558: /* CGHSI - compare halfword immediate */
+        case 0xe559: /* CLGHSI - compare logical immediate */
+        case 0xe55c: /* CHSI - compare halfword immediate */
+        case 0xe55d: /* CLFHSI - compare logical immediate */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe556-0xe557 undefined */
+        /* 0xe55a-0xe55b undefined */
+        /* 0xe55e-0xe55f undefined */
+
+        case 0xe560: /* TBEGIN - transaction begin */
+          /* The transaction will be immediately aborted after this
+             instruction, due to single-stepping.  This instruction is
+             only supported so that the program can fail a few times
+             and go to the non-transactional fallback.  */
+          if (inib[4])
+            {
+              /* Transaction diagnostic block - user.  */
+              oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+              if (record_full_arch_list_add_mem (oaddr, 256))
+                return -1;
+            }
+          /* Transaction diagnostic block - supervisor.  */
+          if (record_full_arch_list_add_reg (regcache, S390_TDB_DWORD0_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_TDB_ABORT_CODE_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_TDB_CONFLICT_TOKEN_REGNUM))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_TDB_ATIA_REGNUM))
+            return -1;
+          for (i = 0; i < 16; i++)
+            if (record_full_arch_list_add_reg (regcache, S390_TDB_R0_REGNUM + i))
+              return -1;
+          /* And flags.  */
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xe561 unsupported: TBEGINC */
+        /* 0xe562-0xe5ff undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    /* 0xe6 undefined */
+
+    case 0xec:
+      /* RIE/RIS/RRS-format instruction */
+      switch (ibyte[0] << 8 | ibyte[5])
+        {
+        /* 0xec00-0xec41 undefined */
+
+        case 0xec42: /* LOCHI - load halfword immediate on condition */
+        case 0xec51: /* RISBLG - rotate then insert selected bits low */
+          /* 32-bit or native gpr destination */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          break;
+
+        /* 0xec43 undefined */
+
+        case 0xec44: /* BRXHG - branch relative on index high */
+        case 0xec45: /* BRXLG - branch relative on index low or equal */
+        case 0xec46: /* LOCGHI - load halfword immediate on condition */
+        case 0xec59: /* RISBGN - rotate then insert selected bits */
+          /* 64-bit gpr destination */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xec47-0xec4d undefined */
+
+        case 0xec4e: /* LOCHHI - load halfword immediate on condition */
+        case 0xec5d: /* RISBHG - rotate then insert selected bits high */
+          /* 32-bit high gpr destination */
+          if (s390_record_gpr_h (gdbarch, regcache, inib[2]))
+            return -1;
+          break;
+
+        /* 0xec4f-0xec50 undefined */
+        /* 0xec52-0xec53 undefined */
+
+        case 0xec54: /* RNSBG - rotate then and selected bits */
+        case 0xec55: /* RISBG - rotate then insert selected bits */
+        case 0xec56: /* ROSBG - rotate then or selected bits */
+        case 0xec57: /* RXSBG - rotate then xor selected bits */
+        case 0xecd9: /* AGHIK - add immediate */
+        case 0xecdb: /* ALGHSIK - add logical immediate */
+          /* 64-bit gpr destination + flags */
+          if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xec58 undefined */
+        /* 0xec5a-0xec5c undefined */
+        /* 0xec5e-0xec63 undefined */
+
+        case 0xec64: /* CGRJ - compare and branch relative */
+        case 0xec65: /* CLGRJ - compare logical and branch relative */
+        case 0xec76: /* CRJ - compare and branch relative */
+        case 0xec77: /* CLRJ - compare logical and branch relative */
+        case 0xec7c: /* CGIJ - compare immediate and branch relative */
+        case 0xec7d: /* CLGIJ - compare logical immediate and branch relative */
+        case 0xec7e: /* CIJ - compare immediate and branch relative */
+        case 0xec7f: /* CLIJ - compare logical immediate and branch relative */
+        case 0xece4: /* CGRB - compare and branch */
+        case 0xece5: /* CLGRB - compare logical and branch */
+        case 0xecf6: /* CRB - compare and branch */
+        case 0xecf7: /* CLRB - compare logical and branch */
+        case 0xecfc: /* CGIB - compare immediate and branch */
+        case 0xecfd: /* CLGIB - compare logical immediate and branch */
+        case 0xecfe: /* CIB - compare immediate and branch */
+        case 0xecff: /* CLIB - compare logical immediate and branch */
+          break;
+
+        /* 0xec66-0xec6f undefined */
+
+        case 0xec70: /* CGIT - compare immediate and trap */
+        case 0xec71: /* CLGIT - compare logical immediate and trap */
+        case 0xec72: /* CIT - compare immediate and trap */
+        case 0xec73: /* CLFIT - compare logical immediate and trap */
+          /* fpc only - including possible DXC write for trapping insns */
+          if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+            return -1;
+          break;
+
+        /* 0xec74-0xec75 undefined */
+        /* 0xec78-0xec7b undefined */
+
+        /* 0xec80-0xecd7 undefined */
+
+        case 0xecd8: /* AHIK - add immediate */
+        case 0xecda: /* ALHSIK - add logical immediate */
+          /* 32-bit gpr destination + flags */
+          if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+            return -1;
+          if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+            return -1;
+          break;
+
+        /* 0xecdc-0xece3 undefined */
+        /* 0xece6-0xecf5 undefined */
+        /* 0xecf8-0xecfb undefined */
+
+        default:
+          goto UNKNOWN_OP;
+        }
+      break;
+
+    case 0xee: /* PLO - perform locked operation */
+      regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      oaddr2 = s390_record_calc_disp (gdbarch, regcache, 0, insn[2], 0);
+      if (!(tmp & 0x100))
+        {
+          uint8_t fc = tmp & 0xff;
+          gdb_byte buf[8];
+          switch (fc)
+            {
+            case 0x00: /* CL */
+              /* op1c */
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+                return -1;
+              /* op3 */
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+                return -1;
+              break;
+
+            case 0x01: /* CLG */
+              /* op1c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x08, 8))
+                return -1;
+              /* op3 */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x28, 8))
+                return -1;
+              break;
+
+            case 0x02: /* CLGR */
+              /* op1c */
+              if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+                return -1;
+              /* op3 */
+              if (s390_record_gpr_g (gdbarch, regcache, inib[3]))
+                return -1;
+              break;
+
+            case 0x03: /* CLX */
+              /* op1c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x00, 16))
+                return -1;
+              /* op3 */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x20, 16))
+                return -1;
+              break;
+
+            case 0x08: /* DCS */
+              /* op3c */
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[3]))
+                return -1;
+              /* fallthru */
+            case 0x0c: /* CSST */
+              /* op4 */
+              if (record_full_arch_list_add_mem (oaddr2, 4))
+                return -1;
+              goto CS;
+
+            case 0x14: /* CSTST */
+              /* op8 */
+              if (target_read_memory (oaddr2 + 0x88, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 4))
+                return -1;
+              /* fallthru */
+            case 0x10: /* CSDST */
+              /* op6 */
+              if (target_read_memory (oaddr2 + 0x68, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 4))
+                return -1;
+              /* op4 */
+              if (target_read_memory (oaddr2 + 0x48, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 4))
+                return -1;
+              /* fallthru */
+            case 0x04: /* CS */
+CS:
+              /* op1c */
+              if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + inib[2]))
+                return -1;
+              /* op2 */
+              if (record_full_arch_list_add_mem (oaddr, 4))
+                return -1;
+              break;
+
+            case 0x09: /* DCSG */
+              /* op3c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x28, 8))
+                return -1;
+              goto CSSTG;
+
+            case 0x15: /* CSTSTG */
+              /* op8 */
+              if (target_read_memory (oaddr2 + 0x88, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* fallthru */
+            case 0x11: /* CSDSTG */
+              /* op6 */
+              if (target_read_memory (oaddr2 + 0x68, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* fallthru */
+            case 0x0d: /* CSSTG */
+CSSTG:
+              /* op4 */
+              if (target_read_memory (oaddr2 + 0x48, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* fallthru */
+            case 0x05: /* CSG */
+              /* op1c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x08, 8))
+                return -1;
+              /* op2 */
+              if (record_full_arch_list_add_mem (oaddr, 8))
+                return -1;
+              break;
+
+            case 0x0a: /* DCSGR */
+              /* op3c */
+              if (s390_record_gpr_g (gdbarch, regcache, inib[3]))
+                return -1;
+              /* fallthru */
+            case 0x0e: /* CSSTGR */
+              /* op4 */
+              if (record_full_arch_list_add_mem (oaddr2, 8))
+                return -1;
+              goto CSGR;
+
+            case 0x16: /* CSTSTGR */
+              /* op8 */
+              if (target_read_memory (oaddr2 + 0x88, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* fallthru */
+            case 0x12: /* CSDSTGR */
+              /* op6 */
+              if (target_read_memory (oaddr2 + 0x68, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* op4 */
+              if (target_read_memory (oaddr2 + 0x48, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 8))
+                return -1;
+              /* fallthru */
+            case 0x06: /* CSGR */
+CSGR:
+              /* op1c */
+              if (s390_record_gpr_g (gdbarch, regcache, inib[2]))
+                return -1;
+              /* op2 */
+              if (record_full_arch_list_add_mem (oaddr, 8))
+                return -1;
+              break;
+
+            case 0x0b: /* DCSX */
+              /* op3c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x20, 16))
+                return -1;
+              goto CSSTX;
+
+            case 0x17: /* CSTSTX */
+              /* op8 */
+              if (target_read_memory (oaddr2 + 0x88, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 16))
+                return -1;
+              /* fallthru */
+            case 0x13: /* CSDSTX */
+              /* op6 */
+              if (target_read_memory (oaddr2 + 0x68, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 16))
+                return -1;
+              /* fallthru */
+            case 0x0f: /* CSSTX */
+CSSTX:
+              /* op4 */
+              if (target_read_memory (oaddr2 + 0x48, buf, 8))
+                return -1;
+              oaddr3 = extract_unsigned_integer (buf, 8, byte_order);
+              oaddr3 = s390_record_address_mask (gdbarch, regcache, oaddr3);
+              if (record_full_arch_list_add_mem (oaddr3, 16))
+                return -1;
+              /* fallthru */
+            case 0x07: /* CSX */
+              /* op1c */
+              if (record_full_arch_list_add_mem (oaddr2 + 0x00, 16))
+                return -1;
+              /* op2 */
+              if (record_full_arch_list_add_mem (oaddr, 16))
+                return -1;
+              break;
+
+            default:
+              fprintf_unfiltered (gdb_stdlog, "Warning: Unknown PLO FC %02x at %s.\n",
+                                  fc, paddress (gdbarch, addr));
+              return -1;
+            }
+        }
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      break;
+
+    case 0xef: /* LMD - load multiple disjoint */
+      for (i = inib[2]; i != inib[3]; i++, i &= 0xf)
+        if (s390_record_gpr_g (gdbarch, regcache, i))
+          return -1;
+      if (s390_record_gpr_g (gdbarch, regcache, inib[3]))
+        return -1;
+      break;
+
+    case 0xf0: /* SRP - shift and round decimal */
+    case 0xf8: /* ZAP - zero and add */
+    case 0xfa: /* AP - add decimal */
+    case 0xfb: /* SP - subtract decimal */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, inib[2] + 1))
+        return -1;
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      /* DXC may be written */
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    case 0xf1: /* MVO - move with offset */
+    case 0xf2: /* PACK - pack */
+    case 0xf3: /* UNPK - unpack */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, inib[2] + 1))
+        return -1;
+      break;
+
+    /* 0xf4-0xf7 undefined */
+
+    case 0xf9: /* CP - compare decimal */
+      if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
+        return -1;
+      /* DXC may be written */
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    case 0xfc: /* MP - multiply decimal */
+    case 0xfd: /* DP - divide decimal */
+      oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
+      if (record_full_arch_list_add_mem (oaddr, inib[2] + 1))
+        return -1;
+      /* DXC may be written */
+      if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
+        return -1;
+      break;
+
+    /* 0xfe-0xff undefined */
+
+    default:
+UNKNOWN_OP:
+      fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %04x "
+                          "at %s.\n", insn[0], paddress (gdbarch, addr));
+      return -1;
+  }
+
+  if (record_full_arch_list_add_reg (regcache, S390_PSWA_REGNUM))
+    return -1;
+  if (record_full_arch_list_add_end ())
+    return -1;
+  return 0;
+}
+
+/* Initialize linux_record_tdep if not initialized yet.  */
+
+static void
+s390_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
+                             enum s390_abi_kind abi)
+{
+  /* These values are the size of the type that will be used in a system
+     call.  They are obtained from Linux Kernel source.  */
+
+  if (abi == ABI_LINUX_ZSERIES)
+    {
+      record_tdep->size_pointer = 8;
+      /* no _old_kernel_stat */
+      record_tdep->size_tms = 32;
+      record_tdep->size_loff_t = 8;
+      record_tdep->size_flock = 32;
+      record_tdep->size_ustat = 32;
+      record_tdep->size_old_sigaction = 32;
+      record_tdep->size_old_sigset_t = 8;
+      record_tdep->size_rlimit = 16;
+      record_tdep->size_rusage = 144;
+      record_tdep->size_timeval = 16;
+      record_tdep->size_timezone = 8;
+      /* old_[ug]id_t never used */
+      record_tdep->size_fd_set = 128;
+      record_tdep->size_old_dirent = 280;
+      record_tdep->size_statfs = 88;
+      record_tdep->size_statfs64 = 88;
+      record_tdep->size_sockaddr = 16;
+      record_tdep->size_int = 4;
+      record_tdep->size_long = 8;
+      record_tdep->size_ulong = 8;
+      record_tdep->size_msghdr = 56;
+      record_tdep->size_itimerval = 32;
+      record_tdep->size_stat = 144;
+      /* old_utsname unused */
+      record_tdep->size_sysinfo = 112;
+      record_tdep->size_msqid_ds = 120;
+      record_tdep->size_shmid_ds = 112;
+      record_tdep->size_new_utsname = 390;
+      record_tdep->size_timex = 208;
+      record_tdep->size_mem_dqinfo = 24;
+      record_tdep->size_if_dqblk = 72;
+      record_tdep->size_fs_quota_stat = 80;
+      record_tdep->size_timespec = 16;
+      record_tdep->size_pollfd = 8;
+      record_tdep->size_NFS_FHSIZE = 32;
+      record_tdep->size_knfsd_fh = 132;
+      record_tdep->size_TASK_COMM_LEN = 16;
+      record_tdep->size_sigaction = 32;
+      record_tdep->size_sigset_t = 8;
+      record_tdep->size_siginfo_t = 128;
+      record_tdep->size_cap_user_data_t = 12;
+      record_tdep->size_stack_t = 24;
+      record_tdep->size_off_t = 8;
+      /* stat64 unused */
+      record_tdep->size_gid_t = 4;
+      record_tdep->size_uid_t = 4;
+      record_tdep->size_PAGE_SIZE = 0x1000;        /* 4KB */
+      record_tdep->size_flock64 = 32;
+      record_tdep->size_io_event = 32;
+      record_tdep->size_iocb = 64;
+      record_tdep->size_epoll_event = 16;
+      record_tdep->size_itimerspec = 32;
+      record_tdep->size_mq_attr = 64;
+      record_tdep->size_termios = 36;
+      record_tdep->size_termios2 = 44;
+      record_tdep->size_pid_t = 4;
+      record_tdep->size_winsize = 8;
+      record_tdep->size_serial_struct = 72;
+      record_tdep->size_serial_icounter_struct = 80;
+      record_tdep->size_size_t = 8;
+      record_tdep->size_iovec = 16;
+      record_tdep->size_time_t = 8;
+    }
+  else if (abi == ABI_LINUX_S390)
+    {
+      record_tdep->size_pointer = 4;
+      record_tdep->size__old_kernel_stat = 32;
+      record_tdep->size_tms = 16;
+      record_tdep->size_loff_t = 8;
+      record_tdep->size_flock = 16;
+      record_tdep->size_ustat = 20;
+      record_tdep->size_old_sigaction = 16;
+      record_tdep->size_old_sigset_t = 4;
+      record_tdep->size_rlimit = 8;
+      record_tdep->size_rusage = 72;
+      record_tdep->size_timeval = 8;
+      record_tdep->size_timezone = 8;
+      record_tdep->size_old_gid_t = 2;
+      record_tdep->size_old_uid_t = 2;
+      record_tdep->size_fd_set = 128;
+      record_tdep->size_old_dirent = 268;
+      record_tdep->size_statfs = 64;
+      record_tdep->size_statfs64 = 88;
+      record_tdep->size_sockaddr = 16;
+      record_tdep->size_int = 4;
+      record_tdep->size_long = 4;
+      record_tdep->size_ulong = 4;
+      record_tdep->size_msghdr = 28;
+      record_tdep->size_itimerval = 16;
+      record_tdep->size_stat = 64;
+      /* old_utsname unused */
+      record_tdep->size_sysinfo = 64;
+      record_tdep->size_msqid_ds = 88;
+      record_tdep->size_shmid_ds = 84;
+      record_tdep->size_new_utsname = 390;
+      record_tdep->size_timex = 128;
+      record_tdep->size_mem_dqinfo = 24;
+      record_tdep->size_if_dqblk = 72;
+      record_tdep->size_fs_quota_stat = 80;
+      record_tdep->size_timespec = 8;
+      record_tdep->size_pollfd = 8;
+      record_tdep->size_NFS_FHSIZE = 32;
+      record_tdep->size_knfsd_fh = 132;
+      record_tdep->size_TASK_COMM_LEN = 16;
+      record_tdep->size_sigaction = 20;
+      record_tdep->size_sigset_t = 8;
+      record_tdep->size_siginfo_t = 128;
+      record_tdep->size_cap_user_data_t = 12;
+      record_tdep->size_stack_t = 12;
+      record_tdep->size_off_t = 4;
+      record_tdep->size_stat64 = 104;
+      record_tdep->size_gid_t = 4;
+      record_tdep->size_uid_t = 4;
+      record_tdep->size_PAGE_SIZE = 0x1000;        /* 4KB */
+      record_tdep->size_flock64 = 32;
+      record_tdep->size_io_event = 32;
+      record_tdep->size_iocb = 64;
+      record_tdep->size_epoll_event = 16;
+      record_tdep->size_itimerspec = 16;
+      record_tdep->size_mq_attr = 32;
+      record_tdep->size_termios = 36;
+      record_tdep->size_termios2 = 44;
+      record_tdep->size_pid_t = 4;
+      record_tdep->size_winsize = 8;
+      record_tdep->size_serial_struct = 60;
+      record_tdep->size_serial_icounter_struct = 80;
+      record_tdep->size_size_t = 4;
+      record_tdep->size_iovec = 8;
+      record_tdep->size_time_t = 4;
+    }
+
+  /* These values are the second argument of system call "sys_fcntl"
+     and "sys_fcntl64".  They are obtained from Linux Kernel source.  */
+  record_tdep->fcntl_F_GETLK = 5;
+  record_tdep->fcntl_F_GETLK64 = 12;
+  record_tdep->fcntl_F_SETLK64 = 13;
+  record_tdep->fcntl_F_SETLKW64 = 14;
+
+  record_tdep->arg1 = S390_R2_REGNUM;
+  record_tdep->arg2 = S390_R3_REGNUM;
+  record_tdep->arg3 = S390_R4_REGNUM;
+  record_tdep->arg4 = S390_R5_REGNUM;
+  record_tdep->arg5 = S390_R6_REGNUM;
+
+  /* These values are the second argument of system call "sys_ioctl".
+     They are obtained from Linux Kernel source.
+     See arch/s390/include/uapi/asm/ioctls.h.  */
+
+  record_tdep->ioctl_TCGETS = 0x5401;
+  record_tdep->ioctl_TCSETS = 0x5402;
+  record_tdep->ioctl_TCSETSW = 0x5403;
+  record_tdep->ioctl_TCSETSF = 0x5404;
+  record_tdep->ioctl_TCGETA = 0x5405;
+  record_tdep->ioctl_TCSETA = 0x5406;
+  record_tdep->ioctl_TCSETAW = 0x5407;
+  record_tdep->ioctl_TCSETAF = 0x5408;
+  record_tdep->ioctl_TCSBRK = 0x5409;
+  record_tdep->ioctl_TCXONC = 0x540a;
+  record_tdep->ioctl_TCFLSH = 0x540b;
+  record_tdep->ioctl_TIOCEXCL = 0x540c;
+  record_tdep->ioctl_TIOCNXCL = 0x540d;
+  record_tdep->ioctl_TIOCSCTTY = 0x540e;
+  record_tdep->ioctl_TIOCGPGRP = 0x540f;
+  record_tdep->ioctl_TIOCSPGRP = 0x5410;
+  record_tdep->ioctl_TIOCOUTQ = 0x5411;
+  record_tdep->ioctl_TIOCSTI = 0x5412;
+  record_tdep->ioctl_TIOCGWINSZ = 0x5413;
+  record_tdep->ioctl_TIOCSWINSZ = 0x5414;
+  record_tdep->ioctl_TIOCMGET = 0x5415;
+  record_tdep->ioctl_TIOCMBIS = 0x5416;
+  record_tdep->ioctl_TIOCMBIC = 0x5417;
+  record_tdep->ioctl_TIOCMSET = 0x5418;
+  record_tdep->ioctl_TIOCGSOFTCAR = 0x5419;
+  record_tdep->ioctl_TIOCSSOFTCAR = 0x541a;
+  record_tdep->ioctl_FIONREAD = 0x541b;
+  record_tdep->ioctl_TIOCINQ = 0x541b; /* alias */
+  record_tdep->ioctl_TIOCLINUX = 0x541c;
+  record_tdep->ioctl_TIOCCONS = 0x541d;
+  record_tdep->ioctl_TIOCGSERIAL = 0x541e;
+  record_tdep->ioctl_TIOCSSERIAL = 0x541f;
+  record_tdep->ioctl_TIOCPKT = 0x5420;
+  record_tdep->ioctl_FIONBIO = 0x5421;
+  record_tdep->ioctl_TIOCNOTTY = 0x5422;
+  record_tdep->ioctl_TIOCSETD = 0x5423;
+  record_tdep->ioctl_TIOCGETD = 0x5424;
+  record_tdep->ioctl_TCSBRKP = 0x5425;
+  record_tdep->ioctl_TIOCSBRK = 0x5427;
+  record_tdep->ioctl_TIOCCBRK = 0x5428;
+  record_tdep->ioctl_TIOCGSID = 0x5429;
+  record_tdep->ioctl_TCGETS2 = 0x802c542a;
+  record_tdep->ioctl_TCSETS2 = 0x402c542b;
+  record_tdep->ioctl_TCSETSW2 = 0x402c542c;
+  record_tdep->ioctl_TCSETSF2 = 0x402c542d;
+  record_tdep->ioctl_TIOCGPTN = 0x80045430;
+  record_tdep->ioctl_TIOCSPTLCK = 0x40045431;
+  record_tdep->ioctl_FIONCLEX = 0x5450;
+  record_tdep->ioctl_FIOCLEX = 0x5451;
+  record_tdep->ioctl_FIOASYNC = 0x5452;
+  record_tdep->ioctl_TIOCSERCONFIG = 0x5453;
+  record_tdep->ioctl_TIOCSERGWILD = 0x5454;
+  record_tdep->ioctl_TIOCSERSWILD = 0x5455;
+  record_tdep->ioctl_TIOCGLCKTRMIOS = 0x5456;
+  record_tdep->ioctl_TIOCSLCKTRMIOS = 0x5457;
+  record_tdep->ioctl_TIOCSERGSTRUCT = 0x5458;
+  record_tdep->ioctl_TIOCSERGETLSR = 0x5459;
+  record_tdep->ioctl_TIOCSERGETMULTI = 0x545a;
+  record_tdep->ioctl_TIOCSERSETMULTI = 0x545b;
+  record_tdep->ioctl_TIOCMIWAIT = 0x545c;
+  record_tdep->ioctl_TIOCGICOUNT = 0x545d;
+  record_tdep->ioctl_FIOQSIZE = 0x545e;
+}
+
 /* Set up gdbarch struct.  */
 
 static struct gdbarch *
@@ -2979,7 +7738,7 @@ s390_gdbarch_init (struct gdbarch_info i
   struct tdesc_arch_data *tdesc_data = NULL;
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
-  int tdep_abi;
+  enum s390_abi_kind tdep_abi;
   enum s390_vector_abi_kind vector_abi;
   int have_upper = 0;
   int have_linux_v1 = 0;
@@ -3218,7 +7977,10 @@ s390_gdbarch_init (struct gdbarch_info i
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
   /* Stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_breakpoint_from_pc (gdbarch, s390_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, s390_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, s390_breakpoint::bp_from_kind);
+  set_gdbarch_software_single_step (gdbarch, s390_software_single_step);
+  set_gdbarch_displaced_step_hw_singlestep (gdbarch, s390_displaced_step_hw_singlestep);
   set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue);
   set_gdbarch_stack_frame_destroyed_p (gdbarch, s390_stack_frame_destroyed_p);
 
@@ -3233,12 +7995,18 @@ s390_gdbarch_init (struct gdbarch_info i
 					    s390_iterate_over_regset_sections);
   set_gdbarch_cannot_store_register (gdbarch, s390_cannot_store_register);
   set_gdbarch_write_pc (gdbarch, s390_write_pc);
+  set_gdbarch_guess_tracepoint_registers (gdbarch, s390_guess_tracepoint_registers);
   set_gdbarch_pseudo_register_read (gdbarch, s390_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, s390_pseudo_register_write);
   set_tdesc_pseudo_register_name (gdbarch, s390_pseudo_register_name);
   set_tdesc_pseudo_register_type (gdbarch, s390_pseudo_register_type);
   set_tdesc_pseudo_register_reggroup_p (gdbarch,
 					s390_pseudo_register_reggroup_p);
+  set_gdbarch_ax_pseudo_register_collect (gdbarch,
+					  s390_ax_pseudo_register_collect);
+  set_gdbarch_ax_pseudo_register_push_stack
+      (gdbarch, s390_ax_pseudo_register_push_stack);
+  set_gdbarch_gen_return_address (gdbarch, s390_gen_return_address);
   tdesc_use_registers (gdbarch, tdesc, tdesc_data);
   set_gdbarch_register_name (gdbarch, s390_register_name);
 
@@ -3285,7 +8053,7 @@ s390_gdbarch_init (struct gdbarch_info i
 
   /* Displaced stepping.  */
   set_gdbarch_displaced_step_copy_insn (gdbarch,
-					simple_displaced_step_copy_insn);
+					s390_displaced_step_copy_insn);
   set_gdbarch_displaced_step_fixup (gdbarch, s390_displaced_step_fixup);
   set_gdbarch_displaced_step_free_closure (gdbarch,
 					   simple_displaced_step_free_closure);
@@ -3340,6 +8108,18 @@ s390_gdbarch_init (struct gdbarch_info i
   set_gdbarch_gcc_target_options (gdbarch, s390_gcc_target_options);
   set_gdbarch_gnu_triplet_regexp (gdbarch, s390_gnu_triplet_regexp);
 
+  /* Support reverse debugging.  */
+
+  set_gdbarch_process_record (gdbarch, s390_process_record);
+  set_gdbarch_process_record_signal (gdbarch, s390_linux_record_signal);
+
+  s390_init_linux_record_tdep (&s390_linux_record_tdep, ABI_LINUX_S390);
+  s390_init_linux_record_tdep (&s390x_linux_record_tdep, ABI_LINUX_ZSERIES);
+
+  set_gdbarch_disassembler_options (gdbarch, &s390_disassembler_options);
+  set_gdbarch_valid_disassembler_options (gdbarch,
+					  disassembler_options_s390 ());
+
   return gdbarch;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-tdep.h ./gdb/s390-linux-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/s390-linux-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/s390-linux-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/score-tdep.c ./gdb/score-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/score-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/score-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for the S+core architecture, for GDB,
    the GNU Debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Qinwei (qinwei@sunnorth.com.cn)
    Contributed by Ching-Peng Lin (cplin@sunplus.com)
@@ -306,69 +306,88 @@ score3_adjust_pc_and_fetch_inst (CORE_AD
   return &inst;
 }
 
-static const gdb_byte *
-score7_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			   int *lenptr)
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+score7_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  gdb_byte buf[SCORE_INSTLEN] = { 0 };
   int ret;
   unsigned int raw;
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  gdb_byte buf[SCORE_INSTLEN] = { 0 };
 
   if ((ret = target_read_memory (*pcptr & ~0x3, buf, SCORE_INSTLEN)) != 0)
     {
       error (_("Error: target_read_memory in file:%s, line:%d!"),
-             __FILE__, __LINE__);
+	     __FILE__, __LINE__);
     }
   raw = extract_unsigned_integer (buf, SCORE_INSTLEN, byte_order);
 
-  if (byte_order == BFD_ENDIAN_BIG)
+  if (!(raw & 0x80008000))
     {
-      if (!(raw & 0x80008000))
-        {
-          /* 16bits instruction.  */
-          static gdb_byte big_breakpoint16[] = { 0x60, 0x02 };
-          *pcptr &= ~0x1;
-          *lenptr = sizeof (big_breakpoint16);
-          return big_breakpoint16;
-        }
+      /* 16bits instruction.  */
+      *pcptr &= ~0x1;
+      return 2;
+    }
+  else
+    {
+      /* 32bits instruction.  */
+      *pcptr &= ~0x3;
+      return 4;
+    }
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+score7_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+  *size = kind;
+
+  if (kind == 4)
+    {
+      static gdb_byte big_breakpoint32[] = { 0x80, 0x00, 0x80, 0x06 };
+      static gdb_byte little_breakpoint32[] = { 0x06, 0x80, 0x00, 0x80 };
+
+      if (byte_order == BFD_ENDIAN_BIG)
+	return big_breakpoint32;
       else
-        {
-          /* 32bits instruction.  */
-          static gdb_byte big_breakpoint32[] = { 0x80, 0x00, 0x80, 0x06 };
-          *pcptr &= ~0x3;
-          *lenptr = sizeof (big_breakpoint32);
-          return big_breakpoint32;
-        }
+	return little_breakpoint32;
     }
   else
     {
-      if (!(raw & 0x80008000))
-        {
-          /* 16bits instruction.  */
-          static gdb_byte little_breakpoint16[] = { 0x02, 0x60 };
-          *pcptr &= ~0x1;
-          *lenptr = sizeof (little_breakpoint16);
-          return little_breakpoint16;
-        }
+      static gdb_byte big_breakpoint16[] = { 0x60, 0x02 };
+      static gdb_byte little_breakpoint16[] = { 0x02, 0x60 };
+
+      if (byte_order == BFD_ENDIAN_BIG)
+	return big_breakpoint16;
       else
-        {
-          /* 32bits instruction.  */
-          static gdb_byte little_breakpoint32[] = { 0x06, 0x80, 0x00, 0x80 };
-          *pcptr &= ~0x3;
-          *lenptr = sizeof (little_breakpoint32);
-          return little_breakpoint32;
-        }
+	return little_breakpoint16;
     }
 }
 
-static const gdb_byte *
-score3_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			   int *lenptr)
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+score3_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR adjust_pc = *pcptr; 
   int len;
+
+  score3_adjust_pc_and_fetch_inst (pcptr, &len, byte_order);
+
+  return len;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+score3_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  int index = 0;
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   static gdb_byte score_break_insns[6][6] = {
     /* The following three instructions are big endian.  */
     { 0x00, 0x20 },
@@ -379,18 +398,10 @@ score3_breakpoint_from_pc (struct gdbarc
     { 0x00, 0x80, 0x06, 0x00 },
     { 0x00, 0x80, 0x00, 0x80, 0x00, 0x00 }};
 
-  gdb_byte *p = NULL;
-  int index = 0;
-
-  score3_adjust_pc_and_fetch_inst (&adjust_pc, &len, byte_order);
+  *size = kind;
 
-  index = ((byte_order == BFD_ENDIAN_BIG) ? 0 : 3) + (len / 2 - 1);
-  p = score_break_insns[index];
-
-  *pcptr = adjust_pc;
-  *lenptr = len;
-
-  return p;
+  index = ((byte_order == BFD_ENDIAN_BIG) ? 0 : 3) + (kind / 2 - 1);
+  return score_break_insns[index];
 }
 
 static CORE_ADDR
@@ -549,12 +560,9 @@ score_push_dummy_call (struct gdbarch *g
       enum type_code typecode = TYPE_CODE (arg_type);
       const gdb_byte *val = value_contents (arg);
       int downward_offset = 0;
-      int odd_sized_struct_p;
       int arg_last_part_p = 0;
 
       arglen = TYPE_LENGTH (arg_type);
-      odd_sized_struct_p = (arglen > SCORE_REGSIZE
-                            && arglen % SCORE_REGSIZE != 0);
 
       /* If a arg should be aligned to 8 bytes (long long or double),
          the value should be put to even register numbers.  */
@@ -816,16 +824,10 @@ score7_malloc_and_get_memblock (CORE_ADD
   int ret;
   gdb_byte *memblock = NULL;
 
-  if (size < 0)
-    {
-      error (_("Error: malloc size < 0 in file:%s, line:%d!"),
-             __FILE__, __LINE__);
-      return NULL;
-    }
-  else if (size == 0)
+  if (size == 0)
     return NULL;
 
-  memblock = xmalloc (size);
+  memblock = (gdb_byte *) xmalloc (size);
   memset (memblock, 0, size);
   ret = target_read_memory (addr & ~0x3, memblock, size);
   if (ret)
@@ -1088,12 +1090,10 @@ score3_analyze_prologue (CORE_ADDR start
   int fp_offset_p = 0;
   int inst_len = 0;
 
-  CORE_ADDR prev_pc = -1;
-
   sp = get_frame_register_unsigned (this_frame, SCORE_SP_REGNUM);
   fp = get_frame_register_unsigned (this_frame, SCORE_FP_REGNUM);
 
-  for (; cur_pc < pc; prev_pc = cur_pc, cur_pc += inst_len)
+  for (; cur_pc < pc; cur_pc += inst_len)
     {
       inst_t *inst = NULL;
 
@@ -1181,7 +1181,6 @@ score3_analyze_prologue (CORE_ADDR start
               /* addi! r2, offset */
               if (pc - cur_pc >= 2)
                 {
-		  unsigned int save_v = inst->v;
 		  inst_t *inst2;
 		  
 		  cur_pc += inst->len;
@@ -1267,7 +1266,6 @@ score3_analyze_prologue (CORE_ADDR start
               /* addi r2, offset */
               if (pc - cur_pc >= 2)
                 {
-		  unsigned int save_v = inst->v;
 		  inst_t *inst2;
 		  
 		  cur_pc += inst->len;
@@ -1322,7 +1320,7 @@ score_make_prologue_cache (struct frame_
   struct score_frame_cache *cache;
 
   if ((*this_cache) != NULL)
-    return (*this_cache);
+    return (struct score_frame_cache *) (*this_cache);
 
   cache = FRAME_OBSTACK_ZALLOC (struct score_frame_cache);
   (*this_cache) = cache;
@@ -1338,15 +1336,17 @@ score_make_prologue_cache (struct frame_
       return cache;
 
     if (target_mach == bfd_mach_score3)
-      score3_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+      score3_analyze_prologue (start_addr, pc, this_frame,
+			       (struct score_frame_cache *) *this_cache);
     else
-      score7_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+      score7_analyze_prologue (start_addr, pc, this_frame,
+			       (struct score_frame_cache *) *this_cache);
   }
 
   /* Save SP.  */
   trad_frame_set_value (cache->saved_regs, SCORE_SP_REGNUM, cache->base);
 
-  return (*this_cache);
+  return (struct score_frame_cache *) (*this_cache);
 }
 
 static void
@@ -1496,7 +1496,10 @@ score_gdbarch_init (struct gdbarch_info 
   switch (target_mach)
     {
     case bfd_mach_score7:
-      set_gdbarch_breakpoint_from_pc (gdbarch, score7_breakpoint_from_pc);
+      set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+					   score7_breakpoint_kind_from_pc);
+      set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+					   score7_sw_breakpoint_from_kind);
       set_gdbarch_skip_prologue (gdbarch, score7_skip_prologue);
       set_gdbarch_stack_frame_destroyed_p (gdbarch,
 					   score7_stack_frame_destroyed_p);
@@ -1508,7 +1511,10 @@ score_gdbarch_init (struct gdbarch_info 
       break;
 
     case bfd_mach_score3:
-      set_gdbarch_breakpoint_from_pc (gdbarch, score3_breakpoint_from_pc);
+      set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+					   score3_breakpoint_kind_from_pc);
+      set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+					   score3_sw_breakpoint_from_kind);
       set_gdbarch_skip_prologue (gdbarch, score3_skip_prologue);
       set_gdbarch_stack_frame_destroyed_p (gdbarch,
 					   score3_stack_frame_destroyed_p);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/score-tdep.h ./gdb/score-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/score-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/score-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Target-dependent code for the S+core architecture, for GDB,
    the GNU Debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Qinwei (qinwei@sunnorth.com.cn)
    Contributed by Ching-Peng Lin (cplin@sunplus.com)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest-arch.c ./gdb/selftest-arch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest-arch.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/selftest-arch.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+/* GDB self-test for each gdbarch.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+
+#if GDB_SELF_TEST
+#include "selftest.h"
+#include "selftest-arch.h"
+#include "arch-utils.h"
+
+static std::vector<self_test_foreach_arch_function *> gdbarch_tests;
+
+void
+register_self_test_foreach_arch (self_test_foreach_arch_function *function)
+{
+  gdbarch_tests.push_back (function);
+}
+
+namespace selftests {
+
+static void
+tests_with_arch ()
+{
+  int failed = 0;
+
+  for (const auto &f : gdbarch_tests)
+    {
+      const char **arches = gdbarch_printable_names ();
+
+      for (int i = 0; arches[i] != NULL; i++)
+	{
+	  if (strcmp ("fr300", arches[i]) == 0)
+	    {
+	      /* PR 20946 */
+	      continue;
+	    }
+	  else if (strcmp ("powerpc:EC603e", arches[i]) == 0
+		   || strcmp ("powerpc:e500mc", arches[i]) == 0
+		   || strcmp ("powerpc:e500mc64", arches[i]) == 0
+		   || strcmp ("powerpc:titan", arches[i]) == 0
+		   || strcmp ("powerpc:vle", arches[i]) == 0
+		   || strcmp ("powerpc:e5500", arches[i]) == 0
+		   || strcmp ("powerpc:e6500", arches[i]) == 0)
+	    {
+	      /* PR 19797 */
+	      continue;
+	    }
+
+	  QUIT;
+
+	  TRY
+	    {
+	      struct gdbarch_info info;
+
+	      gdbarch_info_init (&info);
+	      info.bfd_arch_info = bfd_scan_arch (arches[i]);
+
+	      struct gdbarch *gdbarch = gdbarch_find_by_info (info);
+	      SELF_CHECK (gdbarch != NULL);
+	      f (gdbarch);
+	    }
+	  CATCH (ex, RETURN_MASK_ERROR)
+	    {
+	      ++failed;
+	      exception_fprintf (gdb_stderr, ex,
+				 _("Self test failed: arch %s: "), arches[i]);
+	    }
+	  END_CATCH
+	}
+    }
+
+  SELF_CHECK (failed == 0);
+}
+
+} // namespace selftests
+#endif /* GDB_SELF_TEST */
+
+/* Suppress warning from -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_selftests_foreach_arch;
+
+void
+_initialize_selftests_foreach_arch ()
+{
+#if GDB_SELF_TEST
+  register_self_test (selftests::tests_with_arch);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest-arch.h ./gdb/selftest-arch.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest-arch.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/selftest-arch.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+/* GDB self-test for each gdbarch.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef SELFTEST_ARCH_H
+#define SELFTEST_ARCH_H
+
+typedef void self_test_foreach_arch_function (struct gdbarch *);
+
+extern void
+  register_self_test_foreach_arch (self_test_foreach_arch_function *function);
+
+#endif /* SELFTEST_ARCH_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest.c ./gdb/selftest.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/selftest.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,60 @@
+/* GDB self-testing.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "selftest.h"
+#include <vector>
+
+/* All the tests that have been registered.  */
+
+static std::vector<self_test_function *> tests;
+
+/* See selftest.h.  */
+
+void
+register_self_test (self_test_function *function)
+{
+  tests.push_back (function);
+}
+
+/* See selftest.h.  */
+
+void
+run_self_tests (void)
+{
+  int failed = 0;
+
+  for (int i = 0; i < tests.size (); ++i)
+    {
+      QUIT;
+
+      TRY
+	{
+	  tests[i] ();
+	}
+      CATCH (ex, RETURN_MASK_ERROR)
+	{
+	  ++failed;
+	  exception_fprintf (gdb_stderr, ex, _("Self test failed: "));
+	}
+      END_CATCH
+    }
+
+  printf_filtered (_("Ran %lu unit tests, %d failed\n"),
+		   (long) tests.size (), failed);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest.h ./gdb/selftest.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/selftest.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/selftest.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+/* GDB self-testing.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef SELFTEST_H
+#define SELFTEST_H
+
+/* A test is just a function that does some checks and throws an
+   exception if something has gone wrong.  */
+
+typedef void self_test_function (void);
+
+/* Register a new self-test.  */
+
+extern void register_self_test (self_test_function *function);
+
+/* Run all the self tests.  This print a message describing the number
+   of test and the number of failures.  */
+
+extern void run_self_tests (void);
+
+/* Check that VALUE is true, and, if not, throw an exception.  */
+
+#define SELF_CHECK(VALUE)						\
+  do {									\
+    if (!(VALUE))							\
+      error (_("self-test failed at %s:%d"), __FILE__, __LINE__);	\
+  } while (0)
+
+#endif /* SELFTEST_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sentinel-frame.c ./gdb/sentinel-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sentinel-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sentinel-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code dealing with register stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,11 +46,12 @@ sentinel_frame_prev_register (struct fra
 			      void **this_prologue_cache,
 			      int regnum)
 {
-  struct frame_unwind_cache *cache = *this_prologue_cache;
+  struct frame_unwind_cache *cache
+    = (struct frame_unwind_cache *) *this_prologue_cache;
   struct value *value;
 
   value = regcache_cooked_read_value (cache->regcache, regnum);
-  VALUE_FRAME_ID (value) = get_frame_id (this_frame);
+  VALUE_NEXT_FRAME_ID (value) = sentinel_frame_id;
 
   return value;
 }
@@ -70,7 +71,8 @@ static struct gdbarch *
 sentinel_frame_prev_arch (struct frame_info *this_frame,
 			  void **this_prologue_cache)
 {
-  struct frame_unwind_cache *cache = *this_prologue_cache;
+  struct frame_unwind_cache *cache
+    = (struct frame_unwind_cache *) *this_prologue_cache;
 
   return get_regcache_arch (cache->regcache);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sentinel-frame.h ./gdb/sentinel-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sentinel-frame.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sentinel-frame.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code dealing with register stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-base.c ./gdb/ser-base.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-base.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-base.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic serial interface functions.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 #include "event-loop.h"
 
 #include "gdb_select.h"
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #ifdef USE_WIN32API
 #include <winsock2.h>
 #endif
@@ -153,7 +153,7 @@ run_async_handler_and_reschedule (struct
 static void
 fd_event (int error, void *context)
 {
-  struct serial *scb = context;
+  struct serial *scb = (struct serial *) context;
   if (error != 0)
     {
       scb->bufcnt = SERIAL_ERROR;
@@ -164,7 +164,13 @@ fd_event (int error, void *context)
          pull characters out of the buffer.  See also
          generic_readchar().  */
       int nr;
-      nr = scb->ops->read_prim (scb, BUFSIZ);
+
+      do
+	{
+	  nr = scb->ops->read_prim (scb, BUFSIZ);
+	}
+      while (nr < 0 && errno == EINTR);
+
       if (nr == 0)
 	{
 	  scb->bufcnt = SERIAL_EOF;
@@ -190,7 +196,7 @@ fd_event (int error, void *context)
 static void
 push_event (void *context)
 {
-  struct serial *scb = context;
+  struct serial *scb = (struct serial *) context;
 
   scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
   run_async_handler_and_reschedule (scb);
@@ -207,6 +213,7 @@ ser_base_wait_for (struct serial *scb, i
       int numfds;
       struct timeval tv;
       fd_set readfds, exceptfds;
+      int nfds;
 
       /* NOTE: Some OS's can scramble the READFDS when the select()
          call fails (ex the kernel with Red Hat 5.2).  Initialize all
@@ -220,10 +227,13 @@ ser_base_wait_for (struct serial *scb, i
       FD_SET (scb->fd, &readfds);
       FD_SET (scb->fd, &exceptfds);
 
+      QUIT;
+
+      nfds = scb->fd + 1;
       if (timeout >= 0)
-	numfds = gdb_select (scb->fd + 1, &readfds, 0, &exceptfds, &tv);
+	numfds = interruptible_select (nfds, &readfds, 0, &exceptfds, &tv);
       else
-	numfds = gdb_select (scb->fd + 1, &readfds, 0, &exceptfds, 0);
+	numfds = interruptible_select (nfds, &readfds, 0, &exceptfds, 0);
 
       if (numfds <= 0)
 	{
@@ -358,7 +368,11 @@ do_ser_base_readchar (struct serial *scb
   if (status < 0)
     return status;
 
-  status = scb->ops->read_prim (scb, BUFSIZ);
+  do
+    {
+      status = scb->ops->read_prim (scb, BUFSIZ);
+    }
+  while (status < 0 && errno == EINTR);
 
   if (status <= 0)
     {
@@ -440,15 +454,21 @@ ser_base_readchar (struct serial *scb, i
 int
 ser_base_write (struct serial *scb, const void *buf, size_t count)
 {
-  const char *str = buf;
+  const char *str = (const char *) buf;
   int cc;
 
   while (count > 0)
     {
+      QUIT;
+
       cc = scb->ops->write_prim (scb, str, count);
 
       if (cc < 0)
-	return 1;
+	{
+	  if (errno == EINTR)
+	    continue;
+	  return 1;
+	}
       count -= cc;
       str += cc;
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-base.h ./gdb/ser-base.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-base.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-base.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic serial interface functions.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #ifndef SER_BASE_H
 #define SER_BASE_H
 
+#include "serial.h"  /* For serial_ttystate.  */
+
 struct serial;
 struct ui_file;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-event.c ./gdb/ser-event.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-event.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ser-event.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,220 @@
+/* Serial interface for a selectable event.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "ser-event.h"
+#include "serial.h"
+#include "common/filestuff.h"
+
+/* On POSIX hosts, a serial_event is basically an abstraction for the
+   classical self-pipe trick.
+
+   On Windows, a serial_event is a wrapper around a native Windows
+   event object.  Because we want to interface with gdb_select, which
+   takes file descriptors, we need to wrap that Windows event object
+   in a file descriptor.  As _open_osfhandle can not be used with
+   event objects, we instead create a dummy file wrap that in a file
+   descriptor with _open_osfhandle, and pass that as selectable
+   descriptor to callers.  As Windows' gdb_select converts file
+   descriptors back to Windows handles by calling serial->wait_handle,
+   nothing ever actually waits on that file descriptor.  */
+
+struct serial_event_state
+  {
+#ifdef USE_WIN32API
+    /* The Windows event object, created with CreateEvent.  */
+    HANDLE event;
+#else
+    /* The write side of the pipe.  The read side is in
+       serial->fd.  */
+    int write_fd;
+#endif
+  };
+
+/* Open a new serial event.  */
+
+static int
+serial_event_open (struct serial *scb, const char *name)
+{
+  struct serial_event_state *state;
+
+  state = XNEW (struct serial_event_state);
+  scb->state = state;
+
+#ifndef USE_WIN32API
+  {
+    int fds[2];
+
+    if (gdb_pipe_cloexec (fds) == -1)
+      internal_error (__FILE__, __LINE__,
+		      "creating serial event pipe failed.");
+
+    fcntl (fds[0], F_SETFL, O_NONBLOCK);
+    fcntl (fds[1], F_SETFL, O_NONBLOCK);
+
+    scb->fd = fds[0];
+    state->write_fd = fds[1];
+  }
+#else
+  {
+    /* A dummy file object that can be wrapped in a file descriptor.
+       We don't need to store this handle because closing the file
+       descriptor automatically closes this.  */
+    HANDLE dummy_file;
+
+    /* A manual-reset event.  */
+    state->event = CreateEvent (0, TRUE, FALSE, 0);
+
+    /* The dummy file handle.  Created just so we have something
+       wrappable in a file descriptor.  */
+    dummy_file = CreateFile ("nul", 0, 0, NULL, OPEN_EXISTING, 0, NULL);
+    scb->fd = _open_osfhandle ((intptr_t) dummy_file, 0);
+  }
+#endif
+
+  return 0;
+}
+
+static void
+serial_event_close (struct serial *scb)
+{
+  struct serial_event_state *state = (struct serial_event_state *) scb->state;
+
+  close (scb->fd);
+#ifndef USE_WIN32API
+  close (state->write_fd);
+#else
+  CloseHandle (state->event);
+#endif
+
+  scb->fd = -1;
+
+  xfree (state);
+  scb->state = NULL;
+}
+
+#ifdef USE_WIN32API
+
+/* Implementation of the wait_handle method.  Returns the native
+   Windows event object handle.  */
+
+static void
+serial_event_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
+{
+  struct serial_event_state *state = (struct serial_event_state *) scb->state;
+
+  *read = state->event;
+}
+
+#endif
+
+/* The serial_ops for struct serial_event objects.  Note we never
+   register this serial type with serial_add_interface, because this
+   is internal implementation detail never to be used by remote
+   targets for protocol transport.  */
+
+static const struct serial_ops serial_event_ops =
+{
+  "event",
+  serial_event_open,
+  serial_event_close,
+  NULL, /* fdopen */
+  NULL, /* readchar */
+  NULL, /* write */
+  NULL, /* flush_output */
+  NULL, /* flush_input */
+  NULL, /* send_break */
+  NULL, /* go_raw */
+  NULL, /* get_tty_state */
+  NULL, /* copy_tty_state */
+  NULL, /* set_tty_state */
+  NULL, /* print_tty_state */
+  NULL, /* noflush_set_tty_state */
+  NULL, /* setbaudrate */
+  NULL, /* setstopbits */
+  NULL, /* setparity */
+  NULL, /* drain_output */
+  NULL, /* async */
+  NULL, /* read_prim */
+  NULL, /* write_prim */
+  NULL, /* avail */
+#ifdef USE_WIN32API
+  serial_event_wait_handle,
+#endif
+};
+
+/* See ser-event.h.  */
+
+struct serial_event *
+make_serial_event (void)
+{
+  return (struct serial_event *) serial_open_ops (&serial_event_ops);
+}
+
+/* See ser-event.h.  */
+
+int
+serial_event_fd (struct serial_event *event)
+{
+  struct serial *ser = (struct serial *) event;
+
+  return ser->fd;
+}
+
+/* See ser-event.h.  */
+
+void
+serial_event_set (struct serial_event *event)
+{
+  struct serial *ser = (struct serial *) event;
+  struct serial_event_state *state = (struct serial_event_state *) ser->state;
+#ifndef USE_WIN32API
+  int r;
+  char c = '+';		/* Anything.  */
+
+  do
+    {
+      r = write (state->write_fd, &c, 1);
+    }
+  while (r < 0 && errno == EINTR);
+#else
+  SetEvent (state->event);
+#endif
+}
+
+/* See ser-event.h.  */
+
+void
+serial_event_clear (struct serial_event *event)
+{
+  struct serial *ser = (struct serial *) event;
+  struct serial_event_state *state = (struct serial_event_state *) ser->state;
+#ifndef USE_WIN32API
+  int r;
+
+  do
+    {
+      char c;
+
+      r = read (ser->fd, &c, 1);
+    }
+  while (r > 0 || (r < 0 && errno == EINTR));
+#else
+  ResetEvent (state->event);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-event.h ./gdb/ser-event.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-event.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/ser-event.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,51 @@
+/* Serial interface for a selectable event.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef SER_EVENT_H
+#define SER_EVENT_H
+
+/* This is used to be able to signal the event loop (or any other
+   select/poll) of events, in a race-free manner.
+
+   For example, a signal handler can defer non-async-signal-safe work
+   to the event loop, by having the signal handler set a struct
+   serial_event object, and having the event loop wait for that same
+   object to the readable.  Once readable, the event loop breaks out
+   of select/poll and calls a registered callback that does the
+   deferred work.  */
+
+struct serial_event;
+
+/* Make a new serial_event object.  */
+struct serial_event *make_serial_event (void);
+
+/* Return the FD that can be used by select/poll to wait for the
+   event.  The only valid operation on this object is to wait until it
+   is readable.  */
+extern int serial_event_fd (struct serial_event *event);
+
+/* Set the event.  This signals the file descriptor returned by
+   serial_event_fd as readable.  */
+extern void serial_event_set (struct serial_event *event);
+
+/* Clear the event.  The file descriptor returned by serial_event_fd
+   is not longer readable after this, until a new serial_event_set
+   call is made.  */
+extern void serial_event_clear (struct serial_event *event);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-go32.c ./gdb/ser-go32.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-go32.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-go32.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote serial interface for local (hardwired) serial ports for GO32.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
 
@@ -593,9 +593,26 @@ dos_close (struct serial *scb)
 }
 
 
+/* Implementation of the serial_ops flush_output method.  */
 
 static int
-dos_noop (struct serial *scb)
+dos_flush_output (struct serial *scb)
+{
+  return 0;
+}
+
+/* Implementation of the serial_ops setparity method.  */
+
+static int
+dos_setparity (struct serial *scb, int parity)
+{
+  return 0;
+}
+
+/* Implementation of the serial_ops drain_output method.  */
+
+static int
+dos_drain_output (struct serial *scb)
 {
   return 0;
 }
@@ -616,6 +633,8 @@ dos_readchar (struct serial *scb, int ti
   then = rawclock () + (timeout * RAWHZ);
   while ((c = dos_getc (port)) < 0)
     {
+      QUIT;
+
       if (timeout >= 0 && (rawclock () - then) >= 0)
 	return SERIAL_TIMEOUT;
     }
@@ -643,7 +662,7 @@ dos_get_tty_state (struct serial *scb)
 	return NULL;
     }
 
-  state = (struct dos_ttystate *) xmalloc (sizeof *state);
+  state = XNEW (struct dos_ttystate);
   *state = *port;
   return (serial_ttystate) state;
 }
@@ -653,7 +672,7 @@ dos_copy_tty_state (struct serial *scb, 
 {
   struct dos_ttystate *state;
 
-  state = (struct dos_ttystate *) xmalloc (sizeof *state);
+  state = XNEW (struct dos_ttystate);
   *state = *(struct dos_ttystate *) ttystate;
 
   return (serial_ttystate) state;
@@ -790,10 +809,12 @@ dos_write (struct serial *scb, const voi
   size_t fifosize = port->fifo ? 16 : 1;
   long then;
   size_t cnt;
-  const char *str = buf;
+  const char *str = (const char *) buf;
 
   while (count > 0)
     {
+      QUIT;
+
       /* Send the data, fifosize bytes at a time.  */
       cnt = fifosize > count ? count : fifosize;
       port->txbusy = 1;
@@ -853,7 +874,7 @@ static const struct serial_ops dos_ops =
   NULL,				/* fdopen, not implemented */
   dos_readchar,
   dos_write,
-  dos_noop,			/* flush output */
+  dos_flush_output,
   dos_flush_input,
   dos_sendbreak,
   dos_raw,
@@ -864,8 +885,8 @@ static const struct serial_ops dos_ops =
   dos_noflush_set_tty_state,
   dos_setbaudrate,
   dos_setstopbits,
-  dos_noop,
-  dos_noop,			/* Wait for output to drain.  */
+  dos_setparity,
+  dos_drain_output,
   (void (*)(struct serial *, int))NULL	/* Change into async mode.  */
 };
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/serial.c ./gdb/serial.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/serial.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/serial.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic serial interface routines
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -179,6 +179,27 @@ serial_for_fd (int fd)
   return NULL;
 }
 
+/* Create a new serial for OPS.  */
+
+static struct serial *
+new_serial (const struct serial_ops *ops)
+{
+  struct serial *scb;
+
+  scb = XCNEW (struct serial);
+
+  scb->ops = ops;
+
+  scb->bufp = scb->buf;
+  scb->error_fd = -1;
+  scb->refcnt = 1;
+
+  return scb;
+}
+
+static struct serial *serial_open_ops_1 (const struct serial_ops *ops,
+					 const char *open_name);
+
 /* Open up a device or a network socket, depending upon the syntax of NAME.  */
 
 struct serial *
@@ -188,11 +209,7 @@ serial_open (const char *name)
   const struct serial_ops *ops;
   const char *open_name = name;
 
-  if (strcmp (name, "pc") == 0)
-    ops = serial_interface_lookup ("pc");
-  else if (startswith (name, "lpt"))
-    ops = serial_interface_lookup ("parallel");
-  else if (startswith (name, "|"))
+  if (startswith (name, "|"))
     {
       ops = serial_interface_lookup ("pipe");
       /* Discard ``|'' and any space before the command itself.  */
@@ -210,14 +227,17 @@ serial_open (const char *name)
   if (!ops)
     return NULL;
 
-  scb = XNEW (struct serial);
+  return serial_open_ops_1 (ops, open_name);
+}
 
-  scb->ops = ops;
+/* Open up a serial for OPS, passing OPEN_NAME to the open method.  */
 
-  scb->bufcnt = 0;
-  scb->bufp = scb->buf;
-  scb->error_fd = -1;
-  scb->refcnt = 1;
+static struct serial *
+serial_open_ops_1 (const struct serial_ops *ops, const char *open_name)
+{
+  struct serial *scb;
+
+  scb = new_serial (ops);
 
   /* `...->open (...)' would get expanded by the open(2) syscall macro.  */
   if ((*scb->ops->open) (scb, open_name))
@@ -226,24 +246,30 @@ serial_open (const char *name)
       return NULL;
     }
 
-  scb->name = xstrdup (name);
   scb->next = scb_base;
-  scb->debug_p = 0;
-  scb->async_state = 0;
-  scb->async_handler = NULL;
-  scb->async_context = NULL;
   scb_base = scb;
 
   if (serial_logfile != NULL)
     {
-      serial_logfp = gdb_fopen (serial_logfile, "w");
-      if (serial_logfp == NULL)
+      stdio_file_up file (new stdio_file ());
+
+      if (!file->open (serial_logfile, "w"))
 	perror_with_name (serial_logfile);
+
+      serial_logfp = file.release ();
     }
 
   return scb;
 }
 
+/* See serial.h.  */
+
+struct serial *
+serial_open_ops (const struct serial_ops *ops)
+{
+  return serial_open_ops_1 (ops, NULL);
+}
+
 /* Open a new serial stream using a file handle, using serial
    interface ops OPS.  */
 
@@ -262,21 +288,9 @@ serial_fdopen_ops (const int fd, const s
   if (!ops)
     return NULL;
 
-  scb = XCNEW (struct serial);
-
-  scb->ops = ops;
-
-  scb->bufcnt = 0;
-  scb->bufp = scb->buf;
-  scb->error_fd = -1;
-  scb->refcnt = 1;
+  scb = new_serial (ops);
 
-  scb->name = NULL;
   scb->next = scb_base;
-  scb->debug_p = 0;
-  scb->async_state = 0;
-  scb->async_handler = NULL;
-  scb->async_context = NULL;
   scb_base = scb;
 
   if ((ops->fdopen) != NULL)
@@ -304,7 +318,7 @@ do_serial_close (struct serial *scb, int
       serial_current_type = 0;
 
       /* XXX - What if serial_logfp == gdb_stdout or gdb_stderr?  */
-      ui_file_delete (serial_logfp);
+      delete serial_logfp;
       serial_logfp = NULL;
     }
 
@@ -315,9 +329,6 @@ do_serial_close (struct serial *scb, int
   if (really_close)
     scb->ops->close (scb);
 
-  if (scb->name)
-    xfree (scb->name);
-
   /* For serial_is_open.  */
   scb->bufp = NULL;
 
@@ -404,7 +415,7 @@ serial_write (struct serial *scb, const 
 {
   if (serial_logfp != NULL)
     {
-      const char *str = buf;
+      const char *str = (const char *) buf;
       size_t c;
 
       for (c = 0; c < count; c++)
@@ -416,7 +427,7 @@ serial_write (struct serial *scb, const 
     }
   if (serial_debug_p (scb))
     {
-      const char *str = buf;
+      const char *str = (const char *) buf;
       size_t c;
 
       for (c = 0; c < count; c++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/serial.h ./gdb/serial.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/serial.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/serial.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote serial support interface definitions for GDB, the GNU Debugger.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,6 +34,9 @@ struct ui_file;
 
 typedef void *serial_ttystate;
 struct serial;
+struct serial_ops;
+
+/* Create a new serial for OPS.  The new serial is not opened.  */
 
 /* Try to open NAME.  Returns a new `struct serial *' on success, NULL
    on failure.  The new serial object has a reference count of 1.
@@ -44,6 +47,10 @@ struct serial;
 
 extern struct serial *serial_open (const char *name);
 
+/* Open a new serial stream using OPS.  */
+
+extern struct serial *serial_open_ops (const struct serial_ops *ops);
+
 /* Returns true if SCB is open.  */
 
 extern int serial_is_open (struct serial *scb);
@@ -68,8 +75,8 @@ extern void serial_ref (struct serial *s
 
 extern void serial_unref (struct serial *scb);
 
-/* Create a pipe, and put the read end in files[0], and the write end
-   in filde[1].  Returns 0 for success, negative value for error (in
+/* Create a pipe, and put the read end in FILDES[0], and the write end
+   in FILDES[1].  Returns 0 for success, negative value for error (in
    which case errno contains the error).  */
 
 extern int gdb_pipe (int fildes[2]);
@@ -248,7 +255,6 @@ struct serial
     int timeout_remaining;	/* (ser-unix.c termio{,s} only), we
 				   still need to wait for this many
 				   more seconds.  */
-    char *name;			/* The name of the device or host */
     struct serial *next;	/* Pointer to the next `struct serial *' */
     int debug_p;		/* Trace this serial devices operation.  */
     int async_state;		/* Async internal state.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-mingw.c ./gdb/ser-mingw.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-mingw.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-mingw.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Serial interface for local (hardwired) serial ports on Windows systems
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,7 +44,8 @@ struct ser_windows_state
 /* CancelIo is not available for Windows 95 OS, so we need to use
    LoadLibrary/GetProcAddress to avoid a startup failure.  */
 #define CancelIo dyn_CancelIo
-static BOOL WINAPI (*CancelIo) (HANDLE);
+typedef BOOL WINAPI (CancelIo_ftype) (HANDLE);
+static CancelIo_ftype *CancelIo;
 
 /* Open up a real live device for serial I/O.  */
 
@@ -87,8 +88,7 @@ ser_windows_open (struct serial *scb, co
       return -1;
     }
 
-  state = xmalloc (sizeof (struct ser_windows_state));
-  memset (state, 0, sizeof (struct ser_windows_state));
+  state = XCNEW (struct ser_windows_state);
   scb->state = state;
 
   /* Create a manual reset event to watch the input buffer.  */
@@ -255,7 +255,7 @@ ser_windows_close (struct serial *scb)
      by calling close (scb->fd) below.  */
   if (CancelIo)
     CancelIo ((HANDLE) _get_osfhandle (scb->fd));
-  state = scb->state;
+  state = (struct ser_windows_state *) scb->state;
   CloseHandle (state->ov.hEvent);
   CloseHandle (state->except_event);
 
@@ -276,7 +276,7 @@ ser_windows_wait_handle (struct serial *
   DWORD errors;
   HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
 
-  state = scb->state;
+  state = (struct ser_windows_state *) scb->state;
 
   *except = state->except_event;
   *read = state->ov.hEvent;
@@ -329,7 +329,7 @@ ser_windows_read_prim (struct serial *sc
   HANDLE h;
   gdb_byte *p;
 
-  state = scb->state;
+  state = (struct ser_windows_state *) scb->state;
   if (state->in_progress)
     {
       WaitForSingleObject (state->ov.hEvent, INFINITE);
@@ -533,12 +533,12 @@ stop_select_thread (struct ser_console_s
 static DWORD WINAPI
 console_select_thread (void *arg)
 {
-  struct serial *scb = arg;
+  struct serial *scb = (struct serial *) arg;
   struct ser_console_state *state;
   int event_index;
   HANDLE h;
 
-  state = scb->state;
+  state = (struct ser_console_state *) scb->state;
   h = (HANDLE) _get_osfhandle (scb->fd);
 
   while (1)
@@ -636,12 +636,12 @@ fd_is_file (int fd)
 static DWORD WINAPI
 pipe_select_thread (void *arg)
 {
-  struct serial *scb = arg;
+  struct serial *scb = (struct serial *) arg;
   struct ser_console_state *state;
   int event_index;
   HANDLE h;
 
-  state = scb->state;
+  state = (struct ser_console_state *) scb->state;
   h = (HANDLE) _get_osfhandle (scb->fd);
 
   while (1)
@@ -679,12 +679,12 @@ pipe_select_thread (void *arg)
 static DWORD WINAPI
 file_select_thread (void *arg)
 {
-  struct serial *scb = arg;
+  struct serial *scb = (struct serial *) arg;
   struct ser_console_state *state;
   int event_index;
   HANDLE h;
 
-  state = scb->state;
+  state = (struct ser_console_state *) scb->state;
   h = (HANDLE) _get_osfhandle (scb->fd);
 
   while (1)
@@ -705,7 +705,7 @@ file_select_thread (void *arg)
 static void
 ser_console_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
 {
-  struct ser_console_state *state = scb->state;
+  struct ser_console_state *state = (struct ser_console_state *) scb->state;
 
   if (state == NULL)
     {
@@ -720,8 +720,7 @@ ser_console_wait_handle (struct serial *
 	  return;
 	}
 
-      state = xmalloc (sizeof (struct ser_console_state));
-      memset (state, 0, sizeof (struct ser_console_state));
+      state = XCNEW (struct ser_console_state);
       scb->state = state;
 
       if (is_tty)
@@ -760,7 +759,7 @@ ser_console_wait_handle (struct serial *
 static void
 ser_console_done_wait_handle (struct serial *scb)
 {
-  struct ser_console_state *state = scb->state;
+  struct ser_console_state *state = (struct ser_console_state *) scb->state;
 
   if (state == NULL)
     return;
@@ -771,7 +770,7 @@ ser_console_done_wait_handle (struct ser
 static void
 ser_console_close (struct serial *scb)
 {
-  struct ser_console_state *state = scb->state;
+  struct ser_console_state *state = (struct ser_console_state *) scb->state;
 
   if (scb->state)
     {
@@ -792,7 +791,7 @@ ser_console_get_tty_state (struct serial
     {
       struct ser_console_ttystate *state;
 
-      state = (struct ser_console_ttystate *) xmalloc (sizeof *state);
+      state = XNEW (struct ser_console_ttystate);
       state->is_a_tty = 1;
       return state;
     }
@@ -817,9 +816,8 @@ struct pipe_state
 static struct pipe_state *
 make_pipe_state (void)
 {
-  struct pipe_state *ps = XNEW (struct pipe_state);
+  struct pipe_state *ps = XCNEW (struct pipe_state);
 
-  memset (ps, 0, sizeof (*ps));
   ps->wait.read_event = INVALID_HANDLE_VALUE;
   ps->wait.except_event = INVALID_HANDLE_VALUE;
   ps->wait.start_select = INVALID_HANDLE_VALUE;
@@ -857,7 +855,7 @@ free_pipe_state (struct pipe_state *ps)
 static void
 cleanup_pipe_state (void *untyped)
 {
-  struct pipe_state *ps = untyped;
+  struct pipe_state *ps = (struct pipe_state *) untyped;
 
   free_pipe_state (ps);
 }
@@ -960,7 +958,7 @@ pipe_windows_fdopen (struct serial *scb,
 static void
 pipe_windows_close (struct serial *scb)
 {
-  struct pipe_state *ps = scb->state;
+  struct pipe_state *ps = (struct pipe_state *) scb->state;
 
   /* In theory, we should try to kill the subprocess here, but the pex
      interface doesn't give us enough information to do that.  Usually
@@ -996,7 +994,7 @@ pipe_windows_read (struct serial *scb, s
 static int
 pipe_windows_write (struct serial *scb, const void *buf, size_t count)
 {
-  struct pipe_state *ps = scb->state;
+  struct pipe_state *ps = (struct pipe_state *) scb->state;
   HANDLE pipeline_in;
   DWORD written;
 
@@ -1018,7 +1016,7 @@ pipe_windows_write (struct serial *scb, 
 static void
 pipe_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
 {
-  struct pipe_state *ps = scb->state;
+  struct pipe_state *ps = (struct pipe_state *) scb->state;
 
   /* Have we allocated our events yet?  */
   if (ps->wait.read_event == INVALID_HANDLE_VALUE)
@@ -1039,7 +1037,7 @@ pipe_wait_handle (struct serial *scb, HA
 static void
 pipe_done_wait_handle (struct serial *scb)
 {
-  struct pipe_state *ps = scb->state;
+  struct pipe_state *ps = (struct pipe_state *) scb->state;
 
   /* Have we allocated our events yet?  */
   if (ps->wait.read_event == INVALID_HANDLE_VALUE)
@@ -1083,7 +1081,7 @@ struct net_windows_state
 static int
 net_windows_socket_check_pending (struct serial *scb)
 {
-  struct net_windows_state *state = scb->state;
+  struct net_windows_state *state = (struct net_windows_state *) scb->state;
   unsigned long available;
 
   if (ioctlsocket (scb->fd, FIONREAD, &available) != 0)
@@ -1104,11 +1102,11 @@ net_windows_socket_check_pending (struct
 static DWORD WINAPI
 net_windows_select_thread (void *arg)
 {
-  struct serial *scb = arg;
+  struct serial *scb = (struct serial *) arg;
   struct net_windows_state *state;
   int event_index;
 
-  state = scb->state;
+  state = (struct net_windows_state *) scb->state;
 
   while (1)
     {
@@ -1173,7 +1171,7 @@ net_windows_select_thread (void *arg)
 static void
 net_windows_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
 {
-  struct net_windows_state *state = scb->state;
+  struct net_windows_state *state = (struct net_windows_state *) scb->state;
 
   /* Start from a clean slate.  */
   ResetEvent (state->base.read_event);
@@ -1192,7 +1190,7 @@ net_windows_wait_handle (struct serial *
 static void
 net_windows_done_wait_handle (struct serial *scb)
 {
-  struct net_windows_state *state = scb->state;
+  struct net_windows_state *state = (struct net_windows_state *) scb->state;
 
   stop_select_thread (&state->base);
 }
@@ -1208,8 +1206,7 @@ net_windows_open (struct serial *scb, co
   if (ret != 0)
     return ret;
 
-  state = xmalloc (sizeof (struct net_windows_state));
-  memset (state, 0, sizeof (struct net_windows_state));
+  state = XCNEW (struct net_windows_state);
   scb->state = state;
 
   /* Associate an event with the socket.  */
@@ -1226,7 +1223,7 @@ net_windows_open (struct serial *scb, co
 static void
 net_windows_close (struct serial *scb)
 {
-  struct net_windows_state *state = scb->state;
+  struct net_windows_state *state = (struct net_windows_state *) scb->state;
 
   destroy_select_thread (&state->base);
   CloseHandle (state->sock_event);
@@ -1374,7 +1371,7 @@ _initialize_ser_windows (void)
   hm = LoadLibrary ("kernel32.dll");
   if (hm)
     {
-      CancelIo = (void *) GetProcAddress (hm, "CancelIo");
+      CancelIo = (CancelIo_ftype *) GetProcAddress (hm, "CancelIo");
       FreeLibrary (hm);
     }
   else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-pipe.c ./gdb/ser-pipe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-pipe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-pipe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Serial interface for a pipe to a separate program
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
 
@@ -27,7 +27,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #include <fcntl.h>
 #include "filestuff.h"
 
@@ -148,7 +148,7 @@ pipe_open (struct serial *scb, const cha
 static void
 pipe_close (struct serial *scb)
 {
-  struct pipe_state *state = scb->state;
+  struct pipe_state *state = (struct pipe_state *) scb->state;
 
   close (scb->fd);
   scb->fd = -1;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-tcp.c ./gdb/ser-tcp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-tcp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-tcp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Serial interface for raw TCP connections on Un*x like systems.
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,7 +35,7 @@
 #include <sys/ioctl.h>  /* For FIONBIO.  */
 #endif
 
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 #ifdef USE_WIN32API
 #include <winsock2.h>
@@ -54,6 +54,7 @@
 
 #include <signal.h>
 #include "gdb_select.h"
+#include <algorithm>
 
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
@@ -155,7 +156,8 @@ wait_for_connect (struct serial *scb, un
 int
 net_open (struct serial *scb, const char *name)
 {
-  char *port_str, hostname[100];
+  char hostname[100];
+  const char *port_str;
   int n, port, tmp;
   int use_udp;
   struct hostent *hostent;
@@ -182,7 +184,7 @@ net_open (struct serial *scb, const char
     error (_("net_open: No colon in host name!"));  /* Shouldn't ever
 						       happen.  */
 
-  tmp = min (port_str - name, (int) sizeof hostname - 1);
+  tmp = std::min (port_str - name, (ptrdiff_t) sizeof hostname - 1);
   strncpy (hostname, name, tmp);	/* Don't want colon.  */
   hostname[tmp] = '\000';	/* Tie off host name.  */
   port = atoi (port_str + 1);
@@ -279,10 +281,10 @@ net_open (struct serial *scb, const char
 
     len = sizeof (err);
     /* On Windows, the fourth parameter to getsockopt is a "char *";
-       on UNIX systems it is generally "void *".  The cast to "void *"
-       is OK everywhere, since in C "void *" can be implicitly
-       converted to any pointer type.  */
-    res = getsockopt (scb->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len);
+       on UNIX systems it is generally "void *".  The cast to "char *"
+       is OK everywhere, since in C++ any data pointer type can be
+       implicitly converted to "void *".  */
+    res = getsockopt (scb->fd, SOL_SOCKET, SO_ERROR, (char *) &err, &len);
     if (res < 0 || err)
       {
 	/* Maybe the target still isn't ready to accept the connection.  */
@@ -341,13 +343,17 @@ net_read_prim (struct serial *scb, size_
   /* Need to cast to silence -Wpointer-sign on MinGW, as Winsock's
      'recv' takes 'char *' as second argument, while 'scb->buf' is
      'unsigned char *'.  */
-  return recv (scb->fd, (void *) scb->buf, count, 0);
+  return recv (scb->fd, (char *) scb->buf, count, 0);
 }
 
 int
 net_write_prim (struct serial *scb, const void *buf, size_t count)
 {
-  return send (scb->fd, buf, count, 0);
+  /* On Windows, the second parameter to send is a "const char *"; on
+     UNIX systems it is generally "const void *".  The cast to "const
+     char *" is OK everywhere, since in C++ any data pointer type can
+     be implicitly converted to "const void *".  */
+  return send (scb->fd, (const char *) buf, count, 0);
 }
 
 int
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-tcp.h ./gdb/ser-tcp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-tcp.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-tcp.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Serial interface for raw TCP connections on Un*x like systems.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-unix.c ./gdb/ser-unix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-unix.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-unix.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Serial interface for local (hardwired) serial ports on Un*x like systems
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,7 +26,7 @@
 #include <sys/types.h>
 #include "terminal.h"
 #include <sys/socket.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 #include "gdb_select.h"
 #include "gdbcmd.h"
@@ -178,9 +178,7 @@ set_tty_state (struct serial *scb, struc
 static serial_ttystate
 hardwire_get_tty_state (struct serial *scb)
 {
-  struct hardwire_ttystate *state;
-
-  state = (struct hardwire_ttystate *) xmalloc (sizeof *state);
+  struct hardwire_ttystate *state = XNEW (struct hardwire_ttystate);
 
   if (get_tty_state (scb, state))
     {
@@ -194,9 +192,8 @@ hardwire_get_tty_state (struct serial *s
 static serial_ttystate
 hardwire_copy_tty_state (struct serial *scb, serial_ttystate ttystate)
 {
-  struct hardwire_ttystate *state;
+  struct hardwire_ttystate *state = XNEW (struct hardwire_ttystate);
 
-  state = (struct hardwire_ttystate *) xmalloc (sizeof *state);
   *state = *(struct hardwire_ttystate *) ttystate;
 
   return (serial_ttystate) state;
@@ -452,10 +449,7 @@ hardwire_raw (struct serial *scb)
 }
 
 /* Wait for input on scb, with timeout seconds.  Returns 0 on success,
-   otherwise SERIAL_TIMEOUT or SERIAL_ERROR.
-
-   For termio{s}, we actually just setup VTIME if necessary, and let the
-   timeout occur in the read() in hardwire_read().  */
+   otherwise SERIAL_TIMEOUT or SERIAL_ERROR.  */
 
 /* FIXME: cagney/1999-09-16: Don't replace this with the equivalent
    ser_base*() until the old TERMIOS/SGTTY/... timer code has been
@@ -469,7 +463,6 @@ hardwire_raw (struct serial *scb)
 static int
 wait_for (struct serial *scb, int timeout)
 {
-#ifdef HAVE_SGTTY
   while (1)
     {
       struct timeval tv;
@@ -486,92 +479,22 @@ wait_for (struct serial *scb, int timeou
       FD_ZERO (&readfds);
       FD_SET (scb->fd, &readfds);
 
+      QUIT;
+
       if (timeout >= 0)
-	numfds = gdb_select (scb->fd + 1, &readfds, 0, 0, &tv);
+	numfds = interruptible_select (scb->fd + 1, &readfds, 0, 0, &tv);
       else
-	numfds = gdb_select (scb->fd + 1, &readfds, 0, 0, 0);
+	numfds = interruptible_select (scb->fd + 1, &readfds, 0, 0, 0);
 
-      if (numfds <= 0)
-	if (numfds == 0)
-	  return SERIAL_TIMEOUT;
-	else if (errno == EINTR)
-	  continue;
-	else
-	  return SERIAL_ERROR;	/* Got an error from select or poll.  */
+      if (numfds == -1 && errno == EINTR)
+	continue;
+      else if (numfds == -1)
+	return SERIAL_ERROR;
+      else if (numfds == 0)
+	return SERIAL_TIMEOUT;
 
       return 0;
     }
-#endif /* HAVE_SGTTY */
-
-#if defined HAVE_TERMIO || defined HAVE_TERMIOS
-  if (timeout == scb->current_timeout)
-    return 0;
-
-  scb->current_timeout = timeout;
-
-  {
-    struct hardwire_ttystate state;
-
-    if (get_tty_state (scb, &state))
-      fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n",
-			  safe_strerror (errno));
-
-#ifdef HAVE_TERMIOS
-    if (timeout < 0)
-      {
-	/* No timeout.  */
-	state.termios.c_cc[VTIME] = 0;
-	state.termios.c_cc[VMIN] = 1;
-      }
-    else
-      {
-	state.termios.c_cc[VMIN] = 0;
-	state.termios.c_cc[VTIME] = timeout * 10;
-	if (state.termios.c_cc[VTIME] != timeout * 10)
-	  {
-
-	    /* If c_cc is an 8-bit signed character, we can't go 
-	       bigger than this.  If it is always unsigned, we could use
-	       25.  */
-
-	    scb->current_timeout = 12;
-	    state.termios.c_cc[VTIME] = scb->current_timeout * 10;
-	    scb->timeout_remaining = timeout - scb->current_timeout;
-	  }
-      }
-#endif
-
-#ifdef HAVE_TERMIO
-    if (timeout < 0)
-      {
-	/* No timeout.  */
-	state.termio.c_cc[VTIME] = 0;
-	state.termio.c_cc[VMIN] = 1;
-      }
-    else
-      {
-	state.termio.c_cc[VMIN] = 0;
-	state.termio.c_cc[VTIME] = timeout * 10;
-	if (state.termio.c_cc[VTIME] != timeout * 10)
-	  {
-	    /* If c_cc is an 8-bit signed character, we can't go 
-	       bigger than this.  If it is always unsigned, we could use
-	       25.  */
-
-	    scb->current_timeout = 12;
-	    state.termio.c_cc[VTIME] = scb->current_timeout * 10;
-	    scb->timeout_remaining = timeout - scb->current_timeout;
-	  }
-      }
-#endif
-
-    if (set_tty_state (scb, &state))
-      fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n",
-			  safe_strerror (errno));
-
-    return 0;
-  }
-#endif /* HAVE_TERMIO || HAVE_TERMIOS */
 }
 
 /* Read a character with user-specified timeout.  TIMEOUT is number of
@@ -1005,21 +928,11 @@ when debugging using remote targets."),
 int
 ser_unix_read_prim (struct serial *scb, size_t count)
 {
-  int status;
-
-  while (1)
-    {
-      status = read (scb->fd, scb->buf, count);
-      if (status != -1 || errno != EINTR)
-	break;
-    }
-  return status;
+  return read (scb->fd, scb->buf, count);
 }
 
 int
 ser_unix_write_prim (struct serial *scb, const void *buf, size_t len)
 {
-  /* ??? Historically, GDB has not retried calls to "write" that
-     result in EINTR.  */
   return write (scb->fd, buf, len);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-unix.h ./gdb/ser-unix.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ser-unix.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/ser-unix.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Serial interface for UN*X file-descriptor based connection.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh64-tdep.c ./gdb/sh64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sh64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Renesas Super-H, for GDB.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,6 +45,7 @@
 #include "gdb/sim-sh.h"
 #include "language.h"
 #include "sh64-tdep.h"
+#include <algorithm>
 
 /* Information that is dependent on the processor variant.  */
 enum sh_abi
@@ -252,11 +253,24 @@ pc_is_isa32 (bfd_vma memaddr)
     return 0;
 }
 
-static const unsigned char *
-sh64_breakpoint_from_pc (struct gdbarch *gdbarch,
-			 CORE_ADDR *pcptr, int *lenptr)
+static int
+sh64_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 {
-  /* The BRK instruction for shmedia is 
+  if (pc_is_isa32 (*pcptr))
+    {
+      *pcptr = UNMAKE_ISA32_ADDR (*pcptr);
+      return 4;
+    }
+  else
+    return 2;
+}
+
+static const gdb_byte *
+sh64_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  *size = kind;
+
+  /* The BRK instruction for shmedia is
      01101111 11110101 11111111 11110000
      which translates in big endian mode to 0x6f, 0xf5, 0xff, 0xf0
      and in little endian mode to 0xf0, 0xff, 0xf5, 0x6f */
@@ -266,41 +280,29 @@ sh64_breakpoint_from_pc (struct gdbarch 
      which translates in big endian mode to 0x0, 0x3b
      and in little endian mode to 0x3b, 0x0 */
 
-  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+  if (kind == 4)
     {
-      if (pc_is_isa32 (*pcptr))
-	{
-	  static unsigned char big_breakpoint_media[] = {
-	    0x6f, 0xf5, 0xff, 0xf0
-	  };
-	  *pcptr = UNMAKE_ISA32_ADDR (*pcptr);
-	  *lenptr = sizeof (big_breakpoint_media);
-	  return big_breakpoint_media;
-	}
+      static unsigned char big_breakpoint_media[] = {
+	0x6f, 0xf5, 0xff, 0xf0
+      };
+      static unsigned char little_breakpoint_media[] = {
+	0xf0, 0xff, 0xf5, 0x6f
+      };
+
+      if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	return big_breakpoint_media;
       else
-	{
-	  static unsigned char big_breakpoint_compact[] = {0x0, 0x3b};
-	  *lenptr = sizeof (big_breakpoint_compact);
-	  return big_breakpoint_compact;
-	}
+	return little_breakpoint_media;
     }
   else
     {
-      if (pc_is_isa32 (*pcptr))
-	{
-	  static unsigned char little_breakpoint_media[] = {
-	    0xf0, 0xff, 0xf5, 0x6f
-	  };
-	  *pcptr = UNMAKE_ISA32_ADDR (*pcptr);
-	  *lenptr = sizeof (little_breakpoint_media);
-	  return little_breakpoint_media;
-	}
+      static unsigned char big_breakpoint_compact[] = {0x0, 0x3b};
+      static unsigned char little_breakpoint_compact[] = {0x3b, 0x0};
+
+      if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+	return big_breakpoint_compact;
       else
-	{
-	  static unsigned char little_breakpoint_compact[] = {0x3b, 0x0};
-	  *lenptr = sizeof (little_breakpoint_compact);
-	  return little_breakpoint_compact;
-	}
+	return little_breakpoint_compact;
     }
 }
 
@@ -685,7 +687,7 @@ sh64_skip_prologue (struct gdbarch *gdba
   /* If after_prologue returned a useful address, then use it.  Else
      fall back on the instruction skipping code.  */
   if (post_prologue_pc != 0)
-    return max (pc, post_prologue_pc);
+    return std::max (pc, post_prologue_pc);
   else
     return sh64_skip_prologue_hard_way (gdbarch, pc);
 }
@@ -861,9 +863,6 @@ sh64_analyze_prologue (struct gdbarch *g
   int insn;
   int r0_val = 0;
   int insn_size;
-  int gdb_register_number;
-  int register_number;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   
   cache->sp_offset = 0;
@@ -904,8 +903,11 @@ sh64_analyze_prologue (struct gdbarch *g
 	    }
 
 	  else if (IS_MOV_R14 (insn))
-	    cache->saved_regs[MEDIA_FP_REGNUM] =
-	      cache->sp_offset - ((((insn & 0xf) ^ 0x8) - 0x8) << 2);
+	    {
+	      cache->saved_regs[MEDIA_FP_REGNUM] =
+		cache->sp_offset - ((((insn & 0xf) ^ 0x8) - 0x8) << 2);
+	      cache->uses_fp = 1;
+	    }
 
 	  else if (IS_MOV_R0 (insn))
 	    {
@@ -934,6 +936,7 @@ sh64_analyze_prologue (struct gdbarch *g
 	      /* Store R14 at r0_val-4 from SP.  Decrement r0 by 4.  */
 	      cache->saved_regs[MEDIA_FP_REGNUM] = cache->sp_offset
 	      					   - (r0_val - 4);
+	      cache->uses_fp = 1;
 	      r0_val -= 4;
 	    }
 
@@ -960,22 +963,25 @@ sh64_analyze_prologue (struct gdbarch *g
 						 9) << 2);
 
 	  else if (IS_STQ_R14_R15 (insn))
-	    cache->saved_regs[MEDIA_FP_REGNUM]
-	      = cache->sp_offset - (sign_extend ((insn & 0xffc00) >> 10,
-						 9) << 3);
+	    {
+	      cache->saved_regs[MEDIA_FP_REGNUM]
+		= cache->sp_offset - (sign_extend ((insn & 0xffc00) >> 10,
+						   9) << 3);
+	      cache->uses_fp = 1;
+	    }
 
 	  else if (IS_STL_R14_R15 (insn))
-	    cache->saved_regs[MEDIA_FP_REGNUM]
-	      = cache->sp_offset - (sign_extend ((insn & 0xffc00) >> 10,
-						 9) << 2);
+	    {
+	      cache->saved_regs[MEDIA_FP_REGNUM]
+		= cache->sp_offset - (sign_extend ((insn & 0xffc00) >> 10,
+						   9) << 2);
+	      cache->uses_fp = 1;
+	    }
 
 	  else if (IS_MOV_SP_FP_MEDIA (insn))
 	    break;
 	}
     }
-
-  if (cache->saved_regs[MEDIA_FP_REGNUM] >= 0)
-    cache->uses_fp = 1;
 }
 
 static CORE_ADDR
@@ -1058,8 +1064,6 @@ sh64_push_dummy_call (struct gdbarch *gd
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int stack_offset, stack_alloc;
   int int_argreg;
-  int float_argreg;
-  int double_argreg;
   int float_arg_index = 0;
   int double_arg_index = 0;
   int argnum;
@@ -1093,8 +1097,6 @@ sh64_push_dummy_call (struct gdbarch *gd
      in eight registers available.  Loop thru args from first to last.  */
 
   int_argreg = ARG0_REGNUM;
-  float_argreg = gdbarch_fp0_regnum (gdbarch);
-  double_argreg = DR0_REGNUM;
 
   for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
     {
@@ -1222,10 +1224,9 @@ sh64_push_dummy_call (struct gdbarch *gd
    TYPE, and copy that, in virtual format, into VALBUF.  */
 static void
 sh64_extract_return_value (struct type *type, struct regcache *regcache,
-			   void *valbuf)
+			   gdb_byte *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -1919,7 +1920,6 @@ sh64_do_fp_register (struct gdbarch *gdb
   unsigned char *raw_buffer;
   double flt;	/* Double extracted from raw hex data.  */
   int inv;
-  int j;
 
   /* Allocate space for the float.  */
   raw_buffer = (unsigned char *)
@@ -2030,15 +2030,16 @@ static void
 sh64_do_register (struct gdbarch *gdbarch, struct ui_file *file,
 		  struct frame_info *frame, int regnum)
 {
-  unsigned char raw_buffer[MAX_REGISTER_SIZE];
   struct value_print_options opts;
+  struct value *val;
 
   fputs_filtered (gdbarch_register_name (gdbarch, regnum), file);
   print_spaces_filtered (15 - strlen (gdbarch_register_name
 				      (gdbarch, regnum)), file);
 
   /* Get the data in raw format.  */
-  if (!deprecated_frame_register_read (frame, regnum, raw_buffer))
+  val = get_frame_register_value (frame, regnum);
+  if (value_optimized_out (val) || !value_entirely_available (val))
     {
       fprintf_filtered (file, "*value not available*\n");
       return;
@@ -2046,13 +2047,15 @@ sh64_do_register (struct gdbarch *gdbarc
 
   get_formatted_print_options (&opts, 'x');
   opts.deref_ref = 1;
-  val_print (register_type (gdbarch, regnum), raw_buffer, 0, 0,
-	     file, 0, NULL, &opts, current_language);
+  val_print (register_type (gdbarch, regnum),
+	     0, 0,
+	     file, 0, val, &opts, current_language);
   fprintf_filtered (file, "\t");
   get_formatted_print_options (&opts, 0);
   opts.deref_ref = 1;
-  val_print (register_type (gdbarch, regnum), raw_buffer, 0, 0,
-	     file, 0, NULL, &opts, current_language);
+  val_print (register_type (gdbarch, regnum),
+	     0, 0,
+	     file, 0, val, &opts, current_language);
   fprintf_filtered (file, "\n");
 }
 
@@ -2210,7 +2213,7 @@ sh64_frame_cache (struct frame_info *thi
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sh64_frame_cache *) *this_cache;
 
   gdbarch = get_frame_arch (this_frame);
   cache = sh64_alloc_frame_cache ();
@@ -2411,7 +2414,8 @@ sh64_gdbarch_init (struct gdbarch_info i
   set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, sh64_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh64_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh64_sw_breakpoint_from_kind);
 
   set_gdbarch_print_insn (gdbarch, print_insn_sh);
   set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh64-tdep.h ./gdb/sh64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sh64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-dependent definitions for Renesas Super-H, for GDB.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-linux-tdep.c ./gdb/sh-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sh-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux Super-H.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-nbsd-nat.c ./gdb/sh-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sh-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+/* Native-dependent code for NetBSD/sh.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "sh-tdep.h"
+#include "inf-ptrace.h"
+#include "regcache.h"
+
+
+/* Determine if PT_GETREGS fetches this register.  */
+#define GETREGS_SUPPLIES(gdbarch, regno) \
+  (((regno) >= R0_REGNUM && (regno) <= (R0_REGNUM + 15)) \
+|| (regno) == gdbarch_pc_regnum (gdbarch) || (regno) == PR_REGNUM \
+|| (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \
+|| (regno) == SR_REGNUM)
+
+/* Sizeof `struct reg' in <machine/reg.h>.  */
+#define SHNBSD_SIZEOF_GREGS	(21 * 4)
+
+static void
+shnbsd_fetch_inferior_registers (struct target_ops *ops,
+				 struct regcache *regcache, int regno)
+{
+  if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
+    {
+      struct reg inferior_registers;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      sh_corefile_supply_regset (&sh_corefile_gregset, regcache, regno,
+				 (char *) &inferior_registers,
+				 SHNBSD_SIZEOF_GREGS);
+
+      if (regno != -1)
+	return;
+    }
+}
+
+static void
+shnbsd_store_inferior_registers (struct target_ops *ops,
+				 struct regcache *regcache, int regno)
+{
+  if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
+    {
+      struct reg inferior_registers;
+
+      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
+	perror_with_name (_("Couldn't get registers"));
+
+      sh_corefile_collect_regset (&sh_corefile_gregset, regcache, regno,
+				  (char *) &inferior_registers,
+				  SHNBSD_SIZEOF_GREGS);
+
+      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
+	perror_with_name (_("Couldn't set registers"));
+
+      if (regno != -1)
+	return;
+    }
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_shnbsd_nat (void);
+
+void
+_initialize_shnbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = shnbsd_fetch_inferior_registers;
+  t->to_store_registers = shnbsd_store_inferior_registers;
+  add_target (t);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/shnbsd-nat.c ./gdb/shnbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/shnbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/shnbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,102 +0,0 @@
-/* Native-dependent code for NetBSD/sh.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "sh-tdep.h"
-#include "inf-ptrace.h"
-#include "regcache.h"
-
-
-/* Determine if PT_GETREGS fetches this register.  */
-#define GETREGS_SUPPLIES(gdbarch, regno) \
-  (((regno) >= R0_REGNUM && (regno) <= (R0_REGNUM + 15)) \
-|| (regno) == gdbarch_pc_regnum (gdbarch) || (regno) == PR_REGNUM \
-|| (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \
-|| (regno) == SR_REGNUM)
-
-/* Sizeof `struct reg' in <machine/reg.h>.  */
-#define SHNBSD_SIZEOF_GREGS	(21 * 4)
-
-static void
-shnbsd_fetch_inferior_registers (struct target_ops *ops,
-				 struct regcache *regcache, int regno)
-{
-  if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
-    {
-      struct reg inferior_registers;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      sh_corefile_supply_regset (&sh_corefile_gregset, regcache, regno,
-				 (char *) &inferior_registers,
-				 SHNBSD_SIZEOF_GREGS);
-
-      if (regno != -1)
-	return;
-    }
-}
-
-static void
-shnbsd_store_inferior_registers (struct target_ops *ops,
-				 struct regcache *regcache, int regno)
-{
-  if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
-    {
-      struct reg inferior_registers;
-
-      if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
-	perror_with_name (_("Couldn't get registers"));
-
-      sh_corefile_collect_regset (&sh_corefile_gregset, regcache, regno,
-				  (char *) &inferior_registers,
-				  SHNBSD_SIZEOF_GREGS);
-
-      if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
-	perror_with_name (_("Couldn't set registers"));
-
-      if (regno != -1)
-	return;
-    }
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_shnbsd_nat (void);
-
-void
-_initialize_shnbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = shnbsd_fetch_inferior_registers;
-  t->to_store_registers = shnbsd_store_inferior_registers;
-  add_target (t);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-nbsd-tdep.c ./gdb/sh-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sh-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,84 @@
+/* Target-dependent code for NetBSD/sh.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regset.h"
+#include "value.h"
+#include "osabi.h"
+
+#include "sh-tdep.h"
+#include "solib-svr4.h"
+
+/* Convert a register number into an offset into a ptrace
+   register structure.  */
+static const struct sh_corefile_regmap regmap[] =
+{
+  {R0_REGNUM,      20 * 4},
+  {R0_REGNUM + 1,  19 * 4},
+  {R0_REGNUM + 2,  18 * 4},
+  {R0_REGNUM + 3,  17 * 4},
+  {R0_REGNUM + 4,  16 * 4},
+  {R0_REGNUM + 5,  15 * 4},
+  {R0_REGNUM + 6,  14 * 4},
+  {R0_REGNUM + 7,  13 * 4},
+  {R0_REGNUM + 8,  12 * 4},
+  {R0_REGNUM + 9,  11 * 4},
+  {R0_REGNUM + 10, 10 * 4},
+  {R0_REGNUM + 11,  9 * 4},
+  {R0_REGNUM + 12,  8 * 4},
+  {R0_REGNUM + 13,  7 * 4},
+  {R0_REGNUM + 14,  6 * 4},
+  {R0_REGNUM + 15,  5 * 4},
+  {PC_REGNUM,       0 * 4},
+  {SR_REGNUM,       1 * 4},
+  {PR_REGNUM,	    2 * 4},
+  {MACH_REGNUM,	    3 * 4},
+  {MACL_REGNUM,	    4 * 4},
+  {-1 /* Terminator.  */, 0}
+};
+
+
+static void
+shnbsd_init_abi (struct gdbarch_info info,
+                  struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
+  tdep->sizeof_gregset = 84;
+
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_shnbsd_tdep;
+
+void
+_initialize_shnbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_NETBSD,
+			  shnbsd_init_abi);
+  gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_OPENBSD,
+			  shnbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/shnbsd-tdep.c ./gdb/shnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/shnbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/shnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,101 +0,0 @@
-/* Target-dependent code for NetBSD/sh.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regset.h"
-#include "value.h"
-#include "osabi.h"
-
-#include "sh-tdep.h"
-#include "solib-svr4.h"
-
-/* Convert a register number into an offset into a ptrace
-   register structure.  */
-static const struct sh_corefile_regmap regmap[] =
-{
-  {R0_REGNUM,      20 * 4},
-  {R0_REGNUM + 1,  19 * 4},
-  {R0_REGNUM + 2,  18 * 4},
-  {R0_REGNUM + 3,  17 * 4},
-  {R0_REGNUM + 4,  16 * 4},
-  {R0_REGNUM + 5,  15 * 4},
-  {R0_REGNUM + 6,  14 * 4},
-  {R0_REGNUM + 7,  13 * 4},
-  {R0_REGNUM + 8,  12 * 4},
-  {R0_REGNUM + 9,  11 * 4},
-  {R0_REGNUM + 10, 10 * 4},
-  {R0_REGNUM + 11,  9 * 4},
-  {R0_REGNUM + 12,  8 * 4},
-  {R0_REGNUM + 13,  7 * 4},
-  {R0_REGNUM + 14,  6 * 4},
-  {R0_REGNUM + 15,  5 * 4},
-  {PC_REGNUM,       0 * 4},
-  {SR_REGNUM,       1 * 4},
-  {PR_REGNUM,	    2 * 4},
-  {MACH_REGNUM,	    3 * 4},
-  {MACL_REGNUM,	    4 * 4},
-  {-1 /* Terminator.  */, 0}
-};
-
-
-static void
-shnbsd_init_abi (struct gdbarch_info info,
-                  struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
-  tdep->sizeof_gregset = 84;
-
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-
-/* OpenBSD uses uses the traditional NetBSD core file format, even for
-   ports that use ELF.  */
-#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
-
-static enum gdb_osabi
-shnbsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_CORE;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_shnbsd_tdep;
-
-void
-_initialize_shnbsd_tdep (void)
-{
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_sh, bfd_target_unknown_flavour,
-                                  shnbsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_NETBSD_ELF,
-			  shnbsd_init_abi);
-  gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_OPENBSD_ELF,
-			  shnbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-tdep.c ./gdb/sh-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sh-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Renesas Super-H, for GDB.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -52,6 +52,7 @@
 #include "dwarf2.h"
 /* registers numbers shared with the simulator.  */
 #include "gdb/sim-sh.h"
+#include <algorithm>
 
 /* List of "set sh ..." and "show sh ..." commands.  */
 static struct cmd_list_element *setshcmdlist = NULL;
@@ -417,11 +418,20 @@ sh_sh4al_dsp_register_name (struct gdbar
   return register_names[reg_nr];
 }
 
-static const unsigned char *
-sh_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+sh_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  return 2;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
+
+static const gdb_byte *
+sh_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
-  /* 0xc3c3 is trapa #c3, and it works in big and little endian modes.  */
-  static unsigned char breakpoint[] = { 0xc3, 0xc3 };
+  *size = kind;
 
   /* For remote stub targets, trapa #20 is used.  */
   if (strcmp (target_shortname, "remote") == 0)
@@ -430,19 +440,18 @@ sh_breakpoint_from_pc (struct gdbarch *g
       static unsigned char little_remote_breakpoint[] = { 0x20, 0xc3 };
 
       if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
-	{
-	  *lenptr = sizeof (big_remote_breakpoint);
-	  return big_remote_breakpoint;
-	}
+	return big_remote_breakpoint;
       else
-	{
-	  *lenptr = sizeof (little_remote_breakpoint);
-	  return little_remote_breakpoint;
-	}
+	return little_remote_breakpoint;
     }
+  else
+    {
+      /* 0xc3c3 is trapa #c3, and it works in big and little endian
+	 modes.  */
+      static unsigned char breakpoint[] = { 0xc3, 0xc3 };
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
+      return breakpoint;
+    }
 }
 
 /* Prologue looks like
@@ -654,7 +663,7 @@ sh_analyze_prologue (struct gdbarch *gdb
 	{
 	  pc += 2;
 	  /* Don't go any further than six more instructions.  */
-	  limit_pc = min (limit_pc, pc + (2 * 6));
+	  limit_pc = std::min (limit_pc, pc + (2 * 6));
 
 	  cache->uses_fp = 1;
 	  /* At this point, only allow argument register moves to other
@@ -728,7 +737,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
     {
       post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-        return max (pc, post_prologue_pc);
+        return std::max (pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -745,7 +754,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
   /* Do not allow limit_pc to be past the function end, if we know
      where that end is...  */
   if (func_end_addr != 0)
-    limit_pc = min (limit_pc, func_end_addr);
+    limit_pc = std::min (limit_pc, func_end_addr);
 
   cache.sp_offset = -4;
   post_prologue_pc = sh_analyze_prologue (gdbarch, pc, limit_pc, &cache, 0);
@@ -1305,8 +1314,6 @@ sh_extract_return_value_nofpu (struct ty
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
-  int return_register = R0_REGNUM;
-  int offset;
 
   if (len <= 4)
     {
@@ -1857,7 +1864,7 @@ sh_frame_cache (struct frame_info *this_
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sh_frame_cache *) *this_cache;
 
   cache = sh_alloc_frame_cache ();
   *this_cache = cache;
@@ -2021,7 +2028,7 @@ sh_stub_this_id (struct frame_info *this
 
   if (*this_cache == NULL)
     *this_cache = sh_make_stub_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct sh_frame_cache *) *this_cache;
 
   *this_id = frame_id_build (cache->saved_sp, get_frame_pc (this_frame));
 }
@@ -2275,7 +2282,8 @@ sh_gdbarch_init (struct gdbarch_info inf
   set_gdbarch_register_type (gdbarch, sh_default_register_type);
   set_gdbarch_register_reggroup_p (gdbarch, sh_register_reggroup_p);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh_sw_breakpoint_from_kind);
 
   set_gdbarch_print_insn (gdbarch, print_insn_sh);
   set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-tdep.h ./gdb/sh-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sh-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sh-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target-specific definition for a Renesas Super-H.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sim-regno.h ./gdb/sim-regno.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sim-regno.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sim-regno.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic remote debugging interface for simulators.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/skip.c ./gdb/skip.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/skip.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/skip.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Skipping uninteresting files and functions while stepping.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,19 +32,35 @@
 #include "breakpoint.h" /* for get_sal_arch () */
 #include "source.h"
 #include "filenames.h"
+#include "fnmatch.h"
+#include "gdb_regex.h"
 
 struct skiplist_entry
 {
   int number;
 
-  /* NULL if this isn't a skiplist entry for an entire file.
+  /* Non-zero if FILE is a glob-style pattern.
+     Otherewise it is the plain file name (possibly with directories).  */
+  int file_is_glob;
+
+  /* The name of the file or NULL.
      The skiplist entry owns this pointer.  */
-  char *filename;
+  char *file;
+
+  /* Non-zero if FUNCTION is a regexp.
+     Otherwise it is a plain function name (possibly with arguments,
+     for C++).  */
+  int function_is_regexp;
 
-  /* The name of the marked-for-skip function, if this is a skiplist
-     entry for a function.
+  /* The name of the function or NULL.
      The skiplist entry owns this pointer.  */
-  char *function_name;
+  char *function;
+
+  /* If this is a function regexp, the compiled form.  */
+  regex_t compiled_function_regexp;
+
+  /* Non-zero if the function regexp has been compiled.  */
+  int compiled_function_regexp_is_valid;
 
   int enabled;
 
@@ -52,7 +68,6 @@ struct skiplist_entry
 };
 
 static void add_skiplist_entry (struct skiplist_entry *e);
-static void skip_function (const char *name);
 
 static struct skiplist_entry *skiplist_entry_chain;
 static int skiplist_entry_count;
@@ -65,10 +80,62 @@ static int skiplist_entry_count;
        E ? (TMP = E->next, 1) : 0;       \
        E = TMP)
 
+/* Create a skip object.  */
+
+static struct skiplist_entry *
+make_skip_entry (int file_is_glob, const char *file,
+		 int function_is_regexp, const char *function)
+{
+  struct skiplist_entry *e = XCNEW (struct skiplist_entry);
+
+  gdb_assert (file != NULL || function != NULL);
+  if (file_is_glob)
+    gdb_assert (file != NULL);
+  if (function_is_regexp)
+    gdb_assert (function != NULL);
+
+  if (file != NULL)
+    e->file = xstrdup (file);
+  if (function != NULL)
+    e->function = xstrdup (function);
+  e->file_is_glob = file_is_glob;
+  e->function_is_regexp = function_is_regexp;
+  e->enabled = 1;
+
+  return e;
+}
+
+/* Free a skiplist entry.  */
+
+static void
+free_skiplist_entry (struct skiplist_entry *e)
+{
+  xfree (e->file);
+  xfree (e->function);
+  if (e->function_is_regexp && e->compiled_function_regexp_is_valid)
+    regfree (&e->compiled_function_regexp);
+  xfree (e);
+}
+
+/* Wrapper to free_skiplist_entry for use as a cleanup.  */
+
+static void
+free_skiplist_entry_cleanup (void *e)
+{
+  free_skiplist_entry ((struct skiplist_entry *) e);
+}
+
+/* Create a cleanup to free skiplist entry E.  */
+
+static struct cleanup *
+make_free_skiplist_entry_cleanup (struct skiplist_entry *e)
+{
+  return make_cleanup (free_skiplist_entry_cleanup, e);
+}
+
 static void
 skip_file_command (char *arg, int from_tty)
 {
-  struct skiplist_entry *e;
   struct symtab *symtab;
   const char *filename = NULL;
 
@@ -85,37 +152,31 @@ skip_file_command (char *arg, int from_t
       filename = symtab_to_fullname (symtab);
     }
   else
-    {
-      symtab = lookup_symtab (arg);
-      if (symtab == NULL)
-	{
-	  fprintf_filtered (gdb_stderr, _("No source file named %s.\n"), arg);
-	  if (!nquery (_("\
-Ignore file pending future shared library load? ")))
-	    return;
-	}
-      /* Do not use SYMTAB's filename, later loaded shared libraries may match
-         given ARG but not SYMTAB's filename.  */
-      filename = arg;
-    }
+    filename = arg;
 
-  e = XCNEW (struct skiplist_entry);
-  e->filename = xstrdup (filename);
-  e->enabled = 1;
-
-  add_skiplist_entry (e);
+  add_skiplist_entry (make_skip_entry (0, filename, 0, NULL));
 
   printf_filtered (_("File %s will be skipped when stepping.\n"), filename);
 }
 
+/* Create a skiplist entry for the given function NAME and add it to the
+   list.  */
+
 static void
-skip_function_command (char *arg, int from_tty)
+skip_function (const char *name)
 {
-  const char *name = NULL;
+  add_skiplist_entry (make_skip_entry (0, NULL, 0, name));
 
+  printf_filtered (_("Function %s will be skipped when stepping.\n"), name);
+}
+
+static void
+skip_function_command (char *arg, int from_tty)
+{
   /* Default to the current function if no argument is given.  */
   if (arg == NULL)
     {
+      const char *name = NULL;
       CORE_ADDR pc;
 
       if (!last_displayed_sal_is_valid ())
@@ -128,25 +189,169 @@ skip_function_command (char *arg, int fr
 		  paddress (get_current_arch (), pc));
 	}
       skip_function (name);
+      return;
     }
-  else
+
+  skip_function (arg);
+}
+
+/* Compile the regexp in E.
+   An error is thrown if there's an error.
+   MESSAGE is used as a prefix of the error message.  */
+
+static void
+compile_skip_regexp (struct skiplist_entry *e, const char *message)
+{
+  int code;
+  int flags = REG_NOSUB;
+
+#ifdef REG_EXTENDED
+  flags |= REG_EXTENDED;
+#endif
+
+  gdb_assert (e->function_is_regexp && e->function != NULL);
+
+  code = regcomp (&e->compiled_function_regexp, e->function, flags);
+  if (code != 0)
     {
-      if (lookup_symbol (arg, NULL, VAR_DOMAIN, NULL) == NULL)
-        {
-	  fprintf_filtered (gdb_stderr,
-			    _("No function found named %s.\n"), arg);
+      char *err = get_regcomp_error (code, &e->compiled_function_regexp);
 
-	  if (nquery (_("\
-Ignore function pending future shared library load? ")))
-	    {
-	      /* Add the unverified skiplist entry.  */
-	      skip_function (arg);
-	    }
+      make_cleanup (xfree, err);
+      error (_("%s: %s"), message, err);
+    }
+  e->compiled_function_regexp_is_valid = 1;
+}
+
+/* Process "skip ..." that does not match "skip file" or "skip function".  */
+
+static void
+skip_command (char *arg, int from_tty)
+{
+  const char *file = NULL;
+  const char *gfile = NULL;
+  const char *function = NULL;
+  const char *rfunction = NULL;
+  char **argv;
+  struct cleanup *cleanups;
+  struct skiplist_entry *e;
+  int i;
+
+  if (arg == NULL)
+    {
+      skip_function_command (arg, from_tty);
+      return;
+    }
+
+  argv = buildargv (arg);
+  cleanups = make_cleanup_freeargv (argv);
+
+  for (i = 0; argv[i] != NULL; ++i)
+    {
+      const char *p = argv[i];
+      const char *value = argv[i + 1];
+
+      if (strcmp (p, "-fi") == 0
+	  || strcmp (p, "-file") == 0)
+	{
+	  if (value == NULL)
+	    error (_("Missing value for %s option."), p);
+	  file = value;
+	  ++i;
+	}
+      else if (strcmp (p, "-gfi") == 0
+	       || strcmp (p, "-gfile") == 0)
+	{
+	  if (value == NULL)
+	    error (_("Missing value for %s option."), p);
+	  gfile = value;
+	  ++i;
+	}
+      else if (strcmp (p, "-fu") == 0
+	       || strcmp (p, "-function") == 0)
+	{
+	  if (value == NULL)
+	    error (_("Missing value for %s option."), p);
+	  function = value;
+	  ++i;
+	}
+      else if (strcmp (p, "-rfu") == 0
+	       || strcmp (p, "-rfunction") == 0)
+	{
+	  if (value == NULL)
+	    error (_("Missing value for %s option."), p);
+	  rfunction = value;
+	  ++i;
+	}
+      else if (*p == '-')
+	error (_("Invalid skip option: %s"), p);
+      else if (i == 0)
+	{
+	  /* Assume the user entered "skip FUNCTION-NAME".
+	     FUNCTION-NAME may be `foo (int)', and therefore we pass the
+	     complete original arg to skip_function command as if the user
+	     typed "skip function arg".  */
+	  do_cleanups (cleanups);
+	  skip_function_command (arg, from_tty);
 	  return;
 	}
+      else
+	error (_("Invalid argument: %s"), p);
+    }
 
-      skip_function (arg);
+  if (file != NULL && gfile != NULL)
+    error (_("Cannot specify both -file and -gfile."));
+
+  if (function != NULL && rfunction != NULL)
+    error (_("Cannot specify both -function and -rfunction."));
+
+  /* This shouldn't happen as "skip" by itself gets punted to
+     skip_function_command.  */
+  gdb_assert (file != NULL || gfile != NULL
+	      || function != NULL || rfunction != NULL);
+
+  e = make_skip_entry (gfile != NULL, file ? file : gfile,
+		       rfunction != NULL, function ? function : rfunction);
+  if (rfunction != NULL)
+    {
+      struct cleanup *rf_cleanups = make_free_skiplist_entry_cleanup (e);
+
+      compile_skip_regexp (e, _("regexp"));
+      discard_cleanups (rf_cleanups);
     }
+  add_skiplist_entry (e);
+
+  /* I18N concerns drive some of the choices here (we can't piece together
+     the output too much).  OTOH we want to keep this simple.  Therefore the
+     only polish we add to the output is to append "(s)" to "File" or
+     "Function" if they're a glob/regexp.  */
+  {
+    const char *file_to_print = file != NULL ? file : gfile;
+    const char *function_to_print = function != NULL ? function : rfunction;
+    const char *file_text = gfile != NULL ? _("File(s)") : _("File");
+    const char *lower_file_text = gfile != NULL ? _("file(s)") : _("file");
+    const char *function_text
+      = rfunction != NULL ? _("Function(s)") : _("Function");
+
+    if (function_to_print == NULL)
+      {
+	printf_filtered (_("%s %s will be skipped when stepping.\n"),
+			 file_text, file_to_print);
+      }
+    else if (file_to_print == NULL)
+      {
+	printf_filtered (_("%s %s will be skipped when stepping.\n"),
+			 function_text, function_to_print);
+      }
+    else
+      {
+	printf_filtered (_("%s %s in %s %s will be skipped"
+			   " when stepping.\n"),
+			 function_text, function_to_print,
+			 lower_file_text, file_to_print);
+      }
+  }
+
+  do_cleanups (cleanups);
 }
 
 static void
@@ -168,24 +373,25 @@ skip_info (char *arg, int from_tty)
   if (num_printable_entries == 0)
     {
       if (arg == NULL)
-	ui_out_message (current_uiout, 0, _("\
-Not skipping any files or functions.\n"));
+	current_uiout->message (_("Not skipping any files or functions.\n"));
       else
-	ui_out_message (current_uiout, 0,
-			_("No skiplist entries found with number %s.\n"), arg);
+	current_uiout->message (
+	  _("No skiplist entries found with number %s.\n"), arg);
 
       return;
     }
 
-  tbl_chain = make_cleanup_ui_out_table_begin_end (current_uiout, 4,
+  tbl_chain = make_cleanup_ui_out_table_begin_end (current_uiout, 6,
 						   num_printable_entries,
 						   "SkiplistTable");
 
-  ui_out_table_header (current_uiout, 7, ui_left, "number", "Num");      /* 1 */
-  ui_out_table_header (current_uiout, 14, ui_left, "type", "Type");      /* 2 */
-  ui_out_table_header (current_uiout, 3, ui_left, "enabled", "Enb");     /* 3 */
-  ui_out_table_header (current_uiout, 40, ui_noalign, "what", "What");   /* 4 */
-  ui_out_table_body (current_uiout);
+  current_uiout->table_header (5, ui_left, "number", "Num");   /* 1 */
+  current_uiout->table_header (3, ui_left, "enabled", "Enb");  /* 2 */
+  current_uiout->table_header (4, ui_right, "regexp", "Glob"); /* 3 */
+  current_uiout->table_header (20, ui_left, "file", "File");   /* 4 */
+  current_uiout->table_header (2, ui_right, "regexp", "RE");   /* 5 */
+  current_uiout->table_header (40, ui_noalign, "function", "Function"); /* 6 */
+  current_uiout->table_body ();
 
   ALL_SKIPLIST_ENTRIES (e)
     {
@@ -197,27 +403,29 @@ Not skipping any files or functions.\n")
 
       entry_chain = make_cleanup_ui_out_tuple_begin_end (current_uiout,
 							 "blklst-entry");
-      ui_out_field_int (current_uiout, "number", e->number);             /* 1 */
+      current_uiout->field_int ("number", e->number); /* 1 */
 
-      if (e->function_name != NULL)
-	ui_out_field_string (current_uiout, "type", "function");         /* 2 */
-      else if (e->filename != NULL)
-	ui_out_field_string (current_uiout, "type", "file");             /* 2 */
+      if (e->enabled)
+	current_uiout->field_string ("enabled", "y"); /* 2 */
       else
-	internal_error (__FILE__, __LINE__, _("\
-Skiplist entry should have either a filename or a function name."));
+	current_uiout->field_string ("enabled", "n"); /* 2 */
 
-      if (e->enabled)
-	ui_out_field_string (current_uiout, "enabled", "y");             /* 3 */
+      if (e->file_is_glob)
+	current_uiout->field_string ("regexp", "y"); /* 3 */
+      else
+	current_uiout->field_string ("regexp", "n"); /* 3 */
+
+      current_uiout->field_string ("file",
+			   e->file ? e->file : "<none>"); /* 4 */
+      if (e->function_is_regexp)
+	current_uiout->field_string ("regexp", "y"); /* 5 */
       else
-	ui_out_field_string (current_uiout, "enabled", "n");             /* 3 */
+	current_uiout->field_string ("regexp", "n"); /* 5 */
 
-      if (e->function_name != NULL)
-	ui_out_field_string (current_uiout, "what", e->function_name);	 /* 4 */
-      else if (e->filename != NULL)
-	ui_out_field_string (current_uiout, "what", e->filename);	 /* 4 */
+      current_uiout->field_string (
+	"function", e->function ? e->function : "<none>"); /* 6 */
 
-      ui_out_text (current_uiout, "\n");
+      current_uiout->text ("\n");
       do_cleanups (entry_chain);
     }
 
@@ -273,9 +481,7 @@ skip_delete_command (char *arg, int from
 	else
 	  skiplist_entry_chain = e->next;
 
-	xfree (e->function_name);
-	xfree (e->filename);
-	xfree (e);
+	free_skiplist_entry (e);
         found = 1;
       }
     else
@@ -287,22 +493,6 @@ skip_delete_command (char *arg, int from
     error (_("No skiplist entries found with number %s."), arg);
 }
 
-/* Create a skiplist entry for the given function NAME and add it to the
-   list.  */
-
-static void
-skip_function (const char *name)
-{
-  struct skiplist_entry *e = XCNEW (struct skiplist_entry);
-
-  e->enabled = 1;
-  e->function_name = xstrdup (name);
-
-  add_skiplist_entry (e);
-
-  printf_filtered (_("Function %s will be skipped when stepping.\n"), name);
-}
-
 /* Add the given skiplist entry to our list, and set the entry's number.  */
 
 static void
@@ -326,6 +516,98 @@ add_skiplist_entry (struct skiplist_entr
     }
 }
 
+/* Return non-zero if we're stopped at a file to be skipped.  */
+
+static int
+skip_file_p (struct skiplist_entry *e,
+	     const struct symtab_and_line *function_sal)
+{
+  gdb_assert (e->file != NULL && !e->file_is_glob);
+
+  if (function_sal->symtab == NULL)
+    return 0;
+
+  /* Check first sole SYMTAB->FILENAME.  It may not be a substring of
+     symtab_to_fullname as it may contain "./" etc.  */
+  if (compare_filenames_for_search (function_sal->symtab->filename, e->file))
+    return 1;
+
+  /* Before we invoke realpath, which can get expensive when many
+     files are involved, do a quick comparison of the basenames.  */
+  if (!basenames_may_differ
+      && filename_cmp (lbasename (function_sal->symtab->filename),
+		       lbasename (e->file)) != 0)
+    return 0;
+
+  /* Note: symtab_to_fullname caches its result, thus we don't have to.  */
+  {
+    const char *fullname = symtab_to_fullname (function_sal->symtab);
+
+    if (compare_filenames_for_search (fullname, e->file))
+      return 1;
+  }
+
+  return 0;
+}
+
+/* Return non-zero if we're stopped at a globbed file to be skipped.  */
+
+static int
+skip_gfile_p (struct skiplist_entry *e,
+	      const struct symtab_and_line *function_sal)
+{
+  gdb_assert (e->file != NULL && e->file_is_glob);
+
+  if (function_sal->symtab == NULL)
+    return 0;
+
+  /* Check first sole SYMTAB->FILENAME.  It may not be a substring of
+     symtab_to_fullname as it may contain "./" etc.  */
+  if (gdb_filename_fnmatch (e->file, function_sal->symtab->filename,
+			    FNM_FILE_NAME | FNM_NOESCAPE) == 0)
+    return 1;
+
+  /* Before we invoke symtab_to_fullname, which is expensive, do a quick
+     comparison of the basenames.
+     Note that we assume that lbasename works with glob-style patterns.
+     If the basename of the glob pattern is something like "*.c" then this
+     isn't much of a win.  Oh well.  */
+  if (!basenames_may_differ
+      && gdb_filename_fnmatch (lbasename (e->file),
+			       lbasename (function_sal->symtab->filename),
+			       FNM_FILE_NAME | FNM_NOESCAPE) != 0)
+    return 0;
+
+  /* Note: symtab_to_fullname caches its result, thus we don't have to.  */
+  {
+    const char *fullname = symtab_to_fullname (function_sal->symtab);
+
+    if (compare_glob_filenames_for_search (fullname, e->file))
+      return 1;
+  }
+
+  return 0;
+}
+
+/* Return non-zero if we're stopped at a function to be skipped.  */
+
+static int
+skip_function_p (struct skiplist_entry *e, const char *function_name)
+{
+  gdb_assert (e->function != NULL && !e->function_is_regexp);
+  return strcmp_iw (function_name, e->function) == 0;
+}
+
+/* Return non-zero if we're stopped at a function regexp to be skipped.  */
+
+static int
+skip_rfunction_p (struct skiplist_entry *e, const char *function_name)
+{
+  gdb_assert (e->function != NULL && e->function_is_regexp
+	      && e->compiled_function_regexp_is_valid);
+  return (regexec (&e->compiled_function_regexp, function_name, 0, NULL, 0)
+	  == 0);
+}
 
 /* See skip.h.  */
 
@@ -333,8 +615,6 @@ int
 function_name_is_marked_for_skip (const char *function_name,
 				  const struct symtab_and_line *function_sal)
 {
-  int searched_for_fullname = 0;
-  const char *fullname = NULL;
   struct skiplist_entry *e;
 
   if (function_name == NULL)
@@ -342,43 +622,49 @@ function_name_is_marked_for_skip (const 
 
   ALL_SKIPLIST_ENTRIES (e)
     {
+      int skip_by_file = 0;
+      int skip_by_function = 0;
+
       if (!e->enabled)
 	continue;
 
-      /* Does the pc we're stepping into match e's stored pc? */
-      if (e->function_name != NULL
-	  && strcmp_iw (function_name, e->function_name) == 0)
-	return 1;
-
-      if (e->filename != NULL)
+      if (e->file != NULL)
 	{
-	  /* Check first sole SYMTAB->FILENAME.  It does not need to be
-	     a substring of symtab_to_fullname as it may contain "./" etc.  */
-	  if (function_sal->symtab != NULL
-	      && compare_filenames_for_search (function_sal->symtab->filename,
-					       e->filename))
-	    return 1;
-
-	  /* Before we invoke realpath, which can get expensive when many
-	     files are involved, do a quick comparison of the basenames.  */
-	  if (!basenames_may_differ
-	      && (function_sal->symtab == NULL
-	          || filename_cmp (lbasename (function_sal->symtab->filename),
-				   lbasename (e->filename)) != 0))
-	    continue;
-
-	  /* Get the filename corresponding to this FUNCTION_SAL, if we haven't
-	     yet.  */
-	  if (!searched_for_fullname)
+	  if (e->file_is_glob)
+	    {
+	      if (skip_gfile_p (e, function_sal))
+		skip_by_file = 1;
+	    }
+	  else
 	    {
-	      if (function_sal->symtab != NULL)
-		fullname = symtab_to_fullname (function_sal->symtab);
-	      searched_for_fullname = 1;
+	      if (skip_file_p (e, function_sal))
+		skip_by_file = 1;
 	    }
-	  if (fullname != NULL
-	      && compare_filenames_for_search (fullname, e->filename))
+	}
+      if (e->function != NULL)
+	{
+	  if (e->function_is_regexp)
+	    {
+	      if (skip_rfunction_p (e, function_name))
+		skip_by_function = 1;
+	    }
+	  else
+	    {
+	      if (skip_function_p (e, function_name))
+		skip_by_function = 1;
+	    }
+	}
+
+      /* If both file and function must match, make sure we don't errantly
+	 exit if only one of them match.  */
+      if (e->file != NULL && e->function != NULL)
+	{
+	  if (skip_by_file && skip_by_function)
 	    return 1;
 	}
+      /* Only one of file/function is specified.  */
+      else if (skip_by_file || skip_by_function)
+	return 1;
     }
 
   return 0;
@@ -396,22 +682,31 @@ _initialize_step_skip (void)
   skiplist_entry_chain = 0;
   skiplist_entry_count = 0;
 
-  add_prefix_cmd ("skip", class_breakpoint, skip_function_command, _("\
+  add_prefix_cmd ("skip", class_breakpoint, skip_command, _("\
 Ignore a function while stepping.\n\
-Usage: skip [FUNCTION NAME]\n\
-If no function name is given, ignore the current function."),
+\n\
+Usage: skip [FUNCTION-NAME]\n\
+       skip [<file-spec>] [<function-spec>]\n\
+If no arguments are given, ignore the current function.\n\
+\n\
+<file-spec> is one of:\n\
+       -fi|-file FILE-NAME\n\
+       -gfi|-gfile GLOB-FILE-PATTERN\n\
+<function-spec> is one of:\n\
+       -fu|-function FUNCTION-NAME\n\
+       -rfu|-rfunction FUNCTION-NAME-REGULAR-EXPRESSION"),
                   &skiplist, "skip ", 1, &cmdlist);
 
   c = add_cmd ("file", class_breakpoint, skip_file_command, _("\
 Ignore a file while stepping.\n\
-Usage: skip file [FILENAME]\n\
+Usage: skip file [FILE-NAME]\n\
 If no filename is given, ignore the current file."),
 	       &skiplist);
   set_cmd_completer (c, filename_completer);
 
   c = add_cmd ("function", class_breakpoint, skip_function_command, _("\
 Ignore a function while stepping.\n\
-Usage: skip function [FUNCTION NAME]\n\
+Usage: skip function [FUNCTION-NAME]\n\
 If no function name is given, skip the current function."),
 	       &skiplist);
   set_cmd_completer (c, location_completer);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/skip.h ./gdb/skip.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/skip.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/skip.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Header for skipping over uninteresting files and functions when debugging.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol2-tdep.c ./gdb/sol2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sol2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol2-tdep.h ./gdb/sol2-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol2-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sol2-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-aix.c ./gdb/solib-aix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-aix.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-aix.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -66,7 +66,7 @@ DEF_VEC_P(lm_info_p);
 static struct lm_info *
 solib_aix_new_lm_info (struct lm_info *info)
 {
-  struct lm_info *result = xmalloc (sizeof (struct lm_info));
+  struct lm_info *result = XNEW (struct lm_info);
 
   memcpy (result, info, sizeof (struct lm_info));
   result->filename = xstrdup (info->filename);
@@ -112,7 +112,8 @@ get_solib_aix_inferior_data (struct infe
 {
   struct solib_aix_inferior_data *data;
 
-  data = inferior_data (inf, solib_aix_inferior_data_handle);
+  data = ((struct solib_aix_inferior_data *)
+	  inferior_data (inf, solib_aix_inferior_data_handle));
   if (data == NULL)
     {
       data = XCNEW (struct solib_aix_inferior_data);
@@ -160,16 +161,16 @@ library_list_start_library (struct gdb_x
 			    void *user_data,
 			    VEC (gdb_xml_value_s) *attributes)
 {
-  VEC (lm_info_p) **list = user_data;
+  VEC (lm_info_p) **list = (VEC (lm_info_p) **) user_data;
   struct lm_info *item = XCNEW (struct lm_info);
   struct gdb_xml_value *attr;
 
   attr = xml_find_attribute (attributes, "name");
-  item->filename = xstrdup (attr->value);
+  item->filename = xstrdup ((const char *) attr->value);
 
   attr = xml_find_attribute (attributes, "member");
   if (attr != NULL)
-    item->member_name = xstrdup (attr->value);
+    item->member_name = xstrdup ((const char *) attr->value);
 
   attr = xml_find_attribute (attributes, "text_addr");
   item->text_addr = * (ULONGEST *) attr->value;
@@ -193,7 +194,7 @@ library_list_start_list (struct gdb_xml_
                          const struct gdb_xml_element *element,
                          void *user_data, VEC (gdb_xml_value_s) *attributes)
 {
-  char *version = xml_find_attribute (attributes, "version")->value;
+  char *version = (char *) xml_find_attribute (attributes, "version")->value;
 
   if (strcmp (version, "1.0") != 0)
     gdb_xml_error (parser,
@@ -206,7 +207,7 @@ library_list_start_list (struct gdb_xml_
 static void
 solib_aix_free_library_list (void *p)
 {
-  VEC (lm_info_p) **result = p;
+  VEC (lm_info_p) **result = (VEC (lm_info_p) **) p;
   struct lm_info *info;
   int ix;
 
@@ -468,7 +469,6 @@ solib_aix_get_section_offsets (struct ob
 {
   struct section_offsets *offsets;
   bfd *abfd = objfile->obfd;
-  int i;
 
   offsets = XCNEWVEC (struct section_offsets, objfile->num_sections);
 
@@ -548,14 +548,6 @@ solib_aix_solib_create_inferior_hook (in
     }
 }
 
-/* Implement the "special_symbol_handling" target_so_ops method.  */
-
-static void
-solib_aix_special_symbol_handling (void)
-{
-  /* Nothing needed.  */
-}
-
 /* Implement the "current_sos" target_so_ops method.  */
 
 static struct so_list *
@@ -632,7 +624,7 @@ solib_aix_in_dynsym_resolve_code (CORE_A
 
 /* Implement the "bfd_open" target_so_ops method.  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 solib_aix_bfd_open (char *pathname)
 {
   /* The pathname is actually a synthetic filename with the following
@@ -643,11 +635,9 @@ solib_aix_bfd_open (char *pathname)
      to the solib's lm_info here?  */
   const int path_len = strlen (pathname);
   char *sep;
-  char *filename;
   int filename_len;
-  char *member_name;
-  bfd *archive_bfd, *object_bfd;
-  struct cleanup *cleanup;
+  int found_file;
+  char *found_pathname;
 
   if (pathname[path_len - 1] != ')')
     return solib_bfd_open (pathname);
@@ -664,75 +654,69 @@ solib_aix_bfd_open (char *pathname)
     }
   filename_len = sep - pathname;
 
-  filename = xstrprintf ("%.*s", filename_len, pathname);
-  cleanup = make_cleanup (xfree, filename);
-  member_name = xstrprintf ("%.*s", path_len - filename_len - 2, sep + 1);
-  make_cleanup (xfree, member_name);
-
-  archive_bfd = gdb_bfd_open (filename, gnutarget, -1);
+  std::string filename (string_printf ("%.*s", filename_len, pathname));
+  std::string member_name (string_printf ("%.*s", path_len - filename_len - 2,
+					  sep + 1));
+
+  /* Calling solib_find makes certain that sysroot path is set properly
+     if program has a dependency on .a archive and sysroot is set via
+     set sysroot command.  */
+  found_pathname = solib_find (filename.c_str (), &found_file);
+  if (found_pathname == NULL)
+      perror_with_name (pathname);
+  gdb_bfd_ref_ptr archive_bfd (solib_bfd_fopen (found_pathname, found_file));
   if (archive_bfd == NULL)
     {
       warning (_("Could not open `%s' as an executable file: %s"),
-	       filename, bfd_errmsg (bfd_get_error ()));
-      do_cleanups (cleanup);
+	       filename.c_str (), bfd_errmsg (bfd_get_error ()));
       return NULL;
     }
 
-  if (bfd_check_format (archive_bfd, bfd_object))
-    {
-      do_cleanups (cleanup);
-      return archive_bfd;
-    }
+  if (bfd_check_format (archive_bfd.get (), bfd_object))
+    return archive_bfd;
 
-  if (! bfd_check_format (archive_bfd, bfd_archive))
+  if (! bfd_check_format (archive_bfd.get (), bfd_archive))
     {
       warning (_("\"%s\": not in executable format: %s."),
-	       filename, bfd_errmsg (bfd_get_error ()));
-      gdb_bfd_unref (archive_bfd);
-      do_cleanups (cleanup);
+	       filename.c_str (), bfd_errmsg (bfd_get_error ()));
       return NULL;
     }
 
-  object_bfd = gdb_bfd_openr_next_archived_file (archive_bfd, NULL);
+  gdb_bfd_ref_ptr object_bfd
+    (gdb_bfd_openr_next_archived_file (archive_bfd.get (), NULL));
   while (object_bfd != NULL)
     {
-      bfd *next;
-
-      if (strcmp (member_name, object_bfd->filename) == 0)
+      if (member_name == object_bfd->filename)
 	break;
 
-      next = gdb_bfd_openr_next_archived_file (archive_bfd, object_bfd);
-      gdb_bfd_unref (object_bfd);
-      object_bfd = next;
+      object_bfd = gdb_bfd_openr_next_archived_file (archive_bfd.get (),
+						     object_bfd.get ());
     }
 
   if (object_bfd == NULL)
     {
-      warning (_("\"%s\": member \"%s\" missing."), filename, member_name);
-      gdb_bfd_unref (archive_bfd);
-      do_cleanups (cleanup);
+      warning (_("\"%s\": member \"%s\" missing."), filename.c_str (),
+	       member_name.c_str ());
       return NULL;
     }
 
-  if (! bfd_check_format (object_bfd, bfd_object))
+  if (! bfd_check_format (object_bfd.get (), bfd_object))
     {
       warning (_("%s(%s): not in object format: %s."),
-	       filename, member_name, bfd_errmsg (bfd_get_error ()));
-      gdb_bfd_unref (archive_bfd);
-      gdb_bfd_unref (object_bfd);
-      do_cleanups (cleanup);
+	       filename.c_str (), member_name.c_str (),
+	       bfd_errmsg (bfd_get_error ()));
       return NULL;
     }
 
-  /* Override the returned bfd's name with our synthetic name in order
-     to allow commands listing all shared libraries to display that
-     synthetic name.  Otherwise, we would only be displaying the name
-     of the archive member object.  */
-  xfree (bfd_get_filename (object_bfd));
-  object_bfd->filename = xstrdup (pathname);
+  /* Override the returned bfd's name with the name returned from solib_find
+     along with appended parenthesized member name in order to allow commands
+     listing all shared libraries to display.  Otherwise, we would only be
+     displaying the name of the archive member object.  */
+  xfree (bfd_get_filename (object_bfd.get ()));
+  object_bfd->filename = xstrprintf ("%s%s",
+                                     bfd_get_filename (archive_bfd.get ()),
+				     sep);
 
-  gdb_bfd_unref (archive_bfd);
-  do_cleanups (cleanup);
   return object_bfd;
 }
 
@@ -823,8 +807,6 @@ _initialize_solib_aix (void)
   solib_aix_so_ops.clear_solib = solib_aix_clear_solib;
   solib_aix_so_ops.solib_create_inferior_hook
     = solib_aix_solib_create_inferior_hook;
-  solib_aix_so_ops.special_symbol_handling
-    = solib_aix_special_symbol_handling;
   solib_aix_so_ops.current_sos = solib_aix_current_sos;
   solib_aix_so_ops.open_symbol_file_object
     = solib_aix_open_symbol_file_object;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-aix.h ./gdb/solib-aix.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-aix.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-aix.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib.c ./gdb/solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -65,7 +65,8 @@ solib_init (struct obstack *obstack)
 static const struct target_so_ops *
 solib_ops (struct gdbarch *gdbarch)
 {
-  const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+  const struct target_so_ops **ops
+    = (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
 
   return *ops;
 }
@@ -75,7 +76,8 @@ solib_ops (struct gdbarch *gdbarch)
 void
 set_solib_ops (struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
 {
-  const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+  const struct target_so_ops **ops
+    = (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
 
   *ops = new_ops;
 }
@@ -150,7 +152,7 @@ show_solib_search_path (struct ui_file *
 */
 
 static char *
-solib_find_1 (char *in_pathname, int *fd, int is_solib)
+solib_find_1 (const char *in_pathname, int *fd, int is_solib)
 {
   const struct target_so_ops *ops = solib_ops (target_gdbarch ());
   int found_file = -1;
@@ -192,7 +194,7 @@ solib_find_1 (char *in_pathname, int *fd
       char *p;
 
       /* Avoid clobbering our input.  */
-      p = alloca (strlen (in_pathname) + 1);
+      p = (char *) alloca (strlen (in_pathname) + 1);
       strcpy (p, in_pathname);
       in_pathname = p;
 
@@ -378,31 +380,47 @@ solib_find_1 (char *in_pathname, int *fd
 /* Return the full pathname of the main executable, or NULL if not
    found.  The returned pathname is malloc'ed and must be freed by
    the caller.  If FD is non-NULL, *FD is set to either -1 or an open
-   file handle for the main executable.
-
-   The search algorithm used is described in solib_find_1's comment
-   above.  */
+   file handle for the main executable.  */
 
 char *
-exec_file_find (char *in_pathname, int *fd)
+exec_file_find (const char *in_pathname, int *fd)
 {
-  char *result = solib_find_1 (in_pathname, fd, 0);
+  char *result;
+  const char *fskind = effective_target_file_system_kind ();
+
+  if (in_pathname == NULL)
+    return NULL;
 
-  if (result == NULL)
+  if (*gdb_sysroot != '\0' && IS_TARGET_ABSOLUTE_PATH (fskind, in_pathname))
     {
-      const char *fskind = effective_target_file_system_kind ();
+      result = solib_find_1 (in_pathname, fd, 0);
 
-      if (fskind == file_system_kind_dos_based)
+      if (result == NULL && fskind == file_system_kind_dos_based)
 	{
 	  char *new_pathname;
 
-	  new_pathname = alloca (strlen (in_pathname) + 5);
+	  new_pathname = (char *) alloca (strlen (in_pathname) + 5);
 	  strcpy (new_pathname, in_pathname);
 	  strcat (new_pathname, ".exe");
 
 	  result = solib_find_1 (new_pathname, fd, 0);
 	}
     }
+  else
+    {
+      /* It's possible we don't have a full path, but rather just a
+	 filename.  Some targets, such as HP-UX, don't provide the
+	 full path, sigh.
+
+	 Attempt to qualify the filename against the source path.
+	 (If that fails, we'll just fall back on the original
+	 filename.  Not much more we can do...)  */
+
+      if (!source_full_path_of (in_pathname, &result))
+	result = xstrdup (in_pathname);
+      if (fd != NULL)
+	*fd = -1;
+    }
 
   return result;
 }
@@ -416,7 +434,7 @@ exec_file_find (char *in_pathname, int *
    above.  */
 
 char *
-solib_find (char *in_pathname, int *fd)
+solib_find (const char *in_pathname, int *fd)
 {
   const char *solib_symbols_extension
     = gdbarch_solib_symbols_extension (target_gdbarch ());
@@ -425,7 +443,7 @@ solib_find (char *in_pathname, int *fd)
      extension.  */
   if (solib_symbols_extension != NULL)
     {
-      char *p = in_pathname + strlen (in_pathname);
+      const char *p = in_pathname + strlen (in_pathname);
 
       while (p > in_pathname && *p != '.')
 	p--;
@@ -434,8 +452,9 @@ solib_find (char *in_pathname, int *fd)
 	{
 	  char *new_pathname;
 
-	  new_pathname = alloca (p - in_pathname + 1
-				 + strlen (solib_symbols_extension) + 1);
+	  new_pathname
+	    = (char *) alloca (p - in_pathname + 1
+			       + strlen (solib_symbols_extension) + 1);
 	  memcpy (new_pathname, in_pathname, p - in_pathname + 1);
 	  strcpy (new_pathname + (p - in_pathname) + 1,
 		  solib_symbols_extension);
@@ -455,15 +474,15 @@ solib_find (char *in_pathname, int *fd)
    function.  If unsuccessful, the FD will be closed (unless FD was
    -1).  */
 
-bfd *
+gdb_bfd_ref_ptr
 solib_bfd_fopen (char *pathname, int fd)
 {
-  bfd *abfd = gdb_bfd_open (pathname, gnutarget, fd);
+  gdb_bfd_ref_ptr abfd (gdb_bfd_open (pathname, gnutarget, fd));
 
-  if (abfd != NULL && !gdb_bfd_has_target_filename (abfd))
-    bfd_set_cacheable (abfd, 1);
+  if (abfd != NULL && !gdb_bfd_has_target_filename (abfd.get ()))
+    bfd_set_cacheable (abfd.get (), 1);
 
-  if (!abfd)
+  if (abfd == NULL)
     {
       make_cleanup (xfree, pathname);
       error (_("Could not open `%s' as an executable file: %s"),
@@ -477,12 +496,11 @@ solib_bfd_fopen (char *pathname, int fd)
 
 /* Find shared library PATHNAME and open a BFD for it.  */
 
-bfd *
+gdb_bfd_ref_ptr
 solib_bfd_open (char *pathname)
 {
   char *found_pathname;
   int found_file;
-  bfd *abfd;
   const struct bfd_arch_info *b;
 
   /* Search for shared library file.  */
@@ -498,22 +516,20 @@ solib_bfd_open (char *pathname)
     }
 
   /* Open bfd for shared library.  */
-  abfd = solib_bfd_fopen (found_pathname, found_file);
+  gdb_bfd_ref_ptr abfd (solib_bfd_fopen (found_pathname, found_file));
 
   /* Check bfd format.  */
-  if (!bfd_check_format (abfd, bfd_object))
-    {
-      make_cleanup_bfd_unref (abfd);
-      error (_("`%s': not in executable format: %s"),
-	     bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
-    }
+  if (!bfd_check_format (abfd.get (), bfd_object))
+    error (_("`%s': not in executable format: %s"),
+	   bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
 
   /* Check bfd arch.  */
   b = gdbarch_bfd_arch_info (target_gdbarch ());
-  if (!b->compatible (b, bfd_get_arch_info (abfd)))
+  if (!b->compatible (b, bfd_get_arch_info (abfd.get ())))
     warning (_("`%s': Shared library architecture %s is not compatible "
                "with target architecture %s."), bfd_get_filename (abfd),
-             bfd_get_arch_info (abfd)->printable_name, b->printable_name);
+             bfd_get_arch_info (abfd.get ())->printable_name,
+	     b->printable_name);
 
   return abfd;
 }
@@ -537,18 +553,17 @@ solib_map_sections (struct so_list *so)
   char *filename;
   struct target_section *p;
   struct cleanup *old_chain;
-  bfd *abfd;
 
   filename = tilde_expand (so->so_name);
   old_chain = make_cleanup (xfree, filename);
-  abfd = ops->bfd_open (filename);
+  gdb_bfd_ref_ptr abfd (ops->bfd_open (filename));
   do_cleanups (old_chain);
 
   if (abfd == NULL)
     return 0;
 
   /* Leave bfd open, core_xfer_memory and "info files" need it.  */
-  so->abfd = abfd;
+  so->abfd = abfd.release ();
 
   /* Copy the full path name into so_name, allowing symbol_file_add
      to find it later.  This also affects the =library-loaded GDB/MI
@@ -556,14 +571,14 @@ solib_map_sections (struct so_list *so)
      the library's host-side path.  If we let the target dictate
      that objfile's path, and the target is different from the host,
      GDB/MI will not provide the correct host-side path.  */
-  if (strlen (bfd_get_filename (abfd)) >= SO_NAME_MAX_PATH_SIZE)
+  if (strlen (bfd_get_filename (so->abfd)) >= SO_NAME_MAX_PATH_SIZE)
     error (_("Shared library file name is too long."));
-  strcpy (so->so_name, bfd_get_filename (abfd));
+  strcpy (so->so_name, bfd_get_filename (so->abfd));
 
-  if (build_section_table (abfd, &so->sections, &so->sections_end))
+  if (build_section_table (so->abfd, &so->sections, &so->sections_end))
     {
       error (_("Can't find the file sections in `%s': %s"),
-	     bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
+	     bfd_get_filename (so->abfd), bfd_errmsg (bfd_get_error ()));
     }
 
   for (p = so->sections; p < so->sections_end; p++)
@@ -666,7 +681,7 @@ master_so_list (void)
    loaded.  */
 
 int
-solib_read_symbols (struct so_list *so, int flags)
+solib_read_symbols (struct so_list *so, symfile_add_flags flags)
 {
   if (so->symbols_loaded)
     {
@@ -693,16 +708,16 @@ solib_read_symbols (struct so_list *so, 
 		  && so->objfile->addr_low == so->addr_low)
 		break;
 	    }
-	  if (so->objfile != NULL)
-	    break;
-
-	  sap = build_section_addr_info_from_section_table (so->sections,
-							    so->sections_end);
-	  so->objfile = symbol_file_add_from_bfd (so->abfd, so->so_name,
-						  flags, sap, OBJF_SHARED,
-						  NULL);
-	  so->objfile->addr_low = so->addr_low;
-	  free_section_addr_info (sap);
+	  if (so->objfile == NULL)
+	    {
+	      sap = build_section_addr_info_from_section_table (so->sections,
+								so->sections_end);
+	      so->objfile = symbol_file_add_from_bfd (so->abfd, so->so_name,
+						      flags, sap, OBJF_SHARED,
+						      NULL);
+	      so->objfile->addr_low = so->addr_low;
+	      free_section_addr_info (sap);
+	    }
 
 	  so->symbols_loaded = 1;
 	}
@@ -996,8 +1011,10 @@ solib_add (const char *pattern, int from
   {
     int any_matches = 0;
     int loaded_any_symbols = 0;
-    const int flags =
-        SYMFILE_DEFER_BP_RESET | (from_tty ? SYMFILE_VERBOSE : 0);
+    symfile_add_flags add_flags = SYMFILE_DEFER_BP_RESET;
+
+    if (from_tty)
+        add_flags |= SYMFILE_VERBOSE;
 
     for (gdb = so_list_head; gdb; gdb = gdb->next)
       if (! pattern || re_exec (gdb->so_name))
@@ -1021,7 +1038,7 @@ solib_add (const char *pattern, int from
 		    printf_unfiltered (_("Symbols already loaded for %s\n"),
 				       gdb->so_name);
 		}
-	      else if (solib_read_symbols (gdb, flags))
+	      else if (solib_read_symbols (gdb, add_flags))
 		loaded_any_symbols = 1;
 	    }
 	}
@@ -1035,13 +1052,9 @@ solib_add (const char *pattern, int from
 
     if (loaded_any_symbols)
       {
-	const struct target_so_ops *ops = solib_ops (target_gdbarch ());
-
 	/* Getting new symbols may change our opinion about what is
 	   frameless.  */
 	reinit_frame_cache ();
-
-	ops->special_symbol_handling ();
       }
   }
 }
@@ -1093,13 +1106,12 @@ info_sharedlibrary_command (char *patter
 					 "SharedLibraryTable");
 
   /* The "- 1" is because ui_out adds one space between columns.  */
-  ui_out_table_header (uiout, addr_width - 1, ui_left, "from", "From");
-  ui_out_table_header (uiout, addr_width - 1, ui_left, "to", "To");
-  ui_out_table_header (uiout, 12 - 1, ui_left, "syms-read", "Syms Read");
-  ui_out_table_header (uiout, 0, ui_noalign,
-		       "name", "Shared Object Library");
+  uiout->table_header (addr_width - 1, ui_left, "from", "From");
+  uiout->table_header (addr_width - 1, ui_left, "to", "To");
+  uiout->table_header (12 - 1, ui_left, "syms-read", "Syms Read");
+  uiout->table_header (0, ui_noalign, "name", "Shared Object Library");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
 
   for (so = so_list_head; so; so = so->next)
     {
@@ -1114,29 +1126,28 @@ info_sharedlibrary_command (char *patter
 
       if (so->addr_high != 0)
 	{
-	  ui_out_field_core_addr (uiout, "from", gdbarch, so->addr_low);
-	  ui_out_field_core_addr (uiout, "to", gdbarch, so->addr_high);
+	  uiout->field_core_addr ("from", gdbarch, so->addr_low);
+	  uiout->field_core_addr ("to", gdbarch, so->addr_high);
 	}
       else
 	{
-	  ui_out_field_skip (uiout, "from");
-	  ui_out_field_skip (uiout, "to");
+	  uiout->field_skip ("from");
+	  uiout->field_skip ("to");
 	}
 
-      if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
+      if (! interp_ui_out (top_level_interpreter ())->is_mi_like_p ()
 	  && so->symbols_loaded
 	  && !objfile_has_symbols (so->objfile))
 	{
 	  so_missing_debug_info = 1;
-	  ui_out_field_string (uiout, "syms-read", "Yes (*)");
+	  uiout->field_string ("syms-read", "Yes (*)");
 	}
       else
-	ui_out_field_string (uiout, "syms-read", 
-			     so->symbols_loaded ? "Yes" : "No");
+	uiout->field_string ("syms-read", so->symbols_loaded ? "Yes" : "No");
 
-      ui_out_field_string (uiout, "name", so->so_name);
+      uiout->field_string ("name", so->so_name);
 
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
 
       do_cleanups (lib_cleanup);
     }
@@ -1146,17 +1157,14 @@ info_sharedlibrary_command (char *patter
   if (nr_libs == 0)
     {
       if (pattern)
-	ui_out_message (uiout, 0,
-			_("No shared libraries matched.\n"));
+	uiout->message (_("No shared libraries matched.\n"));
       else
-	ui_out_message (uiout, 0,
-			_("No shared libraries loaded at this time.\n"));
+	uiout->message (_("No shared libraries loaded at this time.\n"));
     }
   else
     {
       if (so_missing_debug_info)
-	ui_out_message (uiout, 0,
-			_("(*): Shared library is missing "
+	uiout->message (_("(*): Shared library is missing "
 			  "debugging information.\n"));
     }
 }
@@ -1223,29 +1231,7 @@ clear_solib (void)
 {
   const struct target_so_ops *ops = solib_ops (target_gdbarch ());
 
-  /* This function is expected to handle ELF shared libraries.  It is
-     also used on Solaris, which can run either ELF or a.out binaries
-     (for compatibility with SunOS 4), both of which can use shared
-     libraries.  So we don't know whether we have an ELF executable or
-     an a.out executable until the user chooses an executable file.
-
-     ELF shared libraries don't get mapped into the address space
-     until after the program starts, so we'd better not try to insert
-     breakpoints in them immediately.  We have to wait until the
-     dynamic linker has loaded them; we'll hit a bp_shlib_event
-     breakpoint (look for calls to create_solib_event_breakpoint) when
-     it's ready.
-
-     SunOS shared libraries seem to be different --- they're present
-     as soon as the process begins execution, so there's no need to
-     put off inserting breakpoints.  There's also nowhere to put a
-     bp_shlib_event breakpoint, so if we put it off, we'll never get
-     around to it.
-
-     So: disable breakpoints only if we're using ELF shared libs.  */
-  if (exec_bfd != NULL
-      && bfd_get_flavour (exec_bfd) != bfd_target_aout_flavour)
-    disable_breakpoints_in_shlibs ();
+  disable_breakpoints_in_shlibs ();
 
   while (so_list_head)
     {
@@ -1356,19 +1342,19 @@ reload_shared_libraries_1 (int from_tty)
   for (so = so_list_head; so != NULL; so = so->next)
     {
       char *filename, *found_pathname = NULL;
-      bfd *abfd;
       int was_loaded = so->symbols_loaded;
-      const int flags =
-	SYMFILE_DEFER_BP_RESET | (from_tty ? SYMFILE_VERBOSE : 0);
+      symfile_add_flags add_flags = SYMFILE_DEFER_BP_RESET;
+
+      if (from_tty)
+	add_flags |= SYMFILE_VERBOSE;
 
       filename = tilde_expand (so->so_original_name);
       make_cleanup (xfree, filename);
-      abfd = solib_bfd_open (filename);
+      gdb_bfd_ref_ptr abfd (solib_bfd_open (filename));
       if (abfd != NULL)
 	{
-	  found_pathname = xstrdup (bfd_get_filename (abfd));
+	  found_pathname = xstrdup (bfd_get_filename (abfd.get ()));
 	  make_cleanup (xfree, found_pathname);
-	  gdb_bfd_unref (abfd);
 	}
 
       /* If this shared library is no longer associated with its previous
@@ -1408,7 +1394,7 @@ reload_shared_libraries_1 (int from_tty)
 
 	    if (!got_error
 		&& (auto_solib_add || was_loaded || libpthread_solib_p (so)))
-	      solib_read_symbols (so, flags);
+	      solib_read_symbols (so, add_flags);
 	}
     }
 
@@ -1465,8 +1451,6 @@ reload_shared_libraries (char *ignored, 
      structures that are now freed.  Also, getting new symbols may
      change our opinion about what is frameless.  */
   reinit_frame_cache ();
-
-  ops->special_symbol_handling ();
 }
 
 /* Wrapper for reload_shared_libraries that replaces "remote:"
@@ -1511,16 +1495,16 @@ show_auto_solib_add (struct ui_file *fil
 /* Handler for library-specific lookup of global symbol NAME in OBJFILE.  Call
    the library-specific handler if it is installed for the current target.  */
 
-struct symbol *
+struct block_symbol
 solib_global_lookup (struct objfile *objfile,
 		     const char *name,
 		     const domain_enum domain)
 {
-  const struct target_so_ops *ops = solib_ops (get_objfile_arch (objfile));
+  const struct target_so_ops *ops = solib_ops (target_gdbarch ());
 
   if (ops->lookup_lib_global_symbol != NULL)
     return ops->lookup_lib_global_symbol (objfile, name, domain);
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Lookup the value for a specific symbol from dynamic symbol table.  Look
@@ -1530,8 +1514,9 @@ solib_global_lookup (struct objfile *obj
 
 CORE_ADDR
 gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
-				   int (*match_sym) (asymbol *, void *),
-				   void *data)
+				   int (*match_sym) (const asymbol *,
+						     const void *),
+				   const void *data)
 {
   long storage_needed = bfd_get_symtab_upper_bound (abfd);
   CORE_ADDR symaddr = 0;
@@ -1589,8 +1574,9 @@ gdb_bfd_lookup_symbol_from_symtab (bfd *
 
 static CORE_ADDR
 bfd_lookup_symbol_from_dyn_symtab (bfd *abfd,
-				   int (*match_sym) (asymbol *, void *),
-				   void *data)
+				   int (*match_sym) (const asymbol *,
+						     const void *),
+				   const void *data)
 {
   long storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
   CORE_ADDR symaddr = 0;
@@ -1627,8 +1613,8 @@ bfd_lookup_symbol_from_dyn_symtab (bfd *
 
 CORE_ADDR
 gdb_bfd_lookup_symbol (bfd *abfd,
-		       int (*match_sym) (asymbol *, void *),
-		       void *data)
+		       int (*match_sym) (const asymbol *, const void *),
+		       const void *data)
 {
   CORE_ADDR symaddr = gdb_bfd_lookup_symbol_from_symtab (abfd, match_sym, data);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-darwin.c ./gdb/solib-darwin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-darwin.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-darwin.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle Darwin shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -96,7 +96,8 @@ get_darwin_info (void)
 {
   struct darwin_info *info;
 
-  info = program_space_data (current_program_space, solib_darwin_pspace_data);
+  info = (struct darwin_info *) program_space_data (current_program_space,
+						    solib_darwin_pspace_data);
   if (info != NULL)
     return info;
 
@@ -131,7 +132,7 @@ darwin_load_image_infos (struct darwin_i
 
   /* The structure has 4 fields: version (4 bytes), count (4 bytes),
      info (pointer) and notifier (pointer).  */
-  len = 4 + 4 + 2 * ptr_type->length;
+  len = 4 + 4 + 2 * TYPE_LENGTH (ptr_type);
   gdb_assert (len <= sizeof (buf));
   memset (&info->all_image, 0, sizeof (info->all_image));
 
@@ -147,7 +148,7 @@ darwin_load_image_infos (struct darwin_i
   info->all_image.count = extract_unsigned_integer (buf + 4, 4, byte_order);
   info->all_image.info = extract_typed_address (buf + 8, ptr_type);
   info->all_image.notifier = extract_typed_address
-    (buf + 8 + ptr_type->length, ptr_type);
+    (buf + 8 + TYPE_LENGTH (ptr_type), ptr_type);
 }
 
 /* Link map info to include in an allocated so_list entry.  */
@@ -325,14 +326,43 @@ darwin_current_sos (void)
   return head;
 }
 
-/* Get the load address of the executable.  We assume that the dyld info are
-   correct.  */
+/* Check LOAD_ADDR points to a Mach-O executable header.  Return LOAD_ADDR
+   in case of success, 0 in case of failure.  */
 
 static CORE_ADDR
-darwin_read_exec_load_addr (struct darwin_info *info)
+darwin_validate_exec_header (CORE_ADDR load_addr)
 {
-  struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
+  struct mach_o_header_external hdr;
+  unsigned long hdr_val;
+
+  /* Read Mach-O header from memory.  */
+  if (target_read_memory (load_addr, (gdb_byte *) &hdr, sizeof (hdr) - 4))
+    return 0;
+
+  /* Discard wrong magic numbers.  Shouldn't happen.  */
+  hdr_val = extract_unsigned_integer
+    (hdr.magic, sizeof (hdr.magic), byte_order);
+  if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)
+    return 0;
+
+  /* Check executable.  */
+  hdr_val = extract_unsigned_integer
+    (hdr.filetype, sizeof (hdr.filetype), byte_order);
+  if (hdr_val == BFD_MACH_O_MH_EXECUTE)
+    return load_addr;
+
+  return 0;
+}
+
+/* Get the load address of the executable using dyld list of images.
+   We assume that the dyld info are correct (which is wrong if the target
+   is stopped at the first instruction).  */
+
+static CORE_ADDR
+darwin_read_exec_load_addr_from_dyld (struct darwin_info *info)
+{
+  struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
   int ptr_len = TYPE_LENGTH (ptr_type);
   unsigned int image_info_size = ptr_len * 3;
   int i;
@@ -343,33 +373,47 @@ darwin_read_exec_load_addr (struct darwi
       CORE_ADDR iinfo = info->all_image.info + i * image_info_size;
       gdb_byte buf[image_info_size];
       CORE_ADDR load_addr;
-      struct mach_o_header_external hdr;
-      unsigned long hdr_val;
 
       /* Read image info from inferior.  */
       if (target_read_memory (iinfo, buf, image_info_size))
 	break;
 
       load_addr = extract_typed_address (buf, ptr_type);
-
-      /* Read Mach-O header from memory.  */
-      if (target_read_memory (load_addr, (gdb_byte *) &hdr, sizeof (hdr) - 4))
-	break;
-      /* Discard wrong magic numbers.  Shouldn't happen.  */
-      hdr_val = extract_unsigned_integer
-        (hdr.magic, sizeof (hdr.magic), byte_order);
-      if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)
-        continue;
-      /* Check executable.  */
-      hdr_val = extract_unsigned_integer
-        (hdr.filetype, sizeof (hdr.filetype), byte_order);
-      if (hdr_val == BFD_MACH_O_MH_EXECUTE)
+      if (darwin_validate_exec_header (load_addr) == load_addr)
 	return load_addr;
     }
 
   return 0;
 }
 
+/* Get the load address of the executable when the PC is at the dyld
+   entry point using parameter passed by the kernel (at SP). */
+
+static CORE_ADDR
+darwin_read_exec_load_addr_at_init (struct darwin_info *info)
+{
+  struct gdbarch *gdbarch = target_gdbarch ();
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  int addr_size = gdbarch_addr_bit (gdbarch) / 8;
+  ULONGEST load_ptr_addr;
+  ULONGEST load_addr;
+  gdb_byte buf[8];
+
+  /* Get SP.  */
+  if (regcache_cooked_read_unsigned (get_current_regcache (),
+				     gdbarch_sp_regnum (gdbarch),
+				     &load_ptr_addr) != REG_VALID)
+    return 0;
+
+  /* Read value at SP (image load address).  */
+  if (target_read_memory (load_ptr_addr, buf, addr_size))
+    return 0;
+
+  load_addr = extract_unsigned_integer (buf, addr_size, byte_order);
+
+  return darwin_validate_exec_header (load_addr);
+}
+
 /* Return 1 if PC lies in the dynamic symbol resolution code of the
    run time loader.  */
 
@@ -379,19 +423,11 @@ darwin_in_dynsym_resolve_code (CORE_ADDR
   return 0;
 }
 
-
-/* No special symbol handling.  */
-
-static void
-darwin_special_symbol_handling (void)
-{
-}
-
 /* A wrapper for bfd_mach_o_fat_extract that handles reference
    counting properly.  This will either return NULL, or return a new
    reference to a BFD.  */
 
-static bfd *
+static gdb_bfd_ref_ptr
 gdb_bfd_mach_o_fat_extract (bfd *abfd, bfd_format format,
 			    const bfd_arch_info_type *arch)
 {
@@ -405,7 +441,7 @@ gdb_bfd_mach_o_fat_extract (bfd *abfd, b
   else
     gdb_bfd_mark_parent (result, abfd);
 
-  return result;
+  return gdb_bfd_ref_ptr (result);
 }
 
 /* Extract dyld_all_image_addr when the process was just created, assuming the
@@ -416,8 +452,6 @@ darwin_solib_get_all_image_info_addr_at_
 {
   char *interp_name;
   CORE_ADDR load_addr = 0;
-  bfd *dyld_bfd = NULL;
-  struct cleanup *cleanup;
 
   /* This method doesn't work with an attached process.  */
   if (current_inferior ()->attach_flag)
@@ -428,42 +462,30 @@ darwin_solib_get_all_image_info_addr_at_
   if (!interp_name)
     return;
 
-  cleanup = make_cleanup (null_cleanup, NULL);
-
   /* Create a bfd for the interpreter.  */
-  dyld_bfd = gdb_bfd_open (interp_name, gnutarget, -1);
-  if (dyld_bfd)
+  gdb_bfd_ref_ptr dyld_bfd (gdb_bfd_open (interp_name, gnutarget, -1));
+  if (dyld_bfd != NULL)
     {
-      bfd *sub;
-
-      make_cleanup_bfd_unref (dyld_bfd);
-      sub = gdb_bfd_mach_o_fat_extract (dyld_bfd, bfd_object,
-					gdbarch_bfd_arch_info (target_gdbarch ()));
-      if (sub)
-	{
-	  dyld_bfd = sub;
-	  make_cleanup_bfd_unref (sub);
-	}
+      gdb_bfd_ref_ptr sub
+	(gdb_bfd_mach_o_fat_extract (dyld_bfd.get (), bfd_object,
+				     gdbarch_bfd_arch_info (target_gdbarch ())));
+      if (sub != NULL)
+	dyld_bfd = sub;
       else
-	dyld_bfd = NULL;
-    }
-  if (!dyld_bfd)
-    {
-      do_cleanups (cleanup);
-      return;
+	dyld_bfd.release ();
     }
+  if (dyld_bfd == NULL)
+    return;
 
   /* We find the dynamic linker's base address by examining
      the current pc (which should point at the entry point for the
      dynamic linker) and subtracting the offset of the entry point.  */
   load_addr = (regcache_read_pc (get_current_regcache ())
-               - bfd_get_start_address (dyld_bfd));
+               - bfd_get_start_address (dyld_bfd.get ()));
 
   /* Now try to set a breakpoint in the dynamic linker.  */
   info->all_image_addr =
-    lookup_symbol_from_bfd (dyld_bfd, "_dyld_all_image_infos");
-
-  do_cleanups (cleanup);
+    lookup_symbol_from_bfd (dyld_bfd.get (), "_dyld_all_image_infos");
 
   if (info->all_image_addr == 0)
     return;
@@ -471,22 +493,28 @@ darwin_solib_get_all_image_info_addr_at_
   info->all_image_addr += load_addr;
 }
 
-/* Extract dyld_all_image_addr reading it from 
+/* Extract dyld_all_image_addr reading it from
    TARGET_OBJECT_DARWIN_DYLD_INFO.  */
 
 static void
 darwin_solib_read_all_image_info_addr (struct darwin_info *info)
 {
-  gdb_byte buf[8 + 8 + 4];
+  gdb_byte buf[8];
   LONGEST len;
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
+  struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+
+  /* Sanity check.  */
+  if (TYPE_LENGTH (ptr_type) > sizeof (buf))
+    return;
 
   len = target_read (&current_target, TARGET_OBJECT_DARWIN_DYLD_INFO, NULL,
-                     buf, 0, sizeof (buf));
-  if (len != sizeof (buf))
+		     buf, 0, TYPE_LENGTH (ptr_type));
+  if (len <= 0)
     return;
 
-  info->all_image_addr = extract_unsigned_integer (buf, 8, byte_order);
+  /* The use of BIG endian is intended, as BUF is a raw stream of bytes.  This
+      makes the support of remote protocol easier.  */
+  info->all_image_addr = extract_unsigned_integer (buf, len, BFD_ENDIAN_BIG);
 }
 
 /* Shared library startup support.  See documentation in solib-svr4.c.  */
@@ -515,10 +543,25 @@ darwin_solib_create_inferior_hook (int f
       return;
     }
 
+  /* Add the breakpoint which is hit by dyld when the list of solib is
+     modified.  */
   create_solib_event_breakpoint (target_gdbarch (), info->all_image.notifier);
 
-  /* Possible relocate the main executable (PIE).  */
-  load_addr = darwin_read_exec_load_addr (info);
+  if (info->all_image.count != 0)
+    {
+      /* Possible relocate the main executable (PIE).  */
+      load_addr = darwin_read_exec_load_addr_from_dyld (info);
+    }
+  else
+    {
+      /* Possible issue:
+	 Do not break on the notifier if dyld is not initialized (deduced from
+	 count == 0).  In that case, dyld hasn't relocated itself and the
+	 notifier may point to a wrong address.  */
+
+      load_addr = darwin_read_exec_load_addr_at_init (info);
+    }
+
   if (load_addr != 0 && symfile_objfile != NULL)
     {
       CORE_ADDR vmaddr;
@@ -569,21 +612,19 @@ darwin_relocate_section_addresses (struc
     so->addr_low = sec->addr;
 }
 
-static struct symbol *
+static struct block_symbol
 darwin_lookup_lib_symbol (struct objfile *objfile,
 			  const char *name,
 			  const domain_enum domain)
 {
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
-static bfd *
+static gdb_bfd_ref_ptr
 darwin_bfd_open (char *pathname)
 {
   char *found_pathname;
   int found_file;
-  bfd *abfd;
-  bfd *res;
 
   /* Search for shared library file.  */
   found_pathname = solib_find (pathname, &found_file);
@@ -591,24 +632,21 @@ darwin_bfd_open (char *pathname)
     perror_with_name (pathname);
 
   /* Open bfd for shared library.  */
-  abfd = solib_bfd_fopen (found_pathname, found_file);
+  gdb_bfd_ref_ptr abfd (solib_bfd_fopen (found_pathname, found_file));
 
-  res = gdb_bfd_mach_o_fat_extract (abfd, bfd_object,
-				    gdbarch_bfd_arch_info (target_gdbarch ()));
-  if (!res)
-    {
-      make_cleanup_bfd_unref (abfd);
-      error (_("`%s': not a shared-library: %s"),
-	     bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
-    }
+  gdb_bfd_ref_ptr res
+    (gdb_bfd_mach_o_fat_extract (abfd.get (), bfd_object,
+				 gdbarch_bfd_arch_info (target_gdbarch ())));
+  if (res == NULL)
+    error (_("`%s': not a shared-library: %s"),
+	   bfd_get_filename (abfd.get ()), bfd_errmsg (bfd_get_error ()));
 
   /* The current filename for fat-binary BFDs is a name generated
      by BFD, usually a string containing the name of the architecture.
      Reset its value to the actual filename.  */
-  xfree (bfd_get_filename (res));
+  xfree (bfd_get_filename (res.get ()));
   res->filename = xstrdup (pathname);
 
-  gdb_bfd_unref (abfd);
   return res;
 }
 
@@ -628,7 +666,6 @@ _initialize_darwin_solib (void)
   darwin_so_ops.free_so = darwin_free_so;
   darwin_so_ops.clear_solib = darwin_clear_solib;
   darwin_so_ops.solib_create_inferior_hook = darwin_solib_create_inferior_hook;
-  darwin_so_ops.special_symbol_handling = darwin_special_symbol_handling;
   darwin_so_ops.current_sos = darwin_current_sos;
   darwin_so_ops.open_symbol_file_object = open_symbol_file_object;
   darwin_so_ops.in_dynsym_resolve_code = darwin_in_dynsym_resolve_code;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-darwin.h ./gdb/solib-darwin.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-darwin.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-darwin.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-dsbt.c ./gdb/solib-dsbt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-dsbt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-dsbt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Handle TIC6X (DSBT) shared libraries for GDB, the GNU Debugger.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -175,7 +175,8 @@ get_dsbt_info (void)
 {
   struct dsbt_info *info;
 
-  info = program_space_data (current_program_space, solib_dsbt_pspace_data);
+  info = (struct dsbt_info *) program_space_data (current_program_space,
+						  solib_dsbt_pspace_data);
   if (info != NULL)
     return info;
 
@@ -251,7 +252,7 @@ decode_loadmap (gdb_byte *buf)
      external loadsegs.  I.e, allocate the internal loadsegs.  */
   int_ldmbuf_size = (sizeof (struct int_elf32_dsbt_loadmap)
 		     + (nsegs - 1) * sizeof (struct int_elf32_dsbt_loadseg));
-  int_ldmbuf = xmalloc (int_ldmbuf_size);
+  int_ldmbuf = (struct int_elf32_dsbt_loadmap *) xmalloc (int_ldmbuf_size);
 
   /* Place extracted information in internal structs.  */
   int_ldmbuf->version = version;
@@ -355,7 +356,7 @@ fetch_loadmap (CORE_ADDR ldmaddr)
   /* Allocate space for the complete (external) loadmap.  */
   ext_ldmbuf_size = sizeof (struct ext_elf32_dsbt_loadmap)
     + (nsegs - 1) * sizeof (struct ext_elf32_dsbt_loadseg);
-  ext_ldmbuf = xmalloc (ext_ldmbuf_size);
+  ext_ldmbuf = (struct ext_elf32_dsbt_loadmap *) xmalloc (ext_ldmbuf_size);
 
   /* Copy over the portion of the loadmap that's already been read.  */
   memcpy (ext_ldmbuf, &ext_ldmbuf_partial, sizeof ext_ldmbuf_partial);
@@ -374,7 +375,7 @@ fetch_loadmap (CORE_ADDR ldmaddr)
      external loadsegs.  I.e, allocate the internal loadsegs.  */
   int_ldmbuf_size = sizeof (struct int_elf32_dsbt_loadmap)
     + (nsegs - 1) * sizeof (struct int_elf32_dsbt_loadseg);
-  int_ldmbuf = xmalloc (int_ldmbuf_size);
+  int_ldmbuf = (struct int_elf32_dsbt_loadmap *) xmalloc (int_ldmbuf_size);
 
   /* Place extracted information in internal structs.  */
   int_ldmbuf->version = version;
@@ -452,7 +453,7 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
   /* Read in .dynamic from the BFD.  We will get the actual value
      from memory later.  */
   sect_size = bfd_section_size (abfd, sect);
-  buf = bufstart = alloca (sect_size);
+  buf = bufstart = (gdb_byte *) alloca (sect_size);
   if (!bfd_get_section_contents (abfd, sect,
 				 buf, 0, sect_size))
     return 0;
@@ -709,8 +710,8 @@ dsbt_current_sos (void)
 	      break;
 	    }
 
-	  sop = xcalloc (1, sizeof (struct so_list));
-	  sop->lm_info = xcalloc (1, sizeof (struct lm_info));
+	  sop = XCNEW (struct so_list);
+	  sop->lm_info = XCNEW (struct lm_info);
 	  sop->lm_info->map = loadmap;
 	  /* Fetch the name.  */
 	  addr = extract_unsigned_integer (lm_buf.l_name,
@@ -776,7 +777,7 @@ enable_break_failure_warning (void)
 /* Helper function for gdb_bfd_lookup_symbol.  */
 
 static int
-cmp_name (asymbol *sym, void *data)
+cmp_name (const asymbol *sym, const void *data)
 {
   return (strcmp (sym->name, (const char *) data) == 0);
 }
@@ -792,7 +793,6 @@ cmp_name (asymbol *sym, void *data)
 static int
 enable_break (void)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   asection *interp_sect;
   struct dsbt_info *info;
 
@@ -816,16 +816,14 @@ enable_break (void)
     {
       unsigned int interp_sect_size;
       char *buf;
-      bfd *tmp_bfd = NULL;
       CORE_ADDR addr;
-      gdb_byte addr_buf[TIC6X_PTR_SIZE];
       struct int_elf32_dsbt_loadmap *ldm;
       int ret;
 
       /* Read the contents of the .interp section into a local buffer;
 	 the contents specify the dynamic linker this program uses.  */
       interp_sect_size = bfd_section_size (exec_bfd, interp_sect);
-      buf = alloca (interp_sect_size);
+      buf = (char *) alloca (interp_sect_size);
       bfd_get_section_contents (exec_bfd, interp_sect,
 				buf, 0, interp_sect_size);
 
@@ -833,6 +831,7 @@ enable_break (void)
 	 loaded so that we can load its symbols and place a breakpoint
 	 in the dynamic linker itself.  */
 
+      gdb_bfd_ref_ptr tmp_bfd;
       TRY
 	{
 	  tmp_bfd = solib_bfd_open (buf);
@@ -853,29 +852,31 @@ enable_break (void)
 
       /* Record the relocated start and end address of the dynamic linker
 	 text and plt section for dsbt_in_dynsym_resolve_code.  */
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".text");
       if (interp_sect)
 	{
 	  info->interp_text_sect_low
-	    = bfd_section_vma (tmp_bfd, interp_sect);
+	    = bfd_section_vma (tmp_bfd.get (), interp_sect);
 	  info->interp_text_sect_low
 	    += displacement_from_map (ldm, info->interp_text_sect_low);
 	  info->interp_text_sect_high
 	    = info->interp_text_sect_low
-	    + bfd_section_size (tmp_bfd, interp_sect);
+	    + bfd_section_size (tmp_bfd.get (), interp_sect);
 	}
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".plt");
       if (interp_sect)
 	{
 	  info->interp_plt_sect_low =
-	    bfd_section_vma (tmp_bfd, interp_sect);
+	    bfd_section_vma (tmp_bfd.get (), interp_sect);
 	  info->interp_plt_sect_low
 	    += displacement_from_map (ldm, info->interp_plt_sect_low);
 	  info->interp_plt_sect_high =
-	    info->interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
+	    info->interp_plt_sect_low + bfd_section_size (tmp_bfd.get (),
+							  interp_sect);
 	}
 
-      addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_state");
+      addr = gdb_bfd_lookup_symbol (tmp_bfd.get (), cmp_name,
+				    "_dl_debug_state");
       if (addr != 0)
 	{
 	  if (solib_dsbt_debug)
@@ -902,10 +903,7 @@ enable_break (void)
 	  ret = 0;
 	}
 
-      /* We're done with the temporary bfd.  */
-      gdb_bfd_unref (tmp_bfd);
-
-      /* We're also done with the loadmap.  */
+      /* We're done with the loadmap.  */
       xfree (ldm);
 
       return ret;
@@ -918,15 +916,6 @@ enable_break (void)
   return 0;
 }
 
-/* Once the symbols from a shared object have been loaded in the usual
-   way, we are called to do any system specific symbol handling that
-   is needed.  */
-
-static void
-dsbt_special_symbol_handling (void)
-{
-}
-
 static void
 dsbt_relocate_main_executable (void)
 {
@@ -941,11 +930,11 @@ dsbt_relocate_main_executable (void)
   ldm = info->exec_loadmap;
 
   xfree (info->main_executable_lm_info);
-  info->main_executable_lm_info = xcalloc (1, sizeof (struct lm_info));
+  info->main_executable_lm_info = XCNEW (struct lm_info);
   info->main_executable_lm_info->map = ldm;
 
-  new_offsets = xcalloc (symfile_objfile->num_sections,
-			 sizeof (struct section_offsets));
+  new_offsets = XCNEWVEC (struct section_offsets,
+			  symfile_objfile->num_sections);
   old_chain = make_cleanup (xfree, new_offsets);
   changed = 0;
 
@@ -1075,7 +1064,6 @@ _initialize_dsbt_solib (void)
   dsbt_so_ops.free_so = dsbt_free_so;
   dsbt_so_ops.clear_solib = dsbt_clear_solib;
   dsbt_so_ops.solib_create_inferior_hook = dsbt_solib_create_inferior_hook;
-  dsbt_so_ops.special_symbol_handling = dsbt_special_symbol_handling;
   dsbt_so_ops.current_sos = dsbt_current_sos;
   dsbt_so_ops.open_symbol_file_object = open_symbol_file_object;
   dsbt_so_ops.in_dynsym_resolve_code = dsbt_in_dynsym_resolve_code;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-frv.c ./gdb/solib-frv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-frv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-frv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Handle FR-V (FDPIC) shared libraries for GDB, the GNU Debugger.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -132,7 +132,7 @@ fetch_loadmap (CORE_ADDR ldmaddr)
   /* Allocate space for the complete (external) loadmap.  */
   ext_ldmbuf_size = sizeof (struct ext_elf32_fdpic_loadmap)
                + (nsegs - 1) * sizeof (struct ext_elf32_fdpic_loadseg);
-  ext_ldmbuf = xmalloc (ext_ldmbuf_size);
+  ext_ldmbuf = (struct ext_elf32_fdpic_loadmap *) xmalloc (ext_ldmbuf_size);
 
   /* Copy over the portion of the loadmap that's already been read.  */
   memcpy (ext_ldmbuf, &ext_ldmbuf_partial, sizeof ext_ldmbuf_partial);
@@ -151,7 +151,7 @@ fetch_loadmap (CORE_ADDR ldmaddr)
      external loadsegs.  I.e, allocate the internal loadsegs.  */
   int_ldmbuf_size = sizeof (struct int_elf32_fdpic_loadmap)
                + (nsegs - 1) * sizeof (struct int_elf32_fdpic_loadseg);
-  int_ldmbuf = xmalloc (int_ldmbuf_size);
+  int_ldmbuf = (struct int_elf32_fdpic_loadmap *) xmalloc (int_ldmbuf_size);
 
   /* Place extracted information in internal structs.  */
   int_ldmbuf->version = version;
@@ -388,8 +388,8 @@ frv_current_sos (void)
 	      break;
 	    }
 
-	  sop = xcalloc (1, sizeof (struct so_list));
-	  sop->lm_info = xcalloc (1, sizeof (struct lm_info));
+	  sop = XCNEW (struct so_list);
+	  sop->lm_info = XCNEW (struct lm_info);
 	  sop->lm_info->map = loadmap;
 	  sop->lm_info->got_value = got_addr;
 	  sop->lm_info->lm_addr = lm_addr;
@@ -484,7 +484,7 @@ enable_break_failure_warning (void)
 /* Helper function for gdb_bfd_lookup_symbol.  */
 
 static int
-cmp_name (asymbol *sym, void *data)
+cmp_name (const asymbol *sym, const void *data)
 {
   return (strcmp (sym->name, (const char *) data) == 0);
 }
@@ -517,8 +517,6 @@ static int
 enable_break2 (void)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  int success = 0;
-  char **bkpt_namep;
   asection *interp_sect;
 
   if (enable_break2_done)
@@ -534,7 +532,6 @@ enable_break2 (void)
     {
       unsigned int interp_sect_size;
       char *buf;
-      bfd *tmp_bfd = NULL;
       int status;
       CORE_ADDR addr, interp_loadmap_addr;
       gdb_byte addr_buf[FRV_PTR_SIZE];
@@ -543,7 +540,7 @@ enable_break2 (void)
       /* Read the contents of the .interp section into a local buffer;
          the contents specify the dynamic linker this program uses.  */
       interp_sect_size = bfd_section_size (exec_bfd, interp_sect);
-      buf = alloca (interp_sect_size);
+      buf = (char *) alloca (interp_sect_size);
       bfd_get_section_contents (exec_bfd, interp_sect,
 				buf, 0, interp_sect_size);
 
@@ -556,6 +553,7 @@ enable_break2 (void)
          be trivial on GNU/Linux).  Therefore, we have to try an alternate
          mechanism to find the dynamic linker's base address.  */
 
+      gdb_bfd_ref_ptr tmp_bfd;
       TRY
         {
           tmp_bfd = solib_bfd_open (buf);
@@ -577,7 +575,6 @@ enable_break2 (void)
 	{
 	  warning (_("Unable to determine dynamic linker loadmap address."));
 	  enable_break_failure_warning ();
-	  gdb_bfd_unref (tmp_bfd);
 	  return 0;
 	}
 
@@ -592,41 +589,41 @@ enable_break2 (void)
 	  warning (_("Unable to load dynamic linker loadmap at address %s."),
 	           hex_string_custom (interp_loadmap_addr, 8));
 	  enable_break_failure_warning ();
-	  gdb_bfd_unref (tmp_bfd);
 	  return 0;
 	}
 
       /* Record the relocated start and end address of the dynamic linker
          text and plt section for svr4_in_dynsym_resolve_code.  */
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".text");
       if (interp_sect)
 	{
 	  interp_text_sect_low
-	    = bfd_section_vma (tmp_bfd, interp_sect);
+	    = bfd_section_vma (tmp_bfd.get (), interp_sect);
 	  interp_text_sect_low
 	    += displacement_from_map (ldm, interp_text_sect_low);
 	  interp_text_sect_high
-	    = interp_text_sect_low + bfd_section_size (tmp_bfd, interp_sect);
+	    = interp_text_sect_low + bfd_section_size (tmp_bfd.get (),
+						       interp_sect);
 	}
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".plt");
       if (interp_sect)
 	{
 	  interp_plt_sect_low =
-	    bfd_section_vma (tmp_bfd, interp_sect);
+	    bfd_section_vma (tmp_bfd.get (), interp_sect);
 	  interp_plt_sect_low
 	    += displacement_from_map (ldm, interp_plt_sect_low);
 	  interp_plt_sect_high =
-	    interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
+	    interp_plt_sect_low + bfd_section_size (tmp_bfd.get (),
+						    interp_sect);
 	}
 
-      addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr");
+      addr = gdb_bfd_lookup_symbol (tmp_bfd.get (), cmp_name, "_dl_debug_addr");
 
       if (addr == 0)
 	{
 	  warning (_("Could not find symbol _dl_debug_addr "
 		     "in dynamic linker"));
 	  enable_break_failure_warning ();
-	  gdb_bfd_unref (tmp_bfd);
 	  return 0;
 	}
 
@@ -677,7 +674,6 @@ enable_break2 (void)
 		     "(at address %s) from dynamic linker"),
 	           hex_string_custom (addr + 8, 8));
 	  enable_break_failure_warning ();
-	  gdb_bfd_unref (tmp_bfd);
 	  return 0;
 	}
       addr = extract_unsigned_integer (addr_buf, sizeof addr_buf, byte_order);
@@ -689,15 +685,11 @@ enable_break2 (void)
 		     "(at address %s) from dynamic linker"),
 	           hex_string_custom (addr, 8));
 	  enable_break_failure_warning ();
-	  gdb_bfd_unref (tmp_bfd);
 	  return 0;
 	}
       addr = extract_unsigned_integer (addr_buf, sizeof addr_buf, byte_order);
 
-      /* We're done with the temporary bfd.  */
-      gdb_bfd_unref (tmp_bfd);
-
-      /* We're also done with the loadmap.  */
+      /* We're done with the loadmap.  */
       xfree (ldm);
 
       /* Remove all the solib event breakpoints.  Their addresses
@@ -764,14 +756,6 @@ enable_break (void)
   return 1;
 }
 
-/* Implement the "special_symbol_handling" target_so_ops method.  */
-
-static void
-frv_special_symbol_handling (void)
-{
-  /* Nothing needed for FRV.  */
-}
-
 static void
 frv_relocate_main_executable (void)
 {
@@ -799,11 +783,11 @@ frv_relocate_main_executable (void)
 
   if (main_executable_lm_info)
     xfree (main_executable_lm_info);
-  main_executable_lm_info = xcalloc (1, sizeof (struct lm_info));
+  main_executable_lm_info = XCNEW (struct lm_info);
   main_executable_lm_info->map = ldm;
 
-  new_offsets = xcalloc (symfile_objfile->num_sections,
-			 sizeof (struct section_offsets));
+  new_offsets = XCNEWVEC (struct section_offsets,
+			  symfile_objfile->num_sections);
   old_chain = make_cleanup (xfree, new_offsets);
   changed = 0;
 
@@ -975,7 +959,6 @@ frv_fdpic_find_canonical_descriptor (COR
   const char *name;
   CORE_ADDR addr;
   CORE_ADDR got_value;
-  struct int_elf32_fdpic_loadmap *ldm = 0;
   struct symbol *sym;
 
   /* Fetch the corresponding global pointer for the entry point.  */
@@ -1178,7 +1161,6 @@ _initialize_frv_solib (void)
   frv_so_ops.free_so = frv_free_so;
   frv_so_ops.clear_solib = frv_clear_solib;
   frv_so_ops.solib_create_inferior_hook = frv_solib_create_inferior_hook;
-  frv_so_ops.special_symbol_handling = frv_special_symbol_handling;
   frv_so_ops.current_sos = frv_current_sos;
   frv_so_ops.open_symbol_file_object = open_symbol_file_object;
   frv_so_ops.in_dynsym_resolve_code = frv_in_dynsym_resolve_code;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib.h ./gdb/solib.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Shared library declarations for GDB, the GNU Debugger.
    
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +26,8 @@ struct target_ops;
 struct target_so_ops;
 struct program_space;
 
+#include "symfile-add-flags.h"
+
 /* Called when we free all symtabs, to free the shared library information
    as well.  */
 
@@ -34,7 +36,7 @@ extern void clear_solib (void);
 /* Called to add symbols from a shared library to gdb's symbol table.  */
 
 extern void solib_add (const char *, int, struct target_ops *, int);
-extern int solib_read_symbols (struct so_list *, int);
+extern int solib_read_symbols (struct so_list *, symfile_add_flags);
 
 /* Function to be called when the inferior starts up, to discover the
    names of shared libraries that are dynamically linked, the base
@@ -80,15 +82,17 @@ extern int libpthread_name_p (const char
 /* Look up symbol from both symbol table and dynamic string table.  */
 
 extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
-					int (*match_sym) (asymbol *, void *),
-					void *data);
+					int (*match_sym) (const asymbol *,
+							  const void *),
+					const void *data);
 
 /* Look up symbol from symbol table.  */
 
 extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
-						    int (*match_sym) (asymbol *,
-								      void *),
-						    void *data);
+						    int (*match_sym)
+						      (const asymbol *,
+						       const void *),
+						    const void *data);
 
 /* Enable or disable optional solib event breakpoints as appropriate.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-spu.c ./gdb/solib-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Cell SPU GNU/Linux support -- shared library handling.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -56,8 +56,8 @@ spu_relocate_main_executable (int spufs_
   if (symfile_objfile == NULL)
     return;
 
-  new_offsets = alloca (symfile_objfile->num_sections
-			* sizeof (struct section_offsets));
+  new_offsets = XALLOCAVEC (struct section_offsets,
+			    symfile_objfile->num_sections);
 
   for (i = 0; i < symfile_objfile->num_sections; i++)
     new_offsets->offsets[i] = SPUADDR (spufs_fd, 0);
@@ -105,7 +105,8 @@ append_ocl_sos (struct so_list **link_pt
 
   ALL_OBJFILES (objfile)
     {
-      ocl_program_addr_base = objfile_data (objfile, ocl_program_data_key);
+      ocl_program_addr_base
+	= (CORE_ADDR *) objfile_data (objfile, ocl_program_data_key);
       if (ocl_program_addr_base != NULL)
         {
 	  enum bfd_endian byte_order = bfd_big_endian (objfile->obfd)?
@@ -295,7 +296,7 @@ spu_bfd_iovec_pread (bfd *abfd, void *st
   CORE_ADDR addr = *(CORE_ADDR *)stream;
   int ret;
 
-  ret = target_read_memory (addr + offset, buf, nbytes);
+  ret = target_read_memory (addr + offset, (gdb_byte *) buf, nbytes);
   if (ret != 0)
     {
       bfd_set_error (bfd_error_invalid_operation);
@@ -318,36 +319,32 @@ spu_bfd_iovec_stat (bfd *abfd, void *str
   return 0;
 }
 
-static bfd *
+static gdb_bfd_ref_ptr
 spu_bfd_fopen (char *name, CORE_ADDR addr)
 {
-  bfd *nbfd;
+  CORE_ADDR *open_closure = XNEW (CORE_ADDR);
 
-  CORE_ADDR *open_closure = xmalloc (sizeof (CORE_ADDR));
   *open_closure = addr;
 
-  nbfd = gdb_bfd_openr_iovec (name, "elf32-spu",
-			      spu_bfd_iovec_open, open_closure,
-			      spu_bfd_iovec_pread, spu_bfd_iovec_close,
-			      spu_bfd_iovec_stat);
-  if (!nbfd)
+  gdb_bfd_ref_ptr nbfd (gdb_bfd_openr_iovec (name, "elf32-spu",
+					     spu_bfd_iovec_open, open_closure,
+					     spu_bfd_iovec_pread,
+					     spu_bfd_iovec_close,
+					     spu_bfd_iovec_stat));
+  if (nbfd == NULL)
     return NULL;
 
-  if (!bfd_check_format (nbfd, bfd_object))
-    {
-      gdb_bfd_unref (nbfd);
-      return NULL;
-    }
+  if (!bfd_check_format (nbfd.get (), bfd_object))
+    return NULL;
 
   return nbfd;
 }
 
 /* Open shared library BFD.  */
-static bfd *
+static gdb_bfd_ref_ptr
 spu_bfd_open (char *pathname)
 {
   char *original_name = strrchr (pathname, '@');
-  bfd *abfd;
   asection *spu_name;
   unsigned long long addr;
   int fd;
@@ -361,21 +358,23 @@ spu_bfd_open (char *pathname)
     internal_error (__FILE__, __LINE__, "bad object ID");
 
   /* Open BFD representing SPE executable.  */
-  abfd = spu_bfd_fopen (original_name, (CORE_ADDR) addr);
-  if (!abfd)
+  gdb_bfd_ref_ptr abfd (spu_bfd_fopen (original_name, (CORE_ADDR) addr));
+  if (abfd == NULL)
     error (_("Cannot read SPE executable at %s"), original_name);
 
   /* Retrieve SPU name note.  */
-  spu_name = bfd_get_section_by_name (abfd, ".note.spu_name");
+  spu_name = bfd_get_section_by_name (abfd.get (), ".note.spu_name");
   if (spu_name)
     {
-      int sect_size = bfd_section_size (abfd, spu_name);
+      int sect_size = bfd_section_size (abfd.get (), spu_name);
 
       if (sect_size > 20)
 	{
-	  char *buf = alloca (sect_size - 20 + strlen (original_name) + 1);
+	  char *buf
+	    = (char *) alloca (sect_size - 20 + strlen (original_name) + 1);
 
-	  bfd_get_section_contents (abfd, spu_name, buf, 20, sect_size - 20);
+	  bfd_get_section_contents (abfd.get (), spu_name, buf, 20,
+				    sect_size - 20);
 	  buf[sect_size - 20] = '\0';
 
 	  strcat (buf, original_name);
@@ -389,7 +388,7 @@ spu_bfd_open (char *pathname)
 }
 
 /* Lookup global symbol in a SPE executable.  */
-static struct symbol *
+static struct block_symbol
 spu_lookup_lib_symbol (struct objfile *objfile,
 		       const char *name,
 		       const domain_enum domain)
@@ -399,7 +398,7 @@ spu_lookup_lib_symbol (struct objfile *o
 
   if (svr4_so_ops.lookup_lib_global_symbol != NULL)
     return svr4_so_ops.lookup_lib_global_symbol (objfile, name, domain);
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Enable shared library breakpoint.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-spu.h ./gdb/solib-spu.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-spu.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-spu.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Cell SPU GNU/Linux support -- shared library handling.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-svr4.c ./gdb/solib-svr4.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-svr4.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-svr4.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle SVR4 shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -197,7 +197,7 @@ lm_info_read (CORE_ADDR lm_addr)
   struct lm_info *lm_info;
   struct cleanup *back_to;
 
-  lm = xmalloc (lmo->link_map_size);
+  lm = (gdb_byte *) xmalloc (lmo->link_map_size);
   back_to = make_cleanup (xfree, lm);
 
   if (target_read_memory (lm_addr, lm, lmo->link_map_size) != 0)
@@ -210,7 +210,7 @@ lm_info_read (CORE_ADDR lm_addr)
     {
       struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
 
-      lm_info = xzalloc (sizeof (*lm_info));
+      lm_info = XCNEW (struct lm_info);
       lm_info->lm_addr = lm_addr;
 
       lm_info->l_addr_inferior = extract_typed_address (&lm[lmo->l_addr_offset],
@@ -405,7 +405,7 @@ free_solib_list (struct svr4_info *info)
 static void
 svr4_pspace_data_cleanup (struct program_space *pspace, void *arg)
 {
-  struct svr4_info *info = arg;
+  struct svr4_info *info = (struct svr4_info *) arg;
 
   free_probes_table (info);
   free_solib_list (info);
@@ -421,7 +421,8 @@ get_svr4_info (void)
 {
   struct svr4_info *info;
 
-  info = program_space_data (current_program_space, solib_svr4_pspace_data);
+  info = (struct svr4_info *) program_space_data (current_program_space,
+						  solib_svr4_pspace_data);
   if (info != NULL)
     return info;
 
@@ -443,10 +444,12 @@ static int match_main (const char *);
    Return a pointer to allocated memory holding the program header contents,
    or NULL on failure.  If sucessful, and unless P_SECT_SIZE is NULL, the
    size of those contents is returned to P_SECT_SIZE.  Likewise, the target
-   architecture size (32-bit or 64-bit) is returned to P_ARCH_SIZE.  */
+   architecture size (32-bit or 64-bit) is returned to P_ARCH_SIZE and
+   the base address of the section is returned in BASE_ADDR.  */
 
 static gdb_byte *
-read_program_header (int type, int *p_sect_size, int *p_arch_size)
+read_program_header (int type, int *p_sect_size, int *p_arch_size,
+		     CORE_ADDR *base_addr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   CORE_ADDR at_phdr, at_phent, at_phnum, pt_phdr = 0;
@@ -565,7 +568,7 @@ read_program_header (int type, int *p_se
     }
 
   /* Read in requested program header.  */
-  buf = xmalloc (sect_size);
+  buf = (gdb_byte *) xmalloc (sect_size);
   if (target_read_memory (sect_addr, buf, sect_size))
     {
       xfree (buf);
@@ -576,6 +579,8 @@ read_program_header (int type, int *p_se
     *p_arch_size = arch_size;
   if (p_sect_size)
     *p_sect_size = sect_size;
+  if (base_addr)
+    *base_addr = sect_addr;
 
   return buf;
 }
@@ -598,14 +603,14 @@ find_program_interpreter (void)
       {
 	int sect_size = bfd_section_size (exec_bfd, interp_sect);
 
-	buf = xmalloc (sect_size);
+	buf = (gdb_byte *) xmalloc (sect_size);
 	bfd_get_section_contents (exec_bfd, interp_sect, buf, 0, sect_size);
       }
    }
 
   /* If we didn't find it, use the target auxillary vector.  */
   if (!buf)
-    buf = read_program_header (PT_INTERP, NULL, NULL);
+    buf = read_program_header (PT_INTERP, NULL, NULL, NULL);
 
   return (char *) buf;
 }
@@ -615,7 +620,8 @@ find_program_interpreter (void)
    found, 1 is returned and the corresponding PTR is set.  */
 
 static int
-scan_dyntag (const int desired_dyntag, bfd *abfd, CORE_ADDR *ptr)
+scan_dyntag (const int desired_dyntag, bfd *abfd, CORE_ADDR *ptr,
+	     CORE_ADDR *ptr_addr)
 {
   int arch_size, step, sect_size;
   long current_dyntag;
@@ -661,7 +667,7 @@ scan_dyntag (const int desired_dyntag, b
   /* Read in .dynamic from the BFD.  We will get the actual value
      from memory later.  */
   sect_size = bfd_section_size (abfd, sect);
-  buf = bufstart = alloca (sect_size);
+  buf = bufstart = (gdb_byte *) alloca (sect_size);
   if (!bfd_get_section_contents (abfd, sect,
 				 buf, 0, sect_size))
     return 0;
@@ -695,13 +701,15 @@ scan_dyntag (const int desired_dyntag, b
 	   {
 	     struct type *ptr_type;
 	     gdb_byte ptr_buf[8];
-	     CORE_ADDR ptr_addr;
+	     CORE_ADDR ptr_addr_1;
 
 	     ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
-	     ptr_addr = dyn_addr + (buf - bufstart) + arch_size / 8;
-	     if (target_read_memory (ptr_addr, ptr_buf, arch_size / 8) == 0)
+	     ptr_addr_1 = dyn_addr + (buf - bufstart) + arch_size / 8;
+	     if (target_read_memory (ptr_addr_1, ptr_buf, arch_size / 8) == 0)
 	       dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
 	     *ptr = dyn_ptr;
+	     if (ptr_addr)
+	       *ptr_addr = dyn_addr + (buf - bufstart);
 	   }
 	 return 1;
        }
@@ -715,16 +723,19 @@ scan_dyntag (const int desired_dyntag, b
    is returned and the corresponding PTR is set.  */
 
 static int
-scan_dyntag_auxv (const int desired_dyntag, CORE_ADDR *ptr)
+scan_dyntag_auxv (const int desired_dyntag, CORE_ADDR *ptr,
+		  CORE_ADDR *ptr_addr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   int sect_size, arch_size, step;
   long current_dyntag;
   CORE_ADDR dyn_ptr;
+  CORE_ADDR base_addr;
   gdb_byte *bufend, *bufstart, *buf;
 
   /* Read in .dynamic section.  */
-  buf = bufstart = read_program_header (PT_DYNAMIC, &sect_size, &arch_size);
+  buf = bufstart = read_program_header (PT_DYNAMIC, &sect_size, &arch_size,
+					&base_addr);
   if (!buf)
     return 0;
 
@@ -761,6 +772,9 @@ scan_dyntag_auxv (const int desired_dynt
 	if (ptr)
 	  *ptr = dyn_ptr;
 
+	if (ptr_addr)
+	  *ptr_addr = base_addr + buf - bufstart;
+
 	xfree (bufstart);
 	return 1;
       }
@@ -786,19 +800,19 @@ static CORE_ADDR
 elf_locate_base (void)
 {
   struct bound_minimal_symbol msymbol;
-  CORE_ADDR dyn_ptr;
+  CORE_ADDR dyn_ptr, dyn_ptr_addr;
 
   /* Look for DT_MIPS_RLD_MAP first.  MIPS executables use this
      instead of DT_DEBUG, although they sometimes contain an unused
      DT_DEBUG.  */
-  if (scan_dyntag (DT_MIPS_RLD_MAP, exec_bfd, &dyn_ptr)
-      || scan_dyntag_auxv (DT_MIPS_RLD_MAP, &dyn_ptr))
+  if (scan_dyntag (DT_MIPS_RLD_MAP, exec_bfd, &dyn_ptr, NULL)
+      || scan_dyntag_auxv (DT_MIPS_RLD_MAP, &dyn_ptr, NULL))
     {
       struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
       gdb_byte *pbuf;
       int pbuf_size = TYPE_LENGTH (ptr_type);
 
-      pbuf = alloca (pbuf_size);
+      pbuf = (gdb_byte *) alloca (pbuf_size);
       /* DT_MIPS_RLD_MAP contains a pointer to the address
 	 of the dynamic link structure.  */
       if (target_read_memory (dyn_ptr, pbuf, pbuf_size))
@@ -806,9 +820,27 @@ elf_locate_base (void)
       return extract_typed_address (pbuf, ptr_type);
     }
 
+  /* Then check DT_MIPS_RLD_MAP_REL.  MIPS executables now use this form
+     because of needing to support PIE.  DT_MIPS_RLD_MAP will also exist
+     in non-PIE.  */
+  if (scan_dyntag (DT_MIPS_RLD_MAP_REL, exec_bfd, &dyn_ptr, &dyn_ptr_addr)
+      || scan_dyntag_auxv (DT_MIPS_RLD_MAP_REL, &dyn_ptr, &dyn_ptr_addr))
+    {
+      struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+      gdb_byte *pbuf;
+      int pbuf_size = TYPE_LENGTH (ptr_type);
+
+      pbuf = (gdb_byte *) alloca (pbuf_size);
+      /* DT_MIPS_RLD_MAP_REL contains an offset from the address of the
+	 DT slot to the address of the dynamic link structure.  */
+      if (target_read_memory (dyn_ptr + dyn_ptr_addr, pbuf, pbuf_size))
+	return 0;
+      return extract_typed_address (pbuf, ptr_type);
+    }
+
   /* Find DT_DEBUG.  */
-  if (scan_dyntag (DT_DEBUG, exec_bfd, &dyn_ptr)
-      || scan_dyntag_auxv (DT_DEBUG, &dyn_ptr))
+  if (scan_dyntag (DT_DEBUG, exec_bfd, &dyn_ptr, NULL)
+      || scan_dyntag_auxv (DT_DEBUG, &dyn_ptr, NULL))
     return dyn_ptr;
 
   /* This may be a static executable.  Look for the symbol
@@ -987,9 +1019,13 @@ open_symbol_file_object (void *from_ttyp
   struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
   struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
   int l_name_size = TYPE_LENGTH (ptr_type);
-  gdb_byte *l_name_buf = xmalloc (l_name_size);
+  gdb_byte *l_name_buf = (gdb_byte *) xmalloc (l_name_size);
   struct cleanup *cleanups = make_cleanup (xfree, l_name_buf);
   struct svr4_info *info = get_svr4_info ();
+  symfile_add_flags add_flags = 0;
+
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
 
   if (symfile_objfile)
     if (!query (_("Attempt to reload symbols from process? ")))
@@ -1039,7 +1075,7 @@ open_symbol_file_object (void *from_ttyp
     }
 
   /* Have a pathname: read the symbol file.  */
-  symbol_file_add_main (filename, from_tty);
+  symbol_file_add_main (filename, add_flags);
 
   do_cleanups (cleanups);
   return 1;
@@ -1102,10 +1138,10 @@ svr4_copy_library_list (struct so_list *
     {
       struct so_list *newobj;
 
-      newobj = xmalloc (sizeof (struct so_list));
+      newobj = XNEW (struct so_list);
       memcpy (newobj, src, sizeof (struct so_list));
 
-      newobj->lm_info = xmalloc (sizeof (struct lm_info));
+      newobj->lm_info = XNEW (struct lm_info);
       memcpy (newobj->lm_info, src->lm_info, sizeof (struct lm_info));
 
       newobj->next = NULL;
@@ -1130,11 +1166,15 @@ library_list_start_library (struct gdb_x
 			    const struct gdb_xml_element *element,
 			    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct svr4_library_list *list = user_data;
-  const char *name = xml_find_attribute (attributes, "name")->value;
-  ULONGEST *lmp = xml_find_attribute (attributes, "lm")->value;
-  ULONGEST *l_addrp = xml_find_attribute (attributes, "l_addr")->value;
-  ULONGEST *l_ldp = xml_find_attribute (attributes, "l_ld")->value;
+  struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+  const char *name
+    = (const char *) xml_find_attribute (attributes, "name")->value;
+  ULONGEST *lmp
+    = (ULONGEST *) xml_find_attribute (attributes, "lm")->value;
+  ULONGEST *l_addrp
+    = (ULONGEST *) xml_find_attribute (attributes, "l_addr")->value;
+  ULONGEST *l_ldp
+    = (ULONGEST *) xml_find_attribute (attributes, "l_ld")->value;
   struct so_list *new_elem;
 
   new_elem = XCNEW (struct so_list);
@@ -1158,8 +1198,9 @@ svr4_library_list_start_list (struct gdb
 			      const struct gdb_xml_element *element,
 			      void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct svr4_library_list *list = user_data;
-  const char *version = xml_find_attribute (attributes, "version")->value;
+  struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+  const char *version
+    = (const char *) xml_find_attribute (attributes, "version")->value;
   struct gdb_xml_value *main_lm = xml_find_attribute (attributes, "main-lm");
 
   if (strcmp (version, "1.0") != 0)
@@ -1292,7 +1333,7 @@ svr4_default_sos (void)
 
   newobj = XCNEW (struct so_list);
 
-  newobj->lm_info = xzalloc (sizeof (struct lm_info));
+  newobj->lm_info = XCNEW (struct lm_info);
 
   /* Nothing will ever check the other fields if we set l_addr_p.  */
   newobj->lm_info->l_addr = info->debug_loader_offset;
@@ -1668,7 +1709,7 @@ struct probe_and_action
 static hashval_t
 hash_probe_and_action (const void *p)
 {
-  const struct probe_and_action *pa = p;
+  const struct probe_and_action *pa = (const struct probe_and_action *) p;
 
   return (hashval_t) pa->address;
 }
@@ -1679,8 +1720,8 @@ hash_probe_and_action (const void *p)
 static int
 equal_probe_and_action (const void *p1, const void *p2)
 {
-  const struct probe_and_action *pa1 = p1;
-  const struct probe_and_action *pa2 = p2;
+  const struct probe_and_action *pa1 = (const struct probe_and_action *) p1;
+  const struct probe_and_action *pa2 = (const struct probe_and_action *) p2;
 
   return pa1->address == pa2->address;
 }
@@ -1741,7 +1782,7 @@ static enum probe_action
 solib_event_probe_action (struct probe_and_action *pa)
 {
   enum probe_action action;
-  unsigned probe_argc;
+  unsigned probe_argc = 0;
   struct frame_info *frame = get_current_frame ();
 
   action = pa->action;
@@ -1755,7 +1796,23 @@ solib_event_probe_action (struct probe_a
        arg0: Lmid_t lmid (mandatory)
        arg1: struct r_debug *debug_base (mandatory)
        arg2: struct link_map *new (optional, for incremental updates)  */
-  probe_argc = get_probe_argument_count (pa->probe, frame);
+  TRY
+    {
+      probe_argc = get_probe_argument_count (pa->probe, frame);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      exception_print (gdb_stderr, ex);
+      probe_argc = 0;
+    }
+  END_CATCH
+
+  /* If get_probe_argument_count throws an exception, probe_argc will
+     be set to zero.  However, if pa->probe does not have arguments,
+     then get_probe_argument_count will succeed but probe_argc will
+     also be zero.  Both cases happen because of different things, but
+     they are treated equally here: action will be set to
+     PROBES_INTERFACE_FAILED.  */
   if (probe_argc == 2)
     action = FULL_RELOAD;
   else if (probe_argc < 2)
@@ -1861,9 +1918,8 @@ svr4_handle_solib_event (void)
   struct probe_and_action *pa;
   enum probe_action action;
   struct cleanup *old_chain, *usm_chain;
-  struct value *val;
+  struct value *val = NULL;
   CORE_ADDR pc, debug_base, lm = 0;
-  int is_initial_ns;
   struct frame_info *frame = get_current_frame ();
 
   /* Do nothing if not using the probes interface.  */
@@ -1909,7 +1965,17 @@ svr4_handle_solib_event (void)
   usm_chain = make_cleanup (resume_section_map_updates_cleanup,
 			    current_program_space);
 
-  val = evaluate_probe_argument (pa->probe, 1, frame);
+  TRY
+    {
+      val = evaluate_probe_argument (pa->probe, 1, frame);
+    }
+  CATCH (ex, RETURN_MASK_ERROR)
+    {
+      exception_print (gdb_stderr, ex);
+      val = NULL;
+    }
+  END_CATCH
+
   if (val == NULL)
     {
       do_cleanups (old_chain);
@@ -1940,7 +2006,18 @@ svr4_handle_solib_event (void)
 
   if (action == UPDATE_OR_RELOAD)
     {
-      val = evaluate_probe_argument (pa->probe, 2, frame);
+      TRY
+	{
+	  val = evaluate_probe_argument (pa->probe, 2, frame);
+	}
+      CATCH (ex, RETURN_MASK_ERROR)
+	{
+	  exception_print (gdb_stderr, ex);
+	  do_cleanups (old_chain);
+	  return;
+	}
+      END_CATCH
+
       if (val != NULL)
 	lm = value_as_address (val);
 
@@ -1987,7 +2064,8 @@ svr4_update_solib_event_breakpoint (stru
       struct svr4_info *info;
       struct probe_and_action *pa;
 
-      info = program_space_data (loc->pspace, solib_svr4_pspace_data);
+      info = ((struct svr4_info *)
+	      program_space_data (loc->pspace, solib_svr4_pspace_data));
       if (info == NULL || info->probes_table == NULL)
 	continue;
 
@@ -2145,7 +2223,7 @@ svr4_create_solib_event_breakpoints (str
 /* Helper function for gdb_bfd_lookup_symbol.  */
 
 static int
-cmp_name_and_sec_flags (asymbol *sym, void *data)
+cmp_name_and_sec_flags (const asymbol *sym, const void *data)
 {
   return (strcmp (sym->name, (const char *) data) == 0
 	  && (sym->section->flags & (SEC_CODE | SEC_DATA)) != 0);
@@ -2277,7 +2355,6 @@ enable_break (struct svr4_info *info, in
       int load_addr_found = 0;
       int loader_found_in_list = 0;
       struct so_list *so;
-      bfd *tmp_bfd = NULL;
       struct target_ops *tmp_bfd_target;
 
       sym_addr = 0;
@@ -2291,6 +2368,7 @@ enable_break (struct svr4_info *info, in
          be trivial on GNU/Linux).  Therefore, we have to try an alternate
          mechanism to find the dynamic linker's base address.  */
 
+      gdb_bfd_ref_ptr tmp_bfd;
       TRY
         {
 	  tmp_bfd = solib_bfd_open (interp_name);
@@ -2304,11 +2382,9 @@ enable_break (struct svr4_info *info, in
 	goto bkpt_at_symbol;
 
       /* Now convert the TMP_BFD into a target.  That way target, as
-         well as BFD operations can be used.  */
-      tmp_bfd_target = target_bfd_reopen (tmp_bfd);
-      /* target_bfd_reopen acquired its own reference, so we can
-         release ours now.  */
-      gdb_bfd_unref (tmp_bfd);
+         well as BFD operations can be used.  target_bfd_reopen
+         acquires its own reference.  */
+      tmp_bfd_target = target_bfd_reopen (tmp_bfd.get ());
 
       /* On a running target, we can get the dynamic linker's base
          address from the shared library table.  */
@@ -2319,7 +2395,7 @@ enable_break (struct svr4_info *info, in
 	    {
 	      load_addr_found = 1;
 	      loader_found_in_list = 1;
-	      load_addr = lm_addr_check (so, tmp_bfd);
+	      load_addr = lm_addr_check (so, tmp_bfd.get ());
 	      break;
 	    }
 	  so = so->next;
@@ -2340,7 +2416,7 @@ enable_break (struct svr4_info *info, in
 	    if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
 	      {
 		CORE_ADDR space_size = (CORE_ADDR) 1 << addr_bit;
-		CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd,
+		CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd.get (),
 							      tmp_bfd_target);
 
 		gdb_assert (load_addr < space_size);
@@ -2369,7 +2445,7 @@ enable_break (struct svr4_info *info, in
 	    = get_thread_arch_regcache (inferior_ptid, target_gdbarch ());
 
 	  load_addr = (regcache_read_pc (regcache)
-		       - exec_entry_point (tmp_bfd, tmp_bfd_target));
+		       - exec_entry_point (tmp_bfd.get (), tmp_bfd_target));
 	}
 
       if (!loader_found_in_list)
@@ -2382,30 +2458,31 @@ enable_break (struct svr4_info *info, in
 
       /* Record the relocated start and end address of the dynamic linker
          text and plt section for svr4_in_dynsym_resolve_code.  */
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".text");
       if (interp_sect)
 	{
 	  info->interp_text_sect_low =
-	    bfd_section_vma (tmp_bfd, interp_sect) + load_addr;
+	    bfd_section_vma (tmp_bfd.get (), interp_sect) + load_addr;
 	  info->interp_text_sect_high =
 	    info->interp_text_sect_low
-	    + bfd_section_size (tmp_bfd, interp_sect);
+	    + bfd_section_size (tmp_bfd.get (), interp_sect);
 	}
-      interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");
+      interp_sect = bfd_get_section_by_name (tmp_bfd.get (), ".plt");
       if (interp_sect)
 	{
 	  info->interp_plt_sect_low =
-	    bfd_section_vma (tmp_bfd, interp_sect) + load_addr;
+	    bfd_section_vma (tmp_bfd.get (), interp_sect) + load_addr;
 	  info->interp_plt_sect_high =
 	    info->interp_plt_sect_low
-	    + bfd_section_size (tmp_bfd, interp_sect);
+	    + bfd_section_size (tmp_bfd.get (), interp_sect);
 	}
 
       /* Now try to set a breakpoint in the dynamic linker.  */
       for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
 	{
-	  sym_addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name_and_sec_flags,
-					    (void *) *bkpt_namep);
+	  sym_addr = gdb_bfd_lookup_symbol (tmp_bfd.get (),
+					    cmp_name_and_sec_flags,
+					    *bkpt_namep);
 	  if (sym_addr != 0)
 	    break;
 	}
@@ -2478,14 +2555,6 @@ enable_break (struct svr4_info *info, in
   return 0;
 }
 
-/* Implement the "special_symbol_handling" target_so_ops method.  */
-
-static void
-svr4_special_symbol_handling (void)
-{
-  /* Nothing to do.  */
-}
-
 /* Read the ELF program headers from ABFD.  Return the contents and
    set *PHDRS_SIZE to the size of the program headers.  */
 
@@ -2501,7 +2570,7 @@ read_program_headers_from_bfd (bfd *abfd
   if (*phdrs_size == 0)
     return NULL;
 
-  buf = xmalloc (*phdrs_size);
+  buf = (gdb_byte *) xmalloc (*phdrs_size);
   if (bfd_seek (abfd, ehdr->e_phoff, SEEK_SET) != 0
       || bfd_bread (buf, *phdrs_size, abfd) != *phdrs_size)
     {
@@ -2607,7 +2676,7 @@ svr4_exec_displacement (CORE_ADDR *displ
       gdb_byte *buf, *buf2;
       int arch_size;
 
-      buf = read_program_header (-1, &phdrs_size, &arch_size);
+      buf = read_program_header (-1, &phdrs_size, &arch_size, NULL);
       buf2 = read_program_headers_from_bfd (exec_bfd, &phdrs2_size);
       if (buf != NULL && buf2 != NULL)
 	{
@@ -2965,8 +3034,8 @@ svr4_relocate_main_executable (void)
       struct section_offsets *new_offsets;
       int i;
 
-      new_offsets = alloca (symfile_objfile->num_sections
-			    * sizeof (*new_offsets));
+      new_offsets = XALLOCAVEC (struct section_offsets,
+				symfile_objfile->num_sections);
 
       for (i = 0; i < symfile_objfile->num_sections; i++)
 	new_offsets->offsets[i] = displacement;
@@ -3108,7 +3177,8 @@ void
 set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
                                        struct link_map_offsets *(*flmo) (void))
 {
-  struct solib_svr4_ops *ops = gdbarch_data (gdbarch, solib_svr4_data);
+  struct solib_svr4_ops *ops
+    = (struct solib_svr4_ops *) gdbarch_data (gdbarch, solib_svr4_data);
 
   ops->fetch_link_map_offsets = flmo;
 
@@ -3121,7 +3191,9 @@ set_solib_svr4_fetch_link_map_offsets (s
 static struct link_map_offsets *
 svr4_fetch_link_map_offsets (void)
 {
-  struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+  struct solib_svr4_ops *ops
+    = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+					      solib_svr4_data);
 
   gdb_assert (ops->fetch_link_map_offsets);
   return ops->fetch_link_map_offsets ();
@@ -3132,7 +3204,9 @@ svr4_fetch_link_map_offsets (void)
 static int
 svr4_have_link_map_offsets (void)
 {
-  struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+  struct solib_svr4_ops *ops
+    = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+					      solib_svr4_data);
 
   return (ops->fetch_link_map_offsets != NULL);
 }
@@ -3211,7 +3285,7 @@ struct target_so_ops svr4_so_ops;
    different rule for symbol lookup.  The lookup begins here in the DSO, not in
    the main executable.  */
 
-static struct symbol *
+static struct block_symbol
 elf_lookup_lib_symbol (struct objfile *objfile,
 		       const char *name,
 		       const domain_enum domain)
@@ -3228,8 +3302,8 @@ elf_lookup_lib_symbol (struct objfile *o
       abfd = objfile->obfd;
     }
 
-  if (abfd == NULL || scan_dyntag (DT_SYMBOLIC, abfd, NULL) != 1)
-    return NULL;
+  if (abfd == NULL || scan_dyntag (DT_SYMBOLIC, abfd, NULL, NULL) != 1)
+    return (struct block_symbol) {NULL, NULL};
 
   return lookup_global_symbol_from_objfile (objfile, name, domain);
 }
@@ -3248,7 +3322,6 @@ _initialize_svr4_solib (void)
   svr4_so_ops.clear_so = svr4_clear_so;
   svr4_so_ops.clear_solib = svr4_clear_solib;
   svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook;
-  svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling;
   svr4_so_ops.current_sos = svr4_current_sos;
   svr4_so_ops.open_symbol_file_object = open_symbol_file_object;
   svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-svr4.h ./gdb/solib-svr4.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-svr4.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-svr4.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-target.c ./gdb/solib-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for targets which report shared library events.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -80,9 +80,10 @@ library_list_start_segment (struct gdb_x
 			    const struct gdb_xml_element *element,
 			    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  VEC(lm_info_p) **list = user_data;
+  VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *last = VEC_last (lm_info_p, *list);
-  ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+  ULONGEST *address_p
+    = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
   CORE_ADDR address = (CORE_ADDR) *address_p;
 
   if (last->section_bases != NULL)
@@ -97,9 +98,10 @@ library_list_start_section (struct gdb_x
 			    const struct gdb_xml_element *element,
 			    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  VEC(lm_info_p) **list = user_data;
+  VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *last = VEC_last (lm_info_p, *list);
-  ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+  ULONGEST *address_p
+    = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
   CORE_ADDR address = (CORE_ADDR) *address_p;
 
   if (last->segment_bases != NULL)
@@ -116,9 +118,10 @@ library_list_start_library (struct gdb_x
 			    const struct gdb_xml_element *element,
 			    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  VEC(lm_info_p) **list = user_data;
+  VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *item = XCNEW (struct lm_info);
-  const char *name = xml_find_attribute (attributes, "name")->value;
+  const char *name
+    = (const char *) xml_find_attribute (attributes, "name")->value;
 
   item->name = xstrdup (name);
   VEC_safe_push (lm_info_p, *list, item);
@@ -129,7 +132,7 @@ library_list_end_library (struct gdb_xml
 			  const struct gdb_xml_element *element,
 			  void *user_data, const char *body_text)
 {
-  VEC(lm_info_p) **list = user_data;
+  VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *lm_info = VEC_last (lm_info_p, *list);
 
   if (lm_info->segment_bases == NULL
@@ -151,7 +154,7 @@ library_list_start_list (struct gdb_xml_
   /* #FIXED attribute may be omitted, Expat returns NULL in such case.  */
   if (version != NULL)
     {
-      const char *string = version->value;
+      const char *string = (const char *) version->value;
 
       if (strcmp (string, "1.0") != 0)
 	gdb_xml_error (parser,
@@ -165,7 +168,7 @@ library_list_start_list (struct gdb_xml_
 static void
 solib_target_free_library_list (void *p)
 {
-  VEC(lm_info_p) **result = p;
+  VEC(lm_info_p) **result = (VEC(lm_info_p) **) p;
   struct lm_info *info;
   int ix;
 
@@ -307,12 +310,6 @@ solib_target_current_sos (void)
 }
 
 static void
-solib_target_special_symbol_handling (void)
-{
-  /* Nothing needed.  */
-}
-
-static void
 solib_target_solib_create_inferior_hook (int from_tty)
 {
   /* Nothing needed.  */
@@ -345,7 +342,9 @@ solib_target_relocate_section_addresses 
     {
       int num_sections = gdb_bfd_count_sections (so->abfd);
 
-      so->lm_info->offsets = xzalloc (SIZEOF_N_SECTION_OFFSETS (num_sections));
+      so->lm_info->offsets
+	= ((struct section_offsets *)
+	   xzalloc (SIZEOF_N_SECTION_OFFSETS (num_sections)));
 
       if (so->lm_info->section_bases)
 	{
@@ -498,8 +497,6 @@ _initialize_solib_target (void)
   solib_target_so_ops.clear_solib = solib_target_clear_solib;
   solib_target_so_ops.solib_create_inferior_hook
     = solib_target_solib_create_inferior_hook;
-  solib_target_so_ops.special_symbol_handling
-    = solib_target_special_symbol_handling;
   solib_target_so_ops.current_sos = solib_target_current_sos;
   solib_target_so_ops.open_symbol_file_object
     = solib_target_open_symbol_file_object;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-target.h ./gdb/solib-target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solib-target.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solib-target.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solist.h ./gdb/solist.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/solist.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/solist.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Shared library declarations for GDB, the GNU Debugger.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #define SO_NAME_MAX_PATH_SIZE 512	/* FIXME: Should be dynamic */
 /* For domain_enum domain.  */
 #include "symtab.h"
+#include "gdb_bfd.h"
 
 /* Forward declaration for target specific link map information.  This
    struct is opaque to all but the target specific file.  */
@@ -100,12 +101,6 @@ struct target_so_ops
     /* Target dependent code to run after child process fork.  */
     void (*solib_create_inferior_hook) (int from_tty);
 
-    /* Do additional symbol handling, lookup, etc. after symbols for a
-       shared object have been loaded in the usual way.  This is
-       called to do any system specific symbol handling that might be
-       needed.  */
-    void (*special_symbol_handling) (void);
-
     /* Construct a list of the currently loaded shared objects.  This
        list does not include an entry for the main executable file.
 
@@ -127,19 +122,20 @@ struct target_so_ops
     int (*in_dynsym_resolve_code) (CORE_ADDR pc);
 
     /* Find and open shared library binary file.  */
-    bfd *(*bfd_open) (char *pathname);
+    gdb_bfd_ref_ptr (*bfd_open) (char *pathname);
 
     /* Optional extra hook for finding and opening a solib.
        If TEMP_PATHNAME is non-NULL: If the file is successfully opened a
        pointer to a malloc'd and realpath'd copy of SONAME is stored there,
        otherwise NULL is stored there.  */
-    int (*find_and_open_solib) (char *soname,
+    int (*find_and_open_solib) (const char *soname,
         unsigned o_flags, char **temp_pathname);
 
     /* Hook for looking up global symbols in a library-specific way.  */
-    struct symbol * (*lookup_lib_global_symbol) (struct objfile *objfile,
-						 const char *name,
-						 const domain_enum domain);
+    struct block_symbol (*lookup_lib_global_symbol)
+      (struct objfile *objfile,
+       const char *name,
+       const domain_enum domain);
 
     /* Given two so_list objects, one from the GDB thread list
        and another from the list returned by current_sos, return 1
@@ -177,23 +173,23 @@ void free_so (struct so_list *so);
 struct so_list *master_so_list (void);
 
 /* Find main executable binary file.  */
-extern char *exec_file_find (char *in_pathname, int *fd);
+extern char *exec_file_find (const char *in_pathname, int *fd);
 
 /* Find shared library binary file.  */
-extern char *solib_find (char *in_pathname, int *fd);
+extern char *solib_find (const char *in_pathname, int *fd);
 
 /* Open BFD for shared library file.  */
-extern bfd *solib_bfd_fopen (char *pathname, int fd);
+extern gdb_bfd_ref_ptr solib_bfd_fopen (char *pathname, int fd);
 
 /* Find solib binary file and open it.  */
-extern bfd *solib_bfd_open (char *in_pathname);
+extern gdb_bfd_ref_ptr solib_bfd_open (char *in_pathname);
 
 /* FIXME: gdbarch needs to control this variable.  */
 extern struct target_so_ops *current_target_so_ops;
 
 /* Handler for library-specific global symbol lookup in solib.c.  */
-struct symbol *solib_global_lookup (struct objfile *objfile,
-				    const char *name,
-				    const domain_enum domain);
+struct block_symbol solib_global_lookup (struct objfile *objfile,
+					    const char *name,
+					    const domain_enum domain);
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol-thread.c ./gdb/sol-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sol-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sol-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Solaris threads debugging interface.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -98,56 +98,82 @@ static void init_sol_thread_ops (void);
 /* Default definitions: These must be defined in tm.h if they are to
    be shared with a process module such as procfs.  */
 
+/* Types of the libthread_db functions.  */
+
+typedef void (td_log_ftype)(const int on_off);
+typedef td_err_e (td_ta_new_ftype)(const struct ps_prochandle *ph_p,
+				   td_thragent_t **ta_pp);
+typedef td_err_e (td_ta_delete_ftype)(td_thragent_t *ta_p);
+typedef td_err_e (td_init_ftype)(void);
+typedef td_err_e (td_ta_get_ph_ftype)(const td_thragent_t *ta_p,
+				      struct ps_prochandle **ph_pp);
+typedef td_err_e (td_ta_get_nthreads_ftype)(const td_thragent_t *ta_p,
+					    int *nthread_p);
+typedef td_err_e (td_ta_tsd_iter_ftype)(const td_thragent_t *ta_p,
+					td_key_iter_f *cb, void *cbdata_p);
+typedef td_err_e (td_ta_thr_iter_ftype)(const td_thragent_t *ta_p,
+					td_thr_iter_f *cb, void *cbdata_p,
+					td_thr_state_e state, int ti_pri,
+					sigset_t *ti_sigmask_p,
+					unsigned ti_user_flags);
+typedef td_err_e (td_thr_validate_ftype)(const td_thrhandle_t *th_p);
+typedef td_err_e (td_thr_tsd_ftype)(const td_thrhandle_t * th_p,
+				    const thread_key_t key, void **data_pp);
+typedef td_err_e (td_thr_get_info_ftype)(const td_thrhandle_t *th_p,
+					 td_thrinfo_t *ti_p);
+typedef td_err_e (td_thr_getfpregs_ftype)(const td_thrhandle_t *th_p,
+					  prfpregset_t *fpregset);
+typedef td_err_e (td_thr_getxregsize_ftype)(const td_thrhandle_t *th_p,
+					    int *xregsize);
+typedef td_err_e (td_thr_getxregs_ftype)(const td_thrhandle_t *th_p,
+					 const caddr_t xregset);
+typedef td_err_e (td_thr_sigsetmask_ftype)(const td_thrhandle_t *th_p,
+					   const sigset_t ti_sigmask);
+typedef td_err_e (td_thr_setprio_ftype)(const td_thrhandle_t *th_p,
+					const int ti_pri);
+typedef td_err_e (td_thr_setsigpending_ftype)(const td_thrhandle_t *th_p,
+					      const uchar_t ti_pending_flag,
+					      const sigset_t ti_pending);
+typedef td_err_e (td_thr_setfpregs_ftype)(const td_thrhandle_t *th_p,
+					  const prfpregset_t *fpregset);
+typedef td_err_e (td_thr_setxregs_ftype)(const td_thrhandle_t *th_p,
+					 const caddr_t xregset);
+typedef td_err_e (td_ta_map_id2thr_ftype)(const td_thragent_t *ta_p,
+					  thread_t tid,
+					  td_thrhandle_t *th_p);
+typedef td_err_e (td_ta_map_lwp2thr_ftype)(const td_thragent_t *ta_p,
+					   lwpid_t lwpid,
+					   td_thrhandle_t *th_p);
+typedef td_err_e (td_thr_getgregs_ftype)(const td_thrhandle_t *th_p,
+					 prgregset_t regset);
+typedef td_err_e (td_thr_setgregs_ftype)(const td_thrhandle_t *th_p,
+					 const prgregset_t regset);
+
 /* Pointers to routines from libthread_db resolved by dlopen().  */
 
-static void (*p_td_log)(const int on_off);
-static td_err_e (*p_td_ta_new)(const struct ps_prochandle *ph_p,
-			       td_thragent_t **ta_pp);
-static td_err_e (*p_td_ta_delete)(td_thragent_t *ta_p);
-static td_err_e (*p_td_init)(void);
-static td_err_e (*p_td_ta_get_ph)(const td_thragent_t *ta_p,
-				  struct ps_prochandle **ph_pp);
-static td_err_e (*p_td_ta_get_nthreads)(const td_thragent_t *ta_p,
-					int *nthread_p);
-static td_err_e (*p_td_ta_tsd_iter)(const td_thragent_t *ta_p,
-				    td_key_iter_f *cb, void *cbdata_p);
-static td_err_e (*p_td_ta_thr_iter)(const td_thragent_t *ta_p,
-				    td_thr_iter_f *cb, void *cbdata_p,
-				    td_thr_state_e state, int ti_pri,
-				    sigset_t *ti_sigmask_p,
-				    unsigned ti_user_flags);
-static td_err_e (*p_td_thr_validate)(const td_thrhandle_t *th_p);
-static td_err_e (*p_td_thr_tsd)(const td_thrhandle_t * th_p,
-				const thread_key_t key, void **data_pp);
-static td_err_e (*p_td_thr_get_info)(const td_thrhandle_t *th_p,
-				     td_thrinfo_t *ti_p);
-static td_err_e (*p_td_thr_getfpregs)(const td_thrhandle_t *th_p,
-				      prfpregset_t *fpregset);
-static td_err_e (*p_td_thr_getxregsize)(const td_thrhandle_t *th_p,
-					int *xregsize);
-static td_err_e (*p_td_thr_getxregs)(const td_thrhandle_t *th_p,
-				     const caddr_t xregset);
-static td_err_e (*p_td_thr_sigsetmask)(const td_thrhandle_t *th_p,
-				       const sigset_t ti_sigmask);
-static td_err_e (*p_td_thr_setprio)(const td_thrhandle_t *th_p,
-				    const int ti_pri);
-static td_err_e (*p_td_thr_setsigpending)(const td_thrhandle_t *th_p,
-					  const uchar_t ti_pending_flag,
-					  const sigset_t ti_pending);
-static td_err_e (*p_td_thr_setfpregs)(const td_thrhandle_t *th_p,
-				      const prfpregset_t *fpregset);
-static td_err_e (*p_td_thr_setxregs)(const td_thrhandle_t *th_p,
-				     const caddr_t xregset);
-static td_err_e (*p_td_ta_map_id2thr)(const td_thragent_t *ta_p,
-				      thread_t tid,
-				      td_thrhandle_t *th_p);
-static td_err_e (*p_td_ta_map_lwp2thr)(const td_thragent_t *ta_p,
-				       lwpid_t lwpid,
-				       td_thrhandle_t *th_p);
-static td_err_e (*p_td_thr_getgregs)(const td_thrhandle_t *th_p,
-				     prgregset_t regset);
-static td_err_e (*p_td_thr_setgregs)(const td_thrhandle_t *th_p,
-				     const prgregset_t regset);
+static td_log_ftype *p_td_log;
+static td_ta_new_ftype *p_td_ta_new;
+static td_ta_delete_ftype *p_td_ta_delete;
+static td_init_ftype *p_td_init;
+static td_ta_get_ph_ftype *p_td_ta_get_ph;
+static td_ta_get_nthreads_ftype *p_td_ta_get_nthreads;
+static td_ta_tsd_iter_ftype *p_td_ta_tsd_iter;
+static td_ta_thr_iter_ftype *p_td_ta_thr_iter;
+static td_thr_validate_ftype *p_td_thr_validate;
+static td_thr_tsd_ftype *p_td_thr_tsd;
+static td_thr_get_info_ftype *p_td_thr_get_info;
+static td_thr_getfpregs_ftype *p_td_thr_getfpregs;
+static td_thr_getxregsize_ftype *p_td_thr_getxregsize;
+static td_thr_getxregs_ftype *p_td_thr_getxregs;
+static td_thr_sigsetmask_ftype *p_td_thr_sigsetmask;
+static td_thr_setprio_ftype *p_td_thr_setprio;
+static td_thr_setsigpending_ftype *p_td_thr_setsigpending;
+static td_thr_setfpregs_ftype *p_td_thr_setfpregs;
+static td_thr_setxregs_ftype *p_td_thr_setxregs;
+static td_ta_map_id2thr_ftype *p_td_ta_map_id2thr;
+static td_ta_map_lwp2thr_ftype *p_td_ta_map_lwp2thr;
+static td_thr_getgregs_ftype *p_td_thr_getgregs;
+static td_thr_setgregs_ftype *p_td_thr_setgregs;
 
 
 /* Return the libthread_db error string associated with ERRCODE.  If
@@ -818,7 +844,7 @@ ps_err_e
 ps_pdread (gdb_ps_prochandle_t ph, gdb_ps_addr_t addr,
 	   gdb_ps_read_buf_t buf, gdb_ps_size_t size)
 {
-  return rw_common (0, ph, addr, buf, size);
+  return rw_common (0, ph, addr, (gdb_byte *) buf, size);
 }
 
 /* Copies SIZE bytes from debugger memory .data segment to target process.  */
@@ -836,7 +862,7 @@ ps_err_e
 ps_ptread (gdb_ps_prochandle_t ph, gdb_ps_addr_t addr,
 	   gdb_ps_read_buf_t buf, gdb_ps_size_t size)
 {
-  return rw_common (0, ph, addr, buf, size);
+  return rw_common (0, ph, addr, (gdb_byte *) buf, size);
 }
 
 /* Copies SIZE bytes from debugger memory .text segment to target process.  */
@@ -1249,7 +1275,7 @@ _initialize_sol_thread (void)
     goto die;
 
 #define resolve(X) \
-  if (!(p_##X = dlsym (dlhandle, #X))) \
+  if (!(p_##X = (X ## _ftype *) dlsym (dlhandle, #X)))	\
     goto die;
 
   resolve (td_log);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/source.c ./gdb/source.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/source.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/source.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* List lines of source files for GDB, the GNU debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -42,6 +42,8 @@
 #include "completer.h"
 #include "ui-out.h"
 #include "readline/readline.h"
+#include "common/enum-flags.h"
+#include <algorithm>
 
 #define OPEN_MODE (O_RDONLY | O_BINARY)
 #define FDOPEN_MODE FOPEN_RB
@@ -94,7 +96,7 @@ static struct program_space *current_sou
    and friends should be rewritten to count characters and see where
    things are wrapping, but that would be a fair amount of work.  */
 
-int lines_to_list = 10;
+static int lines_to_list = 10;
 static void
 show_lines_to_list (struct ui_file *file, int from_tty,
 		    struct cmd_list_element *c, const char *value)
@@ -274,7 +276,7 @@ select_source_symtab (struct symtab *s)
 
   /* Make the default place to list be the function `main'
      if one exists.  */
-  if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0))
+  if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0).symbol)
     {
       sals = decode_line_with_current_source (main_name (),
 					      DECODE_LINE_FUNFIRSTLINE);
@@ -282,7 +284,7 @@ select_source_symtab (struct symtab *s)
       xfree (sals.sals);
       current_source_pspace = sal.pspace;
       current_source_symtab = sal.symtab;
-      current_source_line = max (sal.line - (lines_to_list - 1), 1);
+      current_source_line = std::max (sal.line - (lines_to_list - 1), 1);
       if (current_source_symtab)
 	return;
     }
@@ -684,9 +686,12 @@ source_info (char *ignore, int from_tty)
 }
 
 
-/* Return True if the file NAME exists and is a regular file.  */
+/* Return True if the file NAME exists and is a regular file.
+   If the result is false then *ERRNO_PTR is set to a useful value assuming
+   we're expecting a regular file.  */
+
 static int
-is_regular_file (const char *name)
+is_regular_file (const char *name, int *errno_ptr)
 {
   struct stat st;
   const int status = stat (name, &st);
@@ -697,9 +702,21 @@ is_regular_file (const char *name)
      on obscure systems where stat does not work as expected.  */
 
   if (status != 0)
-    return (errno != ENOENT);
+    {
+      if (errno != ENOENT)
+	return 1;
+      *errno_ptr = ENOENT;
+      return 0;
+    }
 
-  return S_ISREG (st.st_mode);
+  if (S_ISREG (st.st_mode))
+    return 1;
+
+  if (S_ISDIR (st.st_mode))
+    *errno_ptr = EISDIR;
+  else
+    *errno_ptr = EINVAL;
+  return 0;
 }
 
 /* Open a file named STRING, searching path PATH (dir names sep by some char)
@@ -746,6 +763,9 @@ openp (const char *path, int opts, const
   struct cleanup *back_to;
   int ix;
   char *dir;
+  /* The errno set for the last name we tried to open (and
+     failed).  */
+  int last_errno = 0;
 
   /* The open syscall MODE parameter is not specified.  */
   gdb_assert ((mode & O_CREAT) == 0);
@@ -771,20 +791,22 @@ openp (const char *path, int opts, const
 
   if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string))
     {
-      int i;
+      int i, reg_file_errno;
 
-      if (is_regular_file (string))
+      if (is_regular_file (string, &reg_file_errno))
 	{
-	  filename = alloca (strlen (string) + 1);
+	  filename = (char *) alloca (strlen (string) + 1);
 	  strcpy (filename, string);
 	  fd = gdb_open_cloexec (filename, mode, 0);
 	  if (fd >= 0)
 	    goto done;
+	  last_errno = errno;
 	}
       else
 	{
 	  filename = NULL;
 	  fd = -1;
+	  last_errno = reg_file_errno;
 	}
 
       if (!(opts & OPF_SEARCH_IN_PATH))
@@ -806,8 +828,9 @@ openp (const char *path, int opts, const
     string += 2;
 
   alloclen = strlen (path) + strlen (string) + 2;
-  filename = alloca (alloclen);
+  filename = (char *) alloca (alloclen);
   fd = -1;
+  last_errno = ENOENT;
 
   dir_vec = dirnames_to_char_ptr_vec (path);
   back_to = make_cleanup_free_char_ptr_vec (dir_vec);
@@ -815,6 +838,7 @@ openp (const char *path, int opts, const
   for (ix = 0; VEC_iterate (char_ptr, dir_vec, ix, dir); ++ix)
     {
       size_t len = strlen (dir);
+      int reg_file_errno;
 
       if (strcmp (dir, "$cwd") == 0)
 	{
@@ -827,7 +851,7 @@ openp (const char *path, int opts, const
 	  if (newlen > alloclen)
 	    {
 	      alloclen = newlen;
-	      filename = alloca (alloclen);
+	      filename = (char *) alloca (alloclen);
 	    }
 	  strcpy (filename, current_directory);
 	}
@@ -845,7 +869,7 @@ openp (const char *path, int opts, const
 	  if (newlen > alloclen)
 	    {
 	      alloclen = newlen;
-	      filename = alloca (alloclen);
+	      filename = (char *) alloca (alloclen);
 	    }
 	  strcpy (filename, tilde_expanded);
 	  xfree (tilde_expanded);
@@ -873,12 +897,15 @@ openp (const char *path, int opts, const
       strcat (filename + len, SLASH_STRING);
       strcat (filename, string);
 
-      if (is_regular_file (filename))
+      if (is_regular_file (filename, &reg_file_errno))
 	{
 	  fd = gdb_open_cloexec (filename, mode, 0);
 	  if (fd >= 0)
 	    break;
+	  last_errno = errno;
 	}
+      else
+	last_errno = reg_file_errno;
     }
 
   do_cleanups (back_to);
@@ -895,6 +922,7 @@ done:
 	*filename_opened = gdb_abspath (filename);
     }
 
+  errno = last_errno;
   return fd;
 }
 
@@ -1151,8 +1179,8 @@ symtab_to_fullname (struct symtab *s)
 	  if (SYMTAB_DIRNAME (s) == NULL || IS_ABSOLUTE_PATH (s->filename))
 	    fullname = xstrdup (s->filename);
 	  else
-	    fullname = concat (SYMTAB_DIRNAME (s), SLASH_STRING, s->filename,
-			       NULL);
+	    fullname = concat (SYMTAB_DIRNAME (s), SLASH_STRING,
+			       s->filename, (char *) NULL);
 
 	  back_to = make_cleanup (xfree, fullname);
 	  s->fullname = rewrite_source_path (fullname);
@@ -1197,7 +1225,7 @@ find_source_lines (struct symtab *s, int
   int size;
 
   gdb_assert (s);
-  line_charpos = (int *) xmalloc (lines_allocated * sizeof (int));
+  line_charpos = XNEWVEC (int, lines_allocated);
   if (fstat (desc, &st) < 0)
     perror_with_name (symtab_to_filename_for_display (s));
 
@@ -1320,7 +1348,7 @@ identify_source_line (struct symtab *s, 
 
 static void
 print_source_lines_base (struct symtab *s, int line, int stopline,
-			 enum print_source_lines_flags flags)
+			 print_source_lines_flags flags)
 {
   int c;
   int desc;
@@ -1337,7 +1365,7 @@ print_source_lines_base (struct symtab *
 
   /* If printing of source lines is disabled, just print file and line
      number.  */
-  if (ui_out_test_flags (uiout, ui_source_list))
+  if (uiout->test_flags (ui_source_list))
     {
       /* Only prints "No such file or directory" once.  */
       if ((s != last_source_visited) || (!last_source_error))
@@ -1354,7 +1382,7 @@ print_source_lines_base (struct symtab *
   else
     {
       desc = last_source_error;
-	  flags |= PRINT_SOURCE_LINES_NOERROR;
+      flags |= PRINT_SOURCE_LINES_NOERROR;
       noprint = 1;
     }
 
@@ -1366,26 +1394,23 @@ print_source_lines_base (struct symtab *
 	{
 	  const char *filename = symtab_to_filename_for_display (s);
 	  int len = strlen (filename) + 100;
-	  char *name = alloca (len);
+	  char *name = (char *) alloca (len);
 
 	  xsnprintf (name, len, "%d\t%s", line, filename);
 	  print_sys_errmsg (name, errno);
 	}
       else
 	{
-	  ui_out_field_int (uiout, "line", line);
-	  ui_out_text (uiout, "\tin ");
+	  uiout->field_int ("line", line);
+	  uiout->text ("\tin ");
 
 	  /* CLI expects only the "file" field.  TUI expects only the
 	     "fullname" field (and TUI does break if "file" is printed).
 	     MI expects both fields.  ui_source_list is set only for CLI,
 	     not for TUI.  */
-	  if (ui_out_is_mi_like_p (uiout)
-	      || ui_out_test_flags (uiout, ui_source_list))
-	    ui_out_field_string (uiout, "file",
-				 symtab_to_filename_for_display (s));
-	  if (ui_out_is_mi_like_p (uiout)
-	      || !ui_out_test_flags (uiout, ui_source_list))
+	  if (uiout->is_mi_like_p () || uiout->test_flags (ui_source_list))
+	    uiout->field_string ("file", symtab_to_filename_for_display (s));
+	  if (uiout->is_mi_like_p () || !uiout->test_flags (ui_source_list))
  	    {
 	      const char *s_fullname = symtab_to_fullname (s);
 	      char *local_fullname;
@@ -1393,13 +1418,13 @@ print_source_lines_base (struct symtab *
 	      /* ui_out_field_string may free S_FULLNAME by calling
 		 open_source_file for it again.  See e.g.,
 		 tui_field_string->tui_show_source.  */
-	      local_fullname = alloca (strlen (s_fullname) + 1);
+	      local_fullname = (char *) alloca (strlen (s_fullname) + 1);
 	      strcpy (local_fullname, s_fullname);
 
-	      ui_out_field_string (uiout, "fullname", local_fullname);
+	      uiout->field_string ("fullname", local_fullname);
  	    }
 
-	  ui_out_text (uiout, "\n");
+	  uiout->text ("\n");
 	}
 
       return;
@@ -1437,20 +1462,20 @@ print_source_lines_base (struct symtab *
       last_line_listed = current_source_line;
       if (flags & PRINT_SOURCE_LINES_FILENAME)
         {
-          ui_out_text (uiout, symtab_to_filename_for_display (s));
-          ui_out_text (uiout, ":");
+          uiout->text (symtab_to_filename_for_display (s));
+          uiout->text (":");
         }
       xsnprintf (buf, sizeof (buf), "%d\t", current_source_line++);
-      ui_out_text (uiout, buf);
+      uiout->text (buf);
       do
 	{
 	  if (c < 040 && c != '\t' && c != '\n' && c != '\r')
 	    {
 	      xsnprintf (buf, sizeof (buf), "^%c", c + 0100);
-	      ui_out_text (uiout, buf);
+	      uiout->text (buf);
 	    }
 	  else if (c == 0177)
-	    ui_out_text (uiout, "^?");
+	    uiout->text ("^?");
 	  else if (c == '\r')
 	    {
 	      /* Skip a \r character, but only before a \n.  */
@@ -1464,7 +1489,7 @@ print_source_lines_base (struct symtab *
 	  else
 	    {
 	      xsnprintf (buf, sizeof (buf), "%c", c);
-	      ui_out_text (uiout, buf);
+	      uiout->text (buf);
 	    }
 	}
       while (c != '\n' && (c = fgetc (stream)) >= 0);
@@ -1480,7 +1505,7 @@ print_source_lines_base (struct symtab *
 
 void
 print_source_lines (struct symtab *s, int line, int stopline,
-		    enum print_source_lines_flags flags)
+		    print_source_lines_flags flags)
 {
   print_source_lines_base (s, line, stopline, flags);
 }
@@ -1508,8 +1533,7 @@ line_info (char *arg, int from_tty)
 	sal.line = current_source_line;
 
       sals.nelts = 1;
-      sals.sals = (struct symtab_and_line *)
-	xmalloc (sizeof (struct symtab_and_line));
+      sals.sals = XNEW (struct symtab_and_line);
       sals.sals[0] = sal;
     }
   else
@@ -1645,7 +1669,7 @@ forward_search_command (char *regex, int
       int cursize, newsize;
 
       cursize = 256;
-      buf = xmalloc (cursize);
+      buf = (char *) xmalloc (cursize);
       p = buf;
 
       c = fgetc (stream);
@@ -1657,7 +1681,7 @@ forward_search_command (char *regex, int
 	  if (p - buf == cursize)
 	    {
 	      newsize = cursize + cursize / 2;
-	      buf = xrealloc (buf, newsize);
+	      buf = (char *) xrealloc (buf, newsize);
 	      p = buf + cursize;
 	      cursize = newsize;
 	    }
@@ -1680,7 +1704,7 @@ forward_search_command (char *regex, int
 	  do_cleanups (cleanups);
 	  print_source_lines (current_source_symtab, line, line + 1, 0);
 	  set_internalvar_integer (lookup_internalvar ("_"), line);
-	  current_source_line = max (line - lines_to_list / 2, 1);
+	  current_source_line = std::max (line - lines_to_list / 2, 1);
 	  return;
 	}
       line++;
@@ -1758,7 +1782,7 @@ reverse_search_command (char *regex, int
 	  do_cleanups (cleanups);
 	  print_source_lines (current_source_symtab, line, line + 1, 0);
 	  set_internalvar_integer (lookup_internalvar ("_"), line);
-	  current_source_line = max (line - lines_to_list / 2, 1);
+	  current_source_line = std::max (line - lines_to_list / 2, 1);
 	  return;
 	}
       line--;
@@ -1816,9 +1840,8 @@ void
 add_substitute_path_rule (char *from, char *to)
 {
   struct substitute_path_rule *rule;
-  struct substitute_path_rule *new_rule;
+  struct substitute_path_rule *new_rule = XNEW (struct substitute_path_rule);
 
-  new_rule = xmalloc (sizeof (struct substitute_path_rule));
   new_rule->from = xstrdup (from);
   new_rule->to = xstrdup (to);
   new_rule->next = NULL;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/source.h ./gdb/source.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/source.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/source.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* List lines of source files for GDB, the GNU debugger.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-fbsd-nat.c ./gdb/sparc64-fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-fbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,79 @@
+/* Native-dependent code for FreeBSD/sparc64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "fbsd-nat.h"
+#include "sparc64-tdep.h"
+#include "sparc-nat.h"
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc64fbsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  /* The following is true for FreeBSD 5.4:
+
+     The pcb contains %sp and %pc.  Since the register windows are
+     explicitly flushed, we can find the `local' and `in' registers on
+     the stack.  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+
+  /* Synthesize %npc.  */
+  pcb->pcb_pc += 4;
+  regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, &pcb->pcb_pc);
+
+  /* Read `local' and `in' registers from the stack.  */
+  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64fbsd_nat (void);
+
+void
+_initialize_sparc64fbsd_nat (void)
+{
+  struct target_ops *t;
+
+  /* Add some extra features to the generic SPARC target.  */
+  t = sparc_target ();
+  fbsd_nat_add_target (t);
+
+  sparc_gregmap = &sparc64fbsd_gregmap;
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (sparc64fbsd_kvm_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64fbsd-nat.c ./gdb/sparc64fbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64fbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64fbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,79 +0,0 @@
-/* Native-dependent code for FreeBSD/sparc64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "fbsd-nat.h"
-#include "sparc64-tdep.h"
-#include "sparc-nat.h"
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-sparc64fbsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  /* The following is true for FreeBSD 5.4:
-
-     The pcb contains %sp and %pc.  Since the register windows are
-     explicitly flushed, we can find the `local' and `in' registers on
-     the stack.  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
-  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
-
-  /* Synthesize %npc.  */
-  pcb->pcb_pc += 4;
-  regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, &pcb->pcb_pc);
-
-  /* Read `local' and `in' registers from the stack.  */
-  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64fbsd_nat (void);
-
-void
-_initialize_sparc64fbsd_nat (void)
-{
-  struct target_ops *t;
-
-  /* Add some extra features to the generic SPARC target.  */
-  t = sparc_target ();
-  fbsd_nat_add_target (t);
-
-  sparc_gregmap = &sparc64fbsd_gregmap;
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (sparc64fbsd_kvm_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-fbsd-tdep.c ./gdb/sparc64-fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-fbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,252 @@
+/* Target-dependent code for FreeBSD/sparc64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "target.h"
+#include "trad-frame.h"
+
+#include "sparc64-tdep.h"
+#include "fbsd-tdep.h"
+#include "solib-svr4.h"
+
+/* From <machine/reg.h>.  */
+const struct sparc_gregmap sparc64fbsd_gregmap =
+{
+  26 * 8,			/* "tstate" */
+  25 * 8,			/* %pc */
+  24 * 8,			/* %npc */
+  28 * 8,			/* %y */
+  16 * 8,			/* %fprs */
+  -1,
+  1 * 8,			/* %g1 */
+  -1,				/* %l0 */
+  8				/* sizeof (%y) */
+};
+
+
+static void
+sparc64fbsd_supply_gregset (const struct regset *regset,
+			    struct regcache *regcache,
+			    int regnum, const void *gregs, size_t len)
+{
+  sparc64_supply_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc64fbsd_collect_gregset (const struct regset *regset,
+			     const struct regcache *regcache,
+			     int regnum, void *gregs, size_t len)
+{
+  sparc64_collect_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc64fbsd_supply_fpregset (const struct regset *regset,
+			     struct regcache *regcache,
+			     int regnum, const void *fpregs, size_t len)
+{
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+static void
+sparc64fbsd_collect_fpregset (const struct regset *regset,
+			      const struct regcache *regcache,
+			      int regnum, void *fpregs, size_t len)
+{
+  sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+
+/* Signal trampolines.  */
+
+static int
+sparc64fbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+  return (name && strcmp (name, "__sigtramp") == 0);
+}
+
+static struct sparc_frame_cache *
+sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame,
+				   void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR addr, mcontext_addr, sp;
+  LONGEST fprs;
+  int regnum;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  /* The third argument is a pointer to an instance of `ucontext_t',
+     which has a member `uc_mcontext' that contains the saved
+     registers.  */
+  addr = get_frame_register_unsigned (this_frame, SPARC_O2_REGNUM);
+  mcontext_addr = addr + 64;
+
+  /* The following registers travel in the `mc_local' slots of
+     `mcontext_t'.  */
+  addr = mcontext_addr + 16 * 8;
+  cache->saved_regs[SPARC64_FPRS_REGNUM].addr = addr + 0 * 8;
+  cache->saved_regs[SPARC64_FSR_REGNUM].addr = addr + 1 * 8;
+
+  /* The following registers travel in the `mc_in' slots of
+     `mcontext_t'.  */
+  addr = mcontext_addr + 24 * 8;
+  cache->saved_regs[SPARC64_NPC_REGNUM].addr = addr + 0 * 8;
+  cache->saved_regs[SPARC64_PC_REGNUM].addr = addr + 1 * 8;
+  cache->saved_regs[SPARC64_STATE_REGNUM].addr = addr + 2 * 8;
+  cache->saved_regs[SPARC64_Y_REGNUM].addr = addr + 4 * 8;
+
+  /* The `global' and `out' registers travel in the `mc_global' and
+     `mc_out' slots of `mcontext_t', except for %g0.  Since %g0 is
+     always zero, keep the identity encoding.  */
+  for (regnum = SPARC_G1_REGNUM, addr = mcontext_addr + 8;
+       regnum <= SPARC_O7_REGNUM; regnum++, addr += 8)
+    cache->saved_regs[regnum].addr = addr;
+
+  /* The `local' and `in' registers have been saved in the register
+     save area.  */
+  addr = cache->saved_regs[SPARC_SP_REGNUM].addr;
+  sp = get_frame_memory_unsigned (this_frame, addr, 8);
+  for (regnum = SPARC_L0_REGNUM, addr = sp + BIAS;
+       regnum <= SPARC_I7_REGNUM; regnum++, addr += 8)
+    cache->saved_regs[regnum].addr = addr;
+
+  /* The floating-point registers are only saved if the FEF bit in
+     %fprs has been set.  */
+
+#define FPRS_FEF	(1 << 2)
+
+  addr = cache->saved_regs[SPARC64_FPRS_REGNUM].addr;
+  fprs = get_frame_memory_unsigned (this_frame, addr, 8);
+  if (fprs & FPRS_FEF)
+    {
+      for (regnum = SPARC_F0_REGNUM, addr = mcontext_addr + 32 * 8;
+	   regnum <= SPARC_F31_REGNUM; regnum++, addr += 4)
+	cache->saved_regs[regnum].addr = addr;
+
+      for (regnum = SPARC64_F32_REGNUM;
+	   regnum <= SPARC64_F62_REGNUM; regnum++, addr += 8)
+	cache->saved_regs[regnum].addr = addr;
+    }
+
+  return cache;
+}
+
+static void
+sparc64fbsd_sigtramp_frame_this_id (struct frame_info *this_frame,
+				    void **this_cache,
+				    struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
+					  void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc64fbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				    struct frame_info *this_frame,
+				    void **this_cache)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (sparc64fbsd_pc_in_sigtramp (pc, name))
+    return 1;
+
+  return 0;
+}
+
+static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc64fbsd_sigtramp_frame_this_id,
+  sparc64fbsd_sigtramp_frame_prev_register,
+  NULL,
+  sparc64fbsd_sigtramp_frame_sniffer
+};
+
+
+static const struct regset sparc64fbsd_gregset =
+  {
+    NULL, sparc64fbsd_supply_gregset, sparc64fbsd_collect_gregset
+  };
+
+static const struct regset sparc64fbsd_fpregset =
+  {
+    NULL, sparc64fbsd_supply_fpregset, sparc64fbsd_collect_fpregset
+  };
+
+static void
+sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Generic FreeBSD support. */
+  fbsd_init_abi (info, gdbarch);
+
+  tdep->gregset = &sparc64fbsd_gregset;
+  tdep->sizeof_gregset = 256;
+
+  tdep->fpregset = &sparc64fbsd_fpregset;
+  tdep->sizeof_fpregset = 272;
+
+  frame_unwind_append_unwinder (gdbarch, &sparc64fbsd_sigtramp_frame_unwind);
+
+  sparc64_init_abi (info, gdbarch);
+
+  /* FreeBSD/sparc64 has SVR4-style shared libraries.  */
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64fbsd_tdep (void);
+
+void
+_initialize_sparc64fbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
+			  GDB_OSABI_FREEBSD, sparc64fbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64fbsd-tdep.c ./gdb/sparc64fbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64fbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64fbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,252 +0,0 @@
-/* Target-dependent code for FreeBSD/sparc64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "target.h"
-#include "trad-frame.h"
-
-#include "sparc64-tdep.h"
-#include "fbsd-tdep.h"
-#include "solib-svr4.h"
-
-/* From <machine/reg.h>.  */
-const struct sparc_gregmap sparc64fbsd_gregmap =
-{
-  26 * 8,			/* "tstate" */
-  25 * 8,			/* %pc */
-  24 * 8,			/* %npc */
-  28 * 8,			/* %y */
-  16 * 8,			/* %fprs */
-  -1,
-  1 * 8,			/* %g1 */
-  -1,				/* %l0 */
-  8				/* sizeof (%y) */
-};
-
-
-static void
-sparc64fbsd_supply_gregset (const struct regset *regset,
-			    struct regcache *regcache,
-			    int regnum, const void *gregs, size_t len)
-{
-  sparc64_supply_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
-}
-
-static void
-sparc64fbsd_collect_gregset (const struct regset *regset,
-			     const struct regcache *regcache,
-			     int regnum, void *gregs, size_t len)
-{
-  sparc64_collect_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
-}
-
-static void
-sparc64fbsd_supply_fpregset (const struct regset *regset,
-			     struct regcache *regcache,
-			     int regnum, const void *fpregs, size_t len)
-{
-  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-static void
-sparc64fbsd_collect_fpregset (const struct regset *regset,
-			      const struct regcache *regcache,
-			      int regnum, void *fpregs, size_t len)
-{
-  sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-
-/* Signal trampolines.  */
-
-static int
-sparc64fbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
-{
-  return (name && strcmp (name, "__sigtramp") == 0);
-}
-
-static struct sparc_frame_cache *
-sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame,
-				   void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR addr, mcontext_addr, sp;
-  LONGEST fprs;
-  int regnum;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
-
-  /* The third argument is a pointer to an instance of `ucontext_t',
-     which has a member `uc_mcontext' that contains the saved
-     registers.  */
-  addr = get_frame_register_unsigned (this_frame, SPARC_O2_REGNUM);
-  mcontext_addr = addr + 64;
-
-  /* The following registers travel in the `mc_local' slots of
-     `mcontext_t'.  */
-  addr = mcontext_addr + 16 * 8;
-  cache->saved_regs[SPARC64_FPRS_REGNUM].addr = addr + 0 * 8;
-  cache->saved_regs[SPARC64_FSR_REGNUM].addr = addr + 1 * 8;
-
-  /* The following registers travel in the `mc_in' slots of
-     `mcontext_t'.  */
-  addr = mcontext_addr + 24 * 8;
-  cache->saved_regs[SPARC64_NPC_REGNUM].addr = addr + 0 * 8;
-  cache->saved_regs[SPARC64_PC_REGNUM].addr = addr + 1 * 8;
-  cache->saved_regs[SPARC64_STATE_REGNUM].addr = addr + 2 * 8;
-  cache->saved_regs[SPARC64_Y_REGNUM].addr = addr + 4 * 8;
-
-  /* The `global' and `out' registers travel in the `mc_global' and
-     `mc_out' slots of `mcontext_t', except for %g0.  Since %g0 is
-     always zero, keep the identity encoding.  */
-  for (regnum = SPARC_G1_REGNUM, addr = mcontext_addr + 8;
-       regnum <= SPARC_O7_REGNUM; regnum++, addr += 8)
-    cache->saved_regs[regnum].addr = addr;
-
-  /* The `local' and `in' registers have been saved in the register
-     save area.  */
-  addr = cache->saved_regs[SPARC_SP_REGNUM].addr;
-  sp = get_frame_memory_unsigned (this_frame, addr, 8);
-  for (regnum = SPARC_L0_REGNUM, addr = sp + BIAS;
-       regnum <= SPARC_I7_REGNUM; regnum++, addr += 8)
-    cache->saved_regs[regnum].addr = addr;
-
-  /* The floating-point registers are only saved if the FEF bit in
-     %fprs has been set.  */
-
-#define FPRS_FEF	(1 << 2)
-
-  addr = cache->saved_regs[SPARC64_FPRS_REGNUM].addr;
-  fprs = get_frame_memory_unsigned (this_frame, addr, 8);
-  if (fprs & FPRS_FEF)
-    {
-      for (regnum = SPARC_F0_REGNUM, addr = mcontext_addr + 32 * 8;
-	   regnum <= SPARC_F31_REGNUM; regnum++, addr += 4)
-	cache->saved_regs[regnum].addr = addr;
-
-      for (regnum = SPARC64_F32_REGNUM;
-	   regnum <= SPARC64_F62_REGNUM; regnum++, addr += 8)
-	cache->saved_regs[regnum].addr = addr;
-    }
-
-  return cache;
-}
-
-static void
-sparc64fbsd_sigtramp_frame_this_id (struct frame_info *this_frame,
-				    void **this_cache,
-				    struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
-					  void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc64fbsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc64fbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				    struct frame_info *this_frame,
-				    void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (sparc64fbsd_pc_in_sigtramp (pc, name))
-    return 1;
-
-  return 0;
-}
-
-static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc64fbsd_sigtramp_frame_this_id,
-  sparc64fbsd_sigtramp_frame_prev_register,
-  NULL,
-  sparc64fbsd_sigtramp_frame_sniffer
-};
-
-
-static const struct regset sparc64fbsd_gregset =
-  {
-    NULL, sparc64fbsd_supply_gregset, sparc64fbsd_collect_gregset
-  };
-
-static const struct regset sparc64fbsd_fpregset =
-  {
-    NULL, sparc64fbsd_supply_fpregset, sparc64fbsd_collect_fpregset
-  };
-
-static void
-sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* Generic FreeBSD support. */
-  fbsd_init_abi (info, gdbarch);
-
-  tdep->gregset = &sparc64fbsd_gregset;
-  tdep->sizeof_gregset = 256;
-
-  tdep->fpregset = &sparc64fbsd_fpregset;
-  tdep->sizeof_fpregset = 272;
-
-  frame_unwind_append_unwinder (gdbarch, &sparc64fbsd_sigtramp_frame_unwind);
-
-  sparc64_init_abi (info, gdbarch);
-
-  /* FreeBSD/sparc64 has SVR4-style shared libraries.  */
-  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64fbsd_tdep (void);
-
-void
-_initialize_sparc64fbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
-			  GDB_OSABI_FREEBSD_ELF, sparc64fbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-linux-nat.c ./gdb/sparc64-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-linux-tdep.c ./gdb/sparc64-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -241,7 +241,6 @@ static int
 sparc64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   CORE_ADDR jb_addr;
   gdb_byte buf[8];
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nat.c ./gdb/sparc64-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nbsd-nat.c ./gdb/sparc64-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,189 @@
+/* Native-dependent code for NetBSD/sparc64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "sparc64-tdep.h"
+#include "sparc-nat.h"
+
+/* NetBSD is different from the other OSes that support both SPARC and
+   UltraSPARC in that the result of ptrace(2) depends on whether the
+   traced process is 32-bit or 64-bit.  */
+
+static void
+sparc64nbsd_supply_gregset (const struct sparc_gregmap *gregmap,
+			    struct regcache *regcache,
+			    int regnum, const void *gregs)
+{
+  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
+
+  if (sparc32)
+    sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
+  else
+    sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc64nbsd_collect_gregset (const struct sparc_gregmap *gregmap,
+			     const struct regcache *regcache,
+			     int regnum, void *gregs)
+{
+  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
+
+  if (sparc32)
+    sparc32_collect_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
+  else
+    sparc64_collect_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc64nbsd_supply_fpregset (const struct sparc_fpregmap *fpregmap,
+			     struct regcache *regcache,
+			     int regnum, const void *fpregs)
+{
+  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
+
+  if (sparc32)
+    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
+  else
+    sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+static void
+sparc64nbsd_collect_fpregset (const struct sparc_fpregmap *fpregmap,
+			      const struct regcache *regcache,
+			      int regnum, void *fpregs)
+{
+  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
+
+  if (sparc32)
+    sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
+  else
+    sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+/* Determine whether `gregset_t' contains register REGNUM.  */
+
+static int
+sparc64nbsd_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
+{
+  if (gdbarch_ptr_bit (gdbarch) == 32)
+    return sparc32_gregset_supplies_p (gdbarch, regnum);
+
+  /* Integer registers.  */
+  if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
+      || (regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
+      || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_L7_REGNUM)
+      || (regnum >= SPARC_I0_REGNUM && regnum <= SPARC_I7_REGNUM))
+    return 1;
+
+  /* Control registers.  */
+  if (regnum == SPARC64_PC_REGNUM
+      || regnum == SPARC64_NPC_REGNUM
+      || regnum == SPARC64_STATE_REGNUM
+      || regnum == SPARC64_Y_REGNUM)
+    return 1;
+
+  return 0;
+}
+
+/* Determine whether `fpregset_t' contains register REGNUM.  */
+
+static int
+sparc64nbsd_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
+{
+  if (gdbarch_ptr_bit (gdbarch) == 32)
+    return sparc32_fpregset_supplies_p (gdbarch, regnum);
+
+  /* Floating-point registers.  */
+  if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
+      || (regnum >= SPARC64_F32_REGNUM && regnum <= SPARC64_F62_REGNUM))
+    return 1;
+
+  /* Control registers.  */
+  if (regnum == SPARC64_FSR_REGNUM)
+    return 1;
+
+  return 0;
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc64nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  u_int64_t state;
+  int regnum;
+
+  /* The following is true for NetBSD 1.6.2:
+
+     The pcb contains %sp and %pc, %pstate and %cwp.  From this
+     information we reconstruct the register state as it would look
+     when we just returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  /* If the program counter is zero, this is probably a core dump, and
+     we can get %pc from the stack.  */
+  if (pcb->pcb_pc == 0)
+      read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), 
+		  (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
+
+  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+
+  state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
+  regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
+
+  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64nbsd_nat (void);
+
+void
+_initialize_sparc64nbsd_nat (void)
+{
+  sparc_supply_gregset = sparc64nbsd_supply_gregset;
+  sparc_collect_gregset = sparc64nbsd_collect_gregset;
+  sparc_supply_fpregset = sparc64nbsd_supply_fpregset;
+  sparc_collect_fpregset = sparc64nbsd_collect_fpregset;
+  sparc_gregset_supplies_p = sparc64nbsd_gregset_supplies_p;
+  sparc_fpregset_supplies_p = sparc64nbsd_fpregset_supplies_p;
+
+  /* We've got nothing to add to the generic SPARC target.  */
+  add_target (sparc_target ());
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (sparc64nbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64nbsd-nat.c ./gdb/sparc64nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64nbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,189 +0,0 @@
-/* Native-dependent code for NetBSD/sparc64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "sparc64-tdep.h"
-#include "sparc-nat.h"
-
-/* NetBSD is different from the other OSes that support both SPARC and
-   UltraSPARC in that the result of ptrace(2) depends on whether the
-   traced process is 32-bit or 64-bit.  */
-
-static void
-sparc64nbsd_supply_gregset (const struct sparc_gregmap *gregmap,
-			    struct regcache *regcache,
-			    int regnum, const void *gregs)
-{
-  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-
-  if (sparc32)
-    sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
-  else
-    sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
-}
-
-static void
-sparc64nbsd_collect_gregset (const struct sparc_gregmap *gregmap,
-			     const struct regcache *regcache,
-			     int regnum, void *gregs)
-{
-  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-
-  if (sparc32)
-    sparc32_collect_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
-  else
-    sparc64_collect_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
-}
-
-static void
-sparc64nbsd_supply_fpregset (const struct sparc_fpregmap *fpregmap,
-			     struct regcache *regcache,
-			     int regnum, const void *fpregs)
-{
-  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-
-  if (sparc32)
-    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
-  else
-    sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-static void
-sparc64nbsd_collect_fpregset (const struct sparc_fpregmap *fpregmap,
-			      const struct regcache *regcache,
-			      int regnum, void *fpregs)
-{
-  int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-
-  if (sparc32)
-    sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
-  else
-    sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-/* Determine whether `gregset_t' contains register REGNUM.  */
-
-static int
-sparc64nbsd_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
-{
-  if (gdbarch_ptr_bit (gdbarch) == 32)
-    return sparc32_gregset_supplies_p (gdbarch, regnum);
-
-  /* Integer registers.  */
-  if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
-      || (regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
-      || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_L7_REGNUM)
-      || (regnum >= SPARC_I0_REGNUM && regnum <= SPARC_I7_REGNUM))
-    return 1;
-
-  /* Control registers.  */
-  if (regnum == SPARC64_PC_REGNUM
-      || regnum == SPARC64_NPC_REGNUM
-      || regnum == SPARC64_STATE_REGNUM
-      || regnum == SPARC64_Y_REGNUM)
-    return 1;
-
-  return 0;
-}
-
-/* Determine whether `fpregset_t' contains register REGNUM.  */
-
-static int
-sparc64nbsd_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
-{
-  if (gdbarch_ptr_bit (gdbarch) == 32)
-    return sparc32_fpregset_supplies_p (gdbarch, regnum);
-
-  /* Floating-point registers.  */
-  if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
-      || (regnum >= SPARC64_F32_REGNUM && regnum <= SPARC64_F62_REGNUM))
-    return 1;
-
-  /* Control registers.  */
-  if (regnum == SPARC64_FSR_REGNUM)
-    return 1;
-
-  return 0;
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-sparc64nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  u_int64_t state;
-  int regnum;
-
-  /* The following is true for NetBSD 1.6.2:
-
-     The pcb contains %sp and %pc, %pstate and %cwp.  From this
-     information we reconstruct the register state as it would look
-     when we just returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  /* If the program counter is zero, this is probably a core dump, and
-     we can get %pc from the stack.  */
-  if (pcb->pcb_pc == 0)
-      read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), 
-		  (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
-
-  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
-  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
-
-  state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
-  regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
-
-  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64nbsd_nat (void);
-
-void
-_initialize_sparc64nbsd_nat (void)
-{
-  sparc_supply_gregset = sparc64nbsd_supply_gregset;
-  sparc_collect_gregset = sparc64nbsd_collect_gregset;
-  sparc_supply_fpregset = sparc64nbsd_supply_fpregset;
-  sparc_collect_fpregset = sparc64nbsd_collect_fpregset;
-  sparc_gregset_supplies_p = sparc64nbsd_gregset_supplies_p;
-  sparc_fpregset_supplies_p = sparc64nbsd_fpregset_supplies_p;
-
-  /* We've got nothing to add to the generic SPARC target.  */
-  add_target (sparc_target ());
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (sparc64nbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nbsd-tdep.c ./gdb/sparc64-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,280 @@
+/* Target-dependent code for NetBSD/sparc64.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Based on code contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "solib-svr4.h"
+#include "trad-frame.h"
+
+#include "sparc64-tdep.h"
+#include "nbsd-tdep.h"
+
+/* From <machine/reg.h>.  */
+const struct sparc_gregmap sparc64nbsd_gregmap =
+{
+  0 * 8,			/* "tstate" */
+  1 * 8,			/* %pc */
+  2 * 8,			/* %npc */
+  3 * 8,			/* %y */
+  -1,				/* %fprs */
+  -1,
+  5 * 8,			/* %g1 */
+  -1,				/* %l0 */
+  4				/* sizeof (%y) */
+};
+
+
+static void
+sparc64nbsd_supply_gregset (const struct regset *regset,
+			    struct regcache *regcache,
+			    int regnum, const void *gregs, size_t len)
+{
+  sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc64nbsd_supply_fpregset (const struct regset *regset,
+			     struct regcache *regcache,
+			     int regnum, const void *fpregs, size_t len)
+{
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+
+/* Signal trampolines.  */
+
+/* The following variables describe the location of an on-stack signal
+   trampoline.  The current values correspond to the memory layout for
+   NetBSD 1.3 and up.  These shouldn't be necessary for NetBSD 2.0 and
+   up, since NetBSD uses signal trampolines provided by libc now.  */
+
+static const CORE_ADDR sparc64nbsd_sigtramp_start = 0xffffffffffffdee4ULL;
+static const CORE_ADDR sparc64nbsd_sigtramp_end = 0xffffffffffffe000ULL;
+
+static int
+sparc64nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+  if (pc >= sparc64nbsd_sigtramp_start && pc < sparc64nbsd_sigtramp_end)
+    return 1;
+
+  return nbsd_pc_in_sigtramp (pc, name);
+}
+
+struct trad_frame_saved_reg *
+sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
+				   struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct trad_frame_saved_reg *saved_regs;
+  CORE_ADDR addr, sp;
+  int regnum, delta;
+
+  saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  /* The registers are saved in bits and pieces scattered all over the
+     place.  The code below records their location on the assumption
+     that the part of the signal trampoline that saves the state has
+     been executed.  */
+
+  saved_regs[SPARC_SP_REGNUM].addr = sigcontext_addr + 8;
+  saved_regs[SPARC64_PC_REGNUM].addr = sigcontext_addr + 16;
+  saved_regs[SPARC64_NPC_REGNUM].addr = sigcontext_addr + 24;
+  saved_regs[SPARC64_STATE_REGNUM].addr = sigcontext_addr + 32;
+  saved_regs[SPARC_G1_REGNUM].addr = sigcontext_addr + 40;
+  saved_regs[SPARC_O0_REGNUM].addr = sigcontext_addr + 48;
+
+  /* The remaining `global' registers and %y are saved in the `local'
+     registers.  */
+  delta = SPARC_L0_REGNUM - SPARC_G0_REGNUM;
+  for (regnum = SPARC_G2_REGNUM; regnum <= SPARC_G7_REGNUM; regnum++)
+    saved_regs[regnum].realreg = regnum + delta;
+  saved_regs[SPARC64_Y_REGNUM].realreg = SPARC_L1_REGNUM;
+
+  /* The remaining `out' registers can be found in the current frame's
+     `in' registers.  */
+  delta = SPARC_I0_REGNUM - SPARC_O0_REGNUM;
+  for (regnum = SPARC_O1_REGNUM; regnum <= SPARC_O5_REGNUM; regnum++)
+    saved_regs[regnum].realreg = regnum + delta;
+  saved_regs[SPARC_O7_REGNUM].realreg = SPARC_I7_REGNUM;
+
+  /* The `local' and `in' registers have been saved in the register
+     save area.  */
+  addr = saved_regs[SPARC_SP_REGNUM].addr;
+  sp = get_frame_memory_unsigned (this_frame, addr, 8);
+  for (regnum = SPARC_L0_REGNUM, addr = sp + BIAS;
+       regnum <= SPARC_I7_REGNUM; regnum++, addr += 8)
+    saved_regs[regnum].addr = addr;
+
+  /* Handle StackGhost.  */
+  {
+    ULONGEST wcookie = sparc_fetch_wcookie (gdbarch);
+
+    if (wcookie != 0)
+      {
+	ULONGEST i7;
+
+	addr = saved_regs[SPARC_I7_REGNUM].addr;
+	i7 = get_frame_memory_unsigned (this_frame, addr, 8);
+	trad_frame_set_value (saved_regs, SPARC_I7_REGNUM, i7 ^ wcookie);
+      }
+  }
+
+  /* TODO: Handle the floating-point registers.  */
+
+  return saved_regs;
+}
+
+static struct sparc_frame_cache *
+sparc64nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
+				    void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR addr;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  /* If we couldn't find the frame's function, we're probably dealing
+     with an on-stack signal trampoline.  */
+  if (cache->pc == 0)
+    {
+      cache->pc = sparc64nbsd_sigtramp_start;
+
+      /* Since we couldn't find the frame's function, the cache was
+         initialized under the assumption that we're frameless.  */
+      sparc_record_save_insn (cache);
+      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
+      if (addr & 1)
+	addr += BIAS;
+      cache->base = addr;
+    }
+
+  /* We find the appropriate instance of `struct sigcontext' at a
+     fixed offset in the signal frame.  */
+  addr = cache->base + 128 + 8;
+  cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, this_frame);
+
+  return cache;
+}
+
+static void
+sparc64nbsd_sigcontext_frame_this_id (struct frame_info *this_frame,
+				      void **this_cache,
+				      struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc64nbsd_sigcontext_frame_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc64nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame,
+					    void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc64nbsd_sigcontext_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc64nbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				    struct frame_info *this_frame,
+				    void **this_cache)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (sparc64nbsd_pc_in_sigtramp (pc, name))
+    {
+      if (name == NULL || !startswith (name, "__sigtramp_sigcontext"))
+	return 1;
+    }
+
+  return 0;
+}
+
+static const struct frame_unwind sparc64nbsd_sigcontext_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc64nbsd_sigcontext_frame_this_id,
+  sparc64nbsd_sigcontext_frame_prev_register,
+  NULL,
+  sparc64nbsd_sigtramp_frame_sniffer
+};
+
+
+static const struct regset sparc64nbsd_gregset =
+  {
+    NULL, sparc64nbsd_supply_gregset, NULL
+  };
+
+static const struct regset sparc64nbsd_fpregset =
+  {
+    NULL, sparc64nbsd_supply_fpregset, NULL
+  };
+
+static void
+sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->gregset = &sparc64nbsd_gregset;
+  tdep->sizeof_gregset = 160;
+
+  tdep->fpregset =  &sparc64nbsd_fpregset;
+  tdep->sizeof_fpregset = 272;
+
+  /* Make sure we can single-step "new" syscalls.  */
+  tdep->step_trap = sparcnbsd_step_trap;
+
+  frame_unwind_append_unwinder (gdbarch, &sparc64nbsd_sigcontext_frame_unwind);
+
+  sparc64_init_abi (info, gdbarch);
+
+  /* NetBSD/sparc64 has SVR4-style shared libraries.  */
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64nbsd_tdep (void);
+
+void
+_initialize_sparc64nbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
+			  GDB_OSABI_NETBSD, sparc64nbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64nbsd-tdep.c ./gdb/sparc64nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64nbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,280 +0,0 @@
-/* Target-dependent code for NetBSD/sparc64.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-   Based on code contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "symtab.h"
-#include "objfiles.h"
-#include "solib-svr4.h"
-#include "trad-frame.h"
-
-#include "sparc64-tdep.h"
-#include "nbsd-tdep.h"
-
-/* From <machine/reg.h>.  */
-const struct sparc_gregmap sparc64nbsd_gregmap =
-{
-  0 * 8,			/* "tstate" */
-  1 * 8,			/* %pc */
-  2 * 8,			/* %npc */
-  3 * 8,			/* %y */
-  -1,				/* %fprs */
-  -1,
-  5 * 8,			/* %g1 */
-  -1,				/* %l0 */
-  4				/* sizeof (%y) */
-};
-
-
-static void
-sparc64nbsd_supply_gregset (const struct regset *regset,
-			    struct regcache *regcache,
-			    int regnum, const void *gregs, size_t len)
-{
-  sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
-}
-
-static void
-sparc64nbsd_supply_fpregset (const struct regset *regset,
-			     struct regcache *regcache,
-			     int regnum, const void *fpregs, size_t len)
-{
-  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-
-/* Signal trampolines.  */
-
-/* The following variables describe the location of an on-stack signal
-   trampoline.  The current values correspond to the memory layout for
-   NetBSD 1.3 and up.  These shouldn't be necessary for NetBSD 2.0 and
-   up, since NetBSD uses signal trampolines provided by libc now.  */
-
-static const CORE_ADDR sparc64nbsd_sigtramp_start = 0xffffffffffffdee4ULL;
-static const CORE_ADDR sparc64nbsd_sigtramp_end = 0xffffffffffffe000ULL;
-
-static int
-sparc64nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
-{
-  if (pc >= sparc64nbsd_sigtramp_start && pc < sparc64nbsd_sigtramp_end)
-    return 1;
-
-  return nbsd_pc_in_sigtramp (pc, name);
-}
-
-struct trad_frame_saved_reg *
-sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
-				   struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct trad_frame_saved_reg *saved_regs;
-  CORE_ADDR addr, sp;
-  int regnum, delta;
-
-  saved_regs = trad_frame_alloc_saved_regs (this_frame);
-
-  /* The registers are saved in bits and pieces scattered all over the
-     place.  The code below records their location on the assumption
-     that the part of the signal trampoline that saves the state has
-     been executed.  */
-
-  saved_regs[SPARC_SP_REGNUM].addr = sigcontext_addr + 8;
-  saved_regs[SPARC64_PC_REGNUM].addr = sigcontext_addr + 16;
-  saved_regs[SPARC64_NPC_REGNUM].addr = sigcontext_addr + 24;
-  saved_regs[SPARC64_STATE_REGNUM].addr = sigcontext_addr + 32;
-  saved_regs[SPARC_G1_REGNUM].addr = sigcontext_addr + 40;
-  saved_regs[SPARC_O0_REGNUM].addr = sigcontext_addr + 48;
-
-  /* The remaining `global' registers and %y are saved in the `local'
-     registers.  */
-  delta = SPARC_L0_REGNUM - SPARC_G0_REGNUM;
-  for (regnum = SPARC_G2_REGNUM; regnum <= SPARC_G7_REGNUM; regnum++)
-    saved_regs[regnum].realreg = regnum + delta;
-  saved_regs[SPARC64_Y_REGNUM].realreg = SPARC_L1_REGNUM;
-
-  /* The remaining `out' registers can be found in the current frame's
-     `in' registers.  */
-  delta = SPARC_I0_REGNUM - SPARC_O0_REGNUM;
-  for (regnum = SPARC_O1_REGNUM; regnum <= SPARC_O5_REGNUM; regnum++)
-    saved_regs[regnum].realreg = regnum + delta;
-  saved_regs[SPARC_O7_REGNUM].realreg = SPARC_I7_REGNUM;
-
-  /* The `local' and `in' registers have been saved in the register
-     save area.  */
-  addr = saved_regs[SPARC_SP_REGNUM].addr;
-  sp = get_frame_memory_unsigned (this_frame, addr, 8);
-  for (regnum = SPARC_L0_REGNUM, addr = sp + BIAS;
-       regnum <= SPARC_I7_REGNUM; regnum++, addr += 8)
-    saved_regs[regnum].addr = addr;
-
-  /* Handle StackGhost.  */
-  {
-    ULONGEST wcookie = sparc_fetch_wcookie (gdbarch);
-
-    if (wcookie != 0)
-      {
-	ULONGEST i7;
-
-	addr = saved_regs[SPARC_I7_REGNUM].addr;
-	i7 = get_frame_memory_unsigned (this_frame, addr, 8);
-	trad_frame_set_value (saved_regs, SPARC_I7_REGNUM, i7 ^ wcookie);
-      }
-  }
-
-  /* TODO: Handle the floating-point registers.  */
-
-  return saved_regs;
-}
-
-static struct sparc_frame_cache *
-sparc64nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
-				    void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR addr;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  /* If we couldn't find the frame's function, we're probably dealing
-     with an on-stack signal trampoline.  */
-  if (cache->pc == 0)
-    {
-      cache->pc = sparc64nbsd_sigtramp_start;
-
-      /* Since we couldn't find the frame's function, the cache was
-         initialized under the assumption that we're frameless.  */
-      sparc_record_save_insn (cache);
-      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
-      if (addr & 1)
-	addr += BIAS;
-      cache->base = addr;
-    }
-
-  /* We find the appropriate instance of `struct sigcontext' at a
-     fixed offset in the signal frame.  */
-  addr = cache->base + 128 + 8;
-  cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, this_frame);
-
-  return cache;
-}
-
-static void
-sparc64nbsd_sigcontext_frame_this_id (struct frame_info *this_frame,
-				      void **this_cache,
-				      struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc64nbsd_sigcontext_frame_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc64nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame,
-					    void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc64nbsd_sigcontext_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc64nbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				    struct frame_info *this_frame,
-				    void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (sparc64nbsd_pc_in_sigtramp (pc, name))
-    {
-      if (name == NULL || !startswith (name, "__sigtramp_sigcontext"))
-	return 1;
-    }
-
-  return 0;
-}
-
-static const struct frame_unwind sparc64nbsd_sigcontext_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc64nbsd_sigcontext_frame_this_id,
-  sparc64nbsd_sigcontext_frame_prev_register,
-  NULL,
-  sparc64nbsd_sigtramp_frame_sniffer
-};
-
-
-static const struct regset sparc64nbsd_gregset =
-  {
-    NULL, sparc64nbsd_supply_gregset, NULL
-  };
-
-static const struct regset sparc64nbsd_fpregset =
-  {
-    NULL, sparc64nbsd_supply_fpregset, NULL
-  };
-
-static void
-sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->gregset = &sparc64nbsd_gregset;
-  tdep->sizeof_gregset = 160;
-
-  tdep->fpregset =  &sparc64nbsd_fpregset;
-  tdep->sizeof_fpregset = 272;
-
-  /* Make sure we can single-step "new" syscalls.  */
-  tdep->step_trap = sparcnbsd_step_trap;
-
-  frame_unwind_append_unwinder (gdbarch, &sparc64nbsd_sigcontext_frame_unwind);
-
-  sparc64_init_abi (info, gdbarch);
-
-  /* NetBSD/sparc64 has SVR4-style shared libraries.  */
-  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64nbsd_tdep (void);
-
-void
-_initialize_sparc64nbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
-			  GDB_OSABI_NETBSD_ELF, sparc64nbsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-obsd-nat.c ./gdb/sparc64-obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-obsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,131 @@
+/* Native-dependent code for OpenBSD/sparc64.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "sparc64-tdep.h"
+#include "sparc-nat.h"
+#include "obsd-nat.h"
+
+/* Determine whether `gregset_t' contains register REGNUM.  */
+
+static int
+sparc64obsd_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
+{
+  /* Integer registers.  */
+  if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
+      || (regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
+      || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_L7_REGNUM)
+      || (regnum >= SPARC_I0_REGNUM && regnum <= SPARC_I7_REGNUM))
+    return 1;
+
+  /* Control registers.  */
+  if (regnum == SPARC64_PC_REGNUM
+      || regnum == SPARC64_NPC_REGNUM
+      || regnum == SPARC64_STATE_REGNUM
+      || regnum == SPARC64_Y_REGNUM)
+    return 1;
+
+  return 0;
+}
+
+/* Determine whether `fpregset_t' contains register REGNUM.  */
+
+static int
+sparc64obsd_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
+{
+  /* Floating-point registers.  */
+  if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
+      || (regnum >= SPARC64_F32_REGNUM && regnum <= SPARC64_F62_REGNUM))
+    return 1;
+
+  /* Control registers.  */
+  if (regnum == SPARC64_FSR_REGNUM)
+    return 1;
+
+  return 0;
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  u_int64_t state;
+  int regnum;
+
+  /* The following is true for OpenBSD 3.0:
+
+     The pcb contains %sp and %pc, %pstate and %cwp.  From this
+     information we reconstruct the register state as it would look
+     when we just returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  /* If the program counter is zero, this is probably a core dump, and
+     we can get %pc from the stack.  */
+  if (pcb->pcb_pc == 0)
+      read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), 
+		  (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
+
+  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+
+  state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
+  regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
+
+  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64obsd_nat (void);
+
+void
+_initialize_sparc64obsd_nat (void)
+{
+  sparc_supply_gregset = sparc64_supply_gregset;
+  sparc_collect_gregset = sparc64_collect_gregset;
+  sparc_supply_fpregset = sparc64_supply_fpregset;
+  sparc_collect_fpregset = sparc64_collect_fpregset;
+  sparc_gregset_supplies_p = sparc64obsd_gregset_supplies_p;
+  sparc_fpregset_supplies_p = sparc64obsd_fpregset_supplies_p;
+
+  sparc_gregmap = &sparc64nbsd_gregmap;
+  sparc_fpregmap = &sparc64_bsd_fpregmap;
+
+  /* Add some extra features to the generic SPARC target.  */
+  obsd_add_target (sparc_target ());
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (sparc64obsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64obsd-nat.c ./gdb/sparc64obsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64obsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64obsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,131 +0,0 @@
-/* Native-dependent code for OpenBSD/sparc64.
-
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "sparc64-tdep.h"
-#include "sparc-nat.h"
-#include "obsd-nat.h"
-
-/* Determine whether `gregset_t' contains register REGNUM.  */
-
-static int
-sparc64obsd_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
-{
-  /* Integer registers.  */
-  if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
-      || (regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
-      || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_L7_REGNUM)
-      || (regnum >= SPARC_I0_REGNUM && regnum <= SPARC_I7_REGNUM))
-    return 1;
-
-  /* Control registers.  */
-  if (regnum == SPARC64_PC_REGNUM
-      || regnum == SPARC64_NPC_REGNUM
-      || regnum == SPARC64_STATE_REGNUM
-      || regnum == SPARC64_Y_REGNUM)
-    return 1;
-
-  return 0;
-}
-
-/* Determine whether `fpregset_t' contains register REGNUM.  */
-
-static int
-sparc64obsd_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
-{
-  /* Floating-point registers.  */
-  if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
-      || (regnum >= SPARC64_F32_REGNUM && regnum <= SPARC64_F62_REGNUM))
-    return 1;
-
-  /* Control registers.  */
-  if (regnum == SPARC64_FSR_REGNUM)
-    return 1;
-
-  return 0;
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-sparc64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  u_int64_t state;
-  int regnum;
-
-  /* The following is true for OpenBSD 3.0:
-
-     The pcb contains %sp and %pc, %pstate and %cwp.  From this
-     information we reconstruct the register state as it would look
-     when we just returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  /* If the program counter is zero, this is probably a core dump, and
-     we can get %pc from the stack.  */
-  if (pcb->pcb_pc == 0)
-      read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), 
-		  (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
-
-  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
-  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
-
-  state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
-  regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
-
-  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64obsd_nat (void);
-
-void
-_initialize_sparc64obsd_nat (void)
-{
-  sparc_supply_gregset = sparc64_supply_gregset;
-  sparc_collect_gregset = sparc64_collect_gregset;
-  sparc_supply_fpregset = sparc64_supply_fpregset;
-  sparc_collect_fpregset = sparc64_collect_fpregset;
-  sparc_gregset_supplies_p = sparc64obsd_gregset_supplies_p;
-  sparc_fpregset_supplies_p = sparc64obsd_fpregset_supplies_p;
-
-  sparc_gregmap = &sparc64nbsd_gregmap;
-  sparc_fpregmap = &sparc64_bsd_fpregmap;
-
-  /* Add some extra features to the generic SPARC target.  */
-  obsd_add_target (sparc_target ());
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (sparc64obsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-obsd-tdep.c ./gdb/sparc64-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc64-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,452 @@
+/* Target-dependent code for OpenBSD/sparc64.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "trad-frame.h"
+
+#include "obsd-tdep.h"
+#include "sparc64-tdep.h"
+#include "solib-svr4.h"
+#include "bsd-uthread.h"
+
+/* Older OpenBSD versions used the traditional NetBSD core file
+   format, even for ports that use ELF.  These core files don't use
+   multiple register sets.  Instead, the general-purpose and
+   floating-point registers are lumped together in a single section.
+   Unlike on NetBSD, OpenBSD uses a different layout for its
+   general-purpose registers than the layout used for ptrace(2).
+
+   Newer OpenBSD versions use ELF core files.  Here the register sets
+   match the ptrace(2) layout.  */
+
+/* From <machine/reg.h>.  */
+const struct sparc_gregmap sparc64obsd_gregmap =
+{
+  0 * 8,			/* "tstate" */
+  1 * 8,			/* %pc */
+  2 * 8,			/* %npc */
+  3 * 8,			/* %y */
+  -1,				/* %fprs */
+  -1,
+  5 * 8,			/* %g1 */
+  20 * 8,			/* %l0 */
+  4				/* sizeof (%y) */
+};
+
+const struct sparc_gregmap sparc64obsd_core_gregmap =
+{
+  0 * 8,			/* "tstate" */
+  1 * 8,			/* %pc */
+  2 * 8,			/* %npc */
+  3 * 8,			/* %y */
+  -1,				/* %fprs */
+  -1,
+  7 * 8,			/* %g1 */
+  22 * 8,			/* %l0 */
+  4				/* sizeof (%y) */
+};
+
+static void
+sparc64obsd_supply_gregset (const struct regset *regset,
+			    struct regcache *regcache,
+			    int regnum, const void *gregs, size_t len)
+{
+  const void *fpregs = (char *)gregs + 288;
+
+  if (len < 832)
+    {
+      sparc64_supply_gregset (&sparc64obsd_gregmap, regcache, regnum, gregs);
+      return;
+    }
+
+  sparc64_supply_gregset (&sparc64obsd_core_gregmap, regcache, regnum, gregs);
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+static void
+sparc64obsd_supply_fpregset (const struct regset *regset,
+			     struct regcache *regcache,
+			     int regnum, const void *fpregs, size_t len)
+{
+  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+
+/* Signal trampolines.  */
+
+/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
+   in virtual memory.  The randomness makes it somewhat tricky to
+   detect it, but fortunately we can rely on the fact that the start
+   of the sigtramp routine is page-aligned.  We recognize the
+   trampoline by looking for the code that invokes the sigreturn
+   system call.  The offset where we can find that code varies from
+   release to release.
+
+   By the way, the mapping mentioned above is read-only, so you cannot
+   place a breakpoint in the signal trampoline.  */
+
+/* Default page size.  */
+static const int sparc64obsd_page_size = 8192;
+
+/* Offset for sigreturn(2).  */
+static const int sparc64obsd_sigreturn_offset[] = {
+  0xf0,				/* OpenBSD 3.8 */
+  0xec,				/* OpenBSD 3.6 */
+  0xe8,				/* OpenBSD 3.2 */
+  -1
+};
+
+static int
+sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+  CORE_ADDR start_pc = (pc & ~(sparc64obsd_page_size - 1));
+  unsigned long insn;
+  const int *offset;
+
+  if (name)
+    return 0;
+
+  for (offset = sparc64obsd_sigreturn_offset; *offset != -1; offset++)
+    {
+      /* Check for "restore %g0, SYS_sigreturn, %g1".  */
+      insn = sparc_fetch_instruction (start_pc + *offset);
+      if (insn != 0x83e82067)
+	continue;
+
+      /* Check for "t ST_SYSCALL".  */
+      insn = sparc_fetch_instruction (start_pc + *offset + 8);
+      if (insn != 0x91d02000)
+	continue;
+
+      return 1;
+    }
+
+  return 0;
+}
+
+static struct sparc_frame_cache *
+sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR addr;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  /* If we couldn't find the frame's function, we're probably dealing
+     with an on-stack signal trampoline.  */
+  if (cache->pc == 0)
+    {
+      cache->pc = get_frame_pc (this_frame);
+      cache->pc &= ~(sparc64obsd_page_size - 1);
+
+      /* Since we couldn't find the frame's function, the cache was
+         initialized under the assumption that we're frameless.  */
+      sparc_record_save_insn (cache);
+      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
+      if (addr & 1)
+	addr += BIAS;
+      cache->base = addr;
+    }
+
+  /* We find the appropriate instance of `struct sigcontext' at a
+     fixed offset in the signal frame.  */
+  addr = cache->base + 128 + 16;
+  cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, this_frame);
+
+  return cache;
+}
+
+static void
+sparc64obsd_frame_this_id (struct frame_info *this_frame, void **this_cache,
+			   struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc64obsd_frame_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc64obsd_frame_prev_register (struct frame_info *this_frame,
+				 void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc64obsd_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc64obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				    struct frame_info *this_frame,
+				    void **this_cache)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (sparc64obsd_pc_in_sigtramp (pc, name))
+    return 1;
+
+  return 0;
+}
+
+static const struct frame_unwind sparc64obsd_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc64obsd_frame_this_id,
+  sparc64obsd_frame_prev_register,
+  NULL,
+  sparc64obsd_sigtramp_frame_sniffer
+};
+
+/* Kernel debugging support.  */
+
+static struct sparc_frame_cache *
+sparc64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR sp, trapframe_addr;
+  int regnum;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  sp = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
+  trapframe_addr = sp + BIAS + 176;
+
+  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  cache->saved_regs[SPARC64_STATE_REGNUM].addr = trapframe_addr;
+  cache->saved_regs[SPARC64_PC_REGNUM].addr = trapframe_addr + 8;
+  cache->saved_regs[SPARC64_NPC_REGNUM].addr = trapframe_addr + 16;
+
+  for (regnum = SPARC_G0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
+    cache->saved_regs[regnum].addr =
+      trapframe_addr + 48 + (regnum - SPARC_G0_REGNUM) * 8;
+
+  return cache;
+}
+
+static void
+sparc64obsd_trapframe_this_id (struct frame_info *this_frame,
+			       void **this_cache, struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc64obsd_trapframe_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc64obsd_trapframe_prev_register (struct frame_info *this_frame,
+				     void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc64obsd_trapframe_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc64obsd_trapframe_sniffer (const struct frame_unwind *self,
+			       struct frame_info *this_frame,
+			       void **this_cache)
+{
+  CORE_ADDR pc;
+  ULONGEST pstate;
+  const char *name;
+
+  /* Check whether we are in privileged mode, and bail out if we're not.  */
+  pstate = get_frame_register_unsigned (this_frame, SPARC64_PSTATE_REGNUM);
+  if ((pstate & SPARC64_PSTATE_PRIV) == 0)
+    return 0;
+
+  pc = get_frame_address_in_block (this_frame);
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (name && strcmp (name, "Lslowtrap_reenter") == 0)
+    return 1;
+
+  return 0;
+}
+
+static const struct frame_unwind sparc64obsd_trapframe_unwind =
+{
+  NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc64obsd_trapframe_this_id,
+  sparc64obsd_trapframe_prev_register,
+  NULL,
+  sparc64obsd_trapframe_sniffer
+};
+
+
+/* Threads support.  */
+
+/* Offset wthin the thread structure where we can find %fp and %i7.  */
+#define SPARC64OBSD_UTHREAD_FP_OFFSET	232
+#define SPARC64OBSD_UTHREAD_PC_OFFSET	240
+
+static void
+sparc64obsd_supply_uthread (struct regcache *regcache,
+			    int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR fp, fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
+  gdb_byte buf[8];
+
+  gdb_assert (regnum >= -1);
+
+  fp = read_memory_unsigned_integer (fp_addr, 8, byte_order);
+  if (regnum == SPARC_SP_REGNUM || regnum == -1)
+    {
+      store_unsigned_integer (buf, 8, byte_order, fp);
+      regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
+
+      if (regnum == SPARC_SP_REGNUM)
+	return;
+    }
+
+  if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM
+      || regnum == -1)
+    {
+      CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
+
+      i7 = read_memory_unsigned_integer (i7_addr, 8, byte_order);
+      if (regnum == SPARC64_PC_REGNUM || regnum == -1)
+	{
+	  store_unsigned_integer (buf, 8, byte_order, i7 + 8);
+	  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, buf);
+	}
+      if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
+	{
+	  store_unsigned_integer (buf, 8, byte_order, i7 + 12);
+	  regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, buf);
+	}
+
+      if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM)
+	return;
+    }
+
+  sparc_supply_rwindow (regcache, fp, regnum);
+}
+
+static void
+sparc64obsd_collect_uthread(const struct regcache *regcache,
+			    int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp;
+  gdb_byte buf[8];
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == SPARC_SP_REGNUM || regnum == -1)
+    {
+      CORE_ADDR fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
+
+      regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+      write_memory (fp_addr,buf, 8);
+    }
+
+  if (regnum == SPARC64_PC_REGNUM || regnum == -1)
+    {
+      CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
+
+      regcache_raw_collect (regcache, SPARC64_PC_REGNUM, buf);
+      i7 = extract_unsigned_integer (buf, 8, byte_order) - 8;
+      write_memory_unsigned_integer (i7_addr, 8, byte_order, i7);
+
+      if (regnum == SPARC64_PC_REGNUM)
+	return;
+    }
+
+  regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+  sp = extract_unsigned_integer (buf, 8, byte_order);
+  sparc_collect_rwindow (regcache, sp, regnum);
+}
+
+
+static const struct regset sparc64obsd_gregset =
+  {
+    NULL, sparc64obsd_supply_gregset, NULL
+  };
+
+static const struct regset sparc64obsd_fpregset =
+  {
+    NULL, sparc64obsd_supply_fpregset, NULL
+  };
+
+static void
+sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  tdep->gregset = &sparc64obsd_gregset;
+  tdep->sizeof_gregset = 288;
+  tdep->fpregset = &sparc64obsd_fpregset;
+  tdep->sizeof_fpregset = 272;
+
+  /* Make sure we can single-step "new" syscalls.  */
+  tdep->step_trap = sparcnbsd_step_trap;
+
+  frame_unwind_append_unwinder (gdbarch, &sparc64obsd_frame_unwind);
+  frame_unwind_append_unwinder (gdbarch, &sparc64obsd_trapframe_unwind);
+
+  sparc64_init_abi (info, gdbarch);
+  obsd_init_abi (info, gdbarch);
+
+  /* OpenBSD/sparc64 has SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
+
+  /* OpenBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, sparc64obsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, sparc64obsd_collect_uthread);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc64obsd_tdep (void);
+
+void
+_initialize_sparc64obsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
+			  GDB_OSABI_OPENBSD, sparc64obsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64obsd-tdep.c ./gdb/sparc64obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64obsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,452 +0,0 @@
-/* Target-dependent code for OpenBSD/sparc64.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "symtab.h"
-#include "objfiles.h"
-#include "trad-frame.h"
-
-#include "obsd-tdep.h"
-#include "sparc64-tdep.h"
-#include "solib-svr4.h"
-#include "bsd-uthread.h"
-
-/* Older OpenBSD versions used the traditional NetBSD core file
-   format, even for ports that use ELF.  These core files don't use
-   multiple register sets.  Instead, the general-purpose and
-   floating-point registers are lumped together in a single section.
-   Unlike on NetBSD, OpenBSD uses a different layout for its
-   general-purpose registers than the layout used for ptrace(2).
-
-   Newer OpenBSD versions use ELF core files.  Here the register sets
-   match the ptrace(2) layout.  */
-
-/* From <machine/reg.h>.  */
-const struct sparc_gregmap sparc64obsd_gregmap =
-{
-  0 * 8,			/* "tstate" */
-  1 * 8,			/* %pc */
-  2 * 8,			/* %npc */
-  3 * 8,			/* %y */
-  -1,				/* %fprs */
-  -1,
-  5 * 8,			/* %g1 */
-  20 * 8,			/* %l0 */
-  4				/* sizeof (%y) */
-};
-
-const struct sparc_gregmap sparc64obsd_core_gregmap =
-{
-  0 * 8,			/* "tstate" */
-  1 * 8,			/* %pc */
-  2 * 8,			/* %npc */
-  3 * 8,			/* %y */
-  -1,				/* %fprs */
-  -1,
-  7 * 8,			/* %g1 */
-  22 * 8,			/* %l0 */
-  4				/* sizeof (%y) */
-};
-
-static void
-sparc64obsd_supply_gregset (const struct regset *regset,
-			    struct regcache *regcache,
-			    int regnum, const void *gregs, size_t len)
-{
-  const void *fpregs = (char *)gregs + 288;
-
-  if (len < 832)
-    {
-      sparc64_supply_gregset (&sparc64obsd_gregmap, regcache, regnum, gregs);
-      return;
-    }
-
-  sparc64_supply_gregset (&sparc64obsd_core_gregmap, regcache, regnum, gregs);
-  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-static void
-sparc64obsd_supply_fpregset (const struct regset *regset,
-			     struct regcache *regcache,
-			     int regnum, const void *fpregs, size_t len)
-{
-  sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-
-/* Signal trampolines.  */
-
-/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
-   in virtual memory.  The randomness makes it somewhat tricky to
-   detect it, but fortunately we can rely on the fact that the start
-   of the sigtramp routine is page-aligned.  We recognize the
-   trampoline by looking for the code that invokes the sigreturn
-   system call.  The offset where we can find that code varies from
-   release to release.
-
-   By the way, the mapping mentioned above is read-only, so you cannot
-   place a breakpoint in the signal trampoline.  */
-
-/* Default page size.  */
-static const int sparc64obsd_page_size = 8192;
-
-/* Offset for sigreturn(2).  */
-static const int sparc64obsd_sigreturn_offset[] = {
-  0xf0,				/* OpenBSD 3.8 */
-  0xec,				/* OpenBSD 3.6 */
-  0xe8,				/* OpenBSD 3.2 */
-  -1
-};
-
-static int
-sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
-{
-  CORE_ADDR start_pc = (pc & ~(sparc64obsd_page_size - 1));
-  unsigned long insn;
-  const int *offset;
-
-  if (name)
-    return 0;
-
-  for (offset = sparc64obsd_sigreturn_offset; *offset != -1; offset++)
-    {
-      /* Check for "restore %g0, SYS_sigreturn, %g1".  */
-      insn = sparc_fetch_instruction (start_pc + *offset);
-      if (insn != 0x83e82067)
-	continue;
-
-      /* Check for "t ST_SYSCALL".  */
-      insn = sparc_fetch_instruction (start_pc + *offset + 8);
-      if (insn != 0x91d02000)
-	continue;
-
-      return 1;
-    }
-
-  return 0;
-}
-
-static struct sparc_frame_cache *
-sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR addr;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  /* If we couldn't find the frame's function, we're probably dealing
-     with an on-stack signal trampoline.  */
-  if (cache->pc == 0)
-    {
-      cache->pc = get_frame_pc (this_frame);
-      cache->pc &= ~(sparc64obsd_page_size - 1);
-
-      /* Since we couldn't find the frame's function, the cache was
-         initialized under the assumption that we're frameless.  */
-      sparc_record_save_insn (cache);
-      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
-      if (addr & 1)
-	addr += BIAS;
-      cache->base = addr;
-    }
-
-  /* We find the appropriate instance of `struct sigcontext' at a
-     fixed offset in the signal frame.  */
-  addr = cache->base + 128 + 16;
-  cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, this_frame);
-
-  return cache;
-}
-
-static void
-sparc64obsd_frame_this_id (struct frame_info *this_frame, void **this_cache,
-			   struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc64obsd_frame_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc64obsd_frame_prev_register (struct frame_info *this_frame,
-				 void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc64obsd_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc64obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				    struct frame_info *this_frame,
-				    void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (sparc64obsd_pc_in_sigtramp (pc, name))
-    return 1;
-
-  return 0;
-}
-
-static const struct frame_unwind sparc64obsd_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc64obsd_frame_this_id,
-  sparc64obsd_frame_prev_register,
-  NULL,
-  sparc64obsd_sigtramp_frame_sniffer
-};
-
-/* Kernel debugging support.  */
-
-static struct sparc_frame_cache *
-sparc64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR sp, trapframe_addr;
-  int regnum;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  sp = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
-  trapframe_addr = sp + BIAS + 176;
-
-  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
-
-  cache->saved_regs[SPARC64_STATE_REGNUM].addr = trapframe_addr;
-  cache->saved_regs[SPARC64_PC_REGNUM].addr = trapframe_addr + 8;
-  cache->saved_regs[SPARC64_NPC_REGNUM].addr = trapframe_addr + 16;
-
-  for (regnum = SPARC_G0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
-    cache->saved_regs[regnum].addr =
-      trapframe_addr + 48 + (regnum - SPARC_G0_REGNUM) * 8;
-
-  return cache;
-}
-
-static void
-sparc64obsd_trapframe_this_id (struct frame_info *this_frame,
-			       void **this_cache, struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc64obsd_trapframe_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc64obsd_trapframe_prev_register (struct frame_info *this_frame,
-				     void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc64obsd_trapframe_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc64obsd_trapframe_sniffer (const struct frame_unwind *self,
-			       struct frame_info *this_frame,
-			       void **this_cache)
-{
-  CORE_ADDR pc;
-  ULONGEST pstate;
-  const char *name;
-
-  /* Check whether we are in privileged mode, and bail out if we're not.  */
-  pstate = get_frame_register_unsigned (this_frame, SPARC64_PSTATE_REGNUM);
-  if ((pstate & SPARC64_PSTATE_PRIV) == 0)
-    return 0;
-
-  pc = get_frame_address_in_block (this_frame);
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (name && strcmp (name, "Lslowtrap_reenter") == 0)
-    return 1;
-
-  return 0;
-}
-
-static const struct frame_unwind sparc64obsd_trapframe_unwind =
-{
-  NORMAL_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc64obsd_trapframe_this_id,
-  sparc64obsd_trapframe_prev_register,
-  NULL,
-  sparc64obsd_trapframe_sniffer
-};
-
-
-/* Threads support.  */
-
-/* Offset wthin the thread structure where we can find %fp and %i7.  */
-#define SPARC64OBSD_UTHREAD_FP_OFFSET	232
-#define SPARC64OBSD_UTHREAD_PC_OFFSET	240
-
-static void
-sparc64obsd_supply_uthread (struct regcache *regcache,
-			    int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR fp, fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
-  gdb_byte buf[8];
-
-  gdb_assert (regnum >= -1);
-
-  fp = read_memory_unsigned_integer (fp_addr, 8, byte_order);
-  if (regnum == SPARC_SP_REGNUM || regnum == -1)
-    {
-      store_unsigned_integer (buf, 8, byte_order, fp);
-      regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
-
-      if (regnum == SPARC_SP_REGNUM)
-	return;
-    }
-
-  if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM
-      || regnum == -1)
-    {
-      CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
-
-      i7 = read_memory_unsigned_integer (i7_addr, 8, byte_order);
-      if (regnum == SPARC64_PC_REGNUM || regnum == -1)
-	{
-	  store_unsigned_integer (buf, 8, byte_order, i7 + 8);
-	  regcache_raw_supply (regcache, SPARC64_PC_REGNUM, buf);
-	}
-      if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
-	{
-	  store_unsigned_integer (buf, 8, byte_order, i7 + 12);
-	  regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, buf);
-	}
-
-      if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM)
-	return;
-    }
-
-  sparc_supply_rwindow (regcache, fp, regnum);
-}
-
-static void
-sparc64obsd_collect_uthread(const struct regcache *regcache,
-			    int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp;
-  gdb_byte buf[8];
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == SPARC_SP_REGNUM || regnum == -1)
-    {
-      CORE_ADDR fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
-
-      regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
-      write_memory (fp_addr,buf, 8);
-    }
-
-  if (regnum == SPARC64_PC_REGNUM || regnum == -1)
-    {
-      CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
-
-      regcache_raw_collect (regcache, SPARC64_PC_REGNUM, buf);
-      i7 = extract_unsigned_integer (buf, 8, byte_order) - 8;
-      write_memory_unsigned_integer (i7_addr, 8, byte_order, i7);
-
-      if (regnum == SPARC64_PC_REGNUM)
-	return;
-    }
-
-  regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
-  sp = extract_unsigned_integer (buf, 8, byte_order);
-  sparc_collect_rwindow (regcache, sp, regnum);
-}
-
-
-static const struct regset sparc64obsd_gregset =
-  {
-    NULL, sparc64obsd_supply_gregset, NULL
-  };
-
-static const struct regset sparc64obsd_fpregset =
-  {
-    NULL, sparc64obsd_supply_fpregset, NULL
-  };
-
-static void
-sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->gregset = &sparc64obsd_gregset;
-  tdep->sizeof_gregset = 288;
-  tdep->fpregset = &sparc64obsd_fpregset;
-  tdep->sizeof_fpregset = 272;
-
-  /* Make sure we can single-step "new" syscalls.  */
-  tdep->step_trap = sparcnbsd_step_trap;
-
-  frame_unwind_append_unwinder (gdbarch, &sparc64obsd_frame_unwind);
-  frame_unwind_append_unwinder (gdbarch, &sparc64obsd_trapframe_unwind);
-
-  sparc64_init_abi (info, gdbarch);
-  obsd_init_abi (info, gdbarch);
-
-  /* OpenBSD/sparc64 has SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_lp64_fetch_link_map_offsets);
-  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
-
-  /* OpenBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, sparc64obsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, sparc64obsd_collect_uthread);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc64obsd_tdep (void);
-
-void
-_initialize_sparc64obsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
-			  GDB_OSABI_OPENBSD_ELF, sparc64obsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-sol2-tdep.c ./gdb/sparc64-sol2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-sol2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-sol2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -107,7 +107,7 @@ sparc64_sol2_sigtramp_frame_cache (struc
   int regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sparc_frame_cache *) *this_cache;
 
   cache = sparc_frame_cache (this_frame, this_cache);
   gdb_assert (cache == *this_cache);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-tdep.c ./gdb/sparc64-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,7 @@
 #include "objfiles.h"
 #include "osabi.h"
 #include "regcache.h"
+#include "target-descriptions.h"
 #include "target.h"
 #include "value.h"
 
@@ -226,28 +227,29 @@ sparc64_fprs_type (struct gdbarch *gdbar
 
 
 /* Register information.  */
+#define SPARC64_FPU_REGISTERS                             \
+  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",         \
+  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",   \
+  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
+  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
+  "f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46", \
+  "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62"
+#define SPARC64_CP0_REGISTERS                                             \
+  "pc", "npc",                                                            \
+  /* FIXME: Give "state" a name until we start using register groups.  */ \
+  "state",                                                                \
+  "fsr",                                                                  \
+  "fprs",                                                                 \
+  "y"
+
+static const char *sparc64_fpu_register_names[] = { SPARC64_FPU_REGISTERS };
+static const char *sparc64_cp0_register_names[] = { SPARC64_CP0_REGISTERS };
 
 static const char *sparc64_register_names[] =
 {
-  "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-  "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
-  "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
-  "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
-
-  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-  "f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46",
-  "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",
-
-  "pc", "npc",
-  
-  /* FIXME: Give "state" a name until we start using register groups.  */
-  "state",
-  "fsr",
-  "fprs",
-  "y",
+  SPARC_CORE_REGISTERS,
+  SPARC64_FPU_REGISTERS,
+  SPARC64_CP0_REGISTERS
 };
 
 /* Total number of registers.  */
@@ -272,19 +274,59 @@ static const char *sparc64_pseudo_regist
 /* Total number of pseudo registers.  */
 #define SPARC64_NUM_PSEUDO_REGS ARRAY_SIZE (sparc64_pseudo_register_names)
 
+/* Return the name of pseudo register REGNUM.  */
+
+static const char *
+sparc64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  if (regnum < SPARC64_NUM_PSEUDO_REGS)
+    return sparc64_pseudo_register_names[regnum];
+
+  internal_error (__FILE__, __LINE__,
+                  _("sparc64_pseudo_register_name: bad register number %d"),
+                  regnum);
+}
+
 /* Return the name of register REGNUM.  */
 
 static const char *
 sparc64_register_name (struct gdbarch *gdbarch, int regnum)
 {
-  if (regnum >= 0 && regnum < SPARC64_NUM_REGS)
+  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
+    return tdesc_register_name (gdbarch, regnum);
+
+  if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
     return sparc64_register_names[regnum];
 
-  if (regnum >= SPARC64_NUM_REGS
-      && regnum < SPARC64_NUM_REGS + SPARC64_NUM_PSEUDO_REGS)
-    return sparc64_pseudo_register_names[regnum - SPARC64_NUM_REGS];
+  return sparc64_pseudo_register_name (gdbarch, regnum);
+}
 
-  return NULL;
+/* Return the GDB type object for the "standard" data type of data in
+   pseudo register REGNUM.  */
+
+static struct type *
+sparc64_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  if (regnum == SPARC64_CWP_REGNUM)
+    return builtin_type (gdbarch)->builtin_int64;
+  if (regnum == SPARC64_PSTATE_REGNUM)
+    return sparc64_pstate_type (gdbarch);
+  if (regnum == SPARC64_ASI_REGNUM)
+    return builtin_type (gdbarch)->builtin_int64;
+  if (regnum == SPARC64_CCR_REGNUM)
+    return builtin_type (gdbarch)->builtin_int64;
+  if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D62_REGNUM)
+    return builtin_type (gdbarch)->builtin_double;
+  if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q60_REGNUM)
+    return builtin_type (gdbarch)->builtin_long_double;
+
+  internal_error (__FILE__, __LINE__,
+                  _("sparc64_pseudo_register_type: bad register number %d"),
+                  regnum);
 }
 
 /* Return the GDB type object for the "standard" data type of data in
@@ -293,8 +335,10 @@ sparc64_register_name (struct gdbarch *g
 static struct type *
 sparc64_register_type (struct gdbarch *gdbarch, int regnum)
 {
-  /* Raw registers.  */
+  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
+    return tdesc_register_type (gdbarch, regnum);
 
+  /* Raw registers.  */
   if (regnum == SPARC_SP_REGNUM || regnum == SPARC_FP_REGNUM)
     return builtin_type (gdbarch)->builtin_data_ptr;
   if (regnum >= SPARC_G0_REGNUM && regnum <= SPARC_I7_REGNUM)
@@ -319,19 +363,8 @@ sparc64_register_type (struct gdbarch *g
     return builtin_type (gdbarch)->builtin_int64;
 
   /* Pseudo registers.  */
-
-  if (regnum == SPARC64_CWP_REGNUM)
-    return builtin_type (gdbarch)->builtin_int64;
-  if (regnum == SPARC64_PSTATE_REGNUM)
-    return sparc64_pstate_type (gdbarch);
-  if (regnum == SPARC64_ASI_REGNUM)
-    return builtin_type (gdbarch)->builtin_int64;
-  if (regnum == SPARC64_CCR_REGNUM)
-    return builtin_type (gdbarch)->builtin_int64;
-  if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D62_REGNUM)
-    return builtin_type (gdbarch)->builtin_double;
-  if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q60_REGNUM)
-    return builtin_type (gdbarch)->builtin_long_double;
+  if (regnum >= gdbarch_num_regs (gdbarch))
+    return sparc64_pseudo_register_type (gdbarch, regnum);
 
   internal_error (__FILE__, __LINE__, _("invalid regnum"));
 }
@@ -344,7 +377,7 @@ sparc64_pseudo_register_read (struct gdb
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   enum register_status status;
 
-  gdb_assert (regnum >= SPARC64_NUM_REGS);
+  regnum -= gdbarch_num_regs (gdbarch);
 
   if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
     {
@@ -421,7 +454,8 @@ sparc64_pseudo_register_write (struct gd
 			       int regnum, const gdb_byte *buf)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  gdb_assert (regnum >= SPARC64_NUM_REGS);
+
+  regnum -= gdbarch_num_regs (gdbarch);
 
   if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
     {
@@ -638,6 +672,7 @@ static void
 sparc64_store_floating_fields (struct regcache *regcache, struct type *type,
 			       const gdb_byte *valbuf, int element, int bitpos)
 {
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int len = TYPE_LENGTH (type);
 
   gdb_assert (element < 16);
@@ -652,14 +687,15 @@ sparc64_store_floating_fields (struct re
 	  gdb_assert (bitpos == 0);
 	  gdb_assert ((element % 2) == 0);
 
-	  regnum = SPARC64_Q0_REGNUM + element / 2;
+	  regnum = gdbarch_num_regs (gdbarch) + SPARC64_Q0_REGNUM + element / 2;
 	  regcache_cooked_write (regcache, regnum, valbuf);
 	}
       else if (len == 8)
 	{
 	  gdb_assert (bitpos == 0 || bitpos == 64);
 
-	  regnum = SPARC64_D0_REGNUM + element + bitpos / 64;
+	  regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM
+                   + element + bitpos / 64;
 	  regcache_cooked_write (regcache, regnum, valbuf + (bitpos / 8));
 	}
       else
@@ -712,6 +748,8 @@ static void
 sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
 				 gdb_byte *valbuf, int bitpos)
 {
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
   if (sparc64_floating_p (type))
     {
       int len = TYPE_LENGTH (type);
@@ -721,14 +759,15 @@ sparc64_extract_floating_fields (struct 
 	{
 	  gdb_assert (bitpos == 0 || bitpos == 128);
 
-	  regnum = SPARC64_Q0_REGNUM + bitpos / 128;
+	  regnum = gdbarch_num_regs (gdbarch) + SPARC64_Q0_REGNUM
+                   + bitpos / 128;
 	  regcache_cooked_read (regcache, regnum, valbuf + (bitpos / 8));
 	}
       else if (len == 8)
 	{
 	  gdb_assert (bitpos % 64 == 0 && bitpos >= 0 && bitpos < 256);
 
-	  regnum = SPARC64_D0_REGNUM + bitpos / 64;
+	  regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM + bitpos / 64;
 	  regcache_cooked_read (regcache, regnum, valbuf + (bitpos / 8));
 	}
       else
@@ -890,7 +929,8 @@ sparc64_store_arguments (struct regcache
 	  /* Structure, Union or long double Complex arguments.  */
 	  gdb_assert (len <= 16);
 	  memset (buf, 0, sizeof (buf));
-	  valbuf = memcpy (buf, valbuf, len);
+	  memcpy (buf, valbuf, len);
+	  valbuf = buf;
 
 	  if (element % 2 && sparc64_16_byte_align_p (type))
 	    element++;
@@ -910,13 +950,13 @@ sparc64_store_arguments (struct regcache
 	  /* Float Complex or double Complex arguments.  */
 	  if (element < 16)
 	    {
-	      regnum = SPARC64_D0_REGNUM + element;
+	      regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM + element;
 
 	      if (len == 16)
 		{
-		  if (regnum < SPARC64_D30_REGNUM)
+		  if (regnum < gdbarch_num_regs (gdbarch) + SPARC64_D30_REGNUM)
 		    regcache_cooked_write (regcache, regnum + 1, valbuf + 8);
-		  if (regnum < SPARC64_D10_REGNUM)
+		  if (regnum < gdbarch_num_regs (gdbarch) + SPARC64_D10_REGNUM)
 		    regcache_cooked_write (regcache,
 					   SPARC_O0_REGNUM + element + 1,
 					   valbuf + 8);
@@ -931,12 +971,14 @@ sparc64_store_arguments (struct regcache
 	      if (element % 2)
 		element++;
 	      if (element < 16)
-		regnum = SPARC64_Q0_REGNUM + element / 2;
+		regnum = gdbarch_num_regs (gdbarch) + SPARC64_Q0_REGNUM
+                         + element / 2;
 	    }
 	  else if (len == 8)
 	    {
 	      if (element < 16)
-		regnum = SPARC64_D0_REGNUM + element;
+		regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM
+                         + element;
 	    }
 	  else if (len == 4)
 	    {
@@ -951,7 +993,8 @@ sparc64_store_arguments (struct regcache
 	      valbuf = buf;
 	      len = 8;
 	      if (element < 16)
-		regnum = SPARC64_D0_REGNUM + element;
+		regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM
+                         + element;
 	    }
 	}
       else
@@ -968,19 +1011,24 @@ sparc64_store_arguments (struct regcache
 
 	  /* If we're storing the value in a floating-point register,
              also store it in the corresponding %0 register(s).  */
-	  if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D10_REGNUM)
-	    {
-	      gdb_assert (element < 6);
-	      regnum = SPARC_O0_REGNUM + element;
-	      regcache_cooked_write (regcache, regnum, valbuf);
-	    }
-	  else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q8_REGNUM)
-	    {
-	      gdb_assert (element < 5);
-	      regnum = SPARC_O0_REGNUM + element;
-	      regcache_cooked_write (regcache, regnum, valbuf);
-	      regcache_cooked_write (regcache, regnum + 1, valbuf + 8);
-	    }
+	  if (regnum >= gdbarch_num_regs (gdbarch))
+            {
+              regnum -= gdbarch_num_regs (gdbarch);
+
+              if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D10_REGNUM)
+	        {
+	          gdb_assert (element < 6);
+	          regnum = SPARC_O0_REGNUM + element;
+	          regcache_cooked_write (regcache, regnum, valbuf);
+                }
+              else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q8_REGNUM)
+                {
+                  gdb_assert (element < 5);
+                  regnum = SPARC_O0_REGNUM + element;
+                  regcache_cooked_write (regcache, regnum, valbuf);
+                  regcache_cooked_write (regcache, regnum + 1, valbuf + 8);
+	        }
+            }
 	}
 
       /* Always store the argument in memory.  */
@@ -1184,6 +1232,10 @@ sparc64_init_abi (struct gdbarch_info in
 
   tdep->pc_regnum = SPARC64_PC_REGNUM;
   tdep->npc_regnum = SPARC64_NPC_REGNUM;
+  tdep->fpu_register_names = sparc64_fpu_register_names;
+  tdep->fpu_registers_num = ARRAY_SIZE (sparc64_fpu_register_names);
+  tdep->cp0_register_names = sparc64_cp0_register_names;
+  tdep->cp0_registers_num = ARRAY_SIZE (sparc64_cp0_register_names);
 
   /* This is what all the fuss is about.  */
   set_gdbarch_long_bit (gdbarch, 64);
@@ -1194,6 +1246,8 @@ sparc64_init_abi (struct gdbarch_info in
   set_gdbarch_register_name (gdbarch, sparc64_register_name);
   set_gdbarch_register_type (gdbarch, sparc64_register_type);
   set_gdbarch_num_pseudo_regs (gdbarch, SPARC64_NUM_PSEUDO_REGS);
+  set_tdesc_pseudo_register_name (gdbarch, sparc64_pseudo_register_name);
+  set_tdesc_pseudo_register_type (gdbarch, sparc64_pseudo_register_type);
   set_gdbarch_pseudo_register_read (gdbarch, sparc64_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, sparc64_pseudo_register_write);
 
@@ -1244,7 +1298,7 @@ sparc64_supply_gregset (const struct spa
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   gdb_byte zero[8] = { 0 };
   int i;
 
@@ -1361,7 +1415,7 @@ sparc64_collect_gregset (const struct sp
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *) gregs;
   int i;
 
   if (sparc32)
@@ -1469,7 +1523,7 @@ sparc64_supply_fpregset (const struct sp
 			 int regnum, const void *fpregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
   int i;
 
   for (i = 0; i < 32; i++)
@@ -1507,7 +1561,7 @@ sparc64_collect_fpregset (const struct s
 			  int regnum, void *fpregs)
 {
   int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
-  gdb_byte *regs = fpregs;
+  gdb_byte *regs = (gdb_byte *) fpregs;
   int i;
 
   for (i = 0; i < 32; i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-tdep.h ./gdb/sparc64-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc64-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc64-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for UltraSPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -56,9 +56,12 @@ enum sparc64_regnum
   SPARC64_FSR_REGNUM,		/* %fsr */
   SPARC64_FPRS_REGNUM,		/* %fprs */
   SPARC64_Y_REGNUM,		/* %y */
+};
 
-  /* Pseudo registers.  */
-  SPARC64_CWP_REGNUM,		/* %cwp */
+/* Pseudo registers.  */
+enum sparc64_pseudo_regnum
+{
+  SPARC64_CWP_REGNUM = 0,	/* %cwp */
   SPARC64_PSTATE_REGNUM,	/* %pstate */
   SPARC64_ASI_REGNUM,		/* %asi */
   SPARC64_CCR_REGNUM,		/* %ccr */
@@ -119,12 +122,12 @@ extern const struct sparc_fpregmap sparc
 extern void sparc64_sol2_init_abi (struct gdbarch_info info,
 				   struct gdbarch *gdbarch);
 
-/* Variables exported from sparc64fbsd-tdep.c.  */
+/* Variables exported from sparc64-fbsd-tdep.c.  */
 
 /* Register offsets for FreeBSD/sparc64.  */
 extern const struct sparc_gregmap sparc64fbsd_gregmap;
 
-/* Functions and variables exported from sparc64nbsd-tdep.c.  */
+/* Functions and variables exported from sparc64-nbsd-tdep.c.  */
 
 /* Register offsets for NetBSD/sparc64.  */
 extern const struct sparc_gregmap sparc64nbsd_gregmap;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-linux-nat.c ./gdb/sparc-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Native-dependent code for GNU/Linux SPARC.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-linux-tdep.c ./gdb/sparc-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-linux-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-linux-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nat.c ./gdb/sparc-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nat.h ./gdb/sparc-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nat.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-nat.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nbsd-nat.c ./gdb/sparc-nbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc-nbsd-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,73 @@
+/* Native-dependent code for NetBSD/sparc.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "regcache.h"
+#include "target.h"
+
+#include "sparc-tdep.h"
+#include "sparc-nat.h"
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc32nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  /* The following is true for NetBSD 1.6.2:
+
+     The pcb contains %sp, %pc, %psr and %wim.  From this information
+     we reconstruct the register state as it would look when we just
+     returned from cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->pcb_sp == 0)
+    return 0;
+
+  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+  regcache_raw_supply (regcache, SPARC_O7_REGNUM, &pcb->pcb_pc);
+  regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, &pcb->pcb_psr);
+  regcache_raw_supply (regcache, SPARC32_WIM_REGNUM, &pcb->pcb_wim);
+  regcache_raw_supply (regcache, SPARC32_PC_REGNUM, &pcb->pcb_pc);
+
+  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparcnbsd_nat (void);
+
+void
+_initialize_sparcnbsd_nat (void)
+{
+  sparc_gregmap = &sparc32nbsd_gregmap;
+  sparc_fpregmap = &sparc32_bsd_fpregmap;
+
+  /* We've got nothing to add to the generic SPARC target.  */
+  add_target (sparc_target ());
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (sparc32nbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcnbsd-nat.c ./gdb/sparcnbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcnbsd-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparcnbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,73 +0,0 @@
-/* Native-dependent code for NetBSD/sparc.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "regcache.h"
-#include "target.h"
-
-#include "sparc-tdep.h"
-#include "sparc-nat.h"
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <sys/types.h>
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-sparc32nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  /* The following is true for NetBSD 1.6.2:
-
-     The pcb contains %sp, %pc, %psr and %wim.  From this information
-     we reconstruct the register state as it would look when we just
-     returned from cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->pcb_sp == 0)
-    return 0;
-
-  regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
-  regcache_raw_supply (regcache, SPARC_O7_REGNUM, &pcb->pcb_pc);
-  regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, &pcb->pcb_psr);
-  regcache_raw_supply (regcache, SPARC32_WIM_REGNUM, &pcb->pcb_wim);
-  regcache_raw_supply (regcache, SPARC32_PC_REGNUM, &pcb->pcb_pc);
-
-  sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparcnbsd_nat (void);
-
-void
-_initialize_sparcnbsd_nat (void)
-{
-  sparc_gregmap = &sparc32nbsd_gregmap;
-  sparc_fpregmap = &sparc32_bsd_fpregmap;
-
-  /* We've got nothing to add to the generic SPARC target.  */
-  add_target (sparc_target ());
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (sparc32nbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nbsd-tdep.c ./gdb/sparc-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc-nbsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,326 @@
+/* Target-dependent code for NetBSD/sparc.
+
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Contributed by Wasabi Systems, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "solib-svr4.h"
+#include "symtab.h"
+#include "trad-frame.h"
+
+#include "sparc-tdep.h"
+#include "nbsd-tdep.h"
+
+/* Macros to extract fields from SPARC instructions.  */
+#define X_RS1(i) (((i) >> 14) & 0x1f)
+#define X_RS2(i) ((i) & 0x1f)
+#define X_I(i) (((i) >> 13) & 1)
+
+const struct sparc_gregmap sparc32nbsd_gregmap =
+{
+  0 * 4,			/* %psr */
+  1 * 4,			/* %pc */
+  2 * 4,			/* %npc */
+  3 * 4,			/* %y */
+  -1,				/* %wim */
+  -1,				/* %tbr */
+  5 * 4,			/* %g1 */
+  -1				/* %l0 */
+};
+
+static void
+sparc32nbsd_supply_gregset (const struct regset *regset,
+			    struct regcache *regcache,
+			    int regnum, const void *gregs, size_t len)
+{
+  sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
+
+  /* Traditional NetBSD core files don't use multiple register sets.
+     Instead, the general-purpose and floating-point registers are
+     lumped together in a single section.  */
+  if (len >= 212)
+    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum,
+			     (const char *) gregs + 80);
+}
+
+static void
+sparc32nbsd_supply_fpregset (const struct regset *regset,
+			     struct regcache *regcache,
+			     int regnum, const void *fpregs, size_t len)
+{
+  sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
+}
+
+
+/* Signal trampolines.  */
+
+/* The following variables describe the location of an on-stack signal
+   trampoline.  The current values correspond to the memory layout for
+   NetBSD 1.3 and up.  These shouldn't be necessary for NetBSD 2.0 and
+   up, since NetBSD uses signal trampolines provided by libc now.  */
+
+static const CORE_ADDR sparc32nbsd_sigtramp_start = 0xeffffef0;
+static const CORE_ADDR sparc32nbsd_sigtramp_end = 0xeffffff0;
+
+static int
+sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+  if (pc >= sparc32nbsd_sigtramp_start && pc < sparc32nbsd_sigtramp_end)
+    return 1;
+
+  return nbsd_pc_in_sigtramp (pc, name);
+}
+
+struct trad_frame_saved_reg *
+sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+  struct trad_frame_saved_reg *saved_regs;
+  CORE_ADDR addr, sigcontext_addr;
+  int regnum, delta;
+  ULONGEST psr;
+
+  saved_regs = trad_frame_alloc_saved_regs (this_frame);
+
+  /* We find the appropriate instance of `struct sigcontext' at a
+     fixed offset in the signal frame.  */
+  addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
+  sigcontext_addr = addr + 64 + 16;
+
+  /* The registers are saved in bits and pieces scattered all over the
+     place.  The code below records their location on the assumption
+     that the part of the signal trampoline that saves the state has
+     been executed.  */
+
+  saved_regs[SPARC_SP_REGNUM].addr = sigcontext_addr + 8;
+  saved_regs[SPARC32_PC_REGNUM].addr = sigcontext_addr + 12;
+  saved_regs[SPARC32_NPC_REGNUM].addr = sigcontext_addr + 16;
+  saved_regs[SPARC32_PSR_REGNUM].addr = sigcontext_addr + 20;
+  saved_regs[SPARC_G1_REGNUM].addr = sigcontext_addr + 24;
+  saved_regs[SPARC_O0_REGNUM].addr = sigcontext_addr + 28;
+
+  /* The remaining `global' registers and %y are saved in the `local'
+     registers.  */
+  delta = SPARC_L0_REGNUM - SPARC_G0_REGNUM;
+  for (regnum = SPARC_G2_REGNUM; regnum <= SPARC_G7_REGNUM; regnum++)
+    saved_regs[regnum].realreg = regnum + delta;
+  saved_regs[SPARC32_Y_REGNUM].realreg = SPARC_L1_REGNUM;
+
+  /* The remaining `out' registers can be found in the current frame's
+     `in' registers.  */
+  delta = SPARC_I0_REGNUM - SPARC_O0_REGNUM;
+  for (regnum = SPARC_O1_REGNUM; regnum <= SPARC_O5_REGNUM; regnum++)
+    saved_regs[regnum].realreg = regnum + delta;
+  saved_regs[SPARC_O7_REGNUM].realreg = SPARC_I7_REGNUM;
+
+  /* The `local' and `in' registers have been saved in the register
+     save area.  */
+  addr = saved_regs[SPARC_SP_REGNUM].addr;
+  addr = get_frame_memory_unsigned (this_frame, addr, 4);
+  for (regnum = SPARC_L0_REGNUM;
+       regnum <= SPARC_I7_REGNUM; regnum++, addr += 4)
+    saved_regs[regnum].addr = addr;
+
+  /* Handle StackGhost.  */
+  {
+    ULONGEST wcookie = sparc_fetch_wcookie (gdbarch);
+
+    if (wcookie != 0)
+      {
+	ULONGEST i7;
+
+	addr = saved_regs[SPARC_I7_REGNUM].addr;
+	i7 = get_frame_memory_unsigned (this_frame, addr, 4);
+	trad_frame_set_value (saved_regs, SPARC_I7_REGNUM, i7 ^ wcookie);
+      }
+  }
+
+  /* The floating-point registers are only saved if the EF bit in %prs
+     has been set.  */
+
+#define PSR_EF	0x00001000
+
+  addr = saved_regs[SPARC32_PSR_REGNUM].addr;
+  psr = get_frame_memory_unsigned (this_frame, addr, 4);
+  if (psr & PSR_EF)
+    {
+      CORE_ADDR sp;
+
+      sp = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
+      saved_regs[SPARC32_FSR_REGNUM].addr = sp + 96;
+      for (regnum = SPARC_F0_REGNUM, addr = sp + 96 + 8;
+	   regnum <= SPARC_F31_REGNUM; regnum++, addr += 4)
+	saved_regs[regnum].addr = addr;
+    }
+
+  return saved_regs;
+}
+
+static struct sparc_frame_cache *
+sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
+				    void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR addr;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  /* If we couldn't find the frame's function, we're probably dealing
+     with an on-stack signal trampoline.  */
+  if (cache->pc == 0)
+    {
+      cache->pc = sparc32nbsd_sigtramp_start;
+
+      /* Since we couldn't find the frame's function, the cache was
+         initialized under the assumption that we're frameless.  */
+      sparc_record_save_insn (cache);
+      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
+      cache->base = addr;
+    }
+
+  cache->saved_regs = sparc32nbsd_sigcontext_saved_regs (this_frame);
+
+  return cache;
+}
+
+static void
+sparc32nbsd_sigcontext_frame_this_id (struct frame_info *this_frame,
+				      void **this_cache,
+				      struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc32nbsd_sigcontext_frame_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc32nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame,
+					    void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc32nbsd_sigcontext_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
+				      struct frame_info *this_frame,
+				      void **this_cache)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (sparc32nbsd_pc_in_sigtramp (pc, name))
+    {
+      if (name == NULL || !startswith (name, "__sigtramp_sigcontext"))
+	return 1;
+    }
+
+  return 0;
+}
+
+static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc32nbsd_sigcontext_frame_this_id,
+  sparc32nbsd_sigcontext_frame_prev_register,
+  NULL,
+  sparc32nbsd_sigcontext_frame_sniffer
+};
+
+/* Return the address of a system call's alternative return
+   address.  */
+
+CORE_ADDR
+sparcnbsd_step_trap (struct frame_info *frame, unsigned long insn)
+{
+  if ((X_I (insn) == 0 && X_RS1 (insn) == 0 && X_RS2 (insn) == 0)
+      || (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
+    {
+      /* "New" system call.  */
+      ULONGEST number = get_frame_register_unsigned (frame, SPARC_G1_REGNUM);
+
+      if (number & 0x400)
+	return get_frame_register_unsigned (frame, SPARC_G2_REGNUM);
+      if (number & 0x800)
+	return get_frame_register_unsigned (frame, SPARC_G7_REGNUM);
+    }
+
+  return 0;
+}
+
+
+static const struct regset sparc32nbsd_gregset =
+  {
+    NULL, sparc32nbsd_supply_gregset, NULL
+  };
+
+static const struct regset sparc32nbsd_fpregset =
+  {
+    NULL, sparc32nbsd_supply_fpregset, NULL
+  };
+
+void
+sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* NetBSD doesn't support the 128-bit `long double' from the psABI.  */
+  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
+
+  tdep->gregset = &sparc32nbsd_gregset;
+  tdep->sizeof_gregset = 20 * 4;
+
+  tdep->fpregset = &sparc32nbsd_fpregset;
+  tdep->sizeof_fpregset = 33 * 4;
+
+  /* Make sure we can single-step "new" syscalls.  */
+  tdep->step_trap = sparcnbsd_step_trap;
+
+  frame_unwind_append_unwinder (gdbarch, &sparc32nbsd_sigcontext_frame_unwind);
+
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparcnbsd_tdep (void);
+
+void
+_initialize_sparcnbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD,
+			  sparc32nbsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcnbsd-tdep.c ./gdb/sparcnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcnbsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparcnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,378 +0,0 @@
-/* Target-dependent code for NetBSD/sparc.
-
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
-   Contributed by Wasabi Systems, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "gdbtypes.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "regset.h"
-#include "solib-svr4.h"
-#include "symtab.h"
-#include "trad-frame.h"
-
-#include "sparc-tdep.h"
-#include "nbsd-tdep.h"
-
-/* Macros to extract fields from SPARC instructions.  */
-#define X_RS1(i) (((i) >> 14) & 0x1f)
-#define X_RS2(i) ((i) & 0x1f)
-#define X_I(i) (((i) >> 13) & 1)
-
-const struct sparc_gregmap sparc32nbsd_gregmap =
-{
-  0 * 4,			/* %psr */
-  1 * 4,			/* %pc */
-  2 * 4,			/* %npc */
-  3 * 4,			/* %y */
-  -1,				/* %wim */
-  -1,				/* %tbr */
-  5 * 4,			/* %g1 */
-  -1				/* %l0 */
-};
-
-static void
-sparc32nbsd_supply_gregset (const struct regset *regset,
-			    struct regcache *regcache,
-			    int regnum, const void *gregs, size_t len)
-{
-  sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
-
-  /* Traditional NetBSD core files don't use multiple register sets.
-     Instead, the general-purpose and floating-point registers are
-     lumped together in a single section.  */
-  if (len >= 212)
-    sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum,
-			     (const char *) gregs + 80);
-}
-
-static void
-sparc32nbsd_supply_fpregset (const struct regset *regset,
-			     struct regcache *regcache,
-			     int regnum, const void *fpregs, size_t len)
-{
-  sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
-}
-
-
-/* Signal trampolines.  */
-
-/* The following variables describe the location of an on-stack signal
-   trampoline.  The current values correspond to the memory layout for
-   NetBSD 1.3 and up.  These shouldn't be necessary for NetBSD 2.0 and
-   up, since NetBSD uses signal trampolines provided by libc now.  */
-
-static const CORE_ADDR sparc32nbsd_sigtramp_start = 0xeffffef0;
-static const CORE_ADDR sparc32nbsd_sigtramp_end = 0xeffffff0;
-
-static int
-sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
-{
-  if (pc >= sparc32nbsd_sigtramp_start && pc < sparc32nbsd_sigtramp_end)
-    return 1;
-
-  return nbsd_pc_in_sigtramp (pc, name);
-}
-
-struct trad_frame_saved_reg *
-sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct trad_frame_saved_reg *saved_regs;
-  CORE_ADDR addr, sigcontext_addr;
-  int regnum, delta;
-  ULONGEST psr;
-
-  saved_regs = trad_frame_alloc_saved_regs (this_frame);
-
-  /* We find the appropriate instance of `struct sigcontext' at a
-     fixed offset in the signal frame.  */
-  addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
-  sigcontext_addr = addr + 64 + 16;
-
-  /* The registers are saved in bits and pieces scattered all over the
-     place.  The code below records their location on the assumption
-     that the part of the signal trampoline that saves the state has
-     been executed.  */
-
-  saved_regs[SPARC_SP_REGNUM].addr = sigcontext_addr + 8;
-  saved_regs[SPARC32_PC_REGNUM].addr = sigcontext_addr + 12;
-  saved_regs[SPARC32_NPC_REGNUM].addr = sigcontext_addr + 16;
-  saved_regs[SPARC32_PSR_REGNUM].addr = sigcontext_addr + 20;
-  saved_regs[SPARC_G1_REGNUM].addr = sigcontext_addr + 24;
-  saved_regs[SPARC_O0_REGNUM].addr = sigcontext_addr + 28;
-
-  /* The remaining `global' registers and %y are saved in the `local'
-     registers.  */
-  delta = SPARC_L0_REGNUM - SPARC_G0_REGNUM;
-  for (regnum = SPARC_G2_REGNUM; regnum <= SPARC_G7_REGNUM; regnum++)
-    saved_regs[regnum].realreg = regnum + delta;
-  saved_regs[SPARC32_Y_REGNUM].realreg = SPARC_L1_REGNUM;
-
-  /* The remaining `out' registers can be found in the current frame's
-     `in' registers.  */
-  delta = SPARC_I0_REGNUM - SPARC_O0_REGNUM;
-  for (regnum = SPARC_O1_REGNUM; regnum <= SPARC_O5_REGNUM; regnum++)
-    saved_regs[regnum].realreg = regnum + delta;
-  saved_regs[SPARC_O7_REGNUM].realreg = SPARC_I7_REGNUM;
-
-  /* The `local' and `in' registers have been saved in the register
-     save area.  */
-  addr = saved_regs[SPARC_SP_REGNUM].addr;
-  addr = get_frame_memory_unsigned (this_frame, addr, 4);
-  for (regnum = SPARC_L0_REGNUM;
-       regnum <= SPARC_I7_REGNUM; regnum++, addr += 4)
-    saved_regs[regnum].addr = addr;
-
-  /* Handle StackGhost.  */
-  {
-    ULONGEST wcookie = sparc_fetch_wcookie (gdbarch);
-
-    if (wcookie != 0)
-      {
-	ULONGEST i7;
-
-	addr = saved_regs[SPARC_I7_REGNUM].addr;
-	i7 = get_frame_memory_unsigned (this_frame, addr, 4);
-	trad_frame_set_value (saved_regs, SPARC_I7_REGNUM, i7 ^ wcookie);
-      }
-  }
-
-  /* The floating-point registers are only saved if the EF bit in %prs
-     has been set.  */
-
-#define PSR_EF	0x00001000
-
-  addr = saved_regs[SPARC32_PSR_REGNUM].addr;
-  psr = get_frame_memory_unsigned (this_frame, addr, 4);
-  if (psr & PSR_EF)
-    {
-      CORE_ADDR sp;
-
-      sp = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
-      saved_regs[SPARC32_FSR_REGNUM].addr = sp + 96;
-      for (regnum = SPARC_F0_REGNUM, addr = sp + 96 + 8;
-	   regnum <= SPARC_F31_REGNUM; regnum++, addr += 4)
-	saved_regs[regnum].addr = addr;
-    }
-
-  return saved_regs;
-}
-
-static struct sparc_frame_cache *
-sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
-				    void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR addr;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  /* If we couldn't find the frame's function, we're probably dealing
-     with an on-stack signal trampoline.  */
-  if (cache->pc == 0)
-    {
-      cache->pc = sparc32nbsd_sigtramp_start;
-
-      /* Since we couldn't find the frame's function, the cache was
-         initialized under the assumption that we're frameless.  */
-      sparc_record_save_insn (cache);
-      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
-      cache->base = addr;
-    }
-
-  cache->saved_regs = sparc32nbsd_sigcontext_saved_regs (this_frame);
-
-  return cache;
-}
-
-static void
-sparc32nbsd_sigcontext_frame_this_id (struct frame_info *this_frame,
-				      void **this_cache,
-				      struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc32nbsd_sigcontext_frame_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc32nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame,
-					    void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc32nbsd_sigcontext_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
-				      struct frame_info *this_frame,
-				      void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (sparc32nbsd_pc_in_sigtramp (pc, name))
-    {
-      if (name == NULL || !startswith (name, "__sigtramp_sigcontext"))
-	return 1;
-    }
-
-  return 0;
-}
-
-static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc32nbsd_sigcontext_frame_this_id,
-  sparc32nbsd_sigcontext_frame_prev_register,
-  NULL,
-  sparc32nbsd_sigcontext_frame_sniffer
-};
-
-/* Return the address of a system call's alternative return
-   address.  */
-
-CORE_ADDR
-sparcnbsd_step_trap (struct frame_info *frame, unsigned long insn)
-{
-  if ((X_I (insn) == 0 && X_RS1 (insn) == 0 && X_RS2 (insn) == 0)
-      || (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
-    {
-      /* "New" system call.  */
-      ULONGEST number = get_frame_register_unsigned (frame, SPARC_G1_REGNUM);
-
-      if (number & 0x400)
-	return get_frame_register_unsigned (frame, SPARC_G2_REGNUM);
-      if (number & 0x800)
-	return get_frame_register_unsigned (frame, SPARC_G7_REGNUM);
-    }
-
-  return 0;
-}
-
-
-static const struct regset sparc32nbsd_gregset =
-  {
-    NULL, sparc32nbsd_supply_gregset, NULL
-  };
-
-static const struct regset sparc32nbsd_fpregset =
-  {
-    NULL, sparc32nbsd_supply_fpregset, NULL
-  };
-
-static void
-sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* NetBSD doesn't support the 128-bit `long double' from the psABI.  */
-  set_gdbarch_long_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
-
-  tdep->gregset = &sparc32nbsd_gregset;
-  tdep->sizeof_gregset = 20 * 4;
-
-  tdep->fpregset = &sparc32nbsd_fpregset;
-  tdep->sizeof_fpregset = 33 * 4;
-
-  /* Make sure we can single-step "new" syscalls.  */
-  tdep->step_trap = sparcnbsd_step_trap;
-
-  frame_unwind_append_unwinder (gdbarch, &sparc32nbsd_sigcontext_frame_unwind);
-}
-
-static void
-sparc32nbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  sparc32nbsd_init_abi (info, gdbarch);
-}
-
-void
-sparc32nbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  sparc32nbsd_init_abi (info, gdbarch);
-
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-static enum gdb_osabi
-sparcnbsd_aout_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "a.out-sparc-netbsd") == 0)
-    return GDB_OSABI_NETBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-/* OpenBSD uses the traditional NetBSD core file format, even for
-   ports that use ELF.  Therefore, if the default OS ABI is OpenBSD
-   ELF, we return that instead of NetBSD a.out.  This is mainly for
-   the benfit of OpenBSD/sparc64, which inherits the sniffer below
-   since we include this file for an OpenBSD/sparc64 target.  For
-   OpenBSD/sparc, the NetBSD a.out OS ABI is probably similar enough
-   to both the OpenBSD a.out and the OpenBSD ELF OS ABI.  */
-#if defined (GDB_OSABI_DEFAULT) && (GDB_OSABI_DEFAULT == GDB_OSABI_OPENBSD_ELF)
-#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
-#else
-#define GDB_OSABI_NETBSD_CORE GDB_OSABI_NETBSD_AOUT
-#endif
-
-static enum gdb_osabi
-sparcnbsd_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
-    return GDB_OSABI_NETBSD_CORE;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparcnbsd_tdep (void);
-
-void
-_initialize_sparcnbsd_tdep (void)
-{
-  gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_aout_flavour,
-				  sparcnbsd_aout_osabi_sniffer);
-
-  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_unknown_flavour,
-                                  sparcnbsd_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD_AOUT,
-			  sparc32nbsd_aout_init_abi);
-  gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD_ELF,
-			  sparc32nbsd_elf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-obsd-tdep.c ./gdb/sparc-obsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-obsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/sparc-obsd-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,258 @@
+/* Target-dependent code for OpenBSD/sparc.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "floatformat.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "symtab.h"
+#include "trad-frame.h"
+
+#include "obsd-tdep.h"
+#include "sparc-tdep.h"
+#include "solib-svr4.h"
+#include "bsd-uthread.h"
+
+/* Signal trampolines.  */
+
+/* The OpenBSD kernel maps the signal trampoline at some random
+   location in user space, which means that the traditional BSD way of
+   detecting it won't work.
+
+   The signal trampoline will be mapped at an address that is page
+   aligned.  We recognize the signal trampoline by looking for the
+   sigreturn system call.  */
+
+static const int sparc32obsd_page_size = 4096;
+
+static int
+sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+  CORE_ADDR start_pc = (pc & ~(sparc32obsd_page_size - 1));
+  unsigned long insn;
+
+  if (name)
+    return 0;
+
+  /* Check for "restore %g0, SYS_sigreturn, %g1".  */
+  insn = sparc_fetch_instruction (start_pc + 0xec);
+  if (insn != 0x83e82067)
+    return 0;
+
+  /* Check for "t ST_SYSCALL".  */
+  insn = sparc_fetch_instruction (start_pc + 0xf4);
+  if (insn != 0x91d02000)
+    return 0;
+
+  return 1;
+}
+
+static struct sparc_frame_cache *
+sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame,
+				  void **this_cache)
+{
+  struct sparc_frame_cache *cache;
+  CORE_ADDR addr;
+
+  if (*this_cache)
+    return (struct sparc_frame_cache *) *this_cache;
+
+  cache = sparc_frame_cache (this_frame, this_cache);
+  gdb_assert (cache == *this_cache);
+
+  /* If we couldn't find the frame's function, we're probably dealing
+     with an on-stack signal trampoline.  */
+  if (cache->pc == 0)
+    {
+      cache->pc = get_frame_pc (this_frame);
+      cache->pc &= ~(sparc32obsd_page_size - 1);
+
+      /* Since we couldn't find the frame's function, the cache was
+         initialized under the assumption that we're frameless.  */
+      sparc_record_save_insn (cache);
+      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
+      cache->base = addr;
+    }
+
+  cache->saved_regs = sparc32nbsd_sigcontext_saved_regs (this_frame);
+
+  return cache;
+}
+
+static void
+sparc32obsd_sigtramp_frame_this_id (struct frame_info *this_frame,
+				    void **this_cache,
+				    struct frame_id *this_id)
+{
+  struct sparc_frame_cache *cache =
+    sparc32obsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static struct value *
+sparc32obsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
+					  void **this_cache, int regnum)
+{
+  struct sparc_frame_cache *cache =
+    sparc32obsd_sigtramp_frame_cache (this_frame, this_cache);
+
+  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
+}
+
+static int
+sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
+				    struct frame_info *this_frame,
+				    void **this_cache)
+{
+  CORE_ADDR pc = get_frame_pc (this_frame);
+  const char *name;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (sparc32obsd_pc_in_sigtramp (pc, name))
+    return 1;
+
+  return 0;
+}
+static const struct frame_unwind sparc32obsd_sigtramp_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  default_frame_unwind_stop_reason,
+  sparc32obsd_sigtramp_frame_this_id,
+  sparc32obsd_sigtramp_frame_prev_register,
+  NULL,
+  sparc32obsd_sigtramp_frame_sniffer
+};
+
+
+
+/* Offset wthin the thread structure where we can find %fp and %i7.  */
+#define SPARC32OBSD_UTHREAD_FP_OFFSET	128
+#define SPARC32OBSD_UTHREAD_PC_OFFSET	132
+
+static void
+sparc32obsd_supply_uthread (struct regcache *regcache,
+			    int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR fp, fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
+  gdb_byte buf[4];
+
+  gdb_assert (regnum >= -1);
+
+  fp = read_memory_unsigned_integer (fp_addr, 4, byte_order);
+  if (regnum == SPARC_SP_REGNUM || regnum == -1)
+    {
+      store_unsigned_integer (buf, 4, byte_order, fp);
+      regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
+
+      if (regnum == SPARC_SP_REGNUM)
+	return;
+    }
+
+  if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM
+      || regnum == -1)
+    {
+      CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
+
+      i7 = read_memory_unsigned_integer (i7_addr, 4, byte_order);
+      if (regnum == SPARC32_PC_REGNUM || regnum == -1)
+	{
+	  store_unsigned_integer (buf, 4, byte_order, i7 + 8);
+	  regcache_raw_supply (regcache, SPARC32_PC_REGNUM, buf);
+	}
+      if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
+	{
+	  store_unsigned_integer (buf, 4, byte_order, i7 + 12);
+	  regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, buf);
+	}
+
+      if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM)
+	return;
+    }
+
+  sparc_supply_rwindow (regcache, fp, regnum);
+}
+
+static void
+sparc32obsd_collect_uthread(const struct regcache *regcache,
+			    int regnum, CORE_ADDR addr)
+{
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  CORE_ADDR sp;
+  gdb_byte buf[4];
+
+  gdb_assert (regnum >= -1);
+
+  if (regnum == SPARC_SP_REGNUM || regnum == -1)
+    {
+      CORE_ADDR fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
+
+      regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+      write_memory (fp_addr,buf, 4);
+    }
+
+  if (regnum == SPARC32_PC_REGNUM || regnum == -1)
+    {
+      CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
+
+      regcache_raw_collect (regcache, SPARC32_PC_REGNUM, buf);
+      i7 = extract_unsigned_integer (buf, 4, byte_order) - 8;
+      write_memory_unsigned_integer (i7_addr, 4, byte_order, i7);
+
+      if (regnum == SPARC32_PC_REGNUM)
+	return;
+    }
+
+  regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+  sp = extract_unsigned_integer (buf, 4, byte_order);
+  sparc_collect_rwindow (regcache, sp, regnum);
+}
+
+
+static void
+sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* OpenBSD/sparc is very similar to NetBSD/sparc ELF.  */
+  sparc32nbsd_init_abi (info, gdbarch);
+
+  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
+
+  frame_unwind_append_unwinder (gdbarch, &sparc32obsd_sigtramp_frame_unwind);
+
+  /* OpenBSD provides a user-level threads implementation.  */
+  bsd_uthread_set_supply_uthread (gdbarch, sparc32obsd_supply_uthread);
+  bsd_uthread_set_collect_uthread (gdbarch, sparc32obsd_collect_uthread);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_sparc32obsd_tdep (void);
+
+void
+_initialize_sparc32obsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_OPENBSD,
+			  sparc32obsd_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcobsd-tdep.c ./gdb/sparcobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparcobsd-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparcobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,260 +0,0 @@
-/* Target-dependent code for OpenBSD/sparc.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "floatformat.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "regcache.h"
-#include "symtab.h"
-#include "trad-frame.h"
-
-#include "obsd-tdep.h"
-#include "sparc-tdep.h"
-#include "solib-svr4.h"
-#include "bsd-uthread.h"
-
-/* Signal trampolines.  */
-
-/* The OpenBSD kernel maps the signal trampoline at some random
-   location in user space, which means that the traditional BSD way of
-   detecting it won't work.
-
-   The signal trampoline will be mapped at an address that is page
-   aligned.  We recognize the signal trampoline by looking for the
-   sigreturn system call.  */
-
-static const int sparc32obsd_page_size = 4096;
-
-static int
-sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
-{
-  CORE_ADDR start_pc = (pc & ~(sparc32obsd_page_size - 1));
-  unsigned long insn;
-
-  if (name)
-    return 0;
-
-  /* Check for "restore %g0, SYS_sigreturn, %g1".  */
-  insn = sparc_fetch_instruction (start_pc + 0xec);
-  if (insn != 0x83e82067)
-    return 0;
-
-  /* Check for "t ST_SYSCALL".  */
-  insn = sparc_fetch_instruction (start_pc + 0xf4);
-  if (insn != 0x91d02000)
-    return 0;
-
-  return 1;
-}
-
-static struct sparc_frame_cache *
-sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame,
-				  void **this_cache)
-{
-  struct sparc_frame_cache *cache;
-  CORE_ADDR addr;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = sparc_frame_cache (this_frame, this_cache);
-  gdb_assert (cache == *this_cache);
-
-  /* If we couldn't find the frame's function, we're probably dealing
-     with an on-stack signal trampoline.  */
-  if (cache->pc == 0)
-    {
-      cache->pc = get_frame_pc (this_frame);
-      cache->pc &= ~(sparc32obsd_page_size - 1);
-
-      /* Since we couldn't find the frame's function, the cache was
-         initialized under the assumption that we're frameless.  */
-      sparc_record_save_insn (cache);
-      addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
-      cache->base = addr;
-    }
-
-  cache->saved_regs = sparc32nbsd_sigcontext_saved_regs (this_frame);
-
-  return cache;
-}
-
-static void
-sparc32obsd_sigtramp_frame_this_id (struct frame_info *this_frame,
-				    void **this_cache,
-				    struct frame_id *this_id)
-{
-  struct sparc_frame_cache *cache =
-    sparc32obsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  (*this_id) = frame_id_build (cache->base, cache->pc);
-}
-
-static struct value *
-sparc32obsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
-					  void **this_cache, int regnum)
-{
-  struct sparc_frame_cache *cache =
-    sparc32obsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
-}
-
-static int
-sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-				    struct frame_info *this_frame,
-				    void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (sparc32obsd_pc_in_sigtramp (pc, name))
-    return 1;
-
-  return 0;
-}
-static const struct frame_unwind sparc32obsd_sigtramp_frame_unwind =
-{
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  sparc32obsd_sigtramp_frame_this_id,
-  sparc32obsd_sigtramp_frame_prev_register,
-  NULL,
-  sparc32obsd_sigtramp_frame_sniffer
-};
-
-
-
-/* Offset wthin the thread structure where we can find %fp and %i7.  */
-#define SPARC32OBSD_UTHREAD_FP_OFFSET	128
-#define SPARC32OBSD_UTHREAD_PC_OFFSET	132
-
-static void
-sparc32obsd_supply_uthread (struct regcache *regcache,
-			    int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR fp, fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
-  gdb_byte buf[4];
-
-  gdb_assert (regnum >= -1);
-
-  fp = read_memory_unsigned_integer (fp_addr, 4, byte_order);
-  if (regnum == SPARC_SP_REGNUM || regnum == -1)
-    {
-      store_unsigned_integer (buf, 4, byte_order, fp);
-      regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
-
-      if (regnum == SPARC_SP_REGNUM)
-	return;
-    }
-
-  if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM
-      || regnum == -1)
-    {
-      CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
-
-      i7 = read_memory_unsigned_integer (i7_addr, 4, byte_order);
-      if (regnum == SPARC32_PC_REGNUM || regnum == -1)
-	{
-	  store_unsigned_integer (buf, 4, byte_order, i7 + 8);
-	  regcache_raw_supply (regcache, SPARC32_PC_REGNUM, buf);
-	}
-      if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
-	{
-	  store_unsigned_integer (buf, 4, byte_order, i7 + 12);
-	  regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, buf);
-	}
-
-      if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM)
-	return;
-    }
-
-  sparc_supply_rwindow (regcache, fp, regnum);
-}
-
-static void
-sparc32obsd_collect_uthread(const struct regcache *regcache,
-			    int regnum, CORE_ADDR addr)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR sp;
-  gdb_byte buf[4];
-
-  gdb_assert (regnum >= -1);
-
-  if (regnum == SPARC_SP_REGNUM || regnum == -1)
-    {
-      CORE_ADDR fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
-
-      regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
-      write_memory (fp_addr,buf, 4);
-    }
-
-  if (regnum == SPARC32_PC_REGNUM || regnum == -1)
-    {
-      CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
-
-      regcache_raw_collect (regcache, SPARC32_PC_REGNUM, buf);
-      i7 = extract_unsigned_integer (buf, 4, byte_order) - 8;
-      write_memory_unsigned_integer (i7_addr, 4, byte_order, i7);
-
-      if (regnum == SPARC32_PC_REGNUM)
-	return;
-    }
-
-  regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
-  sp = extract_unsigned_integer (buf, 4, byte_order);
-  sparc_collect_rwindow (regcache, sp, regnum);
-}
-
-
-static void
-sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  /* OpenBSD/sparc is very similar to NetBSD/sparc ELF.  */
-  sparc32nbsd_elf_init_abi (info, gdbarch);
-
-  set_gdbarch_skip_solib_resolver (gdbarch, obsd_skip_solib_resolver);
-
-  frame_unwind_append_unwinder (gdbarch, &sparc32obsd_sigtramp_frame_unwind);
-
-  /* OpenBSD provides a user-level threads implementation.  */
-  bsd_uthread_set_supply_uthread (gdbarch, sparc32obsd_supply_uthread);
-  bsd_uthread_set_collect_uthread (gdbarch, sparc32obsd_collect_uthread);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_sparc32obsd_tdep (void);
-
-void
-_initialize_sparc32obsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_OPENBSD_ELF,
-			  sparc32obsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-ravenscar-thread.c ./gdb/sparc-ravenscar-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-ravenscar-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-ravenscar-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ravenscar SPARC target support.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -66,7 +66,7 @@ supply_register_at_address (struct regca
   int buf_size = register_size (gdbarch, regnum);
   gdb_byte *buf;
 
-  buf = alloca (buf_size);
+  buf = (gdb_byte *) alloca (buf_size);
   read_memory (register_addr, buf, buf_size);
   regcache_raw_supply (regcache, regnum, buf);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-ravenscar-thread.h ./gdb/sparc-ravenscar-thread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-ravenscar-thread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-ravenscar-thread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Ravenscar SPARC target support.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-sol2-nat.c ./gdb/sparc-sol2-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-sol2-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-sol2-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for Solaris SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-sol2-tdep.c ./gdb/sparc-sol2-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-sol2-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-sol2-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -132,7 +132,7 @@ sparc32_sol2_sigtramp_frame_cache (struc
   int regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sparc_frame_cache *) *this_cache;
 
   cache = sparc_frame_cache (this_frame, this_cache);
   gdb_assert (cache == *this_cache);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-tdep.c ./gdb/sparc-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,10 +33,12 @@
 #include "osabi.h"
 #include "regcache.h"
 #include "target.h"
+#include "target-descriptions.h"
 #include "value.h"
 
 #include "sparc-tdep.h"
 #include "sparc-ravenscar-thread.h"
+#include <algorithm>
 
 struct regset;
 
@@ -295,20 +297,23 @@ sparc_structure_or_union_p (const struct
 }
 
 /* Register information.  */
+#define SPARC32_FPU_REGISTERS                             \
+  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",         \
+  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",   \
+  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
+  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"
+#define SPARC32_CP0_REGISTERS \
+  "y", "psr", "wim", "tbr", "pc", "npc", "fsr", "csr"
+
+static const char *sparc_core_register_names[] = { SPARC_CORE_REGISTERS };
+static const char *sparc32_fpu_register_names[] = { SPARC32_FPU_REGISTERS };
+static const char *sparc32_cp0_register_names[] = { SPARC32_CP0_REGISTERS };
 
 static const char *sparc32_register_names[] =
 {
-  "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-  "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
-  "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
-  "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
-
-  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-
-  "y", "psr", "wim", "tbr", "pc", "npc", "fsr", "csr"
+  SPARC_CORE_REGISTERS,
+  SPARC32_FPU_REGISTERS,
+  SPARC32_CP0_REGISTERS
 };
 
 /* Total number of registers.  */
@@ -326,18 +331,33 @@ static const char *sparc32_pseudo_regist
 /* Total number of pseudo registers.  */
 #define SPARC32_NUM_PSEUDO_REGS ARRAY_SIZE (sparc32_pseudo_register_names)
 
+/* Return the name of pseudo register REGNUM.  */
+
+static const char *
+sparc32_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  if (regnum < SPARC32_NUM_PSEUDO_REGS)
+    return sparc32_pseudo_register_names[regnum];
+
+  internal_error (__FILE__, __LINE__,
+                  _("sparc32_pseudo_register_name: bad register number %d"),
+                  regnum);
+}
+
 /* Return the name of register REGNUM.  */
 
 static const char *
 sparc32_register_name (struct gdbarch *gdbarch, int regnum)
 {
-  if (regnum >= 0 && regnum < SPARC32_NUM_REGS)
-    return sparc32_register_names[regnum];
+  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
+    return tdesc_register_name (gdbarch, regnum);
 
-  if (regnum < SPARC32_NUM_REGS + SPARC32_NUM_PSEUDO_REGS)
-    return sparc32_pseudo_register_names[regnum - SPARC32_NUM_REGS];
+  if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
+    return sparc32_register_names[regnum];
 
-  return NULL;
+  return sparc32_pseudo_register_name (gdbarch, regnum);
 }
 
 /* Construct types for ISA-specific registers.  */
@@ -398,17 +418,33 @@ sparc_fsr_type (struct gdbarch *gdbarch)
 }
 
 /* Return the GDB type object for the "standard" data type of data in
+   pseudo register REGNUM.  */
+
+static struct type *
+sparc32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
+{
+  regnum -= gdbarch_num_regs (gdbarch);
+
+  if (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM)
+    return builtin_type (gdbarch)->builtin_double;
+
+  internal_error (__FILE__, __LINE__,
+                  _("sparc32_pseudo_register_type: bad register number %d"),
+                  regnum);
+}
+
+/* Return the GDB type object for the "standard" data type of data in
    register REGNUM.  */
 
 static struct type *
 sparc32_register_type (struct gdbarch *gdbarch, int regnum)
 {
+  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
+    return tdesc_register_type (gdbarch, regnum);
+
   if (regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
     return builtin_type (gdbarch)->builtin_float;
 
-  if (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM)
-    return builtin_type (gdbarch)->builtin_double;
-
   if (regnum == SPARC_SP_REGNUM || regnum == SPARC_FP_REGNUM)
     return builtin_type (gdbarch)->builtin_data_ptr;
 
@@ -421,6 +457,9 @@ sparc32_register_type (struct gdbarch *g
   if (regnum == SPARC32_FSR_REGNUM)
     return sparc_fsr_type (gdbarch);
 
+  if (regnum >= gdbarch_num_regs (gdbarch))
+    return sparc32_pseudo_register_type (gdbarch, regnum);
+
   return builtin_type (gdbarch)->builtin_int32;
 }
 
@@ -431,6 +470,7 @@ sparc32_pseudo_register_read (struct gdb
 {
   enum register_status status;
 
+  regnum -= gdbarch_num_regs (gdbarch);
   gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM);
 
   regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM);
@@ -445,6 +485,7 @@ sparc32_pseudo_register_write (struct gd
 			       struct regcache *regcache,
 			       int regnum, const gdb_byte *buf)
 {
+  regnum -= gdbarch_num_regs (gdbarch);
   gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM);
 
   regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM);
@@ -561,7 +602,7 @@ sparc32_store_arguments (struct regcache
     }
 
   /* Always allocate at least six words.  */
-  sp -= max (6, num_elements) * 4;
+  sp -= std::max (6, num_elements) * 4;
 
   /* The psABI says that "Software convention requires space for the
      struct/union return value pointer, even if the word is unused."  */
@@ -640,15 +681,9 @@ sparc32_push_dummy_call (struct gdbarch 
    encode a breakpoint instruction, store the length of the string in
    *LEN and optionally adjust *PC to point to the correct memory
    location for inserting the breakpoint.  */
-   
-static const gdb_byte *
-sparc_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static const gdb_byte break_insn[] = { 0x91, 0xd0, 0x20, 0x01 };
+constexpr gdb_byte sparc_break_insn[] = { 0x91, 0xd0, 0x20, 0x01 };
 
-  *len = sizeof (break_insn);
-  return break_insn;
-}
+typedef BP_MANIPULATION (sparc_break_insn) sparc_breakpoint;
 
 
 /* Allocate and initialize a frame cache.  */
@@ -684,7 +719,6 @@ sparc_skip_stack_check (const CORE_ADDR 
 {
   CORE_ADDR pc = start_pc;
   unsigned long insn;
-  int offset_stack_checking_sequence = 0;
   int probing_loop = 0;
 
   /* With GCC, all stack checking sequences begin with the same two
@@ -1100,7 +1134,7 @@ sparc_frame_cache (struct frame_info *th
   struct sparc_frame_cache *cache;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sparc_frame_cache *) *this_cache;
 
   cache = sparc_alloc_frame_cache ();
   *this_cache = cache;
@@ -1158,7 +1192,7 @@ sparc32_frame_cache (struct frame_info *
   struct symbol *sym;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sparc_frame_cache *) *this_cache;
 
   cache = sparc_frame_cache (this_frame, this_cache);
 
@@ -1507,7 +1541,7 @@ sparc32_dwarf2_frame_init_reg (struct gd
    software single-step mechanism.  */
 
 static CORE_ADDR
-sparc_analyze_control_transfer (struct frame_info *frame,
+sparc_analyze_control_transfer (struct regcache *regcache,
 				CORE_ADDR pc, CORE_ADDR *npc)
 {
   unsigned long insn = sparc_fetch_instruction (pc);
@@ -1558,8 +1592,11 @@ sparc_analyze_control_transfer (struct f
     }
   else if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3a)
     {
+      struct frame_info *frame = get_current_frame ();
+
       /* Trap instruction (TRAP).  */
-      return gdbarch_tdep (get_frame_arch (frame))->step_trap (frame, insn);
+      return gdbarch_tdep (get_regcache_arch (regcache))->step_trap (frame,
+								     insn);
     }
 
   /* FIXME: Handle DONE and RETRY instructions.  */
@@ -1605,26 +1642,26 @@ sparc_step_trap (struct frame_info *fram
   return 0;
 }
 
-int
-sparc_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+sparc_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *arch = get_frame_arch (frame);
+  struct gdbarch *arch = get_regcache_arch (regcache);
   struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
-  struct address_space *aspace = get_frame_address_space (frame);
   CORE_ADDR npc, nnpc;
 
   CORE_ADDR pc, orig_npc;
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  pc = get_frame_register_unsigned (frame, tdep->pc_regnum);
-  orig_npc = npc = get_frame_register_unsigned (frame, tdep->npc_regnum);
+  pc = regcache_raw_get_unsigned (regcache, tdep->pc_regnum);
+  orig_npc = npc = regcache_raw_get_unsigned (regcache, tdep->npc_regnum);
 
   /* Analyze the instruction at PC.  */
-  nnpc = sparc_analyze_control_transfer (frame, pc, &npc);
+  nnpc = sparc_analyze_control_transfer (regcache, pc, &npc);
   if (npc != 0)
-    insert_single_step_breakpoint (arch, aspace, npc);
+    VEC_safe_push (CORE_ADDR, next_pcs, npc);
 
   if (nnpc != 0)
-    insert_single_step_breakpoint (arch, aspace, nnpc);
+    VEC_safe_push (CORE_ADDR, next_pcs, nnpc);
 
   /* Assert that we have set at least one breakpoint, and that
      they're not set at the same spot - unless we're going
@@ -1632,7 +1669,7 @@ sparc_software_single_step (struct frame
   gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0);
   gdb_assert (nnpc != npc || orig_npc == 0);
 
-  return 1;
+  return next_pcs;
 }
 
 static void
@@ -1660,11 +1697,36 @@ sparc_iterate_over_regset_sections (stru
 }
 
 
+static int
+validate_tdesc_registers (const struct target_desc *tdesc,
+                          struct tdesc_arch_data *tdesc_data,
+                          const char *feature_name,
+                          const char *register_names[],
+                          unsigned int registers_num,
+                          unsigned int reg_start)
+{
+  int valid_p = 1;
+  const struct tdesc_feature *feature;
+
+  feature = tdesc_find_feature (tdesc, feature_name);
+  if (feature == NULL)
+    return 0;
+
+  for (unsigned int i = 0; i < registers_num; i++)
+    valid_p &= tdesc_numbered_register (feature, tdesc_data,
+                                        reg_start + i,
+                                        register_names[i]);
+
+  return valid_p;
+}
+
 static struct gdbarch *
 sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
   struct gdbarch_tdep *tdep;
+  const struct target_desc *tdesc = info.target_desc;
   struct gdbarch *gdbarch;
+  int valid_p = 1;
 
   /* If there is already a candidate, use it.  */
   arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -1678,6 +1740,10 @@ sparc32_gdbarch_init (struct gdbarch_inf
   tdep->pc_regnum = SPARC32_PC_REGNUM;
   tdep->npc_regnum = SPARC32_NPC_REGNUM;
   tdep->step_trap = sparc_step_trap;
+  tdep->fpu_register_names = sparc32_fpu_register_names;
+  tdep->fpu_registers_num = ARRAY_SIZE (sparc32_fpu_register_names);
+  tdep->cp0_register_names = sparc32_cp0_register_names;
+  tdep->cp0_registers_num = ARRAY_SIZE (sparc32_cp0_register_names);
 
   set_gdbarch_long_double_bit (gdbarch, 128);
   set_gdbarch_long_double_format (gdbarch, floatformats_sparc_quad);
@@ -1686,6 +1752,8 @@ sparc32_gdbarch_init (struct gdbarch_inf
   set_gdbarch_register_name (gdbarch, sparc32_register_name);
   set_gdbarch_register_type (gdbarch, sparc32_register_type);
   set_gdbarch_num_pseudo_regs (gdbarch, SPARC32_NUM_PSEUDO_REGS);
+  set_tdesc_pseudo_register_name (gdbarch, sparc32_pseudo_register_name);
+  set_tdesc_pseudo_register_type (gdbarch, sparc32_pseudo_register_type);
   set_gdbarch_pseudo_register_read (gdbarch, sparc32_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, sparc32_pseudo_register_write);
 
@@ -1709,7 +1777,10 @@ sparc32_gdbarch_init (struct gdbarch_inf
   /* Stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, sparc_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       sparc_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       sparc_breakpoint::bp_from_kind);
 
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
@@ -1734,6 +1805,39 @@ sparc32_gdbarch_init (struct gdbarch_inf
 
   frame_unwind_append_unwinder (gdbarch, &sparc32_frame_unwind);
 
+  if (tdesc_has_registers (tdesc))
+    {
+      struct tdesc_arch_data *tdesc_data = tdesc_data_alloc ();
+
+      /* Validate that the descriptor provides the mandatory registers
+         and allocate their numbers. */
+      valid_p &= validate_tdesc_registers (tdesc, tdesc_data,
+                                           "org.gnu.gdb.sparc.cpu",
+                                           sparc_core_register_names,
+                                           ARRAY_SIZE (sparc_core_register_names),
+                                           SPARC_G0_REGNUM);
+      valid_p &= validate_tdesc_registers (tdesc, tdesc_data,
+                                           "org.gnu.gdb.sparc.fpu",
+                                           tdep->fpu_register_names,
+                                           tdep->fpu_registers_num,
+                                           SPARC_F0_REGNUM);
+      valid_p &= validate_tdesc_registers (tdesc, tdesc_data,
+                                           "org.gnu.gdb.sparc.cp0",
+                                           tdep->cp0_register_names,
+                                           tdep->cp0_registers_num,
+                                           SPARC_F0_REGNUM
+                                           + tdep->fpu_registers_num);
+      if (!valid_p)
+        {
+          tdesc_data_cleanup (tdesc_data);
+          return NULL;
+        }
+
+      /* Target description may have changed. */
+      info.tdep_info = tdesc_data;
+      tdesc_use_registers (gdbarch, tdesc, tdesc_data);
+    }
+
   /* If we have register sets, enable the generic core file support.  */
   if (tdep->gregset)
     set_gdbarch_iterate_over_regset_sections
@@ -1895,7 +1999,7 @@ sparc32_supply_gregset (const struct spa
 			struct regcache *regcache,
 			int regnum, const void *gregs)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   gdb_byte zero[4] = { 0 };
   int i;
 
@@ -1960,7 +2064,7 @@ sparc32_collect_gregset (const struct sp
 			 const struct regcache *regcache,
 			 int regnum, void *gregs)
 {
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *) gregs;
   int i;
 
   if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
@@ -2015,7 +2119,7 @@ sparc32_supply_fpregset (const struct sp
 			 struct regcache *regcache,
 			 int regnum, const void *fpregs)
 {
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
   int i;
 
   for (i = 0; i < 32; i++)
@@ -2035,7 +2139,7 @@ sparc32_collect_fpregset (const struct s
 			  const struct regcache *regcache,
 			  int regnum, void *fpregs)
 {
-  gdb_byte *regs = fpregs;
+  gdb_byte *regs = (gdb_byte *) fpregs;
   int i;
 
   for (i = 0; i < 32; i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-tdep.h ./gdb/sparc-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/sparc-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/sparc-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for SPARC.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,12 @@
 #ifndef SPARC_TDEP_H
 #define SPARC_TDEP_H 1
 
+#define SPARC_CORE_REGISTERS                      \
+  "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
+  "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
+  "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
+  "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7"
+
 struct frame_info;
 struct gdbarch;
 struct regcache;
@@ -57,6 +63,12 @@ struct gdbarch_tdep
   int pc_regnum;
   int npc_regnum;
 
+  /* Register names specific for architecture (sparc32 vs. sparc64) */
+  const char **fpu_register_names;
+  size_t fpu_registers_num;
+  const char **cp0_register_names;
+  size_t cp0_registers_num;
+
   /* Register sets.  */
   const struct regset *gregset;
   size_t sizeof_gregset;
@@ -85,7 +97,7 @@ struct gdbarch_tdep
 
 enum sparc_regnum
 {
-  SPARC_G0_REGNUM,		/* %g0 */
+  SPARC_G0_REGNUM = 0,		/* %g0 */
   SPARC_G1_REGNUM,
   SPARC_G2_REGNUM,
   SPARC_G3_REGNUM,
@@ -140,9 +152,12 @@ enum sparc32_regnum
   SPARC32_NPC_REGNUM,		/* %npc */
   SPARC32_FSR_REGNUM,		/* %fsr */
   SPARC32_CSR_REGNUM,		/* %csr */
+};
 
-  /* Pseudo registers.  */
-  SPARC32_D0_REGNUM,		/* %d0 */
+/* Pseudo registers.  */
+enum sparc32_pseudo_regnum
+{
+  SPARC32_D0_REGNUM = 0,	/* %d0 */
   SPARC32_D30_REGNUM		/* %d30 */
   = SPARC32_D0_REGNUM + 15
 };
@@ -198,8 +213,6 @@ extern int
 
 
 
-extern int sparc_software_single_step (struct frame_info *frame);
-
 extern void sparc_supply_rwindow (struct regcache *regcache,
 				  CORE_ADDR sp, int regnum);
 extern void sparc_collect_rwindow (const struct regcache *regcache,
@@ -248,8 +261,8 @@ extern const struct sparc_gregmap sparc3
 extern CORE_ADDR sparcnbsd_step_trap (struct frame_info *frame,
 				      unsigned long insn);
 
-extern void sparc32nbsd_elf_init_abi (struct gdbarch_info info,
-				      struct gdbarch *gdbarch);
+extern void sparc32nbsd_init_abi (struct gdbarch_info info,
+				  struct gdbarch *gdbarch);
 
 extern struct trad_frame_saved_reg *
   sparc32nbsd_sigcontext_saved_regs (struct frame_info *next_frame);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-linux-nat.c ./gdb/spu-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-linux-nat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/spu-linux-nat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPU native-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -30,7 +30,7 @@
 #include "gdbthread.h"
 #include "gdb_bfd.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/ptrace.h>
 #include <sys/types.h>
 
@@ -296,7 +296,7 @@ spu_bfd_iovec_pread (struct bfd *abfd, v
 {
   ULONGEST addr = *(ULONGEST *)stream;
 
-  if (fetch_ppc_memory (addr + offset, buf, nbytes) != 0)
+  if (fetch_ppc_memory (addr + offset, (gdb_byte *)buf, nbytes) != 0)
     {
       bfd_set_error (bfd_error_invalid_operation);
       return -1;
@@ -318,37 +318,35 @@ spu_bfd_iovec_stat (struct bfd *abfd, vo
   return 0;
 }
 
-static bfd *
+static gdb_bfd_ref_ptr
 spu_bfd_open (ULONGEST addr)
 {
-  struct bfd *nbfd;
   asection *spu_name;
 
-  ULONGEST *open_closure = xmalloc (sizeof (ULONGEST));
+  ULONGEST *open_closure = XNEW (ULONGEST);
   *open_closure = addr;
 
-  nbfd = gdb_bfd_openr_iovec ("<in-memory>", "elf32-spu",
-			      spu_bfd_iovec_open, open_closure,
-			      spu_bfd_iovec_pread, spu_bfd_iovec_close,
-			      spu_bfd_iovec_stat);
-  if (!nbfd)
+  gdb_bfd_ref_ptr nbfd (gdb_bfd_openr_iovec ("<in-memory>", "elf32-spu",
+					     spu_bfd_iovec_open, open_closure,
+					     spu_bfd_iovec_pread,
+					     spu_bfd_iovec_close,
+					     spu_bfd_iovec_stat));
+  if (nbfd == NULL)
     return NULL;
 
-  if (!bfd_check_format (nbfd, bfd_object))
-    {
-      gdb_bfd_unref (nbfd);
-      return NULL;
-    }
+  if (!bfd_check_format (nbfd.get (), bfd_object))
+    return NULL;
 
   /* Retrieve SPU name note and update BFD name.  */
-  spu_name = bfd_get_section_by_name (nbfd, ".note.spu_name");
+  spu_name = bfd_get_section_by_name (nbfd.get (), ".note.spu_name");
   if (spu_name)
     {
-      int sect_size = bfd_section_size (nbfd, spu_name);
+      int sect_size = bfd_section_size (nbfd.get (), spu_name);
       if (sect_size > 20)
 	{
-	  char *buf = alloca (sect_size - 20 + 1);
-	  bfd_get_section_contents (nbfd, spu_name, buf, 20, sect_size - 20);
+	  char *buf = (char *)alloca (sect_size - 20 + 1);
+	  bfd_get_section_contents (nbfd.get (), spu_name, buf, 20,
+				    sect_size - 20);
 	  buf[sect_size - 20] = '\0';
 
 	  xfree ((char *)nbfd->filename);
@@ -367,7 +365,6 @@ static void
 spu_symbol_file_add_from_memory (int inferior_fd)
 {
   ULONGEST addr;
-  struct bfd *nbfd;
 
   gdb_byte id[128];
   char annex[32];
@@ -385,15 +382,12 @@ spu_symbol_file_add_from_memory (int inf
     return;
 
   /* Open BFD representing SPE executable and read its symbols.  */
-  nbfd = spu_bfd_open (addr);
-  if (nbfd)
+  gdb_bfd_ref_ptr nbfd (spu_bfd_open (addr));
+  if (nbfd != NULL)
     {
-      struct cleanup *cleanup = make_cleanup_bfd_unref (nbfd);
-
-      symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd),
+      symbol_file_add_from_bfd (nbfd.get (), bfd_get_filename (nbfd),
 				SYMFILE_VERBOSE | SYMFILE_MAINLINE,
 				NULL, 0, NULL);
-      do_cleanups (cleanup);
     }
 }
 
@@ -625,7 +619,7 @@ spu_xfer_partial (struct target_ops *ops
 /* Override the to_can_use_hw_breakpoint routine.  */
 static int
 spu_can_use_hw_breakpoint (struct target_ops *self,
-			   int type, int cnt, int othertype)
+			   enum bptype type, int cnt, int othertype)
 {
   return 0;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-multiarch.c ./gdb/spu-multiarch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-multiarch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/spu-multiarch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Cell SPU GNU/Linux multi-architecture debugging support.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -56,6 +56,7 @@ static int
 parse_spufs_run (ptid_t ptid, int *fd, CORE_ADDR *addr)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
+  struct cleanup *old_chain;
   struct gdbarch_tdep *tdep;
   struct regcache *regcache;
   gdb_byte buf[4];
@@ -65,12 +66,21 @@ parse_spufs_run (ptid_t ptid, int *fd, C
   if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_powerpc)
     return 0;
 
+  /* If we're called too early (e.g. after fork), we cannot
+     access the inferior yet.  */
+  if (find_inferior_ptid (ptid) == NULL)
+    return 0;
+
   /* Get PPU-side registers.  */
   regcache = get_thread_arch_regcache (ptid, target_gdbarch ());
   tdep = gdbarch_tdep (target_gdbarch ());
 
   /* Fetch instruction preceding current NIP.  */
-  if (target_read_memory (regcache_read_pc (regcache) - 4, buf, 4) != 0)
+  old_chain = save_inferior_ptid ();
+  inferior_ptid = ptid;
+  regval = target_read_memory (regcache_read_pc (regcache) - 4, buf, 4);
+  do_cleanups (old_chain);
+  if (regval != 0)
     return 0;
   /* It should be a "sc" instruction.  */
   if (extract_unsigned_integer (buf, 4, byte_order) != INSTR_SC)
@@ -97,7 +107,7 @@ spu_gdbarch (int spufs_fd)
   info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
   info.byte_order = BFD_ENDIAN_BIG;
   info.osabi = GDB_OSABI_LINUX;
-  info.tdep_info = (void *) &spufs_fd;
+  info.tdep_info = &spufs_fd;
   return gdbarch_find_by_info (info);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-tdep.c ./gdb/spu-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-tdep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/spu-tdep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPU target-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
    Based on a port by Sid Manning <sid@us.ibm.com>.
@@ -33,6 +33,7 @@
 #include "value.h"
 #include "inferior.h"
 #include "dis-asm.h"
+#include "disasm.h"
 #include "objfiles.h"
 #include "language.h"
 #include "regcache.h"
@@ -45,7 +46,7 @@
 #include "dwarf2-frame.h"
 #include "ax.h"
 #include "spu-tdep.h"
-
+#include "location.h"
 
 /* The list of available "set spu " and "show spu " commands.  */
 static struct cmd_list_element *setspucmdlist = NULL;
@@ -363,7 +364,7 @@ spu_value_from_register (struct gdbarch 
 {
   struct value *value = default_value_from_register (gdbarch, type,
 						     regnum, frame_id);
-  int len = TYPE_LENGTH (type);
+  LONGEST len = TYPE_LENGTH (type);
 
   if (regnum < SPU_NUM_GPRS && len < 16)
     {
@@ -1000,7 +1001,7 @@ spu_frame_unwind_cache (struct frame_inf
   gdb_byte buf[16];
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct spu_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct spu_unwind_cache);
   *this_prologue_cache = info;
@@ -1208,7 +1209,7 @@ struct spu2ppu_cache
 static struct gdbarch *
 spu2ppu_prev_arch (struct frame_info *this_frame, void **this_cache)
 {
-  struct spu2ppu_cache *cache = *this_cache;
+  struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
   return get_regcache_arch (cache->regcache);
 }
 
@@ -1216,7 +1217,7 @@ static void
 spu2ppu_this_id (struct frame_info *this_frame,
 		 void **this_cache, struct frame_id *this_id)
 {
-  struct spu2ppu_cache *cache = *this_cache;
+  struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
   *this_id = cache->frame_id;
 }
 
@@ -1224,11 +1225,11 @@ static struct value *
 spu2ppu_prev_register (struct frame_info *this_frame,
 		       void **this_cache, int regnum)
 {
-  struct spu2ppu_cache *cache = *this_cache;
+  struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
   struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
   gdb_byte *buf;
 
-  buf = alloca (register_size (gdbarch, regnum));
+  buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
   regcache_cooked_read (cache->regcache, regnum, buf);
   return frame_unwind_got_bytes (this_frame, regnum, buf);
 }
@@ -1286,7 +1287,7 @@ spu2ppu_sniffer (const struct frame_unwi
 static void
 spu2ppu_dealloc_cache (struct frame_info *self, void *this_cache)
 {
-  struct spu2ppu_cache *cache = this_cache;
+  struct spu2ppu_cache *cache = (struct spu2ppu_cache *) this_cache;
   regcache_xfree (cache->regcache);
 }
 
@@ -1570,16 +1571,9 @@ spu_return_value (struct gdbarch *gdbarc
 
 
 /* Breakpoints.  */
+constexpr gdb_byte spu_break_insn[] = { 0x00, 0x00, 0x3f, 0xff };
 
-static const gdb_byte *
-spu_breakpoint_from_pc (struct gdbarch *gdbarch,
-			CORE_ADDR * pcptr, int *lenptr)
-{
-  static const gdb_byte breakpoint[] = { 0x00, 0x00, 0x3f, 0xff };
-
-  *lenptr = sizeof breakpoint;
-  return breakpoint;
-}
+typedef BP_MANIPULATION (spu_break_insn) spu_breakpoint;
 
 static int
 spu_memory_remove_breakpoint (struct gdbarch *gdbarch,
@@ -1617,26 +1611,28 @@ spu_memory_remove_breakpoint (struct gdb
 
 /* Software single-stepping support.  */
 
-static int
-spu_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+spu_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR pc, next_pc;
   unsigned int insn;
   int offset, reg;
   gdb_byte buf[4];
   ULONGEST lslr;
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  pc = get_frame_pc (frame);
+  pc = regcache_read_pc (regcache);
 
   if (target_read_memory (pc, buf, 4))
-    return 1;
+    throw_error (MEMORY_ERROR, _("Could not read instruction at %s."),
+		 paddress (gdbarch, pc));
+
   insn = extract_unsigned_integer (buf, 4, byte_order);
 
   /* Get local store limit.  */
-  lslr = get_frame_register_unsigned (frame, SPU_LSLR_REGNUM);
+  lslr = regcache_raw_get_unsigned (regcache, SPU_LSLR_REGNUM);
   if (!lslr)
     lslr = (ULONGEST) -1;
 
@@ -1648,8 +1644,7 @@ spu_software_single_step (struct frame_i
   else
     next_pc = (SPUADDR_ADDR (pc) + 4) & lslr;
 
-  insert_single_step_breakpoint (gdbarch,
-				 aspace, SPUADDR (SPUADDR_SPU (pc), next_pc));
+  VEC_safe_push (CORE_ADDR, next_pcs, SPUADDR (SPUADDR_SPU (pc), next_pc));
 
   if (is_branch (insn, &offset, &reg))
     {
@@ -1658,32 +1653,15 @@ spu_software_single_step (struct frame_i
       if (reg == SPU_PC_REGNUM)
 	target += SPUADDR_ADDR (pc);
       else if (reg != -1)
-	{
-	  int optim, unavail;
-
-	  if (get_frame_register_bytes (frame, reg, 0, 4, buf,
-					 &optim, &unavail))
-	    target += extract_unsigned_integer (buf, 4, byte_order) & -4;
-	  else
-	    {
-	      if (optim)
-		throw_error (OPTIMIZED_OUT_ERROR,
-			     _("Could not determine address of "
-			       "single-step breakpoint."));
-	      if (unavail)
-		throw_error (NOT_AVAILABLE_ERROR,
-			     _("Could not determine address of "
-			       "single-step breakpoint."));
-	    }
-	}
+	target += regcache_raw_get_unsigned (regcache, reg) & -4;
 
       target = target & lslr;
       if (target != next_pc)
-	insert_single_step_breakpoint (gdbarch, aspace,
-				       SPUADDR (SPUADDR_SPU (pc), target));
+	VEC_safe_push (CORE_ADDR, next_pcs, SPUADDR (SPUADDR_SPU (pc),
+						     target));
     }
 
-  return 1;
+  return next_pcs;
 }
 
 
@@ -1716,17 +1694,20 @@ spu_get_longjmp_target (struct frame_inf
 
 /* Disassembler.  */
 
-struct spu_dis_asm_data
+struct spu_dis_asm_info : disassemble_info
 {
-  struct gdbarch *gdbarch;
   int id;
 };
 
 static void
 spu_dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
 {
-  struct spu_dis_asm_data *data = info->application_data;
-  print_address (data->gdbarch, SPUADDR (data->id, addr), info->stream);
+  struct spu_dis_asm_info *data = (struct spu_dis_asm_info *) info;
+  gdb_disassembler *di
+    = static_cast<gdb_disassembler *>(info->application_data);
+
+  print_address (di->arch (), SPUADDR (data->id, addr),
+		 (struct ui_file *) info->stream);
 }
 
 static int
@@ -1735,12 +1716,10 @@ gdb_print_insn_spu (bfd_vma memaddr, str
   /* The opcodes disassembler does 18-bit address arithmetic.  Make
      sure the SPU ID encoded in the high bits is added back when we
      call print_address.  */
-  struct disassemble_info spu_info = *info;
-  struct spu_dis_asm_data data;
-  data.gdbarch = info->application_data;
-  data.id = SPUADDR_SPU (memaddr);
+  struct spu_dis_asm_info spu_info;
 
-  spu_info.application_data = &data;
+  memcpy (&spu_info, info, sizeof (*info));
+  spu_info.id = SPUADDR_SPU (memaddr);
   spu_info.print_address_func = spu_dis_asm_print_address;
   return print_insn_spu (memaddr, &spu_info);
 }
@@ -1808,7 +1787,7 @@ spu_get_overlay_table (struct objfile *o
   gdb_byte *ovly_table;
   int i;
 
-  tbl = objfile_data (objfile, spu_overlay_data);
+  tbl = (struct spu_overlay_table *) objfile_data (objfile, spu_overlay_data);
   if (tbl)
     return tbl;
 
@@ -1827,7 +1806,7 @@ spu_get_overlay_table (struct objfile *o
   ovly_buf_table_base = BMSYMBOL_VALUE_ADDRESS (ovly_buf_table_msym);
   ovly_buf_table_size = MSYMBOL_SIZE (ovly_buf_table_msym.minsym);
 
-  ovly_table = xmalloc (ovly_table_size);
+  ovly_table = (gdb_byte *) xmalloc (ovly_table_size);
   read_memory (ovly_table_base, ovly_table, ovly_table_size);
 
   tbl = OBSTACK_CALLOC (&objfile->objfile_obstack,
@@ -1954,7 +1933,8 @@ spu_catch_start (struct objfile *objfile
   struct bound_minimal_symbol minsym;
   struct compunit_symtab *cust;
   CORE_ADDR pc;
-  char buf[32];
+  struct event_location *location;
+  struct cleanup *back_to;
 
   /* Do this only if requested by "set spu stop-on-load on".  */
   if (!spu_stop_on_load_p)
@@ -1998,8 +1978,9 @@ spu_catch_start (struct objfile *objfile
 
   /* Use a numerical address for the set_breakpoint command to avoid having
      the breakpoint re-set incorrectly.  */
-  xsnprintf (buf, sizeof buf, "*%s", core_addr_to_string (pc));
-  create_breakpoint (get_objfile_arch (objfile), buf /* arg */,
+  location = new_address_location (pc, NULL, 0);
+  back_to = make_cleanup_delete_event_location (location);
+  create_breakpoint (get_objfile_arch (objfile), location,
 		     NULL /* cond_string */, -1 /* thread */,
 		     NULL /* extra_string */,
 		     0 /* parse_condition_and_thread */, 1 /* tempflag */,
@@ -2008,6 +1989,7 @@ spu_catch_start (struct objfile *objfile
 		     AUTO_BOOLEAN_FALSE /* pending_break_support */,
 		     &bkpt_breakpoint_ops /* ops */, 0 /* from_tty */,
 		     1 /* enabled */, 0 /* internal  */, 0);
+  do_cleanups (back_to);
 }
 
 
@@ -2115,12 +2097,12 @@ info_spu_event_command (char *args, int 
  
   chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoEvent");
 
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     {
-      ui_out_field_fmt (current_uiout, "event_status",
-			"0x%s", phex_nz (event_status, 4));
-      ui_out_field_fmt (current_uiout, "event_mask",
-			"0x%s", phex_nz (event_mask, 4));
+      current_uiout->field_fmt ("event_status",
+				"0x%s", phex_nz (event_status, 4));
+      current_uiout->field_fmt ("event_mask",
+				"0x%s", phex_nz (event_mask, 4));
     }
   else
     {
@@ -2192,14 +2174,14 @@ info_spu_signal_command (char *args, int
 
   chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoSignal");
 
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     {
-      ui_out_field_int (current_uiout, "signal1_pending", signal1_pending);
-      ui_out_field_fmt (current_uiout, "signal1", "0x%s", phex_nz (signal1, 4));
-      ui_out_field_int (current_uiout, "signal1_type", signal1_type);
-      ui_out_field_int (current_uiout, "signal2_pending", signal2_pending);
-      ui_out_field_fmt (current_uiout, "signal2", "0x%s", phex_nz (signal2, 4));
-      ui_out_field_int (current_uiout, "signal2_type", signal2_type);
+      current_uiout->field_int ("signal1_pending", signal1_pending);
+      current_uiout->field_fmt ("signal1", "0x%s", phex_nz (signal1, 4));
+      current_uiout->field_int ("signal1_type", signal1_type);
+      current_uiout->field_int ("signal2_pending", signal2_pending);
+      current_uiout->field_fmt ("signal2", "0x%s", phex_nz (signal2, 4));
+      current_uiout->field_int ("signal2_type", signal2_type);
     }
   else
     {
@@ -2239,8 +2221,8 @@ info_spu_mailbox_list (gdb_byte *buf, in
 
   chain = make_cleanup_ui_out_table_begin_end (current_uiout, 1, nr, "mbox");
 
-  ui_out_table_header (current_uiout, 32, ui_left, field, msg);
-  ui_out_table_body (current_uiout);
+  current_uiout->table_header (32, ui_left, field, msg);
+  current_uiout->table_body ();
 
   for (i = 0; i < nr; i++)
     {
@@ -2248,10 +2230,10 @@ info_spu_mailbox_list (gdb_byte *buf, in
       ULONGEST val;
       val_chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "mbox");
       val = extract_unsigned_integer (buf + 4*i, 4, byte_order);
-      ui_out_field_fmt (current_uiout, field, "0x%s", phex (val, 4));
+      current_uiout->field_fmt (field, "0x%s", phex (val, 4));
       do_cleanups (val_chain);
 
-      if (!ui_out_is_mi_like_p (current_uiout))
+      if (!current_uiout->is_mi_like_p ())
 	printf_filtered ("\n");
     }
 
@@ -2353,7 +2335,7 @@ info_spu_dma_cmdlist (gdb_byte *buf, int
              NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     };
 
-  int *seq = alloca (nr * sizeof (int));
+  int *seq = XALLOCAVEC (int, nr);
   int done = 0;
   struct cleanup *chain;
   int i, j;
@@ -2396,18 +2378,18 @@ info_spu_dma_cmdlist (gdb_byte *buf, int
   chain = make_cleanup_ui_out_table_begin_end (current_uiout, 10, nr,
 					       "dma_cmd");
 
-  ui_out_table_header (current_uiout, 7, ui_left, "opcode", "Opcode");
-  ui_out_table_header (current_uiout, 3, ui_left, "tag", "Tag");
-  ui_out_table_header (current_uiout, 3, ui_left, "tid", "TId");
-  ui_out_table_header (current_uiout, 3, ui_left, "rid", "RId");
-  ui_out_table_header (current_uiout, 18, ui_left, "ea", "EA");
-  ui_out_table_header (current_uiout, 7, ui_left, "lsa", "LSA");
-  ui_out_table_header (current_uiout, 7, ui_left, "size", "Size");
-  ui_out_table_header (current_uiout, 7, ui_left, "lstaddr", "LstAddr");
-  ui_out_table_header (current_uiout, 7, ui_left, "lstsize", "LstSize");
-  ui_out_table_header (current_uiout, 1, ui_left, "error_p", "E");
+  current_uiout->table_header (7, ui_left, "opcode", "Opcode");
+  current_uiout->table_header (3, ui_left, "tag", "Tag");
+  current_uiout->table_header (3, ui_left, "tid", "TId");
+  current_uiout->table_header (3, ui_left, "rid", "RId");
+  current_uiout->table_header (18, ui_left, "ea", "EA");
+  current_uiout->table_header (7, ui_left, "lsa", "LSA");
+  current_uiout->table_header (7, ui_left, "size", "Size");
+  current_uiout->table_header (7, ui_left, "lstaddr", "LstAddr");
+  current_uiout->table_header (7, ui_left, "lstsize", "LstSize");
+  current_uiout->table_header (1, ui_left, "error_p", "E");
 
-  ui_out_table_body (current_uiout);
+  current_uiout->table_body ();
 
   for (i = 0; i < nr; i++)
     {
@@ -2418,7 +2400,7 @@ info_spu_dma_cmdlist (gdb_byte *buf, int
       int mfc_cmd_opcode, mfc_cmd_tag, rclass_id, tclass_id;
       int list_lsa, list_size, mfc_lsa, mfc_size;
       ULONGEST mfc_ea;
-      int list_valid_p, noop_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
+      int list_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
 
       /* Decode contents of MFC Command Queue Context Save/Restore Registers.
 	 See "Cell Broadband Engine Registers V1.3", section 3.3.2.1.  */
@@ -2443,7 +2425,6 @@ info_spu_dma_cmdlist (gdb_byte *buf, int
 
       mfc_lsa = spu_mfc_get_bitfield (mfc_cq_dw2, 0, 13);
       mfc_size = spu_mfc_get_bitfield (mfc_cq_dw2, 14, 24);
-      noop_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 37, 37);
       qw_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 38, 38);
       ea_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 39, 39);
       cmd_error_p = spu_mfc_get_bitfield (mfc_cq_dw2, 40, 40);
@@ -2451,44 +2432,44 @@ info_spu_dma_cmdlist (gdb_byte *buf, int
       cmd_chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "cmd");
 
       if (spu_mfc_opcode[mfc_cmd_opcode])
-	ui_out_field_string (current_uiout, "opcode", spu_mfc_opcode[mfc_cmd_opcode]);
+	current_uiout->field_string ("opcode", spu_mfc_opcode[mfc_cmd_opcode]);
       else
-	ui_out_field_int (current_uiout, "opcode", mfc_cmd_opcode);
+	current_uiout->field_int ("opcode", mfc_cmd_opcode);
 
-      ui_out_field_int (current_uiout, "tag", mfc_cmd_tag);
-      ui_out_field_int (current_uiout, "tid", tclass_id);
-      ui_out_field_int (current_uiout, "rid", rclass_id);
+      current_uiout->field_int ("tag", mfc_cmd_tag);
+      current_uiout->field_int ("tid", tclass_id);
+      current_uiout->field_int ("rid", rclass_id);
 
       if (ea_valid_p)
-	ui_out_field_fmt (current_uiout, "ea", "0x%s", phex (mfc_ea, 8));
+	current_uiout->field_fmt ("ea", "0x%s", phex (mfc_ea, 8));
       else
-	ui_out_field_skip (current_uiout, "ea");
+	current_uiout->field_skip ("ea");
 
-      ui_out_field_fmt (current_uiout, "lsa", "0x%05x", mfc_lsa << 4);
+      current_uiout->field_fmt ("lsa", "0x%05x", mfc_lsa << 4);
       if (qw_valid_p)
-	ui_out_field_fmt (current_uiout, "size", "0x%05x", mfc_size << 4);
+	current_uiout->field_fmt ("size", "0x%05x", mfc_size << 4);
       else
-	ui_out_field_fmt (current_uiout, "size", "0x%05x", mfc_size);
+	current_uiout->field_fmt ("size", "0x%05x", mfc_size);
 
       if (list_valid_p)
 	{
-	  ui_out_field_fmt (current_uiout, "lstaddr", "0x%05x", list_lsa << 3);
-	  ui_out_field_fmt (current_uiout, "lstsize", "0x%05x", list_size << 3);
+	  current_uiout->field_fmt ("lstaddr", "0x%05x", list_lsa << 3);
+	  current_uiout->field_fmt ("lstsize", "0x%05x", list_size << 3);
 	}
       else
 	{
-	  ui_out_field_skip (current_uiout, "lstaddr");
-	  ui_out_field_skip (current_uiout, "lstsize");
+	  current_uiout->field_skip ("lstaddr");
+	  current_uiout->field_skip ("lstsize");
 	}
 
       if (cmd_error_p)
-	ui_out_field_string (current_uiout, "error_p", "*");
+	current_uiout->field_string ("error_p", "*");
       else
-	ui_out_field_skip (current_uiout, "error_p");
+	current_uiout->field_skip ("error_p");
 
       do_cleanups (cmd_chain);
 
-      if (!ui_out_is_mi_like_p (current_uiout))
+      if (!current_uiout->is_mi_like_p ())
 	printf_filtered ("\n");
     }
 
@@ -2536,18 +2517,18 @@ info_spu_dma_command (char *args, int fr
   
   chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoDMA");
 
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     {
-      ui_out_field_fmt (current_uiout, "dma_info_type", "0x%s",
-			phex_nz (dma_info_type, 4));
-      ui_out_field_fmt (current_uiout, "dma_info_mask", "0x%s",
-			phex_nz (dma_info_mask, 4));
-      ui_out_field_fmt (current_uiout, "dma_info_status", "0x%s",
-			phex_nz (dma_info_status, 4));
-      ui_out_field_fmt (current_uiout, "dma_info_stall_and_notify", "0x%s",
-			phex_nz (dma_info_stall_and_notify, 4));
-      ui_out_field_fmt (current_uiout, "dma_info_atomic_command_status", "0x%s",
-			phex_nz (dma_info_atomic_command_status, 4));
+      current_uiout->field_fmt ("dma_info_type", "0x%s",
+				phex_nz (dma_info_type, 4));
+      current_uiout->field_fmt ("dma_info_mask", "0x%s",
+				phex_nz (dma_info_mask, 4));
+      current_uiout->field_fmt ("dma_info_status", "0x%s",
+				phex_nz (dma_info_status, 4));
+      current_uiout->field_fmt ("dma_info_stall_and_notify", "0x%s",
+				phex_nz (dma_info_stall_and_notify, 4));
+      current_uiout->field_fmt ("dma_info_atomic_command_status", "0x%s",
+				phex_nz (dma_info_atomic_command_status, 4));
     }
   else
     {
@@ -2609,14 +2590,14 @@ info_spu_proxydma_command (char *args, i
   chain = make_cleanup_ui_out_tuple_begin_end (current_uiout,
 					       "SPUInfoProxyDMA");
 
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     {
-      ui_out_field_fmt (current_uiout, "proxydma_info_type", "0x%s",
-			phex_nz (dma_info_type, 4));
-      ui_out_field_fmt (current_uiout, "proxydma_info_mask", "0x%s",
-			phex_nz (dma_info_mask, 4));
-      ui_out_field_fmt (current_uiout, "proxydma_info_status", "0x%s",
-			phex_nz (dma_info_status, 4));
+      current_uiout->field_fmt ("proxydma_info_type", "0x%s",
+				phex_nz (dma_info_type, 4));
+      current_uiout->field_fmt ("proxydma_info_mask", "0x%s",
+				phex_nz (dma_info_mask, 4));
+      current_uiout->field_fmt ("proxydma_info_status", "0x%s",
+				phex_nz (dma_info_status, 4));
     }
   else
     {
@@ -2791,7 +2772,8 @@ spu_gdbarch_init (struct gdbarch_info in
 
   /* Breakpoints.  */
   set_gdbarch_decr_pc_after_break (gdbarch, 4);
-  set_gdbarch_breakpoint_from_pc (gdbarch, spu_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, spu_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, spu_breakpoint::bp_from_kind);
   set_gdbarch_memory_remove_breakpoint (gdbarch, spu_memory_remove_breakpoint);
   set_gdbarch_software_single_step (gdbarch, spu_software_single_step);
   set_gdbarch_get_longjmp_target (gdbarch, spu_get_longjmp_target);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-tdep.h ./gdb/spu-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/spu-tdep.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/spu-tdep.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPU target-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/srec.h ./gdb/srec.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/srec.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/srec.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-/* S-record download support for GDB, the GNU debugger.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-struct serial;
-
-void load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
-		int maxrecsize, int flags, int hashmark,
-		int (*waitack) (void));
-
-/* S-record capability flags */
-
-/* Which record types are supported */
-#define SREC_2_BYTE_ADDR 0x00000001
-#define SREC_3_BYTE_ADDR 0x00000002
-#define SREC_4_BYTE_ADDR 0x00000004
-#define SREC_TERM_SHIFT 3
-
-#define SREC_ALL (SREC_2_BYTE_ADDR | SREC_3_BYTE_ADDR | SREC_4_BYTE_ADDR \
-		  | ((SREC_2_BYTE_ADDR | SREC_3_BYTE_ADDR | SREC_4_BYTE_ADDR) \
-		     << SREC_TERM_SHIFT))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stabsread.c ./gdb/stabsread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stabsread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stabsread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Support routines for decoding "stabs" debugging information format.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,10 +18,11 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Support routines for reading and decoding debugging information in
-   the "stabs" format.  This format is used with many systems that use
-   the a.out object file format, as well as some systems that use
-   COFF or ELF where the stabs data is placed in a special section.
-   Avoid placing any object file format specific code in this file.  */
+   the "stabs" format.  This format is used by some systems that use
+   COFF or ELF where the stabs data is placed in a special section (as
+   well as with many old systems that used the a.out object file
+   format).  Avoid placing any object file format specific code in
+   this file.  */
 
 #include "defs.h"
 #include "bfd.h"
@@ -169,7 +170,7 @@ static void
 reg_value_complaint (int regnum, int num_regs, const char *sym)
 {
   complaint (&symfile_complaints,
-	     _("register number %d too large (max %d) in symbol %s"),
+	     _("bad register number %d (max %d) in symbol %s"),
              regnum, num_regs - 1, sym);
 }
 
@@ -277,8 +278,7 @@ dbx_lookup_type (int typenums[2], struct
 	  if (old_len == 0)
 	    {
 	      type_vector_length = INITIAL_TYPE_VECTOR_LENGTH;
-	      type_vector = (struct type **)
-		xmalloc (type_vector_length * sizeof (struct type *));
+	      type_vector = XNEWVEC (struct type *, type_vector_length);
 	    }
 	  while (index >= type_vector_length)
 	    {
@@ -354,6 +354,24 @@ dbx_alloc_type (int typenums[2], struct 
   return (*type_addr);
 }
 
+/* Allocate a floating-point type of size BITS.  */
+
+static struct type *
+dbx_init_float_type (struct objfile *objfile, int bits)
+{
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
+  const struct floatformat **format;
+  struct type *type;
+
+  format = gdbarch_floatformat_for_type (gdbarch, NULL, bits);
+  if (format)
+    type = init_float_type (objfile, bits, NULL, format);
+  else
+    type = init_type (objfile, TYPE_CODE_ERROR, bits / TARGET_CHAR_BIT, NULL);
+
+  return type;
+}
+
 /* for all the stabs in a given stab vector, build appropriate types 
    and fix their symbols in given symbol vector.  */
 
@@ -399,8 +417,8 @@ patch_block_stabs (struct pending *symbo
 	      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
 	      SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
 	      SYMBOL_SET_LINKAGE_NAME
-		(sym, obstack_copy0 (&objfile->objfile_obstack,
-				     name, pp - name));
+		(sym, (char *) obstack_copy0 (&objfile->objfile_obstack,
+					      name, pp - name));
 	      pp += 2;
 	      if (*(pp - 1) == 'F' || *(pp - 1) == 'f')
 		{
@@ -598,8 +616,9 @@ stab_reg_to_regnum (struct symbol *sym, 
 {
   int regno = gdbarch_stab_reg_to_regnum (gdbarch, SYMBOL_VALUE (sym));
 
-  if (regno >= gdbarch_num_regs (gdbarch)
-		+ gdbarch_num_pseudo_regs (gdbarch))
+  if (regno < 0
+      || regno >= (gdbarch_num_regs (gdbarch)
+		   + gdbarch_num_pseudo_regs (gdbarch)))
     {
       reg_value_complaint (regno,
 			   gdbarch_num_regs (gdbarch)
@@ -631,7 +650,6 @@ define_symbol (CORE_ADDR valu, char *str
   int deftype;
   int synonym = 0;
   int i;
-  char *new_name = NULL;
 
   /* We would like to eliminate nameless symbols, but keep their types.
      E.g. stab entry ":t10=*2" should produce a type 10, which is a pointer
@@ -715,18 +733,21 @@ define_symbol (CORE_ADDR valu, char *str
   else
     {
     normal:
+      std::string new_name;
+
       if (SYMBOL_LANGUAGE (sym) == language_cplus)
 	{
-	  char *name = alloca (p - string + 1);
+	  char *name = (char *) alloca (p - string + 1);
 
 	  memcpy (name, string, p - string);
 	  name[p - string] = '\0';
 	  new_name = cp_canonicalize_string (name);
 	}
-      if (new_name != NULL)
+      if (!new_name.empty ())
 	{
-	  SYMBOL_SET_NAMES (sym, new_name, strlen (new_name), 1, objfile);
-	  xfree (new_name);
+	  SYMBOL_SET_NAMES (sym,
+			    new_name.c_str (), new_name.length (),
+			    1, objfile);
 	}
       else
 	SYMBOL_SET_NAMES (sym, string, p - string, 1, objfile);
@@ -785,9 +806,9 @@ define_symbol (CORE_ADDR valu, char *str
 	       probably has the necessary code.  */
 
 	    dbl_type = objfile_type (objfile)->builtin_double;
-	    dbl_valu =
-	      obstack_alloc (&objfile->objfile_obstack,
-			     TYPE_LENGTH (dbl_type));
+	    dbl_valu
+	      = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack,
+					    TYPE_LENGTH (dbl_type));
 	    store_typed_floating (dbl_valu, dbl_type, d);
 
 	    SYMBOL_TYPE (sym) = dbl_type;
@@ -869,7 +890,8 @@ define_symbol (CORE_ADDR valu, char *str
 	    SYMBOL_TYPE (sym) = create_array_type (NULL,
 				  objfile_type (objfile)->builtin_char,
 				  range_type);
-	    string_value = obstack_alloc (&objfile->objfile_obstack, ind + 1);
+	    string_value
+	      = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, ind + 1);
 	    memcpy (string_value, string_local, ind + 1);
 	    p++;
 
@@ -1623,16 +1645,18 @@ again:
 	  type_name = NULL;
 	  if (current_subfile->language == language_cplus)
 	    {
-	      char *new_name, *name = alloca (p - *pp + 1);
+	      char *name = (char *) alloca (p - *pp + 1);
 
 	      memcpy (name, *pp, p - *pp);
 	      name[p - *pp] = '\0';
-	      new_name = cp_canonicalize_string (name);
-	      if (new_name != NULL)
+
+	      std::string new_name = cp_canonicalize_string (name);
+	      if (!new_name.empty ())
 		{
-		  type_name = obstack_copy0 (&objfile->objfile_obstack,
-					     new_name, strlen (new_name));
-		  xfree (new_name);
+		  type_name
+		    = (char *) obstack_copy0 (&objfile->objfile_obstack,
+					      new_name.c_str (),
+					      new_name.length ());
 		}
 	    }
 	  if (type_name == NULL)
@@ -1809,7 +1833,7 @@ again:
         while (**pp && **pp != '#')
           {
             struct type *arg_type = read_type (pp, objfile);
-            struct type_list *newobj = alloca (sizeof (*newobj));
+            struct type_list *newobj = XALLOCA (struct type_list);
             newobj->type = arg_type;
             newobj->next = arg_types;
             arg_types = newobj;
@@ -2056,8 +2080,8 @@ static const struct objfile_data *rs6000
 static struct type *
 rs6000_builtin_type (int typenum, struct objfile *objfile)
 {
-  struct type **negative_types = objfile_data (objfile,
-					       rs6000_builtin_type_data);
+  struct type **negative_types
+    = (struct type **) objfile_data (objfile, rs6000_builtin_type_data);
 
   /* We recognize types numbered from -NUMBER_RECOGNIZED to -1.  */
 #define NUMBER_RECOGNIZED 34
@@ -2096,130 +2120,121 @@ rs6000_builtin_type (int typenum, struct
          is other than 32 bits, then it should use a new negative type
          number (or avoid negative type numbers for that case).
          See stabs.texinfo.  */
-      rettype = init_type (TYPE_CODE_INT, 4, 0, "int", objfile);
+      rettype = init_integer_type (objfile, 32, 0, "int");
       break;
     case 2:
-      rettype = init_type (TYPE_CODE_INT, 1, 0, "char", objfile);
+      rettype = init_integer_type (objfile, 8, 0, "char");
+      TYPE_NOSIGN (rettype) = 1;
       break;
     case 3:
-      rettype = init_type (TYPE_CODE_INT, 2, 0, "short", objfile);
+      rettype = init_integer_type (objfile, 16, 0, "short");
       break;
     case 4:
-      rettype = init_type (TYPE_CODE_INT, 4, 0, "long", objfile);
+      rettype = init_integer_type (objfile, 32, 0, "long");
       break;
     case 5:
-      rettype = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED,
-			   "unsigned char", objfile);
+      rettype = init_integer_type (objfile, 8, 1, "unsigned char");
       break;
     case 6:
-      rettype = init_type (TYPE_CODE_INT, 1, 0, "signed char", objfile);
+      rettype = init_integer_type (objfile, 8, 0, "signed char");
       break;
     case 7:
-      rettype = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED,
-			   "unsigned short", objfile);
+      rettype = init_integer_type (objfile, 16, 1, "unsigned short");
       break;
     case 8:
-      rettype = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED,
-			   "unsigned int", objfile);
+      rettype = init_integer_type (objfile, 32, 1, "unsigned int");
       break;
     case 9:
-      rettype = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED,
-			   "unsigned", objfile);
+      rettype = init_integer_type (objfile, 32, 1, "unsigned");
       break;
     case 10:
-      rettype = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED,
-			   "unsigned long", objfile);
+      rettype = init_integer_type (objfile, 32, 1, "unsigned long");
       break;
     case 11:
-      rettype = init_type (TYPE_CODE_VOID, 1, 0, "void", objfile);
+      rettype = init_type (objfile, TYPE_CODE_VOID, 1, "void");
       break;
     case 12:
       /* IEEE single precision (32 bit).  */
-      rettype = init_type (TYPE_CODE_FLT, 4, 0, "float", objfile);
+      rettype = init_float_type (objfile, 32, "float",
+				 floatformats_ieee_single);
       break;
     case 13:
       /* IEEE double precision (64 bit).  */
-      rettype = init_type (TYPE_CODE_FLT, 8, 0, "double", objfile);
+      rettype = init_float_type (objfile, 64, "double",
+				 floatformats_ieee_double);
       break;
     case 14:
       /* This is an IEEE double on the RS/6000, and different machines with
          different sizes for "long double" should use different negative
          type numbers.  See stabs.texinfo.  */
-      rettype = init_type (TYPE_CODE_FLT, 8, 0, "long double", objfile);
+      rettype = init_float_type (objfile, 64, "long double",
+				 floatformats_ieee_double);
       break;
     case 15:
-      rettype = init_type (TYPE_CODE_INT, 4, 0, "integer", objfile);
+      rettype = init_integer_type (objfile, 32, 0, "integer");
       break;
     case 16:
-      rettype = init_type (TYPE_CODE_BOOL, 4, TYPE_FLAG_UNSIGNED,
-			   "boolean", objfile);
+      rettype = init_boolean_type (objfile, 32, 1, "boolean");
       break;
     case 17:
-      rettype = init_type (TYPE_CODE_FLT, 4, 0, "short real", objfile);
+      rettype = init_float_type (objfile, 32, "short real",
+				 floatformats_ieee_single);
       break;
     case 18:
-      rettype = init_type (TYPE_CODE_FLT, 8, 0, "real", objfile);
+      rettype = init_float_type (objfile, 64, "real",
+				 floatformats_ieee_double);
       break;
     case 19:
-      rettype = init_type (TYPE_CODE_ERROR, 0, 0, "stringptr", objfile);
+      rettype = init_type (objfile, TYPE_CODE_ERROR, 0, "stringptr");
       break;
     case 20:
-      rettype = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED,
-			   "character", objfile);
+      rettype = init_character_type (objfile, 8, 1, "character");
       break;
     case 21:
-      rettype = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED,
-			   "logical*1", objfile);
+      rettype = init_boolean_type (objfile, 8, 1, "logical*1");
       break;
     case 22:
-      rettype = init_type (TYPE_CODE_BOOL, 2, TYPE_FLAG_UNSIGNED,
-			   "logical*2", objfile);
+      rettype = init_boolean_type (objfile, 16, 1, "logical*2");
       break;
     case 23:
-      rettype = init_type (TYPE_CODE_BOOL, 4, TYPE_FLAG_UNSIGNED,
-			   "logical*4", objfile);
+      rettype = init_boolean_type (objfile, 32, 1, "logical*4");
       break;
     case 24:
-      rettype = init_type (TYPE_CODE_BOOL, 4, TYPE_FLAG_UNSIGNED,
-			   "logical", objfile);
+      rettype = init_boolean_type (objfile, 32, 1, "logical");
       break;
     case 25:
       /* Complex type consisting of two IEEE single precision values.  */
-      rettype = init_type (TYPE_CODE_COMPLEX, 8, 0, "complex", objfile);
-      TYPE_TARGET_TYPE (rettype) = init_type (TYPE_CODE_FLT, 4, 0, "float",
-					      objfile);
+      rettype = init_complex_type (objfile, "complex",
+				   rs6000_builtin_type (12, objfile));
       break;
     case 26:
       /* Complex type consisting of two IEEE double precision values.  */
-      rettype = init_type (TYPE_CODE_COMPLEX, 16, 0, "double complex", NULL);
-      TYPE_TARGET_TYPE (rettype) = init_type (TYPE_CODE_FLT, 8, 0, "double",
-					      objfile);
+      rettype = init_complex_type (objfile, "double complex",
+				   rs6000_builtin_type (13, objfile));
       break;
     case 27:
-      rettype = init_type (TYPE_CODE_INT, 1, 0, "integer*1", objfile);
+      rettype = init_integer_type (objfile, 8, 0, "integer*1");
       break;
     case 28:
-      rettype = init_type (TYPE_CODE_INT, 2, 0, "integer*2", objfile);
+      rettype = init_integer_type (objfile, 16, 0, "integer*2");
       break;
     case 29:
-      rettype = init_type (TYPE_CODE_INT, 4, 0, "integer*4", objfile);
+      rettype = init_integer_type (objfile, 32, 0, "integer*4");
       break;
     case 30:
-      rettype = init_type (TYPE_CODE_CHAR, 2, 0, "wchar", objfile);
+      rettype = init_character_type (objfile, 16, 0, "wchar");
       break;
     case 31:
-      rettype = init_type (TYPE_CODE_INT, 8, 0, "long long", objfile);
+      rettype = init_integer_type (objfile, 64, 0, "long long");
       break;
     case 32:
-      rettype = init_type (TYPE_CODE_INT, 8, TYPE_FLAG_UNSIGNED,
-			   "unsigned long long", objfile);
+      rettype = init_integer_type (objfile, 64, 1, "unsigned long long");
       break;
     case 33:
-      rettype = init_type (TYPE_CODE_INT, 8, TYPE_FLAG_UNSIGNED,
-			   "logical*8", objfile);
+      rettype = init_integer_type (objfile, 64, 1, "logical*8");
       break;
     case 34:
-      rettype = init_type (TYPE_CODE_INT, 8, 0, "integer*8", objfile);
+      rettype = init_integer_type (objfile, 64, 0, "integer*8");
       break;
     }
   negative_types[-typenum] = rettype;
@@ -2304,10 +2319,8 @@ read_member_functions (struct field_info
       look_ahead_type = NULL;
       length = 0;
 
-      new_fnlist = (struct next_fnfieldlist *)
-	xmalloc (sizeof (struct next_fnfieldlist));
+      new_fnlist = XCNEW (struct next_fnfieldlist);
       make_cleanup (xfree, new_fnlist);
-      memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
 
       if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && is_cplus_marker ((*pp)[2]))
 	{
@@ -2346,10 +2359,8 @@ read_member_functions (struct field_info
 
       do
 	{
-	  new_sublist =
-	    (struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
+	  new_sublist = XCNEW (struct next_fnfield);
 	  make_cleanup (xfree, new_sublist);
-	  memset (new_sublist, 0, sizeof (struct next_fnfield));
 
 	  /* Check for and handle cretinous dbx symbol name continuation!  */
 	  if (look_ahead_type == NULL)
@@ -2637,17 +2648,16 @@ read_member_functions (struct field_info
 
 	      /* Create a new fn_fieldlist for the destructors.  */
 
-	      destr_fnlist = (struct next_fnfieldlist *)
-		xmalloc (sizeof (struct next_fnfieldlist));
+	      destr_fnlist = XCNEW (struct next_fnfieldlist);
 	      make_cleanup (xfree, destr_fnlist);
-	      memset (destr_fnlist, 0, sizeof (struct next_fnfieldlist));
+
 	      destr_fnlist->fn_fieldlist.name
 		= obconcat (&objfile->objfile_obstack, "~",
 			    new_fnlist->fn_fieldlist.name, (char *) NULL);
 
-	      destr_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
-		obstack_alloc (&objfile->objfile_obstack,
-			       sizeof (struct fn_field) * has_destructor);
+	      destr_fnlist->fn_fieldlist.fn_fields =
+		XOBNEWVEC (&objfile->objfile_obstack,
+			   struct fn_field, has_destructor);
 	      memset (destr_fnlist->fn_fieldlist.fn_fields, 0,
 		  sizeof (struct fn_field) * has_destructor);
 	      tmp_sublist = sublist;
@@ -2717,8 +2727,9 @@ read_member_functions (struct field_info
 					     dem_opname, 0);
 	      if (ret)
 		new_fnlist->fn_fieldlist.name
-		  = obstack_copy0 (&objfile->objfile_obstack,
-				   dem_opname, strlen (dem_opname));
+		  = ((const char *)
+		     obstack_copy0 (&objfile->objfile_obstack, dem_opname,
+				    strlen (dem_opname)));
 	      xfree (main_fn_name);
 	    }
 
@@ -2859,8 +2870,8 @@ read_one_struct_field (struct field_info
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
 
-  fip->list->field.name =
-    obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+  fip->list->field.name
+    = (const char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
   *pp = p + 1;
 
   /* This means we have a visibility for a field coming.  */
@@ -3017,9 +3028,9 @@ read_struct_fields (struct field_info *f
     {
       STABS_CONTINUE (pp, objfile);
       /* Get space to record the next field's data.  */
-      newobj = (struct nextfield *) xmalloc (sizeof (struct nextfield));
+      newobj = XCNEW (struct nextfield);
       make_cleanup (xfree, newobj);
-      memset (newobj, 0, sizeof (struct nextfield));
+
       newobj->next = fip->list;
       fip->list = newobj;
 
@@ -3139,9 +3150,9 @@ read_baseclasses (struct field_info *fip
 
   for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
     {
-      newobj = (struct nextfield *) xmalloc (sizeof (struct nextfield));
+      newobj = XCNEW (struct nextfield);
       make_cleanup (xfree, newobj);
-      memset (newobj, 0, sizeof (struct nextfield));
+
       newobj->next = fip->list;
       fip->list = newobj;
       FIELD_BITSIZE (newobj->field) = 0;	/* This should be an unpacked
@@ -3682,7 +3693,7 @@ read_enum_type (char **pp, struct type *
       p = *pp;
       while (*p != ':')
 	p++;
-      name = obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+      name = (char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
       *pp = p + 1;
       n = read_huge_number (pp, ',', &nbits, 0);
       if (nbits != 0)
@@ -3764,16 +3775,16 @@ read_sun_builtin_type (char **pp, int ty
 {
   int type_bits;
   int nbits;
-  int signed_type;
-  enum type_code code = TYPE_CODE_INT;
+  int unsigned_type;
+  int boolean_type = 0;
 
   switch (**pp)
     {
     case 's':
-      signed_type = 1;
+      unsigned_type = 0;
       break;
     case 'u':
-      signed_type = 0;
+      unsigned_type = 1;
       break;
     default:
       return error_type (pp, objfile);
@@ -3790,7 +3801,7 @@ read_sun_builtin_type (char **pp, int ty
     (*pp)++;
   else if (**pp == 'b')
     {
-      code = TYPE_CODE_BOOL;
+      boolean_type = 1;
       (*pp)++;
     }
 
@@ -3821,14 +3832,17 @@ read_sun_builtin_type (char **pp, int ty
     ++(*pp);
 
   if (type_bits == 0)
-    return init_type (TYPE_CODE_VOID, 1,
-		      signed_type ? 0 : TYPE_FLAG_UNSIGNED, (char *) NULL,
-		      objfile);
+    {
+      struct type *type = init_type (objfile, TYPE_CODE_VOID, 1, NULL);
+      if (unsigned_type)
+        TYPE_UNSIGNED (type) = 1;
+      return type;
+    }
+
+  if (boolean_type)
+    return init_boolean_type (objfile, type_bits, unsigned_type, NULL);
   else
-    return init_type (code,
-		      type_bits / TARGET_CHAR_BIT,
-		      signed_type ? 0 : TYPE_FLAG_UNSIGNED, (char *) NULL,
-		      objfile);
+    return init_integer_type (objfile, type_bits, unsigned_type, NULL);
 }
 
 static struct type *
@@ -3850,16 +3864,16 @@ read_sun_floating_type (char **pp, int t
   if (nbits != 0)
     return error_type (pp, objfile);
 
+  nbits = nbytes * TARGET_CHAR_BIT;
+
   if (details == NF_COMPLEX || details == NF_COMPLEX16
       || details == NF_COMPLEX32)
     {
-      rettype = init_type (TYPE_CODE_COMPLEX, nbytes, 0, NULL, objfile);
-      TYPE_TARGET_TYPE (rettype)
-	= init_type (TYPE_CODE_FLT, nbytes / 2, 0, NULL, objfile);
-      return rettype;
+      rettype = dbx_init_float_type (objfile, nbits / 2);
+      return init_complex_type (objfile, NULL, rettype);
     }
 
-  return init_type (TYPE_CODE_FLT, nbytes, 0, NULL, objfile);
+  return dbx_init_float_type (objfile, nbits);
 }
 
 /* Read a number from the string pointed to by *PP.
@@ -4122,18 +4136,14 @@ read_range_type (char **pp, int typenums
 	}
 
       if (got_signed || got_unsigned)
-	{
-	  return init_type (TYPE_CODE_INT, nbits / TARGET_CHAR_BIT,
-			    got_unsigned ? TYPE_FLAG_UNSIGNED : 0, NULL,
-			    objfile);
-	}
+	return init_integer_type (objfile, nbits, got_unsigned, NULL);
       else
 	return error_type (pp, objfile);
     }
 
   /* A type defined as a subrange of itself, with bounds both 0, is void.  */
   if (self_subrange && n2 == 0 && n3 == 0)
-    return init_type (TYPE_CODE_VOID, 1, 0, NULL, objfile);
+    return init_type (objfile, TYPE_CODE_VOID, 1, NULL);
 
   /* If n3 is zero and n2 is positive, we want a floating type, and n2
      is the width in bytes.
@@ -4150,16 +4160,10 @@ read_range_type (char **pp, int typenums
   if (n3 == 0 && n2 > 0)
     {
       struct type *float_type
-	= init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile);
+	= dbx_init_float_type (objfile, n2 * TARGET_CHAR_BIT);
 
       if (self_subrange)
-	{
-	  struct type *complex_type = 
-	    init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile);
-
-	  TYPE_TARGET_TYPE (complex_type) = float_type;
-	  return complex_type;
-	}
+	return init_complex_type (objfile, NULL, float_type);
       else
 	return float_type;
     }
@@ -4178,15 +4182,17 @@ read_range_type (char **pp, int typenums
 	  bits = gdbarch_int_bit (gdbarch);
 	}
 
-      return init_type (TYPE_CODE_INT, bits / TARGET_CHAR_BIT,
-			TYPE_FLAG_UNSIGNED, NULL, objfile);
+      return init_integer_type (objfile, bits, 1, NULL);
     }
 
   /* Special case: char is defined (Who knows why) as a subrange of
      itself with range 0-127.  */
   else if (self_subrange && n2 == 0 && n3 == 127)
-    return init_type (TYPE_CODE_INT, 1, TYPE_FLAG_NOSIGN, NULL, objfile);
-
+    {
+      struct type *type = init_integer_type (objfile, 1, 0, NULL);
+      TYPE_NOSIGN (type) = 1;
+      return type;
+    }
   /* We used to do this only for subrange of self or subrange of int.  */
   else if (n2 == 0)
     {
@@ -4196,8 +4202,7 @@ read_range_type (char **pp, int typenums
 
       if (n3 < 0)
 	/* n3 actually gives the size.  */
-	return init_type (TYPE_CODE_INT, -n3, TYPE_FLAG_UNSIGNED,
-			  NULL, objfile);
+	return init_integer_type (objfile, -n3 * TARGET_CHAR_BIT, 1, NULL);
 
       /* Is n3 == 2**(8n)-1 for some integer n?  Then it's an
          unsigned n-byte integer.  But do require n to be a power of
@@ -4211,8 +4216,7 @@ read_range_type (char **pp, int typenums
 	  bits >>= 8;
 	if (bits == 0
 	    && ((bytes - 1) & bytes) == 0) /* "bytes is a power of two" */
-	  return init_type (TYPE_CODE_INT, bytes, TYPE_FLAG_UNSIGNED, NULL,
-			    objfile);
+	  return init_integer_type (objfile, bytes * TARGET_CHAR_BIT, 1, NULL);
       }
     }
   /* I think this is for Convex "long long".  Since I don't know whether
@@ -4222,15 +4226,15 @@ read_range_type (char **pp, int typenums
 	   && (self_subrange
 	       || n2 == -gdbarch_long_long_bit
 			  (gdbarch) / TARGET_CHAR_BIT))
-    return init_type (TYPE_CODE_INT, -n2, 0, NULL, objfile);
+    return init_integer_type (objfile, -n2 * TARGET_CHAR_BIT, 0, NULL);
   else if (n2 == -n3 - 1)
     {
       if (n3 == 0x7f)
-	return init_type (TYPE_CODE_INT, 1, 0, NULL, objfile);
+	return init_integer_type (objfile, 8, 0, NULL);
       if (n3 == 0x7fff)
-	return init_type (TYPE_CODE_INT, 2, 0, NULL, objfile);
+	return init_integer_type (objfile, 16, 0, NULL);
       if (n3 == 0x7fffffff)
-	return init_type (TYPE_CODE_INT, 4, 0, NULL, objfile);
+	return init_integer_type (objfile, 32, 0, NULL);
     }
 
   /* We have a real range type on our hands.  Allocate space and
@@ -4299,8 +4303,7 @@ read_args (char **pp, int end, struct ob
       *varargsp = 0;
     }
 
-  rval = (struct field *) xmalloc (n * sizeof (struct field));
-  memset (rval, 0, n * sizeof (struct field));
+  rval = XCNEWVEC (struct field, n);
   for (i = 0; i < n; i++)
     rval[i].type = types[i];
   *nargsp = n;
@@ -4336,8 +4339,8 @@ common_block_start (char *name, struct o
     }
   common_block = local_symbols;
   common_block_i = local_symbols ? local_symbols->nsyms : 0;
-  common_block_name = obstack_copy0 (&objfile->objfile_obstack,
-				     name, strlen (name));
+  common_block_name = (char *) obstack_copy0 (&objfile->objfile_obstack, name,
+					      strlen (name));
 }
 
 /* Process a N_ECOMM symbol.  */
@@ -4844,13 +4847,11 @@ _initialize_stabsread (void)
 
   undef_types_allocated = 20;
   undef_types_length = 0;
-  undef_types = (struct type **)
-    xmalloc (undef_types_allocated * sizeof (struct type *));
+  undef_types = XNEWVEC (struct type *, undef_types_allocated);
 
   noname_undefs_allocated = 20;
   noname_undefs_length = 0;
-  noname_undefs = (struct nat *)
-    xmalloc (noname_undefs_allocated * sizeof (struct nat));
+  noname_undefs = XNEWVEC (struct nat, noname_undefs_allocated);
 
   stab_register_index = register_symbol_register_impl (LOC_REGISTER,
 						       &stab_register_funcs);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stabsread.h ./gdb/stabsread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stabsread.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stabsread.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Include file for stabs debugging format support functions.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -160,16 +160,12 @@ struct stab_section_list
 /* Functions exported by dbxread.c.  These are not in stabsread.c because
    they are only used by some stabs readers.  */
 
-extern struct partial_symtab *end_psymtab (struct objfile *objfile,
-					   struct partial_symtab *pst,
-					   const char **include_list,
-					   int num_includes,
-					   int capping_symbol_offset,
-					   CORE_ADDR capping_text,
-					   struct partial_symtab
-					   **dependency_list,
-					   int number_dependencies,
-					   int textlow_not_set);
+extern struct partial_symtab *dbx_end_psymtab
+  (struct objfile *objfile, struct partial_symtab *pst,
+   const char **include_list, int num_includes,
+   int capping_symbol_offset, CORE_ADDR capping_text,
+   struct partial_symtab **dependency_list, int number_dependencies,
+   int textlow_not_set);
 
 extern void process_one_symbol (int, int, CORE_ADDR, char *,
 				const struct section_offsets *,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stack.c ./gdb/stack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stack.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Print and select stack frames for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,9 +48,10 @@
 #include "cli/cli-utils.h"
 #include "objfiles.h"
 
-#include <ctype.h>
+#include "safe-ctype.h"
 #include "symfile.h"
 #include "extension.h"
+#include "observer.h"
 
 /* The possible choices of "set print frame-arguments", and the value
    of this setting.  */
@@ -141,7 +142,19 @@ frame_show_address (struct frame_info *f
   return get_frame_pc (frame) != sal.pc;
 }
 
-/* Show or print a stack frame FRAME briefly.  The output is format
+/* See frame.h.  */
+
+void
+print_stack_frame_to_uiout (struct ui_out *uiout, struct frame_info *frame,
+			    int print_level, enum print_what print_what,
+			    int set_current_sal)
+{
+  scoped_restore save_uiout = make_scoped_restore (&current_uiout, uiout);
+
+  print_stack_frame (frame, print_level, print_what, set_current_sal);
+}
+
+/* Show or print a stack frame FRAME briefly.  The output is formatted
    according to PRINT_LEVEL and PRINT_WHAT printing the frame's
    relative level, function name, argument list, and file name and
    line number.  If the frame's PC is not at the beginning of the
@@ -154,7 +167,7 @@ print_stack_frame (struct frame_info *fr
 {
 
   /* For mi, alway print location and address.  */
-  if (ui_out_is_mi_like_p (current_uiout))
+  if (current_uiout->is_mi_like_p ())
     print_what = LOC_AND_ADDRESS;
 
   TRY
@@ -212,42 +225,40 @@ print_frame_arg (const struct frame_arg 
 {
   struct ui_out *uiout = current_uiout;
   struct cleanup *old_chain;
-  struct ui_file *stb;
   const char *error_message = NULL;
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
   gdb_assert (!arg->val || !arg->error);
   gdb_assert (arg->entry_kind == print_entry_values_no
 	      || arg->entry_kind == print_entry_values_only
-	      || (!ui_out_is_mi_like_p (uiout)
+	      || (!uiout->is_mi_like_p ()
 		  && arg->entry_kind == print_entry_values_compact));
 
   annotate_arg_begin ();
 
-  make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
-  fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (arg->sym),
+  old_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+  fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (arg->sym),
 			   SYMBOL_LANGUAGE (arg->sym), DMGL_PARAMS | DMGL_ANSI);
   if (arg->entry_kind == print_entry_values_compact)
     {
       /* It is OK to provide invalid MI-like stream as with
 	 PRINT_ENTRY_VALUE_COMPACT we never use MI.  */
-      fputs_filtered ("=", stb);
+      stb.puts ("=");
 
-      fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (arg->sym),
+      fprintf_symbol_filtered (&stb, SYMBOL_PRINT_NAME (arg->sym),
 			       SYMBOL_LANGUAGE (arg->sym),
 			       DMGL_PARAMS | DMGL_ANSI);
     }
   if (arg->entry_kind == print_entry_values_only
       || arg->entry_kind == print_entry_values_compact)
-    fputs_filtered ("@entry", stb);
-  ui_out_field_stream (uiout, "name", stb);
+    stb.puts ("@entry");
+  uiout->field_stream ("name", stb);
   annotate_arg_name_end ();
-  ui_out_text (uiout, "=");
+  uiout->text ("=");
 
   if (!arg->val && !arg->error)
-    ui_out_text (uiout, "...");
+    uiout->text ("...");
   else
     {
       if (arg->error)
@@ -281,7 +292,7 @@ print_frame_arg (const struct frame_arg 
 	      /* True in "summary" mode, false otherwise.  */
 	      opts.summary = !strcmp (print_frame_arguments, "scalars");
 
-	      common_val_print (arg->val, stb, 2, &opts, language);
+	      common_val_print (arg->val, &stb, 2, &opts, language);
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
@@ -290,11 +301,10 @@ print_frame_arg (const struct frame_arg 
 	  END_CATCH
 	}
       if (error_message != NULL)
-	fprintf_filtered (stb, _("<error reading variable: %s>"),
-			  error_message);
+	stb.printf (_("<error reading variable: %s>"), error_message);
     }
 
-  ui_out_field_stream (uiout, "value", stb);
+  uiout->field_stream ("value", stb);
 
   /* Also invoke ui_out_tuple_end.  */
   do_cleanups (old_chain);
@@ -310,15 +320,13 @@ void
 read_frame_local (struct symbol *sym, struct frame_info *frame,
 		  struct frame_arg *argp)
 {
-  struct value *val = NULL;
-
   argp->sym = sym;
   argp->val = NULL;
   argp->error = NULL;
 
   TRY
     {
-      argp->val = read_var_value (sym, frame);
+      argp->val = read_var_value (sym, NULL, frame);
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
@@ -344,11 +352,11 @@ read_frame_arg (struct symbol *sym, stru
     {
       TRY
 	{
-	  val = read_var_value (sym, frame);
+	  val = read_var_value (sym, NULL, frame);
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
-	  val_error = alloca (strlen (except.message) + 1);
+	  val_error = (char *) alloca (strlen (except.message) + 1);
 	  strcpy (val_error, except.message);
 	}
       END_CATCH
@@ -385,7 +393,7 @@ read_frame_arg (struct symbol *sym, stru
 	{
 	  /* For MI do not try to use print_entry_values_compact for ARGP.  */
 
-	  if (val && entryval && !ui_out_is_mi_like_p (current_uiout))
+	  if (val && entryval && !current_uiout->is_mi_like_p ())
 	    {
 	      struct type *type = value_type (val);
 
@@ -399,10 +407,9 @@ read_frame_arg (struct symbol *sym, stru
 		  /* Initialize it just to avoid a GCC false warning.  */
 		  struct value *val_deref = NULL, *entryval_deref;
 
-		  /* DW_AT_GNU_call_site_value does match with the current
+		  /* DW_AT_call_value does match with the current
 		     value.  If it is a reference still try to verify if
-		     dereferenced DW_AT_GNU_call_site_data_value does not
-		     differ.  */
+		     dereferenced DW_AT_call_data_value does not differ.  */
 
 		  TRY
 		    {
@@ -471,11 +478,11 @@ read_frame_arg (struct symbol *sym, stru
 
 	  TRY
 	    {
-	      val = read_var_value (sym, frame);
+	      val = read_var_value (sym, NULL, frame);
 	    }
 	  CATCH (except, RETURN_MASK_ERROR)
 	    {
-	      val_error = alloca (strlen (except.message) + 1);
+	      val_error = (char *) alloca (strlen (except.message) + 1);
 	      strcpy (val_error, except.message);
 	    }
 	  END_CATCH
@@ -507,7 +514,7 @@ read_frame_arg (struct symbol *sym, stru
 	   || print_entry_values == print_entry_values_default) && val_equal)
     {
       argp->entry_kind = print_entry_values_compact;
-      gdb_assert (!ui_out_is_mi_like_p (current_uiout));
+      gdb_assert (!current_uiout->is_mi_like_p ());
     }
   else
     argp->entry_kind = print_entry_values_no;
@@ -542,14 +549,9 @@ print_frame_args (struct symbol *func, s
   long highest_offset = -1;
   /* Number of ints of arguments that we have printed so far.  */
   int args_printed = 0;
-  struct cleanup *old_chain;
-  struct ui_file *stb;
   /* True if we should print arguments, false otherwise.  */
   int print_args = strcmp (print_frame_arguments, "none");
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
-
   if (func)
     {
       const struct block *b = SYMBOL_BLOCK_VALUE (func);
@@ -621,7 +623,7 @@ print_frame_args (struct symbol *func, s
 	      struct symbol *nsym;
 
 	      nsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
-				    b, VAR_DOMAIN, NULL);
+				    b, VAR_DOMAIN, NULL).symbol;
 	      gdb_assert (nsym != NULL);
 	      if (SYMBOL_CLASS (nsym) == LOC_REGISTER
 		  && !SYMBOL_IS_ARGUMENT (nsym))
@@ -669,8 +671,8 @@ print_frame_args (struct symbol *func, s
 
 	  /* Print the current arg.  */
 	  if (!first)
-	    ui_out_text (uiout, ", ");
-	  ui_out_wrap_hint (uiout, "    ");
+	    uiout->text (", ");
+	  uiout->wrap_hint ("    ");
 
 	  if (!print_args)
 	    {
@@ -691,8 +693,8 @@ print_frame_args (struct symbol *func, s
 	    {
 	      if (arg.entry_kind != print_entry_values_only)
 		{
-		  ui_out_text (uiout, ", ");
-		  ui_out_wrap_hint (uiout, "    ");
+		  uiout->text (", ");
+		  uiout->wrap_hint ("    ");
 		}
 
 	      print_frame_arg (&entryarg);
@@ -719,8 +721,6 @@ print_frame_args (struct symbol *func, s
       print_frame_nameless_args (frame, start, num - args_printed,
 				 first, stream);
     }
-
-  do_cleanups (old_chain);
 }
 
 /* Set the current source and line to the location given by frame
@@ -766,7 +766,7 @@ do_gdb_disassembly (struct gdbarch *gdba
 
   TRY
     {
-      gdb_disassembly (gdbarch, current_uiout, 0,
+      gdb_disassembly (gdbarch, current_uiout,
 		       DISASSEMBLY_RAW_INSN, how_many,
 		       low, high);
     }
@@ -815,14 +815,14 @@ print_frame_info (struct frame_info *fra
          to list for this frame.  */
       if (print_level)
         {
-          ui_out_text (uiout, "#");
-          ui_out_field_fmt_int (uiout, 2, ui_left, "level",
+          uiout->text ("#");
+          uiout->field_fmt_int (2, ui_left, "level",
 				frame_relative_level (frame));
         }
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
         {
           annotate_frame_address ();
-          ui_out_field_core_addr (uiout, "addr",
+          uiout->field_core_addr ("addr",
 				  gdbarch, get_frame_pc (frame));
           annotate_frame_address_end ();
         }
@@ -830,18 +830,18 @@ print_frame_info (struct frame_info *fra
       if (get_frame_type (frame) == DUMMY_FRAME)
         {
           annotate_function_call ();
-          ui_out_field_string (uiout, "func", "<function called from gdb>");
+          uiout->field_string ("func", "<function called from gdb>");
 	}
       else if (get_frame_type (frame) == SIGTRAMP_FRAME)
         {
 	  annotate_signal_handler_caller ();
-          ui_out_field_string (uiout, "func", "<signal handler called>");
+          uiout->field_string ("func", "<signal handler called>");
         }
       else if (get_frame_type (frame) == ARCH_FRAME)
         {
-          ui_out_field_string (uiout, "func", "<cross-architecture call>");
+          uiout->field_string ("func", "<cross-architecture call>");
 	}
-      ui_out_text (uiout, "\n");
+      uiout->text ("\n");
       annotate_frame_end ();
 
       /* If disassemble-next-line is set to auto or on output the next
@@ -910,9 +910,9 @@ print_frame_info (struct frame_info *fra
 		 ability to decide for themselves if it is desired.  */
 	      if (opts.addressprint && mid_statement)
 		{
-		  ui_out_field_core_addr (uiout, "addr",
+		  uiout->field_core_addr ("addr",
 					  gdbarch, get_frame_pc (frame));
-		  ui_out_text (uiout, "\t");
+		  uiout->text ("\t");
 		}
 
 	      print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
@@ -1103,7 +1103,8 @@ find_frame_funname (struct frame_info *f
 	}
       else
 	{
-	  *funname = xstrdup (SYMBOL_PRINT_NAME (func));
+	  const char *print_name = SYMBOL_PRINT_NAME (func);
+
 	  *funlang = SYMBOL_LANGUAGE (func);
 	  if (funcp)
 	    *funcp = func;
@@ -1114,14 +1115,17 @@ find_frame_funname (struct frame_info *f
 		 stored in the symbol table, but we stored a version
 		 with DMGL_PARAMS turned on, and here we don't want to
 		 display parameters.  So remove the parameters.  */
-	      char *func_only = cp_remove_params (*funname);
+	      char *func_only = cp_remove_params (print_name);
 
 	      if (func_only)
-		{
-		  xfree (*funname);
-		  *funname = func_only;
-		}
+		*funname = func_only;
 	    }
+
+	  /* If we didn't hit the C++ case above, set *funname here.
+	     This approach is taken to avoid having to install a
+	     cleanup in case cp_remove_params can throw.  */
+	  if (*funname == NULL)
+	    *funname = xstrdup (print_name);
 	}
     }
   else
@@ -1150,7 +1154,6 @@ print_frame (struct frame_info *frame, i
   struct ui_out *uiout = current_uiout;
   char *funname = NULL;
   enum language funlang = language_unknown;
-  struct ui_file *stb;
   struct cleanup *old_chain, *list_chain;
   struct value_print_options opts;
   struct symbol *func;
@@ -1159,11 +1162,9 @@ print_frame (struct frame_info *frame, i
 
   pc_p = get_frame_pc_if_available (frame, &pc);
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
 
   find_frame_funname (frame, &funname, &funlang, &func);
-  make_cleanup (xfree, funname);
+  old_chain = make_cleanup (xfree, funname);
 
   annotate_frame_begin (print_level ? frame_relative_level (frame) : 0,
 			gdbarch, pc);
@@ -1172,8 +1173,8 @@ print_frame (struct frame_info *frame, i
 
   if (print_level)
     {
-      ui_out_text (uiout, "#");
-      ui_out_field_fmt_int (uiout, 2, ui_left, "level",
+      uiout->text ("#");
+      uiout->field_fmt_int (2, ui_left, "level",
 			    frame_relative_level (frame));
     }
   get_user_print_options (&opts);
@@ -1184,20 +1185,22 @@ print_frame (struct frame_info *frame, i
       {
 	annotate_frame_address ();
 	if (pc_p)
-	  ui_out_field_core_addr (uiout, "addr", gdbarch, pc);
+	  uiout->field_core_addr ("addr", gdbarch, pc);
 	else
-	  ui_out_field_string (uiout, "addr", "<unavailable>");
+	  uiout->field_string ("addr", "<unavailable>");
 	annotate_frame_address_end ();
-	ui_out_text (uiout, " in ");
+	uiout->text (" in ");
       }
   annotate_frame_function_name ();
-  fprintf_symbol_filtered (stb, funname ? funname : "??",
+
+  string_file stb;
+  fprintf_symbol_filtered (&stb, funname ? funname : "??",
 			   funlang, DMGL_ANSI);
-  ui_out_field_stream (uiout, "func", stb);
-  ui_out_wrap_hint (uiout, "   ");
+  uiout->field_stream ("func", stb);
+  uiout->wrap_hint ("   ");
   annotate_frame_args ();
       
-  ui_out_text (uiout, " (");
+  uiout->text (" (");
   if (print_args)
     {
       struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1228,27 +1231,27 @@ print_frame (struct frame_info *frame, i
       do_cleanups (args_list_chain);
       QUIT;
     }
-  ui_out_text (uiout, ")");
+  uiout->text (")");
   if (sal.symtab)
     {
       const char *filename_display;
       
       filename_display = symtab_to_filename_for_display (sal.symtab);
       annotate_frame_source_begin ();
-      ui_out_wrap_hint (uiout, "   ");
-      ui_out_text (uiout, " at ");
+      uiout->wrap_hint ("   ");
+      uiout->text (" at ");
       annotate_frame_source_file ();
-      ui_out_field_string (uiout, "file", filename_display);
-      if (ui_out_is_mi_like_p (uiout))
+      uiout->field_string ("file", filename_display);
+      if (uiout->is_mi_like_p ())
 	{
 	  const char *fullname = symtab_to_fullname (sal.symtab);
 
-	  ui_out_field_string (uiout, "fullname", fullname);
+	  uiout->field_string ("fullname", fullname);
 	}
       annotate_frame_source_file_end ();
-      ui_out_text (uiout, ":");
+      uiout->text (":");
       annotate_frame_source_line ();
-      ui_out_field_int (uiout, "line", sal.line);
+      uiout->field_int ("line", sal.line);
       annotate_frame_source_end ();
     }
 
@@ -1260,28 +1263,26 @@ print_frame (struct frame_info *frame, i
       if (lib)
 	{
 	  annotate_frame_where ();
-	  ui_out_wrap_hint (uiout, "  ");
-	  ui_out_text (uiout, " from ");
-	  ui_out_field_string (uiout, "from", lib);
+	  uiout->wrap_hint ("  ");
+	  uiout->text (" from ");
+	  uiout->field_string ("from", lib);
 	}
     }
 
   /* do_cleanups will call ui_out_tuple_end() for us.  */
   do_cleanups (list_chain);
-  ui_out_text (uiout, "\n");
+  uiout->text ("\n");
   do_cleanups (old_chain);
 }
 
 
-/* Read a frame specification in whatever the appropriate format is
-   from FRAME_EXP.  Call error(), printing MESSAGE, if the
-   specification is in any way invalid (so this function never returns
-   NULL).  When SEPECTED_P is non-NULL set its target to indicate that
-   the default selected frame was used.  */
+/* Read a frame specification in whatever the appropriate format is from
+   FRAME_EXP.  Call error() if the specification is in any way invalid (so
+   this function never returns NULL).  When SELECTED_FRAME_P is non-NULL
+   set its target to indicate that the default selected frame was used.  */
 
 static struct frame_info *
-parse_frame_specification_1 (const char *frame_exp, const char *message,
-			     int *selected_frame_p)
+parse_frame_specification (const char *frame_exp, int *selected_frame_p)
 {
   int numargs;
   struct value *args[4];
@@ -1305,7 +1306,7 @@ parse_frame_specification_1 (const char 
 
 	  /* Parse the argument, extract it, save it.  */
 	  for (p = frame_exp;
-	       *p && !isspace (*p);
+	       *p && !ISSPACE (*p);
 	       p++);
 	  addr_string = savestring (frame_exp, p - frame_exp);
 	  frame_exp = p;
@@ -1330,7 +1331,7 @@ parse_frame_specification_1 (const char 
     {
       if (selected_frame_p != NULL)
 	(*selected_frame_p) = 1;
-      return get_selected_frame (message);
+      return get_selected_frame (_("No stack."));
     }
 
   /* None of the remaining use the selected frame.  */
@@ -1401,12 +1402,6 @@ parse_frame_specification_1 (const char 
     error (_("Too many args in frame specification"));
 }
 
-static struct frame_info *
-parse_frame_specification (char *frame_exp)
-{
-  return parse_frame_specification_1 (frame_exp, NULL, NULL);
-}
-
 /* Print verbosely the selected frame or the frame at address
    ADDR_EXP.  Absolutely all information in the frame is printed.  */
 
@@ -1431,7 +1426,7 @@ frame_info (char *addr_exp, int from_tty
   CORE_ADDR caller_pc = 0;
   int caller_pc_p = 0;
 
-  fi = parse_frame_specification_1 (addr_exp, "No stack.", &selected_frame_p);
+  fi = parse_frame_specification (addr_exp, &selected_frame_p);
   gdbarch = get_frame_arch (fi);
 
   /* Name of the value returned by get_frame_pc().  Per comments, "pc"
@@ -1517,27 +1512,32 @@ frame_info (char *addr_exp, int from_tty
   wrap_here ("    ");
   printf_filtered ("saved %s = ", pc_regname);
 
-  TRY
-    {
-      caller_pc = frame_unwind_caller_pc (fi);
-      caller_pc_p = 1;
-    }
-  CATCH (ex, RETURN_MASK_ERROR)
+  if (!frame_id_p (frame_unwind_caller_id (fi)))
+    val_print_not_saved (gdb_stdout);
+  else
     {
-      switch (ex.error)
+      TRY
 	{
-	case NOT_AVAILABLE_ERROR:
-	  val_print_unavailable (gdb_stdout);
-	  break;
-	case OPTIMIZED_OUT_ERROR:
-	  val_print_not_saved (gdb_stdout);
-	  break;
-	default:
-	  fprintf_filtered (gdb_stdout, _("<error: %s>"), ex.message);
-	  break;
+	  caller_pc = frame_unwind_caller_pc (fi);
+	  caller_pc_p = 1;
 	}
+      CATCH (ex, RETURN_MASK_ERROR)
+	{
+	  switch (ex.error)
+	    {
+	    case NOT_AVAILABLE_ERROR:
+	      val_print_unavailable (gdb_stdout);
+	      break;
+	    case OPTIMIZED_OUT_ERROR:
+	      val_print_not_saved (gdb_stdout);
+	      break;
+	    default:
+	      fprintf_filtered (gdb_stdout, _("<error: %s>"), ex.message);
+	      break;
+	    }
+	}
+      END_CATCH
     }
-  END_CATCH
 
   if (caller_pc_p)
     fputs_filtered (paddress (gdbarch, caller_pc), gdb_stdout);
@@ -1630,57 +1630,52 @@ frame_info (char *addr_exp, int from_tty
   /* Print as much information as possible on the location of all the
      registers.  */
   {
-    enum lval_type lval;
-    int optimized;
-    int unavailable;
-    CORE_ADDR addr;
-    int realnum;
     int count;
     int i;
     int need_nl = 1;
+    int sp_regnum = gdbarch_sp_regnum (gdbarch);
 
     /* The sp is special; what's displayed isn't the save address, but
        the value of the previous frame's sp.  This is a legacy thing,
        at one stage the frame cached the previous frame's SP instead
        of its address, hence it was easiest to just display the cached
        value.  */
-    if (gdbarch_sp_regnum (gdbarch) >= 0)
+    if (sp_regnum >= 0)
       {
-	/* Find out the location of the saved stack pointer with out
-           actually evaluating it.  */
-	frame_register_unwind (fi, gdbarch_sp_regnum (gdbarch),
-			       &optimized, &unavailable, &lval, &addr,
-			       &realnum, NULL);
-	if (!optimized && !unavailable && lval == not_lval)
-	  {
-	    enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-	    int sp_size = register_size (gdbarch, gdbarch_sp_regnum (gdbarch));
-	    gdb_byte value[MAX_REGISTER_SIZE];
-	    CORE_ADDR sp;
-
-	    frame_register_unwind (fi, gdbarch_sp_regnum (gdbarch),
-				   &optimized, &unavailable, &lval, &addr,
-				   &realnum, value);
-	    /* NOTE: cagney/2003-05-22: This is assuming that the
-               stack pointer was packed as an unsigned integer.  That
-               may or may not be valid.  */
-	    sp = extract_unsigned_integer (value, sp_size, byte_order);
-	    printf_filtered (" Previous frame's sp is ");
-	    fputs_filtered (paddress (gdbarch, sp), gdb_stdout);
-	    printf_filtered ("\n");
-	    need_nl = 0;
-	  }
-	else if (!optimized && !unavailable && lval == lval_memory)
-	  {
-	    printf_filtered (" Previous frame's sp at ");
-	    fputs_filtered (paddress (gdbarch, addr), gdb_stdout);
-	    printf_filtered ("\n");
-	    need_nl = 0;
-	  }
-	else if (!optimized && !unavailable && lval == lval_register)
+	struct value *value = frame_unwind_register_value (fi, sp_regnum);
+	gdb_assert (value != NULL);
+
+	if (!value_optimized_out (value) && value_entirely_available (value))
 	  {
-	    printf_filtered (" Previous frame's sp in %s\n",
-			     gdbarch_register_name (gdbarch, realnum));
+	    if (VALUE_LVAL (value) == not_lval)
+	      {
+		CORE_ADDR sp;
+		enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+		int sp_size = register_size (gdbarch, sp_regnum);
+
+		sp = extract_unsigned_integer (value_contents_all (value),
+					       sp_size, byte_order);
+
+		printf_filtered (" Previous frame's sp is ");
+		fputs_filtered (paddress (gdbarch, sp), gdb_stdout);
+		printf_filtered ("\n");
+	      }
+	    else if (VALUE_LVAL (value) == lval_memory)
+	      {
+		printf_filtered (" Previous frame's sp at ");
+		fputs_filtered (paddress (gdbarch, value_address (value)),
+				gdb_stdout);
+		printf_filtered ("\n");
+	      }
+	    else if (VALUE_LVAL (value) == lval_register)
+	      {
+		printf_filtered (" Previous frame's sp in %s\n",
+				 gdbarch_register_name (gdbarch,
+							VALUE_REGNUM (value)));
+	      }
+
+	    release_value (value);
+	    value_free (value);
 	    need_nl = 0;
 	  }
 	/* else keep quiet.  */
@@ -1690,9 +1685,15 @@ frame_info (char *addr_exp, int from_tty
     numregs = gdbarch_num_regs (gdbarch)
 	      + gdbarch_num_pseudo_regs (gdbarch);
     for (i = 0; i < numregs; i++)
-      if (i != gdbarch_sp_regnum (gdbarch)
+      if (i != sp_regnum
 	  && gdbarch_register_reggroup_p (gdbarch, i, all_reggroup))
 	{
+	  enum lval_type lval;
+	  int optimized;
+	  int unavailable;
+	  CORE_ADDR addr;
+	  int realnum;
+
 	  /* Find out the location of the saved register without
              fetching the corresponding value.  */
 	  frame_register_unwind (fi, i, &optimized, &unavailable,
@@ -1894,7 +1895,7 @@ backtrace_command (char *arg, int from_t
 	  unsigned int j;
 
 	  for (j = 0; j < strlen (argv[i]); j++)
-	    argv[i][j] = tolower (argv[i][j]);
+	    argv[i][j] = TOLOWER (argv[i][j]);
 
 	  if (no_filters < 0 && subset_compare (argv[i], "no-filters"))
 	    no_filters = argc;
@@ -1915,7 +1916,7 @@ backtrace_command (char *arg, int from_t
 	{
 	  if (arglen > 0)
 	    {
-	      arg = xmalloc (arglen + 1);
+	      arg = (char *) xmalloc (arglen + 1);
 	      make_cleanup (xfree, arg);
 	      arg[0] = 0;
 	      for (i = 0; i < argc; i++)
@@ -2059,7 +2060,8 @@ do_print_variable_and_value (const char 
 			     struct symbol *sym,
 			     void *cb_data)
 {
-  struct print_variable_and_value_data *p = cb_data;
+  struct print_variable_and_value_data *p
+    = (struct print_variable_and_value_data *) cb_data;
   struct frame_info *frame;
 
   frame = frame_find_by_id (p->frame_id);
@@ -2089,6 +2091,7 @@ print_frame_local_vars (struct frame_inf
   struct print_variable_and_value_data cb_data;
   const struct block *block;
   CORE_ADDR pc;
+  struct gdb_exception except = exception_none;
 
   if (!get_frame_pc_if_available (frame, &pc))
     {
@@ -2109,9 +2112,27 @@ print_frame_local_vars (struct frame_inf
   cb_data.stream = stream;
   cb_data.values_printed = 0;
 
-  iterate_over_block_local_vars (block,
-				 do_print_variable_and_value,
-				 &cb_data);
+  /* Temporarily change the selected frame to the given FRAME.
+     This allows routines that rely on the selected frame instead
+     of being given a frame as parameter to use the correct frame.  */
+  select_frame (frame);
+
+  TRY
+    {
+      iterate_over_block_local_vars (block,
+				     do_print_variable_and_value,
+				     &cb_data);
+    }
+  CATCH (ex, RETURN_MASK_ALL)
+    {
+      except = ex;
+    }
+  END_CATCH
+
+  /* Restore the selected frame, and then rethrow if there was a problem.  */
+  select_frame (frame_find_by_id (cb_data.frame_id));
+  if (except.reason < 0)
+    throw_exception (except);
 
   /* do_print_variable_and_value invalidates FRAME.  */
   frame = NULL;
@@ -2156,7 +2177,7 @@ iterate_over_block_arg_vars (const struc
 	     are not combined in symbol-reading.  */
 
 	  sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
-				b, VAR_DOMAIN, NULL);
+				b, VAR_DOMAIN, NULL).symbol;
 	  (*cb) (SYMBOL_PRINT_NAME (sym), sym2, cb_data);
 	}
     }
@@ -2283,7 +2304,11 @@ find_relative_frame (struct frame_info *
 void
 select_frame_command (char *level_exp, int from_tty)
 {
-  select_frame (parse_frame_specification_1 (level_exp, "No stack.", NULL));
+  struct frame_info *prev_frame = get_selected_frame_if_set ();
+
+  select_frame (parse_frame_specification (level_exp, NULL));
+  if (get_selected_frame_if_set () != prev_frame)
+    observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
 }
 
 /* The "frame" command.  With no argument, print the selected frame
@@ -2293,8 +2318,13 @@ select_frame_command (char *level_exp, i
 static void
 frame_command (char *level_exp, int from_tty)
 {
-  select_frame_command (level_exp, from_tty);
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+  struct frame_info *prev_frame = get_selected_frame_if_set ();
+
+  select_frame (parse_frame_specification (level_exp, NULL));
+  if (get_selected_frame_if_set () != prev_frame)
+    observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
+  else
+    print_selected_thread_frame (current_uiout, USER_SELECTED_FRAME);
 }
 
 /* Select the frame up one or COUNT_EXP stack levels from the
@@ -2325,7 +2355,7 @@ static void
 up_command (char *count_exp, int from_tty)
 {
   up_silently_base (count_exp);
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+  observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
 }
 
 /* Select the frame down one or COUNT_EXP stack levels from the previously
@@ -2364,9 +2394,8 @@ static void
 down_command (char *count_exp, int from_tty)
 {
   down_silently_base (count_exp);
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+  observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
 }
-
 
 void
 return_command (char *retval_exp, int from_tty)
@@ -2393,13 +2422,12 @@ return_command (char *retval_exp, int fr
      message.  */
   if (retval_exp)
     {
-      struct expression *retval_expr = parse_expression (retval_exp);
-      struct cleanup *old_chain = make_cleanup (xfree, retval_expr);
+      expression_up retval_expr = parse_expression (retval_exp);
       struct type *return_type = NULL;
 
       /* Compute the return value.  Should the computation fail, this
          call throws an error.  */
-      return_value = evaluate_expression (retval_expr);
+      return_value = evaluate_expression (retval_expr.get ());
 
       /* Cast return value to the return type of the function.  Should
          the cast fail, this call throws an error.  */
@@ -2414,8 +2442,7 @@ return_command (char *retval_exp, int fr
 		     "Please use an explicit cast of the value to return."));
 	  return_type = value_type (return_value);
 	}
-      do_cleanups (old_chain);
-      CHECK_TYPEDEF (return_type);
+      return_type = check_typedef (return_type);
       return_value = value_cast (return_type, return_value);
 
       /* Make sure the value is fully evaluated.  It may live in the
@@ -2424,7 +2451,7 @@ return_command (char *retval_exp, int fr
 	value_fetch_lazy (return_value);
 
       if (thisfun != NULL)
-	function = read_var_value (thisfun, thisframe);
+	function = read_var_value (thisfun, NULL, thisframe);
 
       rv_conv = RETURN_VALUE_REGISTER_CONVENTION;
       if (TYPE_CODE (return_type) == TYPE_CODE_VOID)
@@ -2491,11 +2518,10 @@ return_command (char *retval_exp, int fr
   if (get_frame_type (get_current_frame ()) == DUMMY_FRAME)
     frame_pop (get_current_frame ());
 
+  select_frame (get_current_frame ());
   /* If interactive, print the frame that is now current.  */
   if (from_tty)
-    frame_command ("0", 1);
-  else
-    select_frame_command ("0", 0);
+    print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
 }
 
 /* Sets the scope to input function name, provided that the function
@@ -2517,14 +2543,13 @@ func_command (char *arg, int from_tty)
   struct function_bounds *func_bounds = NULL;
   struct cleanup *cleanups;
 
-  if (arg != NULL)
+  if (arg == NULL)
     return;
 
-  frame = parse_frame_specification ("0");
+  frame = get_current_frame ();
   sals = decode_line_with_current_source (arg, DECODE_LINE_FUNFIRSTLINE);
   cleanups = make_cleanup (xfree, sals.sals);
-  func_bounds = (struct function_bounds *) xmalloc (
-			      sizeof (struct function_bounds) * sals.nelts);
+  func_bounds = XNEWVEC (struct function_bounds, sals.nelts);
   make_cleanup (xfree, func_bounds);
   for (i = 0; (i < sals.nelts && !found); i++)
     {
@@ -2559,51 +2584,6 @@ func_command (char *arg, int from_tty)
   else if (frame != get_selected_frame (NULL))
     select_and_print_frame (frame);
 }
-
-/* Gets the language of the current frame.  */
-
-enum language
-get_frame_language (void)
-{
-  struct frame_info *frame = deprecated_safe_get_selected_frame ();
-
-  if (frame)
-    {
-      CORE_ADDR pc = 0;
-      int pc_p = 0;
-
-      /* We determine the current frame language by looking up its
-         associated symtab.  To retrieve this symtab, we use the frame
-         PC.  However we cannot use the frame PC as is, because it
-         usually points to the instruction following the "call", which
-         is sometimes the first instruction of another function.  So
-         we rely on get_frame_address_in_block(), it provides us with
-         a PC that is guaranteed to be inside the frame's code
-         block.  */
-
-      TRY
-	{
-	  pc = get_frame_address_in_block (frame);
-	  pc_p = 1;
-	}
-      CATCH (ex, RETURN_MASK_ERROR)
-	{
-	  if (ex.error != NOT_AVAILABLE_ERROR)
-	    throw_exception (ex);
-	}
-      END_CATCH
-
-      if (pc_p)
-	{
-	  struct compunit_symtab *cust = find_pc_compunit_symtab (pc);
-
-	  if (cust != NULL)
-	    return compunit_language (cust);
-	}
-    }
-
-  return language_unknown;
-}
 
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
@@ -2638,16 +2618,15 @@ This is useful in command scripts."));
 Select and print a stack frame.\nWith no argument, \
 print the selected stack frame.  (See also \"info frame\").\n\
 An argument specifies the frame to select.\n\
-It can be a stack frame number or the address of the frame.\n\
-With argument, nothing is printed if input is coming from\n\
-a command file or a user-defined command."));
+It can be a stack frame number or the address of the frame.\n"));
 
   add_com_alias ("f", "frame", class_stack, 1);
 
-  add_com ("select-frame", class_stack, select_frame_command, _("\
+  add_com_suppress_notification ("select-frame", class_stack, select_frame_command, _("\
 Select a stack frame without printing anything.\n\
 An argument specifies the frame to select.\n\
-It can be a stack frame number or the address of the frame.\n"));
+It can be a stack frame number or the address of the frame.\n"),
+		 &cli_suppress_notification.user_selected_context);
 
   add_com ("backtrace", class_stack, backtrace_command, _("\
 Print backtrace of all stack frames, or innermost COUNT frames.\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stack.h ./gdb/stack.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stack.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stack.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Stack manipulation commands, for GDB the GNU Debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stap-probe.c ./gdb/stap-probe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stap-probe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stap-probe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* SystemTap probe support for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -313,9 +313,8 @@ stap_get_opcode (const char **s)
       break;
 
     default:
-      internal_error (__FILE__, __LINE__,
-		      _("Invalid opcode in expression `%s' for SystemTap"
-			"probe"), *s);
+      error (_("Invalid opcode in expression `%s' for SystemTap"
+	       "probe"), *s);
     }
 
   return op;
@@ -326,7 +325,8 @@ stap_get_opcode (const char **s)
 
 static struct type *
 stap_get_expected_argument_type (struct gdbarch *gdbarch,
-				 enum stap_arg_bitness b)
+				 enum stap_arg_bitness b,
+				 const struct stap_probe *probe)
 {
   switch (b)
     {
@@ -361,8 +361,8 @@ stap_get_expected_argument_type (struct 
       return builtin_type (gdbarch)->builtin_uint64;
 
     default:
-      internal_error (__FILE__, __LINE__,
-		      _("Undefined bitness for probe."));
+      error (_("Undefined bitness for probe '%s'."),
+	     probe->p.name);
       break;
     }
 }
@@ -653,7 +653,7 @@ stap_parse_register_operand (struct stap
 
   len = p->arg - start;
 
-  regname = alloca (len + gdb_reg_prefix_len + gdb_reg_suffix_len + 1);
+  regname = (char *) alloca (len + gdb_reg_prefix_len + gdb_reg_suffix_len + 1);
   regname[0] = '\0';
 
   /* We only add the GDB's register prefix/suffix if we are dealing with
@@ -1172,7 +1172,8 @@ stap_parse_probe_arguments (struct stap_
       else
 	arg.bitness = STAP_ARG_BITNESS_UNDEFINED;
 
-      arg.atype = stap_get_expected_argument_type (gdbarch, arg.bitness);
+      arg.atype = stap_get_expected_argument_type (gdbarch, arg.bitness,
+						   probe);
 
       expr = stap_parse_argument (&cur, arg.atype, gdbarch);
 
@@ -1278,12 +1279,26 @@ stap_is_operator (const char *op)
   return ret;
 }
 
+/* Return argument N of probe PROBE.
+
+   If the probe's arguments have not been parsed yet, parse them.  If
+   there are no arguments, throw an exception (error).  Otherwise,
+   return the requested argument.  */
+
 static struct stap_probe_arg *
 stap_get_arg (struct stap_probe *probe, unsigned n, struct gdbarch *gdbarch)
 {
   if (!probe->args_parsed)
     stap_parse_probe_arguments (probe, gdbarch);
 
+  gdb_assert (probe->args_parsed);
+  if (probe->args_u.vec == NULL)
+    internal_error (__FILE__, __LINE__,
+		    _("Probe '%s' apparently does not have arguments, but \n"
+		      "GDB is requesting its argument number %u anyway.  "
+		      "This should not happen.  Please report this bug."),
+		    probe->p.name, n);
+
   return VEC_index (stap_probe_arg_s, probe->args_u.vec, n);
 }
 
@@ -1467,14 +1482,15 @@ handle_stap_probe (struct objfile *objfi
   const char *probe_args = NULL;
   struct stap_probe *ret;
 
-  ret = obstack_alloc (&objfile->per_bfd->storage_obstack, sizeof (*ret));
+  ret = XOBNEW (&objfile->per_bfd->storage_obstack, struct stap_probe);
   ret->p.pops = &stap_probe_ops;
   ret->p.arch = gdbarch;
 
   /* Provider and the name of the probe.  */
   ret->p.provider = (char *) &el->data[3 * size];
-  ret->p.name = memchr (ret->p.provider, '\0',
-			(char *) el->data + el->size - ret->p.provider);
+  ret->p.name = ((const char *)
+		 memchr (ret->p.provider, '\0',
+			 (char *) el->data + el->size - ret->p.provider));
   /* Making sure there is a name.  */
   if (ret->p.name == NULL)
     {
@@ -1504,8 +1520,9 @@ handle_stap_probe (struct objfile *objfi
 
   /* Arguments.  We can only extract the argument format if there is a valid
      name for this probe.  */
-  probe_args = memchr (ret->p.name, '\0',
-		       (char *) el->data + el->size - ret->p.name);
+  probe_args = ((const char*)
+		memchr (ret->p.name, '\0',
+			(char *) el->data + el->size - ret->p.name));
 
   if (probe_args != NULL)
     ++probe_args;
@@ -1523,7 +1540,7 @@ handle_stap_probe (struct objfile *objfi
     }
 
   ret->args_parsed = 0;
-  ret->args_u.text = (void *) probe_args;
+  ret->args_u.text = probe_args;
 
   /* Successfully created probe.  */
   VEC_safe_push (probe_p, *probesp, (struct probe *) ret);
@@ -1535,7 +1552,7 @@ handle_stap_probe (struct objfile *objfi
 static void
 get_stap_base_address_1 (bfd *abfd, asection *sect, void *obj)
 {
-  asection **ret = obj;
+  asection **ret = (asection **) obj;
 
   if ((sect->flags & (SEC_DATA | SEC_ALLOC | SEC_HAS_CONTENTS))
       && sect->name && !strcmp (sect->name, STAP_BASE_SECTION_NAME))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stap-probe.h ./gdb/stap-probe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stap-probe.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stap-probe.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* SystemTap probe support for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/std-operator.def ./gdb/std-operator.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/std-operator.def	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/std-operator.def	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Standard language operator definitions for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -129,7 +129,7 @@ OP (OP_VAR_VALUE)
 /* OP_VAR_ENTRY_VALUE takes one struct symbol * in the following element,
    followed by another OP_VAR_ENTRY_VALUE, making three exp_elements.
    somename@entry may mean parameter value as present at the entry of the
-   current function.  Implemented via DW_OP_GNU_entry_value.  */
+   current function.  Implemented via DW_OP_entry_value.  */
 OP (OP_VAR_ENTRY_VALUE)
 
 /* OP_LAST is followed by an integer in the next exp_element.
@@ -266,6 +266,9 @@ OP (OP_M2_STRING)		/* Modula-2 string co
 OP (STRUCTOP_STRUCT)
 OP (STRUCTOP_PTR)
 
+/* Anonymous field access, e.g. "foo.3".  Used in Rust.  */
+OP (STRUCTOP_ANONYMOUS)
+
 /* C++: OP_THIS is just a placeholder for the class instance variable.
    It just comes in a tight (OP_THIS, OP_THIS) pair.  */
 OP (OP_THIS)
@@ -289,8 +292,9 @@ OP (OP_NAME)
 /* An Objective C Foundation Class NSString constant.  */
 OP (OP_OBJC_NSSTRING)
 
-/* A F90 array range operator (for "exp:exp", "exp:", ":exp" and ":").  */
-OP (OP_F90_RANGE)
+/* An array range operator (in Fortran 90, for "exp:exp", "exp:",
+   ":exp" and ":").  */
+OP (OP_RANGE)
 
 /* OP_DECFLOAT is followed by a type pointer in the next exp_element
    and a dec long constant value in the following exp_element.
@@ -312,3 +316,7 @@ OP (OP_DECLTYPE)
 
 /* The typeid operator.  This has one expression argument.  */
 OP (OP_TYPEID)
+
+/* This is used for the Rust [expr; N] form of array construction.  It
+   takes two expression arguments.  */
+OP (OP_RUST_ARRAY)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/std-regs.c ./gdb/std-regs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/std-regs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/std-regs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Builtin frame register, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stubs/buildvms.com ./gdb/stubs/buildvms.com
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stubs/buildvms.com	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stubs/buildvms.com	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 $! Command to build the gdb stub
 
-$! Copyright (C) 2012-2015 Free Software Foundation, Inc.
+$! Copyright (C) 2012-2017 Free Software Foundation, Inc.
 $!
 $! This file is part of GDB.
 $!
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stubs/ia64vms-stub.c ./gdb/stubs/ia64vms-stub.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stubs/ia64vms-stub.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stubs/ia64vms-stub.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB stub for Itanium OpenVMS
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Tristan Gingold, AdaCore.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stub-termcap.c ./gdb/stub-termcap.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/stub-termcap.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/stub-termcap.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* A very minimal do-nothing termcap emulation stub.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery, LLC.
 
@@ -22,9 +22,7 @@
 
 #include "defs.h"
 
-#ifdef __cplusplus
 extern "C" {
-#endif
 
 /* -Wmissing-prototypes */
 extern int tgetent (char *buffer, char *termtype);
@@ -34,9 +32,7 @@ extern char* tgetstr (char *name, char *
 extern int tputs (char *string, int nlines, int (*outfun) (int));
 extern char *tgoto (const char *cap, int col, int row);
 
-#ifdef __cplusplus
 }
-#endif
 
 /* These globals below are global termcap variables that readline
    references.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-add-flags.h ./gdb/symfile-add-flags.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-add-flags.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/symfile-add-flags.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+/* Definition of symfile add flags.
+
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#if !defined (SYMFILE_ADD_FLAGS_H)
+#define SYMFILE_ADD_FLAGS_H
+
+#include "common/enum-flags.h"
+
+/* This enum encodes bit-flags passed as ADD_FLAGS parameter to
+   symbol_file_add, etc.  Defined in a separate file to break circular
+   header dependencies.  */
+
+enum symfile_add_flag
+  {
+    /* Be chatty about what you are doing.  */
+    SYMFILE_VERBOSE = 1 << 1,
+
+    /* This is the main symbol file (as opposed to symbol file for
+       dynamically loaded code).  */
+    SYMFILE_MAINLINE = 1 << 2,
+
+    /* Do not call breakpoint_re_set when adding this symbol file.  */
+    SYMFILE_DEFER_BP_RESET = 1 << 3,
+
+    /* Do not immediately read symbols for this file.  By default,
+       symbols are read when the objfile is created.  */
+    SYMFILE_NO_READ = 1 << 4
+  };
+
+DEF_ENUM_FLAGS_TYPE (enum symfile_add_flag, symfile_add_flags);
+
+#endif /* !defined(SYMFILE_ADD_FLAGS_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile.c ./gdb/symfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic symbol file reading for the GNU debugger, GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -61,8 +61,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <ctype.h>
-#include <time.h>
-#include <sys/time.h>
+#include <chrono>
 
 #include "psymtab.h"
 
@@ -85,7 +84,8 @@ int readnow_symbol_files;	/* Read full s
 
 static void load_command (char *, int);
 
-static void symbol_file_add_main_1 (const char *args, int from_tty, int flags);
+static void symbol_file_add_main_1 (const char *args, symfile_add_flags add_flags,
+				    objfile_flags flags);
 
 static void add_symbol_file_command (char *, int);
 
@@ -114,12 +114,8 @@ static int simple_read_overlay_table (vo
 
 static int simple_overlay_update_1 (struct obj_section *);
 
-static void add_filename_language (char *ext, enum language lang);
-
 static void info_ext_lang_command (char *args, int from_tty);
 
-static void init_filename_language_table (void);
-
 static void symfile_find_segment_sections (struct objfile *objfile);
 
 void _initialize_symfile (void);
@@ -424,7 +420,7 @@ struct place_section_arg
 static void
 place_section (bfd *abfd, asection *sect, void *obj)
 {
-  struct place_section_arg *arg = obj;
+  struct place_section_arg *arg = (struct place_section_arg *) obj;
   CORE_ADDR *offsets = arg->offsets->offsets, start_addr;
   int done;
   ULONGEST align = ((ULONGEST) 1) << bfd_get_section_alignment (abfd, sect);
@@ -555,7 +551,7 @@ addrs_section_sort (struct section_addr_
   int i;
 
   /* `+ 1' for the NULL terminator.  */
-  array = xmalloc (sizeof (*array) * (addrs->num_sections + 1));
+  array = XNEWVEC (struct other_sections *, addrs->num_sections + 1);
   for (i = 0; i < addrs->num_sections; i++)
     array[i] = &addrs->other[i];
   array[i] = NULL;
@@ -614,8 +610,7 @@ addr_info_make_relative (struct section_
   /* Now create ADDRS_TO_ABFD_ADDRS from ADDRS_SORTED and
      ABFD_ADDRS_SORTED.  */
 
-  addrs_to_abfd_addrs = xzalloc (sizeof (*addrs_to_abfd_addrs)
-				 * addrs->num_sections);
+  addrs_to_abfd_addrs = XCNEWVEC (struct other_sections *, addrs->num_sections);
   make_cleanup (xfree, addrs_to_abfd_addrs);
 
   while (*addrs_sorted)
@@ -870,7 +865,7 @@ default_symfile_segments (bfd *abfd)
    possibly force the partial symbols to be read.  */
 
 static void
-read_symbols (struct objfile *objfile, int add_flags)
+read_symbols (struct objfile *objfile, symfile_add_flags add_flags)
 {
   (*objfile->sf->sym_read) (objfile, add_flags);
   objfile->per_bfd->minsyms_read = 1;
@@ -881,8 +876,7 @@ read_symbols (struct objfile *objfile, i
       && objfile->separate_debug_objfile == NULL
       && objfile->separate_debug_objfile_backlink == NULL)
     {
-      bfd *abfd = find_separate_debug_file_in_section (objfile);
-      struct cleanup *cleanup = make_cleanup_bfd_unref (abfd);
+      gdb_bfd_ref_ptr abfd (find_separate_debug_file_in_section (objfile));
 
       if (abfd != NULL)
 	{
@@ -890,11 +884,9 @@ read_symbols (struct objfile *objfile, i
 	     virtual section-as-bfd like the bfd filename containing the
 	     section.  Therefore use also non-canonical name form for the same
 	     file containing the section.  */
-	  symbol_file_add_separate (abfd, objfile->original_name, add_flags,
-				    objfile);
+	  symbol_file_add_separate (abfd.get (), objfile->original_name,
+				    add_flags, objfile);
 	}
-
-      do_cleanups (cleanup);
     }
   if ((add_flags & SYMFILE_NO_READ) == 0)
     require_partial_symbols (objfile, 0);
@@ -999,7 +991,7 @@ init_entry_point_info (struct objfile *o
 static void
 syms_from_objfile_1 (struct objfile *objfile,
 		     struct section_addr_info *addrs,
-		     int add_flags)
+		     symfile_add_flags add_flags)
 {
   struct section_addr_info *local_addr = NULL;
   struct cleanup *old_chain;
@@ -1016,7 +1008,8 @@ syms_from_objfile_1 (struct objfile *obj
 
       objfile->num_sections = num_sections;
       objfile->section_offsets
-        = obstack_alloc (&objfile->objfile_obstack, size);
+	= (struct section_offsets *) obstack_alloc (&objfile->objfile_obstack,
+						    size);
       memset (objfile->section_offsets, 0, size);
       return;
     }
@@ -1089,7 +1082,7 @@ syms_from_objfile_1 (struct objfile *obj
 static void
 syms_from_objfile (struct objfile *objfile,
 		   struct section_addr_info *addrs,
-		   int add_flags)
+		   symfile_add_flags add_flags)
 {
   syms_from_objfile_1 (objfile, addrs, add_flags);
   init_entry_point_info (objfile);
@@ -1100,7 +1093,7 @@ syms_from_objfile (struct objfile *objfi
    objfile.  ADD_FLAGS is a bitmask of enum symfile_add_flags.  */
 
 static void
-finish_new_objfile (struct objfile *objfile, int add_flags)
+finish_new_objfile (struct objfile *objfile, symfile_add_flags add_flags)
 {
   /* If this is the main symbol file we have to clean up all users of the
      old main symbol file.  Otherwise it is sufficient to fixup all the
@@ -1142,9 +1135,10 @@ finish_new_objfile (struct objfile *objf
    Upon failure, jumps back to command level (never returns).  */
 
 static struct objfile *
-symbol_file_add_with_addrs (bfd *abfd, const char *name, int add_flags,
+symbol_file_add_with_addrs (bfd *abfd, const char *name,
+			    symfile_add_flags add_flags,
 			    struct section_addr_info *addrs,
-			    int flags, struct objfile *parent)
+			    objfile_flags flags, struct objfile *parent)
 {
   struct objfile *objfile;
   const int from_tty = add_flags & SYMFILE_VERBOSE;
@@ -1168,8 +1162,9 @@ symbol_file_add_with_addrs (bfd *abfd, c
       && !query (_("Load new symbol table from \"%s\"? "), name))
     error (_("Not confirmed."));
 
-  objfile = allocate_objfile (abfd, name,
-			      flags | (mainline ? OBJF_MAINLINE : 0));
+  if (mainline)
+    flags |= OBJF_MAINLINE;
+  objfile = allocate_objfile (abfd, name, flags);
 
   if (parent)
     add_separate_debug_objfile (objfile, parent);
@@ -1246,10 +1241,10 @@ symbol_file_add_with_addrs (bfd *abfd, c
    see allocate_objfile's definition.  */
 
 void
-symbol_file_add_separate (bfd *bfd, const char *name, int symfile_flags,
+symbol_file_add_separate (bfd *bfd, const char *name,
+			  symfile_add_flags symfile_flags,
 			  struct objfile *objfile)
 {
-  struct objfile *new_objfile;
   struct section_addr_info *sap;
   struct cleanup *my_cleanup;
 
@@ -1259,7 +1254,7 @@ symbol_file_add_separate (bfd *bfd, cons
   sap = build_section_addr_info_from_objfile (objfile);
   my_cleanup = make_cleanup_free_section_addr_info (sap);
 
-  new_objfile = symbol_file_add_with_addrs
+  symbol_file_add_with_addrs
     (bfd, name, symfile_flags, sap,
      objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW
 		       | OBJF_USERLOADED),
@@ -1273,9 +1268,10 @@ symbol_file_add_separate (bfd *bfd, cons
    See symbol_file_add_with_addrs's comments for details.  */
 
 struct objfile *
-symbol_file_add_from_bfd (bfd *abfd, const char *name, int add_flags,
+symbol_file_add_from_bfd (bfd *abfd, const char *name,
+			  symfile_add_flags add_flags,
                           struct section_addr_info *addrs,
-                          int flags, struct objfile *parent)
+                          objfile_flags flags, struct objfile *parent)
 {
   return symbol_file_add_with_addrs (abfd, name, add_flags, addrs, flags,
 				     parent);
@@ -1285,16 +1281,13 @@ symbol_file_add_from_bfd (bfd *abfd, con
    loaded file.  See symbol_file_add_with_addrs's comments for details.  */
 
 struct objfile *
-symbol_file_add (const char *name, int add_flags,
-		 struct section_addr_info *addrs, int flags)
+symbol_file_add (const char *name, symfile_add_flags add_flags,
+		 struct section_addr_info *addrs, objfile_flags flags)
 {
-  bfd *bfd = symfile_bfd_open (name);
-  struct cleanup *cleanup = make_cleanup_bfd_unref (bfd);
-  struct objfile *objf;
+  gdb_bfd_ref_ptr bfd (symfile_bfd_open (name));
 
-  objf = symbol_file_add_from_bfd (bfd, name, add_flags, addrs, flags, NULL);
-  do_cleanups (cleanup);
-  return objf;
+  return symbol_file_add_from_bfd (bfd.get (), name, add_flags, addrs,
+				   flags, NULL);
 }
 
 /* Call symbol_file_add() with default values and update whatever is
@@ -1306,16 +1299,16 @@ symbol_file_add (const char *name, int a
    command itself.  */
 
 void
-symbol_file_add_main (const char *args, int from_tty)
+symbol_file_add_main (const char *args, symfile_add_flags add_flags)
 {
-  symbol_file_add_main_1 (args, from_tty, 0);
+  symbol_file_add_main_1 (args, add_flags, 0);
 }
 
 static void
-symbol_file_add_main_1 (const char *args, int from_tty, int flags)
+symbol_file_add_main_1 (const char *args, symfile_add_flags add_flags,
+			objfile_flags flags)
 {
-  const int add_flags = (current_inferior ()->symfile_flags
-			 | SYMFILE_MAINLINE | (from_tty ? SYMFILE_VERBOSE : 0));
+  add_flags |= current_inferior ()->symfile_flags | SYMFILE_MAINLINE;
 
   symbol_file_add (args, add_flags, NULL, flags);
 
@@ -1323,7 +1316,7 @@ symbol_file_add_main_1 (const char *args
      what is frameless.  */
   reinit_frame_cache ();
 
-  if ((flags & SYMFILE_NO_READ) == 0)
+  if ((add_flags & SYMFILE_NO_READ) == 0)
     set_initial_language ();
 }
 
@@ -1355,7 +1348,6 @@ separate_debug_file_exists (const char *
 {
   unsigned long file_crc;
   int file_crc_p;
-  bfd *abfd;
   struct stat parent_stat, abfd_stat;
   int verified_as_different;
 
@@ -1368,9 +1360,9 @@ separate_debug_file_exists (const char *
   if (filename_cmp (name, objfile_name (parent_objfile)) == 0)
     return 0;
 
-  abfd = gdb_bfd_open (name, gnutarget, -1);
+  gdb_bfd_ref_ptr abfd (gdb_bfd_open (name, gnutarget, -1));
 
-  if (!abfd)
+  if (abfd == NULL)
     return 0;
 
   /* Verify symlinks were not the cause of filename_cmp name difference above.
@@ -1384,24 +1376,19 @@ separate_debug_file_exists (const char *
      numbers will never set st_ino to zero, this is merely an
      optimization, so we do not need to worry about false negatives.  */
 
-  if (bfd_stat (abfd, &abfd_stat) == 0
+  if (bfd_stat (abfd.get (), &abfd_stat) == 0
       && abfd_stat.st_ino != 0
       && bfd_stat (parent_objfile->obfd, &parent_stat) == 0)
     {
       if (abfd_stat.st_dev == parent_stat.st_dev
 	  && abfd_stat.st_ino == parent_stat.st_ino)
-	{
-	  gdb_bfd_unref (abfd);
-	  return 0;
-	}
+	return 0;
       verified_as_different = 1;
     }
   else
     verified_as_different = 0;
 
-  file_crc_p = gdb_bfd_crc (abfd, &file_crc);
-
-  gdb_bfd_unref (abfd);
+  file_crc_p = gdb_bfd_crc (abfd.get (), &file_crc);
 
   if (!file_crc_p)
     return 0;
@@ -1466,17 +1453,18 @@ find_separate_debug_file (const char *di
   struct cleanup *back_to;
   int ix;
 
-  /* Set I to max (strlen (canon_dir), strlen (dir)).  */
+  /* Set I to std::max (strlen (canon_dir), strlen (dir)).  */
   i = strlen (dir);
   if (canon_dir != NULL && strlen (canon_dir) > i)
     i = strlen (canon_dir);
 
-  debugfile = xmalloc (strlen (debug_file_directory) + 1
-		       + i
-		       + strlen (DEBUG_SUBDIRECTORY)
-		       + strlen ("/")
-		       + strlen (debuglink)
-		       + 1);
+  debugfile
+    = (char *) xmalloc (strlen (debug_file_directory) + 1
+			+ i
+			+ strlen (DEBUG_SUBDIRECTORY)
+			+ strlen ("/")
+			+ strlen (debuglink)
+			+ 1);
 
   /* First try in the same directory as the original file.  */
   strcpy (debugfile, dir);
@@ -1650,10 +1638,14 @@ symbol_file_command (char *args, int fro
   else
     {
       char **argv = gdb_buildargv (args);
-      int flags = OBJF_USERLOADED;
+      objfile_flags flags = OBJF_USERLOADED;
+      symfile_add_flags add_flags = 0;
       struct cleanup *cleanups;
       char *name = NULL;
 
+      if (from_tty)
+	add_flags |= SYMFILE_VERBOSE;
+
       cleanups = make_cleanup_freeargv (argv);
       while (*argv != NULL)
 	{
@@ -1663,7 +1655,7 @@ symbol_file_command (char *args, int fro
 	    error (_("unknown option `%s'"), *argv);
 	  else
 	    {
-	      symbol_file_add_main_1 (*argv, from_tty, flags);
+	      symbol_file_add_main_1 (*argv, add_flags, flags);
 	      name = *argv;
 	    }
 
@@ -1696,7 +1688,7 @@ set_initial_language (void)
   if (lang == language_unknown)
     {
       char *name = main_name ();
-      struct symbol *sym = lookup_symbol (name, NULL, VAR_DOMAIN, NULL);
+      struct symbol *sym = lookup_symbol (name, NULL, VAR_DOMAIN, NULL).symbol;
 
       if (sym != NULL)
 	lang = SYMBOL_LANGUAGE (sym);
@@ -1717,10 +1709,9 @@ set_initial_language (void)
    includes a newly malloc'd` copy of NAME (tilde-expanded and made
    absolute).  In case of trouble, error() is called.  */
 
-bfd *
+gdb_bfd_ref_ptr
 symfile_bfd_open (const char *name)
 {
-  bfd *sym_bfd;
   int desc = -1;
   struct cleanup *back_to = make_cleanup (null_cleanup, 0);
 
@@ -1737,7 +1728,7 @@ symfile_bfd_open (const char *name)
 #if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__)
       if (desc < 0)
 	{
-	  char *exename = alloca (strlen (expanded_name) + 5);
+	  char *exename = (char *) alloca (strlen (expanded_name) + 5);
 
 	  strcat (strcpy (exename, expanded_name), ".exe");
 	  desc = openp (getenv ("PATH"),
@@ -1756,20 +1747,17 @@ symfile_bfd_open (const char *name)
       name = absolute_name;
     }
 
-  sym_bfd = gdb_bfd_open (name, gnutarget, desc);
-  if (!sym_bfd)
+  gdb_bfd_ref_ptr sym_bfd (gdb_bfd_open (name, gnutarget, desc));
+  if (sym_bfd == NULL)
     error (_("`%s': can't open to read symbols: %s."), name,
 	   bfd_errmsg (bfd_get_error ()));
 
-  if (!gdb_bfd_has_target_filename (sym_bfd))
-    bfd_set_cacheable (sym_bfd, 1);
+  if (!gdb_bfd_has_target_filename (sym_bfd.get ()))
+    bfd_set_cacheable (sym_bfd.get (), 1);
 
-  if (!bfd_check_format (sym_bfd, bfd_object))
-    {
-      make_cleanup_bfd_unref (sym_bfd);
-      error (_("`%s': can't read symbols: %s."), name,
-	     bfd_errmsg (bfd_get_error ()));
-    }
+  if (!bfd_check_format (sym_bfd.get (), bfd_object))
+    error (_("`%s': can't read symbols: %s."), name,
+	   bfd_errmsg (bfd_get_error ()));
 
   do_cleanups (back_to);
 
@@ -1861,7 +1849,7 @@ load_command (char *arg, int from_tty)
       if (count)
 	{
 	  /* We need to quote this string so buildargv can pull it apart.  */
-	  char *temp = xmalloc (strlen (arg) + count + 1 );
+	  char *temp = (char *) xmalloc (strlen (arg) + count + 1 );
 	  char *ptemp = temp;
 	  char *prev;
 
@@ -1906,7 +1894,7 @@ static int validate_download = 0;
 static void
 add_section_size_callback (bfd *abfd, asection *asec, void *data)
 {
-  bfd_size_type *sum = data;
+  bfd_size_type *sum = (bfd_size_type *) data;
 
   *sum += bfd_get_section_size (asec);
 }
@@ -1943,7 +1931,8 @@ struct load_progress_section_data {
 static void
 load_progress (ULONGEST bytes, void *untyped_arg)
 {
-  struct load_progress_section_data *args = untyped_arg;
+  struct load_progress_section_data *args
+    = (struct load_progress_section_data *) untyped_arg;
   struct load_progress_data *totals;
 
   if (args == NULL)
@@ -1957,9 +1946,10 @@ load_progress (ULONGEST bytes, void *unt
     {
       /* The write is just starting.  Let the user know we've started
 	 this section.  */
-      ui_out_message (current_uiout, 0, "Loading section %s, size %s lma %s\n",
-		      args->section_name, hex_string (args->section_size),
-		      paddress (target_gdbarch (), args->lma));
+      current_uiout->message ("Loading section %s, size %s lma %s\n",
+			      args->section_name,
+			      hex_string (args->section_size),
+			      paddress (target_gdbarch (), args->lma));
       return;
     }
 
@@ -1972,7 +1962,7 @@ load_progress (ULONGEST bytes, void *unt
 	 might add a verify_memory() method to the target vector and
 	 then use that.  remote.c could implement that method using
 	 the ``qCRC'' packet.  */
-      gdb_byte *check = xmalloc (bytes);
+      gdb_byte *check = (gdb_byte *) xmalloc (bytes);
       struct cleanup *verify_cleanups = make_cleanup (xfree, check);
 
       if (target_read_memory (args->lma, check, bytes) != 0)
@@ -2008,7 +1998,7 @@ static void
 load_section_callback (bfd *abfd, asection *asec, void *data)
 {
   struct memory_write_request *new_request;
-  struct load_section_data *args = data;
+  struct load_section_data *args = (struct load_section_data *) data;
   struct load_progress_section_data *section_data;
   bfd_size_type size = bfd_get_section_size (asec);
   gdb_byte *buffer;
@@ -2023,11 +2013,11 @@ load_section_callback (bfd *abfd, asecti
   new_request = VEC_safe_push (memory_write_request_s,
 			       args->requests, NULL);
   memset (new_request, 0, sizeof (struct memory_write_request));
-  section_data = xcalloc (1, sizeof (struct load_progress_section_data));
+  section_data = XCNEW (struct load_progress_section_data);
   new_request->begin = bfd_section_lma (abfd, asec) + args->load_offset;
   new_request->end = new_request->begin + size; /* FIXME Should size
 						   be in instead?  */
-  new_request->data = xmalloc (size);
+  new_request->data = (gdb_byte *) xmalloc (size);
   new_request->baton = section_data;
 
   buffer = new_request->data;
@@ -2047,7 +2037,7 @@ load_section_callback (bfd *abfd, asecti
 static void
 clear_memory_write_data (void *arg)
 {
-  VEC(memory_write_request_s) **vec_p = arg;
+  VEC(memory_write_request_s) **vec_p = (VEC(memory_write_request_s) **) arg;
   VEC(memory_write_request_s) *vec = *vec_p;
   int i;
   struct memory_write_request *mr;
@@ -2060,11 +2050,14 @@ clear_memory_write_data (void *arg)
   VEC_free (memory_write_request_s, vec);
 }
 
+static void print_transfer_performance (struct ui_file *stream,
+					unsigned long data_count,
+					unsigned long write_count,
+				        std::chrono::steady_clock::duration d);
+
 void
 generic_load (const char *args, int from_tty)
 {
-  bfd *loadfile_bfd;
-  struct timeval start_time, end_time;
   char *filename;
   struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
   struct load_section_data cbdata;
@@ -2105,43 +2098,41 @@ generic_load (const char *args, int from
     }
 
   /* Open the file for loading.  */
-  loadfile_bfd = gdb_bfd_open (filename, gnutarget, -1);
+  gdb_bfd_ref_ptr loadfile_bfd (gdb_bfd_open (filename, gnutarget, -1));
   if (loadfile_bfd == NULL)
     {
       perror_with_name (filename);
       return;
     }
 
-  make_cleanup_bfd_unref (loadfile_bfd);
-
-  if (!bfd_check_format (loadfile_bfd, bfd_object))
+  if (!bfd_check_format (loadfile_bfd.get (), bfd_object))
     {
       error (_("\"%s\" is not an object file: %s"), filename,
 	     bfd_errmsg (bfd_get_error ()));
     }
 
-  bfd_map_over_sections (loadfile_bfd, add_section_size_callback,
+  bfd_map_over_sections (loadfile_bfd.get (), add_section_size_callback,
 			 (void *) &total_progress.total_size);
 
-  bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata);
+  bfd_map_over_sections (loadfile_bfd.get (), load_section_callback, &cbdata);
+
+  using namespace std::chrono;
 
-  gettimeofday (&start_time, NULL);
+  steady_clock::time_point start_time = steady_clock::now ();
 
   if (target_write_memory_blocks (cbdata.requests, flash_discard,
 				  load_progress) != 0)
     error (_("Load failed"));
 
-  gettimeofday (&end_time, NULL);
+  steady_clock::time_point end_time = steady_clock::now ();
 
-  entry = bfd_get_start_address (loadfile_bfd);
+  entry = bfd_get_start_address (loadfile_bfd.get ());
   entry = gdbarch_addr_bits_remove (target_gdbarch (), entry);
-  ui_out_text (uiout, "Start address ");
-  ui_out_field_fmt (uiout, "address", "%s", paddress (target_gdbarch (), entry));
-  ui_out_text (uiout, ", load size ");
-  ui_out_field_fmt (uiout, "load-size", "%lu", total_progress.data_count);
-  ui_out_text (uiout, "\n");
-  /* We were doing this in remote-mips.c, I suspect it is right
-     for other targets too.  */
+  uiout->text ("Start address ");
+  uiout->field_fmt ("address", "%s", paddress (target_gdbarch (), entry));
+  uiout->text (", load size ");
+  uiout->field_fmt ("load-size", "%lu", total_progress.data_count);
+  uiout->text ("\n");
   regcache_write_pc (get_current_regcache (), entry);
 
   /* Reset breakpoints, now that we have changed the load image.  For
@@ -2154,69 +2145,63 @@ generic_load (const char *args, int from
 
   breakpoint_re_set ();
 
-  /* FIXME: are we supposed to call symbol_file_add or not?  According
-     to a comment from remote-mips.c (where a call to symbol_file_add
-     was commented out), making the call confuses GDB if more than one
-     file is loaded in.  Some targets do (e.g., remote-vx.c) but
-     others don't (or didn't - perhaps they have all been deleted).  */
-
   print_transfer_performance (gdb_stdout, total_progress.data_count,
 			      total_progress.write_count,
-			      &start_time, &end_time);
+			      end_time - start_time);
 
   do_cleanups (old_cleanups);
 }
 
-/* Report how fast the transfer went.  */
+/* Report on STREAM the performance of a memory transfer operation,
+   such as 'load'.  DATA_COUNT is the number of bytes transferred.
+   WRITE_COUNT is the number of separate write operations, or 0, if
+   that information is not available.  TIME is how long the operation
+   lasted.  */
 
-void
+static void
 print_transfer_performance (struct ui_file *stream,
 			    unsigned long data_count,
 			    unsigned long write_count,
-			    const struct timeval *start_time,
-			    const struct timeval *end_time)
+			    std::chrono::steady_clock::duration time)
 {
-  ULONGEST time_count;
+  using namespace std::chrono;
   struct ui_out *uiout = current_uiout;
 
-  /* Compute the elapsed time in milliseconds, as a tradeoff between
-     accuracy and overflow.  */
-  time_count = (end_time->tv_sec - start_time->tv_sec) * 1000;
-  time_count += (end_time->tv_usec - start_time->tv_usec) / 1000;
+  milliseconds ms = duration_cast<milliseconds> (time);
 
-  ui_out_text (uiout, "Transfer rate: ");
-  if (time_count > 0)
+  uiout->text ("Transfer rate: ");
+  if (ms.count () > 0)
     {
-      unsigned long rate = ((ULONGEST) data_count * 1000) / time_count;
+      unsigned long rate = ((ULONGEST) data_count * 1000) / ms.count ();
 
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
-	  ui_out_field_fmt (uiout, "transfer-rate", "%lu", rate * 8);
-	  ui_out_text (uiout, " bits/sec");
+	  uiout->field_fmt ("transfer-rate", "%lu", rate * 8);
+	  uiout->text (" bits/sec");
 	}
       else if (rate < 1024)
 	{
-	  ui_out_field_fmt (uiout, "transfer-rate", "%lu", rate);
-	  ui_out_text (uiout, " bytes/sec");
+	  uiout->field_fmt ("transfer-rate", "%lu", rate);
+	  uiout->text (" bytes/sec");
 	}
       else
 	{
-	  ui_out_field_fmt (uiout, "transfer-rate", "%lu", rate / 1024);
-	  ui_out_text (uiout, " KB/sec");
+	  uiout->field_fmt ("transfer-rate", "%lu", rate / 1024);
+	  uiout->text (" KB/sec");
 	}
     }
   else
     {
-      ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8));
-      ui_out_text (uiout, " bits in <1 sec");
+      uiout->field_fmt ("transferred-bits", "%lu", (data_count * 8));
+      uiout->text (" bits in <1 sec");
     }
   if (write_count > 0)
     {
-      ui_out_text (uiout, ", ");
-      ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count);
-      ui_out_text (uiout, " bytes/write");
+      uiout->text (", ");
+      uiout->field_fmt ("write-rate", "%lu", data_count / write_count);
+      uiout->text (" bytes/write");
     }
-  ui_out_text (uiout, ".\n");
+  uiout->text (".\n");
 }
 
 /* This function allows the addition of incrementally linked object files.
@@ -2233,7 +2218,6 @@ add_symbol_file_command (char *args, int
 {
   struct gdbarch *gdbarch = get_current_arch ();
   char *filename = NULL;
-  int flags = OBJF_USERLOADED | OBJF_SHARED;
   char *arg;
   int section_index = 0;
   int argcnt = 0;
@@ -2243,6 +2227,11 @@ add_symbol_file_command (char *args, int
   int expecting_sec_addr = 0;
   char **argv;
   struct objfile *objf;
+  objfile_flags flags = OBJF_USERLOADED | OBJF_SHARED;
+  symfile_add_flags add_flags = 0;
+
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
 
   struct sect_opt
   {
@@ -2256,8 +2245,7 @@ add_symbol_file_command (char *args, int
   struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);
 
   num_sect_opts = 16;
-  sect_opts = (struct sect_opt *) xmalloc (num_sect_opts
-					   * sizeof (struct sect_opt));
+  sect_opts = XNEWVEC (struct sect_opt, num_sect_opts);
 
   dont_repeat ();
 
@@ -2369,8 +2357,7 @@ add_symbol_file_command (char *args, int
   if (from_tty && (!query ("%s", "")))
     error (_("Not confirmed."));
 
-  objf = symbol_file_add (filename, from_tty ? SYMFILE_VERBOSE : 0,
-			  section_addrs, flags);
+  objf = symbol_file_add (filename, add_flags, section_addrs, flags);
 
   add_target_sections_of_objfile (objf);
 
@@ -2390,7 +2377,6 @@ remove_symbol_file_command (char *args, 
   struct objfile *objf = NULL;
   struct cleanup *my_cleanups;
   struct program_space *pspace = current_program_space;
-  struct gdbarch *gdbarch = get_current_arch ();
 
   dont_repeat ();
 
@@ -2564,22 +2550,16 @@ reread_symbols (void)
 
 	  /* Clean up any state BFD has sitting around.  */
 	  {
-	    struct bfd *obfd = objfile->obfd;
+	    gdb_bfd_ref_ptr obfd (objfile->obfd);
 	    char *obfd_filename;
 
 	    obfd_filename = bfd_get_filename (objfile->obfd);
 	    /* Open the new BFD before freeing the old one, so that
 	       the filename remains live.  */
-	    objfile->obfd = gdb_bfd_open (obfd_filename, gnutarget, -1);
+	    gdb_bfd_ref_ptr temp (gdb_bfd_open (obfd_filename, gnutarget, -1));
+	    objfile->obfd = temp.release ();
 	    if (objfile->obfd == NULL)
-	      {
-		/* We have to make a cleanup and error here, rather
-		   than erroring later, because once we unref OBFD,
-		   OBFD_FILENAME will be freed.  */
-		make_cleanup_bfd_unref (obfd);
-		error (_("Can't open %s to read symbols."), obfd_filename);
-	      }
-	    gdb_bfd_unref (obfd);
+	      error (_("Can't open %s to read symbols."), obfd_filename);
 	  }
 
 	  original_name = xstrdup (objfile->original_name);
@@ -2631,9 +2611,9 @@ reread_symbols (void)
 	     do it *after* the obstack has been initialized.  */
 	  set_objfile_per_bfd (objfile);
 
-	  objfile->original_name = obstack_copy0 (&objfile->objfile_obstack,
-						  original_name,
-						  strlen (original_name));
+	  objfile->original_name
+	    = (char *) obstack_copy0 (&objfile->objfile_obstack, original_name,
+				      strlen (original_name));
 
 	  /* Reset the sym_fns pointer.  The ELF reader can change it
 	     based on whether .gdb_index is present, and we need it to
@@ -2722,26 +2702,23 @@ typedef struct
 {
   char *ext;
   enum language lang;
-}
-filename_language;
+} filename_language;
 
-static filename_language *filename_language_table;
-static int fl_table_size, fl_table_next;
+DEF_VEC_O (filename_language);
 
-static void
-add_filename_language (char *ext, enum language lang)
+static VEC (filename_language) *filename_language_table;
+
+/* See symfile.h.  */
+
+void
+add_filename_language (const char *ext, enum language lang)
 {
-  if (fl_table_next >= fl_table_size)
-    {
-      fl_table_size += 10;
-      filename_language_table =
-	xrealloc (filename_language_table,
-		  fl_table_size * sizeof (*filename_language_table));
-    }
+  filename_language entry;
 
-  filename_language_table[fl_table_next].ext = xstrdup (ext);
-  filename_language_table[fl_table_next].lang = lang;
-  fl_table_next++;
+  entry.ext = xstrdup (ext);
+  entry.lang = lang;
+
+  VEC_safe_push (filename_language, filename_language_table, &entry);
 }
 
 static char *ext_args;
@@ -2761,6 +2738,7 @@ set_ext_lang_command (char *args, int fr
   int i;
   char *cp = ext_args;
   enum language lang;
+  filename_language *entry;
 
   /* First arg is filename extension, starting with '.'  */
   if (*cp != '.')
@@ -2790,11 +2768,15 @@ set_ext_lang_command (char *args, int fr
   lang = language_enum (cp);
 
   /* Now lookup the filename extension: do we already know it?  */
-  for (i = 0; i < fl_table_next; i++)
-    if (0 == strcmp (ext_args, filename_language_table[i].ext))
-      break;
+  for (i = 0;
+       VEC_iterate (filename_language, filename_language_table, i, entry);
+       ++i)
+    {
+      if (0 == strcmp (ext_args, entry->ext))
+	break;
+    }
 
-  if (i >= fl_table_next)
+  if (entry == NULL)
     {
       /* New file extension.  */
       add_filename_language (ext_args, lang);
@@ -2807,9 +2789,9 @@ set_ext_lang_command (char *args, int fr
       /*   query ("Really make files of type %s '%s'?", */
       /*          ext_args, language_str (lang));           */
 
-      xfree (filename_language_table[i].ext);
-      filename_language_table[i].ext = xstrdup (ext_args);
-      filename_language_table[i].lang = lang;
+      xfree (entry->ext);
+      entry->ext = xstrdup (ext_args);
+      entry->lang = lang;
     }
 }
 
@@ -2817,76 +2799,33 @@ static void
 info_ext_lang_command (char *args, int from_tty)
 {
   int i;
+  filename_language *entry;
 
   printf_filtered (_("Filename extensions and the languages they represent:"));
   printf_filtered ("\n\n");
-  for (i = 0; i < fl_table_next; i++)
-    printf_filtered ("\t%s\t- %s\n",
-		     filename_language_table[i].ext,
-		     language_str (filename_language_table[i].lang));
-}
-
-static void
-init_filename_language_table (void)
-{
-  if (fl_table_size == 0)	/* Protect against repetition.  */
-    {
-      fl_table_size = 20;
-      fl_table_next = 0;
-      filename_language_table =
-	xmalloc (fl_table_size * sizeof (*filename_language_table));
-      add_filename_language (".c", language_c);
-      add_filename_language (".d", language_d);
-      add_filename_language (".C", language_cplus);
-      add_filename_language (".cc", language_cplus);
-      add_filename_language (".cp", language_cplus);
-      add_filename_language (".cpp", language_cplus);
-      add_filename_language (".cxx", language_cplus);
-      add_filename_language (".c++", language_cplus);
-      add_filename_language (".java", language_java);
-      add_filename_language (".class", language_java);
-      add_filename_language (".m", language_objc);
-      add_filename_language (".f", language_fortran);
-      add_filename_language (".F", language_fortran);
-      add_filename_language (".for", language_fortran);
-      add_filename_language (".FOR", language_fortran);
-      add_filename_language (".ftn", language_fortran);
-      add_filename_language (".FTN", language_fortran);
-      add_filename_language (".fpp", language_fortran);
-      add_filename_language (".FPP", language_fortran);
-      add_filename_language (".f90", language_fortran);
-      add_filename_language (".F90", language_fortran);
-      add_filename_language (".f95", language_fortran);
-      add_filename_language (".F95", language_fortran);
-      add_filename_language (".f03", language_fortran);
-      add_filename_language (".F03", language_fortran);
-      add_filename_language (".f08", language_fortran);
-      add_filename_language (".F08", language_fortran);
-      add_filename_language (".s", language_asm);
-      add_filename_language (".sx", language_asm);
-      add_filename_language (".S", language_asm);
-      add_filename_language (".pas", language_pascal);
-      add_filename_language (".p", language_pascal);
-      add_filename_language (".pp", language_pascal);
-      add_filename_language (".adb", language_ada);
-      add_filename_language (".ads", language_ada);
-      add_filename_language (".a", language_ada);
-      add_filename_language (".ada", language_ada);
-      add_filename_language (".dg", language_ada);
-    }
+  for (i = 0;
+       VEC_iterate (filename_language, filename_language_table, i, entry);
+       ++i)
+    printf_filtered ("\t%s\t- %s\n", entry->ext, language_str (entry->lang));
 }
 
 enum language
 deduce_language_from_filename (const char *filename)
 {
   int i;
-  char *cp;
+  const char *cp;
 
   if (filename != NULL)
     if ((cp = strrchr (filename, '.')) != NULL)
-      for (i = 0; i < fl_table_next; i++)
-	if (strcmp (cp, filename_language_table[i].ext) == 0)
-	  return filename_language_table[i].lang;
+      {
+	filename_language *entry;
+
+	for (i = 0;
+	     VEC_iterate (filename_language, filename_language_table, i, entry);
+	     ++i)
+	  if (strcmp (cp, entry->ext) == 0)
+	    return entry->lang;
+      }
 
   return language_unknown;
 }
@@ -2901,7 +2840,8 @@ allocate_symtab (struct compunit_symtab 
   struct symtab *symtab
     = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab);
 
-  symtab->filename = bcache (filename, strlen (filename) + 1,
+  symtab->filename
+    = (const char *) bcache (filename, strlen (filename) + 1,
 			     objfile->per_bfd->filename_cache);
   symtab->fullname = NULL;
   symtab->language = deduce_language_from_filename (filename);
@@ -2963,8 +2903,9 @@ allocate_compunit_symtab (struct objfile
      Just save the basename to avoid path issues (too long for display,
      relative vs absolute, etc.).  */
   saved_name = lbasename (name);
-  cu->name = obstack_copy0 (&objfile->objfile_obstack, saved_name,
-			    strlen (saved_name));
+  cu->name
+    = (const char *) obstack_copy0 (&objfile->objfile_obstack, saved_name,
+				    strlen (saved_name));
 
   COMPUNIT_DEBUGFORMAT (cu) = "unknown";
 
@@ -2989,11 +2930,11 @@ add_compunit_symtab_to_objfile (struct c
 }
 
 
-/* Reset all data structures in gdb which may contain references to symbol
-   table data.  ADD_FLAGS is a bitmask of enum symfile_add_flags.  */
+/* Reset all data structures in gdb which may contain references to
+   symbol table data.  */
 
 void
-clear_symtab_users (int add_flags)
+clear_symtab_users (symfile_add_flags add_flags)
 {
   /* Someday, we should do better than this, by only blowing away
      the things that really need to be blown.  */
@@ -3290,19 +3231,21 @@ find_pc_overlay (CORE_ADDR pc)
   struct obj_section *osect, *best_match = NULL;
 
   if (overlay_debugging)
-    ALL_OBJSECTIONS (objfile, osect)
-      if (section_is_overlay (osect))
-      {
-	if (pc_in_mapped_range (pc, osect))
+    {
+      ALL_OBJSECTIONS (objfile, osect)
+	if (section_is_overlay (osect))
 	  {
-	    if (section_is_mapped (osect))
-	      return osect;
-	    else
+	    if (pc_in_mapped_range (pc, osect))
+	      {
+		if (section_is_mapped (osect))
+		  return osect;
+		else
+		  best_match = osect;
+	      }
+	    else if (pc_in_unmapped_range (pc, osect))
 	      best_match = osect;
 	  }
-	else if (pc_in_unmapped_range (pc, osect))
-	  best_match = osect;
-      }
+    }
   return best_match;
 }
 
@@ -3317,9 +3260,11 @@ find_pc_mapped_section (CORE_ADDR pc)
   struct obj_section *osect;
 
   if (overlay_debugging)
-    ALL_OBJSECTIONS (objfile, osect)
-      if (pc_in_mapped_range (pc, osect) && section_is_mapped (osect))
-	return osect;
+    {
+      ALL_OBJSECTIONS (objfile, osect)
+	if (pc_in_mapped_range (pc, osect) && section_is_mapped (osect))
+	  return osect;
+    }
 
   return NULL;
 }
@@ -3335,31 +3280,33 @@ list_overlays_command (char *args, int f
   struct obj_section *osect;
 
   if (overlay_debugging)
-    ALL_OBJSECTIONS (objfile, osect)
+    {
+      ALL_OBJSECTIONS (objfile, osect)
       if (section_is_mapped (osect))
-      {
-	struct gdbarch *gdbarch = get_objfile_arch (objfile);
-	const char *name;
-	bfd_vma lma, vma;
-	int size;
-
-	vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section);
-	lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section);
-	size = bfd_get_section_size (osect->the_bfd_section);
-	name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
-
-	printf_filtered ("Section %s, loaded at ", name);
-	fputs_filtered (paddress (gdbarch, lma), gdb_stdout);
-	puts_filtered (" - ");
-	fputs_filtered (paddress (gdbarch, lma + size), gdb_stdout);
-	printf_filtered (", mapped at ");
-	fputs_filtered (paddress (gdbarch, vma), gdb_stdout);
-	puts_filtered (" - ");
-	fputs_filtered (paddress (gdbarch, vma + size), gdb_stdout);
-	puts_filtered ("\n");
+	{
+	  struct gdbarch *gdbarch = get_objfile_arch (objfile);
+	  const char *name;
+	  bfd_vma lma, vma;
+	  int size;
+
+	  vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section);
+	  lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section);
+	  size = bfd_get_section_size (osect->the_bfd_section);
+	  name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
+
+	  printf_filtered ("Section %s, loaded at ", name);
+	  fputs_filtered (paddress (gdbarch, lma), gdb_stdout);
+	  puts_filtered (" - ");
+	  fputs_filtered (paddress (gdbarch, lma + size), gdb_stdout);
+	  printf_filtered (", mapped at ");
+	  fputs_filtered (paddress (gdbarch, vma), gdb_stdout);
+	  puts_filtered (" - ");
+	  fputs_filtered (paddress (gdbarch, vma + size), gdb_stdout);
+	  puts_filtered ("\n");
 
-	nmapped++;
-      }
+	  nmapped++;
+	}
+    }
   if (nmapped == 0)
     printf_filtered (_("No sections are mapped.\n"));
 }
@@ -3518,12 +3465,12 @@ overlay_command (char *args, int from_tt
    In this simple implementation, the target data structures are as follows:
    unsigned _novlys;            /# number of overlay sections #/
    unsigned _ovly_table[_novlys][4] = {
-   {VMA, SIZE, LMA, MAPPED},    /# one entry per overlay section #/
+   {VMA, OSIZE, LMA, MAPPED},    /# one entry per overlay section #/
    {..., ...,  ..., ...},
    }
    unsigned _novly_regions;     /# number of overlay regions #/
    unsigned _ovly_region_table[_novly_regions][3] = {
-   {VMA, SIZE, MAPPED_TO_LMA},  /# one entry per overlay region #/
+   {VMA, OSIZE, MAPPED_TO_LMA},  /# one entry per overlay region #/
    {..., ...,  ...},
    }
    These functions will attempt to update GDB's mappedness state in the
@@ -3541,7 +3488,7 @@ static unsigned cache_novlys = 0;
 static CORE_ADDR cache_ovly_table_base = 0;
 enum ovly_index
   {
-    VMA, SIZE, LMA, MAPPED
+    VMA, OSIZE, LMA, MAPPED
   };
 
 /* Throw away the cached copy of _ovly_table.  */
@@ -3564,7 +3511,7 @@ read_target_long_array (CORE_ADDR memadd
 			int len, int size, enum bfd_endian byte_order)
 {
   /* FIXME (alloca): Not safe if array is very large.  */
-  gdb_byte *buf = alloca (len * size);
+  gdb_byte *buf = (gdb_byte *) alloca (len * size);
   int i;
 
   read_memory (memaddr, buf, len * size);
@@ -3610,7 +3557,7 @@ simple_read_overlay_table (void)
   cache_novlys = read_memory_integer (BMSYMBOL_VALUE_ADDRESS (novlys_msym),
 				      4, byte_order);
   cache_ovly_table
-    = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table));
+    = (unsigned int (*)[4]) xmalloc (cache_novlys * sizeof (*cache_ovly_table));
   cache_ovly_table_base = BMSYMBOL_VALUE_ADDRESS (ovly_table_msym);
   read_target_long_array (cache_ovly_table_base,
                           (unsigned int *) cache_ovly_table,
@@ -3630,25 +3577,22 @@ simple_read_overlay_table (void)
 static int
 simple_overlay_update_1 (struct obj_section *osect)
 {
-  int i, size;
+  int i;
   bfd *obfd = osect->objfile->obfd;
   asection *bsect = osect->the_bfd_section;
   struct gdbarch *gdbarch = get_objfile_arch (osect->objfile);
   int word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
-  size = bfd_get_section_size (osect->the_bfd_section);
   for (i = 0; i < cache_novlys; i++)
     if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
-	&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
-	/* && cache_ovly_table[i][SIZE] == size */ )
+	&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
       {
 	read_target_long_array (cache_ovly_table_base + i * word_size,
 				(unsigned int *) cache_ovly_table[i],
 				4, word_size, byte_order);
 	if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
-	    && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
-	    /* && cache_ovly_table[i][SIZE] == size */ )
+	    && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
 	  {
 	    osect->ovly_mapped = cache_ovly_table[i][MAPPED];
 	    return 1;
@@ -3706,15 +3650,13 @@ simple_overlay_update (struct obj_sectio
   ALL_OBJSECTIONS (objfile, osect)
     if (section_is_overlay (osect))
     {
-      int i, size;
+      int i;
       bfd *obfd = osect->objfile->obfd;
       asection *bsect = osect->the_bfd_section;
 
-      size = bfd_get_section_size (bsect);
       for (i = 0; i < cache_novlys; i++)
 	if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
-	    && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
-	    /* && cache_ovly_table[i][SIZE] == size */ )
+	    && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect))
 	  { /* obj_section matches i'th entry in ovly_table.  */
 	    osect->ovly_mapped = cache_ovly_table[i][MAPPED];
 	    break;		/* finished with inner for loop: break out.  */
@@ -3914,11 +3856,11 @@ symfile_free_objfile (struct objfile *ob
    See quick_symbol_functions.expand_symtabs_matching for details.  */
 
 void
-expand_symtabs_matching (expand_symtabs_file_matcher_ftype *file_matcher,
-			 expand_symtabs_symbol_matcher_ftype *symbol_matcher,
-			 expand_symtabs_exp_notify_ftype *expansion_notify,
-			 enum search_domain kind,
-			 void *data)
+expand_symtabs_matching
+  (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+   enum search_domain kind)
 {
   struct objfile *objfile;
 
@@ -3927,8 +3869,7 @@ expand_symtabs_matching (expand_symtabs_
     if (objfile->sf)
       objfile->sf->qf->expand_symtabs_matching (objfile, file_matcher,
 						symbol_matcher,
-						expansion_notify, kind,
-						data);
+						expansion_notify, kind);
   }
 }
 
@@ -3985,7 +3926,10 @@ that lies within the boundaries of this 
   c = add_cmd ("load", class_files, load_command, _("\
 Dynamically load FILE into the running program, and record its symbols\n\
 for access from GDB.\n\
-A load OFFSET may also be given."), &cmdlist);
+An optional load OFFSET may also be given as a literal address.\n\
+When OFFSET is provided, FILE must also be provided.  FILE can be provided\n\
+on its own.\n\
+Usage: load [FILE] [OFFSET]"), &cmdlist);
   set_cmd_completer (c, filename_completer);
 
   add_prefix_cmd ("overlay", class_support, overlay_command,
@@ -4014,7 +3958,6 @@ A load OFFSET may also be given."), &cmd
 	   _("Read the overlay mapping state from the target."), &overlaylist);
 
   /* Filename extension to source language lookup table: */
-  init_filename_language_table ();
   add_setshow_string_noescape_cmd ("extension-language", class_files,
 				   &ext_args, _("\
 Set mapping between filename extension and source language."), _("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-debug.c ./gdb/symfile-debug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-debug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symfile-debug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Debug logging for the symbol file functions for the GNU debugger, GDB.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -72,8 +72,9 @@ debug_symtab_name (struct symtab *symtab
 static int
 debug_qf_has_symbols (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   int retval;
 
   retval = debug_data->real_sf->qf->has_symbols (objfile);
@@ -87,8 +88,9 @@ debug_qf_has_symbols (struct objfile *ob
 static struct symtab *
 debug_qf_find_last_source_symtab (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   struct symtab *retval;
 
   fprintf_filtered (gdb_stdlog, "qf->find_last_source_symtab (%s)\n",
@@ -105,8 +107,9 @@ debug_qf_find_last_source_symtab (struct
 static void
 debug_qf_forget_cached_source_info (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "qf->forget_cached_source_info (%s)\n",
 		    objfile_debug_name (objfile));
@@ -114,27 +117,23 @@ debug_qf_forget_cached_source_info (stru
   debug_data->real_sf->qf->forget_cached_source_info (objfile);
 }
 
-static int
-debug_qf_map_symtabs_matching_filename (struct objfile *objfile,
-					const char *name,
-					const char *real_path,
-					int (*callback) (struct symtab *,
-							 void *),
-					void *data)
+static bool
+debug_qf_map_symtabs_matching_filename
+  (struct objfile *objfile, const char *name, const char *real_path,
+   gdb::function_view<bool (symtab *)> callback)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
-  int retval;
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog,
-		    "qf->map_symtabs_matching_filename (%s, \"%s\", \"%s\", %s, %s)\n",
+		    "qf->map_symtabs_matching_filename (%s, \"%s\", \"%s\", %s)\n",
 		    objfile_debug_name (objfile), name,
 		    real_path ? real_path : NULL,
-		    host_address_to_string (callback),
-		    host_address_to_string (data));
+		    host_address_to_string (&callback));
 
-  retval = debug_data->real_sf->qf->map_symtabs_matching_filename
-    (objfile, name, real_path, callback, data);
+  bool retval = (debug_data->real_sf->qf->map_symtabs_matching_filename
+		 (objfile, name, real_path, callback));
 
   fprintf_filtered (gdb_stdlog,
 		    "qf->map_symtabs_matching_filename (...) = %d\n",
@@ -147,8 +146,9 @@ static struct compunit_symtab *
 debug_qf_lookup_symbol (struct objfile *objfile, int kind, const char *name,
 			domain_enum domain)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   struct compunit_symtab *retval;
 
   fprintf_filtered (gdb_stdlog,
@@ -170,8 +170,9 @@ debug_qf_lookup_symbol (struct objfile *
 static void
 debug_qf_print_stats (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "qf->print_stats (%s)\n",
 		    objfile_debug_name (objfile));
@@ -182,8 +183,9 @@ debug_qf_print_stats (struct objfile *ob
 static void
 debug_qf_dump (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "qf->dump (%s)\n",
 		    objfile_debug_name (objfile));
@@ -196,8 +198,9 @@ debug_qf_relocate (struct objfile *objfi
 		   const struct section_offsets *new_offsets,
 		   const struct section_offsets *delta)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "qf->relocate (%s, %s, %s)\n",
 		    objfile_debug_name (objfile),
@@ -211,8 +214,9 @@ static void
 debug_qf_expand_symtabs_for_function (struct objfile *objfile,
 				      const char *func_name)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog,
 		    "qf->expand_symtabs_for_function (%s, \"%s\")\n",
@@ -224,8 +228,9 @@ debug_qf_expand_symtabs_for_function (st
 static void
 debug_qf_expand_all_symtabs (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "qf->expand_all_symtabs (%s)\n",
 		    objfile_debug_name (objfile));
@@ -237,8 +242,9 @@ static void
 debug_qf_expand_symtabs_with_fullname (struct objfile *objfile,
 				       const char *fullname)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog,
 		    "qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
@@ -257,8 +263,9 @@ debug_qf_map_matching_symbols (struct ob
 			       symbol_compare_ftype *match,
 			       symbol_compare_ftype *ordered_compare)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog,
 		    "qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s, %s, %s)\n",
@@ -279,28 +286,28 @@ debug_qf_map_matching_symbols (struct ob
 static void
 debug_qf_expand_symtabs_matching
   (struct objfile *objfile,
-   expand_symtabs_file_matcher_ftype *file_matcher,
-   expand_symtabs_symbol_matcher_ftype *symbol_matcher,
-   expand_symtabs_exp_notify_ftype *expansion_notify,
-   enum search_domain kind, void *data)
+   gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+   enum search_domain kind)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog,
-		    "qf->expand_symtabs_matching (%s, %s, %s, %s, %s, %s)\n",
+		    "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n",
 		    objfile_debug_name (objfile),
-		    host_address_to_string (file_matcher),
-		    host_address_to_string (symbol_matcher),
-		    host_address_to_string (expansion_notify),
-		    search_domain_name (kind),
-		    host_address_to_string (data));
+		    host_address_to_string (&file_matcher),
+		    host_address_to_string (&symbol_matcher),
+		    host_address_to_string (&expansion_notify),
+		    search_domain_name (kind));
 
   debug_data->real_sf->qf->expand_symtabs_matching (objfile,
 						    file_matcher,
 						    symbol_matcher,
 						    expansion_notify,
-						    kind, data);
+						    kind);
 }
 
 static struct compunit_symtab *
@@ -310,8 +317,9 @@ debug_qf_find_pc_sect_compunit_symtab (s
 				       struct obj_section *section,
 				       int warn_if_readin)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   struct compunit_symtab *retval;
 
   fprintf_filtered (gdb_stdlog,
@@ -341,8 +349,9 @@ debug_qf_map_symbol_filenames (struct ob
 			       symbol_filename_ftype *fun, void *data,
 			       int need_fullname)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   fprintf_filtered (gdb_stdlog,
 		    "qf->map_symbol_filenames (%s, %s, %s, %d)\n",
 		    objfile_debug_name (objfile),
@@ -378,8 +387,9 @@ static const struct quick_symbol_functio
 static VEC (probe_p) *
 debug_sym_get_probes (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   VEC (probe_p) *retval;
 
   retval = debug_data->real_sf->sym_probe_fns->sym_get_probes (objfile);
@@ -402,8 +412,9 @@ static const struct sym_probe_fns debug_
 static void
 debug_sym_new_init (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_new_init (%s)\n",
 		    objfile_debug_name (objfile));
@@ -414,8 +425,9 @@ debug_sym_new_init (struct objfile *objf
 static void
 debug_sym_init (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_init (%s)\n",
 		    objfile_debug_name (objfile));
@@ -424,13 +436,14 @@ debug_sym_init (struct objfile *objfile)
 }
 
 static void
-debug_sym_read (struct objfile *objfile, int symfile_flags)
+debug_sym_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n",
-		    objfile_debug_name (objfile), symfile_flags);
+		    objfile_debug_name (objfile), (unsigned) symfile_flags);
 
   debug_data->real_sf->sym_read (objfile, symfile_flags);
 }
@@ -438,8 +451,9 @@ debug_sym_read (struct objfile *objfile,
 static void
 debug_sym_read_psymbols (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_read_psymbols (%s)\n",
 		    objfile_debug_name (objfile));
@@ -450,8 +464,9 @@ debug_sym_read_psymbols (struct objfile 
 static void
 debug_sym_finish (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_finish (%s)\n",
 		    objfile_debug_name (objfile));
@@ -463,8 +478,9 @@ static void
 debug_sym_offsets (struct objfile *objfile,
 		   const struct section_addr_info *info)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_offsets (%s, %s)\n",
 		    objfile_debug_name (objfile),
@@ -485,8 +501,9 @@ debug_sym_segments (bfd *abfd)
 static void
 debug_sym_read_linetable (struct objfile *objfile)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
 
   fprintf_filtered (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
 		    objfile_debug_name (objfile));
@@ -497,8 +514,9 @@ debug_sym_read_linetable (struct objfile
 static bfd_byte *
 debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
 {
-  const struct debug_sym_fns_data *debug_data =
-    objfile_data (objfile, symfile_debug_objfile_data_key);
+  const struct debug_sym_fns_data *debug_data
+    = ((const struct debug_sym_fns_data *)
+       objfile_data (objfile, symfile_debug_objfile_data_key));
   bfd_byte *retval;
 
   retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf);
@@ -597,7 +615,8 @@ uninstall_symfile_debug_logging (struct 
   /* The debug versions should be currently installed.  */
   gdb_assert (symfile_debug_installed (objfile));
 
-  debug_data = objfile_data (objfile, symfile_debug_objfile_data_key);
+  debug_data = ((struct debug_sym_fns_data *)
+		objfile_data (objfile, symfile_debug_objfile_data_key));
 
   objfile->sf = debug_data->real_sf;
   xfree (debug_data);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile.h ./gdb/symfile.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symfile.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for reading symbol files into GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,10 @@
 /* This file requires that you first include "bfd.h".  */
 #include "symtab.h"
 #include "probe.h"
+#include "symfile-add-flags.h"
+#include "objfile-flags.h"
+#include "gdb_bfd.h"
+#include "common/function-view.h"
 
 /* Opaque declarations.  */
 struct target_section;
@@ -130,20 +134,18 @@ typedef void (symbol_filename_ftype) (co
 /* Callback for quick_symbol_functions->expand_symtabs_matching
    to match a file name.  */
 
-typedef int (expand_symtabs_file_matcher_ftype) (const char *filename,
-						 void *data, int basenames);
+typedef bool (expand_symtabs_file_matcher_ftype) (const char *filename,
+						  bool basenames);
 
 /* Callback for quick_symbol_functions->expand_symtabs_matching
    to match a symbol name.  */
 
-typedef int (expand_symtabs_symbol_matcher_ftype) (const char *name,
-						   void *data);
+typedef bool (expand_symtabs_symbol_matcher_ftype) (const char *name);
 
 /* Callback for quick_symbol_functions->expand_symtabs_matching
    to be called after a symtab has been expanded.  */
 
-typedef void (expand_symtabs_exp_notify_ftype) \
-  (struct compunit_symtab *symtab, void *data);
+typedef void (expand_symtabs_exp_notify_ftype) (compunit_symtab *symtab);
 
 /* The "quick" symbol functions exist so that symbol readers can
    avoiding an initial read of all the symbols.  For example, symbol
@@ -186,14 +188,11 @@ struct quick_symbol_functions
 
      If a match is found, the "partial" symbol table is expanded.
      Then, this calls iterate_over_some_symtabs (or equivalent) over
-     all newly-created symbol tables, passing CALLBACK and DATA to it.
+     all newly-created symbol tables, passing CALLBACK to it.
      The result of this call is returned.  */
-  int (*map_symtabs_matching_filename) (struct objfile *objfile,
-					const char *name,
-					const char *real_path,
-					int (*callback) (struct symtab *,
-							 void *),
-					void *data);
+  bool (*map_symtabs_matching_filename)
+    (struct objfile *objfile, const char *name, const char *real_path,
+     gdb::function_view<bool (symtab *)> callback);
 
   /* Check to see if the symbol is defined in a "partial" symbol table
      of OBJFILE.  BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK,
@@ -269,30 +268,27 @@ struct quick_symbol_functions
   /* Expand all symbol tables in OBJFILE matching some criteria.
 
      FILE_MATCHER is called for each file in OBJFILE.  The file name
-     and the DATA argument are passed to it.  If it returns zero, this
-     file is skipped.  If FILE_MATCHER is NULL such file is not skipped.
-     If BASENAMES is non-zero the function should consider only base name of
-     DATA (passed file name is already only the lbasename part).
+     is passed to it.  If the matcher returns false, the file is
+     skipped.  If FILE_MATCHER is NULL the file is not skipped.  If
+     BASENAMES is true the matcher should consider only file base
+     names (the passed file name is already only the lbasename'd
+     part).
 
-     Otherwise, if KIND does not match this symbol is skipped.
+     Otherwise, if KIND does not match, this symbol is skipped.
 
-     If even KIND matches, then SYMBOL_MATCHER is called for each symbol
-     defined in the file.  The symbol "search" name and DATA are passed
-     to SYMBOL_MATCHER.
+     If even KIND matches, SYMBOL_MATCHER is called for each symbol
+     defined in the file.  The symbol "search" name is passed to
+     SYMBOL_MATCHER.
 
-     If SYMBOL_MATCHER returns zero, then this symbol is skipped.
+     If SYMBOL_MATCHER returns false, then the symbol is skipped.
 
-     Otherwise, this symbol's symbol table is expanded.
-
-     DATA is user data that is passed unmodified to the callback
-     functions.  */
+     Otherwise, the symbol's symbol table is expanded.  */
   void (*expand_symtabs_matching)
     (struct objfile *objfile,
-     expand_symtabs_file_matcher_ftype *file_matcher,
-     expand_symtabs_symbol_matcher_ftype *symbol_matcher,
-     expand_symtabs_exp_notify_ftype *expansion_notify,
-     enum search_domain kind,
-     void *data);
+     gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+     gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+     gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+     enum search_domain kind);
 
   /* Return the comp unit from OBJFILE that contains PC and
      SECTION.  Return NULL if there is no such compunit.  This
@@ -347,7 +343,7 @@ struct sym_fns
      file we are reading.  SYMFILE_FLAGS are the flags passed to
      symbol_file_add & co.  */
 
-  void (*sym_read) (struct objfile *, int);
+  void (*sym_read) (struct objfile *, symfile_add_flags);
 
   /* Read the partial symbols for an objfile.  This may be NULL, in which case
      gdb has to check other ways if this objfile has any symbols.  This may
@@ -436,38 +432,23 @@ extern void add_compunit_symtab_to_objfi
 
 extern void add_symtab_fns (enum bfd_flavour flavour, const struct sym_fns *);
 
-extern void clear_symtab_users (int add_flags);
+extern void clear_symtab_users (symfile_add_flags add_flags);
 
 extern enum language deduce_language_from_filename (const char *);
 
-/* This enum encodes bit-flags passed as ADD_FLAGS parameter to
-   symbol_file_add, etc.  */
-
-enum symfile_add_flags
-  {
-    /* Be chatty about what you are doing.  */
-    SYMFILE_VERBOSE = 1 << 1,
-
-    /* This is the main symbol file (as opposed to symbol file for dynamically
-       loaded code).  */
-    SYMFILE_MAINLINE = 1 << 2,
-
-    /* Do not call breakpoint_re_set when adding this symbol file.  */
-    SYMFILE_DEFER_BP_RESET = 1 << 3,
-
-    /* Do not immediately read symbols for this file.  By default,
-       symbols are read when the objfile is created.  */
-    SYMFILE_NO_READ = 1 << 4
-  };
+/* Map the filename extension EXT to the language LANG.  Any previous
+   association of EXT will be removed.  EXT will be copied by this
+   function.  */
+extern void add_filename_language (const char *ext, enum language lang);
 
-extern struct objfile *symbol_file_add (const char *, int,
-					struct section_addr_info *, int);
+extern struct objfile *symbol_file_add (const char *, symfile_add_flags,
+					struct section_addr_info *, objfile_flags);
 
-extern struct objfile *symbol_file_add_from_bfd (bfd *, const char *, int,
+extern struct objfile *symbol_file_add_from_bfd (bfd *, const char *, symfile_add_flags,
                                                  struct section_addr_info *,
-                                                 int, struct objfile *parent);
+                                                 objfile_flags, struct objfile *parent);
 
-extern void symbol_file_add_separate (bfd *, const char *, int,
+extern void symbol_file_add_separate (bfd *, const char *, symfile_add_flags,
 				      struct objfile *);
 
 extern char *find_separate_debug_file_by_debuglink (struct objfile *);
@@ -512,7 +493,7 @@ extern void set_initial_language (void);
 
 extern void find_lowest_section (bfd *, asection *, void *);
 
-extern bfd *symfile_bfd_open (const char *);
+extern gdb_bfd_ref_ptr symfile_bfd_open (const char *);
 
 extern int get_section_index (struct objfile *, char *);
 
@@ -556,7 +537,8 @@ extern CORE_ADDR overlay_unmapped_addres
 extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
 
 /* Load symbols from a file.  */
-extern void symbol_file_add_main (const char *args, int from_tty);
+extern void symbol_file_add_main (const char *args,
+				  symfile_add_flags add_flags);
 
 /* Clear GDB symbol tables.  */
 extern void symbol_file_clear (int from_tty);
@@ -576,10 +558,11 @@ void free_symfile_segment_data (struct s
 
 extern struct cleanup *increment_reading_symtab (void);
 
-void expand_symtabs_matching (expand_symtabs_file_matcher_ftype *,
-			      expand_symtabs_symbol_matcher_ftype *,
-			      expand_symtabs_exp_notify_ftype *,
-			      enum search_domain kind, void *data);
+void expand_symtabs_matching
+  (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+   enum search_domain kind);
 
 void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
 			   int need_fullname);
@@ -611,10 +594,13 @@ struct dwarf2_debug_sections {
   struct dwarf2_section_names abbrev;
   struct dwarf2_section_names line;
   struct dwarf2_section_names loc;
+  struct dwarf2_section_names loclists;
   struct dwarf2_section_names macinfo;
   struct dwarf2_section_names macro;
   struct dwarf2_section_names str;
+  struct dwarf2_section_names line_str;
   struct dwarf2_section_names ranges;
+  struct dwarf2_section_names rnglists;
   struct dwarf2_section_names types;
   struct dwarf2_section_names addr;
   struct dwarf2_section_names frame;
@@ -647,7 +633,8 @@ void dwarf2_free_objfile (struct objfile
 
 /* From mdebugread.c */
 
-extern void mdebug_build_psymtabs (struct objfile *,
+extern void mdebug_build_psymtabs (minimal_symbol_reader &,
+				   struct objfile *,
 				   const struct ecoff_debug_swap *,
 				   struct ecoff_debug_info *);
 
@@ -657,6 +644,6 @@ extern void elfmdebug_build_psymtabs (st
 
 /* From minidebug.c.  */
 
-extern bfd *find_separate_debug_file_in_section (struct objfile *);
+extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *);
 
 #endif /* !defined(SYMFILE_H) */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-mem.c ./gdb/symfile-mem.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symfile-mem.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symfile-mem.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Reading symbol files from memory.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -91,6 +91,7 @@ symbol_file_add_from_memory (struct bfd 
   struct section_addr_info *sai;
   unsigned int i;
   struct cleanup *cleanup;
+  symfile_add_flags add_flags = 0;
 
   if (bfd_get_flavour (templ) != bfd_target_elf_flavour)
     error (_("add-symbol-file-from-memory not supported for this target"));
@@ -101,20 +102,21 @@ symbol_file_add_from_memory (struct bfd 
     error (_("Failed to read a valid object file image from memory."));
 
   gdb_bfd_ref (nbfd);
+  /* Manage the new reference for the duration of this function.  */
+  gdb_bfd_ref_ptr nbfd_holder (nbfd);
+
   xfree (bfd_get_filename (nbfd));
   if (name == NULL)
     nbfd->filename = xstrdup ("shared object read from target memory");
   else
     nbfd->filename = name;
 
-  cleanup = make_cleanup_bfd_unref (nbfd);
-
   if (!bfd_check_format (nbfd, bfd_object))
     error (_("Got object file from memory but can't read symbols: %s."),
 	   bfd_errmsg (bfd_get_error ()));
 
   sai = alloc_section_addr_info (bfd_count_sections (nbfd));
-  make_cleanup (xfree, sai);
+  cleanup = make_cleanup (xfree, sai);
   i = 0;
   for (sec = nbfd->sections; sec != NULL; sec = sec->next)
     if ((bfd_get_section_flags (nbfd, sec) & (SEC_ALLOC|SEC_LOAD)) != 0)
@@ -126,9 +128,11 @@ symbol_file_add_from_memory (struct bfd 
       }
   sai->num_sections = i;
 
+  if (from_tty)
+    add_flags |= SYMFILE_VERBOSE;
+
   objf = symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd),
-				   from_tty ? SYMFILE_VERBOSE : 0,
-                                   sai, OBJF_SHARED, NULL);
+				   add_flags, sai, OBJF_SHARED, NULL);
 
   add_target_sections_of_objfile (objf);
 
@@ -180,7 +184,8 @@ struct symbol_file_add_from_memory_args
 static int
 symbol_file_add_from_memory_wrapper (struct ui_out *uiout, void *data)
 {
-  struct symbol_file_add_from_memory_args *args = data;
+  struct symbol_file_add_from_memory_args *args
+    = (struct symbol_file_add_from_memory_args *) data;
 
   symbol_file_add_from_memory (args->bfd, args->sysinfo_ehdr, args->size,
 			       args->name, args->from_tty);
@@ -213,8 +218,7 @@ add_vsyscall_page (struct target_ops *ta
 	  format should fix this.  */
 	{
 	  warning (_("Could not load vsyscall page "
-		     "because no executable was specified\n"
-		     "try using the \"file\" command first."));
+		     "because no executable was specified"));
 	  return;
 	}
       args.bfd = bfd;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symmisc.c ./gdb/symmisc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symmisc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symmisc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,10 +40,6 @@
 
 #include "psymtab.h"
 
-#ifndef DEV_TTY
-#define DEV_TTY "/dev/tty"
-#endif
-
 /* Unfortunately for debugging, stderr is usually a macro.  This is painful
    when calling functions that take FILE *'s from the debugger.
    So we make a variable which has the same value and which is accessible when
@@ -139,7 +135,7 @@ print_objfile_statistics (void)
                      blockvectors);
 
     if (OBJSTAT (objfile, sz_strtab) > 0)
-      printf_filtered (_("  Space used by a.out string tables: %d\n"),
+      printf_filtered (_("  Space used by string tables: %d\n"),
 		       OBJSTAT (objfile, sz_strtab));
     printf_filtered (_("  Total memory used for objfile obstack: %s\n"),
 		     pulongest (obstack_memory_used (&objfile
@@ -282,9 +278,9 @@ dump_msymbols (struct objfile *objfile, 
 }
 
 static void
-dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
-	       struct ui_file *outfile)
+dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
 {
+  struct objfile *objfile = SYMTAB_OBJFILE (symtab);
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   int i;
   struct dict_iterator iter;
@@ -377,13 +373,17 @@ dump_symtab_1 (struct objfile *objfile, 
     }
   else
     {
-      fprintf_filtered (outfile, "\nBlockvector same as previous symtab\n\n");
+      const char *compunit_filename
+	= symtab_to_filename_for_display (COMPUNIT_FILETABS (SYMTAB_COMPUNIT (symtab)));
+
+      fprintf_filtered (outfile,
+			"\nBlockvector same as owning compunit: %s\n\n",
+			compunit_filename);
     }
 }
 
 static void
-dump_symtab (struct objfile *objfile, struct symtab *symtab,
-	     struct ui_file *outfile)
+dump_symtab (struct symtab *symtab, struct ui_file *outfile)
 {
   /* Set the current language to the language of the symtab we're dumping
      because certain routines used during dump_symtab() use the current
@@ -396,61 +396,131 @@ dump_symtab (struct objfile *objfile, st
 
       saved_lang = set_language (symtab->language);
 
-      dump_symtab_1 (objfile, symtab, outfile);
+      dump_symtab_1 (symtab, outfile);
 
       set_language (saved_lang);
     }
   else
-    dump_symtab_1 (objfile, symtab, outfile);
+    dump_symtab_1 (symtab, outfile);
 }
 
 static void
 maintenance_print_symbols (char *args, int from_tty)
 {
   char **argv;
-  struct ui_file *outfile;
+  struct ui_file *outfile = gdb_stdout;
   struct cleanup *cleanups;
-  char *symname = NULL;
-  char *filename = DEV_TTY;
-  struct objfile *objfile;
-  struct compunit_symtab *cu;
-  struct symtab *s;
+  char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
+  int i, outfile_idx;
 
   dont_repeat ();
 
-  if (args == NULL)
-    {
-      error (_("Arguments missing: an output file name "
-	       "and an optional symbol file name"));
-    }
   argv = gdb_buildargv (args);
   cleanups = make_cleanup_freeargv (argv);
 
-  if (argv[0] != NULL)
+  for (i = 0; argv != NULL && argv[i] != NULL; ++i)
     {
-      filename = argv[0];
-      /* If a second arg is supplied, it is a source file name to match on.  */
-      if (argv[1] != NULL)
+      if (strcmp (argv[i], "-pc") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing pc value"));
+	  address_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "-source") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing source file"));
+	  source_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "-objfile") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing objfile name"));
+	  objfile_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "--") == 0)
+	{
+	  /* End of options.  */
+	  ++i;
+	  break;
+	}
+      else if (argv[i][0] == '-')
 	{
-	  symname = argv[1];
+	  /* Future proofing: Don't allow OUTFILE to begin with "-".  */
+	  error (_("Unknown option: %s"), argv[i]);
 	}
+      else
+	break;
     }
+  outfile_idx = i;
+
+  if (address_arg != NULL && source_arg != NULL)
+    error (_("Must specify at most one of -pc and -source"));
 
-  filename = tilde_expand (filename);
-  make_cleanup (xfree, filename);
+  stdio_file arg_outfile;
+
+  if (argv != NULL && argv[outfile_idx] != NULL)
+    {
+      char *outfile_name;
 
-  outfile = gdb_fopen (filename, FOPEN_WT);
-  if (outfile == 0)
-    perror_with_name (filename);
-  make_cleanup_ui_file_delete (outfile);
+      if (argv[outfile_idx + 1] != NULL)
+	error (_("Junk at end of command"));
+      outfile_name = tilde_expand (argv[outfile_idx]);
+      make_cleanup (xfree, outfile_name);
+      if (!arg_outfile.open (outfile_name, FOPEN_WT))
+	perror_with_name (outfile_name);
+      outfile = &arg_outfile;
+    }
 
-  ALL_FILETABS (objfile, cu, s)
+  if (address_arg != NULL)
     {
-      QUIT;
-      if (symname == NULL
-	  || filename_cmp (symname, symtab_to_filename_for_display (s)) == 0)
-	dump_symtab (objfile, s, outfile);
+      CORE_ADDR pc = parse_and_eval_address (address_arg);
+      struct symtab *s = find_pc_line_symtab (pc);
+
+      if (s == NULL)
+	error (_("No symtab for address: %s"), address_arg);
+      dump_symtab (s, outfile);
     }
+  else
+    {
+      struct objfile *objfile;
+      struct compunit_symtab *cu;
+      struct symtab *s;
+      int found = 0;
+
+      ALL_OBJFILES (objfile)
+	{
+	  int print_for_objfile = 1;
+
+	  if (objfile_arg != NULL)
+	    print_for_objfile
+	      = compare_filenames_for_search (objfile_name (objfile),
+					      objfile_arg);
+	  if (!print_for_objfile)
+	    continue;
+
+	  ALL_OBJFILE_FILETABS (objfile, cu, s)
+	    {
+	      int print_for_source = 0;
+
+	      QUIT;
+	      if (source_arg != NULL)
+		{
+		  print_for_source
+		    = compare_filenames_for_search
+		        (symtab_to_filename_for_display (s), source_arg);
+		  found = 1;
+		}
+	      if (source_arg == NULL
+		  || print_for_source)
+		dump_symtab (s, outfile);
+	    }
+	}
+
+      if (source_arg != NULL && !found)
+	error (_("No symtab for source file: %s"), source_arg);
+    }
+
   do_cleanups (cleanups);
 }
 
@@ -640,56 +710,64 @@ static void
 maintenance_print_msymbols (char *args, int from_tty)
 {
   char **argv;
-  struct ui_file *outfile;
+  struct ui_file *outfile = gdb_stdout;
   struct cleanup *cleanups;
-  char *filename = DEV_TTY;
-  char *symname = NULL;
-  struct program_space *pspace;
+  char *objfile_arg = NULL;
   struct objfile *objfile;
-
-  struct stat sym_st, obj_st;
+  int i, outfile_idx;
 
   dont_repeat ();
 
-  if (args == NULL)
-    {
-      error (_("print-msymbols takes an output file "
-	       "name and optional symbol file name"));
-    }
   argv = gdb_buildargv (args);
   cleanups = make_cleanup_freeargv (argv);
 
-  if (argv[0] != NULL)
+  for (i = 0; argv != NULL && argv[i] != NULL; ++i)
     {
-      filename = argv[0];
-      /* If a second arg is supplied, it is a source file name to match on.  */
-      if (argv[1] != NULL)
+      if (strcmp (argv[i], "-objfile") == 0)
+	{
+	  if (argv[i + 1] == NULL)
+	    error (_("Missing objfile name"));
+	  objfile_arg = argv[++i];
+	}
+      else if (strcmp (argv[i], "--") == 0)
 	{
-	  symname = gdb_realpath (argv[1]);
-	  make_cleanup (xfree, symname);
-	  if (symname && stat (symname, &sym_st))
-	    perror_with_name (symname);
+	  /* End of options.  */
+	  ++i;
+	  break;
+	}
+      else if (argv[i][0] == '-')
+	{
+	  /* Future proofing: Don't allow OUTFILE to begin with "-".  */
+	  error (_("Unknown option: %s"), argv[i]);
 	}
+      else
+	break;
     }
+  outfile_idx = i;
 
-  filename = tilde_expand (filename);
-  make_cleanup (xfree, filename);
+  stdio_file arg_outfile;
 
-  outfile = gdb_fopen (filename, FOPEN_WT);
-  if (outfile == 0)
-    perror_with_name (filename);
-  make_cleanup_ui_file_delete (outfile);
+  if (argv != NULL && argv[outfile_idx] != NULL)
+    {
+      char *outfile_name;
+
+      if (argv[outfile_idx + 1] != NULL)
+	error (_("Junk at end of command"));
+      outfile_name = tilde_expand (argv[outfile_idx]);
+      make_cleanup (xfree, outfile_name);
+      if (!arg_outfile.open (outfile_name, FOPEN_WT))
+	perror_with_name (outfile_name);
+      outfile = &arg_outfile;
+    }
+
+  ALL_OBJFILES (objfile)
+  {
+    QUIT;
+    if (objfile_arg == NULL
+	|| compare_filenames_for_search (objfile_name (objfile), objfile_arg))
+      dump_msymbols (objfile, outfile);
+  }
 
-  ALL_PSPACES (pspace)
-    ALL_PSPACE_OBJFILES (pspace, objfile)
-      {
-	QUIT;
-	if (symname == NULL || (!stat (objfile_name (objfile), &obj_st)
-				&& sym_st.st_dev == obj_st.st_dev
-				&& sym_st.st_ino == obj_st.st_ino))
-	  dump_msymbols (objfile, outfile);
-      }
-  fprintf_filtered (outfile, "\n\n");
   do_cleanups (cleanups);
 }
 
@@ -859,37 +937,6 @@ maintenance_check_symtabs (char *ignore,
     }
 }
 
-/* Helper function for maintenance_expand_symtabs.
-   This is the name_matcher function for expand_symtabs_matching.  */
-
-static int
-maintenance_expand_name_matcher (const char *symname, void *data)
-{
-  /* Since we're not searching on symbols, just return TRUE.  */
-  return 1;
-}
-
-/* Helper function for maintenance_expand_symtabs.
-   This is the file_matcher function for expand_symtabs_matching.  */
-
-static int
-maintenance_expand_file_matcher (const char *filename, void *data,
-				 int basenames)
-{
-  const char *regexp = data;
-
-  QUIT;
-
-  /* KISS: Only apply the regexp to the complete file name.  */
-  if (basenames)
-    return 0;
-
-  if (regexp == NULL || re_exec (filename))
-    return 1;
-
-  return 0;
-}
-
 /* Expand all symbol tables whose name matches an optional regexp.  */
 
 static void
@@ -925,8 +972,20 @@ maintenance_expand_symtabs (char *args, 
       if (objfile->sf)
 	{
 	  objfile->sf->qf->expand_symtabs_matching
-	    (objfile, maintenance_expand_file_matcher,
-	     maintenance_expand_name_matcher, NULL, ALL_DOMAIN, regexp);
+	    (objfile,
+	     [&] (const char *filename, bool basenames)
+	     {
+	       /* KISS: Only apply the regexp to the complete file name.  */
+	       return (!basenames
+		       && (regexp == NULL || re_exec (filename)));
+	     },
+	     [] (const char *symname)
+	     {
+	       /* Since we're not searching on symbols, just return true.  */
+	       return true;
+	     },
+	     NULL,
+	     ALL_DOMAIN);
 	}
     }
 
@@ -949,6 +1008,89 @@ block_depth (struct block *block)
 }
 
 
+/* Used by MAINTENANCE_INFO_LINE_TABLES to print the information about a
+   single line table.  */
+
+static int
+maintenance_print_one_line_table (struct symtab *symtab, void *data)
+{
+  struct linetable *linetable;
+  struct objfile *objfile;
+
+  objfile = symtab->compunit_symtab->objfile;
+  printf_filtered (_("objfile: %s ((struct objfile *) %s)\n"),
+		   objfile_name (objfile),
+		   host_address_to_string (objfile));
+  printf_filtered (_("compunit_symtab: ((struct compunit_symtab *) %s)\n"),
+		   host_address_to_string (symtab->compunit_symtab));
+  printf_filtered (_("symtab: %s ((struct symtab *) %s)\n"),
+		   symtab_to_fullname (symtab),
+		   host_address_to_string (symtab));
+  linetable = SYMTAB_LINETABLE (symtab);
+  printf_filtered (_("linetable: ((struct linetable *) %s):\n"),
+		   host_address_to_string (linetable));
+
+  if (linetable == NULL)
+    printf_filtered (_("No line table.\n"));
+  else if (linetable->nitems <= 0)
+    printf_filtered (_("Line table has no lines.\n"));
+  else
+    {
+      int i;
+
+      /* Leave space for 6 digits of index and line number.  After that the
+	 tables will just not format as well.  */
+      printf_filtered (_("%-6s %6s %s\n"),
+		       _("INDEX"), _("LINE"), _("ADDRESS"));
+
+      for (i = 0; i < linetable->nitems; ++i)
+	{
+	  struct linetable_entry *item;
+
+	  item = &linetable->item [i];
+	  printf_filtered (_("%-6d %6d %s\n"), i, item->line,
+			   core_addr_to_string (item->pc));
+	}
+    }
+
+  return 0;
+}
+
+/* Implement the 'maint info line-table' command.  */
+
+static void
+maintenance_info_line_tables (char *regexp, int from_tty)
+{
+  struct program_space *pspace;
+  struct objfile *objfile;
+
+  dont_repeat ();
+
+  if (regexp != NULL)
+    re_comp (regexp);
+
+  ALL_PSPACES (pspace)
+    ALL_PSPACE_OBJFILES (pspace, objfile)
+    {
+      struct compunit_symtab *cust;
+      struct symtab *symtab;
+
+      ALL_OBJFILE_COMPUNITS (objfile, cust)
+	{
+	  ALL_COMPUNIT_FILETABS (cust, symtab)
+	    {
+	      QUIT;
+
+	      if (regexp == NULL
+		  || re_exec (symtab_to_filename_for_display (symtab)))
+		maintenance_print_one_line_table (symtab, NULL);
+	    }
+	}
+    }
+}
+
+
+
 /* Do early runtime initializations.  */
 
 void
@@ -960,14 +1102,21 @@ _initialize_symmisc (void)
 
   add_cmd ("symbols", class_maintenance, maintenance_print_symbols, _("\
 Print dump of current symbol definitions.\n\
-Entries in the full symbol table are dumped to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's symbols."),
+Usage: mt print symbols [-pc address] [--] [outfile]\n\
+       mt print symbols [-objfile objfile] [-source source] [--] [outfile]\n\
+Entries in the full symbol table are dumped to file OUTFILE,\n\
+or the terminal if OUTFILE is unspecified.\n\
+If ADDRESS is provided, dump only the file for that address.\n\
+If SOURCE is provided, dump only that file's symbols.\n\
+If OBJFILE is provided, dump only that file's minimal symbols."),
 	   &maintenanceprintlist);
 
   add_cmd ("msymbols", class_maintenance, maintenance_print_msymbols, _("\
 Print dump of current minimal symbol definitions.\n\
-Entries in the minimal symbol table are dumped to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's minimal symbols."),
+Usage: mt print msymbols [-objfile objfile] [--] [outfile]\n\
+Entries in the minimal symbol table are dumped to file OUTFILE,\n\
+or the terminal if OUTFILE is unspecified.\n\
+If OBJFILE is provided, dump only that file's minimal symbols."),
 	   &maintenanceprintlist);
 
   add_cmd ("objfiles", class_maintenance, maintenance_print_objfiles,
@@ -982,6 +1131,12 @@ linetables --- just the symbol table str
 With an argument REGEXP, list the symbol tables with matching names."),
 	   &maintenanceinfolist);
 
+  add_cmd ("line-table", class_maintenance, maintenance_info_line_tables, _("\
+List the contents of all line tables, from all symbol tables.\n\
+With an argument REGEXP, list just the line tables for the symbol\n\
+tables with matching names."),
+	   &maintenanceinfolist);
+
   add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
 	   _("\
 Check consistency of currently expanded symtabs."),
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symtab.c ./gdb/symtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symtab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Symbol table lookup for the GNU debugger, GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -41,7 +41,7 @@
 #include "p-lang.h"
 #include "addrmap.h"
 #include "cli/cli-utils.h"
-
+#include "fnmatch.h"
 #include "hashtab.h"
 
 #include "gdb_obstack.h"
@@ -68,22 +68,26 @@ static void rbreak_command (char *, int)
 
 static int find_line_common (struct linetable *, int, int *, int);
 
-static struct symbol *lookup_symbol_aux (const char *name,
-					 const struct block *block,
-					 const domain_enum domain,
-					 enum language language,
-					 struct field_of_this_result *);
+static struct block_symbol
+  lookup_symbol_aux (const char *name,
+		     const struct block *block,
+		     const domain_enum domain,
+		     enum language language,
+		     struct field_of_this_result *);
 
 static
-struct symbol *lookup_local_symbol (const char *name,
-				    const struct block *block,
-				    const domain_enum domain,
-				    enum language language);
+struct block_symbol lookup_local_symbol (const char *name,
+					 const struct block *block,
+					 const domain_enum domain,
+					 enum language language);
 
-static struct symbol *
+static struct block_symbol
   lookup_symbol_in_objfile (struct objfile *objfile, int block_index,
 			    const char *name, const domain_enum domain);
 
+/* See symtab.h.  */
+const struct block_symbol null_block_symbol = { NULL, NULL };
+
 extern initialize_file_ftype _initialize_symtab;
 
 /* Program space key for finding name and language of "main".  */
@@ -121,7 +125,9 @@ static const struct program_space_data *
 
 /* symbol_cache_lookup returns this if a previous lookup failed to find the
    symbol in any objfile.  */
-#define SYMBOL_LOOKUP_FAILED ((struct symbol *) 1)
+#define SYMBOL_LOOKUP_FAILED \
+ ((struct block_symbol) {(struct symbol *) 1, NULL})
+#define SYMBOL_LOOKUP_FAILED_P(SIB) (SIB.symbol == (struct symbol *) 1)
 
 /* Recording lookups that don't find the symbol is just as important, if not
    more so, than recording found symbols.  */
@@ -157,7 +163,7 @@ struct symbol_cache_slot
 
   union
   {
-    struct symbol *found;
+    struct block_symbol found;
     struct
     {
       char *name;
@@ -243,12 +249,6 @@ multiple_symbols_select_mode (void)
   return multiple_symbols_mode;
 }
 
-/* Block in which the most recently searched-for symbol was found.
-   Might be better to make this a parameter to lookup_symbol and
-   value_of_this.  */
-
-const struct block *block_found;
-
 /* Return the name of a domain_enum.  */
 
 const char *
@@ -342,29 +342,60 @@ compare_filenames_for_search (const char
 	      && STRIP_DRIVE_SPEC (filename) == &filename[len - search_len]));
 }
 
+/* Same as compare_filenames_for_search, but for glob-style patterns.
+   Heads up on the order of the arguments.  They match the order of
+   compare_filenames_for_search, but it's the opposite of the order of
+   arguments to gdb_filename_fnmatch.  */
+
+int
+compare_glob_filenames_for_search (const char *filename,
+				   const char *search_name)
+{
+  /* We rely on the property of glob-style patterns with FNM_FILE_NAME that
+     all /s have to be explicitly specified.  */
+  int file_path_elements = count_path_elements (filename);
+  int search_path_elements = count_path_elements (search_name);
+
+  if (search_path_elements > file_path_elements)
+    return 0;
+
+  if (IS_ABSOLUTE_PATH (search_name))
+    {
+      return (search_path_elements == file_path_elements
+	      && gdb_filename_fnmatch (search_name, filename,
+				       FNM_FILE_NAME | FNM_NOESCAPE) == 0);
+    }
+
+  {
+    const char *file_to_compare
+      = strip_leading_path_elements (filename,
+				     file_path_elements - search_path_elements);
+
+    return gdb_filename_fnmatch (search_name, file_to_compare,
+				 FNM_FILE_NAME | FNM_NOESCAPE) == 0;
+  }
+}
+
 /* Check for a symtab of a specific name by searching some symtabs.
    This is a helper function for callbacks of iterate_over_symtabs.
 
    If NAME is not absolute, then REAL_PATH is NULL
    If NAME is absolute, then REAL_PATH is the gdb_realpath form of NAME.
 
-   The return value, NAME, REAL_PATH, CALLBACK, and DATA
-   are identical to the `map_symtabs_matching_filename' method of
-   quick_symbol_functions.
+   The return value, NAME, REAL_PATH and CALLBACK are identical to the
+   `map_symtabs_matching_filename' method of quick_symbol_functions.
 
    FIRST and AFTER_LAST indicate the range of compunit symtabs to search.
    Each symtab within the specified compunit symtab is also searched.
    AFTER_LAST is one past the last compunit symtab to search; NULL means to
    search until the end of the list.  */
 
-int
+bool
 iterate_over_some_symtabs (const char *name,
 			   const char *real_path,
-			   int (*callback) (struct symtab *symtab,
-					    void *data),
-			   void *data,
 			   struct compunit_symtab *first,
-			   struct compunit_symtab *after_last)
+			   struct compunit_symtab *after_last,
+			   gdb::function_view<bool (symtab *)> callback)
 {
   struct compunit_symtab *cust;
   struct symtab *s;
@@ -376,8 +407,8 @@ iterate_over_some_symtabs (const char *n
 	{
 	  if (compare_filenames_for_search (s->filename, name))
 	    {
-	      if (callback (s, data))
-		return 1;
+	      if (callback (s))
+		return true;
 	      continue;
 	    }
 
@@ -389,8 +420,8 @@ iterate_over_some_symtabs (const char *n
 
 	  if (compare_filenames_for_search (symtab_to_fullname (s), name))
 	    {
-	      if (callback (s, data))
-		return 1;
+	      if (callback (s))
+		return true;
 	      continue;
 	    }
 
@@ -404,82 +435,59 @@ iterate_over_some_symtabs (const char *n
 	      gdb_assert (IS_ABSOLUTE_PATH (name));
 	      if (FILENAME_CMP (real_path, fullname) == 0)
 		{
-		  if (callback (s, data))
-		    return 1;
+		  if (callback (s))
+		    return true;
 		  continue;
 		}
 	    }
 	}
     }
 
-  return 0;
+  return false;
 }
 
 /* Check for a symtab of a specific name; first in symtabs, then in
    psymtabs.  *If* there is no '/' in the name, a match after a '/'
    in the symtab filename will also work.
 
-   Calls CALLBACK with each symtab that is found and with the supplied
-   DATA.  If CALLBACK returns true, the search stops.  */
+   Calls CALLBACK with each symtab that is found.  If CALLBACK returns
+   true, the search stops.  */
 
 void
 iterate_over_symtabs (const char *name,
-		      int (*callback) (struct symtab *symtab,
-				       void *data),
-		      void *data)
+		      gdb::function_view<bool (symtab *)> callback)
 {
   struct objfile *objfile;
-  char *real_path = NULL;
-  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+  gdb::unique_xmalloc_ptr<char> real_path;
 
   /* Here we are interested in canonicalizing an absolute path, not
      absolutizing a relative path.  */
   if (IS_ABSOLUTE_PATH (name))
     {
-      real_path = gdb_realpath (name);
-      make_cleanup (xfree, real_path);
-      gdb_assert (IS_ABSOLUTE_PATH (real_path));
+      real_path.reset (gdb_realpath (name));
+      gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
     }
 
   ALL_OBJFILES (objfile)
-  {
-    if (iterate_over_some_symtabs (name, real_path, callback, data,
-				   objfile->compunit_symtabs, NULL))
-      {
-	do_cleanups (cleanups);
+    {
+      if (iterate_over_some_symtabs (name, real_path.get (),
+				     objfile->compunit_symtabs, NULL,
+				     callback))
 	return;
-      }
-  }
+    }
 
   /* Same search rules as above apply here, but now we look thru the
      psymtabs.  */
 
   ALL_OBJFILES (objfile)
-  {
-    if (objfile->sf
-	&& objfile->sf->qf->map_symtabs_matching_filename (objfile,
-							   name,
-							   real_path,
-							   callback,
-							   data))
-      {
-	do_cleanups (cleanups);
+    {
+      if (objfile->sf
+	  && objfile->sf->qf->map_symtabs_matching_filename (objfile,
+							     name,
+							     real_path.get (),
+							     callback))
 	return;
-      }
-  }
-
-  do_cleanups (cleanups);
-}
-
-/* The callback function used by lookup_symtab.  */
-
-static int
-lookup_symtab_callback (struct symtab *symtab, void *data)
-{
-  struct symtab **result_ptr = data;
-
-  *result_ptr = symtab;
-  return 1;
+    }
 }
 
 /* A wrapper for iterate_over_symtabs that returns the first matching
@@ -490,7 +498,12 @@ lookup_symtab (const char *name)
 {
   struct symtab *result = NULL;
 
-  iterate_over_symtabs (name, lookup_symtab_callback, &result);
+  iterate_over_symtabs (name, [&] (symtab *symtab)
+    {
+      result = symtab;
+      return true;
+    });
+
   return result;
 }
 
@@ -518,8 +531,8 @@ gdb_mangle_name (struct type *type, int 
   int is_constructor;
   int is_destructor = is_destructor_name (physname);
   /* Need a new type prefix.  */
-  char *const_prefix = method->is_const ? "C" : "";
-  char *volatile_prefix = method->is_volatile ? "V" : "";
+  const char *const_prefix = method->is_const ? "C" : "";
+  const char *volatile_prefix = method->is_volatile ? "V" : "";
   char buf[20];
   int len = (newname == NULL ? 0 : strlen (newname));
 
@@ -599,11 +612,11 @@ symbol_set_demangled_name (struct genera
       else
 	{
 	  gsymbol->ada_mangled = 1;
-	  gsymbol->language_specific.mangled_lang.demangled_name = name;
+	  gsymbol->language_specific.demangled_name = name;
 	}
     }
   else
-    gsymbol->language_specific.mangled_lang.demangled_name = name;
+    gsymbol->language_specific.demangled_name = name;
 }
 
 /* Return the demangled name of GSYMBOL.  */
@@ -618,7 +631,7 @@ symbol_get_demangled_name (const struct 
       /* Fall through.  */
     }
 
-  return gsymbol->language_specific.mangled_lang.demangled_name;
+  return gsymbol->language_specific.demangled_name;
 }
 
 
@@ -634,7 +647,6 @@ symbol_set_language (struct general_symb
   if (gsymbol->language == language_cplus
       || gsymbol->language == language_d
       || gsymbol->language == language_go
-      || gsymbol->language == language_java
       || gsymbol->language == language_objc
       || gsymbol->language == language_fortran)
     {
@@ -666,7 +678,8 @@ struct demangled_name_entry
 static hashval_t
 hash_demangled_name_entry (const void *data)
 {
-  const struct demangled_name_entry *e = data;
+  const struct demangled_name_entry *e
+    = (const struct demangled_name_entry *) data;
 
   return htab_hash_string (e->mangled);
 }
@@ -676,8 +689,10 @@ hash_demangled_name_entry (const void *d
 static int
 eq_demangled_name_entry (const void *a, const void *b)
 {
-  const struct demangled_name_entry *da = a;
-  const struct demangled_name_entry *db = b;
+  const struct demangled_name_entry *da
+    = (const struct demangled_name_entry *) a;
+  const struct demangled_name_entry *db
+    = (const struct demangled_name_entry *) b;
 
   return strcmp (da->mangled, db->mangled) == 0;
 }
@@ -710,110 +725,32 @@ symbol_find_demangled_name (struct gener
 			    const char *mangled)
 {
   char *demangled = NULL;
+  int i;
+  int recognized;
 
   if (gsymbol->language == language_unknown)
     gsymbol->language = language_auto;
 
-  if (gsymbol->language == language_objc
-      || gsymbol->language == language_auto)
-    {
-      demangled =
-	objc_demangle (mangled, 0);
-      if (demangled != NULL)
-	{
-	  gsymbol->language = language_objc;
-	  return demangled;
-	}
-    }
-  if (gsymbol->language == language_cplus
-      || gsymbol->language == language_auto)
-    {
-      demangled =
-        gdb_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
-      if (demangled != NULL)
-	{
-	  gsymbol->language = language_cplus;
-	  return demangled;
-	}
-    }
-  if (gsymbol->language == language_java)
+  if (gsymbol->language != language_auto)
     {
-      demangled =
-        gdb_demangle (mangled,
-		      DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA);
-      if (demangled != NULL)
-	{
-	  gsymbol->language = language_java;
-	  return demangled;
-	}
-    }
-  if (gsymbol->language == language_d
-      || gsymbol->language == language_auto)
-    {
-      demangled = d_demangle(mangled, 0);
-      if (demangled != NULL)
-	{
-	  gsymbol->language = language_d;
-	  return demangled;
-	}
+      const struct language_defn *lang = language_def (gsymbol->language);
+
+      language_sniff_from_mangled_name (lang, mangled, &demangled);
+      return demangled;
     }
-  /* FIXME(dje): Continually adding languages here is clumsy.
-     Better to just call la_demangle if !auto, and if auto then call
-     a utility routine that tries successive languages in turn and reports
-     which one it finds.  I realize the la_demangle options may be different
-     for different languages but there's already a FIXME for that.  */
-  if (gsymbol->language == language_go
-      || gsymbol->language == language_auto)
+
+  for (i = language_unknown; i < nr_languages; ++i)
     {
-      demangled = go_demangle (mangled, 0);
-      if (demangled != NULL)
+      enum language l = (enum language) i;
+      const struct language_defn *lang = language_def (l);
+
+      if (language_sniff_from_mangled_name (lang, mangled, &demangled))
 	{
-	  gsymbol->language = language_go;
+	  gsymbol->language = l;
 	  return demangled;
 	}
     }
 
-  /* We could support `gsymbol->language == language_fortran' here to provide
-     module namespaces also for inferiors with only minimal symbol table (ELF
-     symbols).  Just the mangling standard is not standardized across compilers
-     and there is no DW_AT_producer available for inferiors with only the ELF
-     symbols to check the mangling kind.  */
-
-  /* Check for Ada symbols last.  See comment below explaining why.  */
-
-  if (gsymbol->language == language_auto)
-   {
-     const char *demangled = ada_decode (mangled);
-
-     if (demangled != mangled && demangled != NULL && demangled[0] != '<')
-       {
-	 /* Set the gsymbol language to Ada, but still return NULL.
-	    Two reasons for that:
-
-	      1. For Ada, we prefer computing the symbol's decoded name
-		 on the fly rather than pre-compute it, in order to save
-		 memory (Ada projects are typically very large).
-
-	      2. There are some areas in the definition of the GNAT
-		 encoding where, with a bit of bad luck, we might be able
-		 to decode a non-Ada symbol, generating an incorrect
-		 demangled name (Eg: names ending with "TB" for instance
-		 are identified as task bodies and so stripped from
-		 the decoded name returned).
-
-		 Returning NULL, here, helps us get a little bit of
-		 the best of both worlds.  Because we're last, we should
-		 not affect any of the other languages that were able to
-		 demangle the symbol before us; we get to correctly tag
-		 Ada symbols as such; and even if we incorrectly tagged
-		 a non-Ada symbol, which should be rare, any routing
-		 through the Ada language should be transparent (Ada
-		 tries to behave much like C/C++ with non-Ada symbols).  */
-	 gsymbol->language = language_ada;
-	 return NULL;
-       }
-   }
-
   return NULL;
 }
 
@@ -828,25 +765,6 @@ symbol_find_demangled_name (struct gener
    comes from the per-BFD storage_obstack.  LINKAGE_NAME is copied,
    so the pointer can be discarded after calling this function.  */
 
-/* We have to be careful when dealing with Java names: when we run
-   into a Java minimal symbol, we don't know it's a Java symbol, so it
-   gets demangled as a C++ name.  This is unfortunate, but there's not
-   much we can do about it: but when demangling partial symbols and
-   regular symbols, we'd better not reuse the wrong demangled name.
-   (See PR gdb/1039.)  We solve this by putting a distinctive prefix
-   on Java names when storing them in the hash table.  */
-
-/* FIXME: carlton/2003-03-13: This is an unfortunate situation.  I
-   don't mind the Java prefix so much: different languages have
-   different demangling requirements, so it's only natural that we
-   need to keep language data around in our demangling cache.  But
-   it's not good that the minimal symbol has the wrong demangled name.
-   Unfortunately, I can't think of any easy solution to that
-   problem.  */
-
-#define JAVA_PREFIX "##JAVA$$"
-#define JAVA_PREFIX_LEN 8
-
 void
 symbol_set_names (struct general_symbol_info *gsymbol,
 		  const char *linkage_name, int len, int copy_name,
@@ -855,29 +773,19 @@ symbol_set_names (struct general_symbol_
   struct demangled_name_entry **slot;
   /* A 0-terminated copy of the linkage name.  */
   const char *linkage_name_copy;
-  /* A copy of the linkage name that might have a special Java prefix
-     added to it, for use when looking names up in the hash table.  */
-  const char *lookup_name;
-  /* The length of lookup_name.  */
-  int lookup_len;
   struct demangled_name_entry entry;
   struct objfile_per_bfd_storage *per_bfd = objfile->per_bfd;
 
   if (gsymbol->language == language_ada)
     {
       /* In Ada, we do the symbol lookups using the mangled name, so
-         we can save some space by not storing the demangled name.
-
-         As a side note, we have also observed some overlap between
-         the C++ mangling and Ada mangling, similarly to what has
-         been observed with Java.  Because we don't store the demangled
-         name with the symbol, we don't need to use the same trick
-         as Java.  */
+         we can save some space by not storing the demangled name.  */
       if (!copy_name)
 	gsymbol->name = linkage_name;
       else
 	{
-	  char *name = obstack_alloc (&per_bfd->storage_obstack, len + 1);
+	  char *name = (char *) obstack_alloc (&per_bfd->storage_obstack,
+					       len + 1);
 
 	  memcpy (name, linkage_name, len);
 	  name[len] = '\0';
@@ -891,42 +799,20 @@ symbol_set_names (struct general_symbol_
   if (per_bfd->demangled_names_hash == NULL)
     create_demangled_names_hash (objfile);
 
-  /* The stabs reader generally provides names that are not
-     NUL-terminated; most of the other readers don't do this, so we
-     can just use the given copy, unless we're in the Java case.  */
-  if (gsymbol->language == language_java)
+  if (linkage_name[len] != '\0')
     {
       char *alloc_name;
 
-      lookup_len = len + JAVA_PREFIX_LEN;
-      alloc_name = alloca (lookup_len + 1);
-      memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN);
-      memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len);
-      alloc_name[lookup_len] = '\0';
-
-      lookup_name = alloc_name;
-      linkage_name_copy = alloc_name + JAVA_PREFIX_LEN;
-    }
-  else if (linkage_name[len] != '\0')
-    {
-      char *alloc_name;
-
-      lookup_len = len;
-      alloc_name = alloca (lookup_len + 1);
+      alloc_name = (char *) alloca (len + 1);
       memcpy (alloc_name, linkage_name, len);
-      alloc_name[lookup_len] = '\0';
+      alloc_name[len] = '\0';
 
-      lookup_name = alloc_name;
       linkage_name_copy = alloc_name;
     }
   else
-    {
-      lookup_len = len;
-      lookup_name = linkage_name;
-      linkage_name_copy = linkage_name;
-    }
+    linkage_name_copy = linkage_name;
 
-  entry.mangled = lookup_name;
+  entry.mangled = linkage_name_copy;
   slot = ((struct demangled_name_entry **)
 	  htab_find_slot (per_bfd->demangled_names_hash,
 			  &entry, INSERT));
@@ -943,7 +829,7 @@ symbol_set_names (struct general_symbol_
       int demangled_len = demangled_name ? strlen (demangled_name) : 0;
 
       /* Suppose we have demangled_name==NULL, copy_name==0, and
-	 lookup_name==linkage_name.  In this case, we already have the
+	 linkage_name_copy==linkage_name.  In this case, we already have the
 	 mangled name saved, and we don't have a demangled name.  So,
 	 you might think we could save a little space by not recording
 	 this in the hash table at all.
@@ -951,13 +837,14 @@ symbol_set_names (struct general_symbol_
 	 It turns out that it is actually important to still save such
 	 an entry in the hash table, because storing this name gives
 	 us better bcache hit rates for partial symbols.  */
-      if (!copy_name && lookup_name == linkage_name)
+      if (!copy_name && linkage_name_copy == linkage_name)
 	{
-	  *slot = obstack_alloc (&per_bfd->storage_obstack,
-				 offsetof (struct demangled_name_entry,
-					   demangled)
-				 + demangled_len + 1);
-	  (*slot)->mangled = lookup_name;
+	  *slot
+	    = ((struct demangled_name_entry *)
+	       obstack_alloc (&per_bfd->storage_obstack,
+			      offsetof (struct demangled_name_entry, demangled)
+			      + demangled_len + 1));
+	  (*slot)->mangled = linkage_name;
 	}
       else
 	{
@@ -966,12 +853,13 @@ symbol_set_names (struct general_symbol_
 	  /* If we must copy the mangled name, put it directly after
 	     the demangled name so we can have a single
 	     allocation.  */
-	  *slot = obstack_alloc (&per_bfd->storage_obstack,
-				 offsetof (struct demangled_name_entry,
-					   demangled)
-				 + lookup_len + demangled_len + 2);
+	  *slot
+	    = ((struct demangled_name_entry *)
+	       obstack_alloc (&per_bfd->storage_obstack,
+			      offsetof (struct demangled_name_entry, demangled)
+			      + len + demangled_len + 2));
 	  mangled_ptr = &((*slot)->demangled[demangled_len + 1]);
-	  strcpy (mangled_ptr, lookup_name);
+	  strcpy (mangled_ptr, linkage_name_copy);
 	  (*slot)->mangled = mangled_ptr;
 	}
 
@@ -984,7 +872,7 @@ symbol_set_names (struct general_symbol_
 	(*slot)->demangled[0] = '\0';
     }
 
-  gsymbol->name = (*slot)->mangled + lookup_len - len;
+  gsymbol->name = (*slot)->mangled;
   if ((*slot)->demangled[0] != '\0')
     symbol_set_demangled_name (gsymbol, (*slot)->demangled,
 			       &per_bfd->storage_obstack);
@@ -1003,7 +891,6 @@ symbol_natural_name (const struct genera
     case language_cplus:
     case language_d:
     case language_go:
-    case language_java:
     case language_objc:
     case language_fortran:
       if (symbol_get_demangled_name (gsymbol) != NULL)
@@ -1030,7 +917,6 @@ symbol_demangled_name (const struct gene
     case language_cplus:
     case language_d:
     case language_go:
-    case language_java:
     case language_objc:
     case language_fortran:
       dem_name = symbol_get_demangled_name (gsymbol);
@@ -1208,8 +1094,8 @@ eq_symbol_entry (const struct symbol_cac
     }
   else
     {
-      slot_name = SYMBOL_SEARCH_NAME (slot->value.found);
-      slot_domain = SYMBOL_DOMAIN (slot->value.found);
+      slot_name = SYMBOL_SEARCH_NAME (slot->value.found.symbol);
+      slot_domain = SYMBOL_DOMAIN (slot->value.found.symbol);
     }
 
   /* NULL names match.  */
@@ -1240,7 +1126,7 @@ eq_symbol_entry (const struct symbol_cac
 	}
       else
 	{
-	  struct symbol *sym = slot->value.found;
+	  struct symbol *sym = slot->value.found.symbol;
 
 	  if (strcmp_iw (slot_name, name) != 0)
 	    return 0;
@@ -1294,8 +1180,10 @@ resize_symbol_cache (struct symbol_cache
     {
       size_t total_size = symbol_cache_byte_size (new_size);
 
-      cache->global_symbols = xcalloc (1, total_size);
-      cache->static_symbols = xcalloc (1, total_size);
+      cache->global_symbols
+	= (struct block_symbol_cache *) xcalloc (1, total_size);
+      cache->static_symbols
+	= (struct block_symbol_cache *) xcalloc (1, total_size);
       cache->global_symbols->size = new_size;
       cache->static_symbols->size = new_size;
     }
@@ -1329,7 +1217,8 @@ free_symbol_cache (struct symbol_cache *
 static struct symbol_cache *
 get_symbol_cache (struct program_space *pspace)
 {
-  struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+  struct symbol_cache *cache
+    = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
 
   if (cache == NULL)
     {
@@ -1346,7 +1235,7 @@ get_symbol_cache (struct program_space *
 static void
 symbol_cache_cleanup (struct program_space *pspace, void *data)
 {
-  struct symbol_cache *cache = data;
+  struct symbol_cache *cache = (struct symbol_cache *) data;
 
   free_symbol_cache (cache);
 }
@@ -1361,7 +1250,7 @@ set_symbol_cache_size (unsigned int new_
   ALL_PSPACES (pspace)
     {
       struct symbol_cache *cache
-	= program_space_data (pspace, symbol_cache_key);
+	= (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
 
       /* The pspace could have been created but not have a cache yet.  */
       if (cache != NULL)
@@ -1398,7 +1287,7 @@ set_symbol_cache_size_handler (char *arg
    set to the cache and slot of the symbol to save the result of a full lookup
    attempt.  */
 
-static struct symbol *
+static struct block_symbol
 symbol_cache_lookup (struct symbol_cache *cache,
 		     struct objfile *objfile_context, int block,
 		     const char *name, domain_enum domain,
@@ -1417,7 +1306,7 @@ symbol_cache_lookup (struct symbol_cache
     {
       *bsc_ptr = NULL;
       *slot_ptr = NULL;
-      return NULL;
+      return (struct block_symbol) {NULL, NULL};
     }
 
   hash = hash_symbol_entry (objfile_context, name, domain);
@@ -1451,7 +1340,7 @@ symbol_cache_lookup (struct symbol_cache
 			  name, domain_name (domain));
     }
   ++bsc->misses;
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Clear out SLOT.  */
@@ -1473,7 +1362,8 @@ static void
 symbol_cache_mark_found (struct block_symbol_cache *bsc,
 			 struct symbol_cache_slot *slot,
 			 struct objfile *objfile_context,
-			 struct symbol *symbol)
+			 struct symbol *symbol,
+			 const struct block *block)
 {
   if (bsc == NULL)
     return;
@@ -1484,7 +1374,8 @@ symbol_cache_mark_found (struct block_sy
     }
   slot->state = SYMBOL_SLOT_FOUND;
   slot->objfile_context = objfile_context;
-  slot->value.found = symbol;
+  slot->value.found.symbol = symbol;
+  slot->value.found.block = block;
 }
 
 /* Mark symbol NAME, DOMAIN as not found in SLOT.
@@ -1515,9 +1406,9 @@ symbol_cache_mark_not_found (struct bloc
 static void
 symbol_cache_flush (struct program_space *pspace)
 {
-  struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+  struct symbol_cache *cache
+    = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
   int pass;
-  size_t total_size;
 
   if (cache == NULL)
     return;
@@ -1597,11 +1488,16 @@ symbol_cache_dump (const struct symbol_c
 			       domain_name (slot->value.not_found.domain));
 	      break;
 	    case SYMBOL_SLOT_FOUND:
-	      printf_filtered ("  [%4u] = %s, %s %s\n", i,
-			       host_address_to_string (slot->objfile_context),
-			       SYMBOL_PRINT_NAME (slot->value.found),
-			       domain_name (SYMBOL_DOMAIN (slot->value.found)));
-	      break;
+	      {
+		struct symbol *found = slot->value.found.symbol;
+		const struct objfile *context = slot->objfile_context;
+
+		printf_filtered ("  [%4u] = %s, %s %s\n", i,
+				 host_address_to_string (context),
+				 SYMBOL_PRINT_NAME (found),
+				 domain_name (SYMBOL_DOMAIN (found)));
+		break;
+	      }
 	    }
 	}
     }
@@ -1625,7 +1521,8 @@ maintenance_print_symbol_cache (char *ar
 		       : "(no object file)");
 
       /* If the cache hasn't been created yet, avoid creating one.  */
-      cache = program_space_data (pspace, symbol_cache_key);
+      cache
+	= (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
       if (cache == NULL)
 	printf_filtered ("  <empty>\n");
       else
@@ -1696,7 +1593,8 @@ maintenance_print_symbol_cache_statistic
 		       : "(no object file)");
 
       /* If the cache hasn't been created yet, avoid creating one.  */
-      cache = program_space_data (pspace, symbol_cache_key);
+      cache
+	= (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
       if (cache == NULL)
  	printf_filtered ("  empty, no stats available\n");
       else
@@ -1851,10 +1749,10 @@ fixup_symbol_section (struct symbol *sym
 }
 
 /* Compute the demangled form of NAME as used by the various symbol
-   lookup functions.  The result is stored in *RESULT_NAME.  Returns a
-   cleanup which can be used to clean up the result.
+   lookup functions.  The result can either be the input NAME
+   directly, or a pointer to a buffer owned by the STORAGE object.
 
-   For Ada, this function just sets *RESULT_NAME to NAME, unmodified.
+   For Ada, this function just returns NAME, unmodified.
    Normally, Ada symbol lookups are performed using the encoded name
    rather than the demangled name, and so it might seem to make sense
    for this function to return an encoded version of NAME.
@@ -1868,69 +1766,38 @@ fixup_symbol_section (struct symbol *sym
    characters to become lowercase, and thus cause the symbol lookup
    to fail.  */
 
-struct cleanup *
+const char *
 demangle_for_lookup (const char *name, enum language lang,
-		     const char **result_name)
+		     demangle_result_storage &storage)
 {
-  char *demangled_name = NULL;
-  const char *modified_name = NULL;
-  struct cleanup *cleanup = make_cleanup (null_cleanup, 0);
-
-  modified_name = name;
-
-  /* If we are using C++, D, Go, or Java, demangle the name before doing a
+  /* If we are using C++, D, or Go, demangle the name before doing a
      lookup, so we can always binary search.  */
   if (lang == language_cplus)
     {
-      demangled_name = gdb_demangle (name, DMGL_ANSI | DMGL_PARAMS);
-      if (demangled_name)
-	{
-	  modified_name = demangled_name;
-	  make_cleanup (xfree, demangled_name);
-	}
-      else
-	{
-	  /* If we were given a non-mangled name, canonicalize it
-	     according to the language (so far only for C++).  */
-	  demangled_name = cp_canonicalize_string (name);
-	  if (demangled_name)
-	    {
-	      modified_name = demangled_name;
-	      make_cleanup (xfree, demangled_name);
-	    }
-	}
-    }
-  else if (lang == language_java)
-    {
-      demangled_name = gdb_demangle (name,
-				     DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
-      if (demangled_name)
-	{
-	  modified_name = demangled_name;
-	  make_cleanup (xfree, demangled_name);
-	}
+      char *demangled_name = gdb_demangle (name, DMGL_ANSI | DMGL_PARAMS);
+      if (demangled_name != NULL)
+	return storage.set_malloc_ptr (demangled_name);
+
+      /* If we were given a non-mangled name, canonicalize it
+	 according to the language (so far only for C++).  */
+      std::string canon = cp_canonicalize_string (name);
+      if (!canon.empty ())
+	return storage.swap_string (canon);
     }
   else if (lang == language_d)
     {
-      demangled_name = d_demangle (name, 0);
-      if (demangled_name)
-	{
-	  modified_name = demangled_name;
-	  make_cleanup (xfree, demangled_name);
-	}
+      char *demangled_name = d_demangle (name, 0);
+      if (demangled_name != NULL)
+	return storage.set_malloc_ptr (demangled_name);
     }
   else if (lang == language_go)
     {
-      demangled_name = go_demangle (name, 0);
-      if (demangled_name)
-	{
-	  modified_name = demangled_name;
-	  make_cleanup (xfree, demangled_name);
-	}
+      char *demangled_name = go_demangle (name, 0);
+      if (demangled_name != NULL)
+	return storage.set_malloc_ptr (demangled_name);
     }
 
-  *result_name = modified_name;
-  return cleanup;
+  return name;
 }
 
 /* See symtab.h.
@@ -1945,25 +1812,21 @@ demangle_for_lookup (const char *name, e
    variable and thus can probably assume it will never hit the C++
    code).  */
 
-struct symbol *
+struct block_symbol
 lookup_symbol_in_language (const char *name, const struct block *block,
 			   const domain_enum domain, enum language lang,
 			   struct field_of_this_result *is_a_field_of_this)
 {
-  const char *modified_name;
-  struct symbol *returnval;
-  struct cleanup *cleanup = demangle_for_lookup (name, lang, &modified_name);
-
-  returnval = lookup_symbol_aux (modified_name, block, domain, lang,
-				 is_a_field_of_this);
-  do_cleanups (cleanup);
+  demangle_result_storage storage;
+  const char *modified_name = demangle_for_lookup (name, lang, storage);
 
-  return returnval;
+  return lookup_symbol_aux (modified_name, block, domain, lang,
+			    is_a_field_of_this);
 }
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_symbol (const char *name, const struct block *block,
 	       domain_enum domain,
 	       struct field_of_this_result *is_a_field_of_this)
@@ -1975,12 +1838,12 @@ lookup_symbol (const char *name, const s
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_language_this (const struct language_defn *lang,
 		      const struct block *block)
 {
   if (lang->la_name_of_this == NULL || block == NULL)
-    return NULL;
+    return (struct block_symbol) {NULL, NULL};
 
   if (symbol_lookup_debug > 1)
     {
@@ -2006,8 +1869,7 @@ lookup_language_this (const struct langu
 				  host_address_to_string (sym),
 				  host_address_to_string (block));
 	    }
-	  block_found = block;
-	  return sym;
+	  return (struct block_symbol) {sym, block};
 	}
       if (BLOCK_FUNCTION (block))
 	break;
@@ -2016,7 +1878,7 @@ lookup_language_this (const struct langu
 
   if (symbol_lookup_debug > 1)
     fprintf_unfiltered (gdb_stdlog, " = NULL\n");
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Given TYPE, a structure/union,
@@ -2030,7 +1892,7 @@ check_field (struct type *type, const ch
   int i;
 
   /* The type may be a stub.  */
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--)
     {
@@ -2067,12 +1929,12 @@ check_field (struct type *type, const ch
 /* Behave like lookup_symbol except that NAME is the natural name
    (e.g., demangled name) of the symbol that we're looking for.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_symbol_aux (const char *name, const struct block *block,
 		   const domain_enum domain, enum language language,
 		   struct field_of_this_result *is_a_field_of_this)
 {
-  struct symbol *sym;
+  struct block_symbol result;
   const struct language_defn *langdef;
 
   if (symbol_lookup_debug)
@@ -2087,13 +1949,6 @@ lookup_symbol_aux (const char *name, con
 			  domain_name (domain), language_str (language));
     }
 
-  /* Initialize block_found so that the language la_lookup_symbol_nonlocal
-     routines don't have to set it (to NULL) if a primitive type is found.
-     We do this early so that block_found is also NULL if no symbol is
-     found (though this is not part of the API, and callers cannot assume
-     this).  */
-  block_found = NULL;
-
   /* Make sure we do something sensible with is_a_field_of_this, since
      the callers that set this parameter to some non-null value will
      certainly use it later.  If we don't set it, the contents of
@@ -2104,15 +1959,15 @@ lookup_symbol_aux (const char *name, con
   /* Search specified block and its superiors.  Don't search
      STATIC_BLOCK or GLOBAL_BLOCK.  */
 
-  sym = lookup_local_symbol (name, block, domain, language);
-  if (sym != NULL)
+  result = lookup_local_symbol (name, block, domain, language);
+  if (result.symbol != NULL)
     {
       if (symbol_lookup_debug)
 	{
 	  fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n",
-			      host_address_to_string (sym));
+			      host_address_to_string (result.symbol));
 	}
-      return sym;
+      return result;
     }
 
   /* If requested to do so by the caller and if appropriate for LANGUAGE,
@@ -2125,15 +1980,15 @@ lookup_symbol_aux (const char *name, con
      means.  */
   if (is_a_field_of_this != NULL && domain != STRUCT_DOMAIN)
     {
-      struct symbol *sym = lookup_language_this (langdef, block);
+      result = lookup_language_this (langdef, block);
 
-      if (sym)
+      if (result.symbol)
 	{
-	  struct type *t = sym->type;
+	  struct type *t = result.symbol->type;
 
 	  /* I'm not really sure that type of this can ever
 	     be typedefed; just be safe.  */
-	  CHECK_TYPEDEF (t);
+	  t = check_typedef (t);
 	  if (TYPE_CODE (t) == TYPE_CODE_PTR
 	      || TYPE_CODE (t) == TYPE_CODE_REF)
 	    t = TYPE_TARGET_TYPE (t);
@@ -2150,7 +2005,7 @@ lookup_symbol_aux (const char *name, con
 		  fprintf_unfiltered (gdb_stdlog,
 				      "lookup_symbol_aux (...) = NULL\n");
 		}
-	      return NULL;
+	      return (struct block_symbol) {NULL, NULL};
 	    }
 	}
     }
@@ -2158,33 +2013,35 @@ lookup_symbol_aux (const char *name, con
   /* Now do whatever is appropriate for LANGUAGE to look
      up static and global variables.  */
 
-  sym = langdef->la_lookup_symbol_nonlocal (langdef, name, block, domain);
-  if (sym != NULL)
+  result = langdef->la_lookup_symbol_nonlocal (langdef, name, block, domain);
+  if (result.symbol != NULL)
     {
       if (symbol_lookup_debug)
 	{
 	  fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n",
-			      host_address_to_string (sym));
+			      host_address_to_string (result.symbol));
 	}
-      return sym;
+      return result;
     }
 
   /* Now search all static file-level symbols.  Not strictly correct,
      but more useful than an error.  */
 
-  sym = lookup_static_symbol (name, domain);
+  result = lookup_static_symbol (name, domain);
   if (symbol_lookup_debug)
     {
       fprintf_unfiltered (gdb_stdlog, "lookup_symbol_aux (...) = %s\n",
-			  sym != NULL ? host_address_to_string (sym) : "NULL");
+			  result.symbol != NULL
+			    ? host_address_to_string (result.symbol)
+			    : "NULL");
     }
-  return sym;
+  return result;
 }
 
 /* Check to see if the symbol is defined in BLOCK or its superiors.
    Don't search STATIC_BLOCK or GLOBAL_BLOCK.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_local_symbol (const char *name, const struct block *block,
 		     const domain_enum domain,
 		     enum language language)
@@ -2196,19 +2053,21 @@ lookup_local_symbol (const char *name, c
   /* Check if either no block is specified or it's a global block.  */
 
   if (static_block == NULL)
-    return NULL;
+    return (struct block_symbol) {NULL, NULL};
 
   while (block != static_block)
     {
       sym = lookup_symbol_in_block (name, block, domain);
       if (sym != NULL)
-	return sym;
+	return (struct block_symbol) {sym, block};
 
       if (language == language_cplus || language == language_fortran)
         {
-          sym = cp_lookup_symbol_imports_or_template (scope, name, block,
-						      domain);
-          if (sym != NULL)
+          struct block_symbol sym
+	    = cp_lookup_symbol_imports_or_template (scope, name, block,
+						    domain);
+
+          if (sym.symbol != NULL)
             return sym;
         }
 
@@ -2219,7 +2078,7 @@ lookup_local_symbol (const char *name, c
 
   /* We've reached the end of the function without finding a result.  */
 
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* See symtab.h.  */
@@ -2275,7 +2134,6 @@ lookup_symbol_in_block (const char *name
 	  fprintf_unfiltered (gdb_stdlog, " = %s\n",
 			      host_address_to_string (sym));
 	}
-      block_found = block;
       return fixup_symbol_section (sym, NULL);
     }
 
@@ -2286,7 +2144,7 @@ lookup_symbol_in_block (const char *name
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_global_symbol_from_objfile (struct objfile *main_objfile,
 				   const char *name,
 				   const domain_enum domain)
@@ -2297,14 +2155,14 @@ lookup_global_symbol_from_objfile (struc
        objfile;
        objfile = objfile_separate_debug_iterate (main_objfile, objfile))
     {
-      struct symbol *sym = lookup_symbol_in_objfile (objfile, GLOBAL_BLOCK,
-						     name, domain);
+      struct block_symbol result
+        = lookup_symbol_in_objfile (objfile, GLOBAL_BLOCK, name, domain);
 
-      if (sym != NULL)
-	return sym;
+      if (result.symbol != NULL)
+	return result;
     }
 
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Check to see if the symbol is defined in one of the OBJFILE's
@@ -2312,7 +2170,7 @@ lookup_global_symbol_from_objfile (struc
    depending on whether or not we want to search global symbols or
    static symbols.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index,
 				  const char *name, const domain_enum domain)
 {
@@ -2334,27 +2192,29 @@ lookup_symbol_in_objfile_symtabs (struct
     {
       const struct blockvector *bv;
       const struct block *block;
-      struct symbol *sym;
+      struct block_symbol result;
 
       bv = COMPUNIT_BLOCKVECTOR (cust);
       block = BLOCKVECTOR_BLOCK (bv, block_index);
-      sym = block_lookup_symbol_primary (block, name, domain);
-      if (sym)
+      result.symbol = block_lookup_symbol_primary (block, name, domain);
+      result.block = block;
+      if (result.symbol != NULL)
 	{
 	  if (symbol_lookup_debug > 1)
 	    {
 	      fprintf_unfiltered (gdb_stdlog, " = %s (block %s)\n",
-				  host_address_to_string (sym),
+				  host_address_to_string (result.symbol),
 				  host_address_to_string (block));
 	    }
-	  block_found = block;
-	  return fixup_symbol_section (sym, objfile);
+	  result.symbol = fixup_symbol_section (result.symbol, objfile);
+	  return result;
+
 	}
     }
 
   if (symbol_lookup_debug > 1)
     fprintf_unfiltered (gdb_stdlog, " = NULL\n");
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Wrapper around lookup_symbol_in_objfile_symtabs for search_symbols.
@@ -2366,17 +2226,17 @@ lookup_symbol_in_objfile_symtabs (struct
    different.  Here we're called from search_symbols where it will only
    call us for the the objfile that contains a matching minsym.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_symbol_in_objfile_from_linkage_name (struct objfile *objfile,
 					    const char *linkage_name,
 					    domain_enum domain)
 {
   enum language lang = current_language->la_language;
-  const char *modified_name;
-  struct cleanup *cleanup = demangle_for_lookup (linkage_name, lang,
-						 &modified_name);
   struct objfile *main_objfile, *cur_objfile;
 
+  demangle_result_storage storage;
+  const char *modified_name = demangle_for_lookup (linkage_name, lang, storage);
+
   if (objfile->separate_debug_objfile_backlink)
     main_objfile = objfile->separate_debug_objfile_backlink;
   else
@@ -2386,22 +2246,18 @@ lookup_symbol_in_objfile_from_linkage_na
        cur_objfile;
        cur_objfile = objfile_separate_debug_iterate (main_objfile, cur_objfile))
     {
-      struct symbol *sym;
+      struct block_symbol result;
 
-      sym = lookup_symbol_in_objfile_symtabs (cur_objfile, GLOBAL_BLOCK,
-					      modified_name, domain);
-      if (sym == NULL)
-	sym = lookup_symbol_in_objfile_symtabs (cur_objfile, STATIC_BLOCK,
-						modified_name, domain);
-      if (sym != NULL)
-	{
-	  do_cleanups (cleanup);
-	  return sym;
-	}
+      result = lookup_symbol_in_objfile_symtabs (cur_objfile, GLOBAL_BLOCK,
+						 modified_name, domain);
+      if (result.symbol == NULL)
+	result = lookup_symbol_in_objfile_symtabs (cur_objfile, STATIC_BLOCK,
+						   modified_name, domain);
+      if (result.symbol != NULL)
+	return result;
     }
 
-  do_cleanups (cleanup);
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* A helper function that throws an exception when a symbol was found
@@ -2424,17 +2280,17 @@ Internal: %s symbol `%s' found in %s psy
 /* A helper function for various lookup routines that interfaces with
    the "quick" symbol table functions.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_symbol_via_quick_fns (struct objfile *objfile, int block_index,
 			     const char *name, const domain_enum domain)
 {
   struct compunit_symtab *cust;
   const struct blockvector *bv;
   const struct block *block;
-  struct symbol *sym;
+  struct block_symbol result;
 
   if (!objfile->sf)
-    return NULL;
+    return (struct block_symbol) {NULL, NULL};
 
   if (symbol_lookup_debug > 1)
     {
@@ -2454,36 +2310,37 @@ lookup_symbol_via_quick_fns (struct objf
 	  fprintf_unfiltered (gdb_stdlog,
 			      "lookup_symbol_via_quick_fns (...) = NULL\n");
 	}
-      return NULL;
+      return (struct block_symbol) {NULL, NULL};
     }
 
   bv = COMPUNIT_BLOCKVECTOR (cust);
   block = BLOCKVECTOR_BLOCK (bv, block_index);
-  sym = block_lookup_symbol (block, name, domain);
-  if (!sym)
+  result.symbol = block_lookup_symbol (block, name, domain);
+  if (result.symbol == NULL)
     error_in_psymtab_expansion (block_index, name, cust);
 
   if (symbol_lookup_debug > 1)
     {
       fprintf_unfiltered (gdb_stdlog,
 			  "lookup_symbol_via_quick_fns (...) = %s (block %s)\n",
-			  host_address_to_string (sym),
+			  host_address_to_string (result.symbol),
 			  host_address_to_string (block));
     }
 
-  block_found = block;
-  return fixup_symbol_section (sym, objfile);
+  result.symbol = fixup_symbol_section (result.symbol, objfile);
+  result.block = block;
+  return result;
 }
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
 			      const char *name,
 			      const struct block *block,
 			      const domain_enum domain)
 {
-  struct symbol *sym;
+  struct block_symbol result;
 
   /* NOTE: carlton/2003-05-19: The comments below were written when
      this (or what turned into this) was part of lookup_symbol_aux;
@@ -2517,9 +2374,9 @@ basic_lookup_symbol_nonlocal (const stru
      the current objfile.  Searching the current objfile first is useful
      for both matching user expectations as well as performance.  */
 
-  sym = lookup_symbol_in_static_block (name, block, domain);
-  if (sym != NULL)
-    return sym;
+  result = lookup_symbol_in_static_block (name, block, domain);
+  if (result.symbol != NULL)
+    return result;
 
   /* If we didn't find a definition for a builtin type in the static block,
      search for it now.  This is actually the right thing to do and can be
@@ -2535,9 +2392,11 @@ basic_lookup_symbol_nonlocal (const stru
 	gdbarch = target_gdbarch ();
       else
 	gdbarch = block_gdbarch (block);
-      sym = language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
-      if (sym != NULL)
-	return sym;
+      result.symbol = language_lookup_primitive_type_as_symbol (langdef,
+								gdbarch, name);
+      result.block = NULL;
+      if (result.symbol != NULL)
+	return result;
     }
 
   return lookup_global_symbol (name, block, domain);
@@ -2545,7 +2404,7 @@ basic_lookup_symbol_nonlocal (const stru
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_symbol_in_static_block (const char *name,
 			       const struct block *block,
 			       const domain_enum domain)
@@ -2554,7 +2413,7 @@ lookup_symbol_in_static_block (const cha
   struct symbol *sym;
 
   if (static_block == NULL)
-    return NULL;
+    return (struct block_symbol) {NULL, NULL};
 
   if (symbol_lookup_debug)
     {
@@ -2576,7 +2435,7 @@ lookup_symbol_in_static_block (const cha
 			  "lookup_symbol_in_static_block (...) = %s\n",
 			  sym != NULL ? host_address_to_string (sym) : "NULL");
     }
-  return sym;
+  return (struct block_symbol) {sym, static_block};
 }
 
 /* Perform the standard symbol lookup of NAME in OBJFILE:
@@ -2584,11 +2443,11 @@ lookup_symbol_in_static_block (const cha
    2) Search the "quick" symtabs (partial or .gdb_index).
    BLOCK_INDEX is one of GLOBAL_BLOCK or STATIC_BLOCK.  */
 
-static struct symbol *
+static struct block_symbol
 lookup_symbol_in_objfile (struct objfile *objfile, int block_index,
 			  const char *name, const domain_enum domain)
 {
-  struct symbol *result;
+  struct block_symbol result;
 
   if (symbol_lookup_debug)
     {
@@ -2602,14 +2461,14 @@ lookup_symbol_in_objfile (struct objfile
 
   result = lookup_symbol_in_objfile_symtabs (objfile, block_index,
 					     name, domain);
-  if (result != NULL)
+  if (result.symbol != NULL)
     {
       if (symbol_lookup_debug)
 	{
 	  fprintf_unfiltered (gdb_stdlog,
 			      "lookup_symbol_in_objfile (...) = %s"
 			      " (in symtabs)\n",
-			      host_address_to_string (result));
+			      host_address_to_string (result.symbol));
 	}
       return result;
     }
@@ -2620,22 +2479,22 @@ lookup_symbol_in_objfile (struct objfile
     {
       fprintf_unfiltered (gdb_stdlog,
 			  "lookup_symbol_in_objfile (...) = %s%s\n",
-			  result != NULL
-			  ? host_address_to_string (result)
+			  result.symbol != NULL
+			  ? host_address_to_string (result.symbol)
 			  : "NULL",
-			  result != NULL ? " (via quick fns)" : "");
+			  result.symbol != NULL ? " (via quick fns)" : "");
     }
   return result;
 }
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_static_symbol (const char *name, const domain_enum domain)
 {
   struct symbol_cache *cache = get_symbol_cache (current_program_space);
   struct objfile *objfile;
-  struct symbol *result;
+  struct block_symbol result;
   struct block_symbol_cache *bsc;
   struct symbol_cache_slot *slot;
 
@@ -2643,27 +2502,28 @@ lookup_static_symbol (const char *name, 
      NULL for OBJFILE_CONTEXT.  */
   result = symbol_cache_lookup (cache, NULL, STATIC_BLOCK, name, domain,
 				&bsc, &slot);
-  if (result != NULL)
+  if (result.symbol != NULL)
     {
-      if (result == SYMBOL_LOOKUP_FAILED)
-	return NULL;
+      if (SYMBOL_LOOKUP_FAILED_P (result))
+	return (struct block_symbol) {NULL, NULL};
       return result;
     }
 
   ALL_OBJFILES (objfile)
     {
       result = lookup_symbol_in_objfile (objfile, STATIC_BLOCK, name, domain);
-      if (result != NULL)
+      if (result.symbol != NULL)
 	{
 	  /* Still pass NULL for OBJFILE_CONTEXT here.  */
-	  symbol_cache_mark_found (bsc, slot, NULL, result);
+	  symbol_cache_mark_found (bsc, slot, NULL, result.symbol,
+				   result.block);
 	  return result;
 	}
     }
 
   /* Still pass NULL for OBJFILE_CONTEXT here.  */
   symbol_cache_mark_not_found (bsc, slot, NULL, name, domain);
-  return NULL;
+  return (struct block_symbol) {NULL, NULL};
 }
 
 /* Private data to be used with lookup_symbol_global_iterator_cb.  */
@@ -2677,8 +2537,8 @@ struct global_sym_lookup_data
   domain_enum domain;
 
   /* The field where the callback should store the symbol if found.
-     It should be initialized to NULL before the search is started.  */
-  struct symbol *result;
+     It should be initialized to {NULL, NULL} before the search is started.  */
+  struct block_symbol result;
 };
 
 /* A callback function for gdbarch_iterate_over_objfiles_in_search_order.
@@ -2693,25 +2553,26 @@ lookup_symbol_global_iterator_cb (struct
   struct global_sym_lookup_data *data =
     (struct global_sym_lookup_data *) cb_data;
 
-  gdb_assert (data->result == NULL);
+  gdb_assert (data->result.symbol == NULL
+	      && data->result.block == NULL);
 
   data->result = lookup_symbol_in_objfile (objfile, GLOBAL_BLOCK,
 					   data->name, data->domain);
 
   /* If we found a match, tell the iterator to stop.  Otherwise,
      keep going.  */
-  return (data->result != NULL);
+  return (data->result.symbol != NULL);
 }
 
 /* See symtab.h.  */
 
-struct symbol *
+struct block_symbol
 lookup_global_symbol (const char *name,
 		      const struct block *block,
 		      const domain_enum domain)
 {
   struct symbol_cache *cache = get_symbol_cache (current_program_space);
-  struct symbol *sym;
+  struct block_symbol result;
   struct objfile *objfile;
   struct global_sym_lookup_data lookup_data;
   struct block_symbol_cache *bsc;
@@ -2721,21 +2582,21 @@ lookup_global_symbol (const char *name,
 
   /* First see if we can find the symbol in the cache.
      This works because we use the current objfile to qualify the lookup.  */
-  sym = symbol_cache_lookup (cache, objfile, GLOBAL_BLOCK, name, domain,
-			     &bsc, &slot);
-  if (sym != NULL)
+  result = symbol_cache_lookup (cache, objfile, GLOBAL_BLOCK, name, domain,
+				&bsc, &slot);
+  if (result.symbol != NULL)
     {
-      if (sym == SYMBOL_LOOKUP_FAILED)
-	return NULL;
-      return sym;
+      if (SYMBOL_LOOKUP_FAILED_P (result))
+	return (struct block_symbol) {NULL, NULL};
+      return result;
     }
 
   /* Call library-specific lookup procedure.  */
   if (objfile != NULL)
-    sym = solib_global_lookup (objfile, name, domain);
+    result = solib_global_lookup (objfile, name, domain);
 
   /* If that didn't work go a global search (of global blocks, heh).  */
-  if (sym == NULL)
+  if (result.symbol == NULL)
     {
       memset (&lookup_data, 0, sizeof (lookup_data));
       lookup_data.name = name;
@@ -2743,15 +2604,15 @@ lookup_global_symbol (const char *name,
       gdbarch_iterate_over_objfiles_in_search_order
 	(objfile != NULL ? get_objfile_arch (objfile) : target_gdbarch (),
 	 lookup_symbol_global_iterator_cb, &lookup_data, objfile);
-      sym = lookup_data.result;
+      result = lookup_data.result;
     }
 
-  if (sym != NULL)
-    symbol_cache_mark_found (bsc, slot, objfile, sym);
+  if (result.symbol != NULL)
+    symbol_cache_mark_found (bsc, slot, objfile, result.symbol, result.block);
   else
     symbol_cache_mark_not_found (bsc, slot, objfile, name, domain);
 
-  return sym;
+  return result;
 }
 
 int
@@ -2760,11 +2621,9 @@ symbol_matches_domain (enum language sym
 		       domain_enum domain)
 {
   /* For C++ "struct foo { ... }" also defines a typedef for "foo".
-     A Java class declaration also defines a typedef for the class.
      Similarly, any Ada type declaration implicitly defines a typedef.  */
   if (symbol_language == language_cplus
       || symbol_language == language_d
-      || symbol_language == language_java
       || symbol_language == language_ada)
     {
       if ((domain == VAR_DOMAIN || domain == STRUCT_DOMAIN)
@@ -2850,11 +2709,7 @@ basic_lookup_transparent_type_1 (struct 
 struct type *
 basic_lookup_transparent_type (const char *name)
 {
-  struct symbol *sym;
-  struct compunit_symtab *cust;
-  const struct blockvector *bv;
   struct objfile *objfile;
-  struct block *block;
   struct type *t;
 
   /* Now search all the global symbols.  Do the symtab's first, then
@@ -2901,18 +2756,17 @@ basic_lookup_transparent_type (const cha
 }
 
 /* Iterate over the symbols named NAME, matching DOMAIN, in BLOCK.
-   
-   For each symbol that matches, CALLBACK is called.  The symbol and
-   DATA are passed to the callback.
-   
-   If CALLBACK returns zero, the iteration ends.  Otherwise, the
+
+   For each symbol that matches, CALLBACK is called.  The symbol is
+   passed to the callback.
+
+   If CALLBACK returns false, the iteration ends.  Otherwise, the
    search continues.  */
 
 void
 iterate_over_symbols (const struct block *block, const char *name,
 		      const domain_enum domain,
-		      symbol_found_callback_ftype *callback,
-		      void *data)
+		      gdb::function_view<symbol_found_callback_ftype> callback)
 {
   struct block_iterator iter;
   struct symbol *sym;
@@ -2922,7 +2776,7 @@ iterate_over_symbols (const struct block
       if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
 				 SYMBOL_DOMAIN (sym), domain))
 	{
-	  if (!callback (sym, data))
+	  if (!callback (sym))
 	    return;
 	}
     }
@@ -3623,7 +3477,11 @@ find_function_start_sal (struct symbol *
       && (COMPUNIT_LOCATIONS_VALID (SYMTAB_COMPUNIT (sal.symtab))
 	  || SYMTAB_LANGUAGE (sal.symtab) == language_asm))
     {
+      struct gdbarch *gdbarch = symbol_arch (sym);
+
       sal.pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+      if (gdbarch_skip_entrypoint_p (gdbarch))
+	sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc);
       return sal;
     }
 
@@ -4129,9 +3987,8 @@ struct filename_seen_cache
 static struct filename_seen_cache *
 create_filename_seen_cache (void)
 {
-  struct filename_seen_cache *cache;
+  struct filename_seen_cache *cache = XNEW (struct filename_seen_cache);
 
-  cache = XNEW (struct filename_seen_cache);
   cache->tab = htab_create_alloc (INITIAL_FILENAME_SEEN_CACHE_SIZE,
 				  filename_hash, filename_eq,
 				  NULL, xcalloc, xfree);
@@ -4153,7 +4010,7 @@ clear_filename_seen_cache (struct filena
 static void
 delete_filename_seen_cache (void *ptr)
 {
-  struct filename_seen_cache *cache = ptr;
+  struct filename_seen_cache *cache = (struct filename_seen_cache *) ptr;
 
   htab_delete (cache->tab);
   xfree (cache);
@@ -4233,7 +4090,8 @@ static void
 output_partial_symbol_filename (const char *filename, const char *fullname,
 				void *data)
 {
-  output_source_filename (fullname ? fullname : filename, data);
+  output_source_filename (fullname ? fullname : filename,
+			  (struct output_source_filename_data *) data);
 }
 
 static void
@@ -4360,14 +4218,14 @@ sort_search_symbols_remove_dups (struct 
 				 struct symbol_search **new_head,
 				 struct symbol_search **new_tail)
 {
-  struct symbol_search **symbols, *symp, *old_next;
+  struct symbol_search **symbols, *symp;
   int i, j, nunique;
 
   gdb_assert (found != NULL && nfound > 0);
 
   /* Build an array out of the list so we can easily sort them.  */
-  symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *)
-					       * nfound);
+  symbols = XNEWVEC (struct symbol_search *, nfound);
+
   symp = found;
   for (i = 0; i < nfound; i++)
     {
@@ -4402,39 +4260,6 @@ sort_search_symbols_remove_dups (struct 
   xfree (symbols);
 }
 
-/* An object of this type is passed as the user_data to the
-   expand_symtabs_matching method.  */
-struct search_symbols_data
-{
-  int nfiles;
-  const char **files;
-
-  /* It is true if PREG contains valid data, false otherwise.  */
-  unsigned preg_p : 1;
-  regex_t preg;
-};
-
-/* A callback for expand_symtabs_matching.  */
-
-static int
-search_symbols_file_matches (const char *filename, void *user_data,
-			     int basenames)
-{
-  struct search_symbols_data *data = user_data;
-
-  return file_matches (filename, data->files, data->nfiles, basenames);
-}
-
-/* A callback for expand_symtabs_matching.  */
-
-static int
-search_symbols_name_matches (const char *symname, void *user_data)
-{
-  struct search_symbols_data *data = user_data;
-
-  return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
-}
-
 /* Search the symbol table for matches to the regular expression REGEXP,
    returning the results in *MATCHES.
 
@@ -4479,8 +4304,10 @@ search_symbols (const char *regexp, enum
   enum minimal_symbol_type ourtype4;
   struct symbol_search *found;
   struct symbol_search *tail;
-  struct search_symbols_data datum;
   int nfound;
+  /* This is true if PREG contains valid data, false otherwise.  */
+  bool preg_p;
+  regex_t preg;
 
   /* OLD_CHAIN .. RETVAL_CHAIN is always freed, RETVAL_CHAIN .. current
      CLEANUP_CHAIN is freed only in the case of an error.  */
@@ -4495,7 +4322,7 @@ search_symbols (const char *regexp, enum
   ourtype4 = types4[kind];
 
   *matches = NULL;
-  datum.preg_p = 0;
+  preg_p = false;
 
   if (regexp != NULL)
     {
@@ -4534,31 +4361,35 @@ search_symbols (const char *regexp, enum
 	    }
 	}
 
-      errcode = regcomp (&datum.preg, regexp,
+      errcode = regcomp (&preg, regexp,
 			 REG_NOSUB | (case_sensitivity == case_sensitive_off
 				      ? REG_ICASE : 0));
       if (errcode != 0)
 	{
-	  char *err = get_regcomp_error (errcode, &datum.preg);
+	  char *err = get_regcomp_error (errcode, &preg);
 
 	  make_cleanup (xfree, err);
 	  error (_("Invalid regexp (%s): %s"), err, regexp);
 	}
-      datum.preg_p = 1;
-      make_regfree_cleanup (&datum.preg);
+      preg_p = true;
+      make_regfree_cleanup (&preg);
     }
 
   /* Search through the partial symtabs *first* for all symbols
      matching the regexp.  That way we don't have to reproduce all of
      the machinery below.  */
-
-  datum.nfiles = nfiles;
-  datum.files = files;
-  expand_symtabs_matching ((nfiles == 0
-			    ? NULL
-			    : search_symbols_file_matches),
-			   search_symbols_name_matches,
-			   NULL, kind, &datum);
+  expand_symtabs_matching ([&] (const char *filename, bool basenames)
+			   {
+			     return file_matches (filename, files, nfiles,
+						  basenames);
+			   },
+			   [&] (const char *symname)
+			   {
+			     return (!preg_p || regexec (&preg, symname,
+							 0, NULL, 0) == 0);
+			   },
+			   NULL,
+			   kind);
 
   /* Here, we search through the minimal symbol tables for functions
      and variables that match, and force their symbols to be read.
@@ -4590,8 +4421,8 @@ search_symbols (const char *regexp, enum
 	    || MSYMBOL_TYPE (msymbol) == ourtype3
 	    || MSYMBOL_TYPE (msymbol) == ourtype4)
 	  {
-	    if (!datum.preg_p
-		|| regexec (&datum.preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
+	    if (!preg_p
+		|| regexec (&preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
 			    NULL, 0) == 0)
 	      {
 		/* Note: An important side-effect of these lookup functions
@@ -4602,7 +4433,7 @@ search_symbols (const char *regexp, enum
 		       (MSYMBOL_VALUE_ADDRESS (objfile, msymbol)) == NULL)
 		    : (lookup_symbol_in_objfile_from_linkage_name
 		       (objfile, MSYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
-		       == NULL))
+		       .symbol == NULL))
 		  found_misc = 1;
 	      }
 	  }
@@ -4634,8 +4465,8 @@ search_symbols (const char *regexp, enum
 				       files, nfiles, 1))
 		     && file_matches (symtab_to_fullname (real_symtab),
 				      files, nfiles, 0)))
-		&& ((!datum.preg_p
-		     || regexec (&datum.preg, SYMBOL_NATURAL_NAME (sym), 0,
+		&& ((!preg_p
+		     || regexec (&preg, SYMBOL_NATURAL_NAME (sym), 0,
 				 NULL, 0) == 0)
 		    && ((kind == VARIABLES_DOMAIN
 			 && SYMBOL_CLASS (sym) != LOC_TYPEDEF
@@ -4653,11 +4484,10 @@ search_symbols (const char *regexp, enum
 			    && SYMBOL_CLASS (sym) == LOC_TYPEDEF))))
 	      {
 		/* match */
-		struct symbol_search *psr = (struct symbol_search *)
-		  xmalloc (sizeof (struct symbol_search));
+		struct symbol_search *psr = XCNEW (struct symbol_search);
+
 		psr->block = i;
 		psr->symbol = sym;
-		memset (&psr->msymbol, 0, sizeof (psr->msymbol));
 		psr->next = NULL;
 		if (tail == NULL)
 		  found = psr;
@@ -4693,8 +4523,8 @@ search_symbols (const char *regexp, enum
 	    || MSYMBOL_TYPE (msymbol) == ourtype3
 	    || MSYMBOL_TYPE (msymbol) == ourtype4)
 	  {
-	    if (!datum.preg_p
-		|| regexec (&datum.preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
+	    if (!preg_p
+		|| regexec (&preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
 			    NULL, 0) == 0)
 	      {
 		/* For functions we can do a quick check of whether the
@@ -4705,11 +4535,10 @@ search_symbols (const char *regexp, enum
 		  {
 		    if (lookup_symbol_in_objfile_from_linkage_name
 			(objfile, MSYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
-			== NULL)
+			.symbol == NULL)
 		      {
 			/* match */
-			struct symbol_search *psr = (struct symbol_search *)
-			  xmalloc (sizeof (struct symbol_search));
+			struct symbol_search *psr = XNEW (struct symbol_search);
 			psr->block = i;
 			psr->msymbol.minsym = msymbol;
 			psr->msymbol.objfile = objfile;
@@ -4904,7 +4733,7 @@ rbreak_command (char *regexp, int from_t
 	  char *local_name;
 
 	  colon_index = colon - regexp;
-	  local_name = alloca (colon_index + 1);
+	  local_name = (char *) alloca (colon_index + 1);
 	  memcpy (local_name, regexp, colon_index);
 	  local_name[colon_index--] = 0;
 	  while (isspace (local_name[colon_index]))
@@ -4935,7 +4764,7 @@ rbreak_command (char *regexp, int from_t
 
 	  if (newlen > len)
 	    {
-	      string = xrealloc (string, newlen);
+	      string = (char *) xrealloc (string, newlen);
 	      len = newlen;
 	    }
 	  strcpy (string, fullname);
@@ -4954,7 +4783,7 @@ rbreak_command (char *regexp, int from_t
 
 	  if (newlen > len)
 	    {
-	      string = xrealloc (string, newlen);
+	      string = (char *) xrealloc (string, newlen);
 	      len = newlen;
 	    }
 	  strcpy (string, "'");
@@ -5023,7 +4852,7 @@ free_completion_list (VEC (char_ptr) **l
 static void
 do_free_completion_list (void *list)
 {
-  free_completion_list (list);
+  free_completion_list ((VEC (char_ptr) **) list);
 }
 
 /* Helper routine for make_symbol_completion_list.  */
@@ -5069,19 +4898,19 @@ completion_list_add_name (const char *sy
 
     if (word == sym_text)
       {
-	newobj = xmalloc (strlen (symname) + 5);
+	newobj = (char *) xmalloc (strlen (symname) + 5);
 	strcpy (newobj, symname);
       }
     else if (word > sym_text)
       {
 	/* Return some portion of symname.  */
-	newobj = xmalloc (strlen (symname) + 5);
+	newobj = (char *) xmalloc (strlen (symname) + 5);
 	strcpy (newobj, symname + (word - sym_text));
       }
     else
       {
 	/* Return some of SYM_TEXT plus symname.  */
-	newobj = xmalloc (strlen (symname) + (sym_text - word) + 5);
+	newobj = (char *) xmalloc (strlen (symname) + (sym_text - word) + 5);
 	strncpy (newobj, word, sym_text - word);
 	newobj[sym_text - word] = '\0';
 	strcat (newobj, symname);
@@ -5137,7 +4966,7 @@ completion_list_objc_symbol (struct mini
 	tmplen = 1024;
       else
 	tmplen *= 2;
-      tmp = xrealloc (tmp, tmplen);
+      tmp = (char *) xrealloc (tmp, tmplen);
     }
   selector = strchr (method, ' ');
   if (selector != NULL)
@@ -5232,46 +5061,6 @@ completion_list_add_fields (struct symbo
     }
 }
 
-/* Type of the user_data argument passed to add_macro_name,
-   symbol_completion_matcher and symtab_expansion_callback.  */
-
-struct add_name_data
-{
-  /* Arguments required by completion_list_add_name.  */
-  const char *sym_text;
-  int sym_text_len;
-  const char *text;
-  const char *word;
-
-  /* Extra argument required for add_symtab_completions.  */
-  enum type_code code;
-};
-
-/* A callback used with macro_for_each and macro_for_each_in_scope.
-   This adds a macro's name to the current completion list.  */
-
-static void
-add_macro_name (const char *name, const struct macro_definition *ignore,
-		struct macro_source_file *ignore2, int ignore3,
-		void *user_data)
-{
-  struct add_name_data *datum = (struct add_name_data *) user_data;
-
-  completion_list_add_name (name,
-			    datum->sym_text, datum->sym_text_len,
-			    datum->text, datum->word);
-}
-
-/* A callback for expand_symtabs_matching.  */
-
-static int
-symbol_completion_matcher (const char *name, void *user_data)
-{
-  struct add_name_data *datum = (struct add_name_data *) user_data;
-
-  return compare_symbol_name (name, datum->sym_text, datum->sym_text_len);
-}
-
 /* Add matching symbols from SYMTAB to the current completion list.  */
 
 static void
@@ -5285,6 +5074,9 @@ add_symtab_completions (struct compunit_
   struct block_iterator iter;
   int i;
 
+  if (cust == NULL)
+    return;
+
   for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
     {
       QUIT;
@@ -5301,21 +5093,6 @@ add_symtab_completions (struct compunit_
     }
 }
 
-/* Callback to add completions to the current list when symbol tables
-   are expanded during completion list generation.  */
-
-static void
-symtab_expansion_callback (struct compunit_symtab *symtab,
-			   void *user_data)
-{
-  struct add_name_data *datum = (struct add_name_data *) user_data;
-
-  add_symtab_completions (symtab,
-			  datum->sym_text, datum->sym_text_len,
-			  datum->text, datum->word,
-			  datum->code);
-}
-
 static void
 default_make_symbol_completion_list_break_on_1 (const char *text,
 						const char *word,
@@ -5337,7 +5114,6 @@ default_make_symbol_completion_list_brea
   const char *sym_text;
   /* Length of sym_text.  */
   int sym_text_len;
-  struct add_name_data datum;
   struct cleanup *cleanups;
 
   /* Now look for the symbol we are supposed to complete on.  */
@@ -5396,13 +5172,12 @@ default_make_symbol_completion_list_brea
   /* Prepare SYM_TEXT_LEN for compare_symbol_name.  */
 
   if (current_language->la_language == language_cplus
-      || current_language->la_language == language_java
       || current_language->la_language == language_fortran)
     {
       /* These languages may have parameters entered by user but they are never
 	 present in the partial symbol tables.  */
 
-      const char *cs = memchr (sym_text, '(', sym_text_len);
+      const char *cs = (const char *) memchr (sym_text, '(', sym_text_len);
 
       if (cs)
 	sym_text_len = cs - sym_text;
@@ -5412,12 +5187,6 @@ default_make_symbol_completion_list_brea
   completion_tracker = new_completion_tracker ();
   cleanups = make_cleanup_free_completion_tracker (&completion_tracker);
 
-  datum.sym_text = sym_text;
-  datum.sym_text_len = sym_text_len;
-  datum.text = text;
-  datum.word = word;
-  datum.code = code;
-
   /* At this point scan through the misc symbol vectors and add each
      symbol you find to the list.  Eventually we want to ignore
      anything that isn't a text symbol (everything else will be
@@ -5441,13 +5210,22 @@ default_make_symbol_completion_list_brea
     add_symtab_completions (cust, sym_text, sym_text_len, text, word,
 			    code);
 
-  /* Look through the partial symtabs for all symbols which begin
-     by matching SYM_TEXT.  Expand all CUs that you find to the list.
-     symtab_expansion_callback is called for each expanded symtab,
-     causing those symtab's completions to be added to the list too.  */
-  expand_symtabs_matching (NULL, symbol_completion_matcher,
-			   symtab_expansion_callback, ALL_DOMAIN,
-			   &datum);
+  /* Look through the partial symtabs for all symbols which begin by
+     matching SYM_TEXT.  Expand all CUs that you find to the list.  */
+  expand_symtabs_matching (NULL,
+			   [&] (const char *name) /* symbol matcher */
+			     {
+			       return compare_symbol_name (name,
+							   sym_text,
+							   sym_text_len);
+			     },
+			   [&] (compunit_symtab *symtab) /* expansion notify */
+			     {
+			       add_symtab_completions (symtab,
+						       sym_text, sym_text_len,
+						       text, word, code);
+			     },
+			   ALL_DOMAIN);
 
   /* Search upwards from currently selected frame (so that we can
      complete on local vars).  Also catch fields of types defined in
@@ -5505,6 +5283,17 @@ default_make_symbol_completion_list_brea
     {
       struct macro_scope *scope;
 
+      /* This adds a macro's name to the current completion list.  */
+      auto add_macro_name = [&] (const char *macro_name,
+				 const macro_definition *,
+				 macro_source_file *,
+				 int)
+	{
+	  completion_list_add_name (macro_name,
+				    sym_text, sym_text_len,
+				    text, word);
+	};
+
       /* Add any macros visible in the default scope.  Note that this
 	 may yield the occasional wrong result, because an expression
 	 might be evaluated in a scope other than the default.  For
@@ -5516,12 +5305,12 @@ default_make_symbol_completion_list_brea
       if (scope)
 	{
 	  macro_for_each_in_scope (scope->file, scope->line,
-				   add_macro_name, &datum);
+				   add_macro_name);
 	  xfree (scope);
 	}
 
       /* User-defined macros are always visible.  */
-      macro_for_each (macro_user_macros, add_macro_name, &datum);
+      macro_for_each (macro_user_macros, add_macro_name);
     }
 
   do_cleanups (cleanups);
@@ -5598,14 +5387,11 @@ make_symbol_completion_list_fn (struct c
 /* Like make_symbol_completion_list, but returns a list of symbols
    defined in a source file FILE.  */
 
-VEC (char_ptr) *
-make_file_symbol_completion_list (const char *text, const char *word,
-				  const char *srcfile)
+static VEC (char_ptr) *
+make_file_symbol_completion_list_1 (const char *text, const char *word,
+				    const char *srcfile)
 {
-  struct symbol *sym;
   struct symtab *s;
-  struct block *b;
-  struct block_iterator iter;
   /* The symbol we are completing on.  Points in same buffer as text.  */
   const char *sym_text;
   /* Length of sym_text.  */
@@ -5656,8 +5442,6 @@ make_file_symbol_completion_list (const 
 
   sym_text_len = strlen (sym_text);
 
-  return_val = NULL;
-
   /* Find the symtab for SRCFILE (this loads it if it was not yet read
      in).  */
   s = lookup_symtab (srcfile);
@@ -5677,20 +5461,41 @@ make_file_symbol_completion_list (const 
 
   /* Go through this symtab and check the externs and statics for
      symbols which match.  */
+  add_symtab_completions (SYMTAB_COMPUNIT (s),
+			  sym_text, sym_text_len,
+			  text, word, TYPE_CODE_UNDEF);
+
+  return (return_val);
+}
+
+/* Wrapper around make_file_symbol_completion_list_1
+   to handle MAX_COMPLETIONS_REACHED_ERROR.  */
+
+VEC (char_ptr) *
+make_file_symbol_completion_list (const char *text, const char *word,
+				  const char *srcfile)
+{
+  struct cleanup *back_to, *cleanups;
 
-  b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
-  ALL_BLOCK_SYMBOLS (b, iter, sym)
+  completion_tracker = new_completion_tracker ();
+  cleanups = make_cleanup_free_completion_tracker (&completion_tracker);
+  return_val = NULL;
+  back_to = make_cleanup (do_free_completion_list, &return_val);
+
+  TRY
     {
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+      make_file_symbol_completion_list_1 (text, word, srcfile);
     }
-
-  b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
-  ALL_BLOCK_SYMBOLS (b, iter, sym)
+  CATCH (except, RETURN_MASK_ERROR)
     {
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+      if (except.error != MAX_COMPLETIONS_REACHED_ERROR)
+	throw_exception (except);
     }
+  END_CATCH
 
-  return (return_val);
+  discard_cleanups (back_to);
+  do_cleanups (cleanups);
+  return return_val;
 }
 
 /* A helper function for make_source_files_completion_list.  It adds
@@ -5707,19 +5512,19 @@ add_filename_to_list (const char *fname,
   if (word == text)
     {
       /* Return exactly fname.  */
-      newobj = xmalloc (fnlen + 5);
+      newobj = (char *) xmalloc (fnlen + 5);
       strcpy (newobj, fname);
     }
   else if (word > text)
     {
       /* Return some portion of fname.  */
-      newobj = xmalloc (fnlen + 5);
+      newobj = (char *) xmalloc (fnlen + 5);
       strcpy (newobj, fname + (word - text));
     }
   else
     {
       /* Return some of TEXT plus fname.  */
-      newobj = xmalloc (fnlen + (text - word) + 5);
+      newobj = (char *) xmalloc (fnlen + (text - word) + 5);
       strncpy (newobj, word, text - word);
       newobj[text - word] = '\0';
       strcat (newobj, fname);
@@ -5761,7 +5566,8 @@ static void
 maybe_add_partial_symtab_filename (const char *filename, const char *fullname,
 				   void *user_data)
 {
-  struct add_partial_filename_data *data = user_data;
+  struct add_partial_filename_data *data
+    = (struct add_partial_filename_data *) user_data;
 
   if (not_interesting_fname (filename))
     return;
@@ -5858,7 +5664,8 @@ make_source_files_completion_list (const
 static struct main_info *
 get_main_info (void)
 {
-  struct main_info *info = program_space_data (current_program_space,
+  struct main_info *info
+    = (struct main_info *) program_space_data (current_program_space,
 					       main_progspace_key);
 
   if (info == NULL)
@@ -5884,7 +5691,7 @@ get_main_info (void)
 static void
 main_info_cleanup (struct program_space *pspace, void *data)
 {
-  struct main_info *info = data;
+  struct main_info *info = (struct main_info *) data;
 
   if (info != NULL)
     xfree (info->name_of_main);
@@ -6088,7 +5895,7 @@ register_symbol_computed_impl (enum addr
   gdb_assert (ops != NULL);
   gdb_assert (ops->tracepoint_var_ref != NULL);
   gdb_assert (ops->describe_location != NULL);
-  gdb_assert (ops->read_needs_frame != NULL);
+  gdb_assert (ops->get_symbol_read_needs != NULL);
   gdb_assert (ops->read_variable != NULL);
 
   return result;
@@ -6145,7 +5952,7 @@ initialize_ordinary_address_classes (voi
   int i;
 
   for (i = 0; i < LOC_FINAL_VALUE; ++i)
-    symbol_impl[i].aclass = i;
+    symbol_impl[i].aclass = (enum address_class) i;
 }
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symtab.h ./gdb/symtab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/symtab.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/symtab.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Symbol table definitions for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,8 @@
 #include "vec.h"
 #include "gdb_vecs.h"
 #include "gdbtypes.h"
+#include "common/enum-flags.h"
+#include "common/function-view.h"
 
 /* Opaque declarations.  */
 struct ui_file;
@@ -38,6 +40,8 @@ struct program_space;
 struct language_defn;
 struct probe;
 struct common_block;
+struct obj_section;
+struct cmd_list_element;
 
 /* Some of the structures in this file are space critical.
    The space-critical structures are:
@@ -134,12 +138,8 @@ struct general_symbol_info
     struct obstack *obstack;
 
     /* This is used by languages which wish to store a demangled name.
-       currently used by Ada, C++, Java, and Objective C.  */
-    struct mangled_lang
-    {
-      const char *demangled_name;
-    }
-    mangled_lang;
+       currently used by Ada, C++, and Objective C.  */
+    const char *demangled_name;
   }
   language_specific;
 
@@ -147,9 +147,9 @@ struct general_symbol_info
      This is used to select one of the fields from the language specific
      union above.  */
 
-  ENUM_BITFIELD(language) language : 8;
+  ENUM_BITFIELD(language) language : LANGUAGE_BITS;
 
-  /* This is only used by Ada.  If set, then the 'mangled_lang' field
+  /* This is only used by Ada.  If set, then the 'demangled_name' field
      of language_specific is valid.  Otherwise, the 'obstack' field is
      valid.  */
   unsigned int ada_mangled : 1;
@@ -262,7 +262,7 @@ extern const char *symbol_demangled_name
 extern int demangle;
 
 /* Macro that returns the name to be used when sorting and searching symbols.
-   In  C++ and Java, we search for the demangled form of a name,
+   In C++, we search for the demangled form of a name,
    and so sort symbols accordingly.  In Ada, however, we search by mangled
    name.  If there is no distinct demangled name, then SYMBOL_SEARCH_NAME
    returns the same value (same pointer) as SYMBOL_LINKAGE_NAME.  */
@@ -307,9 +307,15 @@ enum minimal_symbol_type
      within a given .o file.  */
   mst_file_text,		/* Static version of mst_text */
   mst_file_data,		/* Static version of mst_data */
-  mst_file_bss			/* Static version of mst_bss */
+  mst_file_bss,			/* Static version of mst_bss */
+  nr_minsym_types
 };
 
+/* The number of enum minimal_symbol_type values, with some padding for
+   reasonable growth.  */
+#define MINSYM_TYPE_BITS 4
+gdb_static_assert (nr_minsym_types <= (1 << MINSYM_TYPE_BITS));
+
 /* Define a simple structure used to hold some very basic information about
    all defined global symbols (text, data, bss, abs, etc).  The only required
    information is the general_symbol_info.
@@ -332,7 +338,7 @@ struct minimal_symbol
 
   struct general_symbol_info mginfo;
 
-  /* Size of this symbol.  end_psymtab in dbxread.c uses this
+  /* Size of this symbol.  dbx_end_psymtab in dbxread.c uses this
      information to calculate the end of the partial symtab based on the
      address of the last symbol plus the size of the last symbol.  */
 
@@ -343,7 +349,7 @@ struct minimal_symbol
 
   /* Classification type for this minimal symbol.  */
 
-  ENUM_BITFIELD(minimal_symbol_type) type : 8;
+  ENUM_BITFIELD(minimal_symbol_type) type : MINSYM_TYPE_BITS;
 
   /* Non-zero if this symbol was created by gdb.
      Such symbols do not appear in the output of "info var|fun".  */
@@ -458,12 +464,16 @@ typedef enum domain_enum_tag
 
   /* Fortran common blocks.  Their naming must be separate from VAR_DOMAIN.
      They also always use LOC_COMMON_BLOCK.  */
-  COMMON_BLOCK_DOMAIN
+  COMMON_BLOCK_DOMAIN,
+
+  /* This must remain last.  */
+  NR_DOMAINS
 } domain_enum;
 
 /* The number of bits in a symbol used to represent the domain.  */
 
-#define SYMBOL_DOMAIN_BITS 4
+#define SYMBOL_DOMAIN_BITS 3
+gdb_static_assert (NR_DOMAINS <= (1 << SYMBOL_DOMAIN_BITS));
 
 extern const char *domain_name (domain_enum);
 
@@ -572,7 +582,13 @@ enum address_class
      not find it in the full symbol table.  But a reference to an external
      symbol in a local block shadowing other definition requires full symbol
      without possibly having its address available for LOC_STATIC.  Testcase
-     is provided as `gdb.dwarf2/dw2-unresolved.exp'.  */
+     is provided as `gdb.dwarf2/dw2-unresolved.exp'.
+
+     This is also used for thread local storage (TLS) variables.  In this case,
+     the address of the TLS variable must be determined when the variable is
+     referenced, from the MSYMBOL_VALUE_RAW_ADDRESS, which is the offset
+     of the TLS variable in the thread local storage of the shared
+     library/object.  */
 
   LOC_UNRESOLVED,
 
@@ -593,6 +609,15 @@ enum address_class
   LOC_FINAL_VALUE
 };
 
+/* The number of bits needed for values in enum address_class, with some
+   padding for reasonable growth, and room for run-time registered address
+   classes. See symtab.c:MAX_SYMBOL_IMPLS.
+   This is a #define so that we can have a assertion elsewhere to
+   verify that we have reserved enough space for synthetic address
+   classes.  */
+#define SYMBOL_ACLASS_BITS 5
+gdb_static_assert (LOC_FINAL_VALUE <= (1 << SYMBOL_ACLASS_BITS));
+
 /* The methods needed to implement LOC_COMPUTED.  These methods can
    use the symbol's .aux_value for additional per-symbol information.
 
@@ -605,7 +630,8 @@ struct symbol_computed_ops
      frame FRAME.  If the variable has been optimized out, return
      zero.
 
-     Iff `read_needs_frame (SYMBOL)' is zero, then FRAME may be zero.  */
+     Iff `read_needs_frame (SYMBOL)' is not SYMBOL_NEEDS_FRAME, then
+     FRAME may be zero.  */
 
   struct value *(*read_variable) (struct symbol * symbol,
 				  struct frame_info * frame);
@@ -616,8 +642,11 @@ struct symbol_computed_ops
   struct value *(*read_variable_at_entry) (struct symbol *symbol,
 					   struct frame_info *frame);
 
-  /* Return non-zero if we need a frame to find the value of the SYMBOL.  */
-  int (*read_needs_frame) (struct symbol * symbol);
+  /* Find the "symbol_needs_kind" value for the given symbol.  This
+     value determines whether reading the symbol needs memory (e.g., a
+     global variable), just registers (a thread-local), or a frame (a
+     local variable).  */
+  enum symbol_needs_kind (*get_symbol_read_needs) (struct symbol * symbol);
 
   /* Write to STREAM a natural-language description of the location of
      SYMBOL, in the context of ADDR.  */
@@ -646,7 +675,7 @@ struct symbol_computed_ops
      The generated C code must assign the location to a local
      variable; this variable's name is RESULT_NAME.  */
 
-  void (*generate_c_location) (struct symbol *symbol, struct ui_file *stream,
+  void (*generate_c_location) (struct symbol *symbol, string_file &stream,
 			       struct gdbarch *gdbarch,
 			       unsigned char *registers_used,
 			       CORE_ADDR pc, const char *result_name);
@@ -665,6 +694,25 @@ struct symbol_block_ops
      uninitialized in such case.  */
   void (*find_frame_base_location) (struct symbol *framefunc, CORE_ADDR pc,
 				    const gdb_byte **start, size_t *length);
+
+  /* Return the frame base address.  FRAME is the frame for which we want to
+     compute the base address while FRAMEFUNC is the symbol for the
+     corresponding function.  Return 0 on failure (FRAMEFUNC may not hold the
+     information we need).
+
+     This method is designed to work with static links (nested functions
+     handling).  Static links are function properties whose evaluation returns
+     the frame base address for the enclosing frame.  However, there are
+     multiple definitions for "frame base": the content of the frame base
+     register, the CFA as defined by DWARF unwinding information, ...
+
+     So this specific method is supposed to compute the frame base address such
+     as for nested fuctions, the static link computes the same address.  For
+     instance, considering DWARF debugging information, the static link is
+     computed with DW_AT_static_link and this method must be used to compute
+     the corresponding DW_AT_frame_base attribute.  */
+  CORE_ADDR (*get_frame_base) (struct symbol *framefunc,
+			       struct frame_info *frame);
 };
 
 /* Functions used with LOC_REGISTER and LOC_REGPARM_ADDR.  */
@@ -691,13 +739,6 @@ struct symbol_impl
   const struct symbol_register_ops *ops_register;
 };
 
-/* The number of bits we reserve in a symbol for the aclass index.
-   This is a #define so that we can have a assertion elsewhere to
-   verify that we have reserved enough space for synthetic address
-   classes.  */
-
-#define SYMBOL_ACLASS_BITS 6
-
 /* This structure is space critical.  See space comments at the top.  */
 
 struct symbol
@@ -767,11 +808,10 @@ struct symbol
   /* An arbitrary data pointer, allowing symbol readers to record
      additional information on a per-symbol basis.  Note that this data
      must be allocated using the same obstack as the symbol itself.  */
-  /* So far it is only used by LOC_COMPUTED to
-     find the location information.  For a LOC_BLOCK symbol
-     for a function in a compilation unit compiled with DWARF 2
-     information, this is information used internally by the DWARF 2
-     code --- specifically, the location expression for the frame
+  /* So far it is only used by:
+     LOC_COMPUTED: to find the location information
+     LOC_BLOCK (DWARF2 function): information used internally by the
+     DWARF 2 code --- specifically, the location expression for the frame
      base for this function.  */
   /* FIXME drow/2003-02-21: For the LOC_BLOCK case, it might be better
      to add a magic symbol to the block containing this information,
@@ -782,8 +822,25 @@ struct symbol
   struct symbol *hash_next;
 };
 
+/* Several lookup functions return both a symbol and the block in which the
+   symbol is found.  This structure is used in these cases.  */
+
+struct block_symbol
+{
+  /* The symbol that was found, or NULL if no symbol was found.  */
+  struct symbol *symbol;
+
+  /* If SYMBOL is not NULL, then this is the block in which the symbol is
+     defined.  */
+  const struct block *block;
+};
+
 extern const struct symbol_impl *symbol_impls;
 
+/* For convenience.  All fields are NULL.  This means "there is no
+   symbol".  */
+extern const struct block_symbol null_block_symbol;
+
 /* Note: There is no accessor macro for symbol.owner because it is
    "private".  */
 
@@ -1141,10 +1198,6 @@ DEF_VEC_P (compunit_symtab_ptr);
 
 extern int currently_reading_symtab;
 
-/* The block in which the most recently looked up symbol was found.  */
-
-extern const struct block *block_found;
-
 /* symtab.c lookup functions */
 
 extern const char multiple_symbols_ask[];
@@ -1190,27 +1243,27 @@ struct field_of_this_result
    C++: if IS_A_FIELD_OF_THIS is non-NULL on entry, check to see if
    NAME is a field of the current implied argument `this'.  If so fill in the
    fields of IS_A_FIELD_OF_THIS, otherwise the fields are set to NULL.
-   BLOCK_FOUND is set to the block in which NAME is found (in the case of
-   a field of `this', value_of_this sets BLOCK_FOUND to the proper value).
    The symbol's section is fixed up if necessary.  */
 
-extern struct symbol *lookup_symbol_in_language (const char *,
-						 const struct block *,
-						 const domain_enum,
-						 enum language,
-						 struct field_of_this_result *);
+extern struct block_symbol
+  lookup_symbol_in_language (const char *,
+			     const struct block *,
+			     const domain_enum,
+			     enum language,
+			     struct field_of_this_result *);
 
 /* Same as lookup_symbol_in_language, but using the current language.  */
 
-extern struct symbol *lookup_symbol (const char *, const struct block *,
-				     const domain_enum,
-				     struct field_of_this_result *);
+extern struct block_symbol lookup_symbol (const char *,
+					  const struct block *,
+					  const domain_enum,
+					  struct field_of_this_result *);
 
 /* A default version of lookup_symbol_nonlocal for use by languages
    that can't think of anything better to do.
    This implements the C lookup rules.  */
 
-extern struct symbol *
+extern struct block_symbol
   basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
 				const char *,
 				const struct block *,
@@ -1221,19 +1274,18 @@ extern struct symbol *
 
 /* Lookup a symbol in the static block associated to BLOCK, if there
    is one; do nothing if BLOCK is NULL or a global block.
-   Upon success sets BLOCK_FOUND and fixes up the symbol's section
-   if necessary.  */
+   Upon success fixes up the symbol's section if necessary.  */
 
-extern struct symbol *lookup_symbol_in_static_block (const char *name,
-						     const struct block *block,
-						     const domain_enum domain);
+extern struct block_symbol
+  lookup_symbol_in_static_block (const char *name,
+				 const struct block *block,
+				 const domain_enum domain);
 
 /* Search all static file-level symbols for NAME from DOMAIN.
-   Upon success sets BLOCK_FOUND and fixes up the symbol's section
-   if necessary.  */
+   Upon success fixes up the symbol's section if necessary.  */
 
-extern struct symbol *lookup_static_symbol (const char *name,
-					    const domain_enum domain);
+extern struct block_symbol lookup_static_symbol (const char *name,
+						 const domain_enum domain);
 
 /* Lookup a symbol in all files' global blocks.
 
@@ -1244,26 +1296,27 @@ extern struct symbol *lookup_static_symb
       if the target requires it.
       See gdbarch_iterate_over_objfiles_in_search_order.
 
-   Upon success sets BLOCK_FOUND and fixes up the symbol's section
-   if necessary.  */
+   Upon success fixes up the symbol's section if necessary.  */
 
-extern struct symbol *lookup_global_symbol (const char *name,
-					    const struct block *block,
-					    const domain_enum domain);
+extern struct block_symbol
+  lookup_global_symbol (const char *name,
+			const struct block *block,
+			const domain_enum domain);
 
 /* Lookup a symbol in block BLOCK.
-   Upon success sets BLOCK_FOUND and fixes up the symbol's section
-   if necessary.  */
+   Upon success fixes up the symbol's section if necessary.  */
 
-extern struct symbol *lookup_symbol_in_block (const char *name,
-					      const struct block *block,
-					      const domain_enum domain);
+extern struct symbol *
+  lookup_symbol_in_block (const char *name,
+			  const struct block *block,
+			  const domain_enum domain);
 
 /* Look up the `this' symbol for LANG in BLOCK.  Return the symbol if
    found, or NULL if not found.  */
 
-extern struct symbol *lookup_language_this (const struct language_defn *lang,
-					    const struct block *block);
+extern struct block_symbol
+  lookup_language_this (const struct language_defn *lang,
+			const struct block *block);
 
 /* Lookup a [struct, union, enum] by name, within a specified block.  */
 
@@ -1427,7 +1480,7 @@ extern int identify_source_line (struct 
 
 /* Flags passed as 4th argument to print_source_lines.  */
 
-enum print_source_lines_flags
+enum print_source_lines_flag
   {
     /* Do not print an error message.  */
     PRINT_SOURCE_LINES_NOERROR = (1 << 0),
@@ -1435,9 +1488,10 @@ enum print_source_lines_flags
     /* Print the filename in front of the source lines.  */
     PRINT_SOURCE_LINES_FILENAME = (1 << 1)
   };
+DEF_ENUM_FLAGS_TYPE (enum print_source_lines_flag, print_source_lines_flags);
 
 extern void print_source_lines (struct symtab *, int, int,
-				enum print_source_lines_flags);
+				print_source_lines_flags);
 
 extern void forget_cached_source_info_for_objfile (struct objfile *);
 extern void forget_cached_source_info (void);
@@ -1524,10 +1578,9 @@ extern enum language main_language (void
 /* Lookup symbol NAME from DOMAIN in MAIN_OBJFILE's global blocks.
    This searches MAIN_OBJFILE as well as any associated separate debug info
    objfiles of MAIN_OBJFILE.
-   Upon success sets BLOCK_FOUND and fixes up the symbol's section
-   if necessary.  */
+   Upon success fixes up the symbol's section if necessary.  */
 
-extern struct symbol *
+extern struct block_symbol
   lookup_global_symbol_from_objfile (struct objfile *main_objfile,
 				     const char *name,
 				     const domain_enum domain);
@@ -1552,40 +1605,70 @@ extern int basenames_may_differ;
 int compare_filenames_for_search (const char *filename,
 				  const char *search_name);
 
-int iterate_over_some_symtabs (const char *name,
-			       const char *real_path,
-			       int (*callback) (struct symtab *symtab,
-						void *data),
-			       void *data,
-			       struct compunit_symtab *first,
-			       struct compunit_symtab *after_last);
+int compare_glob_filenames_for_search (const char *filename,
+				       const char *search_name);
+
+bool iterate_over_some_symtabs (const char *name,
+				const char *real_path,
+				struct compunit_symtab *first,
+				struct compunit_symtab *after_last,
+				gdb::function_view<bool (symtab *)> callback);
 
 void iterate_over_symtabs (const char *name,
-			   int (*callback) (struct symtab *symtab,
-					    void *data),
-			   void *data);
+			   gdb::function_view<bool (symtab *)> callback);
 
-DEF_VEC_I (CORE_ADDR);
 
 VEC (CORE_ADDR) *find_pcs_for_symtab_line (struct symtab *symtab, int line,
 					   struct linetable_entry **best_entry);
 
-/* Callback for LA_ITERATE_OVER_SYMBOLS.  The callback will be called
-   once per matching symbol SYM, with DATA being the argument of the
-   same name that was passed to LA_ITERATE_OVER_SYMBOLS.  The callback
-   should return nonzero to indicate that LA_ITERATE_OVER_SYMBOLS
-   should continue iterating, or zero to indicate that the iteration
-   should end.  */
+/* Prototype for callbacks for LA_ITERATE_OVER_SYMBOLS.  The callback
+   is called once per matching symbol SYM.  The callback should return
+   true to indicate that LA_ITERATE_OVER_SYMBOLS should continue
+   iterating, or false to indicate that the iteration should end.  */
 
-typedef int (symbol_found_callback_ftype) (struct symbol *sym, void *data);
+typedef bool (symbol_found_callback_ftype) (symbol *sym);
 
 void iterate_over_symbols (const struct block *block, const char *name,
 			   const domain_enum domain,
-			   symbol_found_callback_ftype *callback,
-			   void *data);
+			   gdb::function_view<symbol_found_callback_ftype> callback);
+
+/* Storage type used by demangle_for_lookup.  demangle_for_lookup
+   either returns a const char * pointer that points to either of the
+   fields of this type, or a pointer to the input NAME.  This is done
+   this way because the underlying functions that demangle_for_lookup
+   calls either return a std::string (e.g., cp_canonicalize_string) or
+   a malloc'ed buffer (libiberty's demangled), and we want to avoid
+   unnecessary reallocation/string copying.  */
+class demangle_result_storage
+{
+public:
+
+  /* Swap the std::string storage with STR, and return a pointer to
+     the beginning of the new string.  */
+  const char *swap_string (std::string &str)
+  {
+    std::swap (m_string, str);
+    return m_string.c_str ();
+  }
+
+  /* Set the malloc storage to now point at PTR.  Any previous malloc
+     storage is released.  */
+  const char *set_malloc_ptr (char *ptr)
+  {
+    m_malloc.reset (ptr);
+    return ptr;
+  }
+
+private:
+
+  /* The storage.  */
+  std::string m_string;
+  gdb::unique_xmalloc_ptr<char> m_malloc;
+};
 
-struct cleanup *demangle_for_lookup (const char *name, enum language lang,
-				     const char **result_name);
+const char *
+  demangle_for_lookup (const char *name, enum language lang,
+		       demangle_result_storage &storage);
 
 struct symbol *allocate_symbol (struct objfile *);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/aarch64-linux.xml ./gdb/syscalls/aarch64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/aarch64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/aarch64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,112 +1,110 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  This file is offered as-is,
      without any warranty. -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <syscalls_info>
   <syscall name="io_setup" number="0"/>
   <syscall name="io_destroy" number="1"/>
   <syscall name="io_submit" number="2"/>
   <syscall name="io_cancel" number="3"/>
   <syscall name="io_getevents" number="4"/>
-  <syscall name="setxattr" number="5"/>
-  <syscall name="lsetxattr" number="6"/>
-  <syscall name="fsetxattr" number="7"/>
-  <syscall name="getxattr" number="8"/>
-  <syscall name="lgetxattr" number="9"/>
-  <syscall name="fgetxattr" number="10"/>
-  <syscall name="listxattr" number="11"/>
-  <syscall name="llistxattr" number="12"/>
-  <syscall name="flistxattr" number="13"/>
-  <syscall name="removexattr" number="14"/>
-  <syscall name="lremovexattr" number="15"/>
-  <syscall name="fremovexattr" number="16"/>
-  <syscall name="getcwd" number="17"/>
+  <syscall name="setxattr" number="5" groups="file"/>
+  <syscall name="lsetxattr" number="6" groups="file"/>
+  <syscall name="fsetxattr" number="7" groups="descriptor"/>
+  <syscall name="getxattr" number="8" groups="file"/>
+  <syscall name="lgetxattr" number="9" groups="file"/>
+  <syscall name="fgetxattr" number="10" groups="descriptor"/>
+  <syscall name="listxattr" number="11" groups="file"/>
+  <syscall name="llistxattr" number="12" groups="file"/>
+  <syscall name="flistxattr" number="13" groups="descriptor"/>
+  <syscall name="removexattr" number="14" groups="file"/>
+  <syscall name="lremovexattr" number="15" groups="file"/>
+  <syscall name="fremovexattr" number="16" groups="descriptor"/>
+  <syscall name="getcwd" number="17" groups="file"/>
   <syscall name="lookup_dcookie" number="18"/>
-  <syscall name="eventfd2" number="19"/>
-  <syscall name="epoll_create1" number="20"/>
-  <syscall name="epoll_ctl" number="21"/>
-  <syscall name="epoll_pwait" number="22"/>
-  <syscall name="dup" number="23"/>
-  <syscall name="dup3" number="24"/>
-  <syscall name="fcntl" number="25"/>
-  <syscall name="inotify_init1" number="26"/>
-  <syscall name="inotify_add_watch" number="27"/>
-  <syscall name="inotify_rm_watch" number="28"/>
-  <syscall name="ioctl" number="29"/>
+  <syscall name="eventfd2" number="19" groups="descriptor"/>
+  <syscall name="epoll_create1" number="20" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="21" groups="descriptor"/>
+  <syscall name="epoll_pwait" number="22" groups="descriptor"/>
+  <syscall name="dup" number="23" groups="descriptor"/>
+  <syscall name="dup3" number="24" groups="descriptor"/>
+  <syscall name="fcntl" number="25" groups="descriptor"/>
+  <syscall name="inotify_init1" number="26" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="27" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="28" groups="descriptor"/>
+  <syscall name="ioctl" number="29" groups="descriptor"/>
   <syscall name="ioprio_set" number="30"/>
   <syscall name="ioprio_get" number="31"/>
-  <syscall name="flock" number="32"/>
-  <syscall name="mknodat" number="33"/>
-  <syscall name="mkdirat" number="34"/>
-  <syscall name="unlinkat" number="35"/>
-  <syscall name="symlinkat" number="36"/>
-  <syscall name="linkat" number="37"/>
-  <syscall name="renameat" number="38"/>
-  <syscall name="umount2" number="39"/>
-  <syscall name="mount" number="40"/>
-  <syscall name="pivot_root" number="41"/>
+  <syscall name="flock" number="32" groups="descriptor"/>
+  <syscall name="mknodat" number="33" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="34" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="35" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="36" groups="descriptor,file"/>
+  <syscall name="linkat" number="37" groups="descriptor,file"/>
+  <syscall name="renameat" number="38" groups="descriptor,file"/>
+  <syscall name="umount2" number="39" groups="file"/>
+  <syscall name="mount" number="40" groups="file"/>
+  <syscall name="pivot_root" number="41" groups="file"/>
   <syscall name="nfsservctl" number="42"/>
-  <syscall name="statfs" number="43"/>
-  <syscall name="fstatfs" number="44"/>
-  <syscall name="truncate" number="45"/>
-  <syscall name="ftruncate" number="46"/>
-  <syscall name="fallocate" number="47"/>
-  <syscall name="faccessat" number="48"/>
-  <syscall name="chdir" number="49"/>
-  <syscall name="fchdir" number="50"/>
-  <syscall name="chroot" number="51"/>
-  <syscall name="fchmod" number="52"/>
-  <syscall name="fchmodat" number="53"/>
-  <syscall name="fchownat" number="54"/>
-  <syscall name="fchown" number="55"/>
-  <syscall name="openat" number="56"/>
-  <syscall name="close" number="57"/>
+  <syscall name="statfs" number="43" groups="file"/>
+  <syscall name="fstatfs" number="44" groups="descriptor"/>
+  <syscall name="truncate" number="45" groups="file"/>
+  <syscall name="ftruncate" number="46" groups="descriptor"/>
+  <syscall name="fallocate" number="47" groups="descriptor"/>
+  <syscall name="faccessat" number="48" groups="descriptor,file"/>
+  <syscall name="chdir" number="49" groups="file"/>
+  <syscall name="fchdir" number="50" groups="descriptor"/>
+  <syscall name="chroot" number="51" groups="file"/>
+  <syscall name="fchmod" number="52" groups="descriptor"/>
+  <syscall name="fchmodat" number="53" groups="descriptor,file"/>
+  <syscall name="fchownat" number="54" groups="descriptor,file"/>
+  <syscall name="fchown" number="55" groups="descriptor"/>
+  <syscall name="openat" number="56" groups="descriptor,file"/>
+  <syscall name="close" number="57" groups="descriptor"/>
   <syscall name="vhangup" number="58"/>
-  <syscall name="pipe2" number="59"/>
-  <syscall name="quotactl" number="60"/>
-  <syscall name="getdents64" number="61"/>
-  <syscall name="lseek" number="62"/>
-  <syscall name="read" number="63"/>
-  <syscall name="write" number="64"/>
-  <syscall name="readv" number="65"/>
-  <syscall name="writev" number="66"/>
-  <syscall name="pread64" number="67"/>
-  <syscall name="pwrite64" number="68"/>
-  <syscall name="preadv" number="69"/>
-  <syscall name="pwritev" number="70"/>
-  <syscall name="sendfile" number="71"/>
-  <syscall name="pselect6" number="72"/>
-  <syscall name="ppoll" number="73"/>
-  <syscall name="signalfd4" number="74"/>
-  <syscall name="vmsplice" number="75"/>
-  <syscall name="splice" number="76"/>
-  <syscall name="tee" number="77"/>
-  <syscall name="readlinkat" number="78"/>
-  <syscall name="newfstatat" number="79"/>
-  <syscall name="fstat" number="80"/>
+  <syscall name="pipe2" number="59" groups="descriptor"/>
+  <syscall name="quotactl" number="60" groups="file"/>
+  <syscall name="getdents64" number="61" groups="descriptor"/>
+  <syscall name="lseek" number="62" groups="descriptor"/>
+  <syscall name="read" number="63" groups="descriptor"/>
+  <syscall name="write" number="64" groups="descriptor"/>
+  <syscall name="readv" number="65" groups="descriptor"/>
+  <syscall name="writev" number="66" groups="descriptor"/>
+  <syscall name="pread64" number="67" groups="descriptor"/>
+  <syscall name="pwrite64" number="68" groups="descriptor"/>
+  <syscall name="preadv" number="69" groups="descriptor"/>
+  <syscall name="pwritev" number="70" groups="descriptor"/>
+  <syscall name="sendfile" number="71" groups="descriptor,network"/>
+  <syscall name="pselect6" number="72" groups="descriptor"/>
+  <syscall name="ppoll" number="73" groups="descriptor"/>
+  <syscall name="signalfd4" number="74" groups="descriptor,signal"/>
+  <syscall name="vmsplice" number="75" groups="descriptor"/>
+  <syscall name="splice" number="76" groups="descriptor"/>
+  <syscall name="tee" number="77" groups="descriptor"/>
+  <syscall name="readlinkat" number="78" groups="descriptor,file"/>
+  <syscall name="newfstatat" number="79" groups="descriptor,file"/>
+  <syscall name="fstat" number="80" groups="descriptor"/>
   <syscall name="sync" number="81"/>
-  <syscall name="fsync" number="82"/>
-  <syscall name="fdatasync" number="83"/>
-  <syscall name="sync_file_range" number="84"/>
-  <syscall name="timerfd_create" number="85"/>
-  <syscall name="timerfd_settime" number="86"/>
-  <syscall name="timerfd_gettime" number="87"/>
-  <syscall name="utimensat" number="88"/>
-  <syscall name="acct" number="89"/>
+  <syscall name="fsync" number="82" groups="descriptor"/>
+  <syscall name="fdatasync" number="83" groups="descriptor"/>
+  <syscall name="sync_file_range" number="84" groups="descriptor"/>
+  <syscall name="timerfd_create" number="85" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="86" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="87" groups="descriptor"/>
+  <syscall name="utimensat" number="88" groups="descriptor,file"/>
+  <syscall name="acct" number="89" groups="file"/>
   <syscall name="capget" number="90"/>
   <syscall name="capset" number="91"/>
   <syscall name="personality" number="92"/>
-  <syscall name="exit" number="93"/>
-  <syscall name="exit_group" number="94"/>
-  <syscall name="waitid" number="95"/>
+  <syscall name="exit" number="93" groups="process"/>
+  <syscall name="exit_group" number="94" groups="process"/>
+  <syscall name="waitid" number="95" groups="process"/>
   <syscall name="set_tid_address" number="96"/>
-  <syscall name="unshare" number="97"/>
+  <syscall name="unshare" number="97" groups="process"/>
   <syscall name="futex" number="98"/>
   <syscall name="set_robust_list" number="99"/>
   <syscall name="get_robust_list" number="100"/>
@@ -138,17 +136,17 @@
   <syscall name="sched_get_priority_min" number="126"/>
   <syscall name="sched_rr_get_interval" number="127"/>
   <syscall name="restart_syscall" number="128"/>
-  <syscall name="kill" number="129"/>
-  <syscall name="tkill" number="130"/>
-  <syscall name="tgkill" number="131"/>
-  <syscall name="sigaltstack" number="132"/>
-  <syscall name="rt_sigsuspend" number="133"/>
-  <syscall name="rt_sigaction" number="134"/>
-  <syscall name="rt_sigprocmask" number="135"/>
-  <syscall name="rt_sigpending" number="136"/>
-  <syscall name="rt_sigtimedwait" number="137"/>
-  <syscall name="rt_sigqueueinfo" number="138"/>
-  <syscall name="rt_sigreturn" number="139"/>
+  <syscall name="kill" number="129" groups="signal"/>
+  <syscall name="tkill" number="130" groups="signal"/>
+  <syscall name="tgkill" number="131" groups="signal"/>
+  <syscall name="sigaltstack" number="132" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="133" groups="signal"/>
+  <syscall name="rt_sigaction" number="134" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="135" groups="signal"/>
+  <syscall name="rt_sigpending" number="136" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="137" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="138" groups="signal"/>
+  <syscall name="rt_sigreturn" number="139" groups="signal"/>
   <syscall name="setpriority" number="140"/>
   <syscall name="getpriority" number="141"/>
   <syscall name="reboot" number="142"/>
@@ -195,75 +193,75 @@
   <syscall name="mq_timedreceive" number="183"/>
   <syscall name="mq_notify" number="184"/>
   <syscall name="mq_getsetattr" number="185"/>
-  <syscall name="msgget" number="186"/>
-  <syscall name="msgctl" number="187"/>
-  <syscall name="msgrcv" number="188"/>
-  <syscall name="msgsnd" number="189"/>
-  <syscall name="semget" number="190"/>
-  <syscall name="semctl" number="191"/>
-  <syscall name="semtimedop" number="192"/>
-  <syscall name="semop" number="193"/>
-  <syscall name="shmget" number="194"/>
-  <syscall name="shmctl" number="195"/>
-  <syscall name="shmat" number="196"/>
-  <syscall name="shmdt" number="197"/>
-  <syscall name="socket" number="198"/>
-  <syscall name="socketpair" number="199"/>
-  <syscall name="bind" number="200"/>
-  <syscall name="listen" number="201"/>
-  <syscall name="accept" number="202"/>
-  <syscall name="connect" number="203"/>
-  <syscall name="getsockname" number="204"/>
-  <syscall name="getpeername" number="205"/>
-  <syscall name="sendto" number="206"/>
-  <syscall name="recvfrom" number="207"/>
-  <syscall name="setsockopt" number="208"/>
-  <syscall name="getsockopt" number="209"/>
-  <syscall name="shutdown" number="210"/>
-  <syscall name="sendmsg" number="211"/>
-  <syscall name="recvmsg" number="212"/>
-  <syscall name="readahead" number="213"/>
-  <syscall name="brk" number="214"/>
-  <syscall name="munmap" number="215"/>
-  <syscall name="mremap" number="216"/>
+  <syscall name="msgget" number="186" groups="ipc"/>
+  <syscall name="msgctl" number="187" groups="ipc"/>
+  <syscall name="msgrcv" number="188" groups="ipc"/>
+  <syscall name="msgsnd" number="189" groups="ipc"/>
+  <syscall name="semget" number="190" groups="ipc"/>
+  <syscall name="semctl" number="191" groups="ipc"/>
+  <syscall name="semtimedop" number="192" groups="ipc"/>
+  <syscall name="semop" number="193" groups="ipc"/>
+  <syscall name="shmget" number="194" groups="ipc"/>
+  <syscall name="shmctl" number="195" groups="ipc"/>
+  <syscall name="shmat" number="196" groups="ipc,memory"/>
+  <syscall name="shmdt" number="197" groups="ipc,memory"/>
+  <syscall name="socket" number="198" groups="network"/>
+  <syscall name="socketpair" number="199" groups="network"/>
+  <syscall name="bind" number="200" groups="network"/>
+  <syscall name="listen" number="201" groups="network"/>
+  <syscall name="accept" number="202" groups="network"/>
+  <syscall name="connect" number="203" groups="network"/>
+  <syscall name="getsockname" number="204" groups="network"/>
+  <syscall name="getpeername" number="205" groups="network"/>
+  <syscall name="sendto" number="206" groups="network"/>
+  <syscall name="recvfrom" number="207" groups="network"/>
+  <syscall name="setsockopt" number="208" groups="network"/>
+  <syscall name="getsockopt" number="209" groups="network"/>
+  <syscall name="shutdown" number="210" groups="network"/>
+  <syscall name="sendmsg" number="211" groups="network"/>
+  <syscall name="recvmsg" number="212" groups="network"/>
+  <syscall name="readahead" number="213" groups="descriptor"/>
+  <syscall name="brk" number="214" groups="memory"/>
+  <syscall name="munmap" number="215" groups="memory"/>
+  <syscall name="mremap" number="216" groups="memory"/>
   <syscall name="add_key" number="217"/>
   <syscall name="request_key" number="218"/>
   <syscall name="keyctl" number="219"/>
-  <syscall name="clone" number="220"/>
-  <syscall name="execve" number="221"/>
-  <syscall name="mmap" number="222"/>
-  <syscall name="fadvise64" number="223"/>
-  <syscall name="swapon" number="224"/>
-  <syscall name="swapoff" number="225"/>
-  <syscall name="mprotect" number="226"/>
-  <syscall name="msync" number="227"/>
-  <syscall name="mlock" number="228"/>
-  <syscall name="munlock" number="229"/>
-  <syscall name="mlockall" number="230"/>
-  <syscall name="munlockall" number="231"/>
-  <syscall name="mincore" number="232"/>
-  <syscall name="madvise" number="233"/>
-  <syscall name="remap_file_pages" number="234"/>
-  <syscall name="mbind" number="235"/>
-  <syscall name="get_mempolicy" number="236"/>
-  <syscall name="set_mempolicy" number="237"/>
-  <syscall name="migrate_pages" number="238"/>
-  <syscall name="move_pages" number="239"/>
-  <syscall name="rt_tgsigqueueinfo" number="240"/>
-  <syscall name="perf_event_open" number="241"/>
-  <syscall name="accept4" number="242"/>
-  <syscall name="recvmmsg" number="243"/>
+  <syscall name="clone" number="220" groups="process"/>
+  <syscall name="execve" number="221" groups="file,process"/>
+  <syscall name="mmap" number="222" groups="descriptor,memory"/>
+  <syscall name="fadvise64" number="223" groups="descriptor"/>
+  <syscall name="swapon" number="224" groups="file"/>
+  <syscall name="swapoff" number="225" groups="file"/>
+  <syscall name="mprotect" number="226" groups="memory"/>
+  <syscall name="msync" number="227" groups="memory"/>
+  <syscall name="mlock" number="228" groups="memory"/>
+  <syscall name="munlock" number="229" groups="memory"/>
+  <syscall name="mlockall" number="230" groups="memory"/>
+  <syscall name="munlockall" number="231" groups="memory"/>
+  <syscall name="mincore" number="232" groups="memory"/>
+  <syscall name="madvise" number="233" groups="memory"/>
+  <syscall name="remap_file_pages" number="234" groups="memory"/>
+  <syscall name="mbind" number="235" groups="memory"/>
+  <syscall name="get_mempolicy" number="236" groups="memory"/>
+  <syscall name="set_mempolicy" number="237" groups="memory"/>
+  <syscall name="migrate_pages" number="238" groups="memory"/>
+  <syscall name="move_pages" number="239" groups="memory"/>
+  <syscall name="rt_tgsigqueueinfo" number="240" groups="process,signal"/>
+  <syscall name="perf_event_open" number="241" groups="descriptor"/>
+  <syscall name="accept4" number="242" groups="network"/>
+  <syscall name="recvmmsg" number="243" groups="network"/>
   <syscall name="arch_specific_syscall" number="244"/>
-  <syscall name="wait4" number="260"/>
+  <syscall name="wait4" number="260" groups="process"/>
   <syscall name="prlimit64" number="261"/>
-  <syscall name="fanotify_init" number="262"/>
-  <syscall name="fanotify_mark" number="263"/>
-  <syscall name="name_to_handle_at" number="264"/>
-  <syscall name="open_by_handle_at" number="265"/>
+  <syscall name="fanotify_init" number="262" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="263" groups="descriptor,file"/>
+  <syscall name="name_to_handle_at" number="264" groups="descriptor,file"/>
+  <syscall name="open_by_handle_at" number="265" groups="descriptor"/>
   <syscall name="clock_adjtime" number="266"/>
-  <syscall name="syncfs" number="267"/>
-  <syscall name="setns" number="268"/>
-  <syscall name="sendmmsg" number="269"/>
+  <syscall name="syncfs" number="267" groups="descriptor"/>
+  <syscall name="setns" number="268" groups="descriptor"/>
+  <syscall name="sendmmsg" number="269" groups="network"/>
   <syscall name="process_vm_readv" number="270"/>
   <syscall name="process_vm_writev" number="271"/>
   <syscall name="kcmp" number="272"/>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/aarch64-linux.xml.in ./gdb/syscalls/aarch64-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/aarch64-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/aarch64-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,271 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  This file is offered as-is,
+     without any warranty. -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<syscalls_info>
+  <syscall name="io_setup" number="0"/>
+  <syscall name="io_destroy" number="1"/>
+  <syscall name="io_submit" number="2"/>
+  <syscall name="io_cancel" number="3"/>
+  <syscall name="io_getevents" number="4"/>
+  <syscall name="setxattr" number="5"/>
+  <syscall name="lsetxattr" number="6"/>
+  <syscall name="fsetxattr" number="7"/>
+  <syscall name="getxattr" number="8"/>
+  <syscall name="lgetxattr" number="9"/>
+  <syscall name="fgetxattr" number="10"/>
+  <syscall name="listxattr" number="11"/>
+  <syscall name="llistxattr" number="12"/>
+  <syscall name="flistxattr" number="13"/>
+  <syscall name="removexattr" number="14"/>
+  <syscall name="lremovexattr" number="15"/>
+  <syscall name="fremovexattr" number="16"/>
+  <syscall name="getcwd" number="17"/>
+  <syscall name="lookup_dcookie" number="18"/>
+  <syscall name="eventfd2" number="19"/>
+  <syscall name="epoll_create1" number="20"/>
+  <syscall name="epoll_ctl" number="21"/>
+  <syscall name="epoll_pwait" number="22"/>
+  <syscall name="dup" number="23"/>
+  <syscall name="dup3" number="24"/>
+  <syscall name="fcntl" number="25"/>
+  <syscall name="inotify_init1" number="26"/>
+  <syscall name="inotify_add_watch" number="27"/>
+  <syscall name="inotify_rm_watch" number="28"/>
+  <syscall name="ioctl" number="29"/>
+  <syscall name="ioprio_set" number="30"/>
+  <syscall name="ioprio_get" number="31"/>
+  <syscall name="flock" number="32"/>
+  <syscall name="mknodat" number="33"/>
+  <syscall name="mkdirat" number="34"/>
+  <syscall name="unlinkat" number="35"/>
+  <syscall name="symlinkat" number="36"/>
+  <syscall name="linkat" number="37"/>
+  <syscall name="renameat" number="38"/>
+  <syscall name="umount2" number="39"/>
+  <syscall name="mount" number="40"/>
+  <syscall name="pivot_root" number="41"/>
+  <syscall name="nfsservctl" number="42"/>
+  <syscall name="statfs" number="43"/>
+  <syscall name="fstatfs" number="44"/>
+  <syscall name="truncate" number="45"/>
+  <syscall name="ftruncate" number="46"/>
+  <syscall name="fallocate" number="47"/>
+  <syscall name="faccessat" number="48"/>
+  <syscall name="chdir" number="49"/>
+  <syscall name="fchdir" number="50"/>
+  <syscall name="chroot" number="51"/>
+  <syscall name="fchmod" number="52"/>
+  <syscall name="fchmodat" number="53"/>
+  <syscall name="fchownat" number="54"/>
+  <syscall name="fchown" number="55"/>
+  <syscall name="openat" number="56"/>
+  <syscall name="close" number="57"/>
+  <syscall name="vhangup" number="58"/>
+  <syscall name="pipe2" number="59"/>
+  <syscall name="quotactl" number="60"/>
+  <syscall name="getdents64" number="61"/>
+  <syscall name="lseek" number="62"/>
+  <syscall name="read" number="63"/>
+  <syscall name="write" number="64"/>
+  <syscall name="readv" number="65"/>
+  <syscall name="writev" number="66"/>
+  <syscall name="pread64" number="67"/>
+  <syscall name="pwrite64" number="68"/>
+  <syscall name="preadv" number="69"/>
+  <syscall name="pwritev" number="70"/>
+  <syscall name="sendfile" number="71"/>
+  <syscall name="pselect6" number="72"/>
+  <syscall name="ppoll" number="73"/>
+  <syscall name="signalfd4" number="74"/>
+  <syscall name="vmsplice" number="75"/>
+  <syscall name="splice" number="76"/>
+  <syscall name="tee" number="77"/>
+  <syscall name="readlinkat" number="78"/>
+  <syscall name="newfstatat" number="79"/>
+  <syscall name="fstat" number="80"/>
+  <syscall name="sync" number="81"/>
+  <syscall name="fsync" number="82"/>
+  <syscall name="fdatasync" number="83"/>
+  <syscall name="sync_file_range" number="84"/>
+  <syscall name="timerfd_create" number="85"/>
+  <syscall name="timerfd_settime" number="86"/>
+  <syscall name="timerfd_gettime" number="87"/>
+  <syscall name="utimensat" number="88"/>
+  <syscall name="acct" number="89"/>
+  <syscall name="capget" number="90"/>
+  <syscall name="capset" number="91"/>
+  <syscall name="personality" number="92"/>
+  <syscall name="exit" number="93"/>
+  <syscall name="exit_group" number="94"/>
+  <syscall name="waitid" number="95"/>
+  <syscall name="set_tid_address" number="96"/>
+  <syscall name="unshare" number="97"/>
+  <syscall name="futex" number="98"/>
+  <syscall name="set_robust_list" number="99"/>
+  <syscall name="get_robust_list" number="100"/>
+  <syscall name="nanosleep" number="101"/>
+  <syscall name="getitimer" number="102"/>
+  <syscall name="setitimer" number="103"/>
+  <syscall name="kexec_load" number="104"/>
+  <syscall name="init_module" number="105"/>
+  <syscall name="delete_module" number="106"/>
+  <syscall name="timer_create" number="107"/>
+  <syscall name="timer_gettime" number="108"/>
+  <syscall name="timer_getoverrun" number="109"/>
+  <syscall name="timer_settime" number="110"/>
+  <syscall name="timer_delete" number="111"/>
+  <syscall name="clock_settime" number="112"/>
+  <syscall name="clock_gettime" number="113"/>
+  <syscall name="clock_getres" number="114"/>
+  <syscall name="clock_nanosleep" number="115"/>
+  <syscall name="syslog" number="116"/>
+  <syscall name="ptrace" number="117"/>
+  <syscall name="sched_setparam" number="118"/>
+  <syscall name="sched_setscheduler" number="119"/>
+  <syscall name="sched_getscheduler" number="120"/>
+  <syscall name="sched_getparam" number="121"/>
+  <syscall name="sched_setaffinity" number="122"/>
+  <syscall name="sched_getaffinity" number="123"/>
+  <syscall name="sched_yield" number="124"/>
+  <syscall name="sched_get_priority_max" number="125"/>
+  <syscall name="sched_get_priority_min" number="126"/>
+  <syscall name="sched_rr_get_interval" number="127"/>
+  <syscall name="restart_syscall" number="128"/>
+  <syscall name="kill" number="129"/>
+  <syscall name="tkill" number="130"/>
+  <syscall name="tgkill" number="131"/>
+  <syscall name="sigaltstack" number="132"/>
+  <syscall name="rt_sigsuspend" number="133"/>
+  <syscall name="rt_sigaction" number="134"/>
+  <syscall name="rt_sigprocmask" number="135"/>
+  <syscall name="rt_sigpending" number="136"/>
+  <syscall name="rt_sigtimedwait" number="137"/>
+  <syscall name="rt_sigqueueinfo" number="138"/>
+  <syscall name="rt_sigreturn" number="139"/>
+  <syscall name="setpriority" number="140"/>
+  <syscall name="getpriority" number="141"/>
+  <syscall name="reboot" number="142"/>
+  <syscall name="setregid" number="143"/>
+  <syscall name="setgid" number="144"/>
+  <syscall name="setreuid" number="145"/>
+  <syscall name="setuid" number="146"/>
+  <syscall name="setresuid" number="147"/>
+  <syscall name="getresuid" number="148"/>
+  <syscall name="setresgid" number="149"/>
+  <syscall name="getresgid" number="150"/>
+  <syscall name="setfsuid" number="151"/>
+  <syscall name="setfsgid" number="152"/>
+  <syscall name="times" number="153"/>
+  <syscall name="setpgid" number="154"/>
+  <syscall name="getpgid" number="155"/>
+  <syscall name="getsid" number="156"/>
+  <syscall name="setsid" number="157"/>
+  <syscall name="getgroups" number="158"/>
+  <syscall name="setgroups" number="159"/>
+  <syscall name="uname" number="160"/>
+  <syscall name="sethostname" number="161"/>
+  <syscall name="setdomainname" number="162"/>
+  <syscall name="getrlimit" number="163"/>
+  <syscall name="setrlimit" number="164"/>
+  <syscall name="getrusage" number="165"/>
+  <syscall name="umask" number="166"/>
+  <syscall name="prctl" number="167"/>
+  <syscall name="getcpu" number="168"/>
+  <syscall name="gettimeofday" number="169"/>
+  <syscall name="settimeofday" number="170"/>
+  <syscall name="adjtimex" number="171"/>
+  <syscall name="getpid" number="172"/>
+  <syscall name="getppid" number="173"/>
+  <syscall name="getuid" number="174"/>
+  <syscall name="geteuid" number="175"/>
+  <syscall name="getgid" number="176"/>
+  <syscall name="getegid" number="177"/>
+  <syscall name="gettid" number="178"/>
+  <syscall name="sysinfo" number="179"/>
+  <syscall name="mq_open" number="180"/>
+  <syscall name="mq_unlink" number="181"/>
+  <syscall name="mq_timedsend" number="182"/>
+  <syscall name="mq_timedreceive" number="183"/>
+  <syscall name="mq_notify" number="184"/>
+  <syscall name="mq_getsetattr" number="185"/>
+  <syscall name="msgget" number="186"/>
+  <syscall name="msgctl" number="187"/>
+  <syscall name="msgrcv" number="188"/>
+  <syscall name="msgsnd" number="189"/>
+  <syscall name="semget" number="190"/>
+  <syscall name="semctl" number="191"/>
+  <syscall name="semtimedop" number="192"/>
+  <syscall name="semop" number="193"/>
+  <syscall name="shmget" number="194"/>
+  <syscall name="shmctl" number="195"/>
+  <syscall name="shmat" number="196"/>
+  <syscall name="shmdt" number="197"/>
+  <syscall name="socket" number="198"/>
+  <syscall name="socketpair" number="199"/>
+  <syscall name="bind" number="200"/>
+  <syscall name="listen" number="201"/>
+  <syscall name="accept" number="202"/>
+  <syscall name="connect" number="203"/>
+  <syscall name="getsockname" number="204"/>
+  <syscall name="getpeername" number="205"/>
+  <syscall name="sendto" number="206"/>
+  <syscall name="recvfrom" number="207"/>
+  <syscall name="setsockopt" number="208"/>
+  <syscall name="getsockopt" number="209"/>
+  <syscall name="shutdown" number="210"/>
+  <syscall name="sendmsg" number="211"/>
+  <syscall name="recvmsg" number="212"/>
+  <syscall name="readahead" number="213"/>
+  <syscall name="brk" number="214"/>
+  <syscall name="munmap" number="215"/>
+  <syscall name="mremap" number="216"/>
+  <syscall name="add_key" number="217"/>
+  <syscall name="request_key" number="218"/>
+  <syscall name="keyctl" number="219"/>
+  <syscall name="clone" number="220"/>
+  <syscall name="execve" number="221"/>
+  <syscall name="mmap" number="222"/>
+  <syscall name="fadvise64" number="223"/>
+  <syscall name="swapon" number="224"/>
+  <syscall name="swapoff" number="225"/>
+  <syscall name="mprotect" number="226"/>
+  <syscall name="msync" number="227"/>
+  <syscall name="mlock" number="228"/>
+  <syscall name="munlock" number="229"/>
+  <syscall name="mlockall" number="230"/>
+  <syscall name="munlockall" number="231"/>
+  <syscall name="mincore" number="232"/>
+  <syscall name="madvise" number="233"/>
+  <syscall name="remap_file_pages" number="234"/>
+  <syscall name="mbind" number="235"/>
+  <syscall name="get_mempolicy" number="236"/>
+  <syscall name="set_mempolicy" number="237"/>
+  <syscall name="migrate_pages" number="238"/>
+  <syscall name="move_pages" number="239"/>
+  <syscall name="rt_tgsigqueueinfo" number="240"/>
+  <syscall name="perf_event_open" number="241"/>
+  <syscall name="accept4" number="242"/>
+  <syscall name="recvmmsg" number="243"/>
+  <syscall name="arch_specific_syscall" number="244"/>
+  <syscall name="wait4" number="260"/>
+  <syscall name="prlimit64" number="261"/>
+  <syscall name="fanotify_init" number="262"/>
+  <syscall name="fanotify_mark" number="263"/>
+  <syscall name="name_to_handle_at" number="264"/>
+  <syscall name="open_by_handle_at" number="265"/>
+  <syscall name="clock_adjtime" number="266"/>
+  <syscall name="syncfs" number="267"/>
+  <syscall name="setns" number="268"/>
+  <syscall name="sendmmsg" number="269"/>
+  <syscall name="process_vm_readv" number="270"/>
+  <syscall name="process_vm_writev" number="271"/>
+  <syscall name="kcmp" number="272"/>
+  <syscall name="syscalls" number="273"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/amd64-linux.xml ./gdb/syscalls/amd64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/amd64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/amd64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,114 +1,111 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/x86/include/asm/unistd_64.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
-  <syscall name="read" number="0"/>
-  <syscall name="write" number="1"/>
-  <syscall name="open" number="2"/>
-  <syscall name="close" number="3"/>
-  <syscall name="stat" number="4"/>
-  <syscall name="fstat" number="5"/>
-  <syscall name="lstat" number="6"/>
-  <syscall name="poll" number="7"/>
-  <syscall name="lseek" number="8"/>
-  <syscall name="mmap" number="9"/>
-  <syscall name="mprotect" number="10"/>
-  <syscall name="munmap" number="11"/>
-  <syscall name="brk" number="12"/>
-  <syscall name="rt_sigaction" number="13"/>
-  <syscall name="rt_sigprocmask" number="14"/>
-  <syscall name="rt_sigreturn" number="15"/>
-  <syscall name="ioctl" number="16"/>
-  <syscall name="pread64" number="17"/>
-  <syscall name="pwrite64" number="18"/>
-  <syscall name="readv" number="19"/>
-  <syscall name="writev" number="20"/>
-  <syscall name="access" number="21"/>
-  <syscall name="pipe" number="22"/>
-  <syscall name="select" number="23"/>
+  <syscall name="read" number="0" groups="descriptor"/>
+  <syscall name="write" number="1" groups="descriptor"/>
+  <syscall name="open" number="2" groups="descriptor,file"/>
+  <syscall name="close" number="3" groups="descriptor"/>
+  <syscall name="stat" number="4" groups="file"/>
+  <syscall name="fstat" number="5" groups="descriptor"/>
+  <syscall name="lstat" number="6" groups="file"/>
+  <syscall name="poll" number="7" groups="descriptor"/>
+  <syscall name="lseek" number="8" groups="descriptor"/>
+  <syscall name="mmap" number="9" groups="descriptor,memory"/>
+  <syscall name="mprotect" number="10" groups="memory"/>
+  <syscall name="munmap" number="11" groups="memory"/>
+  <syscall name="brk" number="12" groups="memory"/>
+  <syscall name="rt_sigaction" number="13" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="14" groups="signal"/>
+  <syscall name="rt_sigreturn" number="15" groups="signal"/>
+  <syscall name="ioctl" number="16" groups="descriptor"/>
+  <syscall name="pread64" number="17" groups="descriptor"/>
+  <syscall name="pwrite64" number="18" groups="descriptor"/>
+  <syscall name="readv" number="19" groups="descriptor"/>
+  <syscall name="writev" number="20" groups="descriptor"/>
+  <syscall name="access" number="21" groups="file"/>
+  <syscall name="pipe" number="22" groups="descriptor"/>
+  <syscall name="select" number="23" groups="descriptor"/>
   <syscall name="sched_yield" number="24"/>
-  <syscall name="mremap" number="25"/>
-  <syscall name="msync" number="26"/>
-  <syscall name="mincore" number="27"/>
-  <syscall name="madvise" number="28"/>
-  <syscall name="shmget" number="29"/>
-  <syscall name="shmat" number="30"/>
-  <syscall name="shmctl" number="31"/>
-  <syscall name="dup" number="32"/>
-  <syscall name="dup2" number="33"/>
-  <syscall name="pause" number="34"/>
+  <syscall name="mremap" number="25" groups="memory"/>
+  <syscall name="msync" number="26" groups="memory"/>
+  <syscall name="mincore" number="27" groups="memory"/>
+  <syscall name="madvise" number="28" groups="memory"/>
+  <syscall name="shmget" number="29" groups="ipc"/>
+  <syscall name="shmat" number="30" groups="ipc,memory"/>
+  <syscall name="shmctl" number="31" groups="ipc"/>
+  <syscall name="dup" number="32" groups="descriptor"/>
+  <syscall name="dup2" number="33" groups="descriptor"/>
+  <syscall name="pause" number="34" groups="signal"/>
   <syscall name="nanosleep" number="35"/>
   <syscall name="getitimer" number="36"/>
   <syscall name="alarm" number="37"/>
   <syscall name="setitimer" number="38"/>
   <syscall name="getpid" number="39"/>
-  <syscall name="sendfile" number="40"/>
-  <syscall name="socket" number="41"/>
-  <syscall name="connect" number="42"/>
-  <syscall name="accept" number="43"/>
-  <syscall name="sendto" number="44"/>
-  <syscall name="recvfrom" number="45"/>
-  <syscall name="sendmsg" number="46"/>
-  <syscall name="recvmsg" number="47"/>
-  <syscall name="shutdown" number="48"/>
-  <syscall name="bind" number="49"/>
-  <syscall name="listen" number="50"/>
-  <syscall name="getsockname" number="51"/>
-  <syscall name="getpeername" number="52"/>
-  <syscall name="socketpair" number="53"/>
-  <syscall name="setsockopt" number="54"/>
-  <syscall name="getsockopt" number="55"/>
-  <syscall name="clone" number="56"/>
-  <syscall name="fork" number="57"/>
-  <syscall name="vfork" number="58"/>
-  <syscall name="execve" number="59"/>
-  <syscall name="exit" number="60"/>
-  <syscall name="wait4" number="61"/>
-  <syscall name="kill" number="62"/>
+  <syscall name="sendfile" number="40" groups="descriptor,network"/>
+  <syscall name="socket" number="41" groups="network"/>
+  <syscall name="connect" number="42" groups="network"/>
+  <syscall name="accept" number="43" groups="network"/>
+  <syscall name="sendto" number="44" groups="network"/>
+  <syscall name="recvfrom" number="45" groups="network"/>
+  <syscall name="sendmsg" number="46" groups="network"/>
+  <syscall name="recvmsg" number="47" groups="network"/>
+  <syscall name="shutdown" number="48" groups="network"/>
+  <syscall name="bind" number="49" groups="network"/>
+  <syscall name="listen" number="50" groups="network"/>
+  <syscall name="getsockname" number="51" groups="network"/>
+  <syscall name="getpeername" number="52" groups="network"/>
+  <syscall name="socketpair" number="53" groups="network"/>
+  <syscall name="setsockopt" number="54" groups="network"/>
+  <syscall name="getsockopt" number="55" groups="network"/>
+  <syscall name="clone" number="56" groups="process"/>
+  <syscall name="fork" number="57" groups="process"/>
+  <syscall name="vfork" number="58" groups="process"/>
+  <syscall name="execve" number="59" groups="file,process"/>
+  <syscall name="exit" number="60" groups="process"/>
+  <syscall name="wait4" number="61" groups="process"/>
+  <syscall name="kill" number="62" groups="signal"/>
   <syscall name="uname" number="63"/>
-  <syscall name="semget" number="64"/>
-  <syscall name="semop" number="65"/>
-  <syscall name="semctl" number="66"/>
-  <syscall name="shmdt" number="67"/>
-  <syscall name="msgget" number="68"/>
-  <syscall name="msgsnd" number="69"/>
-  <syscall name="msgrcv" number="70"/>
-  <syscall name="msgctl" number="71"/>
-  <syscall name="fcntl" number="72"/>
-  <syscall name="flock" number="73"/>
-  <syscall name="fsync" number="74"/>
-  <syscall name="fdatasync" number="75"/>
-  <syscall name="truncate" number="76"/>
-  <syscall name="ftruncate" number="77"/>
-  <syscall name="getdents" number="78"/>
-  <syscall name="getcwd" number="79"/>
-  <syscall name="chdir" number="80"/>
-  <syscall name="fchdir" number="81"/>
-  <syscall name="rename" number="82"/>
-  <syscall name="mkdir" number="83"/>
-  <syscall name="rmdir" number="84"/>
-  <syscall name="creat" number="85"/>
-  <syscall name="link" number="86"/>
-  <syscall name="unlink" number="87"/>
-  <syscall name="symlink" number="88"/>
-  <syscall name="readlink" number="89"/>
-  <syscall name="chmod" number="90"/>
-  <syscall name="fchmod" number="91"/>
-  <syscall name="chown" number="92"/>
-  <syscall name="fchown" number="93"/>
-  <syscall name="lchown" number="94"/>
+  <syscall name="semget" number="64" groups="ipc"/>
+  <syscall name="semop" number="65" groups="ipc"/>
+  <syscall name="semctl" number="66" groups="ipc"/>
+  <syscall name="shmdt" number="67" groups="ipc,memory"/>
+  <syscall name="msgget" number="68" groups="ipc"/>
+  <syscall name="msgsnd" number="69" groups="ipc"/>
+  <syscall name="msgrcv" number="70" groups="ipc"/>
+  <syscall name="msgctl" number="71" groups="ipc"/>
+  <syscall name="fcntl" number="72" groups="descriptor"/>
+  <syscall name="flock" number="73" groups="descriptor"/>
+  <syscall name="fsync" number="74" groups="descriptor"/>
+  <syscall name="fdatasync" number="75" groups="descriptor"/>
+  <syscall name="truncate" number="76" groups="file"/>
+  <syscall name="ftruncate" number="77" groups="descriptor"/>
+  <syscall name="getdents" number="78" groups="descriptor"/>
+  <syscall name="getcwd" number="79" groups="file"/>
+  <syscall name="chdir" number="80" groups="file"/>
+  <syscall name="fchdir" number="81" groups="descriptor"/>
+  <syscall name="rename" number="82" groups="file"/>
+  <syscall name="mkdir" number="83" groups="file"/>
+  <syscall name="rmdir" number="84" groups="file"/>
+  <syscall name="creat" number="85" groups="descriptor,file"/>
+  <syscall name="link" number="86" groups="file"/>
+  <syscall name="unlink" number="87" groups="file"/>
+  <syscall name="symlink" number="88" groups="file"/>
+  <syscall name="readlink" number="89" groups="file"/>
+  <syscall name="chmod" number="90" groups="file"/>
+  <syscall name="fchmod" number="91" groups="descriptor"/>
+  <syscall name="chown" number="92" groups="file"/>
+  <syscall name="fchown" number="93" groups="descriptor"/>
+  <syscall name="lchown" number="94" groups="file"/>
   <syscall name="umask" number="95"/>
   <syscall name="gettimeofday" number="96"/>
   <syscall name="getrlimit" number="97"/>
@@ -141,18 +138,18 @@
   <syscall name="getsid" number="124"/>
   <syscall name="capget" number="125"/>
   <syscall name="capset" number="126"/>
-  <syscall name="rt_sigpending" number="127"/>
-  <syscall name="rt_sigtimedwait" number="128"/>
-  <syscall name="rt_sigqueueinfo" number="129"/>
-  <syscall name="rt_sigsuspend" number="130"/>
-  <syscall name="sigaltstack" number="131"/>
-  <syscall name="utime" number="132"/>
-  <syscall name="mknod" number="133"/>
-  <syscall name="uselib" number="134"/>
+  <syscall name="rt_sigpending" number="127" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="128" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="129" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="130" groups="signal"/>
+  <syscall name="sigaltstack" number="131" groups="signal"/>
+  <syscall name="utime" number="132" groups="file"/>
+  <syscall name="mknod" number="133" groups="file"/>
+  <syscall name="uselib" number="134" groups="file"/>
   <syscall name="personality" number="135"/>
   <syscall name="ustat" number="136"/>
-  <syscall name="statfs" number="137"/>
-  <syscall name="fstatfs" number="138"/>
+  <syscall name="statfs" number="137" groups="file"/>
+  <syscall name="fstatfs" number="138" groups="descriptor"/>
   <syscall name="sysfs" number="139"/>
   <syscall name="getpriority" number="140"/>
   <syscall name="setpriority" number="141"/>
@@ -163,26 +160,26 @@
   <syscall name="sched_get_priority_max" number="146"/>
   <syscall name="sched_get_priority_min" number="147"/>
   <syscall name="sched_rr_get_interval" number="148"/>
-  <syscall name="mlock" number="149"/>
-  <syscall name="munlock" number="150"/>
-  <syscall name="mlockall" number="151"/>
-  <syscall name="munlockall" number="152"/>
+  <syscall name="mlock" number="149" groups="memory"/>
+  <syscall name="munlock" number="150" groups="memory"/>
+  <syscall name="mlockall" number="151" groups="memory"/>
+  <syscall name="munlockall" number="152" groups="memory"/>
   <syscall name="vhangup" number="153"/>
   <syscall name="modify_ldt" number="154"/>
-  <syscall name="pivot_root" number="155"/>
+  <syscall name="pivot_root" number="155" groups="file"/>
   <syscall name="_sysctl" number="156"/>
   <syscall name="prctl" number="157"/>
-  <syscall name="arch_prctl" number="158"/>
+  <syscall name="arch_prctl" number="158" groups="process"/>
   <syscall name="adjtimex" number="159"/>
   <syscall name="setrlimit" number="160"/>
-  <syscall name="chroot" number="161"/>
+  <syscall name="chroot" number="161" groups="file"/>
   <syscall name="sync" number="162"/>
-  <syscall name="acct" number="163"/>
+  <syscall name="acct" number="163" groups="file"/>
   <syscall name="settimeofday" number="164"/>
-  <syscall name="mount" number="165"/>
-  <syscall name="umount2" number="166"/>
-  <syscall name="swapon" number="167"/>
-  <syscall name="swapoff" number="168"/>
+  <syscall name="mount" number="165" groups="file"/>
+  <syscall name="umount2" number="166" groups="file"/>
+  <syscall name="swapon" number="167" groups="file"/>
+  <syscall name="swapoff" number="168" groups="file"/>
   <syscall name="reboot" number="169"/>
   <syscall name="sethostname" number="170"/>
   <syscall name="setdomainname" number="171"/>
@@ -193,7 +190,7 @@
   <syscall name="delete_module" number="176"/>
   <syscall name="get_kernel_syms" number="177"/>
   <syscall name="query_module" number="178"/>
-  <syscall name="quotactl" number="179"/>
+  <syscall name="quotactl" number="179" groups="file"/>
   <syscall name="nfsservctl" number="180"/>
   <syscall name="getpmsg" number="181"/>
   <syscall name="putpmsg" number="182"/>
@@ -201,20 +198,20 @@
   <syscall name="tuxcall" number="184"/>
   <syscall name="security" number="185"/>
   <syscall name="gettid" number="186"/>
-  <syscall name="readahead" number="187"/>
-  <syscall name="setxattr" number="188"/>
-  <syscall name="lsetxattr" number="189"/>
-  <syscall name="fsetxattr" number="190"/>
-  <syscall name="getxattr" number="191"/>
-  <syscall name="lgetxattr" number="192"/>
-  <syscall name="fgetxattr" number="193"/>
-  <syscall name="listxattr" number="194"/>
-  <syscall name="llistxattr" number="195"/>
-  <syscall name="flistxattr" number="196"/>
-  <syscall name="removexattr" number="197"/>
-  <syscall name="lremovexattr" number="198"/>
-  <syscall name="fremovexattr" number="199"/>
-  <syscall name="tkill" number="200"/>
+  <syscall name="readahead" number="187" groups="descriptor"/>
+  <syscall name="setxattr" number="188" groups="file"/>
+  <syscall name="lsetxattr" number="189" groups="file"/>
+  <syscall name="fsetxattr" number="190" groups="descriptor"/>
+  <syscall name="getxattr" number="191" groups="file"/>
+  <syscall name="lgetxattr" number="192" groups="file"/>
+  <syscall name="fgetxattr" number="193" groups="descriptor"/>
+  <syscall name="listxattr" number="194" groups="file"/>
+  <syscall name="llistxattr" number="195" groups="file"/>
+  <syscall name="flistxattr" number="196" groups="descriptor"/>
+  <syscall name="removexattr" number="197" groups="file"/>
+  <syscall name="lremovexattr" number="198" groups="file"/>
+  <syscall name="fremovexattr" number="199" groups="descriptor"/>
+  <syscall name="tkill" number="200" groups="signal"/>
   <syscall name="time" number="201"/>
   <syscall name="futex" number="202"/>
   <syscall name="sched_setaffinity" number="203"/>
@@ -227,15 +224,15 @@
   <syscall name="io_cancel" number="210"/>
   <syscall name="get_thread_area" number="211"/>
   <syscall name="lookup_dcookie" number="212"/>
-  <syscall name="epoll_create" number="213"/>
+  <syscall name="epoll_create" number="213" groups="descriptor"/>
   <syscall name="epoll_ctl_old" number="214"/>
   <syscall name="epoll_wait_old" number="215"/>
-  <syscall name="remap_file_pages" number="216"/>
-  <syscall name="getdents64" number="217"/>
+  <syscall name="remap_file_pages" number="216" groups="memory"/>
+  <syscall name="getdents64" number="217" groups="descriptor"/>
   <syscall name="set_tid_address" number="218"/>
   <syscall name="restart_syscall" number="219"/>
-  <syscall name="semtimedop" number="220"/>
-  <syscall name="fadvise64" number="221"/>
+  <syscall name="semtimedop" number="220" groups="ipc"/>
+  <syscall name="fadvise64" number="221" groups="descriptor"/>
   <syscall name="timer_create" number="222"/>
   <syscall name="timer_settime" number="223"/>
   <syscall name="timer_gettime" number="224"/>
@@ -245,15 +242,15 @@
   <syscall name="clock_gettime" number="228"/>
   <syscall name="clock_getres" number="229"/>
   <syscall name="clock_nanosleep" number="230"/>
-  <syscall name="exit_group" number="231"/>
-  <syscall name="epoll_wait" number="232"/>
-  <syscall name="epoll_ctl" number="233"/>
-  <syscall name="tgkill" number="234"/>
-  <syscall name="utimes" number="235"/>
+  <syscall name="exit_group" number="231" groups="process"/>
+  <syscall name="epoll_wait" number="232" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="233" groups="descriptor"/>
+  <syscall name="tgkill" number="234" groups="signal"/>
+  <syscall name="utimes" number="235" groups="file"/>
   <syscall name="vserver" number="236"/>
-  <syscall name="mbind" number="237"/>
-  <syscall name="set_mempolicy" number="238"/>
-  <syscall name="get_mempolicy" number="239"/>
+  <syscall name="mbind" number="237" groups="memory"/>
+  <syscall name="set_mempolicy" number="238" groups="memory"/>
+  <syscall name="get_mempolicy" number="239" groups="memory"/>
   <syscall name="mq_open" number="240"/>
   <syscall name="mq_unlink" number="241"/>
   <syscall name="mq_timedsend" number="242"/>
@@ -261,54 +258,54 @@
   <syscall name="mq_notify" number="244"/>
   <syscall name="mq_getsetattr" number="245"/>
   <syscall name="kexec_load" number="246"/>
-  <syscall name="waitid" number="247"/>
+  <syscall name="waitid" number="247" groups="process"/>
   <syscall name="add_key" number="248"/>
   <syscall name="request_key" number="249"/>
   <syscall name="keyctl" number="250"/>
   <syscall name="ioprio_set" number="251"/>
   <syscall name="ioprio_get" number="252"/>
-  <syscall name="inotify_init" number="253"/>
-  <syscall name="inotify_add_watch" number="254"/>
-  <syscall name="inotify_rm_watch" number="255"/>
-  <syscall name="migrate_pages" number="256"/>
-  <syscall name="openat" number="257"/>
-  <syscall name="mkdirat" number="258"/>
-  <syscall name="mknodat" number="259"/>
-  <syscall name="fchownat" number="260"/>
-  <syscall name="futimesat" number="261"/>
-  <syscall name="newfstatat" number="262"/>
-  <syscall name="unlinkat" number="263"/>
-  <syscall name="renameat" number="264"/>
-  <syscall name="linkat" number="265"/>
-  <syscall name="symlinkat" number="266"/>
-  <syscall name="readlinkat" number="267"/>
-  <syscall name="fchmodat" number="268"/>
-  <syscall name="faccessat" number="269"/>
-  <syscall name="pselect6" number="270"/>
-  <syscall name="ppoll" number="271"/>
-  <syscall name="unshare" number="272"/>
+  <syscall name="inotify_init" number="253" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="254" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="255" groups="descriptor"/>
+  <syscall name="migrate_pages" number="256" groups="memory"/>
+  <syscall name="openat" number="257" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="258" groups="descriptor,file"/>
+  <syscall name="mknodat" number="259" groups="descriptor,file"/>
+  <syscall name="fchownat" number="260" groups="descriptor,file"/>
+  <syscall name="futimesat" number="261" groups="descriptor,file"/>
+  <syscall name="newfstatat" number="262" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="263" groups="descriptor,file"/>
+  <syscall name="renameat" number="264" groups="descriptor,file"/>
+  <syscall name="linkat" number="265" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="266" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="267" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="268" groups="descriptor,file"/>
+  <syscall name="faccessat" number="269" groups="descriptor,file"/>
+  <syscall name="pselect6" number="270" groups="descriptor"/>
+  <syscall name="ppoll" number="271" groups="descriptor"/>
+  <syscall name="unshare" number="272" groups="process"/>
   <syscall name="set_robust_list" number="273"/>
   <syscall name="get_robust_list" number="274"/>
-  <syscall name="splice" number="275"/>
-  <syscall name="tee" number="276"/>
-  <syscall name="sync_file_range" number="277"/>
-  <syscall name="vmsplice" number="278"/>
-  <syscall name="move_pages" number="279"/>
-  <syscall name="utimensat" number="280"/>
-  <syscall name="epoll_pwait" number="281"/>
-  <syscall name="signalfd" number="282"/>
-  <syscall name="timerfd_create" number="283"/>
-  <syscall name="eventfd" number="284"/>
-  <syscall name="fallocate" number="285"/>
-  <syscall name="timerfd_settime" number="286"/>
-  <syscall name="timerfd_gettime" number="287"/>
-  <syscall name="accept4" number="288"/>
-  <syscall name="signalfd4" number="289"/>
-  <syscall name="eventfd2" number="290"/>
-  <syscall name="epoll_create1" number="291"/>
-  <syscall name="dup3" number="292"/>
-  <syscall name="pipe2" number="293"/>
-  <syscall name="inotify_init1" number="294"/>
-  <syscall name="preadv" number="295"/>
-  <syscall name="pwritev" number="296"/>
+  <syscall name="splice" number="275" groups="descriptor"/>
+  <syscall name="tee" number="276" groups="descriptor"/>
+  <syscall name="sync_file_range" number="277" groups="descriptor"/>
+  <syscall name="vmsplice" number="278" groups="descriptor"/>
+  <syscall name="move_pages" number="279" groups="memory"/>
+  <syscall name="utimensat" number="280" groups="descriptor,file"/>
+  <syscall name="epoll_pwait" number="281" groups="descriptor"/>
+  <syscall name="signalfd" number="282" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" number="283" groups="descriptor"/>
+  <syscall name="eventfd" number="284" groups="descriptor"/>
+  <syscall name="fallocate" number="285" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="286" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="287" groups="descriptor"/>
+  <syscall name="accept4" number="288" groups="network"/>
+  <syscall name="signalfd4" number="289" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="290" groups="descriptor"/>
+  <syscall name="epoll_create1" number="291" groups="descriptor"/>
+  <syscall name="dup3" number="292" groups="descriptor"/>
+  <syscall name="pipe2" number="293" groups="descriptor"/>
+  <syscall name="inotify_init1" number="294" groups="descriptor"/>
+  <syscall name="preadv" number="295" groups="descriptor"/>
+  <syscall name="pwritev" number="296" groups="descriptor"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/amd64-linux.xml.in ./gdb/syscalls/amd64-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/amd64-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/amd64-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,314 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/x86/include/asm/unistd_64.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="read" number="0"/>
+  <syscall name="write" number="1"/>
+  <syscall name="open" number="2"/>
+  <syscall name="close" number="3"/>
+  <syscall name="stat" number="4"/>
+  <syscall name="fstat" number="5"/>
+  <syscall name="lstat" number="6"/>
+  <syscall name="poll" number="7"/>
+  <syscall name="lseek" number="8"/>
+  <syscall name="mmap" number="9"/>
+  <syscall name="mprotect" number="10"/>
+  <syscall name="munmap" number="11"/>
+  <syscall name="brk" number="12"/>
+  <syscall name="rt_sigaction" number="13"/>
+  <syscall name="rt_sigprocmask" number="14"/>
+  <syscall name="rt_sigreturn" number="15"/>
+  <syscall name="ioctl" number="16"/>
+  <syscall name="pread64" number="17"/>
+  <syscall name="pwrite64" number="18"/>
+  <syscall name="readv" number="19"/>
+  <syscall name="writev" number="20"/>
+  <syscall name="access" number="21"/>
+  <syscall name="pipe" number="22"/>
+  <syscall name="select" number="23"/>
+  <syscall name="sched_yield" number="24"/>
+  <syscall name="mremap" number="25"/>
+  <syscall name="msync" number="26"/>
+  <syscall name="mincore" number="27"/>
+  <syscall name="madvise" number="28"/>
+  <syscall name="shmget" number="29"/>
+  <syscall name="shmat" number="30"/>
+  <syscall name="shmctl" number="31"/>
+  <syscall name="dup" number="32"/>
+  <syscall name="dup2" number="33"/>
+  <syscall name="pause" number="34"/>
+  <syscall name="nanosleep" number="35"/>
+  <syscall name="getitimer" number="36"/>
+  <syscall name="alarm" number="37"/>
+  <syscall name="setitimer" number="38"/>
+  <syscall name="getpid" number="39"/>
+  <syscall name="sendfile" number="40"/>
+  <syscall name="socket" number="41"/>
+  <syscall name="connect" number="42"/>
+  <syscall name="accept" number="43"/>
+  <syscall name="sendto" number="44"/>
+  <syscall name="recvfrom" number="45"/>
+  <syscall name="sendmsg" number="46"/>
+  <syscall name="recvmsg" number="47"/>
+  <syscall name="shutdown" number="48"/>
+  <syscall name="bind" number="49"/>
+  <syscall name="listen" number="50"/>
+  <syscall name="getsockname" number="51"/>
+  <syscall name="getpeername" number="52"/>
+  <syscall name="socketpair" number="53"/>
+  <syscall name="setsockopt" number="54"/>
+  <syscall name="getsockopt" number="55"/>
+  <syscall name="clone" number="56"/>
+  <syscall name="fork" number="57"/>
+  <syscall name="vfork" number="58"/>
+  <syscall name="execve" number="59"/>
+  <syscall name="exit" number="60"/>
+  <syscall name="wait4" number="61"/>
+  <syscall name="kill" number="62"/>
+  <syscall name="uname" number="63"/>
+  <syscall name="semget" number="64"/>
+  <syscall name="semop" number="65"/>
+  <syscall name="semctl" number="66"/>
+  <syscall name="shmdt" number="67"/>
+  <syscall name="msgget" number="68"/>
+  <syscall name="msgsnd" number="69"/>
+  <syscall name="msgrcv" number="70"/>
+  <syscall name="msgctl" number="71"/>
+  <syscall name="fcntl" number="72"/>
+  <syscall name="flock" number="73"/>
+  <syscall name="fsync" number="74"/>
+  <syscall name="fdatasync" number="75"/>
+  <syscall name="truncate" number="76"/>
+  <syscall name="ftruncate" number="77"/>
+  <syscall name="getdents" number="78"/>
+  <syscall name="getcwd" number="79"/>
+  <syscall name="chdir" number="80"/>
+  <syscall name="fchdir" number="81"/>
+  <syscall name="rename" number="82"/>
+  <syscall name="mkdir" number="83"/>
+  <syscall name="rmdir" number="84"/>
+  <syscall name="creat" number="85"/>
+  <syscall name="link" number="86"/>
+  <syscall name="unlink" number="87"/>
+  <syscall name="symlink" number="88"/>
+  <syscall name="readlink" number="89"/>
+  <syscall name="chmod" number="90"/>
+  <syscall name="fchmod" number="91"/>
+  <syscall name="chown" number="92"/>
+  <syscall name="fchown" number="93"/>
+  <syscall name="lchown" number="94"/>
+  <syscall name="umask" number="95"/>
+  <syscall name="gettimeofday" number="96"/>
+  <syscall name="getrlimit" number="97"/>
+  <syscall name="getrusage" number="98"/>
+  <syscall name="sysinfo" number="99"/>
+  <syscall name="times" number="100"/>
+  <syscall name="ptrace" number="101"/>
+  <syscall name="getuid" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="getgid" number="104"/>
+  <syscall name="setuid" number="105"/>
+  <syscall name="setgid" number="106"/>
+  <syscall name="geteuid" number="107"/>
+  <syscall name="getegid" number="108"/>
+  <syscall name="setpgid" number="109"/>
+  <syscall name="getppid" number="110"/>
+  <syscall name="getpgrp" number="111"/>
+  <syscall name="setsid" number="112"/>
+  <syscall name="setreuid" number="113"/>
+  <syscall name="setregid" number="114"/>
+  <syscall name="getgroups" number="115"/>
+  <syscall name="setgroups" number="116"/>
+  <syscall name="setresuid" number="117"/>
+  <syscall name="getresuid" number="118"/>
+  <syscall name="setresgid" number="119"/>
+  <syscall name="getresgid" number="120"/>
+  <syscall name="getpgid" number="121"/>
+  <syscall name="setfsuid" number="122"/>
+  <syscall name="setfsgid" number="123"/>
+  <syscall name="getsid" number="124"/>
+  <syscall name="capget" number="125"/>
+  <syscall name="capset" number="126"/>
+  <syscall name="rt_sigpending" number="127"/>
+  <syscall name="rt_sigtimedwait" number="128"/>
+  <syscall name="rt_sigqueueinfo" number="129"/>
+  <syscall name="rt_sigsuspend" number="130"/>
+  <syscall name="sigaltstack" number="131"/>
+  <syscall name="utime" number="132"/>
+  <syscall name="mknod" number="133"/>
+  <syscall name="uselib" number="134"/>
+  <syscall name="personality" number="135"/>
+  <syscall name="ustat" number="136"/>
+  <syscall name="statfs" number="137"/>
+  <syscall name="fstatfs" number="138"/>
+  <syscall name="sysfs" number="139"/>
+  <syscall name="getpriority" number="140"/>
+  <syscall name="setpriority" number="141"/>
+  <syscall name="sched_setparam" number="142"/>
+  <syscall name="sched_getparam" number="143"/>
+  <syscall name="sched_setscheduler" number="144"/>
+  <syscall name="sched_getscheduler" number="145"/>
+  <syscall name="sched_get_priority_max" number="146"/>
+  <syscall name="sched_get_priority_min" number="147"/>
+  <syscall name="sched_rr_get_interval" number="148"/>
+  <syscall name="mlock" number="149"/>
+  <syscall name="munlock" number="150"/>
+  <syscall name="mlockall" number="151"/>
+  <syscall name="munlockall" number="152"/>
+  <syscall name="vhangup" number="153"/>
+  <syscall name="modify_ldt" number="154"/>
+  <syscall name="pivot_root" number="155"/>
+  <syscall name="_sysctl" number="156"/>
+  <syscall name="prctl" number="157"/>
+  <syscall name="arch_prctl" number="158"/>
+  <syscall name="adjtimex" number="159"/>
+  <syscall name="setrlimit" number="160"/>
+  <syscall name="chroot" number="161"/>
+  <syscall name="sync" number="162"/>
+  <syscall name="acct" number="163"/>
+  <syscall name="settimeofday" number="164"/>
+  <syscall name="mount" number="165"/>
+  <syscall name="umount2" number="166"/>
+  <syscall name="swapon" number="167"/>
+  <syscall name="swapoff" number="168"/>
+  <syscall name="reboot" number="169"/>
+  <syscall name="sethostname" number="170"/>
+  <syscall name="setdomainname" number="171"/>
+  <syscall name="iopl" number="172"/>
+  <syscall name="ioperm" number="173"/>
+  <syscall name="create_module" number="174"/>
+  <syscall name="init_module" number="175"/>
+  <syscall name="delete_module" number="176"/>
+  <syscall name="get_kernel_syms" number="177"/>
+  <syscall name="query_module" number="178"/>
+  <syscall name="quotactl" number="179"/>
+  <syscall name="nfsservctl" number="180"/>
+  <syscall name="getpmsg" number="181"/>
+  <syscall name="putpmsg" number="182"/>
+  <syscall name="afs_syscall" number="183"/>
+  <syscall name="tuxcall" number="184"/>
+  <syscall name="security" number="185"/>
+  <syscall name="gettid" number="186"/>
+  <syscall name="readahead" number="187"/>
+  <syscall name="setxattr" number="188"/>
+  <syscall name="lsetxattr" number="189"/>
+  <syscall name="fsetxattr" number="190"/>
+  <syscall name="getxattr" number="191"/>
+  <syscall name="lgetxattr" number="192"/>
+  <syscall name="fgetxattr" number="193"/>
+  <syscall name="listxattr" number="194"/>
+  <syscall name="llistxattr" number="195"/>
+  <syscall name="flistxattr" number="196"/>
+  <syscall name="removexattr" number="197"/>
+  <syscall name="lremovexattr" number="198"/>
+  <syscall name="fremovexattr" number="199"/>
+  <syscall name="tkill" number="200"/>
+  <syscall name="time" number="201"/>
+  <syscall name="futex" number="202"/>
+  <syscall name="sched_setaffinity" number="203"/>
+  <syscall name="sched_getaffinity" number="204"/>
+  <syscall name="set_thread_area" number="205"/>
+  <syscall name="io_setup" number="206"/>
+  <syscall name="io_destroy" number="207"/>
+  <syscall name="io_getevents" number="208"/>
+  <syscall name="io_submit" number="209"/>
+  <syscall name="io_cancel" number="210"/>
+  <syscall name="get_thread_area" number="211"/>
+  <syscall name="lookup_dcookie" number="212"/>
+  <syscall name="epoll_create" number="213"/>
+  <syscall name="epoll_ctl_old" number="214"/>
+  <syscall name="epoll_wait_old" number="215"/>
+  <syscall name="remap_file_pages" number="216"/>
+  <syscall name="getdents64" number="217"/>
+  <syscall name="set_tid_address" number="218"/>
+  <syscall name="restart_syscall" number="219"/>
+  <syscall name="semtimedop" number="220"/>
+  <syscall name="fadvise64" number="221"/>
+  <syscall name="timer_create" number="222"/>
+  <syscall name="timer_settime" number="223"/>
+  <syscall name="timer_gettime" number="224"/>
+  <syscall name="timer_getoverrun" number="225"/>
+  <syscall name="timer_delete" number="226"/>
+  <syscall name="clock_settime" number="227"/>
+  <syscall name="clock_gettime" number="228"/>
+  <syscall name="clock_getres" number="229"/>
+  <syscall name="clock_nanosleep" number="230"/>
+  <syscall name="exit_group" number="231"/>
+  <syscall name="epoll_wait" number="232"/>
+  <syscall name="epoll_ctl" number="233"/>
+  <syscall name="tgkill" number="234"/>
+  <syscall name="utimes" number="235"/>
+  <syscall name="vserver" number="236"/>
+  <syscall name="mbind" number="237"/>
+  <syscall name="set_mempolicy" number="238"/>
+  <syscall name="get_mempolicy" number="239"/>
+  <syscall name="mq_open" number="240"/>
+  <syscall name="mq_unlink" number="241"/>
+  <syscall name="mq_timedsend" number="242"/>
+  <syscall name="mq_timedreceive" number="243"/>
+  <syscall name="mq_notify" number="244"/>
+  <syscall name="mq_getsetattr" number="245"/>
+  <syscall name="kexec_load" number="246"/>
+  <syscall name="waitid" number="247"/>
+  <syscall name="add_key" number="248"/>
+  <syscall name="request_key" number="249"/>
+  <syscall name="keyctl" number="250"/>
+  <syscall name="ioprio_set" number="251"/>
+  <syscall name="ioprio_get" number="252"/>
+  <syscall name="inotify_init" number="253"/>
+  <syscall name="inotify_add_watch" number="254"/>
+  <syscall name="inotify_rm_watch" number="255"/>
+  <syscall name="migrate_pages" number="256"/>
+  <syscall name="openat" number="257"/>
+  <syscall name="mkdirat" number="258"/>
+  <syscall name="mknodat" number="259"/>
+  <syscall name="fchownat" number="260"/>
+  <syscall name="futimesat" number="261"/>
+  <syscall name="newfstatat" number="262"/>
+  <syscall name="unlinkat" number="263"/>
+  <syscall name="renameat" number="264"/>
+  <syscall name="linkat" number="265"/>
+  <syscall name="symlinkat" number="266"/>
+  <syscall name="readlinkat" number="267"/>
+  <syscall name="fchmodat" number="268"/>
+  <syscall name="faccessat" number="269"/>
+  <syscall name="pselect6" number="270"/>
+  <syscall name="ppoll" number="271"/>
+  <syscall name="unshare" number="272"/>
+  <syscall name="set_robust_list" number="273"/>
+  <syscall name="get_robust_list" number="274"/>
+  <syscall name="splice" number="275"/>
+  <syscall name="tee" number="276"/>
+  <syscall name="sync_file_range" number="277"/>
+  <syscall name="vmsplice" number="278"/>
+  <syscall name="move_pages" number="279"/>
+  <syscall name="utimensat" number="280"/>
+  <syscall name="epoll_pwait" number="281"/>
+  <syscall name="signalfd" number="282"/>
+  <syscall name="timerfd_create" number="283"/>
+  <syscall name="eventfd" number="284"/>
+  <syscall name="fallocate" number="285"/>
+  <syscall name="timerfd_settime" number="286"/>
+  <syscall name="timerfd_gettime" number="287"/>
+  <syscall name="accept4" number="288"/>
+  <syscall name="signalfd4" number="289"/>
+  <syscall name="eventfd2" number="290"/>
+  <syscall name="epoll_create1" number="291"/>
+  <syscall name="dup3" number="292"/>
+  <syscall name="pipe2" number="293"/>
+  <syscall name="inotify_init1" number="294"/>
+  <syscall name="preadv" number="295"/>
+  <syscall name="pwritev" number="296"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/apply-defaults.xsl ./gdb/syscalls/apply-defaults.xsl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/apply-defaults.xsl	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/apply-defaults.xsl	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+<!-- Generate syscall XML files based on defaults template.
+     Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+     This file is part of GDB.
+
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+     the Free Software Foundation; either version 3 of the License, or
+     (at your option) any later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<xsl:stylesheet version="1.0"
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="xml" doctype-system="gdb-syscalls.dtd"/>
+
+  <xsl:template match="node()|@*" name="identity">
+    <xsl:copy>
+      <xsl:apply-templates select="node()|@*"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="/syscalls_info/syscall">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+      <xsl:variable name="syscall"><xsl:value-of select="@name"/></xsl:variable>
+      <xsl:variable name="tgroups"><xsl:value-of select="@groups"/></xsl:variable>
+      <xsl:for-each select="document('linux-defaults.xml.in')/syscalls_defaults/child::*[@name=$syscall]">
+	<xsl:attribute name="groups">
+	  <xsl:value-of select="@groups"/>
+	  <xsl:if test="$tgroups != '' ">,<xsl:value-of select="$tgroups"/></xsl:if>
+	</xsl:attribute>
+      </xsl:for-each>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.py ./gdb/syscalls/arm-linux.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/arm-linux.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.xml ./gdb/syscalls/arm-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/arm-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,95 +1,92 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  This file is offered as-is,
      without any warranty. -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
 
      linux/arch/arm/include/uapi/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.
      Some small hand-edits were made. -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="waitpid" number="7"/> <!-- removed -->
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="waitpid" number="7" groups="process"/> <!-- removed -->
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
   <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="break" number="17"/> <!-- removed -->
-  <syscall name="oldstat" number="18"/> <!-- removed -->
-  <syscall name="lseek" number="19"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="break" number="17" groups="memory"/> <!-- removed -->
+  <syscall name="oldstat" number="18" groups="file"/> <!-- removed -->
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
   <syscall name="stime" number="25"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="oldfstat" number="28"/> <!-- removed -->
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
+  <syscall name="oldfstat" number="28" groups="descriptor"/> <!-- removed -->
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
   <syscall name="stty" number="31"/> <!-- removed -->
   <syscall name="gtty" number="32"/> <!-- removed -->
-  <syscall name="access" number="33"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="ftime" number="35"/> <!-- removed -->
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
   <syscall name="prof" number="44"/> <!-- removed -->
-  <syscall name="brk" number="45"/>
+  <syscall name="brk" number="45" groups="memory"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/> <!-- removed -->
+  <syscall name="signal" number="48" groups="signal"/> <!-- removed -->
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
   <syscall name="lock" number="53"/> <!-- removed -->
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="mpx" number="56"/> <!-- removed -->
   <syscall name="setpgid" number="57"/>
   <syscall name="ulimit" number="58"/> <!-- removed -->
   <syscall name="oldolduname" number="59"/> <!-- removed -->
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
-  <syscall name="sgetmask" number="68"/> <!-- removed -->
-  <syscall name="ssetmask" number="69"/> <!-- removed -->
+  <syscall name="sigaction" number="67" groups="signal"/>
+  <syscall name="sgetmask" number="68" groups="signal"/> <!-- removed -->
+  <syscall name="ssetmask" number="69" groups="signal"/> <!-- removed -->
   <syscall name="setreuid" number="70"/>
   <syscall name="setregid" number="71"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrlimit" number="76"/>
@@ -98,78 +95,78 @@
   <syscall name="settimeofday" number="79"/>
   <syscall name="getgroups" number="80"/>
   <syscall name="setgroups" number="81"/>
-  <syscall name="select" number="82"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="oldlstat" number="84"/> <!-- removed -->
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="select" number="82" groups="descriptor"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="oldlstat" number="84" groups="file"/> <!-- removed -->
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
+  <syscall name="fchown" number="95" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
   <syscall name="profil" number="98"/> <!-- removed -->
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
   <syscall name="ioperm" number="101"/> <!-- removed -->
-  <syscall name="socketcall" number="102"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="olduname" number="109"/> <!-- removed -->
   <syscall name="iopl" number="110"/> <!-- removed -->
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/> <!-- removed -->
   <syscall name="syscall" number="113"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="modify_ldt" number="123"/> <!-- removed -->
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/> <!-- removed -->
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/> <!-- removed -->
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/> <!-- removed -->
   <syscall name="setfsuid" number="138"/>
   <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="_newselect" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="_llseek" number="140" groups="descriptor"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="_newselect" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -179,40 +176,40 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="setresuid" number="164"/>
   <syscall name="getresuid" number="165"/>
   <syscall name="vm86" number="166"/> <!-- removed -->
   <syscall name="query_module" number="167"/> <!-- removed -->
-  <syscall name="poll" number="168"/>
+  <syscall name="poll" number="168" groups="descriptor"/>
   <syscall name="nfsservctl" number="169"/>
   <syscall name="setresgid" number="170"/>
   <syscall name="getresgid" number="171"/>
   <syscall name="prctl" number="172"/>
-  <syscall name="rt_sigreturn" number="173"/>
-  <syscall name="rt_sigaction" number="174"/>
-  <syscall name="rt_sigprocmask" number="175"/>
-  <syscall name="rt_sigpending" number="176"/>
-  <syscall name="rt_sigtimedwait" number="177"/>
-  <syscall name="rt_sigqueueinfo" number="178"/>
-  <syscall name="rt_sigsuspend" number="179"/>
-  <syscall name="pread64" number="180"/>
-  <syscall name="pwrite64" number="181"/>
-  <syscall name="chown" number="182"/>
-  <syscall name="getcwd" number="183"/>
+  <syscall name="rt_sigreturn" number="173" groups="signal"/>
+  <syscall name="rt_sigaction" number="174" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="175" groups="signal"/>
+  <syscall name="rt_sigpending" number="176" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="177" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="178" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="179" groups="signal"/>
+  <syscall name="pread64" number="180" groups="descriptor"/>
+  <syscall name="pwrite64" number="181" groups="descriptor"/>
+  <syscall name="chown" number="182" groups="file"/>
+  <syscall name="getcwd" number="183" groups="file"/>
   <syscall name="capget" number="184"/>
   <syscall name="capset" number="185"/>
-  <syscall name="sigaltstack" number="186"/>
-  <syscall name="sendfile" number="187"/>
-  <syscall name="vfork" number="190"/>
+  <syscall name="sigaltstack" number="186" groups="signal"/>
+  <syscall name="sendfile" number="187" groups="descriptor,network"/>
+  <syscall name="vfork" number="190" groups="process"/>
   <syscall name="ugetrlimit" number="191"/>
-  <syscall name="mmap2" number="192"/>
-  <syscall name="truncate64" number="193"/>
-  <syscall name="ftruncate64" number="194"/>
-  <syscall name="stat64" number="195"/>
-  <syscall name="lstat64" number="196"/>
-  <syscall name="fstat64" number="197"/>
-  <syscall name="lchown32" number="198"/>
+  <syscall name="mmap2" number="192" groups="descriptor,memory"/>
+  <syscall name="truncate64" number="193" groups="file"/>
+  <syscall name="ftruncate64" number="194" groups="descriptor"/>
+  <syscall name="stat64" number="195" groups="file"/>
+  <syscall name="lstat64" number="196" groups="file"/>
+  <syscall name="fstat64" number="197" groups="descriptor"/>
+  <syscall name="lchown32" number="198" groups="file"/>
   <syscall name="getuid32" number="199"/>
   <syscall name="getgid32" number="200"/>
   <syscall name="geteuid32" number="201"/>
@@ -221,37 +218,37 @@
   <syscall name="setregid32" number="204"/>
   <syscall name="getgroups32" number="205"/>
   <syscall name="setgroups32" number="206"/>
-  <syscall name="fchown32" number="207"/>
+  <syscall name="fchown32" number="207" groups="descriptor"/>
   <syscall name="setresuid32" number="208"/>
   <syscall name="getresuid32" number="209"/>
   <syscall name="setresgid32" number="210"/>
   <syscall name="getresgid32" number="211"/>
-  <syscall name="chown32" number="212"/>
+  <syscall name="chown32" number="212" groups="file"/>
   <syscall name="setuid32" number="213"/>
   <syscall name="setgid32" number="214"/>
   <syscall name="setfsuid32" number="215"/>
   <syscall name="setfsgid32" number="216"/>
-  <syscall name="getdents64" number="217"/>
-  <syscall name="pivot_root" number="218"/>
-  <syscall name="mincore" number="219"/>
-  <syscall name="madvise" number="220"/>
-  <syscall name="fcntl64" number="221"/>
+  <syscall name="getdents64" number="217" groups="descriptor"/>
+  <syscall name="pivot_root" number="218" groups="file"/>
+  <syscall name="mincore" number="219" groups="memory"/>
+  <syscall name="madvise" number="220" groups="memory"/>
+  <syscall name="fcntl64" number="221" groups="descriptor"/>
   <syscall name="gettid" number="224"/>
-  <syscall name="readahead" number="225"/>
-  <syscall name="setxattr" number="226"/>
-  <syscall name="lsetxattr" number="227"/>
-  <syscall name="fsetxattr" number="228"/>
-  <syscall name="getxattr" number="229"/>
-  <syscall name="lgetxattr" number="230"/>
-  <syscall name="fgetxattr" number="231"/>
-  <syscall name="listxattr" number="232"/>
-  <syscall name="llistxattr" number="233"/>
-  <syscall name="flistxattr" number="234"/>
-  <syscall name="removexattr" number="235"/>
-  <syscall name="lremovexattr" number="236"/>
-  <syscall name="fremovexattr" number="237"/>
-  <syscall name="tkill" number="238"/>
-  <syscall name="sendfile64" number="239"/>
+  <syscall name="readahead" number="225" groups="descriptor"/>
+  <syscall name="setxattr" number="226" groups="file"/>
+  <syscall name="lsetxattr" number="227" groups="file"/>
+  <syscall name="fsetxattr" number="228" groups="descriptor"/>
+  <syscall name="getxattr" number="229" groups="file"/>
+  <syscall name="lgetxattr" number="230" groups="file"/>
+  <syscall name="fgetxattr" number="231" groups="descriptor"/>
+  <syscall name="listxattr" number="232" groups="file"/>
+  <syscall name="llistxattr" number="233" groups="file"/>
+  <syscall name="flistxattr" number="234" groups="descriptor"/>
+  <syscall name="removexattr" number="235" groups="file"/>
+  <syscall name="lremovexattr" number="236" groups="file"/>
+  <syscall name="fremovexattr" number="237" groups="descriptor"/>
+  <syscall name="tkill" number="238" groups="signal"/>
+  <syscall name="sendfile64" number="239" groups="descriptor,network"/>
   <syscall name="futex" number="240"/>
   <syscall name="sched_setaffinity" number="241"/>
   <syscall name="sched_getaffinity" number="242"/>
@@ -260,12 +257,12 @@
   <syscall name="io_getevents" number="245"/>
   <syscall name="io_submit" number="246"/>
   <syscall name="io_cancel" number="247"/>
-  <syscall name="exit_group" number="248"/>
+  <syscall name="exit_group" number="248" groups="process"/>
   <syscall name="lookup_dcookie" number="249"/>
-  <syscall name="epoll_create" number="250"/>
-  <syscall name="epoll_ctl" number="251"/>
-  <syscall name="epoll_wait" number="252"/>
-  <syscall name="remap_file_pages" number="253"/>
+  <syscall name="epoll_create" number="250" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="251" groups="descriptor"/>
+  <syscall name="epoll_wait" number="252" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="253" groups="memory"/>
   <syscall name="set_tid_address" number="256"/>
   <syscall name="timer_create" number="257"/>
   <syscall name="timer_settime" number="258"/>
@@ -276,10 +273,10 @@
   <syscall name="clock_gettime" number="263"/>
   <syscall name="clock_getres" number="264"/>
   <syscall name="clock_nanosleep" number="265"/>
-  <syscall name="statfs64" number="266"/>
-  <syscall name="fstatfs64" number="267"/>
-  <syscall name="tgkill" number="268"/>
-  <syscall name="utimes" number="269"/>
+  <syscall name="statfs64" number="266" groups="file"/>
+  <syscall name="fstatfs64" number="267" groups="descriptor"/>
+  <syscall name="tgkill" number="268" groups="signal"/>
+  <syscall name="utimes" number="269" groups="file"/>
   <syscall name="arm_fadvise64_64" number="270"/>
   <syscall name="pciconfig_iobase" number="271"/>
   <syscall name="pciconfig_read" number="272"/>
@@ -290,106 +287,106 @@
   <syscall name="mq_timedreceive" number="277"/>
   <syscall name="mq_notify" number="278"/>
   <syscall name="mq_getsetattr" number="279"/>
-  <syscall name="waitid" number="280"/>
-  <syscall name="socket" number="281"/>
-  <syscall name="bind" number="282"/>
-  <syscall name="connect" number="283"/>
-  <syscall name="listen" number="284"/>
-  <syscall name="accept" number="285"/>
-  <syscall name="getsockname" number="286"/>
-  <syscall name="getpeername" number="287"/>
-  <syscall name="socketpair" number="288"/>
-  <syscall name="send" number="289"/>
-  <syscall name="sendto" number="290"/>
-  <syscall name="recv" number="291"/>
-  <syscall name="recvfrom" number="292"/>
-  <syscall name="shutdown" number="293"/>
-  <syscall name="setsockopt" number="294"/>
-  <syscall name="getsockopt" number="295"/>
-  <syscall name="sendmsg" number="296"/>
-  <syscall name="recvmsg" number="297"/>
-  <syscall name="semop" number="298"/>
-  <syscall name="semget" number="299"/>
-  <syscall name="semctl" number="300"/>
-  <syscall name="msgsnd" number="301"/>
-  <syscall name="msgrcv" number="302"/>
-  <syscall name="msgget" number="303"/>
-  <syscall name="msgctl" number="304"/>
-  <syscall name="shmat" number="305"/>
-  <syscall name="shmdt" number="306"/>
-  <syscall name="shmget" number="307"/>
-  <syscall name="shmctl" number="308"/>
+  <syscall name="waitid" number="280" groups="process"/>
+  <syscall name="socket" number="281" groups="network"/>
+  <syscall name="bind" number="282" groups="network"/>
+  <syscall name="connect" number="283" groups="network"/>
+  <syscall name="listen" number="284" groups="network"/>
+  <syscall name="accept" number="285" groups="network"/>
+  <syscall name="getsockname" number="286" groups="network"/>
+  <syscall name="getpeername" number="287" groups="network"/>
+  <syscall name="socketpair" number="288" groups="network"/>
+  <syscall name="send" number="289" groups="network"/>
+  <syscall name="sendto" number="290" groups="network"/>
+  <syscall name="recv" number="291" groups="network"/>
+  <syscall name="recvfrom" number="292" groups="network"/>
+  <syscall name="shutdown" number="293" groups="network"/>
+  <syscall name="setsockopt" number="294" groups="network"/>
+  <syscall name="getsockopt" number="295" groups="network"/>
+  <syscall name="sendmsg" number="296" groups="network"/>
+  <syscall name="recvmsg" number="297" groups="network"/>
+  <syscall name="semop" number="298" groups="ipc"/>
+  <syscall name="semget" number="299" groups="ipc"/>
+  <syscall name="semctl" number="300" groups="ipc"/>
+  <syscall name="msgsnd" number="301" groups="ipc"/>
+  <syscall name="msgrcv" number="302" groups="ipc"/>
+  <syscall name="msgget" number="303" groups="ipc"/>
+  <syscall name="msgctl" number="304" groups="ipc"/>
+  <syscall name="shmat" number="305" groups="ipc,memory"/>
+  <syscall name="shmdt" number="306" groups="ipc,memory"/>
+  <syscall name="shmget" number="307" groups="ipc"/>
+  <syscall name="shmctl" number="308" groups="ipc"/>
   <syscall name="add_key" number="309"/>
   <syscall name="request_key" number="310"/>
   <syscall name="keyctl" number="311"/>
-  <syscall name="semtimedop" number="312"/>
+  <syscall name="semtimedop" number="312" groups="ipc"/>
   <syscall name="vserver" number="313"/>
   <syscall name="ioprio_set" number="314"/>
   <syscall name="ioprio_get" number="315"/>
-  <syscall name="inotify_init" number="316"/>
-  <syscall name="inotify_add_watch" number="317"/>
-  <syscall name="inotify_rm_watch" number="318"/>
-  <syscall name="mbind" number="319"/>
-  <syscall name="get_mempolicy" number="320"/>
-  <syscall name="set_mempolicy" number="321"/>
-  <syscall name="openat" number="322"/>
-  <syscall name="mkdirat" number="323"/>
-  <syscall name="mknodat" number="324"/>
-  <syscall name="fchownat" number="325"/>
-  <syscall name="futimesat" number="326"/>
-  <syscall name="fstatat64" number="327"/>
-  <syscall name="unlinkat" number="328"/>
-  <syscall name="renameat" number="329"/>
-  <syscall name="linkat" number="330"/>
-  <syscall name="symlinkat" number="331"/>
-  <syscall name="readlinkat" number="332"/>
-  <syscall name="fchmodat" number="333"/>
-  <syscall name="faccessat" number="334"/>
-  <syscall name="pselect6" number="335"/>
-  <syscall name="ppoll" number="336"/>
-  <syscall name="unshare" number="337"/>
+  <syscall name="inotify_init" number="316" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="317" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="318" groups="descriptor"/>
+  <syscall name="mbind" number="319" groups="memory"/>
+  <syscall name="get_mempolicy" number="320" groups="memory"/>
+  <syscall name="set_mempolicy" number="321" groups="memory"/>
+  <syscall name="openat" number="322" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="323" groups="descriptor,file"/>
+  <syscall name="mknodat" number="324" groups="descriptor,file"/>
+  <syscall name="fchownat" number="325" groups="descriptor,file"/>
+  <syscall name="futimesat" number="326" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="327" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="328" groups="descriptor,file"/>
+  <syscall name="renameat" number="329" groups="descriptor,file"/>
+  <syscall name="linkat" number="330" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="331" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="332" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="333" groups="descriptor,file"/>
+  <syscall name="faccessat" number="334" groups="descriptor,file"/>
+  <syscall name="pselect6" number="335" groups="descriptor"/>
+  <syscall name="ppoll" number="336" groups="descriptor"/>
+  <syscall name="unshare" number="337" groups="process"/>
   <syscall name="set_robust_list" number="338"/>
   <syscall name="get_robust_list" number="339"/>
-  <syscall name="splice" number="340"/>
+  <syscall name="splice" number="340" groups="descriptor"/>
   <syscall name="arm_sync_file_range" number="341"/>
-  <syscall name="tee" number="342"/>
-  <syscall name="vmsplice" number="343"/>
-  <syscall name="move_pages" number="344"/>
+  <syscall name="tee" number="342" groups="descriptor"/>
+  <syscall name="vmsplice" number="343" groups="descriptor"/>
+  <syscall name="move_pages" number="344" groups="memory"/>
   <syscall name="getcpu" number="345"/>
-  <syscall name="epoll_pwait" number="346"/>
+  <syscall name="epoll_pwait" number="346" groups="descriptor"/>
   <syscall name="kexec_load" number="347"/>
-  <syscall name="utimensat" number="348"/>
-  <syscall name="signalfd" number="349"/>
-  <syscall name="timerfd_create" number="350"/>
-  <syscall name="eventfd" number="351"/>
-  <syscall name="fallocate" number="352"/>
-  <syscall name="timerfd_settime" number="353"/>
-  <syscall name="timerfd_gettime" number="354"/>
-  <syscall name="signalfd4" number="355"/>
-  <syscall name="eventfd2" number="356"/>
-  <syscall name="epoll_create1" number="357"/>
-  <syscall name="dup3" number="358"/>
-  <syscall name="pipe2" number="359"/>
-  <syscall name="inotify_init1" number="360"/>
-  <syscall name="preadv" number="361"/>
-  <syscall name="pwritev" number="362"/>
-  <syscall name="rt_tgsigqueueinfo" number="363"/>
-  <syscall name="perf_event_open" number="364"/>
-  <syscall name="recvmmsg" number="365"/>
-  <syscall name="accept4" number="366"/>
-  <syscall name="fanotify_init" number="367"/>
-  <syscall name="fanotify_mark" number="368"/>
+  <syscall name="utimensat" number="348" groups="descriptor,file"/>
+  <syscall name="signalfd" number="349" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" number="350" groups="descriptor"/>
+  <syscall name="eventfd" number="351" groups="descriptor"/>
+  <syscall name="fallocate" number="352" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="353" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="354" groups="descriptor"/>
+  <syscall name="signalfd4" number="355" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="356" groups="descriptor"/>
+  <syscall name="epoll_create1" number="357" groups="descriptor"/>
+  <syscall name="dup3" number="358" groups="descriptor"/>
+  <syscall name="pipe2" number="359" groups="descriptor"/>
+  <syscall name="inotify_init1" number="360" groups="descriptor"/>
+  <syscall name="preadv" number="361" groups="descriptor"/>
+  <syscall name="pwritev" number="362" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="363" groups="process,signal"/>
+  <syscall name="perf_event_open" number="364" groups="descriptor"/>
+  <syscall name="recvmmsg" number="365" groups="network"/>
+  <syscall name="accept4" number="366" groups="network"/>
+  <syscall name="fanotify_init" number="367" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="368" groups="descriptor,file"/>
   <syscall name="prlimit64" number="369"/>
-  <syscall name="name_to_handle_at" number="370"/>
-  <syscall name="open_by_handle_at" number="371"/>
+  <syscall name="name_to_handle_at" number="370" groups="descriptor,file"/>
+  <syscall name="open_by_handle_at" number="371" groups="descriptor"/>
   <syscall name="clock_adjtime" number="372"/>
-  <syscall name="syncfs" number="373"/>
-  <syscall name="sendmmsg" number="374"/>
-  <syscall name="setns" number="375"/>
+  <syscall name="syncfs" number="373" groups="descriptor"/>
+  <syscall name="sendmmsg" number="374" groups="network"/>
+  <syscall name="setns" number="375" groups="descriptor"/>
   <syscall name="process_vm_readv" number="376"/>
   <syscall name="process_vm_writev" number="377"/>
   <syscall name="kcmp" number="378"/>
-  <syscall name="finit_module" number="379"/>
+  <syscall name="finit_module" number="379" groups="descriptor"/>
   <syscall name="ARM_breakpoint" number="983041"/>
   <syscall name="ARM_cacheflush" number="983042"/>
   <syscall name="ARM_usr26" number="983043"/>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.xml.in ./gdb/syscalls/arm-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/arm-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/arm-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,398 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  This file is offered as-is,
+     without any warranty. -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+     linux/arch/arm/include/uapi/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.
+     Some small hand-edits were made. -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="waitpid" number="7"/> <!-- removed -->
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="break" number="17"/> <!-- removed -->
+  <syscall name="oldstat" number="18"/> <!-- removed -->
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="oldfstat" number="28"/> <!-- removed -->
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="stty" number="31"/> <!-- removed -->
+  <syscall name="gtty" number="32"/> <!-- removed -->
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="ftime" number="35"/> <!-- removed -->
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="prof" number="44"/> <!-- removed -->
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/> <!-- removed -->
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="lock" number="53"/> <!-- removed -->
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="mpx" number="56"/> <!-- removed -->
+  <syscall name="setpgid" number="57"/>
+  <syscall name="ulimit" number="58"/> <!-- removed -->
+  <syscall name="oldolduname" number="59"/> <!-- removed -->
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="sgetmask" number="68"/> <!-- removed -->
+  <syscall name="ssetmask" number="69"/> <!-- removed -->
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrlimit" number="76"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="select" number="82"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="oldlstat" number="84"/> <!-- removed -->
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="profil" number="98"/> <!-- removed -->
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="ioperm" number="101"/> <!-- removed -->
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="olduname" number="109"/> <!-- removed -->
+  <syscall name="iopl" number="110"/> <!-- removed -->
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/> <!-- removed -->
+  <syscall name="syscall" number="113"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="modify_ldt" number="123"/> <!-- removed -->
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/> <!-- removed -->
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/> <!-- removed -->
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/> <!-- removed -->
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="_newselect" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="vm86" number="166"/> <!-- removed -->
+  <syscall name="query_module" number="167"/> <!-- removed -->
+  <syscall name="poll" number="168"/>
+  <syscall name="nfsservctl" number="169"/>
+  <syscall name="setresgid" number="170"/>
+  <syscall name="getresgid" number="171"/>
+  <syscall name="prctl" number="172"/>
+  <syscall name="rt_sigreturn" number="173"/>
+  <syscall name="rt_sigaction" number="174"/>
+  <syscall name="rt_sigprocmask" number="175"/>
+  <syscall name="rt_sigpending" number="176"/>
+  <syscall name="rt_sigtimedwait" number="177"/>
+  <syscall name="rt_sigqueueinfo" number="178"/>
+  <syscall name="rt_sigsuspend" number="179"/>
+  <syscall name="pread64" number="180"/>
+  <syscall name="pwrite64" number="181"/>
+  <syscall name="chown" number="182"/>
+  <syscall name="getcwd" number="183"/>
+  <syscall name="capget" number="184"/>
+  <syscall name="capset" number="185"/>
+  <syscall name="sigaltstack" number="186"/>
+  <syscall name="sendfile" number="187"/>
+  <syscall name="vfork" number="190"/>
+  <syscall name="ugetrlimit" number="191"/>
+  <syscall name="mmap2" number="192"/>
+  <syscall name="truncate64" number="193"/>
+  <syscall name="ftruncate64" number="194"/>
+  <syscall name="stat64" number="195"/>
+  <syscall name="lstat64" number="196"/>
+  <syscall name="fstat64" number="197"/>
+  <syscall name="lchown32" number="198"/>
+  <syscall name="getuid32" number="199"/>
+  <syscall name="getgid32" number="200"/>
+  <syscall name="geteuid32" number="201"/>
+  <syscall name="getegid32" number="202"/>
+  <syscall name="setreuid32" number="203"/>
+  <syscall name="setregid32" number="204"/>
+  <syscall name="getgroups32" number="205"/>
+  <syscall name="setgroups32" number="206"/>
+  <syscall name="fchown32" number="207"/>
+  <syscall name="setresuid32" number="208"/>
+  <syscall name="getresuid32" number="209"/>
+  <syscall name="setresgid32" number="210"/>
+  <syscall name="getresgid32" number="211"/>
+  <syscall name="chown32" number="212"/>
+  <syscall name="setuid32" number="213"/>
+  <syscall name="setgid32" number="214"/>
+  <syscall name="setfsuid32" number="215"/>
+  <syscall name="setfsgid32" number="216"/>
+  <syscall name="getdents64" number="217"/>
+  <syscall name="pivot_root" number="218"/>
+  <syscall name="mincore" number="219"/>
+  <syscall name="madvise" number="220"/>
+  <syscall name="fcntl64" number="221"/>
+  <syscall name="gettid" number="224"/>
+  <syscall name="readahead" number="225"/>
+  <syscall name="setxattr" number="226"/>
+  <syscall name="lsetxattr" number="227"/>
+  <syscall name="fsetxattr" number="228"/>
+  <syscall name="getxattr" number="229"/>
+  <syscall name="lgetxattr" number="230"/>
+  <syscall name="fgetxattr" number="231"/>
+  <syscall name="listxattr" number="232"/>
+  <syscall name="llistxattr" number="233"/>
+  <syscall name="flistxattr" number="234"/>
+  <syscall name="removexattr" number="235"/>
+  <syscall name="lremovexattr" number="236"/>
+  <syscall name="fremovexattr" number="237"/>
+  <syscall name="tkill" number="238"/>
+  <syscall name="sendfile64" number="239"/>
+  <syscall name="futex" number="240"/>
+  <syscall name="sched_setaffinity" number="241"/>
+  <syscall name="sched_getaffinity" number="242"/>
+  <syscall name="io_setup" number="243"/>
+  <syscall name="io_destroy" number="244"/>
+  <syscall name="io_getevents" number="245"/>
+  <syscall name="io_submit" number="246"/>
+  <syscall name="io_cancel" number="247"/>
+  <syscall name="exit_group" number="248"/>
+  <syscall name="lookup_dcookie" number="249"/>
+  <syscall name="epoll_create" number="250"/>
+  <syscall name="epoll_ctl" number="251"/>
+  <syscall name="epoll_wait" number="252"/>
+  <syscall name="remap_file_pages" number="253"/>
+  <syscall name="set_tid_address" number="256"/>
+  <syscall name="timer_create" number="257"/>
+  <syscall name="timer_settime" number="258"/>
+  <syscall name="timer_gettime" number="259"/>
+  <syscall name="timer_getoverrun" number="260"/>
+  <syscall name="timer_delete" number="261"/>
+  <syscall name="clock_settime" number="262"/>
+  <syscall name="clock_gettime" number="263"/>
+  <syscall name="clock_getres" number="264"/>
+  <syscall name="clock_nanosleep" number="265"/>
+  <syscall name="statfs64" number="266"/>
+  <syscall name="fstatfs64" number="267"/>
+  <syscall name="tgkill" number="268"/>
+  <syscall name="utimes" number="269"/>
+  <syscall name="arm_fadvise64_64" number="270"/>
+  <syscall name="pciconfig_iobase" number="271"/>
+  <syscall name="pciconfig_read" number="272"/>
+  <syscall name="pciconfig_write" number="273"/>
+  <syscall name="mq_open" number="274"/>
+  <syscall name="mq_unlink" number="275"/>
+  <syscall name="mq_timedsend" number="276"/>
+  <syscall name="mq_timedreceive" number="277"/>
+  <syscall name="mq_notify" number="278"/>
+  <syscall name="mq_getsetattr" number="279"/>
+  <syscall name="waitid" number="280"/>
+  <syscall name="socket" number="281"/>
+  <syscall name="bind" number="282"/>
+  <syscall name="connect" number="283"/>
+  <syscall name="listen" number="284"/>
+  <syscall name="accept" number="285"/>
+  <syscall name="getsockname" number="286"/>
+  <syscall name="getpeername" number="287"/>
+  <syscall name="socketpair" number="288"/>
+  <syscall name="send" number="289"/>
+  <syscall name="sendto" number="290"/>
+  <syscall name="recv" number="291"/>
+  <syscall name="recvfrom" number="292"/>
+  <syscall name="shutdown" number="293"/>
+  <syscall name="setsockopt" number="294"/>
+  <syscall name="getsockopt" number="295"/>
+  <syscall name="sendmsg" number="296"/>
+  <syscall name="recvmsg" number="297"/>
+  <syscall name="semop" number="298"/>
+  <syscall name="semget" number="299"/>
+  <syscall name="semctl" number="300"/>
+  <syscall name="msgsnd" number="301"/>
+  <syscall name="msgrcv" number="302"/>
+  <syscall name="msgget" number="303"/>
+  <syscall name="msgctl" number="304"/>
+  <syscall name="shmat" number="305"/>
+  <syscall name="shmdt" number="306"/>
+  <syscall name="shmget" number="307"/>
+  <syscall name="shmctl" number="308"/>
+  <syscall name="add_key" number="309"/>
+  <syscall name="request_key" number="310"/>
+  <syscall name="keyctl" number="311"/>
+  <syscall name="semtimedop" number="312"/>
+  <syscall name="vserver" number="313"/>
+  <syscall name="ioprio_set" number="314"/>
+  <syscall name="ioprio_get" number="315"/>
+  <syscall name="inotify_init" number="316"/>
+  <syscall name="inotify_add_watch" number="317"/>
+  <syscall name="inotify_rm_watch" number="318"/>
+  <syscall name="mbind" number="319"/>
+  <syscall name="get_mempolicy" number="320"/>
+  <syscall name="set_mempolicy" number="321"/>
+  <syscall name="openat" number="322"/>
+  <syscall name="mkdirat" number="323"/>
+  <syscall name="mknodat" number="324"/>
+  <syscall name="fchownat" number="325"/>
+  <syscall name="futimesat" number="326"/>
+  <syscall name="fstatat64" number="327"/>
+  <syscall name="unlinkat" number="328"/>
+  <syscall name="renameat" number="329"/>
+  <syscall name="linkat" number="330"/>
+  <syscall name="symlinkat" number="331"/>
+  <syscall name="readlinkat" number="332"/>
+  <syscall name="fchmodat" number="333"/>
+  <syscall name="faccessat" number="334"/>
+  <syscall name="pselect6" number="335"/>
+  <syscall name="ppoll" number="336"/>
+  <syscall name="unshare" number="337"/>
+  <syscall name="set_robust_list" number="338"/>
+  <syscall name="get_robust_list" number="339"/>
+  <syscall name="splice" number="340"/>
+  <syscall name="arm_sync_file_range" number="341"/>
+  <syscall name="tee" number="342"/>
+  <syscall name="vmsplice" number="343"/>
+  <syscall name="move_pages" number="344"/>
+  <syscall name="getcpu" number="345"/>
+  <syscall name="epoll_pwait" number="346"/>
+  <syscall name="kexec_load" number="347"/>
+  <syscall name="utimensat" number="348"/>
+  <syscall name="signalfd" number="349"/>
+  <syscall name="timerfd_create" number="350"/>
+  <syscall name="eventfd" number="351"/>
+  <syscall name="fallocate" number="352"/>
+  <syscall name="timerfd_settime" number="353"/>
+  <syscall name="timerfd_gettime" number="354"/>
+  <syscall name="signalfd4" number="355"/>
+  <syscall name="eventfd2" number="356"/>
+  <syscall name="epoll_create1" number="357"/>
+  <syscall name="dup3" number="358"/>
+  <syscall name="pipe2" number="359"/>
+  <syscall name="inotify_init1" number="360"/>
+  <syscall name="preadv" number="361"/>
+  <syscall name="pwritev" number="362"/>
+  <syscall name="rt_tgsigqueueinfo" number="363"/>
+  <syscall name="perf_event_open" number="364"/>
+  <syscall name="recvmmsg" number="365"/>
+  <syscall name="accept4" number="366"/>
+  <syscall name="fanotify_init" number="367"/>
+  <syscall name="fanotify_mark" number="368"/>
+  <syscall name="prlimit64" number="369"/>
+  <syscall name="name_to_handle_at" number="370"/>
+  <syscall name="open_by_handle_at" number="371"/>
+  <syscall name="clock_adjtime" number="372"/>
+  <syscall name="syncfs" number="373"/>
+  <syscall name="sendmmsg" number="374"/>
+  <syscall name="setns" number="375"/>
+  <syscall name="process_vm_readv" number="376"/>
+  <syscall name="process_vm_writev" number="377"/>
+  <syscall name="kcmp" number="378"/>
+  <syscall name="finit_module" number="379"/>
+  <syscall name="ARM_breakpoint" number="983041"/>
+  <syscall name="ARM_cacheflush" number="983042"/>
+  <syscall name="ARM_usr26" number="983043"/>
+  <syscall name="ARM_usr32" number="983044"/>
+  <syscall name="ARM_set_tls" number="983045"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/bfin-linux.xml ./gdb/syscalls/bfin-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/bfin-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/bfin-linux.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1,326 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
-<!-- This file was generated using the following file:
-
-     gawk '$2 ~ /^__NR_/ { gsub(/__NR_/,""); print "  <syscall name=\"" $2 "\" number=\"" $3 "\"/>" }'
-     /usr/src/linux/arch/blackfin/include/asm/unistd.h
-
-     The file mentioned above belongs to the Linux Kernel.  -->
-
-<syscalls_info>
-  <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
-  <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="chown" number="16"/>
-  <syscall name="lseek" number="19"/>
-  <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="setuid" number="23"/>
-  <syscall name="getuid" number="24"/>
-  <syscall name="stime" number="25"/>
-  <syscall name="ptrace" number="26"/>
-  <syscall name="alarm" number="27"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="access" number="33"/>
-  <syscall name="nice" number="34"/>
-  <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
-  <syscall name="times" number="43"/>
-  <syscall name="brk" number="45"/>
-  <syscall name="setgid" number="46"/>
-  <syscall name="getgid" number="47"/>
-  <syscall name="geteuid" number="49"/>
-  <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
-  <syscall name="setpgid" number="57"/>
-  <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
-  <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
-  <syscall name="getppid" number="64"/>
-  <syscall name="getpgrp" number="65"/>
-  <syscall name="setsid" number="66"/>
-  <syscall name="sgetmask" number="68"/>
-  <syscall name="ssetmask" number="69"/>
-  <syscall name="setreuid" number="70"/>
-  <syscall name="setregid" number="71"/>
-  <syscall name="sethostname" number="74"/>
-  <syscall name="setrlimit" number="75"/>
-  <syscall name="getrusage" number="77"/>
-  <syscall name="gettimeofday" number="78"/>
-  <syscall name="settimeofday" number="79"/>
-  <syscall name="getgroups" number="80"/>
-  <syscall name="setgroups" number="81"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="reboot" number="88"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
-  <syscall name="getpriority" number="96"/>
-  <syscall name="setpriority" number="97"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
-  <syscall name="syslog" number="103"/>
-  <syscall name="setitimer" number="104"/>
-  <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
-  <syscall name="vhangup" number="111"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="sysinfo" number="116"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="clone" number="120"/>
-  <syscall name="setdomainname" number="121"/>
-  <syscall name="uname" number="122"/>
-  <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="init_module" number="128"/>
-  <syscall name="delete_module" number="129"/>
-  <syscall name="quotactl" number="131"/>
-  <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
-  <syscall name="bdflush" number="134"/>
-  <syscall name="personality" number="136"/>
-  <syscall name="setfsuid" number="138"/>
-  <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
-  <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
-  <syscall name="_sysctl" number="149"/>
-  <syscall name="sched_setparam" number="154"/>
-  <syscall name="sched_getparam" number="155"/>
-  <syscall name="sched_setscheduler" number="156"/>
-  <syscall name="sched_getscheduler" number="157"/>
-  <syscall name="sched_yield" number="158"/>
-  <syscall name="sched_get_priority_max" number="159"/>
-  <syscall name="sched_get_priority_min" number="160"/>
-  <syscall name="sched_rr_get_interval" number="161"/>
-  <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
-  <syscall name="setresuid" number="164"/>
-  <syscall name="getresuid" number="165"/>
-  <syscall name="nfsservctl" number="169"/>
-  <syscall name="setresgid" number="170"/>
-  <syscall name="getresgid" number="171"/>
-  <syscall name="prctl" number="172"/>
-  <syscall name="rt_sigreturn" number="173"/>
-  <syscall name="rt_sigaction" number="174"/>
-  <syscall name="rt_sigprocmask" number="175"/>
-  <syscall name="rt_sigpending" number="176"/>
-  <syscall name="rt_sigtimedwait" number="177"/>
-  <syscall name="rt_sigqueueinfo" number="178"/>
-  <syscall name="rt_sigsuspend" number="179"/>
-  <syscall name="pread" number="180"/>
-  <syscall name="pwrite" number="181"/>
-  <syscall name="lchown" number="182"/>
-  <syscall name="getcwd" number="183"/>
-  <syscall name="capget" number="184"/>
-  <syscall name="capset" number="185"/>
-  <syscall name="sigaltstack" number="186"/>
-  <syscall name="sendfile" number="187"/>
-  <syscall name="vfork" number="190"/>
-  <syscall name="getrlimit" number="191"/>
-  <syscall name="mmap2" number="192"/>
-  <syscall name="truncate64" number="193"/>
-  <syscall name="ftruncate64" number="194"/>
-  <syscall name="stat64" number="195"/>
-  <syscall name="lstat64" number="196"/>
-  <syscall name="fstat64" number="197"/>
-  <syscall name="chown32" number="198"/>
-  <syscall name="getuid32" number="199"/>
-  <syscall name="getgid32" number="200"/>
-  <syscall name="geteuid32" number="201"/>
-  <syscall name="getegid32" number="202"/>
-  <syscall name="setreuid32" number="203"/>
-  <syscall name="setregid32" number="204"/>
-  <syscall name="getgroups32" number="205"/>
-  <syscall name="setgroups32" number="206"/>
-  <syscall name="fchown32" number="207"/>
-  <syscall name="setresuid32" number="208"/>
-  <syscall name="getresuid32" number="209"/>
-  <syscall name="setresgid32" number="210"/>
-  <syscall name="getresgid32" number="211"/>
-  <syscall name="lchown32" number="212"/>
-  <syscall name="setuid32" number="213"/>
-  <syscall name="setgid32" number="214"/>
-  <syscall name="setfsuid32" number="215"/>
-  <syscall name="setfsgid32" number="216"/>
-  <syscall name="pivot_root" number="217"/>
-  <syscall name="getdents64" number="220"/>
-  <syscall name="fcntl64" number="221"/>
-  <syscall name="gettid" number="224"/>
-  <syscall name="readahead" number="225"/>
-  <syscall name="setxattr" number="226"/>
-  <syscall name="lsetxattr" number="227"/>
-  <syscall name="fsetxattr" number="228"/>
-  <syscall name="getxattr" number="229"/>
-  <syscall name="lgetxattr" number="230"/>
-  <syscall name="fgetxattr" number="231"/>
-  <syscall name="listxattr" number="232"/>
-  <syscall name="llistxattr" number="233"/>
-  <syscall name="flistxattr" number="234"/>
-  <syscall name="removexattr" number="235"/>
-  <syscall name="lremovexattr" number="236"/>
-  <syscall name="fremovexattr" number="237"/>
-  <syscall name="tkill" number="238"/>
-  <syscall name="sendfile64" number="239"/>
-  <syscall name="futex" number="240"/>
-  <syscall name="sched_setaffinity" number="241"/>
-  <syscall name="sched_getaffinity" number="242"/>
-  <syscall name="io_setup" number="245"/>
-  <syscall name="io_destroy" number="246"/>
-  <syscall name="io_getevents" number="247"/>
-  <syscall name="io_submit" number="248"/>
-  <syscall name="io_cancel" number="249"/>
-  <syscall name="exit_group" number="252"/>
-  <syscall name="lookup_dcookie" number="253"/>
-  <syscall name="bfin_spinlock" number="254"/>
-  <syscall name="epoll_create" number="255"/>
-  <syscall name="epoll_ctl" number="256"/>
-  <syscall name="epoll_wait" number="257"/>
-  <syscall name="set_tid_address" number="259"/>
-  <syscall name="timer_create" number="260"/>
-  <syscall name="timer_settime" number="261"/>
-  <syscall name="timer_gettime" number="262"/>
-  <syscall name="timer_getoverrun" number="263"/>
-  <syscall name="timer_delete" number="264"/>
-  <syscall name="clock_settime" number="265"/>
-  <syscall name="clock_gettime" number="266"/>
-  <syscall name="clock_getres" number="267"/>
-  <syscall name="clock_nanosleep" number="268"/>
-  <syscall name="statfs64" number="269"/>
-  <syscall name="fstatfs64" number="270"/>
-  <syscall name="tgkill" number="271"/>
-  <syscall name="utimes" number="272"/>
-  <syscall name="fadvise64_64" number="273"/>
-  <syscall name="mq_open" number="278"/>
-  <syscall name="mq_unlink" number="279"/>
-  <syscall name="mq_timedsend" number="280"/>
-  <syscall name="mq_timedreceive" number="281"/>
-  <syscall name="mq_notify" number="282"/>
-  <syscall name="mq_getsetattr" number="283"/>
-  <syscall name="kexec_load" number="284"/>
-  <syscall name="waitid" number="285"/>
-  <syscall name="add_key" number="286"/>
-  <syscall name="request_key" number="287"/>
-  <syscall name="keyctl" number="288"/>
-  <syscall name="ioprio_set" number="289"/>
-  <syscall name="ioprio_get" number="290"/>
-  <syscall name="inotify_init" number="291"/>
-  <syscall name="inotify_add_watch" number="292"/>
-  <syscall name="inotify_rm_watch" number="293"/>
-  <syscall name="openat" number="295"/>
-  <syscall name="mkdirat" number="296"/>
-  <syscall name="mknodat" number="297"/>
-  <syscall name="fchownat" number="298"/>
-  <syscall name="futimesat" number="299"/>
-  <syscall name="fstatat64" number="300"/>
-  <syscall name="unlinkat" number="301"/>
-  <syscall name="renameat" number="302"/>
-  <syscall name="linkat" number="303"/>
-  <syscall name="symlinkat" number="304"/>
-  <syscall name="readlinkat" number="305"/>
-  <syscall name="fchmodat" number="306"/>
-  <syscall name="faccessat" number="307"/>
-  <syscall name="pselect6" number="308"/>
-  <syscall name="ppoll" number="309"/>
-  <syscall name="unshare" number="310"/>
-  <syscall name="sram_alloc" number="311"/>
-  <syscall name="sram_free" number="312"/>
-  <syscall name="dma_memcpy" number="313"/>
-  <syscall name="accept" number="314"/>
-  <syscall name="bind" number="315"/>
-  <syscall name="connect" number="316"/>
-  <syscall name="getpeername" number="317"/>
-  <syscall name="getsockname" number="318"/>
-  <syscall name="getsockopt" number="319"/>
-  <syscall name="listen" number="320"/>
-  <syscall name="recv" number="321"/>
-  <syscall name="recvfrom" number="322"/>
-  <syscall name="recvmsg" number="323"/>
-  <syscall name="send" number="324"/>
-  <syscall name="sendmsg" number="325"/>
-  <syscall name="sendto" number="326"/>
-  <syscall name="setsockopt" number="327"/>
-  <syscall name="shutdown" number="328"/>
-  <syscall name="socket" number="329"/>
-  <syscall name="socketpair" number="330"/>
-  <syscall name="semctl" number="331"/>
-  <syscall name="semget" number="332"/>
-  <syscall name="semop" number="333"/>
-  <syscall name="msgctl" number="334"/>
-  <syscall name="msgget" number="335"/>
-  <syscall name="msgrcv" number="336"/>
-  <syscall name="msgsnd" number="337"/>
-  <syscall name="shmat" number="338"/>
-  <syscall name="shmctl" number="339"/>
-  <syscall name="shmdt" number="340"/>
-  <syscall name="shmget" number="341"/>
-  <syscall name="splice" number="342"/>
-  <syscall name="sync_file_range" number="343"/>
-  <syscall name="tee" number="344"/>
-  <syscall name="vmsplice" number="345"/>
-  <syscall name="epoll_pwait" number="346"/>
-  <syscall name="utimensat" number="347"/>
-  <syscall name="signalfd" number="348"/>
-  <syscall name="timerfd_create" number="349"/>
-  <syscall name="eventfd" number="350"/>
-  <syscall name="pread64" number="351"/>
-  <syscall name="pwrite64" number="352"/>
-  <syscall name="fadvise64" number="353"/>
-  <syscall name="set_robust_list" number="354"/>
-  <syscall name="get_robust_list" number="355"/>
-  <syscall name="fallocate" number="356"/>
-  <syscall name="semtimedop" number="357"/>
-  <syscall name="timerfd_settime" number="358"/>
-  <syscall name="timerfd_gettime" number="359"/>
-  <syscall name="signalfd4" number="360"/>
-  <syscall name="eventfd2" number="361"/>
-  <syscall name="epoll_create1" number="362"/>
-  <syscall name="dup3" number="363"/>
-  <syscall name="pipe2" number="364"/>
-  <syscall name="inotify_init1" number="365"/>
-  <syscall name="preadv" number="366"/>
-  <syscall name="pwritev" number="367"/>
-  <syscall name="rt_tgsigqueueinfo" number="368"/>
-  <syscall name="perf_event_open" number="369"/>
-  <syscall name="recvmmsg" number="370"/>
-  <syscall name="fanotify_init" number="371"/>
-  <syscall name="fanotify_mark" number="372"/>
-  <syscall name="prlimit64" number="373"/>
-</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/bfin-linux.xml.in ./gdb/syscalls/bfin-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/bfin-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/bfin-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,326 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+     gawk '$2 ~ /^__NR_/ { gsub(/__NR_/,""); print "  <syscall name=\"" $2 "\" number=\"" $3 "\"/>" }'
+     /usr/src/linux/arch/blackfin/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="chown" number="16"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sgetmask" number="68"/>
+  <syscall name="ssetmask" number="69"/>
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="nfsservctl" number="169"/>
+  <syscall name="setresgid" number="170"/>
+  <syscall name="getresgid" number="171"/>
+  <syscall name="prctl" number="172"/>
+  <syscall name="rt_sigreturn" number="173"/>
+  <syscall name="rt_sigaction" number="174"/>
+  <syscall name="rt_sigprocmask" number="175"/>
+  <syscall name="rt_sigpending" number="176"/>
+  <syscall name="rt_sigtimedwait" number="177"/>
+  <syscall name="rt_sigqueueinfo" number="178"/>
+  <syscall name="rt_sigsuspend" number="179"/>
+  <syscall name="pread" number="180"/>
+  <syscall name="pwrite" number="181"/>
+  <syscall name="lchown" number="182"/>
+  <syscall name="getcwd" number="183"/>
+  <syscall name="capget" number="184"/>
+  <syscall name="capset" number="185"/>
+  <syscall name="sigaltstack" number="186"/>
+  <syscall name="sendfile" number="187"/>
+  <syscall name="vfork" number="190"/>
+  <syscall name="getrlimit" number="191"/>
+  <syscall name="mmap2" number="192"/>
+  <syscall name="truncate64" number="193"/>
+  <syscall name="ftruncate64" number="194"/>
+  <syscall name="stat64" number="195"/>
+  <syscall name="lstat64" number="196"/>
+  <syscall name="fstat64" number="197"/>
+  <syscall name="chown32" number="198"/>
+  <syscall name="getuid32" number="199"/>
+  <syscall name="getgid32" number="200"/>
+  <syscall name="geteuid32" number="201"/>
+  <syscall name="getegid32" number="202"/>
+  <syscall name="setreuid32" number="203"/>
+  <syscall name="setregid32" number="204"/>
+  <syscall name="getgroups32" number="205"/>
+  <syscall name="setgroups32" number="206"/>
+  <syscall name="fchown32" number="207"/>
+  <syscall name="setresuid32" number="208"/>
+  <syscall name="getresuid32" number="209"/>
+  <syscall name="setresgid32" number="210"/>
+  <syscall name="getresgid32" number="211"/>
+  <syscall name="lchown32" number="212"/>
+  <syscall name="setuid32" number="213"/>
+  <syscall name="setgid32" number="214"/>
+  <syscall name="setfsuid32" number="215"/>
+  <syscall name="setfsgid32" number="216"/>
+  <syscall name="pivot_root" number="217"/>
+  <syscall name="getdents64" number="220"/>
+  <syscall name="fcntl64" number="221"/>
+  <syscall name="gettid" number="224"/>
+  <syscall name="readahead" number="225"/>
+  <syscall name="setxattr" number="226"/>
+  <syscall name="lsetxattr" number="227"/>
+  <syscall name="fsetxattr" number="228"/>
+  <syscall name="getxattr" number="229"/>
+  <syscall name="lgetxattr" number="230"/>
+  <syscall name="fgetxattr" number="231"/>
+  <syscall name="listxattr" number="232"/>
+  <syscall name="llistxattr" number="233"/>
+  <syscall name="flistxattr" number="234"/>
+  <syscall name="removexattr" number="235"/>
+  <syscall name="lremovexattr" number="236"/>
+  <syscall name="fremovexattr" number="237"/>
+  <syscall name="tkill" number="238"/>
+  <syscall name="sendfile64" number="239"/>
+  <syscall name="futex" number="240"/>
+  <syscall name="sched_setaffinity" number="241"/>
+  <syscall name="sched_getaffinity" number="242"/>
+  <syscall name="io_setup" number="245"/>
+  <syscall name="io_destroy" number="246"/>
+  <syscall name="io_getevents" number="247"/>
+  <syscall name="io_submit" number="248"/>
+  <syscall name="io_cancel" number="249"/>
+  <syscall name="exit_group" number="252"/>
+  <syscall name="lookup_dcookie" number="253"/>
+  <syscall name="bfin_spinlock" number="254"/>
+  <syscall name="epoll_create" number="255"/>
+  <syscall name="epoll_ctl" number="256"/>
+  <syscall name="epoll_wait" number="257"/>
+  <syscall name="set_tid_address" number="259"/>
+  <syscall name="timer_create" number="260"/>
+  <syscall name="timer_settime" number="261"/>
+  <syscall name="timer_gettime" number="262"/>
+  <syscall name="timer_getoverrun" number="263"/>
+  <syscall name="timer_delete" number="264"/>
+  <syscall name="clock_settime" number="265"/>
+  <syscall name="clock_gettime" number="266"/>
+  <syscall name="clock_getres" number="267"/>
+  <syscall name="clock_nanosleep" number="268"/>
+  <syscall name="statfs64" number="269"/>
+  <syscall name="fstatfs64" number="270"/>
+  <syscall name="tgkill" number="271"/>
+  <syscall name="utimes" number="272"/>
+  <syscall name="fadvise64_64" number="273"/>
+  <syscall name="mq_open" number="278"/>
+  <syscall name="mq_unlink" number="279"/>
+  <syscall name="mq_timedsend" number="280"/>
+  <syscall name="mq_timedreceive" number="281"/>
+  <syscall name="mq_notify" number="282"/>
+  <syscall name="mq_getsetattr" number="283"/>
+  <syscall name="kexec_load" number="284"/>
+  <syscall name="waitid" number="285"/>
+  <syscall name="add_key" number="286"/>
+  <syscall name="request_key" number="287"/>
+  <syscall name="keyctl" number="288"/>
+  <syscall name="ioprio_set" number="289"/>
+  <syscall name="ioprio_get" number="290"/>
+  <syscall name="inotify_init" number="291"/>
+  <syscall name="inotify_add_watch" number="292"/>
+  <syscall name="inotify_rm_watch" number="293"/>
+  <syscall name="openat" number="295"/>
+  <syscall name="mkdirat" number="296"/>
+  <syscall name="mknodat" number="297"/>
+  <syscall name="fchownat" number="298"/>
+  <syscall name="futimesat" number="299"/>
+  <syscall name="fstatat64" number="300"/>
+  <syscall name="unlinkat" number="301"/>
+  <syscall name="renameat" number="302"/>
+  <syscall name="linkat" number="303"/>
+  <syscall name="symlinkat" number="304"/>
+  <syscall name="readlinkat" number="305"/>
+  <syscall name="fchmodat" number="306"/>
+  <syscall name="faccessat" number="307"/>
+  <syscall name="pselect6" number="308"/>
+  <syscall name="ppoll" number="309"/>
+  <syscall name="unshare" number="310"/>
+  <syscall name="sram_alloc" number="311"/>
+  <syscall name="sram_free" number="312"/>
+  <syscall name="dma_memcpy" number="313"/>
+  <syscall name="accept" number="314"/>
+  <syscall name="bind" number="315"/>
+  <syscall name="connect" number="316"/>
+  <syscall name="getpeername" number="317"/>
+  <syscall name="getsockname" number="318"/>
+  <syscall name="getsockopt" number="319"/>
+  <syscall name="listen" number="320"/>
+  <syscall name="recv" number="321"/>
+  <syscall name="recvfrom" number="322"/>
+  <syscall name="recvmsg" number="323"/>
+  <syscall name="send" number="324"/>
+  <syscall name="sendmsg" number="325"/>
+  <syscall name="sendto" number="326"/>
+  <syscall name="setsockopt" number="327"/>
+  <syscall name="shutdown" number="328"/>
+  <syscall name="socket" number="329"/>
+  <syscall name="socketpair" number="330"/>
+  <syscall name="semctl" number="331"/>
+  <syscall name="semget" number="332"/>
+  <syscall name="semop" number="333"/>
+  <syscall name="msgctl" number="334"/>
+  <syscall name="msgget" number="335"/>
+  <syscall name="msgrcv" number="336"/>
+  <syscall name="msgsnd" number="337"/>
+  <syscall name="shmat" number="338"/>
+  <syscall name="shmctl" number="339"/>
+  <syscall name="shmdt" number="340"/>
+  <syscall name="shmget" number="341"/>
+  <syscall name="splice" number="342"/>
+  <syscall name="sync_file_range" number="343"/>
+  <syscall name="tee" number="344"/>
+  <syscall name="vmsplice" number="345"/>
+  <syscall name="epoll_pwait" number="346"/>
+  <syscall name="utimensat" number="347"/>
+  <syscall name="signalfd" number="348"/>
+  <syscall name="timerfd_create" number="349"/>
+  <syscall name="eventfd" number="350"/>
+  <syscall name="pread64" number="351"/>
+  <syscall name="pwrite64" number="352"/>
+  <syscall name="fadvise64" number="353"/>
+  <syscall name="set_robust_list" number="354"/>
+  <syscall name="get_robust_list" number="355"/>
+  <syscall name="fallocate" number="356"/>
+  <syscall name="semtimedop" number="357"/>
+  <syscall name="timerfd_settime" number="358"/>
+  <syscall name="timerfd_gettime" number="359"/>
+  <syscall name="signalfd4" number="360"/>
+  <syscall name="eventfd2" number="361"/>
+  <syscall name="epoll_create1" number="362"/>
+  <syscall name="dup3" number="363"/>
+  <syscall name="pipe2" number="364"/>
+  <syscall name="inotify_init1" number="365"/>
+  <syscall name="preadv" number="366"/>
+  <syscall name="pwritev" number="367"/>
+  <syscall name="rt_tgsigqueueinfo" number="368"/>
+  <syscall name="perf_event_open" number="369"/>
+  <syscall name="recvmmsg" number="370"/>
+  <syscall name="fanotify_init" number="371"/>
+  <syscall name="fanotify_mark" number="372"/>
+  <syscall name="prlimit64" number="373"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/freebsd.xml ./gdb/syscalls/freebsd.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/freebsd.xml	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/freebsd.xml	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,410 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+     /usr/src/sys/sys/syscall.h
+
+     The file mentioned above belongs to the FreeBSD Kernel.  -->
+
+<syscalls_info>
+  <syscall name="syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="wait4" number="7"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="fchdir" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="chown" number="16"/>
+  <syscall name="break" number="17"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="unmount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="geteuid" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="recvmsg" number="27"/>
+  <syscall name="sendmsg" number="28"/>
+  <syscall name="recvfrom" number="29"/>
+  <syscall name="accept" number="30"/>
+  <syscall name="getpeername" number="31"/>
+  <syscall name="getsockname" number="32"/>
+  <syscall name="access" number="33"/>
+  <syscall name="chflags" number="34"/>
+  <syscall name="fchflags" number="35"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="getppid" number="39"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="getegid" number="43"/>
+  <syscall name="profil" number="44"/>
+  <syscall name="ktrace" number="45"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="getlogin" number="49"/>
+  <syscall name="setlogin" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="sigaltstack" number="53"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="reboot" number="55"/>
+  <syscall name="revoke" number="56"/>
+  <syscall name="symlink" number="57"/>
+  <syscall name="readlink" number="58"/>
+  <syscall name="execve" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="msync" number="65"/>
+  <syscall name="vfork" number="66"/>
+  <syscall name="sbrk" number="69"/>
+  <syscall name="sstk" number="70"/>
+  <syscall name="vadvise" number="72"/>
+  <syscall name="munmap" number="73"/>
+  <syscall name="mprotect" number="74"/>
+  <syscall name="madvise" number="75"/>
+  <syscall name="mincore" number="78"/>
+  <syscall name="getgroups" number="79"/>
+  <syscall name="setgroups" number="80"/>
+  <syscall name="getpgrp" number="81"/>
+  <syscall name="setpgid" number="82"/>
+  <syscall name="setitimer" number="83"/>
+  <syscall name="swapon" number="85"/>
+  <syscall name="getitimer" number="86"/>
+  <syscall name="getdtablesize" number="89"/>
+  <syscall name="dup2" number="90"/>
+  <syscall name="fcntl" number="92"/>
+  <syscall name="select" number="93"/>
+  <syscall name="fsync" number="95"/>
+  <syscall name="setpriority" number="96"/>
+  <syscall name="socket" number="97"/>
+  <syscall name="connect" number="98"/>
+  <syscall name="getpriority" number="100"/>
+  <syscall name="bind" number="104"/>
+  <syscall name="setsockopt" number="105"/>
+  <syscall name="listen" number="106"/>
+  <syscall name="gettimeofday" number="116"/>
+  <syscall name="getrusage" number="117"/>
+  <syscall name="getsockopt" number="118"/>
+  <syscall name="readv" number="120"/>
+  <syscall name="writev" number="121"/>
+  <syscall name="settimeofday" number="122"/>
+  <syscall name="fchown" number="123"/>
+  <syscall name="fchmod" number="124"/>
+  <syscall name="setreuid" number="126"/>
+  <syscall name="setregid" number="127"/>
+  <syscall name="rename" number="128"/>
+  <syscall name="flock" number="131"/>
+  <syscall name="mkfifo" number="132"/>
+  <syscall name="sendto" number="133"/>
+  <syscall name="shutdown" number="134"/>
+  <syscall name="socketpair" number="135"/>
+  <syscall name="mkdir" number="136"/>
+  <syscall name="rmdir" number="137"/>
+  <syscall name="utimes" number="138"/>
+  <syscall name="adjtime" number="140"/>
+  <syscall name="setsid" number="147"/>
+  <syscall name="quotactl" number="148"/>
+  <syscall name="nlm_syscall" number="154"/>
+  <syscall name="nfssvc" number="155"/>
+  <syscall name="lgetfh" number="160"/>
+  <syscall name="getfh" number="161"/>
+  <syscall name="sysarch" number="165"/>
+  <syscall name="rtprio" number="166"/>
+  <syscall name="semsys" number="169"/>
+  <syscall name="msgsys" number="170"/>
+  <syscall name="shmsys" number="171"/>
+  <syscall name="setfib" number="175"/>
+  <syscall name="ntp_adjtime" number="176"/>
+  <syscall name="setgid" number="181"/>
+  <syscall name="setegid" number="182"/>
+  <syscall name="seteuid" number="183"/>
+  <syscall name="stat" number="188"/>
+  <syscall name="fstat" number="189"/>
+  <syscall name="lstat" number="190"/>
+  <syscall name="pathconf" number="191"/>
+  <syscall name="fpathconf" number="192"/>
+  <syscall name="getrlimit" number="194"/>
+  <syscall name="setrlimit" number="195"/>
+  <syscall name="getdirentries" number="196"/>
+  <syscall name="__syscall" number="198"/>
+  <syscall name="__sysctl" number="202"/>
+  <syscall name="mlock" number="203"/>
+  <syscall name="munlock" number="204"/>
+  <syscall name="undelete" number="205"/>
+  <syscall name="futimes" number="206"/>
+  <syscall name="getpgid" number="207"/>
+  <syscall name="poll" number="209"/>
+  <syscall name="freebsd7___semctl" number="220"/>
+  <syscall name="semget" number="221"/>
+  <syscall name="semop" number="222"/>
+  <syscall name="freebsd7_msgctl" number="224"/>
+  <syscall name="msgget" number="225"/>
+  <syscall name="msgsnd" number="226"/>
+  <syscall name="msgrcv" number="227"/>
+  <syscall name="shmat" number="228"/>
+  <syscall name="freebsd7_shmctl" number="229"/>
+  <syscall name="shmdt" number="230"/>
+  <syscall name="shmget" number="231"/>
+  <syscall name="clock_gettime" number="232"/>
+  <syscall name="clock_settime" number="233"/>
+  <syscall name="clock_getres" number="234"/>
+  <syscall name="ktimer_create" number="235"/>
+  <syscall name="ktimer_delete" number="236"/>
+  <syscall name="ktimer_settime" number="237"/>
+  <syscall name="ktimer_gettime" number="238"/>
+  <syscall name="ktimer_getoverrun" number="239"/>
+  <syscall name="nanosleep" number="240"/>
+  <syscall name="ffclock_getcounter" number="241"/>
+  <syscall name="ffclock_setestimate" number="242"/>
+  <syscall name="ffclock_getestimate" number="243"/>
+  <syscall name="clock_getcpuclockid2" number="247"/>
+  <syscall name="ntp_gettime" number="248"/>
+  <syscall name="minherit" number="250"/>
+  <syscall name="rfork" number="251"/>
+  <syscall name="openbsd_poll" number="252"/>
+  <syscall name="issetugid" number="253"/>
+  <syscall name="lchown" number="254"/>
+  <syscall name="aio_read" number="255"/>
+  <syscall name="aio_write" number="256"/>
+  <syscall name="lio_listio" number="257"/>
+  <syscall name="getdents" number="272"/>
+  <syscall name="lchmod" number="274"/>
+  <syscall name="netbsd_lchown" number="275"/>
+  <syscall name="lutimes" number="276"/>
+  <syscall name="netbsd_msync" number="277"/>
+  <syscall name="nstat" number="278"/>
+  <syscall name="nfstat" number="279"/>
+  <syscall name="nlstat" number="280"/>
+  <syscall name="preadv" number="289"/>
+  <syscall name="pwritev" number="290"/>
+  <syscall name="fhopen" number="298"/>
+  <syscall name="fhstat" number="299"/>
+  <syscall name="modnext" number="300"/>
+  <syscall name="modstat" number="301"/>
+  <syscall name="modfnext" number="302"/>
+  <syscall name="modfind" number="303"/>
+  <syscall name="kldload" number="304"/>
+  <syscall name="kldunload" number="305"/>
+  <syscall name="kldfind" number="306"/>
+  <syscall name="kldnext" number="307"/>
+  <syscall name="kldstat" number="308"/>
+  <syscall name="kldfirstmod" number="309"/>
+  <syscall name="getsid" number="310"/>
+  <syscall name="setresuid" number="311"/>
+  <syscall name="setresgid" number="312"/>
+  <syscall name="aio_return" number="314"/>
+  <syscall name="aio_suspend" number="315"/>
+  <syscall name="aio_cancel" number="316"/>
+  <syscall name="aio_error" number="317"/>
+  <syscall name="yield" number="321"/>
+  <syscall name="mlockall" number="324"/>
+  <syscall name="munlockall" number="325"/>
+  <syscall name="__getcwd" number="326"/>
+  <syscall name="sched_setparam" number="327"/>
+  <syscall name="sched_getparam" number="328"/>
+  <syscall name="sched_setscheduler" number="329"/>
+  <syscall name="sched_getscheduler" number="330"/>
+  <syscall name="sched_yield" number="331"/>
+  <syscall name="sched_get_priority_max" number="332"/>
+  <syscall name="sched_get_priority_min" number="333"/>
+  <syscall name="sched_rr_get_interval" number="334"/>
+  <syscall name="utrace" number="335"/>
+  <syscall name="kldsym" number="337"/>
+  <syscall name="jail" number="338"/>
+  <syscall name="nnpfs_syscall" number="339"/>
+  <syscall name="sigprocmask" number="340"/>
+  <syscall name="sigsuspend" number="341"/>
+  <syscall name="sigpending" number="343"/>
+  <syscall name="sigtimedwait" number="345"/>
+  <syscall name="sigwaitinfo" number="346"/>
+  <syscall name="__acl_get_file" number="347"/>
+  <syscall name="__acl_set_file" number="348"/>
+  <syscall name="__acl_get_fd" number="349"/>
+  <syscall name="__acl_set_fd" number="350"/>
+  <syscall name="__acl_delete_file" number="351"/>
+  <syscall name="__acl_delete_fd" number="352"/>
+  <syscall name="__acl_aclcheck_file" number="353"/>
+  <syscall name="__acl_aclcheck_fd" number="354"/>
+  <syscall name="extattrctl" number="355"/>
+  <syscall name="extattr_set_file" number="356"/>
+  <syscall name="extattr_get_file" number="357"/>
+  <syscall name="extattr_delete_file" number="358"/>
+  <syscall name="aio_waitcomplete" number="359"/>
+  <syscall name="getresuid" number="360"/>
+  <syscall name="getresgid" number="361"/>
+  <syscall name="kqueue" number="362"/>
+  <syscall name="kevent" number="363"/>
+  <syscall name="extattr_set_fd" number="371"/>
+  <syscall name="extattr_get_fd" number="372"/>
+  <syscall name="extattr_delete_fd" number="373"/>
+  <syscall name="__setugid" number="374"/>
+  <syscall name="eaccess" number="376"/>
+  <syscall name="afs3_syscall" number="377"/>
+  <syscall name="nmount" number="378"/>
+  <syscall name="__mac_get_proc" number="384"/>
+  <syscall name="__mac_set_proc" number="385"/>
+  <syscall name="__mac_get_fd" number="386"/>
+  <syscall name="__mac_get_file" number="387"/>
+  <syscall name="__mac_set_fd" number="388"/>
+  <syscall name="__mac_set_file" number="389"/>
+  <syscall name="kenv" number="390"/>
+  <syscall name="lchflags" number="391"/>
+  <syscall name="uuidgen" number="392"/>
+  <syscall name="sendfile" number="393"/>
+  <syscall name="mac_syscall" number="394"/>
+  <syscall name="getfsstat" number="395"/>
+  <syscall name="statfs" number="396"/>
+  <syscall name="fstatfs" number="397"/>
+  <syscall name="fhstatfs" number="398"/>
+  <syscall name="ksem_close" number="400"/>
+  <syscall name="ksem_post" number="401"/>
+  <syscall name="ksem_wait" number="402"/>
+  <syscall name="ksem_trywait" number="403"/>
+  <syscall name="ksem_init" number="404"/>
+  <syscall name="ksem_open" number="405"/>
+  <syscall name="ksem_unlink" number="406"/>
+  <syscall name="ksem_getvalue" number="407"/>
+  <syscall name="ksem_destroy" number="408"/>
+  <syscall name="__mac_get_pid" number="409"/>
+  <syscall name="__mac_get_link" number="410"/>
+  <syscall name="__mac_set_link" number="411"/>
+  <syscall name="extattr_set_link" number="412"/>
+  <syscall name="extattr_get_link" number="413"/>
+  <syscall name="extattr_delete_link" number="414"/>
+  <syscall name="__mac_execve" number="415"/>
+  <syscall name="sigaction" number="416"/>
+  <syscall name="sigreturn" number="417"/>
+  <syscall name="getcontext" number="421"/>
+  <syscall name="setcontext" number="422"/>
+  <syscall name="swapcontext" number="423"/>
+  <syscall name="swapoff" number="424"/>
+  <syscall name="__acl_get_link" number="425"/>
+  <syscall name="__acl_set_link" number="426"/>
+  <syscall name="__acl_delete_link" number="427"/>
+  <syscall name="__acl_aclcheck_link" number="428"/>
+  <syscall name="sigwait" number="429"/>
+  <syscall name="thr_create" number="430"/>
+  <syscall name="thr_exit" number="431"/>
+  <syscall name="thr_self" number="432"/>
+  <syscall name="thr_kill" number="433"/>
+  <syscall name="jail_attach" number="436"/>
+  <syscall name="extattr_list_fd" number="437"/>
+  <syscall name="extattr_list_file" number="438"/>
+  <syscall name="extattr_list_link" number="439"/>
+  <syscall name="ksem_timedwait" number="441"/>
+  <syscall name="thr_suspend" number="442"/>
+  <syscall name="thr_wake" number="443"/>
+  <syscall name="kldunloadf" number="444"/>
+  <syscall name="audit" number="445"/>
+  <syscall name="auditon" number="446"/>
+  <syscall name="getauid" number="447"/>
+  <syscall name="setauid" number="448"/>
+  <syscall name="getaudit" number="449"/>
+  <syscall name="setaudit" number="450"/>
+  <syscall name="getaudit_addr" number="451"/>
+  <syscall name="setaudit_addr" number="452"/>
+  <syscall name="auditctl" number="453"/>
+  <syscall name="_umtx_op" number="454"/>
+  <syscall name="thr_new" number="455"/>
+  <syscall name="sigqueue" number="456"/>
+  <syscall name="kmq_open" number="457"/>
+  <syscall name="kmq_setattr" number="458"/>
+  <syscall name="kmq_timedreceive" number="459"/>
+  <syscall name="kmq_timedsend" number="460"/>
+  <syscall name="kmq_notify" number="461"/>
+  <syscall name="kmq_unlink" number="462"/>
+  <syscall name="abort2" number="463"/>
+  <syscall name="thr_set_name" number="464"/>
+  <syscall name="aio_fsync" number="465"/>
+  <syscall name="rtprio_thread" number="466"/>
+  <syscall name="sctp_peeloff" number="471"/>
+  <syscall name="sctp_generic_sendmsg" number="472"/>
+  <syscall name="sctp_generic_sendmsg_iov" number="473"/>
+  <syscall name="sctp_generic_recvmsg" number="474"/>
+  <syscall name="pread" number="475"/>
+  <syscall name="pwrite" number="476"/>
+  <syscall name="mmap" number="477"/>
+  <syscall name="lseek" number="478"/>
+  <syscall name="truncate" number="479"/>
+  <syscall name="ftruncate" number="480"/>
+  <syscall name="thr_kill2" number="481"/>
+  <syscall name="shm_open" number="482"/>
+  <syscall name="shm_unlink" number="483"/>
+  <syscall name="cpuset" number="484"/>
+  <syscall name="cpuset_setid" number="485"/>
+  <syscall name="cpuset_getid" number="486"/>
+  <syscall name="cpuset_getaffinity" number="487"/>
+  <syscall name="cpuset_setaffinity" number="488"/>
+  <syscall name="faccessat" number="489"/>
+  <syscall name="fchmodat" number="490"/>
+  <syscall name="fchownat" number="491"/>
+  <syscall name="fexecve" number="492"/>
+  <syscall name="fstatat" number="493"/>
+  <syscall name="futimesat" number="494"/>
+  <syscall name="linkat" number="495"/>
+  <syscall name="mkdirat" number="496"/>
+  <syscall name="mkfifoat" number="497"/>
+  <syscall name="mknodat" number="498"/>
+  <syscall name="openat" number="499"/>
+  <syscall name="readlinkat" number="500"/>
+  <syscall name="renameat" number="501"/>
+  <syscall name="symlinkat" number="502"/>
+  <syscall name="unlinkat" number="503"/>
+  <syscall name="posix_openpt" number="504"/>
+  <syscall name="gssd_syscall" number="505"/>
+  <syscall name="jail_get" number="506"/>
+  <syscall name="jail_set" number="507"/>
+  <syscall name="jail_remove" number="508"/>
+  <syscall name="closefrom" number="509"/>
+  <syscall name="__semctl" number="510"/>
+  <syscall name="msgctl" number="511"/>
+  <syscall name="shmctl" number="512"/>
+  <syscall name="lpathconf" number="513"/>
+  <syscall name="__cap_rights_get" number="515"/>
+  <syscall name="cap_enter" number="516"/>
+  <syscall name="cap_getmode" number="517"/>
+  <syscall name="pdfork" number="518"/>
+  <syscall name="pdkill" number="519"/>
+  <syscall name="pdgetpid" number="520"/>
+  <syscall name="pselect" number="522"/>
+  <syscall name="getloginclass" number="523"/>
+  <syscall name="setloginclass" number="524"/>
+  <syscall name="rctl_get_racct" number="525"/>
+  <syscall name="rctl_get_rules" number="526"/>
+  <syscall name="rctl_get_limits" number="527"/>
+  <syscall name="rctl_add_rule" number="528"/>
+  <syscall name="rctl_remove_rule" number="529"/>
+  <syscall name="posix_fallocate" number="530"/>
+  <syscall name="posix_fadvise" number="531"/>
+  <syscall name="wait6" number="532"/>
+  <syscall name="cap_rights_limit" number="533"/>
+  <syscall name="cap_ioctls_limit" number="534"/>
+  <syscall name="cap_ioctls_get" number="535"/>
+  <syscall name="cap_fcntls_limit" number="536"/>
+  <syscall name="cap_fcntls_get" number="537"/>
+  <syscall name="bindat" number="538"/>
+  <syscall name="connectat" number="539"/>
+  <syscall name="chflagsat" number="540"/>
+  <syscall name="accept4" number="541"/>
+  <syscall name="pipe2" number="542"/>
+  <syscall name="aio_mlock" number="543"/>
+  <syscall name="procctl" number="544"/>
+  <syscall name="ppoll" number="545"/>
+  <syscall name="futimens" number="546"/>
+  <syscall name="utimensat" number="547"/>
+  <syscall name="numa_getaffinity" number="548"/>
+  <syscall name="numa_setaffinity" number="549"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/gdb-syscalls.dtd ./gdb/syscalls/gdb-syscalls.dtd
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/gdb-syscalls.dtd	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/gdb-syscalls.dtd	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
@@ -11,4 +11,5 @@
 <!ELEMENT syscall		EMPTY>
 <!ATTLIST syscall
 	name			CDATA	#REQUIRED
-	number			CDATA	#REQUIRED>
+	number			CDATA	#REQUIRED
+	groups			CDATA	#IMPLIED>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/i386-linux.xml ./gdb/syscalls/i386-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/i386-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/i386-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,93 +1,90 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/x86/include/asm/unistd_32.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="waitpid" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="waitpid" number="7" groups="process"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
   <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="break" number="17"/>
-  <syscall name="oldstat" number="18"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="break" number="17" groups="memory"/>
+  <syscall name="oldstat" number="18" groups="file"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
   <syscall name="stime" number="25"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="oldfstat" number="28"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
+  <syscall name="oldfstat" number="28" groups="descriptor"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
   <syscall name="stty" number="31"/>
   <syscall name="gtty" number="32"/>
-  <syscall name="access" number="33"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="ftime" number="35"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
   <syscall name="prof" number="44"/>
-  <syscall name="brk" number="45"/>
+  <syscall name="brk" number="45" groups="memory"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
   <syscall name="lock" number="53"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="mpx" number="56"/>
   <syscall name="setpgid" number="57"/>
   <syscall name="ulimit" number="58"/>
   <syscall name="oldolduname" number="59"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
-  <syscall name="sgetmask" number="68"/>
-  <syscall name="ssetmask" number="69"/>
+  <syscall name="sigaction" number="67" groups="signal"/>
+  <syscall name="sgetmask" number="68" groups="signal"/>
+  <syscall name="ssetmask" number="69" groups="signal"/>
   <syscall name="setreuid" number="70"/>
   <syscall name="setregid" number="71"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrlimit" number="76"/>
@@ -96,78 +93,78 @@
   <syscall name="settimeofday" number="79"/>
   <syscall name="getgroups" number="80"/>
   <syscall name="setgroups" number="81"/>
-  <syscall name="select" number="82"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="oldlstat" number="84"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="select" number="82" groups="descriptor"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="oldlstat" number="84" groups="file"/>
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
+  <syscall name="fchown" number="95" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
   <syscall name="profil" number="98"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
   <syscall name="ioperm" number="101"/>
-  <syscall name="socketcall" number="102"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="olduname" number="109"/>
   <syscall name="iopl" number="110"/>
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/>
   <syscall name="vm86old" number="113"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="modify_ldt" number="123"/>
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/>
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/>
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/>
   <syscall name="setfsuid" number="138"/>
   <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="_newselect" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="_llseek" number="140" groups="descriptor"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="_newselect" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -177,42 +174,42 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="setresuid" number="164"/>
   <syscall name="getresuid" number="165"/>
   <syscall name="vm86" number="166"/>
   <syscall name="query_module" number="167"/>
-  <syscall name="poll" number="168"/>
+  <syscall name="poll" number="168" groups="descriptor"/>
   <syscall name="nfsservctl" number="169"/>
   <syscall name="setresgid" number="170"/>
   <syscall name="getresgid" number="171"/>
   <syscall name="prctl" number="172"/>
-  <syscall name="rt_sigreturn" number="173"/>
-  <syscall name="rt_sigaction" number="174"/>
-  <syscall name="rt_sigprocmask" number="175"/>
-  <syscall name="rt_sigpending" number="176"/>
-  <syscall name="rt_sigtimedwait" number="177"/>
-  <syscall name="rt_sigqueueinfo" number="178"/>
-  <syscall name="rt_sigsuspend" number="179"/>
-  <syscall name="pread64" number="180"/>
-  <syscall name="pwrite64" number="181"/>
-  <syscall name="chown" number="182"/>
-  <syscall name="getcwd" number="183"/>
+  <syscall name="rt_sigreturn" number="173" groups="signal"/>
+  <syscall name="rt_sigaction" number="174" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="175" groups="signal"/>
+  <syscall name="rt_sigpending" number="176" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="177" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="178" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="179" groups="signal"/>
+  <syscall name="pread64" number="180" groups="descriptor"/>
+  <syscall name="pwrite64" number="181" groups="descriptor"/>
+  <syscall name="chown" number="182" groups="file"/>
+  <syscall name="getcwd" number="183" groups="file"/>
   <syscall name="capget" number="184"/>
   <syscall name="capset" number="185"/>
-  <syscall name="sigaltstack" number="186"/>
-  <syscall name="sendfile" number="187"/>
+  <syscall name="sigaltstack" number="186" groups="signal"/>
+  <syscall name="sendfile" number="187" groups="descriptor,network"/>
   <syscall name="getpmsg" number="188"/>
   <syscall name="putpmsg" number="189"/>
-  <syscall name="vfork" number="190"/>
+  <syscall name="vfork" number="190" groups="process"/>
   <syscall name="ugetrlimit" number="191"/>
-  <syscall name="mmap2" number="192"/>
-  <syscall name="truncate64" number="193"/>
-  <syscall name="ftruncate64" number="194"/>
-  <syscall name="stat64" number="195"/>
-  <syscall name="lstat64" number="196"/>
-  <syscall name="fstat64" number="197"/>
-  <syscall name="lchown32" number="198"/>
+  <syscall name="mmap2" number="192" groups="descriptor,memory"/>
+  <syscall name="truncate64" number="193" groups="file"/>
+  <syscall name="ftruncate64" number="194" groups="descriptor"/>
+  <syscall name="stat64" number="195" groups="file"/>
+  <syscall name="lstat64" number="196" groups="file"/>
+  <syscall name="fstat64" number="197" groups="descriptor"/>
+  <syscall name="lchown32" number="198" groups="file"/>
   <syscall name="getuid32" number="199"/>
   <syscall name="getgid32" number="200"/>
   <syscall name="geteuid32" number="201"/>
@@ -221,38 +218,38 @@
   <syscall name="setregid32" number="204"/>
   <syscall name="getgroups32" number="205"/>
   <syscall name="setgroups32" number="206"/>
-  <syscall name="fchown32" number="207"/>
+  <syscall name="fchown32" number="207" groups="descriptor"/>
   <syscall name="setresuid32" number="208"/>
   <syscall name="getresuid32" number="209"/>
   <syscall name="setresgid32" number="210"/>
   <syscall name="getresgid32" number="211"/>
-  <syscall name="chown32" number="212"/>
+  <syscall name="chown32" number="212" groups="file"/>
   <syscall name="setuid32" number="213"/>
   <syscall name="setgid32" number="214"/>
   <syscall name="setfsuid32" number="215"/>
   <syscall name="setfsgid32" number="216"/>
-  <syscall name="pivot_root" number="217"/>
-  <syscall name="mincore" number="218"/>
-  <syscall name="madvise" number="219"/>
+  <syscall name="pivot_root" number="217" groups="file"/>
+  <syscall name="mincore" number="218" groups="memory"/>
+  <syscall name="madvise" number="219" groups="memory"/>
   <syscall name="madvise1" number="220"/>
-  <syscall name="getdents64" number="221"/>
-  <syscall name="fcntl64" number="222"/>
+  <syscall name="getdents64" number="221" groups="descriptor"/>
+  <syscall name="fcntl64" number="222" groups="descriptor"/>
   <syscall name="gettid" number="224"/>
-  <syscall name="readahead" number="225"/>
-  <syscall name="setxattr" number="226"/>
-  <syscall name="lsetxattr" number="227"/>
-  <syscall name="fsetxattr" number="228"/>
-  <syscall name="getxattr" number="229"/>
-  <syscall name="lgetxattr" number="230"/>
-  <syscall name="fgetxattr" number="231"/>
-  <syscall name="listxattr" number="232"/>
-  <syscall name="llistxattr" number="233"/>
-  <syscall name="flistxattr" number="234"/>
-  <syscall name="removexattr" number="235"/>
-  <syscall name="lremovexattr" number="236"/>
-  <syscall name="fremovexattr" number="237"/>
-  <syscall name="tkill" number="238"/>
-  <syscall name="sendfile64" number="239"/>
+  <syscall name="readahead" number="225" groups="descriptor"/>
+  <syscall name="setxattr" number="226" groups="file"/>
+  <syscall name="lsetxattr" number="227" groups="file"/>
+  <syscall name="fsetxattr" number="228" groups="descriptor"/>
+  <syscall name="getxattr" number="229" groups="file"/>
+  <syscall name="lgetxattr" number="230" groups="file"/>
+  <syscall name="fgetxattr" number="231" groups="descriptor"/>
+  <syscall name="listxattr" number="232" groups="file"/>
+  <syscall name="llistxattr" number="233" groups="file"/>
+  <syscall name="flistxattr" number="234" groups="descriptor"/>
+  <syscall name="removexattr" number="235" groups="file"/>
+  <syscall name="lremovexattr" number="236" groups="file"/>
+  <syscall name="fremovexattr" number="237" groups="descriptor"/>
+  <syscall name="tkill" number="238" groups="signal"/>
+  <syscall name="sendfile64" number="239" groups="descriptor,network"/>
   <syscall name="futex" number="240"/>
   <syscall name="sched_setaffinity" number="241"/>
   <syscall name="sched_getaffinity" number="242"/>
@@ -263,13 +260,13 @@
   <syscall name="io_getevents" number="247"/>
   <syscall name="io_submit" number="248"/>
   <syscall name="io_cancel" number="249"/>
-  <syscall name="fadvise64" number="250"/>
-  <syscall name="exit_group" number="252"/>
+  <syscall name="fadvise64" number="250" groups="descriptor"/>
+  <syscall name="exit_group" number="252" groups="process"/>
   <syscall name="lookup_dcookie" number="253"/>
-  <syscall name="epoll_create" number="254"/>
-  <syscall name="epoll_ctl" number="255"/>
-  <syscall name="epoll_wait" number="256"/>
-  <syscall name="remap_file_pages" number="257"/>
+  <syscall name="epoll_create" number="254" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="255" groups="descriptor"/>
+  <syscall name="epoll_wait" number="256" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="257" groups="memory"/>
   <syscall name="set_tid_address" number="258"/>
   <syscall name="timer_create" number="259"/>
   <syscall name="timer_settime" number="260"/>
@@ -280,15 +277,15 @@
   <syscall name="clock_gettime" number="265"/>
   <syscall name="clock_getres" number="266"/>
   <syscall name="clock_nanosleep" number="267"/>
-  <syscall name="statfs64" number="268"/>
-  <syscall name="fstatfs64" number="269"/>
-  <syscall name="tgkill" number="270"/>
-  <syscall name="utimes" number="271"/>
-  <syscall name="fadvise64_64" number="272"/>
+  <syscall name="statfs64" number="268" groups="file"/>
+  <syscall name="fstatfs64" number="269" groups="descriptor"/>
+  <syscall name="tgkill" number="270" groups="signal"/>
+  <syscall name="utimes" number="271" groups="file"/>
+  <syscall name="fadvise64_64" number="272" groups="descriptor"/>
   <syscall name="vserver" number="273"/>
-  <syscall name="mbind" number="274"/>
-  <syscall name="get_mempolicy" number="275"/>
-  <syscall name="set_mempolicy" number="276"/>
+  <syscall name="mbind" number="274" groups="memory"/>
+  <syscall name="get_mempolicy" number="275" groups="memory"/>
+  <syscall name="set_mempolicy" number="276" groups="memory"/>
   <syscall name="mq_open" number="277"/>
   <syscall name="mq_unlink" number="278"/>
   <syscall name="mq_timedsend" number="279"/>
@@ -296,45 +293,45 @@
   <syscall name="mq_notify" number="281"/>
   <syscall name="mq_getsetattr" number="282"/>
   <syscall name="kexec_load" number="283"/>
-  <syscall name="waitid" number="284"/>
+  <syscall name="waitid" number="284" groups="process"/>
   <syscall name="add_key" number="286"/>
   <syscall name="request_key" number="287"/>
   <syscall name="keyctl" number="288"/>
   <syscall name="ioprio_set" number="289"/>
   <syscall name="ioprio_get" number="290"/>
-  <syscall name="inotify_init" number="291"/>
-  <syscall name="inotify_add_watch" number="292"/>
-  <syscall name="inotify_rm_watch" number="293"/>
-  <syscall name="migrate_pages" number="294"/>
-  <syscall name="openat" number="295"/>
-  <syscall name="mkdirat" number="296"/>
-  <syscall name="mknodat" number="297"/>
-  <syscall name="fchownat" number="298"/>
-  <syscall name="futimesat" number="299"/>
-  <syscall name="fstatat64" number="300"/>
-  <syscall name="unlinkat" number="301"/>
-  <syscall name="renameat" number="302"/>
-  <syscall name="linkat" number="303"/>
-  <syscall name="symlinkat" number="304"/>
-  <syscall name="readlinkat" number="305"/>
-  <syscall name="fchmodat" number="306"/>
-  <syscall name="faccessat" number="307"/>
-  <syscall name="pselect6" number="308"/>
-  <syscall name="ppoll" number="309"/>
-  <syscall name="unshare" number="310"/>
+  <syscall name="inotify_init" number="291" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="292" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="293" groups="descriptor"/>
+  <syscall name="migrate_pages" number="294" groups="memory"/>
+  <syscall name="openat" number="295" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="296" groups="descriptor,file"/>
+  <syscall name="mknodat" number="297" groups="descriptor,file"/>
+  <syscall name="fchownat" number="298" groups="descriptor,file"/>
+  <syscall name="futimesat" number="299" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="300" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="301" groups="descriptor,file"/>
+  <syscall name="renameat" number="302" groups="descriptor,file"/>
+  <syscall name="linkat" number="303" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="304" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="305" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="306" groups="descriptor,file"/>
+  <syscall name="faccessat" number="307" groups="descriptor,file"/>
+  <syscall name="pselect6" number="308" groups="descriptor"/>
+  <syscall name="ppoll" number="309" groups="descriptor"/>
+  <syscall name="unshare" number="310" groups="process"/>
   <syscall name="set_robust_list" number="311"/>
   <syscall name="get_robust_list" number="312"/>
-  <syscall name="splice" number="313"/>
-  <syscall name="sync_file_range" number="314"/>
-  <syscall name="tee" number="315"/>
-  <syscall name="vmsplice" number="316"/>
-  <syscall name="move_pages" number="317"/>
+  <syscall name="splice" number="313" groups="descriptor"/>
+  <syscall name="sync_file_range" number="314" groups="descriptor"/>
+  <syscall name="tee" number="315" groups="descriptor"/>
+  <syscall name="vmsplice" number="316" groups="descriptor"/>
+  <syscall name="move_pages" number="317" groups="memory"/>
   <syscall name="getcpu" number="318"/>
-  <syscall name="epoll_pwait" number="319"/>
-  <syscall name="utimensat" number="320"/>
-  <syscall name="signalfd" number="321"/>
-  <syscall name="timerfd_create" number="322"/>
-  <syscall name="eventfd" number="323"/>
-  <syscall name="fallocate" number="324"/>
-  <syscall name="timerfd_settime" number="325"/>
+  <syscall name="epoll_pwait" number="319" groups="descriptor"/>
+  <syscall name="utimensat" number="320" groups="descriptor,file"/>
+  <syscall name="signalfd" number="321" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" number="322" groups="descriptor"/>
+  <syscall name="eventfd" number="323" groups="descriptor"/>
+  <syscall name="fallocate" number="324" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="325" groups="descriptor"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/i386-linux.xml.in ./gdb/syscalls/i386-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/i386-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/i386-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,340 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/x86/include/asm/unistd_32.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="waitpid" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="break" number="17"/>
+  <syscall name="oldstat" number="18"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="oldfstat" number="28"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="stty" number="31"/>
+  <syscall name="gtty" number="32"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="ftime" number="35"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="prof" number="44"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="lock" number="53"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="mpx" number="56"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="ulimit" number="58"/>
+  <syscall name="oldolduname" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="sgetmask" number="68"/>
+  <syscall name="ssetmask" number="69"/>
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrlimit" number="76"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="select" number="82"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="oldlstat" number="84"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="profil" number="98"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="ioperm" number="101"/>
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="olduname" number="109"/>
+  <syscall name="iopl" number="110"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/>
+  <syscall name="vm86old" number="113"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="modify_ldt" number="123"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/>
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="_newselect" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="vm86" number="166"/>
+  <syscall name="query_module" number="167"/>
+  <syscall name="poll" number="168"/>
+  <syscall name="nfsservctl" number="169"/>
+  <syscall name="setresgid" number="170"/>
+  <syscall name="getresgid" number="171"/>
+  <syscall name="prctl" number="172"/>
+  <syscall name="rt_sigreturn" number="173"/>
+  <syscall name="rt_sigaction" number="174"/>
+  <syscall name="rt_sigprocmask" number="175"/>
+  <syscall name="rt_sigpending" number="176"/>
+  <syscall name="rt_sigtimedwait" number="177"/>
+  <syscall name="rt_sigqueueinfo" number="178"/>
+  <syscall name="rt_sigsuspend" number="179"/>
+  <syscall name="pread64" number="180"/>
+  <syscall name="pwrite64" number="181"/>
+  <syscall name="chown" number="182"/>
+  <syscall name="getcwd" number="183"/>
+  <syscall name="capget" number="184"/>
+  <syscall name="capset" number="185"/>
+  <syscall name="sigaltstack" number="186"/>
+  <syscall name="sendfile" number="187"/>
+  <syscall name="getpmsg" number="188"/>
+  <syscall name="putpmsg" number="189"/>
+  <syscall name="vfork" number="190"/>
+  <syscall name="ugetrlimit" number="191"/>
+  <syscall name="mmap2" number="192"/>
+  <syscall name="truncate64" number="193"/>
+  <syscall name="ftruncate64" number="194"/>
+  <syscall name="stat64" number="195"/>
+  <syscall name="lstat64" number="196"/>
+  <syscall name="fstat64" number="197"/>
+  <syscall name="lchown32" number="198"/>
+  <syscall name="getuid32" number="199"/>
+  <syscall name="getgid32" number="200"/>
+  <syscall name="geteuid32" number="201"/>
+  <syscall name="getegid32" number="202"/>
+  <syscall name="setreuid32" number="203"/>
+  <syscall name="setregid32" number="204"/>
+  <syscall name="getgroups32" number="205"/>
+  <syscall name="setgroups32" number="206"/>
+  <syscall name="fchown32" number="207"/>
+  <syscall name="setresuid32" number="208"/>
+  <syscall name="getresuid32" number="209"/>
+  <syscall name="setresgid32" number="210"/>
+  <syscall name="getresgid32" number="211"/>
+  <syscall name="chown32" number="212"/>
+  <syscall name="setuid32" number="213"/>
+  <syscall name="setgid32" number="214"/>
+  <syscall name="setfsuid32" number="215"/>
+  <syscall name="setfsgid32" number="216"/>
+  <syscall name="pivot_root" number="217"/>
+  <syscall name="mincore" number="218"/>
+  <syscall name="madvise" number="219"/>
+  <syscall name="madvise1" number="220"/>
+  <syscall name="getdents64" number="221"/>
+  <syscall name="fcntl64" number="222"/>
+  <syscall name="gettid" number="224"/>
+  <syscall name="readahead" number="225"/>
+  <syscall name="setxattr" number="226"/>
+  <syscall name="lsetxattr" number="227"/>
+  <syscall name="fsetxattr" number="228"/>
+  <syscall name="getxattr" number="229"/>
+  <syscall name="lgetxattr" number="230"/>
+  <syscall name="fgetxattr" number="231"/>
+  <syscall name="listxattr" number="232"/>
+  <syscall name="llistxattr" number="233"/>
+  <syscall name="flistxattr" number="234"/>
+  <syscall name="removexattr" number="235"/>
+  <syscall name="lremovexattr" number="236"/>
+  <syscall name="fremovexattr" number="237"/>
+  <syscall name="tkill" number="238"/>
+  <syscall name="sendfile64" number="239"/>
+  <syscall name="futex" number="240"/>
+  <syscall name="sched_setaffinity" number="241"/>
+  <syscall name="sched_getaffinity" number="242"/>
+  <syscall name="set_thread_area" number="243"/>
+  <syscall name="get_thread_area" number="244"/>
+  <syscall name="io_setup" number="245"/>
+  <syscall name="io_destroy" number="246"/>
+  <syscall name="io_getevents" number="247"/>
+  <syscall name="io_submit" number="248"/>
+  <syscall name="io_cancel" number="249"/>
+  <syscall name="fadvise64" number="250"/>
+  <syscall name="exit_group" number="252"/>
+  <syscall name="lookup_dcookie" number="253"/>
+  <syscall name="epoll_create" number="254"/>
+  <syscall name="epoll_ctl" number="255"/>
+  <syscall name="epoll_wait" number="256"/>
+  <syscall name="remap_file_pages" number="257"/>
+  <syscall name="set_tid_address" number="258"/>
+  <syscall name="timer_create" number="259"/>
+  <syscall name="timer_settime" number="260"/>
+  <syscall name="timer_gettime" number="261"/>
+  <syscall name="timer_getoverrun" number="262"/>
+  <syscall name="timer_delete" number="263"/>
+  <syscall name="clock_settime" number="264"/>
+  <syscall name="clock_gettime" number="265"/>
+  <syscall name="clock_getres" number="266"/>
+  <syscall name="clock_nanosleep" number="267"/>
+  <syscall name="statfs64" number="268"/>
+  <syscall name="fstatfs64" number="269"/>
+  <syscall name="tgkill" number="270"/>
+  <syscall name="utimes" number="271"/>
+  <syscall name="fadvise64_64" number="272"/>
+  <syscall name="vserver" number="273"/>
+  <syscall name="mbind" number="274"/>
+  <syscall name="get_mempolicy" number="275"/>
+  <syscall name="set_mempolicy" number="276"/>
+  <syscall name="mq_open" number="277"/>
+  <syscall name="mq_unlink" number="278"/>
+  <syscall name="mq_timedsend" number="279"/>
+  <syscall name="mq_timedreceive" number="280"/>
+  <syscall name="mq_notify" number="281"/>
+  <syscall name="mq_getsetattr" number="282"/>
+  <syscall name="kexec_load" number="283"/>
+  <syscall name="waitid" number="284"/>
+  <syscall name="add_key" number="286"/>
+  <syscall name="request_key" number="287"/>
+  <syscall name="keyctl" number="288"/>
+  <syscall name="ioprio_set" number="289"/>
+  <syscall name="ioprio_get" number="290"/>
+  <syscall name="inotify_init" number="291"/>
+  <syscall name="inotify_add_watch" number="292"/>
+  <syscall name="inotify_rm_watch" number="293"/>
+  <syscall name="migrate_pages" number="294"/>
+  <syscall name="openat" number="295"/>
+  <syscall name="mkdirat" number="296"/>
+  <syscall name="mknodat" number="297"/>
+  <syscall name="fchownat" number="298"/>
+  <syscall name="futimesat" number="299"/>
+  <syscall name="fstatat64" number="300"/>
+  <syscall name="unlinkat" number="301"/>
+  <syscall name="renameat" number="302"/>
+  <syscall name="linkat" number="303"/>
+  <syscall name="symlinkat" number="304"/>
+  <syscall name="readlinkat" number="305"/>
+  <syscall name="fchmodat" number="306"/>
+  <syscall name="faccessat" number="307"/>
+  <syscall name="pselect6" number="308"/>
+  <syscall name="ppoll" number="309"/>
+  <syscall name="unshare" number="310"/>
+  <syscall name="set_robust_list" number="311"/>
+  <syscall name="get_robust_list" number="312"/>
+  <syscall name="splice" number="313"/>
+  <syscall name="sync_file_range" number="314"/>
+  <syscall name="tee" number="315"/>
+  <syscall name="vmsplice" number="316"/>
+  <syscall name="move_pages" number="317"/>
+  <syscall name="getcpu" number="318"/>
+  <syscall name="epoll_pwait" number="319"/>
+  <syscall name="utimensat" number="320"/>
+  <syscall name="signalfd" number="321"/>
+  <syscall name="timerfd_create" number="322"/>
+  <syscall name="eventfd" number="323"/>
+  <syscall name="fallocate" number="324"/>
+  <syscall name="timerfd_settime" number="325"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/linux-defaults.xml.in ./gdb/syscalls/linux-defaults.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/linux-defaults.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/linux-defaults.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,243 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!-- The group field information was based on strace.  -->
+
+<syscalls_defaults>
+  <syscall name="read" groups="descriptor"/>
+  <syscall name="write" groups="descriptor"/>
+  <syscall name="open" groups="descriptor,file"/>
+  <syscall name="close" groups="descriptor"/>
+  <syscall name="stat" groups="file"/>
+  <syscall name="fstat" groups="descriptor"/>
+  <syscall name="lstat" groups="file"/>
+  <syscall name="poll" groups="descriptor"/>
+  <syscall name="lseek" groups="descriptor"/>
+  <syscall name="mmap" groups="descriptor,memory"/>
+  <syscall name="mprotect" groups="memory"/>
+  <syscall name="munmap" groups="memory"/>
+  <syscall name="brk" groups="memory"/>
+  <syscall name="rt_sigaction" groups="signal"/>
+  <syscall name="rt_sigprocmask" groups="signal"/>
+  <syscall name="rt_sigreturn" groups="signal"/>
+  <syscall name="ioctl" groups="descriptor"/>
+  <syscall name="pread64" groups="descriptor"/>
+  <syscall name="pwrite64" groups="descriptor"/>
+  <syscall name="readv" groups="descriptor"/>
+  <syscall name="writev" groups="descriptor"/>
+  <syscall name="access" groups="file"/>
+  <syscall name="pipe" groups="descriptor"/>
+  <syscall name="select" groups="descriptor"/>
+  <syscall name="mremap" groups="memory"/>
+  <syscall name="msync" groups="memory"/>
+  <syscall name="mincore" groups="memory"/>
+  <syscall name="madvise" groups="memory"/>
+  <syscall name="shmget" groups="ipc"/>
+  <syscall name="shmat" groups="ipc,memory"/>
+  <syscall name="shmctl" groups="ipc"/>
+  <syscall name="dup" groups="descriptor"/>
+  <syscall name="dup2" groups="descriptor"/>
+  <syscall name="pause" groups="signal"/>
+  <syscall name="sendfile" groups="descriptor,network"/>
+  <syscall name="socket" groups="network"/>
+  <syscall name="connect" groups="network"/>
+  <syscall name="accept" groups="network"/>
+  <syscall name="sendto" groups="network"/>
+  <syscall name="recvfrom" groups="network"/>
+  <syscall name="sendmsg" groups="network"/>
+  <syscall name="recvmsg" groups="network"/>
+  <syscall name="shutdown" groups="network"/>
+  <syscall name="bind" groups="network"/>
+  <syscall name="listen" groups="network"/>
+  <syscall name="getsockname" groups="network"/>
+  <syscall name="getpeername" groups="network"/>
+  <syscall name="socketpair" groups="network"/>
+  <syscall name="setsockopt" groups="network"/>
+  <syscall name="getsockopt" groups="network"/>
+  <syscall name="clone" groups="process"/>
+  <syscall name="fork" groups="process"/>
+  <syscall name="vfork" groups="process"/>
+  <syscall name="execve" groups="file,process"/>
+  <syscall name="execv" groups="file,process"/>
+  <syscall name="exit" groups="process"/>
+  <syscall name="wait4" groups="process"/>
+  <syscall name="kill" groups="signal"/>
+  <syscall name="semget" groups="ipc"/>
+  <syscall name="semop" groups="ipc"/>
+  <syscall name="semctl" groups="ipc"/>
+  <syscall name="shmdt" groups="ipc,memory"/>
+  <syscall name="msgget" groups="ipc"/>
+  <syscall name="msgsnd" groups="ipc"/>
+  <syscall name="msgrcv" groups="ipc"/>
+  <syscall name="msgctl" groups="ipc"/>
+  <syscall name="fcntl" groups="descriptor"/>
+  <syscall name="flock" groups="descriptor"/>
+  <syscall name="fsync" groups="descriptor"/>
+  <syscall name="fdatasync" groups="descriptor"/>
+  <syscall name="truncate" groups="file"/>
+  <syscall name="ftruncate" groups="descriptor"/>
+  <syscall name="getdents" groups="descriptor"/>
+  <syscall name="getcwd" groups="file"/>
+  <syscall name="chdir" groups="file"/>
+  <syscall name="fchdir" groups="descriptor"/>
+  <syscall name="rename" groups="file"/>
+  <syscall name="mkdir" groups="file"/>
+  <syscall name="rmdir" groups="file"/>
+  <syscall name="creat" groups="descriptor,file"/>
+  <syscall name="link" groups="file"/>
+  <syscall name="unlink" groups="file"/>
+  <syscall name="symlink" groups="file"/>
+  <syscall name="readlink" groups="file"/>
+  <syscall name="chmod" groups="file"/>
+  <syscall name="fchmod" groups="descriptor"/>
+  <syscall name="chown" groups="file"/>
+  <syscall name="fchown" groups="descriptor"/>
+  <syscall name="lchown" groups="file"/>
+  <syscall name="rt_sigpending" groups="signal"/>
+  <syscall name="rt_sigtimedwait" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" groups="signal"/>
+  <syscall name="rt_sigsuspend" groups="signal"/>
+  <syscall name="sigaltstack" groups="signal"/>
+  <syscall name="utime" groups="file"/>
+  <syscall name="mknod" groups="file"/>
+  <syscall name="uselib" groups="file"/>
+  <syscall name="statfs" groups="file"/>
+  <syscall name="fstatfs" groups="descriptor"/>
+  <syscall name="mlock" groups="memory"/>
+  <syscall name="munlock" groups="memory"/>
+  <syscall name="mlockall" groups="memory"/>
+  <syscall name="munlockall" groups="memory"/>
+  <syscall name="pivot_root" groups="file"/>
+  <syscall name="arch_prctl" groups="process"/>
+  <syscall name="chroot" groups="file"/>
+  <syscall name="acct" groups="file"/>
+  <syscall name="mount" groups="file"/>
+  <syscall name="umount" groups="file"/>
+  <syscall name="umount2" groups="file"/>
+  <syscall name="swapon" groups="file"/>
+  <syscall name="swapoff" groups="file"/>
+  <syscall name="quotactl" groups="file"/>
+  <syscall name="readahead" groups="descriptor"/>
+  <syscall name="setxattr" groups="file"/>
+  <syscall name="lsetxattr" groups="file"/>
+  <syscall name="fsetxattr" groups="descriptor"/>
+  <syscall name="getxattr" groups="file"/>
+  <syscall name="lgetxattr" groups="file"/>
+  <syscall name="fgetxattr" groups="descriptor"/>
+  <syscall name="listxattr" groups="file"/>
+  <syscall name="llistxattr" groups="file"/>
+  <syscall name="flistxattr" groups="descriptor"/>
+  <syscall name="removexattr" groups="file"/>
+  <syscall name="lremovexattr" groups="file"/>
+  <syscall name="fremovexattr" groups="descriptor"/>
+  <syscall name="tkill" groups="signal"/>
+  <syscall name="epoll_create" groups="descriptor"/>
+  <syscall name="remap_file_pages" groups="memory"/>
+  <syscall name="getdents64" groups="descriptor"/>
+  <syscall name="semtimedop" groups="ipc"/>
+  <syscall name="fadvise64" groups="descriptor"/>
+  <syscall name="exit_group" groups="process"/>
+  <syscall name="epoll_wait" groups="descriptor"/>
+  <syscall name="epoll_ctl" groups="descriptor"/>
+  <syscall name="tgkill" groups="signal"/>
+  <syscall name="utimes" groups="file"/>
+  <syscall name="mbind" groups="memory"/>
+  <syscall name="set_mempolicy" groups="memory"/>
+  <syscall name="get_mempolicy" groups="memory"/>
+  <syscall name="waitid" groups="process"/>
+  <syscall name="inotify_init" groups="descriptor"/>
+  <syscall name="inotify_add_watch" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" groups="descriptor"/>
+  <syscall name="migrate_pages" groups="memory"/>
+  <syscall name="openat" groups="descriptor,file"/>
+  <syscall name="mkdirat" groups="descriptor,file"/>
+  <syscall name="mknodat" groups="descriptor,file"/>
+  <syscall name="fchownat" groups="descriptor,file"/>
+  <syscall name="futimesat" groups="descriptor,file"/>
+  <syscall name="newfstatat" groups="descriptor,file"/>
+  <syscall name="unlinkat" groups="descriptor,file"/>
+  <syscall name="renameat" groups="descriptor,file"/>
+  <syscall name="linkat" groups="descriptor,file"/>
+  <syscall name="symlinkat" groups="descriptor,file"/>
+  <syscall name="readlinkat" groups="descriptor,file"/>
+  <syscall name="fchmodat" groups="descriptor,file"/>
+  <syscall name="faccessat" groups="descriptor,file"/>
+  <syscall name="pselect6" groups="descriptor"/>
+  <syscall name="ppoll" groups="descriptor"/>
+  <syscall name="unshare" groups="process"/>
+  <syscall name="splice" groups="descriptor"/>
+  <syscall name="tee" groups="descriptor"/>
+  <syscall name="sync_file_range" groups="descriptor"/>
+  <syscall name="vmsplice" groups="descriptor"/>
+  <syscall name="move_pages" groups="memory"/>
+  <syscall name="utimensat" groups="descriptor,file"/>
+  <syscall name="epoll_pwait" groups="descriptor"/>
+  <syscall name="signalfd" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" groups="descriptor"/>
+  <syscall name="eventfd" groups="descriptor"/>
+  <syscall name="fallocate" groups="descriptor"/>
+  <syscall name="timerfd_settime" groups="descriptor"/>
+  <syscall name="timerfd_gettime" groups="descriptor"/>
+  <syscall name="accept4" groups="network"/>
+  <syscall name="signalfd4" groups="descriptor,signal"/>
+  <syscall name="eventfd2" groups="descriptor"/>
+  <syscall name="epoll_create1" groups="descriptor"/>
+  <syscall name="dup3" groups="descriptor"/>
+  <syscall name="pipe2" groups="descriptor"/>
+  <syscall name="inotify_init1" groups="descriptor"/>
+  <syscall name="preadv" groups="descriptor"/>
+  <syscall name="pwritev" groups="descriptor"/>
+  <syscall name="send" groups="network"/>
+  <syscall name="recv" groups="network"/>
+  <syscall name="statfs64" groups="file"/>
+  <syscall name="fstatfs64" groups="descriptor"/>
+  <syscall name="sendfile64" groups="descriptor,network"/>
+  <syscall name="rt_tgsigqueueinfo" groups="process,signal"/>
+  <syscall name="perf_event_open" groups="descriptor"/>
+  <syscall name="recvmmsg" groups="network"/>
+  <syscall name="fanotify_init" groups="descriptor"/>
+  <syscall name="fanotify_mark" groups="descriptor,file"/>
+  <syscall name="fchown32" groups="descriptor"/>
+  <syscall name="chown32" groups="file"/>
+  <syscall name="fcntl64" groups="descriptor"/>
+  <syscall name="mmap2" groups="descriptor,memory"/>
+  <syscall name="truncate64" groups="file"/>
+  <syscall name="ftruncate64" groups="descriptor"/>
+  <syscall name="stat64" groups="file"/>
+  <syscall name="lstat64" groups="file"/>
+  <syscall name="fstat64" groups="descriptor"/>
+  <syscall name="lchown32" groups="file"/>
+  <syscall name="name_to_handle_at" groups="descriptor,file"/>
+  <syscall name="open_by_handle_at" groups="descriptor"/>
+  <syscall name="_llseek" groups="descriptor"/>
+  <syscall name="syncfs" groups="descriptor"/>
+  <syscall name="sendmmsg" groups="network"/>
+  <syscall name="setns" groups="descriptor"/>
+  <syscall name="finit_module" groups="descriptor"/>
+  <syscall name="oldstat" groups="file"/>
+  <syscall name="sigaction" groups="signal"/>
+  <syscall name="sigreturn" groups="signal"/>
+  <syscall name="sigsuspend" groups="signal"/>
+  <syscall name="sigpending" groups="signal"/>
+  <syscall name="sigprocmask" groups="signal"/>
+  <syscall name="ipc" groups="ipc"/>
+  <syscall name="readdir" groups="descriptor"/>
+  <syscall name="socketcall" groups="descriptor"/>
+  <syscall name="break" groups="memory"/>
+  <syscall name="oldfstat" groups="descriptor"/>
+  <syscall name="signal" groups="signal"/>
+  <syscall name="sgetmask" groups="signal"/>
+  <syscall name="ssetmask" groups="signal"/>
+  <syscall name="oldlstat" groups="file"/>
+  <syscall name="waitpid" groups="process"/>
+  <syscall name="pread" groups="descriptor"/>
+  <syscall name="pwrite" groups="descriptor"/>
+  <syscall name="fadvise64_64" groups="descriptor"/>
+  <syscall name="fstatat64" groups="descriptor,file"/>
+  <syscall name="_newselect" groups="descriptor"/>
+  <syscall name="timerfd" groups="descriptor"/>
+</syscalls_defaults>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n32-linux.xml ./gdb/syscalls/mips-n32-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n32-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/mips-n32-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,112 +1,109 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2011-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/mips/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
-  <syscall name="read" number="6000"/>
-  <syscall name="write" number="6001"/>
-  <syscall name="open" number="6002"/>
-  <syscall name="close" number="6003"/>
-  <syscall name="stat" number="6004"/>
-  <syscall name="fstat" number="6005"/>
-  <syscall name="lstat" number="6006"/>
-  <syscall name="poll" number="6007"/>
-  <syscall name="lseek" number="6008"/>
-  <syscall name="mmap" number="6009"/>
-  <syscall name="mprotect" number="6010"/>
-  <syscall name="munmap" number="6011"/>
-  <syscall name="brk" number="6012"/>
-  <syscall name="rt_sigaction" number="6013"/>
-  <syscall name="rt_sigprocmask" number="6014"/>
-  <syscall name="ioctl" number="6015"/>
-  <syscall name="pread64" number="6016"/>
-  <syscall name="pwrite64" number="6017"/>
-  <syscall name="readv" number="6018"/>
-  <syscall name="writev" number="6019"/>
-  <syscall name="access" number="6020"/>
-  <syscall name="pipe" number="6021"/>
-  <syscall name="_newselect" number="6022"/>
+  <syscall name="read" number="6000" groups="descriptor"/>
+  <syscall name="write" number="6001" groups="descriptor"/>
+  <syscall name="open" number="6002" groups="descriptor,file"/>
+  <syscall name="close" number="6003" groups="descriptor"/>
+  <syscall name="stat" number="6004" groups="file"/>
+  <syscall name="fstat" number="6005" groups="descriptor"/>
+  <syscall name="lstat" number="6006" groups="file"/>
+  <syscall name="poll" number="6007" groups="descriptor"/>
+  <syscall name="lseek" number="6008" groups="descriptor"/>
+  <syscall name="mmap" number="6009" groups="descriptor,memory"/>
+  <syscall name="mprotect" number="6010" groups="memory"/>
+  <syscall name="munmap" number="6011" groups="memory"/>
+  <syscall name="brk" number="6012" groups="memory"/>
+  <syscall name="rt_sigaction" number="6013" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="6014" groups="signal"/>
+  <syscall name="ioctl" number="6015" groups="descriptor"/>
+  <syscall name="pread64" number="6016" groups="descriptor"/>
+  <syscall name="pwrite64" number="6017" groups="descriptor"/>
+  <syscall name="readv" number="6018" groups="descriptor"/>
+  <syscall name="writev" number="6019" groups="descriptor"/>
+  <syscall name="access" number="6020" groups="file"/>
+  <syscall name="pipe" number="6021" groups="descriptor"/>
+  <syscall name="_newselect" number="6022" groups="descriptor"/>
   <syscall name="sched_yield" number="6023"/>
-  <syscall name="mremap" number="6024"/>
-  <syscall name="msync" number="6025"/>
-  <syscall name="mincore" number="6026"/>
-  <syscall name="madvise" number="6027"/>
-  <syscall name="shmget" number="6028"/>
-  <syscall name="shmat" number="6029"/>
-  <syscall name="shmctl" number="6030"/>
-  <syscall name="dup" number="6031"/>
-  <syscall name="dup2" number="6032"/>
-  <syscall name="pause" number="6033"/>
+  <syscall name="mremap" number="6024" groups="memory"/>
+  <syscall name="msync" number="6025" groups="memory"/>
+  <syscall name="mincore" number="6026" groups="memory"/>
+  <syscall name="madvise" number="6027" groups="memory"/>
+  <syscall name="shmget" number="6028" groups="ipc"/>
+  <syscall name="shmat" number="6029" groups="ipc,memory"/>
+  <syscall name="shmctl" number="6030" groups="ipc"/>
+  <syscall name="dup" number="6031" groups="descriptor"/>
+  <syscall name="dup2" number="6032" groups="descriptor"/>
+  <syscall name="pause" number="6033" groups="signal"/>
   <syscall name="nanosleep" number="6034"/>
   <syscall name="getitimer" number="6035"/>
   <syscall name="setitimer" number="6036"/>
   <syscall name="alarm" number="6037"/>
   <syscall name="getpid" number="6038"/>
-  <syscall name="sendfile" number="6039"/>
-  <syscall name="socket" number="6040"/>
-  <syscall name="connect" number="6041"/>
-  <syscall name="accept" number="6042"/>
-  <syscall name="sendto" number="6043"/>
-  <syscall name="recvfrom" number="6044"/>
-  <syscall name="sendmsg" number="6045"/>
-  <syscall name="recvmsg" number="6046"/>
-  <syscall name="shutdown" number="6047"/>
-  <syscall name="bind" number="6048"/>
-  <syscall name="listen" number="6049"/>
-  <syscall name="getsockname" number="6050"/>
-  <syscall name="getpeername" number="6051"/>
-  <syscall name="socketpair" number="6052"/>
-  <syscall name="setsockopt" number="6053"/>
-  <syscall name="getsockopt" number="6054"/>
-  <syscall name="clone" number="6055"/>
-  <syscall name="fork" number="6056"/>
-  <syscall name="execve" number="6057"/>
-  <syscall name="exit" number="6058"/>
-  <syscall name="wait4" number="6059"/>
-  <syscall name="kill" number="6060"/>
+  <syscall name="sendfile" number="6039" groups="descriptor,network"/>
+  <syscall name="socket" number="6040" groups="network"/>
+  <syscall name="connect" number="6041" groups="network"/>
+  <syscall name="accept" number="6042" groups="network"/>
+  <syscall name="sendto" number="6043" groups="network"/>
+  <syscall name="recvfrom" number="6044" groups="network"/>
+  <syscall name="sendmsg" number="6045" groups="network"/>
+  <syscall name="recvmsg" number="6046" groups="network"/>
+  <syscall name="shutdown" number="6047" groups="network"/>
+  <syscall name="bind" number="6048" groups="network"/>
+  <syscall name="listen" number="6049" groups="network"/>
+  <syscall name="getsockname" number="6050" groups="network"/>
+  <syscall name="getpeername" number="6051" groups="network"/>
+  <syscall name="socketpair" number="6052" groups="network"/>
+  <syscall name="setsockopt" number="6053" groups="network"/>
+  <syscall name="getsockopt" number="6054" groups="network"/>
+  <syscall name="clone" number="6055" groups="process"/>
+  <syscall name="fork" number="6056" groups="process"/>
+  <syscall name="execve" number="6057" groups="file,process"/>
+  <syscall name="exit" number="6058" groups="process"/>
+  <syscall name="wait4" number="6059" groups="process"/>
+  <syscall name="kill" number="6060" groups="signal"/>
   <syscall name="uname" number="6061"/>
-  <syscall name="semget" number="6062"/>
-  <syscall name="semop" number="6063"/>
-  <syscall name="semctl" number="6064"/>
-  <syscall name="shmdt" number="6065"/>
-  <syscall name="msgget" number="6066"/>
-  <syscall name="msgsnd" number="6067"/>
-  <syscall name="msgrcv" number="6068"/>
-  <syscall name="msgctl" number="6069"/>
-  <syscall name="fcntl" number="6070"/>
-  <syscall name="flock" number="6071"/>
-  <syscall name="fsync" number="6072"/>
-  <syscall name="fdatasync" number="6073"/>
-  <syscall name="truncate" number="6074"/>
-  <syscall name="ftruncate" number="6075"/>
-  <syscall name="getdents" number="6076"/>
-  <syscall name="getcwd" number="6077"/>
-  <syscall name="chdir" number="6078"/>
-  <syscall name="fchdir" number="6079"/>
-  <syscall name="rename" number="6080"/>
-  <syscall name="mkdir" number="6081"/>
-  <syscall name="rmdir" number="6082"/>
-  <syscall name="creat" number="6083"/>
-  <syscall name="link" number="6084"/>
-  <syscall name="unlink" number="6085"/>
-  <syscall name="symlink" number="6086"/>
-  <syscall name="readlink" number="6087"/>
-  <syscall name="chmod" number="6088"/>
-  <syscall name="fchmod" number="6089"/>
-  <syscall name="chown" number="6090"/>
-  <syscall name="fchown" number="6091"/>
-  <syscall name="lchown" number="6092"/>
+  <syscall name="semget" number="6062" groups="ipc"/>
+  <syscall name="semop" number="6063" groups="ipc"/>
+  <syscall name="semctl" number="6064" groups="ipc"/>
+  <syscall name="shmdt" number="6065" groups="ipc,memory"/>
+  <syscall name="msgget" number="6066" groups="ipc"/>
+  <syscall name="msgsnd" number="6067" groups="ipc"/>
+  <syscall name="msgrcv" number="6068" groups="ipc"/>
+  <syscall name="msgctl" number="6069" groups="ipc"/>
+  <syscall name="fcntl" number="6070" groups="descriptor"/>
+  <syscall name="flock" number="6071" groups="descriptor"/>
+  <syscall name="fsync" number="6072" groups="descriptor"/>
+  <syscall name="fdatasync" number="6073" groups="descriptor"/>
+  <syscall name="truncate" number="6074" groups="file"/>
+  <syscall name="ftruncate" number="6075" groups="descriptor"/>
+  <syscall name="getdents" number="6076" groups="descriptor"/>
+  <syscall name="getcwd" number="6077" groups="file"/>
+  <syscall name="chdir" number="6078" groups="file"/>
+  <syscall name="fchdir" number="6079" groups="descriptor"/>
+  <syscall name="rename" number="6080" groups="file"/>
+  <syscall name="mkdir" number="6081" groups="file"/>
+  <syscall name="rmdir" number="6082" groups="file"/>
+  <syscall name="creat" number="6083" groups="descriptor,file"/>
+  <syscall name="link" number="6084" groups="file"/>
+  <syscall name="unlink" number="6085" groups="file"/>
+  <syscall name="symlink" number="6086" groups="file"/>
+  <syscall name="readlink" number="6087" groups="file"/>
+  <syscall name="chmod" number="6088" groups="file"/>
+  <syscall name="fchmod" number="6089" groups="descriptor"/>
+  <syscall name="chown" number="6090" groups="file"/>
+  <syscall name="fchown" number="6091" groups="descriptor"/>
+  <syscall name="lchown" number="6092" groups="file"/>
   <syscall name="umask" number="6093"/>
   <syscall name="gettimeofday" number="6094"/>
   <syscall name="getrlimit" number="6095"/>
@@ -139,17 +136,17 @@
   <syscall name="getsid" number="6122"/>
   <syscall name="capget" number="6123"/>
   <syscall name="capset" number="6124"/>
-  <syscall name="rt_sigpending" number="6125"/>
-  <syscall name="rt_sigtimedwait" number="6126"/>
-  <syscall name="rt_sigqueueinfo" number="6127"/>
-  <syscall name="rt_sigsuspend" number="6128"/>
-  <syscall name="sigaltstack" number="6129"/>
-  <syscall name="utime" number="6130"/>
-  <syscall name="mknod" number="6131"/>
+  <syscall name="rt_sigpending" number="6125" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="6126" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="6127" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="6128" groups="signal"/>
+  <syscall name="sigaltstack" number="6129" groups="signal"/>
+  <syscall name="utime" number="6130" groups="file"/>
+  <syscall name="mknod" number="6131" groups="file"/>
   <syscall name="personality" number="6132"/>
   <syscall name="ustat" number="6133"/>
-  <syscall name="statfs" number="6134"/>
-  <syscall name="fstatfs" number="6135"/>
+  <syscall name="statfs" number="6134" groups="file"/>
+  <syscall name="fstatfs" number="6135" groups="descriptor"/>
   <syscall name="sysfs" number="6136"/>
   <syscall name="getpriority" number="6137"/>
   <syscall name="setpriority" number="6138"/>
@@ -160,24 +157,24 @@
   <syscall name="sched_get_priority_max" number="6143"/>
   <syscall name="sched_get_priority_min" number="6144"/>
   <syscall name="sched_rr_get_interval" number="6145"/>
-  <syscall name="mlock" number="6146"/>
-  <syscall name="munlock" number="6147"/>
-  <syscall name="mlockall" number="6148"/>
-  <syscall name="munlockall" number="6149"/>
+  <syscall name="mlock" number="6146" groups="memory"/>
+  <syscall name="munlock" number="6147" groups="memory"/>
+  <syscall name="mlockall" number="6148" groups="memory"/>
+  <syscall name="munlockall" number="6149" groups="memory"/>
   <syscall name="vhangup" number="6150"/>
-  <syscall name="pivot_root" number="6151"/>
+  <syscall name="pivot_root" number="6151" groups="file"/>
   <syscall name="_sysctl" number="6152"/>
   <syscall name="prctl" number="6153"/>
   <syscall name="adjtimex" number="6154"/>
   <syscall name="setrlimit" number="6155"/>
-  <syscall name="chroot" number="6156"/>
+  <syscall name="chroot" number="6156" groups="file"/>
   <syscall name="sync" number="6157"/>
-  <syscall name="acct" number="6158"/>
+  <syscall name="acct" number="6158" groups="file"/>
   <syscall name="settimeofday" number="6159"/>
-  <syscall name="mount" number="6160"/>
-  <syscall name="umount2" number="6161"/>
-  <syscall name="swapon" number="6162"/>
-  <syscall name="swapoff" number="6163"/>
+  <syscall name="mount" number="6160" groups="file"/>
+  <syscall name="umount2" number="6161" groups="file"/>
+  <syscall name="swapon" number="6162" groups="file"/>
+  <syscall name="swapoff" number="6163" groups="file"/>
   <syscall name="reboot" number="6164"/>
   <syscall name="sethostname" number="6165"/>
   <syscall name="setdomainname" number="6166"/>
@@ -186,27 +183,27 @@
   <syscall name="delete_module" number="6169"/>
   <syscall name="get_kernel_syms" number="6170"/>
   <syscall name="query_module" number="6171"/>
-  <syscall name="quotactl" number="6172"/>
+  <syscall name="quotactl" number="6172" groups="file"/>
   <syscall name="nfsservctl" number="6173"/>
   <syscall name="getpmsg" number="6174"/>
   <syscall name="putpmsg" number="6175"/>
   <syscall name="afs_syscall" number="6176"/>
   <syscall name="reserved177" number="6177"/>
   <syscall name="gettid" number="6178"/>
-  <syscall name="readahead" number="6179"/>
-  <syscall name="setxattr" number="6180"/>
-  <syscall name="lsetxattr" number="6181"/>
-  <syscall name="fsetxattr" number="6182"/>
-  <syscall name="getxattr" number="6183"/>
-  <syscall name="lgetxattr" number="6184"/>
-  <syscall name="fgetxattr" number="6185"/>
-  <syscall name="listxattr" number="6186"/>
-  <syscall name="llistxattr" number="6187"/>
-  <syscall name="flistxattr" number="6188"/>
-  <syscall name="removexattr" number="6189"/>
-  <syscall name="lremovexattr" number="6190"/>
-  <syscall name="fremovexattr" number="6191"/>
-  <syscall name="tkill" number="6192"/>
+  <syscall name="readahead" number="6179" groups="descriptor"/>
+  <syscall name="setxattr" number="6180" groups="file"/>
+  <syscall name="lsetxattr" number="6181" groups="file"/>
+  <syscall name="fsetxattr" number="6182" groups="descriptor"/>
+  <syscall name="getxattr" number="6183" groups="file"/>
+  <syscall name="lgetxattr" number="6184" groups="file"/>
+  <syscall name="fgetxattr" number="6185" groups="descriptor"/>
+  <syscall name="listxattr" number="6186" groups="file"/>
+  <syscall name="llistxattr" number="6187" groups="file"/>
+  <syscall name="flistxattr" number="6188" groups="descriptor"/>
+  <syscall name="removexattr" number="6189" groups="file"/>
+  <syscall name="lremovexattr" number="6190" groups="file"/>
+  <syscall name="fremovexattr" number="6191" groups="descriptor"/>
+  <syscall name="tkill" number="6192" groups="signal"/>
   <syscall name="reserved193" number="6193"/>
   <syscall name="futex" number="6194"/>
   <syscall name="sched_setaffinity" number="6195"/>
@@ -219,21 +216,21 @@
   <syscall name="io_getevents" number="6202"/>
   <syscall name="io_submit" number="6203"/>
   <syscall name="io_cancel" number="6204"/>
-  <syscall name="exit_group" number="6205"/>
+  <syscall name="exit_group" number="6205" groups="process"/>
   <syscall name="lookup_dcookie" number="6206"/>
-  <syscall name="epoll_create" number="6207"/>
-  <syscall name="epoll_ctl" number="6208"/>
-  <syscall name="epoll_wait" number="6209"/>
-  <syscall name="remap_file_pages" number="6210"/>
-  <syscall name="rt_sigreturn" number="6211"/>
-  <syscall name="fcntl64" number="6212"/>
+  <syscall name="epoll_create" number="6207" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="6208" groups="descriptor"/>
+  <syscall name="epoll_wait" number="6209" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="6210" groups="memory"/>
+  <syscall name="rt_sigreturn" number="6211" groups="signal"/>
+  <syscall name="fcntl64" number="6212" groups="descriptor"/>
   <syscall name="set_tid_address" number="6213"/>
   <syscall name="restart_syscall" number="6214"/>
-  <syscall name="semtimedop" number="6215"/>
-  <syscall name="fadvise64" number="6216"/>
-  <syscall name="statfs64" number="6217"/>
-  <syscall name="fstatfs64" number="6218"/>
-  <syscall name="sendfile64" number="6219"/>
+  <syscall name="semtimedop" number="6215" groups="ipc"/>
+  <syscall name="fadvise64" number="6216" groups="descriptor"/>
+  <syscall name="statfs64" number="6217" groups="file"/>
+  <syscall name="fstatfs64" number="6218" groups="descriptor"/>
+  <syscall name="sendfile64" number="6219" groups="descriptor,network"/>
   <syscall name="timer_create" number="6220"/>
   <syscall name="timer_settime" number="6221"/>
   <syscall name="timer_gettime" number="6222"/>
@@ -243,11 +240,11 @@
   <syscall name="clock_gettime" number="6226"/>
   <syscall name="clock_getres" number="6227"/>
   <syscall name="clock_nanosleep" number="6228"/>
-  <syscall name="tgkill" number="6229"/>
-  <syscall name="utimes" number="6230"/>
-  <syscall name="mbind" number="6231"/>
-  <syscall name="get_mempolicy" number="6232"/>
-  <syscall name="set_mempolicy" number="6233"/>
+  <syscall name="tgkill" number="6229" groups="signal"/>
+  <syscall name="utimes" number="6230" groups="file"/>
+  <syscall name="mbind" number="6231" groups="memory"/>
+  <syscall name="get_mempolicy" number="6232" groups="memory"/>
+  <syscall name="set_mempolicy" number="6233" groups="memory"/>
   <syscall name="mq_open" number="6234"/>
   <syscall name="mq_unlink" number="6235"/>
   <syscall name="mq_timedsend" number="6236"/>
@@ -255,65 +252,65 @@
   <syscall name="mq_notify" number="6238"/>
   <syscall name="mq_getsetattr" number="6239"/>
   <syscall name="vserver" number="6240"/>
-  <syscall name="waitid" number="6241"/>
+  <syscall name="waitid" number="6241" groups="process"/>
   <syscall name="add_key" number="6243"/>
   <syscall name="request_key" number="6244"/>
   <syscall name="keyctl" number="6245"/>
   <syscall name="set_thread_area" number="6246"/>
-  <syscall name="inotify_init" number="6247"/>
-  <syscall name="inotify_add_watch" number="6248"/>
-  <syscall name="inotify_rm_watch" number="6249"/>
-  <syscall name="migrate_pages" number="6250"/>
-  <syscall name="openat" number="6251"/>
-  <syscall name="mkdirat" number="6252"/>
-  <syscall name="mknodat" number="6253"/>
-  <syscall name="fchownat" number="6254"/>
-  <syscall name="futimesat" number="6255"/>
-  <syscall name="newfstatat" number="6256"/>
-  <syscall name="unlinkat" number="6257"/>
-  <syscall name="renameat" number="6258"/>
-  <syscall name="linkat" number="6259"/>
-  <syscall name="symlinkat" number="6260"/>
-  <syscall name="readlinkat" number="6261"/>
-  <syscall name="fchmodat" number="6262"/>
-  <syscall name="faccessat" number="6263"/>
-  <syscall name="pselect6" number="6264"/>
-  <syscall name="ppoll" number="6265"/>
-  <syscall name="unshare" number="6266"/>
-  <syscall name="splice" number="6267"/>
-  <syscall name="sync_file_range" number="6268"/>
-  <syscall name="tee" number="6269"/>
-  <syscall name="vmsplice" number="6270"/>
-  <syscall name="move_pages" number="6271"/>
+  <syscall name="inotify_init" number="6247" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="6248" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="6249" groups="descriptor"/>
+  <syscall name="migrate_pages" number="6250" groups="memory"/>
+  <syscall name="openat" number="6251" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="6252" groups="descriptor,file"/>
+  <syscall name="mknodat" number="6253" groups="descriptor,file"/>
+  <syscall name="fchownat" number="6254" groups="descriptor,file"/>
+  <syscall name="futimesat" number="6255" groups="descriptor,file"/>
+  <syscall name="newfstatat" number="6256" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="6257" groups="descriptor,file"/>
+  <syscall name="renameat" number="6258" groups="descriptor,file"/>
+  <syscall name="linkat" number="6259" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="6260" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="6261" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="6262" groups="descriptor,file"/>
+  <syscall name="faccessat" number="6263" groups="descriptor,file"/>
+  <syscall name="pselect6" number="6264" groups="descriptor"/>
+  <syscall name="ppoll" number="6265" groups="descriptor"/>
+  <syscall name="unshare" number="6266" groups="process"/>
+  <syscall name="splice" number="6267" groups="descriptor"/>
+  <syscall name="sync_file_range" number="6268" groups="descriptor"/>
+  <syscall name="tee" number="6269" groups="descriptor"/>
+  <syscall name="vmsplice" number="6270" groups="descriptor"/>
+  <syscall name="move_pages" number="6271" groups="memory"/>
   <syscall name="set_robust_list" number="6272"/>
   <syscall name="get_robust_list" number="6273"/>
   <syscall name="kexec_load" number="6274"/>
   <syscall name="getcpu" number="6275"/>
-  <syscall name="epoll_pwait" number="6276"/>
+  <syscall name="epoll_pwait" number="6276" groups="descriptor"/>
   <syscall name="ioprio_set" number="6277"/>
   <syscall name="ioprio_get" number="6278"/>
-  <syscall name="utimensat" number="6279"/>
-  <syscall name="signalfd" number="6280"/>
-  <syscall name="timerfd" number="6281"/>
-  <syscall name="eventfd" number="6282"/>
-  <syscall name="fallocate" number="6283"/>
-  <syscall name="timerfd_create" number="6284"/>
-  <syscall name="timerfd_gettime" number="6285"/>
-  <syscall name="timerfd_settime" number="6286"/>
-  <syscall name="signalfd4" number="6287"/>
-  <syscall name="eventfd2" number="6288"/>
-  <syscall name="epoll_create1" number="6289"/>
-  <syscall name="dup3" number="6290"/>
-  <syscall name="pipe2" number="6291"/>
-  <syscall name="inotify_init1" number="6292"/>
-  <syscall name="preadv" number="6293"/>
-  <syscall name="pwritev" number="6294"/>
-  <syscall name="rt_tgsigqueueinfo" number="6295"/>
-  <syscall name="perf_event_open" number="6296"/>
-  <syscall name="accept4" number="6297"/>
-  <syscall name="recvmmsg" number="6298"/>
-  <syscall name="getdents64" number="6299"/>
-  <syscall name="fanotify_init" number="6300"/>
-  <syscall name="fanotify_mark" number="6301"/>
+  <syscall name="utimensat" number="6279" groups="descriptor,file"/>
+  <syscall name="signalfd" number="6280" groups="descriptor,signal"/>
+  <syscall name="timerfd" number="6281" groups="descriptor"/>
+  <syscall name="eventfd" number="6282" groups="descriptor"/>
+  <syscall name="fallocate" number="6283" groups="descriptor"/>
+  <syscall name="timerfd_create" number="6284" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="6285" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="6286" groups="descriptor"/>
+  <syscall name="signalfd4" number="6287" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="6288" groups="descriptor"/>
+  <syscall name="epoll_create1" number="6289" groups="descriptor"/>
+  <syscall name="dup3" number="6290" groups="descriptor"/>
+  <syscall name="pipe2" number="6291" groups="descriptor"/>
+  <syscall name="inotify_init1" number="6292" groups="descriptor"/>
+  <syscall name="preadv" number="6293" groups="descriptor"/>
+  <syscall name="pwritev" number="6294" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="6295" groups="process,signal"/>
+  <syscall name="perf_event_open" number="6296" groups="descriptor"/>
+  <syscall name="accept4" number="6297" groups="network"/>
+  <syscall name="recvmmsg" number="6298" groups="network"/>
+  <syscall name="getdents64" number="6299" groups="descriptor"/>
+  <syscall name="fanotify_init" number="6300" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="6301" groups="descriptor,file"/>
   <syscall name="prlimit64" number="6302"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n32-linux.xml.in ./gdb/syscalls/mips-n32-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n32-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/mips-n32-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,319 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/mips/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="read" number="6000"/>
+  <syscall name="write" number="6001"/>
+  <syscall name="open" number="6002"/>
+  <syscall name="close" number="6003"/>
+  <syscall name="stat" number="6004"/>
+  <syscall name="fstat" number="6005"/>
+  <syscall name="lstat" number="6006"/>
+  <syscall name="poll" number="6007"/>
+  <syscall name="lseek" number="6008"/>
+  <syscall name="mmap" number="6009"/>
+  <syscall name="mprotect" number="6010"/>
+  <syscall name="munmap" number="6011"/>
+  <syscall name="brk" number="6012"/>
+  <syscall name="rt_sigaction" number="6013"/>
+  <syscall name="rt_sigprocmask" number="6014"/>
+  <syscall name="ioctl" number="6015"/>
+  <syscall name="pread64" number="6016"/>
+  <syscall name="pwrite64" number="6017"/>
+  <syscall name="readv" number="6018"/>
+  <syscall name="writev" number="6019"/>
+  <syscall name="access" number="6020"/>
+  <syscall name="pipe" number="6021"/>
+  <syscall name="_newselect" number="6022"/>
+  <syscall name="sched_yield" number="6023"/>
+  <syscall name="mremap" number="6024"/>
+  <syscall name="msync" number="6025"/>
+  <syscall name="mincore" number="6026"/>
+  <syscall name="madvise" number="6027"/>
+  <syscall name="shmget" number="6028"/>
+  <syscall name="shmat" number="6029"/>
+  <syscall name="shmctl" number="6030"/>
+  <syscall name="dup" number="6031"/>
+  <syscall name="dup2" number="6032"/>
+  <syscall name="pause" number="6033"/>
+  <syscall name="nanosleep" number="6034"/>
+  <syscall name="getitimer" number="6035"/>
+  <syscall name="setitimer" number="6036"/>
+  <syscall name="alarm" number="6037"/>
+  <syscall name="getpid" number="6038"/>
+  <syscall name="sendfile" number="6039"/>
+  <syscall name="socket" number="6040"/>
+  <syscall name="connect" number="6041"/>
+  <syscall name="accept" number="6042"/>
+  <syscall name="sendto" number="6043"/>
+  <syscall name="recvfrom" number="6044"/>
+  <syscall name="sendmsg" number="6045"/>
+  <syscall name="recvmsg" number="6046"/>
+  <syscall name="shutdown" number="6047"/>
+  <syscall name="bind" number="6048"/>
+  <syscall name="listen" number="6049"/>
+  <syscall name="getsockname" number="6050"/>
+  <syscall name="getpeername" number="6051"/>
+  <syscall name="socketpair" number="6052"/>
+  <syscall name="setsockopt" number="6053"/>
+  <syscall name="getsockopt" number="6054"/>
+  <syscall name="clone" number="6055"/>
+  <syscall name="fork" number="6056"/>
+  <syscall name="execve" number="6057"/>
+  <syscall name="exit" number="6058"/>
+  <syscall name="wait4" number="6059"/>
+  <syscall name="kill" number="6060"/>
+  <syscall name="uname" number="6061"/>
+  <syscall name="semget" number="6062"/>
+  <syscall name="semop" number="6063"/>
+  <syscall name="semctl" number="6064"/>
+  <syscall name="shmdt" number="6065"/>
+  <syscall name="msgget" number="6066"/>
+  <syscall name="msgsnd" number="6067"/>
+  <syscall name="msgrcv" number="6068"/>
+  <syscall name="msgctl" number="6069"/>
+  <syscall name="fcntl" number="6070"/>
+  <syscall name="flock" number="6071"/>
+  <syscall name="fsync" number="6072"/>
+  <syscall name="fdatasync" number="6073"/>
+  <syscall name="truncate" number="6074"/>
+  <syscall name="ftruncate" number="6075"/>
+  <syscall name="getdents" number="6076"/>
+  <syscall name="getcwd" number="6077"/>
+  <syscall name="chdir" number="6078"/>
+  <syscall name="fchdir" number="6079"/>
+  <syscall name="rename" number="6080"/>
+  <syscall name="mkdir" number="6081"/>
+  <syscall name="rmdir" number="6082"/>
+  <syscall name="creat" number="6083"/>
+  <syscall name="link" number="6084"/>
+  <syscall name="unlink" number="6085"/>
+  <syscall name="symlink" number="6086"/>
+  <syscall name="readlink" number="6087"/>
+  <syscall name="chmod" number="6088"/>
+  <syscall name="fchmod" number="6089"/>
+  <syscall name="chown" number="6090"/>
+  <syscall name="fchown" number="6091"/>
+  <syscall name="lchown" number="6092"/>
+  <syscall name="umask" number="6093"/>
+  <syscall name="gettimeofday" number="6094"/>
+  <syscall name="getrlimit" number="6095"/>
+  <syscall name="getrusage" number="6096"/>
+  <syscall name="sysinfo" number="6097"/>
+  <syscall name="times" number="6098"/>
+  <syscall name="ptrace" number="6099"/>
+  <syscall name="getuid" number="6100"/>
+  <syscall name="syslog" number="6101"/>
+  <syscall name="getgid" number="6102"/>
+  <syscall name="setuid" number="6103"/>
+  <syscall name="setgid" number="6104"/>
+  <syscall name="geteuid" number="6105"/>
+  <syscall name="getegid" number="6106"/>
+  <syscall name="setpgid" number="6107"/>
+  <syscall name="getppid" number="6108"/>
+  <syscall name="getpgrp" number="6109"/>
+  <syscall name="setsid" number="6110"/>
+  <syscall name="setreuid" number="6111"/>
+  <syscall name="setregid" number="6112"/>
+  <syscall name="getgroups" number="6113"/>
+  <syscall name="setgroups" number="6114"/>
+  <syscall name="setresuid" number="6115"/>
+  <syscall name="getresuid" number="6116"/>
+  <syscall name="setresgid" number="6117"/>
+  <syscall name="getresgid" number="6118"/>
+  <syscall name="getpgid" number="6119"/>
+  <syscall name="setfsuid" number="6120"/>
+  <syscall name="setfsgid" number="6121"/>
+  <syscall name="getsid" number="6122"/>
+  <syscall name="capget" number="6123"/>
+  <syscall name="capset" number="6124"/>
+  <syscall name="rt_sigpending" number="6125"/>
+  <syscall name="rt_sigtimedwait" number="6126"/>
+  <syscall name="rt_sigqueueinfo" number="6127"/>
+  <syscall name="rt_sigsuspend" number="6128"/>
+  <syscall name="sigaltstack" number="6129"/>
+  <syscall name="utime" number="6130"/>
+  <syscall name="mknod" number="6131"/>
+  <syscall name="personality" number="6132"/>
+  <syscall name="ustat" number="6133"/>
+  <syscall name="statfs" number="6134"/>
+  <syscall name="fstatfs" number="6135"/>
+  <syscall name="sysfs" number="6136"/>
+  <syscall name="getpriority" number="6137"/>
+  <syscall name="setpriority" number="6138"/>
+  <syscall name="sched_setparam" number="6139"/>
+  <syscall name="sched_getparam" number="6140"/>
+  <syscall name="sched_setscheduler" number="6141"/>
+  <syscall name="sched_getscheduler" number="6142"/>
+  <syscall name="sched_get_priority_max" number="6143"/>
+  <syscall name="sched_get_priority_min" number="6144"/>
+  <syscall name="sched_rr_get_interval" number="6145"/>
+  <syscall name="mlock" number="6146"/>
+  <syscall name="munlock" number="6147"/>
+  <syscall name="mlockall" number="6148"/>
+  <syscall name="munlockall" number="6149"/>
+  <syscall name="vhangup" number="6150"/>
+  <syscall name="pivot_root" number="6151"/>
+  <syscall name="_sysctl" number="6152"/>
+  <syscall name="prctl" number="6153"/>
+  <syscall name="adjtimex" number="6154"/>
+  <syscall name="setrlimit" number="6155"/>
+  <syscall name="chroot" number="6156"/>
+  <syscall name="sync" number="6157"/>
+  <syscall name="acct" number="6158"/>
+  <syscall name="settimeofday" number="6159"/>
+  <syscall name="mount" number="6160"/>
+  <syscall name="umount2" number="6161"/>
+  <syscall name="swapon" number="6162"/>
+  <syscall name="swapoff" number="6163"/>
+  <syscall name="reboot" number="6164"/>
+  <syscall name="sethostname" number="6165"/>
+  <syscall name="setdomainname" number="6166"/>
+  <syscall name="create_module" number="6167"/>
+  <syscall name="init_module" number="6168"/>
+  <syscall name="delete_module" number="6169"/>
+  <syscall name="get_kernel_syms" number="6170"/>
+  <syscall name="query_module" number="6171"/>
+  <syscall name="quotactl" number="6172"/>
+  <syscall name="nfsservctl" number="6173"/>
+  <syscall name="getpmsg" number="6174"/>
+  <syscall name="putpmsg" number="6175"/>
+  <syscall name="afs_syscall" number="6176"/>
+  <syscall name="reserved177" number="6177"/>
+  <syscall name="gettid" number="6178"/>
+  <syscall name="readahead" number="6179"/>
+  <syscall name="setxattr" number="6180"/>
+  <syscall name="lsetxattr" number="6181"/>
+  <syscall name="fsetxattr" number="6182"/>
+  <syscall name="getxattr" number="6183"/>
+  <syscall name="lgetxattr" number="6184"/>
+  <syscall name="fgetxattr" number="6185"/>
+  <syscall name="listxattr" number="6186"/>
+  <syscall name="llistxattr" number="6187"/>
+  <syscall name="flistxattr" number="6188"/>
+  <syscall name="removexattr" number="6189"/>
+  <syscall name="lremovexattr" number="6190"/>
+  <syscall name="fremovexattr" number="6191"/>
+  <syscall name="tkill" number="6192"/>
+  <syscall name="reserved193" number="6193"/>
+  <syscall name="futex" number="6194"/>
+  <syscall name="sched_setaffinity" number="6195"/>
+  <syscall name="sched_getaffinity" number="6196"/>
+  <syscall name="cacheflush" number="6197"/>
+  <syscall name="cachectl" number="6198"/>
+  <syscall name="sysmips" number="6199"/>
+  <syscall name="io_setup" number="6200"/>
+  <syscall name="io_destroy" number="6201"/>
+  <syscall name="io_getevents" number="6202"/>
+  <syscall name="io_submit" number="6203"/>
+  <syscall name="io_cancel" number="6204"/>
+  <syscall name="exit_group" number="6205"/>
+  <syscall name="lookup_dcookie" number="6206"/>
+  <syscall name="epoll_create" number="6207"/>
+  <syscall name="epoll_ctl" number="6208"/>
+  <syscall name="epoll_wait" number="6209"/>
+  <syscall name="remap_file_pages" number="6210"/>
+  <syscall name="rt_sigreturn" number="6211"/>
+  <syscall name="fcntl64" number="6212"/>
+  <syscall name="set_tid_address" number="6213"/>
+  <syscall name="restart_syscall" number="6214"/>
+  <syscall name="semtimedop" number="6215"/>
+  <syscall name="fadvise64" number="6216"/>
+  <syscall name="statfs64" number="6217"/>
+  <syscall name="fstatfs64" number="6218"/>
+  <syscall name="sendfile64" number="6219"/>
+  <syscall name="timer_create" number="6220"/>
+  <syscall name="timer_settime" number="6221"/>
+  <syscall name="timer_gettime" number="6222"/>
+  <syscall name="timer_getoverrun" number="6223"/>
+  <syscall name="timer_delete" number="6224"/>
+  <syscall name="clock_settime" number="6225"/>
+  <syscall name="clock_gettime" number="6226"/>
+  <syscall name="clock_getres" number="6227"/>
+  <syscall name="clock_nanosleep" number="6228"/>
+  <syscall name="tgkill" number="6229"/>
+  <syscall name="utimes" number="6230"/>
+  <syscall name="mbind" number="6231"/>
+  <syscall name="get_mempolicy" number="6232"/>
+  <syscall name="set_mempolicy" number="6233"/>
+  <syscall name="mq_open" number="6234"/>
+  <syscall name="mq_unlink" number="6235"/>
+  <syscall name="mq_timedsend" number="6236"/>
+  <syscall name="mq_timedreceive" number="6237"/>
+  <syscall name="mq_notify" number="6238"/>
+  <syscall name="mq_getsetattr" number="6239"/>
+  <syscall name="vserver" number="6240"/>
+  <syscall name="waitid" number="6241"/>
+  <syscall name="add_key" number="6243"/>
+  <syscall name="request_key" number="6244"/>
+  <syscall name="keyctl" number="6245"/>
+  <syscall name="set_thread_area" number="6246"/>
+  <syscall name="inotify_init" number="6247"/>
+  <syscall name="inotify_add_watch" number="6248"/>
+  <syscall name="inotify_rm_watch" number="6249"/>
+  <syscall name="migrate_pages" number="6250"/>
+  <syscall name="openat" number="6251"/>
+  <syscall name="mkdirat" number="6252"/>
+  <syscall name="mknodat" number="6253"/>
+  <syscall name="fchownat" number="6254"/>
+  <syscall name="futimesat" number="6255"/>
+  <syscall name="newfstatat" number="6256"/>
+  <syscall name="unlinkat" number="6257"/>
+  <syscall name="renameat" number="6258"/>
+  <syscall name="linkat" number="6259"/>
+  <syscall name="symlinkat" number="6260"/>
+  <syscall name="readlinkat" number="6261"/>
+  <syscall name="fchmodat" number="6262"/>
+  <syscall name="faccessat" number="6263"/>
+  <syscall name="pselect6" number="6264"/>
+  <syscall name="ppoll" number="6265"/>
+  <syscall name="unshare" number="6266"/>
+  <syscall name="splice" number="6267"/>
+  <syscall name="sync_file_range" number="6268"/>
+  <syscall name="tee" number="6269"/>
+  <syscall name="vmsplice" number="6270"/>
+  <syscall name="move_pages" number="6271"/>
+  <syscall name="set_robust_list" number="6272"/>
+  <syscall name="get_robust_list" number="6273"/>
+  <syscall name="kexec_load" number="6274"/>
+  <syscall name="getcpu" number="6275"/>
+  <syscall name="epoll_pwait" number="6276"/>
+  <syscall name="ioprio_set" number="6277"/>
+  <syscall name="ioprio_get" number="6278"/>
+  <syscall name="utimensat" number="6279"/>
+  <syscall name="signalfd" number="6280"/>
+  <syscall name="timerfd" number="6281"/>
+  <syscall name="eventfd" number="6282"/>
+  <syscall name="fallocate" number="6283"/>
+  <syscall name="timerfd_create" number="6284"/>
+  <syscall name="timerfd_gettime" number="6285"/>
+  <syscall name="timerfd_settime" number="6286"/>
+  <syscall name="signalfd4" number="6287"/>
+  <syscall name="eventfd2" number="6288"/>
+  <syscall name="epoll_create1" number="6289"/>
+  <syscall name="dup3" number="6290"/>
+  <syscall name="pipe2" number="6291"/>
+  <syscall name="inotify_init1" number="6292"/>
+  <syscall name="preadv" number="6293"/>
+  <syscall name="pwritev" number="6294"/>
+  <syscall name="rt_tgsigqueueinfo" number="6295"/>
+  <syscall name="perf_event_open" number="6296"/>
+  <syscall name="accept4" number="6297"/>
+  <syscall name="recvmmsg" number="6298"/>
+  <syscall name="getdents64" number="6299"/>
+  <syscall name="fanotify_init" number="6300"/>
+  <syscall name="fanotify_mark" number="6301"/>
+  <syscall name="prlimit64" number="6302"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n64-linux.xml ./gdb/syscalls/mips-n64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/mips-n64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,112 +1,109 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2011-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/mips/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
-  <syscall name="read" number="5000"/>
-  <syscall name="write" number="5001"/>
-  <syscall name="open" number="5002"/>
-  <syscall name="close" number="5003"/>
-  <syscall name="stat" number="5004"/>
-  <syscall name="fstat" number="5005"/>
-  <syscall name="lstat" number="5006"/>
-  <syscall name="poll" number="5007"/>
-  <syscall name="lseek" number="5008"/>
-  <syscall name="mmap" number="5009"/>
-  <syscall name="mprotect" number="5010"/>
-  <syscall name="munmap" number="5011"/>
-  <syscall name="brk" number="5012"/>
-  <syscall name="rt_sigaction" number="5013"/>
-  <syscall name="rt_sigprocmask" number="5014"/>
-  <syscall name="ioctl" number="5015"/>
-  <syscall name="pread64" number="5016"/>
-  <syscall name="pwrite64" number="5017"/>
-  <syscall name="readv" number="5018"/>
-  <syscall name="writev" number="5019"/>
-  <syscall name="access" number="5020"/>
-  <syscall name="pipe" number="5021"/>
-  <syscall name="_newselect" number="5022"/>
+  <syscall name="read" number="5000" groups="descriptor"/>
+  <syscall name="write" number="5001" groups="descriptor"/>
+  <syscall name="open" number="5002" groups="descriptor,file"/>
+  <syscall name="close" number="5003" groups="descriptor"/>
+  <syscall name="stat" number="5004" groups="file"/>
+  <syscall name="fstat" number="5005" groups="descriptor"/>
+  <syscall name="lstat" number="5006" groups="file"/>
+  <syscall name="poll" number="5007" groups="descriptor"/>
+  <syscall name="lseek" number="5008" groups="descriptor"/>
+  <syscall name="mmap" number="5009" groups="descriptor,memory"/>
+  <syscall name="mprotect" number="5010" groups="memory"/>
+  <syscall name="munmap" number="5011" groups="memory"/>
+  <syscall name="brk" number="5012" groups="memory"/>
+  <syscall name="rt_sigaction" number="5013" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="5014" groups="signal"/>
+  <syscall name="ioctl" number="5015" groups="descriptor"/>
+  <syscall name="pread64" number="5016" groups="descriptor"/>
+  <syscall name="pwrite64" number="5017" groups="descriptor"/>
+  <syscall name="readv" number="5018" groups="descriptor"/>
+  <syscall name="writev" number="5019" groups="descriptor"/>
+  <syscall name="access" number="5020" groups="file"/>
+  <syscall name="pipe" number="5021" groups="descriptor"/>
+  <syscall name="_newselect" number="5022" groups="descriptor"/>
   <syscall name="sched_yield" number="5023"/>
-  <syscall name="mremap" number="5024"/>
-  <syscall name="msync" number="5025"/>
-  <syscall name="mincore" number="5026"/>
-  <syscall name="madvise" number="5027"/>
-  <syscall name="shmget" number="5028"/>
-  <syscall name="shmat" number="5029"/>
-  <syscall name="shmctl" number="5030"/>
-  <syscall name="dup" number="5031"/>
-  <syscall name="dup2" number="5032"/>
-  <syscall name="pause" number="5033"/>
+  <syscall name="mremap" number="5024" groups="memory"/>
+  <syscall name="msync" number="5025" groups="memory"/>
+  <syscall name="mincore" number="5026" groups="memory"/>
+  <syscall name="madvise" number="5027" groups="memory"/>
+  <syscall name="shmget" number="5028" groups="ipc"/>
+  <syscall name="shmat" number="5029" groups="ipc,memory"/>
+  <syscall name="shmctl" number="5030" groups="ipc"/>
+  <syscall name="dup" number="5031" groups="descriptor"/>
+  <syscall name="dup2" number="5032" groups="descriptor"/>
+  <syscall name="pause" number="5033" groups="signal"/>
   <syscall name="nanosleep" number="5034"/>
   <syscall name="getitimer" number="5035"/>
   <syscall name="setitimer" number="5036"/>
   <syscall name="alarm" number="5037"/>
   <syscall name="getpid" number="5038"/>
-  <syscall name="sendfile" number="5039"/>
-  <syscall name="socket" number="5040"/>
-  <syscall name="connect" number="5041"/>
-  <syscall name="accept" number="5042"/>
-  <syscall name="sendto" number="5043"/>
-  <syscall name="recvfrom" number="5044"/>
-  <syscall name="sendmsg" number="5045"/>
-  <syscall name="recvmsg" number="5046"/>
-  <syscall name="shutdown" number="5047"/>
-  <syscall name="bind" number="5048"/>
-  <syscall name="listen" number="5049"/>
-  <syscall name="getsockname" number="5050"/>
-  <syscall name="getpeername" number="5051"/>
-  <syscall name="socketpair" number="5052"/>
-  <syscall name="setsockopt" number="5053"/>
-  <syscall name="getsockopt" number="5054"/>
-  <syscall name="clone" number="5055"/>
-  <syscall name="fork" number="5056"/>
-  <syscall name="execve" number="5057"/>
-  <syscall name="exit" number="5058"/>
-  <syscall name="wait4" number="5059"/>
-  <syscall name="kill" number="5060"/>
+  <syscall name="sendfile" number="5039" groups="descriptor,network"/>
+  <syscall name="socket" number="5040" groups="network"/>
+  <syscall name="connect" number="5041" groups="network"/>
+  <syscall name="accept" number="5042" groups="network"/>
+  <syscall name="sendto" number="5043" groups="network"/>
+  <syscall name="recvfrom" number="5044" groups="network"/>
+  <syscall name="sendmsg" number="5045" groups="network"/>
+  <syscall name="recvmsg" number="5046" groups="network"/>
+  <syscall name="shutdown" number="5047" groups="network"/>
+  <syscall name="bind" number="5048" groups="network"/>
+  <syscall name="listen" number="5049" groups="network"/>
+  <syscall name="getsockname" number="5050" groups="network"/>
+  <syscall name="getpeername" number="5051" groups="network"/>
+  <syscall name="socketpair" number="5052" groups="network"/>
+  <syscall name="setsockopt" number="5053" groups="network"/>
+  <syscall name="getsockopt" number="5054" groups="network"/>
+  <syscall name="clone" number="5055" groups="process"/>
+  <syscall name="fork" number="5056" groups="process"/>
+  <syscall name="execve" number="5057" groups="file,process"/>
+  <syscall name="exit" number="5058" groups="process"/>
+  <syscall name="wait4" number="5059" groups="process"/>
+  <syscall name="kill" number="5060" groups="signal"/>
   <syscall name="uname" number="5061"/>
-  <syscall name="semget" number="5062"/>
-  <syscall name="semop" number="5063"/>
-  <syscall name="semctl" number="5064"/>
-  <syscall name="shmdt" number="5065"/>
-  <syscall name="msgget" number="5066"/>
-  <syscall name="msgsnd" number="5067"/>
-  <syscall name="msgrcv" number="5068"/>
-  <syscall name="msgctl" number="5069"/>
-  <syscall name="fcntl" number="5070"/>
-  <syscall name="flock" number="5071"/>
-  <syscall name="fsync" number="5072"/>
-  <syscall name="fdatasync" number="5073"/>
-  <syscall name="truncate" number="5074"/>
-  <syscall name="ftruncate" number="5075"/>
-  <syscall name="getdents" number="5076"/>
-  <syscall name="getcwd" number="5077"/>
-  <syscall name="chdir" number="5078"/>
-  <syscall name="fchdir" number="5079"/>
-  <syscall name="rename" number="5080"/>
-  <syscall name="mkdir" number="5081"/>
-  <syscall name="rmdir" number="5082"/>
-  <syscall name="creat" number="5083"/>
-  <syscall name="link" number="5084"/>
-  <syscall name="unlink" number="5085"/>
-  <syscall name="symlink" number="5086"/>
-  <syscall name="readlink" number="5087"/>
-  <syscall name="chmod" number="5088"/>
-  <syscall name="fchmod" number="5089"/>
-  <syscall name="chown" number="5090"/>
-  <syscall name="fchown" number="5091"/>
-  <syscall name="lchown" number="5092"/>
+  <syscall name="semget" number="5062" groups="ipc"/>
+  <syscall name="semop" number="5063" groups="ipc"/>
+  <syscall name="semctl" number="5064" groups="ipc"/>
+  <syscall name="shmdt" number="5065" groups="ipc,memory"/>
+  <syscall name="msgget" number="5066" groups="ipc"/>
+  <syscall name="msgsnd" number="5067" groups="ipc"/>
+  <syscall name="msgrcv" number="5068" groups="ipc"/>
+  <syscall name="msgctl" number="5069" groups="ipc"/>
+  <syscall name="fcntl" number="5070" groups="descriptor"/>
+  <syscall name="flock" number="5071" groups="descriptor"/>
+  <syscall name="fsync" number="5072" groups="descriptor"/>
+  <syscall name="fdatasync" number="5073" groups="descriptor"/>
+  <syscall name="truncate" number="5074" groups="file"/>
+  <syscall name="ftruncate" number="5075" groups="descriptor"/>
+  <syscall name="getdents" number="5076" groups="descriptor"/>
+  <syscall name="getcwd" number="5077" groups="file"/>
+  <syscall name="chdir" number="5078" groups="file"/>
+  <syscall name="fchdir" number="5079" groups="descriptor"/>
+  <syscall name="rename" number="5080" groups="file"/>
+  <syscall name="mkdir" number="5081" groups="file"/>
+  <syscall name="rmdir" number="5082" groups="file"/>
+  <syscall name="creat" number="5083" groups="descriptor,file"/>
+  <syscall name="link" number="5084" groups="file"/>
+  <syscall name="unlink" number="5085" groups="file"/>
+  <syscall name="symlink" number="5086" groups="file"/>
+  <syscall name="readlink" number="5087" groups="file"/>
+  <syscall name="chmod" number="5088" groups="file"/>
+  <syscall name="fchmod" number="5089" groups="descriptor"/>
+  <syscall name="chown" number="5090" groups="file"/>
+  <syscall name="fchown" number="5091" groups="descriptor"/>
+  <syscall name="lchown" number="5092" groups="file"/>
   <syscall name="umask" number="5093"/>
   <syscall name="gettimeofday" number="5094"/>
   <syscall name="getrlimit" number="5095"/>
@@ -139,17 +136,17 @@
   <syscall name="getsid" number="5122"/>
   <syscall name="capget" number="5123"/>
   <syscall name="capset" number="5124"/>
-  <syscall name="rt_sigpending" number="5125"/>
-  <syscall name="rt_sigtimedwait" number="5126"/>
-  <syscall name="rt_sigqueueinfo" number="5127"/>
-  <syscall name="rt_sigsuspend" number="5128"/>
-  <syscall name="sigaltstack" number="5129"/>
-  <syscall name="utime" number="5130"/>
-  <syscall name="mknod" number="5131"/>
+  <syscall name="rt_sigpending" number="5125" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="5126" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="5127" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="5128" groups="signal"/>
+  <syscall name="sigaltstack" number="5129" groups="signal"/>
+  <syscall name="utime" number="5130" groups="file"/>
+  <syscall name="mknod" number="5131" groups="file"/>
   <syscall name="personality" number="5132"/>
   <syscall name="ustat" number="5133"/>
-  <syscall name="statfs" number="5134"/>
-  <syscall name="fstatfs" number="5135"/>
+  <syscall name="statfs" number="5134" groups="file"/>
+  <syscall name="fstatfs" number="5135" groups="descriptor"/>
   <syscall name="sysfs" number="5136"/>
   <syscall name="getpriority" number="5137"/>
   <syscall name="setpriority" number="5138"/>
@@ -160,24 +157,24 @@
   <syscall name="sched_get_priority_max" number="5143"/>
   <syscall name="sched_get_priority_min" number="5144"/>
   <syscall name="sched_rr_get_interval" number="5145"/>
-  <syscall name="mlock" number="5146"/>
-  <syscall name="munlock" number="5147"/>
-  <syscall name="mlockall" number="5148"/>
-  <syscall name="munlockall" number="5149"/>
+  <syscall name="mlock" number="5146" groups="memory"/>
+  <syscall name="munlock" number="5147" groups="memory"/>
+  <syscall name="mlockall" number="5148" groups="memory"/>
+  <syscall name="munlockall" number="5149" groups="memory"/>
   <syscall name="vhangup" number="5150"/>
-  <syscall name="pivot_root" number="5151"/>
+  <syscall name="pivot_root" number="5151" groups="file"/>
   <syscall name="_sysctl" number="5152"/>
   <syscall name="prctl" number="5153"/>
   <syscall name="adjtimex" number="5154"/>
   <syscall name="setrlimit" number="5155"/>
-  <syscall name="chroot" number="5156"/>
+  <syscall name="chroot" number="5156" groups="file"/>
   <syscall name="sync" number="5157"/>
-  <syscall name="acct" number="5158"/>
+  <syscall name="acct" number="5158" groups="file"/>
   <syscall name="settimeofday" number="5159"/>
-  <syscall name="mount" number="5160"/>
-  <syscall name="umount2" number="5161"/>
-  <syscall name="swapon" number="5162"/>
-  <syscall name="swapoff" number="5163"/>
+  <syscall name="mount" number="5160" groups="file"/>
+  <syscall name="umount2" number="5161" groups="file"/>
+  <syscall name="swapon" number="5162" groups="file"/>
+  <syscall name="swapoff" number="5163" groups="file"/>
   <syscall name="reboot" number="5164"/>
   <syscall name="sethostname" number="5165"/>
   <syscall name="setdomainname" number="5166"/>
@@ -186,26 +183,26 @@
   <syscall name="delete_module" number="5169"/>
   <syscall name="get_kernel_syms" number="5170"/>
   <syscall name="query_module" number="5171"/>
-  <syscall name="quotactl" number="5172"/>
+  <syscall name="quotactl" number="5172" groups="file"/>
   <syscall name="nfsservctl" number="5173"/>
   <syscall name="getpmsg" number="5174"/>
   <syscall name="putpmsg" number="5175"/>
   <syscall name="afs_syscall" number="5176"/>
   <syscall name="gettid" number="5178"/>
-  <syscall name="readahead" number="5179"/>
-  <syscall name="setxattr" number="5180"/>
-  <syscall name="lsetxattr" number="5181"/>
-  <syscall name="fsetxattr" number="5182"/>
-  <syscall name="getxattr" number="5183"/>
-  <syscall name="lgetxattr" number="5184"/>
-  <syscall name="fgetxattr" number="5185"/>
-  <syscall name="listxattr" number="5186"/>
-  <syscall name="llistxattr" number="5187"/>
-  <syscall name="flistxattr" number="5188"/>
-  <syscall name="removexattr" number="5189"/>
-  <syscall name="lremovexattr" number="5190"/>
-  <syscall name="fremovexattr" number="5191"/>
-  <syscall name="tkill" number="5192"/>
+  <syscall name="readahead" number="5179" groups="descriptor"/>
+  <syscall name="setxattr" number="5180" groups="file"/>
+  <syscall name="lsetxattr" number="5181" groups="file"/>
+  <syscall name="fsetxattr" number="5182" groups="descriptor"/>
+  <syscall name="getxattr" number="5183" groups="file"/>
+  <syscall name="lgetxattr" number="5184" groups="file"/>
+  <syscall name="fgetxattr" number="5185" groups="descriptor"/>
+  <syscall name="listxattr" number="5186" groups="file"/>
+  <syscall name="llistxattr" number="5187" groups="file"/>
+  <syscall name="flistxattr" number="5188" groups="descriptor"/>
+  <syscall name="removexattr" number="5189" groups="file"/>
+  <syscall name="lremovexattr" number="5190" groups="file"/>
+  <syscall name="fremovexattr" number="5191" groups="descriptor"/>
+  <syscall name="tkill" number="5192" groups="signal"/>
   <syscall name="futex" number="5194"/>
   <syscall name="sched_setaffinity" number="5195"/>
   <syscall name="sched_getaffinity" number="5196"/>
@@ -217,17 +214,17 @@
   <syscall name="io_getevents" number="5202"/>
   <syscall name="io_submit" number="5203"/>
   <syscall name="io_cancel" number="5204"/>
-  <syscall name="exit_group" number="5205"/>
+  <syscall name="exit_group" number="5205" groups="process"/>
   <syscall name="lookup_dcookie" number="5206"/>
-  <syscall name="epoll_create" number="5207"/>
-  <syscall name="epoll_ctl" number="5208"/>
-  <syscall name="epoll_wait" number="5209"/>
-  <syscall name="remap_file_pages" number="5210"/>
-  <syscall name="rt_sigreturn" number="5211"/>
+  <syscall name="epoll_create" number="5207" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="5208" groups="descriptor"/>
+  <syscall name="epoll_wait" number="5209" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="5210" groups="memory"/>
+  <syscall name="rt_sigreturn" number="5211" groups="signal"/>
   <syscall name="set_tid_address" number="5212"/>
   <syscall name="restart_syscall" number="5213"/>
-  <syscall name="semtimedop" number="5214"/>
-  <syscall name="fadvise64" number="5215"/>
+  <syscall name="semtimedop" number="5214" groups="ipc"/>
+  <syscall name="fadvise64" number="5215" groups="descriptor"/>
   <syscall name="timer_create" number="5216"/>
   <syscall name="timer_settime" number="5217"/>
   <syscall name="timer_gettime" number="5218"/>
@@ -237,11 +234,11 @@
   <syscall name="clock_gettime" number="5222"/>
   <syscall name="clock_getres" number="5223"/>
   <syscall name="clock_nanosleep" number="5224"/>
-  <syscall name="tgkill" number="5225"/>
-  <syscall name="utimes" number="5226"/>
-  <syscall name="mbind" number="5227"/>
-  <syscall name="get_mempolicy" number="5228"/>
-  <syscall name="set_mempolicy" number="5229"/>
+  <syscall name="tgkill" number="5225" groups="signal"/>
+  <syscall name="utimes" number="5226" groups="file"/>
+  <syscall name="mbind" number="5227" groups="memory"/>
+  <syscall name="get_mempolicy" number="5228" groups="memory"/>
+  <syscall name="set_mempolicy" number="5229" groups="memory"/>
   <syscall name="mq_open" number="5230"/>
   <syscall name="mq_unlink" number="5231"/>
   <syscall name="mq_timedsend" number="5232"/>
@@ -249,64 +246,64 @@
   <syscall name="mq_notify" number="5234"/>
   <syscall name="mq_getsetattr" number="5235"/>
   <syscall name="vserver" number="5236"/>
-  <syscall name="waitid" number="5237"/>
+  <syscall name="waitid" number="5237" groups="process"/>
   <syscall name="add_key" number="5239"/>
   <syscall name="request_key" number="5240"/>
   <syscall name="keyctl" number="5241"/>
   <syscall name="set_thread_area" number="5242"/>
-  <syscall name="inotify_init" number="5243"/>
-  <syscall name="inotify_add_watch" number="5244"/>
-  <syscall name="inotify_rm_watch" number="5245"/>
-  <syscall name="migrate_pages" number="5246"/>
-  <syscall name="openat" number="5247"/>
-  <syscall name="mkdirat" number="5248"/>
-  <syscall name="mknodat" number="5249"/>
-  <syscall name="fchownat" number="5250"/>
-  <syscall name="futimesat" number="5251"/>
-  <syscall name="newfstatat" number="5252"/>
-  <syscall name="unlinkat" number="5253"/>
-  <syscall name="renameat" number="5254"/>
-  <syscall name="linkat" number="5255"/>
-  <syscall name="symlinkat" number="5256"/>
-  <syscall name="readlinkat" number="5257"/>
-  <syscall name="fchmodat" number="5258"/>
-  <syscall name="faccessat" number="5259"/>
-  <syscall name="pselect6" number="5260"/>
-  <syscall name="ppoll" number="5261"/>
-  <syscall name="unshare" number="5262"/>
-  <syscall name="splice" number="5263"/>
-  <syscall name="sync_file_range" number="5264"/>
-  <syscall name="tee" number="5265"/>
-  <syscall name="vmsplice" number="5266"/>
-  <syscall name="move_pages" number="5267"/>
+  <syscall name="inotify_init" number="5243" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="5244" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="5245" groups="descriptor"/>
+  <syscall name="migrate_pages" number="5246" groups="memory"/>
+  <syscall name="openat" number="5247" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="5248" groups="descriptor,file"/>
+  <syscall name="mknodat" number="5249" groups="descriptor,file"/>
+  <syscall name="fchownat" number="5250" groups="descriptor,file"/>
+  <syscall name="futimesat" number="5251" groups="descriptor,file"/>
+  <syscall name="newfstatat" number="5252" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="5253" groups="descriptor,file"/>
+  <syscall name="renameat" number="5254" groups="descriptor,file"/>
+  <syscall name="linkat" number="5255" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="5256" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="5257" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="5258" groups="descriptor,file"/>
+  <syscall name="faccessat" number="5259" groups="descriptor,file"/>
+  <syscall name="pselect6" number="5260" groups="descriptor"/>
+  <syscall name="ppoll" number="5261" groups="descriptor"/>
+  <syscall name="unshare" number="5262" groups="process"/>
+  <syscall name="splice" number="5263" groups="descriptor"/>
+  <syscall name="sync_file_range" number="5264" groups="descriptor"/>
+  <syscall name="tee" number="5265" groups="descriptor"/>
+  <syscall name="vmsplice" number="5266" groups="descriptor"/>
+  <syscall name="move_pages" number="5267" groups="memory"/>
   <syscall name="set_robust_list" number="5268"/>
   <syscall name="get_robust_list" number="5269"/>
   <syscall name="kexec_load" number="5270"/>
   <syscall name="getcpu" number="5271"/>
-  <syscall name="epoll_pwait" number="5272"/>
+  <syscall name="epoll_pwait" number="5272" groups="descriptor"/>
   <syscall name="ioprio_set" number="5273"/>
   <syscall name="ioprio_get" number="5274"/>
-  <syscall name="utimensat" number="5275"/>
-  <syscall name="signalfd" number="5276"/>
-  <syscall name="timerfd" number="5277"/>
-  <syscall name="eventfd" number="5278"/>
-  <syscall name="fallocate" number="5279"/>
-  <syscall name="timerfd_create" number="5280"/>
-  <syscall name="timerfd_gettime" number="5281"/>
-  <syscall name="timerfd_settime" number="5282"/>
-  <syscall name="signalfd4" number="5283"/>
-  <syscall name="eventfd2" number="5284"/>
-  <syscall name="epoll_create1" number="5285"/>
-  <syscall name="dup3" number="5286"/>
-  <syscall name="pipe2" number="5287"/>
-  <syscall name="inotify_init1" number="5288"/>
-  <syscall name="preadv" number="5289"/>
-  <syscall name="pwritev" number="5290"/>
-  <syscall name="rt_tgsigqueueinfo" number="5291"/>
-  <syscall name="perf_event_open" number="5292"/>
-  <syscall name="accept4" number="5293"/>
-  <syscall name="recvmmsg" number="5294"/>
-  <syscall name="fanotify_init" number="5295"/>
-  <syscall name="fanotify_mark" number="5296"/>
+  <syscall name="utimensat" number="5275" groups="descriptor,file"/>
+  <syscall name="signalfd" number="5276" groups="descriptor,signal"/>
+  <syscall name="timerfd" number="5277" groups="descriptor"/>
+  <syscall name="eventfd" number="5278" groups="descriptor"/>
+  <syscall name="fallocate" number="5279" groups="descriptor"/>
+  <syscall name="timerfd_create" number="5280" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="5281" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="5282" groups="descriptor"/>
+  <syscall name="signalfd4" number="5283" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="5284" groups="descriptor"/>
+  <syscall name="epoll_create1" number="5285" groups="descriptor"/>
+  <syscall name="dup3" number="5286" groups="descriptor"/>
+  <syscall name="pipe2" number="5287" groups="descriptor"/>
+  <syscall name="inotify_init1" number="5288" groups="descriptor"/>
+  <syscall name="preadv" number="5289" groups="descriptor"/>
+  <syscall name="pwritev" number="5290" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="5291" groups="process,signal"/>
+  <syscall name="perf_event_open" number="5292" groups="descriptor"/>
+  <syscall name="accept4" number="5293" groups="network"/>
+  <syscall name="recvmmsg" number="5294" groups="network"/>
+  <syscall name="fanotify_init" number="5295" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="5296" groups="descriptor,file"/>
   <syscall name="prlimit64" number="5297"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n64-linux.xml.in ./gdb/syscalls/mips-n64-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-n64-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/mips-n64-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,312 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/mips/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="read" number="5000"/>
+  <syscall name="write" number="5001"/>
+  <syscall name="open" number="5002"/>
+  <syscall name="close" number="5003"/>
+  <syscall name="stat" number="5004"/>
+  <syscall name="fstat" number="5005"/>
+  <syscall name="lstat" number="5006"/>
+  <syscall name="poll" number="5007"/>
+  <syscall name="lseek" number="5008"/>
+  <syscall name="mmap" number="5009"/>
+  <syscall name="mprotect" number="5010"/>
+  <syscall name="munmap" number="5011"/>
+  <syscall name="brk" number="5012"/>
+  <syscall name="rt_sigaction" number="5013"/>
+  <syscall name="rt_sigprocmask" number="5014"/>
+  <syscall name="ioctl" number="5015"/>
+  <syscall name="pread64" number="5016"/>
+  <syscall name="pwrite64" number="5017"/>
+  <syscall name="readv" number="5018"/>
+  <syscall name="writev" number="5019"/>
+  <syscall name="access" number="5020"/>
+  <syscall name="pipe" number="5021"/>
+  <syscall name="_newselect" number="5022"/>
+  <syscall name="sched_yield" number="5023"/>
+  <syscall name="mremap" number="5024"/>
+  <syscall name="msync" number="5025"/>
+  <syscall name="mincore" number="5026"/>
+  <syscall name="madvise" number="5027"/>
+  <syscall name="shmget" number="5028"/>
+  <syscall name="shmat" number="5029"/>
+  <syscall name="shmctl" number="5030"/>
+  <syscall name="dup" number="5031"/>
+  <syscall name="dup2" number="5032"/>
+  <syscall name="pause" number="5033"/>
+  <syscall name="nanosleep" number="5034"/>
+  <syscall name="getitimer" number="5035"/>
+  <syscall name="setitimer" number="5036"/>
+  <syscall name="alarm" number="5037"/>
+  <syscall name="getpid" number="5038"/>
+  <syscall name="sendfile" number="5039"/>
+  <syscall name="socket" number="5040"/>
+  <syscall name="connect" number="5041"/>
+  <syscall name="accept" number="5042"/>
+  <syscall name="sendto" number="5043"/>
+  <syscall name="recvfrom" number="5044"/>
+  <syscall name="sendmsg" number="5045"/>
+  <syscall name="recvmsg" number="5046"/>
+  <syscall name="shutdown" number="5047"/>
+  <syscall name="bind" number="5048"/>
+  <syscall name="listen" number="5049"/>
+  <syscall name="getsockname" number="5050"/>
+  <syscall name="getpeername" number="5051"/>
+  <syscall name="socketpair" number="5052"/>
+  <syscall name="setsockopt" number="5053"/>
+  <syscall name="getsockopt" number="5054"/>
+  <syscall name="clone" number="5055"/>
+  <syscall name="fork" number="5056"/>
+  <syscall name="execve" number="5057"/>
+  <syscall name="exit" number="5058"/>
+  <syscall name="wait4" number="5059"/>
+  <syscall name="kill" number="5060"/>
+  <syscall name="uname" number="5061"/>
+  <syscall name="semget" number="5062"/>
+  <syscall name="semop" number="5063"/>
+  <syscall name="semctl" number="5064"/>
+  <syscall name="shmdt" number="5065"/>
+  <syscall name="msgget" number="5066"/>
+  <syscall name="msgsnd" number="5067"/>
+  <syscall name="msgrcv" number="5068"/>
+  <syscall name="msgctl" number="5069"/>
+  <syscall name="fcntl" number="5070"/>
+  <syscall name="flock" number="5071"/>
+  <syscall name="fsync" number="5072"/>
+  <syscall name="fdatasync" number="5073"/>
+  <syscall name="truncate" number="5074"/>
+  <syscall name="ftruncate" number="5075"/>
+  <syscall name="getdents" number="5076"/>
+  <syscall name="getcwd" number="5077"/>
+  <syscall name="chdir" number="5078"/>
+  <syscall name="fchdir" number="5079"/>
+  <syscall name="rename" number="5080"/>
+  <syscall name="mkdir" number="5081"/>
+  <syscall name="rmdir" number="5082"/>
+  <syscall name="creat" number="5083"/>
+  <syscall name="link" number="5084"/>
+  <syscall name="unlink" number="5085"/>
+  <syscall name="symlink" number="5086"/>
+  <syscall name="readlink" number="5087"/>
+  <syscall name="chmod" number="5088"/>
+  <syscall name="fchmod" number="5089"/>
+  <syscall name="chown" number="5090"/>
+  <syscall name="fchown" number="5091"/>
+  <syscall name="lchown" number="5092"/>
+  <syscall name="umask" number="5093"/>
+  <syscall name="gettimeofday" number="5094"/>
+  <syscall name="getrlimit" number="5095"/>
+  <syscall name="getrusage" number="5096"/>
+  <syscall name="sysinfo" number="5097"/>
+  <syscall name="times" number="5098"/>
+  <syscall name="ptrace" number="5099"/>
+  <syscall name="getuid" number="5100"/>
+  <syscall name="syslog" number="5101"/>
+  <syscall name="getgid" number="5102"/>
+  <syscall name="setuid" number="5103"/>
+  <syscall name="setgid" number="5104"/>
+  <syscall name="geteuid" number="5105"/>
+  <syscall name="getegid" number="5106"/>
+  <syscall name="setpgid" number="5107"/>
+  <syscall name="getppid" number="5108"/>
+  <syscall name="getpgrp" number="5109"/>
+  <syscall name="setsid" number="5110"/>
+  <syscall name="setreuid" number="5111"/>
+  <syscall name="setregid" number="5112"/>
+  <syscall name="getgroups" number="5113"/>
+  <syscall name="setgroups" number="5114"/>
+  <syscall name="setresuid" number="5115"/>
+  <syscall name="getresuid" number="5116"/>
+  <syscall name="setresgid" number="5117"/>
+  <syscall name="getresgid" number="5118"/>
+  <syscall name="getpgid" number="5119"/>
+  <syscall name="setfsuid" number="5120"/>
+  <syscall name="setfsgid" number="5121"/>
+  <syscall name="getsid" number="5122"/>
+  <syscall name="capget" number="5123"/>
+  <syscall name="capset" number="5124"/>
+  <syscall name="rt_sigpending" number="5125"/>
+  <syscall name="rt_sigtimedwait" number="5126"/>
+  <syscall name="rt_sigqueueinfo" number="5127"/>
+  <syscall name="rt_sigsuspend" number="5128"/>
+  <syscall name="sigaltstack" number="5129"/>
+  <syscall name="utime" number="5130"/>
+  <syscall name="mknod" number="5131"/>
+  <syscall name="personality" number="5132"/>
+  <syscall name="ustat" number="5133"/>
+  <syscall name="statfs" number="5134"/>
+  <syscall name="fstatfs" number="5135"/>
+  <syscall name="sysfs" number="5136"/>
+  <syscall name="getpriority" number="5137"/>
+  <syscall name="setpriority" number="5138"/>
+  <syscall name="sched_setparam" number="5139"/>
+  <syscall name="sched_getparam" number="5140"/>
+  <syscall name="sched_setscheduler" number="5141"/>
+  <syscall name="sched_getscheduler" number="5142"/>
+  <syscall name="sched_get_priority_max" number="5143"/>
+  <syscall name="sched_get_priority_min" number="5144"/>
+  <syscall name="sched_rr_get_interval" number="5145"/>
+  <syscall name="mlock" number="5146"/>
+  <syscall name="munlock" number="5147"/>
+  <syscall name="mlockall" number="5148"/>
+  <syscall name="munlockall" number="5149"/>
+  <syscall name="vhangup" number="5150"/>
+  <syscall name="pivot_root" number="5151"/>
+  <syscall name="_sysctl" number="5152"/>
+  <syscall name="prctl" number="5153"/>
+  <syscall name="adjtimex" number="5154"/>
+  <syscall name="setrlimit" number="5155"/>
+  <syscall name="chroot" number="5156"/>
+  <syscall name="sync" number="5157"/>
+  <syscall name="acct" number="5158"/>
+  <syscall name="settimeofday" number="5159"/>
+  <syscall name="mount" number="5160"/>
+  <syscall name="umount2" number="5161"/>
+  <syscall name="swapon" number="5162"/>
+  <syscall name="swapoff" number="5163"/>
+  <syscall name="reboot" number="5164"/>
+  <syscall name="sethostname" number="5165"/>
+  <syscall name="setdomainname" number="5166"/>
+  <syscall name="create_module" number="5167"/>
+  <syscall name="init_module" number="5168"/>
+  <syscall name="delete_module" number="5169"/>
+  <syscall name="get_kernel_syms" number="5170"/>
+  <syscall name="query_module" number="5171"/>
+  <syscall name="quotactl" number="5172"/>
+  <syscall name="nfsservctl" number="5173"/>
+  <syscall name="getpmsg" number="5174"/>
+  <syscall name="putpmsg" number="5175"/>
+  <syscall name="afs_syscall" number="5176"/>
+  <syscall name="gettid" number="5178"/>
+  <syscall name="readahead" number="5179"/>
+  <syscall name="setxattr" number="5180"/>
+  <syscall name="lsetxattr" number="5181"/>
+  <syscall name="fsetxattr" number="5182"/>
+  <syscall name="getxattr" number="5183"/>
+  <syscall name="lgetxattr" number="5184"/>
+  <syscall name="fgetxattr" number="5185"/>
+  <syscall name="listxattr" number="5186"/>
+  <syscall name="llistxattr" number="5187"/>
+  <syscall name="flistxattr" number="5188"/>
+  <syscall name="removexattr" number="5189"/>
+  <syscall name="lremovexattr" number="5190"/>
+  <syscall name="fremovexattr" number="5191"/>
+  <syscall name="tkill" number="5192"/>
+  <syscall name="futex" number="5194"/>
+  <syscall name="sched_setaffinity" number="5195"/>
+  <syscall name="sched_getaffinity" number="5196"/>
+  <syscall name="cacheflush" number="5197"/>
+  <syscall name="cachectl" number="5198"/>
+  <syscall name="sysmips" number="5199"/>
+  <syscall name="io_setup" number="5200"/>
+  <syscall name="io_destroy" number="5201"/>
+  <syscall name="io_getevents" number="5202"/>
+  <syscall name="io_submit" number="5203"/>
+  <syscall name="io_cancel" number="5204"/>
+  <syscall name="exit_group" number="5205"/>
+  <syscall name="lookup_dcookie" number="5206"/>
+  <syscall name="epoll_create" number="5207"/>
+  <syscall name="epoll_ctl" number="5208"/>
+  <syscall name="epoll_wait" number="5209"/>
+  <syscall name="remap_file_pages" number="5210"/>
+  <syscall name="rt_sigreturn" number="5211"/>
+  <syscall name="set_tid_address" number="5212"/>
+  <syscall name="restart_syscall" number="5213"/>
+  <syscall name="semtimedop" number="5214"/>
+  <syscall name="fadvise64" number="5215"/>
+  <syscall name="timer_create" number="5216"/>
+  <syscall name="timer_settime" number="5217"/>
+  <syscall name="timer_gettime" number="5218"/>
+  <syscall name="timer_getoverrun" number="5219"/>
+  <syscall name="timer_delete" number="5220"/>
+  <syscall name="clock_settime" number="5221"/>
+  <syscall name="clock_gettime" number="5222"/>
+  <syscall name="clock_getres" number="5223"/>
+  <syscall name="clock_nanosleep" number="5224"/>
+  <syscall name="tgkill" number="5225"/>
+  <syscall name="utimes" number="5226"/>
+  <syscall name="mbind" number="5227"/>
+  <syscall name="get_mempolicy" number="5228"/>
+  <syscall name="set_mempolicy" number="5229"/>
+  <syscall name="mq_open" number="5230"/>
+  <syscall name="mq_unlink" number="5231"/>
+  <syscall name="mq_timedsend" number="5232"/>
+  <syscall name="mq_timedreceive" number="5233"/>
+  <syscall name="mq_notify" number="5234"/>
+  <syscall name="mq_getsetattr" number="5235"/>
+  <syscall name="vserver" number="5236"/>
+  <syscall name="waitid" number="5237"/>
+  <syscall name="add_key" number="5239"/>
+  <syscall name="request_key" number="5240"/>
+  <syscall name="keyctl" number="5241"/>
+  <syscall name="set_thread_area" number="5242"/>
+  <syscall name="inotify_init" number="5243"/>
+  <syscall name="inotify_add_watch" number="5244"/>
+  <syscall name="inotify_rm_watch" number="5245"/>
+  <syscall name="migrate_pages" number="5246"/>
+  <syscall name="openat" number="5247"/>
+  <syscall name="mkdirat" number="5248"/>
+  <syscall name="mknodat" number="5249"/>
+  <syscall name="fchownat" number="5250"/>
+  <syscall name="futimesat" number="5251"/>
+  <syscall name="newfstatat" number="5252"/>
+  <syscall name="unlinkat" number="5253"/>
+  <syscall name="renameat" number="5254"/>
+  <syscall name="linkat" number="5255"/>
+  <syscall name="symlinkat" number="5256"/>
+  <syscall name="readlinkat" number="5257"/>
+  <syscall name="fchmodat" number="5258"/>
+  <syscall name="faccessat" number="5259"/>
+  <syscall name="pselect6" number="5260"/>
+  <syscall name="ppoll" number="5261"/>
+  <syscall name="unshare" number="5262"/>
+  <syscall name="splice" number="5263"/>
+  <syscall name="sync_file_range" number="5264"/>
+  <syscall name="tee" number="5265"/>
+  <syscall name="vmsplice" number="5266"/>
+  <syscall name="move_pages" number="5267"/>
+  <syscall name="set_robust_list" number="5268"/>
+  <syscall name="get_robust_list" number="5269"/>
+  <syscall name="kexec_load" number="5270"/>
+  <syscall name="getcpu" number="5271"/>
+  <syscall name="epoll_pwait" number="5272"/>
+  <syscall name="ioprio_set" number="5273"/>
+  <syscall name="ioprio_get" number="5274"/>
+  <syscall name="utimensat" number="5275"/>
+  <syscall name="signalfd" number="5276"/>
+  <syscall name="timerfd" number="5277"/>
+  <syscall name="eventfd" number="5278"/>
+  <syscall name="fallocate" number="5279"/>
+  <syscall name="timerfd_create" number="5280"/>
+  <syscall name="timerfd_gettime" number="5281"/>
+  <syscall name="timerfd_settime" number="5282"/>
+  <syscall name="signalfd4" number="5283"/>
+  <syscall name="eventfd2" number="5284"/>
+  <syscall name="epoll_create1" number="5285"/>
+  <syscall name="dup3" number="5286"/>
+  <syscall name="pipe2" number="5287"/>
+  <syscall name="inotify_init1" number="5288"/>
+  <syscall name="preadv" number="5289"/>
+  <syscall name="pwritev" number="5290"/>
+  <syscall name="rt_tgsigqueueinfo" number="5291"/>
+  <syscall name="perf_event_open" number="5292"/>
+  <syscall name="accept4" number="5293"/>
+  <syscall name="recvmmsg" number="5294"/>
+  <syscall name="fanotify_init" number="5295"/>
+  <syscall name="fanotify_mark" number="5296"/>
+  <syscall name="prlimit64" number="5297"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-o32-linux.xml ./gdb/syscalls/mips-o32-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-o32-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/mips-o32-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,90 +1,87 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2011-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/mips/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="syscall" number="4000"/>
-  <syscall name="exit" number="4001"/>
-  <syscall name="fork" number="4002"/>
-  <syscall name="read" number="4003"/>
-  <syscall name="write" number="4004"/>
-  <syscall name="open" number="4005"/>
-  <syscall name="close" number="4006"/>
-  <syscall name="waitpid" number="4007"/>
-  <syscall name="creat" number="4008"/>
-  <syscall name="link" number="4009"/>
-  <syscall name="unlink" number="4010"/>
-  <syscall name="execve" number="4011"/>
-  <syscall name="chdir" number="4012"/>
+  <syscall name="exit" number="4001" groups="process"/>
+  <syscall name="fork" number="4002" groups="process"/>
+  <syscall name="read" number="4003" groups="descriptor"/>
+  <syscall name="write" number="4004" groups="descriptor"/>
+  <syscall name="open" number="4005" groups="descriptor,file"/>
+  <syscall name="close" number="4006" groups="descriptor"/>
+  <syscall name="waitpid" number="4007" groups="process"/>
+  <syscall name="creat" number="4008" groups="descriptor,file"/>
+  <syscall name="link" number="4009" groups="file"/>
+  <syscall name="unlink" number="4010" groups="file"/>
+  <syscall name="execve" number="4011" groups="file,process"/>
+  <syscall name="chdir" number="4012" groups="file"/>
   <syscall name="time" number="4013"/>
-  <syscall name="mknod" number="4014"/>
-  <syscall name="chmod" number="4015"/>
-  <syscall name="lchown" number="4016"/>
-  <syscall name="break" number="4017"/>
-  <syscall name="lseek" number="4019"/>
+  <syscall name="mknod" number="4014" groups="file"/>
+  <syscall name="chmod" number="4015" groups="file"/>
+  <syscall name="lchown" number="4016" groups="file"/>
+  <syscall name="break" number="4017" groups="memory"/>
+  <syscall name="lseek" number="4019" groups="descriptor"/>
   <syscall name="getpid" number="4020"/>
-  <syscall name="mount" number="4021"/>
-  <syscall name="umount" number="4022"/>
+  <syscall name="mount" number="4021" groups="file"/>
+  <syscall name="umount" number="4022" groups="file"/>
   <syscall name="setuid" number="4023"/>
   <syscall name="getuid" number="4024"/>
   <syscall name="stime" number="4025"/>
   <syscall name="ptrace" number="4026"/>
   <syscall name="alarm" number="4027"/>
-  <syscall name="pause" number="4029"/>
-  <syscall name="utime" number="4030"/>
+  <syscall name="pause" number="4029" groups="signal"/>
+  <syscall name="utime" number="4030" groups="file"/>
   <syscall name="stty" number="4031"/>
   <syscall name="gtty" number="4032"/>
-  <syscall name="access" number="4033"/>
+  <syscall name="access" number="4033" groups="file"/>
   <syscall name="nice" number="4034"/>
   <syscall name="ftime" number="4035"/>
   <syscall name="sync" number="4036"/>
-  <syscall name="kill" number="4037"/>
-  <syscall name="rename" number="4038"/>
-  <syscall name="mkdir" number="4039"/>
-  <syscall name="rmdir" number="4040"/>
-  <syscall name="dup" number="4041"/>
-  <syscall name="pipe" number="4042"/>
+  <syscall name="kill" number="4037" groups="signal"/>
+  <syscall name="rename" number="4038" groups="file"/>
+  <syscall name="mkdir" number="4039" groups="file"/>
+  <syscall name="rmdir" number="4040" groups="file"/>
+  <syscall name="dup" number="4041" groups="descriptor"/>
+  <syscall name="pipe" number="4042" groups="descriptor"/>
   <syscall name="times" number="4043"/>
   <syscall name="prof" number="4044"/>
-  <syscall name="brk" number="4045"/>
+  <syscall name="brk" number="4045" groups="memory"/>
   <syscall name="setgid" number="4046"/>
   <syscall name="getgid" number="4047"/>
-  <syscall name="signal" number="4048"/>
+  <syscall name="signal" number="4048" groups="signal"/>
   <syscall name="geteuid" number="4049"/>
   <syscall name="getegid" number="4050"/>
-  <syscall name="acct" number="4051"/>
-  <syscall name="umount2" number="4052"/>
+  <syscall name="acct" number="4051" groups="file"/>
+  <syscall name="umount2" number="4052" groups="file"/>
   <syscall name="lock" number="4053"/>
-  <syscall name="ioctl" number="4054"/>
-  <syscall name="fcntl" number="4055"/>
+  <syscall name="ioctl" number="4054" groups="descriptor"/>
+  <syscall name="fcntl" number="4055" groups="descriptor"/>
   <syscall name="mpx" number="4056"/>
   <syscall name="setpgid" number="4057"/>
   <syscall name="ulimit" number="4058"/>
   <syscall name="umask" number="4060"/>
-  <syscall name="chroot" number="4061"/>
+  <syscall name="chroot" number="4061" groups="file"/>
   <syscall name="ustat" number="4062"/>
-  <syscall name="dup2" number="4063"/>
+  <syscall name="dup2" number="4063" groups="descriptor"/>
   <syscall name="getppid" number="4064"/>
   <syscall name="getpgrp" number="4065"/>
   <syscall name="setsid" number="4066"/>
-  <syscall name="sigaction" number="4067"/>
-  <syscall name="sgetmask" number="4068"/>
-  <syscall name="ssetmask" number="4069"/>
+  <syscall name="sigaction" number="4067" groups="signal"/>
+  <syscall name="sgetmask" number="4068" groups="signal"/>
+  <syscall name="ssetmask" number="4069" groups="signal"/>
   <syscall name="setreuid" number="4070"/>
   <syscall name="setregid" number="4071"/>
-  <syscall name="sigsuspend" number="4072"/>
-  <syscall name="sigpending" number="4073"/>
+  <syscall name="sigsuspend" number="4072" groups="signal"/>
+  <syscall name="sigpending" number="4073" groups="signal"/>
   <syscall name="sethostname" number="4074"/>
   <syscall name="setrlimit" number="4075"/>
   <syscall name="getrlimit" number="4076"/>
@@ -93,78 +90,78 @@
   <syscall name="settimeofday" number="4079"/>
   <syscall name="getgroups" number="4080"/>
   <syscall name="setgroups" number="4081"/>
-  <syscall name="symlink" number="4083"/>
-  <syscall name="readlink" number="4085"/>
-  <syscall name="uselib" number="4086"/>
-  <syscall name="swapon" number="4087"/>
+  <syscall name="symlink" number="4083" groups="file"/>
+  <syscall name="readlink" number="4085" groups="file"/>
+  <syscall name="uselib" number="4086" groups="file"/>
+  <syscall name="swapon" number="4087" groups="file"/>
   <syscall name="reboot" number="4088"/>
-  <syscall name="readdir" number="4089"/>
-  <syscall name="mmap" number="4090"/>
-  <syscall name="munmap" number="4091"/>
-  <syscall name="truncate" number="4092"/>
-  <syscall name="ftruncate" number="4093"/>
-  <syscall name="fchmod" number="4094"/>
-  <syscall name="fchown" number="4095"/>
+  <syscall name="readdir" number="4089" groups="descriptor"/>
+  <syscall name="mmap" number="4090" groups="descriptor,memory"/>
+  <syscall name="munmap" number="4091" groups="memory"/>
+  <syscall name="truncate" number="4092" groups="file"/>
+  <syscall name="ftruncate" number="4093" groups="descriptor"/>
+  <syscall name="fchmod" number="4094" groups="descriptor"/>
+  <syscall name="fchown" number="4095" groups="descriptor"/>
   <syscall name="getpriority" number="4096"/>
   <syscall name="setpriority" number="4097"/>
   <syscall name="profil" number="4098"/>
-  <syscall name="statfs" number="4099"/>
-  <syscall name="fstatfs" number="4100"/>
+  <syscall name="statfs" number="4099" groups="file"/>
+  <syscall name="fstatfs" number="4100" groups="descriptor"/>
   <syscall name="ioperm" number="4101"/>
-  <syscall name="socketcall" number="4102"/>
+  <syscall name="socketcall" number="4102" groups="descriptor"/>
   <syscall name="syslog" number="4103"/>
   <syscall name="setitimer" number="4104"/>
   <syscall name="getitimer" number="4105"/>
-  <syscall name="stat" number="4106"/>
-  <syscall name="lstat" number="4107"/>
-  <syscall name="fstat" number="4108"/>
+  <syscall name="stat" number="4106" groups="file"/>
+  <syscall name="lstat" number="4107" groups="file"/>
+  <syscall name="fstat" number="4108" groups="descriptor"/>
   <syscall name="iopl" number="4110"/>
   <syscall name="vhangup" number="4111"/>
   <syscall name="idle" number="4112"/>
   <syscall name="vm86" number="4113"/>
-  <syscall name="wait4" number="4114"/>
-  <syscall name="swapoff" number="4115"/>
+  <syscall name="wait4" number="4114" groups="process"/>
+  <syscall name="swapoff" number="4115" groups="file"/>
   <syscall name="sysinfo" number="4116"/>
-  <syscall name="ipc" number="4117"/>
-  <syscall name="fsync" number="4118"/>
-  <syscall name="sigreturn" number="4119"/>
-  <syscall name="clone" number="4120"/>
+  <syscall name="ipc" number="4117" groups="ipc"/>
+  <syscall name="fsync" number="4118" groups="descriptor"/>
+  <syscall name="sigreturn" number="4119" groups="signal"/>
+  <syscall name="clone" number="4120" groups="process"/>
   <syscall name="setdomainname" number="4121"/>
   <syscall name="uname" number="4122"/>
   <syscall name="modify_ldt" number="4123"/>
   <syscall name="adjtimex" number="4124"/>
-  <syscall name="mprotect" number="4125"/>
-  <syscall name="sigprocmask" number="4126"/>
+  <syscall name="mprotect" number="4125" groups="memory"/>
+  <syscall name="sigprocmask" number="4126" groups="signal"/>
   <syscall name="create_module" number="4127"/>
   <syscall name="init_module" number="4128"/>
   <syscall name="delete_module" number="4129"/>
   <syscall name="get_kernel_syms" number="4130"/>
-  <syscall name="quotactl" number="4131"/>
+  <syscall name="quotactl" number="4131" groups="file"/>
   <syscall name="getpgid" number="4132"/>
-  <syscall name="fchdir" number="4133"/>
+  <syscall name="fchdir" number="4133" groups="descriptor"/>
   <syscall name="bdflush" number="4134"/>
   <syscall name="sysfs" number="4135"/>
   <syscall name="personality" number="4136"/>
   <syscall name="afs_syscall" number="4137"/>
   <syscall name="setfsuid" number="4138"/>
   <syscall name="setfsgid" number="4139"/>
-  <syscall name="_llseek" number="4140"/>
-  <syscall name="getdents" number="4141"/>
-  <syscall name="_newselect" number="4142"/>
-  <syscall name="flock" number="4143"/>
-  <syscall name="msync" number="4144"/>
-  <syscall name="readv" number="4145"/>
-  <syscall name="writev" number="4146"/>
+  <syscall name="_llseek" number="4140" groups="descriptor"/>
+  <syscall name="getdents" number="4141" groups="descriptor"/>
+  <syscall name="_newselect" number="4142" groups="descriptor"/>
+  <syscall name="flock" number="4143" groups="descriptor"/>
+  <syscall name="msync" number="4144" groups="memory"/>
+  <syscall name="readv" number="4145" groups="descriptor"/>
+  <syscall name="writev" number="4146" groups="descriptor"/>
   <syscall name="cacheflush" number="4147"/>
   <syscall name="cachectl" number="4148"/>
   <syscall name="sysmips" number="4149"/>
   <syscall name="getsid" number="4151"/>
-  <syscall name="fdatasync" number="4152"/>
+  <syscall name="fdatasync" number="4152" groups="descriptor"/>
   <syscall name="_sysctl" number="4153"/>
-  <syscall name="mlock" number="4154"/>
-  <syscall name="munlock" number="4155"/>
-  <syscall name="mlockall" number="4156"/>
-  <syscall name="munlockall" number="4157"/>
+  <syscall name="mlock" number="4154" groups="memory"/>
+  <syscall name="munlock" number="4155" groups="memory"/>
+  <syscall name="mlockall" number="4156" groups="memory"/>
+  <syscall name="munlockall" number="4157" groups="memory"/>
   <syscall name="sched_setparam" number="4158"/>
   <syscall name="sched_getparam" number="4159"/>
   <syscall name="sched_setscheduler" number="4160"/>
@@ -174,76 +171,76 @@
   <syscall name="sched_get_priority_min" number="4164"/>
   <syscall name="sched_rr_get_interval" number="4165"/>
   <syscall name="nanosleep" number="4166"/>
-  <syscall name="mremap" number="4167"/>
-  <syscall name="accept" number="4168"/>
-  <syscall name="bind" number="4169"/>
-  <syscall name="connect" number="4170"/>
-  <syscall name="getpeername" number="4171"/>
-  <syscall name="getsockname" number="4172"/>
-  <syscall name="getsockopt" number="4173"/>
-  <syscall name="listen" number="4174"/>
-  <syscall name="recv" number="4175"/>
-  <syscall name="recvfrom" number="4176"/>
-  <syscall name="recvmsg" number="4177"/>
-  <syscall name="send" number="4178"/>
-  <syscall name="sendmsg" number="4179"/>
-  <syscall name="sendto" number="4180"/>
-  <syscall name="setsockopt" number="4181"/>
-  <syscall name="shutdown" number="4182"/>
-  <syscall name="socket" number="4183"/>
-  <syscall name="socketpair" number="4184"/>
+  <syscall name="mremap" number="4167" groups="memory"/>
+  <syscall name="accept" number="4168" groups="network"/>
+  <syscall name="bind" number="4169" groups="network"/>
+  <syscall name="connect" number="4170" groups="network"/>
+  <syscall name="getpeername" number="4171" groups="network"/>
+  <syscall name="getsockname" number="4172" groups="network"/>
+  <syscall name="getsockopt" number="4173" groups="network"/>
+  <syscall name="listen" number="4174" groups="network"/>
+  <syscall name="recv" number="4175" groups="network"/>
+  <syscall name="recvfrom" number="4176" groups="network"/>
+  <syscall name="recvmsg" number="4177" groups="network"/>
+  <syscall name="send" number="4178" groups="network"/>
+  <syscall name="sendmsg" number="4179" groups="network"/>
+  <syscall name="sendto" number="4180" groups="network"/>
+  <syscall name="setsockopt" number="4181" groups="network"/>
+  <syscall name="shutdown" number="4182" groups="network"/>
+  <syscall name="socket" number="4183" groups="network"/>
+  <syscall name="socketpair" number="4184" groups="network"/>
   <syscall name="setresuid" number="4185"/>
   <syscall name="getresuid" number="4186"/>
   <syscall name="query_module" number="4187"/>
-  <syscall name="poll" number="4188"/>
+  <syscall name="poll" number="4188" groups="descriptor"/>
   <syscall name="nfsservctl" number="4189"/>
   <syscall name="setresgid" number="4190"/>
   <syscall name="getresgid" number="4191"/>
   <syscall name="prctl" number="4192"/>
-  <syscall name="rt_sigreturn" number="4193"/>
-  <syscall name="rt_sigaction" number="4194"/>
-  <syscall name="rt_sigprocmask" number="4195"/>
-  <syscall name="rt_sigpending" number="4196"/>
-  <syscall name="rt_sigtimedwait" number="4197"/>
-  <syscall name="rt_sigqueueinfo" number="4198"/>
-  <syscall name="rt_sigsuspend" number="4199"/>
-  <syscall name="pread64" number="4200"/>
-  <syscall name="pwrite64" number="4201"/>
-  <syscall name="chown" number="4202"/>
-  <syscall name="getcwd" number="4203"/>
+  <syscall name="rt_sigreturn" number="4193" groups="signal"/>
+  <syscall name="rt_sigaction" number="4194" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="4195" groups="signal"/>
+  <syscall name="rt_sigpending" number="4196" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="4197" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="4198" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="4199" groups="signal"/>
+  <syscall name="pread64" number="4200" groups="descriptor"/>
+  <syscall name="pwrite64" number="4201" groups="descriptor"/>
+  <syscall name="chown" number="4202" groups="file"/>
+  <syscall name="getcwd" number="4203" groups="file"/>
   <syscall name="capget" number="4204"/>
   <syscall name="capset" number="4205"/>
-  <syscall name="sigaltstack" number="4206"/>
-  <syscall name="sendfile" number="4207"/>
+  <syscall name="sigaltstack" number="4206" groups="signal"/>
+  <syscall name="sendfile" number="4207" groups="descriptor,network"/>
   <syscall name="getpmsg" number="4208"/>
   <syscall name="putpmsg" number="4209"/>
-  <syscall name="mmap2" number="4210"/>
-  <syscall name="truncate64" number="4211"/>
-  <syscall name="ftruncate64" number="4212"/>
-  <syscall name="stat64" number="4213"/>
-  <syscall name="lstat64" number="4214"/>
-  <syscall name="fstat64" number="4215"/>
-  <syscall name="pivot_root" number="4216"/>
-  <syscall name="mincore" number="4217"/>
-  <syscall name="madvise" number="4218"/>
-  <syscall name="getdents64" number="4219"/>
-  <syscall name="fcntl64" number="4220"/>
+  <syscall name="mmap2" number="4210" groups="descriptor,memory"/>
+  <syscall name="truncate64" number="4211" groups="file"/>
+  <syscall name="ftruncate64" number="4212" groups="descriptor"/>
+  <syscall name="stat64" number="4213" groups="file"/>
+  <syscall name="lstat64" number="4214" groups="file"/>
+  <syscall name="fstat64" number="4215" groups="descriptor"/>
+  <syscall name="pivot_root" number="4216" groups="file"/>
+  <syscall name="mincore" number="4217" groups="memory"/>
+  <syscall name="madvise" number="4218" groups="memory"/>
+  <syscall name="getdents64" number="4219" groups="descriptor"/>
+  <syscall name="fcntl64" number="4220" groups="descriptor"/>
   <syscall name="gettid" number="4222"/>
-  <syscall name="readahead" number="4223"/>
-  <syscall name="setxattr" number="4224"/>
-  <syscall name="lsetxattr" number="4225"/>
-  <syscall name="fsetxattr" number="4226"/>
-  <syscall name="getxattr" number="4227"/>
-  <syscall name="lgetxattr" number="4228"/>
-  <syscall name="fgetxattr" number="4229"/>
-  <syscall name="listxattr" number="4230"/>
-  <syscall name="llistxattr" number="4231"/>
-  <syscall name="flistxattr" number="4232"/>
-  <syscall name="removexattr" number="4233"/>
-  <syscall name="lremovexattr" number="4234"/>
-  <syscall name="fremovexattr" number="4235"/>
-  <syscall name="tkill" number="4236"/>
-  <syscall name="sendfile64" number="4237"/>
+  <syscall name="readahead" number="4223" groups="descriptor"/>
+  <syscall name="setxattr" number="4224" groups="file"/>
+  <syscall name="lsetxattr" number="4225" groups="file"/>
+  <syscall name="fsetxattr" number="4226" groups="descriptor"/>
+  <syscall name="getxattr" number="4227" groups="file"/>
+  <syscall name="lgetxattr" number="4228" groups="file"/>
+  <syscall name="fgetxattr" number="4229" groups="descriptor"/>
+  <syscall name="listxattr" number="4230" groups="file"/>
+  <syscall name="llistxattr" number="4231" groups="file"/>
+  <syscall name="flistxattr" number="4232" groups="descriptor"/>
+  <syscall name="removexattr" number="4233" groups="file"/>
+  <syscall name="lremovexattr" number="4234" groups="file"/>
+  <syscall name="fremovexattr" number="4235" groups="descriptor"/>
+  <syscall name="tkill" number="4236" groups="signal"/>
+  <syscall name="sendfile64" number="4237" groups="descriptor,network"/>
   <syscall name="futex" number="4238"/>
   <syscall name="sched_setaffinity" number="4239"/>
   <syscall name="sched_getaffinity" number="4240"/>
@@ -252,17 +249,17 @@
   <syscall name="io_getevents" number="4243"/>
   <syscall name="io_submit" number="4244"/>
   <syscall name="io_cancel" number="4245"/>
-  <syscall name="exit_group" number="4246"/>
+  <syscall name="exit_group" number="4246" groups="process"/>
   <syscall name="lookup_dcookie" number="4247"/>
-  <syscall name="epoll_create" number="4248"/>
-  <syscall name="epoll_ctl" number="4249"/>
-  <syscall name="epoll_wait" number="4250"/>
-  <syscall name="remap_file_pages" number="4251"/>
+  <syscall name="epoll_create" number="4248" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="4249" groups="descriptor"/>
+  <syscall name="epoll_wait" number="4250" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="4251" groups="memory"/>
   <syscall name="set_tid_address" number="4252"/>
   <syscall name="restart_syscall" number="4253"/>
-  <syscall name="fadvise64" number="4254"/>
-  <syscall name="statfs64" number="4255"/>
-  <syscall name="fstatfs64" number="4256"/>
+  <syscall name="fadvise64" number="4254" groups="descriptor"/>
+  <syscall name="statfs64" number="4255" groups="file"/>
+  <syscall name="fstatfs64" number="4256" groups="descriptor"/>
   <syscall name="timer_create" number="4257"/>
   <syscall name="timer_settime" number="4258"/>
   <syscall name="timer_gettime" number="4259"/>
@@ -272,11 +269,11 @@
   <syscall name="clock_gettime" number="4263"/>
   <syscall name="clock_getres" number="4264"/>
   <syscall name="clock_nanosleep" number="4265"/>
-  <syscall name="tgkill" number="4266"/>
-  <syscall name="utimes" number="4267"/>
-  <syscall name="mbind" number="4268"/>
-  <syscall name="get_mempolicy" number="4269"/>
-  <syscall name="set_mempolicy" number="4270"/>
+  <syscall name="tgkill" number="4266" groups="signal"/>
+  <syscall name="utimes" number="4267" groups="file"/>
+  <syscall name="mbind" number="4268" groups="memory"/>
+  <syscall name="get_mempolicy" number="4269" groups="memory"/>
+  <syscall name="set_mempolicy" number="4270" groups="memory"/>
   <syscall name="mq_open" number="4271"/>
   <syscall name="mq_unlink" number="4272"/>
   <syscall name="mq_timedsend" number="4273"/>
@@ -284,64 +281,64 @@
   <syscall name="mq_notify" number="4275"/>
   <syscall name="mq_getsetattr" number="4276"/>
   <syscall name="vserver" number="4277"/>
-  <syscall name="waitid" number="4278"/>
+  <syscall name="waitid" number="4278" groups="process"/>
   <syscall name="add_key" number="4280"/>
   <syscall name="request_key" number="4281"/>
   <syscall name="keyctl" number="4282"/>
   <syscall name="set_thread_area" number="4283"/>
-  <syscall name="inotify_init" number="4284"/>
-  <syscall name="inotify_add_watch" number="4285"/>
-  <syscall name="inotify_rm_watch" number="4286"/>
-  <syscall name="migrate_pages" number="4287"/>
-  <syscall name="openat" number="4288"/>
-  <syscall name="mkdirat" number="4289"/>
-  <syscall name="mknodat" number="4290"/>
-  <syscall name="fchownat" number="4291"/>
-  <syscall name="futimesat" number="4292"/>
-  <syscall name="fstatat64" number="4293"/>
-  <syscall name="unlinkat" number="4294"/>
-  <syscall name="renameat" number="4295"/>
-  <syscall name="linkat" number="4296"/>
-  <syscall name="symlinkat" number="4297"/>
-  <syscall name="readlinkat" number="4298"/>
-  <syscall name="fchmodat" number="4299"/>
-  <syscall name="faccessat" number="4300"/>
-  <syscall name="pselect6" number="4301"/>
-  <syscall name="ppoll" number="4302"/>
-  <syscall name="unshare" number="4303"/>
-  <syscall name="splice" number="4304"/>
-  <syscall name="sync_file_range" number="4305"/>
-  <syscall name="tee" number="4306"/>
-  <syscall name="vmsplice" number="4307"/>
-  <syscall name="move_pages" number="4308"/>
+  <syscall name="inotify_init" number="4284" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="4285" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="4286" groups="descriptor"/>
+  <syscall name="migrate_pages" number="4287" groups="memory"/>
+  <syscall name="openat" number="4288" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="4289" groups="descriptor,file"/>
+  <syscall name="mknodat" number="4290" groups="descriptor,file"/>
+  <syscall name="fchownat" number="4291" groups="descriptor,file"/>
+  <syscall name="futimesat" number="4292" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="4293" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="4294" groups="descriptor,file"/>
+  <syscall name="renameat" number="4295" groups="descriptor,file"/>
+  <syscall name="linkat" number="4296" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="4297" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="4298" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="4299" groups="descriptor,file"/>
+  <syscall name="faccessat" number="4300" groups="descriptor,file"/>
+  <syscall name="pselect6" number="4301" groups="descriptor"/>
+  <syscall name="ppoll" number="4302" groups="descriptor"/>
+  <syscall name="unshare" number="4303" groups="process"/>
+  <syscall name="splice" number="4304" groups="descriptor"/>
+  <syscall name="sync_file_range" number="4305" groups="descriptor"/>
+  <syscall name="tee" number="4306" groups="descriptor"/>
+  <syscall name="vmsplice" number="4307" groups="descriptor"/>
+  <syscall name="move_pages" number="4308" groups="memory"/>
   <syscall name="set_robust_list" number="4309"/>
   <syscall name="get_robust_list" number="4310"/>
   <syscall name="kexec_load" number="4311"/>
   <syscall name="getcpu" number="4312"/>
-  <syscall name="epoll_pwait" number="4313"/>
+  <syscall name="epoll_pwait" number="4313" groups="descriptor"/>
   <syscall name="ioprio_set" number="4314"/>
   <syscall name="ioprio_get" number="4315"/>
-  <syscall name="utimensat" number="4316"/>
-  <syscall name="signalfd" number="4317"/>
-  <syscall name="timerfd" number="4318"/>
-  <syscall name="eventfd" number="4319"/>
-  <syscall name="fallocate" number="4320"/>
-  <syscall name="timerfd_create" number="4321"/>
-  <syscall name="timerfd_gettime" number="4322"/>
-  <syscall name="timerfd_settime" number="4323"/>
-  <syscall name="signalfd4" number="4324"/>
-  <syscall name="eventfd2" number="4325"/>
-  <syscall name="epoll_create1" number="4326"/>
-  <syscall name="dup3" number="4327"/>
-  <syscall name="pipe2" number="4328"/>
-  <syscall name="inotify_init1" number="4329"/>
-  <syscall name="preadv" number="4330"/>
-  <syscall name="pwritev" number="4331"/>
-  <syscall name="rt_tgsigqueueinfo" number="4332"/>
-  <syscall name="perf_event_open" number="4333"/>
-  <syscall name="accept4" number="4334"/>
-  <syscall name="recvmmsg" number="4335"/>
-  <syscall name="fanotify_init" number="4336"/>
-  <syscall name="fanotify_mark" number="4337"/>
+  <syscall name="utimensat" number="4316" groups="descriptor,file"/>
+  <syscall name="signalfd" number="4317" groups="descriptor,signal"/>
+  <syscall name="timerfd" number="4318" groups="descriptor"/>
+  <syscall name="eventfd" number="4319" groups="descriptor"/>
+  <syscall name="fallocate" number="4320" groups="descriptor"/>
+  <syscall name="timerfd_create" number="4321" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="4322" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="4323" groups="descriptor"/>
+  <syscall name="signalfd4" number="4324" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="4325" groups="descriptor"/>
+  <syscall name="epoll_create1" number="4326" groups="descriptor"/>
+  <syscall name="dup3" number="4327" groups="descriptor"/>
+  <syscall name="pipe2" number="4328" groups="descriptor"/>
+  <syscall name="inotify_init1" number="4329" groups="descriptor"/>
+  <syscall name="preadv" number="4330" groups="descriptor"/>
+  <syscall name="pwritev" number="4331" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="4332" groups="process,signal"/>
+  <syscall name="perf_event_open" number="4333" groups="descriptor"/>
+  <syscall name="accept4" number="4334" groups="network"/>
+  <syscall name="recvmmsg" number="4335" groups="network"/>
+  <syscall name="fanotify_init" number="4336" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="4337" groups="descriptor,file"/>
   <syscall name="prlimit64" number="4338"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-o32-linux.xml.in ./gdb/syscalls/mips-o32-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/mips-o32-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/mips-o32-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,347 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/mips/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="syscall" number="4000"/>
+  <syscall name="exit" number="4001"/>
+  <syscall name="fork" number="4002"/>
+  <syscall name="read" number="4003"/>
+  <syscall name="write" number="4004"/>
+  <syscall name="open" number="4005"/>
+  <syscall name="close" number="4006"/>
+  <syscall name="waitpid" number="4007"/>
+  <syscall name="creat" number="4008"/>
+  <syscall name="link" number="4009"/>
+  <syscall name="unlink" number="4010"/>
+  <syscall name="execve" number="4011"/>
+  <syscall name="chdir" number="4012"/>
+  <syscall name="time" number="4013"/>
+  <syscall name="mknod" number="4014"/>
+  <syscall name="chmod" number="4015"/>
+  <syscall name="lchown" number="4016"/>
+  <syscall name="break" number="4017"/>
+  <syscall name="lseek" number="4019"/>
+  <syscall name="getpid" number="4020"/>
+  <syscall name="mount" number="4021"/>
+  <syscall name="umount" number="4022"/>
+  <syscall name="setuid" number="4023"/>
+  <syscall name="getuid" number="4024"/>
+  <syscall name="stime" number="4025"/>
+  <syscall name="ptrace" number="4026"/>
+  <syscall name="alarm" number="4027"/>
+  <syscall name="pause" number="4029"/>
+  <syscall name="utime" number="4030"/>
+  <syscall name="stty" number="4031"/>
+  <syscall name="gtty" number="4032"/>
+  <syscall name="access" number="4033"/>
+  <syscall name="nice" number="4034"/>
+  <syscall name="ftime" number="4035"/>
+  <syscall name="sync" number="4036"/>
+  <syscall name="kill" number="4037"/>
+  <syscall name="rename" number="4038"/>
+  <syscall name="mkdir" number="4039"/>
+  <syscall name="rmdir" number="4040"/>
+  <syscall name="dup" number="4041"/>
+  <syscall name="pipe" number="4042"/>
+  <syscall name="times" number="4043"/>
+  <syscall name="prof" number="4044"/>
+  <syscall name="brk" number="4045"/>
+  <syscall name="setgid" number="4046"/>
+  <syscall name="getgid" number="4047"/>
+  <syscall name="signal" number="4048"/>
+  <syscall name="geteuid" number="4049"/>
+  <syscall name="getegid" number="4050"/>
+  <syscall name="acct" number="4051"/>
+  <syscall name="umount2" number="4052"/>
+  <syscall name="lock" number="4053"/>
+  <syscall name="ioctl" number="4054"/>
+  <syscall name="fcntl" number="4055"/>
+  <syscall name="mpx" number="4056"/>
+  <syscall name="setpgid" number="4057"/>
+  <syscall name="ulimit" number="4058"/>
+  <syscall name="umask" number="4060"/>
+  <syscall name="chroot" number="4061"/>
+  <syscall name="ustat" number="4062"/>
+  <syscall name="dup2" number="4063"/>
+  <syscall name="getppid" number="4064"/>
+  <syscall name="getpgrp" number="4065"/>
+  <syscall name="setsid" number="4066"/>
+  <syscall name="sigaction" number="4067"/>
+  <syscall name="sgetmask" number="4068"/>
+  <syscall name="ssetmask" number="4069"/>
+  <syscall name="setreuid" number="4070"/>
+  <syscall name="setregid" number="4071"/>
+  <syscall name="sigsuspend" number="4072"/>
+  <syscall name="sigpending" number="4073"/>
+  <syscall name="sethostname" number="4074"/>
+  <syscall name="setrlimit" number="4075"/>
+  <syscall name="getrlimit" number="4076"/>
+  <syscall name="getrusage" number="4077"/>
+  <syscall name="gettimeofday" number="4078"/>
+  <syscall name="settimeofday" number="4079"/>
+  <syscall name="getgroups" number="4080"/>
+  <syscall name="setgroups" number="4081"/>
+  <syscall name="symlink" number="4083"/>
+  <syscall name="readlink" number="4085"/>
+  <syscall name="uselib" number="4086"/>
+  <syscall name="swapon" number="4087"/>
+  <syscall name="reboot" number="4088"/>
+  <syscall name="readdir" number="4089"/>
+  <syscall name="mmap" number="4090"/>
+  <syscall name="munmap" number="4091"/>
+  <syscall name="truncate" number="4092"/>
+  <syscall name="ftruncate" number="4093"/>
+  <syscall name="fchmod" number="4094"/>
+  <syscall name="fchown" number="4095"/>
+  <syscall name="getpriority" number="4096"/>
+  <syscall name="setpriority" number="4097"/>
+  <syscall name="profil" number="4098"/>
+  <syscall name="statfs" number="4099"/>
+  <syscall name="fstatfs" number="4100"/>
+  <syscall name="ioperm" number="4101"/>
+  <syscall name="socketcall" number="4102"/>
+  <syscall name="syslog" number="4103"/>
+  <syscall name="setitimer" number="4104"/>
+  <syscall name="getitimer" number="4105"/>
+  <syscall name="stat" number="4106"/>
+  <syscall name="lstat" number="4107"/>
+  <syscall name="fstat" number="4108"/>
+  <syscall name="iopl" number="4110"/>
+  <syscall name="vhangup" number="4111"/>
+  <syscall name="idle" number="4112"/>
+  <syscall name="vm86" number="4113"/>
+  <syscall name="wait4" number="4114"/>
+  <syscall name="swapoff" number="4115"/>
+  <syscall name="sysinfo" number="4116"/>
+  <syscall name="ipc" number="4117"/>
+  <syscall name="fsync" number="4118"/>
+  <syscall name="sigreturn" number="4119"/>
+  <syscall name="clone" number="4120"/>
+  <syscall name="setdomainname" number="4121"/>
+  <syscall name="uname" number="4122"/>
+  <syscall name="modify_ldt" number="4123"/>
+  <syscall name="adjtimex" number="4124"/>
+  <syscall name="mprotect" number="4125"/>
+  <syscall name="sigprocmask" number="4126"/>
+  <syscall name="create_module" number="4127"/>
+  <syscall name="init_module" number="4128"/>
+  <syscall name="delete_module" number="4129"/>
+  <syscall name="get_kernel_syms" number="4130"/>
+  <syscall name="quotactl" number="4131"/>
+  <syscall name="getpgid" number="4132"/>
+  <syscall name="fchdir" number="4133"/>
+  <syscall name="bdflush" number="4134"/>
+  <syscall name="sysfs" number="4135"/>
+  <syscall name="personality" number="4136"/>
+  <syscall name="afs_syscall" number="4137"/>
+  <syscall name="setfsuid" number="4138"/>
+  <syscall name="setfsgid" number="4139"/>
+  <syscall name="_llseek" number="4140"/>
+  <syscall name="getdents" number="4141"/>
+  <syscall name="_newselect" number="4142"/>
+  <syscall name="flock" number="4143"/>
+  <syscall name="msync" number="4144"/>
+  <syscall name="readv" number="4145"/>
+  <syscall name="writev" number="4146"/>
+  <syscall name="cacheflush" number="4147"/>
+  <syscall name="cachectl" number="4148"/>
+  <syscall name="sysmips" number="4149"/>
+  <syscall name="getsid" number="4151"/>
+  <syscall name="fdatasync" number="4152"/>
+  <syscall name="_sysctl" number="4153"/>
+  <syscall name="mlock" number="4154"/>
+  <syscall name="munlock" number="4155"/>
+  <syscall name="mlockall" number="4156"/>
+  <syscall name="munlockall" number="4157"/>
+  <syscall name="sched_setparam" number="4158"/>
+  <syscall name="sched_getparam" number="4159"/>
+  <syscall name="sched_setscheduler" number="4160"/>
+  <syscall name="sched_getscheduler" number="4161"/>
+  <syscall name="sched_yield" number="4162"/>
+  <syscall name="sched_get_priority_max" number="4163"/>
+  <syscall name="sched_get_priority_min" number="4164"/>
+  <syscall name="sched_rr_get_interval" number="4165"/>
+  <syscall name="nanosleep" number="4166"/>
+  <syscall name="mremap" number="4167"/>
+  <syscall name="accept" number="4168"/>
+  <syscall name="bind" number="4169"/>
+  <syscall name="connect" number="4170"/>
+  <syscall name="getpeername" number="4171"/>
+  <syscall name="getsockname" number="4172"/>
+  <syscall name="getsockopt" number="4173"/>
+  <syscall name="listen" number="4174"/>
+  <syscall name="recv" number="4175"/>
+  <syscall name="recvfrom" number="4176"/>
+  <syscall name="recvmsg" number="4177"/>
+  <syscall name="send" number="4178"/>
+  <syscall name="sendmsg" number="4179"/>
+  <syscall name="sendto" number="4180"/>
+  <syscall name="setsockopt" number="4181"/>
+  <syscall name="shutdown" number="4182"/>
+  <syscall name="socket" number="4183"/>
+  <syscall name="socketpair" number="4184"/>
+  <syscall name="setresuid" number="4185"/>
+  <syscall name="getresuid" number="4186"/>
+  <syscall name="query_module" number="4187"/>
+  <syscall name="poll" number="4188"/>
+  <syscall name="nfsservctl" number="4189"/>
+  <syscall name="setresgid" number="4190"/>
+  <syscall name="getresgid" number="4191"/>
+  <syscall name="prctl" number="4192"/>
+  <syscall name="rt_sigreturn" number="4193"/>
+  <syscall name="rt_sigaction" number="4194"/>
+  <syscall name="rt_sigprocmask" number="4195"/>
+  <syscall name="rt_sigpending" number="4196"/>
+  <syscall name="rt_sigtimedwait" number="4197"/>
+  <syscall name="rt_sigqueueinfo" number="4198"/>
+  <syscall name="rt_sigsuspend" number="4199"/>
+  <syscall name="pread64" number="4200"/>
+  <syscall name="pwrite64" number="4201"/>
+  <syscall name="chown" number="4202"/>
+  <syscall name="getcwd" number="4203"/>
+  <syscall name="capget" number="4204"/>
+  <syscall name="capset" number="4205"/>
+  <syscall name="sigaltstack" number="4206"/>
+  <syscall name="sendfile" number="4207"/>
+  <syscall name="getpmsg" number="4208"/>
+  <syscall name="putpmsg" number="4209"/>
+  <syscall name="mmap2" number="4210"/>
+  <syscall name="truncate64" number="4211"/>
+  <syscall name="ftruncate64" number="4212"/>
+  <syscall name="stat64" number="4213"/>
+  <syscall name="lstat64" number="4214"/>
+  <syscall name="fstat64" number="4215"/>
+  <syscall name="pivot_root" number="4216"/>
+  <syscall name="mincore" number="4217"/>
+  <syscall name="madvise" number="4218"/>
+  <syscall name="getdents64" number="4219"/>
+  <syscall name="fcntl64" number="4220"/>
+  <syscall name="gettid" number="4222"/>
+  <syscall name="readahead" number="4223"/>
+  <syscall name="setxattr" number="4224"/>
+  <syscall name="lsetxattr" number="4225"/>
+  <syscall name="fsetxattr" number="4226"/>
+  <syscall name="getxattr" number="4227"/>
+  <syscall name="lgetxattr" number="4228"/>
+  <syscall name="fgetxattr" number="4229"/>
+  <syscall name="listxattr" number="4230"/>
+  <syscall name="llistxattr" number="4231"/>
+  <syscall name="flistxattr" number="4232"/>
+  <syscall name="removexattr" number="4233"/>
+  <syscall name="lremovexattr" number="4234"/>
+  <syscall name="fremovexattr" number="4235"/>
+  <syscall name="tkill" number="4236"/>
+  <syscall name="sendfile64" number="4237"/>
+  <syscall name="futex" number="4238"/>
+  <syscall name="sched_setaffinity" number="4239"/>
+  <syscall name="sched_getaffinity" number="4240"/>
+  <syscall name="io_setup" number="4241"/>
+  <syscall name="io_destroy" number="4242"/>
+  <syscall name="io_getevents" number="4243"/>
+  <syscall name="io_submit" number="4244"/>
+  <syscall name="io_cancel" number="4245"/>
+  <syscall name="exit_group" number="4246"/>
+  <syscall name="lookup_dcookie" number="4247"/>
+  <syscall name="epoll_create" number="4248"/>
+  <syscall name="epoll_ctl" number="4249"/>
+  <syscall name="epoll_wait" number="4250"/>
+  <syscall name="remap_file_pages" number="4251"/>
+  <syscall name="set_tid_address" number="4252"/>
+  <syscall name="restart_syscall" number="4253"/>
+  <syscall name="fadvise64" number="4254"/>
+  <syscall name="statfs64" number="4255"/>
+  <syscall name="fstatfs64" number="4256"/>
+  <syscall name="timer_create" number="4257"/>
+  <syscall name="timer_settime" number="4258"/>
+  <syscall name="timer_gettime" number="4259"/>
+  <syscall name="timer_getoverrun" number="4260"/>
+  <syscall name="timer_delete" number="4261"/>
+  <syscall name="clock_settime" number="4262"/>
+  <syscall name="clock_gettime" number="4263"/>
+  <syscall name="clock_getres" number="4264"/>
+  <syscall name="clock_nanosleep" number="4265"/>
+  <syscall name="tgkill" number="4266"/>
+  <syscall name="utimes" number="4267"/>
+  <syscall name="mbind" number="4268"/>
+  <syscall name="get_mempolicy" number="4269"/>
+  <syscall name="set_mempolicy" number="4270"/>
+  <syscall name="mq_open" number="4271"/>
+  <syscall name="mq_unlink" number="4272"/>
+  <syscall name="mq_timedsend" number="4273"/>
+  <syscall name="mq_timedreceive" number="4274"/>
+  <syscall name="mq_notify" number="4275"/>
+  <syscall name="mq_getsetattr" number="4276"/>
+  <syscall name="vserver" number="4277"/>
+  <syscall name="waitid" number="4278"/>
+  <syscall name="add_key" number="4280"/>
+  <syscall name="request_key" number="4281"/>
+  <syscall name="keyctl" number="4282"/>
+  <syscall name="set_thread_area" number="4283"/>
+  <syscall name="inotify_init" number="4284"/>
+  <syscall name="inotify_add_watch" number="4285"/>
+  <syscall name="inotify_rm_watch" number="4286"/>
+  <syscall name="migrate_pages" number="4287"/>
+  <syscall name="openat" number="4288"/>
+  <syscall name="mkdirat" number="4289"/>
+  <syscall name="mknodat" number="4290"/>
+  <syscall name="fchownat" number="4291"/>
+  <syscall name="futimesat" number="4292"/>
+  <syscall name="fstatat64" number="4293"/>
+  <syscall name="unlinkat" number="4294"/>
+  <syscall name="renameat" number="4295"/>
+  <syscall name="linkat" number="4296"/>
+  <syscall name="symlinkat" number="4297"/>
+  <syscall name="readlinkat" number="4298"/>
+  <syscall name="fchmodat" number="4299"/>
+  <syscall name="faccessat" number="4300"/>
+  <syscall name="pselect6" number="4301"/>
+  <syscall name="ppoll" number="4302"/>
+  <syscall name="unshare" number="4303"/>
+  <syscall name="splice" number="4304"/>
+  <syscall name="sync_file_range" number="4305"/>
+  <syscall name="tee" number="4306"/>
+  <syscall name="vmsplice" number="4307"/>
+  <syscall name="move_pages" number="4308"/>
+  <syscall name="set_robust_list" number="4309"/>
+  <syscall name="get_robust_list" number="4310"/>
+  <syscall name="kexec_load" number="4311"/>
+  <syscall name="getcpu" number="4312"/>
+  <syscall name="epoll_pwait" number="4313"/>
+  <syscall name="ioprio_set" number="4314"/>
+  <syscall name="ioprio_get" number="4315"/>
+  <syscall name="utimensat" number="4316"/>
+  <syscall name="signalfd" number="4317"/>
+  <syscall name="timerfd" number="4318"/>
+  <syscall name="eventfd" number="4319"/>
+  <syscall name="fallocate" number="4320"/>
+  <syscall name="timerfd_create" number="4321"/>
+  <syscall name="timerfd_gettime" number="4322"/>
+  <syscall name="timerfd_settime" number="4323"/>
+  <syscall name="signalfd4" number="4324"/>
+  <syscall name="eventfd2" number="4325"/>
+  <syscall name="epoll_create1" number="4326"/>
+  <syscall name="dup3" number="4327"/>
+  <syscall name="pipe2" number="4328"/>
+  <syscall name="inotify_init1" number="4329"/>
+  <syscall name="preadv" number="4330"/>
+  <syscall name="pwritev" number="4331"/>
+  <syscall name="rt_tgsigqueueinfo" number="4332"/>
+  <syscall name="perf_event_open" number="4333"/>
+  <syscall name="accept4" number="4334"/>
+  <syscall name="recvmmsg" number="4335"/>
+  <syscall name="fanotify_init" number="4336"/>
+  <syscall name="fanotify_mark" number="4337"/>
+  <syscall name="prlimit64" number="4338"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc64-linux.xml ./gdb/syscalls/ppc64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/ppc64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,93 +1,90 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/powerpc/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="waitpid" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="waitpid" number="7" groups="process"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
   <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="break" number="17"/>
-  <syscall name="oldstat" number="18"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="break" number="17" groups="memory"/>
+  <syscall name="oldstat" number="18" groups="file"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
   <syscall name="stime" number="25"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="oldfstat" number="28"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
+  <syscall name="oldfstat" number="28" groups="descriptor"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
   <syscall name="stty" number="31"/>
   <syscall name="gtty" number="32"/>
-  <syscall name="access" number="33"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="ftime" number="35"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
   <syscall name="prof" number="44"/>
-  <syscall name="brk" number="45"/>
+  <syscall name="brk" number="45" groups="memory"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
   <syscall name="lock" number="53"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="mpx" number="56"/>
   <syscall name="setpgid" number="57"/>
   <syscall name="ulimit" number="58"/>
   <syscall name="oldolduname" number="59"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
-  <syscall name="sgetmask" number="68"/>
-  <syscall name="ssetmask" number="69"/>
+  <syscall name="sigaction" number="67" groups="signal"/>
+  <syscall name="sgetmask" number="68" groups="signal"/>
+  <syscall name="ssetmask" number="69" groups="signal"/>
   <syscall name="setreuid" number="70"/>
   <syscall name="setregid" number="71"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrlimit" number="76"/>
@@ -96,78 +93,78 @@
   <syscall name="settimeofday" number="79"/>
   <syscall name="getgroups" number="80"/>
   <syscall name="setgroups" number="81"/>
-  <syscall name="select" number="82"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="oldlstat" number="84"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="select" number="82" groups="descriptor"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="oldlstat" number="84" groups="file"/>
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
+  <syscall name="fchown" number="95" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
   <syscall name="profil" number="98"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
   <syscall name="ioperm" number="101"/>
-  <syscall name="socketcall" number="102"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="olduname" number="109"/>
   <syscall name="iopl" number="110"/>
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/>
   <syscall name="vm86" number="113"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="modify_ldt" number="123"/>
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/>
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/>
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/>
   <syscall name="setfsuid" number="138"/>
   <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="_newselect" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="_llseek" number="140" groups="descriptor"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="_newselect" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -177,57 +174,57 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="setresuid" number="164"/>
   <syscall name="getresuid" number="165"/>
   <syscall name="query_module" number="166"/>
-  <syscall name="poll" number="167"/>
+  <syscall name="poll" number="167" groups="descriptor"/>
   <syscall name="nfsservctl" number="168"/>
   <syscall name="setresgid" number="169"/>
   <syscall name="getresgid" number="170"/>
   <syscall name="prctl" number="171"/>
-  <syscall name="rt_sigreturn" number="172"/>
-  <syscall name="rt_sigaction" number="173"/>
-  <syscall name="rt_sigprocmask" number="174"/>
-  <syscall name="rt_sigpending" number="175"/>
-  <syscall name="rt_sigtimedwait" number="176"/>
-  <syscall name="rt_sigqueueinfo" number="177"/>
-  <syscall name="rt_sigsuspend" number="178"/>
-  <syscall name="pread64" number="179"/>
-  <syscall name="pwrite64" number="180"/>
-  <syscall name="chown" number="181"/>
-  <syscall name="getcwd" number="182"/>
+  <syscall name="rt_sigreturn" number="172" groups="signal"/>
+  <syscall name="rt_sigaction" number="173" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="174" groups="signal"/>
+  <syscall name="rt_sigpending" number="175" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="176" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="177" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="178" groups="signal"/>
+  <syscall name="pread64" number="179" groups="descriptor"/>
+  <syscall name="pwrite64" number="180" groups="descriptor"/>
+  <syscall name="chown" number="181" groups="file"/>
+  <syscall name="getcwd" number="182" groups="file"/>
   <syscall name="capget" number="183"/>
   <syscall name="capset" number="184"/>
-  <syscall name="sigaltstack" number="185"/>
-  <syscall name="sendfile" number="186"/>
+  <syscall name="sigaltstack" number="185" groups="signal"/>
+  <syscall name="sendfile" number="186" groups="descriptor,network"/>
   <syscall name="getpmsg" number="187"/>
   <syscall name="putpmsg" number="188"/>
-  <syscall name="vfork" number="189"/>
+  <syscall name="vfork" number="189" groups="process"/>
   <syscall name="ugetrlimit" number="190"/>
-  <syscall name="readahead" number="191"/>
+  <syscall name="readahead" number="191" groups="descriptor"/>
   <syscall name="pciconfig_read" number="198"/>
   <syscall name="pciconfig_write" number="199"/>
   <syscall name="pciconfig_iobase" number="200"/>
   <syscall name="multiplexer" number="201"/>
-  <syscall name="getdents64" number="202"/>
-  <syscall name="pivot_root" number="203"/>
-  <syscall name="madvise" number="205"/>
-  <syscall name="mincore" number="206"/>
+  <syscall name="getdents64" number="202" groups="descriptor"/>
+  <syscall name="pivot_root" number="203" groups="file"/>
+  <syscall name="madvise" number="205" groups="memory"/>
+  <syscall name="mincore" number="206" groups="memory"/>
   <syscall name="gettid" number="207"/>
-  <syscall name="tkill" number="208"/>
-  <syscall name="setxattr" number="209"/>
-  <syscall name="lsetxattr" number="210"/>
-  <syscall name="fsetxattr" number="211"/>
-  <syscall name="getxattr" number="212"/>
-  <syscall name="lgetxattr" number="213"/>
-  <syscall name="fgetxattr" number="214"/>
-  <syscall name="listxattr" number="215"/>
-  <syscall name="llistxattr" number="216"/>
-  <syscall name="flistxattr" number="217"/>
-  <syscall name="removexattr" number="218"/>
-  <syscall name="lremovexattr" number="219"/>
-  <syscall name="fremovexattr" number="220"/>
+  <syscall name="tkill" number="208" groups="signal"/>
+  <syscall name="setxattr" number="209" groups="file"/>
+  <syscall name="lsetxattr" number="210" groups="file"/>
+  <syscall name="fsetxattr" number="211" groups="descriptor"/>
+  <syscall name="getxattr" number="212" groups="file"/>
+  <syscall name="lgetxattr" number="213" groups="file"/>
+  <syscall name="fgetxattr" number="214" groups="descriptor"/>
+  <syscall name="listxattr" number="215" groups="file"/>
+  <syscall name="llistxattr" number="216" groups="file"/>
+  <syscall name="flistxattr" number="217" groups="descriptor"/>
+  <syscall name="removexattr" number="218" groups="file"/>
+  <syscall name="lremovexattr" number="219" groups="file"/>
+  <syscall name="fremovexattr" number="220" groups="descriptor"/>
   <syscall name="futex" number="221"/>
   <syscall name="sched_setaffinity" number="222"/>
   <syscall name="sched_getaffinity" number="223"/>
@@ -238,13 +235,13 @@
   <syscall name="io_submit" number="230"/>
   <syscall name="io_cancel" number="231"/>
   <syscall name="set_tid_address" number="232"/>
-  <syscall name="fadvise64" number="233"/>
-  <syscall name="exit_group" number="234"/>
+  <syscall name="fadvise64" number="233" groups="descriptor"/>
+  <syscall name="exit_group" number="234" groups="process"/>
   <syscall name="lookup_dcookie" number="235"/>
-  <syscall name="epoll_create" number="236"/>
-  <syscall name="epoll_ctl" number="237"/>
-  <syscall name="epoll_wait" number="238"/>
-  <syscall name="remap_file_pages" number="239"/>
+  <syscall name="epoll_create" number="236" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="237" groups="descriptor"/>
+  <syscall name="epoll_wait" number="238" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="239" groups="memory"/>
   <syscall name="timer_create" number="240"/>
   <syscall name="timer_settime" number="241"/>
   <syscall name="timer_gettime" number="242"/>
@@ -255,15 +252,15 @@
   <syscall name="clock_getres" number="247"/>
   <syscall name="clock_nanosleep" number="248"/>
   <syscall name="swapcontext" number="249"/>
-  <syscall name="tgkill" number="250"/>
-  <syscall name="utimes" number="251"/>
-  <syscall name="statfs64" number="252"/>
-  <syscall name="fstatfs64" number="253"/>
+  <syscall name="tgkill" number="250" groups="signal"/>
+  <syscall name="utimes" number="251" groups="file"/>
+  <syscall name="statfs64" number="252" groups="file"/>
+  <syscall name="fstatfs64" number="253" groups="descriptor"/>
   <syscall name="rtas" number="255"/>
   <syscall name="sys_debug_setcontext" number="256"/>
-  <syscall name="mbind" number="259"/>
-  <syscall name="get_mempolicy" number="260"/>
-  <syscall name="set_mempolicy" number="261"/>
+  <syscall name="mbind" number="259" groups="memory"/>
+  <syscall name="get_mempolicy" number="260" groups="memory"/>
+  <syscall name="set_mempolicy" number="261" groups="memory"/>
   <syscall name="mq_open" number="262"/>
   <syscall name="mq_unlink" number="263"/>
   <syscall name="mq_timedsend" number="264"/>
@@ -274,22 +271,22 @@
   <syscall name="add_key" number="269"/>
   <syscall name="request_key" number="270"/>
   <syscall name="keyctl" number="271"/>
-  <syscall name="waitid" number="272"/>
+  <syscall name="waitid" number="272" groups="process"/>
   <syscall name="ioprio_set" number="273"/>
   <syscall name="ioprio_get" number="274"/>
-  <syscall name="inotify_init" number="275"/>
-  <syscall name="inotify_add_watch" number="276"/>
-  <syscall name="inotify_rm_watch" number="277"/>
+  <syscall name="inotify_init" number="275" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="276" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="277" groups="descriptor"/>
   <syscall name="spu_run" number="278"/>
   <syscall name="spu_create" number="279"/>
-  <syscall name="pselect6" number="280"/>
-  <syscall name="ppoll" number="281"/>
-  <syscall name="unshare" number="282"/>
-  <syscall name="unlinkat" number="286"/>
-  <syscall name="renameat" number="287"/>
-  <syscall name="linkat" number="288"/>
-  <syscall name="symlinkat" number="289"/>
-  <syscall name="readlinkat" number="290"/>
-  <syscall name="fchmodat" number="291"/>
-  <syscall name="faccessat" number="292"/>
+  <syscall name="pselect6" number="280" groups="descriptor"/>
+  <syscall name="ppoll" number="281" groups="descriptor"/>
+  <syscall name="unshare" number="282" groups="process"/>
+  <syscall name="unlinkat" number="286" groups="descriptor,file"/>
+  <syscall name="renameat" number="287" groups="descriptor,file"/>
+  <syscall name="linkat" number="288" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="289" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="290" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="291" groups="descriptor,file"/>
+  <syscall name="faccessat" number="292" groups="descriptor,file"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc64-linux.xml.in ./gdb/syscalls/ppc64-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc64-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/ppc64-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,295 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/powerpc/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="waitpid" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="break" number="17"/>
+  <syscall name="oldstat" number="18"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="oldfstat" number="28"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="stty" number="31"/>
+  <syscall name="gtty" number="32"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="ftime" number="35"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="prof" number="44"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="lock" number="53"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="mpx" number="56"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="ulimit" number="58"/>
+  <syscall name="oldolduname" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="sgetmask" number="68"/>
+  <syscall name="ssetmask" number="69"/>
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrlimit" number="76"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="select" number="82"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="oldlstat" number="84"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="profil" number="98"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="ioperm" number="101"/>
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="olduname" number="109"/>
+  <syscall name="iopl" number="110"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/>
+  <syscall name="vm86" number="113"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="modify_ldt" number="123"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/>
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="_newselect" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="query_module" number="166"/>
+  <syscall name="poll" number="167"/>
+  <syscall name="nfsservctl" number="168"/>
+  <syscall name="setresgid" number="169"/>
+  <syscall name="getresgid" number="170"/>
+  <syscall name="prctl" number="171"/>
+  <syscall name="rt_sigreturn" number="172"/>
+  <syscall name="rt_sigaction" number="173"/>
+  <syscall name="rt_sigprocmask" number="174"/>
+  <syscall name="rt_sigpending" number="175"/>
+  <syscall name="rt_sigtimedwait" number="176"/>
+  <syscall name="rt_sigqueueinfo" number="177"/>
+  <syscall name="rt_sigsuspend" number="178"/>
+  <syscall name="pread64" number="179"/>
+  <syscall name="pwrite64" number="180"/>
+  <syscall name="chown" number="181"/>
+  <syscall name="getcwd" number="182"/>
+  <syscall name="capget" number="183"/>
+  <syscall name="capset" number="184"/>
+  <syscall name="sigaltstack" number="185"/>
+  <syscall name="sendfile" number="186"/>
+  <syscall name="getpmsg" number="187"/>
+  <syscall name="putpmsg" number="188"/>
+  <syscall name="vfork" number="189"/>
+  <syscall name="ugetrlimit" number="190"/>
+  <syscall name="readahead" number="191"/>
+  <syscall name="pciconfig_read" number="198"/>
+  <syscall name="pciconfig_write" number="199"/>
+  <syscall name="pciconfig_iobase" number="200"/>
+  <syscall name="multiplexer" number="201"/>
+  <syscall name="getdents64" number="202"/>
+  <syscall name="pivot_root" number="203"/>
+  <syscall name="madvise" number="205"/>
+  <syscall name="mincore" number="206"/>
+  <syscall name="gettid" number="207"/>
+  <syscall name="tkill" number="208"/>
+  <syscall name="setxattr" number="209"/>
+  <syscall name="lsetxattr" number="210"/>
+  <syscall name="fsetxattr" number="211"/>
+  <syscall name="getxattr" number="212"/>
+  <syscall name="lgetxattr" number="213"/>
+  <syscall name="fgetxattr" number="214"/>
+  <syscall name="listxattr" number="215"/>
+  <syscall name="llistxattr" number="216"/>
+  <syscall name="flistxattr" number="217"/>
+  <syscall name="removexattr" number="218"/>
+  <syscall name="lremovexattr" number="219"/>
+  <syscall name="fremovexattr" number="220"/>
+  <syscall name="futex" number="221"/>
+  <syscall name="sched_setaffinity" number="222"/>
+  <syscall name="sched_getaffinity" number="223"/>
+  <syscall name="tuxcall" number="225"/>
+  <syscall name="io_setup" number="227"/>
+  <syscall name="io_destroy" number="228"/>
+  <syscall name="io_getevents" number="229"/>
+  <syscall name="io_submit" number="230"/>
+  <syscall name="io_cancel" number="231"/>
+  <syscall name="set_tid_address" number="232"/>
+  <syscall name="fadvise64" number="233"/>
+  <syscall name="exit_group" number="234"/>
+  <syscall name="lookup_dcookie" number="235"/>
+  <syscall name="epoll_create" number="236"/>
+  <syscall name="epoll_ctl" number="237"/>
+  <syscall name="epoll_wait" number="238"/>
+  <syscall name="remap_file_pages" number="239"/>
+  <syscall name="timer_create" number="240"/>
+  <syscall name="timer_settime" number="241"/>
+  <syscall name="timer_gettime" number="242"/>
+  <syscall name="timer_getoverrun" number="243"/>
+  <syscall name="timer_delete" number="244"/>
+  <syscall name="clock_settime" number="245"/>
+  <syscall name="clock_gettime" number="246"/>
+  <syscall name="clock_getres" number="247"/>
+  <syscall name="clock_nanosleep" number="248"/>
+  <syscall name="swapcontext" number="249"/>
+  <syscall name="tgkill" number="250"/>
+  <syscall name="utimes" number="251"/>
+  <syscall name="statfs64" number="252"/>
+  <syscall name="fstatfs64" number="253"/>
+  <syscall name="rtas" number="255"/>
+  <syscall name="sys_debug_setcontext" number="256"/>
+  <syscall name="mbind" number="259"/>
+  <syscall name="get_mempolicy" number="260"/>
+  <syscall name="set_mempolicy" number="261"/>
+  <syscall name="mq_open" number="262"/>
+  <syscall name="mq_unlink" number="263"/>
+  <syscall name="mq_timedsend" number="264"/>
+  <syscall name="mq_timedreceive" number="265"/>
+  <syscall name="mq_notify" number="266"/>
+  <syscall name="mq_getsetattr" number="267"/>
+  <syscall name="kexec_load" number="268"/>
+  <syscall name="add_key" number="269"/>
+  <syscall name="request_key" number="270"/>
+  <syscall name="keyctl" number="271"/>
+  <syscall name="waitid" number="272"/>
+  <syscall name="ioprio_set" number="273"/>
+  <syscall name="ioprio_get" number="274"/>
+  <syscall name="inotify_init" number="275"/>
+  <syscall name="inotify_add_watch" number="276"/>
+  <syscall name="inotify_rm_watch" number="277"/>
+  <syscall name="spu_run" number="278"/>
+  <syscall name="spu_create" number="279"/>
+  <syscall name="pselect6" number="280"/>
+  <syscall name="ppoll" number="281"/>
+  <syscall name="unshare" number="282"/>
+  <syscall name="unlinkat" number="286"/>
+  <syscall name="renameat" number="287"/>
+  <syscall name="linkat" number="288"/>
+  <syscall name="symlinkat" number="289"/>
+  <syscall name="readlinkat" number="290"/>
+  <syscall name="fchmodat" number="291"/>
+  <syscall name="faccessat" number="292"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc-linux.xml ./gdb/syscalls/ppc-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/ppc-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,93 +1,90 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/powerpc/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="waitpid" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="waitpid" number="7" groups="process"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
   <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="break" number="17"/>
-  <syscall name="oldstat" number="18"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="break" number="17" groups="memory"/>
+  <syscall name="oldstat" number="18" groups="file"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
   <syscall name="stime" number="25"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="oldfstat" number="28"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
+  <syscall name="oldfstat" number="28" groups="descriptor"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
   <syscall name="stty" number="31"/>
   <syscall name="gtty" number="32"/>
-  <syscall name="access" number="33"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="ftime" number="35"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
   <syscall name="prof" number="44"/>
-  <syscall name="brk" number="45"/>
+  <syscall name="brk" number="45" groups="memory"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
   <syscall name="lock" number="53"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="mpx" number="56"/>
   <syscall name="setpgid" number="57"/>
   <syscall name="ulimit" number="58"/>
   <syscall name="oldolduname" number="59"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
-  <syscall name="sgetmask" number="68"/>
-  <syscall name="ssetmask" number="69"/>
+  <syscall name="sigaction" number="67" groups="signal"/>
+  <syscall name="sgetmask" number="68" groups="signal"/>
+  <syscall name="ssetmask" number="69" groups="signal"/>
   <syscall name="setreuid" number="70"/>
   <syscall name="setregid" number="71"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrlimit" number="76"/>
@@ -96,78 +93,78 @@
   <syscall name="settimeofday" number="79"/>
   <syscall name="getgroups" number="80"/>
   <syscall name="setgroups" number="81"/>
-  <syscall name="select" number="82"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="oldlstat" number="84"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="select" number="82" groups="descriptor"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="oldlstat" number="84" groups="file"/>
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
+  <syscall name="fchown" number="95" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
   <syscall name="profil" number="98"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
   <syscall name="ioperm" number="101"/>
-  <syscall name="socketcall" number="102"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="olduname" number="109"/>
   <syscall name="iopl" number="110"/>
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/>
   <syscall name="vm86" number="113"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="modify_ldt" number="123"/>
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/>
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/>
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/>
   <syscall name="setfsuid" number="138"/>
   <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="_newselect" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="_llseek" number="140" groups="descriptor"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="_newselect" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -177,82 +174,82 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="setresuid" number="164"/>
   <syscall name="getresuid" number="165"/>
   <syscall name="query_module" number="166"/>
-  <syscall name="poll" number="167"/>
+  <syscall name="poll" number="167" groups="descriptor"/>
   <syscall name="nfsservctl" number="168"/>
   <syscall name="setresgid" number="169"/>
   <syscall name="getresgid" number="170"/>
   <syscall name="prctl" number="171"/>
-  <syscall name="rt_sigreturn" number="172"/>
-  <syscall name="rt_sigaction" number="173"/>
-  <syscall name="rt_sigprocmask" number="174"/>
-  <syscall name="rt_sigpending" number="175"/>
-  <syscall name="rt_sigtimedwait" number="176"/>
-  <syscall name="rt_sigqueueinfo" number="177"/>
-  <syscall name="rt_sigsuspend" number="178"/>
-  <syscall name="pread64" number="179"/>
-  <syscall name="pwrite64" number="180"/>
-  <syscall name="chown" number="181"/>
-  <syscall name="getcwd" number="182"/>
+  <syscall name="rt_sigreturn" number="172" groups="signal"/>
+  <syscall name="rt_sigaction" number="173" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="174" groups="signal"/>
+  <syscall name="rt_sigpending" number="175" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="176" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="177" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="178" groups="signal"/>
+  <syscall name="pread64" number="179" groups="descriptor"/>
+  <syscall name="pwrite64" number="180" groups="descriptor"/>
+  <syscall name="chown" number="181" groups="file"/>
+  <syscall name="getcwd" number="182" groups="file"/>
   <syscall name="capget" number="183"/>
   <syscall name="capset" number="184"/>
-  <syscall name="sigaltstack" number="185"/>
-  <syscall name="sendfile" number="186"/>
+  <syscall name="sigaltstack" number="185" groups="signal"/>
+  <syscall name="sendfile" number="186" groups="descriptor,network"/>
   <syscall name="getpmsg" number="187"/>
   <syscall name="putpmsg" number="188"/>
-  <syscall name="vfork" number="189"/>
+  <syscall name="vfork" number="189" groups="process"/>
   <syscall name="ugetrlimit" number="190"/>
-  <syscall name="readahead" number="191"/>
-  <syscall name="mmap2" number="192"/>
-  <syscall name="truncate64" number="193"/>
-  <syscall name="ftruncate64" number="194"/>
-  <syscall name="stat64" number="195"/>
-  <syscall name="lstat64" number="196"/>
-  <syscall name="fstat64" number="197"/>
+  <syscall name="readahead" number="191" groups="descriptor"/>
+  <syscall name="mmap2" number="192" groups="descriptor,memory"/>
+  <syscall name="truncate64" number="193" groups="file"/>
+  <syscall name="ftruncate64" number="194" groups="descriptor"/>
+  <syscall name="stat64" number="195" groups="file"/>
+  <syscall name="lstat64" number="196" groups="file"/>
+  <syscall name="fstat64" number="197" groups="descriptor"/>
   <syscall name="pciconfig_read" number="198"/>
   <syscall name="pciconfig_write" number="199"/>
   <syscall name="pciconfig_iobase" number="200"/>
   <syscall name="multiplexer" number="201"/>
-  <syscall name="getdents64" number="202"/>
-  <syscall name="pivot_root" number="203"/>
-  <syscall name="fcntl64" number="204"/>
-  <syscall name="madvise" number="205"/>
-  <syscall name="mincore" number="206"/>
+  <syscall name="getdents64" number="202" groups="descriptor"/>
+  <syscall name="pivot_root" number="203" groups="file"/>
+  <syscall name="fcntl64" number="204" groups="descriptor"/>
+  <syscall name="madvise" number="205" groups="memory"/>
+  <syscall name="mincore" number="206" groups="memory"/>
   <syscall name="gettid" number="207"/>
-  <syscall name="tkill" number="208"/>
-  <syscall name="setxattr" number="209"/>
-  <syscall name="lsetxattr" number="210"/>
-  <syscall name="fsetxattr" number="211"/>
-  <syscall name="getxattr" number="212"/>
-  <syscall name="lgetxattr" number="213"/>
-  <syscall name="fgetxattr" number="214"/>
-  <syscall name="listxattr" number="215"/>
-  <syscall name="llistxattr" number="216"/>
-  <syscall name="flistxattr" number="217"/>
-  <syscall name="removexattr" number="218"/>
-  <syscall name="lremovexattr" number="219"/>
-  <syscall name="fremovexattr" number="220"/>
+  <syscall name="tkill" number="208" groups="signal"/>
+  <syscall name="setxattr" number="209" groups="file"/>
+  <syscall name="lsetxattr" number="210" groups="file"/>
+  <syscall name="fsetxattr" number="211" groups="descriptor"/>
+  <syscall name="getxattr" number="212" groups="file"/>
+  <syscall name="lgetxattr" number="213" groups="file"/>
+  <syscall name="fgetxattr" number="214" groups="descriptor"/>
+  <syscall name="listxattr" number="215" groups="file"/>
+  <syscall name="llistxattr" number="216" groups="file"/>
+  <syscall name="flistxattr" number="217" groups="descriptor"/>
+  <syscall name="removexattr" number="218" groups="file"/>
+  <syscall name="lremovexattr" number="219" groups="file"/>
+  <syscall name="fremovexattr" number="220" groups="descriptor"/>
   <syscall name="futex" number="221"/>
   <syscall name="sched_setaffinity" number="222"/>
   <syscall name="sched_getaffinity" number="223"/>
   <syscall name="tuxcall" number="225"/>
-  <syscall name="sendfile64" number="226"/>
+  <syscall name="sendfile64" number="226" groups="descriptor,network"/>
   <syscall name="io_setup" number="227"/>
   <syscall name="io_destroy" number="228"/>
   <syscall name="io_getevents" number="229"/>
   <syscall name="io_submit" number="230"/>
   <syscall name="io_cancel" number="231"/>
   <syscall name="set_tid_address" number="232"/>
-  <syscall name="fadvise64" number="233"/>
-  <syscall name="exit_group" number="234"/>
+  <syscall name="fadvise64" number="233" groups="descriptor"/>
+  <syscall name="exit_group" number="234" groups="process"/>
   <syscall name="lookup_dcookie" number="235"/>
-  <syscall name="epoll_create" number="236"/>
-  <syscall name="epoll_ctl" number="237"/>
-  <syscall name="epoll_wait" number="238"/>
-  <syscall name="remap_file_pages" number="239"/>
+  <syscall name="epoll_create" number="236" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="237" groups="descriptor"/>
+  <syscall name="epoll_wait" number="238" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="239" groups="memory"/>
   <syscall name="timer_create" number="240"/>
   <syscall name="timer_settime" number="241"/>
   <syscall name="timer_gettime" number="242"/>
@@ -263,16 +260,16 @@
   <syscall name="clock_getres" number="247"/>
   <syscall name="clock_nanosleep" number="248"/>
   <syscall name="swapcontext" number="249"/>
-  <syscall name="tgkill" number="250"/>
-  <syscall name="utimes" number="251"/>
-  <syscall name="statfs64" number="252"/>
-  <syscall name="fstatfs64" number="253"/>
-  <syscall name="fadvise64_64" number="254"/>
+  <syscall name="tgkill" number="250" groups="signal"/>
+  <syscall name="utimes" number="251" groups="file"/>
+  <syscall name="statfs64" number="252" groups="file"/>
+  <syscall name="fstatfs64" number="253" groups="descriptor"/>
+  <syscall name="fadvise64_64" number="254" groups="descriptor"/>
   <syscall name="rtas" number="255"/>
   <syscall name="sys_debug_setcontext" number="256"/>
-  <syscall name="mbind" number="259"/>
-  <syscall name="get_mempolicy" number="260"/>
-  <syscall name="set_mempolicy" number="261"/>
+  <syscall name="mbind" number="259" groups="memory"/>
+  <syscall name="get_mempolicy" number="260" groups="memory"/>
+  <syscall name="set_mempolicy" number="261" groups="memory"/>
   <syscall name="mq_open" number="262"/>
   <syscall name="mq_unlink" number="263"/>
   <syscall name="mq_timedsend" number="264"/>
@@ -283,28 +280,28 @@
   <syscall name="add_key" number="269"/>
   <syscall name="request_key" number="270"/>
   <syscall name="keyctl" number="271"/>
-  <syscall name="waitid" number="272"/>
+  <syscall name="waitid" number="272" groups="process"/>
   <syscall name="ioprio_set" number="273"/>
   <syscall name="ioprio_get" number="274"/>
-  <syscall name="inotify_init" number="275"/>
-  <syscall name="inotify_add_watch" number="276"/>
-  <syscall name="inotify_rm_watch" number="277"/>
+  <syscall name="inotify_init" number="275" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="276" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="277" groups="descriptor"/>
   <syscall name="spu_run" number="278"/>
   <syscall name="spu_create" number="279"/>
-  <syscall name="pselect6" number="280"/>
-  <syscall name="ppoll" number="281"/>
-  <syscall name="unshare" number="282"/>
-  <syscall name="openat" number="286"/>
-  <syscall name="mkdirat" number="287"/>
-  <syscall name="mknodat" number="288"/>
-  <syscall name="fchownat" number="289"/>
-  <syscall name="futimesat" number="290"/>
-  <syscall name="fstatat64" number="291"/>
-  <syscall name="unlinkat" number="292"/>
-  <syscall name="renameat" number="293"/>
-  <syscall name="linkat" number="294"/>
-  <syscall name="symlinkat" number="295"/>
-  <syscall name="readlinkat" number="296"/>
-  <syscall name="fchmodat" number="297"/>
-  <syscall name="faccessat" number="298"/>
+  <syscall name="pselect6" number="280" groups="descriptor"/>
+  <syscall name="ppoll" number="281" groups="descriptor"/>
+  <syscall name="unshare" number="282" groups="process"/>
+  <syscall name="openat" number="286" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="287" groups="descriptor,file"/>
+  <syscall name="mknodat" number="288" groups="descriptor,file"/>
+  <syscall name="fchownat" number="289" groups="descriptor,file"/>
+  <syscall name="futimesat" number="290" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="291" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="292" groups="descriptor,file"/>
+  <syscall name="renameat" number="293" groups="descriptor,file"/>
+  <syscall name="linkat" number="294" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="295" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="296" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="297" groups="descriptor,file"/>
+  <syscall name="faccessat" number="298" groups="descriptor,file"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc-linux.xml.in ./gdb/syscalls/ppc-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/ppc-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/ppc-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,310 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/powerpc/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="waitpid" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="break" number="17"/>
+  <syscall name="oldstat" number="18"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="oldfstat" number="28"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="stty" number="31"/>
+  <syscall name="gtty" number="32"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="ftime" number="35"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="prof" number="44"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="lock" number="53"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="mpx" number="56"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="ulimit" number="58"/>
+  <syscall name="oldolduname" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="sgetmask" number="68"/>
+  <syscall name="ssetmask" number="69"/>
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrlimit" number="76"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="select" number="82"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="oldlstat" number="84"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="profil" number="98"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="ioperm" number="101"/>
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="olduname" number="109"/>
+  <syscall name="iopl" number="110"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/>
+  <syscall name="vm86" number="113"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="modify_ldt" number="123"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/>
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="_newselect" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="query_module" number="166"/>
+  <syscall name="poll" number="167"/>
+  <syscall name="nfsservctl" number="168"/>
+  <syscall name="setresgid" number="169"/>
+  <syscall name="getresgid" number="170"/>
+  <syscall name="prctl" number="171"/>
+  <syscall name="rt_sigreturn" number="172"/>
+  <syscall name="rt_sigaction" number="173"/>
+  <syscall name="rt_sigprocmask" number="174"/>
+  <syscall name="rt_sigpending" number="175"/>
+  <syscall name="rt_sigtimedwait" number="176"/>
+  <syscall name="rt_sigqueueinfo" number="177"/>
+  <syscall name="rt_sigsuspend" number="178"/>
+  <syscall name="pread64" number="179"/>
+  <syscall name="pwrite64" number="180"/>
+  <syscall name="chown" number="181"/>
+  <syscall name="getcwd" number="182"/>
+  <syscall name="capget" number="183"/>
+  <syscall name="capset" number="184"/>
+  <syscall name="sigaltstack" number="185"/>
+  <syscall name="sendfile" number="186"/>
+  <syscall name="getpmsg" number="187"/>
+  <syscall name="putpmsg" number="188"/>
+  <syscall name="vfork" number="189"/>
+  <syscall name="ugetrlimit" number="190"/>
+  <syscall name="readahead" number="191"/>
+  <syscall name="mmap2" number="192"/>
+  <syscall name="truncate64" number="193"/>
+  <syscall name="ftruncate64" number="194"/>
+  <syscall name="stat64" number="195"/>
+  <syscall name="lstat64" number="196"/>
+  <syscall name="fstat64" number="197"/>
+  <syscall name="pciconfig_read" number="198"/>
+  <syscall name="pciconfig_write" number="199"/>
+  <syscall name="pciconfig_iobase" number="200"/>
+  <syscall name="multiplexer" number="201"/>
+  <syscall name="getdents64" number="202"/>
+  <syscall name="pivot_root" number="203"/>
+  <syscall name="fcntl64" number="204"/>
+  <syscall name="madvise" number="205"/>
+  <syscall name="mincore" number="206"/>
+  <syscall name="gettid" number="207"/>
+  <syscall name="tkill" number="208"/>
+  <syscall name="setxattr" number="209"/>
+  <syscall name="lsetxattr" number="210"/>
+  <syscall name="fsetxattr" number="211"/>
+  <syscall name="getxattr" number="212"/>
+  <syscall name="lgetxattr" number="213"/>
+  <syscall name="fgetxattr" number="214"/>
+  <syscall name="listxattr" number="215"/>
+  <syscall name="llistxattr" number="216"/>
+  <syscall name="flistxattr" number="217"/>
+  <syscall name="removexattr" number="218"/>
+  <syscall name="lremovexattr" number="219"/>
+  <syscall name="fremovexattr" number="220"/>
+  <syscall name="futex" number="221"/>
+  <syscall name="sched_setaffinity" number="222"/>
+  <syscall name="sched_getaffinity" number="223"/>
+  <syscall name="tuxcall" number="225"/>
+  <syscall name="sendfile64" number="226"/>
+  <syscall name="io_setup" number="227"/>
+  <syscall name="io_destroy" number="228"/>
+  <syscall name="io_getevents" number="229"/>
+  <syscall name="io_submit" number="230"/>
+  <syscall name="io_cancel" number="231"/>
+  <syscall name="set_tid_address" number="232"/>
+  <syscall name="fadvise64" number="233"/>
+  <syscall name="exit_group" number="234"/>
+  <syscall name="lookup_dcookie" number="235"/>
+  <syscall name="epoll_create" number="236"/>
+  <syscall name="epoll_ctl" number="237"/>
+  <syscall name="epoll_wait" number="238"/>
+  <syscall name="remap_file_pages" number="239"/>
+  <syscall name="timer_create" number="240"/>
+  <syscall name="timer_settime" number="241"/>
+  <syscall name="timer_gettime" number="242"/>
+  <syscall name="timer_getoverrun" number="243"/>
+  <syscall name="timer_delete" number="244"/>
+  <syscall name="clock_settime" number="245"/>
+  <syscall name="clock_gettime" number="246"/>
+  <syscall name="clock_getres" number="247"/>
+  <syscall name="clock_nanosleep" number="248"/>
+  <syscall name="swapcontext" number="249"/>
+  <syscall name="tgkill" number="250"/>
+  <syscall name="utimes" number="251"/>
+  <syscall name="statfs64" number="252"/>
+  <syscall name="fstatfs64" number="253"/>
+  <syscall name="fadvise64_64" number="254"/>
+  <syscall name="rtas" number="255"/>
+  <syscall name="sys_debug_setcontext" number="256"/>
+  <syscall name="mbind" number="259"/>
+  <syscall name="get_mempolicy" number="260"/>
+  <syscall name="set_mempolicy" number="261"/>
+  <syscall name="mq_open" number="262"/>
+  <syscall name="mq_unlink" number="263"/>
+  <syscall name="mq_timedsend" number="264"/>
+  <syscall name="mq_timedreceive" number="265"/>
+  <syscall name="mq_notify" number="266"/>
+  <syscall name="mq_getsetattr" number="267"/>
+  <syscall name="kexec_load" number="268"/>
+  <syscall name="add_key" number="269"/>
+  <syscall name="request_key" number="270"/>
+  <syscall name="keyctl" number="271"/>
+  <syscall name="waitid" number="272"/>
+  <syscall name="ioprio_set" number="273"/>
+  <syscall name="ioprio_get" number="274"/>
+  <syscall name="inotify_init" number="275"/>
+  <syscall name="inotify_add_watch" number="276"/>
+  <syscall name="inotify_rm_watch" number="277"/>
+  <syscall name="spu_run" number="278"/>
+  <syscall name="spu_create" number="279"/>
+  <syscall name="pselect6" number="280"/>
+  <syscall name="ppoll" number="281"/>
+  <syscall name="unshare" number="282"/>
+  <syscall name="openat" number="286"/>
+  <syscall name="mkdirat" number="287"/>
+  <syscall name="mknodat" number="288"/>
+  <syscall name="fchownat" number="289"/>
+  <syscall name="futimesat" number="290"/>
+  <syscall name="fstatat64" number="291"/>
+  <syscall name="unlinkat" number="292"/>
+  <syscall name="renameat" number="293"/>
+  <syscall name="linkat" number="294"/>
+  <syscall name="symlinkat" number="295"/>
+  <syscall name="readlinkat" number="296"/>
+  <syscall name="fchmodat" number="297"/>
+  <syscall name="faccessat" number="298"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390-linux.xml ./gdb/syscalls/s390-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/s390-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,79 +1,76 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
 
      /usr/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
   <syscall name="restart_syscall" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
   <syscall name="time" number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
   <syscall name="stime" number="25"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
-  <syscall name="access" number="33"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
-  <syscall name="brk" number="45"/>
+  <syscall name="brk" number="45" groups="memory"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="setpgid" number="57"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
+  <syscall name="sigaction" number="67" groups="signal"/>
   <syscall name="setreuid" number="70"/>
   <syscall name="setregid" number="71"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrlimit" number="76"/>
@@ -82,72 +79,72 @@
   <syscall name="settimeofday" number="79"/>
   <syscall name="getgroups" number="80"/>
   <syscall name="setgroups" number="81"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
-  <syscall name="fchown" number="95"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
+  <syscall name="fchown" number="95" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
   <syscall name="ioperm" number="101"/>
-  <syscall name="socketcall" number="102"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="lookup_dcookie" number="110"/>
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/>
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/>
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/>
   <syscall name="setfsuid" number="138"/>
   <syscall name="setfsgid" number="139"/>
-  <syscall name="_llseek" number="140"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="_newselect" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="_llseek" number="140" groups="descriptor"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="_newselect" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -157,41 +154,41 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="setresuid" number="164"/>
   <syscall name="getresuid" number="165"/>
   <syscall name="query_module" number="167"/>
-  <syscall name="poll" number="168"/>
+  <syscall name="poll" number="168" groups="descriptor"/>
   <syscall name="nfsservctl" number="169"/>
   <syscall name="setresgid" number="170"/>
   <syscall name="getresgid" number="171"/>
   <syscall name="prctl" number="172"/>
-  <syscall name="rt_sigreturn" number="173"/>
-  <syscall name="rt_sigaction" number="174"/>
-  <syscall name="rt_sigprocmask" number="175"/>
-  <syscall name="rt_sigpending" number="176"/>
-  <syscall name="rt_sigtimedwait" number="177"/>
-  <syscall name="rt_sigqueueinfo" number="178"/>
-  <syscall name="rt_sigsuspend" number="179"/>
-  <syscall name="pread64" number="180"/>
-  <syscall name="pwrite64" number="181"/>
-  <syscall name="chown" number="182"/>
-  <syscall name="getcwd" number="183"/>
+  <syscall name="rt_sigreturn" number="173" groups="signal"/>
+  <syscall name="rt_sigaction" number="174" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="175" groups="signal"/>
+  <syscall name="rt_sigpending" number="176" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="177" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="178" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="179" groups="signal"/>
+  <syscall name="pread64" number="180" groups="descriptor"/>
+  <syscall name="pwrite64" number="181" groups="descriptor"/>
+  <syscall name="chown" number="182" groups="file"/>
+  <syscall name="getcwd" number="183" groups="file"/>
   <syscall name="capget" number="184"/>
   <syscall name="capset" number="185"/>
-  <syscall name="sigaltstack" number="186"/>
-  <syscall name="sendfile" number="187"/>
+  <syscall name="sigaltstack" number="186" groups="signal"/>
+  <syscall name="sendfile" number="187" groups="descriptor,network"/>
   <syscall name="getpmsg" number="188"/>
   <syscall name="putpmsg" number="189"/>
-  <syscall name="vfork" number="190"/>
+  <syscall name="vfork" number="190" groups="process"/>
   <syscall name="ugetrlimit" number="191"/>
-  <syscall name="mmap2" number="192"/>
-  <syscall name="truncate64" number="193"/>
-  <syscall name="ftruncate64" number="194"/>
-  <syscall name="stat64" number="195"/>
-  <syscall name="lstat64" number="196"/>
-  <syscall name="fstat64" number="197"/>
-  <syscall name="lchown32" number="198"/>
+  <syscall name="mmap2" number="192" groups="descriptor,memory"/>
+  <syscall name="truncate64" number="193" groups="file"/>
+  <syscall name="ftruncate64" number="194" groups="descriptor"/>
+  <syscall name="stat64" number="195" groups="file"/>
+  <syscall name="lstat64" number="196" groups="file"/>
+  <syscall name="fstat64" number="197" groups="descriptor"/>
+  <syscall name="lchown32" number="198" groups="file"/>
   <syscall name="getuid32" number="199"/>
   <syscall name="getgid32" number="200"/>
   <syscall name="geteuid32" number="201"/>
@@ -200,52 +197,52 @@
   <syscall name="setregid32" number="204"/>
   <syscall name="getgroups32" number="205"/>
   <syscall name="setgroups32" number="206"/>
-  <syscall name="fchown32" number="207"/>
+  <syscall name="fchown32" number="207" groups="descriptor"/>
   <syscall name="setresuid32" number="208"/>
   <syscall name="getresuid32" number="209"/>
   <syscall name="setresgid32" number="210"/>
   <syscall name="getresgid32" number="211"/>
-  <syscall name="chown32" number="212"/>
+  <syscall name="chown32" number="212" groups="file"/>
   <syscall name="setuid32" number="213"/>
   <syscall name="setgid32" number="214"/>
   <syscall name="setfsuid32" number="215"/>
   <syscall name="setfsgid32" number="216"/>
-  <syscall name="pivot_root" number="217"/>
-  <syscall name="mincore" number="218"/>
-  <syscall name="madvise" number="219"/>
-  <syscall name="getdents64" number="220"/>
-  <syscall name="fcntl64" number="221"/>
-  <syscall name="readahead" number="222"/>
-  <syscall name="sendfile64" number="223"/>
-  <syscall name="setxattr" number="224"/>
-  <syscall name="lsetxattr" number="225"/>
-  <syscall name="fsetxattr" number="226"/>
-  <syscall name="getxattr" number="227"/>
-  <syscall name="lgetxattr" number="228"/>
-  <syscall name="fgetxattr" number="229"/>
-  <syscall name="listxattr" number="230"/>
-  <syscall name="llistxattr" number="231"/>
-  <syscall name="flistxattr" number="232"/>
-  <syscall name="removexattr" number="233"/>
-  <syscall name="lremovexattr" number="234"/>
-  <syscall name="fremovexattr" number="235"/>
+  <syscall name="pivot_root" number="217" groups="file"/>
+  <syscall name="mincore" number="218" groups="memory"/>
+  <syscall name="madvise" number="219" groups="memory"/>
+  <syscall name="getdents64" number="220" groups="descriptor"/>
+  <syscall name="fcntl64" number="221" groups="descriptor"/>
+  <syscall name="readahead" number="222" groups="descriptor"/>
+  <syscall name="sendfile64" number="223" groups="descriptor,network"/>
+  <syscall name="setxattr" number="224" groups="file"/>
+  <syscall name="lsetxattr" number="225" groups="file"/>
+  <syscall name="fsetxattr" number="226" groups="descriptor"/>
+  <syscall name="getxattr" number="227" groups="file"/>
+  <syscall name="lgetxattr" number="228" groups="file"/>
+  <syscall name="fgetxattr" number="229" groups="descriptor"/>
+  <syscall name="listxattr" number="230" groups="file"/>
+  <syscall name="llistxattr" number="231" groups="file"/>
+  <syscall name="flistxattr" number="232" groups="descriptor"/>
+  <syscall name="removexattr" number="233" groups="file"/>
+  <syscall name="lremovexattr" number="234" groups="file"/>
+  <syscall name="fremovexattr" number="235" groups="descriptor"/>
   <syscall name="gettid" number="236"/>
-  <syscall name="tkill" number="237"/>
+  <syscall name="tkill" number="237" groups="signal"/>
   <syscall name="futex" number="238"/>
   <syscall name="sched_setaffinity" number="239"/>
   <syscall name="sched_getaffinity" number="240"/>
-  <syscall name="tgkill" number="241"/>
+  <syscall name="tgkill" number="241" groups="signal"/>
   <syscall name="io_setup" number="243"/>
   <syscall name="io_destroy" number="244"/>
   <syscall name="io_getevents" number="245"/>
   <syscall name="io_submit" number="246"/>
   <syscall name="io_cancel" number="247"/>
-  <syscall name="exit_group" number="248"/>
-  <syscall name="epoll_create" number="249"/>
-  <syscall name="epoll_ctl" number="250"/>
-  <syscall name="epoll_wait" number="251"/>
+  <syscall name="exit_group" number="248" groups="process"/>
+  <syscall name="epoll_create" number="249" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="250" groups="descriptor"/>
+  <syscall name="epoll_wait" number="251" groups="descriptor"/>
   <syscall name="set_tid_address" number="252"/>
-  <syscall name="fadvise64" number="253"/>
+  <syscall name="fadvise64" number="253" groups="descriptor"/>
   <syscall name="timer_create" number="254"/>
   <syscall name="timer_settime" number="255"/>
   <syscall name="timer_gettime" number="256"/>
@@ -255,10 +252,13 @@
   <syscall name="clock_gettime" number="260"/>
   <syscall name="clock_getres" number="261"/>
   <syscall name="clock_nanosleep" number="262"/>
-  <syscall name="fadvise64_64" number="264"/>
-  <syscall name="statfs64" number="265"/>
-  <syscall name="fstatfs64" number="266"/>
-  <syscall name="remap_file_pages" number="267"/>
+  <syscall name="fadvise64_64" number="264" groups="descriptor"/>
+  <syscall name="statfs64" number="265" groups="file"/>
+  <syscall name="fstatfs64" number="266" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="267" groups="memory"/>
+  <syscall name="mbind" number="268" groups="memory"/>
+  <syscall name="get_mempolicy" number="269" groups="memory"/>
+  <syscall name="set_mempolicy" number="270" groups="memory"/>
   <syscall name="mq_open" number="271"/>
   <syscall name="mq_unlink" number="272"/>
   <syscall name="mq_timedsend" number="273"/>
@@ -269,66 +269,68 @@
   <syscall name="add_key" number="278"/>
   <syscall name="request_key" number="279"/>
   <syscall name="keyctl" number="280"/>
-  <syscall name="waitid" number="281"/>
+  <syscall name="waitid" number="281" groups="process"/>
   <syscall name="ioprio_set" number="282"/>
   <syscall name="ioprio_get" number="283"/>
-  <syscall name="inotify_init" number="284"/>
-  <syscall name="inotify_add_watch" number="285"/>
-  <syscall name="inotify_rm_watch" number="286"/>
-  <syscall name="openat" number="288"/>
-  <syscall name="mkdirat" number="289"/>
-  <syscall name="mknodat" number="290"/>
-  <syscall name="fchownat" number="291"/>
-  <syscall name="futimesat" number="292"/>
-  <syscall name="fstatat64" number="293"/>
-  <syscall name="unlinkat" number="294"/>
-  <syscall name="renameat" number="295"/>
-  <syscall name="linkat" number="296"/>
-  <syscall name="symlinkat" number="297"/>
-  <syscall name="readlinkat" number="298"/>
-  <syscall name="fchmodat" number="299"/>
-  <syscall name="faccessat" number="300"/>
-  <syscall name="pselect6" number="301"/>
-  <syscall name="ppoll" number="302"/>
-  <syscall name="unshare" number="303"/>
+  <syscall name="inotify_init" number="284" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="285" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="286" groups="descriptor"/>
+  <syscall name="migrate_pages" number="287" groups="memory"/>
+  <syscall name="openat" number="288" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="289" groups="descriptor,file"/>
+  <syscall name="mknodat" number="290" groups="descriptor,file"/>
+  <syscall name="fchownat" number="291" groups="descriptor,file"/>
+  <syscall name="futimesat" number="292" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="293" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="294" groups="descriptor,file"/>
+  <syscall name="renameat" number="295" groups="descriptor,file"/>
+  <syscall name="linkat" number="296" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="297" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="298" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="299" groups="descriptor,file"/>
+  <syscall name="faccessat" number="300" groups="descriptor,file"/>
+  <syscall name="pselect6" number="301" groups="descriptor"/>
+  <syscall name="ppoll" number="302" groups="descriptor"/>
+  <syscall name="unshare" number="303" groups="process"/>
   <syscall name="set_robust_list" number="304"/>
   <syscall name="get_robust_list" number="305"/>
-  <syscall name="splice" number="306"/>
-  <syscall name="sync_file_range" number="307"/>
-  <syscall name="tee" number="308"/>
-  <syscall name="vmsplice" number="309"/>
+  <syscall name="splice" number="306" groups="descriptor"/>
+  <syscall name="sync_file_range" number="307" groups="descriptor"/>
+  <syscall name="tee" number="308" groups="descriptor"/>
+  <syscall name="vmsplice" number="309" groups="descriptor"/>
+  <syscall name="move_pages" number="310" groups="memory"/>
   <syscall name="getcpu" number="311"/>
-  <syscall name="epoll_pwait" number="312"/>
-  <syscall name="utimes" number="313"/>
-  <syscall name="fallocate" number="314"/>
-  <syscall name="utimensat" number="315"/>
-  <syscall name="signalfd" number="316"/>
-  <syscall name="timerfd" number="317"/>
-  <syscall name="eventfd" number="318"/>
-  <syscall name="timerfd_create" number="319"/>
-  <syscall name="timerfd_settime" number="320"/>
-  <syscall name="timerfd_gettime" number="321"/>
-  <syscall name="signalfd4" number="322"/>
-  <syscall name="eventfd2" number="323"/>
-  <syscall name="inotify_init1" number="324"/>
-  <syscall name="pipe2" number="325"/>
-  <syscall name="dup3" number="326"/>
-  <syscall name="epoll_create1" number="327"/>
-  <syscall name="rt_tgsigqueueinfo" number="330"/>
-  <syscall name="perf_event_open" number="331"/>
-  <syscall name="fanotify_init" number="332"/>
-  <syscall name="fanotify_mark" number="333"/>
+  <syscall name="epoll_pwait" number="312" groups="descriptor"/>
+  <syscall name="utimes" number="313" groups="file"/>
+  <syscall name="fallocate" number="314" groups="descriptor"/>
+  <syscall name="utimensat" number="315" groups="descriptor,file"/>
+  <syscall name="signalfd" number="316" groups="descriptor,signal"/>
+  <syscall name="timerfd" number="317" groups="descriptor"/>
+  <syscall name="eventfd" number="318" groups="descriptor"/>
+  <syscall name="timerfd_create" number="319" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="320" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="321" groups="descriptor"/>
+  <syscall name="signalfd4" number="322" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="323" groups="descriptor"/>
+  <syscall name="inotify_init1" number="324" groups="descriptor"/>
+  <syscall name="pipe2" number="325" groups="descriptor"/>
+  <syscall name="dup3" number="326" groups="descriptor"/>
+  <syscall name="epoll_create1" number="327" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="330" groups="process,signal"/>
+  <syscall name="perf_event_open" number="331" groups="descriptor"/>
+  <syscall name="fanotify_init" number="332" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="333" groups="descriptor,file"/>
   <syscall name="prlimit64" number="334"/>
-  <syscall name="name_to_handle_at" number="335"/>
-  <syscall name="open_by_handle_at" number="336"/>
+  <syscall name="name_to_handle_at" number="335" groups="descriptor,file"/>
+  <syscall name="open_by_handle_at" number="336" groups="descriptor"/>
   <syscall name="clock_adjtime" number="337"/>
-  <syscall name="syncfs" number="338"/>
-  <syscall name="setns" number="339"/>
+  <syscall name="syncfs" number="338" groups="descriptor"/>
+  <syscall name="setns" number="339" groups="descriptor"/>
   <syscall name="process_vm_readv" number="340"/>
   <syscall name="process_vm_writev" number="341"/>
   <syscall name="s390_runtime_instr" number="342"/>
   <syscall name="kcmp" number="343"/>
-  <syscall name="finit_module" number="344"/>
+  <syscall name="finit_module" number="344" groups="descriptor"/>
   <syscall name="sched_setattr" number="345"/>
   <syscall name="sched_getattr" number="346"/>
   <syscall name="renameat2" number="347"/>
@@ -339,4 +341,24 @@
   <syscall name="s390_pci_mmio_write" number="352"/>
   <syscall name="s390_pci_mmio_read" number="353"/>
   <syscall name="execveat" number="354"/>
+  <syscall name="userfaultfd" number="355"/>
+  <syscall name="membarrier" number="356"/>
+  <syscall name="recvmmsg" number="357" groups="network"/>
+  <syscall name="sendmmsg" number="358" groups="network"/>
+  <syscall name="socket" number="359" groups="network"/>
+  <syscall name="socketpair" number="360" groups="network"/>
+  <syscall name="bind" number="361" groups="network"/>
+  <syscall name="connect" number="362" groups="network"/>
+  <syscall name="listen" number="363" groups="network"/>
+  <syscall name="accept4" number="364" groups="network"/>
+  <syscall name="getsockopt" number="365" groups="network"/>
+  <syscall name="setsockopt" number="366" groups="network"/>
+  <syscall name="getsockname" number="367" groups="network"/>
+  <syscall name="getpeername" number="368" groups="network"/>
+  <syscall name="sendto" number="369" groups="network"/>
+  <syscall name="sendmsg" number="370" groups="network"/>
+  <syscall name="recvfrom" number="371" groups="network"/>
+  <syscall name="recvmsg" number="372" groups="network"/>
+  <syscall name="shutdown" number="373" groups="network"/>
+  <syscall name="mlock2" number="374"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390-linux.xml.in ./gdb/syscalls/s390-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/s390-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,367 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+     /usr/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="restart_syscall" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="time" number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="stime" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="setreuid" number="70"/>
+  <syscall name="setregid" number="71"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrlimit" number="76"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="getgroups" number="80"/>
+  <syscall name="setgroups" number="81"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="fchown" number="95"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="ioperm" number="101"/>
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="lookup_dcookie" number="110"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/>
+  <syscall name="setfsuid" number="138"/>
+  <syscall name="setfsgid" number="139"/>
+  <syscall name="_llseek" number="140"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="_newselect" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="setresuid" number="164"/>
+  <syscall name="getresuid" number="165"/>
+  <syscall name="query_module" number="167"/>
+  <syscall name="poll" number="168"/>
+  <syscall name="nfsservctl" number="169"/>
+  <syscall name="setresgid" number="170"/>
+  <syscall name="getresgid" number="171"/>
+  <syscall name="prctl" number="172"/>
+  <syscall name="rt_sigreturn" number="173"/>
+  <syscall name="rt_sigaction" number="174"/>
+  <syscall name="rt_sigprocmask" number="175"/>
+  <syscall name="rt_sigpending" number="176"/>
+  <syscall name="rt_sigtimedwait" number="177"/>
+  <syscall name="rt_sigqueueinfo" number="178"/>
+  <syscall name="rt_sigsuspend" number="179"/>
+  <syscall name="pread64" number="180"/>
+  <syscall name="pwrite64" number="181"/>
+  <syscall name="chown" number="182"/>
+  <syscall name="getcwd" number="183"/>
+  <syscall name="capget" number="184"/>
+  <syscall name="capset" number="185"/>
+  <syscall name="sigaltstack" number="186"/>
+  <syscall name="sendfile" number="187"/>
+  <syscall name="getpmsg" number="188"/>
+  <syscall name="putpmsg" number="189"/>
+  <syscall name="vfork" number="190"/>
+  <syscall name="ugetrlimit" number="191"/>
+  <syscall name="mmap2" number="192"/>
+  <syscall name="truncate64" number="193"/>
+  <syscall name="ftruncate64" number="194"/>
+  <syscall name="stat64" number="195"/>
+  <syscall name="lstat64" number="196"/>
+  <syscall name="fstat64" number="197"/>
+  <syscall name="lchown32" number="198"/>
+  <syscall name="getuid32" number="199"/>
+  <syscall name="getgid32" number="200"/>
+  <syscall name="geteuid32" number="201"/>
+  <syscall name="getegid32" number="202"/>
+  <syscall name="setreuid32" number="203"/>
+  <syscall name="setregid32" number="204"/>
+  <syscall name="getgroups32" number="205"/>
+  <syscall name="setgroups32" number="206"/>
+  <syscall name="fchown32" number="207"/>
+  <syscall name="setresuid32" number="208"/>
+  <syscall name="getresuid32" number="209"/>
+  <syscall name="setresgid32" number="210"/>
+  <syscall name="getresgid32" number="211"/>
+  <syscall name="chown32" number="212"/>
+  <syscall name="setuid32" number="213"/>
+  <syscall name="setgid32" number="214"/>
+  <syscall name="setfsuid32" number="215"/>
+  <syscall name="setfsgid32" number="216"/>
+  <syscall name="pivot_root" number="217"/>
+  <syscall name="mincore" number="218"/>
+  <syscall name="madvise" number="219"/>
+  <syscall name="getdents64" number="220"/>
+  <syscall name="fcntl64" number="221"/>
+  <syscall name="readahead" number="222"/>
+  <syscall name="sendfile64" number="223"/>
+  <syscall name="setxattr" number="224"/>
+  <syscall name="lsetxattr" number="225"/>
+  <syscall name="fsetxattr" number="226"/>
+  <syscall name="getxattr" number="227"/>
+  <syscall name="lgetxattr" number="228"/>
+  <syscall name="fgetxattr" number="229"/>
+  <syscall name="listxattr" number="230"/>
+  <syscall name="llistxattr" number="231"/>
+  <syscall name="flistxattr" number="232"/>
+  <syscall name="removexattr" number="233"/>
+  <syscall name="lremovexattr" number="234"/>
+  <syscall name="fremovexattr" number="235"/>
+  <syscall name="gettid" number="236"/>
+  <syscall name="tkill" number="237"/>
+  <syscall name="futex" number="238"/>
+  <syscall name="sched_setaffinity" number="239"/>
+  <syscall name="sched_getaffinity" number="240"/>
+  <syscall name="tgkill" number="241"/>
+  <syscall name="io_setup" number="243"/>
+  <syscall name="io_destroy" number="244"/>
+  <syscall name="io_getevents" number="245"/>
+  <syscall name="io_submit" number="246"/>
+  <syscall name="io_cancel" number="247"/>
+  <syscall name="exit_group" number="248"/>
+  <syscall name="epoll_create" number="249"/>
+  <syscall name="epoll_ctl" number="250"/>
+  <syscall name="epoll_wait" number="251"/>
+  <syscall name="set_tid_address" number="252"/>
+  <syscall name="fadvise64" number="253"/>
+  <syscall name="timer_create" number="254"/>
+  <syscall name="timer_settime" number="255"/>
+  <syscall name="timer_gettime" number="256"/>
+  <syscall name="timer_getoverrun" number="257"/>
+  <syscall name="timer_delete" number="258"/>
+  <syscall name="clock_settime" number="259"/>
+  <syscall name="clock_gettime" number="260"/>
+  <syscall name="clock_getres" number="261"/>
+  <syscall name="clock_nanosleep" number="262"/>
+  <syscall name="fadvise64_64" number="264"/>
+  <syscall name="statfs64" number="265"/>
+  <syscall name="fstatfs64" number="266"/>
+  <syscall name="remap_file_pages" number="267"/>
+  <syscall name="mbind" number="268"/>
+  <syscall name="get_mempolicy" number="269"/>
+  <syscall name="set_mempolicy" number="270"/>
+  <syscall name="mq_open" number="271"/>
+  <syscall name="mq_unlink" number="272"/>
+  <syscall name="mq_timedsend" number="273"/>
+  <syscall name="mq_timedreceive" number="274"/>
+  <syscall name="mq_notify" number="275"/>
+  <syscall name="mq_getsetattr" number="276"/>
+  <syscall name="kexec_load" number="277"/>
+  <syscall name="add_key" number="278"/>
+  <syscall name="request_key" number="279"/>
+  <syscall name="keyctl" number="280"/>
+  <syscall name="waitid" number="281"/>
+  <syscall name="ioprio_set" number="282"/>
+  <syscall name="ioprio_get" number="283"/>
+  <syscall name="inotify_init" number="284"/>
+  <syscall name="inotify_add_watch" number="285"/>
+  <syscall name="inotify_rm_watch" number="286"/>
+  <syscall name="migrate_pages" number="287"/>
+  <syscall name="openat" number="288"/>
+  <syscall name="mkdirat" number="289"/>
+  <syscall name="mknodat" number="290"/>
+  <syscall name="fchownat" number="291"/>
+  <syscall name="futimesat" number="292"/>
+  <syscall name="fstatat64" number="293"/>
+  <syscall name="unlinkat" number="294"/>
+  <syscall name="renameat" number="295"/>
+  <syscall name="linkat" number="296"/>
+  <syscall name="symlinkat" number="297"/>
+  <syscall name="readlinkat" number="298"/>
+  <syscall name="fchmodat" number="299"/>
+  <syscall name="faccessat" number="300"/>
+  <syscall name="pselect6" number="301"/>
+  <syscall name="ppoll" number="302"/>
+  <syscall name="unshare" number="303"/>
+  <syscall name="set_robust_list" number="304"/>
+  <syscall name="get_robust_list" number="305"/>
+  <syscall name="splice" number="306"/>
+  <syscall name="sync_file_range" number="307"/>
+  <syscall name="tee" number="308"/>
+  <syscall name="vmsplice" number="309"/>
+  <syscall name="move_pages" number="310"/>
+  <syscall name="getcpu" number="311"/>
+  <syscall name="epoll_pwait" number="312"/>
+  <syscall name="utimes" number="313"/>
+  <syscall name="fallocate" number="314"/>
+  <syscall name="utimensat" number="315"/>
+  <syscall name="signalfd" number="316"/>
+  <syscall name="timerfd" number="317"/>
+  <syscall name="eventfd" number="318"/>
+  <syscall name="timerfd_create" number="319"/>
+  <syscall name="timerfd_settime" number="320"/>
+  <syscall name="timerfd_gettime" number="321"/>
+  <syscall name="signalfd4" number="322"/>
+  <syscall name="eventfd2" number="323"/>
+  <syscall name="inotify_init1" number="324"/>
+  <syscall name="pipe2" number="325"/>
+  <syscall name="dup3" number="326"/>
+  <syscall name="epoll_create1" number="327"/>
+  <syscall name="rt_tgsigqueueinfo" number="330"/>
+  <syscall name="perf_event_open" number="331"/>
+  <syscall name="fanotify_init" number="332"/>
+  <syscall name="fanotify_mark" number="333"/>
+  <syscall name="prlimit64" number="334"/>
+  <syscall name="name_to_handle_at" number="335"/>
+  <syscall name="open_by_handle_at" number="336"/>
+  <syscall name="clock_adjtime" number="337"/>
+  <syscall name="syncfs" number="338"/>
+  <syscall name="setns" number="339"/>
+  <syscall name="process_vm_readv" number="340"/>
+  <syscall name="process_vm_writev" number="341"/>
+  <syscall name="s390_runtime_instr" number="342"/>
+  <syscall name="kcmp" number="343"/>
+  <syscall name="finit_module" number="344"/>
+  <syscall name="sched_setattr" number="345"/>
+  <syscall name="sched_getattr" number="346"/>
+  <syscall name="renameat2" number="347"/>
+  <syscall name="seccomp" number="348"/>
+  <syscall name="getrandom" number="349"/>
+  <syscall name="memfd_create" number="350"/>
+  <syscall name="bpf" number="351"/>
+  <syscall name="s390_pci_mmio_write" number="352"/>
+  <syscall name="s390_pci_mmio_read" number="353"/>
+  <syscall name="execveat" number="354"/>
+  <syscall name="userfaultfd" number="355"/>
+  <syscall name="membarrier" number="356"/>
+  <syscall name="recvmmsg" number="357"/>
+  <syscall name="sendmmsg" number="358"/>
+  <syscall name="socket" number="359"/>
+  <syscall name="socketpair" number="360"/>
+  <syscall name="bind" number="361"/>
+  <syscall name="connect" number="362"/>
+  <syscall name="listen" number="363"/>
+  <syscall name="accept4" number="364"/>
+  <syscall name="getsockopt" number="365"/>
+  <syscall name="setsockopt" number="366"/>
+  <syscall name="getsockname" number="367"/>
+  <syscall name="getpeername" number="368"/>
+  <syscall name="sendto" number="369"/>
+  <syscall name="sendmsg" number="370"/>
+  <syscall name="recvfrom" number="371"/>
+  <syscall name="recvmsg" number="372"/>
+  <syscall name="shutdown" number="373"/>
+  <syscall name="mlock2" number="374"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390x-linux.xml ./gdb/syscalls/s390x-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390x-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/s390x-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,134 +1,131 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
 
      /usr/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
   <syscall name="restart_syscall" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execve" number="11"/>
-  <syscall name="chdir" number="12"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execve" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
-  <syscall name="mount" number="21"/>
-  <syscall name="umount" number="22"/>
+  <syscall name="mount" number="21" groups="file"/>
+  <syscall name="umount" number="22" groups="file"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
-  <syscall name="access" number="33"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="rename" number="38"/>
-  <syscall name="mkdir" number="39"/>
-  <syscall name="rmdir" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="rename" number="38" groups="file"/>
+  <syscall name="mkdir" number="39" groups="file"/>
+  <syscall name="rmdir" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
-  <syscall name="brk" number="45"/>
-  <syscall name="signal" number="48"/>
-  <syscall name="acct" number="51"/>
-  <syscall name="umount2" number="52"/>
-  <syscall name="ioctl" number="54"/>
-  <syscall name="fcntl" number="55"/>
+  <syscall name="brk" number="45" groups="memory"/>
+  <syscall name="signal" number="48" groups="signal"/>
+  <syscall name="acct" number="51" groups="file"/>
+  <syscall name="umount2" number="52" groups="file"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
+  <syscall name="fcntl" number="55" groups="descriptor"/>
   <syscall name="setpgid" number="57"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
+  <syscall name="chroot" number="61" groups="file"/>
   <syscall name="ustat" number="62"/>
-  <syscall name="dup2" number="63"/>
+  <syscall name="dup2" number="63" groups="descriptor"/>
   <syscall name="getppid" number="64"/>
   <syscall name="getpgrp" number="65"/>
   <syscall name="setsid" number="66"/>
-  <syscall name="sigaction" number="67"/>
-  <syscall name="sigsuspend" number="72"/>
-  <syscall name="sigpending" number="73"/>
+  <syscall name="sigaction" number="67" groups="signal"/>
+  <syscall name="sigsuspend" number="72" groups="signal"/>
+  <syscall name="sigpending" number="73" groups="signal"/>
   <syscall name="sethostname" number="74"/>
   <syscall name="setrlimit" number="75"/>
   <syscall name="getrusage" number="77"/>
   <syscall name="gettimeofday" number="78"/>
   <syscall name="settimeofday" number="79"/>
-  <syscall name="symlink" number="83"/>
-  <syscall name="readlink" number="85"/>
-  <syscall name="uselib" number="86"/>
-  <syscall name="swapon" number="87"/>
+  <syscall name="symlink" number="83" groups="file"/>
+  <syscall name="readlink" number="85" groups="file"/>
+  <syscall name="uselib" number="86" groups="file"/>
+  <syscall name="swapon" number="87" groups="file"/>
   <syscall name="reboot" number="88"/>
-  <syscall name="readdir" number="89"/>
-  <syscall name="mmap" number="90"/>
-  <syscall name="munmap" number="91"/>
-  <syscall name="truncate" number="92"/>
-  <syscall name="ftruncate" number="93"/>
-  <syscall name="fchmod" number="94"/>
+  <syscall name="readdir" number="89" groups="descriptor"/>
+  <syscall name="mmap" number="90" groups="descriptor,memory"/>
+  <syscall name="munmap" number="91" groups="memory"/>
+  <syscall name="truncate" number="92" groups="file"/>
+  <syscall name="ftruncate" number="93" groups="descriptor"/>
+  <syscall name="fchmod" number="94" groups="descriptor"/>
   <syscall name="getpriority" number="96"/>
   <syscall name="setpriority" number="97"/>
-  <syscall name="statfs" number="99"/>
-  <syscall name="fstatfs" number="100"/>
-  <syscall name="socketcall" number="102"/>
+  <syscall name="statfs" number="99" groups="file"/>
+  <syscall name="fstatfs" number="100" groups="descriptor"/>
+  <syscall name="socketcall" number="102" groups="descriptor"/>
   <syscall name="syslog" number="103"/>
   <syscall name="setitimer" number="104"/>
   <syscall name="getitimer" number="105"/>
-  <syscall name="stat" number="106"/>
-  <syscall name="lstat" number="107"/>
-  <syscall name="fstat" number="108"/>
+  <syscall name="stat" number="106" groups="file"/>
+  <syscall name="lstat" number="107" groups="file"/>
+  <syscall name="fstat" number="108" groups="descriptor"/>
   <syscall name="lookup_dcookie" number="110"/>
   <syscall name="vhangup" number="111"/>
   <syscall name="idle" number="112"/>
-  <syscall name="wait4" number="114"/>
-  <syscall name="swapoff" number="115"/>
+  <syscall name="wait4" number="114" groups="process"/>
+  <syscall name="swapoff" number="115" groups="file"/>
   <syscall name="sysinfo" number="116"/>
-  <syscall name="ipc" number="117"/>
-  <syscall name="fsync" number="118"/>
-  <syscall name="sigreturn" number="119"/>
-  <syscall name="clone" number="120"/>
+  <syscall name="ipc" number="117" groups="ipc"/>
+  <syscall name="fsync" number="118" groups="descriptor"/>
+  <syscall name="sigreturn" number="119" groups="signal"/>
+  <syscall name="clone" number="120" groups="process"/>
   <syscall name="setdomainname" number="121"/>
   <syscall name="uname" number="122"/>
   <syscall name="adjtimex" number="124"/>
-  <syscall name="mprotect" number="125"/>
-  <syscall name="sigprocmask" number="126"/>
+  <syscall name="mprotect" number="125" groups="memory"/>
+  <syscall name="sigprocmask" number="126" groups="signal"/>
   <syscall name="create_module" number="127"/>
   <syscall name="init_module" number="128"/>
   <syscall name="delete_module" number="129"/>
   <syscall name="get_kernel_syms" number="130"/>
-  <syscall name="quotactl" number="131"/>
+  <syscall name="quotactl" number="131" groups="file"/>
   <syscall name="getpgid" number="132"/>
-  <syscall name="fchdir" number="133"/>
+  <syscall name="fchdir" number="133" groups="descriptor"/>
   <syscall name="bdflush" number="134"/>
   <syscall name="sysfs" number="135"/>
   <syscall name="personality" number="136"/>
   <syscall name="afs_syscall" number="137"/>
-  <syscall name="getdents" number="141"/>
-  <syscall name="select" number="142"/>
-  <syscall name="flock" number="143"/>
-  <syscall name="msync" number="144"/>
-  <syscall name="readv" number="145"/>
-  <syscall name="writev" number="146"/>
+  <syscall name="getdents" number="141" groups="descriptor"/>
+  <syscall name="select" number="142" groups="descriptor"/>
+  <syscall name="flock" number="143" groups="descriptor"/>
+  <syscall name="msync" number="144" groups="memory"/>
+  <syscall name="readv" number="145" groups="descriptor"/>
+  <syscall name="writev" number="146" groups="descriptor"/>
   <syscall name="getsid" number="147"/>
-  <syscall name="fdatasync" number="148"/>
+  <syscall name="fdatasync" number="148" groups="descriptor"/>
   <syscall name="_sysctl" number="149"/>
-  <syscall name="mlock" number="150"/>
-  <syscall name="munlock" number="151"/>
-  <syscall name="mlockall" number="152"/>
-  <syscall name="munlockall" number="153"/>
+  <syscall name="mlock" number="150" groups="memory"/>
+  <syscall name="munlock" number="151" groups="memory"/>
+  <syscall name="mlockall" number="152" groups="memory"/>
+  <syscall name="munlockall" number="153" groups="memory"/>
   <syscall name="sched_setparam" number="154"/>
   <syscall name="sched_getparam" number="155"/>
   <syscall name="sched_setscheduler" number="156"/>
@@ -138,30 +135,30 @@
   <syscall name="sched_get_priority_min" number="160"/>
   <syscall name="sched_rr_get_interval" number="161"/>
   <syscall name="nanosleep" number="162"/>
-  <syscall name="mremap" number="163"/>
+  <syscall name="mremap" number="163" groups="memory"/>
   <syscall name="query_module" number="167"/>
-  <syscall name="poll" number="168"/>
+  <syscall name="poll" number="168" groups="descriptor"/>
   <syscall name="nfsservctl" number="169"/>
   <syscall name="prctl" number="172"/>
-  <syscall name="rt_sigreturn" number="173"/>
-  <syscall name="rt_sigaction" number="174"/>
-  <syscall name="rt_sigprocmask" number="175"/>
-  <syscall name="rt_sigpending" number="176"/>
-  <syscall name="rt_sigtimedwait" number="177"/>
-  <syscall name="rt_sigqueueinfo" number="178"/>
-  <syscall name="rt_sigsuspend" number="179"/>
-  <syscall name="pread64" number="180"/>
-  <syscall name="pwrite64" number="181"/>
-  <syscall name="getcwd" number="183"/>
+  <syscall name="rt_sigreturn" number="173" groups="signal"/>
+  <syscall name="rt_sigaction" number="174" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="175" groups="signal"/>
+  <syscall name="rt_sigpending" number="176" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="177" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="178" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="179" groups="signal"/>
+  <syscall name="pread64" number="180" groups="descriptor"/>
+  <syscall name="pwrite64" number="181" groups="descriptor"/>
+  <syscall name="getcwd" number="183" groups="file"/>
   <syscall name="capget" number="184"/>
   <syscall name="capset" number="185"/>
-  <syscall name="sigaltstack" number="186"/>
-  <syscall name="sendfile" number="187"/>
+  <syscall name="sigaltstack" number="186" groups="signal"/>
+  <syscall name="sendfile" number="187" groups="descriptor,network"/>
   <syscall name="getpmsg" number="188"/>
   <syscall name="putpmsg" number="189"/>
-  <syscall name="vfork" number="190"/>
+  <syscall name="vfork" number="190" groups="process"/>
   <syscall name="getrlimit" number="191"/>
-  <syscall name="lchown" number="198"/>
+  <syscall name="lchown" number="198" groups="file"/>
   <syscall name="getuid" number="199"/>
   <syscall name="getgid" number="200"/>
   <syscall name="geteuid" number="201"/>
@@ -170,50 +167,50 @@
   <syscall name="setregid" number="204"/>
   <syscall name="getgroups" number="205"/>
   <syscall name="setgroups" number="206"/>
-  <syscall name="fchown" number="207"/>
+  <syscall name="fchown" number="207" groups="descriptor"/>
   <syscall name="setresuid" number="208"/>
   <syscall name="getresuid" number="209"/>
   <syscall name="setresgid" number="210"/>
   <syscall name="getresgid" number="211"/>
-  <syscall name="chown" number="212"/>
+  <syscall name="chown" number="212" groups="file"/>
   <syscall name="setuid" number="213"/>
   <syscall name="setgid" number="214"/>
   <syscall name="setfsuid" number="215"/>
   <syscall name="setfsgid" number="216"/>
-  <syscall name="pivot_root" number="217"/>
-  <syscall name="mincore" number="218"/>
-  <syscall name="madvise" number="219"/>
-  <syscall name="getdents64" number="220"/>
-  <syscall name="readahead" number="222"/>
-  <syscall name="setxattr" number="224"/>
-  <syscall name="lsetxattr" number="225"/>
-  <syscall name="fsetxattr" number="226"/>
-  <syscall name="getxattr" number="227"/>
-  <syscall name="lgetxattr" number="228"/>
-  <syscall name="fgetxattr" number="229"/>
-  <syscall name="listxattr" number="230"/>
-  <syscall name="llistxattr" number="231"/>
-  <syscall name="flistxattr" number="232"/>
-  <syscall name="removexattr" number="233"/>
-  <syscall name="lremovexattr" number="234"/>
-  <syscall name="fremovexattr" number="235"/>
+  <syscall name="pivot_root" number="217" groups="file"/>
+  <syscall name="mincore" number="218" groups="memory"/>
+  <syscall name="madvise" number="219" groups="memory"/>
+  <syscall name="getdents64" number="220" groups="descriptor"/>
+  <syscall name="readahead" number="222" groups="descriptor"/>
+  <syscall name="setxattr" number="224" groups="file"/>
+  <syscall name="lsetxattr" number="225" groups="file"/>
+  <syscall name="fsetxattr" number="226" groups="descriptor"/>
+  <syscall name="getxattr" number="227" groups="file"/>
+  <syscall name="lgetxattr" number="228" groups="file"/>
+  <syscall name="fgetxattr" number="229" groups="descriptor"/>
+  <syscall name="listxattr" number="230" groups="file"/>
+  <syscall name="llistxattr" number="231" groups="file"/>
+  <syscall name="flistxattr" number="232" groups="descriptor"/>
+  <syscall name="removexattr" number="233" groups="file"/>
+  <syscall name="lremovexattr" number="234" groups="file"/>
+  <syscall name="fremovexattr" number="235" groups="descriptor"/>
   <syscall name="gettid" number="236"/>
-  <syscall name="tkill" number="237"/>
+  <syscall name="tkill" number="237" groups="signal"/>
   <syscall name="futex" number="238"/>
   <syscall name="sched_setaffinity" number="239"/>
   <syscall name="sched_getaffinity" number="240"/>
-  <syscall name="tgkill" number="241"/>
+  <syscall name="tgkill" number="241" groups="signal"/>
   <syscall name="io_setup" number="243"/>
   <syscall name="io_destroy" number="244"/>
   <syscall name="io_getevents" number="245"/>
   <syscall name="io_submit" number="246"/>
   <syscall name="io_cancel" number="247"/>
-  <syscall name="exit_group" number="248"/>
-  <syscall name="epoll_create" number="249"/>
-  <syscall name="epoll_ctl" number="250"/>
-  <syscall name="epoll_wait" number="251"/>
+  <syscall name="exit_group" number="248" groups="process"/>
+  <syscall name="epoll_create" number="249" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="250" groups="descriptor"/>
+  <syscall name="epoll_wait" number="251" groups="descriptor"/>
   <syscall name="set_tid_address" number="252"/>
-  <syscall name="fadvise64" number="253"/>
+  <syscall name="fadvise64" number="253" groups="descriptor"/>
   <syscall name="timer_create" number="254"/>
   <syscall name="timer_settime" number="255"/>
   <syscall name="timer_gettime" number="256"/>
@@ -223,9 +220,12 @@
   <syscall name="clock_gettime" number="260"/>
   <syscall name="clock_getres" number="261"/>
   <syscall name="clock_nanosleep" number="262"/>
-  <syscall name="statfs64" number="265"/>
-  <syscall name="fstatfs64" number="266"/>
-  <syscall name="remap_file_pages" number="267"/>
+  <syscall name="statfs64" number="265" groups="file"/>
+  <syscall name="fstatfs64" number="266" groups="descriptor"/>
+  <syscall name="remap_file_pages" number="267" groups="memory"/>
+  <syscall name="mbind" number="268" groups="memory"/>
+  <syscall name="get_mempolicy" number="269" groups="memory"/>
+  <syscall name="set_mempolicy" number="270" groups="memory"/>
   <syscall name="mq_open" number="271"/>
   <syscall name="mq_unlink" number="272"/>
   <syscall name="mq_timedsend" number="273"/>
@@ -236,66 +236,68 @@
   <syscall name="add_key" number="278"/>
   <syscall name="request_key" number="279"/>
   <syscall name="keyctl" number="280"/>
-  <syscall name="waitid" number="281"/>
+  <syscall name="waitid" number="281" groups="process"/>
   <syscall name="ioprio_set" number="282"/>
   <syscall name="ioprio_get" number="283"/>
-  <syscall name="inotify_init" number="284"/>
-  <syscall name="inotify_add_watch" number="285"/>
-  <syscall name="inotify_rm_watch" number="286"/>
-  <syscall name="openat" number="288"/>
-  <syscall name="mkdirat" number="289"/>
-  <syscall name="mknodat" number="290"/>
-  <syscall name="fchownat" number="291"/>
-  <syscall name="futimesat" number="292"/>
-  <syscall name="newfstatat" number="293"/>
-  <syscall name="unlinkat" number="294"/>
-  <syscall name="renameat" number="295"/>
-  <syscall name="linkat" number="296"/>
-  <syscall name="symlinkat" number="297"/>
-  <syscall name="readlinkat" number="298"/>
-  <syscall name="fchmodat" number="299"/>
-  <syscall name="faccessat" number="300"/>
-  <syscall name="pselect6" number="301"/>
-  <syscall name="ppoll" number="302"/>
-  <syscall name="unshare" number="303"/>
+  <syscall name="inotify_init" number="284" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="285" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="286" groups="descriptor"/>
+  <syscall name="migrate_pages" number="287" groups="memory"/>
+  <syscall name="openat" number="288" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="289" groups="descriptor,file"/>
+  <syscall name="mknodat" number="290" groups="descriptor,file"/>
+  <syscall name="fchownat" number="291" groups="descriptor,file"/>
+  <syscall name="futimesat" number="292" groups="descriptor,file"/>
+  <syscall name="newfstatat" number="293" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="294" groups="descriptor,file"/>
+  <syscall name="renameat" number="295" groups="descriptor,file"/>
+  <syscall name="linkat" number="296" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="297" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="298" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="299" groups="descriptor,file"/>
+  <syscall name="faccessat" number="300" groups="descriptor,file"/>
+  <syscall name="pselect6" number="301" groups="descriptor"/>
+  <syscall name="ppoll" number="302" groups="descriptor"/>
+  <syscall name="unshare" number="303" groups="process"/>
   <syscall name="set_robust_list" number="304"/>
   <syscall name="get_robust_list" number="305"/>
-  <syscall name="splice" number="306"/>
-  <syscall name="sync_file_range" number="307"/>
-  <syscall name="tee" number="308"/>
-  <syscall name="vmsplice" number="309"/>
+  <syscall name="splice" number="306" groups="descriptor"/>
+  <syscall name="sync_file_range" number="307" groups="descriptor"/>
+  <syscall name="tee" number="308" groups="descriptor"/>
+  <syscall name="vmsplice" number="309" groups="descriptor"/>
+  <syscall name="move_pages" number="310" groups="memory"/>
   <syscall name="getcpu" number="311"/>
-  <syscall name="epoll_pwait" number="312"/>
-  <syscall name="utimes" number="313"/>
-  <syscall name="fallocate" number="314"/>
-  <syscall name="utimensat" number="315"/>
-  <syscall name="signalfd" number="316"/>
-  <syscall name="timerfd" number="317"/>
-  <syscall name="eventfd" number="318"/>
-  <syscall name="timerfd_create" number="319"/>
-  <syscall name="timerfd_settime" number="320"/>
-  <syscall name="timerfd_gettime" number="321"/>
-  <syscall name="signalfd4" number="322"/>
-  <syscall name="eventfd2" number="323"/>
-  <syscall name="inotify_init1" number="324"/>
-  <syscall name="pipe2" number="325"/>
-  <syscall name="dup3" number="326"/>
-  <syscall name="epoll_create1" number="327"/>
-  <syscall name="rt_tgsigqueueinfo" number="330"/>
-  <syscall name="perf_event_open" number="331"/>
-  <syscall name="fanotify_init" number="332"/>
-  <syscall name="fanotify_mark" number="333"/>
+  <syscall name="epoll_pwait" number="312" groups="descriptor"/>
+  <syscall name="utimes" number="313" groups="file"/>
+  <syscall name="fallocate" number="314" groups="descriptor"/>
+  <syscall name="utimensat" number="315" groups="descriptor,file"/>
+  <syscall name="signalfd" number="316" groups="descriptor,signal"/>
+  <syscall name="timerfd" number="317" groups="descriptor"/>
+  <syscall name="eventfd" number="318" groups="descriptor"/>
+  <syscall name="timerfd_create" number="319" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="320" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="321" groups="descriptor"/>
+  <syscall name="signalfd4" number="322" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="323" groups="descriptor"/>
+  <syscall name="inotify_init1" number="324" groups="descriptor"/>
+  <syscall name="pipe2" number="325" groups="descriptor"/>
+  <syscall name="dup3" number="326" groups="descriptor"/>
+  <syscall name="epoll_create1" number="327" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="330" groups="process,signal"/>
+  <syscall name="perf_event_open" number="331" groups="descriptor"/>
+  <syscall name="fanotify_init" number="332" groups="descriptor"/>
+  <syscall name="fanotify_mark" number="333" groups="descriptor,file"/>
   <syscall name="prlimit64" number="334"/>
-  <syscall name="name_to_handle_at" number="335"/>
-  <syscall name="open_by_handle_at" number="336"/>
+  <syscall name="name_to_handle_at" number="335" groups="descriptor,file"/>
+  <syscall name="open_by_handle_at" number="336" groups="descriptor"/>
   <syscall name="clock_adjtime" number="337"/>
-  <syscall name="syncfs" number="338"/>
-  <syscall name="setns" number="339"/>
+  <syscall name="syncfs" number="338" groups="descriptor"/>
+  <syscall name="setns" number="339" groups="descriptor"/>
   <syscall name="process_vm_readv" number="340"/>
   <syscall name="process_vm_writev" number="341"/>
   <syscall name="s390_runtime_instr" number="342"/>
   <syscall name="kcmp" number="343"/>
-  <syscall name="finit_module" number="344"/>
+  <syscall name="finit_module" number="344" groups="descriptor"/>
   <syscall name="sched_setattr" number="345"/>
   <syscall name="sched_getattr" number="346"/>
   <syscall name="renameat2" number="347"/>
@@ -306,4 +308,24 @@
   <syscall name="s390_pci_mmio_write" number="352"/>
   <syscall name="s390_pci_mmio_read" number="353"/>
   <syscall name="execveat" number="354"/>
+  <syscall name="userfaultfd" number="355"/>
+  <syscall name="membarrier" number="356"/>
+  <syscall name="recvmmsg" number="357" groups="network"/>
+  <syscall name="sendmmsg" number="358" groups="network"/>
+  <syscall name="socket" number="359" groups="network"/>
+  <syscall name="socketpair" number="360" groups="network"/>
+  <syscall name="bind" number="361" groups="network"/>
+  <syscall name="connect" number="362" groups="network"/>
+  <syscall name="listen" number="363" groups="network"/>
+  <syscall name="accept4" number="364" groups="network"/>
+  <syscall name="getsockopt" number="365" groups="network"/>
+  <syscall name="setsockopt" number="366" groups="network"/>
+  <syscall name="getsockname" number="367" groups="network"/>
+  <syscall name="getpeername" number="368" groups="network"/>
+  <syscall name="sendto" number="369" groups="network"/>
+  <syscall name="sendmsg" number="370" groups="network"/>
+  <syscall name="recvfrom" number="371" groups="network"/>
+  <syscall name="recvmsg" number="372" groups="network"/>
+  <syscall name="shutdown" number="373" groups="network"/>
+  <syscall name="mlock2" number="374"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390x-linux.xml.in ./gdb/syscalls/s390x-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/s390x-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/s390x-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,334 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+     /usr/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="restart_syscall" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execve" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="mount" number="21"/>
+  <syscall name="umount" number="22"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="rename" number="38"/>
+  <syscall name="mkdir" number="39"/>
+  <syscall name="rmdir" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="brk" number="45"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="umount2" number="52"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="fcntl" number="55"/>
+  <syscall name="setpgid" number="57"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="ustat" number="62"/>
+  <syscall name="dup2" number="63"/>
+  <syscall name="getppid" number="64"/>
+  <syscall name="getpgrp" number="65"/>
+  <syscall name="setsid" number="66"/>
+  <syscall name="sigaction" number="67"/>
+  <syscall name="sigsuspend" number="72"/>
+  <syscall name="sigpending" number="73"/>
+  <syscall name="sethostname" number="74"/>
+  <syscall name="setrlimit" number="75"/>
+  <syscall name="getrusage" number="77"/>
+  <syscall name="gettimeofday" number="78"/>
+  <syscall name="settimeofday" number="79"/>
+  <syscall name="symlink" number="83"/>
+  <syscall name="readlink" number="85"/>
+  <syscall name="uselib" number="86"/>
+  <syscall name="swapon" number="87"/>
+  <syscall name="reboot" number="88"/>
+  <syscall name="readdir" number="89"/>
+  <syscall name="mmap" number="90"/>
+  <syscall name="munmap" number="91"/>
+  <syscall name="truncate" number="92"/>
+  <syscall name="ftruncate" number="93"/>
+  <syscall name="fchmod" number="94"/>
+  <syscall name="getpriority" number="96"/>
+  <syscall name="setpriority" number="97"/>
+  <syscall name="statfs" number="99"/>
+  <syscall name="fstatfs" number="100"/>
+  <syscall name="socketcall" number="102"/>
+  <syscall name="syslog" number="103"/>
+  <syscall name="setitimer" number="104"/>
+  <syscall name="getitimer" number="105"/>
+  <syscall name="stat" number="106"/>
+  <syscall name="lstat" number="107"/>
+  <syscall name="fstat" number="108"/>
+  <syscall name="lookup_dcookie" number="110"/>
+  <syscall name="vhangup" number="111"/>
+  <syscall name="idle" number="112"/>
+  <syscall name="wait4" number="114"/>
+  <syscall name="swapoff" number="115"/>
+  <syscall name="sysinfo" number="116"/>
+  <syscall name="ipc" number="117"/>
+  <syscall name="fsync" number="118"/>
+  <syscall name="sigreturn" number="119"/>
+  <syscall name="clone" number="120"/>
+  <syscall name="setdomainname" number="121"/>
+  <syscall name="uname" number="122"/>
+  <syscall name="adjtimex" number="124"/>
+  <syscall name="mprotect" number="125"/>
+  <syscall name="sigprocmask" number="126"/>
+  <syscall name="create_module" number="127"/>
+  <syscall name="init_module" number="128"/>
+  <syscall name="delete_module" number="129"/>
+  <syscall name="get_kernel_syms" number="130"/>
+  <syscall name="quotactl" number="131"/>
+  <syscall name="getpgid" number="132"/>
+  <syscall name="fchdir" number="133"/>
+  <syscall name="bdflush" number="134"/>
+  <syscall name="sysfs" number="135"/>
+  <syscall name="personality" number="136"/>
+  <syscall name="afs_syscall" number="137"/>
+  <syscall name="getdents" number="141"/>
+  <syscall name="select" number="142"/>
+  <syscall name="flock" number="143"/>
+  <syscall name="msync" number="144"/>
+  <syscall name="readv" number="145"/>
+  <syscall name="writev" number="146"/>
+  <syscall name="getsid" number="147"/>
+  <syscall name="fdatasync" number="148"/>
+  <syscall name="_sysctl" number="149"/>
+  <syscall name="mlock" number="150"/>
+  <syscall name="munlock" number="151"/>
+  <syscall name="mlockall" number="152"/>
+  <syscall name="munlockall" number="153"/>
+  <syscall name="sched_setparam" number="154"/>
+  <syscall name="sched_getparam" number="155"/>
+  <syscall name="sched_setscheduler" number="156"/>
+  <syscall name="sched_getscheduler" number="157"/>
+  <syscall name="sched_yield" number="158"/>
+  <syscall name="sched_get_priority_max" number="159"/>
+  <syscall name="sched_get_priority_min" number="160"/>
+  <syscall name="sched_rr_get_interval" number="161"/>
+  <syscall name="nanosleep" number="162"/>
+  <syscall name="mremap" number="163"/>
+  <syscall name="query_module" number="167"/>
+  <syscall name="poll" number="168"/>
+  <syscall name="nfsservctl" number="169"/>
+  <syscall name="prctl" number="172"/>
+  <syscall name="rt_sigreturn" number="173"/>
+  <syscall name="rt_sigaction" number="174"/>
+  <syscall name="rt_sigprocmask" number="175"/>
+  <syscall name="rt_sigpending" number="176"/>
+  <syscall name="rt_sigtimedwait" number="177"/>
+  <syscall name="rt_sigqueueinfo" number="178"/>
+  <syscall name="rt_sigsuspend" number="179"/>
+  <syscall name="pread64" number="180"/>
+  <syscall name="pwrite64" number="181"/>
+  <syscall name="getcwd" number="183"/>
+  <syscall name="capget" number="184"/>
+  <syscall name="capset" number="185"/>
+  <syscall name="sigaltstack" number="186"/>
+  <syscall name="sendfile" number="187"/>
+  <syscall name="getpmsg" number="188"/>
+  <syscall name="putpmsg" number="189"/>
+  <syscall name="vfork" number="190"/>
+  <syscall name="getrlimit" number="191"/>
+  <syscall name="lchown" number="198"/>
+  <syscall name="getuid" number="199"/>
+  <syscall name="getgid" number="200"/>
+  <syscall name="geteuid" number="201"/>
+  <syscall name="getegid" number="202"/>
+  <syscall name="setreuid" number="203"/>
+  <syscall name="setregid" number="204"/>
+  <syscall name="getgroups" number="205"/>
+  <syscall name="setgroups" number="206"/>
+  <syscall name="fchown" number="207"/>
+  <syscall name="setresuid" number="208"/>
+  <syscall name="getresuid" number="209"/>
+  <syscall name="setresgid" number="210"/>
+  <syscall name="getresgid" number="211"/>
+  <syscall name="chown" number="212"/>
+  <syscall name="setuid" number="213"/>
+  <syscall name="setgid" number="214"/>
+  <syscall name="setfsuid" number="215"/>
+  <syscall name="setfsgid" number="216"/>
+  <syscall name="pivot_root" number="217"/>
+  <syscall name="mincore" number="218"/>
+  <syscall name="madvise" number="219"/>
+  <syscall name="getdents64" number="220"/>
+  <syscall name="readahead" number="222"/>
+  <syscall name="setxattr" number="224"/>
+  <syscall name="lsetxattr" number="225"/>
+  <syscall name="fsetxattr" number="226"/>
+  <syscall name="getxattr" number="227"/>
+  <syscall name="lgetxattr" number="228"/>
+  <syscall name="fgetxattr" number="229"/>
+  <syscall name="listxattr" number="230"/>
+  <syscall name="llistxattr" number="231"/>
+  <syscall name="flistxattr" number="232"/>
+  <syscall name="removexattr" number="233"/>
+  <syscall name="lremovexattr" number="234"/>
+  <syscall name="fremovexattr" number="235"/>
+  <syscall name="gettid" number="236"/>
+  <syscall name="tkill" number="237"/>
+  <syscall name="futex" number="238"/>
+  <syscall name="sched_setaffinity" number="239"/>
+  <syscall name="sched_getaffinity" number="240"/>
+  <syscall name="tgkill" number="241"/>
+  <syscall name="io_setup" number="243"/>
+  <syscall name="io_destroy" number="244"/>
+  <syscall name="io_getevents" number="245"/>
+  <syscall name="io_submit" number="246"/>
+  <syscall name="io_cancel" number="247"/>
+  <syscall name="exit_group" number="248"/>
+  <syscall name="epoll_create" number="249"/>
+  <syscall name="epoll_ctl" number="250"/>
+  <syscall name="epoll_wait" number="251"/>
+  <syscall name="set_tid_address" number="252"/>
+  <syscall name="fadvise64" number="253"/>
+  <syscall name="timer_create" number="254"/>
+  <syscall name="timer_settime" number="255"/>
+  <syscall name="timer_gettime" number="256"/>
+  <syscall name="timer_getoverrun" number="257"/>
+  <syscall name="timer_delete" number="258"/>
+  <syscall name="clock_settime" number="259"/>
+  <syscall name="clock_gettime" number="260"/>
+  <syscall name="clock_getres" number="261"/>
+  <syscall name="clock_nanosleep" number="262"/>
+  <syscall name="statfs64" number="265"/>
+  <syscall name="fstatfs64" number="266"/>
+  <syscall name="remap_file_pages" number="267"/>
+  <syscall name="mbind" number="268"/>
+  <syscall name="get_mempolicy" number="269"/>
+  <syscall name="set_mempolicy" number="270"/>
+  <syscall name="mq_open" number="271"/>
+  <syscall name="mq_unlink" number="272"/>
+  <syscall name="mq_timedsend" number="273"/>
+  <syscall name="mq_timedreceive" number="274"/>
+  <syscall name="mq_notify" number="275"/>
+  <syscall name="mq_getsetattr" number="276"/>
+  <syscall name="kexec_load" number="277"/>
+  <syscall name="add_key" number="278"/>
+  <syscall name="request_key" number="279"/>
+  <syscall name="keyctl" number="280"/>
+  <syscall name="waitid" number="281"/>
+  <syscall name="ioprio_set" number="282"/>
+  <syscall name="ioprio_get" number="283"/>
+  <syscall name="inotify_init" number="284"/>
+  <syscall name="inotify_add_watch" number="285"/>
+  <syscall name="inotify_rm_watch" number="286"/>
+  <syscall name="migrate_pages" number="287"/>
+  <syscall name="openat" number="288"/>
+  <syscall name="mkdirat" number="289"/>
+  <syscall name="mknodat" number="290"/>
+  <syscall name="fchownat" number="291"/>
+  <syscall name="futimesat" number="292"/>
+  <syscall name="newfstatat" number="293"/>
+  <syscall name="unlinkat" number="294"/>
+  <syscall name="renameat" number="295"/>
+  <syscall name="linkat" number="296"/>
+  <syscall name="symlinkat" number="297"/>
+  <syscall name="readlinkat" number="298"/>
+  <syscall name="fchmodat" number="299"/>
+  <syscall name="faccessat" number="300"/>
+  <syscall name="pselect6" number="301"/>
+  <syscall name="ppoll" number="302"/>
+  <syscall name="unshare" number="303"/>
+  <syscall name="set_robust_list" number="304"/>
+  <syscall name="get_robust_list" number="305"/>
+  <syscall name="splice" number="306"/>
+  <syscall name="sync_file_range" number="307"/>
+  <syscall name="tee" number="308"/>
+  <syscall name="vmsplice" number="309"/>
+  <syscall name="move_pages" number="310"/>
+  <syscall name="getcpu" number="311"/>
+  <syscall name="epoll_pwait" number="312"/>
+  <syscall name="utimes" number="313"/>
+  <syscall name="fallocate" number="314"/>
+  <syscall name="utimensat" number="315"/>
+  <syscall name="signalfd" number="316"/>
+  <syscall name="timerfd" number="317"/>
+  <syscall name="eventfd" number="318"/>
+  <syscall name="timerfd_create" number="319"/>
+  <syscall name="timerfd_settime" number="320"/>
+  <syscall name="timerfd_gettime" number="321"/>
+  <syscall name="signalfd4" number="322"/>
+  <syscall name="eventfd2" number="323"/>
+  <syscall name="inotify_init1" number="324"/>
+  <syscall name="pipe2" number="325"/>
+  <syscall name="dup3" number="326"/>
+  <syscall name="epoll_create1" number="327"/>
+  <syscall name="rt_tgsigqueueinfo" number="330"/>
+  <syscall name="perf_event_open" number="331"/>
+  <syscall name="fanotify_init" number="332"/>
+  <syscall name="fanotify_mark" number="333"/>
+  <syscall name="prlimit64" number="334"/>
+  <syscall name="name_to_handle_at" number="335"/>
+  <syscall name="open_by_handle_at" number="336"/>
+  <syscall name="clock_adjtime" number="337"/>
+  <syscall name="syncfs" number="338"/>
+  <syscall name="setns" number="339"/>
+  <syscall name="process_vm_readv" number="340"/>
+  <syscall name="process_vm_writev" number="341"/>
+  <syscall name="s390_runtime_instr" number="342"/>
+  <syscall name="kcmp" number="343"/>
+  <syscall name="finit_module" number="344"/>
+  <syscall name="sched_setattr" number="345"/>
+  <syscall name="sched_getattr" number="346"/>
+  <syscall name="renameat2" number="347"/>
+  <syscall name="seccomp" number="348"/>
+  <syscall name="getrandom" number="349"/>
+  <syscall name="memfd_create" number="350"/>
+  <syscall name="bpf" number="351"/>
+  <syscall name="s390_pci_mmio_write" number="352"/>
+  <syscall name="s390_pci_mmio_read" number="353"/>
+  <syscall name="execveat" number="354"/>
+  <syscall name="userfaultfd" number="355"/>
+  <syscall name="membarrier" number="356"/>
+  <syscall name="recvmmsg" number="357"/>
+  <syscall name="sendmmsg" number="358"/>
+  <syscall name="socket" number="359"/>
+  <syscall name="socketpair" number="360"/>
+  <syscall name="bind" number="361"/>
+  <syscall name="connect" number="362"/>
+  <syscall name="listen" number="363"/>
+  <syscall name="accept4" number="364"/>
+  <syscall name="getsockopt" number="365"/>
+  <syscall name="setsockopt" number="366"/>
+  <syscall name="getsockname" number="367"/>
+  <syscall name="getpeername" number="368"/>
+  <syscall name="sendto" number="369"/>
+  <syscall name="sendmsg" number="370"/>
+  <syscall name="recvfrom" number="371"/>
+  <syscall name="recvmsg" number="372"/>
+  <syscall name="shutdown" number="373"/>
+  <syscall name="mlock2" number="374"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc64-linux.xml ./gdb/syscalls/sparc64-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc64-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/sparc64-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,221 +1,218 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/sparc/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="wait4" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execv" number="11"/>
-  <syscall name="chdir" number="12"/>
-  <syscall name="chown"	number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="brk" number="17"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="wait4" number="7" groups="process"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execv" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
+  <syscall name="chown" number="13" groups="file"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="brk" number="17" groups="memory"/>
   <syscall name="perfctr" number="18"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
   <syscall name="capget" number="21"/>
   <syscall name="capset" number="22"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
-  <syscall name="vmsplice" number="25"/>
+  <syscall name="vmsplice" number="25" groups="descriptor"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="sigaltstack" number="28"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
-  <syscall name="access" number="33"/>
+  <syscall name="sigaltstack" number="28" groups="signal"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="stat" number="38"/>
-  <syscall name="sendfile" number="39"/>
-  <syscall name="lstat" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="stat" number="38" groups="file"/>
+  <syscall name="sendfile" number="39" groups="descriptor,network"/>
+  <syscall name="lstat" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
-  <syscall name="umount2" number="45"/>
+  <syscall name="umount2" number="45" groups="file"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
+  <syscall name="acct" number="51" groups="file"/>
   <syscall name="memory_ordering" number="52"/>
-  <syscall name="ioctl" number="54"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
   <syscall name="reboot" number="55"/>
-  <syscall name="symlink" number="57"/>
-  <syscall name="readlink" number="58"/>
-  <syscall name="execve" number="59"/>
+  <syscall name="symlink" number="57" groups="file"/>
+  <syscall name="readlink" number="58" groups="file"/>
+  <syscall name="execve" number="59" groups="file,process"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
-  <syscall name="fstat" number="62"/>
-  <syscall name="fstat64" number="63"/>
+  <syscall name="chroot" number="61" groups="file"/>
+  <syscall name="fstat" number="62" groups="descriptor"/>
+  <syscall name="fstat64" number="63" groups="descriptor"/>
   <syscall name="getpagesize" number="64"/>
-  <syscall name="msync" number="65"/>
-  <syscall name="vfork" number="66"/>
-  <syscall name="pread64" number="67"/>
-  <syscall name="pwrite64" number="68"/>
-  <syscall name="mmap" number="71"/>
-  <syscall name="munmap" number="73"/>
-  <syscall name="mprotect" number="74"/>
-  <syscall name="madvise" number="75"/>
+  <syscall name="msync" number="65" groups="memory"/>
+  <syscall name="vfork" number="66" groups="process"/>
+  <syscall name="pread64" number="67" groups="descriptor"/>
+  <syscall name="pwrite64" number="68" groups="descriptor"/>
+  <syscall name="mmap" number="71" groups="descriptor,memory"/>
+  <syscall name="munmap" number="73" groups="memory"/>
+  <syscall name="mprotect" number="74" groups="memory"/>
+  <syscall name="madvise" number="75" groups="memory"/>
   <syscall name="vhangup" number="76"/>
-  <syscall name="mincore" number="78"/>
+  <syscall name="mincore" number="78" groups="memory"/>
   <syscall name="getgroups" number="79"/>
   <syscall name="setgroups" number="80"/>
   <syscall name="getpgrp" number="81"/>
   <syscall name="setitimer" number="83"/>
-  <syscall name="swapon" number="85"/>
+  <syscall name="swapon" number="85" groups="file"/>
   <syscall name="getitimer" number="86"/>
   <syscall name="sethostname" number="88"/>
-  <syscall name="dup2" number="90"/>
-  <syscall name="fcntl" number="92"/>
-  <syscall name="select" number="93"/>
-  <syscall name="fsync" number="95"/>
+  <syscall name="dup2" number="90" groups="descriptor"/>
+  <syscall name="fcntl" number="92" groups="descriptor"/>
+  <syscall name="select" number="93" groups="descriptor"/>
+  <syscall name="fsync" number="95" groups="descriptor"/>
   <syscall name="setpriority" number="96"/>
-  <syscall name="socket" number="97"/>
-  <syscall name="connect" number="98"/>
-  <syscall name="accept" number="99"/>
+  <syscall name="socket" number="97" groups="network"/>
+  <syscall name="connect" number="98" groups="network"/>
+  <syscall name="accept" number="99" groups="network"/>
   <syscall name="getpriority" number="100"/>
-  <syscall name="rt_sigreturn" number="101"/>
-  <syscall name="rt_sigaction" number="102"/>
-  <syscall name="rt_sigprocmask" number="103"/>
-  <syscall name="rt_sigpending" number="104"/>
-  <syscall name="rt_sigtimedwait" number="105"/>
-  <syscall name="rt_sigqueueinfo" number="106"/>
-  <syscall name="rt_sigsuspend" number="107"/>
+  <syscall name="rt_sigreturn" number="101" groups="signal"/>
+  <syscall name="rt_sigaction" number="102" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="103" groups="signal"/>
+  <syscall name="rt_sigpending" number="104" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="105" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="106" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="107" groups="signal"/>
   <syscall name="setresuid" number="108"/>
   <syscall name="getresuid" number="109"/>
   <syscall name="setresgid" number="110"/>
   <syscall name="getresgid" number="111"/>
-  <syscall name="recvmsg" number="113"/>
-  <syscall name="sendmsg" number="114"/>
+  <syscall name="recvmsg" number="113" groups="network"/>
+  <syscall name="sendmsg" number="114" groups="network"/>
   <syscall name="gettimeofday" number="116"/>
   <syscall name="getrusage" number="117"/>
-  <syscall name="getsockopt" number="118"/>
-  <syscall name="getcwd" number="119"/>
-  <syscall name="readv" number="120"/>
-  <syscall name="writev" number="121"/>
+  <syscall name="getsockopt" number="118" groups="network"/>
+  <syscall name="getcwd" number="119" groups="file"/>
+  <syscall name="readv" number="120" groups="descriptor"/>
+  <syscall name="writev" number="121" groups="descriptor"/>
   <syscall name="settimeofday" number="122"/>
-  <syscall name="fchown" number="123"/>
-  <syscall name="fchmod" number="124"/>
-  <syscall name="recvfrom" number="125"/>
+  <syscall name="fchown" number="123" groups="descriptor"/>
+  <syscall name="fchmod" number="124" groups="descriptor"/>
+  <syscall name="recvfrom" number="125" groups="network"/>
   <syscall name="setreuid" number="126"/>
   <syscall name="setregid" number="127"/>
-  <syscall name="rename" number="128"/>
-  <syscall name="truncate" number="129"/>
-  <syscall name="ftruncate" number="130"/>
-  <syscall name="flock" number="131"/>
-  <syscall name="lstat64" number="132"/>
-  <syscall name="sendto" number="133"/>
-  <syscall name="shutdown" number="134"/>
-  <syscall name="socketpair" number="135"/>
-  <syscall name="mkdir" number="136"/>
-  <syscall name="rmdir" number="137"/>
-  <syscall name="utimes" number="138"/>
-  <syscall name="stat64" number="139"/>
-  <syscall name="sendfile64" number="140"/>
-  <syscall name="getpeername" number="141"/>
+  <syscall name="rename" number="128" groups="file"/>
+  <syscall name="truncate" number="129" groups="file"/>
+  <syscall name="ftruncate" number="130" groups="descriptor"/>
+  <syscall name="flock" number="131" groups="descriptor"/>
+  <syscall name="lstat64" number="132" groups="file"/>
+  <syscall name="sendto" number="133" groups="network"/>
+  <syscall name="shutdown" number="134" groups="network"/>
+  <syscall name="socketpair" number="135" groups="network"/>
+  <syscall name="mkdir" number="136" groups="file"/>
+  <syscall name="rmdir" number="137" groups="file"/>
+  <syscall name="utimes" number="138" groups="file"/>
+  <syscall name="stat64" number="139" groups="file"/>
+  <syscall name="sendfile64" number="140" groups="descriptor,network"/>
+  <syscall name="getpeername" number="141" groups="network"/>
   <syscall name="futex" number="142"/>
   <syscall name="gettid" number="143"/>
   <syscall name="getrlimit" number="144"/>
   <syscall name="setrlimit" number="145"/>
-  <syscall name="pivot_root" number="146"/>
+  <syscall name="pivot_root" number="146" groups="file"/>
   <syscall name="prctl" number="147"/>
   <syscall name="pciconfig_read" number="148"/>
   <syscall name="pciconfig_write" number="149"/>
-  <syscall name="getsockname" number="150"/>
-  <syscall name="inotify_init" number="151"/>
-  <syscall name="inotify_add_watch" number="152"/>
-  <syscall name="poll" number="153"/>
-  <syscall name="getdents64" number="154"/>
-  <syscall name="inotify_rm_watch" number="156"/>
-  <syscall name="statfs" number="157"/>
-  <syscall name="fstatfs" number="158"/>
-  <syscall name="umount" number="159"/>
+  <syscall name="getsockname" number="150" groups="network"/>
+  <syscall name="inotify_init" number="151" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="152" groups="descriptor"/>
+  <syscall name="poll" number="153" groups="descriptor"/>
+  <syscall name="getdents64" number="154" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="156" groups="descriptor"/>
+  <syscall name="statfs" number="157" groups="file"/>
+  <syscall name="fstatfs" number="158" groups="descriptor"/>
+  <syscall name="umount" number="159" groups="file"/>
   <syscall name="sched_set_affinity" number="160"/>
   <syscall name="sched_get_affinity" number="161"/>
   <syscall name="getdomainname" number="162"/>
   <syscall name="setdomainname" number="163"/>
   <syscall name="utrap_install" number="164"/>
-  <syscall name="quotactl" number="165"/>
+  <syscall name="quotactl" number="165" groups="file"/>
   <syscall name="set_tid_address" number="166"/>
-  <syscall name="mount" number="167"/>
+  <syscall name="mount" number="167" groups="file"/>
   <syscall name="ustat" number="168"/>
-  <syscall name="setxattr" number="169"/>
-  <syscall name="lsetxattr" number="170"/>
-  <syscall name="fsetxattr" number="171"/>
-  <syscall name="getxattr" number="172"/>
-  <syscall name="lgetxattr" number="173"/>
-  <syscall name="getdents" number="174"/>
+  <syscall name="setxattr" number="169" groups="file"/>
+  <syscall name="lsetxattr" number="170" groups="file"/>
+  <syscall name="fsetxattr" number="171" groups="descriptor"/>
+  <syscall name="getxattr" number="172" groups="file"/>
+  <syscall name="lgetxattr" number="173" groups="file"/>
+  <syscall name="getdents" number="174" groups="descriptor"/>
   <syscall name="setsid" number="175"/>
-  <syscall name="fchdir" number="176"/>
-  <syscall name="fgetxattr" number="177"/>
-  <syscall name="listxattr" number="178"/>
-  <syscall name="llistxattr" number="179"/>
-  <syscall name="flistxattr" number="180"/>
-  <syscall name="removexattr" number="181"/>
-  <syscall name="lremovexattr" number="182"/>
-  <syscall name="sigpending" number="183"/>
+  <syscall name="fchdir" number="176" groups="descriptor"/>
+  <syscall name="fgetxattr" number="177" groups="descriptor"/>
+  <syscall name="listxattr" number="178" groups="file"/>
+  <syscall name="llistxattr" number="179" groups="file"/>
+  <syscall name="flistxattr" number="180" groups="descriptor"/>
+  <syscall name="removexattr" number="181" groups="file"/>
+  <syscall name="lremovexattr" number="182" groups="file"/>
+  <syscall name="sigpending" number="183" groups="signal"/>
   <syscall name="query_module" number="184"/>
   <syscall name="setpgid" number="185"/>
-  <syscall name="fremovexattr" number="186"/>
-  <syscall name="tkill" number="187"/>
-  <syscall name="exit_group" number="188"/>
+  <syscall name="fremovexattr" number="186" groups="descriptor"/>
+  <syscall name="tkill" number="187" groups="signal"/>
+  <syscall name="exit_group" number="188" groups="process"/>
   <syscall name="uname" number="189"/>
   <syscall name="init_module" number="190"/>
   <syscall name="personality" number="191"/>
-  <syscall name="remap_file_pages" number="192"/>
-  <syscall name="epoll_create" number="193"/>
-  <syscall name="epoll_ctl" number="194"/>
-  <syscall name="epoll_wait" number="195"/>
+  <syscall name="remap_file_pages" number="192" groups="memory"/>
+  <syscall name="epoll_create" number="193" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="194" groups="descriptor"/>
+  <syscall name="epoll_wait" number="195" groups="descriptor"/>
   <syscall name="ioprio_set" number="196"/>
   <syscall name="getppid" number="197"/>
-  <syscall name="sigaction" number="198"/>
-  <syscall name="sgetmask" number="199"/>
-  <syscall name="ssetmask" number="200"/>
-  <syscall name="sigsuspend" number="201"/>
-  <syscall name="oldlstat" number="202"/>
-  <syscall name="uselib" number="203"/>
-  <syscall name="readdir" number="204"/>
-  <syscall name="readahead" number="205"/>
-  <syscall name="socketcall" number="206"/>
+  <syscall name="sigaction" number="198" groups="signal"/>
+  <syscall name="sgetmask" number="199" groups="signal"/>
+  <syscall name="ssetmask" number="200" groups="signal"/>
+  <syscall name="sigsuspend" number="201" groups="signal"/>
+  <syscall name="oldlstat" number="202" groups="file"/>
+  <syscall name="uselib" number="203" groups="file"/>
+  <syscall name="readdir" number="204" groups="descriptor"/>
+  <syscall name="readahead" number="205" groups="descriptor"/>
+  <syscall name="socketcall" number="206" groups="descriptor"/>
   <syscall name="syslog" number="207"/>
   <syscall name="lookup_dcookie" number="208"/>
-  <syscall name="fadvise64" number="209"/>
-  <syscall name="fadvise64_64" number="210"/>
-  <syscall name="tgkill" number="211"/>
-  <syscall name="waitpid" number="212"/>
-  <syscall name="swapoff" number="213"/>
+  <syscall name="fadvise64" number="209" groups="descriptor"/>
+  <syscall name="fadvise64_64" number="210" groups="descriptor"/>
+  <syscall name="tgkill" number="211" groups="signal"/>
+  <syscall name="waitpid" number="212" groups="process"/>
+  <syscall name="swapoff" number="213" groups="file"/>
   <syscall name="sysinfo" number="214"/>
-  <syscall name="ipc" number="215"/>
-  <syscall name="sigreturn" number="216"/>
-  <syscall name="clone" number="217"/>
+  <syscall name="ipc" number="215" groups="ipc"/>
+  <syscall name="sigreturn" number="216" groups="signal"/>
+  <syscall name="clone" number="217" groups="process"/>
   <syscall name="ioprio_get" number="218"/>
   <syscall name="adjtimex" number="219"/>
-  <syscall name="sigprocmask" number="220"/>
+  <syscall name="sigprocmask" number="220" groups="signal"/>
   <syscall name="create_module" number="221"/>
   <syscall name="delete_module" number="222"/>
   <syscall name="get_kernel_syms" number="223"/>
@@ -225,16 +222,16 @@
   <syscall name="afs_syscall" number="227"/>
   <syscall name="setfsuid" number="228"/>
   <syscall name="setfsgid" number="229"/>
-  <syscall name="_newselect" number="230"/>
-  <syscall name="splice" number="232"/>
+  <syscall name="_newselect" number="230" groups="descriptor"/>
+  <syscall name="splice" number="232" groups="descriptor"/>
   <syscall name="stime" number="233"/>
-  <syscall name="statfs64" number="234"/>
-  <syscall name="fstatfs64" number="235"/>
-  <syscall name="_llseek" number="236"/>
-  <syscall name="mlock" number="237"/>
-  <syscall name="munlock" number="238"/>
-  <syscall name="mlockall" number="239"/>
-  <syscall name="munlockall" number="240"/>
+  <syscall name="statfs64" number="234" groups="file"/>
+  <syscall name="fstatfs64" number="235" groups="descriptor"/>
+  <syscall name="_llseek" number="236" groups="descriptor"/>
+  <syscall name="mlock" number="237" groups="memory"/>
+  <syscall name="munlock" number="238" groups="memory"/>
+  <syscall name="mlockall" number="239" groups="memory"/>
+  <syscall name="munlockall" number="240" groups="memory"/>
   <syscall name="sched_setparam" number="241"/>
   <syscall name="sched_getparam" number="242"/>
   <syscall name="sched_setscheduler" number="243"/>
@@ -244,12 +241,12 @@
   <syscall name="sched_get_priority_min" number="247"/>
   <syscall name="sched_rr_get_interval" number="248"/>
   <syscall name="nanosleep" number="249"/>
-  <syscall name="mremap" number="250"/>
+  <syscall name="mremap" number="250" groups="memory"/>
   <syscall name="_sysctl" number="251"/>
   <syscall name="getsid" number="252"/>
-  <syscall name="fdatasync" number="253"/>
+  <syscall name="fdatasync" number="253" groups="descriptor"/>
   <syscall name="nfsservctl" number="254"/>
-  <syscall name="sync_file_range" number="255"/>
+  <syscall name="sync_file_range" number="255" groups="descriptor"/>
   <syscall name="clock_settime" number="256"/>
   <syscall name="clock_gettime" number="257"/>
   <syscall name="clock_getres" number="258"/>
@@ -273,54 +270,54 @@
   <syscall name="mq_timedreceive" number="276"/>
   <syscall name="mq_notify" number="277"/>
   <syscall name="mq_getsetattr" number="278"/>
-  <syscall name="waitid" number="279"/>
-  <syscall name="tee" number="280"/>
+  <syscall name="waitid" number="279" groups="process"/>
+  <syscall name="tee" number="280" groups="descriptor"/>
   <syscall name="add_key" number="281"/>
   <syscall name="request_key" number="282"/>
   <syscall name="keyctl" number="283"/>
-  <syscall name="openat" number="284"/>
-  <syscall name="mkdirat" number="285"/>
-  <syscall name="mknodat" number="286"/>
-  <syscall name="fchownat" number="287"/>
-  <syscall name="futimesat" number="288"/>
-  <syscall name="fstatat64" number="289"/>
-  <syscall name="unlinkat" number="290"/>
-  <syscall name="renameat" number="291"/>
-  <syscall name="linkat" number="292"/>
-  <syscall name="symlinkat" number="293"/>
-  <syscall name="readlinkat" number="294"/>
-  <syscall name="fchmodat" number="295"/>
-  <syscall name="faccessat" number="296"/>
-  <syscall name="pselect6" number="297"/>
-  <syscall name="ppoll" number="298"/>
-  <syscall name="unshare" number="299"/>
+  <syscall name="openat" number="284" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="285" groups="descriptor,file"/>
+  <syscall name="mknodat" number="286" groups="descriptor,file"/>
+  <syscall name="fchownat" number="287" groups="descriptor,file"/>
+  <syscall name="futimesat" number="288" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="289" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="290" groups="descriptor,file"/>
+  <syscall name="renameat" number="291" groups="descriptor,file"/>
+  <syscall name="linkat" number="292" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="293" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="294" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="295" groups="descriptor,file"/>
+  <syscall name="faccessat" number="296" groups="descriptor,file"/>
+  <syscall name="pselect6" number="297" groups="descriptor"/>
+  <syscall name="ppoll" number="298" groups="descriptor"/>
+  <syscall name="unshare" number="299" groups="process"/>
   <syscall name="set_robust_list" number="300"/>
   <syscall name="get_robust_list" number="301"/>
-  <syscall name="migrate_pages" number="302"/>
-  <syscall name="mbind" number="303"/>
-  <syscall name="get_mempolicy" number="304"/>
-  <syscall name="set_mempolicy" number="305"/>
+  <syscall name="migrate_pages" number="302" groups="memory"/>
+  <syscall name="mbind" number="303" groups="memory"/>
+  <syscall name="get_mempolicy" number="304" groups="memory"/>
+  <syscall name="set_mempolicy" number="305" groups="memory"/>
   <syscall name="kexec_load" number="306"/>
-  <syscall name="move_pages" number="307"/>
+  <syscall name="move_pages" number="307" groups="memory"/>
   <syscall name="getcpu" number="308"/>
-  <syscall name="epoll_pwait" number="309"/>
-  <syscall name="utimensat" number="310"/>
-  <syscall name="signalfd" number="311"/>
-  <syscall name="timerfd_create" number="312"/>
-  <syscall name="eventfd" number="313"/>
-  <syscall name="fallocate" number="314"/>
-  <syscall name="timerfd_settime" number="315"/>
-  <syscall name="timerfd_gettime" number="316"/>
-  <syscall name="signalfd4" number="317"/>
-  <syscall name="eventfd2" number="318"/>
-  <syscall name="epoll_create1" number="319"/>
-  <syscall name="dup3" number="320"/>
-  <syscall name="pipe2" number="321"/>
-  <syscall name="inotify_init1" number="322"/>
-  <syscall name="accept4" number="323"/>
-  <syscall name="preadv" number="324"/>
-  <syscall name="pwritev" number="325"/>
-  <syscall name="rt_tgsigqueueinfo" number="326"/>
-  <syscall name="perf_event_open" number="327"/>
-  <syscall name="recvmmsg" number="328"/>
+  <syscall name="epoll_pwait" number="309" groups="descriptor"/>
+  <syscall name="utimensat" number="310" groups="descriptor,file"/>
+  <syscall name="signalfd" number="311" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" number="312" groups="descriptor"/>
+  <syscall name="eventfd" number="313" groups="descriptor"/>
+  <syscall name="fallocate" number="314" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="315" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="316" groups="descriptor"/>
+  <syscall name="signalfd4" number="317" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="318" groups="descriptor"/>
+  <syscall name="epoll_create1" number="319" groups="descriptor"/>
+  <syscall name="dup3" number="320" groups="descriptor"/>
+  <syscall name="pipe2" number="321" groups="descriptor"/>
+  <syscall name="inotify_init1" number="322" groups="descriptor"/>
+  <syscall name="accept4" number="323" groups="network"/>
+  <syscall name="preadv" number="324" groups="descriptor"/>
+  <syscall name="pwritev" number="325" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="326" groups="process,signal"/>
+  <syscall name="perf_event_open" number="327" groups="descriptor"/>
+  <syscall name="recvmmsg" number="328" groups="network"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc64-linux.xml.in ./gdb/syscalls/sparc64-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc64-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/sparc64-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,326 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/sparc/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="wait4" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execv" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="chown"	number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="brk" number="17"/>
+  <syscall name="perfctr" number="18"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="capget" number="21"/>
+  <syscall name="capset" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="vmsplice" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="sigaltstack" number="28"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="stat" number="38"/>
+  <syscall name="sendfile" number="39"/>
+  <syscall name="lstat" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="umount2" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="memory_ordering" number="52"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="reboot" number="55"/>
+  <syscall name="symlink" number="57"/>
+  <syscall name="readlink" number="58"/>
+  <syscall name="execve" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="fstat" number="62"/>
+  <syscall name="fstat64" number="63"/>
+  <syscall name="getpagesize" number="64"/>
+  <syscall name="msync" number="65"/>
+  <syscall name="vfork" number="66"/>
+  <syscall name="pread64" number="67"/>
+  <syscall name="pwrite64" number="68"/>
+  <syscall name="mmap" number="71"/>
+  <syscall name="munmap" number="73"/>
+  <syscall name="mprotect" number="74"/>
+  <syscall name="madvise" number="75"/>
+  <syscall name="vhangup" number="76"/>
+  <syscall name="mincore" number="78"/>
+  <syscall name="getgroups" number="79"/>
+  <syscall name="setgroups" number="80"/>
+  <syscall name="getpgrp" number="81"/>
+  <syscall name="setitimer" number="83"/>
+  <syscall name="swapon" number="85"/>
+  <syscall name="getitimer" number="86"/>
+  <syscall name="sethostname" number="88"/>
+  <syscall name="dup2" number="90"/>
+  <syscall name="fcntl" number="92"/>
+  <syscall name="select" number="93"/>
+  <syscall name="fsync" number="95"/>
+  <syscall name="setpriority" number="96"/>
+  <syscall name="socket" number="97"/>
+  <syscall name="connect" number="98"/>
+  <syscall name="accept" number="99"/>
+  <syscall name="getpriority" number="100"/>
+  <syscall name="rt_sigreturn" number="101"/>
+  <syscall name="rt_sigaction" number="102"/>
+  <syscall name="rt_sigprocmask" number="103"/>
+  <syscall name="rt_sigpending" number="104"/>
+  <syscall name="rt_sigtimedwait" number="105"/>
+  <syscall name="rt_sigqueueinfo" number="106"/>
+  <syscall name="rt_sigsuspend" number="107"/>
+  <syscall name="setresuid" number="108"/>
+  <syscall name="getresuid" number="109"/>
+  <syscall name="setresgid" number="110"/>
+  <syscall name="getresgid" number="111"/>
+  <syscall name="recvmsg" number="113"/>
+  <syscall name="sendmsg" number="114"/>
+  <syscall name="gettimeofday" number="116"/>
+  <syscall name="getrusage" number="117"/>
+  <syscall name="getsockopt" number="118"/>
+  <syscall name="getcwd" number="119"/>
+  <syscall name="readv" number="120"/>
+  <syscall name="writev" number="121"/>
+  <syscall name="settimeofday" number="122"/>
+  <syscall name="fchown" number="123"/>
+  <syscall name="fchmod" number="124"/>
+  <syscall name="recvfrom" number="125"/>
+  <syscall name="setreuid" number="126"/>
+  <syscall name="setregid" number="127"/>
+  <syscall name="rename" number="128"/>
+  <syscall name="truncate" number="129"/>
+  <syscall name="ftruncate" number="130"/>
+  <syscall name="flock" number="131"/>
+  <syscall name="lstat64" number="132"/>
+  <syscall name="sendto" number="133"/>
+  <syscall name="shutdown" number="134"/>
+  <syscall name="socketpair" number="135"/>
+  <syscall name="mkdir" number="136"/>
+  <syscall name="rmdir" number="137"/>
+  <syscall name="utimes" number="138"/>
+  <syscall name="stat64" number="139"/>
+  <syscall name="sendfile64" number="140"/>
+  <syscall name="getpeername" number="141"/>
+  <syscall name="futex" number="142"/>
+  <syscall name="gettid" number="143"/>
+  <syscall name="getrlimit" number="144"/>
+  <syscall name="setrlimit" number="145"/>
+  <syscall name="pivot_root" number="146"/>
+  <syscall name="prctl" number="147"/>
+  <syscall name="pciconfig_read" number="148"/>
+  <syscall name="pciconfig_write" number="149"/>
+  <syscall name="getsockname" number="150"/>
+  <syscall name="inotify_init" number="151"/>
+  <syscall name="inotify_add_watch" number="152"/>
+  <syscall name="poll" number="153"/>
+  <syscall name="getdents64" number="154"/>
+  <syscall name="inotify_rm_watch" number="156"/>
+  <syscall name="statfs" number="157"/>
+  <syscall name="fstatfs" number="158"/>
+  <syscall name="umount" number="159"/>
+  <syscall name="sched_set_affinity" number="160"/>
+  <syscall name="sched_get_affinity" number="161"/>
+  <syscall name="getdomainname" number="162"/>
+  <syscall name="setdomainname" number="163"/>
+  <syscall name="utrap_install" number="164"/>
+  <syscall name="quotactl" number="165"/>
+  <syscall name="set_tid_address" number="166"/>
+  <syscall name="mount" number="167"/>
+  <syscall name="ustat" number="168"/>
+  <syscall name="setxattr" number="169"/>
+  <syscall name="lsetxattr" number="170"/>
+  <syscall name="fsetxattr" number="171"/>
+  <syscall name="getxattr" number="172"/>
+  <syscall name="lgetxattr" number="173"/>
+  <syscall name="getdents" number="174"/>
+  <syscall name="setsid" number="175"/>
+  <syscall name="fchdir" number="176"/>
+  <syscall name="fgetxattr" number="177"/>
+  <syscall name="listxattr" number="178"/>
+  <syscall name="llistxattr" number="179"/>
+  <syscall name="flistxattr" number="180"/>
+  <syscall name="removexattr" number="181"/>
+  <syscall name="lremovexattr" number="182"/>
+  <syscall name="sigpending" number="183"/>
+  <syscall name="query_module" number="184"/>
+  <syscall name="setpgid" number="185"/>
+  <syscall name="fremovexattr" number="186"/>
+  <syscall name="tkill" number="187"/>
+  <syscall name="exit_group" number="188"/>
+  <syscall name="uname" number="189"/>
+  <syscall name="init_module" number="190"/>
+  <syscall name="personality" number="191"/>
+  <syscall name="remap_file_pages" number="192"/>
+  <syscall name="epoll_create" number="193"/>
+  <syscall name="epoll_ctl" number="194"/>
+  <syscall name="epoll_wait" number="195"/>
+  <syscall name="ioprio_set" number="196"/>
+  <syscall name="getppid" number="197"/>
+  <syscall name="sigaction" number="198"/>
+  <syscall name="sgetmask" number="199"/>
+  <syscall name="ssetmask" number="200"/>
+  <syscall name="sigsuspend" number="201"/>
+  <syscall name="oldlstat" number="202"/>
+  <syscall name="uselib" number="203"/>
+  <syscall name="readdir" number="204"/>
+  <syscall name="readahead" number="205"/>
+  <syscall name="socketcall" number="206"/>
+  <syscall name="syslog" number="207"/>
+  <syscall name="lookup_dcookie" number="208"/>
+  <syscall name="fadvise64" number="209"/>
+  <syscall name="fadvise64_64" number="210"/>
+  <syscall name="tgkill" number="211"/>
+  <syscall name="waitpid" number="212"/>
+  <syscall name="swapoff" number="213"/>
+  <syscall name="sysinfo" number="214"/>
+  <syscall name="ipc" number="215"/>
+  <syscall name="sigreturn" number="216"/>
+  <syscall name="clone" number="217"/>
+  <syscall name="ioprio_get" number="218"/>
+  <syscall name="adjtimex" number="219"/>
+  <syscall name="sigprocmask" number="220"/>
+  <syscall name="create_module" number="221"/>
+  <syscall name="delete_module" number="222"/>
+  <syscall name="get_kernel_syms" number="223"/>
+  <syscall name="getpgid" number="224"/>
+  <syscall name="bdflush" number="225"/>
+  <syscall name="sysfs" number="226"/>
+  <syscall name="afs_syscall" number="227"/>
+  <syscall name="setfsuid" number="228"/>
+  <syscall name="setfsgid" number="229"/>
+  <syscall name="_newselect" number="230"/>
+  <syscall name="splice" number="232"/>
+  <syscall name="stime" number="233"/>
+  <syscall name="statfs64" number="234"/>
+  <syscall name="fstatfs64" number="235"/>
+  <syscall name="_llseek" number="236"/>
+  <syscall name="mlock" number="237"/>
+  <syscall name="munlock" number="238"/>
+  <syscall name="mlockall" number="239"/>
+  <syscall name="munlockall" number="240"/>
+  <syscall name="sched_setparam" number="241"/>
+  <syscall name="sched_getparam" number="242"/>
+  <syscall name="sched_setscheduler" number="243"/>
+  <syscall name="sched_getscheduler" number="244"/>
+  <syscall name="sched_yield" number="245"/>
+  <syscall name="sched_get_priority_max" number="246"/>
+  <syscall name="sched_get_priority_min" number="247"/>
+  <syscall name="sched_rr_get_interval" number="248"/>
+  <syscall name="nanosleep" number="249"/>
+  <syscall name="mremap" number="250"/>
+  <syscall name="_sysctl" number="251"/>
+  <syscall name="getsid" number="252"/>
+  <syscall name="fdatasync" number="253"/>
+  <syscall name="nfsservctl" number="254"/>
+  <syscall name="sync_file_range" number="255"/>
+  <syscall name="clock_settime" number="256"/>
+  <syscall name="clock_gettime" number="257"/>
+  <syscall name="clock_getres" number="258"/>
+  <syscall name="clock_nanosleep" number="259"/>
+  <syscall name="sched_getaffinity" number="260"/>
+  <syscall name="sched_setaffinity" number="261"/>
+  <syscall name="timer_settime" number="262"/>
+  <syscall name="timer_gettime" number="263"/>
+  <syscall name="timer_getoverrun" number="264"/>
+  <syscall name="timer_delete" number="265"/>
+  <syscall name="timer_create" number="266"/>
+  <syscall name="vserver" number="267"/>
+  <syscall name="io_setup" number="268"/>
+  <syscall name="io_destroy" number="269"/>
+  <syscall name="io_submit" number="270"/>
+  <syscall name="io_cancel" number="271"/>
+  <syscall name="io_getevents" number="272"/>
+  <syscall name="mq_open" number="273"/>
+  <syscall name="mq_unlink" number="274"/>
+  <syscall name="mq_timedsend" number="275"/>
+  <syscall name="mq_timedreceive" number="276"/>
+  <syscall name="mq_notify" number="277"/>
+  <syscall name="mq_getsetattr" number="278"/>
+  <syscall name="waitid" number="279"/>
+  <syscall name="tee" number="280"/>
+  <syscall name="add_key" number="281"/>
+  <syscall name="request_key" number="282"/>
+  <syscall name="keyctl" number="283"/>
+  <syscall name="openat" number="284"/>
+  <syscall name="mkdirat" number="285"/>
+  <syscall name="mknodat" number="286"/>
+  <syscall name="fchownat" number="287"/>
+  <syscall name="futimesat" number="288"/>
+  <syscall name="fstatat64" number="289"/>
+  <syscall name="unlinkat" number="290"/>
+  <syscall name="renameat" number="291"/>
+  <syscall name="linkat" number="292"/>
+  <syscall name="symlinkat" number="293"/>
+  <syscall name="readlinkat" number="294"/>
+  <syscall name="fchmodat" number="295"/>
+  <syscall name="faccessat" number="296"/>
+  <syscall name="pselect6" number="297"/>
+  <syscall name="ppoll" number="298"/>
+  <syscall name="unshare" number="299"/>
+  <syscall name="set_robust_list" number="300"/>
+  <syscall name="get_robust_list" number="301"/>
+  <syscall name="migrate_pages" number="302"/>
+  <syscall name="mbind" number="303"/>
+  <syscall name="get_mempolicy" number="304"/>
+  <syscall name="set_mempolicy" number="305"/>
+  <syscall name="kexec_load" number="306"/>
+  <syscall name="move_pages" number="307"/>
+  <syscall name="getcpu" number="308"/>
+  <syscall name="epoll_pwait" number="309"/>
+  <syscall name="utimensat" number="310"/>
+  <syscall name="signalfd" number="311"/>
+  <syscall name="timerfd_create" number="312"/>
+  <syscall name="eventfd" number="313"/>
+  <syscall name="fallocate" number="314"/>
+  <syscall name="timerfd_settime" number="315"/>
+  <syscall name="timerfd_gettime" number="316"/>
+  <syscall name="signalfd4" number="317"/>
+  <syscall name="eventfd2" number="318"/>
+  <syscall name="epoll_create1" number="319"/>
+  <syscall name="dup3" number="320"/>
+  <syscall name="pipe2" number="321"/>
+  <syscall name="inotify_init1" number="322"/>
+  <syscall name="accept4" number="323"/>
+  <syscall name="preadv" number="324"/>
+  <syscall name="pwritev" number="325"/>
+  <syscall name="rt_tgsigqueueinfo" number="326"/>
+  <syscall name="perf_event_open" number="327"/>
+  <syscall name="recvmmsg" number="328"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc-linux.xml ./gdb/syscalls/sparc-linux.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc-linux.xml	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/syscalls/sparc-linux.xml	2017-03-06 01:49:07.000000000 +0000
@@ -1,238 +1,235 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
      notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
-
 <!-- This file was generated using the following file:
      
      /usr/src/linux/arch/sparc/include/asm/unistd.h
 
      The file mentioned above belongs to the Linux Kernel.  -->
-
 <syscalls_info>
   <syscall name="restart_syscall" number="0"/>
-  <syscall name="exit" number="1"/>
-  <syscall name="fork" number="2"/>
-  <syscall name="read" number="3"/>
-  <syscall name="write" number="4"/>
-  <syscall name="open" number="5"/>
-  <syscall name="close" number="6"/>
-  <syscall name="wait4" number="7"/>
-  <syscall name="creat" number="8"/>
-  <syscall name="link" number="9"/>
-  <syscall name="unlink" number="10"/>
-  <syscall name="execv" number="11"/>
-  <syscall name="chdir" number="12"/>
-  <syscall name="chown"	number="13"/>
-  <syscall name="mknod" number="14"/>
-  <syscall name="chmod" number="15"/>
-  <syscall name="lchown" number="16"/>
-  <syscall name="brk" number="17"/>
+  <syscall name="exit" number="1" groups="process"/>
+  <syscall name="fork" number="2" groups="process"/>
+  <syscall name="read" number="3" groups="descriptor"/>
+  <syscall name="write" number="4" groups="descriptor"/>
+  <syscall name="open" number="5" groups="descriptor,file"/>
+  <syscall name="close" number="6" groups="descriptor"/>
+  <syscall name="wait4" number="7" groups="process"/>
+  <syscall name="creat" number="8" groups="descriptor,file"/>
+  <syscall name="link" number="9" groups="file"/>
+  <syscall name="unlink" number="10" groups="file"/>
+  <syscall name="execv" number="11" groups="file,process"/>
+  <syscall name="chdir" number="12" groups="file"/>
+  <syscall name="chown" number="13" groups="file"/>
+  <syscall name="mknod" number="14" groups="file"/>
+  <syscall name="chmod" number="15" groups="file"/>
+  <syscall name="lchown" number="16" groups="file"/>
+  <syscall name="brk" number="17" groups="memory"/>
   <syscall name="perfctr" number="18"/>
-  <syscall name="lseek" number="19"/>
+  <syscall name="lseek" number="19" groups="descriptor"/>
   <syscall name="getpid" number="20"/>
   <syscall name="capget" number="21"/>
   <syscall name="capset" number="22"/>
   <syscall name="setuid" number="23"/>
   <syscall name="getuid" number="24"/>
-  <syscall name="vmsplice" number="25"/>
+  <syscall name="vmsplice" number="25" groups="descriptor"/>
   <syscall name="ptrace" number="26"/>
   <syscall name="alarm" number="27"/>
-  <syscall name="sigaltstack" number="28"/>
-  <syscall name="pause" number="29"/>
-  <syscall name="utime" number="30"/>
-  <syscall name="lchown32" number="31"/>
-  <syscall name="fchown32" number="32"/>
-  <syscall name="access" number="33"/>
+  <syscall name="sigaltstack" number="28" groups="signal"/>
+  <syscall name="pause" number="29" groups="signal"/>
+  <syscall name="utime" number="30" groups="file"/>
+  <syscall name="lchown32" number="31" groups="file"/>
+  <syscall name="fchown32" number="32" groups="descriptor"/>
+  <syscall name="access" number="33" groups="file"/>
   <syscall name="nice" number="34"/>
-  <syscall name="chown32" number="35"/>
+  <syscall name="chown32" number="35" groups="file"/>
   <syscall name="sync" number="36"/>
-  <syscall name="kill" number="37"/>
-  <syscall name="stat" number="38"/>
-  <syscall name="sendfile" number="39"/>
-  <syscall name="lstat" number="40"/>
-  <syscall name="dup" number="41"/>
-  <syscall name="pipe" number="42"/>
+  <syscall name="kill" number="37" groups="signal"/>
+  <syscall name="stat" number="38" groups="file"/>
+  <syscall name="sendfile" number="39" groups="descriptor,network"/>
+  <syscall name="lstat" number="40" groups="file"/>
+  <syscall name="dup" number="41" groups="descriptor"/>
+  <syscall name="pipe" number="42" groups="descriptor"/>
   <syscall name="times" number="43"/>
   <syscall name="getuid32" number="44"/>
-  <syscall name="umount2" number="45"/>
+  <syscall name="umount2" number="45" groups="file"/>
   <syscall name="setgid" number="46"/>
   <syscall name="getgid" number="47"/>
-  <syscall name="signal" number="48"/>
+  <syscall name="signal" number="48" groups="signal"/>
   <syscall name="geteuid" number="49"/>
   <syscall name="getegid" number="50"/>
-  <syscall name="acct" number="51"/>
+  <syscall name="acct" number="51" groups="file"/>
   <syscall name="getgid32" number="53"/>
-  <syscall name="ioctl" number="54"/>
+  <syscall name="ioctl" number="54" groups="descriptor"/>
   <syscall name="reboot" number="55"/>
-  <syscall name="mmap2" number="56"/>
-  <syscall name="symlink" number="57"/>
-  <syscall name="readlink" number="58"/>
-  <syscall name="execve" number="59"/>
+  <syscall name="mmap2" number="56" groups="descriptor,memory"/>
+  <syscall name="symlink" number="57" groups="file"/>
+  <syscall name="readlink" number="58" groups="file"/>
+  <syscall name="execve" number="59" groups="file,process"/>
   <syscall name="umask" number="60"/>
-  <syscall name="chroot" number="61"/>
-  <syscall name="fstat" number="62"/>
-  <syscall name="fstat64" number="63"/>
+  <syscall name="chroot" number="61" groups="file"/>
+  <syscall name="fstat" number="62" groups="descriptor"/>
+  <syscall name="fstat64" number="63" groups="descriptor"/>
   <syscall name="getpagesize" number="64"/>
-  <syscall name="msync" number="65"/>
-  <syscall name="vfork" number="66"/>
-  <syscall name="pread64" number="67"/>
-  <syscall name="pwrite64" number="68"/>
+  <syscall name="msync" number="65" groups="memory"/>
+  <syscall name="vfork" number="66" groups="process"/>
+  <syscall name="pread64" number="67" groups="descriptor"/>
+  <syscall name="pwrite64" number="68" groups="descriptor"/>
   <syscall name="geteuid32" number="69"/>
   <syscall name="getegid32" number="70"/>
-  <syscall name="mmap" number="71"/>
+  <syscall name="mmap" number="71" groups="descriptor,memory"/>
   <syscall name="setreuid32" number="72"/>
-  <syscall name="munmap" number="73"/>
-  <syscall name="mprotect" number="74"/>
-  <syscall name="madvise" number="75"/>
+  <syscall name="munmap" number="73" groups="memory"/>
+  <syscall name="mprotect" number="74" groups="memory"/>
+  <syscall name="madvise" number="75" groups="memory"/>
   <syscall name="vhangup" number="76"/>
-  <syscall name="truncate64" number="77"/>
-  <syscall name="mincore" number="78"/>
+  <syscall name="truncate64" number="77" groups="file"/>
+  <syscall name="mincore" number="78" groups="memory"/>
   <syscall name="getgroups" number="79"/>
   <syscall name="setgroups" number="80"/>
   <syscall name="getpgrp" number="81"/>
   <syscall name="setgroups32" number="82"/>
   <syscall name="setitimer" number="83"/>
-  <syscall name="ftruncate64" number="84"/>
-  <syscall name="swapon" number="85"/>
+  <syscall name="ftruncate64" number="84" groups="descriptor"/>
+  <syscall name="swapon" number="85" groups="file"/>
   <syscall name="getitimer" number="86"/>
   <syscall name="setuid32" number="87"/>
   <syscall name="sethostname" number="88"/>
   <syscall name="setgid32" number="89"/>
-  <syscall name="dup2" number="90"/>
+  <syscall name="dup2" number="90" groups="descriptor"/>
   <syscall name="setfsuid32" number="91"/>
-  <syscall name="fcntl" number="92"/>
-  <syscall name="select" number="93"/>
+  <syscall name="fcntl" number="92" groups="descriptor"/>
+  <syscall name="select" number="93" groups="descriptor"/>
   <syscall name="setfsgid32" number="94"/>
-  <syscall name="fsync" number="95"/>
+  <syscall name="fsync" number="95" groups="descriptor"/>
   <syscall name="setpriority" number="96"/>
-  <syscall name="socket" number="97"/>
-  <syscall name="connect" number="98"/>
-  <syscall name="accept" number="99"/>
+  <syscall name="socket" number="97" groups="network"/>
+  <syscall name="connect" number="98" groups="network"/>
+  <syscall name="accept" number="99" groups="network"/>
   <syscall name="getpriority" number="100"/>
-  <syscall name="rt_sigreturn" number="101"/>
-  <syscall name="rt_sigaction" number="102"/>
-  <syscall name="rt_sigprocmask" number="103"/>
-  <syscall name="rt_sigpending" number="104"/>
-  <syscall name="rt_sigtimedwait" number="105"/>
-  <syscall name="rt_sigqueueinfo" number="106"/>
-  <syscall name="rt_sigsuspend" number="107"/>
+  <syscall name="rt_sigreturn" number="101" groups="signal"/>
+  <syscall name="rt_sigaction" number="102" groups="signal"/>
+  <syscall name="rt_sigprocmask" number="103" groups="signal"/>
+  <syscall name="rt_sigpending" number="104" groups="signal"/>
+  <syscall name="rt_sigtimedwait" number="105" groups="signal"/>
+  <syscall name="rt_sigqueueinfo" number="106" groups="signal"/>
+  <syscall name="rt_sigsuspend" number="107" groups="signal"/>
   <syscall name="setresuid32" number="108"/>
   <syscall name="getresuid32" number="109"/>
   <syscall name="setresgid32" number="110"/>
   <syscall name="getresgid32" number="111"/>
   <syscall name="setregid32" number="112"/>
-  <syscall name="recvmsg" number="113"/>
-  <syscall name="sendmsg" number="114"/>
+  <syscall name="recvmsg" number="113" groups="network"/>
+  <syscall name="sendmsg" number="114" groups="network"/>
   <syscall name="getgroups32" number="115"/>
   <syscall name="gettimeofday" number="116"/>
   <syscall name="getrusage" number="117"/>
-  <syscall name="getsockopt" number="118"/>
-  <syscall name="getcwd" number="119"/>
-  <syscall name="readv" number="120"/>
-  <syscall name="writev" number="121"/>
+  <syscall name="getsockopt" number="118" groups="network"/>
+  <syscall name="getcwd" number="119" groups="file"/>
+  <syscall name="readv" number="120" groups="descriptor"/>
+  <syscall name="writev" number="121" groups="descriptor"/>
   <syscall name="settimeofday" number="122"/>
-  <syscall name="fchown" number="123"/>
-  <syscall name="fchmod" number="124"/>
-  <syscall name="recvfrom" number="125"/>
+  <syscall name="fchown" number="123" groups="descriptor"/>
+  <syscall name="fchmod" number="124" groups="descriptor"/>
+  <syscall name="recvfrom" number="125" groups="network"/>
   <syscall name="setreuid" number="126"/>
   <syscall name="setregid" number="127"/>
-  <syscall name="rename" number="128"/>
-  <syscall name="truncate" number="129"/>
-  <syscall name="ftruncate" number="130"/>
-  <syscall name="flock" number="131"/>
-  <syscall name="lstat64" number="132"/>
-  <syscall name="sendto" number="133"/>
-  <syscall name="shutdown" number="134"/>
-  <syscall name="socketpair" number="135"/>
-  <syscall name="mkdir" number="136"/>
-  <syscall name="rmdir" number="137"/>
-  <syscall name="utimes" number="138"/>
-  <syscall name="stat64" number="139"/>
-  <syscall name="sendfile64" number="140"/>
-  <syscall name="getpeername" number="141"/>
+  <syscall name="rename" number="128" groups="file"/>
+  <syscall name="truncate" number="129" groups="file"/>
+  <syscall name="ftruncate" number="130" groups="descriptor"/>
+  <syscall name="flock" number="131" groups="descriptor"/>
+  <syscall name="lstat64" number="132" groups="file"/>
+  <syscall name="sendto" number="133" groups="network"/>
+  <syscall name="shutdown" number="134" groups="network"/>
+  <syscall name="socketpair" number="135" groups="network"/>
+  <syscall name="mkdir" number="136" groups="file"/>
+  <syscall name="rmdir" number="137" groups="file"/>
+  <syscall name="utimes" number="138" groups="file"/>
+  <syscall name="stat64" number="139" groups="file"/>
+  <syscall name="sendfile64" number="140" groups="descriptor,network"/>
+  <syscall name="getpeername" number="141" groups="network"/>
   <syscall name="futex" number="142"/>
   <syscall name="gettid" number="143"/>
   <syscall name="getrlimit" number="144"/>
   <syscall name="setrlimit" number="145"/>
-  <syscall name="pivot_root" number="146"/>
+  <syscall name="pivot_root" number="146" groups="file"/>
   <syscall name="prctl" number="147"/>
   <syscall name="pciconfig_read" number="148"/>
   <syscall name="pciconfig_write" number="149"/>
-  <syscall name="getsockname" number="150"/>
-  <syscall name="inotify_init" number="151"/>
-  <syscall name="inotify_add_watch" number="152"/>
-  <syscall name="poll" number="153"/>
-  <syscall name="getdents64" number="154"/>
-  <syscall name="fcntl64" number="155"/>
-  <syscall name="inotify_rm_watch" number="156"/>
-  <syscall name="statfs" number="157"/>
-  <syscall name="fstatfs" number="158"/>
-  <syscall name="umount" number="159"/>
+  <syscall name="getsockname" number="150" groups="network"/>
+  <syscall name="inotify_init" number="151" groups="descriptor"/>
+  <syscall name="inotify_add_watch" number="152" groups="descriptor"/>
+  <syscall name="poll" number="153" groups="descriptor"/>
+  <syscall name="getdents64" number="154" groups="descriptor"/>
+  <syscall name="fcntl64" number="155" groups="descriptor"/>
+  <syscall name="inotify_rm_watch" number="156" groups="descriptor"/>
+  <syscall name="statfs" number="157" groups="file"/>
+  <syscall name="fstatfs" number="158" groups="descriptor"/>
+  <syscall name="umount" number="159" groups="file"/>
   <syscall name="sched_set_affinity" number="160"/>
   <syscall name="sched_get_affinity" number="161"/>
   <syscall name="getdomainname" number="162"/>
   <syscall name="setdomainname" number="163"/>
-  <syscall name="quotactl" number="165"/>
+  <syscall name="quotactl" number="165" groups="file"/>
   <syscall name="set_tid_address" number="166"/>
-  <syscall name="mount" number="167"/>
+  <syscall name="mount" number="167" groups="file"/>
   <syscall name="ustat" number="168"/>
-  <syscall name="setxattr" number="169"/>
-  <syscall name="lsetxattr" number="170"/>
-  <syscall name="fsetxattr" number="171"/>
-  <syscall name="getxattr" number="172"/>
-  <syscall name="lgetxattr" number="173"/>
-  <syscall name="getdents" number="174"/>
+  <syscall name="setxattr" number="169" groups="file"/>
+  <syscall name="lsetxattr" number="170" groups="file"/>
+  <syscall name="fsetxattr" number="171" groups="descriptor"/>
+  <syscall name="getxattr" number="172" groups="file"/>
+  <syscall name="lgetxattr" number="173" groups="file"/>
+  <syscall name="getdents" number="174" groups="descriptor"/>
   <syscall name="setsid" number="175"/>
-  <syscall name="fchdir" number="176"/>
-  <syscall name="fgetxattr" number="177"/>
-  <syscall name="listxattr" number="178"/>
-  <syscall name="llistxattr" number="179"/>
-  <syscall name="flistxattr" number="180"/>
-  <syscall name="removexattr" number="181"/>
-  <syscall name="lremovexattr" number="182"/>
-  <syscall name="sigpending" number="183"/>
+  <syscall name="fchdir" number="176" groups="descriptor"/>
+  <syscall name="fgetxattr" number="177" groups="descriptor"/>
+  <syscall name="listxattr" number="178" groups="file"/>
+  <syscall name="llistxattr" number="179" groups="file"/>
+  <syscall name="flistxattr" number="180" groups="descriptor"/>
+  <syscall name="removexattr" number="181" groups="file"/>
+  <syscall name="lremovexattr" number="182" groups="file"/>
+  <syscall name="sigpending" number="183" groups="signal"/>
   <syscall name="query_module" number="184"/>
   <syscall name="setpgid" number="185"/>
-  <syscall name="fremovexattr" number="186"/>
-  <syscall name="tkill" number="187"/>
-  <syscall name="exit_group" number="188"/>
+  <syscall name="fremovexattr" number="186" groups="descriptor"/>
+  <syscall name="tkill" number="187" groups="signal"/>
+  <syscall name="exit_group" number="188" groups="process"/>
   <syscall name="uname" number="189"/>
   <syscall name="init_module" number="190"/>
   <syscall name="personality" number="191"/>
-  <syscall name="remap_file_pages" number="192"/>
-  <syscall name="epoll_create" number="193"/>
-  <syscall name="epoll_ctl" number="194"/>
-  <syscall name="epoll_wait" number="195"/>
+  <syscall name="remap_file_pages" number="192" groups="memory"/>
+  <syscall name="epoll_create" number="193" groups="descriptor"/>
+  <syscall name="epoll_ctl" number="194" groups="descriptor"/>
+  <syscall name="epoll_wait" number="195" groups="descriptor"/>
   <syscall name="ioprio_set" number="196"/>
   <syscall name="getppid" number="197"/>
-  <syscall name="sigaction" number="198"/>
-  <syscall name="sgetmask" number="199"/>
-  <syscall name="ssetmask" number="200"/>
-  <syscall name="sigsuspend" number="201"/>
-  <syscall name="oldlstat" number="202"/>
-  <syscall name="uselib" number="203"/>
-  <syscall name="readdir" number="204"/>
-  <syscall name="readahead" number="205"/>
-  <syscall name="socketcall" number="206"/>
+  <syscall name="sigaction" number="198" groups="signal"/>
+  <syscall name="sgetmask" number="199" groups="signal"/>
+  <syscall name="ssetmask" number="200" groups="signal"/>
+  <syscall name="sigsuspend" number="201" groups="signal"/>
+  <syscall name="oldlstat" number="202" groups="file"/>
+  <syscall name="uselib" number="203" groups="file"/>
+  <syscall name="readdir" number="204" groups="descriptor"/>
+  <syscall name="readahead" number="205" groups="descriptor"/>
+  <syscall name="socketcall" number="206" groups="descriptor"/>
   <syscall name="syslog" number="207"/>
   <syscall name="lookup_dcookie" number="208"/>
-  <syscall name="fadvise64" number="209"/>
-  <syscall name="fadvise64_64" number="210"/>
-  <syscall name="tgkill" number="211"/>
-  <syscall name="waitpid" number="212"/>
-  <syscall name="swapoff" number="213"/>
+  <syscall name="fadvise64" number="209" groups="descriptor"/>
+  <syscall name="fadvise64_64" number="210" groups="descriptor"/>
+  <syscall name="tgkill" number="211" groups="signal"/>
+  <syscall name="waitpid" number="212" groups="process"/>
+  <syscall name="swapoff" number="213" groups="file"/>
   <syscall name="sysinfo" number="214"/>
-  <syscall name="ipc" number="215"/>
-  <syscall name="sigreturn" number="216"/>
-  <syscall name="clone" number="217"/>
+  <syscall name="ipc" number="215" groups="ipc"/>
+  <syscall name="sigreturn" number="216" groups="signal"/>
+  <syscall name="clone" number="217" groups="process"/>
   <syscall name="ioprio_get" number="218"/>
   <syscall name="adjtimex" number="219"/>
-  <syscall name="sigprocmask" number="220"/>
+  <syscall name="sigprocmask" number="220" groups="signal"/>
   <syscall name="create_module" number="221"/>
   <syscall name="delete_module" number="222"/>
   <syscall name="get_kernel_syms" number="223"/>
@@ -242,17 +239,17 @@
   <syscall name="afs_syscall" number="227"/>
   <syscall name="setfsuid" number="228"/>
   <syscall name="setfsgid" number="229"/>
-  <syscall name="_newselect" number="230"/>
+  <syscall name="_newselect" number="230" groups="descriptor"/>
   <syscall name="time" number="231"/>
-  <syscall name="splice" number="232"/>
+  <syscall name="splice" number="232" groups="descriptor"/>
   <syscall name="stime" number="233"/>
-  <syscall name="statfs64" number="234"/>
-  <syscall name="fstatfs64" number="235"/>
-  <syscall name="_llseek" number="236"/>
-  <syscall name="mlock" number="237"/>
-  <syscall name="munlock" number="238"/>
-  <syscall name="mlockall" number="239"/>
-  <syscall name="munlockall" number="240"/>
+  <syscall name="statfs64" number="234" groups="file"/>
+  <syscall name="fstatfs64" number="235" groups="descriptor"/>
+  <syscall name="_llseek" number="236" groups="descriptor"/>
+  <syscall name="mlock" number="237" groups="memory"/>
+  <syscall name="munlock" number="238" groups="memory"/>
+  <syscall name="mlockall" number="239" groups="memory"/>
+  <syscall name="munlockall" number="240" groups="memory"/>
   <syscall name="sched_setparam" number="241"/>
   <syscall name="sched_getparam" number="242"/>
   <syscall name="sched_setscheduler" number="243"/>
@@ -262,12 +259,12 @@
   <syscall name="sched_get_priority_min" number="247"/>
   <syscall name="sched_rr_get_interval" number="248"/>
   <syscall name="nanosleep" number="249"/>
-  <syscall name="mremap" number="250"/>
+  <syscall name="mremap" number="250" groups="memory"/>
   <syscall name="_sysctl" number="251"/>
   <syscall name="getsid" number="252"/>
-  <syscall name="fdatasync" number="253"/>
+  <syscall name="fdatasync" number="253" groups="descriptor"/>
   <syscall name="nfsservctl" number="254"/>
-  <syscall name="sync_file_range" number="255"/>
+  <syscall name="sync_file_range" number="255" groups="descriptor"/>
   <syscall name="clock_settime" number="256"/>
   <syscall name="clock_gettime" number="257"/>
   <syscall name="clock_getres" number="258"/>
@@ -291,54 +288,54 @@
   <syscall name="mq_timedreceive" number="276"/>
   <syscall name="mq_notify" number="277"/>
   <syscall name="mq_getsetattr" number="278"/>
-  <syscall name="waitid" number="279"/>
-  <syscall name="tee" number="280"/>
+  <syscall name="waitid" number="279" groups="process"/>
+  <syscall name="tee" number="280" groups="descriptor"/>
   <syscall name="add_key" number="281"/>
   <syscall name="request_key" number="282"/>
   <syscall name="keyctl" number="283"/>
-  <syscall name="openat" number="284"/>
-  <syscall name="mkdirat" number="285"/>
-  <syscall name="mknodat" number="286"/>
-  <syscall name="fchownat" number="287"/>
-  <syscall name="futimesat" number="288"/>
-  <syscall name="fstatat64" number="289"/>
-  <syscall name="unlinkat" number="290"/>
-  <syscall name="renameat" number="291"/>
-  <syscall name="linkat" number="292"/>
-  <syscall name="symlinkat" number="293"/>
-  <syscall name="readlinkat" number="294"/>
-  <syscall name="fchmodat" number="295"/>
-  <syscall name="faccessat" number="296"/>
-  <syscall name="pselect6" number="297"/>
-  <syscall name="ppoll" number="298"/>
-  <syscall name="unshare" number="299"/>
+  <syscall name="openat" number="284" groups="descriptor,file"/>
+  <syscall name="mkdirat" number="285" groups="descriptor,file"/>
+  <syscall name="mknodat" number="286" groups="descriptor,file"/>
+  <syscall name="fchownat" number="287" groups="descriptor,file"/>
+  <syscall name="futimesat" number="288" groups="descriptor,file"/>
+  <syscall name="fstatat64" number="289" groups="descriptor,file"/>
+  <syscall name="unlinkat" number="290" groups="descriptor,file"/>
+  <syscall name="renameat" number="291" groups="descriptor,file"/>
+  <syscall name="linkat" number="292" groups="descriptor,file"/>
+  <syscall name="symlinkat" number="293" groups="descriptor,file"/>
+  <syscall name="readlinkat" number="294" groups="descriptor,file"/>
+  <syscall name="fchmodat" number="295" groups="descriptor,file"/>
+  <syscall name="faccessat" number="296" groups="descriptor,file"/>
+  <syscall name="pselect6" number="297" groups="descriptor"/>
+  <syscall name="ppoll" number="298" groups="descriptor"/>
+  <syscall name="unshare" number="299" groups="process"/>
   <syscall name="set_robust_list" number="300"/>
   <syscall name="get_robust_list" number="301"/>
-  <syscall name="migrate_pages" number="302"/>
-  <syscall name="mbind" number="303"/>
-  <syscall name="get_mempolicy" number="304"/>
-  <syscall name="set_mempolicy" number="305"/>
+  <syscall name="migrate_pages" number="302" groups="memory"/>
+  <syscall name="mbind" number="303" groups="memory"/>
+  <syscall name="get_mempolicy" number="304" groups="memory"/>
+  <syscall name="set_mempolicy" number="305" groups="memory"/>
   <syscall name="kexec_load" number="306"/>
-  <syscall name="move_pages" number="307"/>
+  <syscall name="move_pages" number="307" groups="memory"/>
   <syscall name="getcpu" number="308"/>
-  <syscall name="epoll_pwait" number="309"/>
-  <syscall name="utimensat" number="310"/>
-  <syscall name="signalfd" number="311"/>
-  <syscall name="timerfd_create" number="312"/>
-  <syscall name="eventfd" number="313"/>
-  <syscall name="fallocate" number="314"/>
-  <syscall name="timerfd_settime" number="315"/>
-  <syscall name="timerfd_gettime" number="316"/>
-  <syscall name="signalfd4" number="317"/>
-  <syscall name="eventfd2" number="318"/>
-  <syscall name="epoll_create1" number="319"/>
-  <syscall name="dup3" number="320"/>
-  <syscall name="pipe2" number="321"/>
-  <syscall name="inotify_init1" number="322"/>
-  <syscall name="accept4" number="323"/>
-  <syscall name="preadv" number="324"/>
-  <syscall name="pwritev" number="325"/>
-  <syscall name="rt_tgsigqueueinfo" number="326"/>
-  <syscall name="perf_event_open" number="327"/>
-  <syscall name="recvmmsg" number="328"/>
+  <syscall name="epoll_pwait" number="309" groups="descriptor"/>
+  <syscall name="utimensat" number="310" groups="descriptor,file"/>
+  <syscall name="signalfd" number="311" groups="descriptor,signal"/>
+  <syscall name="timerfd_create" number="312" groups="descriptor"/>
+  <syscall name="eventfd" number="313" groups="descriptor"/>
+  <syscall name="fallocate" number="314" groups="descriptor"/>
+  <syscall name="timerfd_settime" number="315" groups="descriptor"/>
+  <syscall name="timerfd_gettime" number="316" groups="descriptor"/>
+  <syscall name="signalfd4" number="317" groups="descriptor,signal"/>
+  <syscall name="eventfd2" number="318" groups="descriptor"/>
+  <syscall name="epoll_create1" number="319" groups="descriptor"/>
+  <syscall name="dup3" number="320" groups="descriptor"/>
+  <syscall name="pipe2" number="321" groups="descriptor"/>
+  <syscall name="inotify_init1" number="322" groups="descriptor"/>
+  <syscall name="accept4" number="323" groups="network"/>
+  <syscall name="preadv" number="324" groups="descriptor"/>
+  <syscall name="pwritev" number="325" groups="descriptor"/>
+  <syscall name="rt_tgsigqueueinfo" number="326" groups="process,signal"/>
+  <syscall name="perf_event_open" number="327" groups="descriptor"/>
+  <syscall name="recvmmsg" number="328" groups="network"/>
 </syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc-linux.xml.in ./gdb/syscalls/sparc-linux.xml.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/syscalls/sparc-linux.xml.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/syscalls/sparc-linux.xml.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,344 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+     
+     /usr/src/linux/arch/sparc/include/asm/unistd.h
+
+     The file mentioned above belongs to the Linux Kernel.  -->
+
+<syscalls_info>
+  <syscall name="restart_syscall" number="0"/>
+  <syscall name="exit" number="1"/>
+  <syscall name="fork" number="2"/>
+  <syscall name="read" number="3"/>
+  <syscall name="write" number="4"/>
+  <syscall name="open" number="5"/>
+  <syscall name="close" number="6"/>
+  <syscall name="wait4" number="7"/>
+  <syscall name="creat" number="8"/>
+  <syscall name="link" number="9"/>
+  <syscall name="unlink" number="10"/>
+  <syscall name="execv" number="11"/>
+  <syscall name="chdir" number="12"/>
+  <syscall name="chown"	number="13"/>
+  <syscall name="mknod" number="14"/>
+  <syscall name="chmod" number="15"/>
+  <syscall name="lchown" number="16"/>
+  <syscall name="brk" number="17"/>
+  <syscall name="perfctr" number="18"/>
+  <syscall name="lseek" number="19"/>
+  <syscall name="getpid" number="20"/>
+  <syscall name="capget" number="21"/>
+  <syscall name="capset" number="22"/>
+  <syscall name="setuid" number="23"/>
+  <syscall name="getuid" number="24"/>
+  <syscall name="vmsplice" number="25"/>
+  <syscall name="ptrace" number="26"/>
+  <syscall name="alarm" number="27"/>
+  <syscall name="sigaltstack" number="28"/>
+  <syscall name="pause" number="29"/>
+  <syscall name="utime" number="30"/>
+  <syscall name="lchown32" number="31"/>
+  <syscall name="fchown32" number="32"/>
+  <syscall name="access" number="33"/>
+  <syscall name="nice" number="34"/>
+  <syscall name="chown32" number="35"/>
+  <syscall name="sync" number="36"/>
+  <syscall name="kill" number="37"/>
+  <syscall name="stat" number="38"/>
+  <syscall name="sendfile" number="39"/>
+  <syscall name="lstat" number="40"/>
+  <syscall name="dup" number="41"/>
+  <syscall name="pipe" number="42"/>
+  <syscall name="times" number="43"/>
+  <syscall name="getuid32" number="44"/>
+  <syscall name="umount2" number="45"/>
+  <syscall name="setgid" number="46"/>
+  <syscall name="getgid" number="47"/>
+  <syscall name="signal" number="48"/>
+  <syscall name="geteuid" number="49"/>
+  <syscall name="getegid" number="50"/>
+  <syscall name="acct" number="51"/>
+  <syscall name="getgid32" number="53"/>
+  <syscall name="ioctl" number="54"/>
+  <syscall name="reboot" number="55"/>
+  <syscall name="mmap2" number="56"/>
+  <syscall name="symlink" number="57"/>
+  <syscall name="readlink" number="58"/>
+  <syscall name="execve" number="59"/>
+  <syscall name="umask" number="60"/>
+  <syscall name="chroot" number="61"/>
+  <syscall name="fstat" number="62"/>
+  <syscall name="fstat64" number="63"/>
+  <syscall name="getpagesize" number="64"/>
+  <syscall name="msync" number="65"/>
+  <syscall name="vfork" number="66"/>
+  <syscall name="pread64" number="67"/>
+  <syscall name="pwrite64" number="68"/>
+  <syscall name="geteuid32" number="69"/>
+  <syscall name="getegid32" number="70"/>
+  <syscall name="mmap" number="71"/>
+  <syscall name="setreuid32" number="72"/>
+  <syscall name="munmap" number="73"/>
+  <syscall name="mprotect" number="74"/>
+  <syscall name="madvise" number="75"/>
+  <syscall name="vhangup" number="76"/>
+  <syscall name="truncate64" number="77"/>
+  <syscall name="mincore" number="78"/>
+  <syscall name="getgroups" number="79"/>
+  <syscall name="setgroups" number="80"/>
+  <syscall name="getpgrp" number="81"/>
+  <syscall name="setgroups32" number="82"/>
+  <syscall name="setitimer" number="83"/>
+  <syscall name="ftruncate64" number="84"/>
+  <syscall name="swapon" number="85"/>
+  <syscall name="getitimer" number="86"/>
+  <syscall name="setuid32" number="87"/>
+  <syscall name="sethostname" number="88"/>
+  <syscall name="setgid32" number="89"/>
+  <syscall name="dup2" number="90"/>
+  <syscall name="setfsuid32" number="91"/>
+  <syscall name="fcntl" number="92"/>
+  <syscall name="select" number="93"/>
+  <syscall name="setfsgid32" number="94"/>
+  <syscall name="fsync" number="95"/>
+  <syscall name="setpriority" number="96"/>
+  <syscall name="socket" number="97"/>
+  <syscall name="connect" number="98"/>
+  <syscall name="accept" number="99"/>
+  <syscall name="getpriority" number="100"/>
+  <syscall name="rt_sigreturn" number="101"/>
+  <syscall name="rt_sigaction" number="102"/>
+  <syscall name="rt_sigprocmask" number="103"/>
+  <syscall name="rt_sigpending" number="104"/>
+  <syscall name="rt_sigtimedwait" number="105"/>
+  <syscall name="rt_sigqueueinfo" number="106"/>
+  <syscall name="rt_sigsuspend" number="107"/>
+  <syscall name="setresuid32" number="108"/>
+  <syscall name="getresuid32" number="109"/>
+  <syscall name="setresgid32" number="110"/>
+  <syscall name="getresgid32" number="111"/>
+  <syscall name="setregid32" number="112"/>
+  <syscall name="recvmsg" number="113"/>
+  <syscall name="sendmsg" number="114"/>
+  <syscall name="getgroups32" number="115"/>
+  <syscall name="gettimeofday" number="116"/>
+  <syscall name="getrusage" number="117"/>
+  <syscall name="getsockopt" number="118"/>
+  <syscall name="getcwd" number="119"/>
+  <syscall name="readv" number="120"/>
+  <syscall name="writev" number="121"/>
+  <syscall name="settimeofday" number="122"/>
+  <syscall name="fchown" number="123"/>
+  <syscall name="fchmod" number="124"/>
+  <syscall name="recvfrom" number="125"/>
+  <syscall name="setreuid" number="126"/>
+  <syscall name="setregid" number="127"/>
+  <syscall name="rename" number="128"/>
+  <syscall name="truncate" number="129"/>
+  <syscall name="ftruncate" number="130"/>
+  <syscall name="flock" number="131"/>
+  <syscall name="lstat64" number="132"/>
+  <syscall name="sendto" number="133"/>
+  <syscall name="shutdown" number="134"/>
+  <syscall name="socketpair" number="135"/>
+  <syscall name="mkdir" number="136"/>
+  <syscall name="rmdir" number="137"/>
+  <syscall name="utimes" number="138"/>
+  <syscall name="stat64" number="139"/>
+  <syscall name="sendfile64" number="140"/>
+  <syscall name="getpeername" number="141"/>
+  <syscall name="futex" number="142"/>
+  <syscall name="gettid" number="143"/>
+  <syscall name="getrlimit" number="144"/>
+  <syscall name="setrlimit" number="145"/>
+  <syscall name="pivot_root" number="146"/>
+  <syscall name="prctl" number="147"/>
+  <syscall name="pciconfig_read" number="148"/>
+  <syscall name="pciconfig_write" number="149"/>
+  <syscall name="getsockname" number="150"/>
+  <syscall name="inotify_init" number="151"/>
+  <syscall name="inotify_add_watch" number="152"/>
+  <syscall name="poll" number="153"/>
+  <syscall name="getdents64" number="154"/>
+  <syscall name="fcntl64" number="155"/>
+  <syscall name="inotify_rm_watch" number="156"/>
+  <syscall name="statfs" number="157"/>
+  <syscall name="fstatfs" number="158"/>
+  <syscall name="umount" number="159"/>
+  <syscall name="sched_set_affinity" number="160"/>
+  <syscall name="sched_get_affinity" number="161"/>
+  <syscall name="getdomainname" number="162"/>
+  <syscall name="setdomainname" number="163"/>
+  <syscall name="quotactl" number="165"/>
+  <syscall name="set_tid_address" number="166"/>
+  <syscall name="mount" number="167"/>
+  <syscall name="ustat" number="168"/>
+  <syscall name="setxattr" number="169"/>
+  <syscall name="lsetxattr" number="170"/>
+  <syscall name="fsetxattr" number="171"/>
+  <syscall name="getxattr" number="172"/>
+  <syscall name="lgetxattr" number="173"/>
+  <syscall name="getdents" number="174"/>
+  <syscall name="setsid" number="175"/>
+  <syscall name="fchdir" number="176"/>
+  <syscall name="fgetxattr" number="177"/>
+  <syscall name="listxattr" number="178"/>
+  <syscall name="llistxattr" number="179"/>
+  <syscall name="flistxattr" number="180"/>
+  <syscall name="removexattr" number="181"/>
+  <syscall name="lremovexattr" number="182"/>
+  <syscall name="sigpending" number="183"/>
+  <syscall name="query_module" number="184"/>
+  <syscall name="setpgid" number="185"/>
+  <syscall name="fremovexattr" number="186"/>
+  <syscall name="tkill" number="187"/>
+  <syscall name="exit_group" number="188"/>
+  <syscall name="uname" number="189"/>
+  <syscall name="init_module" number="190"/>
+  <syscall name="personality" number="191"/>
+  <syscall name="remap_file_pages" number="192"/>
+  <syscall name="epoll_create" number="193"/>
+  <syscall name="epoll_ctl" number="194"/>
+  <syscall name="epoll_wait" number="195"/>
+  <syscall name="ioprio_set" number="196"/>
+  <syscall name="getppid" number="197"/>
+  <syscall name="sigaction" number="198"/>
+  <syscall name="sgetmask" number="199"/>
+  <syscall name="ssetmask" number="200"/>
+  <syscall name="sigsuspend" number="201"/>
+  <syscall name="oldlstat" number="202"/>
+  <syscall name="uselib" number="203"/>
+  <syscall name="readdir" number="204"/>
+  <syscall name="readahead" number="205"/>
+  <syscall name="socketcall" number="206"/>
+  <syscall name="syslog" number="207"/>
+  <syscall name="lookup_dcookie" number="208"/>
+  <syscall name="fadvise64" number="209"/>
+  <syscall name="fadvise64_64" number="210"/>
+  <syscall name="tgkill" number="211"/>
+  <syscall name="waitpid" number="212"/>
+  <syscall name="swapoff" number="213"/>
+  <syscall name="sysinfo" number="214"/>
+  <syscall name="ipc" number="215"/>
+  <syscall name="sigreturn" number="216"/>
+  <syscall name="clone" number="217"/>
+  <syscall name="ioprio_get" number="218"/>
+  <syscall name="adjtimex" number="219"/>
+  <syscall name="sigprocmask" number="220"/>
+  <syscall name="create_module" number="221"/>
+  <syscall name="delete_module" number="222"/>
+  <syscall name="get_kernel_syms" number="223"/>
+  <syscall name="getpgid" number="224"/>
+  <syscall name="bdflush" number="225"/>
+  <syscall name="sysfs" number="226"/>
+  <syscall name="afs_syscall" number="227"/>
+  <syscall name="setfsuid" number="228"/>
+  <syscall name="setfsgid" number="229"/>
+  <syscall name="_newselect" number="230"/>
+  <syscall name="time" number="231"/>
+  <syscall name="splice" number="232"/>
+  <syscall name="stime" number="233"/>
+  <syscall name="statfs64" number="234"/>
+  <syscall name="fstatfs64" number="235"/>
+  <syscall name="_llseek" number="236"/>
+  <syscall name="mlock" number="237"/>
+  <syscall name="munlock" number="238"/>
+  <syscall name="mlockall" number="239"/>
+  <syscall name="munlockall" number="240"/>
+  <syscall name="sched_setparam" number="241"/>
+  <syscall name="sched_getparam" number="242"/>
+  <syscall name="sched_setscheduler" number="243"/>
+  <syscall name="sched_getscheduler" number="244"/>
+  <syscall name="sched_yield" number="245"/>
+  <syscall name="sched_get_priority_max" number="246"/>
+  <syscall name="sched_get_priority_min" number="247"/>
+  <syscall name="sched_rr_get_interval" number="248"/>
+  <syscall name="nanosleep" number="249"/>
+  <syscall name="mremap" number="250"/>
+  <syscall name="_sysctl" number="251"/>
+  <syscall name="getsid" number="252"/>
+  <syscall name="fdatasync" number="253"/>
+  <syscall name="nfsservctl" number="254"/>
+  <syscall name="sync_file_range" number="255"/>
+  <syscall name="clock_settime" number="256"/>
+  <syscall name="clock_gettime" number="257"/>
+  <syscall name="clock_getres" number="258"/>
+  <syscall name="clock_nanosleep" number="259"/>
+  <syscall name="sched_getaffinity" number="260"/>
+  <syscall name="sched_setaffinity" number="261"/>
+  <syscall name="timer_settime" number="262"/>
+  <syscall name="timer_gettime" number="263"/>
+  <syscall name="timer_getoverrun" number="264"/>
+  <syscall name="timer_delete" number="265"/>
+  <syscall name="timer_create" number="266"/>
+  <syscall name="vserver" number="267"/>
+  <syscall name="io_setup" number="268"/>
+  <syscall name="io_destroy" number="269"/>
+  <syscall name="io_submit" number="270"/>
+  <syscall name="io_cancel" number="271"/>
+  <syscall name="io_getevents" number="272"/>
+  <syscall name="mq_open" number="273"/>
+  <syscall name="mq_unlink" number="274"/>
+  <syscall name="mq_timedsend" number="275"/>
+  <syscall name="mq_timedreceive" number="276"/>
+  <syscall name="mq_notify" number="277"/>
+  <syscall name="mq_getsetattr" number="278"/>
+  <syscall name="waitid" number="279"/>
+  <syscall name="tee" number="280"/>
+  <syscall name="add_key" number="281"/>
+  <syscall name="request_key" number="282"/>
+  <syscall name="keyctl" number="283"/>
+  <syscall name="openat" number="284"/>
+  <syscall name="mkdirat" number="285"/>
+  <syscall name="mknodat" number="286"/>
+  <syscall name="fchownat" number="287"/>
+  <syscall name="futimesat" number="288"/>
+  <syscall name="fstatat64" number="289"/>
+  <syscall name="unlinkat" number="290"/>
+  <syscall name="renameat" number="291"/>
+  <syscall name="linkat" number="292"/>
+  <syscall name="symlinkat" number="293"/>
+  <syscall name="readlinkat" number="294"/>
+  <syscall name="fchmodat" number="295"/>
+  <syscall name="faccessat" number="296"/>
+  <syscall name="pselect6" number="297"/>
+  <syscall name="ppoll" number="298"/>
+  <syscall name="unshare" number="299"/>
+  <syscall name="set_robust_list" number="300"/>
+  <syscall name="get_robust_list" number="301"/>
+  <syscall name="migrate_pages" number="302"/>
+  <syscall name="mbind" number="303"/>
+  <syscall name="get_mempolicy" number="304"/>
+  <syscall name="set_mempolicy" number="305"/>
+  <syscall name="kexec_load" number="306"/>
+  <syscall name="move_pages" number="307"/>
+  <syscall name="getcpu" number="308"/>
+  <syscall name="epoll_pwait" number="309"/>
+  <syscall name="utimensat" number="310"/>
+  <syscall name="signalfd" number="311"/>
+  <syscall name="timerfd_create" number="312"/>
+  <syscall name="eventfd" number="313"/>
+  <syscall name="fallocate" number="314"/>
+  <syscall name="timerfd_settime" number="315"/>
+  <syscall name="timerfd_gettime" number="316"/>
+  <syscall name="signalfd4" number="317"/>
+  <syscall name="eventfd2" number="318"/>
+  <syscall name="epoll_create1" number="319"/>
+  <syscall name="dup3" number="320"/>
+  <syscall name="pipe2" number="321"/>
+  <syscall name="inotify_init1" number="322"/>
+  <syscall name="accept4" number="323"/>
+  <syscall name="preadv" number="324"/>
+  <syscall name="pwritev" number="325"/>
+  <syscall name="rt_tgsigqueueinfo" number="326"/>
+  <syscall name="perf_event_open" number="327"/>
+  <syscall name="recvmmsg" number="328"/>
+</syscalls_info>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/system-gdbinit/elinos.py ./gdb/system-gdbinit/elinos.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/system-gdbinit/elinos.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/system-gdbinit/elinos.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/system-gdbinit/wrs-linux.py ./gdb/system-gdbinit/wrs-linux.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/system-gdbinit/wrs-linux.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/system-gdbinit/wrs-linux.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/resume.h ./gdb/target/resume.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/resume.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target/resume.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target resumption definitions and prototypes.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/target.h ./gdb/target/target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/target.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target/target.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations for common target functions.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,10 +64,35 @@ extern int target_write_memory (CORE_ADD
 
 extern void target_stop_and_wait (ptid_t ptid);
 
-/* Restart a target previously stopped by target_stop_and_wait.
-   No signal is delivered to the target.  This function must be
-   provided by the client.  */
+/* Restart a target previously stopped.  No signal is delivered to the
+   target.  This function must be provided by the client.  */
 
 extern void target_continue_no_signal (ptid_t ptid);
 
+/* Restart a target previously stopped.  SIGNAL is delivered to the
+   target.  This function must be provided by the client.  */
+
+extern void target_continue (ptid_t ptid, enum gdb_signal signal);
+
+/* Wait for process pid to do something.  PTID = -1 to wait for any
+   pid to do something.  Return pid of child, or -1 in case of error;
+   store status through argument pointer STATUS.  Note that it is
+   _NOT_ OK to throw_exception() out of target_wait() without popping
+   the debugging target from the stack; GDB isn't prepared to get back
+   to the prompt with a debugging target but without the frame cache,
+   stop_pc, etc., set up.  OPTIONS is a bitwise OR of TARGET_W*
+   options.  */
+
+extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status,
+			   int options);
+
+/* The inferior process has died.  Do what is right.  */
+
+extern void target_mourn_inferior (ptid_t ptid);
+
+/* Return 1 if this target can debug multiple processes
+   simultaneously, zero otherwise.  */
+
+extern int target_supports_multi_process (void);
+
 #endif /* TARGET_COMMON_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/wait.h ./gdb/target/wait.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/wait.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target/wait.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target wait definitions and prototypes.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/waitstatus.c ./gdb/target/waitstatus.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/waitstatus.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target/waitstatus.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target waitstatus implementations.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -63,6 +63,11 @@ target_waitstatus_to_string (const struc
       return xstrprintf ("%sno-history", kind_str);
     case TARGET_WAITKIND_NO_RESUMED:
       return xstrprintf ("%sno-resumed", kind_str);
+    case TARGET_WAITKIND_THREAD_CREATED:
+      return xstrprintf ("%sthread created", kind_str);
+    case TARGET_WAITKIND_THREAD_EXITED:
+      return xstrprintf ("%sthread exited, status = %d",
+			 kind_str, ws->value.integer);
     default:
       return xstrprintf ("%sunknown???", kind_str);
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/waitstatus.h ./gdb/target/waitstatus.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target/waitstatus.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target/waitstatus.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target waitstatus definitions and prototypes.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -92,7 +92,13 @@ enum target_waitkind
   TARGET_WAITKIND_NO_HISTORY,
  
   /* There are no resumed children left in the program.  */
-  TARGET_WAITKIND_NO_RESUMED
+  TARGET_WAITKIND_NO_RESUMED,
+
+  /* The thread was created.  */
+  TARGET_WAITKIND_THREAD_CREATED,
+
+  /* The thread has exited.  The exit status is in value.integer.  */
+  TARGET_WAITKIND_THREAD_EXITED,
 };
 
 struct target_waitstatus
@@ -131,7 +137,10 @@ enum target_stop_reason
   TARGET_STOPPED_BY_HW_BREAKPOINT,
 
   /* Stopped by a watchpoint.  */
-  TARGET_STOPPED_BY_WATCHPOINT
+  TARGET_STOPPED_BY_WATCHPOINT,
+
+  /* Stopped by a single step finishing.  */
+  TARGET_STOPPED_BY_SINGLE_STEP
 };
 
 /* Prototypes */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target.c ./gdb/target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Select target systems and architectures at runtime for GDB.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -43,6 +43,9 @@
 #include "agent.h"
 #include "auxv.h"
 #include "target-debug.h"
+#include "top.h"
+#include "event-top.h"
+#include <algorithm>
 
 static void target_info (char *, int);
 
@@ -347,7 +350,7 @@ complete_target_initialization (struct t
 static void
 open_target (char *args, int from_tty, struct cmd_list_element *command)
 {
-  struct target_ops *ops = get_cmd_context (command);
+  struct target_ops *ops = (struct target_ops *) get_cmd_context (command);
 
   if (targetdebug)
     fprintf_unfiltered (gdb_stdlog, "-> %s->to_open (...)\n",
@@ -444,7 +447,7 @@ enum terminal_state
     terminal_is_ours = 2
   };
 
-static enum terminal_state terminal_state;
+static enum terminal_state terminal_state = terminal_is_ours;
 
 /* See target.h.  */
 
@@ -466,14 +469,29 @@ target_terminal_is_inferior (void)
 
 /* See target.h.  */
 
+int
+target_terminal_is_ours (void)
+{
+  return (terminal_state == terminal_is_ours);
+}
+
+/* See target.h.  */
+
 void
 target_terminal_inferior (void)
 {
+  struct ui *ui = current_ui;
+
   /* A background resume (``run&'') should leave GDB in control of the
-     terminal.  Use target_can_async_p, not target_is_async_p, since at
-     this point the target is not async yet.  However, if sync_execution
-     is not set, we know it will become async prior to resume.  */
-  if (target_can_async_p () && !sync_execution)
+     terminal.  */
+  if (ui->prompt_state != PROMPT_BLOCKED)
+    return;
+
+  /* Since we always run the inferior in the main console (unless "set
+     inferior-tty" is in effect), when some UI other than the main one
+     calls target_terminal_inferior/target_terminal_inferior, then we
+     leave the main UI's terminal settings as is.  */
+  if (ui != main_ui)
     return;
 
   if (terminal_state == terminal_is_inferior)
@@ -483,6 +501,11 @@ target_terminal_inferior (void)
      inferior's terminal modes.  */
   (*current_target.to_terminal_inferior) (&current_target);
   terminal_state = terminal_is_inferior;
+
+  /* If the user hit C-c before, pretend that it was hit right
+     here.  */
+  if (check_quit_flag ())
+    target_pass_ctrlc ();
 }
 
 /* See target.h.  */
@@ -490,6 +513,12 @@ target_terminal_inferior (void)
 void
 target_terminal_ours (void)
 {
+  struct ui *ui = current_ui;
+
+  /* See target_terminal_inferior.  */
+  if (ui != main_ui)
+    return;
+
   if (terminal_state == terminal_is_ours)
     return;
 
@@ -502,6 +531,12 @@ target_terminal_ours (void)
 void
 target_terminal_ours_for_output (void)
 {
+  struct ui *ui = current_ui;
+
+  /* See target_terminal_inferior.  */
+  if (ui != main_ui)
+    return;
+
   if (terminal_state != terminal_is_inferior)
     return;
   (*current_target.to_terminal_ours_for_output) (&current_target);
@@ -531,7 +566,7 @@ target_supports_terminal_ours (void)
 static void
 cleanup_restore_target_terminal (void *arg)
 {
-  enum terminal_state *previous_state = arg;
+  enum terminal_state *previous_state = (enum terminal_state *) arg;
 
   switch (*previous_state)
     {
@@ -552,7 +587,7 @@ cleanup_restore_target_terminal (void *a
 struct cleanup *
 make_cleanup_restore_target_terminal (void)
 {
-  enum terminal_state *ts = xmalloc (sizeof (*ts));
+  enum terminal_state *ts = XNEW (enum terminal_state);
 
   *ts = terminal_state;
 
@@ -746,21 +781,35 @@ unpush_target (struct target_ops *t)
   return 1;
 }
 
+/* Unpush TARGET and assert that it worked.  */
+
+static void
+unpush_target_and_assert (struct target_ops *target)
+{
+  if (!unpush_target (target))
+    {
+      fprintf_unfiltered (gdb_stderr,
+			  "pop_all_targets couldn't find target %s\n",
+			  target->to_shortname);
+      internal_error (__FILE__, __LINE__,
+		      _("failed internal consistency check"));
+    }
+}
+
 void
 pop_all_targets_above (enum strata above_stratum)
 {
   while ((int) (current_target.to_stratum) > (int) above_stratum)
-    {
-      if (!unpush_target (target_stack))
-	{
-	  fprintf_unfiltered (gdb_stderr,
-			      "pop_all_targets couldn't find target %s\n",
-			      target_stack->to_shortname);
-	  internal_error (__FILE__, __LINE__,
-			  _("failed internal consistency check"));
-	  break;
-	}
-    }
+    unpush_target_and_assert (target_stack);
+}
+
+/* See target.h.  */
+
+void
+pop_all_targets_at_and_above (enum strata stratum)
+{
+  while ((int) (current_target.to_stratum) >= (int) stratum)
+    unpush_target_and_assert (target_stack);
 }
 
 void
@@ -926,7 +975,7 @@ target_read_string (CORE_ADDR memaddr, c
 
   /* Small for testing.  */
   buffer_allocated = 4;
-  buffer = xmalloc (buffer_allocated);
+  buffer = (char *) xmalloc (buffer_allocated);
   bufptr = buffer;
 
   while (len > 0)
@@ -953,7 +1002,7 @@ target_read_string (CORE_ADDR memaddr, c
 
 	  bytes = bufptr - buffer;
 	  buffer_allocated *= 2;
-	  buffer = xrealloc (buffer, buffer_allocated);
+	  buffer = (char *) xrealloc (buffer, buffer_allocated);
 	  bufptr = buffer + bytes;
 	}
 
@@ -1060,7 +1109,7 @@ memory_xfer_check_region (gdb_byte *read
    instance, could have some of memory but delegate other bits to
    the target below it.  So, we must manually try all targets.  */
 
-static enum target_xfer_status
+enum target_xfer_status
 raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
 			 const gdb_byte *writebuf, ULONGEST memaddr, LONGEST len,
 			 ULONGEST *xfered_len)
@@ -1235,17 +1284,18 @@ memory_xfer_partial (struct target_ops *
     }
   else
     {
-      void *buf;
+      gdb_byte *buf;
       struct cleanup *old_chain;
 
       /* A large write request is likely to be partially satisfied
 	 by memory_xfer_partial_1.  We will continually malloc
 	 and free a copy of the entire write request for breakpoint
 	 shadow handling even though we only end up writing a small
-	 subset of it.  Cap writes to 4KB to mitigate this.  */
-      len = min (4096, len);
+	 subset of it.  Cap writes to a limit specified by the target
+	 to mitigate this.  */
+      len = std::min (ops->to_get_memory_xfer_limit (ops), len);
 
-      buf = xmalloc (len);
+      buf = (gdb_byte *) xmalloc (len);
       old_chain = make_cleanup (xfree, buf);
       memcpy (buf, writebuf, len);
 
@@ -1380,7 +1430,7 @@ target_xfer_partial (struct target_ops *
 
 /* Read LEN bytes of target memory at address MEMADDR, placing the
    results in GDB's memory at MYADDR.  Returns either 0 for success or
-   TARGET_XFER_E_IO if any error occurs.
+   -1 if any error occurs.
 
    If an error occurs, no guarantee is made about the contents of the data at
    MYADDR.  In particular, the caller should not depend upon partial reads
@@ -1399,7 +1449,7 @@ target_read_memory (CORE_ADDR memaddr, g
 		   myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* See target/target.h.  */
@@ -1431,7 +1481,7 @@ target_read_raw_memory (CORE_ADDR memadd
 		   myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* Like target_read_memory, but specify explicitly that this is a read from
@@ -1446,7 +1496,7 @@ target_read_stack (CORE_ADDR memaddr, gd
 		   myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* Like target_read_memory, but specify explicitly that this is a read from
@@ -1461,14 +1511,14 @@ target_read_code (CORE_ADDR memaddr, gdb
 		   myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* Write LEN bytes from MYADDR to target memory at address MEMADDR.
-   Returns either 0 for success or TARGET_XFER_E_IO if any
-   error occurs.  If an error occurs, no guarantee is made about how
-   much data got written.  Callers that can deal with partial writes
-   should call target_write.  */
+   Returns either 0 for success or -1 if any error occurs.  If an
+   error occurs, no guarantee is made about how much data got written.
+   Callers that can deal with partial writes should call
+   target_write.  */
 
 int
 target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
@@ -1479,14 +1529,14 @@ target_write_memory (CORE_ADDR memaddr, 
 		    myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* Write LEN bytes from MYADDR to target raw memory at address
-   MEMADDR.  Returns either 0 for success or TARGET_XFER_E_IO
-   if any error occurs.  If an error occurs, no guarantee is made
-   about how much data got written.  Callers that can deal with
-   partial writes should call target_write.  */
+   MEMADDR.  Returns either 0 for success or -1 if any error occurs.
+   If an error occurs, no guarantee is made about how much data got
+   written.  Callers that can deal with partial writes should call
+   target_write.  */
 
 int
 target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
@@ -1497,7 +1547,7 @@ target_write_raw_memory (CORE_ADDR memad
 		    myaddr, memaddr, len) == len)
     return 0;
   else
-    return TARGET_XFER_E_IO;
+    return -1;
 }
 
 /* Fetch the target's memory map.  */
@@ -1508,8 +1558,6 @@ target_memory_map (void)
   VEC(mem_region_s) *result;
   struct mem_region *last_one, *this_one;
   int ix;
-  struct target_ops *t;
-
   result = current_target.to_memory_map (&current_target);
   if (result == NULL)
     return NULL;
@@ -1655,7 +1703,7 @@ read_whatever_is_readable (struct target
 			   int unit_size,
 			   VEC(memory_read_result_s) **result)
 {
-  gdb_byte *buf = xmalloc (end - begin);
+  gdb_byte *buf = (gdb_byte *) xmalloc (end - begin);
   ULONGEST current_begin = begin;
   ULONGEST current_end = end;
   int forward;
@@ -1755,7 +1803,7 @@ read_whatever_is_readable (struct target
       /* The [current_end, end) range has been read.  */
       LONGEST region_len = end - current_end;
 
-      r.data = xmalloc (region_len * unit_size);
+      r.data = (gdb_byte *) xmalloc (region_len * unit_size);
       memcpy (r.data, buf + (current_end - begin) * unit_size,
 	      region_len * unit_size);
       r.begin = current_end;
@@ -1768,15 +1816,15 @@ read_whatever_is_readable (struct target
 void
 free_memory_read_result_vector (void *x)
 {
-  VEC(memory_read_result_s) *v = x;
+  VEC(memory_read_result_s) **v = (VEC(memory_read_result_s) **) x;
   memory_read_result_s *current;
   int ix;
 
-  for (ix = 0; VEC_iterate (memory_read_result_s, v, ix, current); ++ix)
+  for (ix = 0; VEC_iterate (memory_read_result_s, *v, ix, current); ++ix)
     {
       xfree (current->data);
     }
-  VEC_free (memory_read_result_s, v);
+  VEC_free (memory_read_result_s, *v);
 }
 
 VEC(memory_read_result_s) *
@@ -1785,6 +1833,8 @@ read_memory_robust (struct target_ops *o
 {
   VEC(memory_read_result_s) *result = 0;
   int unit_size = gdbarch_addressable_memory_unit_size (target_gdbarch ());
+  struct cleanup *cleanup = make_cleanup (free_memory_read_result_vector,
+					  &result);
 
   LONGEST xfered_total = 0;
   while (xfered_total < len)
@@ -1809,8 +1859,9 @@ read_memory_robust (struct target_ops *o
 	}
       else
 	{
-	  LONGEST to_read = min (len - xfered_total, region_len);
+	  LONGEST to_read = std::min (len - xfered_total, region_len);
 	  gdb_byte *buffer = (gdb_byte *) xmalloc (to_read * unit_size);
+	  struct cleanup *inner_cleanup = make_cleanup (xfree, buffer);
 
 	  LONGEST xfered_partial =
 	      target_read (ops, TARGET_OBJECT_MEMORY, NULL,
@@ -1821,14 +1872,17 @@ read_memory_robust (struct target_ops *o
 	    {
 	      /* Got an error reading full chunk.  See if maybe we can read
 		 some subrange.  */
-	      xfree (buffer);
-	      read_whatever_is_readable (ops, offset + xfered_total, unit_size,
-					 offset + xfered_total + to_read, &result);
+	      do_cleanups (inner_cleanup);
+	      read_whatever_is_readable (ops, offset + xfered_total,
+					 offset + xfered_total + to_read,
+					 unit_size, &result);
 	      xfered_total += to_read;
 	    }
 	  else
 	    {
 	      struct memory_read_result r;
+
+	      discard_cleanups (inner_cleanup);
 	      r.data = buffer;
 	      r.begin = offset + xfered_total;
 	      r.end = r.begin + xfered_partial;
@@ -1838,6 +1892,8 @@ read_memory_robust (struct target_ops *o
 	  QUIT;
 	}
     }
+
+  discard_cleanups (cleanup);
   return result;
 }
 
@@ -1923,7 +1979,7 @@ target_read_alloc_1 (struct target_ops *
   /* Start by reading up to 4K at a time.  The target will throttle
      this number down if necessary.  */
   buf_alloc = 4096;
-  buf = xmalloc (buf_alloc);
+  buf = (gdb_byte *) xmalloc (buf_alloc);
   buf_pos = 0;
   while (1)
     {
@@ -1956,7 +2012,7 @@ target_read_alloc_1 (struct target_ops *
       if (buf_alloc < buf_pos * 2)
 	{
 	  buf_alloc *= 2;
-	  buf = xrealloc (buf, buf_alloc);
+	  buf = (gdb_byte *) xrealloc (buf, buf_alloc);
 	}
 
       QUIT;
@@ -2058,7 +2114,8 @@ target_insert_breakpoint (struct gdbarch
 
 int
 target_remove_breakpoint (struct gdbarch *gdbarch,
-			  struct bp_target_info *bp_tgt)
+			  struct bp_target_info *bp_tgt,
+			  enum remove_bp_reason reason)
 {
   /* This is kind of a weird case to handle, but the permission might
      have been changed after breakpoints were inserted - in which case
@@ -2071,7 +2128,7 @@ target_remove_breakpoint (struct gdbarch
     }
 
   return current_target.to_remove_breakpoint (&current_target,
-					      gdbarch, bp_tgt);
+					      gdbarch, bp_tgt, reason);
 }
 
 static void
@@ -2138,6 +2195,12 @@ target_pre_inferior (int from_tty)
       target_clear_description ();
     }
 
+  /* attach_flag may be set if the previous process associated with
+     the inferior was attached to.  */
+  current_inferior ()->attach_flag = 0;
+
+  current_inferior ()->highest_thread_num = 0;
+
   agent_capability_invalidate ();
 }
 
@@ -2196,8 +2259,6 @@ target_preopen (int from_tty)
 void
 target_detach (const char *args, int from_tty)
 {
-  struct target_ops* t;
-  
   if (gdbarch_has_global_breakpoints (target_gdbarch ()))
     /* Don't remove global breakpoints here.  They're removed on
        disconnection from the target.  */
@@ -2223,19 +2284,32 @@ target_disconnect (const char *args, int
   current_target.to_disconnect (&current_target, args, from_tty);
 }
 
+/* See target/target.h.  */
+
 ptid_t
 target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
 {
   return (current_target.to_wait) (&current_target, ptid, status, options);
 }
 
+/* See target.h.  */
+
+ptid_t
+default_target_wait (struct target_ops *ops,
+		     ptid_t ptid, struct target_waitstatus *status,
+		     int options)
+{
+  status->kind = TARGET_WAITKIND_IGNORE;
+  return minus_one_ptid;
+}
+
 char *
 target_pid_to_str (ptid_t ptid)
 {
   return (*current_target.to_pid_to_str) (&current_target, ptid);
 }
 
-char *
+const char *
 target_thread_name (struct thread_info *info)
 {
   return current_target.to_thread_name (&current_target, info);
@@ -2244,8 +2318,6 @@ target_thread_name (struct thread_info *
 void
 target_resume (ptid_t ptid, int step, enum gdb_signal signal)
 {
-  struct target_ops *t;
-
   target_dcache_invalidate ();
 
   current_target.to_resume (&current_target, ptid, step, signal);
@@ -2257,6 +2329,34 @@ target_resume (ptid_t ptid, int step, en
   clear_inline_frame_state (ptid);
 }
 
+/* If true, target_commit_resume is a nop.  */
+static int defer_target_commit_resume;
+
+/* See target.h.  */
+
+void
+target_commit_resume (void)
+{
+  struct target_ops *t;
+
+  if (defer_target_commit_resume)
+    return;
+
+  current_target.to_commit_resume (&current_target);
+}
+
+/* See target.h.  */
+
+struct cleanup *
+make_cleanup_defer_target_commit_resume (void)
+{
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup_restore_integer (&defer_target_commit_resume);
+  defer_target_commit_resume = 1;
+  return old_chain;
+}
+
 void
 target_pass_signals (int numsigs, unsigned char *pass_signals)
 {
@@ -2289,6 +2389,14 @@ target_follow_fork (int follow_child, in
 					follow_child, detach_fork);
 }
 
+/* Target wrapper for follow exec hook.  */
+
+void
+target_follow_exec (struct inferior *inf, char *execd_pathname)
+{
+  current_target.to_follow_exec (&current_target, inf, execd_pathname);
+}
+
 static void
 default_mourn_inferior (struct target_ops *self)
 {
@@ -2297,8 +2405,9 @@ default_mourn_inferior (struct target_op
 }
 
 void
-target_mourn_inferior (void)
+target_mourn_inferior (ptid_t ptid)
 {
+  gdb_assert (ptid_equal (ptid, inferior_ptid));
   current_target.to_mourn_inferior (&current_target);
 
   /* We no longer need to keep handles on any of the object files.
@@ -2340,7 +2449,7 @@ simple_search_memory (struct target_ops 
   if (search_space_len < search_buf_size)
     search_buf_size = search_space_len;
 
-  search_buf = malloc (search_buf_size);
+  search_buf = (gdb_byte *) malloc (search_buf_size);
   if (search_buf == NULL)
     error (_("Unable to allocate memory to perform the search."));
   old_cleanups = make_cleanup (free_current_contents, &search_buf);
@@ -2366,10 +2475,11 @@ simple_search_memory (struct target_ops 
   while (search_space_len >= pattern_len)
     {
       gdb_byte *found_ptr;
-      unsigned nr_search_bytes = min (search_space_len, search_buf_size);
+      unsigned nr_search_bytes
+	= std::min (search_space_len, (ULONGEST) search_buf_size);
 
-      found_ptr = memmem (search_buf, nr_search_bytes,
-			  pattern, pattern_len);
+      found_ptr = (gdb_byte *) memmem (search_buf, nr_search_bytes,
+				       pattern, pattern_len);
 
       if (found_ptr != NULL)
 	{
@@ -2399,7 +2509,8 @@ simple_search_memory (struct target_ops 
 	  gdb_assert (keep_len == pattern_len - 1);
 	  memcpy (search_buf, search_buf + chunk_size, keep_len);
 
-	  nr_to_read = min (search_space_len - keep_len, chunk_size);
+	  nr_to_read = std::min (search_space_len - keep_len,
+				 (ULONGEST) chunk_size);
 
 	  if (target_read (ops, TARGET_OBJECT_MEMORY, NULL,
 			   search_buf + keep_len, read_addr,
@@ -2644,6 +2755,14 @@ target_supports_disable_randomization (v
   return 0;
 }
 
+/* See target/target.h.  */
+
+int
+target_supports_multi_process (void)
+{
+  return (*current_target.to_supports_multi_process) (&current_target);
+}
+
 char *
 target_get_osdata (const char *type)
 {
@@ -2740,7 +2859,7 @@ static int lowest_closed_fd;
 static int
 acquire_fileio_fd (struct target_ops *t, int fd)
 {
-  fileio_fh_t *fh, buf;
+  fileio_fh_t *fh;
 
   gdb_assert (!is_closed_fileio_fh (fd));
 
@@ -2771,7 +2890,7 @@ static void
 release_fileio_fd (int fd, fileio_fh_t *fh)
 {
   fh->fd = -1;
-  lowest_closed_fd = min (lowest_closed_fd, fd);
+  lowest_closed_fd = std::min (lowest_closed_fd, fd);
 }
 
 /* Return a pointer to the fileio_fhandle_t corresponding to FD.  */
@@ -2779,11 +2898,13 @@ release_fileio_fd (int fd, fileio_fh_t *
 #define fileio_fd_to_fh(fd) \
   VEC_index (fileio_fh_t, fileio_fhandles, (fd))
 
-/* See target.h.  */
+/* Helper for target_fileio_open and
+   target_fileio_open_warn_if_slow.  */
 
-int
-target_fileio_open (struct inferior *inf, const char *filename,
-		    int flags, int mode, int *target_errno)
+static int
+target_fileio_open_1 (struct inferior *inf, const char *filename,
+		      int flags, int mode, int warn_if_slow,
+		      int *target_errno)
 {
   struct target_ops *t;
 
@@ -2792,7 +2913,7 @@ target_fileio_open (struct inferior *inf
       if (t->to_fileio_open != NULL)
 	{
 	  int fd = t->to_fileio_open (t, inf, filename, flags, mode,
-				      target_errno);
+				      warn_if_slow, target_errno);
 
 	  if (fd < 0)
 	    fd = -1;
@@ -2801,11 +2922,12 @@ target_fileio_open (struct inferior *inf
 
 	  if (targetdebug)
 	    fprintf_unfiltered (gdb_stdlog,
-				"target_fileio_open (%d,%s,0x%x,0%o)"
+				"target_fileio_open (%d,%s,0x%x,0%o,%d)"
 				" = %d (%d)\n",
 				inf == NULL ? 0 : inf->num,
 				filename, flags, mode,
-				fd, fd != -1 ? 0 : *target_errno);
+				warn_if_slow, fd,
+				fd != -1 ? 0 : *target_errno);
 	  return fd;
 	}
     }
@@ -2817,6 +2939,27 @@ target_fileio_open (struct inferior *inf
 /* See target.h.  */
 
 int
+target_fileio_open (struct inferior *inf, const char *filename,
+		    int flags, int mode, int *target_errno)
+{
+  return target_fileio_open_1 (inf, filename, flags, mode, 0,
+			       target_errno);
+}
+
+/* See target.h.  */
+
+int
+target_fileio_open_warn_if_slow (struct inferior *inf,
+				 const char *filename,
+				 int flags, int mode, int *target_errno)
+{
+  return target_fileio_open_1 (inf, filename, flags, mode, 1,
+			       target_errno);
+}
+
+/* See target.h.  */
+
+int
 target_fileio_pwrite (int fd, const gdb_byte *write_buf, int len,
 		      ULONGEST offset, int *target_errno)
 {
@@ -3002,7 +3145,7 @@ target_fileio_read_alloc_1 (struct infer
   /* Start by reading up to 4K at a time.  The target will throttle
      this number down if necessary.  */
   buf_alloc = 4096;
-  buf = xmalloc (buf_alloc);
+  buf = (gdb_byte *) xmalloc (buf_alloc);
   buf_pos = 0;
   while (1)
     {
@@ -3033,7 +3176,7 @@ target_fileio_read_alloc_1 (struct infer
       if (buf_alloc < buf_pos * 2)
 	{
 	  buf_alloc *= 2;
-	  buf = xrealloc (buf, buf_alloc);
+	  buf = (gdb_byte *) xrealloc (buf, buf_alloc);
 	}
 
       QUIT;
@@ -3141,6 +3284,28 @@ find_target_at (enum strata stratum)
 }
 
 
+
+/* See target.h  */
+
+void
+target_announce_detach (int from_tty)
+{
+  pid_t pid;
+  char *exec_file;
+
+  if (!from_tty)
+    return;
+
+  exec_file = get_exec_file (0);
+  if (exec_file == NULL)
+    exec_file = "";
+
+  pid = ptid_get_pid (inferior_ptid);
+  printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
+		     target_pid_to_str (pid_to_ptid (pid)));
+  gdb_flush (gdb_stdout);
+}
+
 /* The inferior process has died.  Long live the inferior!  */
 
 void
@@ -3273,6 +3438,34 @@ target_stop (ptid_t ptid)
   (*current_target.to_stop) (&current_target, ptid);
 }
 
+void
+target_interrupt (ptid_t ptid)
+{
+  if (!may_stop)
+    {
+      warning (_("May not interrupt or stop the target, ignoring attempt"));
+      return;
+    }
+
+  (*current_target.to_interrupt) (&current_target, ptid);
+}
+
+/* See target.h.  */
+
+void
+target_pass_ctrlc (void)
+{
+  (*current_target.to_pass_ctrlc) (&current_target);
+}
+
+/* See target.h.  */
+
+void
+default_target_pass_ctrlc (struct target_ops *ops)
+{
+  target_interrupt (inferior_ptid);
+}
+
 /* See target/target.h.  */
 
 void
@@ -3298,6 +3491,14 @@ target_continue_no_signal (ptid_t ptid)
   target_resume (ptid, 0, GDB_SIGNAL_0);
 }
 
+/* See target/target.h.  */
+
+void
+target_continue (ptid_t ptid, enum gdb_signal signal)
+{
+  target_resume (ptid, 0, signal);
+}
+
 /* Concatenate ELEM to LIST, a comma separate list, and return the
    result.  The LIST incoming argument is released.  */
 
@@ -3394,8 +3595,6 @@ target_fetch_registers (struct regcache 
 void
 target_store_registers (struct regcache *regcache, int regno)
 {
-  struct target_ops *t;
-
   if (!may_write_registers)
     error (_("Writing to registers is not allowed (regno %d)"), regno);
 
@@ -3423,7 +3622,7 @@ simple_verify_memory (struct target_ops 
       ULONGEST xfered_len;
       enum target_xfer_status status;
       gdb_byte buf[1024];
-      ULONGEST howmuch = min (sizeof (buf), size - total_xfered);
+      ULONGEST howmuch = std::min<ULONGEST> (sizeof (buf), size - total_xfered);
 
       status = target_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
 				    buf, NULL, lma + total_xfered, howmuch,
@@ -3462,7 +3661,8 @@ target_verify_memory (const gdb_byte *da
    target.h.  */
 
 int
-target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+			       enum target_hw_bp_type rw)
 {
   return current_target.to_insert_mask_watchpoint (&current_target,
 						   addr, mask, rw);
@@ -3472,7 +3672,8 @@ target_insert_mask_watchpoint (CORE_ADDR
    target.h.  */
 
 int
-target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+			       enum target_hw_bp_type rw)
 {
   return current_target.to_remove_mask_watchpoint (&current_target,
 						   addr, mask, rw);
@@ -3588,10 +3789,34 @@ target_delete_record (void)
 
 /* See target.h.  */
 
+enum record_method
+target_record_method (ptid_t ptid)
+{
+  return current_target.to_record_method (&current_target, ptid);
+}
+
+/* See target.h.  */
+
+int
+target_record_is_replaying (ptid_t ptid)
+{
+  return current_target.to_record_is_replaying (&current_target, ptid);
+}
+
+/* See target.h.  */
+
 int
-target_record_is_replaying (void)
+target_record_will_replay (ptid_t ptid, int dir)
 {
-  return current_target.to_record_is_replaying (&current_target);
+  return current_target.to_record_will_replay (&current_target, ptid, dir);
+}
+
+/* See target.h.  */
+
+void
+target_record_stop_replaying (void)
+{
+  current_target.to_record_stop_replaying (&current_target);
 }
 
 /* See target.h.  */
@@ -3726,6 +3951,52 @@ do_monitor_command (char *cmd,
   target_rcmd (cmd, gdb_stdtarg);
 }
 
+/* Erases all the memory regions marked as flash.  CMD and FROM_TTY are
+   ignored.  */
+
+void
+flash_erase_command (char *cmd, int from_tty)
+{
+  /* Used to communicate termination of flash operations to the target.  */
+  bool found_flash_region = false;
+  struct mem_region *m;
+  struct gdbarch *gdbarch = target_gdbarch ();
+
+  VEC(mem_region_s) *mem_regions = target_memory_map ();
+
+  /* Iterate over all memory regions.  */
+  for (int i = 0; VEC_iterate (mem_region_s, mem_regions, i, m); i++)
+    {
+      /* Fetch the memory attribute.  */
+      struct mem_attrib *attrib = &m->attrib;
+
+      /* Is this a flash memory region?  */
+      if (attrib->mode == MEM_FLASH)
+        {
+          found_flash_region = true;
+          target_flash_erase (m->lo, m->hi - m->lo);
+
+	  struct cleanup *cleanup_tuple
+	      = make_cleanup_ui_out_tuple_begin_end (current_uiout,
+						     "erased-regions");
+
+          current_uiout->message (_("Erasing flash memory region at address "));
+          current_uiout->field_fmt ("address", "%s", paddress (gdbarch,
+								 m->lo));
+          current_uiout->message (", size = ");
+          current_uiout->field_fmt ("size", "%s", hex_string (m->hi - m->lo));
+          current_uiout->message ("\n");
+          do_cleanups (cleanup_tuple);
+        }
+    }
+
+  /* Did we do any flash operations?  If so, we need to finalize them.  */
+  if (found_flash_region)
+    target_flash_done ();
+  else
+    current_uiout->message (_("No flash memory regions found.\n"));
+}
+
 /* Print the name of each layers of our target stack.  */
 
 static void
@@ -3741,6 +4012,23 @@ maintenance_print_target_stack (char *cm
     }
 }
 
+/* See target.h.  */
+
+void
+target_async (int enable)
+{
+  infrun_async (enable);
+  current_target.to_async (&current_target, enable);
+}
+
+/* See target.h.  */
+
+void
+target_thread_events (int enable)
+{
+  current_target.to_thread_events (&current_target, enable);
+}
+
 /* Controls if targets can report that they can/are async.  This is
    just for maintainers to use when debugging gdb.  */
 int target_async_permitted = 1;
@@ -3772,6 +4060,67 @@ maint_show_target_async_command (struct 
 		      "asynchronous mode is %s.\n"), value);
 }
 
+/* Return true if the target operates in non-stop mode even with "set
+   non-stop off".  */
+
+static int
+target_always_non_stop_p (void)
+{
+  return current_target.to_always_non_stop_p (&current_target);
+}
+
+/* See target.h.  */
+
+int
+target_is_non_stop_p (void)
+{
+  return (non_stop
+	  || target_non_stop_enabled == AUTO_BOOLEAN_TRUE
+	  || (target_non_stop_enabled == AUTO_BOOLEAN_AUTO
+	      && target_always_non_stop_p ()));
+}
+
+/* Controls if targets can report that they always run in non-stop
+   mode.  This is just for maintainers to use when debugging gdb.  */
+enum auto_boolean target_non_stop_enabled = AUTO_BOOLEAN_AUTO;
+
+/* The set command writes to this variable.  If the inferior is
+   executing, target_non_stop_enabled is *not* updated.  */
+static enum auto_boolean target_non_stop_enabled_1 = AUTO_BOOLEAN_AUTO;
+
+/* Implementation of "maint set target-non-stop".  */
+
+static void
+maint_set_target_non_stop_command (char *args, int from_tty,
+				   struct cmd_list_element *c)
+{
+  if (have_live_inferiors ())
+    {
+      target_non_stop_enabled_1 = target_non_stop_enabled;
+      error (_("Cannot change this setting while the inferior is running."));
+    }
+
+  target_non_stop_enabled = target_non_stop_enabled_1;
+}
+
+/* Implementation of "maint show target-non-stop".  */
+
+static void
+maint_show_target_non_stop_command (struct ui_file *file, int from_tty,
+				    struct cmd_list_element *c,
+				    const char *value)
+{
+  if (target_non_stop_enabled == AUTO_BOOLEAN_AUTO)
+    fprintf_filtered (file,
+		      _("Whether the target is always in non-stop mode "
+			"is %s (currently %s).\n"), value,
+		      target_always_non_stop_p () ? "on" : "off");
+  else
+    fprintf_filtered (file,
+		      _("Whether the target is always in non-stop mode "
+			"is %s.\n"), value);
+}
+
 /* Temporary copies of permission settings.  */
 
 static int may_write_registers_1 = 1;
@@ -3874,6 +4223,16 @@ Tells gdb whether to control the inferio
 			   &maintenance_set_cmdlist,
 			   &maintenance_show_cmdlist);
 
+  add_setshow_auto_boolean_cmd ("target-non-stop", no_class,
+				&target_non_stop_enabled_1, _("\
+Set whether gdb always controls the inferior in non-stop mode."), _("\
+Show whether gdb always controls the inferior in non-stop mode."), _("\
+Tells gdb whether to control the inferior in non-stop mode."),
+			   maint_set_target_non_stop_command,
+			   maint_show_target_non_stop_command,
+			   &maintenance_set_cmdlist,
+			   &maintenance_show_cmdlist);
+
   add_setshow_boolean_cmd ("may-write-registers", class_support,
 			   &may_write_registers_1, _("\
 Set permission to write into registers."), _("\
@@ -3928,6 +4287,9 @@ Otherwise, any attempt to interrupt or s
 			   set_target_permissions, NULL,
 			   &setlist, &showlist);
 
+  add_com ("flash-erase", no_class, flash_erase_command,
+           _("Erase all flash memory regions."));
+
   add_setshow_boolean_cmd ("auto-connect-native-target", class_support,
 			   &auto_connect_native_target, _("\
 Set whether GDB may automatically connect to the native target."), _("\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-dcache.c ./gdb/target-dcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-dcache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-dcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,7 @@ static const struct address_space_data *
 static void
 target_dcache_cleanup (struct address_space *aspace, void *arg)
 {
-  dcache_free (arg);
+  dcache_free ((DCACHE *) arg);
 }
 
 /* Target dcache is initialized or not.  */
@@ -39,8 +39,9 @@ target_dcache_cleanup (struct address_sp
 int
 target_dcache_init_p (void)
 {
-  DCACHE *dcache = address_space_data (current_program_space->aspace,
-				       target_dcache_aspace_key);
+  DCACHE *dcache
+    = (DCACHE *) address_space_data (current_program_space->aspace,
+				     target_dcache_aspace_key);
 
   return (dcache != NULL);
 }
@@ -50,8 +51,9 @@ target_dcache_init_p (void)
 void
 target_dcache_invalidate (void)
 {
-  DCACHE *dcache = address_space_data (current_program_space->aspace,
-				       target_dcache_aspace_key);
+  DCACHE *dcache
+    = (DCACHE *) address_space_data (current_program_space->aspace,
+				     target_dcache_aspace_key);
 
   if (dcache != NULL)
     dcache_invalidate (dcache);
@@ -63,8 +65,9 @@ target_dcache_invalidate (void)
 DCACHE *
 target_dcache_get (void)
 {
-  DCACHE *dcache = address_space_data (current_program_space->aspace,
-				       target_dcache_aspace_key);
+  DCACHE *dcache
+    = (DCACHE *) address_space_data (current_program_space->aspace,
+				     target_dcache_aspace_key);
 
   return dcache;
 }
@@ -75,8 +78,9 @@ target_dcache_get (void)
 DCACHE *
 target_dcache_get_or_init (void)
 {
-  DCACHE *dcache = address_space_data (current_program_space->aspace,
-				       target_dcache_aspace_key);
+  DCACHE *dcache
+    = (DCACHE *) address_space_data (current_program_space->aspace,
+				     target_dcache_aspace_key);
 
   if (dcache == NULL)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-dcache.h ./gdb/target-dcache.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-dcache.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-dcache.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-debug.h ./gdb/target-debug.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-debug.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-debug.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB target debugging macros
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -148,10 +148,20 @@
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_enum_btrace_format(X)	\
   target_debug_do_print (plongest (X))
+#define target_debug_print_enum_record_method(X)	\
+  target_debug_do_print (plongest (X))
 #define target_debug_print_const_struct_btrace_config_p(X)	\
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_const_struct_btrace_target_info_p(X)	\
   target_debug_do_print (host_address_to_string (X))
+#define target_debug_print_enum_target_hw_bp_type(X) \
+  target_debug_do_print (plongest (X))
+#define target_debug_print_enum_bptype(X) \
+  target_debug_do_print (plongest (X))
+#define target_debug_print_struct_inferior_p(X)	\
+  target_debug_do_print (host_address_to_string (X))
+#define target_debug_print_enum_remove_bp_reason(X) \
+  target_debug_do_print (plongest (X))
 
 static void
 target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status)
@@ -188,7 +198,10 @@ target_debug_print_signals (unsigned cha
 
       for (i = 0; i < GDB_SIGNAL_LAST; i++)
 	if (sigs[i])
-	  fprintf_unfiltered (gdb_stdlog, " %s", gdb_signal_to_name (i));
+	  {
+	    fprintf_unfiltered (gdb_stdlog, " %s",
+				gdb_signal_to_name ((enum gdb_signal) i));
+	  }
     }
   fputs_unfiltered (" }", gdb_stdlog);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-delegates.c ./gdb/target-delegates.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-delegates.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-delegates.c	2017-03-06 01:49:07.000000000 +0000
@@ -109,17 +109,33 @@ debug_resume (struct target_ops *self, p
   fputs_unfiltered (")\n", gdb_stdlog);
 }
 
-static ptid_t
-delegate_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
+static void
+delegate_commit_resume (struct target_ops *self)
 {
   self = self->beneath;
-  return self->to_wait (self, arg1, arg2, arg3);
+  self->to_commit_resume (self);
+}
+
+static void
+tdefault_commit_resume (struct target_ops *self)
+{
+}
+
+static void
+debug_commit_resume (struct target_ops *self)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_commit_resume (...)\n", debug_target.to_shortname);
+  debug_target.to_commit_resume (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_commit_resume (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (")\n", gdb_stdlog);
 }
 
 static ptid_t
-tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
+delegate_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
 {
-  noprocess ();
+  self = self->beneath;
+  return self->to_wait (self, arg1, arg2, arg3);
 }
 
 static ptid_t
@@ -268,24 +284,26 @@ debug_insert_breakpoint (struct target_o
 }
 
 static int
-delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
+delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2, enum remove_bp_reason arg3)
 {
   self = self->beneath;
-  return self->to_remove_breakpoint (self, arg1, arg2);
+  return self->to_remove_breakpoint (self, arg1, arg2, arg3);
 }
 
 static int
-debug_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
+debug_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2, enum remove_bp_reason arg3)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_breakpoint (...)\n", debug_target.to_shortname);
-  result = debug_target.to_remove_breakpoint (&debug_target, arg1, arg2);
+  result = debug_target.to_remove_breakpoint (&debug_target, arg1, arg2, arg3);
   fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_breakpoint (", debug_target.to_shortname);
   target_debug_print_struct_target_ops_p (&debug_target);
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_struct_gdbarch_p (arg1);
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_struct_bp_target_info_p (arg2);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_enum_remove_bp_reason (arg3);
   fputs_unfiltered (") = ", gdb_stdlog);
   target_debug_print_int (result);
   fputs_unfiltered ("\n", gdb_stdlog);
@@ -401,20 +419,20 @@ debug_supports_stopped_by_hw_breakpoint 
 }
 
 static int
-delegate_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3)
+delegate_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
 {
   self = self->beneath;
   return self->to_can_use_hw_breakpoint (self, arg1, arg2, arg3);
 }
 
 static int
-tdefault_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3)
+tdefault_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
 {
   return 0;
 }
 
 static int
-debug_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3)
+debug_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_use_hw_breakpoint (...)\n", debug_target.to_shortname);
@@ -422,7 +440,7 @@ debug_can_use_hw_breakpoint (struct targ
   fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_use_hw_breakpoint (", debug_target.to_shortname);
   target_debug_print_struct_target_ops_p (&debug_target);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg1);
+  target_debug_print_enum_bptype (arg1);
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_int (arg2);
   fputs_unfiltered (", ", gdb_stdlog);
@@ -523,20 +541,20 @@ debug_remove_hw_breakpoint (struct targe
 }
 
 static int
-delegate_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+delegate_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   self = self->beneath;
   return self->to_remove_watchpoint (self, arg1, arg2, arg3, arg4);
 }
 
 static int
-tdefault_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+tdefault_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   return -1;
 }
 
 static int
-debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_watchpoint (...)\n", debug_target.to_shortname);
@@ -548,7 +566,7 @@ debug_remove_watchpoint (struct target_o
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_int (arg2);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg3);
+  target_debug_print_enum_target_hw_bp_type (arg3);
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_struct_expression_p (arg4);
   fputs_unfiltered (") = ", gdb_stdlog);
@@ -558,20 +576,20 @@ debug_remove_watchpoint (struct target_o
 }
 
 static int
-delegate_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+delegate_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   self = self->beneath;
   return self->to_insert_watchpoint (self, arg1, arg2, arg3, arg4);
 }
 
 static int
-tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   return -1;
 }
 
 static int
-debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_watchpoint (...)\n", debug_target.to_shortname);
@@ -583,7 +601,7 @@ debug_insert_watchpoint (struct target_o
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_int (arg2);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg3);
+  target_debug_print_enum_target_hw_bp_type (arg3);
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_struct_expression_p (arg4);
   fputs_unfiltered (") = ", gdb_stdlog);
@@ -593,20 +611,20 @@ debug_insert_watchpoint (struct target_o
 }
 
 static int
-delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   self = self->beneath;
   return self->to_insert_mask_watchpoint (self, arg1, arg2, arg3);
 }
 
 static int
-tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   return 1;
 }
 
 static int
-debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_mask_watchpoint (...)\n", debug_target.to_shortname);
@@ -618,7 +636,7 @@ debug_insert_mask_watchpoint (struct tar
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_CORE_ADDR (arg2);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg3);
+  target_debug_print_enum_target_hw_bp_type (arg3);
   fputs_unfiltered (") = ", gdb_stdlog);
   target_debug_print_int (result);
   fputs_unfiltered ("\n", gdb_stdlog);
@@ -626,20 +644,20 @@ debug_insert_mask_watchpoint (struct tar
 }
 
 static int
-delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   self = self->beneath;
   return self->to_remove_mask_watchpoint (self, arg1, arg2, arg3);
 }
 
 static int
-tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   return 1;
 }
 
 static int
-debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_mask_watchpoint (...)\n", debug_target.to_shortname);
@@ -651,7 +669,7 @@ debug_remove_mask_watchpoint (struct tar
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_CORE_ADDR (arg2);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg3);
+  target_debug_print_enum_target_hw_bp_type (arg3);
   fputs_unfiltered (") = ", gdb_stdlog);
   target_debug_print_int (result);
   fputs_unfiltered ("\n", gdb_stdlog);
@@ -832,6 +850,33 @@ debug_masked_watch_num_registers (struct
   return result;
 }
 
+static int
+delegate_can_do_single_step (struct target_ops *self)
+{
+  self = self->beneath;
+  return self->to_can_do_single_step (self);
+}
+
+static int
+tdefault_can_do_single_step (struct target_ops *self)
+{
+  return -1;
+}
+
+static int
+debug_can_do_single_step (struct target_ops *self)
+{
+  int result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_do_single_step (...)\n", debug_target.to_shortname);
+  result = debug_target.to_can_do_single_step (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_do_single_step (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_int (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
 static void
 delegate_terminal_init (struct target_ops *self)
 {
@@ -1214,6 +1259,32 @@ debug_remove_exec_catchpoint (struct tar
   return result;
 }
 
+static void
+delegate_follow_exec (struct target_ops *self, struct inferior *arg1, char *arg2)
+{
+  self = self->beneath;
+  self->to_follow_exec (self, arg1, arg2);
+}
+
+static void
+tdefault_follow_exec (struct target_ops *self, struct inferior *arg1, char *arg2)
+{
+}
+
+static void
+debug_follow_exec (struct target_ops *self, struct inferior *arg1, char *arg2)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_follow_exec (...)\n", debug_target.to_shortname);
+  debug_target.to_follow_exec (&debug_target, arg1, arg2);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_follow_exec (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_struct_inferior_p (arg1);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_char_p (arg2);
+  fputs_unfiltered (")\n", gdb_stdlog);
+}
+
 static int
 delegate_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5)
 {
@@ -1483,23 +1554,23 @@ debug_extra_thread_info (struct target_o
   return result;
 }
 
-static char *
+static const char *
 delegate_thread_name (struct target_ops *self, struct thread_info *arg1)
 {
   self = self->beneath;
   return self->to_thread_name (self, arg1);
 }
 
-static char *
+static const char *
 tdefault_thread_name (struct target_ops *self, struct thread_info *arg1)
 {
   return NULL;
 }
 
-static char *
+static const char *
 debug_thread_name (struct target_ops *self, struct thread_info *arg1)
 {
-  char * result;
+  const char * result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_name (...)\n", debug_target.to_shortname);
   result = debug_target.to_thread_name (&debug_target, arg1);
   fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_name (", debug_target.to_shortname);
@@ -1507,7 +1578,7 @@ debug_thread_name (struct target_ops *se
   fputs_unfiltered (", ", gdb_stdlog);
   target_debug_print_struct_thread_info_p (arg1);
   fputs_unfiltered (") = ", gdb_stdlog);
-  target_debug_print_char_p (result);
+  target_debug_print_const_char_p (result);
   fputs_unfiltered ("\n", gdb_stdlog);
   return result;
 }
@@ -1537,6 +1608,47 @@ debug_stop (struct target_ops *self, pti
 }
 
 static void
+delegate_interrupt (struct target_ops *self, ptid_t arg1)
+{
+  self = self->beneath;
+  self->to_interrupt (self, arg1);
+}
+
+static void
+tdefault_interrupt (struct target_ops *self, ptid_t arg1)
+{
+}
+
+static void
+debug_interrupt (struct target_ops *self, ptid_t arg1)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_interrupt (...)\n", debug_target.to_shortname);
+  debug_target.to_interrupt (&debug_target, arg1);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_interrupt (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_ptid_t (arg1);
+  fputs_unfiltered (")\n", gdb_stdlog);
+}
+
+static void
+delegate_pass_ctrlc (struct target_ops *self)
+{
+  self = self->beneath;
+  self->to_pass_ctrlc (self);
+}
+
+static void
+debug_pass_ctrlc (struct target_ops *self)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_pass_ctrlc (...)\n", debug_target.to_shortname);
+  debug_target.to_pass_ctrlc (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_pass_ctrlc (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (")\n", gdb_stdlog);
+}
+
+static void
 delegate_rcmd (struct target_ops *self, const char *arg1, struct ui_file *arg2)
 {
   self = self->beneath;
@@ -1716,6 +1828,30 @@ debug_async (struct target_ops *self, in
   fputs_unfiltered (")\n", gdb_stdlog);
 }
 
+static void
+delegate_thread_events (struct target_ops *self, int arg1)
+{
+  self = self->beneath;
+  self->to_thread_events (self, arg1);
+}
+
+static void
+tdefault_thread_events (struct target_ops *self, int arg1)
+{
+}
+
+static void
+debug_thread_events (struct target_ops *self, int arg1)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_events (...)\n", debug_target.to_shortname);
+  debug_target.to_thread_events (&debug_target, arg1);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_events (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_int (arg1);
+  fputs_unfiltered (")\n", gdb_stdlog);
+}
+
 static int
 delegate_supports_non_stop (struct target_ops *self)
 {
@@ -1744,6 +1880,33 @@ debug_supports_non_stop (struct target_o
 }
 
 static int
+delegate_always_non_stop_p (struct target_ops *self)
+{
+  self = self->beneath;
+  return self->to_always_non_stop_p (self);
+}
+
+static int
+tdefault_always_non_stop_p (struct target_ops *self)
+{
+  return 0;
+}
+
+static int
+debug_always_non_stop_p (struct target_ops *self)
+{
+  int result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_always_non_stop_p (...)\n", debug_target.to_shortname);
+  result = debug_target.to_always_non_stop_p (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_always_non_stop_p (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_int (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
+static int
 delegate_find_memory_regions (struct target_ops *self, find_memory_region_ftype arg1, void *arg2)
 {
   self = self->beneath;
@@ -1925,6 +2088,33 @@ debug_xfer_partial (struct target_ops *s
   return result;
 }
 
+static ULONGEST
+delegate_get_memory_xfer_limit (struct target_ops *self)
+{
+  self = self->beneath;
+  return self->to_get_memory_xfer_limit (self);
+}
+
+static ULONGEST
+tdefault_get_memory_xfer_limit (struct target_ops *self)
+{
+  return ULONGEST_MAX;
+}
+
+static ULONGEST
+debug_get_memory_xfer_limit (struct target_ops *self)
+{
+  ULONGEST result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_memory_xfer_limit (...)\n", debug_target.to_shortname);
+  result = debug_target.to_get_memory_xfer_limit (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_memory_xfer_limit (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_ULONGEST (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
 static VEC(mem_region_s) *
 delegate_memory_map (struct target_ops *self)
 {
@@ -3389,6 +3579,35 @@ debug_btrace_conf (struct target_ops *se
   return result;
 }
 
+static enum record_method
+delegate_record_method (struct target_ops *self, ptid_t arg1)
+{
+  self = self->beneath;
+  return self->to_record_method (self, arg1);
+}
+
+static enum record_method
+tdefault_record_method (struct target_ops *self, ptid_t arg1)
+{
+  return RECORD_METHOD_NONE;
+}
+
+static enum record_method
+debug_record_method (struct target_ops *self, ptid_t arg1)
+{
+  enum record_method result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_method (...)\n", debug_target.to_shortname);
+  result = debug_target.to_record_method (&debug_target, arg1);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_method (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_ptid_t (arg1);
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_enum_record_method (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
 static void
 delegate_stop_recording (struct target_ops *self)
 {
@@ -3482,26 +3701,59 @@ debug_delete_record (struct target_ops *
 }
 
 static int
-delegate_record_is_replaying (struct target_ops *self)
+delegate_record_is_replaying (struct target_ops *self, ptid_t arg1)
 {
   self = self->beneath;
-  return self->to_record_is_replaying (self);
+  return self->to_record_is_replaying (self, arg1);
 }
 
 static int
-tdefault_record_is_replaying (struct target_ops *self)
+tdefault_record_is_replaying (struct target_ops *self, ptid_t arg1)
 {
   return 0;
 }
 
 static int
-debug_record_is_replaying (struct target_ops *self)
+debug_record_is_replaying (struct target_ops *self, ptid_t arg1)
 {
   int result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_is_replaying (...)\n", debug_target.to_shortname);
-  result = debug_target.to_record_is_replaying (&debug_target);
+  result = debug_target.to_record_is_replaying (&debug_target, arg1);
   fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_is_replaying (", debug_target.to_shortname);
   target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_ptid_t (arg1);
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_int (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
+static int
+delegate_record_will_replay (struct target_ops *self, ptid_t arg1, int arg2)
+{
+  self = self->beneath;
+  return self->to_record_will_replay (self, arg1, arg2);
+}
+
+static int
+tdefault_record_will_replay (struct target_ops *self, ptid_t arg1, int arg2)
+{
+  return 0;
+}
+
+static int
+debug_record_will_replay (struct target_ops *self, ptid_t arg1, int arg2)
+{
+  int result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_will_replay (...)\n", debug_target.to_shortname);
+  result = debug_target.to_record_will_replay (&debug_target, arg1, arg2);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_will_replay (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_ptid_t (arg1);
+  fputs_unfiltered (", ", gdb_stdlog);
+  target_debug_print_int (arg2);
   fputs_unfiltered (") = ", gdb_stdlog);
   target_debug_print_int (result);
   fputs_unfiltered ("\n", gdb_stdlog);
@@ -3509,6 +3761,28 @@ debug_record_is_replaying (struct target
 }
 
 static void
+delegate_record_stop_replaying (struct target_ops *self)
+{
+  self = self->beneath;
+  self->to_record_stop_replaying (self);
+}
+
+static void
+tdefault_record_stop_replaying (struct target_ops *self)
+{
+}
+
+static void
+debug_record_stop_replaying (struct target_ops *self)
+{
+  fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_stop_replaying (...)\n", debug_target.to_shortname);
+  debug_target.to_record_stop_replaying (&debug_target);
+  fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_stop_replaying (", debug_target.to_shortname);
+  target_debug_print_struct_target_ops_p (&debug_target);
+  fputs_unfiltered (")\n", gdb_stdlog);
+}
+
+static void
 delegate_goto_record_begin (struct target_ops *self)
 {
   self = self->beneath;
@@ -3885,6 +4159,8 @@ install_delegators (struct target_ops *o
     ops->to_disconnect = delegate_disconnect;
   if (ops->to_resume == NULL)
     ops->to_resume = delegate_resume;
+  if (ops->to_commit_resume == NULL)
+    ops->to_commit_resume = delegate_commit_resume;
   if (ops->to_wait == NULL)
     ops->to_wait = delegate_wait;
   if (ops->to_fetch_registers == NULL)
@@ -3935,6 +4211,8 @@ install_delegators (struct target_ops *o
     ops->to_can_accel_watchpoint_condition = delegate_can_accel_watchpoint_condition;
   if (ops->to_masked_watch_num_registers == NULL)
     ops->to_masked_watch_num_registers = delegate_masked_watch_num_registers;
+  if (ops->to_can_do_single_step == NULL)
+    ops->to_can_do_single_step = delegate_can_do_single_step;
   if (ops->to_terminal_init == NULL)
     ops->to_terminal_init = delegate_terminal_init;
   if (ops->to_terminal_inferior == NULL)
@@ -3965,6 +4243,8 @@ install_delegators (struct target_ops *o
     ops->to_insert_exec_catchpoint = delegate_insert_exec_catchpoint;
   if (ops->to_remove_exec_catchpoint == NULL)
     ops->to_remove_exec_catchpoint = delegate_remove_exec_catchpoint;
+  if (ops->to_follow_exec == NULL)
+    ops->to_follow_exec = delegate_follow_exec;
   if (ops->to_set_syscall_catchpoint == NULL)
     ops->to_set_syscall_catchpoint = delegate_set_syscall_catchpoint;
   if (ops->to_has_exited == NULL)
@@ -3989,6 +4269,10 @@ install_delegators (struct target_ops *o
     ops->to_thread_name = delegate_thread_name;
   if (ops->to_stop == NULL)
     ops->to_stop = delegate_stop;
+  if (ops->to_interrupt == NULL)
+    ops->to_interrupt = delegate_interrupt;
+  if (ops->to_pass_ctrlc == NULL)
+    ops->to_pass_ctrlc = delegate_pass_ctrlc;
   if (ops->to_rcmd == NULL)
     ops->to_rcmd = delegate_rcmd;
   if (ops->to_pid_to_exec_file == NULL)
@@ -4003,8 +4287,12 @@ install_delegators (struct target_ops *o
     ops->to_is_async_p = delegate_is_async_p;
   if (ops->to_async == NULL)
     ops->to_async = delegate_async;
+  if (ops->to_thread_events == NULL)
+    ops->to_thread_events = delegate_thread_events;
   if (ops->to_supports_non_stop == NULL)
     ops->to_supports_non_stop = delegate_supports_non_stop;
+  if (ops->to_always_non_stop_p == NULL)
+    ops->to_always_non_stop_p = delegate_always_non_stop_p;
   if (ops->to_find_memory_regions == NULL)
     ops->to_find_memory_regions = delegate_find_memory_regions;
   if (ops->to_make_corefile_notes == NULL)
@@ -4017,6 +4305,8 @@ install_delegators (struct target_ops *o
     ops->to_get_thread_local_address = delegate_get_thread_local_address;
   if (ops->to_xfer_partial == NULL)
     ops->to_xfer_partial = delegate_xfer_partial;
+  if (ops->to_get_memory_xfer_limit == NULL)
+    ops->to_get_memory_xfer_limit = delegate_get_memory_xfer_limit;
   if (ops->to_memory_map == NULL)
     ops->to_memory_map = delegate_memory_map;
   if (ops->to_flash_erase == NULL)
@@ -4125,6 +4415,8 @@ install_delegators (struct target_ops *o
     ops->to_read_btrace = delegate_read_btrace;
   if (ops->to_btrace_conf == NULL)
     ops->to_btrace_conf = delegate_btrace_conf;
+  if (ops->to_record_method == NULL)
+    ops->to_record_method = delegate_record_method;
   if (ops->to_stop_recording == NULL)
     ops->to_stop_recording = delegate_stop_recording;
   if (ops->to_info_record == NULL)
@@ -4135,6 +4427,10 @@ install_delegators (struct target_ops *o
     ops->to_delete_record = delegate_delete_record;
   if (ops->to_record_is_replaying == NULL)
     ops->to_record_is_replaying = delegate_record_is_replaying;
+  if (ops->to_record_will_replay == NULL)
+    ops->to_record_will_replay = delegate_record_will_replay;
+  if (ops->to_record_stop_replaying == NULL)
+    ops->to_record_stop_replaying = delegate_record_stop_replaying;
   if (ops->to_goto_record_begin == NULL)
     ops->to_goto_record_begin = delegate_goto_record_begin;
   if (ops->to_goto_record_end == NULL)
@@ -4172,7 +4468,8 @@ install_dummy_methods (struct target_ops
   ops->to_detach = tdefault_detach;
   ops->to_disconnect = tdefault_disconnect;
   ops->to_resume = tdefault_resume;
-  ops->to_wait = tdefault_wait;
+  ops->to_commit_resume = tdefault_commit_resume;
+  ops->to_wait = default_target_wait;
   ops->to_fetch_registers = tdefault_fetch_registers;
   ops->to_store_registers = tdefault_store_registers;
   ops->to_prepare_to_store = tdefault_prepare_to_store;
@@ -4197,6 +4494,7 @@ install_dummy_methods (struct target_ops
   ops->to_region_ok_for_hw_watchpoint = default_region_ok_for_hw_watchpoint;
   ops->to_can_accel_watchpoint_condition = tdefault_can_accel_watchpoint_condition;
   ops->to_masked_watch_num_registers = tdefault_masked_watch_num_registers;
+  ops->to_can_do_single_step = tdefault_can_do_single_step;
   ops->to_terminal_init = tdefault_terminal_init;
   ops->to_terminal_inferior = tdefault_terminal_inferior;
   ops->to_terminal_ours_for_output = tdefault_terminal_ours_for_output;
@@ -4212,6 +4510,7 @@ install_dummy_methods (struct target_ops
   ops->to_follow_fork = default_follow_fork;
   ops->to_insert_exec_catchpoint = tdefault_insert_exec_catchpoint;
   ops->to_remove_exec_catchpoint = tdefault_remove_exec_catchpoint;
+  ops->to_follow_exec = tdefault_follow_exec;
   ops->to_set_syscall_catchpoint = tdefault_set_syscall_catchpoint;
   ops->to_has_exited = tdefault_has_exited;
   ops->to_mourn_inferior = default_mourn_inferior;
@@ -4224,6 +4523,8 @@ install_dummy_methods (struct target_ops
   ops->to_extra_thread_info = tdefault_extra_thread_info;
   ops->to_thread_name = tdefault_thread_name;
   ops->to_stop = tdefault_stop;
+  ops->to_interrupt = tdefault_interrupt;
+  ops->to_pass_ctrlc = default_target_pass_ctrlc;
   ops->to_rcmd = default_rcmd;
   ops->to_pid_to_exec_file = tdefault_pid_to_exec_file;
   ops->to_log_command = tdefault_log_command;
@@ -4231,13 +4532,16 @@ install_dummy_methods (struct target_ops
   ops->to_can_async_p = tdefault_can_async_p;
   ops->to_is_async_p = tdefault_is_async_p;
   ops->to_async = tdefault_async;
+  ops->to_thread_events = tdefault_thread_events;
   ops->to_supports_non_stop = tdefault_supports_non_stop;
+  ops->to_always_non_stop_p = tdefault_always_non_stop_p;
   ops->to_find_memory_regions = dummy_find_memory_regions;
   ops->to_make_corefile_notes = dummy_make_corefile_notes;
   ops->to_get_bookmark = tdefault_get_bookmark;
   ops->to_goto_bookmark = tdefault_goto_bookmark;
   ops->to_get_thread_local_address = tdefault_get_thread_local_address;
   ops->to_xfer_partial = tdefault_xfer_partial;
+  ops->to_get_memory_xfer_limit = tdefault_get_memory_xfer_limit;
   ops->to_memory_map = tdefault_memory_map;
   ops->to_flash_erase = tdefault_flash_erase;
   ops->to_flash_done = tdefault_flash_done;
@@ -4292,11 +4596,14 @@ install_dummy_methods (struct target_ops
   ops->to_teardown_btrace = tdefault_teardown_btrace;
   ops->to_read_btrace = tdefault_read_btrace;
   ops->to_btrace_conf = tdefault_btrace_conf;
+  ops->to_record_method = tdefault_record_method;
   ops->to_stop_recording = tdefault_stop_recording;
   ops->to_info_record = tdefault_info_record;
   ops->to_save_record = tdefault_save_record;
   ops->to_delete_record = tdefault_delete_record;
   ops->to_record_is_replaying = tdefault_record_is_replaying;
+  ops->to_record_will_replay = tdefault_record_will_replay;
+  ops->to_record_stop_replaying = tdefault_record_stop_replaying;
   ops->to_goto_record_begin = tdefault_goto_record_begin;
   ops->to_goto_record_end = tdefault_goto_record_end;
   ops->to_goto_record = tdefault_goto_record;
@@ -4320,6 +4627,7 @@ init_debug_target (struct target_ops *op
   ops->to_detach = debug_detach;
   ops->to_disconnect = debug_disconnect;
   ops->to_resume = debug_resume;
+  ops->to_commit_resume = debug_commit_resume;
   ops->to_wait = debug_wait;
   ops->to_fetch_registers = debug_fetch_registers;
   ops->to_store_registers = debug_store_registers;
@@ -4345,6 +4653,7 @@ init_debug_target (struct target_ops *op
   ops->to_region_ok_for_hw_watchpoint = debug_region_ok_for_hw_watchpoint;
   ops->to_can_accel_watchpoint_condition = debug_can_accel_watchpoint_condition;
   ops->to_masked_watch_num_registers = debug_masked_watch_num_registers;
+  ops->to_can_do_single_step = debug_can_do_single_step;
   ops->to_terminal_init = debug_terminal_init;
   ops->to_terminal_inferior = debug_terminal_inferior;
   ops->to_terminal_ours_for_output = debug_terminal_ours_for_output;
@@ -4360,6 +4669,7 @@ init_debug_target (struct target_ops *op
   ops->to_follow_fork = debug_follow_fork;
   ops->to_insert_exec_catchpoint = debug_insert_exec_catchpoint;
   ops->to_remove_exec_catchpoint = debug_remove_exec_catchpoint;
+  ops->to_follow_exec = debug_follow_exec;
   ops->to_set_syscall_catchpoint = debug_set_syscall_catchpoint;
   ops->to_has_exited = debug_has_exited;
   ops->to_mourn_inferior = debug_mourn_inferior;
@@ -4372,6 +4682,8 @@ init_debug_target (struct target_ops *op
   ops->to_extra_thread_info = debug_extra_thread_info;
   ops->to_thread_name = debug_thread_name;
   ops->to_stop = debug_stop;
+  ops->to_interrupt = debug_interrupt;
+  ops->to_pass_ctrlc = debug_pass_ctrlc;
   ops->to_rcmd = debug_rcmd;
   ops->to_pid_to_exec_file = debug_pid_to_exec_file;
   ops->to_log_command = debug_log_command;
@@ -4379,13 +4691,16 @@ init_debug_target (struct target_ops *op
   ops->to_can_async_p = debug_can_async_p;
   ops->to_is_async_p = debug_is_async_p;
   ops->to_async = debug_async;
+  ops->to_thread_events = debug_thread_events;
   ops->to_supports_non_stop = debug_supports_non_stop;
+  ops->to_always_non_stop_p = debug_always_non_stop_p;
   ops->to_find_memory_regions = debug_find_memory_regions;
   ops->to_make_corefile_notes = debug_make_corefile_notes;
   ops->to_get_bookmark = debug_get_bookmark;
   ops->to_goto_bookmark = debug_goto_bookmark;
   ops->to_get_thread_local_address = debug_get_thread_local_address;
   ops->to_xfer_partial = debug_xfer_partial;
+  ops->to_get_memory_xfer_limit = debug_get_memory_xfer_limit;
   ops->to_memory_map = debug_memory_map;
   ops->to_flash_erase = debug_flash_erase;
   ops->to_flash_done = debug_flash_done;
@@ -4440,11 +4755,14 @@ init_debug_target (struct target_ops *op
   ops->to_teardown_btrace = debug_teardown_btrace;
   ops->to_read_btrace = debug_read_btrace;
   ops->to_btrace_conf = debug_btrace_conf;
+  ops->to_record_method = debug_record_method;
   ops->to_stop_recording = debug_stop_recording;
   ops->to_info_record = debug_info_record;
   ops->to_save_record = debug_save_record;
   ops->to_delete_record = debug_delete_record;
   ops->to_record_is_replaying = debug_record_is_replaying;
+  ops->to_record_will_replay = debug_record_will_replay;
+  ops->to_record_stop_replaying = debug_record_stop_replaying;
   ops->to_goto_record_begin = debug_goto_record_begin;
   ops->to_goto_record_end = debug_goto_record_end;
   ops->to_goto_record = debug_goto_record;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-descriptions.c ./gdb/target-descriptions.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-descriptions.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-descriptions.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target description support for GDB.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -90,20 +90,17 @@ typedef struct tdesc_type_field
 {
   char *name;
   struct tdesc_type *type;
+  /* For non-enum-values, either both are -1 (non-bitfield), or both are
+     not -1 (bitfield).  For enum values, start is the value (which could be
+     -1), end is -1.  */
   int start, end;
 } tdesc_type_field;
 DEF_VEC_O(tdesc_type_field);
 
-typedef struct tdesc_type_flag
-{
-  char *name;
-  int start;
-} tdesc_type_flag;
-DEF_VEC_O(tdesc_type_flag);
-
 enum tdesc_type_kind
 {
   /* Predefined types.  */
+  TDESC_TYPE_BOOL,
   TDESC_TYPE_INT8,
   TDESC_TYPE_INT16,
   TDESC_TYPE_INT32,
@@ -125,7 +122,8 @@ enum tdesc_type_kind
   TDESC_TYPE_VECTOR,
   TDESC_TYPE_STRUCT,
   TDESC_TYPE_UNION,
-  TDESC_TYPE_FLAGS
+  TDESC_TYPE_FLAGS,
+  TDESC_TYPE_ENUM
 };
 
 typedef struct tdesc_type
@@ -146,19 +144,12 @@ typedef struct tdesc_type
       int count;
     } v;
 
-    /* Struct or union type.  */
+    /* Struct, union, flags, or enum type.  */
     struct
     {
       VEC(tdesc_type_field) *fields;
-      LONGEST size;
+      int size;
     } u;
-
-    /* Flags type.  */
-    struct
-    {
-      VEC(tdesc_type_flag) *flags;
-      LONGEST size;
-    } f;
   } u;
 } *tdesc_type_p;
 DEF_VEC_P(tdesc_type_p);
@@ -368,7 +359,8 @@ target_find_description (void)
 	{
 	  struct tdesc_arch_data *data;
 
-	  data = gdbarch_data (target_gdbarch (), tdesc_data);
+	  data = ((struct tdesc_arch_data *)
+		  gdbarch_data (target_gdbarch (), tdesc_data));
 	  if (tdesc_has_registers (current_target_desc)
 	      && data->arch_regs == NULL)
 	    warning (_("Target-supplied registers are not supported "
@@ -526,6 +518,7 @@ tdesc_feature_name (const struct tdesc_f
 /* Predefined types.  */
 static struct tdesc_type tdesc_predefined_types[] =
 {
+  { "bool", TDESC_TYPE_BOOL },
   { "int8", TDESC_TYPE_INT8 },
   { "int16", TDESC_TYPE_INT16 },
   { "int32", TDESC_TYPE_INT32 },
@@ -544,6 +537,21 @@ static struct tdesc_type tdesc_predefine
   { "i387_ext", TDESC_TYPE_I387_EXT }
 };
 
+/* Lookup a predefined type.  */
+
+static struct tdesc_type *
+tdesc_predefined_type (enum tdesc_type_kind kind)
+{
+  int ix;
+  struct tdesc_type *type;
+
+  for (ix = 0; ix < ARRAY_SIZE (tdesc_predefined_types); ix++)
+    if (tdesc_predefined_types[ix].kind == kind)
+      return &tdesc_predefined_types[ix];
+
+  gdb_assert_not_reached ("bad predefined tdesc type");
+}
+
 /* Return the type associated with ID in the context of FEATURE, or
    NULL if none.  */
 
@@ -575,7 +583,7 @@ tdesc_find_type (struct gdbarch *gdbarch
   struct tdesc_arch_data *data;
   int i, num_regs;
 
-  data = gdbarch_data (gdbarch, tdesc_data);
+  data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
   num_regs = VEC_length (tdesc_arch_reg, data->arch_regs);
   for (i = 0; i < num_regs; i++)
     {
@@ -601,6 +609,9 @@ tdesc_gdb_type (struct gdbarch *gdbarch,
   switch (tdesc_type->kind)
     {
     /* Predefined types.  */
+    case TDESC_TYPE_BOOL:
+      return builtin_type (gdbarch)->builtin_bool;
+
     case TDESC_TYPE_INT8:
       return builtin_type (gdbarch)->builtin_int8;
 
@@ -689,17 +700,18 @@ tdesc_gdb_type (struct gdbarch *gdbarch,
 	     VEC_iterate (tdesc_type_field, tdesc_type->u.u.fields, ix, f);
 	     ix++)
 	  {
-	    if (f->type == NULL)
+	    if (f->start != -1 && f->end != -1)
 	      {
 		/* Bitfield.  */
 		struct field *fld;
 		struct type *field_type;
 		int bitsize, total_size;
 
-		/* This invariant should be preserved while creating
-		   types.  */
+		/* This invariant should be preserved while creating types.  */
 		gdb_assert (tdesc_type->u.u.size != 0);
-		if (tdesc_type->u.u.size > 4)
+		if (f->type != NULL)
+		  field_type = tdesc_gdb_type (gdbarch, f->type);
+		else if (tdesc_type->u.u.size > 4)
 		  field_type = builtin_type (gdbarch)->builtin_uint64;
 		else
 		  field_type = builtin_type (gdbarch)->builtin_uint32;
@@ -724,6 +736,7 @@ tdesc_gdb_type (struct gdbarch *gdbarch,
 	      }
 	    else
 	      {
+		gdb_assert (f->start == -1 && f->end == -1);
 		field_type = tdesc_gdb_type (gdbarch, f->type);
 		append_composite_type_field (type, xstrdup (f->name),
 					     field_type);
@@ -762,19 +775,45 @@ tdesc_gdb_type (struct gdbarch *gdbarch,
 
     case TDESC_TYPE_FLAGS:
       {
-	struct tdesc_type_flag *f;
+	struct tdesc_type_field *f;
 	int ix;
 
 	type = arch_flags_type (gdbarch, tdesc_type->name,
-				tdesc_type->u.f.size);
+				tdesc_type->u.u.size);
 	for (ix = 0;
-	     VEC_iterate (tdesc_type_flag, tdesc_type->u.f.flags, ix, f);
+	     VEC_iterate (tdesc_type_field, tdesc_type->u.u.fields, ix, f);
 	     ix++)
-	  /* Note that contrary to the function name, this call will
-	     just set the properties of an already-allocated
-	     field.  */
-	  append_flags_type_flag (type, f->start,
-				  *f->name ? f->name : NULL);
+	  {
+	    struct type *field_type;
+	    int bitsize = f->end - f->start + 1;
+
+	    gdb_assert (f->type != NULL);
+	    field_type = tdesc_gdb_type (gdbarch, f->type);
+	    append_flags_type_field (type, f->start, bitsize,
+				     field_type, f->name);
+	  }
+
+	return type;
+      }
+
+    case TDESC_TYPE_ENUM:
+      {
+	struct tdesc_type_field *f;
+	int ix;
+
+	type = arch_type (gdbarch, TYPE_CODE_ENUM,
+			  tdesc_type->u.u.size, tdesc_type->name);
+	TYPE_UNSIGNED (type) = 1;
+	for (ix = 0;
+	     VEC_iterate (tdesc_type_field, tdesc_type->u.u.fields, ix, f);
+	     ix++)
+	  {
+	    struct field *fld
+	      = append_composite_type_field_raw (type, xstrdup (f->name),
+						 NULL);
+
+	    SET_FIELD_BITPOS (fld[0], f->start);
+	  }
 
 	return type;
       }
@@ -815,7 +854,7 @@ tdesc_data_alloc (void)
 void
 tdesc_data_cleanup (void *data_untyped)
 {
-  struct tdesc_arch_data *data = data_untyped;
+  struct tdesc_arch_data *data = (struct tdesc_arch_data *) data_untyped;
 
   VEC_free (tdesc_arch_reg, data->arch_regs);
   xfree (data);
@@ -913,7 +952,7 @@ tdesc_find_arch_register (struct gdbarch
 {
   struct tdesc_arch_data *data;
 
-  data = gdbarch_data (gdbarch, tdesc_data);
+  data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
   if (regno < VEC_length (tdesc_arch_reg, data->arch_regs))
     return VEC_index (tdesc_arch_reg, data->arch_regs, regno);
   else
@@ -943,7 +982,8 @@ tdesc_register_name (struct gdbarch *gdb
 
   if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
     {
-      struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+      struct tdesc_arch_data *data
+	= (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
       gdb_assert (data->pseudo_register_name != NULL);
       return data->pseudo_register_name (gdbarch, regno);
@@ -962,7 +1002,8 @@ tdesc_register_type (struct gdbarch *gdb
 
   if (reg == NULL && regno >= num_regs && regno < num_regs + num_pseudo_regs)
     {
-      struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+      struct tdesc_arch_data *data
+	= (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
       gdb_assert (data->pseudo_register_type != NULL);
       return data->pseudo_register_type (gdbarch, regno);
@@ -1100,7 +1141,8 @@ tdesc_register_reggroup_p (struct gdbarc
 
   if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
     {
-      struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+      struct tdesc_arch_data *data
+	= (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
       if (data->pseudo_register_reggroup_p != NULL)
 	return data->pseudo_register_reggroup_p (gdbarch, regno, reggroup);
@@ -1121,7 +1163,8 @@ void
 set_tdesc_pseudo_register_name (struct gdbarch *gdbarch,
 				gdbarch_register_name_ftype *pseudo_name)
 {
-  struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+  struct tdesc_arch_data *data
+    = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
   data->pseudo_register_name = pseudo_name;
 }
@@ -1130,7 +1173,8 @@ void
 set_tdesc_pseudo_register_type (struct gdbarch *gdbarch,
 				gdbarch_register_type_ftype *pseudo_type)
 {
-  struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+  struct tdesc_arch_data *data
+    = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
   data->pseudo_register_type = pseudo_type;
 }
@@ -1140,7 +1184,8 @@ set_tdesc_pseudo_register_reggroup_p
   (struct gdbarch *gdbarch,
    gdbarch_register_reggroup_p_ftype *pseudo_reggroup_p)
 {
-  struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+  struct tdesc_arch_data *data
+    = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
 
   data->pseudo_register_reggroup_p = pseudo_reggroup_p;
 }
@@ -1166,7 +1211,7 @@ tdesc_use_registers (struct gdbarch *gdb
      included.  */
   gdb_assert (tdesc_has_registers (target_desc));
 
-  data = gdbarch_data (gdbarch, tdesc_data);
+  data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
   data->arch_regs = early_data->arch_regs;
   xfree (early_data);
 
@@ -1259,6 +1304,11 @@ tdesc_create_reg (struct tdesc_feature *
   VEC_safe_push (tdesc_reg_p, feature->registers, reg);
 }
 
+/* Subroutine of tdesc_free_feature to simplify it.
+   Note: We do not want to free any referenced types here (e.g., types of
+   fields of a struct).  All types of a feature are recorded in
+   feature->types and are freed that way.  */
+
 static void
 tdesc_free_type (struct tdesc_type *type)
 {
@@ -1266,6 +1316,8 @@ tdesc_free_type (struct tdesc_type *type
     {
     case TDESC_TYPE_STRUCT:
     case TDESC_TYPE_UNION:
+    case TDESC_TYPE_FLAGS:
+    case TDESC_TYPE_ENUM:
       {
 	struct tdesc_type_field *f;
 	int ix;
@@ -1279,20 +1331,6 @@ tdesc_free_type (struct tdesc_type *type
       }
       break;
 
-    case TDESC_TYPE_FLAGS:
-      {
-	struct tdesc_type_flag *f;
-	int ix;
-
-	for (ix = 0;
-	     VEC_iterate (tdesc_type_flag, type->u.f.flags, ix, f);
-	     ix++)
-	  xfree (f->name);
-
-	VEC_free (tdesc_type_flag, type->u.f.flags);
-      }
-      break;
-
     default:
       break;
     }
@@ -1333,9 +1371,10 @@ tdesc_create_struct (struct tdesc_featur
    suffice.  */
 
 void
-tdesc_set_struct_size (struct tdesc_type *type, LONGEST size)
+tdesc_set_struct_size (struct tdesc_type *type, int size)
 {
   gdb_assert (type->kind == TDESC_TYPE_STRUCT);
+  gdb_assert (size > 0);
   type->u.u.size = size;
 }
 
@@ -1353,21 +1392,37 @@ tdesc_create_union (struct tdesc_feature
 
 struct tdesc_type *
 tdesc_create_flags (struct tdesc_feature *feature, const char *name,
-		    LONGEST size)
+		    int size)
 {
   struct tdesc_type *type = XCNEW (struct tdesc_type);
 
+  gdb_assert (size > 0);
+
   type->name = xstrdup (name);
   type->kind = TDESC_TYPE_FLAGS;
-  type->u.f.size = size;
+  type->u.u.size = size;
+
+  VEC_safe_push (tdesc_type_p, feature->types, type);
+  return type;
+}
+
+struct tdesc_type *
+tdesc_create_enum (struct tdesc_feature *feature, const char *name,
+		   int size)
+{
+  struct tdesc_type *type = XCNEW (struct tdesc_type);
+
+  gdb_assert (size > 0);
+
+  type->name = xstrdup (name);
+  type->kind = TDESC_TYPE_ENUM;
+  type->u.u.size = size;
 
   VEC_safe_push (tdesc_type_p, feature->types, type);
   return type;
 }
 
-/* Add a new field.  Return a temporary pointer to the field, which
-   is only valid until the next call to tdesc_add_field (the vector
-   might be reallocated).  */
+/* Add a new field to TYPE.  */
 
 void
 tdesc_add_field (struct tdesc_type *type, const char *field_name,
@@ -1380,39 +1435,88 @@ tdesc_add_field (struct tdesc_type *type
 
   f.name = xstrdup (field_name);
   f.type = field_type;
+  /* Initialize these values so we know this is not a bit-field
+     when we print-c-tdesc.  */
+  f.start = -1;
+  f.end = -1;
 
   VEC_safe_push (tdesc_type_field, type->u.u.fields, &f);
 }
 
-/* Add a new bitfield.  */
+/* Add a new typed bitfield to TYPE.  */
 
 void
-tdesc_add_bitfield (struct tdesc_type *type, const char *field_name,
-		    int start, int end)
+tdesc_add_typed_bitfield (struct tdesc_type *type, const char *field_name,
+			  int start, int end, struct tdesc_type *field_type)
 {
   struct tdesc_type_field f = { 0 };
 
-  gdb_assert (type->kind == TDESC_TYPE_STRUCT);
+  gdb_assert (type->kind == TDESC_TYPE_STRUCT
+	      || type->kind == TDESC_TYPE_FLAGS);
+  gdb_assert (start >= 0 && end >= start);
 
   f.name = xstrdup (field_name);
   f.start = start;
   f.end = end;
+  f.type = field_type;
 
   VEC_safe_push (tdesc_type_field, type->u.u.fields, &f);
 }
 
+/* Add a new untyped bitfield to TYPE.
+   Untyped bitfields become either uint32 or uint64 depending on the size
+   of the underlying type.  */
+
+void
+tdesc_add_bitfield (struct tdesc_type *type, const char *field_name,
+		    int start, int end)
+{
+  struct tdesc_type *field_type;
+
+  gdb_assert (start >= 0 && end >= start);
+
+  if (type->u.u.size > 4)
+    field_type = tdesc_predefined_type (TDESC_TYPE_UINT64);
+  else
+    field_type = tdesc_predefined_type (TDESC_TYPE_UINT32);
+
+  tdesc_add_typed_bitfield (type, field_name, start, end, field_type);
+}
+
+/* A flag is just a typed(bool) single-bit bitfield.
+   This function is kept to minimize changes in generated files.  */
+
 void
 tdesc_add_flag (struct tdesc_type *type, int start,
 		const char *flag_name)
 {
-  struct tdesc_type_flag f = { 0 };
+  struct tdesc_type_field f = { 0 };
 
-  gdb_assert (type->kind == TDESC_TYPE_FLAGS);
+  gdb_assert (type->kind == TDESC_TYPE_FLAGS
+	      || type->kind == TDESC_TYPE_STRUCT);
 
   f.name = xstrdup (flag_name);
   f.start = start;
+  f.end = start;
+  f.type = tdesc_predefined_type (TDESC_TYPE_BOOL);
 
-  VEC_safe_push (tdesc_type_flag, type->u.f.flags, &f);
+  VEC_safe_push (tdesc_type_field, type->u.u.fields, &f);
+}
+
+void
+tdesc_add_enum_value (struct tdesc_type *type, int value,
+		      const char *name)
+{
+  struct tdesc_type_field f = { 0 };
+
+  gdb_assert (type->kind == TDESC_TYPE_ENUM);
+
+  f.name = xstrdup (name);
+  f.start = value;
+  f.end = -1;
+  f.type = tdesc_predefined_type (TDESC_TYPE_INT32);
+
+  VEC_safe_push (tdesc_type_field, type->u.u.fields, &f);
 }
 
 static void
@@ -1454,7 +1558,7 @@ allocate_target_description (void)
 static void
 free_target_description (void *arg)
 {
-  struct target_desc *target_desc = arg;
+  struct target_desc *target_desc = (struct target_desc *) arg;
   struct tdesc_feature *feature;
   struct property *prop;
   int ix;
@@ -1613,7 +1717,6 @@ maint_print_c_tdesc_cmd (char *args, int
   struct tdesc_reg *reg;
   struct tdesc_type *type;
   struct tdesc_type_field *f;
-  struct tdesc_type_flag *flag;
   int ix, ix2, ix3;
   int printed_field_type = 0;
 
@@ -1629,7 +1732,7 @@ maint_print_c_tdesc_cmd (char *args, int
     error (_("The current target description did not come from an XML file."));
 
   filename = lbasename (target_description_filename);
-  function = alloca (strlen (filename) + 1);
+  function = (char *) alloca (strlen (filename) + 1);
   for (inp = filename, outp = function; *inp != '\0'; inp++)
     if (*inp == '.')
       break;
@@ -1677,7 +1780,9 @@ maint_print_c_tdesc_cmd (char *args, int
 	    }
 
 	  if ((type->kind == TDESC_TYPE_UNION
-	      || type->kind == TDESC_TYPE_STRUCT)
+	       || type->kind == TDESC_TYPE_STRUCT
+	       || type->kind == TDESC_TYPE_FLAGS
+	       || type->kind == TDESC_TYPE_ENUM)
 	      && VEC_length (tdesc_type_field, type->u.u.fields) > 0)
 	    {
 	      printf_unfiltered ("  struct tdesc_type *type;\n");
@@ -1749,33 +1854,77 @@ feature = tdesc_create_feature (result, 
 		 type->name, type->u.v.count);
 	      break;
 	    case TDESC_TYPE_STRUCT:
-	      printf_unfiltered
-		("  type = tdesc_create_struct (feature, \"%s\");\n",
-		 type->name);
-	      if (type->u.u.size != 0)
-		printf_unfiltered
-		  ("  tdesc_set_struct_size (type, %s);\n",
-		   plongest (type->u.u.size));
+	    case TDESC_TYPE_FLAGS:
+	      if (type->kind == TDESC_TYPE_STRUCT)
+		{
+		  printf_unfiltered
+		    ("  type = tdesc_create_struct (feature, \"%s\");\n",
+		     type->name);
+		  if (type->u.u.size != 0)
+		    printf_unfiltered
+		      ("  tdesc_set_struct_size (type, %d);\n",
+		       type->u.u.size);
+		}
+	      else
+		{
+		  printf_unfiltered
+		    ("  type = tdesc_create_flags (feature, \"%s\", %d);\n",
+		     type->name, type->u.u.size);
+		}
 	      for (ix3 = 0;
 		   VEC_iterate (tdesc_type_field, type->u.u.fields, ix3, f);
 		   ix3++)
 		{
-		  /* Going first for implicitly sized types, else part handles
-		     bitfields.  As reported on xml-tdesc.c implicitly sized types
-		     cannot contain a bitfield.  */
-		  if (f->type != NULL)
+		  const char *type_name;
+
+		  gdb_assert (f->type != NULL);
+		  type_name = f->type->name;
+
+		  /* To minimize changes to generated files, don't emit type
+		     info for fields that have defaulted types.  */
+		  if (f->start != -1)
+		    {
+		      gdb_assert (f->end != -1);
+		      if (f->type->kind == TDESC_TYPE_BOOL)
+			{
+			  gdb_assert (f->start == f->end);
+			  printf_unfiltered
+			    ("  tdesc_add_flag (type, %d, \"%s\");\n",
+			     f->start, f->name);
+			}
+		      else if ((type->u.u.size == 4
+				&& f->type->kind == TDESC_TYPE_UINT32)
+			       || (type->u.u.size == 8
+				   && f->type->kind == TDESC_TYPE_UINT64))
+			{
+			  printf_unfiltered
+			    ("  tdesc_add_bitfield (type, \"%s\", %d, %d);\n",
+			     f->name, f->start, f->end);
+			}
+		      else
+			{
+			  printf_unfiltered
+			    ("  field_type = tdesc_named_type (feature,"
+			     " \"%s\");\n",
+			     type_name);
+			  printf_unfiltered
+			    ("  tdesc_add_typed_bitfield (type, \"%s\","
+			     " %d, %d, field_type);\n",
+			     f->name, f->start, f->end);
+			}
+		    }
+		  else /* Not a bitfield.  */
 		    {
+		      gdb_assert (f->end == -1);
+		      gdb_assert (type->kind == TDESC_TYPE_STRUCT);
 		      printf_unfiltered
-			("  field_type = tdesc_named_type (feature, \"%s\");\n",
-			 f->type->name);
+			("  field_type = tdesc_named_type (feature,"
+			 " \"%s\");\n",
+			 type_name);
 		      printf_unfiltered
 			("  tdesc_add_field (type, \"%s\", field_type);\n",
 			 f->name);
 		    }
-		  else
-		    printf_unfiltered
-		      ("  tdesc_add_bitfield (type, \"%s\", %d, %d);\n",
-		       f->name, f->start, f->end);
 		}
 	      break;
 	    case TDESC_TYPE_UNION:
@@ -1794,17 +1943,16 @@ feature = tdesc_create_feature (result, 
 		     f->name);
 		}
 	      break;
-	    case TDESC_TYPE_FLAGS:
+	    case TDESC_TYPE_ENUM:
 	      printf_unfiltered
-		("  field_type = tdesc_create_flags (feature, \"%s\", %d);\n",
-		 type->name, (int) type->u.f.size);
+		("  type = tdesc_create_enum (feature, \"%s\", %d);\n",
+		 type->name, type->u.u.size);
 	      for (ix3 = 0;
-		   VEC_iterate (tdesc_type_flag, type->u.f.flags, ix3,
-				flag);
+		   VEC_iterate (tdesc_type_field, type->u.u.fields, ix3, f);
 		   ix3++)
 		printf_unfiltered
-		  ("  tdesc_add_flag (field_type, %d, \"%s\");\n",
-		   flag->start, flag->name);
+		  ("  tdesc_add_enum_value (type, %d, \"%s\");\n",
+		   f->start, f->name);
 	      break;
 	    default:
 	      error (_("C output is not supported type \"%s\"."), type->name);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-descriptions.h ./gdb/target-descriptions.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-descriptions.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-descriptions.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target description support for GDB.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -229,18 +229,26 @@ struct tdesc_type *tdesc_create_vector (
 					int count);
 struct tdesc_type *tdesc_create_struct (struct tdesc_feature *feature,
 					const char *name);
-void tdesc_set_struct_size (struct tdesc_type *type, LONGEST size);
+void tdesc_set_struct_size (struct tdesc_type *type, int size);
 struct tdesc_type *tdesc_create_union (struct tdesc_feature *feature,
 				       const char *name);
 struct tdesc_type *tdesc_create_flags (struct tdesc_feature *feature,
 				       const char *name,
-				       LONGEST size);
+				       int size);
+struct tdesc_type *tdesc_create_enum (struct tdesc_feature *feature,
+				      const char *name,
+				      int size);
 void tdesc_add_field (struct tdesc_type *type, const char *field_name,
 		      struct tdesc_type *field_type);
+void tdesc_add_typed_bitfield (struct tdesc_type *type, const char *field_name,
+			       int start, int end,
+			       struct tdesc_type *field_type);
 void tdesc_add_bitfield (struct tdesc_type *type, const char *field_name,
 			 int start, int end);
 void tdesc_add_flag (struct tdesc_type *type, int start,
 		     const char *flag_name);
+void tdesc_add_enum_value (struct tdesc_type *type, int value,
+			   const char *name);
 void tdesc_create_reg (struct tdesc_feature *feature, const char *name,
 		       int regnum, int save_restore, const char *group,
 		       int bitsize, const char *type);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target.h ./gdb/target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between GDB and target environments, including files and processes
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by John Gilmore.
 
@@ -41,6 +41,7 @@ struct dcache_struct;
 struct inferior;
 
 #include "infrun.h" /* For enum exec_direction_kind.  */
+#include "breakpoint.h" /* For enum bptype.  */
 
 /* This include file defines the interface between the main part
    of the debugger, and the part which is target-specific, or
@@ -71,8 +72,11 @@ struct inferior;
 #include "vec.h"
 #include "gdb_signals.h"
 #include "btrace.h"
+#include "record.h"
 #include "command.h"
 
+#include "break-common.h" /* For enum target_hw_bp_type.  */
+
 enum strata
   {
     dummy_stratum,		/* The lowest of the low */
@@ -119,15 +123,8 @@ enum inferior_event_type
     /* Process a normal inferior event which will result in target_wait
        being called.  */
     INF_REG_EVENT,
-    /* We are called because a timer went off.  */
-    INF_TIMER,
     /* We are called to do stuff after the inferior stops.  */
     INF_EXEC_COMPLETE,
-    /* We are called to do some stuff after the inferior stops, but we
-       are expected to reenter the proceed() and
-       handle_inferior_event() functions.  This is used only in case of
-       'step n' like commands.  */
-    INF_EXEC_CONTINUE
   };
 
 /* Target objects which can be transfered using target_read,
@@ -265,6 +262,11 @@ typedef enum target_xfer_status
 			     ULONGEST len,
 			     ULONGEST *xfered_len);
 
+enum target_xfer_status
+  raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
+			   const gdb_byte *writebuf, ULONGEST memaddr,
+			   LONGEST len, ULONGEST *xfered_len);
+
 /* Request that OPS transfer up to LEN addressable units of the target's
    OBJECT.  When reading from a memory object, the size of an addressable unit
    is architecture dependent and can be found using
@@ -460,10 +462,12 @@ struct target_ops
 		       int TARGET_DEBUG_PRINTER (target_debug_print_step),
 		       enum gdb_signal)
       TARGET_DEFAULT_NORETURN (noprocess ());
+    void (*to_commit_resume) (struct target_ops *)
+      TARGET_DEFAULT_IGNORE ();
     ptid_t (*to_wait) (struct target_ops *,
 		       ptid_t, struct target_waitstatus *,
 		       int TARGET_DEBUG_PRINTER (target_debug_print_options))
-      TARGET_DEFAULT_NORETURN (noprocess ());
+      TARGET_DEFAULT_FUNC (default_target_wait);
     void (*to_fetch_registers) (struct target_ops *, struct regcache *, int)
       TARGET_DEFAULT_IGNORE ();
     void (*to_store_registers) (struct target_ops *, struct regcache *, int)
@@ -477,7 +481,8 @@ struct target_ops
 				 struct bp_target_info *)
       TARGET_DEFAULT_FUNC (memory_insert_breakpoint);
     int (*to_remove_breakpoint) (struct target_ops *, struct gdbarch *,
-				 struct bp_target_info *)
+				 struct bp_target_info *,
+				 enum remove_bp_reason)
       TARGET_DEFAULT_FUNC (memory_remove_breakpoint);
 
     /* Returns true if the target stopped because it executed a
@@ -508,7 +513,8 @@ struct target_ops
     int (*to_supports_stopped_by_hw_breakpoint) (struct target_ops *)
       TARGET_DEFAULT_RETURN (0);
 
-    int (*to_can_use_hw_breakpoint) (struct target_ops *, int, int, int)
+    int (*to_can_use_hw_breakpoint) (struct target_ops *,
+				     enum bptype, int, int)
       TARGET_DEFAULT_RETURN (0);
     int (*to_ranged_break_num_registers) (struct target_ops *)
       TARGET_DEFAULT_RETURN (-1);
@@ -521,18 +527,20 @@ struct target_ops
 
     /* Documentation of what the two routines below are expected to do is
        provided with the corresponding target_* macros.  */
-    int (*to_remove_watchpoint) (struct target_ops *,
-				 CORE_ADDR, int, int, struct expression *)
+    int (*to_remove_watchpoint) (struct target_ops *, CORE_ADDR, int,
+				 enum target_hw_bp_type, struct expression *)
       TARGET_DEFAULT_RETURN (-1);
-    int (*to_insert_watchpoint) (struct target_ops *,
-				 CORE_ADDR, int, int, struct expression *)
+    int (*to_insert_watchpoint) (struct target_ops *, CORE_ADDR, int,
+				 enum target_hw_bp_type, struct expression *)
       TARGET_DEFAULT_RETURN (-1);
 
     int (*to_insert_mask_watchpoint) (struct target_ops *,
-				      CORE_ADDR, CORE_ADDR, int)
+				      CORE_ADDR, CORE_ADDR,
+				      enum target_hw_bp_type)
       TARGET_DEFAULT_RETURN (1);
     int (*to_remove_mask_watchpoint) (struct target_ops *,
-				      CORE_ADDR, CORE_ADDR, int)
+				      CORE_ADDR, CORE_ADDR,
+				      enum target_hw_bp_type)
       TARGET_DEFAULT_RETURN (1);
     int (*to_stopped_by_watchpoint) (struct target_ops *)
       TARGET_DEFAULT_RETURN (0);
@@ -557,6 +565,12 @@ struct target_ops
     int (*to_masked_watch_num_registers) (struct target_ops *,
 					  CORE_ADDR, CORE_ADDR)
       TARGET_DEFAULT_RETURN (-1);
+
+    /* Return 1 for sure target can do single step.  Return -1 for
+       unknown.  Return 0 for target can't do.  */
+    int (*to_can_do_single_step) (struct target_ops *)
+      TARGET_DEFAULT_RETURN (-1);
+
     void (*to_terminal_init) (struct target_ops *)
       TARGET_DEFAULT_IGNORE ();
     void (*to_terminal_inferior) (struct target_ops *)
@@ -594,6 +608,8 @@ struct target_ops
       TARGET_DEFAULT_RETURN (1);
     int (*to_remove_exec_catchpoint) (struct target_ops *, int)
       TARGET_DEFAULT_RETURN (1);
+    void (*to_follow_exec) (struct target_ops *, struct inferior *, char *)
+      TARGET_DEFAULT_IGNORE ();
     int (*to_set_syscall_catchpoint) (struct target_ops *,
 				      int, int, int, int, int *)
       TARGET_DEFAULT_RETURN (1);
@@ -627,10 +643,14 @@ struct target_ops
       TARGET_DEFAULT_FUNC (default_pid_to_str);
     char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *)
       TARGET_DEFAULT_RETURN (NULL);
-    char *(*to_thread_name) (struct target_ops *, struct thread_info *)
+    const char *(*to_thread_name) (struct target_ops *, struct thread_info *)
       TARGET_DEFAULT_RETURN (NULL);
     void (*to_stop) (struct target_ops *, ptid_t)
       TARGET_DEFAULT_IGNORE ();
+    void (*to_interrupt) (struct target_ops *, ptid_t)
+      TARGET_DEFAULT_IGNORE ();
+    void (*to_pass_ctrlc) (struct target_ops *)
+      TARGET_DEFAULT_FUNC (default_target_pass_ctrlc);
     void (*to_rcmd) (struct target_ops *,
 		     const char *command, struct ui_file *output)
       TARGET_DEFAULT_FUNC (default_rcmd);
@@ -656,10 +676,16 @@ struct target_ops
       TARGET_DEFAULT_RETURN (0);
     void (*to_async) (struct target_ops *, int)
       TARGET_DEFAULT_NORETURN (tcomplain ());
+    void (*to_thread_events) (struct target_ops *, int)
+      TARGET_DEFAULT_IGNORE ();
     /* This method must be implemented in some situations.  See the
        comment on 'to_can_run'.  */
     int (*to_supports_non_stop) (struct target_ops *)
       TARGET_DEFAULT_RETURN (0);
+    /* Return true if the target operates in non-stop mode even with
+       "set non-stop off".  */
+    int (*to_always_non_stop_p) (struct target_ops *)
+      TARGET_DEFAULT_RETURN (0);
     /* find_memory_regions support method for gcore */
     int (*to_find_memory_regions) (struct target_ops *,
 				   find_memory_region_ftype func, void *data)
@@ -723,6 +749,12 @@ struct target_ops
 						ULONGEST *xfered_len)
       TARGET_DEFAULT_RETURN (TARGET_XFER_E_IO);
 
+    /* Return the limit on the size of any single memory transfer
+       for the target.  */
+
+    ULONGEST (*to_get_memory_xfer_limit) (struct target_ops *)
+      TARGET_DEFAULT_RETURN (ULONGEST_MAX);
+
     /* Returns the memory map for the target.  A return value of NULL
        means that no memory map is available.  If a memory address
        does not fall within any returned regions, it's assumed to be
@@ -858,11 +890,14 @@ struct target_ops
     /* Open FILENAME on the target, in the filesystem as seen by INF,
        using FLAGS and MODE.  If INF is NULL, use the filesystem seen
        by the debugger (GDB or, for remote targets, the remote stub).
-       Return a target file descriptor, or -1 if an error occurs (and
-       set *TARGET_ERRNO).  */
+       If WARN_IF_SLOW is nonzero, print a warning message if the file
+       is being accessed over a link that may be slow.  Return a
+       target file descriptor, or -1 if an error occurs (and set
+       *TARGET_ERRNO).  */
     int (*to_fileio_open) (struct target_ops *,
 			   struct inferior *inf, const char *filename,
-			   int flags, int mode, int *target_errno);
+			   int flags, int mode, int warn_if_slow,
+			   int *target_errno);
 
     /* Write up to LEN bytes from WRITE_BUF to FD on the target.
        Return the number of bytes written, or -1 if an error occurs
@@ -1115,6 +1150,10 @@ struct target_ops
 						   const struct btrace_target_info *)
       TARGET_DEFAULT_RETURN (NULL);
 
+    /* Current recording method.  */
+    enum record_method (*to_record_method) (struct target_ops *, ptid_t ptid)
+      TARGET_DEFAULT_RETURN (RECORD_METHOD_NONE);
+
     /* Stop trace recording.  */
     void (*to_stop_recording) (struct target_ops *)
       TARGET_DEFAULT_IGNORE ();
@@ -1132,10 +1171,19 @@ struct target_ops
     void (*to_delete_record) (struct target_ops *)
       TARGET_DEFAULT_NORETURN (tcomplain ());
 
-    /* Query if the record target is currently replaying.  */
-    int (*to_record_is_replaying) (struct target_ops *)
+    /* Query if the record target is currently replaying PTID.  */
+    int (*to_record_is_replaying) (struct target_ops *, ptid_t ptid)
+      TARGET_DEFAULT_RETURN (0);
+
+    /* Query if the record target will replay PTID if it were resumed in
+       execution direction DIR.  */
+    int (*to_record_will_replay) (struct target_ops *, ptid_t ptid, int dir)
       TARGET_DEFAULT_RETURN (0);
 
+    /* Stop replaying.  */
+    void (*to_record_stop_replaying) (struct target_ops *)
+      TARGET_DEFAULT_IGNORE ();
+
     /* Go to the begin of the execution trace.  */
     void (*to_goto_record_begin) (struct target_ops *)
       TARGET_DEFAULT_NORETURN (tcomplain ());
@@ -1268,6 +1316,11 @@ extern struct target_ops *find_run_targe
 #define target_post_attach(pid) \
      (*current_target.to_post_attach) (&current_target, pid)
 
+/* Display a message indicating we're about to detach from the current
+   inferior process.  */
+
+extern void target_announce_detach (int from_tty);
+
 /* Takes a program previously attached to and detaches it.
    The program may resume execution (some targets do, some don't) and will
    no longer stop on signals, etc.  We better not have left any breakpoints
@@ -1282,30 +1335,50 @@ extern void target_detach (const char *,
 
 extern void target_disconnect (const char *, int);
 
-/* Resume execution of the target process PTID (or a group of
-   threads).  STEP says whether to single-step or to run free; SIGGNAL
-   is the signal to be given to the target, or GDB_SIGNAL_0 for no
-   signal.  The caller may not pass GDB_SIGNAL_DEFAULT.  A specific
-   PTID means `step/resume only this process id'.  A wildcard PTID
-   (all threads, or all threads of process) means `step/resume
-   INFERIOR_PTID, and let other threads (for which the wildcard PTID
-   matches) resume with their 'thread->suspend.stop_signal' signal
-   (usually GDB_SIGNAL_0) if it is in "pass" state, or with no signal
-   if in "no pass" state.  */
-
+/* Resume execution (or prepare for execution) of a target thread,
+   process or all processes.  STEP says whether to hardware
+   single-step or to run free; SIGGNAL is the signal to be given to
+   the target, or GDB_SIGNAL_0 for no signal.  The caller may not pass
+   GDB_SIGNAL_DEFAULT.  A specific PTID means `step/resume only this
+   process id'.  A wildcard PTID (all threads, or all threads of
+   process) means `step/resume INFERIOR_PTID, and let other threads
+   (for which the wildcard PTID matches) resume with their
+   'thread->suspend.stop_signal' signal (usually GDB_SIGNAL_0) if it
+   is in "pass" state, or with no signal if in "no pass" state.
+
+   In order to efficiently handle batches of resumption requests,
+   targets may implement this method such that it records the
+   resumption request, but defers the actual resumption to the
+   target_commit_resume method implementation.  See
+   target_commit_resume below.  */
 extern void target_resume (ptid_t ptid, int step, enum gdb_signal signal);
 
-/* Wait for process pid to do something.  PTID = -1 to wait for any
-   pid to do something.  Return pid of child, or -1 in case of error;
-   store status through argument pointer STATUS.  Note that it is
-   _NOT_ OK to throw_exception() out of target_wait() without popping
-   the debugging target from the stack; GDB isn't prepared to get back
-   to the prompt with a debugging target but without the frame cache,
-   stop_pc, etc., set up.  OPTIONS is a bitwise OR of TARGET_W*
-   options.  */
+/* Commit a series of resumption requests previously prepared with
+   target_resume calls.
 
-extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status,
-			   int options);
+   GDB always calls target_commit_resume after calling target_resume
+   one or more times.  A target may thus use this method in
+   coordination with the target_resume method to batch target-side
+   resumption requests.  In that case, the target doesn't actually
+   resume in its target_resume implementation.  Instead, it prepares
+   the resumption in target_resume, and defers the actual resumption
+   to target_commit_resume.  E.g., the remote target uses this to
+   coalesce multiple resumption requests in a single vCont packet.  */
+extern void target_commit_resume ();
+
+/* Setup to defer target_commit_resume calls, and return a cleanup
+   that reactivates target_commit_resume, if it was previously
+   active.  */
+struct cleanup *make_cleanup_defer_target_commit_resume ();
+
+/* For target_read_memory see target/target.h.  */
+
+/* The default target_ops::to_wait implementation.  */
+
+extern ptid_t default_target_wait (struct target_ops *ops,
+				   ptid_t ptid,
+				   struct target_waitstatus *status,
+				   int options);
 
 /* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
 
@@ -1337,12 +1410,6 @@ struct address_space *target_thread_addr
 
 int target_info_proc (const char *, enum info_proc_what);
 
-/* Returns true if this target can debug multiple processes
-   simultaneously.  */
-
-#define	target_supports_multi_process()	\
-     (*current_target.to_supports_multi_process) (&current_target)
-
 /* Returns true if this target can disable address space randomization.  */
 
 int target_supports_disable_randomization (void);
@@ -1389,6 +1456,9 @@ extern int target_write_raw_memory (CORE
    is returned.  */
 VEC(mem_region_s) *target_memory_map (void);
 
+/* Erases all flash memory regions on the target.  */
+void flash_erase_command (char *cmd, int from_tty);
+
 /* Erase the specified flash region.  */
 void target_flash_erase (ULONGEST address, LONGEST length);
 
@@ -1455,33 +1525,40 @@ extern int target_insert_breakpoint (str
    machine.  Result is 0 for success, non-zero for error.  */
 
 extern int target_remove_breakpoint (struct gdbarch *gdbarch,
-				     struct bp_target_info *bp_tgt);
+				     struct bp_target_info *bp_tgt,
+				     enum remove_bp_reason reason);
 
 /* Returns true if the terminal settings of the inferior are in
    effect.  */
 
 extern int target_terminal_is_inferior (void);
 
+/* Returns true if our terminal settings are in effect.  */
+
+extern int target_terminal_is_ours (void);
+
 /* Initialize the terminal settings we record for the inferior,
    before we actually run the inferior.  */
 
 extern void target_terminal_init (void);
 
-/* Put the inferior's terminal settings into effect.
-   This is preparation for starting or resuming the inferior.  */
+/* Put the inferior's terminal settings into effect.  This is
+   preparation for starting or resuming the inferior.  This is a no-op
+   unless called with the main UI as current UI.  */
 
 extern void target_terminal_inferior (void);
 
 /* Put some of our terminal settings into effect, enough to get proper
    results from our output, but do not change into or out of RAW mode
    so that no input is discarded.  This is a no-op if terminal_ours
-   was most recently called.  */
+   was most recently called.  This is a no-op unless called with the main
+   UI as current UI.  */
 
 extern void target_terminal_ours_for_output (void);
 
-/* Put our terminal settings into effect.
-   First record the inferior's terminal settings
-   so they can be restored properly later.  */
+/* Put our terminal settings into effect.  First record the inferior's
+   terminal settings so they can be restored properly later.  This is
+   a no-op unless called with the main UI as current UI.  */
 
 extern void target_terminal_ours (void);
 
@@ -1557,6 +1634,11 @@ extern void target_load (const char *arg
 
 int target_follow_fork (int follow_child, int detach_fork);
 
+/* Handle the target-specific bookkeeping required when the inferior
+   makes an exec call.  INF is the exec'd inferior.  */
+
+void target_follow_exec (struct inferior *inf, char *execd_pathname);
+
 /* On some targets, we can catch an inferior exec event when it
    occurs.  These functions insert/remove an already-created
    catchpoint for such events.  They return  0 for success, 1 if the
@@ -1605,9 +1687,7 @@ int target_follow_fork (int follow_child
    be defined by those targets that require the debugger to perform
    cleanup or internal state changes in response to the process event.  */
 
-/* The inferior process has died.  Do what is right.  */
-
-void target_mourn_inferior (void);
+/* For target_mourn_inferior see target/target.h.  */
 
 /* Does target have enough data to do a run or attach command? */
 
@@ -1660,6 +1740,23 @@ extern void target_update_thread_list (v
 
 extern void target_stop (ptid_t ptid);
 
+/* Interrupt the target just like the user typed a ^C on the
+   inferior's controlling terminal.  (For instance, under Unix, this
+   should act like SIGINT).  This function is asynchronous.  */
+
+extern void target_interrupt (ptid_t ptid);
+
+/* Pass a ^C, as determined to have been pressed by checking the quit
+   flag, to the target.  Normally calls target_interrupt, but remote
+   targets may take the opportunity to detect the remote side is not
+   responding and offer to disconnect.  */
+
+extern void target_pass_ctrlc (void);
+
+/* The default target_ops::to_pass_ctrlc implementation.  Simply calls
+   target_interrupt.  */
+extern void default_target_pass_ctrlc (struct target_ops *ops);
+
 /* Send the specified COMMAND to the target's monitor
    (shell,interpreter) for execution.  The result of the query is
    placed in OUTBUF.  */
@@ -1733,8 +1830,19 @@ extern int target_async_permitted;
 #define target_is_async_p() (current_target.to_is_async_p (&current_target))
 
 /* Enables/disabled async target events.  */
-#define target_async(ENABLE) \
-     (current_target.to_async (&current_target, (ENABLE)))
+extern void target_async (int enable);
+
+/* Enables/disables thread create and exit events.  */
+extern void target_thread_events (int enable);
+
+/* Whether support for controlling the target backends always in
+   non-stop mode is enabled.  */
+extern enum auto_boolean target_non_stop_enabled;
+
+/* Is the target in non-stop mode?  Some targets control the inferior
+   in non-stop mode even with "set non-stop off".  Always true if "set
+   non-stop" is on.  */
+extern int target_is_non_stop_p (void);
 
 #define target_execution_direction() \
   (current_target.to_execution_direction (&current_target))
@@ -1754,10 +1862,10 @@ extern char *normal_pid_to_str (ptid_t p
 #define target_extra_thread_info(TP) \
      (current_target.to_extra_thread_info (&current_target, TP))
 
-/* Return the thread's name.  A NULL result means that the target
-   could not determine this thread's name.  */
+/* Return the thread's name, or NULL if the target is unable to determine it.
+   The returned value must not be freed by the caller.  */
 
-extern char *target_thread_name (struct thread_info *);
+extern const char *target_thread_name (struct thread_info *);
 
 /* Attempts to find the pathname of the executable file
    that was run to create a specified process.
@@ -1847,7 +1955,8 @@ extern char *target_thread_name (struct 
    TYPE isn't supported.  TYPE is one of bp_hardware_watchpoint,
    bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint.
    CNT is the number of such watchpoints used so far, including this
-   one.  OTHERTYPE is who knows what...  */
+   one.  OTHERTYPE is the number of watchpoints of other types than
+   this one used so far.  */
 
 #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
  (*current_target.to_can_use_hw_breakpoint) (&current_target,  \
@@ -1861,6 +1970,9 @@ extern char *target_thread_name (struct 
 						      addr, len)
 
 
+#define target_can_do_single_step() \
+  (*current_target.to_can_do_single_step) (&current_target)
+
 /* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.
    TYPE is 0 for write, 1 for read, and 2 for read/write accesses.
    COND is the expression for its condition, or NULL if there's none.
@@ -1880,14 +1992,16 @@ extern char *target_thread_name (struct 
    or hw_access for an access watchpoint.  Returns 0 for success, 1 if
    masked watchpoints are not supported, -1 for failure.  */
 
-extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+					  enum target_hw_bp_type);
 
 /* Remove a masked watchpoint at ADDR with the mask MASK.
    RW may be hw_read for a read watchpoint, hw_write for a write watchpoint
    or hw_access for an access watchpoint.  Returns 0 for success, non-zero
    for failure.  */
 
-extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+					  enum target_hw_bp_type);
 
 /* Insert a hardware breakpoint at address BP_TGT->placed_address in
    the target machine.  Returns 0 for success, and returns non-zero or
@@ -1978,6 +2092,14 @@ extern int target_fileio_open (struct in
 			       const char *filename, int flags,
 			       int mode, int *target_errno);
 
+/* Like target_fileio_open, but print a warning message if the
+   file is being accessed over a link that may be slow.  */
+extern int target_fileio_open_warn_if_slow (struct inferior *inf,
+					    const char *filename,
+					    int flags,
+					    int mode,
+					    int *target_errno);
+
 /* Write up to LEN bytes from WRITE_BUF to FD on the target.
    Return the number of bytes written, or -1 if an error occurs
    (and set *TARGET_ERRNO).  */
@@ -2215,6 +2337,10 @@ extern void target_preopen (int);
 /* Does whatever cleanup is required to get rid of all pushed targets.  */
 extern void pop_all_targets (void);
 
+/* Like pop_all_targets, but pops only targets whose stratum is at or
+   above STRATUM.  */
+extern void pop_all_targets_at_and_above (enum strata stratum);
+
 /* Like pop_all_targets, but pops only targets whose stratum is
    strictly above ABOVE_STRATUM.  */
 extern void pop_all_targets_above (enum strata above_stratum);
@@ -2264,7 +2390,8 @@ extern struct target_section_table *targ
 /* From mem-break.c */
 
 extern int memory_remove_breakpoint (struct target_ops *, struct gdbarch *,
-				     struct bp_target_info *);
+				     struct bp_target_info *,
+				     enum remove_bp_reason);
 
 extern int memory_insert_breakpoint (struct target_ops *, struct gdbarch *,
 				     struct bp_target_info *);
@@ -2373,8 +2500,17 @@ extern int target_supports_delete_record
 /* See to_delete_record in struct target_ops.  */
 extern void target_delete_record (void);
 
+/* See to_record_method.  */
+extern enum record_method target_record_method (ptid_t ptid);
+
 /* See to_record_is_replaying in struct target_ops.  */
-extern int target_record_is_replaying (void);
+extern int target_record_is_replaying (ptid_t ptid);
+
+/* See to_record_will_replay in struct target_ops.  */
+extern int target_record_will_replay (ptid_t ptid, int dir);
+
+/* See to_record_stop_replaying in struct target_ops.  */
+extern void target_record_stop_replaying (void);
 
 /* See to_goto_record_begin in struct target_ops.  */
 extern void target_goto_record_begin (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-memory.c ./gdb/target-memory.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/target-memory.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/target-memory.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Parts of target interface that deal with accessing memory and memory-like
    objects.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,13 +23,16 @@
 #include "target.h"
 #include "memory-map.h"
 
-#include <sys/time.h>
+#include "gdb_sys_time.h"
+#include <algorithm>
 
 static int
 compare_block_starting_address (const void *a, const void *b)
 {
-  const struct memory_write_request *a_req = a;
-  const struct memory_write_request *b_req = b;
+  const struct memory_write_request *a_req
+    = (const struct memory_write_request *) a;
+  const struct memory_write_request *b_req
+    = (const struct memory_write_request *) b;
 
   if (a_req->begin < b_req->begin)
     return -1;
@@ -69,11 +72,11 @@ claim_memory (VEC(memory_write_request_s
       if (end != 0 && end <= r->begin)
 	continue;
 
-      claimed_begin = max (begin, r->begin);
+      claimed_begin = std::max (begin, r->begin);
       if (end == 0)
 	claimed_end = r->end;
       else
-	claimed_end = min (end, r->end);
+	claimed_end = std::min (end, r->end);
 
       if (claimed_begin == r->begin && claimed_end == r->end)
 	VEC_safe_push (memory_write_request_s, *result, r);
@@ -288,7 +291,7 @@ compute_garbled_blocks (VEC(memory_write
 static void
 cleanup_request_data (void *p)
 {
-  VEC(memory_write_request_s) **v = p;
+  VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
   struct memory_write_request *r;
   int i;
 
@@ -299,7 +302,7 @@ cleanup_request_data (void *p)
 static void
 cleanup_write_requests_vector (void *p)
 {
-  VEC(memory_write_request_s) **v = p;
+  VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
 
   VEC_free (memory_write_request_s, *v);
 }
@@ -366,7 +369,7 @@ target_write_memory_blocks (VEC(memory_w
 	  for (i = 0; VEC_iterate (memory_write_request_s, garbled, i, r); ++i)
 	    {
 	      gdb_assert (r->data == NULL);
-	      r->data = xmalloc (r->end - r->begin);
+	      r->data = (gdb_byte *) xmalloc (r->end - r->begin);
 	      err = target_read_memory (r->begin, r->data, r->end - r->begin);
 	      if (err != 0)
 		goto out;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/terminal.h ./gdb/terminal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/terminal.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/terminal.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Terminal interface definitions for GDB, the GNU Debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -99,10 +99,10 @@ extern int gdb_setpgid (void);
 /* Set up a serial structure describing standard input.  In inflow.c.  */
 extern void initialize_stdin_serial (void);
 
-extern int gdb_has_a_terminal (void);
-
 extern void gdb_save_tty_state (void);
 
+/* Take a snapshot of our initial tty state before readline/ncurses
+   have had a chance to alter it.  */
 extern void set_initial_gdb_ttystate (void);
 
 /* Set the process group of the caller to its own pid, or do nothing
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/analyze-racy-logs.py ./gdb/testsuite/analyze-racy-logs.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/analyze-racy-logs.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/analyze-racy-logs.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,177 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This file is part of GDB.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# This program is used to analyze the test results (i.e., *.sum files)
+# generated by GDB's testsuite, and print the testcases that are found
+# to be racy.
+#
+# Racy testcases are considered as being testcases which can
+# intermittently FAIL (or PASS) when run two or more times
+# consecutively, i.e., tests whose results are not deterministic.
+#
+# This program is invoked when the user runs "make check" and
+# specifies the RACY_ITER environment variable.
+
+import sys
+import os
+import re
+
+# The (global) dictionary that stores the associations between a *.sum
+# file and its results.  The data inside it will be stored as:
+#
+# files_and_tests = { 'file1.sum' : { 'PASS' : { 'test1', 'test2' ... },
+#                                     'FAIL' : { 'test5', 'test6' ... },
+#                                     ...
+#                                   },
+#                   { 'file2.sum' : { 'PASS' : { 'test1', 'test3' ... },
+#                                   ...
+#                                   }
+#                   }
+
+files_and_tests = dict ()
+
+# The relatioships between various states of the same tests that
+# should be ignored.  For example, if the same test PASSes on a
+# testcase run but KFAILs on another, this test should be considered
+# racy because a known-failure is...  known.
+
+ignore_relations = { 'PASS' : 'KFAIL' }
+
+# We are interested in lines that start with '.?(PASS|FAIL)'.  In
+# other words, we don't process errors (maybe we should).
+
+sum_matcher = re.compile('^(.?(PASS|FAIL)): (.*)$')
+
+def parse_sum_line (line, dic):
+    """Parse a single LINE from a sumfile, and store the results in the
+dictionary referenced by DIC."""
+    global sum_matcher
+
+    line = line.rstrip ()
+    m = re.match (sum_matcher, line)
+    if m:
+        result = m.group (1)
+        test_name = m.group (3)
+        # Remove tail parentheses.  These are likely to be '(timeout)'
+        # and other extra information that will only confuse us.
+        test_name = re.sub ('(\s+)?\(.*$', '', test_name)
+        if result not in dic.keys ():
+            dic[result] = set ()
+        if test_name in dic[result]:
+            # If the line is already present in the dictionary, then
+            # we include a unique identifier in the end of it, in the
+            # form or '<<N>>' (where N is a number >= 2).  This is
+            # useful because the GDB testsuite is full of non-unique
+            # test messages; however, if you process the racy summary
+            # file you will also need to perform this same operation
+            # in order to identify the racy test.
+            i = 2
+            while True:
+                nname = test_name + ' <<' + str (i) + '>>'
+                if nname not in dic[result]:
+                    break
+                i += 1
+            test_name = nname
+        dic[result].add (test_name)
+
+def read_sum_files (files):
+    """Read the sumfiles (passed as a list in the FILES variable), and
+process each one, filling the FILES_AND_TESTS global dictionary with
+information about them. """
+    global files_and_tests
+
+    for x in files:
+        with open (x, 'r') as f:
+            files_and_tests[x] = dict ()
+            for line in f.readlines ():
+                parse_sum_line (line, files_and_tests[x])
+
+def identify_racy_tests ():
+    """Identify and print the racy tests.  This function basically works
+on sets, and the idea behind it is simple.  It takes all the sets that
+refer to the same result (for example, all the sets that contain PASS
+tests), and compare them.  If a test is present in all PASS sets, then
+it is not racy.  Otherwise, it is.
+
+This function does that for all sets (PASS, FAIL, KPASS, KFAIL, etc.),
+and then print a sorted list (without duplicates) of all the tests
+that were found to be racy."""
+    global files_and_tests
+
+    # First, construct two dictionaries that will hold one set of
+    # testcases for each state (PASS, FAIL, etc.).
+    #
+    # Each set in NONRACY_TESTS will contain only the non-racy
+    # testcases for that state.  A non-racy testcase is a testcase
+    # that has the same state in all test runs.
+    #
+    # Each set in ALL_TESTS will contain all tests, racy or not, for
+    # that state.
+    nonracy_tests = dict ()
+    all_tests = dict ()
+    for f in files_and_tests:
+        for state in files_and_tests[f]:
+            try:
+                nonracy_tests[state] &= files_and_tests[f][state].copy ()
+            except KeyError:
+                nonracy_tests[state] = files_and_tests[f][state].copy ()
+
+            try:
+                all_tests[state] |= files_and_tests[f][state].copy ()
+            except KeyError:
+                all_tests[state] = files_and_tests[f][state].copy ()
+
+    # Now, we eliminate the tests that are present in states that need
+    # to be ignored.  For example, tests both in the PASS and KFAIL
+    # states should not be considered racy.
+    ignored_tests = set ()
+    for s1, s2 in ignore_relations.iteritems ():
+        try:
+            ignored_tests |= (all_tests[s1] & all_tests[s2])
+        except:
+            continue
+
+    racy_tests = set ()
+    for f in files_and_tests:
+        for state in files_and_tests[f]:
+            racy_tests |= files_and_tests[f][state] - nonracy_tests[state]
+
+    racy_tests = racy_tests - ignored_tests
+
+    # Print the header.
+    print "\t\t=== gdb racy tests ===\n"
+
+    # Print each test.
+    for line in sorted (racy_tests):
+        print line
+
+    # Print the summary.
+    print "\n"
+    print "\t\t=== gdb Summary ===\n"
+    print "# of racy tests:\t\t%d" % len (racy_tests)
+
+if __name__ == '__main__':
+    if len (sys.argv) < 3:
+        # It only makes sense to invoke this program if you pass two
+        # or more files to be analyzed.
+        sys.exit ("Usage: %s [FILE] [FILE] ..." % sys.argv[0])
+    read_sum_files (sys.argv[1:])
+    identify_racy_tests ()
+    exit (0)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/cc-with-tweaks.exp ./gdb/testsuite/boards/cc-with-tweaks.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/cc-with-tweaks.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/cc-with-tweaks.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/dwarf4-gdb-index.exp ./gdb/testsuite/boards/dwarf4-gdb-index.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/dwarf4-gdb-index.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/dwarf4-gdb-index.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/fission-dwp.exp ./gdb/testsuite/boards/fission-dwp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/fission-dwp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/fission-dwp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/fission.exp ./gdb/testsuite/boards/fission.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/fission.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/fission.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/gdbserver-base.exp ./gdb/testsuite/boards/gdbserver-base.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/gdbserver-base.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/gdbserver-base.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,10 +22,7 @@ process_multilib_options ""
 set_board_info compiler "[find_gcc]"
 
 # Test the copy of gdbserver in the build directory.
-set_board_info gdb_server_prog "../gdbserver/gdbserver"
-
-# Can't do input (or output) in the current gdbserver.
-set_board_info gdb,noinferiorio 1
+set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver"
 
 # gdbserver does not intercept target file operations and perform them
 # on the host.
@@ -44,7 +41,14 @@ proc ${board}_file { dest op args } {
 }
 
 proc ${board}_download { board host dest } {
-    return $host
+    # We pass DEST in standard_output_file, regardless of whether it is absolute
+    # or relative, because we don't want the tests to be able to write outside
+    # their standard output directory.
+    set dest [standard_output_file $dest]
+
+    file copy -force $host $dest
+
+    return $dest
 }
 
 proc ${board}_upload {dest srcfile args} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host.exp ./gdb/testsuite/boards/local-remote-host.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/local-remote-host.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host-native.exp ./gdb/testsuite/boards/local-remote-host-native.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host-native.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/local-remote-host-native.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host-notty.exp ./gdb/testsuite/boards/local-remote-host-notty.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/local-remote-host-notty.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/local-remote-host-notty.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-extended-gdbserver.exp ./gdb/testsuite/boards/native-extended-gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-extended-gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/native-extended-gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-gdbserver.exp ./gdb/testsuite/boards/native-gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/native-gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-stdio-gdbserver.exp ./gdb/testsuite/boards/native-stdio-gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/native-stdio-gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/native-stdio-gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp ./gdb/testsuite/boards/remote-gdbserver-on-localhost.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/remote-gdbserver-on-localhost.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,11 +21,7 @@
 # bash$ make check RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost"
 
 load_generic_config "gdbserver"
-
-# The default compiler for this target.
-set_board_info compiler  "[find_gcc]"
-
-process_multilib_options ""
+load_board_description "gdbserver-base"
 
 # The sshd should be running on localhost and ssh key should be
 # correctly set up that you ssh to localhost without having to type
@@ -39,44 +35,13 @@ set_board_info hostname localhost
 # We will be using the standard GDB remote protocol
 set_board_info gdb_protocol "remote"
 
-# Test the copy of gdbserver in the build directory, of an absolute path.
-set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver"
-
 # Use techniques appropriate to a stub
 set_board_info use_gdb_stub 1
 
 # This gdbserver can only run a process once per session.
 set_board_info gdb,do_reload_on_run 1
 
-# gdbserver does not intercept target file operations and perform them
-# on the host.
-set_board_info gdb,nofileio 1
-
 # There's no support for argument-passing (yet).
 set_board_info noargs 1
 
 set_board_info exit_is_reliable 1
-
-# The predefined TSVs in GDBserver.
-set_board_info gdb,predefined_tsv "\\\$trace_timestamp"
-
-set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\""
-
-proc ${board}_download { board src dest } {
-    if { [file pathtype $src] == "relative" } {
-	return [file join [pwd] $src]
-    } else {
-	return $src
-    }
-}
-
-proc ${board}_upload {dest srcfile args} {
-    return $srcfile
-}
-
-proc ${board}_file { dest op args } {
-    if { $op == "delete" } {
-	return 0
-    }
-    return [eval [list standard_file $dest $op] $args]
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/remote-stdio-gdbserver.exp ./gdb/testsuite/boards/remote-stdio-gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/remote-stdio-gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/remote-stdio-gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/stabs.exp ./gdb/testsuite/boards/stabs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/boards/stabs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/boards/stabs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/ChangeLog ./gdb/testsuite/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/ChangeLog	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/ChangeLog	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,6070 @@
+2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* gdb.arch/powerpc-power.exp: Delete test.
+	* gdb.arch/powerpc-power.s: Likewise.
+	* gdb.disasm/disassembler-options.exp: New test.
+	* gdb.arch/powerpc-altivec.exp: Likewise.
+	* gdb.arch/powerpc-altivec.s: Likewise.
+	* gdb.arch/powerpc-altivec2.exp: Likewise.
+	* gdb.arch/powerpc-altivec2.s: Likewise.
+	* gdb.arch/powerpc-altivec3.exp: Likewise.
+	* gdb.arch/powerpc-altivec3.s: Likewise.
+	* gdb.arch/powerpc-power7.exp: Likewise.
+	* gdb.arch/powerpc-power7.s: Likewise.
+	* gdb.arch/powerpc-power8.exp: Likewise.
+	* gdb.arch/powerpc-power8.s: Likewise.
+	* gdb.arch/powerpc-power9.exp: Likewise.
+	* gdb.arch/powerpc-power9.s: Likewise.
+	* gdb.arch/powerpc-vsx.exp: Likewise.
+	* gdb.arch/powerpc-vsx.s: Likewise.
+	* gdb.arch/powerpc-vsx2.exp: Likewise.
+	* gdb.arch/powerpc-vsx2.s: Likewise.
+	* gdb.arch/powerpc-vsx3.exp: Likewise.
+	* gdb.arch/powerpc-vsx3.s: Likewise.
+	* gdb.arch/arm-disassembler-options.exp: Likewise.
+	* gdb.arch/powerpc-disassembler-options.exp: Likewise.
+	* gdb.arch/s390-disassembler-options.exp: Likewise.
+
+2017-02-23  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.reverse/insn-reverse.x86.c (check_rdrand_support): Renamed to ...
+	(check_supported_features): ... this. Changed return type to void.
+	(supports_rdseed): New static global.
+	(rdseed): Check supports_rdseed.
+	(initialize): Call check_supported_features.
+
+2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* gdb.arch/ppc64-isa207-atomic-inst.exp: New testcase based on
+	gdb.arch/ppc64-atomic-inst.exp.  Add tests for lbarx/stbcx, lharx/sthcx
+	and lqarx/stqcx.
+	* gdb.arch/ppc64-isa207-atomic-inst.S: New file.
+	* gdb.arch/ppc64-isa207-atomic-inst.c: Likewise.
+
+2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+	* gdb.arch/ppc64-atomic-inst.exp: Fix test names starting with
+	uppercase.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.dwarf2/formdata16.c: New file.
+	* gdb.dwarf2/formdata16.exp: New file.
+	* lib/dwarf.exp (Dwarf): Add DW_FORM_data16.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/amd64-entry-value-param-dwarf5.S: New file.
+	* gdb.arch/amd64-entry-value-param-dwarf5.c: New file.
+	* gdb.arch/amd64-entry-value-param-dwarf5.exp: New file.
+	* gdb.arch/amd64-entry-value.exp: Rename DW_OP_GNU_*, DW_TAG_GNU_* and
+	DW_AT_GNU_*.
+
+2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.dwarf2/dw2-error.exp (file $testfile): Update expected string.
+
+2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR gdb/21164
+	* gdb.base/maint.exp: Add testcases for when the commands do
+	not have arguments.
+
+2017-02-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* gdb.cp/chained-calls.exp: Use p instead of P.
+
+2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* gdb.python/py-record-btrace.c, gdb.python/py-record-btrace.exp,
+	gdb.python/py-record-full.c, gdb.python/py-record-full.exp: New file.
+
+2017-02-14  Tom Tromey  <tom@tromey.com>
+
+	PR python/13598:
+	* gdb.python/py-events.exp: Add before_prompt event tests.
+
+2017-02-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.dwarf2/implptrpiece.exp: Fix check for big-endian targets.
+
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.linespec/explicit.c (my_unique_function_name): New function.
+	(main): Call my_unique_function_name.
+	* gdb.linespec/explicit.exp: Use my_unique_function_name to test
+	completion of patterns with a single match.
+	Add missing -re switches to gdb_test_multiple calls.
+
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.arch/i386-biarch-core.exp: Check for i386 arch support and
+	return if core file is not recognized.
+
+2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/new-ui.exp (do_test): Test queries behavior on main
+	and extra UIs.
+
+2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/new-ui.exp (do_test, do_test_invalid_args): Use
+	proc_with_prefix.
+
+2017-02-10  Tom Tromey  <tom@tromey.com>
+
+	* gdb.python/py-xmethods.exp: Use "p" command, not "P".
+
+2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
+
+	PR gdb/21122
+	* gdb.base/help.exp: Update match pattern for testing 'help commands'.
+
+2017-02-08  Jerome Guitton  <guitton@adacore.com>
+
+	* gdb.base/define.exp: Add test for command abbreviations
+	in define.
+
+2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.reverse/insn-reverse.c: Include insn-reverse-x86.c.
+	* gdb.reverse/insn-reverse-x86.c: New file.
+
+2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
+
+	PR tdep/20936
+	* gdb.xml/tdesc-regs.exp: Provide sparc core registers for the tests.
+
+2017-02-03  Tom Tromey  <tom@tromey.com>
+
+	PR rust/21097:
+	* gdb.rust/simple.exp: Add new tests.
+
+2017-02-02  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-logging.exp: Add "redirect while already logging"
+	tests.
+
+2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.dwarf2/dw2-op-stack-value.exp: Adjust expected result of
+	taking a 2-byte value out of a 4-byte DWARF implicit value on
+	big-endian targets.
+	* gdb.dwarf2/nonvar-access.exp: Add more comments to existing
+	logic.  Add test cases for DW_OP_implicit.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* lib/gdb.exp (gdb_skip_xml_tests): Error if GDB is running.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/enable.exp: Call gdb_exit before
+	skip_gdbserver_tests.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/non-stop.exp: Add '-ex "set non-stop on"' to
+	GDBFLAGS.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/buffer-size.exp: Add unsupported/untested message if
+	the test is skipped.
+	* gdb.btrace/data.exp: Likewise.
+	* gdb.btrace/delta.exp: Likewise.
+	* gdb.btrace/dlopen.exp: Likewise.
+	* gdb.btrace/enable-running.exp: Likewise.
+	* gdb.btrace/enable.exp: Likewise.
+	* gdb.btrace/exception.exp: Likewise.
+	* gdb.btrace/function_call_history.exp: Likewise.
+	* gdb.btrace/gcore.exp: Likewise.
+	* gdb.btrace/instruction_history.exp: Likewise.
+	* gdb.btrace/multi-thread-step.exp: Likewise.
+	* gdb.btrace/nohist.exp: Likewise.
+	* gdb.btrace/non-stop.exp: Likewise.
+	* gdb.btrace/reconnect.exp: Likewise.
+	* gdb.btrace/record_goto-step.exp: Likewise.
+	* gdb.btrace/record_goto.exp: Likewise.
+	* gdb.btrace/rn-dl-bind.exp: Likewise.
+	* gdb.btrace/segv.exp: Likewise.
+	* gdb.btrace/step.exp: Likewise.
+	* gdb.btrace/stepi.exp: Likewise.
+	* gdb.btrace/tailcall-only.exp: Likewise.
+	* gdb.btrace/tailcall.exp: Likewise.
+	* gdb.btrace/tsx.exp: Likewise.
+	* gdb.btrace/unknown_functions.exp: Likewise.
+	* gdb.btrace/vdso.exp: Likewise.
+
+2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/enable-running.c: New.
+	* gdb.btrace/enable-running.exp: New.
+
+2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.arch/amd64-gs_base.c: New file.
+	* gdb.arch/amd64-gs_base.exp: New file.
+
+2017-01-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* lib/memory.exp: Remove spurious empty newlines.
+
+2017-01-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.python/py-bad-printers.exp: Load python file using "source".
+	* gdb.python/py-events.exp: Likewise.
+	* gdb.python/py-evsignal.exp: Likewise.
+	* gdb.python/py-evthreads.exp: Likewise.
+	* gdb.python/py-frame-args.exp: Likewise.
+	* gdb.python/py-framefilter-invalidarg.exp: Likewise.
+	* gdb.python/py-framefilter-mi.exp: Likewise.
+	* gdb.python/py-framefilter.exp: Likewise.
+	* gdb.python/py-mi.exp: Likewise.
+	* gdb.python/py-pp-maint.exp: Likewise.
+	* gdb.python/py-pp-registration.exp: Likewise.
+	* gdb.python/py-prettyprint.exp: Likewise.
+	(run_lang_tests): Likewise.
+	* gdb.python/py-typeprint.exp: Likewise.
+
+2017-01-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* lib/memory.exp: New file.
+	* lib/gdb.exp: Load memory.exp.
+	* gdb.base/memattr.exp (delete_memory): Move proc to
+	lib/memory.exp and rename to delete_memory_regions.
+	Replace delete_memory with delete_memory_regions.
+	Cleanup memory regions before tests.
+	* gdb.base/breakpoint-in-ro-region.exp: Cleanup memory regions
+	before tests.
+
+2017-01-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.reverse/insn-reverse.c: Move arm and aarch64 code to their own
+	files.
+	(initialize): New function conditionally defined.
+	(testcases): Move within conditional block.
+	(main): Call initialize.
+	* gdb.reverse/insn-reverse-aarch64.c: New file, based on aarch64 bits
+	of gdb.reverse/insn-reverse.c.
+	* gdb.reverse/insn-reverse-arm.c: New file, based on arm bits of
+	gdb.reverse/insn-reverse.c.
+
+2017-01-26  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/all-architectures.exp.in (do_arch_tests): Test
+	disassemble on address 0.
+
+2017-01-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.dwarf2/implptr-64bit.exp: Use dwarf assembler.
+	* gdb.dwarf2/implptr-64bit.S: Remove.
+	* lib/dwarf.exp (Dwarf): Handle character "%".  Evaluate some
+	variables in caller's context.  Add DW_OP_implicit_value.
+
+2017-01-25  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/dwarf.exp (Dwarf::_location): Handle
+	DW_OP_GNU_implicit_pointer with proper size.
+
+2017-01-20  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.python/py-xmethods.exp: Fix test names starting with lowercase
+	and add untested calls.
+
+2017-01-20  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.python/python.exp: Check line number against what GDB thinks
+	the line number is for func1.
+
+2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* gdb.dlang/debug-expr.exp: New file.
+
+2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names for the following files:
+
+	* gdb.ada/exec_changed.exp
+	* gdb.ada/info_types.exp
+	* gdb.arch/aarch64-atomic-inst.exp
+	* gdb.arch/aarch64-fp.exp
+	* gdb.arch/altivec-abi.exp
+	* gdb.arch/altivec-regs.exp
+	* gdb.arch/amd64-byte.exp
+	* gdb.arch/amd64-disp-step.exp
+	* gdb.arch/amd64-dword.exp
+	* gdb.arch/amd64-entry-value-inline.exp
+	* gdb.arch/amd64-entry-value-param.exp
+	* gdb.arch/amd64-entry-value-paramref.exp
+	* gdb.arch/amd64-entry-value.exp
+	* gdb.arch/amd64-i386-address.exp
+	* gdb.arch/amd64-invalid-stack-middle.exp
+	* gdb.arch/amd64-invalid-stack-top.exp
+	* gdb.arch/amd64-optimout-repeat.exp
+	* gdb.arch/amd64-prologue-skip.exp
+	* gdb.arch/amd64-prologue-xmm.exp
+	* gdb.arch/amd64-stap-special-operands.exp
+	* gdb.arch/amd64-stap-wrong-subexp.exp
+	* gdb.arch/amd64-tailcall-cxx.exp
+	* gdb.arch/amd64-tailcall-noret.exp
+	* gdb.arch/amd64-tailcall-ret.exp
+	* gdb.arch/amd64-tailcall-self.exp
+	* gdb.arch/amd64-word.exp
+	* gdb.arch/arm-bl-branch-dest.exp
+	* gdb.arch/arm-disp-step.exp
+	* gdb.arch/arm-neon.exp
+	* gdb.arch/arm-single-step-kernel-helper.exp
+	* gdb.arch/avr-flash-qualifier.exp
+	* gdb.arch/disp-step-insn-reloc.exp
+	* gdb.arch/e500-abi.exp
+	* gdb.arch/e500-regs.exp
+	* gdb.arch/ftrace-insn-reloc.exp
+	* gdb.arch/i386-avx512.exp
+	* gdb.arch/i386-bp_permanent.exp
+	* gdb.arch/i386-byte.exp
+	* gdb.arch/i386-cfi-notcurrent.exp
+	* gdb.arch/i386-disp-step.exp
+	* gdb.arch/i386-dr3-watch.exp
+	* gdb.arch/i386-float.exp
+	* gdb.arch/i386-gnu-cfi.exp
+	* gdb.arch/i386-mpx-map.exp
+	* gdb.arch/i386-mpx-sigsegv.exp
+	* gdb.arch/i386-mpx-simple_segv.exp
+	* gdb.arch/i386-mpx.exp
+	* gdb.arch/i386-permbkpt.exp
+	* gdb.arch/i386-prologue.exp
+	* gdb.arch/i386-signal.exp
+	* gdb.arch/i386-size-overlap.exp
+	* gdb.arch/i386-unwind.exp
+	* gdb.arch/i386-word.exp
+	* gdb.arch/mips-fcr.exp
+	* gdb.arch/powerpc-d128-regs.exp
+	* gdb.arch/powerpc-stackless.exp
+	* gdb.arch/ppc64-atomic-inst.exp
+	* gdb.arch/s390-stackless.exp
+	* gdb.arch/s390-tdbregs.exp
+	* gdb.arch/s390-vregs.exp
+	* gdb.arch/sparc-sysstep.exp
+	* gdb.arch/thumb-bx-pc.exp
+	* gdb.arch/thumb-singlestep.exp
+	* gdb.arch/thumb2-it.exp
+	* gdb.arch/vsx-regs.exp
+	* gdb.asm/asm-source.exp
+	* gdb.base/a2-run.exp
+	* gdb.base/advance.exp
+	* gdb.base/all-bin.exp
+	* gdb.base/anon.exp
+	* gdb.base/args.exp
+	* gdb.base/arithmet.exp
+	* gdb.base/async-shell.exp
+	* gdb.base/async.exp
+	* gdb.base/attach-pie-noexec.exp
+	* gdb.base/attach-twice.exp
+	* gdb.base/auto-load.exp
+	* gdb.base/bang.exp
+	* gdb.base/bitfields.exp
+	* gdb.base/break-always.exp
+	* gdb.base/break-caller-line.exp
+	* gdb.base/break-entry.exp
+	* gdb.base/break-inline.exp
+	* gdb.base/break-on-linker-gcd-function.exp
+	* gdb.base/break-probes.exp
+	* gdb.base/break.exp
+	* gdb.base/breakpoint-shadow.exp
+	* gdb.base/call-ar-st.exp
+	* gdb.base/call-sc.exp
+	* gdb.base/call-signal-resume.exp
+	* gdb.base/call-strs.exp
+	* gdb.base/callfuncs.exp
+	* gdb.base/catch-fork-static.exp
+	* gdb.base/catch-gdb-caused-signals.exp
+	* gdb.base/catch-load.exp
+	* gdb.base/catch-signal-fork.exp
+	* gdb.base/catch-signal.exp
+	* gdb.base/catch-syscall.exp
+	* gdb.base/charset.exp
+	* gdb.base/checkpoint.exp
+	* gdb.base/chng-syms.exp
+	* gdb.base/code-expr.exp
+	* gdb.base/code_elim.exp
+	* gdb.base/commands.exp
+	* gdb.base/completion.exp
+	* gdb.base/complex.exp
+	* gdb.base/cond-expr.exp
+	* gdb.base/condbreak.exp
+	* gdb.base/consecutive.exp
+	* gdb.base/continue-all-already-running.exp
+	* gdb.base/coredump-filter.exp
+	* gdb.base/corefile.exp
+	* gdb.base/dbx.exp
+	* gdb.base/debug-expr.exp
+	* gdb.base/define.exp
+	* gdb.base/del.exp
+	* gdb.base/disabled-location.exp
+	* gdb.base/disasm-end-cu.exp
+	* gdb.base/disasm-optim.exp
+	* gdb.base/display.exp
+	* gdb.base/duplicate-bp.exp
+	* gdb.base/ena-dis-br.exp
+	* gdb.base/ending-run.exp
+	* gdb.base/enumval.exp
+	* gdb.base/environ.exp
+	* gdb.base/eu-strip-infcall.exp
+	* gdb.base/eval-avoid-side-effects.exp
+	* gdb.base/eval-skip.exp
+	* gdb.base/exitsignal.exp
+	* gdb.base/expand-psymtabs.exp
+	* gdb.base/filesym.exp
+	* gdb.base/find-unmapped.exp
+	* gdb.base/finish.exp
+	* gdb.base/float.exp
+	* gdb.base/foll-exec-mode.exp
+	* gdb.base/foll-exec.exp
+	* gdb.base/foll-fork.exp
+	* gdb.base/fortran-sym-case.exp
+	* gdb.base/freebpcmd.exp
+	* gdb.base/func-ptr.exp
+	* gdb.base/func-ptrs.exp
+	* gdb.base/funcargs.exp
+	* gdb.base/gcore-buffer-overflow.exp
+	* gdb.base/gcore-relro-pie.exp
+	* gdb.base/gcore-relro.exp
+	* gdb.base/gcore.exp
+	* gdb.base/gdb1090.exp
+	* gdb.base/gdb11530.exp
+	* gdb.base/gdb11531.exp
+	* gdb.base/gdb1821.exp
+	* gdb.base/gdbindex-stabs.exp
+	* gdb.base/gdbvars.exp
+	* gdb.base/hbreak.exp
+	* gdb.base/hbreak2.exp
+	* gdb.base/included.exp
+	* gdb.base/infcall-input.exp
+	* gdb.base/inferior-died.exp
+	* gdb.base/infnan.exp
+	* gdb.base/info-macros.exp
+	* gdb.base/info-os.exp
+	* gdb.base/info-proc.exp
+	* gdb.base/info-shared.exp
+	* gdb.base/info-target.exp
+	* gdb.base/infoline.exp
+	* gdb.base/interp.exp
+	* gdb.base/interrupt.exp
+	* gdb.base/jit-reader.exp
+	* gdb.base/jit-simple.exp
+	* gdb.base/kill-after-signal.exp
+	* gdb.base/kill-detach-inferiors-cmd.exp
+	* gdb.base/label.exp
+	* gdb.base/langs.exp
+	* gdb.base/ldbl_e308.exp
+	* gdb.base/line-symtabs.exp
+	* gdb.base/linespecs.exp
+	* gdb.base/list.exp
+	* gdb.base/long_long.exp
+	* gdb.base/longest-types.exp
+	* gdb.base/maint.exp
+	* gdb.base/max-value-size.exp
+	* gdb.base/memattr.exp
+	* gdb.base/mips_pro.exp
+	* gdb.base/morestack.exp
+	* gdb.base/moribund-step.exp
+	* gdb.base/multi-forks.exp
+	* gdb.base/nested-addr.exp
+	* gdb.base/nextoverexit.exp
+	* gdb.base/noreturn-finish.exp
+	* gdb.base/noreturn-return.exp
+	* gdb.base/nostdlib.exp
+	* gdb.base/offsets.exp
+	* gdb.base/opaque.exp
+	* gdb.base/pc-fp.exp
+	* gdb.base/permissions.exp
+	* gdb.base/print-symbol-loading.exp
+	* gdb.base/prologue-include.exp
+	* gdb.base/psymtab.exp
+	* gdb.base/ptype.exp
+	* gdb.base/random-signal.exp
+	* gdb.base/randomize.exp
+	* gdb.base/range-stepping.exp
+	* gdb.base/readline-ask.exp
+	* gdb.base/recpar.exp
+	* gdb.base/recurse.exp
+	* gdb.base/relational.exp
+	* gdb.base/restore.exp
+	* gdb.base/return-nodebug.exp
+	* gdb.base/return.exp
+	* gdb.base/run-after-attach.exp
+	* gdb.base/save-bp.exp
+	* gdb.base/scope.exp
+	* gdb.base/sect-cmd.exp
+	* gdb.base/set-lang-auto.exp
+	* gdb.base/set-noassign.exp
+	* gdb.base/setvar.exp
+	* gdb.base/sigall.exp
+	* gdb.base/sigbpt.exp
+	* gdb.base/siginfo-addr.exp
+	* gdb.base/siginfo-infcall.exp
+	* gdb.base/siginfo-obj.exp
+	* gdb.base/siginfo.exp
+	* gdb.base/signals-state-child.exp
+	* gdb.base/signest.exp
+	* gdb.base/sigstep.exp
+	* gdb.base/sizeof.exp
+	* gdb.base/skip.exp
+	* gdb.base/solib-corrupted.exp
+	* gdb.base/solib-nodir.exp
+	* gdb.base/solib-search.exp
+	* gdb.base/stack-checking.exp
+	* gdb.base/stale-infcall.exp
+	* gdb.base/stap-probe.exp
+	* gdb.base/start.exp
+	* gdb.base/step-break.exp
+	* gdb.base/step-bt.exp
+	* gdb.base/step-line.exp
+	* gdb.base/step-over-exit.exp
+	* gdb.base/step-over-syscall.exp
+	* gdb.base/step-resume-infcall.exp
+	* gdb.base/step-test.exp
+	* gdb.base/store.exp
+	* gdb.base/structs3.exp
+	* gdb.base/sym-file.exp
+	* gdb.base/symbol-without-target_section.exp
+	* gdb.base/term.exp
+	* gdb.base/testenv.exp
+	* gdb.base/ui-redirect.exp
+	* gdb.base/until.exp
+	* gdb.base/unwindonsignal.exp
+	* gdb.base/value-double-free.exp
+	* gdb.base/vla-datatypes.exp
+	* gdb.base/vla-ptr.exp
+	* gdb.base/vla-sideeffect.exp
+	* gdb.base/volatile.exp
+	* gdb.base/watch-cond-infcall.exp
+	* gdb.base/watch-cond.exp
+	* gdb.base/watch-non-mem.exp
+	* gdb.base/watch-read.exp
+	* gdb.base/watch-vfork.exp
+	* gdb.base/watchpoint-cond-gone.exp
+	* gdb.base/watchpoint-delete.exp
+	* gdb.base/watchpoint-hw-hit-once.exp
+	* gdb.base/watchpoint-hw.exp
+	* gdb.base/watchpoint-stops-at-right-insn.exp
+	* gdb.base/watchpoints.exp
+	* gdb.base/wchar.exp
+	* gdb.base/whatis-exp.exp
+	* gdb.btrace/buffer-size.exp
+	* gdb.btrace/data.exp
+	* gdb.btrace/delta.exp
+	* gdb.btrace/dlopen.exp
+	* gdb.btrace/enable.exp
+	* gdb.btrace/exception.exp
+	* gdb.btrace/function_call_history.exp
+	* gdb.btrace/gcore.exp
+	* gdb.btrace/instruction_history.exp
+	* gdb.btrace/nohist.exp
+	* gdb.btrace/reconnect.exp
+	* gdb.btrace/record_goto-step.exp
+	* gdb.btrace/record_goto.exp
+	* gdb.btrace/rn-dl-bind.exp
+	* gdb.btrace/segv.exp
+	* gdb.btrace/step.exp
+	* gdb.btrace/stepi.exp
+	* gdb.btrace/tailcall-only.exp
+	* gdb.btrace/tailcall.exp
+	* gdb.btrace/tsx.exp
+	* gdb.btrace/unknown_functions.exp
+	* gdb.btrace/vdso.exp
+	* gdb.compile/compile-ifunc.exp
+	* gdb.compile/compile-ops.exp
+	* gdb.compile/compile-print.exp
+	* gdb.compile/compile-setjmp.exp
+	* gdb.cp/abstract-origin.exp
+	* gdb.cp/ambiguous.exp
+	* gdb.cp/annota2.exp
+	* gdb.cp/annota3.exp
+	* gdb.cp/anon-ns.exp
+	* gdb.cp/anon-struct.exp
+	* gdb.cp/anon-union.exp
+	* gdb.cp/arg-reference.exp
+	* gdb.cp/baseenum.exp
+	* gdb.cp/bool.exp
+	* gdb.cp/breakpoint.exp
+	* gdb.cp/bs15503.exp
+	* gdb.cp/call-c.exp
+	* gdb.cp/casts.exp
+	* gdb.cp/chained-calls.exp
+	* gdb.cp/class2.exp
+	* gdb.cp/classes.exp
+	* gdb.cp/cmpd-minsyms.exp
+	* gdb.cp/converts.exp
+	* gdb.cp/cp-relocate.exp
+	* gdb.cp/cpcompletion.exp
+	* gdb.cp/cpexprs.exp
+	* gdb.cp/cplabel.exp
+	* gdb.cp/cplusfuncs.exp
+	* gdb.cp/cpsizeof.exp
+	* gdb.cp/ctti.exp
+	* gdb.cp/derivation.exp
+	* gdb.cp/destrprint.exp
+	* gdb.cp/dispcxx.exp
+	* gdb.cp/enum-class.exp
+	* gdb.cp/exception.exp
+	* gdb.cp/exceptprint.exp
+	* gdb.cp/expand-psymtabs-cxx.exp
+	* gdb.cp/expand-sals.exp
+	* gdb.cp/extern-c.exp
+	* gdb.cp/filename.exp
+	* gdb.cp/formatted-ref.exp
+	* gdb.cp/fpointer.exp
+	* gdb.cp/gdb1355.exp
+	* gdb.cp/gdb2495.exp
+	* gdb.cp/hang.exp
+	* gdb.cp/impl-this.exp
+	* gdb.cp/infcall-dlopen.exp
+	* gdb.cp/inherit.exp
+	* gdb.cp/iostream.exp
+	* gdb.cp/koenig.exp
+	* gdb.cp/local.exp
+	* gdb.cp/m-data.exp
+	* gdb.cp/m-static.exp
+	* gdb.cp/mb-ctor.exp
+	* gdb.cp/mb-inline.exp
+	* gdb.cp/mb-templates.exp
+	* gdb.cp/member-name.exp
+	* gdb.cp/member-ptr.exp
+	* gdb.cp/meth-typedefs.exp
+	* gdb.cp/method.exp
+	* gdb.cp/method2.exp
+	* gdb.cp/minsym-fallback.exp
+	* gdb.cp/misc.exp
+	* gdb.cp/namelessclass.exp
+	* gdb.cp/namespace-enum.exp
+	* gdb.cp/namespace-nested-import.exp
+	* gdb.cp/namespace.exp
+	* gdb.cp/nextoverthrow.exp
+	* gdb.cp/no-dmgl-verbose.exp
+	* gdb.cp/non-trivial-retval.exp
+	* gdb.cp/noparam.exp
+	* gdb.cp/nsdecl.exp
+	* gdb.cp/nsimport.exp
+	* gdb.cp/nsnested.exp
+	* gdb.cp/nsnoimports.exp
+	* gdb.cp/nsrecurs.exp
+	* gdb.cp/nsstress.exp
+	* gdb.cp/nsusing.exp
+	* gdb.cp/operator.exp
+	* gdb.cp/oranking.exp
+	* gdb.cp/overload-const.exp
+	* gdb.cp/overload.exp
+	* gdb.cp/ovldbreak.exp
+	* gdb.cp/ovsrch.exp
+	* gdb.cp/paren-type.exp
+	* gdb.cp/parse-lang.exp
+	* gdb.cp/pass-by-ref.exp
+	* gdb.cp/pr-1023.exp
+	* gdb.cp/pr-1210.exp
+	* gdb.cp/pr-574.exp
+	* gdb.cp/pr10687.exp
+	* gdb.cp/pr12028.exp
+	* gdb.cp/pr17132.exp
+	* gdb.cp/pr17494.exp
+	* gdb.cp/pr9067.exp
+	* gdb.cp/pr9167.exp
+	* gdb.cp/pr9631.exp
+	* gdb.cp/printmethod.exp
+	* gdb.cp/psmang.exp
+	* gdb.cp/psymtab-parameter.exp
+	* gdb.cp/ptype-cv-cp.exp
+	* gdb.cp/ptype-flags.exp
+	* gdb.cp/re-set-overloaded.exp
+	* gdb.cp/ref-types.exp
+	* gdb.cp/rtti.exp
+	* gdb.cp/scope-err.exp
+	* gdb.cp/shadow.exp
+	* gdb.cp/smartp.exp
+	* gdb.cp/static-method.exp
+	* gdb.cp/static-print-quit.exp
+	* gdb.cp/temargs.exp
+	* gdb.cp/templates.exp
+	* gdb.cp/try_catch.exp
+	* gdb.cp/typedef-operator.exp
+	* gdb.cp/typeid.exp
+	* gdb.cp/userdef.exp
+	* gdb.cp/using-crash.exp
+	* gdb.cp/var-tag.exp
+	* gdb.cp/virtbase.exp
+	* gdb.cp/virtfunc.exp
+	* gdb.cp/virtfunc2.exp
+	* gdb.cp/vla-cxx.exp
+	* gdb.disasm/t01_mov.exp
+	* gdb.disasm/t02_mova.exp
+	* gdb.disasm/t03_add.exp
+	* gdb.disasm/t04_sub.exp
+	* gdb.disasm/t05_cmp.exp
+	* gdb.disasm/t06_ari2.exp
+	* gdb.disasm/t07_ari3.exp
+	* gdb.disasm/t08_or.exp
+	* gdb.disasm/t09_xor.exp
+	* gdb.disasm/t10_and.exp
+	* gdb.disasm/t11_logs.exp
+	* gdb.disasm/t12_bit.exp
+	* gdb.disasm/t13_otr.exp
+	* gdb.dlang/circular.exp
+	* gdb.dwarf2/arr-stride.exp
+	* gdb.dwarf2/arr-subrange.exp
+	* gdb.dwarf2/atomic-type.exp
+	* gdb.dwarf2/bad-regnum.exp
+	* gdb.dwarf2/bitfield-parent-optimized-out.exp
+	* gdb.dwarf2/callframecfa.exp
+	* gdb.dwarf2/clztest.exp
+	* gdb.dwarf2/corrupt.exp
+	* gdb.dwarf2/data-loc.exp
+	* gdb.dwarf2/dup-psym.exp
+	* gdb.dwarf2/dw2-anon-mptr.exp
+	* gdb.dwarf2/dw2-anonymous-func.exp
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+	* gdb.dwarf2/dw2-bad-unresolved.exp
+	* gdb.dwarf2/dw2-basic.exp
+	* gdb.dwarf2/dw2-canonicalize-type.exp
+	* gdb.dwarf2/dw2-case-insensitive.exp
+	* gdb.dwarf2/dw2-common-block.exp
+	* gdb.dwarf2/dw2-compdir-oldgcc.exp
+	* gdb.dwarf2/dw2-compressed.exp
+	* gdb.dwarf2/dw2-const.exp
+	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+	* gdb.dwarf2/dw2-cu-size.exp
+	* gdb.dwarf2/dw2-dup-frame.exp
+	* gdb.dwarf2/dw2-entry-value.exp
+	* gdb.dwarf2/dw2-icycle.exp
+	* gdb.dwarf2/dw2-ifort-parameter.exp
+	* gdb.dwarf2/dw2-inline-break.exp
+	* gdb.dwarf2/dw2-inline-param.exp
+	* gdb.dwarf2/dw2-intercu.exp
+	* gdb.dwarf2/dw2-intermix.exp
+	* gdb.dwarf2/dw2-lexical-block-bare.exp
+	* gdb.dwarf2/dw2-linkage-name-trust.exp
+	* gdb.dwarf2/dw2-minsym-in-cu.exp
+	* gdb.dwarf2/dw2-noloc.exp
+	* gdb.dwarf2/dw2-op-call.exp
+	* gdb.dwarf2/dw2-op-out-param.exp
+	* gdb.dwarf2/dw2-opt-structptr.exp
+	* gdb.dwarf2/dw2-param-error.exp
+	* gdb.dwarf2/dw2-producer.exp
+	* gdb.dwarf2/dw2-ranges-base.exp
+	* gdb.dwarf2/dw2-ref-missing-frame.exp
+	* gdb.dwarf2/dw2-reg-undefined.exp
+	* gdb.dwarf2/dw2-regno-invalid.exp
+	* gdb.dwarf2/dw2-restore.exp
+	* gdb.dwarf2/dw2-restrict.exp
+	* gdb.dwarf2/dw2-single-line-discriminators.exp
+	* gdb.dwarf2/dw2-strp.exp
+	* gdb.dwarf2/dw2-undefined-ret-addr.exp
+	* gdb.dwarf2/dw2-unresolved.exp
+	* gdb.dwarf2/dw2-var-zero-addr.exp
+	* gdb.dwarf2/dw4-sig-types.exp
+	* gdb.dwarf2/dwz.exp
+	* gdb.dwarf2/dynarr-ptr.exp
+	* gdb.dwarf2/enum-type.exp
+	* gdb.dwarf2/gdb-index.exp
+	* gdb.dwarf2/implptr-64bit.exp
+	* gdb.dwarf2/implptr-optimized-out.exp
+	* gdb.dwarf2/implptr.exp
+	* gdb.dwarf2/implref-array.exp
+	* gdb.dwarf2/implref-const.exp
+	* gdb.dwarf2/implref-global.exp
+	* gdb.dwarf2/implref-struct.exp
+	* gdb.dwarf2/mac-fileno.exp
+	* gdb.dwarf2/main-subprogram.exp
+	* gdb.dwarf2/member-ptr-forwardref.exp
+	* gdb.dwarf2/method-ptr.exp
+	* gdb.dwarf2/missing-sig-type.exp
+	* gdb.dwarf2/nonvar-access.exp
+	* gdb.dwarf2/opaque-type-lookup.exp
+	* gdb.dwarf2/pieces-optimized-out.exp
+	* gdb.dwarf2/pieces.exp
+	* gdb.dwarf2/pr10770.exp
+	* gdb.dwarf2/pr13961.exp
+	* gdb.dwarf2/staticvirtual.exp
+	* gdb.dwarf2/subrange.exp
+	* gdb.dwarf2/symtab-producer.exp
+	* gdb.dwarf2/trace-crash.exp
+	* gdb.dwarf2/typeddwarf.exp
+	* gdb.dwarf2/valop.exp
+	* gdb.dwarf2/watch-notconst.exp
+	* gdb.fortran/array-element.exp
+	* gdb.fortran/charset.exp
+	* gdb.fortran/common-block.exp
+	* gdb.fortran/complex.exp
+	* gdb.fortran/derived-type-function.exp
+	* gdb.fortran/derived-type.exp
+	* gdb.fortran/logical.exp
+	* gdb.fortran/module.exp
+	* gdb.fortran/multi-dim.exp
+	* gdb.fortran/nested-funcs.exp
+	* gdb.fortran/print-formatted.exp
+	* gdb.fortran/subarray.exp
+	* gdb.fortran/vla-alloc-assoc.exp
+	* gdb.fortran/vla-datatypes.exp
+	* gdb.fortran/vla-history.exp
+	* gdb.fortran/vla-ptr-info.exp
+	* gdb.fortran/vla-ptype-sub.exp
+	* gdb.fortran/vla-ptype.exp
+	* gdb.fortran/vla-sizeof.exp
+	* gdb.fortran/vla-type.exp
+	* gdb.fortran/vla-value-sub-arbitrary.exp
+	* gdb.fortran/vla-value-sub-finish.exp
+	* gdb.fortran/vla-value-sub.exp
+	* gdb.fortran/vla-value.exp
+	* gdb.fortran/whatis_type.exp
+	* gdb.go/chan.exp
+	* gdb.go/handcall.exp
+	* gdb.go/hello.exp
+	* gdb.go/integers.exp
+	* gdb.go/methods.exp
+	* gdb.go/package.exp
+	* gdb.go/strings.exp
+	* gdb.go/types.exp
+	* gdb.go/unsafe.exp
+	* gdb.guile/scm-arch.exp
+	* gdb.guile/scm-block.exp
+	* gdb.guile/scm-breakpoint.exp
+	* gdb.guile/scm-cmd.exp
+	* gdb.guile/scm-disasm.exp
+	* gdb.guile/scm-equal.exp
+	* gdb.guile/scm-frame-args.exp
+	* gdb.guile/scm-frame-inline.exp
+	* gdb.guile/scm-frame.exp
+	* gdb.guile/scm-iterator.exp
+	* gdb.guile/scm-math.exp
+	* gdb.guile/scm-objfile.exp
+	* gdb.guile/scm-ports.exp
+	* gdb.guile/scm-symbol.exp
+	* gdb.guile/scm-symtab.exp
+	* gdb.guile/scm-value-cc.exp
+	* gdb.guile/types-module.exp
+	* gdb.linespec/break-ask.exp
+	* gdb.linespec/cpexplicit.exp
+	* gdb.linespec/explicit.exp
+	* gdb.linespec/keywords.exp
+	* gdb.linespec/linespec.exp
+	* gdb.linespec/ls-dollar.exp
+	* gdb.linespec/ls-errs.exp
+	* gdb.linespec/skip-two.exp
+	* gdb.linespec/thread.exp
+	* gdb.mi/mi-async.exp
+	* gdb.mi/mi-basics.exp
+	* gdb.mi/mi-break.exp
+	* gdb.mi/mi-catch-load.exp
+	* gdb.mi/mi-cli.exp
+	* gdb.mi/mi-cmd-param-changed.exp
+	* gdb.mi/mi-console.exp
+	* gdb.mi/mi-detach.exp
+	* gdb.mi/mi-disassemble.exp
+	* gdb.mi/mi-eval.exp
+	* gdb.mi/mi-file-transfer.exp
+	* gdb.mi/mi-file.exp
+	* gdb.mi/mi-fill-memory.exp
+	* gdb.mi/mi-inheritance-syntax-error.exp
+	* gdb.mi/mi-linespec-err-cp.exp
+	* gdb.mi/mi-logging.exp
+	* gdb.mi/mi-memory-changed.exp
+	* gdb.mi/mi-read-memory.exp
+	* gdb.mi/mi-record-changed.exp
+	* gdb.mi/mi-reg-undefined.exp
+	* gdb.mi/mi-regs.exp
+	* gdb.mi/mi-return.exp
+	* gdb.mi/mi-reverse.exp
+	* gdb.mi/mi-simplerun.exp
+	* gdb.mi/mi-solib.exp
+	* gdb.mi/mi-stack.exp
+	* gdb.mi/mi-stepi.exp
+	* gdb.mi/mi-syn-frame.exp
+	* gdb.mi/mi-until.exp
+	* gdb.mi/mi-var-block.exp
+	* gdb.mi/mi-var-child.exp
+	* gdb.mi/mi-var-cmd.exp
+	* gdb.mi/mi-var-cp.exp
+	* gdb.mi/mi-var-display.exp
+	* gdb.mi/mi-var-invalidate.exp
+	* gdb.mi/mi-var-list-children-invalid-grandchild.exp
+	* gdb.mi/mi-vla-fortran.exp
+	* gdb.mi/mi-watch.exp
+	* gdb.mi/mi2-var-child.exp
+	* gdb.mi/user-selected-context-sync.exp
+	* gdb.modula2/unbounded-array.exp
+	* gdb.multi/dummy-frame-restore.exp
+	* gdb.multi/multi-arch-exec.exp
+	* gdb.multi/multi-arch.exp
+	* gdb.multi/tids.exp
+	* gdb.multi/watchpoint-multi.exp
+	* gdb.opencl/callfuncs.exp
+	* gdb.opencl/convs_casts.exp
+	* gdb.opencl/datatypes.exp
+	* gdb.opencl/operators.exp
+	* gdb.opencl/vec_comps.exp
+	* gdb.opt/clobbered-registers-O2.exp
+	* gdb.opt/inline-break.exp
+	* gdb.opt/inline-bt.exp
+	* gdb.opt/inline-cmds.exp
+	* gdb.opt/inline-locals.exp
+	* gdb.pascal/case-insensitive-symbols.exp
+	* gdb.pascal/floats.exp
+	* gdb.pascal/gdb11492.exp
+	* gdb.python/lib-types.exp
+	* gdb.python/py-arch.exp
+	* gdb.python/py-as-string.exp
+	* gdb.python/py-bad-printers.exp
+	* gdb.python/py-block.exp
+	* gdb.python/py-breakpoint-create-fail.exp
+	* gdb.python/py-breakpoint.exp
+	* gdb.python/py-caller-is.exp
+	* gdb.python/py-cmd.exp
+	* gdb.python/py-explore-cc.exp
+	* gdb.python/py-explore.exp
+	* gdb.python/py-finish-breakpoint.exp
+	* gdb.python/py-finish-breakpoint2.exp
+	* gdb.python/py-frame-args.exp
+	* gdb.python/py-frame-inline.exp
+	* gdb.python/py-frame.exp
+	* gdb.python/py-framefilter-mi.exp
+	* gdb.python/py-infthread.exp
+	* gdb.python/py-lazy-string.exp
+	* gdb.python/py-linetable.exp
+	* gdb.python/py-mi-events.exp
+	* gdb.python/py-mi-objfile.exp
+	* gdb.python/py-mi.exp
+	* gdb.python/py-objfile.exp
+	* gdb.python/py-pp-integral.exp
+	* gdb.python/py-pp-maint.exp
+	* gdb.python/py-pp-re-notag.exp
+	* gdb.python/py-pp-registration.exp
+	* gdb.python/py-recurse-unwind.exp
+	* gdb.python/py-strfns.exp
+	* gdb.python/py-symbol.exp
+	* gdb.python/py-symtab.exp
+	* gdb.python/py-sync-interp.exp
+	* gdb.python/py-typeprint.exp
+	* gdb.python/py-unwind-maint.exp
+	* gdb.python/py-unwind.exp
+	* gdb.python/py-value-cc.exp
+	* gdb.python/py-xmethods.exp
+	* gdb.reverse/amd64-tailcall-reverse.exp
+	* gdb.reverse/break-precsave.exp
+	* gdb.reverse/break-reverse.exp
+	* gdb.reverse/consecutive-precsave.exp
+	* gdb.reverse/consecutive-reverse.exp
+	* gdb.reverse/finish-precsave.exp
+	* gdb.reverse/finish-reverse-bkpt.exp
+	* gdb.reverse/finish-reverse.exp
+	* gdb.reverse/fstatat-reverse.exp
+	* gdb.reverse/getresuid-reverse.exp
+	* gdb.reverse/i386-precsave.exp
+	* gdb.reverse/i386-reverse.exp
+	* gdb.reverse/i386-sse-reverse.exp
+	* gdb.reverse/i387-env-reverse.exp
+	* gdb.reverse/i387-stack-reverse.exp
+	* gdb.reverse/insn-reverse.exp
+	* gdb.reverse/machinestate-precsave.exp
+	* gdb.reverse/machinestate.exp
+	* gdb.reverse/next-reverse-bkpt-over-sr.exp
+	* gdb.reverse/pipe-reverse.exp
+	* gdb.reverse/readv-reverse.exp
+	* gdb.reverse/recvmsg-reverse.exp
+	* gdb.reverse/rerun-prec.exp
+	* gdb.reverse/s390-mvcle.exp
+	* gdb.reverse/step-precsave.exp
+	* gdb.reverse/step-reverse.exp
+	* gdb.reverse/time-reverse.exp
+	* gdb.reverse/until-precsave.exp
+	* gdb.reverse/until-reverse.exp
+	* gdb.reverse/waitpid-reverse.exp
+	* gdb.reverse/watch-precsave.exp
+	* gdb.reverse/watch-reverse.exp
+	* gdb.rust/generics.exp
+	* gdb.rust/methods.exp
+	* gdb.rust/modules.exp
+	* gdb.rust/simple.exp
+	* gdb.server/connect-with-no-symbol-file.exp
+	* gdb.server/ext-attach.exp
+	* gdb.server/ext-restart.exp
+	* gdb.server/ext-wrapper.exp
+	* gdb.server/file-transfer.exp
+	* gdb.server/server-exec-info.exp
+	* gdb.server/server-kill.exp
+	* gdb.server/server-mon.exp
+	* gdb.server/wrapper.exp
+	* gdb.stabs/exclfwd.exp
+	* gdb.stabs/gdb11479.exp
+	* gdb.threads/clone-new-thread-event.exp
+	* gdb.threads/corethreads.exp
+	* gdb.threads/current-lwp-dead.exp
+	* gdb.threads/dlopen-libpthread.exp
+	* gdb.threads/gcore-thread.exp
+	* gdb.threads/sigstep-threads.exp
+	* gdb.threads/watchpoint-fork.exp
+	* gdb.trace/actions-changed.exp
+	* gdb.trace/backtrace.exp
+	* gdb.trace/change-loc.exp
+	* gdb.trace/circ.exp
+	* gdb.trace/collection.exp
+	* gdb.trace/disconnected-tracing.exp
+	* gdb.trace/ftrace.exp
+	* gdb.trace/mi-trace-frame-collected.exp
+	* gdb.trace/mi-trace-unavailable.exp
+	* gdb.trace/mi-traceframe-changed.exp
+	* gdb.trace/mi-tsv-changed.exp
+	* gdb.trace/no-attach-trace.exp
+	* gdb.trace/passc-dyn.exp
+	* gdb.trace/qtro.exp
+	* gdb.trace/range-stepping.exp
+	* gdb.trace/read-memory.exp
+	* gdb.trace/save-trace.exp
+	* gdb.trace/signal.exp
+	* gdb.trace/status-stop.exp
+	* gdb.trace/tfile.exp
+	* gdb.trace/trace-break.exp
+	* gdb.trace/trace-buffer-size.exp
+	* gdb.trace/trace-condition.exp
+	* gdb.trace/tracefile-pseudo-reg.exp
+	* gdb.trace/tstatus.exp
+	* gdb.trace/unavailable.exp
+	* gdb.trace/while-dyn.exp
+	* gdb.trace/while-stepping.exp
+
+2016-12-22  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.base/maint.exp: Update tests for maint print symbols, psymbols
+	and msymbols.
+
+2016-12-19  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.gdb/selftest.exp (do_steps_and_nexts): Remove.
+	(test_with_self): Don't call do_steps_and_nexts, and remove
+	code about stepping into xmalloc.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/all-architectures.exp.in: Remove kfail for rx.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/all-architectures.exp.in: Remove kfail for rl78.
+
+2016-12-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/all-architectures-0.exp: New file.
+	* gdb.base/all-architectures-1.exp: New file.
+	* gdb.base/all-architectures-2.exp: New file.
+	* gdb.base/all-architectures-3.exp: New file.
+	* gdb.base/all-architectures-4.exp: New file.
+	* gdb.base/all-architectures-5.exp: New file.
+	* gdb.base/all-architectures-6.exp: New file.
+	* gdb.base/all-architectures-7.exp: New file.
+	* gdb.base/all-architectures.exp.in: New file.
+
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.perf/skip-prologue.exp: Add parameter COMPILE.
+
+2016-12-02  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
+	possible.
+	Remove useless pattern-matching code.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/commands.exp (user_defined_command_manyargs_test): New
+	procedure.
+	(top level): Call it.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/commands.exp (user_defined_command_args_stack_test):
+	New procedure.
+	(top level): Call it.
+
+2016-12-02  Pedro Alves  <palves@redhat.com>
+
+	PR cli/20559
+	* gdb.base/commands.exp (user_defined_command_args_eval): New
+	procedure.
+	(top level): Call it.
+
+2016-12-02  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/ovldbreak.exp (take_gdb_out_of_choice_menu): Restore
+	timeout handling.
+
+2016-12-02  Tom Tromey  <tom@tromey.com>
+
+	* gdb.dwarf2/main-subprogram.c: New file.
+	* gdb.dwarf2/main-subprogram.exp: New file.
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/maint.exp: Remove timeout handling for gdb_test_multiple.
+	* gdb.cp/gdb2495.exp: Likewise and convert gdb_test_multiple into
+	gdb_test_no_output for a couple of cases.
+	* gdb.cp/ovldbreak.exp: Remove timeout handling for gdb_test_multiple.
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names and standardize compilation error messages throughout
+	the following files:
+
+	* gdb.ada/start.exp
+	* gdb.arch/alpha-step.exp
+	* gdb.arch/e500-prologue.exp
+	* gdb.arch/ftrace-insn-reloc.exp
+	* gdb.arch/gdb1291.exp
+	* gdb.arch/gdb1431.exp
+	* gdb.arch/gdb1558.exp
+	* gdb.arch/i386-dr3-watch.exp
+	* gdb.arch/i386-sse-stack-align.exp
+	* gdb.arch/ia64-breakpoint-shadow.exp
+	* gdb.arch/pa-nullify.exp
+	* gdb.arch/powerpc-aix-prologue.exp
+	* gdb.arch/thumb-bx-pc.exp
+	* gdb.base/annota1.exp
+	* gdb.base/annota3.exp
+	* gdb.base/arrayidx.exp
+	* gdb.base/assign.exp
+	* gdb.base/attach.exp
+	* gdb.base/auxv.exp
+	* gdb.base/bang.exp
+	* gdb.base/bfp-test.exp
+	* gdb.base/bigcore.exp
+	* gdb.base/bitfields2.exp
+	* gdb.base/break-fun-addr.exp
+	* gdb.base/break-probes.exp
+	* gdb.base/call-rt-st.exp
+	* gdb.base/callexit.exp
+	* gdb.base/catch-fork-kill.exp
+	* gdb.base/charset.exp
+	* gdb.base/checkpoint.exp
+	* gdb.base/comprdebug.exp
+	* gdb.base/constvars.exp
+	* gdb.base/coredump-filter.exp
+	* gdb.base/cursal.exp
+	* gdb.base/cvexpr.exp
+	* gdb.base/detach.exp
+	* gdb.base/display.exp
+	* gdb.base/dmsym.exp
+	* gdb.base/dprintf-pending.exp
+	* gdb.base/dso2dso.exp
+	* gdb.base/dtrace-probe.exp
+	* gdb.base/dump.exp
+	* gdb.base/enum_cond.exp
+	* gdb.base/exe-lock.exp
+	* gdb.base/exec-invalid-sysroot.exp
+	* gdb.base/execl-update-breakpoints.exp
+	* gdb.base/exprs.exp
+	* gdb.base/fileio.exp
+	* gdb.base/find.exp
+	* gdb.base/finish.exp
+	* gdb.base/fixsection.exp
+	* gdb.base/foll-vfork.exp
+	* gdb.base/frame-args.exp
+	* gdb.base/gcore.exp
+	* gdb.base/gdb1250.exp
+	* gdb.base/global-var-nested-by-dso.exp
+	* gdb.base/gnu-ifunc.exp
+	* gdb.base/hashline1.exp
+	* gdb.base/hashline2.exp
+	* gdb.base/hashline3.exp
+	* gdb.base/hbreak-in-shr-unsupported.exp
+	* gdb.base/huge.exp
+	* gdb.base/infcall-input.exp
+	* gdb.base/info-fun.exp
+	* gdb.base/info-shared.exp
+	* gdb.base/jit-simple.exp
+	* gdb.base/jit-so.exp
+	* gdb.base/jit.exp
+	* gdb.base/jump.exp
+	* gdb.base/label.exp
+	* gdb.base/lineinc.exp
+	* gdb.base/logical.exp
+	* gdb.base/longjmp.exp
+	* gdb.base/macscp.exp
+	* gdb.base/miscexprs.exp
+	* gdb.base/new-ui-echo.exp
+	* gdb.base/new-ui-pending-input.exp
+	* gdb.base/new-ui.exp
+	* gdb.base/nodebug.exp
+	* gdb.base/nofield.exp
+	* gdb.base/offsets.exp
+	* gdb.base/overlays.exp
+	* gdb.base/pending.exp
+	* gdb.base/pointers.exp
+	* gdb.base/pr11022.exp
+	* gdb.base/printcmds.exp
+	* gdb.base/prologue.exp
+	* gdb.base/ptr-typedef.exp
+	* gdb.base/realname-expand.exp
+	* gdb.base/relativedebug.exp
+	* gdb.base/relocate.exp
+	* gdb.base/remote.exp
+	* gdb.base/reread.exp
+	* gdb.base/return2.exp
+	* gdb.base/savedregs.exp
+	* gdb.base/sep.exp
+	* gdb.base/sepdebug.exp
+	* gdb.base/sepsymtab.exp
+	* gdb.base/set-inferior-tty.exp
+	* gdb.base/setshow.exp
+	* gdb.base/shlib-call.exp
+	* gdb.base/sigaltstack.exp
+	* gdb.base/siginfo-addr.exp
+	* gdb.base/signals.exp
+	* gdb.base/signull.exp
+	* gdb.base/sigrepeat.exp
+	* gdb.base/so-impl-ld.exp
+	* gdb.base/solib-display.exp
+	* gdb.base/solib-overlap.exp
+	* gdb.base/solib-search.exp
+	* gdb.base/solib-symbol.exp
+	* gdb.base/structs.exp
+	* gdb.base/structs2.exp
+	* gdb.base/symtab-search-order.exp
+	* gdb.base/twice.exp
+	* gdb.base/unload.exp
+	* gdb.base/varargs.exp
+	* gdb.base/watchpoint-solib.exp
+	* gdb.base/watchpoint.exp
+	* gdb.base/whatis.exp
+	* gdb.base/wrong_frame_bt_full.exp
+	* gdb.btrace/dlopen.exp
+	* gdb.cell/ea-standalone.exp
+	* gdb.cell/ea-test.exp
+	* gdb.cp/dispcxx.exp
+	* gdb.cp/gdb2384.exp
+	* gdb.cp/method2.exp
+	* gdb.cp/nextoverthrow.exp
+	* gdb.cp/pr10728.exp
+	* gdb.disasm/am33.exp
+	* gdb.disasm/h8300s.exp
+	* gdb.disasm/mn10300.exp
+	* gdb.disasm/sh3.exp
+	* gdb.dwarf2/dw2-dir-file-name.exp
+	* gdb.fortran/complex.exp
+	* gdb.fortran/library-module.exp
+	* gdb.guile/scm-pretty-print.exp
+	* gdb.guile/scm-symbol.exp
+	* gdb.guile/scm-type.exp
+	* gdb.guile/scm-value.exp
+	* gdb.linespec/linespec.exp
+	* gdb.mi/gdb701.exp
+	* gdb.mi/gdb792.exp
+	* gdb.mi/mi-breakpoint-changed.exp
+	* gdb.mi/mi-dprintf-pending.exp
+	* gdb.mi/mi-dprintf.exp
+	* gdb.mi/mi-exit-code.exp
+	* gdb.mi/mi-pending.exp
+	* gdb.mi/mi-solib.exp
+	* gdb.mi/new-ui-mi-sync.exp
+	* gdb.mi/pr11022.exp
+	* gdb.mi/user-selected-context-sync.exp
+	* gdb.opt/solib-intra-step.exp
+	* gdb.python/py-events.exp
+	* gdb.python/py-finish-breakpoint.exp
+	* gdb.python/py-mi.exp
+	* gdb.python/py-prettyprint.exp
+	* gdb.python/py-shared.exp
+	* gdb.python/py-symbol.exp
+	* gdb.python/py-template.exp
+	* gdb.python/py-type.exp
+	* gdb.python/py-value.exp
+	* gdb.reverse/solib-precsave.exp
+	* gdb.reverse/solib-reverse.exp
+	* gdb.server/solib-list.exp
+	* gdb.stabs/weird.exp
+	* gdb.threads/reconnect-signal.exp
+	* gdb.threads/stepi-random-signal.exp
+	* gdb.trace/actions.exp
+	* gdb.trace/ax.exp
+	* gdb.trace/backtrace.exp
+	* gdb.trace/change-loc.exp
+	* gdb.trace/deltrace.exp
+	* gdb.trace/ftrace-lock.exp
+	* gdb.trace/ftrace.exp
+	* gdb.trace/infotrace.exp
+	* gdb.trace/mi-tracepoint-changed.exp
+	* gdb.trace/packetlen.exp
+	* gdb.trace/passcount.exp
+	* gdb.trace/pending.exp
+	* gdb.trace/range-stepping.exp
+	* gdb.trace/report.exp
+	* gdb.trace/stap-trace.exp
+	* gdb.trace/tfind.exp
+	* gdb.trace/trace-break.exp
+	* gdb.trace/trace-condition.exp
+	* gdb.trace/trace-enable-disable.exp
+	* gdb.trace/trace-mt.exp
+	* gdb.trace/tracecmd.exp
+	* gdb.trace/tspeed.exp
+	* gdb.trace/tsv.exp
+	* lib/perftest.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.cp/gdb2495.exp: Replace gdb_test_multiple
+	with gdb_test_no_output.
+	Use command as test name.
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout the files.
+
+	* gdb.ada/assign_1.exp
+	* gdb.ada/boolean_expr.exp
+	* gdb.base/arrayidx.exp
+	* gdb.base/del.exp
+	* gdb.base/gcore-buffer-overflow.exp
+	* gdb.base/testenv.exp
+	* gdb.compile/compile.exp
+	* gdb.python/py-framefilter-invalidarg.exp
+	* gdb.python/py-framefilter.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout the files.
+
+	* gdb.ada/array_return.exp
+	* gdb.ada/expr_delims.exp
+	* gdb.ada/mi_dyn_arr.exp
+	* gdb.ada/mi_interface.exp
+	* gdb.ada/mi_var_array.exp
+	* gdb.ada/watch_arg.exp
+	* gdb.arch/alpha-step.exp
+	* gdb.arch/altivec-regs.exp
+	* gdb.arch/e500-regs.exp
+	* gdb.arch/powerpc-d128-regs.exp
+	* gdb.base/arrayidx.exp
+	* gdb.base/break.exp
+	* gdb.base/checkpoint.exp
+	* gdb.base/debug-expr.exp
+	* gdb.base/dmsym.exp
+	* gdb.base/radix.exp
+	* gdb.base/sepdebug.exp
+	* gdb.base/testenv.exp
+	* gdb.base/watch_thread_num.exp
+	* gdb.base/watchpoint-cond-gone.exp
+	* gdb.cell/break.exp
+	* gdb.cell/ea-cache.exp
+	* gdb.compile/compile.exp
+	* gdb.cp/gdb2495.exp
+	* gdb.gdb/selftest.exp
+	* gdb.gdb/xfullpath.exp
+	* gdb.go/hello.exp
+	* gdb.go/integers.exp
+	* gdb.objc/basicclass.exp
+	* gdb.pascal/hello.exp
+	* gdb.pascal/integers.exp
+	* gdb.python/py-breakpoint.exp
+	* gdb.python/py-cmd.exp
+	* gdb.python/py-linetable.exp
+	* gdb.python/py-xmethods.exp
+	* gdb.python/python.exp
+	* gdb.reverse/consecutive-precsave.exp
+	* gdb.reverse/finish-precsave.exp
+	* gdb.reverse/i386-precsave.exp
+	* gdb.reverse/machinestate-precsave.exp
+	* gdb.reverse/sigall-precsave.exp
+	* gdb.reverse/solib-precsave.exp
+	* gdb.reverse/step-precsave.exp
+	* gdb.reverse/until-precsave.exp
+	* gdb.reverse/watch-precsave.exp
+	* gdb.threads/leader-exit.exp
+	* gdb.threads/pthreads.exp
+	* gdb.threads/wp-replication.exp
+	* gdb.trace/actions.exp
+	* gdb.trace/mi-tsv-changed.exp
+	* gdb.trace/tsv.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout the files.
+
+	* gdb.arch/i386-bp_permanent.exp
+	* gdb.arch/i386-gnu-cfi.exp
+	* gdb.base/disasm-end-cu.exp
+	* gdb.base/macscp.exp
+	* gdb.base/pending.exp
+	* gdb.base/watch_thread_num.exp
+	* gdb.cp/exception.exp
+	* gdb.cp/gdb2495.exp
+	* gdb.cp/local.exp
+	* gdb.python/py-evsignal.exp
+	* gdb.python/python.exp
+	* gdb.trace/tracecmd.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout the files.
+
+	* gdb.base/charset.exp
+	* gdb.base/eval.exp
+	* gdb.base/multi-forks.exp
+	* gdb.guile/scm-progspace.exp
+	* gdb.opencl/datatypes.exp
+	* gdb.python/py-block.exp
+	* gdb.python/py-function.exp
+	* gdb.python/py-symbol.exp
+	* gdb.python/py-symtab.exp
+	* gdb.python/py-xmethods.exp
+	* gdb.reverse/break-precsave.exp
+	* gdb.reverse/break-reverse.exp
+	* gdb.reverse/consecutive-precsave.exp
+	* gdb.reverse/consecutive-reverse.exp
+	* gdb.reverse/finish-precsave.exp
+	* gdb.reverse/finish-reverse-bkpt.exp
+	* gdb.reverse/finish-reverse.exp
+	* gdb.reverse/fstatat-reverse.exp
+	* gdb.reverse/getresuid-reverse.exp
+	* gdb.reverse/i386-precsave.exp
+	* gdb.reverse/i386-reverse.exp
+	* gdb.reverse/i386-sse-reverse.exp
+	* gdb.reverse/i387-stack-reverse.exp
+	* gdb.reverse/insn-reverse.exp
+	* gdb.reverse/machinestate-precsave.exp
+	* gdb.reverse/machinestate.exp
+	* gdb.reverse/next-reverse-bkpt-over-sr.exp
+	* gdb.reverse/pipe-reverse.exp
+	* gdb.reverse/readv-reverse.exp
+	* gdb.reverse/recvmsg-reverse.exp
+	* gdb.reverse/rerun-prec.exp
+	* gdb.reverse/s390-mvcle.exp
+	* gdb.reverse/sigall-precsave.exp
+	* gdb.reverse/sigall-reverse.exp
+	* gdb.reverse/solib-precsave.exp
+	* gdb.reverse/solib-reverse.exp
+	* gdb.reverse/step-precsave.exp
+	* gdb.reverse/step-reverse.exp
+	* gdb.reverse/time-reverse.exp
+	* gdb.reverse/until-precsave.exp
+	* gdb.reverse/until-reverse.exp
+	* gdb.reverse/waitpid-reverse.exp
+	* gdb.reverse/watch-precsave.exp
+	* gdb.reverse/watch-reverse.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout the files.
+
+	* gdb.arch/i386-mpx-simple_segv.exp
+	* gdb.arch/i386-mpx.exp
+	* gdb.arch/i386-permbkpt.exp
+	* gdb.arch/pa-nullify.exp
+	* gdb.arch/powerpc-d128-regs.exp
+	* gdb.arch/vsx-regs.exp
+	* gdb.base/bfp-test.exp
+	* gdb.base/break.exp
+	* gdb.base/breakpoint-shadow.exp
+	* gdb.base/callfuncs.exp
+	* gdb.base/charset.exp
+	* gdb.base/commands.exp
+	* gdb.base/completion.exp
+	* gdb.base/dfp-test.exp
+	* gdb.base/echo.exp
+	* gdb.base/ending-run.exp
+	* gdb.base/eval.exp
+	* gdb.base/expand-psymtabs.exp
+	* gdb.base/float128.exp
+	* gdb.base/floatn.exp
+	* gdb.base/foll-exec-mode.exp
+	* gdb.base/gdb1056.exp
+	* gdb.base/gdb11531.exp
+	* gdb.base/kill-after-signal.exp
+	* gdb.base/multi-forks.exp
+	* gdb.base/overlays.exp
+	* gdb.base/pending.exp
+	* gdb.base/sepdebug.exp
+	* gdb.base/testenv.exp
+	* gdb.base/valgrind-db-attach.exp
+	* gdb.base/watch_thread_num.exp
+	* gdb.base/watchpoint-cond-gone.exp
+	* gdb.base/watchpoint.exp
+	* gdb.base/watchpoints.exp
+	* gdb.cp/arg-reference.exp
+	* gdb.cp/baseenum.exp
+	* gdb.cp/operator.exp
+	* gdb.cp/shadow.exp
+	* gdb.dwarf2/dw2-op-out-param.exp
+	* gdb.dwarf2/dw2-reg-undefined.exp
+	* gdb.go/chan.exp
+	* gdb.go/hello.exp
+	* gdb.go/integers.exp
+	* gdb.go/methods.exp
+	* gdb.go/package.exp
+	* gdb.guile/scm-parameter.exp
+	* gdb.guile/scm-progspace.exp
+	* gdb.guile/scm-value.exp
+	* gdb.mi/mi-pending.exp
+	* gdb.mi/user-selected-context-sync.exp
+	* gdb.multi/multi-attach.exp
+	* gdb.multi/tids.exp
+	* gdb.opt/clobbered-registers-O2.exp
+	* gdb.pascal/floats.exp
+	* gdb.pascal/integers.exp
+	* gdb.python/py-block.exp
+	* gdb.python/py-events.exp
+	* gdb.python/py-parameter.exp
+	* gdb.python/py-symbol.exp
+	* gdb.python/py-symtab.exp
+	* gdb.python/py-type.exp
+	* gdb.python/py-value.exp
+	* gdb.python/py-xmethods.exp
+	* gdb.python/python.exp
+	* gdb.reverse/break-precsave.exp
+	* gdb.reverse/consecutive-precsave.exp
+	* gdb.reverse/finish-precsave.exp
+	* gdb.reverse/i386-precsave.exp
+	* gdb.reverse/machinestate-precsave.exp
+	* gdb.reverse/sigall-precsave.exp
+	* gdb.reverse/solib-precsave.exp
+	* gdb.reverse/step-precsave.exp
+	* gdb.reverse/until-precsave.exp
+	* gdb.reverse/watch-precsave.exp
+	* gdb.server/ext-attach.exp
+	* gdb.server/ext-restart.exp
+	* gdb.server/ext-run.exp
+	* gdb.server/ext-wrapper.exp
+	* gdb.stabs/gdb11479.exp
+	* gdb.stabs/weird.exp
+	* gdb.threads/attach-many-short-lived-threads.exp
+	* gdb.threads/kill.exp
+	* gdb.threads/watchpoint-fork.exp
+
+2016-12-01  Luis Machado  <lgustavo@codesourcery.com>
+
+	Fix test names starting with uppercase throughout all the files below.
+
+	* gdb.ada/array_return.exp
+	* gdb.ada/catch_ex.exp
+	* gdb.ada/info_exc.exp
+	* gdb.ada/mi_catch_ex.exp
+	* gdb.ada/mi_dyn_arr.exp
+	* gdb.ada/mi_ex_cond.exp
+	* gdb.ada/mi_exc_info.exp
+	* gdb.ada/mi_interface.exp
+	* gdb.ada/mi_task_arg.exp
+	* gdb.ada/mi_task_info.exp
+	* gdb.ada/mi_var_array.exp
+	* gdb.arch/alpha-step.exp
+	* gdb.arch/amd64-disp-step.exp
+	* gdb.arch/arm-disp-step.exp
+	* gdb.arch/disp-step-insn-reloc.exp
+	* gdb.arch/e500-prologue.exp
+	* gdb.arch/ftrace-insn-reloc.exp
+	* gdb.arch/gdb1558.exp
+	* gdb.arch/i386-bp_permanent.exp
+	* gdb.arch/i386-disp-step.exp
+	* gdb.arch/i386-float.exp
+	* gdb.arch/i386-gnu-cfi.exp
+	* gdb.arch/ia64-breakpoint-shadow.exp
+	* gdb.arch/mips16-thunks.exp
+	* gdb.arch/pa-nullify.exp
+	* gdb.arch/powerpc-aix-prologue.exp
+	* gdb.arch/powerpc-power.exp
+	* gdb.arch/ppc-dfp.exp
+	* gdb.arch/s390-tdbregs.exp
+	* gdb.arch/spu-info.exp
+	* gdb.arch/spu-ls.exp
+	* gdb.arch/thumb-bx-pc.exp
+	* gdb.base/advance.exp
+	* gdb.base/annota-input-while-running.exp
+	* gdb.base/arrayidx.exp
+	* gdb.base/asmlabel.exp
+	* gdb.base/async.exp
+	* gdb.base/attach-wait-input.exp
+	* gdb.base/auto-connect-native-target.exp
+	* gdb.base/batch-preserve-term-settings.exp
+	* gdb.base/bfp-test.exp
+	* gdb.base/bigcore.exp
+	* gdb.base/bp-permanent.exp
+	* gdb.base/break-always.exp
+	* gdb.base/break-fun-addr.exp
+	* gdb.base/break-idempotent.exp
+	* gdb.base/break-main-file-remove-fail.exp
+	* gdb.base/break-probes.exp
+	* gdb.base/break-unload-file.exp
+	* gdb.base/break.exp
+	* gdb.base/call-ar-st.exp
+	* gdb.base/call-rt-st.exp
+	* gdb.base/call-sc.exp
+	* gdb.base/call-signal-resume.exp
+	* gdb.base/call-strs.exp
+	* gdb.base/callexit.exp
+	* gdb.base/callfuncs.exp
+	* gdb.base/catch-gdb-caused-signals.exp
+	* gdb.base/catch-signal-siginfo-cond.exp
+	* gdb.base/catch-syscall.exp
+	* gdb.base/compare-sections.exp
+	* gdb.base/cond-eval-mode.exp
+	* gdb.base/condbreak-call-false.exp
+	* gdb.base/consecutive-step-over.exp
+	* gdb.base/cursal.exp
+	* gdb.base/disabled-location.exp
+	* gdb.base/disasm-end-cu.exp
+	* gdb.base/display.exp
+	* gdb.base/double-prompt-target-event-error.exp
+	* gdb.base/dprintf-bp-same-addr.exp
+	* gdb.base/dprintf-detach.exp
+	* gdb.base/dprintf-next.exp
+	* gdb.base/dprintf-non-stop.exp
+	* gdb.base/dprintf-pending.exp
+	* gdb.base/dso2dso.exp
+	* gdb.base/ending-run.exp
+	* gdb.base/enum_cond.exp
+	* gdb.base/examine-backward.exp
+	* gdb.base/exe-lock.exp
+	* gdb.base/exec-invalid-sysroot.exp
+	* gdb.base/execl-update-breakpoints.exp
+	* gdb.base/execution-termios.exp
+	* gdb.base/fileio.exp
+	* gdb.base/fixsection.exp
+	* gdb.base/foll-exec-mode.exp
+	* gdb.base/foll-exec.exp
+	* gdb.base/fork-running-state.exp
+	* gdb.base/frame-args.exp
+	* gdb.base/fullpath-expand.exp
+	* gdb.base/func-ptr.exp
+	* gdb.base/gcore-relro-pie.exp
+	* gdb.base/gdb1090.exp
+	* gdb.base/gdb1555.exp
+	* gdb.base/global-var-nested-by-dso.exp
+	* gdb.base/gnu-ifunc.exp
+	* gdb.base/hbreak-in-shr-unsupported.exp
+	* gdb.base/hbreak-unmapped.exp
+	* gdb.base/hook-stop.exp
+	* gdb.base/infcall-input.exp
+	* gdb.base/info-fun.exp
+	* gdb.base/info-shared.exp
+	* gdb.base/interrupt-noterm.exp
+	* gdb.base/jit-so.exp
+	* gdb.base/jit.exp
+	* gdb.base/line-symtabs.exp
+	* gdb.base/list.exp
+	* gdb.base/longjmp.exp
+	* gdb.base/macscp.exp
+	* gdb.base/max-value-size.exp
+	* gdb.base/nodebug.exp
+	* gdb.base/nofield.exp
+	* gdb.base/overlays.exp
+	* gdb.base/paginate-after-ctrl-c-running.exp
+	* gdb.base/paginate-bg-execution.exp
+	* gdb.base/paginate-inferior-exit.exp
+	* gdb.base/pending.exp
+	* gdb.base/pr11022.exp
+	* gdb.base/printcmds.exp
+	* gdb.base/ptr-typedef.exp
+	* gdb.base/ptype.exp
+	* gdb.base/randomize.exp
+	* gdb.base/range-stepping.exp
+	* gdb.base/realname-expand.exp
+	* gdb.base/relativedebug.exp
+	* gdb.base/remote.exp
+	* gdb.base/savedregs.exp
+	* gdb.base/sepdebug.exp
+	* gdb.base/set-noassign.exp
+	* gdb.base/shlib-call.exp
+	* gdb.base/shreloc.exp
+	* gdb.base/sigaltstack.exp
+	* gdb.base/sigbpt.exp
+	* gdb.base/siginfo-addr.exp
+	* gdb.base/siginfo-obj.exp
+	* gdb.base/siginfo-thread.exp
+	* gdb.base/signest.exp
+	* gdb.base/signull.exp
+	* gdb.base/sigrepeat.exp
+	* gdb.base/skip.exp
+	* gdb.base/so-impl-ld.exp
+	* gdb.base/solib-corrupted.exp
+	* gdb.base/solib-disc.exp
+	* gdb.base/solib-display.exp
+	* gdb.base/solib-overlap.exp
+	* gdb.base/solib-search.exp
+	* gdb.base/solib-symbol.exp
+	* gdb.base/source-execution.exp
+	* gdb.base/sss-bp-on-user-bp-2.exp
+	* gdb.base/sss-bp-on-user-bp.exp
+	* gdb.base/stack-checking.exp
+	* gdb.base/stale-infcall.exp
+	* gdb.base/step-break.exp
+	* gdb.base/step-line.exp
+	* gdb.base/step-over-exit.exp
+	* gdb.base/step-test.exp
+	* gdb.base/structs.exp
+	* gdb.base/sym-file.exp
+	* gdb.base/symtab-search-order.exp
+	* gdb.base/term.exp
+	* gdb.base/type-opaque.exp
+	* gdb.base/unload.exp
+	* gdb.base/until-nodebug.exp
+	* gdb.base/until.exp
+	* gdb.base/unwindonsignal.exp
+	* gdb.base/watch-cond.exp
+	* gdb.base/watch-non-mem.exp
+	* gdb.base/watch_thread_num.exp
+	* gdb.base/watchpoint-reuse-slot.exp
+	* gdb.base/watchpoint-solib.exp
+	* gdb.base/watchpoint.exp
+	* gdb.btrace/dlopen.exp
+	* gdb.cell/arch.exp
+	* gdb.cell/break.exp
+	* gdb.cell/bt.exp
+	* gdb.cell/core.exp
+	* gdb.cell/data.exp
+	* gdb.cell/dwarfaddr.exp
+	* gdb.cell/ea-cache.exp
+	* gdb.cell/ea-standalone.exp
+	* gdb.cell/ea-test.exp
+	* gdb.cell/f-regs.exp
+	* gdb.cell/fork.exp
+	* gdb.cell/gcore.exp
+	* gdb.cell/mem-access.exp
+	* gdb.cell/ptype.exp
+	* gdb.cell/registers.exp
+	* gdb.cell/sizeof.exp
+	* gdb.cell/solib-symbol.exp
+	* gdb.cell/solib.exp
+	* gdb.compile/compile-tls.exp
+	* gdb.cp/exception.exp
+	* gdb.cp/gdb2495.exp
+	* gdb.cp/local.exp
+	* gdb.cp/mb-inline.exp
+	* gdb.cp/mb-templates.exp
+	* gdb.cp/pr10687.exp
+	* gdb.cp/pr9167.exp
+	* gdb.cp/scope-err.exp
+	* gdb.cp/templates.exp
+	* gdb.cp/virtfunc.exp
+	* gdb.dwarf2/dw2-dir-file-name.exp
+	* gdb.dwarf2/dw2-single-line-discriminators.exp
+	* gdb.fortran/complex.exp
+	* gdb.fortran/library-module.exp
+	* gdb.guile/guile.exp
+	* gdb.guile/scm-cmd.exp
+	* gdb.guile/scm-frame-inline.exp
+	* gdb.guile/scm-objfile.exp
+	* gdb.guile/scm-pretty-print.exp
+	* gdb.guile/scm-symbol.exp
+	* gdb.guile/scm-type.exp
+	* gdb.guile/scm-value.exp
+	* gdb.linespec/keywords.exp
+	* gdb.linespec/ls-errs.exp
+	* gdb.linespec/macro-relative.exp
+	* gdb.linespec/thread.exp
+	* gdb.mi/mi-breakpoint-changed.exp
+	* gdb.mi/mi-dprintf-pending.exp
+	* gdb.mi/mi-fullname-deleted.exp
+	* gdb.mi/mi-logging.exp
+	* gdb.mi/mi-pending.exp
+	* gdb.mi/mi-solib.exp
+	* gdb.mi/new-ui-mi-sync.exp
+	* gdb.mi/user-selected-context-sync.exp
+	* gdb.multi/dummy-frame-restore.exp
+	* gdb.multi/multi-arch-exec.exp
+	* gdb.multi/remove-inferiors.exp
+	* gdb.multi/watchpoint-multi-exit.exp
+	* gdb.opt/solib-intra-step.exp
+	* gdb.perf/backtrace.exp
+	* gdb.perf/single-step.exp
+	* gdb.perf/skip-command.exp
+	* gdb.perf/skip-prologue.exp
+	* gdb.perf/solib.exp
+	* gdb.python/lib-types.exp
+	* gdb.python/py-as-string.exp
+	* gdb.python/py-bad-printers.exp
+	* gdb.python/py-block.exp
+	* gdb.python/py-breakpoint.exp
+	* gdb.python/py-cmd.exp
+	* gdb.python/py-events.exp
+	* gdb.python/py-evthreads.exp
+	* gdb.python/py-finish-breakpoint.exp
+	* gdb.python/py-finish-breakpoint2.exp
+	* gdb.python/py-frame-inline.exp
+	* gdb.python/py-frame.exp
+	* gdb.python/py-inferior.exp
+	* gdb.python/py-infthread.exp
+	* gdb.python/py-mi.exp
+	* gdb.python/py-objfile.exp
+	* gdb.python/py-pp-maint.exp
+	* gdb.python/py-pp-registration.exp
+	* gdb.python/py-prettyprint.exp
+	* gdb.python/py-recurse-unwind.exp
+	* gdb.python/py-shared.exp
+	* gdb.python/py-symbol.exp
+	* gdb.python/py-symtab.exp
+	* gdb.python/py-template.exp
+	* gdb.python/py-type.exp
+	* gdb.python/py-unwind-maint.exp
+	* gdb.python/py-unwind.exp
+	* gdb.python/py-value.exp
+	* gdb.python/python.exp
+	* gdb.reverse/finish-reverse-bkpt.exp
+	* gdb.reverse/insn-reverse.exp
+	* gdb.reverse/next-reverse-bkpt-over-sr.exp
+	* gdb.reverse/solib-precsave.exp
+	* gdb.reverse/solib-reverse.exp
+	* gdb.stabs/gdb11479.exp
+	* gdb.stabs/weird.exp
+	* gdb.threads/fork-child-threads.exp
+	* gdb.threads/fork-plus-threads.exp
+	* gdb.threads/fork-thread-pending.exp
+	* gdb.threads/forking-threads-plus-breakpoint.exp
+	* gdb.threads/hand-call-in-threads.exp
+	* gdb.threads/interrupted-hand-call.exp
+	* gdb.threads/linux-dp.exp
+	* gdb.threads/local-watch-wrong-thread.exp
+	* gdb.threads/next-while-other-thread-longjmps.exp
+	* gdb.threads/non-ldr-exit.exp
+	* gdb.threads/pending-step.exp
+	* gdb.threads/print-threads.exp
+	* gdb.threads/process-dies-while-detaching.exp
+	* gdb.threads/process-dies-while-handling-bp.exp
+	* gdb.threads/pthreads.exp
+	* gdb.threads/queue-signal.exp
+	* gdb.threads/reconnect-signal.exp
+	* gdb.threads/signal-command-handle-nopass.exp
+	* gdb.threads/signal-command-multiple-signals-pending.exp
+	* gdb.threads/signal-delivered-right-thread.exp
+	* gdb.threads/signal-sigtrap.exp
+	* gdb.threads/sigthread.exp
+	* gdb.threads/staticthreads.exp
+	* gdb.threads/stepi-random-signal.exp
+	* gdb.threads/thread-unwindonsignal.exp
+	* gdb.threads/thread_check.exp
+	* gdb.threads/thread_events.exp
+	* gdb.threads/tid-reuse.exp
+	* gdb.threads/tls-nodebug.exp
+	* gdb.threads/tls-shared.exp
+	* gdb.threads/tls-so_extern.exp
+	* gdb.threads/tls.exp
+	* gdb.threads/wp-replication.exp
+	* gdb.trace/actions-changed.exp
+	* gdb.trace/actions.exp
+	* gdb.trace/backtrace.exp
+	* gdb.trace/change-loc.exp
+	* gdb.trace/collection.exp
+	* gdb.trace/deltrace.exp
+	* gdb.trace/disconnected-tracing.exp
+	* gdb.trace/entry-values.exp
+	* gdb.trace/ftrace-lock.exp
+	* gdb.trace/ftrace.exp
+	* gdb.trace/infotrace.exp
+	* gdb.trace/mi-trace-frame-collected.exp
+	* gdb.trace/mi-trace-unavailable.exp
+	* gdb.trace/mi-traceframe-changed.exp
+	* gdb.trace/mi-tracepoint-changed.exp
+	* gdb.trace/mi-tsv-changed.exp
+	* gdb.trace/no-attach-trace.exp
+	* gdb.trace/packetlen.exp
+	* gdb.trace/passc-dyn.exp
+	* gdb.trace/passcount.exp
+	* gdb.trace/pending.exp
+	* gdb.trace/pr16508.exp
+	* gdb.trace/qtro.exp
+	* gdb.trace/range-stepping.exp
+	* gdb.trace/read-memory.exp
+	* gdb.trace/report.exp
+	* gdb.trace/save-trace.exp
+	* gdb.trace/signal.exp
+	* gdb.trace/stap-trace.exp
+	* gdb.trace/status-stop.exp
+	* gdb.trace/strace.exp
+	* gdb.trace/tfile.exp
+	* gdb.trace/tfind.exp
+	* gdb.trace/trace-break.exp
+	* gdb.trace/trace-condition.exp
+	* gdb.trace/trace-enable-disable.exp
+	* gdb.trace/trace-mt.exp
+	* gdb.trace/tracecmd.exp
+	* gdb.trace/tracefile-pseudo-reg.exp
+	* gdb.trace/tspeed.exp
+	* gdb.trace/tstatus.exp
+	* gdb.trace/tsv.exp
+	* gdb.trace/unavailable.exp
+	* gdb.trace/while-dyn.exp
+	* gdb.trace/while-stepping.exp
+	* lib/gdb-guile.exp
+	* lib/gdb.exp
+	* lib/mi-support.exp
+	* lib/pascal.exp
+	* lib/perftest.exp
+	* lib/prelink-support.exp
+	* lib/selftest-support.exp
+
+2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Include disable-implicit-rules.mk.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.dwarf2/nonvar-access.exp: Add a test for accessing
+	non-byte-aligned bit fields.
+
+2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	PR gdb/12616
+	* gdb.dwarf2/nonvar-access.exp: New testcase.  Check that GDB
+	respects the DW_AT_data_bit_offset attribute.
+
+2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.base/default.exp: Fix output of "set language".
+
+2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
+	prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
+	make.
+	* configure.ac: Remove checks for the make program.
+	* configure: Re-generate.
+
+2016-11-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.python/py-recurse-unwind.c (main): Add loop.
+	* gdb.python/py-recurse-unwind.py (TestUnwinder): Add calls
+	to read_register() and gdb.parse_and_eval().  Make each code
+	call a separate case that can be individually tested.
+	* gdb.python/py-recurse-unwind.exp (cont_and_backtrace): New
+	proc. Call cont_and_backtrace for each of the code paths that
+	we want to test in the unwinder.
+
+2016-11-15  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.dwarf2/bitfield-parent-optimized-out.exp: Fix DWARF code for
+	the definition of struct S.
+
+2016-11-11  Catherine Moore  <clm@codesourcery.com>
+
+	* gdb.base/dump.exp: Identify verilog format dump tests as such.
+
+2016-11-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/commands.exp (runto_or_return): New procedure.
+	(gdbvar_simple_if_test, gdbvar_simple_while_test)
+	(gdbvar_complex_if_while_test, progvar_simple_if_test)
+	(progvar_simple_while_test, progvar_complex_if_while_test)
+	(if_while_breakpoint_command_test)
+	(infrun_breakpoint_command_test, breakpoint_command_test)
+	(user_defined_command_test, watchpoint_command_test)
+	(test_command_prompt_position, redefine_hook_test)
+	(stray_arg0_test, error_clears_commands_left, redefine_hook_test)
+	(redefine_backtrace_test): Use runto_or_return, $valnum_re,
+	multi_line_input and multi_line.  Remove gdb_expect and
+	gdb_stop_suppressing_tests uses.
+	* lib/gdb.exp (valnum_re): New global.
+	(multi_line_input): New procedure.
+
+2016-11-09  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.mi/user-selected-context-sync.exp (with_test_prefix_procname):
+	Remove.
+	(test_setup): Define with proc_with_prefix.
+	(test_cli_inferior): Likewise.
+	(test_cli_thread): Likewise.
+	(test_cli_frame): Likewise.
+	(test_cli_select_frame): Likewise.
+	(test_cli_up_down): Likewise.
+	(test_mi_thread_select): Likewise.
+	(test_mi_stack_select_frame): Likewise.
+	(test_cli_in_mi_inferior): Likewise.
+	(test_cli_in_mi_thread): Likewise.
+	(test_cli_in_mi_frame): Likewise.
+	(top level): Do not use with_test_prefix_procname.
+
+2016-11-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/commands.exp (gdbvar_simple_if_test)
+	(gdbvar_simple_while_test, gdbvar_complex_if_while_test)
+	(progvar_simple_if_test, progvar_simple_while_test)
+	(progvar_complex_if_while_test, if_while_breakpoint_command_test)
+	(infrun_breakpoint_command_test, breakpoint_command_test)
+	(user_defined_command_test, watchpoint_command_test)
+	(test_command_prompt_position, deprecated_command_test)
+	(bp_deleted_in_command, temporary_breakpoint_commands)
+	(stray_arg0_test, source_file_with_indented_comment)
+	(recursive_source_test, if_commands_test)
+	(error_clears_commands_left, redefine_hook_test)
+	(redefine_backtrace_test): Use proc_with_prefix.
+	* lib/gdb.exp (proc_with_prefix): New proc.
+
+2016-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.base/tui-layout.c: New file.
+	* gdb.base/tui-layout.exp: Use tui-layout.c, to ensure that the
+	disassembly window contains very long lines.
+
+2016-11-08  Tom Tromey  <tom@tromey.com>
+
+	* gdb.python/py-value.exp (test_value_creation): Make "long" test
+	depend on Python 2.
+
+2016-11-08  Tom Tromey  <tom@tromey.com>
+
+	* gdb.python/py-framefilter.py (ElidingFrameDecorator.address):
+	New method.
+
+2016-10-29  Manish Goregaokar  <manish@mozilla.com>
+
+	* gdb.rust/simple.exp: Add tests for `sizeof(expr)`.
+
+2016-10-27  Manish Goregaokar  <manish@mozilla.com>
+
+	* gdb.rust/simple.rs: Add test for univariant enums without
+	discriminants and for encoded struct-like enums.
+
+2016-10-28  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/maint.exp <maint info line-table w/o a file name>: Use
+	gdb_test_multiple, tighten regexps and match symtabs and line
+	tables incrementally.
+
+2016-10-28  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/foll-exec.exp (do_exec_tests): Make test pattern more
+	general.
+
+2016-10-25  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/exec-invalid-sysroot.exp: New file.
+
+2016-10-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first.
+
+2016-10-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
+
+2016-10-19  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* gdb.base/killed-outside.exp: Remove $options from a call to
+	`prepare_for_testing'.
+
+2016-10-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/mi-trace-save.exp (test_trace_save_wrong_num_args):
+	Change test message.
+
+2016-10-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/mi-trace-save.exp (test_trace_save_wrong_num_args):
+	Update comment.
+
+2016-10-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/mi-trace-save.exp: New file.
+
+2016-10-13  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/code_elim.exp (get_var_address): Remove.
+	* gdb.base/relocate.exp: Likewise.
+	* gdb.base/shreloc.exp: Likewise.
+	* lib/gdb.exp (get_var_address): New.
+
+2016-10-13  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/structs.exp: Invoke gdb_skip_float_test, and do
+	floating point tests if $skip_float_test is false.
+
+2016-10-12  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.python/py-value.c (main): Check if argv is NULL before using it.
+	* gdb.python/py-value.exp (test_value_in_inferior): Don't use hardcoded
+	argc values.
+	Add 1 to argc so we guarantee distinct initial/modified argc values.
+
+2016-10-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/powerpc-prologue.c (optimized_1): New declaration.
+
+2016-10-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/powerpc-prologue.exp: Use standard_output_file
+	* gdb.arch/ppc64-symtab-cordic.exp: Likewise.
+	* gdb.arch/vsx-regs.exp: Likewise.
+
+2016-10-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.xml/tdesc-regs.exp: Set regdir to "arm/".
+
+2016-10-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.python/python.exp: Test decode_line("*0").
+
+2016-10-06  Doug Evans  <dje@google.com>
+
+	* gdb.python/py-value.exp (test_value_creation): Add test for large
+	unsigned 64-bit value.
+
+2016-10-06  Tom Tromey  <tom@tromey.com>
+
+	* gdb.compile/compile.exp: Change java tests to rust.
+	* gdb.base/setshow.exp: Change java tests to rust.
+	* gdb.base/default.exp: Remove java from language list.
+	* README (Examples): Update language example.
+	* gdb.python/py-lookup-type.exp (test_lookup_type): Remove java
+	test.
+	* lib/gdb.exp (skip_java_tests): Remove.
+	* lib/java.exp: Remove.
+	* gdb.java: Remove.
+
+2016-10-06  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* gdb.arch/mips-fcr.exp: New test.
+	* gdb.arch/mips-fcr.c: Source for the new test.
+
+2016-10-06  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* gdb.base/solib-disc.exp: Use `standard_output_file'
+	throughout.
+
+2016-10-06  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/jit-simple-dl.c: New file.
+	* gdb.base/jit-simple-jit.c: New file, factored out from ...
+	* gdb.base/jit-simple.c: ... this.
+	* gdb.base/jit-simple.exp (jit_run): Delete.
+	(build_jit): New proc.
+	(jit_test_reread): Recompile either the main program or the shared
+	library, depending on what is being tested.  Skip changing address
+	if caller wants to.  Compare before/after addresses.  If testing
+	standalone, explicitly load the binary.  Test "maint info
+	breakpoints".
+	(top level): Add "standalone vs shared lib" and "change address"
+	vs "same address" axes.
+
+2016-10-06  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/jit-simple.exp (top level) Delete get_compiler_info
+	call.
+	(jit_run): Delete.
+	(jit_test_reread): Use with_test_prefix.  Reload the main binary
+	explicitly.  Compare the before/after addresses of the JIT
+	descriptor.
+
+2016-08-15  Doug Evans  <dje@google.com>
+
+	* gdb.xml/extra-regs.xml: Update, end field now required, default type
+	for single bitfields is bool.
+	* gdb.xml/tdesc-regs.exp: Ditto.
+
+2016-10-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
+
+2016-10-05  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdb.exp (support_complex_tests): Return zero if
+	gdb_skip_float_test return true.
+
+2016-10-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20487
+	* gdb.mi/user-selected-context-sync.exp: New file.
+	* gdb.mi/user-selected-context-sync.c: New file.
+
+2016-10-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20487
+	* gdb.mi/mi-pthreads.exp (check_mi_thread_command_set): Adapt
+	=thread-select-event check.
+
+2016-09-29  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* gdb.arch/powerpc-power.exp <cmprb>: Update tests to account for
+	the compulsory L operand changes.
+	* gdb.arch/powerpc-power.s: Likewise.
+
+2016-09-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR gdb/20609 - attach of JIT-debug-enabled inf 7.11.1 regression
+	* gdb.base/jit-attach-pie.c: New file.
+	* gdb.base/jit-attach-pie.exp: New file.
+
+2016-09-28  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/infcall-input.c: New file.
+	* gdb.base/infcall-input.exp: New file.
+
+2016-09-22  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdbserver-support.exp: Rename mi_gdb_exit.
+	(gdb_exit): Rename it to ...
+	(gdbserver_gdb_exit): ...  Close GDBserver.
+	(gdb_exit): New proc, call gdbserver_gdb_exit.
+	(mi_gdb_exit): Likewise.
+
+2016-09-22  Yao Qi  <yao.qi@linaro.org>
+
+	* boards/gdbserver-base.exp (gdb_server_prog): Set the absolute
+	path.
+	* boards/remote-gdbserver-on-localhost.exp: Use gdbserver-base.
+	Remove duplication.
+
+2016-09-22  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdbserver-support.exp: Check the existence of
+	gdbserver_orig_gdb_exit rather than gdbserver_gdb_exit.
+
+2016-09-21  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* gdb.xml/tdesc-regs.exp: set core-regs for arc*-*-elf32.
+
+2016-09-21  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/20604:
+	* gdb.base/quit.exp: New file.
+
+2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* .gitignore: New file.
+
+2016-09-21  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* gdb.arch/mips16-thunks.exp: Use `standard_output_file'
+	throughout.
+
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* lib/gdb.exp: No longer skip hardware breakpoint tests on s390.
+
+2016-09-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.cp/casts.cc (decltype): Move it ...
+	(main): ... with its call to ...
+	* gdb.cp/casts03.cc: ... a new file.
+	* gdb.cp/casts.exp: Add new file casts03.cc, move decltype test to it.
+
+2016-09-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.cp/m-static.h (gnu_obj_4::somewhere): Use constexpr for C++11.
+
+2016-09-15  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* gdb.arch/powerpc-power.s: Update Power9 instruction tests
+	and sync up the test with tests in gas/testsuite/gas/ppc.
+	* gdb.arch/powerpc-power.exp: Likewise.
+
+2016-09-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* lib/future.exp: Set CCACHE_DISABLE, clear CCACHE_NODISABLE.
+
+2016-09-11  Sergio Durigan Junior  <sergiodj@redhat.com>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to
+	make m1's definition to be different from m2's.  Use 'dummy' as an
+	argument for probe 'two'.
+
+2016-09-10  Jon Beniston  <jon@beniston.com>
+
+	* lib/mi-support.exp (mi_gdb_target_load): Use target_sim_options
+	for sim target.
+
+2016-09-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.base/gnu-ifunc-lib.c (resolver_hwcap): New external
+	variable declaration.
+	(gnu_ifunc): Add parameter hwcap.  Store it in resolver_hwcap.
+	* gdb.base/gnu-ifunc.c (resolver_hwcap): New global variable.
+	* gdb.base/gnu-ifunc.exp: Add test to verify that the resolver
+	received HWCAP as its argument.
+
+2016-09-06  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/new-ui-pending-input.c: New file.
+	* gdb.base/new-ui-pending-input.exp: New file.
+	* gdb.exp (clear_gdb_spawn_id): New procedure.
+	(with_spawn_id): Check whether gdb_spawn_id exists before
+	referencing it.  If gdb_spawn_id didn't exist on entry, clear it
+	on exit.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdb.base/float128.c: New file.
+	* gdb.base/float128.exp: Likewise.
+	* gdb.base/floatn.c: Likewise.
+	* gdb.base/floatn.exp: Likewise.
+
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* gdb.cp/hang.exp: Remove reference to TYPE_FLAG_STUB in comment.
+
+2016-09-05  Pedro Alves  <palves@redhat.com>
+
+	PR backtrace/19927
+	* gdb.python/py-unwind-maint.exp: Adjust tests to not expect that
+	unwinders are immediately called as side effect of "source" or
+	"disable unwinder" commands.
+	* gdb.python/py-recurse-unwind.exp: Remove setup_kfail calls.
+
+2016-09-02  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/return-nodebug.exp: Skip the test if	skip_float_test
+	is true and $type is "float" or "double".
+
+2016-09-02  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-neon.exp: Skip it if gdb_skip_float_test returns
+	true.
+	* gdb.base/call-ar-st.exp: Invoke gdb_skip_float_test.
+	* gdb.base/call-rt-st.exp: Likewise.
+	* gdb.base/call-sc.exp: Invoke gdb_skip_float_test and use its
+	return value instead of gdb,skip_float_test.
+	* gdb.base/callfuncs.exp: Invoke gdb_skip_float_test.
+	(do_function_calls): Use its return value instead of
+	gdb,skip_float_test.
+	* gdb.base/finish.exp: Likewise.
+	* gdb.base/funcargs.exp: Likewise.
+	* gdb.base/return.exp: Likewise.
+	* gdb.base/return2.exp: Likewise.
+	* gdb.base/varargs.exp: Likewise.
+	* lib/gdb.exp (gdb_skip_float_test): Change it to
+	gdb_caching_proc.  Detect the broken ptrace on arm-linux.
+
+2016-08-30  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.multi/tids.exp: Test "thread apply all".
+
+2016-08-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/default.exp (tty): Remove.
+
+2016-08-24  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.python/py-recurse-unwind.c: New file.
+	* gdb.python/py-recurse-unwind.py: New file.
+	* gdb.python/py-recurse-unwind.exp: New file.
+
+2016-08-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/set-inferior-tty.exp: New file.
+	* gdb.base/set-inferior-tty.c: New file.
+
+2016-08-23  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20494
+	* gdb.base/new-ui-echo.c: New file.
+	* gdb.base/new-ui-echo.exp: New file.
+
+2016-08-23  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.server/connect-stopped-target.exp (do_test): Pass "" to
+	gdbserver_spawn.
+	* gdb.server/connect-without-multi-process.exp (do_test):
+	Likewise.
+
+2016-08-23  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/signals-state-child.exp: Set variables gdb_txt and
+	standalone_txt.  Delete gdb_txt and standalone_txt on host
+	and target.  Spawn the binary on target.  Copy files from
+	target to host.
+
+2016-08-22  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/20505
+	* gdb.base/vdso-warning.exp: Test core dumps too.  Use
+	with_test_prefix.  Factor out bits to ...
+	(test_no_vdso): ... this new procedure.
+
+2016-08-19  Carl Love  <cel@us.ibm.com>
+
+	* gdb.arch/altivec-regs.exp: Use standard_testfile instead of
+	maintaining separate logic for constructing the output path.
+	* gdb.arch/powerpc-d128-regs.exp: Likewise.
+	* gdb.arch/ppc-dfp.exp: Likewise.
+	* gdb.arch/ppc-fp.exp: Likewise.
+	* gdb.arch/vsx-regs.exp: Likewise.
+	* gdb.arch/altivec-abi.exp: Likewise, plus added local variable
+	binprefix for generating the additional binary files.
+
+2016-08-19  Pedro Alves  <palves@redhat.com>
+
+	* gdb.trace/mi-trace-frame-collected.exp
+	(test_trace_frame_collected): On x32, expect two registers.
+
+2016-08-18  Carl Love  <cel@us.ibm.com>
+
+	* gdb.arch/powerpc-power.s: Add new Power9 instruction tests
+	and sync up the test with tests in gas/testsuite/gas/ppc.
+	* gdb.arch/powerpc-power.exp: Likewise.
+
+2016-08-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.multi/remove-inferiors.exp (test_remove_inferiors): Fix
+	expected error message.
+
+2016-08-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.multi/remove-inferiors.exp: New file.
+	* gdb.multi/remove-inferiors.c: New file.
+
+2016-08-12  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/signals-state-child.c (main): Remove "i" from fprintf's
+	argument list.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19187
+	* gdb.reverse/waitpid-reverse.exp: Add comment and remove
+	setup_kfails.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+	    Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/20418
+	* gdb.mi/new-ui-mi-sync.c, gdb.mi/new-ui-mi-sync.exp: New files.
+	* lib/mi-support.exp (mi_expect_interrupt): Remove anchors.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR mi/20431
+	* gdb.mi/mi-cmd-error.exp: New file.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18653
+	* gdb.base/signals-state-child.c: New file.
+	* gdb.base/signals-state-child.exp: New file.
+	* gdb.gdb/selftest.exp (do_steps_and_nexts): Add new pattern.
+
+2016-08-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.dwarf2/bitfield-parent-optimized-out.exp: New file.
+
+2016-08-03  Tom Tromey  <tom@tromey.com>
+
+	PR python/18565:
+	* gdb.python/py-frame-inline.exp: Add Frame.function test.
+
+2016-08-01  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.threads/process-dies-while-detaching.exp (do_test): Set
+	variable mode to "multi-process" if $multi_process is 1, otherwise
+	set it to "single-process".
+
+2016-08-01  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.cp/anon-struct.exp: Check is_aarch32_target.
+	* gdb.cp/cpexprs.exp: Likewise.
+	* gdb.cp/m-static.exp: Likewise.
+
+2016-07-26  Tom Tromey  <tom@tromey.com>
+
+	PR python/20190:
+	* gdb.threads/tls.exp (check_thread_local): Add python symbol
+	test.
+
+2016-07-26  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/record_goto.exp: se is_amd64_regs_target for
+	selecting assembly source files.
+	* gdb.btrace/stepi.exp: se is_amd64_regs_target for selecting
+	assembly source files.
+	* gdb.btrace/tailcall.exp: se is_amd64_regs_target for selecting
+	assembly source files.
+	* gdb.btrace/tailcall-only.exp: se is_amd64_regs_target for
+	selecting assembly source files.
+
+2016-07-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/new-ui.exp (do_test_invalid_args): New
+	procedure.
+
+2016-07-25  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+	* gdb.btrace/reconnect.c: New file.
+	* gdb.btrace/reconnect.exp: New file.
+
+2016-07-23  Gabriel Krisman Bertazi  <gabriel@krisman.be>
+
+	* gdb.base/catch-syscall.exp (do_syscall_tests): Add call
+	to test_catch_syscall_group.
+	(test_catch_syscall_group): New.
+
+2016-07-21  Tom Tromey  <tom@tromey.com>
+
+	* gdb.rust/simple.rs (main): Use empty struct expression.
+	* gdb.rust/simple.exp: Add tests for empty struct expression.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdbserver-support.exp (skip_gdbserver_tests): Return 1
+	if gdb_skip_xml_test is true on some targets.
+
+2016-07-21  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.server/solib-list.exp: Unset last_loaded_file.
+
+2016-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
+	"step into captured_main (args)".
+
+2016-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.btrace/tailcall-only.exp: Use is_lp64_target check.
+
+2016-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.python/py-unwind.exp: Test also ![is_lp64_target].
+
+2016-07-19  Pedro Alves  <palves@redhat.com>
+
+	* gdb.opt/inline-break.exp: Remove optimize=-O2.
+	* gdb.opt/inline-bt.exp: Likewise.
+	* gdb.opt/inline-cmds.exp: Remove optimize=-O2 and add
+	additional_flags=-Winline.
+	* gdb.opt/inline-locals.exp: Likewise.
+	* gdb.opt/inline-markers.c (ATTR): Define.
+	(inlined_fn): Use it.
+
+2016-07-19  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.gdb/selftest.exp: Remove checks on is_remote and isnative.
+	(test_with_self): Remove some code.  Remove argument executable.
+	(top-level): Use do_self_tests.
+
+2016-07-15  Zachary Welch  <zwelch@codesourcery.com>
+	    Don Breazeal <donb@codesourcery.com>
+
+	* gdb.base/maint.exp: Escape paths used in regular expressions.
+	* gdb.stabs/weird.exp: Likewise.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/15620, PR python/18620:
+	* gdb.python/py-breakpoint.exp (connect_event, check_last_event)
+	(test_bkpt_events): New procs.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR python/17698:
+	* gdb.python/py-breakpoint.exp (test_bkpt_basic): Add "pending"
+	test.
+	(test_watchpoints): Likewise.
+	(test_bkpt_pending): New proc.
+
+2016-07-13  Tom Tromey  <tom@tromey.com>
+
+	PR cli/18053:
+	* gdb.base/jit-so.exp (one_jit_test): Add jit-reader-load
+	completion test.
+
+2016-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.dwarf2/atomic-type.exp: Use function_range for low_pc and high_pc.
+	* gdb.dwarf2/atomic.c (f): Rename f_end_lbl to f_label.
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.c (f): Rename f_end_lbl to
+	f_label.
+	(g): Rename g_end_lbl to g_label.
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Use function_range for
+	low_pc and high_pc.
+	* gdb.dwarf2/dw2-lexical-block-bare.exp: Likewise.
+
+2016-07-12  Tom Tromey  <tom@tromey.com>
+
+	PR python/19293:
+	* gdb.python/py-unwind-maint.exp: Update tests.
+
+2016-07-12  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/selftest-support.exp (selftest_setup): Match the output
+	when captured_main is inlined.
+
+2016-07-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.fortran/derived-types.exp (result_line, result_line_2):
+	New variables.
+	(print this%a, print this%b, print this): New tests.
+	* gdb.fortran/derived-types.f90 (this): New object and
+	initialization.
+
+2016-07-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.ada/arraydim.exp: Remove extra directory level in build
+	directory.
+
+2016-07-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/ada.exp: Remove extra directory level in build directory.
+	* gdb.ada/cond_lang.exp: Likewise.
+	* gdb.ada/exec_changed.exp: Likewise.
+	* gdb.ada/lang_switch.exp: Likewise.
+
+2016-07-06  Manish Goregaokar  <manish@mozilla.com>
+
+	* simple.rs: Add test for raw pointer subscripting.
+	* simple.exp: Add test expectations.
+
+2016-07-05  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.mi/mi-reverse.exp: Match =record-started output.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/jit-reader.exp (info_registers_current_frame): New
+	procedure.
+	(jit_reader_test): Test the jit reader's unwinder.
+	* gdb.base/jithost.c (jit_function_00_code): New global.
+	(main): Use memcpy to fill in the mmapped code, instead of poking
+	bytes manually here.
+	* gdb.base/jitreader.c (enum register_mapping) <AMD64_RBP>: New
+	value.
+	(read_debug_info): Save the function's range.
+	(read_sp): New function.
+	(unwind_frame): Use it.  Also unwind RBP.
+	(get_frame_id): Use read_sp.
+	(gdb_init_reader): Use calloc instead of malloc.
+	* lib/gdb.exp (get_hexadecimal_valueof): Add optional 'test'
+	parameter.  Use gdb_test_multiple.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+	    Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.threads/process-dies-while-detaching.c: New file.
+	* gdb.threads/process-dies-while-detaching.exp: New file.
+
+2016-07-01  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/watchpoint-multi-exit.c: New file.
+	* gdb.multi/watchpoint-multi-exit.exp: New file.
+
+2016-06-30  Pedro Alves  <palves@redhat.com>
+
+	* lib/gdbserver-support.exp (close_gdbserver, gdb_exit): Don't
+	unset inferior_spawn_id.
+
+2016-06-30  Pedro Alves  <palves@redhat.com>
+
+	* lib/mi-support.exp (default_mi_gdb_start): Declare global
+	FORCE_SEPARATE_MI_TTY, not SEPARATE_MI_TTY.
+
+2016-06-29  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/return.c: Add copyright header.
+
+2016-06-29  Tom Tromey  <tom@tromey.com>
+
+	PR python/20129:
+	* gdb.python/py-framefilter.exp: Add tests for setting priority
+	and disabling of non-existent frame filter.
+
+2016-06-29  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/catch-syscall.c [__arm__]: Set unknown_syscall to
+	0x0f07ff.
+
+2016-06-28  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/catch-syscall.exp: Remove check on isnative and target
+	triplets.  Start gdb, execute catch syscall, and continue.  Check
+	gdb's output to determine catch syscall is supported.
+
+2016-06-27  Manish Goregaokar  <manish@mozilla.com>
+
+	* gdb.rust/simple.rs: Add test for returning unit in a function.
+	* gdb.rust/simple.exp: Add expectation for functions returning
+	unit.
+
+2016-06-27  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.python/py-breakpoint-create-fail.c,
+	gdb.python/py-breakpoint-create-fail.exp,
+	gdb.python/py-breakpoint-create-fail.py: New testcase.
+
+2016-06-25  Manish Goregaokar  <manish@mozilla.com>
+
+	PR gdb/20239
+	* gdb.rust/simple.rs: Add more tests for printing NonZero enums.
+	* gdb.rust/simple.exp: Add test expectations for new NonZero
+	tests.
+
+2016-06-24  David Taylor  <dtaylor@emc.com>
+
+	* gdb.base/offsets.exp: New file.
+	* gdb.base/offsets.c: New file.
+
+2016-06-23  Tom Tromey  <tom@tromey.com>
+
+	PR gdb/16483:
+	* gdb.python/py-framefilter.exp: Add "info frame-filter" test
+	before any filters are loaded.
+
+2016-06-21  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.fortran/derived-type.exp (print q): Add fields to the output.
+	* gdb.fortran/vla-type.exp (print twov): Fix vla tests with
+	structs.
+	* gdb.fortran/derived-type-function.exp: New file.
+	* gdb.fortran/derived-type-function.f90: New file.
+
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/new-ui.exp: New file.
+	* lib/mi-support.exp (switch_gdb_spawn_id): Move to ...
+	* lib/gdb.exp (switch_gdb_spawn_id): ... here.
+	(with_spawn_id): New procedure.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-exec-run.exp: New file.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-break.exp (test_breakpoint_commands): Always expect
+	breakpoint command's output on the main UI.
+	(test_break): New procedure, factored out from calls in the top
+	level.
+	(top level): Use foreach_with_prefix to test MI as main UI and as
+	separate UI.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
+	(test_awatch_creation_and_listing)
+	(test_rwatch_creation_and_listing, test_watchpoint_triggering):
+	Remove 'type' parameter.
+	(test_watchpoint_all): New parameter mi_mode.  Remove
+	with_test_prefix.
+	(top level): Use foreach_with_prefix, and add main/separate UI MI
+	testing axis.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* README (Testsuite Parameters): Document FORCE_SEPARATE_MI_TTY.
+	* lib/gdb.exp (default_gdb_exit): Clear inferior_spawn_id.
+	* lib/mi-support.exp (mi_uncatched_gdb_exit): Unset
+	gdb_main_spawn_id, mi_spawn_id, unset inferior_spawn_id.
+	(gdb_main_spawn_id, mi_spawn_id): Declare and
+	comment.
+	(mi_create_inferior_pty): New procedure,
+	factored out from default_mi_gdb_start.
+	(switch_gdb_spawn_id, mi_gdb_start_separate_mi_tty): New
+	procedures.
+	(default_mi_gdb_start): Call mi_gdb_start_separate_mi_tty if the
+	separate-mi-tty option is specified, or SEPARATE_MI_TTY is set.
+	Use mi_create_inferior_pty.
+	(mi_gdb_start): Use eval to pass down args list.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.opt/inline-cmds.c: Add "set mi break here" marker.
+	* gdb.opt/inline-cmds.exp: Add MI tests.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.gdb/selftest.exp (do_steps_and_nexts): Add new regexp.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.ada/mi_catch_ex.exp (continue_to_exception): New procedure.
+	(top level): Use it instead of mi_execute_to.
+
+2016-06-21  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-mi-events-gdb.py (stop_handler_str)
+	(cont_handler_str): New.
+	(signal_stop_handler): Set stop_handler_str instead of printing to
+	stdout.
+	(continue_handler): Set cont_handler_str instead of printing to
+	stdout.
+	* gdb.python/py-mi-events.exp: Ues mi_execute_to instead of
+	mi_send_resuming_command.  Print stop_handler_str and
+	cont_handler_str instead of expecting the python events print
+	directly.
+
+2016-06-17  Sanjoy Das  <sanjoy@playingwithpointers.com>
+
+	* gdb.base/jit-reader.exp: New file.
+	* gdb.base/jithost.c: New file.
+	* gdb.base/jithost.h: New file.
+	* gdb.base/jitreader.c : New file.
+	* gdb.base/jit-protocol.h: New file.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/step-over-syscall.exp (break_cond_on_syscall): New
+	parameters follow_fork and detach_on_fork.  Set follow-fork-mode
+	and detach-on-fork.  Adjust tests.
+	(top level): Invoke break_cond_on_syscall with combinations of
+	syscall, follow-fork-mode and detach-on-fork.
+
+2016-06-17  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/step-over-exit.c: New.
+	* gdb.base/step-over-exit.exp: New.
+
+2016-06-17  Yan-Ting Lin  <currygt52@gmail.com>
+
+	* gdb.base/float.exp: Add target check for nds32*-*-*.
+	* gdb.xml/tdesc-regs.exp: Set core-regs for nds32*-*-*.
+
+2016-06-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/call-ar-st.exp: Report unsupported rather than xfail
+	for unsupported target features.
+	* gdb.base/call-rt-st.exp: Likewise.
+	* gdb.base/call-sc.exp: Likewise.
+	* gdb.base/call-signal-resume.exp: Likewise.
+	* gdb.base/call-strs.exp: Likewise.
+	* gdb.base/callexit.exp: Likewise.
+	* gdb.base/callfuncs.exp: Likewise.
+	* gdb.base/nodebug.exp: Likewise.
+	* gdb.base/printcmds.exp: Likewise.
+	* gdb.base/ptype.exp: Likewise.
+	* gdb.base/structs.exp: Likewise.
+	* gdb.base/unwindonsignal.exp: Likewise.
+	* gdb.cp/gdb2495.exp: Likewise.
+	* gdb.cp/templates.exp: Likewise.
+	* gdb.cp/virtfunc.exp: Likewise.
+	* gdb.threads/hand-call-in-threads.exp: Likewise.
+	* gdb.threads/interrupted-hand-call.exp: Likewise.
+	* gdb.threads/thread-unwindonsignal.exp: Likewise.
+
+2016-06-10  Tom Tromey  <tom@tromey.com>
+
+	PR rust/20110:
+	* gdb.rust/expr.exp: Add test for integer constant larger than
+	i32.
+
+2016-06-10  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/nested-funcs.exp: New.
+	* gdb.fortran/nested-funcs.f90: New.
+
+2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
+
+	* gdb.base/examine-backward.c: New file.
+	* gdb.base/examine-backward.exp: New file.
+
+2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.mi/mi-record-changed.exp: Adjust =record-started output
+	matching.
+
+2016-06-02  Tom Tromey  <tom@tromey.com>
+
+	PR python/18984:
+	* gdb.python/py-shared.exp: Add solib_name test.
+
+2016-06-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.mi/mi-memory-changed.exp: Fix filename passed to untested.
+
+2016-05-31  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	PR c++/19893
+	* gdb.dwarf2/implref.exp: Rename to...
+	* gdb.dwarf2/implref-const.exp: ...this.  Also add more test statements.
+	* gdb.dwarf2/implref-array.c: New file.
+	* gdb.dwarf2/implref-array.exp: Likewise.
+	* gdb.dwarf2/implref-global.c: Likewise.
+	* gdb.dwarf2/implref-global.exp: Likewise.
+	* gdb.dwarf2/implref-struct.c: Likewise.
+	* gdb.dwarf2/implref-struct.exp: Likewise.
+
+2016-05-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/trace-condition.exp: Add 64bit tests.
+
+2016-05-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/trace-condition.c (marker): Adapt signature to 8 to 64
+	bits types.
+	(main): Adapt to 8 to 64 bits types.
+	* gdb.trace/trace-condition.exp: Add new tests.
+
+2016-05-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/trace-condition.exp: Add emit_less_unsigned test.
+
+2016-05-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/ftrace.exp (test_ftrace_condition): Remove.
+	Move condition tests...
+	* gdb.trace/trace-condition.exp: Here.
+
+2016-05-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/trace-condition.exp: Add counter-case tests.
+
+2016-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR c++/15231
+	* gdb.ada/out_of_line_in_inlined.exp: Remove xfails.
+	* gdb.dwarf2/dw2-lexical-block-bare.exp: New file.
+
+2016-05-27  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/attach-many-short-lived-threads.exp (bad_dejagnu):
+	New procedure.
+	(top level): Call it, and bail out of DejaGnu is known to be bad.
+
+2016-05-27  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/whatis.c: Extend the test case.
+	* gdb.base/whatis.exp: Add additional tests.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+* gdb.fortran/type.f90: Add pointer variable.
+* gdb.fortran/whatis_type.exp: Add whatis/ptype of pointers.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-type.exp: Fix testcase name.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-type.exp: Access elements in nested structs.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/type.f90: Add nested structures.
+	* gdb.fortran/whatis-type.exp: Whatis/ptype nested structures.
+	* gdb.fortran/derived-type.exp: Adapt expected output.
+	* gdb.fortran/vla-type.exp: Adapt expected output.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/whatis_type.exp: Adapt expected output.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/print_type.exp: Fix expected output.
+	* gdb.fortran/whatis_type.exp: Fix expected output.
+
+2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/whatis_type.exp: Use multi_line.
+
+2016-05-24  Tom Tromey  <tom@tromey.com>
+
+	PR python/17386:
+	* gdb.python/py-value.exp (test_value_numeric_ops): Add tests that
+	use value as an index.
+
+2016-05-23  Tom Tromey  <tom@tromey.com>
+
+	PR python/17981:
+	* gdb.python/py-breakpoint.exp (test_bkpt_basic): Add test for
+	no-breakpoint case.
+
+2016-05-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19828
+	* gdb.threads/clone-attach-detach.c: New file.
+	* gdb.threads/clone-attach-detach.exp: New file.
+
+2016-05-24  Francis Ricci  <francisjricci@gmail.com>  (tiny patch)
+
+	* gdb.base/annota-input-while-running.exp: Fix syntax error.
+
+2016-05-23  Tom Tromey  <tom@tromey.com>
+
+	PR python/19438, PR python/18393:
+	* gdb.python/py-progspace.exp: Add "dir" test.
+	* gdb.python/py-objfile.exp: Add "dir" test.
+
+2016-05-23  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/thumb-prologue.exp: Use standard_testfile.
+	* gdb.arch/thumb2-it.exp: Likewise.
+
+2016-05-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.mi/mi-threads-interrupt.c: New file.
+	* gdb.mi/mi-threads-interrupt.exp: New file.
+
+2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/18077
+	* gdb.mi/mi-async-run.exp: New file.
+	* gdb.mi/mi-async-run.c: New file.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+	    Manish Goregaokar <manishsmail@gmail.com>
+
+	* lib/rust-support.exp: New file.
+	* lib/gdb.exp (skip_rust_tests): New proc.
+	(build_executable_from_specs): Handle rust.
+	* lib/future.exp (gdb_find_rustc): New proc.
+	(gdb_default_target_compile): Handle rust.
+	* gdb.rust/expr.exp: New file.
+	* gdb.rust/generics.exp: New file.
+	* gdb.rust/generics.rs: New file.
+	* gdb.rust/methods.exp: New file.
+	* gdb.rust/methods.rs: New file.
+	* gdb.rust/modules.exp: New file.
+	* gdb.rust/modules.rs: New file.
+	* gdb.rust/simple.exp: New file.
+	* gdb.rust/simple.rs: New file.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* gdb.base/default.exp (set language): Add rust.
+
+2016-05-17  Tom Tromey  <tom@tromey.com>
+
+	* gdb.gdb/unittest.exp: New file.
+
+2016-05-16  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/batch-preserve-term-settings.exp: Remove variable
+	shell_prompt.  Update shell_prompt_re.
+
+2016-05-12  Doug Evans  <dje@google.com>
+
+	PR symtab/19999
+	* lib/dwarf.exp (build_executable_from_fission_assembler): Pass
+	$options when building executable.
+	* gdb.dwarf2/fission-loclists-pie.S: New file.
+	* gdb.dwarf2/fission-loclists-pie.exp: New file.
+
+2016-05-04  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/solib-display.exp: Check for [use_gdb_stub]Â instead
+	of [is_remote target],
+
+2016-05-04  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (use_gdb_stub): New procedure.
+
+2016-05-03  Yunlian Jiang <yunlian@google.com>
+	    Doug Evans  <dje@google.com>
+
+	PR symtab/19914
+	* gdb.dwarf2/dwp-sepdebug.c: New file.
+	* gdb.dwarf2/dwp-sepdebug.exp: New file.
+
+2016-05-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/detach.exp: Remove is_remote check.
+
+2016-05-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/annota-input-while-running.exp: Don't check for
+	[is_remote target].  Enable annotations after running to main.
+	Remove unused "set test..." line.
+
+2016-04-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/trace-enable-disable.exp: New file.
+	* gdb.trace/trace-enable-disable.c: New file.
+
+2016-04-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.arch/ftrace-insn-reloc.exp: Save gdb_load_shlib result,
+	use it in info sharedlibrary test.
+	* gdb.trace/ftrace-lock.exp: Likewise.
+	* gdb.trace/ftrace.exp: Likewise.
+	* gdb.trace/range-stepping.exp: Likewise.
+	* gdb.trace/trace-break.exp: Likewise.
+	* gdb.trace/trace-condition.exp: Likewise.
+	* gdb.trace/trace-mt.exp: Likewise.
+
+2016-04-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (gdb_load_shlibs): Rename to...
+	(gdb_load_shlib): ... this.
+	* gdb.arch/ftrace-insn-reloc.exp: Adjust gdb_load_shlibs ->
+	gdb_load_shlib.
+	* gdb.base/catch-load.exp (one_catch_load_test): Likewise.
+	* gdb.base/ctxobj.exp: Likewise.
+	* gdb.base/dprintf-pending.exp: Likewise.
+	* gdb.base/dso2dso.exp: Likewise.
+	* gdb.base/fixsection.exp: Likewise.
+	* gdb.base/gcore-relro.exp: Likewise.
+	* gdb.base/gdb1555.exp: Likewise.
+	* gdb.base/global-var-nested-by-dso.exp: Likewise.
+	* gdb.base/gnu-ifunc.exp: Likewise.
+	* gdb.base/hbreak-in-shr-unsupported.exp: Likewise.
+	* gdb.base/jit-so.exp (one_jit_test): Likewise.
+	* gdb.base/pending.exp: Likewise.
+	* gdb.base/print-file-var.exp: Likewise.
+	* gdb.base/print-symbol-loading.exp: Likewise.
+	* gdb.base/shlib-call.exp: Likewise.
+	* gdb.base/shreloc.exp: Likewise.
+	* gdb.base/so-impl-ld.exp: Likewise.
+	* gdb.base/solib-disc.exp: Likewise.
+	* gdb.base/solib-nodir.exp: Likewise.
+	* gdb.base/solib-overlap.exp: Likewise.
+	* gdb.base/solib-symbol.exp: Likewise.
+	* gdb.base/solib-weak.exp (do_test): Likewise.
+	* gdb.base/sym-file.exp: Likewise.
+	* gdb.base/symtab-search-order.exp: Likewise.
+	* gdb.base/type-opaque.exp: Likewise.
+	* gdb.base/unload.exp: Likewise.
+	* gdb.base/watchpoint-solib.exp: Likewise.
+	* gdb.compile/compile.exp: Likewise.
+	* gdb.cp/gdb2384.exp: Likewise.
+	* gdb.cp/infcall-dlopen.exp: Likewise.
+	* gdb.cp/re-set-overloaded.exp: Likewise.
+	* gdb.fortran/library-module.exp: Likewise.
+	* gdb.opt/solib-intra-step.exp: Likewise.
+	* gdb.python/py-finish-breakpoint.exp: Likewise.
+	* gdb.python/py-shared.exp: Likewise.
+	* gdb.reverse/solib-precsave.exp: Likewise.
+	* gdb.reverse/solib-reverse.exp: Likewise.
+	* gdb.server/solib-list.exp: Likewise.
+	* gdb.threads/dlopen-libpthread.exp: Likewise.
+	* gdb.threads/tls-shared.exp: Likewise.
+	* gdb.threads/tls-so_extern.exp: Likewise.
+	* gdb.trace/change-loc.exp: Likewise.
+	* gdb.trace/ftrace-lock.exp: Likewise.
+	* gdb.trace/ftrace.exp: Likewise.
+	* gdb.trace/mi-tracepoint-changed.exp (test_reconnect): Likewise.
+	* gdb.trace/pending.exp: Likewise.
+	* gdb.trace/range-stepping.exp: Likewise.
+	* gdb.trace/strace.exp (strace_remove_socket): Likewise.
+	(strace_info_marker): Likewise.
+	(strace_probe_marker): Likewise.
+	(strace_trace_on_same_addr): Likewise.
+	(strace_trace_on_diff_addr): Likewise.
+	* gdb.trace/trace-break.exp: Likewise.
+	* gdb.trace/trace-condition.exp: Likewise.
+	* gdb.trace/trace-mt.exp: Likewise.
+
+2016-04-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (gdb_load_shlibs):  Accept a single argument.  Return
+	result of gdb_remote_download.
+	* gdb.base/ctxobj.exp: Split gdb_load_shlibs call.
+	* gdb.base/dso2dso.exp: Likewise.
+	* gdb.base/global-var-nested-by-dso.exp: Likewise.
+	* gdb.base/print-file-var.exp: Likewise.
+	* gdb.base/shlib-call.exp: Likewise.
+	* gdb.base/shreloc.exp: Likewise.
+	* gdb.base/solib-overlap.exp: Likewise.
+	* gdb.base/solib-weak.exp (do_test): Likewise.
+	* gdb.base/unload.exp: Likewise.
+
+2016-04-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/branch-to-self.exp: Skip it if gdb,nosignals
+	exists.
+
+2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* vla-type.exp: Print structure from toplevel.
+
+2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-type.f90: Add test for static and dynamic arrays
+	of dynamic types.
+	* gdb.fortran/vla-type.exp: Add test for static and dynamic arrays
+	of dynamic types.
+
+2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-type.f90: New file.
+	* gdb.fortran/vla-type.exp: New file.
+
+2016-04-25  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/branch-to-self.c: New file.
+	* gdb.base/branch-to-self.exp: New file.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.trace/unavailable.exp (gdb_collect_globals_test_1): Match
+	more after $hex.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/annota1.exp: Set breakpoint on line $main_line.
+	* gdb.base/annota3.exp: Likewise.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/step-precsave.exp: Do one step and test program
+	stops in "callee" and do multiple steps until program goes out
+	of "callee".
+	* gdb.reverse/step-reverse.exp: Likewise.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.trace/signal.exp: Also pass if
+	$tracepoint_hits($i) > $iterations.
+
+2016-04-22  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.trace/signal.c: New file.
+	* gdb.trace/signal.exp: New file.
+
+2016-04-19  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.base/bad-file.exp: New file.
+
+2016-04-18  Martin Galvan  <martin.galvan@tallertechnologies.com>
+
+	* gdb.dwarf2/implref.exp: New file.
+
+2016-04-18  Bernhard Heckel <bernhard.heckel@intel.com>
+
+	* gdb.fortran/common-block.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/derived-type.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/multi-dim.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/vla-datatypes.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/vla-ptype-sub.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/vla-ptype.exp: Use type naming defined in lib fortran.
+	* gdb.fortran/whatis_type.exp: Use type naming defined in lib fortran.
+	* lib/fortran.exp (fortran_int4): New procedure.
+	(fortran_real4, fortran_real8, fortran_complex4): Likewise.
+	(fortran_logical4): Likewise.
+
+2016-04-18  Benrhard Heckel <bernhard.heckel@intel.com>
+
+	* lib/gdb.exp (gdb_compile_shlib): Add flag for ICC compiler.
+
+2016-04-18  Bernhard Heckel <bernhard.heckel@intel.com>
+
+	* lib/compiler.c: Add Intel specific preprocessor macros.
+	* lib/compiler.cc: Likewise.
+
+2016-04-13  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.server/connect-with-no-symbol-file.c: New file.
+	* gdb.server/connect-with-no-symbol-file.exp: New file.
+
+2016-04-13  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (gdb_remote_download): Fix and extend comment.
+
+2016-04-13  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* boards/gdbserver-base.exp (${board}_download): Copy source file to
+	standard output directory.
+
+2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/trace-condition.exp (foreach): Fix emit_sub testcase.
+
+2016-04-13  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/instruction_history.c (loop): Add declaration.
+
+2016-04-12  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/ftrace.exp (proc): Change test prefix from "ond" to "cond".
+
+2016-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.python/py-mi-events-gdb.py (signal_stop_handler): Add
+	parentheses to print.
+	(continue_handler): Likewise.
+
+2016-04-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.server/solib-list.exp: Remove is_remote check.
+	Pass shlib= to gdb_compile.  Don't link shared library with
+	-soname.  Call gdb_remote_download instead of gdb_load_shlibs.
+	Run binary filename through "readlink -f" on the target.
+
+2016-04-08  Pedro Alves  <palves@redhat.com>
+
+	* gdb.server/solib-list.exp: Don't use gdb_load.  Instead pass the
+	interpreter filename as argument to gdbserver_spawn.
+	* lib/gdbserver-support.exp (gdbserver_download_current_prog):
+	Return empty if $last_loaded_file does not exist.
+
+2016-04-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix compatibility with gcc-4.8.5-4.el7.x86_64.
+	* gdb.base/jit-main.c: Use exit after usage.
+
+2016-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/gdbhistsize-history.exp: Save and unset GDBHISTFILE and
+	GDBHISTSIZE prior to the tests.
+	* gdb.base/gdbinit-history.exp: Likewise.
+
+2016-04-07  Pedro Alves  <palves@redhat.com>
+
+	* gdb.compile/compile.exp: Use gdb_compile with "shlib=" option
+	instead of build_executable.  Use gdb_load_shlibs.
+
+2016-04-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/finish-reverse-bkpt.exp: Use temporary breakpoint.
+	Execute "si" command.
+
+2016-04-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/next-reverse-bkpt-over-sr.exp: Match the breakpoint
+	number instead of the comments on some line.
+
+2016-04-06  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.dwarf2/dw2-opt-structptr.c: New test program.
+	* gdb.dwarf2/dw2-opt-structptr.exp: New test script.
+
+2016-04-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.threads/dlopen-libpthread.exp: Set binfile_lib using
+	standard_output_file.  Remove unused binfile variable.
+
+2016-04-05  Catalin Udma  <catalin.udma@freescale.com>
+
+	* gdb.python/py-mi-objfile-gdb.py: Use "list main" command.
+	* gdb.python/py-mi-objfile.exp: Match "list main" output
+	in console format.
+
+2016-04-05  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.arch/ftrace-insn-reloc.exp: Check for IPA basename instead of
+	absolute.
+
+2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/ftrace-lock.exp: Check for IPA basename instead of
+	absolute.
+	* gdb.trace/ftrace.exp: Likewise.
+	* lib/gdb.exp (gdb_compile): Set rpath $ORIGIN for non-remote
+	targets as well.
+	(gdb_compile_shlib): Set SONAME for non-remote targets as well.
+	(gdb_load_shlibs): Copy libraries to test directory when testing
+	natively.  Only set solib-search-path if testing remotely.
+	* lib/mi-support.exp (mi_load_shlibs): Likewise.
+
+2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/jit-so.exp: Use gdb_remote_download instead of
+	gdb_download.  Use it even if the target is not remote.
+	* gdb.base/jit.exp (compile_jit_test): Likewise.
+	* lib/gdb.exp (gdb_remote_download): Copy files to the standard
+	output directory if the destination board is local, otherwise use
+	the standard remote_download from DejaGnu.
+	(gdb_download): Remove.
+	(gdb_load_shlibs): Use gdb_remote_download instead of
+	gdb_download.
+	* lib/gdbserver-support.exp (gdbserver_download_current_prog):
+	Use gdb_remote_download instead of gdb_download.  Use it even if
+	the target is not remote.
+	* lib/mi-support.exp (mi_load_shlibs): Use gdb_remote_download
+	instead of gdb_download.
+
+2016-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.mi/mi-breakpoint-changed.exp: Add some with_test_prefix.
+	(test_insert_delete_modify): Call mi_load_shlibs before trying to
+	run.
+
+2016-04-01  Artemiy Volkov  <artemiyv@acm.org>
+
+	PR gdb/19820
+	* gdb.base/printcmds.exp: Add artificial arrays tests.
+
+2016-03-31  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19858
+	* gdb.base/jit-main.c: Include unistd.h.
+	(ATTACH): Define to 0 if not already defined.
+	(wait_for_gdb, mypid): New globals.
+	(WAIT_FOR_GDB): New macro.
+	(MAIN): Set an alarm.  Store the process's pid.  Wait for GDB at
+	some breakpoint locations.
+	* gdb.base/jit.exp (clean_reattach, continue_to_test_location):
+	New procedures.
+	(one_jit_test): Add REATTACH parameter, and handle it.  Use
+	continue_to_test_location.
+	(top level): Test attach, and adjusts calls to one_jit_test.
+
+2016-03-31  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19858
+	* gdb.base/jit.exp (compile_jit_test): Add intro comment.  Add
+	BINSUFFIX parameter, and handle it.
+	(top level): Adjust calls compile_jit_test.
+
+2016-03-31  Catalin Udma  <catalin.udma@freescale.com>
+
+	PR python/19743
+	* gdb.python/py-mi-events-gdb.py: New file.
+	* gdb.python/py-mi-events.c: New file.
+	* gdb.python/py-mi-events.exp: New file.
+
+2016-03-30  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/until-precsave.exp: Match function name only.
+	* gdb.reverse/until-reverse.c (main): Don't call fprintf nor printf.
+	Move malloc to a condition block.
+	* gdb.reverse/until-reverse.exp: Match function name only.
+
+2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/ftrace.exp: Set arg0exp for s390.
+	* gdb.trace/mi-trace-frame-collected.exp: Expect 4 registers on s390.
+	* gdb.trace/mi-trace-unavailable.exp: Set pcnum for s390, add gpr0num
+	variable for GPR 0 instead of assuming it is register 0.
+	* gdb.trace/trace-common.h: Add s390 fast tracepoint placeholder.
+	* lib/trace-support.exp: Add s390 registers.
+
+2016-03-29  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-neon.exp: Pass debug to prepare_for_testing.
+
+2016-03-24  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/break-reverse.exp: Add quotation mark in the
+	test message.
+
+2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.arch/s390-multiarch.exp: Use standard_testfile instead of
+	maintaining separate logic for constructing the output path.
+
+2016-03-16  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.threads/forking-threads-plus-breakpoint.c (thread_forks):
+	Retry fork and waitpid on interrupted system call errors.
+	* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
+	Use with_timeout_factor to increase timeout by factor of 10.
+
+2016-03-15  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.cp/scope-err.cc: New test program.
+	* gdb.cp/scope-err.exp: New test script.
+	* gdb.linespec/ls-errs.c (myfunction): Expanded to have multiple
+	lines and "set breakpoint here" comment.
+	* gdb.linespec/ls-errs.exp: Added C++ testing and new test case.
+	Fixed some whitespace and format issues.
+	* gdb.mi/mi-linespec-err-cp.cc: New test program.
+	* gdb.mi/mi-linespec-err-cp.exp: New test script.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* gdb.xml/extra-regs.xml: Add enum, mixed_flags values.
+	* gdb.xml/tdesc-regs.exp (load_description): New arg xml_file.
+	All callers updated.  Add tests for enums, mixed flags register.
+
+2016-03-15  Doug Evans  <dje@google.com>
+
+	* gdb.base/skip.c (main): Call test_skip_file_and_function.
+	* gdb.base/skip.exp: Remove hand calling test_skip_file_and_function.
+
+2016-03-14  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/default.exp: Add $_as_string to the list of expected
+	convenience functions.
+
+2016-03-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/maint.exp: New tests for 'maint info line-table'.
+
+2016-03-10  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.python/py-as-string.exp: New file.
+	* gdb.python/py-as-string.c: New file.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/attach-into-signal.exp: Adjust to "Program received
+	signal" -> "Thread NN received signal" output change.
+	* gdb.threads/ia64-sigill.exp: Likewise.
+	* gdb.threads/linux-dp.exp: Likewise.
+	* gdb.threads/manythreads.exp: Likewise.
+	* gdb.threads/pending-step.exp: Likewise.
+	* gdb.threads/print-threads.exp: Likewise.
+	* gdb.threads/sigstep-threads.exp: Likewise.
+	* gdb.threads/staticthreads.exp: Likewise.
+	* gdb.threads/tls.exp: Likewise.
+
+2016-03-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/command-line-input.exp: New file.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/ftrace.exp: Set arg0exp for ppc.
+	* gdb.trace/mi-trace-unavailable.exp: Set pcnum for ppc.
+	* gdb.trace/pending.exp: Accept leading dot before function name.
+	* gdb.trace/trace-common.h: Add fast tracepoint dummy insn for ppc.
+	* lib/trace-support.exp: Set registers for ppc.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/entry-values.exp: Link ${binfile}1.o to ${binfile}1 and
+	use it for disassembly; accept .main in addition to main in backtrace.
+
+2016-03-09  Wei-cheng Wang  <cole945@gmail.com>
+	    Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/actions.c (gdb_recursion_test_fp): New typedef.
+	(gdb_recursion_test_ptr): New global variable.
+	(gdb_recursion_test): Call gdb_recursion_test_ptr instead of
+	gdb_recursion_test.
+	(gdb_c_test): Ditto.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/change-loc.exp: Don't depend on tracepoint location
+	ordering.
+
+2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/unavailable-dwarf-piece.c (foo): Add foo_start_lbl label.
+	(bar): Add bar_start_lbl label.
+	* gdb.trace/unavailable-dwarf-piece.exp: Use foo/bar_start_lbl instead
+	of foo/bar for emitting DWARF and tracing.
+
+2016-03-06  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* analyze-racy-logs.py: Set executable bit.
+
+2016-03-05  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* Makefile.in (DEFAULT_RACY_ITER): New variable.
+	(CHECK_TARGET_TMP): Likewise.
+	(check-single-racy): New rule.
+	(check-parallel-racy): Likewise.
+	(TEST_TARGETS): Adjust rule to account for RACY_ITER.
+	(do-check-parallel-racy): New rule.
+	(check-racy/%.exp): Likewise.
+	* README (Racy testcases): New section.
+	* analyze-racy-logs.py: New file.
+
+2016-03-03  Doug Evans  <dje@google.com>
+
+	* gdb.base/skip.exp: Use with_test_prefix.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/step-over-syscall.exp (step_over_syscall): Kfail.
+	Invoke step_over_syscall "clone" and break_cond_on_syscall
+	"clone".
+	* gdb.base/step-over-clone.c: New file.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/step-over-syscall.exp (disp_step_cross_syscall): Fix
+	code format.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-fork.c: Rename to ...
+	* gdb.base/step-over-fork.c: ... it.  New file.
+	* gdb.base/disp-step-vfork.c: Rename to ...
+	* gdb.base/step-over-vfork.c: ... it.  New file.
+	* gdb.base/disp-step-syscall.exp: Rename to ...
+	* gdb.base/step-over-syscall.exp: ... it.  New file.
+	(disp_step_cross_syscall): Rename to ...
+	(step_over_syscall): ... it.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-syscall.exp (break_cond_on_syscall): New.
+	If target supports condition evaluation on target, invoke
+	break_cond_on_syscall for fork and vfork.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-syscall.exp: Don't invoke
+	support_displaced_stepping.
+	(disp_step_cross_syscall): Test with displaced stepping off and
+	on if supported.
+
+2016-03-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-syscall.exp (check_pc_after_cross_syscall): New
+	proc.
+	(setup): New proc.
+	(disp_step_cross_syscall): Move code to check_pc_after_cross_syscall
+	and setup.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-history.exp: Remove breakpoint.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.fortran/vla-history.exp: Lookup array elements and printing
+	exceeds timeout.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.cp/vla-cxx.cc: Insert dummy assignment as anchor for an
+	breakpoint.
+
+2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* gdb.mi/vla.f90: Nullify pointer after declaration.
+
+2016-03-01  Pedro Alves  <palves@redhat.com>
+
+	* gdb.trace/ftrace-lock.c: Include <unistd.h>.
+
+2016-03-01  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/watchpoint-fork-child.c: Include "watchpoint-fork.h"
+	before anything else.
+	* gdb.threads/watchpoint-fork-mt.c: Likewise.  Don't define
+	_GNU_SOURCE here.
+	* gdb.threads/watchpoint-fork-st.c: Include "watchpoint-fork.h"
+	before anything else.
+	* gdb.threads/watchpoint-fork.h: Define _GNU_SOURCE.
+
+2016-03-01  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/catch-fork-kill.c: Include <sys/wait.h>.
+
+2016-03-01  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-disp-step.exp: Use standard_testfile and
+	prepare_for_testing.
+
+2016-03-01  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-neon.exp: Pass quiet to prepare_for_testing.
+
+2016-03-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.arch/s390-tdbregs.exp: Use prepare_for_testing instead of
+	manually constructing the output path.
+
+2016-03-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.arch/s390-stackless.S: New.
+	* gdb.arch/s390-stackless.exp: New.
+
+2016-02-28  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* gdb.dlang/circular.c: New file.
+	* gdb.dlang/circular.exp: New file.
+
+2016-02-26  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/insn-reverse.c [__arm__] (ext_reg_load): New.
+	[__arm__] (ext_reg_mov, ext_reg_push_pop): New.
+	(testcases): Update.
+
+2016-02-26  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/aarch64.c: Rename to ...
+	* gdb.reverse/insn-reverse.c: ... it.
+	* gdb.reverse/aarch64.exp: Rename to ...
+	* gdb.reverse/insn-reverse.exp: ... it.
+
+2016-02-26  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.reverse/aarch64.c: [__aarch64__] Include arm_neon.h.
+	(testcase_ftype): New.
+	(testcases): New array.
+	(n_testcases): New.
+	(main): Call each element in testcases.
+	* gdb.reverse/aarch64.exp: Remove is_aarch64_target check.
+	(read_testcase): New.
+	Do the tests in a loop.
+
+2016-02-25  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/branches.c: Remove.
+
+2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	PR gdb/13808
+	* gdb.trace/ftrace.exp (test_fast_tracepoints): Remove kfail.
+
+2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/ftrace.exp: Remove unnecessary target check.
+
+2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/entry-values.exp: Surround $call_insn with '\y',
+	change x86_64 call_insn to 'callq'.
+
+2016-02-24  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/tfile-avx.c: Move to...
+	* gdb.trace/tracefile-pseudo-reg.c: Here.
+	* gdb.trace/tfile-avx.exp: Move to...
+	* gdb.trace/tracefile-pseudo-reg.exp: Here.
+
+2016-02-24  Gary Benson <gbenson@redhat.com>
+
+	* gdb.base/attach-pie-noexec.exp: Do not expect an error
+	message on attach.
+
+2016-02-23  Doug Evans  <dje@google.com>
+
+	* gdb.base/skip.c (test_skip): New function.
+	(end_test_skip_file_and_function): New function.
+	(test_skip_file_and_function): New function.
+	* gdb.base/skip1.c (test_skip): New function.
+	(skip1_test_skip_file_and_function): New function.
+	* gdb.base/skip.exp: Add tests for new skip options.
+	* gdb.base/skip-solib.exp: Update expected output.
+	* gdb.perf/skip-command.cc: New file.
+	* gdb.perf/skip-command.exp: New file.
+	* gdb.perf/skip-command.py: New file.
+
+2016-02-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/unavailable.exp (gdb_unavailable_registers_test_1): Fix
+	info registers pattern.
+
+2016-02-18  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* lib/future.exp: Add D support.
+	(gdb_find_gdc): New proc.
+	(gdb_default_target_compile): Add D support.
+
+2016-02-18  Wei-cheng Wang  <cole945@gmail.com>
+
+	* gdb.trace/tspeed.c (myclock): Return wallclock instead of
+	user+system time.
+	(trace_speed_test): Determine the iteration count for a time
+	between 15..30 seconds.
+
+2016-02-18  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* gdb.arch/i386-mpx-sigsegv.c: New file.
+	* gdb.arch/i386-mpx-sigsegv.exp: New file.
+	* gdb.arch/i386-mpx-simple_segv.c: New file.
+	* gdb.arch/i386-mpx-simple_segv.exp: New file.
+
+2016-02-18  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-syscall.exp (disp_step_cross_syscall):
+	Don't call setup_kfail.
+
+2016-02-18  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
+	Set "set breakpoint condition-evaluation" per $cond_bp_target.
+
+2016-02-16  Doug Evans  <dje@google.com>
+
+	* gdb.base/skip.c: Add copyright.  Whitespace cleanup.
+	* gdb.base/skip1.c: Ditto.
+	* gdb.base/skip.exp: Whitespace cleanup.
+
+2016-02-16  Don Breazeal  <donb@codesourcery.com>
+
+	PR remote/19496
+	* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
+	Remove kfail for PR remote/19496.
+
+2016-02-16  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (standard_temp_file): Return a path specific to
+	the runtest invocation.
+
+2016-02-16  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/save-trace.exp: Change relative path to be in the
+	standard output directory.
+
+2016-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-prologue.c: Add missing prototypes.
+
+2016-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-gnu-cfi.exp: Use standard_output_file.
+	* gdb.arch/i386-prologue.exp: Likewise.
+	* gdb.arch/i386-size.exp: Likewise.
+
+2016-02-15  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/wrong_frame_bt_full.exp: Use standard_output_file to
+	define object file path.
+	* gdb.btrace/gcore.exp: Use standard_output_file to define core
+	file path.
+	* lib/opencl.exp (gdb_compile_opencl_hostapp): Use
+	standard_output_file to define binfile.
+
+2016-02-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix compatibility with recent gfortran-5.3.1.
+	* gdb.fortran/vla-history.exp (print vla1 allocated)
+	(print vla2 allocated, print $2, print $3): Remove
+	(print $4): Rename to ...
+	(print $2): ... here.
+	(print $9): Rename to ...
+	(print $5): ... here.
+	(print $10): Rename to ...
+	(print $6): ... here.
+	* gdb.fortran/vla.f90: Add pvla initialization.
+
+2016-02-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.fortran/vla-value-sub-finish.exp (set max-value-size 1024*1024):
+	New test.
+	* gdb.fortran/vla-value-sub.exp: Likewise.
+
+2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/tfile-avx.c (main): Change ymm15 to xmm15.
+
+2016-02-12  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* i386-biarch-core.exp: Define corefile using
+	standard_output_file.
+
+2016-02-12  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-single-step-kernel-helper.c: New.
+	* gdb.arch/arm-single-step-kernel-helper.exp: New.
+
+2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/tailcall-only.exp: New.
+	* gdb.btrace/tailcall-only.c: New.
+	* gdb.btrace/x86_64-tailcall-only.S: New.
+	* gdb.btrace/i686-tailcall-only.S: New.
+
+2016-02-11  Pedro Alves  <palves@redhat.com>
+
+	* README (Parallel testing): Add missing double quotes.
+
+2016-02-11  Pedro Alves  <palves@redhat.com>
+
+	* README (Parallel testing): New section.
+	(GDB_PARALLEL): Rewrite.
+	(FORCE_PARALLEL): Document.
+
+2016-02-11  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/tfile-avx.c: New test.
+	* gdb.trace/tfile-avx.exp: New test.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	PR breakpoints/19546
+	* gdb.base/infcall-exec.c: New file.
+	* gdb.base/infcall-exec2.c: New file.
+	* gdb.base/infcall-exec.exp: New file.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure.
+	(toplevel): Call test_bkpt_address.
+
+2016-02-09  Keith Seitz  <keiths@redhat.com>
+
+	PR python/19506
+	* gdb.python/py-breakpoint.exp (test_bkpt_address): New procedure.
+	(toplevel): Call test_bkpt_address.
+
+2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
+	to AC_OUTPUT.
+	* configure: Regenerate.
+
+2016-02-09  Pedro Alves  <palves@redhat.com>
+
+	PR breakpoints/19548
+	* gdb.base/execl-update-breakpoints.c (some_function): New
+	function.
+	(main): Call it.
+	* gdb.base/execl-update-breakpoints.exp: Add a second breakpoint.
+	Tighten expected GDB output.
+
+2016-02-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (ALL_SUBDIRS): Remove.
+	(clean mostlyclean): Do not recurse in ALL_SUBDIRS.
+	(distclean maintainer-clean realclean): Likewise.
+	* configure.ac (AC_OUTPUT): Remove gdb.*/Makefile.
+	* configure: Regenerate.
+	* gdb.ada/Makefile.in: Delete.
+	* gdb.arch/Makefile.in: Likewise.
+	* gdb.asm/Makefile.in: Likewise.
+	* gdb.base/Makefile.in: Likewise.
+	* gdb.btrace/Makefile.in: Likewise.
+	* gdb.cell/Makefile.in: Likewise.
+	* gdb.compile/Makefile.in: Likewise.
+	* gdb.cp/Makefile.in: Likewise.
+	* gdb.disasm/Makefile.in: Likewise.
+	* gdb.dlang/Makefile.in: Likewise.
+	* gdb.dwarf2/Makefile.in: Likewise.
+	* gdb.fortran/Makefile.in: Likewise.
+	* gdb.gdb/Makefile.in: Likewise.
+	* gdb.go/Makefile.in: Likewise.
+	* gdb.guile/Makefile.in: Likewise.
+	* gdb.java/Makefile.in: Likewise.
+	* gdb.linespec/Makefile.in: Likewise.
+	* gdb.mi/Makefile.in: Likewise.
+	* gdb.modula2/Makefile.in: Likewise.
+	* gdb.multi/Makefile.in: Likewise.
+	* gdb.objc/Makefile.in: Likewise.
+	* gdb.opencl/Makefile.in: Likewise.
+	* gdb.opt/Makefile.in: Likewise.
+	* gdb.pascal/Makefile.in: Likewise.
+	* gdb.perf/Makefile.in: Likewise.
+	* gdb.python/Makefile.in: Likewise.
+	* gdb.reverse/Makefile.in: Likewise.
+	* gdb.server/Makefile.in: Likewise.
+	* gdb.stabs/Makefile.in: Likewise.
+	* gdb.threads/Makefile.in: Likewise.
+	* gdb.trace/Makefile.in: Likewise.
+	* gdb.xml/Makefile.in: Likewise.
+	* lib/gdb.exp (make_gdb_parallel_path): Add check for
+	GDB_PARALLEL.
+	(standard_output_file): Remove check for GDB_PARALLEL, always
+	return path in outputs/$subdir/$testname.
+
+2016-02-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (abs_srcdir): Assign @abs_srcdir@.
+	(site.exp): Assign abs_srcdir to tcl's srcdir.
+
+2016-02-04  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/foll-exec-mode.c: Include limits.h.
+	(main): Add parameters argc and argv.  Get directory from
+	argv[0].
+	* gdb.base/foll-exec-mode.exp: Don't pass -DBASEDIR in
+	compilation.
+	* gdb.base/foll-exec.c: Include limits.h.
+	(main): Add parameters argc and argv.
+	Get directory from argv[0].
+	* gdb.base/foll-exec.exp: Don't pass -DBASEDIR in compilation.
+	Adjust tests on the number of lines as source code changed.
+	* gdb.base/foll-vfork-exit.c: Include limits.h.
+	(main): Add one line of statement before vfork.
+	* gdb.base/foll-vfork.c: Include limits.h and string.h.
+	(main): Add parameters argc and argv.  Get directory from
+	argv[0].
+	* gdb.base/foll-vfork.exp: Don't pass -DBASEDIR in compilation.
+	(setup_gdb): Set tbreak to skip some source lines.
+	* gdb.multi/bkpt-multi-exec.c: Include limits.h.
+	(main): Add parameters argc and argv.  Get directory from
+	argv[0].
+	* gdb.multi/bkpt-multi-exec.exp: Don't pass -DBASEDIR in
+	compilation.
+	* gdb.multi/multi-arch-exec.c: Include limits.h and string.h.
+	(main): Add parameters argc and argv.  Get directory from
+	argv[0].
+	* gdb.multi/multi-arch-exec.exp: Don't pass -DBASEDIR in
+	compilation.
+
+2016-02-01  Doug Evans  <dje@google.com>
+
+	* gdb.base/skip.exp: Clean up multiple references to same test name.
+
+2016-02-01  Pedro Alves  <palves@redhat.com>
+
+	PR remote/19496
+	* gdb.threads/forking-threads-plus-breakpoint.exp
+	(displaced_stepping_supported): New global.
+	(probe_displaced_stepping_support): New procedure.
+	(do_test): Add 'displaced' parameter, and use it.
+	(top level): Check for displaced stepping support.  Add displaced
+	stepping on/off testing axis.
+
+2016-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.mi/mi-vla-fortran.exp: Add XFAIL for accessing unassociated
+	pointer.  Don't perform further tests on the unassociated pointer
+	if the first test fails.
+
+2016-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/max-value-size.c: New file.
+	* gdb.base/max-value-size.exp: New file.
+	* gdb.base/huge.exp: Disable max-value-size for this test.
+
+2016-01-28  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* gdb.dlang/demangle.exp: Sync tests from libiberty testsuite.
+
+2016-01-28  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.fortran/vla-value.exp: Wrap test with with_timeout_factor.
+
+2016-01-25  Pedro Alves  <palves@redhat.com>
+
+	PR threads/19461
+	* gdb.base/fork-running-state.c: New file.
+	* gdb.base/fork-running-state.exp: New file.
+
+2016-01-25  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/19494
+	* gdb.base/catch-fork-kill.c: New file.
+	* gdb.base/catch-fork-kill.exp: New file.
+
+2016-01-25  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/step-sw-breakpoint-adjust-pc.exp (foreach_with_prefix):
+	Delete, moved to lib/gdb.exp.
+	* gdb.threads/forking-threads-plus-breakpoint.exp
+	(foreach_with_prefix): Likewise.
+	* gdb.threads/process-dies-while-handling-bp.exp
+	(foreach_with_prefix): Likewise.
+	* lib/gdb.exp (foreach_with_prefix): New procedure.
+
+2016-01-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/backtrace.exp: Bump stack collection fudge factor.
+	* gdb.trace/entry-values.exp: Bump stack collection fudge factor.
+
+2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/unavailable-dwarf-piece.exp: Fix bitfield handling on big
+	endian targets.
+
+2016-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	Fix testsuite compatibility with Guile.
+	* gdb.gdb/selftest.exp (send ^C to child process): Drop expected Thread
+	number.
+
+2016-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix testsuite compatibility with Guile.
+	* gdb.gdb/selftest.exp (send ^C to child process): Accept also Thread.
+	(thread 1): New test for backtrace through signal handler.
+
+2016-01-22  Yao Qi  <yao.qi@linaro.org>
+
+	PR testsuite/19491
+	* gdb.base/multi-forks.c: Include
+	../lib/unbuffer_output.c
+	(main): Call gdb_unbuffer_output.
+
+2016-01-21  Doug Evans  <dje@google.com>
+
+	* lib/ada.exp (gdb_compile_ada): Fix typo.
+
+2016-01-21  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.base/break-fun-addr.exp: New file.
+	* gdb.base/break-fun-addr1.c: New file.
+	* gdb.base/break-fun-addr2.c: New file.
+
+2016-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.python/py-pp-maint.exp: Change/add enum flag tests.
+	* gdb.python/py-pp-maint.c (enum flag_enum): Use more complex
+	enum flag values.
+
+2016-01-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.base/gnu_vector.exp: Re-establish handling for should_kfail
+	when GDB can not set the vector return value.  Add more comments
+	for clarification.
+
+2016-01-20  Antoine Tremblay  <antoine.tremblay@ericsson.com>
+
+	* gdb.trace/tspeed.exp:  Use shlib instead of libs in gdb_compile
+	command.
+
+2016-01-19  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (DO_RUNTEST): Add --status and update usages.
+
+2016-01-19  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (check-single): Pass --status to runtest.
+	(check/%.exp): Likewise.
+
+2016-01-19  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* Makefile.in (check-parallel): Propagate return code from make
+	do-check-parallel.
+
+2016-01-19  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/ftrace.exp: Fix expected message on continue.
+	* gdb.trace/pending.exp: Fix expected message on continue.
+	* gdb.trace/trace-break.exp: Fix expected message on continue.
+
+2016-01-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (gdb_test): Remove unused global references.
+
+2016-01-18  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/async-shell.exp: Adjust expected output.
+	* gdb.base/dprintf-non-stop.exp: Adjust expected output.
+	* gdb.base/siginfo-thread.exp: Adjust expected output.
+	* gdb.base/watchpoint-hw-hit-once.exp: Adjust expected output.
+	* gdb.java/jnpe.exp: Adjust expected output.
+	* gdb.threads/clone-new-thread-event.exp: Adjust expected output.
+	* gdb.threads/continue-pending-status.exp: Adjust expected output.
+	* gdb.threads/leader-exit.exp: Adjust expected output.
+	* gdb.threads/manythreads.exp: Adjust expected output.
+	* gdb.threads/pthreads.exp: Adjust expected output.
+	* gdb.threads/schedlock.exp: Adjust expected output.
+	* gdb.threads/siginfo-threads.exp: Adjust expected output.
+	* gdb.threads/signal-command-multiple-signals-pending.exp: Adjust
+	expected output.
+	* gdb.threads/signal-delivered-right-thread.exp: Adjust expected
+	output.
+	* gdb.threads/sigthread.exp: Adjust expected output.
+	* gdb.threads/watchpoint-fork.exp: Adjust expected output.
+
+2016-01-18  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.guile/scm-section-script.c: Replace @progbits with
+	%progbits.
+	* gdb.python/py-section-script.c: Likewise.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/tids.exp: Test star wildcard ranges.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/tids.exp (thr_apply_info_thr_error): Remove "p 1234"
+	command from "thread apply" invocation.
+	(thr_apply_info_thr_invalid): Default the expected output to the
+	input tid list.
+	(top level): Add tests that use convenience variables.  Add tests
+	for "thread apply" with a valid TID list, but missing the command.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/default.exp: Expect $_gthread as well.
+	* gdb.multi/tids.exp: Test $_gthread.
+	* gdb.threads/thread-specific.exp: Test $_gthread.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/tids.exp: Test "info threads -gid".
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/tids.exp: Test InferiorThread.global_num and
+	Breakpoint.thread.
+	* gdb.python/py-infthread.exp: Test InferiorThread.global_num.
+
+2016-01-07  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/break.exp: Adjust to output changes.
+	* gdb.base/hbreak2.exp: Likewise.
+	* gdb.base/sepdebug.exp: Likewise.
+	* gdb.base/watch_thread_num.exp: Likewise.
+	* gdb.linespec/keywords.exp: Likewise.
+	* gdb.multi/info-threads.exp: Likewise.
+	* gdb.threads/thread-find.exp: Likewise.
+	* gdb.multi/tids.c: New file.
+	* gdb.multi/tids.exp: New file.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-infthread.exp: Test InferiorThread.inferior.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/default.exp: Expect $_inferior as well.
+	* gdb.multi/base.exp: Test $_inferior.
+
+2016-01-13  Pedro Alves  <palves@redhat.com>
+
+	PR breakpoints/19388
+	* gdb.base/catch-signal-siginfo-cond.c: New file.
+	* gdb.base/catch-signal-siginfo-cond.exp: New file.
+
+2016-01-12  Josh Stone  <jistone@redhat.com>
+	    Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* gdb.base/catch-syscall.c (do_execve): New variable.
+	(main): Conditionally trigger an execve.
+	* gdb.base/catch-syscall.exp: Enable testing for remote targets.
+	(test_catch_syscall_execve): New, check entry/return across execve.
+	(do_syscall_tests): Call test_catch_syscall_execve.
+
+2016-01-12  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/random-signal.exp (do_test): New procedure, with body
+	of testcase moved in.
+
+2016-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/funcargs.exp (finish from indirectly called function):
+	Reintroduce the case for 'First'.
+
+2016-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
+	(tcatch_vfork_then_child_follow_exec)
+	(tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork
+	identification.
+
+2016-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.guile/scm-value.exp (test_value_in_inferior): Set print elements
+	and repeats to unlimited.
+	* gdb.python/py-value.exp: Likewise.
+	* lib/gdb.exp (gdb_has_argv0): Save and temporarily set print elements
+	and repeats to unlimited.
+
+2016-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.multi/goodbye.c: Fix compilation warnings by adding return types
+	and reordering the functions.
+	* gdb.multi/hangout.c: Likewise.
+	* gdb.multi/hello.c: Likewise.
+
+2016-01-08  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.perf/lib/perftest/perftest.py: Change relative imports to
+	absolute.
+	(SingleStatisticTestResult.report): Use dict.keys instead of
+	dict.iterkeys.
+
+2016-01-06  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-infthread.exp: Fix typo.  Expect t0.num to be 1.
+
+2016-01-04  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/dlopen.exp: New.
+	* gdb.btrace/dlopen.c: New.
+	* gdb.btrace/dlopen-dso.c: New.
+
+2015-12-25  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* lib/gdb.exp (gdb_test): Update comments to clarify that the
+	PATTERN argument is optional.
+
+2015-12-24  Joel Brobecker  <brobecker@adacore.com>
+
+	* lib/ada.exp (target_compile_ada_from_dir): New function.
+	(gdb_compile_ada): Reimplement avoiding the use of project files.
+	* gdb.ada/gnat_ada.gpr: Delete.
+	* gdb.ada/cond_lang.exp: Adjust test to make path before
+	filename optional.
+	* gdb.ada/small_reg_param.exp: Likewise.
+
+2015-12-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/foll-vork.exp: Remove HP-UX special case.
+
+2015-12-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* lib/mi-support.exp (mi_run_cmd_full): Add an expect for the CLI jump
+	case.
+
+2015-12-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.base/break.exp: Remove dead code.
+	* gdb.base/sepdebug.exp: Likewise.
+
+2015-12-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.asm/asm-source.exp: Remove HP-UX references.
+	* gdb.base/annota1.exp: Likewise.
+	* gdb.base/annota3.exp: Likewise.
+	* gdb.base/attach.exp: Likewise.
+	* gdb.base/bigcore.exp: Likewise.
+	* gdb.base/break.exp: Likewise.
+	* gdb.base/call-ar-st.exp: Likewise.
+	* gdb.base/callfuncs.exp: Likewise.
+	* gdb.base/catch-fork-static.exp: Likewise.
+	* gdb.base/display.exp: Likewise.
+	* gdb.base/foll-exec-mode.exp: Likewise.
+	* gdb.base/foll-exec.exp: Likewise.
+	* gdb.base/foll-fork.exp: Likewise.
+	* gdb.base/foll-vfork.exp: Likewise.
+	* gdb.base/funcargs.exp: Likewise.
+	* gdb.base/hbreak2.exp: Likewise.
+	* gdb.base/inferior-died.exp: Likewise.
+	* gdb.base/interrupt.exp: Likewise.
+	* gdb.base/multi-forks.exp: Likewise.
+	* gdb.base/nodebug.exp: Likewise.
+	* gdb.base/sepdebug.exp: Likewise.
+	* gdb.base/solib1.c: Likewise.
+	* gdb.base/step-test.exp: Likewise.
+	* gdb.mi/non-stop.c: Likewise.
+	* gdb.mi/pthreads.c: Likewise.
+	* gdb.multi/bkpt-multi-exec.ex: Likewise.
+	* gdb.threads/pthreads.c: Likewise.
+	* gdb.threads/staticthreads.exp: Likewise.
+	* lib/future.exp: Likewise.
+	* lib/gdb.exp: Likewise.
+	* gdb.base/so-indr-cl.c: Remove.
+	* gdb.base/so-indr-cl.exp: Likewise.
+	* gdb.base/solib.c: Likewise.
+	* gdb.base/solib.exp: Likewise.
+	* gdb.base/solib2.c: Likewise.
+
+2015-12-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* gdb.base/break.exp: Remove references to HP CC/aCC compilers.
+	* gdb.base/call-ar-st.exp: Likewise.
+	* gdb.base/callfuncs.exp: Likewise.
+	* gdb.base/condbreak.exp: Likewise.
+	* gdb.base/constvars.exp: Likewise.
+	* gdb.base/hbreak2.exp: Likewise.
+	* gdb.base/langs.exp: Likewise.
+	* gdb.base/list.exp: Likewise.
+	* gdb.base/long_long.exp: Likewise.
+	* gdb.base/ptype.exp: Likewise.
+	* gdb.base/scope.exp: Likewise.
+	* gdb.base/signals.exp: Likewise.
+	* gdb.base/so-impl-ld.exp: Likewise.
+	* gdb.base/varargs.exp: Likewise.
+	* gdb.base/volatile.exp: Likewise.
+	* gdb.base/whatis.exp: Likewise.
+	* gdb.cp/cplusfuncs.exp: Likewise.
+	* gdb.cp/inherit.exp: Likewise.
+	* gdb.cp/local.exp: Likewise.
+	* gdb.cp/member-ptr.exp: Likewise.
+	* gdb.cp/method.exp: Likewise.
+	* gdb.cp/overload.exp: Likewise.
+	* gdb.cp/templates.exp: Likewise.
+	* gdb.stabs/weird.exp: Likewise.
+	* lib/compiler.c: Likewise.
+	* lib/compiler.cc: Likewise.
+	* lib/cp-support.exp: Likewise.
+	* lib/gdb.exp: Likewise.
+
+2015-12-20  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* configure.ac: Remove HP-UX case.
+	* configure: Regenerate.
+
+2015-12-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* lib/gdb.exp (gdb_compile): Add function doc.
+
+2015-12-17  Pedro Alves  <palves@redhat.com>
+
+	PR threads/19354
+	* gdb.multi/info-threads.exp: New file.
+
+2015-12-15  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.trace/ftrace.exp: Set arg0exp to "$x0" if target
+	is aarch64*-*-*.
+
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/history-duplicates.exp: Skip if no readline support.
+
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/gdbinit-history.exp: Skip for remote-host testing.
+
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/gdbhistsize-history.exp: Skip for remote-host testing.
+
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/completion.exp: Skip tests that interrupt GDB with
+	ctrl-C if nointerrupts target property is set.
+	* gdb.base/double-prompt-target-event-error.exp: Likewise.
+	* gdb.base/paginate-after-ctrl-c-running.exp: Likewise.
+	* gdb.base/paginate-bg-execution.exp: Likewise.
+	* gdb.base/paginate-execution-startup.exp: Likewise.
+	* gdb.base/random-signal.exp: Likewise.
+	* gdb.base/range-stepping.exp: Likewise.
+	* gdb.cp/annota2.exp: Likewise.
+	* gdb.cp/annota3.exp: Likewise.
+	* gdb.gdb/selftest.exp: Likewise.
+	* gdb.threads/continue-pending-status.exp: Likewise.
+	* gdb.threads/leader-exit.exp: Likewise.
+	* gdb.threads/manythreads.exp: Likewise.
+	* gdb.threads/pthreads.exp: Likewise.
+	* gdb.threads/schedlock.exp: Likewise.
+	* gdb.threads/sigthread.exp: Likewise.
+
+2015-12-11  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.base/execl-update-breakpoints.exp (main): Enable for target
+	remote.
+	* gdb.base/foll-exec-mode.exp (main): Disable for target remote.
+	* gdb.base/foll-exec.exp (main): Enable for target remote.
+	* gdb.base/foll-fork.exp (main): Likewise.
+	* gdb.base/foll-vfork.exp (main): Likewise.
+	* gdb.base/multi-forks.exp (main): Likewise, and use clean_restart.
+	(proc continue_to_exit_bp_loc): Use clean_restart.
+	* gdb.base/pie-execl.exp (main): Disable for target remote.
+	* gdb.base/watch-vfork.exp (main): Enable for target remote.
+	* gdb.mi/mi-nsthrexec.exp (main): Likewise.
+	* gdb.threads/execl.exp (main): Likewise.
+	* gdb.threads/fork-child-threads.exp (main): Likewise.
+	* gdb.threads/fork-plus-threads.exp (main): Disable for target
+	remote.
+	* gdb.threads/fork-thread-pending.exp (main): Enable for target
+	remote.
+	* gdb.threads/linux-dp.exp (check_philosopher_stack): Allow
+	pid.tid style ptids, instead of just tid.
+	* gdb.threads/thread-execl.exp (main): Enable for target remote.
+	* gdb.threads/watchpoint-fork.exp (main): Likewise.
+	* gdb.trace/report.exp (use_collected_data): Allow pid.tid style
+	ptids, instead of just tid.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/list.exp (test_list_forward): Add end of file error
+	test.
+	(test_repeat_list_command): Add end of file error test.
+	(test_list_backwards): Add beginning of file error test.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/list.exp (test_list_invalid_args): New function,
+	defined, and called.
+
+2015-12-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/list.exp (test_list): Make test names unique.
+
+2015-12-11  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/coremaker2.c: Remove.
+
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/base.exp: Remove stale "spaces" references.
+
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+	* gdb.multi/base.exp: Don't use nowarnings.
+	* gdb.multi/bkpt-multi-exec.exp: Don't use nowarnings.
+	* gdb.multi/hangout.c: Include stdio.h.
+	* gdb.multi/hello.c: Include stdlib.h.
+	* gdb.multi/multi-arch-exec.c: Include stdlib.h.
+	* gdb.multi/multi-arch-exec.exp: Don't use nowarnings.
+	* gdb.multi/multi-arch.exp: Don't use nowarnings.
+
+2015-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.dwarf2/dw2-ranges-base.c: New file.
+	* gdb.dwarf2/dw2-ranges-base.exp: New file.
+	* lib/dwarf.exp (namespace eval Dwarf): Add new variables to
+	support additional line table, and debug ranges generation.
+	(Dwarf::ranges): New function, generate .debug_ranges.
+	(Dwarf::lines): Support generating simple line table programs.
+	(Dwarf::assemble): Initialise new namespace variables.
+
+2015-12-09  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.base/async.exp (proc test_background): Add case for
+	asynchronous execution not supported.
+
+2015-12-09  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal
+	  format and change test names to make them unique.
+
+2015-12-09  Ruslan Kabatsayev  <b7.10110111@gmail.com>
+	    Pedro Alves  <pedro@redhat.com>
+
+	PR gdb/18702
+	Add checking of floatformats setup on x86_64 hosts.
+	* gdb.arch/i386-float.S (main): Load bigval and smallval.
+	(smallval, bigval): New labels/constants.
+	* gdb.arch/i386-float.exp: Use with_test_prefix and test "info
+	float" after loading bigval and smallval.
+
+2015-12-07  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/fun_overload_menu.exp: New testcase.
+	* gdb.ada/fun_overload_menu/foo.adb: New testcase.
+
+2015-12-04  Josh Stone  <jistone@redhat.com>
+
+	* gdb.base/catch-fork-static.exp: New.
+
+2015-12-03  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/sizeof.c: Don't include stdio.h and
+	../lib/unbuffer_output.c.
+	(main): New variable 'size' and 'value'.  Remove printf and
+	gdb_unbuffer_output.  Assign return value to size and value.
+	* gdb.base/sizeof.exp: Remove the checking to gdb,noinferiorio
+	at the beginning.
+	(check_sizeof): Check the result by printing variable 'size'.
+	(check_valueof): Check the result by printing variable 'value'.
+
+2015-12-01  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/disp-step-syscall.exp: Define syscall instruction
+	for aarch64*-*-linux* target.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/no-unwaited-for-left.exp: Remove setup_kfail calls.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
+	Handle non-stop mode vCont replies.
+
+2015-11-30  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/dprintf-non-stop.exp: Use build_executable instead of
+	prepare_for_testing.  Start gdb with "set non-stop on" appended to
+	GDBFLAGS.  Lax expected stop output.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/arm-neon.exp: New.
+	* gdb.arch/arm-neon.c: New.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.cp/annota2.exp: Rewrite the pattern using multi_line.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.cp/annota2.exp: Allow multiple occurrences of the
+	frames-invalid annotation.
+
+2015-11-27  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.cp/annota2.exp: Use ${frames_invalid}.
+
+2015-11-26  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.threads/names.exp: New file.
+	* gdb.threads/names.c: New file.
+	* README: Mention gdb,no_thread_names.
+
+2015-11-26  Markus Metzger  <markus.t.metzger@intel.com>
+
+	PR 19297
+	* lib/gdb.exp (skip_btrace_pt_tests): Check for a "GDB does not
+	support" error.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* gdb.base/display.exp: Expect displays to be sorted in ascending
+	order.  Use multi_line.
+	* gdb.base/solib-display.exp: Likewise.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* gdb.base/display.exp: Expect displays to be sorted in ascending
+	order.  Use multi_line.
+	* gdb.base/solib-display.exp: Likewise.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	PR 17539
+	* gdb.base/foll-exec-mode.exp: Adjust to GDB listing inferiors and
+	threads in ascending order.
+	* gdb.base/foll-fork.exp: Likewise.
+	* gdb.base/foll-vfork.exp: Likewise.
+	* gdb.base/multi-forks.exp: Likewise.
+	* gdb.mi/mi-nonstop.exp: Likewise.
+	* gdb.mi/mi-nsintrall.exp: Likewise.
+	* gdb.multi/base.exp: Likewise.
+	* gdb.multi/multi-arch.exp: Likewise.
+	* gdb.python/py-inferior.exp: Likewise.
+	* gdb.threads/break-while-running.exp: Likewise.
+	* gdb.threads/execl.exp: Likewise.
+	* gdb.threads/gcore-thread.exp: Likewise.
+	* gdb.threads/info-threads-cur-sal.exp: Likewise.
+	* gdb.threads/kill.exp: Likewise.
+	* gdb.threads/linux-dp.exp: Likewise.
+	* gdb.threads/multiple-step-overs.exp: Likewise.
+	* gdb.threads/next-bp-other-thread.exp: Likewise.
+	* gdb.threads/step-bg-decr-pc-switch-thread.exp: Likewise.
+	* gdb.threads/step-over-lands-on-breakpoint.exp: Likewise.
+	* gdb.threads/step-over-trips-on-watchpoint.exp: Likewise.
+	* gdb.threads/thread-find.exp: Likewise.
+	* gdb.threads/tls.exp: Likewise.
+	* lib/mi-support.exp (mi_reverse_list): Delete.
+	(mi_check_thread_states): No longer reverse list.
+
+2015-11-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-inferior.exp: Use with_test_prefix.  Consistently
+	use lowercase.
+
+2015-11-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.trace/actions.c: Include trace-common.h.
+	(main): Add a location for a fast tracepoint.
+	* gdb.trace/save-trace.exp: Set a fast tracepoint in addition to
+	the normal tracepoints.
+	(gdb_verify_tracepoints): Adjust number of expected tracepoints.
+
+2015-11-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* save-trace.exp: Factor out code to these...
+	(gdb_save_tracepoints): New.
+	(gdb_load_tracepoints): New.
+	(do_save_load_test): New.
+
+2015-11-23  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.base/asmlabel.exp: New test.
+	* gdb.base/asmlabel.c: New test case.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.base/wrong_frame_bt_full-main.c: New file.
+	* gdb.base/wrong_frame_bt_full-opaque.c: New file.
+	* gdb.base/wrong_frame_bt_full.exp: New file.
+
+2015-11-23  Joel Brobecker  <brobecker@adacore.com>
+
+	* testsuite/gdb.ada/var_rec_arr.exp: Add "ptype a1(1)" test.
+
+2015-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* gdb.base/callfuncs.exp (fetch_all_registers): Filter out the
+	pstate register when comparing registers values in
+	sparc64-*-linux-gnu targets to avoid spurious differences.
+
+2015-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* gdb.arch/sparc-sysstep.c: Include unistd.h for getpid.
+
+2015-11-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/nested-subp1.exp: Pass executable, not executable name,
+	as type argument to gdb_compile.
+	* gdb.base/nested-subp2.exp: Likewise.
+	* gdb.base/nested-subp3.exp: Likewise.
+
+2015-11-17  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+	* lib/dwarf.exp (_note): Fix left shift of negative value.
+	* gdb.trace/trace-condition.exp: Likewise.
+
+2015-11-13  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/call-sc.exp (test_scalar_returns): Remove the
+	comments about d10v.
+	(test_scalar_returns): Likewise.
+	* gdb.base/d10v.ld: Remove.
+	* gdb.base/overlays.exp: Remove the target triplet checking for
+	d10v-*-*.
+	* gdb.base/structs.exp (test_struct_returns): Remove the
+	comments about d10v.
+	(test_struct_calls): Likewise.
+
+2015-11-13  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/gnu_vector.exp: Check the return value by "p res".
+	* gdb.base/gnu_vector.c: Don't include stdio.h.
+	(main): Don't print res and call add_some_intvecs.
+
+2015-11-11  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/change-loc.h: include "trace-common.h", remove SYMBOL
+	macro.
+	(func5): Removed.
+	(func4): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/ftrace-lock.c: include "trace-common.h", remove SYMBOL
+	macro.
+	(func): Removed.
+	(thread_function): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/ftrace.c: include "trace-common.h", remove SYMBOL macro.
+	(func): Remove.
+	(marker): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/pendshr1.c: include "trace-common.h", remove SYMBOL macro.
+	(pendfunc1): Remove.
+	(pendfunc): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/pendshr2.c: include "trace-common.h", remove SYMBOL macro.
+	(foo): Remove.
+	(pendfunc2): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/trace-break.c: include "trace-common.h", remove SYMBOL
+	macro.
+	(func): Remove.
+	(marker): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/trace-common.h: New header.
+	* gdb.trace/trace-condition.c: include "trace-common.h", remove SYMBOL
+	macro.
+	(func): Remove.
+	(marker): Use FAST_TRACEPOINT_LABEL.
+	* gdb.trace/trace-mt.c: include "trace-common.h", remove SYMBOL macro.
+	(func): Remove.
+	(thread_function): Use FAST_TRACEPOINT_LABEL.
+
+2015-11-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/backtrace.exp: Use global fpreg/spreg definition, add $
+	in front.
+	* gdb.trace/change-loc.exp: Use global pcreg definition.
+	* gdb.trace/collection.exp: Use global pcreg/fpreg/spreg definition.
+	* gdb.trace/entry-values.exp: Use global spreg definition, add $
+	in front.
+	* gdb.trace/mi-trace-frame-collected.exp: Use global pcreg definition.
+	* gdb.trace/pending.exp: Likewise.
+	* gdb.trace/report.exp: Use global pcreg/fpreg/spreg definition.
+	* gdb.trace/trace-break.exp: Likewise.
+	* gdb.trace/trace-condition.exp: Use global pcreg definition, add $
+	in front.
+	* gdb.trace/unavailable.exp: Use global pcreg/fpreg/spreg definition.
+	* gdb.trace/while-dyn.exp: Use global fpreg definition, add $
+	in front.
+	* lib/trace-support.exp: Define fpreg, spreg, pcreg variables.
+
+2015-11-09  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.ada/fin_fun_out: New testcase.
+
+2015-11-07  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.dwarf2/data-loc.exp (Dwarf::assemble): Don't hardcode
+	value associated with DW_AT_byte_size.
+	* gdb.dwarf2/dynarr-ptr.exp (Dwarf::assemble): Don't hardcode
+	constants for DW_AT_byte_size, DW_AT_lower_bound, and
+	DW_AT_upper_bound.
+
+2015-11-07  Kevin Buettner  <kevinb@redhat.com>
+
+	* lib/gdb (gdb_target_symbol_prefix_flags_asm): New proc.
+	(gdb_target_symbol_prefix_flags): Define in terms of _asm
+	version.
+	* gdb.arch/i386-float.exp, gdb.arch/i386-permbkpt.exp,
+	gdb.dwarf2/dw2-canonicalize-type.exp,
+	gdb.dwarf2/dw2-compdir-oldgcc.exp, gdb.dwarf2/dw2-minsym-in-cu.exp,
+	gdb.dwarf2/dw2-op-stack-value.exp, gdb.dwarf2/dw2-unresolved.exp,
+	gdb.dwarf2/fission-reread.exp, gdb.dwarf2/pr13961.exp: Use flags
+	provided by gdb_target_symbol_prefix_flags_asm.
+	* gdb.dwarf2/dw2-canonicalize-type.S, gdb.dwarf2/dw2-compdir-oldgcc.S,
+	testsuite/gdb.dwarf2/dw2-minsym-in-cu.S,
+	testsuite/gdb.dwarf2/dw2-unresolved-main.c,
+	testsuite/gdb.dwarf2/dw2-unresolved.S, gdb.dwarf2/fission-reread.S,
+	gdb.dwarf2/pr13961.S: Define and use SYMBOL macro (and supporting
+	macros where needed).  Use this macro for symbols which require
+	the prefix provided by SYMBOL_PREFIX.
+
+2015-11-05  Kevin Buettner  <kevinb@redhat.com>
+
+	* lib/gdb.exp (gdb_target_symbol_prefix, gdb_target_symbol):
+	New procs.
+	* lib/dwarf.exp (_handle_DW_TAG): Handle attribute values,
+	representing expressions, of more than one list element.
+	* gdb.dwarf2/atomic-type.exp (Dwarf::assemble): Use gdb_target_symbol
+	to prepend linker symbol prefix to f.
+	* gdb.dwarf2/data-loc.exp (Dwarf::assemble): Likewise, for
+	table_1 and table_2.
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.exp (Dwarf::assemble):
+	Likewise, for f and g.
+	* gdb.dwarf2/dw2-ifort-parameter.exp (Dwarf::assemble): Likewise,
+	for ptr.
+	* gdb.dwarf2/dw2-regno-invalid.exp (Dwarf::assemble): Likewise,
+	for main.
+	* gdb.dwarf2/dynarr-ptr.exp (Dwarf::assemble): Likewise, for
+	table_1_ptr and table_2_ptr.
+
+2015-11-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.mi/mi-vla-fortran.exp (evaluate allocated vla): Permit any data.
+
+2015-11-04  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.reverse/s390-mvcle.c: New test.
+	* gdb.reverse/s390-mvcle.exp: New file.
+	* lib/gdb.exp: Enable reverse tests on s390*-linux.
+
+2015-11-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.reverse/readv-reverse.exp: Obvious typo fixed.
+
+2015-11-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.reverse/fstatat-reverse.exp: Set breakpoint on marker1 after
+	reaching marker2.
+	* gdb.reverse/getresuid-reverse.exp: Likewise.
+	* gdb.reverse/pipe-reverse.exp: Likewise.
+	* gdb.reverse/readv-reverse.exp: Likewise.
+	* gdb.reverse/recvmsg-reverse.exp: Likewise.
+	* gdb.reverse/time-reverse.exp: Likewise.
+	* gdb.reverse/waitpid-reverse.exp: Likewise and add KFAILs.
+
+2015-10-30  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.threads/wp-replication.c (watch_count_done): Remove.
+	(empty_cycle): Remove.
+	(main): Don't call empty_cycle.  Don't use watch_count_done.
+	* gdb.threads/wp-replication.exp: Don't set breakpoint on
+	empty_cycle.  Rewrite the code counting HW watchpoints.
+
+2015-10-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
+
+	* gdb.reverse/fstatat-reverse.c: New test.
+	* gdb.reverse/fstatat-reverse.exp: New file.
+	* gdb.reverse/getresuid-reverse.c: New test.
+	* gdb.reverse/getresuid-reverse.exp: New file.
+	* gdb.reverse/pipe-reverse.c: New test.
+	* gdb.reverse/pipe-reverse.exp: New file.
+	* gdb.reverse/readv-reverse.c: New test.
+	* gdb.reverse/readv-reverse.exp: New file.
+	* gdb.reverse/recvmsg-reverse.c: New test.
+	* gdb.reverse/recvmsg-reverse.exp: New file.
+	* gdb.reverse/time-reverse.c: New test.
+	* gdb.reverse/time-reverse.exp: New file.
+	* gdb.reverse/waitpid-reverse.c: New test.
+	* gdb.reverse/waitpid-reverse.exp: New file.
+
+2015-10-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.ada/access_to_packed_array.exp: Fix typos erroring the testfile.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	PR symtab/17391
+	* lib/dwarf.exp (_location): Add support for DW_OP_regx.
+	* gdb.dwarf2/bad-regnum.c: New file.
+	* gdb.dwarf2/bad-regnum.exp: New file.
+
+2015-10-26  Doug Evans  <dje@google.com>
+
+	PR python/18938
+	* gdb.python/python.exp: Add test for symlink from .py file to .notpy
+	file.
+
+2015-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.compile/compile.exp (compile code globalvar): Update expectation
+	for a change by "Mention language in compile error message".
+
+2015-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	PR python/18073
+	* gdb.python/py-type.c (C::a_method): New.
+	(C::a_const_method): New.
+	(C::a_static_method): New.
+	(a_function): New.
+	* gdb.python/py-type.exp (test_fields): Test getting fields
+	from function and method.
+
+2015-10-21  Keven Boell  <keven.boell@intel.com>
+
+	* gdb.fortran/vla-alloc-assoc.exp: New file.
+	* gdb.fortran/vla-datatypes.exp: New file.
+	* gdb.fortran/vla-datatypes.f90: New file.
+	* gdb.fortran/vla-history.exp: New file.
+	* gdb.fortran/vla-ptype-sub.exp: New file.
+	* gdb.fortran/vla-ptype.exp: New file.
+	* gdb.fortran/vla-sizeof.exp: New file.
+	* gdb.fortran/vla-sub.f90: New file.
+	* gdb.fortran/vla-value-sub-arbitrary.exp: New file.
+	* gdb.fortran/vla-value-sub-finish.exp: New file.
+	* gdb.fortran/vla-value-sub.exp: New file.
+	* gdb.fortran/vla-value.exp: New file.
+	* gdb.fortran/vla-ptr-info.exp: New file.
+	* gdb.mi/mi-vla-fortran.exp: New file.
+	* gdb.mi/vla.f90: New file.
+
+2015-10-21  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/freebpcmd.exp: Use with_timeout_factor instead
+	of hardwired timeout value.
+
+2015-10-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* gdb.dwarf2/dw2-regno-invalid.exp: New file.
+	* lib/dwarf.exp (Dwarf): Add DW_OP_bregx.
+
+2015-10-19  Josh Stone  <jistone@redhat.com>
+
+	* gdb.base/catch-syscall.c: Include <sched.h>.
+	(unknown_syscall): New variable.
+	(main): Trigger a vfork and an unknown syscall.
+	* gdb.base/catch-syscall.exp (vfork_syscalls): New variable.
+	(unknown_syscall_number): Likewise.
+	(check_call_to_syscall): Accept an optional syscall pattern.
+	(check_return_from_syscall): Likewise.
+	(check_continue): Likewise.
+	(test_catch_syscall_without_args): Check for vfork and ENOSYS.
+	(test_catch_syscall_skipping_return): New test toggling off 'catch
+	syscall' to step over the syscall return, then toggling back on.
+	(test_catch_syscall_mid_vfork): New test turning on 'catch syscall'
+	during a PTRACE_EVENT_VFORK stop, in the middle of a vfork syscall.
+	(do_syscall_tests): Call test_catch_syscall_without_args and
+	test_catch_syscall_mid_vfork.
+	(test_catch_syscall_without_args_noxml): Check for vfork and ENOSYS.
+	(fill_all_syscalls_numbers): Initialize unknown_syscall_number.
+
+2015-10-19  Andrew Stubbs  <ams@codesourcery.com>
+
+	* gdb.cp/inherit.exp (print g_vB, print g_vC, print g_vD,
+	print g_vE): Add new pass patterns.
+	* gdb.cp/virtbase.exp (print *this, print *(D *) e): Allow GDB to
+	print various symbol names for vptr fields.
+
+2015-10-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/dbx.exp (test_func): Remove xfails, update expected
+	results.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/disp-step-insn-reloc.exp: New test case.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdb.exp (support_displaced_stepping): Return 1 if target
+	is aarch64*-*-linux*.
+
+2015-10-12  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/insn-reloc.c (can_relocate_bcond): Rename to ...
+	(can_relocate_bcond_true): ... it.
+	(can_relocate_bcond_false): New function.
+	(foo): Likewise.
+	(can_relocate_bl): Likewise.
+	(testcases) [__aarch64__]: Add can_relocate_bcond_false and
+	can_relocate_bl.
+
+2015-10-12  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.base/nested-addr.c: New file.
+	* gdb.base/nested-addr.exp: New testcase.
+
+2015-10-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/vdso.c (main): Remove breakpoint markers.
+	* gdb.btrace/vdso.exp: Change stepping command to "next" and ignore
+	its output.  Ignore the output of "record goto begin" and instead
+	check that GDB is replaying.
+
+2015-10-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/a2-run.exp (maybe_exp_continue): New procedure.
+	(top level): Use it in the run with no args test.
+
+2015-10-08  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* gdb.dlang/properties.exp: New file.
+
+2015-10-02  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.dwarf2/staticvirtual.exp: Generalize regexp so it can match
+	whether or not address 0x1000 is mapped on the target.
+
+2015-09-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.python/py-type.exp: Do not run tests if binaries fail to
+	build.
+
+2015-09-30  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/tsx.exp: Consider multiple correct outputs in the record
+	instruction-history test.
+
+2015-09-28  Doug Evans  <dje@google.com>
+
+	* gdb.base/gcore.c (array_func): Add reference to static_array.
+
+2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.gdb/selftest.exp (do_steps_and_nexts): Adjust expected
+	source line.
+
+2015-09-24 Sandra Loosemore <sandra@codesourcery.com>
+
+	* gdb.cp/classes.exp (test_enums): Generalize regexp to allow
+	short or char as base type.
+
+2015-09-23 Sandra Loosemore <sandra@codesourcery.com>
+
+	* gdb.cp/var-tag.exp (do_global_tests): Generalize opt_underlying
+	to allow any size enum.
+
+2015-09-23  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/array_ptr_renaming.exp: New testcase.
+	* gdb.ada/array_ptr_renaming/foo.adb: New file.
+	* gdb.ada/array_ptr_renaming/pack.ads: New file.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* gdb.trace/ftrace-lock.c: New file.
+	* gdb.trace/ftrace-lock.exp: New file.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* gdb.arch/insn-reloc.c: New file.
+	* gdb.arch/ftrace-insn-reloc.exp: New file.
+
+2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* gdb.trace/change-loc.h (func4) [__aarch64__]: Add a nop
+	instruction.
+	* gdb.trace/pendshr1.c (pendfunc): Likewise.
+	* gdb.trace/pendshr2.c (pendfunc2): Likewise.
+	* gdb.trace/range-stepping.c: Likewise.
+	* gdb.trace/trace-break.c: Likewise.
+	* gdb.trace/trace-mt.c (thread_function): Likewise.
+	* gdb.trace/ftrace.c (marker): Likewise.
+	* gdb.trace/trace-condition.c (marker): Likewise.
+	* gdb.trace/ftrace.exp: Enable ftrace test if is_aarch64_target.
+	* gdb.trace/trace-condition.exp: Set pcreg to "\$pc" if
+	is_aarch64_target.
+
+2015-09-18  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.dwarf2/dw2-bad-unresolved.c: New file.
+	* gdb.dwarf2/dw2-bad-unresolved.exp: New file.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/dso2dso.exp: Don't use directory prefix when setting
+	the breakpoint.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.mi/mi-pending.exp: Don't use directory prefix when setting
+	the pending breakpoint.  Remove timeout override for "Run till
+	MI pending breakpoint on pendfunc3 on thread 2" test.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.mi/mi-cli.exp: Don't require directory prefix in breakpoint
+	filename pattern.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.mi/mi-dprintf-pending.exp: Don't require directory prefix
+	in breakpoint filename pattern.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/global-var-nested-by-dso.exp: Call gdb_load_shlibs.
+
+2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.linespec/explicit.exp: Check for readline support for
+	tab-completion tests.  Fix obvious typo.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/multi-thread-step.exp: Test scheduler-locking on, step,
+	and replay.
+
+2015-09-18  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/non-stop.c: New.
+	* gdb.btrace/non-stop.exp: New.
+
+2015-09-17  Pierre Langlois  <pierre.langlois@arm.com>
+	    Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.trace/trace-condition.c: New file.
+	* gdb.trace/trace-condition.exp: New file.
+
+2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
+
+	* gdb.trace/ftrace.exp: (test_ftrace_condition) New function
+	for testing bytecode compilation.
+
+2015-09-16  Pedro Alves  <palves@redhat.com>
+	    Sandra Loosemore <sandra@codesourcery.com>
+
+	* gdb.threads/non-stop-fair-events.c (timeout): New global.
+	(SECONDS): Redefine.
+	(main): Call pthread_kill and alarm early.
+	* gdb.threads/non-stop-fair-events.exp: Probe displaced stepping
+	support.
+	(test): If the target can't hardware step and doesn't support
+	displaced stepping, increase the timeout.
+
+2015-09-16  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/non-stop-fair-events.exp (gdb_test_no_anchor)
+	(enable_debug): New procedures.
+	(test): Use them.  Bail out if waiting for threads fails.
+	(top level): Bail out if a test fails.
+
+2015-09-16  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.asm/asm-source.exp: Set asm-arch for
+	aarch64*-*-* target.
+	* gdb.asm/aarch64.inc: New file.
+
+2015-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/array_of_variable_length.exp: New testcase.
+	* gdb.ada/array_of_variable_length/foo.adb: New file.
+	* gdb.ada/array_of_variable_length/pck.adb: New file.
+	* gdb.ada/array_of_variable_length/pck.ads: New file.
+
+2015-09-15  Doug Evans  <dje@google.com>
+
+	* gdb.base/callfuncs.exp (do_function_calls): Handle clang naming
+	of function static local variable.
+
+2015-09-15  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+	* gdb.threads/tls-so_extern.exp: New test file.
+	* gdb.threads/tls-so_extern.c: New test file.
+	* gdb.threads/tls-so_extern_main.c: New test file.
+
+2015-09-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.opt/solib-intra-step-lib.c: New file.
+	* gdb.opt/solib-intra-step-main.c: New file.
+	* gdb.opt/solib-intra-step.exp: New file.
+
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/non-ldr-exc-3.exp (do_test): Use
+	gdb_continue_to_breakpoint instead of gdb_test_multiple.
+
+2015-09-14  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/hook-stop-continue.c: Delete.
+	* gdb.base/hook-stop-continue.exp: Delete.
+	* gdb.base/hook-stop-frame.c: Delete.
+	* gdb.base/hook-stop-frame.exp: Delete.
+	* gdb.base/hook-stop.c: New file.
+	* gdb.base/hook-stop.exp: New file.
+
+2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/access_to_packed_array.exp: New testcase.
+	* gdb.ada/access_to_packed_array/foo.adb: New file.
+	* gdb.ada/access_to_packed_array/pack.adb: New file.
+	* gdb.ada/access_to_packed_array/pack.ads: New file.
+
+2015-09-14  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/buffer-size.exp: Remove recording with unlimited BTS
+	buffer size test.
+
+2015-09-11  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.base/foll-exec.c: Add copyright header.  Fix
+	formatting issues.
+	* gdb.base/foll-exec.exp (zap_session): Delete proc.
+	(do_exec_tests): Use clean_restart in place of zap_session,
+	and for test initialization.  Fix formatting issues.  Use
+	fail in place of perror.
+	* gdb.base/pie-execl.exp (main): Use 'inferior_spawn_id' in
+	an expect statement to match an expression with output from
+	the program under debug.
+	* gdb.threads/non-ldr-exc-1.exp (do_test, main): Add
+	non-stop tests and use save_vars to enable non-stop in GDBFLAGS.
+	* gdb.threads/non-ldr-exc-2.exp: Likewise.
+	* gdb.threads/non-ldr-exc-3.exp: Likewise.
+	* gdb.threads/non-ldr-exc-4.exp: Likewise.
+
+2015-09-09  Doug Evans  <dje@google.com>
+
+	* gdb.python/py-prettyprint.exp: Check result of run_lang_tests.
+
+2015-09-09  Doug Evans  <dje@google.com>
+
+	* gdb.base/pie-execl.exp: Fix result test of build_executable.
+
+2015-09-09  Doug Evans  <dje@google.com>
+
+	* gdb.base/savedregs.exp: Fix typo.
+
+2015-09-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-cli.exp: Add CLI finish tests.
+
+2015-09-08  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.threads/hand-call-in-threads.exp: Make sure the thread
+	command actually switches threads.  Give up on remaining
+	tests if target fails to stop at breakpoint.
+
+2015-09-03  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/funcall_char.exp: New testcase.
+	* gdb.ada/funcall_char/foo.adb: New file.
+
+2015-09-01  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/complete.exp: Add "pck.ambiguous_func" to the relevant
+	expected outputs.  Add two testcases for completing ambiguous
+	functions.
+	* gdb.ada/complete/aux_pck.adb: New file.
+	* gdb.ada/complete/aux_pck.ads: New file.
+	* gdb.ada/complete/foo.adb: Pull Aux_Pck and call the two
+	Ambiguous_Func functions.
+	* gdb.ada/complete/pck.ads: Add an Ambiguous_Func function.
+	* gdb.ada/complete/pck.adb: Likewise.
+
+2015-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* lib/cell.exp (skip_cell_tests): Report UNRESOLVED on unexpected
+	failures to run the test program under GDB.
+
+2015-08-26  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.compile/compile-ifunc.exp (with_test_prefix): Force language
+	to C.
+
+2015-08-26  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/run-after-attach.exp: New test file.
+	* gdb.base/run-after-attach.c: New test file.
+
+2015-08-26  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.base/foll-exec-2.c: New test program.
+	* gdb.base/foll-exec-2.exp: New test.
+
+2015-08-25  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.base/nested-subp1.exp: New file.
+	* gdb.base/nested-subp1.c: New file.
+	* gdb.base/nested-subp2.exp: New file.
+	* gdb.base/nested-subp2.c: New file.
+	* gdb.base/nested-subp3.exp: New file.
+	* gdb.base/nested-subp3.c: New file.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb.server/connect-without-multi-process.c: New file.
+	* gdb.server/connect-without-multi-process.exp: New file.
+
+2015-08-24  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.opt/inline-markers.c: Make z int.
+
+2015-08-24  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.opt/inline-markers.c: Make z volatile.
+
+2015-08-24  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.opt/inline-bt.c: New volatile global z.
+	* gdb.opt/inline-cmds.c: Likewise.
+	* gdb.opt/inline-locals.c: Likewise.
+	* gdb.opt/inline-markers.c: New extern global z.
+	(marker): Use z.
+	(inline_fn): Likewise.
+
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+	* config/m32r-stub.exp: Remove file.
+	* gdb.base/call-ar-st.exp: Remove reference to sparclet.
+	* gdb.base/call-rt-st.exp: Likewise.
+	* gdb.base/call-strs.exp: Likewise.
+	* gdb.base/default.exp: Remove references to h8300-*-hms and
+	*-*-udi*.
+	* gdb.base/funcargs.exp: Remove reference to sparclet-*-*.
+
+2015-08-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.base/gnu_vector.exp: Try compilation with "-mcpu=native
+	-Wno-psabi" if "-mcpu=native" fails.  For the tests with "finish"
+	and "return" use KFAIL when GDB can not read/write the vector
+	return value.
+
+2015-08-21  Gary Benson <gbenson@redhat.com>
+
+	* gdb.trace/pending.exp: Cope with remote transfer warnings.
+
+2015-08-20  Pedro Alves  <palves@redhat.com>
+
+	* gdb.server/solib-list.exp: No longer expect an interior stop in
+	non-stop mode.
+
+2015-08-20  Pedro Alves  <palves@redhat.com>
+
+	* gdb.server/connect-stopped-target.c: New file.
+	* gdb.server/connect-stopped-target.exp: New file.
+
+2015-08-20  Pedro Alves  <palves@redhat.com>
+
+	* gdb.dwarf2/comp-unit-lang.exp: New file.
+	* gdb.dwarf2/comp-unit-lang.c: New file.
+
+2015-08-20  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/attr_ref_and_charlit.exp: New testcase.
+	* gdb.ada/attr_ref_and_charlit/foo.adb: New file.
+
+2015-08-19  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.c: New file.
+	* gdb.dwarf2/dw2-bad-mips-linkage-name.exp: New file.
+
+2015-08-18  Doug Evans  <dje@google.com>
+	    Adrian Sendroiu <adrian.sendroiu@freescale.com>
+
+	* lib/gdb.exp (skip_python_tests_prompt): Renamed from
+	skip_python_tests.  New arg prompt_regexp.
+	(skip_python_tests): New function.
+	* lib/mi-support.exp (mi_skip_python_tests): New function.
+	* gdb.python/py-mi-objfile-gdb.py: New file.
+	* gdb.python/py-mi-objfile.c: New file.
+	* gdb.python/py-mi-objfile.exp: New file.
+
+2015-08-17  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.linespec/explicit.exp: Move strace test from here ...
+	* gdb.trace/strace.exp: ... to here.
+
+2015-08-15  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/kill-detach-inferiors-cmd.exp: New test file.
+	* gdb.base/kill-detach-inferiors-cmd.c: New test file.
+
+2015-08-14  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.perf/lib/perftest/utils.py (select_file): Kill any existing
+	inferior before selecting a new file.
+
+2015-08-14  Doug Evans  <xdje42@gmail.com>
+
+	* gdb.mi/mi-disassemble.exp: Update.
+	* gdb.base/disasm-optim.S: New file.
+	* gdb.base/disasm-optim.c: New file.
+	* gdb.base/disasm-optim.h: New file.
+	* gdb.base/disasm-optim.exp: New file.
+
+2015-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* lib/mi-support.exp (mi_make_breakpoint): Add option/handling for
+	"evaluated-by".
+
+2015-08-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.base/dso2dso.exp: Improve the testcase's documentation.
+
+2015-08-13  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/fun_renaming.exp: New testcase.
+	* gdb.ada/fun_renaming/fun_renaming.adb: New file.
+	* gdb.ada/fun_renaming/pack.adb: New file.
+	* gdb.ada/fun_renaming/pack.ads: New file.
+
+2015-08-12  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.base/dso2dso.exp: Pass basename of source file in call to
+	gdb_get_line_number.
+
+2015-08-12  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.base/dso2dso-dso2.c, gdb.base/dso2dso-dso2.h,
+	gdb.base/dso2dso-dso1.c, gdb.base/dso2dso-dso1.h, gdb.base/dso2dso.c,
+	gdb.base/dso2dso.exp: New files.
+
+2015-08-12  Sergio Durigan Junior  <sergiodj@redhat.com>
+	    Pedro Alves  <palves@redhat.com>
+	    Keith Seitz  <keiths@redhat.com>
+
+	* gdb.base/checkpoint-ns.exp: Use save_vars to save and restore
+	GDBFLAGS.
+
+2015-08-12  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/gdbhistsize-history.exp
+	(test_histsize_history_setting): Use save_vars.
+	* gdb.base/gdbinit-history.exp (test_gdbinit_history_setting):
+	Use save_vars.
+	(test_no_truncation_of_unlimited_history_file): Use save_vars.
+	* gdb.base/readline.exp: Use save_vars.
+
+2015-08-12  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* lib/gdb.exp (save_vars): New proc.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.base/help.exp: Update help_breakpoint_text.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.mi/mi-break.exp (test_explicit_breakpoints): New proc.
+	(at toplevel): Call test_explicit_breakpoints.
+	* gdb.mi/mi-dprintf.exp: Add tests for explicit dprintf
+	breakpoints.
+	* lib/mi-support.exp (mi_make_breakpoint): Add support for
+	breakpoint conditions, "-cond".
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.linespec/3explicit.c: New file.
+	* gdb.linespec/cpexplicit.cc: New file.
+	* gdb.linespec/cpexplicit.exp: New file.
+	* gdb.linespec/explicit.c: New file.
+	* gdb.linespec/explicit.exp: New file.
+	* gdb.linespec/explicit2.c: New file.
+	* gdb.linespec/ls-errs.exp: Add explicit location tests.
+	* lib/gdb.exp (capture_command_output): Regexp-escape `command'
+	before using in the matching pattern.
+	Clarify that `prefix' is a regular expression.
+
+2015-08-11  Keith Seitz  <keiths@redhat.com>
+
+	* gdb.base/dprintf-pending.exp: Update dprintf "without format"
+	test.
+	Add tests for missing ",FMT" and ",".
+
+2015-08-10  Doug Evans  <dje@google.com>
+	    Keith Seitz  <keiths@redhat.com>
+
+	PR gdb/17960
+	* gdb.base/completion.exp: Add location completer tests.
+
+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.
+
+2015-08-07  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/valgrind-disp-step.c: New file.
+	* gdb.base/valgrind-disp-step.exp: New file.
+
+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.
+
+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.
+
+2015-08-07  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* lib/gdb.exp (skip_tsx_tests, skip_btrace_pt_tests): New.
+	* gdb.btrace/instruction_history.exp: Update.
+	* gdb.btrace/tsx.exp: New.
+	* gdb.btrace/tsx.c: New.
+
+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.
+
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/valgrind-infcall.exp: Issue a "disconnect".
+
+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.
+
+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.
+
+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.
+
+2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/bp-permanent.exp: Report test as unsupported if
+	the target cannot stop at the permanent breakpoint.
+
+2015-08-03  Doug Evans  <dje@google.com>
+
+	* gdb.perf/single-step.exp (SINGLE_STEP_COUNT): Change to 1000 from
+	10000.
+
+2015-08-03  Doug Evans  <dje@google.com>
+
+	* Makefile.in (workers/%.worker, build-perf): New rule.
+	(GDB_PERFTEST_MODE): New variable.
+	(check-perf): Use it.
+	(clean): Clean up gdb.perf parallel build subdirs.
+	* lib/build-piece.exp: New file.
+	* lib/gdb.exp (make_gdb_parallel_path): New function
+	(standard_output_file, standard_temp_file): Call it.
+	(GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs
+	of $GDB_PARALLEL.
+	* lib/cache.exp (gdb_do_cache): Call make_gdb_parallel_path.
+
+2015-08-03  Doug Evans  <dje@google.com>
+
+	* gdb.perf/lib/perftest/reporter.py (SUM_FILE_NAME): New global.
+	(LOG_FILE_NAME): New global.
+	(TextReporter.__init__): Initialize self.txt_sum.
+	(TextReporter.report): Add support for multiple data-points.
+	Move report to perftest.sum, put raw data in perftest.log.
+	(TextReporter.start): Open sum and log files.
+	(TextReporter.end): Close sum and log files.
+	* gdb.perf/lib/perftest/testresult.py
+	(SingleStatisticTestResult.record): Handle multiple data-points.
+
+2015-07-31  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/attach-pie-misread.exp: Rename $res to $test_spawn_id.
+	Use spawn_id_get_pid.  Wait for spawn id after eof.  Use
+	kill_wait_spawned_process instead of explicit "kill -9".
+	* gdb.base/attach-pie-noexec.exp: Adjust to spawn_wait_for_attach
+	returning a spawn id instead of a pid.  Use spawn_id_get_pid and
+	kill_wait_spawned_process.
+	* gdb.base/attach-twice.exp: Likewise.
+	* gdb.base/attach.exp: Likewise.
+	(do_command_attach_tests): Use gdb_spawn_with_cmdline_opts and
+	gdb_test_multiple.
+	* gdb.base/solib-overlap.exp: Adjust to spawn_wait_for_attach
+	returning a spawn id instead of a pid.  Use spawn_id_get_pid and
+	kill_wait_spawned_process.
+	* gdb.base/valgrind-infcall.exp: Likewise.
+	* gdb.multi/multi-attach.exp: Likewise.
+	* gdb.python/py-prompt.exp: Likewise.
+	* gdb.python/py-sync-interp.exp: Likewise.
+	* gdb.server/ext-attach.exp: Likewise.
+	* gdb.threads/attach-into-signal.exp (corefunc): Use
+	spawn_wait_for_attach, spawn_id_get_pid and
+	kill_wait_spawned_process.
+	* gdb.threads/attach-many-short-lived-threads.exp: Adjust to
+	spawn_wait_for_attach returning a spawn id instead of a pid.  Use
+	spawn_id_get_pid and kill_wait_spawned_process.
+	* gdb.threads/attach-stopped.exp (corefunc): Use
+	spawn_wait_for_attach, spawn_id_get_pid and
+	kill_wait_spawned_process.
+	* gdb.base/break-interp.exp: Rename $res to $test_spawn_id.
+	Use spawn_id_get_pid.  Wait for spawn id after eof.  Use
+	kill_wait_spawned_process instead of explicit "kill -9".
+	* lib/gdb.exp (can_spawn_for_attach): Adjust comment.
+	(kill_wait_spawned_process, spawn_id_get_pid): New procedures.
+	(spawn_wait_for_attach): Use spawn instead of exec to spawn
+	processes.  Don't map cygwin/windows pids here.  Now returns a
+	spawn id list.
+
+2015-07-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.cp/var-tag.exp (do_global_tests): Revert broken commit
+	4bc4d42859e3b42c79c89295ef39944bdb3e6753 and apply the
+	correct patch.
+
+2015-07-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.arch/ppc64-symtab-cordic.exp: Restrict to ppc64 targets.
+
+2015-07-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	Reapply:
+	2014-05-21  Mark Wielaard  <mjw@redhat.com>
+
+	* gdb.cp/var-tag.exp (do_global_tests): Handle underlying type.
+
+2015-07-30  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (handle_extended_wait): Set the child's last
+	reported status to TARGET_WAITKIND_STOPPED.
+
+2015-07-30  Pedro Alves  <palves@redhat.com>
+
+	PR threads/18600
+	* gdb.threads/fork-plus-threads.exp: Test that "info inferiors"
+	only shows inferior 1.
+
+2015-07-30  Simon Marchi  <simon.marchi@ericsson.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	PR threads/18600
+	* gdb.threads/fork-plus-threads.c: New file.
+	* gdb.threads/fork-plus-threads.exp: New file.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/batch-preserve-term-settings.exp
+	(test_terminal_settings_preserved_after_cli_exit): Use
+	send_quit_command.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+	    Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.base/multi-forks.exp (continue_to_exit_bp_loc): Expect
+	output from both inferior_spawn_id and gdb_spawn_id.
+
+2015-07-29  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gdb.threads/attach-into-signal.exp (corefunc): Use
+	with_test_prefix on nested loops, uniquefying the test messages.
+
+2015-07-29  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gdb.python/py-objfile.exp: Fix typo that snuck in from my last
+	commit.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/batch-preserve-term-settings.exp (send_quit_command):
+	New proc.
+	(test_terminal_settings_preserved_after_sigterm): New test.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/batch-preserve-term-settings.exp
+	(test_terminal_settings_preserved_after_cli_exit): New test.
+
+2015-07-29  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/batch-preserve-term-settings.exp: Remove top-level
+	manipulation of saved_gdbflags.
+	(test_terminal_settings_preserved): Remove global declaration of
+	the unused variable pagination_prompt.  Remove manipulation of
+	saved_gdbflags.  Use a local variable EXTRA_GDBFLAGS instead of
+	GDBFLAGS.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* boards/gdbserver-base.exp: Don't set gdb,noinferiorio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/interrupt.exp: Revert back to checking gdb,noinferiorio
+	at the top.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/call-ar-st.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/call-rt-st.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/call-strs.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/call-strs.exp: Adjust to step over the
+	gdb_unbuffer_output call.
+	* gdb.base/catch-gdb-caused-signals.c: Include
+	"../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/dprintf.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/ending-run.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/run.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/shlib-call.exp: Adjust to step over the
+	gdb_unbuffer_output call.
+	* gdb.base/shmain.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/sizeof.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+	* gdb.base/varargs.c: Include "../lib/unbuffer_output.c".
+	(main): Rename to ...
+	(test): ... this.
+	(main): Reimplement.
+	* gdb.base/varargs.exp: Run to test instead of to main.
+	* gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.mi/mi-dprintf.exp (mi_expect_dprintf): New procedure,
+	factore out from mi_continue_dprintf.  For call-style dprintfs,
+	expect dprintf output out of $inferior_spawn_id.
+	(mi_continue_dprintf): Use mi_expect_dprintf.
+	* gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c".
+	(main): Call gdb_unbuffer_output.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* lib/mi-support.exp (mi_inferior_spawn_id): Delete.
+	(default_mi_gdb_start): Set inferior_spawn_id instead of
+	mi_inferior_spawn_id.  If $inferior_spawn_id is not set, set it to
+	gdb_spawn_id.
+	(mi_gdb_test): Always expect inferior output from both
+	$inferior_spawn_id and $gdb_spawn_id.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.gdb/selftest.exp (test_with_self): Update comment.  Use
+	send_inferior and $inferior_spawn_id.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.gdb/complaints.exp (test_initial_complaints)
+	(test_serial_complaints, test_short_complaints): Use
+	gdb_test_stdio.
+	(test_empty_complaint): Handle $inferior_spawn_id !=
+	$gdb_spawn_id.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/varargs.exp: Use gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/shlib-call.exp: Use gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/ending-run.exp: Use gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/call-rt-st.exp (print_struct_call): Split "result"
+	parameter into two new parameters, "inf_result" and "gdb_result".
+	Expect inferior output and gdb output from $inferior_spawn_id and
+	$gdb_spawn_id, respectively.  Adjust all callers.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/call-ar-st.exp: Use gdb_test_stdio+multi_line instead
+	of gdb_test_sequence.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/a2-run.exp (saw_usage, saw_exit_wrapper)
+	(saw_spurious_output): Expect inferior output from
+	$inferior_spawn_id.  Use gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/dprintf.exp: Use standard_testfile.  Change
+	prepare_for_testing call.
+	(srcfile): Don't set.
+	(restart): New procedure.
+	(test_dprintf): New procecure, use to continue over dprintfs.
+	(test_call, test_agent): New procedures, tests moved here.
+	Restart gdb and recreate dprintfs.  Adjust expected output.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/catch-gdb-caused-signals.exp: Use gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/sizeof.exp (check_sizeof, check_valueof): Use
+	gdb_test_stdio.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* lib/gdb.exp (gdb_test_stdio): New procedure.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/restore.exp (restore_tests): Use gdb_continue_to_end.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/call-signal-resume.exp: Remove check for
+	gdb,noinferiorio.  Don't expect "no signal".  Use gdb_test.
+	* gdb.base/unwindonsignal.exp: Likewise.
+	* gdb.base/call-signals.c (gen_signal): Remove printf call.
+	* gdb.base/unwindonsignal.c (gen_signal): Likewise.
+
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/siginfo-addr.c (pass): New function.
+	(handler): Call it iff si_addr is correct.
+	* gdb.base/siginfo-addr.exp: Remove gdb_skip_stdio_test check.
+	Set a breakpoint at "pass" and continue to it.
+
+2015-07-28  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gdb.python/py-objfile.exp: Make some tests have unique names.
+	* gdb.python/py-pp-registration.exp: Likewise.
+
+2015-07-28  Pedro Alves  <palves@redhat.com>
+
+	* gdb.server/server-exec-info.exp: Issue a "disconnect".
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.mi/mi-pending.c (thread_func): Replace return with return NULL.
+
+2015-07-27  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.mi/mi-watch.exp (test_watchpoint_triggering): Remove xfail.
+
+2015-07-27  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* gdb.base/gdb-sigterm-2.exp: New test.
+
+2015-07-25  Doug Evans  <xdje42@gmail.com>
+
+	Revert:
+	* Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL.
+	(workers/%.worker, build-perf): New rule.
+	(GDB_PERFTEST_MODE): New variable.
+	(check-perf): Use it.
+	(clean): Clean up gdb.perf parallel build subdirs.
+	* lib/build-piece.exp: New file.
+	* lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name.
+	* lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path
+	name.
+	(standard_temp_file): Ditto.
+	(GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs
+	of $GDB_PARALLEL.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* 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.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* gdb.perf/README: New file.
+	* lib/perftest.exp (tcl_string_list_to_python_list): New function.
+	* lib/gen-perf-test.exp: New file.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* lib/perftest.exp (PerfTest::compile): Unconditionally call body.
+	(PerfTest::startup): New function.
+	(PerfTest::run): Return result of calling body.
+	(PerfTest::assemble): Rewrite.
+	* gdb.perf/backtrace.exp (PerfTest::assemble): Update function result.
+	* gdb.perf/disassemble.exp (PerfTest::assemble): Ditto.
+	* gdb.perf/single-step.exp (PerfTest::assemble): Ditto.
+	* gdb.perf/skip-prologue.exp (PerfTest::assemble): Ditto.
+	* gdb.perf/solib.exp (PerfTest::assemble): Ditto.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* lib/gdb.exp (clean_restart): Make executable optional.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* gdb.base/watchpoint.exp (test_complex_watchpoint): Remove
+	compiler_info references.
+	* gdb.cp/temargs.exp: Ditto.
+	* lib/gdb.exp: Unset compiler_info instead of setting to "unknown".
+	(get_compiler_info): Early exit if already computed.  Set compiler_info
+	to "unknown" if there was a problem.
+	(test_compiler_info): Add function comment.  Call get_compiler_info.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL.
+	(workers/%.worker, build-perf): New rule.
+	(GDB_PERFTEST_MODE): New variable.
+	(check-perf): Use it.
+	(clean): Clean up gdb.perf parallel build subdirs.
+	* lib/build-piece.exp: New file.
+	* lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name.
+	* lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path
+	name.
+	(standard_temp_file): Ditto.
+	(GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs
+	of $GDB_PARALLEL.
+
+2015-07-24  Doug Evans  <dje@google.com>
+
+	* lib/future.exp (gdb_default_target_compile): New option
+	"early_flags".
+	* lib/gdb.exp (gdb_compile): Undo debian's change in default of
+	--as-needed.
+
+2015-07-24  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gdb.base/catch-syscall.exp: Call gdb_exit before
+	gdb_skip_xml_test.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-events.exp: Accept output between the stop event
+	and the prompt.
+	* gdb.python/py-evsignal.exp: Likewise.
+	* gdb.python/py-evthreads.exp: Likewise.
+
+2015-07-24  Pedro Alves  <palves@redhat.com>
+
+	PR gdb/18717
+	* gdb.threads/non-ldr-exit.c: New file.
+	* gdb.threads/non-ldr-exit.exp: New file.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.server/ext-wrapper.exp: Test --wrapper option when
+	restarting process.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.server/ext-restart.exp: New file.
+
+2015-07-24  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdbserver-support.exp (gdbserver_start_extended): Add
+	argument options.
+	* gdb.server/ext-wrapper.exp: New file.
+
+2015-07-23  Doug Evans  <dje@google.com>
+
+	* gdb.dwarf2/dw2-dummy-cu.S: New file.
+	* gdb.dwarf2/dw2-dummy-cu.exp: New file.
+
+2015-07-23  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* gdb.ada/var_arr_typedef.exp: New testcase.
+	* gdb.ada/var_arr_typedef/pack.adb: New file.
+	* gdb.ada/var_arr_typedef/pack.ads: New file.
+	* gdb.ada/var_arr_typedef/var_arr_typedef.adb: New file.
+
+2015-07-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* gdb.ada/info_exc.exp: Adjust "info exceptions" expected output.
+
+2015-07-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-biarch-core.exp: Replace istarget
+	by "complete set gnutarget". Remove expectation for the "core-file"
+	command.
+
+2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Revert the previous commit:
+	Tests for validate symbol file using build-id.
+
+2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
+
+	Tests for validate symbol file using build-id.
+	* gdb.base/solib-mismatch-lib.c: New file.
+	* gdb.base/solib-mismatch-libmod.c: New file.
+	* gdb.base/solib-mismatch.c: New file.
+	* gdb.base/solib-mismatch.exp: New file.
+
+2015-07-15  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/sigaltstack.exp (finish_test): Add kfail for
+	nios2-*-linux*.
+	* gdb.base/sigbpt.exp (stepi_out): Likewise.
+	* gdb.base/siginfo.exp: Likewise.
+	* gdb.base/sigstep.exp (advance, advancei): Likewise.
+
+2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
+
+	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled):
+	Move it to ...
+	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
+	... here.
+	* gdb.trace/range-stepping.exp: Check that the target supports
+	range stepping.
+
+2015-07-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-biarch-core.exp: Fix comment typo.
+
+2015-07-14  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/killed-outside.exp: New file.
+	* gdb.base/killed-outside.c: New file.
+
+2015-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter.
+	(n at main): New.
+	* gdb.asm/asmsrc1.s: Add comment "mark: main enter".
+
+2015-07-10  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* gdb.base/gnu_vector.exp: On x86 and x86_64 targets, skip the
+	infcall tests instead of setting up for KFAIL.
+
+2015-07-10  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/record_goto-step.exp: New.
+
+2015-07-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	PR compile/18484
+	* gdb.compile/compile.c (struct struct_type): Add volatile to
+	selffield's type.
+	* gdb.compile/compile.exp
+	(compile code struct_object.selffield = &struct_object): Skip further
+	struct_object tests if this one xfails.
+
+2015-07-08  Robert O'Callahan  <robert@ocallahan.org>
+
+	PR exp/18617
+	* gdb.trace/ax.exp: Add test.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/aarch64-atomic-inst.exp: Check is_aarch64_target
+	instead of istarget "aarch64*-*-*".
+	* gdb.arch/aarch64-fp.exp: Likewise.
+	* gdb.base/float.exp: Likewise.
+	* gdb.reverse/aarch64.exp: Likewise.
+	* lib/gdb.exp (is_aarch64_target): New proc.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* lib/gdb.exp (is_aarch32_target): New proc.
+	* gdb.arch/arm-bl-branch-dest.exp: Check is_aarch32_target
+	instead of "istarget "arm*-*-*"".
+	* gdb.arch/arm-disp-step.exp: Likewise.
+	* gdb.arch/thumb-bx-pc.exp: Likewise.
+	* gdb.arch/thumb-prologue.exp: Likewise.
+	* gdb.arch/thumb-singlestep.exp: Likewise.
+	* gdb.base/disp-step-syscall.exp: Likewise.
+	* gdb.base/float.exp: Likewise.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.base/catch-syscall.exp (test_catch_syscall_multi_arch):
+	Set arch1, arch2, syscall1_name, syscall2_name and syscall_number.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.multi/multi-arch-exec.exp: Set march1 and march2 to "" if target
+	is aarch64.  If target is aarch64, set compiler=${ARM_CC_FOR_TARGET}
+	if it exists.
+	* gdb.multi/multi-arch.exp: Likewise.
+
+2015-07-07  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* gdb.python/py-lazy-string.exp: Add missing parentheses to
+	print.
+
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/thumb-singlestep.exp: Do one more single step.
+
 2015-06-30  Martin Galvan  <martin.galvan@tallertechnologies.com>
 
 	* lib/gdb.exp (test_class_help): Remove the unneeded escaping of
@@ -125,7 +6192,7 @@
 	* gdb.mi/mi-dprintf-pendshr.c: New file.
 
 2015-06-10  Walfred Tedeschi  <walfred.tedeschi@intel.com>
-            Mircea Gherzan  <mircea.gherzan@intel.com>
+	    Mircea Gherzan  <mircea.gherzan@intel.com>
 
 	* gdb.arch/i386-mpx-map.c: New file.
 	* gdb.arch/i386-mpx-map.exp: New File.
@@ -215,7 +6282,8 @@
 
 2015-05-26  Omair Javaid  <omair.javaid@linaro.org>
 
-	* lib/gdb.exp (supports_process_record): Return true for aarch64*-linux*.
+	* lib/gdb.exp (supports_process_record): Return true for
+	aarch64*-linux*.
 	(supports_reverse): Likewise.
 
 2015-05-22  Patrick Palka  <patrick@parcs.ath.cx>
@@ -644,7 +6712,7 @@
 
 2015-04-07  Pedro Alves  <palves@redhat.com>
 
-        * lib/gdb.exp (gdb_test_multiple): When processing an argument,
+	* lib/gdb.exp (gdb_test_multiple): When processing an argument,
 	append the substituted item, not the original item.
 
 2015-04-07  Pedro Alves  <palves@redhat.com>
@@ -3429,7 +9497,7 @@
 	(explicit_fork_child_follow): Deleted procedure.
 	(test_follow_fork): New procedure.
 	(do_fork_tests): Replace calls to deleted procedures with
-	calls to test_follow_fork and reset GDB for subsequent 
+	calls to test_follow_fork and reset GDB for subsequent
 	procedure calls.
 
 2014-06-17  Yao Qi  <yao@codesourcery.com>
@@ -5194,7 +11262,7 @@
 	    Pedro Alves  <palves@redhat.com>
 
 	* gdb.mi/mi-info-os.exp: Connect to the target with
-        mi_gdb_target_load.
+	mi_gdb_target_load.
 
 2014-01-08  Pedro Alves  <palves@redhat.com>
 
@@ -5230,6 +11298,6 @@ For older changes see ChangeLog-1993-201
 ;; version-control: never
 ;; End:
 
-    Copyright 2014-2015 Free Software Foundation, Inc.
+    Copyright 2014-2017 Free Software Foundation, Inc.
   Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/ChangeLog-1993-2013 ./gdb/testsuite/ChangeLog-1993-2013
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/ChangeLog-1993-2013	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/ChangeLog-1993-2013	2017-03-06 01:49:07.000000000 +0000
@@ -3256,15 +3256,6 @@
 	* dg-extract-results.sh: Redirect grep output to /dev/null instead
 	of grep -q.
 
-2012-01-17  Sanjoy Das <sanjoy@playingwithpointers.com>
-
-	* gdb.base/jit-reader.exp: New file. Test case for the jit-reader
-	interface.
-	* gdb.base/jithost.c: New file.
-	* gdb.base/jithost.h: New file.
-	* gdb.base/jitreader.c : New file.
-	* gdb.base/jit-protocol.h: New file.
-
 2013-01-16  Tom Tromey  <tromey@redhat.com>
 
 	* gdb.base/catch-signal.c: New file.
@@ -33658,6 +33649,6 @@ Sun Feb 21 10:55:55 1993  Mike Werner  (
 ;; version-control: never
 ;; End:
 
-    Copyright 1993-2015 Free Software Foundation, Inc.
+    Copyright 1993-2017 Free Software Foundation, Inc.
   Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/cfdbug.exp ./gdb/testsuite/config/cfdbug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/cfdbug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/cfdbug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/d10v.exp ./gdb/testsuite/config/d10v.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/d10v.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/d10v.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/default.exp ./gdb/testsuite/config/default.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/default.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/default.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/dve.exp ./gdb/testsuite/config/dve.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/dve.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/dve.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/extended-gdbserver.exp ./gdb/testsuite/config/extended-gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/extended-gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/extended-gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/gdbserver.exp ./gdb/testsuite/config/gdbserver.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/gdbserver.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/gdbserver.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/i960.exp ./gdb/testsuite/config/i960.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/i960.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/i960.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/m32r.exp ./gdb/testsuite/config/m32r.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/m32r.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/m32r.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/m32r-stub.exp ./gdb/testsuite/config/m32r-stub.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/m32r-stub.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/m32r-stub.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-load_lib "../../testsuite/config/sparclet.exp"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mips.exp ./gdb/testsuite/config/mips.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mips.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/mips.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mips-idt.exp ./gdb/testsuite/config/mips-idt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mips-idt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/mips-idt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mn10300-eval.exp ./gdb/testsuite/config/mn10300-eval.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/mn10300-eval.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/mn10300-eval.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/monitor.exp ./gdb/testsuite/config/monitor.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/monitor.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/monitor.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test Framework Driver for GDB driving a ROM monitor (via monitor.c).
-#   Copyright 1995-2015 Free Software Foundation, Inc.
+#   Copyright 1995-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/proelf.exp ./gdb/testsuite/config/proelf.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/proelf.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/proelf.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/rom68k.exp ./gdb/testsuite/config/rom68k.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/rom68k.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/rom68k.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sh.exp ./gdb/testsuite/config/sh.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sh.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/sh.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sid.exp ./gdb/testsuite/config/sid.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sid.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/sid.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test Framework Driver for GDB driving an external simulator
-#   Copyright 1999-2015 Free Software Foundation, Inc.
+#   Copyright 1999-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sim.exp ./gdb/testsuite/config/sim.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/sim.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/sim.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test Framework Driver for GDB driving a builtin simulator
-#   Copyright 1994-2015 Free Software Foundation, Inc.
+#   Copyright 1994-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/slite.exp ./gdb/testsuite/config/slite.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/slite.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/slite.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1993-2015 Free Software Foundation, Inc.
+#   Copyright 1993-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/unix.exp ./gdb/testsuite/config/unix.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/unix.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/unix.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/vr4300.exp ./gdb/testsuite/config/vr4300.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/vr4300.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/vr4300.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/vr5000.exp ./gdb/testsuite/config/vr5000.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/config/vr5000.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/config/vr5000.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/configure ./gdb/testsuite/configure
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/configure	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/configure	2017-03-06 01:49:07.000000000 +0000
@@ -608,10 +608,6 @@ CFLAGS
 CC
 RPATH_ENVVAR
 subdirs
-SET_MAKE
-GMAKE_FALSE
-GMAKE_TRUE
-MAKE
 target_noncanonical
 target_os
 target_vendor
@@ -2130,97 +2126,6 @@ esac
 
 
 
-# Check for the 'make' the user wants to use.
-for ac_prog in make
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MAKE"; then
-  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_MAKE="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-MAKE=$ac_cv_prog_MAKE
-if test -n "$MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-$as_echo "$MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$MAKE" && break
-done
-
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
-
-
-if test "$MAKE_IS_GNU" = yes; then
-  GMAKE_TRUE=
-  GMAKE_FALSE='#'
-else
-  GMAKE_TRUE='#'
-  GMAKE_FALSE=
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
 # Enable gdbtk.
 # Check whether --enable-gdbtk was given.
 if test "${enable_gdbtk+set}" = set; then :
@@ -2273,8 +2178,6 @@ else
       fi ;;
     darwin* | rhapsody*)
       RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
-    hpux*)
-      RPATH_ENVVAR=SHLIB_PATH ;;
   esac
 fi
 
@@ -3513,8 +3416,8 @@ program_transform_name=`$as_echo "$progr
 
 ac_config_files="$ac_config_files lib/pdtrace"
 
+ac_config_files="$ac_config_files Makefile"
 
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3649,10 +3552,6 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
-if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
-  as_fn_error "conditional \"GMAKE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -4216,38 +4115,6 @@ do
   case $ac_config_target in
     "lib/pdtrace") CONFIG_FILES="$CONFIG_FILES lib/pdtrace" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "gdb.ada/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.ada/Makefile" ;;
-    "gdb.arch/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.arch/Makefile" ;;
-    "gdb.asm/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.asm/Makefile" ;;
-    "gdb.base/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.base/Makefile" ;;
-    "gdb.btrace/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.btrace/Makefile" ;;
-    "gdb.cell/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.cell/Makefile" ;;
-    "gdb.compile/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.compile/Makefile" ;;
-    "gdb.cp/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.cp/Makefile" ;;
-    "gdb.disasm/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.disasm/Makefile" ;;
-    "gdb.dwarf2/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dwarf2/Makefile" ;;
-    "gdb.dlang/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dlang/Makefile" ;;
-    "gdb.fortran/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.fortran/Makefile" ;;
-    "gdb.gdb/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.gdb/Makefile" ;;
-    "gdb.go/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.go/Makefile" ;;
-    "gdb.server/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.server/Makefile" ;;
-    "gdb.java/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.java/Makefile" ;;
-    "gdb.guile/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.guile/Makefile" ;;
-    "gdb.linespec/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.linespec/Makefile" ;;
-    "gdb.mi/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.mi/Makefile" ;;
-    "gdb.modula2/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.modula2/Makefile" ;;
-    "gdb.multi/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.multi/Makefile" ;;
-    "gdb.objc/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
-    "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
-    "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
-    "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
-    "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
-    "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
-    "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
-    "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
-    "gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
-    "gdb.trace/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
-    "gdb.xml/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/configure.ac ./gdb/testsuite/configure.ac
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/configure.ac	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/configure.ac	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 #                                                       -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,17 +25,6 @@ AC_CANONICAL_TARGET
 
 ACX_NONCANONICAL_TARGET
 
-# Check for the 'make' the user wants to use.
-AC_CHECK_PROGS(MAKE, make)
-MAKE_IS_GNU=
-case "`$MAKE --version 2>&1 | sed 1q`" in
-  *GNU*)
-    MAKE_IS_GNU=yes
-    ;;
-esac
-AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
-AC_PROG_MAKE_SET
-
 # Enable gdbtk.
 AC_ARG_ENABLE(gdbtk,
 [  --enable-gtk            enable gdbtk graphical user interface (GUI)],,
@@ -77,8 +66,6 @@ else
       fi ;;
     darwin* | rhapsody*)
       RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
-    hpux*)
-      RPATH_ENVVAR=SHLIB_PATH ;;
   esac
 fi
 AC_SUBST(RPATH_ENVVAR)
@@ -104,15 +91,6 @@ GDB_AC_TRANSFORM(readelf, READELF_TRANSF
 GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
 GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
 AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
+AC_CONFIG_FILES([Makefile])
 
-AC_OUTPUT([Makefile \
-  gdb.ada/Makefile \
-  gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile \
-  gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile \
-  gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile \
-  gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile \
-  gdb.guile/Makefile gdb.linespec/Makefile \
-  gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
-  gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
-  gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
-  gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
+AC_OUTPUT
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/dg-extract-results.sh ./gdb/testsuite/dg-extract-results.sh
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/dg-extract-results.sh	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/dg-extract-results.sh	2017-03-06 01:49:07.000000000 +0000
@@ -6,7 +6,7 @@
 # The resulting file can be used with test result comparison scripts for
 # results from tests that were run in parallel.  See usage() below.
 
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 # Contributed by Janis Johnson <janis187@us.ibm.com>
 #
 # This file is part of GCC.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/foo.adb ./gdb/testsuite/gdb.ada/access_to_packed_array/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/access_to_packed_array/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,21 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Pack;
+
+procedure Foo is
+begin
+   Pack.Do_Nothing (Pack.AA); --  BREAK
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/pack.adb ./gdb/testsuite/gdb.ada/access_to_packed_array/pack.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/pack.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/access_to_packed_array/pack.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Pack is
+
+   procedure Do_Nothing (A : Array_Access) is
+   begin
+      null;
+   end Do_Nothing;
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/pack.ads ./gdb/testsuite/gdb.ada/access_to_packed_array/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array/pack.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/access_to_packed_array/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Pack is
+
+   type Small is mod 2 ** 6;
+   type Array_Type is array (0 .. 9) of Small
+      with Pack;
+   type Array_Access is access all Array_Type;
+
+   A  : aliased Array_Type :=
+     (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+   AA : constant Array_Access := A'Access;
+
+   procedure Do_Nothing (A : Array_Access);
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array.exp ./gdb/testsuite/gdb.ada/access_to_packed_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/access_to_packed_array.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/access_to_packed_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+gdb_test "print pack.a" " = \\(0 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\)"
+gdb_test "print pack.aa" " = \\(access pack\\.array_type\\) 0x.* <pack\\.a>"
+
+gdb_test "print pack.a(2)" " = 3"
+gdb_test "print pack.aa(2)" " = 3"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb ./gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/pck.adb ./gdb/testsuite/gdb.ada/addr_arith/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/addr_arith/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/pck.ads ./gdb/testsuite/gdb.ada/addr_arith/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/addr_arith/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith.exp ./gdb/testsuite/gdb.ada/addr_arith.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/addr_arith.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/addr_arith.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/foo.adb ./gdb/testsuite/gdb.ada/aliased_array/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/aliased_array/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/pck.adb ./gdb/testsuite/gdb.ada/aliased_array/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/aliased_array/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/pck.ads ./gdb/testsuite/gdb.ada/aliased_array/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/aliased_array/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array.exp ./gdb/testsuite/gdb.ada/aliased_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/aliased_array.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/aliased_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/foo.adb ./gdb/testsuite/gdb.ada/arr_arr/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arr_arr/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/pck.adb ./gdb/testsuite/gdb.ada/arr_arr/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arr_arr/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/pck.ads ./gdb/testsuite/gdb.ada/arr_arr/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arr_arr/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr.exp ./gdb/testsuite/gdb.ada/arr_arr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arr_arr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arr_arr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_bounds/bar.adb ./gdb/testsuite/gdb.ada/array_bounds/bar.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_bounds/bar.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_bounds/bar.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_bounds.exp ./gdb/testsuite/gdb.ada/array_bounds.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_bounds.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_bounds.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/foo.adb ./gdb/testsuite/gdb.ada/array_char_idx/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_char_idx/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/pck.adb ./gdb/testsuite/gdb.ada/array_char_idx/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_char_idx/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/pck.ads ./gdb/testsuite/gdb.ada/array_char_idx/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_char_idx/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx.exp ./gdb/testsuite/gdb.ada/array_char_idx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_char_idx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_char_idx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/foo.adb ./gdb/testsuite/gdb.ada/arraydim/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arraydim/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/inc.c ./gdb/testsuite/gdb.ada/arraydim/inc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/inc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arraydim/inc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/pck.adb ./gdb/testsuite/gdb.ada/arraydim/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arraydim/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/pck.ads ./gdb/testsuite/gdb.ada/arraydim/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arraydim/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim.exp ./gdb/testsuite/gdb.ada/arraydim.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arraydim.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arraydim.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@ load_lib "ada.exp"
 
 standard_ada_testfile foo
 
-set cfile "${testdir}/inc"
-set csrcfile ${srcdir}/${subdir}/${cfile}.c
+set cfile "inc"
+set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c
 set cobject [standard_output_file ${cfile}.o]
 
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayidx/p.adb ./gdb/testsuite/gdb.ada/arrayidx/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayidx/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayidx/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2005-2015 Free Software Foundation, Inc.
+--  Copyright 2005-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayidx.exp ./gdb/testsuite/gdb.ada/arrayidx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayidx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayidx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/foo.adb ./gdb/testsuite/gdb.ada/array_of_variable_length/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_of_variable_length/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,21 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Pck; use Pck;
+
+procedure Foo is
+begin
+   Do_Nothing (A); --  BREAK
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/pck.adb ./gdb/testsuite/gdb.ada/array_of_variable_length/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/pck.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_of_variable_length/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Pck is
+
+   procedure Do_Nothing (A : A_Type) is
+   begin
+      null;
+   end Do_Nothing;
+
+end Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/pck.ads ./gdb/testsuite/gdb.ada/array_of_variable_length/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length/pck.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_of_variable_length/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Pck is
+
+   subtype Small_Int is Natural range 0 .. 100;
+
+   type R_Type (L : Small_Int := 0) is record
+      S : String (1 .. L);
+   end record;
+
+   type A_Type is array (Natural range <>) of R_Type;
+
+   A : A_Type :=
+     (1 => (L => 0, S => ""),
+      2 => (L => 2, S => "ab"));
+
+   procedure Do_Nothing (A : A_Type);
+
+end Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length.exp ./gdb/testsuite/gdb.ada/array_of_variable_length.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_of_variable_length.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_of_variable_length.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+# Pck.A is an array that embeds elements with variable size so compilers will
+# emit DWARF attributes such as DW_AT_byte_stride to tell GDB how to fetch
+# individual elements.  Array stride is also a way to describe packed arrays:
+# make sure we do not consider Pck.A as a packed array.
+gdb_test "ptype pck.a" "array \\(1 \\.\\. 2\\) of pck\\.r_type"
+
+# Make sure this also works with a type from a fully evaluated value.  During
+# evaluation, dynamic types can be "resolved" so GDB internals could "forget"
+# that elements have variable size.  Fortunately, type resolution of array
+# elements happens only when processing individual elements (i.e. the resolved
+# array type is still associated to the dynamic element type), so the following
+# is supposed to work.
+gdb_test "print pck.a" \
+         "= \\(\\(l => 0, s => \"\"\\), \\(l => 2, s => \"ab\"\\)\\)"
+gdb_test "ptype $"\
+         "array \\(1 \\.\\. 2\\) of pck\\.r_type"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/foo.adb ./gdb/testsuite/gdb.ada/arrayparam/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayparam/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/pck.adb ./gdb/testsuite/gdb.ada/arrayparam/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayparam/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/pck.ads ./gdb/testsuite/gdb.ada/arrayparam/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayparam/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam.exp ./gdb/testsuite/gdb.ada/arrayparam.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayparam.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayparam.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/foo.adb ./gdb/testsuite/gdb.ada/arrayptr/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayptr/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/pck.adb ./gdb/testsuite/gdb.ada/arrayptr/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayptr/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/pck.ads ./gdb/testsuite/gdb.ada/arrayptr/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayptr/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr.exp ./gdb/testsuite/gdb.ada/arrayptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/arrayptr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/arrayptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming/foo.adb ./gdb/testsuite/gdb.ada/array_ptr_renaming/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_ptr_renaming/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with System;
+with Pack;
+
+procedure Foo is
+   NT  : Pack.Table_Type renames Pack.Table;
+   NTP : Pack.Table_Ptr_Type  renames Pack.Table_Ptr;
+begin
+   NT := NT; --  BREAK
+   NTP := NTP;
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming/pack.ads ./gdb/testsuite/gdb.ada/array_ptr_renaming/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming/pack.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_ptr_renaming/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Pack is
+
+   type Table_Type is
+     array (Natural range <>) of Integer;
+   type Table_Ptr_Type is access all Table_Type;
+
+   Table     : Table_Type := (1 => 10, 2 => 20);
+   Table_Ptr : aliased Table_Ptr_Type := new Table_Type'(3 => 30, 4 => 40);
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming.exp ./gdb/testsuite/gdb.ada/array_ptr_renaming.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_ptr_renaming.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_ptr_renaming.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+gdb_test "print nt"    " = \\(10, 20\\)"
+gdb_test "print nt(1)" " = 10"
+
+# Accesses to arrays and unconstrained arrays have the same runtime
+# representation with GNAT (fat pointers).  In this case, GDB "forgets" that
+# it's dealing with an access and prints directly the array contents.  This
+# should be fixed some day.
+setup_kfail "gdb/NNNN" *-*-*
+gdb_test "print ntp"     " = \\(access pack\\.table_type\\) $hex.*"
+gdb_test "print ntp.all" " = \\(3 => 30, 40\\)"
+gdb_test "print ntp(3)"  " = 30"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/p.adb ./gdb/testsuite/gdb.ada/array_return/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_return/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2006-2015 Free Software Foundation, Inc.
+--  Copyright 2006-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/pck.adb ./gdb/testsuite/gdb.ada/array_return/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_return/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2006-2015 Free Software Foundation, Inc.
+--  Copyright 2006-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/pck.ads ./gdb/testsuite/gdb.ada/array_return/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_return/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2006-2015 Free Software Foundation, Inc.
+--  Copyright 2006-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return.exp ./gdb/testsuite/gdb.ada/array_return.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_return.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_return.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ clean_restart ${testfile}
 # Start the inferior
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -52,7 +52,7 @@ gdb_test "break create_small_float_vecto
 
 gdb_test "cont" \
          "Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \
-         "Continuing to Create_Small"
+         "continuing to Create_Small"
 
 gdb_test "finish" \
          "Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \
@@ -63,7 +63,7 @@ gdb_test "finish" \
 
 gdb_test "cont" \
          "Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \
-         "Continuing to Create_Large"
+         "continuing to Create_Large"
 
 # On hppa32, the value returned is too large to be returned via a register.
 # Instead, it is returned using the struct convention, and the debugger
@@ -82,7 +82,7 @@ gdb_test "finish" \
 
 gdb_test "cont" \
          "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \
-         "Continuing to Create_Small_Float_Vector"
+         "continuing to Create_Small_Float_Vector"
 
 gdb_test "finish" \
          "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb ./gdb/testsuite/gdb.ada/array_subscript_addr/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_subscript_addr/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_subscript_addr.exp ./gdb/testsuite/gdb.ada/array_subscript_addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/array_subscript_addr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/array_subscript_addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/assign_1.exp ./gdb/testsuite/gdb.ada/assign_1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/assign_1.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/assign_1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 # Force the language to Ada, as this will not happen automatically
 # in this case (no test program).
 gdb_test_no_output "set lang ada" \
-         "Changing the language to ada"
+         "changing the language to ada"
 
 gdb_test "print \$xxx := 1" \
          "= 1" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/foo.adb ./gdb/testsuite/gdb.ada/atomic_enum/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/atomic_enum/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/pck.adb ./gdb/testsuite/gdb.ada/atomic_enum/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/atomic_enum/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/pck.ads ./gdb/testsuite/gdb.ada/atomic_enum/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/atomic_enum/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum.exp ./gdb/testsuite/gdb.ada/atomic_enum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/atomic_enum.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/atomic_enum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb ./gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+procedure Foo is
+   procedure P (S : String) is
+   begin
+      null; -- BREAK
+   end P;
+begin
+   P ((2 => 'a', 3 => 'b'));
+   P ((4 => 'c', 5 => 'd'));
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp ./gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile "foo"
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+set bp_location [gdb_get_line_number "BREAK" "${testdir}/foo.adb"]
+
+# Check with the same array at two different points in the execution that using
+# both an attribute reference and a character literal in the same expression
+# work as expected. They used to yield syntax error.
+
+runto "foo.adb:$bp_location"
+gdb_test "print s'first" " = 2"
+gdb_test "print s'last"  " = 3"
+gdb_test "print s(s'first) = 'a'" " = true"
+gdb_test "print s(s'last) /= 'b'" " = false"
+
+gdb_test "continue" \
+         ".*Breakpoint \[0-9\]+, foo\\.p \\(s=.*\\) at .*foo.adb:\[0-9\]+.*" \
+gdb_test "print s'first" " = 4"
+gdb_test "print s'last"  " = 5"
+gdb_test "print s(s'first) = 'c'" " = true"
+gdb_test "print s(s'last) /= 'd'" " = false"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bad-task-bp-keyword/foo.adb ./gdb/testsuite/gdb.ada/bad-task-bp-keyword/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bad-task-bp-keyword/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bad-task-bp-keyword/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp ./gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/boolean_expr.exp ./gdb/testsuite/gdb.ada/boolean_expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/boolean_expr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/boolean_expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ set any_addr "0x\[0-9a-zA-Z\]+"
 # Force the language to Ada, as this will not happen automatically
 # in this case (no test program).
 gdb_test_no_output "set lang ada" \
-         "Changing the language to ada"
+         "changing the language to ada"
 
 gdb_test "print 1 = 2" \
          "= false" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb ./gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/pck.adb ./gdb/testsuite/gdb.ada/bp_enum_homonym/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_enum_homonym/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/pck.ads ./gdb/testsuite/gdb.ada/bp_enum_homonym/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_enum_homonym/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym.exp ./gdb/testsuite/gdb.ada/bp_enum_homonym.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_enum_homonym.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_enum_homonym.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/foo.adb ./gdb/testsuite/gdb.ada/bp_on_var/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_on_var/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/pck.adb ./gdb/testsuite/gdb.ada/bp_on_var/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_on_var/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/pck.ads ./gdb/testsuite/gdb.ada/bp_on_var/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_on_var/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var.exp ./gdb/testsuite/gdb.ada/bp_on_var.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_on_var.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_on_var.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/foo.adb ./gdb/testsuite/gdb.ada/bp_range_type/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_range_type/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/pck.adb ./gdb/testsuite/gdb.ada/bp_range_type/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_range_type/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/pck.ads ./gdb/testsuite/gdb.ada/bp_range_type/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_range_type/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type.exp ./gdb/testsuite/gdb.ada/bp_range_type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_range_type.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_range_type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/foo.adb ./gdb/testsuite/gdb.ada/bp_reset/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/io.adb ./gdb/testsuite/gdb.ada/bp_reset/io.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/io.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset/io.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/io.ads ./gdb/testsuite/gdb.ada/bp_reset/io.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/io.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset/io.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/pck.adb ./gdb/testsuite/gdb.ada/bp_reset/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/pck.ads ./gdb/testsuite/gdb.ada/bp_reset/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset.exp ./gdb/testsuite/gdb.ada/bp_reset.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/bp_reset.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/bp_reset.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/array_list_g.ads ./gdb/testsuite/gdb.ada/byte_packed_arr/array_list_g.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/array_list_g.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/byte_packed_arr/array_list_g.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod.adb ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod.ads ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod_main.adb ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod_main.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr/reprod_main.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/byte_packed_arr/reprod_main.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr.exp ./gdb/testsuite/gdb.ada/byte_packed_arr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/byte_packed_arr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/byte_packed_arr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/foo.adb ./gdb/testsuite/gdb.ada/call_pn/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/call_pn/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/pck.adb ./gdb/testsuite/gdb.ada/call_pn/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/call_pn/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/pck.ads ./gdb/testsuite/gdb.ada/call_pn/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/call_pn/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn.exp ./gdb/testsuite/gdb.ada/call_pn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/call_pn.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/call_pn.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/catch_ex/foo.adb ./gdb/testsuite/gdb.ada/catch_ex/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/catch_ex/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/catch_ex/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/catch_ex.exp ./gdb/testsuite/gdb.ada/catch_ex.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/catch_ex.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/catch_ex.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ set catch_exception_info \
 ####################################
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -88,7 +88,7 @@ gdb_test "continue" \
 #  - continue, the program exits.
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -149,7 +149,7 @@ gdb_test "continue" \
 #     the program.
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/foo.adb ./gdb/testsuite/gdb.ada/char_enum/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_enum/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/pck.adb ./gdb/testsuite/gdb.ada/char_enum/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_enum/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/pck.ads ./gdb/testsuite/gdb.ada/char_enum/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_enum/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum.exp ./gdb/testsuite/gdb.ada/char_enum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_enum.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_enum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/foo.adb ./gdb/testsuite/gdb.ada/char_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/pck.adb ./gdb/testsuite/gdb.ada/char_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/pck.ads ./gdb/testsuite/gdb.ada/char_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param.exp ./gdb/testsuite/gdb.ada/char_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/char_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/char_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/aux_pck.adb ./gdb/testsuite/gdb.ada/complete/aux_pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/aux_pck.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete/aux_pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Aux_Pck is
+
+   procedure Ambiguous_Func is
+   begin
+      null;
+   end Ambiguous_Func;
+
+   procedure Ambiguous_Proc is
+   begin
+      null;
+   end Ambiguous_Proc;
+
+end Aux_Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/aux_pck.ads ./gdb/testsuite/gdb.ada/complete/aux_pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/aux_pck.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete/aux_pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,21 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Aux_Pck is
+
+   procedure Ambiguous_Func;
+   procedure Ambiguous_Proc;
+
+end Aux_Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/foo.adb ./gdb/testsuite/gdb.ada/complete/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
@@ -13,7 +13,8 @@
 --  You should have received a copy of the GNU General Public License
 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-with Pck; use Pck;
+with Aux_Pck; use Aux_Pck;
+with Pck;     use Pck;
 
 procedure Foo is
    Some_Local_Variable : Integer := 1;
@@ -21,5 +22,8 @@ procedure Foo is
 begin
    My_Global_Variable := Some_Local_Variable + 1; -- START
    Proc (External_Identical_Two);
+   Aux_Pck.Ambiguous_Func;
+   Aux_Pck.Ambiguous_Proc;
+   Pck.Ambiguous_Func;
 end Foo;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/pck.adb ./gdb/testsuite/gdb.ada/complete/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
@@ -21,4 +21,9 @@ package body Pck is
       Inner.Inside_Variable := Not_In_Scope + I;
    end Proc;
 
+   procedure Ambiguous_Func is
+   begin
+      null;
+   end Ambiguous_Func;
+
 end Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/pck.ads ./gdb/testsuite/gdb.ada/complete/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
@@ -31,4 +31,6 @@ package Pck is
 
    procedure Proc (I : Integer);
 
+   procedure Ambiguous_Func;
+
 end Pck;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete.exp ./gdb/testsuite/gdb.ada/complete.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/complete.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/complete.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -140,6 +140,7 @@ test_gdb_complete "external_ident" \
 test_gdb_complete "pck" \
                   [multi_line "(p pck\\.ad\[sb\])?" \
                               "(p pck\\.ad\[sb\])?" \
+                              "p pck.ambiguous_func" \
                               "p pck.external_identical_one" \
                               "p pck.inner.inside_variable" \
                               "p pck.local_identical_one" \
@@ -151,6 +152,7 @@ test_gdb_complete "pck" \
 test_gdb_complete "pck." \
                   [multi_line "(p pck\\.ad\[sb\])?" \
                               "(p pck\\.ad\[sb\])?" \
+                              "p pck.ambiguous_func" \
                               "p pck.external_identical_one" \
                               "p pck.inner.inside_variable" \
                               "p pck.local_identical_one" \
@@ -181,3 +183,14 @@ if { [readline_is_used] } {
 	}
     }
 }
+
+# Usually, parsing a function name that is ambiguous yields a menu through
+# which users can select a specific function.  This should not happen during
+# completion, though.
+test_gdb_complete "ambig" \
+                  [multi_line "p ambiguous_func" \
+                              "p ambiguous_proc" ]
+test_gdb_complete "ambiguous_f" \
+                  "p ambiguous_func"
+test_gdb_complete "ambiguous_func" \
+                  "p ambiguous_func"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/a.adb ./gdb/testsuite/gdb.ada/cond_lang/a.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/a.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/a.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/foo.c ./gdb/testsuite/gdb.ada/cond_lang/foo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/foo.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/foo.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/mixed.adb ./gdb/testsuite/gdb.ada/cond_lang/mixed.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/mixed.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/mixed.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/mixed.ads ./gdb/testsuite/gdb.ada/cond_lang/mixed.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/mixed.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/mixed.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/pck.adb ./gdb/testsuite/gdb.ada/cond_lang/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/pck.ads ./gdb/testsuite/gdb.ada/cond_lang/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang.exp ./gdb/testsuite/gdb.ada/cond_lang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/cond_lang.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/cond_lang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@ load_lib "ada.exp"
 
 standard_ada_testfile a
 
-set cfile "${testdir}/foo"
-set csrcfile ${srcdir}/${subdir}/${cfile}.c
+set cfile "foo"
+set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c
 set cobject [standard_output_file ${cfile}.o]
 
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
@@ -39,7 +39,7 @@ gdb_test "show lang" \
 # current language mode is auto, and the breakpoint is inside Ada code.
 set bp_location [gdb_get_line_number "STOP" ${testdir}/mixed.adb]
 gdb_test "break mixed.adb:${bp_location} if light = green" \
-         "Breakpoint \[0-9\]* at .*: file .*/mixed.adb, line \[0-9\]*\\."
+         "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\."
 
 # Now, continue until we hit the breakpoint.  If the condition is
 # evaluated correctly, the first hit will be ignored, and the debugger
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/foo_n612_026.adb ./gdb/testsuite/gdb.ada/disc_arr_bound/foo_n612_026.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/foo_n612_026.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/disc_arr_bound/foo_n612_026.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/pck.adb ./gdb/testsuite/gdb.ada/disc_arr_bound/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/disc_arr_bound/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/pck.ads ./gdb/testsuite/gdb.ada/disc_arr_bound/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/disc_arr_bound/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound.exp ./gdb/testsuite/gdb.ada/disc_arr_bound.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/disc_arr_bound.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/disc_arr_bound.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/foo.adb ./gdb/testsuite/gdb.ada/dot_all/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dot_all/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/pck.adb ./gdb/testsuite/gdb.ada/dot_all/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dot_all/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/pck.ads ./gdb/testsuite/gdb.ada/dot_all/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dot_all/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all.exp ./gdb/testsuite/gdb.ada/dot_all.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dot_all.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dot_all.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_arrayidx/foo.adb ./gdb/testsuite/gdb.ada/dyn_arrayidx/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_arrayidx/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_arrayidx/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_arrayidx.exp ./gdb/testsuite/gdb.ada/dyn_arrayidx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_arrayidx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_arrayidx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/pack.adb ./gdb/testsuite/gdb.ada/dyn_loc/pack.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/pack.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_loc/pack.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/pack.ads ./gdb/testsuite/gdb.ada/dyn_loc/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/pack.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_loc/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/p.adb ./gdb/testsuite/gdb.ada/dyn_loc/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_loc/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc.exp ./gdb/testsuite/gdb.ada/dyn_loc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/dyn_loc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/dyn_loc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/foo.adb ./gdb/testsuite/gdb.ada/enum_idx_packed/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/enum_idx_packed/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/pck.adb ./gdb/testsuite/gdb.ada/enum_idx_packed/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/enum_idx_packed/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/pck.ads ./gdb/testsuite/gdb.ada/enum_idx_packed/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/enum_idx_packed/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed.exp ./gdb/testsuite/gdb.ada/enum_idx_packed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/enum_idx_packed.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/enum_idx_packed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed/first.adb ./gdb/testsuite/gdb.ada/exec_changed/first.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed/first.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/exec_changed/first.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2005-2015 Free Software Foundation, Inc.
+--  Copyright 2005-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed/second.adb ./gdb/testsuite/gdb.ada/exec_changed/second.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed/second.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/exec_changed/second.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2005-2015 Free Software Foundation, Inc.
+--  Copyright 2005-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed.exp ./gdb/testsuite/gdb.ada/exec_changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exec_changed.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/exec_changed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_ada_tests] } { return -1 }
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
 if [target_info exists use_gdb_stub] {
-    untested exec_changed.exp
+    untested "skipping tests due to use_gdb_stub"
     return
 }
 
@@ -32,9 +32,8 @@ if {[gdb_compile_ada "${srcfile}" "${bin
 }
 
 # Build the second test program
-set testfile2 "${testdir}/second"
-set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb
-set binfile2 [standard_output_file ${testfile2}$EXEEXT]
+set srcfile2 ${srcdir}/${subdir}/${testdir}/second.adb
+set binfile2 [standard_output_file second$EXEEXT]
 
 if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
     return -1
@@ -42,7 +41,7 @@ if {[gdb_compile_ada "${srcfile2}" "${bi
 
 # Start with a fresh gdb.
 
-set common_binfile [standard_output_file ${testdir}/common$EXEEXT]
+set common_binfile [standard_output_file common$EXEEXT]
 
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/foo.adb ./gdb/testsuite/gdb.ada/expr_delims/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/expr_delims/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/pck.adb ./gdb/testsuite/gdb.ada/expr_delims/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/expr_delims/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/pck.ads ./gdb/testsuite/gdb.ada/expr_delims/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/expr_delims/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims.exp ./gdb/testsuite/gdb.ada/expr_delims.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/expr_delims.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/expr_delims.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,26 +39,26 @@ gdb_test "continue" \
 # for an expression delimiter.
 gdb_test "print thread" \
          "= 1" \
-         "Print variable 'thread'"
+         "print variable 'thread'"
 
 gdb_test_no_output "delete 1"
 
 gdb_test "watch thread" \
          ".*atchpoint \[0-9\]+: thread" \
-         "Set plain watchpoint on variable 'thread'"
+         "set plain watchpoint on variable 'thread'"
 
 # Make sure that 'if' when followed by an expression beginning
 # with 'i' works.
 gdb_test "watch thread if i = 2" \
          ".*atchpoint \[0-9\]+: thread" \
-         "Set conditional watchpoint."
+         "set conditional watchpoint."
 
 gdb_test "info break" \
          ".*${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}stop only if i = 2" \
-         "Check that watchpoint is set correctly."
+         "check that watchpoint is set correctly."
 
 # Check for right error when using both 'if' and 'thread' clauses.
 
 gdb_test "break foo.adb:$bp_location if thread = 10 thread 999" \
          ".*Unknown thread 999\\." \
-         "Combination of 'if' and 'thread' delimiters."
+         "combination of 'if' and 'thread' delimiters."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exprs/p.adb ./gdb/testsuite/gdb.ada/exprs/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exprs/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/exprs/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exprs.exp ./gdb/testsuite/gdb.ada/exprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/exprs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/exprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/bar.adb ./gdb/testsuite/gdb.ada/fin_fun_out/bar.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/bar.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fin_fun_out/bar.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Bar is
+   function F (R : out Rec_Type) return Enum_Type
+   is
+   begin
+      R.Cur := 0;
+      return A;
+   end F;
+end Bar;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/bar.ads ./gdb/testsuite/gdb.ada/fin_fun_out/bar.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/bar.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fin_fun_out/bar.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Bar is
+   type Enum_Type is (A, B, C);
+
+   type Rec_Type is record
+      Cur : Integer;
+   end record;
+
+   function F (R : out Rec_Type) return Enum_Type;
+
+end Bar;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/foo_o525_013.adb ./gdb/testsuite/gdb.ada/fin_fun_out/foo_o525_013.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out/foo_o525_013.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fin_fun_out/foo_o525_013.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Bar; use Bar;
+
+procedure Foo_O525_013 is
+   R : Rec_Type;
+   I : Enum_Type := F (R);
+begin
+   null;
+end Foo_O525_013;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out.exp ./gdb/testsuite/gdb.ada/fin_fun_out.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fin_fun_out.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fin_fun_out.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,38 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo_o525_013
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+runto "bar.f"
+
+# Perform a "finish". The output, and in particular the value of
+# the return value depends on the target, as sometime the compiler
+# will transform it into a struct, which we may or may not be able
+# to display, depending on the ABI.  The objective of the test is
+# to verify that we don't crash, so keep the expected output simple...
+gdb_test "finish" \
+         ".*Value returned.*"
+
+# Verify that GDB is still alive...
+gdb_test "print 1" \
+         "= 1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb ./gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/pck.adb ./gdb/testsuite/gdb.ada/fixed_cmp/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_cmp/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/pck.ads ./gdb/testsuite/gdb.ada/fixed_cmp/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_cmp/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp.exp ./gdb/testsuite/gdb.ada/fixed_cmp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_cmp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_cmp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb ./gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2004-2015 Free Software Foundation, Inc.
+--  Copyright 2004-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_points.exp ./gdb/testsuite/gdb.ada/fixed_points.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fixed_points.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fixed_points.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/foo.adb ./gdb/testsuite/gdb.ada/float_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/float_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/pck.adb ./gdb/testsuite/gdb.ada/float_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/float_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/pck.ads ./gdb/testsuite/gdb.ada/float_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/float_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param.exp ./gdb/testsuite/gdb.ada/float_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/float_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/float_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/defs.adb ./gdb/testsuite/gdb.ada/formatted_ref/defs.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/defs.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/formatted_ref/defs.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/defs.ads ./gdb/testsuite/gdb.ada/formatted_ref/defs.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/defs.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/formatted_ref/defs.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/formatted_ref.adb ./gdb/testsuite/gdb.ada/formatted_ref/formatted_ref.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref/formatted_ref.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/formatted_ref/formatted_ref.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref.exp ./gdb/testsuite/gdb.ada/formatted_ref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/formatted_ref.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/formatted_ref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/foo.adb ./gdb/testsuite/gdb.ada/frame_args/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/frame_args/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/pck.adb ./gdb/testsuite/gdb.ada/frame_args/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/frame_args/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/pck.ads ./gdb/testsuite/gdb.ada/frame_args/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/frame_args/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args.exp ./gdb/testsuite/gdb.ada/frame_args.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/frame_args.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/frame_args.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/dn.adb ./gdb/testsuite/gdb.ada/fullname_bp/dn.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/dn.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp/dn.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/dn.ads ./gdb/testsuite/gdb.ada/fullname_bp/dn.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/dn.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp/dn.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/foo.adb ./gdb/testsuite/gdb.ada/fullname_bp/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/pck.adb ./gdb/testsuite/gdb.ada/fullname_bp/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/pck.ads ./gdb/testsuite/gdb.ada/fullname_bp/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp.exp ./gdb/testsuite/gdb.ada/fullname_bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fullname_bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fullname_bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_addr/foo.adb ./gdb/testsuite/gdb.ada/fun_addr/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_addr/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_addr/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_addr.exp ./gdb/testsuite/gdb.ada/fun_addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_addr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_char/foo.adb ./gdb/testsuite/gdb.ada/funcall_char/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_char/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_char/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+procedure Foo is
+
+   function F (C : Character) return Integer is
+   begin
+      return Character'Pos (C);
+   end F;
+
+   function F (I : Integer) return Integer is
+   begin
+      return -I;
+   end F;
+
+   I1 : constant Integer := F ('A'); --  BREAK
+   I2 : constant Integer := F (1);
+
+begin
+   null;
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_char.exp ./gdb/testsuite/gdb.ada/funcall_char.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_char.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_char.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+# Make sure we can call a function that takes a character with a character
+# literal.  If we cannot, then GDB will instead invoke the function that takes
+# an integer and will return a negative number.
+gdb_test "print f('A')" " = 65"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/foo.adb ./gdb/testsuite/gdb.ada/funcall_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/pck.adb ./gdb/testsuite/gdb.ada/funcall_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/pck.ads ./gdb/testsuite/gdb.ada/funcall_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param.exp ./gdb/testsuite/gdb.ada/funcall_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_ref/foo.adb ./gdb/testsuite/gdb.ada/funcall_ref/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_ref/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_ref/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_ref.exp ./gdb/testsuite/gdb.ada/funcall_ref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/funcall_ref.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/funcall_ref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/foo.adb ./gdb/testsuite/gdb.ada/fun_in_declare/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_in_declare/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/pck.adb ./gdb/testsuite/gdb.ada/fun_in_declare/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_in_declare/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/pck.ads ./gdb/testsuite/gdb.ada/fun_in_declare/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_in_declare/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare.exp ./gdb/testsuite/gdb.ada/fun_in_declare.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_in_declare.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_in_declare.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_overload_menu/foo.adb ./gdb/testsuite/gdb.ada/fun_overload_menu/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_overload_menu/foo.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_overload_menu/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,47 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+procedure Foo is
+
+   type New_Integer is new Integer;
+   type Integer_Access is access Integer;
+
+   function F (I : Integer; A : Integer_Access) return Boolean is
+   begin
+      return True;
+   end F;
+
+   function F (I : New_Integer; A : Integer_Access) return Boolean is
+   begin
+      return False;
+   end F;
+
+   procedure P (I : Integer; A : Integer_Access) is
+   begin
+      null;
+   end P;
+
+   procedure P (I : New_Integer; A : Integer_Access) is
+   begin
+      null;
+   end P;
+
+   B1 : constant Boolean := F (Integer'(1), null); --  BREAK
+   B2 : constant Boolean := F (New_Integer'(2), null);
+
+begin
+   P (Integer'(3), null);
+   P (New_Integer'(4), null);
+end Foo;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_overload_menu.exp ./gdb/testsuite/gdb.ada/fun_overload_menu.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_overload_menu.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_overload_menu.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "$srcfile" "$binfile" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+
+proc test_menu {expr function menu_entries selection output} {
+    set menu [multi_line "Multiple matches for $function" \
+                         "\\\[0\\\] cancel" \
+                         "$menu_entries" \
+                         "> $"]
+    set test_name "multiple matches for $function ($expr)"
+    gdb_test_multiple "print $expr" "$test_name" \
+    {
+        -re "$menu" {
+            pass "$test_name"
+        }
+        default {
+            fail "$test_name"
+        }
+    }
+    gdb_test "$selection" "$output"
+}
+
+
+# Check that function signatures in overload menus are displayed as expected.
+
+# 1. Test with overloaded functions
+test_menu "f (1, null)" "f" \
+          [multi_line \
+           "\\\[1\\\] foo\.f \\(integer; foo\.integer_access\\) return boolean at .*foo.adb:.*" \
+           "\\\[2\\\] foo\.f \\(foo\.new_integer; foo\.integer_access\\) return boolean at .*foo.adb:.*"] \
+          "1" "= true"
+
+# 2. Test with overloaded procedures
+test_menu "p (1, null)" "p" \
+          [multi_line \
+           "\\\[1\\\] foo\.p \\(integer; foo\.integer_access\\) at .*foo.adb:.*" \
+           "\\\[2\\\] foo\.p \\(foo\.new_integer; foo\.integer_access\\) at .*foo.adb:.*" ] \
+          "1" "= (void)"
+
+# 3. Test with signatures disabled
+gdb_test "set ada print-signatures off" ""
+test_menu "f (1, null)" "f" \
+          [multi_line \
+           "\\\[1\\\] foo\.f at .*foo.adb:.*" \
+           "\\\[2\\\] foo\.f at .*foo.adb:.*"] \
+          "1" "= true"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb ./gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Pack;
+
+procedure Fun_Renaming is
+   function N (I : Integer) return Integer renames Pack.Next;
+begin
+   Pack.Discard (N (1)); --  BREAK
+   Pack.Discard (Pack.Renamed_Next (1)); --  BREAK
+end Fun_Renaming;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/pack.adb ./gdb/testsuite/gdb.ada/fun_renaming/pack.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/pack.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_renaming/pack.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Pack is
+   function Next (I : Integer) return Integer is
+   begin
+      return I + 1;
+   end Next;
+
+   procedure Discard (I : Integer) is
+   begin
+      null;
+   end Discard;
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/pack.ads ./gdb/testsuite/gdb.ada/fun_renaming/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming/pack.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_renaming/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Pack is
+
+   function Next (I : Integer) return Integer;
+   function Renamed_Next (I : Integer) return Integer renames Next;
+   procedure Discard (I : Integer);
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming.exp ./gdb/testsuite/gdb.ada/fun_renaming.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/fun_renaming.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/fun_renaming.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,83 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile fun_renaming
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/fun_renaming.adb]
+runto "fun_renaming.adb:$bp_location"
+
+# Sanity check: make sure we can call a regular global function.
+gdb_test "print next(1)" " = 2"
+
+# Starting with GCC 6, renamed subprograms are materialized in the debugging
+# information: make sure we can call the regular global function using its
+# multiple names.
+
+set test "print n(1)"
+gdb_test_multiple $test $test {
+    -re " = 2\..*$gdb_prompt $"  {
+        pass $test
+    }
+    -re "No definition of \"n\" in current context\..*$gdb_prompt $" {
+        if {[test_compiler_info {gcc-6*}]} {
+            fail $test
+        } else {
+            xfail $test
+        }
+    }
+
+}
+set test "print renamed_next(1)"
+gdb_test_multiple $test $test {
+    -re " = 2\..*$gdb_prompt $" {
+        pass $test
+    }
+    -re "No definition of \"renamed_next\" in current context\..*$gdb_prompt $" {
+        if {[test_compiler_info {gcc-6*}]} {
+            fail $test
+        } else {
+            xfail $test
+        }
+    }
+}
+
+set test "print pack.renamed_next(1)"
+gdb_test_multiple $test $test {
+    -re " = 2\..*$gdb_prompt $" {
+        pass $test
+    }
+    -re "No definition of \"pack\.renamed_next\" in current context\..*$gdb_prompt $" {
+        if {[test_compiler_info {gcc-6*}]} {
+            fail $test
+        } else {
+            xfail $test
+        }
+    }
+    -re "Type <data variable, no debug info> is not a structure or union type\..*$gdb_prompt $" {
+        if {[test_compiler_info {gcc-6*}]} {
+            fail $test
+        } else {
+            xfail $test
+        }
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/gnat_ada.gpr ./gdb/testsuite/gdb.ada/gnat_ada.gpr
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/gnat_ada.gpr	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/gnat_ada.gpr	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
---  Copyright 2004-2015 Free Software Foundation, Inc.
---
---  This program is free software; you can redistribute it and/or modify
---  it under the terms of the GNU General Public License as published by
---  the Free Software Foundation; either version 3 of the License, or
---  (at your option) any later version.
---
---  This program is distributed in the hope that it will be useful,
---  but WITHOUT ANY WARRANTY; without even the implied warranty of
---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
---  GNU General Public License for more details.
---
---  You should have received a copy of the GNU General Public License
---  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
---  This project file allows us to control the location where the
---  compilation artifacts produced when building the Ada examples
---  are stored.
-
-project Gnat_Ada is
-
-   for Source_Dirs use (external ("SRC"));
-   for Object_Dir use external ("OBJ");
-
-end Gnat_Ada;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym.adb ./gdb/testsuite/gdb.ada/homonym/homonym.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym/homonym.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym.ads ./gdb/testsuite/gdb.ada/homonym/homonym.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym/homonym.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym_main.adb ./gdb/testsuite/gdb.ada/homonym/homonym_main.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/homonym_main.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym/homonym_main.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/pck.adb ./gdb/testsuite/gdb.ada/homonym/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/pck.ads ./gdb/testsuite/gdb.ada/homonym/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym.exp ./gdb/testsuite/gdb.ada/homonym.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/homonym.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/homonym.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc/const.ads ./gdb/testsuite/gdb.ada/info_exc/const.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc/const.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_exc/const.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc/foo.adb ./gdb/testsuite/gdb.ada/info_exc/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_exc/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc.exp ./gdb/testsuite/gdb.ada/info_exc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_exc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_exc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[gdb_compile_ada "${srcfile}" "${bin
 clean_restart ${testfile}
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -34,9 +34,7 @@ gdb_test "info exceptions" \
                 "program_error: $hex" \
                 "storage_error: $hex" \
                 "tasking_error: $hex" \
-                ".*" \
-                "const.aint_global_gdb_e: $hex" \
-                ".*"]
+                ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ]
 
 gdb_test "info exceptions task" \
     [multi_line "All Ada exceptions matching regular expression \"task\":" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/foo.adb ./gdb/testsuite/gdb.ada/info_locals_renaming/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_locals_renaming/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb ./gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/pck.ads ./gdb/testsuite/gdb.ada/info_locals_renaming/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_locals_renaming/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming.exp ./gdb/testsuite/gdb.ada/info_locals_renaming.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_locals_renaming.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_locals_renaming.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_types.c ./gdb/testsuite/gdb.ada/info_types.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_types.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_types.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_types.exp ./gdb/testsuite/gdb.ada/info_types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/info_types.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/info_types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref/foo.adb ./gdb/testsuite/gdb.ada/int_deref/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/int_deref/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref/pck.ads ./gdb/testsuite/gdb.ada/int_deref/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/int_deref/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref.exp ./gdb/testsuite/gdb.ada/int_deref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/int_deref.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/int_deref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/foo.adb ./gdb/testsuite/gdb.ada/interface/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/interface/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/types.adb ./gdb/testsuite/gdb.ada/interface/types.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/types.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/interface/types.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/types.ads ./gdb/testsuite/gdb.ada/interface/types.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface/types.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/interface/types.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface.exp ./gdb/testsuite/gdb.ada/interface.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/interface.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/interface.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/classes.adb ./gdb/testsuite/gdb.ada/iwide/classes.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/classes.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/iwide/classes.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/classes.ads ./gdb/testsuite/gdb.ada/iwide/classes.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/classes.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/iwide/classes.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/p.adb ./gdb/testsuite/gdb.ada/iwide/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/iwide/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide.exp ./gdb/testsuite/gdb.ada/iwide.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/iwide.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/iwide.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch/foo.c ./gdb/testsuite/gdb.ada/lang_switch/foo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch/foo.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/lang_switch/foo.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Free Software Foundation, Inc.
+/* Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb ./gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch.exp ./gdb/testsuite/gdb.ada/lang_switch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/lang_switch.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/lang_switch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
 load_lib "ada.exp"
 
 standard_ada_testfile lang_switch
-set cfile "${testdir}/foo"
-set csrcfile ${srcdir}/${subdir}/${cfile}.c
+set cfile "foo"
+set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c
 set cobject [standard_output_file ${cfile}.o]
 
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/Makefile.in ./gdb/testsuite/gdb.ada/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = \
-  array_bounds/bar \
-  array_return/p \
-  array_subscript_addr/p \
-  arrayidx/p \
-  arrayparam/foo \
-  arrayptr/foo \
-  atomic_enum/foo \
-  catch_ex/foo \
-  char_param/foo \
-  complete/foo \
-  exec_changed/common \
-  exec_changed/first \
-  exec_changed/second \
-  exprs/p \
-  fixed_cmp/fixed \
-  fixed_points/fixed_points \
-  formatted_ref/formatted_ref \
-  frame_args/foo \
-  fun_addr/foo \
-  fun_in_declare/foo \
-  funcall_param/foo \
-  homonym/homonym_main \
-  info_types \
-  interface/foo \
-  lang_switch/lang_switch \
-  nested/hello \
-  null_array/foo \
-  null_record/null_record \
-  packed_array/pa \
-  packed_tagged/comp_bug \
-  print_chars/foo \
-  start/dummy \
-  ptype_field/foo \
-  ref_param/foo \
-  str_ref_cmp/foo \
-  sym_print_name/foo \
-  taft_type/p \
-  tagged/foo \
-  type_coercion/assign \
-  watch_arg/watch
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-find . -name 'b~*.ad[sb]' -print | xargs rm -f
-	-rm -f *~ a.out xgdb *.x *.ci *.tmp
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
-	-find . -name '*.dwo' -print | xargs rm -f
-	-find . -name '*.dwp' -print | xargs rm -f
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS) twice-tmp.c
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb ./gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_catch_ex.exp ./gdb/testsuite/gdb.ada/mi_catch_ex.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_catch_ex.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_catch_ex.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ set eol "\[\r\n\]+"
 clean_restart ${testfile}
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -70,7 +70,7 @@ mi_gdb_load ${binfile}
 ####################################
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -78,17 +78,38 @@ mi_gdb_test "-catch-exception" \
             "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"all Ada exceptions\",.*}" \
             "catch all exceptions"
 
-mi_execute_to "exec-continue" \
-              "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR" \
-              "foo" "" ".*" ".*" \
-              ".*" \
-              "continue until CE caught by all-exceptions catchpoint"
+# Continue to caught exception.
 
-mi_execute_to "exec-continue" \
-              "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR" \
-              "foo" "" ".*" ".*" \
-              ".*" \
-              "continue until PE caught by all-exceptions catchpoint"
+proc continue_to_exception { exception_name test } {
+    global hex any_nb
+
+    mi_send_resuming_command "exec-continue" "$test"
+
+    # Match console stream output.
+    gdb_expect {
+	-re " $exception_name at $hex in foo " {
+	}
+	timeout {
+	    fail "$test (timeout)"
+	    return -1
+	}
+    }
+
+    # Now MI stream output.
+    mi_expect_stop \
+	"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"$exception_name" \
+	"foo" "" ".*" ".*" \
+	".*" \
+	$test
+}
+
+continue_to_exception \
+    "CONSTRAINT_ERROR" \
+    "continue until CE caught by all-exceptions catchpoint"
+
+continue_to_exception \
+    "PROGRAM_ERROR" \
+    "continue until PE caught by all-exceptions catchpoint"
 
 ################################################
 # 2. Try catching only some of the exceptions. #
@@ -105,7 +126,7 @@ mi_execute_to "exec-continue" \
 #  - continue, the program exits.
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb ./gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/pck.adb ./gdb/testsuite/gdb.ada/mi_dyn_arr/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_dyn_arr/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/pck.ads ./gdb/testsuite/gdb.ada/mi_dyn_arr/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_dyn_arr/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr.exp ./gdb/testsuite/gdb.ada/mi_dyn_arr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_dyn_arr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_dyn_arr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -45,7 +45,7 @@ mi_continue_to_line \
 
 mi_gdb_test "-var-create bt * bt" \
     "\\^done,name=\"bt\",numchild=\"3\",.*" \
-    "Create bt varobj"
+    "create bt varobj"
 
 mi_gdb_test "-var-update 1 *" \
     "\\^done,changelist=\\\[\\\]" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info/const.ads ./gdb/testsuite/gdb.ada/mi_exc_info/const.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info/const.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_exc_info/const.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb ./gdb/testsuite/gdb.ada/mi_exc_info/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_exc_info/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info.exp ./gdb/testsuite/gdb.ada/mi_exc_info.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_exc_info.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_exc_info.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 }
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond/foo.adb ./gdb/testsuite/gdb.ada/mi_ex_cond/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_ex_cond/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond/pck.ads ./gdb/testsuite/gdb.ada/mi_ex_cond/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_ex_cond/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond.exp ./gdb/testsuite/gdb.ada/mi_ex_cond.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_ex_cond.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_ex_cond.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ set eol "\[\r\n\]+"
 clean_restart ${testfile}
 
 if ![runto_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/foo.adb ./gdb/testsuite/gdb.ada/mi_interface/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_interface/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/pck.adb ./gdb/testsuite/gdb.ada/mi_interface/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_interface/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/pck.ads ./gdb/testsuite/gdb.ada/mi_interface/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_interface/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface.exp ./gdb/testsuite/gdb.ada/mi_interface.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_interface.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_interface.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -45,7 +45,7 @@ mi_continue_to_line \
 
 mi_gdb_test "-var-create ggg1 * ggg1" \
     "\\^done,name=\"ggg1\",numchild=\"1\",value=\"{...}\",type=\"<ref> pck.gadatatype\",has_more=\"0\"" \
-    "Create ggg1 varobj"
+    "create ggg1 varobj"
 
 mi_gdb_test "-var-list-children 1 ggg1" \
     "\\^done,numchild=\"1\",children=\\\[child={name=\"ggg1.i\",exp=\"i\",numchild=\"0\",value=\"42\",type=\"integer\"}\\\],has_more=\"0\"" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_arg/task_switch.adb ./gdb/testsuite/gdb.ada/mi_task_arg/task_switch.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_arg/task_switch.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_task_arg/task_switch.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_arg.exp ./gdb/testsuite/gdb.ada/mi_task_arg.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_arg.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_task_arg.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ mi_gdb_load ${binfile}
 mi_gdb_test "-gdb-set debug-file-directory \"\"" ".*"
 
 if ![mi_runto "task_switch.break_me"] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_info/task_switch.adb ./gdb/testsuite/gdb.ada/mi_task_info/task_switch.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_info/task_switch.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_task_info/task_switch.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_info.exp ./gdb/testsuite/gdb.ada/mi_task_info.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_task_info.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_task_info.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ mi_gdb_load ${binfile}
 ####################################
 
 if ![mi_runto "task_switch.break_me"] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/bar.adb ./gdb/testsuite/gdb.ada/mi_var_array/bar.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/bar.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_var_array/bar.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/pck.adb ./gdb/testsuite/gdb.ada/mi_var_array/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_var_array/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/pck.ads ./gdb/testsuite/gdb.ada/mi_var_array/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_var_array/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array.exp ./gdb/testsuite/gdb.ada/mi_var_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mi_var_array.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mi_var_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
 if ![mi_run_to_main] then {
-   fail "Cannot run to main, testcase aborted"
+   fail "cannot run to main, testcase aborted"
    return 0
 }
 
@@ -45,7 +45,7 @@ mi_continue_to_line \
 
 mi_gdb_test "-var-create vta * vta" \
     "\\^done,name=\"vta\",numchild=\"2\",.*" \
-    "Create bt varobj"
+    "create bt varobj"
 
 mi_gdb_test "-var-list-children vta" \
     "\\^done,numchild=\"2\",children=\\\[child={name=\"vta.n\",exp=\"n\",numchild=\"0\",type=\"bar\\.int\"},child={name=\"vta.f\",exp=\"f\",numchild=\"0\",type=\"array \\(1 .. n\\) of character\"}\\\],.*" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mod_from_name/foo.adb ./gdb/testsuite/gdb.ada/mod_from_name/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mod_from_name/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mod_from_name/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mod_from_name.exp ./gdb/testsuite/gdb.ada/mod_from_name.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/mod_from_name.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/mod_from_name.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/foo.adb ./gdb/testsuite/gdb.ada/n_arr_bound/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/n_arr_bound/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/pck.adb ./gdb/testsuite/gdb.ada/n_arr_bound/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/n_arr_bound/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/pck.ads ./gdb/testsuite/gdb.ada/n_arr_bound/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/n_arr_bound/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound.exp ./gdb/testsuite/gdb.ada/n_arr_bound.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/n_arr_bound.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/n_arr_bound.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/nested/hello.adb ./gdb/testsuite/gdb.ada/nested/hello.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/nested/hello.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/nested/hello.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/nested.exp ./gdb/testsuite/gdb.ada/nested.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/nested.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/nested.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/foo.adb ./gdb/testsuite/gdb.ada/null_array/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_array/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/pck.adb ./gdb/testsuite/gdb.ada/null_array/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_array/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/pck.ads ./gdb/testsuite/gdb.ada/null_array/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_array/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array.exp ./gdb/testsuite/gdb.ada/null_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_array.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/bar.adb ./gdb/testsuite/gdb.ada/null_record/bar.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/bar.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_record/bar.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2004-2015 Free Software Foundation, Inc.
+--  Copyright 2004-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/bar.ads ./gdb/testsuite/gdb.ada/null_record/bar.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/bar.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_record/bar.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2004-2015 Free Software Foundation, Inc.
+--  Copyright 2004-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/null_record.adb ./gdb/testsuite/gdb.ada/null_record/null_record.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record/null_record.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_record/null_record.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2004-2015 Free Software Foundation, Inc.
+--  Copyright 2004-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record.exp ./gdb/testsuite/gdb.ada/null_record.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/null_record.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/null_record.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/callee.adb ./gdb/testsuite/gdb.ada/O2_float_param/callee.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/callee.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/callee.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/callee.ads ./gdb/testsuite/gdb.ada/O2_float_param/callee.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/callee.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/callee.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/caller.adb ./gdb/testsuite/gdb.ada/O2_float_param/caller.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/caller.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/caller.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/caller.ads ./gdb/testsuite/gdb.ada/O2_float_param/caller.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/caller.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/caller.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/foo.adb ./gdb/testsuite/gdb.ada/O2_float_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/io.adb ./gdb/testsuite/gdb.ada/O2_float_param/io.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/io.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/io.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/io.ads ./gdb/testsuite/gdb.ada/O2_float_param/io.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param/io.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param/io.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param.exp ./gdb/testsuite/gdb.ada/O2_float_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/O2_float_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/O2_float_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops.adb ./gdb/testsuite/gdb.ada/operator_bp/ops.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/operator_bp/ops.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops.ads ./gdb/testsuite/gdb.ada/operator_bp/ops.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/operator_bp/ops.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops_test.adb ./gdb/testsuite/gdb.ada/operator_bp/ops_test.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp/ops_test.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/operator_bp/ops_test.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp.exp ./gdb/testsuite/gdb.ada/operator_bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/operator_bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/operator_bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/optim_drec/foo.adb ./gdb/testsuite/gdb.ada/optim_drec/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/optim_drec/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/optim_drec/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/optim_drec.exp ./gdb/testsuite/gdb.ada/optim_drec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/optim_drec.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/optim_drec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.adb ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.ads ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/bar.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp ./gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,20 +23,14 @@ if {[gdb_compile_ada "${srcfile}" "${bin
 
 clean_restart ${testfile}
 
-# GCC currently is missing a DW_AT_origin attribute in one of the
-# lexical blocks, preventing GDB from creating a symbol for the
-# subprogram we want to break on.
-setup_xfail "*-*-*"
 gdb_test "break foo_o224_021.child1.child2" \
          "Breakpoint \[0-9\]+ at.*: file .*foo_o224_021.adb, line \[0-9\]+."
 
 gdb_run_cmd
-setup_xfail "*-*-*"
 gdb_test "" \
          "Breakpoint $decimal, foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*"
 
 set opt_addr_in "($hex in)?"
-setup_xfail "*-*-*"
 gdb_test "bt" \
     [multi_line "#0 +$opt_addr_in +foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
                 "#1 +$opt_addr_in +foo_o224_021\\.child1 \\(\\).*" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pa.adb ./gdb/testsuite/gdb.ada/packed_array/pa.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pa.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_array/pa.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2005-2015 Free Software Foundation, Inc.
+--  Copyright 2005-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pck.adb ./gdb/testsuite/gdb.ada/packed_array/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_array/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright (C) 2011-2015 Free Software Foundation, Inc.
+--  Copyright (C) 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pck.ads ./gdb/testsuite/gdb.ada/packed_array/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_array/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright (C) 2011-2015 Free Software Foundation, Inc.
+--  Copyright (C) 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array.exp ./gdb/testsuite/gdb.ada/packed_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_array.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_tagged/comp_bug.adb ./gdb/testsuite/gdb.ada/packed_tagged/comp_bug.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_tagged/comp_bug.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_tagged/comp_bug.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_tagged.exp ./gdb/testsuite/gdb.ada/packed_tagged.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/packed_tagged.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/packed_tagged.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb ./gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb ./gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads ./gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren.exp ./gdb/testsuite/gdb.ada/pckd_arr_ren.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_arr_ren.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_arr_ren.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/foo_o508_021.adb ./gdb/testsuite/gdb.ada/pckd_neg/foo_o508_021.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/foo_o508_021.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_neg/foo_o508_021.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright (C) 2015 Free Software Foundation, Inc.
+--  Copyright (C) 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/pck.adb ./gdb/testsuite/gdb.ada/pckd_neg/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_neg/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright (C) 2015 Free Software Foundation, Inc.
+--  Copyright (C) 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/pck.ads ./gdb/testsuite/gdb.ada/pckd_neg/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_neg/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright (C) 2015 Free Software Foundation, Inc.
+--  Copyright (C) 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg.exp ./gdb/testsuite/gdb.ada/pckd_neg.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pckd_neg.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pckd_neg.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb ./gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/pck.adb ./gdb/testsuite/gdb.ada/pkd_arr_elem/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pkd_arr_elem/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/pck.ads ./gdb/testsuite/gdb.ada/pkd_arr_elem/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pkd_arr_elem/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem.exp ./gdb/testsuite/gdb.ada/pkd_arr_elem.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pkd_arr_elem.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pkd_arr_elem.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/foo.adb ./gdb/testsuite/gdb.ada/pp-rec-component/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pp-rec-component/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/pck.adb ./gdb/testsuite/gdb.ada/pp-rec-component/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pp-rec-component/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/pck.ads ./gdb/testsuite/gdb.ada/pp-rec-component/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pp-rec-component/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component.exp ./gdb/testsuite/gdb.ada/pp-rec-component.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pp-rec-component.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component.py ./gdb/testsuite/gdb.ada/pp-rec-component.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/pp-rec-component.py	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/pp-rec-component.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/foo.adb ./gdb/testsuite/gdb.ada/print_chars/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/print_chars/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/pck.adb ./gdb/testsuite/gdb.ada/print_chars/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/print_chars/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/pck.ads ./gdb/testsuite/gdb.ada/print_chars/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/print_chars/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars.exp ./gdb/testsuite/gdb.ada/print_chars.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_chars.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/print_chars.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_pc.exp ./gdb/testsuite/gdb.ada/print_pc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/print_pc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/print_pc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/foo.adb ./gdb/testsuite/gdb.ada/ptr_typedef/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptr_typedef/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/pck.adb ./gdb/testsuite/gdb.ada/ptr_typedef/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptr_typedef/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/pck.ads ./gdb/testsuite/gdb.ada/ptr_typedef/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptr_typedef/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef.exp ./gdb/testsuite/gdb.ada/ptr_typedef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptr_typedef.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptr_typedef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_arith_binop.exp ./gdb/testsuite/gdb.ada/ptype_arith_binop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_arith_binop.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_arith_binop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/foo.adb ./gdb/testsuite/gdb.ada/ptype_field/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_field/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/pck.adb ./gdb/testsuite/gdb.ada/ptype_field/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_field/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/pck.ads ./gdb/testsuite/gdb.ada/ptype_field/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_field/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field.exp ./gdb/testsuite/gdb.ada/ptype_field.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_field.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_field.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/foo.adb ./gdb/testsuite/gdb.ada/ptype_tagged_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_tagged_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb ./gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads ./gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param.exp ./gdb/testsuite/gdb.ada/ptype_tagged_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ptype_tagged_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ptype_tagged_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/foo.adb ./gdb/testsuite/gdb.ada/py_range/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/py_range/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/pck.adb ./gdb/testsuite/gdb.ada/py_range/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/py_range/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/pck.ads ./gdb/testsuite/gdb.ada/py_range/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/py_range/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range.exp ./gdb/testsuite/gdb.ada/py_range.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/py_range.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/py_range.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/foo.adb ./gdb/testsuite/gdb.ada/rdv_wait/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rdv_wait/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/pck.adb ./gdb/testsuite/gdb.ada/rdv_wait/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rdv_wait/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/pck.ads ./gdb/testsuite/gdb.ada/rdv_wait/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rdv_wait/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait.exp ./gdb/testsuite/gdb.ada/rdv_wait.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rdv_wait.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rdv_wait.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb ./gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/pck.adb ./gdb/testsuite/gdb.ada/rec_comp/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_comp/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/pck.ads ./gdb/testsuite/gdb.ada/rec_comp/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_comp/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp.exp ./gdb/testsuite/gdb.ada/rec_comp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_comp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_comp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/foo.adb ./gdb/testsuite/gdb.ada/rec_return/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_return/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/pck.adb ./gdb/testsuite/gdb.ada/rec_return/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_return/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/pck.ads ./gdb/testsuite/gdb.ada/rec_return/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_return/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2010-2015 Free Software Foundation, Inc.
+--  Copyright 2010-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return.exp ./gdb/testsuite/gdb.ada/rec_return.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/rec_return.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/rec_return.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/foo.adb ./gdb/testsuite/gdb.ada/ref_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/pck.adb ./gdb/testsuite/gdb.ada/ref_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/pck.ads ./gdb/testsuite/gdb.ada/ref_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param.exp ./gdb/testsuite/gdb.ada/ref_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/p.adb ./gdb/testsuite/gdb.ada/ref_tick_size/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_tick_size/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/pck.adb ./gdb/testsuite/gdb.ada/ref_tick_size/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_tick_size/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/pck.ads ./gdb/testsuite/gdb.ada/ref_tick_size/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_tick_size/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size.exp ./gdb/testsuite/gdb.ada/ref_tick_size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/ref_tick_size.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/ref_tick_size.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/a.adb ./gdb/testsuite/gdb.ada/same_enum/a.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/a.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/same_enum/a.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/pck.adb ./gdb/testsuite/gdb.ada/same_enum/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/same_enum/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/pck.ads ./gdb/testsuite/gdb.ada/same_enum/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/same_enum/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum.exp ./gdb/testsuite/gdb.ada/same_enum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/same_enum.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/same_enum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.adb ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp ./gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/a.adb ./gdb/testsuite/gdb.ada/set_wstr/a.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/a.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_wstr/a.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/pck.adb ./gdb/testsuite/gdb.ada/set_wstr/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_wstr/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/pck.ads ./gdb/testsuite/gdb.ada/set_wstr/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_wstr/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr.exp ./gdb/testsuite/gdb.ada/set_wstr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/set_wstr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/set_wstr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/foo.adb ./gdb/testsuite/gdb.ada/small_reg_param/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/small_reg_param/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/pck.adb ./gdb/testsuite/gdb.ada/small_reg_param/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/small_reg_param/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/pck.ads ./gdb/testsuite/gdb.ada/small_reg_param/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/small_reg_param/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param.exp ./gdb/testsuite/gdb.ada/small_reg_param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/small_reg_param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/small_reg_param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ gdb_breakpoint "call_me"
 # Continue until we hit the breakpoint inside `Call_Me'.  We verify
 # that the parameter value is correct.
 gdb_test "continue" \
-    "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at .*/pck.adb:.*" \
+    "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at (.*/)?pck.adb:.*" \
     "continue to call_me"
 
 # And just to make sure, we also verify that the parameter value
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/start/dummy.adb ./gdb/testsuite/gdb.ada/start/dummy.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/start/dummy.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/start/dummy.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2005-2015 Free Software Foundation, Inc.
+--  Copyright 2005-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/start.exp ./gdb/testsuite/gdb.ada/start.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/start.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/start.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_ada_tests] } { return -1 }
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
 if [target_info exists use_gdb_stub] {
-    untested start.exp
+    untested "skipping test due to gdb stub"
     return
 }
 
@@ -34,7 +34,7 @@ clean_restart ${testfile}
 
 # Verify that "start" lands inside the right procedure.
 if { [gdb_start_cmd] < 0 } {
-    untested start
+    untested "start failed to land inside the right procedure"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp/foo.adb ./gdb/testsuite/gdb.ada/str_ref_cmp/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_ref_cmp/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp/pck.ads ./gdb/testsuite/gdb.ada/str_ref_cmp/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_ref_cmp/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp.exp ./gdb/testsuite/gdb.ada/str_ref_cmp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_ref_cmp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_ref_cmp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/parse.adb ./gdb/testsuite/gdb.ada/str_uninit/parse.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/parse.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_uninit/parse.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/pck.adb ./gdb/testsuite/gdb.ada/str_uninit/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_uninit/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/pck.ads ./gdb/testsuite/gdb.ada/str_uninit/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_uninit/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit.exp ./gdb/testsuite/gdb.ada/str_uninit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/str_uninit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/str_uninit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/foo.adb ./gdb/testsuite/gdb.ada/sym_print_name/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/sym_print_name/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/pck.adb ./gdb/testsuite/gdb.ada/sym_print_name/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/sym_print_name/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/pck.ads ./gdb/testsuite/gdb.ada/sym_print_name/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/sym_print_name/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name.exp ./gdb/testsuite/gdb.ada/sym_print_name.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/sym_print_name.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/sym_print_name.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/p.adb ./gdb/testsuite/gdb.ada/taft_type/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/taft_type/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/pck.adb ./gdb/testsuite/gdb.ada/taft_type/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/taft_type/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/pck.ads ./gdb/testsuite/gdb.ada/taft_type/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/taft_type/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type.exp ./gdb/testsuite/gdb.ada/taft_type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/taft_type.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/taft_type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/foo.adb ./gdb/testsuite/gdb.ada/tagged/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/pck.adb ./gdb/testsuite/gdb.ada/tagged/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/pck.ads ./gdb/testsuite/gdb.ada/tagged/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/pack.adb ./gdb/testsuite/gdb.ada/tagged_access/pack.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/pack.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_access/pack.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/pack.ads ./gdb/testsuite/gdb.ada/tagged_access/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/pack.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_access/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/p.adb ./gdb/testsuite/gdb.ada/tagged_access/p.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access/p.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_access/p.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access.exp ./gdb/testsuite/gdb.ada/tagged_access.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_access.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_access.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged.exp ./gdb/testsuite/gdb.ada/tagged.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/foo.adb ./gdb/testsuite/gdb.ada/tagged_not_init/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_not_init/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/pck.adb ./gdb/testsuite/gdb.ada/tagged_not_init/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_not_init/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/pck.ads ./gdb/testsuite/gdb.ada/tagged_not_init/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_not_init/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init.exp ./gdb/testsuite/gdb.ada/tagged_not_init.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tagged_not_init.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tagged_not_init.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/foo.adb ./gdb/testsuite/gdb.ada/task_bp/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/task_bp/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/pck.adb ./gdb/testsuite/gdb.ada/task_bp/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/task_bp/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/pck.ads ./gdb/testsuite/gdb.ada/task_bp/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/task_bp/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp.exp ./gdb/testsuite/gdb.ada/task_bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/task_bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/task_bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tasks/foo.adb ./gdb/testsuite/gdb.ada/tasks/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tasks/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tasks/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tasks.exp ./gdb/testsuite/gdb.ada/tasks.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tasks.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tasks.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_last_segv/foo.adb ./gdb/testsuite/gdb.ada/tick_last_segv/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_last_segv/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_last_segv/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_last_segv.exp ./gdb/testsuite/gdb.ada/tick_last_segv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_last_segv.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_last_segv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2014-2015 Free Software Foundation, Inc.
+--  Copyright 2014-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion/assign.adb ./gdb/testsuite/gdb.ada/type_coercion/assign.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion/assign.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/type_coercion/assign.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion/ident.adb ./gdb/testsuite/gdb.ada/type_coercion/ident.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion/ident.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/type_coercion/ident.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2008-2015 Free Software Foundation, Inc.
+--  Copyright 2008-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion.exp ./gdb/testsuite/gdb.ada/type_coercion.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/type_coercion.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/type_coercion.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.adb ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.ads ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars/parse.adb ./gdb/testsuite/gdb.ada/uninitialized_vars/parse.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars/parse.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/uninitialized_vars/parse.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars/parse_controlled.ads ./gdb/testsuite/gdb.ada/uninitialized_vars/parse_controlled.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars/parse_controlled.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/uninitialized_vars/parse_controlled.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars.exp ./gdb/testsuite/gdb.ada/uninitialized_vars.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/uninitialized_vars.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/uninitialized_vars.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb ./gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/pck.adb ./gdb/testsuite/gdb.ada/var_arr_attrs/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_attrs/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/pck.ads ./gdb/testsuite/gdb.ada/var_arr_attrs/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_attrs/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs.exp ./gdb/testsuite/gdb.ada/var_arr_attrs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_attrs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_attrs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb ./gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Pack is
+
+   function Identity (I : Integer) return Integer is
+   begin
+      return I;
+   end Identity;
+
+   procedure Do_Nothing (A : Array_Type) is null;
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads ./gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Pack is
+   type Rec_Type is record
+      I : Integer;
+      B : Boolean;
+   end record;
+
+   type Vec_Type is array (1 .. 4) of Rec_Type;
+
+   type Array_Type is array (Positive range <>) of Vec_Type;
+
+   procedure Do_Nothing (A : Array_Type);
+   function Identity (I : Integer) return Integer;
+
+end Pack;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb ./gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+--  Copyright 2015-2017 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Pack; use Pack;
+
+procedure Var_Arr_Typedef is
+   RA : constant Rec_Type := (3, False);
+   RB : constant Rec_Type := (2, True);
+
+   VA : constant Vec_Type := (RA, RA, RB, RB);
+   VB : constant Vec_Type := (RB, RB, RA, RA);
+
+   A : constant Array_Type (1 .. Identity (4)) := (VA, VA, VB, VB);
+begin
+   Do_Nothing (A); --  BREAK
+end Var_Arr_Typedef;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef.exp ./gdb/testsuite/gdb.ada/var_arr_typedef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_arr_typedef.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_arr_typedef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile var_arr_typedef
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/var_arr_typedef.adb]
+runto "var_arr_typedef.adb:$bp_location"
+
+set ra "\\(i => 3, b => false\\)"
+set rb "\\(i => 2, b => true\\)"
+
+set va "\\($ra, $ra, $rb, $rb\\)"
+set vb "\\($rb, $rb, $ra, $ra\\)"
+
+set a "\\($va, $va, $vb, $vb\\)"
+
+gdb_test "print va" \
+         " = $va"
+
+gdb_test "print vb" \
+         " = $vb"
+
+gdb_test "print a" \
+         " = $a"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/foo.adb ./gdb/testsuite/gdb.ada/variant_record_packed_array/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/variant_record_packed_array/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/pck.adb ./gdb/testsuite/gdb.ada/variant_record_packed_array/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/variant_record_packed_array/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/pck.ads ./gdb/testsuite/gdb.ada/variant_record_packed_array/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/variant_record_packed_array/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2009-2015 Free Software Foundation, Inc.
+--  Copyright 2009-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array.exp ./gdb/testsuite/gdb.ada/variant_record_packed_array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/variant_record_packed_array.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/variant_record_packed_array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/foo_na09_042.adb ./gdb/testsuite/gdb.ada/var_rec_arr/foo_na09_042.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/foo_na09_042.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_rec_arr/foo_na09_042.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/pck.adb ./gdb/testsuite/gdb.ada/var_rec_arr/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_rec_arr/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/pck.ads ./gdb/testsuite/gdb.ada/var_rec_arr/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_rec_arr/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2015 Free Software Foundation, Inc.
+--  Copyright 2015-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr.exp ./gdb/testsuite/gdb.ada/var_rec_arr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/var_rec_arr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/var_rec_arr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -49,3 +49,9 @@ gdb_test "print a2(2)" \
 
 gdb_test "print a2(3)" \
          " = \\(i => 0, s => \"\"\\)"
+
+gdb_test "ptype a1(1)" \
+         [multi_line "type = record" \
+                     "    i: pck\\.small_type;" \
+                     "    s: access array \\((<>|1 \\.\\. i)\\) of character;" \
+                     "end record"]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/pck.adb ./gdb/testsuite/gdb.ada/watch_arg/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/watch_arg/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/pck.ads ./gdb/testsuite/gdb.ada/watch_arg/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/watch_arg/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/watch.adb ./gdb/testsuite/gdb.ada/watch_arg/watch.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg/watch.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/watch_arg/watch.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2006-2015 Free Software Foundation, Inc.
+--  Copyright 2006-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg.exp ./gdb/testsuite/gdb.ada/watch_arg.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/watch_arg.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/watch_arg.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ runto "watch.adb:$bp_location"
 
 gdb_test "watch x" \
          ".*atchpoint \[0-9\]+: x" \
-         "Set watchpoint on function argument X"
+         "set watchpoint on function argument X"
 
 # Then insert a breakpoint at the location we'd like to continue to...
 set bp_location [gdb_get_line_number "BREAK2" ${testdir}/watch.adb]
@@ -45,6 +45,6 @@ gdb_test "break watch.adb:$bp_location" 
 
 gdb_test "cont" \
          "Breakpoint \[0-9\]+, watch \\(\\).*" \
-         "Continuing to second breakpoint"
+         "continuing to second breakpoint"
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb ./gdb/testsuite/gdb.ada/whatis_array_val/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/whatis_array_val/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2012-2015 Free Software Foundation, Inc.
+--  Copyright 2012-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/pck.adb ./gdb/testsuite/gdb.ada/whatis_array_val/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/whatis_array_val/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/pck.ads ./gdb/testsuite/gdb.ada/whatis_array_val/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/whatis_array_val/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val.exp ./gdb/testsuite/gdb.ada/whatis_array_val.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/whatis_array_val.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/whatis_array_val.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/foo.adb ./gdb/testsuite/gdb.ada/widewide/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/widewide/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/pck.adb ./gdb/testsuite/gdb.ada/widewide/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/widewide/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/pck.ads ./gdb/testsuite/gdb.ada/widewide/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/widewide/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2011-2015 Free Software Foundation, Inc.
+--  Copyright 2011-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide.exp ./gdb/testsuite/gdb.ada/widewide.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/widewide.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/widewide.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/foo.adb ./gdb/testsuite/gdb.ada/win_fu_syms/foo.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/foo.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/win_fu_syms/foo.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2013-2015 Free Software Foundation, Inc.
+--  Copyright 2013-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/pck.adb ./gdb/testsuite/gdb.ada/win_fu_syms/pck.adb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/pck.adb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/win_fu_syms/pck.adb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/pck.ads ./gdb/testsuite/gdb.ada/win_fu_syms/pck.ads
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms/pck.ads	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/win_fu_syms/pck.ads	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
---  Copyright 2007-2015 Free Software Foundation, Inc.
+--  Copyright 2007-2017 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms.exp ./gdb/testsuite/gdb.ada/win_fu_syms.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.ada/win_fu_syms.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.ada/win_fu_syms.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c ./gdb/testsuite/gdb.arch/aarch64-atomic-inst.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/aarch64-atomic-inst.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp ./gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,13 @@
 # Test single stepping through atomic sequences beginning with
 # a ldxr instruction and ending with a stxr instruction.
 
-if {![istarget "aarch64*"]} {
+if {![is_aarch64_target]} {
     verbose "Skipping ${gdb_test_file_name}."
     return
 }
 
 standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-fp.c ./gdb/testsuite/gdb.arch/aarch64-fp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-fp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/aarch64-fp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-fp.exp ./gdb/testsuite/gdb.arch/aarch64-fp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/aarch64-fp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/aarch64-fp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,13 @@
 # PR server/17457
 # Test aarch64 floating point registers q0, q1, v0, v1, fpsr, fpcr
 
-if {![istarget "aarch64*"]} {
+if {![is_aarch64_target]} {
     verbose "Skipping ${gdb_test_file_name}."
     return
 }
 
 standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/alpha-step.c ./gdb/testsuite/gdb.arch/alpha-step.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/alpha-step.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/alpha-step.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2005-2015 Free Software Foundation, Inc.
+/* Copyright 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/alpha-step.exp ./gdb/testsuite/gdb.arch/alpha-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/alpha-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/alpha-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
-    unsupported "Testcase compile failed."
+    unsupported "failed to compile"
     return -1
 }
 
@@ -38,7 +38,7 @@ proc test_stepi {function } {
     # of the previous tests, this makes sure that it doesn't affect
     # this series of tests.
     if ![runto_main] then {
-        fail "Can't run to main"
+        fail "can't run to main"
         return 0
     }
 
@@ -94,7 +94,7 @@ proc test_stepi {function } {
     
     gdb_test "x /i \$pc" \
              "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fneg.*" \
-             "Check stepi over fb$function stopped on fneg instruction"
+             "check stepi over fb$function stopped on fneg instruction"
 
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/altivec-abi.exp ./gdb/testsuite/gdb.arch/altivec-abi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/altivec-abi.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/altivec-abi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_alti
     return
 }
 
-set testfile "altivec-abi"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
 
 if [get_compiler_info] {
     warning "get_compiler failed"
@@ -42,7 +40,7 @@ proc altivec_abi_tests { extra_flags for
     set compile_flags "debug nowarnings $extra_flags"
 
     if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-	untested altivec-abi.exp
+	untested "failed to compile"
 	return -1
     }
 
@@ -64,7 +62,7 @@ proc altivec_abi_tests { extra_flags for
 
     # Run to `main' where we begin our tests.
     if ![runto_main] then {
-	untested altivec-abi.exp
+	untested "could not run to main"
 	return -1
     }
 
@@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags for
 }
 
 if [test_compiler_info gcc*] {
+    set binprefix ${binfile}
+
     with_test_prefix "default ABI, auto" {
 	altivec_abi_tests  "additional_flags=-maltivec" "auto"
     }
@@ -156,23 +156,23 @@ if [test_compiler_info gcc*] {
 	# On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec
 	# was broken, so skip those tests there.
 	if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
-	    set binfile ${objdir}/${subdir}/${testfile}-ge-ge
+	    set binfile ${binprefix}-ge-ge
 	    with_test_prefix "generic ABI, forced" {
 		altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic"
 	    }
 
-	    set binfile ${objdir}/${subdir}/${testfile}-ge-auto
+	    set binfile ${binprefix}-ge-auto
 	    with_test_prefix "generic ABI, auto" {
 		altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto"
 	    }
 	}
 
-	set binfile ${objdir}/${subdir}/${testfile}-av-av
+	set binfile ${binprefix}-av-av
 	with_test_prefix "AltiVec ABI, forced" {
 	    altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec"
 	}
 
-	set binfile ${objdir}/${subdir}/${testfile}-av-auto
+	set binfile ${binprefix}-av-auto
 	with_test_prefix "AltiVec ABI, auto" {
 	    altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/altivec-regs.exp ./gdb/testsuite/gdb.arch/altivec-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/altivec-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/altivec-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_alti
     return
 }
 
-set testfile "altivec-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
 
 set compile_flags {debug nowarnings}
 if [get_compiler_info] {
@@ -47,7 +45,7 @@ if [test_compiler_info gcc*] {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-     untested altivec-regs.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -172,12 +170,12 @@ gdb_expect_list "info vector" ".*$gdb_pr
 
 gdb_test "break vector_fun" \
  "Breakpoint 2 at.*altivec-regs.c, line \[0-9\]+\\." \
- "Set breakpoint at vector_fun"
+ "set breakpoint at vector_fun"
 
 # Actually it is nuch easier to see these results printed in hex.
 gdb_test "set output-radix 16" \
   "Output radix now set to decimal 16, hex 10, octal 20." \
-  "Set output radix to hex"
+  "set output radix to hex"
 
 gdb_test "continue" \
   "Breakpoint 2, vector_fun .a=.0xfefefefe, 0xfefefefe, 0xfefefefe, 0xfefefefe., b=.0x1010101, 0x1010101, 0x1010101, 0x1010101.*altivec-regs.c.*vec_splat_u8.2..;" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-byte.exp ./gdb/testsuite/gdb.arch/amd64-byte.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-byte.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-byte.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-disp-step.exp ./gdb/testsuite/gdb.arch/amd64-disp-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-disp-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-disp-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ standard_testfile .S
 set additional_flags "-Wa,-g"
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested amd64-disp-step.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -45,7 +45,7 @@ gdb_test "set displaced-stepping on" ""
 gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-disp-step.S ./gdb/testsuite/gdb.arch/amd64-disp-step.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-disp-step.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-disp-step.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-dword.exp ./gdb/testsuite/gdb.arch/amd64-dword.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-dword.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-dword.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.cc ./gdb/testsuite/gdb.arch/amd64-entry-value.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.exp ./gdb/testsuite/gdb.arch/amd64-entry-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
@@ -159,7 +159,7 @@ gdb_test_no_output "set print entry-valu
 gdb_test "frame" {\(inv=<optimized out>\).*} "entry_invalid: frame: default"
 
 
-# Test @entry values for DW_AT_GNU_call_site_data_value parameters.
+# Test @entry values for DW_AT_call_data_value parameters.
 
 gdb_continue_to_breakpoint "entry_reference: reference"
 
@@ -188,7 +188,7 @@ gdb_test "p regparam@entry" " = \\(int &
 gdb_test "p &regparam@entry" " = \\(int \\*\\) $addr" "entry_reference: p &regparam@entry"
 gdb_test "p regcopy" " = 1" "entry_reference: p regcopy"
 gdb_test "p nodataparam" " = \\(int &\\) @0x\[0-9a-f\]+: 22" "entry_reference: p nodataparam"
-gdb_test "p nodataparam@entry" "Cannot resolve DW_AT_GNU_call_site_data_value" "entry_reference: p nodataparam@entry"
+gdb_test "p nodataparam@entry" "Cannot resolve DW_AT_call_data_value" "entry_reference: p nodataparam@entry"
 
 
 # Test virtual tail call frames.
@@ -249,5 +249,5 @@ gdb_test "bt" "^bt\r\n#0 +d \\(i=<optimi
 	 "self: bt"
 
 gdb_test_no_output "set debug entry-values 1"
-gdb_test "bt" "DW_OP_GNU_entry_value resolving has found function \"self\\(int\\)\" at 0x\[0-9a-f\]+ can call itself via tail calls\r\n.*" \
+gdb_test "bt" "DW_OP_entry_value resolving has found function \"self\\(int\\)\" at 0x\[0-9a-f\]+ can call itself via tail calls\r\n.*" \
 	 "self: bt debug entry-values"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-inline.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.c ./gdb/testsuite/gdb.arch/amd64-entry-value-param.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.c ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2012-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+volatile int vv;
+
+static __attribute__((noinline)) int
+foo (int x, int y, int z)
+{
+  int a = x * 2;
+  int b = y * 2;
+  int c = z * 2;
+  vv++; /* break-here */
+  return x + z;
+}
+
+static __attribute__((noinline)) int
+bar (int x)
+{
+  return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x;
+}
+
+int
+main (void)
+{
+  return bar (10);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,49 @@
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile .S .c
+set opts {}
+
+if [info exists COMPILE] {
+    # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param-dwarf5.exp COMPILE=1"
+    set srcfile ${srcfile2}
+    lappend opts optimize=-O2 additional_flags=-gdwarf-5
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+    verbose "Skipping amd64-entry-value-param-dwarf5."
+    return
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+set srcfile $srcfile2
+gdb_breakpoint [gdb_get_line_number "break-here"]
+
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+gdb_test "p y" " = 2"
+gdb_test "p b" " = 4"
+
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+gdb_test "p y" " = 4"
+gdb_test "p b" " = 8"
+
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+gdb_test "p y" " = 10"
+gdb_test "p b" " = 20"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.S ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,699 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2012-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This file is compiled from gdb.arch/amd64-entry-value-param-dwarf5.c
+   using -g -dA -S -O2.  */
+
+	.file	"amd64-entry-value-param-dwarf5.c"
+	.text
+.Ltext0:
+	.p2align 4,,15
+	.type	foo.isra.0.constprop.2, @function
+foo.isra.0.constprop.2:
+.LFB4:
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:21 */
+.LM1:
+	.cfi_startproc
+.LVL0:
+/* BLOCK 2 freq:10000 seq:0 */
+/* PRED: ENTRY [100.0%]  (FALLTHRU) */
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:26 */
+.LM2:
+	movl	vv(%rip), %eax
+	addl	$1, %eax
+	movl	%eax, vv(%rip)
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:27 */
+.LM3:
+	leal	3(%rdi), %eax
+/* SUCC: EXIT [100.0%]  */
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:28 */
+.LM4:
+	ret
+	.cfi_endproc
+.LFE4:
+	.size	foo.isra.0.constprop.2, .-foo.isra.0.constprop.2
+	.p2align 4,,15
+	.type	bar.constprop.1, @function
+bar.constprop.1:
+.LFB5:
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:31 */
+.LM5:
+	.cfi_startproc
+/* BLOCK 2 freq:10000 seq:0 */
+/* PRED: ENTRY [100.0%]  (FALLTHRU) */
+.LVL1:
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:33 */
+.LM6:
+	movl	$10, %edi
+	call	foo.isra.0.constprop.2
+.LVL2:
+	movl	$10, %edi
+	movl	%eax, %edx
+	call	foo.isra.0.constprop.2
+.LVL3:
+	movl	$16, %edi
+	addl	%eax, %edx
+	call	foo.isra.0.constprop.2
+.LVL4:
+	leal	10(%rdx,%rax), %eax
+/* SUCC: EXIT [100.0%]  */
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:34 */
+.LM7:
+	ret
+	.cfi_endproc
+.LFE5:
+	.size	bar.constprop.1, .-bar.constprop.1
+	.section	.text.startup,"ax",@progbits
+	.p2align 4,,15
+	.globl	main
+	.type	main, @function
+main:
+.LFB2:
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:38 */
+.LM8:
+	.cfi_startproc
+/* BLOCK 2 freq:10000 seq:0 */
+/* PRED: ENTRY [100.0%]  (FALLTHRU) */
+/* SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL) */
+	/* gdb.arch/amd64-entry-value-param-dwarf5.c:39 */
+.LM9:
+	jmp	bar.constprop.1
+.LVL5:
+	.cfi_endproc
+.LFE2:
+	.size	main, .-main
+	.comm	vv,4,4
+	.text
+.Letext0:
+	.section	.debug_info,"",@progbits
+.Ldebug_info0:
+	.long	0x199	/* Length of Compilation Unit Info */
+	.value	0x5	/* DWARF version number */
+	.byte	0x1	/* DW_UT_compile */
+	.byte	0x8	/* Pointer Size (in bytes) */
+	.long	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
+	.uleb128 0xa	/* (DIE (0xc) DW_TAG_compile_unit) */
+	.long	.LASF2	/* DW_AT_producer: "GNU C11 7.0.1 20170218 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -O2" */
+	.byte	0x1d	/* DW_AT_language */
+	.long	.LASF0	/* DW_AT_name: "gdb.arch/amd64-entry-value-param-dwarf5.c" */
+	.long	.LASF1	/* DW_AT_comp_dir: "" */
+	.long	.LLRL0	/* DW_AT_ranges */
+	.quad	0	/* DW_AT_low_pc */
+	.long	.Ldebug_line0	/* DW_AT_stmt_list */
+	.uleb128 0xb	/* (DIE (0x2a) DW_TAG_variable) */
+	.ascii "vv\0"	/* DW_AT_name */
+	.byte	0x1	/* DW_AT_decl_file (gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x12	/* DW_AT_decl_line */
+	.long	0x45	/* DW_AT_type */
+			/* DW_AT_external */
+	.uleb128 0x9	/* DW_AT_location */
+	.byte	0x3	/* DW_OP_addr */
+	.quad	vv
+	.uleb128 0xc	/* (DIE (0x3e) DW_TAG_base_type) */
+	.byte	0x4	/* DW_AT_byte_size */
+	.byte	0x5	/* DW_AT_encoding */
+	.ascii "int\0"	/* DW_AT_name */
+	.uleb128 0xd	/* (DIE (0x45) DW_TAG_volatile_type) */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0xe	/* (DIE (0x4a) DW_TAG_subprogram) */
+			/* DW_AT_external */
+	.long	.LASF3	/* DW_AT_name: "main" */
+	.byte	0x1	/* DW_AT_decl_file (gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x25	/* DW_AT_decl_line */
+			/* DW_AT_prototyped */
+	.long	0x3e	/* DW_AT_type */
+	.quad	.LFB2	/* DW_AT_low_pc */
+	.quad	.LFE2-.LFB2	/* DW_AT_high_pc */
+	.uleb128 0x1	/* DW_AT_frame_base */
+	.byte	0x9c	/* DW_OP_call_frame_cfa */
+			/* DW_AT_call_all_calls */
+	.long	0x79	/* DW_AT_sibling */
+	.uleb128 0xf	/* (DIE (0x6b) DW_TAG_call_site) */
+	.quad	.LVL5	/* DW_AT_call_return_pc */
+			/* DW_AT_call_tail_call */
+	.long	0x125	/* DW_AT_call_origin */
+	.byte	0	/* end of children of DIE 0x4a */
+	.uleb128 0x5	/* (DIE (0x79) DW_TAG_subprogram) */
+	.ascii "bar\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x1f	/* DW_AT_decl_line */
+			/* DW_AT_prototyped */
+	.long	0x3e	/* DW_AT_type */
+	.byte	0x1	/* DW_AT_inline */
+	.long	0x91	/* DW_AT_sibling */
+	.uleb128 0x1	/* (DIE (0x88) DW_TAG_formal_parameter) */
+	.ascii "x\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x1f	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.byte	0	/* end of children of DIE 0x79 */
+	.uleb128 0x5	/* (DIE (0x91) DW_TAG_subprogram) */
+	.ascii "foo\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x15	/* DW_AT_decl_line */
+			/* DW_AT_prototyped */
+	.long	0x3e	/* DW_AT_type */
+	.byte	0	/* DW_AT_inline */
+	.long	0xd1	/* DW_AT_sibling */
+	.uleb128 0x1	/* (DIE (0xa0) DW_TAG_formal_parameter) */
+	.ascii "x\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x15	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0x1	/* (DIE (0xa8) DW_TAG_formal_parameter) */
+	.ascii "y\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x15	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0x1	/* (DIE (0xb0) DW_TAG_formal_parameter) */
+	.ascii "z\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x15	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0x2	/* (DIE (0xb8) DW_TAG_variable) */
+	.ascii "a\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x17	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0x2	/* (DIE (0xc0) DW_TAG_variable) */
+	.ascii "b\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x18	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.uleb128 0x2	/* (DIE (0xc8) DW_TAG_variable) */
+	.ascii "c\0"	/* DW_AT_name */
+			/* DW_AT_decl_file (1, gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.byte	0x19	/* DW_AT_decl_line */
+	.long	0x3e	/* DW_AT_type */
+	.byte	0	/* end of children of DIE 0x91 */
+	.uleb128 0x10	/* (DIE (0xd1) DW_TAG_subprogram) */
+	.long	0x91	/* DW_AT_abstract_origin */
+	.quad	.LFB4	/* DW_AT_low_pc */
+	.quad	.LFE4-.LFB4	/* DW_AT_high_pc */
+	.uleb128 0x1	/* DW_AT_frame_base */
+	.byte	0x9c	/* DW_OP_call_frame_cfa */
+			/* DW_AT_call_all_calls */
+	.long	0x125	/* DW_AT_sibling */
+	.uleb128 0x6	/* (DIE (0xec) DW_TAG_formal_parameter) */
+	.long	0xa0	/* DW_AT_abstract_origin */
+	.uleb128 0x1	/* DW_AT_location */
+	.byte	0x55	/* DW_OP_reg5 */
+	.uleb128 0x6	/* (DIE (0xf3) DW_TAG_formal_parameter) */
+	.long	0xa8	/* DW_AT_abstract_origin */
+	.uleb128 0x6	/* DW_AT_location */
+	.byte	0xfa	/* DW_OP_GNU_parameter_ref */
+	.long	0xa8
+	.byte	0x9f	/* DW_OP_stack_value */
+	.uleb128 0x7	/* (DIE (0xff) DW_TAG_variable) */
+	.long	0xb8	/* DW_AT_abstract_origin */
+	.uleb128 0x5	/* DW_AT_location */
+	.byte	0x75	/* DW_OP_breg5 */
+	.sleb128 0
+	.byte	0x31	/* DW_OP_lit1 */
+	.byte	0x24	/* DW_OP_shl */
+	.byte	0x9f	/* DW_OP_stack_value */
+	.uleb128 0x7	/* (DIE (0x10a) DW_TAG_variable) */
+	.long	0xc0	/* DW_AT_abstract_origin */
+	.uleb128 0x8	/* DW_AT_location */
+	.byte	0xfa	/* DW_OP_GNU_parameter_ref */
+	.long	0xa8
+	.byte	0x31	/* DW_OP_lit1 */
+	.byte	0x24	/* DW_OP_shl */
+	.byte	0x9f	/* DW_OP_stack_value */
+	.uleb128 0x11	/* (DIE (0x118) DW_TAG_variable) */
+	.long	0xc8	/* DW_AT_abstract_origin */
+	.byte	0x6	/* DW_AT_const_value */
+	.uleb128 0x8	/* (DIE (0x11e) DW_TAG_formal_parameter) */
+	.long	0xb0	/* DW_AT_abstract_origin */
+	.byte	0x3	/* DW_AT_const_value */
+	.byte	0	/* end of children of DIE 0xd1 */
+	.uleb128 0x12	/* (DIE (0x125) DW_TAG_subprogram) */
+	.long	0x79	/* DW_AT_abstract_origin */
+	.quad	.LFB5	/* DW_AT_low_pc */
+	.quad	.LFE5-.LFB5	/* DW_AT_high_pc */
+	.uleb128 0x1	/* DW_AT_frame_base */
+	.byte	0x9c	/* DW_OP_call_frame_cfa */
+			/* DW_AT_call_all_calls */
+	.uleb128 0x8	/* (DIE (0x13c) DW_TAG_formal_parameter) */
+	.long	0x88	/* DW_AT_abstract_origin */
+	.byte	0xa	/* DW_AT_const_value */
+	.uleb128 0x9	/* (DIE (0x142) DW_TAG_call_site) */
+	.quad	.LVL2	/* DW_AT_call_return_pc */
+	.long	0xd1	/* DW_AT_call_origin */
+	.long	0x161	/* DW_AT_sibling */
+	.uleb128 0x3	/* (DIE (0x153) DW_TAG_call_site_parameter) */
+	.uleb128 0x1	/* DW_AT_location */
+	.byte	0x55	/* DW_OP_reg5 */
+	.uleb128 0x2	/* DW_AT_call_value */
+	.byte	0x75	/* DW_OP_breg5 */
+	.sleb128 0
+	.uleb128 0x4	/* (DIE (0x159) DW_TAG_call_site_parameter) */
+	.long	0xa8	/* DW_AT_call_parameter */
+	.uleb128 0x1	/* DW_AT_call_value */
+	.byte	0x32	/* DW_OP_lit2 */
+	.byte	0	/* end of children of DIE 0x142 */
+	.uleb128 0x9	/* (DIE (0x161) DW_TAG_call_site) */
+	.quad	.LVL3	/* DW_AT_call_return_pc */
+	.long	0xd1	/* DW_AT_call_origin */
+	.long	0x180	/* DW_AT_sibling */
+	.uleb128 0x3	/* (DIE (0x172) DW_TAG_call_site_parameter) */
+	.uleb128 0x1	/* DW_AT_location */
+	.byte	0x55	/* DW_OP_reg5 */
+	.uleb128 0x2	/* DW_AT_call_value */
+	.byte	0x75	/* DW_OP_breg5 */
+	.sleb128 0
+	.uleb128 0x4	/* (DIE (0x178) DW_TAG_call_site_parameter) */
+	.long	0xa8	/* DW_AT_call_parameter */
+	.uleb128 0x1	/* DW_AT_call_value */
+	.byte	0x34	/* DW_OP_lit4 */
+	.byte	0	/* end of children of DIE 0x161 */
+	.uleb128 0x13	/* (DIE (0x180) DW_TAG_call_site) */
+	.quad	.LVL4	/* DW_AT_call_return_pc */
+	.long	0xd1	/* DW_AT_call_origin */
+	.uleb128 0x3	/* (DIE (0x18d) DW_TAG_call_site_parameter) */
+	.uleb128 0x1	/* DW_AT_location */
+	.byte	0x55	/* DW_OP_reg5 */
+	.uleb128 0x2	/* DW_AT_call_value */
+	.byte	0x75	/* DW_OP_breg5 */
+	.sleb128 0
+	.uleb128 0x4	/* (DIE (0x193) DW_TAG_call_site_parameter) */
+	.long	0xa8	/* DW_AT_call_parameter */
+	.uleb128 0x1	/* DW_AT_call_value */
+	.byte	0x3a	/* DW_OP_lit10 */
+	.byte	0	/* end of children of DIE 0x180 */
+	.byte	0	/* end of children of DIE 0x125 */
+	.byte	0	/* end of children of DIE 0xc */
+	.section	.debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+	.uleb128 0x1	/* (abbrev code) */
+	.uleb128 0x5	/* (TAG: DW_TAG_formal_parameter) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x8	/* (DW_FORM_string) */
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
+	.uleb128 0x21	/* (DW_FORM_implicit_const) */
+	.sleb128 1	/* (gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0x2	/* (abbrev code) */
+	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x8	/* (DW_FORM_string) */
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
+	.uleb128 0x21	/* (DW_FORM_implicit_const) */
+	.sleb128 1	/* (gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0x3	/* (abbrev code) */
+	.uleb128 0x49	/* (TAG: DW_TAG_call_site_parameter) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x2	/* (DW_AT_location) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.uleb128 0x7e	/* (DW_AT_call_value) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.byte	0
+	.byte	0
+	.uleb128 0x4	/* (abbrev code) */
+	.uleb128 0x49	/* (TAG: DW_TAG_call_site_parameter) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x80	/* (DW_AT_call_parameter) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x7e	/* (DW_AT_call_value) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.byte	0
+	.byte	0
+	.uleb128 0x5	/* (abbrev code) */
+	.uleb128 0x2e	/* (TAG: DW_TAG_subprogram) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x8	/* (DW_FORM_string) */
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
+	.uleb128 0x21	/* (DW_FORM_implicit_const) */
+	.sleb128 1	/* (gdb.arch/amd64-entry-value-param-dwarf5.c) */
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x27	/* (DW_AT_prototyped) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x20	/* (DW_AT_inline) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x1	/* (DW_AT_sibling) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0x6	/* (abbrev code) */
+	.uleb128 0x5	/* (TAG: DW_TAG_formal_parameter) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x2	/* (DW_AT_location) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.byte	0
+	.byte	0
+	.uleb128 0x7	/* (abbrev code) */
+	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x2	/* (DW_AT_location) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.byte	0
+	.byte	0
+	.uleb128 0x8	/* (abbrev code) */
+	.uleb128 0x5	/* (TAG: DW_TAG_formal_parameter) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x1c	/* (DW_AT_const_value) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.byte	0
+	.byte	0
+	.uleb128 0x9	/* (abbrev code) */
+	.uleb128 0x48	/* (TAG: DW_TAG_call_site) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x7d	/* (DW_AT_call_return_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x7f	/* (DW_AT_call_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x1	/* (DW_AT_sibling) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0xa	/* (abbrev code) */
+	.uleb128 0x11	/* (TAG: DW_TAG_compile_unit) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x25	/* (DW_AT_producer) */
+	.uleb128 0xe	/* (DW_FORM_strp) */
+	.uleb128 0x13	/* (DW_AT_language) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x1f	/* (DW_FORM_line_strp) */
+	.uleb128 0x1b	/* (DW_AT_comp_dir) */
+	.uleb128 0x1f	/* (DW_FORM_line_strp) */
+	.uleb128 0x55	/* (DW_AT_ranges) */
+	.uleb128 0x17	/* (DW_FORM_sec_offset) */
+	.uleb128 0x11	/* (DW_AT_low_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x10	/* (DW_AT_stmt_list) */
+	.uleb128 0x17	/* (DW_FORM_sec_offset) */
+	.byte	0
+	.byte	0
+	.uleb128 0xb	/* (abbrev code) */
+	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x8	/* (DW_FORM_string) */
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x3f	/* (DW_AT_external) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x2	/* (DW_AT_location) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.byte	0
+	.byte	0
+	.uleb128 0xc	/* (abbrev code) */
+	.uleb128 0x24	/* (TAG: DW_TAG_base_type) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0xb	/* (DW_AT_byte_size) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x3e	/* (DW_AT_encoding) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0x8	/* (DW_FORM_string) */
+	.byte	0
+	.byte	0
+	.uleb128 0xd	/* (abbrev code) */
+	.uleb128 0x35	/* (TAG: DW_TAG_volatile_type) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0xe	/* (abbrev code) */
+	.uleb128 0x2e	/* (TAG: DW_TAG_subprogram) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x3f	/* (DW_AT_external) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x3	/* (DW_AT_name) */
+	.uleb128 0xe	/* (DW_FORM_strp) */
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.uleb128 0x27	/* (DW_AT_prototyped) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x49	/* (DW_AT_type) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x11	/* (DW_AT_low_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x12	/* (DW_AT_high_pc) */
+	.uleb128 0x7	/* (DW_FORM_data8) */
+	.uleb128 0x40	/* (DW_AT_frame_base) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.uleb128 0x7a	/* (DW_AT_call_all_calls) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x1	/* (DW_AT_sibling) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0xf	/* (abbrev code) */
+	.uleb128 0x48	/* (TAG: DW_TAG_call_site) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x7d	/* (DW_AT_call_return_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x82	/* (DW_AT_call_tail_call) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x7f	/* (DW_AT_call_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0x10	/* (abbrev code) */
+	.uleb128 0x2e	/* (TAG: DW_TAG_subprogram) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x11	/* (DW_AT_low_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x12	/* (DW_AT_high_pc) */
+	.uleb128 0x7	/* (DW_FORM_data8) */
+	.uleb128 0x40	/* (DW_AT_frame_base) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.uleb128 0x7a	/* (DW_AT_call_all_calls) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.uleb128 0x1	/* (DW_AT_sibling) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.uleb128 0x11	/* (abbrev code) */
+	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
+	.byte	0	/* DW_children_no */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x1c	/* (DW_AT_const_value) */
+	.uleb128 0xb	/* (DW_FORM_data1) */
+	.byte	0
+	.byte	0
+	.uleb128 0x12	/* (abbrev code) */
+	.uleb128 0x2e	/* (TAG: DW_TAG_subprogram) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x31	/* (DW_AT_abstract_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.uleb128 0x11	/* (DW_AT_low_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x12	/* (DW_AT_high_pc) */
+	.uleb128 0x7	/* (DW_FORM_data8) */
+	.uleb128 0x40	/* (DW_AT_frame_base) */
+	.uleb128 0x18	/* (DW_FORM_exprloc) */
+	.uleb128 0x7a	/* (DW_AT_call_all_calls) */
+	.uleb128 0x19	/* (DW_FORM_flag_present) */
+	.byte	0
+	.byte	0
+	.uleb128 0x13	/* (abbrev code) */
+	.uleb128 0x48	/* (TAG: DW_TAG_call_site) */
+	.byte	0x1	/* DW_children_yes */
+	.uleb128 0x7d	/* (DW_AT_call_return_pc) */
+	.uleb128 0x1	/* (DW_FORM_addr) */
+	.uleb128 0x7f	/* (DW_AT_call_origin) */
+	.uleb128 0x13	/* (DW_FORM_ref4) */
+	.byte	0
+	.byte	0
+	.byte	0
+	.section	.debug_aranges,"",@progbits
+	.long	0x3c	/* Length of Address Ranges Info */
+	.value	0x2	/* DWARF Version */
+	.long	.Ldebug_info0	/* Offset of Compilation Unit Info */
+	.byte	0x8	/* Size of Address */
+	.byte	0	/* Size of Segment Descriptor */
+	.value	0	/* Pad to 16 byte boundary */
+	.value	0
+	.quad	.Ltext0	/* Address */
+	.quad	.Letext0-.Ltext0	/* Length */
+	.quad	.LFB2	/* Address */
+	.quad	.LFE2-.LFB2	/* Length */
+	.quad	0
+	.quad	0
+	.section	.debug_rnglists,"",@progbits
+.Ldebug_ranges0:
+	.long	.Ldebug_ranges3-.Ldebug_ranges2	/* Length of Range Lists */
+.Ldebug_ranges2:
+	.value	0x5	/* DWARF Version */
+	.byte	0x8	/* Address Size */
+	.byte	0	/* Segment Size */
+	.long	0	/* Offset Entry Count */
+.LLRL0:
+	.byte	0x7	/* DW_RLE_start_length (*.LLRL0) */
+	.quad	.Ltext0	/* Range begin address (*.LLRL0) */
+	.uleb128 .Letext0-.Ltext0	/* Range length (*.LLRL0) */
+	.byte	0x7	/* DW_RLE_start_length (*.LLRL0) */
+	.quad	.LFB2	/* Range begin address (*.LLRL0) */
+	.uleb128 .LFE2-.LFB2	/* Range length (*.LLRL0) */
+	.byte	0	/* DW_RLE_end_of_list (*.LLRL0) */
+.Ldebug_ranges3:
+	.section	.debug_line,"",@progbits
+.Ldebug_line0:
+	.long	.LELT0-.LSLT0	/* Length of Source Line Info */
+.LSLT0:
+	.value	0x5	/* DWARF Version */
+	.byte	0x8	/* Address Size */
+	.byte	0	/* Segment Size */
+	.long	.LELTP0-.LASLTP0	/* Prolog Length */
+.LASLTP0:
+	.byte	0x1	/* Minimum Instruction Length */
+	.byte	0x1	/* Maximum Operations Per Instruction */
+	.byte	0x1	/* Default is_stmt_start flag */
+	.byte	0xf6	/* Line Base Value (Special Opcodes) */
+	.byte	0xf2	/* Line Range Value (Special Opcodes) */
+	.byte	0xd	/* Special Opcode Base */
+	.byte	0	/* opcode: 0x1 has 0 args */
+	.byte	0x1	/* opcode: 0x2 has 1 args */
+	.byte	0x1	/* opcode: 0x3 has 1 args */
+	.byte	0x1	/* opcode: 0x4 has 1 args */
+	.byte	0x1	/* opcode: 0x5 has 1 args */
+	.byte	0	/* opcode: 0x6 has 0 args */
+	.byte	0	/* opcode: 0x7 has 0 args */
+	.byte	0	/* opcode: 0x8 has 0 args */
+	.byte	0x1	/* opcode: 0x9 has 1 args */
+	.byte	0	/* opcode: 0xa has 0 args */
+	.byte	0	/* opcode: 0xb has 0 args */
+	.byte	0x1	/* opcode: 0xc has 1 args */
+	.byte	0x1	/* Directory entry format count */
+	.uleb128 0x1	/* DW_LNCT_path */
+	.uleb128 0x1f	/* DW_FORM_line_strp */
+	.uleb128 0x2	/* Directories count */
+	.long	.LASF1	/* Directory Entry: 0: "" */
+	.long	.LASF4	/* Directory Entry: 0: "gdb.arch" */
+	.byte	0x2	/* File name entry format count */
+	.uleb128 0x1	/* DW_LNCT_path */
+	.uleb128 0x1f	/* DW_FORM_line_strp */
+	.uleb128 0x2	/* DW_LNCT_directory_index */
+	.uleb128 0xb	/* DW_FORM_data1 */
+	.uleb128 0x2	/* File names count */
+	.long	.LASF0	/* File Entry: 0: "gdb.arch/amd64-entry-value-param-dwarf5.c" */
+	.byte	0
+	.long	.LASF5	/* File Entry: 0: "amd64-entry-value-param-dwarf5.c" */
+	.byte	0x1
+.LELTP0:
+	.byte	0	/* set address *.LM8 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM8
+	.byte	0x3c	/* line 38 */
+	.byte	0	/* set address *.LM9 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM9
+	.byte	0x18	/* line 39 */
+	.byte	0	/* set address *.LFE2 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LFE2
+	.byte	0	/* end sequence */
+	.uleb128 0x1
+	.byte	0x1
+	.byte	0	/* set address *.LM1 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM1
+	.byte	0x2b	/* line 21 */
+	.byte	0	/* set address *.LM2 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM2
+	.byte	0x1c	/* line 26 */
+	.byte	0	/* set address *.LM3 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM3
+	.byte	0x18	/* line 27 */
+	.byte	0	/* set address *.LM4 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM4
+	.byte	0x18	/* line 28 */
+	.byte	0	/* set address *.LM5 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM5
+	.byte	0x1a	/* line 31 */
+	.byte	0	/* set address *.LM6 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM6
+	.byte	0x19	/* line 33 */
+	.byte	0	/* set address *.LM7 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.LM7
+	.byte	0x18	/* line 34 */
+	.byte	0	/* set address *.Letext0 */
+	.uleb128 0x9
+	.byte	0x2
+	.quad	.Letext0
+	.byte	0	/* end sequence */
+	.uleb128 0x1
+	.byte	0x1
+.LELT0:
+	.section	.debug_str,"MS",@progbits,1
+.LASF2:
+	.string	"GNU C11 7.0.1 20170218 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -O2"
+.LASF3:
+	.string	"main"
+	.section	.debug_line_str,"MS",@progbits,1
+.LASF5:
+	.string	"amd64-entry-value-param-dwarf5.c"
+.LASF0:
+	.string	"gdb.arch/amd64-entry-value-param-dwarf5.c"
+.LASF1:
+	.string	""
+.LASF4:
+	.string	"gdb.arch"
+	.ident	"GCC: (GNU) 7.0.1 20170218 (experimental)"
+	.section	.note.GNU-stack,"",@progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp ./gdb/testsuite/gdb.arch/amd64-entry-value-param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.cc ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp6
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} "c++"] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "c++"] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.S ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-paramref.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.S ./gdb/testsuite/gdb.arch/amd64-entry-value-param.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value-param.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value-param.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.s ./gdb/testsuite/gdb.arch/amd64-entry-value.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-entry-value.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-entry-value.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-gs_base.c ./gdb/testsuite/gdb.arch/amd64-gs_base.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-gs_base.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-gs_base.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* Test program for fs_base and gs_base.
+
+   Copyright 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-gs_base.exp ./gdb/testsuite/gdb.arch/amd64-gs_base.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-gs_base.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-gs_base.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,49 @@
+# Copyright 2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if { ![istarget "x86_64-*linux*"] } then {
+    verbose "Untested x86_64 fs_base and gs_base tests."
+    return
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+     [list debug nowarnings]] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+gdb_test "print /x \$fs_base" "= $hex" "print fs_base"
+gdb_test "print /x \$gs_base" "= $hex" "print gs_base"
+
+gdb_test "print \$fs_base = 2" "= 2" "set fs_base"
+gdb_test "print \$gs_base = 3" "= 3" "set gs_base"
+
+# Test the presence of fs_base and gs_base on the system
+# register group and values.
+#
+set ws "\[\t \]+"
+set info_reg_out [multi_line "info register sys" \
+          "fs_base${ws}0x2${ws}2"\
+          "gs_base${ws}0x3${ws}3"\
+          "orig_rax${ws}$hex${ws}\[-\]$decimal" ]
+
+gdb_test "info register sys" $info_reg_out\
+   "info registers fs_base and gs_base with value"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-i386-address.exp ./gdb/testsuite/gdb.arch/amd64-i386-address.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-i386-address.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-i386-address.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { (![istarget "x86_64-*-*"] && ![ista
     return
 }
 
-if [prepare_for_testing amd64-i386-address.exp amd64-i386-address amd64-i386-address.S [list debug "additional_flags=-m32 -nostdlib"]] {
+if [prepare_for_testing "failed to prepare" amd64-i386-address amd64-i386-address.S [list debug "additional_flags=-m32 -nostdlib"]] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-i386-address.S ./gdb/testsuite/gdb.arch/amd64-i386-address.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-i386-address.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-i386-address.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp6
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.S ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.c ./gdb/testsuite/gdb.arch/amd64-invalid-stack-top.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-invalid-stack-top.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp ./gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp6
     verbose "Skipping ${testfile}."
     return
 }
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.c ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.S ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-optimout-repeat.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-optimout-repeat.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp ./gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-prologue-skip.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp6
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-skip.S ./gdb/testsuite/gdb.arch/amd64-prologue-skip.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-skip.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-prologue-skip.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [info exists COMPILE] {
     return 0
 }
 
-if {[prepare_for_testing ${testfile}.exp ${binfile} $srcfile $opts]} {
+if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile $opts]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-prologue-xmm.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
       	
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-pseudo.c ./gdb/testsuite/gdb.arch/amd64-pseudo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-pseudo.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-pseudo.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for byte registers.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp ./gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S ./gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp ./gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,8 +30,7 @@ proc test_probe { probe_name } {
 
 standard_testfile amd64-stap-triplet.S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
-    untested amd64-stap-special-operands.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -39,8 +38,7 @@ test_probe "triplet"
 
 standard_testfile amd64-stap-three-arg-disp.S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
-    untested amd64-stap-special-operands.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c ./gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-triplet.c ./gdb/testsuite/gdb.arch/amd64-stap-triplet.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-triplet.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-triplet.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-triplet.S ./gdb/testsuite/gdb.arch/amd64-stap-triplet.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-triplet.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-triplet.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp ./gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@ if { ![istarget "x86_64-*-*"] || ![is_lp
 
 standard_testfile amd64-stap-wrong-subexp.S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
-    untested amd64-stap-wrong-subexp.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.S ./gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} "${srcfile} ${srcfile2}" $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} "${srcfile} ${srcfile2}" $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.c ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.S ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-noret.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-noret.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.c ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.S ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-ret.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-ret.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.c ./gdb/testsuite/gdb.arch/amd64-tailcall-self.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-self.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp ./gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-self.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp6
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.S ./gdb/testsuite/gdb.arch/amd64-tailcall-self.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-tailcall-self.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-tailcall-self.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-word.exp ./gdb/testsuite/gdb.arch/amd64-word.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/amd64-word.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/amd64-word.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-bl-branch-dest.c ./gdb/testsuite/gdb.arch/arm-bl-branch-dest.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-bl-branch-dest.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-bl-branch-dest.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp ./gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { ![istarget "arm*-*-*"] } {
+if { ![is_aarch32_target] } {
     verbose "Skipping ${gdb_test_file_name}."
     return
 }
@@ -25,7 +25,7 @@ standard_testfile
 # on ARM, causing the PC to acquire a wrong value.  That's why we use
 # the "-Wl,-Ttext-segment" option compile the binary.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     [list debug ldflags=-Wl,-Ttext-segment=0xb0000000]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disassembler-options.exp ./gdb/testsuite/gdb.arch/arm-disassembler-options.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disassembler-options.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-disassembler-options.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# This test exercises set/show disassembler-options results are preserved
+# across multiple set architecture calls.
+
+if {![istarget "arm*-*-*"]} then {
+    verbose "Skipping ARM disassembler options."
+    return
+}
+
+gdb_exit
+gdb_start
+
+set option "reg-names-gcc,force-thumb"
+set arch1 "armv2"
+set arch2 "armv5"
+
+gdb_test "set architecture $arch1" \
+	"The target architecture is assumed to be $arch1" \
+	"set architecture $arch1"
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are ''.*" \
+	"show NULL disassembler-options"
+
+gdb_test_no_output "set disassembler-options $option"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
+# Change architectures and verify the disassembler options have been preserved.
+
+gdb_test "set architecture $arch2" \
+	"The target architecture is assumed to be $arch2" \
+	"set architecture $arch2"
+
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disp-step.exp ./gdb/testsuite/gdb.arch/arm-disp-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disp-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-disp-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,19 +17,16 @@
 
 # Test arm displaced stepping.
 
-if {![istarget "arm*-*-*"]} then {
+if {![is_aarch32_target]} then {
     verbose "Skipping arm displaced stepping tests."
     return
 }
 
-set testfile "arm-disp-step"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
 
 set additional_flags "-Wa,-g"
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested arm-disp-step.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile [list debug $additional_flags]] } {
     return -1
 }
 
@@ -410,17 +407,13 @@ proc test_add_rn_pc {} {
     gdb_assert { [expr {$pc_val + 4 + 4} == $r3_val] }
 }
 
-# Get things started.
-
-clean_restart ${testfile}
-
 # Turn displaced stepping off before runto main. When displaced stepping
 # is on, and we type 'run', GDB will first try to single step on _dl_debug_state,
 # which is in library might be compiled in Thumb.
 gdb_test_no_output "set displaced-stepping off"
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disp-step.S ./gdb/testsuite/gdb.arch/arm-disp-step.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-disp-step.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-disp-step.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-neon.c ./gdb/testsuite/gdb.arch/arm-neon.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-neon.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-neon.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,102 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <arm_neon.h>
+
+#define DEF_FUNC1(N, TYPE, VALUE...)	\
+  TYPE a##N = {VALUE};			\
+  TYPE vec_func##N(TYPE a)		\
+  { return a; }
+
+/* 64-bit vector.  */
+
+DEF_FUNC1(1, int8x8_t, -1, -2, 3, 4, 5, -6, 7, 8)
+DEF_FUNC1(2, int16x4_t, 0, 2, -4, 6)
+DEF_FUNC1(3, int32x2_t, -10, 12)
+DEF_FUNC1(4, uint8x8_t, 1, 2, 3, 4, 5, 6, 7, 8)
+DEF_FUNC1(5, uint16x4_t, 4, 3, 2, 1)
+DEF_FUNC1(6, uint32x2_t, 100, 200)
+DEF_FUNC1(7, float32x2_t, 1.0, 2.0)
+DEF_FUNC1(8, poly8x8_t, 8, 10, 12, 14, 15, 16, 1, 0)
+DEF_FUNC1(9, poly16x4_t, 32, 33, 34, 35)
+
+/* 128-bit vector.  */
+
+DEF_FUNC1(10, int8x16_t, -1, -2, 3, 4, 5, -6, 7, 8, 8, 10, 12, 14, 15, 16, 1, 0);
+DEF_FUNC1(11, int16x8_t, 4, 10, -13, -16, 18, 1, 2, 4);
+DEF_FUNC1(12, int32x4_t, 32, 33, -34, 35);
+DEF_FUNC1(13, uint8x16_t, 1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 12, 14, 15, 16, 1, 0);
+DEF_FUNC1(14, uint16x8_t, 4, 10, 13, 16, 18, 1, 2, 4);
+DEF_FUNC1(15, uint32x4_t, 16, 18, 1, 2);
+DEF_FUNC1(16, float32x4_t, 2.0, 5.0, 4.0, 8.0);
+DEF_FUNC1(17, poly8x16_t, 8, 10, 12, 14, 15, 16, 1, 0, 8, 10, 12, 14, 15, 16, 1, 0);
+DEF_FUNC1(18, poly16x8_t, 8, 10, 12, 14, 15, 16, 1, 0);
+
+/* Homogeneous Short Vector Aggregate.  */
+
+struct hva1
+{
+  int8x8_t f1;
+  int8x8_t f2;
+  int8x8_t f3;
+};
+
+struct hva2
+{
+  int8x8_t f1;
+  int16x4_t f2;
+  int32x2_t f3;
+};
+
+struct hva3
+{
+  int8x8_t f1;
+  int8x8_t f2;
+  int8x8_t f3;
+  int8x8_t f4;
+  int16x4_t f5;
+  int32x2_t f6;
+};
+
+struct hva1 hva1 = {{-1, -2, 3, 4, 5, -6, 7, 8},
+		    {-1, -2, 3, 4, 5, -6, 7, 8},
+		    {-1, -2, 3, 4, 5, -6, 7, 8}};
+
+struct hva2 hva2 = {{-1, -2, 3, 4, 5, -6, 7, 8},
+		    {0, 2, -4, 6},
+		    {-10, 12}};
+
+struct hva3 hva3 = {{-1, -2, 3, 4, 5, -6, 7, 8},
+		    {-1, -2, 3, 4, 5, -6, 7, 8},
+		    {-1, -2, 3, 4, 5, -6, 7, 8},
+		    {-1, -2, 3, 4, 5, -6, 7, 8},
+		    {0, 2, -4, 6},
+		    {-10, 12}};
+
+#define DEF_FUNC2(N)			  \
+  struct hva##N hva_func##N(struct hva##N a) \
+  { return a; }
+
+DEF_FUNC2 (1)
+DEF_FUNC2 (2)
+DEF_FUNC2 (3)
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-neon.exp ./gdb/testsuite/gdb.arch/arm-neon.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-neon.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-neon.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,67 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+if {![istarget "aarch64*-*-*"] && ![istarget "arm*-*-*"]} {
+    verbose "Skipping ${gdb_test_file_name}."
+    return
+}
+
+if { [gdb_skip_float_test] } {
+    verbose "Skipping ${gdb_test_file_name}."
+    return
+}
+
+standard_testfile
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug quiet}] } {
+    unsupported "ARM NEON is not supported"
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Test passing vectors in function argument in the inferior call.
+
+for {set i 1} {$i <= 18} {incr i} {
+
+    set contents ""
+    set test "print a${i}"
+    gdb_test_multiple "p a${i}" $test {
+	-re " = (.*)\r\n$gdb_prompt $" {
+	    set contents $expect_out(1,string)
+	}
+    }
+    regsub -all "\{" $contents "\\\\\{" contents
+    gdb_test "p vec_func${i} \(a${i}\)" "= $contents"
+}
+
+# Test passing homogeneous vector aggregate in function argument
+# in the inferior call.
+
+for {set i 1} {$i <= 3} {incr i} {
+    set contents ""
+    set test "print hva${i}"
+    gdb_test_multiple "p hva${i}" $test {
+	-re " = (.*)\r\n$gdb_prompt $" {
+	    set contents $expect_out(1,string)
+	}
+    }
+    regsub -all "\{" $contents "\\\\\{" contents
+    gdb_test "p hva_func${i} \(hva${i}\)" "= $contents"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.c ./gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static int *kernel_user_helper_version = (int *) 0xffff0ffc;
+
+typedef void * (kernel_user_func_t)(void);
+#define kernel_user_get_tls (*(kernel_user_func_t *) 0xffff0fe0)
+
+int
+main (void)
+{
+  int i;
+
+  for (i = 0; i < 8; i++)
+    kernel_user_get_tls ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp ./gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,97 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { ![is_aarch32_target] } {
+    verbose "Skipping ${gdb_test_file_name}."
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    [list debug]] } {
+    return -1
+}
+
+if { ![runto_main] } {
+    return -1
+}
+
+# Check kernel helpers are supported or not.
+
+set kernel_helper_supported 0
+gdb_test_multiple "p *kernel_user_helper_version" \
+    "check kernel helper version" {
+	-re " = ($decimal)\r\n$gdb_prompt $" {
+	    if { $expect_out(1,string) >= 1 } {
+		set kernel_helper_supported 1
+	    }
+	}
+    }
+
+if { !$kernel_helper_supported } {
+    unsupported "kernel doesn't have helpers"
+    return 0
+}
+
+# Get the instruction branching to kernel helper, they can be
+# blx rN or bx rN.
+set branch_to_kernel_helper 0
+set branch_insn "bl?x\[ \t\]*r${decimal}"
+set test "disassemble main"
+gdb_test_multiple $test $test {
+    -re ".*($hex) <\\+$decimal>:\[ \t\]+$branch_insn" {
+	set branch_to_kernel_helper $expect_out(1,string)
+	exp_continue
+    }
+    -re ".*$gdb_prompt $" {
+    }
+}
+
+if { ![gdb_assert $branch_to_kernel_helper \
+	   "find instruction branch to kernel helper"] } {
+    return
+}
+
+with_test_prefix "single-step" {
+    gdb_breakpoint "*${branch_to_kernel_helper}"
+    gdb_continue_to_breakpoint "branch to kernel helper"
+    gdb_test "si"
+
+    set test "bt"
+    gdb_test_multiple $test $test {
+	-re "#0  \[^\\r\\n\]*main .*\r\n$gdb_prompt $" {
+	    # Test that the program still stops in main rather than
+	    # somewhere else.
+	    pass $test
+	}
+	-re "#0  0xffff0fe0 .*\r\n$gdb_prompt $" {
+	    # AArch64 linux kernel can do hardware single step, so
+	    # the program can stop at kernel helper.
+	    pass $test
+	}
+
+    }
+
+    delete_breakpoints
+}
+
+with_test_prefix "cond-breakpoint" {
+    gdb_breakpoint "*${branch_to_kernel_helper} if i > 5"
+    gdb_continue_to_breakpoint "branch to kernel helper"
+    gdb_test "p i" " = 6"
+
+    delete_breakpoints
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/avr-flash-qualifier.c ./gdb/testsuite/gdb.arch/avr-flash-qualifier.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/avr-flash-qualifier.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/avr-flash-qualifier.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp ./gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/avr-flash-qualifier.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if {[test_compiler_info {gcc-[0-4]-[0-6]
 }
 
 standard_testfile
-if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp ./gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,83 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile insn-reloc.c
+set executable $testfile
+set expfile $testfile.exp
+
+if { ![support_displaced_stepping] } {
+    unsupported "displaced stepping"
+    return -1
+}
+
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags]
+
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
+	[list debug $additional_flags]] {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main"
+    return -1
+}
+
+# Read function name from testcases[N].
+
+proc read_testcase { n } {
+    global gdb_prompt
+
+    set result -1
+    gdb_test_multiple "print testcases\[${n}\]" "read name of test case ${n}" {
+	-re "\[$\].*= .*<(.*)>.*$gdb_prompt $" {
+	    set result $expect_out(1,string)
+	}
+	-re "$gdb_prompt $" { }
+    }
+
+    return $result
+}
+
+set n_testcases [get_integer_valueof "n_testcases" 0]
+if { ${n_testcases} == 0 } {
+    untested "no instruction relocation to test"
+    return 1
+}
+
+# Set a fast tracepoint on each set_point${i} symbol.  There is one for
+# each testcase.
+for { set i 0 } { ${i} < ${n_testcases} } { incr i } {
+    set testcase [read_testcase $i]
+
+    gdb_test "break *set_point$i" "Breakpoint .*" "breakpoint on ${testcase}"
+}
+
+gdb_test "break pass" ".*" ""
+gdb_test "break fail" ".*" ""
+
+gdb_test_no_output "set displaced-stepping on"
+
+# Make sure we have hit the pass breakpoint for each testcase.
+for { set i 0 } { ${i} < ${n_testcases} } { incr i } {
+    set testcase [read_testcase $i]
+
+    with_test_prefix "${testcase}" {
+	gdb_test "continue" ".*Breakpoint \[0-9\]+, .*" \
+	    "go to breakpoint $i"
+
+	gdb_test "continue" ".*Breakpoint \[0-9\]+, pass \(\).*" \
+	    "relocated instruction"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-abi.exp ./gdb/testsuite/gdb.arch/e500-abi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-abi.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/e500-abi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ set binfile ${objdir}/${subdir}/${testfi
 set src1 ${srcdir}/${subdir}/${testfile}.c
 
 if  { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } {
-     untested e500-abi.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-prologue.c ./gdb/testsuite/gdb.arch/e500-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/e500-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-prologue.exp ./gdb/testsuite/gdb.arch/e500-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/e500-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set testfile "e500-prologue"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
-    unsupported "Testcase compile failed."
+    unsupported "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-regs.exp ./gdb/testsuite/gdb.arch/e500-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/e500-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/e500-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ set binfile ${objdir}/${subdir}/${testfi
 set src1 ${srcdir}/${subdir}/${testfile}.c
 
 if  { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } {
-     untested e500-regs.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -160,12 +160,12 @@ if ![runto_main] then {
 
 gdb_test "break vector_fun" \
  "Breakpoint 2 at.*e500-regs.c, line \[0-9\]+\\." \
- "Set breakpoint at vector_fun"
+ "set breakpoint at vector_fun"
 
 # Actually it is nuch easier to see these results printed in hex.
 # gdb_test "set output-radix 16" \
 #   "Output radix now set to decimal 16, hex 10, octal 20." \
-#   "Set output radix to hex"
+#   "set output radix to hex"
 
 gdb_test "continue" \
   "Breakpoint 2, vector_fun .a=.-2, -2., b=.1, 1.*e500-regs.c.*ev_create_s32 .2, 2.;" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp ./gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,113 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "trace-support.exp"
+
+standard_testfile insn-reloc.c
+set executable $testfile
+set expfile $testfile.exp
+
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags]
+
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
+	[list debug $additional_flags]] {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+set libipa [get_in_proc_agent]
+set remote_libipa [gdb_load_shlib $libipa]
+
+# Can't use prepare_for_testing, because that splits compiling into
+# building objects and then linking, and we'd fail with "linker input
+# file unused because linking not done" when building the object.
+
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
+	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
+    untested "failed to compile"
+    return -1
+}
+clean_restart ${executable}
+
+if ![runto_main] {
+    fail "can't run to main for ftrace tests"
+    return 0
+}
+
+gdb_reinitialize_dir $srcdir/$subdir
+
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
+    return 1
+}
+
+# Read function name from testcases[N].
+
+proc read_testcase { n } {
+    global gdb_prompt
+
+    set result -1
+    gdb_test_multiple "print testcases\[${n}\]" "read name of test case ${n}" {
+	-re "\[$\].*= .*<(.*)>.*$gdb_prompt $" {
+	    set result $expect_out(1,string)
+	}
+	-re "$gdb_prompt $" { }
+    }
+
+    return $result
+}
+
+set n_testcases [gdb_readexpr "n_testcases"]
+
+if { ${n_testcases} == 0 } {
+    untested "no instruction relocation to test"
+    return 1
+}
+
+# Set a fast tracepoint on each set_point${i} symbol.  There is one for
+# each testcase.
+for { set i 0 } { ${i} < ${n_testcases} } { incr i } {
+    set testcase [read_testcase $i]
+
+    gdb_test "ftrace *set_point$i" "Fast tracepoint .*" \
+	"fast tracepoint on ${testcase}"
+}
+
+gdb_test "break pass" ".*" ""
+gdb_test "break fail" ".*" ""
+
+gdb_test_no_output "tstart" "start trace experiment"
+
+# Make sure we have hit the pass breakpoint for each testcase.
+for { set i 0 } { ${i} < ${n_testcases} } { incr i } {
+    set testcase [read_testcase $i]
+
+    gdb_test "continue" \
+	".*Breakpoint \[0-9\]+, pass \(\).*" \
+	"relocated instruction at ${testcase}"
+}
+
+gdb_test "tstatus" ".*Collected ${n_testcases} trace frames.*" "check on trace status"
+
+gdb_test "tstop" "" ""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1291.exp ./gdb/testsuite/gdb.arch/gdb1291.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1291.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1291.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ set testfile "gdb1291"
 set srcfile ${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
-    untested gdb1291.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1291.s ./gdb/testsuite/gdb.arch/gdb1291.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1291.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1291.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2004-2015 Free Software Foundation, Inc.
+! Copyright 2004-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1431.exp ./gdb/testsuite/gdb.arch/gdb1431.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1431.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1431.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ set testfile "gdb1431"
 set srcfile ${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
-    untested gdb1431.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1431.s ./gdb/testsuite/gdb.arch/gdb1431.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1431.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1431.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2004-2015 Free Software Foundation, Inc.
+! Copyright 2004-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1558.c ./gdb/testsuite/gdb.arch/gdb1558.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1558.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1558.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2004-2015 Free Software Foundation, Inc.
+/* Copyright 2004-2017 Free Software Foundation, Inc.
  
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1558.exp ./gdb/testsuite/gdb.arch/gdb1558.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/gdb1558.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/gdb1558.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 # Note we have to compile WITH optimization and WITHOUT debugging information to expose the bug.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-O2"}] != "" } {
-    untested gdb1558.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -50,7 +50,7 @@ gdb_test "b sub2" "Breakpoint 3.*" "set 
 
 gdb_run_cmd
 
-set test "Hits breakpoint at main after function called from main"
+set test "hits breakpoint at main after function called from main"
 gdb_test_multiple "" $test {
     -re "Breakpoint 1.*main .*$gdb_prompt $" {
 	pass $test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx512.c ./gdb/testsuite/gdb.arch/i386-avx512.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx512.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-avx512.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for AVX 512 registers.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx512.exp ./gdb/testsuite/gdb.arch/i386-avx512.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx512.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-avx512.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ standard_testfile
 
 set comp_flags "-mavx512f -I${srcdir}/../nat"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      [list debug nowarnings additional_flags=${comp_flags}]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx.c ./gdb/testsuite/gdb.arch/i386-avx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-avx.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for AVX registers.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx.exp ./gdb/testsuite/gdb.arch/i386-avx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-avx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-avx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-biarch-core.exp ./gdb/testsuite/gdb.arch/i386-biarch-core.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-biarch-core.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-biarch-core.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,13 +23,24 @@
 
 standard_testfile
 
-if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
-    verbose "Skipping i386-biarch-core test."
-    return
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+set test "complete set gnutarget"
+gdb_test_multiple "complete set gnutarget " $test {
+    -re "set gnutarget elf64-little\r\n(.*\r\n)?$gdb_prompt $" {
+	pass $test
+    }
+    -re "\r\n$gdb_prompt $" {
+	pass $test
+	untested ".text is readable"
+	return
+    }
 }
 
 set corebz2file ${srcdir}/${subdir}/${testfile}.core.bz2
-set corefile ${objdir}/${subdir}/${testfile}.core
+set corefile [standard_output_file ${testfile}.core]
 # Entry point of the original executable.
 set address 0x400078
 
@@ -43,16 +54,45 @@ if {$corestat(size) != 102400} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+# First check if this particular GDB supports i386, otherwise we should not
+# expect the i386 core file to be loaded successfully.
+set supports_arch_i386 1
+set test "complete set architecture i386"
+gdb_test_multiple $test $test {
+    -re "\r\nset architecture i386\r\n(.*\r\n)?$gdb_prompt $" {
+    }
+    -re "\r\n$gdb_prompt $" {
+        set supports_arch_i386 0
+    }
+}
 
 # Wrongly built GDB complains by:
 # "..." is not a core dump: File format not recognized
 # As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it.
-# This is just a problem of the test care, real-world elf64-i386 file will have
+# This is just a problem of the test case, real-world elf64-i386 file will have
 # 32bit PRSTATUS.  One cannot prepare elf64-i386 core file from elf32-i386 by
 # objcopy as it corrupts the core file beyond all recognition.
-gdb_test "core-file ${corefile}" "\r\nwarning: Unexpected size of section `\\.reg/6901' in core file\\.\r\n.*Core was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal SIGSEGV, Segmentation fault\\.\r\n.*" "core-file"
+# The output therefore does not matter much, just we should not get GDB
+# internal error.
+#
+# If this particular GDB does not support i386, it is expected GDB will not
+# recognize the core file.  If it does anyway, it should not crash.
+set test "load core file"
+gdb_test_multiple "core-file ${corefile}" $test {
+    -re "no core file handler recognizes format.*\r\n$gdb_prompt $" {
+	if { $supports_arch_i386 } {
+	    fail $test
+	} else {
+	    pass $test
+	    untested ".text is readable (core file unrecognized)"
+	    return
+	}
+    }
+    -re "\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
 
-gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable"
+# Test if at least the core file segments memory has been loaded.
+# https://bugzilla.redhat.com/show_bug.cgi?id=457187
+gdb_test "x/bx $address" "\r\n\[ \t\]*$address:\[ \t\]*0xf4\[ \t\]*" ".text is readable"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-bp_permanent.c ./gdb/testsuite/gdb.arch/i386-bp_permanent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-bp_permanent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-bp_permanent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-bp_permanent.exp ./gdb/testsuite/gdb.arch/i386-bp_permanent.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-bp_permanent.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-bp_permanent.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ set additional_flags [gdb_target_symbol_
 # Don't use "debug", so that we don't have line information for the assembly
 # fragments.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list $additional_flags]] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -51,7 +51,7 @@ if ![runto_main] then {
 
 set function "standard"
 
-set retcode [gdb_test_multiple "disassemble $function" "Disassemble function '$function'" {
+set retcode [gdb_test_multiple "disassemble $function" "disassemble function '$function'" {
     -re "($hex) <\\+0>.*($hex) <\\+$decimal>.*int3.*($hex) <\\+$decimal>.*leave.*$gdb_prompt $" {
       set address_bp $expect_out(2,string)
       set address_after_bp $expect_out(3,string)
@@ -59,7 +59,7 @@ set retcode [gdb_test_multiple "disassem
 }]
 
 if {$retcode != 0} {
-  fail "Disassemble failed, skipping entire test."
+  fail "disassemble failed, skipping entire test."
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-byte.exp ./gdb/testsuite/gdb.arch/i386-byte.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-byte.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-byte.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp ./gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if { ![is_x86_like_target] } {
 set testfile "i386-cfi-notcurrent"
 set srcfile ${testfile}.S
 
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {nodebug}] {
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {nodebug}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.S ./gdb/testsuite/gdb.arch/i386-cfi-notcurrent.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-cfi-notcurrent.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-disp-step.exp ./gdb/testsuite/gdb.arch/i386-disp-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-disp-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-disp-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ standard_testfile .S
 set additional_flags "-Wa,-g"
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested i386-disp-step.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -43,7 +43,7 @@ gdb_test "set displaced-stepping on" ""
 gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-disp-step.S ./gdb/testsuite/gdb.arch/i386-disp-step.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-disp-step.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-disp-step.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-dr3-watch.c ./gdb/testsuite/gdb.arch/i386-dr3-watch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-dr3-watch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-dr3-watch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-dr3-watch.exp ./gdb/testsuite/gdb.arch/i386-dr3-watch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-dr3-watch.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-dr3-watch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,8 +25,7 @@ if { ![istarget "i?86-*-*"] && ![istarge
 
 standard_testfile
 
-if [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile} {debug $additional_flags}] {
-    untested "failed to compile ${testfile}"
+if [prepare_for_testing "failed to prepare" ${binfile} ${srcfile} {debug $additional_flags}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-float.exp ./gdb/testsuite/gdb.arch/i386-float.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-float.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-float.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,18 +26,30 @@ if { ![istarget "i?86-*-*"] && ![istarge
 standard_testfile .S
 
 # some targets have leading underscores on assembly symbols.
-set additional_flags [gdb_target_symbol_prefix_flags]
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
-if { [prepare_for_testing break.exp $testfile $srcfile [list debug $additional_flags]] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile [list debug $additional_flags]] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
-gdb_test "stepi" ".*fldt.*" "first stepi"
-gdb_test "info float" ".*R7: Empty   0x00000000000000000000\r\n.*"
-gdb_test "stepi" ".*ret.*" "second stepi"
-gdb_test "info float" ".*=>R7: Valid   0xbffee922191107450000 .*"
+with_test_prefix "zero" {
+    gdb_test "stepi" ".*fldt.*"
+    gdb_test "info float" "R7: Empty   0x00000000000000000000\r\n.*"
+}
+with_test_prefix "val" {
+    gdb_test "stepi" ".*fldt.*"
+    gdb_test "info float" "=>R7: Valid   0xbffee922191107450000 .*"
+}
+with_test_prefix "smallval" {
+    gdb_test "stepi" ".*fldt.*"
+    gdb_test "info float" "=>R6: Valid   0x03e5c6f8c103dc90456a \\+3.500000000000000007e-4632\r\n.*"
+}
+with_test_prefix "bigval" {
+    gdb_test "stepi" ".*ret.*"
+    gdb_test "info float" "=>R5: Valid   0x6a5cc643b78165d7d0e9 \\+7.250000000000000005e\\+3264\r\n.*"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-float.S ./gdb/testsuite/gdb.arch/i386-float.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-float.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-float.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,10 @@
 SYMBOL(main):
 	fninit
 	fldt    val
+	fldt    bigval
+	fldt    smallval
 	ret
 .data
 	val: .byte 0x00,0x00,0x45,0x07,0x11,0x19,0x22,0xe9,0xfe,0xbf
+	smallval: .byte 0xe9,0xd0,0xd7,0x65,0x81,0xb7,0x43,0xc6,0x5c,0x6a
+	bigval:   .byte 0x6a,0x45,0x90,0xdc,0x03,0xc1,0xf8,0xc6,0xe5,0x03
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S ./gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi.c ./gdb/testsuite/gdb.arch/i386-gnu-cfi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-gnu-cfi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinding of DW_CFA_GNU_negative_offset_extended test program.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp ./gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-gnu-cfi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,13 +31,13 @@ if { ![is_x86_like_target] } then {
 set testfile "i386-gnu-cfi"
 set srcfilec ${testfile}.c
 set srcfileasm ${testfile}-asm.S
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
 
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfilec} ${srcdir}/${subdir}/${srcfileasm}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested i386-gnu-cfi.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -71,13 +71,13 @@ gdb_test "up 3" \
          "gate \\(\[^()\]*\\) at .*gate.c.*" \
          "shift up to the modified frame"
 
-gdb_test_multiple "info frame" "Existence of the CFI inserted register" {
+gdb_test_multiple "info frame" "existence of the CFI inserted register" {
     -re "Stack level 3, frame at (0x\[0-9a-f\]+):.*Saved registers:.* ecx at (0x\[0-9a-f\]+),.*" {
-	pass "Existence of the CFI inserted register"
+	pass "existence of the CFI inserted register"
 	if { [string compare $expect_out(1,string) $expect_out(2,string)] } then {
-	    fail "Value of the CFI inserted register"
+	    fail "value of the CFI inserted register"
 	} else {
-	    pass "Value of the CFI inserted register"
+	    pass "value of the CFI inserted register"
 	}
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx.c ./gdb/testsuite/gdb.arch/i386-mpx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for MPX registers.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx.exp ./gdb/testsuite/gdb.arch/i386-mpx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <walfred.tedeschi@intel.com>
 #
@@ -27,9 +27,9 @@ if { ![istarget i?86-*-*] && ![istarget 
     return
 }
 
-set comp_flags "-fmpx -I${srcdir}/../nat/"
+set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      [list debug nowarnings additional_flags=${comp_flags}]] } {
     return -1
 }
@@ -71,30 +71,30 @@ gdb_breakpoint [ gdb_get_line_number "br
 gdb_continue_to_breakpoint "break here" ".*break here.*"
 
 set test_string ".*\\\{lbound = 0xa, ubound = 0x13\\\}.*"
-gdb_test "info register bnd0" ".*bnd0$test_string" "Pure bnd0 register"
+gdb_test "info register bnd0" ".*bnd0$test_string" "pure bnd0 register"
 
 set test_string ".*\\\{lbound = 0x14, ubound = 0x1d\\\}.*"
-gdb_test "info register bnd1" ".*bnd1$test_string" "Pure bnd1 register"
+gdb_test "info register bnd1" ".*bnd1$test_string" "pure bnd1 register"
 
 set test_string ".*\\\{lbound = 0x1e, ubound = 0x27\\\}.*"
-gdb_test "info register bnd2" ".*bnd2$test_string" "Pure bnd2 register"
+gdb_test "info register bnd2" ".*bnd2$test_string" "pure bnd2 register"
 
 set test_string ".*\\\{lbound = 0x28, ubound = 0x31\\\}.*"
-gdb_test "info register bnd3" ".*bnd3$test_string" "Pure bnd3 register"
+gdb_test "info register bnd3" ".*bnd3$test_string" "pure bnd3 register"
 
 # Read value from registers bndrs.
 
 set test_string ".*\\\{lbound = 0xa, ubound_raw = 0x\[f\]+ec\\\}.*"
-gdb_test "info register bnd0raw" ".*bnd0$test_string" "Pure bnd0r register"
+gdb_test "info register bnd0raw" ".*bnd0$test_string" "pure bnd0r register"
 
 set test_string ".*\\\{lbound = 0x14, ubound_raw = 0x\[f\]+e2\\\}.*"
-gdb_test "info register bnd1raw" ".*bnd1$test_string" "Pure bnd1r register"
+gdb_test "info register bnd1raw" ".*bnd1$test_string" "pure bnd1r register"
 
 set test_string ".*\\\{lbound = 0x1e, ubound_raw = 0x\[f\]+d8\\\}.*"
-gdb_test "info register bnd2raw" ".*bnd2$test_string" "Pure bnd2r register"
+gdb_test "info register bnd2raw" ".*bnd2$test_string" "pure bnd2r register"
 
 set test_string ".*\\\{lbound = 0x28, ubound_raw = 0x\[f\]+ce\\\}.*"
-gdb_test "info register bnd3raw" ".*bnd3$test_string" "Pure bnd3r register"
+gdb_test "info register bnd3raw" ".*bnd3$test_string" "pure bnd3r register"
 
 # Setting fields on bnds
 set test_string ".*\\\{lbound = 0xa, ubound = 0x400\\\}.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-map.c ./gdb/testsuite/gdb.arch/i386-mpx-map.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-map.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-map.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for MPX map allocated bounds.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <walfred.tedeschi@intel.com>
 			      <mircea.gherzan@intel.com>
@@ -70,8 +70,9 @@ foo (T *p)
 #if defined  __GNUC__ && !defined __INTEL_COMPILER
   __bnd_store_ptr_bounds (x, &x);
 #endif
-
-  return;			/* after-assign */
+  /* Dummy assign.  */
+  x = x + 1;			/* after-assign */
+  return;
 }
 
 int
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-map.exp ./gdb/testsuite/gdb.arch/i386-mpx-map.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-map.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-map.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <walfred.tedeschi@intel.com>,
 #                            <mircea.gherzan@intel.com>
@@ -23,9 +23,9 @@ if { ![istarget i?86-*-*] && ![istarget 
 
 standard_testfile
 
-set comp_flags "-fmpx -I${srcdir}/../nat/"
+set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
  [list debug nowarnings additional_flags=${comp_flags}]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c ./gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,120 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   Contributed by Intel Corp. <walfred.tedeschi@intel.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "x86-cpuid.h"
+#include <stdio.h>
+
+#define OUR_SIZE    5
+
+int gx[OUR_SIZE];
+int ga[OUR_SIZE];
+int gb[OUR_SIZE];
+int gc[OUR_SIZE];
+int gd[OUR_SIZE];
+
+unsigned int
+have_mpx (void)
+{
+  unsigned int eax, ebx, ecx, edx;
+
+  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+    return 0;
+
+  if ((ecx & bit_OSXSAVE) == bit_OSXSAVE)
+    {
+      if (__get_cpuid_max (0, NULL) < 7)
+	return 0;
+
+      __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+      if ((ebx & bit_MPX) == bit_MPX)
+	return 1;
+      else
+	return 0;
+    }
+  return 0;
+}
+
+int
+bp1 (int value)
+{
+  return 1;
+}
+
+int
+bp2 (int value)
+{
+  return 1;
+}
+
+void
+upper (int * p, int * a, int * b, int * c, int * d, int len)
+{
+  int value;
+  value = *(p + len);
+  value = *(a + len);
+  value = *(b + len);
+  value = *(c + len);
+  value = *(d + len);
+}
+
+void
+lower (int * p, int * a, int * b, int * c, int * d, int len)
+{
+  int value;
+  value = *(p - len);
+  value = *(a - len);
+  value = *(b - len);
+  value = *(c - len);
+  bp2 (value);
+  value = *(d - len);
+}
+
+int
+main (void)
+{
+  if (have_mpx ())
+    {
+      int sx[OUR_SIZE];
+      int sa[OUR_SIZE];
+      int sb[OUR_SIZE];
+      int sc[OUR_SIZE];
+      int sd[OUR_SIZE];
+      int *x, *a, *b, *c, *d;
+
+      x = calloc (OUR_SIZE, sizeof (int));
+      a = calloc (OUR_SIZE, sizeof (int));
+      b = calloc (OUR_SIZE, sizeof (int));
+      c = calloc (OUR_SIZE, sizeof (int));
+      d = calloc (OUR_SIZE, sizeof (int));
+
+      upper (x, a, b, c, d, OUR_SIZE + 2);
+      upper (sx, sa, sb, sc, sd, OUR_SIZE + 2);
+      upper (gx, ga, gb, gc, gd, OUR_SIZE + 2);
+      lower (x, a, b, c, d, 1);
+      lower (sx, sa, sb, sc, sd, 1);
+      bp1 (*x);
+      lower (gx, ga, gb, gc, gd, 1);
+
+      free (x);
+      free (a);
+      free (b);
+      free (c);
+      free (d);
+    }
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp ./gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,76 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# Contributed by Intel Corp. <walfred.tedeschi@intel.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
+    verbose "Skipping x86 MPX tests."
+    return
+}
+
+standard_testfile
+
+set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+ [list debug nowarnings additional_flags=${comp_flags}]] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+gdb_test_multiple "print have_mpx ()" "have mpx" {
+    -re ".. = 1\r\n$gdb_prompt " {
+        pass "check whether processor supports MPX"
+    }
+    -re ".. = 0\r\n$gdb_prompt " {
+        verbose "processor does not support MPX; skipping MPX tests"
+        return
+    }
+}
+
+set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+                        "Upper bound violation while accessing address $hex" \
+                        "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
+
+set l_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+                        "Lower bound violation while accessing address $hex" \
+                        "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
+
+for {set i 0} {$i < 15} {incr i} {
+    set message "MPX signal segv Upper: ${i}"
+
+    if {[gdb_test "continue" "$u_fault.*" $message] != 0} {
+       break
+    }
+
+    gdb_test "where" ".*#0  $hex in upper.*"\
+             "$message: should be in upper"
+}
+
+for {set i 0} {$i < 15} {incr i} {
+    set message "MPX signal segv Lower: ${i}"
+
+    if {[gdb_test "continue" "$l_fault.*" $message] != 0} {
+       break
+    }
+
+    gdb_test "where" ".*#0  $hex in lower.*"\
+             "$message: should be in lower"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c ./gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,66 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   Contributed by Intel Corp. <walfred.tedeschi@intel.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "x86-cpuid.h"
+#include <stdio.h>
+
+#define OUR_SIZE    5
+
+unsigned int
+have_mpx (void)
+{
+  unsigned int eax, ebx, ecx, edx;
+
+  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+    return 0;
+
+  if ((ecx & bit_OSXSAVE) == bit_OSXSAVE)
+    {
+      if (__get_cpuid_max (0, NULL) < 7)
+	return 0;
+
+      __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+      if ((ebx & bit_MPX) == bit_MPX)
+	return 1;
+      else
+	return 0;
+    }
+  return 0;
+}
+
+void
+upper (int * p, int len)
+{
+  int value;
+  len++;			/* b0-size-test.  */
+  value = *(p + len);
+}
+
+int
+main (void)
+{
+  if (have_mpx ())
+    {
+      int a = 0;			/* Dummy variable for debugging purposes.  */
+      int sx[OUR_SIZE];
+      a++;				/* register-eval.  */
+      upper (sx, OUR_SIZE + 2);
+      return sx[1];
+    }
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp ./gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,140 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# Contributed by Intel Corp.  <walfred.tedeschi@intel.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Testing handle setup together with boundary violation signals.
+#
+# Some states are not allowed as reported on the manual, as noprint
+# implies nostop, but nostop might print.
+#
+# Caveat: Setting the handle to nopass, ends up in a endless loop.
+
+if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
+    verbose "Skipping x86 MPX tests."
+    return
+}
+
+standard_testfile
+
+set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+ [list debug nowarnings additional_flags=${comp_flags}]] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+gdb_test_multiple "print have_mpx ()" "have mpx" {
+    -re ".. = 1\r\n$gdb_prompt " {
+        pass "check whether processor supports MPX"
+    }
+    -re ".. = 0\r\n$gdb_prompt " {
+        verbose "processor does not support MPX; skipping MPX tests"
+        return
+    }
+}
+
+set violation [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+                          "Upper bound violation while accessing address $hex" \
+                          "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
+
+set segv_with_exit "Program received signal SIGSEGV,\
+        Segmentation fault.*$inferior_exited_re.*"
+
+
+# Test handler for segmentation fault for:
+# print pass stop
+#
+set parameters "print pass stop"
+with_test_prefix "$parameters" {
+    if ![runto_main] {
+        fail "could not run to main"
+        return -1
+    }
+
+    gdb_test "handle SIGSEGV $parameters"\
+             ".*SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault.*"\
+             "set parameters"
+
+    gdb_test "continue" ".*$violation.*" "display"
+
+    gdb_test "where" ".*#0  $hex in upper.*"\
+             "should be in upper"
+}
+
+# Test handler for segmentation fault for:
+# print pass nostop
+#
+set parameters "print pass nostop"
+with_test_prefix "$parameters" {
+    if ![runto_main] {
+        fail "could not run to main"
+        return -1
+    }
+
+    gdb_test "handle SIGSEGV $parameters"\
+             ".*SIGSEGV.*No.*Yes.*Yes.*Segmentation fault.*"\
+             "set parameters"
+
+    gdb_test "continue" ".*$segv_with_exit.*" "display"
+
+    gdb_test "where" "No stack." "no inferior"
+}
+
+# Test handler for segmentation fault for:
+# print nopass stop
+#
+set parameters "print nopass stop"
+with_test_prefix "$parameters" {
+    if ![runto_main] {
+        fail "could not run to main"
+        return -1
+    }
+
+    gdb_test "handle SIGSEGV $parameters"\
+             ".*SIGSEGV.*Yes.*Yes.*No.*Segmentation fault.*"\
+             "set parameters"
+
+    gdb_test "continue" ".*$violation.*" "display"
+
+    gdb_test "where" ".*#0  $hex in upper.*"\
+             "should be in upper"
+}
+
+# Test handler for segmentation fault for:
+# print nopass stop
+#
+set parameters "noprint pass nostop"
+with_test_prefix "$parameters" {
+    if ![runto_main] {
+        fail "could not run to main"
+        return -1
+    }
+
+    gdb_test "handle SIGSEGV $parameters"\
+             ".*SIGSEGV.*No.*No.*Yes.*Segmentation fault.*"\
+             "set parameters"
+
+    gdb_test "continue" "Continuing\..*$inferior_exited_re.*"\
+             "Display"
+
+    gdb_test "where" "No stack." "no inferior"
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-permbkpt.exp ./gdb/testsuite/gdb.arch/i386-permbkpt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-permbkpt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-permbkpt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,14 +26,14 @@ if { ![istarget "i?86-*-*"] && ![istarge
 standard_testfile .S
 
 # some targets have leading underscores on assembly symbols.
-set additional_flags [gdb_target_symbol_prefix_flags]
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested i386-permbkpt.exp
+    untested "failed to compile"
     return -1
 }
 
 clean_restart ${binfile}
 
-gdb_test "break main" "" "First permanent break"
-gdb_test "break main" "" "Second permanent break"
+gdb_test "break main" "" "first permanent break"
+gdb_test "break main" "" "second permanent break"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-permbkpt.S ./gdb/testsuite/gdb.arch/i386-permbkpt.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-permbkpt.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-permbkpt.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pkru.c ./gdb/testsuite/gdb.arch/i386-pkru.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pkru.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-pkru.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,90 @@
+/* Test program for PKEYS registers.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include "x86-cpuid.h"
+
+#ifndef NOINLINE
+#define NOINLINE __attribute__ ((noinline))
+#endif
+
+unsigned int have_pkru (void) NOINLINE;
+
+static inline unsigned long
+rdpkru (void)
+{
+  unsigned int eax, edx;
+  unsigned int ecx = 0;
+  unsigned int pkru;
+
+  asm volatile (".byte 0x0f,0x01,0xee\n\t"
+               : "=a" (eax), "=d" (edx)
+               : "c" (ecx));
+  pkru = eax;
+  return pkru;
+}
+
+static inline void
+wrpkru (unsigned int pkru)
+{
+  unsigned int eax = pkru;
+  unsigned int ecx = 0;
+  unsigned int edx = 0;
+
+  asm volatile (".byte 0x0f,0x01,0xef\n\t"
+               : : "a" (eax), "c" (ecx), "d" (edx));
+}
+
+unsigned int NOINLINE
+have_pkru (void)
+{
+  unsigned int eax, ebx, ecx, edx;
+
+  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+    return 0;
+
+  if ((ecx & bit_OSXSAVE) == bit_OSXSAVE)
+    {
+      if (__get_cpuid_max (0, NULL) < 7)
+	return 0;
+
+      __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+      if ((ecx & bit_PKU) == bit_PKU)
+	return 1;
+    }
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  unsigned int wr_value = 0x12345678;
+  unsigned int rd_value = 0x0;
+
+  if (have_pkru ())
+    {
+      wrpkru (wr_value);
+      asm ("nop\n\t");	/* break here 1.  */
+
+      rd_value = rdpkru ();
+      asm ("nop\n\t");	/* break here 2.  */
+    }
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pkru.exp ./gdb/testsuite/gdb.arch/i386-pkru.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pkru.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-pkru.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,66 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
+    unsupported "skipping x86 PKEYS tests."
+    return
+}
+
+set comp_flags "-I${srcdir}/../nat/"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+     [list debug additional_flags=${comp_flags}]] } {
+    untested "failed to compile x86 PKEYS test.
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+set supports_pkru 0
+set test "probe PKRU support"
+gdb_test_multiple "print have_pkru()" $test {
+    -re ".. = 1\r\n$gdb_prompt $" {
+        pass $test
+        set supports_pkru 1
+    }
+}
+
+if { !$supports_pkru } {
+    unsupported "processor does not support protection key feature."
+    return
+}
+
+# Test pkru register at startup
+# set test_string "0"
+
+gdb_test "print \$pkru" "= 0" "pkru register"
+
+# Read values from pseudo registers.
+gdb_breakpoint [ gdb_get_line_number "break here 1" ]
+gdb_continue_to_breakpoint "break here 1" ".*break here 1.*"
+
+gdb_test "info register pkru" ".*pkru.*0x12345678.*" "read pkru register"
+gdb_test "print /x \$pkru = 0x44444444" "= 0x44444444" "set pkru value"
+gdb_test "info register pkru" ".*pkru.*0x44444444.*" "read value after setting value"
+
+gdb_breakpoint [ gdb_get_line_number "break here 2" ]
+gdb_continue_to_breakpoint "break here 2" ".*break here 2.*"
+
+gdb_test "print /x rd_value" "= 0x44444444" "variable after reading pkru"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-prologue.c ./gdb/testsuite/gdb.arch/i386-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinder test program.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,10 @@ void gdb1253 (void);
 void gdb1718 (void);
 void gdb1338 (void);
 void jump_at_beginning (void);
+void standard (void);
+void stack_align_ecx (void);
+void stack_align_edx (void);
+void stack_align_eax (void);
 
 int
 main (void)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-prologue.exp ./gdb/testsuite/gdb.arch/i386-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { ![is_x86_like_target] } then {
 
 set testfile "i386-prologue"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
 
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
@@ -36,7 +36,7 @@ set additional_flags [gdb_target_symbol_
 # Don't use "debug", so that we don't have line information for the assembly
 # fragments.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list $additional_flags]] != "" } {
-    untested i386-prologue.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pseudo.c ./gdb/testsuite/gdb.arch/i386-pseudo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-pseudo.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-pseudo.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for byte registers.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-signal.c ./gdb/testsuite/gdb.arch/i386-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-signal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-signal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinder test program for signal frames.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-signal.exp ./gdb/testsuite/gdb.arch/i386-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-signal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-signal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This file is part of the GDB testsuite.
 
@@ -24,7 +24,7 @@ standard_testfile
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	  executable { debug }] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -35,6 +35,6 @@ gdb_load ${binfile}
 
 runto func
 gdb_test "backtrace 10" \
-    "#0  ($hex in )?func.*\r\n#1  <signal handler called>\r\n#2  ($hex in)?main.*"
+    "#0  ($hex in )?func.*\r\n#1  <signal handler called>\r\n#2  ($hex in )?main.*"
 
 gdb_test "finish" "Run till exit from \#0  func.*<signal handler called>"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size.c ./gdb/testsuite/gdb.arch/i386-size.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-size.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Symbol size test program.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size.exp ./gdb/testsuite/gdb.arch/i386-size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-size.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if { ![is_x86_like_target] } then {
 
 set testfile "i386-size"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
 
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size-overlap.c ./gdb/testsuite/gdb.arch/i386-size-overlap.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size-overlap.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-size-overlap.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Overlapping symbol sizes test program.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size-overlap.exp ./gdb/testsuite/gdb.arch/i386-size-overlap.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-size-overlap.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-size-overlap.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ set additional_flags [gdb_target_symbol_
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	  executable [list debug $additional_flags]] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse.c ./gdb/testsuite/gdb.arch/i386-sse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-sse.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for SSE registers.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse.exp ./gdb/testsuite/gdb.arch/i386-sse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-sse.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.c ./gdb/testsuite/gdb.arch/i386-sse-stack-align.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-sse-stack-align.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp ./gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-sse-stack-align.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [info exists COMPILE] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
-    unsupported "cannot compile ${srcfile}"
+    unsupported "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.S ./gdb/testsuite/gdb.arch/i386-sse-stack-align.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-sse-stack-align.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-sse-stack-align.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.c ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.S ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-unwind.c ./gdb/testsuite/gdb.arch/i386-unwind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-unwind.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-unwind.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinder test program.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-unwind.exp ./gdb/testsuite/gdb.arch/i386-unwind.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-unwind.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-unwind.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ standard_testfile
 set additional_flags [gdb_target_symbol_prefix_flags]
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
-    untested i386-unwind.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-word.exp ./gdb/testsuite/gdb.arch/i386-word.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/i386-word.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/i386-word.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
-    untested ${testfile}
+    untested "failed to compile"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp ./gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ set testfile ia64-breakpoint-shadow
 set srcfile ${testfile}.S
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile test program"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.S ./gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/insn-reloc.c ./gdb/testsuite/gdb.arch/insn-reloc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/insn-reloc.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/insn-reloc.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,552 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include <stdint.h>
+
+typedef void (*testcase_ftype)(void);
+
+/* Each function checks the correctness of the instruction being
+   relocated due to a fast tracepoint.  Call function pass if it is
+   correct, otherwise call function fail.  GDB sets a breakpoints on
+   pass and fail in order to check the correctness.  */
+
+static void
+pass (void)
+{
+}
+
+static void
+fail (void)
+{
+}
+
+#if (defined __x86_64__ || defined __i386__)
+
+#ifdef SYMBOL_PREFIX
+#define SYMBOL(str)     SYMBOL_PREFIX #str
+#else
+#define SYMBOL(str)     #str
+#endif
+
+/* Make sure we can relocate a CALL instruction.  CALL instructions are
+   5 bytes long so we can always set a fast tracepoints on them.
+
+     JMP set_point0
+   f:
+     MOV $1, %[ok]
+     JMP end
+   set_point0:
+     CALL f ; tracepoint here.
+   end:
+
+   */
+
+static void
+can_relocate_call (void)
+{
+  int ok = 0;
+
+  asm ("    .global " SYMBOL (set_point0) "\n"
+       "  jmp " SYMBOL (set_point0) "\n"
+       "0:\n"
+       "  mov $1, %[ok]\n"
+       "  jmp 1f\n"
+       SYMBOL (set_point0) ":\n"
+       "  call 0b\n"
+       "1:\n"
+       : [ok] "=r" (ok));
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a JMP instruction.  We need the JMP
+   instruction to be 5 bytes long in order to set a fast tracepoint on
+   it.  To do this, we emit the opcode directly.
+
+     JMP next ; tracepoint here.
+   next:
+     MOV $1, %[ok]
+
+   */
+
+static void
+can_relocate_jump (void)
+{
+  int ok = 0;
+
+  asm ("    .global " SYMBOL (set_point1) "\n"
+       SYMBOL (set_point1) ":\n"
+       ".byte 0xe9\n"  /* jmp  */
+       ".byte 0x00\n"
+       ".byte 0x00\n"
+       ".byte 0x00\n"
+       ".byte 0x00\n"
+       "  mov $1, %[ok]\n"
+       : [ok] "=r" (ok));
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+#elif (defined __aarch64__)
+
+/* Make sure we can relocate a B instruction.
+
+     B set_point0
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point0:
+     B set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_b (void)
+{
+  int ok = 0;
+
+  asm ("  b set_point0\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point0:\n"
+       "  b 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok));
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a B.cond instruction.
+
+     MOV x0, #8
+     TST x0, #8 ; Clear the Z flag.
+     B set_point1
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point1:
+     B.NE set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_bcond_true (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #8\n"
+       "  tst x0, #8\n"
+       "  b set_point1\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point1:\n"
+       "  b.ne 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0", "cc");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a CBZ instruction.
+
+     MOV x0, #0
+     B set_point2
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point2:
+     CBZ x0, set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_cbz (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #0\n"
+       "  b set_point2\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point2:\n"
+       "  cbz x0, 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a CBNZ instruction.
+
+     MOV x0, #8
+     B set_point3
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point3:
+     CBNZ x0, set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_cbnz (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #8\n"
+       "  b set_point3\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point3:\n"
+       "  cbnz x0, 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a TBZ instruction.
+
+     MOV x0, #8
+     MVN x0, x0 ; Clear bit 3.
+     B set_point4
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point4:
+     TBZ x0, #3, set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_tbz (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #8\n"
+       "  mvn x0, x0\n"
+       "  b set_point4\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point4:\n"
+       "  tbz x0, #3, 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a TBNZ instruction.
+
+     MOV x0, #8 ; Set bit 3.
+     B set_point5
+   set_ok:
+     MOV %[ok], #1
+     B end
+   set_point5:
+     TBNZ x0, #3, set_ok ; tracepoint here.
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_tbnz (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #8\n"
+       "  b set_point5\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point5:\n"
+       "  tbnz x0, #3, 0b\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate an ADR instruction with a positive offset.
+
+   set_point6:
+     ADR x0, target ; tracepoint here.
+     BR x0 ; jump to target
+     MOV %[ok], #0
+     B end
+   target:
+     MOV %[ok], #1
+   end
+
+   */
+
+static void
+can_relocate_adr_forward (void)
+{
+  int ok = 0;
+
+  asm ("set_point6:\n"
+       "  adr x0, 0f\n"
+       "  br x0\n"
+       "  mov %[ok], #0\n"
+       "  b 1f\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate an ADR instruction with a negative offset.
+
+     B set_point7
+   target:
+     MOV %[ok], #1
+     B end
+   set_point7:
+     ADR x0, target ; tracepoint here.
+     BR x0 ; jump to target
+     MOV %[ok], #0
+   end
+
+   */
+
+static void
+can_relocate_adr_backward (void)
+{
+  int ok = 0;
+
+  asm ("b set_point7\n"
+       "0:\n"
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "set_point7:\n"
+       "  adr x0, 0b\n"
+       "  br x0\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate an ADRP instruction.
+
+   set_point8:
+     ADRP %[addr], set_point8 ; tracepoint here.
+     ADR %[pc], set_point8
+
+   ADR computes the address of the given label.  While ADRP gives us its
+   page, on a 4K boundary.  We can check ADRP executed normally by
+   making sure the result of ADR and ADRP are equivalent, except for the
+   12 lowest bits which should be cleared.
+
+   */
+
+static void
+can_relocate_adrp (void)
+{
+  uintptr_t page;
+  uintptr_t pc;
+
+  asm ("set_point8:\n"
+       "  adrp %[page], set_point8\n"
+       "  adr %[pc], set_point8\n"
+       : [page] "=r" (page), [pc] "=r" (pc));
+
+  if (page == (pc & ~0xfff))
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate an LDR instruction, where the memory to
+   read is an offset from the current PC.
+
+     B set_point9
+   data:
+     .word 0x0cabba9e
+   set_point9:
+     LDR %[result], data ; tracepoint here.
+
+   */
+
+static void
+can_relocate_ldr (void)
+{
+  uint32_t result = 0;
+
+  asm ("b set_point9\n"
+       "0:\n"
+       "  .word 0x0cabba9e\n"
+       "set_point9:\n"
+       "  ldr %w[result], 0b\n"
+       : [result] "=r" (result));
+
+  if (result == 0x0cabba9e)
+    pass ();
+  else
+    fail ();
+}
+
+/* Make sure we can relocate a B.cond instruction and condition is false.  */
+
+static void
+can_relocate_bcond_false (void)
+{
+  int ok = 0;
+
+  asm ("  mov x0, #8\n"
+       "  tst x0, #8\n" /* Clear the Z flag.  */
+       "set_point10:\n" /* Set tracepoint here.  */
+       "  b.eq 0b\n"    /* Condition is false.  */
+       "  mov %[ok], #1\n"
+       "  b 1f\n"
+       "0:\n"
+       "  mov %[ok], #0\n"
+       "1:\n"
+       : [ok] "=r" (ok)
+       :
+       : "0", "cc");
+
+  if (ok == 1)
+    pass ();
+  else
+    fail ();
+}
+
+static void
+foo (void)
+{
+}
+
+/* Make sure we can relocate a BL instruction.  */
+
+static void
+can_relocate_bl (void)
+{
+  asm ("set_point11:\n"
+       "  bl foo\n"
+       "  bl pass\n"); /* Test that LR is updated correctly.  */
+}
+
+#endif
+
+/* Functions testing relocations need to be placed here.  GDB will read
+   n_testcases to know how many fast tracepoints to place.  It will look
+   for symbols in the form of 'set_point\[0-9\]+' so each functions
+   needs one, starting at 0.  */
+
+static testcase_ftype testcases[] = {
+#if (defined __x86_64__ || defined __i386__)
+  can_relocate_call,
+  can_relocate_jump
+#elif (defined __aarch64__)
+  can_relocate_b,
+  can_relocate_bcond_true,
+  can_relocate_cbz,
+  can_relocate_cbnz,
+  can_relocate_tbz,
+  can_relocate_tbnz,
+  can_relocate_adr_forward,
+  can_relocate_adr_backward,
+  can_relocate_adrp,
+  can_relocate_ldr,
+  can_relocate_bcond_false,
+  can_relocate_bl,
+#endif
+};
+
+static size_t n_testcases = (sizeof (testcases) / sizeof (testcase_ftype));
+
+int
+main ()
+{
+  int i = 0;
+
+  for (i = 0; i < n_testcases; i++)
+    testcases[i] ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/iwmmxt-regs.c ./gdb/testsuite/gdb.arch/iwmmxt-regs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/iwmmxt-regs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/iwmmxt-regs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Register test program.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/iwmmxt-regs.exp ./gdb/testsuite/gdb.arch/iwmmxt-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/iwmmxt-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/iwmmxt-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/Makefile.in ./gdb/testsuite/gdb.arch/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = altivec-abi altivec-regs amd64-byte amd64-disp-step amd64-dword \
-	amd64-entry-value amd64-i386-address amd64-word i386-bp_permanent \
-	i386-permbkpt i386-avx i386-avx512 i386-signal i386-sse sparc-sysstep
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out *.x *.ci *.tmp gcore.test system-gcore
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks.exp ./gdb/testsuite/gdb.arch/mips16-thunks.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,14 +35,13 @@ proc set_src_and_obj { filename { suffix
     upvar srcfile srcfile
     upvar objfile objfile
     global srcdir
-    global objdir
     global subdir
 
     if ![string equal "$suffix" ""] then {
 	set suffix "-$suffix"
     }
     set srcfile ${srcdir}/${subdir}/${filename}.c
-    set objfile ${objdir}/${subdir}/${filename}${suffix}.o
+    set objfile [standard_output_file ${filename}${suffix}.o]
 }
 
 # First check if a trivial MIPS16 program can be built and debugged.  This
@@ -60,10 +59,10 @@ set options [list debug nowarnings addit
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings]
 if { [gdb_compile ${objfiles} ${binfile} executable ${options}] != "" } then {
-    unsupported "No MIPS16 support in the toolchain."
+    unsupported "no MIPS16 support in the toolchain."
     return
 }
 clean_restart ${testname}
@@ -77,21 +76,21 @@ gdb_test_multiple "" "check for MIPS16 s
 		verbose "MIPS16 support check successful."
 	    }
 	    -re "$gdb_prompt $" {
-		unsupported "No MIPS16 support in the processor."
+		unsupported "no MIPS16 support in the processor."
 		return
 	    }
 	    default {
-		unsupported "No MIPS16 support in the processor."
+		unsupported "no MIPS16 support in the processor."
 		return
 	    }
 	}
     }
     -re "$gdb_prompt $" {
-	unsupported "No MIPS16 support in the processor."
+	unsupported "no MIPS16 support in the processor."
 	return
     }
     default {
-	unsupported "No MIPS16 support in the processor."
+	unsupported "no MIPS16 support in the processor."
 	return
     }
 }
@@ -115,7 +114,7 @@ set options [list \
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings additional_flags=-fPIC]
 if { [gdb_compile ${objfiles} ${binfile} executable ${options}] == "" } then {
     clean_restart ${testname}
@@ -186,7 +185,7 @@ set options [list \
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings]
 gdb_compile ${objfiles} ${binfile} executable ${options}
 clean_restart ${testname}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-inmain.c ./gdb/testsuite/gdb.arch/mips16-thunks-inmain.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-inmain.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-inmain.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-main.c ./gdb/testsuite/gdb.arch/mips16-thunks-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sin.c ./gdb/testsuite/gdb.arch/mips16-thunks-sin.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sin.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-sin.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinfrob16.c ./gdb/testsuite/gdb.arch/mips16-thunks-sinfrob16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinfrob16.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-sinfrob16.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinfrob.c ./gdb/testsuite/gdb.arch/mips16-thunks-sinfrob.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinfrob.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-sinfrob.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinmain.c ./gdb/testsuite/gdb.arch/mips16-thunks-sinmain.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinmain.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-sinmain.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinmips16.c ./gdb/testsuite/gdb.arch/mips16-thunks-sinmips16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips16-thunks-sinmips16.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips16-thunks-sinmips16.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-fcr.c ./gdb/testsuite/gdb.arch/mips-fcr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-fcr.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips-fcr.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-fcr.exp ./gdb/testsuite/gdb.arch/mips-fcr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-fcr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips-fcr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Contributed by Imagination Technologies, written by Maciej W. Rozycki.
+
+# Test MIPS Floating Point Control Register handling.
+
+if { ![istarget "mips*-*-*"] } then {
+    verbose "Skipping MIPS Floating Point Control Register tests."
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
+    return
+}
+
+if ![runto_main] {
+    return
+}
+
+# First check if we have an FPU available in the first place.
+gdb_test_multiple "show mipsfpu" "check for MIPS floating-point coprocessor" {
+    -re "The MIPS floating-point coprocessor .*\(absent\|unknown\).*$gdb_prompt $" {
+	unsupported "no MIPS floating-point coprocessor in the processor"
+	return
+    }
+    -re "The MIPS floating-point coprocessor .*$gdb_prompt $" {
+	verbose "MIPS floating-point coprocessor check successful."
+    }
+    default {
+	fail
+	return
+    }
+}
+
+# Now check that FCRs are accessible and 32-bit wide.
+gdb_test "info registers \$fcsr" "fcsr: $hex"
+gdb_test "print sizeof \$fcsr" "\\\$$decimal = 4"
+gdb_test "info registers \$fir" "fir: $hex"
+gdb_test "print sizeof \$fir" "\\\$$decimal = 4"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp ./gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/mips-octeon-bbit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/pa-nullify.exp ./gdb/testsuite/gdb.arch/pa-nullify.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/pa-nullify.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/pa-nullify.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ set binfile ${objdir}/${subdir}/${testfi
 set gcorefile ${objdir}/${subdir}/${testfile}.gcore
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
-    unsupported "Testcase compile failed."
+    unsupported "failed to compile"
     return -1
 }
 
@@ -51,7 +51,7 @@ gdb_load ${binfile}
 # that we end up back at the caller and not at the second instruction.
 
 gdb_breakpoint foo
-gdb_test "run" "Breakpoint 1, .* in foo.*" "Breakpoint at foo"
+gdb_test "run" "Breakpoint 1, .* in foo.*" "breakpoint at foo"
 
 set test "stepi till main"
 gdb_test_multiple "stepi" "${test}" {
@@ -97,9 +97,9 @@ set foo_last "(bar - 4)"
 gdb_breakpoint "*$foo_last"
 
 gdb_test "continue" "Breakpoint \[0-9\]*,.* in foo.*"
-gdb_test "backtrace" "in foo.*in main.*" "Backtrace from last insn in foo"
+gdb_test "backtrace" "in foo.*in main.*" "backtrace from last insn in foo"
 gdb_test "stepi" "in foo.*" "stepi to nullified instruction stays in foo"
-gdb_test "backtrace" "in foo.*in main.*" "Backtrace from nullified insn"
+gdb_test "backtrace" "in foo.*in main.*" "backtrace from nullified insn"
 gdb_test "stepi" "in main.*" "stepi to main"
 
 # In the third test, we verify that backtraces from nullified instructions
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c ./gdb/testsuite/gdb.arch/powerpc-aix-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-aix-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp ./gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set testfile "powerpc-aix-prologue"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
-    unsupported "Testcase compile failed."
+    unsupported "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec2.exp ./gdb/testsuite/gdb.arch/powerpc-altivec2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,178 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "lvepxl  v3,0,r28"
+func_check "lvepxl  v19,r4,r18"
+func_check "lvepx   v27,0,r19"
+func_check "lvepx   v1,r25,r18"
+func_check "lvexbx  v31,0,r27"
+func_check "lvexbx  v28,r1,r12"
+func_check "lvexhx  v31,0,r14"
+func_check "lvexhx  v17,r16,r31"
+func_check "lvexwx  v22,0,r29"
+func_check "lvexwx  v23,r25,r5"
+func_check "lvsm    v3,0,r12"
+func_check "lvsm    v27,r29,r1"
+func_check "lvswxl  v7,0,r6"
+func_check "lvswxl  v7,r16,r8"
+func_check "lvswx   v14,0,r18"
+func_check "lvswx   v28,r28,r16"
+func_check "lvtlxl  v27,0,r12"
+func_check "lvtlxl  v27,r28,r0"
+func_check "lvtlx   v23,0,r25"
+func_check "lvtlx   v1,r25,r14"
+func_check "lvtrxl  v20,0,r24"
+func_check "lvtrxl  v22,r29,r24"
+func_check "lvtrx   v24,0,r8"
+func_check "lvtrx   v13,r23,r28"
+func_check "mvidsplt v12,r28,r12"
+func_check "mviwsplt v10,r27,r0"
+func_check "stvepxl v27,0,r13"
+func_check "stvepxl v2,r2,r31"
+func_check "stvepx  v3,0,r10"
+func_check "stvepx  v27,r28,r0"
+func_check "stvexbx v13,0,r6"
+func_check "stvexbx v13,r25,r3"
+func_check "stvexhx v22,0,r1"
+func_check "stvexhx v17,r14,r10"
+func_check "stvexwx v21,0,r27"
+func_check "stvexwx v31,r18,r1"
+func_check "stvflxl v26,0,r13"
+func_check "stvflxl v22,r13,r21"
+func_check "stvflx  v5,0,r9"
+func_check "stvflx  v21,r24,r1"
+func_check "stvfrxl v13,0,r10"
+func_check "stvfrxl v13,r17,r25"
+func_check "stvfrx  v17,0,r10"
+func_check "stvfrx  v8,r12,r31"
+func_check "stvswxl v18,0,r29"
+func_check "stvswxl v26,r14,r8"
+func_check "stvswx  v0,0,r15"
+func_check "stvswx  v13,r23,r7"
+func_check "vabsdub v6,v17,v16"
+func_check "vabsduh v21,v18,v4"
+func_check "vabsduw v25,v20,v9"
+func_check "vpermxor v6,v17,v20,v26"
+func_check "vaddeuqm v29,v26,v15,v28"
+func_check "vaddecuq v15,v8,v7,v24"
+func_check "vsubeuqm v2,v6,v21,v1"
+func_check "vsubecuq v29,v6,v0,v4"
+func_check "vmulouw v14,v9,v3"
+func_check "vmuluwm v24,v16,v18"
+func_check "vaddudm v10,v17,v17"
+func_check "vmaxud  v30,v25,v4"
+func_check "vrld    v10,v6,v28"
+func_check "vcmpequd v27,v7,v7"
+func_check "vadduqm v22,v16,v25"
+func_check "vaddcuq v1,v21,v29"
+func_check "vmulosw v20,v11,v19"
+func_check "vmaxsd  v24,v19,v1"
+func_check "vmuleuw v13,v27,v30"
+func_check "vminud  v9,v24,v17"
+func_check "vcmpgtud v10,v18,v28"
+func_check "vmulesw v0,v29,v22"
+func_check "vminsd  v13,v28,v1"
+func_check "vsrad   v10,v20,v5"
+func_check "vcmpgtsd v27,v21,v5"
+func_check "bcdadd. v0,v23,v30,1"
+func_check "vpmsumb v25,v24,v26"
+func_check "bcdsub. v8,v4,v4,1"
+func_check "vpmsumh v16,v14,v26"
+func_check "vpkudum v27,v2,v26"
+func_check "vpmsumw v6,v23,v17"
+func_check "vpmsumd v20,v6,v25"
+func_check "vpkudus v27,v22,v16"
+func_check "vsubudm v21,v20,v18"
+func_check "vsubuqm v21,v20,v18"
+func_check "vcipher v29,v29,v6"
+func_check "vcipherlast v2,v13,v20"
+func_check "vgbbd   v20,v18"
+func_check "vsubcuq v19,v8,v25"
+func_check "vorc    v9,v26,v29"
+func_check "vncipher v20,v20,v13"
+func_check "vncipherlast v15,v5,v27"
+func_check "vbpermq v3,v19,v6"
+func_check "vpksdus v30,v4,v28"
+func_check "vnand   v0,v4,v14"
+func_check "vsld    v17,v8,v29"
+func_check "vsbox   v29,v20"
+func_check "vpksdss v11,v7,v11"
+func_check "vcmpequd. v3,v19,v16"
+func_check "vupkhsw v18,v17"
+func_check "vshasigmaw v29,v8,0,13"
+func_check "veqv    v23,v28,v26"
+func_check "vmrgew  v29,v0,v2"
+func_check "vmrgow  v29,v0,v2"
+func_check "vshasigmad v27,v19,0,0"
+func_check "vsrd    v20,v28,v28"
+func_check "vupklsw v18,v21"
+func_check "vclzb   v30,v7"
+func_check "vpopcntb v29,v21"
+func_check "vclzh   v25,v21"
+func_check "vpopcnth v16,v30"
+func_check "vclzw   v28,v3"
+func_check "vpopcntw v10,v9"
+func_check "vclzd   v22,v9"
+func_check "vpopcntd v15,v30"
+func_check "vcmpgtud. v2,v31,v6"
+func_check "vcmpgtsd. v20,v15,v2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec2.s ./gdb/testsuite/gdb.arch/powerpc-altivec2.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec2.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec2.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,135 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7c60e20e    /* lvepxl  v3,0,r28           */
+	.long  0x7e64920e    /* lvepxl  v19,r4,r18         */
+	.long  0x7f609a4e    /* lvepx   v27,0,r19          */
+	.long  0x7c39924e    /* lvepx   v1,r25,r18         */
+	.long  0x7fe0da0a    /* lvexbx  v31,0,r27          */
+	.long  0x7f81620a    /* lvexbx  v28,r1,r12         */
+	.long  0x7fe0724a    /* lvexhx  v31,0,r14          */
+	.long  0x7e30fa4a    /* lvexhx  v17,r16,r31        */
+	.long  0x7ec0ea8a    /* lvexwx  v22,0,r29          */
+	.long  0x7ef92a8a    /* lvexwx  v23,r25,r5         */
+	.long  0x7c60660a    /* lvsm    v3,0,r12           */
+	.long  0x7f7d0e0a    /* lvsm    v27,r29,r1         */
+	.long  0x7ce036ca    /* lvswxl  v7,0,r6            */
+	.long  0x7cf046ca    /* lvswxl  v7,r16,r8          */
+	.long  0x7dc094ca    /* lvswx   v14,0,r18          */
+	.long  0x7f9c84ca    /* lvswx   v28,r28,r16        */
+	.long  0x7f60668a    /* lvtlxl  v27,0,r12          */
+	.long  0x7f7c068a    /* lvtlxl  v27,r28,r0         */
+	.long  0x7ee0cc8a    /* lvtlx   v23,0,r25          */
+	.long  0x7c39748a    /* lvtlx   v1,r25,r14         */
+	.long  0x7e80c64a    /* lvtrxl  v20,0,r24          */
+	.long  0x7eddc64a    /* lvtrxl  v22,r29,r24        */
+	.long  0x7f00444a    /* lvtrx   v24,0,r8           */
+	.long  0x7db7e44a    /* lvtrx   v13,r23,r28        */
+	.long  0x7d9c60dc    /* mvidsplt v12,r28,r12       */
+	.long  0x7d5b005c    /* mviwsplt v10,r27,r0        */
+	.long  0x7f606e0e    /* stvepxl v27,0,r13          */
+	.long  0x7c42fe0e    /* stvepxl v2,r2,r31          */
+	.long  0x7c60564e    /* stvepx  v3,0,r10           */
+	.long  0x7f7c064e    /* stvepx  v27,r28,r0         */
+	.long  0x7da0330a    /* stvexbx v13,0,r6           */
+	.long  0x7db91b0a    /* stvexbx v13,r25,r3         */
+	.long  0x7ec00b4a    /* stvexhx v22,0,r1           */
+	.long  0x7e2e534a    /* stvexhx v17,r14,r10        */
+	.long  0x7ea0db8a    /* stvexwx v21,0,r27          */
+	.long  0x7ff20b8a    /* stvexwx v31,r18,r1         */
+	.long  0x7f406f8a    /* stvflxl v26,0,r13          */
+	.long  0x7ecdaf8a    /* stvflxl v22,r13,r21        */
+	.long  0x7ca04d8a    /* stvflx  v5,0,r9            */
+	.long  0x7eb80d8a    /* stvflx  v21,r24,r1         */
+	.long  0x7da0574a    /* stvfrxl v13,0,r10          */
+	.long  0x7db1cf4a    /* stvfrxl v13,r17,r25        */
+	.long  0x7e20554a    /* stvfrx  v17,0,r10          */
+	.long  0x7d0cfd4a    /* stvfrx  v8,r12,r31         */
+	.long  0x7e40efca    /* stvswxl v18,0,r29          */
+	.long  0x7f4e47ca    /* stvswxl v26,r14,r8         */
+	.long  0x7c007dca    /* stvswx  v0,0,r15           */
+	.long  0x7db73dca    /* stvswx  v13,r23,r7         */
+	.long  0x10d18403    /* vabsdub v6,v17,v16         */
+	.long  0x12b22443    /* vabsduh v21,v18,v4         */
+	.long  0x13344c83    /* vabsduw v25,v20,v9         */
+	.long  0x10d1a6ad    /* vpermxor v6,v17,v20,v26    */
+	.long  0x13ba7f3c    /* vaddeuqm v29,v26,v15,v28   */
+	.long  0x11e83e3d    /* vaddecuq v15,v8,v7,v24     */
+	.long  0x1046a87e    /* vsubeuqm v2,v6,v21,v1      */
+	.long  0x13a6013f    /* vsubecuq v29,v6,v0,v4      */
+	.long  0x11c91888    /* vmulouw v14,v9,v3          */
+	.long  0x13109089    /* vmuluwm v24,v16,v18        */
+	.long  0x115188c0    /* vaddudm v10,v17,v17        */
+	.long  0x13d920c2    /* vmaxud  v30,v25,v4         */
+	.long  0x1146e0c4    /* vrld    v10,v6,v28         */
+	.long  0x136738c7    /* vcmpequd v27,v7,v7         */
+	.long  0x12d0c900    /* vadduqm v22,v16,v25        */
+	.long  0x1035e940    /* vaddcuq v1,v21,v29         */
+	.long  0x128b9988    /* vmulosw v20,v11,v19        */
+	.long  0x131309c2    /* vmaxsd  v24,v19,v1         */
+	.long  0x11bbf288    /* vmuleuw v13,v27,v30        */
+	.long  0x11388ac2    /* vminud  v9,v24,v17         */
+	.long  0x1152e2c7    /* vcmpgtud v10,v18,v28       */
+	.long  0x101db388    /* vmulesw v0,v29,v22         */
+	.long  0x11bc0bc2    /* vminsd  v13,v28,v1         */
+	.long  0x11542bc4    /* vsrad   v10,v20,v5         */
+	.long  0x13752bc7    /* vcmpgtsd v27,v21,v5        */
+	.long  0x1017f601    /* bcdadd. v0,v23,v30,1       */
+	.long  0x1338d408    /* vpmsumb v25,v24,v26        */
+	.long  0x11042641    /* bcdsub. v8,v4,v4,1         */
+	.long  0x120ed448    /* vpmsumh v16,v14,v26        */
+	.long  0x1362d44e    /* vpkudum v27,v2,v26         */
+	.long  0x10d78c88    /* vpmsumw v6,v23,v17         */
+	.long  0x1286ccc8    /* vpmsumd v20,v6,v25         */
+	.long  0x137684ce    /* vpkudus v27,v22,v16        */
+	.long  0x12b494c0    /* vsubudm v21,v20,v18        */
+	.long  0x12b49500    /* vsubuqm v21,v20,v18        */
+	.long  0x13bd3508    /* vcipher v29,v29,v6         */
+	.long  0x104da509    /* vcipherlast v2,v13,v20     */
+	.long  0x1280950c    /* vgbbd   v20,v18            */
+	.long  0x1268cd40    /* vsubcuq v19,v8,v25         */
+	.long  0x113aed44    /* vorc    v9,v26,v29         */
+	.long  0x12946d48    /* vncipher v20,v20,v13       */
+	.long  0x11e5dd49    /* vncipherlast v15,v5,v27    */
+	.long  0x1073354c    /* vbpermq v3,v19,v6          */
+	.long  0x13c4e54e    /* vpksdus v30,v4,v28         */
+	.long  0x10047584    /* vnand   v0,v4,v14          */
+	.long  0x1228edc4    /* vsld    v17,v8,v29         */
+	.long  0x13b405c8    /* vsbox   v29,v20            */
+	.long  0x11675dce    /* vpksdss v11,v7,v11         */
+	.long  0x107384c7    /* vcmpequd. v3,v19,v16       */
+	.long  0x12408e4e    /* vupkhsw v18,v17            */
+	.long  0x13a86e82    /* vshasigmaw v29,v8,0,13     */
+	.long  0x12fcd684    /* veqv    v23,v28,v26        */
+	.long  0x13a0178c    /* vmrgew  v29,v0,v2          */
+	.long  0x13a0168c    /* vmrgow  v29,v0,v2          */
+	.long  0x137306c2    /* vshasigmad v27,v19,0,0     */
+	.long  0x129ce6c4    /* vsrd    v20,v28,v28        */
+	.long  0x1240aece    /* vupklsw v18,v21            */
+	.long  0x13c03f02    /* vclzb   v30,v7             */
+	.long  0x13a0af03    /* vpopcntb v29,v21           */
+	.long  0x1320af42    /* vclzh   v25,v21            */
+	.long  0x1200f743    /* vpopcnth v16,v30           */
+	.long  0x13801f82    /* vclzw   v28,v3             */
+	.long  0x11404f83    /* vpopcntw v10,v9            */
+	.long  0x12c04fc2    /* vclzd   v22,v9             */
+	.long  0x11e0f7c3    /* vpopcntd v15,v30           */
+	.long  0x105f36c7    /* vcmpgtud. v2,v31,v6        */
+	.long  0x128f17c7    /* vcmpgtsd. v20,v15,v2       */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec3.exp ./gdb/testsuite/gdb.arch/powerpc-altivec3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec3.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,131 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "vmul10cuq v11,v30"
+func_check "vcmpneb v30,v1,v23"
+func_check "vpermr  v30,v19,v30,v29"
+func_check "vmul10ecuq v20,v20,v17"
+func_check "vcmpneh v27,v19,v31"
+func_check "vrlwmi  v6,v9,v23"
+func_check "vcmpnew v22,v26,v1"
+func_check "vrldmi  v24,v30,v25"
+func_check "vcmpnezb v19,v29,v22"
+func_check "vcmpnezh v8,v23,v19"
+func_check "vrlwnm  v27,v24,v11"
+func_check "vcmpnezw v21,v13,v10"
+func_check "vrldnm  v5,v20,v29"
+func_check "vmul10uq v30,v19"
+func_check "vextractub v24,v21,12"
+func_check "vmul10euq v0,v19,v28"
+func_check "vextractuh v10,v3,12"
+func_check "vextractuw v28,v12,7"
+func_check "vextractd v30,v27,1"
+func_check "vinsertb v25,v31,4"
+func_check "bcdcpsgn. v21,v14,v30"
+func_check "vinserth v22,v18,5"
+func_check "vinsertw v29,v22,1"
+func_check "vinsertd v29,v13,7"
+func_check "vcmpneb. v22,v25,v8"
+func_check "vcmpneh. v16,v15,v21"
+func_check "bcdus.  v22,v21,v31"
+func_check "vcmpnew. v1,v12,v12"
+func_check "bcds.   v5,v3,v8,1"
+func_check "bcdtrunc. v27,v22,v1,0"
+func_check "vcmpnezb. v2,v26,v0"
+func_check "bcdutrunc. v26,v14,v7"
+func_check "vcmpnezh. v16,v5,v12"
+func_check "bcdctsq. v24,v5"
+func_check "bcdcfsq. v7,v0,0"
+func_check "bcdctz. v30,v12,1"
+func_check "bcdctn. v17,v23"
+func_check "bcdcfz. v4,v15,1"
+func_check "bcdcfn. v29,v5,1"
+func_check "bcdsetsgn. v27,v12,0"
+func_check "vcmpnezw. v14,v28,v25"
+func_check "bcdsr.  v2,v2,v6,1"
+func_check "vbpermd v25,v0,v5"
+func_check "vclzlsbb r28,v25"
+func_check "vctzlsbb r2,v24"
+func_check "vnegw   v21,v11"
+func_check "vnegd   v17,v27"
+func_check "vprtybw v31,v23"
+func_check "vprtybd v21,v23"
+func_check "vprtybq v21,v18"
+func_check "vextsb2w v30,v4"
+func_check "vextsh2w v3,v26"
+func_check "vextsb2d v11,v17"
+func_check "vextsh2d v5,v10"
+func_check "vextsw2d v13,v25"
+func_check "vctzb   v25,v2"
+func_check "vctzh   v0,v3"
+func_check "vctzw   v22,v6"
+func_check "vctzd   v26,v24"
+func_check "vextublx r6,r31,v2"
+func_check "vextuhlx r13,r0,v18"
+func_check "vextuwlx r14,r30,v31"
+func_check "vsrv    v15,v12,v14"
+func_check "vextubrx r20,r10,v30"
+func_check "vslv    v21,v21,v2"
+func_check "vextuhrx r15,r9,v1"
+func_check "vextuwrx r21,r17,v16"
+func_check "vmsumudm v20,v21,v22,v23"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec3.s ./gdb/testsuite/gdb.arch/powerpc-altivec3.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec3.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec3.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,88 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x117e0001    /* vmul10cuq v11,v30          */
+	.long  0x13c1b807    /* vcmpneb v30,v1,v23         */
+	.long  0x13d3f77b    /* vpermr  v30,v19,v30,v29    */
+	.long  0x12948841    /* vmul10ecuq v20,v20,v17     */
+	.long  0x1373f847    /* vcmpneh v27,v19,v31        */
+	.long  0x10c9b885    /* vrlwmi  v6,v9,v23          */
+	.long  0x12da0887    /* vcmpnew v22,v26,v1         */
+	.long  0x131ec8c5    /* vrldmi  v24,v30,v25        */
+	.long  0x127db107    /* vcmpnezb v19,v29,v22       */
+	.long  0x11179947    /* vcmpnezh v8,v23,v19        */
+	.long  0x13785985    /* vrlwnm  v27,v24,v11        */
+	.long  0x12ad5187    /* vcmpnezw v21,v13,v10       */
+	.long  0x10b4e9c5    /* vrldnm  v5,v20,v29         */
+	.long  0x13d30201    /* vmul10uq v30,v19           */
+	.long  0x130caa0d    /* vextractub v24,v21,12      */
+	.long  0x1013e241    /* vmul10euq v0,v19,v28       */
+	.long  0x114c1a4d    /* vextractuh v10,v3,12       */
+	.long  0x1387628d    /* vextractuw v28,v12,7       */
+	.long  0x13c1dacd    /* vextractd v30,v27,1        */
+	.long  0x1324fb0d    /* vinsertb v25,v31,4         */
+	.long  0x12aef341    /* bcdcpsgn. v21,v14,v30      */
+	.long  0x12c5934d    /* vinserth v22,v18,5         */
+	.long  0x13a1b38d    /* vinsertw v29,v22,1         */
+	.long  0x13a76bcd    /* vinsertd v29,v13,7         */
+	.long  0x12d94407    /* vcmpneb. v22,v25,v8        */
+	.long  0x120fac47    /* vcmpneh. v16,v15,v21       */
+	.long  0x12d5fc81    /* bcdus.  v22,v21,v31        */
+	.long  0x102c6487    /* vcmpnew. v1,v12,v12        */
+	.long  0x10a346c1    /* bcds.   v5,v3,v8,1         */
+	.long  0x13760d01    /* bcdtrunc. v27,v22,v1,0     */
+	.long  0x105a0507    /* vcmpnezb. v2,v26,v0        */
+	.long  0x134e3d41    /* bcdutrunc. v26,v14,v7      */
+	.long  0x12056547    /* vcmpnezh. v16,v5,v12       */
+	.long  0x13002d81    /* bcdctsq. v24,v5            */
+	.long  0x10e20581    /* bcdcfsq. v7,v0,0           */
+	.long  0x13c46781    /* bcdctz. v30,v12,1          */
+	.long  0x1225bd81    /* bcdctn. v17,v23            */
+	.long  0x10867f81    /* bcdcfz. v4,v15,1           */
+	.long  0x13a72f81    /* bcdcfn. v29,v5,1           */
+	.long  0x137f6581    /* bcdsetsgn. v27,v12,0       */
+	.long  0x11dccd87    /* vcmpnezw. v14,v28,v25      */
+	.long  0x104237c1    /* bcdsr.  v2,v2,v6,1         */
+	.long  0x13202dcc    /* vbpermd v25,v0,v5          */
+	.long  0x1380ce02    /* vclzlsbb r28,v25           */
+	.long  0x1041c602    /* vctzlsbb r2,v24            */
+	.long  0x12a65e02    /* vnegw   v21,v11            */
+	.long  0x1227de02    /* vnegd   v17,v27            */
+	.long  0x13e8be02    /* vprtybw v31,v23            */
+	.long  0x12a9be02    /* vprtybd v21,v23            */
+	.long  0x12aa9602    /* vprtybq v21,v18            */
+	.long  0x13d02602    /* vextsb2w v30,v4            */
+	.long  0x1071d602    /* vextsh2w v3,v26            */
+	.long  0x11788e02    /* vextsb2d v11,v17           */
+	.long  0x10b95602    /* vextsh2d v5,v10            */
+	.long  0x11bace02    /* vextsw2d v13,v25           */
+	.long  0x133c1602    /* vctzb   v25,v2             */
+	.long  0x101d1e02    /* vctzh   v0,v3              */
+	.long  0x12de3602    /* vctzw   v22,v6             */
+	.long  0x135fc602    /* vctzd   v26,v24            */
+	.long  0x10df160d    /* vextublx r6,r31,v2         */
+	.long  0x11a0964d    /* vextuhlx r13,r0,v18        */
+	.long  0x11defe8d    /* vextuwlx r14,r30,v31       */
+	.long  0x11ec7704    /* vsrv    v15,v12,v14        */
+	.long  0x128af70d    /* vextubrx r20,r10,v30       */
+	.long  0x12b51744    /* vslv    v21,v21,v2         */
+	.long  0x11e90f4d    /* vextuhrx r15,r9,v1         */
+	.long  0x12b1878d    /* vextuwrx r21,r17,v16       */
+	.long  0x1295b5e3    /* vmsumudm v20,v21,v22,v23   */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec.exp ./gdb/testsuite/gdb.arch/powerpc-altivec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,261 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: '$instr'"
+    set peb [instr_to_patt $instr]
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $peb
+    }
+}
+
+func_check "dss     3"
+func_check "dssall"
+func_check "dst     r5,r4,1"
+func_check "dstt    r8,r7,0"
+func_check "dstst   r5,r6,3"
+func_check "dststt  r4,r5,2"
+func_check "lvebx   v30,r22,r24"
+func_check "lvebx   v21,0,r24"
+func_check "lvehx   v10,r16,r2"
+func_check "lvehx   v20,0,r23"
+func_check "lvewx   v17,r4,r18"
+func_check "lvewx   v23,0,r8"
+func_check "lvsl    v6,0,r25"
+func_check "lvsl    v2,0,r6"
+func_check "lvsr    v22,r16,r12"
+func_check "lvsr    v0,0,r29"
+func_check "lvxl    v15,r5,r13"
+func_check "lvxl    v19,0,r23"
+func_check "lvx     v22,r1,r2"
+func_check "lvx     v18,0,r17"
+func_check "mfvrsave r31"
+func_check "mfvscr  v24"
+func_check "mtvrsave r10"
+func_check "mtvscr  v25"
+func_check "stvebx  v18,r27,r10"
+func_check "stvebx  v16,0,r6"
+func_check "stvehx  v17,r13,r16"
+func_check "stvehx  v23,0,r20"
+func_check "stvewx  v11,r19,r31"
+func_check "stvewx  v31,0,r1"
+func_check "stvxl   v26,r21,r17"
+func_check "stvxl   v13,0,r22"
+func_check "stvx    v11,r31,r31"
+func_check "stvx    v30,0,r16"
+func_check "vaddcuw v24,v7,v28"
+func_check "vaddfp  v3,v30,v11"
+func_check "vaddsbs v8,v28,v9"
+func_check "vaddshs v7,v5,v4"
+func_check "vaddsws v22,v26,v27"
+func_check "vaddubm v16,v14,v28"
+func_check "vaddubs v6,v1,v25"
+func_check "vadduhm v2,v4,v6"
+func_check "vadduhs v26,v21,v8"
+func_check "vadduwm v29,v31,v1"
+func_check "vadduws v23,v13,v4"
+func_check "vandc   v30,v16,v9"
+func_check "vand    v3,v13,v27"
+func_check "vavgsb  v4,v6,v17"
+func_check "vavgsh  v23,v28,v19"
+func_check "vavgsw  v8,v15,v31"
+func_check "vavgub  v6,v7,v25"
+func_check "vavguh  v25,v22,v10"
+func_check "vavguw  v3,v23,v29"
+func_check "vctsxs  v14,v2,6"
+func_check "vctuxs  v9,v31,20"
+func_check "vcfsx   v24,v30,3"
+func_check "vcfux   v17,v21,29"
+func_check "vcmpbfp v18,v28,v0"
+func_check "vcmpbfp. v19,v26,v3"
+func_check "vcmpeqfp v16,v2,v11"
+func_check "vcmpeqfp. v23,v13,v13"
+func_check "vcmpequb v25,v19,v10"
+func_check "vcmpequb. v18,v11,v2"
+func_check "vcmpequh v9,v25,v7"
+func_check "vcmpequh. v14,v24,v21"
+func_check "vcmpequw v24,v12,v5"
+func_check "vcmpequw. v19,v16,v1"
+func_check "vcmpgefp v23,v17,v16"
+func_check "vcmpgefp. v19,v29,v17"
+func_check "vcmpgtfp v16,v28,v13"
+func_check "vcmpgtfp. v14,v24,v7"
+func_check "vcmpgtsb v16,v22,v6"
+func_check "vcmpgtsb. v2,v12,v14"
+func_check "vcmpgtsh v28,v3,v29"
+func_check "vcmpgtsh. v16,v19,v13"
+func_check "vcmpgtsw v15,v0,v5"
+func_check "vcmpgtsw. v21,v13,v0"
+func_check "vcmpgtub v5,v10,v30"
+func_check "vcmpgtub. v7,v13,v10"
+func_check "vcmpgtuh v24,v15,v16"
+func_check "vcmpgtuh. v25,v21,v27"
+func_check "vcmpgtuw v17,v27,v6"
+func_check "vcmpgtuw. v8,v21,v27"
+func_check "vcfsx   v1,v1,14"
+func_check "vctsxs  v4,v15,25"
+func_check "vctuxs  v28,v23,14"
+func_check "vcfux   v6,v6,0"
+func_check "vexptefp v0,v8"
+func_check "vlogefp v22,v27"
+func_check "vmaddfp v23,v18,v5,v18"
+func_check "vmaxfp  v13,v13,v27"
+func_check "vmaxsb  v8,v23,v14"
+func_check "vmaxsh  v19,v17,v0"
+func_check "vmaxsw  v19,v3,v22"
+func_check "vmaxub  v23,v30,v28"
+func_check "vmaxuh  v9,v20,v23"
+func_check "vmaxuw  v21,v19,v1"
+func_check "vmhaddshs v22,v13,v5,v22"
+func_check "vmhraddshs v31,v0,v3,v18"
+func_check "vminfp  v2,v21,v24"
+func_check "vminsb  v20,v6,v10"
+func_check "vminsh  v18,v27,v26"
+func_check "vminsw  v3,v4,v1"
+func_check "vminub  v7,v0,v13"
+func_check "vminuh  v0,v12,v6"
+func_check "vminuw  v6,v3,v1"
+func_check "vmladduhm v3,v29,v3,v26"
+func_check "vmrghb  v21,v5,v31"
+func_check "vmrghh  v21,v24,v0"
+func_check "vmrghw  v16,v0,v22"
+func_check "vmrglb  v1,v17,v16"
+func_check "vmrglh  v14,v8,v15"
+func_check "vmrglw  v31,v21,v5"
+func_check "vmr     v24,v9"
+func_check "vmr     v24,v9"
+func_check "vmsummbm v0,v24,v15,v23"
+func_check "vmsumshm v1,v4,v7,v25"
+func_check "vmsumshs v9,v8,v13,v31"
+func_check "vmsumubm v23,v31,v12,v30"
+func_check "vmsumuhm v29,v0,v26,v21"
+func_check "vmsumuhs v27,v14,v25,v5"
+func_check "vmulesb v10,v25,v14"
+func_check "vmulesh v1,v18,v8"
+func_check "vmuleub v17,v14,v9"
+func_check "vmuleuh v5,v26,v9"
+func_check "vmulosb v21,v18,v6"
+func_check "vmulosh v4,v5,v8"
+func_check "vmuloub v2,v9,v19"
+func_check "vmulouh v29,v5,v4"
+func_check "vnmsubfp v8,v2,v6,v5"
+func_check "vnor    v31,v9,v10"
+func_check "vnot    v25,v31"
+func_check "vnot    v25,v31"
+func_check "vor     v23,v7,v2"
+func_check "vperm   v0,v28,v22,v25"
+func_check "vpkpx   v16,v25,v17"
+func_check "vpkshss v12,v16,v17"
+func_check "vpkshus v1,v19,v23"
+func_check "vpkswss v25,v7,v13"
+func_check "vpkswus v4,v24,v10"
+func_check "vpkuhum v9,v27,v12"
+func_check "vpkuhus v22,v10,v25"
+func_check "vpkuwum v30,v18,v0"
+func_check "vpkuwus v7,v3,v22"
+func_check "vrefp   v24,v28"
+func_check "vrfim   v17,v19"
+func_check "vrfin   v24,v25"
+func_check "vrfip   v3,v5"
+func_check "vrfiz   v8,v10"
+func_check "vrlb    v26,v18,v30"
+func_check "vrlh    v16,v17,v25"
+func_check "vrlw    v23,v30,v9"
+func_check "vrsqrtefp v2,v18"
+func_check "vsel    v20,v14,v18,v10"
+func_check "vslb    v25,v25,v12"
+func_check "vsldoi  v9,v9,v12,7"
+func_check "vslh    v14,v2,v11"
+func_check "vslo    v30,v5,v6"
+func_check "vsl     v22,v30,v9"
+func_check "vslw    v26,v26,v3"
+func_check "vspltb  v1,v20,6"
+func_check "vsplth  v16,v18,3"
+func_check "vspltisb v25,-13"
+func_check "vspltish v22,10"
+func_check "vspltisw v13,13"
+func_check "vspltw  v9,v18,2"
+func_check "vsrab   v14,v22,v0"
+func_check "vsrah   v12,v12,v18"
+func_check "vsraw   v2,v2,v13"
+func_check "vsrb    v7,v27,v5"
+func_check "vsrh    v7,v11,v29"
+func_check "vsro    v18,v30,v31"
+func_check "vsr     v2,v9,v28"
+func_check "vsrw    v0,v25,v0"
+func_check "vsubcuw v24,v2,v10"
+func_check "vsubfp  v22,v24,v20"
+func_check "vsubsbs v10,v22,v13"
+func_check "vsubshs v24,v17,v28"
+func_check "vsubsws v10,v26,v0"
+func_check "vsububm v16,v11,v24"
+func_check "vsububs v11,v21,v1"
+func_check "vsubuhm v6,v12,v24"
+func_check "vsubuhs v30,v11,v9"
+func_check "vsubuwm v19,v20,v13"
+func_check "vsubuws v18,v25,v6"
+func_check "vsum2sws v25,v10,v18"
+func_check "vsum4sbs v13,v16,v21"
+func_check "vsum4shs v23,v8,v4"
+func_check "vsum4ubs v28,v13,v30"
+func_check "vsumsws v22,v10,v8"
+func_check "vupkhpx v24,v14"
+func_check "vupkhsb v2,v22"
+func_check "vupkhsh v16,v2"
+func_check "vupklpx v10,v26"
+func_check "vupklsb v15,v28"
+func_check "vupklsh v8,v8"
+func_check "vxor    v25,v0,v3"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec.s ./gdb/testsuite/gdb.arch/powerpc-altivec.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-altivec.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-altivec.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,217 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7c60066c    /* dss     3                  */
+	.long  0x7e00066c    /* dssall                     */
+	.long  0x7c2522ac    /* dst     r5,r4,1            */
+	.long  0x7e083aac    /* dstt    r8,r7,0            */
+	.long  0x7c6532ec    /* dstst   r5,r6,3            */
+	.long  0x7e442aec    /* dststt  r4,r5,2            */
+	.long  0x7fd6c00e    /* lvebx   v30,r22,r24        */
+	.long  0x7ea0c00e    /* lvebx   v21,0,r24          */
+	.long  0x7d50104e    /* lvehx   v10,r16,r2         */
+	.long  0x7e80b84e    /* lvehx   v20,0,r23          */
+	.long  0x7e24908e    /* lvewx   v17,r4,r18         */
+	.long  0x7ee0408e    /* lvewx   v23,0,r8           */
+	.long  0x7cc0c80c    /* lvsl    v6,0,r25           */
+	.long  0x7c40300c    /* lvsl    v2,0,r6            */
+	.long  0x7ed0604c    /* lvsr    v22,r16,r12        */
+	.long  0x7c00e84c    /* lvsr    v0,0,r29           */
+	.long  0x7de56ace    /* lvxl    v15,r5,r13         */
+	.long  0x7e60bace    /* lvxl    v19,0,r23          */
+	.long  0x7ec110ce    /* lvx     v22,r1,r2          */
+	.long  0x7e4088ce    /* lvx     v18,0,r17          */
+	.long  0x7fe042a6    /* mfvrsave r31               */
+	.long  0x13000604    /* mfvscr  v24                */
+	.long  0x7d4043a6    /* mtvrsave r10               */
+	.long  0x1000ce44    /* mtvscr  v25                */
+	.long  0x7e5b510e    /* stvebx  v18,r27,r10        */
+	.long  0x7e00310e    /* stvebx  v16,0,r6           */
+	.long  0x7e2d814e    /* stvehx  v17,r13,r16        */
+	.long  0x7ee0a14e    /* stvehx  v23,0,r20          */
+	.long  0x7d73f98e    /* stvewx  v11,r19,r31        */
+	.long  0x7fe0098e    /* stvewx  v31,0,r1           */
+	.long  0x7f558bce    /* stvxl   v26,r21,r17        */
+	.long  0x7da0b3ce    /* stvxl   v13,0,r22          */
+	.long  0x7d7ff9ce    /* stvx    v11,r31,r31        */
+	.long  0x7fc081ce    /* stvx    v30,0,r16          */
+	.long  0x1307e180    /* vaddcuw v24,v7,v28         */
+	.long  0x107e580a    /* vaddfp  v3,v30,v11         */
+	.long  0x111c4b00    /* vaddsbs v8,v28,v9          */
+	.long  0x10e52340    /* vaddshs v7,v5,v4           */
+	.long  0x12dadb80    /* vaddsws v22,v26,v27        */
+	.long  0x120ee000    /* vaddubm v16,v14,v28        */
+	.long  0x10c1ca00    /* vaddubs v6,v1,v25          */
+	.long  0x10443040    /* vadduhm v2,v4,v6           */
+	.long  0x13554240    /* vadduhs v26,v21,v8         */
+	.long  0x13bf0880    /* vadduwm v29,v31,v1         */
+	.long  0x12ed2280    /* vadduws v23,v13,v4         */
+	.long  0x13d04c44    /* vandc   v30,v16,v9         */
+	.long  0x106ddc04    /* vand    v3,v13,v27         */
+	.long  0x10868d02    /* vavgsb  v4,v6,v17          */
+	.long  0x12fc9d42    /* vavgsh  v23,v28,v19        */
+	.long  0x110ffd82    /* vavgsw  v8,v15,v31         */
+	.long  0x10c7cc02    /* vavgub  v6,v7,v25          */
+	.long  0x13365442    /* vavguh  v25,v22,v10        */
+	.long  0x1077ec82    /* vavguw  v3,v23,v29         */
+	.long  0x11c613ca    /* vctsxs  v14,v2,6           */
+	.long  0x1134fb8a    /* vctuxs  v9,v31,20          */
+	.long  0x1303f34a    /* vcfsx   v24,v30,3          */
+	.long  0x123dab0a    /* vcfux   v17,v21,29         */
+	.long  0x125c03c6    /* vcmpbfp v18,v28,v0         */
+	.long  0x127a1fc6    /* vcmpbfp. v19,v26,v3        */
+	.long  0x120258c6    /* vcmpeqfp v16,v2,v11        */
+	.long  0x12ed6cc6    /* vcmpeqfp. v23,v13,v13      */
+	.long  0x13335006    /* vcmpequb v25,v19,v10       */
+	.long  0x124b1406    /* vcmpequb. v18,v11,v2       */
+	.long  0x11393846    /* vcmpequh v9,v25,v7         */
+	.long  0x11d8ac46    /* vcmpequh. v14,v24,v21      */
+	.long  0x130c2886    /* vcmpequw v24,v12,v5        */
+	.long  0x12700c86    /* vcmpequw. v19,v16,v1       */
+	.long  0x12f181c6    /* vcmpgefp v23,v17,v16       */
+	.long  0x127d8dc6    /* vcmpgefp. v19,v29,v17      */
+	.long  0x121c6ac6    /* vcmpgtfp v16,v28,v13       */
+	.long  0x11d83ec6    /* vcmpgtfp. v14,v24,v7       */
+	.long  0x12163306    /* vcmpgtsb v16,v22,v6        */
+	.long  0x104c7706    /* vcmpgtsb. v2,v12,v14       */
+	.long  0x1383eb46    /* vcmpgtsh v28,v3,v29        */
+	.long  0x12136f46    /* vcmpgtsh. v16,v19,v13      */
+	.long  0x11e02b86    /* vcmpgtsw v15,v0,v5         */
+	.long  0x12ad0786    /* vcmpgtsw. v21,v13,v0       */
+	.long  0x10aaf206    /* vcmpgtub v5,v10,v30        */
+	.long  0x10ed5606    /* vcmpgtub. v7,v13,v10       */
+	.long  0x130f8246    /* vcmpgtuh v24,v15,v16       */
+	.long  0x1335de46    /* vcmpgtuh. v25,v21,v27      */
+	.long  0x123b3286    /* vcmpgtuw v17,v27,v6        */
+	.long  0x1115de86    /* vcmpgtuw. v8,v21,v27       */
+	.long  0x102e0b4a    /* vcfsx   v1,v1,14           */
+	.long  0x10997bca    /* vctsxs  v4,v15,25          */
+	.long  0x138ebb8a    /* vctuxs  v28,v23,14         */
+	.long  0x10c0330a    /* vcfux   v6,v6,0            */
+	.long  0x1000418a    /* vexptefp v0,v8             */
+	.long  0x12c0d9ca    /* vlogefp v22,v27            */
+	.long  0x12f2916e    /* vmaddfp v23,v18,v5,v18     */
+	.long  0x11addc0a    /* vmaxfp  v13,v13,v27        */
+	.long  0x11177102    /* vmaxsb  v8,v23,v14         */
+	.long  0x12710142    /* vmaxsh  v19,v17,v0         */
+	.long  0x1263b182    /* vmaxsw  v19,v3,v22         */
+	.long  0x12fee002    /* vmaxub  v23,v30,v28        */
+	.long  0x1134b842    /* vmaxuh  v9,v20,v23         */
+	.long  0x12b30882    /* vmaxuw  v21,v19,v1         */
+	.long  0x12cd2da0    /* vmhaddshs v22,v13,v5,v22   */
+	.long  0x13e01ca1    /* vmhraddshs v31,v0,v3,v18   */
+	.long  0x1055c44a    /* vminfp  v2,v21,v24         */
+	.long  0x12865302    /* vminsb  v20,v6,v10         */
+	.long  0x125bd342    /* vminsh  v18,v27,v26        */
+	.long  0x10640b82    /* vminsw  v3,v4,v1           */
+	.long  0x10e06a02    /* vminub  v7,v0,v13          */
+	.long  0x100c3242    /* vminuh  v0,v12,v6          */
+	.long  0x10c30a82    /* vminuw  v6,v3,v1           */
+	.long  0x107d1ea2    /* vmladduhm v3,v29,v3,v26    */
+	.long  0x12a5f80c    /* vmrghb  v21,v5,v31         */
+	.long  0x12b8004c    /* vmrghh  v21,v24,v0         */
+	.long  0x1200b08c    /* vmrghw  v16,v0,v22         */
+	.long  0x1031810c    /* vmrglb  v1,v17,v16         */
+	.long  0x11c8794c    /* vmrglh  v14,v8,v15         */
+	.long  0x13f5298c    /* vmrglw  v31,v21,v5         */
+	.long  0x13094c84    /* vmr     v24,v9             */
+	.long  0x13094c84    /* vmr     v24,v9             */
+	.long  0x10187de5    /* vmsummbm v0,v24,v15,v23    */
+	.long  0x10243e68    /* vmsumshm v1,v4,v7,v25      */
+	.long  0x11286fe9    /* vmsumshs v9,v8,v13,v31     */
+	.long  0x12ff67a4    /* vmsumubm v23,v31,v12,v30   */
+	.long  0x13a0d566    /* vmsumuhm v29,v0,v26,v21    */
+	.long  0x136ec967    /* vmsumuhs v27,v14,v25,v5    */
+	.long  0x11597308    /* vmulesb v10,v25,v14        */
+	.long  0x10324348    /* vmulesh v1,v18,v8          */
+	.long  0x122e4a08    /* vmuleub v17,v14,v9         */
+	.long  0x10ba4a48    /* vmuleuh v5,v26,v9          */
+	.long  0x12b23108    /* vmulosb v21,v18,v6         */
+	.long  0x10854148    /* vmulosh v4,v5,v8           */
+	.long  0x10499808    /* vmuloub v2,v9,v19          */
+	.long  0x13a52048    /* vmulouh v29,v5,v4          */
+	.long  0x110229af    /* vnmsubfp v8,v2,v6,v5       */
+	.long  0x13e95504    /* vnor    v31,v9,v10         */
+	.long  0x133ffd04    /* vnot    v25,v31            */
+	.long  0x133ffd04    /* vnot    v25,v31            */
+	.long  0x12e71484    /* vor     v23,v7,v2          */
+	.long  0x101cb66b    /* vperm   v0,v28,v22,v25     */
+	.long  0x12198b0e    /* vpkpx   v16,v25,v17        */
+	.long  0x1190898e    /* vpkshss v12,v16,v17        */
+	.long  0x1033b90e    /* vpkshus v1,v19,v23         */
+	.long  0x132769ce    /* vpkswss v25,v7,v13         */
+	.long  0x1098514e    /* vpkswus v4,v24,v10         */
+	.long  0x113b600e    /* vpkuhum v9,v27,v12         */
+	.long  0x12cac88e    /* vpkuhus v22,v10,v25        */
+	.long  0x13d2004e    /* vpkuwum v30,v18,v0         */
+	.long  0x10e3b0ce    /* vpkuwus v7,v3,v22          */
+	.long  0x1300e10a    /* vrefp   v24,v28            */
+	.long  0x12209aca    /* vrfim   v17,v19            */
+	.long  0x1300ca0a    /* vrfin   v24,v25            */
+	.long  0x10602a8a    /* vrfip   v3,v5              */
+	.long  0x1100524a    /* vrfiz   v8,v10             */
+	.long  0x1352f004    /* vrlb    v26,v18,v30        */
+	.long  0x1211c844    /* vrlh    v16,v17,v25        */
+	.long  0x12fe4884    /* vrlw    v23,v30,v9         */
+	.long  0x1040914a    /* vrsqrtefp v2,v18           */
+	.long  0x128e92aa    /* vsel    v20,v14,v18,v10    */
+	.long  0x13396104    /* vslb    v25,v25,v12        */
+	.long  0x112961ec    /* vsldoi  v9,v9,v12,7        */
+	.long  0x11c25944    /* vslh    v14,v2,v11         */
+	.long  0x13c5340c    /* vslo    v30,v5,v6          */
+	.long  0x12de49c4    /* vsl     v22,v30,v9         */
+	.long  0x135a1984    /* vslw    v26,v26,v3         */
+	.long  0x1026a20c    /* vspltb  v1,v20,6           */
+	.long  0x1203924c    /* vsplth  v16,v18,3          */
+	.long  0x1333030c    /* vspltisb v25,-13           */
+	.long  0x12ca034c    /* vspltish v22,10            */
+	.long  0x11ad038c    /* vspltisw v13,13            */
+	.long  0x1122928c    /* vspltw  v9,v18,2           */
+	.long  0x11d60304    /* vsrab   v14,v22,v0         */
+	.long  0x118c9344    /* vsrah   v12,v12,v18        */
+	.long  0x10426b84    /* vsraw   v2,v2,v13          */
+	.long  0x10fb2a04    /* vsrb    v7,v27,v5          */
+	.long  0x10ebea44    /* vsrh    v7,v11,v29         */
+	.long  0x125efc4c    /* vsro    v18,v30,v31        */
+	.long  0x1049e2c4    /* vsr     v2,v9,v28          */
+	.long  0x10190284    /* vsrw    v0,v25,v0          */
+	.long  0x13025580    /* vsubcuw v24,v2,v10         */
+	.long  0x12d8a04a    /* vsubfp  v22,v24,v20        */
+	.long  0x11566f00    /* vsubsbs v10,v22,v13        */
+	.long  0x1311e740    /* vsubshs v24,v17,v28        */
+	.long  0x115a0780    /* vsubsws v10,v26,v0         */
+	.long  0x120bc400    /* vsububm v16,v11,v24        */
+	.long  0x11750e00    /* vsububs v11,v21,v1         */
+	.long  0x10ccc440    /* vsubuhm v6,v12,v24         */
+	.long  0x13cb4e40    /* vsubuhs v30,v11,v9         */
+	.long  0x12746c80    /* vsubuwm v19,v20,v13        */
+	.long  0x12593680    /* vsubuws v18,v25,v6         */
+	.long  0x132a9688    /* vsum2sws v25,v10,v18       */
+	.long  0x11b0af08    /* vsum4sbs v13,v16,v21       */
+	.long  0x12e82648    /* vsum4shs v23,v8,v4         */
+	.long  0x138df608    /* vsum4ubs v28,v13,v30       */
+	.long  0x12ca4788    /* vsumsws v22,v10,v8         */
+	.long  0x1300734e    /* vupkhpx v24,v14            */
+	.long  0x1040b20e    /* vupkhsb v2,v22             */
+	.long  0x1200124e    /* vupkhsh v16,v2             */
+	.long  0x1140d3ce    /* vupklpx v10,v26            */
+	.long  0x11e0e28e    /* vupklsb v15,v28            */
+	.long  0x110042ce    /* vupklsh v8,v8              */
+	.long  0x13201cc4    /* vxor    v25,v0,v3          */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-d128-regs.c ./gdb/testsuite/gdb.arch/powerpc-d128-regs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-d128-regs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-d128-regs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp ./gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-d128-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,12 +25,10 @@ if ![istarget "powerpc64*-*"] then {
     return
 }
 
-set testfile "powerpc-d128-regs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
-     untested powerpc-d128-regs.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -46,27 +44,27 @@ if { ![runto main] } then {
    return
 }
 
-if [gdb_test "show arch" ".*currently powerpc:common.*" "Checking for PPC arch"] {
+if [gdb_test "show arch" ".*currently powerpc:common.*" "checking for PPC arch"] {
     return -1
 }
 
 gdb_test "next" ""
 
 for {set i 0} {$i < 16} {incr i 1} {
-gdb_test "set \$dl$i=d128" "" "Set dl$i register"
+gdb_test "set \$dl$i=d128" "" "set dl$i register"
 
-gdb_test "print \$dl$i" "\\\$$decimal = 1\.2345678910" "Print dl$i register as DFP"
+gdb_test "print \$dl$i" "\\\$$decimal = 1\.2345678910" "print dl$i register as DFP"
 
 gdb_test "info reg dl$i" \
 	 "dl$i\[ \]*1\.2345678910\[\t\]*\\(raw 0x2205800000000000000000049c5de09c\\)" \
-	 "Print dl$i register with the info reg command"
+	 "print dl$i register with the info reg command"
 
 gdb_test "info reg f[expr 2*$i]" \
 	 "f[expr 2*$i]\[ \]*8\.608957309287334e\-145\[\t\]*\\(raw 0x2205800000000000\\)" \
-	 "Testing lower half of dl$i register"
+	 "testing lower half of dl$i register"
 
 gdb_test "info reg f[expr 2*$i+1]" \
 	 "f[expr 2*$i+1]\[ \]*9\.7841140127686122e\-314\[\t\]*\\(raw 0x000000049c5de09c\\)" \
-	 "Testing upper half of dl$i register"
+	 "testing upper half of dl$i register"
 
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp ./gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# This test exercises set/show disassembler-options results are preserved
+# across multiple set architecture calls.
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC disassembler options."
+    return
+}
+
+gdb_exit
+gdb_start
+
+set option "power9"
+set arch1 "rs6000:6000"
+set arch2 "powerpc:common64"
+
+gdb_test "set architecture $arch1" \
+	"The target architecture is assumed to be $arch1" \
+	"set architecture $arch1"
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are ''.*" \
+	"show NULL disassembler-options"
+
+gdb_test_no_output "set disassembler-options $option"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
+# Change architectures and verify the disassembler options have been preserved.
+
+gdb_test "set architecture $arch2" \
+	"The target architecture is assumed to be $arch2" \
+	"set architecture $arch2"
+
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power7.exp ./gdb/testsuite/gdb.arch/powerpc-power7.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power7.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power7.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,164 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options power7"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "lxvd2x  vs3,r4,r5"
+func_check "lxvd2x  vs43,r4,r5"
+func_check "stxvd2x vs3,r4,r5"
+func_check "stxvd2x vs43,r4,r5"
+func_check "xxmrghd vs3,vs4,vs5"
+func_check "xxmrghd vs43,vs44,vs45"
+func_check "xxmrgld vs3,vs4,vs5"
+func_check "xxmrgld vs43,vs44,vs45"
+func_check "xxmrghd vs3,vs4,vs5"
+func_check "xxmrghd vs43,vs44,vs45"
+func_check "xxmrgld vs3,vs4,vs5"
+func_check "xxmrgld vs43,vs44,vs45"
+func_check "xxpermdi vs3,vs4,vs5,1"
+func_check "xxpermdi vs43,vs44,vs45,1"
+func_check "xxpermdi vs3,vs4,vs5,2"
+func_check "xxpermdi vs43,vs44,vs45,2"
+func_check "xvmovdp vs3,vs4"
+func_check "xvmovdp vs43,vs44"
+func_check "xvmovdp vs3,vs4"
+func_check "xvmovdp vs43,vs44"
+func_check "xvcpsgndp vs3,vs4,vs5"
+func_check "xvcpsgndp vs43,vs44,vs45"
+func_check "doze"
+func_check "nap"
+func_check "sleep"
+func_check "rvwinkle"
+func_check "prtyw   r3,r4"
+func_check "prtyd   r13,r14"
+func_check "mfcfar  r10"
+func_check "mtcfar  r11"
+func_check "cmpb    r3,r4,r5"
+func_check "lwzcix  r10,r11,r12"
+func_check "dadd    f16,f17,f18"
+func_check "daddq   f20,f22,f24"
+func_check "dss     3"
+func_check "dssall"
+func_check "dst     r5,r4,1"
+func_check "dstt    r8,r7,0"
+func_check "dstst   r5,r6,3"
+func_check "dststt  r4,r5,2"
+func_check "divwe   r10,r11,r12"
+func_check "divwe.  r11,r12,r13"
+func_check "divweo  r12,r13,r14"
+func_check "divweo. r13,r14,r15"
+func_check "divweu  r10,r11,r12"
+func_check "divweu. r11,r12,r13"
+func_check "divweuo r12,r13,r14"
+func_check "divweuo. r13,r14,r15"
+func_check "bpermd  r7,r17,r27"
+func_check "popcntw r10,r20"
+func_check "popcntd r10,r20"
+func_check "ldbrx   r20,r21,r22"
+func_check "stdbrx  r20,r21,r22"
+func_check "lfiwzx  f10,0,r10"
+func_check "lfiwzx  f10,r9,r10"
+func_check "fcfids  f4,f5"
+func_check "fcfids. f4,f5"
+func_check "fcfidus f4,f5"
+func_check "fcfidus. f4,f5"
+func_check "fctiwu  f4,f5"
+func_check "fctiwu. f4,f5"
+func_check "fctiwuz f4,f5"
+func_check "fctiwuz. f4,f5"
+func_check "fctidu  f4,f5"
+func_check "fctidu. f4,f5"
+func_check "fctiduz f4,f5"
+func_check "fctiduz. f4,f5"
+func_check "fcfidu  f4,f5"
+func_check "fcfidu. f4,f5"
+func_check "ftdiv   cr0,f10,f11"
+func_check "ftdiv   cr7,f10,f11"
+func_check "ftsqrt  cr0,f10"
+func_check "ftsqrt  cr7,f10"
+func_check "dcbtt   r8,r9"
+func_check "dcbtstt r8,r9"
+func_check "dcffix  f10,f12"
+func_check "dcffix. f20,f22"
+func_check "fre     f14,f15"
+func_check "fre.    f14,f15"
+func_check "fres    f14,f15"
+func_check "fres.   f14,f15"
+func_check "frsqrte f14,f15"
+func_check "frsqrte. f14,f15"
+func_check "frsqrtes f14,f15"
+func_check "frsqrtes. f14,f15"
+func_check "isel    r2,r3,r4,28"
+func_check "yield"
+func_check "yield"
+func_check "ori     r2,r2,0"
+func_check "nop"
+func_check "nop"
+func_check "ori     r2,r2,0"
+func_check "mdoio"
+func_check "mdoio"
+func_check "mdoom"
+func_check "mdoom"
+func_check "mfppr   r10"
+func_check "mfppr32 r11"
+func_check "mtppr   r12"
+func_check "mtppr32 r13"
+func_check "tlbie   r10,r11"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power7.s ./gdb/testsuite/gdb.arch/powerpc-power7.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power7.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power7.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,121 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7c642e98    /* lxvd2x  vs3,r4,r5          */
+	.long  0x7d642e99    /* lxvd2x  vs43,r4,r5         */
+	.long  0x7c642f98    /* stxvd2x vs3,r4,r5          */
+	.long  0x7d642f99    /* stxvd2x vs43,r4,r5         */
+	.long  0xf0642850    /* xxmrghd vs3,vs4,vs5        */
+	.long  0xf16c6857    /* xxmrghd vs43,vs44,vs45     */
+	.long  0xf0642b50    /* xxmrgld vs3,vs4,vs5        */
+	.long  0xf16c6b57    /* xxmrgld vs43,vs44,vs45     */
+	.long  0xf0642850    /* xxmrghd vs3,vs4,vs5        */
+	.long  0xf16c6857    /* xxmrghd vs43,vs44,vs45     */
+	.long  0xf0642b50    /* xxmrgld vs3,vs4,vs5        */
+	.long  0xf16c6b57    /* xxmrgld vs43,vs44,vs45     */
+	.long  0xf0642950    /* xxpermdi vs3,vs4,vs5,1     */
+	.long  0xf16c6957    /* xxpermdi vs43,vs44,vs45,1  */
+	.long  0xf0642a50    /* xxpermdi vs3,vs4,vs5,2     */
+	.long  0xf16c6a57    /* xxpermdi vs43,vs44,vs45,2  */
+	.long  0xf0642780    /* xvmovdp vs3,vs4            */
+	.long  0xf16c6787    /* xvmovdp vs43,vs44          */
+	.long  0xf0642780    /* xvmovdp vs3,vs4            */
+	.long  0xf16c6787    /* xvmovdp vs43,vs44          */
+	.long  0xf0642f80    /* xvcpsgndp vs3,vs4,vs5      */
+	.long  0xf16c6f87    /* xvcpsgndp vs43,vs44,vs45   */
+	.long  0x4c000324    /* doze                       */
+	.long  0x4c000364    /* nap                        */
+	.long  0x4c0003a4    /* sleep                      */
+	.long  0x4c0003e4    /* rvwinkle                   */
+	.long  0x7c830134    /* prtyw   r3,r4              */
+	.long  0x7dcd0174    /* prtyd   r13,r14            */
+	.long  0x7d5c02a6    /* mfcfar  r10                */
+	.long  0x7d7c03a6    /* mtcfar  r11                */
+	.long  0x7c832bf8    /* cmpb    r3,r4,r5           */
+	.long  0x7d4b662a    /* lwzcix  r10,r11,r12        */
+	.long  0xee119004    /* dadd    f16,f17,f18        */
+	.long  0xfe96c004    /* daddq   f20,f22,f24        */
+	.long  0x7c60066c    /* dss     3                  */
+	.long  0x7e00066c    /* dssall                     */
+	.long  0x7c2522ac    /* dst     r5,r4,1            */
+	.long  0x7e083aac    /* dstt    r8,r7,0            */
+	.long  0x7c6532ec    /* dstst   r5,r6,3            */
+	.long  0x7e442aec    /* dststt  r4,r5,2            */
+	.long  0x7d4b6356    /* divwe   r10,r11,r12        */
+	.long  0x7d6c6b57    /* divwe.  r11,r12,r13        */
+	.long  0x7d8d7756    /* divweo  r12,r13,r14        */
+	.long  0x7dae7f57    /* divweo. r13,r14,r15        */
+	.long  0x7d4b6316    /* divweu  r10,r11,r12        */
+	.long  0x7d6c6b17    /* divweu. r11,r12,r13        */
+	.long  0x7d8d7716    /* divweuo r12,r13,r14        */
+	.long  0x7dae7f17    /* divweuo. r13,r14,r15       */
+	.long  0x7e27d9f8    /* bpermd  r7,r17,r27         */
+	.long  0x7e8a02f4    /* popcntw r10,r20            */
+	.long  0x7e8a03f4    /* popcntd r10,r20            */
+	.long  0x7e95b428    /* ldbrx   r20,r21,r22        */
+	.long  0x7e95b528    /* stdbrx  r20,r21,r22        */
+	.long  0x7d4056ee    /* lfiwzx  f10,0,r10          */
+	.long  0x7d4956ee    /* lfiwzx  f10,r9,r10         */
+	.long  0xec802e9c    /* fcfids  f4,f5              */
+	.long  0xec802e9d    /* fcfids. f4,f5              */
+	.long  0xec802f9c    /* fcfidus f4,f5              */
+	.long  0xec802f9d    /* fcfidus. f4,f5             */
+	.long  0xfc80291c    /* fctiwu  f4,f5              */
+	.long  0xfc80291d    /* fctiwu. f4,f5              */
+	.long  0xfc80291e    /* fctiwuz f4,f5              */
+	.long  0xfc80291f    /* fctiwuz. f4,f5             */
+	.long  0xfc802f5c    /* fctidu  f4,f5              */
+	.long  0xfc802f5d    /* fctidu. f4,f5              */
+	.long  0xfc802f5e    /* fctiduz f4,f5              */
+	.long  0xfc802f5f    /* fctiduz. f4,f5             */
+	.long  0xfc802f9c    /* fcfidu  f4,f5              */
+	.long  0xfc802f9d    /* fcfidu. f4,f5              */
+	.long  0xfc0a5900    /* ftdiv   cr0,f10,f11        */
+	.long  0xff8a5900    /* ftdiv   cr7,f10,f11        */
+	.long  0xfc005140    /* ftsqrt  cr0,f10            */
+	.long  0xff805140    /* ftsqrt  cr7,f10            */
+	.long  0x7e084a2c    /* dcbtt   r8,r9              */
+	.long  0x7e0849ec    /* dcbtstt r8,r9              */
+	.long  0xed406644    /* dcffix  f10,f12            */
+	.long  0xee80b645    /* dcffix. f20,f22            */
+	.long  0xfdc07830    /* fre     f14,f15            */
+	.long  0xfdc07831    /* fre.    f14,f15            */
+	.long  0xedc07830    /* fres    f14,f15            */
+	.long  0xedc07831    /* fres.   f14,f15            */
+	.long  0xfdc07834    /* frsqrte f14,f15            */
+	.long  0xfdc07835    /* frsqrte. f14,f15           */
+	.long  0xedc07834    /* frsqrtes f14,f15           */
+	.long  0xedc07835    /* frsqrtes. f14,f15          */
+	.long  0x7c43271e    /* isel    r2,r3,r4,28        */
+	.long  0x7f7bdb78    /* yield                      */
+	.long  0x7f7bdb78    /* yield                      */
+	.long  0x60420000    /* ori     r2,r2,0            */
+	.long  0x60000000    /* nop                        */
+	.long  0x60000000    /* nop                        */
+	.long  0x60420000    /* ori     r2,r2,0            */
+	.long  0x7fbdeb78    /* mdoio                      */
+	.long  0x7fbdeb78    /* mdoio                      */
+	.long  0x7fdef378    /* mdoom                      */
+	.long  0x7fdef378    /* mdoom                      */
+	.long  0x7d40e2a6    /* mfppr   r10                */
+	.long  0x7d62e2a6    /* mfppr32 r11                */
+	.long  0x7d80e3a6    /* mtppr   r12                */
+	.long  0x7da2e3a6    /* mtppr32 r13                */
+	.long  0x7d605264    /* tlbie   r10,r11            */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power8.exp ./gdb/testsuite/gdb.arch/powerpc-power8.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power8.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power8.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,248 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options power8"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "tabort. r5"
+func_check "tabortwc. 7,r8,r16"
+func_check "tabortdc. 20,r11,r10"
+func_check "tabortwci. 17,r10,-13"
+func_check "tabortdci. 29,r3,-5"
+func_check "tbegin. "
+func_check "tcheck  cr7"
+func_check "tend.   "
+func_check "tend.   "
+func_check "tendall."
+func_check "tendall."
+func_check "treclaim. r24"
+func_check "trechkpt."
+func_check "tsuspend."
+func_check "tsuspend."
+func_check "tresume."
+func_check "tresume."
+func_check "ori     r2,r2,0"
+func_check "nop"
+func_check "ori     r2,r2,0"
+func_check "rfebb   0"
+func_check "rfebb   "
+func_check "rfebb   "
+func_check "bctar-  12,4*cr5+gt"
+func_check "bctarl- 4,4*cr1+so"
+func_check "bctar+  12,4*cr3+lt"
+func_check "bctarl+ 4,eq"
+func_check "bctar   4,4*cr2+lt,1"
+func_check "bctarl  4,4*cr1+so,2"
+func_check "waitasec"
+func_check "msgsndp r8"
+func_check "mtsle   1"
+func_check "msgclrp r27"
+func_check "stqcx.  r10,r10,r12"
+func_check "stqcx.  r28,0,r7"
+func_check "lqarx   r24,r19,r11"
+func_check "lqarx   r22,0,r11"
+func_check "mfbhrbe r20,6"
+func_check "pbt.    r29,r17,r16"
+func_check "pbt.    r14,0,r7"
+func_check "clrbhrb"
+func_check "vpermxor v11,v10,v0,v23"
+func_check "vaddeuqm v24,v2,v7,v4"
+func_check "vaddecuq v10,v10,v8,v2"
+func_check "vsubeuqm v5,v15,v8,v19"
+func_check "vsubecuq v12,v31,v16,v29"
+func_check "vmulouw v20,v29,v13"
+func_check "vmuluwm v29,v0,v26"
+func_check "vaddudm v8,v21,v28"
+func_check "vmaxud  v1,v26,v1"
+func_check "vrld    v20,v3,v1"
+func_check "vcmpequd v4,v19,v11"
+func_check "vadduqm v23,v14,v30"
+func_check "vaddcuq v8,v8,v13"
+func_check "vmulosw v28,v27,v4"
+func_check "vmaxsd  v3,v4,v4"
+func_check "vmuleuw v0,v19,v21"
+func_check "vminud  v24,v20,v19"
+func_check "vcmpgtud v0,v28,v15"
+func_check "vmulesw v21,v0,v2"
+func_check "vminsd  v9,v26,v9"
+func_check "vsrad   v25,v29,v11"
+func_check "vcmpgtsd v11,v28,v11"
+func_check "bcdadd. v5,v8,v26,1"
+func_check "vpmsumb v4,v3,v12"
+func_check "bcdsub. v26,v31,v21,1"
+func_check "vpmsumh v5,v17,v16"
+func_check "vpkudum v23,v17,v20"
+func_check "vpmsumw v24,v21,v29"
+func_check "vpmsumd v9,v22,v13"
+func_check "vpkudus v18,v19,v18"
+func_check "vsubuqm v30,v16,v22"
+func_check "vcipher v14,v11,v7"
+func_check "vcipherlast v10,v2,v22"
+func_check "vgbbd   v23,v13"
+func_check "vsubcuq v16,v25,v16"
+func_check "vorc    v31,v1,v5"
+func_check "vncipher v4,v17,v31"
+func_check "vncipherlast v24,v2,v27"
+func_check "vbpermq v23,v21,v23"
+func_check "vpksdus v27,v18,v9"
+func_check "vnand   v27,v29,v27"
+func_check "vsld    v19,v19,v24"
+func_check "vsbox   v5,v13"
+func_check "vpksdss v25,v3,v7"
+func_check "vcmpequd. v28,v8,v0"
+func_check "vupkhsw v26,v26"
+func_check "vshasigmaw v5,v7,0,6"
+func_check "veqv    v28,v21,v14"
+func_check "vmrgow  v1,v8,v19"
+func_check "vshasigmad v0,v10,0,10"
+func_check "vsrd    v5,v27,v14"
+func_check "vupklsw v11,v13"
+func_check "vclzb   v14,v16"
+func_check "vpopcntb v20,v27"
+func_check "vclzh   v28,v11"
+func_check "vpopcnth v24,v9"
+func_check "vclzw   v27,v31"
+func_check "vpopcntw v17,v19"
+func_check "vclzd   v12,v29"
+func_check "vpopcntd v23,v22"
+func_check "vcmpgtud. v24,v20,v29"
+func_check "vcmpgtsd. v9,v6,v27"
+func_check "lxsiwzx vs62,r14,r26"
+func_check "lxsiwzx vs40,0,r25"
+func_check "lxsiwax vs25,0,r26"
+func_check "lxsiwax vs3,0,r3"
+func_check "mfvsrd  r12,vs62"
+func_check "mffprwz r20,f12"
+func_check "stxsiwx vs14,r9,r14"
+func_check "stxsiwx vs21,0,r8"
+func_check "mtvsrd  vs48,r11"
+func_check "mtvrwa  v31,r23"
+func_check "mtfprwz f16,r26"
+func_check "lxsspx  vs13,r19,r13"
+func_check "lxsspx  vs18,0,r13"
+func_check "stxsspx vs43,r2,r4"
+func_check "stxsspx vs55,0,r11"
+func_check "xsaddsp vs54,vs48,vs25"
+func_check "xsmaddasp vs14,vs50,vs1"
+func_check "xssubsp vs26,vs22,vs42"
+func_check "xsmaddmsp vs27,vs53,vs52"
+func_check "xsrsqrtesp vs8,vs59"
+func_check "xssqrtsp vs12,vs41"
+func_check "xsmulsp vs57,vs11,vs32"
+func_check "xsmsubasp vs38,vs20,vs26"
+func_check "xsdivsp vs26,vs19,vs6"
+func_check "xsmsubmsp vs35,vs37,vs55"
+func_check "xsresp  vs59,vs8"
+func_check "xsnmaddasp vs44,vs33,vs33"
+func_check "xsnmaddmsp vs17,vs62,vs30"
+func_check "xsnmsubasp vs54,vs52,vs31"
+func_check "xsnmsubmsp vs37,vs5,vs58"
+func_check "xxlorc  vs30,vs54,vs44"
+func_check "xxlnand vs49,vs14,vs29"
+func_check "xxleqv  vs62,vs22,vs30"
+func_check "xscvdpspn vs60,vs54"
+func_check "xsrsp   vs22,vs45"
+func_check "xscvuxdsp vs26,vs59"
+func_check "xscvsxdsp vs38,vs49"
+func_check "xscvspdpn vs59,vs26"
+func_check "fmrgow  f24,f14,f2"
+func_check "fmrgew  f22,f7,f5"
+func_check "msgsnd  r14"
+func_check "msgclr  r23"
+func_check "lxvd2x  vs40,0,r5"
+func_check "lxvd2x  vs40,0,r5"
+func_check "lxvd2x  vs10,r20,r6"
+func_check "lxvd2x  vs10,r20,r6"
+func_check "stxvd2x vs41,0,r7"
+func_check "stxvd2x vs41,0,r7"
+func_check "stxvd2x vs11,r21,r8"
+func_check "stxvd2x vs11,r21,r8"
+func_check "lbarx   r20,0,r7"
+func_check "lbarx   r20,0,r7"
+func_check "lbarx   r20,0,r7,1"
+func_check "lbarx   r20,r1,r7"
+func_check "lbarx   r20,r1,r7"
+func_check "lbarx   r20,r1,r7,1"
+func_check "ldarx   r21,0,r8"
+func_check "ldarx   r21,0,r8"
+func_check "ldarx   r21,0,r8,1"
+func_check "ldarx   r21,r1,r8"
+func_check "ldarx   r21,r1,r8"
+func_check "ldarx   r21,r1,r8,1"
+func_check "lharx   r22,0,r9"
+func_check "lharx   r22,0,r9"
+func_check "lharx   r22,0,r9,1"
+func_check "lharx   r22,r1,r9"
+func_check "lharx   r22,r1,r9"
+func_check "lharx   r22,r1,r9,1"
+func_check "lwarx   r23,0,r10"
+func_check "lwarx   r23,0,r10"
+func_check "lwarx   r23,0,r10,1"
+func_check "lwarx   r23,r1,r10"
+func_check "lwarx   r23,r1,r10"
+func_check "lwarx   r23,r1,r10,1"
+func_check "stbcx.  r10,0,r7"
+func_check "stbcx.  r10,r1,r7"
+func_check "sthcx.  r11,0,r8"
+func_check "sthcx.  r11,r1,r8"
+func_check "stwcx.  r12,0,r9"
+func_check "stwcx.  r12,r1,r9"
+func_check "stdcx.  r13,0,r10"
+func_check "stdcx.  r13,r1,r10"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power8.s ./gdb/testsuite/gdb.arch/powerpc-power8.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power8.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power8.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,205 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7c05071d    /* tabort. r5                 */
+	.long  0x7ce8861d    /* tabortwc. 7,r8,r16         */
+	.long  0x7e8b565d    /* tabortdc. 20,r11,r10       */
+	.long  0x7e2a9e9d    /* tabortwci. 17,r10,-13      */
+	.long  0x7fa3dedd    /* tabortdci. 29,r3,-5        */
+	.long  0x7c00051d    /* tbegin.                    */
+	.long  0x7f80059c    /* tcheck  cr7                */
+	.long  0x7c00055d    /* tend.                      */
+	.long  0x7c00055d    /* tend.                      */
+	.long  0x7e00055d    /* tendall.                   */
+	.long  0x7e00055d    /* tendall.                   */
+	.long  0x7c18075d    /* treclaim. r24              */
+	.long  0x7c0007dd    /* trechkpt.                  */
+	.long  0x7c0005dd    /* tsuspend.                  */
+	.long  0x7c0005dd    /* tsuspend.                  */
+	.long  0x7c2005dd    /* tresume.                   */
+	.long  0x7c2005dd    /* tresume.                   */
+	.long  0x60420000    /* ori     r2,r2,0            */
+	.long  0x60000000    /* nop                        */
+	.long  0x60420000    /* ori     r2,r2,0            */
+	.long  0x4c000124    /* rfebb   0                  */
+	.long  0x4c000924    /* rfebb                      */
+	.long  0x4c000924    /* rfebb                      */
+	.long  0x4d950460    /* bctar-  12,4*cr5+gt        */
+	.long  0x4c870461    /* bctarl- 4,4*cr1+so         */
+	.long  0x4dac0460    /* bctar+  12,4*cr3+lt        */
+	.long  0x4ca20461    /* bctarl+ 4,eq               */
+	.long  0x4c880c60    /* bctar   4,4*cr2+lt,1       */
+	.long  0x4c871461    /* bctarl  4,4*cr1+so,2       */
+	.long  0x7c00003c    /* waitasec                   */
+	.long  0x7c00411c    /* msgsndp r8                 */
+	.long  0x7c200126    /* mtsle   1                  */
+	.long  0x7c00d95c    /* msgclrp r27                */
+	.long  0x7d4a616d    /* stqcx.  r10,r10,r12        */
+	.long  0x7f80396d    /* stqcx.  r28,0,r7           */
+	.long  0x7f135a28    /* lqarx   r24,r19,r11        */
+	.long  0x7ec05a28    /* lqarx   r22,0,r11          */
+	.long  0x7e80325c    /* mfbhrbe r20,6              */
+	.long  0x7fb18329    /* pbt.    r29,r17,r16        */
+	.long  0x7dc03b29    /* pbt.    r14,0,r7           */
+	.long  0x7c00035c    /* clrbhrb                    */
+	.long  0x116a05ed    /* vpermxor v11,v10,v0,v23    */
+	.long  0x1302393c    /* vaddeuqm v24,v2,v7,v4      */
+	.long  0x114a40bd    /* vaddecuq v10,v10,v8,v2     */
+	.long  0x10af44fe    /* vsubeuqm v5,v15,v8,v19     */
+	.long  0x119f877f    /* vsubecuq v12,v31,v16,v29   */
+	.long  0x129d6888    /* vmulouw v20,v29,v13        */
+	.long  0x13a0d089    /* vmuluwm v29,v0,v26         */
+	.long  0x1115e0c0    /* vaddudm v8,v21,v28         */
+	.long  0x103a08c2    /* vmaxud  v1,v26,v1          */
+	.long  0x128308c4    /* vrld    v20,v3,v1          */
+	.long  0x109358c7    /* vcmpequd v4,v19,v11        */
+	.long  0x12eef100    /* vadduqm v23,v14,v30        */
+	.long  0x11086940    /* vaddcuq v8,v8,v13          */
+	.long  0x139b2188    /* vmulosw v28,v27,v4         */
+	.long  0x106421c2    /* vmaxsd  v3,v4,v4           */
+	.long  0x1013aa88    /* vmuleuw v0,v19,v21         */
+	.long  0x13149ac2    /* vminud  v24,v20,v19        */
+	.long  0x101c7ac7    /* vcmpgtud v0,v28,v15        */
+	.long  0x12a01388    /* vmulesw v21,v0,v2          */
+	.long  0x113a4bc2    /* vminsd  v9,v26,v9          */
+	.long  0x133d5bc4    /* vsrad   v25,v29,v11        */
+	.long  0x117c5bc7    /* vcmpgtsd v11,v28,v11       */
+	.long  0x10a8d601    /* bcdadd. v5,v8,v26,1        */
+	.long  0x10836408    /* vpmsumb v4,v3,v12          */
+	.long  0x135fae41    /* bcdsub. v26,v31,v21,1      */
+	.long  0x10b18448    /* vpmsumh v5,v17,v16         */
+	.long  0x12f1a44e    /* vpkudum v23,v17,v20        */
+	.long  0x1315ec88    /* vpmsumw v24,v21,v29        */
+	.long  0x11366cc8    /* vpmsumd v9,v22,v13         */
+	.long  0x125394ce    /* vpkudus v18,v19,v18        */
+	.long  0x13d0b500    /* vsubuqm v30,v16,v22        */
+	.long  0x11cb3d08    /* vcipher v14,v11,v7         */
+	.long  0x1142b509    /* vcipherlast v10,v2,v22     */
+	.long  0x12e06d0c    /* vgbbd   v23,v13            */
+	.long  0x12198540    /* vsubcuq v16,v25,v16        */
+	.long  0x13e12d44    /* vorc    v31,v1,v5          */
+	.long  0x1091fd48    /* vncipher v4,v17,v31        */
+	.long  0x1302dd49    /* vncipherlast v24,v2,v27    */
+	.long  0x12f5bd4c    /* vbpermq v23,v21,v23        */
+	.long  0x13724d4e    /* vpksdus v27,v18,v9         */
+	.long  0x137ddd84    /* vnand   v27,v29,v27        */
+	.long  0x1273c5c4    /* vsld    v19,v19,v24        */
+	.long  0x10ad05c8    /* vsbox   v5,v13             */
+	.long  0x13233dce    /* vpksdss v25,v3,v7          */
+	.long  0x138804c7    /* vcmpequd. v28,v8,v0        */
+	.long  0x1340d64e    /* vupkhsw v26,v26            */
+	.long  0x10a73682    /* vshasigmaw v5,v7,0,6       */
+	.long  0x13957684    /* veqv    v28,v21,v14        */
+	.long  0x10289e8c    /* vmrgow  v1,v8,v19          */
+	.long  0x100a56c2    /* vshasigmad v0,v10,0,10     */
+	.long  0x10bb76c4    /* vsrd    v5,v27,v14         */
+	.long  0x11606ece    /* vupklsw v11,v13            */
+	.long  0x11c08702    /* vclzb   v14,v16            */
+	.long  0x1280df03    /* vpopcntb v20,v27           */
+	.long  0x13805f42    /* vclzh   v28,v11            */
+	.long  0x13004f43    /* vpopcnth v24,v9            */
+	.long  0x1360ff82    /* vclzw   v27,v31            */
+	.long  0x12209f83    /* vpopcntw v17,v19           */
+	.long  0x1180efc2    /* vclzd   v12,v29            */
+	.long  0x12e0b7c3    /* vpopcntd v23,v22           */
+	.long  0x1314eec7    /* vcmpgtud. v24,v20,v29      */
+	.long  0x1126dfc7    /* vcmpgtsd. v9,v6,v27        */
+	.long  0x7fced019    /* lxsiwzx vs62,r14,r26       */
+	.long  0x7d00c819    /* lxsiwzx vs40,0,r25         */
+	.long  0x7f20d098    /* lxsiwax vs25,0,r26         */
+	.long  0x7c601898    /* lxsiwax vs3,0,r3           */
+	.long  0x7fcc0067    /* mfvsrd  r12,vs62           */
+	.long  0x7d9400e6    /* mffprwz r20,f12            */
+	.long  0x7dc97118    /* stxsiwx vs14,r9,r14        */
+	.long  0x7ea04118    /* stxsiwx vs21,0,r8          */
+	.long  0x7e0b0167    /* mtvsrd  vs48,r11           */
+	.long  0x7ff701a7    /* mtvrwa  v31,r23            */
+	.long  0x7e1a01e6    /* mtfprwz f16,r26            */
+	.long  0x7db36c18    /* lxsspx  vs13,r19,r13       */
+	.long  0x7e406c18    /* lxsspx  vs18,0,r13         */
+	.long  0x7d622519    /* stxsspx vs43,r2,r4         */
+	.long  0x7ee05d19    /* stxsspx vs55,0,r11         */
+	.long  0xf2d0c805    /* xsaddsp vs54,vs48,vs25     */
+	.long  0xf1d2080c    /* xsmaddasp vs14,vs50,vs1    */
+	.long  0xf3565042    /* xssubsp vs26,vs22,vs42     */
+	.long  0xf375a04e    /* xsmaddmsp vs27,vs53,vs52   */
+	.long  0xf100d82a    /* xsrsqrtesp vs8,vs59        */
+	.long  0xf180482e    /* xssqrtsp vs12,vs41         */
+	.long  0xf32b0083    /* xsmulsp vs57,vs11,vs32     */
+	.long  0xf0d4d089    /* xsmsubasp vs38,vs20,vs26   */
+	.long  0xf35330c0    /* xsdivsp vs26,vs19,vs6      */
+	.long  0xf065b8cf    /* xsmsubmsp vs35,vs37,vs55   */
+	.long  0xf3604069    /* xsresp  vs59,vs8           */
+	.long  0xf1810c0f    /* xsnmaddasp vs44,vs33,vs33  */
+	.long  0xf23ef44c    /* xsnmaddmsp vs17,vs62,vs30  */
+	.long  0xf2d4fc8d    /* xsnmsubasp vs54,vs52,vs31  */
+	.long  0xf0a5d4cb    /* xsnmsubmsp vs37,vs5,vs58   */
+	.long  0xf3d66556    /* xxlorc  vs30,vs54,vs44     */
+	.long  0xf22eed91    /* xxlnand vs49,vs14,vs29     */
+	.long  0xf3d6f5d1    /* xxleqv  vs62,vs22,vs30     */
+	.long  0xf380b42f    /* xscvdpspn vs60,vs54        */
+	.long  0xf2c06c66    /* xsrsp   vs22,vs45          */
+	.long  0xf340dca2    /* xscvuxdsp vs26,vs59        */
+	.long  0xf0c08ce3    /* xscvsxdsp vs38,vs49        */
+	.long  0xf360d52d    /* xscvspdpn vs59,vs26        */
+	.long  0xff0e168c    /* fmrgow  f24,f14,f2         */
+	.long  0xfec72f8c    /* fmrgew  f22,f7,f5          */
+	.long  0x7c00719c    /* msgsnd  r14                */
+	.long  0x7c00b9dc    /* msgclr  r23                */
+	.long  0x7d002e99    /* lxvd2x  vs40,0,r5          */
+	.long  0x7d002e99    /* lxvd2x  vs40,0,r5          */
+	.long  0x7d543698    /* lxvd2x  vs10,r20,r6        */
+	.long  0x7d543698    /* lxvd2x  vs10,r20,r6        */
+	.long  0x7d203f99    /* stxvd2x vs41,0,r7          */
+	.long  0x7d203f99    /* stxvd2x vs41,0,r7          */
+	.long  0x7d754798    /* stxvd2x vs11,r21,r8        */
+	.long  0x7d754798    /* stxvd2x vs11,r21,r8        */
+	.long  0x7e803868    /* lbarx   r20,0,r7           */
+	.long  0x7e803868    /* lbarx   r20,0,r7           */
+	.long  0x7e803869    /* lbarx   r20,0,r7,1         */
+	.long  0x7e813868    /* lbarx   r20,r1,r7          */
+	.long  0x7e813868    /* lbarx   r20,r1,r7          */
+	.long  0x7e813869    /* lbarx   r20,r1,r7,1        */
+	.long  0x7ea040a8    /* ldarx   r21,0,r8           */
+	.long  0x7ea040a8    /* ldarx   r21,0,r8           */
+	.long  0x7ea040a9    /* ldarx   r21,0,r8,1         */
+	.long  0x7ea140a8    /* ldarx   r21,r1,r8          */
+	.long  0x7ea140a8    /* ldarx   r21,r1,r8          */
+	.long  0x7ea140a9    /* ldarx   r21,r1,r8,1        */
+	.long  0x7ec048e8    /* lharx   r22,0,r9           */
+	.long  0x7ec048e8    /* lharx   r22,0,r9           */
+	.long  0x7ec048e9    /* lharx   r22,0,r9,1         */
+	.long  0x7ec148e8    /* lharx   r22,r1,r9          */
+	.long  0x7ec148e8    /* lharx   r22,r1,r9          */
+	.long  0x7ec148e9    /* lharx   r22,r1,r9,1        */
+	.long  0x7ee05028    /* lwarx   r23,0,r10          */
+	.long  0x7ee05028    /* lwarx   r23,0,r10          */
+	.long  0x7ee05029    /* lwarx   r23,0,r10,1        */
+	.long  0x7ee15028    /* lwarx   r23,r1,r10         */
+	.long  0x7ee15028    /* lwarx   r23,r1,r10         */
+	.long  0x7ee15029    /* lwarx   r23,r1,r10,1       */
+	.long  0x7d403d6d    /* stbcx.  r10,0,r7           */
+	.long  0x7d413d6d    /* stbcx.  r10,r1,r7          */
+	.long  0x7d6045ad    /* sthcx.  r11,0,r8           */
+	.long  0x7d6145ad    /* sthcx.  r11,r1,r8          */
+	.long  0x7d80492d    /* stwcx.  r12,0,r9           */
+	.long  0x7d81492d    /* stwcx.  r12,r1,r9          */
+	.long  0x7da051ad    /* stdcx.  r13,0,r10          */
+	.long  0x7da151ad    /* stdcx.  r13,r1,r10         */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power9.exp ./gdb/testsuite/gdb.arch/powerpc-power9.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power9.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power9.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,445 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options power9"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "cnttzd  r3,r13"
+func_check "cnttzd. r4,r14"
+func_check "cnttzw  r5,r15"
+func_check "cnttzw. r6,r16"
+func_check "modsd   r10,r20,r21"
+func_check "modsw   r11,r21,r22"
+func_check "modud   r12,r22,r23"
+func_check "moduw   r13,r23,r24"
+func_check "bcdcfn. v3,v4,0"
+func_check "bcdcfn. v3,v4,1"
+func_check "bcdcfsq. v4,v5,0"
+func_check "bcdcfsq. v4,v5,1"
+func_check "bcdcfz. v5,v6,0"
+func_check "bcdcfz. v5,v6,1"
+func_check "bcdcpsgn. v6,v7,v8"
+func_check "bcdctn. v7,v8"
+func_check "bcdctsq. v8,v9"
+func_check "bcdctz. v9,v10,0"
+func_check "bcdctz. v9,v10,1"
+func_check "bcdsetsgn. v10,v11,0"
+func_check "bcdsetsgn. v10,v11,1"
+func_check "bcdsr.  v11,v12,v13,0"
+func_check "bcdsr.  v11,v12,v13,1"
+func_check "bcds.   v12,v13,v14,0"
+func_check "bcds.   v12,v13,v14,1"
+func_check "bcdtrunc. v13,v14,v15,0"
+func_check "bcdtrunc. v13,v14,v15,1"
+func_check "bcdus.  v14,v15,v16"
+func_check "bcdutrunc. v15,v16,v17"
+func_check "lxvll   vs20,0,r21"
+func_check "lxvll   vs20,r10,r21"
+func_check "stxvll  vs21,0,r11"
+func_check "stxvll  vs21,r10,r11"
+func_check "vmul10cuq v22,v23"
+func_check "vmul10ecuq v23,v24,v25"
+func_check "vmul10euq v24,v25,v26"
+func_check "vmul10uq v25,v26"
+func_check "xsaddqp v10,v11,v12"
+func_check "xsaddqpo v11,v12,v12"
+func_check "xsrqpi  0,v20,v30,0"
+func_check "xsrqpi  1,v20,v30,0"
+func_check "xsrqpi  0,v20,v30,3"
+func_check "xsrqpi  1,v20,v30,3"
+func_check "xsrqpix 0,v21,v31,0"
+func_check "xsrqpix 1,v21,v31,0"
+func_check "xsrqpix 0,v21,v31,3"
+func_check "xsrqpix 1,v21,v31,3"
+func_check "xsmulqp v12,v13,v14"
+func_check "xsmulqpo v13,v14,v15"
+func_check "xsrqpxp 0,v22,v23,0"
+func_check "xsrqpxp 1,v22,v23,0"
+func_check "xsrqpxp 0,v22,v23,3"
+func_check "xsrqpxp 1,v22,v23,3"
+func_check "xscpsgnqp v14,v15,v16"
+func_check "xscmpoqp cr0,v15,v16"
+func_check "xscmpoqp cr7,v15,v16"
+func_check "xscmpexpqp cr0,v16,v17"
+func_check "xscmpexpqp cr7,v16,v17"
+func_check "xsmaddqp v17,v18,v19"
+func_check "xsmaddqpo v18,v19,v20"
+func_check "xsmsubqp v19,v20,v21"
+func_check "xsmsubqpo v20,v21,v22"
+func_check "xsnmaddqp v21,v22,v23"
+func_check "xsnmaddqpo v22,v23,v24"
+func_check "xsnmsubqp v23,v24,v25"
+func_check "xsnmsubqpo v24,v25,v26"
+func_check "xssubqp v25,v26,v27"
+func_check "xssubqpo v26,v27,v28"
+func_check "xsdivqp v27,v28,v29"
+func_check "xsdivqpo v28,v29,v30"
+func_check "xscmpuqp cr0,v29,v30"
+func_check "xscmpuqp cr7,v29,v30"
+func_check "xststdcqp cr0,v30,0"
+func_check "xststdcqp cr7,v30,0"
+func_check "xststdcqp cr0,v31,127"
+func_check "xststdcqp cr7,v31,127"
+func_check "xsabsqp v10,v11"
+func_check "xsxexpqp v11,v12"
+func_check "xsnabsqp v12,v13"
+func_check "xsnegqp v13,v14"
+func_check "xsxsigqp v14,v15"
+func_check "xssqrtqp v15,v16"
+func_check "xssqrtqpo v16,v17"
+func_check "xscvqpuwz v17,v18"
+func_check "xscvudqp v18,v19"
+func_check "xscvqpswz v19,v20"
+func_check "xscvsdqp v20,v21"
+func_check "xscvqpudz v21,v22"
+func_check "xscvqpdp v22,v23"
+func_check "xscvqpdpo v23,v24"
+func_check "xscvdpqp v24,v25"
+func_check "xscvqpsdz v25,v26"
+func_check "xsiexpqp v26,v27,v28"
+func_check "vpermr  v4,v5,v6,v7"
+func_check "vextractub v5,v6,0"
+func_check "vextractub v5,v6,15"
+func_check "vextractuh v6,v7,0"
+func_check "vextractuh v6,v7,15"
+func_check "vextractuw v7,v8,0"
+func_check "vextractuw v7,v8,15"
+func_check "vextractd v8,v9,0"
+func_check "vextractd v8,v9,15"
+func_check "vinsertb v9,v10,0"
+func_check "vinsertb v9,v10,15"
+func_check "vinserth v10,v11,0"
+func_check "vinserth v10,v11,15"
+func_check "vinsertw v11,v12,0"
+func_check "vinsertw v11,v12,15"
+func_check "vinsertd v12,v13,0"
+func_check "vinsertd v12,v13,15"
+func_check "mfvsrld r20,vs45"
+func_check "mtvsrws vs46,r21"
+func_check "mtvsrdd vs47,0,r23"
+func_check "mtvsrdd vs47,r22,r23"
+func_check "lxvx    vs50,0,r11"
+func_check "lxvx    vs0,r10,r11"
+func_check "lxvwsx  vs51,0,r12"
+func_check "lxvwsx  vs1,r10,r12"
+func_check "lxvh8x  vs52,0,r13"
+func_check "lxvh8x  vs2,r10,r13"
+func_check "lxvb16x vs53,0,r14"
+func_check "lxvb16x vs3,r10,r14"
+func_check "stxvx   vs54,0,r15"
+func_check "stxvx   vs4,r20,r15"
+func_check "stxvh8x vs55,0,r16"
+func_check "stxvh8x vs5,r20,r16"
+func_check "stxvb16x vs56,0,r17"
+func_check "stxvb16x vs6,r20,r17"
+func_check "xxextractuw vs4,vs5,0"
+func_check "xxextractuw vs40,vs50,15"
+func_check "xxspltib vs4,0"
+func_check "xxspltib vs4,128"
+func_check "xxspltib vs41,255"
+func_check "xxspltib vs41,255"
+func_check "xxinsertw vs5,vs6,0"
+func_check "xxinsertw vs50,vs60,15"
+func_check "xxbrh   vs6,vs7"
+func_check "xxbrh   vs56,vs57"
+func_check "xxbrw   vs7,vs8"
+func_check "xxbrw   vs57,vs58"
+func_check "xxbrd   vs8,vs9"
+func_check "xxbrd   vs58,vs59"
+func_check "xxbrq   vs9,vs10"
+func_check "xxbrq   vs59,vs60"
+func_check "lxsd    v20,0(0)"
+func_check "lxsd    v20,0(r10)"
+func_check "lxsd    v20,8(0)"
+func_check "lxsd    v20,8(r10)"
+func_check "lxsd    v20,-8(0)"
+func_check "lxsd    v20,-8(r10)"
+func_check "lxsd    v20,32764(0)"
+func_check "lxsd    v20,32764(r10)"
+func_check "lxsd    v20,-32768(0)"
+func_check "lxsd    v20,-32768(r10)"
+func_check "lxssp   v30,0(0)"
+func_check "lxssp   v30,0(r11)"
+func_check "lxssp   v30,8(0)"
+func_check "lxssp   v30,8(r11)"
+func_check "lxssp   v30,-8(0)"
+func_check "lxssp   v30,-8(r11)"
+func_check "lxssp   v30,32764(0)"
+func_check "lxssp   v30,32764(r11)"
+func_check "lxssp   v30,-32768(0)"
+func_check "lxssp   v30,-32768(r11)"
+func_check "lxv     vs40,0(0)"
+func_check "lxv     vs40,0(r12)"
+func_check "lxv     vs40,16(0)"
+func_check "lxv     vs40,16(r12)"
+func_check "lxv     vs40,-16(0)"
+func_check "lxv     vs10,-16(r12)"
+func_check "lxv     vs10,32752(0)"
+func_check "lxv     vs10,32752(r12)"
+func_check "lxv     vs10,-32768(0)"
+func_check "lxv     vs10,-32768(r12)"
+func_check "stxsd   v21,0(0)"
+func_check "stxsd   v21,0(r10)"
+func_check "stxsd   v21,8(0)"
+func_check "stxsd   v21,8(r10)"
+func_check "stxsd   v21,-8(0)"
+func_check "stxsd   v21,-8(r10)"
+func_check "stxsd   v21,32764(0)"
+func_check "stxsd   v21,32764(r10)"
+func_check "stxsd   v21,-32768(0)"
+func_check "stxsd   v21,-32768(r10)"
+func_check "stxssp  v31,0(0)"
+func_check "stxssp  v31,0(r11)"
+func_check "stxssp  v31,8(0)"
+func_check "stxssp  v31,8(r11)"
+func_check "stxssp  v31,-8(0)"
+func_check "stxssp  v31,-8(r11)"
+func_check "stxssp  v31,32764(0)"
+func_check "stxssp  v31,32764(r11)"
+func_check "stxssp  v31,-32768(0)"
+func_check "stxssp  v31,-32768(r11)"
+func_check "stxv    vs41,0(0)"
+func_check "stxv    vs41,0(r12)"
+func_check "stxv    vs41,16(0)"
+func_check "stxv    vs41,16(r12)"
+func_check "stxv    vs41,-16(0)"
+func_check "stxv    vs11,-16(r12)"
+func_check "stxv    vs11,32752(0)"
+func_check "stxv    vs11,32752(r12)"
+func_check "stxv    vs11,-32768(0)"
+func_check "stxv    vs11,-32768(r12)"
+func_check "xxperm  vs20,vs22,vs24"
+func_check "xxperm  vs40,vs42,vs44"
+func_check "xxpermr vs21,vs23,vs25"
+func_check "xxpermr vs41,vs43,vs45"
+func_check "extswsli r12,r20,0"
+func_check "extswsli r12,r20,1"
+func_check "extswsli r12,r20,63"
+func_check "extswsli. r13,r21,0"
+func_check "extswsli. r13,r21,1"
+func_check "extswsli. r13,r21,63"
+func_check "vrlwmi  v14,v22,v23"
+func_check "vrldmi  v15,v23,v24"
+func_check "vrlwnm  v16,v24,v25"
+func_check "vrldnm  v17,v25,v26"
+func_check "vbpermd v18,v26,v27"
+func_check "vnegw   v19,v20"
+func_check "vnegd   v20,v21"
+func_check "vprtybw v21,v22"
+func_check "vprtybd v22,v23"
+func_check "vprtybq v23,v24"
+func_check "vextsb2w v24,v25"
+func_check "vextsh2w v25,v26"
+func_check "vextsb2d v26,v27"
+func_check "vextsh2d v27,v28"
+func_check "vextsw2d v28,v29"
+func_check "vctzb   v29,v30"
+func_check "vctzh   v30,v31"
+func_check "vctzw   v31,v30"
+func_check "vctzd   v30,v29"
+func_check "lxsibzx vs10,0,r20"
+func_check "lxsibzx vs50,r10,r20"
+func_check "lxsihzx vs11,0,r21"
+func_check "lxsihzx vs51,r11,r21"
+func_check "stxsibx vs12,0,r22"
+func_check "stxsibx vs52,r12,r22"
+func_check "stxsihx vs13,0,r23"
+func_check "stxsihx vs53,r13,r23"
+func_check "maddhd  r10,r11,r12,r13"
+func_check "maddhdu r20,r21,r22,r23"
+func_check "maddld  r2,r3,r4,r5"
+func_check "xscmpexpdp cr0,vs10,vs20"
+func_check "xscmpexpdp cr7,vs40,vs50"
+func_check "xsiexpdp vs41,r11,r21"
+func_check "xststdcdp cr0,vs11,127"
+func_check "xststdcdp cr7,vs41,127"
+func_check "xststdcsp cr0,vs11,127"
+func_check "xststdcsp cr7,vs41,127"
+func_check "xsxexpdp r13,vs43"
+func_check "xsxsigdp r14,vs44"
+func_check "xviexpdp vs45,vs46,vs47"
+func_check "xviexpsp vs46,vs47,vs48"
+func_check "xvtstdcdp vs54,vs55,0"
+func_check "xvtstdcdp vs54,vs55,127"
+func_check "xvtstdcsp vs55,vs56,0"
+func_check "xvtstdcsp vs55,vs56,127"
+func_check "xvxexpdp vs57,vs58"
+func_check "xvxexpsp vs58,vs59"
+func_check "xvxsigdp vs59,vs60"
+func_check "xvxsigsp vs60,vs61"
+func_check "cmpeqb  cr0,r6,r7"
+func_check "cmpeqb  cr7,r6,r7"
+func_check "cmprb   cr0,0,r8,r9"
+func_check "cmprb   cr7,0,r8,r9"
+func_check "cmprb   cr0,1,r8,r9"
+func_check "cmprb   cr7,1,r8,r9"
+func_check "setb    r15,cr0"
+func_check "setb    r15,cr7"
+func_check "lxvl    vs26,0,r10"
+func_check "lxvl    vs56,r20,r10"
+func_check "stxvl   vs27,0,r11"
+func_check "stxvl   vs57,r21,r11"
+func_check "vclzlsbb r20,v30"
+func_check "vctzlsbb r21,v31"
+func_check "vcmpneb v10,v11,v12"
+func_check "vcmpneb. v20,v21,v22"
+func_check "vcmpneh v11,v12,v13"
+func_check "vcmpneh. v21,v22,v23"
+func_check "vcmpnew v12,v13,v14"
+func_check "vcmpnew. v22,v23,v24"
+func_check "vcmpnezb v13,v14,v15"
+func_check "vcmpnezb. v23,v24,v25"
+func_check "vcmpnezh v14,v15,v16"
+func_check "vcmpnezh. v24,v25,v26"
+func_check "vcmpnezw v15,v16,v17"
+func_check "vcmpnezw. v25,v26,v27"
+func_check "vextublx r16,r17,v10"
+func_check "vextubrx r17,r18,v11"
+func_check "vextuhlx r18,r19,v12"
+func_check "vextuhrx r19,r20,v13"
+func_check "vextuwlx r20,r21,v14"
+func_check "vextuwrx r21,r22,v15"
+func_check "dtstsfi cr0,0,f3"
+func_check "dtstsfi cr7,63,f3"
+func_check "dtstsfiq cr0,0,f4"
+func_check "dtstsfiq cr7,63,f4"
+func_check "xscvhpdp vs40,vs50"
+func_check "xscvdphp vs41,vs51"
+func_check "xvcvhpsp vs42,vs52"
+func_check "xvcvsphp vs43,vs53"
+func_check "addpcis r3,0"
+func_check "addpcis r3,0"
+func_check "addpcis r4,1"
+func_check "addpcis r4,1"
+func_check "addpcis r5,-2"
+func_check "addpcis r5,-2"
+func_check "addpcis r6,32767"
+func_check "addpcis r6,32767"
+func_check "addpcis r7,-32768"
+func_check "addpcis r7,-32768"
+func_check "slbsync"
+func_check "slbiag  r10"
+func_check "slbieg  r10,r11"
+func_check "slbmfee r3,r4"
+func_check "slbmfee r3,r4"
+func_check "slbmfee r3,r4,1"
+func_check "slbmfev r4,r5"
+func_check "slbmfev r4,r5"
+func_check "slbmfev r4,r5,1"
+func_check "tlbie   r3,r4"
+func_check "tlbie   r3,r4"
+func_check "tlbie   r3,r4,3,1,1"
+func_check "tlbiel  r3"
+func_check "tlbiel  r3"
+func_check "tlbiel  r3,r4,3,1,1"
+func_check "copy    r12,r13"
+func_check "paste.  r10,r11"
+func_check "cpabort"
+func_check "hwsync"
+func_check "hwsync"
+func_check "hwsync"
+func_check "lwsync"
+func_check "lwsync"
+func_check "ptesync"
+func_check "ptesync"
+func_check "ldat    r20,0,0"
+func_check "ldat    r20,r10,28"
+func_check "lwat    r21,0,0"
+func_check "lwat    r21,r11,28"
+func_check "stdat   r22,0,0"
+func_check "stdat   r22,r12,28"
+func_check "stwat   r23,0,0"
+func_check "stwat   r23,r13,28"
+func_check "urfid"
+func_check "rmieg   r30"
+func_check "ldmx    r10,0,r15"
+func_check "ldmx    r10,r3,r15"
+func_check "stop"
+func_check "wait    "
+func_check "wait    "
+func_check "darn    r3,0"
+func_check "darn    r3,1"
+func_check "darn    r3,2"
+func_check "mcrxrx  cr0"
+func_check "mcrxrx  cr7"
+func_check "vslv    v20,v21,v22"
+func_check "vsrv    v23,v24,v25"
+func_check "msgsync"
+func_check "xscmpeqdp vs30,vs40,vs50"
+func_check "xscmpgtdp vs31,vs41,vs51"
+func_check "xscmpgedp vs32,vs42,vs52"
+func_check "xsmincdp vs34,vs44,vs54"
+func_check "xsmaxcdp vs35,vs45,vs55"
+func_check "xsminjdp vs36,vs46,vs56"
+func_check "xsmaxjdp vs37,vs47,vs57"
+func_check "vmsumudm v20,v21,v22,v23"
+func_check "addex   r11,r12,r13,0"
+func_check "addex   r11,r12,r13,1"
+func_check "addex   r11,r12,r13,2"
+func_check "mffs    f25"
+func_check "mffs.   f25"
+func_check "mffsce  f26"
+func_check "mffscdrn f27,f20"
+func_check "mffscdrni f28,0"
+func_check "mffscdrni f28,7"
+func_check "mffscrn f29,f21"
+func_check "mffscrni f30,0"
+func_check "mffscrni f30,3"
+func_check "mffsl   f31"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power9.s ./gdb/testsuite/gdb.arch/powerpc-power9.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power9.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power9.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,402 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7da30474    /* cnttzd  r3,r13             */
+	.long  0x7dc40475    /* cnttzd. r4,r14             */
+	.long  0x7de50434    /* cnttzw  r5,r15             */
+	.long  0x7e060435    /* cnttzw. r6,r16             */
+	.long  0x7d54ae12    /* modsd   r10,r20,r21        */
+	.long  0x7d75b616    /* modsw   r11,r21,r22        */
+	.long  0x7d96ba12    /* modud   r12,r22,r23        */
+	.long  0x7db7c216    /* moduw   r13,r23,r24        */
+	.long  0x10672581    /* bcdcfn. v3,v4,0            */
+	.long  0x10672781    /* bcdcfn. v3,v4,1            */
+	.long  0x10822d81    /* bcdcfsq. v4,v5,0           */
+	.long  0x10822f81    /* bcdcfsq. v4,v5,1           */
+	.long  0x10a63581    /* bcdcfz. v5,v6,0            */
+	.long  0x10a63781    /* bcdcfz. v5,v6,1            */
+	.long  0x10c74341    /* bcdcpsgn. v6,v7,v8         */
+	.long  0x10e54581    /* bcdctn. v7,v8              */
+	.long  0x11004d81    /* bcdctsq. v8,v9             */
+	.long  0x11245581    /* bcdctz. v9,v10,0           */
+	.long  0x11245781    /* bcdctz. v9,v10,1           */
+	.long  0x115f5d81    /* bcdsetsgn. v10,v11,0       */
+	.long  0x115f5f81    /* bcdsetsgn. v10,v11,1       */
+	.long  0x116c6dc1    /* bcdsr.  v11,v12,v13,0      */
+	.long  0x116c6fc1    /* bcdsr.  v11,v12,v13,1      */
+	.long  0x118d74c1    /* bcds.   v12,v13,v14,0      */
+	.long  0x118d76c1    /* bcds.   v12,v13,v14,1      */
+	.long  0x11ae7d01    /* bcdtrunc. v13,v14,v15,0    */
+	.long  0x11ae7f01    /* bcdtrunc. v13,v14,v15,1    */
+	.long  0x11cf8481    /* bcdus.  v14,v15,v16        */
+	.long  0x11f08d41    /* bcdutrunc. v15,v16,v17     */
+	.long  0x7e80aa5a    /* lxvll   vs20,0,r21         */
+	.long  0x7e8aaa5a    /* lxvll   vs20,r10,r21       */
+	.long  0x7ea05b5a    /* stxvll  vs21,0,r11         */
+	.long  0x7eaa5b5a    /* stxvll  vs21,r10,r11       */
+	.long  0x12d70001    /* vmul10cuq v22,v23          */
+	.long  0x12f8c841    /* vmul10ecuq v23,v24,v25     */
+	.long  0x1319d241    /* vmul10euq v24,v25,v26      */
+	.long  0x133a0201    /* vmul10uq v25,v26           */
+	.long  0xfd4b6008    /* xsaddqp v10,v11,v12        */
+	.long  0xfd6c6009    /* xsaddqpo v11,v12,v12       */
+	.long  0xfe80f00a    /* xsrqpi  0,v20,v30,0        */
+	.long  0xfe81f00a    /* xsrqpi  1,v20,v30,0        */
+	.long  0xfe80f60a    /* xsrqpi  0,v20,v30,3        */
+	.long  0xfe81f60a    /* xsrqpi  1,v20,v30,3        */
+	.long  0xfea0f80b    /* xsrqpix 0,v21,v31,0        */
+	.long  0xfea1f80b    /* xsrqpix 1,v21,v31,0        */
+	.long  0xfea0fe0b    /* xsrqpix 0,v21,v31,3        */
+	.long  0xfea1fe0b    /* xsrqpix 1,v21,v31,3        */
+	.long  0xfd8d7048    /* xsmulqp v12,v13,v14        */
+	.long  0xfdae7849    /* xsmulqpo v13,v14,v15       */
+	.long  0xfec0b84a    /* xsrqpxp 0,v22,v23,0        */
+	.long  0xfec1b84a    /* xsrqpxp 1,v22,v23,0        */
+	.long  0xfec0be4a    /* xsrqpxp 0,v22,v23,3        */
+	.long  0xfec1be4a    /* xsrqpxp 1,v22,v23,3        */
+	.long  0xfdcf80c8    /* xscpsgnqp v14,v15,v16      */
+	.long  0xfc0f8108    /* xscmpoqp cr0,v15,v16       */
+	.long  0xff8f8108    /* xscmpoqp cr7,v15,v16       */
+	.long  0xfc108948    /* xscmpexpqp cr0,v16,v17     */
+	.long  0xff908948    /* xscmpexpqp cr7,v16,v17     */
+	.long  0xfe329b08    /* xsmaddqp v17,v18,v19       */
+	.long  0xfe53a309    /* xsmaddqpo v18,v19,v20      */
+	.long  0xfe74ab48    /* xsmsubqp v19,v20,v21       */
+	.long  0xfe95b349    /* xsmsubqpo v20,v21,v22      */
+	.long  0xfeb6bb88    /* xsnmaddqp v21,v22,v23      */
+	.long  0xfed7c389    /* xsnmaddqpo v22,v23,v24     */
+	.long  0xfef8cbc8    /* xsnmsubqp v23,v24,v25      */
+	.long  0xff19d3c9    /* xsnmsubqpo v24,v25,v26     */
+	.long  0xff3adc08    /* xssubqp v25,v26,v27        */
+	.long  0xff5be409    /* xssubqpo v26,v27,v28       */
+	.long  0xff7cec48    /* xsdivqp v27,v28,v29        */
+	.long  0xff9df449    /* xsdivqpo v28,v29,v30       */
+	.long  0xfc1df508    /* xscmpuqp cr0,v29,v30       */
+	.long  0xff9df508    /* xscmpuqp cr7,v29,v30       */
+	.long  0xfc00f588    /* xststdcqp cr0,v30,0        */
+	.long  0xff80f588    /* xststdcqp cr7,v30,0        */
+	.long  0xfc7ffd88    /* xststdcqp cr0,v31,127      */
+	.long  0xfffffd88    /* xststdcqp cr7,v31,127      */
+	.long  0xfd405e48    /* xsabsqp v10,v11            */
+	.long  0xfd626648    /* xsxexpqp v11,v12           */
+	.long  0xfd886e48    /* xsnabsqp v12,v13           */
+	.long  0xfdb07648    /* xsnegqp v13,v14            */
+	.long  0xfdd27e48    /* xsxsigqp v14,v15           */
+	.long  0xfdfb8648    /* xssqrtqp v15,v16           */
+	.long  0xfe1b8e49    /* xssqrtqpo v16,v17          */
+	.long  0xfe219688    /* xscvqpuwz v17,v18          */
+	.long  0xfe429e88    /* xscvudqp v18,v19           */
+	.long  0xfe69a688    /* xscvqpswz v19,v20          */
+	.long  0xfe8aae88    /* xscvsdqp v20,v21           */
+	.long  0xfeb1b688    /* xscvqpudz v21,v22          */
+	.long  0xfed4be88    /* xscvqpdp v22,v23           */
+	.long  0xfef4c689    /* xscvqpdpo v23,v24          */
+	.long  0xff16ce88    /* xscvdpqp v24,v25           */
+	.long  0xff39d688    /* xscvqpsdz v25,v26          */
+	.long  0xff5be6c8    /* xsiexpqp v26,v27,v28       */
+	.long  0x108531fb    /* vpermr  v4,v5,v6,v7        */
+	.long  0x10a0320d    /* vextractub v5,v6,0         */
+	.long  0x10af320d    /* vextractub v5,v6,15        */
+	.long  0x10c03a4d    /* vextractuh v6,v7,0         */
+	.long  0x10cf3a4d    /* vextractuh v6,v7,15        */
+	.long  0x10e0428d    /* vextractuw v7,v8,0         */
+	.long  0x10ef428d    /* vextractuw v7,v8,15        */
+	.long  0x11004acd    /* vextractd v8,v9,0          */
+	.long  0x110f4acd    /* vextractd v8,v9,15         */
+	.long  0x1120530d    /* vinsertb v9,v10,0          */
+	.long  0x112f530d    /* vinsertb v9,v10,15         */
+	.long  0x11405b4d    /* vinserth v10,v11,0         */
+	.long  0x114f5b4d    /* vinserth v10,v11,15        */
+	.long  0x1160638d    /* vinsertw v11,v12,0         */
+	.long  0x116f638d    /* vinsertw v11,v12,15        */
+	.long  0x11806bcd    /* vinsertd v12,v13,0         */
+	.long  0x118f6bcd    /* vinsertd v12,v13,15        */
+	.long  0x7db40267    /* mfvsrld r20,vs45           */
+	.long  0x7dd50327    /* mtvsrws vs46,r21           */
+	.long  0x7de0bb67    /* mtvsrdd vs47,0,r23         */
+	.long  0x7df6bb67    /* mtvsrdd vs47,r22,r23       */
+	.long  0x7e405a19    /* lxvx    vs50,0,r11         */
+	.long  0x7c0a5a18    /* lxvx    vs0,r10,r11        */
+	.long  0x7e6062d9    /* lxvwsx  vs51,0,r12         */
+	.long  0x7c2a62d8    /* lxvwsx  vs1,r10,r12        */
+	.long  0x7e806e59    /* lxvh8x  vs52,0,r13         */
+	.long  0x7c4a6e58    /* lxvh8x  vs2,r10,r13        */
+	.long  0x7ea076d9    /* lxvb16x vs53,0,r14         */
+	.long  0x7c6a76d8    /* lxvb16x vs3,r10,r14        */
+	.long  0x7ec07b19    /* stxvx   vs54,0,r15         */
+	.long  0x7c947b18    /* stxvx   vs4,r20,r15        */
+	.long  0x7ee08759    /* stxvh8x vs55,0,r16         */
+	.long  0x7cb48758    /* stxvh8x vs5,r20,r16        */
+	.long  0x7f008fd9    /* stxvb16x vs56,0,r17        */
+	.long  0x7cd48fd8    /* stxvb16x vs6,r20,r17       */
+	.long  0xf0802a94    /* xxextractuw vs4,vs5,0      */
+	.long  0xf10f9297    /* xxextractuw vs40,vs50,15   */
+	.long  0xf08002d0    /* xxspltib vs4,0             */
+	.long  0xf08402d0    /* xxspltib vs4,128           */
+	.long  0xf127fad1    /* xxspltib vs41,255          */
+	.long  0xf127fad1    /* xxspltib vs41,255          */
+	.long  0xf0a032d4    /* xxinsertw vs5,vs6,0        */
+	.long  0xf24fe2d7    /* xxinsertw vs50,vs60,15     */
+	.long  0xf0c73f6c    /* xxbrh   vs6,vs7            */
+	.long  0xf307cf6f    /* xxbrh   vs56,vs57          */
+	.long  0xf0ef476c    /* xxbrw   vs7,vs8            */
+	.long  0xf32fd76f    /* xxbrw   vs57,vs58          */
+	.long  0xf1174f6c    /* xxbrd   vs8,vs9            */
+	.long  0xf357df6f    /* xxbrd   vs58,vs59          */
+	.long  0xf13f576c    /* xxbrq   vs9,vs10           */
+	.long  0xf37fe76f    /* xxbrq   vs59,vs60          */
+	.long  0xe6800002    /* lxsd    v20,0(0)           */
+	.long  0xe68a0002    /* lxsd    v20,0(r10)         */
+	.long  0xe680000a    /* lxsd    v20,8(0)           */
+	.long  0xe68a000a    /* lxsd    v20,8(r10)         */
+	.long  0xe680fffa    /* lxsd    v20,-8(0)          */
+	.long  0xe68afffa    /* lxsd    v20,-8(r10)        */
+	.long  0xe6807ffe    /* lxsd    v20,32764(0)       */
+	.long  0xe68a7ffe    /* lxsd    v20,32764(r10)     */
+	.long  0xe6808002    /* lxsd    v20,-32768(0)      */
+	.long  0xe68a8002    /* lxsd    v20,-32768(r10)    */
+	.long  0xe7c00003    /* lxssp   v30,0(0)           */
+	.long  0xe7cb0003    /* lxssp   v30,0(r11)         */
+	.long  0xe7c0000b    /* lxssp   v30,8(0)           */
+	.long  0xe7cb000b    /* lxssp   v30,8(r11)         */
+	.long  0xe7c0fffb    /* lxssp   v30,-8(0)          */
+	.long  0xe7cbfffb    /* lxssp   v30,-8(r11)        */
+	.long  0xe7c07fff    /* lxssp   v30,32764(0)       */
+	.long  0xe7cb7fff    /* lxssp   v30,32764(r11)     */
+	.long  0xe7c08003    /* lxssp   v30,-32768(0)      */
+	.long  0xe7cb8003    /* lxssp   v30,-32768(r11)    */
+	.long  0xf5000009    /* lxv     vs40,0(0)          */
+	.long  0xf50c0009    /* lxv     vs40,0(r12)        */
+	.long  0xf5000019    /* lxv     vs40,16(0)         */
+	.long  0xf50c0019    /* lxv     vs40,16(r12)       */
+	.long  0xf500fff9    /* lxv     vs40,-16(0)        */
+	.long  0xf54cfff1    /* lxv     vs10,-16(r12)      */
+	.long  0xf5407ff1    /* lxv     vs10,32752(0)      */
+	.long  0xf54c7ff1    /* lxv     vs10,32752(r12)    */
+	.long  0xf5408001    /* lxv     vs10,-32768(0)     */
+	.long  0xf54c8001    /* lxv     vs10,-32768(r12)   */
+	.long  0xf6a00002    /* stxsd   v21,0(0)           */
+	.long  0xf6aa0002    /* stxsd   v21,0(r10)         */
+	.long  0xf6a0000a    /* stxsd   v21,8(0)           */
+	.long  0xf6aa000a    /* stxsd   v21,8(r10)         */
+	.long  0xf6a0fffa    /* stxsd   v21,-8(0)          */
+	.long  0xf6aafffa    /* stxsd   v21,-8(r10)        */
+	.long  0xf6a07ffe    /* stxsd   v21,32764(0)       */
+	.long  0xf6aa7ffe    /* stxsd   v21,32764(r10)     */
+	.long  0xf6a08002    /* stxsd   v21,-32768(0)      */
+	.long  0xf6aa8002    /* stxsd   v21,-32768(r10)    */
+	.long  0xf7e00003    /* stxssp  v31,0(0)           */
+	.long  0xf7eb0003    /* stxssp  v31,0(r11)         */
+	.long  0xf7e0000b    /* stxssp  v31,8(0)           */
+	.long  0xf7eb000b    /* stxssp  v31,8(r11)         */
+	.long  0xf7e0fffb    /* stxssp  v31,-8(0)          */
+	.long  0xf7ebfffb    /* stxssp  v31,-8(r11)        */
+	.long  0xf7e07fff    /* stxssp  v31,32764(0)       */
+	.long  0xf7eb7fff    /* stxssp  v31,32764(r11)     */
+	.long  0xf7e08003    /* stxssp  v31,-32768(0)      */
+	.long  0xf7eb8003    /* stxssp  v31,-32768(r11)    */
+	.long  0xf520000d    /* stxv    vs41,0(0)          */
+	.long  0xf52c000d    /* stxv    vs41,0(r12)        */
+	.long  0xf520001d    /* stxv    vs41,16(0)         */
+	.long  0xf52c001d    /* stxv    vs41,16(r12)       */
+	.long  0xf520fffd    /* stxv    vs41,-16(0)        */
+	.long  0xf56cfff5    /* stxv    vs11,-16(r12)      */
+	.long  0xf5607ff5    /* stxv    vs11,32752(0)      */
+	.long  0xf56c7ff5    /* stxv    vs11,32752(r12)    */
+	.long  0xf5608005    /* stxv    vs11,-32768(0)     */
+	.long  0xf56c8005    /* stxv    vs11,-32768(r12)   */
+	.long  0xf296c0d0    /* xxperm  vs20,vs22,vs24     */
+	.long  0xf10a60d7    /* xxperm  vs40,vs42,vs44     */
+	.long  0xf2b7c9d0    /* xxpermr vs21,vs23,vs25     */
+	.long  0xf12b69d7    /* xxpermr vs41,vs43,vs45     */
+	.long  0x7e8c06f4    /* extswsli r12,r20,0         */
+	.long  0x7e8c0ef4    /* extswsli r12,r20,1         */
+	.long  0x7e8cfef6    /* extswsli r12,r20,63        */
+	.long  0x7ead06f5    /* extswsli. r13,r21,0        */
+	.long  0x7ead0ef5    /* extswsli. r13,r21,1        */
+	.long  0x7eadfef7    /* extswsli. r13,r21,63       */
+	.long  0x11d6b885    /* vrlwmi  v14,v22,v23        */
+	.long  0x11f7c0c5    /* vrldmi  v15,v23,v24        */
+	.long  0x1218c985    /* vrlwnm  v16,v24,v25        */
+	.long  0x1239d1c5    /* vrldnm  v17,v25,v26        */
+	.long  0x125addcc    /* vbpermd v18,v26,v27        */
+	.long  0x1266a602    /* vnegw   v19,v20            */
+	.long  0x1287ae02    /* vnegd   v20,v21            */
+	.long  0x12a8b602    /* vprtybw v21,v22            */
+	.long  0x12c9be02    /* vprtybd v22,v23            */
+	.long  0x12eac602    /* vprtybq v23,v24            */
+	.long  0x1310ce02    /* vextsb2w v24,v25           */
+	.long  0x1331d602    /* vextsh2w v25,v26           */
+	.long  0x1358de02    /* vextsb2d v26,v27           */
+	.long  0x1379e602    /* vextsh2d v27,v28           */
+	.long  0x139aee02    /* vextsw2d v28,v29           */
+	.long  0x13bcf602    /* vctzb   v29,v30            */
+	.long  0x13ddfe02    /* vctzh   v30,v31            */
+	.long  0x13fef602    /* vctzw   v31,v30            */
+	.long  0x13dfee02    /* vctzd   v30,v29            */
+	.long  0x7d40a61a    /* lxsibzx vs10,0,r20         */
+	.long  0x7e4aa61b    /* lxsibzx vs50,r10,r20       */
+	.long  0x7d60ae5a    /* lxsihzx vs11,0,r21         */
+	.long  0x7e6bae5b    /* lxsihzx vs51,r11,r21       */
+	.long  0x7d80b71a    /* stxsibx vs12,0,r22         */
+	.long  0x7e8cb71b    /* stxsibx vs52,r12,r22       */
+	.long  0x7da0bf5a    /* stxsihx vs13,0,r23         */
+	.long  0x7eadbf5b    /* stxsihx vs53,r13,r23       */
+	.long  0x114b6370    /* maddhd  r10,r11,r12,r13    */
+	.long  0x1295b5f1    /* maddhdu r20,r21,r22,r23    */
+	.long  0x10432173    /* maddld  r2,r3,r4,r5        */
+	.long  0xf00aa1d8    /* xscmpexpdp cr0,vs10,vs20   */
+	.long  0xf38891de    /* xscmpexpdp cr7,vs40,vs50   */
+	.long  0xf12baf2d    /* xsiexpdp vs41,r11,r21      */
+	.long  0xf07f5da8    /* xststdcdp cr0,vs11,127     */
+	.long  0xf3ff4daa    /* xststdcdp cr7,vs41,127     */
+	.long  0xf07f5ca8    /* xststdcsp cr0,vs11,127     */
+	.long  0xf3ff4caa    /* xststdcsp cr7,vs41,127     */
+	.long  0xf1a05d6e    /* xsxexpdp r13,vs43          */
+	.long  0xf1c1656e    /* xsxsigdp r14,vs44          */
+	.long  0xf1ae7fc7    /* xviexpdp vs45,vs46,vs47    */
+	.long  0xf1cf86c7    /* xviexpsp vs46,vs47,vs48    */
+	.long  0xf2c0bfab    /* xvtstdcdp vs54,vs55,0      */
+	.long  0xf2dfbfef    /* xvtstdcdp vs54,vs55,127    */
+	.long  0xf2e0c6ab    /* xvtstdcsp vs55,vs56,0      */
+	.long  0xf2ffc6ef    /* xvtstdcsp vs55,vs56,127    */
+	.long  0xf320d76f    /* xvxexpdp vs57,vs58         */
+	.long  0xf348df6f    /* xvxexpsp vs58,vs59         */
+	.long  0xf361e76f    /* xvxsigdp vs59,vs60         */
+	.long  0xf389ef6f    /* xvxsigsp vs60,vs61         */
+	.long  0x7c0639c0    /* cmpeqb  cr0,r6,r7          */
+	.long  0x7f8639c0    /* cmpeqb  cr7,r6,r7          */
+	.long  0x7c084980    /* cmprb   cr0,0,r8,r9        */
+	.long  0x7f884980    /* cmprb   cr7,0,r8,r9        */
+	.long  0x7c284980    /* cmprb   cr0,1,r8,r9        */
+	.long  0x7fa84980    /* cmprb   cr7,1,r8,r9        */
+	.long  0x7de00100    /* setb    r15,cr0            */
+	.long  0x7dfc0100    /* setb    r15,cr7            */
+	.long  0x7f40521a    /* lxvl    vs26,0,r10         */
+	.long  0x7f14521b    /* lxvl    vs56,r20,r10       */
+	.long  0x7f605b1a    /* stxvl   vs27,0,r11         */
+	.long  0x7f355b1b    /* stxvl   vs57,r21,r11       */
+	.long  0x1280f602    /* vclzlsbb r20,v30           */
+	.long  0x12a1fe02    /* vctzlsbb r21,v31           */
+	.long  0x114b6007    /* vcmpneb v10,v11,v12        */
+	.long  0x1295b407    /* vcmpneb. v20,v21,v22       */
+	.long  0x116c6847    /* vcmpneh v11,v12,v13        */
+	.long  0x12b6bc47    /* vcmpneh. v21,v22,v23       */
+	.long  0x118d7087    /* vcmpnew v12,v13,v14        */
+	.long  0x12d7c487    /* vcmpnew. v22,v23,v24       */
+	.long  0x11ae7907    /* vcmpnezb v13,v14,v15       */
+	.long  0x12f8cd07    /* vcmpnezb. v23,v24,v25      */
+	.long  0x11cf8147    /* vcmpnezh v14,v15,v16       */
+	.long  0x1319d547    /* vcmpnezh. v24,v25,v26      */
+	.long  0x11f08987    /* vcmpnezw v15,v16,v17       */
+	.long  0x133add87    /* vcmpnezw. v25,v26,v27      */
+	.long  0x1211560d    /* vextublx r16,r17,v10       */
+	.long  0x12325f0d    /* vextubrx r17,r18,v11       */
+	.long  0x1253664d    /* vextuhlx r18,r19,v12       */
+	.long  0x12746f4d    /* vextuhrx r19,r20,v13       */
+	.long  0x1295768d    /* vextuwlx r20,r21,v14       */
+	.long  0x12b67f8d    /* vextuwrx r21,r22,v15       */
+	.long  0xec001d46    /* dtstsfi cr0,0,f3           */
+	.long  0xefbf1d46    /* dtstsfi cr7,63,f3          */
+	.long  0xfc002546    /* dtstsfiq cr0,0,f4          */
+	.long  0xffbf2546    /* dtstsfiq cr7,63,f4         */
+	.long  0xf110956f    /* xscvhpdp vs40,vs50         */
+	.long  0xf1319d6f    /* xscvdphp vs41,vs51         */
+	.long  0xf158a76f    /* xvcvhpsp vs42,vs52         */
+	.long  0xf179af6f    /* xvcvsphp vs43,vs53         */
+	.long  0x4c600004    /* addpcis r3,0               */
+	.long  0x4c600004    /* addpcis r3,0               */
+	.long  0x4c800005    /* addpcis r4,1               */
+	.long  0x4c800005    /* addpcis r4,1               */
+	.long  0x4cbfffc4    /* addpcis r5,-2              */
+	.long  0x4cbfffc4    /* addpcis r5,-2              */
+	.long  0x4cdf7fc5    /* addpcis r6,32767           */
+	.long  0x4cdf7fc5    /* addpcis r6,32767           */
+	.long  0x4ce08004    /* addpcis r7,-32768          */
+	.long  0x4ce08004    /* addpcis r7,-32768          */
+	.long  0x7c0002a4    /* slbsync                    */
+	.long  0x7d4006a4    /* slbiag  r10                */
+	.long  0x7d405ba4    /* slbieg  r10,r11            */
+	.long  0x7c602726    /* slbmfee r3,r4              */
+	.long  0x7c602726    /* slbmfee r3,r4              */
+	.long  0x7c612726    /* slbmfee r3,r4,1            */
+	.long  0x7c802ea6    /* slbmfev r4,r5              */
+	.long  0x7c802ea6    /* slbmfev r4,r5              */
+	.long  0x7c812ea6    /* slbmfev r4,r5,1            */
+	.long  0x7c801a64    /* tlbie   r3,r4              */
+	.long  0x7c801a64    /* tlbie   r3,r4              */
+	.long  0x7c8f1a64    /* tlbie   r3,r4,3,1,1        */
+	.long  0x7c001a24    /* tlbiel  r3                 */
+	.long  0x7c001a24    /* tlbiel  r3                 */
+	.long  0x7c8f1a24    /* tlbiel  r3,r4,3,1,1        */
+	.long  0x7c2c6e0c    /* copy    r12,r13            */
+	.long  0x7c2a5f0d    /* paste.  r10,r11            */
+	.long  0x7c00068c    /* cpabort                    */
+	.long  0x7c0004ac    /* hwsync                     */
+	.long  0x7c0004ac    /* hwsync                     */
+	.long  0x7c0004ac    /* hwsync                     */
+	.long  0x7c2004ac    /* lwsync                     */
+	.long  0x7c2004ac    /* lwsync                     */
+	.long  0x7c4004ac    /* ptesync                    */
+	.long  0x7c4004ac    /* ptesync                    */
+	.long  0x7e8004cc    /* ldat    r20,0,0            */
+	.long  0x7e8ae4cc    /* ldat    r20,r10,28         */
+	.long  0x7ea0048c    /* lwat    r21,0,0            */
+	.long  0x7eabe48c    /* lwat    r21,r11,28         */
+	.long  0x7ec005cc    /* stdat   r22,0,0            */
+	.long  0x7ecce5cc    /* stdat   r22,r12,28         */
+	.long  0x7ee0058c    /* stwat   r23,0,0            */
+	.long  0x7eede58c    /* stwat   r23,r13,28         */
+	.long  0x4c000264    /* urfid                      */
+	.long  0x7c00f6e4    /* rmieg   r30                */
+	.long  0x7d407a6a    /* ldmx    r10,0,r15          */
+	.long  0x7d437a6a    /* ldmx    r10,r3,r15         */
+	.long  0x4c0002e4    /* stop                       */
+	.long  0x7c00003c    /* wait                       */
+	.long  0x7c00003c    /* wait                       */
+	.long  0x7c6005e6    /* darn    r3,0               */
+	.long  0x7c6105e6    /* darn    r3,1               */
+	.long  0x7c6205e6    /* darn    r3,2               */
+	.long  0x7c000480    /* mcrxrx  cr0                */
+	.long  0x7f800480    /* mcrxrx  cr7                */
+	.long  0x1295b744    /* vslv    v20,v21,v22        */
+	.long  0x12f8cf04    /* vsrv    v23,v24,v25        */
+	.long  0x7c0006ec    /* msgsync                    */
+	.long  0xf3c8901e    /* xscmpeqdp vs30,vs40,vs50   */
+	.long  0xf3e9985e    /* xscmpgtdp vs31,vs41,vs51   */
+	.long  0xf00aa09f    /* xscmpgedp vs32,vs42,vs52   */
+	.long  0xf04cb447    /* xsmincdp vs34,vs44,vs54    */
+	.long  0xf06dbc07    /* xsmaxcdp vs35,vs45,vs55    */
+	.long  0xf08ec4c7    /* xsminjdp vs36,vs46,vs56    */
+	.long  0xf0afcc87    /* xsmaxjdp vs37,vs47,vs57    */
+	.long  0x1295b5e3    /* vmsumudm v20,v21,v22,v23   */
+	.long  0x7d6c6954    /* addex   r11,r12,r13,0      */
+	.long  0x7d6c6b54    /* addex   r11,r12,r13,1      */
+	.long  0x7d6c6d54    /* addex   r11,r12,r13,2      */
+	.long  0xff20048e    /* mffs    f25                */
+	.long  0xff20048f    /* mffs.   f25                */
+	.long  0xff41048e    /* mffsce  f26                */
+	.long  0xff74a48e    /* mffscdrn f27,f20           */
+	.long  0xff95048e    /* mffscdrni f28,0            */
+	.long  0xff953c8e    /* mffscdrni f28,7            */
+	.long  0xffb6ac8e    /* mffscrn f29,f21            */
+	.long  0xffd7048e    /* mffscrni f30,0             */
+	.long  0xffd71c8e    /* mffscrni f30,3             */
+	.long  0xfff8048e    /* mffsl   f31                */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power.exp ./gdb/testsuite/gdb.arch/powerpc-power.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,318 +0,0 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
-
-# Test PowerPC instructions disassembly.
-
-standard_testfile .s
-set objfile [standard_output_file ${testfile}.o]
-
-if {![istarget "powerpc*-*-*"]} then {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
-    untested "PowerPC instructions disassembly"
-    return -1
-}
-
-clean_restart ${objfile}
-
-# Disassemble the function.
-
-set test "disass func"
-gdb_test_multiple $test $test {
-    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
-	set func $expect_out(1,string)
-	pass $test
-    }
-}
-
-proc instr_to_patt {offset instr} {
-    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
-    return ".*\r\n\[ \t\]*0x\[0-9a-f\]+ <\\$offset>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
-}
-
-proc func_check {offset instr} {
-    global func
-
-    set test "Found $offset: $instr"
-    if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
-	pass $test
-    } else {
-	fail $test
-    }
-}
-
-func_check +0    "lxvd2x  vs3,r4,r5"
-# Some instructions are no longer recognized, this is correct since:
-# [PATCH] Remove support for POWER7 VSX load/store with update instructions
-# http://sourceware.org/ml/binutils/2009-09/msg00680.html
-# http://sourceware.org/ml/binutils-cvs/2009-09/msg00331.html
-# lxvd2ux vs3,r4,r5
-func_check +4    ".long 0x7c642ed8"
-func_check +8    "lxvd2x  vs43,r4,r5"
-# lxvd2ux vs43,r4,r5
-func_check +12   ".long 0x7d642ed9"
-func_check +16   "stxvd2x vs3,r4,r5"
-# stxvd2ux vs3,r4,r5
-func_check +20   ".long 0x7c642fd8"
-func_check +24   "stxvd2x vs43,r4,r5"
-# stxvd2ux vs43,r4,r5
-func_check +28   ".long 0x7d642fd9"
-func_check +32   "xxmrghd vs3,vs4,vs5"
-func_check +36   "xxmrghd vs43,vs44,vs45"
-func_check +40   "xxmrgld vs3,vs4,vs5"
-func_check +44   "xxmrgld vs43,vs44,vs45"
-func_check +48   "xxmrghd vs3,vs4,vs5"
-func_check +52   "xxmrghd vs43,vs44,vs45"
-func_check +56   "xxmrgld vs3,vs4,vs5"
-func_check +60   "xxmrgld vs43,vs44,vs45"
-func_check +64   "xxpermdi vs3,vs4,vs5,1"
-func_check +68   "xxpermdi vs43,vs44,vs45,1"
-func_check +72   "xxpermdi vs3,vs4,vs5,2"
-func_check +76   "xxpermdi vs43,vs44,vs45,2"
-func_check +80   "xvmovdp vs3,vs4"
-func_check +84   "xvmovdp vs43,vs44"
-func_check +88   "xvmovdp vs3,vs4"
-func_check +92   "xvmovdp vs43,vs44"
-func_check +96   "xvcpsgndp vs3,vs4,vs5"
-func_check +100  "xvcpsgndp vs43,vs44,vs45"
-func_check +104  "wait"
-func_check +108  "wait"
-func_check +112  "waitrsv"
-func_check +116  "waitrsv"
-func_check +120  "waitimpl"
-func_check +124  "waitimpl"
-func_check +128  "doze"
-func_check +132  "nap"
-func_check +136  "sleep"
-func_check +140  "rvwinkle"
-func_check +144  "prtyw   r3,r4"
-func_check +148  "prtyd   r13,r14"
-func_check +152  "mfcfar  r10"
-func_check +156  "mtcfar  r11"
-func_check +160  "cmpb    r3,r4,r5"
-func_check +164  "lwzcix  r10,r11,r12"
-func_check +168  "dadd    f16,f17,f18"
-func_check +172  "daddq   f20,f22,f24"
-func_check +176  "dss     3"
-func_check +180  "dssall"
-func_check +184  "dst     r5,r4,1"
-func_check +188  "dstt    r8,r7,0"
-func_check +192  "dstst   r5,r6,3"
-func_check +196  "dststt  r4,r5,2"
-func_check +200  "divwe   r10,r11,r12"
-func_check +204  "divwe.  r11,r12,r13"
-func_check +208  "divweo  r12,r13,r14"
-func_check +212  "divweo. r13,r14,r15"
-func_check +216  "divweu  r10,r11,r12"
-func_check +220  "divweu. r11,r12,r13"
-func_check +224  "divweuo r12,r13,r14"
-func_check +228  "divweuo. r13,r14,r15"
-func_check +232  "bpermd  r7,r17,r27"
-func_check +236  "popcntw r10,r20"
-func_check +240  "popcntd r10,r20"
-func_check +244  "ldbrx   r20,r21,r22"
-func_check +248  "stdbrx  r20,r21,r22"
-func_check +252  "lfiwzx  f10,0,r10"
-func_check +256  "lfiwzx  f10,r9,r10"
-func_check +260  "fcfids  f4,f5"
-func_check +264  "fcfids. f4,f5"
-func_check +268  "fcfidus f4,f5"
-func_check +272  "fcfidus. f4,f5"
-func_check +276  "fctiwu  f4,f5"
-func_check +280  "fctiwu. f4,f5"
-func_check +284  "fctiwuz f4,f5"
-func_check +288  "fctiwuz. f4,f5"
-func_check +292  "fctidu  f4,f5"
-func_check +296  "fctidu. f4,f5"
-func_check +300  "fctiduz f4,f5"
-func_check +304  "fctiduz. f4,f5"
-func_check +308  "fcfidu  f4,f5"
-func_check +312  "fcfidu. f4,f5"
-func_check +316  "ftdiv   cr0,f10,f11"
-func_check +320  "ftdiv   cr7,f10,f11"
-func_check +324  "ftsqrt  cr0,f10"
-func_check +328  "ftsqrt  cr7,f10"
-func_check +332  "dcbtt   r8,r9"
-func_check +336  "dcbtstt r8,r9"
-func_check +340  "dcffix  f10,f12"
-func_check +344  "dcffix. f20,f22"
-func_check +348  "lbarx   r10,r11,r12"
-func_check +352  "lbarx   r10,r11,r12"
-func_check +356  "lbarx   r10,r11,r12,1"
-func_check +360  "lharx   r20,r21,r22"
-func_check +364  "lharx   r20,r21,r22"
-func_check +368  "lharx   r20,r21,r22,1"
-func_check +372  "stbcx.  r10,r11,r12"
-func_check +376  "sthcx.  r10,r11,r12"
-func_check +380  "fre     f14,f15"
-func_check +384  "fre.    f14,f15"
-func_check +388  "fres    f14,f15"
-func_check +392  "fres.   f14,f15"
-func_check +396  "frsqrte f14,f15"
-func_check +400  "frsqrte. f14,f15"
-func_check +404  "frsqrtes f14,f15"
-func_check +408  "frsqrtes. f14,f15"
-func_check +412  "isel    r2,r3,r4,28"
-func_check +416  "dcbzl   r8,r9"
-func_check +420  "frsqrtes f10,f11"
-func_check +424  "dadd    f1,f2,f1"
-func_check +428  "daddq   f0,f2,f0"
-func_check +432  "dsub    f1,f2,f1"
-func_check +436  "dsubq   f0,f2,f0"
-func_check +440  "dmul    f1,f2,f1"
-func_check +444  "dmulq   f0,f2,f0"
-func_check +448  "ddiv    f1,f2,f1"
-func_check +452  "ddivq   f0,f2,f0"
-func_check +456  "dcmpu   cr1,f2,f1"
-func_check +460  "dcmpuq  cr1,f2,f0"
-func_check +464  "tabort. r5"
-func_check +468  "tabortwc. 7,r8,r16"
-func_check +472  "tabortdc. 20,r11,r10"
-func_check +476  "tabortwci. 17,r10,-13"
-func_check +480  "tabortdci. 29,r3,-5"
-func_check +484  "tbegin."
-func_check +488  "tcheck  cr7"
-func_check +492  "tend."
-func_check +496  "tendall."
-func_check +500  "treclaim. r24"
-func_check +504  "trechkpt."
-func_check +508  "tsuspend."
-func_check +512  "tresume."
-func_check +516  "rfebb   0"
-func_check +520  "rfebb"
-func_check +524  "bctar-  12,4\\*cr5\\+gt"
-func_check +528  "bctarl- 4,4\\*cr1\\+so"
-func_check +532  "bctar\\+  12,4\\*cr3\\+lt"
-func_check +536  "bctarl\\+ 4,eq"
-func_check +540  "bctar   4,4\\*cr2\\+lt,1"
-func_check +544  "bctarl  4,4\\*cr1\\+so,2"
-func_check +548  "waitasec"
-func_check +552  "msgsndp r8"
-func_check +556  "mtsle   1"
-func_check +560  "msgclrp r27"
-func_check +564  "stqcx.  r10,r10,r12"
-func_check +568  "stqcx.  r28,0,r7"
-func_check +572  "lqarx   r24,r19,r11"
-func_check +576  "lqarx   r22,0,r11"
-func_check +580  "mfbhrbe r20,6"
-func_check +584  "pbt.    r29,r17,r16"
-func_check +588  "pbt.    r14,0,r7"
-func_check +592  "clrbhrb"
-func_check +596  "vpermxor v11,v10,v0,v23"
-func_check +600  "vaddeuqm v24,v2,v7,v4"
-func_check +604  "vaddecuq v10,v10,v8,v2"
-func_check +608  "vsubeuqm v5,v15,v8,v19"
-func_check +612  "vsubecuq v12,v31,v16,v29"
-func_check +616  "vmulouw v20,v29,v13"
-func_check +620  "vmuluwm v29,v0,v26"
-func_check +624  "vaddudm v8,v21,v28"
-func_check +628  "vmaxud  v1,v26,v1"
-func_check +632  "vrld    v20,v3,v1"
-func_check +636  "vcmpequd v4,v19,v11"
-func_check +640  "vadduqm v23,v14,v30"
-func_check +644  "vaddcuq v8,v8,v13"
-func_check +648  "vmulosw v28,v27,v4"
-func_check +652  "vmaxsd  v3,v4,v4"
-func_check +656  "vmuleuw v0,v19,v21"
-func_check +660  "vminud  v24,v20,v19"
-func_check +664  "vcmpgtud v0,v28,v15"
-func_check +668  "vmulesw v21,v0,v2"
-func_check +672  "vminsd  v9,v26,v9"
-func_check +676  "vsrad   v25,v29,v11"
-func_check +680  "vcmpgtsd v11,v28,v11"
-func_check +684  "bcdadd. v5,v8,v26,1"
-func_check +688  "vpmsumb v4,v3,v12"
-func_check +692  "bcdsub. v26,v31,v21,1"
-func_check +696  "vpmsumh v5,v17,v16"
-func_check +700  "vpkudum v23,v17,v20"
-func_check +704  "vpmsumw v24,v21,v29"
-func_check +708  "vpmsumd v9,v22,v13"
-func_check +712  "vpkudus v18,v19,v18"
-func_check +716  "vsubuqm v30,v16,v22"
-func_check +720  "vcipher v14,v11,v7"
-func_check +724  "vcipherlast v10,v2,v22"
-func_check +728  "vgbbd   v23,v13"
-func_check +732  "vsubcuq v16,v25,v16"
-func_check +736  "vorc    v31,v1,v5"
-func_check +740  "vncipher v4,v17,v31"
-func_check +744  "vncipherlast v24,v2,v27"
-func_check +748  "vbpermq v23,v21,v23"
-func_check +752  "vpksdus v27,v18,v9"
-func_check +756  "vnand   v27,v29,v27"
-func_check +760  "vsld    v19,v19,v24"
-func_check +764  "vsbox   v5,v13"
-func_check +768  "vpksdss v25,v3,v7"
-func_check +772  "vcmpequd. v28,v8,v0"
-func_check +776  "vupkhsw v26,v26"
-func_check +780  "vshasigmaw v5,v7,0,6"
-func_check +784  "veqv    v28,v21,v14"
-func_check +788  "vmrgow  v1,v8,v19"
-func_check +792  "vshasigmad v0,v10,0,10"
-func_check +796  "vsrd    v5,v27,v14"
-func_check +800  "vupklsw v11,v13"
-func_check +804  "vclzb   v14,v16"
-func_check +808  "vpopcntb v20,v27"
-func_check +812  "vclzh   v28,v11"
-func_check +816  "vpopcnth v24,v9"
-func_check +820  "vclzw   v27,v31"
-func_check +824  "vpopcntw v17,v19"
-func_check +828  "vclzd   v12,v29"
-func_check +832  "vpopcntd v23,v22"
-func_check +836  "vcmpgtud. v24,v20,v29"
-func_check +840  "vcmpgtsd. v9,v6,v27"
-func_check +844  "lxsiwzx vs62,r14,r26"
-func_check +848  "lxsiwzx vs40,0,r25"
-func_check +852  "lxsiwax vs25,0,r26"
-func_check +856  "lxsiwax vs3,0,r3"
-func_check +860  "mfvsrd  r12,vs62"
-func_check +864  "mffprwz r20,f12"
-func_check +868  "stxsiwx vs14,r9,r14"
-func_check +872  "stxsiwx vs21,0,r8"
-func_check +876  "mtvsrd  vs48,r11"
-func_check +880  "mtvrwa  v31,r23"
-func_check +884  "mtfprwz f16,r26"
-func_check +888  "lxsspx  vs13,r19,r13"
-func_check +892  "lxsspx  vs18,0,r13"
-func_check +896  "stxsspx vs43,r2,r4"
-func_check +900  "stxsspx vs55,0,r11"
-func_check +904  "xsaddsp vs54,vs48,vs25"
-func_check +908  "xsmaddasp vs14,vs50,vs1"
-func_check +912  "xssubsp vs26,vs22,vs42"
-func_check +916  "xsmaddmsp vs27,vs53,vs52"
-func_check +920  "xsrsqrtesp vs8,vs59"
-func_check +924  "xssqrtsp vs12,vs41"
-func_check +928  "xsmulsp vs57,vs11,vs32"
-func_check +932  "xsmsubasp vs38,vs20,vs26"
-func_check +936  "xsdivsp vs26,vs19,vs6"
-func_check +940  "xsmsubmsp vs35,vs37,vs55"
-func_check +944  "xsresp  vs59,vs8"
-func_check +948  "xsnmaddasp vs44,vs33,vs33"
-func_check +952  "xsnmaddmsp vs17,vs62,vs30"
-func_check +956  "xsnmsubasp vs54,vs52,vs31"
-func_check +960  "xsnmsubmsp vs37,vs5,vs58"
-func_check +964  "xxlorc  vs30,vs54,vs44"
-func_check +968  "xxlnand vs49,vs14,vs29"
-func_check +972  "xxleqv  vs62,vs22,vs30"
-func_check +976  "xscvdpspn vs60,vs54"
-func_check +980  "xsrsp   vs22,vs45"
-func_check +984  "xscvuxdsp vs26,vs59"
-func_check +988  "xscvsxdsp vs38,vs49"
-func_check +992  "xscvspdpn vs59,vs26"
-func_check +996  "fmrgow  f24,f14,f2"
-func_check +1000 "fmrgew  f22,f7,f5"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power.s ./gdb/testsuite/gdb.arch/powerpc-power.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-power.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power.s	1970-01-01 00:00:00.000000000 +0000
@@ -1,271 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2014-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-	.text
-	.globl	func
-func:
-	.long	0x7c642e98	/* <+0>:   lxvd2x  vs3,r4,r5         */
-	.long	0x7c642ed8	/* <+4>:   lxvd2ux vs3,r4,r5         */
-	.long	0x7d642e99	/* <+8>:   lxvd2x  vs43,r4,r5        */
-	.long	0x7d642ed9	/* <+12>:  lxvd2ux vs43,r4,r5        */
-	.long	0x7c642f98	/* <+16>:  stxvd2x vs3,r4,r5         */
-	.long	0x7c642fd8	/* <+20>:  stxvd2ux vs3,r4,r5        */
-	.long	0x7d642f99	/* <+24>:  stxvd2x vs43,r4,r5        */
-	.long	0x7d642fd9	/* <+28>:  stxvd2ux vs43,r4,r5       */
-	.long	0xf0642850	/* <+32>:  xxmrghd vs3,vs4,vs5       */
-	.long	0xf16c6857	/* <+36>:  xxmrghd vs43,vs44,vs45    */
-	.long	0xf0642b50	/* <+40>:  xxmrgld vs3,vs4,vs5       */
-	.long	0xf16c6b57	/* <+44>:  xxmrgld vs43,vs44,vs45    */
-	.long	0xf0642850	/* <+48>:  xxmrghd vs3,vs4,vs5       */
-	.long	0xf16c6857	/* <+52>:  xxmrghd vs43,vs44,vs45    */
-	.long	0xf0642b50	/* <+56>:  xxmrgld vs3,vs4,vs5       */
-	.long	0xf16c6b57	/* <+60>:  xxmrgld vs43,vs44,vs45    */
-	.long	0xf0642950	/* <+64>:  xxpermdi vs3,vs4,vs5,1    */
-	.long	0xf16c6957	/* <+68>:  xxpermdi vs43,vs44,vs45,1 */
-	.long	0xf0642a50	/* <+72>:  xxpermdi vs3,vs4,vs5,2    */
-	.long	0xf16c6a57	/* <+76>:  xxpermdi vs43,vs44,vs45,2 */
-	.long	0xf0642780	/* <+80>:  xvmovdp vs3,vs4           */
-	.long	0xf16c6787	/* <+84>:  xvmovdp vs43,vs44         */
-	.long	0xf0642780	/* <+88>:  xvmovdp vs3,vs4           */
-	.long	0xf16c6787	/* <+92>:  xvmovdp vs43,vs44         */
-	.long	0xf0642f80	/* <+96>:  xvcpsgndp vs3,vs4,vs5     */
-	.long	0xf16c6f87	/* <+100>: xvcpsgndp vs43,vs44,vs45  */
-	.long	0x7c00007c	/* <+104>: wait                      */
-	.long	0x7c00007c	/* <+108>: wait                      */
-	.long	0x7c20007c	/* <+112>: waitrsv                   */
-	.long	0x7c20007c	/* <+116>: waitrsv                   */
-	.long	0x7c40007c	/* <+120>: waitimpl                  */
-	.long	0x7c40007c	/* <+124>: waitimpl                  */
-	.long	0x4c000324	/* <+128>: doze                      */
-	.long	0x4c000364	/* <+132>: nap                       */
-	.long	0x4c0003a4	/* <+136>: sleep                     */
-	.long	0x4c0003e4	/* <+140>: rvwinkle                  */
-	.long	0x7c830134	/* <+144>: prtyw   r3,r4             */
-	.long	0x7dcd0174	/* <+148>: prtyd   r13,r14           */
-	.long	0x7d5c02a6	/* <+152>: mfcfar  r10               */
-	.long	0x7d7c03a6	/* <+156>: mtcfar  r11               */
-	.long	0x7c832bf8	/* <+160>: cmpb    r3,r4,r5          */
-	.long	0x7d4b662a	/* <+164>: lwzcix  r10,r11,r12       */
-	.long	0xee119004	/* <+168>: dadd    f16,f17,f18       */
-	.long	0xfe96c004	/* <+172>: daddq   f20,f22,f24       */
-	.long	0x7c60066c	/* <+176>: dss     3                 */
-	.long	0x7e00066c	/* <+180>: dssall                    */
-	.long	0x7c2522ac	/* <+184>: dst     r5,r4,1           */
-	.long	0x7e083aac	/* <+188>: dstt    r8,r7,0           */
-	.long	0x7c6532ec	/* <+192>: dstst   r5,r6,3           */
-	.long	0x7e442aec	/* <+196>: dststt  r4,r5,2           */
-	.long	0x7d4b6356	/* <+200>: divwe   r10,r11,r12       */
-	.long	0x7d6c6b57	/* <+204>: divwe.  r11,r12,r13       */
-	.long	0x7d8d7756	/* <+208>: divweo  r12,r13,r14       */
-	.long	0x7dae7f57	/* <+212>: divweo. r13,r14,r15       */
-	.long	0x7d4b6316	/* <+216>: divweu  r10,r11,r12       */
-	.long	0x7d6c6b17	/* <+220>: divweu. r11,r12,r13       */
-	.long	0x7d8d7716	/* <+224>: divweuo r12,r13,r14       */
-	.long	0x7dae7f17	/* <+228>: divweuo. r13,r14,r15      */
-	.long	0x7e27d9f8	/* <+232>: bpermd  r7,r17,r27        */
-	.long	0x7e8a02f4	/* <+236>: popcntw r10,r20           */
-	.long	0x7e8a03f4	/* <+240>: popcntd r10,r20           */
-	.long	0x7e95b428	/* <+244>: ldbrx   r20,r21,r22       */
-	.long	0x7e95b528	/* <+248>: stdbrx  r20,r21,r22       */
-	.long	0x7d4056ee	/* <+252>: lfiwzx  f10,0,r10         */
-	.long	0x7d4956ee	/* <+256>: lfiwzx  f10,r9,r10        */
-	.long	0xec802e9c	/* <+260>: fcfids  f4,f5             */
-	.long	0xec802e9d	/* <+264>: fcfids. f4,f5             */
-	.long	0xec802f9c	/* <+268>: fcfidus f4,f5             */
-	.long	0xec802f9d	/* <+272>: fcfidus. f4,f5            */
-	.long	0xfc80291c	/* <+276>: fctiwu  f4,f5             */
-	.long	0xfc80291d	/* <+280>: fctiwu. f4,f5             */
-	.long	0xfc80291e	/* <+284>: fctiwuz f4,f5             */
-	.long	0xfc80291f	/* <+288>: fctiwuz. f4,f5            */
-	.long	0xfc802f5c	/* <+292>: fctidu  f4,f5             */
-	.long	0xfc802f5d	/* <+296>: fctidu. f4,f5             */
-	.long	0xfc802f5e	/* <+300>: fctiduz f4,f5             */
-	.long	0xfc802f5f	/* <+304>: fctiduz. f4,f5            */
-	.long	0xfc802f9c	/* <+308>: fcfidu  f4,f5             */
-	.long	0xfc802f9d	/* <+312>: fcfidu. f4,f5             */
-	.long	0xfc0a5900	/* <+316>: ftdiv   cr0,f10,f11       */
-	.long	0xff8a5900	/* <+320>: ftdiv   cr7,f10,f11       */
-	.long	0xfc005140	/* <+324>: ftsqrt  cr0,f10           */
-	.long	0xff805140	/* <+328>: ftsqrt  cr7,f10           */
-	.long	0x7e084a2c	/* <+332>: dcbtt   r8,r9             */
-	.long	0x7e0849ec	/* <+336>: dcbtstt r8,r9             */
-	.long	0xed406644	/* <+340>: dcffix  f10,f12           */
-	.long	0xee80b645	/* <+344>: dcffix. f20,f22           */
-	.long	0x7d4b6068	/* <+348>: lbarx   r10,r11,r12       */
-	.long	0x7d4b6068	/* <+352>: lbarx   r10,r11,r12       */
-	.long	0x7d4b6069	/* <+356>: lbarx   r10,r11,r12,1     */
-	.long	0x7e95b0e8	/* <+360>: lharx   r20,r21,r22       */
-	.long	0x7e95b0e8	/* <+364>: lharx   r20,r21,r22       */
-	.long	0x7e95b0e9	/* <+368>: lharx   r20,r21,r22,1     */
-	.long	0x7d4b656d	/* <+372>: stbcx.  r10,r11,r12       */
-	.long	0x7d4b65ad	/* <+376>: sthcx.  r10,r11,r12       */
-	.long	0xfdc07830	/* <+380>: fre     f14,f15           */
-	.long	0xfdc07831	/* <+384>: fre.    f14,f15           */
-	.long	0xedc07830	/* <+388>: fres    f14,f15           */
-	.long	0xedc07831	/* <+392>: fres.   f14,f15           */
-	.long	0xfdc07834	/* <+396>: frsqrte f14,f15           */
-	.long	0xfdc07835	/* <+400>: frsqrte. f14,f15          */
-	.long	0xedc07834	/* <+404>: frsqrtes f14,f15          */
-	.long	0xedc07835	/* <+408>: frsqrtes. f14,f15         */
-	.long	0x7c43271e	/* <+412>: isel    r2,r3,r4,28       */
-	.long	0x7c284fec	/* <+416>: dcbzl   r8,r9             */
-	.long	0xed405834	/* <+420>: frsqrtes f10,f11          */
-	.long	0xec220804	/* <+424>: dadd    f1,f2,f1          */
-	.long	0xfc020004	/* <+428>: daddq   f0,f2,f0          */
-	.long	0xec220c04	/* <+432>: dsub    f1,f2,f1          */
-	.long	0xfc020404	/* <+436>: dsubq   f0,f2,f0          */
-	.long	0xec220844	/* <+440>: dmul    f1,f2,f1          */
-	.long	0xfc020044	/* <+444>: dmulq   f0,f2,f0          */
-	.long	0xec220c44	/* <+448>: ddiv    f1,f2,f1          */
-	.long	0xfc020444	/* <+452>: ddivq   f0,f2,f0          */
-	.long	0xec820d04	/* <+456>: dcmpu   cr1,f2,f1         */
-	.long	0xfc820504	/* <+460>: dcmpuq  cr1,f2,f0         */
-	.long	0x7c05071d	/* <+464>: tabort. r5                */
-	.long	0x7ce8861d	/* <+468>: tabortwc. 7,r8,r16        */
-	.long	0x7e8b565d	/* <+472>: tabortdc. 20,r11,r10      */
-	.long	0x7e2a9e9d	/* <+476>: tabortwci. 17,r10,-13     */
-	.long	0x7fa3dedd	/* <+480>: tabortdci. 29,r3,-5       */
-	.long	0x7c00051d	/* <+484>: tbegin.                   */
-	.long	0x7f80059c	/* <+488>: tcheck  cr7               */
-	.long	0x7c00055d	/* <+492>: tend.                     */
-	.long	0x7e00055d	/* <+496>: tendall.                  */
-	.long	0x7c18075d	/* <+500>: treclaim. r24             */
-	.long	0x7c0007dd	/* <+504>: trechkpt.                 */
-	.long	0x7c0005dd	/* <+508>: tsuspend.                 */
-	.long	0x7c2005dd	/* <+512>: tresume.                  */
-	.long	0x4c000124	/* <+516>: rfebb   0                 */
-	.long	0x4c000924	/* <+520>: rfebb   1                 */
-	.long	0x4d950460	/* <+524>: bctar-  12,4*cr5+gt       */
-	.long	0x4c870461	/* <+528>: bctarl- 4,4*cr1+so        */
-	.long	0x4dac0460	/* <+532>: bctar+  12,4*cr3+lt       */
-	.long	0x4ca20461	/* <+536>: bctarl+ 4,eq              */
-	.long	0x4c880c60	/* <+540>: bctar   4,4*cr2+lt,1      */
-	.long	0x4c871461	/* <+544>: bctarl  4,4*cr1+so,2      */
-	.long	0x7c00003c	/* <+548>: waitasec                  */
-	.long	0x7c00411c	/* <+552>: msgsndp r8                */
-	.long	0x7c200126	/* <+556>: mtsle   1                 */
-	.long	0x7c00d95c	/* <+560>: msgclrp r27               */
-	.long	0x7d4a616d	/* <+564>: stqcx.  r10,r10,r12       */
-	.long	0x7f80396d	/* <+568>: stqcx.  r28,0,r7          */
-	.long	0x7f135a28	/* <+572>: lqarx   r24,r19,r11       */
-	.long	0x7ec05a28	/* <+576>: lqarx   r22,0,r11         */
-	.long	0x7e80325c	/* <+580>: mfbhrbe r20,6             */
-	.long	0x7fb18329	/* <+584>: pbt.    r29,r17,r16       */
-	.long	0x7dc03b29	/* <+588>: pbt.    r14,0,r7          */
-	.long	0x7c00035c	/* <+592>: clrbhrb                   */
-	.long	0x116a05ed	/* <+596>: vpermxor v11,v10,v0,v23   */
-	.long	0x1302393c	/* <+600>: vaddeuqm v24,v2,v7,v4     */
-	.long	0x114a40bd	/* <+604>: vaddecuq v10,v10,v8,v2    */
-	.long	0x10af44fe	/* <+608>: vsubeuqm v5,v15,v8,v19    */
-	.long	0x119f877f	/* <+612>: vsubecuq v12,v31,v16,v29  */
-	.long	0x129d6888	/* <+616>: vmulouw v20,v29,v13       */
-	.long	0x13a0d089	/* <+620>: vmuluwm v29,v0,v26        */
-	.long	0x1115e0c0	/* <+624>: vaddudm v8,v21,v28        */
-	.long	0x103a08c2	/* <+628>: vmaxud  v1,v26,v1         */
-	.long	0x128308c4	/* <+632>: vrld    v20,v3,v1         */
-	.long	0x109358c7	/* <+636>: vcmpequd v4,v19,v11       */
-	.long	0x12eef100	/* <+640>: vadduqm v23,v14,v30       */
-	.long	0x11086940	/* <+644>: vaddcuq v8,v8,v13         */
-	.long	0x139b2188	/* <+648>: vmulosw v28,v27,v4        */
-	.long	0x106421c2	/* <+652>: vmaxsd  v3,v4,v4          */
-	.long	0x1013aa88	/* <+656>: vmuleuw v0,v19,v21        */
-	.long	0x13149ac2	/* <+660>: vminud  v24,v20,v19       */
-	.long	0x101c7ac7	/* <+664>: vcmpgtud v0,v28,v15       */
-	.long	0x12a01388	/* <+668>: vmulesw v21,v0,v2         */
-	.long	0x113a4bc2	/* <+672>: vminsd  v9,v26,v9         */
-	.long	0x133d5bc4	/* <+676>: vsrad   v25,v29,v11       */
-	.long	0x117c5bc7	/* <+680>: vcmpgtsd v11,v28,v11      */
-	.long	0x10a8d601	/* <+684>: bcdadd. v5,v8,v26,1       */
-	.long	0x10836408	/* <+688>: vpmsumb v4,v3,v12         */
-	.long	0x135fae41	/* <+692>: bcdsub. v26,v31,v21,1     */
-	.long	0x10b18448	/* <+696>: vpmsumh v5,v17,v16        */
-	.long	0x12f1a44e	/* <+700>: vpkudum v23,v17,v20       */
-	.long	0x1315ec88	/* <+704>: vpmsumw v24,v21,v29       */
-	.long	0x11366cc8	/* <+708>: vpmsumd v9,v22,v13        */
-	.long	0x125394ce	/* <+712>: vpkudus v18,v19,v18       */
-	.long	0x13d0b500	/* <+716>: vsubuqm v30,v16,v22       */
-	.long	0x11cb3d08	/* <+720>: vcipher v14,v11,v7        */
-	.long	0x1142b509	/* <+724>: vcipherlast v10,v2,v22    */
-	.long	0x12e06d0c	/* <+728>: vgbbd   v23,v13           */
-	.long	0x12198540	/* <+732>: vsubcuq v16,v25,v16       */
-	.long	0x13e12d44	/* <+736>: vorc    v31,v1,v5         */
-	.long	0x1091fd48	/* <+740>: vncipher v4,v17,v31       */
-	.long	0x1302dd49	/* <+744>: vncipherlast v24,v2,v27   */
-	.long	0x12f5bd4c	/* <+748>: vbpermq v23,v21,v23       */
-	.long	0x13724d4e	/* <+752>: vpksdus v27,v18,v9        */
-	.long	0x137ddd84	/* <+756>: vnand   v27,v29,v27       */
-	.long	0x1273c5c4	/* <+760>: vsld    v19,v19,v24       */
-	.long	0x10ad05c8	/* <+764>: vsbox   v5,v13            */
-	.long	0x13233dce	/* <+768>: vpksdss v25,v3,v7         */
-	.long	0x138804c7	/* <+772>: vcmpequd. v28,v8,v0       */
-	.long	0x1340d64e	/* <+776>: vupkhsw v26,v26           */
-	.long	0x10a73682	/* <+780>: vshasigmaw v5,v7,0,6      */
-	.long	0x13957684	/* <+784>: veqv    v28,v21,v14       */
-	.long	0x10289e8c	/* <+788>: vmrgow  v1,v8,v19         */
-	.long	0x100a56c2	/* <+792>: vshasigmad v0,v10,0,10    */
-	.long	0x10bb76c4	/* <+796>: vsrd    v5,v27,v14        */
-	.long	0x11606ece	/* <+800>: vupklsw v11,v13           */
-	.long	0x11c08702	/* <+804>: vclzb   v14,v16           */
-	.long	0x1280df03	/* <+808>: vpopcntb v20,v27          */
-	.long	0x13805f42	/* <+812>: vclzh   v28,v11           */
-	.long	0x13004f43	/* <+816>: vpopcnth v24,v9           */
-	.long	0x1360ff82	/* <+820>: vclzw   v27,v31           */
-	.long	0x12209f83	/* <+824>: vpopcntw v17,v19          */
-	.long	0x1180efc2	/* <+828>: vclzd   v12,v29           */
-	.long	0x12e0b7c3	/* <+832>: vpopcntd v23,v22          */
-	.long	0x1314eec7	/* <+836>: vcmpgtud. v24,v20,v29     */
-	.long	0x1126dfc7	/* <+840>: vcmpgtsd. v9,v6,v27       */
-	.long	0x7fced019	/* <+844>: lxsiwzx vs62,r14,r26      */
-	.long	0x7d00c819	/* <+848>: lxsiwzx vs40,0,r25        */
-	.long	0x7f20d098	/* <+852>: lxsiwax vs25,0,r26        */
-	.long	0x7c601898	/* <+856>: lxsiwax vs3,0,r3          */
-	.long	0x7fcc0067	/* <+860>: mfvsrd  r12,vs62          */
-	.long	0x7d9400e6	/* <+864>: mffprwz r20,f12           */
-	.long	0x7dc97118	/* <+868>: stxsiwx vs14,r9,r14       */
-	.long	0x7ea04118	/* <+872>: stxsiwx vs21,0,r8         */
-	.long	0x7e0b0167	/* <+876>: mtvsrd  vs48,r11          */
-	.long	0x7ff701a7	/* <+880>: mtvrwa  v31,r23           */
-	.long	0x7e1a01e6	/* <+884>: mtfprwz f16,r26           */
-	.long	0x7db36c18	/* <+888>: lxsspx  vs13,r19,r13      */
-	.long	0x7e406c18	/* <+892>: lxsspx  vs18,0,r13        */
-	.long	0x7d622519	/* <+896>: stxsspx vs43,r2,r4        */
-	.long	0x7ee05d19	/* <+900>: stxsspx vs55,0,r11        */
-	.long	0xf2d0c805	/* <+904>: xsaddsp vs54,vs48,vs25    */
-	.long	0xf1d2080c	/* <+908>: xsmaddasp vs14,vs50,vs1   */
-	.long	0xf3565042	/* <+912>: xssubsp vs26,vs22,vs42    */
-	.long	0xf375a04e	/* <+916>: xsmaddmsp vs27,vs53,vs52  */
-	.long	0xf100d82a	/* <+920>: xsrsqrtesp vs8,vs59       */
-	.long	0xf180482e	/* <+924>: xssqrtsp vs12,vs41        */
-	.long	0xf32b0083	/* <+928>: xsmulsp vs57,vs11,vs32    */
-	.long	0xf0d4d089	/* <+932>: xsmsubasp vs38,vs20,vs26  */
-	.long	0xf35330c0	/* <+936>: xsdivsp vs26,vs19,vs6     */
-	.long	0xf065b8cf	/* <+940>: xsmsubmsp vs35,vs37,vs55  */
-	.long	0xf3604069	/* <+944>: xsresp  vs59,vs8          */
-	.long	0xf1810c0f	/* <+948>: xsnmaddasp vs44,vs33,vs33 */
-	.long	0xf23ef44c	/* <+952>: xsnmaddmsp vs17,vs62,vs30 */
-	.long	0xf2d4fc8d	/* <+956>: xsnmsubasp vs54,vs52,vs31 */
-	.long	0xf0a5d4cb	/* <+960>: xsnmsubmsp vs37,vs5,vs58  */
-	.long	0xf3d66556	/* <+964>: xxlorc  vs30,vs54,vs44    */
-	.long	0xf22eed91	/* <+968>: xxlnand vs49,vs14,vs29    */
-	.long	0xf3d6f5d1	/* <+972>: xxleqv  vs62,vs22,vs30    */
-	.long	0xf380b42f	/* <+976>: xscvdpspn vs60,vs54       */
-	.long	0xf2c06c66	/* <+980>: xsrsp   vs22,vs45         */
-	.long	0xf340dca2	/* <+984>: xscvuxdsp vs26,vs59       */
-	.long	0xf0c08ce3	/* <+988>: xscvsxdsp vs38,vs49       */
-	.long	0xf360d52d	/* <+992>: xscvspdpn vs59,vs26       */
-	.long	0xff0e168c	/* <+996>: fmrgow  f24,f14,f2        */
-	.long	0xfec72f8c	/* <+1000>: fmrgew  f22,f7,f5        */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-prologue.c ./gdb/testsuite/gdb.arch/powerpc-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinder test program.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #endif
 
 void gdb2029 (void);
+void optimized_1 (void);
 
 int
 main (void)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-prologue.exp ./gdb/testsuite/gdb.arch/powerpc-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[istarget *-*-aix*] || ![istarget "p
 
 set testfile "powerpc-prologue"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
 
 # Don't use "debug", so that we don't have line information for the assembly
 # fragments.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-stackless.exp ./gdb/testsuite/gdb.arch/powerpc-stackless.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-stackless.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-stackless.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,8 +22,7 @@ if {![istarget "powerpc*-*-*"]} then {
 
 standard_testfile .S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
-    untested powerpc-stackless.exp
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-stackless.S ./gdb/testsuite/gdb.arch/powerpc-stackless.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-stackless.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-stackless.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx2.exp ./gdb/testsuite/gdb.arch/powerpc-vsx2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,118 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options vsx"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "lxsiwzx vs62,r14,r26"
+func_check "lxsiwzx vs40,0,r25"
+func_check "lxsiwax vs25,0,r26"
+func_check "lxsiwax vs3,0,r3"
+func_check "mfvsrd  r12,vs30"
+func_check "mfvsrd  r12,vs30"
+func_check "mfvsrd  r12,vs62"
+func_check "mfvsrd  r12,vs62"
+func_check "mffprwz r20,f12"
+func_check "mffprwz r20,f12"
+func_check "mfvrwz  r21,v12"
+func_check "mfvrwz  r21,v12"
+func_check "stxsiwx vs14,r9,r14"
+func_check "stxsiwx vs21,0,r8"
+func_check "mtvsrd  vs11,r28"
+func_check "mtvsrd  vs11,r28"
+func_check "mtvsrd  vs43,r29"
+func_check "mtvsrd  vs43,r29"
+func_check "mtfprwa f24,r22"
+func_check "mtfprwa f24,r22"
+func_check "mtvrwa  v25,r23"
+func_check "mtvrwa  v25,r23"
+func_check "mtfprwz f26,r27"
+func_check "mtfprwz f26,r27"
+func_check "mtvrwz  v27,r28"
+func_check "mtvrwz  v27,r28"
+func_check "lxsspx  vs13,r19,r13"
+func_check "lxsspx  vs18,0,r13"
+func_check "stxsspx vs43,r2,r4"
+func_check "stxsspx vs55,0,r11"
+func_check "xsaddsp vs54,vs48,vs25"
+func_check "xsmaddasp vs14,vs50,vs1"
+func_check "xssubsp vs26,vs22,vs42"
+func_check "xsmaddmsp vs27,vs53,vs52"
+func_check "xsrsqrtesp vs8,vs59"
+func_check "xssqrtsp vs12,vs41"
+func_check "xsmulsp vs57,vs11,vs32"
+func_check "xsmsubasp vs38,vs20,vs26"
+func_check "xsdivsp vs26,vs19,vs6"
+func_check "xsmsubmsp vs35,vs37,vs55"
+func_check "xsresp  vs59,vs8"
+func_check "xsnmaddasp vs44,vs33,vs33"
+func_check "xsnmaddmsp vs17,vs62,vs30"
+func_check "xsnmsubasp vs54,vs52,vs31"
+func_check "xsnmsubmsp vs37,vs5,vs58"
+func_check "xxlorc  vs30,vs54,vs44"
+func_check "xxlnand vs49,vs14,vs29"
+func_check "xxleqv  vs62,vs22,vs30"
+func_check "xscvdpspn vs60,vs54"
+func_check "xsrsp   vs22,vs45"
+func_check "xscvuxdsp vs26,vs59"
+func_check "xscvsxdsp vs38,vs49"
+func_check "xscvspdpn vs59,vs26"
+func_check "fmrgow  f24,f14,f2"
+func_check "fmrgew  f22,f7,f5"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx2.s ./gdb/testsuite/gdb.arch/powerpc-vsx2.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx2.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx2.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,75 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7fced019    /* lxsiwzx vs62,r14,r26       */
+	.long  0x7d00c819    /* lxsiwzx vs40,0,r25         */
+	.long  0x7f20d098    /* lxsiwax vs25,0,r26         */
+	.long  0x7c601898    /* lxsiwax vs3,0,r3           */
+	.long  0x7fcc0066    /* mfvsrd  r12,vs30           */
+	.long  0x7fcc0066    /* mfvsrd  r12,vs30           */
+	.long  0x7fcc0067    /* mfvsrd  r12,vs62           */
+	.long  0x7fcc0067    /* mfvsrd  r12,vs62           */
+	.long  0x7d9400e6    /* mffprwz r20,f12            */
+	.long  0x7d9400e6    /* mffprwz r20,f12            */
+	.long  0x7d9500e7    /* mfvrwz  r21,v12            */
+	.long  0x7d9500e7    /* mfvrwz  r21,v12            */
+	.long  0x7dc97118    /* stxsiwx vs14,r9,r14        */
+	.long  0x7ea04118    /* stxsiwx vs21,0,r8          */
+	.long  0x7d7c0166    /* mtvsrd  vs11,r28           */
+	.long  0x7d7c0166    /* mtvsrd  vs11,r28           */
+	.long  0x7d7d0167    /* mtvsrd  vs43,r29           */
+	.long  0x7d7d0167    /* mtvsrd  vs43,r29           */
+	.long  0x7f1601a6    /* mtfprwa f24,r22            */
+	.long  0x7f1601a6    /* mtfprwa f24,r22            */
+	.long  0x7f3701a7    /* mtvrwa  v25,r23            */
+	.long  0x7f3701a7    /* mtvrwa  v25,r23            */
+	.long  0x7f5b01e6    /* mtfprwz f26,r27            */
+	.long  0x7f5b01e6    /* mtfprwz f26,r27            */
+	.long  0x7f7c01e7    /* mtvrwz  v27,r28            */
+	.long  0x7f7c01e7    /* mtvrwz  v27,r28            */
+	.long  0x7db36c18    /* lxsspx  vs13,r19,r13       */
+	.long  0x7e406c18    /* lxsspx  vs18,0,r13         */
+	.long  0x7d622519    /* stxsspx vs43,r2,r4         */
+	.long  0x7ee05d19    /* stxsspx vs55,0,r11         */
+	.long  0xf2d0c805    /* xsaddsp vs54,vs48,vs25     */
+	.long  0xf1d2080c    /* xsmaddasp vs14,vs50,vs1    */
+	.long  0xf3565042    /* xssubsp vs26,vs22,vs42     */
+	.long  0xf375a04e    /* xsmaddmsp vs27,vs53,vs52   */
+	.long  0xf100d82a    /* xsrsqrtesp vs8,vs59        */
+	.long  0xf180482e    /* xssqrtsp vs12,vs41         */
+	.long  0xf32b0083    /* xsmulsp vs57,vs11,vs32     */
+	.long  0xf0d4d089    /* xsmsubasp vs38,vs20,vs26   */
+	.long  0xf35330c0    /* xsdivsp vs26,vs19,vs6      */
+	.long  0xf065b8cf    /* xsmsubmsp vs35,vs37,vs55   */
+	.long  0xf3604069    /* xsresp  vs59,vs8           */
+	.long  0xf1810c0f    /* xsnmaddasp vs44,vs33,vs33  */
+	.long  0xf23ef44c    /* xsnmaddmsp vs17,vs62,vs30  */
+	.long  0xf2d4fc8d    /* xsnmsubasp vs54,vs52,vs31  */
+	.long  0xf0a5d4cb    /* xsnmsubmsp vs37,vs5,vs58   */
+	.long  0xf3d66556    /* xxlorc  vs30,vs54,vs44     */
+	.long  0xf22eed91    /* xxlnand vs49,vs14,vs29     */
+	.long  0xf3d6f5d1    /* xxleqv  vs62,vs22,vs30     */
+	.long  0xf380b42f    /* xscvdpspn vs60,vs54        */
+	.long  0xf2c06c66    /* xsrsp   vs22,vs45          */
+	.long  0xf340dca2    /* xscvuxdsp vs26,vs59        */
+	.long  0xf0c08ce3    /* xscvsxdsp vs38,vs49        */
+	.long  0xf360d52d    /* xscvspdpn vs59,vs26        */
+	.long  0xff0e168c    /* fmrgow  f24,f14,f2         */
+	.long  0xfec72f8c    /* fmrgew  f22,f7,f5          */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx3.exp ./gdb/testsuite/gdb.arch/powerpc-vsx3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx3.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,184 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options vsx"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "lxvx    vs34,r6,r25"
+func_check "lxvx    vs20,0,r10"
+func_check "lxvl    vs20,r24,r10"
+func_check "lxvl    vs54,0,r29"
+func_check "lxvll   vs24,r20,r19"
+func_check "lxvll   vs34,0,r14"
+func_check "mfvsrld r2,vs22"
+func_check "lxvwsx  vs58,r26,r25"
+func_check "lxvwsx  vs55,0,r29"
+func_check "stxvx   vs14,r21,r4"
+func_check "stxvx   vs30,0,r22"
+func_check "stxvl   vs0,r26,r4"
+func_check "stxvl   vs37,0,r22"
+func_check "mtvsrws vs24,r10"
+func_check "stxvll  vs30,r21,r15"
+func_check "stxvll  vs39,0,r14"
+func_check "mtvsrdd vs12,r6,r5"
+func_check "mtvsrdd vs38,0,r21"
+func_check "lxsibzx vs59,r28,r6"
+func_check "lxsibzx vs30,0,r8"
+func_check "lxvh8x  vs42,r23,r17"
+func_check "lxvh8x  vs36,0,r5"
+func_check "lxsihzx vs12,r9,r11"
+func_check "lxsihzx vs49,0,r13"
+func_check "lxvb16x vs37,r3,r19"
+func_check "lxvb16x vs0,0,r30"
+func_check "stxsibx vs2,r30,r6"
+func_check "stxsibx vs12,0,r13"
+func_check "stxvh8x vs16,r29,r8"
+func_check "stxvh8x vs55,0,r10"
+func_check "stxsihx vs34,r2,r23"
+func_check "stxsihx vs60,0,r23"
+func_check "stxvb16x vs23,r14,r12"
+func_check "stxvb16x vs19,0,r5"
+func_check "lxsd    v24,0(0)"
+func_check "lxsd    v15,16(r21)"
+func_check "lxssp   v6,0(0)"
+func_check "lxssp   v23,16(r9)"
+func_check "xscmpeqdp vs18,vs51,vs33"
+func_check "xscmpgtdp vs2,vs26,vs34"
+func_check "xscmpgedp vs5,vs26,vs20"
+func_check "xxperm  vs44,vs10,vs43"
+func_check "xxpermr vs41,vs20,vs5"
+func_check "xscmpexpdp cr4,vs18,vs55"
+func_check "xxextractuw vs23,vs37,3"
+func_check "xxspltib vs54,235"
+func_check "xxinsertw vs15,vs30,4"
+func_check "xsmaxcdp vs12,vs11,vs7"
+func_check "xsmincdp vs32,vs25,vs24"
+func_check "xsmaxjdp vs25,vs53,vs12"
+func_check "xststdcsp cr2,vs36,127"
+func_check "xsminjdp vs32,vs21,vs45"
+func_check "xsxexpdp r17,vs50"
+func_check "xsxsigdp r7,vs40"
+func_check "xscvhpdp vs54,vs34"
+func_check "xscvdphp vs58,vs54"
+func_check "xststdcdp cr0,vs38,127"
+func_check "xvtstdcsp vs56,vs53,127"
+func_check "xviexpsp vs54,vs20,vs52"
+func_check "xsiexpdp vs57,r28,r29"
+func_check "xvxexpdp vs1,vs20"
+func_check "xvxsigdp vs54,vs59"
+func_check "xxbrh   vs18,vs37"
+func_check "xvxexpsp vs14,vs1"
+func_check "xvxsigsp vs52,vs13"
+func_check "xxbrw   vs19,vs5"
+func_check "xxbrd   vs51,vs55"
+func_check "xvcvhpsp vs35,vs17"
+func_check "xvcvsphp vs15,vs45"
+func_check "xxbrq   vs17,vs31"
+func_check "xvtstdcdp vs16,vs12,127"
+func_check "xviexpdp vs27,vs9,vs8"
+func_check "lxv     vs4,0(0)"
+func_check "lxv     vs40,16(r20)"
+func_check "stxv    vs50,0(0)"
+func_check "stxv    vs8,16(r16)"
+func_check "stxsd   v3,0(0)"
+func_check "stxsd   v17,16(r2)"
+func_check "stxssp  v13,0(0)"
+func_check "stxssp  v17,16(r13)"
+func_check "xsaddqp v8,v10,v18"
+func_check "xsaddqpo v5,v1,v29"
+func_check "xsrqpi  0,v12,v18,3"
+func_check "xsrqpix 1,v31,v19,0"
+func_check "xsmulqp v14,v1,v6"
+func_check "xsmulqpo v17,v7,v27"
+func_check "xsrqpxp 0,v4,v11,0"
+func_check "xscpsgnqp v29,v23,v28"
+func_check "xscmpoqp cr7,v13,v27"
+func_check "xscmpexpqp cr5,v21,v6"
+func_check "xsmaddqp v2,v19,v4"
+func_check "xsmaddqpo v30,v7,v16"
+func_check "xsmsubqp v21,v30,v15"
+func_check "xsmsubqpo v12,v17,v30"
+func_check "xsnmaddqp v6,v30,v12"
+func_check "xsnmaddqpo v12,v22,v12"
+func_check "xsnmsubqp v10,v29,v27"
+func_check "xsnmsubqpo v29,v29,v13"
+func_check "xssubqp v19,v27,v4"
+func_check "xssubqpo v13,v8,v1"
+func_check "xsdivqp v8,v3,v27"
+func_check "xsdivqpo v24,v20,v27"
+func_check "xscmpuqp cr7,v14,v4"
+func_check "xststdcqp cr4,v2,127"
+func_check "xsabsqp v31,v22"
+func_check "xsxexpqp v25,v3"
+func_check "xsnabsqp v10,v28"
+func_check "xsnegqp v19,v31"
+func_check "xsxsigqp v11,v13"
+func_check "xssqrtqp v13,v14"
+func_check "xssqrtqpo v1,v27"
+func_check "xscvqpuwz v3,v7"
+func_check "xscvudqp v20,v18"
+func_check "xscvqpswz v29,v29"
+func_check "xscvsdqp v2,v28"
+func_check "xscvqpudz v23,v4"
+func_check "xscvqpdp v3,v20"
+func_check "xscvqpdpo v1,v3"
+func_check "xscvdpqp v19,v12"
+func_check "xscvqpsdz v13,v4"
+func_check "xsiexpqp v7,v24,v7"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx3.s ./gdb/testsuite/gdb.arch/powerpc-vsx3.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx3.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx3.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,141 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7c46ca19    /* lxvx    vs34,r6,r25        */
+	.long  0x7e805218    /* lxvx    vs20,0,r10         */
+	.long  0x7e98521a    /* lxvl    vs20,r24,r10       */
+	.long  0x7ec0ea1b    /* lxvl    vs54,0,r29         */
+	.long  0x7f149a5a    /* lxvll   vs24,r20,r19       */
+	.long  0x7c40725b    /* lxvll   vs34,0,r14         */
+	.long  0x7ec20266    /* mfvsrld r2,vs22            */
+	.long  0x7f5acad9    /* lxvwsx  vs58,r26,r25       */
+	.long  0x7ee0ead9    /* lxvwsx  vs55,0,r29         */
+	.long  0x7dd52318    /* stxvx   vs14,r21,r4        */
+	.long  0x7fc0b318    /* stxvx   vs30,0,r22         */
+	.long  0x7c1a231a    /* stxvl   vs0,r26,r4         */
+	.long  0x7ca0b31b    /* stxvl   vs37,0,r22         */
+	.long  0x7f0a0326    /* mtvsrws vs24,r10           */
+	.long  0x7fd57b5a    /* stxvll  vs30,r21,r15       */
+	.long  0x7ce0735b    /* stxvll  vs39,0,r14         */
+	.long  0x7d862b66    /* mtvsrdd vs12,r6,r5         */
+	.long  0x7cc0ab67    /* mtvsrdd vs38,0,r21         */
+	.long  0x7f7c361b    /* lxsibzx vs59,r28,r6        */
+	.long  0x7fc0461a    /* lxsibzx vs30,0,r8          */
+	.long  0x7d578e59    /* lxvh8x  vs42,r23,r17       */
+	.long  0x7c802e59    /* lxvh8x  vs36,0,r5          */
+	.long  0x7d895e5a    /* lxsihzx vs12,r9,r11        */
+	.long  0x7e206e5b    /* lxsihzx vs49,0,r13         */
+	.long  0x7ca39ed9    /* lxvb16x vs37,r3,r19        */
+	.long  0x7c00f6d8    /* lxvb16x vs0,0,r30          */
+	.long  0x7c5e371a    /* stxsibx vs2,r30,r6         */
+	.long  0x7d806f1a    /* stxsibx vs12,0,r13         */
+	.long  0x7e1d4758    /* stxvh8x vs16,r29,r8        */
+	.long  0x7ee05759    /* stxvh8x vs55,0,r10         */
+	.long  0x7c42bf5b    /* stxsihx vs34,r2,r23        */
+	.long  0x7f80bf5b    /* stxsihx vs60,0,r23         */
+	.long  0x7eee67d8    /* stxvb16x vs23,r14,r12      */
+	.long  0x7e602fd8    /* stxvb16x vs19,0,r5         */
+	.long  0xe7000002    /* lxsd    v24,0(0)           */
+	.long  0xe5f50012    /* lxsd    v15,16(r21)        */
+	.long  0xe4c00003    /* lxssp   v6,0(0)            */
+	.long  0xe6e90013    /* lxssp   v23,16(r9)         */
+	.long  0xf253081e    /* xscmpeqdp vs18,vs51,vs33   */
+	.long  0xf05a105a    /* xscmpgtdp vs2,vs26,vs34    */
+	.long  0xf0baa098    /* xscmpgedp vs5,vs26,vs20    */
+	.long  0xf18a58d3    /* xxperm  vs44,vs10,vs43     */
+	.long  0xf13429d1    /* xxpermr vs41,vs20,vs5      */
+	.long  0xf212b9da    /* xscmpexpdp cr4,vs18,vs55   */
+	.long  0xf2e32a96    /* xxextractuw vs23,vs37,3    */
+	.long  0xf2c75ad1    /* xxspltib vs54,235          */
+	.long  0xf1e4f2d4    /* xxinsertw vs15,vs30,4      */
+	.long  0xf18b3c00    /* xsmaxcdp vs12,vs11,vs7     */
+	.long  0xf019c441    /* xsmincdp vs32,vs25,vs24    */
+	.long  0xf3356484    /* xsmaxjdp vs25,vs53,vs12    */
+	.long  0xf17f24aa    /* xststdcsp cr2,vs36,127     */
+	.long  0xf0156cc3    /* xsminjdp vs32,vs21,vs45    */
+	.long  0xf220956e    /* xsxexpdp r17,vs50          */
+	.long  0xf0e1456e    /* xsxsigdp r7,vs40           */
+	.long  0xf2d0156f    /* xscvhpdp vs54,vs34         */
+	.long  0xf351b56f    /* xscvdphp vs58,vs54         */
+	.long  0xf07f35aa    /* xststdcdp cr0,vs38,127     */
+	.long  0xf31faeef    /* xvtstdcsp vs56,vs53,127    */
+	.long  0xf2d4a6c3    /* xviexpsp vs54,vs20,vs52    */
+	.long  0xf33cef2d    /* xsiexpdp vs57,r28,r29      */
+	.long  0xf020a76c    /* xvxexpdp vs1,vs20          */
+	.long  0xf2c1df6f    /* xvxsigdp vs54,vs59         */
+	.long  0xf2472f6e    /* xxbrh   vs18,vs37          */
+	.long  0xf1c80f6c    /* xvxexpsp vs14,vs1          */
+	.long  0xf2896f6d    /* xvxsigsp vs52,vs13         */
+	.long  0xf26f2f6c    /* xxbrw   vs19,vs5           */
+	.long  0xf277bf6f    /* xxbrd   vs51,vs55          */
+	.long  0xf0788f6d    /* xvcvhpsp vs35,vs17         */
+	.long  0xf1f96f6e    /* xvcvsphp vs15,vs45         */
+	.long  0xf23fff6c    /* xxbrq   vs17,vs31          */
+	.long  0xf21f67ec    /* xvtstdcdp vs16,vs12,127    */
+	.long  0xf36947c0    /* xviexpdp vs27,vs9,vs8      */
+	.long  0xf4800001    /* lxv     vs4,0(0)           */
+	.long  0xf5140019    /* lxv     vs40,16(r20)       */
+	.long  0xf640000d    /* stxv    vs50,0(0)          */
+	.long  0xf5100015    /* stxv    vs8,16(r16)        */
+	.long  0xf4600002    /* stxsd   v3,0(0)            */
+	.long  0xf6220012    /* stxsd   v17,16(r2)         */
+	.long  0xf5a00003    /* stxssp  v13,0(0)           */
+	.long  0xf62d0013    /* stxssp  v17,16(r13)        */
+	.long  0xfd0a9008    /* xsaddqp v8,v10,v18         */
+	.long  0xfca1e809    /* xsaddqpo v5,v1,v29         */
+	.long  0xfd80960a    /* xsrqpi  0,v12,v18,3        */
+	.long  0xffe1980b    /* xsrqpix 1,v31,v19,0        */
+	.long  0xfdc13048    /* xsmulqp v14,v1,v6          */
+	.long  0xfe27d849    /* xsmulqpo v17,v7,v27        */
+	.long  0xfc80584a    /* xsrqpxp 0,v4,v11,0         */
+	.long  0xffb7e0c8    /* xscpsgnqp v29,v23,v28      */
+	.long  0xff8dd908    /* xscmpoqp cr7,v13,v27       */
+	.long  0xfe953148    /* xscmpexpqp cr5,v21,v6      */
+	.long  0xfc532308    /* xsmaddqp v2,v19,v4         */
+	.long  0xffc78309    /* xsmaddqpo v30,v7,v16       */
+	.long  0xfebe7b48    /* xsmsubqp v21,v30,v15       */
+	.long  0xfd91f349    /* xsmsubqpo v12,v17,v30      */
+	.long  0xfcde6388    /* xsnmaddqp v6,v30,v12       */
+	.long  0xfd966389    /* xsnmaddqpo v12,v22,v12     */
+	.long  0xfd5ddbc8    /* xsnmsubqp v10,v29,v27      */
+	.long  0xffbd6bc9    /* xsnmsubqpo v29,v29,v13     */
+	.long  0xfe7b2408    /* xssubqp v19,v27,v4         */
+	.long  0xfda80c09    /* xssubqpo v13,v8,v1         */
+	.long  0xfd03dc48    /* xsdivqp v8,v3,v27          */
+	.long  0xff14dc49    /* xsdivqpo v24,v20,v27       */
+	.long  0xff8e2508    /* xscmpuqp cr7,v14,v4        */
+	.long  0xfe7f1588    /* xststdcqp cr4,v2,127       */
+	.long  0xffe0b648    /* xsabsqp v31,v22            */
+	.long  0xff221e48    /* xsxexpqp v25,v3            */
+	.long  0xfd48e648    /* xsnabsqp v10,v28           */
+	.long  0xfe70fe48    /* xsnegqp v19,v31            */
+	.long  0xfd726e48    /* xsxsigqp v11,v13           */
+	.long  0xfdbb7648    /* xssqrtqp v13,v14           */
+	.long  0xfc3bde49    /* xssqrtqpo v1,v27           */
+	.long  0xfc613e88    /* xscvqpuwz v3,v7            */
+	.long  0xfe829688    /* xscvudqp v20,v18           */
+	.long  0xffa9ee88    /* xscvqpswz v29,v29          */
+	.long  0xfc4ae688    /* xscvsdqp v2,v28            */
+	.long  0xfef12688    /* xscvqpudz v23,v4           */
+	.long  0xfc74a688    /* xscvqpdp v3,v20            */
+	.long  0xfc341e89    /* xscvqpdpo v1,v3            */
+	.long  0xfe766688    /* xscvdpqp v19,v12           */
+	.long  0xfdb92688    /* xscvqpsdz v13,v4           */
+	.long  0xfcf83ec8    /* xsiexpqp v7,v24,v7         */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx.exp ./gdb/testsuite/gdb.arch/powerpc-vsx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,225 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+    verbose "Skipping PowerPC instructions disassembly."
+    return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+    untested "PowerPC instructions disassembly"
+    return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options vsx"
+set test "disass func"
+gdb_test_multiple $test $test {
+    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+	set func $expect_out(1,string)
+	pass $test
+    }
+}
+
+proc instr_to_patt {instr} {
+    global decimal hex
+    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
+    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+    global func
+
+    set test "found: $instr"
+    if [regexp -nocase -line [instr_to_patt $instr] $func] {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+func_check "lxsdx   vs40,r10,r20"
+func_check "lxvd2x  vs40,r10,r20"
+func_check "lxvdsx  vs40,r10,r20"
+func_check "lxvw4x  vs40,r10,r20"
+func_check "stxsdx  vs40,r10,r20"
+func_check "stxvd2x vs40,r10,r20"
+func_check "stxvw4x vs40,r10,r20"
+func_check "xsabsdp vs40,vs60"
+func_check "xsadddp vs40,vs50,vs60"
+func_check "xscmpodp cr1,vs50,vs60"
+func_check "xscmpudp cr1,vs50,vs60"
+func_check "xscpsgndp vs40,vs50,vs60"
+func_check "xscvdpsp vs40,vs60"
+func_check "xscvdpsxds vs40,vs60"
+func_check "xscvdpsxws vs40,vs60"
+func_check "xscvdpuxds vs40,vs60"
+func_check "xscvdpuxws vs40,vs60"
+func_check "xscvspdp vs40,vs60"
+func_check "xscvsxddp vs40,vs60"
+func_check "xscvuxddp vs40,vs60"
+func_check "xsdivdp vs40,vs50,vs60"
+func_check "xsmaddadp vs40,vs50,vs60"
+func_check "xsmaddmdp vs40,vs50,vs60"
+func_check "xsmaxdp vs40,vs50,vs60"
+func_check "xsmindp vs40,vs50,vs60"
+func_check "xsmsubadp vs40,vs50,vs60"
+func_check "xsmsubmdp vs40,vs50,vs60"
+func_check "xsmuldp vs40,vs50,vs60"
+func_check "xsnabsdp vs40,vs60"
+func_check "xsnegdp vs40,vs60"
+func_check "xsnmaddadp vs40,vs50,vs60"
+func_check "xsnmaddmdp vs40,vs50,vs60"
+func_check "xsnmsubadp vs40,vs50,vs60"
+func_check "xsnmsubmdp vs40,vs50,vs60"
+func_check "xsrdpi  vs40,vs60"
+func_check "xsrdpic vs40,vs60"
+func_check "xsrdpim vs40,vs60"
+func_check "xsrdpip vs40,vs60"
+func_check "xsrdpiz vs40,vs60"
+func_check "xsredp  vs40,vs60"
+func_check "xsrsqrtedp vs40,vs60"
+func_check "xssqrtdp vs40,vs60"
+func_check "xssubdp vs40,vs50,vs60"
+func_check "xstdivdp cr1,vs50,vs60"
+func_check "xstsqrtdp cr1,vs60"
+func_check "xvabsdp vs40,vs60"
+func_check "xvabssp vs40,vs60"
+func_check "xvadddp vs40,vs50,vs60"
+func_check "xvaddsp vs40,vs50,vs60"
+func_check "xvcmpeqdp vs40,vs50,vs60"
+func_check "xvcmpeqdp. vs40,vs50,vs60"
+func_check "xvcmpeqsp vs40,vs50,vs60"
+func_check "xvcmpeqsp. vs40,vs50,vs60"
+func_check "xvcmpgedp vs40,vs50,vs60"
+func_check "xvcmpgedp. vs40,vs50,vs60"
+func_check "xvcmpgesp vs40,vs50,vs60"
+func_check "xvcmpgesp. vs40,vs50,vs60"
+func_check "xvcmpgtdp vs40,vs50,vs60"
+func_check "xvcmpgtdp. vs40,vs50,vs60"
+func_check "xvcmpgtsp vs40,vs50,vs60"
+func_check "xvcmpgtsp. vs40,vs50,vs60"
+func_check "xvcpsgndp vs40,vs50,vs60"
+func_check "xvmovdp vs40,vs60"
+func_check "xvmovdp vs40,vs60"
+func_check "xvcpsgnsp vs40,vs50,vs60"
+func_check "xvmovsp vs40,vs60"
+func_check "xvmovsp vs40,vs60"
+func_check "xvcvdpsp vs40,vs60"
+func_check "xvcvdpsxds vs40,vs60"
+func_check "xvcvdpsxws vs40,vs60"
+func_check "xvcvdpuxds vs40,vs60"
+func_check "xvcvdpuxws vs40,vs60"
+func_check "xvcvspdp vs40,vs60"
+func_check "xvcvspsxds vs40,vs60"
+func_check "xvcvspsxws vs40,vs60"
+func_check "xvcvspuxds vs40,vs60"
+func_check "xvcvspuxws vs40,vs60"
+func_check "xvcvsxddp vs40,vs60"
+func_check "xvcvsxdsp vs40,vs60"
+func_check "xvcvsxwdp vs40,vs60"
+func_check "xvcvsxwsp vs40,vs60"
+func_check "xvcvuxddp vs40,vs60"
+func_check "xvcvuxdsp vs40,vs60"
+func_check "xvcvuxwdp vs40,vs60"
+func_check "xvcvuxwsp vs40,vs60"
+func_check "xvdivdp vs40,vs50,vs60"
+func_check "xvdivsp vs40,vs50,vs60"
+func_check "xvmaddadp vs40,vs50,vs60"
+func_check "xvmaddmdp vs40,vs50,vs60"
+func_check "xvmaddasp vs40,vs50,vs60"
+func_check "xvmaddmsp vs40,vs50,vs60"
+func_check "xvmaxdp vs40,vs50,vs60"
+func_check "xvmaxsp vs40,vs50,vs60"
+func_check "xvmindp vs40,vs50,vs60"
+func_check "xvminsp vs40,vs50,vs60"
+func_check "xvmsubadp vs40,vs50,vs60"
+func_check "xvmsubmdp vs40,vs50,vs60"
+func_check "xvmsubasp vs40,vs50,vs60"
+func_check "xvmsubmsp vs40,vs50,vs60"
+func_check "xvmuldp vs40,vs50,vs60"
+func_check "xvmulsp vs40,vs50,vs60"
+func_check "xvnabsdp vs40,vs60"
+func_check "xvnabssp vs40,vs60"
+func_check "xvnegdp vs40,vs60"
+func_check "xvnegsp vs40,vs60"
+func_check "xvnmaddadp vs40,vs50,vs60"
+func_check "xvnmaddmdp vs40,vs50,vs60"
+func_check "xvnmaddasp vs40,vs50,vs60"
+func_check "xvnmaddmsp vs40,vs50,vs60"
+func_check "xvnmsubadp vs40,vs50,vs60"
+func_check "xvnmsubmdp vs40,vs50,vs60"
+func_check "xvnmsubasp vs40,vs50,vs60"
+func_check "xvnmsubmsp vs40,vs50,vs60"
+func_check "xvrdpi  vs40,vs60"
+func_check "xvrdpic vs40,vs60"
+func_check "xvrdpim vs40,vs60"
+func_check "xvrdpip vs40,vs60"
+func_check "xvrdpiz vs40,vs60"
+func_check "xvredp  vs40,vs60"
+func_check "xvresp  vs40,vs60"
+func_check "xvrspi  vs40,vs60"
+func_check "xvrspic vs40,vs60"
+func_check "xvrspim vs40,vs60"
+func_check "xvrspip vs40,vs60"
+func_check "xvrspiz vs40,vs60"
+func_check "xvrsqrtedp vs40,vs60"
+func_check "xvrsqrtesp vs40,vs60"
+func_check "xvsqrtdp vs40,vs60"
+func_check "xvsqrtsp vs40,vs60"
+func_check "xvsubdp vs40,vs50,vs60"
+func_check "xvsubsp vs40,vs50,vs60"
+func_check "xvtdivdp cr1,vs50,vs60"
+func_check "xvtdivsp cr1,vs50,vs60"
+func_check "xvtsqrtdp cr1,vs60"
+func_check "xvtsqrtsp cr1,vs60"
+func_check "xxland  vs40,vs50,vs60"
+func_check "xxlandc vs40,vs50,vs60"
+func_check "xxlnor  vs40,vs50,vs60"
+func_check "xxlor   vs40,vs50,vs60"
+func_check "xxlxor  vs40,vs50,vs60"
+func_check "xxmrghw vs40,vs50,vs60"
+func_check "xxmrglw vs40,vs50,vs60"
+func_check "xxmrghd vs40,vs50,vs60"
+func_check "xxpermdi vs40,vs50,vs60,1"
+func_check "xxpermdi vs40,vs50,vs60,2"
+func_check "xxmrgld vs40,vs50,vs60"
+func_check "xxspltd vs40,vs50,0"
+func_check "xxspltd vs40,vs50,0"
+func_check "xxspltd vs40,vs50,1"
+func_check "xxspltd vs40,vs50,1"
+func_check "xxmrghd vs40,vs50,vs60"
+func_check "xxmrghd vs40,vs50,vs60"
+func_check "xxmrgld vs40,vs50,vs60"
+func_check "xxswapd vs40,vs50"
+func_check "xxswapd vs40,vs50"
+func_check "xxsel   vs40,vs50,vs60,vs62"
+func_check "xxsldwi vs40,vs50,vs60,2"
+func_check "xxspltw vs40,vs60,2"
+func_check "lxvd2x  vs40,0,r20"
+func_check "lxvd2x  vs40,r10,r20"
+func_check "stxvd2x vs40,0,r20"
+func_check "stxvd2x vs40,r10,r20"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx.s ./gdb/testsuite/gdb.arch/powerpc-vsx.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/powerpc-vsx.s	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/powerpc-vsx.s	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,182 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl func
+func:
+	.long  0x7d0aa499    /* lxsdx   vs40,r10,r20       */
+	.long  0x7d0aa699    /* lxvd2x  vs40,r10,r20       */
+	.long  0x7d0aa299    /* lxvdsx  vs40,r10,r20       */
+	.long  0x7d0aa619    /* lxvw4x  vs40,r10,r20       */
+	.long  0x7d0aa599    /* stxsdx  vs40,r10,r20       */
+	.long  0x7d0aa799    /* stxvd2x vs40,r10,r20       */
+	.long  0x7d0aa719    /* stxvw4x vs40,r10,r20       */
+	.long  0xf100e567    /* xsabsdp vs40,vs60          */
+	.long  0xf112e107    /* xsadddp vs40,vs50,vs60     */
+	.long  0xf092e15e    /* xscmpodp cr1,vs50,vs60     */
+	.long  0xf092e11e    /* xscmpudp cr1,vs50,vs60     */
+	.long  0xf112e587    /* xscpsgndp vs40,vs50,vs60   */
+	.long  0xf100e427    /* xscvdpsp vs40,vs60         */
+	.long  0xf100e563    /* xscvdpsxds vs40,vs60       */
+	.long  0xf100e163    /* xscvdpsxws vs40,vs60       */
+	.long  0xf100e523    /* xscvdpuxds vs40,vs60       */
+	.long  0xf100e123    /* xscvdpuxws vs40,vs60       */
+	.long  0xf100e527    /* xscvspdp vs40,vs60         */
+	.long  0xf100e5e3    /* xscvsxddp vs40,vs60        */
+	.long  0xf100e5a3    /* xscvuxddp vs40,vs60        */
+	.long  0xf112e1c7    /* xsdivdp vs40,vs50,vs60     */
+	.long  0xf112e10f    /* xsmaddadp vs40,vs50,vs60   */
+	.long  0xf112e14f    /* xsmaddmdp vs40,vs50,vs60   */
+	.long  0xf112e507    /* xsmaxdp vs40,vs50,vs60     */
+	.long  0xf112e547    /* xsmindp vs40,vs50,vs60     */
+	.long  0xf112e18f    /* xsmsubadp vs40,vs50,vs60   */
+	.long  0xf112e1cf    /* xsmsubmdp vs40,vs50,vs60   */
+	.long  0xf112e187    /* xsmuldp vs40,vs50,vs60     */
+	.long  0xf100e5a7    /* xsnabsdp vs40,vs60         */
+	.long  0xf100e5e7    /* xsnegdp vs40,vs60          */
+	.long  0xf112e50f    /* xsnmaddadp vs40,vs50,vs60  */
+	.long  0xf112e54f    /* xsnmaddmdp vs40,vs50,vs60  */
+	.long  0xf112e58f    /* xsnmsubadp vs40,vs50,vs60  */
+	.long  0xf112e5cf    /* xsnmsubmdp vs40,vs50,vs60  */
+	.long  0xf100e127    /* xsrdpi  vs40,vs60          */
+	.long  0xf100e1af    /* xsrdpic vs40,vs60          */
+	.long  0xf100e1e7    /* xsrdpim vs40,vs60          */
+	.long  0xf100e1a7    /* xsrdpip vs40,vs60          */
+	.long  0xf100e167    /* xsrdpiz vs40,vs60          */
+	.long  0xf100e16b    /* xsredp  vs40,vs60          */
+	.long  0xf100e12b    /* xsrsqrtedp vs40,vs60       */
+	.long  0xf100e12f    /* xssqrtdp vs40,vs60         */
+	.long  0xf112e147    /* xssubdp vs40,vs50,vs60     */
+	.long  0xf092e1ee    /* xstdivdp cr1,vs50,vs60     */
+	.long  0xf080e1aa    /* xstsqrtdp cr1,vs60         */
+	.long  0xf100e767    /* xvabsdp vs40,vs60          */
+	.long  0xf100e667    /* xvabssp vs40,vs60          */
+	.long  0xf112e307    /* xvadddp vs40,vs50,vs60     */
+	.long  0xf112e207    /* xvaddsp vs40,vs50,vs60     */
+	.long  0xf112e31f    /* xvcmpeqdp vs40,vs50,vs60   */
+	.long  0xf112e71f    /* xvcmpeqdp. vs40,vs50,vs60  */
+	.long  0xf112e21f    /* xvcmpeqsp vs40,vs50,vs60   */
+	.long  0xf112e61f    /* xvcmpeqsp. vs40,vs50,vs60  */
+	.long  0xf112e39f    /* xvcmpgedp vs40,vs50,vs60   */
+	.long  0xf112e79f    /* xvcmpgedp. vs40,vs50,vs60  */
+	.long  0xf112e29f    /* xvcmpgesp vs40,vs50,vs60   */
+	.long  0xf112e69f    /* xvcmpgesp. vs40,vs50,vs60  */
+	.long  0xf112e35f    /* xvcmpgtdp vs40,vs50,vs60   */
+	.long  0xf112e75f    /* xvcmpgtdp. vs40,vs50,vs60  */
+	.long  0xf112e25f    /* xvcmpgtsp vs40,vs50,vs60   */
+	.long  0xf112e65f    /* xvcmpgtsp. vs40,vs50,vs60  */
+	.long  0xf112e787    /* xvcpsgndp vs40,vs50,vs60   */
+	.long  0xf11ce787    /* xvmovdp vs40,vs60          */
+	.long  0xf11ce787    /* xvmovdp vs40,vs60          */
+	.long  0xf112e687    /* xvcpsgnsp vs40,vs50,vs60   */
+	.long  0xf11ce687    /* xvmovsp vs40,vs60          */
+	.long  0xf11ce687    /* xvmovsp vs40,vs60          */
+	.long  0xf100e627    /* xvcvdpsp vs40,vs60         */
+	.long  0xf100e763    /* xvcvdpsxds vs40,vs60       */
+	.long  0xf100e363    /* xvcvdpsxws vs40,vs60       */
+	.long  0xf100e723    /* xvcvdpuxds vs40,vs60       */
+	.long  0xf100e323    /* xvcvdpuxws vs40,vs60       */
+	.long  0xf100e727    /* xvcvspdp vs40,vs60         */
+	.long  0xf100e663    /* xvcvspsxds vs40,vs60       */
+	.long  0xf100e263    /* xvcvspsxws vs40,vs60       */
+	.long  0xf100e623    /* xvcvspuxds vs40,vs60       */
+	.long  0xf100e223    /* xvcvspuxws vs40,vs60       */
+	.long  0xf100e7e3    /* xvcvsxddp vs40,vs60        */
+	.long  0xf100e6e3    /* xvcvsxdsp vs40,vs60        */
+	.long  0xf100e3e3    /* xvcvsxwdp vs40,vs60        */
+	.long  0xf100e2e3    /* xvcvsxwsp vs40,vs60        */
+	.long  0xf100e7a3    /* xvcvuxddp vs40,vs60        */
+	.long  0xf100e6a3    /* xvcvuxdsp vs40,vs60        */
+	.long  0xf100e3a3    /* xvcvuxwdp vs40,vs60        */
+	.long  0xf100e2a3    /* xvcvuxwsp vs40,vs60        */
+	.long  0xf112e3c7    /* xvdivdp vs40,vs50,vs60     */
+	.long  0xf112e2c7    /* xvdivsp vs40,vs50,vs60     */
+	.long  0xf112e30f    /* xvmaddadp vs40,vs50,vs60   */
+	.long  0xf112e34f    /* xvmaddmdp vs40,vs50,vs60   */
+	.long  0xf112e20f    /* xvmaddasp vs40,vs50,vs60   */
+	.long  0xf112e24f    /* xvmaddmsp vs40,vs50,vs60   */
+	.long  0xf112e707    /* xvmaxdp vs40,vs50,vs60     */
+	.long  0xf112e607    /* xvmaxsp vs40,vs50,vs60     */
+	.long  0xf112e747    /* xvmindp vs40,vs50,vs60     */
+	.long  0xf112e647    /* xvminsp vs40,vs50,vs60     */
+	.long  0xf112e38f    /* xvmsubadp vs40,vs50,vs60   */
+	.long  0xf112e3cf    /* xvmsubmdp vs40,vs50,vs60   */
+	.long  0xf112e28f    /* xvmsubasp vs40,vs50,vs60   */
+	.long  0xf112e2cf    /* xvmsubmsp vs40,vs50,vs60   */
+	.long  0xf112e387    /* xvmuldp vs40,vs50,vs60     */
+	.long  0xf112e287    /* xvmulsp vs40,vs50,vs60     */
+	.long  0xf100e7a7    /* xvnabsdp vs40,vs60         */
+	.long  0xf100e6a7    /* xvnabssp vs40,vs60         */
+	.long  0xf100e7e7    /* xvnegdp vs40,vs60          */
+	.long  0xf100e6e7    /* xvnegsp vs40,vs60          */
+	.long  0xf112e70f    /* xvnmaddadp vs40,vs50,vs60  */
+	.long  0xf112e74f    /* xvnmaddmdp vs40,vs50,vs60  */
+	.long  0xf112e60f    /* xvnmaddasp vs40,vs50,vs60  */
+	.long  0xf112e64f    /* xvnmaddmsp vs40,vs50,vs60  */
+	.long  0xf112e78f    /* xvnmsubadp vs40,vs50,vs60  */
+	.long  0xf112e7cf    /* xvnmsubmdp vs40,vs50,vs60  */
+	.long  0xf112e68f    /* xvnmsubasp vs40,vs50,vs60  */
+	.long  0xf112e6cf    /* xvnmsubmsp vs40,vs50,vs60  */
+	.long  0xf100e327    /* xvrdpi  vs40,vs60          */
+	.long  0xf100e3af    /* xvrdpic vs40,vs60          */
+	.long  0xf100e3e7    /* xvrdpim vs40,vs60          */
+	.long  0xf100e3a7    /* xvrdpip vs40,vs60          */
+	.long  0xf100e367    /* xvrdpiz vs40,vs60          */
+	.long  0xf100e36b    /* xvredp  vs40,vs60          */
+	.long  0xf100e26b    /* xvresp  vs40,vs60          */
+	.long  0xf100e227    /* xvrspi  vs40,vs60          */
+	.long  0xf100e2af    /* xvrspic vs40,vs60          */
+	.long  0xf100e2e7    /* xvrspim vs40,vs60          */
+	.long  0xf100e2a7    /* xvrspip vs40,vs60          */
+	.long  0xf100e267    /* xvrspiz vs40,vs60          */
+	.long  0xf100e32b    /* xvrsqrtedp vs40,vs60       */
+	.long  0xf100e22b    /* xvrsqrtesp vs40,vs60       */
+	.long  0xf100e32f    /* xvsqrtdp vs40,vs60         */
+	.long  0xf100e22f    /* xvsqrtsp vs40,vs60         */
+	.long  0xf112e347    /* xvsubdp vs40,vs50,vs60     */
+	.long  0xf112e247    /* xvsubsp vs40,vs50,vs60     */
+	.long  0xf092e3ee    /* xvtdivdp cr1,vs50,vs60     */
+	.long  0xf092e2ee    /* xvtdivsp cr1,vs50,vs60     */
+	.long  0xf080e3aa    /* xvtsqrtdp cr1,vs60         */
+	.long  0xf080e2aa    /* xvtsqrtsp cr1,vs60         */
+	.long  0xf112e417    /* xxland  vs40,vs50,vs60     */
+	.long  0xf112e457    /* xxlandc vs40,vs50,vs60     */
+	.long  0xf112e517    /* xxlnor  vs40,vs50,vs60     */
+	.long  0xf112e497    /* xxlor   vs40,vs50,vs60     */
+	.long  0xf112e4d7    /* xxlxor  vs40,vs50,vs60     */
+	.long  0xf112e097    /* xxmrghw vs40,vs50,vs60     */
+	.long  0xf112e197    /* xxmrglw vs40,vs50,vs60     */
+	.long  0xf112e057    /* xxmrghd vs40,vs50,vs60     */
+	.long  0xf112e157    /* xxpermdi vs40,vs50,vs60,1  */
+	.long  0xf112e257    /* xxpermdi vs40,vs50,vs60,2  */
+	.long  0xf112e357    /* xxmrgld vs40,vs50,vs60     */
+	.long  0xf1129057    /* xxspltd vs40,vs50,0        */
+	.long  0xf1129057    /* xxspltd vs40,vs50,0        */
+	.long  0xf1129357    /* xxspltd vs40,vs50,1        */
+	.long  0xf1129357    /* xxspltd vs40,vs50,1        */
+	.long  0xf112e057    /* xxmrghd vs40,vs50,vs60     */
+	.long  0xf112e057    /* xxmrghd vs40,vs50,vs60     */
+	.long  0xf112e357    /* xxmrgld vs40,vs50,vs60     */
+	.long  0xf1129257    /* xxswapd vs40,vs50          */
+	.long  0xf1129257    /* xxswapd vs40,vs50          */
+	.long  0xf112e7bf    /* xxsel   vs40,vs50,vs60,vs62 */
+	.long  0xf112e217    /* xxsldwi vs40,vs50,vs60,2   */
+	.long  0xf102e293    /* xxspltw vs40,vs60,2        */
+	.long  0x7d00a699    /* lxvd2x  vs40,0,r20         */
+	.long  0x7d0aa699    /* lxvd2x  vs40,r10,r20       */
+	.long  0x7d00a799    /* stxvd2x vs40,0,r20         */
+	.long  0x7d0aa799    /* stxvd2x vs40,r10,r20       */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp ./gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,31 +28,45 @@ if {![istarget "powerpc*"] || ![is_lp64_
 
 standard_testfile .S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug quiet}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug quiet}] } {
     return -1
 }
 
-if ![runto_main] then {
-    untested "could not run to main"
-    return -1
-}
+# The test proper.  DISPLACED is true if we should try with displaced
+# stepping.
+proc do_test { displaced } {
+    global decimal hex
+
+    if ![runto_main] then {
+	untested "could not run to main"
+	return -1
+    }
+
+    gdb_test_no_output "set displaced-stepping $displaced"
 
-set bp1 [gdb_get_line_number "lwarx"]
-gdb_breakpoint "$bp1" "Breakpoint $decimal at $hex" \
-  "Set the breakpoint at the start of the lwarx/stwcx sequence"
+    set bp1 [gdb_get_line_number "lwarx"]
+    gdb_breakpoint "$bp1" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the lwarx/stwcx sequence"
 
-set bp2 [gdb_get_line_number "ldarx"]
-gdb_breakpoint "$bp2" "Breakpoint $decimal at $hex" \
-  "Set the breakpoint at the start of the ldarx/stdcx sequence"
+    set bp2 [gdb_get_line_number "ldarx"]
+    gdb_breakpoint "$bp2" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the ldarx/stdcx sequence"
 
-gdb_test continue "Continuing.*Breakpoint $decimal.*" \
-  "Continue until lwarx/stwcx start breakpoint"
+    gdb_test continue "Continuing.*Breakpoint $decimal.*" \
+	"continue until lwarx/stwcx start breakpoint"
 
-gdb_test nexti "bne.*1b" \
-  "Step through the lwarx/stwcx sequence"
+    gdb_test nexti "bne.*1b" \
+	"step through the lwarx/stwcx sequence"
 
-gdb_test continue "Continuing.*Breakpoint $decimal.*" \
-  "Continue until ldarx/stdcx start breakpoint"
+    gdb_test continue "Continuing.*Breakpoint $decimal.*" \
+	"continue until ldarx/stdcx start breakpoint"
 
-gdb_test nexti "bne.*1b" \
-  "Step through the ldarx/stdcx sequence"
+    gdb_test nexti "bne.*1b" \
+	"step through the ldarx/stdcx sequence"
+}
+
+foreach displaced { "off" "on" } {
+    with_test_prefix "displaced=$displaced" {
+	do_test $displaced
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-atomic-inst.S ./gdb/testsuite/gdb.arch/ppc64-atomic-inst.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-atomic-inst.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-atomic-inst.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+/* Copyright 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <elf.h>
+
+typedef Elf64_auxv_t auxv_t;
+
+#ifndef PPC_FEATURE2_ARCH_2_07
+#define PPC_FEATURE2_ARCH_2_07	0x80000000
+#endif
+
+extern void test_atomic_sequences (void);
+
+int
+main (int argc, char *argv[], char *envp[], auxv_t auxv[])
+{
+  int i;
+
+  for (i = 0; auxv[i].a_type != AT_NULL; i++)
+    if (auxv[i].a_type == AT_HWCAP2) {
+      if (!(auxv[i].a_un.a_val & PPC_FEATURE2_ARCH_2_07))
+        return 1;
+      break;
+    }
+
+  test_atomic_sequences ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,99 @@
+# Copyright 2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+# Test single stepping through POWER8/ISA 2.07 atomic sequences beginning with
+# a lbarx/lharx/lqarx instruction and ending with a stbcx/sthcx/stqxc
+# instruction.  Note that although lbarx, lharx, stbcx and sthcx instructions
+# were introduced in ISA 2.06, they were implemented only in POWER8 (ISA 2.07).
+
+
+if {![istarget "powerpc*"] || ![is_lp64_target]} {
+    untested "skipping powerpc isa 207 atomic sequences test"
+    return
+}
+
+standard_testfile  .c .S
+
+if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
+      {debug quiet}] } {
+    return -1
+}
+
+# The test proper.  DISPLACED is true if we should try with displaced
+# stepping.
+
+proc do_test { displaced } {
+    global decimal hex
+    global gdb_prompt inferior_exited_re srcfile srcfile2
+
+    if ![runto_main] then {
+	untested "could not run to main"
+	return -1
+    }
+
+    gdb_test_no_output "set displaced-stepping $displaced"
+
+    gdb_breakpoint "test_atomic_sequences" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the test function"
+
+    gdb_test_multiple "continue" "Continue until lbarx/stbcx start breakpoint" {
+      -re "$inferior_exited_re with code 01.\[\r\n\]+$gdb_prompt $" {
+	unsupported "POWER8/ISA 2.07 atomic instructions not supported."
+	return -1
+      }
+      -re "Continuing.*Breakpoint $decimal.*$gdb_prompt $" {
+	pass "continue until test_atomic_sequences function"
+      }
+    }
+
+    set bp1 [gdb_get_line_number "lbarx" "$srcfile2"]
+    gdb_breakpoint "$bp1" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the lbarx/stbcx sequence"
+
+    set bp2 [gdb_get_line_number "lharx" "$srcfile2"]
+    gdb_breakpoint "$bp2" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the lharx/sthcx sequence"
+
+    set bp3 [gdb_get_line_number "lqarx" "$srcfile2"]
+    gdb_breakpoint "$bp3" "Breakpoint $decimal at $hex" \
+	"set the breakpoint at the start of the lqarx/stqcx sequence"
+
+    gdb_test continue "Continuing.*Breakpoint $decimal.*" \
+	"continue until lbarx/stbcx start breakpoint"
+
+    gdb_test nexti "bne.*1b" \
+	"step through the lbarx/stbcx sequence"
+
+    gdb_test continue "Continuing.*Breakpoint $decimal.*" \
+	"continue until lharx/sthcx start breakpoint"
+
+    gdb_test nexti "bne.*2b" \
+	"step through the lharx/sthcx sequence"
+
+    gdb_test continue "Continuing.*Breakpoint $decimal.*" \
+	"continue until ldqrx/stqcx start breakpoint"
+
+    gdb_test nexti "bne.*3b" \
+	"step through the lqarx/stqcx sequence"
+}
+
+foreach displaced { "off" "on" } {
+    with_test_prefix "displaced=$displaced" {
+	do_test $displaced
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.S ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,100 @@
+/* This file is part of GDB, the GNU debugger.
+
+   Copyright 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.align 2
+	.globl test_atomic_sequences
+#if _CALL_ELF == 2
+	.type test_atomic_sequences,@function
+test_atomic_sequences:
+#else
+	.section ".opd","aw"
+	.align 3
+test_atomic_sequences:
+	.quad .test_atomic_sequences,.TOC.@tocbase,0
+	.size test_atomic_sequences,.-test_atomic_sequences
+	.previous
+	.globl .test_atomic_sequences
+	.type .test_atomic_sequences,@function
+.test_atomic_sequences:
+#endif
+
+	li	0,0
+	addi	4,1,-8
+
+	stb	0,0(4)
+1:	lbarx	5,0,4
+	cmpdi	5,0
+	bne	2f
+	addi	5,5,1
+	stbcx.	5,0,4
+	bne	1b
+
+	sth	0,0(4)
+2:	lharx	5,0,4
+	cmpdi	5,0
+	bne	3f
+	addi	5,5,1
+	sthcx.	5,0,4
+	bne	2b
+
+#ifdef	__BIG_ENDIAN__
+	li 10,0
+	li 6,0
+	li 7,1
+	std 10,-16(1)
+	li 10,1
+	std 10,-8(1)
+	addi 4,1,-16
+#else
+	std 9,40(1)
+	li 9,1
+	addi 4,1,32
+	std 9,32(1)
+	mr 8,9
+	ld 3,8(4)
+#endif
+3:	lqarx 10,0,4
+#ifdef	__BIG_ENDIAN__
+	li 8,0
+	li 9,2
+	mr 5,10
+	xor 10,11,7
+	xor 5,5,6
+	or. 4,5,10
+	bne 4f
+	addi 10,1,-16
+	stqcx. 8,0,10
+#else
+	xor 9,11,8
+	mr 6,11
+	xor 11,10,3
+	or. 0,9,11
+	bne 4f
+	li 14,0
+	li 15,2
+	stqcx. 14,0,4
+#endif
+	bne 3b
+
+4:	li	3,0
+	blr
+
+#if _CALL_ELF == 2
+	.size test_atomic_sequences,.-test_atomic_sequences
+#else
+	.size .test_atomic_sequences,.-.test_atomic_sequences
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp ./gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,12 +13,17 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+if {![istarget "powerpc*"] || ![is_lp64_target]} {
+    verbose "Skipping powerpc64 separate debug file symtab test."
+    return
+}
+
 standard_testfile
 
 set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2
-set kofile ${objdir}/${subdir}/cordic.ko
+set kofile [standard_output_file cordic.ko]
 set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2
-set kodebugfile ${objdir}/${subdir}/cordic.ko.debug
+set kodebugfile [standard_output_file cordic.ko.debug]
 
 if {[catch "system \"bzip2 -dc ${kobz2file} >${kofile}\""] != 0} {
     untested "failed bzip2 for ${kobz2file}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-dfp.c ./gdb/testsuite/gdb.arch/ppc-dfp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-dfp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc-dfp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Free Software Foundation, Inc.
+/* Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-dfp.exp ./gdb/testsuite/gdb.arch/ppc-dfp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-dfp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc-dfp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
     return
 }
 
-set testfile "ppc-dfp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
 
 if [get_compiler_info] {
     warning "get_compiler failed"
@@ -37,7 +35,7 @@ if ![test_compiler_info gcc*] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
-    unsupported "This machine doesn't support Decimal Floating Point."
+    unsupported "this machine doesn't support Decimal Floating Point."
     return -1
 }
 
@@ -56,7 +54,7 @@ gdb_run_cmd
 # Unless the program bails out after checking AT_HWCAP.
 gdb_expect {
   -re "$inferior_exited_re with code 01.\[\r\n\]+$gdb_prompt $" {
-    unsupported "This machine doesn't support Decimal Floating Point."
+    unsupported "this machine doesn't support Decimal Floating Point."
     return -1
   }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-fp.c ./gdb/testsuite/gdb.arch/ppc-fp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-fp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc-fp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Free Software Foundation, Inc.
+/* Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-fp.exp ./gdb/testsuite/gdb.arch/ppc-fp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/ppc-fp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/ppc-fp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
     return
 }
 
-set testfile "ppc-fp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
 
 if [get_compiler_info] {
     warning "get_compiler failed"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-disassembler-options.exp ./gdb/testsuite/gdb.arch/s390-disassembler-options.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-disassembler-options.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-disassembler-options.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# This test exercises set/show disassembler-options results are preserved
+# across multiple set architecture calls.
+
+if {![istarget "s390*-*-*"]} then {
+    verbose "Skipping S390 disassembler options."
+    return
+}
+
+gdb_exit
+gdb_start
+
+set option "esa"
+set arch1 "s390:64-bit"
+set arch2 "s390:31-bit"
+
+gdb_test "set architecture $arch1" \
+	"The target architecture is assumed to be $arch1" \
+	"set architecture $arch1"
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are ''.*" \
+	"show NULL disassembler-options"
+
+gdb_test_no_output "set disassembler-options $option"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
+# Change architectures and verify the disassembler options have been preserved.
+
+gdb_test "set architecture $arch2" \
+	"The target architecture is assumed to be $arch2" \
+	"set architecture $arch2"
+
+gdb_test "show disassembler-options" \
+	"The current disassembler options are '$option'.*" \
+	"show disassembler-options $option"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-multiarch.c ./gdb/testsuite/gdb.arch/s390-multiarch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-multiarch.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-multiarch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-multiarch.exp ./gdb/testsuite/gdb.arch/s390-multiarch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-multiarch.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-multiarch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,9 +28,8 @@ if { ![isnative] || ![istarget s390x-*-*
     return
 }
 
-set testfile "s390-multiarch"
-set srcfile "${srcdir}/${subdir}/${testfile}.c"
-set binprefix "${objdir}/${subdir}/${testfile}"
+standard_testfile
+set binprefix $binfile
 
 gdb_exit
 
@@ -39,13 +38,13 @@ if { [get_compiler_info] } {
 }
 
 proc compile_and_dump {variant ccopts binfile} {
-    global srcfile
+    global srcdir subdir srcfile
     set compile_flags {debug}
     foreach opt $ccopts {
 	lappend compile_flags "additional_flags=$opt"
     }
     set test "compile ($variant)"
-    if { [gdb_compile $srcfile $binfile executable $compile_flags] != "" } {
+    if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $compile_flags] != "" } {
 	fail $test
 	return {}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-stackless.exp ./gdb/testsuite/gdb.arch/s390-stackless.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-stackless.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-stackless.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if {![istarget "s390*-*-*"]} then {
+    verbose "Skipping s390 stackless test."
+    return
+}
+
+standard_testfile .S
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+# Run until SIGSEGV.
+gdb_run_cmd
+
+set test "run until SIGSEGV"
+gdb_test_multiple "" $test {
+    -re "Program received signal SIGSEGV.*$gdb_prompt $" {
+	pass $test
+    }
+}
+
+# Ensure that 'info registers' works properly and does not generate
+# an internal-error.
+gdb_test "info registers" "r0.*" "info registers"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-stackless.S ./gdb/testsuite/gdb.arch/s390-stackless.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-stackless.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-stackless.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+
+	.align	8
+	.globl  main
+	.type	main, @function
+	/* Ensure an invalid stack pointer and link register.  Don't
+	use zero, since that may be handled specially.  */
+main:	la	%r15,3(0,0)
+	la	%r14,1(0,0)
+	j	1f
+	.size	main, .-main
+
+	/* Outside any function.  */
+	.byte	0,1
+1:	st	%r15,0(%r15)
+	br	%r14
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-tdbregs.c ./gdb/testsuite/gdb.arch/s390-tdbregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-tdbregs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-tdbregs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Free Software Foundation, Inc.
+/* Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-tdbregs.exp ./gdb/testsuite/gdb.arch/s390-tdbregs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-tdbregs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-tdbregs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,39 +24,26 @@ if { ![istarget s390-*-*] && ![istarget 
     return
 }
 
-set testfile "s390-tdbregs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
-if { [get_compiler_info] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
-      executable [list debug]] != "" } {
-    fail "compile failed"
-    return
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if { ![runto_main] } then {
     gdb_suppress_tests
 }
 
 gdb_test_multiple "next" "check for TE support" {
     -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
-	unsupported "No TE support."
+	unsupported "no TE support."
 	return
     }
     -re "\[0-9\]+.*\r\n$gdb_prompt $" {
 	pass "TE support available"
     }
     -re "$gdb_prompt $" {
-	unsupported "No TE support (unknown error)."
+	unsupported "no TE support (unknown error)."
 	return
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-vregs.exp ./gdb/testsuite/gdb.arch/s390-vregs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-vregs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-vregs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [isnative] {
     remote_exec build "mkdir $coredir"
 }
 
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile \
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
 	  [list "additional_flags=-mzarch"]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-vregs.S ./gdb/testsuite/gdb.arch/s390-vregs.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/s390-vregs.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/s390-vregs.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2015 Free Software Foundation, Inc.
+/* Copyright 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/sparc-sysstep.c ./gdb/testsuite/gdb.arch/sparc-sysstep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/sparc-sysstep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/sparc-sysstep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test single-stepping system call instructions in sparc.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <signal.h>
+#include <unistd.h>
 
 int global;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/sparc-sysstep.exp ./gdb/testsuite/gdb.arch/sparc-sysstep.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/sparc-sysstep.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/sparc-sysstep.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 set opts {}
 
-if {[prepare_for_testing ${testfile}.exp ${binfile} $srcfile {additional_flags=-g}]} {
+if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile {additional_flags=-g}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-info.c ./gdb/testsuite/gdb.arch/spu-info.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-info.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/spu-info.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-info.exp ./gdb/testsuite/gdb.arch/spu-info.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-info.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/spu-info.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ proc c_to { marker } {
 
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-ls.c ./gdb/testsuite/gdb.arch/spu-ls.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-ls.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/spu-ls.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-ls.exp ./gdb/testsuite/gdb.arch/spu-ls.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/spu-ls.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/spu-ls.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb2-it.exp ./gdb/testsuite/gdb.arch/thumb2-it.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb2-it.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb2-it.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,12 +20,10 @@ if {![istarget arm*-*eabi*]} then {
     return
 }
 
-set testfile "thumb2-it"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    untested thumb2-it.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -35,7 +33,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
 if ![runto_main] then {
-    untested thumb2-it.exp
+    untested "could not run to main"
     return -1
 }
 
@@ -43,7 +41,7 @@ if ![runto_main] then {
 gdb_test_multiple "list" "list main" {
     -re ".*@ No Thumb-2.*$gdb_prompt $" {
 	pass "list main"
-	untested thumb2-it.exp
+	untested "skipping tests due to lack of Thumb-2"
 	return -1
     }
     -re ".*@ Thumb-2 OK.*$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb2-it.S ./gdb/testsuite/gdb.arch/thumb2-it.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb2-it.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb2-it.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Thumb-2 IT blocks test program.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-bx-pc.exp ./gdb/testsuite/gdb.arch/thumb-bx-pc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-bx-pc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-bx-pc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 # Test PC adjustment from Thumb-mode "bx pc" instruction.
 
-if {![istarget arm*-*]} then {
+if {![is_aarch32_target]} then {
     verbose "Skipping ARM tests."
     return
 }
@@ -24,8 +24,7 @@ set testfile "thumb-bx-pc"
 set srcfile ${testfile}.S
 set opts {}
 
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] {
-    untested "Failed to compile $srcfile"
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-bx-pc.S ./gdb/testsuite/gdb.arch/thumb-bx-pc.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-bx-pc.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-bx-pc.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test PC adjustment from Thumb-mode "bx pc" instruction.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-prologue.c ./gdb/testsuite/gdb.arch/thumb-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Unwinder test program.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-prologue.exp ./gdb/testsuite/gdb.arch/thumb-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,14 +15,12 @@
 
 # Test ARM/Thumb prologue analyzer.
 
-if {![istarget arm*-*]} then {
+if {![is_aarch32_target]} then {
     verbose "Skipping ARM prologue tests."
     return
 }
 
-set testfile "thumb-prologue"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Don't use "debug", so that we don't have line information for the assembly
 # fragments.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-singlestep.exp ./gdb/testsuite/gdb.arch/thumb-singlestep.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-singlestep.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-singlestep.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 # Test single-stepping into incorrectly marked Thumb routine
 
-if {![istarget arm*-*]} then {
+if {![is_aarch32_target]} then {
     verbose "Skipping ARM tests."
     return
 }
@@ -24,15 +24,17 @@ set testfile "thumb-singlestep"
 set srcfile ${testfile}.S
 
 set additional_flags "additional_flags=-mthumb"
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} [list debug $additional_flags]] {
-    untested ${testfile}.exp
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} [list debug $additional_flags]] {
     return -1
 }
 
 if ![runto_main] then {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 
+# GDB doesn't skip prologue for asm files, so do one single step to
+# pass instruction "push".
+gdb_test "si" "blx	foo.*" "single step"
 gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-singlestep.S ./gdb/testsuite/gdb.arch/thumb-singlestep.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/thumb-singlestep.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/thumb-singlestep.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program with deliberately incorrect execution mode transition
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/vsx-regs.exp ./gdb/testsuite/gdb.arch/vsx-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.arch/vsx-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.arch/vsx-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_
     return
 }
 
-set testfile "vsx-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
 
 set compile_flags {debug nowarnings quiet}
 if [get_compiler_info] {
@@ -44,7 +42,7 @@ if [test_compiler_info gcc*] {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-     untested vsx-regs.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -154,7 +152,7 @@ for {set i 0} {$i < 32} {incr i 1} {
 # later when loading the core file (i.e., different register values for different
 # vector register banks).
 
-set corefile "${objdir}/${subdir}/vsx-core.test"
+set corefile [standard_output_file vsx-core.test]
 set core_supported [gdb_gcore_cmd "$corefile" "Save a VSX-enabled corefile"]
 
 # Now run the F32~F63/VR0~VR31 tests.
@@ -201,9 +199,9 @@ if { $core_loaded == -1 } {
 }
 
 for {set i 0} {$i < 32} {incr i 1} {
-    gdb_test "info reg vs$i" "vs$i.*$vector_register2" "Restore vs$i from core file"
+    gdb_test "info reg vs$i" "vs$i.*$vector_register2" "restore vs$i from core file"
 }
 
 for {set i 32} {$i < 64} {incr i 1} {
-    gdb_test "info reg vs$i" "vs$i.*$vector_register3" "Restore vs$i from core file"
+    gdb_test "info reg vs$i" "vs$i.*$vector_register3" "restore vs$i from core file"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/aarch64.inc ./gdb/testsuite/gdb.asm/aarch64.inc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/aarch64.inc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.asm/aarch64.inc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	stp x29, x30, [sp,#-32]!
+	mov x29, sp
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	ldp	x29, x30, [sp],#32
+	ret
+	.endm
+
+	.macro gdbasm_call subr
+	bl \subr
+	.endm
+
+	.macro gdbasm_several_nops
+	nop
+	nop
+	nop
+	nop
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	mov x8, #93
+	svc 0
+	.endm
+
+	comment "crt0 startup"
+	.macro gdbasm_startup
+	mov x0, sp
+	.endm
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/asm-source.exp ./gdb/testsuite/gdb.asm/asm-source.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/asm-source.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.asm/asm-source.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,6 +40,9 @@ switch -glob -- [istarget] {
     "arm*-*-*" {
         set asm-arch arm
     }
+    "aarch64*-*-*" {
+	set asm-arch aarch64
+    }
     "bfin-*-*" {
         set asm-arch bfin
     }
@@ -156,10 +159,6 @@ switch -glob -- [istarget] {
         set asm-arch pa
 	set debug-flags "-gdwarf-2"
     }
-    "hppa64-*-hpux*" {
-        set asm-arch pa64
-	set debug-flags "-gdwarf-2"
-    }
     "h83*-*" {
 	set asm-arch h8300
         set debug-flags "-gdwarf-2"
@@ -167,7 +166,7 @@ switch -glob -- [istarget] {
 }
 
 if { "${asm-arch}" == "" } {
-    untested asm-source.exp
+    untested "skipping tests due to no asm architecture"
     return -1
 }
 
@@ -197,7 +196,7 @@ set dest [target_info name]
 if [board_info $dest exists multilib_flags] {
 	set multilib_flags [board_info $dest multilib_flags]
 	if { "${multilib_flags}" != "" } {
-	   untested asm-source.exp
+	   untested "failed to compile"
 	   return -1
 	   return
 	 }
@@ -250,11 +249,11 @@ set asm1obj [standard_output_file asmrc1
 set asm2obj [standard_output_file asmrc2.o]
 
 if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags} ${debug-flags}"] != ""} then {
-     untested asm-source.exp
+     untested "failed to assemble"
      return -1
 }
 if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${debug-flags}"] != ""} then {
-     untested asm-source.exp
+     untested "failed to assemble"
      return -1
 }
 
@@ -265,7 +264,7 @@ if {[target_assemble ${srcdir}/${subdir}
 # also avoids a lot of problems on many systems, most notably on
 # *-*-*bsd* and *-*-solaris2*.
 if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] != "" } then {
-     untested asm-source.exp
+     untested "failed to link"
      return -1
 }
 
@@ -275,6 +274,7 @@ if { [istarget "m6811-*-*"] || [istarget
 }
 
 # Collect some line numbers.
+set line_enter      [expr [gdb_get_line_number "main enter" "asmsrc1.s"] + 1]
 set line_main       [expr [gdb_get_line_number "main start" "asmsrc1.s"] + 1]
 set line_call_foo2  [expr [gdb_get_line_number "call foo2"  "asmsrc1.s"] + 1]
 set line_search_comment [expr [gdb_get_line_number "search" "asmsrc1.s"] + 1]
@@ -298,7 +298,10 @@ if ![runto_main] then {
 }
 
 # Execute the `f' command and see if the result includes source info.
-gdb_test "f" "asmsrc1\[.\]s:$line_main.*several_nops" "f at main"
+gdb_test "f" "asmsrc1\[.\]s:$line_enter.*gdbasm_enter" "f at main"
+
+# Execute the `n' command.
+gdb_test "n" "$line_main\[ 	\]*.*several_nops" "n at main"
 
 # See if we properly `next' over a macro with several insns.
 gdb_test "n" "$line_call_foo2\[ 	\]*.*foo2" "next over macro"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/asmsrc1.s ./gdb/testsuite/gdb.asm/asmsrc1.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/asmsrc1.s	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.asm/asmsrc1.s	2017-03-06 01:49:07.000000000 +0000
@@ -34,6 +34,7 @@
 
 	.global main
 	gdbasm_declare main
+	comment "mark: main enter"
 	gdbasm_enter
 
 	comment "Call a macro that consists of several lines of assembler code."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/Makefile.in ./gdb/testsuite/gdb.asm/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.asm/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.asm/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = asm-source
-MISCELLANEOUS = arch.inc
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out *.x *.ci *.tmp
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/a2-run.exp ./gdb/testsuite/gdb.base/a2-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/a2-run.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/a2-run.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,32 +26,100 @@ if [gdb_skip_stdio_test "a2run.exp"] {
 
 standard_testfile run.c
 
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
 # Run with no arguments.
 gdb_run_cmd
 
+set saw_usage 0
+set saw_exit_wrapper 0
+set saw_spurious_output 0
+
 set test "run \"$testfile\" with no args"
 
-gdb_test_multiple "" $test {
-    -re ".*usage:  factorial <number>.*$inferior_exited_re with code 01.\r\n$gdb_prompt $" {
-	pass $test
-	pass "no spurious messages at program exit"
-    }
-    -re ".*usage:  factorial <number>.*$inferior_exited_re with code 01.*$gdb_prompt $" {
-	pass $test
-	fail "no spurious messages at program exit"
-    }
-    -re ".*usage:  factorial <number>.* EXIT code 1.*$inferior_exited_re normally.\r\n$gdb_prompt $" {
-	pass "$test (exit wrapper)"
-	pass "no spurious messages at program exit"
-    }
-    -re ".*usage:  factorial <number>.* EXIT code 1.*$inferior_exited_re normally.*$gdb_prompt $" {
-	pass "$test (exit wrapper)"
-	fail "no spurious messages at program exit"
+# Indirect spawn id lists.  Used to be able to disable the inferior
+# and gdb's spawn_ids and regexes as soon as we see the expected
+# output.
+set inferior_spawn_list "$inferior_spawn_id"
+set gdb_spawn_list "$gdb_spawn_id"
+
+# Clear either the gdb or the inferior spawn_id list and iff
+# afterwards we still have any spawn id in the indirect lists,
+# continue expecting.
+proc maybe_exp_continue {which} {
+    global inferior_spawn_list gdb_spawn_list
+
+    if {$which == "gdb"} {
+	set gdb_spawn_list ""
+    } elseif {$which == "inferior"} {
+	set inferior_spawn_list ""
+    } else {
+	error "invalid parameter"
+    }
+
+    if {$inferior_spawn_list != "" || $gdb_spawn_list != ""} {
+	exp_continue
+    }
+}
+
+# Note that if $inferior_spawn_id != $gdb_spawn_id the order we pick
+# output from each spawn id is undefined.
+set res [gdb_test_multiple "" $test {
+    -i inferior_spawn_list
+    -re "usage:  factorial <number>" {
+	set saw_usage 1
+	maybe_exp_continue inferior
+    }
+    -re "EXIT code 1" {
+	set saw_exit_wrapper 1
+	maybe_exp_continue inferior
+    }
+    eof {
+	if {$inferior_spawn_id != $gdb_spawn_id} {
+	    # In this case we may see the server/inferior exit before
+	    # GDB's program exit output.  Remove from spawn list and
+	    # continue waiting.
+	    maybe_exp_continue inferior
+	} else {
+	    # GDB crash.
+	    fail "$test (eof)"
+	}
+    }
+
+    -i gdb_spawn_list
+
+    -re "$inferior_exited_re with code 01.\r\n$gdb_prompt $" {
+	maybe_exp_continue gdb
+    }
+    -re "$inferior_exited_re with code 01.*$gdb_prompt $" {
+	set saw_spurious_output 1
+	maybe_exp_continue gdb
+    }
+
+    -re "$inferior_exited_re normally.\r\n$gdb_prompt $" {
+	# This is only considered a pass if we see the exit wrapper
+	# status.
+	maybe_exp_continue gdb
+    }
+    -re "$inferior_exited_re normally.*$gdb_prompt $" {
+	set saw_spurious_output 1
+	maybe_exp_continue gdb
     }
+}]
+
+if {$res == 0} {
+    gdb_assert ${saw_usage} $test
+
+    if {$saw_exit_wrapper} {
+	set msg "$test (exit wrapper)"
+    } else {
+	set msg $test
+    }
+
+    gdb_assert !$saw_spurious_output "no spurious messages at program exit"
+
 }
 
 # The remaining tests don't work for targets can't take arguments...
@@ -64,20 +132,20 @@ if [target_info exists noargs] then {
 # Now run with some arguments
 setup_xfail "arm-*-coff"
 gdb_run_cmd 5
-gdb_test "" "120.*" "run \"$testfile\" with arg"
+gdb_test_stdio "" "120" "" "run \"$testfile\" with arg"
 
 # Run again with same arguments.
 gdb_run_cmd
 
 setup_xfail "arm-*-coff"
-gdb_test "" "120.*" "run \"$testfile\" again with same args"
+gdb_test_stdio "" "120" "" "run \"$testfile\" again with same args"
 
 # Use "set args" command to specify no arguments as default and run again.
 gdb_test_no_output "set args"
 
 gdb_run_cmd
 
-gdb_test "" "usage:  factorial <number>.*" "run after setting args to nil"
+gdb_test_stdio "" "usage:  factorial <number>" "" "run after setting args to nil"
 
 # Use "set args" command to specify an argument and run again.
 gdb_test_no_output "set args 6"
@@ -85,12 +153,11 @@ gdb_test_no_output "set args 6"
 gdb_run_cmd
 
 setup_xfail "arm-*-coff"
-gdb_test "" "720.*" "run \"$testfile\" again after setting args"
+gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
 
 # GOAL: Test that shell is being used with "run".  For remote debugging
 # targets, there is no guarantee that a "shell" (whatever that is) is used.
 if ![is_remote target] then {
-    gdb_test "run `echo 8`" \
-	"Starting program.*40320.*" \
-	"run \"$testfile\" with shell"
+    gdb_test_stdio "run `echo 8`" \
+	"40320" "" "run \"$testfile\" with shell"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/advance.exp ./gdb/testsuite/gdb.base/advance.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/advance.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/advance.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,12 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/alias.exp ./gdb/testsuite/gdb.base/alias.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/alias.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/alias.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test the alias command.
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-0.exp ./gdb/testsuite/gdb.base/all-architectures-0.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-0.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-0.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 0
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-1.exp ./gdb/testsuite/gdb.base/all-architectures-1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-1.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 1
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-2.exp ./gdb/testsuite/gdb.base/all-architectures-2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 2
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-3.exp ./gdb/testsuite/gdb.base/all-architectures-3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-3.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 3
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-4.exp ./gdb/testsuite/gdb.base/all-architectures-4.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-4.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-4.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 4
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-5.exp ./gdb/testsuite/gdb.base/all-architectures-5.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-5.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-5.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 5
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-6.exp ./gdb/testsuite/gdb.base/all-architectures-6.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-6.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-6.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 6
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-7.exp ./gdb/testsuite/gdb.base/all-architectures-7.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures-7.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures-7.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+set test_slice 7
+source $srcdir/$subdir/all-architectures.exp.in
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures.exp.in ./gdb/testsuite/gdb.base/all-architectures.exp.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-architectures.exp.in	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-architectures.exp.in	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,341 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+# Test manually setting _all_ combinations of all supported bfd
+# architectures and OS ABIs.  This ensures that gdbarch initialization
+# routines handle unusual combinations gracefully, at least without
+# crashing.
+
+# While at it, because the number of possible combinations is quite
+# large, embed other checks that might be useful to do with all
+# supported archs.
+
+# One such test is ensuring that printing float, double and long
+# double types works in cross/bi-arch scenarios.  Some of GDB's float
+# format conversion routines used to fail to consider that even if
+# host and target floating formats match, their sizes may still
+# differ.  E.g., on x86, long double is 80-bit extended precision on
+# both 32-bit vs 64-bit, but it's stored as 96 bit on 32-bit, and 128
+# bit on 64-bit.  This resulted in GDB accessing memory out of bounds.
+# This test catches the issue when run against gdb linked with
+# libmcheck, or run under Valgrind.
+
+# Note: this test is actually split in several driver .exp files, in
+# order to be able to parallelize the work.  Each driver .exp file
+# exercises a different slice of the supported architectures.  See
+# all-architectures-*.exp and the TEST_SLICE variable.
+
+clean_restart
+
+# By default, preparation steps don't output a PASS message.  This is
+# because the testcase has several thousand such steps.
+set want_tests_messages 0
+
+# Call this when an "internal" preparation-like step test passed.
+# Logs the pass in gdb.log, but not in gdb.sum.
+
+proc internal_pass {message} {
+    global want_tests_messages
+
+    if {$want_tests_messages} {
+	pass $message
+    } else {
+	# Skip the sum file, but still log an internal pass in the log
+	# file.
+	global pf_prefix
+
+	verbose -log "IPASS: $pf_prefix $message"
+    }
+}
+
+# The number of times gdb_test_internal was called, and the number of
+# time that resulted in an internal pass.  If these don't match, then
+# some test failed.
+set test_count 0
+set internal_pass_count 0
+
+# Like gdb_test, but calls internal_pass instead of pass, on success.
+
+proc gdb_test_internal {cmd pattern {message ""}} {
+    global test_count internal_pass_count
+    global gdb_prompt
+
+    incr test_count
+
+    if {$message == ""} {
+	set message $cmd
+    }
+
+    gdb_test_multiple $cmd $message {
+	-re "$pattern\r\n$gdb_prompt $" {
+	    internal_pass $message
+	    incr internal_pass_count
+	}
+    }
+}
+
+gdb_test_internal "set max-completions unlimited" \
+    "^set max-completions unlimited"
+
+# Return a list of all the accepted values of "set WHAT".
+
+proc get_set_option_choices {what} {
+    global gdb_prompt
+
+    set values {}
+
+    set test "complete set $what"
+    gdb_test_multiple "complete set $what " "$test" {
+	-re "set $what (\[^\r\n\]+)\r\n" {
+	    lappend values $expect_out(1,string)
+	    exp_continue
+	}
+	-re "$gdb_prompt " {
+	    internal_pass $test
+	}
+    }
+    return $values
+}
+
+set supported_archs [get_set_option_choices "architecture"]
+# There should be at least one more than "auto".
+gdb_assert {[llength $supported_archs] > 1} "at least one architecture"
+
+set supported_osabis [get_set_option_choices "osabi"]
+# There should be at least one more than "auto" and "default".
+gdb_assert {[llength $supported_osabis] > 2} "at least one osabi"
+
+if {[lsearch $supported_archs "mips"] >= 0} {
+    set supported_mipsfpu [get_set_option_choices "mipsfpu"]
+    set supported_mips_abi [get_set_option_choices "mips abi"]
+
+    gdb_assert {[llength $supported_mipsfpu] != 0} "at least one mipsfpu"
+    gdb_assert {[llength $supported_mips_abi] != 0} "at least one mips abi"
+}
+
+if {[lsearch $supported_archs "arm"] >= 0} {
+    set supported_arm_fpu [get_set_option_choices "arm fpu"]
+    set supported_arm_abi [get_set_option_choices "arm abi"]
+
+    gdb_assert {[llength $supported_arm_fpu] != 0} "at least one arm fpu"
+    gdb_assert {[llength $supported_arm_abi] != 0} "at least one arm abi"
+}
+
+# Exercise printing float, double and long double.
+
+proc print_floats {} {
+    gdb_test_internal "ptype 1.0L" "type = long double" "ptype, long double"
+    gdb_test_internal "print 1.0L" " = 1" "print, long double"
+
+    gdb_test_internal "ptype 1.0" "type = double" "ptype, double"
+    gdb_test_internal "print 1.0" " = 1" "print, double"
+
+    gdb_test_internal "ptype 1.0f" "type = float" "ptype, float"
+    gdb_test_internal "print 1.0f" " = 1" "print, float"
+}
+
+# Run tests on the current architecture.
+
+proc do_arch_tests {} {
+    print_floats
+
+    # GDB can't access memory because there is no loaded executable
+    # nor live inferior.
+    gdb_test_internal "disassemble 0x0,+4" \
+	"Cannot access memory at address 0x0"
+}
+
+# Given we can't change arch, osabi, endianness, etc. atomically, we
+# need to silently ignore the case of the current OS ABI (not the one
+# we'll switch to) not having a handler for the arch.
+set osabi_warning \
+    [multi_line \
+	 "warning: A handler for the OS ABI .* is not built into this configuration" \
+	 "of GDB.  Attempting to continue with the default .* settings." \
+	 "" \
+	 "" \
+	]
+
+set endian_warning "(Little|Big) endian target not supported by GDB\r\n"
+
+# Like gdb_test_no_output, but use internal_pass instead of pass, and
+# ignore "no handler for OS ABI" warnings.
+
+proc gdb_test_no_output_osabi {cmd test} {
+    global osabi_warning
+    global gdb_prompt
+
+    gdb_test_multiple "$cmd" $test {
+	-re "^${cmd}\r\n(${osabi_warning})?$gdb_prompt $" {
+	    internal_pass $test
+	}
+    }
+}
+
+# It'd be nicer/safer to restart GDB on each iteration, but, that
+# increases the testcase's run time several times fold.  At the time
+# of writting, it'd jump from 20s to 4min on x86-64 GNU/Linux with
+# --enable-targets=all.
+
+set num_slices 8
+set num_archs [llength $supported_archs]
+set archs_per_slice [expr (($num_archs + $num_slices - 1) / $num_slices)]
+
+with_test_prefix "tests" {
+    foreach_with_prefix osabi $supported_osabis {
+
+	gdb_test_no_output_osabi "set osabi $osabi" \
+	    "set osabi"
+
+	set arch_count 0
+	foreach_with_prefix arch $supported_archs {
+
+	    incr arch_count
+
+	    # Skip architectures outside our slice.
+	    if {$arch_count < [expr $test_slice * $archs_per_slice]} {
+		continue
+	    }
+	    if {$arch_count >= [expr ($test_slice + 1) * $archs_per_slice]} {
+		continue
+	    }
+
+	    if {$arch == "auto"} {
+		continue
+	    }
+	    set default_endian ""
+	    foreach_with_prefix endian {"auto" "big" "little"} {
+
+		set test "set endian"
+		if {$endian == $default_endian} {
+		    continue
+		} elseif {$endian == "auto"} {
+		    gdb_test_multiple "set endian $endian" $test {
+			-re "^set endian $endian\r\n(${osabi_warning})?The target endianness is set automatically \\(currently .* endian\\)\r\n$gdb_prompt $" {
+			    internal_pass $test
+			}
+		    }
+		} else {
+		    gdb_test_multiple "set endian $endian" $test {
+			-re "^set endian $endian\r\n${endian_warning}.*\r\n$gdb_prompt $" {
+			    internal_pass $test
+			    continue
+			}
+			-re "^set endian $endian\r\n(${osabi_warning})?The target is assumed to be $endian endian\r\n$gdb_prompt $" {
+			    internal_pass $test
+			}
+		    }
+		}
+
+		# Skip setting the same architecture again.
+		if {$endian == "auto"} {
+		    set arch_re [string_to_regexp $arch]
+		    set test "set architecture $arch"
+		    gdb_test_multiple $test $test {
+			-re "^set architecture $arch_re\r\n(${osabi_warning})?The target architecture is assumed to be $arch_re\r\n$gdb_prompt $" {
+			    internal_pass $test
+			}
+			-re "Architecture .* not recognized.*$gdb_prompt $" {
+			    # GDB is missing support for a few
+			    # machines that bfd supports.
+			    if  {$arch == "powerpc:EC603e"
+				 || $arch == "powerpc:e500mc"
+				 || $arch == "powerpc:e500mc64"
+				 || $arch == "powerpc:vle"
+				 || $arch == "powerpc:titan"
+				 || $arch == "powerpc:e5500"
+				 || $arch == "powerpc:e6500"} {
+				if {$want_tests_messages} {
+				    kfail $test "gdb/19797"
+				}
+			    } else {
+				fail "$test (arch not recognized)"
+			    }
+			    continue
+			}
+		    }
+
+		    # Record what is the default endianess.  As an
+		    # optimization, we'll skip testing the manual "set
+		    # endian DEFAULT" case.
+		    set test "show endian"
+		    gdb_test_multiple "show endian" $test {
+			-re "currently little endian.*$gdb_prompt $" {
+			    set default_endian "little"
+			    internal_pass $test
+			}
+			-re "currently big endian.*$gdb_prompt $" {
+			    set default_endian "big"
+			    internal_pass $test
+			}
+		    }
+		}
+
+		# Some architectures have extra settings that affect
+		# the ABI.  Specify the extra testing axes in a
+		# declarative form.
+		#
+		# A list of {COMMAND, VAR, OPTIONS-LIST} elements.
+		set all_axes {}
+
+		if {$arch == "mips"} {
+		    lappend all_axes [list "set mips abi" mips_abi $supported_mips_abi]
+		    lappend all_axes [list "set mipsfpu" mipsfpu $supported_mipsfpu]
+		} elseif {$arch == "arm"} {
+		    lappend all_axes [list "set arm abi" arm_abi $supported_arm_abi]
+		    lappend all_axes [list "set arm fpu" arm_fpu $supported_arm_fpu]
+		}
+
+		# Run testing axis CUR_AXIS.  This is a recursive
+		# procedure that tries all combinations of options of
+		# all the testing axes.
+		proc run_axis {all_axes cur_axis} {
+		    if {$cur_axis == [llength $all_axes]} {
+			do_arch_tests
+			return
+		    }
+
+		    # Unpack the axis.
+		    set axis [lindex $all_axes $cur_axis]
+		    set cmd [lindex $axis 0]
+		    set var [lindex $axis 1]
+		    set options [lindex $axis 2]
+
+		    foreach v $options {
+			with_test_prefix "$var=$v" {
+			    gdb_test_no_output_osabi "$cmd $v" "$cmd"
+			    run_axis $all_axes [expr $cur_axis + 1]
+			}
+		    }
+		}
+
+		run_axis $all_axes 0
+	    }
+	}
+    }
+}
+
+# A test that:
+#
+#  - ensures there's a PASS if all internal tests actually passed
+#
+#  - ensures there's at least one test that is interpreted as a
+#    regression (a matching PASS->FAIL) if some of the internal tests
+#    failed, instead of looking like it could be a new FAIL that could
+#    be ignored.
+#
+gdb_assert {$internal_pass_count == $test_count} "all passed"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-bin.exp ./gdb/testsuite/gdb.base/all-bin.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/all-bin.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/all-bin.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,8 +33,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota1.exp ./gdb/testsuite/gdb.base/annota1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota1.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/annota1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ set breakpoints_invalid "\r\n\032\032bre
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested annota1.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -46,12 +46,12 @@ clean_restart ${binfile}
 gdb_test_no_output "set height 0"
 
 #
-# break at main
+# break in main
 #
 
 set main_line [gdb_get_line_number "break main"]
 
-gdb_test "break main" \
+gdb_test "break ${srcfile}:${main_line}" \
     "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \
     "breakpoint main"
 
@@ -293,16 +293,17 @@ gdb_test_multiple "delete 3" "delete bp 
 }
 
 #
-# break at main, after value is initialized. This is in preparation
+# break in main, after value is initialized. This is in preparation
 # to test the annotate output for the display command.
 #
-gdb_test_multiple "break main" "break at main" {
+set test "break in main"
+gdb_test_multiple "break ${srcfile}:${main_line}" $test {
     -re "post-prompt.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" {
-	pass "break at main"
+	pass $test
     }
     -re "post-prompt.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" {
 	setup_xfail "*-*-*" 1270
-	fail "break at main"
+	fail $test
     }
 }
 
@@ -405,20 +406,10 @@ gdb_test_multiple "info inferior 1" "$te
 # annotate-signal-string-end
 # FIXME: annotate-signal not tested (requires that the inferior be 
 #                        stopped by a "random" signal)
-#
-# SIGTRAP signals are dropped before they get to the inferior process
-# on hpux11.  In theory, this behaivor can be controlled by setting
-# TTEO_NORM_SIGTRAP in the inferior, but doing so did not cause
-# the signal to be properly delivered.
-#
-# It has been verified that other signals will be delivered.  However,
-# rather than twiddle the test, I choose to leave it as-is as it
-# exposes an interesting failure on hpux11.
 
 if [target_info exists gdb,nosignals] {
     unsupported "signal sent"
 } else {
-    setup_xfail hppa*-*-hpux11*
     gdb_test_multiple "signal SIGTRAP" "signal sent" {
 	-re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" {
 	    pass "signal sent"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota3.exp ./gdb/testsuite/gdb.base/annota3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota3.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/annota3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [is_remote target] then {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested annota3.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -45,12 +45,12 @@ clean_restart ${binfile}
 gdb_test_no_output "set height 0"
 
 #
-# break at main
+# break in main
 #
 
 set main_line [gdb_get_line_number "break main"]
 
-gdb_test "break main" \
+gdb_test "break ${srcfile}:${main_line}" \
     "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \
     "breakpoint main"
 
@@ -258,11 +258,11 @@ gdb_expect_list "delete bp 3" "$gdb_prom
 }
 
 #
-# break at main, after value is initialized. This is in preparation
+# break in main, after value is initialized. This is in preparation
 # to test the annotate output for the display command.
 #
-send_gdb "break main\n"
-gdb_expect_list "break at main" "$gdb_prompt$" [concat {
+send_gdb "break ${srcfile}:${main_line}\n"
+gdb_expect_list "break in main" "$gdb_prompt$" [concat {
     "\r\n\032\032post-prompt\r\n" } [list \
     "Breakpoint 4 at 0x\[0-9a-z\]+: file .*annota3.c, line $main_line.\r\n"]]
 
@@ -362,22 +362,11 @@ gdb_test_multiple "info inferior 1" "$te
     }
 }
 
-#
 # Send a signal that is not handled
-#
-# SIGTRAP signals are dropped before they get to the inferior process
-# on hpux11.  In theory, this behaivor can be controlled by setting
-# TTEO_NORM_SIGTRAP in the inferior, but doing so did not cause
-# the signal to be properly delivered.
-#
-# It has been verified that other signals will be delivered.  However,
-# rather than twiddle the test, I choose to leave it as-is as it
-# exposes an interesting failure on hpux11.
 
 if [target_info exists gdb,nosignals] {
     unsupported "signal sent"
 } else {
-    setup_xfail hppa*-*-hpux11*
     send_gdb "signal SIGTRAP\n"
     gdb_expect_list "signal sent" "$gdb_prompt$" {
 	"\r\n\032\032post-prompt\r\n"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota-input-while-running.c ./gdb/testsuite/gdb.base/annota-input-while-running.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota-input-while-running.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/annota-input-while-running.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota-input-while-running.exp ./gdb/testsuite/gdb.base/annota-input-while-running.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/annota-input-while-running.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/annota-input-while-running.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,23 +16,18 @@
 # Test that annotations support doesn't leave GDB's terminal settings
 # into effect when we run a foreground command.
 
-if [is_remote target] then {
-    # We cannot use runto_main because of the different prompt we get
-    # when using annotation level 2.
-    return 0
-}
-
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
     return -1
 }
 
-# Break at main
-
-gdb_test "break main" \
-    "Breakpoint.*at.* file .*$srcfile.*\\." \
-    "breakpoint main"
+# Because runto_main doesn't know how to handle the prompt with annotations,
+# run to main before we set the annotation level.
+if ![runto_main] then {
+   fail "can't run to main"
+   return 1
+}
 
 # NOTE: this prompt is OK only when the annotation level is > 1
 # NOTE: When this prompt is in use the gdb_test procedure cannot be
@@ -59,16 +54,8 @@ proc gdb_annota_test {command pattern me
 }
 
 # Set the annotation level to 2.
-
-set test "annotation set at level 2"
 gdb_annota_test "set annotate 2" ".*" "annotation set at level 2"
 
-# Run to main.
-
-gdb_annota_test "run" \
-    "\r\n\032\032post-prompt.*\r\n\r\n\032\032stopped.*" \
-    "run until main breakpoint"
-
 set test "delete breakpoints"
 gdb_test_multiple "delete" $test {
     -re "Delete all breakpoints. .y or n." {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/anon.exp ./gdb/testsuite/gdb.base/anon.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/anon.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/anon.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/args.exp ./gdb/testsuite/gdb.base/args.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/args.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/args.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ standard_testfile
 
 if {[build_executable $testfile.exp $testfile \
 	 $srcfile {debug nowarnings}] == -1} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/argv0-symlink.c ./gdb/testsuite/gdb.base/argv0-symlink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/argv0-symlink.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/argv0-symlink.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/argv0-symlink.exp ./gdb/testsuite/gdb.base/argv0-symlink.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/argv0-symlink.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/argv0-symlink.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arithmet.exp ./gdb/testsuite/gdb.base/arithmet.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arithmet.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/arithmet.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,8 +28,7 @@
 
 standard_testfile int-type.c
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arrayidx.c ./gdb/testsuite/gdb.base/arrayidx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arrayidx.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/arrayidx.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arrayidx.exp ./gdb/testsuite/gdb.base/arrayidx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/arrayidx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/arrayidx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 standard_testfile .c
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
@@ -34,19 +34,19 @@ if ![runto_main] then {
 # First, print the array without the indexes
 
 gdb_test_no_output "set print array-indexes off" \
-         "Set print array-indexes to off"
+         "set print array-indexes to off"
 
 gdb_test "print array" \
          "\\{1, 2, 3, 4\\}" \
-         "Print array with array-indexes off"
+         "print array with array-indexes off"
 
 # Second, print the same array with the indexes
 
 gdb_test_no_output "set print array-indexes on" \
-         "Set print array-indexes to on"
+         "set print array-indexes to on"
 
 gdb_test "print array" \
          "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
-         "Print array with array-indexes on"
+         "print array with array-indexes on"
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/asmlabel.c ./gdb/testsuite/gdb.base/asmlabel.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/asmlabel.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/asmlabel.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static volatile int v = -1;
+
+int
+main (int argc, char **argv)
+{
+  asm ("L0:");
+  v = 0;
+  asm ("L1:");
+  v = 1;		/* set L1 breakpoint here */
+  asm ("L2:");
+  v = 2;		/* set L2 breakpoint here */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/asmlabel.exp ./gdb/testsuite/gdb.base/asmlabel.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/asmlabel.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/asmlabel.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,64 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to see that GDB reports the correct function name when stopping
+# in a function with several assembly-defined labels; see the test
+# case asmlabel.c.
+#
+# When setting and then continuing to a breakpoint at either location
+# L1 or L2 - again, see the code - we want to make sure that GDB
+# correctly reports that it's in main, like this:
+#
+# Breakpoint 2, main (argc=1, argv=0x7fffffffe408) at asmlabel.c:26
+# 26        v = 1;                /* set L1 breakpoint here */
+#
+# This test case was written to test for a bug in which GDB printed
+# the following instead:
+#
+# Breakpoint 2, L1 () at asmlabel.c:26
+# 26        v = 1;                /* set L1 breakpoint here */
+#
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main"
+    return 0
+}
+
+set L1_bploc [gdb_get_line_number "set L1 breakpoint here" $srcfile]
+set L2_bploc [gdb_get_line_number "set L2 breakpoint here" $srcfile]
+
+gdb_test "break $srcfile:$L1_bploc" \
+    "Breakpoint.*at.* file .*$srcfile, line $L1_bploc\\." \
+    "breakpoint at L1"
+
+gdb_test "break $L2_bploc" \
+    "Breakpoint.*at.* file .*$srcfile, line $L2_bploc\\." \
+    "breakpoint at L2"
+
+gdb_test "continue" \
+    "Continuing.*Breakpoint \[0-9\]+, main .* at .*$srcfile:$L1_bploc.*" \
+    "continue to L1"
+
+gdb_test "continue" \
+    "Continuing.*Breakpoint \[0-9\]+, main .* at .*$srcfile:$L2_bploc.*" \
+    "continue to L2"
+
+gdb_test "print v" "= 1" "check value of v at L2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/assign.exp ./gdb/testsuite/gdb.base/assign.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/assign.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/assign.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 standard_testfile all-types.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested assign.exp
+     untested "failed to compile"
      return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async.exp ./gdb/testsuite/gdb.base/async.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/async.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1999-2015 Free Software Foundation, Inc.
+#   Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -57,17 +56,24 @@ proc test_background {command before_pro
     gdb_expect {
 	-re "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\.\r\n" {
 	    pass "$message"
+	    return 0
 	}
 	-re "$gdb_prompt.*completed\.\r\n" {
 	    fail "$message"
 	}
+	-re ".*Asynchronous execution not supported on this target\..*" {
+	    unsupported "asynchronous execution not supported: $message"
+	}
 	timeout  {
 	    fail "$message (timeout)"
 	}
     }
+    return -1
 }
 
-test_background "next&" "" ".*z = 9.*"
+if {[test_background "next&" "" ".*z = 9.*"] < 0} {
+    return
+}
 
 test_background "step&" "" ".*y = foo \\(\\).*" "step& #1"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async-shell.c ./gdb/testsuite/gdb.base/async-shell.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async-shell.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/async-shell.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async-shell.exp ./gdb/testsuite/gdb.base/async-shell.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/async-shell.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/async-shell.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [target_info exists use_gdb_stub] {
     return 0
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
@@ -48,7 +48,7 @@ gdb_test_multiple $test $test {
 
 set test "process stopped"
 gdb_test_multiple "" $test {
-    -re "\r\n\\\[process \[0-9\]+\\\] #1 stopped\\\.\r\n" {
+    -re "Program stopped\\\.\r\n" {
 	pass $test
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach.exp ./gdb/testsuite/gdb.base/attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,18 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-# On HP-UX 11.0, this test is causing a process running the program
-# "attach" to be left around spinning.  Until we figure out why, I am
-# commenting out the test to avoid polluting tiamat (our 11.0 nightly
-# test machine) with these processes. RT
-#
-# Setting the magic bit in the target app should work.  I added a
-# "kill", and also a test for the R3 register warning.  JB
-if { [istarget "hppa*-*-hpux*"] } {
-    return 0
-}
-
 if {![can_spawn_for_attach]} {
     return 0
 }
@@ -42,14 +30,14 @@ remote_exec build "rm -f ${binfile} ${bi
 # build the first test case
 #
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested attach.exp
+    untested "failed to compile"
     return -1
 }
 
 # Build the in-system-call test
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
-    untested attach.exp
+    untested "failed to compile in-system-call test"
     return -1
 }
 
@@ -82,7 +70,8 @@ proc do_attach_tests {} {
     # Start the program running and then wait for a bit, to be sure
     # that it can be attached to.
 
-    set testpid [spawn_wait_for_attach $binfile]
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     # Verify that we cannot attach to nonsense.
 
@@ -279,10 +268,11 @@ proc do_attach_tests {} {
     # the next test run (and prevent the compile by keeping
     # the text file busy), in case the "set should_exit" didn't
     # work.
-   
-    remote_exec build "kill -9 ${testpid}"
 
-    set testpid [spawn_wait_for_attach $binfile]
+    kill_wait_spawned_process $test_spawn_id
+
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     # Verify that we can attach to the process, and find its a.out
     # when we're cd'd to some directory that doesn't contain the
@@ -322,14 +312,15 @@ proc do_attach_tests {} {
 	"y"
     
     # Another "don't leave a process around"
-    remote_exec build "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 proc do_call_attach_tests {} {
     global gdb_prompt
     global binfile2
     
-    set testpid [spawn_wait_for_attach $binfile2]
+    set test_spawn_id [spawn_wait_for_attach $binfile2]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     # Attach
    
@@ -366,7 +357,7 @@ proc do_call_attach_tests {} {
    
     # Be paranoid
    
-    remote_exec build "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 proc do_command_attach_tests {} {
@@ -382,27 +373,21 @@ proc do_command_attach_tests {} {
 	return 0
     }
 
-    set testpid [spawn_wait_for_attach $binfile]
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     gdb_exit
-    if $verbose>1 then {
-        send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS --pid=$testpid\n"
-    }
 
-    eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS --pid=$testpid"
+    set res [gdb_spawn_with_cmdline_opts "--pid=$testpid"]
     set test "starting with --pid"
-    expect {
+    gdb_test_multiple "" $test {
 	-re "Reading symbols from.*$gdb_prompt $" {
 	    pass "$test"
 	}
-	timeout {
-	    fail "$test (timeout)"
-	}
     }
 
     # Get rid of the process
-
-    remote_exec build "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 # Test ' gdb --pid PID -ex "run" '.  GDB used to have a bug where
@@ -418,7 +403,8 @@ proc test_command_line_attach_run {} {
     }
 
     with_test_prefix "cmdline attach run" {
-	set testpid [spawn_wait_for_attach $binfile]
+	set test_spawn_id [spawn_wait_for_attach $binfile]
+	set testpid [spawn_id_get_pid $test_spawn_id]
 
 	set test "run to prompt"
 	gdb_exit
@@ -427,7 +413,7 @@ proc test_command_line_attach_run {} {
 		     "-iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""]
 	if { $res != 0} {
 	    fail $test
-	    remote_exec build "kill -9 ${testpid}"
+	    kill_wait_spawned_process $test_spawn_id
 	    return $res
 	}
 	gdb_test_multiple "" $test {
@@ -446,7 +432,7 @@ proc test_command_line_attach_run {} {
 	}
 
 	# Get rid of the process
-	remote_exec build "kill -9 ${testpid}"
+	kill_wait_spawned_process $test_spawn_id
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-misread.c ./gdb/testsuite/gdb.base/attach-pie-misread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-misread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-pie-misread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-misread.exp ./gdb/testsuite/gdb.base/attach-pie-misread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-misread.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-pie-misread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -126,25 +126,25 @@ if {$first_offset == 0} {
 set test "start inferior"
 gdb_exit
 
-set res [remote_spawn host $binfile]
-if { $res < 0 || $res == "" } {
+set test_spawn_id [remote_spawn host $binfile]
+if { $test_spawn_id < 0 || $test_spawn_id == "" } {
     perror "Spawning $binfile failed."
     fail $test
     return
 }
-set pid [exp_pid -i $res]
+set testpid [spawn_id_get_pid $test_spawn_id]
 gdb_expect {
     -re "sleeping\r\n" {
 	pass $test
     }
     eof {
 	fail "$test (eof)"
-	remote_exec host "kill -9 $pid"
+	wait -i $test_spawn_id
 	return
     }
     timeout {
 	fail "$test (timeout)"
-	remote_exec host "kill -9 $pid"
+	kill_wait_spawned_process $test_spawn_id
 	return
     }
 }
@@ -176,8 +176,8 @@ foreach align_mult {1 2} { with_test_pre
     clean_restart $executable
 
     set test "attach"
-    gdb_test_multiple "attach $pid" $test {
-	-re "Attaching to program: .*, process $pid\r\n" {
+    gdb_test_multiple "attach $testpid" $test {
+	-re "Attaching to program: .*, process $testpid\r\n" {
 	    # Missing "$gdb_prompt $" is intentional.
 	    pass $test
 	}
@@ -196,4 +196,4 @@ foreach align_mult {1 2} { with_test_pre
     gdb_test "detach" "Detaching from program: .*"
 }}
 
-remote_exec host "kill -9 $pid"
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-noexec.c ./gdb/testsuite/gdb.base/attach-pie-noexec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-noexec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-pie-noexec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-noexec.exp ./gdb/testsuite/gdb.base/attach-pie-noexec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-pie-noexec.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-pie-noexec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if {![can_spawn_for_attach]} {
 standard_testfile .c
 set executable ${testfile}
 
-if { [prepare_for_testing ${testfile}.exp $executable "" [list debug "additional_flags=-fPIE -pie"]] } {
+if { [prepare_for_testing "failed to prepare" $executable "" [list debug "additional_flags=-fPIE -pie"]] } {
     return -1
 }
 
@@ -42,25 +42,26 @@ gdb_test_multiple "info shared" $test {
 	pass $test
     }
     -re "No shared libraries loaded at this time\\.\r\n$gdb_prompt $" {
-	untested ${testfile}.exp
+	untested "no shared libraries loaded"
     }
 }
 gdb_exit
 
 if {$arch == ""} {
-    untested ${testfile}.exp
+    untested "no architecture set"
     return 0
 }
 
 # Start the program running and then wait for a bit, to be sure
 # that it can be attached to.
 
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
 
 gdb_start
 file delete -- $binfile
-gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*: No such file or directory\\." "attach"
+gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*" "attach"
 gdb_test "set architecture $arch" "The target architecture is assumed to be $arch"
 gdb_test "info shared" "From\[ \t\]+To\[ \t\]+Syms Read\[ \t\]+Shared Object Library\r\n0x.*"
 
-eval exec kill -9 $testpid
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-twice.c ./gdb/testsuite/gdb.base/attach-twice.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-twice.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-twice.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-twice.exp ./gdb/testsuite/gdb.base/attach-twice.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-twice.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-twice.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,14 +20,15 @@ if {![can_spawn_for_attach]} {
 standard_testfile
 set executable ${testfile}
 
-if { [prepare_for_testing ${testfile}.exp $executable] } {
+if { [prepare_for_testing "failed to prepare" $executable] } {
     return -1
 }
 
 # Start the program running and then wait for a bit, to be sure
 # that it can be attached to.
 
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
 
 set parentpid 0
 
@@ -48,4 +49,4 @@ gdb_test_multiple "attach $testpid" $tes
 if {$parentpid != 0} {
   eval exec kill -9 $parentpid
 }
-eval exec kill -9 $testpid
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-wait-input.c ./gdb/testsuite/gdb.base/attach-wait-input.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-wait-input.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-wait-input.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-wait-input.exp ./gdb/testsuite/gdb.base/attach-wait-input.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/attach-wait-input.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach-wait-input.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ proc start_program {binfile} {
     clean_restart $binfile
 
     if ![runto setup_done] then {
-	fail "Can't run to setup_done"
+	fail "can't run to setup_done"
 	return 0
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-connect-native-target.c ./gdb/testsuite/gdb.base/auto-connect-native-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-connect-native-target.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auto-connect-native-target.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-connect-native-target.exp ./gdb/testsuite/gdb.base/auto-connect-native-target.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-connect-native-target.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auto-connect-native-target.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ gdb_test_multiple $test $test {
 }
 
 if { !$have_native } {
-    unsupported "No \"target native\" support."
+    unsupported "no \"target native\" support."
     return
 }
 
@@ -62,14 +62,14 @@ set topmost [get_topmost_target "check w
 
 # Testing against the extended-remote board, for example?
 if { $topmost != "exec" } {
-    unsupported "Already connected to target $topmost."
+    unsupported "already connected to target $topmost."
     return
 }
 
 # Check which target this board connects to.  If testing with a native
 # target board, this should cause the native target to auto connect.
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -94,7 +94,7 @@ proc check_native_target {test} {
 
 # Testing against a remote board, for example?
 if { ![check_native_target "check whether board tests the native target"] } {
-    unsupported "Not testing the native target."
+    unsupported "not testing the native target."
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load.c ./gdb/testsuite/gdb.base/auto-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auto-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load.exp ./gdb/testsuite/gdb.base/auto-load.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auto-load.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ set targetscript "${targetscriptdir}/${t
 
 remote_exec host "rm -rf ${targetdir}"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load-script ./gdb/testsuite/gdb.base/auto-load-script
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auto-load-script	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auto-load-script	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auxv.c ./gdb/testsuite/gdb.base/auxv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auxv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auxv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1992-2015 Free Software Foundation, Inc.
+/* Copyright 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auxv.exp ./gdb/testsuite/gdb.base/auxv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/auxv.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/auxv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # Test `info auxv' and related functionality.
 
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/$
 		  {debug additional_flags=-DUSE_RLIMIT}] != ""
      && [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
 		  {debug}] != "" } {
-    untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bad-file.exp ./gdb/testsuite/gdb.base/bad-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bad-file.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bad-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Test passing bad files to gdb.  PR symtab/17911
+
+# Note: While we test for specific text in error messages,
+# thus perhaps making the test host specific, if your host
+# print different text then the plan is to update the expected text
+# instead of making this test linux-only or some such.
+
+# There is no such file, but we still use the normal mechanism to pick
+# its name and path.
+standard_testfile
+
+gdb_exit
+gdb_start
+
+set test "non-existent file"
+set bad_file $testfile
+remote_file host delete $bad_file
+gdb_test_multiple "file $bad_file" "$test" {
+    -re "No such file or directory.\[\r\n\]+$gdb_prompt $" {
+	pass $test
+    }
+}
+
+set test "directory"
+set bad_file [standard_output_file {}]
+remote_exec host "mkdir -p $bad_file"
+gdb_test_multiple "file $bad_file" "$test" {
+    -re "Is a directory.\[\r\n\]+$gdb_prompt $" {
+	pass $test
+    }
+}
+
+set test "neither file nor directory"
+set bad_file "/dev/null"
+gdb_test_multiple "file $bad_file" "$test" {
+    -re "Invalid argument.\[\r\n\]+$gdb_prompt $" {
+	pass $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bang.exp ./gdb/testsuite/gdb.base/bang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bang.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,9 +18,8 @@
 
 standard_testfile args.c
 
-if {[prepare_for_testing $testfile.exp ${testfile}! $srcfile \
+if {[prepare_for_testing "failed to prepare" ${testfile}! $srcfile \
 	 {debug nowarnings}]} {
-    untested bang.exp
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/batch-preserve-term-settings.c ./gdb/testsuite/gdb.base/batch-preserve-term-settings.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/batch-preserve-term-settings.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/batch-preserve-term-settings.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp ./gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/batch-preserve-term-settings.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,12 +27,8 @@ if [is_remote host] {
   set file_arg [remote_download host $file_arg]
 }
 
-global GDBFLAGS
-set saved_gdbflags $GDBFLAGS
-
 # The shell's prompt.
-set shell_prompt "$ "
-set shell_prompt_re [string_to_regexp $shell_prompt]
+set shell_prompt_re "\[$#\] "
 
 # Spawn shell.  Returns true on success, false otherwise.
 
@@ -41,7 +37,7 @@ proc spawn_shell {} {
 
     set res [remote_spawn host "/bin/sh"]
     if { $res < 0 || $res == "" } {
-	unsupported "Spawning shell failed."
+	unsupported "spawning shell failed."
 	return 0
     }
 
@@ -119,8 +115,7 @@ proc run_stty {message result} {
 proc test_terminal_settings_preserved {} {
     global file_arg
     global GDB INTERNAL_GDBFLAGS GDBFLAGS
-    global gdb_prompt pagination_prompt
-    global saved_gdbflags
+    global gdb_prompt
     global shell_prompt_re
 
     if ![spawn_shell] {
@@ -130,12 +125,11 @@ proc test_terminal_settings_preserved {}
     set stty_supported [run_stty "stty before" stty_before]
 
     set test "gdb -batch -ex run"
-    set GDBFLAGS $saved_gdbflags
-    append GDBFLAGS " -batch"
-    append GDBFLAGS " -ex \"set height unlimited\""
-    append GDBFLAGS " -ex \"start\""
-    append GDBFLAGS " --args \"$file_arg\""
-    send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]\n"
+    append EXTRA_GDBFLAGS "-batch"
+    append EXTRA_GDBFLAGS " -ex \"set height unlimited\""
+    append EXTRA_GDBFLAGS " -ex \"start\""
+    append EXTRA_GDBFLAGS " --args \"$file_arg\""
+    send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $EXTRA_GDBFLAGS [host_info gdb_opts]\n"
     gdb_expect {
 	-re "Don't know how to run.*$shell_prompt_re$" {
 	    unsupported $test
@@ -181,6 +175,196 @@ proc test_terminal_settings_preserved {}
     exit_shell
 }
 
-test_terminal_settings_preserved
+# Send the quit command to GDB and make sure it exits.
+
+proc send_quit_command { test_name } {
+    global shell_prompt_re
+
+    set test $test_name
+    send_gdb "quit\n"
+    gdb_expect {
+	-re "(y or n)" {
+	    send_gdb "y\n"
+	    exp_continue
+	}
+	-re ".*$shell_prompt_re$" {
+	    pass $test
+	    return
+	}
+	timeout {
+	    fail "$test (timeout)"
+	    return 0
+	}
+	eof {
+	    fail "$test (eof)"
+	    return 0
+	}
+    }
+}
+
+# Check that quitting from the CLI via the "quit" command does not leave the
+# terminal in the wrong state.  The GDB commands CMDS are executed before
+# quitting.
+
+proc test_terminal_settings_preserved_after_cli_exit { cmds } {
+    global file_arg
+    global GDB INTERNAL_GDBFLAGS GDBFLAGS
+    global gdb_prompt
+    global shell_prompt_re
+
+    if ![spawn_shell] {
+	return
+    }
+
+    set saved_gdbflags $GDBFLAGS
+
+    set stty_supported [run_stty "stty before" stty_before]
+
+    set test "start gdb"
+    send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts] --args \"$file_arg\"\n"
+    gdb_expect {
+	-re "$gdb_prompt $" {
+	    pass $test
+	}
+	timeout {
+	    fail "$test (timeout)"
+	}
+	eof {
+	    fail "$test (eof)"
+	}
+    }
+
+    foreach cmd $cmds {
+	set test "run command $cmd"
+	send_gdb "$cmd\n"
+	gdb_expect {
+	    -re "$gdb_prompt $" {
+		pass $test
+	    }
+	    timeout {
+		fail "$test (timeout)"
+	    }
+	    eof {
+		fail "$test (eof)"
+	    }
+	}
+    }
+
+    send_quit_command "quit gdb"
+
+    set test "terminal settings preserved"
+    if $stty_supported {
+	run_stty "stty after" stty_after
+
+	gdb_assert [string equal $stty_before $stty_after] $test
+    } else {
+	unsupported "$test (no stty)"
+    }
+
+    exit_shell
+}
+
+# Check that sending SIGTERM kills GDB and does not leave the terminal in the
+# wrong state.
+
+proc test_terminal_settings_preserved_after_sigterm { } {
+    global file_arg
+    global GDB INTERNAL_GDBFLAGS GDBFLAGS
+    global gdb_prompt
+    global shell_prompt_re
+
+    if ![spawn_shell] {
+	return
+    }
+
+    set saved_gdbflags $GDBFLAGS
+
+    set stty_supported [run_stty "stty before" stty_before]
+
+    set test "start gdb"
+    send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]\n"
+    gdb_expect {
+	-re "$gdb_prompt $" {
+	    pass $test
+	}
+	timeout {
+	    fail "$test (timeout)"
+	}
+	eof {
+	    fail "$test (eof)"
+	}
+    }
+
+    # Retrieve the pid of gdb with the gdb command "shell echo $PPID"
+    set gdb_pid -1
+    set test "run shell echo \$PPID"
+    send_gdb "shell echo \$PPID\n"
+    gdb_expect {
+	-re ".*\r\n(\\d+)\r\n$gdb_prompt $" {
+	    set gdb_pid $expect_out(1,string)
+	    pass $test
+	}
+	-re ".*\r\n\r\n$gdb_prompt $" {
+	    fail "$test (no \$PPID)"
+	}
+	timeout {
+	    fail "$test (timeout)"
+	}
+	eof {
+	    fail "$test (eof)"
+	}
+    }
+
+    set test "kill gdb with SIGTERM"
+    if { $gdb_pid == -1 } {
+	fail "$test (no pid)"
+	send_quit_command "quit gdb"
+    } else {
+	remote_exec host "kill -TERM $gdb_pid"
+	set gdb_killed 0
+	gdb_expect {
+	    -re ".*$shell_prompt_re$" {
+		pass $test
+		set gdb_killed 1
+	    }
+	    default {
+		fail "$test (did not quit)"
+	    }
+	}
+
+	if !$gdb_killed {
+	    send_quit_command "quit gdb"
+	}
+    }
+
+    set test "terminal settings preserved"
+    if $stty_supported {
+	run_stty "stty after" stty_after
+
+	gdb_assert [string equal $stty_before $stty_after] $test
+    } else {
+	unsupported "$test (no stty)"
+    }
+
+    exit_shell
+}
+
+with_test_prefix "batch run" {
+    test_terminal_settings_preserved
+}
 
-set GDBFLAGS $saved_gdbflags
+with_test_prefix "cli exit" {
+    test_terminal_settings_preserved_after_cli_exit { }
+}
+
+with_test_prefix "cli exit after start cmd" {
+    test_terminal_settings_preserved_after_cli_exit { "start" }
+}
+
+with_test_prefix "cli exit after run cmd" {
+    test_terminal_settings_preserved_after_cli_exit { "run" }
+}
+
+with_test_prefix "cli exit after SIGTERM" {
+    test_terminal_settings_preserved_after_sigterm
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bfp-test.c ./gdb/testsuite/gdb.base/bfp-test.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bfp-test.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bfp-test.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bfp-test.exp ./gdb/testsuite/gdb.base/bfp-test.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bfp-test.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bfp-test.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 standard_testfile .c
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
@@ -35,14 +35,14 @@ gdb_breakpoint [gdb_get_line_number "ret
 gdb_continue_to_breakpoint "return"
 
 # Print the original value of b32, b64 and b128.
-gdb_test "print b32" ".*1 = 1\.5.*" "The original value of b32 is 1.5"
-gdb_test "print b64" ".*2 = 2\.25.*" "The original value of b64 is 2.25"
-gdb_test "print b128" ".*3 = 3\.375.*" "The original value of b128 is 3.375"
+gdb_test "print b32" ".*1 = 1\.5.*" "the original value of b32 is 1.5"
+gdb_test "print b64" ".*2 = 2\.25.*" "the original value of b64 is 2.25"
+gdb_test "print b128" ".*3 = 3\.375.*" "the original value of b128 is 3.375"
 
 # Test that gdb could correctly recognize float constant expression with a suffix. 
-gdb_test "print b32=-1.5f" ".*4 = -1\.5.*" "Try to change b32 to -1.5 with 'print b32=-1.5f'"
-gdb_test "print b64=-2.25f" ".*5 = -2\.25.*" "Try to change b64 to -2.25 with 'print b64=-2.25f'"
-gdb_test "print b128=-3.375l" ".*6 = -3\.375.*" "Try to change b128 to -3.375 with 'print b128=-3.375l'"
+gdb_test "print b32=-1.5f" ".*4 = -1\.5.*" "try to change b32 to -1.5 with 'print b32=-1.5f'"
+gdb_test "print b64=-2.25f" ".*5 = -2\.25.*" "try to change b64 to -2.25 with 'print b64=-2.25f'"
+gdb_test "print b128=-3.375l" ".*6 = -3\.375.*" "try to change b128 to -3.375 with 'print b128=-3.375l'"
 
 # Test that gdb could handle the above correctly with "set var" command.
 set test "set variable b32 = 10.5f"
@@ -75,9 +75,9 @@ gdb_test_multiple "set var b128=30.375l"
     }
 }
 
-gdb_test "print b32" ".*7 = 10\.5.*" "The value of b32 is changed to 10.5"
-gdb_test "print b64" ".*8 = 20\.25.*" "The value of b64 is changed to 20.25"
-gdb_test "print b128" ".*9 = 30\.375.*" "The value of b128 is changed to 30.375"
+gdb_test "print b32" ".*7 = 10\.5.*" "the value of b32 is changed to 10.5"
+gdb_test "print b64" ".*8 = 20\.25.*" "the value of b64 is changed to 20.25"
+gdb_test "print b128" ".*9 = 30\.375.*" "the value of b128 is changed to 30.375"
 
 # Test that gdb could handle invalid suffix correctly.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bg-execution-repeat.c ./gdb/testsuite/gdb.base/bg-execution-repeat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bg-execution-repeat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bg-execution-repeat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bg-execution-repeat.exp ./gdb/testsuite/gdb.base/bg-execution-repeat.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bg-execution-repeat.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bg-execution-repeat.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bigcore.c ./gdb/testsuite/gdb.base/bigcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bigcore.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bigcore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bigcore.exp ./gdb/testsuite/gdb.base/bigcore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bigcore.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bigcore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 # mechanism that would let it efficiently access a remote corefile.
 
 if ![isnative] then {
-    untested "Remote system"
+    untested "remote system"
     return
 }
 
@@ -31,11 +31,10 @@ if ![isnative] then {
 # I/O bandwith.
 
 if { [istarget "*-*-*bsd*"]
-     || [istarget "*-*-hpux*"]
      || [istarget "*-*-solaris*"] 
      || [istarget "*-*-darwin*"] 
      || [istarget "*-*-cygwin*"] } {
-    untested "Kernel lacks sparse corefile support (PR gdb/1551)"
+    untested "kernel lacks sparse corefile support (PR gdb/1551)"
     return
 }
 
@@ -43,7 +42,7 @@ standard_testfile .c
 set corefile [standard_output_file ${binfile}.corefile]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested bigcore.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -147,7 +146,7 @@ foreach pat [list core.${inferior_pid} $
 }
 
 if { $file == "" } {
-    untested "Can't generate a core file"
+    untested "can't generate a core file"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitfields2.exp ./gdb/testsuite/gdb.base/bitfields2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitfields2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bitfields2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested bitfields2.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitfields.exp ./gdb/testsuite/gdb.base/bitfields.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitfields.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bitfields.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitops.exp ./gdb/testsuite/gdb.base/bitops.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bitops.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bitops.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.c ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.gdb ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.gdb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.gdb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bp-cmds-execution-x-script.gdb	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-permanent.c ./gdb/testsuite/gdb.base/bp-permanent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-permanent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bp-permanent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-permanent.exp ./gdb/testsuite/gdb.base/bp-permanent.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/bp-permanent.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/bp-permanent.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ proc test {always_inserted sw_watchpoint
 		    # Some targets (QEMU for one) will disallow writes to the
 		    # .text section under certain circumstances.  It is no use
 		    # continuing with the test at this point.  Just return.
-		    unsupported "Cannot modify memory"
+		    unsupported "cannot modify memory"
 		    return
 		}
 		-re " = .*$gdb_prompt $" {
@@ -123,8 +123,21 @@ proc test {always_inserted sw_watchpoint
     with_test_prefix "basics" {
 	# Run to the permanent breakpoint, just to make sure we've inserted it
 	# correctly.
-	gdb_test "continue" "Program received signal SIGTRAP.*" \
-	    "permanent breakpoint causes random signal"
+	# If the target fails to stop, the remainder of the test will not work
+	# so just return.  This can happen on some simulator targets where
+	# the running program doesn't see breakpoints that are visible to
+	# the execution engine, or where writes to the .text section are
+	# quietly ignored.
+	set test "permanent breakpoint causes random signal"
+	gdb_test_multiple "continue" $test {
+	    -re "exited normally.*$gdb_prompt $" {
+	        unsupported "failed to stop at permanent breakpoint"
+		return
+	    }
+	    -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+	    	pass $test
+	    }
+	}
 
 	# Now set a breakpoint on top, thus creating a permanent breakpoint.
 	gdb_breakpoint "$line_bp"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branches.c ./gdb/testsuite/gdb.base/branches.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branches.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/branches.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,113 +0,0 @@
-/* Tests for single stepping through various branch conditions */
-
-int noscramble(int a)
-{
-  return a ;
-}
-
-int echo(int a)
-{ return noscramble(a) ; }
-
-int equaltest(int a,int b)
-{ int retval ;
-  if (a == b)
-    retval = noscramble(1) ;
-  else retval = noscramble(0) ;
-  return retval ;
-}
-
-int neqtest(int a , int b)
-{ int retval ;
-  if (a != b)
-    retval = echo(1) ;
-  else retval = echo(2) ;
-  return retval ;
-}
-int zerotest(int a )
-{ int retval ;
-  a = echo(a) ;
-  if (a ==0)
-    retval = echo(1) ;
-  else
-    retval = echo(0) ;
-  retval = echo(retval) ;
-  return retval ;
-}
-
-int zerotest2(int a)
-{
-  return (a==0) ;
-}
-
-int nonzerotest(int a)
-{
-  int retval ;
-  if (a != 0)
-    retval = echo(0) ;
-  else retval = echo(1) ;
-  return retval ;
-}
-
-int whiletest(int a)
-{
-  while (a > 0)
-    {
-      a-- ;
-    }
-  return 0 ;
-}
-int whiletest2(int a)
-{
-  while (a > 0)
-    {
-      a = noscramble(a) ;
-      a-- ;
-    }
-  return a ;
-}
-
-int decr(int x) { return x - 1  ; }
-
-int while3(int a)
-{
-  int b = a ;
-  while (a == b)
-    {
-      a = echo(a) ;
-      b = decr(b) ;
-    }
-  return a ;
-}
-
-void done (int x) { } 
-
-int main()
-{
-  int a,b,c,d ;
-  done(1) ;
-  a = echo(123456) ;
-  b = echo(123456) ;
-  c = echo(56789) ;
-  d = echo(0) ;
-#if 1
-  equaltest(a,b) ;
-  done(7) ;
-  equaltest(a,c) ;
-  done(8) ;
-  whiletest(3) ;  /* worked */
-  done(3) ;
-  while3(3) ;
-  done(6) ;
-#endif  
-  neqtest(a,b) ; 
-  neqtest(a,b) ; 
-  neqtest(a,c) ; 
-  zerotest(d) ;
-  zerotest(a) ;
-  done(5) ;
-  nonzerotest(d) ;
-  done(4) ;
-  nonzerotest(a) ;
-  done(111) ;
-  return 1 ;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branch-to-self.c ./gdb/testsuite/gdb.base/branch-to-self.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branch-to-self.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/branch-to-self.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+
+volatile int counter = 0;
+
+static void
+handler (int sig)
+{
+  counter = 5;
+}
+
+int
+main (void)
+{
+  signal (SIGALRM, handler);
+  alarm (5);
+
+  /* Compiler may generate a single instruction which branches to
+     itself.  */
+  for (;;); /* loop-line */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branch-to-self.exp ./gdb/testsuite/gdb.base/branch-to-self.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/branch-to-self.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/branch-to-self.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,74 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping branch-to-self.exp because of nosignals."
+    continue
+}
+
+standard_testfile
+
+if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] == -1 } {
+    return -1
+}
+
+with_test_prefix "single-step" {
+    global testfile
+
+    clean_restart ${testfile}
+    if ![runto_main] {
+	return -1
+    }
+    set line_num [gdb_get_line_number "loop-line" ${testfile}.c]
+
+    gdb_test "break ${testfile}.c:${line_num}" "Breakpoint .*" \
+	"set breakpoint"
+    gdb_continue_to_breakpoint "hit breakpoint"
+    gdb_test "si" ".*${testfile}.c:${line_num}.*"
+}
+
+with_test_prefix "break-cond" {
+    global testfile
+
+    foreach_with_prefix side {"host" "target"} {
+
+	clean_restart ${testfile}
+
+	if ![runto_main] {
+	    return -1
+	}
+
+	set test "set breakpoint condition-evaluation $side"
+	gdb_test_multiple $test $test {
+	    -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+		# Target doesn't support breakpoint condition
+		# evaluation on its side.  Skip the test.
+		continue
+	    }
+	    -re "^$test\r\n$gdb_prompt $" {
+	    }
+	}
+
+	set line_num [gdb_get_line_number "loop-line" ${testfile}.c]
+	gdb_test "break ${testfile}.c:${line_num} if counter > 3" \
+	    "Breakpoint .*" "set breakpoint with condition"
+
+	gdb_continue_to_breakpoint "continue to break"
+
+	gdb_test "p counter" ".* = 5"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break1.c ./gdb/testsuite/gdb.base/break1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1992-2015 Free Software Foundation, Inc.
+   Copyright 1992-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-always.c ./gdb/testsuite/gdb.base/break-always.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-always.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-always.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-always.exp ./gdb/testsuite/gdb.base/break-always.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-always.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-always.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2008-2015 Free Software Foundation, Inc.
+#   Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # Also verifies that breakpoint enabling/disabling works properly
 # with duplicated breakpoints.
 
-if { [prepare_for_testing break-always.exp break-always break-always.c] } {
+if { [prepare_for_testing "failed to prepare" break-always break-always.c] } {
     return -1
 }
 
@@ -77,7 +77,7 @@ foreach test_value {0 1} {
 
 	    # Some targets do not allow manually writing a breakpoint to a
 	    # certain memory address, like QEMU.  In that case, just bail out.
-	    unsupported "Cannot write to address $bp_address"
+	    unsupported "cannot write to address $bp_address"
 	    return -1
 	}
 	-re " = .*$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break.c ./gdb/testsuite/gdb.base/break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1992-2015 Free Software Foundation, Inc.
+   Copyright 1992-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-caller-line.c ./gdb/testsuite/gdb.base/break-caller-line.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-caller-line.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-caller-line.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-caller-line.exp ./gdb/testsuite/gdb.base/break-caller-line.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-caller-line.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-caller-line.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-entry.exp ./gdb/testsuite/gdb.base/break-entry.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-entry.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-entry.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,11 +28,11 @@
 standard_testfile start.c
 
 if [target_info exists use_gdb_stub] {
-    untested ${testfile}.exp
+    untested "skipping tests due to use_gdb_stub"
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {additional_flags=-static}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {additional_flags=-static}] } {
     return -1
 }
 
@@ -45,7 +45,7 @@ gdb_test_multiple $test $test {
     }
 }
 if {$entry == ""} {
-    untested ${testfile}.exp
+    untested "no entrypoint"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break.exp ./gdb/testsuite/gdb.base/break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
-if { [prepare_for_testing break.exp "break" {break.c break1.c} {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" "break" {break.c break1.c} {debug nowarnings}] } {
     return -1
 }
 set srcfile break.c
@@ -35,13 +35,13 @@ gdb_expect {
 	    send_gdb "y\n"
 	    gdb_expect {
 		-re "$gdb_prompt $" {
-		    fail "Delete all breakpoints when none (unexpected prompt)"
+		    fail "delete all breakpoints when none (unexpected prompt)"
 		}
-		timeout	{ fail "Delete all breakpoints when none (timeout after unexpected prompt)" }
+		timeout	{ fail "delete all breakpoints when none (timeout after unexpected prompt)" }
 	    }
 	}
-     -re ".*$gdb_prompt $"       { pass "Delete all breakpoints when none" }
-    timeout	            { fail "Delete all breakpoints when none (timeout)" }
+     -re ".*$gdb_prompt $"       { pass "delete all breakpoints when none" }
+    timeout	            { fail "delete all breakpoints when none (timeout)" }
 }
 
 #
@@ -118,12 +118,6 @@ set bp_location6 [gdb_get_line_number "s
 
 set main_line $bp_location6
 
-if {$hp_aCC_compiler} {
-    set proto "\\(int\\)"
-} else {
-    set proto ""
-}
-
 set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
 set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
 
@@ -131,7 +125,7 @@ gdb_test "info break" \
     "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$main_line.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in marker2 at .*$srcfile1:$bp_location8.*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in factorial at .*$srcfile:$bp_location7.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location1.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location1.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location2.*
@@ -426,7 +420,7 @@ delete_breakpoints
 # test temporary breakpoint at function
 #
 
-gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
+gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
 
 #
 # test break at function in file
@@ -440,16 +434,16 @@ gdb_test "tbreak $srcfile:factorial" "Te
 #
 gdb_test "tbreak $bp_location1" \
     "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location1.*" \
-    "Temporary breakpoint line number #1"
+    "temporary breakpoint line number #1"
 
-gdb_test "tbreak $bp_location6" "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
+gdb_test "tbreak $bp_location6" "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "temporary breakpoint line number #2"
 
 #
 # test break at line number in file
 #
 gdb_test "tbreak $srcfile:$bp_location2" \
     "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location2.*" \
-    "Temporary breakpoint line number in file #1"
+    "temporary breakpoint line number in file #1"
 
 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
 gdb_test  "tbreak $srcfile:$bp_location11" "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
@@ -459,7 +453,7 @@ gdb_test  "tbreak $srcfile:$bp_location1
 #
 gdb_test "info break" "Num     Type.*Disp Enb Address.*What.*\[\r\n\]
 \[0-9\]+\[\t \]+breakpoint     del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint     del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint     del.*y.*in factorial at .*$srcfile:$bp_location7.*\[\r\n\]
 \[0-9\]+\[\t \]+breakpoint     del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
 \[0-9\]+\[\t \]+breakpoint     del.*y.*in main at .*$srcfile:$bp_location6.*\[\r\n\]
 \[0-9\]+\[\t \]+breakpoint     del.*y.*in main at .*$srcfile:$bp_location2.*\[\r\n\]
@@ -479,48 +473,14 @@ gdb_test "catch" \
     "Catch requires an event name." \
     "catch requires an event name"
 
+gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \
+    "set catch fork, never expected to trigger"
 
-set name "set catch fork, never expected to trigger"
-gdb_test_multiple "catch fork" "$name" {
-    -re "Catchpoint \[0-9\]* .fork..*$gdb_prompt $" {
-	pass $name
-    }
-    -re "Catch of fork not yet implemented.*$gdb_prompt $" {
-	pass $name
-    }
-}
+gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \
+    "set catch vfork, never expected to trigger"
 
-
-# If we are on HP-UX 10.20, we expect an error message to be
-# printed if we type "catch vfork" at the gdb gdb_prompt.  This is
-# because on HP-UX 10.20, we cannot catch vfork events.
-
-set name "set catch vfork, never expected to trigger"
-
-if [istarget "hppa*-hp-hpux10.20"] then {
-    gdb_test "catch vfork" \
-	"Catch of vfork events not supported on HP-UX 10.20..*" \
-	"$name"
-} else {
-    gdb_test_multiple "catch vfork" "$name" {
-	-re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $" {
-	    pass $name
-	}
-	-re "Catch of vfork not yet implemented.*$gdb_prompt $" {
-	    pass $name
-	}
-    }
-}
-
-set name "set catch exec, never expected to trigger"
-gdb_test_multiple "catch exec" "$name" {
-    -re "Catchpoint \[0-9\]* .exec..*$gdb_prompt $" {
-	pass $name
-    }
-    -re "Catch of exec not yet implemented.*$gdb_prompt $" {
-	pass $name
-    }
-}
+gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \
+    "set catch exec, never expected to trigger"
 
 # Verify that GDB responds gracefully when asked to set a breakpoint
 # on a nonexistent source line.
@@ -590,7 +550,7 @@ gdb_test "break $bp_location12 thread 99
     "thread-specific breakpoint on non-existent thread disallowed"
 
 gdb_test "break $bp_location12 thread foo" \
-    "Junk after thread keyword.*" \
+    "Invalid thread ID: foo" \
     "thread-specific breakpoint on bogus thread ID disallowed"
 
 # Verify that GDB responds gracefully to a breakpoint command with
@@ -647,32 +607,20 @@ gdb_test "break marker2" \
     "set breakpoint on to-be-called function"
 
 gdb_test "print marker2(99)" \
-    "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2$proto. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.*" \
+    "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.*" \
     "hit breakpoint on called function"
 
 # As long as we're stopped (breakpointed) in a called function,
 # verify that we can successfully backtrace & such from here.
-#
-# In this and the following test, the _sr4export check apparently is needed
-# for hppa*-*-hpux.
-#
-gdb_test_multiple "bt" "backtrace while in called function" {
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-}
+gdb_test "bt" \
+    "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+    "backtrace while in called function"
 
 # Return from the called function.  For remote targets, it's important to do
 # this before runto_main, which otherwise may silently stop on the dummy
 # breakpoint inserted by GDB at the program's entry point.
 #
 gdb_test_multiple "finish" "finish from called function" {
-    -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
-	pass "finish from called function"
-    }
     -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
 	pass "finish from called function"
     }
@@ -710,40 +658,6 @@ gdb_test_multiple "finish" "finish from 
     }
 }
 
-# Verify that we can explicitly ask GDB to stop on all shared library
-# events, and that it does so.
-#
-if [istarget "hppa*-*-hpux*"] then {
-    if ![runto_main] then { fail "break tests suppressed" }
-
-    gdb_test_no_output "set stop-on-solib-events 1" \
-	"set stop-on-solib-events"
-
-    gdb_test "run" \
-	"Stopped due to shared library event.*" \
-	"triggered stop-on-solib-events" \
-	"Start it from the beginning.*y or n. $" \
-	"y" 
-
-    gdb_test_no_output "set stop-on-solib-events 0" \
-	"reset stop-on-solib-events"
-}
-
-# Hardware breakpoints are unsupported on HP-UX.  Verify that GDB
-# gracefully responds to requests to create them.
-#
-if [istarget "hppa*-*-hpux*"] then {
-    if ![runto_main] then { fail "break tests suppressed" }
-
-    gdb_test "hbreak" \
-	"No hardware breakpoint support in the target.*" \
-	"hw breaks disallowed"
-
-    gdb_test "thbreak" \
-	"No hardware breakpoint support in the target.*" \
-	"temporary hw breaks disallowed"
-}
-
 #********
 
 
@@ -833,7 +747,7 @@ test_next_with_recursion
 # build a new file with optimization enabled so that we can try breakpoints
 # on targets with optimized prologues
 
-if { [prepare_for_testing break.exp "breako2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
+if { [prepare_for_testing "failed to prepare" "breako2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr1.c ./gdb/testsuite/gdb.base/break-fun-addr1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr1.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-fun-addr1.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr2.c ./gdb/testsuite/gdb.base/break-fun-addr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-fun-addr2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+compute_something (int i)
+{
+  return i - 1;
+}
+
+int
+main (void)
+{
+  return compute_something (1);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr.exp ./gdb/testsuite/gdb.base/break-fun-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-fun-addr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-fun-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,84 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The purpose of this testcase is to verify that, when using a breakpoint
+# location of the form "*<EXPR>" (Eg: "*main"), GDB is able to start
+# the program and stop at the correct location.  With programs built
+# as PIE, this means that GDB needs to re-evaluate the location once
+# the program as started, since PIE ensures that the address of all
+# symbols have changed after load.
+#
+# PIE is not always supported by the target system, so instead of
+# creating a testcase building executables with PIE, this testcase
+# takes a slightly different approach.  It builds a first program,
+# breaks on *main, and then runs to that breakpoint. It then builds
+# a second program, different from the first one, and loads that
+# executable within the same GDB session.  Similarly to the PIE case,
+# the address of main should be different, and therefore GDB should
+# recalculate it.  We verify that by checking that running to that
+# breakpoint still works, and that we land at the first instruction
+# of that function in both cases.
+
+set testfile1 "break-fun-addr1"
+set srcfile1 ${testfile1}.c
+set binfile1 [standard_output_file ${testfile1}]
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug}] != "" } {
+    untested "failed to compile first testcase"
+    return -1
+}
+
+# Start the debugger with the first executable, put a breakpoint
+# on the first instruction of function "main" ("*main"), then
+# run to that breakpoint.
+
+clean_restart ${binfile1}
+
+with_test_prefix "${binfile1}" {
+
+    gdb_test "break *main" \
+        "Breakpoint.*at.* file .*$srcfile1, line .*" \
+
+    gdb_run_cmd
+    gdb_test "" \
+             "Breakpoint.* main \\(\\) at .*$srcfile1:.*" \
+             "run to breakpoint at *main"
+
+    # Verify also that we stopped at the start of the function...
+    gdb_test "p \$pc == main" " = 1"
+}
+
+set testfile2 "break-fun-addr2"
+set srcfile2 ${testfile2}.c
+set binfile2 [standard_output_file ${testfile2}]
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
+    untested "failed to compile second testcase"
+    return -1
+}
+
+# Now, keeping the same GDB process (so as to keep the same breakpoint),
+# start a new debugging session with a different executable.
+gdb_load ${binfile2}
+
+with_test_prefix "${binfile2}" {
+
+    gdb_run_cmd
+    gdb_test "" \
+             "Breakpoint.* main \\(\\) at .*$srcfile2:.*" \
+             "run to breakpoint at *main"
+
+    gdb_test "p \$pc == main" " = 1"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-idempotent.c ./gdb/testsuite/gdb.base/break-idempotent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-idempotent.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-idempotent.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-idempotent.exp ./gdb/testsuite/gdb.base/break-idempotent.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-idempotent.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-idempotent.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -127,7 +127,7 @@ proc test_break { always_inserted break_
 	delete_breakpoints
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-inline.c ./gdb/testsuite/gdb.base/break-inline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-inline.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-inline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-inline.exp ./gdb/testsuite/gdb.base/break-inline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-inline.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-inline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { [prepare_for_testing break-inline.exp "break-inline" {} {debug nowarnings optimize=-O2}] } {
+if { [prepare_for_testing "failed to prepare" "break-inline" {} {debug nowarnings optimize=-O2}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp.exp ./gdb/testsuite/gdb.base/break-interp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-interp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -308,23 +308,25 @@ proc test_attach {file displacement {rel
     set test "sleep function started"
 
     set command "${file} sleep"
-    set res [remote_spawn host $command]
-    if { $res < 0 || $res == "" } {
+    set test_spawn_id [remote_spawn host $command]
+    if { $test_spawn_id < 0 || $test_spawn_id == "" } {
 	perror "Spawning $command failed."
 	fail $test
 	return
     }
-    set pid [exp_pid -i $res]
+    set pid [spawn_id_get_pid $test_spawn_id]
     gdb_expect {
 	-re "sleeping\r\n" {
 	    pass $test
 	}
 	eof {
 	    fail "$test (eof)"
+	    wait -i $test_spawn_id
 	    return
 	}
 	timeout {
 	    fail "$test (timeout)"
+	    kill_wait_spawned_process $test_spawn_id
 	    return
 	}
     }
@@ -364,7 +366,7 @@ proc test_attach {file displacement {rel
 	file_copy $interp_saved $interp
     }
 
-    remote_exec host "kill -9 $pid"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 proc test_ld {file ifmain trynosym displacement} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp-lib.c ./gdb/testsuite/gdb.base/break-interp-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-interp-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp-main.c ./gdb/testsuite/gdb.base/break-interp-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-interp-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-interp-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-main-file-remove-fail.c ./gdb/testsuite/gdb.base/break-main-file-remove-fail.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-main-file-remove-fail.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-main-file-remove-fail.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp ./gdb/testsuite/gdb.base/break-main-file-remove-fail.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-main-file-remove-fail.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ proc test_remove_bp { initial_load } {
 	set GDBFLAGS $saved_gdbflags
 
 	if ![runto start] {
-	    fail "Can't run to start"
+	    fail "can't run to start"
 	    return
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc ./gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp ./gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ set additional_flags {-ffunction-section
 if {[build_executable_from_specs $testfile.exp $testfile \
        {c++ additional_flags=-Wl,--gc-sections} \
        $srcfile {debug c++ additional_flags=-ffunction-sections}]} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-in-ro-region.c ./gdb/testsuite/gdb.base/breakpoint-in-ro-region.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-in-ro-region.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/breakpoint-in-ro-region.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp ./gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,6 +25,9 @@ if ![runto main] {
     return -1
 }
 
+# Delete all target-supplied memory regions.
+delete_memory_regions
+
 delete_breakpoints
 
 # Probe for hardware stepping.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-shadow.c ./gdb/testsuite/gdb.base/breakpoint-shadow.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-shadow.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/breakpoint-shadow.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-shadow.exp ./gdb/testsuite/gdb.base/breakpoint-shadow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/breakpoint-shadow.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/breakpoint-shadow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -41,8 +40,8 @@ gdb_test_multiple "disass main" $test {
     }
 }
 
-gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "First breakpoint placed"
-gdb_test "b [gdb_get_line_number "break-second"]" "Breakpoint \[0-9\] at .*" "Second breakpoint placed"
+gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "first breakpoint placed"
+gdb_test "b [gdb_get_line_number "break-second"]" "Breakpoint \[0-9\] at .*" "second breakpoint placed"
 
 # Disassemble main, and compare the output to the original output
 # before breakpoints were inserted.  TEST is used as test message.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes.c ./gdb/testsuite/gdb.base/break-probes.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-probes.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes.exp ./gdb/testsuite/gdb.base/break-probes.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-probes.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,11 +28,11 @@ set probes_bp "dl_main"
 
 if { [gdb_compile_shlib $srcfile_lib $binfile_lib \
 	  [list additional_flags=-fPIC]] != "" } {
-    untested "Could not compile $binfile_lib."
+    untested "failed to compile shared library"
     return -1
 }
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile \
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
 	  [list additional_flags=-DSHLIB_NAME=\"$binfile_lib\" libs=-ldl]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes-solib.c ./gdb/testsuite/gdb.base/break-probes-solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-probes-solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-probes-solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-unload-file.c ./gdb/testsuite/gdb.base/break-unload-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-unload-file.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-unload-file.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-unload-file.exp ./gdb/testsuite/gdb.base/break-unload-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/break-unload-file.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/break-unload-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ proc test_break { initial_load always_in
 	set GDBFLAGS $saved_gdbflags
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-ar-st.c ./gdb/testsuite/gdb.base/call-ar-st.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-ar-st.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-ar-st.c	2017-03-06 01:49:07.000000000 +0000
@@ -3,6 +3,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../lib/unbuffer_output.c"
+
 /**************************************************************************
  * TESTS :
  *   -- function arguments that are enumerated types
@@ -912,6 +914,8 @@ int main ()  {
    static struct two_floats_t      *f2;
    static struct two_floats_t      *f3;
 
+  gdb_unbuffer_output ();
+
   /* Initialize arrays
    */
   for (index = 0; index < 120; index++) {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-ar-st.exp ./gdb/testsuite/gdb.base/call-ar-st.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-ar-st.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-ar-st.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,16 +19,10 @@
 
 standard_testfile
 
-# Test depends on printf, which the sparclet stub doesn't support.  
-if { [istarget "sparclet-*-*"] } {
-    return 0
-}
-
 # Some targets can't call functions, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -39,8 +33,9 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+set skip_float_test [gdb_skip_float_test]
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -71,28 +66,32 @@ gdb_test continue \
 
 
 #call print_double_array(double_array)
-if {![gdb_skip_float_test "print print_double_array(double_array)"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print print_double_array(double_array)"] } {
-    gdb_test_sequence "print print_double_array(double_array)" "" {
-	"\[ \t\r\n\]+array_d :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]"
-	"\[ \t\r\n\]+"
-    }
+
+    gdb_test_stdio "print print_double_array(double_array)" \
+	[multi_line \
+	     "array_d :" \
+	     "=========" \
+	     "" \
+	     "0.000000 *" \
+	     "23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]"]
 }
 
 #call print_char_array(char_array)
 
+set array_c_re \
+    [multi_line \
+	 "array_c :" \
+	 "=========" \
+	 "" \
+	 "Z" \
+	 "aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ" \
+	 "aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ" \
+	 "aZaZaZaZaZaZaZaZaZa"]
+
 if ![gdb_skip_stdio_test "print_char_array(char_array)"] {
-    gdb_test_sequence "print print_char_array(char_array)" "" {
-	"\[ \t\r\n\]+array_c :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+\[ \t\r\n\]+Z"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa\[ \t\r\n\]+\[ \t\r\n\]+"
-    }
+    gdb_test_stdio "print print_char_array(char_array)" $array_c_re
 }
 
 set stop_line [gdb_get_line_number "-tbreak2-"]
@@ -101,16 +100,11 @@ gdb_test "tbreak $stop_line" \
 "tbreakpoint at tbreak2"
 
 if ![gdb_skip_stdio_test "continue to tbreak2"] {
-    gdb_test_sequence "continue" "continue to tbreak2" {
-	"\[ \t\r\n\]+array_c :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+\[ \t\r\n\]+Z"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
-	"\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa"
-	"\[ \t\r\n\]+main.*at.*:\[0-9\]+"
-	"\[ \t\r\n\]+\[0-9\]+.*print_double_array\\(double_array\\)"
-    }
+    set gdb_re \
+	[multi_line \
+	     "main.*at.*:\[0-9\]+" \
+	     "\[0-9\]+.*print_double_array\\(double_array\\).*"]
+    gdb_test_stdio "continue" $array_c_re $gdb_re "continue to tbreak2"
 } else {
     gdb_test "continue" ".*" ""
 }
@@ -133,20 +127,26 @@ gdb_test "tbreak $stop_line" \
 	"Temporary breakpoint.* file .*$srcfile, line $stop_line.*" \
 	"tbreakpoint at tbreak3"
 
-if {![gdb_skip_float_test "continuing to tbreak3"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "continuing to tbreak3"] } {
-    gdb_test_sequence "continue" "continuing to tbreak3" {
-	"Continuing\\."
-	"\[ \t\r\n\]+array_d :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
-	"\[ \t\r\n\]+"
-	"array_f :"
-	"student id :\[\t \]+.*YELLOW"
-	"array_i :"
-	"main \\(\\) at .*call-ar-st.c:\[0-9\]+\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)."
-    }
+
+    gdb_test_stdio "continue" \
+	[multi_line \
+	     "array_d :" \
+	     "=========" \
+	     "" \
+	     "0.000000 *" \
+	     "23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]* *" \
+	     "" \
+	     "" \
+	     "array_f :" \
+	     ".*" \
+	     "student id :\[\t \]+.*YELLOW" \
+	     "array_i :" \
+	    ] \
+	"main \\(\\) at .*call-ar-st.c:\[0-9\]+\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)..*" \
+	"continuing to tbreak3"
+
 } else {
     gdb_test "continue" ".*" ""
 }
@@ -160,23 +160,26 @@ gdb_test "step" \
 #step -over
 if ![gdb_skip_stdio_test "next over print_int_array in print_all_arrays"] {
     set stop_line [gdb_get_line_number "-next1-"]
-    gdb_test "next" \
-	"array_i :.*$stop_line.*print_char_array.*" \
+    gdb_test_stdio "next" \
+	"array_i :" \
+	"$stop_line.*print_char_array.*" \
 	"next over print_int_array in print-all_arrays"
 } else {
     gdb_test "next" ".*" ""
 }
 
 #call print_double_array(array_d)
-if {![gdb_skip_float_test "print print_double_array(array_d)"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print print_double_array(array_d)"] } {
-    gdb_test_sequence "print print_double_array(array_d)" "" {
-	"array_d :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
-	"\[ \t\r\n\]+"
-    }
+
+    gdb_test_stdio "print print_double_array(array_d)" \
+	[multi_line \
+	     "array_d :" \
+	     "=========" \
+	     "" \
+	     "0.000000 *" \
+	     "23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*" \
+	    ]
 }
 
 set stop_line [gdb_get_line_number "-tbreak4-"]
@@ -184,17 +187,19 @@ gdb_test "tbreak $stop_line" \
 "Temporary breakpoint.* file .*$srcfile, line $stop_line.*" \
 "tbreakpoint at tbreak4"
 
-if {![gdb_skip_float_test "continuing to tbreak4"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "continuing to tbreak4"] } {
-    gdb_test_sequence "continue" "continuing to tbreak4" {
-	"Continuing\\..*array_c"
-	"array_f"
-	"\[ \t\r\n\]+array_d :"
-	"\[ \t\r\n\]+========="
-	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
-	"\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:\[0-9\]+.*printf\\(.BYE BYE FOR NOW.n.\\)."
-    }
+
+    gdb_test_stdio "continue" \
+	[multi_line \
+	     "array_d :" \
+	     "=========" \
+	     "" \
+	     "0.000000 *" \
+	     "23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*" \
+	    ] \
+	"" \
+	"continuing to tbreak4"
 } else {
     gdb_test "continue" ".*" ""
 }
@@ -203,16 +208,34 @@ if {![gdb_skip_float_test "continuing to
 #call sum_array_print(10, *list1, *list2, *list3, *list4)
 
 if ![gdb_skip_stdio_test "print sum_array_print(...)"] {
-    gdb_test "print sum_array_print(10, *list1, *list2, *list3, *list4)" \
-	".*Sum of 4 arrays, by element \\(add in seed as well\\):\[ \t\r\n\]+Seed: 10\[ \t\r\n\]+Element Index . Sum\[ \t\r\n\]+-------------------------\[ \t\r\n\]+.*\[ \t\]+0\[ \t\]+52\[ \t\r\n\]+1\[ \t\]+60\[ \t\r\n\]+2\[ \t\]+68\[ \t\r\n\]+3\[ \t\]+76\[ \t\r\n\]+4\[ \t\]+84\[ \t\r\n\]+5\[ \t\]+92\[ \t\r\n\]+6\[ \t\]+100\[ \t\r\n\]+7\[ \t\]+108\[ \t\r\n\]+8\[ \t\]+116\[ \t\r\n\]+9\[ \t\]+124\[ \t\r\n\]+.*" \
-	"print sum_array_print(10, *list1, *list2, *list3, *list4)"
+
+    gdb_test_stdio "print sum_array_print(10, *list1, *list2, *list3, *list4)" \
+	[multi_line \
+	     "Sum of 4 arrays, by element \\(add in seed as well\\): " \
+	     "" \
+	     "Seed: 10" \
+	     "Element Index . Sum " \
+	     "-------------------------" \
+	     ".*" \
+	     "\[ \t\]+0\[ \t\]+52" \
+	     "\[ \t\]+1\[ \t\]+60" \
+	     "\[ \t\]+2\[ \t\]+68" \
+	     "\[ \t\]+3\[ \t\]+76" \
+	     "\[ \t\]+4\[ \t\]+84" \
+	     "\[ \t\]+5\[ \t\]+92" \
+	     "\[ \t\]+6\[ \t\]+100" \
+	     "\[ \t\]+7\[ \t\]+108" \
+	     "\[ \t\]+8\[ \t\]+116" \
+	     "\[ \t\]+9\[ \t\]+124" \
+	    ]
 }
 
 #step over
 set stop_line [gdb_get_line_number "-next2-"]
 if ![gdb_skip_stdio_test "next to next2"] {
-    gdb_test "next" \
-	"BYE BYE FOR NOW.*$stop_line.*printf\\(.VERY GREEN GRASS.n.\\);.*" \
+    gdb_test_stdio "next" \
+	"BYE BYE FOR NOW" \
+	"$stop_line.*printf\\(.VERY GREEN GRASS.n.\\);.*" \
 	"next to next2"
 } else {
     gdb_test "next" ".*" ""
@@ -221,9 +244,8 @@ if ![gdb_skip_stdio_test "next to next2"
 #call print_array_rep(\*list1, \*list2, \*list3)
 
 if ![gdb_skip_stdio_test "print print_array_rep(...)"] {
-    gdb_test "print print_array_rep(\*list1, \*list2, \*list3)" \
-	"Contents of linked list3:.*" \
-	"print print_array_rep(*list1, *list2, *list3)"
+    gdb_test_stdio "print print_array_rep(\*list1, \*list2, \*list3)" \
+	"Contents of linked list3:"
 }
 
 set stop_line [gdb_get_line_number "-tbreak5-"]
@@ -272,8 +294,9 @@ gdb_test "tbreak $stop_line" \
     "tbreakpoint at tbreak6"
 
 if ![gdb_skip_stdio_test "continuing to tbreak6"] {
-    gdb_test "continue" \
-	"Continuing\\..*Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t.*main \\(\\) at .*$srcfile:$stop_line.*c = 0.*" \
+    gdb_test_stdio "continue" \
+	"Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t" \
+	"main \\(\\) at .*$srcfile:$stop_line.*c = 0.*" \
 	"continue to tbreak6"
 } else {
     gdb_test "continue" ".*" ""
@@ -283,43 +306,59 @@ if ![gdb_skip_stdio_test "continuing to 
 #                         *flags, *flags_combo, *three_char, *five_char, 
 #                         *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
 
-if {![gdb_skip_float_test "print print_small_structs(...)"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print print_small_structs(...)"] } {
-    gdb_test_sequence "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" "print print_small_structs" {
-	"\[\t\r\n \]+alpha"
-	"\[\t\r\n \]+gamma"
-	"\[\t\r\n \]+epsilon"
-	"\[\t\r\n \]+alpha"
-	"\[\t\r\n \]+gamma"
-	"\[\t\r\n \]+epsilon"
-	"\[\t\r\n \]+ch1: y[ \t]*ch2: n"
-	"\[\t\r\n \]+Contents of three_char_t:"
-	"\[\t\r\n \]+a[ \t]*b[ \t]*c"
-	"\[\t\r\n \]+Contents of five_char_t:"
-	"\[\t\r\n \]+l[ \t]*m[ \t]*n[ \t]*o[ \t]*p"
-	"\[\t\r\n \]+Contents of int_char_combo_t:"
-	"\[\t\r\n \]+123[ \t]*z"
-	"\[\t\r\n \]+Sum of the 4 struct values and seed :"
-	"\[\t\r\n \]+52"
-	"\[\t\r\n \]+Contents of struct1:"
-	"\[\t\r\n \]+6[ \t]*0"
-	"\[\t\r\n \]+Contents of struct2:"
-	"\[\t\r\n \]+10[ \t]*0"
-	"\[\t\r\n \]+Contents of struct3:"
-	"\[\t\r\n \]+12[ \t]*0"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+10.500000"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+-3.375000"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+675.093750"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+45.234001[ \t]*43.599998"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+78.010002[ \t]*122.099998"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+-1232.344971[ \t]*-199.210007"
-    }
+    gdb_test_stdio "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" \
+	[multi_line \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "ch1: y\[ \t\]*ch2: n" \
+	     "Contents of three_char_t: " \
+	     "" \
+	     "a\[ \t\]*b\[ \t\]*c" \
+	     "Contents of five_char_t: " \
+	     "" \
+	     "l\[ \t\]*m\[ \t\]*n\[ \t\]*o\[ \t\]*p" \
+	     "Contents of int_char_combo_t: " \
+	     "" \
+	     "123\[ \t\]*z" \
+	     "Sum of the 4 struct values and seed : " \
+	     "" \
+	     "\[ \t\]*52" \
+	     "Contents of struct1: " \
+	     "" \
+	     "\[ \t\]*6\[ \t\]*0" \
+	     "Contents of struct2: " \
+	     "" \
+	     "\[ \t\]*10\[ \t\]*0" \
+	     "Contents of struct3: " \
+	     "" \
+	     "\[ \t\]*12\[ \t\]*0" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "10.500000" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "-3.375000" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "675.093750" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "\[ \t\]*45.234001\[ \t\]*43.599998" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "\[ \t\]*78.010002\[ \t\]*122.099998" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "-1232.344971\[ \t\]*-199.210007" \
+	    ] \
+	"" \
+	"print print_small_structs"
 }
 
 #call compute_with_small_structs(20)
@@ -331,15 +370,16 @@ gdb_test "print compute_with_small_struc
 #call print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 
 #                       3.14, -5678.12345, -0.11111111, 216.97065)
 
-if {![gdb_skip_float_test "print print_ten_doubles(...)"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print print_ten_doubles(...)"]} {
-    gdb_test_sequence "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)" "print print_ten_doubles" {
-	"\[\t\r\n \]+Two Doubles : 123.45\[0-9\]*.*123.45\[0-9\]*"
-	"\[\t\r\n \]+Two Doubles : -0.1200\[0-9\]*.*-1.2300\[0-9\]*"
-	"\[\t\r\n \]+Two Doubles : 343434.\[0-9\]*.*89.09\[0-9\]*"
-	"\[\t\r\n \]+Two Doubles : 3.1400\[0-9\]*.*-5678.123\[0-9\]*"
-	"\[\t\r\n \]+Two Doubles : -0.1111\[0-9\]*.*216.97\[0-9\]*"
-    }
+    gdb_test_stdio "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)" \
+	[multi_line \
+	     "Two Doubles : 123.45\[0-9\]*.*123.45\[0-9\]*" \
+	     "Two Doubles : -0.1200\[0-9\]*.*-1.2300\[0-9\]*" \
+	     "Two Doubles : 343434.\[0-9\]*.*89.09\[0-9\]*" \
+	     "Two Doubles : 3.1400\[0-9\]*.*-5678.123\[0-9\]*" \
+	     "Two Doubles : -0.1111\[0-9\]*.*216.97\[0-9\]*" \
+	     ]
 }
 
 set stop_line [gdb_get_line_number "-tbreak7-"]
@@ -350,46 +390,28 @@ gdb_test "tbreak $stop_line" \
 gdb_test continue "Continuing\\..*main \\(.*\\) at.*$srcfile:$stop_line\[\t\r\n \]+$stop_line.*print_long_arg_list \\( a, b, c, d, e, f, .struct1, .struct2, .struct3, .struct4,.*" "continue to tbreak7"
 
 set stop_line [gdb_get_line_number "-step2-"]
-if { [istarget "hppa*-*-hpux*"] } {
-    #
-    # NOTE:(FIXME)
-    # the aCC demangler cannot demangle the name of a function with >10 args.
-    # so I added a .* after the name of the function, to match the
-    # incredibly long mangled name 
-    # (getting aCC's libdemangle.a bundled w/ the system?)
-    # DTS CLLbs16994  coulter 990114
-    # 
-    # FIXME: use step for hppa* testing for now
-    # guo 990621
-    #
-    gdb_test "step" \
-	"print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);" \
-	"step into print_long_arg_list"
-} else {
-
-    # We can't just assume that a "step" will get us into
-    # print_long_arg_list here,either.
-    gdb_test "tbreak print_long_arg_list" \
-	"Temporary breakpoint .* file .*$srcfile, line .*" \
-	"tbreak in print_long_arg_list after stepping into memcpy"
-    # The short match case below handles cases where a buffer
-    # overflows or something, and expect can't deal with the full
-    # line.  Perhaps a more elegant solution exists... -sts 1999-08-17
-    if {![gdb_skip_float_test "step into print_long_arg_list"]} {
-	gdb_test_multiple "continue" "step into print_long_arg_list" {
-	    -re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
-		pass "step into print_long_arg_list"
-	    }
-	    -re ".*print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}.*\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
-		pass "step into print_long_arg_list (short match)"
-	    }
+# We can't just assume that a "step" will get us into
+# print_long_arg_list here,either.
+gdb_test "tbreak print_long_arg_list" \
+    "Temporary breakpoint .* file .*$srcfile, line .*" \
+    "tbreak in print_long_arg_list after stepping into memcpy"
+# The short match case below handles cases where a buffer
+# overflows or something, and expect can't deal with the full
+# line.  Perhaps a more elegant solution exists... -sts 1999-08-17
+if {!$skip_float_test} {
+    gdb_test_multiple "continue" "step into print_long_arg_list" {
+	-re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
+	    pass "step into print_long_arg_list"
+	}
+	-re ".*print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}.*\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
+	    pass "step into print_long_arg_list (short match)"
 	}
-    } else {
-	# If skipping float tests, don't expect anything in arg list.
-	gdb_test "continue" \
-	    "print_long_arg_list \\(.*\\).*" \
-	    "step into print_long_arg_list"
     }
+} else {
+    # If skipping float tests, don't expect anything in arg list.
+    gdb_test "continue" \
+	"print_long_arg_list \\(.*\\).*" \
+	"step into print_long_arg_list"
 }
 
 set ws "\[\n\r\t \]+"
@@ -398,7 +420,7 @@ set ws "\[\n\r\t \]+"
 #                         flags_combo, three_char, five_char, int_char_combo, 
 #                         d1, d2, d3, f1, f2, f3)
 
-if {![gdb_skip_float_test "print_small_structs from print_long_arg_list"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print_small_structs from print_long_arg_list"] } {
 
     # On 32-bit SPARC, some of the args are passed by ref, others by
@@ -408,43 +430,59 @@ if {![gdb_skip_float_test "print_small_s
 	setup_kfail "gdb/1539" "sparc-*-*"
     }
 
-    gdb_test_sequence "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)" "print print_small_structs from print_long_arg_list" {
-	"\[\t\r\n \]+alpha"
-	"\[\t\r\n \]+gamma"
-	"\[\t\r\n \]+epsilon"
-	"\[\t\r\n \]+alpha"
-	"\[\t\r\n \]+gamma"
-	"\[\t\r\n \]+epsilon"
-	"\[\t\r\n \]+ch1: y[ \t]*ch2: n"
-	"\[\t\r\n \]+Contents of three_char_t:"
-	"\[\t\r\n \]+a\[ \t\]*b\[ \t\]*c"
-	"\[\t\r\n \]+Contents of five_char_t:"
-	"\[\t\r\n \]+l\[ \t\]*m\[ \t\]*n\[ \t\]*o\[ \t\]*p"
-	"\[\t\r\n \]+Contents of int_char_combo_t:"
-	"\[\t\r\n \]+123\[ \t\]*z"
-	"\[\t\r\n \]+Sum of the 4 struct values and seed :"
-	"\[\t\r\n \]+52"
-	"\[\t\r\n \]+Contents of struct1:"
-	"\[\t\r\n \]+6\[ \t\]*0"
-	"\[\t\r\n \]+Contents of struct2:"
-	"\[\t\r\n \]+10\[ \t\]*0"
-	"\[\t\r\n \]+Contents of struct3:"
-	"\[\t\r\n \]+12\[ \t\]*0"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+10.500000"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+-3.375000"
-	"\[\t\r\n \]+Contents of one_double_t:"
-	"\[\t\r\n \]+675.093750"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+45.234001\[ \t\]*43.599998"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+78.010002\[ \t\]*122.099998"
-	"\[\t\r\n \]+Contents of two_floats_t:"
-	"\[\t\r\n \]+-1232.344971\[ \t\]*-199.210007"
-    }
-}
 
+    gdb_test_stdio "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)" \
+	[multi_line \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "ch1: y\[ \t\]*ch2: n" \
+	     "Contents of three_char_t: " \
+	     "" \
+	     "a\[ \t\]*b\[ \t\]*c" \
+	     "Contents of five_char_t: " \
+	     "" \
+	     "l\[ \t\]*m\[ \t\]*n\[ \t\]*o\[ \t\]*p" \
+	     "Contents of int_char_combo_t: " \
+	     "" \
+	     "123\[ \t\]*z" \
+	     "Sum of the 4 struct values and seed : " \
+	     "" \
+	     "\[ \t\]*52" \
+	     "Contents of struct1: " \
+	     "" \
+	     "\[ \t\]*6\[ \t\]*0" \
+	     "Contents of struct2: " \
+	     "" \
+	     "\[ \t\]*10\[ \t\]*0" \
+	     "Contents of struct3: " \
+	     "" \
+	     "\[ \t\]*12\[ \t\]*0" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "10.500000" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "-3.375000" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "675.093750" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "\[ \t\]*45.234001\[ \t\]*43.599998" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "\[ \t\]*78.010002\[ \t\]*122.099998" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "-1232.344971\[ \t\]*-199.210007" \
+	    ] \
+	"" \
+	"print print_small_structs from print_long_arg_list"
+}
 
 set stop_line [gdb_get_line_number "-tbreak8-"]
 gdb_test "tbreak $stop_line" \
@@ -452,8 +490,10 @@ gdb_test "tbreak $stop_line" \
     "tbreakpoint at tbreak8"
 
 if ![gdb_skip_stdio_test "continuing to tbreak8"] {
-    gdb_test "continue" "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*$srcfile:$stop_line.*$stop_line.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
-	    "continue to tbreak8"
+    gdb_test_stdio "continue" \
+	"Contents of two_floats_t:" \
+	".*main \\(\\) at.*$srcfile:$stop_line.*$stop_line.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
+	"continue to tbreak8"
 } else {
     gdb_test "continue" ".*" ""
 }
@@ -466,9 +506,8 @@ gdb_test "step" \
 
 #call print_bit_flags_combo(*bit_flags_combo)
 if ![gdb_skip_stdio_test "continuing at step3"] {
-    gdb_test "print print_bit_flags_combo(*bit_flags_combo)" \
-	"alpha.*gamma.*epsilon.*ch1: y.*ch2: n.*" \
-	"print print_bit_flags_combo from init_bit_flags_combo"
+    gdb_test_stdio "print print_bit_flags_combo(*bit_flags_combo)" \
+	"alpha.*gamma.*epsilon.*ch1: y.*ch2: n"
 }
 
 
@@ -482,52 +521,66 @@ gdb_test continue "Continuing\\..*main \
 
 #call print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
 
-# FIXME:
-# HP aCC demangler currently does not handle hp aCC functions with >10 args
-# DTS CLLbs16994  coulter 990114
-
-if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*" CLLbs16994}
-
-if {![gdb_skip_float_test "print print_long_arg_list"] && \
+if {!$skip_float_test && \
     ![gdb_skip_stdio_test "print print_long_arg_list"] } {
-    gdb_test_sequence "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" "print print_long_arg_list" {
-	"\[ \n\r\t\]+double : 22.250000"
-	"\[ \n\r\t\]+double : 33.375000"
-	"\[ \n\r\t\]+int : 0"
-	"\[ \n\r\t\]+int : -25"
-	"\[ \n\r\t\]+int : 100"
-	"\[ \n\r\t\]+int : 2345"
-	"\[ \n\r\t\]+alpha"
-	"\[ \n\r\t\]+gamma"
-	"\[ \n\r\t\]+epsilon"
-	"\[ \n\r\t\]+ch1: y\[ \t\]+ch2: n"
-	"\[ \n\r\t\]+Contents of three_char_t:"
-	"\[ \n\r\t\]+x\[ \t\]+y\[ \t\]+z"
-	"\[ \n\r\t\]+Contents of five_char_t:"
-	"\[ \n\r\t\]+h\[ \t\]+e\[ \t\]+l\[ \t\]+l\[ \t\]+o"
-	"\[ \n\r\t\]+Contents of int_char_combo_t:"
-	"\[ \n\r\t\]+123\[ \t\]+z"
-	"\[ \n\r\t\]+Sum of the 4 struct values and seed :"
-	"\[ \n\r\t\]+52"
-	"\[ \n\r\t\]+Contents of struct1:"
-	"\[ \n\r\t\]+6\[ \t\]+0"
-	"\[ \n\r\t\]+Contents of struct2:"
-	"\[ \n\r\t\]+10\[ \t\]+0"
-	"\[ \n\r\t\]+Contents of struct3:"
-	"\[ \n\r\t\]+12\[ \t\]+0"
-	"\[ \n\r\t\]+Contents of one_double_t:"
-	"\[ \n\r\t\]+1.111110"
-	"\[ \n\r\t\]+Contents of one_double_t:"
-	"\[ \n\r\t\]+-345.340000"
-	"\[ \n\r\t\]+Contents of one_double_t:"
-	"\[ \n\r\t\]+546464.200000"
-	"\[ \n\r\t\]+Contents of two_floats_t:"
-	"\[ \n\r\t\]+0.234000\[ \t\]+453.100006"
-	"\[ \n\r\t\]+Contents of two_floats_t:"
-	"\[ \n\r\t\]+78.345001\[ \t\]+23.090000"
-	"\[ \n\r\t\]+Contents of two_floats_t:"
-	"\[ \n\r\t\]+-2.345000\[ \t\]+1.000000"
-    }
+
+    gdb_test_stdio "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" \
+	[multi_line \
+	     "double : 22.250000" \
+	     "double : 33.375000" \
+	     "int : 0" \
+	     "int : -25" \
+	     "int : 100" \
+	     "int : 2345" \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "alpha" \
+	     "gamma" \
+	     "epsilon" \
+	     "ch1: y\[ \t\]*ch2: n" \
+	     "Contents of three_char_t: " \
+	     "" \
+	     "x\[ \t\]*y\[ \t\]*z" \
+	     "Contents of five_char_t: " \
+	     "" \
+	     "h\[ \t\]*e\[ \t\]*l\[ \t\]*l\[ \t\]*o" \
+	     "Contents of int_char_combo_t: " \
+	     "" \
+	     "123\[ \t\]*z" \
+	     "Sum of the 4 struct values and seed : " \
+	     "" \
+	     "\[ \t\]*52" \
+	     "Contents of struct1: " \
+	     "" \
+	     "\[ \t\]*6\[ \t\]*0" \
+	     "Contents of struct2: " \
+	     "" \
+	     "\[ \t\]*10\[ \t\]*0" \
+	     "Contents of struct3: " \
+	     "" \
+	     "\[ \t\]*12\[ \t\]*0" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "1.111110" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "-345.340000" \
+	     "Contents of one_double_t: " \
+	     "" \
+	     "546464.200000" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "0.234000\[ \t\]*453.100006" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "78.345001\[ \t\]*23.090000" \
+	     "Contents of two_floats_t: " \
+	     "" \
+	     "-2.345000\[ \t\]*1.000000" \
+	    ] \
+	"" \
+	"print print_long_arg_list"
 }
 
 
@@ -542,29 +595,30 @@ gdb_test continue "Continuing\\..*main \
 
 #call sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)
 if ![gdb_skip_stdio_test "print sum_struct_print(...)"] {
-    gdb_test "print sum_struct_print(10,*struct1,*struct2,*struct3,*struct4)" \
-	"Sum of the 4 struct values and seed :\[ \t\n\r\]+218.*" \
-	"print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)"
+    gdb_test_stdio "print sum_struct_print(10,*struct1,*struct2,*struct3,*struct4)" \
+	"Sum of the 4 struct values and seed :\[ \t\n\r\]+218"
 }
 
 
 #call print_struct_rep(*struct1, *struct2, *struct3)
 if ![gdb_skip_stdio_test "print print_struct_rep(...)"] {
-    gdb_test_sequence "print print_struct_rep(*struct1, *struct2, *struct3)" \
-	"print print_struct_rep(*struct1, *struct2, *struct3)" {
-	"\[ \t\n\r\]+Contents of struct1:"
-	"\[ \t\n\r\]+        22         0"
-	"\[ \t\n\r\]+Contents of struct2:"
-	"\[ \t\n\r\]+        42         0"
-	"\[ \t\n\r\]+Contents of struct3:"
-	"\[ \t\n\r\]+        62         0"
-    }
+    gdb_test_stdio "print print_struct_rep(*struct1, *struct2, *struct3)" \
+	[multi_line \
+	     "Contents of struct1: " \
+	     "" \
+	     "        22         0" \
+	     "Contents of struct2: " \
+	     "" \
+	     "        42         0" \
+	     "Contents of struct3: " \
+	     "" \
+	     "        62         0" \
+	    ]
 }
 
 if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] {
-    gdb_test "print print_one_large_struct(*list1)" \
-	"         4         1.*" \
-	"print print_one_large_struct(*list1)"
+    gdb_test_stdio "print print_one_large_struct(*list1)" \
+	"         4         1"
 }
 
 set timeout $oldtimeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callexit.c ./gdb/testsuite/gdb.base/callexit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callexit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/callexit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callexit.exp ./gdb/testsuite/gdb.base/callexit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callexit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/callexit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,15 +17,14 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested callexit.exp
+     untested "failed to compile"
      return -1
 }
 
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -34,7 +33,7 @@ if [target_info exists gdb,cannot_call_f
 clean_restart ${binfile}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callfuncs.c ./gdb/testsuite/gdb.base/callfuncs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callfuncs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/callfuncs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1993-2015 Free Software Foundation, Inc.
+   Copyright 1993-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callfuncs.exp ./gdb/testsuite/gdb.base/callfuncs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/callfuncs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/callfuncs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,11 +26,12 @@ if [support_complex_tests] {
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 # FIXME:  Before calling this proc, we should probably verify that
 # we can call inferior functions and get a valid integral value
 # returned.
@@ -39,7 +40,7 @@ if [target_info exists gdb,cannot_call_f
 # (computed in the inferior) is 1 for true and 0 for false.
 
 proc do_function_calls {} {
-    global gdb_prompt
+    global gdb_prompt skip_float_test
 
     # We need to up this because this can be really slow on some boards.
     set timeout 60
@@ -72,7 +73,7 @@ proc do_function_calls {} {
     gdb_test "p t_long_values(789,long_val2)" " = 1"
     gdb_test "p t_long_values(long_val1,-321)" " = 1"
 
-    if ![target_info exists gdb,skip_float_tests] {
+    if {!$skip_float_test} {
 	gdb_test "p t_float_values(0.0,0.0)" " = 0"
 
 	# These next four tests fail on the mn10300.
@@ -100,7 +101,7 @@ proc do_function_calls {} {
 
 	gdb_test "p t_float_values2(3.14159,float_val2)" " = 1"
 
-	gdb_test "p t_float_many_args (float_val1, float_val2, float_val3, float_val4, float_val5, float_val6, float_val7, float_val8, float_val9, float_val10, float_val11, float_val12, float_val13, float_val14, float_val15)" " = 1" "Call function with many float arguments."
+	gdb_test "p t_float_many_args (float_val1, float_val2, float_val3, float_val4, float_val5, float_val6, float_val7, float_val8, float_val9, float_val10, float_val11, float_val12, float_val13, float_val14, float_val15)" " = 1" "call function with many float arguments."
 
 	gdb_test "p t_small_values(1,2,3,4,5,6,7,8,9,10)" " = 55"
 
@@ -110,7 +111,7 @@ proc do_function_calls {} {
 	gdb_test "p t_double_values(45.654,double_val2)" " = 1"
 	gdb_test "p t_double_values(double_val1,-67.66)" " = 1"
 
-	gdb_test "p t_double_many_args (double_val1, double_val2, double_val3, double_val4, double_val5, double_val6, double_val7, double_val8, double_val9, double_val10, double_val11, double_val12, double_val13, double_val14, double_val15)" " = 1" "Call function with many double arguments."
+	gdb_test "p t_double_many_args (double_val1, double_val2, double_val3, double_val4, double_val5, double_val6, double_val7, double_val8, double_val9, double_val10, double_val11, double_val12, double_val13, double_val14, double_val15)" " = 1" "call function with many double arguments."
 
 	gdb_test "p t_double_int(99.0, 1)" " = 0"
 	gdb_test "p t_double_int(99.0, 99)" " = 1"
@@ -165,15 +166,12 @@ proc do_function_calls {} {
     # and attempting a jump through that (a totally random address).
     setup_kfail gdb/1457 "rs6000*-*-aix*"
     setup_kfail gdb/1457 "powerpc*-*-aix*"
-    setup_kfail gdb/1457 hppa*-*-hpux*
     gdb_test "p t_func_values(add,func_val2)" " = 1"
     setup_kfail gdb/1457 "rs6000*-*-aix*"
     setup_kfail gdb/1457 "powerpc*-*-aix*"
-    setup_kfail gdb/1457 hppa*-*-hpux*
     gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
     setup_kfail gdb/1457 "rs6000*-*-aix*"
     setup_kfail gdb/1457 "powerpc*-*-aix*"
-    setup_kfail gdb/1457 hppa*-*-hpux*
     gdb_test "p t_call_add(add,3,4)" " = 7"
     gdb_test "p t_call_add(func_val1,3,4)" " = 7"
 
@@ -203,7 +201,7 @@ proc do_function_calls {} {
     gdb_test "p t_structs_l(struct_val1)" "= 51" \
 	"call inferior func with struct - returns long"
 
-    if ![target_info exists gdb,skip_float_tests] {
+    if {!$skip_float_test} {
 	gdb_test "p t_structs_f(struct_val1)" "= 2.12.*" \
 	    "call inferior func with struct - returns float"
 	gdb_test "p t_structs_d(struct_val1)" "= 9.87.*" \
@@ -222,7 +220,7 @@ proc do_function_calls {} {
 	    "call inferior func with struct - returns long double _Complex"
     }
 
-    gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?<buf.*> \"foo\"" \
+    gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?<.*buf.*> \"foo\"" \
     	"call inferior func with struct - returns char *"
 
     # Restore default value.
@@ -254,6 +252,16 @@ proc fetch_all_registers {test} {
 	    }
 	    exp_continue
 	}
+	-re  "^pstate\[ \t\]+\[^\r\n\]+\r\n" {
+	    if [istarget "sparc64-*-linux-gnu"] {
+		# Filter out the pstate register, since in sparc64
+		# targets the Linux kernel disables pstate.PEF when
+		# returning from traps, giving spurious differences.
+	    } else {
+		lappend all_registers_lines $expect_out(0,string)
+	    }
+	    exp_continue
+	}
 	-re "^last_break\[ \t\]+\[^\r\n\]+\r\n" {
 	    if [istarget "s390*-*-*"] {
 		# Filter out last_break which is read-only,
@@ -291,22 +299,11 @@ proc fetch_all_registers {test} {
 }
 
 proc rerun_and_prepare {} {
-    global hp_aCC_compiler
-
     if { ![runto_main] } {
 	gdb_suppress_tests
     }
-    if { $hp_aCC_compiler } {
-	# Do not set language explicitly to 'C'.  This will cause aCC
-	# tests to fail because promotion rules are different.  Just let
-	# the language be set to the default.
-	# However, turn off overload-resolution for aCC.  Having it on causes
-	# a lot of failures.
 
-	gdb_test_no_output "set overload-resolution 0"
-    } else {
-	gdb_test_no_output "set language c"
-    }
+    gdb_test_no_output "set language c"
 
     get_debug_format
 
@@ -502,10 +499,10 @@ proc perform_all_tests {} {
 
 # Perform all tests with and without function prototypes.
 
-if { ![prepare_for_testing ${testfile}.exp $testfile $srcfile "$compile_flags additional_flags=-DPROTOTYPES"] } {
+if { ![prepare_for_testing "failed to prepare" $testfile $srcfile "$compile_flags additional_flags=-DPROTOTYPES"] } {
     perform_all_tests
 }
 
-if { ![prepare_for_testing ${testfile}.exp $testfile $srcfile "$compile_flags additional_flags=-DNO_PROTOTYPES"] } {
+if { ![prepare_for_testing "failed to prepare" $testfile $srcfile "$compile_flags additional_flags=-DNO_PROTOTYPES"] } {
     with_test_prefix "noproto" perform_all_tests
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-rt-st.c ./gdb/testsuite/gdb.base/call-rt-st.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-rt-st.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-rt-st.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,6 +2,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../lib/unbuffer_output.c"
+
 /**************************************************************************
  * TESTS :
  * function returning large structures, which go on the stack
@@ -562,6 +564,7 @@ int main ()  {
    struct one_double_t      *d1;
    struct two_floats_t      *f3;
 
+  gdb_unbuffer_output ();
 
   /* Allocate space for large structures 
    */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-rt-st.exp ./gdb/testsuite/gdb.base/call-rt-st.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-rt-st.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-rt-st.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,13 +23,8 @@
 
 standard_testfile .c
 
-# Test depends on printf, which the sparclet stub doesn't support.  
-if { [istarget "sparclet-*-*"] } {
-    return 0
-}
-
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
@@ -45,11 +40,12 @@ if [get_compiler_info] {
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 # Start with a fresh gdb.
 
 clean_restart ${binfile}
@@ -87,76 +83,107 @@ gdb_test_multiple "finish" "finish out f
 # return value unknown", call that an `unsupported' test; on some
 # architectures, it's impossible to find structs returned by value
 # reliably.
-proc print_struct_call { expr result } {
+proc print_struct_call { expr inf_result gdb_result } {
     global gdb_prompt
+    global inferior_spawn_id gdb_spawn_id
+
+    set inferior_matched 0
+    set gdb_matched 0
 
     set command "print $expr"
     gdb_test_multiple "${command}" "${command}" {
-        -re "$result\[\r\n\]+$gdb_prompt $" {
-            pass "$command"
-        }
+	-i $inferior_spawn_id
+	-re "$inf_result" {
+	    set inferior_matched 1
+	    if {!$gdb_matched} {
+		exp_continue
+	    }
+	}
+
+	-i $gdb_spawn_id
+	-re "$gdb_result\r\n$gdb_prompt $" {
+	    set gdb_matched 1
+	    if {!$inferior_matched} {
+		exp_continue
+	    }
+	}
         -re "Function return value unknown.\[\r\n\]+$gdb_prompt $" {
             unsupported "$command"
+	    return
         }
     }
+
+    verbose -log "inferior_matched=$inferior_matched, gdb_matched=$gdb_matched"
+    gdb_assert {$inferior_matched && $gdb_matched} $command
 }
 
 
 if ![gdb_skip_stdio_test "print print_struct_rep(*struct1)"] {
     print_struct_call "print_struct_rep(*struct1)" \
-            ".*Contents of struct1:\[ \t\n\r\]+22\[ \t\]+0\[ \t\n\r\]+.\[0-9\]+ = \\{value = 5, head = 0\\}"
+	".*Contents of struct1:\[ \t\n\r\]+22\[ \t\]+0\[ \t\n\r\]+" \
+	".\[0-9\]+ = \\{value = 5, head = 0\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] {
     print_struct_call "print_one_large_struct(*list1)" \
-            ".*\[ \t\]+4\[ \t\]+1\[ \r\n\]+.\[0-9\]+ = \\{next_index = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\}, values = \\{4, 6, 8, 10, 12, 14, 16, 18, 20, 22\\}, head = 0\\}"
+	".*\[ \t\]+4\[ \t\]+1\[ \r\n\]+" \
+	".\[0-9\]+ = \\{next_index = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\}, values = \\{4, 6, 8, 10, 12, 14, 16, 18, 20, 22\\}, head = 0\\}"
 }
 
-if {![gdb_skip_float_test "print print_one_double(*d1)"] && \
+if {!$skip_float_test && \
         ![gdb_skip_stdio_test "print print_one_double(*d1)"] } {
     print_struct_call "print_one_double(*d1)" \
-	    ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\\}"
+	".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+" \
+	".\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\\}"
 }
 
-if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \
+if {!$skip_float_test && \
         ![gdb_skip_stdio_test "print print_two_floats(*f3)"] } {
     print_struct_call "print_two_floats(*f3)" \
-            ".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+.\[0-9\]+ = \\{float1 = -2\\.34500003, float2 = 1\\}"
+	".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+" \
+	".\[0-9\]+ = \\{float1 = -2\\.34500003, float2 = 1\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_bit_flags_char(*cflags)"] {
     print_struct_call "print_bit_flags_char(*cflags)" \
-            ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1 '\\\\001', beta = 0 '\\\\000', gamma = 1 '\\\\001', delta = 0 '\\\\000', epsilon = 1 '\\\\001', omega = 0 '\\\\000'\\}"
+	".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+" \
+	".\[0-9\]+ = \\{alpha = 1 '\\\\001', beta = 0 '\\\\000', gamma = 1 '\\\\001', delta = 0 '\\\\000', epsilon = 1 '\\\\001', omega = 0 '\\\\000'\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_bit_flags_short(*sflags)"] {
     print_struct_call "print_bit_flags_short(*sflags)" \
-            ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
+	".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+" \
+	".\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_bit_flags(*flags)"] {
     print_struct_call "print_bit_flags(*flags)" \
-            ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
+	".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+" \
+	".\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_bit_flags_combo(*flags_combo)"] {
     print_struct_call "print_bit_flags_combo(*flags_combo)" \
-            ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+ch1: y\[ \t\]+ch2: n\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, ch1 = 121 'y', gamma = 1, delta = 0, ch2 = 110 'n', epsilon = 1, omega = 0\\}"
+	".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+ch1: y\[ \t\]+ch2: n\[ \r\n\]+" \
+	".\[0-9\]+ = \\{alpha = 1, beta = 0, ch1 = 121 'y', gamma = 1, delta = 0, ch2 = 110 'n', epsilon = 1, omega = 0\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_three_chars(*three_chars)"] {
     print_struct_call "print_three_chars(*three_char)" \
-            ".*Contents of three_char_t:\[ \r\n\]+x\[ \t\]+y\[ \t\]+z\[ \r\n\]+.\[0-9\]+ = \\{ch1 = 120 'x', ch2 = 121 'y', ch3 = 122 'z'\\}"
+	".*Contents of three_char_t:\[ \r\n\]+x\[ \t\]+y\[ \t\]+z\[ \r\n\]+" \
+	".\[0-9\]+ = \\{ch1 = 120 'x', ch2 = 121 'y', ch3 = 122 'z'\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_five_chars(*five_chars)"] {
     print_struct_call "print_five_chars(*five_char)" \
-            ".*Contents of five_char_t:\[ \r\n\]+h\[ \t\]+e\[ \t\]+l\[ \t\]+l\[ \t\]+o\[ \r\n\]+.\[0-9\]+ = \\{ch1 = 104 'h', ch2 = 101 'e', ch3 = 108 'l', ch4 = 108 'l', ch5 = 111 'o'\\}"
+	".*Contents of five_char_t:\[ \r\n\]+h\[ \t\]+e\[ \t\]+l\[ \t\]+l\[ \t\]+o\[ \r\n\]+" \
+	".\[0-9\]+ = \\{ch1 = 104 'h', ch2 = 101 'e', ch3 = 108 'l', ch4 = 108 'l', ch5 = 111 'o'\\}"
 }
 
 if ![gdb_skip_stdio_test "print print_int_char_combo(*int_char_combo)"] {
     print_struct_call "print_int_char_combo(*int_char_combo)" \
-            ".*Contents of int_char_combo_t:\[ \r\n\]+13\[ \t\]+!\[ \r\n\]+.\[0-9\]+ = \\{int1 = 13, ch1 = 33 '!'\\}"
+	".*Contents of int_char_combo_t:\[ \r\n\]+13\[ \t\]+!\[ \r\n\]+" \
+	".\[0-9\]+ = \\{int1 = 13, ch1 = 33 '!'\\}"
 }
 
 return
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-sc.c ./gdb/testsuite/gdb.base/call-sc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-sc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-sc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-sc.exp ./gdb/testsuite/gdb.base/call-sc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-sc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-sc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,8 +23,7 @@
 # test.
 
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*"
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -36,6 +35,7 @@ standard_testfile .c
 if [get_compiler_info] {
     return -1
 }
+set skip_float_test [gdb_skip_float_test]
 
 # Compile a variant of scalars.c using TYPE to specify the type of the
 # parameter and return-type.  Run the compiled program up to "main".
@@ -59,7 +59,7 @@ proc start_scalars_test { type } {
 	# built the second test case since we can't use prototypes
 	warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
 	if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
-	    untested call-sc.exp
+	    untested "failed to compile"
 	    return -1
 	}
     }
@@ -386,9 +386,6 @@ proc test_scalar_returns { } {
 
 # NetBSD/PPC returns "unnatural" (3, 5, 6, 7) sized scalars in memory.
 
-# d10v is weird. 5/6 byte scalars go in memory.  2 or more char
-# scalars go in memory.  Everything else is in a register!
-
 # Test every single char struct from 1..17 in size.  This is what the
 # original "scalars" test was doing.
 
@@ -409,9 +406,7 @@ test_scalar_returns
 
 # The approx size of each structure it is computed assumed that tc=1,
 # ts=2, ti=4, tl=4, tll=8, tf=4, td=8, tld=16, and that all fields are
-# naturally aligned.  Padding being added where needed.  Note that
-# these numbers are just approx, the d10v has ti=2, a 64-bit has has
-# tl=8.
+# naturally aligned.  Padding being added where needed.
 
 # Approx size: 2, 4, ...
 start_scalars_test ts
@@ -433,7 +428,7 @@ start_scalars_test tll
 test_scalar_calls
 test_scalar_returns
 
-if ![target_info exists gdb,skip_float_tests] {
+if {!$skip_float_test} {
     # Approx size: 4, 8, ...
     start_scalars_test tf
     test_scalar_calls
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-signal-resume.exp ./gdb/testsuite/gdb.base/call-signal-resume.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-signal-resume.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-signal-resume.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,11 +20,6 @@
 # 2) Inferior is stopped at a signal.  Upon resumption it should continue
 #    with that signal, regardless of whatever the hand-called function did.
 
-if [target_info exists gdb,noinferiorio] {
-    verbose "Skipping call-signal-resume.exp because of no fileio capabilities."
-    continue
-}
-
 if [target_info exists gdb,nosignals] {
     verbose "Skipping call-signal-resume.exp because of nosignals."
     continue
@@ -34,15 +29,14 @@ if [target_info exists gdb,nosignals] {
 standard_testfile call-signals.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested call-signal-resume.exp
+     untested "failed to compile"
      return -1
 }
 
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -62,7 +56,7 @@ proc get_dummy_frame_number { } {
 clean_restart ${binfile}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -72,15 +66,10 @@ gdb_test "continue" "Continuing.*Breakpo
 
 # Call function (causing the program to get a signal), and see if gdb handles
 # it properly.
-gdb_test_multiple "call gen_signal ()" \
-	"inferior function call signaled" {
-    -re "\[\r\n\]*no signal\[\r\n\]+$gdb_prompt $" {
-	unsupported "inferior function call signaled"
-	return 0
-    }
-    -re "\[\r\n\]*The program being debugged was signaled.*\[\r\n\]+$gdb_prompt $" {
-	pass "inferior function call signaled"
-    }
+if {[gdb_test "call gen_signal ()"  \
+	 "\[\r\n\]*The program being debugged was signaled.*" \
+	 "inferior function call signaled"] != 0} {
+    return 0
 }
 
 set frame_number [get_dummy_frame_number]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-signals.c ./gdb/testsuite/gdb.base/call-signals.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-signals.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-signals.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
 /* Support program for testing handling of inferior function calls
    in the presence of signals.  */
 
-#include <stdio.h>
 #include <signal.h>
 #include <unistd.h>
 
@@ -32,8 +31,6 @@ gen_signal ()
 {
   /* According to sigall.exp, SIGABRT is always supported.  */
   kill (getpid (), SIGABRT);
-  /* If we get here we couldn't generate a signal, tell dejagnu.  */
-  printf ("no signal\n");
 }
 
 /* Easy place to set a breakpoint.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-strs.c ./gdb/testsuite/gdb.base/call-strs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-strs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-strs.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,6 +2,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../lib/unbuffer_output.c"
+
 char buf[100];
 char bigbuf[1000];
 char * s;
@@ -47,6 +49,8 @@ link_malloc ()
 
 int main()
 {
+  gdb_unbuffer_output ();
+
   s = &buf[0];
   strcpy(buf, "test string");
   str_func("abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx", "yz12");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-strs.exp ./gdb/testsuite/gdb.base/call-strs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/call-strs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/call-strs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,22 +25,15 @@
 
 standard_testfile
 
-# Test depends on printf, which the sparclet stub doesn't support.  
-if { [istarget "sparclet-*-*"] } {
-    return 0
-}
-
 # Some targets can't call functions, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -57,8 +50,7 @@ if ![runto_main] then {
 set prev_timeout $timeout
 set timeout 120
 
-#step
-gdb_test "step" \
+gdb_test "next 2" \
     "strcpy\\(buf, \"test string\"\\);" \
     "step after assignment to s"
 
@@ -77,62 +69,72 @@ gdb_test "print s" \
 
 #print str_func1(s)
 if ![gdb_skip_stdio_test "print str_func1(s)"] {
-    gdb_test "print str_func1(s)" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "print str_func1(s)" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #print str_func1("test string")
 if ![gdb_skip_stdio_test "print str_func1(teststring)"] {
-    gdb_test "print str_func1(\"test string\")" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "print str_func1(\"test string\")" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #call str_func1(s)
 if ![gdb_skip_stdio_test "call str_func1(s)"] {
-    gdb_test "call str_func1(s)" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "call str_func1(s)" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #call str_func1("test string")
 if ![gdb_skip_stdio_test "call str_func1 (...)"] {
-    gdb_test "call str_func1(\"test string\")" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "call str_func1(\"test string\")" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #print str_func1(buf)
 if ![gdb_skip_stdio_test "print str_func1(buf)"] {
-    gdb_test "print str_func1(buf)" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "print str_func1(buf)" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #call str_func1(buf)
 if ![gdb_skip_stdio_test "call str_func1(buf)"] {
-    gdb_test "call str_func1(buf)" \
-	"first string arg is: test string.*\"test string\".*"
+    gdb_test_stdio "call str_func1(buf)" \
+	"first string arg is: test string" \
+	"\"test string\".*"
 }
 
 #print str_func("a","b","c","d","e","f","g")
 if ![gdb_skip_stdio_test "print str_func(a,b,c,d,e,f,g)"] {
-    gdb_test "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
-	"first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*"
+    gdb_test_stdio "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
+	"first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \
+	"= \"abcdefg\".*"
 }
 
 #call str_func("a","b","c","d","e","f","g")
 if ![gdb_skip_stdio_test "call str_func(a,b,c,d,e,f,g)"] {
-    gdb_test "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
-	"first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*"
+    gdb_test_stdio "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
+	"first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \
+	"= \"abcdefg\".*"
 }
 
 #print str_func(s,s,s,s,s,s,s)
 if ![gdb_skip_stdio_test "print str_func(s,s,s,s,s,s,s,s)"] {
-    gdb_test "print str_func(s,s,s,s,s,s,s)" \
-	"first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
+    gdb_test_stdio "print str_func(s,s,s,s,s,s,s)" \
+	"first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \
+    "\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
 }
 
 #call str_func(s,s,s,s,s,s,s)
 if ![gdb_skip_stdio_test "call str_func(s,s,s,s,s,s,s,s)"] {
-    gdb_test "call str_func(s,s,s,s,s,s,s)" \
-	"first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
+    gdb_test_stdio "call str_func(s,s,s,s,s,s,s)" \
+	"first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \
+	"\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
 }
 
 gdb_exit
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-kill.c ./gdb/testsuite/gdb.base/catch-fork-kill.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-kill.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-fork-kill.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,98 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/wait.h>
+
+int fds[2] = { -1, -1 };
+
+static void
+grandparent_done (void)
+{
+}
+
+/* The exp file overrides this in order to test both fork and
+   vfork.  */
+#ifndef FORK
+#define FORK fork
+#endif
+
+int
+main (void)
+{
+  int pid;
+  int nbytes;
+  const char string[] = "Hello, world!\n";
+  char readbuffer[80];
+
+  /* Don't run forever.  */
+  alarm (300);
+
+  /* Create a pipe.  The write side will be inherited all the way to
+     the grandchild.  The grandparent will read this, expecting to see
+     EOF (meaning the grandchild closed the pipe).  */
+  pipe (fds);
+
+  pid = FORK ();
+  if (pid < 0)
+    {
+      perror ("fork");
+      exit (1);
+    }
+  else if (pid == 0)
+    {
+      /* Close input side of pipe.  */
+      close (fds[0]);
+
+      pid = FORK ();
+      if (pid == 0)
+	{
+	  printf ("I'm the grandchild!\n");
+
+	  /* Don't explicitly close the pipe.  If GDB fails to kill
+	     this process, then the grandparent will hang in the pipe
+	     read below.  */
+#if 0
+	  close (fds[1]);
+#endif
+	  while (1)
+	    sleep (1);
+	}
+      else
+	{
+	  close (fds[1]);
+	  printf ("I'm the proud parent of child #%d!\n", pid);
+	  wait (NULL);
+	}
+    }
+  else if (pid > 0)
+    {
+      close (fds[1]);
+      printf ("I'm the proud parent of child #%d!\n", pid);
+      nbytes = read (fds[0], readbuffer, sizeof (readbuffer));
+      assert (nbytes == 0);
+      printf ("read returned nbytes=%d\n", nbytes);
+      wait (NULL);
+
+      grandparent_done ();
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-kill.exp ./gdb/testsuite/gdb.base/catch-fork-kill.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-kill.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-fork-kill.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,99 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# When we intercept a fork/vfork with a catchpoint, the child is left
+# stopped.  At that point, if we kill the parent, we should kill the
+# child as well.  This test makes sure that works.  See PR gdb/19494.
+
+# The main idea of the test is make sure that when the program stops
+# for a fork catchpoint, and the user kills the parent, gdb also kills
+# the unfollowed fork child.  Since the child hasn't been added as an
+# inferior at that point, we need some other portable way to detect
+# that the child is gone.  The test uses a pipe for that.  The program
+# forks twice, so you have grandparent, child and grandchild.  The
+# grandchild inherits the write side of the pipe.  The grandparent
+# hangs reading from the pipe, since nothing ever writes to it.  If,
+# when GDB kills the child, it also kills the grandchild, then the
+# grandparent's pipe read returns 0/EOF and the test passes.
+# Otherwise, if GDB doesn't kill the grandchild, then the pipe read
+# never returns and the test times out.
+
+standard_testfile
+
+# Build two programs -- one for fork, and another for vfork.
+set testfile_fork "${testfile}-fork"
+set testfile_vfork "${testfile}-vfork"
+
+foreach kind {"fork" "vfork"} {
+    set compile_options "debug additional_flags=-DFORK=$kind"
+    set testfile [set testfile_$kind]
+    if {[build_executable $testfile.exp $testfile ${srcfile} \
+	     ${compile_options}] == -1} {
+	untested "failed to compile"
+	return -1
+    }
+}
+
+# The test proper.  FORK_KIND is either "fork" or "vfork".  EXIT_KIND
+# is either "exit" (run the parent to exit) or "kill" (kill parent).
+
+proc do_test {fork_kind exit_kind} {
+    global testfile testfile_$fork_kind
+
+    set testfile [set testfile_$fork_kind]
+
+    with_test_prefix "$fork_kind" {
+	clean_restart $testfile
+
+	if ![runto_main] {
+	    untested "could not run to main"
+	    return -1
+	}
+
+	gdb_test_no_output "set follow-fork child"
+	gdb_test_no_output "set detach-on-fork off"
+
+	gdb_test "catch $fork_kind" "Catchpoint .*($fork_kind).*"
+
+	gdb_test "continue" \
+	    "Catchpoint \[0-9\]* \\(${fork_kind}ed process \[0-9\]*\\),.*" \
+	    "continue to child ${fork_kind}"
+
+	gdb_test "continue" \
+	    "Catchpoint \[0-9\]* \\(${fork_kind}ed process \[0-9\]*\\),.*" \
+	    "continue to grandchild ${fork_kind}"
+
+	gdb_test "kill inferior 2" "" "kill child" \
+	    "Kill the program being debugged.*y or n. $" "y"
+
+	gdb_test "inferior 1" "Switching to inferior 1 .*" "switch to parent"
+
+	if {$exit_kind == "exit"} {
+	    gdb_test "break grandparent_done" "Breakpoint .*"
+	    gdb_test "continue" "hit Breakpoint .*, grandparent_done.*"
+	} elseif {$exit_kind == "kill"} {
+	    gdb_test "kill" "" "kill parent" \
+		"Kill the program being debugged.*y or n. $" "y"
+	} else {
+	    perror "unreachable"
+	}
+    }
+}
+
+foreach_with_prefix fork-kind {"fork" "vfork"} {
+    foreach_with_prefix exit-kind {"exit" "kill"} {
+	do_test ${fork-kind} ${exit-kind}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-static.exp ./gdb/testsuite/gdb.base/catch-fork-static.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-fork-static.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-fork-static.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that "catch fork" works on static executables.
+
+# For instance, on Linux we need PTRACE_O_TRACEFORK set before the program
+# reaches the fork.  GDBserver was only setting flags when it reached the first
+# stop *after* arch_setup.  In a dynamic executable there is often a swbreak in
+# ld.so probes before reaching main, and ptrace flags were set then.  But a
+# static executable would just keep running and never catch the fork.
+
+if { [is_remote target] || ![isnative] } then {
+    continue
+}
+
+# Until "catch fork" is implemented on other targets...
+#
+if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+    continue
+}
+
+# Reusing foll-fork.c since it's a simple forking program.
+standard_testfile foll-fork.c
+
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \
+      {additional_flags=-static}] } {
+    return -1
+}
+
+gdb_test "catch fork" "Catchpoint \[0-9\]* \\(fork\\)"
+
+gdb_run_cmd
+gdb_test "" \
+    "Catchpoint \[0-9\]* \\(forked process \[0-9\]*\\),.*" \
+    "run to fork"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-gdb-caused-signals.c ./gdb/testsuite/gdb.base/catch-gdb-caused-signals.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-gdb-caused-signals.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-gdb-caused-signals.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,11 +20,15 @@
 #include <unistd.h>
 #include <stdio.h>
 
+#include "../lib/unbuffer_output.c"
+
 int
 main (void)
 {
   int i = 0;
 
+  gdb_unbuffer_output ();
+
   i++; /* set dprintf here */
   return 0; /* set breakpoint here */
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp ./gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ if [target_info exists gdb,cannot_call_f
 set dp_location [gdb_get_line_number "set dprintf here"]
 set bp_location [gdb_get_line_number "set breakpoint here"]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to make the tests"
+    fail "can't run to main to make the tests"
     return -1
 }
 
@@ -59,5 +59,5 @@ if ![target_info exists gdb,noinferiorio
     # Also test with dprintf since the original bug was noticed using dprintf.
     gdb_test "dprintf $dp_location,\"testdprintf\\n\"" "Dprintf .*"
 
-    gdb_test "continue" "testdprintf.*"
+    gdb_test_stdio "continue" "testdprintf"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load.c ./gdb/testsuite/gdb.base/catch-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load.exp ./gdb/testsuite/gdb.base/catch-load.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-load.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -14,19 +14,19 @@
 #
 
 if {[skip_shlib_tests]} {
-    untested catch-load.exp
+    untested "skipping shared library tests"
     return -1
 }
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
-    untested catch-load.exp
+    untested "no compiler info"
     return -1
 }
 
 standard_testfile .c
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
-    untested catch-load.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -35,7 +35,7 @@ set srcfile2 ${testfile2}.c
 set binfile2 [standard_output_file ${testfile2}.so]
 set binfile2_dlopen [shlib_target_file ${testfile2}.so]
 if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
-    untested catch-load.exp
+    untested "failed to compile shared library"
     return -1
 }
 
@@ -51,7 +51,7 @@ proc one_catch_load_test {scenario kind 
 	global decimal gdb_prompt
 
 	clean_restart $testfile
-	gdb_load_shlibs $binfile2
+	gdb_load_shlib $binfile2
 
 	if {![runto_main]} {
 	    fail "can't run to main"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load-so.c ./gdb/testsuite/gdb.base/catch-load-so.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-load-so.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-load-so.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal.c ./gdb/testsuite/gdb.base/catch-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal.exp ./gdb/testsuite/gdb.base/catch-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-fork.c ./gdb/testsuite/gdb.base/catch-signal-fork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-fork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal-fork.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-fork.exp ./gdb/testsuite/gdb.base/catch-signal-fork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-fork.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal-fork.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.c ./gdb/testsuite/gdb.base/catch-signal-siginfo-cond.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal-siginfo-cond.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <signal.h>
+#include <unistd.h>
+
+void
+handle (int sig)
+{
+}
+
+int
+main (void)
+{
+  signal (SIGUSR1, handle);
+  raise (SIGUSR1);
+  raise (SIGUSR1); /* set breakpoint here */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp ./gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,61 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR19388.  Make sure we can access $_siginfo in a
+# "catch signal" condition.  A buggy GDB would fail with:
+#
+# (gdb) continue
+# Continuing.
+# Error in testing breakpoint condition:
+# Selected thread is running.
+#
+# Catchpoint 3 (signal SIGUSR1), 0x0000003615e35877 in __GI_raise (sig=10) at raise.c:56
+# 56        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
+# (gdb) FAIL: gdb.base/catch-signal-siginfo-cond.exp: continue
+
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping catch-signal-siginfo-cond.exp because of nosignals."
+    return -1
+}
+
+if { ![supports_get_siginfo_type] } {
+    verbose "Skipping catch-signal-siginfo-cond.exp because of lack of support."
+    return -1
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {debug}] } {
+    return -1
+}
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
+
+gdb_test "catch signal"
+
+# It's OK to refer to standard Unix signal numbers 1-15 by number.
+
+# SIGUSR1 == 10.  The catchpoint should not cause a stop.
+gdb_test "condition \$bpnum \$_siginfo.si_signo == 11"
+gdb_test "continue" "set breakpoint here.*" "continue: catchpoint does not trigger"
+
+# This time the catchpoint should cause a stop.
+gdb_test "condition \$bpnum \$_siginfo.si_signo == 10"
+gdb_test "continue" "Catchpoint .*signal SIGUSR1.*" "continue: catchpoint triggers"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-syscall.c ./gdb/testsuite/gdb.base/catch-syscall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-syscall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-syscall.c	2017-03-06 01:49:07.000000000 +0000
@@ -11,6 +11,7 @@
 #include <sys/syscall.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#include <sched.h>
 
 /* These are the syscalls numbers used by the test.  */
 
@@ -27,15 +28,31 @@ int pipe_syscall = SYS_pipe;
 int pipe2_syscall = SYS_pipe2;
 #endif
 int write_syscall = SYS_write;
+#if defined(__arm__)
+/* Although 123456789 is an illegal syscall umber on arm linux, kernel
+   sends SIGILL rather than returns -ENOSYS.  However, arm linux kernel
+   returns -ENOSYS if syscall number is within 0xf0001..0xf07ff, so we
+   can use 0xf07ff for unknown_syscall in test.  */
+int unknown_syscall = 0x0f07ff;
+#else
+int unknown_syscall = 123456789;
+#endif
 int exit_group_syscall = SYS_exit_group;
 
+/* Set by the test when it wants execve.  */
+int do_execve = 0;
+
 int
-main (void)
+main (int argc, char *const argv[])
 {
 	int fd[2];
 	char buf1[2] = "a";
 	char buf2[2];
 
+	/* Test a simple self-exec, but only on request.  */
+	if (do_execve)
+	  execv (*argv, argv);
+
 	/* A close() with a wrong argument.  We are only
 	   interested in the syscall.  */
 	close (-1);
@@ -47,6 +64,14 @@ main (void)
 	write (fd[1], buf1, sizeof (buf1));
 	read (fd[0], buf2, sizeof (buf2));
 
+	/* Test vfork-event interactions.  Child exits immediately.
+	   (Plain fork won't work on no-mmu kernel configurations.)  */
+	if (vfork () == 0)
+	  _exit (0);
+
+	/* Trigger an intentional ENOSYS.  */
+	syscall (unknown_syscall);
+
 	/* The last syscall.  Do not change this.  */
 	_exit (0);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-syscall.exp ./gdb/testsuite/gdb.base/catch-syscall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/catch-syscall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/catch-syscall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,25 +19,39 @@
 # It was written by Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
 # on September/2008.
 
-if { [is_remote target] || ![isnative] } then {
-    continue
+standard_testfile
+
+if  { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
+     return -1
 }
 
-# This shall be updated whenever 'catch syscall' is implemented
-# on some architecture.
-if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
-     && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
-     && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"]
-     && ![istarget "mips*-linux*"] && ![istarget "arm*-linux*"]
-     && ![istarget "s390*-linux*"] && ![istarget "aarch64*-*-linux*"] } {
-     continue
+# Check target supports catch syscall or not.
+clean_restart $binfile
+if ![runto_main] then {
+    fail "can't run to main"
+    return
 }
 
-standard_testfile
+set test "catch syscall"
+gdb_test_multiple $test $test {
+    -re "The feature \'catch syscall\' is not supported.*\r\n$gdb_prompt $" {
+	unsupported "catch syscall isn't supported"
+	return -1
+    }
+    -re ".*$gdb_prompt $" {
+	pass $test
+    }
+}
 
-if  { [prepare_for_testing ${testfile}.exp $testfile ${testfile}.c] } {
-     untested catch-syscall.exp
-     return -1
+set test "check catch syscall"
+gdb_test_multiple "continue" $test {
+    -re ".*Your system does not support this type\r\nof catchpoint.*$gdb_prompt $" {
+	unsupported "catch syscall isn't supported"
+	return -1
+    }
+    -re ".*Catchpoint.*$gdb_prompt $" {
+      pass $test
+    }
 }
 
 # All (but the last) syscalls from the example code.  It is filled in
@@ -51,6 +65,10 @@ set all_syscalls_numbers { }
 set last_syscall "exit_group"
 set last_syscall_number { }
 
+set vfork_syscalls "(vfork|clone2?)"
+
+set unknown_syscall_number { }
+
 # Internal procedure used to check if, after issuing a 'catch syscall'
 # command (without arguments), the 'info breakpoints' command displays
 # that '"any syscall"' is to be caught.
@@ -85,34 +103,45 @@ proc check_info_bp_many_syscalls { sysca
     gdb_test "info breakpoints" ".*catchpoint.*keep y.*syscalls (.)?${filter_str}(.)?.*" $thistest
 }
 
-# This procedure checks if there was a call to a syscall.
-proc check_call_to_syscall { syscall } {
+# This procedure checks if there was a call to a syscall.  The optional
+# pattern can match syscalls that vary in implementation, like vfork.
+proc check_call_to_syscall { syscall { pattern "" } } {
     global decimal
 
+    if { $pattern eq "" } {
+      set pattern "${syscall}"
+    }
+
     set thistest "program has called $syscall"
-    gdb_test "continue" "Catchpoint $decimal \\(call to syscall .?${syscall}.?\\).*" $thistest
+    gdb_test "continue" "Catchpoint $decimal \\(call to syscall .?${pattern}.?\\).*" $thistest
 }
 
-# This procedure checks if the syscall returned.
-proc check_return_from_syscall { syscall } {
+# This procedure checks if the syscall returned.  The optional pattern
+# can match syscalls that vary in implementation, like vfork.
+proc check_return_from_syscall { syscall { pattern "" } } {
     global decimal
 
+    if { $pattern eq "" } {
+      set pattern "${syscall}"
+    }
+
     set thistest "syscall $syscall has returned"
-    gdb_test "continue" "Catchpoint $decimal \\(returned from syscall ${syscall}\\).*" $thistest
+    gdb_test "continue" "Catchpoint $decimal \\(returned from syscall ${pattern}\\).*" $thistest
 }
 
 # Internal procedure that performs two 'continue' commands and checks if
-# a syscall call AND return occur.
-proc check_continue { syscall } {
+# a syscall call AND return occur.  The optional pattern can match
+# syscalls that vary in implementation, like vfork.
+proc check_continue { syscall { pattern "" } } {
     # Testing if the 'continue' stops at the
     # specified syscall_name.  If it does, then it should
     # first print that the infeior has called the syscall,
     # and after print that the syscall has returned.
 
     # Testing if the inferior has called the syscall.
-    check_call_to_syscall $syscall
+    check_call_to_syscall $syscall $pattern
     # And now, that the syscall has returned.
-    check_return_from_syscall $syscall
+    check_return_from_syscall $syscall $pattern
 }
 
 # Inserts a syscall catchpoint with an argument.
@@ -154,7 +183,7 @@ proc check_for_program_end {} {
 }
 
 proc test_catch_syscall_without_args {} {
-    global all_syscalls last_syscall decimal
+    global all_syscalls last_syscall vfork_syscalls unknown_syscall_number decimal
 
     with_test_prefix "without arguments" {
 	# Trying to set the syscall.
@@ -167,6 +196,12 @@ proc test_catch_syscall_without_args {} 
 	    check_continue $name
 	}
 
+	check_continue "vfork" $vfork_syscalls
+
+	with_test_prefix "ENOSYS" {
+	    check_continue $unknown_syscall_number
+	}
+
 	# At last but not least, we check if the inferior has called
 	# the last (exit) syscall.
 	check_call_to_syscall $last_syscall
@@ -243,6 +278,86 @@ proc test_catch_syscall_restarting_infer
     }
 }
 
+proc test_catch_syscall_skipping_return {} {
+    with_test_prefix "skipping return" {
+	with_test_prefix "entry" {
+	    set syscall_name "write"
+
+	    insert_catch_syscall_with_arg $syscall_name
+
+	    # Let's first reach the entry of the syscall.
+	    check_call_to_syscall $syscall_name
+
+	    # Now purposely skip the syscall return.
+	    delete_breakpoints
+	    gdb_test "stepi" ".*" "step over syscall return"
+	}
+
+	# With a naive entry/return toggle, gdb will still think
+	# the target is due for a syscall return.
+
+	with_test_prefix "entry/return" {
+	    set syscall_name "read"
+
+	    insert_catch_syscall_with_arg $syscall_name
+
+	    # Check for entry first, then return.
+	    check_continue $syscall_name
+
+	    # Can we finish?
+	    check_for_program_end
+	}
+    }
+}
+
+proc test_catch_syscall_mid_vfork {} {
+    global gdb_prompt decimal vfork_syscalls
+
+    with_test_prefix "mid-vfork" {
+	# Verify that the system supports "catch vfork".
+	gdb_test "catch vfork" "Catchpoint $decimal \\(vfork\\)" "insert first vfork catchpoint"
+	gdb_test_multiple "continue" "continue to first vfork catchpoint" {
+	    -re ".*Your system does not support this type\r\nof catchpoint.*$gdb_prompt $" {
+		unsupported "continue to first vfork catchpoint"
+		return
+	    }
+	    -re ".*Catchpoint $decimal \\(vforked process $decimal\\).*$gdb_prompt $" {
+		pass "continue to first vfork catchpoint"
+	    }
+	}
+
+	# Check that we now reach vfork return only.
+	# (The actual syscall used varies by architecture.)
+	gdb_test "catch syscall" "Catchpoint $decimal \\(any syscall\\)"
+	check_return_from_syscall "vfork" $vfork_syscalls
+
+	# Can we finish?
+	check_for_program_end
+    }
+}
+
+proc test_catch_syscall_execve {} {
+    global gdb_prompt decimal
+
+    with_test_prefix "execve" {
+
+	# Tell the test program we want an execve.
+	gdb_test_no_output "set do_execve = 1"
+
+	# Check for entry/return across the execve, making sure that the
+	# syscall_state isn't lost when turning into a new process.
+	insert_catch_syscall_with_arg "execve"
+	check_continue "execve"
+
+	# Continue to main so extended-remote can read files as needed.
+	# (Otherwise that "Reading" output confuses gdb_continue_to_end.)
+	gdb_continue "main"
+
+	# Now can we finish?
+	check_for_program_end
+    }
+}
+
 proc test_catch_syscall_fail_nodatadir {} {
     with_test_prefix "fail no datadir" {
 	# Sanitizing.
@@ -269,6 +384,42 @@ proc test_catch_syscall_fail_nodatadir {
     }
 }
 
+proc test_catch_syscall_group {} {
+    global decimal
+
+    set sysnum "\\\[${decimal}\\\]"
+
+    gdb_test "catch syscall g:process" \
+	"Catchpoint $decimal \\(syscalls (\'(clone|fork|execve|exit)\' $sysnum)+.*" \
+	"set catchpoint on a group of syscalls"
+
+    gdb_test "catch syscall group:process read" \
+	"Catchpoint $decimal \\(syscalls (\'(clone|fork|execve|exit)\' $sysnum)+.*read.*\\)" \
+	"set catchpoints on a group of syscalls and on a single syscall"
+
+    gdb_test "catch syscall group:" \
+	"Unknown syscall group ''\." \
+	"set catchpoints on an invalid group"
+
+    gdb_test "catch syscall g:junk" \
+	"Unknown syscall group 'junk'\." \
+	"set catchpoints on an unknown group."
+
+    gdb_test "complete catch syscall g:proc" \
+	"catch syscall g:process" \
+	"complete catch syscall group with 'g:' prefix"
+
+    gdb_test "complete catch syscall group:proc" \
+	"catch syscall group:process" \
+	"complete catch syscall group with 'group:' prefix"
+
+    gdb_test_sequence "complete catch syscall g" \
+	"complete catch syscall group suggests 'group:' prefix" {
+	    "group:descriptor" "group:file" "group:ipc" "group:memory"
+	    "group:network" "group:process" "group:signal"
+	}
+}
+
 proc do_syscall_tests {} {
     # NOTE: We don't have to point gdb at the correct data-directory.
     # For the build tree that is handled by INTERNAL_GDBFLAGS.
@@ -302,20 +453,33 @@ proc do_syscall_tests {} {
     # This test should not trigger any catchpoints.
     if [runto_main] then { test_catch_syscall_with_wrong_args }
 
-    # Testing the 'catch' syscall command during a restart of
+    # Testing the 'catch syscall' command during a restart of
     # the inferior.
     if [runto_main] then { test_catch_syscall_restarting_inferior }
 
+    # Testing the 'catch syscall' command toggling off past a
+    # syscall return, then resuming entry/return as normal.
+    if [runto_main] then { test_catch_syscall_skipping_return }
+
+    # Testing the 'catch syscall' command starting mid-vfork.
+    if [runto_main] then { test_catch_syscall_mid_vfork }
+
+    # Testing that 'catch syscall' entry/return tracks across execve.
+    if [runto_main] then { test_catch_syscall_execve }
+
     # Testing if the 'catch syscall' command works when switching to
     # different architectures on-the-fly (PR gdb/10737).
     if [runto_main] then { test_catch_syscall_multi_arch }
+
+    # Testing the 'catch' syscall command for a group of syscalls.
+    if [runto_main] then { test_catch_syscall_group }
 }
 
 proc test_catch_syscall_without_args_noxml {} {
     with_test_prefix "without args noxml" {
 	# We will need the syscall names even not using it because we
 	# need to know know many syscalls are in the example file.
-	global all_syscalls last_syscall_number all_syscalls_numbers
+	global decimal all_syscalls last_syscall_number unknown_syscall_number all_syscalls_numbers
 
 	delete_breakpoints
 
@@ -329,6 +493,12 @@ proc test_catch_syscall_without_args_nox
 	    }
 	}
 
+	check_continue "vfork" $decimal
+
+	with_test_prefix "ENOSYS" {
+	    check_continue $unknown_syscall_number
+	}
+
 	# At last but not least, we check if the inferior has called
 	# the last (exit) syscall.
 	check_call_to_syscall $last_syscall_number
@@ -403,8 +573,11 @@ proc test_catch_syscall_multi_arch {} {
 	verbose "Not testing ARM for multi-arch syscall support"
 	return
     } elseif { [istarget "aarch64*-linux*"] } {
-	verbose "Not testing AARCH64 for multi-arch syscall support"
-	return
+	set arch1 "aarch64"
+	set arch2 "arm"
+	set syscall1_name "reboot"
+	set syscall2_name "_newselect"
+	set syscall_number 142
     } elseif { [istarget "s390*-linux*"] } {
 	set arch1 "s390:31-bit"
 	set arch2 "s390:64-bit"
@@ -463,13 +636,14 @@ proc do_syscall_tests_without_xml {} {
 # This procedure fills the vector "all_syscalls_numbers" with the proper
 # numbers for the used syscalls according to the architecture.
 proc fill_all_syscalls_numbers {} {
-    global all_syscalls_numbers last_syscall_number all_syscalls
+    global all_syscalls_numbers last_syscall_number unknown_syscall_number all_syscalls
 
     foreach syscall $all_syscalls {
 	lappend all_syscalls_numbers [get_integer_valueof "${syscall}_syscall" -1]
     }
 
     set last_syscall_number [get_integer_valueof "exit_group_syscall" -1]
+    set unknown_syscall_number [get_integer_valueof "unknown_syscall" -1]
 }
 
 # Set up the vector all_syscalls.
@@ -506,6 +680,7 @@ setup_all_syscalls
 fill_all_syscalls_numbers
 
 # Execute the tests, using XML support
+gdb_exit
 if { ![gdb_skip_xml_test] } {
   clean_restart $binfile
   do_syscall_tests
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset.c ./gdb/testsuite/gdb.base/charset.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/charset.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2001-2015 Free Software Foundation, Inc.
+   Copyright 2001-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, originally written by Jim Blandy.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset.exp ./gdb/testsuite/gdb.base/charset.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/charset.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2001-2015 Free Software Foundation, Inc.
+# Copyright 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 
 standard_testfile .c charset-malloc.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcfile2]] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
     return -1
 }
 
@@ -146,7 +146,7 @@ gdb_expect {
 # sets: "auto" and the default.  In this situation, this set of tests
 # is pointless.
 if {[llength [array names charsets]] < 3} {
-    untested charset.exp
+    untested "fewer than 3 charsets"
     return -1
 }
 
@@ -591,8 +591,8 @@ gdb_test "print 'a' == 'a' || 'b' == 'b'
 
 
 proc string_display { var_name set_prefix x_size x_type} {
-  gdb_test_no_output "set ${var_name} = ${set_prefix}\"Test String\\0with zeroes\"" "Assign ${var_name} with prefix ${set_prefix}"
-  gdb_test "x /2${x_size}s ${var_name}" ".*\t${x_type}\"Test String\"\[\r\n\]+.*\t${x_type}\"with zeroes\"" "Display String ${var_name} with x/${x_size}s"
+  gdb_test_no_output "set ${var_name} = ${set_prefix}\"Test String\\0with zeroes\"" "assign ${var_name} with prefix ${set_prefix}"
+  gdb_test "x /2${x_size}s ${var_name}" ".*\t${x_type}\"Test String\"\[\r\n\]+.*\t${x_type}\"with zeroes\"" "display String ${var_name} with x/${x_size}s"
 }
 
 if {$ucs2_ok} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset-malloc.c ./gdb/testsuite/gdb.base/charset-malloc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/charset-malloc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/charset-malloc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, originally written by Jim Blandy.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint.c ./gdb/testsuite/gdb.base/checkpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/checkpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint.exp ./gdb/testsuite/gdb.base/checkpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/checkpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2005-2015 Free Software Foundation, Inc.
+#   Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,8 +24,10 @@ if {![istarget "*-*-linux*"]} then {
     continue
 }
 
-
-standard_testfile .c
+# Must name the source file explicitly, otherwise when driven by
+# checkpoints-ns.exp, we'd try compiling checkpoints-ns.c, which
+# doesn't exist.
+standard_testfile checkpoint.c
 
 set pi_txt [gdb_remote_download host ${srcdir}/${subdir}/pi.txt]
 if {[is_remote host]} {
@@ -34,9 +36,8 @@ if {[is_remote host]} {
     set copy1_txt [standard_output_file copy1.txt]
 }
 
-if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug "additional_flags=-DPI_TXT=\"$pi_txt\" -DCOPY1_TXT=\"$copy1_txt\""]]} {
-     untested checkpoint.exp
      return -1
 }
 
@@ -85,7 +86,7 @@ gdb_test "continue 10" "breakpoint 1.*" 
 gdb_test "checkpoint" ".*" ""
 
 gdb_test "info checkpoints" \
-    " 10 .* 9 .* 8 .* 7 .* 6 .* 5 .* 4 .* 3 .* 2 .* 1 .*" \
+    " 1 .* 2 .* 3 .* 4 .* 5 .* 6 .* 7 .* 8 .* 9 .* 10 .*" \
     "info checkpoints one"
 
 delete_breakpoints
@@ -152,7 +153,7 @@ gdb_test "continue" "breakpoint 3.*" "br
 
 gdb_test "shell diff -s $pi_txt $copy1_txt" \
     "Files .*pi.txt and .*copy1.txt are identical.*" \
-    "Diff input and output one"
+    "diff input and output one"
 
 #
 # And now run from various checkpoints, allowing 
@@ -205,7 +206,7 @@ gdb_test "print lines" " = 1162.*" "veri
 
 gdb_test "shell diff -s $pi_txt $copy1_txt" \
     "Files .*pi.txt and .*copy1.txt are identical.*" \
-    "Diff input and output two"
+    "diff input and output two"
 
 # 
 # OK, now allow the original program to delete the output file, 
@@ -270,29 +271,29 @@ gdb_test "print ftell (out) > 100000" " 
 delete_breakpoints
 gdb_test "continue" \
     "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
-    "Exit, dropped into next fork one"
+    "exit, dropped into next fork one"
 
 gdb_test "continue" \
     "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
-    "Exit, dropped into next fork two"
+    "exit, dropped into next fork two"
 
 gdb_test "continue" \
     "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
-    "Exit, dropped into next fork three"
+    "exit, dropped into next fork three"
 
 gdb_test "continue" \
     "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
-    "Exit, dropped into next fork four"
+    "exit, dropped into next fork four"
 
 gdb_test "continue" \
     "Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
-    "Exit, dropped into next fork five"
+    "exit, dropped into next fork five"
 
 #
 # There should be still at least five forks left
 # 
 
-gdb_test "info checkpoints" " 5 .* 4 .* 3 .* 2 .* 1 .*" \
+gdb_test "info checkpoints" " 1 .* 2 .* 3 .* 4 .* 5 .*" \
     "info checkpoints two"
 
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint-ns.exp ./gdb/testsuite/gdb.base/checkpoint-ns.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/checkpoint-ns.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/checkpoint-ns.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Test gdb checkpoint and restart in non-stop mode.
+
+# We drive non-stop mode from a separate file because the whole test
+# takes a while to run.  This way, we can test both modes in parallel.
+
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+
+    source $srcdir/$subdir/checkpoint.exp
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/chng-syms.exp ./gdb/testsuite/gdb.base/chng-syms.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/chng-syms.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/chng-syms.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } {
-    untested chng-syms.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim1.c ./gdb/testsuite/gdb.base/code_elim1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/code_elim1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim2.c ./gdb/testsuite/gdb.base/code_elim2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/code_elim2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim.exp ./gdb/testsuite/gdb.base/code_elim.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code_elim.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/code_elim.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,36 +32,15 @@ remote_exec build "rm -f ${binfile1}"
 remote_exec build "rm -f ${binfile2}"
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable $opts] != "" } {
-     untested code_elim.exp
+     untested "failed to compile"
      return -1
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $opts] != "" } {
-     untested code_elim.exp
+     untested "failed to compile"
      return -1
 }
 
-proc get_var_address { var } {
-    global gdb_prompt hex
-
-    # Match output like:
-    # $1 = (int *) 0x0
-    # $5 = (int (*)()) 0
-    # $6 = (int (*)()) 0x24 <function_bar>
-
-    gdb_test_multiple "print &${var}" "get address of ${var}" {
-	-re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $" {
-	    pass "get address of ${var}"
-	    if { $expect_out(1,string) == "0" } {
-		return "0x0"
-	    } else {
-		return $expect_out(1,string)
-	    }
-	}
-    }
-    return ""
-}
-
 proc not_null_var_address { var } {
 
     # Same as get_var_address, expect that it reports a failure if a null
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code-expr.exp ./gdb/testsuite/gdb.base/code-expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/code-expr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/code-expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 standard_testfile cvexpr.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested code-expr.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/command-line-input.exp ./gdb/testsuite/gdb.base/command-line-input.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/command-line-input.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/command-line-input.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,36 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Command line input testing.
+
+# Test issuing a command split in multiple lines with continuation
+# characters.
+
+gdb_exit
+gdb_start
+
+set test "print 1\\\\n + 2"
+gdb_test_multiple "print 1\\\n + 2" $test {
+    -re "^print 1\\\\\r\n \\+ 2\r\n\\\$$decimal = 3\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
+
+set test "print 1\\\\n2"
+gdb_test_multiple "print 1\\\n2" $test {
+    -re "^print 1\\\\\r\n2\r\n\\\$$decimal = 12\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/commands.exp ./gdb/testsuite/gdb.base/commands.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/commands.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/commands.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,116 +19,219 @@
 
 standard_testfile
 
-if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } {
+if { [prepare_for_testing "failed to prepare" commands run.c {debug additional_flags=-DFAKEARGV}] } {
     return -1
 }
 
-proc gdbvar_simple_if_test {} {
+# Run to FUNCTION.  If that fails, issue a FAIL and make the caller
+# return.
+
+proc runto_or_return {function} {
+    if { ![runto factorial] } {
+	fail "cannot run to $function"
+	return -code return
+    }
+}
+
+proc_with_prefix gdbvar_simple_if_test {} {
     global gdb_prompt
+    global valnum_re
 
-    gdb_test_no_output "set \$foo = 0" "set foo in gdbvar_simple_if_test"
+    gdb_test_no_output "set \$foo = 0" "set foo"
     # All this test should do is print 0xdeadbeef once.
-    gdb_test "if \$foo == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
-	    "\\\$\[0-9\]* = 0xdeadbeef" "gdbvar_simple_if_test #1"
+    gdb_test \
+	[multi_line_input \
+	     {if $foo == 1} \
+	     {  p/x 0xfeedface} \
+	     {else} \
+	     {  p/x 0xdeadbeef} \
+	     {end}] \
+	"$valnum_re = 0xdeadbeef" \
+	"#1"
+
     # All this test should do is print 0xfeedface once.
-    gdb_test "if \$foo == 0\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
-	    "\\\$\[0-9\]* = 0xfeedface" "gdbvar_simple_if_test #2"
+    gdb_test \
+	[multi_line_input \
+	     {if $foo == 0} \
+	     {  p/x 0xfeedface} \
+	     {else} \
+	     {  p/x 0xdeadbeef} \
+	     {end}] \
+	"$valnum_re = 0xfeedface" \
+	"#2"
 }
 
-proc gdbvar_simple_while_test {} {
+proc_with_prefix gdbvar_simple_while_test {} {
     global gdb_prompt
+    global valnum_re
 
-    gdb_test_no_output "set \$foo = 5" "set foo in gdbvar_simple_while_test"
+    gdb_test_no_output "set \$foo = 5" "set foo"
     # This test should print 0xfeedface five times.
-    gdb_test "while \$foo > 0\np/x 0xfeedface\nset \$foo -= 1\nend" \
-	    "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "gdbvar_simple_while_test #1"
+    gdb_test \
+	[multi_line_input \
+	     {while $foo > 0} \
+	     {  p/x 0xfeedface} \
+	     {  set $foo -= 1} \
+	     {end}] \
+	[multi_line \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface"] \
+	"#1"
 }
 
-proc gdbvar_complex_if_while_test {} {
+proc_with_prefix gdbvar_complex_if_while_test {} {
     global gdb_prompt
+    global valnum_re
 
-    gdb_test_no_output "set \$foo = 4" \
-	"set foo in gdbvar complex_if_while_test"
+    gdb_test_no_output "set \$foo = 4" "set foo"
     # This test should alternate between 0xdeadbeef and 0xfeedface two times.
-    gdb_test "while \$foo > 0\nset \$foo -= 1\nif \(\$foo % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
-	    "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "gdbvar_complex_if_while_test #1"
+    gdb_test \
+	[multi_line_input \
+	     {while $foo > 0} \
+	     {  set $foo -= 1} \
+	     {  if ($foo % 2) == 1} \
+	     {    p/x 0xdeadbeef} \
+	     {  else} \
+	     {    p/x 0xfeedface} \
+	     {  end} \
+	     {end}] \
+	[multi_line \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface"] \
+	"#1"
 }
 
-proc progvar_simple_if_test {} {
+proc_with_prefix progvar_simple_if_test {} {
     global gdb_prompt
+    global valnum_re
+
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests; }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=5" ".*" "set value to 5 in progvar_simple_if_test #1"
+    gdb_test "p value=5" " = 5" "set value to 5"
     # All this test should do is print 0xdeadbeef once.
-    gdb_test "if value == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
-	    "\\\$\[0-9\]* = 0xdeadbeef" \
-	    "progvar_simple_if_test #1"
+    gdb_test \
+	[multi_line_input \
+	     {if value == 1} \
+	     {  p/x 0xfeedface} \
+	     {else} \
+	     {  p/x 0xdeadbeef} \
+	     {end}] \
+	"$valnum_re = 0xdeadbeef" \
+	"#1"
+
     # All this test should do is print 0xfeedface once.
-    gdb_test "if value == 5\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
-	    "\\\$\[0-9\]* = 0xfeedface" \
-	    "progvar_simple_if_test #2"
-    gdb_stop_suppressing_tests
+    gdb_test \
+	[multi_line_input \
+	     {if value == 5} \
+	     {  p/x 0xfeedface} \
+	     {else} \
+	     {  p/x 0xdeadbeef} \
+	     {end}] \
+	"$valnum_re = 0xfeedface" \
+	"#2"
 }
 
-proc progvar_simple_while_test {} {
+proc_with_prefix progvar_simple_while_test {} {
     global gdb_prompt
+    global valnum_re
+
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=5" ".*" "set value to 5 in progvar_simple_if_test #2"
+    gdb_test "p value=5" " = 5" "set value to 5"
     # This test should print 0xfeedface five times.
-    gdb_test "while value > 0\np/x 0xfeedface\nset value -= 1\nend" \
-	    "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "progvar_simple_while_test #1"
-    gdb_stop_suppressing_tests
+    gdb_test \
+	[multi_line_input \
+	     {while value > 0} \
+	     {  p/x 0xfeedface} \
+	     {  set value -= 1} \
+	     {end}] \
+	[multi_line \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xfeedface"] \
+	"#1"
 }
 
-proc progvar_complex_if_while_test {} {
+proc_with_prefix progvar_complex_if_while_test {} {
     global gdb_prompt
+    global valnum_re
+
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=4" ".*" "set value to 4 in progvar_simple_if_test"
-    # This test should alternate between 0xdeadbeef and 0xfeedface two times.
-    gdb_test "while value > 0\nset value -= 1\nif \(value % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
-	    "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "progvar_complex_if_while_test #1"
-    gdb_stop_suppressing_tests
+    gdb_test "p value=4" " = 4" "set value to 4"
+    # This test should alternate between 0xdeadbeef and 0xfeedface two
+    # times.
+    gdb_test \
+	[multi_line_input \
+	     {while value > 0} \
+	     {  set value -= 1} \
+	     {  if (value % 2) == 1} \
+	     {    p/x 0xdeadbeef} \
+	     {  else} \
+	     {    p/x 0xfeedface} \
+	     {  end} \
+	     {end}] \
+	[multi_line \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface"] \
+	"#1"
 }
 
-proc if_while_breakpoint_command_test {} {
+proc_with_prefix if_while_breakpoint_command_test {} {
+    global valnum_re
+
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=5" ".*" "set value to 5 in progvar_simple_if_test"
+    gdb_test "p value=5" " = 5" "set value to 5"
     delete_breakpoints
-    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #1"
+    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial"
 
-    gdb_test_multiple "commands" \
-	"commands in if_while_breakpoint_command_test" {
-	    -re "End with" {
-		pass "commands in if_while_breakpoint_command_test"
-	    }
+    gdb_test_multiple "commands" "commands" {
+	-re "End with" {
+	    pass "commands"
 	}
+    }
 
     # This test should alternate between 0xdeadbeef and 0xfeedface two times.
-    gdb_test "while value > 0\nset value -= 1\nif \(value % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \
-	    "" \
-	    "commands part 2 in if_while_breakpoint_command_test"
-    gdb_test "continue" \
-	    "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "if_while_breakpoint_command_test #1"
-   gdb_test "info break" \
-	   "while.*set.*if.*p/x.*else.*p/x.*end.*" \
-	   "info break in if_while_breakpoint_command_test"
-    gdb_stop_suppressing_tests
+    gdb_test \
+	[multi_line_input \
+	     {while value > 0} \
+	     {  set value -= 1} \
+	     {  if (value % 2) == 1} \
+	     {    p/x 0xdeadbeef} \
+	     {  else} \
+	     {    p/x 0xfeedface} \
+	     {  end} \
+	     {end} \
+	     {end}] \
+	"" \
+	"commands part 2"
+    gdb_test \
+	"continue" \
+	[multi_line \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface"] \
+	"#1"
+    gdb_test "info break" "while.*set.*if.*p/x.*else.*p/x.*end.*"
 }
 
 # Test that we can run the inferior from breakpoint commands.
@@ -137,12 +240,12 @@ proc if_while_breakpoint_command_test {}
 # shall be ignored.  See the gdb manual, "Break Commands",
 # subsection "Breakpoint command lists".
 
-proc infrun_breakpoint_command_test {} {
+proc_with_prefix infrun_breakpoint_command_test {} {
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=6" ".*" "set value to 6 in progvar_simple_if_test #1"
+    gdb_test "p value=6" " = 6" "set value to 6"
     delete_breakpoints
     gdb_test "break factorial if value == 5" "Breakpoint.*at.*"
 
@@ -150,89 +253,237 @@ proc infrun_breakpoint_command_test {} {
 # to get around a synchronization problem in expect.
 # part1: issue the gdb command "commands"
 # part2: send the list of commands
-    gdb_test_multiple "commands" \
-	"commands in infrun_breakpoint_command_test #1" {
-	    -re "End with" {
-		pass "commands in infrun_breakpoint_command_test #1"
-	    }
+
+    set test "commands #1"
+    gdb_test_multiple "commands" $test {
+	-re "End with" {
+	    pass $test
 	}
+    }
     gdb_test "step\nstep\nstep\nstep\nend" "" \
-	"commands in infrun_breakpoint_command_test #2"
+	"commands #2"
 
     gdb_test "continue" \
-	"Continuing.*.*.*Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*\[0-9\]*\[      \]*if \\(value > 1\\) \{.*\[0-9\]*\[      \]*value \\*= factorial \\(value - 1\\);.*" \
-	"continue in infrun_breakpoint_command_test"
-
-    gdb_stop_suppressing_tests
+	"Continuing.*.*.*Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*\[0-9\]*\[      \]*if \\(value > 1\\) \{.*\[0-9\]*\[      \]*value \\*= factorial \\(value - 1\\);.*"
 }
 
-proc breakpoint_command_test {} {
+proc_with_prefix breakpoint_command_test {} {
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests; }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
-    gdb_test "p value=6" ".*" "set value to 6 in progvar_simple_if_test #2"
+    gdb_test "p value=6" " = 6" "set value to 6"
     delete_breakpoints
-    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #2"
-    gdb_test "commands\nprintf \"Now the value is %d\\n\", value\nend" \
-	"End with.*" "commands in breakpoint_command_test"
+    gdb_test "break factorial" "Breakpoint.*at.*"
+    gdb_test \
+	[multi_line_input \
+	     {commands} \
+	     {  printf "Now the value is %d\n", value} \
+	     {end}] \
+	"End with.*" \
+	"commands"
     gdb_test "continue" \
-	    "Breakpoint \[0-9\]*, factorial.*Now the value is 5" \
-	"continue in breakpoint_command_test"
-    gdb_test "print value" " = 5" "print value in breakpoint_command_test"
-    gdb_stop_suppressing_tests
+	    "Breakpoint \[0-9\]*, factorial.*Now the value is 5"
+    gdb_test "print value" " = 5"
 }
 
 # Test a simple user defined command (with arguments)
-proc user_defined_command_test {} {
+proc_with_prefix user_defined_command_test {} {
     global gdb_prompt
+    global valnum_re
 
-    gdb_test_no_output "set \$foo = 4" \
-	"set foo in user_defined_command_test"
+    gdb_test_no_output "set \$foo = 4" "set foo"
 
-    gdb_test_multiple "define mycommand" \
-	"define mycommand in user_defined_command_test" {
-	    -re "End with"  {
-		pass "define mycommand in user_defined_command_test"
-	    }
+    gdb_test_multiple "define mycommand" "define mycommand" {
+	-re "End with"  {
+	    pass "define mycommand"
 	}
+    }
 
     # This test should alternate between 0xdeadbeef and 0xfeedface two times.
-    gdb_test "while \$arg0 > 0\nset \$arg0 -= 1\nif \(\$arg0 % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \
-	    "" \
-	    "enter commands in user_defined_command_test"
-
-    gdb_test "mycommand \$foo" \
-	    "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
-	    "execute user defined command in user_defined_command_test"
+    gdb_test \
+	[multi_line_input \
+	     {while $arg0 > 0} \
+	     {  set $arg0 -= 1} \
+	     {  if ($arg0 % 2) == 1} \
+	     {    p/x 0xdeadbeef} \
+	     {  else} \
+	     {    p/x 0xfeedface} \
+	     {  end} \
+	     {end} \
+	     {end}] \
+	"" \
+	"enter commands"
+
+    global decimal
+    set valnum_re "\\\$$decimal"
+
+    gdb_test \
+	{mycommand $foo} \
+	[multi_line \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface" \
+	     "$valnum_re = 0xdeadbeef" \
+	     "$valnum_re = 0xfeedface"] \
+	"execute user-defined command"
    gdb_test "show user mycommand" \
 	"  while \\\$arg0.*set.*    if \\\(\\\$arg0.*p/x.*    else\[^\n\].*p/x.*    end\[^\n\].*  end\[^\n\].*" \
-	   "display user command in user_defined_command_test"
+	   "display user command"
 
     # Create and test a user-defined command with an empty body.
-    gdb_test_multiple "define myemptycommand" \
-	"define myemptycommand in user_defined_command_test" {
-	    -re "End with"  {
-		pass "define myemptycommand in user_defined_command_test"
-	    }
+    gdb_test_multiple "define myemptycommand" "define myemptycommand" {
+	-re "End with"  {
+	    pass "define myemptycommand"
 	}
+    }
     gdb_test "end" \
 	"" \
 	"end definition of user-defined command with empty body"
 
     gdb_test_no_output "myemptycommand" \
-	"execute user-defined empty command in user_defined_command_test"
+	"execute user-defined empty command"
 
     gdb_test "show user" \
 	"User command \"myemptycommand.*" \
-	"display empty command in command list in user_defined_command_test"
+	"display empty command in command list"
 
     gdb_test "show user myemptycommand" \
 	"User command \"myemptycommand.*" \
-	"display user-defined empty command in user_defined_command_test"
+	"display user-defined empty command"
+}
+
+# Test that "eval" in a user-defined command expands $argc/$argN.
+
+proc_with_prefix user_defined_command_args_eval {} {
+    global gdb_prompt
+
+    gdb_test_multiple "define command_args_eval" \
+	"define command_args_eval" {
+	    -re "End with"  {
+		pass "define"
+	    }
+	}
+
+    # Make a command that constructs references to $argc and $argN via
+    # eval.
+    gdb_test \
+	[multi_line \
+	     {eval "printf \"argc = %%d,\", $arg%c", 'c'} \
+	     {set $i = 0} \
+	     {while $i < $argc} \
+	     {  eval "printf \" %%d\", $arg%d", $i} \
+	     {  set $i = $i + 1} \
+	     {end} \
+	     {printf "\n"} \
+	     {end}] \
+	"" \
+	"enter commands"
+
+    gdb_test "command_args_eval 1 2 3" "argc = 3, 1 2 3" "execute command"
+}
+
+# Test that the $argc/$argN variables are pushed on/popped from the
+# args stack correctly when a user-defined command calls another
+# user-defined command (or in this case, recurses).
+
+proc_with_prefix user_defined_command_args_stack_test {} {
+    global gdb_prompt
+
+    gdb_test_multiple "define args_stack_command" \
+	"define args_stack_command" {
+	    -re "End with"  {
+		pass "define"
+	    }
+	}
+
+    # Make a command that refers to $argc/$argN before and after
+    # recursing.  Also, vary the number of arguments passed to each
+    # recursion point.
+    gdb_test \
+	[multi_line \
+	     {printf "before, argc = %d,", $argc} \
+	     {set $i = 0} \
+	     {while $i < $argc} \
+	     {  eval "printf \" %%d\", $arg%d", $i} \
+	     {  set $i = $i + 1} \
+	     {end} \
+	     {printf "\n"} \
+	     {} \
+	     {} \
+	     {if $argc == 3} \
+	     {  args_stack_command 21 22} \
+	     {end} \
+	     {if $argc == 2} \
+	     {  args_stack_command 11} \
+	     {end} \
+	     {} \
+	     {} \
+	     {printf "after, argc = %d,", $argc} \
+	     {set $i = 0} \
+	     {while $i < $argc} \
+	     {  eval "printf \" %%d\", $arg%d", $i} \
+	     {  set $i = $i + 1} \
+	     {end} \
+	     {printf "\n"} \
+	     {end}] \
+	"" \
+	"enter commands"
+
+    set expected \
+	[multi_line \
+	     "before, argc = 3, 31 32 33" \
+	     "before, argc = 2, 21 22" \
+	     "before, argc = 1, 11" \
+	     "after, argc = 1, 11" \
+	     "after, argc = 2, 21 22" \
+	     "after, argc = 3, 31 32 33"]
+    gdb_test "args_stack_command 31 32 33" $expected "execute command"
 }
 
-proc watchpoint_command_test {} {
+# Test a simple user defined command with many arguments.  GDB <= 7.12
+# used to have a hard coded limit of 10 arguments.
+
+proc_with_prefix user_defined_command_manyargs_test {} {
+    global gdb_prompt
+
+    set test "define command"
+    gdb_test_multiple "define manyargs" $test {
+	-re "End with"  {
+	    pass $test
+	}
+    }
+
+    # Define a function that doubles its arguments.
+    gdb_test \
+	[multi_line \
+	     {printf "nargs=%d:", $argc} \
+	     {set $i = 0} \
+	     {while $i < $argc} \
+	     {  eval "printf \" %%d\", 2 * $arg%d\n", $i} \
+	     {  set $i = $i + 1} \
+	     {end} \
+	     {printf "\n"} \
+	     {end}] \
+	"" \
+	"enter commands"
+
+    # Some random number of arguments, as long as higher than 10.
+    set nargs 100
+
+    set cmd "manyargs"
+    for {set i 1} {$i <= $nargs} {incr i} {
+	append cmd " $i"
+    }
+
+    set expected "nargs=$nargs:"
+    for {set i 1} {$i <= $nargs} {incr i} {
+	append expected " " [expr 2 * $i]
+    }
+
+    gdb_test $cmd $expected "execute command"
+}
+
+proc_with_prefix watchpoint_command_test {} {
     global gdb_prompt
 
     # Disable hardware watchpoints if necessary.
@@ -240,7 +491,8 @@ proc watchpoint_command_test {} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
 
-    if { ![runto factorial] } then { return }
+    runto_or_return factorial
+
     delete_breakpoints
 
     # Verify that we can create a watchpoint, and give it a commands
@@ -303,67 +555,51 @@ proc watchpoint_command_test {} {
    }
 }
 
-proc test_command_prompt_position {} {
+proc_with_prefix test_command_prompt_position {} {
     global gdb_prompt
+    global valnum_re
+
+    runto_or_return factorial
 
-    if { ![runto factorial] } then { gdb_suppress_tests; }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
     delete_breakpoints
-    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #3"
-    gdb_test "p value=5" ".*" "set value to 5 in test_command_prompt_position"
+    gdb_test "break factorial" "Breakpoint.*at.*"
+    gdb_test "p value=5" ".*" "set value to 5"
     # All this test should do is print 0xdeadbeef once.
-    gdb_test "if value == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
-	    "\\\$\[0-9\]* = 0xdeadbeef" \
-	    "if test in test_command_prompt_position"
-    
+    gdb_test \
+	[multi_line_input \
+	     {if value == 1} \
+	     {  p/x 0xfeedface} \
+	     {else} \
+	     {  p/x 0xdeadbeef} \
+	     {end}] \
+	"$valnum_re = 0xdeadbeef" \
+	"if test"
+
     # Now let's test for the correct position of the '>' in gdb's
     # prompt for commands.  It should be at the beginning of the line,
     # and not after one space.
 
-    send_gdb "commands\n"
-    gdb_expect {
-	-re "Type commands.*End with.*\[\r\n\]>$" { 
-	    send_gdb "printf \"Now the value is %d\\n\", value\n"
-	    gdb_expect {
+    set test "> OK"
+    gdb_test_multiple "commands" $test {
+	-re "Type commands.*End with.*\[\r\n\]>$" {
+	    gdb_test_multiple "printf \"Now the value is %d\\n\", value" $test {
 		-re "^printf.*value\r\n>$" {
-		    send_gdb "end\n"
-		    gdb_expect {
+		    gdb_test_multiple "end" $test {
 			-re "^end\r\n$gdb_prompt $" { 
-			    pass "> OK in test_command_prompt_position" 
-			}
-			-re ".*$gdb_prompt $" { 
-			    fail "some other message in test_command_prompt_position" 
-			}
-			timeout  { 
-			    fail "(timeout) 1 in test_command_prompt_position"
+			    pass $test
 			}
 		    }
 		}
-		-re "^ >$" { fail "> not OK in test_command_prompt_position" }
-		-re ".*$gdb_prompt $"   { 
-		    fail "wrong message in test_command_prompt_position" 
-		}
-		timeout    { 
-		    fail "(timeout) 2 in test_command_prompt_position " 
-		}
 	    }
 	}
-	-re "Type commands.*End with.*\[\r\n\] >$" { 
-	    fail "prompt not OK in test_command_prompt_position" 
-	}
-	-re ".*$gdb_prompt $" { 
-	    fail "commands in test_command_prompt_position" 
-	}
-	timeout { fail "(timeout) 3 commands in test_command_prompt_position" }
     }
-
-    gdb_stop_suppressing_tests
 }
 
 
 
-proc deprecated_command_test {} {
+proc_with_prefix deprecated_command_test {} {
     gdb_test "maintenance deprecate blah" "Can't find command.*" \
           "tried to deprecate non-existing command"
 
@@ -371,14 +607,14 @@ proc deprecated_command_test {} {
     gdb_test "p 5" \
 	    "Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" \
 	    "p deprecated warning, with replacement"
-    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /1/"
+    gdb_test "p 5" ".\[0-9\]* = 5.*" "deprecated warning goes away /1/"
 
     gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /2/"
     gdb_test_no_output "maintenance deprecate print \"new_print\"" 
     gdb_test "p 5" \
 	    "Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" \
 	    "both alias and command are deprecated"
-    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /2/"
+    gdb_test "p 5" ".\[0-9\]* = 5.*" "deprecated warning goes away /2/"
 
     gdb_test_no_output "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
 	    "deprecate long command /1/"
@@ -397,7 +633,7 @@ proc deprecated_command_test {} {
 	    "deprecate with no arguments"
 }
 
-proc bp_deleted_in_command_test {} {
+proc_with_prefix bp_deleted_in_command_test {} {
     global gdb_prompt
 
     delete_breakpoints
@@ -405,12 +641,11 @@ proc bp_deleted_in_command_test {} {
     # Create a breakpoint, and associate a command-list to it, with
     # one command that deletes this breakpoint.
     gdb_test "break factorial" \
-             "Breakpoint \[0-9\]+ at .*: file .*run.c, line \[0-9\]+\." \
-             "breakpoint in bp_deleted_in_command_test"
+             "Breakpoint \[0-9\]+ at .*: file .*run.c, line \[0-9\]+\."
     
-    gdb_test_multiple "commands" "begin commands in bp_deleted_in_command_test" {
+    gdb_test_multiple "commands" "begin commands" {
       -re "Type commands for breakpoint.*>$" {
-          pass "begin commands in bp_deleted_in_command_test"
+          pass "begin commands"
       }
     }
     gdb_test_multiple "silent" "add silent command" {
@@ -442,7 +677,7 @@ proc bp_deleted_in_command_test {} {
     gdb_test "" "factorial command-list executed.*" "run factorial until breakpoint"
 }
 
-proc temporary_breakpoint_commands {} {
+proc_with_prefix temporary_breakpoint_commands {} {
     global gdb_prompt
 
     delete_breakpoints
@@ -452,12 +687,12 @@ proc temporary_breakpoint_commands {} {
     # breakpoint is hit.
     gdb_test "tbreak factorial" \
 	    "Temporary breakpoint \[0-9\]+ at .*: file .*run.c, line \[0-9\]+\." \
-	    "breakpoint in temporary_breakpoint_commands"
-    
+	    "breakpoint"
+
     gdb_test_multiple "commands" \
 	"begin commands in bp_deleted_in_command_test" {
 	    -re "Type commands for breakpoint.*>$" {
-		pass "begin commands in bp_deleted_in_command_test"
+		pass "begin commands"
 	    }
 	}
     gdb_test_multiple "silent" "add silent tbreak command" {
@@ -487,26 +722,28 @@ proc temporary_breakpoint_commands {} {
 
 # Test that GDB can handle $arg0 outside of user functions without
 # crashing.
-proc stray_arg0_test { } {
+proc_with_prefix stray_arg0_test { } {
+    global valnum_re
+
     gdb_test "print \$arg0" \
-	"\\\$\[0-9\]* = void" \
-	"stray_arg0_test #1"
+	"$valnum_re = void" \
+	"#1"
 
     gdb_test "if 1 == 1\nprint \$arg0\nend" \
-	"\\\$\[0-9\]* = void" \
-	"stray_arg0_test #2"
+	"$valnum_re = void" \
+	"#2"
 
     gdb_test "print \$arg0 = 1" \
-	"\\\$\[0-9\]* = 1" \
-	"stray_arg0_test #3"
+	"$valnum_re = 1" \
+	"#3"
 
     gdb_test "print \$arg0" \
-	"\\\$\[0-9\]* = 1" \
-	"stray_arg0_test #4"
+	"$valnum_re = 1" \
+	"#4"
 }
 
 # Test that GDB is able to source a file with an indented comment.
-proc source_file_with_indented_comment {} {
+proc_with_prefix source_file_with_indented_comment {} {
     set file1 [standard_output_file file1]
 
     set fd [open "$file1" w]
@@ -517,12 +754,12 @@ end
 echo Done!\n}
     close $fd
 
-    gdb_test "source $file1" "Done!" "source file with indented comment"
+    gdb_test "source $file1" "Done!" "source file"
 }
 
 # Test that GDB can handle arguments when sourcing files recursively.
 # If the arguments are overwritten with ####### then the test has failed.
-proc recursive_source_test {} {
+proc_with_prefix recursive_source_test {} {
     set file1 [standard_output_file file1]
     set file2 [standard_output_file file2]
     set file3 [standard_output_file file3]
@@ -550,7 +787,7 @@ end"
 
     gdb_test "source $file1" \
 	"1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
-	"recursive source test"
+	"source file"
 
     file delete $file1
     file delete $file2
@@ -575,10 +812,10 @@ proc gdb_test_no_prompt { command result
     return 0
 }
 
-proc if_commands_test {} {
+proc_with_prefix if_commands_test {} {
     global gdb_prompt
 
-    gdb_test_no_output "set \$tem = 1" "set \$tem in if_commands_test"
+    gdb_test_no_output "set \$tem = 1" "set \$tem"
 
     set test "if_commands_test 1"
     gdb_test_no_prompt "if \$tem == 2" { >} $test
@@ -633,7 +870,7 @@ proc if_commands_test {} {
 # Verify an error during "commands" commands execution will prevent any other
 # "commands" from other breakpoints at the same location to be executed.
 
-proc error_clears_commands_left {} {
+proc_with_prefix error_clears_commands_left {} {
     set test "hook-stop 1"
     gdb_test_multiple {define hook-stop} $test {
 	-re "End with a line saying just \"end\"\\.\r\n>$" {
@@ -693,46 +930,54 @@ proc error_clears_commands_left {} {
     gdb_test_no_output "end" "main commands 2c"
 
     gdb_run_cmd
-    gdb_test "" "hook-stop1\r\n.*\r\ncmd1\r\nUndefined command: \"errorcommandxy\"\\.  Try \"help\"\\." "cmd1 error"
+    gdb_test \
+	"" \
+	[multi_line \
+	     "hook-stop1" \
+	     ".*" \
+	     "cmd1" \
+	     "Undefined command: \"errorcommandxy\"\\.  Try \"help\"\\."] \
+	"cmd1 error"
 
     gdb_test {echo idle\n} "\r\nidle" "no cmd2"
 }
 
-proc redefine_hook_test {} {
+proc_with_prefix redefine_hook_test {} {
     global gdb_prompt
 
-    gdb_test "define one\nend" \
-      "" \
-      "define one"
+    gdb_test \
+	[multi_line_input \
+	     "define one"\
+	     "end"] \
+	"" \
+	"define one"
 
-    gdb_test "define hook-one\necho hibob\\n\nend" \
-      "" \
-      "define hook-one"
+    gdb_test \
+	[multi_line_input \
+	     "define hook-one" \
+	     "echo hibob\\n" \
+	     "end"] \
+	"" \
+	"define hook-one"
 
-    gdb_test_multiple "define one" "redefine one" {
+    set test "redefine one"
+    gdb_test_multiple "define one" $test {
 	-re "Redefine command .one.. .y or n. $" {
 	    send_gdb "y\n"
 	    exp_continue
 	}
 
 	-re "End with"  {
-	    pass "define one in redefine_hook_test"
-	}
-        default {
-	    fail "(timeout or eof) define one in redefine_hook_test"
+	    pass $test
 	}
     }
 
-    gdb_test "end" \
-	    "" \
-	    "enter commands for one redefinition in redefine_hook_test"
+    gdb_test "end" "" "enter commands for one redefinition"
 
-    gdb_test "one" \
-	    "hibob" \
-	    "execute one command in redefine_hook_test"
+    gdb_test "one" "hibob" "execute one command"
 }
 
-proc redefine_backtrace_test {} {
+proc_with_prefix redefine_backtrace_test {} {
     global gdb_prompt
 
     gdb_test_multiple "define backtrace" "define backtrace" {
@@ -747,16 +992,15 @@ proc redefine_backtrace_test {} {
 	}
     }
 
-    gdb_test "echo hibob\\n\nend" \
-	    "" \
-	    "enter commands in redefine_backtrace_test"
-
-    gdb_test "backtrace" \
-	    "hibob" \
-	    "execute backtrace command in redefine_backtrace_test"
-    gdb_test "bt" \
-	    "hibob" \
-	    "execute bt command in redefine_backtrace_test"
+    gdb_test \
+	[multi_line_input \
+	     "echo hibob\\n" \
+	     "end"] \
+	"" \
+	"enter commands"
+
+    gdb_test "backtrace" "hibob" "execute backtrace command"
+    gdb_test "bt" "hibob" "execute bt command"
 }
 
 gdbvar_simple_if_test
@@ -769,6 +1013,9 @@ if_while_breakpoint_command_test
 infrun_breakpoint_command_test
 breakpoint_command_test
 user_defined_command_test
+user_defined_command_args_eval
+user_defined_command_args_stack_test
+user_defined_command_manyargs_test
 watchpoint_command_test
 test_command_prompt_position
 deprecated_command_test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/compare-sections.c ./gdb/testsuite/gdb.base/compare-sections.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/compare-sections.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/compare-sections.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/compare-sections.exp ./gdb/testsuite/gdb.base/compare-sections.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/compare-sections.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/compare-sections.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ gdb_test_multiple $command $test {
 
 # Now get past startup code.
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/completion.exp ./gdb/testsuite/gdb.base/completion.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/completion.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/completion.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,9 +56,8 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
-    untested $testfile.exp
     return -1
 }
 
@@ -717,7 +716,7 @@ gdb_expect {
 }
 
 # Empty COMMAND sends no newline while " " sends the newline we need.
-gdb_test " " "Source directories searched: .*" "Glob remaining of directory test"
+gdb_test " " "Source directories searched: .*" "glob remaining of directory test"
 
 gdb_test "complete file ./gdb.base/compl" \
     "file ./gdb.base/completion\\.exp.*" \
@@ -777,6 +776,88 @@ gdb_test_multiple "" "$test" {
 }
 
 #
+# Tests for the location completer
+#
+
+# Turn off pending breakpoint support so that we don't get queried
+# all the time.
+gdb_test_no_output "set breakpoint pending off"
+
+set subsrc [string range $srcfile 0 [expr {[string length $srcfile] - 3}]]
+set test "tab complete break $subsrc"
+send_gdb "break $subsrc\t\t"
+gdb_test_multiple "" $test {
+    -re "break\.c.*break1\.c.*$gdb_prompt " {
+	send_gdb "1\t\n"
+	gdb_test_multiple "" $test {
+	    -re ".*Function \"$srcfile2\" not defined\..*$gdb_prompt " {
+		pass $test
+	    }
+	    -re "$gdb_prompt p$" {
+		fail $test
+	    }
+	}
+    }
+
+    -re "$gdb_prompt p$" {
+	fail $test
+    }
+}
+
+gdb_test "complete break $subsrc" "break\.c.*break1\.c"
+
+set test "tab complete break need"
+send_gdb "break need\t"
+gdb_test_multiple "" $test {
+    -re "break need_malloc " {
+	send_gdb "\n"
+	gdb_test_multiple "" $test {
+	    -re ".*Breakpoint.*at .*/$srcfile, line .*$gdb_prompt " {
+		pass $test
+		gdb_test_no_output "delete breakpoint \$bpnum" \
+		    "delete breakpoint for $test"
+	    }
+	    -re "$gdb_prompt p$" {
+		fail $test
+	    }
+	}
+    }
+    -re "$gdb_prompt p$" {
+	fail $test
+    }
+}
+
+gdb_test "complete break need" "need_malloc"
+
+# gdb/17960
+# Enabling max-completions is necessary to trigger the bug.
+gdb_test_no_output "set max-completions 10"
+set test "tab complete break $srcfile:ma"
+send_gdb "break $srcfile:ma\t"
+gdb_test_multiple "" $test {
+    -re "break $srcfile:main " {
+	send_gdb "\n"
+	gdb_test_multiple "" $test {
+	    -re ".*Breakpoint.*at .*/$srcfile, line .*$gdb_prompt " {
+		pass $test
+		gdb_test_no_output "delete breakpoint \$bpnum" \
+		    "delete breakpoint for $test"
+	    }
+	    -re "$gdb_prompt p$" {
+		fail $test
+	    }
+	}
+    }
+    -re "$gdb_prompt p$" {
+	fail $test
+    }
+}
+
+gdb_test "complete break $srcfile:ma" "break\.c:main"
+
+# End of gdb/17960 testing.
+
+#
 # Completion limiting.
 #
 
@@ -862,7 +943,7 @@ gdb_test_multiple "" "$test" {
 
 gdb_test_no_output "set max-completions unlimited"
 
-if {![skip_tui_tests]} {
+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
     set test "test completion of layout names"
     send_gdb "layout\t\t\t"
     gdb_test_multiple "" "$test" {
@@ -878,7 +959,7 @@ if {![skip_tui_tests]} {
 	}
     }
 }
-if {![skip_tui_tests]} {
+if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} {
     with_test_prefix "focus command" {
 	set test "test completion"
 	send_gdb "focus \t\t"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/complex.c ./gdb/testsuite/gdb.base/complex.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/complex.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/complex.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2002-2015 Free Software Foundation, Inc.
+/* Copyright 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/complex.exp ./gdb/testsuite/gdb.base/complex.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/complex.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/complex.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/comprdebug.exp ./gdb/testsuite/gdb.base/comprdebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/comprdebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/comprdebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ standard_testfile average.c
 set ofile "${binfile}0.o"
 if {[gdb_compile $srcdir/$subdir/$srcfile $ofile \
 	 object {debug}] != ""} {
-    untested comprdebug.exp
+    untested "failed to compile"
     return
 }
 
@@ -30,7 +30,7 @@ verbose "result is $result"
 verbose "output is $output"
 
 if {$result == 1} {
-    untested comprdebug.exp
+    untested "failed to execute objcopy"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak-call-false.c ./gdb/testsuite/gdb.base/condbreak-call-false.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak-call-false.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/condbreak-call-false.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak-call-false.exp ./gdb/testsuite/gdb.base/condbreak-call-false.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak-call-false.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/condbreak-call-false.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak.exp ./gdb/testsuite/gdb.base/condbreak.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/condbreak.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/condbreak.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing ${testfile}.exp $testfile [list $srcfile $srcfile2] \
+if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
 	 {debug nowarnings}]} {
     return -1
 }
@@ -92,32 +92,18 @@ gdb_test "break marker4" \
 #
 # check to see what breakpoints are set
 #
-
-if {$hp_aCC_compiler} {
-    set marker1_proto "\\(void\\)"
-    set marker2_proto "\\(int\\)"
-    # Not checked.
-    set marker3_proto "\\(char \\*, char \\*\\)"
-    set marker4_proto "\\(long\\)"
-} else {
-    set marker1_proto ""
-    set marker2_proto ""
-    set marker3_proto ""
-    set marker4_proto ""
-}
-
 gdb_test "info break" \
     "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location6.*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker1$marker1_proto at .*$srcfile2:$bp_location15.*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker1 at .*$srcfile2:$bp_location15.*
 \[\t \]+stop only if \\(1==1\\).*
 \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location1.*
 \[\t \]+stop only if \\(1==1\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker2$marker2_proto at .*$srcfile2:$bp_location8.*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker2 at .*$srcfile2:$bp_location8.*
 \[\t \]+stop only if \\(a==43\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker3$marker3_proto at .*$srcfile2:$bp_location17.*
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker3 at .*$srcfile2:$bp_location17.*
 \[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
-\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4$marker4_proto at .*$srcfile2:$bp_location14.*" \
+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4 at .*$srcfile2:$bp_location14.*" \
     "breakpoint info"
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-eval-mode.c ./gdb/testsuite/gdb.base/cond-eval-mode.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-eval-mode.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cond-eval-mode.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-eval-mode.exp ./gdb/testsuite/gdb.base/cond-eval-mode.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-eval-mode.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cond-eval-mode.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2012-2015 Free Software Foundation, Inc.
+#   Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-expr.exp ./gdb/testsuite/gdb.base/cond-expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cond-expr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cond-expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
 standard_testfile int-type.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested cond-expr.exp
+     untested "failed to compile"
      return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive.exp ./gdb/testsuite/gdb.base/consecutive.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/consecutive.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2001-2015 Free Software Foundation, Inc.
+#   Copyright 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,8 +26,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive-step-over.c ./gdb/testsuite/gdb.base/consecutive-step-over.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive-step-over.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/consecutive-step-over.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive-step-over.exp ./gdb/testsuite/gdb.base/consecutive-step-over.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/consecutive-step-over.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/consecutive-step-over.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/constvars.exp ./gdb/testsuite/gdb.base/constvars.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/constvars.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/constvars.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ if [get_compiler_info] {
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
-    untested constvars.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -63,11 +63,6 @@ proc local_compiler_xfail_check { } {
 	    setup_xfail "*-*-*" 
 	}
     }
-
-    global hp_cc_compiler
-    if { $hp_cc_compiler } {
-	setup_xfail "hppa*-*-hpux*"
-    }
 }
 
 # A few tests still xfail with gcc 3 -gstabs+ and gcc 4 -gstabs+.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/continue-all-already-running.c ./gdb/testsuite/gdb.base/continue-all-already-running.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/continue-all-already-running.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/continue-all-already-running.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/continue-all-already-running.exp ./gdb/testsuite/gdb.base/continue-all-already-running.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/continue-all-already-running.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/continue-all-already-running.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coredump-filter.c ./gdb/testsuite/gdb.base/coredump-filter.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coredump-filter.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/coredump-filter.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2015 Free Software Foundation, Inc.
+/* Copyright 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coredump-filter.exp ./gdb/testsuite/gdb.base/coredump-filter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coredump-filter.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/coredump-filter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@ if ![istarget *-*-linux*] then {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
-    untested "could not compile test program"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/corefile.exp ./gdb/testsuite/gdb.base/corefile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/corefile.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/corefile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info] {
 }
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coremaker2.c ./gdb/testsuite/gdb.base/coremaker2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coremaker2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/coremaker2.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,75 +0,0 @@
-/* Copyright 1992-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Simple little program that just generates a core dump from inside some
-   nested function calls.  Keep this as self contained as possible, I.E.
-   use no environment resources other than possibly abort(). */
-
-#ifndef __STDC__
-#define	const	/**/
-#endif
-
-#ifndef HAVE_ABORT
-#define HAVE_ABORT 1
-#endif
-
-#if HAVE_ABORT
-#define ABORT abort()
-#else
-#define ABORT {char *invalid = 0; *invalid = 0xFF;}
-#endif
-
-/* Don't make these automatic vars or we will have to walk back up the
-   stack to access them. */
-
-char *buf1;
-char *buf2;
-
-int coremaker_data = 1;	/* In Data section */
-int coremaker_bss;	/* In BSS section */
-
-const int coremaker_ro = 201;	/* In Read-Only Data section */
-
-void
-func2 (int x)
-{
-  int coremaker_local[5];
-  int i;
-  static int y;
-
-  /* Make sure that coremaker_local doesn't get optimized away. */
-  for (i = 0; i < 5; i++)
-    coremaker_local[i] = i;
-  coremaker_bss = 0;
-  for (i = 0; i < 5; i++)
-    coremaker_bss += coremaker_local[i];
-  coremaker_data = coremaker_ro + 1;
-  y = 10 * x;
-  ABORT;
-}
-
-void
-func1 (int x)
-{
-  func2 (x * 2);
-}
-
-int main ()
-{
-  func1 (10);
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coremaker.c ./gdb/testsuite/gdb.base/coremaker.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/coremaker.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/coremaker.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1992-2015 Free Software Foundation, Inc.
+/* Copyright 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj.exp ./gdb/testsuite/gdb.base/ctxobj.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ctxobj.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -55,7 +55,8 @@ if { [gdb_compile "${srcdir}/${subdir}/$
 }
 
 clean_restart $executable
-gdb_load_shlibs $libobj1 $libobj2
+gdb_load_shlib $libobj1
+gdb_load_shlib $libobj2
 
 if ![runto_main] {
     untested "could not run to main"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-f.c ./gdb/testsuite/gdb.base/ctxobj-f.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-f.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ctxobj-f.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-m.c ./gdb/testsuite/gdb.base/ctxobj-m.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-m.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ctxobj-m.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-v.c ./gdb/testsuite/gdb.base/ctxobj-v.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ctxobj-v.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ctxobj-v.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cursal.c ./gdb/testsuite/gdb.base/cursal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cursal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cursal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2004-2015 Free Software Foundation, Inc.
+/* Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cursal.exp ./gdb/testsuite/gdb.base/cursal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cursal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cursal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 standard_testfile
 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
-    untested "Couldn't compile $srcfile"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cvexpr.c ./gdb/testsuite/gdb.base/cvexpr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cvexpr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cvexpr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cvexpr.exp ./gdb/testsuite/gdb.base/cvexpr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/cvexpr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/cvexpr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested cvexpr.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/d10v.ld ./gdb/testsuite/gdb.base/d10v.ld
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/d10v.ld	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/d10v.ld	1970-01-01 00:00:00.000000000 +0000
@@ -1,193 +0,0 @@
-OUTPUT_FORMAT("elf32-d10v", "elf32-d10v",
-	      "elf32-d10v")
-OUTPUT_ARCH(d10v)
-ENTRY(_start)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-
-MEMORY
-{
-  UNIFIED : org = 0,         len = 0x1000000
-  INSN    : org = 0x1014000, len = 0x40000
-  DATA    : org = 0x2000004, len = 0x7FFC
-  STACK   : org = 0x200BFFE, len = 4
-}
-
-SECTIONS
-{
-  /* Overlay sections: */
-  .ovly0  0x1001000 : AT (0x8000) { foo.o(.text)  }
-  .ovly1  0x1001000 : AT (0x9000) { bar.o(.text)  }
-  .ovly2  0x1002000 : AT (0xa000) { baz.o(.text)  }
-  .ovly3  0x1002000 : AT (0xb000) { grbx.o(.text) }
-  .data00 0x2001000 : AT (0xc000) { foo.o(.data)  }
-  .data01 0x2001000 : AT (0xd000) { bar.o(.data)  }
-  .data02 0x2002000 : AT (0xe000) { baz.o(.data)  }
-  .data03 0x2002000 : AT (0xf000) { grbx.o(.data) }
-
-  .text :
-  {
-    KEEP (*(.init))
-    KEEP (*(.init.*))
-    KEEP (*(.fini))
-    KEEP (*(.fini.*))
-    *(.text)
-    *(.text.*)
-    /* .gnu.warning sections are handled specially by elf32.em.  */
-    *(.gnu.warning)
-    *(.gnu.linkonce.t*)
-    _etext = .;
-    PROVIDE (etext = .);
-  } >INSN =0
-  .rodata    : {
-    *(.rodata) 
-    *(.gnu.linkonce.r*)
-    *(.rodata.*) 
-  } >DATA
-  .rodata1   : { 
-    *(.rodata1)
-    *(.rodata1.*)
-  } >DATA
-
-  .data    :
-  {
-    *(.data)
-    *(.data.*)
-    *(.gnu.linkonce.d*)
-    _ovly_table = .; 
-	LONG(ABSOLUTE(ADDR(.ovly0)));
-	LONG(SIZEOF(.ovly0));
-	LONG(LOADADDR(.ovly0));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.ovly1)));
-	LONG(SIZEOF(.ovly1));
-	LONG(LOADADDR(.ovly1));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.ovly2)));
-	LONG(SIZEOF(.ovly2));
-	LONG(LOADADDR(.ovly2));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.ovly3)));
-	LONG(SIZEOF(.ovly3));
-	LONG(LOADADDR(.ovly3));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.data00)));
-	LONG(SIZEOF(.data00));
-	LONG(LOADADDR(.data00));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.data01)));
-	LONG(SIZEOF(.data01));
-	LONG(LOADADDR(.data01));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.data02)));
-	LONG(SIZEOF(.data02));
-	LONG(LOADADDR(.data02));
-	LONG(0);
-	LONG(ABSOLUTE(ADDR(.data03)));
-	LONG(SIZEOF(.data03));
-	LONG(LOADADDR(.data03));
-	LONG(0);
-    _novlys = .;
-	LONG((_novlys - _ovly_table) / 16);
-    CONSTRUCTORS
-  } >DATA
-  .data1   : {
-    *(.data1)
-    *(.data1.*)
-  } >DATA
-  .ctors         :
-  {
-    /* gcc uses crtbegin.o to find the start of
-       the constructors, so we make sure it is
-       first.  Because this is a wildcard, it
-       doesn't matter if the user does not
-       actually link against crtbegin.o; the
-       linker won't look for a file to match a
-       wildcard.  The wildcard also means that it
-       doesn't matter which directory crtbegin.o
-       is in.  */
-
-    KEEP (*crtbegin.o(.ctors))
-
-    /* We don't want to include the .ctor section from
-       from the crtend.o file until after the sorted ctors.
-       The .ctor section from the crtend file contains the
-       end of ctors marker and it must be last */
-
-    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
-    KEEP (*(SORT(.ctors.*)))
-    KEEP (*(.ctors))
-  } >DATA
-  .dtors         :
-  {
-    KEEP (*crtbegin.o(.dtors))
-    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
-    KEEP (*(SORT(.dtors.*)))
-    KEEP (*(.dtors))
-  } >DATA
-  /* We want the small data sections together, so single-instruction offsets
-     can access them all, and initialized data all before uninitialized, so
-     we can shorten the on-disk segment size.  */
-  .sdata     : {
-    *(.sdata)
-    *(.sdata.*)
-  } >DATA
-  _edata  =  .;
-  PROVIDE (edata = .);
-  __bss_start = .;
-  .sbss      : { *(.sbss) *(.scommon) } >DATA
-  .bss       :
-  {
-   *(.dynbss)
-   *(.dynbss.*)
-   *(.bss)
-   *(.bss.*)
-   *(COMMON)
-  } >DATA
-
-  _end = . ;
-  PROVIDE (end = .);
-
-  .stack : { _stack = .; *(.stack) } >STACK
-
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-
-  .comment 0 : { *(.comment) }
-
-  /* DWARF debug sections.
-     Symbols in the DWARF debugging sections are relative to the beginning
-     of the section so we begin them at 0.  */
-
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dbx.exp ./gdb/testsuite/gdb.base/dbx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dbx.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dbx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ standard_testfile average.c sum.c
 
 if {[build_executable $testfile.exp $testfile \
 	 [list $srcfile $srcfile2] debug] == -1} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -293,15 +293,11 @@ proc test_func { } {
     global srcfile2
     gdb_test "cont" ".*" "cont 1"
     gdb_test "step" ".*"
-    # This always fails, but it's not clear why. -sts 1999-08-17
-    setup_xfail "*-*-*"
     gdb_test "func sum" "'sum' not within current stack frame\."
     set stop_line [gdb_get_line_number "stop-in-sum" $srcfile2]
     gdb_test "stop in sum" "Breakpoint.*at.*: file.*sum\.c, line $stop_line\."
     gdb_test "cont" ".*" "cont 2"
-    # This always fails, but it's not clear why. -sts 1999-08-17
-    setup_xfail "*-*-*"
-    gdb_test "func print_average" ".*in print_average.*\\(list=.*, low=0, high=6\\).*at.*average\.c:${decimal}\r\n\${decimal}\[ \t\]+total = sum\\(list, low, high\\);"
+    gdb_test "func print_average" ".*in print_average.*\\(list=.*, low=0, high=6\\).*at.*average\.c:${decimal}\r\n${decimal}\[ \t\]+total = sum\\(list, low, high\\);"
 }
 
 # Start with a fresh gdb.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dcache-line-read-error.c ./gdb/testsuite/gdb.base/dcache-line-read-error.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dcache-line-read-error.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dcache-line-read-error.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dcache-line-read-error.exp ./gdb/testsuite/gdb.base/dcache-line-read-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dcache-line-read-error.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dcache-line-read-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/debug-expr.exp ./gdb/testsuite/gdb.base/debug-expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/debug-expr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/debug-expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile .c
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
     return -1
 }
 
@@ -54,4 +54,4 @@ test_debug_expr "print /x {char\[4\]} ar
 # This caused gdb to output garbage and possibly segfault
 gdb_test "print \"hello\"" \
     ".*OP_STRING\[^\r\n\]*Language-specific string type: 0.*\[\r\n\]\\$$decimal = \"hello\"\[\r\n\].*" \
-    "String evaluation with debug expr"
+    "string evaluation with debug expr"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/default.exp ./gdb/testsuite/gdb.base/default.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/default.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/default.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -117,11 +117,6 @@ gdb_test "delete display" \
 #test detach
 gdb_test "detach" ".*" "detach"
 
-if [istarget "h8300-*-hms"] then {
-    gdb_exit
-    gdb_start
-}
-
 #test directory
 # FIXME -- need to dump full output to detailed log
 
@@ -209,7 +204,7 @@ gdb_test "f" "No stack." "frame \"f\" ab
 gdb_test "frame" "No stack." "frame"
 #test fg
 gdb_test "fg" "The program is not being run." "fg"
-# FIXME: fg kills the udi connection
+
 #test file
 send_gdb "file\n"
 gdb_expect {
@@ -516,7 +511,7 @@ gdb_test "set history size" "Argument re
 #test set history
 gdb_test "set history" "\"set history\" must be followed by the name of a history subcommand.(\[^\r\n\]*\[\r\n\])+List of set history subcommands:(\[^\r\n\]*\[\r\n\])+set history expansion -- Set history expansion on command input(\[^\r\n\]*\[\r\n\])+set history filename -- Set the filename in which to record the command history(\[^\r\n\]*\[\r\n\])+set history save -- Set saving of the history record on exit(\[^\r\n\]*\[\r\n\])+set history size -- Set the size of the command history(\[^\r\n\]*\[\r\n\])+Type \"help set history\" followed by set history subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set history"
 #test set language
-gdb_test "set language" "Requires an argument. Valid arguments are auto, local, unknown, ada, c, c.., asm, minimal, d, fortran, objective-c, go, java, modula-2, opencl, pascal." "set language"
+gdb_test "set language" "Requires an argument. Valid arguments are ada, c, c.., asm, minimal, d, fortran, go, auto, local, unknown, modula-2, objective-c, opencl, pascal, rust." "set language"
 #test set listsize
 gdb_test "set listsize" "Argument required .integer to set it to.*" "set listsize"
 #test set print "p" abbreviation
@@ -592,6 +587,8 @@ set show_conv_list \
 	{$_sdata = void} \
 	{$_siginfo = void} \
 	{$_thread = 0} \
+	{$_gthread = 0} \
+	{$_inferior = 1} \
 	{$_exception = <error: No frame selected>} \
 	{$_probe_argc = <error: No frame selected>} \
 	{$_probe_arg0 = <error: No frame selected>} \
@@ -615,6 +612,7 @@ if ![skip_python_tests] {
 	    {$_regex = <internal function _regex>} \
 	    {$_streq = <internal function _streq>} \
 	    {$_strlen = <internal function _strlen>} \
+	    {$_as_string = <internal function _as_string>} \
 	    {$_caller_is = <internal function _caller_is>} \
 	    {$_caller_matches = <internal function _caller_matches>} \
 	    {$_any_caller_is = <internal function _any_caller_is>} \
@@ -773,22 +771,20 @@ gdb_expect {
 	}
 
 #test target remote
-if ![istarget "*-*-udi*"] then {
-    send_gdb "target remote\n"
-    gdb_expect {
-	-re "To open a remote debug connection, you need to specify what.*serial.*device is attached to the remote system.*.e.g. .*$gdb_prompt $"\
-			{ pass "target remote" }
-	-re ".*A program is being debugged already.  Kill it. .y or n.*$" {
-	    send_gdb "n\n"
-	    if $verbose>1 then {
-		send_user "\t\tDidn't kill program being debugged\n"
-	    }
-	    gdb_expect -re "$gdb_prompt $" { }
-	    pass "target remote"
+send_gdb "target remote\n"
+gdb_expect {
+    -re "To open a remote debug connection, you need to specify what.*serial.*device is attached to the remote system.*.e.g. .*$gdb_prompt $"\
+	{ pass "target remote" }
+    -re ".*A program is being debugged already.  Kill it. .y or n.*$" {
+	send_gdb "n\n"
+	if $verbose>1 then {
+	    send_user "\t\tDidn't kill program being debugged\n"
 	}
-	-re ".*$gdb_prompt $"	{ fail "target remote" }
-	timeout		{ fail "(timeout) target remote" }
+	gdb_expect -re "$gdb_prompt $" { }
+	pass "target remote"
     }
+    -re ".*$gdb_prompt $"	{ fail "target remote" }
+    timeout		{ fail "(timeout) target remote" }
 }
 
 #test target
@@ -803,8 +799,6 @@ gdb_test "thread apply" "Please specify 
 gdb_test "thread find" "Command requires an argument." "thread find"
 #test thread name
 gdb_test "thread name" "No thread selected" "thread name"
-#test tty
-gdb_test "tty" "Argument required .filename to set it to\..*" "tty"
 #test until "u" abbreviation
 gdb_test "u" "The program is not being run." "until \"u\" abbreviation"
 #test until
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/define.exp ./gdb/testsuite/gdb.base/define.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/define.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/define.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
     return -1
 }
@@ -147,6 +147,38 @@ gdb_test_multiple "define ifnospace" "de
 
 gdb_test "ifnospace" ".*hi there.*" "test ifnospace is parsed correctly"
 
+# Verify that the command parser properly handles command abbreviations.
+with_test_prefix "command abbreviations in define" {
+  set test "define user command: breakmain"
+  gdb_test_multiple "define breakmain" "$test" {
+      -re "Type commands for definition of \"breakmain\".\r\nEnd with a line saying just \"end\".\r\n>$" {
+	  pass "$test"
+	  set test "send body of breakmain"
+	  gdb_test_multiple "break main\ncommand\necho\nend\nend" "$test"  {
+	      -re "$gdb_prompt $"\
+		  {pass "$test"}
+	  }
+      }
+  }
+
+  gdb_test "breakmain" ".*Breakpoint .*" "run user command"
+
+  # If GDB fails to interpret properly the abbrev "command", the last "end"
+  # will be missing.  Issue it to avoid a desync that would break the other
+  # tests in this file.
+  gdb_test "end" \
+    "This command cannot be used at the top level.*" \
+    "additional end command"
+
+  gdb_test "info break \$bpnum" \
+    [multi_line \
+      "Num     Type\[ \]+Disp Enb Address\[ \]+What.*" \
+      "\[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*" \
+      "\[\t \]+echo.*"] \
+    "info break shows echo command"
+}
+
+
 # Verify that the command parser doesn't require a space after an 'while'
 # command in a user defined function.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/del.c ./gdb/testsuite/gdb.base/del.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/del.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/del.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/del.exp ./gdb/testsuite/gdb.base/del.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/del.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/del.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -33,7 +32,7 @@ proc test_delete_alias { alias } {
     # First of all, remove all previous breakpoints if there were any,
     # and then verify that we do not have any breakpoint lying around.
     gdb_test_no_output "delete" \
-             "Remove all breakpoints ($alias)"
+             "remove all breakpoints ($alias)"
 
     gdb_test "info break" \
              "No breakpoints or watchpoints." \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/detach.exp ./gdb/testsuite/gdb.base/detach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/detach.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/detach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2003-2015 Free Software Foundation, Inc.
+#   Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,16 +22,11 @@ if { ! [istarget "*-*-linux*"] } {
   return 0
 }
 
-# Are we on a target board?
-if [is_remote target] then {
-    return 0
-}
-
 standard_testfile attach.c
 set escapedbinfile  [string_to_regexp ${binfile}]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested detach.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-exprs.exp ./gdb/testsuite/gdb.base/dfp-exprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-exprs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dfp-exprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-test.c ./gdb/testsuite/gdb.base/dfp-test.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-test.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dfp-test.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-test.exp ./gdb/testsuite/gdb.base/dfp-test.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dfp-test.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dfp-test.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -223,17 +223,17 @@ gdb_test "backtrace" ".*arg0_128 \\(arg0
 
 # Test calling inferior function with DFP arguments or return value.
 
-gdb_test "call arg0_32 (1.2df, 2.2df, 3.2df, 4.2df, 5.2df, 6.2df)" "Breakpoint.*arg0_32.*" "Call function with correct _Decimal32 arguments."
-gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_32 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "Backtrace function with correct _Decimal32 arguments."
-gdb_test "finish" " = 1.2" "Correct _Decimal32 return value from called function."
-
-gdb_test "call arg0_64 (1.2dd, 2.2dd, 3.2dd, 4.2dd, 5.2dd, 6.2dd)" "Breakpoint.*arg0_64.*" "Call function with correct _Decimal64 arguments."
-gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_64 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "Backtrace function with correct _Decimal64 arguments."
-gdb_test "finish" " = 1.2" "Correct _Decimal64 return value from called function."
-
-gdb_test "call arg0_128 (1.2dl, 2.2dl, 3.2dl, 4.2dl, 5.2dl, 6.2dl)" "Breakpoint.*arg0_128.*" "Call function with correct _Decimal128 arguments."
-gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_128 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "Backtrace function with correct _Decimal128 arguments."
-gdb_test "finish" " = 1.2" "Correct _Decimal128 return value from called function."
+gdb_test "call arg0_32 (1.2df, 2.2df, 3.2df, 4.2df, 5.2df, 6.2df)" "Breakpoint.*arg0_32.*" "call function with correct _Decimal32 arguments."
+gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_32 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal32 arguments."
+gdb_test "finish" " = 1.2" "correct _Decimal32 return value from called function."
+
+gdb_test "call arg0_64 (1.2dd, 2.2dd, 3.2dd, 4.2dd, 5.2dd, 6.2dd)" "Breakpoint.*arg0_64.*" "call function with correct _Decimal64 arguments."
+gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_64 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal64 arguments."
+gdb_test "finish" " = 1.2" "correct _Decimal64 return value from called function."
+
+gdb_test "call arg0_128 (1.2dl, 2.2dl, 3.2dl, 4.2dl, 5.2dl, 6.2dl)" "Breakpoint.*arg0_128.*" "call function with correct _Decimal128 arguments."
+gdb_test "backtrace 1" "\n#\[0-9\]+  arg0_128 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal128 arguments."
+gdb_test "finish" " = 1.2" "correct _Decimal128 return value from called function."
 
 gdb_test "call decimal_dec128_align (double_val1, dec128_val2, double_val3, double_val4, double_val5, double_val6, double_val7, double_val8, double_val9, double_val10, double_val11, double_val12, double_val13, double_val14)" " = 1" \
   "Call function with mixed decimal float arguments TEST."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disabled-location.c ./gdb/testsuite/gdb.base/disabled-location.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disabled-location.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disabled-location.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disabled-location.exp ./gdb/testsuite/gdb.base/disabled-location.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disabled-location.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disabled-location.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu-1.c ./gdb/testsuite/gdb.base/disasm-end-cu-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu-1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-end-cu-1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu-2.c ./gdb/testsuite/gdb.base/disasm-end-cu-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu-2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-end-cu-2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu.exp ./gdb/testsuite/gdb.base/disasm-end-cu.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-end-cu.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-end-cu.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # units displaying source lines.  This checks that the disassemble routine
 # can handle our use of line number 0 to mark the end of sequence.
 
-if { [prepare_for_testing disasm-end-cu.exp "disasm-end-cu" {disasm-end-cu-1.c disasm-end-cu-2.c} {debug}] } {
+if { [prepare_for_testing "failed to prepare" "disasm-end-cu" {disasm-end-cu-1.c disasm-end-cu-2.c} {debug}] } {
     return -1
 }
 
@@ -29,21 +29,21 @@ set main_addr [get_hexadecimal_valueof "
 set dummy_3_addr [get_hexadecimal_valueof "&dummy_3" "0"]
 
 if {$main_addr == 0 || $dummy_3_addr == 0 || $dummy_3_addr <= $main_addr} {
-    fail "Unable to extract required addresses, or addresses out of order"
+    fail "unable to extract required addresses, or addresses out of order"
     return -1
 }
 
-gdb_test_multiple "disassemble /m ${main_addr},${dummy_3_addr}" "Disassemble address range with source" {
+gdb_test_multiple "disassemble /m ${main_addr},${dummy_3_addr}" "disassemble address range with source" {
     -re "Dump of assembler code from ${main_addr} to ${dummy_3_addr}:\r\nEnd of assembler dump\." {
-        fail "No output from the disassemble command"
+        fail "no output from the disassemble command"
     }
     -re "Line number 0 out of range;.* has $decimal lines\." {
-        fail "The disassemble command failed"
+        fail "the disassemble command failed"
     }
     -re "Dump of assembler code from ${main_addr} to ${dummy_3_addr}:\r\n.*main.*End of assembler dump\." {
         pass "disassemble command returned some output"
     }
     -re ".*$gdb_prompt $" {
-        fail "Unexpected output from disassemble command"
+        fail "unexpected output from disassemble command"
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.c ./gdb/testsuite/gdb.base/disasm-optim.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-optim.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "disasm-optim.h"
+
+volatile int x, y;
+
+int
+main ()
+{
+  x = foo (y);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.exp ./gdb/testsuite/gdb.base/disasm-optim.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-optim.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test exercises disassemble /s with optimized and inlined code.
+
+if { ![istarget "x86_64-*-linux*"] } {
+    continue
+}
+
+standard_testfile .S
+
+if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.S {nodebug}] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+gdb_test_sequence "disassemble /s main" \
+    "Disassemble main with source" {
+	"Dump of assembler code for function main:"
+	"disasm-optim\\.c:\r\n24"
+	"disasm-optim\\.h:\r\n21"
+	"disasm-optim\\.c:\r\n25"
+	"disasm-optim\\.h:\r\n22"
+	"End of assembler dump\\."
+    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.h ./gdb/testsuite/gdb.base/disasm-optim.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-optim.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern inline int
+foo (int a)
+{
+  if (a < 0)
+    return a * 2;
+  if (a == 0)
+    return 1;
+  return a + 10;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.S ./gdb/testsuite/gdb.base/disasm-optim.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disasm-optim.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disasm-optim.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,352 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   This file was created with gcc -O2 -g -S -fverbose-asm -dA disasm-optim.c
+   and then cleaning up the output.  */
+
+	.file	"disasm-optim.c"
+
+	.text
+	.p2align 4,,15
+	.globl	main
+	.type	main, @function
+main:
+.LFB1:
+	.file 1 "disasm-optim.c"
+	# disasm-optim.c:24
+	.loc 1 24 0
+	.cfi_startproc
+	# disasm-optim.c:25
+	.loc 1 25 0
+	movl	y(%rip), %eax
+.LVL0:
+.LBB4:
+.LBB5:
+	.file 2 "disasm-optim.h"
+	# disasm-optim.h:21
+	.loc 2 21 0
+	testl	%eax, %eax
+	js	.L6
+	# disasm-optim.h:25
+	.loc 2 25 0
+	leal	10(%rax), %edx
+	testl	%eax, %eax
+	movl	$1, %eax
+.LVL1:
+	cmovne	%edx, %eax
+.LVL2:
+.L3:
+.LBE5:
+.LBE4:
+	# disasm-optim.c:25
+	.loc 1 25 0
+	movl	%eax, x(%rip)
+	# disasm-optim.c:27
+	.loc 1 27 0
+	xorl	%eax, %eax
+	ret
+.LVL3:
+.L6:
+.LBB7:
+.LBB6:
+	# disasm-optim.h:22
+	.loc 2 22 0
+	addl	%eax, %eax
+.LVL4:
+	jmp	.L3
+.LBE6:
+.LBE7:
+	.cfi_endproc
+.LFE1:
+	.size	main, .-main
+	.comm	y,4,4
+	.comm	x,4,4
+	.text
+.Letext0:
+	.section	.debug_info,"",@progbits
+.Ldebug_info0:
+	.long	0xb1	# Length of Compilation Unit Info
+	.value	0x4	# DWARF version number
+	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
+	.byte	0x8	# Pointer Size (in bytes)
+	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
+	.long	.LASF0	# DW_AT_producer: "GNU C 4.9.2 20150212 (Red Hat 4.9.2-6) -mtune=generic -march=x86-64 -g -O2"
+	.byte	0x1	# DW_AT_language
+	.long	.LASF1	# DW_AT_name: "disasm-optim.c"
+	.long	.LASF2	# DW_AT_comp_dir: "/main/disassemble3/gdb/testsuite/gdb.base"
+	.long	.Ldebug_ranges0+0x30	# DW_AT_ranges
+	.quad	0	# DW_AT_low_pc
+	.long	.Ldebug_line0	# DW_AT_stmt_list
+	.uleb128 0x2	# (DIE (0x29) DW_TAG_subprogram)
+			# DW_AT_external
+	.ascii "foo\0"	# DW_AT_name
+	.byte	0x2	# DW_AT_decl_file (disasm-optim.h)
+	.byte	0x13	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x43	# DW_AT_type
+	.byte	0x3	# DW_AT_inline
+	.long	0x43	# DW_AT_sibling
+	.uleb128 0x3	# (DIE (0x39) DW_TAG_formal_parameter)
+	.ascii "a\0"	# DW_AT_name
+	.byte	0x2	# DW_AT_decl_file (disasm-optim.h)
+	.byte	0x13	# DW_AT_decl_line
+	.long	0x43	# DW_AT_type
+	.byte	0	# end of children of DIE 0x29
+	.uleb128 0x4	# (DIE (0x43) DW_TAG_base_type)
+	.byte	0x4	# DW_AT_byte_size
+	.byte	0x5	# DW_AT_encoding
+	.ascii "int\0"	# DW_AT_name
+	.uleb128 0x5	# (DIE (0x4a) DW_TAG_subprogram)
+			# DW_AT_external
+	.long	.LASF3	# DW_AT_name: "main"
+	.byte	0x1	# DW_AT_decl_file (disasm-optim.c)
+	.byte	0x17	# DW_AT_decl_line
+	.long	0x43	# DW_AT_type
+	.quad	.LFB1	# DW_AT_low_pc
+	.quad	.LFE1-.LFB1	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x89	# DW_AT_sibling
+	.uleb128 0x6	# (DIE (0x6b) DW_TAG_inlined_subroutine)
+	.long	0x29	# DW_AT_abstract_origin
+	.quad	.LBB4	# DW_AT_entry_pc
+	.long	.Ldebug_ranges0+0	# DW_AT_ranges
+	.byte	0x1	# DW_AT_call_file (disasm-optim.c)
+	.byte	0x19	# DW_AT_call_line
+	.uleb128 0x7	# (DIE (0x7e) DW_TAG_formal_parameter)
+	.long	0x39	# DW_AT_abstract_origin
+	.long	.LLST0	# DW_AT_location
+	.byte	0	# end of children of DIE 0x6b
+	.byte	0	# end of children of DIE 0x4a
+	.uleb128 0x8	# (DIE (0x89) DW_TAG_variable)
+	.ascii "x\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (disasm-optim.c)
+	.byte	0x14	# DW_AT_decl_line
+	.long	0x9c	# DW_AT_type
+			# DW_AT_external
+	.uleb128 0x9	# DW_AT_location
+	.byte	0x3	# DW_OP_addr
+	.quad	x
+	.uleb128 0x9	# (DIE (0x9c) DW_TAG_volatile_type)
+	.long	0x43	# DW_AT_type
+	.uleb128 0x8	# (DIE (0xa1) DW_TAG_variable)
+	.ascii "y\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (disasm-optim.c)
+	.byte	0x14	# DW_AT_decl_line
+	.long	0x9c	# DW_AT_type
+			# DW_AT_external
+	.uleb128 0x9	# DW_AT_location
+	.byte	0x3	# DW_OP_addr
+	.quad	y
+	.byte	0	# end of children of DIE 0xb
+	.section	.debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+	.uleb128 0x1	# (abbrev code)
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x25	# (DW_AT_producer)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x13	# (DW_AT_language)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x1b	# (DW_AT_comp_dir)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x55	# (DW_AT_ranges)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x10	# (DW_AT_stmt_list)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x2	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x20	# (DW_AT_inline)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x3	# (abbrev code)
+	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x4	# (abbrev code)
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3e	# (DW_AT_encoding)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.byte	0
+	.byte	0
+	.uleb128 0x5	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x6	# (abbrev code)
+	.uleb128 0x1d	# (TAG: DW_TAG_inlined_subroutine)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x52	# (DW_AT_entry_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x55	# (DW_AT_ranges)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x58	# (DW_AT_call_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x59	# (DW_AT_call_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.byte	0
+	.byte	0
+	.uleb128 0x7	# (abbrev code)
+	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
+	.byte	0	# DW_children_no
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x8	# (abbrev code)
+	.uleb128 0x34	# (TAG: DW_TAG_variable)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.byte	0
+	.byte	0
+	.uleb128 0x9	# (abbrev code)
+	.uleb128 0x35	# (TAG: DW_TAG_volatile_type)
+	.byte	0	# DW_children_no
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.byte	0
+	.section	.debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+	.quad	.LVL0	# Location list begin address (*.LLST0)
+	.quad	.LVL1	# Location list end address (*.LLST0)
+	.value	0x1	# Location expression size
+	.byte	0x50	# DW_OP_reg0
+	.quad	.LVL1	# Location list begin address (*.LLST0)
+	.quad	.LVL2	# Location list end address (*.LLST0)
+	.value	0x3	# Location expression size
+	.byte	0x71	# DW_OP_breg1
+	.sleb128 -10
+	.byte	0x9f	# DW_OP_stack_value
+	.quad	.LVL3	# Location list begin address (*.LLST0)
+	.quad	.LVL4	# Location list end address (*.LLST0)
+	.value	0x1	# Location expression size
+	.byte	0x50	# DW_OP_reg0
+	.quad	0	# Location list terminator begin (*.LLST0)
+	.quad	0	# Location list terminator end (*.LLST0)
+	.section	.debug_aranges,"",@progbits
+	.long	0x2c	# Length of Address Ranges Info
+	.value	0x2	# DWARF Version
+	.long	.Ldebug_info0	# Offset of Compilation Unit Info
+	.byte	0x8	# Size of Address
+	.byte	0	# Size of Segment Descriptor
+	.value	0	# Pad to 16 byte boundary
+	.value	0
+	.quad	.LFB1	# Address
+	.quad	.LFE1-.LFB1	# Length
+	.quad	0
+	.quad	0
+	.section	.debug_ranges,"",@progbits
+.Ldebug_ranges0:
+	.quad	.LBB4	# Offset 0
+	.quad	.LBE4
+	.quad	.LBB7
+	.quad	.LBE7
+	.quad	0
+	.quad	0
+	.quad	.LFB1	# Offset 0x30
+	.quad	.LFE1
+	.quad	0
+	.quad	0
+	.section	.debug_line,"",@progbits
+.Ldebug_line0:
+	.section	.debug_str,"MS",@progbits,1
+.LASF2:
+	.string	"/main/disassemble3/gdb/testsuite/gdb.base"
+.LASF1:
+	.string	"disasm-optim.c"
+.LASF3:
+	.string	"main"
+.LASF0:
+	.string	"GNU C 4.9.2 20150212 (Red Hat 4.9.2-6) -mtune=generic -march=x86-64 -g -O2"
+	.ident	"GCC: (GNU) 4.9.2 20150212 (Red Hat 4.9.2-6)"
+	.section	.note.GNU-stack,"",@progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/display.exp ./gdb/testsuite/gdb.base/display.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/display.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/display.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,9 +18,8 @@
 #
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug nowarnings}]} {
-    untested display.exp
     return -1
 }
 
@@ -53,7 +52,7 @@ if !$use_gdb_stub {
 # Ok, on to real life
 #
 if ![runto_main] then {
-    fail "Could not run to main - other tests will fail."
+    fail "could not run to main - other tests will fail."
     continue
 }
 
@@ -83,8 +82,23 @@ gdb_test "disp/s &sum" ".*5: x/s &sum  $
 
 # Hit the displays
 #
-gdb_test "cont" ".*\[Ww\]atchpoint 3: sum.*\[1-9\]*: x/s &sum.*\[1-9\]*: /f f = 3.1415\r\n\[1-9\]*: x/i &k.*\r\n\[1-9\]*: /x j = 0x0\r\n\[1-9\]*: i = 0.*" "first disp"
-gdb_test "cont" ".*\[Ww\]atchpoint 3: sum.*\[1-9\]*: x/s &sum.*\[1-9\]*: /f f = 4.1415\r\n\[1-9\]*: x/i &k.*\r\n\[1-9\]*: /x j = 0x0.*\[1-9\]*: i = 0.*" "second disp"
+gdb_test "cont" [multi_line \
+		     ".*\[Ww\]atchpoint 3: sum.*" \
+		     "\[1-9\]*: i = 0.*" \
+		     "\[1-9\]*: /x j = 0x0" \
+		     "\[1-9\]*: x/i &k.*" \
+		     "\[1-9\]*: /f f = 3.1415" \
+		     "\[1-9\]*: x/s &sum.*" \
+		    ] "first disp"
+
+gdb_test "cont" [multi_line \
+		     ".*\[Ww\]atchpoint 3: sum.*" \
+		     "\[1-9\]*: i = 0.*" \
+		     "\[1-9\]*: /x j = 0x0.*" \
+		     "\[1-9\]*: x/i &k.*" \
+		     "\[1-9\]*: /f f = 4.1415" \
+		     "\[1-9\]*: x/s &sum.*" \
+		    ] "second disp"
 
 gdb_test "enab  disp 6" ".*No display number 6..*" "catch err"
 gdb_test_no_output "disab disp 1" "disab disp 1"
@@ -92,9 +106,19 @@ gdb_test_no_output "disab disp 2" "disab
 gdb_test_no_output "enab disp 1"  "re-enab"
 gdb_test_no_output "enab disp 1"  "re-enab of enab"
 gdb_test_no_output "undisp 5"     "undisp"
-gdb_test "info disp"    ".*Auto-display expressions now in effect.*y  /f f.*y  /1bi &k.*n  /x j.*y  i.*" "info disp"
-
-gdb_test "cont" ".*\[Ww\]atch.*5.1415.*.*i = 0.*" "next hit"
+gdb_test "info disp" [multi_line \
+			  "Auto-display expressions now in effect.*" \
+			  ".*y  i" \
+			  ".*n  /x j" \
+			  ".*y  /1bi &k" \
+			  ".*y  /f f" \
+			 ] "info disp"
+
+gdb_test "cont" [multi_line \
+		     ".*\[Ww\]atch.*" \
+		     ".*i = 0" \
+		     ".*5.1415" \
+		    ] "next hit"
 
 gdb_test "undisp" \
     "" \
@@ -169,15 +193,8 @@ gdb_test "print/r j" " = 0x0\[\\r\\n\]+"
 gdb_test "print j"   " = 0\[\\r\\n\]+"   "debug test output 3"
 
 # x/0 j doesn't produce any output and terminates PA64 process when testing
-if [istarget "hppa2.0w-hp-hpux11*"] {
-    xfail "'x/0 j' terminates PA64 process - skipped test point"
-} else {
-    gdb_test_no_output "x/0 j"
-}
-if [istarget "hppa*-hp-hpux*"] {
-    # on HP-UX you could access the first page without getting an error
-    gdb_test "x/rx j" ".*(Cannot access|Error accessing) memory.*|.*0xa:\[ \t\]*\[0-9\]+.*"
-}
+gdb_test_no_output "x/0 j"
+
 gdb_test "print/0 j" ".*Item count other than 1 is meaningless.*" "print/0 j"
 gdb_test "print/s sum" " = 1000" "ignored s"
 gdb_test "print/i sum" ".*Format letter.*is meaningless.*.*" "no i"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-fork.c ./gdb/testsuite/gdb.base/disp-step-fork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-fork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disp-step-fork.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,58 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2011-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <stdlib.h>
-#include <unistd.h>
-
-static void
-marker () {}
-
-int
-main (void)
-{
-  int  pid;
-
-  pid = fork ();
-  if (pid == 0) /* child */
-    {
-      exit (0); /* at exit */
-    }
-  else
-    {
-    }
-
-  pid = fork ();
-  if (pid == 0) /* child */
-    {
-      exit (0); /* at exit */
-    }
-  else
-    {
-    }
-
-  pid = fork ();
-  if (pid == 0) /* child */
-    {
-      exit (0); /* at exit */
-    }
-  else
-    {
-    }
-
-  marker ();
-
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-syscall.exp ./gdb/testsuite/gdb.base/disp-step-syscall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-syscall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disp-step-syscall.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,160 +0,0 @@
-# This testcase is part of GDB, the GNU debugger.
-
-# Copyright 2011-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-if { ![support_displaced_stepping] } {
-    unsupported "displaced stepping"
-    return -1
-}
-
-set syscall_insn ""
-
-# Define the syscall instruction for each target.
-
-if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
-    set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]"
-} elseif [istarget "arm*-*-linux*"] {
-    set syscall_insn "\[ \t\](swi|svc)\[ \t\]"
-} else {
-    return -1
-}
-
-proc disp_step_cross_syscall { syscall } {
-    with_test_prefix "$syscall" {
-	global syscall_insn
-	global gdb_prompt
-
-	set testfile "disp-step-$syscall"
-
-	if [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.c {debug}] {
-	    untested ${testfile}.exp
-	    return -1
-	}
-
-	if { ![runto main] } then {
-	    fail "run to main ($syscall)"
-	    return
-	}
-
-	set is_target_remote [gdb_is_target_remote]
-
-	# Delete the breakpoint on main.
-	gdb_test_no_output "delete break 1"
-
-	gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
-	gdb_test_no_output "set displaced-stepping off"
-
-	set syscall_bp 0
-	gdb_test_multiple "break $syscall"  "break $syscall" {
-	    -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
-		set syscall_bp $expect_out(1,string)
-		pass "break $syscall"
-	    }
-	}
-
-	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
-	    "continue to $syscall (1st time)"
-	# Hit the breakpoint on $syscall for the first time.  In this time, we will let PLT
-	# resolution done, and the number single steps we will do later will be
-	# reduced.
-
-	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
-	    "continue to $syscall (2nd time)"
-	# Hit the breakpoint on $syscall for the second time.  In this time, the address
-	# of syscall insn and next insn of syscall are recorded.
-
-	gdb_test "display/i \$pc" ".*"
-
-
-	# Single step until we see a syscall insn or we reach the
-	# upper bound of loop iterations.
-	set msg "find syscall insn in $syscall"
-	set steps 0
-	set max_steps 1000
-	gdb_test_multiple "stepi" $msg {
-	    -re ".*$syscall_insn.*$gdb_prompt $" {
-		pass $msg
-	    }
-	    -re "x/i .*=>.*\r\n$gdb_prompt $" {
-		incr steps
-		if {$steps == $max_steps} {
-		    fail $msg
-		} else {
-		    send_gdb "stepi\n"
-		    exp_continue
-		}
-	    }
-	}
-
-	if {$steps == $max_steps} {
-	    return -1
-	}
-
-	set syscall_insn_addr [get_hexadecimal_valueof "\$pc" "0"]
-	if {[gdb_test "stepi" "x/i .*=>.*" "stepi $syscall insn"] != 0} {
-	    return -1
-	}
-	set syscall_insn_next_addr [get_hexadecimal_valueof "\$pc" "0"]
-
-	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
-	    "continue to $syscall (3rd time)"
-
-	# Hit the breakpoint on $syscall for the third time.  In this time, we'll set
-	# breakpoint on the syscall insn we recorded previously, and single step over it.
-
-	set syscall_insn_bp 0
-	gdb_test_multiple "break \*$syscall_insn_addr"  "break on syscall insn" {
-	    -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
-		set syscall_insn_bp $expect_out(1,string)
-		pass "break on syscall insns"
-	    }
-	}
-	gdb_test_no_output "delete $syscall_bp" "delete break $syscall"
-
-	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
-	    "continue to syscall insn $syscall"
-
-	gdb_test_no_output "set displaced-stepping on"
-
-	# Check the address of next instruction of syscall.
-	if {$syscall == "vfork" && $is_target_remote} {
-	    setup_kfail server/13796 "*-*-*"
-	}
-
-	if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} {
-	    return -1
-	}
-
-	set syscall_insn_next_addr_found [get_hexadecimal_valueof "\$pc" "0"]
-
-	set test "single step over $syscall final pc"
-	if {$syscall_insn_next_addr != 0
-	    && $syscall_insn_next_addr == $syscall_insn_next_addr_found} {
-	    pass $test
-	} else {
-	    fail $test
-	}
-
-	# Delete breakpoint syscall insns to avoid interference to other syscalls.
-	gdb_test_no_output "delete $syscall_insn_bp" "delete break $syscall insn"
-
-	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
-	    "continue to marker ($syscall)"
-    }
-}
-
-disp_step_cross_syscall "fork"
-disp_step_cross_syscall "vfork"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-vfork.c ./gdb/testsuite/gdb.base/disp-step-vfork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/disp-step-vfork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/disp-step-vfork.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,70 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2011-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <unistd.h>
-
-static void
-marker () {}
-
-int
-main (void)
-{
-  int pid;
-
-  pid = vfork ();
-  if (pid == -1)
-    {
-      return 1;
-    }
-  else if (pid != 0)
-    {
-    }
-  else
-    {
-      _exit (0);
-    }
-
-  pid = vfork ();
-  if (pid == -1)
-    {
-      return 1;
-    }
-  else if (pid != 0)
-    {
-    }
-  else
-    {
-      _exit (0);
-    }
-
-  pid = vfork ();
-  if (pid == -1)
-    {
-      return 1;
-    }
-  else if (pid != 0)
-    {
-    }
-  else
-    {
-      _exit (0);
-    }
-
-  marker ();
-  return 0;
-
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym.c ./gdb/testsuite/gdb.base/dmsym.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dmsym.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym.exp ./gdb/testsuite/gdb.base/dmsym.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dmsym.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ set dmsym_o [standard_output_file dmsym.
 if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
                  $dmsym_o \
                  object {}] != ""} {
-  untested dmsym.exp
+  untested "failed to compile object file"
   return -1
 }
 
@@ -34,7 +34,7 @@ if {[gdb_compile \
       [list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
       [standard_output_file ${testfile}] \
       executable {debug}] != ""} {
-    untested dmsym.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -80,7 +80,7 @@ gdb_breakpoint dmsym_main.c:[gdb_get_lin
 gdb_run_cmd
 gdb_test "" \
          "Breakpoint $num, pck__foo__bar__minsym__2 \\(\\) at.*" \
-         "Run until breakpoint at BREAK"
+         "run until breakpoint at BREAK"
 
 gdb_test "continue" \
          "Breakpoint $num, main \\(\\) at.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym_main.c ./gdb/testsuite/gdb.base/dmsym_main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dmsym_main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dmsym_main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/double-prompt-target-event-error.c ./gdb/testsuite/gdb.base/double-prompt-target-event-error.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/double-prompt-target-event-error.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/double-prompt-target-event-error.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp ./gdb/testsuite/gdb.base/double-prompt-target-event-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/double-prompt-target-event-error.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/double-prompt-target-event-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping double-prompt-target-event-error.exp because of nointerrupts."
+    return
+}
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
@@ -36,7 +41,7 @@ proc cancel_pagination_in_target_event {
 	clean_restart $binfile
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-bp-same-addr.c ./gdb/testsuite/gdb.base/dprintf-bp-same-addr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-bp-same-addr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-bp-same-addr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp ./gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -31,7 +31,7 @@ proc test { style } {
 	clean_restart $binfile
 
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf.c ./gdb/testsuite/gdb.base/dprintf.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
 
 #include <stdio.h>
 
+#include "../lib/unbuffer_output.c"
+
 static int g;
 
 void
@@ -32,6 +34,8 @@ main (int argc, char *argv[])
 {
   int loc = 1234;
 
+  gdb_unbuffer_output ();
+
   /* Ensure these functions are available.  */
   printf ("kickoff %d\n", loc);
   fprintf (stderr, "also to stderr %d\n", loc);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-detach.c ./gdb/testsuite/gdb.base/dprintf-detach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-detach.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-detach.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-detach.exp ./gdb/testsuite/gdb.base/dprintf-detach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-detach.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-detach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2014-2015 Free Software Foundation, Inc.
+#   Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ proc dprintf_detach_test { breakpoint_al
 	gdb_test_no_output "set disconnected-dprintf ${disconnected_dprintf}"
 
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf.exp ./gdb/testsuite/gdb.base/dprintf.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,13 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+standard_testfile
 
-if { [prepare_for_testing dprintf.exp "dprintf" {} {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
-set srcfile dprintf.c
-
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set dp_location1 [gdb_get_line_number "set dprintf 1 here"]
 
@@ -65,65 +64,108 @@ gdb_test "continue" "arg=1234, g=1234.*"
 
 gdb_test "continue" "At foo entry.*arg=1235, g=2222.*" "2nd dprintf, gdb"
 
-# The "call" style depends on having I/O functions available, so test.
+# Restart GDB and set set up for testing.
 
-if ![target_info exists gdb,noinferiorio] {
+proc restart {} {
+    global binfile
+    global bp_location1 dp_location1
 
-    # Now switch styles and rerun; in the absence of redirection the
-    # output should be the same.
+    clean_restart $binfile
 
-    gdb_test_no_output "set dprintf-style call" "Set dprintf style to call"
+    if ![runto main] {
+	return -1
+    }
 
-    gdb_run_cmd
+    gdb_test "dprintf foo,\"At foo entry\\n\"" \
+	"Dprintf .*"
 
-    gdb_test "" "Breakpoint"
+    gdb_test "dprintf $dp_location1,\"arg=%d, g=%d\\n\", arg, g" \
+	"Dprintf .*"
 
-    gdb_test "continue" "At foo entry.*arg=1234, g=1234.*" "1st dprintf, call"
+    gdb_test "break $bp_location1" "Breakpoint .*"
+}
 
-    gdb_test "continue" "At foo entry.*arg=1235, g=2222.*" "2nd dprintf, call"
+# Test continuing across a dprintf.  PATTERN matches the output
+# generated by the dprintf.  MSG is used as test message.
 
-    gdb_test_no_output "set dprintf-function fprintf" "Set dprintf function"
-    gdb_test_no_output "set dprintf-channel stderr" "Set dprintf channel"
+proc test_dprintf {pattern msg} {
+    gdb_test_stdio "continue" $pattern "" "$msg"
+}
 
-    gdb_run_cmd
+# Test the "call" style.
 
-    gdb_test "" "Breakpoint"
+proc test_call {} {
+    global binfile
+    global bp_location1
 
-    gdb_test "continue" "At foo entry.*arg=1234, g=1234.*" \
-	"1st dprintf, fprintf"
+    # Now switch styles and rerun; in the absence of redirection the
+    # output should be the same.
 
-    gdb_test "continue" "At foo entry.*arg=1235, g=2222.*" \
-	"2nd dprintf, fprintf"
-}
+    with_test_prefix "printf" {
+	restart
 
-# Now test the "agent" style.
+	gdb_test_no_output "set dprintf-style call" "set dprintf style to call"
 
-set target_can_dprintf 1
-set msg "set dprintf style to agent"
-gdb_test_multiple "set dprintf-style agent" $msg {
-    -re "warning: Target cannot run dprintf commands.*\r\n$gdb_prompt $" {
+	test_dprintf "At foo entry.*arg=1234, g=1234\r\n" "1st dprintf"
 
-	# The target reports that it doesn't support target side
-	# commands at all.
-	set target_can_dprintf 0
-	unsupported "$msg"
+	test_dprintf "At foo entry.*arg=1235, g=2222\r\n" "2nd dprintf"
     }
-    -re ".*$gdb_prompt $" {
-	pass "$msg"
+
+    with_test_prefix "fprintf" {
+	restart
+
+	gdb_test_no_output "set dprintf-function fprintf" "set dprintf function"
+	gdb_test_no_output "set dprintf-channel stderr" "set dprintf channel"
+
+	gdb_test_no_output "set dprintf-style call" "set dprintf style to call"
+
+	test_dprintf "At foo entry.*arg=1234, g=1234\r\n" "1st dprintf"
+
+	test_dprintf "At foo entry.*arg=1235, g=2222\r\n" "2nd dprintf"
+    }
+}
+
+# The "call" style depends on having I/O functions available.
+
+if ![target_info exists gdb,noinferiorio] {
+    with_test_prefix "call" {
+	test_call
     }
 }
 
-if $target_can_dprintf {
-    gdb_run_cmd
+# Test the "agent" style.
 
-    gdb_test "" "Breakpoint"
+proc test_agent {} {
+    global binfile
+    global gdb_prompt
+
+    restart
+
+    set target_can_dprintf 1
+    set msg "set dprintf style to agent"
+    gdb_test_multiple "set dprintf-style agent" $msg {
+	-re "warning: Target cannot run dprintf commands.*\r\n$gdb_prompt $" {
+
+	    # The target reports that it doesn't support target side
+	    # commands at all.
+	    set target_can_dprintf 0
+	    unsupported "$msg"
+	}
+	-re ".*$gdb_prompt $" {
+	    pass "$msg"
+	}
+    }
+
+    if !$target_can_dprintf {
+	return
+    }
 
     # Even if the the target reports that it does support target side
     # commands, we can only tell that it supports them in combination
     # with a particular breakpoint type (Z0, Z1, etc.) when we try to
     # insert the breakpoint.  When "set breakpoint always-inserted is
     # off", that'll be on next continue.
-    set msg "1st dprintf, agent"
+    set msg "1st dprintf"
     gdb_test_multiple "continue" $msg {
 	-re "Warning:.*Target doesn't support breakpoints that have target side commands.*\r\n$gdb_prompt $" {
 	    set target_can_dprintf 0
@@ -135,22 +177,26 @@ if $target_can_dprintf {
     }
 
     if $target_can_dprintf {
-	gdb_test "continue" "Breakpoint \[0-9\]+, foo .*" "2nd dprintf, agent"
+	gdb_test "continue" "Breakpoint \[0-9\]+, foo .*" "2nd dprintf"
 
-	gdb_test_sequence "info breakpoints" "dprintf info 2" {
+	gdb_test_sequence "info breakpoints" "dprintf info" {
 	    "\[\r\n\]Num     Type           Disp Enb Address +What"
-	    "\[\r\n\]2       breakpoint"
-	    "\[\r\n\]\tbreakpoint already hit 2 times"
-	    "\[\r\n\]3       dprintf"
-	    "\[\r\n\]\tbreakpoint already hit 2 times"
+	    "\[\r\n\]1       breakpoint"
+	    "\[\r\n\]\tbreakpoint already hit 1 time"
+	    "\[\r\n\]2       dprintf"
 	    "\[\r\n\]        agent-printf \"At foo entry\\\\n\""
-	    "\[\r\n\]4       dprintf"
-	    "\[\r\n\]\tbreakpoint already hit 2 times"
+	    "\[\r\n\]3       dprintf"
 	    "\[\r\n\]        agent-printf \"arg=%d, g=%d\\\\n\", arg, g"
+	    "\[\r\n\]4       breakpoint"
+	    "\[\r\n\]\tbreakpoint already hit 2 times"
 	}
     }
 }
 
+with_test_prefix "agent" {
+    test_agent
+}
+
 gdb_test "set dprintf-style foobar" "Undefined item: \"foobar\"." \
     "Set dprintf style to an unrecognized type"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-next.c ./gdb/testsuite/gdb.base/dprintf-next.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-next.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-next.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-next.exp ./gdb/testsuite/gdb.base/dprintf-next.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-next.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-next.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -25,7 +25,7 @@ if [prepare_for_testing "failed to prepa
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-non-stop.c ./gdb/testsuite/gdb.base/dprintf-non-stop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-non-stop.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-non-stop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-non-stop.exp ./gdb/testsuite/gdb.base/dprintf-non-stop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-non-stop.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-non-stop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,21 +15,25 @@
 
 if [is_remote target] then {
     # Testing with remote/non-stop is racy at the moment.
-    unsupported "Testing dprintf with remote/non-stop is not supported."
+    unsupported "testing dprintf with remote/non-stop is not supported."
     return 0
 }
 
 standard_testfile
+set executable ${testfile}
 
-if [prepare_for_testing "failed to prepare for dprintf with non-stop" \
+if [build_executable "failed to prepare for dprintf with non-stop" \
     ${testfile} ${srcfile} {debug}] {
     return -1
 }
 
-gdb_test_no_output "set non-stop on"
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+    clean_restart ${executable}
+}
 
 if ![runto main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
@@ -60,7 +64,7 @@ gdb_test_multiple $test $test {
 
 set test "inferior stopped"
 gdb_test_multiple "" $test {
-    -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" {
+    -re "Program stopped\\\.\r\n" {
 	pass $test
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pending.c ./gdb/testsuite/gdb.base/dprintf-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pending.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-pending.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pending.exp ./gdb/testsuite/gdb.base/dprintf-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pending.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-pending.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2013-2015 Free Software Foundation, Inc.
+#   Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if { [get_compiler_info] } {
 
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
+    untested "failed to compile shared library"
     return -1
 }
 
@@ -41,14 +41,8 @@ with_test_prefix "without format" {
     gdb_start
     gdb_reinitialize_dir $srcdir/$subdir
 
-    gdb_test \
-	"dprintf pendfunc" \
-	"Dprintf.*pendfunc.*pending." \
-	"set pending dprintf" \
-	".*Make dprintf pending.*y or \\\[n\\\]. $" \
-	"y"
-
-    gdb_test "file ${binfile}" ".*Error in re-setting breakpoint.*" "resolved dprintf fails to be re-set"
+    gdb_test "dprintf pendfunc" "Format string required" "missing ,FMT"
+    gdb_test "dprintf pendfunc," "Format string required" "missing FMT"
 }
 
 with_test_prefix "without symbols" {
@@ -69,7 +63,7 @@ with_test_prefix "without symbols" {
 	"single pending dprintf info"
 
     gdb_load ${binfile}
-    gdb_load_shlibs $lib_sl
+    gdb_load_shlib $lib_sl
 
     gdb_run_cmd
 
@@ -77,7 +71,7 @@ with_test_prefix "without symbols" {
 }
 
 clean_restart ${binfile}
-gdb_load_shlibs $lib_sl
+gdb_load_shlib $lib_sl
 
 #
 # Test setting, querying, and modifying pending breakpoints
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pendshr.c ./gdb/testsuite/gdb.base/dprintf-pendshr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dprintf-pendshr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dprintf-pendshr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso.c ./gdb/testsuite/gdb.base/dso2dso.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "dso2dso-dso1.h"
+
+int
+main (void)
+{
+  int ignored = sub1 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso1.c ./gdb/testsuite/gdb.base/dso2dso-dso1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso1.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso-dso1.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "dso2dso-dso1.h"
+#include "dso2dso-dso2.h"
+
+int
+sub1 (void)
+{
+  sub2 ();  /* STOP HERE.  */
+  return 5;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso1.h ./gdb/testsuite/gdb.base/dso2dso-dso1.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso1.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso-dso1.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef DSO2DSO_DSO1_H
+#define DSO2DSO_DSO1_H
+
+extern int sub1 (void);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso2.c ./gdb/testsuite/gdb.base/dso2dso-dso2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso-dso2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "dso2dso-dso2.h"
+
+void
+sub2 (void)
+{
+  /* Do nothing.  */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso2.h ./gdb/testsuite/gdb.base/dso2dso-dso2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso-dso2.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso-dso2.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef DSO2DSO_DSO2_H
+#define DSO2DSO_DSO2_H
+
+extern void sub2 (void);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso.exp ./gdb/testsuite/gdb.base/dso2dso.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dso2dso.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dso2dso.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,75 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The purpose of this testcase is to verify that we can "next" over
+# a call to a function provided by one shared library made from another
+# shared library, and that GDB stops at the expected location. In this
+# case, the call is made from sub1 (provided by libdso1) and we are
+# calling sub2 (provided by libdso2).
+#
+# Note that, while this is not the main purpose of this testcase, it
+# also happens to exercise an issue with displaced stepping on amd64
+# when libdso1 is mapped at an address greater than 0xffffffff.
+
+if { [skip_shlib_tests] } {
+    return 0
+}
+
+standard_testfile
+
+set output_dir [standard_output_file {}]
+
+set libdso2 $testfile-dso2
+set srcfile_libdso2 $srcdir/$subdir/$libdso2.c
+set binfile_libdso2 [standard_output_file $libdso2.so]
+
+set libdso1 $testfile-dso1
+set srcfile_libdso1 $srcdir/$subdir/$libdso1.c
+set binfile_libdso1 [standard_output_file $libdso1.so]
+
+if { [gdb_compile_shlib $srcfile_libdso2 $binfile_libdso2 \
+	[list debug additional_flags=-fPIC]] != "" } {
+  untested "failed to compile shared library 2"
+  return -1
+}
+
+if { [gdb_compile_shlib $srcfile_libdso1 $binfile_libdso1 \
+	[list debug additional_flags=-fPIC]] != "" } {
+  untested "failed to compile shared library 1"
+  return -1
+}
+
+if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable \
+	[list debug shlib=$binfile_libdso2 shlib=$binfile_libdso1]] != "" } {
+  return -1
+}
+
+clean_restart $binfile
+gdb_load_shlib $binfile_libdso2
+gdb_load_shlib $binfile_libdso1
+
+if { ![runto_main] } {
+  return -1
+}
+
+set bp_location [gdb_get_line_number "STOP HERE" [file tail $srcfile_libdso1]]
+gdb_breakpoint ${libdso1}.c:${bp_location}
+
+gdb_continue_to_breakpoint "at call to sub2" \
+    ".*sub2 ().*"
+
+gdb_test "next" \
+    ".*return 5;.*" \
+    "next over call to sub2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.c ./gdb/testsuite/gdb.base/dtrace-probe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dtrace-probe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014, 2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.d ./gdb/testsuite/gdb.base/dtrace-probe.d
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.d	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dtrace-probe.d	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014, 2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.exp ./gdb/testsuite/gdb.base/dtrace-probe.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dtrace-probe.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dtrace-probe.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ proc dtrace_test {} {
     standard_testfile
     
     if {[dtrace_build_usdt_test_program] == -1} {
-        untested "could not compile test program"
+        untested "failed to compile"
         return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dump.exp ./gdb/testsuite/gdb.base/dump.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dump.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dump.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ if {[istarget "spu*-*-*"]} then {
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
-     untested dump.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -95,7 +95,7 @@ remote_exec host "rm -f $filenames"
 # Run target program until data structs are initialized.
 
 if { ! [ runto checkpoint1 ] } then {
-    untested dump.exp
+    untested "couldn't run to checkpoint"
     return -1
 }
 
@@ -152,10 +152,10 @@ make_dump_file "dump tekhex val [set int
 	"dump struct as value, tekhex"
 
 make_dump_file "dump verilog val [set intarr1.verilog] intarray" \
-	"dump array as value, intel hex"
+	"dump array as value, verilog"
 
 make_dump_file "dump verilog val [set intstr1.verilog] intstruct" \
-	"dump struct as value, intel hex"
+	"dump struct as value, verilog"
 
 proc capture_value { expression args } {
     global gdb_prompt
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/duplicate-bp.c ./gdb/testsuite/gdb.base/duplicate-bp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/duplicate-bp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/duplicate-bp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/duplicate-bp.exp ./gdb/testsuite/gdb.base/duplicate-bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/duplicate-bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/duplicate-bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dup-sect.exp ./gdb/testsuite/gdb.base/dup-sect.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dup-sect.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dup-sect.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dup-sect.S ./gdb/testsuite/gdb.base/dup-sect.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/dup-sect.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/dup-sect.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/echo.exp ./gdb/testsuite/gdb.base/echo.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/echo.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/echo.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@ gdb_start
 # test the echo command
 #
 
-gdb_test "echo Hello world!\\n" "Hello world!" "Echo test"
+gdb_test "echo Hello world!\\n" "Hello world!" "echo test"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/empty_exe.exp ./gdb/testsuite/gdb.base/empty_exe.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/empty_exe.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/empty_exe.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ena-dis-br.exp ./gdb/testsuite/gdb.base/ena-dis-br.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ena-dis-br.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ena-dis-br.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ending-run.c ./gdb/testsuite/gdb.base/ending-run.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ending-run.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ending-run.c	2017-03-06 01:49:07.000000000 +0000
@@ -4,6 +4,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "../lib/unbuffer_output.c"
+
 int callee (int x)
 {
     int y = x * x;		/* -break1- */
@@ -16,6 +18,8 @@ int main()
     int *p;
     int i;
 
+    gdb_unbuffer_output ();
+
     p = (int *) malloc( 4 );
 
     for (i = 1; i < 10; i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ending-run.exp ./gdb/testsuite/gdb.base/ending-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ending-run.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ending-run.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp $testfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile] } {
     return -1
 }
 remote_exec build "rm -f core"
@@ -74,8 +74,8 @@ gdb_test_multiple "info line ending-run.
     -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
         set line_nine $expect_out(1,string)
         gdb_test "b ending-run.c:$break1_line" ".*Breakpoint 6.*ending-run.c, line $break1_line.*"
-        gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 7.*" "Breakpoint 7 at *ending-run.c:$break1_line"
-        gdb_test "cle" ".*Deleted breakpoints 4 6 7.*" "Clear 2 by default"
+        gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 7.*" "breakpoint 7 at *ending-run.c:$break1_line"
+        gdb_test "cle" ".*Deleted breakpoints 4 6 7.*" "clear 2 by default"
     }
     -re ".*$gdb_prompt $" {
         fail "need to fix test for new compile outcome"
@@ -99,14 +99,18 @@ gdb_test_multiple "i b" "all set to cont
 # is output from the program.
 #
 if ![gdb_skip_stdio_test "cont"] {
-    gdb_test "cont" ".*1 2 7 14 23 34 47 62 79.*Breakpoint.*$break2_line.*"
+    gdb_test_stdio "cont" \
+	"1 2 7 14 23 34 47 62 79" \
+	"Breakpoint.*$break2_line.*"
 } else {
     gdb_test "cont" ".*Breakpoint.*$break2_line.*"
 }
 
 if ![gdb_skip_stdio_test "Step to return"] {
-    gdb_test "next" ".*Goodbye!.*[expr {$break2_line + 1}].*" \
-	    "Step to return"
+    gdb_test_stdio "next" \
+	"Goodbye!" \
+	"[expr {$break2_line + 1}].*" \
+	"Step to return"
 } else {
     gdb_test "next" ".*" ""
 }
@@ -266,7 +270,7 @@ if {!$use_gdb_stub
     set exec_output [remote_exec host "ls core"]
 
     if [ regexp "core not found" $exec_output]  {
-	pass "No core dumped on quit"
+	pass "no core dumped on quit"
     } else {
 	if [ regexp "No such file or directory" $exec_output] {
 	    pass "ls: core (No core dumped on quit)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enum_cond.c ./gdb/testsuite/gdb.base/enum_cond.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enum_cond.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/enum_cond.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enum_cond.exp ./gdb/testsuite/gdb.base/enum_cond.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enum_cond.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/enum_cond.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ standard_testfile .c
 
 set opts [list debug additional_flags=-fshort-enums]
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
-    untested "Could not compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enumval.c ./gdb/testsuite/gdb.base/enumval.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enumval.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/enumval.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enumval.exp ./gdb/testsuite/gdb.base/enumval.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/enumval.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/enumval.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,8 +17,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/environ.exp ./gdb/testsuite/gdb.base/environ.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/environ.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/environ.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,9 +26,8 @@ if ![istarget "hppa*-*-hpux*"] then {
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
-    untested $testfile.exp
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eu-strip-infcall.c ./gdb/testsuite/gdb.base/eu-strip-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eu-strip-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/eu-strip-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eu-strip-infcall.exp ./gdb/testsuite/gdb.base/eu-strip-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eu-strip-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/eu-strip-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {[build_executable ${testfile}.exp $t
 set test "eu-strip"
 set status [remote_exec build "eu-strip -f ${binfile}.debug $binfile"]
 if {[lindex $status 0] != 0} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval-avoid-side-effects.exp ./gdb/testsuite/gdb.base/eval-avoid-side-effects.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval-avoid-side-effects.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/eval-avoid-side-effects.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile int-type.c
 
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval.exp ./gdb/testsuite/gdb.base/eval.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/eval.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 gdb_exit
 gdb_start
 
-gdb_test_no_output "set \$a = 10" "Initialize \$a."
+gdb_test_no_output "set \$a = 10" "initialize \$a."
 
-gdb_test "eval \"echo %d\\n\", \$a++" "10" "First eval."
-gdb_test "eval \"echo %d\\n\", \$a*2" "22" "Second eval."
+gdb_test "eval \"echo %d\\n\", \$a++" "10" "first eval."
+gdb_test "eval \"echo %d\\n\", \$a*2" "22" "second eval."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval-skip.exp ./gdb/testsuite/gdb.base/eval-skip.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/eval-skip.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/eval-skip.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@
 standard_testfile int-type.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested eval-skip.exp
+     untested "failed to compile"
      return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/examine-backward.c ./gdb/testsuite/gdb.base/examine-backward.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/examine-backward.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/examine-backward.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,106 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/*
+Define TestStrings, TestStringsH, and TestStringsW to test utf8, utf16,
+and utf32 strings respectively.
+To avoid compile errors due to old compiler mode, we don't use string
+literals.  The content of each array is the same as followings:
+
+  const char TestStrings[] = {
+      "ABCD"
+      "EFGHIJKLMNOPQRSTUVWXYZ\0"
+      "\0"
+      "\0"
+      "\u307B\u3052\u307B\u3052\0"
+      "012345678901234567890123456789\0"
+      "!!!!!!\0"
+  };
+*/
+
+const char TestStrings[] = {
+  0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
+  0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
+  0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
+  0x59, 0x5a, 0x00, 0x00, 0x00, 0xe3, 0x81, 0xbb,
+  0xe3, 0x81, 0x92, 0xe3, 0x81, 0xbb, 0xe3, 0x81,
+  0x92, 0x00, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
+  0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33,
+  0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31,
+  0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+  0x00, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x00,
+  0x00
+};
+
+const short TestStringsH[] = {
+  0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048,
+  0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050,
+  0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058,
+  0x0059, 0x005a, 0x0000, 0x0000, 0x0000, 0x307b, 0x3052, 0x307b,
+  0x3052, 0x0000, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035,
+  0x0036, 0x0037, 0x0038, 0x0039, 0x0030, 0x0031, 0x0032, 0x0033,
+  0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x0030, 0x0031,
+  0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
+  0x0000, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0000,
+  0x0000
+};
+
+const int TestStringsW[] = {
+  0x00000041, 0x00000042, 0x00000043, 0x00000044,
+  0x00000045, 0x00000046, 0x00000047, 0x00000048,
+  0x00000049, 0x0000004a, 0x0000004b, 0x0000004c,
+  0x0000004d, 0x0000004e, 0x0000004f, 0x00000050,
+  0x00000051, 0x00000052, 0x00000053, 0x00000054,
+  0x00000055, 0x00000056, 0x00000057, 0x00000058,
+  0x00000059, 0x0000005a, 0x00000000, 0x00000000,
+  0x00000000, 0x0000307b, 0x00003052, 0x0000307b,
+  0x00003052, 0x00000000, 0x00000030, 0x00000031,
+  0x00000032, 0x00000033, 0x00000034, 0x00000035,
+  0x00000036, 0x00000037, 0x00000038, 0x00000039,
+  0x00000030, 0x00000031, 0x00000032, 0x00000033,
+  0x00000034, 0x00000035, 0x00000036, 0x00000037,
+  0x00000038, 0x00000039, 0x00000030, 0x00000031,
+  0x00000032, 0x00000033, 0x00000034, 0x00000035,
+  0x00000036, 0x00000037, 0x00000038, 0x00000039,
+  0x00000000, 0x00000021, 0x00000021, 0x00000021,
+  0x00000021, 0x00000021, 0x00000021, 0x00000000,
+  0x00000000
+};
+
+int
+main (void)
+{
+  /* Backward disassemble test requires at least 20 instructions in
+     this function.  Adding a simple bubble sort.  */
+  int i, j;
+  int n[] = {3, 1, 4, 1, 5, 9};
+  int len = sizeof (n) / sizeof (n[0]);
+
+  for (i = 0; i < len - 1; ++i)
+    {
+      for (j = i; j < len; ++j)
+        {
+          if (n[j] < n[i])
+            {
+              int tmp = n[i];
+              n[i] = n[j];
+              n[j] = tmp;
+            }
+        }
+    }
+  return 42;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/examine-backward.exp ./gdb/testsuite/gdb.base/examine-backward.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/examine-backward.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/examine-backward.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,324 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This testsuite is to test examining memory backward by specifying a negative
+# number in the 'x' command.
+
+standard_testfile
+if { [prepare_for_testing "failed to prepare for examine-backward" \
+        ${testfile} ${srcfile}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+proc get_first_mapped_address {} {
+    global gdb_prompt
+
+    set addr "0"
+    gdb_test_multiple "info proc mappings" "info proc mappings" {
+        -re "objfile\[\r\n\t \]+(0x\[0-9a-fA-F\]+).*\[\r\n\]*$gdb_prompt $" {
+            set addr $expect_out(1,string)
+        }
+        -re "$gdb_prompt $" {
+            unsupported "current target does not support 'info proc mappings'"
+        }
+    }
+    return ${addr}
+}
+
+with_test_prefix "invalid format" {
+    gdb_test "x/- 10xb main" "Invalid number \"10xb\"\." \
+        "a whitespace after a leading hyphen"
+    gdb_test "x/--10xb main" "Invalid number \"10xb\"\." \
+        "double hyphen"
+    gdb_test "x/-a10xb main" "Invalid number \"10xb\"\." \
+        "an alphabet after a leading hyphen"
+    gdb_test_no_output "x/-0i main" "zero with backward disassemble"
+    gdb_test_no_output "x/-0sh main" "zero with backward examine string"
+}
+
+with_test_prefix "memory page boundary" {
+    set boundary [get_first_mapped_address]
+    if {![is_address_zero_readable] && $boundary != 0} {
+        gdb_test_no_output "set print elements 0"
+        gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward" {
+            "0x"
+            "0x"
+            "0x"
+        }
+        gdb_test_sequence "x/-4s" "take 4 strings backward" {
+            "Cannot access memory at address 0x"
+            "0x"
+            "0x"
+            "0x"
+        }
+        gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward again" {
+            "0x"
+            "0x"
+            "0x"
+        }
+        gdb_test_sequence "x/-3s" "take 3 strings backward" {
+            "Cannot access memory at address 0x"
+            "0x"
+            "0x"
+            "0x"
+        }
+    }
+}
+
+with_test_prefix "address zero boundary" {
+    if {[is_address_zero_readable]} {
+        set address_zero "0x0"
+        set byte "\t0x\[0-9a-f\]+"
+        gdb_test "x/3xb ${address_zero}" \
+            "0x\[0-9a-f\]+00.*:${byte}${byte}${byte}" \
+            "examine 3 bytes forward from ${address_zero}"
+        gdb_test "x/-6x" \
+            "0x\[0-9a-f\]+fd.*:${byte}${byte}${byte}${byte}${byte}${byte}" \
+            "examine 6 bytes backward"
+        gdb_test "x/-3x ${address_zero}" \
+            "0x\[0-9a-f\]+fd.*:${byte}${byte}${byte}" \
+            "examine 3 bytes backward from ${address_zero}"
+    }
+}
+
+gdb_test_no_output "set charset ASCII"
+
+with_test_prefix "char-width=1, print-max=20" {
+    gdb_test_no_output "set print elements 20"
+    gdb_test_sequence "x/6s &TestStrings" "take 6 strings forward" {
+        "\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "\"UVWXYZ\""
+        "\"\""
+        "\"\""
+        "\"[^\"]+\""
+        "\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-1xb" "0x39" "take 1 char backward"
+    gdb_test_sequence "x/-6s" "take 6 strings backward" {
+        "\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "\"UVWXYZ\""
+        "\"\""
+        "\"\""
+        "\"[^\"]+\""
+        "\"01234567890123456789\"\.\.\."
+    }
+    gdb_test_sequence "x/6s &TestStrings" "take 6 strings forward again" {
+        "\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "\"UVWXYZ\""
+        "\"\""
+        "\"\""
+        "\"[^\"]+\""
+        "\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-xb" "0x39" "take 1 char backward again"
+    gdb_test "x/-s" "\"01234567890123456789\"\.\.\." \
+        "take 1 string backward (1/6)"
+    gdb_test "x/-s" "\".+\"" \
+        "take 1 string backward (2/6)"
+    gdb_test "x/-s" "\"\"" \
+        "take 1 string backward (3/6)"
+    gdb_test "x/-s" "\"\"" \
+        "take 1 string backward (4/6)"
+    gdb_test "x/-s" "\"GHIJKLMNOPQRSTUVWXYZ\"" \
+        "take 1 string backward (5/6)"
+    gdb_test "x/-s" "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \
+        "take 1 string backward (6/6)"
+}
+
+with_test_prefix "char-width=2, print-max=20" {
+    gdb_test_no_output "set print elements 20"
+    gdb_test_sequence "x/6sh &TestStringsH" "take 6 strings forward" {
+        "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "u\"UVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"[^\"]+\""
+        "u\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-1xh" "0x0039" "take 1 char backward"
+    gdb_test_sequence "x/-6sh" "take 6 strings backward" {
+        "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "u\"UVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"[^\"]+\""
+        "u\"01234567890123456789\"\.\.\."
+    }
+    gdb_test_sequence "x/6sh &TestStringsH" "take 6 strings forward again" {
+        "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "u\"UVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"[^\"]+\""
+        "u\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-xh" "0x0039" "take 1 char backward again"
+    gdb_test "x/-sh" "u\"01234567890123456789\"\.\.\." \
+        "take 1 string backward (1/6)"
+    gdb_test "x/-sh" "u\".+\"" \
+        "take 1 string backward (2/6)"
+    gdb_test "x/-sh" "u\"\"" \
+        "take 1 string backward (3/6)"
+    gdb_test "x/-sh" "u\"\"" \
+        "take 1 string backward (4/6)"
+    gdb_test "x/-sh" "u\"GHIJKLMNOPQRSTUVWXYZ\"" \
+        "take 1 string backward (5/6)"
+    gdb_test "x/-sh" "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \
+        "take 1 string backward (6/6)"
+}
+
+with_test_prefix "char-width=4, print-max=20" {
+    gdb_test_no_output "set print elements 20"
+    gdb_test_sequence "x/6sw &TestStringsW" "take 6 strings forward" {
+        "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "U\"UVWXYZ\""
+        "U\"\""
+        "U\"\""
+        "U\"[^\"]+\""
+        "U\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-1xw" "0x00000039" "take 1 char backward"
+    gdb_test_sequence "x/-6sw" "take 6 strings backward" {
+        "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "U\"UVWXYZ\""
+        "U\"\""
+        "U\"\""
+        "U\"[^\"]+\""
+        "U\"01234567890123456789\"\.\.\."
+    }
+    gdb_test_sequence "x/6sw &TestStringsW" "take 6 strings forward again" {
+        "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\."
+        "U\"UVWXYZ\""
+        "U\"\""
+        "U\"\""
+        "U\"[^\"]+\""
+        "U\"01234567890123456789\"\.\.\."
+    }
+    gdb_test "x/-xw" "0x00000039" "take 1 char backward again"
+    gdb_test "x/-sw" "U\"01234567890123456789\"\.\.\." \
+        "take 1 string backward (1/6)"
+    gdb_test "x/-sw" "U\".+\"" \
+        "take 1 string backward (2/6)"
+    gdb_test "x/-sw" "U\"\"" \
+        "take 1 string backward (3/6)"
+    gdb_test "x/-sw" "U\"\"" \
+        "take 1 string backward (4/6)"
+    gdb_test "x/-sw" "U\"GHIJKLMNOPQRSTUVWXYZ\"" \
+        "take 1 string backward (5/6)"
+    gdb_test "x/-sw" "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." \
+        "take 1 string backward (6/6)"
+}
+
+with_test_prefix "char-width=2, print-max=0" {
+    gdb_test_no_output "set print elements 0"
+    gdb_test_sequence "x/6sh &TestStringsH" "take 6 strings forward" {
+        "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\""
+        "u\"012345678901234567890123456789\""
+        "u\"!!!!!!\""
+    }
+    gdb_test "x/-4xh" "0x0021\[\t \]+0x0021\[\t \]+0x0021\[\t \]+0x0000" \
+        "take 4 characters backward"
+    gdb_test_sequence "x/-6sh" "take 6 strings backward" {
+        "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"[^\"]+\""
+        "u\"012345678901234567890123456789\""
+        "u\"!!!!!!\""
+    }
+    gdb_test_sequence "x/6sh &TestStringsH" "take 6 strings forward again" {
+        "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\""
+        "u\"\""
+        "u\"\""
+        "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\""
+        "u\"012345678901234567890123456789\""
+        "u\"!!!!!!\""
+    }
+    gdb_test "x/-xh" "0x0000" "take 1 char backward"
+    gdb_test "x/-sh" "u\"!!!!!!\"" \
+        "take 1 string backward (1/6)"
+    gdb_test "x/-sh" "u\"012345678901234567890123456789\"" \
+        "take 1 string backward (2/6)"
+    gdb_test "x/-sh" "u\".+\"" \
+        "take 1 string backward (3/6)"
+    gdb_test "x/-sh" "u\"\"" \
+        "take 1 string backward (4/6)"
+    gdb_test "x/-sh" "u\"\"" \
+        "take 1 string backward (5/6)"
+    gdb_test "x/-sh" "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" \
+        "take 1 string backward (6/6)"
+}
+
+with_test_prefix "char-width=1, print-max=4" {
+    gdb_test_no_output "set print elements 4"
+    gdb_test_sequence "x/9s &TestStrings" "take 9 strings forward" {
+        "\"ABCD\"\.\.\."
+        "\"EFGH\"\.\.\."
+        "\"IJKL\"\.\.\."
+        "\"MNOP\"\.\.\."
+        "\"QRST\"\.\.\."
+        "\"UVWX\"\.\.\."
+        "\"YZ\""
+        "\"\""
+        "\"\""
+    }
+    gdb_test "x/-xb" "0x00" "take 1 byte backward"
+    gdb_test_sequence "x/-4s" "take 4 strings backward (1/2)" {
+        "\"TUVW\"\.\.\."
+        "\"XYZ\""
+        "\"\""
+        "\"\""
+    }
+    gdb_test_sequence "x/-4s" "take 4 strings backward (2/2)" {
+        "\"CDEF\"\.\.\."
+        "\"GHIJ\"\.\.\."
+        "\"KLMN\"\.\.\."
+        "\"OPQR\"\.\.\."
+    }
+}
+
+with_test_prefix "backward disassemble general" {
+    set length_to_examine {1 2 3 4 10}
+    set disassmbly {}
+
+    gdb_test "x/i main" "0x\[0-9a-fA-F\]+ <main>:\t.*" \
+        "move the current position to main (x/i)"
+    gdb_test "x/-i" "0x\[0-9a-fA-F\]+ <main>:\t.*" \
+        "move the current position to main (x/-i)"
+    for {set i 0} {$i < [llength $length_to_examine]} {incr i} {
+        set len [lindex $length_to_examine $i]
+        set instructions [capture_command_output "x/${len}i" ""]
+        lappend disassmbly $instructions
+    }
+    for {set i 0} {$i < [llength $length_to_examine]} {incr i} {
+        set idx [expr [llength $length_to_examine] - $i - 1]
+        set len [lindex $length_to_examine $idx]
+        set actual [capture_command_output "x/-${len}i" ""]
+        set expected [lindex $disassmbly $idx]
+        if {$actual == $expected} {
+            pass "inst:$idx"
+        } else {
+            fail "inst:$idx"
+        }
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp ./gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/exec-invalid-sysroot.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,70 @@
+#   Copyright 1997-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test exercises PR20569.  GDB would crash when attempting to follow
+# an exec call when it could not resolve the path to the symbol file.
+# This was the case when an invalid sysroot is provided.
+
+standard_testfile foll-exec.c
+
+global binfile
+set binfile [standard_output_file "foll-exec"]
+set testfile2 "execd-prog"
+set srcfile2 ${testfile2}.c
+set binfile2 [standard_output_file ${testfile2}]
+
+set compile_options debug
+
+# build the first test case
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
+    untested "failed to compile secondary testcase"
+    return -1
+}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
+    untested "failed to compile main testcase"
+    return -1
+}
+
+proc do_exec_sysroot_test {} {
+    global binfile srcfile srcfile2 testfile testfile2
+    global gdb_prompt
+
+    gdb_test_no_output "set sysroot /a/path/that/does/not/exist"
+
+    # Start the program running, and stop at main.
+    #
+    if ![runto_main] then {
+	fail "couldn't run ${testfile}"
+	return
+    }
+
+    # Verify that the system supports "catch exec".
+    gdb_test "catch exec" "Catchpoint \[0-9\]* \\(exec\\)" "insert exec catchpoint"
+    set test "continue to exec catchpoint"
+    gdb_test_multiple "continue" $test {
+	-re ".*Your system does not support this type\r\nof catchpoint.*$gdb_prompt $" {
+	    unsupported $test
+	    return
+	}
+	-re ".*Could not load symbols for executable.*$gdb_prompt $" {
+	    pass $test
+	}
+    }
+}
+
+# Start with a fresh gdb
+clean_restart $binfile
+do_exec_sysroot_test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execl-update-breakpoints.c ./gdb/testsuite/gdb.base/execl-update-breakpoints.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execl-update-breakpoints.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/execl-update-breakpoints.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,11 @@
 #include <stdlib.h>
 #include <string.h>
 
+void
+some_function (void)
+{
+}
+
 int
 main (int argc, char **argv)
 {
@@ -34,5 +39,6 @@ main (int argc, char **argv)
 
   execl (bin, bin, (char *) NULL);
   perror ("execl failed");
+  some_function ();
   exit (1);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execl-update-breakpoints.exp ./gdb/testsuite/gdb.base/execl-update-breakpoints.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execl-update-breakpoints.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/execl-update-breakpoints.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,12 +16,6 @@
 # Test that when following an exec, we don't try to insert breakpoints
 # in the new image at the addresses the symbols had before the exec.
 
-# Remote protocol does not support follow-exec notifications.
-
-if [is_remote target] {
-    continue
-}
-
 standard_testfile
 
 # Build two copies of the program, each linked at a different address.
@@ -34,7 +28,7 @@ set exec2 ${binfile}2
 
 if { [gdb_compile [file join $srcdir $subdir $srcfile] $objfile \
 	  object [list debug]] != "" } {
-    untested "compile failed"
+    untested "failed to compile"
     return -1
 }
 
@@ -61,7 +55,7 @@ if { [gdb_compile $objfile $exec1 execut
 
 clean_restart ${exec1}
 if ![runto_main] then {
-    fail "Couldn't run to main"
+    fail "couldn't run to main"
     return -1
 }
 
@@ -76,7 +70,7 @@ gdb_test_multiple "p/x &main" $test {
 
 clean_restart ${exec2}
 if ![runto_main] then {
-    fail "Couldn't run to main"
+    fail "couldn't run to main"
     return -1
 }
 
@@ -102,23 +96,50 @@ if {!$cannot_access} {
 
 proc test { always_inserted } {
     global exec1
+    global gdb_prompt
 
     clean_restart ${exec1}
 
     gdb_test_no_output "set breakpoint always-inserted $always_inserted"
 
     if ![runto_main] then {
-	fail "Couldn't run to main"
+	fail "couldn't run to main"
 	return -1
     }
 
-    # On a buggy GDB, with always-inserted on, we'd see:
+    # Set a second breakpoint (whose original address also ends up
+    # unmmapped after the exec), for PR 19548.
+    gdb_test "break some_function" "Breakpoint .*"
+
+    # PR17431: with always-inserted on, we'd see:
     #  (gdb) continue
     #  Continuing.
     #  Warning:
     #  Cannot insert breakpoint 1.
     #  Cannot access memory at address 0x10000ff
-    gdb_test "continue" "Breakpoint 1, main.*" "continue across exec"
+
+    # PR 19548: with more than one breakpoint, we'd see:
+    #  (gdb) continue
+    #  Continuing.
+    #  process (...) is executing new program: (...)/execl-update-breakpoints2
+    #  Error in re-setting breakpoint 1: Warning:
+    #  Cannot insert breakpoint 2.
+    #  Cannot access memory at address 0x1000764
+    set not_nl "\[^\r\n\]*"
+    set regex ""
+    append regex \
+	"^continue\r\n" \
+	"Continuing\\.\r\n" \
+	"${not_nl} is executing new program: ${not_nl}\r\n" \
+	"(Reading ${not_nl} from remote target\\.\\.\\.\r\n)*" \
+	"\r\n" \
+	"Breakpoint 1, main.*$gdb_prompt $"
+    set message "continue across exec"
+    gdb_test_multiple "continue" $message {
+	-re $regex {
+	    pass $message
+	}
+    }
 }
 
 foreach always_inserted { "off" "on" } {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execution-termios.c ./gdb/testsuite/gdb.base/execution-termios.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execution-termios.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/execution-termios.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execution-termios.exp ./gdb/testsuite/gdb.base/execution-termios.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/execution-termios.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/execution-termios.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prep
 proc test { prefix body } {
     with_test_prefix $prefix {
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 	uplevel 1 $body
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exe-lock.exp ./gdb/testsuite/gdb.base/exe-lock.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exe-lock.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/exe-lock.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ standard_testfile arrayidx.c
 append binfile $EXEEXT
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exitsignal.exp ./gdb/testsuite/gdb.base/exitsignal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exitsignal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/exitsignal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { [target_info exists gdb,nosignals] 
 
 standard_testfile segv.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -78,7 +78,7 @@ gdb_test "print \$_exitcode" " = void" \
 # inferior execution.
 standard_testfile normal.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/expand-psymtabs.c ./gdb/testsuite/gdb.base/expand-psymtabs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/expand-psymtabs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/expand-psymtabs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/expand-psymtabs.exp ./gdb/testsuite/gdb.base/expand-psymtabs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/expand-psymtabs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/expand-psymtabs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,12 +37,12 @@ if [get_compiler_info] {
 }
 
 # We intentionally compile the source file in twice.
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug $srcfile {debug additional_flags=-DFIRST} \
 	      $srcfile debug]]} {
     return -1
 }
 
 set foo_bp [gdb_get_line_number "Break here"]
-gdb_test "break $foo_bp" "Breakpoint.*" "Expand psymtabs"
+gdb_test "break $foo_bp" "Breakpoint.*" "expand psymtabs"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exprs.exp ./gdb/testsuite/gdb.base/exprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/exprs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/exprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested exprs.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fileio.exp ./gdb/testsuite/gdb.base/fileio.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fileio.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fileio.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2002-2015 Free Software Foundation, Inc.
+#   Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if {[is_remote host]} {
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	   executable \
 	   [list debug "additional_flags=-DOUTDIR=\"$outdir/\""]] != "" } {
-    untested fileio.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -225,7 +225,7 @@ gdb_test continue \
 "Continuing\\..*rename 2:.*EISDIR$stop_msg" \
 "Renaming a file to existing directory returns EISDIR"
 
-set test "Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+set test "renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
 gdb_test_multiple continue "${test}" {
     -re "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST)$stop_msg$gdb_prompt $" {
 	pass "${test}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/filesym.c ./gdb/testsuite/gdb.base/filesym.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/filesym.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/filesym.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/filesym.exp ./gdb/testsuite/gdb.base/filesym.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/filesym.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/filesym.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find.c ./gdb/testsuite/gdb.base/find.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/find.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,7 @@
 /* Testcase for the find command.
    This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find.exp ./gdb/testsuite/gdb.base/find.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/find.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested find.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find-unmapped.c ./gdb/testsuite/gdb.base/find-unmapped.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find-unmapped.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/find-unmapped.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find-unmapped.exp ./gdb/testsuite/gdb.base/find-unmapped.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/find-unmapped.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/find-unmapped.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {[is_remote target]} {
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/finish.exp ./gdb/testsuite/gdb.base/finish.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/finish.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/finish.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,10 @@
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
+set skip_float_test [gdb_skip_float_test]
 
 # re-use the program from the "return2" test.
-if { [prepare_for_testing finish.exp finish return2.c] } {
+if { [prepare_for_testing "failed to prepare" finish return2.c] } {
     return -1
 }
 
@@ -86,10 +87,10 @@ proc finish_abbreviation { abbrev } {
 }
 
 proc finish_tests { } {
-    global gdb_prompt
+    global gdb_prompt skip_float_test
 
     if { ! [ runto_main ] } then {
-	untested finish.exp
+	untested "couldn't run to main"
 	return -1
     }
 
@@ -99,7 +100,7 @@ proc finish_tests { } {
     finish_1 "int"
     finish_1 "long"
     finish_1 "long_long"
-    if ![target_info exists gdb,skip_float_tests] {
+    if {!$skip_float_test} {
 	finish_1 "float"
 	finish_1 "double"
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fixsection.c ./gdb/testsuite/gdb.base/fixsection.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fixsection.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fixsection.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fixsection.exp ./gdb/testsuite/gdb.base/fixsection.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fixsection.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fixsection.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if [get_compiler_info] {
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile \
 	     executable $exec_opts] != ""} {
-    untested "Could not compile either $libsrc or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -44,10 +44,10 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float128.c ./gdb/testsuite/gdb.base/float128.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float128.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/float128.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+long double ld;
+__float128 f128;
+
+int main()
+{
+  ld = 1.375l;
+  f128 = 2.375q;
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float128.exp ./gdb/testsuite/gdb.base/float128.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float128.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/float128.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,76 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.  It is intended to test that
+# gdb could correctly handle floating point constant with a suffix.
+
+standard_testfile .c
+
+proc do_compile { {opts {}} } {
+    global srcdir subdir srcfile binfile
+    set ccopts {debug quiet}
+    foreach opt $opts {lappend ccopts "additional_flags=$opt"}
+    gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $ccopts
+}
+
+if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
+    untested "compiler can't handle __float128 type?"
+    return -1
+}
+
+clean_restart ${binfile}
+
+if ![runto_main] then {
+    perror "couldn't run to breakpoint"
+    continue
+}
+
+# Run to the breakpoint at return.
+gdb_breakpoint [gdb_get_line_number "return"]
+gdb_continue_to_breakpoint "return"
+
+# Print the original value of ld and f128
+gdb_test "print ld" ".* = 1\\.375.*" "the original value of ld is 1.375"
+gdb_test "print f128" ".* = 2\\.375.*" "the original value of f128 is 2.375"
+
+# Test that gdb could correctly recognize float constant expression with a suffix.
+# FIXME: gdb does not yet recognize the GNU extension 'q' suffix for __float128 constants.
+gdb_test "print ld=-1.375l" ".* = -1\\.375.*" "try to change ld to -1.375 with 'print ld=-1.375l'"
+gdb_test "print f128=-2.375l" ".* = -2\\.375.*" "try to change f128 to -2.375 with 'print f128=-2.375l'"
+
+# Test that gdb could handle the above correctly with "set var" command.
+set test "set variable ld=10.375l"
+gdb_test_multiple "set var ld=10.375l" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 10.375l)"
+    }
+}
+
+set test "set variable f128=20.375l"
+gdb_test_multiple "set var f128=20.375l" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 20.375l)"
+    }
+}
+
+gdb_test "print ld" ".* = 10\\.375.*" "the value of ld is changed to 10.375"
+gdb_test "print f128" ".* = 20\\.375.*" "the value of f128 is changed to 20.375"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float.c ./gdb/testsuite/gdb.base/float.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/float.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float.exp ./gdb/testsuite/gdb.base/float.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/float.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/float.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 #
 
 
-if { [prepare_for_testing float.exp float float.c] } {
+if { [prepare_for_testing "failed to prepare" float float.c] } {
     return -1
 }
 
@@ -36,11 +36,11 @@ if ![runto_main] then {
 
 # Test "info float".
 
-if { [istarget "aarch64*-*-*"] } then {
+if { [is_aarch64_target] } then {
     gdb_test "info float" "d0.*d1.*d31.*s0.*s1.*s31.*" "info float"
 } elseif { [istarget "alpha*-*-*"] } then {
     gdb_test "info float" "f0.*" "info float"
-} elseif { [istarget "arm*-*-*"] } then {
+} elseif { [is_aarch32_target] } then {
     gdb_test_multiple "info float" "info float" {
 	-re "Software FPU type.*mask:.*flags:.*$gdb_prompt $" {
 	    pass "info float (FPA)"
@@ -76,6 +76,15 @@ if { [istarget "aarch64*-*-*"] } then {
 	      pass "info float (with FPU)"
 	  }
     }
+} elseif [istarget "nds32*-*-*"] then {
+    gdb_test_multiple "info float" "info_float" {
+        -re "fd0.*fd3.*$gdb_prompt $" {
+            pass "info float (with FPU)"
+	}
+        -re "No floating.point info available for this processor.*" {
+            pass "info float (without FPU)"
+	}
+    }
 } elseif [istarget "powerpc*-*-*"] then {
     gdb_test_multiple "info float" "info_float" {
         -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/floatn.c ./gdb/testsuite/gdb.base/floatn.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/floatn.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/floatn.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+_Float32 f32;
+_Float64 f64;
+_Float128 f128;
+_Float32x f32x;
+_Float64x f64x;
+
+_Complex _Float32 c32;
+_Complex _Float64 c64;
+_Complex _Float128 c128;
+_Complex _Float32x c32x;
+_Complex _Float64x c64x;
+
+int main()
+{
+  f32 = 1.5f32;
+  f64 = 2.25f64;
+  f128 = 3.375f128;
+  f32x = 10.5f32x;
+  f64x = 20.25f64x;
+
+  c32 = 1.5f32 + 1.0if;
+  c64 = 2.25f64 + 1.0if;
+  c128 = 3.375f128 + 1.0if;
+  c32x = 10.5f32x + 1.0if;
+  c64x = 20.25f64x + 1.0if;
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/floatn.exp ./gdb/testsuite/gdb.base/floatn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/floatn.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/floatn.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,124 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.  It is intended to test that
+# gdb could correctly handle floating point constant with a suffix.
+
+standard_testfile .c
+
+proc do_compile { {opts {}} } {
+    global srcdir subdir srcfile binfile
+    set ccopts {debug quiet}
+    foreach opt $opts {lappend ccopts "additional_flags=$opt"}
+    gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $ccopts
+}
+
+if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
+    untested "compiler can't handle _FloatN/_FloatNx types?"
+    return -1
+}
+
+clean_restart ${binfile}
+
+if ![runto_main] then {
+    perror "couldn't run to breakpoint"
+    continue
+}
+
+# Run to the breakpoint at return.
+gdb_breakpoint [gdb_get_line_number "return"]
+gdb_continue_to_breakpoint "return"
+
+# Print the original values of f32, f64, f128, f32x, f64x.
+gdb_test "print f32" ".* = 1\\.5.*" "the original value of f32 is 1.5"
+gdb_test "print f64" ".* = 2\\.25.*" "the original value of f64 is 2.25"
+gdb_test "print f128" ".* = 3\\.375.*" "the original value of f128 is 3.375"
+gdb_test "print f32x" ".* = 10\\.5.*" "the original value of f32x is 10.5"
+gdb_test "print f64x" ".* = 20\\.25.*" "the original value of f64x is 20.25"
+
+# Test that gdb could correctly recognize float constant expression with a suffix.
+# FIXME: gdb does not yet recognize the suffix for _FloatN/_FloatNx types.
+gdb_test "print f32=-1.5" ".* = -1\\.5.*" "try to change f32 to -1.5 with 'print f32=-1.5'"
+gdb_test "print f64=-2.25" ".* = -2\\.25.*" "try to change f64 to -2.25 with 'print f64=-2.25'"
+gdb_test "print f128=-3.375" ".* = -3\\.375.*" "try to change f128 to -3.375 with 'print f128=-3.375'"
+gdb_test "print f32x=-10.5" ".* = -10\\.5.*" "try to change f32x to -10.5 with 'print f32=-1.5x'"
+gdb_test "print f64x=-20.25" ".* = -20\\.25.*" "try to change f64x to -20.25 with 'print f64=-2.25x'"
+
+# Test that gdb could handle the above correctly with "set var" command.
+set test "set variable f32 = 10.5"
+gdb_test_multiple "set var f32=10.5" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 10.5)"
+    }
+}
+
+set test "set variable f64 = 20.25"
+gdb_test_multiple "set var f64=20.25" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 20.25)"
+    }
+}
+
+set test "set variable f128 = 30.375"
+gdb_test_multiple "set var f128=30.375" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 30.375)"
+    }
+}
+
+set test "set variable f32x = 100.5"
+gdb_test_multiple "set var f32x=100.5" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 100.5)"
+    }
+}
+
+set test "set variable f64x = 200.25"
+gdb_test_multiple "set var f64x=200.25" "$test" {
+    -re "$gdb_prompt $" {
+	pass "$test"
+    }
+    -re "Invalid number.*$gdb_prompt $" {
+	fail "$test (do not recognize 200.25)"
+    }
+}
+
+gdb_test "print f32" ".* = 10\\.5.*" "the value of f32 is changed to 10.5"
+gdb_test "print f64" ".* = 20\\.25.*" "the value of f64 is changed to 20.25"
+gdb_test "print f128" ".* = 30\\.375.*" "the value of f128 is changed to 30.375"
+gdb_test "print f32x" ".* = 100\\.5.*" "the value of f32x is changed to 100.5"
+gdb_test "print f64x" ".* = 200\\.25.*" "the value of f64x is changed to 200.25"
+
+# Print the original values of c32, c64, c128, c32x, c64x.
+gdb_test "print c32" ".* = 1\\.5 \\+ 1 \\* I.*" "the original value of c32 is 1.5 + 1 * I"
+gdb_test "print c64" ".* = 2\\.25 \\+ 1 \\* I.*" "the original value of c64 is 2.25 + 1 * I"
+gdb_test "print c128" ".* = 3\\.375 \\+ 1 \\* I.*" "the original value of c128 is 3.375 + 1 * I"
+gdb_test "print c32x" ".* = 10\\.5 \\+ 1 \\* I.*" "the original value of c32x is 10.5 + 1 * I"
+gdb_test "print c64x" ".* = 20\\.25 \\+ 1 \\* I.*" "the original value of c64x is 20.25 + 1 * I"
+
+# FIXME: GDB cannot parse non-trivial complex constants yet.
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec.c ./gdb/testsuite/gdb.base/foll-exec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-exec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,39 +1,67 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 1997-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 
+#include <limits.h>
 
-int  global_i = 100;
+int global_i = 100;
 
-int main (void)
+int main (int argc, char ** argv)
 {
-  int  local_j = global_i+1;
-  int  local_k = local_j+1;
+  int local_j = global_i + 1;
+  int local_k = local_j + 1;
+  char prog[PATH_MAX];
+  int len;
 
   printf ("foll-exec is about to execlp(execd-prog)...\n");
 
-  execlp (BASEDIR "/execd-prog",
-          BASEDIR "/execd-prog",
-          "execlp arg1 from foll-exec",
-          (char *)0);
+  strcpy (prog, argv[0]);
+  len = strlen (prog);
+  /* Replace "foll-exec" with "execd-prog".  */
+  memcpy (prog + len - 9, "execd-prog", 10);
+  prog[len + 1] = 0;
+
+  execlp (prog, /* tbreak-execlp */
+	  prog,
+	  "execlp arg1 from foll-exec",
+	  (char *) 0);
 
   printf ("foll-exec is about to execl(execd-prog)...\n");
 
-  execl (BASEDIR "/execd-prog",	/* tbreak-execl */
-         BASEDIR "/execd-prog",
-         "execl arg1 from foll-exec",
-         "execl arg2 from foll-exec",
-         (char *)0);
+  execl (prog,	/* tbreak-execl */
+	 prog,
+	 "execl arg1 from foll-exec",
+	 "execl arg2 from foll-exec",
+	 (char *) 0);
 
   {
     static char * argv[] = {
-      (char *)BASEDIR "/execd-prog",
-      (char *)"execv arg1 from foll-exec",
-      (char *)0};
+      (char *) "",
+      (char *) "execv arg1 from foll-exec",
+      (char *) 0};
+
+    argv[0] = prog;
 
     printf ("foll-exec is about to execv(execd-prog)...\n");
 
-    execv (BASEDIR "/execd-prog", argv); /* tbreak-execv */
+    execv (prog, argv); /* tbreak-execv */
   }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec.exp ./gdb/testsuite/gdb.base/foll-exec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-exec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,13 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [is_remote target] || ![isnative] } then {
-    continue
-}
+# This is a test of gdb's ability to follow a process through a
+# Unix exec() system call.
 
 # Until "catch exec" is implemented on other targets...
 #
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
+if { ![istarget "*-linux*"] } then {
     continue
 }
 
@@ -30,58 +29,26 @@ set srcfile2 ${testfile2}.c
 set binfile2 [standard_output_file ${testfile2}]
 
 set compile_options debug
-set dirname [relative_filename [pwd] [file dirname $binfile]]
-lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\""
 
 # build the first test case
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
-     untested foll-exec.exp
+     untested "failed to compile"
      return -1
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
-     untested foll-exec.exp
+     untested "failed to compile"
      return -1
 }
 
-proc zap_session {} {
-   global gdb_prompt
-   global binfile
-
-   send_gdb "kill\n"
-   gdb_expect {
-     -re ".*Kill the program being debugged.*y or n. $" {
-       gdb_test_no_output "y" ""
-       send_gdb "file $binfile\n"
-       gdb_expect {
-         -re ".*Load new symbol table from.*y or n. $" {
-           send_gdb "y\n"
-           gdb_expect {
-             -re "Reading symbols from.*$gdb_prompt $" {}
-             timeout { fail "loading symbols (timeout)"; return }
-           }
-         }
-         -re ".*gdb_prompt $" {}
-         timeout { fail "loading symbols (timeout)"; return }
-       }
-    }
-    -re ".*$gdb_prompt $" {}
-    timeout { fail "killing inferior (timeout)" ; return }
-   }
-}
-
 proc do_exec_tests {} {
+   global binfile srcfile srcfile2 testfile testfile2
    global gdb_prompt
-   global binfile
-   global srcfile
-   global srcfile2
-   global testfile
-   global testfile2
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile}"
+     fail "couldn't run ${testfile}"
      return
    }
 
@@ -103,27 +70,25 @@ proc do_exec_tests {} {
      return
    }
 
-   zap_session
+   clean_restart $binfile
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile}"
+     fail "couldn't run ${testfile}"
      return
    }
+   # Execute the code setting up variable PROG.
+   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+   gdb_test "tbreak ${tbreak_line}"
+   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
 
    # Verify that we can see various global and local variables
    # in this program, and that they have expected values.  Some
    # of these variables are also declared in the program we'll
    # exec in a moment.
    #
-   send_gdb "next 3\n"
-   gdb_expect {
-     -re "execlp \\(.*$gdb_prompt $"\
-                     {pass "step to exec call"}
-     -re "$gdb_prompt $" {fail "step to exec call"}
-     timeout         {fail "(timeout) step to exec call"}
-   }
+
    send_gdb "print global_i\n"
    gdb_expect {
      -re ".* = 100.*$gdb_prompt $"\
@@ -192,12 +157,12 @@ proc do_exec_tests {} {
 
    # Explicitly kill this program, or a subsequent rerun actually runs
    # the exec'd program, not the original program...
-   zap_session
+   clean_restart $binfile
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile} (2nd try)"
+     fail "couldn't run ${testfile} (2nd try)"
      return
    }
 
@@ -224,13 +189,9 @@ proc do_exec_tests {} {
        }
    }
 
-   # DTS CLLbs16760
-   # PA64 doesn't know about $START$ in dld.sl at this point.  It should.
-   # - Michael Coulter
-   setup_xfail hppa2.0w-hp-hpux* CLLbs16760
    send_gdb "continue\n"
    gdb_expect {
-     -re ".*xecuting new program:.*${testfile2}.*Catchpoint .*(exec\'d .*${testfile2}).*in .*$gdb_prompt $"\
+     -re ".*xecuting new program:.*${testfile2}.*Catchpoint .*(exec\'d .*${testfile2}).*$gdb_prompt $"\
                      {pass "hit catch exec"}
      -re "$gdb_prompt $" {fail "hit catch exec"}
      timeout         {fail "(timeout) hit catch exec"}
@@ -265,19 +226,23 @@ proc do_exec_tests {} {
 
    # Explicitly kill this program, or a subsequent rerun actually runs
    # the exec'd program, not the original program...
-   zap_session
+   clean_restart $binfile
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile} (3rd try)"
+     fail "couldn't run ${testfile} (3rd try)"
      return
    }
+   # Execute the code setting up variable PROG.
+   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+   gdb_test "tbreak ${tbreak_line}"
+   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
 
    # Verify that we can follow through follow an execl()
    # call.  (We must jump around earlier exec* calls.)
    #
-   set tbreak_line [gdb_get_line_number "tbreak-execl" $srcfile]
+   set tbreak_line [gdb_get_line_number " tbreak-execl " $srcfile]
    send_gdb "tbreak ${tbreak_line}\n"
    gdb_expect {
      -re "Temporary breakpoint .*file .*${srcfile}, line ${tbreak_line}.*$gdb_prompt $"\
@@ -326,14 +291,18 @@ proc do_exec_tests {} {
 
    # Explicitly kill this program, or a subsequent rerun actually runs
    # the exec'd program, not the original program...
-   zap_session
+   clean_restart $binfile
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile} (4th try)"
+     fail "couldn't run ${testfile} (4th try)"
      return
    }
+   # Execute the code setting up variable PROG.
+   set tbreak_line [gdb_get_line_number " tbreak-execlp " $srcfile]
+   gdb_test "tbreak ${tbreak_line}"
+   gdb_continue_to_breakpoint "line tbreak-execlp" ".*execlp \\(.*"
 
    # Verify that we can follow through follow an execv()
    # call.  (We must jump around earlier exec* calls.)
@@ -381,12 +350,12 @@ proc do_exec_tests {} {
 
    # Explicitly kill this program, or a subsequent rerun actually runs
    # the exec'd program, not the original program...
-   zap_session
+   clean_restart $binfile
 
    # Start the program running, and stop at main.
    #
    if ![runto_main] then {
-     perror "Couldn't run ${testfile} (5th try)"
+     fail "couldn't run ${testfile} (5th try)"
      return
    }
 
@@ -406,14 +375,8 @@ proc do_exec_tests {} {
 # Start with a fresh gdb
 
 gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $binfile
 
-
-# This is a test of gdb's ability to follow a process through a
-# Unix exec() system call.
-#
 do_exec_tests
 
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec-mode.c ./gdb/testsuite/gdb.base/foll-exec-mode.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec-mode.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-exec-mode.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,45 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+
+int global_i = 100;
+
+int main (int argc, char ** argv)
+{
+  int local_j = global_i + 1;
+  int local_k = local_j + 1;
+  char prog[PATH_MAX];
+  int len;
+
+  strcpy (prog, argv[0]);
+  len = strlen (prog);
+  /* Replace "foll-exec-mode" with "execd-prog".  */
+  memcpy (prog + len - 14, "execd-prog", 10);
+  prog[len - 4] = 0;
+
+  printf ("foll-exec is about to execlp(execd-prog)...\n");
+
+  execlp (prog,     /* Set breakpoint here.  */
+	  "/execd-prog",
+	  "execlp arg1 from foll-exec",
+	  (char *) 0);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec-mode.exp ./gdb/testsuite/gdb.base/foll-exec-mode.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-exec-mode.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-exec-mode.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,202 @@
+#    Copyright 1997-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This is a test of gdb's follow-exec-mode.
+#
+# It first checks that exec events are supported by using a catchpoint,
+# then tests multiple scenarios for follow-exec-mode using parameters
+# that test:
+# - each mode
+# - different commands to execute past the exec
+# - re-running both the original and new inferiors.
+#
+# Note that we can't single-step past an exec call.  There has to
+# be a breakpoint in order to stop after the exec, even if we use
+# a single-step command to execute past the exec.
+
+# Remote mode doesn't support the 'run' command, which is
+# required for follow-exec-mode testing.
+if { [target_info exists gdb_protocol]
+     && [target_info gdb_protocol] == "remote" } {
+    continue
+}
+
+# Until "catch exec" is implemented on other targets...
+#
+if {![istarget "*-linux*"]} then {
+     continue
+}
+
+standard_testfile foll-exec-mode.c
+
+set testfile2 "execd-prog"
+set srcfile2 ${testfile2}.c
+set binfile2 [standard_output_file ${testfile2}]
+
+set compile_options debug
+
+# build the first test case
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
+      untested "failed to compile"
+      return -1
+}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
+      untested "failed to compile"
+      return -1
+}
+
+#  Test exec catchpoints to ensure exec events are supported.
+#
+proc do_catch_exec_test { } {
+    global testfile
+    global gdb_prompt
+
+    clean_restart $testfile
+
+    # Start the program running, and stop at main.
+    #
+    if ![runto_main] then {
+	fail "couldn't run ${testfile}"
+	return
+    }
+
+    # Verify that the system supports "catch exec".
+    gdb_test "catch exec" "Catchpoint \[0-9\]* \\(exec\\)" "insert first exec catchpoint"
+    set has_exec_catchpoints 0
+    gdb_test_multiple "continue" "continue to first exec catchpoint" {
+	-re ".*Your system does not support this type\r\nof catchpoint.*$gdb_prompt $" {
+	    unsupported "continue to first exec catchpoint"
+	}
+	-re ".*Catchpoint.*$gdb_prompt $" {
+	    set has_exec_catchpoints 1
+	    pass "continue to first exec catchpoint"
+	}
+    }
+
+    if {$has_exec_catchpoints == 0} {
+	unsupported "exec catchpoints"
+	return
+    }
+}
+
+# Test follow-exec-mode in the specified scenario.
+# MODE determines whether follow-exec-mode is "same" or "new".
+# CMD determines the command used to execute past the exec call.
+# INFSWITCH is ignored for MODE == "same", and for "new" it is
+# used to determine whether to switch to the original inferior
+# before re-running.
+
+proc do_follow_exec_mode_tests { mode cmd infswitch } {
+    global binfile srcfile srcfile2 testfile testfile2
+    global gdb_prompt
+
+    with_test_prefix "$mode,$cmd,$infswitch" {
+	clean_restart $testfile
+
+	# Start the program running, and stop at main.
+	#
+	if ![runto_main] then {
+	    fail "couldn't run ${testfile}"
+	    return
+	}
+
+	# Set the follow-exec mode.
+	#
+	gdb_test_no_output "set follow-exec-mode $mode"
+
+	# Run to the line of the exec call.
+	#
+	gdb_breakpoint [gdb_get_line_number "Set breakpoint here"]
+	gdb_continue_to_breakpoint "continue to line of exec call"
+
+	# Set up the output we expect to see after we execute past the exec.
+	#
+	set execd_line [gdb_get_line_number "after-exec" $srcfile2]
+	set expected_re ".*xecuting new program: .*${testfile2}.*Breakpoint .,.*${srcfile2}:${execd_line}.*$gdb_prompt $"
+
+	# Set a breakpoint after the exec call if we aren't single-stepping
+	# past it.
+	#
+	if {$cmd == "continue"} {
+	    gdb_breakpoint "$execd_line"
+	}
+
+	# Execute past the exec call.
+	#
+	set test "$cmd past exec"
+	gdb_test_multiple $cmd $test {
+	    -re "$expected_re" {
+		pass $test
+	    }
+	}
+
+	# Set expected output, given the test parameters.
+	#
+	if {$mode == "same"} {
+	    set expected_re "\\* 1.*process.*"
+	} else {
+	    set expected_re "  1.*null.*$testfile.*\r\n\\* 2.*process.*$testfile2 .*"
+	}
+
+	# Check that the inferior list is correct:
+	# - one inferior for MODE == "same"
+	# - two inferiors for MODE == "new", current is execd program
+	#
+	gdb_test "info inferiors" $expected_re "Check inferior list"
+
+	set expected_inf ""
+	if {$mode == "same"} {
+	    # One inferior, the execd program.
+	    set expected_inf $testfile2
+	} elseif {$infswitch == "infswitch"} {
+	    # Two inferiors, we have switched to the original program.
+	    set expected_inf $testfile
+	    gdb_test "inferior 1" "Switching to inferior 1.*$testfile.*" "switch inferiors"
+	} else {
+	    # Two inferiors, run the execd program
+	    set expected_inf $testfile2
+	}
+
+	# Now check that a 'run' command will run the correct inferior.
+	#
+	set test "use correct executable ($expected_inf) for run after follow exec"
+	gdb_run_cmd
+	gdb_test_multiple "" $test {
+	    -re {Start it from the beginning\? \(y or n\) $} {
+		send_gdb "y\n"
+		exp_continue
+	    }
+	    -re "Starting program: .*$expected_inf.*Breakpoint .,.*\r\n$gdb_prompt $" {
+		pass $test
+	    }
+	}
+    }
+}
+
+do_catch_exec_test
+
+foreach cmd {"next" "continue"} {
+    foreach mode {"same" "new"} {
+	# Test basic follow-exec-mode.
+	do_follow_exec_mode_tests $mode $cmd "no_infswitch"
+	if {$mode == "new"} {
+	    # Test that when we do 'run' we get the correct executable.
+	    do_follow_exec_mode_tests $mode $cmd "infswitch"
+	}
+    }
+}
+
+return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-fork.exp ./gdb/testsuite/gdb.base/foll-fork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-fork.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-fork.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,22 +13,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [is_remote target] || ![isnative] } then {
-    continue
-}
-
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if { ![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]
-     && ![istarget "*-*-openbsd*"] } then {
+if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
     continue
 }
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -144,7 +138,7 @@ proc test_follow_fork { who detach cmd }
 
 	    # Follow parent / keep child: two inferiors under debug, the
 	    # parent is the current inferior.
-	    gdb_test "info inferiors" " 2 .*process.*\\* 1 .*process.*" \
+	    gdb_test "info inferiors" "\\* 1 .*process.* 2 .*process.*" \
 		     "info inferiors"
 
 	    gdb_test "inferior 2" "Switching to inferior 2 .*"
@@ -155,14 +149,14 @@ proc test_follow_fork { who detach cmd }
 	    # Follow child / detach parent: the child is under debug and is
 	    # the current inferior.  The parent is listed but is not under
 	    # debug.
-	    gdb_test "info inferiors" "\\* 2 .*process.* 1 .*<null>.*" \
+	    gdb_test "info inferiors" " 1 .*<null>.*\\* 2 .*process.*" \
 		     "info inferiors"
 
 	} elseif {$who == "child" && $detach == "off"} {
 
 	    # Follow child / keep parent: two inferiors under debug, the
 	    # child is the current inferior.
-	    gdb_test "info inferiors" "\\* 2 .*process.* 1 .*process.*" \
+	    gdb_test "info inferiors" " 1 .*process.*\\* 2 .*process.*" \
 		     "info inferiors"
 
 	    gdb_test "inferior 1" "Switching to inferior 1 .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork.c ./gdb/testsuite/gdb.base/foll-vfork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-vfork.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997-2015 Free Software Foundation, Inc.
+   Copyright 1997-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,14 +18,30 @@
 #include <stdio.h>
 #include <unistd.h>
 
-int main (void)
+#include <limits.h>
+#include <string.h>
+
+int
+main (int argc, char ** argv)
 {
   int  pid;
 
-  pid = vfork ();
+  /* A statement before vfork to make sure a breakpoint on main isn't
+     set on vfork below.  */
+  pid = 1 + argc;
+  pid = vfork (); /* VFORK */
   if (pid == 0) {
+    char prog[PATH_MAX];
+    int len;
+
+    strcpy (prog, argv[0]);
+    len = strlen (prog);
+    /* Replace "foll-vfork" with "vforked-prog".  */
+    memcpy (prog + len - 10, "vforked-prog", 12);
+    prog[len + 2] = 0;
+
     printf ("I'm the child!\n");
-    execlp (BASEDIR "/vforked-prog", BASEDIR "/vforked-prog", (char *)0);
+    execlp (prog, prog, (char *) 0);
     perror ("exec failed");
     _exit (1);
   }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork-exit.c ./gdb/testsuite/gdb.base/foll-vfork-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork-exit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-vfork-exit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997-2015 Free Software Foundation, Inc.
+   Copyright 1997-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,10 @@ main ()
 {
   int pid;
 
-  pid = vfork ();
+  /* A statement before vfork to make sure a breakpoint on main isn't
+     set on vfork below.  */
+  pid = 1;
+  pid = vfork (); /* VFORK */
   if (pid == 0)
     {
       printf ("I'm the child!\n");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork.exp ./gdb/testsuite/gdb.base/foll-vfork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/foll-vfork.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/foll-vfork.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,41 +18,19 @@
 # either execs or exits --- since those events take somewhat different
 # code paths in GDB, both variants are exercised.
 
-if { [is_remote target] || ![isnative] } then {
-    continue
-}
-
 # Until "set follow-fork-mode" and "catch vfork" are implemented on
 # other targets...
 #
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} then {
     continue
 }
 
-# Test to see if we are on an HP-UX 10.20 and if so,
-# do not run these tests as catching vfork is disabled for
-# 10.20.
-
-if [istarget "hppa*-hp-hpux10.20"] then {
-    return 0
-}
-
-# NOTE drow/2002-12-06: I don't know what the referenced kernel problem
-# is, but it appears to be fixed in recent HP/UX versions.
-
-##if [istarget "hppa2.0w-hp-hpux*"] {
-##  warning "Don't run gdb.base/foll-vfork.exp until JAGaa43495 kernel problem is fixed."
-##  return 0
-##}
-
 standard_testfile
 
 set compile_options debug
-set dirname [relative_filename [pwd] [file dirname $binfile]]
-lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\""
 
 if {[build_executable $testfile.exp $testfile $srcfile $compile_options] == -1} {
-    untested "failed to compile $testfile"
+    untested "failed to compile main testcase"
     return -1
 }
 
@@ -60,7 +38,7 @@ set testfile2 "vforked-prog"
 set srcfile2 ${testfile2}.c
 
 if {[build_executable $testfile.exp $testfile2 $srcfile2 $compile_options] == -1} {
-    untested "failed to compile $testfile2"
+    untested "failed to compile secondary testcase"
     return -1
 }
 
@@ -73,7 +51,7 @@ set timeout [expr "$timeout + 10"]
 # error, behave as "return", so we don't try to continue testing with
 # a borked session.
 proc setup_gdb {} {
-    global testfile
+    global testfile srcfile
 
     clean_restart $testfile
 
@@ -84,6 +62,10 @@ proc setup_gdb {} {
     if ![runto_main] {
 	return -code return
     }
+
+    set tbreak_line [gdb_get_line_number " VFORK " $srcfile]
+    gdb_test "tbreak ${tbreak_line}"
+    gdb_continue_to_breakpoint ".*"
 }
 
 proc check_vfork_catchpoints {} {
@@ -211,46 +193,18 @@ proc vfork_and_exec_child_follow_through
    global gdb_prompt
    global srcfile2
 
-   if { [istarget "hppa*-*-hpux*"] && ![istarget "hppa*-*-hpux11.*"] } {
-      # This test cannot be performed prior to HP-UX 10.30, because
-      # ptrace-based debugging of a vforking program basically doesn't
-      # allow the child to do things like hit a breakpoint between a
-      # vfork and exec.  This means that saying "set follow-fork
-      # child; next" at a vfork() call won't work, because the
-      # implementation of "next" sets a "step resume" breakpoint at
-      # the return from the vfork(), which the child will hit on its
-      # way to exec'ing.
-      #
-      verbose "vfork child-following next test ignored for pre-HP/UX-10.30 targets."
-      return 0
-   }
-
    setup_gdb
 
    gdb_test_no_output "set follow-fork child"
 
    set test "step over vfork"
-   if { [istarget "hppa*-*-hpux*"]} {
-       # Since the child cannot be debugged until after it has exec'd,
-       # and since there's a bp on "main" in the parent, and since the
-       # bp's for the parent are recomputed in the exec'd child, the
-       # step through a vfork should land us in the "main" for the
-       # exec'd child, too.
-       #
-       set linenum [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}]
-       gdb_test_multiple "next" $test {
-	   -re "Attaching after vfork to.*Executing new program.*Breakpoint.*vforked-prog.c:${linenum}.*$gdb_prompt " {
-	       pass "$test"
-	   }
-       }
-   } else {
-       # The ideal support is to be able to debug the child even
-       # before it execs.  Thus, "next" lands on the next line after
-       # the vfork.
-       gdb_test_multiple "next" $test {
-	   -re "Attaching after .* vfork to child.*if \\(pid == 0\\).*$gdb_prompt " {
-	       pass "$test"
-	   }
+
+   # The ideal support is to be able to debug the child even
+   # before it execs.  Thus, "next" lands on the next line after
+   # the vfork.
+   gdb_test_multiple "next" $test {
+       -re "Attaching after .* vfork to child.*if \\(pid == 0\\).*$gdb_prompt " {
+	   pass "$test"
        }
    }
    # The parent has been detached; allow time for any output it might
@@ -260,6 +214,21 @@ proc vfork_and_exec_child_follow_through
    exec sleep 1
 }}
 
+proc continue_to_vfork {} {
+   global gdb_prompt
+
+   # A vfork catchpoint may stop in either "vfork" or "_vfork".
+   set test "continue to vfork"
+   gdb_test_multiple "continue" $test {
+      -re "vfork \\(\\) at .*$gdb_prompt $" {
+	  pass $test
+      }
+      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
+	  pass $test
+      }
+   }
+}
+
 proc tcatch_vfork_then_parent_follow {} {
   with_test_prefix "vfork parent follow, finish after tcatch vfork" {
    global gdb_prompt
@@ -271,17 +240,7 @@ proc tcatch_vfork_then_parent_follow {} 
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
 
-   # HP-UX 10.20 seems to stop you in "vfork", while more recent
-   # HP-UXs stop you in "_vfork".
-   set test "continue to vfork"
-   gdb_test_multiple "continue" $test {
-      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
-	  pass $test
-      }
-      -re "vfork \\(\\) at.*$gdb_prompt " {
-	  pass $test
-      }
-   }
+   continue_to_vfork
 
    set linenum [gdb_get_line_number "pid = vfork ();"]
    set test "finish"
@@ -313,17 +272,7 @@ proc tcatch_vfork_then_child_follow_exec
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
 
-   # HP-UX 10.20 seems to stop you in "vfork", while more recent HP-UXs
-   # stop you in "_vfork".
-   set test "continue to vfork"
-   gdb_test_multiple "continue" $test {
-      -re "vfork \\(\\) at .*$gdb_prompt $" {
-	  pass $test
-      }
-      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
-	  pass $test
-      }
-   }
+   continue_to_vfork
 
    set linenum1 [gdb_get_line_number "pid = vfork ();"]
    set linenum2 [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}]
@@ -359,17 +308,7 @@ proc tcatch_vfork_then_child_follow_exit
 
    gdb_test "tcatch vfork" "Catchpoint .*(vfork).*"
 
-   # HP-UX 10.20 seems to stop you in "vfork", while more recent HP-UXs
-   # stop you in "_vfork".
-   set test "continue to vfork"
-   gdb_test_multiple "continue" $test {
-      -re "vfork \\(\\) at .*$gdb_prompt $" {
-	  pass $test
-      }
-      -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " {
-	  pass $test
-      }
-   }
+   continue_to_vfork
 
    set test "finish"
    gdb_test_multiple "finish" $test {
@@ -408,7 +347,7 @@ proc vfork_relations_in_info_inferiors {
    }
 
    gdb_test "info inferiors" \
-       ".*is vfork child of inferior 1.*is vfork parent of inferior 2" \
+       ".*is vfork parent of inferior 2.*is vfork child of inferior 1" \
        "info inferiors shows vfork parent/child relation"
 
    if { $variant == "exec" } {
@@ -524,23 +463,18 @@ with_test_prefix "check vfork support" {
     check_vfork_catchpoints
 }
 
-# There is no support for exec events in the RSP yet.
-if { ![gdb_is_target_remote] } {
-    # Follow parent and follow child vfork tests with a child that execs.
-    with_test_prefix "exec" {
-	# These are tests of gdb's ability to follow the parent of a Unix
-	# vfork system call.  The child will subsequently call a variant
-	# of the Unix exec system call.
-	do_vfork_and_follow_parent_tests
-
-	# These are tests of gdb's ability to follow the child of a Unix
-	# vfork system call.  The child will subsequently call a variant
-	# of a Unix exec system call.
-	#
-	do_vfork_and_follow_child_tests_exec
-    }
-} else {
-    unsupported "vfork with exec: exec events not supported for remote"
+# Follow parent and follow child vfork tests with a child that execs.
+with_test_prefix "exec" {
+    # These are tests of gdb's ability to follow the parent of a Unix
+    # vfork system call.  The child will subsequently call a variant
+    # of the Unix exec system call.
+    do_vfork_and_follow_parent_tests
+
+    # These are tests of gdb's ability to follow the child of a Unix
+    # vfork system call.  The child will subsequently call a variant
+    # of a Unix exec system call.
+    #
+    do_vfork_and_follow_child_tests_exec
 }
 
 # Switch to test the case of the child exiting.  We can't use
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fork-running-state.c ./gdb/testsuite/gdb.base/fork-running-state.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fork-running-state.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fork-running-state.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,83 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+int save_parent;
+
+/* The fork child.  Just runs forever.  */
+
+static int
+fork_child (void)
+{
+  while (1)
+    {
+      sleep (1);
+
+      /* Exit if GDB kills the parent.  */
+      if (getppid () != save_parent)
+	break;
+      if (kill (getppid (), 0) != 0)
+	break;
+    }
+
+  return 0;
+}
+
+/* The fork parent.  Just runs forever waiting for the child to
+   exit.  */
+
+static int
+fork_parent (void)
+{
+  if (wait (NULL) == -1)
+    {
+      perror ("wait");
+      return 1;
+    }
+
+  return 0;
+}
+
+int
+main (void)
+{
+  pid_t pid;
+
+  save_parent = getpid ();
+
+  /* Don't run forever.  */
+  alarm (180);
+
+  /* The parent and child should basically run forever without
+     tripping on any debug event.  We want to check that GDB updates
+     the parent and child running states correctly right after the
+     fork.  */
+  pid = fork ();
+  if (pid > 0)
+    return fork_parent ();
+  else if (pid == 0)
+    return fork_child ();
+  else
+    {
+      perror ("fork");
+      return 1;
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fork-running-state.exp ./gdb/testsuite/gdb.base/fork-running-state.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fork-running-state.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fork-running-state.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,163 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR threads/19461 (strange "info thread" behavior
+# in non-stop).  GDB used to miss updating the parent/child running
+# states after a fork.
+
+standard_testfile
+
+# The test proper.
+
+proc do_test { detach_on_fork follow_fork non_stop schedule_multiple } {
+    global GDBFLAGS
+    global srcfile testfile
+    global gdb_prompt
+
+    save_vars { GDBFLAGS } {
+	append GDBFLAGS " -ex \"set non-stop $non_stop\""
+
+	if {[prepare_for_testing "failed to prepare" \
+		 $testfile $srcfile {debug}] == -1} {
+	    return -1
+	}
+    }
+
+    if ![runto_main] then {
+	fail "can't run to main"
+	return 0
+    }
+
+    # If debugging with target remote, check whether the all-stop
+    # variant of the RSP is being used.  If so, we can't run the
+    # all-stop tests.
+    if { [target_info exists gdb_protocol]
+	 && ([target_info gdb_protocol] == "remote"
+	     || [target_info gdb_protocol] == "extended-remote")} {
+
+	set test "maint show target-non-stop"
+	gdb_test_multiple "maint show target-non-stop" $test {
+	    -re "(is|currently) on.*$gdb_prompt $" {
+	    }
+	    -re "(is|currently) off.*$gdb_prompt $" {
+		unsupported "can't issue info threads while target is running"
+		return 0
+	    }
+	}
+    }
+
+    # We want to catch "[New inferior ...]" below, to avoid sleeping.
+    if {$detach_on_fork == "off" || $follow_fork == "child"} {
+	gdb_test_no_output "set print inferior-events on"
+    }
+
+    gdb_test_no_output "set detach-on-fork $detach_on_fork"
+
+    gdb_test_no_output "set follow-fork $follow_fork"
+    if {$non_stop == "off"} {
+	gdb_test_no_output "set schedule-multiple $schedule_multiple"
+    }
+
+    set test "continue &"
+    gdb_test_multiple $test $test {
+	-re "$gdb_prompt " {
+	    pass $test
+	}
+    }
+
+    if {$detach_on_fork == "off" || $follow_fork == "child"} {
+	set test "fork child appears"
+	gdb_test_multiple "" $test {
+	    -re "\\\[New inferior " {
+		pass $test
+	    }
+	}
+    } else {
+	# All we can do is wait a little bit for the parent to fork.
+	sleep 1
+    }
+
+    set not_nl "\[^\r\n\]*"
+
+    if {$detach_on_fork == "on" && $non_stop == "on" && $follow_fork == "child"} {
+	gdb_test "info threads" \
+	    "  2.1 ${not_nl}\\\(running\\\).*No selected thread.*"
+    } elseif {$detach_on_fork == "on" && $follow_fork == "child"} {
+	gdb_test "info threads" \
+	    "\\\* 2.1 ${not_nl}\\\(running\\\)"
+    } elseif {$detach_on_fork == "on"} {
+	gdb_test "info threads" \
+	    "\\\* 1 ${not_nl}\\\(running\\\)"
+    } elseif {$non_stop == "on"
+	      || ($schedule_multiple == "on" && $follow_fork == "parent")} {
+	# Both parent and child should be marked running, and the
+	# parent should be selected.
+	gdb_test "info threads" \
+	    [multi_line \
+		 "\\\* 1.1 ${not_nl} \\\(running\\\)${not_nl}" \
+		 "  2.1 ${not_nl} \\\(running\\\)"]
+    } elseif {$schedule_multiple == "on" && $follow_fork == "child"} {
+	# Both parent and child should be marked running, and the
+	# child should be selected.
+	gdb_test "info threads" \
+	    [multi_line \
+		 "  1.1 ${not_nl} \\\(running\\\)${not_nl}" \
+		 "\\\* 2.1 ${not_nl} \\\(running\\\)"]
+    } else {
+	set test "only $follow_fork marked running"
+	gdb_test_multiple "info threads" $test {
+	    -re "\\\(running\\\)${not_nl}\\\(running\\\)\r\n$gdb_prompt $" {
+		fail $test
+	    }
+	    -re "\\\* 1.1 ${not_nl}\\\(running\\\)\r\n  2.1 ${not_nl}\r\n$gdb_prompt $" {
+		gdb_assert [string eq $follow_fork "parent"] $test
+	    }
+	    -re "1.1 ${not_nl}\r\n\\\* 2.1 ${not_nl}\\\(running\\\)\r\n$gdb_prompt $" {
+		gdb_assert [string eq $follow_fork "child"] $test
+	    }
+	}
+    }
+
+    # We don't want to see "Inferior exited" in reaction to the kills.
+    gdb_test_no_output "set print inferior-events off"
+
+    # Kill both parent and child.
+    if {$detach_on_fork == "off" || $follow_fork == "parent"} {
+	gdb_test_no_output "kill inferior 1" "kill parent"
+    }
+    if {$detach_on_fork == "off" || $follow_fork == "child"} {
+	gdb_test_no_output "kill inferior 2" "kill child"
+    }
+}
+
+# Exercise all permutations of:
+#
+#  set detach-on-fork off|on
+#  set follow-fork parent|child
+#  set non-stop on|off
+#  set schedule-multiple on|off
+
+foreach_with_prefix detach-on-fork {"off" "on"} {
+    foreach_with_prefix follow-fork {"parent" "child"} {
+	with_test_prefix "non-stop" {
+	    do_test ${detach-on-fork} ${follow-fork} "on" "-"
+	}
+	with_test_prefix "all-stop" {
+	    foreach_with_prefix schedule-multiple {"on" "off"} {
+		do_test ${detach-on-fork} ${follow-fork} "off" ${schedule-multiple}
+	    }
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fortran-sym-case.c ./gdb/testsuite/gdb.base/fortran-sym-case.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fortran-sym-case.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fortran-sym-case.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fortran-sym-case.exp ./gdb/testsuite/gdb.base/fortran-sym-case.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fortran-sym-case.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fortran-sym-case.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/frame-args.c ./gdb/testsuite/gdb.base/frame-args.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/frame-args.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/frame-args.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/frame-args.exp ./gdb/testsuite/gdb.base/frame-args.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/frame-args.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/frame-args.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/freebpcmd.c ./gdb/testsuite/gdb.base/freebpcmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/freebpcmd.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/freebpcmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test program for GDB crashes while doing bp commands that continue inferior.
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This file is part of the gdb testsuite.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/freebpcmd.exp ./gdb/testsuite/gdb.base/freebpcmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/freebpcmd.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/freebpcmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2003-2015 Free Software Foundation, Inc.
+#   Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,8 +45,7 @@
 
 
 standard_testfile
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -103,22 +102,19 @@ if {$i >= [llength $lines]} {
 
 gdb_run_cmd
 
-set prev_timeout $timeout
-set timeout 120
-
-gdb_test_multiple "" "run program with breakpoint commands" {
-    -re "warning: Invalid control type in command structure" {
-        kfail "gdb/1489" "run program with breakpoint commands"
-    }
-    -re "Invalid i value\r\n$gdb_prompt $" {
-	xfail "run program with breakpoint commands (i value not readable)"
-    }
-    -re "$gdb_prompt $" {
-        pass "run program with breakpoint commands"
-    }
-    eof {
-        kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
+with_timeout_factor 10 {
+    gdb_test_multiple "" "run program with breakpoint commands" {
+	-re "warning: Invalid control type in command structure" {
+	    kfail "gdb/1489" "run program with breakpoint commands"
+	}
+	-re "Invalid i value\r\n$gdb_prompt $" {
+	    xfail "run program with breakpoint commands (i value not readable)"
+	}
+	-re "$gdb_prompt $" {
+	    pass "run program with breakpoint commands"
+	}
+	eof {
+	    kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
+	}
     }
 }
-
-set timeout $prev_timeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullname.c ./gdb/testsuite/gdb.base/fullname.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullname.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fullname.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullname.exp ./gdb/testsuite/gdb.base/fullname.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullname.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fullname.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand.c ./gdb/testsuite/gdb.base/fullpath-expand.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fullpath-expand.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand.exp ./gdb/testsuite/gdb.base/fullpath-expand.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fullpath-expand.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c fullpath-expand-func.c
 
 if [is_remote host] {
-    unsupported "Compiling on a remote host does not support a filename with directory."
+    unsupported "compiling on a remote host does not support a filename with directory."
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand-func.c ./gdb/testsuite/gdb.base/fullpath-expand-func.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/fullpath-expand-func.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/fullpath-expand-func.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/funcargs.exp ./gdb/testsuite/gdb.base/funcargs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/funcargs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/funcargs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,8 +29,9 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile $compile_flags]} {
-    untested $testfile.exp
+set skip_float_test [gdb_skip_float_test]
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile $compile_flags]} {
     return -1
 }
 
@@ -894,19 +895,15 @@ proc recursive_structs_by_value {} {
     gdb_run_cmd
     gdb_test "" "Breakpoint $decimal, hitbottom .*" "run to hitbottom"
 
-    if ![istarget sparclet-*-*] {
-	gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
-	    "\[\r\n\]#0 .* hitbottom \\(\\) "
-	    "\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
-	    "\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
-	    "\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
-	    "\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
-	    "\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
-	    "\[\r\n\]#6 .* test_struct_args \\(\\) "
-	    "\[\r\n\]#7 .* main \\(.*\\) at "
-	}
-    } else {
-	fail "recursive passing of structs by value (sparclet)"
+    gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
+	"\[\r\n\]#0 .* hitbottom \\(\\) "
+	"\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
+	"\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
+	"\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
+	"\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
+	"\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
+	"\[\r\n\]#6 .* test_struct_args \\(\\) "
+	"\[\r\n\]#7 .* main \\(.*\\) at "
     }
     gdb_stop_suppressing_tests
 }
@@ -1018,9 +1015,9 @@ proc localvars_in_indirect_call { } {
 
     gdb_test_multiple "finish" "finish from indirectly called function" {
 	-re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" {
-	    #On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than 
-	    #hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary 
-	    #to continue the test.
+	    # If the branch instruction is not the last instruction in the
+	    # function call line, we'll stop at that line, and need an extra
+	    # "step" to continue the test.
 	    send_gdb "step\n"
 	    exp_continue
 	}
@@ -1159,7 +1156,7 @@ gdb_test_no_output "set print frame-argu
 
 integral_args
 unsigned_integral_args
-if {![target_info exists gdb,skip_float_tests]} {
+if {!$skip_float_test} {
   float_and_integral_args
 }
 
@@ -1169,7 +1166,7 @@ if [support_complex_tests] {
 
     complex_integral_args
 
-    if {![target_info exists gdb,skip_float_tests]} {
+    if {!$skip_float_test} {
 	complex_float_integral_args
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptr.c ./gdb/testsuite/gdb.base/func-ptr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/func-ptr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptr.exp ./gdb/testsuite/gdb.base/func-ptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/func-ptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,12 +17,12 @@
 # Trying to print foo->bar if foo is a pointer to a typedef of a pointer
 # to a function will put gdb into an infinite loop.
 
-if { [prepare_for_testing func-ptr.exp "func-ptr" {func-ptr.c} {debug}] } {
+if { [prepare_for_testing "failed to prepare" "func-ptr" {func-ptr.c} {debug}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptrs.c ./gdb/testsuite/gdb.base/func-ptrs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptrs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/func-ptrs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptrs.exp ./gdb/testsuite/gdb.base/func-ptrs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/func-ptrs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/func-ptrs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 set testname func-ptrs
 set srcfile ${testname}.c
-if { [prepare_for_testing ${testname}.exp ${testname} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testname} ${srcfile}] } {
     return -1
 }
 
 if { ![runto_main] } {
-    untested ${testname}.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-buffer-overflow.c ./gdb/testsuite/gdb.base/gcore-buffer-overflow.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-buffer-overflow.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-buffer-overflow.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp ./gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-buffer-overflow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set pattern  012345678901234567890123456
 append binfile -${pattern}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -32,10 +32,10 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 clean_restart ${binfile}
 
 gdb_test_no_output "set args ${pattern}"	\
-    "Set buffer exceeding arguments"
+    "set buffer exceeding arguments"
 
 if { ! [ runto_main ] } then {
-    untested gcore-buffer-overflow.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore.c ./gdb/testsuite/gdb.base/gcore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2002-2015 Free Software Foundation, Inc.
+/* Copyright 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,6 +46,8 @@ array_func ()
       un_initialized_array[i] = extern_array[i] + 8;
       local_array[i] = extern_array[i] + 12;
     }
+  /* Reference static_array so that clang doesn't discard it.  */
+  (void) static_array[0];
   terminal_func ();
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore.exp ./gdb/testsuite/gdb.base/gcore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,12 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if { ! [ runto_main ] } then {
-    untested gcore.exp
+    untested "couldn't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro.exp ./gdb/testsuite/gdb.base/gcore-relro.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-relro.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ set objfile [standard_output_file ${test
 
  if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
       || [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != "" } {
-      untested ${testfile}.exp
+      untested "failed to compile"
       return -1
  }
  set opts [list debug shlib=${binfile_lib} additional_flags=-Wl,-z,relro]
@@ -36,7 +36,7 @@ set objfile [standard_output_file ${test
  }
 
 clean_restart ${binfile}
-gdb_load_shlibs ${binfile_lib}
+gdb_load_shlib ${binfile_lib}
 
 if ![runto lib] {
     return -1
@@ -49,7 +49,7 @@ if {![gdb_gcore_cmd $gcorefile "save a c
 # Now restart gdb and load the corefile.
 
 clean_restart ${binfile}
-gdb_load_shlibs ${binfile_lib}
+gdb_load_shlib ${binfile_lib}
 
 gdb_test "core ${gcorefile}" "Core was generated by .*" "re-load generated corefile"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-lib.c ./gdb/testsuite/gdb.base/gcore-relro-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-relro-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-main.c ./gdb/testsuite/gdb.base/gcore-relro-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-relro-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-pie.c ./gdb/testsuite/gdb.base/gcore-relro-pie.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-pie.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-relro-pie.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-pie.exp ./gdb/testsuite/gdb.base/gcore-relro-pie.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gcore-relro-pie.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gcore-relro-pie.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -Wl,-z,relro"}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -Wl,-z,relro"}]} {
     return -1
 }
 
@@ -41,7 +41,7 @@ clean_restart ${stripped_binfile}
 
 # The binary is stripped of debug info, but not minsyms.
 if ![runto break_here] {
-    fail "Can't run to break_here"
+    fail "can't run to break_here"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1056.exp ./gdb/testsuite/gdb.base/gdb1056.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1056.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1056.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,5 +39,5 @@ gdb_test_multiple "print 1/0" "" {
 	kfail "gdb/1056" "print 1/0"
     }
 }
-gdb_test "print 1U/0" ".*Division by zero.*" "Test unsigned division by zero"
+gdb_test "print 1U/0" ".*Division by zero.*" "test unsigned division by zero"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1090.c ./gdb/testsuite/gdb.base/gdb1090.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1090.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1090.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test program for multi-register variable.
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This file is part of the gdb testsuite.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1090.exp ./gdb/testsuite/gdb.base/gdb1090.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1090.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1090.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,13 +24,12 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11530.c ./gdb/testsuite/gdb.base/gdb11530.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11530.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb11530.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    Contributed by Pierre Muller.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11530.exp ./gdb/testsuite/gdb.base/gdb11530.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11530.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb11530.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if { ![test_compiler_info gcc*] } {
     return 0
 }
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11531.c ./gdb/testsuite/gdb.base/gdb11531.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11531.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb11531.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    Contributed by Pierre Muller.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11531.exp ./gdb/testsuite/gdb.base/gdb11531.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb11531.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb11531.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
     return -1
 }
 
@@ -50,7 +50,7 @@ delete_breakpoints
 
 set nl "\[\r\n\]+"
 
-gdb_test "watch myrec.x" ".*atchpoint \[0-9\]+: myrec\.x" "Set watchpoint"
+gdb_test "watch myrec.x" ".*atchpoint \[0-9\]+: myrec\.x" "set watchpoint"
 
 gdb_test "next" \
     ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 0${nl}New value = 5${nl}.*" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1250.c ./gdb/testsuite/gdb.base/gdb1250.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1250.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1250.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test program for stack trace through noreturn function.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This file is part of the gdb testsuite.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1250.exp ./gdb/testsuite/gdb.base/gdb1250.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1250.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1250.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested gdb1250.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555.c ./gdb/testsuite/gdb.base/gdb1555.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1555.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test step/next in a shared library
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555.exp ./gdb/testsuite/gdb.base/gdb1555.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1555.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,10 +42,10 @@ if { [gdb_compile_shlib $libsrc $libobj 
 }
 
 clean_restart ${binfile}
-gdb_load_shlibs $libobj
+gdb_load_shlib $libobj
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555-main.c ./gdb/testsuite/gdb.base/gdb1555-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1555-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1555-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test step/next in a shared library
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1821.c ./gdb/testsuite/gdb.base/gdb1821.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1821.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1821.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test printing of structure member names in gdb. PR exp/1821
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1821.exp ./gdb/testsuite/gdb.base/gdb1821.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb1821.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb1821.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,8 +24,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbhistsize-history.exp ./gdb/testsuite/gdb.base/gdbhistsize-history.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbhistsize-history.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbhistsize-history.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,37 +18,42 @@
 # Test the setting of "history size" via the GDBHISTSIZE environment variable
 
 
+# We cannot expect remote hosts to see environment variables set on the
+# local machine.
+
+if { [is_remote host] } {
+    unsupported "can't set environment variables on remote host"
+    return -1
+}
+
 # Check that the history size is properly set to SIZE when the environment
 # variable ENV_VAR is set to GDBHISTSIZE.
 
 proc test_histsize_history_setting { histsize size { env_var "GDBHISTSIZE" } } {
     global env
 
-    set have_old_gdbhistsize 0
-    if [info exists env($env_var)] {
-        set have_old_gdbhistsize 1
-        set old_gdbhistsize $env($env_var)
-    }
-    set env($env_var) $histsize
-
-    with_test_prefix "histsize=$histsize" {
-	gdb_exit
-	gdb_start
-
-	gdb_test "show history size" "The size of the command history is $size."
-
-	if { $size == "0" } {
-	    gdb_test_no_output "show commands"
-	} elseif { $size != "1" } {
-	    gdb_test "show commands" \
-		     "    .  show history size\r\n    .  show commands"
-	}
-
-	if { $have_old_gdbhistsize } {
-	    set env($env_var) $old_gdbhistsize
-	} else {
-	    unset env($env_var)
-	}
+    save_vars { env(GDBHISTFILE) env(GDBHISTSIZE) env($env_var) } {
+	# These environment variables take precedence over whatever
+	# history size is set in .gdbinit.  Make sure the former is not
+	# set.
+	unset -nocomplain env(GDBHISTFILE)
+	unset -nocomplain env(GDBHISTSIZE)
+
+	set env($env_var) $histsize
+
+	with_test_prefix "histsize=$histsize" {
+	    gdb_exit
+	    gdb_start
+
+	    gdb_test "show history size" "The size of the command history is $size."
+
+	    if { $size == "0" } {
+		gdb_test_no_output "show commands"
+	    } elseif { $size != "1" } {
+		gdb_test "show commands" \
+		         "    .  show history size\r\n    .  show commands"
+	    }
+        }
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs.c ./gdb/testsuite/gdb.base/gdbindex-stabs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbindex-stabs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs-dwarf.c ./gdb/testsuite/gdb.base/gdbindex-stabs-dwarf.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs-dwarf.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbindex-stabs-dwarf.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs.exp ./gdb/testsuite/gdb.base/gdbindex-stabs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbindex-stabs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbindex-stabs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ set objfile_dwarf [standard_output_file 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile_stabs}" ${objfile_stabs} object {additional_flags=-gstabs}] != ""
     || [gdb_compile "${srcdir}/${subdir}/${srcfile_dwarf}" ${objfile_dwarf} object {additional_flags=-gdwarf-2}] != ""
     || [gdb_compile "${objfile_stabs} ${objfile_dwarf}" ${binfile} executable {nodebug}] != ""} {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbinit-history.exp ./gdb/testsuite/gdb.base/gdbinit-history.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbinit-history.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbinit-history.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,14 @@
 
 # Test the setting of "history size" via $HOME/.gdbinit
 
+# This test depends on being able to set $HOME and $GDBHISTSIZE.
+# We cannot expect remote hosts to see environment variables set on the
+# local machine.
+
+if { [is_remote host] } {
+    unsupported "can't set environment variables on remote host"
+    return -1
+}
 
 # Check that the history size is properly set to SIZE when reading the .gdbinit
 # file located in HOME with the environment variable GDBHISTSIZE optionally
@@ -28,44 +36,39 @@ proc test_gdbinit_history_setting { home
     global srcdir
     global subdir
 
-    array set old_env [array get env]
-
-    set env(HOME) "$srcdir/$subdir/$home"
+    save_vars { INTERNAL_GDBFLAGS env(GDBHISTFILE) env(GDBHISTSIZE) env(HOME) } {
+	set env(HOME) "$srcdir/$subdir/$home"
 
-    # The GDBHISTSIZE environment variable takes precedence over whatever
-    # history size is set in .gdbinit.  Make sure the former is not
-    # set.
-    unset -nocomplain env(GDBHISTSIZE)
+	# These environment variables take precedence over whatever
+	# history size is set in .gdbinit.  Make sure the former is not
+	# set.
+	unset -nocomplain env(GDBHISTFILE)
+	unset -nocomplain env(GDBHISTSIZE)
 
-    if { $gdbhistsize_val != "-" } {
-	set env(GDBHISTSIZE) $gdbhistsize_val
-    }
+	if { $gdbhistsize_val != "-" } {
+	    set env(GDBHISTSIZE) $gdbhistsize_val
+	}
 
-    set saved_internal_gdbflags $INTERNAL_GDBFLAGS
-    set INTERNAL_GDBFLAGS [string map {"-nx" ""} $INTERNAL_GDBFLAGS]
+	set INTERNAL_GDBFLAGS [string map {"-nx" ""} $INTERNAL_GDBFLAGS]
 
-    set prefix "home=$home"
-    if { $gdbhistsize_val != "-" } {
-	append prefix " gdbhistsize=$gdbhistsize_val"
-    }
+	set prefix "home=$home"
+	if { $gdbhistsize_val != "-" } {
+	    append prefix " gdbhistsize=$gdbhistsize_val"
+	}
 
-    with_test_prefix $prefix {
-	gdb_exit
-	gdb_start
-
-	gdb_test "show history size" "The size of the command history is $size."
-
-	if { $size == "0" } {
-	    gdb_test_no_output "show commands"
-	} elseif { $size != "1" } {
-	    gdb_test "show commands" "    .  show history size\r\n    .  show commands"
+	with_test_prefix $prefix {
+	    gdb_exit
+	    gdb_start
+
+	    gdb_test "show history size" "The size of the command history is $size."
+
+	    if { $size == "0" } {
+		gdb_test_no_output "show commands"
+	    } elseif { $size != "1" } {
+		gdb_test "show commands" "    .  show history size\r\n    .  show commands"
+	    }
 	}
     }
-
-    set INTERNAL_GDBFLAGS $saved_internal_gdbflags
-
-    unset -nocomplain env(GDBHISTSIZE)
-    array set env [array get old_env]
 }
 
 # Check that the history file does not get truncated to zero when a gdbinit
@@ -75,53 +78,48 @@ proc test_no_truncation_of_unlimited_his
     global env
     global INTERNAL_GDBFLAGS
 
-    array set old_env [array get env]
-
-    # The GDBHISTSIZE environment variable takes precedence over whatever
-    # history size is set in .gdbinit.  Make sure the former is not
-    # set.
-    unset -nocomplain env(GDBHISTSIZE)
-
-    set saved_internal_gdbflags $INTERNAL_GDBFLAGS
-
-    set temp_gdbinit [standard_output_file "gdbinit-history.gdbinit"]
-    set temp_histfile [standard_output_file "gdbinit-history.gdb_history"]
-    file delete $temp_gdbinit
-    file delete $temp_histfile
-
-    set fd [open $temp_gdbinit "w"]
-    puts $fd "set history size unlimited\n"
-    puts $fd "set history filename $temp_histfile\n"
-    puts $fd "set history save\n"
-    close $fd
-
-    append INTERNAL_GDBFLAGS " -x $temp_gdbinit"
-
-    # We have to start then exit GDB twice: the first time to test the creation
-    # of the initial history file, and the second time to test appending to it.
-    # In either case the initial "print 1" command should persist through the
-    # history file.
-    with_test_prefix "truncation" {
-	gdb_exit
-	gdb_start
-	gdb_test "print 1"
+    save_vars { INTERNAL_GDBFLAGS env(GDBHISTFILE) env(GDBHISTSIZE) } {
+	# These environment variables take precedence over whatever
+	# history size is set in .gdbinit.  Make sure the former is not
+	# set.
+	unset -nocomplain env(GDBHISTFILE)
+	unset -nocomplain env(GDBHISTSIZE)
+
+	set temp_gdbinit [standard_output_file "gdbinit-history.gdbinit"]
+	set temp_histfile [standard_output_file "gdbinit-history.gdb_history"]
+	file delete $temp_gdbinit
+	file delete $temp_histfile
+
+	set fd [open $temp_gdbinit "w"]
+	puts $fd "set history size unlimited\n"
+	puts $fd "set history filename $temp_histfile\n"
+	puts $fd "set history save\n"
+	close $fd
+
+	append INTERNAL_GDBFLAGS " -x $temp_gdbinit"
+
+	# We have to start then exit GDB twice: the first time to test the creation
+	# of the initial history file, and the second time to test appending to it.
+	# In either case the initial "print 1" command should persist through the
+	# history file.
+	with_test_prefix "truncation" {
+	    gdb_exit
+	    gdb_start
+	    gdb_test "print 1"
 
-	with_test_prefix "creating" {
+	    with_test_prefix "creating" {
 		gdb_exit
 		gdb_start
 		gdb_test "server show commands" "    .  print 1.*"
-	}
+	    }
 
-	with_test_prefix "appending" {
+	    with_test_prefix "appending" {
 		gdb_exit
 		gdb_start
 		gdb_test "server show commands" "    .  print 1.*"
-	}
+	    }
+        }
     }
-
-    set INTERNAL_GDBFLAGS $saved_internal_gdbflags
-
-    array set env [array get old_env]
 }
 
 test_gdbinit_history_setting "gdbinit-history/unlimited" "unlimited"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm-2.exp ./gdb/testsuite/gdb.base/gdb-sigterm-2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm-2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb-sigterm-2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that GDB promptly quits after receiving a SIGTERM while no proper
+# target is active.
+
+gdb_start
+
+set gdb_pid [exp_pid -i [board_info host fileid]]
+remote_exec host "kill -TERM $gdb_pid"
+
+set test "expect eof"
+gdb_test_multiple "" $test {
+    -timeout 5
+    eof {
+	pass $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm.c ./gdb/testsuite/gdb.base/gdb-sigterm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb-sigterm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm.exp ./gdb/testsuite/gdb.base/gdb-sigterm.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdb-sigterm.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdb-sigterm.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbvars.exp ./gdb/testsuite/gdb.base/gdbvars.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gdbvars.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gdbvars.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso.c ./gdb/testsuite/gdb.base/global-var-nested-by-dso.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/global-var-nested-by-dso.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp ./gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/global-var-nested-by-dso.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,13 +29,13 @@ set binfile_lib2 [standard_output_file $
 
 if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \
 	[list debug additional_flags=-fPIC]] != "" } {
-  untested "Could not compile $binfile_lib1."
+  untested "failed to compile shared library 1"
   return -1
 }
 
 if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \
 	[list debug additional_flags=-fPIC]] != "" } {
-  untested "Could not compile $binfile_lib2."
+  untested "failed to compile shared library 2"
   return -1
 }
 
@@ -45,6 +45,8 @@ if { [gdb_compile $srcdir/$subdir/$srcfi
 }
 
 clean_restart $binfile
+gdb_load_shlib $binfile_lib1
+gdb_load_shlib $binfile_lib2
 
 if { ![runto_main] } {
   return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso-solib1.c ./gdb/testsuite/gdb.base/global-var-nested-by-dso-solib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso-solib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/global-var-nested-by-dso-solib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso-solib2.c ./gdb/testsuite/gdb.base/global-var-nested-by-dso-solib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/global-var-nested-by-dso-solib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/global-var-nested-by-dso-solib2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-debugdata.c ./gdb/testsuite/gdb.base/gnu-debugdata.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-debugdata.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu-debugdata.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-debugdata.exp ./gdb/testsuite/gdb.base/gnu-debugdata.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-debugdata.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu-debugdata.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc.c ./gdb/testsuite/gdb.base/gnu-ifunc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu-ifunc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,6 +35,10 @@ final (int arg)
 
 volatile int gnu_ifunc_initialized;
 
+/* This stores the argument received by the ifunc resolver.  */
+
+volatile unsigned long resolver_hwcap = -1;
+
 static void
 gnu_ifunc_pre (void)
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc.exp ./gdb/testsuite/gdb.base/gnu-ifunc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu-ifunc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,17 +52,17 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/$libsrc $lib_so $lib_opts] != ""
      || [gdb_compile ${srcdir}/${subdir}/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile dynamic executable $binfile."
+    untested "failed to compile first testcase"
     return -1
 }
 
 # Start with a fresh gdb.
 
 clean_restart $executable
-gdb_load_shlibs ${lib_so}
+gdb_load_shlib ${lib_so}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 1
 }
 
@@ -76,6 +76,21 @@ gdb_continue_to_breakpoint "break-at-cal
 
 gdb_test "p gnu_ifunc (3)" " = 4"
 
+# Test that the resolver received its argument.
+
+set actual_hwcap "0x0"
+set test "info auxv"
+gdb_test_multiple $test $test {
+    -re "\r\n\\d+\\s+AT_HWCAP\[^\r\n\]+($hex)\r\n.*$gdb_prompt $" {
+	set actual_hwcap $expect_out(1,string)
+    }
+    -re ".*$gdb_prompt $" {
+	pass "$test (no HWCAP)"
+    }
+}
+
+gdb_test "p/x resolver_hwcap" "= $actual_hwcap" "resolver received HWCAP"
+
 # Test GDB will skip the gnu_ifunc resolver on first call.
 
 gdb_test "step" "\r\nfinal .*"
@@ -129,7 +144,7 @@ gdb_test "info sym $expect_out(1,string)
 
 if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o" $staticbinfile executable {debug}] != "" } {
-    untested "Could not compile static executable $staticbinfile."
+    untested "failed to compile second testcase"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc-lib.c ./gdb/testsuite/gdb.base/gnu-ifunc-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu-ifunc-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu-ifunc-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 extern volatile int gnu_ifunc_initialized;
+extern volatile unsigned long resolver_hwcap;
 extern int init_stub (int arg);
 extern int final (int arg);
 
@@ -24,8 +25,9 @@ typedef int (*final_t) (int arg);
 asm (".type gnu_ifunc, %gnu_indirect_function");
 
 final_t
-gnu_ifunc (void)
+gnu_ifunc (unsigned long hwcap)
 {
+  resolver_hwcap = hwcap;
   if (! gnu_ifunc_initialized)
     return init_stub;
   else
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu_vector.c ./gdb/testsuite/gdb.base/gnu_vector.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu_vector.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu_vector.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
    Contributed by Ken Werner <ken.werner@de.ibm.com>  */
 
 #include <stdarg.h>
-#include <stdio.h>
 
 #define VECTOR(n, type)					\
   type __attribute__ ((vector_size (n * sizeof(type))))
@@ -139,10 +138,10 @@ main ()
   int4 res;
 
   res = add_some_intvecs (i4a, i4a + i4b, i4b);
-  printf ("%d %d %d %d\n", res[0], res[1], res[2], res[3]);
 
   res = add_some_intvecs (i4a, i4a + i4b, i4b);
-  printf ("%d %d %d %d\n", res[0], res[1], res[2], res[3]);
+
+  add_some_intvecs (i4a, i4a + i4b, i4b);
 
   return 0;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu_vector.exp ./gdb/testsuite/gdb.base/gnu_vector.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/gnu_vector.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/gnu_vector.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,11 +25,19 @@ standard_testfile .c
 # without a CPU option.  If all variants fail, assume that the
 # compiler can not handle GNU vectors.
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable {debug quiet additional_flags=-mcpu=native}] != ""
-     && [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable {debug quiet additional_flags=-march=native}] != ""
-     && [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable {debug quiet}] != ""} {
-    untested "compiler can't handle the vector_size attribute?"
-    return -1
+proc do_compile { {opts {}} } {
+    global srcdir subdir srcfile binfile
+    set ccopts {debug quiet}
+    foreach opt $opts {lappend ccopts "additional_flags=$opt"}
+    gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $ccopts
+}
+
+if { [do_compile {-mcpu=native}] != ""
+     && [do_compile {-mcpu=native -Wno-psabi}] != ""
+     && [do_compile {-march=native}] != ""
+     && [do_compile] != ""} {
+	untested "compiler can't handle vector_size attribute?"
+	return -1
 }
 
 clean_restart ${binfile}
@@ -177,31 +185,74 @@ gdb_test "ptype struct_with_vector_1" "t
 
 # Test inferior function calls with vector arguments and/or vector
 # return values.
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
+if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*" ] } {
+    # These platforms don't support infcalls with vector arguments
+    # and/or vector return values, so skip the remaining tests.
+    # See also PR exp/18537.
+    unsupported "skip remaining vector ABI tests on this arch"
+    return
+}
 gdb_test "print add_some_intvecs(i4a, i4b, 3 * i4a)" "= \\{17, 34, 72, 132\\}" \
     "call add_some_intvecs"
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
 gdb_test "print add_many_charvecs(c4, c4, c4, c4, c4, c4, c4, c4, c4, c4)" \
     "= \\{10, 20, 30, 40\\}" "call add_many_charvecs"
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
 gdb_test "print add_various_floatvecs(2, f4a, f4b)" "= \\{3, 6, 16, 20\\}" \
     "call add_various_floatvecs"
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
 gdb_test "print add_structvecs(i2, (struct just_int2)\{2*i2\}, (struct two_int2)\{3*i2, 4*i2\})" \
     "= \\{i = \\{10, 20\\}\\}" "call add_structvecs"
 gdb_test "print add_singlevecs((char1) \{6\}, (int1) \{12\}, (double1) \{24\})" "= \\{42\\}" \
     "call add_singlevecs"
 
-# Test vector return value handling with "finish" and "return".
+# Test "finish" from vector-valued function.
 gdb_breakpoint "add_some_intvecs"
 gdb_continue "add_some_intvecs"
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
-gdb_test "finish" "Value returned is .* = \\{10, 20, 48, 72\\}" \
-    "finish shows vector return value"
+set test "finish shows vector return value"
+gdb_test_multiple "finish" $test {
+    -re "Value returned is .* = \\{10, 20, 48, 72\\}.*$gdb_prompt $" {
+	pass $test
+    }
+    -re "Value returned has type: .* Cannot determine contents.*$gdb_prompt $" {
+	kfail "gdb/8549" $test
+    }
+}
+
 gdb_continue "add_some_intvecs"
-gdb_test "return (int4) \{4, 2, 7, 6\}" \
-    "#0 .* main .*" \
-    "set vector return value" \
-    "Make add_some_intvecs return now. .y or n.*" "y"
-setup_kfail gdb/18537 "i?86-*-*" "x86_64-*-*"
-gdb_test "continue" "4 2 7 6\r\n.*" "verify vector return value"
+gdb_test "up" ""
+gdb_test "p res" "\\{10, 20, 48, 72\\}.*"
+gdb_test "down" ""
+
+
+# Test "return" from vector-valued function.
+set test "return from vector-valued function"
+set should_kfail 0
+gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
+    -re "#0 .* main .*$gdb_prompt $" {
+	pass $test
+    }
+    -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" {
+	# This happens, e.g., on s390x unless using the vector ABI.
+	set should_kfail 1
+	exp_continue
+    }
+    -re "Make add_some_intvecs return now. .y or n. $" {
+	send_gdb "y\n"
+	exp_continue
+    }
+}
+
+gdb_test "next" ""
+set test "verify vector return value"
+gdb_test_multiple "p res" $test {
+    -re ".*= \\{4, 2, 7, 6\\}\r\n.*$gdb_prompt $" {
+	pass $test
+    }
+    -re ".*= \\{.*\\}\r\n.*$gdb_prompt $" {
+	if { $should_kfail } {
+	    # GDB had not actually set the return value, likely due to
+	    # PR 8549.  So accept any return value and emit a KFAIL.
+	    kfail "gdb/8549" $test
+	} else {
+	    fail $test
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline1.exp ./gdb/testsuite/gdb.base/hashline1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline1.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hashline1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ close $fd
 # the bug.  Using $new_srcfile here won't trigger the bug.
 set compile_name [relative_filename $objdir $new_srcfile]
 if { [gdb_compile $compile_name "${binfile}" executable {debug}] != "" } {
-    untested hashline1.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline2.exp ./gdb/testsuite/gdb.base/hashline2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hashline2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ puts $fd "int main () { return 0; } /* s
 close $fd
 
 if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
-    untested hashline2.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline3.exp ./gdb/testsuite/gdb.base/hashline3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hashline3.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hashline3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ puts $fd "int main () { return 0; } /* s
 close $fd
 
 if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
-    untested hashline3.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak2.exp ./gdb/testsuite/gdb.base/hbreak2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 # the number available.
 
 
-if { [prepare_for_testing hbreak2.exp "hbreak2" {break.c break1.c} {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" "hbreak2" {break.c break1.c} {debug nowarnings}] } {
     return -1
 }
 set srcfile break.c
@@ -133,12 +133,6 @@ set bp_location6 [gdb_get_line_number "s
 
 set main_line $bp_location6
 
-if {$hp_aCC_compiler} {
-    set proto "\\(int\\)"
-} else {
-    set proto ""
-}
-
 set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
 set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
 
@@ -347,7 +341,7 @@ gdb_test "hbreak $bp_location12 thread 9
     "thread-specific hardware breakpoint on non-existent thread disallowed"
 
 gdb_test "hbreak $bp_location12 thread foo" \
-    "Junk after thread keyword.*" \
+    "Invalid thread ID: foo" \
     "thread-specific hardware breakpoint on bogus thread ID disallowed"
 
 # Verify that GDB responds gracefully to a breakpoint command with
@@ -397,32 +391,20 @@ gdb_test "hbreak marker2" \
     "set hardware breakpoint on to-be-called function"
 
 gdb_test "print marker2(99)" \
-    "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2$proto. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.*" \
+    "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.*" \
     "hit hardware breakpoint on called function"
 
 # As long as we're stopped (breakpointed) in a called function,
 # verify that we can successfully backtrace & such from here.
-#
-# In this and the following test, the _sr4export check apparently is needed
-# for hppa*-*-hpux.
-#
-gdb_test_multiple "bt" "backtrace while in called function" {
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-}
+gdb_test "bt" \
+    "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+    "backtrace while in called function"
 
 # Return from the called function.  For remote targets, it's important to do
 # this before runto_main, which otherwise may silently stop on the dummy
 # breakpoint inserted by GDB at the program's entry point.
 #
 gdb_test_multiple "finish" "finish from called function" {
-    -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
-	pass "finish from called function"
-    }
     -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
 	pass "finish from called function"
     }
@@ -528,7 +510,7 @@ test_next_with_recursion
 # Build a new file with optimization enabled so that we can try breakpoints
 # on targets with optimized prologues.
 
-if { [prepare_for_testing hbreak2.exp "hbreak2o2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
+if { [prepare_for_testing "failed to prepare" "hbreak2o2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak.c ./gdb/testsuite/gdb.base/hbreak.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak.exp ./gdb/testsuite/gdb.base/hbreak.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_hw_breakpoint_tests]} {
 
 set test hbreak
 set srcfile ${test}.c
-if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${test} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.c ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,15 +36,15 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib_src} ${lib_so} $lib_opts] != ""
      || [gdb_compile ${srcdir}/${subdir}/${main_src} ${binfile} executable $exec_opts] != ""} {
-    untested "Could not compile ${subdir}/$lib_src or ${subdir}/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $binfile
-gdb_load_shlibs $lib_so
+gdb_load_shlib $lib_so
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported-shr.c ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported-shr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported-shr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak-in-shr-unsupported-shr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-unmapped.c ./gdb/testsuite/gdb.base/hbreak-unmapped.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-unmapped.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak-unmapped.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-unmapped.exp ./gdb/testsuite/gdb.base/hbreak-unmapped.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hbreak-unmapped.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hbreak-unmapped.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,13 +24,13 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
 # If we can read the memory at address 0, skip the test.
 if { [is_address_zero_readable] } {
-    untested "Memory at address 0 is readable"
+    untested "memory at address 0 is readable"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/help.exp ./gdb/testsuite/gdb.base/help.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/help.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/help.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ test_class_help "user-defined" {
 }
 
 # Test help of an abbreviated command.  "break" is picked at random.
-set help_breakpoint_text "Set breakpoint at specified line or function\..*"
+set help_breakpoint_text "Set breakpoint at specified location\..*"
 # test help breakpoint "b" abbreviation
 gdb_test "help b" $help_breakpoint_text "help breakpoint \"b\" abbreviation"
 # test help breakpoint "br" abbreviation
@@ -78,7 +78,7 @@ gdb_test "help bt" $help_backtrace_text 
 gdb_test "help backtrace" $help_backtrace_text "help backtrace"
 
 # test help commands
-gdb_test "help commands" "Set commands to be executed when a breakpoint is hit\.\[\r\n\]+Give breakpoint number as argument after \"commands\"\.\[\r\n\]+With no argument, the targeted breakpoint is the last one set\.\[\r\n\]+The commands themselves follow starting on the next line\.\[\r\n\]+Type a line containing \"end\" to indicate the end of them\.\[\r\n\]+Give \"silent\" as the first line to make the breakpoint silent;\[\r\n\]+then no output is printed when it is hit, except what the commands print\." "help commands"
+gdb_test "help commands" "Set commands to be executed when the given breakpoints are hit\.\[\r\n\]+Give a space-separated breakpoint list as argument after \"commands\"\.\[\r\n\]+A list element can be a breakpoint number \\(e.g. `5'\\) or a range of numbers\[\r\n\]+\\(e.g. `5-7'\\)\.\[\r\n\]+With no argument, the targeted breakpoint is the last one set\.\[\r\n\]+The commands themselves follow starting on the next line\.\[\r\n\]+Type a line containing \"end\" to indicate the end of them\.\[\r\n\]+Give \"silent\" as the first line to make the breakpoint silent;\[\r\n\]+then no output is printed when it is hit, except what the commands print\." "help commands"
 
 # Test a prefix command.  "delete" is picked at random.
 # test help delete "d" abbreviation
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/history-duplicates.exp ./gdb/testsuite/gdb.base/history-duplicates.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/history-duplicates.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/history-duplicates.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -51,9 +51,16 @@ proc run_print_on_each_thing { things } 
     }
 }
 
-# By default the option is set to 0.
 gdb_exit
 gdb_start
+
+# These tests require readline support.
+if { ![readline_is_used] } {
+    unsupported "readline isn't used."
+    return -1
+}
+
+# By default the option is set to 0.
 gdb_test "show history remove-duplicates" "is 0\\."
 
 # Test the "unlimited" setting.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop.c ./gdb/testsuite/gdb.base/hook-stop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,38 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2009-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+void
+func (void)
+{
+  int a;
+
+  a = 1; /* set breakpoint here */
+  a = 2;
+}
+
+int
+main (int argc, char **argv)
+{
+  int i;
+
+  i = 1;
+  i = 2;
+  i = 3;
+  func ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-continue.c ./gdb/testsuite/gdb.base/hook-stop-continue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-continue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop-continue.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,42 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2008-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-funbreak (int i)
-{
-  i = i * 2; /* set breakpoint here */
-  i = i + 10;
-  return i;
-}
-
-int
-func (int i)
-{
-  return i * 2;
-}
-
-int
-main (int argc, char **argv, char **envp)
-{
-  func (1);
-  func (2);
-  func (3);
-  func (4);
-  funbreak (5);
-
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-continue.exp ./gdb/testsuite/gdb.base/hook-stop-continue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-continue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop-continue.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,52 +0,0 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-standard_testfile .c
-
-if { [prepare_for_testing ${testfile}.exp "${testfile}" "${testfile}.c" {debug nowarnings}] } {
-    return -1
-}
-
-if ![runto_main] then {
-    perror "Couldn't run to main"
-}
-
-set bp_location [gdb_get_line_number "set breakpoint here"]
-
-gdb_test "break $bp_location" \
-    "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
-    "breakpoint line number"
-
-gdb_test "print \$do_continue = 1" "1"
-
-send_gdb "define hook-stop\n"
-gdb_expect {
-  -re "Type commands for definition of \"hook-stop\".\r\nEnd with a line saying just \"end\".\r\n>$"\
-          {send_gdb "if \$do_continue\nset \$do_continue = 0\ncontinue\nend\nend\n"
-           gdb_expect {
-             -re "$gdb_prompt $"\
-                       {pass "define hook-stop command"}
-             timeout {fail "(timeout) define hook-stop command"}
-           }
-          }
-  -re "$gdb_prompt $"\
-          {fail "define hook-stop command"}
-  timeout {fail "(timeout) define hook-stop command"}
-}
-
-gdb_test "next" "Breakpoint.*funbreak \\(i=5\\) at .*:$bp_location\r\n$bp_location.*set breakpoint here \\*/" \
-    "next triggering hook-stop"
-
-gdb_test "next" "i = i \\+ 10;" "next no hook-stop"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop.exp ./gdb/testsuite/gdb.base/hook-stop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,168 @@
+# Copyright 2009-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if { [build_executable ${testfile}.exp "${testfile}" $srcfile {debug nowarnings}] } {
+    return -1
+}
+
+# Define the hook-stop that runs COMMANDS.
+
+proc define_hook_stop {commands} {
+    set test "define hook-stop command"
+    gdb_test_multiple "define hook-stop" "$test" {
+	-re "Type commands for definition of \"hook-stop\".\r\nEnd with a line saying just \"end\".\r\n>$" {
+	    gdb_test "$commands\nend" "" "$test"
+	}
+    }
+}
+
+# Restart GDB, run to main, set a breakpoint, and define a hook-stop
+# that runs COMMANDS.  If running to main fails, this returns to the
+# caller's caller directly.
+
+proc setup {commands} {
+    global srcfile binfile
+
+    clean_restart $binfile
+
+    if ![runto_main] then {
+	fail "can't run to main"
+	return -code return
+    }
+
+    gdb_test "break func" \
+	"Breakpoint.*at.* file .*$srcfile.*\\." \
+	"breakpoint line number"
+
+    define_hook_stop $commands
+}
+
+# Check that the hook-stop runs before the frame is printed.
+
+proc hook_stop_before_frame {} {
+    with_test_prefix "hook-stop runs before frame print" {
+	global gdb_prompt
+
+	setup "echo \"Hello.\""
+
+	set test "run hook-stop"
+	gdb_test_multiple "continue" "$test" {
+	    -re "\"Hello\\.\"\r\nBreakpo.*func.*set breakpoint here.*${gdb_prompt} $" {
+		pass $test
+	    }
+
+	    -re "Breakpo.*func.*set breakpoint here.*\"Hello\\.\".*${gdb_prompt} $" {
+		fail $test
+	    }
+	}
+    }
+}
+
+# Check that GDB gracefully handles the case of the inferior dying
+# while running the hook-stop.
+
+proc hook_stop_kill {} {
+    with_test_prefix "hook-stop kills inferior" {
+	global gdb_prompt
+
+	setup "kill"
+
+	gdb_test_no_output "set confirm off"
+
+	set test "run hook-stop"
+	gdb_test_multiple "continue" "$test" {
+	    -re "Continuing.\r\n${gdb_prompt} $" {
+		pass $test
+	    }
+	}
+
+	gdb_test "info threads" "No threads.*"
+    }
+}
+
+# Check that GDB gracefully handles the case of the hook-stop
+# continuing the inferior in the foreground.
+
+proc hook_stop_continue_fg {} {
+    with_test_prefix "hook-stop runs continue" {
+	global gdb_prompt
+
+	setup "if \$do_continue\nset \$do_continue = 0\ncontinue\nend"
+
+	gdb_test "print \$do_continue = 1" " = 1"
+
+	gdb_test "next" "Breakpoint.*func \\(\\) at .*set breakpoint here \\*/" \
+	    "next triggering hook-stop"
+
+	gdb_test "next" "a = 2;" "next no hook-stop"
+    }
+}
+
+# Check that GDB gracefully handles the case of the hook-stop
+# continuing the inferior in the background.
+
+proc hook_stop_continue_bg {} {
+    with_test_prefix "hook-stop runs continue&" {
+	global gdb_prompt
+
+	setup "if \$do_continue\nset \$do_continue = 0\ncontinue&\nend"
+
+	gdb_test "print \$do_continue = 1" " = 1"
+
+	set test "run hook-stop"
+	gdb_test_multiple "continue" "$test" {
+	    -re "Continuing.\r\n.*${gdb_prompt} " {
+		pass $test
+	    }
+	}
+
+	set test "inferior exits normally"
+	gdb_test_multiple "" "$test" {
+	    -re "exited normally" {
+		pass $test
+	    }
+	}
+	gdb_test "info threads" "No threads.*"
+    }
+}
+
+# Check that GDB gracefully handles the case of the hook-stop running
+# "next".  GDB used to print the stop event twice.
+
+proc hook_stop_next {} {
+    with_test_prefix "hook-stop runs next" {
+	global gdb_prompt
+
+	setup "next"
+
+	set test "run hook-stop"
+	gdb_test_multiple "continue" "$test" {
+	    -re "a = 2.*a = 2${gdb_prompt} $" {
+		fail $test
+	    }
+	    -re "a = 2.*${gdb_prompt} $" {
+		pass $test
+	    }
+	}
+    }
+}
+
+hook_stop_before_frame
+hook_stop_kill
+hook_stop_continue_fg
+hook_stop_continue_bg
+hook_stop_next
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-frame.c ./gdb/testsuite/gdb.base/hook-stop-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-frame.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop-frame.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2009-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-void
-func (void)
-{
-  int a;
-
-  a = 1; /* set breakpoint here */
-}
-
-int
-main (int argc, char **argv)
-{
-  func ();
-
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-frame.exp ./gdb/testsuite/gdb.base/hook-stop-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/hook-stop-frame.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/hook-stop-frame.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-standard_testfile
-
-if { [prepare_for_testing ${testfile}.exp "${testfile}" $srcfile {debug nowarnings}] } {
-    return -1
-}
-
-if ![runto_main] then {
-    perror "Couldn't run to main"
-}
-
-set bp_location [gdb_get_line_number "set breakpoint here"]
-
-gdb_test "break func" \
-    "Breakpoint.*at.* file .*$srcfile.*\\." \
-    "breakpoint line number"
-
-set test "define hook-stop command"
-gdb_test_multiple "define hook-stop" "$test" {
-    -re "Type commands for definition of \"hook-stop\".\r\nEnd with a line saying just \"end\".\r\n>$" {
-	gdb_test "echo \"Hello.\"\nend" "" "$test"
-    }
-}
-
-set test "hook-stop runs before frame print"
-gdb_test_multiple "continue" "$test" {
-    -re "\"Hello\\.\"\r\nBreakpo.*func.*set breakpoint here.*${gdb_prompt} $" {
-	pass $test
-    }
-
-    -re "Breakpo.*func.*set breakpoint here.*\"Hello\\.\".*${gdb_prompt} $" {
-	fail $test
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/huge.exp ./gdb/testsuite/gdb.base/huge.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/huge.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/huge.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2001-2015 Free Software Foundation, Inc.
+# Copyright 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ for { set size [expr 2 * 1024 * 1024] } 
       == "" } break
 }
 if { $size < 10 } {
-     untested huge.exp
+     untested "size less than 10"
      return -1
 }
 
@@ -43,10 +43,12 @@ set prev_timeout $timeout
 set timeout 30
 
 if { ! [ runto_main ] } then {
-    untested huge.exp
+    untested "couldn't run to main"
     return -1
 }
 
+gdb_test_no_output "set max-value-size unlimited"
+
 gdb_test "print a" ".1 = .0 .repeats \[0123456789\]+ times.." "print a very large data object"
 
 set timeout $prev_timeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ifelse.exp ./gdb/testsuite/gdb.base/ifelse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ifelse.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ifelse.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.c ./gdb/testsuite/gdb.base/included.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/included.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.exp ./gdb/testsuite/gdb.base/included.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/included.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,8 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 standard_testfile
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.h ./gdb/testsuite/gdb.base/included.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/included.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/included.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec2.c ./gdb/testsuite/gdb.base/infcall-exec2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infcall-exec2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (int argc, char ** argv)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec.c ./gdb/testsuite/gdb.base/infcall-exec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infcall-exec.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+main (int argc, char ** argv)
+{
+  const char *prog = "inf-exec2";
+
+  execlp (prog, prog, (char *) 0);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec.exp ./gdb/testsuite/gdb.base/infcall-exec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-exec.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infcall-exec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test an inferior function call which execs a new program.
+# This is a test for breakpoints/19546.
+
+standard_testfile
+
+set testfile2 "infcall-exec2"
+set srcfile2 "${testfile2}.c"
+set binfile2 [standard_output_file $testfile2]
+
+# Build the two executables for the test.
+if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
+    untested "could not build $binfile"
+    return -1
+}
+if {[gdb_compile $srcdir/$subdir/$srcfile2 $binfile2 executable debug] != ""} {
+    untested "could not build $binfile2"
+    return -1
+}
+
+clean_restart $binfile
+
+if {![runto_main]} {
+    untested "could not run to main"
+    return -1
+}
+
+set expected_result "process $decimal is executing new program: $binfile2"
+append expected_result "\[\r\n\]+.*"
+append expected_result "Breakpoint 1, main .*at .*$srcfile2:$decimal"
+append expected_result ".*"
+
+gdb_test "call execlp \(\"$binfile2\", \"$binfile2\", \(char \*\)0\)" \
+    $expected_result "call execlp"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-input.c ./gdb/testsuite/gdb.base/infcall-input.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-input.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infcall-input.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+some_function (void)
+{
+  /* Sleep a bit to make sure the next command is queued before this
+     function returns.  */
+  sleep (1);
+  return 1;
+}
+
+int
+main (int argc, char **argv)
+{
+  some_function ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-input.exp ./gdb/testsuite/gdb.base/infcall-input.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infcall-input.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infcall-input.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that gdb does not process input while a (synchronous) infcall
+# is in progress.
+
+standard_testfile
+
+if [target_info exists gdb,cannot_call_functions] {
+    unsupported "can not call functions"
+    continue
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+if ![runto_main] then {
+    fail "couldn't run to main"
+    return -1
+}
+
+# Run an infcall that takes a little bit to complete.
+send_gdb "print some_function()\n"
+
+# Send another command while the infcall is ongoing.  It must only be
+# processed after the infcall finishes.
+send_gdb "next\n"
+
+set test "print some_function()"
+gdb_test_multiple "" $test {
+    -re " = 1\r\n$gdb_prompt " {
+	pass $test
+    }
+}
+
+set test "next"
+gdb_test_multiple "" $test {
+    -re "return 0;\r\n$gdb_prompt " {
+	pass $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/inferior-died.c ./gdb/testsuite/gdb.base/inferior-died.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/inferior-died.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/inferior-died.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test for fork-related gdb bug
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/inferior-died.exp ./gdb/testsuite/gdb.base/inferior-died.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/inferior-died.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/inferior-died.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if { [is_remote target] || ![isnative] }
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
+if { ![istarget "*-*-linux*"] } then {
     unsupported "inferior-died.exp"
     continue
 }
@@ -33,7 +33,7 @@ if { ![support_displaced_stepping] } {
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.c] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${testfile}.c] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infnan.c ./gdb/testsuite/gdb.base/infnan.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infnan.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infnan.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test file is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infnan.exp ./gdb/testsuite/gdb.base/infnan.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infnan.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infnan.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,8 +17,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun.c ./gdb/testsuite/gdb.base/info-fun.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-fun.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun.exp ./gdb/testsuite/gdb.base/info-fun.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-fun.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -40,13 +40,13 @@ foreach libsepdebug {NO IN SEP} { with_t
     if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != ""
 	 || [gdb_compile $srcdir/$subdir/${srcfile} ${binfile} \
 		 executable $bin_flags] != "" } {
-      untested "Could not compile $binfile_lib or $binfile."
+      untested "failed to compile"
       return -1
     }
 
     if {$libsepdebug == "SEP"} {
 	if {[gdb_gnu_strip_debug $binfile_lib] != 0} {
-	    unsupported "Could not split debug of $binfile_lib."
+	    unsupported "could not split debug of $binfile_lib."
 	    return
 	} else {
 	    pass "split solib"
@@ -56,7 +56,7 @@ foreach libsepdebug {NO IN SEP} { with_t
     clean_restart $executable
 
     if ![runto_main] then {
-      fail "Can't run to main"
+      fail "can't run to main"
       return 0
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun-solib.c ./gdb/testsuite/gdb.base/info-fun-solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-fun-solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-fun-solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infoline.c ./gdb/testsuite/gdb.base/infoline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infoline.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infoline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infoline.exp ./gdb/testsuite/gdb.base/infoline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/infoline.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/infoline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-macros.exp ./gdb/testsuite/gdb.base/info-macros.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-macros.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-macros.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,13 @@ standard_testfile .c
 
 # Fission doesn't support macros yet.  Bug 15954.
 if [using_fission] {
-    untested ${testfile}.exp
+    untested "fission does not support macros yet"
     return -1
 }
 
 get_compiler_info
 if ![test_compiler_info gcc*] {
-  untested ${testfile}.exp
+  untested "no compiler info"
   return -1
 }
 
@@ -31,13 +31,12 @@ if ![test_compiler_info gcc*] {
 # command line, possibly overriding "-g3" (depending on gcc version).
 set options "additional_flags=-g3"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $options] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $options] } {
     return -1
 }
 
 if ![runto_main] {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-os.c ./gdb/testsuite/gdb.base/info-os.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-os.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-os.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-os.exp ./gdb/testsuite/gdb.base/info-os.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-os.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-os.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if [gdb_skip_xml_test] then {
 }
 
 # Compile test program.
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile {debug additional_flags=-lpthread}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-lpthread}] } {
     fail "cannot compile test program"
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-proc.exp ./gdb/testsuite/gdb.base/info-proc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-proc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-proc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,9 +20,8 @@ set ws "\[ \t\]+"
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
-    untested $testfile.exp
     return -1
 }
 
@@ -40,7 +39,7 @@ gdb_test_multiple "info proc" "info proc
 }
 
 if { ! [ runto_main ] } then {
-    untested info-proc.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared.c ./gdb/testsuite/gdb.base/info-shared.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-shared.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared.exp ./gdb/testsuite/gdb.base/info-shared.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-shared.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,18 +31,18 @@ set define2 -DSHLIB2_NAME=\"$binfile_lib
 
 if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \
 	  [list additional_flags=-fPIC]] != "" } {
-    untested "Could not compile $binfile_lib1."
+    untested "failed to compile shared library 1"
     return -1
 }
 
 if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \
 	  [list additional_flags=-fPIC]] != "" } {
-    untested "Could not compile $binfile_lib2."
+    untested "failed to compile shared library 2"
     return -1
 }
 
 set cflags "$define1 $define2"
-if { [prepare_for_testing $testfile.exp $testfile $srcfile \
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
 	  [list additional_flags=$cflags libs=-ldl]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared-solib1.c ./gdb/testsuite/gdb.base/info-shared-solib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared-solib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-shared-solib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared-solib2.c ./gdb/testsuite/gdb.base/info-shared-solib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-shared-solib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-shared-solib2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-target.exp ./gdb/testsuite/gdb.base/info-target.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/info-target.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/info-target.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 standard_testfile start.c
 
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interact.exp ./gdb/testsuite/gdb.base/interact.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interact.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interact.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interp.c ./gdb/testsuite/gdb.base/interp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interp.exp ./gdb/testsuite/gdb.base/interp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt.exp ./gdb/testsuite/gdb.base/interrupt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interrupt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1994-2015 Free Software Foundation, Inc.
+# Copyright 1994-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,11 @@ if [target_info exists gdb,nointerrupts]
     continue
 }
 
+if [target_info exists gdb,noinferiorio] {
+    verbose "Skipping interrupt.exp because of noinferiorio."
+    return
+}
+
 standard_testfile
 
 set options { debug }
@@ -26,7 +31,7 @@ if { ! [target_info exists gdb,nosignals
 }
 
 if {[build_executable $testfile.exp $testfile $srcfile $options] == -1} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -45,11 +50,6 @@ if ![file exists $binfile] then {
     if [runto_main] then {
 	global inferior_spawn_id gdb_spawn_id
 
-	if {[target_info exists gdb,noinferiorio] && $inferior_spawn_id == $gdb_spawn_id} {
-	    verbose "Skipping interrupt.exp because of noinferiorio."
-	    return
-	}
-
 	set msg "process is alive"
 	gdb_test_multiple "continue" $msg {
 	    -i "$inferior_spawn_id" -re "talk to me baby\r\n" {
@@ -99,11 +99,6 @@ if ![file exists $binfile] then {
 		return
 	    }
 	    -re "$gdb_prompt $" {
-		# On HPUX-11.0 'send "p func1 ()"' above
-		# terminates the program. A defect is pending on this
-		# issue [defect #DTS CHFts24203]. Hence calling setup_xfail
-		# below.
-	        setup_xfail "hppa*-*-*11*" CHFts24203
 		fail "call function when asleep (wrong output)"
 	    }
 	    default {
@@ -118,7 +113,6 @@ if ![file exists $binfile] then {
 		setup_xfail "vax-*-*"
 		setup_xfail "alpha-*-*"
 		setup_xfail "*-*-*bsd*"
-		setup_xfail "*-*-hpux*"
 		setup_xfail "*-*-*lynx*"
 		fail "$msg (stays asleep)"
 		# Send the inferior a newline to wake it up.
@@ -153,9 +147,6 @@ if ![file exists $binfile] then {
 	# The optional leading \r\n is in case we sent a newline above
 	# to wake the program, in which case the program now sends it
 	# back.
-        # FIXME: The pattern below leads to an expected success on HPUX-11.0
-        # but the success is spurious. Need to provide the right reg.expr.
-        # here.
 
 	set msg "echo data"
 	gdb_test_multiple "" $msg {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt-noterm.c ./gdb/testsuite/gdb.base/interrupt-noterm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt-noterm.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interrupt-noterm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt-noterm.exp ./gdb/testsuite/gdb.base/interrupt-noterm.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/interrupt-noterm.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/interrupt-noterm.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if [prepare_for_testing "failed to prepa
 gdb_test_no_output "set interactive-mode off"
 
 if ![runto main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-attach-pie.c ./gdb/testsuite/gdb.base/jit-attach-pie.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-attach-pie.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-attach-pie.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,61 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <stdint.h>
+#include <pthread.h>
+
+struct jit_code_entry
+{
+  struct jit_code_entry *next_entry;
+  struct jit_code_entry *prev_entry;
+  const char *symfile_addr;
+  uint64_t symfile_size;
+};
+
+struct jit_descriptor
+{
+  uint32_t version;
+  /* This type should be jit_actions_t, but we use uint32_t
+     to be explicit about the bitwidth.  */
+  uint32_t action_flag;
+  struct jit_code_entry *relevant_entry;
+  struct jit_code_entry *first_entry;
+};
+
+struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+
+void __jit_debug_register_code()
+{
+}
+
+static void *
+thread_proc (void *arg)
+{
+  sleep (60);
+  return arg;
+}
+
+int
+main (void)
+{
+  pthread_t thread;
+
+  pthread_create (&thread, NULL, thread_proc, 0);
+  pthread_join (thread, NULL);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-attach-pie.exp ./gdb/testsuite/gdb.base/jit-attach-pie.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-attach-pie.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-attach-pie.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if {![can_spawn_for_attach]} {
+    return 0
+}
+
+standard_testfile .c
+set executable ${testfile}
+
+if { [build_executable ${testfile}.exp $executable $srcfile \
+			  [list debug pthreads "additional_flags=-fPIE -pie"]] } {
+    return -1
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
+
+# gdb_load ("file" command) must not be executed for the bug reproducibility.
+# That includes prepare_for_testing or clean_restart.
+gdb_start
+
+set test "attach"
+gdb_test_multiple "attach $testpid" $test {
+    -re "Attaching to process $testpid\r\n.*Cannot insert breakpoint .*\r\n$gdb_prompt $" {
+	fail $test
+    }
+    -re "Attaching to process $testpid\r\n.*\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit.exp ./gdb/testsuite/gdb.base/jit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,28 +14,28 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 if {[skip_shlib_tests]} {
-    untested jit.exp
+    untested "skipping shared library tests"
     return -1
 }
 
 if {[get_compiler_info]} {
-    warning "Could not get compiler info"
-    untested jit.exp
+    untested "could not get compiler info"
     return 1
 }
 
-#
-# test running programs
-#
+# Compile the testcase program and library.  BINSUFFIX is the suffix
+# to append to the program and library filenames, to make them unique
+# between invocations.  OPTIONS is passed to gdb_compile when
+# compiling the program.
 
-proc compile_jit_test {testname options} {
+proc compile_jit_test {testname binsuffix options} {
     global testfile srcfile binfile srcdir subdir
     global solib_testfile solib_srcfile solib_binfile solib_binfile_test_msg
     global solib_binfile_target
 
     set testfile jit-main
     set srcfile ${testfile}.c
-    set binfile [standard_output_file $testfile]
+    set binfile [standard_output_file $testfile$binsuffix]
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	      executable [concat debug $options]] != "" } {
 	untested $testname
@@ -44,8 +44,8 @@ proc compile_jit_test {testname options}
 
     set solib_testfile "jit-solib"
     set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
-    set solib_binfile [standard_output_file ${solib_testfile}.so]
-    set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so"
+    set solib_binfile [standard_output_file ${solib_testfile}$binsuffix.so]
+    set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}$binsuffix.so"
 
     # Note: compiling without debug info: the library goes through
     # symbol renaming by munging on its symbol table, and that
@@ -56,16 +56,54 @@ proc compile_jit_test {testname options}
 	return -1
     }
 
-    if {[is_remote target]} {
-	set solib_binfile_target [gdb_download ${solib_binfile}]
-    } else {
-	set solib_binfile_target $solib_binfile
-    }
+    set solib_binfile_target [gdb_remote_download target ${solib_binfile}]
 
     return 0
 }
 
-proc one_jit_test {count match_str} {
+# Detach, restart GDB, and re-attach to the program.
+
+proc clean_reattach {} {
+    global decimal gdb_prompt srcfile testfile
+
+    # Get PID of test program.
+    set testpid -1
+    set test "get inferior process ID"
+    gdb_test_multiple "p mypid" $test {
+	-re ".* = ($decimal).*$gdb_prompt $" {
+	    set testpid $expect_out(1,string)
+	    pass $test
+	}
+    }
+
+    gdb_test_no_output "set var wait_for_gdb = 1"
+    gdb_test "detach" "Detaching from .*"
+
+    clean_restart $testfile
+
+    set test "attach"
+    gdb_test_multiple "attach $testpid" "$test" {
+	-re "Attaching to program.*.*main.*at .*$srcfile:.*$gdb_prompt $" {
+	    pass "$test"
+	}
+    }
+
+    gdb_test_no_output "set var wait_for_gdb = 0"
+}
+
+# Continue to LOCATION in the program.  If REATTACH, detach and
+# re-attach to the program from scratch.
+proc continue_to_test_location {location reattach} {
+    gdb_breakpoint [gdb_get_line_number $location]
+    gdb_continue_to_breakpoint $location
+    if {$reattach} {
+	with_test_prefix "$location" {
+	    clean_reattach
+	}
+    }
+}
+
+proc one_jit_test {count match_str reattach} {
     with_test_prefix "one_jit_test-$count" {
 	global verbose testfile solib_binfile_target solib_binfile_test_msg
 
@@ -77,7 +115,7 @@ proc one_jit_test {count match_str} {
 	}
 
 	if { ![runto_main] } {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return
 	}
 
@@ -90,8 +128,7 @@ proc one_jit_test {count match_str} {
 	gdb_test_no_output "set var libname = \"$solib_binfile_target\"" "set var libname = \"$solib_binfile_test_msg\""
 	gdb_test_no_output "set var count = $count"
 
-	gdb_breakpoint [gdb_get_line_number "break here 1"]
-	gdb_continue_to_breakpoint "break here 1"
+	continue_to_test_location "break here 1" $reattach
 
 	gdb_test "info function ^jit_function" "$match_str"
 
@@ -101,25 +138,39 @@ proc one_jit_test {count match_str} {
 	    gdb_test "maintenance info break"
 	}
 
-	gdb_breakpoint [gdb_get_line_number "break here 2"]
-	gdb_continue_to_breakpoint "break here 2"
+	continue_to_test_location "break here 2" $reattach
+
 	# All jit librares must have been unregistered
 	gdb_test "info function jit_function" \
 	    "All functions matching regular expression \"jit_function\":"
     }
 }
 
-if {[compile_jit_test jit.exp {}] < 0} {
+if {[compile_jit_test jit.exp "" {}] < 0} {
     return
 }
-one_jit_test 1 "${hex}  jit_function_0000"
-one_jit_test 2 "${hex}  jit_function_0000\[\r\n\]+${hex}  jit_function_0001"
+one_jit_test 1 "${hex}  jit_function_0000" 0
+one_jit_test 2 "${hex}  jit_function_0000\[\r\n\]+${hex}  jit_function_0001" 0
+
+# Test attaching to an inferior with some JIT libraries already
+# registered.  We reuse the normal test, and detach/reattach at
+# specific interesting points.
+if {[can_spawn_for_attach]} {
+    if {[compile_jit_test "jit.exp attach tests" \
+	     "-attach" {additional_flags=-DATTACH=1}] < 0} {
+	return
+    }
+
+    with_test_prefix attach {
+	one_jit_test 2 "${hex}  jit_function_0000\[\r\n\]+${hex}  jit_function_0001" 1
+    }
+}
 
 with_test_prefix PIE {
     if {[compile_jit_test "jit.exp PIE tests" \
-	     {additional_flags=-fPIE ldflags=-pie}] < 0} {
+	     "-pie" {additional_flags=-fPIE ldflags=-pie}] < 0} {
 	return
     }
 
-    one_jit_test 1 "${hex}  jit_function_0000"
+    one_jit_test 1 "${hex}  jit_function_0000" 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jithost.c ./gdb/testsuite/gdb.base/jithost.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jithost.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jithost.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,75 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/mman.h>
+
+#include JIT_READER_H  /* Please see jit-reader.exp for an explanation.  */
+#include "jithost.h"
+#include "jit-protocol.h"
+
+void __attribute__((noinline)) __jit_debug_register_code () { }
+
+struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+struct jit_code_entry only_entry;
+
+typedef void (jit_function_t) ();
+
+/* The code of the jit_function_00 function that is copied into an
+   mmapped buffer in the inferior at run time.
+
+   The second instruction mangles the stack pointer, meaning that when
+   stopped at the third instruction, GDB needs assistance from the JIT
+   unwinder in order to be able to unwind successfully.  */
+const unsigned char jit_function_00_code[] = {
+  0xcc,				/* int3 */
+  0x48, 0x83, 0xf4, 0xff,	/* xor $0xffffffffffffffff, %rsp */
+  0x48, 0x83, 0xf4, 0xff,	/* xor $0xffffffffffffffff, %rsp */
+  0xc3				/* ret */
+};
+
+int
+main (int argc, char **argv)
+{
+  struct jithost_abi *symfile;
+  char *code = mmap (NULL, getpagesize (), PROT_WRITE | PROT_EXEC,
+		     MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+  jit_function_t *function = (jit_function_t *) code;
+
+  memcpy (code, jit_function_00_code, sizeof (jit_function_00_code));
+
+  symfile = malloc (sizeof (struct jithost_abi));
+  symfile->begin = code;
+  symfile->end = code + sizeof (jit_function_00_code);
+
+  only_entry.symfile_addr = symfile;
+  only_entry.symfile_size = sizeof (struct jithost_abi);
+
+  __jit_debug_descriptor.first_entry = &only_entry;
+  __jit_debug_descriptor.relevant_entry = &only_entry;
+  __jit_debug_descriptor.action_flag = JIT_REGISTER;
+  __jit_debug_descriptor.version = 1;
+  __jit_debug_register_code ();
+
+  function ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jithost.h ./gdb/testsuite/gdb.base/jithost.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jithost.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jithost.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef JITHOST_H
+#define JITHOST_H
+
+struct jithost_abi
+{
+  const char *begin;
+  const char *end;
+};
+
+#endif /* JITHOST_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-main.c ./gdb/testsuite/gdb.base/jit-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 /* ElfW is coming from linux. On other platforms it does not exist.
    Let us define it here. */
@@ -116,104 +117,120 @@ update_locations (const void *const addr
     }
 }
 
+/* Defined by the .exp file if testing attach.  */
+#ifndef ATTACH
+#define ATTACH 0
+#endif
+
 #ifndef MAIN
 #define MAIN main
 #endif
 
+/* Used to spin waiting for GDB.  */
+volatile int wait_for_gdb = ATTACH;
+#define WAIT_FOR_GDB while (wait_for_gdb)
+
+/* The current process's PID.  GDB retrieves this.  */
+int mypid;
+
 int
 MAIN (int argc, char *argv[])
 {
   /* These variables are here so they can easily be set from jit.exp.  */
   const char *libname = NULL;
-  int count = 0;
+  int count = 0, i, fd;
+  struct stat st;
+
+  alarm (300);
+
+  mypid = getpid ();
 
   count = count;  /* gdb break here 0  */
 
   if (argc < 2)
-    usage (argv[0]);
-  else
     {
-      int i, fd;
-      struct stat st;
-
-      if (libname == NULL)
-        /* Only set if not already set from GDB.  */
-        libname = argv[1];
+      usage (argv[0]);
+      exit (1);
+    }
 
-      if (argc > 2 && count == 0)
-        /* Only set if not already set from GDB.  */
-        count = atoi (argv[2]);
+  if (libname == NULL)
+    /* Only set if not already set from GDB.  */
+    libname = argv[1];
+
+  if (argc > 2 && count == 0)
+    /* Only set if not already set from GDB.  */
+    count = atoi (argv[2]);
 
-      printf ("%s:%d: libname = %s, count = %d\n", __FILE__, __LINE__,
-              libname, count);
+  printf ("%s:%d: libname = %s, count = %d\n", __FILE__, __LINE__,
+	  libname, count);
 
-      if ((fd = open (libname, O_RDONLY)) == -1)
-        {
-          fprintf (stderr, "open (\"%s\", O_RDONLY): %s\n", libname,
-                   strerror (errno));
-          exit (1);
-        }
+  if ((fd = open (libname, O_RDONLY)) == -1)
+    {
+      fprintf (stderr, "open (\"%s\", O_RDONLY): %s\n", libname,
+	       strerror (errno));
+      exit (1);
+    }
 
-      if (fstat (fd, &st) != 0)
-        {
-          fprintf (stderr, "fstat (\"%d\"): %s\n", fd, strerror (errno));
-          exit (1);
-        }
+  if (fstat (fd, &st) != 0)
+    {
+      fprintf (stderr, "fstat (\"%d\"): %s\n", fd, strerror (errno));
+      exit (1);
+    }
 
-      for (i = 0; i < count; ++i)
-        {
-          const void *const addr = mmap (0, st.st_size, PROT_READ|PROT_WRITE,
-                                         MAP_PRIVATE, fd, 0);
-          struct jit_code_entry *const entry = calloc (1, sizeof (*entry));
-
-          if (addr == MAP_FAILED)
-            {
-              fprintf (stderr, "mmap: %s\n", strerror (errno));
-              exit (1);
-            }
-
-          update_locations (addr, i);
-
-          /* Link entry at the end of the list.  */
-          entry->symfile_addr = (const char *)addr;
-          entry->symfile_size = st.st_size;
-          entry->prev_entry = __jit_debug_descriptor.relevant_entry;
-          __jit_debug_descriptor.relevant_entry = entry;
-
-          if (entry->prev_entry != NULL)
-            entry->prev_entry->next_entry = entry;
-          else
-            __jit_debug_descriptor.first_entry = entry;
-
-          /* Notify GDB.  */
-          __jit_debug_descriptor.action_flag = JIT_REGISTER_FN;
-          __jit_debug_register_code ();
-        }
+  for (i = 0; i < count; ++i)
+    {
+      const void *const addr = mmap (0, st.st_size, PROT_READ|PROT_WRITE,
+				     MAP_PRIVATE, fd, 0);
+      struct jit_code_entry *const entry = calloc (1, sizeof (*entry));
+
+      if (addr == MAP_FAILED)
+	{
+	  fprintf (stderr, "mmap: %s\n", strerror (errno));
+	  exit (1);
+	}
+
+      update_locations (addr, i);
+
+      /* Link entry at the end of the list.  */
+      entry->symfile_addr = (const char *)addr;
+      entry->symfile_size = st.st_size;
+      entry->prev_entry = __jit_debug_descriptor.relevant_entry;
+      __jit_debug_descriptor.relevant_entry = entry;
+
+      if (entry->prev_entry != NULL)
+	entry->prev_entry->next_entry = entry;
+      else
+	__jit_debug_descriptor.first_entry = entry;
+
+      /* Notify GDB.  */
+      __jit_debug_descriptor.action_flag = JIT_REGISTER_FN;
+      __jit_debug_register_code ();
+    }
 
-      i = 0;  /* gdb break here 1 */
+  WAIT_FOR_GDB; i = 0;  /* gdb break here 1 */
 
-      /* Now unregister them all in reverse order.  */
-      while (__jit_debug_descriptor.relevant_entry != NULL)
-        {
-          struct jit_code_entry *const entry =
-            __jit_debug_descriptor.relevant_entry;
-          struct jit_code_entry *const prev_entry = entry->prev_entry;
-
-          if (prev_entry != NULL)
-            {
-              prev_entry->next_entry = NULL;
-              entry->prev_entry = NULL;
-            }
-          else
-            __jit_debug_descriptor.first_entry = NULL;
-
-          /* Notify GDB.  */
-          __jit_debug_descriptor.action_flag = JIT_UNREGISTER_FN;
-          __jit_debug_register_code ();
+  /* Now unregister them all in reverse order.  */
+  while (__jit_debug_descriptor.relevant_entry != NULL)
+    {
+      struct jit_code_entry *const entry =
+	__jit_debug_descriptor.relevant_entry;
+      struct jit_code_entry *const prev_entry = entry->prev_entry;
+
+      if (prev_entry != NULL)
+	{
+	  prev_entry->next_entry = NULL;
+	  entry->prev_entry = NULL;
+	}
+      else
+	__jit_debug_descriptor.first_entry = NULL;
+
+      /* Notify GDB.  */
+      __jit_debug_descriptor.action_flag = JIT_UNREGISTER_FN;
+      __jit_debug_register_code ();
 
-          __jit_debug_descriptor.relevant_entry = prev_entry;
-          free (entry);
-        }
+      __jit_debug_descriptor.relevant_entry = prev_entry;
+      free (entry);
     }
-  return 0;  /* gdb break here 2  */
+
+  WAIT_FOR_GDB; return 0;  /* gdb break here 2  */
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-protocol.h ./gdb/testsuite/gdb.base/jit-protocol.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-protocol.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-protocol.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifdef JIT_H
+#error "We don't include jit.h directly since we'd like the jit-reader unit  \
+        tests to break if we make ABI incompatible changes to the structures \
+        re-declared here."
+#endif
+
+#ifndef JIT_PROTOCOL_H
+#define JIT_PROTOCOL_H
+
+#include <stdint.h>
+
+typedef enum
+{
+  JIT_NOACTION = 0,
+  JIT_REGISTER,
+  JIT_UNREGISTER
+} jit_actions_t;
+
+
+struct jit_code_entry
+{
+  struct jit_code_entry *next_entry;
+  struct jit_code_entry *prev_entry;
+  void *symfile_addr;
+  uint64_t symfile_size;
+};
+
+
+struct jit_descriptor
+{
+  uint32_t version;
+  uint32_t action_flag;
+  struct jit_code_entry *relevant_entry;
+  struct jit_code_entry *first_entry;
+};
+
+#endif /* JIT_PROTOCOL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jitreader.c ./gdb/testsuite/gdb.base/jitreader.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jitreader.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jitreader.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,199 @@
+/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include JIT_READER_H  /* Please see jit-reader.exp for an explanation.  */
+#include "jithost.h"
+
+GDB_DECLARE_GPL_COMPATIBLE_READER;
+
+enum register_mapping
+{
+  AMD64_RA = 16,
+  AMD64_RBP = 6,
+  AMD64_RSP = 7,
+};
+
+struct reader_state
+{
+  uintptr_t code_begin;
+  uintptr_t code_end;
+};
+
+static enum gdb_status
+read_debug_info (struct gdb_reader_funcs *self,
+		 struct gdb_symbol_callbacks *cbs,
+                 void *memory, long memory_sz)
+{
+  struct jithost_abi *symfile = memory;
+  struct gdb_object *object = cbs->object_open (cbs);
+  struct gdb_symtab *symtab = cbs->symtab_open (cbs, object, "");
+  GDB_CORE_ADDR begin = (GDB_CORE_ADDR) symfile->begin;
+  GDB_CORE_ADDR end = (GDB_CORE_ADDR) symfile->end;
+  struct reader_state *state = (struct reader_state *) self->priv_data;
+
+  /* Record the function's range, for the unwinder.  */
+  state->code_begin = begin;
+  state->code_end = end;
+
+  cbs->block_open (cbs, symtab, NULL, begin, end, "jit_function_00");
+
+  cbs->symtab_close (cbs, symtab);
+  cbs->object_close (cbs, object);
+  return GDB_SUCCESS;
+}
+
+static void
+free_reg_value (struct gdb_reg_value *value)
+{
+  free (value);
+}
+
+static void
+write_register (struct gdb_unwind_callbacks *callbacks, int dw_reg,
+                uintptr_t value)
+{
+  const int size = sizeof (uintptr_t);
+  struct gdb_reg_value *reg_val =
+    malloc (sizeof (struct gdb_reg_value) + size - 1);
+  reg_val->defined = 1;
+  reg_val->free = free_reg_value;
+
+  memcpy (reg_val->value, &value, size);
+  callbacks->reg_set (callbacks, dw_reg, reg_val);
+}
+
+static int
+read_register (struct gdb_unwind_callbacks *callbacks, int dw_reg,
+	       uintptr_t *value)
+{
+  const int size = sizeof (uintptr_t);
+  struct gdb_reg_value *reg_val = callbacks->reg_get (callbacks, dw_reg);
+  if (reg_val->size != size || !reg_val->defined)
+    {
+      reg_val->free (reg_val);
+      return 0;
+    }
+  memcpy (value, reg_val->value, size);
+  reg_val->free (reg_val);
+  return 1;
+}
+
+/* Read the stack pointer into *VALUE.  IP is the address the inferior
+   is currently stopped at.  Takes care of demangling the stack
+   pointer if necessary.  */
+
+static int
+read_sp (struct gdb_reader_funcs *self, struct gdb_unwind_callbacks *cbs,
+	 uintptr_t ip, uintptr_t *value)
+{
+  struct reader_state *state = (struct reader_state *) self->priv_data;
+  uintptr_t sp;
+
+  if (!read_register (cbs, AMD64_RSP, &sp))
+    return GDB_FAIL;
+
+  /* If stopped at the instruction after the "xor $-1, %rsp", demangle
+     the stack pointer back.  */
+  if (ip == state->code_begin + 5)
+    sp ^= (uintptr_t) -1;
+
+  *value = sp;
+  return GDB_SUCCESS;
+}
+
+static enum gdb_status
+unwind_frame (struct gdb_reader_funcs *self, struct gdb_unwind_callbacks *cbs)
+{
+  const int word_size = sizeof (uintptr_t);
+  uintptr_t prev_sp, this_sp;
+  uintptr_t prev_ip, this_ip;
+  uintptr_t prev_bp, this_bp;
+  struct reader_state *state = (struct reader_state *) self->priv_data;
+
+  if (!read_register (cbs, AMD64_RA, &this_ip))
+    return GDB_FAIL;
+
+  if (this_ip >= state->code_end || this_ip < state->code_begin)
+    return GDB_FAIL;
+
+  /* Unwind RBP in order to make the unwinder that tries to unwind
+     from the just-unwound frame happy.  */
+  if (!read_register (cbs, AMD64_RBP, &this_bp))
+    return GDB_FAIL;
+  /* RBP is unmodified.  */
+  prev_bp = this_bp;
+
+  /* Fetch the demangled stack pointer.  */
+  if (!read_sp (self, cbs, this_ip, &this_sp))
+    return GDB_FAIL;
+
+  /* The return address is saved on the stack.  */
+  if (cbs->target_read (this_sp, &prev_ip, word_size) == GDB_FAIL)
+    return GDB_FAIL;
+  prev_sp = this_sp + word_size;
+
+  write_register (cbs, AMD64_RA, prev_ip);
+  write_register (cbs, AMD64_RSP, prev_sp);
+  write_register (cbs, AMD64_RBP, prev_bp);
+  return GDB_SUCCESS;
+}
+
+static struct gdb_frame_id
+get_frame_id (struct gdb_reader_funcs *self, struct gdb_unwind_callbacks *cbs)
+{
+  struct reader_state *state = (struct reader_state *) self->priv_data;
+  struct gdb_frame_id frame_id;
+  uintptr_t ip;
+  uintptr_t sp;
+
+  read_register (cbs, AMD64_RA, &ip);
+  read_sp (self, cbs, ip, &sp);
+
+  frame_id.code_address = (GDB_CORE_ADDR) state->code_begin;
+  frame_id.stack_address = (GDB_CORE_ADDR) sp;
+
+  return frame_id;
+}
+
+static void
+destroy_reader (struct gdb_reader_funcs *self)
+{
+  free (self->priv_data);
+  free (self);
+}
+
+struct gdb_reader_funcs *
+gdb_init_reader (void)
+{
+  struct reader_state *state = calloc (1, sizeof (struct reader_state));
+  struct gdb_reader_funcs *reader_funcs =
+    malloc (sizeof (struct gdb_reader_funcs));
+
+  reader_funcs->reader_version = GDB_READER_INTERFACE_VERSION;
+  reader_funcs->priv_data = state;
+  reader_funcs->read = read_debug_info;
+  reader_funcs->unwind = unwind_frame;
+  reader_funcs->get_frame_id = get_frame_id;
+  reader_funcs->destroy = destroy_reader;
+
+  return reader_funcs;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-reader.exp ./gdb/testsuite/gdb.base/jit-reader.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-reader.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-reader.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,251 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile jithost.c
+
+if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_target] } {
+    return -1;
+}
+
+if {[skip_shlib_tests]} {
+    return -1
+}
+
+if { ![isnative] } {
+    return -1
+}
+
+if {[get_compiler_info]} {
+    untested "could not get compiler info"
+    return 1
+}
+
+set jit_host_src $srcfile
+set jit_host_bin $binfile
+
+# We inject the complete path to jit-reader.h into the source file
+# lest we end up (incorrectly) building against a system-installed
+# version.
+set jit_reader_header [standard_output_file "../../../../../gdb/jit-reader.h"]
+set jit_reader_flag "-DJIT_READER_H=\"$jit_reader_header\""
+
+if  { [gdb_compile "${srcdir}/${subdir}/${jit_host_src}" "${jit_host_bin}" \
+       executable  [list debug additional_flags=$jit_reader_flag]] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+set jit_reader jitreader
+set jit_reader_src ${jit_reader}.c
+set jit_reader_bin [standard_output_file ${jit_reader}.so]
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${jit_reader_src}" "${jit_reader_bin}" \
+	  [list debug additional_flags=$jit_reader_flag]] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+# Test "info registers" in the current frame, expecting RSP's value to
+# be SP.
+
+proc info_registers_current_frame {sp} {
+    global hex decimal
+
+    set any "\[^\r\n\]*"
+
+    gdb_test "info registers" \
+	[multi_line \
+	     "rax            $hex	$decimal" \
+	     "rbx            $hex	$decimal" \
+	     "rcx            $hex	$decimal" \
+	     "rdx            $hex	$decimal" \
+	     "rsi            $hex	$decimal" \
+	     "rdi            $hex	$decimal" \
+	     "rbp            $hex	$hex" \
+	     "rsp            $sp	$sp" \
+	     "r8             $hex	$decimal" \
+	     "r9             $hex	$decimal" \
+	     "r10            $hex	$decimal" \
+	     "r11            $hex	$decimal" \
+	     "r12            $hex	$decimal" \
+	     "r13            $hex	$decimal" \
+	     "r14            $hex	$decimal" \
+	     "r15            $hex	$decimal" \
+	     "rip            $hex	$hex$any" \
+	     "eflags         $hex	\\\[$any\\\]" \
+	     "cs             $hex	$decimal" \
+	     "ss             $hex	$decimal" \
+	     "ds             $hex	$decimal" \
+	     "es             $hex	$decimal" \
+	     "fs             $hex	$decimal" \
+	     "gs             $hex	$decimal" \
+	    ]
+}
+
+proc jit_reader_test {} {
+    global jit_host_bin
+    global jit_reader_bin
+    global verbose
+    global hex decimal
+
+    set any "\[^\r\n\]*"
+
+    clean_restart $jit_host_bin
+    gdb_load_shlib $jit_reader_bin
+
+    if {$verbose > 0} {
+	gdb_test_no_output "set debug jit 1"
+    }
+
+    gdb_test_no_output "jit-reader-load ${jit_reader_bin}" "jit-reader-load"
+    gdb_run_cmd
+    gdb_test "" "Program received signal SIGTRAP, .*" "expect SIGTRAP"
+
+    # Test the JIT reader unwinder.
+    with_test_prefix "with jit-reader" {
+
+	with_test_prefix "before mangling" {
+	    gdb_test "bt" \
+		[multi_line \
+		     "#0 ${any} in jit_function_00 ${any}" \
+		     "#1 ${any} in main ${any}" \
+		    ] \
+		"bt works"
+
+	    set sp_before_mangling \
+		[get_hexadecimal_valueof "\$sp" 0 "get sp"]
+
+	    gdb_test "up" "#1  $any in main $any\r\n$any  function $any" \
+		"move up to caller"
+
+	    set caller_sp \
+		[get_hexadecimal_valueof "\$sp" 0 "get caller sp"]
+	}
+
+	# Step over the instruction that mangles the stack pointer.
+	# While that confuses GDB's built-in unwinder, the JIT
+	# reader's unwinder understands the mangling and should thus
+	# be able to unwind at that location.
+	with_test_prefix "after mangling" {
+	    gdb_test "si" "in jit_function_00 .*" "step over stack mangling"
+
+	    set sp_after_mangling \
+		[get_hexadecimal_valueof "\$sp" 0 "get sp"]
+
+	    gdb_assert {$sp_before_mangling != $sp_after_mangling} \
+		"sp is mangled"
+
+	    # Check that the jit unwinder manages to backtrace through
+	    # the mangled stack pointer.
+	    gdb_test "bt" \
+		[multi_line \
+		     "#0 ${any} in jit_function_00 ${any}" \
+		     "#1 ${any} in main ${any}" \
+		    ] \
+		"bt works"
+
+	    with_test_prefix "current frame" {
+		info_registers_current_frame $sp_after_mangling
+
+		gdb_test "info frame" \
+		    "Stack level 0, frame at $sp_before_mangling.*in jit_function_00.*"
+	    }
+
+	    with_test_prefix "caller frame" {
+		gdb_test "up" "#1  $any in main $any\r\n$any  function $any" \
+		    "up to caller"
+
+		# Since the JIT unwinder only provides RIP/RSP/RBP,
+		# all other registers should show as "<not saved>".
+		gdb_test "info registers" \
+		    [multi_line \
+			 "rax            <not saved>" \
+			 "rbx            <not saved>" \
+			 "rcx            <not saved>" \
+			 "rdx            <not saved>" \
+			 "rsi            <not saved>" \
+			 "rdi            <not saved>" \
+			 "rbp            $hex	$hex" \
+			 "rsp            $caller_sp	$caller_sp" \
+			 "r8             <not saved>" \
+			 "r9             <not saved>" \
+			 "r10            <not saved>" \
+			 "r11            <not saved>" \
+			 "r12            <not saved>" \
+			 "r13            <not saved>" \
+			 "r14            <not saved>" \
+			 "r15            <not saved>" \
+			 "rip            $hex	$hex $any" \
+			 "eflags         <not saved>" \
+			 "cs             <not saved>" \
+			 "ss             <not saved>" \
+			 "ds             <not saved>" \
+			 "es             <not saved>" \
+			 "fs             <not saved>" \
+			 "gs             <not saved>" \
+			]
+
+		# Make sure that "info frame" doesn't crash.
+		gdb_test "info frame" "Stack level 1, .*in main.*"
+
+		# ... and that neither does printing a pseudo
+		# register.
+		gdb_test "print /x \$ebp" " = $hex" "print pseudo register"
+
+		# There's no way for the JIT reader API to support
+		# modifyiable values.
+		gdb_test "print \$rbp = -1" \
+		    "Attempt to assign to an unmodifiable value\." \
+		    "cannot assign to register"
+	    }
+	}
+    }
+
+    # Now unload the jit reader, and ensure that backtracing really
+    # doesn't work without it.
+    with_test_prefix "without jit-reader" {
+	gdb_test_no_output "jit-reader-unload ${jit_reader_bin}" \
+	    "jit-reader-unload"
+
+	# Check that we're no longer using the JIT unwinder, and that
+	# the built-in unwinder cannot backtrace through the mangled
+	# stack pointer.
+	gdb_test "bt" \
+	    [multi_line \
+		 "Backtrace stopped: Cannot access memory at address $sp_after_mangling" \
+		] \
+	    "bt shows error"
+
+	gdb_test "info frame" "Cannot access memory at address.*" \
+	    "info frame shows error"
+	info_registers_current_frame $sp_after_mangling
+	gdb_test "up" "Initial frame selected; you cannot go up\\." \
+	    "cannot go up"
+    }
+
+    with_test_prefix "with jit-reader again" {
+	gdb_test_no_output "jit-reader-load ${jit_reader_bin}" "jit-reader-load"
+
+	# Check that the jit unwinder manages to backtrace through
+	# the mangled stack pointer.
+	gdb_test "bt" \
+	    [multi_line \
+		 "#0 ${any} in jit_function_00 ${any}" \
+		 "#1 ${any} in main ${any}" \
+		]
+    }
+}
+
+jit_reader_test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple.c ./gdb/testsuite/gdb.base/jit-simple.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-simple.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,37 +1,26 @@
-/* Simple program using the JIT API.  */
+/* This testcase is part of GDB, the GNU debugger.
 
-#include <stdint.h>
+   Copyright 2016-2017 Free Software Foundation, Inc.
 
-struct jit_code_entry
-{
-  struct jit_code_entry *next_entry;
-  struct jit_code_entry *prev_entry;
-  const char *symfile_addr;
-  uint64_t symfile_size;
-};
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
 
-struct jit_descriptor
-{
-  uint32_t version;
-  /* This type should be jit_actions_t, but we use uint32_t
-     to be explicit about the bitwidth.  */
-  uint32_t action_flag;
-  struct jit_code_entry *relevant_entry;
-  struct jit_code_entry *first_entry;
-};
-
-#ifdef SPACER
-/* This exists to change the address of __jit_debug_descriptor.  */
-int spacer = 4;
-#endif
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-void __jit_debug_register_code()
-{
-}
+/* Simple standalone program using the JIT API.  */
+
+#include "jit-simple-jit.c"
 
-int main()
+int
+main (void)
 {
   return 0;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple-dl.c ./gdb/testsuite/gdb.base/jit-simple-dl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple-dl.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-simple-dl.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* A stub program that links with a simple library that uses the JIT
+   API.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple.exp ./gdb/testsuite/gdb.base/jit-simple.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-simple.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,61 +13,150 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Test re-running an inferior with a JIT descriptor, where the JIT
+# descriptor changes address between runs.
+# http://sourceware.org/bugzilla/show_bug.cgi?id=13431
+
+# Test both the case of the JIT reader being included in the main
+# program directly, and the case of the JIT reader being split out to
+# a shared library.
+
+# For completeness, also test when the JIT descriptor does not change
+# address between runs.
+
 if {[skip_shlib_tests]} {
-    untested jit-simple.exp
+    untested "skipping shared library tests"
     return -1
 }
 
-if {[get_compiler_info]} {
-    warning "Could not get compiler info"
-    untested jit-simple.exp
-    return 1
-}
+standard_testfile
 
-#
-# test running programs
-#
+set libname $testfile-jit
+set srcfile_lib $srcdir/$subdir/$libname.c
+set binfile_lib [standard_output_file $libname.so]
 
-standard_testfile
+# Build a standalone JIT binary.
 
-if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
-    untested jit-simple.exp
-    return -1
+proc build_standalone_jit {{options ""}} {
+    global testfile srcfile binfile
+
+    lappend options "debug"
+
+    if {[build_executable $testfile.exp $testfile $srcfile $options] == -1} {
+	return -1
+    }
+
+    return 0
 }
 
-# A helper for jit_test_reread that invokes gdb_run_cmd.
-proc jit_run {msg} {
-    global decimal gdb_prompt
+# Build the shared library JIT.
+
+proc build_shared_jit {{options ""}} {
+    global testfile
+    global srcfile_lib binfile_lib
+
+    lappend options "debug additional_flags=-fPIC"
+    if { [gdb_compile_shlib $srcfile_lib $binfile_lib $options] != "" } {
+	return -1
+    }
+
+    return 0
+}
 
-    gdb_run_cmd
-    gdb_test "" "Inferior .* exited.*" $msg
+if {[build_standalone_jit] == -1} {
+    untested "failed to compile standalone testcase"
+    return
 }
 
-# Test re-running an inferior with a JIT descriptor, where the JIT
-# descriptor changes address between runs.
-# http://sourceware.org/bugzilla/show_bug.cgi?id=13431
-proc jit_test_reread {} {
-    global testfile binfile subdir srcfile srcdir
+if {[build_shared_jit] == -1} {
+    untested "failed to compile shared library testcase"
+    return
+}
 
-    clean_restart $testfile
+# Built the program that loads the JIT library.
+set srcfile_dl $testfile-dl.c
+set binfile_dl $binfile-dl
+set options [list debug shlib=${binfile_lib}]
+if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl executable \
+	 [list debug shlib=$binfile_lib]] == -1 } {
+    untested "failed to compile"
+    return -1
+}
 
-    # jit_run "initial run"
-    runto_main
+# STANDALONE is true when the JIT reader is included directly in the
+# main program.  False when the JIT reader is in a separate shared
+# library.  If CHANGE_ADDR is true, force changing the JIT descriptor
+# changes address between runs.
+proc jit_test_reread {standalone change_addr} {
+    global testfile binfile subdir srcfile srcdir binfile_lib binfile_dl
+    global hex
+
+    with_test_prefix "initial run" {
+	if {$standalone} {
+	    clean_restart $binfile
+	} else {
+	    clean_restart $binfile_dl
+	}
 
-    gdb_test "print &__jit_debug_descriptor" "= .*" "blah 1"
+	runto_main
 
-    gdb_rename_execfile $binfile ${binfile}x
+	set addr_before [get_hexadecimal_valueof "&__jit_debug_descriptor" 0 \
+			     "get address of __jit_debug_descriptor"]
 
-    if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DSPACER}] != "" } {
-	fail "recompile $srcfile"
-    } else {
-	pass "recompile $srcfile"
+	gdb_test "maint info breakpoints" \
+	    "jit events     keep y   $hex <__jit_debug_register_code>.*" \
+	    "maint info breakpoints shows jit breakpoint"
+    }
 
-	# jit_run "second run"
+    with_test_prefix "second run" {
+	# Ensure that the new executable is at least one second newer
+	# than the old.  If the recompilation happens in the same
+	# second, gdb might not reload the executable automatically.
+	sleep 1
+
+	if ${change_addr} {
+	    set options "additional_flags=-DSPACER"
+	    if {$standalone} {
+		gdb_rename_execfile $binfile ${binfile}x
+		set res [build_standalone_jit $options]
+	    } else {
+		gdb_rename_execfile $binfile_lib ${binfile_lib}x
+		set res [build_shared_jit $options]
+	    }
+	    if  { $res == -1 } {
+		fail "recompile"
+		return
+	    } else {
+		pass "recompile"
+	    }
+	}
 
 	runto_main
-	gdb_test "print &__jit_debug_descriptor" "= .*" "blah 1"
+
+	set addr_after [get_hexadecimal_valueof "&__jit_debug_descriptor" 0 \
+			    "get address of __jit_debug_descriptor"]
+
+	# This used to crash in the JIT-in-shared-library case:
+	# https://sourceware.org/bugzilla/show_bug.cgi?id=11094
+	gdb_test "maint info breakpoints" \
+	    "jit events     keep y   $hex <__jit_debug_register_code>.*" \
+	    "maint info breakpoints shows jit breakpoint"
+    }
+
+    if ${change_addr} {
+	gdb_assert {$addr_before != $addr_after} "address changed"
+    } else {
+	gdb_assert {$addr_before == $addr_after} "address didn't change"
     }
 }
 
-jit_test_reread
+foreach standalone {1 0} {
+    with_test_prefix [expr ($standalone)?"standalone":"shared"] {
+	with_test_prefix "change addr" {
+	    jit_test_reread $standalone 1
+	}
+	with_test_prefix "same addr" {
+	    jit_test_reread $standalone 0
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple-jit.c ./gdb/testsuite/gdb.base/jit-simple-jit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-simple-jit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-simple-jit.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2012-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Simple library using the JIT API.  */
+
+#include <stdint.h>
+
+struct jit_code_entry
+{
+  struct jit_code_entry *next_entry;
+  struct jit_code_entry *prev_entry;
+  const char *symfile_addr;
+  uint64_t symfile_size;
+};
+
+struct jit_descriptor
+{
+  uint32_t version;
+  /* This type should be jit_actions_t, but we use uint32_t
+     to be explicit about the bitwidth.  */
+  uint32_t action_flag;
+  struct jit_code_entry *relevant_entry;
+  struct jit_code_entry *first_entry;
+};
+
+#ifdef SPACER
+/* This exists to change the address of __jit_debug_descriptor.  */
+int spacer = 4;
+#endif
+
+struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+
+void
+__jit_debug_register_code (void)
+{
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-so.exp ./gdb/testsuite/gdb.base/jit-so.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-so.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-so.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,12 @@
 # library.
 
 if {[skip_shlib_tests]} {
-    untested jit-so.exp
+    untested "skipping shared library tests"
     return -1
 }
 
 if {[get_compiler_info]} {
-    warning "Could not get compiler info"
-    untested jit-so.exp
+    untested "could not get compiler info"
     return 1
 }
 
@@ -35,7 +34,7 @@ set testfile jit-dlmain
 set srcfile ${testfile}.c
 set binfile [standard_output_file ${testfile}]
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
-    untested jit-so.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -44,7 +43,7 @@ set srcfile2 ${testfile2}.c
 set binfile2 [standard_output_file ${testfile2}.so]
 set binfile2_dlopen [shlib_target_file ${testfile2}.so]
 if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug additional_flags="-DMAIN=jit_dl_main"}] != "" } {
-    untested jit.exp
+    untested "failed to compile main shared library"
     return -1
 }
 
@@ -57,22 +56,18 @@ set solib_binfile_test_msg "SHLIBDIR/${s
 # renaming by munging on its symbol table, and that wouldn't work for .debug
 # sections.  Also, output for "info function" changes when debug info is resent.
 if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {}] != "" } {
-    untested jit-so.exp
+    untested "failed to compile jit shared library"
     return -1
 }
 
-if {[is_remote target]} {
-    set solib_binfile_target [gdb_download ${solib_binfile}]
-} else {
-    set solib_binfile_target $solib_binfile
-}
+set solib_binfile_target [gdb_remote_download target ${solib_binfile}]
 
 proc one_jit_test {count match_str} {
     with_test_prefix "one_jit_test-$count" {
 	global verbose testfile srcfile2 binfile2 binfile2_dlopen solib_binfile_target solib_binfile_test_msg
 
 	clean_restart $testfile
-	gdb_load_shlibs $binfile2
+	gdb_load_shlib $binfile2
 
 	# This is just to help debugging when things fail
 	if {$verbose > 0} {
@@ -80,7 +75,7 @@ proc one_jit_test {count match_str} {
 	}
 
 	if { ![runto_main] } {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return
 	}
 
@@ -121,3 +116,10 @@ proc one_jit_test {count match_str} {
 
 one_jit_test 1 "${hex}  jit_function_0000"
 one_jit_test 2 "${hex}  jit_function_0000\[\r\n\]+${hex}  jit_function_0001"
+
+# We don't intend to load the .so as a JIT debuginfo reader, but we
+# need some handy file name for a completion test.
+gdb_test \
+    "complete jit-reader-load [standard_output_file ${solib_testfile}.s]" \
+    "jit-reader-load $solib_binfile" \
+    "test jit-reader-load filename completion"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-solib.c ./gdb/testsuite/gdb.base/jit-solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jit-solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jit-solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jump.exp ./gdb/testsuite/gdb.base/jump.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/jump.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/jump.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ standard_testfile .c
 
 # Build the test case
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested jump.exp
+     untested "failed to compile"
      return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-after-signal.c ./gdb/testsuite/gdb.base/kill-after-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-after-signal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/kill-after-signal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-after-signal.exp ./gdb/testsuite/gdb.base/kill-after-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-after-signal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/kill-after-signal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c
 
 if { ![can_single_step_to_signal_handler] } {
-    untested ${testfile}.exp
+    untested "cannot single-step to signal handler"
     return
 }
 
@@ -25,7 +25,7 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
-if [prepare_for_testing ${testfile}.exp ${testfile}] {
+if [prepare_for_testing "failed to prepare" ${testfile}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.c ./gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+main (void)
+{
+  sleep (600);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp ./gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,62 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test the basic operation of the "kill inferiors" and "detach inferiors"
+# commands.
+
+if ![can_spawn_for_attach] {
+    return 0
+}
+
+standard_testfile
+set executable $testfile
+
+if [prepare_for_testing "failed to prepare" $executable] {
+    return -1
+}
+
+runto_main
+
+# Add another forked inferior process.
+gdb_test "add-inferior" "Added inferior 2" "add inferior 2"
+gdb_test "inferior 2" "Switching to inferior 2.*"
+gdb_test "file $binfile" "Reading symbols from .*done.*" "load binary"
+gdb_test "start" "Temporary breakpoint.*Starting program.*"
+
+# Add an attached inferior process.
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set test_pid [spawn_id_get_pid $test_spawn_id]
+gdb_test "add-inferior" "Added inferior 3" "add inferior 3"
+gdb_test "inferior 3" "Switching to inferior 3.*"
+gdb_test "attach $test_pid" "Attaching to process.*" "attach to pid"
+
+# Kill the first two inferiors, and detach the third.
+gdb_test_no_output "kill inferiors 1 2"
+gdb_test "inferior 1" "Switching to inferior 1.*"
+gdb_test "kill" "The program is not being run.*"
+gdb_test "detach inferiors 3" "Detaching from program.*process $test_pid.*"
+
+# No inferiors should be running anymore.
+gdb_test "kill inferiors 1 2 3" \
+	 "ID 1 is not running.*ID 2 is not running.*ID 3 is not running.*"
+gdb_test "detach inferiors 1 2 3" \
+	 "ID 1 is not running.*ID 2 is not running.*ID 3 is not running.*"
+
+gdb_test "kill inferiors 10" \
+	 "ID 10 not known.*"
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/killed-outside.c ./gdb/testsuite/gdb.base/killed-outside.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/killed-outside.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/killed-outside.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <sys/types.h>
+#include <unistd.h>
+
+pid_t pid;
+
+static void
+done (void)
+{
+}
+
+int
+main (int argc, char **argv)
+{
+  pid = getpid ();
+  done ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/killed-outside.exp ./gdb/testsuite/gdb.base/killed-outside.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/killed-outside.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/killed-outside.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,130 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that GDB doesn't get badly wedged if the inferior is killed
+# from outside GDB (with SIGKILL) while the program is stopped.
+
+standard_testfile
+
+# Get the value of variable VAR in the inferior.  MSG is used as the
+# test message.
+
+proc get_value {var msg} {
+    global expect_out
+    global gdb_prompt
+    global decimal
+
+    set value -1
+    gdb_test_multiple "print $var" "$msg" {
+	-re ".*= ($decimal).*\r\n$gdb_prompt $" {
+	    set value $expect_out(1,string)
+	    pass "$msg"
+        }
+    }
+    return ${value}
+}
+
+# Runs the program until a breakpoint, deletes all breakpoints, and
+# then kills the inferior from _outside_ GDB, with SIGKILL.  Runs CMDS
+# afterwards, to make sure GDB copes with the inferior disappearing,
+# and then quits GDB.
+
+proc test {cmds_after_kill} {
+    global binfile
+    global gdb_prompt
+    global decimal
+
+    clean_restart ${binfile}
+
+    if ![runto done] {
+	return
+    }
+
+    # So that "continue" doesn't try a step over, etc.
+    delete_breakpoints
+
+    set testpid [get_value "pid" "get pid of inferior"]
+    if { $testpid == -1 } {
+	return -1
+    }
+
+    remote_exec target "kill -9 ${testpid}"
+
+    # Give it some time to die.
+    sleep 2
+
+    uplevel 1 $cmds_after_kill
+
+    # Make sure we can quit.
+    set msg "quit GDB"
+    gdb_test_multiple "quit" $msg {
+	-re "Quit anyway\\? \\(y or n\\) $" {
+	    send_gdb "y\n"
+	    exp_continue
+	}
+	eof {
+	    pass $msg
+	}
+    }
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile] == -1} {
+    return -1
+}
+
+# The actual output GDB prints in response to commands after the
+# inferior is gone isn't very well defined, and will depend on target.
+# What we're trying to make sure is that GDB doesn't internal error or
+# get wedged.
+
+# Try simply continuing.
+with_test_prefix "continue" {
+    test {
+	# Try stepping the program.  Stepping may need to read/write
+	# registers, unlike continue.
+	gdb_test "continue" ".*"
+
+	# Try listing threads afterwards.  It's probably what the user
+	# will do after an error.
+	gdb_test "info threads" ".*"
+    }
+}
+
+# Try stepping the program.  Stepping may go through diferent code
+# paths in the target backends.
+with_test_prefix "stepi" {
+    test {
+	gdb_test "si" ".*"
+	gdb_test "info threads" ".*"
+    }
+}
+
+# Try fetching registers explicitly, which should cover the error many
+# other commands would trigger.
+with_test_prefix "registers" {
+    test {
+	gdb_test "flushregs" ".*"
+	gdb_test "info threads" ".*"
+    }
+}
+
+# Try only listing threads explicitly, first thing, which is another
+# operation GDB may or not decide to do itself and is likely to be
+# what a user would try after error too.
+with_test_prefix "info threads" {
+    test {
+	gdb_test "info threads" ".*"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/label.exp ./gdb/testsuite/gdb.base/label.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/label.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/label.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,8 +25,7 @@ if [is_remote target] then {
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp $testfile ${srcfile} debug] } {
-    untested label.exp
+if { [prepare_for_testing "failed to prepare" $testfile ${srcfile} debug] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/langs1.f ./gdb/testsuite/gdb.base/langs1.f
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/langs1.f	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/langs1.f	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-c Copyright (C) 1999-2015 Free Software Foundation, Inc.
+c Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
 c This program is free software; you can redistribute it and/or modify
 c it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/langs.exp ./gdb/testsuite/gdb.base/langs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/langs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/langs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if [is_remote host] {
 }
 
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2 $srcfile3] {debug}]} {
     return -1
 }
@@ -48,37 +48,18 @@ gdb_test_multiple "b langs0" "break on n
 	}
 }
 
-if {$hp_aCC_compiler} {
-    set isfixed 1
-    set lang c\\+\\+
-    set ext cxx
-    set foo_func foo__Fi__Fi
-    set do_func do::langs0
-} else {
-    if {$hp_cc_compiler} {
-        set isfixed 1
-        set lang c
-        set ext c
-    } else {
-        set isfixed 0
-    }
-    set foo_func foo__Fi
-    set do_func langs0__2do
-}
+# TODO: Since there variables are now constants, we can cleanup the test,
+# remove some dead code.
+set isfixed 0
+set foo_func foo__Fi
+set do_func langs0__2do
 
 if [runto csub] then {
 
     if { !$isfixed } { set lang c }
     gdb_test "show language" "currently $lang\".*" \
 	"show language at csub in langs.exp"
-    # On some machines, foo doesn't get demangled because the N_SOL for
-    # langs2.cxx is seen only after the function stab for foo.  So
-    # the following regexps are kludged to accept foo__Fi as well as foo,
-    # even though only the latter is correct.  I haven't tried to xfail it
-    # because it depends on details of the compiler.
-    
-    # Take out xfail. This test has been passing for some time now.
-    #if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
+
     gdb_test "bt" "#0.*csub.*#1.*(foo|$foo_func) \\(.*#2.*cppsub_ .*#3.*fsub.*#4.*$do_func \\(.*#5  \[0-9a-fx\]* in main.*" "backtrace in langs.exp"
 
     if { !$isfixed } { set lang c\\+\\+; set ext cxx }
@@ -101,8 +82,6 @@ if [runto csub] then {
     gdb_test "show language" "currently $lang.*" \
 	"show language at fsub in langs.exp"
 
-    # Take out xfail. This test has been passing for sometime now.
-    #if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if { !$isfixed } { set lang c }
     gdb_test "up" ".* in $do_func .* at .*langs0\\.c.*return fsub.*" \
 	"up to langs0__2do in langs.exp"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ldbl_e308.c ./gdb/testsuite/gdb.base/ldbl_e308.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ldbl_e308.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ldbl_e308.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ldbl_e308.exp ./gdb/testsuite/gdb.base/ldbl_e308.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ldbl_e308.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ldbl_e308.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 set testfile ldbl_e308
 set srcfile ${testfile}.c
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
 if ![runto_main] {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/lineinc.exp ./gdb/testsuite/gdb.base/lineinc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/lineinc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/lineinc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test macro handling of #included files.
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@
 standard_testfile .c
 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable {debug}] != ""} {
-    untested lineinc.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/linespecs.exp ./gdb/testsuite/gdb.base/linespecs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/linespecs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/linespecs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 # We don't currently need our own test case for testing, so grab
 # another one.
 
-if {[prepare_for_testing linespecs.exp linespecs memattr.c]} {
+if {[prepare_for_testing "failed to prepare" linespecs memattr.c]} {
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.c ./gdb/testsuite/gdb.base/line-symtabs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/line-symtabs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.exp ./gdb/testsuite/gdb.base/line-symtabs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/line-symtabs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test handling of line symbol tables (non-primary symtabs).
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,12 +16,12 @@
 
 standard_testfile .c line-symtabs.h
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.h ./gdb/testsuite/gdb.base/line-symtabs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/line-symtabs.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/line-symtabs.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/list.exp ./gdb/testsuite/gdb.base/list.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/list.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/list.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ standard_testfile list0.c list1.c
 # Need to download the header to the host.
 gdb_remote_download host ${srcdir}/${subdir}/list0.h
 
-if {[prepare_for_testing $testfile.exp $testfile [list $srcfile $srcfile2] \
+if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
 	 {debug}]} {
     return -1
 }
@@ -69,8 +69,6 @@ proc set_listsize { arg } {
 
 proc test_listsize {} {
     global gdb_prompt
-    global hp_cc_compiler
-    global hp_aCC_compiler
     global last_line_re
 
     # Show default size
@@ -244,6 +242,10 @@ proc test_list_forward {} {
     }
 
     pass "successive list commands to page forward ($testcnt tests)"
+
+    gdb_test "list" "Line number 44 out of range; \[^\r\n\]+ has 43 lines\." \
+	"end of file error after \"list\" command"
+
     gdb_stop_suppressing_tests
 }
 
@@ -287,6 +289,10 @@ proc test_repeat_list_command {} {
     }
 
     pass "repeat list commands to page forward using 'return' ($testcnt tests)"
+
+    gdb_test "list" "Line number 44 out of range; \[^\r\n\]+ has 43 lines\." \
+	"end of file error after using 'return' to repeat the list command"
+
     gdb_stop_suppressing_tests
 }
 
@@ -324,6 +330,10 @@ proc test_list_backwards {} {
     }
 
     pass "$testcnt successive \"list -\" commands to page backwards"
+
+    gdb_test "list -" "Already at the start of .*\." \
+	"beginning of file error after \"list -\" command"
+
     gdb_stop_suppressing_tests
 }
 
@@ -505,6 +515,24 @@ proc test_only_end {} {
     gdb_test "list ,5" "list ,5\r\n4\[ \t\]\[^\r\n\]*\r\n5\[ \t\]\[^\r\n\]*"
 }
 
+proc test_list_invalid_args {} {
+    global binfile
+
+    clean_restart ${binfile}
+    gdb_test "list -INVALID" \
+	"invalid explicit location argument, \"-INVALID\"" \
+	"first use of \"list -INVALID\""
+    gdb_test "list -INVALID" \
+	"invalid explicit location argument, \"-INVALID\"" \
+	"second use of \"list -INVALID\""
+
+    clean_restart ${binfile}
+    gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
+	"first use of \"list +INVALID\""
+    gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
+	"second use of \"list +INVALID\""
+}
+
 # Start with a fresh gdb.
 
 gdb_exit
@@ -527,6 +555,7 @@ if [ set_listsize 10 ] then {
     test_list_filename_and_function
     test_forward_search
     test_only_end
+    test_list_invalid_args
 }
 
 # Follows tests that require execution.
@@ -571,16 +600,20 @@ proc test_list {command listsize1 listsi
 
 	clean_restart $binfile
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return
 	}
 
 	# Test changing the listsize both before nexting, and after
 	# stopping, but before listing.  Only the second listsize
 	# change should affect which lines are listed.
-	gdb_test_no_output "set listsize $listsize1"
+	with_test_prefix "before next" {
+	    gdb_test_no_output "set listsize $listsize1"
+	}
 	gdb_test "next" "foo \\(.*"
-	gdb_test_no_output "set listsize $listsize2"
+	with_test_prefix "after next" {
+	    gdb_test_no_output "set listsize $listsize2"
+	}
 
 	set pattern1 [build_pattern $linerange1]
 	set pattern2 [build_pattern $linerange2]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/logical.exp ./gdb/testsuite/gdb.base/logical.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/logical.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/logical.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 standard_testfile int-type.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested logical.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longest-types.c ./gdb/testsuite/gdb.base/longest-types.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longest-types.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/longest-types.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longest-types.exp ./gdb/testsuite/gdb.base/longest-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longest-types.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/longest-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug quiet}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longjmp.c ./gdb/testsuite/gdb.base/longjmp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longjmp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/longjmp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longjmp.exp ./gdb/testsuite/gdb.base/longjmp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/longjmp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/longjmp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested longjmp.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -32,7 +32,7 @@ if [get_compiler_info] {
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/long_long.c ./gdb/testsuite/gdb.base/long_long.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/long_long.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/long_long.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 1999-2015 Free Software Foundation, Inc.
+   Copyright 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/long_long.exp ./gdb/testsuite/gdb.base/long_long.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/long_long.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/long_long.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,14 +30,8 @@ if [get_compiler_info] {
     return -1
 }
 
-if {$hp_cc_compiler} {
-    set flag "+e"
-} else {
-    set flag ""
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug additional_flags=$flag nowarnings]] != "" } {
-     untested long_long.exp
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug nowarnings]] != "" } {
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/macscp.exp ./gdb/testsuite/gdb.base/macscp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/macscp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/macscp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test macro scoping.
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [test_compiler_info gcc*] {
 if  {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
 	  object $options] != "" 
      || [gdb_compile "${objfile}" "${binfile}" executable $options] != "" } {
-    untested macscp.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -195,7 +195,7 @@ proc list_and_check_macro {func macro ex
 
 gdb_test "list main" ".*main.*" "list main for support check"
 set macro_support "unknown"
-gdb_test_multiple "info source" "Test macro information"  {
+gdb_test_multiple "info source" "test macro information"  {
     -re "Includes preprocessor macro info\..*$gdb_prompt $" {
 	set macro_support 1
 	verbose "Source has macro information"
@@ -209,7 +209,7 @@ gdb_test_multiple "info source" "Test ma
     }
 }
 if {$macro_support == 0} {
-    unsupported "Skipping test because debug information does not include macro information."
+    unsupported "skipping test because debug information does not include macro information."
     return 0
 }
  
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/maint.exp ./gdb/testsuite/gdb.base/maint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/maint.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/maint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,9 +48,8 @@
 
 standard_testfile break.c break1.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
-    untested $testfile.exp
     return -1
 }
 
@@ -207,75 +206,76 @@ if { ! $have_gdb_index } {
 }
 maint_pass_if $symtabs  "maint print objfiles: symtabs"
 
-gdb_test "maint print psymbols" \
-    "print-psymbols takes an output file name and optional symbol file name" \
-    "maint print psymbols w/o args"
-
 if { ! $have_gdb_index } {
     set psymbols_output [standard_output_file psymbols_output]
-    send_gdb "maint print psymbols $psymbols_output ${srcdir}/${subdir}/${srcfile}\n"
-    gdb_expect  {
-	-re "^maint print psymbols $psymbols_output \[^\n\]*\r\n$gdb_prompt $" {
-	    send_gdb "shell ls $psymbols_output\n"
-	    gdb_expect {
-		-re "$psymbols_output\r\n$gdb_prompt $" {
-		    # We want this grep to be as specific as possible,
-		    # so it's less likely to match symbol file names in
-		    # psymbols_output.  Yes, this actually happened;
-		    # poor expect got tons of output, and timed out
-		    # trying to match it.   --- Jim Blandy <jimb@cygnus.com>
-		    send_gdb "shell grep 'main.*function' $psymbols_output\n"
+    set psymbols_output_re [string_to_regexp $psymbols_output]
+    set test_list [list \
+		       "maint print psymbols -source" \
+		       "maint print psymbols -source ${srcdir}/${subdir}/${srcfile} $psymbols_output" \
+		       "maint print psymbols -pc" \
+		       "maint print psymbols -pc main $psymbols_output"]
+    foreach { test_name command } $test_list {
+	send_gdb "$command\n"
+	    gdb_expect  {
+		-re "^maint print psymbols \[^\n\]*\r\n$gdb_prompt $" {
+		    send_gdb "shell ls $psymbols_output\n"
 		    gdb_expect {
-			-re ".main., function, $hex.*$gdb_prompt $" {
-			    pass "maint print psymbols 1"
-			}
-			-re ".*main.  .., function, $hex.*$gdb_prompt $" {
-			    pass "maint print psymbols 2"
+			-re "$psymbols_output_re\r\n$gdb_prompt $" {
+			    # We want this grep to be as specific as possible,
+			    # so it's less likely to match symbol file names in
+			    # psymbols_output.  Yes, this actually happened;
+			    # poor expect got tons of output, and timed out
+			    # trying to match it.   --- Jim Blandy <jimb@cygnus.com>
+			    send_gdb "shell grep 'main.*function' $psymbols_output\n"
+			    gdb_expect {
+				-re ".main., function, $hex.*$gdb_prompt $" {
+				    pass "$test_name 1"
+				}
+				-re ".*main.  .., function, $hex.*$gdb_prompt $" {
+				    pass "$test_name 2"
+				}
+				-re ".*$gdb_prompt $" { fail "$test_name" }
+				timeout { fail "$test_name (timeout)" }
+			    }
+			    gdb_test "shell rm -f $psymbols_output" ".*" \
+				"shell rm -f psymbols_output"
 			}
-			-re ".*$gdb_prompt $" { fail "maint print psymbols" }
-			timeout     { fail "(timeout) maint print psymbols" }
+			-re ".*$gdb_prompt $" { fail "$test_name" }
+			timeout { fail "$test_name (timeout)" }
 		    }
-		    gdb_test "shell rm -f $psymbols_output" ".*" \
-			"shell rm -f psymbols_output"
 		}
-		-re ".*$gdb_prompt $"       { fail "maint print psymbols" }
-		timeout           { fail "(timeout) maint print psymbols" }
+		-re ".*$gdb_prompt $" { fail "$test_name" }
+		timeout { fail "$test_name (timeout)" }
 	    }
-	}
-	-re ".*$gdb_prompt $"       { fail "maint print psymbols" }
-	timeout           { fail "(timeout) maint print psymbols" }
     }
 }
 
-gdb_test "maint print msymbols" \
-    "print-msymbols takes an output file name and optional symbol file name" \
-    "maint print msymbols w/o args"
-
 
 set msymbols_output [standard_output_file msymbols_output]
-send_gdb "maint print msymbols $msymbols_output ${binfile}\n"
+set msymbols_output_re [string_to_regexp $msymbols_output]
+send_gdb "maint print msymbols -objfile ${binfile} $msymbols_output\n"
 gdb_expect  {
-    -re "^maint print msymbols $msymbols_output \[^\n\]*\r\n$gdb_prompt $" {
+    -re "^maint print msymbols \[^\n\]*\r\n$gdb_prompt $" {
 	send_gdb "shell ls $msymbols_output\n"
 	gdb_expect {
-	    -re "$msymbols_output\r\n$gdb_prompt $" {
+	    -re "$msymbols_output_re\r\n$gdb_prompt $" {
 		send_gdb "shell grep factorial $msymbols_output\n"
 		gdb_expect {
 		    -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" {
 			pass "maint print msymbols"
 		    }
-		    -re ".*$gdb_prompt $"     { fail "maint print msymbols" }
-		    timeout         { fail "(timeout) maint print msymbols" }
+		    -re ".*$gdb_prompt $" { fail "maint print msymbols" }
+		    timeout { fail "maint print msymbols (timeout)" }
 		}
 		gdb_test "shell rm -f $msymbols_output" ".*" \
 		    "shell rm -f msymbols_output"
 	    }
-	    -re ".*$gdb_prompt $"     { fail "maint print msymbols" }
-	    timeout         { fail "(timeout) maint print msymbols" }
+	    -re ".*$gdb_prompt $" { fail "maint print msymbols" }
+	    timeout { fail "maint print msymbols (timeout)" }
 	}
     }
-    -re ".*$gdb_prompt $"     { fail "maint print msymbols" }
-    timeout         { fail "(timeout) maint print msymbols" }
+    -re ".*$gdb_prompt $" { fail "maint print msymbols" }
+    timeout { fail "maint print msymbols (timeout)" }
 }
 
 # Check that maint print msymbols allows relative pathnames
@@ -284,77 +284,60 @@ gdb_test "cd [standard_output_file {}]" 
     "Working directory .*\..*" \
     "cd to objdir"
 
-gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint print msymbols" {
-    -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
+gdb_test_multiple "maint print msymbols -objfile ${testfile} msymbols_output2" "maint print msymbols" {
+    -re "^maint print msymbols \[^\n\]*\r\n$gdb_prompt $" {
     	gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
 	    -re "msymbols_output2\r\n$gdb_prompt $" {
-	    	gdb_test_multiple "shell grep factorial msymbols_output2" "maint print msymbols" {
-		    -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" {
-		    	pass "maint print msymbols"
-		    }
-		    -re ".*$gdb_prompt $" {
-		        fail "maint print msymbols"
-		    }
-		    timeout {
-		        fail "(timeout) maint print msymbols"
-		    }
-		}
-		gdb_test "shell rm -f msymbols_output2" ".*" \
-		    "shell rm -f msymbols_output2"
-	    }
-	    -re ".*$gdb_prompt $" {
-		fail "maint print msymbols"
-	    }
-	    timeout {
-	    	fail "(timeout) maint print msymbols"
+		gdb_test "shell grep factorial msymbols_output2" \
+		    "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \
+		    "maint print msymbols"
+		gdb_test "shell rm -f msymbols_output2" ".*"
 	    }
 	}
     }
-    -re ".*$gdb_prompt $" {
-	fail "maint print msymbols"
-    }
-    timeout {
-	fail "(timeout) maint print msymbols"
-    }
 }
 gdb_test "cd ${mydir}" \
     "Working directory [string_to_regexp ${mydir}]\..*" \
     "cd to mydir"
 
-gdb_test "maint print symbols" \
-    "Arguments missing: an output file name and an optional symbol file name" \
-    "maint print symbols w/o args"
-
 
 # Request symbols for one particular source file so that we don't try to
 # dump the symbol information for the entire C library - over 500MB nowadays
 # for GNU libc.
 
 set symbols_output [standard_output_file symbols_output]
-send_gdb "maint print symbols $symbols_output ${srcdir}/${subdir}/${srcfile}\n"
-gdb_expect  {
-    -re "^maint print symbols $symbols_output \[^\n\]*\r\n$gdb_prompt $" {
-	send_gdb "shell ls $symbols_output\n"
-	gdb_expect {
-	    -re "$symbols_output\r\n$gdb_prompt $" {
-		# See comments for `maint print psymbols'.
-		send_gdb "shell grep 'main(.*block' $symbols_output\n"
-		gdb_expect {
-		    -re "int main\\(int, char \\*\\*, char \\*\\*\\); block.*$gdb_prompt $" {
-			pass "maint print symbols"
+set symbols_output_re [string_to_regexp $symbols_output]
+set test_list [list \
+		   "maint print symbols -source" \
+		   "maint print symbols -source ${srcdir}/${subdir}/${srcfile} $symbols_output" \
+		   "maint print symbols -pc" \
+		   "maint print symbols -pc main $symbols_output"]
+foreach { test_name command } $test_list {
+    send_gdb "$command\n"
+    gdb_expect {
+	-re "^maint print symbols \[^\n\]*\r\n$gdb_prompt $" {
+	    send_gdb "shell ls $symbols_output\n"
+	    gdb_expect {
+		-re "$symbols_output_re\r\n$gdb_prompt $" {
+		    # See comments for `maint print psymbols'.
+		    send_gdb "shell grep 'main(.*block' $symbols_output\n"
+		    gdb_expect {
+			-re "int main\\(int, char \\*\\*, char \\*\\*\\); block.*$gdb_prompt $" {
+			    pass "$test_name"
+			}
+			-re ".*$gdb_prompt $" { fail "$test_name" }
+			timeout { fail "$test_name (timeout)" }
 		    }
-		    -re ".*$gdb_prompt $"     { fail "maint print symbols" }
-		    timeout         { fail "(timeout) maint print symbols" }
+		    gdb_test "shell rm -f $symbols_output" ".*" \
+			"shell rm -f symbols_output"
 		}
-		gdb_test "shell rm -f $symbols_output" ".*" \
-		    "shell rm -f symbols_output"
+		-re ".*$gdb_prompt $" { fail "$test_name" }
+		timeout { fail "$test_name (timeout)" }
 	    }
-	    -re ".*$gdb_prompt $"     { fail "maint print symbols" }
-	    timeout         { fail "(timeout) maint print symbols" }
 	}
+	-re ".*$gdb_prompt $" { fail "$test_name" }
+	timeout { fail "$test_name (timeout)" }
     }
-    -re ".*$gdb_prompt $"     { fail "maint print symbols" }
-    timeout         { fail "(timeout) maint print symbols" }
 }
 
 set msg "maint print type"
@@ -471,6 +454,58 @@ gdb_test "maint" \
     "\"maintenance\" must be followed by the name of a maintenance command\\.\r\nList.*unambiguous\\..*" \
     "maint w/o args"
 
+# Test that "main info line-table" w/o a file name shows the symtab for
+# $srcfile.
+set saw_srcfile 0
+set test "maint info line-table w/o a file name"
+gdb_test_multiple "maint info line-table" $test {
+    -re "symtab: \[^\n\r\]+${srcfile} \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+ADDRESS" {
+	set saw_srcfile 1
+	exp_continue
+    }
+    -re "symtab: \[^\n\r\]+ \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+ADDRESS" {
+	# Match each symtab to avoid overflowing expect's buffer.
+	exp_continue
+    }
+    -re "$decimal\[ \t\]+$decimal\[ \t\]+$hex\r\n" {
+	# Line table entries can be long too:
+	#
+	#  INDEX    LINE ADDRESS
+	#  0          29 0x00000000004006f6
+	#  1          30 0x00000000004006fa
+	#  2          31 0x0000000000400704
+	#  3          42 0x0000000000400706
+	#  4          43 0x0000000000400719
+	#  5          44 0x0000000000400722
+	#  6          45 0x0000000000400740
+	#  (...)
+	#  454       129 0x00007ffff7df1d28
+	#  455         0 0x00007ffff7df1d3f
+	#
+	# Match each line to avoid overflowing expect's buffer.
+	exp_continue
+    }
+    -re "$gdb_prompt $" {
+	gdb_assert $saw_srcfile $test
+    }
+}
+
+gdb_test "maint info line-table ${srcfile}" \
+    "symtab: \[^\n\r\]+${srcfile}.*INDEX.*LINE.*ADDRESS.*" \
+    "maint info line-table with filename of current symtab"
+
+gdb_test_no_output "maint info line-table ${srcfile2}" \
+    "maint info line-table with filename of symtab that is not currently expanded"
+
+gdb_test_no_output "maint expand-symtabs"
+
+gdb_test "maint info line-table ${srcfile2}" \
+    "symtab: \[^\n\r\]+${srcfile2}.*INDEX.*LINE.*ADDRESS.*" \
+    "maint info line-table with filename of symtab that is not current"
+
+gdb_test_no_output "maint info line-table xxx.c" \
+    "maint info line-table with invalid filename"
+
 set timeout $oldtimeout
 
 #============test help on maint commands
@@ -526,6 +561,13 @@ gdb_expect {
 
 #set timeout $oldtimeout
 
+# Test that the commands work without an argument.  For this test, we
+# don't need an inferior loaded/running.  See PR gdb/21164.
+gdb_exit
+gdb_start
+gdb_test_no_output "maint print symbols"
+gdb_test_no_output "maint print msymbols"
+gdb_test_no_output "maint print psymbols"
 
 gdb_exit
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/Makefile.in ./gdb/testsuite/gdb.base/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,69 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = a2-run advance all-types annota1 annota1-watch_thread_num \
-	annota3 anon args arrayidx async attach attach-pie-misread \
-	attach2 auxv bang\! bfp-test bigcore bitfields bitfields2 \
-	break break-always break-entry break-interp-test breako2 \
-	breakpoint-shadow break-on-linker-gcd-function \
-	call-ar-st call-rt-st call-sc-t* call-signals \
-	call-strs callexit callfuncs callfwmall charset checkpoint \
-	chng-syms code_elim1 code_elim2 commands compiler completion complex \
-	condbreak consecutive constvars coremaker cursal cvexpr \
-	dbx-test del disasm-end-cu display dprintf-pending dump dup-sect \
-	dup-sect.debug \
-	dup-sect.stripped ending-run execd-prog expand-psymtabs exprs \
-	fileio find finish fixsection float foll-exec foll-fork foll-vfork \
-	frame-args freebpcmd fullname funcargs gcore \
-	gcore-buffer-overflow-012* \
-	gdb1090 gdb11530 gdb11531 gdb1250 gdb1555-main gdb1821 gdbvars \
-	hashline1 hashline2 hashline3 hbreak hook-stop-continue \
-	hook-stop-frame huge included infnan info-target int-type \
-	interrupt jit-main jump label langs lineinc list longjmp long_long \
-	macscp mips_pro miscexprs moribund-step multi-forks nodebug \
-	nofield nostdlib opaque overlays pc-fp pending permission \
-	pie-execl1 pie-execl2 pointers pointers2 pr11022 prelinkt \
-	prelinkt.debug prelinkt.stripped printcmds prologue psymtab \
-	ptr-typedef ptype randomize recurse relational relativedebug \
-	reread reread1 restore return return-nodebug-* return2 run \
-	savedregs scope section_command sep sepdebug sepdebug.stripped \
-	sepdebug2 sepdebug2.debug sepdebug2.stripped sepsymtab \
-	sepsymtab.debug sepsymtab.stripped setshow setvar shmain shreloc \
-	sigall sigaltstack sigbpt sigchld siginfo siginfo-addr \
-	siginfo-infcall siginfo-obj signals signull sigrepeat sigstep \
-	sizeof skip skip-solib solib solib-corrupted solib-display-main \
-	solib-nodir solib-overlap-main-0x40000000 solib-symbol-main solib-weak \
-	solib-weak-lib2 solib_sl so-impl-ld so-indr-cl \
-	stack-checking start step-break step-bt step-line step-resume-infcall \
-	step-test store structs-t* structs2 structs3 \
-	symbol-without-target_section term tui-layout twice-tmp \
-	type-opaque-main ui-redirect unload until unwindonsignal \
-	valgrind-db-attach value-double-free varargs vforked-prog \
-	volatile watch-cond watch-cond-infcall watch-non-mem watch-read \
-	watch-vfork watch_thread_num watchpoint watchpoint-cond-gone \
-	watchpoint-hw watchpoint-hw-hit-once watchpoint-solib watchpoints \
-	wchar whatis whatis-exp catch-syscall \
-	pr10179 gnu_vector
-
-MISCELLANEOUS = coremmap.data dprintf-pendshr.sl ../foobar.baz fixsectshr.sl \
-	pendshr.sl shreloc1.sl shreloc2.sl twice-tmp.c \
-	shr1.sl shr2.sl solib_sl.sl solib1.sl solib2.sl \
-	unloadshr.sl unloadshr2.sl watchpoint-solib-shr.sl \
-	weaklib1.sl weaklib2.sl hashline1.c hashline2.c hashline3.c \
-	auxv.gcore bigcore.corefile *.core *.debug *.stripped \
-	gcore-buffer-overflow.test gcore.test shreloc.txt tmp-fullname.c
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/max-value-size.c ./gdb/testsuite/gdb.base/max-value-size.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/max-value-size.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/max-value-size.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+char one;
+char ten[10];
+char one_hundred[100];
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/max-value-size.exp ./gdb/testsuite/gdb.base/max-value-size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/max-value-size.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/max-value-size.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,96 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return 0
+}
+
+# Run "show max-value-size" and return the interesting bit of the
+# result.  This is either the maximum size in bytes, or the string
+# "unlimited".
+proc get_max_value_size {} {
+    global gdb_prompt
+    global decimal
+
+    gdb_test_multiple "show max-value-size" "" {
+	-re "Maximum value size is ($decimal) bytes.*$gdb_prompt $" {
+	    return $expect_out(1,string)
+	}
+	-re "Maximum value size is unlimited.*$gdb_prompt $" {
+	    return "unlimited"
+	}
+    }
+}
+
+# Assuming that MAX_VALUE_SIZE is the current value for
+# max-value-size, print the test values.  Use TEST_PREFIX to make the
+# test names unique.
+proc do_value_printing { max_value_size test_prefix } {
+    with_test_prefix ${test_prefix} {
+	gdb_test "p/d one" " = 0"
+	if { $max_value_size != "unlimited" && $max_value_size < 100 } then {
+	    gdb_test "p/d one_hundred" \
+		"value requires 100 bytes, which is more than max-value-size"
+	} else {
+	    gdb_test "p/d one_hundred" " = \\{0 <repeats 100 times>\\}"
+	}
+	gdb_test "p/d one_hundred \[99\]" " = 0"
+    }
+}
+
+# Install SET_VALUE as the value for max-value-size, then print the
+# test values.
+proc set_and_check_max_value_size { set_value } {
+    if { $set_value == "unlimited" } then {
+	set check_pattern "unlimited"
+    } else {
+	set check_pattern "${set_value} bytes"
+    }
+
+    gdb_test_no_output "set max-value-size ${set_value}"
+    gdb_test "show max-value-size" \
+	"Maximum value size is ${check_pattern}." \
+	"check that the value shows as ${check_pattern}"
+
+    do_value_printing ${set_value} "max-value-size is '${set_value}'"
+}
+
+# Check the default value is sufficient.
+do_value_printing [get_max_value_size] "using initial max-value-size"
+
+# Check some values for max-value-size that should prevent some
+# allocations.
+set_and_check_max_value_size 25
+set_and_check_max_value_size 99
+
+# Check values for max-value-size that should allow all allocations.
+set_and_check_max_value_size 100
+set_and_check_max_value_size 200
+set_and_check_max_value_size "unlimited"
+
+# Check that we can't set the maximum size stupidly low.
+gdb_test "set max-value-size 1" \
+    "max-value-size set too low, increasing to \[0-9\]+ bytes"
+gdb_test "set max-value-size 0" \
+    "max-value-size set too low, increasing to \[0-9\]+ bytes"
+gdb_test "set max-value-size -5" \
+    "only -1 is allowed to set as unlimited"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/memattr.c ./gdb/testsuite/gdb.base/memattr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/memattr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/memattr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/memattr.exp ./gdb/testsuite/gdb.base/memattr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/memattr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/memattr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,12 +19,15 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
 runto main
 
+# Delete all target-supplied memory regions.
+delete_memory_regions
+
 set mem1start -1
 set mem2start -1
 set mem3start -1
@@ -487,18 +490,6 @@ gdb_test "delete mem 8" "No memory regio
 # Test overlapping checking
 #
 
-proc delete_memory {} {
-    global gdb_prompt
-
-    gdb_test_multiple "delete mem" "delete mem" {
-       -re "Delete all memory regions.*y or n.*$" {
-           send_gdb "y\n"
-           exp_continue
-       }
-       -re "$gdb_prompt $" { }
-    }
-}
-
 # Create a region that doesn't overlap (a PASS in the table).
 
 proc region_pass { region } {
@@ -530,7 +521,8 @@ proc region_fail { region } {
 #                  |--|       PASS
 #                        |--- PASS
 
-delete_memory
+# Clear the memory regions list.
+delete_memory_regions
 gdb_test_no_output "mem 0x30 0x60 ro"
 with_test_prefix "0x30 0x60" {
     region_fail "0x20 0x40"
@@ -562,7 +554,8 @@ with_test_prefix "0x30 0x60" {
 #         |--|                PASS
 #   |--|                      PASS
 
-delete_memory
+# Clear the memory regions list.
+delete_memory_regions
 gdb_test_no_output "mem 0x30 0x0 ro"
 with_test_prefix "0x30 0x0" {
     region_fail "0x20 0x50"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/mips_pro.exp ./gdb/testsuite/gdb.base/mips_pro.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/mips_pro.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/mips_pro.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,8 +30,7 @@ if { [test_compiler_info gcc-*-*] } then
     lappend options additional_flags=-O2 additional_flags=-fno-inline
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile $options]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/miscexprs.exp ./gdb/testsuite/gdb.base/miscexprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/miscexprs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/miscexprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ set additional_flags "additional_flags=$
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ${additional_flags} nowarnings]] != "" } {
-    untested miscexprs.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/morestack.c ./gdb/testsuite/gdb.base/morestack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/morestack.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/morestack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/morestack.exp ./gdb/testsuite/gdb.base/morestack.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/morestack.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/morestack.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,11 @@ if {$gcc_compiled == 0} {
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {additional_flags=-fsplit-stack}] } {
+# -fuse-ld=gold is used for calling printf code built without -fsplit-stack
+# which could crash otherwise.  See GCC documentation of -fsplit-stack.
+set opts "additional_flags=-fsplit-stack"
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile [list $opts additional_flags=-fuse-ld=gold]] \
+     && [prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/moribund-step.exp ./gdb/testsuite/gdb.base/moribund-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/moribund-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/moribund-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { ![support_displaced_stepping] } {
     return -1
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-forks.c ./gdb/testsuite/gdb.base/multi-forks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-forks.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/multi-forks.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "../lib/unbuffer_output.c"
+
 pid_t pids[4];
 
 int
@@ -27,6 +29,8 @@ main()
 {
   int i;
 
+  gdb_unbuffer_output ();
+
   for (i = 0; i < 4; i++)
     pids [i] = fork ();
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-forks.exp ./gdb/testsuite/gdb.base/multi-forks.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-forks.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/multi-forks.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2005-2015 Free Software Foundation, Inc.
+#   Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,14 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [is_remote target] || ![isnative] } then {
-    continue
-}
-
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
+if { ![istarget "*-*-linux*"] } then {
     continue
 }
 
@@ -28,7 +24,7 @@ if {![istarget "hppa*-hp-hpux*"] && ![is
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested multi-forks.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -50,6 +46,7 @@ set exit_bp_loc [gdb_get_line_number "Se
 
 proc continue_to_exit_bp_loc {} {
     global exit_bp_loc decimal gdb_prompt
+    global inferior_spawn_id gdb_spawn_id
 
     gdb_breakpoint $exit_bp_loc
 
@@ -70,6 +67,7 @@ proc continue_to_exit_bp_loc {} {
 	# first in the script that occurs anywhere in the input, so that
 	# we don't skip anything.
 	gdb_expect {
+	    -i "$inferior_spawn_id $gdb_spawn_id"
 	    -re "($decimal done)|(Breakpoint)|($gdb_prompt)" {
 		if {[info exists expect_out(1,string)]} {
 		    incr seen_done
@@ -109,6 +107,7 @@ proc continue_to_exit_bp_loc {} {
 # First set gdb to follow the child.
 # The result should be that each of the 4 forks returns zero.
 
+clean_restart ${binfile}
 runto_main
 gdb_test_no_output "set follow-fork child"
 continue_to_exit_bp_loc
@@ -118,6 +117,7 @@ gdb_test "print pids" "\\$.* = \\{0, 0, 
 # Now set gdb to follow the parent.
 # Result should be that none of the 4 forks returns zero.
 
+clean_restart ${binfile}
 runto_main
 gdb_test_no_output "set follow-fork parent" ""
 continue_to_exit_bp_loc
@@ -129,12 +129,6 @@ gdb_test "print pids\[0\]==0 || pids\[1\
 # Now test with detach-on-fork off.
 #
 
-# detach-on-fork isn't implemented on hpux.
-#
-if {![istarget "*-*-linux*"]} then {
-    continue
-}
-
 # Start with a fresh gdb
 
 clean_restart ${binfile}
@@ -155,14 +149,14 @@ gdb_test_no_output "set detach off" "set
 #
 
 for {set i 1} {$i <= 15} {incr i} {
-  gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit $i"
-  gdb_test "info inferior" " 5 .* 4 .* 3 .* 2 .*" "info inferior $i"
+  gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i"
+  gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior $i"
   gdb_test "inferior $i + 1" "(_dl_sysinfo_int80|fork|__kernel_(v|)syscall).*" \
       "inferior $i"
 }
 
-gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit 16"
-gdb_test "info inferiors" " 5 .* 4 .* 3 .* 2 .*" "info inferior 16"
+gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit 16"
+gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior 16"
 gdb_test "inferior 2" " main .*" "restart final"
 
 #
@@ -174,36 +168,18 @@ gdb_test "inferior 2" " main .*" "restar
 # 
 
 # [assumes we're at #1]
-gdb_test "detach inferior 2" "Detaching .*" "Detach 2"
-gdb_test "detach inferior 3" "Detaching .*" "Detach 3"
-gdb_test "detach inferior 4" "Detaching .*" "Detach 4"
-gdb_test "detach inferior 5" "Detaching .*" "Detach 5"
+gdb_test "detach inferior 2" "Detaching .*" "detach 2"
+gdb_test "detach inferior 3" "Detaching .*" "detach 3"
+gdb_test "detach inferior 4" "Detaching .*" "detach 4"
+gdb_test "detach inferior 5" "Detaching .*" "detach 5"
 
 # 
 # Test kill inferior
 #
 
-gdb_test_no_output "kill inferior 6" "Kill 6"
-gdb_test "info inferior 6" "<null>.*" "Did kill 6"
-gdb_test_no_output "kill inferior 7" "Kill 7"
-gdb_test "info inferior 7" "<null>.*" "Did kill 7"
-gdb_test_no_output "kill inferior 8" "Kill 8"
-gdb_test "info inferior 8" "<null>.*" "Did kill 8"
-gdb_test_no_output "kill inferior 9" "Kill 9"
-gdb_test "info inferior 9" "<null>.*" "Did kill 9"
-gdb_test_no_output "kill inferior 10" "Kill 10"
-gdb_test "info inferior 10" "<null>.*" "Did kill 10"
-gdb_test_no_output "kill inferior 11" "Kill 11"
-gdb_test "info inferior 11" "<null>.*" "Did kill 11"
-gdb_test_no_output "kill inferior 12" "Kill 12"
-gdb_test "info inferior 12" "<null>.*" "Did kill 12"
-gdb_test_no_output "kill inferior 13" "Kill 13"
-gdb_test "info inferior 13" "<null>.*" "Did kill 13"
-gdb_test_no_output "kill inferior 14" "Kill 14"
-gdb_test "info inferior 14" "<null>.*" "Did kill 14"
-gdb_test_no_output "kill inferior 15" "Kill 15"
-gdb_test "info inferior 15" "<null>.*" "Did kill 15"
-gdb_test_no_output "kill inferior 16" "Kill 16"
-gdb_test "info inferior 16" "<null>.*" "Did kill 16"
+for {set i 6} { $i <= 16} {incr i} {
+    gdb_test_no_output "kill inferior $i" "kill $i"
+    gdb_test "info inferior $i" "<null>.*" "did kill $i"
+}
 
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-line-starts-subshell.exp ./gdb/testsuite/gdb.base/multi-line-starts-subshell.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/multi-line-starts-subshell.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/multi-line-starts-subshell.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-addr.c ./gdb/testsuite/gdb.base/nested-addr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-addr.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-addr.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+typedef struct foo
+{
+  int a;
+  int b;
+} foo;
+
+static foo *foo_array = NULL;
+
+int
+main (void)
+{
+  foo_array = calloc (3, sizeof (*foo_array));
+  foo_array[1].a = 10;
+  foo_array[2].b = 20;
+  return 0; /* BREAK */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-addr.exp ./gdb/testsuite/gdb.base/nested-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-addr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" "${testfile}" "${srcfile}"]} {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "BREAK"]
+gdb_continue_to_breakpoint "BREAK"
+
+# Sanity checking:
+gdb_test "print &foo_array\[1\].a" "= \\(int \\*\\) $hex.*"
+
+# A bug in EVAL_AVOID_SIDE_EFFECTS mode used to yield the following error:
+#    Attempt to take address of value not located in memory.
+gdb_test "print 1 && &foo_array\[1\].a" "= 1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp1.c ./gdb/testsuite/gdb.base/nested-subp1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp1.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp1.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,37 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+foo (int i1)
+{
+  int
+  nested (int i2)
+  {
+    /* Here with i1 and i2, we can test that GDB can fetch both a local and a
+       non-local variable in the most simple nested function situation: the
+       parent block instance is accessible as the directly upper frame.  */
+    return i1 * i2; /* STOP */
+  }
+
+  return nested (i1 + 1);
+}
+
+int
+main ()
+{
+  return !foo (1);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp1.exp ./gdb/testsuite/gdb.base/nested-subp1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp1.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# Test nested functions related functionality.
+#
+
+standard_testfile
+
+
+set testcase "nested-subp1"
+
+if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
+                  [standard_output_file "${testcase}"] \
+                  executable \
+                  [list debug "additional_flags=-std=gnu99"]] != "" } {
+    return -1
+}
+
+
+# Run until the variables we are interested in are visible.
+
+clean_restart "${testcase}"
+if ![runto_main] {
+    perror "could not run to main"
+    continue
+}
+
+set bp_location [gdb_get_line_number "STOP" "${testcase}.c"]
+gdb_test "break ${testcase}.c:${bp_location}" \
+         "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \
+         "breakpoint to the STOP marker"
+gdb_test "continue" \
+         "Breakpoint \[0-9\]+, nested .*" \
+         "continue to the STOP marker"
+
+
+# Check we get correct values for both local and non-local variable references.
+
+gdb_test "print i1" "1"
+gdb_test "print i2" "2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp2.c ./gdb/testsuite/gdb.base/nested-subp2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+void
+iter_str (const char *str, void (*callback) (char c))
+{
+  for (; *str != '\0'; ++str)
+    callback (*str);
+}
+
+int
+length_str (const char *str)
+{
+  int count = 0;
+
+  void
+  increment (char c)
+  {
+    /* Here with COUNT, we can test that GDB can read a non-local variable even
+       though it's not directly in the upper stack frame.  */
+    count += 1; /* STOP */
+  }
+
+  iter_str (str, &increment);
+  return count;
+}
+
+int
+main ()
+{
+  if (length_str ("foo") == 3)
+    return 0;
+  return 1;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp2.exp ./gdb/testsuite/gdb.base/nested-subp2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,64 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# Test nested functions related functionality.
+#
+
+standard_testfile
+
+
+set testcase "nested-subp2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
+                  [standard_output_file "${testcase}"] \
+                  executable \
+                  [list debug "additional_flags=-std=gnu99"]] != "" } {
+    return -1
+}
+
+
+# Run until the variables we are interested in are visible.
+
+clean_restart "${testcase}"
+if ![runto_main] {
+    perror "could not run to main"
+    continue
+}
+
+set bp_location [gdb_get_line_number "STOP" "${testcase}.c"]
+gdb_test "break ${testcase}.c:${bp_location}" \
+         "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \
+         "breakpoint to the STOP marker"
+gdb_test "continue" \
+         "Breakpoint \[0-9\]+, increment .*" \
+         "continue to the STOP marker"
+
+
+# Check we get correct values for both local and non-local variable references.
+
+gdb_test "print c"     "102 'f'"
+gdb_test "print count" "0"
+
+
+# Same but a little later: make sure we were looking at the proper places.
+
+gdb_test "continue" \
+         "Breakpoint \[0-9\]+, increment .*" \
+         "continue to the STOP marker"
+gdb_test "print c"     "111 'o'"
+gdb_test "print count" "1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp3.c ./gdb/testsuite/gdb.base/nested-subp3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp3.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp3.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,66 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+typedef void (*callback_t) (void);
+
+extern void process (callback_t cb);
+extern void parent (int first, callback_t cb);
+
+void
+ignore (int unused)
+{
+  (void) unused;
+}
+
+void
+process (callback_t cb)
+{
+  parent (0, cb);
+}
+
+void
+parent (int first, callback_t cb)
+{
+  void child (void)
+  {
+    /* When reaching this, there are two block instances for PARENT on the
+       stack: the one that is right in the upper frame is not the one actually
+       used for non-local references, so GDB has to follow the static link in
+       order to get the correct instance, and thus in order to read the proper
+       variables.
+
+       As a simple check, we can verify that under GDB, the following is true:
+       parent_first == first (which should be one: see the IF block below).  */
+    const int parent_first = first;
+    ignore (parent_first); /* STOP */
+    ignore (first);
+  }
+
+  if (first)
+    process (&child);
+  else
+    cb ();
+}
+
+int
+main ()
+{
+  parent (1, NULL);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp3.exp ./gdb/testsuite/gdb.base/nested-subp3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nested-subp3.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nested-subp3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# Test nested functions related functionality.
+#
+
+standard_testfile
+
+
+set testcase "nested-subp3"
+
+if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
+                  [standard_output_file "${testcase}"] \
+                  executable \
+                  [list debug "additional_flags=-std=gnu99"]] != "" } {
+    return -1
+}
+
+
+# Run until the variables we are interested in are visible.
+
+clean_restart "${testcase}"
+if ![runto_main] {
+    perror "could not run to main"
+    continue
+}
+
+set bp_location [gdb_get_line_number "STOP" "${testcase}.c"]
+gdb_test "break ${testcase}.c:${bp_location}" \
+         "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \
+         "breakpoint to the STOP marker"
+gdb_test "continue" \
+         "Breakpoint \[0-9\]+, child .*" \
+         "continue to the STOP marker"
+
+
+# Check we get correct values for both local and non-local variable references.
+
+gdb_test "print first"        "1"
+gdb_test "print parent_first" "1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui.c ./gdb/testsuite/gdb.base/new-ui.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,42 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+volatile int global = 0;
+
+int
+main (void)
+{
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1; /* set break main console here */
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1;
+  global = 1; /* set break extra console here */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-echo.c ./gdb/testsuite/gdb.base/new-ui-echo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-echo.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui-echo.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+volatile int global = 0;
+
+int
+main (void)
+{
+  global = 1; /* set break main console here */
+  global = 1;
+  global = 1; /* set break extra console here */
+  global = 1;
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-echo.exp ./gdb/testsuite/gdb.base/new-ui-echo.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-echo.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui-echo.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,127 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR 20494 (User input stops being echoed in CLI).
+# Before that bug was fixed, starting an inferior in a non-main UI
+# would result in GDB saving readline's prepped terminal state as
+# gdb's "own" terminal state (i.e., target_terminal_ours state),
+# resulting in subsequent synchronous execution commands in the main
+# UI disabling input echo.
+
+standard_testfile
+
+set compile_options "debug"
+if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+# Start gdb and create an extra console UI.  Start the inferior in the
+# DRIVER console (either "main" or "extra"), and then enter a
+# synchronous execution command in the extra console.  Before PR 20494
+# was fixed, if DRIVER was a secondary UI, GDB would lose input echo
+# on the main UI after the synchronous execution command.  We test
+# with both main and extra UIs as driver consoles for completeness.
+
+proc echo_test {driver} {
+    global srcfile testfile
+    global gdb_prompt
+    global gdb_spawn_id
+    global gdb_main_spawn_id extra_spawn_id
+    global decimal
+
+    clean_restart $testfile
+
+    # Save the main UI's spawn ID.
+    set gdb_main_spawn_id $gdb_spawn_id
+
+    # Create the new PTY for the secondary console UI.
+    spawn -pty
+    set extra_spawn_id $spawn_id
+    set extra_tty_name $spawn_out(slave,name)
+    gdb_test_multiple "new-ui console $extra_tty_name" "new-ui" {
+	-re "New UI allocated\r\n$gdb_prompt $" {
+	}
+    }
+
+    with_spawn_id $extra_spawn_id {
+	set test "initial prompt on extra console"
+	gdb_test_multiple "" $test {
+	    -re "$gdb_prompt $" {
+		pass $test
+	    }
+	}
+    }
+
+    set main_console [list $gdb_main_spawn_id "main console"]
+    set extra_console [list $extra_spawn_id "extra console"]
+
+    if {$driver == "main"} {
+	set con1 $main_console
+	set con2 $extra_console
+    } else {
+	set con1 $extra_console
+	set con2 $main_console
+    }
+
+    set con1_spawn_id [lindex $con1 0]
+    set con2_spawn_id [lindex $con2 0]
+    set con1_name [lindex $con1 1]
+    set con2_name [lindex $con2 1]
+
+    set bp_lineno [gdb_get_line_number "set break $con1_name here"]
+
+    with_spawn_id $con1_spawn_id {
+	gdb_test "break $srcfile:$bp_lineno" \
+	    "Breakpoint $decimal .*$srcfile, line $bp_lineno\\." \
+	    "set breakpoint using $con1_name"
+	gdb_run_cmd
+	gdb_test "" "set break $con1_name here .*" "run to breakpoint on $con1_name"
+    }
+
+    with_spawn_id $con2_spawn_id {
+	set test "breakpoint hit reported on $con2_name too"
+	gdb_test_multiple "" $test {
+	    -re "Breakpoint $decimal, .* set break $con1_name here " {
+		pass $test
+	    }
+	}
+	gdb_test "next" "global = 1;" "next on $con2_name"
+    }
+
+    # Ensure echo remains enabled in both consoles.
+    with_spawn_id $con1_spawn_id {
+	gdb_test "print 1" "^print 1\r\n\\\$1 = 1" "print on $con1_name echoes"
+    }
+    with_spawn_id $con2_spawn_id {
+	gdb_test "print 2" "^print 2\r\n\\\$2 = 2" "print on $con2_name echoes"
+    }
+}
+
+# The test driver.
+
+proc test_driver {} {
+
+    with_test_prefix "extra console as driver" {
+	echo_test "extra"
+    }
+
+    with_test_prefix "main console as driver" {
+	echo_test "main"
+    }
+
+}
+
+test_driver
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui.exp ./gdb/testsuite/gdb.base/new-ui.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,185 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+set compile_options "debug"
+if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+# Ensure no output has been sent.  Use MESSAGE as test message.
+
+proc ensure_no_output {message} {
+    global decimal
+
+    # Run a command and use an anchor to make sure no output appears
+    # before the command's expected output.
+    gdb_test "print 999" "^print 999\r\n\\\$$decimal = 999" $message
+}
+
+# Run a few execution-related commands on CON1, and ensure the proper
+# output, or none, if appropriate, is sent to CON2.  CON1_NAME and
+# CON2_NAME are the names of the consoles.
+
+proc do_execution_tests {con1 con1_name con2 con2_name} {
+    global srcfile
+    global decimal
+
+    set bp_lineno [gdb_get_line_number "set break $con1_name here"]
+
+    with_spawn_id $con1 {
+	gdb_test "next" "global = 1;"
+    }
+    with_spawn_id $con2 {
+	ensure_no_output "next causes no spurious output on other console"
+    }
+
+    with_spawn_id $con1 {
+	gdb_test "break $srcfile:$bp_lineno" \
+	    "Breakpoint $decimal .*$srcfile, line $bp_lineno\\." \
+	    "set breakpoint"
+    }
+    with_spawn_id $con2 {
+	ensure_no_output "break causes no spurious output on other console"
+    }
+
+    with_spawn_id $con1 {
+	gdb_test "continue" "set break $con1_name here .*" "continue to breakpoint"
+    }
+
+    with_spawn_id $con2 {
+	set test "breakpoint hit reported on other console"
+	gdb_test_multiple "" $test {
+	    -re "Breakpoint $decimal, .* set break $con1_name here " {
+		pass $test
+	    }
+	}
+    }
+}
+
+# The test proper.
+
+proc_with_prefix do_test {} {
+    global srcfile testfile
+    global gdb_prompt
+    global gdb_spawn_id
+    global gdb_main_spawn_id extra_spawn_id
+
+    clean_restart $testfile
+
+    if ![runto_main] {
+	untested "could not run to main"
+	return -1
+    }
+
+    gdb_test "new-ui" \
+	"usage: new-ui <interpreter> <tty>" \
+	"new-ui without arguments"
+
+    set test "new-ui does not repeat"
+    send_gdb "\n"
+    gdb_test_multiple "" $test {
+	-re "^\r\n$gdb_prompt $" {
+	    pass $test
+	}
+    }
+
+    # Save the main UI's spawn ID.
+    set gdb_main_spawn_id $gdb_spawn_id
+
+    # Create the new PTY for the secondary console UI.
+    spawn -pty
+    set extra_spawn_id $spawn_id
+    set extra_tty_name $spawn_out(slave,name)
+    gdb_test_multiple "new-ui console $extra_tty_name" "new-ui" {
+	-re "New UI allocated\r\n$gdb_prompt $" {
+	}
+    }
+
+    with_spawn_id $extra_spawn_id {
+	set test "initial prompt on extra console"
+	gdb_test_multiple "" $test {
+	    -re "$gdb_prompt $" {
+		pass $test
+	    }
+	}
+    }
+
+    # Ensure non-execution commands in one console don't cause output
+    # in the other consoles.
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "print 1" "^print 1\r\n\\\$1 = 1" "print on main console"
+    }
+    with_spawn_id $extra_spawn_id {
+	gdb_test "print 2" "^print 2\r\n\\\$2 = 2" "print on extra console"
+    }
+
+    # Verify that we get proper queries on the main UI, but that they are
+    # auto-answered on secondary UIs.
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "delete" "" "delete all breakpoint on main console" \
+		 "Delete all breakpoints. .y or n. $" "n"
+    }
+    with_spawn_id $extra_spawn_id {
+	gdb_test "delete" \
+		 "Delete all breakpoints. .y or n. .answered Y; input not from terminal." \
+		 "delete all breakpoints on extra console"
+    }
+
+    # Run a few execution tests with the main console as the driver
+    # console.
+    with_test_prefix "main console" {
+	do_execution_tests \
+	    $gdb_main_spawn_id "main console" \
+	    $extra_spawn_id "extra console"
+    }
+    # Same, but with the extra console as driver.
+    with_test_prefix "extra console" {
+	do_execution_tests \
+	    $extra_spawn_id "extra console" \
+	    $gdb_main_spawn_id "main console"
+    }
+}
+
+# Test missing / invalid arguments.
+
+proc_with_prefix do_test_invalid_args {} {
+    global testfile
+
+    clean_restart $testfile
+
+    spawn -pty
+    set extra_tty_name $spawn_out(slave,name)
+
+    # Test bad terminal path.
+    gdb_test "new-ui console /non/existent/path" \
+	     "opening terminal failed: No such file or directory\." \
+	     "new-ui with bad terminal path"
+
+    # Test bad interpreter name.
+    gdb_test "new-ui bloop $extra_tty_name" \
+	     "Interpreter `bloop' unrecognized" \
+	     "new-ui with bad interpreter name"
+
+    # Test that we can continue working normally.
+    if ![runto_main] {
+	fail "could not run to main"
+    }
+}
+
+do_test
+do_test_invalid_args
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-pending-input.c ./gdb/testsuite/gdb.base/new-ui-pending-input.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-pending-input.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui-pending-input.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <unistd.h>
+
+int
+main (void)
+{
+  sleep (2);
+  return 0; /* set breakpoint here */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-pending-input.exp ./gdb/testsuite/gdb.base/new-ui-pending-input.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/new-ui-pending-input.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/new-ui-pending-input.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,123 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test 'gdb "-ex new-ui TTY" -ex "start"' (or any other synchronous
+# execution command), when TTY already has input pending.  GDB used to
+# internal error in this situation.
+
+standard_testfile
+
+set compile_options "debug"
+if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+# See intro.
+
+proc test_command_line_new_ui_pending_input {} {
+    global gdb_prompt
+    global binfile
+
+    # This test requires running a synchronous execution command from
+    # the command line.
+    if {[use_gdb_stub] || [target_info gdb_protocol] == "extended-remote" } {
+	unsupported "can't run from the command line"
+	return 0
+    }
+
+    spawn -pty
+    set extra_spawn_id $spawn_id
+    set extra_tty_name $spawn_out(slave,name)
+
+    # An arbitrary number of prints.
+    set nprints 3
+
+    # Queue a few commands before GDB is started.
+    with_spawn_id $extra_spawn_id {
+	for {set i 1} {$i <= $nprints} {incr i} {
+	    send_gdb "print $i\n"
+	}
+    }
+    pass "commands pending"
+
+    # Now spawn GDB, creating a new-ui and at the same time running a
+    # synchronous command.
+    set test "spawn gdb"
+
+    set bpline [gdb_get_line_number "set breakpoint here"]
+
+    set options ""
+    append options " -iex \"set height 0\""
+    append options " -iex \"set width 0\""
+    append options " -iex \"new-ui console $extra_tty_name\""
+    append options " -ex \"b $bpline\""
+    append options " -ex \"run\""
+
+    if {[gdb_spawn_with_cmdline_opts "$options $binfile"] != 0} {
+	fail $test
+	return
+    } else {
+	pass $test
+    }
+
+    # Consume the initial prompt on the extra console.
+    with_spawn_id $extra_spawn_id {
+	set test "initial prompt on extra console"
+	gdb_test_multiple "" $test {
+	    -re "$gdb_prompt $" {
+		pass $test
+	    }
+	}
+    }
+
+    # Check that we see the result of the print commands in the extra
+    # UI.
+    with_spawn_id $extra_spawn_id {
+	for {set i 1} {$i <= $nprints} {incr i} {
+	    set test "print $i on extra console"
+	    gdb_test_multiple "" $test {
+		-re " = $i\r\n$gdb_prompt " {
+		    pass "$test"
+		}
+	    }
+	}
+    }
+
+    # Now check that we reach the breakpoint successfully.
+    set test "run to breakpoint on main console"
+    gdb_test_multiple "" $test {
+	-re "Breakpoint .* main .*set breakpoint here.*$gdb_prompt $" {
+	    pass $test
+	}
+    }
+
+    # And likewise on the extra console.  No prompt is expected.
+    with_spawn_id $extra_spawn_id {
+	set test "run to breakpoint on extra console"
+	gdb_test_multiple "" $test {
+	    -re "Breakpoint .* main .*set breakpoint here" {
+		pass $test
+	    }
+	}
+    }
+}
+
+# The driver.  Calls all tests.
+proc testcase_driver {} {
+    test_command_line_new_ui_pending_input
+}
+
+testcase_driver
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nextoverexit.c ./gdb/testsuite/gdb.base/nextoverexit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nextoverexit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nextoverexit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nextoverexit.exp ./gdb/testsuite/gdb.base/nextoverexit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nextoverexit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nextoverexit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -14,7 +14,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $testfile.c]} {
+if {[prepare_for_testing "failed to prepare" $testfile $testfile.c]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nodebug.exp ./gdb/testsuite/gdb.base/nodebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nodebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nodebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [test_compiler_info "xlc-*"] {
 }
 
 if  { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
-    untested "Couldn't compile $srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -81,54 +81,37 @@ if [runto inner] then {
     # doesn't know the variables exist at all.
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
 
     gdb_test "p datalocal" "= 4"
 
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
 
     gdb_test "whatis datalocal" "<(data variable|variable), no debug info>"
 
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
 
     gdb_test "ptype datalocal" "<(data variable|variable), no debug info>"
     gdb_test "p bssglobal" "= 0"
     gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>|int"
     gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>|int"
-    
+
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
 
     gdb_test "p bsslocal" "= 0"
 
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
 
     gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>"
 
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
-    if ![test_compiler_info "gcc-*"] {
-        setup_xfail "hppa*-*-hpux*"
-    }
+
     gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>"
-    
+
     gdb_test "backtrace 10" "#0.*inner.*#1.*middle.*#2.*top.*#3.*main.*" \
 	"backtrace from inner in nodebug.exp"
     # Or if that doesn't work, at least hope for the external symbols
@@ -140,35 +123,14 @@ if [runto inner] then {
     # This test is not as obscure as it might look.  `p getenv ("TERM")'
     # is a real-world example, at least on many systems.
     if [target_info exists gdb,cannot_call_functions] {
-	setup_xfail "*-*-*" 2416
-	fail "p/c array_index(\"abcdef\",2)"
+	unsupported "p/c array_index(\"abcdef\",2)"
     } else {
-	#
-	# On HP-UX, a support function (__d_plt_call) necessary to
-	# implement an inferior call is normally only available when
-	# the inferior was compiled with -g.  Thus, we expect this
-	# testpoint to fail on HP-UX.
-	if { [istarget "hppa*-hpux*"] } {
-	    gdb_test_multiple "p/c array_index(\"abcdef\",2)" \
-		"p/c array_index(\"abcdef\",2)" {
-		    -re ".*Suggest linking executable with -g.*$gdb_prompt $" {
-			pass "p/c array_index(\"abcdef\",2)" 
-		    }
-		    -re ".*Cannot find __wdb_call_dummy in.*end.o.*" {
-			pass "p/c array_index(\"abcdef\",2)" 
-		    }
-		-re ".*99 'c'.*" {
-		    pass "p/c array_index(\"abcdef\",2)"
-		}
-	    }
-	} else {
-	    # We need to up this because this can be really slow on some boards.
-	    # (malloc() is called as part of the test).
-	    set prev_timeout $timeout
-	    set timeout 60
-	    gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
-	    set timeout $prev_timeout
-	}
+	# We need to up this because this can be really slow on some boards.
+	# (malloc() is called as part of the test).
+	set prev_timeout $timeout
+	set timeout 60
+	gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
+	set timeout $prev_timeout
     }
     
     # Now, try that we can give names of file-local symbols which happen
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nofield.c ./gdb/testsuite/gdb.base/nofield.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nofield.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nofield.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nofield.exp ./gdb/testsuite/gdb.base/nofield.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nofield.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nofield.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-finish.c ./gdb/testsuite/gdb.base/noreturn-finish.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-finish.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/noreturn-finish.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-finish.exp ./gdb/testsuite/gdb.base/noreturn-finish.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-finish.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/noreturn-finish.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ proc noreturn_finish_test { } {
     global gdb_prompt
 
     if { ! [ runto_main ] } then {
-	untested ${testfile}.exp
+	untested "could not run to main"
 	return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-return.c ./gdb/testsuite/gdb.base/noreturn-return.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-return.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/noreturn-return.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-return.exp ./gdb/testsuite/gdb.base/noreturn-return.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/noreturn-return.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/noreturn-return.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ proc noreturn_test { } {
     global gdb_prompt
 
     if { ! [ runto_main ] } then {
-	untested ${testfile}.exp
+	untested "could not run to main"
 	return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/normal.c ./gdb/testsuite/gdb.base/normal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/normal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/normal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nostdlib.c ./gdb/testsuite/gdb.base/nostdlib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nostdlib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nostdlib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nostdlib.exp ./gdb/testsuite/gdb.base/nostdlib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/nostdlib.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/nostdlib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ standard_testfile .c
 # See also the comment in break-entry.exp.
 
 if [target_info exists use_gdb_stub] {
-    untested ${testfile}.exp
+    untested "skipping tests due to use_gdb_stub"
     return
 }
 
@@ -41,7 +41,7 @@ if [board_info $board exists mathlib] {
     unset_board_info mathlib
 }
 if {$err != ""} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/offsets.c ./gdb/testsuite/gdb.base/offsets.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/offsets.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/offsets.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+struct big_struct
+{
+  char first[0x10000000 + 16];
+  long second;
+} big_struct;
+
+int
+main (int argc, char *argv[])
+{
+  return (0);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/offsets.exp ./gdb/testsuite/gdb.base/offsets.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/offsets.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/offsets.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,44 @@
+# Test big offsets
+
+# Copyright (c) 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile offsets.c
+
+if { [prepare_for_testing "failed to prepare for testing large offsets" \
+	  ${testfile} ${srcfile}] } {
+    return -1
+}
+
+set test "print &big_struct test"
+gdb_test_multiple "print &big_struct" "$test" {
+    -re "\\$\[0-9\]* = .* (0x\[0-9a-fA-F\]*) .*\[\r\n\]*$gdb_prompt $" {
+	set addr1 $expect_out(1,string)
+	pass "$test ($addr1)"
+    }
+}
+
+set test "print &big_struct.second test"
+gdb_test_multiple "print &big_struct.second" "$test" {
+    -re "\\$\[0-9\]* = .* (0x\[0-9a-fA-F\]*) .*\[\r\n\]*$gdb_prompt $" {
+	set addr2 $expect_out(1,string)
+
+	if {[expr $addr2 - $addr1] == [expr 0x10000000 + 16]} {
+	    pass "big offsets"
+	} else {
+	    fail "big offsets"
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/opaque.exp ./gdb/testsuite/gdb.base/opaque.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/opaque.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/opaque.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,9 +24,8 @@ if [get_compiler_info] {
 
 standard_testfile opaque0.c opaque1.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] debug]} {
-    untested $testfile.exp
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/overlays.exp ./gdb/testsuite/gdb.base/overlays.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/overlays.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/overlays.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,9 +22,7 @@
 
 set data_overlays 1
 
-if [istarget "d10v-*-*"] then {
-    set linker_script "${srcdir}/${subdir}/d10v.ld"
-} elseif [istarget "m32r-*-*"] then {
+if [istarget "m32r-*-*"] then {
     set linker_script "${srcdir}/${subdir}/m32r.ld"
 } elseif [istarget "spu-*-*"] then {
     set linker_script "${srcdir}/${subdir}/spu.ld"
@@ -44,7 +42,7 @@ standard_testfile overlays.c ovlymgr.c f
 if {[build_executable $testfile.exp $testfile \
 	 [list $srcfile $srcfile2 $srcfile3 $srcfile4 $srcfile5 $srcfile6] \
 	 {debug ldscript=-Wl,-T$linker_script}] == -1} {
-     untested overlays.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -69,7 +67,7 @@ set iptrcast [string_to_regexp "(int *)"
 set hexx "0x\[0-9abcdefABCDEF\]+"
 
 gdb_test_no_output "overlay manual"
-gdb_test "overlay list" "No sections are mapped." "List with none mapped"
+gdb_test "overlay list" "No sections are mapped." "list with none mapped"
 
 # capture the LMA addresses of [foo bar baz grbx foox barx bazx grbxx]
 
@@ -115,39 +113,39 @@ if $data_overlays then {
 # capture the VMA addresses of [foo bar baz grbx foox barx bazx grbxx]
 
 gdb_test "overlay map .ovly0" "" 
-gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "List ovly0"
+gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "list ovly0"
 set foo_vma [get_func_address "foo"  "foo"  "foo  runtime address"]
 
 gdb_test "overlay map .ovly1" "" 
-gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "List ovly1"
+gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "list ovly1"
 set bar_vma [get_func_address "bar"  "bar"  "bar  runtime address"]
 
 gdb_test "overlay map .ovly2" "" 
-gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "List ovly2"
+gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "list ovly2"
 set baz_vma [get_func_address "baz"  "baz"  "baz  runtime address"]
 
 gdb_test "overlay map .ovly3" "" 
-gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "List ovly3"
+gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "list ovly3"
 set grbx_vma [get_func_address "grbx" "grbx" "grbx runtime address"]
 
 if $data_overlays then {
     gdb_test "overlay map .data00" "" 
-    gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "List data00"
+    gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "list data00"
     gdb_test "print \$foox_vma = &foox" \
 	".* $iptrcast 0x.*"  "foox runtime addr"
 
     gdb_test "overlay map .data01" "" 
-    gdb_test "overlay list" "Section .data01, loaded .*, mapped .*" "List data01"
+    gdb_test "overlay list" "Section .data01, loaded .*, mapped .*" "list data01"
     gdb_test "print \$barx_vma = &barx" \
 	".* $iptrcast 0x.*"  "barx runtime addr"
 
     gdb_test "overlay map .data02" "" 
-    gdb_test "overlay list" "Section .data02, loaded .*, mapped .*" "List data02"
+    gdb_test "overlay list" "Section .data02, loaded .*, mapped .*" "list data02"
     gdb_test "print \$bazx_vma = &bazx" \
 	".* $iptrcast 0x.*"  "bazx runtime addr"
 
     gdb_test "overlay map .data03" "" 
-    gdb_test "overlay list" "Section .data03, loaded .*, mapped .*" "List data03"
+    gdb_test "overlay list" "Section .data03, loaded .*, mapped .*" "list data03"
     gdb_test "print \$grbxx_vma = &grbxx" \
 	".* $iptrcast 0x.*"  "grbxx runtime addr"
 }
@@ -173,7 +171,7 @@ gdb_expect {
     -re ".*ovly2, "	 	{ fail ".ovly2  not unmapped by .ovly3"  }
     -re ".*data00,"		{ fail ".data00 not unmapped by .data01" }
     -re ".*data02,"		{ fail ".data02 not unmapped by .data03" }
-    -re ".*$gdb_prompt $"	{ pass "Automatic unmapping"             }
+    -re ".*$gdb_prompt $"	{ pass "automatic unmapping"             }
     timeout			{ fail "(timeout) Automatic unmapping"   }
 }
 
@@ -218,7 +216,7 @@ if $data_overlays then {
 # test automatic mode
 
 gdb_test_no_output "overlay auto"
-gdb_test "overlay list" "No sections are mapped." "List none mapped (auto)"
+gdb_test "overlay list" "No sections are mapped." "list none mapped (auto)"
 gdb_test "break foo"  "Breakpoint .*at .*file .*foo.c.*"  "break foo"
 gdb_test "break bar"  "Breakpoint .*at .*file .*bar.c.*"  "break bar"
 gdb_test "break baz"  "Breakpoint .*at .*file .*baz.c.*"  "break baz"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/page.exp ./gdb/testsuite/gdb.base/page.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/page.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/page.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.c ./gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp ./gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping paginate-after-ctrl-c-running.exp because of nointerrupts."
+    return
+}
+
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
@@ -32,7 +37,7 @@ proc test_ctrlc_while_target_running_pag
 	clean_restart $binfile
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-bg-execution.c ./gdb/testsuite/gdb.base/paginate-bg-execution.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-bg-execution.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-bg-execution.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-bg-execution.exp ./gdb/testsuite/gdb.base/paginate-bg-execution.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-bg-execution.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-bg-execution.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ proc test_bg_execution_pagination_return
 	clean_restart $binfile
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
@@ -76,7 +76,7 @@ proc test_bg_execution_pagination_cancel
 	clean_restart $binfile
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
@@ -114,5 +114,7 @@ proc test_bg_execution_pagination_cancel
 }
 
 test_bg_execution_pagination_return
-test_bg_execution_pagination_cancel "ctrl-c"
+if ![target_info exists gdb,nointerrupts] {
+    test_bg_execution_pagination_cancel "ctrl-c"
+}
 test_bg_execution_pagination_cancel "quit"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-execution-startup.c ./gdb/testsuite/gdb.base/paginate-execution-startup.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-execution-startup.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-execution-startup.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-execution-startup.exp ./gdb/testsuite/gdb.base/paginate-execution-startup.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-execution-startup.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-execution-startup.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -174,7 +174,9 @@ proc test_fg_execution_pagination_cancel
 
 if {[probe_can_run_cmdline] > 0} {
     test_fg_execution_pagination_return
-    test_fg_execution_pagination_cancel "ctrl-c"
+    if ![target_info exists gdb,nointerrupts] {
+       test_fg_execution_pagination_cancel "ctrl-c"
+    }
     test_fg_execution_pagination_cancel "quit"
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-inferior-exit.c ./gdb/testsuite/gdb.base/paginate-inferior-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-inferior-exit.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-inferior-exit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-inferior-exit.exp ./gdb/testsuite/gdb.base/paginate-inferior-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/paginate-inferior-exit.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/paginate-inferior-exit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ proc test_paginate_inferior_exited {} {
 	clean_restart $binfile
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pc-fp.exp ./gdb/testsuite/gdb.base/pc-fp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pc-fp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pc-fp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2002-2015 Free Software Foundation, Inc.
+#   Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,8 +30,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pending.c ./gdb/testsuite/gdb.base/pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pending.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pending.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pending.exp ./gdb/testsuite/gdb.base/pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pending.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pending.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2003-2015 Free Software Foundation, Inc.
+#   Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -62,7 +62,7 @@ gdb_test "info break" \
 "single pending breakpoint info (without symbols)"
 
 gdb_load ${binfile}
-gdb_load_shlibs $lib_sl
+gdb_load_shlib $lib_sl
 
 set pendfunc1_loc [gdb_get_line_number "y = x + 4" ${libfile}.c]
 
@@ -79,7 +79,7 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_load ${binfile}
-gdb_load_shlibs $lib_sl
+gdb_load_shlib $lib_sl
 
 #
 # Test setting, querying, and modifying pending breakpoints
@@ -167,7 +167,7 @@ gdb_test "info break" \
 #
 
 set bp2_loc [gdb_get_line_number "y = x + 4" ${libfile}.c]
-gdb_test_multiple "break pendshr.c:$bp2_loc if x > 3" "Set pending breakpoint 2" {
+gdb_test_multiple "break pendshr.c:$bp2_loc if x > 3" "set pending breakpoint 2" {
      -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
 	    gdb_test "y" "Breakpoint.*pendshr.c:$bp2_loc.*pending." \
 		"Set pending breakpoint 2"
@@ -189,7 +189,7 @@ gdb_test "info break" \
 #
 
 set bp3_loc [gdb_get_line_number "printf" ${libfile}.c]
-gdb_test_multiple "break pendshr.c:$bp3_loc" "Set pending breakpoint 3" {
+gdb_test_multiple "break pendshr.c:$bp3_loc" "set pending breakpoint 3" {
      -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
 	    gdb_test "y" "Breakpoint.*pendshr.c:$bp3_loc.*pending." \
 		"Set pending breakpoint 3"
@@ -244,8 +244,8 @@ gdb_test "continue" \
 # be 3 then.
 #
 
-gdb_test "disable 7" "" "Disable other breakpoints"
-gdb_test "disable 5" "" "Disable other breakpoints"
+gdb_test "disable 7" "" "disable other breakpoints"
+gdb_test "disable 5" "" "disable other breakpoints"
 
 gdb_test "continue" \
 	 ".*Breakpoint.*pendfunc1.*\\\(x=3\\\) at.*pendshr.c:$bp3_loc.*printf.*;" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pendshr.c ./gdb/testsuite/gdb.base/pendshr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pendshr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pendshr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/permissions.exp ./gdb/testsuite/gdb.base/permissions.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/permissions.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/permissions.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ standard_testfile start.c
 
 if {[build_executable $testfile.exp $testfile \
 	 $srcfile {debug nowarnings}] == -1} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pie-execl.c ./gdb/testsuite/gdb.base/pie-execl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pie-execl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pie-execl.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pie-execl.exp ./gdb/testsuite/gdb.base/pie-execl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pie-execl.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pie-execl.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,14 +16,19 @@
 # The problem was due to amd64_skip_prologue attempting to access inferior
 # memory before the PIE (Position Independent Executable) gets relocated.
 
+global inferior_spawn_id
+global gdb_spawn_id
+
 if ![istarget *-linux*] {
     continue
 }
 
-# Remote protocol does not support follow-exec notifications.
-
-if [is_remote target] {
-    continue
+# In remote mode we cannot use the 'set args' command, and this
+# test requires it.
+if { [target_info exists gdb_protocol] } then {
+    if { [target_info gdb_protocol] == "remote" } then {
+	continue
+    }
 }
 
 standard_testfile .c
@@ -37,8 +42,8 @@ set binfile2_test_msg OBJDIR/${subdir}/$
 # file name of the breakpoint.
 
 set opts [list debug additional_flags=-fPIE ldflags=-pie]
-if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == ""
-    || [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == ""} {
+if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == -1
+    || [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == -1} {
     return -1
 }
 
@@ -67,6 +72,7 @@ gdb_test_multiple "p/x &pie_execl_marker
 verbose -log "addr1 is $addr1"
 
 set test "continue"
+set matches_found 0
 gdb_test_multiple $test $test {
     -re "Error in re-setting breakpoint" {
 	fail $test
@@ -74,8 +80,24 @@ gdb_test_multiple $test $test {
     -re "Cannot access memory" {
 	fail $test
     }
-    -re "pie-execl: re-exec.*executing new program.*\r\nBreakpoint \[0-9\]+,\[^\r\n\]* pie_execl_marker .*\r\n$gdb_prompt $" {
-	pass $test
+    -i "$inferior_spawn_id" -re "pie-execl: re-exec" {
+	# output from inferior
+        incr matches_found
+	if { $matches_found == 2 } {
+	    pass $test
+	} else {
+	    exp_continue
+	}
+    }
+    -i "$gdb_spawn_id"
+    -re "executing new program.*\r\nBreakpoint \[0-9\]+,\[^\r\n\]* pie_execl_marker .*\r\n$gdb_prompt $" {
+	# output from gdb
+        incr matches_found
+	if { $matches_found == 2 } {
+	    pass $test
+	} else {
+	    exp_continue
+	}
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pointers.exp ./gdb/testsuite/gdb.base/pointers.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pointers.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pointers.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested pointers.exp
+     untested "failed to compile"
      return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr10179.exp ./gdb/testsuite/gdb.base/pr10179.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr10179.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pr10179.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr11022.c ./gdb/testsuite/gdb.base/pr11022.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr11022.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pr11022.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr11022.exp ./gdb/testsuite/gdb.base/pr11022.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/pr11022.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/pr11022.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if {[skip_hw_watchpoint_tests]} {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested pr11022.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -29,7 +29,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 clean_restart ${binfile}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink.c ./gdb/testsuite/gdb.base/prelink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prelink.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink.exp ./gdb/testsuite/gdb.base/prelink.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prelink.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink-lib.c ./gdb/testsuite/gdb.base/prelink-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prelink-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prelink-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/printcmds.exp ./gdb/testsuite/gdb.base/printcmds.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/printcmds.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/printcmds.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested printcmds.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -643,6 +643,11 @@ proc test_artificial_arrays {} {
     gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@2${ctrlv}@3" \
 	"({{0, 1}, {2, 3}, {4, 5}}|\[Cc\]annot.*)" \
 	{p int1dim[0]@2@3}
+    gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@TWO" " = {0, 1}" \
+        {p int1dim[0]@TWO}
+    gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@TWO${ctrlv}@three" \
+	"({{0, 1}, {2, 3}, {4, 5}}|\[Cc\]annot.*)" \
+	{p int1dim[0]@TWO@three}
     gdb_test_escape_braces {p/x (short [])0x12345678} \
 	" = ({0x1234, 0x5678}|{0x5678, 0x1234})"
 }
@@ -678,8 +683,7 @@ proc test_print_string_constants {} {
     gdb_test_no_output "set print elements 50"
 
     if [target_info exists gdb,cannot_call_functions] {
-	setup_xfail "*-*-*" 2416
-	fail "This target can not call functions"
+	unsupported "this target can not call functions"
 	return
     }
 
@@ -702,8 +706,7 @@ proc test_print_string_constants {} {
 proc test_print_array_constants {} {
 
     if [target_info exists gdb,cannot_call_functions] {
-	setup_xfail "*-*-*" 2416
-	fail "This target can not call functions"
+	unsupported "this target can not call functions"
 	return
     }
 
@@ -947,7 +950,7 @@ gdb_test "p ctable1\[120\]" "120 'x'" "p
 gdb_load ${binfile}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var.exp ./gdb/testsuite/gdb.base/print-file-var.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-file-var.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,7 +46,8 @@ if { [gdb_compile "${srcdir}/${subdir}/$
 }
 
 clean_restart $executable
-gdb_load_shlibs $libobj1 $libobj2
+gdb_load_shlib $libobj1
+gdb_load_shlib $libobj2
 
 if ![runto_main] {
     untested "could not run to main"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-lib1.c ./gdb/testsuite/gdb.base/print-file-var-lib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-lib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-file-var-lib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-lib2.c ./gdb/testsuite/gdb.base/print-file-var-lib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-lib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-file-var-lib2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-main.c ./gdb/testsuite/gdb.base/print-file-var-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-file-var-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-file-var-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* This testcase is part of GDB, the GNU debugger.
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading.exp ./gdb/testsuite/gdb.base/print-symbol-loading.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-symbol-loading.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,17 +28,17 @@ set objfile [standard_output_file ${test
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
      || [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 set opts [list debug shlib=${binfile_lib}]
 if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
 clean_restart ${binfile}
-gdb_load_shlibs ${binfile_lib}
+gdb_load_shlib ${binfile_lib}
 
 if ![runto lib] {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading-lib.c ./gdb/testsuite/gdb.base/print-symbol-loading-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-symbol-loading-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading-main.c ./gdb/testsuite/gdb.base/print-symbol-loading-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/print-symbol-loading-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/print-symbol-loading-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue.c ./gdb/testsuite/gdb.base/prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue.exp ./gdb/testsuite/gdb.base/prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test for prologue skipping in minimal symbols with line info.
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested prologue.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.c ./gdb/testsuite/gdb.base/prologue-include.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prologue-include.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.exp ./gdb/testsuite/gdb.base/prologue-include.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prologue-include.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.h ./gdb/testsuite/gdb.base/prologue-include.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/prologue-include.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/prologue-include.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/psymtab.exp ./gdb/testsuite/gdb.base/psymtab.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/psymtab.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/psymtab.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,9 +34,8 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] debug]} {
-    untested $testfile.exp
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptr-typedef.c ./gdb/testsuite/gdb.base/ptr-typedef.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptr-typedef.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ptr-typedef.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptr-typedef.exp ./gdb/testsuite/gdb.base/ptr-typedef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptr-typedef.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ptr-typedef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile test program"
+    untested "failed to compile"
     return -1
 }
 
@@ -25,7 +25,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 clean_restart ${binfile}
 
 if ![runto marker1] {
-    untested "Couldn't run to marker1"
+    untested "couldn't run to marker1"
 }
 
 gdb_test "print foo_ptr" "\\\$$decimal = \\\(struct foo \\\*\\\) $hex"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptype.exp ./gdb/testsuite/gdb.base/ptype.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ptype.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ptype.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1988-2015 Free Software Foundation, Inc.
+# Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 
 standard_testfile .c ptype1.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2] {debug nowarnings}]} {
     return -1
 }
@@ -110,7 +110,7 @@ gdb_test "ptype boolean" "type = enum (b
 # GDB's behavior is correct; the type which the variable is defined
 # as (51) doesn't have a name.  Only 55 has a name.
 
-if {!$gcc_compiled && !$hp_aCC_compiler} {
+if {!$gcc_compiled} {
     setup_xfail "rs6000-*-*" "i*86-*-sysv4*"
     setup_xfail "hppa*-*-*" CLLbs14773
 }
@@ -350,7 +350,6 @@ gdb_test "ptype v_int" "type = int.*" "p
 #
 
 if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
-if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
 gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
 
 gdb_test "ptype pv_char_array" "type = (|unsigned )char \\(\\*\\)\\\[0?\\\]"
@@ -476,34 +475,25 @@ gdb_test "ptype pv_char_array" "type = (
 #
 # test ptype command with nested structure and union
 #
-if {$hp_aCC_compiler} {
-    set outer "outer_struct::"
-    set struct ""
-    set union ""
-} else {
-    set outer ""
-    set struct "struct"
-    set union "union"
-}
 gdb_test "ptype struct outer_struct" "type = struct outer_struct \{.*\[\r\n\]+\
 .*int outer_int;.*\[\r\n\]+\
-.*(struct|) ${outer}inner_struct inner_struct_instance;.*\[\r\n\]+\
-.*(union|) ${outer}inner_union inner_union_instance;.*\[\r\n\]+\
-.*(long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype outer structure" 
+.*(struct|) inner_struct inner_struct_instance;.*\[\r\n\]+\
+.*(union|) inner_union inner_union_instance;.*\[\r\n\]+\
+.*(long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype outer structure"
 
-gdb_test "ptype ${struct} ${outer}inner_struct" "type = struct ${outer}inner_struct \{.*\[\r\n\]    int inner_int;.*\[\r\n\]    (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype inner structure" 
+gdb_test "ptype struct inner_struct" "type = struct inner_struct \{.*\[\r\n\]    int inner_int;.*\[\r\n\]    (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype inner structure"
 
-gdb_test "ptype ${union} ${outer}inner_union" "type = union ${outer}inner_union \{.*\[\r\n\]    int inner_union_int;.*\[\r\n\]    (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype inner union" 
+gdb_test "ptype union inner_union" "type = union inner_union \{.*\[\r\n\]    int inner_union_int;.*\[\r\n\]    (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype inner union"
 
-gdb_test "ptype nested_su" "type = struct outer_struct \{.*\[\r\n\]    int outer_int;.*\[\r\n\]    (struct |)${outer}inner_struct inner_struct_instance;.*\[\r\n\]    (union |)${outer}inner_union inner_union_instance;.*\[\r\n\]    (long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype nested structure" 
+gdb_test "ptype nested_su" "type = struct outer_struct \{.*\[\r\n\]    int outer_int;.*\[\r\n\]    (struct |)inner_struct inner_struct_instance;.*\[\r\n\]    (union |)inner_union inner_union_instance;.*\[\r\n\]    (long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype nested structure"
 
-gdb_test "ptype nested_su.outer_int" "type = int.*" "ptype outer int" 
+gdb_test "ptype nested_su.outer_int" "type = int.*" "ptype outer int"
 
-gdb_test "ptype nested_su.inner_struct_instance" "type = struct ${outer}inner_struct \{.*\[\r\n\]    int inner_int;.*\[\r\n\]    (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype nested structure #2" 
+gdb_test "ptype nested_su.inner_struct_instance" "type = struct inner_struct \{.*\[\r\n\]    int inner_int;.*\[\r\n\]    (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype nested structure #2"
 
-gdb_test "ptype nested_su.inner_struct_instance.inner_int" "type = int.*" "ptype inner int" 
+gdb_test "ptype nested_su.inner_struct_instance.inner_int" "type = int.*" "ptype inner int"
 
-gdb_test "ptype nested_su.inner_union_instance" "type = union ${outer}inner_union \{.*\[\r\n\]    int inner_union_int;.*\[\r\n\]    (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype nested union" 
+gdb_test "ptype nested_su.inner_union_instance" "type = union inner_union \{.*\[\r\n\]    int inner_union_int;.*\[\r\n\]    (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype nested union"
 
 # Print the type description of variable the_highest, and verify that
 # the type description for the fields whose type is anonymous are
@@ -598,14 +588,10 @@ gdb_test "ptype foo" "type = char" "ptyp
 # requires a running process.  These call malloc, and can take a long
 # time to execute over a slow serial link, so increase the timeout.
 
-# UDI can't do this (PR 2416).  XFAIL is not suitable, because attempting
-# the operation causes a slow painful death rather than a nice simple failure.
-
 if [runto_main] then {
 
   if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
   }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/quit.exp ./gdb/testsuite/gdb.base/quit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/quit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/quit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,35 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check the "quit" command.
+
+clean_restart
+
+# Test that a syntax error causes quit to abort.
+# Regression test for PR gdb/20604.
+gdb_test "quit()" "A syntax error in expression, near .*" \
+    "quit with syntax error"
+
+# Test that an expression can be used to set the error code.
+send_gdb "quit 22+1\n"
+set result [wait -i $gdb_spawn_id]
+verbose $result
+if {[lindex $result 2] == 0 && [lindex $result 3] == 23} {
+    pass "quit with expression"
+} else {
+    fail "quit with expression"
+}
+close $gdb_spawn_id
+clear_gdb_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/radix.exp ./gdb/testsuite/gdb.base/radix.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/radix.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/radix.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # This testcase is part of GDB, the GNU debugger.
-# Copyright 1993-2015 Free Software Foundation, Inc.
+# Copyright 1993-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -154,21 +154,21 @@ test_output_radix 16 "10" "20"
 
 gdb_test "set radix" \
     "Input and output radices now set to decimal 10, hex a, octal 12\." \
-    "Reset radices"
+    "reset radices"
 
 gdb_test "set input-radix 0" \
     "Nonsense input radix ``decimal 0''; input radix unchanged\\." \
     "Reject input-radix 0"
 gdb_test "show input-radix" \
     "Default input radix for entering numbers is 10\\." \
-    "Input radix unchanged after rejecting 0"
+    "input radix unchanged after rejecting 0"
 
 gdb_test "set input-radix 1" \
     "Nonsense input radix ``decimal 1''; input radix unchanged\\." \
     "Reject input-radix 1"
 gdb_test "show input-radix" \
     "Default input radix for entering numbers is 10\\." \
-    "Input radix unchanged after rejecting 1"
+    "input radix unchanged after rejecting 1"
 
 gdb_test "set output-radix 0" \
     "Unsupported output radix ``decimal 0''; output radix unchanged\\." \
@@ -181,11 +181,11 @@ gdb_test "set output-radix 1" \
     "Reject output-radix 1"
 gdb_test "show output-radix" \
     "Default output radix for printing of values is 10\\." \
-    "Output radix unchanged after rejecting 1"
+    "output radix unchanged after rejecting 1"
 
 gdb_test "set radix 7" \
     "Unsupported output radix ``decimal 7''; output radix unchanged\\." \
     "set radix 7 rejected"
 gdb_test "show output-radix" \
     "Default output radix for printing of values is 10\\." \
-    "Output radix unchanged after rejection through set radix command"
+    "output radix unchanged after rejection through set radix command"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/randomize.c ./gdb/testsuite/gdb.base/randomize.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/randomize.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/randomize.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/randomize.exp ./gdb/testsuite/gdb.base/randomize.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/randomize.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/randomize.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -43,11 +42,11 @@ proc address_get { testname } {
 set test "set disable-randomization off"
 gdb_test_multiple "${test}" "${test}" {
     -re "Disabling randomization .* unsupported .*$gdb_prompt $" {
-	untested "Disabling randomization is not supported on this Linux GDB"
+	untested "disabling randomization is not supported on this Linux GDB"
 	return -1
     }
     -re "No symbol .* in current context.*$gdb_prompt $" {
-	untested "Disabling randomization is not supported on this GDB platform"
+	untested "disabling randomization is not supported on this GDB platform"
 	return -1
     }
     -re "$gdb_prompt $" {
@@ -62,7 +61,7 @@ set addr1 [address_get "randomized first
 set addr2 [address_get "randomized second address"]
 set test "randomized addresses should not match"
 if [string equal $addr1 $addr2] {
-    untested "No randomization detected on this system"
+    untested "no randomization detected on this system"
     return -1
 } else {
     pass $test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/random-signal.c ./gdb/testsuite/gdb.base/random-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/random-signal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/random-signal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/random-signal.exp ./gdb/testsuite/gdb.base/random-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/random-signal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/random-signal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,25 +18,65 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping random-signal.exp because of nointerrupts."
+    return
+}
+
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if {![runto_main]} {
-    return -1
+# Set a software watchpoint, continue, wait a bit and stop the target
+# with ctrl-c.  A software watchpoint forces the target to
+# single-step.
+proc do_test {} {
+    global binfile
+
+    gdb_test_no_output "set can-use-hw-watchpoints 0"
+    gdb_test "watch v" "Watchpoint .*"
+    gdb_test_multiple "continue" "continue" {
+	-re "Continuing" {
+	    pass "continue"
+	}
+    }
+
+    # For this to work we must be sure to consume the "Continuing."
+    # message first, or GDB's signal handler may not be in place.
+    after 500 {send_gdb "\003"}
+    gdb_test "" "Program received signal SIGINT.*" "stop with control-c"
 }
 
-gdb_test_no_output "set can-use-hw-watchpoints 0"
-gdb_test "watch v" "Watchpoint .*"
-gdb_test_multiple "continue" "continue" {
-    -re "Continuing" {
-	pass "continue"
+# With native debugging and "run" (with job control), the ctrl-c
+# always reaches the inferior, not gdb, even if ctrl-c is pressed
+# while gdb is processing the internal software watchtpoint
+# single-step.  With remote debugging, the ctrl-c reaches GDB first.
+with_test_prefix "run" {
+    clean_restart $binfile
+
+    if {![runto_main]} {
+	return -1
     }
+
+    do_test
 }
 
-# For this to work we must be sure to consume the "Continuing."
-# message first, or GDB's signal handler may not be in place.
-after 500 {send_gdb "\003"}
-gdb_test "" "Program received signal SIGINT.*" "stop with control-c"
+# With "attach" however, even with native debugging, the ctrl-c always
+# reaches GDB first.  Test that as well.
+with_test_prefix "attach" {
+    if {[can_spawn_for_attach]} {
+	clean_restart $binfile
+
+	set test_spawn_id [spawn_wait_for_attach $binfile]
+	set testpid [spawn_id_get_pid $test_spawn_id]
+
+	gdb_test "attach $testpid" "Attaching to.*process $testpid.*libc.*" "attach"
+
+	do_test
+
+	kill_wait_spawned_process $test_spawn_id
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/range-stepping.c ./gdb/testsuite/gdb.base/range-stepping.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/range-stepping.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/range-stepping.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/range-stepping.exp ./gdb/testsuite/gdb.base/range-stepping.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/range-stepping.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/range-stepping.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,36 +18,15 @@ load_lib "range-stepping-support.exp"
 standard_testfile
 set executable $testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
-# Check whether range stepping is supported by the target.
-
-proc gdb_range_stepping_enabled { } {
-    global gdb_prompt
-
-    set command "set range-stepping on"
-    set message "probe range-stepping support"
-    gdb_test_multiple $command $message {
-        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
-	    pass $message
-	    return 0
-	}
-        -re "^$command\r\n$gdb_prompt $" {
-	    pass $message
-	    return 1
-	}
-    }
-
-    return 0
-}
-
 if ![gdb_range_stepping_enabled] {
     unsupported "range stepping not supported by the target"
     return -1
@@ -76,7 +55,7 @@ with_test_prefix "multi insns" {
     # <-- T05
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    set result [exec_cmd_expect_vCont_count "next" 1 1]
+    set result [exec_cmd_expect_vCont_count "next" 1]
     if { $result } {
 	# This is the first range-stepping test, and the simplest
 	# one.  If it fails, probably the rest of the tests would
@@ -132,7 +111,7 @@ with_test_prefix "step over func" {
     # <-- T05  (target stops at ADDR2)
     # --> vCont;rADDR1,ADDR3  (continues range stepping)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 0 2
+    exec_cmd_expect_vCont_count "next" 2
 }
 
 # Check that breakpoints interrupt range stepping correctly.
@@ -145,14 +124,14 @@ with_test_prefix "breakpoint" {
     # --> $Z0,ADDR2  (step-resume breakpoint at ADDR2)
     # --> vCont;c  (resume)
     # <-- T05  (target hits the breakpoint at func1)
-    exec_cmd_expect_vCont_count "next" 0 1
+    exec_cmd_expect_vCont_count "next" 1
 
     gdb_test "backtrace" "#0 .* func1 .*#1 .* main .*" \
 	"backtrace from func1"
 
     # A cancelled range step should not confuse the following
     # execution commands.
-    exec_cmd_expect_vCont_count "stepi" 1 0
+    exec_cmd_expect_vCont_count "stepi" 0
     gdb_test "finish" ".*"
     gdb_test "next" ".*"
     delete_breakpoints
@@ -166,7 +145,7 @@ with_test_prefix "loop" {
     # GDB should send one vCont;r and receive one stop reply:
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 0 1
+    exec_cmd_expect_vCont_count "next" 1
 
     # Confirm the loop completed.
     gdb_test "print a" " = 15"
@@ -183,7 +162,7 @@ with_test_prefix "loop 2" {
     # GDB should send one vCont;r and receive one stop reply:
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 0 1
+    exec_cmd_expect_vCont_count "next" 1
 
     # Confirm the loop completed.
     gdb_test "print a" " = 15"
@@ -193,42 +172,44 @@ with_test_prefix "loop 2" {
 # Check that range stepping works well even when it is interrupted by
 # ctrl-c.
 
-with_test_prefix "interrupt" {
-    gdb_test_no_output "set debug remote 1"
-
-    send_gdb "next\n"
-    sleep 1
-    send_gdb "\003"
-
-    # GDB should send one vCont;r and receive one stop reply for
-    # SIGINT:
-    # --> vCont;rSTART,END  (range step)
-    # <-- T02  (SIGINT)
-
-    set vcont_r_counter 0
-
-    set test "send ctrl-c to GDB"
-    gdb_test_multiple "" $test {
-	-re "vCont;r\[^\r\n\]*\.\.\." {
-	    incr vcont_r_counter
-	    exp_continue
-	}
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
-	    pass $test
-	}
-    }
-    gdb_test_no_output "set debug remote 0"
-
-    # Check the number of 'vCont;r' packets.
-    if { $vcont_r_counter == 1 } {
-	pass "${test}: 1 vCont;r"
-    } else {
-	fail "${test}: 1 vCont;r"
+if ![target_info exists gdb,nointerrupts] {
+    with_test_prefix "interrupt" {
+	gdb_test_no_output "set debug remote 1"
+
+	send_gdb "next\n"
+	sleep 1
+	send_gdb "\003"
+
+	# GDB should send one vCont;r and receive one stop reply for
+	# SIGINT:
+	# --> vCont;rSTART,END  (range step)
+	# <-- T02  (SIGINT)
+
+	set vcont_r_counter 0
+
+	set test "send ctrl-c to GDB"
+	gdb_test_multiple "" $test {
+	    -re "vCont;r\[^\r\n\]*\.\.\." {
+		incr vcont_r_counter
+		exp_continue
+	    }
+	    -re "Program received signal SIGINT.*$gdb_prompt $" {
+		pass $test
+	    }
+	}
+	gdb_test_no_output "set debug remote 0"
+
+	# Check the number of 'vCont;r' packets.
+	if { $vcont_r_counter == 1 } {
+	    pass "${test}: 1 vCont;r"
+	} else {
+	    fail "${test}: 1 vCont;r"
+	}
+
+	# Break the loop earlier and continue range stepping.
+	gdb_test "set variable c = 0"
+	exec_cmd_expect_vCont_count "next" 1
     }
-
-    # Break the loop earlier and continue range stepping.
-    gdb_test "set variable c = 0"
-    exec_cmd_expect_vCont_count "next" 0 1
 }
 
 # Check that range stepping doesn't break software watchpoints.  With
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.c ./gdb/testsuite/gdb.base/readline-ask.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/readline-ask.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.exp ./gdb/testsuite/gdb.base/readline-ask.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/readline-ask.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ standard_testfile .c
 set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.inputrc ./gdb/testsuite/gdb.base/readline-ask.inputrc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline-ask.inputrc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/readline-ask.inputrc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline.exp ./gdb/testsuite/gdb.base/readline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/readline.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/readline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -150,68 +150,48 @@ if { ![readline_is_used] } {
     return -1
 }
 
-set oldtimeout1 $timeout
-set timeout 30
+save_vars { timeout env(GDBHISTSIZE) env(GDBHISTFILE) } {
+    set timeout 30
 
-
-# A simple test of operate-and-get-next.
-operate_and_get_next "Simple operate-and-get-next" \
-  "p 1" ".* = 1" \
-  "p 2" ".* = 2" \
-  "p 3" ".* = 3"
-
-# Test operate-and-get-next with a secondary prompt.
-operate_and_get_next "operate-and-get-next with secondary prompt" \
-  "if 1 > 0" "" \
-  "p 5" "" \
-  "end" ".* = 5"
-
-# Verify that arrow keys work in secondary prompts.  The control
-# sequence is a hard-coded VT100 up arrow.
-gdb_test "print 42" "\\\$\[0-9\]* = 42"
-set msg "arrow keys with secondary prompt"
-gdb_test_multiple "if 1 > 0\n\033\[A\033\[A\nend" $msg {
-    -re ".*\\\$\[0-9\]* = 42\r\n$gdb_prompt $" {
-	pass $msg
-    }
-    -re ".*Undefined command:.*$gdb_prompt $" {
-	fail $msg
+    # A simple test of operate-and-get-next.
+    operate_and_get_next "Simple operate-and-get-next" \
+      "p 1" ".* = 1" \
+      "p 2" ".* = 2" \
+      "p 3" ".* = 3"
+
+    # Test operate-and-get-next with a secondary prompt.
+    operate_and_get_next "operate-and-get-next with secondary prompt" \
+      "if 1 > 0" "" \
+      "p 5" "" \
+      "end" ".* = 5"
+
+    # Verify that arrow keys work in secondary prompts.  The control
+    # sequence is a hard-coded VT100 up arrow.
+    gdb_test "print 42" "\\\$\[0-9\]* = 42"
+    set msg "arrow keys with secondary prompt"
+    gdb_test_multiple "if 1 > 0\n\033\[A\033\[A\nend" $msg {
+	-re ".*\\\$\[0-9\]* = 42\r\n$gdb_prompt $" {
+	    pass $msg
+	}
+	-re ".*Undefined command:.*$gdb_prompt $" {
+	    fail $msg
+	}
     }
-}
-
-# Now repeat the first test with a history file that fills the entire
-# history list.
-
-if [info exists env(GDBHISTFILE)] {
-    set old_gdbhistfile $env(GDBHISTFILE)
-}
-if [info exists env(GDBHISTSIZE)] {
-    set old_gdbhistsize $env(GDBHISTSIZE)
-}
-set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
-set env(GDBHISTSIZE) "10"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
 
-operate_and_get_next "Simple operate-and-get-next" \
-  "p 7" ".* = 7" \
-  "p 8" ".* = 8" \
-  "p 9" ".* = 9"
-
-
-# Restore globals modified in this test...
-if [info exists old_gdbhistfile] {
-    set env(GDBHISTFILE) $old_gdbhistfile
-} else {
-    unset env(GDBHISTFILE)
-}
-if [info exists old_gdbhistsize] {
-    set env(GDBHISTSIZE) $old_gdbhistsize
-} else {
-    unset env(GDBHISTSIZE)
+    # Now repeat the first test with a history file that fills the entire
+    # history list.
+
+    set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+    set env(GDBHISTSIZE) "10"
+
+    gdb_exit
+    gdb_start
+    gdb_reinitialize_dir $srcdir/$subdir
+
+    operate_and_get_next "Simple operate-and-get-next" \
+      "p 7" ".* = 7" \
+      "p 8" ".* = 8" \
+      "p 9" ".* = 9"
 }
-set timeout $oldtimeout1
 
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand.c ./gdb/testsuite/gdb.base/realname-expand.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/realname-expand.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand.exp ./gdb/testsuite/gdb.base/realname-expand.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/realname-expand.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c realname-expand-real.c
 
 if [is_remote host] {
-    unsupported "Compiling on a remote host does not support a filename with directory."
+    unsupported "compiling on a remote host does not support a filename with directory."
     return 0
 }
 
@@ -32,7 +32,7 @@ if { [file type $srcfilelink] != "link" 
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
 		  executable {debug}] != "" } {
-    untested "cannot compile ${srcdir}/${subdir}/${srcfile} and ${srcfilelink}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand-real.c ./gdb/testsuite/gdb.base/realname-expand-real.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/realname-expand-real.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/realname-expand-real.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recpar.c ./gdb/testsuite/gdb.base/recpar.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recpar.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/recpar.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recpar.exp ./gdb/testsuite/gdb.base/recpar.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recpar.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/recpar.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
 if ![runto_main] {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recurse.exp ./gdb/testsuite/gdb.base/recurse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/recurse.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/recurse.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relational.exp ./gdb/testsuite/gdb.base/relational.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relational.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/relational.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 # test running programs
 #
 
-if { [prepare_for_testing relational.exp relational int-type.c {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" relational int-type.c {debug nowarnings}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relativedebug.c ./gdb/testsuite/gdb.base/relativedebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relativedebug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/relativedebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relativedebug.exp ./gdb/testsuite/gdb.base/relativedebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relativedebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/relativedebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile test program"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relocate.c ./gdb/testsuite/gdb.base/relocate.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relocate.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/relocate.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relocate.exp ./gdb/testsuite/gdb.base/relocate.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/relocate.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/relocate.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,33 +21,10 @@ append binfile .o
 
 remote_exec build "rm -f ${binfile}"
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
-     untested relocate.exp
+     untested "failed to compile"
      return -1
 }
 
-proc get_var_address { var } {
-    global gdb_prompt hex
-
-    # Match output like:
-    # $1 = (int *) 0x0
-    # $5 = (int (*)()) 0
-    # $6 = (int (*)()) 0x24 <function_bar>
-
-    gdb_test_multiple "print &${var}" "get address of ${var}" {
-	-re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $" {
-	    pass "get address of ${var}"
-	    if { $expect_out(1,string) == "0" } {
-		return "0x0"
-	    } else {
-		return $expect_out(1,string)
-	    }
-	}
-    }
-    return ""
-}
-
-
-
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/remote.exp ./gdb/testsuite/gdb.base/remote.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/remote.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/remote.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ gdb_start
 
 set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
 if {$result != "" } then {
-    untested remote.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -127,7 +127,7 @@ set sizeof_random_data [get_sizeof "rand
 # Part THREE: Check the upload behavour
 #
 if ![runto_main] then {
-    fail "Cannot run to main"
+    fail "cannot run to main"
 }
 
 # Carefully check memory around each of the most common packet edge
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/remotetimeout.exp ./gdb/testsuite/gdb.base/remotetimeout.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/remotetimeout.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/remotetimeout.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/reread.exp ./gdb/testsuite/gdb.base/reread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/reread.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/reread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set srcfile1 ${testfile1}.c
 set binfile1 [standard_output_file ${testfile1}$EXEEXT]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug nowarnings}] != "" } {
-    untested reread.exp
+    untested "failed to compile first testcase"
     return -1
 }
 
@@ -35,7 +35,7 @@ set binfile2 [standard_output_file ${tes
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug nowarnings}] != ""
       && [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug nowarnings additional_flags=-DNO_SECTIONS}] != ""} {
-    untested reread.exp
+    untested "failed to compile second testcase"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/restore.c ./gdb/testsuite/gdb.base/restore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/restore.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/restore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/restore.exp ./gdb/testsuite/gdb.base/restore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/restore.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/restore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 standard_testfile
 set executable $testfile
 
-if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $executable $srcfile] } {
     return -1
 }
 
@@ -79,20 +79,7 @@ proc restore_tests { } {
         }
     }
 
-    if ![gdb_skip_stdio_test "run to completion"] {
-	send_gdb "continue\n"
-
-	gdb_expect {
-	    -re "exiting" {
-		pass "run to completion"
-	    }
-	    timeout { 
-		fail "(timeout) run to completion"
-	    }
-	}
-    } else {
-	gdb_test "continue" ".*" ""
-    }
+    gdb_continue_to_end "" continue 1
 }
 
 set prev_timeout $timeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return2.exp ./gdb/testsuite/gdb.base/return2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,10 +19,12 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested return2.exp
+     untested "failed to compile"
      return -1
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 proc return_1 { type } {
     global gdb_prompt
 
@@ -77,10 +79,10 @@ proc return_void { } {
 }
 
 proc return2_tests { } {
-    global gdb_prompt
+    global gdb_prompt skip_float_test
 
     if { ! [ runto_main ] } then {
-	untested return2.exp
+	untested "couldn't run to main"
 	return -1
     }
 
@@ -92,7 +94,7 @@ proc return2_tests { } {
     if { ! [istarget "m6811-*-*"] && ![istarget "h8300*-*"] } then {
         return_1 "long_long"
     }
-    if ![target_info exists gdb,skip_float_tests] {
+    if {!$skip_float_test} {
 	return_1 "float"
 	if { ! [istarget "m6811-*-*"] } then {
 	    return_1 "double"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return.c ./gdb/testsuite/gdb.base/return.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,3 +1,20 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 1992-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
 #include <stdio.h>
 /*  Test "return" command.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return.exp ./gdb/testsuite/gdb.base/return.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,14 @@
 
 # This file was written by Jeff Law. (law@cs.utah.edu)
 
-if { [prepare_for_testing return.exp "return"] } {
+if { [prepare_for_testing "failed to prepare" "return"] } {
     return -1
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 proc return_tests { } {
-    global gdb_prompt
+    global gdb_prompt skip_float_test
 
 
     if { ! [ runto func1 ] } then { return 0 }
@@ -88,7 +90,7 @@ proc return_tests { } {
     # is not xfailed.
 
     setup_xfail "sparc-*-solaris2.3*" "sparc-*-solaris2.4*" "m6811-*-*"
-    if ![target_info exists gdb,skip_float_tests] {
+    if {!$skip_float_test} {
 	gdb_test "p tmp3" ".* = 5.*" \
 	    "correct value returned double test (known problem with sparc solaris)"
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug1.c ./gdb/testsuite/gdb.base/return-nodebug1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return-nodebug1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug.c ./gdb/testsuite/gdb.base/return-nodebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return-nodebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug.exp ./gdb/testsuite/gdb.base/return-nodebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/return-nodebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/return-nodebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set skip_float_test [gdb_skip_float_test]
+
 proc do_test {type} {
     set typenospace [string map {{ } -} $type]
 
@@ -42,6 +44,9 @@ proc do_test {type} {
 }
 
 foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} {
+    if { $skip_float_test && ($type == "float" || $type == "double") } {
+	continue
+    }
     set typeesc [string map {{ } {\ }} $type]
     set typenospace [string map {{ } -} $type]
 
@@ -49,7 +54,7 @@ foreach type {{signed char} {short} {int
 
     set additional_flags "additional_flags=-DTYPE=$typeesc"
 
-    if {[prepare_for_testing_full $testfile.exp \
+    if {[prepare_for_testing_full "failed to prepare" \
 	     [list ${testfile}-${typenospace} debug \
 		  $srcfile [list debug $additional_flags] \
 		  $srcfile2 [list $additional_flags]]]} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run-after-attach.c ./gdb/testsuite/gdb.base/run-after-attach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run-after-attach.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/run-after-attach.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+main (void)
+{
+  sleep (600);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run-after-attach.exp ./gdb/testsuite/gdb.base/run-after-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run-after-attach.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/run-after-attach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,62 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that forking a process after a previous process was attached to unsets
+# attach_flag.  This is done indirectly by inspecting GDB's quit prompt.
+
+if ![can_spawn_for_attach] {
+    return 0
+}
+
+standard_testfile
+set executable $testfile
+
+if [prepare_for_testing "failed to prepare" $executable] {
+    return -1
+}
+
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set test_pid [spawn_id_get_pid $test_spawn_id]
+
+set test "attach to process"
+gdb_test "attach $test_pid" "Attaching to program.*" $test
+
+set test "kill process"
+gdb_test "kill" "" $test \
+    "Kill the program being debugged.*y or n. $" "y"
+
+set test "restart process"
+gdb_test "start" "Starting program.*Temporary breakpoint .*" $test
+
+set test "attempt kill via quit"
+# The quit prompt should warn about killing the process, not about detaching the
+# process, since this process was not attached to.
+set ok 0
+gdb_test_multiple "quit" $test {
+    -re "will be killed.*.y or n. $" {
+	set ok 1
+	send_gdb "n\n"
+	exp_continue
+    }
+    -re "will be detached.*.y or n. $" {
+	send_gdb "n\n"
+	exp_continue
+    }
+    -re "$gdb_prompt $" {
+	gdb_assert $ok $test
+    }
+}
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run.c ./gdb/testsuite/gdb.base/run.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/run.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/run.c	2017-03-06 01:49:07.000000000 +0000
@@ -6,11 +6,15 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "../lib/unbuffer_output.c"
+
 int factorial (int);
 
 int
 main (int argc, char **argv, char **envp)
 {
+  gdb_unbuffer_output ();
+
 #ifdef FAKEARGV
     printf ("%d\n", factorial (1)); /* commands.exp: hw local_var out of scope */
 #else    
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/save-bp.c ./gdb/testsuite/gdb.base/save-bp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/save-bp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/save-bp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/save-bp.exp ./gdb/testsuite/gdb.base/save-bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/save-bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/save-bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
 if ![runto_main] {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 # Delete all breakpoints so that the "runto_main" breakpoint above
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/savedregs.c ./gdb/testsuite/gdb.base/savedregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/savedregs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/savedregs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/savedregs.exp ./gdb/testsuite/gdb.base/savedregs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/savedregs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/savedregs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${module}.c"
+    untested "failed to compile"
     return -1
 }
 
@@ -64,7 +64,7 @@ proc process_saved_regs { current inner 
 
     foreach func $inner {
 	set saved_regs($func) "error"
-	set test "Get $func info frame"
+	set test "get $func info frame"
 	# Both dummy and sigtramp frames have problems.
 	switch $func {
 	    dummy {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/scope.exp ./gdb/testsuite/gdb.base/scope.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/scope.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/scope.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile scope0.c scope1.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2] {debug}]} {
     return -1
 }
@@ -39,7 +39,6 @@ proc test_at_main {} {
     global det_file
     global srcdir
     global subdir
-    global hp_cc_compiler
 
     # skip past init0.
     # This used to do an extra "next" if the first one didn't get us
@@ -106,7 +105,6 @@ proc test_at_main {} {
     # Print scope1.c::filelocal_ro, which is 202
 
     if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
-    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
     if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] { 
       gdb_suppress_tests
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sect-cmd.exp ./gdb/testsuite/gdb.base/sect-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sect-cmd.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sect-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,17 +32,17 @@ set srcfile1 break1.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
-    untested sect-cmd.exp
+    untested "failed to compile"
     return -1
 }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
-    untested sect-cmd.exp
+    untested "failed to compile"
     return -1
 }
 
 if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested sect-cmd.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/segv.c ./gdb/testsuite/gdb.base/segv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/segv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/segv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep.c ./gdb/testsuite/gdb.base/sep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug2.c ./gdb/testsuite/gdb.base/sepdebug2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sepdebug2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug.c ./gdb/testsuite/gdb.base/sepdebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sepdebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1994-2015 Free Software Foundation, Inc.
+/* Copyright 1994-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug.exp ./gdb/testsuite/gdb.base/sepdebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepdebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sepdebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested sepdebug.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -63,7 +63,7 @@ remote_exec build "mkdir [file dirname $
 remote_exec build "ln -s ${binfile}${EXEEXT} $new_name"
 clean_restart ${testfile}${EXEEXT}
 if { $gdb_file_cmd_debug_info != "debug" } then {
-    fail "No debug information found."
+    fail "no debug information found."
 }
 
 # Restore subdir
@@ -71,7 +71,7 @@ set subdir ${old_subdir}
 
 clean_restart ${testfile}${EXEEXT}
 if { $gdb_file_cmd_debug_info != "debug" } then {
-    fail "No debug information found."
+    fail "no debug information found."
 }
 
 #
@@ -227,7 +227,7 @@ delete_breakpoints
 # test temporary breakpoint at function
 #
 
-gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
+gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
 
 #
 # test break at function in file
@@ -242,11 +242,11 @@ gdb_test "tbreak $srcfile:factorial" "Te
 
 gdb_test "tbreak $bp_location1" \
     "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location1.*" \
-    "Temporary breakpoint line number #1"
+    "temporary breakpoint line number #1"
 
 gdb_test "tbreak $bp_location6" \
     "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location6.*" \
-    "Temporary breakpoint line number #2"
+    "temporary breakpoint line number #2"
 
 #
 # test break at line number in file
@@ -254,7 +254,7 @@ gdb_test "tbreak $bp_location6" \
 
 gdb_test "tbreak $srcfile:$bp_location2" \
     "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location2.*" \
-    "Temporary breakpoint line number in file #1"
+    "temporary breakpoint line number in file #1"
 
 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
 gdb_test  "tbreak $srcfile:$bp_location11" "Temporary breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
@@ -283,42 +283,14 @@ if ![runto_main] then { fail "sepdebug t
 gdb_test "catch" "Catch requires an event name.*" \
     "catch requires an event name"
 
-set name "set catch fork, never expected to trigger"
-gdb_test_multiple "catch fork" $name {
-    -re "Catchpoint \[0-9\]* .fork.*$gdb_prompt $" {
-	pass $name
-    }
-    -re "Catch of fork not yet implemented.*$gdb_prompt $" {
-	pass $name
-    }
-}
+gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \
+    "set catch fork, never expected to trigger"
 
-# If we are on HP-UX 10.20, we expect an error message to be
-# printed if we type "catch vfork" at the gdb gdb_prompt.  This is
-# because on HP-UX 10.20, we cannot catch vfork events.
-
-set name "set catch vfork, never expected to trigger"
-gdb_test_multiple "catch vfork" $name {
-    -re "Catch of vfork events not supported on HP-UX 10.20.*" {
-	pass $name
-    }
-    -re "Catchpoint \[0-9\]* .vfork.*$gdb_prompt $" {
-	pass $name
-    }
-    -re "Catch of vfork not yet implemented.*$gdb_prompt $" {
-	pass $name
-    }
-}
+gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \
+    "set catch vfork, never expected to trigger"
 
-set name "set catch exec, never expected to trigger"
-gdb_test_multiple "catch exec" $name {
-    -re "Catchpoint \[0-9\]* .exec.*$gdb_prompt $" {
-	pass $name
-    }
-    -re "Catch of exec not yet implemented.*$gdb_prompt $" {
-	pass $name
-    }
-}
+gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \
+    "set catch exec, never expected to trigger"
 
 # Verify that GDB responds gracefully when asked to set a breakpoint
 # on a nonexistent source line.
@@ -389,7 +361,7 @@ gdb_test "break $bp_location12 thread 99
     "thread-specific breakpoint on non-existent thread disallowed"
 
 gdb_test "break $bp_location12 thread foo" \
-    "Junk after thread keyword.*" \
+    "Invalid thread ID: foo" \
     "thread-specific breakpoint on bogus thread ID disallowed"
 
 # Verify that GDB responds gracefully to a breakpoint command with
@@ -456,19 +428,10 @@ gdb_test "print marker2(99)" \
 
 # As long as we're stopped (breakpointed) in a called function,
 # verify that we can successfully backtrace & such from here.
-#
-# In this and the following test, the _sr4export check apparently is needed
-# for hppa*-*-hpux.
-#
 
-gdb_test_multiple "bt" "backtrace while in called function" {
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-    -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
-	pass "backtrace while in called function"
-    }
-}
+gdb_test "bt" \
+    "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+    "backtrace while in called function"
 
 # Return from the called function.  For remote targets, it's important to do
 # this before runto_main, which otherwise may silently stop on the dummy
@@ -476,9 +439,6 @@ gdb_test_multiple "bt" "backtrace while 
 #
 
 gdb_test_multiple "finish" "finish from called function" {
-    -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
-	pass "finish from called function"
-    }
     -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
 	pass "finish from called function"
     }
@@ -511,43 +471,6 @@ gdb_test_multiple "finish" "finish from 
     }
 }
 
-# Verify that we can explicitly ask GDB to stop on all shared library
-# events, and that it does so.
-#
-if [istarget "hppa*-*-hpux*"] then {
-    if ![runto_main] then { fail "sepdebug tests suppressed" }
-
-    gdb_test_no_output "set stop-on-solib-events 1" \
-	"set stop-on-solib-events"
-
-    gdb_test "run" \
-	"Stopped due to shared library event.*" \
-	"triggered stop-on-solib-events" \
-	"Start it from the beginning.*y or n. $" \
-	"y"
-
-    gdb_test_no_output "set stop-on-solib-events 0" \
-      "reset stop-on-solib-events"
-}
-
-# Hardware breakpoints are unsupported on HP-UX.  Verify that GDB
-# gracefully responds to requests to create them.
-#
-if [istarget "hppa*-*-hpux*"] then {
-    if ![runto_main] then { fail "sepdebug tests suppressed" }
-
-    gdb_test "hbreak" \
-	"No hardware breakpoint support in the target.*" \
-	"hw breaks disallowed"
-
-    gdb_test "thbreak" \
-      "No hardware breakpoint support in the target.*" \
-      "temporary hw breaks disallowed"
-}
-
-#********
-
-
 #
 # Test "next" over recursive function call.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep.exp ./gdb/testsuite/gdb.base/sep.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sep.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-    untested sep.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep-proc.c ./gdb/testsuite/gdb.base/sep-proc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sep-proc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sep-proc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepsymtab.c ./gdb/testsuite/gdb.base/sepsymtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepsymtab.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sepsymtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2006-2015 Free Software Foundation, Inc.
+/* Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepsymtab.exp ./gdb/testsuite/gdb.base/sepsymtab.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sepsymtab.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sepsymtab.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ standard_testfile .c
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	  executable {debug}] != "" } {
-    untested sepsymtab.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-inferior-tty.c ./gdb/testsuite/gdb.base/set-inferior-tty.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-inferior-tty.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/set-inferior-tty.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-inferior-tty.exp ./gdb/testsuite/gdb.base/set-inferior-tty.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-inferior-tty.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/set-inferior-tty.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+set compile_options "debug"
+if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+proc test_set_inferior_tty { } {
+    global binfile
+
+    clean_restart ${binfile}
+
+    gdb_test_no_output "set inferior-tty hello" "set inferior-tty to hello"
+    gdb_test "show inferior-tty" \
+	     "Terminal for future runs of program being debugged is \"hello\"." \
+	     "show inferior-tty shows hello"
+
+    gdb_test_no_output "set inferior-tty" "set inferior-tty to empty"
+    gdb_test "show inferior-tty" \
+	     "Terminal for future runs of program being debugged is \"\"." \
+	     "show inferior-tty shows empty"
+}
+
+test_set_inferior_tty
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-lang-auto.exp ./gdb/testsuite/gdb.base/set-lang-auto.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-lang-auto.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/set-lang-auto.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,7 @@
 
 standard_testfile start.c
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-noassign.exp ./gdb/testsuite/gdb.base/set-noassign.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/set-noassign.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/set-noassign.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,12 +14,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { [prepare_for_testing set-noassign.exp "set-noassign" start.c {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" "set-noassign" start.c {debug nowarnings}] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/setshow.exp ./gdb/testsuite/gdb.base/setshow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/setshow.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/setshow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 standard_testfile .c
 
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
-     untested setshow.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -211,10 +211,10 @@ gdb_test "show history size" "The size o
 gdb_test "set language asm" ".*" "set language asm" 
 #test show language asm
 gdb_test "show language" "The current source language is \"asm\"..*" "show language (asm)" 
-#test set language java, with a trailing space
-gdb_test_no_output "set language java " "set language java"
-#test show language java
-gdb_test "show language" "The current source language is \"java\"..*" "show language (java)" 
+#test set language rust, with a trailing space
+gdb_test_no_output "set language rust " "set language rust"
+#test show language rust
+gdb_test "show language" "The current source language is \"rust\"..*" "show language (rust)" 
 #test completion for set language.
 gdb_test "complete set language min" "set language minimal" \
   "complete set language minimal"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/setvar.exp ./gdb/testsuite/gdb.base/setvar.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/setvar.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/setvar.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1988-2015 Free Software Foundation, Inc.
+# Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,8 +32,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shell.exp ./gdb/testsuite/gdb.base/shell.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shell.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/shell.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shlib-call.exp ./gdb/testsuite/gdb.base/shlib-call.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shlib-call.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/shlib-call.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,14 +50,15 @@ if [get_compiler_info] {
 if { [gdb_compile_shlib ${lib1src} ${lib1} $lib_opts] != ""
      || [gdb_compile_shlib ${lib2src} ${lib2} $lib_opts] != ""
      || [gdb_compile ${srcfile} ${binfile} executable $exec_opts] != ""} {
-    untested "Could not compile $lib1, $lib2, or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
 # Start with a fresh gdb.
 
 clean_restart ${binfile}
-gdb_load_shlibs $lib1 $lib2
+gdb_load_shlib $lib1
+gdb_load_shlib $lib2
 
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
@@ -71,7 +72,7 @@ if ![runto_main] then {
 
 #step -over
 
-gdb_test "next" "g = shr1\\(g\\);" "next to shr1"
+gdb_test "next 2" "g = shr1\\(g\\);" "next to shr1"
 
 #print g
 
@@ -79,8 +80,9 @@ gdb_test "print g" "\[0-9\]* = 1" "print
 
 #step -over
 if ![gdb_skip_stdio_test "next over shr1"] {
-    gdb_test "next" \
-	"address of sgs is $hex.*g = shr2\\(g\\);" \
+    gdb_test_stdio "next" \
+	"address of sgs is $hex" \
+	"g = shr2\\(g\\);" \
 	"next over shr1"
 } else {
     gdb_test "next" ".*" ""
@@ -92,15 +94,17 @@ gdb_test "print g" "\[0-9\]* = 2" "print
 
 #print shr1(1)
 if ![gdb_skip_stdio_test "print shr1(1)"] {
-    gdb_test "print shr1(1)" \
-	"address of sgs is $hex.*\[0-9\]* = 2" \
+    gdb_test_stdio "print shr1(1)" \
+	"address of sgs is $hex" \
+	"\[0-9\]* = 2" \
 	"print shr1(1)"
 }
 
 #print shr1(g)
 if ![gdb_skip_stdio_test "print shr1(g)"] {
-    gdb_test "print shr1(g)" \
-	"address of sgs is $hex.*\[0-9\]* = 4" \
+    gdb_test_stdio "print shr1(g)" \
+	"address of sgs is $hex" \
+	"\[0-9\]* = 4" \
 	"print shr1(g)"
 }
 
@@ -117,8 +121,9 @@ gdb_test "continue" \
 
 #print shr1(1)
 if ![gdb_skip_stdio_test "print shr1(1) 2nd time"] {
-    gdb_test "print shr1(1)" \
-	"address of sgs is $hex.*\[0-9\]* = 2" \
+    gdb_test_stdio "print shr1(1)" \
+	"address of sgs is $hex" \
+	"\[0-9\]* = 2" \
 	"print shr1(1) 2nd time"
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shmain.c ./gdb/testsuite/gdb.base/shmain.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shmain.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/shmain.c	2017-03-06 01:49:07.000000000 +0000
@@ -3,6 +3,8 @@
 #include "ss.h"
 #include <stdio.h>
 
+#include "../lib/unbuffer_output.c"
+
 extern int structarg(struct s);
 extern int pstructarg(struct s*);
 extern int shr1(int);
@@ -31,6 +33,9 @@ int mainshr1(int g)
 int main()
 {
   struct s y;
+
+  gdb_unbuffer_output ();
+
   g = 1;
   g = shr1(g);
   g = shr2(g);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shreloc.exp ./gdb/testsuite/gdb.base/shreloc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/shreloc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/shreloc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,49 +59,28 @@ if [test_compiler_info "xlc-*"] {
 }
 
 if { [gdb_compile_shlib $lib1src $lib1_sl $lib_opts] != ""} {
-    untested "Could not build $lib1_sl."
+    untested "could not build $lib1_sl."
     return -1
 } elseif { [gdb_compile_shlib $lib2src $lib2_sl $lib_opts] != ""} {
-    untested "Could not build $lib1_s2."
+    untested "could not build $lib1_s2."
     return -1
 } elseif { [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not build $binfile."
+    untested "could not build $binfile."
     return -1
 }
 
 # Start with a fresh gdb.
 
 clean_restart $binfile
-gdb_load_shlibs $lib1_sl $lib2_sl
+gdb_load_shlib $lib1_sl
+gdb_load_shlib $lib2_sl
 
 # Load up the shared objects
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
-proc get_var_address { var } {
-    global gdb_prompt hex
-
-    # Match output like:
-    # $1 = (int *) 0x0
-    # $5 = (int (*)()) 0
-    # $6 = (int (*)()) 0x24 <function_bar>
-
-    gdb_test_multiple "print &${var}" "get address of ${var}" {
-	-re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $"
-	{
-	    pass "get address of ${var}"
-	    if { $expect_out(1,string) == "0" } {
-		return "0x0"
-	    } else {
-		return $expect_out(1,string)
-	    }
-	}
-    }
-    return ""
-}
-
 #
 # Check debugging symbol relocations
 #
@@ -256,8 +235,8 @@ if {([istarget "*pc-cygwin"] || [istarge
     # A better approach would be include absolute symbols via the assembler.
     #
     if {[check_same "_minor_os_version__" "${msymfile}"]} {
-	pass "Absolute symbols not relocated"
+	pass "absolute symbols not relocated"
     } else {
-	fail "Absolute symbols not relocated"
+	fail "absolute symbols not relocated"
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigall.exp ./gdb/testsuite/gdb.base/sigall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1995-2015 Free Software Foundation, Inc.
+#   Copyright 1995-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigaltstack.c ./gdb/testsuite/gdb.base/sigaltstack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigaltstack.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigaltstack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigaltstack.exp ./gdb/testsuite/gdb.base/sigaltstack.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigaltstack.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigaltstack.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}.c"
+    untested "failed to compile"
     return -1
 }
 
@@ -76,6 +76,7 @@ proc finish_test { pattern msg } {
 	    # don't gracefully fall back to single-stepping.
 	    setup_kfail gdb/8841 "i?86-*-linux*"
 	    setup_kfail gdb/8841 "*-*-openbsd*"
+	    setup_kfail gdb/8841 "nios2-*-linux*"
 	    fail "$msg (could not set breakpoint)"
 	}
 	-re "$pattern.*${gdb_prompt} $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigbpt.c ./gdb/testsuite/gdb.base/sigbpt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigbpt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigbpt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigbpt.exp ./gdb/testsuite/gdb.base/sigbpt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigbpt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigbpt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,8 +36,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -56,7 +55,7 @@ if ![runto_main] then {
 # case.
 
 if { [is_address_zero_readable] } {
-    untested "Memory at address 0 is possibly executable"
+    untested "memory at address 0 is possibly executable"
     return
 }
 
@@ -119,7 +118,7 @@ proc after_segv { } {
 
 # Check that the address table and SIGSEGV correspond.
 
-set test "Verify that ${signame} occurs at the last STEPI insn"
+set test "verify that ${signame} occurs at the last STEPI insn"
 if {[string compare $segv_addr [at_segv]] == 0} {
     pass "$test"
 } else {
@@ -159,6 +158,10 @@ proc stepi_out { name args } {
 	    setup_kfail gdb/8841 "sparc*-*-openbsd*"
 	    fail "$test (could not insert single-step breakpoint)"
 	}
+	-re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" {
+	    setup_kfail gdb/8841 "nios2*-*-linux*"
+	    fail "$test (could not insert single-step breakpoint)"
+	}
 	-re "keeper.*$gdb_prompt $" {
 	    send_gdb "stepi\n"
 	    exp_continue
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigchld.c ./gdb/testsuite/gdb.base/sigchld.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigchld.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigchld.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigchld.exp ./gdb/testsuite/gdb.base/sigchld.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigchld.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigchld.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-addr.c ./gdb/testsuite/gdb.base/siginfo-addr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-addr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-addr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,13 +26,16 @@
 
 static void *p;
 
+void
+pass (void)
+{
+}
+
 static void
 handler (int sig, siginfo_t *info, void *context)
 {
   if (info->si_addr == p)
-    printf ("Correct si_addr value.\n");
-  else
-    printf ("Got si_addr = %p, expected %p.\n", info->si_addr, p);
+    pass ();
   _exit (0);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-addr.exp ./gdb/testsuite/gdb.base/siginfo-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-addr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,14 +26,8 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
-if [gdb_skip_stdio_test "siginfo-addr.exp"] {
-    continue
-}
-
-
 standard_testfile
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested "Couldn't compile ${srcfile}.c"
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -47,13 +41,7 @@ if { ![runto_main] } then {
 # Run to the signal.
 gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
 
+gdb_breakpoint "pass"
+
 # Check for correct si_addr.
-set test "program exit"
-gdb_test_multiple "continue" "${test}" {
-    -re "Correct si_addr" {
-	pass "si_addr value"
-    }
-    -re "Got si_addr" {
-	fail "si_addr value"
-    }
-}
+gdb_test "continue" "Breakpoint .* pass .*" "correct si_addr"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo.c ./gdb/testsuite/gdb.base/siginfo.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo.exp ./gdb/testsuite/gdb.base/siginfo.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,8 +31,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -64,6 +63,10 @@ gdb_test_multiple "step" "${test}" {
 	setup_kfail gdb/8841 sparc*-*-openbsd*
 	fail "$test (could not insert single-step breakpoint)"
     }
+    -re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" {
+        setup_kfail gdb/8841 "nios2*-*-linux*"
+	fail "$test (could not insert single-step breakpoint)"
+    }
     -re "done = 1;.*${gdb_prompt} $" {
 	send_gdb "$i\n"
 	exp_continue
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-infcall.c ./gdb/testsuite/gdb.base/siginfo-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-infcall.exp ./gdb/testsuite/gdb.base/siginfo-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if [target_info exists gdb,nosignals] {
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-obj.c ./gdb/testsuite/gdb.base/siginfo-obj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-obj.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-obj.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-obj.exp ./gdb/testsuite/gdb.base/siginfo-obj.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-obj.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-obj.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,8 +34,7 @@ if { ![supports_get_siginfo_type] } {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -52,7 +51,7 @@ set gcorefile [standard_output_file $tes
 set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"]
 
 set ssi_addr ""
-set test "Extract si_addr"
+set test "extract si_addr"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_addr = ($hex).*$gdb_prompt $" {
 	set ssi_addr $expect_out(1,string)
@@ -60,7 +59,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_errno"
+set test "extract si_errno"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_errno = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_errno $expect_out(1,string)
@@ -68,7 +67,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_code"
+set test "extract si_code"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_code = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_code $expect_out(1,string)
@@ -76,7 +75,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_signo"
+set test "extract si_signo"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_signo = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_signo $expect_out(1,string)
@@ -105,7 +104,7 @@ if { ![runto_main] } then {
 # Run to the signal.
 gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
 
-set test "Set si_addr"
+set test "set si_addr"
 gdb_test "p \$_siginfo._sifields._sigfault.si_addr = 0x666" " = \\(void \\*\\) 0x666"
 gdb_test "p \$_siginfo.si_errno = 666" " = 666"
 gdb_test "p \$_siginfo.si_code = 999" " = 999"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-thread.c ./gdb/testsuite/gdb.base/siginfo-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-thread.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-thread.exp ./gdb/testsuite/gdb.base/siginfo-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/siginfo-thread.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/siginfo-thread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,14 +41,14 @@ if { ![runto_main] } then {
 }
 
 # Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
+gdb_test "continue" "Thread .* received signal SIGSEGV.*" "continue to signal"
 
 # Try to generate a core file, for a later test.
 set gcorefile [standard_output_file $testfile.gcore]
 set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"]
 
 set ssi_addr ""
-set test "Extract si_addr"
+set test "extract si_addr"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_addr = ($hex).*$gdb_prompt $" {
 	set ssi_addr $expect_out(1,string)
@@ -56,7 +56,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_errno"
+set test "extract si_errno"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_errno = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_errno $expect_out(1,string)
@@ -64,7 +64,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_code"
+set test "extract si_code"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_code = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_code $expect_out(1,string)
@@ -72,7 +72,7 @@ gdb_test_multiple "p \$_siginfo" "$test"
     }
 }
 
-set test "Extract si_signo"
+set test "extract si_signo"
 gdb_test_multiple "p \$_siginfo" "$test" {
     -re "si_signo = (\[0-9\]\+).*$gdb_prompt $" {
 	set ssi_signo $expect_out(1,string)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals.exp ./gdb/testsuite/gdb.base/signals.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signals.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested signals.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -32,12 +32,6 @@ if [get_compiler_info] {
     return -1
 }
 
-if {$hp_cc_compiler} {
-    set void 0
-} else {
-    set void void
-}
-
 gdb_exit
 gdb_start
 
@@ -103,7 +97,7 @@ if [runto_main] then {
 
     # ...call the function
 
-    gdb_test "p func1 ()" "^p func1 \\(\\)\r\n.\[0-9\]* = $void" \
+    gdb_test "p func1 ()" "^p func1 \\(\\)\r\n.\[0-9\]* = void" \
 	"p func1 () #1"
 
     # ...veryfiy that the cout was updated
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals-state-child.c ./gdb/testsuite/gdb.base/signals-state-child.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals-state-child.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signals-state-child.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,101 @@
+/* Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <assert.h>
+#include <errno.h>
+
+#ifndef OUTPUT_TXT
+# define OUTPUT_TXT "output.txt"
+#endif
+
+static void
+perror_and_exit (const char *s)
+{
+  perror (s);
+  exit (1);
+}
+
+int
+main (int argc, char **argv)
+{
+  int i;
+  FILE *out;
+  sigset_t sigset;
+  int res;
+
+  res = sigprocmask (0,  NULL, &sigset);
+  if (res != 0)
+    perror_and_exit ("sigprocmask");
+
+  if (argc > 1)
+    out = stdout;
+  else
+    {
+      out = fopen (OUTPUT_TXT, "w");
+      if (out == NULL)
+	perror_and_exit ("fopen");
+    }
+
+  for (i = 1; i < NSIG; i++)
+    {
+      struct sigaction oldact;
+
+      fprintf (out, "signal %d: ", i);
+
+      res = sigaction (i, NULL, &oldact);
+      if (res == -1 && errno == EINVAL)
+	{
+	  /* Some signal numbers in the range are invalid.  E.g.,
+	     signals 32 and 33 on GNU/Linux.  */
+	  fprintf (out, "invalid");
+	}
+      else if (res == -1)
+	{
+	  perror_and_exit ("sigaction");
+	}
+      else
+	{
+	  int m;
+
+	  fprintf (out, "sigaction={sa_handler=");
+
+	  if (oldact.sa_handler == SIG_DFL)
+	    fprintf (out, "SIG_DFL");
+	  else if (oldact.sa_handler == SIG_IGN)
+	    fprintf (out, "SIG_IGN");
+	  else
+	    abort ();
+
+	  fprintf (out, ", sa_mask=");
+	  for (m = 1; m < NSIG; m++)
+	    fprintf (out, "%c", sigismember (&oldact.sa_mask, m) ? '1' : '0');
+
+	  fprintf (out, ", sa_flags=%d", oldact.sa_flags);
+
+	  fprintf (out, "}, masked=%d", sigismember (&sigset, i));
+	}
+      fprintf (out, "\n");
+    }
+
+  if (out != stdout)
+    fclose (out);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals-state-child.exp ./gdb/testsuite/gdb.base/signals-state-child.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signals-state-child.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signals-state-child.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,98 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that gdb's (or gdbserver's) own signal handling does not
+# interfere with the signal actions (dispositions, etc.) and mask
+# their spawned children inherit.
+#
+# - If gdb inherits some signal set to SIG_IGN, so should the
+#   inferior, even if gdb itself chooses not to ignore the signal.
+#
+# - If gdb inherits some signal set to SIG_DFL, so should the inferior
+#   even if gdb itself ignores that signal.
+#
+# This requires special support in gdb/gdbserver because the exec
+# family of functions does not reset the signal disposition of signals
+# that are set to SIG_IGN, nor signal masks and flags.
+
+standard_testfile
+
+if {![is_remote host] && ![is_remote target]} {
+    set gdb_txt [standard_output_file gdb.txt]
+    set standalone_txt [standard_output_file standalone.txt]
+    set purely_local 1
+} else {
+    set gdb_txt gdb.txt
+    set standalone_txt standalone.txt
+    set purely_local 0
+}
+
+remote_file host delete $gdb_txt
+remote_file host delete $standalone_txt
+remote_file target delete $gdb_txt
+remote_file target delete $standalone_txt
+
+set options [list debug "additional_flags=-DOUTPUT_TXT=\"$gdb_txt\""]
+if {[build_executable $testfile.exp $testfile $srcfile $options]} {
+    untested "failed to compile"
+    return -1
+}
+
+set options [list debug "additional_flags=-DOUTPUT_TXT=\"$standalone_txt\""]
+if {[build_executable $testfile.exp $testfile-standalone $srcfile $options]} {
+    untested "failed to compile"
+    return -1
+}
+
+# Run the program directly, and dump its initial signal actions and
+# mask in "standalone.txt".
+
+# Use remote_spawn instead of remote_exec, like how we spawn gdb.
+# This is in order to take the same code code paths in dejagnu
+# compared to when running the program through gdb.  E.g., because
+# local_exec uses -ignore SIGHUP, while remote_spawn does not, if we
+# used remote_exec, the test program would start with SIGHUP ignored
+# when run standalone, but not when run through gdb.
+set res [remote_spawn target "$binfile-standalone"]
+if { $res < 0 || $res == "" } {
+    untested "spawning $binfile-standalone failed"
+    return 1
+} else {
+    pass "collect standalone signals state"
+}
+remote_close target
+
+# Now run the program through gdb, and dump its initial signal actions
+# and mask in "gdb.txt".
+
+clean_restart $binfile
+
+if { ! [ runto_main ] } then {
+    untested "failed to compile"
+    return -1
+}
+
+gdb_continue_to_end "collect signals state under gdb"
+
+if {!$purely_local} {
+    # Copy file from target to host through build.
+    remote_download host [remote_upload target gdb.txt] gdb.txt
+    remote_download host [remote_upload target standalone.txt] standalone.txt
+}
+
+# Diff the .txt files.  They should be identical.
+gdb_test "shell diff -s $standalone_txt $gdb_txt" \
+    "Files .* are identical.*" \
+    "signals states are identical"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signest.c ./gdb/testsuite/gdb.base/signest.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signest.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signest.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signest.exp ./gdb/testsuite/gdb.base/signest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signest.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,13 +22,12 @@ if [target_info exists gdb,nosignals] {
     return -1
 }
 
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug}] {
-    untested ${testfile}.exp
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] {
     return -1
 }
 
 if ![runto_main] then {
-    untested ${testfile}.exp
+    untested "could not run to main"
     return -1
 }
 
@@ -39,7 +38,7 @@ if ![runto_main] then {
 # case.
 
 if { [is_address_zero_readable] } {
-    untested "Memory at address 0 is possibly executable"
+    untested "memory at address 0 is possibly executable"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signull.c ./gdb/testsuite/gdb.base/signull.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signull.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signull.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1996-2015 Free Software Foundation, Inc.
+   Copyright 1996-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signull.exp ./gdb/testsuite/gdb.base/signull.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/signull.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/signull.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested signull.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -57,7 +57,7 @@ if ![runto_main] then {
 # case.
 
 if { [is_address_zero_readable] } {
-    untested "Memory at address 0 is possibly executable"
+    untested "memory at address 0 is possibly executable"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigrepeat.c ./gdb/testsuite/gdb.base/sigrepeat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigrepeat.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigrepeat.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigrepeat.exp ./gdb/testsuite/gdb.base/sigrepeat.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigrepeat.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigrepeat.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigstep.c ./gdb/testsuite/gdb.base/sigstep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigstep.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigstep.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigstep.exp ./gdb/testsuite/gdb.base/sigstep.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sigstep.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sigstep.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [target_info exists gdb,nosignals] {
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -109,6 +109,10 @@ proc advance { enter_cmd in_handler_pref
 		setup_kfail gdb/8841 "sparc*-*-openbsd*"
 		fail "$test (could not insert single-step breakpoint)"
 	    }
+	    -re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" {
+		setup_kfail gdb/8841 "nios2*-*-linux*"
+		fail "$test (could not insert single-step breakpoint)"
+	    }
 	    -re "done = 1;.*${gdb_prompt} $" {
 		send_gdb "$exit_cmd\n"
 		exp_continue -continue_timer
@@ -203,6 +207,7 @@ proc advancei { cmd } {
 		# don't gracefully fall back to single-stepping.
 		setup_kfail gdb/8841 "i?86-*-linux*"
 		setup_kfail gdb/8841 "*-*-openbsd*"
+		setup_kfail gdb/8841 "nios2-*-linux*"
 		fail "$test (could not set breakpoint)"
 		return
 	    }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sizeof.c ./gdb/testsuite/gdb.base/sizeof.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sizeof.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sizeof.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,3 @@
-#include <stdio.h>
-
 typedef char padding[16];
 
 struct {
@@ -98,26 +96,26 @@ fill_structs (void)
 int
 main ()
 {
+  int size, value;
+
   fill_structs ();
 
-  printf ("sizeof (char) == %d\n", (int) sizeof (char));
-  printf ("sizeof (short) == %d\n", (int) sizeof (short));
-  printf ("sizeof (int) == %d\n", (int) sizeof (int));
-  printf ("sizeof (long) == %d\n", (int) sizeof (long));
-  printf ("sizeof (long long) == %d\n", (int) sizeof (long long));
-
-  printf ("sizeof (void *) == %d\n", (int) sizeof (void*));
-  printf ("sizeof (void (*)(void)) == %d\n", (int) sizeof (void (*)(void)));
-
-  printf ("sizeof (float) == %d\n", (int) sizeof (float));
-  printf ("sizeof (double) == %d\n", (int) sizeof (double));
-  printf ("sizeof (long double) == %d\n", (int) sizeof (long double));
+  size = (int) sizeof (char);
+  size = (int) sizeof (short);
+  size = (int) sizeof (int);
+  size = (int) sizeof (long);
+  size = (int) sizeof (long long);
+  size = (int) sizeof (void*);
+  size = (int) sizeof (void (*)(void));
+  size = (int) sizeof (float);
+  size = (int) sizeof (double);
+  size = (int) sizeof (long double);
 
   /* Signed char?  */
-  printf ("valueof ('\\377') == %d\n", '\377');
-  printf ("valueof ((int) (char) -1) == %d\n", (int) (char) -1);
-  printf ("valueof ((int) (signed char) -1) == %d\n", (int) (signed char) -1);
-  printf ("valueof ((int) (unsigned char) -1) == %d\n", (int) (unsigned char) -1);
+  value = '\377';
+  value = (int) (char) -1;
+  value = (int) (signed char) -1;
+  value = (int) (unsigned char) -1;
 
   return 0;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sizeof.exp ./gdb/testsuite/gdb.base/sizeof.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sizeof.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sizeof.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,11 +15,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if [target_info exists gdb,noinferiorio] {
-    verbose "Skipping sizeof.exp because of no fileio capabilities."
-    continue
-}
-
 #
 # test running programs
 #
@@ -30,8 +25,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -68,10 +62,8 @@ set sizeof_long_double [get_sizeof "long
 #
 
 proc check_sizeof { type size } {
-    global gdb_prompt
-
-    set pat [string_to_regexp "sizeof (${type}) == ${size}"]
-    gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*"  "check sizeof \"$type\""
+    gdb_test "next" "" ""
+    gdb_test "p size" " = ${size}" "check sizeof \"$type\""
 }
 
 check_sizeof "char" ${sizeof_char}
@@ -88,10 +80,8 @@ check_sizeof "double" ${sizeof_double}
 check_sizeof "long double" ${sizeof_long_double}
 
 proc check_valueof { exp val } {
-    global gdb_prompt
-
-    set pat [string_to_regexp "valueof (${exp}) == ${val}"]
-    gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\""
+    gdb_test "next" "" ""
+    gdb_test "p value" " = ${val}" "check valueof \"$exp\""
 }
 
 # Check that GDB and the target agree over the sign of a character.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip1.c ./gdb/testsuite/gdb.base/skip1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/skip1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,9 +1,39 @@
-int bar()
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+bar (void)
 {
   return 1;
 }
 
-int baz(int a)
+int
+baz (int a)
 {
   return a + 1;
 }
+
+static void
+test_skip (void)
+{
+}
+
+void
+skip1_test_skip_file_and_function (void)
+{
+  test_skip ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip.c ./gdb/testsuite/gdb.base/skip.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/skip.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,14 +1,62 @@
-int foo();
-int bar();
-int baz(int);
+/* This testcase is part of GDB, the GNU debugger.
 
-int main()
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+int foo (void);
+int bar (void);
+int baz (int);
+void skip1_test_skip_file_and_function (void);
+void test_skip_file_and_function (void);
+
+int
+main ()
 {
-  /* Use comma operator to sequence evaluation of bar and foo. */
-  return baz((bar(), foo()));
+  int x;
+
+  /* Use comma operator to sequence evaluation of bar and foo.  */
+  x = baz ((bar (), foo ()));
+
+  test_skip_file_and_function ();
+
+  return 0;
 }
 
-int foo()
+int
+foo ()
 {
   return 0;
 }
+
+static void
+test_skip (void)
+{
+}
+
+static void
+end_test_skip_file_and_function (void)
+{
+  abort ();
+}
+
+void
+test_skip_file_and_function (void)
+{
+  test_skip ();
+  skip1_test_skip_file_and_function ();
+  end_test_skip_file_and_function ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip.exp ./gdb/testsuite/gdb.base/skip.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/skip.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,8 +14,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This file was written by Justin Lebar. (justin.lebar@gmail.com)
+# And further hacked on by Doug Evans. (dje@google.com)
 
-if { [prepare_for_testing skip.exp "skip" \
+if { [prepare_for_testing "failed to prepare" "skip" \
                           {skip.c skip1.c } \
                           {debug nowarnings}] } {
     return -1
@@ -24,35 +25,47 @@ if { [prepare_for_testing skip.exp "skip
 set srcfile skip.c
 set srcfile1 skip1.c
 
-#
 # Right after we start gdb, there's no default file or function to skip.
-#
+
 gdb_test "skip file" "No default file now." "skip file (no default file)"
 gdb_test "skip function" "No default function now."
 gdb_test "skip" "No default function now." "skip (no default function)"
 
-if ![runto_main] { fail "skip tests suppressed" }
+# Test elided args.
+
+gdb_test "skip -fi" "Missing value for -fi option."
+gdb_test "skip -file" "Missing value for -file option."
+gdb_test "skip -fu" "Missing value for -fu option."
+gdb_test "skip -function" "Missing value for -function option."
+gdb_test "skip -rfu" "Missing value for -rfu option."
+gdb_test "skip -rfunction" "Missing value for -rfunction option."
+
+# Test other invalid option combinations.
+
+gdb_test "skip -x" "Invalid skip option: -x"
+gdb_test "skip -rfu foo.* xyzzy" "Invalid argument: xyzzy"
+
+if ![runto_main] {
+    fail "can't run to main"
+    return
+}
 
-#
 # Test |info skip| with an empty skiplist.
-#
+
 gdb_test "info skip" "Not skipping any files or functions\." "info skip empty"
 
-#
 # Create a skiplist entry for the current file and function.
-#
+
 gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file ($srcfile)"
 gdb_test "skip" "Function main will be skipped when stepping\." "skip (main)"
 
-#
 # Create a skiplist entry for a specified file and function.
-#
+
 gdb_test "skip file skip1.c" "File .*$srcfile1 will be skipped when stepping\."
 gdb_test "skip function baz" "Function baz will be skipped when stepping\."
 
-#
 # Test bad skiplist entry modification commands
-#
+
 gdb_test "skip enable 999" "No skiplist entries found with number 999."
 gdb_test "skip disable 999" "No skiplist entries found with number 999."
 gdb_test "skip delete 999" "No skiplist entries found with number 999."
@@ -60,121 +73,227 @@ gdb_test "skip enable a" "Args must be n
 gdb_test "skip disable a" "Args must be numbers or '\\$' variables."
 gdb_test "skip delete a" "Args must be numbers or '\\$' variables."
 
-#
 # Ask for info on a skiplist entry which doesn't exist.
-#
+
 gdb_test "info skip 999" "No skiplist entries found with number 999."
 
-#
 # Does |info skip| look right?
-#
+
 gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-1\\s+file\\s+y\\s+.*$srcfile\\s*
-2\\s+function\\s+y\\s+main\\s*
-3\\s+file\\s+y\\s+$srcfile1\\s*
-4\\s+function\\s+y\\s+baz\\s*"
+    "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+1\\s+y\\s+n\\s+.*$srcfile\\s+n\\s+<none>\\s*
+2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*"
 
-#
 # Right now, we have an outstanding skiplist entry on both source
 # files, so when we step into the first line in main(), we should step
 # right over it and go to the second line of main().
-#
 
-if ![runto_main] { fail "skip tests suppressed" }
+if ![runto_main] {
+    fail "can't run to main"
+    return
+}
+
 gdb_test "step" ".*" "step in the main"
 gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored"
 
-#
 # Now remove skip.c from the skiplist.  Our first step should take us
-# into foo(), and our second step should take us to the next line in
-# main().
-#
-gdb_test "skip delete 1"
-# Check that entry 1 is missing from |info skip|
-gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+y\\s+main\\s*
-3\\s+file\\s+y\\s+$srcfile1\\s*
-4\\s+function\\s+y\\s+baz\\s*" \
-    "info skip (delete 1)"
-
-if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
-gdb_test "step" ".*" "step after deleting 1 (2)" ; # Return from foo()
-gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (3)"
+# into foo(), and our second step should take us to the next line in main().
+
+with_test_prefix "step after deleting 1" {
+    gdb_test "skip delete 1"
+    # Check that entry 1 is missing from |info skip|
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip (delete 1)"
+
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test "step" "foo \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2" ; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 3"
+}
 
-#
 # Now disable the skiplist entry for  skip1.c.  We should now
 # step into foo(), then into bar(), but not into baz().
-#
-gdb_test "skip disable 3"
-# Is entry 3 disabled in |info skip|?
-gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
-  "info skip shows entry as disabled"
-
-if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
-gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
-gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
-gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
 
-#
+with_test_prefix "step after disabling 3" {
+    gdb_test "skip disable 3"
+    # Is entry 3 disabled in |info skip|?
+    gdb_test "info skip 3" \
+	"3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*" \
+	"info skip shows entry as disabled"
+
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test "step" "bar \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from foo()
+    gdb_test "step" "foo \\(\\) at.*" "step 3"
+    gdb_test "step" ".*" "step 4"; # Return from bar()
+    gdb_test "step" "main \\(\\) at.*" "step 5"
+}
+
 # Enable skiplist entry 3 and make sure we step over it like before.
-#
-gdb_test "skip enable 3"
-# Is entry 3 enabled in |info skip|?
-gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \
-  "info skip shows entry as enabled"
-if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)"
-gdb_test "step" ".*" "step after enable 3 (2)"; # Return from foo()
-gdb_test "step" "main \\(\\) at.*" "step after enable 3 (3)"
 
-gdb_test "skip disable"
-gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+n\\s+main\\s*
-3\\s+file\\s+n\\s+$srcfile1\\s*
-4\\s+function\\s+n\\s+baz\\s*" \
-  "info skip after disabling all"
+with_test_prefix "step after enable 3" {
+    gdb_test "skip enable 3"
+    # Is entry 3 enabled in |info skip|?
+    gdb_test "info skip 3" \
+	"3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*" \
+	"info skip shows entry as enabled"
+
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test "step" "foo \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 3"
+}
 
-gdb_test "skip enable"
-gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+y\\s+main\\s*
-3\\s+file\\s+y\\s+$srcfile1\\s*
-4\\s+function\\s+y\\s+baz\\s*" \
-  "info skip after enabling all"
+# Admin tests (disable,enable,delete).
 
-gdb_test "skip disable 4 2-3"
-gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+n\\s+main\\s*
-3\\s+file\\s+n\\s+$srcfile1\\s*
-4\\s+function\\s+n\\s+baz\\s*" \
-  "info skip after disabling 4 2-3"
+with_test_prefix "admin" {
+    gdb_test "skip disable"
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+n\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip after disabling all"
+
+    gdb_test "skip enable"
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+y\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip after enabling all"
+
+    gdb_test "skip disable 4 2-3"
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+n\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+n\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip after disabling 4 2-3"
+
+    gdb_test "skip enable 2-3"
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*
+4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip after enabling 2-3"
+
+    gdb_test "info skip 2-3" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+2\\s+y\\s+n\\s+<none>\\s+n\\s+main\\s*
+3\\s+y\\s+n\\s+$srcfile1\\s+n\\s+<none>\\s*" \
+	"info skip 2-3"
+
+    gdb_test "skip delete 2 3"
+    gdb_test "info skip" \
+	"Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+4\\s+n\\s+n\\s+<none>\\s+n\\s+baz\\s*" \
+	"info skip after deleting 2 3"
+
+    gdb_test "skip delete"
+    gdb_test "info skip" "Not skipping any files or functions\." \
+	"info skip after deleting all"
+}
 
-gdb_test "skip enable 2-3"
-gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+y\\s+main\\s*
-3\\s+file\\s+y\\s+$srcfile1\\s*
-4\\s+function\\s+n\\s+baz\\s*" \
-  "info skip after enabling 2-3"
-
-gdb_test "info skip 2-3" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-2\\s+function\\s+y\\s+main\\s*
-3\\s+file\\s+y\\s+$srcfile1\\s*" \
-  "info skip 2-3"
+# Now test skip -fi, etc.
 
-gdb_test "skip delete 2 3"
-gdb_test "info skip" \
-  "4\\s+function\\s+n\\s+baz\\s*" \
-  "info skip after deleting 2 3"
+# Create a skiplist entry for a specified file and function.
+gdb_test "skip -fi skip1.c" "File .*$srcfile1 will be skipped when stepping\."
+gdb_test "skip -gfi sk*1.c" "File\\(s\\) sk\\*1.c will be skipped when stepping\."
+gdb_test "skip -fu baz" "Function baz will be skipped when stepping\."
+gdb_test "skip -rfu ^b.z$" "Function\\(s\\) \\^b\\.z\\$ will be skipped when stepping."
+
+with_test_prefix "step using -fi" {
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test_no_output "skip disable"
+    gdb_test_no_output "skip enable 5"
+    gdb_test "step" "foo \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 3"
+}
+
+with_test_prefix "step using -gfi" {
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test_no_output "skip disable"
+    gdb_test_no_output "skip enable 6"
+    gdb_test "step" "foo \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 3"
+}
 
-gdb_test "skip delete"
-gdb_test "info skip" "Not skipping any files or functions\." \
-  "info skip after deleting all"
+with_test_prefix "step using -fu for baz" {
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test_no_output "skip disable"
+    gdb_test_no_output "skip enable 7"
+    gdb_test "step" "bar \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from bar()
+    gdb_test "step" "foo \\(\\) at.*" "step 3"
+    gdb_test "step" ".*" "step 4"; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 5"
+}
+
+with_test_prefix "step using -rfu for baz" {
+    if ![runto_main] {
+	fail "can't run to main"
+	return
+    }
+
+    gdb_test_no_output "skip disable"
+    gdb_test_no_output "skip enable 8"
+    gdb_test "step" "bar \\(\\) at.*" "step 1"
+    gdb_test "step" ".*" "step 2"; # Return from bar()
+    gdb_test "step" "foo \\(\\) at.*" "step 3"
+    gdb_test "step" ".*" "step 4"; # Return from foo()
+    gdb_test "step" "main \\(\\) at.*" "step 5"
+}
+
+# Test -fi + -fu.
+
+with_test_prefix "step using -fi + -fu" {
+    gdb_test_no_output "skip delete"
+
+    if ![runto test_skip_file_and_function no-message] {
+	fail "can't run to test_skip_file_and_function"
+	return
+    }
+
+    gdb_test "skip -fi skip1.c -fu test_skip" \
+	"Function test_skip in file skip1.c will be skipped when stepping\."
+    # Verify we can step into skip.c:test_skip but not skip1.c:test_skip.
+    gdb_test "step" "test_skip \\(\\) at.*" "step 1"
+    gdb_test "step" "test_skip_file_and_function \\(\\) at.*" "step 2"; # Return from test_skip()
+    gdb_test "step" "skip1_test_skip_file_and_function \\(\\) at.*" "step 3"
+    gdb_test "step" ".*" "step 4"; # Skip over test_skip()
+    gdb_test "step" "test_skip_file_and_function \\(\\) at.*" "step 5"; # Return from skip1_test_skip_file_and_function()
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip-solib.exp ./gdb/testsuite/gdb.base/skip-solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/skip-solib.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/skip-solib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,8 +73,8 @@ Ignore file pending future shared librar
 # Checkinfo skip list.
 #
 gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-1\\s+file\\s+y\\s+${srcfile_lib}\\s*" \
+  "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+1\\s+y\\s+n\\s+${srcfile_lib}\\s+n\\s+<none>\\s*" \
   "info skip with pending file"
 
 if ![runto_main] { fail "skip tests suppressed" }
@@ -108,8 +108,8 @@ gdb_test "step" "square.*"
 # Now our entry should no longer be pending.
 #
 gdb_test "info skip" \
-  "Num\\s+Type\\s+Enb\\s+What\\s*
-1\\s+function\\s+y\\s+multiply\\s*" \
+  "Num\\s+Enb\\s+Glob\\s+File\\s+RE\\s+Function\\s*
+1\\s+y\\s+n\\s+<none>\\s+n\\s+multiply\\s*" \
   "info skip for function multiply"
 
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-disc-shr.c ./gdb/testsuite/gdb.base/so-disc-shr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-disc-shr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/so-disc-shr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-impl-ld.exp ./gdb/testsuite/gdb.base/so-impl-ld.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-impl-ld.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/so-impl-ld.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,25 +30,17 @@ if [get_compiler_info] {
     return -1
 }
 
-if [get_compiler_info] {
-    return -1
-}
-
-if [test_compiler_info "hpcc-*"] {
-    lappend exec_opts "additional_flags=-Ae"
-}
-
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile \
 	     executable $exec_opts] != ""} {
-    untested "Couldn't compile $libsrc or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
 # Start with a fresh gdb
 
 clean_restart ${binfile}
-gdb_load_shlibs $lib_sl
+gdb_load_shlib $lib_sl
 
 # This program implicitly loads SOM shared libraries.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-indr-cl.c ./gdb/testsuite/gdb.base/so-indr-cl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-indr-cl.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/so-indr-cl.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-/* This program is linked against SOM shared libraries, which the loader
-   automatically loads along with the program itself).
-   */
-
-#include <stdio.h>
-extern "C" int solib_main (int);
-
-static int
-solib_wrapper (int (*function)(int))
-{
-  return (*function)(100);
-}
-
-
-int main ()
-{
-  int  result;
-
-  /* This is an indirect call to solib_main. */
-  result = solib_wrapper (solib_main);
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-indr-cl.exp ./gdb/testsuite/gdb.base/so-indr-cl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/so-indr-cl.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/so-indr-cl.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,129 +0,0 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-# are we on a target board
-if ![isnative] then {
-    return
-}
-
-# This test is presently only valid on HP-UX, since it requires
-# that we use HP-UX-specific compiler & linker options to build
-# the testcase.
-#
-if {! [istarget "hppa*-*-*hpux*"] } {
-    return
-}
-
-set libfile "solib"
-set testfile "so-indr-cl"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info] {
-    return -1
-}
-
-# Build the shared libraries this test case needs.
-#
-#cd ${subdir}
-#remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
-
-
-if {$hp_cc_compiler || $hp_aCC_compiler} {
-    set additional_flags "additional_flags=+z"
-} else {
-    set additional_flags "additional_flags=-fpic"
-}
-if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${objdir}/${subdir}/${libfile}1.o" object [list debug $additional_flags]] != ""} {
-    perror "Couldn't compile ${libfile}1.c"
-    return -1
-}
-
-if [istarget "hppa*-hp-hpux*"] then {
-    remote_exec build "ld -b ${objdir}/${subdir}/${libfile}1.o -o ${objdir}/${subdir}/${libfile}1.sl"
-} else {
-    set additional_flags "additional_flags=-shared"
-    gdb_compile "${objdir}/${subdir}/${libfile}1.o" "${objdir}/${subdir}/${libfile}1.sl" executable [list debug $additional_flags]
-}
-
-# Build the test case
-#remote_exec build "$CC -Aa -g ${srcfile} ${libfile}1.sl -o ${binfile}"
-
-
-if {$hp_cc_compiler} {
-    set additional_flags "additional_flags=-Ae"
-} else {
-    set additional_flags ""
-}
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}/${libfile}1.sl" "${binfile}" executable [list debug $additional_flags]] != ""} {
-    perror "Couldn't build ${binfile}"
-    return -1
-}
-
-#cd ..
-
-# Start with a fresh gdb
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# This program implicitly loads SOM shared libraries.  We wish to test
-# whether a user can set breakpoints in a shlib before running the
-# program, where the program doesn't directly call the shlib, but
-# indirectly does via passing its address to another function.
-#
-# ??rehrauer: Currently, this doesn't work, but we do catch the case
-# and explicitly disallow it.  The reason it fails appears to be that
-#
-#  [1] gdb consults only the linker symbol table in this scenario, and
-#  [2] For a shlib function that is only indirectly called from the
-#      main a.out, there is in the linker symbol table a stub whose
-#      address is negative.  Possibly this is to be interpreted as
-#      an index into the DLT??
-#
-send_gdb "break solib_main\n"
-gdb_expect {
-  -re "Cannot break on solib_main without a running program.*$gdb_prompt $"\
-          {pass "break on indirect solib call before running"}
-  -re "Breakpoint.*deferred.*\\(\"solib_main\" was not found.*$gdb_prompt $"\
-	  {pass "break on indirect solib call before running 2"}
-  -re "$gdb_prompt $"\
-          {fail "break on indirect solib call before running"}
-  timeout {fail "(timeout) break on indirect solib call before running"}
-}
-
-# However, if we do run to the program's main, we then ought to be
-# able to set a breakpoint on the indirectly called function.  (Apparently,
-# once the inferior is running, gdb consults the debug info rather than
-# the linker symbol table, and is able to find the correct address.)
-#
-if ![runto_main] then { fail "indirect solib call tests suppressed" }
-
-# Verify that we can step over the first shlib call.
-#
-send_gdb "break solib_main\n"
-gdb_expect {
-  -re ".*\[Bb\]reakpoint \[0-9\]* at 0x\[0-9a-fA-F\]*: file.*${libfile}1.c.*$gdb_prompt $"\
-          {pass "break on indirect solib call after running"}
-  -re "$gdb_prompt $"\
-          {fail "break on indirect solib call after running"}
-  timeout {fail "(timeout) break on indirect solib call after running"}
-}
-
-gdb_exit
-return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib1.c ./gdb/testsuite/gdb.base/solib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,7 +1,3 @@
-/* This program is intended to be built as an HP-UX SOM shared
-   library, for use by the solib.exp testcase.  It simply returns
-   the square of its integer argument.
-   */
 #if defined(__cplusplus) || defined(__STDCPP__)
 extern "C"
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib2.c ./gdb/testsuite/gdb.base/solib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib2.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-/* This program is intended to be built as an HP-UX SOM shared
-   library, for use by the solib.exp testcase.  It simply returns
-   the cube of its integer argument.
-   */
-#ifdef __cplusplus
-extern "C" {
-#endif
-int  solib_main (int  arg)
-{
-  return arg*arg*arg;
-}
-#ifdef __cplusplus
-}
-#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib.c ./gdb/testsuite/gdb.base/solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,60 +0,0 @@
-/* This program uses HP-UX-specific features to load and unload SOM
-   shared libraries that it wasn't linked against (i.e., libraries
-   that the loader doesn't automatically load along with the program
-   itself).
-   */
-
-#include <stdio.h>
-#include <dl.h>
-
-int main ()
-{
-  shl_t  solib_handle;
-  int  dummy;
-  int  status;
-  int  (*solib_main) (int);
-
-  /* Load a shlib, with immediate binding of all symbols.
-
-     Note that the pathname of the loaded shlib is assumed to be relative
-     to the testsuite directory (from whence the tested GDB is run), not
-     from dot/.
-   */
-  dummy = 1;  /* Put some code between shl_ calls... */
-  solib_handle = shl_load ("gdb.base/solib1.sl", BIND_IMMEDIATE, 0);
-
-  /* Find a function within the shlib, and call it. */
-  status = shl_findsym (&solib_handle,
-                        "solib_main",
-                        TYPE_PROCEDURE,
-                        (long *) &solib_main);
-  status = (*solib_main) (dummy);
-
-  /* Unload the shlib. */
-  status = shl_unload (solib_handle);
-
-  /* Load a different shlib, with deferred binding of all symbols. */
-  dummy = 2;
-  solib_handle = shl_load ("gdb.base/solib2.sl", BIND_DEFERRED, 0);
-
-  /* Find a function within the shlib, and call it. */
-  status = shl_findsym (&solib_handle,
-                        "solib_main",
-                        TYPE_PROCEDURE,
-                        (long *) &solib_main);
-  status = (*solib_main) (dummy);
-
-  /* Unload the shlib. */
-  status = shl_unload (solib_handle);
-
-  /* Reload the first shlib again, with deferred symbol binding this time. */
-  dummy = 3;
-  solib_handle = shl_load ("gdb.base/solib1.sl", BIND_IMMEDIATE, 0);
-
-  /* Unload it without trying to find any symbols in it. */
-  status = shl_unload (solib_handle);
-
-  /* All done. */
-  dummy = -1;
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-corrupted.exp ./gdb/testsuite/gdb.base/solib-corrupted.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-corrupted.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-corrupted.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,13 +26,12 @@ if {[is_remote target]} {
 set testfile "solib-corrupted"
 set srcfile start.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-disc.c ./gdb/testsuite/gdb.base/solib-disc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-disc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-disc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-disc.exp ./gdb/testsuite/gdb.base/solib-disc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-disc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-disc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,11 +27,11 @@ if { [info proc gdb_reconnect] == "" } {
 set testfile solib-disc
 set libfile so-disc-shr
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
 
 set libsrc "${srcdir}/${subdir}/${libfile}.c"
 set libname "${libfile}.so"
-set libobj "${objdir}/${subdir}/${libname}"
+set libobj [standard_output_file ${libname}]
 set execsrc "${srcdir}/${subdir}/${srcfile}"
 set lib_dlopen [shlib_target_file ${libname}]
 set lib_syms [shlib_symbol_file ${libname}]
@@ -53,10 +53,10 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $libobj
+gdb_load_shlib $libobj
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display.exp ./gdb/testsuite/gdb.base/solib-display.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-display.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -28,7 +28,24 @@
 # (and thus aren't affected by shared library unloading) are not
 # disabled prematurely.
 
-if { [skip_shlib_tests] || [is_remote target] } {
+if { [skip_shlib_tests] } {
+    return 0
+}
+
+# This test is currently not supported for stub targets, because it uses the
+# start command (through gdb_start_cmd).  In theory, it could be changed to
+# use something else (kill + gdb_run_cmd with a manual breakpoint at main).
+# However, when we try that with the native-gdbserver board, we see that the
+# test fails and gdb outputs this upon connection:
+#
+#   warning: Unable to display "a_global": No symbol "a_global" in current context.
+#   warning: Unable to display "b_global": No symbol "b_global" in current context.
+#   warning: Unable to display "c_global": No symbol "c_global" in current context.
+#
+# This is because the initial stop is done before the shared libraries are
+# loaded.
+
+if { [use_gdb_stub] } {
     return 0
 }
 
@@ -57,13 +74,13 @@ foreach libsepdebug {NO IN SEP} { with_t
     }
     if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != ""
 	 || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
-      untested "Could not compile $binfile_lib or $binfile."
+      untested "failed to compile"
       return -1
     }
 
     if {$libsepdebug == "SEP"} {
 	if {[gdb_gnu_strip_debug $binfile_lib] != 0} {
-	    unsupported "Could not split debug of $binfile_lib."
+	    unsupported "could not split debug of $binfile_lib."
 	    return
 	} else {
 	    pass "split solib"
@@ -73,7 +90,7 @@ foreach libsepdebug {NO IN SEP} { with_t
     clean_restart $executable
 
     if ![runto_main] then {
-      fail "Can't run to main"
+      fail "can't run to main"
       return 0
     }
 
@@ -82,16 +99,20 @@ foreach libsepdebug {NO IN SEP} { with_t
     gdb_test "display c_global" "3: c_global = 43"
 
     if { [gdb_start_cmd] < 0 } {
-	fail "Can't run to main (2)"
+	fail "can't run to main (2)"
 	continue
     }
 
-    gdb_test "" "3: c_global = 43\\r\\n2: b_global = 42\\r\\n1: a_global = 41" "after rerun"
+    gdb_test "" [multi_line \
+		     "1: a_global = 41" \
+		     "2: b_global = 42"  \
+		     "3: c_global = 43" \
+		    ] "after rerun"
 
     # Now rebuild the library without b_global
     if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} \
 	      "$sep_lib_flags additional_flags=-DNO_B_GLOBAL"] != ""} {
-	fail "Can't rebuild $binfile_lib"
+	fail "can't rebuild $binfile_lib"
     }
 
     if {$libsepdebug == "SEP"} {
@@ -105,11 +126,16 @@ foreach libsepdebug {NO IN SEP} { with_t
     }
 
     if { [gdb_start_cmd] < 0 } {
-	fail "Can't run to main (3)"
+	fail "can't run to main (3)"
 	continue
     }
 
-    gdb_test "" "3: c_global = 43\\r\\nwarning: .*b_global.*\\r\\n1: a_global = 41" "after rerun (2)"
+
+    gdb_test "" [multi_line \
+		     "1: a_global = 41" \
+		     "warning: .*b_global.*"  \
+		     "3: c_global = 43" \
+		    ] "after rerun (2)"
 
     # Now verify that displays which are not in the shared library
     # are not cleared permaturely.
@@ -123,12 +149,16 @@ foreach libsepdebug {NO IN SEP} { with_t
     gdb_test "display a_static" "6: a_static = 46"
 
     if { [gdb_start_cmd] < 0 } {
-	fail "Can't run to main (4)"
+	fail "can't run to main (4)"
 	continue
     }
 
     gdb_test "" "6: a_static = 46\\r\\n4: main_global = 44\\r\\n.*"
     gdb_test "break [gdb_get_line_number "break here" ${testfile}.c]" \
 	    ".*Breakpoint.* at .*" 
-    gdb_test "continue" "6: a_static = 46\\r\\n5: a_local = 45\\r\\n4: main_global = 44\\r\\n.*"
+    gdb_test "continue" [multi_line \
+			     "4: main_global = 44" \
+			     "5: a_local = 45" \
+			     "6: a_static = 46" \
+			    ]
 }}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display-lib.c ./gdb/testsuite/gdb.base/solib-display-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-display-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display-main.c ./gdb/testsuite/gdb.base/solib-display-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-display-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-display-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib.exp ./gdb/testsuite/gdb.base/solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,352 +0,0 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-# are we on a target board
-if ![isnative] then {
-    return
-}
-
-# This test is presently only valid on HP-UX.  It verifies GDB's
-# ability to catch loads and unloads of shared libraries.
-#
-
-#setup_xfail "*-*-*"
-#clear_xfail "hppa*-*-*hpux*"
-if {![istarget "hppa*-*-hpux*"]} {
-    return 0
-}
-
-set testfile "solib"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-# build the first test case
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested solib.exp
-     return -1
-}
-
-if [get_compiler_info] {
-    return -1
-}
-
-# Build the shared libraries this test case needs.
-#
-#cd ${subdir}
-#remote_exec build "$CC -g +z -c ${testfile}1.c -o ${testfile}1.o"
-#remote_exec build "$CC -g +z -c ${testfile}2.c -o ${testfile}2.o"
-
-if {$gcc_compiled == 0} {
-    if [istarget "hppa*-hp-hpux*"] then {
-	set additional_flags "additional_flags=+z"
-    } else {
-	# don't know what the compiler is...
-	set additional_flags ""
-    }
-} else {
-    set additional_flags "additional_flags=-fpic"
-}
-
-if {[gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${binfile}1.o" object [list debug $additional_flags]] != ""} {
-    perror "Couldn't compile ${testfile}1.c"
-    #return -1
-}
-if {[gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${binfile}2.o" object [list debug, $additional_flags]] != ""} {
-    perror "Couldn't compile ${testfile}2.c"
-    #return -1
-}
-
-if [istarget "hppa*-*-hpux*"] {
-    remote_exec build "ld -b ${binfile}1.o -o ${binfile}1.sl"
-    remote_exec build "ld -b ${binfile}2.o -o ${binfile}2.sl"
-} else {
-    set additional_flags "additional_flags=-shared"
-    gdb_compile "${binfile}1.o" "${binfile}1.sl" executable [list debug $additional_flags]
-    gdb_compile "${binfile}2.o" "${binfile}2.sl" executable [list debug $additional_flags]
-}
-
-# Build a version where the main program is in a shared library.  For
-# testing an indirect call made in a shared library.
-
-if {[gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}_sl.o" object [list debug $additional_flags]] != ""} {
-    perror "Couldn't compile ${testfile}.c for ${binfile}_sl.o"
-    #return -1
-}
-
-if { [istarget "hppa*-*-hpux*"] } {
-    remote_exec build "ld -b ${binfile}_sl.o -o ${binfile}_sl.sl"
-} else {
-    set additional_flags "additional_flags=-shared"
-    gdb_compile "${binfile}_sl.o" "${binfile}_sl.sl" executable [list debug $additional_flags]
-}
-
-if { [istarget "hppa*-*-hpux*"] } {
-    set additional_flags "-Wl,-u,main"
-    if { [gdb_compile "${binfile}_sl.sl" "${binfile}_sl" executable [list debug $additional_flags]] != "" } {
-        untested solib.exp
-        return -1
-    }
-} else {
-    # FIXME: need to fill this part in for non-HP build
-}
-
-#cd ..
-
-# Start with a fresh gdb
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# This program manually loads and unloads SOM shared libraries, via calls
-# to shl_load and shl_unload.
-#
-if ![runto_main] then { fail "catch load/unload tests suppressed" }
-
-# Verify that we complain if the user tells us to catch something we
-# don't understand.
-#
-send_gdb "catch a_cold\n"
-gdb_expect {
-  -re "Unknown event kind specified for catch.*$gdb_prompt $"\
-          {pass "bogus catch kind is disallowed"}
-  -re "$gdb_prompt $"\
-          {fail "bogus catch kind is disallowed"}
-  timeout {fail "(timeout) bogus catch kind is disallowed"}
-}
-
-# Verify that we can set a generic catchpoint on shlib loads.  I.e., that
-# we can catch any shlib load, without specifying the name.
-#
-send_gdb "catch load\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .load <any library>.*$gdb_prompt $"\
-          {pass "set generic catch load"}
-  -re "$gdb_prompt $"\
-          {fail "set generic catch load"}
-  timeout {fail "(timeout) set generic catch load"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\] .loaded gdb.base/solib1.sl.*$gdb_prompt $"\
-          {pass "caught generic solib load"}
-  -re "$gdb_prompt $"\
-          {fail "caught generic solib load"}
-  timeout {fail "(timeout) caught generic solib load"}
-}
-
-# Set a breakpoint on the line following the shl_load call, and
-# continue.
-#
-# ??rehrauer: It appears that we can't just say "finish" from here;
-# GDB is getting confused by the dld's presense on the stack.
-#
-send_gdb "break 27\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "set break after shl_load"}
-  -re "$gdb_prompt $"\
-          {fail "set break after shl_load"}
-  timeout {fail "(timeout) set break after shl_load"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]*, main .. at .*solib.c:27.*$gdb_prompt $"\
-          {pass "continue after generic catch load"}
-  -re "$gdb_prompt $"\
-          {fail "continue after generic catch load"}
-  timeout {fail "(timeout) continue after generic catch load"}
-}
-
-# Step over the call to shl_findsym.
-#
-# ??rehrauer: In theory, since the call to shl_load asked for
-# immediate binding of the shlib's symbols, and since the
-# shlib's symbols should have been auto-loaded, we ought to
-# be able to set a breakpoint on solib_main now.  However,
-# that seems not to be the case.  Dunno why for sure; perhaps
-# the breakpoint wants to be set on an import stub in the
-# main program for solib_main?  There wouldn't be one, in
-# this case...
-# 
-send_gdb "next\n"
-gdb_expect {
-  -re "$gdb_prompt $"\
-          {pass "step over shl_findsym"}
-  timeout {fail "(timeout) step over shl_findsym"}
-}
-
-# Verify that we can catch an unload of any library.
-#
-send_gdb "catch unload\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .unload <any library>.*$gdb_prompt $"\
-          {pass "set generic catch unload"}
-  -re "$gdb_prompt $"\
-          {fail "set generic catch unload"}
-  timeout {fail "(timeout) set generic catch load"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\] .unloaded gdb.base/solib1.sl.*$gdb_prompt $"\
-          {pass "caught generic solib unload"}
-  -re "$gdb_prompt $"\
-          {fail "caught generic solib unload"}
-  timeout {fail "(timeout) caught generic solib unload"}
-}
-
-# Verify that we can catch a load of a specific library.  (Delete
-# all the other catchpoints first, so that the generic catchpoints
-# we've previously set don't trigger.)
-#
-send_gdb "delete\n"
-gdb_expect {
-  -re "Delete all breakpoints.*y or n.*"\
-          {send_gdb "y\n"
-           gdb_expect {
-             -re "$gdb_prompt $"\
-                     {pass "delete all catchpoints"}
-             timeout {fail "(timeout) delete all catchpoints"}
-           }
-          }
-  -re "$gdb_prompt $"\
-          {fail "delete all catchpoints"}
-  timeout {fail "(timeout) delete all catchpoints"}
-}
-
-send_gdb "catch load gdb.base/solib2.sl\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .load gdb.base/solib2.sl.*$gdb_prompt $"\
-          {pass "set specific catch load"}
-  -re "$gdb_prompt $"\
-          {fail "set specific catch load"}
-  timeout {fail "(timeout) set specific catch load"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\] .loaded gdb.base/solib2.sl.*$gdb_prompt $"\
-          {pass "caught specific solib load"}
-  -re "$gdb_prompt $"\
-          {fail "caught specific solib load"}
-  timeout {fail "(timeout) caught specific solib load"}
-}
-
-# Verify that we can catch an unload of a specific library.
-#
-send_gdb "catch unload gdb.base/solib2.sl\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .unload gdb.base/solib2.sl.*$gdb_prompt $"\
-          {pass "set specific catch unload"}
-  -re "$gdb_prompt $"\
-          {fail "set specific catch unload"}
-  timeout {fail "(timeout) set specific catch unload"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\] .unloaded gdb.base/solib2.sl.*$gdb_prompt $"\
-          {pass "caught specific solib unload"}
-  -re "$gdb_prompt $"\
-          {fail "caught specific solib unload"}
-  timeout {fail "(timeout) caught specific solib unload"}
-}
-
-# Verify that we can set a catchpoint on a specific library that
-# happens not to be loaded by the program.  And, that this catchpoint
-# won't trigger inappropriately when other shlibs are loaded.
-#
-send_gdb "break 55\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "set break on shl_unload"}
-  -re "$gdb_prompt $"\
-          {fail "set break on shl_unload"}
-  timeout {fail "(timeout) set break on shl_unload"}
-}
-
-send_gdb "break 58\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "set break after shl_unload"}
-  -re "$gdb_prompt $"\
-          {fail "set break after shl_unload"}
-  timeout {fail "(timeout) set break after shl_unload"}
-}
-
-send_gdb "catch load foobar.sl\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .load foobar.sl.*$gdb_prompt $"\
-          {pass "set specific catch load for nonloaded shlib"}
-  -re "$gdb_prompt $"\
-          {fail "set specific catch load for nonloaded shlib"}
-  timeout {fail "(timeout) set specific catch load for nonloaded shlib"}
-}
-
-send_gdb "catch unload foobar.sl\n"
-gdb_expect {
-  -re "Catchpoint \[0-9\]* .unload foobar.sl.*$gdb_prompt $"\
-          {pass "set specific catch unload for nonloaded shlib"}
-  -re "$gdb_prompt $"\
-          {fail "set specific catch unload for nonloaded shlib"}
-  timeout {fail "(timeout) set specific catch unload for nonloaded shlib"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]*.*$gdb_prompt $"\
-          {pass "specific catch load doesn't trigger inappropriately"}
-  -re "$gdb_prompt $"\
-          {fail "specific catch load doesn't trigger inappropriately"}
-  timeout {fail "(timeout) specific catch load doesn't trigger inappropriately"}
-}
-
-send_gdb "continue\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]*.*$gdb_prompt $"\
-          {pass "specific catch unload doesn't trigger inappropriately"}
-  -re "$gdb_prompt $"\
-          {fail "specific catch unload doesn't trigger inappropriately"}
-  timeout {fail "(timeout) specific catch unload doesn't trigger inappropriately"}
-}
-
-# ??rehrauer: There ought to be testpoints here that verify that
-# load/unload catchpoints can use conditionals, can be temporary,
-# self-disabling, etc etc.
-#
-
-gdb_exit
-
-#
-# Test stepping into an indirect call in a shared library.
-#
-
-gdb_start
-gdb_load ${binfile}_sl
-gdb_test "break main" ".*deferred. at .main..*" "break on main"
-gdb_test "run" ".*Breakpoint.*main.*solib.c.*" "hit breakpoint at main"
-gdb_test "break 45" "Breakpoint.*solib.c, line 45.*" "break on indirect call"
-gdb_test "continue" "Continuing.*solib.c:45.*" \
-	"continue to break on indirect call"
-gdb_test "step" "solib_main.*solib1.c:17.*return arg.arg.*" \
-	"step into indirect call from a shared library"
-gdb_exit
-
-return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-nodir.exp ./gdb/testsuite/gdb.base/solib-nodir.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-nodir.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-nodir.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,12 +36,12 @@ if { [get_compiler_info]
      || [gdb_gnu_strip_debug $binlibfile]
      || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != ""
      || [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $executable
-gdb_load_shlibs ${binlibfile}
+gdb_load_shlib ${binlibfile}
 
 gdb_test_no_output "set env LD_LIBRARY_PATH=:"
 gdb_test "cd ${binlibfiledir}" "Working directory [string_to_regexp ${binlibfiledir}]\\." "cd OBJDIR/${subdir}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap.exp ./gdb/testsuite/gdb.base/solib-overlap.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-overlap.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -70,18 +70,19 @@ foreach prelink_lib1 {0x40000000 0x50000
     if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib1} $lib_flags] != ""
 	 || [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""
 	 || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
-	untested "Could not compile ${binfile_lib1_test_msg}, ${binfile_lib2_test_msg} or ${binfile_test_msg}."
+	untested "failed to compile"
 	return -1
     }
 
     if {[catch "system \"prelink -N -r ${prelink_lib1} ${binfile_lib1}\""] != 0
 	|| [catch "system \"prelink -N -r ${prelink_lib2} ${binfile_lib2}\""] != 0} {
 	# Maybe we don't have prelink.
-	untested "Could not prelink ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
+	untested "could not prelink ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
 	return -1
     }
 
-    set testpid [spawn_wait_for_attach $binfile]
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     remote_exec build "mv -f ${binfile_lib1} ${binfile_lib1}-running"
     remote_exec build "mv -f ${binfile_lib2} ${binfile_lib2}-running"
@@ -91,14 +92,15 @@ foreach prelink_lib1 {0x40000000 0x50000
 
     if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib1} $lib_flags] != ""
 	 || [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""} {
-	untested "Could not recompile ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
-	remote_exec build "kill -9 ${testpid}"
+	untested "failed to compile shared library"
+	kill_wait_spawned_process $test_spawn_id
 	return -1
     }
 
     clean_restart ${binfile_base}
     # This testcase currently does not support remote targets.
-    # gdb_load_shlibs ${binfile_lib1} ${binfile_lib2}
+    # gdb_load_shlib ${binfile_lib1}
+    # gdb_load_shlib ${binfile_lib2}
 
     # Here we should get:
     # warning: .dynamic section for ".../solib-overlap-lib1.so" is not at the expected address (wrong library or version mismatch?)
@@ -123,5 +125,5 @@ foreach prelink_lib1 {0x40000000 0x50000
 
     sleep 5
 
-    remote_exec build "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap-lib.c ./gdb/testsuite/gdb.base/solib-overlap-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-overlap-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap-main.c ./gdb/testsuite/gdb.base/solib-overlap-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-overlap-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-overlap-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Free Software Foundation, Inc.
+/* Copyright 2009-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.c ./gdb/testsuite/gdb.base/solib-search.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-search.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.exp ./gdb/testsuite/gdb.base/solib-search.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-search.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,14 +17,14 @@
 # is properly reset when the path is changed.
 
 if {[is_remote target] || [skip_shlib_tests]} {
-    untested solib-search.exp
+    untested "skipping remote target and shared library tests"
     return -1
 }
 
 # This is required by gdb_compile_shlib.
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
-    untested solib-search.exp
+    untested "no compiler info"
     return 1
 }
 
@@ -69,7 +69,7 @@ if { [gdb_compile_shlib ${srcfile1_lib} 
      || [gdb_compile_shlib ${srcfile2_lib} ${wrong_binfile2_lib} $wrong_lib_flags] != ""
      || [gdb_compile_shlib ${srcfile1_lib} ${right_binfile1_lib} $right_lib_flags] != ""
      || [gdb_compile_shlib ${srcfile2_lib} ${right_binfile2_lib} $right_lib_flags] != "" } {
-    untested "Could not compile libs."
+    untested "failed to compile shared library"
     return -1
 }
 
@@ -78,14 +78,14 @@ remote_exec build "ln -sf ${right_lib_su
 remote_exec build "ln -sf ${right_lib_subdir}/${libname2}.so ${binfile2_lib}"
 if { [gdb_compile $srcdir/$subdir/${srcfile} ${binfile} \
 	  executable $bin_flags] != "" } {
-    untested "Could not compile $binfile."
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $testfile
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.h ./gdb/testsuite/gdb.base/solib-search.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-search.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search-lib1.c ./gdb/testsuite/gdb.base/solib-search-lib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search-lib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-search-lib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search-lib2.c ./gdb/testsuite/gdb.base/solib-search-lib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-search-lib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-search-lib2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol.exp ./gdb/testsuite/gdb.base/solib-symbol.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-symbol.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -36,7 +36,7 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
      || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
-  untested "Could not compile $binfile_lib or $binfile."
+  untested "failed to compile"
   return -1
 }
 
@@ -44,7 +44,7 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $binfile_lib
+gdb_load_shlib $binfile_lib
 
 # Set a breakpoint in the binary.
 gdb_test "br foo2" \
@@ -54,7 +54,7 @@ gdb_test "br foo2" \
 delete_breakpoints
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol-lib.c ./gdb/testsuite/gdb.base/solib-symbol-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-symbol-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol-main.c ./gdb/testsuite/gdb.base/solib-symbol-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-symbol-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-symbol-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-weak.c ./gdb/testsuite/gdb.base/solib-weak.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-weak.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-weak.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-weak.exp ./gdb/testsuite/gdb.base/solib-weak.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/solib-weak.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-weak.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2006-2015 Free Software Foundation, Inc.
+#   Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -94,7 +94,8 @@ proc do_test { lib1opts lib2opts lib1fir
     gdb_start
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load ${binfile}
-    gdb_load_shlibs $lib1 $lib2
+    gdb_load_shlib $lib1
+    gdb_load_shlib $lib2
 
     runto_main
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-dir.exp ./gdb/testsuite/gdb.base/source-dir.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-dir.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-dir.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-error.gdb ./gdb/testsuite/gdb.base/source-error.gdb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-error.gdb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-error.gdb	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.c ./gdb/testsuite/gdb.base/source-execution.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-execution.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.exp ./gdb/testsuite/gdb.base/source-execution.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-execution.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.gdb ./gdb/testsuite/gdb.base/source-execution.gdb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-execution.gdb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-execution.gdb	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source.exp ./gdb/testsuite/gdb.base/source.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-nofile.gdb ./gdb/testsuite/gdb.base/source-nofile.gdb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-nofile.gdb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-nofile.gdb	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-test.gdb ./gdb/testsuite/gdb.base/source-test.gdb
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/source-test.gdb	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/source-test.gdb	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.c ./gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp ./gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp.c ./gdb/testsuite/gdb.base/sss-bp-on-user-bp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sss-bp-on-user-bp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp ./gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stack-checking.c ./gdb/testsuite/gdb.base/stack-checking.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stack-checking.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stack-checking.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stack-checking.exp ./gdb/testsuite/gdb.base/stack-checking.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stack-checking.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stack-checking.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,14 +17,14 @@
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug additional_flags=-fstack-check nowarnings]] != "" } {
-     untested stack-checking.exp
+     untested "failed to compile"
      return -1
 }
 
 clean_restart ${binfile}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stale-infcall.c ./gdb/testsuite/gdb.base/stale-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stale-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stale-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stale-infcall.exp ./gdb/testsuite/gdb.base/stale-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stale-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stale-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -35,7 +35,7 @@ gdb_test_multiple "next" $test {
     }
     -re "( test-fail .*|\r\nCannot insert breakpoint 0\\.\r\n.*)\r\n$gdb_prompt $" {
 	xfail $test
-	untested "System lacks support for tracking longjmps"
+	untested "system lacks support for tracking longjmps"
 	return -1
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stap-probe.c ./gdb/testsuite/gdb.base/stap-probe.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stap-probe.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stap-probe.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,8 +53,13 @@ struct funcs
 static void
 m1 (void)
 {
+  /* m1 and m2 are equivalent, but because of some compiler
+     optimizations we have to make each of them unique.  This is why
+     we have this dummy variable here.  */
+  volatile int dummy = 0;
+
   if (TEST2)
-    STAP_PROBE (test, two);
+    STAP_PROBE1 (test, two, dummy);
 }
 
 static void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stap-probe.exp ./gdb/testsuite/gdb.base/stap-probe.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/stap-probe.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/stap-probe.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ standard_testfile
 proc stap_test {exec_name {arg ""}} {
     global testfile hex srcfile
 
-    if {[prepare_for_testing ${testfile}.exp ${exec_name} $srcfile \
+    if {[prepare_for_testing "failed to prepare" ${exec_name} $srcfile \
 	   [concat $arg debug]]} {
 	return -1
     }
@@ -96,7 +96,7 @@ proc stap_test {exec_name {arg ""}} {
 proc stap_test_no_debuginfo {exec_name {arg ""}} {
     global testfile hex
 
-    if {[prepare_for_testing ${testfile}.exp ${exec_name} ${testfile}.c \
+    if {[prepare_for_testing "failed to prepare" ${exec_name} ${testfile}.c \
 	   {$arg nodebug optimize=-O2}]} {
 	return -1
     }
@@ -161,7 +161,7 @@ proc stap_test_no_debuginfo {exec_name {
 
 with_test_prefix "without semaphore, not optimized" {
     if {[stap_test "stap-probe-nosem-noopt"] == -1} {
-	untested stap-probe.exp
+	untested "stap probe test failed"
 	  return -1
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/start.c ./gdb/testsuite/gdb.base/start.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/start.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/start.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/start.exp ./gdb/testsuite/gdb.base/start.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/start.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/start.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/statistics.exp ./gdb/testsuite/gdb.base/statistics.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/statistics.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/statistics.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-break.c ./gdb/testsuite/gdb.base/step-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-break.exp ./gdb/testsuite/gdb.base/step-break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-break.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,12 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-     untested step-break.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
      return -1
 }
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-bt.c ./gdb/testsuite/gdb.base/step-bt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-bt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-bt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-bt.exp ./gdb/testsuite/gdb.base/step-bt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-bt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-bt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.c ./gdb/testsuite/gdb.base/step-line.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-line.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test step/next in presence of #line directives.
-   Copyright (C) 2001-2015
+   Copyright (C) 2001-2017
    Free Software Foundation, Inc.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.exp ./gdb/testsuite/gdb.base/step-line.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-line.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2001-2015 Free Software Foundation, Inc.
+# Copyright 2001-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,13 +23,12 @@
 standard_testfile
 set linefile ${testfile}.inp
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.inp ./gdb/testsuite/gdb.base/step-line.inp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-line.inp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-line.inp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Test step/next in presence of #line directives
-# Copyright (C) 2001-2015
+# Copyright (C) 2001-2017
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-clone.c ./gdb/testsuite/gdb.base/step-over-clone.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-clone.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-clone.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,54 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <unistd.h>
+#include <sched.h>
+
+static void
+marker ()
+{}
+
+#define STACK_SIZE 0x1000
+
+static int
+clone_fn (void *unused)
+{
+  return 0;
+}
+
+int
+main (void)
+{
+  int i, pid;
+  unsigned char *stack[6];
+
+  for (i = 0; i < (sizeof (stack) / sizeof (stack[0])); i++)
+    stack[i] = malloc (STACK_SIZE);
+
+  for (i = 0; i < (sizeof (stack) / sizeof (stack[0])); i++)
+    {
+      pid = clone (clone_fn, stack[i] + STACK_SIZE, CLONE_FILES | CLONE_VM,
+		   NULL);
+    }
+
+  for (i = 0; i < (sizeof (stack) / sizeof (stack[0])); i++)
+    free (stack[i]);
+
+  marker ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-exit.c ./gdb/testsuite/gdb.base/step-over-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-exit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-exit.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+static void
+marker (void)
+{}
+
+int
+main (void)
+{
+  int  pid;
+
+  pid = fork ();
+  if (pid == 0) /* child */
+    {
+      _exit (0);
+    }
+  else
+    {
+    }
+
+  pid = fork ();
+  if (pid == 0) /* child */
+    {
+      marker ();
+      _exit (0);
+    }
+  else
+    {
+      marker ();
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-exit.exp ./gdb/testsuite/gdb.base/step-over-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-exit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-exit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,126 @@
+#   Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+# Test a thread is doing step-over a syscall instruction which is exit,
+# and GDBserver should cleanup its state of step-over properly.
+
+set syscall_insn ""
+
+# Define the syscall instruction for each target.
+
+if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
+    set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]"
+} elseif { [istarget "aarch64*-*-linux*"] || [istarget "arm*-*-linux*"] } {
+    set syscall_insn "\[ \t\](swi|svc)\[ \t\]"
+} else {
+    unsupported "unknown syscall instruction"
+    return -1
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+# Start with a fresh gdb.
+clean_restart ${testfile}
+if ![runto_main] {
+    fail "can't run to main"
+    return -1
+}
+
+gdb_test "set follow-fork-mode child"
+gdb_test "set detach-on-fork off"
+
+# Step 1, find the syscall instruction address.
+
+gdb_test "break _exit" "Breakpoint $decimal at .*"
+
+# Hit the breakpoint on _exit.  The address of syscall insn is recorded.
+
+gdb_test "continue" \
+    "Continuing\\..*Breakpoint $decimal.*_exit \\(.*\\).*" \
+    "continue to exit"
+
+gdb_test "display/i \$pc" ".*"
+
+# Single step until we see a syscall insn or we reach the
+# upper bound of loop iterations.
+set msg "find syscall insn in exit"
+set steps 0
+set max_steps 1000
+gdb_test_multiple "stepi" $msg {
+    -re ".*$syscall_insn.*$gdb_prompt $" {
+	pass $msg
+    }
+    -re "x/i .*=>.*\r\n$gdb_prompt $" {
+	incr steps
+	if {$steps == $max_steps} {
+	    fail $msg
+	} else {
+	    send_gdb "stepi\n"
+	    exp_continue
+	}
+    }
+}
+
+if {$steps == $max_steps} {
+    return
+}
+
+# Remove the display
+gdb_test_no_output "delete display 1"
+
+set syscall_insn_addr [get_hexadecimal_valueof "\$pc" "0"]
+
+gdb_test "continue" "exited normally.*" "continue to end, first time"
+gdb_test "inferior 1" ".*Switching to inferior 1.*" \
+    "switch back to inferior 1, first time"
+
+delete_breakpoints
+
+gdb_test "break marker"
+
+gdb_test "continue" "Continuing\\..*Breakpoint $decimal, .*" \
+    "continue to marker, first time"
+
+# Step 2, create a breakpoint which evaluates false, and force it
+# evaluated on the target side.
+
+set test "set breakpoint condition-evaluation target"
+gdb_test_multiple $test $test {
+    -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+	# Target doesn't support breakpoint condition evaluation
+	# on its side, but it is no harm to run the test.
+    }
+    -re "^$test\r\n$gdb_prompt $" {
+    }
+}
+
+gdb_test "break \*$syscall_insn_addr if main == 0" \
+    "Breakpoint \[0-9\]* at .*"
+
+# Resume the child process, and the step-over is being done.
+
+gdb_test "continue" "exited normally.*" "continue to end, second time"
+gdb_test "inferior 1" ".*Switching to inferior 1.*" \
+    "switch back to inferior 1, second time"
+
+# Switch back to the parent process, continue to the marker to
+# test GDBserver's state is still correct.
+
+gdb_test "continue" "Continuing\\..*Breakpoint $decimal, .*" \
+    "continue to marker, second time"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-fork.c ./gdb/testsuite/gdb.base/step-over-fork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-fork.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-fork.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,58 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+static void
+marker () {}
+
+int
+main (void)
+{
+  int  pid;
+
+  pid = fork ();
+  if (pid == 0) /* child */
+    {
+      exit (0); /* at exit */
+    }
+  else
+    {
+    }
+
+  pid = fork ();
+  if (pid == 0) /* child */
+    {
+      exit (0); /* at exit */
+    }
+  else
+    {
+    }
+
+  pid = fork ();
+  if (pid == 0) /* child */
+    {
+      exit (0); /* at exit */
+    }
+  else
+    {
+    }
+
+  marker ();
+
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-no-symbols.exp ./gdb/testsuite/gdb.base/step-over-no-symbols.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-no-symbols.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-no-symbols.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-syscall.exp ./gdb/testsuite/gdb.base/step-over-syscall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-syscall.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-syscall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,286 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2011-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set syscall_insn ""
+
+# Define the syscall instruction for each target.
+
+if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
+    set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]"
+} elseif { [istarget "aarch64*-*-linux*"] || [istarget "arm*-*-linux*"] } {
+    set syscall_insn "\[ \t\](swi|svc)\[ \t\]"
+} else {
+    return -1
+}
+
+proc check_pc_after_cross_syscall { syscall syscall_insn_next_addr } {
+    set syscall_insn_next_addr_found [get_hexadecimal_valueof "\$pc" "0"]
+
+    set test "single step over $syscall final pc"
+    if {$syscall_insn_next_addr != 0
+	&& $syscall_insn_next_addr == $syscall_insn_next_addr_found} {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+# Restart GDB and set up the test.  Return a list in which the first one
+# is the address of syscall instruction and the second one is the address
+# of the next instruction address of syscall instruction.  If anything
+# wrong, the two elements of list are -1.
+
+proc setup { syscall } {
+    global gdb_prompt syscall_insn
+
+    set testfile "step-over-$syscall"
+
+    clean_restart $testfile
+
+    if { ![runto main] } then {
+	fail "run to main ($syscall)"
+	return -1
+    }
+
+    # Delete the breakpoint on main.
+    gdb_test_no_output "delete break 1"
+
+    gdb_test_no_output "set displaced-stepping off"
+
+    gdb_test "break $syscall" "Breakpoint \[0-9\]* at .*"
+
+    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+	"continue to $syscall (1st time)"
+    # Hit the breakpoint on $syscall for the first time.  In this time,
+    # we will let PLT resolution done, and the number single steps we will
+    # do later will be reduced.
+
+    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+	"continue to $syscall (2nd time)"
+    # Hit the breakpoint on $syscall for the second time.  In this time,
+    # the address of syscall insn and next insn of syscall are recorded.
+
+    gdb_test "display/i \$pc" ".*"
+
+    # Single step until we see a syscall insn or we reach the
+    # upper bound of loop iterations.
+    set msg "find syscall insn in $syscall"
+    set steps 0
+    set max_steps 1000
+    gdb_test_multiple "stepi" $msg {
+	-re ".*$syscall_insn.*$gdb_prompt $" {
+	    pass $msg
+	}
+	-re "x/i .*=>.*\r\n$gdb_prompt $" {
+	    incr steps
+	    if {$steps == $max_steps} {
+		fail $msg
+	    } else {
+		send_gdb "stepi\n"
+		exp_continue
+	    }
+	}
+    }
+
+    if {$steps == $max_steps} {
+	return { -1, -1 }
+    }
+
+    set syscall_insn_addr [get_hexadecimal_valueof "\$pc" "0"]
+    if {[gdb_test "stepi" "x/i .*=>.*" "stepi $syscall insn"] != 0} {
+	return { -1, -1 }
+    }
+    return [list $syscall_insn_addr [get_hexadecimal_valueof "\$pc" "0"]]
+}
+
+proc step_over_syscall { syscall } {
+    with_test_prefix "$syscall" {
+	global syscall_insn
+	global gdb_prompt
+
+	set testfile "step-over-$syscall"
+
+	if [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] {
+	    untested "failed to compile"
+	    return -1
+	}
+
+	foreach_with_prefix displaced {"off" "on"} {
+	    if {$displaced == "on" && ![support_displaced_stepping]} {
+		continue
+	    }
+
+	    if { $displaced == "on" && $syscall == "clone" } {
+		# GDB doesn't support stepping over clone syscall with
+		# displaced stepping.
+		kfail "gdb/19675" "single step over clone"
+		continue
+	    }
+
+	    set ret [setup $syscall]
+
+	    set syscall_insn_addr [lindex $ret 0]
+	    set syscall_insn_next_addr [lindex $ret 1]
+	    if { $syscall_insn_addr == -1 } {
+		return -1
+	    }
+
+	    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+		"continue to $syscall (3rd time)"
+
+	    # Hit the breakpoint on $syscall for the third time.  In this time, we'll set
+	    # breakpoint on the syscall insn we recorded previously, and single step over it.
+
+	    set syscall_insn_bp 0
+	    gdb_test_multiple "break \*$syscall_insn_addr"  "break on syscall insn" {
+		-re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
+		    set syscall_insn_bp $expect_out(1,string)
+		    pass "break on syscall insns"
+		}
+	    }
+
+	    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
+		"continue to syscall insn $syscall"
+
+	    gdb_test_no_output "set displaced-stepping $displaced"
+
+	    # Check the address of next instruction of syscall.
+	    if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} {
+		return -1
+	    }
+	    check_pc_after_cross_syscall $syscall $syscall_insn_next_addr
+
+	    # Delete breakpoint syscall insns to avoid interference to other syscalls.
+	    delete_breakpoints
+
+	    gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
+	    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+		"continue to marker ($syscall)"
+	}
+    }
+}
+
+# Set a breakpoint with a condition that evals false on syscall
+# instruction.  In fact, it tests GDBserver steps over syscall
+# instruction.  SYSCALL is the syscall the program calls.
+# FOLLOW_FORK is either "parent" or "child".  DETACH_ON_FORK is
+# "on" or "off".
+
+proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
+    with_test_prefix "break cond on target : $syscall" {
+	set testfile "step-over-$syscall"
+
+	set ret [setup $syscall]
+
+	set syscall_insn_addr [lindex $ret 0]
+	set syscall_insn_next_addr [lindex $ret 1]
+	if { $syscall_insn_addr == -1 } {
+	    return -1
+	}
+
+	gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+	    "continue to $syscall"
+	# Delete breakpoint syscall insns to avoid interference with other syscalls.
+	delete_breakpoints
+
+	gdb_test "set follow-fork-mode $follow_fork"
+	gdb_test "set detach-on-fork $detach_on_fork"
+
+	# Create a breakpoint with a condition that evals false.
+	gdb_test "break \*$syscall_insn_addr if main == 0" \
+	    "Breakpoint \[0-9\]* at .*"
+
+	if { $syscall == "clone" } {
+	    # Create a breakpoint in the child with the condition that
+	    # evals false, so that GDBserver can get the event from the
+	    # child but GDB doesn't see it.  In this way, we don't have
+	    # to adjust the test flow for "clone".
+	    # This is a regression test for PR server/19736.  In this way,
+	    # we can test that GDBserver gets an event from the child and
+	    # set suspend count correctly while the parent is stepping over
+	    # the breakpoint.
+	    gdb_test "break clone_fn if main == 0"
+	}
+
+	if { $syscall == "clone" } {
+	    # follow-fork and detach-on-fork only make sense to
+	    # fork and vfork.
+	    gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
+	    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+		"continue to marker"
+	} else {
+	    if { $follow_fork == "child" } {
+		gdb_test "continue" "exited normally.*" "continue to end of inf 2"
+		if { $detach_on_fork == "off" } {
+		    gdb_test "inferior 1"
+		    gdb_test "break marker" "Breakpoint.*at.*"
+		    gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+			"continue to marker"
+		}
+	    } else {
+		gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
+		gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+		    "continue to marker"
+	    }
+	}
+    }
+}
+
+step_over_syscall "fork"
+step_over_syscall "vfork"
+step_over_syscall "clone"
+
+set testfile "step-over-fork"
+clean_restart $testfile
+if { ![runto main] } then {
+    fail "run to main"
+    return -1
+}
+
+set cond_bp_target 1
+
+set test "set breakpoint condition-evaluation target"
+gdb_test_multiple $test $test {
+    -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+	# Target doesn't support breakpoint condition
+	# evaluation on its side.
+	set cond_bp_target 0
+    }
+    -re "^$test\r\n$gdb_prompt $" {
+    }
+}
+
+if { $cond_bp_target } {
+
+    foreach_with_prefix detach-on-fork {"on" "off"} {
+	foreach_with_prefix follow-fork {"parent" "child"} {
+	    foreach syscall { "fork" "vfork" "clone" } {
+
+		if { $syscall == "vfork"
+		     && ${follow-fork} == "parent"
+		     && ${detach-on-fork} == "off" } {
+		    # Both vforked child process and parent process are
+		    # under GDB's control, but GDB follows the parent
+		    # process only, which can't be run until vforked child
+		    # finishes.  Skip the test in this scenario.
+		    continue
+		}
+		break_cond_on_syscall $syscall ${follow-fork} ${detach-on-fork}
+	    }
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-vfork.c ./gdb/testsuite/gdb.base/step-over-vfork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-over-vfork.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-over-vfork.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,70 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+static void
+marker () {}
+
+int
+main (void)
+{
+  int pid;
+
+  pid = vfork ();
+  if (pid == -1)
+    {
+      return 1;
+    }
+  else if (pid != 0)
+    {
+    }
+  else
+    {
+      _exit (0);
+    }
+
+  pid = vfork ();
+  if (pid == -1)
+    {
+      return 1;
+    }
+  else if (pid != 0)
+    {
+    }
+  else
+    {
+      _exit (0);
+    }
+
+  pid = vfork ();
+  if (pid == -1)
+    {
+      return 1;
+    }
+  else if (pid != 0)
+    {
+    }
+  else
+    {
+      _exit (0);
+    }
+
+  marker ();
+  return 0;
+
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-resume-infcall.c ./gdb/testsuite/gdb.base/step-resume-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-resume-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-resume-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-resume-infcall.exp ./gdb/testsuite/gdb.base/step-resume-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-resume-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-resume-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.c ./gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp ./gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,18 +73,6 @@ proc test {non_stop displaced always_ins
     }
 }
 
-# Wrapper for foreach that calls with_test_prefix on each iteration,
-# including the iterator's current value in the prefix.
-
-proc foreach_with_prefix {var list body} {
-    upvar 1 $var myvar
-    foreach myvar $list {
-	with_test_prefix "$var=$myvar" {
-	    uplevel 1 $body
-	}
-    }
-}
-
 foreach_with_prefix non_stop { "off" "on" } {
     foreach_with_prefix displaced_step { "off" "on" } {
 	foreach_with_prefix always_inserted { "off" "on" } {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-symless.c ./gdb/testsuite/gdb.base/step-symless.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-symless.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-symless.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-symless.exp ./gdb/testsuite/gdb.base/step-symless.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-symless.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-symless.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-test.exp ./gdb/testsuite/gdb.base/step-test.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/step-test.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/step-test.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,14 +20,14 @@ standard_testfile .c
 
 remote_exec build "rm -f ${binfile}"
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested step-test.exp
+     untested "failed to compile"
      return -1
 }
 
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
@@ -65,7 +65,7 @@ gdb_test "step" ".*${decimal}.*myglob.*"
 # to the restoration of the global pointer (which is a caller-save).
 # Similarly on MIPS PIC targets.
 set test "step out"
-if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
+if { [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
     gdb_test_multiple "finish" "$test" {
         -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" {
 	    pass "$test"
@@ -157,7 +157,7 @@ gdb_test_multiple "finish" "$test" {
 	# On IA-64, we end up on callee instead of on the following line due
 	# to the restoration of the global pointer.
 	# Similarly on MIPS PIC targets.
-	if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
+	if { [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
 	    test_i "$test" "stepi" \
 		".*${decimal}.*callee.*STEPI"  ".*${decimal}.*callee.*NEXTI"
 	} else {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/store.exp ./gdb/testsuite/gdb.base/store.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/store.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/store.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 standard_testfile
 set executable $testfile
 
-if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $executable $srcfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs2.exp ./gdb/testsuite/gdb.base/structs2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs2.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/structs2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/
     # built the second test case since we can't use prototypes
     warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
     if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
-	untested structs2.exp
+	untested "failed to compile"
 	return -1
     }
     set prototypes 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs3.c ./gdb/testsuite/gdb.base/structs3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs3.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/structs3.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs3.exp ./gdb/testsuite/gdb.base/structs3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs3.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/structs3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing structs3.exp "structs3" "" {debug}] } {
+if { [prepare_for_testing "failed to prepare" "structs3" "" {debug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs.c ./gdb/testsuite/gdb.base/structs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/structs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1996-2015 Free Software Foundation, Inc.
+   Copyright 1996-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs.exp ./gdb/testsuite/gdb.base/structs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/structs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/structs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1996-2015 Free Software Foundation, Inc.
+# Copyright 1996-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@
 # test.
 
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*"
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -37,6 +36,8 @@ if [get_compiler_info] {
     return -1
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 # Compile a variant of structs.c using TYPES to specify the type of
 # the first N struct elements (the remaining elements take the type of
 # the last TYPES field).  Run the compmiled program up to "main".
@@ -69,7 +70,7 @@ proc start_structs_test { types } {
 	# built the second test case since we can't use prototypes
 	warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
 	if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
-	    untested structs.exp
+	    untested "failed to compile"
 	    return -1
 	}
     }
@@ -485,9 +486,6 @@ proc test_struct_returns { n } {
 
 # NetBSD/PPC returns "unnatural" (3, 5, 6, 7) sized structs in memory.
 
-# d10v is weird. 5/6 byte structs go in memory.  2 or more char
-# structs go in memory.  Everything else is in a register!
-
 # Test every single char struct from 1..17 in size.  This is what the
 # original "structs" test was doing.
 
@@ -531,9 +529,7 @@ test_struct_returns 8
 
 # The approx size of each structure it is computed assumed that tc=1,
 # ts=2, ti=4, tl=4, tll=8, tf=4, td=8, tld=16, and that all fields are
-# naturally aligned.  Padding being added where needed.  Note that
-# these numbers are just approx, the d10v has ti=2, a 64-bit has has
-# tl=8.
+# naturally aligned.  Padding being added where needed.
 
 # Approx size: 2, 4, ...
 start_structs_test { ts }
@@ -569,25 +565,27 @@ test_struct_calls 1
 test_struct_calls 2
 test_struct_returns 1
 
-# Approx size: 4, 8, ...
-start_structs_test { tf }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_calls 3
-test_struct_returns 1
-test_struct_returns 2
-
-# Approx size: 8, 16, ...
-start_structs_test { td }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_returns 1
-
-# Approx size: 16, 32, ...
-start_structs_test { tld }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_returns 1
+if { !$skip_float_test } {
+    # Approx size: 4, 8, ...
+    start_structs_test { tf }
+    test_struct_calls 1
+    test_struct_calls 2
+    test_struct_calls 3
+    test_struct_returns 1
+    test_struct_returns 2
+
+    # Approx size: 8, 16, ...
+    start_structs_test { td }
+    test_struct_calls 1
+    test_struct_calls 2
+    test_struct_returns 1
+
+    # Approx size: 16, 32, ...
+    start_structs_test { tld }
+    test_struct_calls 1
+    test_struct_calls 2
+    test_struct_returns 1
+}
 
 # Approx size: 2+1=3, 4, ...
 start_structs_test { ts tc }
@@ -622,22 +620,24 @@ test_struct_returns 2
 start_structs_test { tll tc }
 test_struct_calls 2
 
-# Approx size: 4+1=5, 6, ...
-start_structs_test { tf tc }
-test_struct_calls 2
-test_struct_calls 3
-test_struct_calls 4
-test_struct_calls 5
-test_struct_calls 6
-test_struct_returns 2
-
-# Approx size: 8+1=9, 10, ...
-start_structs_test { td tc }
-test_struct_calls 2
-
-# Approx size: 16+1=17, 18, ...
-start_structs_test { tld tc }
-test_struct_calls 2
+if { !$skip_float_test } {
+    # Approx size: 4+1=5, 6, ...
+    start_structs_test { tf tc }
+    test_struct_calls 2
+    test_struct_calls 3
+    test_struct_calls 4
+    test_struct_calls 5
+    test_struct_calls 6
+    test_struct_returns 2
+
+    # Approx size: 8+1=9, 10, ...
+    start_structs_test { td tc }
+    test_struct_calls 2
+
+    # Approx size: 16+1=17, 18, ...
+    start_structs_test { tld tc }
+    test_struct_calls 2
+}
 
 # Approx size: (1+1)+2=4, 6, ...
 start_structs_test { tc ts }
@@ -666,32 +666,31 @@ test_struct_returns 2
 start_structs_test { tc tll }
 test_struct_calls 2
 
-# Approx size: (1+3)+4=8, 12, ...
-start_structs_test { tc tf }
-test_struct_calls 2
-test_struct_calls 3
-test_struct_calls 4
-
-# Approx size: (1+7)+8=16, 24, ...
-start_structs_test { tc td }
-test_struct_calls 2
-
-# Approx size: (1+15)+16=32, 48, ...
-start_structs_test { tc tld }
-test_struct_calls 2
-
-# Some float combinations
-
-# Approx size: 8+4=12, 16, ...
-# d10v: 4+4=8, 12, ...
-start_structs_test { td tf }
-test_struct_calls 2
-test_struct_returns 2
-
-# Approx size: (4+4)+8=16, 32, ...
-# d10v: 4+4=8, 12, ...
-start_structs_test { tf td }
-test_struct_calls 2
-test_struct_returns 2
-
+if { !$skip_float_test } {
+    # Approx size: (1+3)+4=8, 12, ...
+    start_structs_test { tc tf }
+    test_struct_calls 2
+    test_struct_calls 3
+    test_struct_calls 4
+
+    # Approx size: (1+7)+8=16, 24, ...
+    start_structs_test { tc td }
+    test_struct_calls 2
+
+    # Approx size: (1+15)+16=32, 48, ...
+    start_structs_test { tc tld }
+    test_struct_calls 2
+
+    # Some float combinations
+
+    # Approx size: 8+4=12, 16, ...
+    start_structs_test { td tf }
+    test_struct_calls 2
+    test_struct_returns 2
+
+    # Approx size: (4+4)+8=16, 32, ...
+    start_structs_test { tf td }
+    test_struct_calls 2
+    test_struct_returns 2
+}
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/subst.exp ./gdb/testsuite/gdb.base/subst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/subst.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/subst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symbol-without-target_section.c ./gdb/testsuite/gdb.base/symbol-without-target_section.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symbol-without-target_section.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symbol-without-target_section.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symbol-without-target_section.exp ./gdb/testsuite/gdb.base/symbol-without-target_section.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symbol-without-target_section.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symbol-without-target_section.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set binlibfile ${testfile}.x
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" \
 		  [standard_output_file ${binlibfile}] object {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {debug}] == -1} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file.exp ./gdb/testsuite/gdb.base/sym-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sym-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -65,18 +65,18 @@ if [get_compiler_info] {
 }
 
 if {[gdb_compile_shlib $libsrc $lib_so {debug}] != ""} {
-    untested ${testfile}
+    untested "failed to compile shared library"
     return
 }
 
-if {[prepare_for_testing $testfile  $binfile "$srcfile $srcfile2" $exec_opts]} {
+if {[prepare_for_testing "failed to prepare"  $binfile "$srcfile $srcfile2" $exec_opts]} {
     return
 }
 
-gdb_load_shlibs ${lib_so}
+gdb_load_shlib ${lib_so}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-lib.c ./gdb/testsuite/gdb.base/sym-file-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sym-file-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-loader.c ./gdb/testsuite/gdb.base/sym-file-loader.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-loader.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sym-file-loader.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-loader.h ./gdb/testsuite/gdb.base/sym-file-loader.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-loader.h	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sym-file-loader.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-main.c ./gdb/testsuite/gdb.base/sym-file-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/sym-file-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/sym-file-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order-1.c ./gdb/testsuite/gdb.base/symtab-search-order-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order-1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symtab-search-order-1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order.c ./gdb/testsuite/gdb.base/symtab-search-order.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symtab-search-order.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order.exp ./gdb/testsuite/gdb.base/symtab-search-order.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symtab-search-order.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,17 +33,17 @@ if [get_compiler_info] {
 if { [gdb_compile_shlib $lib1src $lib1 $lib_opts] != ""
      || [gdb_compile [list $srcfile $srcfile2] $binfile executable \
 	     $exec_opts] != ""} {
-    untested "Could not compile $lib1, or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
 # Start with a fresh gdb.
 
 clean_restart $binfile
-gdb_load_shlibs $lib1
+gdb_load_shlib $lib1
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order-shlib-1.c ./gdb/testsuite/gdb.base/symtab-search-order-shlib-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/symtab-search-order-shlib-1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/symtab-search-order-shlib-1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/term.c ./gdb/testsuite/gdb.base/term.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/term.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/term.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/term.exp ./gdb/testsuite/gdb.base/term.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/term.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/term.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1988-2015 Free Software Foundation, Inc.
+#   Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ if [is_remote target] then {
     continue
 }
 
-if { [prepare_for_testing term.exp term term.c] } {
+if { [prepare_for_testing "failed to prepare" term term.c] } {
     return -1
 }
 
@@ -28,7 +28,7 @@ gdb_test "info terminal" \
     "test info terminal"
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/testenv.c ./gdb/testsuite/gdb.base/testenv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/testenv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/testenv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/testenv.exp ./gdb/testsuite/gdb.base/testenv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/testenv.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/testenv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ standard_testfile .c
 # Compile binary
 # and start with a fresh gdb
 
-if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${binfile} ${srcfile}] } {
      return -1
 }
 
@@ -49,10 +49,10 @@ gdb_breakpoint  $bp_line
 # First test with no TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 0 variables starting with TEST_GDB.*" \
-  "Test no TEST_GDB var"
+  "test no TEST_GDB var"
 
 gdb_test_no_output "set env TEST_GDB_VAR1 test1" \
-  "Set TEST_GDB_VAR1"
+  "set TEST_GDB_VAR1"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -60,10 +60,10 @@ gdb_breakpoint  $bp_line
 # Second test with one TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with one TEST_GDB var"
+  "test with one TEST_GDB var"
 
 gdb_test_no_output "set env TEST_GDB_VAR2 test2" \
-  "Set TEST_GDB_VAR2"
+  "set TEST_GDB_VAR2"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -71,10 +71,10 @@ gdb_breakpoint  $bp_line
 # Third test with two TEST_GDB_VAR
 gdb_test "continue"  \
   ".*Program found 2 variables starting with TEST_GDB.*" \
-  "Test with two TEST_GDB var"
+  "test with two TEST_GDB var"
 
 gdb_test_no_output "unset env TEST_GDB_VAR1" \
-  "Unset TEST_GDB_VAR1"
+  "unset TEST_GDB_VAR1"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -83,7 +83,7 @@ gdb_breakpoint  $bp_line
 # with unset command.
 gdb_test "continue"  \
   ".*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with one TEST_GDB var, after unset"
+  "test with one TEST_GDB var, after unset"
 
 gdb_exit
 
@@ -99,14 +99,14 @@ if { ![runto_main] } {
 set bp_line [gdb_get_line_number "set breakpoint here"]
 gdb_breakpoint  $bp_line
 
-gdb_test "show env" ".*TEST_GDB_GLOBAL=.*" "Test passing TEST_GDB_GLOBAL to GDB"
+gdb_test "show env" ".*TEST_GDB_GLOBAL=.*" "test passing TEST_GDB_GLOBAL to GDB"
 # First test with only inherited TEST_GDB_GLOBAL
 gdb_test "continue" \
   ".*TEST_GDB_GLOBAL=Global environment value.*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with TEST_GDB_GLOBAL"
+  "test with TEST_GDB_GLOBAL"
 
 gdb_test_no_output "unset env TEST_GDB_GLOBAL" \
-  "Unset TEST_GDB_GLOBAL"
+  "unset TEST_GDB_GLOBAL"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -114,7 +114,7 @@ gdb_breakpoint  $bp_line
 # Second test with one TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 0 variables starting with TEST_GDB.*" \
-  "Test with TEST_GDB_GLOBAL unset"
+  "test with TEST_GDB_GLOBAL unset"
 
 gdb_exit
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/trace-commands.exp ./gdb/testsuite/gdb.base/trace-commands.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/trace-commands.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/trace-commands.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/tui-layout.c ./gdb/testsuite/gdb.base/tui-layout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/tui-layout.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/tui-layout.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,47 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define LONGER_NAME(x) x ## x
+#define LONGER(x) LONGER_NAME(x)
+#define LONGNAME1 d_this_identifier_of_32_chars_an
+#define LONGNAME2 LONGER (LONGER (LONGER (LONGER (LONGER (LONGNAME1)))))
+
+/* Construct a long identifier name.  If SHORT_IDENTIFIERS is set, limit
+   it to 1024 chars.  */
+
+#ifdef SHORT_IDENTIFIERS
+#define LONGNAME3 LONGNAME2
+#else
+#define LONGNAME3 LONGER (LONGER (LONGER (LONGER (LONGER (LONGNAME2)))))
+#endif
+
+void LONGNAME3 (void);
+
+int
+main ()
+{
+  LONGNAME3 ();
+  return 0;
+}
+
+/* Function with a long name.  Placing it after main makes it more likely
+   to be shown in the disassembly window on startup.  */
+
+void
+LONGNAME3 (void)
+{
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/tui-layout.exp ./gdb/testsuite/gdb.base/tui-layout.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/tui-layout.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/tui-layout.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,12 +13,23 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-standard_testfile start.c
+standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
-    return -1
+set ccopts {debug quiet}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
+	  executable $ccopts] != "" } {
+    # Maybe the compiler can't handle arbitrarily long identfier names.
+    # Try with a shorter version.
+    lappend ccopts "additional_flags=-DSHORT_IDENTIFIERS"
+    if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
+	      executable $ccopts] != "" } {
+	untested "compile"
+	return -1
+    }
 }
 
+clean_restart "$binfile"
+
 if {[skip_tui_tests]} {
     # TUI support is disabled.  Check for error message.
     gdb_test "layout asm" "Undefined command: \"layout\".  Try \"help\"."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/twice.exp ./gdb/testsuite/gdb.base/twice.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/twice.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/twice.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1997-2015 Free Software Foundation, Inc.
+#   Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ close $fileid
 gdb_remote_download host ${srcdir}/${subdir}/twice.c
 
 if  { [gdb_compile $local_srcfile "${binfile}" executable $options] != "" } {
-     untested twice.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque.exp ./gdb/testsuite/gdb.base/type-opaque.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/type-opaque.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,10 +40,10 @@ if { [gdb_compile_shlib $libsrc $libobj 
 }
 
 clean_restart ${binfile}
-gdb_load_shlibs ${libobj}
+gdb_load_shlib ${libobj}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque-lib.c ./gdb/testsuite/gdb.base/type-opaque-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque-lib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/type-opaque-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test resolving of an opaque type from the loaded shared library.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque-main.c ./gdb/testsuite/gdb.base/type-opaque-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/type-opaque-main.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/type-opaque-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test resolving of an opaque type from the loaded shared library.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ui-redirect.exp ./gdb/testsuite/gdb.base/ui-redirect.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/ui-redirect.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/ui-redirect.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [prepare_for_testing ui-redirect.exp ui-redirect start.c] } {
+if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unload.c ./gdb/testsuite/gdb.base/unload.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unload.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unload.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unload.exp ./gdb/testsuite/gdb.base/unload.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unload.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unload.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2003-2015 Free Software Foundation, Inc.
+#   Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ set exec_opts [list debug shlib_load add
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""
      || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
-    untested "Couldn't compile $libsrc or $libsrc2 or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -62,7 +62,8 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $lib_sl $lib_sl2
+gdb_load_shlib $lib_sl
+gdb_load_shlib $lib_sl2
 
 #
 # Test setting a breakpoint in a dynamically loaded library which is
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unloadshr2.c ./gdb/testsuite/gdb.base/unloadshr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unloadshr2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unloadshr2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unloadshr.c ./gdb/testsuite/gdb.base/unloadshr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unloadshr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unloadshr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/until.exp ./gdb/testsuite/gdb.base/until.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/until.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/until.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 # until.exp -- Expect script to test 'until' in gdb
 
 set srcfile break.c
-if { [prepare_for_testing until.exp "until" {break.c break1.c} {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" "until" {break.c break1.c} {debug nowarnings}] } {
     return -1
 }
 
@@ -26,7 +26,7 @@ set bp_location20 [gdb_get_line_number "
 set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/until-nodebug.exp ./gdb/testsuite/gdb.base/until-nodebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/until-nodebug.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/until-nodebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unwindonsignal.c ./gdb/testsuite/gdb.base/unwindonsignal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unwindonsignal.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unwindonsignal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,7 +17,6 @@
 
 /* Support program for testing unwindonsignal.  */
 
-#include <stdio.h>
 #include <signal.h>
 #include <unistd.h>
 
@@ -26,8 +25,6 @@ gen_signal ()
 {
   /* According to sigall.exp, SIGABRT is always supported.  */
   kill (getpid (), SIGABRT);
-  /* If we get here we couldn't generate a signal, tell dejagnu.  */
-  printf ("no signal\n");
 }
 
 /* Easy place to set a breakpoint.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unwindonsignal.exp ./gdb/testsuite/gdb.base/unwindonsignal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/unwindonsignal.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/unwindonsignal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,11 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if [target_info exists gdb,noinferiorio] {
-    verbose "Skipping unwindonsignal.exp because of no fileio capabilities."
-    continue
-}
-
 if [target_info exists gdb,nosignals] {
     verbose "Skipping unwindonsignal.exp because of nosignals."
     continue
@@ -27,20 +22,18 @@ if [target_info exists gdb,nosignals] {
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -58,15 +51,10 @@ gdb_test "show unwindonsignal" \
 
 # Call function (causing the program to get a signal), and see if gdb handles
 # it properly.
-gdb_test_multiple "call gen_signal ()" \
-	"unwindonsignal, inferior function call signaled" {
-    -re "\[\r\n\]*no signal\[\r\n\]+$gdb_prompt $" {
-	unsupported "unwindonsignal, inferior function call signaled"
-	return 0
-    }
-    -re "\[\r\n\]*The program being debugged was signaled.*\[\r\n\]+$gdb_prompt $" {
-	pass "unwindonsignal, inferior function call signaled"
-    }
+if {[gdb_test "call gen_signal ()"  \
+	 "\[\r\n\]*The program being debugged was signaled.*" \
+	 "unwindonsignal, inferior function call signaled"] != 0} {
+    return 0
 }
 
 # Verify the stack got unwound.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-db-attach.c ./gdb/testsuite/gdb.base/valgrind-db-attach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-db-attach.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-db-attach.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-db-attach.exp ./gdb/testsuite/gdb.base/valgrind-db-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-db-attach.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-db-attach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-disp-step.c ./gdb/testsuite/gdb.base/valgrind-disp-step.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-disp-step.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-disp-step.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static int
+foo (void)
+{
+}
+
+int
+main (void)
+{
+  foo (); /* stop 0 */
+  foo (); /* stop 1 */
+  foo (); /* stop 2 */
+  foo (); /* stop 3 */
+  foo (); /* stop 4 */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-disp-step.exp ./gdb/testsuite/gdb.base/valgrind-disp-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-disp-step.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-disp-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,136 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Step over breakpoints with displaced stepping on, against Valgrind.
+# We can't really use displaced stepping with Valgrind, so what this
+# really tests is that GDB falls back to in-line stepping
+# automatically instead of getting stuck or crashing.
+
+if [is_remote target] {
+    # The test always runs locally.
+    return 0
+}
+
+standard_testfile .c
+if {[build_executable "failed to build" $testfile $srcfile {debug}] == -1} {
+    return -1
+}
+
+set test "spawn valgrind"
+set cmd "valgrind --vgdb-error=0 $binfile"
+set res [remote_spawn host $cmd]
+if { $res < 0 || $res == "" } {
+    verbose -log "Spawning $cmd failed."
+    unsupported $test
+    return -1
+}
+pass $test
+# Declare GDB now as running.
+set gdb_spawn_id $res
+
+# GDB started by vgdb stops already after the startup is executed, like with
+# non-extended gdbserver.  It is also not correct to run/attach the inferior.
+set use_gdb_stub 1
+
+set test "valgrind started"
+# The trailing '.' differs for different memcheck versions.
+gdb_test_multiple "" $test {
+    -re "Memcheck, a memory error detector\\.?\r\n" {
+	pass $test
+    }
+    -re "valgrind: failed to start tool 'memcheck' for platform '.*': No such file or directory" {
+	unsupported $test
+	return -1
+    }
+    -re "valgrind: wrong ELF executable class" {
+	unsupported $test
+	return -1
+    }
+    -re "command not found" {
+	# The spawn succeeded, but then valgrind was not found - e.g. if
+	# we spawned SSH to a remote system.
+	unsupported $test
+	return -1
+    }
+    -re "valgrind: Bad option.*--vgdb-error=0" {
+	# valgrind is not >= 3.7.0.
+	unsupported $test
+	return -1
+    }
+}
+
+set test "vgdb prompt"
+# The trailing '.' differs for different memcheck versions.
+gdb_test_multiple "" $test {
+    -re "  (target remote | \[^\r\n\]*/vgdb \[^\r\n\]*)\r\n" {
+	set vgdbcmd $expect_out(1,string)
+	pass $test
+    }
+}
+
+# Do not kill valgrind.
+set valgrind_pid [exp_pid -i [board_info host fileid]]
+unset gdb_spawn_id
+set board [host_info name]
+unset_board_info fileid
+
+clean_restart $testfile
+
+# Make sure we're disconnected, in case we're testing with the
+# native-extended-gdbserver board, where gdb_start/gdb_load spawn
+# gdbserver and connect to it.
+gdb_test "disconnect" ".*"
+
+gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb"
+
+gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*"
+
+gdb_test_no_output "set displaced-stepping off"
+gdb_breakpoint "main" "breakpoint at main"
+gdb_test "continue" " stop 0 .*" "continue to main"
+delete_breakpoints
+
+set curr_stop 0
+foreach displaced { "off" "on" } {
+    with_test_prefix "displaced $displaced" {
+
+	gdb_test_no_output "set displaced-stepping $displaced"
+
+	foreach go { "once" "twice" } {
+	    with_test_prefix $go {
+		gdb_test "break" "Breakpoint .* at .*" "set breakpoint"
+
+		# Whether we should see a warning.
+		set should_warn [expr {$go == "once" && $displaced == "on"}]
+
+		incr curr_stop
+
+		set msg "step over breakpoint"
+		set pattern " stop $curr_stop .*$gdb_prompt $"
+		gdb_test_multiple "next" $msg {
+		    -re "warning: disabling displaced stepping.*$pattern" {
+			gdb_assert $should_warn $msg
+		    }
+		    -re "$pattern" {
+			gdb_assert !$should_warn $msg
+		    }
+		}
+	    }
+	}
+    }
+}
+
+# Only if valgrind got stuck.
+remote_exec host "kill -9 ${valgrind_pid}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-infcall.c ./gdb/testsuite/gdb.base/valgrind-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-infcall.exp ./gdb/testsuite/gdb.base/valgrind-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/valgrind-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/valgrind-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -76,13 +76,18 @@ gdb_test_multiple "" $test {
 }
 
 # Do not kill valgrind.
-set valgrind_pid [exp_pid -i [board_info host fileid]]
+set valgrind_spawn_id [board_info host fileid]
 unset gdb_spawn_id
 set board [host_info name]
 unset_board_info fileid
 
 clean_restart $testfile
 
+# Make sure we're disconnected, in case we're testing with the
+# native-extended-gdbserver board, where gdb_start/gdb_load spawn
+# gdbserver and connect to it.
+gdb_test "disconnect" ".*"
+
 gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb"
 
 gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*"
@@ -99,13 +104,13 @@ while {$loop && $continue_count < 100} {
 	-re "Remote connection closed.*\r\n$gdb_prompt $" {
 	    fail "$test (remote connection closed)"
 	    # Only if valgrind got stuck.
-	    remote_exec host "kill -9 ${valgrind_pid}"
+	    kill_wait_spawned_process $valgrind_spawn_id
 	    return -1
 	}
 	-re "The program is not being run\\.\r\n$gdb_prompt $" {
 	    fail "$test (valgrind vgdb has terminated)"
 	    # Only if valgrind got stuck.
-	    remote_exec host "kill -9 ${valgrind_pid}"
+	    kill_wait_spawned_process $valgrind_spawn_id
 	    return -1
 	}
 	-re "\r\n$gdb_prompt $" {
@@ -126,4 +131,4 @@ gdb_test_multiple $test $test {
 }
 
 # Only if valgrind got stuck.
-remote_exec host "kill -9 ${valgrind_pid}"
+kill_wait_spawned_process $valgrind_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/value-double-free.c ./gdb/testsuite/gdb.base/value-double-free.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/value-double-free.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/value-double-free.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/value-double-free.exp ./gdb/testsuite/gdb.base/value-double-free.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/value-double-free.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/value-double-free.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/varargs.c ./gdb/testsuite/gdb.base/varargs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/varargs.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/varargs.c	2017-03-06 01:49:07.000000000 +0000
@@ -8,6 +8,8 @@
 #include <stdio.h>
 #include <stdarg.h>
 
+#include "../lib/unbuffer_output.c"
+
 int find_max1(int, ...);
 int find_max2(int, int, ...);
 double find_max_double(int, double, ...);
@@ -45,7 +47,9 @@ long double _Complex ldc4 = 4.0L + 4.0Li
 
 #endif
 
-int main() {
+int
+test (void)
+{
   c = -1;
   uc = 1;
   s = -2;
@@ -70,6 +74,13 @@ int main() {
   return 0;
 }
 
+int
+main (void)
+{
+  gdb_unbuffer_output ();
+  test ();
+}
+
 /* Integer varargs, 1 declared arg */
 
 int find_max1(int num_vals, ...) {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/varargs.exp ./gdb/testsuite/gdb.base/varargs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/varargs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/varargs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,19 +37,17 @@ if [get_compiler_info] {
     return -1
 }
 
+set skip_float_test [gdb_skip_float_test]
+
 set additional_flags {debug}
 if [support_complex_tests] {
     lappend additional_flags "additional_flags=-DTEST_COMPLEX"
 }
 
-if {$hp_cc_compiler} {
-    lappend additional_flags "additional_flags=-Ae"
-}
-
 # build the first test case
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	   executable ${additional_flags}] != "" } {
-     untested varargs.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -66,43 +64,35 @@ if [gdb_skip_stdio_test "varargs.exp"] {
     return
 }
 
-if ![runto_main] then {
+if ![runto test] then {
     perror "couldn't run to breakpoint"
     continue
 }
 
-if { $hp_aCC_compiler } {
-    # When compiled w/ aCC we need to disable overload resolution
-    # for command line calls.
-    # We need it for vararg calls since the aCC compiler gives us no
-    # information about the undeclared arguments, or even that there 
-    # _are_ undeclared arguments. As far as gdb is concerned it only
-    # knows about the declared arguments. So we need to force the call
-    # even though the overload resolution mechanism says that the types
-    # don't match. 
-    # - guo
-    gdb_test_no_output "set overload-resolution 0"
-}
-
-gdb_test "print find_max1(5,1,2,3,4,5)" \
-    "find_max\\(5, 1, 2, 3, 4, 5\\) returns 5\[ \r\n\]+.\[0-9\]+ = 5" \
+gdb_test_stdio "print find_max1(5,1,2,3,4,5)" \
+    "find_max\\(5, 1, 2, 3, 4, 5\\) returns 5\[ \r\n\]+" \
+    ".\[0-9\]+ = 5" \
     "print find_max1(5,1,2,3,4,5)"
 
-gdb_test "print find_max1(1,3)" \
-    ".*find_max\\(1, 3\\) returns 3\[ \r\n\]+.\[0-9\]+ = 3" \
+gdb_test_stdio "print find_max1(1,3)" \
+    "find_max\\(1, 3\\) returns 3\[ \r\n\]+" \
+    ".\[0-9\]+ = 3" \
     "print find_max1(1,3)"
 
-gdb_test "print find_max1(10,1,2,3,4,5,6,7,8,29,0)" \
-    ".*find_max\\(10, 1, 2, 3, 4, 5, 6, 7, 8, 29, 0\\) returns 29\[ \r\n\]+.\[0-9\]+ = 29" \
+gdb_test_stdio "print find_max1(10,1,2,3,4,5,6,7,8,29,0)" \
+    "find_max\\(10, 1, 2, 3, 4, 5, 6, 7, 8, 29, 0\\) returns 29\[ \r\n\]+" \
+    ".\[0-9\]+ = 29" \
     "print find_max1(10,1,2,3,4,5,6,7,8,29,0)"
 
-gdb_test "print find_max2(3,1,2,3)" \
-    ".*find_max\\(3, 1, 2, 3\\) returns 3\[ \r\n\]+.\[0-9\]+ = 3" \
+gdb_test_stdio "print find_max2(3,1,2,3)" \
+    "find_max\\(3, 1, 2, 3\\) returns 3\[ \r\n\]+" \
+    ".\[0-9\]+ = 3" \
     "print find_max2(3,1,2,3)"
 
-if {![target_info exists gdb,skip_float_tests]} {
-    gdb_test "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" \
-	".*find_max\\(.*\\) returns 17\\.000000\[ \r\n\]+.\[0-9\]+ = 17" \
+if {!$skip_float_test} {
+    gdb_test_stdio "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" \
+	"find_max\\(.*\\) returns 17\\.000000\[ \r\n\]+" \
+	".\[0-9\]+ = 17" \
 	"print find_max_double(5,1.0,17.0,2.0,3.0,4.0)"
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vdso-warning.c ./gdb/testsuite/gdb.base/vdso-warning.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vdso-warning.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vdso-warning.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vdso-warning.exp ./gdb/testsuite/gdb.base/vdso-warning.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vdso-warning.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vdso-warning.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,42 +13,70 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Test that on Linux, we don't warn about not finding the vDSO.  E.g.:
+#
+#   warning: Could not load shared library symbols for linux-vdso.so.1.
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
     return -1
 }
 
-gdb_breakpoint "main"
+with_test_prefix "setup" {
+    gdb_breakpoint "main"
 
-# At least some versions of Fedora/RHEL glibc have local patches that
-# hide the vDSO.  This lines re-exposes it.  See PR libc/13097,
-# comment 2.  There's no support for passing environment variables in
-# the remote protocol, but that's OK -- if we're testing against a
-# glibc that doesn't list the vDSO without this, the test should still
-# pass.
-gdb_test_no_output "set environment LD_DEBUG=unused"
-
-gdb_run_cmd
-
-set test "stop without warning"
-gdb_test_multiple "" $test {
-    -re "Could not load shared library symbols .*\r\n$gdb_prompt $" {
-	fail $test
+    # At least some versions of Fedora/RHEL glibc have local patches that
+    # hide the vDSO.  This lines re-exposes it.  See PR libc/13097,
+    # comment 2.  There's no support for passing environment variables in
+    # the remote protocol, but that's OK -- if we're testing against a
+    # glibc that doesn't list the vDSO without this, the test should still
+    # pass.
+    gdb_test_no_output "set environment LD_DEBUG=unused"
+}
+
+proc test_no_vdso {command} {
+    global srcfile
+    global gdb_prompt
+
+    set message "startup"
+    gdb_test_multiple "$command" $message {
+	-re "Could not load shared library symbols .*\r\n$gdb_prompt $" {
+	    fail $message
+	}
+	-re "main \\(\\) at .*$srcfile.*\r\n$gdb_prompt $" {
+	    pass $message
+	}
     }
-    -re "\r\nBreakpoint \[0-9\]+, main .*\r\n$gdb_prompt $" {
-	pass $test
+
+    # Extra testing in case the warning changes and we miss updating
+    # the above.
+    set test "no vdso without symbols is listed"
+    gdb_test_multiple "info shared" $test {
+	-re "No\[^\r\n\]+linux-(vdso|gate).*$gdb_prompt $" {
+	    fail $test
+	}
+	-re "$gdb_prompt $" {
+	    pass $test
+	}
     }
 }
 
-# Extra testing in case the warning changes and we miss updating the
-# above.
-set test "no vdso without symbols is listed"
-gdb_test_multiple "info shared" $test {
-    -re "No\[^\r\n\]+linux-(vdso|gate).*$gdb_prompt $" {
-	fail $test
-    }
-    -re "$gdb_prompt $" {
-	pass $test
+# First, try a live process.
+with_test_prefix "run" {
+    gdb_run_cmd
+    test_no_vdso ""
+}
+
+# Now, dump a core, and reload it.
+with_test_prefix "core" {
+    set corefile [standard_output_file $testfile.core]
+    set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
+    if {!$core_supported} {
+	return -1
     }
+
+    clean_restart ${testfile}
+
+    test_no_vdso "core-file $corefile"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vforked-prog.c ./gdb/testsuite/gdb.base/vforked-prog.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vforked-prog.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vforked-prog.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997-2015 Free Software Foundation, Inc.
+   Copyright 1997-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-datatypes.c ./gdb/testsuite/gdb.base/vla-datatypes.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-datatypes.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-datatypes.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-datatypes.exp ./gdb/testsuite/gdb.base/vla-datatypes.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-datatypes.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-datatypes.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-ptr.c ./gdb/testsuite/gdb.base/vla-ptr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-ptr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-ptr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-ptr.exp ./gdb/testsuite/gdb.base/vla-ptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-ptr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-ptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-sideeffect.c ./gdb/testsuite/gdb.base/vla-sideeffect.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-sideeffect.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-sideeffect.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-sideeffect.exp ./gdb/testsuite/gdb.base/vla-sideeffect.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-sideeffect.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-sideeffect.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub.c ./gdb/testsuite/gdb.base/vla-stub.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-stub.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub-define.c ./gdb/testsuite/gdb.base/vla-stub-define.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub-define.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-stub-define.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub.exp ./gdb/testsuite/gdb.base/vla-stub.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/vla-stub.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/vla-stub.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/volatile.exp ./gdb/testsuite/gdb.base/volatile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/volatile.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/volatile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@
 
 # Use the same test program constvars.c.
 
-if { [prepare_for_testing volatile.exp volatile constvars.c] } {
+if { [prepare_for_testing "failed to prepare" volatile constvars.c] } {
     return -1
 }
 
@@ -56,7 +56,6 @@ if ![runto_main] then {
 get_debug_format
 
 # Many tests xfail with gcc 2 -gstabs+.
-# TODO: check out the hp side of this.
 
 proc local_compiler_xfail_check { } {
     if { [test_compiler_info gcc-2-*] } then {
@@ -65,11 +64,6 @@ proc local_compiler_xfail_check { } {
 	    setup_xfail "*-*-*" 
 	}
     }
-
-    global hp_cc_compiler
-    if { $hp_cc_compiler } {
-	setup_xfail "hppa*-*-hpux*"
-    }
 }
 
 # A few tests still xfail with gcc 3 -gstabs+ and gcc 4 -gstabs+.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-bitfields.c ./gdb/testsuite/gdb.base/watch-bitfields.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-bitfields.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-bitfields.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-bitfields.exp ./gdb/testsuite/gdb.base/watch-bitfields.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-bitfields.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-bitfields.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond.c ./gdb/testsuite/gdb.base/watch-cond.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-cond.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond.exp ./gdb/testsuite/gdb.base/watch-cond.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-cond.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -30,7 +29,7 @@ if [target_info exists gdb,no_hardware_w
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
@@ -50,7 +49,7 @@ if [target_info exists gdb,no_hardware_w
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
@@ -70,7 +69,7 @@ if [target_info exists gdb,no_hardware_w
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond-infcall.c ./gdb/testsuite/gdb.base/watch-cond-infcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond-infcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-cond-infcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond-infcall.exp ./gdb/testsuite/gdb.base/watch-cond-infcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-cond-infcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-cond-infcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 standard_testfile
 
 if { [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-non-mem.c ./gdb/testsuite/gdb.base/watch-non-mem.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-non-mem.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-non-mem.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-non-mem.exp ./gdb/testsuite/gdb.base/watch-non-mem.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-non-mem.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-non-mem.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,12 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone.c ./gdb/testsuite/gdb.base/watchpoint-cond-gone.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-cond-gone.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone.exp ./gdb/testsuite/gdb.base/watchpoint-cond-gone.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-cond-gone.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,9 +19,8 @@ standard_testfile .c watchpoint-cond-gon
 # Stepping into a dynamic function trampoline or stepping out of MAIN may work
 # but it is not a reliable FAIL case.
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug $srcfile debug $srcfile2 {}]]} {
-    untested $testfile.exp
     return -1
 }
 
@@ -36,11 +35,11 @@ gdb_breakpoint [gdb_get_line_number "wat
 gdb_continue_to_breakpoint "Place to set the watchpoint"
 
 # The condition `c == 30' is the subject being tested.
-gdb_test "watch c if c == 30" "atchpoint \[0-9\]*.*" "Place the watchpoint"
+gdb_test "watch c if c == 30" "atchpoint \[0-9\]*.*" "place the watchpoint"
 
 # We may stay either in the function itself or only at the first instruction of
 # its caller depending on the epilogue unwinder (or valid epilogue CFI) presence.
 
 gdb_test "finish" \
 	 "Watchpoint .* deleted because the program has left the block in.*which its expression is valid..*in (\\.?jumper|func).*" \
-	 "Catch the no longer valid watchpoint"
+	 "catch the no longer valid watchpoint"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c ./gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-delete.c ./gdb/testsuite/gdb.base/watchpoint-delete.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-delete.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-delete.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-delete.exp ./gdb/testsuite/gdb.base/watchpoint-delete.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-delete.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-delete.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint.exp ./gdb/testsuite/gdb.base/watchpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if [get_compiler_info] {
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested watchpoint.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -146,7 +146,7 @@ Continuing.*\[Ww\]atchpoint.*ival3.*Old 
     }
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "Watchpoint hit count is 1"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "watchpoint hit count is 1"
 
     gdb_test_no_output "delete \$func1_breakpoint_number"
 
@@ -154,19 +154,19 @@ Continuing.*\[Ww\]atchpoint.*ival3.*Old 
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = 1.*ival3 = count; ival4 = count;.*" "watchpoint hit, second time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 2 times.*" "Watchpoint hit count is 2"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 2 times.*" "watchpoint hit count is 2"
 
     # Continue until the next change, from 1 to 2.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 2.*ival3 = count; ival4 = count;.*" "watchpoint hit, third time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 3 times.*" "Watchpoint hit count is 3"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 3 times.*" "watchpoint hit count is 3"
     
     # Continue until the next change, from 2 to 3.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 2.*New value = 3.*ival3 = count; ival4 = count;.*" "watchpoint hit, fourth time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 4 times.*" "Watchpoint hit count is 4"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 4 times.*" "watchpoint hit count is 4"
 
     # Continue until the next change, from 3 to 4.
     # Note that this one is outside the loop.
@@ -174,7 +174,7 @@ Continuing.*\[Ww\]atchpoint.*ival3.*Old 
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 3.*New value = 4.*ival3 = count; ival4 = count;.*" "watchpoint hit, fifth time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 5 times.*" "Watchpoint hit count is 5"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 5 times.*" "watchpoint hit count is 5"
 
     # Continue until we hit the finishing marker function.
     # Make sure we hit no more watchpoints.
@@ -347,7 +347,7 @@ proc test_watchpoint_triggered_in_syscal
     # Run until we get to the first marker function.
     set x 0
     set y 0
-    set testname "Watch buffer passed to read syscall"
+    set testname "watch buffer passed to read syscall"
     if [runto marker2] then {
 	gdb_test "watch buf\[0\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[0\\\]"
 	gdb_test "watch buf\[1\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[1\\\]"
@@ -432,7 +432,7 @@ proc test_complex_watchpoint {} {
 	gdb_test "watch ptr1->val" ".*\[Ww\]atchpoint \[0-9\]*: ptr1->val"
 	gdb_test "break marker5" ".*Breakpoint.*"
 
-	gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ptr1->val.*Old value = 1.*New value = 2.*" "Test complex watchpoint"
+	gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ptr1->val.*Old value = 1.*New value = 2.*" "test complex watchpoint"
 
 	# Continue until we hit the marker5 function.
 	# Make sure we hit no more watchpoints.
@@ -464,12 +464,11 @@ proc test_complex_watchpoint {} {
 		pass $test
 	    }
 	    -re "can't compute CFA for this frame.*\r\n$gdb_prompt $" {
-		global compiler_info no_hw
+		global no_hw
 
 		# GCC < 4.5.0 does not get LOCATIONS_VALID set by dwarf2read.c.
 		# Therefore epilogue unwinder gets applied which is
 		# incompatible with dwarf2_frame_cfa.
-		verbose -log "compiler_info: $compiler_info"
 		if {$no_hw && ([test_compiler_info {gcc-[0-3]-*}]
 			       || [test_compiler_info {gcc-4-[0-4]-*}])} {
 		    xfail "$test (old GCC has broken watchpoints in epilogues)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw.c ./gdb/testsuite/gdb.base/watchpoint-hw.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw.exp ./gdb/testsuite/gdb.base/watchpoint-hw.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,7 @@ if {[skip_hw_watchpoint_tests]} {
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.c ./gdb/testsuite/gdb.base/watchpoint-hw-hit-once.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw-hit-once.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp ./gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_hw_watchpoint_access_tests]} {
 
 set test watchpoint-hw-hit-once
 set srcfile ${test}.c
-if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${test} ${srcfile}] } {
     return -1
 }
 
@@ -31,7 +31,7 @@ gdb_test "rwatch watchee"
 
 gdb_breakpoint [gdb_get_line_number "dummy = 2"]
 
-gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
 
 # Here should be no repeated notification of the read watchpoint.
 gdb_test "continue" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-reuse-slot.c ./gdb/testsuite/gdb.base/watchpoint-reuse-slot.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-reuse-slot.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-reuse-slot.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp ./gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prep
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoints.c ./gdb/testsuite/gdb.base/watchpoints.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoints.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoints.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoints.exp ./gdb/testsuite/gdb.base/watchpoints.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoints.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoints.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,8 +24,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -69,25 +68,25 @@ with_test_prefix "before inferior start"
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = -1.*New value = 0.*ival3 = count; ival4 = count;.*" "watchpoint hit, first time"
 
     # Check that the ival3 hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "Watchpoint hit count is 1"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "watchpoint hit count is 1"
 
     # Continue until the next change for ival1, from 0 to 1.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival1.*Old value = 0.*New value = 1.*ival1 = count; ival2 = count;.*" "watchpoint ival1 hit, second time"
 
     # Check that the hit count for ival1 is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival1\r\n\[ \t]+breakpoint already hit 2 times.*" "Watchpoint ival1 hit count is 2"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival1\r\n\[ \t]+breakpoint already hit 2 times.*" "watchpoint ival1 hit count is 2"
 
     # Continue until the next change for ival3, from 0 to 1.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = 1.*ival3 = count; ival4 = count;.*" "watchpoint hit, second time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 2 times.*" "Watchpoint hit count is 2"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 2 times.*" "watchpoint hit count is 2"
 
     # Continue until the next change, from 1 to 2.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival1.*Old value = 1.*New value = 2.*ival1 = count; ival2 = count;.*" "watchpoint ival1 hit, third time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival1\r\n\[ \t]+breakpoint already hit 3 times.*" "Watchpoint ival1 hit count is 3"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival1\r\n\[ \t]+breakpoint already hit 3 times.*" "watchpoint ival1 hit count is 3"
     # Disable ival1 watchpoint
     gdb_test_no_output "disable 2" ""
  
@@ -95,13 +94,13 @@ with_test_prefix "before inferior start"
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 2.*ival3 = count; ival4 = count;.*" "watchpoint hit, third time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 3 times.*" "Watchpoint hit count is 3"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 3 times.*" "watchpoint hit count is 3"
     
     # Continue until the next change, from 2 to 3.
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 2.*New value = 3.*ival3 = count; ival4 = count;.*" "watchpoint hit, fourth time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 4 times.*" "Watchpoint hit count is 4"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 4 times.*" "watchpoint hit count is 4"
 
     # Continue until the next change, from 3 to 4.
     # Note that this one is outside the loop.
@@ -109,6 +108,6 @@ with_test_prefix "before inferior start"
     gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 3.*New value = 4.*ival3 = count; ival4 = count;.*" "watchpoint hit, fifth time"
 
     # Check that the hit count is reported correctly
-    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 5 times.*" "Watchpoint hit count is 5"
+    gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 5 times.*" "watchpoint hit count is 5"
 
 set timeout $prev_timeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib.c ./gdb/testsuite/gdb.base/watchpoint-solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib.exp ./gdb/testsuite/gdb.base/watchpoint-solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-solib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2007-2015 Free Software Foundation, Inc.
+#   Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ set exec_opts [list debug shlib_load add
 
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
-    untested "Couldn't compile $libsrc or $srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -52,7 +52,7 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $lib_sl
+gdb_load_shlib $lib_sl
 
 runto_main
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib-shr.c ./gdb/testsuite/gdb.base/watchpoint-solib-shr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-solib-shr.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-solib-shr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.c ./gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp ./gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -75,8 +75,7 @@ if {[target_info exists gdb,no_hardware_
     return -1
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-read.c ./gdb/testsuite/gdb.base/watch-read.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-read.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-read.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-read.exp ./gdb/testsuite/gdb.base/watch-read.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-read.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-read.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,8 +28,7 @@ if {[skip_hw_watchpoint_access_tests]} {
     return 0
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch_thread_num.c ./gdb/testsuite/gdb.base/watch_thread_num.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch_thread_num.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch_thread_num.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003, 2007, 2008, 2009
    Free Software Foundation, Inc.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch_thread_num.exp ./gdb/testsuite/gdb.base/watch_thread_num.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch_thread_num.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch_thread_num.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,8 +46,8 @@ if { ![runto main] } then {
    return
 }
 
-gdb_test "watch shared_var thread 0" "Unknown thread 0\." "Watchpoint on invalid thread"
-gdb_test "watch shared_var thread" "A syntax error in expression, near `thread'\." "Invalid watch syntax"
+gdb_test "watch shared_var thread 0" "Invalid thread ID: 0" "watchpoint on invalid thread"
+gdb_test "watch shared_var thread" "A syntax error in expression, near `thread'\." "invalid watch syntax"
 
 set bpexitline [gdb_get_line_number "all threads started"]
 gdb_breakpoint "$bpexitline"
@@ -56,11 +56,11 @@ gdb_continue_to_breakpoint "all threads 
 gdb_test "break loop" "Breakpoint \[0-9\].*" \
   "Set breakpoint at loop"
 
-gdb_test "continue" ".*Breakpoint .*loop.*" "Stopped in loop"
+gdb_test "continue" ".*Breakpoint .*loop.*" "stopped in loop"
 
-gdb_test_multiple "thread" "Thread command" {
+gdb_test_multiple "thread" "thread command" {
     -re ".*Current thread is (\[0-9\]*).*$gdb_prompt $" {
-	pass "Thread command" 
+	pass "thread command"
     }
 }
 
@@ -75,7 +75,7 @@ delete_breakpoints
 
 gdb_test "awatch shared_var thread $thread_num" \
     "Hardware access \\(read/write\\) watchpoint .*: shared_var.*" \
-    "Watchpoint on shared variable"
+    "watchpoint on shared variable"
 
 gdb_test "info breakpoint \$bpnum" \
     "stop only in thread $thread_num" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-vfork.c ./gdb/testsuite/gdb.base/watch-vfork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-vfork.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-vfork.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-vfork.exp ./gdb/testsuite/gdb.base/watch-vfork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/watch-vfork.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch-vfork.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,15 +15,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# There's no support for vfork events in the remote protocol.
-if { [is_remote target] } {
-    return 0
-}
-
 standard_testfile .c
 
 if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wchar.c ./gdb/testsuite/gdb.base/wchar.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wchar.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/wchar.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wchar.exp ./gdb/testsuite/gdb.base/wchar.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wchar.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/wchar.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/weaklib1.c ./gdb/testsuite/gdb.base/weaklib1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/weaklib1.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/weaklib1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/weaklib2.c ./gdb/testsuite/gdb.base/weaklib2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/weaklib2.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/weaklib2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis.c ./gdb/testsuite/gdb.base/whatis.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/whatis.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 1992-2015 Free Software Foundation, Inc.
+   Copyright 1992-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -135,7 +135,7 @@ struct t_struct {
 #endif
     float	v_float_member;
     double	v_double_member;
-} v_struct1;
+} v_struct1, *v_struct_ptr1;
 
 struct {
     char	v_char_member;
@@ -147,7 +147,7 @@ struct {
 #endif
     float	v_float_member;
     double	v_double_member;
-} v_struct2;
+} v_struct2, *v_struct_ptr2;
 
 /**** unions *******/
 
@@ -161,7 +161,7 @@ union t_union {
 #endif
     float	v_float_member;
     double	v_double_member;
-} v_union;
+} v_union, *v_union_ptr;
 
 union {
     char	v_char_member;
@@ -173,7 +173,7 @@ union {
 #endif
     float	v_float_member;
     double	v_double_member;
-} v_union2;
+} v_union2, *v_union_ptr2;
 
 /*** Functions returning type ********/
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis.exp ./gdb/testsuite/gdb.base/whatis.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/whatis.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1988-2015 Free Software Foundation, Inc.
+# Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if [target_info exists no_long_long] {
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $exec_opts] != "" } {
-     untested whatis.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -281,14 +281,6 @@ gdb_test "whatis v_double_pointer" \
     "whatis double pointer"
 
 
-if { $hp_aCC_compiler } {
-    set unstruct "unnamed\.struct\..*"
-    set ununion "unnamed\.union\..*"
-} else {
-    set unstruct "\.\.\."
-    set ununion "\.\.\."
-}
-
 # test whatis command with structure types
 gdb_test "whatis v_struct1" \
     "type = struct t_struct" \
@@ -299,9 +291,50 @@ gdb_test "whatis struct t_struct" \
     "whatis named structure using type name"
 
 gdb_test "whatis v_struct2" \
-    "type = struct \{$unstruct\}" \
+    "type = struct \{\.\.\.\}" \
     "whatis unnamed structure"
 
+gdb_test "whatis &v_struct1" \
+    "type = struct t_struct \\*"
+
+gdb_test "whatis &v_struct2" \
+    "type = struct {\\.\\.\\.} \\*"
+
+gdb_test "whatis v_struct_ptr1" \
+    "type = struct t_struct \\*"
+
+gdb_test "whatis v_struct_ptr2" \
+    "type = struct {\\.\\.\\.} \\*"
+
+gdb_test "whatis &v_struct_ptr1" \
+    "type = struct t_struct \\*\\*"
+
+gdb_test "whatis &v_struct_ptr2" \
+    "type = struct {\\.\\.\\.} \\*\\*"
+
+gdb_test "whatis v_struct1.v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_struct2.v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_struct_ptr1->v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_struct_ptr2->v_char_member" \
+    "type = char"
+
+gdb_test "whatis &(v_struct1.v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_struct2.v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_struct_ptr1->v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_struct_ptr2->v_char_member)" \
+    "type = char \\*"
 
 # test whatis command with union types
 gdb_test "whatis v_union" \
@@ -313,15 +346,53 @@ gdb_test "whatis union t_union" \
     "whatis named union using type name"
 
 gdb_test "whatis v_union2" \
-    "type = union \{$ununion\}" \
+    "type = union \{\.\.\.\}" \
     "whatis unnamed union"
 
+gdb_test "whatis &v_union" \
+    "type = union t_union \\*"
+
+gdb_test "whatis &v_union2" \
+    "type = union {\\.\\.\\.} \\*"
 
-# HP-UX: HP aCC compiler w/ +objdebug option detects language as
-# c++, so we need the 'void' pattern here.
-# Without +objdebug compilation option we still need to match ''.
-# - guo
-# Also, using stabs we will mark these functions as prototyped.  This
+gdb_test "whatis v_union_ptr" \
+    "type = union t_union \\*"
+
+gdb_test "whatis v_union_ptr2" \
+    "type = union {\\.\\.\\.} \\*"
+
+gdb_test "whatis &v_union_ptr" \
+    "type = union t_union \\*\\*"
+
+gdb_test "whatis &v_union_ptr2" \
+    "type = union {\\.\\.\\.} \\*\\*"
+
+gdb_test "whatis v_union.v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_union2.v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_union_ptr->v_char_member" \
+    "type = char"
+
+gdb_test "whatis v_union_ptr2->v_char_member" \
+    "type = char"
+
+gdb_test "whatis &(v_union.v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_union2.v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_union_ptr->v_char_member)" \
+    "type = char \\*"
+
+gdb_test "whatis &(v_union_ptr2->v_char_member)" \
+    "type = char \\*"
+
+
+# Using stabs we will mark these functions as prototyped.  This
 # is harmless but causes an extra VOID to be printed.
 set void "(void|)"
 
@@ -428,14 +499,8 @@ gdb_test "whatis nested_su.outer_int" \
     "type = int" \
     "whatis outer structure member"
 
-if {$hp_aCC_compiler} {
-    set outer "outer_struct::"
-} else {
-    set outer ""
-}
-
 gdb_test "whatis nested_su.inner_struct_instance" \
-    "type = struct ${outer}inner_struct" \
+    "type = struct inner_struct" \
     "whatis inner structure"
 
 gdb_test "whatis nested_su.inner_struct_instance.inner_int" \
@@ -443,7 +508,7 @@ gdb_test "whatis nested_su.inner_struct_
     "whatis inner structure member"
 
 gdb_test "whatis nested_su.inner_union_instance" \
-    "type = union ${outer}inner_union" \
+    "type = union inner_union" \
     "whatis inner union"
 
 gdb_test "whatis nested_su.inner_union_instance.inner_union_int" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis-exp.exp ./gdb/testsuite/gdb.base/whatis-exp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/whatis-exp.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.base/whatis-exp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
 # test running programs
 #
 
-if { [prepare_for_testing whatis-exp.exp whatis-exp int-type.c {debug nowarnings}] } {
+if { [prepare_for_testing "failed to prepare" whatis-exp int-type.c {debug nowarnings}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp ./gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/wrong_frame_bt_full.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Build wrong_frame_bt_full-main using two C files:
+#   - wrong_frame_bt_full-opaque.c, which needs to be built without
+#     debugging info;
+#   - wrong_frame_bt_full-main.c, which needs to be built with
+#     debugging info.
+# This is why we use gdb_compile instead of relying on he usual call
+# to prepare_for_testing.
+
+set main_testfile wrong_frame_bt_full-main
+set opaque_testfile wrong_frame_bt_full-opaque
+set opaque_objfile [standard_output_file "$opaque_testfile.o"]
+
+if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
+                 $opaque_objfile \
+                 object {}] != ""} {
+  untested "failed to compile"
+  return -1
+}
+
+if {[gdb_compile \
+      [list ${srcdir}/${subdir}/$main_testfile.c $opaque_objfile] \
+      [standard_output_file ${main_testfile}] \
+      executable {debug}] != ""} {
+    untested "failed to build $main_testfile"
+    return -1
+}
+
+clean_restart ${main_testfile}
+
+if ![runto opaque_routine] {
+    untested "could not run to opaque_routine"
+    return -1
+}
+
+# Make sure that "bt full" command is capable of displaying MY_TABLE
+# correctly when frame #0 (the frame which does not have any debugging
+# info) is the selected frame.
+
+gdb_test "bt full" \
+         ".*\[\r\n\]+ *my_table = \\{0, 1, 2\\}\[\r\n\]+.*"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full-main.c ./gdb/testsuite/gdb.base/wrong_frame_bt_full-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full-main.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/wrong_frame_bt_full-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern void opaque_routine (void);
+
+int dyn_arr_size = 4;
+
+int
+main (void)
+{
+  int i;
+  int my_table_size = dyn_arr_size - 1;
+  int my_table [my_table_size];
+
+  for (i = 0; i < my_table_size; i++)
+    my_table[i] = i;
+
+  opaque_routine ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full-opaque.c ./gdb/testsuite/gdb.base/wrong_frame_bt_full-opaque.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.base/wrong_frame_bt_full-opaque.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.base/wrong_frame_bt_full-opaque.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+void
+opaque_routine (void)
+{
+  /* Do nothing.  */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/buffer-size.exp ./gdb/testsuite/gdb.btrace/buffer-size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/buffer-size.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/buffer-size.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,16 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile record_goto.c
-if [prepare_for_testing $testfile.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -44,14 +46,4 @@ gdb_test "info record" [multi_line \
 gdb_test "record stop" ".*" "stop recording with small bts buffer"
 
 gdb_test_no_output "set record btrace bts buffer-size 0"
-gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is unlimited\.\r" "unlimited bts buffer size before recording"
-
-gdb_test_no_output "record btrace bts"
-gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is unlimited\.\r" "unlimited bts buffer size while recording"
-gdb_test "info record" [multi_line \
-  "Active record target: record-btrace" \
-  "Recording format: Branch Trace Store\." \
-  "Buffer size: .*\." \
-  "Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for \[^\\\r\\\n\]*" \
-  ] "info record with unlimited bts buffer"
-gdb_test "record stop" ".*" "stop recording with unlimited bts buffer"
+gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is unlimited\.\r" "unlimited bts buffer size"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/data.c ./gdb/testsuite/gdb.btrace/data.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/data.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/data.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/data.exp ./gdb/testsuite/gdb.btrace/data.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/data.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/data.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,15 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
-if [prepare_for_testing $testfile.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/delta.exp ./gdb/testsuite/gdb.btrace/delta.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/delta.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/delta.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,15 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile record_goto.c
-if [prepare_for_testing delta.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen.c ./gdb/testsuite/gdb.btrace/dlopen.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/dlopen.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <dlfcn.h>
+#include <assert.h>
+#include <stdlib.h>
+
+static int
+test (void)
+{
+  void *dso;
+  int (*fun) (void);
+  int answer;
+
+  dso = dlopen (DSO_NAME, RTLD_NOW | RTLD_GLOBAL);
+  assert (dso != NULL);
+
+  fun = (int (*) (void)) dlsym (dso, "answer");
+  assert (fun != NULL);
+
+  answer = fun ();
+
+  dlclose (dso);
+
+  return answer;
+}
+
+int
+main (void)
+{
+  int answer;
+
+  answer = test ();
+
+  return answer;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen-dso.c ./gdb/testsuite/gdb.btrace/dlopen-dso.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen-dso.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/dlopen-dso.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+answer (void)
+{
+  return 42;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen.exp ./gdb/testsuite/gdb.btrace/dlopen.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/dlopen.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/dlopen.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,60 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+
+if { [skip_shlib_tests]  } {
+    unsupported "target does not support shared library tests"
+    return -1
+}
+
+standard_testfile
+
+set basename_lib dlopen-dso
+set srcfile_lib $srcdir/$subdir/$basename_lib.c
+set binfile_lib [standard_output_file $basename_lib.so]
+
+if { [gdb_compile_shlib $srcfile_lib $binfile_lib \
+	  [list additional_flags=-fPIC]] != "" } {
+    untested "failed to prepare shlib"
+    return -1
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
+	  [list additional_flags=-DDSO_NAME=\"$binfile_lib\" libs=-ldl]] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+# Trace the test function
+#
+gdb_test_no_output "record btrace"
+gdb_test "next"
+
+# The memory containing the library call we traced is already gone.
+# Trace decode used to run into a SEGV after corrupting the cleanup chain.
+#
+# The test passes if we don't crash GDB.
+#
+gdb_test "info record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable.c ./gdb/testsuite/gdb.btrace/enable.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/enable.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <christian.himpel@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable.exp ./gdb/testsuite/gdb.btrace/enable.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/enable.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <christian.himpel@intel.com>
 #
@@ -17,8 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
 # start fresh - without an executable
 gdb_exit
@@ -35,12 +37,13 @@ gdb_test "record function-call-history" 
 gdb_test "record instruction-history" "No record target is currently active\\..*" "record instruction-history without target"
 gdb_test "info record" "No record target is currently active\\." "info record without target"
 
-# start inferior
 standard_testfile
-if [prepare_for_testing $testfile.exp $testfile {} {debug}] {
+if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -71,27 +74,35 @@ gdb_test "record btrace" "The process is
 # continue to the end and make sure we don't die
 gdb_test "continue" ".*Inferior.*exited.*" "continue to end"
 
+# skip_gdbserver_tests requires GDB not running.
+gdb_exit
+
 # skip the rerun test when using gdbserver
 # otherwise rerun twice, target should be automatically disabled
 load_lib gdbserver-support.exp
 if [skip_gdbserver_tests] {
+    unsupported "target does not support gdbserver"
     return 0
 }
 clean_restart $testfile
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
 # make sure record-btrace can be enabled after re-run
 clean_restart $testfile
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 gdb_test_no_output "record btrace"
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 gdb_test_no_output "record btrace" "enable after re-run"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable-running.c ./gdb/testsuite/gdb.btrace/enable-running.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable-running.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/enable-running.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <unistd.h>
+
+#define NTHREADS 3
+
+static void *
+test (void *arg)
+{
+  /* Let's hope this is long enough for GDB to enable tracing and check that
+     everything is working as expected.  */
+  sleep (10);
+
+  return arg;
+}
+
+int
+main (void)
+{
+  pthread_t th[NTHREADS];
+  int i;
+
+  for (i = 0; i < NTHREADS; ++i)
+    pthread_create (&th[i], NULL, test, NULL);
+
+  test (NULL); /* bp.1 */
+
+  for (i = 0; i < NTHREADS; ++i)
+    pthread_join (th[i], NULL);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable-running.exp ./gdb/testsuite/gdb.btrace/enable-running.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/enable-running.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/enable-running.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,100 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+
+standard_testfile
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
+    untested "failed to prepare"
+    return -1
+}
+
+# We need to enable non-stop mode for the remote case.
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+    clean_restart $testfile
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+set bp_1 [gdb_get_line_number "bp.1" $srcfile]
+
+gdb_breakpoint $bp_1
+gdb_continue_to_breakpoint "cont to $bp_1" ".*$bp_1\r\n.*"
+gdb_test "cont&" "Continuing\."
+
+# All threads are running.  Let's start recording.
+gdb_test_no_output "record btrace"
+
+proc check_tracing_enabled { thread } {
+    global gdb_prompt
+
+    with_test_prefix "thread $thread" {
+        gdb_test "thread $thread" "(running).*" "is running"
+
+        # We can't read the trace while the thread is running.
+        gdb_test "info record" "Selected thread is running\." \
+            "info record while running"
+
+        # Try various commands that try to read trace.
+        gdb_test "record instruction-history" "Selected thread is running\."
+        gdb_test "record function-call-history" "Selected thread is running\."
+
+        # Including reverse-stepping commands.
+        gdb_test "reverse-continue" "\[Ss\]elected thread is running\."
+        gdb_test "reverse-step" "\[Ss\]elected thread is running\."
+        gdb_test "reverse-next" "\[Ss\]elected thread is running\."
+        gdb_test "reverse-finish" "\[Ss\]elected thread is running\."
+
+        # Stop the thread before reading the trace.
+        gdb_test_multiple "interrupt" "interrupt" {
+            -re "interrupt\r\n$gdb_prompt " {
+                pass "interrupt"
+            }
+        }
+        # Wait until the thread actually stopped.
+        gdb_test_multiple "" "stopped" {
+            -re "Thread $thread.*stopped\." {
+                pass "stopped"
+            }
+        }
+        # We will consume the thread's current location as part of the
+        # "info record" output.
+        gdb_test "info record" [multi_line \
+            "Active record target: record-btrace" \
+            "Recording format: .*" \
+            "Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" \
+        ]
+
+        # Continue the thread again.
+        gdb_test "cont&" "Continuing\."
+    }
+}
+
+# Check that recording was started on each thread.
+foreach thread {1 2 3 4} {
+    check_tracing_enabled $thread
+}
+
+# Stop recording while all threads are running.
+gdb_test "record stop" "Process record is stopped \[^\\\r\\\n\]*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/exception.cc ./gdb/testsuite/gdb.btrace/exception.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/exception.cc	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/exception.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/exception.exp ./gdb/testsuite/gdb.btrace/exception.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/exception.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/exception.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,15 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile exception.cc
-if [prepare_for_testing $testfile.exp $testfile $srcfile {c++ debug}] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/function_call_history.c ./gdb/testsuite/gdb.btrace/function_call_history.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/function_call_history.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/function_call_history.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <christian.himpel@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/function_call_history.exp ./gdb/testsuite/gdb.btrace/function_call_history.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/function_call_history.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/function_call_history.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <christian.himpel@intel.com>
 #
@@ -17,15 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
-if [prepare_for_testing function_call_history.exp $testfile {} {debug}] {
+if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -226,6 +229,7 @@ gdb_test "record function-call-history /
 
 # make sure we can handle incomplete trace with respect to indentation
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 # navigate to the fib in line 24 above
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/gcore.exp ./gdb/testsuite/gdb.btrace/gcore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/gcore.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/gcore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,16 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile record_goto.c
-if [prepare_for_testing gcore.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -38,4 +40,5 @@ gdb_test "next" ".*main\.3.*"
 gdb_test "record goto begin" ".*main\.2.*"
 
 # generate a core file - this used to assert
-gdb_test "generate-core-file core" "Saved corefile core"
+set corefile [standard_output_file core]
+gdb_test "generate-core-file $corefile" "Saved corefile $corefile"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-record_goto.S ./gdb/testsuite/gdb.btrace/i686-record_goto.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-record_goto.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/i686-record_goto.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-tailcall-only.S ./gdb/testsuite/gdb.btrace/i686-tailcall-only.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-tailcall-only.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/i686-tailcall-only.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,447 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+   This file has been generated using:
+   gcc -m32 -march=i686 -S -O2 -dA -g tailcall-only.c -o i686-tailcall-only.S
+ */
+
+	.file	"tailcall-only.c"
+	.text
+.Ltext0:
+	.p2align 4,,15
+	.type	bar_1, @function
+bar_1:
+.LFB0:
+	.file 1 "tailcall-only.c"
+	# tailcall-only.c:22
+	.loc 1 22 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:24
+	.loc 1 24 0
+	movl	$42, %eax
+# SUCC: EXIT [100.0%]
+	ret
+	.cfi_endproc
+.LFE0:
+	.size	bar_1, .-bar_1
+	.p2align 4,,15
+	.type	bar, @function
+bar:
+.LFB1:
+	# tailcall-only.c:28
+	.loc 1 28 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:29
+	.loc 1 29 0
+	jmp	bar_1
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL0:
+	.cfi_endproc
+.LFE1:
+	.size	bar, .-bar
+	.p2align 4,,15
+	.type	foo_1, @function
+foo_1:
+.LFB2:
+	# tailcall-only.c:34
+	.loc 1 34 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:35
+	.loc 1 35 0
+	jmp	bar
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL1:
+	.cfi_endproc
+.LFE2:
+	.size	foo_1, .-foo_1
+	.p2align 4,,15
+	.type	foo, @function
+foo:
+.LFB3:
+	# tailcall-only.c:40
+	.loc 1 40 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:41
+	.loc 1 41 0
+	jmp	foo_1
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL2:
+	.cfi_endproc
+.LFE3:
+	.size	foo, .-foo
+	.section	.text.startup,"ax",@progbits
+	.p2align 4,,15
+	.globl	main
+	.type	main, @function
+main:
+.LFB4:
+	# tailcall-only.c:46
+	.loc 1 46 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:49
+	.loc 1 49 0
+	call	foo
+.LVL3:
+	# tailcall-only.c:50
+	.loc 1 50 0
+	addl	$1, %eax
+.LVL4:
+# SUCC: EXIT [100.0%]
+	# tailcall-only.c:53
+	.loc 1 53 0
+	ret
+	.cfi_endproc
+.LFE4:
+	.size	main, .-main
+	.text
+.Letext0:
+	.section	.debug_info,"",@progbits
+.Ldebug_info0:
+	.long	0xd5	# Length of Compilation Unit Info
+	.value	0x4	# DWARF version number
+	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
+	.byte	0x4	# Pointer Size (in bytes)
+	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
+	.long	.LASF1	# DW_AT_producer: "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -m32 -march=i686 -g -O2"
+	.byte	0x1	# DW_AT_language
+	.long	.LASF2	# DW_AT_name: "tailcall-only.c"
+	.long	.LASF3	# DW_AT_comp_dir: ""
+	.long	.Ldebug_ranges0+0	# DW_AT_ranges
+	.long	0	# DW_AT_low_pc
+	.long	.Ldebug_line0	# DW_AT_stmt_list
+	.uleb128 0x2	# (DIE (0x25) DW_TAG_subprogram)
+	.long	.LASF4	# DW_AT_name: "bar_1"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x15	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.long	.LFB0	# DW_AT_low_pc
+	.long	.LFE0-.LFB0	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.uleb128 0x3	# (DIE (0x3a) DW_TAG_base_type)
+	.byte	0x4	# DW_AT_byte_size
+	.byte	0x5	# DW_AT_encoding
+	.ascii "int\0"	# DW_AT_name
+	.uleb128 0x4	# (DIE (0x41) DW_TAG_subprogram)
+	.ascii "bar\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x1b	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.long	.LFB1	# DW_AT_low_pc
+	.long	.LFE1-.LFB1	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x64	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0x5a) DW_TAG_GNU_call_site)
+	.long	.LVL0	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x25	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0x41
+	.uleb128 0x6	# (DIE (0x64) DW_TAG_subprogram)
+	.long	.LASF0	# DW_AT_name: "foo_1"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x21	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.long	.LFB2	# DW_AT_low_pc
+	.long	.LFE2-.LFB2	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x87	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0x7d) DW_TAG_GNU_call_site)
+	.long	.LVL1	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x41	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0x64
+	.uleb128 0x4	# (DIE (0x87) DW_TAG_subprogram)
+	.ascii "foo\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x27	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.long	.LFB3	# DW_AT_low_pc
+	.long	.LFE3-.LFB3	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0xaa	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0xa0) DW_TAG_GNU_call_site)
+	.long	.LVL2	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x64	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0x87
+	.uleb128 0x7	# (DIE (0xaa) DW_TAG_subprogram)
+			# DW_AT_external
+	.long	.LASF5	# DW_AT_name: "main"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x2d	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.long	.LFB4	# DW_AT_low_pc
+	.long	.LFE4-.LFB4	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.uleb128 0x8	# (DIE (0xbf) DW_TAG_variable)
+	.long	.LASF6	# DW_AT_name: "answer"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x2f	# DW_AT_decl_line
+	.long	0x3a	# DW_AT_type
+	.long	.LLST0	# DW_AT_location
+	.uleb128 0x9	# (DIE (0xce) DW_TAG_GNU_call_site)
+	.long	.LVL3	# DW_AT_low_pc
+	.long	0x87	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0xaa
+	.byte	0	# end of children of DIE 0xb
+	.section	.debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+	.uleb128 0x1	# (abbrev code)
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x25	# (DW_AT_producer)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x13	# (DW_AT_language)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x1b	# (DW_AT_comp_dir)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x55	# (DW_AT_ranges)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x10	# (DW_AT_stmt_list)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x2	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x6	# (DW_FORM_data4)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.byte	0
+	.byte	0
+	.uleb128 0x3	# (abbrev code)
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3e	# (DW_AT_encoding)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.byte	0
+	.byte	0
+	.uleb128 0x4	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x6	# (DW_FORM_data4)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x5	# (abbrev code)
+	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
+	.byte	0	# DW_children_no
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x2115	# (DW_AT_GNU_tail_call)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x6	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x6	# (DW_FORM_data4)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x7	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x6	# (DW_FORM_data4)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.byte	0
+	.byte	0
+	.uleb128 0x8	# (abbrev code)
+	.uleb128 0x34	# (TAG: DW_TAG_variable)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x9	# (abbrev code)
+	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
+	.byte	0	# DW_children_no
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.byte	0
+	.section	.debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+	.long	.LVL3	# Location list begin address (*.LLST0)
+	.long	.LVL4	# Location list end address (*.LLST0)
+	.value	0x3	# Location expression size
+	.byte	0x70	# DW_OP_breg0
+	.sleb128 1
+	.byte	0x9f	# DW_OP_stack_value
+	.long	.LVL4	# Location list begin address (*.LLST0)
+	.long	.LFE4	# Location list end address (*.LLST0)
+	.value	0x1	# Location expression size
+	.byte	0x50	# DW_OP_reg0
+	.long	0	# Location list terminator begin (*.LLST0)
+	.long	0	# Location list terminator end (*.LLST0)
+	.section	.debug_aranges,"",@progbits
+	.long	0x24	# Length of Address Ranges Info
+	.value	0x2	# DWARF Version
+	.long	.Ldebug_info0	# Offset of Compilation Unit Info
+	.byte	0x4	# Size of Address
+	.byte	0	# Size of Segment Descriptor
+	.value	0	# Pad to 8 byte boundary
+	.value	0
+	.long	.Ltext0	# Address
+	.long	.Letext0-.Ltext0	# Length
+	.long	.LFB4	# Address
+	.long	.LFE4-.LFB4	# Length
+	.long	0
+	.long	0
+	.section	.debug_ranges,"",@progbits
+.Ldebug_ranges0:
+	.long	.Ltext0	# Offset 0
+	.long	.Letext0
+	.long	.LFB4	# Offset 0x8
+	.long	.LFE4
+	.long	0
+	.long	0
+	.section	.debug_line,"",@progbits
+.Ldebug_line0:
+	.section	.debug_str,"MS",@progbits,1
+.LASF4:
+	.string	"bar_1"
+.LASF2:
+	.string	"tailcall-only.c"
+.LASF1:
+	.string	"GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -m32 -march=i686 -g -O2"
+.LASF6:
+	.string	"answer"
+.LASF5:
+	.string	"main"
+.LASF3:
+	.string	""
+.LASF0:
+	.string	"foo_1"
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-tailcall.S ./gdb/testsuite/gdb.btrace/i686-tailcall.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/i686-tailcall.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/i686-tailcall.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.c ./gdb/testsuite/gdb.btrace/instruction_history.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/instruction_history.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <christian.himpel@intel.com>
 
@@ -17,6 +17,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+extern void loop (void);
+
 int
 main (void)
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.exp ./gdb/testsuite/gdb.btrace/instruction_history.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/instruction_history.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <christian.himpel@intel.com>
 #
@@ -17,15 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# compile and run to main
 standard_testfile .c .S
-if [prepare_for_testing $testfile.exp $testfile "$srcfile $srcfile2" {debug}] {
+if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -82,19 +85,19 @@ gdb_test "record instruction-history /f 
   ]
 
 gdb_test "record instruction-history /p 7,-5" [multi_line \
-  "3\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
-  "4\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tdec    %eax" \
-  "5\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
-  "6\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
-  "7\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
+  "3\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
+  "4\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tdec    %eax" \
+  "5\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
+  "6\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
+  "7\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
   ]
 
 gdb_test "record instruction-history /pf 3,7" [multi_line \
-  "3\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
-  "4\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tdec    %eax" \
-  "5\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
-  "6\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
-  "7\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
+  "3\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
+  "4\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tdec    %eax" \
+  "5\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
+  "6\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
+  "7\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
   ]
 
 gdb_test "record instruction-history 3,3" "3\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.S ./gdb/testsuite/gdb.btrace/instruction_history.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/instruction_history.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/instruction_history.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <christian.himpel@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/Makefile.in ./gdb/testsuite/gdb.btrace/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,19 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES   = enable function_call_history instruction_history tailcall \
-  exception unknown_functions record_goto delta step stepi \
-  multi-thread-step rn-dl-bind data
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	rm -f *~ *.o *.x *.ci *.sl a.out core
-	rm -f *.dwo *.dwp
-	rm -f $(EXECUTABLES) $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	rm -f Makefile config.status config.log site.* gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/multi-thread-step.c ./gdb/testsuite/gdb.btrace/multi-thread-step.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/multi-thread-step.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/multi-thread-step.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/multi-thread-step.exp ./gdb/testsuite/gdb.btrace/multi-thread-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/multi-thread-step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/multi-thread-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,17 +17,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
+    untested "failed to prepare"
     return -1
 }
 clean_restart $testfile
 
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -37,9 +40,29 @@ set bp_2 [gdb_get_line_number "bp.2" $sr
 set bp_3 [gdb_get_line_number "bp.3" $srcfile]
 
 proc gdb_cont_to_line { line } {
-	gdb_breakpoint $line
-	gdb_continue_to_breakpoint "cont to $line" ".*$line\r\n.*"
-	delete_breakpoints
+    gdb_breakpoint $line
+    gdb_continue_to_breakpoint "cont to $line" ".*$line\r\n.*"
+    delete_breakpoints
+}
+
+proc check_replay_insn { thread insn } {
+    gdb_test "thread apply $thread info record" \
+        "Replay in progress\.  At instruction $insn\."
+}
+
+proc check_not_replaying { thread } {
+    global gdb_prompt
+
+    set test "thread $thread not replaying"
+
+    gdb_test_multiple "thread apply $thread info record" $test {
+        -re "Replay in progress" {
+            fail $test
+        }
+        -re "$gdb_prompt $" {
+            pass $test
+        }
+    }
 }
 
 # trace the code between the two breakpoints
@@ -50,86 +73,145 @@ gdb_test "info threads" ".*"
 gdb_test_no_output "record btrace"
 gdb_cont_to_line $srcfile:$bp_2
 
-# navigate in the trace history for both threads
-with_test_prefix "navigate" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "record goto begin" ".*"
-    gdb_test "info record" ".*Replay in progress\.  At instruction 1\."
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "record goto begin" ".*"
-    gdb_test "info record" ".*Replay in progress\.  At instruction 1\."
-  }
-}
-
-# step both threads
-with_test_prefix "step" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "info record" ".*Replay in progress\.  At instruction 1\."
-    gdb_test "stepi" ".*"
-    gdb_test "info record" ".*Replay in progress\.  At instruction 2\."
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "info record" ".*Replay in progress\.  At instruction 1\."
-    gdb_test "stepi" ".*"
-    gdb_test "info record" ".*Replay in progress\.  At instruction 2\."
-  }
-}
-
-# run to the end of the history for both threads
-with_test_prefix "cont" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "info record" ".*Replay in progress\.  At instruction 2\."
-    gdb_test "continue" "No more reverse-execution history.*"
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "info record" ".*Replay in progress\.  At instruction 2\."
-    gdb_test "continue" "No more reverse-execution history.*"
-  }
-}
-
-# reverse-step both threads
-with_test_prefix "reverse-step" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "reverse-stepi" ".*"
-    gdb_test "info record" ".*Replay in progress\..*"
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "reverse-stepi" ".*"
-    gdb_test "info record" ".*Replay in progress\..*"
-  }
-}
-
-# both threads are still replaying
-with_test_prefix "check" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "info record" ".*Replay in progress\..*"
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "info record" ".*Replay in progress\..*"
-  }
+proc test_navigate {} {
+    with_test_prefix "navigate" {
+        gdb_test "thread 1" ".*"
+        with_test_prefix "thread 1" {
+            gdb_test "record goto begin" ".*"
+
+            check_replay_insn 1 1
+            check_not_replaying 2
+        }
+        gdb_test "thread 2" ".*"
+        with_test_prefix "thread 2" {
+            gdb_test "record goto begin" ".*"
+
+            check_replay_insn 1 1
+            check_replay_insn 2 1
+        }
+    }
+}
+
+proc test_step {} {
+    with_test_prefix "step" {
+        gdb_test "thread 1" ".*"
+        with_test_prefix "thread 1" {
+            gdb_test "stepi" ".*"
+
+            check_replay_insn 1 2
+            check_replay_insn 2 1
+        }
+        gdb_test "thread 2" ".*"
+        with_test_prefix "thread 2" {
+            gdb_test "stepi" ".*"
+
+            check_replay_insn 1 2
+            check_replay_insn 2 2
+        }
+    }
+}
+
+proc test_cont {} {
+    with_test_prefix "cont" {
+        gdb_test "thread 1" ".*"
+        with_test_prefix "thread 1" {
+            gdb_test "continue" "No more reverse-execution history.*"
+
+            check_not_replaying 1
+            check_replay_insn 2 2
+        }
+        gdb_test "thread 2" ".*"
+        with_test_prefix "thread 2" {
+            gdb_test "continue" "No more reverse-execution history.*"
+
+            check_not_replaying 1
+            check_not_replaying 2
+        }
+    }
+}
+
+proc test_cont_all {} {
+    with_test_prefix "cont-all" {
+        gdb_test "continue" "No more reverse-execution history.*"
+
+        # this works because we're lock-stepping threads that executed exactly
+        # the same code starting from the same instruction.
+
+        check_not_replaying 1
+        check_not_replaying 2
+    }
+}
+
+proc test_rstep {} {
+    with_test_prefix "reverse-step" {
+        gdb_test "thread apply all record goto 3"
+
+        gdb_test "thread 1" ".*"
+        with_test_prefix "thread 1" {
+            gdb_test "reverse-stepi" ".*"
+
+            check_replay_insn 1 2
+            check_replay_insn 2 3
+        }
+        gdb_test "thread 2" ".*"
+        with_test_prefix "thread 2" {
+            gdb_test "reverse-stepi" ".*"
+
+            check_replay_insn 1 2
+            check_replay_insn 2 2
+        }
+    }
+}
+
+proc test_goto_end {} {
+    with_test_prefix "goto-end" {
+        gdb_test "thread apply all record goto end"
+
+        check_not_replaying 1
+        check_not_replaying 2
+    }
+}
+
+foreach schedlock { "replay" "on" "step" } {
+    with_test_prefix "schedlock-$schedlock" {
+        gdb_test_no_output "set scheduler-locking $schedlock"
+
+        test_navigate
+        test_step
+        if { $schedlock == "step" } {
+            test_cont_all
+        } else {
+            test_cont
+        }
+        test_rstep
+        test_goto_end
+    }
 }
 
+# schedlock-off is difficult to test since we can't really say where the other
+# thread will be when the resumed thread stops.
+
 # navigate back into the history for thread 1 and continue thread 2
-with_test_prefix "cont" {
-  gdb_test "thread 1" ".*"
-  with_test_prefix "thread 1" {
-    gdb_test "record goto begin" ".*"
-    gdb_test "info record" ".*Replay in progress\.  At instruction 1\."
-  }
-  gdb_test "thread 2" ".*"
-  with_test_prefix "thread 2" {
-    gdb_test "record goto end" ".*"
-    gdb_cont_to_line $srcfile:$bp_3
-  }
+with_test_prefix "cont-to-end" {
+    # this test only works for scheduler-locking replay
+    gdb_test_no_output "set scheduler-locking replay"
+
+    gdb_test "thread 1" ".*"
+    with_test_prefix "thread 1" {
+        gdb_test "record goto begin" ".*"
+
+        check_replay_insn 1 1
+    }
+    gdb_test "thread 2" ".*"
+    with_test_prefix "thread 2" {
+        gdb_test "record goto end" ".*"
+
+        check_not_replaying 2
+
+        # if we reach the breakpoint, thread 2 terminated...
+        gdb_cont_to_line $srcfile:$bp_3
+
+        # and thread 1 stopped replaying
+        check_not_replaying 1
+    }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/nohist.exp ./gdb/testsuite/gdb.btrace/nohist.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/nohist.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/nohist.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,16 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile record_goto.c
-if [prepare_for_testing nohist.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/non-stop.c ./gdb/testsuite/gdb.btrace/non-stop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/non-stop.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/non-stop.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,45 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+
+static int global;
+
+static void *
+test (void *arg)
+{
+  unsigned int i;
+
+  i = 0; /* bp.1 */
+  for (; i < 10; ++i) global += i; /* loop */
+
+  return arg; /* bp.2 */
+}
+
+int
+main (void)
+{
+  pthread_t th;
+
+  pthread_create (&th, NULL, test, NULL);
+
+  test (NULL);
+
+  pthread_join (th, NULL);
+
+  return 0; /* bp.3 */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/non-stop.exp ./gdb/testsuite/gdb.btrace/non-stop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/non-stop.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/non-stop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,249 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+
+standard_testfile
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
+    untested "failed to prepare"
+    return -1
+}
+
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+    clean_restart $testfile
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+# set up breakpoints
+set bp_1 [gdb_get_line_number "bp.1" $srcfile]
+set bp_2 [gdb_get_line_number "bp.2" $srcfile]
+set bp_3 [gdb_get_line_number "bp.3" $srcfile]
+
+gdb_breakpoint $bp_1
+gdb_breakpoint $bp_2
+
+# get the line number containing most of the trace
+set loop [gdb_get_line_number "loop" $srcfile]
+
+# a stop on the above line as reported by GDB
+set loop_line "$loop\[^\\\r\\\n\]*/\\\* loop \\\*/"
+
+# make sure $line matches the full expected output per thread.
+# and let's hope that GDB never mixes the output from different threads.
+proc gdb_cont_to { threads cmd line nthreads } {
+    global gdb_prompt
+    set full_cmd "thread apply $threads $cmd"
+
+    # consume the prompt.  since we started the command in the background,
+    # the prompt precedes any further output except some errors.
+    gdb_test_multiple "$full_cmd &" "$full_cmd: prompt" {
+        -re "$gdb_prompt " {
+            pass "$full_cmd: prompt"
+        }
+    }
+
+    # now check for the expected line - one per thread.
+    for {set i 0} {$i < $nthreads} {incr i} {
+        set test "$full_cmd: thread $i"
+
+        gdb_test_multiple "" $test {
+            -re "$line\[^\\\r\\\n\]*\r\n" {
+                pass $test
+            }
+        }
+    }
+}
+
+proc gdb_cont_to_bp_line { line threads nthreads } {
+    gdb_cont_to $threads "continue" \
+        [multi_line \
+             "Breakpoint\[^\\\r\\\n\]*$line" \
+             "\[^\\\r\\\n\]*" \
+            ] \
+        $nthreads
+}
+
+proc gdb_cont_to_no_history { threads cmd nthreads } {
+    gdb_cont_to $threads $cmd \
+        [multi_line \
+             "No more reverse-execution history\." \
+             "\[^\\\r\\\n\]*" \
+             "\[^\\\r\\\n\]*" \
+            ] \
+        $nthreads
+}
+
+# trace the code between the two breakpoints
+gdb_cont_to_bp_line "$srcfile:$bp_1" all 2
+gdb_test_no_output "record btrace"
+gdb_cont_to_bp_line "$srcfile:$bp_2" all 2
+
+# we don't need those breakpoints any longer.
+# they will only disturb our stepping.
+delete_breakpoints
+
+# show the threads - this is useful for debugging fails
+gdb_test "thread apply all info rec" ".*"
+gdb_test "info threads" ".*"
+
+with_test_prefix "navigate" {
+    gdb_test "thread apply 1 record goto 2" "$loop_line"
+    gdb_test "thread apply 2 record goto 4" "$loop_line"
+    gdb_test "thread apply 1 info record" \
+        ".*Replay in progress\.  At instruction 2\."
+    gdb_test "thread apply 2 info record" \
+        ".*Replay in progress\.  At instruction 4\."
+
+    gdb_test "thread apply all record goto 5" "$loop_line"
+    gdb_test "thread apply 1 info record" \
+        ".*Replay in progress\.  At instruction 5\."
+    gdb_test "thread apply 2 info record" \
+        ".*Replay in progress\.  At instruction 5\."
+}
+
+with_test_prefix "step" {
+    with_test_prefix "thread 1" {
+        gdb_test "thread apply 1 stepi 2" "$loop_line"
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 7\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 5\."
+    }
+
+    with_test_prefix "thread 2" {
+        gdb_test "thread apply 2 stepi 3" "$loop_line"
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 7\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 8\."
+    }
+
+    with_test_prefix "all" {
+        gdb_cont_to all "stepi 4" "$loop_line" 2
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 11\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 12\."
+    }
+}
+
+with_test_prefix "reverse-step" {
+    with_test_prefix "thread 1" {
+        gdb_test "thread apply 1 reverse-stepi 2" "$loop_line"
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 9\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 12\."
+    }
+
+    with_test_prefix "thread 2" {
+        gdb_test "thread apply 2 reverse-stepi 3" "$loop_line"
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 9\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 9\."
+    }
+
+    with_test_prefix "all" {
+        gdb_cont_to all "reverse-stepi 4" "$loop_line" 2
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 5\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 5\."
+    }
+}
+
+with_test_prefix "continue" {
+    with_test_prefix "thread 1" {
+        gdb_cont_to_no_history 1 "continue" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 5\."
+
+        gdb_cont_to_no_history 1 "reverse-continue" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 5\."
+    }
+
+    with_test_prefix "thread 2" {
+        gdb_cont_to_no_history 2 "continue" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+        gdb_test "thread apply 2 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+
+        gdb_cont_to_no_history 2 "reverse-continue" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+    }
+}
+
+# a thread may only resume if no thread is still replaying
+with_test_prefix "no progress" {
+    with_test_prefix "thread 1" {
+        gdb_test "thread apply 1 record goto end" ".*"
+        gdb_test "thread apply 2 record goto begin" ".*"
+
+        gdb_cont_to_no_history 1 "continue" 1
+        gdb_cont_to_no_history 1 "step" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+        gdb_test "thread apply 2 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+    }
+
+    with_test_prefix "thread 2" {
+        gdb_test "thread apply 1 record goto begin" ".*"
+        gdb_test "thread apply 2 record goto end" ".*"
+
+        gdb_cont_to_no_history 2 "continue" 1
+        gdb_cont_to_no_history 2 "step" 1
+        gdb_test "thread apply 1 info record" \
+            ".*Replay in progress\.  At instruction 1\."
+        gdb_test "thread apply 2 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+    }
+
+    with_test_prefix "all" {
+        gdb_test "thread apply all record goto begin" ".*"
+
+        gdb_cont_to_no_history all "continue" 2
+        gdb_test "thread apply 1 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+        gdb_test "thread apply 2 info record" \
+            ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*"
+    }
+}
+
+# now that both threads stopped replaying we may resume recording
+with_test_prefix "cont to end" {
+    gdb_breakpoint $bp_3
+    gdb_cont_to_bp_line "$srcfile:$bp_3" all 1
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/reconnect.c ./gdb/testsuite/gdb.btrace/reconnect.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/reconnect.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/reconnect.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   Contributed by Intel Corp. <tim.wiederhake@intel.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/reconnect.exp ./gdb/testsuite/gdb.btrace/reconnect.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/reconnect.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/reconnect.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,85 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# Contributed by Intel Corp. <tim.wiederhake@intel.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdbserver-support.exp
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+if { [skip_gdbserver_tests] } {
+    unsupported "target does not support gdbserver"
+    return -1
+}
+
+standard_testfile
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
+    return -1
+}
+
+# Make sure we're disconnected and no recording is active, in case
+# we're testing with an extended-remote board, therefore already
+# connected.
+with_test_prefix "preparation" {
+  gdb_test "record stop" ".*"
+  gdb_test "disconnect" ".*"
+}
+
+# Start fresh gdbserver.
+set gdbserver_reconnect_p 1
+set res [gdbserver_start "" $binfile]
+set gdbserver_protocol [lindex $res 0]
+set gdbserver_gdbport [lindex $res 1]
+gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
+
+# Create a record, check, reconnect
+with_test_prefix "first" {
+  gdb_test_no_output "record btrace" "record btrace enable"
+  gdb_test "stepi 19" "0x.* in .* from target.*"
+
+  gdb_test "info record" [multi_line \
+    "Active record target: .*" \
+    "Recorded 19 instructions in .+ functions \\(. gaps\\) for thread 1 \\(Thread .*\\)."
+  ]
+
+  gdb_test "disconnect" "Ending remote debugging."
+  gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
+}
+
+# Test if we can access the recorded data from first connect.
+# Note: BTS loses the first function call entry with its associated
+# instructions for technical reasons.  This is why we test for
+# "a number between 10 and 19", so we catch at least the case where
+# there are 0 instructions in the record.
+with_test_prefix "second" {
+  gdb_test "info record" [multi_line \
+    "Active record target: .*" \
+    "Recorded 1. instructions in .+ functions \\(. gaps\\) for thread 1 \\(Thread .*\\)."
+  ]
+
+  gdb_test "record stop" "Process record is stopped and all execution logs are deleted."
+
+  gdb_test "disconnect" "Ending remote debugging."
+  gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
+}
+
+# Test that recording is now off.
+with_test_prefix "third" {
+  gdb_test "info record" "No record target is currently active."
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto.c ./gdb/testsuite/gdb.btrace/record_goto.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/record_goto.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto.exp ./gdb/testsuite/gdb.btrace/record_goto.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/record_goto.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,8 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
 # The "record goto" command jumps to a specific instruction in the execution
 # trace.  To guarantee that we always get the same execution trace, we use
@@ -33,19 +35,23 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/record_goto.exp COMPILE=1"
     standard_testfile record_goto.c
     lappend opts debug
-} elseif {[istarget "x86_64-*-*"]} {
-	standard_testfile x86_64-record_goto.S
-} elseif {[istarget "i?86-*-*"]} {
-	standard_testfile i686-record_goto.S
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+	if {[is_amd64_regs_target]} {
+		standard_testfile x86_64-record_goto.S
+	} else {
+		standard_testfile i686-record_goto.S
+	}
 } else {
-    verbose "Skipping ${testfile}."
+    unsupported "target architecture not supported"
     return -1
 }
 
-if [prepare_for_testing record_goto.exp $testfile $srcfile $opts] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto-step.exp ./gdb/testsuite/gdb.btrace/record_goto-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/record_goto-step.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/record_goto-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2013-2017 Free Software Foundation, Inc.
+#
+# Contributed by Intel Corp. <markus.t.metzger@intel.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+
+standard_testfile record_goto.c
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
+    return -1
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+set bp [gdb_get_line_number "fun4.3" $srcfile]
+gdb_breakpoint $srcfile:$bp
+
+# record the execution until we hit a breakpoint
+gdb_test_no_output "record btrace"
+gdb_continue_to_breakpoint "cont to $bp" ".*fun4\.3.*"
+
+# reverse-step, then jump to the end of the trace
+gdb_test "reverse-next" ".*fun4\.2.*"
+gdb_test "record goto end" ".*fun4\.3.*"
+
+# test that we can step away from a breakpoint after jumping to
+# the breakpoint PC
+gdb_test "next" ".*fun4\.4.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/rn-dl-bind.c ./gdb/testsuite/gdb.btrace/rn-dl-bind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/rn-dl-bind.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/rn-dl-bind.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/rn-dl-bind.exp ./gdb/testsuite/gdb.btrace/rn-dl-bind.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/rn-dl-bind.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/rn-dl-bind.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -21,15 +21,18 @@
 # Test that we can reverse-next over the dynamic linker's symbol
 # lookup code.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
-if [prepare_for_testing $testfile.exp $testfile $srcfile {c++ debug}] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/segv.c ./gdb/testsuite/gdb.btrace/segv.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/segv.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/segv.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/segv.exp ./gdb/testsuite/gdb.btrace/segv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/segv.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/segv.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,15 +17,17 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
-if [prepare_for_testing $testfile.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/step.exp ./gdb/testsuite/gdb.btrace/step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/step.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,17 +17,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
 standard_testfile record_goto.c
-
-# start inferior
-if [prepare_for_testing step.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/stepi.exp ./gdb/testsuite/gdb.btrace/stepi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/stepi.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/stepi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,8 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
 # This test is stepping on instruction level.  To guarantee that we always
 # get the same execution trace, we use an assembly source file.
@@ -27,25 +29,32 @@ if { [skip_btrace_tests] } { return -1 }
 #
 # Luckily, they are similar enough that a single test script can handle
 # both.
-if {[istarget "x86_64-*-*"]} {
-	standard_testfile x86_64-record_goto.S
-} elseif {[istarget "i?86-*-*"]} {
-	standard_testfile i686-record_goto.S
+if [info exists COMPILE] {
+    # make check RUNTESTFLAGS="gdb.btrace/stepi.exp COMPILE=1"
+    standard_testfile record_goto.c
+    lappend opts debug
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+	if {[is_amd64_regs_target]} {
+		standard_testfile x86_64-record_goto.S
+	} else {
+		standard_testfile i686-record_goto.S
+	}
 } else {
-	return -1
+    unsupported "target architecture not supported"
+    return -1
 }
 
-# start inferior
-if [prepare_for_testing stepi.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
 
-global gdb_prompt
-
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
+global gdb_prompt
+
 proc check_replay_at { insn } {
   gdb_test "info record" [multi_line \
     "Active record target: record-btrace" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall.c ./gdb/testsuite/gdb.btrace/tailcall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tailcall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall.exp ./gdb/testsuite/gdb.btrace/tailcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tailcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,8 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
 # This test requires the compiler to generate a tail call.  To guarantee that
 # we always get one, we use an assembly source file.
@@ -32,19 +34,22 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/tailcall.exp COMPILE=1"
     standard_testfile tailcall.c
     lappend opts debug optimize=-O2
-} elseif {[istarget "x86_64-*-*"]} {
-	standard_testfile x86_64-tailcall.S
-} elseif {[istarget "i?86-*-*"]} {
-	standard_testfile i686-tailcall.S
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+	if {[is_amd64_regs_target]} {
+		standard_testfile x86_64-tailcall.S
+	} else {
+		standard_testfile i686-tailcall.S
+	}
 } else {
-    verbose "Skipping ${testfile}."
-    return
+    unsupported "target architecture not supported"
+    return -1
 }
 
-if [prepare_for_testing tailcall.exp $testfile $srcfile $opts] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
     return -1
 }
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall-only.c ./gdb/testsuite/gdb.btrace/tailcall-only.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall-only.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tailcall-only.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,53 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   Contributed by Intel Corp. <markus.t.metzger@intel.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static __attribute__ ((noinline)) int
+bar_1 (void)
+{
+  return 42;
+}
+
+static __attribute__ ((noinline)) int
+bar (void)
+{
+  return bar_1 ();
+}
+
+static __attribute__ ((noinline)) int
+foo_1 (void)
+{
+  return bar ();
+}
+
+static __attribute__ ((noinline)) int
+foo (void)
+{
+  return foo_1 ();
+}
+
+int
+main (void)
+{
+  int answer;
+
+  answer = foo ();
+  answer += 1;
+
+  return answer;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall-only.exp ./gdb/testsuite/gdb.btrace/tailcall-only.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tailcall-only.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tailcall-only.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,103 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# This is a variant of tailcall.exp where the entire trace contains only tail
+# calls.  This used to cause a crash in get_frame_type.
+#
+
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
+
+# This test requires the compiler to generate a tail call.  To guarantee that
+# we always get one, we use an assembly source file.
+#
+# We use different assembly sources based on the target architecture.
+#
+# Luckily, they are similar enough that a single test script can handle
+# both.
+set opts {}
+if [info exists COMPILE] {
+    # make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1"
+    standard_testfile tailcall-only.c
+    lappend opts debug optimize=-O2
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+	if {[is_amd64_regs_target]} {
+		standard_testfile x86_64-tailcall-only.S
+	} else {
+		standard_testfile i686-tailcall-only.S
+	}
+} else {
+    unsupported "target architecture not supported"
+    return -1
+}
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
+    return -1
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+# we want to see the full trace for this test
+gdb_test_no_output "set record function-call-history-size 0"
+
+# trace foo
+gdb_test "step" ".*" "prepare for recording"
+gdb_test_no_output "record btrace"
+gdb_test "stepi 4" ".*" "record branch trace"
+
+# for debugging
+gdb_test "info record" ".*"
+
+# show the branch trace with calls indented
+gdb_test "record function-call-history /c 1" [multi_line \
+  "1\tfoo" \
+  "2\t  foo_1" \
+  "3\t    bar" \
+  "4\t      bar_1"
+  ] "function-call-history"
+
+# We can step
+gdb_test "record goto begin" ".*foo.*"
+gdb_test "stepi" ".*foo_1.*" "step into foo_1"
+gdb_test "step" ".*bar.*" "step into bar"
+gdb_test "stepi" ".*bar_1.*" "step into bar_1"
+
+# We can neither finish nor return.
+gdb_test "finish" "Cannot find the caller frame.*"
+gdb_test_multiple "return" "return" {
+  -re "Make .* return now.*y or n. $" {
+    send_gdb "y\n"
+    exp_continue
+  }
+  -re "Cannot find the caller frame.*$gdb_prompt $" {
+    pass "return"
+  }
+}
+
+# But we can reverse-finish
+gdb_test "reverse-finish" ".*bar.*"
+gdb_test "reverse-step" ".*foo_1.*"
+
+# Info frame isn't useful but doesn't crash as it used to.
+gdb_test "up" ".*foo.*"
+gdb_test "info frame" ".*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tsx.c ./gdb/testsuite/gdb.btrace/tsx.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tsx.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tsx.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+
+extern void test (void);
+
+int
+main (void)
+{
+  test ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tsx.exp ./gdb/testsuite/gdb.btrace/tsx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/tsx.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/tsx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,74 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_btrace_pt_tests] } {
+    unsupported "target does not support PT"
+    return -1
+}
+
+if { [skip_tsx_tests] } {
+    unsupported "target does not support TSX"
+    return -1
+}
+
+standard_testfile .c x86-tsx.S
+if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
+    return -1
+}
+
+if ![runto_main] {
+    untested "failed to run to main"
+    return -1
+}
+
+# record the test
+gdb_test_no_output "record btrace pt"
+gdb_test "next"
+
+# look at the instruction trace
+set begin_to_end [multi_line \
+    ".*" \
+    "\[0-9\]*\t\\?  0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t\\?  0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t   0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txend\[^\\\r\\\n\]*" \
+    ]
+set abort_1 [multi_line \
+    ".*" \
+    "\[0-9\]*\t\\?  0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t   0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t   0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
+    ]
+set abort_2 [multi_line \
+    ".*" \
+    "\[0-9\]*\t\\?  0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t\\?  0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t   0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+    "\[0-9\]*\t   0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
+    ]
+
+set test "speculation indication"
+gdb_test_multiple "record instruction-history" $test {
+    -re "$abort_1.*$gdb_prompt $" {
+        pass $test
+    }
+    -re "$abort_2.*$gdb_prompt $" {
+        pass $test
+    }
+    -re  "$begin_to_end.*$gdb_prompt $" {
+        pass $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/unknown_functions.c ./gdb/testsuite/gdb.btrace/unknown_functions.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/unknown_functions.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/unknown_functions.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/unknown_functions.exp ./gdb/testsuite/gdb.btrace/unknown_functions.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/unknown_functions.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/unknown_functions.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -17,18 +17,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
 
 # discard local symbols
 set ldflags "additional_flags=-Wl,-x"
-if [prepare_for_testing $testfile.exp $testfile $srcfile $ldflags] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $ldflags] {
     return -1
 }
+
 if ![runto test] {
+    untested "failed to run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/vdso.c ./gdb/testsuite/gdb.btrace/vdso.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/vdso.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/vdso.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -24,7 +24,7 @@ main (void)
 {
   struct timeval tv;
 
-  gettimeofday (&tv, 0); /* main.1.  */
+  gettimeofday (&tv, 0);
 
-  return 0; /* main.2.  */
+  return 0;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/vdso.exp ./gdb/testsuite/gdb.btrace/vdso.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/vdso.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/vdso.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -20,15 +20,18 @@
 #
 # Test that we can access the vdso memory during replay for stepping.
 
-# check for btrace support
-if { [skip_btrace_tests] } { return -1 }
+if { [skip_btrace_tests] } {
+    unsupported "target does not support record-btrace"
+    return -1
+}
 
-# start inferior
 standard_testfile
-if [prepare_for_testing $testfile.exp $testfile $srcfile] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
     return -1
 }
+
 if ![runto_main] {
+    untested "failed to run to main"
     return -1
 }
 
@@ -37,11 +40,14 @@ set live_gettimeofday [capture_command_o
 
 # trace the test code
 gdb_test_no_output "record btrace"
-gdb_test "next" "main\.2.*"
+gdb_test "stepi" ".*"
 
 with_test_prefix "replay" {
+	# start replaying
+	gdb_test "record goto begin" ".*"
+	gdb_test "info record" "Replay in progress\.\[^\\\r\\\n\]*"
+
 	# capture the disassembly of gettimeofday while replaying
-	gdb_test "record goto begin" "main\.1.*"
 	set replay_gettimeofday [capture_command_output "disassemble gettimeofday" ""]
 
 	# the two disassemblies must be identical
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-record_goto.S ./gdb/testsuite/gdb.btrace/x86_64-record_goto.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-record_goto.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/x86_64-record_goto.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-tailcall-only.S ./gdb/testsuite/gdb.btrace/x86_64-tailcall-only.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-tailcall-only.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/x86_64-tailcall-only.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,446 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+   This file has been generated using:
+   gcc -S -O2 -dA -g tailcall-only.c -o x86_64-tailcall-only.S  */
+
+	.file	"tailcall-only.c"
+	.text
+.Ltext0:
+	.p2align 4,,15
+	.type	bar_1, @function
+bar_1:
+.LFB0:
+	.file 1 "tailcall-only.c"
+	# tailcall-only.c:22
+	.loc 1 22 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:24
+	.loc 1 24 0
+	movl	$42, %eax
+# SUCC: EXIT [100.0%]
+	ret
+	.cfi_endproc
+.LFE0:
+	.size	bar_1, .-bar_1
+	.p2align 4,,15
+	.type	bar, @function
+bar:
+.LFB1:
+	# tailcall-only.c:28
+	.loc 1 28 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:29
+	.loc 1 29 0
+	jmp	bar_1
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL0:
+	.cfi_endproc
+.LFE1:
+	.size	bar, .-bar
+	.p2align 4,,15
+	.type	foo_1, @function
+foo_1:
+.LFB2:
+	# tailcall-only.c:34
+	.loc 1 34 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:35
+	.loc 1 35 0
+	jmp	bar
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL1:
+	.cfi_endproc
+.LFE2:
+	.size	foo_1, .-foo_1
+	.p2align 4,,15
+	.type	foo, @function
+foo:
+.LFB3:
+	# tailcall-only.c:40
+	.loc 1 40 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:41
+	.loc 1 41 0
+	jmp	foo_1
+# SUCC: EXIT [100.0%]  (ABNORMAL,SIBCALL)
+.LVL2:
+	.cfi_endproc
+.LFE3:
+	.size	foo, .-foo
+	.section	.text.startup,"ax",@progbits
+	.p2align 4,,15
+	.globl	main
+	.type	main, @function
+main:
+.LFB4:
+	# tailcall-only.c:46
+	.loc 1 46 0
+	.cfi_startproc
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# tailcall-only.c:49
+	.loc 1 49 0
+	call	foo
+.LVL3:
+	# tailcall-only.c:50
+	.loc 1 50 0
+	addl	$1, %eax
+.LVL4:
+# SUCC: EXIT [100.0%]
+	# tailcall-only.c:53
+	.loc 1 53 0
+	ret
+	.cfi_endproc
+.LFE4:
+	.size	main, .-main
+	.text
+.Letext0:
+	.section	.debug_info,"",@progbits
+.Ldebug_info0:
+	.long	0x111	# Length of Compilation Unit Info
+	.value	0x4	# DWARF version number
+	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
+	.byte	0x8	# Pointer Size (in bytes)
+	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
+	.long	.LASF1	# DW_AT_producer: "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2"
+	.byte	0x1	# DW_AT_language
+	.long	.LASF2	# DW_AT_name: "tailcall-only.c"
+	.long	.LASF3	# DW_AT_comp_dir: ""
+	.long	.Ldebug_ranges0+0	# DW_AT_ranges
+	.quad	0	# DW_AT_low_pc
+	.long	.Ldebug_line0	# DW_AT_stmt_list
+	.uleb128 0x2	# (DIE (0x29) DW_TAG_subprogram)
+	.long	.LASF4	# DW_AT_name: "bar_1"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x15	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x46	# DW_AT_type
+	.quad	.LFB0	# DW_AT_low_pc
+	.quad	.LFE0-.LFB0	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.uleb128 0x3	# (DIE (0x46) DW_TAG_base_type)
+	.byte	0x4	# DW_AT_byte_size
+	.byte	0x5	# DW_AT_encoding
+	.ascii "int\0"	# DW_AT_name
+	.uleb128 0x4	# (DIE (0x4d) DW_TAG_subprogram)
+	.ascii "bar\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x1b	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x46	# DW_AT_type
+	.quad	.LFB1	# DW_AT_low_pc
+	.quad	.LFE1-.LFB1	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x7c	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0x6e) DW_TAG_GNU_call_site)
+	.quad	.LVL0	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x29	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0x4d
+	.uleb128 0x6	# (DIE (0x7c) DW_TAG_subprogram)
+	.long	.LASF0	# DW_AT_name: "foo_1"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x21	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x46	# DW_AT_type
+	.quad	.LFB2	# DW_AT_low_pc
+	.quad	.LFE2-.LFB2	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0xab	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0x9d) DW_TAG_GNU_call_site)
+	.quad	.LVL1	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x4d	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0x7c
+	.uleb128 0x4	# (DIE (0xab) DW_TAG_subprogram)
+	.ascii "foo\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x27	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x46	# DW_AT_type
+	.quad	.LFB3	# DW_AT_low_pc
+	.quad	.LFE3-.LFB3	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0xda	# DW_AT_sibling
+	.uleb128 0x5	# (DIE (0xcc) DW_TAG_GNU_call_site)
+	.quad	.LVL2	# DW_AT_low_pc
+			# DW_AT_GNU_tail_call
+	.long	0x7c	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0xab
+	.uleb128 0x7	# (DIE (0xda) DW_TAG_subprogram)
+			# DW_AT_external
+	.long	.LASF5	# DW_AT_name: "main"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x2d	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x46	# DW_AT_type
+	.quad	.LFB4	# DW_AT_low_pc
+	.quad	.LFE4-.LFB4	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.uleb128 0x8	# (DIE (0xf7) DW_TAG_variable)
+	.long	.LASF6	# DW_AT_name: "answer"
+	.byte	0x1	# DW_AT_decl_file (tailcall-only.c)
+	.byte	0x2f	# DW_AT_decl_line
+	.long	0x46	# DW_AT_type
+	.long	.LLST0	# DW_AT_location
+	.uleb128 0x9	# (DIE (0x106) DW_TAG_GNU_call_site)
+	.quad	.LVL3	# DW_AT_low_pc
+	.long	0xab	# DW_AT_abstract_origin
+	.byte	0	# end of children of DIE 0xda
+	.byte	0	# end of children of DIE 0xb
+	.section	.debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+	.uleb128 0x1	# (abbrev code)
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x25	# (DW_AT_producer)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x13	# (DW_AT_language)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x1b	# (DW_AT_comp_dir)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x55	# (DW_AT_ranges)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x10	# (DW_AT_stmt_list)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x2	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.byte	0
+	.byte	0
+	.uleb128 0x3	# (abbrev code)
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3e	# (DW_AT_encoding)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.byte	0
+	.byte	0
+	.uleb128 0x4	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x5	# (abbrev code)
+	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
+	.byte	0	# DW_children_no
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x2115	# (DW_AT_GNU_tail_call)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x6	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x7	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.byte	0
+	.byte	0
+	.uleb128 0x8	# (abbrev code)
+	.uleb128 0x34	# (TAG: DW_TAG_variable)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x9	# (abbrev code)
+	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
+	.byte	0	# DW_children_no
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.byte	0
+	.section	.debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+	.quad	.LVL3	# Location list begin address (*.LLST0)
+	.quad	.LVL4	# Location list end address (*.LLST0)
+	.value	0x3	# Location expression size
+	.byte	0x70	# DW_OP_breg0
+	.sleb128 1
+	.byte	0x9f	# DW_OP_stack_value
+	.quad	.LVL4	# Location list begin address (*.LLST0)
+	.quad	.LFE4	# Location list end address (*.LLST0)
+	.value	0x1	# Location expression size
+	.byte	0x50	# DW_OP_reg0
+	.quad	0	# Location list terminator begin (*.LLST0)
+	.quad	0	# Location list terminator end (*.LLST0)
+	.section	.debug_aranges,"",@progbits
+	.long	0x3c	# Length of Address Ranges Info
+	.value	0x2	# DWARF Version
+	.long	.Ldebug_info0	# Offset of Compilation Unit Info
+	.byte	0x8	# Size of Address
+	.byte	0	# Size of Segment Descriptor
+	.value	0	# Pad to 16 byte boundary
+	.value	0
+	.quad	.Ltext0	# Address
+	.quad	.Letext0-.Ltext0	# Length
+	.quad	.LFB4	# Address
+	.quad	.LFE4-.LFB4	# Length
+	.quad	0
+	.quad	0
+	.section	.debug_ranges,"",@progbits
+.Ldebug_ranges0:
+	.quad	.Ltext0	# Offset 0
+	.quad	.Letext0
+	.quad	.LFB4	# Offset 0x10
+	.quad	.LFE4
+	.quad	0
+	.quad	0
+	.section	.debug_line,"",@progbits
+.Ldebug_line0:
+	.section	.debug_str,"MS",@progbits,1
+.LASF4:
+	.string	"bar_1"
+.LASF2:
+	.string	"tailcall-only.c"
+.LASF1:
+	.string	"GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2"
+.LASF6:
+	.string	"answer"
+.LASF5:
+	.string	"main"
+.LASF3:
+	.string	""
+.LASF0:
+	.string	"foo_1"
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-tailcall.S ./gdb/testsuite/gdb.btrace/x86_64-tailcall.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86_64-tailcall.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/x86_64-tailcall.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86-tsx.S ./gdb/testsuite/gdb.btrace/x86-tsx.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.btrace/x86-tsx.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.btrace/x86-tsx.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+	.globl test
+	.type  test, @function
+
+test:
+	xbegin .Lhandler
+	mov $0, %eax
+	xend
+	ret
+.Lhandler:
+	mov $1, %eax
+	ret
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/arch.exp ./gdb/testsuite/gdb.cell/arch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/arch.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/arch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -61,7 +61,7 @@ gdb_test "show architecture" \
 	 "startup architecture is powerpc:common"
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
@@ -78,15 +78,15 @@ check_spu_arch ""
 send_gdb "thread\n"
 gdb_expect 10 {
     -re "Current thread is (\[0-9\]*) .*\r\n$gdb_prompt $" {
-	pass "Retrieve current thread"
+	pass "retrieve current thread"
 	set thread_id $expect_out(1,string)
     }
     -re "$gdb_prompt $" {
-	fail "Retrieve current thread"
+	fail "retrieve current thread"
 	return 0
     }
     timeout {
-	fail "Retrieve current thread (timed out)"
+	fail "retrieve current thread (timed out)"
 	return 0
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break.c ./gdb/testsuite/gdb.cell/break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break.exp ./gdb/testsuite/gdb.cell/break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,16 +34,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -60,14 +60,14 @@ gdb_load ${ppu_bin}
 # shouldn't prompt for anything.
 gdb_test "delete breakpoints" \
 	 "" \
-	 "No prompt when deleting non-existing breakpoints"
+	 "no prompt when deleting non-existing breakpoints"
 
 gdb_test "break main" \
 	 "Breakpoint.*at.* file .*$testfile.c, line.*" \
 	 "breakpoint main in ppu"
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
@@ -84,7 +84,7 @@ gdb_expect {
   -re ".*$spu_file.c.*Make breakpoint pending.*y or \\\[n\\\]. $" {
     gdb_test "y" "Breakpoint.*$spu_file.*pending." "set pending breakpoint"
   }
-  timeout { fail "Timeout while setting breakpoint in spu binary" }
+  timeout { fail "timeout while setting breakpoint in spu binary" }
 }
 
 # Check breakpoints.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break-spu.c ./gdb/testsuite/gdb.cell/break-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/break-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/break-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt2-spu.c ./gdb/testsuite/gdb.cell/bt2-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt2-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/bt2-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt.c ./gdb/testsuite/gdb.cell/bt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/bt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt.exp ./gdb/testsuite/gdb.cell/bt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/bt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,24 +37,24 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binaries.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_spu $spu2_src $spu2_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_cell_embedspu $spu2_bin $spu2_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o $spu2_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -68,7 +68,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt-spu.c ./gdb/testsuite/gdb.cell/bt-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/bt-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/bt-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/core.exp ./gdb/testsuite/gdb.cell/core.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/core.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/core.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,16 +38,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/coremaker.c ./gdb/testsuite/gdb.cell/coremaker.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/coremaker.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/coremaker.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/coremaker-spu.c ./gdb/testsuite/gdb.cell/coremaker-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/coremaker-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/coremaker-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data.c ./gdb/testsuite/gdb.cell/data.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/data.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data.exp ./gdb/testsuite/gdb.cell/data.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/data.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,16 +34,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -74,7 +74,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data-spu.c ./gdb/testsuite/gdb.cell/data-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/data-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/data-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/dwarfaddr.exp ./gdb/testsuite/gdb.cell/dwarfaddr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/dwarfaddr.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/dwarfaddr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $srcfile $binary executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 
@@ -40,7 +40,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binary}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/dwarfaddr.S ./gdb/testsuite/gdb.cell/dwarfaddr.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/dwarfaddr.S	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/dwarfaddr.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache.c ./gdb/testsuite/gdb.cell/ea-cache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-cache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache.exp ./gdb/testsuite/gdb.cell/ea-cache.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-cache.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -56,7 +56,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
@@ -78,7 +78,7 @@ gdb_test "p *ppe_int_ptr" \
 # int_var and should now also contain 42 (ea cache has been flushed).
 gdb_test "t 1" \
 	 ".*Switching to thread 1.*" \
-	 "Switch to thread 1"
+	 "switch to thread 1"
 
 gdb_test "p int_var" \
 	 ".*=.*42.*" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache-spu.c ./gdb/testsuite/gdb.cell/ea-cache-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-cache-spu.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-cache-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-standalone.c ./gdb/testsuite/gdb.cell/ea-standalone.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-standalone.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-standalone.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-standalone.exp ./gdb/testsuite/gdb.cell/ea-standalone.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-standalone.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-standalone.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $srcfile $binary executable {debug}]  != "" } {
-  unsupported "Compile spu binary failed, so all tests in this file will automatically fail."
+  unsupported "failed to compile"
   return -1
 }
 
@@ -40,7 +40,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binary}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-test.c ./gdb/testsuite/gdb.cell/ea-test.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-test.c	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-test.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-test.exp ./gdb/testsuite/gdb.cell/ea-test.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ea-test.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ea-test.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $source $binary executable {debug}]  != "" } {
-  unsupported "Compile spu binary failed, so all tests in this file will automatically fail."
+  unsupported "failed to compile"
   return -1
 }
 
@@ -40,7 +40,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binary}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork.c ./gdb/testsuite/gdb.cell/fork.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/fork.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork.exp ./gdb/testsuite/gdb.cell/fork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/fork.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,16 +34,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -57,7 +57,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork-spu.c ./gdb/testsuite/gdb.cell/fork-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/fork-spu.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/fork-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/f-regs.exp ./gdb/testsuite/gdb.cell/f-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/f-regs.exp	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/f-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -74,7 +74,7 @@ gdb_test "info all-registers" \
          "info all-registers"
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/gcore.exp ./gdb/testsuite/gdb.cell/gcore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/gcore.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/gcore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,16 +38,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -61,7 +61,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/Makefile.in ./gdb/testsuite/gdb.cell/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = break bt coremaker data mem-access size
-
-SPU_EXECUTABLES = break-spu bt-spu bt2-spu coremaker-spu data-spu \
-		  ea-cache-spu ea-standalone ea-test mem-access-spu size-spu
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out core corefile gcore.test
-	-rm -f *.dwo *.dwp
-	-rm -f $(EXECUTABLES) $(SPU_EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access.c ./gdb/testsuite/gdb.cell/mem-access.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/mem-access.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access.exp ./gdb/testsuite/gdb.cell/mem-access.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/mem-access.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,16 +34,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -146,7 +146,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access-spu.c ./gdb/testsuite/gdb.cell/mem-access-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/mem-access-spu.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/mem-access-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ptype.exp ./gdb/testsuite/gdb.cell/ptype.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/ptype.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/ptype.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -56,7 +56,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/registers.exp ./gdb/testsuite/gdb.cell/registers.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/registers.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/registers.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -61,7 +61,7 @@ gdb_test "info all-registers" \
 	  "info all-registers"
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/size.c ./gdb/testsuite/gdb.cell/size.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/size.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/size.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/sizeof.exp ./gdb/testsuite/gdb.cell/sizeof.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/sizeof.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/sizeof.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -88,7 +88,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/size-spu.c ./gdb/testsuite/gdb.cell/size-spu.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/size-spu.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/size-spu.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/solib.exp ./gdb/testsuite/gdb.cell/solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/solib.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/solib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -62,7 +62,7 @@ gdb_test "info sharedlibrary" \
 	 "no shared library is loaded"
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/solib-symbol.exp ./gdb/testsuite/gdb.cell/solib-symbol.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cell/solib-symbol.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cell/solib-symbol.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,16 +33,16 @@ if {[skip_cell_tests]} {
 
 # Compile SPU binary.
 if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
-  unsupported "Compiling spu binary failed."
+  unsupported "compiling spu binary failed."
   return -1
 }
 # Compile PPU binary.
 if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
-  unsupported "Embedding spu binary failed."
+  unsupported "embedding spu binary failed."
   return -1
 }
 if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
-  unsupported "Compiling ppu binary failed."
+  unsupported "compiling ppu binary failed."
   return -1
 }
 
@@ -57,7 +57,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${ppu_bin}
 
 if ![runto_main] then {
-  fail "Can't run to main"
+  fail "can't run to main"
   return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile.c ./gdb/testsuite/gdb.compile/compile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ struct struct_type {
   float floatfield;
   double doublefield;
   const union union_type *ptrfield;
-  struct struct_type *selffield;
+  volatile struct struct_type *selffield;
   int arrayfield[5];
   _Complex double complexfield;
   _Bool boolfield;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-constvar.c ./gdb/testsuite/gdb.compile/compile-constvar.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-constvar.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-constvar.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-constvar.S ./gdb/testsuite/gdb.compile/compile-constvar.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-constvar.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-constvar.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile.exp ./gdb/testsuite/gdb.compile/compile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,15 +42,15 @@ clean_restart ${testfile}
 #
 gdb_test "compile code int i=2;" \
     "The program must be running for the compile command to work.*" \
-    "Test compile code command without running inferior"
+    "test compile code command without running inferior"
 
 gdb_test "compile int i=2;" \
     "The program must be running for the compile command to work.*" \
-    "Test compile command without running inferior"
+    "test compile command without running inferior"
 
 gdb_test "compile file -r ${srcdir}/${subdir}/${testfile}-mod.c" \
     "The program must be running for the compile command to work.*" \
-    "Test compile file command without running inferior"
+    "test compile file command without running inferior"
 
 if ![runto_main] {
     return -1
@@ -66,20 +66,20 @@ if {[skip_compile_feature_tests]} {
 #
 
 gdb_test_no_output "compile -- f = 10" \
-    "Test abbreviations and code delimiter"
+    "test abbreviations and code delimiter"
 
 gdb_test "compile f = 10;" ".*= 10;: No such file.*" \
     "Test abbreviations and code collision"
 
 gdb_test_no_output "compile -r -- void _gdb_expr(){int i = 5;}" \
-    "Test delimiter with -r"
+    "test delimiter with -r"
 
 gdb_test_no_output "compile -raw -- void _gdb_expr(){int i = 5;}" \
-    "Test delimiter with -raw"
+    "test delimiter with -raw"
 
 gdb_test "compile -- -r  void _gdb_expr(){int i = 5;}" \
     ".* error: 'r' undeclared \\(first use in this function\\).*" \
-    "Test delimiter with -r after it"
+    "test delimiter with -r after it"
 
 gdb_test "p globalvar" " = 10" "expect 10"
 
@@ -189,51 +189,61 @@ gdb_test "p localvar" " = 1"
 # Test setting fields and also many different types.
 #
 
+set skip_struct_object 0
 set test "compile code struct_object.selffield = &struct_object"
 gdb_test_multiple $test $test {
     -re "^$test\r\n$gdb_prompt $" {
 	pass "$test"
     }
-    -re "gdb command line:1:25: warning: assignment discards 'volatile' qualifier from pointer target type \\\[-Wdiscarded-qualifiers\\\]\r\n$gdb_prompt $" {
+    -re " error: Unexpected type id from GCC, check you use recent enough GCC\\.\r\n.*\r\n$gdb_prompt $" {
 	xfail "$test (PR compile/18202)"
+
+	# All following tests will break with the same error message.
+	set skip_struct_object 1
     }
 }
-gdb_test "print struct_object.selffield == &struct_object" " = 1"
 
-gdb_test_no_output "compile code struct_object.charfield = 1"
-gdb_test "print struct_object.charfield" " = 1 '\\\\001'"
-gdb_test_no_output "compile code struct_object.ucharfield = 1"
-gdb_test "print struct_object.ucharfield" " = 1 '\\\\001'"
-
-foreach {field value} {
-    shortfield -5
-    ushortfield 5
-    intfield -7
-    uintfield 7
-    bitfield 2
-    longfield -9
-    ulongfield 9
-    enumfield ONE
-    floatfield 1
-    doublefield 2
-} {
-    gdb_test_no_output "compile code struct_object.$field = $value"
-    gdb_test "print struct_object.$field" " = $value"
-}
-
-gdb_test_no_output "compile code struct_object.arrayfield\[2\] = 7"
-gdb_test "print struct_object.arrayfield" \
-    " = \\{0, 0, 7, 0, 0\\}"
-
-gdb_test_no_output "compile code struct_object.complexfield = 7 + 5i"
-gdb_test "print struct_object.complexfield" " = 7 \\+ 5 \\* I"
-
-gdb_test_no_output "compile code struct_object.boolfield = 1"
-gdb_test "print struct_object.boolfield" " = true"
-
-gdb_test_no_output "compile code struct_object.vectorfield\[2\] = 7"
-gdb_test "print struct_object.vectorfield" \
-    " = \\{0, 0, 7, 0\\}"
+if {$skip_struct_object} {
+    untested "all struct_object tests"
+} else {
+    gdb_test "print struct_object.selffield == &struct_object" " = 1"
+
+    gdb_test_no_output "compile code struct_object.charfield = 1"
+    gdb_test "print struct_object.charfield" " = 1 '\\\\001'"
+    gdb_test_no_output "compile code struct_object.ucharfield = 1"
+    gdb_test "print struct_object.ucharfield" " = 1 '\\\\001'"
+
+    foreach {field value} {
+	shortfield -5
+	ushortfield 5
+	intfield -7
+	uintfield 7
+	bitfield 2
+	longfield -9
+	ulongfield 9
+	enumfield ONE
+	floatfield 1
+	doublefield 2
+    } {
+	gdb_test_no_output "compile code struct_object.$field = $value"
+	gdb_test "print struct_object.$field" " = $value"
+    }
+
+    gdb_test_no_output "compile code struct_object.arrayfield\[2\] = 7"
+    gdb_test "print struct_object.arrayfield" \
+	" = \\{0, 0, 7, 0, 0\\}"
+
+    gdb_test_no_output "compile code struct_object.complexfield = 7 + 5i"
+    gdb_test "print struct_object.complexfield" " = 7 \\+ 5 \\* I"
+
+    gdb_test_no_output "compile code struct_object.boolfield = 1"
+    gdb_test "print struct_object.boolfield" " = true"
+
+    gdb_test_no_output "compile code struct_object.vectorfield\[2\] = 7"
+    gdb_test "print struct_object.vectorfield" \
+	" = \\{0, 0, 7, 0\\}"
+
+}
 
 gdb_test_no_output "compile code union_object.typedeffield = 7"
 gdb_test "print union_object.typedeffield" " = 7"
@@ -312,9 +322,9 @@ gdb_test "show compile-args" \
     "Compile command command-line arguments are .*"
 gdb_test "compile code -z" "Unknown argument.*"
 
-gdb_test "set lang java" \
+gdb_test "set lang rust" \
     "Warning: the current language does not match this frame."
-gdb_test "compile code globalvar" "No compiler support for this language\."
+gdb_test "compile code globalvar" "No compiler support for language rust\\."
 gdb_test_no_output "set lang auto"
 
 gdb_test_no_output "compile code union union_type newdecl_u"
@@ -329,7 +339,7 @@ gdb_test "compile file -r" \
     "Test compile file and raw option without a filename"
 gdb_test "compile file -z" \
     "Unknown argument.*" \
-    "Test compile file with unknown argument"
+    "test compile file with unknown argument"
 
 
 # LOC_CONST tests.
@@ -352,13 +362,17 @@ if {[skip_shlib_tests]} {
 }
 
 set libbin [standard_output_file ${testfile}-shlib.so]
+set binfile [standard_output_file ${testfile}-shlib]
+
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile2} $libbin {debug}] != ""
-     || [build_executable $testfile ${testfile}-shlib $srcfile \
-	     [list debug ldflags=$libbin]] == -1 } {
+     || [gdb_compile ${srcdir}/${subdir}/${srcfile} $binfile executable \
+	     [list debug shlib=$libbin]] == -1 } {
     return -1
 }
 
-clean_restart ${testfile}-shlib
+clean_restart $binfile
+gdb_load_shlib $libbin
+
 if ![runto_main] {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ifunc.c ./gdb/testsuite/gdb.compile/compile-ifunc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ifunc.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-ifunc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ifunc.exp ./gdb/testsuite/gdb.compile/compile-ifunc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ifunc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-ifunc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ standard_testfile
 
 with_test_prefix "nodebug" {
 
-    if { [prepare_for_testing ${testfile}.exp "$testfile-nodebug" $srcfile {}] } {
+    if { [prepare_for_testing "failed to prepare" "$testfile-nodebug" $srcfile {}] } {
 	return -1
     }
 
@@ -25,6 +25,12 @@ with_test_prefix "nodebug" {
 	return -1
     }
 
+    # This binary has no debug information, so force the language to C in case
+    # GDB happened to see real asm code when it stopped at the entry point
+    # when talking to a remote target, like gdbserver.  This guarantees the
+    # feature check below will work.
+    gdb_test_no_output "set language c" ""
+
     if {[skip_compile_feature_tests]} {
 	untested "compile command not supported (could not find libcc1 shared library?)"
 	return -1
@@ -38,7 +44,7 @@ with_test_prefix "nodebug" {
 
 with_test_prefix "debug" {
 
-    if { [prepare_for_testing ${testfile}.exp "$testfile-debug" $srcfile] } {
+    if { [prepare_for_testing "failed to prepare" "$testfile-debug" $srcfile] } {
 	return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-mod.c ./gdb/testsuite/gdb.compile/compile-mod.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-mod.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-mod.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-nodebug.c ./gdb/testsuite/gdb.compile/compile-nodebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-nodebug.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-nodebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ops.c ./gdb/testsuite/gdb.compile/compile-ops.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ops.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-ops.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ops.exp ./gdb/testsuite/gdb.compile/compile-ops.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-ops.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-ops.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -401,7 +401,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-print.c ./gdb/testsuite/gdb.compile/compile-print.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-print.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-print.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-print.exp ./gdb/testsuite/gdb.compile/compile-print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-print.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp "$testfile"] } {
+if { [prepare_for_testing "failed to prepare" "$testfile"] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp.c ./gdb/testsuite/gdb.compile/compile-setjmp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-setjmp.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp.exp ./gdb/testsuite/gdb.compile/compile-setjmp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-setjmp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .c compile-setjmp-mod.c
 
-if { [prepare_for_testing ${testfile}.exp $testfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp-mod.c ./gdb/testsuite/gdb.compile/compile-setjmp-mod.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-setjmp-mod.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-setjmp-mod.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-shlib.c ./gdb/testsuite/gdb.compile/compile-shlib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-shlib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-shlib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-tls.c ./gdb/testsuite/gdb.compile/compile-tls.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-tls.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-tls.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-tls.exp ./gdb/testsuite/gdb.compile/compile-tls.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/compile-tls.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/compile-tls.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 
 clean_restart ${binfile}
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/Makefile ./gdb/testsuite/gdb.compile/Makefile
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/Makefile	2015-07-06 01:51:07.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/Makefile	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-
-srcdir = .
-
-EXECUTABLES = \
-	chan handcall hello integers methods package \
-	strings types unsafe
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-rm -f *~ a.out
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/Makefile.in ./gdb/testsuite/gdb.compile/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.compile/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.compile/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = \
-	chan handcall hello integers methods package \
-	strings types unsafe
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-rm -f *~ a.out
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/abstract-origin.cc ./gdb/testsuite/gdb.cp/abstract-origin.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/abstract-origin.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/abstract-origin.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/abstract-origin.exp ./gdb/testsuite/gdb.cp/abstract-origin.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/abstract-origin.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/abstract-origin.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ambiguous.exp ./gdb/testsuite/gdb.cp/ambiguous.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ambiguous.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ambiguous.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if [get_compiler_info "c++"] {
 
 if { [test_compiler_info gcc-*] } then { continue }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/annota2.exp ./gdb/testsuite/gdb.cp/annota2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/annota2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/annota2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1999-2015 Free Software Foundation, Inc.
+#   Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug c++ nowarnings}]} {
     return -1
 }
@@ -89,8 +89,36 @@ gdb_test_multiple "run" "run until main 
 # annotate-field-value
 # annotate-field-end
 #
+
+set pat [multi_line "" \
+	     "\032\032post-prompt" \
+	     "" \
+	     "\032\032value-history-begin 1 -" \
+	     ".*= " \
+	     "\032\032value-history-value" \
+	     "\\{" \
+	     "\032\032field-begin -" \
+	     "x" \
+	     "\032\032field-name-end" \
+	     " = " \
+	     "\032\032field-value" \
+	     "1" \
+	     "\032\032field-end" \
+	     ", " \
+	     "\032\032field-begin -" \
+	     "y" \
+	     "\032\032field-name-end" \
+	     " = " \
+	     "\032\032field-value" \
+	     "2" \
+	     "\032\032field-end" \
+	     "\\}" \
+	     "" \
+	     "\032\032value-history-end" \
+	     $gdb_prompt$]
+
 gdb_test_multiple "print a" "print class" {
-    -re "\r\n\032\032post-prompt\r\n\r\n\032\032value-history-begin 1 -\r\n.*= \r\n\032\032value-history-value\r\n\\{\r\n\032\032field-begin -\r\nx\r\n\032\032field-name-end\r\n = \r\n\032\032field-value\r\n1\r\n\032\032field-end\r\n, \r\n\032\032field-begin -\r\ny\r\n\032\032field-name-end\r\n = \r\n\032\032field-value\r\n2\r\n\032\032field-end\r\n\\}\r\n\r\n\032\032value-history-end\r\n$gdb_prompt$" {
+    -re "$pat" {
 	pass "print class"
     }
 }
@@ -101,8 +129,21 @@ gdb_test_multiple "print a" "print class
 # annotate-exited
 # `a.x is 1' is asynchronous regarding to `frames-invalid'.
 #
+
+set pat [multi_line "" \
+	     "\032\032post-prompt" \
+	     "Continuing." \
+	     "" \
+	     "\032\032starting" \
+	     "\(${frames_invalid}\)*a.x is 1" \
+	     "\(${frames_invalid}\)*"\
+	     "\032\032exited 0" \
+	     "$inferior_exited_re normally." \
+	     "" \
+	     "\032\032stopped" \
+	     $gdb_prompt$]
 gdb_test_multiple "continue" "continue until exit" {
-    -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)*\r\na.x is 1\r\n\(\r\n\032\032frames-invalid\r\n\)*\r\n\032\032exited 0\r\n$inferior_exited_re normally.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" {
+    -re "$pat" {
 	pass "continue until exit"
     }
 }
@@ -127,8 +168,14 @@ gdb_expect {
 #
 # break at first line of main. 
 #
+set pat [multi_line "" \
+	     "\032\032post-prompt" \
+	     "Breakpoint.*at $hex: file.*$srcfile, line.*" \
+	     "\032\032breakpoints-invalid.*" \
+	     $gdb_prompt$]
+
 gdb_test_multiple "break 22" "break at main" {
-    -re  "\r\n\032\032post-prompt\r\nBreakpoint.*at $hex: file.*$srcfile, line.*\r\n\032\032breakpoints-invalid.*\r\n$gdb_prompt$" {
+    -re  "$pat" {
 	pass "breakpoint at main"
     }
 }
@@ -151,8 +198,14 @@ gdb_test_multiple "run" "run until main 
 #
 # set up a watch point on a.x 
 #
+set pat [multi_line "" \
+	     "\032\032post-prompt" \
+	     ".*atchpoint 3: a.x" \
+	     "" \
+	     "\032\032breakpoints-invalid" \
+	     $gdb_prompt$]
 gdb_test_multiple "watch a.x" "set watch on a.x" {
-    -re "\r\n\032\032post-prompt\r\n.*atchpoint 3: a.x.*\r\n\032\032breakpoints-invalid\r\n.*$gdb_prompt$" {
+    -re "$pat" {
 	pass "set watch on a.x"
     }
 }
@@ -161,8 +214,43 @@ gdb_test_multiple "watch a.x" "set watch
 # do a next, so that the watchpoint triggers. This will test:
 # annotate-watchpoint
 #
+set pat [multi_line "" \
+	     "\032\032post-prompt" \
+	     "" \
+	     "\032\032starting" \
+	     "\(${frames_invalid}\)*${breakpoints_invalid}" \
+	     "\032\032watchpoint 3" \
+	     ".*atchpoint 3: a.x" \
+	     "" \
+	     "Old value = 0" \
+	     "New value = 1" \
+	     "" \
+	     "\032\032frame-begin 0 $hex" \
+	     "" \
+	     "\032\032frame-function-name" \
+	     "main" \
+	     "\032\032frame-args" \
+	     " \\(\\)" \
+	     "\032\032frame-source-begin" \
+	     " at " \
+	     "\032\032frame-source-file" \
+	     ".*$srcfile" \
+	     "\032\032frame-source-file-end" \
+	     ":" \
+	     "\032\032frame-source-line" \
+	     "$decimal" \
+	     "\032\032frame-source-end" \
+	     "" \
+	     "" \
+	     "\032\032source .*$srcfile.*beg:$hex" \
+	     "" \
+	     "\032\032frame-end" \
+	     "" \
+	     "\032\032stopped" \
+	     $gdb_prompt$]
+
 gdb_test_multiple "next" "watch triggered on a.x" {
-    -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n${frames_invalid}${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
+    -re "$pat" {
 	pass "watch triggered on a.x"
     }
 }
@@ -174,12 +262,14 @@ gdb_test_multiple "next" "watch triggere
 # test:
 # annotate-quit
 #
-send_gdb "\003"
-gdb_expect {
-    -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \
+if ![target_info exists gdb,nointerrupts] {
+    send_gdb "\003"
+    gdb_expect {
+	-re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \
 	    { pass "annotate-quit" }
-    -re ".*$gdb_prompt$" { fail "annotate-quit" }
-    timeout { fail "annotate-quit (timeout)" }
+	-re ".*$gdb_prompt$" { fail "annotate-quit" }
+	timeout { fail "annotate-quit (timeout)" }
+    }
 }
 
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/annota3.exp ./gdb/testsuite/gdb.cp/annota3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/annota3.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/annota3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug c++ nowarnings}]} {
     return -1
 }
@@ -177,11 +177,13 @@ gdb_test_multiple "next" "watch triggere
 # test:
 # annotate-quit
 #
-send_gdb "\003"
-gdb_expect_list "annotate-quit" "$gdb_prompt$" {
-    "\r\n\032\032error-begin\r\n"
-    "Quit\r\n"
-    "\r\n\032\032quit\r\n"
+if ![target_info exists gdb,nointerrupts] {
+    send_gdb "\003"
+    gdb_expect_list "annotate-quit" "$gdb_prompt$" {
+	"\r\n\032\032error-begin\r\n"
+	"Quit\r\n"
+	"\r\n\032\032quit\r\n"
+    }
 }
 
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns2.cc ./gdb/testsuite/gdb.cp/anon-ns2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-ns2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns.cc ./gdb/testsuite/gdb.cp/anon-ns.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-ns.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns.exp ./gdb/testsuite/gdb.cp/anon-ns.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-ns.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-ns.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -21,7 +21,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc anon-ns2.cc
 
-if {[prepare_for_testing $testfile $testfile "$srcfile $srcfile2" {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-struct.cc ./gdb/testsuite/gdb.cp/anon-struct.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-struct.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-struct.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-struct.exp ./gdb/testsuite/gdb.cp/anon-struct.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-struct.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-struct.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Tests for anonymous union support.
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,11 +16,11 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
     gdb_test "ptype t::t" "type = struct t {\r\n    C m;\r\n} \\*\\(t \\* const\\)" \
 	"print type of t::t"
 } else {
@@ -31,7 +31,7 @@ if { [istarget arm*-*-*] } {
 gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \
     "print type of X::t2"
 
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
     gdb_test "ptype X::t2::t2" "type = struct X::t2 {\r\n    X::C2 m;\r\n} \\*\\(X::t2 \\* const\\)" \
 	"print type of X::t2::t2"
     gdb_test "ptype t3::~t3" "type = void \\*\\(t3 \\* const\\)" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-union.exp ./gdb/testsuite/gdb.cp/anon-union.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/anon-union.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/anon-union.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Tests for anonymous union support.
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/arg-reference.cc ./gdb/testsuite/gdb.cp/arg-reference.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/arg-reference.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/arg-reference.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/arg-reference.exp ./gdb/testsuite/gdb.cp/arg-reference.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/arg-reference.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/arg-reference.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,8 +26,8 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-gdb_test "ptype foo" "type = int \\\(Obj\\\)" "No false reference"
+gdb_test "ptype foo" "type = int \\\(Obj\\\)" "no false reference"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/baseenum.cc ./gdb/testsuite/gdb.cp/baseenum.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/baseenum.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/baseenum.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/baseenum.exp ./gdb/testsuite/gdb.cp/baseenum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/baseenum.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/baseenum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -28,7 +28,7 @@ if {![runto_main]} {
 
 gdb_breakpoint [gdb_get_line_number "breakpoint 1" $srcfile]
 gdb_continue_to_breakpoint "breakpoint 1"
-gdb_test "print X" "= A::X" "Print enum constant X of class A"
+gdb_test "print X" "= A::X" "print enum constant X of class A"
 
 gdb_breakpoint [gdb_get_line_number "breakpoint 2" $srcfile]
 gdb_continue_to_breakpoint "breakpoint 2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bool.cc ./gdb/testsuite/gdb.cp/bool.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bool.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/bool.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bool.exp ./gdb/testsuite/gdb.cp/bool.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bool.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/bool.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/breakpoint.cc ./gdb/testsuite/gdb.cp/breakpoint.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/breakpoint.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/breakpoint.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code to go along with tests in breakpoint.exp.
    
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/breakpoint.exp ./gdb/testsuite/gdb.cp/breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/breakpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/breakpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bs15503.cc ./gdb/testsuite/gdb.cp/bs15503.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bs15503.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/bs15503.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1992-2015 Free Software Foundation, Inc.
+   Copyright 1992-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bs15503.exp ./gdb/testsuite/gdb.cp/bs15503.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/bs15503.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/bs15503.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c-1.c ./gdb/testsuite/gdb.cp/call-c-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c-1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/call-c-1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c.cc ./gdb/testsuite/gdb.cp/call-c.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/call-c.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c.exp ./gdb/testsuite/gdb.cp/call-c.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/call-c.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/call-c.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set objfilecpp [standard_output_file ${t
 if {[gdb_compile "$srcdir/$subdir/${srcfile2}" "${objfilec}" object {debug}] != ""
     || [gdb_compile "$srcdir/$subdir/${srcfile}" "${objfilecpp}" object {c++ debug}] != ""
     || [gdb_compile "${objfilecpp} ${objfilec}" "${binfile}" executable {c++ debug}] != ""} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts03.cc ./gdb/testsuite/gdb.cp/casts03.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts03.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/casts03.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+// Confuse a simpler approach.
+
+double
+decltype(int x)
+{
+  return x + 2.0;
+}
+
+int
+main (int argc, char **argv)
+{
+  double y = decltype(2);
+
+  return 0;  /* breakpoint spot: casts.exp: 1 */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts.cc ./gdb/testsuite/gdb.cp/casts.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/casts.cc	2017-03-06 01:49:07.000000000 +0000
@@ -34,14 +34,6 @@ struct DoublyDerived : public VirtuallyD
 {
 };
 
-// Confuse a simpler approach.
-
-double
-decltype(int x)
-{
-  return x + 2.0;
-}
-
 int
 main (int argc, char **argv)
 {
@@ -56,7 +48,5 @@ main (int argc, char **argv)
   Alpha *ad = &derived;
   Alpha *add = &doublyderived;
 
-  double y = decltype(2);
-
   return 0;  /* breakpoint spot: casts.exp: 1 */
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts.exp ./gdb/testsuite/gdb.cp/casts.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/casts.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/casts.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,13 +27,13 @@
 
 if { [skip_cplus_tests] } { continue }
 
-standard_testfile .cc
+standard_testfile .cc casts03.cc
 
 if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -110,10 +110,6 @@ gdb_test "print reinterpret_cast<void> (
 gdb_test "print reinterpret_cast<A &> (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \
     "reinterpret_cast to reference type"
 
-# Test that keyword shadowing works.
-
-gdb_test "whatis decltype(5)" " = double"
-
 # Basic tests using typeof.
 
 foreach opname {__typeof__ __typeof __decltype} {
@@ -176,3 +172,23 @@ gdb_test "print dynamic_cast<DoublyDeriv
 gdb_test "print dynamic_cast<Gamma *> (add)" \
     " = \\(Gamma \\*\\) $nonzero_hex" \
     "dynamic_cast to sibling"
+
+if {[prepare_for_testing "failed to prepare" ${testfile}03 $srcfile2 \
+			 {debug c++ additional_flags=-std=c++03}]} {
+    return -1
+}
+
+if ![runto_main] then {
+    perror "couldn't run to breakpoint"
+    continue
+}
+
+# Prevent symbol on address 0x0 being printed.
+gdb_test_no_output "set print symbol off"
+
+gdb_breakpoint [gdb_get_line_number "casts.exp: 1" $srcfile2]
+gdb_continue_to_breakpoint "end of casts03"
+
+# Test that keyword shadowing works.
+
+gdb_test "whatis decltype(5)" " = double"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/chained-calls.cc ./gdb/testsuite/gdb.cp/chained-calls.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/chained-calls.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/chained-calls.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/chained-calls.exp ./gdb/testsuite/gdb.cp/chained-calls.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/chained-calls.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/chained-calls.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -40,5 +40,5 @@ gdb_test "p g(f(g(f(300) + f(40))) + f(5
 gdb_test "p getb(makeb(), 789)" ".* = 789" "getb(makeb(), ...)"
 gdb_test "p *c" ".* = {a = 5678}" "*c"
 gdb_test "p *c + *c" ".* = {a = 11356}" "*c + *c"
-gdb_test "P q(*c + *c)" ".* = {a = 11356}" "q(*c + *c)"
+gdb_test "p q(*c + *c)" ".* = {a = 11356}" "q(*c + *c)"
 gdb_test "p make_int().get_type ()" ".* = INT" "make_int().get_type ()"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/class2.cc ./gdb/testsuite/gdb.cp/class2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/class2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/class2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/class2.exp ./gdb/testsuite/gdb.cp/class2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/class2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/class2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/classes.cc ./gdb/testsuite/gdb.cp/classes.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/classes.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/classes.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1993-2015 Free Software Foundation, Inc.
+   Copyright 1993-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/classes.exp ./gdb/testsuite/gdb.cp/classes.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/classes.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/classes.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ load_lib "cp-support.exp"
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -419,7 +419,7 @@ proc test_enums {} {
     # ptype on the enum member
 
     gdb_test_multiple "ptype obj_with_enum.priv_enum" "ptype obj_with_enum.priv_enum" {
-        -re "type = enum ClassWithEnum::PrivEnum (: unsigned int )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {
+        -re "type = enum ClassWithEnum::PrivEnum (: unsigned (int|short|char) )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {
 	    pass "ptype obj_with_enum.priv_enum"
         }
 	-re "type = enum PrivEnum \{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cmpd-minsyms.cc ./gdb/testsuite/gdb.cp/cmpd-minsyms.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cmpd-minsyms.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cmpd-minsyms.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test case is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cmpd-minsyms.exp ./gdb/testsuite/gdb.cp/cmpd-minsyms.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cmpd-minsyms.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cmpd-minsyms.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -23,7 +23,7 @@ if {[skip_cplus_tests]} { continue }
 standard_testfile .cc
 
 # Do NOT compile with debug flag.
-if {[prepare_for_testing $testfile $testfile $srcfile {c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/converts.exp ./gdb/testsuite/gdb.cp/converts.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/converts.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/converts.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpcompletion.exp ./gdb/testsuite/gdb.cp/cpcompletion.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpcompletion.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cpcompletion.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile pr9594.cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpexprs.cc ./gdb/testsuite/gdb.cp/cpexprs.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpexprs.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cpexprs.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat, originally written by Keith Seitz.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpexprs.exp ./gdb/testsuite/gdb.cp/cpexprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpexprs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cpexprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # cpexprs.exp - C++ expressions tests
 #
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -144,7 +144,7 @@ add {base2::a_function} \
 # On targets using the ARM EABI, the constructor is expected to return
 # "this".
 proc ctor_ret { type } {
-    if { [istarget arm*-*eabi*] } {
+    if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
 	return "$type *"
     } else {
 	return "void "
@@ -195,7 +195,7 @@ add {base::base(int)} \
 # GCC returns void * instead of $type *; RealView appears to do
 # the same.
 proc dtor { type } {
-    if { [istarget arm*-*eabi*] } {
+    if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
 	set ret "void *"
     } else {
 	set ret "void "
@@ -692,7 +692,7 @@ if {[get_compiler_info "c++"]} {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplabel.cc ./gdb/testsuite/gdb.cp/cplabel.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplabel.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cplabel.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplabel.exp ./gdb/testsuite/gdb.cp/cplabel.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplabel.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cplabel.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing "$testfile.exp" $testfile $srcfile {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplusfuncs.exp ./gdb/testsuite/gdb.cp/cplusfuncs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cplusfuncs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cplusfuncs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [get_compiler_info "c++"] } {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -443,7 +443,6 @@ proc test_lookup_operator_functions {} {
 
 proc test_paddr_operator_functions {} {
     global hex
-    global hp_aCC_compiler
     global dm_operator_comma
     global dm_type_char_star
     global dm_type_foo_ref
@@ -496,13 +495,9 @@ proc test_paddr_operator_functions {} {
 	" = .* $hex <foo::operator new\\(.*\\)(| static)>"
     gdb_test "print &foo::operator new\[\]" \
 	" = .* $hex <foo::operator new\\\[\\\]\\(.*\\)(| static)>"    
-    if { !$hp_aCC_compiler } {
-	print_addr "foo::operator delete($dm_type_void_star)"
-	print_addr "foo::operator delete[]($dm_type_void_star)"
-    } else {
-	gdb_test "print &'foo::operator delete($dm_type_void_star) static'" \
-	    " = .*(0x\[0-9a-f\]+|) <foo::operator delete.*>"
-    }
+
+    print_addr "foo::operator delete($dm_type_void_star)"
+    print_addr "foo::operator delete[]($dm_type_void_star)"
 
     print_addr "foo::operator int($dm_type_void)"
     print_addr "foo::operator $dm_operator_char_star\($dm_type_void)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cp-relocate.cc ./gdb/testsuite/gdb.cp/cp-relocate.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cp-relocate.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cp-relocate.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test file is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cp-relocate.exp ./gdb/testsuite/gdb.cp/cp-relocate.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cp-relocate.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cp-relocate.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ append binfile .o
 if { [skip_cplus_tests] } { continue }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {c++ debug}] != "" } {
-     untested cp-relocate.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpsizeof.cc ./gdb/testsuite/gdb.cp/cpsizeof.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpsizeof.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cpsizeof.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpsizeof.exp ./gdb/testsuite/gdb.cp/cpsizeof.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cpsizeof.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cpsizeof.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # sizeof() tests [c++/16675]
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ standard_testfile .cc
 
 if {[skip_cplus_tests]} { continue }
 
-if {[prepare_for_testing ${testfile}.exp $testfile $srcfile {debug c++}] } {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd1.cc ./gdb/testsuite/gdb.cp/cttiadd1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cttiadd1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd2.cc ./gdb/testsuite/gdb.cp/cttiadd2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cttiadd2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd3.cc ./gdb/testsuite/gdb.cp/cttiadd3.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd3.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cttiadd3.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd.cc ./gdb/testsuite/gdb.cp/cttiadd.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/cttiadd.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/cttiadd.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ctti.exp ./gdb/testsuite/gdb.cp/ctti.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ctti.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ctti.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2 $srcfile3 $srcfile4] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/debug-expr.exp ./gdb/testsuite/gdb.cp/debug-expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/debug-expr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/debug-expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/demangle.exp ./gdb/testsuite/gdb.cp/demangle.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/demangle.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/demangle.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation2.cc ./gdb/testsuite/gdb.cp/derivation2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/derivation2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation.cc ./gdb/testsuite/gdb.cp/derivation.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/derivation.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation.exp ./gdb/testsuite/gdb.cp/derivation.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/derivation.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/derivation.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ load_lib "cp-support.exp"
 
 standard_testfile derivation.cc derivation2.cc
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	[list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/destrprint.exp ./gdb/testsuite/gdb.cp/destrprint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/destrprint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/destrprint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/dispcxx.cc ./gdb/testsuite/gdb.cp/dispcxx.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/dispcxx.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/dispcxx.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test for displays in C++.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/dispcxx.exp ./gdb/testsuite/gdb.cp/dispcxx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/dispcxx.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/dispcxx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,11 +18,11 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .cc
 
 if [get_compiler_info "c++"] {
-    untested dispcxx.exp
+    untested "couldn't find a valid c++ compiler"
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/enum-class.cc ./gdb/testsuite/gdb.cp/enum-class.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/enum-class.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/enum-class.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/enum-class.exp ./gdb/testsuite/gdb.cp/enum-class.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/enum-class.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/enum-class.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug c++ additional_flags=-std=c++11}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exception.cc ./gdb/testsuite/gdb.cp/exception.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exception.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/exception.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997-2015 Free Software Foundation, Inc.
+   Copyright 1997-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exception.exp ./gdb/testsuite/gdb.cp/exception.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exception.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/exception.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ if { [istarget "spu*-*-*"] } {
 
 standard_testfile .cc
  
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -89,9 +89,9 @@ gdb_test "tbreak main" "Temporary breakp
 
 set ok 0
 gdb_run_cmd
-gdb_test_multiple "" "Run to main" {
+gdb_test_multiple "" "run to main" {
     -re "Temporary breakpoint 4,.*$gdb_prompt $" {
-	pass "Run to main"
+	pass "run to main"
 	set ok 1
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exceptprint.cc ./gdb/testsuite/gdb.cp/exceptprint.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exceptprint.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/exceptprint.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exceptprint.exp ./gdb/testsuite/gdb.cp/exceptprint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/exceptprint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/exceptprint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-psymtabs-cxx.cc ./gdb/testsuite/gdb.cp/expand-psymtabs-cxx.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-psymtabs-cxx.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/expand-psymtabs-cxx.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-psymtabs-cxx.exp ./gdb/testsuite/gdb.cp/expand-psymtabs-cxx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-psymtabs-cxx.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/expand-psymtabs-cxx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ standard_testfile .cc
 set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug c++} ] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-sals.cc ./gdb/testsuite/gdb.cp/expand-sals.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-sals.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/expand-sals.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-sals.exp ./gdb/testsuite/gdb.cp/expand-sals.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/expand-sals.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/expand-sals.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 if { [skip_cplus_tests] } { continue }
 
 set srcfile expand-sals.cc
-if { [prepare_for_testing expand-sals.exp expand-sals $srcfile {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" expand-sals $srcfile {debug c++}] } {
     return -1
 }
 if ![runto_main] {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/extern-c.cc ./gdb/testsuite/gdb.cp/extern-c.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/extern-c.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/extern-c.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/extern-c.exp ./gdb/testsuite/gdb.cp/extern-c.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/extern-c.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/extern-c.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/filename.cc ./gdb/testsuite/gdb.cp/filename.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/filename.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/filename.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/filename.exp ./gdb/testsuite/gdb.cp/filename.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/filename.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/filename.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/formatted-ref.cc ./gdb/testsuite/gdb.cp/formatted-ref.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/formatted-ref.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/formatted-ref.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/formatted-ref.exp ./gdb/testsuite/gdb.cp/formatted-ref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/formatted-ref.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/formatted-ref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/fpointer.exp ./gdb/testsuite/gdb.cp/fpointer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/fpointer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/fpointer.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb1355.exp ./gdb/testsuite/gdb.cp/gdb1355.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb1355.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb1355.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384-base.cc ./gdb/testsuite/gdb.cp/gdb2384-base.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384-base.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2384-base.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384-base.h ./gdb/testsuite/gdb.cp/gdb2384-base.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384-base.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2384-base.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384.cc ./gdb/testsuite/gdb.cp/gdb2384.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2384.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384.exp ./gdb/testsuite/gdb.cp/gdb2384.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2384.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2384.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,12 +36,12 @@ if [get_compiler_info "c++"] {
 
 if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug "c++" shlib=${sofile}]] != ""} {
-    untested gdb2384.exp
+    untested "failed to compile"
     return -1
 }
 
 clean_restart ${binfile}
-gdb_load_shlibs ${sofile}
+gdb_load_shlib ${sofile}
 
 
 if ![runto_main] then {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2495.cc ./gdb/testsuite/gdb.cp/gdb2495.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2495.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2495.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2495.exp ./gdb/testsuite/gdb.cp/gdb2495.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/gdb2495.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/gdb2495.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -54,12 +54,11 @@ if [get_compiler_info "c++"] {
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -81,7 +80,7 @@ gdb_test "p exceptions.throw_function_wi
 # does not handle it.  It should be rewound.
 gdb_test "p exceptions.throw_function()" \
     "The program being debugged entered a std::terminate call, .*" \
-    "Call a function that raises an exception without a handler."
+    "call a function that raises an exception without a handler."
 
 # Make sure that after rewinding we are back at the call parent.
 gdb_test "bt" \
@@ -95,21 +94,17 @@ gdb_test "info breakpoints" \
     "gdb2495\.cc.*"
 
 # Turn off this new behaviour.
-gdb_test_multiple "set unwind-on-terminating-exception off" \
-    "Turn unwind-on-terminating-exception off" {
-    -re "$gdb_prompt $" {pass "set unwinn-on-terminating-exception off"}
-    timeout {fail "(timeout) set unwind-on-terminating-exception off"}
-}
+gdb_test_no_output "set unwind-on-terminating-exception off"
 
 # Check that it is turned off.
 gdb_test "show unwind-on-terminating-exception" \
     "exception is unhandled while in a call dummy is off.*" \
-    "Turn off unwind on terminating exception flag"
+    "turn off unwind on terminating exception flag"
 
 # Check that the old behaviour is restored.
 gdb_test "p exceptions.throw_function()" \
     "The program being debugged was signaled while in a function called .*" \
-    "Call a function that raises an exception with unwinding off.."
+    "call a function that raises an exception with unwinding off.."
 
 # Restart the inferior back at main.
 if ![runto_main] then {
@@ -122,15 +117,12 @@ if ![runto_main] then {
 # behaviour; it should not.  Test both on and off states.
 
 # Turn on unwind on signal behaviour.
-gdb_test_multiple "set unwindonsignal on" "Turn unwindonsignal on" {
-    -re "$gdb_prompt $" {pass "set unwindonsignal on"}
-    timeout {fail "(timeout) set unwindonsignal on"}
-}
+gdb_test_no_output "set unwindonsignal on"
 
 # Check that it is turned on.
 gdb_test "show unwindonsignal" \
     "signal is received while in a call dummy is on.*" \
-    "Turn on unwind on signal"
+    "turn on unwind on signal"
 
 # Check to see if new behaviour interferes with
 # normal signal handling in inferior function calls.
@@ -138,15 +130,12 @@ gdb_test "p exceptions.raise_signal(1)" 
     "To change this behavior use \"set unwindonsignal off\".*"
 
 # And reverse - turn off again.
-gdb_test_multiple "set unwindonsignal off" "Turn unwindonsignal off" {
-    -re "$gdb_prompt $" {pass "set unwindonsignal off"}
-    timeout {fail "(timeout) set unwindonsignal off"}
-}
+gdb_test_no_output "set unwindonsignal off"
 
 # Check that it is actually turned off.
 gdb_test "show unwindonsignal" \
     "signal is received while in a call dummy is off.*" \
-    "Turn off unwind on signal"
+    "turn off unwind on signal"
 
 # Check to see if new behaviour interferes with
 # normal signal handling in inferior function calls.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/hang.exp ./gdb/testsuite/gdb.cp/hang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/hang.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/hang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2002-2015 Free Software Foundation, Inc.
+#   Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile hang1.cc hang2.cc hang3.cc
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2 $srcfile3] {debug c++}]} {
     return -1
 }
@@ -58,8 +58,8 @@ if {[prepare_for_testing $testfile.exp $
 #
 # Since `hang2.o''s psymtab lists `hang1.o' as a dependency, GDB first
 # reads `hang1.o''s symbols.  When GDB sees `(1,3)=xsB:', it creates a
-# type object for `struct B', sets its TYPE_FLAG_STUB flag, and
-# records it as type number `(1,3)'.
+# type object for `struct B', sets its TYPE_STUB flag, and records it
+# as type number `(1,3)'.
 #
 # When GDB finds the definition of `struct C::B', since the stabs
 # don't indicate that the type is nested within C, it treats it as
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/impl-this.cc ./gdb/testsuite/gdb.cp/impl-this.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/impl-this.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/impl-this.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/impl-this.exp ./gdb/testsuite/gdb.cp/impl-this.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/impl-this.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/impl-this.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/includefile ./gdb/testsuite/gdb.cp/includefile
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/includefile	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/includefile	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen.cc ./gdb/testsuite/gdb.cp/infcall-dlopen.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/infcall-dlopen.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen.exp ./gdb/testsuite/gdb.cp/infcall-dlopen.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/infcall-dlopen.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,11 +27,11 @@ set lib_dlopen [shlib_target_file ${test
 
 # Use completely arbitrary file for $libfile source.
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile2} ${libfile} {debug c++}] != ""
-     || [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++ shlib_load}] } {
+     || [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++ shlib_load}] } {
     return -1
 }
 
-gdb_load_shlibs $libfile
+gdb_load_shlib $libfile
 
 if { ![runto_main] } {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen-lib.cc ./gdb/testsuite/gdb.cp/infcall-dlopen-lib.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/infcall-dlopen-lib.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/infcall-dlopen-lib.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/inherit.exp ./gdb/testsuite/gdb.cp/inherit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/inherit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/inherit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ load_lib "cp-support.exp"
 
 standard_testfile misc.cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -420,9 +420,6 @@ proc test_print_mi_classes { } {
 # incapable of printing the member of an anonymous union.
 # We test the printing of the member first, and perform the other tests
 # only if the test succeeds, to avoid the infinite loop.
-#
-# GDB HEAD 2004-01-27 with hp aCC A.03.45 crashes on the first test.
-# -- chastain 2004-01-27
 
 proc test_print_anon_union {} {
     global gdb_prompt
@@ -524,6 +521,12 @@ proc test_print_svi_classes { } {
 	    # gcc HEAD 2004-07-31 -gstabs+
 	    pass $name
 	}
+	-re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = ${hex}( <\[^>]*>)?, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+	    # gcc HEAD 2015?+
+	    # the vptr is set to the address *after* the vtable,
+	    # so the # symbol shown is unpredictable.
+	    pass "$name (symbols ignored)"
+	}
     }
 
     # Print all members of g_vC.
@@ -552,6 +555,12 @@ proc test_print_svi_classes { } {
 	    # gcc HEAD 2004-07-31 -gstabs+
 	    pass $name
 	}
+	-re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = ${hex}( <\[^>]*>)?, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+	    # gcc HEAD 2015?+
+	    # the vptr is set to the address *after* the vtable,
+	    # so the symbol shown is unpredictable.
+	    pass "$name (symbols ignored)"
+	}
     }
 }
 
@@ -623,6 +632,12 @@ proc test_print_mvi_classes { } {
 	    # gcc 3.3.2 -gstabs+
 	    pass "$name"
 	}
+	-re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = ${hex}( <\[^>]*>)?, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <\[^>]*>)?, vc = 23, vx = 24\}, $re_vbptr_3_vD = ${hex}( <\[^>]*>)?, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+	    # gcc HEAD 2015?+
+	    # the vptr is set to the address *after* the vtable,
+	    # so the symbol shown is unpredictable.
+	    pass "$name (symbols ignored)"
+	}
     }
 
     # Print all members of g_vE.
@@ -650,6 +665,12 @@ proc test_print_mvi_classes { } {
 	    # gcc HEAD 2004-07-31 -gstabs+
 	    pass $name
 	}
+	-re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = ${hex}( <\[^>]*>)?, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <\[^>]*>)?, vc = 0, vx = 0\}, $re_vbptr_3_vD = ${hex}( <\[^>]*>)?, vd = 0, vx = 0\}, $re_vbptr_3_vE = ${hex}( <\[^>]*>)?, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+	    # gcc HEAD 2015?+
+	    # the vptr is set to the address *after* the vtable,
+	    # so the symbol shown is unpredictable.
+	    pass "$name (symbols ignored)"
+	}
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/iostream.cc ./gdb/testsuite/gdb.cp/iostream.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/iostream.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/iostream.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code to go along with tests in rtti.exp.
    
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/iostream.exp ./gdb/testsuite/gdb.cp/iostream.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/iostream.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/iostream.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/koenig.exp ./gdb/testsuite/gdb.cp/koenig.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/koenig.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/koenig.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/local.exp ./gdb/testsuite/gdb.cp/local.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/local.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/local.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if [get_compiler_info "c++"] {
   return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -164,9 +164,9 @@ gdb_test "up" ".*main.*" "up from marker
 # setup_kfail "gdb/825"
 
 set eol "\[\t \]*\[\r\n\]+\[\t \]*"
-gdb_test_multiple "ptype Local" "Local out of scope" {
+gdb_test_multiple "ptype Local" "local out of scope" {
     -re "No symbol \"Local\" in current context.*${gdb_prompt} $" {
-        pass "Local out of scope"
+        pass "local out of scope"
     }
     -re "ptype Local${eol}type = class Local {${eol}  public:${eol}    int loc1;${eol}.*${eol}    char loc_foo\\(char\\);${eol}}${eol}${gdb_prompt} " {
         # GCC emits STABS debugging information in a way that doesn't
@@ -224,12 +224,6 @@ gdb_test_multiple "ptype InnerLocal" "pt
     -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
 	pass "ptype InnerLocal (pattern 2)"
     }
-    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" {
-	pass "ptype InnerLocal (old HP aCC)"
-    }
-    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" {
-	pass "ptype InnerLocal (old HP aCC)"
-    }
     -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]* int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
 	pass "ptype InnerLocal (pattern 5)"
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/maint.exp ./gdb/testsuite/gdb.cp/maint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/maint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/maint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/Makefile.in ./gdb/testsuite/gdb.cp/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,28 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = abstract-origin ambiguous annota2 annota3 anon-union \
-	arg-reference bool breakpoint bs15503 call-c casts class2 \
-	classes converts cpexprs cplusfuncs cttiadd derivation \
-	exception expand-sals extern-c formatted-ref fpointer gdb1355 \
-	gdb2384 hang infcall-dlopen inherit koenig local m-data m-static \
-	mb-ctor mb-inline mb-templates member-ptr method misc namespace \
-	namespace-enum namespace-nested-import nextoverthrow noparam nsdecl \
-	nsimport nsnested nsnoimports nsrecurs nsstress nsusing operator \
-	oranking overload overload-const ovldbreak pass-by-ref pr-1023 pr-1210 \
-	pr-574 pr10728 pr12028 pr9631 printmethod psmang ptype-cv-cp \
-	re-set-overloaded ref-typ ref-typ2 rtti shadow smartp temargs \
-	templates try_catch typedef-operator userdef virtbase virtfunc \
-	ref-types ref-params method2 pr9594 gdb2495 virtfunc2 pr9067 \
-	pr1072 pr10687 pr9167
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-ctor.exp ./gdb/testsuite/gdb.cp/mb-ctor.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-ctor.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-ctor.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline1.cc ./gdb/testsuite/gdb.cp/mb-inline1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-inline1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
    This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline2.cc ./gdb/testsuite/gdb.cp/mb-inline2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-inline2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline.exp ./gdb/testsuite/gdb.cp/mb-inline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-inline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
@@ -83,7 +83,7 @@ delete_breakpoints
 set bp_location [gdb_get_line_number "set multi-line breakpoint here" $hdrfile]
 
 if { ![runto_main] } {
-    fail "Can't run to main for multi_line_foo tests."
+    fail "can't run to main for multi_line_foo tests."
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline.h ./gdb/testsuite/gdb.cp/mb-inline.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-inline.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-inline.h	2017-03-06 01:49:07.000000000 +0000
@@ -4,7 +4,7 @@
 
    This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-templates.exp ./gdb/testsuite/gdb.cp/mb-templates.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/mb-templates.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/mb-templates.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -117,7 +117,7 @@ delete_breakpoints
 set bp_location [gdb_get_line_number "set multi-line breakpoint here"]
 
 if { ![runto_main] } {
-    fail "Can't run to main for multi_line_foo tests."
+    fail "can't run to main for multi_line_foo tests."
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-data.exp ./gdb/testsuite/gdb.cp/m-data.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-data.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/m-data.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-name.cc ./gdb/testsuite/gdb.cp/member-name.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-name.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/member-name.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-name.exp ./gdb/testsuite/gdb.cp/member-name.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-name.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/member-name.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-ptr.cc ./gdb/testsuite/gdb.cp/member-ptr.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-ptr.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/member-ptr.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-ptr.exp ./gdb/testsuite/gdb.cp/member-ptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/member-ptr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/member-ptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This file is part of the gdb testsuite
 
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -78,12 +78,6 @@ gdb_test_multiple "print pmi" $name {
 	# gcc HEAD 2004-01-11 05:33:21 -gstabs+
 	kfail "gdb/NNNN" $name
     }
-    -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870920\r\n$gdb_prompt $" {
-	# the value is 0x20000008 hex.   0x20000000 is an internal flag.
-	# Use '|' to add in more values as needed.
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
 }
 
 # print dereferenced pointer to data member
@@ -157,12 +151,6 @@ gdb_test_multiple "print pmi" $name {
 	# gcc HEAD 2004-01-11 05:33:21 -gstabs+
 	kfail "gdb/NNNN" $name
     }
-    -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870924\r\n$gdb_prompt $" {
-	# the value is 0x20000008 hex.   0x20000000 is an internal flag.
-	# Use '|' to add in more values as needed.
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
 }
 
 # print dereferenced pointer to data member again
@@ -413,10 +401,6 @@ gdb_test_multiple "ptype pmf" $name {
     -re "type = int \\( ?A::\\*\\)\\(A \\*( const)?, int\\)\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "type = int \\( ?A::\\*\\)\\(void\\)\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "type = struct \{.*\}\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
@@ -435,10 +419,6 @@ gdb_test_multiple "print pmf" $name {
     -re "$vhn = \\(int \\(A::\\*\\)\\(A \\*( const)?, int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "$vhn = .*not supported with HP aCC.*\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "$vhn = \{.*\}\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
@@ -457,10 +437,6 @@ gdb_test_multiple "ptype pmf_p" $name {
     -re "type = int \\( ?A::\\*\\*\\)\\(A \\*( const)?, int\\)\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "type = int \\( ?A::\\*\\*\\)\\(void\\)\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "type = struct \{.*\} \\*\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
@@ -482,10 +458,6 @@ gdb_test_multiple "print pmf_p" $name {
     -re "$vhn = \\(PMF \\*\\) $hex\r\n$gdb_prompt $" {
 	pass "gdb/NNNN"
     }
-    -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\(void\\)\\) $hex\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "$vhn = \\(struct \{.*\} \\*\\) $hex\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	kfail "gdb/NNNN" $name
@@ -499,10 +471,6 @@ gdb_test_multiple "print a.*pmf" $name {
     -re "$vhn = {int \\(A \\*( const)?, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
@@ -521,10 +489,6 @@ gdb_test_multiple "print a_p->*pmf" $nam
     -re "$vhn = {int \\(A \\*( const)?, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
@@ -555,9 +519,6 @@ gdb_test_multiple "set var pmf = &A::foo
 	# gcc HEAD 2004-01-10 -gstabs+
 	kfail "gdb/NNNN" $name
     }
-    -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
-	kfail "gdb/NNNN" $name
-    }
 }
 
 # dereference the pointer to data member without any object
@@ -605,10 +566,6 @@ gdb_test_multiple "print (a.*pmf)(3)" $n
     -re "$vhn = 50\r\n$gdb_prompt $" {
 	pass $name
     }
-    -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
-	# hpacc A.03.45
-	kfail "gdb/NNNN" $name
-    }
     -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
 	# gcc 2.95.3 -gdwarf-2
 	# gcc 2.95.3 -gstabs+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/method2.exp ./gdb/testsuite/gdb.cp/method2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/method2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/method2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,8 +22,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if  {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
-     untested method2.exp
+if  {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/method.exp ./gdb/testsuite/gdb.cp/method.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/method.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/method.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ if [get_compiler_info "c++"] {
   return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -152,9 +152,6 @@ gdb_test_multiple "ptype A" "ptype A" {
     -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\(A const ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\}\r\n$gdb_prompt $" {
 	pass "ptype A"
     }
-    -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {
-	pass "ptype A (HP aCC bug -- volatile not indicated)"
-    }
     -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) const volatile;\r\n\}\r\n$gdb_prompt $" {
 	pass "ptype A"
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/meth-typedefs.cc ./gdb/testsuite/gdb.cp/meth-typedefs.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/meth-typedefs.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/meth-typedefs.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/meth-typedefs.exp ./gdb/testsuite/gdb.cp/meth-typedefs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/meth-typedefs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/meth-typedefs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -35,7 +35,7 @@ if {[skip_cplus_tests]} { continue }
 # Tests for c++/12266 et al
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile $testfile $srcfile {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.cc ./gdb/testsuite/gdb.cp/minsym-fallback.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/minsym-fallback.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.exp ./gdb/testsuite/gdb.cp/minsym-fallback.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/minsym-fallback.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ set objmainfile [standard_output_file ${
 if {[gdb_compile $srcdir/$subdir/$srcfile $objfile object {}] != ""
     || [gdb_compile $srcdir/$subdir/$srcfile2 $objmainfile object {debug}] != ""
     || [gdb_compile "$objfile $objmainfile" $binfile executable {c++}] != ""} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.h ./gdb/testsuite/gdb.cp/minsym-fallback.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/minsym-fallback.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback-main.cc ./gdb/testsuite/gdb.cp/minsym-fallback-main.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/minsym-fallback-main.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/minsym-fallback-main.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/misc.cc ./gdb/testsuite/gdb.cp/misc.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/misc.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/misc.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1993-2015 Free Software Foundation, Inc.
+   Copyright 1993-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/misc.exp ./gdb/testsuite/gdb.cp/misc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/misc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/misc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-static.exp ./gdb/testsuite/gdb.cp/m-static.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-static.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/m-static.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
@@ -69,7 +69,7 @@ gdb_test "print test1.key2" "\\$\[0-9\]*
 # simple object, static enum
 gdb_test "print test1.value" "\\$\[0-9\]* = oriental" "simple object, static enum"
 
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
     gdb_test "print test5.single_constructor" \
 	{ = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
 	"simple object instance, print constructor"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-static.h ./gdb/testsuite/gdb.cp/m-static.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/m-static.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/m-static.h	2017-03-06 01:49:07.000000000 +0000
@@ -6,6 +6,9 @@ class gnu_obj_4
   static const int elsewhere;
   static const int nowhere;
   static const int everywhere = 317;
+#if __cplusplus >= 201103L
+  constexpr
+#endif
   static const float somewhere = 3.14159;
 
   // try to ensure test4 is actually allocated
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.cc ./gdb/testsuite/gdb.cp/namelessclass.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namelessclass.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.exp ./gdb/testsuite/gdb.cp/namelessclass.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namelessclass.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if {![istarget "x86_64-*-*"] || ![is_lp6
 standard_testfile .S
 set csrcfile "${testfile}.cc"
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.S ./gdb/testsuite/gdb.cp/namelessclass.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namelessclass.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namelessclass.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace1.cc ./gdb/testsuite/gdb.cp/namespace1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namespace1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2003-2015 Free Software Foundation, Inc.
+/* Copyright 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace-enum.exp ./gdb/testsuite/gdb.cp/namespace-enum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace-enum.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namespace-enum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc namespace-enum-main.cc
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace.exp ./gdb/testsuite/gdb.cp/namespace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namespace.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ if {[test_compiler_info {gcc-[0-3]-*}]
     set xfail_class_types 1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace-nested-import.exp ./gdb/testsuite/gdb.cp/namespace-nested-import.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/namespace-nested-import.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/namespace-nested-import.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nextoverthrow.cc ./gdb/testsuite/gdb.cp/nextoverthrow.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nextoverthrow.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nextoverthrow.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nextoverthrow.exp ./gdb/testsuite/gdb.cp/nextoverthrow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nextoverthrow.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nextoverthrow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,11 +21,11 @@ standard_testfile .cc
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
 if [get_compiler_info "c++"] {
-    untested nextoverthrow.exp
+    untested "couldn't find a valid c++ compiler"
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/no-dmgl-verbose.cc ./gdb/testsuite/gdb.cp/no-dmgl-verbose.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/no-dmgl-verbose.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/no-dmgl-verbose.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test file is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp ./gdb/testsuite/gdb.cp/no-dmgl-verbose.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/no-dmgl-verbose.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ standard_testfile .cc
 if { [skip_cplus_tests] } { continue }
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {c++ debug}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/non-trivial-retval.cc ./gdb/testsuite/gdb.cp/non-trivial-retval.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/non-trivial-retval.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/non-trivial-retval.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/non-trivial-retval.exp ./gdb/testsuite/gdb.cp/non-trivial-retval.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/non-trivial-retval.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/non-trivial-retval.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/noparam.cc ./gdb/testsuite/gdb.cp/noparam.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/noparam.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/noparam.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/noparam.exp ./gdb/testsuite/gdb.cp/noparam.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/noparam.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/noparam.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [prepare_for_testing noparam.exp "noparam" "noparam.cc" {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" "noparam" "noparam.cc" {debug c++}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsalias.cc ./gdb/testsuite/gdb.cp/nsalias.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsalias.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsalias.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsalias.exp ./gdb/testsuite/gdb.cp/nsalias.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsalias.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsalias.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsdecl.exp ./gdb/testsuite/gdb.cp/nsdecl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsdecl.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsdecl.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsimport.exp ./gdb/testsuite/gdb.cp/nsimport.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsimport.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsimport.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsnested.exp ./gdb/testsuite/gdb.cp/nsnested.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsnested.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsnested.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsnoimports.exp ./gdb/testsuite/gdb.cp/nsnoimports.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsnoimports.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsnoimports.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsrecurs.exp ./gdb/testsuite/gdb.cp/nsrecurs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsrecurs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsrecurs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsstress.exp ./gdb/testsuite/gdb.cp/nsstress.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsstress.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsstress.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsusing.exp ./gdb/testsuite/gdb.cp/nsusing.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/nsusing.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/nsusing.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/operator.exp ./gdb/testsuite/gdb.cp/operator.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/operator.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/operator.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
     return -1
 }
 
@@ -33,7 +33,7 @@ gdb_test "p a == 'a'" "= 12" "global ope
 # Test ADL operator
 gdb_test "p bc == 1" "= 22" "ADL operator"
 gdb_test "p bc == 'a'" "= 23" "ADL operator overload"
-gdb_test "p B::BD::operator== (bc,'a')" "= 24" "Fully qualified explicit operator call"
+gdb_test "p B::BD::operator== (bc,'a')" "= 24" "fully qualified explicit operator call"
 
 # Test operator imported from anonymous namespace
 gdb_test "p d == 1" "= 33" "anonymous namespace operator"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/oranking.exp ./gdb/testsuite/gdb.cp/oranking.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/oranking.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/oranking.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload-const.cc ./gdb/testsuite/gdb.cp/overload-const.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload-const.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/overload-const.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test case is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload-const.exp ./gdb/testsuite/gdb.cp/overload-const.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload-const.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/overload-const.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile $testfile $testfile.cc {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $testfile.cc {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload.exp ./gdb/testsuite/gdb.cp/overload.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/overload.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/overload.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -91,11 +91,6 @@ set re_synth	"foo & operator=\\(foo cons
 gdb_test "print foo_instance1" "\\$\[0-9\]+ = \{ifoo = 111, ccpfoo = 0x0\}"
 
 gdb_test_multiple "ptype foo_instance1" "ptype foo_instance1" {
-    -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
-	# gcc 2.95.3 -gdwarf-2
-	# TODO: this is not a quirk!
-	pass "ptype foo_instance1 (HP aCC -- known quirk with ~foo parameter list)"
-    }
     -re "type = $re_class${ws}$XX_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
 	# gcc 2.95.3 -gstabs+, no "const" on "const char *"
 	# TODO: gdb.base/constvar.exp has XFAILed this kind of problem for a
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovldbreak.exp ./gdb/testsuite/gdb.cp/ovldbreak.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovldbreak.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovldbreak.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -58,10 +58,10 @@ proc take_gdb_out_of_choice_menu {} {
     gdb_test_multiple " " " " {
         -re ".*$gdb_prompt $" {
         }
-        timeout {
-            perror "could not resynchronize to command prompt (timeout)"
-            continue
-        }
+	timeout {
+	    perror "could not resynchronize to command prompt (timeout)"
+	    continue
+	}
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch1.cc ./gdb/testsuite/gdb.cp/ovsrch1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch2.cc ./gdb/testsuite/gdb.cp/ovsrch2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch3.cc ./gdb/testsuite/gdb.cp/ovsrch3.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch3.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch3.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch4.cc ./gdb/testsuite/gdb.cp/ovsrch4.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch4.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch4.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch.exp ./gdb/testsuite/gdb.cp/ovsrch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -57,7 +57,7 @@ if { [skip_cplus_tests] } { continue }
 # Test for c++/11734
 standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc
 
-if {[prepare_for_testing $testfile $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2 $srcfile3 $srcfile4] {c++ debug}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch.h ./gdb/testsuite/gdb.cp/ovsrch.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ovsrch.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ovsrch.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/paren-type.cc ./gdb/testsuite/gdb.cp/paren-type.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/paren-type.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/paren-type.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/paren-type.exp ./gdb/testsuite/gdb.cp/paren-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/paren-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/paren-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${testfile}.cc {c++ debug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/parse-lang.cc ./gdb/testsuite/gdb.cp/parse-lang.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/parse-lang.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/parse-lang.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/parse-lang.exp ./gdb/testsuite/gdb.cp/parse-lang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/parse-lang.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/parse-lang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pass-by-ref.cc ./gdb/testsuite/gdb.cp/pass-by-ref.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pass-by-ref.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pass-by-ref.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pass-by-ref.exp ./gdb/testsuite/gdb.cp/pass-by-ref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pass-by-ref.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pass-by-ref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-1023.exp ./gdb/testsuite/gdb.cp/pr-1023.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-1023.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr-1023.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr10687.exp ./gdb/testsuite/gdb.cp/pr10687.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr10687.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr10687.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#Copyright 2010-2015 Free Software Foundation, Inc.
+#Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr10728.exp ./gdb/testsuite/gdb.cp/pr10728.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr10728.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr10728.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,17 +26,17 @@ set tfx [standard_output_file pr10728-x.
 set tfy [standard_output_file pr10728-y.o]
 
 if  { [gdb_compile "${srcdir}/${subdir}/$srcfile2" "${tfy}.o" object {c++}] != "" } {
-     untested pr10728.exp
+     untested "failed to compile second object file"
      return -1
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/$srcfile" "${tfx}.o" object {debug c++}] != "" } {
-     untested pr10728.exp
+     untested "failed to compile first object file"
      return -1
 }
 
 if  { [gdb_compile "${tfx}.o ${tfy}.o" ${binfile} executable {debug c++}] != "" } {
-     untested pr10728.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr12028.exp ./gdb/testsuite/gdb.cp/pr12028.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr12028.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr12028.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-1210.exp ./gdb/testsuite/gdb.cp/pr-1210.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-1210.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr-1210.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17132.cc ./gdb/testsuite/gdb.cp/pr17132.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17132.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr17132.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17132.exp ./gdb/testsuite/gdb.cp/pr17132.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17132.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr17132.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17494.cc ./gdb/testsuite/gdb.cp/pr17494.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17494.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr17494.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17494.exp ./gdb/testsuite/gdb.cp/pr17494.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr17494.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr17494.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-574.cc ./gdb/testsuite/gdb.cp/pr-574.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-574.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr-574.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-574.exp ./gdb/testsuite/gdb.cp/pr-574.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr-574.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr-574.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9067.exp ./gdb/testsuite/gdb.cp/pr9067.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9067.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr9067.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ load_lib "cp-support.exp"
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9167.exp ./gdb/testsuite/gdb.cp/pr9167.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9167.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr9167.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#Copyright 2010-2015 Free Software Foundation, Inc.
+#Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,12 +20,12 @@ if { [istarget "spu*-*-*"] } {
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9631.cc ./gdb/testsuite/gdb.cp/pr9631.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9631.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr9631.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9631.exp ./gdb/testsuite/gdb.cp/pr9631.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/pr9631.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/pr9631.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/printmethod.cc ./gdb/testsuite/gdb.cp/printmethod.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/printmethod.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/printmethod.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/printmethod.exp ./gdb/testsuite/gdb.cp/printmethod.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/printmethod.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/printmethod.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang1.cc ./gdb/testsuite/gdb.cp/psmang1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/psmang1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang2.cc ./gdb/testsuite/gdb.cp/psmang2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/psmang2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang.exp ./gdb/testsuite/gdb.cp/psmang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psmang.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/psmang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -184,7 +184,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psymtab-parameter.cc ./gdb/testsuite/gdb.cp/psymtab-parameter.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psymtab-parameter.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/psymtab-parameter.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psymtab-parameter.exp ./gdb/testsuite/gdb.cp/psymtab-parameter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/psymtab-parameter.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/psymtab-parameter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .cc
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.x" object {debug c++}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-cv-cp.cc ./gdb/testsuite/gdb.cp/ptype-cv-cp.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-cv-cp.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ptype-cv-cp.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-cv-cp.exp ./gdb/testsuite/gdb.cp/ptype-cv-cp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-cv-cp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ptype-cv-cp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-flags.cc ./gdb/testsuite/gdb.cp/ptype-flags.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-flags.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ptype-flags.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-flags.exp ./gdb/testsuite/gdb.cp/ptype-flags.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ptype-flags.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ptype-flags.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ load_lib "cp-support.exp"
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/punctuator.exp ./gdb/testsuite/gdb.cp/punctuator.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/punctuator.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/punctuator.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/readnow-language.cc ./gdb/testsuite/gdb.cp/readnow-language.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/readnow-language.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/readnow-language.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/readnow-language.exp ./gdb/testsuite/gdb.cp/readnow-language.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/readnow-language.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/readnow-language.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-params.cc ./gdb/testsuite/gdb.cp/ref-params.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-params.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ref-params.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2006-2015 Free Software Foundation, Inc.
+   Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-params.exp ./gdb/testsuite/gdb.cp/ref-params.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-params.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ref-params.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Tests for reference parameters of types and their subtypes in GDB.
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-types.cc ./gdb/testsuite/gdb.cp/ref-types.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-types.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ref-types.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 1999-2015 Free Software Foundation, Inc.
+   Copyright 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-types.exp ./gdb/testsuite/gdb.cp/ref-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/ref-types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/ref-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Tests for reference types with short type variables in GDB.
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/re-set-overloaded.cc ./gdb/testsuite/gdb.cp/re-set-overloaded.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/re-set-overloaded.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/re-set-overloaded.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/re-set-overloaded.exp ./gdb/testsuite/gdb.cp/re-set-overloaded.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/re-set-overloaded.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/re-set-overloaded.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,12 +28,12 @@ if [get_compiler_info "c++"] {
 
 if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug "c++" shlib=${sofile}]] != ""} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $testfile
-gdb_load_shlibs ${sofile}
+gdb_load_shlib ${sofile}
 
 gdb_test_no_output "set breakpoint pending yes"
 gdb_test "break C::C" {Breakpoint [0-9]+ \(C::C\) pending\.} "break C::C"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti1.cc ./gdb/testsuite/gdb.cp/rtti1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti1.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/rtti1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code to go along with tests in rtti.exp.
    
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
    Inc.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti2.cc ./gdb/testsuite/gdb.cp/rtti2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/rtti2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code to go along with tests in rtti.exp.
    
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
    Inc.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti.exp ./gdb/testsuite/gdb.cp/rtti.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/rtti.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] {debug c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti.h ./gdb/testsuite/gdb.cp/rtti.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/rtti.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/rtti.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Code to go along with tests in rtti.exp.
    
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
    Inc.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/scope-err.cc ./gdb/testsuite/gdb.cp/scope-err.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/scope-err.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/scope-err.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+myfunction (int aa)
+{
+  int i;
+
+  i = aa + 42;
+  return i;    /* set breakpoint here */
+}
+
+int
+main (void)
+{
+  int a;
+
+  a = myfunction (a);
+
+  return a;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/scope-err.exp ./gdb/testsuite/gdb.cp/scope-err.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/scope-err.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/scope-err.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,49 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tests for linespec errors with C++.
+# Derived from gdb.linespec/ls-errs.exp.
+
+if {[skip_cplus_tests]} {
+    continue
+}
+
+standard_testfile .cc
+set exefile $testfile
+
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug c++}]} {
+    return -1
+}
+
+if {![runto_main]} {
+    fail "can't run to main"
+    return 0
+}
+
+# Run to a location in the file.
+set bp_location [gdb_get_line_number "set breakpoint here"]
+
+gdb_test "break $srcfile:$bp_location" \
+    "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
+    "breakpoint line number in file"
+
+gdb_continue_to_breakpoint "$bp_location"
+
+# Try to access a variable using scope that is a non-existent filename
+# with a Windows-style logical drive in the name.
+set nonexistent_file C:/does/not/exist.cc
+gdb_test "print '$nonexistent_file'::var" \
+	 ".*No symbol \"$nonexistent_file\" in current context.*" \
+	 "print var from \"$nonexistent_file\""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/shadow.exp ./gdb/testsuite/gdb.cp/shadow.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/shadow.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/shadow.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -39,7 +39,7 @@ if ![runto_main] then {
 gdb_breakpoint [gdb_get_line_number "marker1"]
 gdb_continue_to_breakpoint "marker1"
 
-gdb_test "print x" "= 33" "Print class x shadowing global x"
+gdb_test "print x" "= 33" "print class x shadowing global x"
 
 
 ############################################
@@ -49,7 +49,7 @@ gdb_test "print x" "= 33" "Print class x
 gdb_breakpoint [gdb_get_line_number "marker2"]
 gdb_continue_to_breakpoint "marker2"
 
-gdb_test "print x" "= 44" "Print local x shadowing class x"
+gdb_test "print x" "= 44" "print local x shadowing class x"
 
 ############################################
 # Test inner scope x is printed not outer scope
@@ -57,7 +57,7 @@ gdb_test "print x" "= 44" "Print local x
 gdb_breakpoint [gdb_get_line_number "marker3"]
 gdb_continue_to_breakpoint "marker3"
 
-gdb_test "print x" "= 55" "Print inner scope x"
+gdb_test "print x" "= 55" "print inner scope x"
 
 ############################################
 # Test printing local variable is not shadowed
@@ -66,7 +66,7 @@ gdb_test "print x" "= 55" "Print inner s
 gdb_breakpoint [gdb_get_line_number "marker4"]
 gdb_continue_to_breakpoint "marker4"
 
-gdb_test "print x" "= 55" "Print local x not namespace x"
+gdb_test "print x" "= 55" "print local x not namespace x"
 
 ############################################
 # Test imported namespace element is printed
@@ -79,4 +79,4 @@ if { [test_compiler_info {gcc-[0-3]-*}] 
     setup_xfail *-*-*
 }
 
-gdb_test "print x" "= 11" "Print imported namespace x"
+gdb_test "print x" "= 11" "print imported namespace x"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/smartp.cc ./gdb/testsuite/gdb.cp/smartp.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/smartp.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/smartp.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 1999-2015 Free Software Foundation, Inc.
+   Copyright 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/smartp.exp ./gdb/testsuite/gdb.cp/smartp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/smartp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/smartp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-method.cc ./gdb/testsuite/gdb.cp/static-method.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-method.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/static-method.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-method.exp ./gdb/testsuite/gdb.cp/static-method.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-method.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/static-method.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # Contributed by Red Hat, originally written by Keith Seitz.
 #
@@ -43,7 +43,7 @@ if {[skip_cplus_tests]} { continue }
 # Tests for c++/12750
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile $testfile $srcfile {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-print-quit.cc ./gdb/testsuite/gdb.cp/static-print-quit.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-print-quit.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/static-print-quit.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-print-quit.exp ./gdb/testsuite/gdb.cp/static-print-quit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/static-print-quit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/static-print-quit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .cc
 
 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile.o object {debug c++}] != ""} {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -34,7 +34,7 @@ gdb_test_multiple "print c" $test {
     }
     -re "\r\n---Type <return>" {
 	# gdb-7.1 did not crash with this testcase but it had the same bug.
-	untested ${testfile}.exp
+	untested "bug does not reproduce"
 	return 0
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/temargs.cc ./gdb/testsuite/gdb.cp/temargs.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/temargs.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/temargs.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* Template argument tests.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/temargs.exp ./gdb/testsuite/gdb.cp/temargs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/temargs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/temargs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # temargs.exp - Template argument tests
 #
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[skip_cplus_tests]} {
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -34,7 +34,6 @@ if {![runto_main]} {
 # NOTE: prepare_for_testing calls get_compiler_info, which we need
 # for the test_compiler_info calls.
 # gcc 4.4 and earlier don't emit enough info for some of our template tests.
-verbose -log "compiler_info: $compiler_info"
 set have_older_template_gcc 0
 set have_pr_41736_fixed 1
 set have_pr_45024_fixed 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/templates.exp ./gdb/testsuite/gdb.cp/templates.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/templates.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/templates.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -116,7 +116,6 @@ proc test_template_breakpoints {} {
     global gdb_prompt
     global testfile
     global srcdir
-    global hp_aCC_compiler
 
     gdb_test_multiple "break T5<int>::T5" "constructor breakpoint" {
 	-re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2.*templates.cc:T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\)\[\r\n\]*.3.*templates.cc:T5<int>::T5\\(int\\)\[\r\n\]*> $" {
@@ -137,9 +136,6 @@ proc test_template_breakpoints {} {
 	}
     }
     
-# See CLLbs14792
-    if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792}
-
     gdb_test_multiple "break T5<int>::~T5" "destructor_breakpoint" {
 	-re "Breakpoint.*at.* file .*${testfile}.cc, line.*$gdb_prompt $"
 	{
@@ -186,15 +182,13 @@ proc test_template_breakpoints {} {
 
 proc test_template_calls {} {
     global gdb_prompt
-    global hp_aCC_compiler
 
     if [target_info exists gdb,cannot_call_functions] {
-	setup_xfail "*-*-*" 2416
-	fail "This target can not call functions"
+	unsupported "this target can not call functions"
 	return
     }
 
-    if {!$hp_aCC_compiler} {setup_xfail hppa*-*-*}
+    setup_xfail hppa*-*-*
     gdb_test_multiple "print t5i.value()" "print t5i.value()" {
 	-re ".* = 2\[\r\n\]*$gdb_prompt $" {
 	    pass "print t5i.value()"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/try_catch.cc ./gdb/testsuite/gdb.cp/try_catch.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/try_catch.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/try_catch.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/try_catch.exp ./gdb/testsuite/gdb.cp/try_catch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/try_catch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/try_catch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typedef-operator.cc ./gdb/testsuite/gdb.cp/typedef-operator.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typedef-operator.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/typedef-operator.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test case is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typedef-operator.exp ./gdb/testsuite/gdb.cp/typedef-operator.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typedef-operator.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/typedef-operator.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile $testfile $srcfile {c++ debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typeid.cc ./gdb/testsuite/gdb.cp/typeid.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typeid.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/typeid.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typeid.exp ./gdb/testsuite/gdb.cp/typeid.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/typeid.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/typeid.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {[skip_cplus_tests]} {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/userdef.cc ./gdb/testsuite/gdb.cp/userdef.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/userdef.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/userdef.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 1999-2015 Free Software Foundation, Inc.
+   Copyright 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/userdef.exp ./gdb/testsuite/gdb.cp/userdef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/userdef.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/userdef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Tests of overloaded operators resolution.
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { [istarget "spu*-*-*"] } {
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/using-crash.cc ./gdb/testsuite/gdb.cp/using-crash.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/using-crash.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/using-crash.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/using-crash.exp ./gdb/testsuite/gdb.cp/using-crash.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/using-crash.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/using-crash.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -14,7 +14,7 @@
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-2.cc ./gdb/testsuite/gdb.cp/var-tag-2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/var-tag-2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-3.cc ./gdb/testsuite/gdb.cp/var-tag-3.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-3.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/var-tag-3.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-4.cc ./gdb/testsuite/gdb.cp/var-tag-4.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag-4.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/var-tag-4.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag.cc ./gdb/testsuite/gdb.cp/var-tag.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/var-tag.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag.exp ./gdb/testsuite/gdb.cp/var-tag.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/var-tag.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/var-tag.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,20 +21,26 @@ if {[skip_cplus_tests]} { continue }
 
 standard_testfile var-tag.cc var-tag-2.cc var-tag-3.cc var-tag-4.cc
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
     [list $srcfile $srcfile2 $srcfile3 $srcfile4] {debug c++}]} {
     return -1
 }
 
 proc do_global_tests {lang} {
     set invalid_print "Attempt to use a type name as an expression"
-    set ptypefmt "type = (class|enum|union|struct) %s {.*}"
+
+    if {$lang == "c++"} {
+	set opt_underlying "(: unsigned (int|short|char) )?"
+    } else {
+	set opt_underlying ""
+    }
+    set ptypefmt "type = (class|enum|union|struct) %s $opt_underlying{.*}"
 
     with_test_prefix $lang {
     gdb_test_no_output "set language $lang"
     gdb_test "ptype C" "type = class C {.*}"
     gdb_test "print E" "= a"
-    gdb_test "ptype E" "type = enum E {.*}"
+    gdb_test "ptype E" "type = enum E $opt_underlying{.*}"
     gdb_test "print S" "= {<No data fields>}"
     gdb_test "ptype S" "type = struct S {.*}"
     gdb_test "print U" "= {.*}"
@@ -48,7 +54,7 @@ proc do_global_tests {lang} {
     gdb_test "print SS" [format $invalid_print "SS"]
     gdb_test "ptype SS" [format $ptypefmt "SS"]
     gdb_test "print ee" "= .*"
-    gdb_test "ptype ee" "type = enum EE {.*}"
+    gdb_test "ptype ee" "type = enum EE $opt_underlying{.*}"
     gdb_test "print EE" [format $invalid_print "EE"]
     gdb_test "ptype EE" [format $ptypefmt "EE"]
     gdb_test "print uu" "= {.*}"
@@ -60,7 +66,7 @@ proc do_global_tests {lang} {
     # Each of them is in a separate CU as once its CU is expanded,
     # we're no longer using the quick fns API.
     gdb_test "print E2" "= a2"
-    gdb_test "ptype E2" "type = enum E2 {.*}"
+    gdb_test "ptype E2" "type = enum E2 $opt_underlying{.*}"
     gdb_test "print S2" "= {<No data fields>}"
     gdb_test "ptype S2" "type = struct S2 {.*}"
     gdb_test "print U2" "= {.*}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtbase.exp ./gdb/testsuite/gdb.cp/virtbase.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtbase.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/virtbase.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -33,7 +33,7 @@ gdb_continue_to_breakpoint "first breakp
 
 # In PR 11226, we failed to print x correctly in the "print *this"
 # case.
-gdb_test "print *this" " = {<mc::Base> = {x = 2}, _vptr.Middle = $hex, y = 3}"
+gdb_test "print *this" " = {<mc::Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}"
 gdb_test "print x" " = 2" "print x in get_y"
 
 gdb_breakpoint [gdb_get_line_number "breakpoint 2"]
@@ -46,7 +46,7 @@ gdb_breakpoint [gdb_get_line_number "bre
 gdb_continue_to_breakpoint "third breakpoint"
 
 # In PR 9629, we failed to print v correctly here.
-gdb_test "print *(D *) e" " = {<C> = {v = 11}, _vptr.D = $hex}"
+gdb_test "print *(D *) e" " = {<C> = {v = 11}, _vptr.D = ${hex}( <\[^>]*>)?}"
 
 # A regression test reported to Red Hat bugzilla, see:
 # https://bugzilla.redhat.com/show_bug.cgi?id=560741
@@ -70,5 +70,5 @@ gdb_test "print $" \
     " = \\(Virtual \\*\\) $hex <virtual_o>" \
     "print same pointer from history value"
 gdb_test "print *$$" \
-    " = \\(Virtual\\) {<VirtualMiddleA> = {<VirtualBase> = {_vptr.VirtualBase = ${hex}( <vtable for Virtual.*>)?, x = 0}, _vptr.VirtualMiddleA = ${hex}( <vtable for Virtual.*>)?, y = \\{0 <repeats 300 times>\\}}, <VirtualMiddleB> = {_vptr.VirtualMiddleB = ${hex}( <vtable for Virtual.*>)?, y = 0}, _vptr.Virtual = ${hex}( <vtable for Virtual.*>)?, z = 0}" \
+    " = \\(Virtual\\) {<VirtualMiddleA> = {<VirtualBase> = {_vptr.VirtualBase = ${hex}( <\[^>]*>)?, x = 0}, _vptr.VirtualMiddleA = ${hex}( <\[^>]*>)?, y = \\{0 <repeats 300 times>\\}}, <VirtualMiddleB> = {_vptr.VirtualMiddleB = ${hex}( <\[^>]*>)?, y = 0}, _vptr.Virtual = ${hex}( <\[^>]*>)?, z = 0}" \
     "print whole pointed-to object, starting from the virtual base pointer"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc2.cc ./gdb/testsuite/gdb.cp/virtfunc2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/virtfunc2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
  /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc2.exp ./gdb/testsuite/gdb.cp/virtfunc2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/virtfunc2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ load_lib "cp-support.exp"
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc.cc ./gdb/testsuite/gdb.cp/virtfunc.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/virtfunc.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 1993-2015 Free Software Foundation, Inc.
+   Copyright 1993-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc.exp ./gdb/testsuite/gdb.cp/virtfunc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/virtfunc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/virtfunc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ load_lib "cp-support.exp"
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -177,8 +177,7 @@ proc test_virtual_calls {} {
     global nl
 
     if [target_info exists gdb,cannot_call_functions] {
-	setup_xfail "*-*-*" 2416
-	fail "This target can not call functions"
+	unsupported "this target can not call functions"
 	return 0
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/vla-cxx.cc ./gdb/testsuite/gdb.cp/vla-cxx.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/vla-cxx.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/vla-cxx.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,5 +45,6 @@ int main(int argc, char **argv)
     vla[i] = 5 + 2 * i;
 
   // vlas_filled
+  vla[0] = 2 * vla[0];
   return vla[2];
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/vla-cxx.exp ./gdb/testsuite/gdb.cp/vla-cxx.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.cp/vla-cxx.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.cp/vla-cxx.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/am33.exp ./gdb/testsuite/gdb.disasm/am33.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/am33.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/am33.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set testfile "am33"
 set srcfile ${srcdir}/${subdir}/${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
-     untested am33.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/disassembler-options.exp ./gdb/testsuite/gdb.disasm/disassembler-options.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/disassembler-options.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/disassembler-options.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+# Copyright (C) 2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test exercises set/show disassembler-options
+
+gdb_exit
+gdb_start
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+	"The current disassembler options are ''.*" \
+	"show NULL disassembler-options"
+
+set test "set disassembler-options invalid_option_value"
+gdb_test_multiple $test $test {
+  -re "Invalid disassembler option value: 'invalid_option_value'\." {
+    pass $test
+  }
+  -re "'set disassembler-options \.\.\.' is not supported on this architecture\." {
+    pass $test
+  }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/h8300s.exp ./gdb/testsuite/gdb.disasm/h8300s.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/h8300s.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/h8300s.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ set testfile "h8300s"
 set srcfile ${srcdir}/${subdir}/${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-ms}] != "" } {
-     untested h8300s.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/hppa.exp ./gdb/testsuite/gdb.disasm/hppa.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/hppa.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/hppa.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/Makefile.in ./gdb/testsuite/gdb.disasm/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-.PHONY: all clean mostlyclean distclean realclean
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *.o *.diff *~ *.bad core h8300s hppa mn10300 sh3
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/mn10300.exp ./gdb/testsuite/gdb.disasm/mn10300.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/mn10300.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/mn10300.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set testfile "mn10300"
 set srcfile ${srcdir}/${subdir}/${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
-     untested mn10300.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/sh3.exp ./gdb/testsuite/gdb.disasm/sh3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/sh3.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/sh3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ set testfile "sh3"
 set srcfile ${srcdir}/${subdir}/${testfile}.s
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
-     untested sh3.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t01_mov.exp ./gdb/testsuite/gdb.disasm/t01_mov.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t01_mov.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t01_mov.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t01_mov.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t01_mov.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t02_mova.exp ./gdb/testsuite/gdb.disasm/t02_mova.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t02_mova.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t02_mova.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t02_mova.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t02_mova.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t03_add.exp ./gdb/testsuite/gdb.disasm/t03_add.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t03_add.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t03_add.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t03_add.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t03_add.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t04_sub.exp ./gdb/testsuite/gdb.disasm/t04_sub.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t04_sub.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t04_sub.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t04_sub.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t04_sub.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t05_cmp.exp ./gdb/testsuite/gdb.disasm/t05_cmp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t05_cmp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t05_cmp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t05_cmp.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t05_cmp.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t06_ari2.exp ./gdb/testsuite/gdb.disasm/t06_ari2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t06_ari2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t06_ari2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t06_ari2.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t06_ari2.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t07_ari3.exp ./gdb/testsuite/gdb.disasm/t07_ari3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t07_ari3.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t07_ari3.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t07_ari3.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t07_ari3.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t08_or.exp ./gdb/testsuite/gdb.disasm/t08_or.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t08_or.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t08_or.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t08_or.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t08_or.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t09_xor.exp ./gdb/testsuite/gdb.disasm/t09_xor.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t09_xor.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t09_xor.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t09_xor.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t09_xor.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t10_and.exp ./gdb/testsuite/gdb.disasm/t10_and.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t10_and.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t10_and.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t10_and.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t10_and.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t11_logs.exp ./gdb/testsuite/gdb.disasm/t11_logs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t11_logs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t11_logs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t11_logs.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t11_logs.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t12_bit.exp ./gdb/testsuite/gdb.disasm/t12_bit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t12_bit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t12_bit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t12_bit.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t12_bit.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t13_otr.exp ./gdb/testsuite/gdb.disasm/t13_otr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.disasm/t13_otr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.disasm/t13_otr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ set link-flags "-m h8300sxelf"
 
 
 if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
-     untested t13_otr.exp
+     untested "failed to assemble"
      return -1
 }
 
 if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
-     untested t13_otr.exp
+     untested "failed to link"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/circular.c ./gdb/testsuite/gdb.dlang/circular.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/circular.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/circular.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+/* Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+asm ("circular1_found_start: .globl circular1_found_start");
+
+/* DWARF will describe this function as being inside a D module.  */
+
+void
+found (void)
+{
+}
+
+asm ("circular1_found_end: .globl circular1_found_end");
+
+int
+main (void)
+{
+  found ();
+  return 0;
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/circular.exp ./gdb/testsuite/gdb.dlang/circular.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/circular.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/circular.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,149 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test symbol lookup when there are multiple circular imports.
+
+load_lib "d-support.exp"
+load_lib "dwarf.exp"
+
+if { [skip_d_tests] } { continue }
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile circular.c circular-dw.S
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    cu {} {
+	compile_unit {
+	    {language @DW_LANG_D}
+	} {
+	    declare_labels circular1_label circular2_label circular3_label
+	    declare_labels circular4_label circular5_label
+
+	    extern circular1_found_start circular1_found_end
+
+	    circular1_label: module {
+		{name circular1}
+	    } {
+		imported_module {
+		    {import :$circular2_label}
+		}
+		imported_module {
+		    {import :$circular3_label}
+		}
+		imported_module {
+		    {import :$circular4_label}
+		}
+		imported_module {
+		    {import :$circular5_label}
+		}
+
+		subprogram {
+		    {name found}
+		    {external 1 flag_present}
+		    {low_pc circular1_found_start addr}
+		    {high_pc circular1_found_end addr}
+		}
+	    }
+
+	    circular2_label: module {
+		{name circular2}
+	    } {
+		imported_module {
+		    {import :$circular1_label}
+		}
+		imported_module {
+		    {import :$circular3_label}
+		}
+		imported_module {
+		    {import :$circular4_label}
+		}
+		imported_module {
+		    {import :$circular5_label}
+		}
+	    }
+
+	    circular3_label: module {
+		{name circular3}
+	    } {
+		imported_module {
+		    {import :$circular1_label}
+		}
+		imported_module {
+		    {import :$circular2_label}
+		}
+		imported_module {
+		    {import :$circular4_label}
+		}
+		imported_module {
+		    {import :$circular5_label}
+		}
+	    }
+
+	    circular4_label: module {
+		{name circular4}
+	    } {
+		imported_module {
+		    {import :$circular1_label}
+		}
+		imported_module {
+		    {import :$circular2_label}
+		}
+		imported_module {
+		    {import :$circular3_label}
+		}
+		imported_module {
+		    {import :$circular5_label}
+		}
+	    }
+
+	    circular5_label: module {
+		{name circular5}
+	    } {
+		imported_module {
+		    {import :$circular1_label}
+		}
+		imported_module {
+		    {import :$circular2_label}
+		}
+		imported_module {
+		    {import :$circular3_label}
+		}
+		imported_module {
+		    {import :$circular4_label}
+		}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+          [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+gdb_test_no_output "set language d"
+
+if {![runto "circular1.found"]} {
+    return -1
+}
+
+# This last test shouldn't timeout.
+gdb_test "print notfound" "No symbol \"notfound\" in current context."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/debug-expr.exp ./gdb/testsuite/gdb.dlang/debug-expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/debug-expr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/debug-expr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright 2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test "set debug expr 1" on d expressions.
+
+if { [skip_d_tests] } { return -1 }
+
+gdb_start
+gdb_test_no_output "set language d"
+gdb_test_no_output "set debug expression 1"
+
+# Test whether the expression debug machinery accepts the expression.
+
+proc test_debug_expr { cmd output } {
+    global gdb_prompt
+
+    gdb_test_multiple $cmd "" {
+	-re ".*Invalid expression.*\r\n$gdb_prompt $" {
+	    fail $cmd
+	}
+	-re ".*\[\r\n\]$output\r\n$gdb_prompt $" {
+	    pass $cmd
+	}
+    }
+}
+
+# This caused gdb to segfault.
+test_debug_expr "print *(int*)(0)" "Cannot access memory at address 0x0"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/demangle.exp ./gdb/testsuite/gdb.dlang/demangle.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/demangle.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/demangle.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -111,6 +111,7 @@ proc test_d_demangling {} {
     test_demangling "_D8demangle4testFaXv" "demangle.test(char...)"
     test_demangling "_D8demangle4testFaYv" "demangle.test(char, ...)"
     test_demangling "_D8demangle4testFaaYv" "demangle.test(char, char, ...)"
+    test_demangling "_D8demangle4testFYv" "demangle.test(...)"
     test_demangling "_D8demangle4testFaaZv" "demangle.test(char, char)"
 
     test_demangling "_D8demangle4testFDFZaZv" "demangle.test(char() delegate)"
@@ -118,12 +119,14 @@ proc test_d_demangling {} {
     test_demangling "_D8demangle4testFDWZaZv" "demangle.test(extern(Windows) char() delegate)"
     test_demangling "_D8demangle4testFDVZaZv" "demangle.test(extern(Pascal) char() delegate)"
     test_demangling "_D8demangle4testFDRZaZv" "demangle.test(extern(C++) char() delegate)"
+    test_demangling "_D8demangle4testFDYZaZv" "demangle.test(extern(Objective-C) char() delegate)"
 
-    test_demangling "_D8demangle4testFFZaZv" "demangle.test(char() function)"
-    test_demangling "_D8demangle4testFUZaZv" "demangle.test(extern(C) char() function)"
-    test_demangling "_D8demangle4testFWZaZv" "demangle.test(extern(Windows) char() function)"
-    test_demangling "_D8demangle4testFVZaZv" "demangle.test(extern(Pascal) char() function)"
-    test_demangling "_D8demangle4testFRZaZv" "demangle.test(extern(C++) char() function)"
+    test_demangling "_D8demangle4testFPFZaZv" "demangle.test(char() function)"
+    test_demangling "_D8demangle4testFPUZaZv" "demangle.test(extern(C) char() function)"
+    test_demangling "_D8demangle4testFPWZaZv" "demangle.test(extern(Windows) char() function)"
+    test_demangling "_D8demangle4testFPVZaZv" "demangle.test(extern(Pascal) char() function)"
+    test_demangling "_D8demangle4testFPRZaZv" "demangle.test(extern(C++) char() function)"
+    test_demangling "_D8demangle4testFPYZaZv" "demangle.test(extern(Objective-C) char() function)"
 
     test_demangling "_D8demangle4testFDFNaZaZv" "demangle.test(char() pure delegate)"
     test_demangling "_D8demangle4testFDFNbZaZv" "demangle.test(char() nothrow delegate)"
@@ -132,15 +135,15 @@ proc test_d_demangling {} {
     test_demangling "_D8demangle4testFDFNeZaZv" "demangle.test(char() @trusted delegate)"
     test_demangling "_D8demangle4testFDFNfZaZv" "demangle.test(char() @safe delegate)"
 
-    test_demangling "_D8demangle4testFFNaZaZv" "demangle.test(char() pure function)"
-    test_demangling "_D8demangle4testFFNbZaZv" "demangle.test(char() nothrow function)"
-    test_demangling "_D8demangle4testFFNcZaZv" "demangle.test(char() ref function)"
-    test_demangling "_D8demangle4testFFNdZaZv" "demangle.test(char() @property function)"
-    test_demangling "_D8demangle4testFFNeZaZv" "demangle.test(char() @trusted function)"
-    test_demangling "_D8demangle4testFFNfZaZv" "demangle.test(char() @safe function)"
-    test_demangling "_D8demangle4testFFNaNbZaZv" "demangle.test(char() pure nothrow function)"
-    test_demangling "_D8demangle4testFFNbNaZaZv" "demangle.test(char() nothrow pure function)"
-    test_demangling "_D8demangle4testFFNdNfNaZaZv" "demangle.test(char() @property @safe pure function)"
+    test_demangling "_D8demangle4testFPFNaZaZv" "demangle.test(char() pure function)"
+    test_demangling "_D8demangle4testFPFNbZaZv" "demangle.test(char() nothrow function)"
+    test_demangling "_D8demangle4testFPFNcZaZv" "demangle.test(char() ref function)"
+    test_demangling "_D8demangle4testFPFNdZaZv" "demangle.test(char() @property function)"
+    test_demangling "_D8demangle4testFPFNeZaZv" "demangle.test(char() @trusted function)"
+    test_demangling "_D8demangle4testFPFNfZaZv" "demangle.test(char() @safe function)"
+    test_demangling "_D8demangle4testFPFNaNbZaZv" "demangle.test(char() pure nothrow function)"
+    test_demangling "_D8demangle4testFPFNbNaZaZv" "demangle.test(char() nothrow pure function)"
+    test_demangling "_D8demangle4testFPFNdNfNaZaZv" "demangle.test(char() @property @safe pure function)"
 
     test_demangling "_D8demangle4test6__vtblZ" "vtable for demangle.test"
     test_demangling "_D8demangle4test6__initZ" "demangle.test.init$"
@@ -186,7 +189,7 @@ proc test_d_demangling {} {
     test_demangling "_D3std7process18escapeShellCommandFxAAaXAya" "std.process.escapeShellCommand(const(char\[\]\[\])...)"
     test_demangling "_D4core4sync5mutex5Mutex6__ctorMFC6ObjectZC4core4sync5mutex5Mutex" "core.sync.mutex.Mutex.this(Object)"
     test_demangling "_D6object14TypeInfo_Array8argTypesMFNbNfJC8TypeInfoJC8TypeInfoZi" "object.TypeInfo_Array.argTypes(out TypeInfo, out TypeInfo)"
-    test_demangling "_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv" "rt.dmain2._d_run_main(int, char**, extern(C) int(char\[\]\[\]) function*).tryExec(scope void() delegate)"
+    test_demangling "_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv" "rt.dmain2._d_run_main(int, char**, extern(C) int(char\[\]\[\]) function).tryExec(scope void() delegate)"
     test_demangling "_D6object9Exception6__ctorMFNaNbNfAyaAyamC6object9ThrowableZC9Exception" "object.Exception.this(immutable(char)\[\], immutable(char)\[\], ulong, object.Throwable)"
     test_demangling "_D3gcc3deh17parse_lsda_headerFPS3gcc6unwind7generic15_Unwind_ContextPhPS3gcc3deh16lsda_header_infoZPh" "gcc.deh.parse_lsda_header(gcc.unwind.generic._Unwind_Context*, ubyte*, gcc.deh.lsda_header_info*)"
     test_demangling "_D3std6socket23UnknownAddressReference6__ctorMFPS4core3sys5posix3sys6socket8sockaddrkZC3std6socket23UnknownAddressReference" "std.socket.UnknownAddressReference.this(core.sys.posix.sys.socket.sockaddr*, uint)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/expression.exp ./gdb/testsuite/gdb.dlang/expression.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/expression.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/expression.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/Makefile.in ./gdb/testsuite/gdb.dlang/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/primitive-types.exp ./gdb/testsuite/gdb.dlang/primitive-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/primitive-types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/primitive-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/properties.exp ./gdb/testsuite/gdb.dlang/properties.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dlang/properties.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dlang/properties.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,93 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test basic builtin types.
+# NOTE: The tests here intentionally do not require a D compiler.
+
+load_lib "d-support.exp"
+
+if { [skip_d_tests] } { continue }
+
+proc test_d_sizeof {} {
+    # Test use of .sizeof with types and expressions.
+    gdb_test "print bool.sizeof" " = 1"
+    gdb_test "print (bool).sizeof" " = 1"
+
+    gdb_test "print char.sizeof" " = 1"
+    gdb_test "print wchar.sizeof" " = 2"
+    gdb_test "print dchar.sizeof" " = 4"
+
+    gdb_test "print byte.sizeof" " = 1"
+    gdb_test "print ubyte.sizeof" " = 1"
+    gdb_test "print short.sizeof" " = 2"
+    gdb_test "print ushort.sizeof" " = 2"
+    gdb_test "print int.sizeof" " = 4"
+    gdb_test "print uint.sizeof" " = 4"
+    gdb_test "print long.sizeof" " = 8"
+    gdb_test "print ulong.sizeof" " = 8"
+    gdb_test "print cent.sizeof" " = 16"
+    gdb_test "print ucent.sizeof" " = 16"
+
+    gdb_test "print float.sizeof" " = 4"
+    gdb_test "print ifloat.sizeof" " = 4"
+    gdb_test "print double.sizeof" " = 8"
+    gdb_test "print idouble.sizeof" " = 8"
+
+    gdb_test "print (1).sizeof" " = 4"
+    gdb_test "print (1U).sizeof" " = 4"
+    gdb_test "print (1L).sizeof" " = 8"
+    gdb_test "print (1UL).sizeof" " = 8"
+    gdb_test "print (1.0).sizeof" " = 8"
+    gdb_test "print (1.0f).sizeof" " = 4"
+
+    gdb_test "print (7 ^^ 3).sizeof" " = 4"
+    gdb_test "print (7L ^^ 3).sizeof" " = 8"
+    gdb_test "print (7.0 ^^ 3).sizeof" " = 8"
+    gdb_test "print (7.0f ^^ 3).sizeof" " = 4"
+}
+
+proc test_d_typeof {} {
+    # Test use of typeof() with expressions.
+    gdb_test "ptype typeof(false)" "type = bool"
+
+    gdb_test "ptype typeof(1)" "type = int"
+    gdb_test "ptype typeof(1U)" "type = uint"
+    gdb_test "ptype typeof(1L)" "type = long"
+    gdb_test "ptype typeof(1UL)" "type = ulong"
+    gdb_test "ptype typeof(1.0)" "type = double"
+    gdb_test "ptype typeof(1.0L)" "type = real"
+    gdb_test "ptype typeof(1.0f)" "type = float"
+
+    gdb_test "ptype typeof(cast(byte) 1)" "type = byte"
+    gdb_test "ptype typeof(cast(short) 1)" "type = short"
+
+    gdb_test "ptype typeof(7 ^^ 3)" "type = int"
+    gdb_test "ptype typeof(7L ^^ 3)" "type = long"
+    gdb_test "ptype typeof(7.0 ^^ 3)" "type = double"
+    gdb_test "ptype typeof(7.0L ^^ 3)" "type = real"
+    gdb_test "ptype typeof(7.0f ^^ 3)" "type = float"
+}
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+
+if [set_lang_d] {
+    test_d_sizeof
+    test_d_typeof
+} else {
+    warning "D type tests suppressed."
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-stride.c ./gdb/testsuite/gdb.dwarf2/arr-stride.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-stride.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/arr-stride.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-stride.exp ./gdb/testsuite/gdb.dwarf2/arr-stride.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-stride.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/arr-stride.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -83,7 +83,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-subrange.c ./gdb/testsuite/gdb.dwarf2/arr-subrange.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-subrange.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/arr-subrange.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-subrange.exp ./gdb/testsuite/gdb.dwarf2/arr-subrange.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/arr-subrange.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/arr-subrange.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/atomic.c ./gdb/testsuite/gdb.dwarf2/atomic.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/atomic.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/atomic.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ main (void)
 int
 f (char *x)
 {
-  asm (".global f_end_lbl\nf_end_lbl:");
+  asm ("f_label: .globl f_label");
   return 0;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/atomic-type.exp ./gdb/testsuite/gdb.dwarf2/atomic-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/atomic-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/atomic-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,6 +25,12 @@ standard_testfile atomic.c atomic-type-d
 
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile
+
+    set f_result [function_range f ${srcdir}/${subdir}/${srcfile}]
+    set f_start [lindex $f_result 0]
+    set f_length [lindex $f_result 1]
+
     cu {} {
 	DW_TAG_compile_unit {
                 {DW_AT_language @DW_LANG_C11}
@@ -68,8 +74,8 @@ Dwarf::assemble $asm_file {
 
             DW_TAG_subprogram {
                 {name f}
-                {low_pc f addr}
-                {high_pc f_end_lbl addr}
+                {low_pc $f_start addr}
+                {high_pc "$f_start + $f_length" addr}
                 {type :$i_l}
             } {
                 DW_TAG_formal_parameter {
@@ -81,7 +87,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bad-regnum.c ./gdb/testsuite/gdb.dwarf2/bad-regnum.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bad-regnum.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/bad-regnum.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main ()
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bad-regnum.exp ./gdb/testsuite/gdb.dwarf2/bad-regnum.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bad-regnum.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/bad-regnum.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,76 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile bad-regnum.c bad-regnum-dw.S
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C}
+	    {DW_AT_name     bad-regnum-dw.c}
+	    {DW_AT_comp_dir /tmp}
+	} {
+	    declare_labels integer_label
+
+	    integer_label: DW_TAG_base_type {
+		{DW_AT_byte_size 4 DW_FORM_sdata}
+		{DW_AT_encoding  @DW_ATE_signed}
+		{DW_AT_name      integer}
+	    }
+
+	    DW_TAG_variable {
+		{DW_AT_name foo1}
+		{DW_AT_type :$integer_label}
+		{DW_AT_location {
+		    DW_OP_regx 2147483647
+		} SPECIAL_expr}
+		{external 1 flag}
+	    }
+
+	    DW_TAG_variable {
+		{DW_AT_name foo2}
+		{DW_AT_type :$integer_label}
+		{DW_AT_location {
+		    DW_OP_regx -1
+		} SPECIAL_expr}
+		{external 1 flag}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+gdb_test "info addr foo1" \
+    "Symbol \"foo1\" is a variable in \\\$bad_register_number."
+
+gdb_test "info addr foo2" \
+    "Symbol \"foo2\" is a variable in \\\$bad_register_number."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp ./gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,86 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test printing a bitfield of an optimized-out variable.  Regression
+# test for PR gdb/20295.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile main.c .S
+set executable ${testfile}
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile
+
+    cu { version 3 addr_size 4 } {
+	compile_unit {} {
+	    declare_labels struct_label var_label int_label
+
+	    int_label: base_type {
+		{byte_size 4 sdata}
+		{encoding @DW_ATE_signed}
+		{name int}
+	    }
+
+	    struct_label: structure_type {
+		{name S}
+		{byte_size 8 DW_FORM_sdata}
+	    } {
+		member {
+		    {name bitfield}
+		    {type :$int_label}
+		    {bit_size 12 DW_FORM_sdata}
+		    {bit_offset 20 DW_FORM_sdata}
+		}
+		member {
+		    {name intfield}
+		    {type :$int_label}
+		    {data_member_location 4 DW_FORM_sdata}
+		}
+	    }
+
+	    subprogram {
+		{MACRO_AT_func { main ${srcdir}/${subdir}/${srcfile} }}
+		{type :$int_label}
+		{external 1 flag}
+	    } {
+		var_label: DW_TAG_variable {
+		    {name var}
+		    {location {} DW_FORM_block1}
+		    {type :$struct_label}
+		}
+	    }
+	}
+    }
+}
+
+if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}] {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+gdb_test "p var" " = <optimized out>"
+gdb_test "p var.bitfield" " = <optimized out>"
+gdb_test "p var.intfield" " = <optimized out>"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/callframecfa.exp ./gdb/testsuite/gdb.dwarf2/callframecfa.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/callframecfa.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/callframecfa.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![is_x86_like_target]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list {additional_flags=-nostdlib}]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/callframecfa.S ./gdb/testsuite/gdb.dwarf2/callframecfa.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/callframecfa.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/callframecfa.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/clztest.exp ./gdb/testsuite/gdb.dwarf2/clztest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/clztest.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/clztest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
     return 0
 }
 
-if { [prepare_for_testing "${test}.exp" "${test}" ${test}.S {nodebug additional_flags=-nostdlib}] } {
+if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug additional_flags=-nostdlib}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/clztest.S ./gdb/testsuite/gdb.dwarf2/clztest.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/clztest.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/clztest.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/comp-unit-lang.c ./gdb/testsuite/gdb.dwarf2/comp-unit-lang.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/comp-unit-lang.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/comp-unit-lang.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+asm (".section	\".text\"");
+asm (".balign 8");
+asm ("func_start: .globl func_start");
+
+static void
+func (void)
+{
+}
+
+asm ("func_end: .globl func_end");
+
+int
+main (void)
+{
+  func ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp ./gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,80 @@
+# Copyright 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that GDB determines the frame's language based on the comp
+# unit's language, even if the file has an unknown file extension,
+# such as ".txt".
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use
+# gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile .c comp-unit-lang.S
+
+# Assemble the DWARF using CU_LANG as compilation unit's language.
+# Run to a function in that compilation unit and check that GDB
+# figures out that the language is GDB_LANG.
+
+proc do_test {cu_lang gdb_lang} {
+    global testfile srcfile srcfile2
+
+    # Make some DWARF for the test.
+    set asm_file [standard_output_file $srcfile2]
+    Dwarf::assemble $asm_file {
+	upvar cu_lang cu_lang
+
+	# Creating a CU with 4-byte addresses lets this test link on
+	# both 32- and 64-bit machines.
+	cu { addr_size 4 } {
+	    extern func_start func_end
+
+	    compile_unit {
+		{name file1.txt}
+		{language @$cu_lang}
+		{low_pc func_start addr}
+		{high_pc func_end addr}
+	    } {
+		subprogram {
+		    {external 1 flag}
+		    {name func}
+		    {low_pc func_start addr}
+		    {high_pc func_end addr}
+		} {
+		}
+	    }
+	}
+    }
+
+    if { [prepare_for_testing "failed to prepare" ${testfile} \
+	      [list $srcfile $asm_file] {nodebug}] } {
+	return -1
+    }
+
+    if ![runto func] {
+	return -1
+    }
+
+    gdb_test "show language" "\"auto; currently $gdb_lang\".*"
+}
+
+# Some paths in the debugger fall back to C.  Check C++ as well to
+# make sure the test doesn't happen to work because of such a
+# fallback.
+do_test DW_LANG_C "c"
+do_test DW_LANG_C_plus_plus "c\\+\\+"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/corrupt.c ./gdb/testsuite/gdb.dwarf2/corrupt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/corrupt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/corrupt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/corrupt.exp ./gdb/testsuite/gdb.dwarf2/corrupt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/corrupt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/corrupt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $asm_file] {nodebug}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/count.exp ./gdb/testsuite/gdb.dwarf2/count.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/count.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/count.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/data-loc.c ./gdb/testsuite/gdb.dwarf2/data-loc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/data-loc.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/data-loc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/data-loc.exp ./gdb/testsuite/gdb.dwarf2/data-loc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/data-loc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/data-loc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,8 +28,7 @@ standard_testfile data-loc.c data-loc-dw
 # Any program would do, but since we already have data-loc.c
 # specifically for this testcase, might as well use that.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -43,9 +42,10 @@ Dwarf::assemble $asm_file {
                 {DW_AT_comp_dir /tmp}
         } {
             declare_labels integer_label array_label array_ptr_label
+	    set int_size [get_sizeof "int" 4]
 
             integer_label: DW_TAG_base_type {
-                {DW_AT_byte_size 4 DW_FORM_sdata}
+                {DW_AT_byte_size $int_size DW_FORM_sdata}
                 {DW_AT_encoding  @DW_ATE_signed}
                 {DW_AT_name      integer}
             }
@@ -84,7 +84,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__three}
                 {DW_AT_type :$array_label}
                 {DW_AT_location {
-                    DW_OP_addr table_1
+                    DW_OP_addr [gdb_target_symbol table_1]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -92,7 +92,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__three_tdef}
                 {DW_AT_type :$array_ptr_label}
                 {DW_AT_location {
-                    DW_OP_addr table_1
+                    DW_OP_addr [gdb_target_symbol table_1]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -100,7 +100,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__five}
                 {DW_AT_type :$array_label}
                 {DW_AT_location {
-                    DW_OP_addr table_2
+                    DW_OP_addr [gdb_target_symbol table_2]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -108,7 +108,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__five_tdef}
                 {DW_AT_type :$array_ptr_label}
                 {DW_AT_location {
-                    DW_OP_addr table_2
+                    DW_OP_addr [gdb_target_symbol table_2]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -120,7 +120,7 @@ Dwarf::assemble $asm_file {
 # program using our debug info instead of the info generated by
 # the compiler.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dup-psym.exp ./gdb/testsuite/gdb.dwarf2/dup-psym.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dup-psym.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dup-psym.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2005-2015 Free Software Foundation, Inc.
+#   Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile {debug} main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dup-psym.S ./gdb/testsuite/gdb.dwarf2/dup-psym.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dup-psym.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dup-psym.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.c ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello.c ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello-dbg.S ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello-dbg.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello-dbg.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-hello-dbg.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world.c ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world-dbg.S ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world-dbg.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world-dbg.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc-world-dbg.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp ./gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.S ./gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp ./gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ standard_testfile .S
 
 if {[gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
 	 object {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S ./gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp ./gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.S ./gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.c ./gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,41 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Dummy main function.  */
+
+int
+main (void)
+{
+  asm ("main_label: .globl main_label");
+  return 0;
+}
+
+/* dummy f function, DWARF will describe arguments and type differently.  */
+int
+f (char *x)
+{
+  asm ("f_label: .globl f_label");
+  return 0;
+}
+
+/* dummy g function, DWARF will describe arguments and type differently.  */
+int
+g (char *x)
+{
+  asm ("g_label: .globl g_label");
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp ./gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,82 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0  
+}
+
+standard_testfile dw2-bad-mips-linkage-name.c dw2-bad-mips-linkage-name.S
+
+# Set up the DWARF for the test.
+
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile
+
+    set f_result [function_range f ${srcdir}/${subdir}/${srcfile}]
+    set f_start [lindex $f_result 0]
+    set f_length [lindex $f_result 1]
+
+    set g_result [function_range g ${srcdir}/${subdir}/${srcfile}]
+    set g_start [lindex $g_result 0]
+    set g_length [lindex $g_result 1]
+
+    cu {} {
+	DW_TAG_compile_unit {
+                {DW_AT_language @DW_LANG_C}
+                {DW_AT_name     dw2-bad-mips-linkage-name.c}
+                {DW_AT_comp_dir /tmp}
+
+        } {
+	    declare_labels b_l
+
+	    b_l: DW_TAG_base_type {
+		{DW_AT_byte_size 1 DW_FORM_sdata}
+		{DW_AT_encoding  @DW_ATE_signed}
+		{DW_AT_name      bool}
+	    }
+            DW_TAG_subprogram {
+                {name f}
+                {low_pc $f_start addr}
+                {high_pc "$f_start + $f_length" addr}
+                {type :$b_l}
+		{DW_AT_MIPS_linkage_name _Z1fv}
+	    }
+            DW_TAG_subprogram {
+                {name g}
+                {low_pc $g_start addr}
+                {high_pc "$g_start + $g_length" addr}
+                {type :$b_l}
+		{DW_AT_MIPS_linkage_name 42 DW_FORM_data1}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+# A successful run will have two PASSes.  A GDB that's lacking
+# attribute type checking will segfault at some point.  It doesn't
+# much matter what we test here, so long as we do something to make
+# sure that the DWARF is read.
+
+gdb_test "ptype f" " = bool \\(\\)"
+gdb_test "ptype g" " = bool \\(\\)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp ./gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.S ./gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.c ./gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Dummy main function.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp ./gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,59 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0  
+}
+
+standard_testfile dw2-bad-unresolved.c dw2-bad-unresolved-2.S
+
+# Set up the DWARF for the test.
+# The key part of this is the definition of variable "var" having no location.
+# That will cause it to have LOC_UNRESOLVED.
+
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C}
+	    {DW_AT_name     dw2-bad-unresolved-2.c}
+	    {DW_AT_comp_dir /tmp}
+	} {
+	    declare_labels b_l
+
+	    b_l: DW_TAG_base_type {
+		{DW_AT_byte_size 1 DW_FORM_sdata}
+		{DW_AT_encoding  @DW_ATE_signed}
+		{DW_AT_name      bool}
+	    }
+	    DW_TAG_variable {
+		{name var}
+		{type :$b_l}
+		{external 1 flag}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+gdb_test "ptype var" "type = bool"
+gdb_test "print var" "Missing .* symbol \"var\"."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-basic.exp ./gdb/testsuite/gdb.dwarf2/dw2-basic.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-basic.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-basic.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-basic.S ./gdb/testsuite/gdb.dwarf2/dw2-basic.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-basic.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-basic.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp ./gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,10 +19,14 @@ if {![dwarf2_support]} {
     return 0  
 }
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
 set executable ${testfile}
 
-if [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile \
+	[list nodebug $additional_flags]] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S ./gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,9 +13,18 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.text
-	.globl main
-main:
+	.globl SYMBOL(main)
+SYMBOL(main):
 	.4byte	0
 .Lmain_end:
 	.section	.debug_info
@@ -29,12 +38,12 @@ debug_start:
 	.ascii "GNU C 4.4.3\0"	/* DW_AT_producer */
 	.byte	0x4	/* DW_AT_language = DW_LANG_C_plus_plus */
 	.ascii "1.c\0"	/* DW_AT_name */
-	.4byte	main		/* DW_AT_low_pc */
+	.4byte	SYMBOL(main)		/* DW_AT_low_pc */
 	.4byte	.Lmain_end	/* DW_AT_high_pc */
 	.uleb128 0x4	/* (DIE (0x3c) DW_TAG_subprogram) */
 	.ascii "f\0"	/* DW_AT_name */
 /* Value 0 would require has_section_at_zero != 0 (which is true, though).  */
-	.4byte	main		/* DW_AT_low_pc */
+	.4byte	SYMBOL(main)		/* DW_AT_low_pc */
 	.4byte	.Lmain_end	/* DW_AT_high_pc */
 	.byte	0x1	/* DW_AT_prototyped */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if [is_ilp32_target] {
     set ptrbits 64
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2] \
 	  [list nodebug additional_flags=-DPTRBITS=$ptrbits]] } {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp ./gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-common-block.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if {[skip_fortran_tests]} {
 
 standard_testfile .S
 
-if { [prepare_for_testing "${testfile}.exp" "${testfile}" $srcfile \
+if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile \
 	  {nodebug f90}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-common-block.S ./gdb/testsuite/gdb.dwarf2/dw2-common-block.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-common-block.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-common-block.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp ./gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,12 @@ if {![dwarf2_support]} {
     return 0  
 }
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
-if {[prepare_for_testing $testfile.exp $testfile $srcfile]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+	$additional_flags]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S ./gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,8 +15,17 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.text
-main:	.globl main
+SYMBOL(main):	.globl SYMBOL(main)
 
 gcc42:	.globl gcc42
 .Lgcc42_procstart:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp ./gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-compressed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile \
 	      {debug additional_flags=-static additional_flags=-nostdlib} \
 	      main.c -g0 $srcfile nodebug]]} {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compressed.S ./gdb/testsuite/gdb.dwarf2/dw2-compressed.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-compressed.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-compressed.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-const.exp ./gdb/testsuite/gdb.dwarf2/dw2-const.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-const.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-const.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-const.S ./gdb/testsuite/gdb.dwarf2/dw2-const.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-const.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-const.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S dw2-cp-infcall-ref-static-main.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile2 $srcfile] {}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static-main.c ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.S ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp ./gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cu-size.S ./gdb/testsuite/gdb.dwarf2/dw2-cu-size.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-cu-size.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-cu-size.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c ./gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp ./gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -327,7 +327,7 @@ lappend opts "additional_flags=-DFDIR=\"
 lappend opts "additional_flags=-DFILE=\"${srctmpfile}\""
 
 if { [gdb_compile "${asmsrcfile} ${srcdir}/${subdir}/$srcfile" "${binfile}" executable $opts] != "" } {
-    untested "Cannot compile ${asmsrcfile} or $srcfile"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp ./gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.S ./gdb/testsuite/gdb.dwarf2/dw2-dos-drive.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dos-drive.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp ./gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.S ./gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp ./gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile .S
+set executable ${testfile}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
+    return -1
+}
+
+set saved_gdbflags $GDBFLAGS
+set GDBFLAGS "$GDBFLAGS -readnow"
+
+clean_restart $executable
+
+# Something simple to verify gdb didn't crash, and has read in whatever symbol
+# info is there.
+gdb_test "info fun main" "main_end"
+
+set GDBFLAGS $saved_gdbflags
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.S ./gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,33 @@
+/* Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.text
+main:
+	.4byte	0
+main_end:
+
+	.section	.debug_info
+	.4byte	.Ldebug_info_end - 1f	/* Length of Compilation Unit Info */
+1:
+	.2byte	0x2	/* DWARF version number */
+	.4byte	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
+	.byte	0x4	/* Pointer Size (in bytes) */
+
+	/* Nothing else, this is a dummy die.  */
+.Ldebug_info_end:
+
+	.section	.debug_abbrev
+.Ldebug_abbrev0:
+	.byte	0x0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.c ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if {![istarget "x86_64-*-*"] || ![is_lp6
 
 standard_testfile .S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.S ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-dup-frame.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp ./gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S ./gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp ./gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S ./gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp ./gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-if { [prepare_for_testing dw2-entry-value.exp "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value-main.c ./gdb/testsuite/gdb.dwarf2/dw2-entry-value-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-entry-value-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value.S ./gdb/testsuite/gdb.dwarf2/dw2-entry-value.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-entry-value.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-entry-value.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.c ./gdb/testsuite/gdb.dwarf2/dw2-error.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-error.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.exp ./gdb/testsuite/gdb.dwarf2/dw2-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ gdb_test_no_output "set breakpoint pendi
 
 # First test that reading symbols fails.
 gdb_test "file $binfile" \
-    "Reading symbols.*Dwarf Error: wrong version in compilation unit header .is 153, should be 2, 3, or 4.*" \
+    {Reading symbols.*Dwarf Error: wrong unit_type in compilation unit header \(is 0, should be 1 or 2\).*} \
     "file $testfile"
 
 # Now check that we can still break given the minimal symbol.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.S ./gdb/testsuite/gdb.dwarf2/dw2-error.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-error.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-error.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-filename.exp ./gdb/testsuite/gdb.dwarf2/dw2-filename.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-filename.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-filename.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-filename.S ./gdb/testsuite/gdb.dwarf2/dw2-filename.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-filename.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-filename.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp ./gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S ./gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.c ./gdb/testsuite/gdb.dwarf2/dw2-icycle.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-icycle.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp ./gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-icycle.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S .c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.S ./gdb/testsuite/gdb.dwarf2/dw2-icycle.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-icycle.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-icycle.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c ./gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp ./gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ Dwarf::assemble $asm_file {
 		    {variable_parameter 1 flag}
 		    {type :$int_label}
 		    {location {
-			addr ptr
+			addr [gdb_target_symbol ptr]
 			deref
 		    } SPECIAL_expr}
 		}
@@ -62,7 +62,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp ./gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inheritance.S ./gdb/testsuite/gdb.dwarf2/dw2-inheritance.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inheritance.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inheritance.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp ./gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ set basename "inline-break"
 
 standard_testfile .S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-break.S ./gdb/testsuite/gdb.dwarf2/dw2-inline-break.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-break.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inline-break.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp ./gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S dw2-inline-param-main.c
 
-if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param-main.c ./gdb/testsuite/gdb.dwarf2/dw2-inline-param-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inline-param-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param.S ./gdb/testsuite/gdb.dwarf2/dw2-inline-param.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-inline-param.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-inline-param.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp ./gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-intercu.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intercu.S ./gdb/testsuite/gdb.dwarf2/dw2-intercu.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intercu.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-intercu.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp ./gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-intermix.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intermix.S ./gdb/testsuite/gdb.dwarf2/dw2-intermix.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-intermix.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-intermix.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp ./gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,76 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile .S main.c
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile]
+Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile2
+
+    set main_result [function_range main ${srcdir}/${subdir}/${srcfile2}]
+    set main_start [lindex $main_result 0]
+    set main_length [lindex $main_result 1]
+
+    cu {} {
+	compile_unit {
+	    {low_pc $main_start addr}
+	    {high_pc "$main_start + $main_length" addr}
+	} {
+	    declare_labels integer_label
+
+	    integer_label: DW_TAG_base_type {
+		{DW_AT_byte_size 4 DW_FORM_sdata}
+		{DW_AT_encoding  @DW_ATE_signed}
+		{DW_AT_name      integer}
+	    }
+
+	    DW_TAG_subprogram {
+		{name main}
+		{DW_AT_external 1 flag}
+		{low_pc $main_start addr}
+		{high_pc "$main_start + $main_length" addr}
+	    } {
+		DW_TAG_lexical_block {
+		} {
+		    DW_TAG_variable {
+			{DW_AT_name testvar}
+			    {DW_AT_type :$integer_label}
+			    {DW_AT_external 1 flag}
+			{DW_AT_location {
+			    DW_OP_addr [gdb_target_symbol main]
+			} SPECIAL_expr}
+		    }
+		}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+			  [list $srcfile2 $asm_file] {nodebug}] } {
+    return -1
+}
+
+runto_main
+
+# FAILing GDB did print: No symbol "testvar" in current context.
+gdb_test "p testvar" { = -?[0-9]+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set executable ${testfile}
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile c++ $testfile-main.cc {c++ debug} \
 	      $srcfile {}]]} {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust-main.cc ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust-main.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust-main.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust-main.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.S ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp ./gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,9 +21,13 @@ if {![dwarf2_support]} {
 
 # This testfile has reproducibility only with cc-with-index.sh.
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
 
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+	${additional_flags}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.S ./gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,16 +15,25 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.text
 .Lbegin_text1:
 
-	.globl main
-	.type main, %function
-main:
+	.globl SYMBOL(main)
+	.type SYMBOL(main), %function
+SYMBOL(main):
 .Lbegin_main:
 	.int 0
 .Lend_main:
-	.size main, .-main
+	.size SYMBOL(main), .-SYMBOL(main)
 
 	.globl func2
 	.type func2, %function
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp ./gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.S ./gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp ./gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.S ./gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp ./gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-noloc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-if { [prepare_for_testing dw2-noloc.exp "dw2-noloc" {dw2-noloc-main.c dw2-noloc.S} {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "dw2-noloc" {dw2-noloc-main.c dw2-noloc.S} {nodebug}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c ./gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc.S ./gdb/testsuite/gdb.dwarf2/dw2-noloc.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-noloc.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-noloc.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp ./gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-call.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S main.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-call.S ./gdb/testsuite/gdb.dwarf2/dw2-op-call.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-call.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-call.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp ./gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
     return 0
 }
 
-if { [prepare_for_testing "${test}.exp" "${test}" ${test}.S {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
     return -1
 }
 
@@ -46,16 +46,16 @@ gdb_test_no_output "set print frame-argu
 
 # (1) int_param_single_reg_loc
 gdb_continue_to_breakpoint "Stop in breakpt for test int_param_single_reg_loc"
-gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?int_param_single_reg_loc \\(operand0=<optimized out>, operand1=0xdeadbe00deadbe01, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "Backtrace for test int_param_single_reg_loc"
+gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?int_param_single_reg_loc \\(operand0=<optimized out>, operand1=0xdeadbe00deadbe01, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "backtrace for test int_param_single_reg_loc"
 
 # (2) struct_param_single_reg_loc
 gdb_continue_to_breakpoint "Stop in breakpt for struct_param_single_reg_loc"
-gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?struct_param_single_reg_loc \\(operand0={a = 0xdeadbe00deadbe01, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe04deadbe05}, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "Backtrace for test struct_param_single_reg_loc"
+gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?struct_param_single_reg_loc \\(operand0={a = 0xdeadbe00deadbe01, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe04deadbe05}, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "backtrace for test struct_param_single_reg_loc"
 
 # (3) struct_param_two_reg_pieces
 gdb_continue_to_breakpoint "Stop in breakpt for struct_param_two_reg_pieces"
-gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?struct_param_two_reg_pieces \\(operand0={a = 0xdeadbe04deadbe05, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe00deadbe01}, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "Backtrace for test struct_param_two_reg_pieces"
+gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?struct_param_two_reg_pieces \\(operand0={a = 0xdeadbe04deadbe05, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe00deadbe01}, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "backtrace for test struct_param_two_reg_pieces"
 
 # (4) int_param_two_reg_pieces
 gdb_continue_to_breakpoint "Stop in breakpt for int_param_two_reg_pieces"
-gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?int_param_two_reg_pieces \\(operand0=<optimized out>, operand1=<optimized out>, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "Backtrace for test int_param_two_reg_pieces"
+gdb_test "bt" "#0  ($hex in )?breakpt \\(\\)\r\n#1  ($hex in )?int_param_two_reg_pieces \\(operand0=<optimized out>, operand1=<optimized out>, operand2=<optimized out>\\)\r\n#2  ($hex in )?main \\(\\)" "backtrace for test int_param_two_reg_pieces"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S ./gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp ./gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,9 @@ if {![dwarf2_support]} {
     return 0   
 }
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
@@ -42,7 +45,7 @@ gdb_test_multiple $test $test {
     -re ":\[ \t\]*0xaa551234\r\n$gdb_prompt $" {
 	# big endian
 	pass $test
-	gdb_test "p/x implicit4to2" " = 0x3344"
+	gdb_test "p/x implicit4to2" " = 0x1122"
 	gdb_test "p/x implicit4to4" " = 0x11223344"
     }
     -re ":\[ \t\]*0x\[0-9a-f\]{8}\r\n$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.S ./gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.c ./gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,41 @@
+/* Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+struct foo
+{
+  int a;
+  int x[5];
+  struct foo *y;
+};
+
+void
+func01 (void)
+{
+  struct foo *ptr;
+
+  asm ("func01_label: .globl func01_label");
+  ptr = (struct foo *) 0x0;
+  return;
+}
+
+int
+main ()
+{
+  asm ("main_label: .globl main_label");
+  func01 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp ./gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,250 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test ensures that with "set print object on", -var-create will
+# return "<optimized out>" for an optimized out pointer to structure,
+# rather than attempting to dereference the pointer to determine its
+# actual type (instead of its declared type).  We want to test that GDB
+# can display such a pointer without throwing an error, while also
+# ensuring that any attempt to dereference the pointer *will* throw an
+# error.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile dw2-opt-structptr.c dw2-opt-structptr-dw.S
+
+# Generate a test program with dwarf information showing the variable
+# 'ptr', a pointer-to-struct, as optimized out.  The dwarf will also
+# describe the structure as have a scalar, array, and pointer-to-struct
+# members.
+
+proc build_test_program {} {
+    global testfile srcfile srcfile2
+
+    # Make some DWARF for the test.
+    set asm_file [standard_output_file $srcfile2]
+    Dwarf::assemble $asm_file {
+        global srcdir subdir srcfile
+
+	# Creating a CU with 4-byte addresses lets this test link on
+	# both 32- and 64-bit machines.
+	cu { addr_size 4 } {
+    
+	    DW_TAG_compile_unit {
+		{DW_AT_language @DW_LANG_C99}
+		{DW_AT_name     dw2-opt-structptr.c}
+		{DW_AT_comp_dir /tmp}
+	    } {
+		declare_labels int_label struct_label pointer_label \
+			       array_label
+
+		int_label: DW_TAG_base_type {
+		    {DW_AT_byte_size 4 DW_FORM_sdata}
+		    {DW_AT_encoding  @DW_ATE_signed}
+		    {DW_AT_name      integer}
+		}
+    
+		array_label: DW_TAG_array_type {
+		    {DW_AT_name foo__array_type}
+		    {DW_AT_type :$int_label}
+		} {
+		    DW_TAG_subrange_type {
+			{DW_AT_type	   :$int_label}
+			{DW_AT_lower_bound 0   DW_FORM_data1}
+			{DW_AT_upper_bound 127 DW_FORM_data1}
+		    }   
+		}
+    
+		struct_label: DW_TAG_structure_type {
+		    {DW_AT_name "foo"}
+		    {DW_AT_byte_size 12 DW_FORM_sdata}
+		} {
+		    member {
+			{name a}
+			{type :$int_label}
+			{data_member_location 0 data1}
+		    }
+		    member {
+			{name x}
+			{type :$array_label}
+			{data_member_location 4 data1}
+		    }
+		    member {
+			{name y}
+			{type :$pointer_label}
+			{data_member_location 8 data1}
+		    }
+		}
+    
+		pointer_label: DW_TAG_pointer_type {
+		    {DW_AT_byte_size 4 DW_FORM_sdata}
+		    {DW_AT_type  :$struct_label}
+		}
+    
+		DW_TAG_subprogram {
+		    {DW_AT_name func01}
+		    {DW_AT_type :$int_label}
+		    {external   1 flag}
+		    {MACRO_AT_func {func01 ${srcdir}/${subdir}/${srcfile}}}
+		} {
+		    DW_TAG_variable {
+			{DW_AT_name ptr}
+			{DW_AT_type :$pointer_label}
+			{DW_AT_location {} DW_FORM_block1}
+		    }
+		}
+    
+		DW_TAG_subprogram {
+		    {DW_AT_name main}
+		    {DW_AT_type :$int_label}
+		    {external   1 flag}
+		    {MACRO_AT_func {main ${srcdir}/${subdir}/${srcfile}}}
+		} {
+		}
+	    }
+	}
+    }
+    
+    set sources "$srcfile $asm_file"
+    if {[build_executable $testfile.exp $testfile $sources {nodebug}]} { 
+	untested "failed to compile"
+	return -1
+    }
+}
+
+# Test access to an optimized-out pointer-to-struct using the
+# console interpreter.
+
+proc do_console_test {} {
+    global binfile
+
+    clean_restart $binfile
+
+    with_test_prefix "console" {
+	gdb_test_no_output "set print object on"
+
+	if {![runto_main]} {
+	    return -1
+	}
+
+	if {![runto func01]} {
+	    return -1
+	}
+	
+	gdb_test "info addr ptr" "Symbol \"ptr\" is optimized out."
+	
+	gdb_test "print ptr" "<optimized out>"
+	
+	gdb_test "print *ptr" "value has been optimized out"
+	
+	gdb_test "print ptr->a" "value has been optimized out"
+	
+	gdb_test "print ptr->x" "value has been optimized out"
+	
+	gdb_test "print ptr->y" "value has been optimized out"
+    }
+}
+
+# Test access to an optimized-out pointer-to-struct using the
+# MI interpreter.
+
+proc do_mi_test {} {
+
+    load_lib mi-support.exp
+    set MIFLAGS "-i=mi"
+
+    global mi_gdb_prompt
+    global srcdir
+    global subdir
+    global binfile
+    
+    with_test_prefix "mi" {
+	gdb_exit
+	if {[mi_gdb_start]} {
+	    return -1
+	}
+	
+	mi_delete_breakpoints
+	mi_gdb_reinitialize_dir $srcdir/$subdir
+	mi_gdb_load $binfile
+	
+	# This causes GDB to dereference a pointer-to-structure when doing
+	# -var-create.
+	mi_gdb_test "-gdb-set print object on" ".*" "set print object on"
+	
+	mi_gdb_test "-break-insert main" ".*" "insert breakpoint main"
+	mi_gdb_test "-break-insert func01" ".*" "insert breakpoint func01"
+	
+	# Run to main.  Use an explicit expect here since the limited
+	# debug info will result in output that isn't handled by the
+	# MI test utilities.
+	set test "run to main"
+	mi_run_cmd
+	gdb_expect {
+	    -re "\\*stopped,reason=\"breakpoint-hit\".*func=\"main\".*$mi_gdb_prompt$" {
+		pass "$test"
+	    }
+	    timeout {
+		fail "$test (timeout)"
+	    }
+	}
+	
+	# Run to func01.  Use an explicit expect here as above.
+	set test "continue to func01"
+	mi_send_resuming_command "exec-continue" "$test"
+	gdb_expect {
+	    -re "\\*stopped,reason=\"breakpoint-hit\".*func=\"func01\".*$mi_gdb_prompt$" {
+		pass "$test"
+	    }
+	    timeout {
+		fail "$test (timeout)"
+	    }
+	}
+	
+	# Test that -var-create for 'ptr' is successful.
+	mi_create_varobj "var1" "ptr" "create varobj for ptr"
+	
+	# Test that -var-list-children of 'ptr' is successful.
+	mi_list_varobj_children "var1" { \
+	    {var1.a a 0 integer} \
+	    {var1.x x 128 foo__array_type} \
+	    {var1.y y 3 "struct foo \\*"} \
+	} "get children of var1 (ptr)"
+
+	# Test that dereferencing 'ptr' will throw an error.
+	mi_gdb_test "-var-create var2 * &((ptr)->a)" \
+	    "\\^error,msg=\"value has been optimized out\"" \
+	    "throw error, dereference ptr to access integer member "
+
+	# Test that dereferencing 'ptr' will throw an error.
+	mi_gdb_test "-var-create var3 * &((ptr)->x)" \
+	    "\\^error,msg=\"value has been optimized out\"" \
+	    "throw error, dereference ptr to access array member "
+
+	# Test that dereferencing 'ptr' will throw an error.
+	mi_gdb_test "-var-create var4 * &((ptr)->y)" \
+	    "\\^error,msg=\"value has been optimized out\"" \
+	    "throw error, dereference ptr to access pointer member "
+    }
+}
+
+build_test_program
+do_console_test
+do_mi_test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp ./gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-param-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S dw2-param-error-main.c
 
-if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c ./gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error.S ./gdb/testsuite/gdb.dwarf2/dw2-param-error.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-param-error.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-param-error.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-producer.exp ./gdb/testsuite/gdb.dwarf2/dw2-producer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-producer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-producer.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-producer.S ./gdb/testsuite/gdb.dwarf2/dw2-producer.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-producer.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-producer.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges2.c ./gdb/testsuite/gdb.dwarf2/dw2-ranges2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges3.c ./gdb/testsuite/gdb.dwarf2/dw2-ranges3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges3.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges3.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c ./gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,36 @@
+/*
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+void __attribute__ ((section (".text.3")))
+frame3 (void)
+{
+  asm ("frame3_label: .globl frame3_label");
+}
+
+void __attribute__ ((section (".text.2")))
+frame2 (void)
+{
+  asm ("frame2_label: .globl frame2_label");
+  frame3 ();
+}
+
+void __attribute__ ((section (".text.1")))
+main (void)
+{
+  asm ("main_label: .globl main_label");
+  frame2 ();
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp ./gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,143 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+load_lib dwarf.exp
+
+# Test DW_TAG_compile_unit with no children and with neither DW_AT_low_pc nor
+# DW_AT_high_pc but with DW_AT_ranges instead.
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    verbose "Skipping DW_AT_ranges test."
+    return 0
+}
+
+# The .c files use __attribute__.
+if [get_compiler_info] {
+    return -1
+}
+if !$gcc_compiled {
+    verbose "Skipping DW_AT_ranges test."
+    return 0
+}
+
+standard_testfile dw2-ranges-base.c dw2-ranges-base-dw.S
+
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile srcfile2
+    declare_labels ranges_label
+    declare_labels L
+
+    # Find start address and length for our functions.
+    set main_func \
+	[function_range main [list ${srcdir}/${subdir}/$srcfile]]
+    set frame2_func \
+	[function_range frame2 [list ${srcdir}/${subdir}/$srcfile]]
+    set frame3_func \
+	[function_range frame3 [list ${srcdir}/${subdir}/$srcfile]]
+
+    # Very simple info for this test program.  We don't care about
+    # this information being correct (w.r.t. funtion / argument types)
+    # just so long as the compilation using makes use of the
+    # .debug_ranges data then the test achieves its objective.
+    cu {} {
+	compile_unit {
+	    {language @DW_LANG_C}
+	    {name dw-ranges-base.c}
+	    {stmt_list $L DW_FORM_sec_offset}
+	    {ranges ${ranges_label} DW_FORM_sec_offset}
+	} {
+	    subprogram {
+		{external 1 flag}
+		{name main}
+	    }
+	    subprogram {
+		{external 1 flag}
+		{name frame2}
+	    }
+	    subprogram {
+		{external 1 flag}
+		{name frame3}
+	    }
+	}
+    }
+
+    lines {version 2} L {
+	include_dir "${srcdir}/${subdir}"
+	file_name "$srcfile" 1
+
+	# Generate simple line table program.  The line table
+	# information contained here is not correct, and we really
+	# don't care, just so long as each function has some line
+	# table data associated with it.  We do make use of the fake
+	# line numbers that we pick here in the tests below.
+	program {
+	    {DW_LNE_set_address [lindex $main_func 0]}
+	    {DW_LNS_advance_line 10}
+	    {DW_LNS_copy}
+	    {DW_LNS_advance_pc [lindex $main_func 1]}
+	    {DW_LNS_advance_line 19}
+	    {DW_LNS_copy}
+	    {DW_LNE_end_sequence}
+
+	    {DW_LNE_set_address [lindex $frame2_func 0]}
+	    {DW_LNS_advance_line 20}
+	    {DW_LNS_copy}
+	    {DW_LNS_advance_pc [lindex $frame2_func 1]}
+	    {DW_LNS_advance_line 29}
+	    {DW_LNS_copy}
+	    {DW_LNE_end_sequence}
+
+	    {DW_LNE_set_address [lindex $frame3_func 0]}
+	    {DW_LNS_advance_line 30}
+	    {DW_LNS_copy}
+	    {DW_LNS_advance_pc [lindex $frame3_func 1]}
+	    {DW_LNS_advance_line 39}
+	    {DW_LNS_copy}
+	    {DW_LNE_end_sequence}
+	}
+    }
+
+    # Generate ranges data.  This is the point of this whole test
+    # file, we must have multiple bases specified, so we use a new
+    # base for each function.
+    ranges {is_64 [is_64_target]} {
+	ranges_label: sequence {
+	    {base [lindex $main_func 0]}
+	    {range 0 [lindex $main_func 1]}
+	    {base [lindex $frame2_func 0]}
+	    {range 0 [lindex $frame2_func 1]}
+	    {base [lindex $frame3_func 0]}
+	    {range 0 [lindex $frame3_func 1]}
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+# Make use of the line numbers we faked in the .debug_line table above.
+gdb_test "info line main" \
+    "Line 11 of .* starts at address .* and ends at .*"
+gdb_test "info line frame2" \
+    "Line 21 of .* starts at address .* and ends at .*"
+gdb_test "info line frame3" \
+    "Line 31 of .* starts at address .* and ends at .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges.c ./gdb/testsuite/gdb.dwarf2/dw2-ranges.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp ./gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ set srcfuncfile ${testfile}-func.c
 set srcmainfile ${testfile}-main.c
 set executable ${testfile}
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile {} $srcfile {} $srcfuncfile {} \
 	      $srcmainfile debug]]} {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-main.c ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.S ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp ./gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+load_lib dwarf.exp
+
+# Test GDB does not internal error on DWARF register number -1 which is invalid
+# in DWARF.  clang-3.5.0-9.fc22.x86_64 produced it inside DW_AT_location.
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile .S main.c
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile]
+Dwarf::assemble $asm_file {
+    cu {} {
+	compile_unit {
+	    {low_pc [gdb_target_symbol main] DW_FORM_addr}
+	    {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
+	} {
+	    declare_labels integer_label
+
+	    integer_label: DW_TAG_base_type {
+		{DW_AT_byte_size 4 DW_FORM_sdata}
+		{DW_AT_encoding  @DW_ATE_signed}
+		{DW_AT_name      integer}
+	    }
+
+	    DW_TAG_subprogram {
+		{name main}
+		{DW_AT_external 1 flag}
+		{low_pc [gdb_target_symbol main] DW_FORM_addr}
+		{high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
+	    } {
+		DW_TAG_variable {
+		    {DW_AT_name bregx}
+			{DW_AT_type :$integer_label}
+			{DW_AT_external 1 flag}
+		    {DW_AT_location {
+			DW_OP_bregx 0xffffffff 0
+		    } SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+			  [list $srcfile2 $asm_file] {nodebug}] } {
+    return -1
+}
+
+runto_main
+
+# Variable 'bregx' needs to be inside main as for global symbols GDB does not
+# support non-trivial DW_AT_location.  Former GDB printed internal error here.
+gdb_test "p bregx"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.c ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if {![istarget "x86_64-*-*"] || ![is_lp6
 
 standard_testfile .S
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
     return -1
 }
 
@@ -52,7 +52,7 @@ for {set f 0} {$f < 3} {incr f} {
     }
 
     # Select frame.
-    gdb_test "frame ${f}" "#${f}.*" "Switch to frame ${f}"
+    gdb_test "frame ${f}" "#${f}.*" "switch to frame ${f}"
 
     gdb_test "p/x \$rax" ".*$pattern_rax_rbx_rcx_print.*" \
 	"print \$rax in frame ${f}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.S ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restore.exp ./gdb/testsuite/gdb.dwarf2/dw2-restore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restore.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-restore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
 }
 standard_testfile .S
 
-if {[prepare_for_testing $testfile.exp $testfile [list $srcfile] \
+if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile] \
 	 [list {additional_flags=-nostdlib}]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restore.S ./gdb/testsuite/gdb.dwarf2/dw2-restore.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restore.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-restore.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.c ./gdb/testsuite/gdb.dwarf2/dw2-restrict.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-restrict.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp ./gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-restrict.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
 
 standard_testfile .S
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.S ./gdb/testsuite/gdb.dwarf2/dw2-restrict.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-restrict.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-restrict.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp ./gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.S ./gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.c ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ if {![istarget x86_64-*] || ![is_lp64_ta
 standard_testfile .S
 set csrcfile ${testfile}.c
 
-if { [prepare_for_testing "${testfile}.exp" "${testfile}" $srcfile {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {nodebug}] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     continue
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.S ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.c ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp ./gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.S ./gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-strp.exp ./gdb/testsuite/gdb.dwarf2/dw2-strp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-strp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-strp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-strp.S ./gdb/testsuite/gdb.dwarf2/dw2-strp.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-strp.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-strp.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
     return 0
 }
 
-if {[prepare_for_testing "$testfile.exp" "$testfile" $srcfile {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp ./gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,12 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-if { [prepare_for_testing dw2-unresolved.exp "dw2-unresolved" {dw2-unresolved-main.c dw2-unresolved.S} {nodebug}] } {
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
+if { [prepare_for_testing "failed to prepare" "dw2-unresolved" \
+	{dw2-unresolved-main.c dw2-unresolved.S} \
+	[list nodebug $additional_flags]] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c ./gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,20 @@
 
 #include <stdlib.h>
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL1(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL1(str)     str
+#endif
+
+#define STR1(s) #s
+#define STR(s) STR1(s)
+
+#define SYMBOL(str)     STR(SYMBOL1(str))
+
 asm (".globl cu_text_start");
 asm ("cu_text_start:");
 
@@ -31,12 +45,12 @@ main (void)
     extern unsigned char var;
 
     /* Do not rely on the `extern' DIE output by GCC (GCC PR debug/39563).  */
-asm (".globl extern_block_start");
-asm ("extern_block_start:");
+asm (".globl " SYMBOL(extern_block_start));
+asm (SYMBOL(extern_block_start) ":");
     if (var != 2)
       abort ();
-asm (".globl extern_block_end");
-asm ("extern_block_end:");
+asm (".globl " SYMBOL(extern_block_end));
+asm (SYMBOL(extern_block_end) ":");
   }
 
   return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved.S ./gdb/testsuite/gdb.dwarf2/dw2-unresolved.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-unresolved.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-unresolved.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,15 +15,24 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.data
 
 /* VAR1 is wrong here, in the real inferior it is located on stack.  As both
    places are never modified and they are initialized to the same value it
    makes no difference.  Ensure the name clash for "var".  */
-var1:	.byte	1
+SYMBOL(var1):	.byte	1
 
-	.globl	var
-var:	.byte	2
+	.globl	SYMBOL(var)
+SYMBOL(var):	.byte	2
 
 /* Debug information */
 
@@ -64,12 +73,12 @@ var:	.byte	2
 	.byte		2f - 1f			/* DW_AT_location */
 1:	.byte		3			/*   DW_OP_addr */
 /* See VAR1 definition why this DIE is not correct.  */
-	.4byte		var1			/*   <addr> */
+	.4byte		SYMBOL(var1)			/*   <addr> */
 2:	.4byte		.Ltype_uchar-.Lcu1_begin	/* DW_AT_type */
 
 	.uleb128	6			/* Abbrev: DW_TAG_lexical_block */
-	.4byte		extern_block_start	/* DW_AT_low_pc */
-	.4byte		extern_block_end	/* DW_AT_high_pc */
+	.4byte		SYMBOL(extern_block_start)	/* DW_AT_low_pc */
+	.4byte		SYMBOL(extern_block_end)	/* DW_AT_high_pc */
 
 	.uleb128	5			/* Abbrev: DW_TAG_variable (extern) */
 	.ascii		"var\0"			/* DW_AT_name */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp ./gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
 
 standard_testfile .S main.c
 
-if [prepare_for_testing ${testfile}.exp ${testfile} \
+if [prepare_for_testing "failed to prepare" ${testfile} \
 	[list $srcfile $srcfile2] {nodebug}] {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.S ./gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp ./gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ standard_testfile .cc dw4-sig-types-b.cc
 # Since we pass an explicit -gdwarf-4 -fdebug-types-section to the compiler,
 # we let that be the test of whether the target supports it.
 
-if { [prepare_for_testing "${testfile}.exp" "${testfile}" \
+if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile $srcfile2] \
 	  {debug c++ additional_flags=-gdwarf-4 additional_flags=-fdebug-types-section}] } {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp ./gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.S ./gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.c ./gdb/testsuite/gdb.dwarf2/dwp-sepdebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwp-sepdebug.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (int argc, char **argv)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp ./gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
+    return -1
+}
+if ![remote_file host exists [standard_output_file ${testfile}.dwp]] {
+    unsupported "testsuite run does not produce dwp files"
+    return 0
+}
+
+# Note: the procedure gdb_gnu_strip_debug will produce an executable called
+# ${binfile}, which is just like the executable ($binfile) but without
+# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
+# the name of a debuginfo only file. This file will be stored in the
+# gdb.base/ subdirectory.
+
+if [gdb_gnu_strip_debug $binfile$EXEEXT] {
+    # check that you have a recent version of strip and objcopy installed
+    unsupported "cannot produce separate debug info files"
+    return -1
+}
+
+clean_restart "$testfile"
+
+gdb_test "ptype main" {type = int \(int, char \*\*\)}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-symlink.c ./gdb/testsuite/gdb.dwarf2/dwp-symlink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-symlink.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwp-symlink.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp ./gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwp-symlink.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp ./gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwzbuildid.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwz.exp ./gdb/testsuite/gdb.dwarf2/dwz.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dwz.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dwz.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if [prepare_for_testing ${testfile}.exp $testfile "${asm_file} ${srcfile}" {}] {
+if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dynarr-ptr.c ./gdb/testsuite/gdb.dwarf2/dynarr-ptr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dynarr-ptr.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dynarr-ptr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Free Software Foundation, Inc.
+/* Copyright 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp ./gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,8 +28,7 @@ standard_testfile dynarr-ptr.c dynarr-pt
 # Any program would do, but since we already have dynarr-ptr.c
 # specifically for this testcase, might as well use that.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
-    untested ${testfile}.exp
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -45,9 +44,10 @@ Dwarf::assemble $asm_file {
             declare_labels integer_label array_label array_ptr_label \
                 array_typedef_label
             set ptr_size [get_sizeof "void *" 96]
+	    set int_size [get_sizeof "int" 4]
 
             integer_label: DW_TAG_base_type {
-                {DW_AT_byte_size 4 DW_FORM_sdata}
+                {DW_AT_byte_size $int_size DW_FORM_sdata}
                 {DW_AT_encoding  @DW_ATE_signed}
                 {DW_AT_name      integer}
             }
@@ -61,15 +61,15 @@ Dwarf::assemble $asm_file {
 		    {DW_AT_type        :$integer_label}
                     {DW_AT_lower_bound {
                         DW_OP_push_object_address
-                        DW_OP_lit8
+                        DW_OP_const1u [expr {2 * $int_size}]
                         DW_OP_minus
-                        DW_OP_deref_size 4
+                        DW_OP_deref_size $int_size
                     } SPECIAL_expr}
                     {DW_AT_upper_bound {
                         DW_OP_push_object_address
-                        DW_OP_lit4
+			DW_OP_const1u $int_size
                         DW_OP_minus
-                        DW_OP_deref_size 4
+                        DW_OP_deref_size $int_size
                     } SPECIAL_expr}
 		}
 	    }
@@ -85,7 +85,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__three_ptr}
                 {DW_AT_type :$array_ptr_label}
                 {DW_AT_location {
-                    DW_OP_addr table_1_ptr
+                    DW_OP_addr [gdb_target_symbol table_1_ptr]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -93,7 +93,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__three_ptr_tdef}
                 {DW_AT_type :$array_typedef_label}
                 {DW_AT_location {
-                    DW_OP_addr table_1_ptr
+                    DW_OP_addr [gdb_target_symbol table_1_ptr]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -101,7 +101,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__five_ptr}
                 {DW_AT_type :$array_ptr_label}
                 {DW_AT_location {
-                    DW_OP_addr table_2_ptr
+                    DW_OP_addr [gdb_target_symbol table_2_ptr]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -109,7 +109,7 @@ Dwarf::assemble $asm_file {
                 {DW_AT_name foo__five_ptr_tdef}
                 {DW_AT_type :$array_typedef_label}
                 {DW_AT_location {
-                    DW_OP_addr table_2_ptr
+                    DW_OP_addr [gdb_target_symbol table_2_ptr]
                 } SPECIAL_expr}
                 {external 1 flag}
             }
@@ -121,7 +121,7 @@ Dwarf::assemble $asm_file {
 # program using our debug info instead of the info generated by
 # the compiler.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/enum-type.exp ./gdb/testsuite/gdb.dwarf2/enum-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/enum-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/enum-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.c ./gdb/testsuite/gdb.dwarf2/fission-base.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-base.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.exp ./gdb/testsuite/gdb.dwarf2/fission-base.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-base.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.S ./gdb/testsuite/gdb.dwarf2/fission-base.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-base.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-base.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists.exp ./gdb/testsuite/gdb.dwarf2/fission-loclists.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-loclists.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp ./gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,61 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# This testcase exercises PR symtab/19999.
+# For Fission, while we shouldn't add the DWARF base address to addresses
+# coming from .debug_addr, will still need to add the base offset in case
+# we're debugging a PIE executable.
+
+load_lib dwarf.exp
+
+# We run objcopy locally to split out the .dwo file.
+if [is_remote host] {
+    return 0
+}
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+    return 0  
+}
+
+# This test can only be run on x86-64 targets.
+if {![istarget x86_64-*] || ![is_lp64_target]} {
+    return 0
+}
+
+standard_testfile .S
+
+if [build_executable_from_fission_assembler \
+	"$testfile.exp" "$binfile" "$srcfile" \
+	[list "nodebug" "ldflags=-pie"]] {
+    return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we can find the .dwo file, regardless of whether we're
+# running in parallel mode.
+gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
+    "set debug-file-directory"
+gdb_load $binfile
+
+if ![runto_main] {
+    return -1
+}
+
+# Verify gdb can find argc.
+
+gdb_test "p argc" " = 1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S ./gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,482 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2013-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   This file was created by doing:
+   gcc -O1 -gdwarf-4 -gsplit-debug -fPIE -S -dA fission-loclists-pie.c
+   and then massaging the output.
+
+   fission-loclists-pie.c:
+
+   __attribute__((noinline)) int
+   init (int *b)
+   { 
+     return 0; 
+   } 
+
+   int
+   main (int argc, char *argv[])
+   {
+     return init (&argc);
+   }
+*/
+
+	.file	"fission-loclists-pie.c"
+	.text
+.Ltext0:
+	.globl	init
+	.type	init, @function
+init:
+.LFB0:
+	.file 1 "testsuite/gdb.dwarf2/fission-loclists-pie.c"
+	# testsuite/gdb.dwarf2/fission-loclists-pie.c:22
+	.loc 1 22 0
+	.cfi_startproc
+.LVL0:
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	# testsuite/gdb.dwarf2/fission-loclists-pie.c:24
+	.loc 1 24 0
+	movl	$0, %eax
+# SUCC: EXIT [100.0%] 
+	ret
+	.cfi_endproc
+.LFE0:
+	.size	init, .-init
+	.globl	main
+	.type	main, @function
+main:
+.LFB1:
+	# testsuite/gdb.dwarf2/fission-loclists-pie.c:28
+	.loc 1 28 0
+	.cfi_startproc
+.LVL1:
+# BLOCK 2 freq:10000 seq:0
+# PRED: ENTRY [100.0%]  (FALLTHRU)
+	subq	$8, %rsp
+	.cfi_def_cfa_offset 16
+	# testsuite/gdb.dwarf2/fission-loclists-pie.c:29
+	.loc 1 29 0
+	leaq	4(%rsp), %rdi
+.LVL2:
+	call	init
+.LVL3:
+	# testsuite/gdb.dwarf2/fission-loclists-pie.c:30
+	.loc 1 30 0
+	addq	$8, %rsp
+	.cfi_def_cfa_offset 8
+# SUCC: EXIT [100.0%] 
+	ret
+	.cfi_endproc
+.LFE1:
+	.size	main, .-main
+.Letext0:
+	.section	.debug_addr,"",@progbits
+.Ldebug_addr0:
+	.quad	.LVL1	# 0x0
+	.quad	.LVL2	# 0x1
+	.quad	.LVL3	# 0x2
+	.quad	.LFB0	# 0x3
+	.quad	.LFB1	# 0x4
+	.quad	.LVL3-1	# 0x5
+	.section	.debug_info.dwo,"e",@progbits
+.Ldebug_info0:
+	.long	0x91	# Length of Compilation Unit Info
+	.value	0x4	# DWARF version number
+	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
+	.byte	0x8	# Pointer Size (in bytes)
+	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
+	.uleb128 0x4	# DW_AT_producer: "GNU C 4.9.x -m64 -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -O1 -fPIE"
+	.byte	0x1	# DW_AT_language
+	.uleb128 0x6	# DW_AT_name: "testsuite/gdb.dwarf2/fission-loclists-pie.c"
+	.byte	0xed	# DW_AT_GNU_dwo_id
+	.byte	0x50
+	.byte	0xa4
+	.byte	0xe0
+	.byte	0xc9
+	.byte	0xf8
+	.byte	0xd3
+	.byte	0xf0
+	.uleb128 0x2	# (DIE (0x17) DW_TAG_subprogram)
+			# DW_AT_external
+	.uleb128 0x5	# DW_AT_name: "init"
+	.byte	0x1	# DW_AT_decl_file (testsuite/gdb.dwarf2/fission-loclists-pie.c)
+	.byte	0x15	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.uleb128 0x3	# DW_AT_low_pc
+	.quad	.LFE0-.LFB0	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x3a	# DW_AT_sibling
+	.uleb128 0x3	# (DIE (0x2e) DW_TAG_formal_parameter)
+	.ascii "b\0"	# DW_AT_name
+	.byte	0x1	# DW_AT_decl_file (testsuite/gdb.dwarf2/fission-loclists-pie.c)
+	.byte	0x15	# DW_AT_decl_line
+	.long	0x41	# DW_AT_type
+	.uleb128 0x1	# DW_AT_location
+	.byte	0x55	# DW_OP_reg5
+	.byte	0	# end of children of DIE 0x17
+	.uleb128 0x4	# (DIE (0x3a) DW_TAG_base_type)
+	.byte	0x4	# DW_AT_byte_size
+	.byte	0x5	# DW_AT_encoding
+	.ascii "int\0"	# DW_AT_name
+	.uleb128 0x5	# (DIE (0x41) DW_TAG_pointer_type)
+	.byte	0x8	# DW_AT_byte_size
+	.long	0x3a	# DW_AT_type
+	.uleb128 0x2	# (DIE (0x47) DW_TAG_subprogram)
+			# DW_AT_external
+	.uleb128 0x2	# DW_AT_name: "main"
+	.byte	0x1	# DW_AT_decl_file (testsuite/gdb.dwarf2/fission-loclists-pie.c)
+	.byte	0x1b	# DW_AT_decl_line
+			# DW_AT_prototyped
+	.long	0x3a	# DW_AT_type
+	.uleb128 0x4	# DW_AT_low_pc
+	.quad	.LFE1-.LFB1	# DW_AT_high_pc
+	.uleb128 0x1	# DW_AT_frame_base
+	.byte	0x9c	# DW_OP_call_frame_cfa
+			# DW_AT_GNU_all_call_sites
+	.long	0x84	# DW_AT_sibling
+	.uleb128 0x6	# (DIE (0x5e) DW_TAG_formal_parameter)
+	.uleb128 0x1	# DW_AT_name: "argc"
+	.byte	0x1	# DW_AT_decl_file (testsuite/gdb.dwarf2/fission-loclists-pie.c)
+	.byte	0x1b	# DW_AT_decl_line
+	.long	0x3a	# DW_AT_type
+	.long	.LLST0-.Ldebug_loc0	# DW_AT_location
+	.uleb128 0x6	# (DIE (0x6a) DW_TAG_formal_parameter)
+	.uleb128 0	# DW_AT_name: "argv"
+	.byte	0x1	# DW_AT_decl_file (testsuite/gdb.dwarf2/fission-loclists-pie.c)
+	.byte	0x1b	# DW_AT_decl_line
+	.long	0x84	# DW_AT_type
+	.long	.LLST1-.Ldebug_loc0	# DW_AT_location
+	.uleb128 0x7	# (DIE (0x76) DW_TAG_GNU_call_site)
+	.uleb128 0x2	# DW_AT_low_pc
+	.long	0x17	# DW_AT_abstract_origin
+	.uleb128 0x8	# (DIE (0x7c) DW_TAG_GNU_call_site_parameter)
+	.uleb128 0x1	# DW_AT_location
+	.byte	0x55	# DW_OP_reg5
+	.uleb128 0x2	# DW_AT_GNU_call_site_value
+	.byte	0x91	# DW_OP_fbreg
+	.sleb128 -12
+	.byte	0	# end of children of DIE 0x76
+	.byte	0	# end of children of DIE 0x47
+	.uleb128 0x5	# (DIE (0x84) DW_TAG_pointer_type)
+	.byte	0x8	# DW_AT_byte_size
+	.long	0x8a	# DW_AT_type
+	.uleb128 0x5	# (DIE (0x8a) DW_TAG_pointer_type)
+	.byte	0x8	# DW_AT_byte_size
+	.long	0x90	# DW_AT_type
+	.uleb128 0x9	# (DIE (0x90) DW_TAG_base_type)
+	.byte	0x1	# DW_AT_byte_size
+	.byte	0x6	# DW_AT_encoding
+	.uleb128 0x3	# DW_AT_name: "char"
+	.byte	0	# end of children of DIE 0xb
+	.section	.debug_info,"",@progbits
+.Lskeleton_debug_info0:
+	.long	0x30	# Length of Compilation Unit Info
+	.value	0x4	# DWARF version number
+	.long	.Lskeleton_debug_abbrev0	# Offset Into Abbrev. Section
+	.byte	0x8	# Pointer Size (in bytes)
+	.uleb128 0x1	# (DIE (0) DW_TAG_compile_unit)
+	.quad	.Ltext0	# DW_AT_low_pc
+	.quad	.Letext0-.Ltext0	# DW_AT_high_pc
+	.long	.Ldebug_line0	# DW_AT_stmt_list
+	.long	.LASF0	# DW_AT_GNU_dwo_name: "fission-loclists-pie.dwo"
+	.long	.LASF1	# DW_AT_comp_dir: "/tmp/19999/obj64/gdb/testsuite"
+			# DW_AT_GNU_pubnames
+	.long	.Ldebug_addr0	# DW_AT_GNU_addr_base
+	.byte	0xed	# DW_AT_GNU_dwo_id
+	.byte	0x50
+	.byte	0xa4
+	.byte	0xe0
+	.byte	0xc9
+	.byte	0xf8
+	.byte	0xd3
+	.byte	0xf0
+	.section	.debug_abbrev,"",@progbits
+.Lskeleton_debug_abbrev0:
+	.uleb128 0x1	# (abbrev code)
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
+	.byte	0	# DW_children_no
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1	# (DW_FORM_addr)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x10	# (DW_AT_stmt_list)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x2130	# (DW_AT_GNU_dwo_name)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x1b	# (DW_AT_comp_dir)
+	.uleb128 0xe	# (DW_FORM_strp)
+	.uleb128 0x2134	# (DW_AT_GNU_pubnames)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x2133	# (DW_AT_GNU_addr_base)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.uleb128 0x2131	# (DW_AT_GNU_dwo_id)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.byte	0
+	.byte	0
+	.byte	0	# end of skeleton .debug_abbrev
+	.section	.debug_abbrev.dwo,"e",@progbits
+.Ldebug_abbrev0:
+	.uleb128 0x1	# (abbrev code)
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x25	# (DW_AT_producer)
+	.uleb128 0x1f02	# (DW_FORM_GNU_str_index)
+	.uleb128 0x13	# (DW_AT_language)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x1f02	# (DW_FORM_GNU_str_index)
+	.uleb128 0x2131	# (DW_AT_GNU_dwo_id)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.byte	0
+	.byte	0
+	.uleb128 0x2	# (abbrev code)
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x3f	# (DW_AT_external)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x1f02	# (DW_FORM_GNU_str_index)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x27	# (DW_AT_prototyped)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1f01	# (DW_FORM_GNU_addr_index)
+	.uleb128 0x12	# (DW_AT_high_pc)
+	.uleb128 0x7	# (DW_FORM_data8)
+	.uleb128 0x40	# (DW_AT_frame_base)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2117	# (DW_AT_GNU_all_call_sites)
+	.uleb128 0x19	# (DW_FORM_flag_present)
+	.uleb128 0x1	# (DW_AT_sibling)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x3	# (abbrev code)
+	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.byte	0
+	.byte	0
+	.uleb128 0x4	# (abbrev code)
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3e	# (DW_AT_encoding)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x8	# (DW_FORM_string)
+	.byte	0
+	.byte	0
+	.uleb128 0x5	# (abbrev code)
+	.uleb128 0xf	# (TAG: DW_TAG_pointer_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x6	# (abbrev code)
+	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
+	.byte	0	# DW_children_no
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x1f02	# (DW_FORM_GNU_str_index)
+	.uleb128 0x3a	# (DW_AT_decl_file)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3b	# (DW_AT_decl_line)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x49	# (DW_AT_type)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x17	# (DW_FORM_sec_offset)
+	.byte	0
+	.byte	0
+	.uleb128 0x7	# (abbrev code)
+	.uleb128 0x4109	# (TAG: DW_TAG_GNU_call_site)
+	.byte	0x1	# DW_children_yes
+	.uleb128 0x11	# (DW_AT_low_pc)
+	.uleb128 0x1f01	# (DW_FORM_GNU_addr_index)
+	.uleb128 0x31	# (DW_AT_abstract_origin)
+	.uleb128 0x13	# (DW_FORM_ref4)
+	.byte	0
+	.byte	0
+	.uleb128 0x8	# (abbrev code)
+	.uleb128 0x410a	# (TAG: DW_TAG_GNU_call_site_parameter)
+	.byte	0	# DW_children_no
+	.uleb128 0x2	# (DW_AT_location)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.uleb128 0x2111	# (DW_AT_GNU_call_site_value)
+	.uleb128 0x18	# (DW_FORM_exprloc)
+	.byte	0
+	.byte	0
+	.uleb128 0x9	# (abbrev code)
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
+	.byte	0	# DW_children_no
+	.uleb128 0xb	# (DW_AT_byte_size)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3e	# (DW_AT_encoding)
+	.uleb128 0xb	# (DW_FORM_data1)
+	.uleb128 0x3	# (DW_AT_name)
+	.uleb128 0x1f02	# (DW_FORM_GNU_str_index)
+	.byte	0
+	.byte	0
+	.byte	0
+	.section	.debug_loc.dwo,"e",@progbits
+.Ldebug_loc0:
+.LLST0:
+	.byte	0x3	# Location list start/length entry (*.LLST0)
+	.uleb128 0	# Location list range start index (*.LVL1)
+	.long	.LVL2-.LVL1	# Location list range length (*.LLST0)
+	.value	0x1	# Location expression size
+	.byte	0x55	# DW_OP_reg5
+	.byte	0x3	# Location list start/length entry (*.LLST0)
+	.uleb128 0x1	# Location list range start index (*.LVL2)
+	.long	.LFE1-.LVL2	# Location list range length (*.LLST0)
+	.value	0x4	# Location expression size
+	.byte	0xf3	# DW_OP_GNU_entry_value
+	.uleb128 0x1
+	.byte	0x55	# DW_OP_reg5
+	.byte	0x9f	# DW_OP_stack_value
+	.byte	0	# Location list terminator (*.LLST0)
+.LLST1:
+	.byte	0x3	# Location list start/length entry (*.LLST1)
+	.uleb128 0	# Location list range start index (*.LVL1)
+	.long	.LVL3-1-.LVL1	# Location list range length (*.LLST1)
+	.value	0x1	# Location expression size
+	.byte	0x54	# DW_OP_reg4
+	.byte	0x3	# Location list start/length entry (*.LLST1)
+	.uleb128 0x5	# Location list range start index (*.LVL3-1)
+	.long	.LFE1-.LVL3-1	# Location list range length (*.LLST1)
+	.value	0x4	# Location expression size
+	.byte	0xf3	# DW_OP_GNU_entry_value
+	.uleb128 0x1
+	.byte	0x54	# DW_OP_reg4
+	.byte	0x9f	# DW_OP_stack_value
+	.byte	0	# Location list terminator (*.LLST1)
+	.section	.debug_gnu_pubnames,"",@progbits
+	.long	0x22	# Pub Info Length
+	.value	0x2	# DWARF Version
+	.long	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
+	.long	0x95	# Compilation Unit Length
+	.long	0x17	# DIE offset
+	.byte	0x30	# GDB-index flags
+	.ascii "init\0"	# external name
+	.long	0x47	# DIE offset
+	.byte	0x30	# GDB-index flags
+	.ascii "main\0"	# external name
+	.long	0
+	.section	.debug_gnu_pubtypes,"",@progbits
+	.long	0x21	# Pub Info Length
+	.value	0x2	# DWARF Version
+	.long	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
+	.long	0x95	# Compilation Unit Length
+	.long	0x3a	# DIE offset
+	.byte	0x90	# GDB-index flags
+	.ascii "int\0"	# external name
+	.long	0x90	# DIE offset
+	.byte	0x90	# GDB-index flags
+	.ascii "char\0"	# external name
+	.long	0
+	.section	.debug_aranges,"",@progbits
+	.long	0x2c	# Length of Address Ranges Info
+	.value	0x2	# DWARF Version
+	.long	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
+	.byte	0x8	# Size of Address
+	.byte	0	# Size of Segment Descriptor
+	.value	0	# Pad to 16 byte boundary
+	.value	0
+	.quad	.Ltext0	# Address
+	.quad	.Letext0-.Ltext0	# Length
+	.quad	0
+	.quad	0
+	.section	.debug_line,"",@progbits
+.Ldebug_line0:
+	.section	.debug_line.dwo,"e",@progbits
+.Lskeleton_debug_line0:
+	.long	.LELT0-.LSLT0	# Length of Source Line Info
+.LSLT0:
+	.value	0x4	# DWARF Version
+	.long	.LELTP0-.LASLTP0	# Prolog Length
+.LASLTP0:
+	.byte	0x1	# Minimum Instruction Length
+	.byte	0x1	# Maximum Operations Per Instruction
+	.byte	0x1	# Default is_stmt_start flag
+	.byte	0xf6	# Line Base Value (Special Opcodes)
+	.byte	0xf2	# Line Range Value (Special Opcodes)
+	.byte	0xd	# Special Opcode Base
+	.byte	0	# opcode: 0x1 has 0 args
+	.byte	0x1	# opcode: 0x2 has 1 args
+	.byte	0x1	# opcode: 0x3 has 1 args
+	.byte	0x1	# opcode: 0x4 has 1 args
+	.byte	0x1	# opcode: 0x5 has 1 args
+	.byte	0	# opcode: 0x6 has 0 args
+	.byte	0	# opcode: 0x7 has 0 args
+	.byte	0	# opcode: 0x8 has 0 args
+	.byte	0x1	# opcode: 0x9 has 1 args
+	.byte	0	# opcode: 0xa has 0 args
+	.byte	0	# opcode: 0xb has 0 args
+	.byte	0x1	# opcode: 0xc has 1 args
+	.ascii "testsuite/gdb.dwarf2\0"	# Directory Entry: 0x1
+	.byte	0	# End directory table
+	.ascii "fission-loclists-pie.c\0"	# File Entry: 0x1
+	.uleb128 0x1
+	.uleb128 0
+	.uleb128 0
+	.byte	0	# End file name table
+.LELTP0:
+.LELT0:
+	.section	.debug_str,"MS",@progbits,1
+.LASF1:
+	.string	"/tmp/19999/obj64/gdb/testsuite"
+.LASF0:
+	.string	"fission-loclists-pie.dwo"
+	.section	.debug_str_offsets.dwo,"e",@progbits
+	.long	0	# indexed string 0x0: argv
+	.long	0x5	# indexed string 0x1: argc
+	.long	0xa	# indexed string 0x2: main
+	.long	0xf	# indexed string 0x3: char
+	.long	0x14	# indexed string 0x4: GNU C 4.9.x -m64 -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -O1 -fPIE
+	.long	0x64	# indexed string 0x5: init
+	.long	0x69	# indexed string 0x6: testsuite/gdb.dwarf2/fission-loclists-pie.c
+	.section	.debug_str.dwo,"e",@progbits
+	.string	"argv"
+	.string	"argc"
+	.string	"main"
+	.string	"char"
+	.string	"GNU C 4.9.x -m64 -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -O1 -fPIE"
+	.string	"init"
+	.string	"testsuite/gdb.dwarf2/fission-loclists-pie.c"
+	.ident	"GCC: 4.9.x"
+	.section	.note.GNU-stack,"",@progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists.S ./gdb/testsuite/gdb.dwarf2/fission-loclists.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-loclists.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-loclists.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix2.c ./gdb/testsuite/gdb.dwarf2/fission-mix2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-mix2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.c ./gdb/testsuite/gdb.dwarf2/fission-mix.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-mix.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.exp ./gdb/testsuite/gdb.dwarf2/fission-mix.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-mix.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.h ./gdb/testsuite/gdb.dwarf2/fission-mix.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-mix.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-mix.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-reread.exp ./gdb/testsuite/gdb.dwarf2/fission-reread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-reread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-reread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,10 +25,14 @@ if ![dwarf2_support] {
     return 0  
 }
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
 
 if [build_executable_from_fission_assembler \
-	"$testfile.exp" "$binfile" "$srcfile" {nodebug}] {
+	"$testfile.exp" "$binfile" "$srcfile" \
+	[list nodebug $additional_flags]] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-reread.S ./gdb/testsuite/gdb.dwarf2/fission-reread.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/fission-reread.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/fission-reread.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,27 +38,36 @@
    further hand-edited to support that.
 */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.file	"fission-reread.cc"
 
-	.globl	baz
+	.globl	SYMBOL(baz)
 	.data	/* Previously this used .bss, but it's not portable.  */
 	.align 4
-	.type	baz, %object
-	.size	baz, 4
-baz:
+	.type	SYMBOL(baz), %object
+	.size	SYMBOL(baz), 4
+SYMBOL(baz):
 	.zero	4
 
 	.text
 .Ltext0:
-	.globl	main
-	.type	main, %function
-main:
+	.globl	SYMBOL(main)
+	.type	SYMBOL(main), %function
+SYMBOL(main):
 .LFB0:
 	.file 1 "fission-reread.cc"
 	.loc 1 11 0
 	.4byte 0
 .LFE0:
-	.size	main, .-main
+	.size	SYMBOL(main), .-SYMBOL(main)
 .Letext0:
 
 	.section	.debug_types.dwo
@@ -450,4 +459,4 @@ main:
 	.section	.debug_addr
 .Ldebug_addr0:
 	.4byte	.LFB0	/* DW_AT_low_pc */
-	.4byte	baz	/* DW_AT_location */
+	.4byte	SYMBOL(baz)	/* DW_AT_location */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/formdata16.c ./gdb/testsuite/gdb.dwarf2/formdata16.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/formdata16.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/formdata16.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main ()
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/formdata16.exp ./gdb/testsuite/gdb.dwarf2/formdata16.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/formdata16.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/formdata16.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,77 @@
+# Copyright 2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+    return 0  
+}
+
+standard_testfile .c formdata16-dw.S
+
+# We need to know the endianess in order
+# to write some of the debugging info we'd like to generate.
+if [prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}] {
+    return -1
+}
+
+set endianness "little"
+set test "show endian"
+gdb_test_multiple $test $test {
+    -re "(.* )(big|little)( endian.*)\r\n$gdb_prompt $" {
+	set endianness $expect_out(2,string)
+	pass "endianness"
+    }
+}
+
+set high "0x123456789abcdef0"
+set low "0x0fedcba987654321"
+if { $endianness == "big" } {
+    set pair $high,$low
+} else {
+    set pair $low,$high
+}
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    global pair
+
+    cu { addr_size 4 } {
+ 	compile_unit {} {
+	    declare_labels int_label
+
+	    int_label: DW_TAG_base_type {
+		{DW_AT_byte_size 16 DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_unsigned}
+		{DW_AT_name "__uint128"}
+	    }
+
+	    DW_TAG_variable {
+		{name xxx}
+		{type :$int_label}
+		{const_value $pair DW_FORM_data16}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+			  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/gdb-index.exp ./gdb/testsuite/gdb.dwarf2/gdb-index.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/gdb-index.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/gdb-index.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {![dwarf2_support]} {
 
 standard_testfile main.c
 
-if { [prepare_for_testing "${testfile}.exp" "${testfile}" \
+if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list ${srcfile}]] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp ./gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptr-64bit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,21 +19,121 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-standard_testfile .S
-set mainfile main.c
+standard_testfile main.c
 
 proc test { dwarf_version offset_size addr_size ref_addr_size two_cu } {
-    global testfile srcfile mainfile
+    global testfile srcfile
 
-    # 32-bit targets do not support any of the testcases; keep quiet there.
-    set opts {quiet}
-    foreach n { dwarf_version offset_size addr_size ref_addr_size two_cu } {
-	lappend opts "additional_flags=-D[string toupper $n]=[expr "\$$n"]"
+    set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}t${two_cu}"
+
+    # Make some DWARF for the test.
+    set asm_file [standard_output_file ${testfile}-${name}.S]
+    Dwarf::assemble $asm_file {
+	upvar dwarf_version dwarf_version
+	upvar addr_size addr_size
+	upvar offset_size offset_size
+	upvar ref_addr_size ref_addr_size
+	upvar two_cu two_cu
+
+	set is_64 [expr { $offset_size == 4 ? 0 : 1 }]
+
+	cu {
+	    version $dwarf_version
+	    addr_size $addr_size
+	    is_64 $is_64
+	} {
+	    compile_unit {
+		{ producer "GNU C 4.4.3" }
+		{ language @DW_LANG_C89 }
+		{ name 1.c }
+	    } {
+		declare_labels struct_label variable_label int_label pointer_label
+
+		int_label: base_type {
+		    { byte_size 4 DW_FORM_sdata }
+		    { DW_AT_encoding @DW_ATE_signed }
+		    { name int }
+		}
+
+		struct_label: structure_type {
+		    { name s }
+		    { byte_size 4 sdata }
+		} {
+		    member {
+			{ name f }
+			{ type :$int_label }
+			{ data_member_location 0 data1 }
+		    }
+		}
+
+		pointer_label: pointer_type {
+		    { byte_size $Dwarf::_cu_addr_size sdata }
+		    { type  :$struct_label }
+		}
+
+		variable_label: DW_TAG_variable {
+		    { name v }
+		    { location {
+			DW_OP_implicit_value 0x1 0x1 0x1 0x1
+		    } SPECIAL_expr}
+		    { type :$struct_label "DW_FORM_ref$ref_addr_size" }
+		}
+
+		if { !$two_cu } {
+		    subprogram {
+			{ name main }
+			{ low_pc main addr }
+			{ high_pc "main+0x100" addr }
+			{ type %$int_label }
+			{ external 1 flag }
+		    } {
+			DW_TAG_variable {
+			    { name p }
+			    { location {
+				GNU_implicit_pointer $variable_label 0
+			    } SPECIAL_expr }
+			    { type :$pointer_label "DW_FORM_ref$ref_addr_size" }
+			}
+		    }
+		}
+	    }
+	}
+
+	if { $two_cu } {
+	    cu {
+		version $dwarf_version
+		addr_size $addr_size
+		is_64 $is_64
+	    } {
+		compile_unit {
+		    { producer "GNU C 4.4.3" }
+		    { language @DW_LANG_C89 }
+		    { name 1.c }
+		} {
+		    subprogram {
+			{ name main }
+			{ low_pc main addr }
+			{ high_pc "main+0x100" addr }
+			{ type %$int_label }
+			{ external 1 flag }
+		    } {
+			DW_TAG_variable {
+			    { name p }
+			    { location {
+				GNU_implicit_pointer $variable_label 0
+			    } SPECIAL_expr }
+			    { type %$pointer_label }
+			}
+		    }
+		}
+	    }
+	}
     }
 
-    set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}t${two_cu}"
+    # 32-bit targets do not support any of the testcases; keep quiet there.
+    set opts {quiet}
     set executable ${testfile}-${name}
-    if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" $opts] {
+    if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" $opts] {
 	return -1
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-64bit.S ./gdb/testsuite/gdb.dwarf2/implptr-64bit.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-64bit.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptr-64bit.S	1970-01-01 00:00:00.000000000 +0000
@@ -1,226 +0,0 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-	.section	.debug_info
-d:
-	/* Length of Compilation Unit Info */
-#if OFFSET_SIZE == 4
-# define OFFSET .4byte
-# define HEADER_LINE1
-# define HEADER_LINE2(END) .4byte	END - 1f
-#elif OFFSET_SIZE == 8
-# define OFFSET .8byte
-# define HEADER_LINE1 .4byte	0xffffffff
-# define HEADER_LINE2(END) .8byte	END - 1f
-#else
-# error
-#endif
-#if ADDR_SIZE == 4
-# define ADDR .4byte
-#elif ADDR_SIZE == 8
-# define ADDR .8byte
-#else
-# error
-#endif
-#if REF_ADDR_SIZE == 4
-# define REF_ADDR .4byte
-#elif REF_ADDR_SIZE == 8
-# define REF_ADDR .8byte
-#else
-# error
-#endif
-	
-#if TWO_CU
-# define END1 .Lcu_end_1
-#else
-# define END1 debug_end
-#endif
-
-	HEADER_LINE1
-	HEADER_LINE2(END1)
-
-1:
-	.2byte	DWARF_VERSION	/* DWARF version number */
-	OFFSET	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
-	.byte	ADDR_SIZE	/* Pointer Size (in bytes) */
-
-	.uleb128 0x1	/* (DIE (0xb) DW_TAG_compile_unit) */
-	.ascii "GNU C 4.4.3\0"	/* DW_AT_producer */
-	.byte	0x1	/* DW_AT_language */
-	.ascii "1.c\0"	/* DW_AT_name */
-
-.Ltype_int:
-	.uleb128 0x7	/* DW_TAG_base_type */
-	.byte	0x4	/* DW_AT_byte_size */
-	.byte	0x5	/* DW_AT_encoding */
-	.ascii "int\0"	/* DW_AT_name */
-
-.Ltype_struct:
-	.uleb128 0x2	/* DW_TAG_structure_type */
-	.ascii "s\0"	/* DW_AT_name */
-	.byte	4	/* DW_AT_byte_size */
-
-	.uleb128 0x3	/* DW_TAG_member */
-	.ascii "f\0"	/* DW_AT_name */
-	.4byte	.Ltype_int - d	/* DW_AT_type */
-	.byte	0	/* DW_AT_data_member_location */
-
-	.byte	0x0	/* end of children of DW_TAG_structure_type */
-
-.Ltype_structptr:
-	.uleb128 0x5	/* DW_TAG_pointer_type */
-	.byte	ADDR_SIZE	/* DW_AT_byte_size */
-	.4byte	.Ltype_struct - d	/* DW_AT_type */
-
-.Lvar_out:
-	.uleb128 0x4	/* (DW_TAG_variable) */
-	.ascii "v\0"	/* DW_AT_name */
-	.byte	2f - 1f	/* DW_AT_location: DW_FORM_block1 */
-1:
-	.byte	0x9e	/* DW_OP_implicit_value */
-	.uleb128  2f - 3f
-3:
-	.byte	1, 1, 1, 1
-2:
-	REF_ADDR	.Ltype_struct - d	/* DW_AT_type */
-
-#if TWO_CU
-	.byte	0x0	/* end of children of CU */
-.Lcu_end_1:
-
-	HEADER_LINE1
-	HEADER_LINE2 (debug_end)
-
-1:
-	.2byte	DWARF_VERSION	/* DWARF version number */
-	OFFSET	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
-	.byte	ADDR_SIZE	/* Pointer Size (in bytes) */
-
-	.uleb128 0x1	/* (DIE (0xb) DW_TAG_compile_unit) */
-	.ascii "GNU C 4.4.3\0"	/* DW_AT_producer */
-	.byte	0x1	/* DW_AT_language */
-	.ascii "1.c\0"	/* DW_AT_name */
-#endif
-
-	.uleb128	6			/* Abbrev: DW_TAG_subprogram */
-	.ascii		"main\0"		/* DW_AT_name */
-	ADDR		main			/* DW_AT_low_pc */
-	ADDR		main + 0x100		/* DW_AT_high_pc */
-	REF_ADDR	.Ltype_int - d		/* DW_AT_type */
-	.byte		1			/* DW_AT_external */
-
-	.uleb128 0x4	/* (DW_TAG_variable) */
-	.ascii "p\0"	/* DW_AT_name */
-	.byte	2f - 1f	/* DW_AT_location: DW_FORM_block1 */
-1:
-	.byte	0xf2	/* DW_OP_GNU_implicit_pointer */
-	REF_ADDR	.Lvar_out - d	/* referenced DIE */
-	.sleb128	0	/* offset */
-2:
-	REF_ADDR	.Ltype_structptr - d	/* DW_AT_type */
-
-	.byte	0x0	/* end of children of main */
-
-	.byte	0x0	/* end of children of CU */
-debug_end:
-
-	.section	.debug_abbrev
-.Ldebug_abbrev0:
-
-	.uleb128 0x1	/* (abbrev code) */
-	.uleb128 0x11	/* (TAG: DW_TAG_compile_unit) */
-	.byte	0x1	/* DW_children_yes */
-	.uleb128 0x25	/* (DW_AT_producer) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.uleb128 0x13	/* (DW_AT_language) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.uleb128 0x3	/* (DW_AT_name) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.byte	0x0
-	.byte	0x0
-
-	.uleb128 0x2	/* (abbrev code) */
-	.uleb128 0x13	/* (TAG: DW_TAG_structure_type) */
-	.byte	0x1	/* DW_children_yes */
-	.uleb128 0x3	/* (DW_AT_name) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.uleb128 0xb	/* (DW_AT_byte_size) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.byte	0
-	.byte	0
-
-	.uleb128 0x3	/* (abbrev code) */
-	.uleb128 0xd	/* (TAG: DW_TAG_member) */
-	.byte	0	/* DW_children_no */
-	.uleb128 0x3	/* (DW_AT_name) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.uleb128 0x49	/* (DW_AT_type) */
-	.uleb128 0x13	/* (DW_FORM_ref4) */
-	.uleb128 0x38	/* (DW_AT_data_member_location) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.byte	0
-	.byte	0
-
-	.uleb128 0x4	/* (abbrev code) */
-	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
-	.byte	0x0	/* DW_children_yes */
-	.uleb128 0x3	/* (DW_AT_name) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.uleb128 0x02	/* (DW_AT_location) */
-	.uleb128 0xa	/* (DW_FORM_block1) */
-	.uleb128 0x49	/* (DW_AT_type) */
-	.uleb128 0x10	/* (DW_FORM_ref_addr) */
-	.byte	0x0
-	.byte	0x0
-
-	.uleb128 0x5	/* (abbrev code) */
-	.uleb128 0xf	/* (TAG: DW_TAG_pointer_type) */
-	.byte	0x0	/* DW_children_no */
-	.uleb128 0xb	/* (DW_AT_byte_size) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.uleb128 0x49	/* (DW_AT_type) */
-	.uleb128 0x13	/* (DW_FORM_ref4) */
-	.byte	0x0
-	.byte	0x0
-
-	.uleb128	6			/* Abbrev code */
-	.uleb128	0x2e			/* DW_TAG_subprogram */
-	.byte		1			/* has_children */
-	.uleb128	0x3			/* DW_AT_name */
-	.uleb128	0x8			/* DW_FORM_string */
-	.uleb128	0x11			/* DW_AT_low_pc */
-	.uleb128	0x1			/* DW_FORM_addr */
-	.uleb128	0x12			/* DW_AT_high_pc */
-	.uleb128	0x1			/* DW_FORM_addr */
-	.uleb128	0x49			/* DW_AT_type */
-	.uleb128	0x10			/* DW_FORM_ref_addr */
-	.uleb128	0x3f			/* DW_AT_external */
-	.uleb128	0xc			/* DW_FORM_flag */
-	.byte		0x0			/* Terminator */
-	.byte		0x0			/* Terminator */
-
-	.uleb128 0x7	/* (abbrev code) */
-	.uleb128 0x24	/* (TAG: DW_TAG_base_type) */
-	.byte	0	/* DW_children_no */
-	.uleb128 0xb	/* (DW_AT_byte_size) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.uleb128 0x3e	/* (DW_AT_encoding) */
-	.uleb128 0xb	/* (DW_FORM_data1) */
-	.uleb128 0x3	/* (DW_AT_name) */
-	.uleb128 0x8	/* (DW_FORM_string) */
-	.byte	0
-	.byte	0
-
-	.byte	0x0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr.c ./gdb/testsuite/gdb.dwarf2/implptr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrconst.c ./gdb/testsuite/gdb.dwarf2/implptrconst.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrconst.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptrconst.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrconst.exp ./gdb/testsuite/gdb.dwarf2/implptrconst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrconst.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptrconst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr.exp ./gdb/testsuite/gdb.dwarf2/implptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if [info exists COMPILE] {
     return 0  
 }
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp ./gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if [prepare_for_testing ${testfile}.exp $executable "${asm_file} ${srcfile}" {}] {
+if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrpiece.exp ./gdb/testsuite/gdb.dwarf2/implptrpiece.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implptrpiece.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implptrpiece.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
 		{name s}
 		{type :$struct_label}
 		{location {
-		    const1u 1
+		    const2u 0x5678
 		    stack_value
 		    piece 2
 		    const1u 2
@@ -119,4 +119,17 @@ if ![runto_main] {
     return -1
 }
 
-gdb_test "print/d p\[-1\]" " = 0"
+# Determine endianness.
+set endian "little"
+gdb_test_multiple "show endian" "determine endianness" {
+    -re ".* (big|little) endian.*$gdb_prompt $" {
+	set endian $expect_out(1,string)
+	pass "endianness: $endian"
+    }
+}
+
+# Access the second byte of s through an implicit pointer to the third
+# byte of s, using a negative offset.  Compare that to the second byte of
+# the short integer 0x5678 in target byte order.
+switch $endian { little {set val 0x56} big {set val 0x78} }
+gdb_test "p/x p\[-1\]" " = $val"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-array.c ./gdb/testsuite/gdb.dwarf2/implref-array.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-array.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-array.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Test program for synthetic C++ references to arrays.  */
+
+int array[5] = {0, 1, 2, 3, 4};
+
+int
+main (void)
+{
+  asm ("main_label: .globl main_label");
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-array.exp ./gdb/testsuite/gdb.dwarf2/implref-array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-array.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,170 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
+# The referenced value is a global array whose location is a DW_OP_addr.
+
+if [skip_cplus_tests] {
+    continue
+}
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+    return 0
+}
+
+# We'll place the output of Dwarf::assemble in implref-array.S.
+standard_testfile .c .S
+
+# ${testfile} is now "implref-array".  srcfile2 is "implref-array.S".
+set executable ${testfile}
+set asm_file [standard_output_file ${srcfile2}]
+
+# We need to know the size of integer and address types in order
+# to write some of the debugging info we'd like to generate.
+#
+# For that, we ask GDB by debugging our implref-array program.
+# Any program would do, but since we already have implref-array
+# specifically for this testcase, might as well use that.
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
+    return -1
+}
+
+set array_length [get_valueof "/u" "sizeof(array) / sizeof(array\[0\])" -1]
+
+# Create the DWARF.  We need a regular variable which represents the array, and
+# a reference to it that'll be marked with DW_OP_GNU_implicit_pointer.
+# The variable must be global so that its name is an exported symbol that we
+# can reference from the DWARF using gdb_target_symbol.
+Dwarf::assemble ${asm_file} {
+    global srcdir subdir srcfile array_length
+
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C_plus_plus}
+	} {
+	    declare_labels int_label sizetype_label array_label variable_label ref_label
+	    set int_size [get_sizeof "int" -1]
+	    set upper_bound [expr ${array_length} - 1]
+
+	    # gdb always assumes references are implemented as pointers.
+	    set addr_size [get_sizeof "void *" -1]
+
+	    int_label: DW_TAG_base_type {
+		{DW_AT_byte_size ${int_size} DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_signed}
+		{DW_AT_name "int"}
+	    }
+
+	    sizetype_label: DW_TAG_base_type {
+		{DW_AT_byte_size ${int_size} DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_unsigned}
+		{DW_AT_name "sizetype"}
+	    }
+
+	    array_label: DW_TAG_array_type {
+		    {DW_AT_type :${int_label}}
+	    } {
+		DW_TAG_subrange_type {
+		    {DW_AT_type :${sizetype_label}}
+		    {DW_AT_lower_bound 0 DW_FORM_udata}
+		    {DW_AT_upper_bound ${upper_bound} DW_FORM_udata}
+		}
+	    }
+
+	    ref_label: DW_TAG_reference_type {
+		{DW_AT_byte_size ${addr_size} DW_FORM_udata}
+		{DW_AT_type :${array_label}}
+	    }
+
+	    variable_label: DW_TAG_variable {
+		{DW_AT_name "array"}
+		{DW_AT_type :${array_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+		{DW_AT_location {DW_OP_addr [gdb_target_symbol "array"]} SPECIAL_expr}
+	    }
+
+	    DW_TAG_subprogram {
+		{MACRO_AT_func { "main" "${srcdir}/${subdir}/${srcfile}" }}
+		{DW_AT_type :${int_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+	    } {
+		DW_TAG_variable {
+		    {DW_AT_name "ref"}
+		    {DW_AT_type :${ref_label}}
+		    {DW_AT_location {DW_OP_GNU_implicit_pointer ${variable_label} 0} SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] {
+    return -1
+}
+
+# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
+if ![runto_main] {
+    return -1
+}
+
+# This matches e.g. '(int (&)[5])'
+set ref_type [format {\(int \(&\)\[%d\]\)} ${array_length}]
+
+# This matches e.g. '(int (*)[5])'
+set ptr_type [format {\(int \(\*\)\[%d\]\)} ${array_length}]
+
+# Contents of the array.  Trim leading/trailing whitespace, '{' and '}'
+# since they confuse TCL to no end.
+set contents [get_valueof "" "array" ""]
+set contents [string trim ${contents}]
+set contents [string trim ${contents} "{}"]
+
+# Address of the referenced value.
+set address [get_hexadecimal_valueof "&array" ""]
+
+# Doing 'print ref' should show us e.g. '(int (&)[5]) 0xdeadbeef: {0, 1, 2, 3, 4}'.
+gdb_test "print ref" " = ${ref_type} @${address}: \\{${contents}\\}"
+
+# Doing 'print &ref' should show us e.g. '(int (*)[5]) 0xdeadbeef <array>'.
+gdb_test "print &ref" " = ${ptr_type} ${address} <array>"
+
+# gdb assumes C++ references are implemented as pointers, and print &(&ref)
+# shows us the underlying pointer's address.  Since in this case there's no
+# physical pointer, gdb should tell us so.
+gdb_test "print &(&ref)" "Attempt to take address of value not located in memory."
+
+# Test assignment through the synthetic reference.
+set first_value 10
+gdb_test_no_output "set (ref\[0\] = ${first_value})"
+
+# This matches '{10, 1, 2, 3, 4}'.
+set new_contents [format {\{%d, 1, 2, 3, 4\}} ${first_value}]
+
+# Doing 'print ref' should now show us e.g.
+# '(int (&)[5]) <synthetic pointer>: {10, 1, 2, 3, 4}'.
+gdb_test "print ref" " = ${ref_type} @${address}: ${new_contents}" "print ref after assignment"
+gdb_test "print array" " = ${new_contents}" "print array after assignment"
+
+# Test treating the array as a pointer.
+set second_value 20
+set new_contents [format {\{%d, %d, 2, 3, 4\}} ${first_value} ${second_value}]
+
+gdb_test "print *ref" " = ${first_value}"
+gdb_test_no_output "set (*(ref + 1) = ${second_value})"
+gdb_test "print ref\[1\]" " = ${second_value}"
+gdb_test "print array" " = ${new_contents}" "print array after second assignment"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-const.exp ./gdb/testsuite/gdb.dwarf2/implref-const.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-const.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-const.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,118 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
+# The referenced value is a DW_AT_const_value.
+
+if [skip_cplus_tests] {
+    continue
+}
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+    return 0
+}
+
+# We'll place the output of Dwarf::assemble in implref-const.S.
+standard_testfile main.c .S
+
+# ${testfile} is now "implref-const".  srcfile2 is "implref-const.S".
+set executable ${testfile}
+set asm_file [standard_output_file ${srcfile2}]
+
+# We need to know the size of integer and address types in order
+# to write some of the debugging info we'd like to generate.
+#
+# For that, we ask GDB by debugging our implref-const program.
+# Any program would do, but since we already have implref-const
+# specifically for this testcase, might as well use that.
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
+    return -1
+}
+
+# Create the DWARF.  We need a regular variable and a reference to it that'll
+# be marked with DW_OP_GNU_implicit_pointer.
+Dwarf::assemble ${asm_file} {
+    global srcdir subdir srcfile
+
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C_plus_plus}
+	} {
+	    declare_labels int_label const_label variable_label ref_label
+	    set int_size [get_sizeof "int" -1]
+
+	    # gdb always assumes references are implemented as pointers.
+	    set addr_size [get_sizeof "void *" -1]
+	    set var_value 42
+
+	    int_label: DW_TAG_base_type {
+		{DW_AT_byte_size ${int_size} DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_signed}
+		{DW_AT_name "int"}
+	    }
+
+	    ref_label: DW_TAG_reference_type {
+		{DW_AT_byte_size ${addr_size} DW_FORM_udata}
+		{DW_AT_type :${int_label}}
+	    }
+
+	    const_label: DW_TAG_const_type {
+		{DW_AT_type :${ref_label}}
+	    }
+
+	    DW_TAG_subprogram {
+		{MACRO_AT_func { "main" "${srcdir}/${subdir}/${srcfile}" }}
+		{DW_AT_type :${int_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+	    } {
+		variable_label: DW_TAG_variable {
+		    {DW_AT_name "var"}
+		    {DW_AT_type :${int_label}}
+		    {DW_AT_const_value ${var_value} DW_FORM_udata}
+		}
+
+		DW_TAG_variable {
+		    {DW_AT_name "ref"}
+		    {DW_AT_type :${const_label}}
+		    {DW_AT_location {DW_OP_GNU_implicit_pointer ${variable_label} 0} SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] {
+    return -1
+}
+
+# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
+if ![runto_main] {
+    return -1
+}
+
+# Doing 'print ref' should show us e.g. '(int &) <synthetic pointer>: 42'.
+gdb_test "print ref" " = \\(int &\\) <synthetic pointer>: \\\d+"
+
+# The variable isn't located in memory, thus we can't take its address.
+gdb_test "print &var" "Can't take address of \"var\" which isn't an lvalue."
+gdb_test "print &ref" "Attempt to take address of value not located in memory."
+
+# gdb assumes C++ references are implemented as pointers, and print &(&ref)
+# shows us the underlying pointer's address.
+# Since in this case there's no physical pointer, gdb should tell us so.
+gdb_test "print &(&ref)" "Attempt to take address of value not located in memory."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-global.c ./gdb/testsuite/gdb.dwarf2/implref-global.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-global.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-global.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Test program for synthetic C++ references to global variables.  */
+
+int global_var = 42;
+
+int
+main (void)
+{
+  asm ("main_label: .globl main_label");
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-global.exp ./gdb/testsuite/gdb.dwarf2/implref-global.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-global.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-global.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,124 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
+# The referenced value is a global variable whose location is a DW_OP_addr.
+
+if [skip_cplus_tests] {
+    continue
+}
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+    return 0
+}
+
+# We'll place the output of Dwarf::assemble in implref-global.S.
+standard_testfile .c .S
+
+# ${testfile} is now "implref-global".  srcfile2 is "implref-global.S".
+set executable ${testfile}
+set asm_file [standard_output_file ${srcfile2}]
+
+# We need to know the size of integer and address types in order
+# to write some of the debugging info we'd like to generate.
+#
+# For that, we ask GDB by debugging our implref-global program.
+# Any program would do, but since we already have implref-global
+# specifically for this testcase, might as well use that.
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
+    return -1
+}
+
+# Create the DWARF.  We need a regular variable and a reference to it that'll
+# be marked with DW_OP_GNU_implicit_pointer.  The variable must be global so
+# that its name is an exported symbol that we can reference from the DWARF
+# using gdb_target_symbol.
+Dwarf::assemble ${asm_file} {
+    global srcdir subdir srcfile
+
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C_plus_plus}
+	} {
+	    declare_labels int_label variable_label ref_label
+	    set int_size [get_sizeof "int" -1]
+
+	    # gdb always assumes references are implemented as pointers.
+	    set addr_size [get_sizeof "void *" -1]
+
+	    int_label: DW_TAG_base_type {
+		{DW_AT_byte_size ${int_size} DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_signed}
+		{DW_AT_name "int"}
+	    }
+
+	    ref_label: DW_TAG_reference_type {
+		{DW_AT_byte_size ${addr_size} DW_FORM_udata}
+		{DW_AT_type :${int_label}}
+	    }
+
+	    variable_label: DW_TAG_variable {
+		{DW_AT_name "global_var"}
+		{DW_AT_type :${int_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+		{DW_AT_location {DW_OP_addr [gdb_target_symbol "global_var"]} SPECIAL_expr}
+	    }
+
+	    DW_TAG_subprogram {
+		{MACRO_AT_func { "main" "${srcdir}/${subdir}/${srcfile}" }}
+		{DW_AT_type :${int_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+	    } {
+		DW_TAG_variable {
+		    {DW_AT_name "ref"}
+		    {DW_AT_type :${ref_label}}
+		    {DW_AT_location {DW_OP_GNU_implicit_pointer ${variable_label} 0} SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] {
+    return -1
+}
+
+# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
+if ![runto_main] {
+    return -1
+}
+
+# Address of the referenced value.
+set address [get_hexadecimal_valueof "&global_var" ""]
+
+# Doing 'print ref' should show us e.g. '(int &) @0xdeadbeef: 42'.
+gdb_test "print ref" " = \\(int &\\) @${address}: \\\d+"
+
+# Doing 'print &ref' should show us e.g. '(int *) 0xdeadbeef <global_var>'.
+gdb_test "print &ref" " = \\(int \\*\\) ${address} <global_var>"
+
+# gdb assumes C++ references are implemented as pointers, and print &(&ref)
+# shows us the underlying pointer's address.  Since in this case there's no
+# physical pointer, gdb should tell us so.
+gdb_test "print &(&ref)" "Attempt to take address of value not located in memory."
+
+# Test assignment through the synthetic reference.
+set new_value 10
+gdb_test_no_output "set (ref = ${new_value})"
+gdb_test "print ref" " = \\(int &\\) @${address}: ${new_value}" "print ref after assignment"
+gdb_test "print global_var" " = ${new_value}" "print global_var after assignment"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-struct.c ./gdb/testsuite/gdb.dwarf2/implref-struct.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-struct.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-struct.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Test program for synthetic C++ references to structs.  */
+
+struct S {
+  int a;
+  int b;
+  int c;
+};
+
+struct S s1 = {
+  0,
+  1,
+  2
+};
+
+struct S s2 = {
+  10,
+  11,
+  12
+};
+
+int
+main (void)
+{
+  asm ("main_label: .globl main_label");
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-struct.exp ./gdb/testsuite/gdb.dwarf2/implref-struct.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/implref-struct.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/implref-struct.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,185 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
+# The referenced value is a global struct whose location is a DW_OP_addr.
+
+if [skip_cplus_tests] {
+    continue
+}
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+    return 0
+}
+
+# We'll place the output of Dwarf::assemble in implref-struct.S.
+standard_testfile .c .S
+
+# ${testfile} is now "implref-struct".  srcfile2 is "implref-struct.S".
+set executable ${testfile}
+set asm_file [standard_output_file ${srcfile2}]
+
+# We need to know the size of integer and address types in order
+# to write some of the debugging info we'd like to generate.
+#
+# For that, we ask GDB by debugging our implref-struct program.
+# Any program would do, but since we already have implref-struct
+# specifically for this testcase, might as well use that.
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] {
+    return -1
+}
+
+# Create the DWARF.  We need a regular variable for the struct and a reference
+# to it that'll be marked with DW_OP_GNU_implicit_pointer. The variable must be
+# global so that its name is an exported symbol that can we can reference from
+# the DWARF using gdb_target_symbol.
+Dwarf::assemble ${asm_file} {
+    global srcdir subdir srcfile
+
+    cu {} {
+	DW_TAG_compile_unit {
+	    {DW_AT_language @DW_LANG_C_plus_plus}
+	} {
+	    declare_labels int_label struct_label variable_label ref_label
+	    set int_size [get_sizeof "int" -1]
+
+	    # gdb always assumes references are implemented as pointers.
+	    set addr_size [get_sizeof "void *" -1]
+	    set S_size [get_sizeof "S" -1]
+
+	    # The compiler shouldn't introduce structure padding here.
+	    set b_offset 4
+	    set c_offset 8
+
+	    int_label: DW_TAG_base_type {
+		{DW_AT_byte_size ${int_size} DW_FORM_udata}
+		{DW_AT_encoding @DW_ATE_signed}
+		{DW_AT_name "int"}
+	    }
+
+	    struct_label: DW_TAG_structure_type {
+		{DW_AT_name "S"}
+		{DW_AT_byte_size ${S_size} DW_FORM_udata}
+	    } {
+		DW_TAG_member {
+		    {DW_AT_name "a"}
+		    {DW_AT_type :${int_label}}
+		    {DW_AT_data_member_location 0 DW_FORM_udata}
+		}
+
+		DW_TAG_member {
+		    {DW_AT_name "b"}
+		    {DW_AT_type :${int_label}}
+		    {DW_AT_data_member_location ${b_offset} DW_FORM_udata}
+		}
+
+		DW_TAG_member {
+		    {DW_AT_name "c"}
+		    {DW_AT_type :${int_label}}
+		    {DW_AT_data_member_location ${c_offset} DW_FORM_udata}
+		}
+	    }
+
+	    ref_label: DW_TAG_reference_type {
+		{DW_AT_byte_size ${addr_size} DW_FORM_udata}
+		{DW_AT_type :${struct_label}}
+	    }
+
+	    variable_label: DW_TAG_variable {
+		{DW_AT_name "s1"}
+		{DW_AT_type :${struct_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+		{DW_AT_location {DW_OP_addr [gdb_target_symbol "s1"]} SPECIAL_expr}
+	    }
+
+	    DW_TAG_variable {
+		{DW_AT_name "s2"}
+		{DW_AT_type :${struct_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+		{DW_AT_location {DW_OP_addr [gdb_target_symbol "s2"]} SPECIAL_expr}
+	    }
+
+	    DW_TAG_subprogram {
+		{MACRO_AT_func { "main" "${srcdir}/${subdir}/${srcfile}" }}
+		{DW_AT_type :${int_label}}
+		{DW_AT_external 1 DW_FORM_flag}
+	    } {
+	        DW_TAG_variable {
+		    {DW_AT_name "ref"}
+		    {DW_AT_type :${ref_label}}
+		    {DW_AT_location {DW_OP_GNU_implicit_pointer ${variable_label} 0} SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] {
+    return -1
+}
+
+# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
+if ![runto_main] {
+    return -1
+}
+
+# Returns the struct members, e.g. '{a = 0, b = 1, c = 2}'.
+proc get_members {var} {
+    set members [get_valueof "" ${var} ""]
+
+    # Trim leading/trailing whitespace, '{' and '}' since they confuse TCL to no end.
+    set members [string trim ${members}]
+    set members [string trim ${members} "{}"]
+
+    return ${members}
+}
+
+# Values of the struct members.
+set s1_members [get_members "s1"]
+set s2_members [get_members "s2"]
+
+# Address of the referenced value.
+set address [get_hexadecimal_valueof "&s1" ""]
+
+# Test printing with both 'set print object off' and 'on', just to make sure
+# the output doesn't change.
+foreach_with_prefix print-object {"off" "on"} {
+    gdb_test_no_output "set print object ${print-object}"
+
+    # Doing 'print ref' should show us e.g.
+    # '(S &) @0xdeadbeef: {a = 0, b = 1, c = 2}'.
+    gdb_test "print ref" " = \\(S &\\) @${address}: \\{${s1_members}\\}"
+
+    # Doing 'print &ref' should show us e.g. '(S *) 0xdeadbeef <s1>'.
+    gdb_test "print &ref" " = \\(S \\*\\) ${address} <s1>"
+
+    # gdb assumes C++ references are implemented as pointers, and
+    # print &(&ref) shows us the underlying pointer's address.
+    # Since in this case there's no physical pointer, gdb should tell us so.
+    gdb_test "print &(&ref)" "Attempt to take address of value not located in memory."
+}
+
+# Test assignment through the synthetic reference.
+gdb_test_no_output "set (ref = s2)"
+
+foreach_with_prefix print-object {"off" "on"} {
+    gdb_test_no_output "set print object ${print-object}"
+
+    gdb_test "print ref" " = \\(S &\\) @${address}: \\{${s2_members}\\}" "print ref after assignment"
+    gdb_test "print s1" " = \\{${s2_members}\\}" "print s1 after assignment"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/mac-fileno.exp ./gdb/testsuite/gdb.dwarf2/mac-fileno.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/mac-fileno.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/mac-fileno.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if {[prepare_for_testing_full $testfile.exp \
+if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/mac-fileno.S ./gdb/testsuite/gdb.dwarf2/mac-fileno.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/mac-fileno.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/mac-fileno.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main.c ./gdb/testsuite/gdb.dwarf2/main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main-subprogram.c ./gdb/testsuite/gdb.dwarf2/main-subprogram.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main-subprogram.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/main-subprogram.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+mymain ()
+{
+  asm ("mymain_label: .globl mymain_label");
+  return 0;
+}
+
+int
+main()
+{
+  return mymain ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main-subprogram.exp ./gdb/testsuite/gdb.dwarf2/main-subprogram.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/main-subprogram.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/main-subprogram.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,73 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-4 and use gas.
+if {![dwarf2_support]} {
+    return 0
+}
+
+standard_testfile main-subprogram.c enum-type-dw.S
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+    global srcdir subdir srcfile
+
+    set range [function_range mymain ${srcdir}/${subdir}/${srcfile}]
+    set mymain_start [lindex $range 0]
+    set mymain_length [lindex $range 1]
+
+    cu {} {
+	DW_TAG_compile_unit {
+                {DW_AT_language @DW_LANG_C}
+                {DW_AT_name     main-subprogram.c}
+                {DW_AT_comp_dir /tmp}
+        } {
+	    declare_labels type
+
+            type: DW_TAG_base_type {
+                {DW_AT_byte_size 4 DW_FORM_sdata}
+                {DW_AT_encoding  @DW_ATE_signed}
+                {DW_AT_name      int}
+            }
+
+	    DW_TAG_subprogram {
+		{name mymain}
+		{low_pc $mymain_start addr}
+                {high_pc "$mymain_start + $mymain_length" addr}
+		{type :$type}
+		{DW_AT_main_subprogram 1 flag}
+	    } {
+	    }
+	}
+    }
+}
+
+if {[prepare_for_testing "failed to prepare" ${testfile} \
+	 [list $srcfile $asm_file] {nodebug}]} {
+    return -1
+}
+
+# Test that the "start" command stops in the "mymain" function.
+# This should happen because we used DW_AT_main_subprogram to tell gdb
+# that this was the real "main".
+
+if {[gdb_start_cmd] < 0} {
+    untested "could not start ${testfile}"
+    return -1
+}
+
+gdb_test "" "Temporary breakpoint .* mymain.*" "stopped at mymain"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/Makefile.in ./gdb/testsuite/gdb.dwarf2/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-# Makefile for regression testing the GNU debugger.
-# Copyright 1992-2015 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# GDB is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-
-# GDB is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = *.x pr10770 dw2-cp-infcall-ref-static dw2-inline-param \
-	dw2-noloc dw2-ranges dw2-ref-missing-frame dw2-unresolved gdb-index \
-	dwp-symlink
-
-MISCELLANEOUS = \
-	dwp-symlink.dwp dwp-symlink-thelink dwp-symlink-thelink.dwp \
-	dwp-dir1 dwp-dir2 dwp-dir3
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out *.x *.ci *.tmp
-	-rm -f core core.coremaker coremaker.core corefile
-	-rm -f *.dwo *.dwp
-	-rm -f $(EXECUTABLES)
-	-rm -rf $(MISCELLANEOUS)
-	-rm -f *.gdb-index *.with-index
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp ./gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.S ./gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/method-ptr.cc ./gdb/testsuite/gdb.dwarf2/method-ptr.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/method-ptr.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/method-ptr.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/method-ptr.exp ./gdb/testsuite/gdb.dwarf2/method-ptr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/method-ptr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/method-ptr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp ./gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/missing-sig-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/nonvar-access.exp ./gdb/testsuite/gdb.dwarf2/nonvar-access.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/nonvar-access.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/nonvar-access.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,208 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test accessing "non-variable" variables, i.e., variables which are
+# optimized to a constant DWARF location expression and/or
+# partially/fully optimized out.
+
+load_lib dwarf.exp
+
+if {![dwarf2_support]} { return 0 }
+
+standard_testfile main.c nonvar-access-dw.S
+
+# Make some DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+
+Dwarf::assemble $asm_file {
+    cu {} {
+	compile_unit {
+	    {DW_AT_name main.c}
+	} {
+	    declare_labels int_type_label char_type_label \
+		struct_s_label struct_t_label array_a9_label \
+		char_ptr_label implicit_a_label
+
+	    int_type_label: base_type {
+		{name "int"}
+		{encoding @DW_ATE_signed}
+		{byte_size 4 DW_FORM_sdata}
+	    }
+	    char_type_label: base_type {
+		{name "char"}
+		{encoding @DW_ATE_unsigned}
+		{byte_size 1 DW_FORM_sdata}
+	    }
+	    char_ptr_label: pointer_type {
+		{type :$char_type_label}
+	    }
+
+	    struct_s_label: structure_type {
+		{name s}
+		{byte_size 4 DW_FORM_sdata}
+	    } {
+		member {
+		    {name a}
+		    {type :$int_type_label}
+		    {data_member_location 0 DW_FORM_udata}
+		    {bit_size 8 DW_FORM_udata}
+		}
+		member {
+		    {name b}
+		    {type :$int_type_label}
+		    {data_bit_offset 8 DW_FORM_udata}
+		    {bit_size 24 DW_FORM_udata}
+		}
+	    }
+
+	    struct_t_label: structure_type {
+		{name t}
+		{byte_size 4 DW_FORM_sdata}
+	    } {
+		member {
+		    {name a}
+		    {type :$int_type_label}
+		    {data_member_location 0 DW_FORM_udata}
+		    {bit_size 9 DW_FORM_udata}
+		}
+		member {
+		    {name b}
+		    {type :$int_type_label}
+		    {data_bit_offset 9 DW_FORM_udata}
+		    {bit_size 23 DW_FORM_udata}
+		}
+	    }
+
+	    array_a9_label: array_type {
+		{type :$char_type_label}
+	    } {
+		subrange_type {
+		    {type :$int_type_label}
+		    {upper_bound 8 DW_FORM_udata}
+		}
+	    }
+
+	    DW_TAG_subprogram {
+		{name main}
+		{DW_AT_external 1 flag}
+		{low_pc [gdb_target_symbol main] DW_FORM_addr}
+		{high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
+	    } {
+		# Simple variable without location.
+		DW_TAG_variable {
+		    {name undef_int}
+		    {type :$int_type_label}
+		}
+		# Struct variable without location.
+		DW_TAG_variable {
+		    {name undef_s}
+		    {type :$struct_s_label}
+		}
+		# Composite location: byte-aligned pieces.
+		DW_TAG_variable {
+		    {name def_s}
+		    {type :$struct_s_label}
+		    {location {
+			const1u 0
+			stack_value
+			bit_piece 8 0
+			const1s -1
+			stack_value
+			bit_piece 24 0
+		    } SPECIAL_expr}
+		}
+		# Composite location: non-byte-aligned pieces.
+		DW_TAG_variable {
+		    {name def_t}
+		    {type :$struct_t_label}
+		    {location {
+			const1u 0
+			stack_value
+			bit_piece 9 0
+			const1s -1
+			stack_value
+			bit_piece 23 0
+		    } SPECIAL_expr}
+		}
+		# Implicit location: immediate value.
+		DW_TAG_variable {
+		    {name def_implicit_s}
+		    {type :$struct_s_label}
+		    {location {
+			implicit_value 0x12 0x34 0x56 0x78
+		    } SPECIAL_expr}
+		}
+		# Implicit location: immediate value for whole array, with
+		# excess bytes.
+		implicit_a_label: DW_TAG_variable {
+		    {name def_implicit_a}
+		    {type :$array_a9_label}
+		    {location {
+			implicit_value 0x1 0x12 0x23 0x34 0x45 \
+			    0x56 0x67 0x78 0x89 0x9a 0xab
+		    } SPECIAL_expr}
+		}
+		# Implicit pointer into immediate value.
+		DW_TAG_variable {
+		    {name implicit_a_ptr}
+		    {type :$char_ptr_label}
+		    {location {
+			GNU_implicit_pointer $implicit_a_label 5
+		    } SPECIAL_expr}
+		}
+	    }
+	}
+    }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+# Determine endianness.
+set endian "little"
+gdb_test_multiple "show endian" "determine endianness" {
+    -re ".* (big|little) endian.*$gdb_prompt $" {
+	set endian $expect_out(1,string)
+	pass "endianness: $endian"
+    }
+}
+
+# Byte-aligned objects with simple location descriptions.
+switch $endian { big {set val 0x345678} little {set val 0x785634} }
+gdb_test "print/x def_implicit_s" " = \\{a = 0x12, b = $val\\}"
+gdb_test "print/x def_implicit_s.b" " = $val"
+gdb_test "print/x def_implicit_a" \
+    " = \\{0x1, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89\\}"
+gdb_test "print/x def_implicit_a\[5\]" " = 0x56"
+gdb_test "print/x *(char (*)\[5\]) implicit_a_ptr" \
+    " = \\{0x56, 0x67, 0x78, 0x89, 0x9a\\}"
+
+# Byte-aligned fields, pieced together from DWARF stack values.
+gdb_test "print def_s" " = \\{a = 0, b = -1\\}"
+
+# Non-byte-aligned fields, pieced together from DWARF stack values.
+gdb_test "print def_t" " = \\{a = 0, b = -1\\}"
+
+# Simple variable without location.
+gdb_test "print undef_int" " = <optimized out>"
+
+# Member of a structure without location.
+gdb_test "print undef_s.a" " = <optimized out>"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/nostaticblock.exp ./gdb/testsuite/gdb.dwarf2/nostaticblock.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/nostaticblock.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/nostaticblock.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup-2.c ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup-2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup-2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -188,7 +188,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if [prepare_for_testing ${testfile}.exp $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}] {
+if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}] {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.c ./gdb/testsuite/gdb.dwarf2/pieces.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.exp ./gdb/testsuite/gdb.dwarf2/pieces.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![is_x86_like_target]} {
 standard_testfile .S
 set csrcfile ${testfile}.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![is_x86_like_target]} {
 standard_testfile .S
 set csrcfile ${testfile}.c
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.S ./gdb/testsuite/gdb.dwarf2/pieces.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pieces.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pieces.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr10770.exp ./gdb/testsuite/gdb.dwarf2/pr10770.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr10770.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pr10770.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 standard_testfile
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr11465.exp ./gdb/testsuite/gdb.dwarf2/pr11465.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr11465.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pr11465.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr11465.S ./gdb/testsuite/gdb.dwarf2/pr11465.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr11465.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pr11465.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2010-2015 Free Software Foundation, Inc.
+/* Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr13961.exp ./gdb/testsuite/gdb.dwarf2/pr13961.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr13961.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pr13961.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,9 +22,13 @@ if {![dwarf2_support]} {
     return 0
 }
 
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
+
 standard_testfile .S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+	${additional_flags}] == -1 } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr13961.S ./gdb/testsuite/gdb.dwarf2/pr13961.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/pr13961.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/pr13961.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -37,6 +37,15 @@
    further hand-edited to support that.
 */
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
 	.file	"pr13961.cc"
 
 	.globl	baz
@@ -55,13 +64,13 @@ baz:
 
 	.text
 .Ltext0:
-	.globl	main
-	.type	main, %function
-main:
+	.globl	SYMBOL(main)
+	.type	SYMBOL(main), %function
+SYMBOL(main):
 .LFB0:
 	.4byte 0
 .LFE0:
-	.size	main, .-main
+	.size	SYMBOL(main), .-SYMBOL(main)
 .Letext0:
 
 	.section	.debug_types,"",%progbits
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/staticvirtual.exp ./gdb/testsuite/gdb.dwarf2/staticvirtual.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/staticvirtual.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/staticvirtual.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,10 +45,15 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
 
 # gdb/18021: The test below would cause GDB to crash.
-gdb_test "p S::~S" "0x1000"
+# Depending on whether the target maps memory at address 0x1000,
+# on success this may either print something like
+#   $1 = {void (void)} 0x1000 <.*>
+# or
+#   Cannot access memory at address 0x1000
+gdb_test "p S::~S" "0x1000.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/subrange.exp ./gdb/testsuite/gdb.dwarf2/subrange.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/subrange.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/subrange.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/symtab-producer.exp ./gdb/testsuite/gdb.dwarf2/symtab-producer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/symtab-producer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/symtab-producer.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ Dwarf::assemble $asm_file {
 set saved_gdbflags $GDBFLAGS
 set GDBFLAGS "$GDBFLAGS -readnow"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
     set GDBFLAGS $saved_gdbflags
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/trace-crash.exp ./gdb/testsuite/gdb.dwarf2/trace-crash.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/trace-crash.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/trace-crash.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {![istarget x86_64-*] || ![is_lp64_ta
 
 standard_testfile .S
 
-if {[prepare_for_testing "${testfile}.exp" "${testfile}" ${testfile}.S \
+if {[prepare_for_testing "failed to prepare" "${testfile}" ${testfile}.S \
 	 nodebug]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S ./gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf.exp ./gdb/testsuite/gdb.dwarf2/typeddwarf.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/typeddwarf.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if { [is_x86_like_target] } {
     return 0
 }
 
-if { [prepare_for_testing "${test}.exp" "${test}" ${sfile} {nodebug additional_flags=-nostdlib}] } {
+if { [prepare_for_testing "failed to prepare" "${test}" ${sfile} {nodebug additional_flags=-nostdlib}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf.S ./gdb/testsuite/gdb.dwarf2/typeddwarf.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/typeddwarf.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/typeddwarf.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/valop.exp ./gdb/testsuite/gdb.dwarf2/valop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/valop.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/valop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if {![is_x86_like_target]} {
 
 standard_testfile .S
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile] [list {additional_flags=-nostdlib}]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/valop.S ./gdb/testsuite/gdb.dwarf2/valop.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/valop.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/valop.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst2.c ./gdb/testsuite/gdb.dwarf2/watch-notconst2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/watch-notconst2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst2.S ./gdb/testsuite/gdb.dwarf2/watch-notconst2.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst2.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/watch-notconst2.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst.c ./gdb/testsuite/gdb.dwarf2/watch-notconst.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/watch-notconst.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst.exp ./gdb/testsuite/gdb.dwarf2/watch-notconst.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.dwarf2/watch-notconst.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.dwarf2/watch-notconst.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if { ![is_x86_like_target] } {
     return 0
 }
 
-if { [prepare_for_testing "${test}.exp" "${test}" \
+if { [prepare_for_testing "failed to prepare" "${test}" \
       {watch-notconst.c watch-notconst2.S} {nodebug}] } {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/array-element.exp ./gdb/testsuite/gdb.fortran/array-element.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/array-element.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/array-element.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if { [skip_fortran_tests] } { return -1 
 
 standard_testfile .f
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/array-element.f ./gdb/testsuite/gdb.fortran/array-element.f
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/array-element.f	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/array-element.f	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-c Copyright 2005-2015 Free Software Foundation, Inc.
+c Copyright 2005-2017 Free Software Foundation, Inc.
 
 c This program is free software; you can redistribute it and/or modify
 c it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/charset.exp ./gdb/testsuite/gdb.fortran/charset.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/charset.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/charset.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 if { [skip_fortran_tests] } { return -1 }
 
 standard_testfile .f90
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug additional_flags=-fbackslash f90}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug additional_flags=-fbackslash f90}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/common-block.exp ./gdb/testsuite/gdb.fortran/common-block.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/common-block.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/common-block.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,8 +21,9 @@ if {[skip_fortran_tests]} {
 }
 
 standard_testfile .f90
+load_lib "fortran.exp"
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 $srcfile {debug f90 quiet}]} {
     return -1
 }
@@ -42,9 +43,10 @@ gdb_continue_to_breakpoint "stop-here-ou
 #set suffix "_"
 set suffix ""
 
-set int4 {(integer\(kind=4\)|INTEGER\(4\))}
-set real4 {(real\(kind=4\)|REAL\(4\))}
-set real8 {(real\(kind=8\)|REAL\(8\))}
+# Depending on the compiler being used, the type names can be printed differently.
+set int4 [fortran_int4]
+set real4 [fortran_real4]
+set real8 [fortran_real8]
 
 gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context."
 gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/common-block.f90 ./gdb/testsuite/gdb.fortran/common-block.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/common-block.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/common-block.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2008-2015 Free Software Foundation, Inc.
+! Copyright 2008-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/complex.exp ./gdb/testsuite/gdb.fortran/complex.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/complex.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/complex.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
 
 standard_testfile .f
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 quiet}]} {
-    untested "Couldn't compile ${srcfile}"
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/complex.f ./gdb/testsuite/gdb.fortran/complex.f
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/complex.f	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/complex.f	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-c Copyright 2007-2015 Free Software Foundation, Inc.
+c Copyright 2007-2017 Free Software Foundation, Inc.
 
 c This program is free software; you can redistribute it and/or modify
 c it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type.exp ./gdb/testsuite/gdb.fortran/derived-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,8 +21,9 @@
 if { [skip_fortran_tests] } { return -1 }
 
 standard_testfile .f90
+load_lib "fortran.exp"
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
     return -1
 }
 
@@ -31,20 +32,18 @@ if ![runto MAIN__] then {
     continue
 }
 
-# Depending on the compiler version being used, the name of the 4-byte integer
-# and real types can be printed differently.  For instance, gfortran-4.1 uses
-# "int4" whereas gfortran-4.3 uses "int(kind=4)".
-set int4 "(int4|integer\\(kind=4\\))"
-set real4 "(real4|real\\(kind=4\\))"
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
+set real [fortran_real4]
 
-gdb_test "ptype p" "type = Type bar\r\n *${int4} :: c\r\n *${real4} :: d\r\n *End Type bar"
+gdb_test "ptype p" "type = Type bar\r\n *$int :: c\r\n *$real :: d\r\n *End Type bar"
 
 set test "type-printing for derived type"
 gdb_test_multiple "ptype q" $test {
-    -re "type = Type foo\r\n *${real4} :: a\r\n *Type bar\r\n *${int4} :: c\r\n *${real4} :: d\r\n *End Type bar :: x\r\n *character\\*7 :: b\r\n *End Type foo\r\n$gdb_prompt $" {
+    -re "type = Type foo\r\n *$real :: a\r\n *Type bar :: x\r\n *character\\*7 :: b\r\n *End Type foo\r\n$gdb_prompt $" {
 	pass $test
     }
-    -re "type = Type foo\r\n *${real4} :: a\r\n *Type bar\r\n *${int4} :: c\r\n *${real4} :: d\r\n *End Type bar :: x\r\n *character :: b\\(7\\)\r\n *End Type foo\r\n$gdb_prompt $" {
+    -re "type = Type foo\r\n *$real :: a\r\n *Type bar :: x\r\n *character :: b\\(7\\)\r\n *End Type foo\r\n$gdb_prompt $" {
 	# Compiler should produce string, not an array of characters.
 	setup_xfail "*-*-*"
 	fail $test
@@ -54,7 +53,7 @@ gdb_test_multiple "ptype q" $test {
 gdb_breakpoint [gdb_get_line_number "print"]
 gdb_continue_to_breakpoint "print"
 
-gdb_test "print p" "\\$\[0-9\]+ = \\( 1, 2\\.375 \\)"
+gdb_test "print p" "\\$\[0-9\]+ = \\( c = 1, d = 2\\.375 \\)"
 gdb_test "print p%c" "\\$\[0-9\]+ = 1"
 gdb_test "print p%d" "\\$\[0-9\]+ = 2\\.375"
 gdb_test "print q%a" "\\$\[0-9\]+ = 3\\.125"
@@ -74,14 +73,45 @@ gdb_test_multiple $test $test {
 gdb_test "print q%x%c" "\\$\[0-9\]+ = 1"
 gdb_test "print q%x%d" "\\$\[0-9\]+ = 2\\.375"
 
+set result_line "= \\( a = 3.125, x = \\( c = 1, d = 2\\.375 \\),\
+b = 'abcdefg' \\)\r\n$gdb_prompt $"
+
+# Used in case compiler generates an array of characters.
+set result_line_2 " = \\( a = 3.125, x = \\( 1, 2\\.375 \\),\
+b = \\('abcdefg'\\) \\)\r\n$gdb_prompt $"
+
 set test "print q"
 gdb_test_multiple $test $test {
-    -re "\\$\[0-9\]+ = \\( 3.125, \\( 1, 2\\.375 \\), 'abcdefg' \\)\r\n$gdb_prompt $" {
+    -re $result_line {
 	pass $test
     }
-    -re "\\$\[0-9\]+ = \\( 3.125, \\( 1, 2\\.375 \\), \\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\) \\)\r\n$gdb_prompt $" {
+    -re $result_line_2 {
 	# Compiler should produce string, not an array of characters.
 	setup_xfail "*-*-*"
 	fail $test
     }
 }
+
+gdb_test "print this%a" " = 3\\.125"
+
+set test "print this%b"
+gdb_test_multiple $test $test {
+    -re " = 'abcdefg'\r\n$gdb_prompt $" {
+        pass $test
+    }
+    -re $result_line_2 {
+        setup_xfail "*-*-*"
+        fail $test
+    }
+}
+
+set test "print this"
+gdb_test_multiple $test $test {
+    -re $result_line {
+        pass $test
+    }
+    -re $result_line_2 {
+         setup_xfail "*-*-*"
+         fail $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type.f90 ./gdb/testsuite/gdb.fortran/derived-type.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/derived-type.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2006-2015 Free Software Foundation, Inc.
+! Copyright 2006-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
@@ -29,12 +29,17 @@ program main
   end type foo
   type(foo) :: q
   type(bar) :: p
+  type(foo) :: this
 
   p = bar(1, 2.375)
   q%a = 3.125
   q%b = "abcdefg"
   q%x%c = 1
   q%x%d = 2.375
-  print *,p,q 
+  this%a = 3.125
+  this%b = "abcdefg"
+  this%x%c = 1
+  this%x%d = 2.375
+  print *,p,q,this
 
 end program main
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type-function.exp ./gdb/testsuite/gdb.fortran/derived-type-function.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type-function.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/derived-type-function.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,38 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file was contributed by Walfred Tedeschi (walfred.tedeschi@intel.com).
+
+# This file is part of the gdb testsuite.  It contains tests for type-printing
+# and value-printing Fortran derived types having also functions.
+
+if { [skip_fortran_tests] } { return -1 }
+
+standard_testfile .f90
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
+    return -1
+}
+
+if ![runto MAIN__] then {
+    perror "couldn't run to breakpoint MAIN__"
+    continue
+}
+
+gdb_breakpoint [gdb_get_line_number "bp"]
+gdb_continue_to_breakpoint "bp"
+
+gdb_test "print aRec" "= \\( a = 2, b = 3 \\)"\
+"Print rectangle structure with members' name"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type-function.f90 ./gdb/testsuite/gdb.fortran/derived-type-function.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/derived-type-function.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/derived-type-function.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,62 @@
+! Copyright 2016-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+!
+! This file is the Fortran source file for derived-type-function.exp.
+! It was contributed by Walfred Tedeschi (walfred.tedeschi@intel.com).
+
+module class_Rectangle
+  implicit none
+  private
+
+  type, public :: Rectangle
+     real :: a
+     real :: b
+   contains
+     procedure :: area => rectangle_area
+     procedure :: print_area => print_area
+  end type Rectangle
+contains
+
+  function rectangle_area (this) result (area)
+    class (Rectangle), intent (in) :: this
+
+    real :: area
+    area = this%a * this%b
+  end function rectangle_area
+
+  subroutine print_area (this)
+    class (Rectangle), intent (in) :: this
+    real :: area
+
+    area = this%area ()
+    print *, ' area = ', area
+  end subroutine print_area
+
+end module class_Rectangle
+
+
+program rectangle_Test
+  use class_Rectangle
+  implicit none
+
+  type (Rectangle) :: aRec
+  real areaE
+
+  aRec = Rectangle (2., 3.)
+  ! bp
+  call aRec%print_area
+
+end program rectangle_Test
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/exprs.exp ./gdb/testsuite/gdb.fortran/exprs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/exprs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/exprs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1994-2015 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module.exp ./gdb/testsuite/gdb.fortran/library-module.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/library-module.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if [get_compiler_info] {
 }
 
 if  { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
-    untested "Couldn't compile ${srclibfile}"
+    untested "failed to compile shared library"
     return -1
 }
 
@@ -33,13 +33,13 @@ if  { [gdb_compile_shlib "${srcdir}/${su
 # warnings on ignored $libfile abort the process.
 
 if  { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $testfile
 
-gdb_load_shlibs $libfile
+gdb_load_shlib $libfile
 
 if ![runto MAIN__] then {
     perror "couldn't run to breakpoint MAIN__"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module-lib.f90 ./gdb/testsuite/gdb.fortran/library-module-lib.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module-lib.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/library-module-lib.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2010-2015 Free Software Foundation, Inc.
+! Copyright 2010-2017 Free Software Foundation, Inc.
 ! 
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module-main.f90 ./gdb/testsuite/gdb.fortran/library-module-main.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/library-module-main.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/library-module-main.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2010-2015 Free Software Foundation, Inc.
+! Copyright 2010-2017 Free Software Foundation, Inc.
 ! 
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/logical.exp ./gdb/testsuite/gdb.fortran/logical.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/logical.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/logical.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 standard_testfile .f90
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 quiet}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/logical.f90 ./gdb/testsuite/gdb.fortran/logical.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/logical.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/logical.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2010-2015 Free Software Foundation, Inc.
+! Copyright 2010-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/Makefile.in ./gdb/testsuite/gdb.fortran/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,34 +0,0 @@
-# Makefile for regression testing the GNU debugger.
-# Copyright 1992-2015 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# GDB is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-
-# GDB is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = 
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/module.exp ./gdb/testsuite/gdb.fortran/module.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/module.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/module.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile .f90
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/module.f90 ./gdb/testsuite/gdb.fortran/module.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/module.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/module.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2009-2015 Free Software Foundation, Inc.
+! Copyright 2009-2017 Free Software Foundation, Inc.
 ! 
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/multi-dim.exp ./gdb/testsuite/gdb.fortran/multi-dim.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/multi-dim.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/multi-dim.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,9 @@
 if { [skip_fortran_tests] } { return -1 }
 
 standard_testfile .f90
+load_lib "fortran.exp"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug f90}] } {
     return -1
 }
 
@@ -29,10 +30,8 @@ if ![runto MAIN__] {
     continue
 }
 
-# Depending on the compiler version being used, the name of the 4-byte integer
-# and real types can be printed differently.  For instance, gfortran-4.1 uses
-# "int4" whereas gfortran-4.3 uses "int(kind=4)".
-set int4 "(int4|integer\\(kind=4\\))"
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
 
 gdb_breakpoint [gdb_get_line_number "break-static"]
 gdb_continue_to_breakpoint "break-static" ".*break-static.*"
@@ -69,7 +68,7 @@ gdb_test "print varbound(4)" \
     "print valid variable bound array element"
 
 gdb_test "ptype unbound" \
-    "type = $int4 \\(\\*\\)" \
+    "type = $int \\(\\*\\)" \
     "print type of unbound array"
 
 gdb_test "print unbound(4)" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/multi-dim.f90 ./gdb/testsuite/gdb.fortran/multi-dim.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/multi-dim.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/multi-dim.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2011-2015 Free Software Foundation, Inc.
+! Copyright 2011-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/nested-funcs.exp ./gdb/testsuite/gdb.fortran/nested-funcs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/nested-funcs.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/nested-funcs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,64 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This testcase is supposed to test DWARF static link which is usually
+# used together with nested functions.  
+
+if { [skip_fortran_tests] } { return -1 }
+
+standard_testfile .f90
+load_lib "fortran.exp"
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
+    return -1
+}
+
+if ![runto MAIN__] then {
+    perror "couldn't run to breakpoint MAIN__"
+    continue
+}
+
+# Test if we can access local and
+# non-local variables defined one level up.
+gdb_breakpoint [gdb_get_line_number "! BP_outer"]
+gdb_continue_to_breakpoint "! BP_outer" ".*! BP_outer"
+gdb_test "print index" "= 13" "print index at BP_outer"
+gdb_test "set index = 42"
+gdb_test "print index" "= 42" "print index at BP_outer, manipulated"
+gdb_test "print local_int" "= 19" "print local_int in outer function"
+
+# Non-local variable should be affected in one frame up as well.
+gdb_test "up"
+gdb_test "print index" "= 42" "print index at BP1, one frame up"
+
+# Test if we can access local and
+# non-local variables defined two level up.
+gdb_breakpoint [gdb_get_line_number "! BP_inner"]
+gdb_continue_to_breakpoint "! BP_inner" ".*! BP_inner"
+gdb_test "print index" "= 42" "print index at BP_inner"
+gdb_test "print v_state%code" "= 61" "print v_state%code at BP_inner"
+gdb_test "print local_int" "= 17" "print local_int in inner function"
+
+# Test if local variable is still correct.
+gdb_breakpoint [gdb_get_line_number "! BP_outer_2"]
+gdb_continue_to_breakpoint "! BP_outer_2" ".*! BP_outer_2"
+gdb_test "print local_int" "= 19" \
+  "print local_int in outer function, after sub_nested_inner"
+
+# Sanity check in main.
+gdb_breakpoint [gdb_get_line_number "! BP_main"]
+gdb_continue_to_breakpoint "! BP_main" ".*! BP_main"
+gdb_test "print index" "= 42" "print index at BP_main"
+gdb_test "print v_state%code" "= 59" "print v_state%code at BP_main"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/nested-funcs.f90 ./gdb/testsuite/gdb.fortran/nested-funcs.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/nested-funcs.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/nested-funcs.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+! Copyright 2016-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+program TestNestedFuncs
+
+  IMPLICIT NONE
+
+  TYPE :: t_State
+    integer :: code
+  END TYPE t_State
+
+  TYPE (t_State) :: v_state
+  integer index
+
+  index = 13
+  CALL sub_nested_outer
+  index = 11              ! BP_main
+  v_state%code = 27
+
+CONTAINS
+
+  SUBROUTINE sub_nested_outer
+    integer local_int
+    local_int = 19
+    v_state%code = index + local_int   ! BP_outer
+    call sub_nested_inner
+    local_int = 22                     ! BP_outer_2
+    RETURN
+  END SUBROUTINE sub_nested_outer
+
+  SUBROUTINE sub_nested_inner
+    integer local_int
+    local_int = 17
+    v_state%code = index + local_int   ! BP_inner
+    RETURN
+  END SUBROUTINE sub_nested_inner
+
+end program TestNestedFuncs
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/print-formatted.exp ./gdb/testsuite/gdb.fortran/print-formatted.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/print-formatted.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/print-formatted.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if { [skip_fortran_tests] } {
 
 standard_testfile .f90
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/print-formatted.f90 ./gdb/testsuite/gdb.fortran/print-formatted.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/print-formatted.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/print-formatted.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2014-2015 Free Software Foundation, Inc.
+! Copyright 2014-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/subarray.exp ./gdb/testsuite/gdb.fortran/subarray.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/subarray.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/subarray.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if { [skip_fortran_tests] } { return -1 
 
 standard_testfile .f
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/subarray.f ./gdb/testsuite/gdb.fortran/subarray.f
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/subarray.f	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/subarray.f	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-c Copyright 2005-2015 Free Software Foundation, Inc.
+c Copyright 2005-2017 Free Software Foundation, Inc.
 
 c This program is free software; you can redistribute it and/or modify
 c it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/type.f90 ./gdb/testsuite/gdb.fortran/type.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/type.f90	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/type.f90	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-! Copyright 2013-2015 Free Software Foundation, Inc.
+! Copyright 2013-2017 Free Software Foundation, Inc.
 !
 ! This program is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU General Public License as published by
@@ -21,8 +21,33 @@ program type
     real    :: t1_r
   end type t1
 
+  type :: t2
+    integer :: t2_i
+    type (t1) :: t1_n
+  end type t2
+
+  type :: t3
+    integer :: t3_i
+    type (t2) :: t2_n
+  end type t3
+
   type (t1) :: t1v
+  type (t2) :: t2v
+  type (t3), target :: t3v
+  type(t3), pointer :: t3p
+
+  nullify (t3p)
 
   t1v%t1_i = 42
-  t1v%t1_r = 42.24    ! bp1
+  t1v%t1_r = 42.24
+
+  t2v%t2_i = 2
+  t2v%t1_n%t1_i = 21
+  t3v%t3_i = 3
+  t3v%t2_n%t2_i = 32
+  t3v%t2_n%t1_n%t1_i = 321
+
+  t3p => t3v
+  nullify (t3p)    ! bp1
+
 end program type
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/types.exp ./gdb/testsuite/gdb.fortran/types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1994-2015 Free Software Foundation, Inc.
+# Copyright 1994-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp ./gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,65 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Check the association status of various types of VLA's
+# and pointer to VLA's.
+gdb_breakpoint [gdb_get_line_number "vla1-allocated"]
+gdb_continue_to_breakpoint "vla1-allocated"
+gdb_test "print l" " = \\.TRUE\\." \
+  "print vla1 allocation status (allocated)"
+
+gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
+gdb_continue_to_breakpoint "vla2-allocated"
+gdb_test "print l" " = \\.TRUE\\." \
+  "print vla2 allocation status (allocated)"
+
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print l" " = \\.TRUE\\." \
+  "print pvla associated status (associated)"
+
+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"]
+gdb_continue_to_breakpoint "pvla-re-associated"
+gdb_test "print l" " = \\.TRUE\\." \
+  "print pvla associated status (re-associated)"
+
+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
+gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "print l" " = \\.FALSE\\." \
+  "print pvla allocation status (deassociated)"
+
+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
+gdb_continue_to_breakpoint "vla1-deallocated"
+gdb_test "print l" " = \\.FALSE\\." \
+  "print vla1 allocation status (deallocated)"
+gdb_test "print vla1" " = <not allocated>" \
+  "print deallocated vla1"
+
+gdb_breakpoint [gdb_get_line_number "vla2-deallocated"]
+gdb_continue_to_breakpoint "vla2-deallocated"
+gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated"
+gdb_test "print vla2" " = <not allocated>" "print deallocated vla2"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-datatypes.exp ./gdb/testsuite/gdb.fortran/vla-datatypes.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-datatypes.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-datatypes.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,89 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile ".f90"
+load_lib "fortran.exp"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+# check that all fortran standard datatypes will be
+# handled correctly when using as VLA's
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
+set real [fortran_real4]
+set complex [fortran_complex4]
+set logical [fortran_logical4]
+
+gdb_breakpoint [gdb_get_line_number "vlas-allocated"]
+gdb_continue_to_breakpoint "vlas-allocated"
+gdb_test "next" " = allocated\\\(realvla\\\)" \
+  "next to allocation status of intvla"
+gdb_test "print l" " = \\.TRUE\\." "intvla allocated"
+gdb_test "next" " = allocated\\\(complexvla\\\)" \
+  "next to allocation status of realvla"
+gdb_test "print l" " = \\.TRUE\\." "realvla allocated"
+gdb_test "next" " = allocated\\\(logicalvla\\\)" \
+  "next to allocation status of complexvla"
+gdb_test "print l" " = \\.TRUE\\." "complexvla allocated"
+gdb_test "next" " = allocated\\\(charactervla\\\)" \
+  "next to allocation status of logicalvla"
+gdb_test "print l" " = \\.TRUE\\." "logicalvla allocated"
+gdb_test "next" "intvla\\\(:,:,:\\\) = 1" \
+  "next to allocation status of charactervla"
+gdb_test "print l" " = \\.TRUE\\." "charactervla allocated"
+
+gdb_breakpoint [gdb_get_line_number "vlas-initialized"]
+gdb_continue_to_breakpoint "vlas-initialized"
+gdb_test "ptype intvla" "type = $int \\\(11,22,33\\\)" \
+  "ptype intvla"
+gdb_test "ptype realvla" "type = $real \\\(11,22,33\\\)" \
+  "ptype realvla"
+gdb_test "ptype complexvla" "type = $complex \\\(11,22,33\\\)" \
+  "ptype complexvla"
+gdb_test "ptype logicalvla" "type = $logical \\\(11,22,33\\\)" \
+  "ptype logicalvla"
+gdb_test "ptype charactervla" "type = character\\\*1 \\\(11,22,33\\\)" \
+  "ptype charactervla"
+
+gdb_test "print intvla(5,5,5)" " = 1" "print intvla(5,5,5) (1st)"
+gdb_test "print realvla(5,5,5)" " = 3.14\\d+" \
+  "print realvla(5,5,5) (1st)"
+gdb_test "print complexvla(5,5,5)" " = \\\(2,-3\\\)" \
+  "print complexvla(5,5,5) (1st)"
+gdb_test "print logicalvla(5,5,5)" " = \\.TRUE\\." \
+  "print logicalvla(5,5,5) (1st)"
+gdb_test "print charactervla(5,5,5)" " = 'K'" \
+  "print charactervla(5,5,5) (1st)"
+
+gdb_breakpoint [gdb_get_line_number "vlas-modified"]
+gdb_continue_to_breakpoint "vlas-modified"
+gdb_test "print intvla(5,5,5)" " = 42" "print intvla(5,5,5) (2nd)"
+gdb_test "print realvla(5,5,5)" " = 4.13\\d+" \
+  "print realvla(5,5,5) (2nd)"
+gdb_test "print complexvla(5,5,5)" " = \\\(-3,2\\\)" \
+  "print complexvla(5,5,5) (2nd)"
+gdb_test "print logicalvla(5,5,5)" " = \\.FALSE\\." \
+  "print logicalvla(5,5,5) (2nd)"
+gdb_test "print charactervla(5,5,5)" " = 'X'" \
+  "print charactervla(5,5,5) (2nd)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-datatypes.f90 ./gdb/testsuite/gdb.fortran/vla-datatypes.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-datatypes.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-datatypes.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,51 @@
+! Copyright 2015-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+program vla_primitives
+  integer, allocatable    :: intvla(:, :, :)
+  real, allocatable       :: realvla(:, :, :)
+  complex, allocatable    :: complexvla(:, :, :)
+  logical, allocatable    :: logicalvla(:, :, :)
+  character, allocatable  :: charactervla(:, :, :)
+  logical                 :: l
+
+  allocate (intvla (11,22,33))
+  allocate (realvla (11,22,33))
+  allocate (complexvla (11,22,33))
+  allocate (logicalvla (11,22,33))
+  allocate (charactervla (11,22,33))
+
+  l = allocated(intvla)                   ! vlas-allocated
+  l = allocated(realvla)
+  l = allocated(complexvla)
+  l = allocated(logicalvla)
+  l = allocated(charactervla)
+
+  intvla(:,:,:) = 1
+  realvla(:,:,:) = 3.14
+  complexvla(:,:,:) = cmplx(2.0,-3.0)
+  logicalvla(:,:,:) = .TRUE.
+  charactervla(:,:,:) = char(75)
+
+  intvla(5,5,5) = 42                      ! vlas-initialized
+  realvla(5,5,5) = 4.13
+  complexvla(5,5,5) = cmplx(-3.0,2.0)
+  logicalvla(5,5,5) = .FALSE.
+  charactervla(5,5,5) = 'X'
+
+  ! dummy statement for bp
+  l = .FALSE.                             ! vlas-modified
+end program vla_primitives
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla.f90 ./gdb/testsuite/gdb.fortran/vla.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,57 @@
+! Copyright 2015-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+program vla
+  real, target, allocatable :: vla1 (:, :, :)
+  real, target, allocatable :: vla2 (:, :, :)
+  real, target, allocatable :: vla3 (:, :)
+  real, pointer :: pvla (:, :, :)
+  logical :: l
+  nullify(pvla)
+
+  allocate (vla1 (10,10,10))          ! vla1-init
+  l = allocated(vla1)
+
+  allocate (vla2 (1:7,42:50,13:35))   ! vla1-allocated
+  l = allocated(vla2)
+
+  vla1(:, :, :) = 1311                ! vla2-allocated
+  vla1(3, 6, 9) = 42
+  vla1(1, 3, 8) = 1001
+  vla1(6, 2, 7) = 13
+
+  vla2(:, :, :) = 1311                ! vla1-filled
+  vla2(5, 45, 20) = 42
+
+  pvla => vla1                        ! vla2-filled
+  l = associated(pvla)
+
+  pvla => vla2                        ! pvla-associated
+  l = associated(pvla)
+  pvla(5, 45, 20) = 1
+  pvla(7, 45, 14) = 2
+
+  pvla => null()                      ! pvla-re-associated
+  l = associated(pvla)
+
+  deallocate (vla1)                   ! pvla-deassociated
+  l = allocated(vla1)
+
+  deallocate (vla2)                   ! vla1-deallocated
+  l = allocated(vla2)
+
+  allocate (vla3 (2,2))               ! vla2-deallocated
+  vla3(:,:) = 13
+end program vla
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-history.exp ./gdb/testsuite/gdb.fortran/vla-history.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-history.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-history.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Set some breakpoints and print complete vla.
+gdb_breakpoint [gdb_get_line_number "vla1-init"]
+gdb_continue_to_breakpoint "vla1-init"
+gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
+
+gdb_breakpoint [gdb_get_line_number "vla1-filled"]
+gdb_continue_to_breakpoint "vla1-filled"
+with_timeout_factor 2 {
+    gdb_test "print vla1" \
+      " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" \
+      "print vla1 filled"
+}
+
+# Try to access history values for full vla prints.
+gdb_test "print \$1" " = <not allocated>" "print \$1"
+with_timeout_factor 2 {
+    gdb_test "print \$2" \
+      " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" "print \$4"
+}
+
+gdb_breakpoint [gdb_get_line_number "vla2-filled"]
+gdb_continue_to_breakpoint "vla2-filled"
+gdb_test "print vla2(1,43,20)" " = 1311" "print vla2(1,43,20)"
+gdb_test "print vla1(1,3,8)" " = 1001" "print vla2(1,3,8)"
+
+# Try to access history values for vla values.
+gdb_test "print \$5" " = 1311" "print \$5"
+gdb_test "print \$6" " = 1001" "print \$6"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptr-info.exp ./gdb/testsuite/gdb.fortran/vla-ptr-info.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptr-info.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-ptr-info.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Check the status of a pointer to a dynamic array.
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print &pvla" " = \\(PTR TO -> \\( real\\(kind=4\\) \\(10,10,10\\)\\)\\) ${hex}" \
+  "print pvla pointer information"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptype.exp ./gdb/testsuite/gdb.fortran/vla-ptype.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptype.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-ptype.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,100 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+load_lib "fortran.exp"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Depending on the compiler being used, the type names can be printed differently.
+set real [fortran_real4]
+
+# Check the ptype of various VLA states and pointer to VLA's.
+gdb_breakpoint [gdb_get_line_number "vla1-init"]
+gdb_continue_to_breakpoint "vla1-init"
+gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not initialized"
+gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not initialized"
+gdb_test "ptype pvla" "type = <not associated>" "ptype pvla not initialized"
+gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
+  "ptype vla1(3, 6, 9) not initialized"
+gdb_test "ptype vla2(5, 45, 20)" \
+  "no such vector element \\\(vector not allocated\\\)" \
+  "ptype vla1(5, 45, 20) not initialized"
+
+gdb_breakpoint [gdb_get_line_number "vla1-allocated"]
+gdb_continue_to_breakpoint "vla1-allocated"
+gdb_test "ptype vla1" "type = $real \\\(10,10,10\\\)" \
+  "ptype vla1 allocated"
+
+gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
+gdb_continue_to_breakpoint "vla2-allocated"
+gdb_test "ptype vla2" "type = $real \\\(7,42:50,13:35\\\)" \
+  "ptype vla2 allocated"
+
+gdb_breakpoint [gdb_get_line_number "vla1-filled"]
+gdb_continue_to_breakpoint "vla1-filled"
+gdb_test "ptype vla1" "type = $real \\\(10,10,10\\\)" \
+  "ptype vla1 filled"
+gdb_test "ptype vla1(3, 6, 9)" "type = $real" \
+  "ptype vla1(3, 6, 9)"
+
+gdb_breakpoint [gdb_get_line_number "vla2-filled"]
+gdb_continue_to_breakpoint "vla2-filled"
+gdb_test "ptype vla2" "type = $real \\\(7,42:50,13:35\\\)" \
+  "ptype vla2 filled"
+gdb_test "ptype vla2(5, 45, 20)" "type = $real" \
+  "ptype vla1(5, 45, 20) filled"
+
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "ptype pvla" "type = $real \\\(10,10,10\\\)" \
+  "ptype pvla associated"
+gdb_test "ptype pvla(3, 6, 9)" "type = $real" \
+  "ptype pvla(3, 6, 9)"
+
+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"]
+gdb_continue_to_breakpoint "pvla-re-associated"
+gdb_test "ptype pvla" "type = $real \\\(7,42:50,13:35\\\)" \
+  "ptype pvla re-associated"
+gdb_test "ptype vla2(5, 45, 20)" "type = $real" \
+  "ptype vla1(5, 45, 20) re-associated"
+
+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
+gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "ptype pvla" "type = <not associated>" "ptype pvla deassociated"
+gdb_test "ptype pvla(5, 45, 20)" \
+  "no such vector element \\\(vector not associated\\\)" \
+  "ptype pvla(5, 45, 20) not associated"
+
+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
+gdb_continue_to_breakpoint "vla1-deallocated"
+gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not allocated"
+gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
+  "ptype vla1(3, 6, 9) not allocated"
+
+gdb_breakpoint [gdb_get_line_number "vla2-deallocated"]
+gdb_continue_to_breakpoint "vla2-deallocated"
+gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not allocated"
+gdb_test "ptype vla2(5, 45, 20)" \
+  "no such vector element \\\(vector not allocated\\\)" \
+  "ptype vla2(5, 45, 20) not allocated"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp ./gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-ptype-sub.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,92 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla-sub.f90"
+load_lib "fortran.exp"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
+set real [fortran_real4]
+
+# Pass fixed array to function and handle them as vla in function.
+gdb_breakpoint [gdb_get_line_number "not-filled"]
+gdb_continue_to_breakpoint "not-filled (1st)"
+gdb_test "ptype array1" "type = $int \\\(42,42\\\)" \
+  "ptype array1 (passed fixed)"
+gdb_test "ptype array2" "type = $real \\\(42,42,42\\\)" \
+  "ptype array2 (passed fixed)"
+gdb_test "ptype array1(40, 10)" "type = $int" \
+  "ptype array1(40, 10) (passed fixed)"
+gdb_test "ptype array2(13, 11, 5)" "type = $real" \
+  "ptype array2(13, 11, 5) (passed fixed)"
+
+# Pass sub arrays to function and handle them as vla in function.
+gdb_continue_to_breakpoint "not-filled (2nd)"
+gdb_test "ptype array1" "type = $int \\\(6,6\\\)" \
+  "ptype array1 (passed sub-array)"
+gdb_test "ptype array2" "type = $real \\\(6,6,6\\\)" \
+  "ptype array2 (passed sub-array)"
+gdb_test "ptype array1(3, 3)" "type = $int" \
+  "ptype array1(3, 3) (passed sub-array)"
+gdb_test "ptype array2(4, 4, 4)" "type = $real" \
+  "ptype array2(4, 4, 4) (passed sub-array)"
+
+# Check ptype outside of bounds.  This should not crash GDB.
+gdb_test "ptype array1(100, 100)" "no such vector element" \
+  "ptype array1(100, 100) subarray do not crash (passed sub-array)"
+gdb_test "ptype array2(100, 100, 100)" "no such vector element" \
+  "ptype array2(100, 100, 100) subarray do not crash (passed sub-array)"
+
+# Pass vla to function.
+gdb_continue_to_breakpoint "not-filled (3rd)"
+gdb_test "ptype array1" "type = $int \\\(20,20\\\)" \
+  "ptype array1 (passed vla)"
+gdb_test "ptype array2" "type = $real \\\(10,10,10\\\)" \
+  "ptype array2 (passed vla)"
+gdb_test "ptype array1(3, 3)" "type = $int" \
+  "ptype array1(3, 3) (passed vla)"
+gdb_test "ptype array2(4, 4, 4)" "type = $real" \
+  "ptype array2(4, 4, 4) (passed vla)"
+
+# Check ptype outside of bounds.  This should not crash GDB.
+gdb_test "ptype array1(100, 100)" "no such vector element" \
+  "ptype array1(100, 100) VLA do not crash (passed vla)"
+gdb_test "ptype array2(100, 100, 100)" "no such vector element" \
+  "ptype array2(100, 100, 100) VLA do not crash (passed vla)"
+
+# Pass fixed array to function and handle it as VLA of arbitrary length in
+# function.
+gdb_breakpoint [gdb_get_line_number "end-of-bar"]
+gdb_continue_to_breakpoint "end-of-bar"
+gdb_test "ptype array1" \
+  "type = (PTR TO -> \\( )?$int \\(\\*\\)\\)?" \
+  "ptype array1 (arbitrary length)"
+gdb_test "ptype array2" \
+  "type = (PTR TO -> \\( )?$int \\(4:9,10:\\*\\)\\)?" \
+  "ptype array2 (arbitrary length)"
+gdb_test "ptype array1(100)" "type = $int" \
+  "ptype array1(100) (arbitrary length)"
+gdb_test "ptype array2(4,100)" "type = $int" \
+  "ptype array2(4,100) (arbitrary length)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-sizeof.exp ./gdb/testsuite/gdb.fortran/vla-sizeof.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-sizeof.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-sizeof.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Try to access values in non allocated VLA
+gdb_breakpoint [gdb_get_line_number "vla1-init"]
+gdb_continue_to_breakpoint "vla1-init"
+gdb_test "print sizeof(vla1)" " = 0" "print sizeof non-allocated vla1"
+
+# Try to access value in allocated VLA
+gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
+gdb_continue_to_breakpoint "vla2-allocated"
+gdb_test "print sizeof(vla1)" " = 4000" "print sizeof allocated vla1"
+
+# Try to access values in undefined pointer to VLA (dangling)
+gdb_breakpoint [gdb_get_line_number "vla1-filled"]
+gdb_continue_to_breakpoint "vla1-filled"
+gdb_test "print sizeof(pvla)" " = 0" "print sizeof non-associated pvla"
+
+# Try to access values in pointer to VLA and compare them
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-sub.f90 ./gdb/testsuite/gdb.fortran/vla-sub.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-sub.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-sub.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,82 @@
+! Copyright 2015-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Original file written by Jakub Jelinek <jakub@redhat.com> and
+! Jan Kratochvil <jan.kratochvil@redhat.com>.
+! Modified for the GDB testcases by Keven Boell <keven.boell@intel.com>.
+
+subroutine foo (array1, array2)
+  integer :: array1 (:, :)
+  real    :: array2 (:, :, :)
+
+  array1(:,:) = 5                       ! not-filled
+  array1(1, 1) = 30
+
+  array2(:,:,:) = 6                     ! array1-filled
+  array2(:,:,:) = 3
+  array2(1,1,1) = 30
+  array2(3,3,3) = 90                    ! array2-almost-filled
+end subroutine
+
+subroutine bar (array1, array2)
+  integer :: array1 (*)
+  integer :: array2 (4:9, 10:*)
+
+  array1(5:10) = 1311
+  array1(7) = 1
+  array1(100) = 100
+  array2(4,10) = array1(7)
+  array2(4,100) = array1(7)
+  return                                ! end-of-bar
+end subroutine
+
+program vla_sub
+  interface
+    subroutine foo (array1, array2)
+      integer :: array1 (:, :)
+      real :: array2 (:, :, :)
+    end subroutine
+  end interface
+  interface
+    subroutine bar (array1, array2)
+      integer :: array1 (*)
+      integer :: array2 (4:9, 10:*)
+    end subroutine
+  end interface
+
+  real, allocatable :: vla1 (:, :, :)
+  integer, allocatable :: vla2 (:, :)
+
+  ! used for subroutine
+  integer :: sub_arr1(42, 42)
+  real    :: sub_arr2(42, 42, 42)
+  integer :: sub_arr3(42)
+
+  sub_arr1(:,:) = 1                   ! vla2-deallocated
+  sub_arr2(:,:,:) = 2
+  sub_arr3(:) = 3
+
+  call foo(sub_arr1, sub_arr2)
+  call foo(sub_arr1(5:10, 5:10), sub_arr2(10:15,10:15,10:15))
+
+  allocate (vla1 (10,10,10))
+  allocate (vla2 (20,20))
+  vla1(:,:,:) = 1311
+  vla2(:,:) = 42
+  call foo(vla2, vla1)
+
+  call bar(sub_arr3, sub_arr1)
+end program vla_sub
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-type.exp ./gdb/testsuite/gdb.fortran/vla-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-type.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,171 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile ".f90"
+load_lib "fortran.exp"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+     {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
+
+# Check if not allocated VLA in type does not break
+# the debugger when accessing it.
+gdb_breakpoint [gdb_get_line_number "before-allocated"]
+gdb_continue_to_breakpoint "before-allocated"
+gdb_test "print twov" " = \\\( ivla1 = <not allocated>, ivla2 = <not allocated> \\\)" \
+  "print twov before allocated"
+gdb_test "print twov%ivla1" " = <not allocated>" \
+  "print twov%ivla1 before allocated"
+
+# Check type with one VLA's inside
+gdb_breakpoint [gdb_get_line_number "onev-filled"]
+gdb_continue_to_breakpoint "onev-filled"
+gdb_test "print onev%ivla(5, 11, 23)" " = 1"
+gdb_test "print onev%ivla(1, 2, 3)" " = 123"
+gdb_test "print onev%ivla(3, 2, 1)" " = 321"
+gdb_test "ptype onev" \
+         [multi_line "type = Type one" \
+                     "\\s+$int :: ivla\\\(11,22,33\\\)" \
+                     "End Type one" ]
+
+# Check type with two VLA's inside
+gdb_breakpoint [gdb_get_line_number "twov-filled"]
+gdb_continue_to_breakpoint "twov-filled"
+gdb_test "print twov%ivla1(5, 11, 23)" " = 1"
+gdb_test "print twov%ivla1(1, 2, 3)" " = 123"
+gdb_test "print twov%ivla1(3, 2, 1)" " = 321"
+gdb_test "ptype twov" \
+         [multi_line "type = Type two" \
+                     "\\s+$int :: ivla1\\\(5,12,99\\\)" \
+                     "\\s+$int :: ivla2\\\(9,12\\\)" \
+                     "End Type two" ]
+gdb_test "print twov" " = \\\( ivla1 = \\\(\\\( \\\( 1, 1, 1, 1, 1\\\)\
+ \\\( 1, 1, 321, 1, 1\\\)\
+ \\\( 1, 1, 1, 1, 1\\\) .*"
+
+# Check type with attribute at beginn of type
+gdb_breakpoint [gdb_get_line_number "threev-filled"]
+gdb_continue_to_breakpoint "threev-filled"
+gdb_test "print threev%ivla(1)" " = 1"
+gdb_test "print threev%ivla(5)" " = 42"
+gdb_test "print threev%ivla(14)" " = 24"
+gdb_test "print threev%ivar" " = 3"
+gdb_test "ptype threev" \
+         [multi_line "type = Type three" \
+                     "\\s+$int :: ivar" \
+                     "\\s+$int :: ivla\\\(20\\\)" \
+                     "End Type three" ]
+
+# Check type with attribute at end of type
+gdb_breakpoint [gdb_get_line_number "fourv-filled"]
+gdb_continue_to_breakpoint "fourv-filled"
+gdb_test "print fourv%ivla(1)" " = 1"
+gdb_test "print fourv%ivla(2)" " = 2"
+gdb_test "print fourv%ivla(7)" " = 7"
+gdb_test "print fourv%ivla(12)" "no such vector element"
+gdb_test "print fourv%ivar" " = 3"
+gdb_test "ptype fourv" \
+         [multi_line "type = Type four" \
+                     "\\s+$int :: ivla\\\(10\\\)" \
+                     "\\s+$int :: ivar" \
+                     "End Type four" ]
+
+# Check nested types containing a VLA
+gdb_breakpoint [gdb_get_line_number "fivev-filled"]
+gdb_continue_to_breakpoint "fivev-filled"
+gdb_test "print fivev%tone%ivla(5, 5, 1)" " = 1"
+gdb_test "print fivev%tone%ivla(1, 2, 3)" " = 123"
+gdb_test "print fivev%tone%ivla(3, 2, 1)" " = 321"
+gdb_test "ptype fivev" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ]
+gdb_test "ptype fivev%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(10,10,10\\)" \
+                     "End Type one" ]
+
+# Check array of types containing a VLA
+gdb_breakpoint [gdb_get_line_number "fivearr-filled"]
+gdb_continue_to_breakpoint "fivearr-filled"
+gdb_test "print fivearr(1)%tone%ivla(1, 2, 3)" " = 1"
+gdb_test "print fivearr(1)%tone%ivla(2, 2, 10)" "no such vector element"
+gdb_test "print fivearr(1)%tone%ivla(2, 2, 3)" " = 223"
+gdb_test "print fivearr(2)%tone%ivla(12, 14, 16)" " = 2"
+gdb_test "print fivearr(2)%tone%ivla(6, 7, 8)" " = 678"
+gdb_test "ptype fivearr(1)" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ]
+gdb_test "ptype fivearr(1)%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(2,4,6\\)" \
+                     "End Type one" ]
+gdb_test "ptype fivearr(2)" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ]
+gdb_test "ptype fivearr(2)%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(12,14,16\\)" \
+                     "End Type one" ]
+
+# Check allocation status of dynamic array and it's dynamic members
+gdb_test "ptype fivedynarr" "type = <not allocated>"
+gdb_test "next" ""
+gdb_test "ptype fivedynarr(2)" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ] \
+         "ptype fivedynarr(2), tone is not allocated"
+gdb_test "ptype fivedynarr(2)%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(<not allocated>\\)" \
+                     "End Type one" ] \
+         "ptype fivedynarr(2)%tone, not allocated"
+
+# Check dynamic array of types containing a VLA
+gdb_breakpoint [gdb_get_line_number "fivedynarr-filled"]
+gdb_continue_to_breakpoint "fivedynarr-filled"
+gdb_test "print fivedynarr(1)%tone%ivla(1, 2, 3)" " = 1"
+gdb_test "print fivedynarr(1)%tone%ivla(2, 2, 10)" "no such vector element"
+gdb_test "print fivedynarr(1)%tone%ivla(2, 2, 3)" " = 223"
+gdb_test "print fivedynarr(2)%tone%ivla(12, 14, 16)" " = 2"
+gdb_test "print fivedynarr(2)%tone%ivla(6, 7, 8)" " = 678"
+gdb_test "ptype fivedynarr(1)" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ]
+gdb_test "ptype fivedynarr(1)%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(2,4,6\\)" \
+                     "End Type one" ]
+gdb_test "ptype fivedynarr(2)" \
+         [multi_line "type = Type five" \
+                     "\\s+Type one :: tone" \
+                     "End Type five" ]
+gdb_test "ptype fivedynarr(2)%tone" \
+         [multi_line "type = Type one" \
+                     "    $int :: ivla\\(12,14,16\\)" \
+                     "End Type one" ]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-type.f90 ./gdb/testsuite/gdb.fortran/vla-type.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-type.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-type.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,104 @@
+! Copyright 2016-2017 Free Software Foundation, Inc.
+
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+program vla_struct
+  type :: one
+    integer, allocatable :: ivla (:, :, :)
+  end type one
+  type :: two
+    integer, allocatable :: ivla1 (:, :, :)
+    integer, allocatable :: ivla2 (:, :)
+  end type two
+  type :: three
+    integer :: ivar
+    integer, allocatable :: ivla (:)
+  end type three
+  type :: four
+    integer, allocatable :: ivla (:)
+    integer :: ivar
+  end type four
+  type :: five
+    type(one) :: tone
+  end type five
+
+  type(one), target        :: onev
+  type(two)                :: twov
+  type(three)              :: threev
+  type(four)               :: fourv
+  type(five)               :: fivev
+  type(five)               :: fivearr (2)
+  type(five), allocatable  :: fivedynarr (:)
+  logical                  :: l
+  integer                  :: i, j
+
+  allocate (onev%ivla (11,22,33))         ! before-allocated
+  l = allocated(onev%ivla)
+
+  onev%ivla(:, :, :) = 1
+  onev%ivla(1, 2, 3) = 123
+  onev%ivla(3, 2, 1) = 321
+
+  allocate (twov%ivla1 (5,12,99))         ! onev-filled
+  l = allocated(twov%ivla1)
+  allocate (twov%ivla2 (9,12))
+  l = allocated(twov%ivla2)
+
+  twov%ivla1(:, :, :) = 1
+  twov%ivla1(1, 2, 3) = 123
+  twov%ivla1(3, 2, 1) = 321
+
+  twov%ivla2(:, :) = 1
+  twov%ivla2(1, 2) = 12
+  twov%ivla2(2, 1) = 21
+
+  threev%ivar = 3                      ! twov-filled
+  allocate (threev%ivla (20))
+  l = allocated(threev%ivla)
+
+  threev%ivla(:) = 1
+  threev%ivla(5) = 42
+  threev%ivla(14) = 24
+
+  allocate (fourv%ivla (10))             ! threev-filled
+  l = allocated(fourv%ivla)
+
+  fourv%ivar = 3
+  fourv%ivla(:) = 1
+  fourv%ivla(2) = 2
+  fourv%ivla(7) = 7
+
+  allocate (fivev%tone%ivla (10, 10, 10))         ! fourv-filled
+  l = allocated(fivev%tone%ivla)
+  fivev%tone%ivla(:, :, :) = 1
+  fivev%tone%ivla(1, 2, 3) = 123
+  fivev%tone%ivla(3, 2, 1) = 321
+
+  allocate (fivearr(1)%tone%ivla (2, 4, 6))        ! fivev-filled
+  allocate (fivearr(2)%tone%ivla (12, 14, 16))
+  fivearr(1)%tone%ivla(:, :, :) = 1
+  fivearr(1)%tone%ivla(2, 2, 3) = 223
+  fivearr(2)%tone%ivla(:, :, :) = 2
+  fivearr(2)%tone%ivla(6, 7, 8) = 678
+
+  allocate (fivedynarr(2))                         ! fivearr-filled
+  allocate (fivedynarr(1)%tone%ivla (2, 4, 6))
+  allocate (fivedynarr(2)%tone%ivla (12, 14, 16))
+  fivedynarr(1)%tone%ivla(:, :, :) = 1
+  fivedynarr(1)%tone%ivla(2, 2, 3) = 223
+  fivedynarr(2)%tone%ivla(:, :, :) = 2
+  fivedynarr(2)%tone%ivla(6, 7, 8) = 678
+
+  l = allocated(fivedynarr)                        ! fivedynarr-filled
+end program vla_struct
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value.exp ./gdb/testsuite/gdb.fortran/vla-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,158 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+     {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Try to access values in non allocated VLA
+gdb_breakpoint [gdb_get_line_number "vla1-init"]
+gdb_continue_to_breakpoint "vla1-init"
+gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
+gdb_test "print &vla1" \
+  " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not allocated>\\\)\\\)\\\) $hex" \
+  "print non-allocated &vla1"
+gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \
+  "print member in non-allocated vla1 (1)"
+gdb_test "print vla1(101,202,303)" \
+  "no such vector element \\\(vector not allocated\\\)" \
+  "print member in non-allocated vla1 (2)"
+gdb_test "print vla1(5,2,18)=1" "no such vector element \\\(vector not allocated\\\)" \
+  "set member in non-allocated vla1"
+
+# Try to access value in allocated VLA
+gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
+gdb_continue_to_breakpoint "vla2-allocated"
+# Many instructions to be executed when step over this line, and it is
+# slower in remote debugging.  Increase the timeout to avoid timeout
+# fail.
+with_timeout_factor 15 {
+    gdb_test "next" "\\d+(\\t|\\s)+vla1\\\(3, 6, 9\\\) = 42" \
+	"step over value assignment of vla1"
+}
+gdb_test "print &vla1" \
+  " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \
+  "print allocated &vla1"
+gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)"
+gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)"
+gdb_test "print vla1(9, 9, 9) = 999" " = 999" \
+  "print allocated vla1(9,9,9)=1"
+
+# Try to access values in allocated VLA after specific assignment
+gdb_breakpoint [gdb_get_line_number "vla1-filled"]
+gdb_continue_to_breakpoint "vla1-filled"
+gdb_test "print vla1(3, 6, 9)" " = 42" \
+  "print allocated vla1(3,6,9) after specific assignment (filled)"
+gdb_test "print vla1(1, 3, 8)" " = 1001" \
+  "print allocated vla1(1,3,8) after specific assignment (filled)"
+gdb_test "print vla1(9, 9, 9)" " = 999" \
+  "print allocated vla1(9,9,9) after assignment in debugger (filled)"
+
+# Try to access values in undefined pointer to VLA (dangling)
+gdb_test "print pvla" " = <not associated>" "print undefined pvla"
+gdb_test "print &pvla" \
+  " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not associated>\\\)\\\)\\\) $hex" \
+  "print non-associated &pvla"
+gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \
+  "print undefined pvla(1,3,8)"
+
+# Try to access values in pointer to VLA and compare them
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print &pvla" \
+  " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \
+  "print associated &pvla"
+gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)"
+gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)"
+gdb_test "print pvla(9, 9, 9)" " = 999" "print associated pvla(9,9,9)"
+
+# Fill values to VLA using pointer and check
+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"]
+gdb_continue_to_breakpoint "pvla-re-associated"
+gdb_test "print pvla(5, 45, 20)" \
+  " = 1" "print pvla(5, 45, 20) after filled using pointer"
+gdb_test "print vla2(5, 45, 20)" \
+  " = 1" "print vla2(5, 45, 20) after filled using pointer"
+gdb_test "print pvla(7, 45, 14)" " = 2" \
+  "print pvla(7, 45, 14) after filled using pointer"
+gdb_test "print vla2(7, 45, 14)" " = 2" \
+  "print vla2(7, 45, 14) after filled using pointer"
+
+# Try to access values of deassociated VLA pointer
+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
+gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "print pvla(5, 45, 20)" \
+  "no such vector element \\\(vector not associated\\\)" \
+  "print pvla(5, 45, 20) after deassociated"
+gdb_test "print pvla(7, 45, 14)" \
+  "no such vector element \\\(vector not associated\\\)" \
+  "print pvla(7, 45, 14) after dissasociated"
+gdb_test "print pvla" " = <not associated>" \
+  "print vla1 after deassociated"
+
+# Try to access values of deallocated VLA
+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
+gdb_continue_to_breakpoint "vla1-deallocated"
+gdb_test "print vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
+  "print allocated vla1(3,6,9) after specific assignment (deallocated)"
+gdb_test "print vla1(1, 3, 8)" "no such vector element \\\(vector not allocated\\\)" \
+  "print allocated vla1(1,3,8) after specific assignment (deallocated)"
+gdb_test "print vla1(9, 9, 9)" "no such vector element \\\(vector not allocated\\\)" \
+  "print allocated vla1(9,9,9) after assignment in debugger (deallocated)"
+
+
+# Try to assign VLA to user variable
+clean_restart ${testfile}
+
+if ![runto MAIN__] then {
+    perror "couldn't run to breakpoint MAIN__"
+    continue
+}
+gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
+gdb_continue_to_breakpoint "vla2-allocated"
+# Many instructions to be executed when step over this line, and it is
+# slower in remote debugging.  Increase the timeout to avoid timeout
+# fail.
+with_timeout_factor 15 {
+    gdb_test "next" "\\d+.*vla1\\(3, 6, 9\\) = 42" "next (1)"
+}
+
+gdb_test_no_output "set \$myvar = vla1" "set \$myvar = vla1"
+gdb_test "print \$myvar" \
+  " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" \
+  "print \$myvar set to vla1"
+
+gdb_test "next" "\\d+.*vla1\\(1, 3, 8\\) = 1001" "next (2)"
+gdb_test "print \$myvar(3,6,9)" " = 1311" "print \$myvar(3,6,9)"
+
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test_no_output "set \$mypvar = pvla" "set \$mypvar = pvla"
+gdb_test "print \$mypvar(1,3,8)" " = 1001" "print \$mypvar(1,3,8)"
+
+# deallocate pointer and make sure user defined variable still has the
+# right value.
+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
+gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "print \$mypvar(1,3,8)" " = 1001" \
+  "print \$mypvar(1,3,8) after deallocated"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp ./gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,35 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla-sub.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Check VLA with arbitary length and check that elements outside of
+# bounds of the passed VLA can be accessed correctly.
+gdb_breakpoint [gdb_get_line_number "end-of-bar"]
+gdb_continue_to_breakpoint "end-of-bar"
+gdb_test "p array1(42)" " = 3" "print arbitary array1(42)"
+gdb_test "p array1(100)" " = 100" "print arbitary array1(100)"
+gdb_test "p array2(4,10)" " = 1" "print arbitary array2(4,10)"
+gdb_test "p array2(4,100)" " = 1" "print arbitary array2(4,100)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub.exp ./gdb/testsuite/gdb.fortran/vla-value-sub.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-value-sub.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,92 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla-sub.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# Check the values of VLA's in subroutine can be evaluated correctly
+
+# Try to access values from a fixed array handled as VLA in subroutine.
+gdb_breakpoint [gdb_get_line_number "not-filled"]
+gdb_continue_to_breakpoint "not-filled (1st)"
+gdb_test "print array1" " = \\(\[()1, .\]*\\)" \
+  "print passed array1 in foo (passed fixed array)"
+
+gdb_breakpoint [gdb_get_line_number "array1-filled"]
+gdb_continue_to_breakpoint "array1-filled (1st)"
+gdb_test "print array1(5, 7)" " = 5" \
+  "print array1(5, 7) after filled in foo (passed fixed array)"
+gdb_test "print array1(1, 1)" " = 30" \
+  "print array1(1, 1) after filled in foo (passed fixed array)"
+
+gdb_breakpoint [gdb_get_line_number "array2-almost-filled"]
+gdb_continue_to_breakpoint "array2-almost-filled (1st)"
+# array2 size is 296352 bytes.
+gdb_test_no_output "set max-value-size 1024*1024"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was filled (passed fixed array)"
+gdb_test "print array2(2,1,1)=20" " = 20" \
+  "set array(2,2,2) to 20 in subroutine (passed fixed array)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was mofified in debugger (passed fixed array)"
+
+
+# Try to access values from a fixed sub-array handled as VLA in subroutine.
+gdb_continue_to_breakpoint "not-filled (2nd)"
+gdb_test "print array1" " = \\(\[()5, .\]*\\)" \
+  "print passed array1 in foo (passed sub-array)"
+
+gdb_continue_to_breakpoint "array1-filled (2nd)"
+gdb_test "print array1(5, 5)" " = 5" \
+  "print array1(5, 5) after filled in foo (passed sub-array)"
+gdb_test "print array1(1, 1)" " = 30" \
+  "print array1(1, 1) after filled in foo (passed sub-array)"
+
+gdb_continue_to_breakpoint "array2-almost-filled (2nd)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was filled (passed sub-array)"
+gdb_test "print array2(2,1,1)=20" " = 20" \
+  "set array(2,2,2) to 20 in subroutine (passed sub-array)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was mofified in debugger (passed sub-array)"
+
+
+# Try to access values from a VLA passed to subroutine.
+gdb_continue_to_breakpoint "not-filled (3rd)"
+gdb_test "print array1" " = \\(\[()42, .\]*\\)" \
+  "print passed array1 in foo (passed vla)"
+
+gdb_continue_to_breakpoint "array1-filled (3rd)"
+gdb_test "print array1(5, 5)" " = 5" \
+  "print array1(5, 5) after filled in foo (passed vla)"
+gdb_test "print array1(1, 1)" " = 30" \
+  "print array1(1, 1) after filled in foo (passed vla)"
+
+gdb_continue_to_breakpoint "array2-almost-filled (3rd)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was filled (passed vla)"
+gdb_test "print array2(2,1,1)=20" " = 20" \
+  "set array(2,2,2) to 20 in subroutine (passed vla)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was mofified in debugger (passed vla)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp ./gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,51 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "vla-sub.f90"
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+    {debug f90 quiet}] } {
+    return -1
+}
+
+if ![runto_main] {
+    untested "could not run to main"
+    return -1
+}
+
+# "up" works with GCC but other Fortran compilers may copy the values into the
+# outer function only on the exit of the inner function.
+# We need both variants as depending on the arch we optionally may still be
+# executing the caller line or not after `finish'.
+
+gdb_breakpoint [gdb_get_line_number "array2-almost-filled"]
+gdb_continue_to_breakpoint "array2-almost-filled"
+# array2 size is 296352 bytes.
+gdb_test_no_output "set max-value-size 1024*1024"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was filled"
+gdb_test "print array2(2,1,1)=20" " = 20" \
+  "set array(2,2,2) to 20 in subroutine"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+  "print array2 in foo after it was mofified in debugger"
+
+gdb_test "finish" \
+  ".*(foo\\\(sub_arr1\\\(5:10, 5:10\\\), sub_arr2\\\(10:15,10:15,10:15\\\)\\\)|foo \\\(array1=..., array2=...\\\).*)" \
+  "finish function"
+gdb_test "p sub_arr1(5, 7)" " = 5" "sub_arr1(5, 7) after finish"
+gdb_test "p sub_arr1(1, 1)" " = 30" "sub_arr1(1, 1) after finish"
+gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish"
+gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/whatis_type.exp ./gdb/testsuite/gdb.fortran/whatis_type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.fortran/whatis_type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.fortran/whatis_type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,9 @@
 if { [skip_fortran_tests] } { continue }
 
 standard_testfile type.f90
+load_lib "fortran.exp"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
                           ${srcfile} {debug f90}] } {
     return -1
 }
@@ -27,22 +28,51 @@ if ![runto MAIN__] {
     return
 }
 
+# Depending on the compiler being used, the type names can be printed differently.
+set int [fortran_int4]
+set real [fortran_real4]
+
 gdb_breakpoint [gdb_get_line_number "bp1"]
 gdb_continue_to_breakpoint "bp1"
 
-set t1_i "integer\\\(kind=4\\\) :: t1_i"
-set t1_r "real\\\(kind=4\\\) :: t1_r"
+set t1_i "$int :: t1_i"
+set t1_r "$real :: t1_r"
 
-gdb_test "whatis t1" \
-  "type = Type t1\r\n${t1_i}\r\n${t1_r}\r\nEnd Type t1" \
-  "whatis t1"
-gdb_test "whatis t1v" \
-  "type = Type t1\r\n${t1_i}\r\n${t1_r}\r\nEnd Type t1" \
-  "whatis t1v"
+gdb_test "whatis t1" "type = Type t1"
+gdb_test "whatis t1v" "type = Type t1"
+gdb_test "whatis t2" "type = Type t2"
+gdb_test "whatis t2v" "type = Type t2"
+gdb_test "whatis t3" "type = Type t3"
+gdb_test "whatis t3v" "type = Type t3"
+gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3 \\)"
 
 gdb_test "ptype t1" \
-  "type = Type t1\r\n    ${t1_i}\r\n    ${t1_r}\r\nEnd Type t1" \
+  [multi_line "type = Type t1" \
+	          "    $t1_i" \
+	          "    $t1_r" \
+	          "End Type t1"] \
   "ptype t1"
 gdb_test "ptype t1v" \
-  "type = Type t1\r\n    ${t1_i}\r\n    ${t1_r}\r\nEnd Type t1" \
+  [multi_line "type = Type t1" \
+	          "    $t1_i" \
+	          "    $t1_r" \
+	          "End Type t1"] \
   "ptype t1v"
+
+gdb_test "ptype t2v" \
+  [multi_line "type = Type t2" \
+              "    $int :: t2_i" \
+              "    Type t1 :: t1_n" \
+              "End Type t2"]
+
+gdb_test "ptype t3v" \
+  [multi_line "type = Type t3" \
+              "    $int :: t3_i" \
+              "    Type t2 :: t2_n" \
+              "End Type t3"]
+
+gdb_test "ptype t3p" \
+  [multi_line "type = PTR TO -> \\( Type t3" \
+              "    $int :: t3_i" \
+              "    Type t2 :: t2_n" \
+              "End Type t3 \\)"]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/complaints.exp ./gdb/testsuite/gdb.gdb/complaints.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/complaints.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/complaints.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,15 +24,41 @@ if [target_info exists gdb,noinferiorio]
     return
 }
 
-proc test_initial_complaints { } {
+# Similar to gdb_test_stdio, except no \r\n is expected before
+# $gdb_prompt in the $gdb_spawn_id.
 
+proc test_complaint {test inferior_io_re msg} {
+    global inferior_spawn_id gdb_spawn_id
     global gdb_prompt
 
+    set inferior_matched 0
+    set gdb_matched 0
+
+    gdb_test_multiple $test $msg {
+	-i $inferior_spawn_id -re "$inferior_io_re" {
+	    set inferior_matched 1
+	    if {!$gdb_matched} {
+		exp_continue
+	    }
+	}
+	-i $gdb_spawn_id -re "$gdb_prompt $" {
+	    set gdb_matched 1
+	    if {!$inferior_matched} {
+		exp_continue
+	    }
+	}
+    }
+
+    verbose -log "inferior_matched=$inferior_matched, gdb_matched=$gdb_matched"
+    gdb_assert {$inferior_matched && $gdb_matched} $msg
+}
+
+proc test_initial_complaints { } {
     # Unsupress complaints
     gdb_test "set stop_whining = 2"
 
     # Prime the system
-    gdb_test "call complaint (&symfile_complaints, \"Register a complaint\")" \
+    gdb_test_stdio "call complaint (&symfile_complaints, \"Register a complaint\")" \
 	    "During symbol reading, Register a complaint."
 
     # Check that the complaint was inserted and where
@@ -40,7 +66,7 @@ proc test_initial_complaints { } {
 	    ".\[0-9\]+ =.*\"Register a complaint\""
 
     # Re-issue the first message #1
-    gdb_test "call complaint (&symfile_complaints, symfile_complaints->root->fmt)" \
+    gdb_test_stdio "call complaint (&symfile_complaints, symfile_complaints->root->fmt)" \
 	    "During symbol reading, Register a complaint."
 
     # Check that there is only one thing in the list.  How the boolean
@@ -50,37 +76,29 @@ proc test_initial_complaints { } {
 	    ".\[0-9\]+ = \(1|true\)" "list has one entry"
 
     # Add a second complaint, expect it
-    gdb_test "call complaint (&symfile_complaints, \"Testing! Testing! Testing!\")" \
+    gdb_test_stdio "call complaint (&symfile_complaints, \"Testing! Testing! Testing!\")" \
 	    "During symbol reading, Testing. Testing. Testing.."
 
     return 0
 }
 
 proc test_serial_complaints { } {
-
-    global gdb_prompt
-
     gdb_test_exact "call clear_complaints (&symfile_complaints, 1, 0)" "" "serial start"
 
     # Prime the system
-    gdb_test_multiple "call complaint (&symfile_complaints, \"serial line  1\")" "serial line 1" {
-	-re "During symbol reading...serial line  1...$gdb_prompt $" {
-	    pass "serial line 1"
-	}
-    }
+    test_complaint "call complaint (&symfile_complaints, \"serial line 1\")" \
+	"During symbol reading...serial line 1..." \
+	"serial line 1"
 
     # Add a second complaint, expect it
-    gdb_test_multiple "call complaint (&symfile_complaints, \"serial line 2\")" "serial line 2" {
-	-re "serial line 2...$gdb_prompt " {
-	    pass "serial line 2"
-	}
-    }
-
-    gdb_test_multiple "call clear_complaints (&symfile_complaints, 1, 0)" "serial end" {
-	-re "\r\n\r\n$gdb_prompt " {
-	    pass "serial end"
-	}
-    }
+    test_complaint "call complaint (&symfile_complaints, \"serial line 2\")" \
+	"serial line 2..." \
+	"serial line 2"
+
+    gdb_test_stdio "call clear_complaints (&symfile_complaints, 1, 0)" \
+	"\r\n" \
+	"" \
+	"serial end"
 
     return 0
 }
@@ -88,30 +106,22 @@ proc test_serial_complaints { } {
 # For short complaints, all are the same
 
 proc test_short_complaints { } {
-
-    global gdb_prompt
-
     gdb_test_exact "call clear_complaints (&symfile_complaints, 1, 1)" "" "short start"
 
     # Prime the system
-    gdb_test_multiple "call complaint (&symfile_complaints, \"short line 1\")" "short line 1" {
-	-re "short line 1...$gdb_prompt " {
-	    pass "short line 1"
-	}
-    }
+    test_complaint "call complaint (&symfile_complaints, \"short line 1\")" \
+	"short line 1..." \
+	"short line 1"
 
     # Add a second complaint, expect it
-    gdb_test_multiple "call complaint (&symfile_complaints, \"short line 2\")" "short line 2" {
-	-re "short line 2...$gdb_prompt " {
-	    pass "short line 2"
-	}
-    }
-
-    gdb_test_multiple "call clear_complaints (&symfile_complaints, 1, 0)" "short end" {
-	-re "\r\n\r\n$gdb_prompt " {
-	    pass "short end"
-	}
-    }
+    test_complaint "call complaint (&symfile_complaints, \"short line 2\")" \
+	"short line 2..." \
+	"short line 2"
+
+    gdb_test_stdio "call clear_complaints (&symfile_complaints, 1, 0)" \
+	"\r\n" \
+	"" \
+	"short end"
 
     return 0
 }
@@ -122,12 +132,20 @@ proc test_short_complaints { } {
 
 proc test_empty_complaint { cmd msg } {
     global gdb_prompt
-    gdb_test_multiple $cmd $msg {
-	-re "\r\n\r\n$gdb_prompt $" {
-	    fail $msg
-	}
-	"\r\n$gdb_prompt $" {
-	    pass $msg
+    global inferior_spawn_id gdb_spawn_id
+
+    if {$gdb_spawn_id == $inferior_spawn_id} {
+	gdb_test_no_output $cmd $msg
+    } else {
+	set seen_output 0
+	gdb_test_multiple $cmd $msg {
+	    -i $inferior_spawn_id -re "." {
+		set seen_output 1
+		exp_continue
+	    }
+	    -i $gdb_spawn_id "$gdb_prompt $" {
+		gdb_assert !$seen_output $msg
+	    }
 	}
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/Makefile.in ./gdb/testsuite/gdb.gdb/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/observer.exp ./gdb/testsuite/gdb.gdb/observer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/observer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/observer.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/python-interrupts.exp ./gdb/testsuite/gdb.gdb/python-interrupts.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/python-interrupts.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/python-interrupts.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/python-selftest.exp ./gdb/testsuite/gdb.gdb/python-selftest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/python-selftest.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/python-selftest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/selftest.exp ./gdb/testsuite/gdb.gdb/selftest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/selftest.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/selftest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1988-2015 Free Software Foundation, Inc.
+# Copyright 1988-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,276 +17,11 @@
 
 load_lib selftest-support.exp
 
-# are we on a target board
-if { [is_remote target] || ![isnative] } then {
-    return
-}
-
-# Not all of the lines of code near the start of main are executed for
-# every machine.  Also, optimization may reorder some of the lines.
-# So all we do is try to step or next over everything until we get
-# to a line that we know is always executed.
-
-proc do_steps_and_nexts {} {
+proc test_with_self { } {
     global gdb_prompt
-    global srcdir
- 
-    gdb_reinitialize_dir $srcdir/..
-
-    set unlikely_line 0
-    for {set count 0} {$count < 32} {incr count} {
-	# NOTE: carlton/2002-12-11: The "initial brace" and
-	# "current_directory initialization" possibilities happen to
-	# me with GCC 3.1 on i686-pc-linux-gnu when I compile with
-	# optimization.
-	gdb_test_multiple "list" "list" {
-	    -re ".*context = data.*$gdb_prompt $" {
-		set description "step over context initialization"
-		set command "step"
-	    }
-	    -re ".*argc = context->argc.*$gdb_prompt $" {
-		set description "step over argc initialization"
-		set command "step"
-	    }
-	    -re ".*argv = context->argv.*$gdb_prompt $" {
-		set description "step over argv initialization"
-		set command "step"
-	    }
-	    -re ".*quiet = 0.*$gdb_prompt $" {
-		set description "step over quiet initialization"
-		set command "step"
-	    }
-	    -re ".*batch = 0.*$gdb_prompt $" {
-		set description "step over batch initialization"
-		set command "step"
-	    }
-	    -re ".*symarg = NULL.*$gdb_prompt $" {
-		set description "step over symarg initialization"
-		set command "step"
-	    }
-	    -re ".*execarg = NULL.*$gdb_prompt $" {
-		set description "step over execarg initialization"
-		set command "step"
-	    }
-	    -re ".*pidarg = NULL.*$gdb_prompt $" {
-		set description "step over pidarg initialization"
-		set command "step"
-	    }
-	    -re ".*corearg = NULL.*$gdb_prompt $" {
-		set description "step over corearg initialization"
-		set command "step"
-	    }
-	    -re ".*pid_or_core_arg = NULL.*$gdb_prompt $" {
-		set description "step over pid_or_core_arg initialization"
-		set command "step"
-	    }
-	    -re ".*cdarg = NULL.*$gdb_prompt $" {
-		set description "step over cdarg initialization"
-		set command "step"
-	    }
-	    -re ".*ttyarg = NULL.*$gdb_prompt $" {
-		set description "step over ttyarg initialization"
-		set command "step"
-	    }
-	    -re ".*cmdarg_vec = NULL.*$gdb_prompt $" {
-		set description "step over cmdarg_vec initialization"
-		set command "step"
-	    }
-	    -re ".*pre_stat_chain = make_command_stats_cleanup.*$gdb_prompt $" {
-		set description "next over make_command_stats_cleanup and everything it calls"
-		set command "next"
-	    }
-	    -re ".*START_PROGRESS.*$gdb_prompt $" {
-		# Note: ezannoni/2004/02/17: This check should be
-		# removed, since as of today that source line is not
-		# in gdb anymore.
-		set description "next over START_PROGRESS and everything it calls"
-		set command "next"
-	    }
-	    -re ".*mac_init.*$gdb_prompt $" {
-		set description "next over mac_init and everything it calls"
-		set command "next"
-	    }
-	    -re ".*init_malloc.*$gdb_prompt $" {
-		# gdb 6.2.X is the last gdb which called init_malloc
-		set description "next over init_malloc and everything it calls"
-		set command "next"
-	    }
-	    -re ".*lim_at_start.*$gdb_prompt $" {
-		set description "next over lim_at_start initialization"
-		set command "next"
-	    }
-	    -re ".*count . 0x3.*$gdb_prompt $" {
-		set description "next over conditional stack alignment code 1"
-		set command "next"
-	    }
-	    -re ".*if .i != 0.*$gdb_prompt $" {
-		set description "next over conditional stack alignment code 2"
-		set command "next"
-	    }
-	    -re ".*alloca .i - 4.*$gdb_prompt $" {
-		set description "next over conditional stack alignment alloca"
-		set command "next"
-	    }
-	    -re ".*dirsize = 1.*$gdb_prompt $" {
-		set description "next over dirsize initialization"
-		set command "next"
-	    }
-	    -re ".*dirarg = .* xmalloc.*$gdb_prompt $" {
-		return
-	    }
-	    -re ".*setlocale .LC_MESSAGES,.*$gdb_prompt $" {
-		set description "next over setlocale LC_MESSAGES"
-		set command "next"
-	    }
-	    -re ".*setlocale .LC_CTYPE,.*$gdb_prompt $" {
-		set description "next over setlocale LC_CTYPE"
-		set command "next"
-	    }
-	    -re ".*bindtextdomain .PACKAGE, LOCALEDIR.;.*$gdb_prompt $" {
-		set description "next over bindtextdomain"
-		set command "next"
-	    }
-	    -re ".*textdomain .PACKAGE.;.*$gdb_prompt $" {
-		set description "next over textdomain PACKAGE"
-		set command "next"
-	    }
-	    -re ".*bfd_init ..;.*$gdb_prompt $" {
-		set description "next over bfd_init"
-		set command "next"
-	    }
-	    -re ".*notice_open_fds ..;.*$gdb_prompt $" {
-		set description "next over notice_open_fds"
-		set command "next"
-	    }
-	    -re ".*VEC_cleanup .cmdarg_s.*$gdb_prompt $" {
-		set description "next over cmdarg_s VEC_cleanup"
-		set command "next"
-	    }
-	    -re "\[0-9\]+\[\t \]+\{\r\n$gdb_prompt $" {
-		set description "step over initial brace"
-		set command "step"
-	    }
-	    -re ".*current_directory = gdb_dirbuf.*$gdb_prompt $" {
-		set description "step over current_directory initialization"
-		set command "step"
-	    }
-	    -re ".*gdb_sysroot = .*$gdb_prompt $" {
-		# NOTE: carlton/2003-01-15: More optimization reordering,
-		# observed on GCC 3.1.
-		set description "step over gdb_sysroot initialization"
-		set command "step"
-	    }
-	    -re ".*ndir = 0.*$gdb_prompt $" {
-		set description "step over ndir initialization"
-		set command "step"
-	    }
-	    -re ".*instream = stdin.*$gdb_prompt $" {
-		set description "step over instream initialization"
-		set command "step"
-	    }
-	    -re ".*getcwd .gdb_dirbuf, sizeof .gdb_dirbuf.*$gdb_prompt $" {
-		set description "next over getcwd"
-		set command "next"
-	    }
-	    -re ".*gdb_program_name = xstrdup.*$gdb_prompt $" {
-                set description "next over xstrdup"
-                set command "next"
-            } 
-            -re ".*quit_flag = 0.*$gdb_prompt $" {
-		set description "step over quit_flag initialization"
-		set command "step"
-	    }
-	    -re ".*gdb_stdout = stdio_fileopen .stdout.;.*$gdb_prompt $" {
-		set description "step over gdb_stdout initialization"
-		set command "step"
-	    }
-	    -re ".*gdb_stderr = stdio_fileopen .stderr.;.*$gdb_prompt $" {
-		set description "step over gdb_stderr initialization"
-		set command "step"
-	    }
-	    -re ".*main.c.*No such file or directory.*$gdb_prompt $" {
-		setup_xfail "rs6000-*-aix3*"
-		fail "must be able to list source lines"
-		return
-	    }
-	    -re ".*interpreter_p = xstrdup.*$gdb_prompt $" {
-		if { $unlikely_line == 0 } {
-		    # This is a GCC optimization bug; a constant has been
-		    # associated with the wrong line number.
-		    setup_xfail "*-*-*" gcc/26475
-		    fail "$description (unlikely line from gcc)"
-		    set unlikely_line 1
-		}
-		set description "next over xstrdup"
-		set command "next"
-	    }
-	    -re ".*$gdb_prompt $" {
-		# If $description hasn't been set yet, it's likely the file
-		# has been edited but gdb hasn't been recompiled.
-		if [info exists description] {
-		    fail "unknown source line (after $description)"
-		} else {
-		    fail "unknown source line"
-		}
-		return
-	    }
-	    default {
-		fail "unknown source line near main"
-		return
-	    }
-	}
-	gdb_test_multiple "$command" "$description" {
-	    -re ".*No such file or directory.\r\n$gdb_prompt $" {
-		fail "$description (no source available)"
-	    }
-	    -re ".*A file or directory .* does not exist..\r\n$gdb_prompt $" {
-		fail "$description (no source available)"
-	    }
-	    -re ".*$gdb_prompt $" {
-		pass "$description"
-	    }
-	}
-    }
-}
-
-proc test_with_self { executable } {
-    global gdb_prompt
-    global tool
-    global det_file
     global decimal
     global timeout
-    global INTERNAL_GDBFLAGS
-
-    # load yourself into the debugger
-    # This can take a relatively long time, particularly for testing where
-    # the executable is being accessed over a network, or where gdb does not
-    # support partial symbols for a particular target and has to load the
-    # entire symbol table.  Set the timeout to 10 minutes, which should be
-    # adequate for most environments (it *has* timed out with 5 min on a
-    # SPARCstation SLC under moderate load, so this isn't unreasonable).
-    # After gdb is started, set the timeout to 30 seconds for the duration
-    # of this test, and then back to the original value.
-
-    set oldtimeout $timeout
-    set timeout 600
-    verbose "Timeout is now $timeout seconds" 2
-
-    global gdb_file_cmd_debug_info
-    set gdb_file_cmd_debug_info "unset"
-
-    set result [gdb_load $executable]
-    set timeout $oldtimeout
-    verbose "Timeout is now $timeout seconds" 2
-
-    if { $result != 0 } then {
-	return -1
-    }
-
-    if { $gdb_file_cmd_debug_info != "debug" } then {
-	untested "No debug information, skipping testcase."
-	return -1
-    }
+    global inferior_spawn_id
 
     # When GDB is built as a C++ program, disassemble shows the full
     # prototype.
@@ -295,12 +30,7 @@ proc test_with_self { executable } {
     # disassemble yourself
     gdb_test "x/10i main" \
 	    "x/10i.*main.*main($cxx_main_args_re)?.$decimal.*main($cxx_main_args_re)?.$decimal.*" \
-	    "Disassemble main"
-
-    # Set a breakpoint at main
-    gdb_test "break captured_main" \
-	    "Breakpoint.*at.* file.*, line.*" \
-	    "breakpoint in captured_main"
+	    "disassemble main"
 
     # We'll need this when we send a ^C to GDB.  Need to do it before we
     # run the program and gdb starts saving and restoring tty states.
@@ -312,36 +42,6 @@ proc test_with_self { executable } {
     # gdb is stopped.
     gdb_test_no_output "set listsize 1" "set listsize to 1"
 
-    # run yourself
-    # It may take a very long time for the inferior gdb to start (lynx),
-    # so we bump it back up for the duration of this command.
-    set timeout 600
-
-    set description "run until breakpoint at captured_main"
-    gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
-	-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" {
-	    pass "$description"
-	}
-	-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.*$gdb_prompt $" {
-	    xfail "$description (line numbers scrambled?)"
-	}
-	-re "vfork: No more processes.*$gdb_prompt $" {
-	    fail "$description (out of virtual memory)"
-	    set timeout $oldtimeout
-	    verbose "Timeout is now $timeout seconds" 2
-	    return -1
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "$description"
-	    set timeout $oldtimeout
-	    verbose "Timeout is now $timeout seconds" 2
-	    return -1
-	}
-    }
-
-    set timeout $oldtimeout
-    verbose "Timeout is now $timeout seconds" 2
-
     # do we have a version number ?
     gdb_test_multiple "print version" "printed version" {
 	-re ".\[0-9\]+ = .\[0-9.\]+.*$gdb_prompt $" {
@@ -355,91 +55,48 @@ proc test_with_self { executable } {
 	}
     }
 
-    do_steps_and_nexts
-
-    gdb_test "print \"foo\"" ".\[0-9\]+ = \"foo\"" "print a string"
-
-    # do_steps_and_nexts left us ready to execute an xmalloc call,
-    # so give that a try.
-    # If we don't actually enter the xmalloc call when we give a
-    # step command that seems like a genuine bug.  It seems to happen
-    # on most RISC processors.
-    # NOTE drow/2003-06-22: However, if we step back to the preceding two
-    # lines, just keep stepping until we enter.
-    set stepped_back 0
-    setup_xfail "alpha-*-*" "mips-*-*"
-    set description "step into xmalloc call"
-    gdb_test_multiple "step" "$description" {
-	-re "ncmd = 0;.*$gdb_prompt $" {
-	    set stepped_back 1
-	    send_gdb "step\n"
-	    exp_continue
-	}
-        -re ".*cmdarg = .* xmalloc.*$gdb_prompt $" {
-	    set stepped_back 1
-	    send_gdb "step\n"
-	    exp_continue
-        }
-	-re "dirsize = 1;.*$gdb_prompt $" {
-	    set stepped_back 1
-	    send_gdb "step\n"
-	    exp_continue
-	}
-	-re ".*dirarg = .* xmalloc.*$gdb_prompt $" {
-	    if { $stepped_back == 1 } {
-		send_gdb "step\n"
-		exp_continue
-	    } else {
-		fail "$description"
-	    }
-	}
-	-re "xmalloc.*size=.*at.*utils.c.*$gdb_prompt $" {
-	    pass "$description"
-	}
-	-re ".*No such file or directory.\r\n$gdb_prompt $" {
-	    pass "$description (no source available)"
-	}
-	-re "A file or directory .* does not exist..\r\n$gdb_prompt $" {
-	    pass "$description (no source available)"
-	}
-    }
-
     # start the "xgdb" process
     if [target_info exists gdb,noinferiorio] {
-	# Maybe testing with a local extended-remote gdbserver.  With
-	# no way to interact with inferior GDB, all we can do is let
-	# it run.
+	# With no way to interact with the inferior GDB, all we can do
+	# is let it run.
 	send_gdb "continue\n"
 	# Wait a bit while the inferior gdb gets to its prompt.
 	sleep 1
     } else {
 	set test "xgdb is at prompt"
 	gdb_test_multiple "continue" $test {
+	    -i "$inferior_spawn_id"
 	    -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
 		pass $test
 	    }
 	}
 
 	# set xgdb prompt so we can tell which is which
-	gdb_test_multiple "set prompt (xgdb) " "Set xgdb_prompt" {
+	send_inferior "set prompt (xgdb) \n"
+	set msg "Set xgdb_prompt"
+	gdb_test_multiple "" $msg {
+	    -i "$inferior_spawn_id"
 	    -re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
-		pass "Set xgdb prompt"
+		pass $msg
 	    }
 	}
     }
 
     # kill the xgdb process
-    set description "send ^C to child process"
-    send_gdb "\003"
-    gdb_expect {
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
-	    pass "$description"
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "$description"
-	}
-	timeout {
-	    fail "$description (timeout)"
+    if ![target_info exists gdb,nointerrupts] {
+	set description "send ^C to child process"
+	send_gdb "\003"
+	# "Thread 1" is displayed iff Guile support is linked in.
+	gdb_expect {
+	    -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" {
+		pass "$description"
+	    }
+	    -re ".*$gdb_prompt $" {
+		fail "$description"
+	    }
+	    timeout {
+		fail "$description (timeout)"
+	    }
 	}
     }
     
@@ -447,6 +104,10 @@ proc test_with_self { executable } {
     gdb_test "signal SIGINT" \
 	"Continuing with signal SIGINT.*" \
 	"$description"
+
+    # Switch back to the GDB thread if Guile support is linked in.
+    # "signal SIGINT" could also switch the current thread.
+    gdb_test "thread 1" {\[Switching to thread 1 .*\].*}
     
     # get a stack trace
     #
@@ -461,37 +122,8 @@ proc test_with_self { executable } {
 	}
     }
 
-
-    # Set the timeout back to the value it had when we were called.
-    set timeout $oldtimeout
-    verbose "Timeout is now $timeout seconds" 2
-
     # Restart gdb in case next test expects it to be started already.
     return 0
 }
 
-# Run the test with self.
-# Copy the file executable file in case this OS doesn't like to edit its own
-# text space.
-
-set GDB_FULLPATH [find_gdb $GDB]
-
-if {[is_remote host]} {
-    set xgdb x$tool
-} else {
-    set xgdb [standard_output_file x$tool]
-}
-
-# Remove any old copy lying around.
-remote_file host delete $xgdb
-
-gdb_start
-set file [remote_download host $GDB_FULLPATH $xgdb]
-set result [test_with_self $file]
-gdb_exit
-catch "remote_file host delete $file"
-
-if {$result <0} then {
-    warning "Couldn't test self"
-    return -1
-}
+do_self_tests captured_main test_with_self
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/unittest.exp ./gdb/testsuite/gdb.gdb/unittest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/unittest.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/unittest.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,17 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+gdb_start
+gdb_test "maintenance selftest" "Ran $decimal unit tests, 0 failed"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/xfullpath.exp ./gdb/testsuite/gdb.gdb/xfullpath.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.gdb/xfullpath.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.gdb/xfullpath.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ proc test_with_self {} {
     # An empty filename
     gdb_test "print gdb_realpath (\"\")" \
              ".\[0-9\]+ =.*\"\"" \
-             "An empty filename"
+             "an empty filename"
 
     return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/basic-types.exp ./gdb/testsuite/gdb.go/basic-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/basic-types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/basic-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/chan.exp ./gdb/testsuite/gdb.go/chan.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/chan.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/chan.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
@@ -32,7 +32,7 @@ set bp_location1 [gdb_get_line_number "s
 set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
@@ -40,7 +40,7 @@ if { [gdb_breakpoint ${srcfile}:${bp_loc
     pass "setting breakpoint 1"
 }
 
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
 
 gdb_test_no_output "disable"
 
@@ -48,4 +48,4 @@ if { [gdb_breakpoint ${srcfile}:${bp_loc
     pass "setting breakpoint 2"
 }
 
-gdb_test "cont" "Breakpoint .*:${bp_location2}.*" "Going to second breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location2}.*" "going to second breakpoint"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/handcall.exp ./gdb/testsuite/gdb.go/handcall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/handcall.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/handcall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,12 +23,12 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/hello.exp ./gdb/testsuite/gdb.go/hello.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/hello.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/hello.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,14 +23,14 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
@@ -39,14 +39,14 @@ setup_xfail "*-*-*"
 
 gdb_test "print st" \
     ".* = $hex \"\"" \
-    "Starting string check"
+    "starting string check"
 
 if { [gdb_breakpoint ${srcfile}:${bp_location1}] } {
     pass "setting breakpoint 1"
 }
 
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
 
 gdb_test "print st" \
     ".* = $hex \"Hello, world!\"" \
-    "String after assignment check"
+    "string after assignment check"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/integers.exp ./gdb/testsuite/gdb.go/integers.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/integers.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/integers.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
@@ -31,7 +31,7 @@ set bp_location1 [gdb_get_line_number "s
 set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
@@ -39,20 +39,20 @@ if { [gdb_breakpoint ${srcfile}:${bp_loc
     pass "setting breakpoint 1"
 }
 
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
 
-gdb_test "print i" ".* = 0" "Print i before assigned to 1"
+gdb_test "print i" ".* = 0" "print i before assigned to 1"
 
-gdb_test "next" "i = 1" "Next to 'i = 1' line"
-gdb_test "next" "j = 2" "Next to 'j = 2' line"
+gdb_test "next" "i = 1" "next to 'i = 1' line"
+gdb_test "next" "j = 2" "next to 'j = 2' line"
 # At that point, 
 # i should be equal to 1
 gdb_test "print i" " = 1" 
 # but j should still be equal to zero
-gdb_test "print j" " = 0" "Test j value before assignment"
+gdb_test "print j" " = 0" "test j value before assignment"
 
-gdb_test "next" "k = 3" "Next to 'k = 3' line"
-gdb_test "next" "l = k" "Next to 'l = k' line"
+gdb_test "next" "k = 3" "next to 'k = 3' line"
+gdb_test "next" "l = k" "next to 'l = k' line"
 
 #j should be equal to 2
 gdb_test "print j" " = 2"
@@ -101,7 +101,7 @@ gdb_test "print i+10*j+100*k" " = 321"
 gdb_test " print (i + 5) * (j + 7)" " = 54"
 
 gdb_test "set var i = 2" " = 2"
-gdb_test "print i" " = 2" "Testing new i value"
+gdb_test "print i" " = 2" "testing new i value"
 
 if { [gdb_breakpoint ${srcfile}:${bp_location2}] } {
     pass "setting breakpoint 2"
@@ -112,4 +112,4 @@ gdb_test "cont" \
 	 "Going to second breakpoint"
 gdb_test "print i" \
 	 ".* = 5.*" \
-	 "Value of i after assignment"
+	 "value of i after assignment"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/Makefile.in ./gdb/testsuite/gdb.go/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = \
-	chan handcall hello integers methods package \
-	strings types unsafe
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-rm -f *~ a.out
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/methods.exp ./gdb/testsuite/gdb.go/methods.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/methods.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/methods.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
@@ -32,7 +32,7 @@ set bp_location2 {(*main.T).Bar}
 set bp_location2_regexp {\(*main.T\).Bar}
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
@@ -40,10 +40,10 @@ if { [gdb_breakpoint ${bp_location1}] } 
     pass "setting breakpoint 1"
 }
 setup_xfail "*-*-*" ;# mangling issues IIRC
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
 
 if { [gdb_breakpoint ${bp_location2}] } {
     pass "setting breakpoint 2"
 }
 setup_xfail "*-*-*" ;# mangling issues IIRC
-gdb_test "cont" "Breakpoint .*:${bp_location2_regexp}.*" "Going to second breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location2_regexp}.*" "going to second breakpoint"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/package.exp ./gdb/testsuite/gdb.go/package.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/package.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/package.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ if { [skip_go_tests] } { continue }
 standard_testfile package1.go package2.go
 
 if  { [gdb_compile "${srcdir}/${subdir}/${testfile}2.go" "${binfile}2.o" object {debug go}] != "" } {
-    untested $testfile
+    untested "failed to compile"
     return -1
 }
  
 if  { [gdb_compile "${srcdir}/${subdir}/${testfile}1.go ${binfile}2.o" "${binfile}" executable "debug go libdir=[standard_output_file {}]"] != "" } {
-    untested $testfile
+    untested "failed to compile"
     return -1
 }
 
@@ -46,4 +46,4 @@ set bp_location1_regexp {package2[.]Foo.
 if { [gdb_breakpoint ${bp_location1}] } {
     pass "setting breakpoint 1"
 }
-gdb_test "cont" "Breakpoint .*${bp_location1_regexp}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*${bp_location1_regexp}.*" "going to first breakpoint"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/print.exp ./gdb/testsuite/gdb.go/print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/print.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/strings.exp ./gdb/testsuite/gdb.go/strings.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/strings.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/strings.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,12 +21,12 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/types.exp ./gdb/testsuite/gdb.go/types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,12 +23,12 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/unsafe.exp ./gdb/testsuite/gdb.go/unsafe.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.go/unsafe.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.go/unsafe.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,12 +23,12 @@ if { [skip_go_tests] } { continue }
 
 standard_testfile .go
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}] } {
     return -1
 }
 
 if { [go_runto_main] < 0 } {
-    untested $testfile
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/guile.exp ./gdb/testsuite/gdb.guile/guile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/guile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/guile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 # We want to do some tests when Guile is not present.
 gdb_test_multiple "guile (display 23) (newline)" "verify guile support" {
     -re "Undefined command.*$gdb_prompt $" {
-	unsupported "Guile not supported."
+	unsupported "guile not supported."
 	return
     }
     -re "not supported.*$gdb_prompt $"	{
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/Makefile ./gdb/testsuite/gdb.guile/Makefile
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/Makefile	2015-07-06 01:51:07.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/Makefile	1970-01-01 00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-
-srcdir = .
-
-EXECUTABLES =
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES) $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/Makefile.in ./gdb/testsuite/gdb.guile/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES =
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES) $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-arch.c ./gdb/testsuite/gdb.guile/scm-arch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-arch.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-arch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-arch.exp ./gdb/testsuite/gdb.guile/scm-arch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-arch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-arch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-block.c ./gdb/testsuite/gdb.guile/scm-block.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-block.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-block.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-block.exp ./gdb/testsuite/gdb.guile/scm-block.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-block.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-block.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-breakpoint.c ./gdb/testsuite/gdb.guile/scm-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-breakpoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-breakpoint.exp ./gdb/testsuite/gdb.guile/scm-breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-breakpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-breakpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -487,6 +487,18 @@ proc test_bkpt_registration {} {
     }
 }
 
+proc test_bkpt_address {} {
+    global decimal srcfile
+
+    # Leading whitespace is intentional!
+    gdb_scm_test_silent_cmd \
+	"guile (define bp1 (make-breakpoint \"  *multiply\"))" \
+	"create address breakpoint a '  *multiply'" 1
+
+    gdb_test "guile (register-breakpoint! bp1)" \
+	".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\."
+}
+
 test_bkpt_basic
 test_bkpt_deletion
 test_bkpt_cond_and_cmds
@@ -495,3 +507,4 @@ test_watchpoints
 test_bkpt_internal
 test_bkpt_eval_funcs
 test_bkpt_registration
+test_bkpt_address
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-cmd.c ./gdb/testsuite/gdb.guile/scm-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-cmd.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-cmd.exp ./gdb/testsuite/gdb.guile/scm-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-cmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_guile_tests] } { continue }
 
 if ![gdb_guile_runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-disasm.c ./gdb/testsuite/gdb.guile/scm-disasm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-disasm.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-disasm.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-disasm.exp ./gdb/testsuite/gdb.guile/scm-disasm.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-disasm.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-disasm.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-equal.c ./gdb/testsuite/gdb.guile/scm-equal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-equal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-equal.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-equal.exp ./gdb/testsuite/gdb.guile/scm-equal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-equal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-equal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error-1.scm ./gdb/testsuite/gdb.guile/scm-error-1.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error-1.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-error-1.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error-2.scm ./gdb/testsuite/gdb.guile/scm-error-2.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error-2.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-error-2.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error.exp ./gdb/testsuite/gdb.guile/scm-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-error.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.c ./gdb/testsuite/gdb.guile/scm-frame-args.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame-args.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.exp ./gdb/testsuite/gdb.guile/scm-frame-args.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame-args.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.scm ./gdb/testsuite/gdb.guile/scm-frame-args.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-args.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame-args.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame.exp ./gdb/testsuite/gdb.guile/scm-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-inline.c ./gdb/testsuite/gdb.guile/scm-frame-inline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-inline.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame-inline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-inline.exp ./gdb/testsuite/gdb.guile/scm-frame-inline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-frame-inline.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-frame-inline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
@@ -25,7 +25,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_guile_tests] } { continue }
 
 if ![runto main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-gsmob.exp ./gdb/testsuite/gdb.guile/scm-gsmob.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-gsmob.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-gsmob.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-iterator.c ./gdb/testsuite/gdb.guile/scm-iterator.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-iterator.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-iterator.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-iterator.exp ./gdb/testsuite/gdb.guile/scm-iterator.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-iterator.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-iterator.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-math.c ./gdb/testsuite/gdb.guile/scm-math.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-math.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-math.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-math.exp ./gdb/testsuite/gdb.guile/scm-math.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-math.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-math.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -292,7 +292,7 @@ proc test_value_compare {} {
 	"#t" "greater or equal, greater"
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c}]} {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile.c ./gdb/testsuite/gdb.guile/scm-objfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-objfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile.exp ./gdb/testsuite/gdb.guile/scm-objfile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-objfile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_guile_tests] } { continue }
 
 if ![gdb_guile_runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script.c ./gdb/testsuite/gdb.guile/scm-objfile-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-objfile-script.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script.exp ./gdb/testsuite/gdb.guile/scm-objfile-script.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-objfile-script.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script-gdb.in ./gdb/testsuite/gdb.guile/scm-objfile-script-gdb.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-objfile-script-gdb.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-objfile-script-gdb.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-parameter.exp ./gdb/testsuite/gdb.guile/scm-parameter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-parameter.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-parameter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,9 +52,9 @@ gdb_test_multiline "Simple gdb boolean p
 
 with_test_prefix "test-param" {
     gdb_test "guile (print (parameter-value test-param))" "= #t" "parameter value (true)"
-    gdb_test "show print test-param" "The state of the Test Parameter is on." "Show parameter on"
+    gdb_test "show print test-param" "The state of the Test Parameter is on." "show parameter on"
     gdb_test_no_output "set print test-param off"
-    gdb_test "show print test-param" "The state of the Test Parameter is off." "Show parameter off"
+    gdb_test "show print test-param" "The state of the Test Parameter is off." "show parameter off"
     gdb_test "guile (print (parameter-value test-param))" "= #f" "parameter value (false)"
     gdb_test "help show print test-param" "Show the state of the boolean test-param.*" "show help"
     gdb_test "help set print test-param" "Set the state of the boolean test-param.*" "set help"
@@ -187,9 +187,9 @@ gdb_test_no_output "guile (register-para
 
 with_test_prefix "previously-ambiguous" {
     gdb_test "guile (print (parameter-value prev-ambig))" "= #f" "parameter value (false)"
-    gdb_test "show print s" "Command is not documented is off." "Show parameter off"
+    gdb_test "show print s" "Command is not documented is off." "show parameter off"
     gdb_test_no_output "set print s on"
-    gdb_test "show print s" "Command is not documented is on." "Show parameter on"
+    gdb_test "show print s" "Command is not documented is on." "show parameter on"
     gdb_test "guile (print (parameter-value prev-ambig))" "= #t" "parameter value (true)"
     gdb_test "help show print s" "This command is not documented." "show help"
     gdb_test "help set print s" "This command is not documented." "set help"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-ports.c ./gdb/testsuite/gdb.guile/scm-ports.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-ports.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-ports.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-ports.exp ./gdb/testsuite/gdb.guile/scm-ports.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-ports.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-ports.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.c ./gdb/testsuite/gdb.guile/scm-pretty-print.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-pretty-print.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.exp ./gdb/testsuite/gdb.guile/scm-pretty-print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-pretty-print.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if { [skip_guile_tests] } { continue }
 proc run_lang_tests {exefile lang} {
     global srcdir subdir srcfile testfile hex
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
-	untested "Couldn't compile ${srcfile} in $lang mode"
+	untested "failed to compile in $lang mode"
 	return
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.scm ./gdb/testsuite/gdb.guile/scm-pretty-print.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-pretty-print.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-pretty-print.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-progspace.c ./gdb/testsuite/gdb.guile/scm-progspace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-progspace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-progspace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-progspace.exp ./gdb/testsuite/gdb.guile/scm-progspace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-progspace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-progspace.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,9 +73,9 @@ with_test_prefix "program unloaded" {
 # deleted.  We need to, for example, delete an inferior to get the progspace
 # to go away.
 
-gdb_test "add-inferior" "Added inferior 2" "Create new inferior"
-gdb_test "inferior 2" ".*" "Switch to new inferior"
-gdb_test_no_output "remove-inferiors 1" "Remove first inferior"
+gdb_test "add-inferior" "Added inferior 2" "create new inferior"
+gdb_test "inferior 2" ".*" "switch to new inferior"
+gdb_test_no_output "remove-inferiors 1" "remove first inferior"
 
 with_test_prefix "inferior removed" {
     gdb_test "gu (print (progspace-valid? progspace))" "= #f"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.c ./gdb/testsuite/gdb.guile/scm-section-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-section-script.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,12 +21,12 @@
 /* Put the path to the pretty-printer script in .debug_gdb_scripts so
    gdb will automagically loaded it.
    Normally "MS" would appear here, as in
-   .pushsection ".debug_gdb_scripts", "MS",@progbits,1
+   .pushsection ".debug_gdb_scripts", "MS",%progbits,1
    but we remove it to test files appearing twice in the section.  */
 
 #define DEFINE_GDB_SCRIPT(script_name) \
   asm("\
-.pushsection \".debug_gdb_scripts\", \"S\",@progbits\n\
+.pushsection \".debug_gdb_scripts\", \"S\",%progbits\n\
 .byte " XSTRING (SECTION_SCRIPT_ID_SCHEME_FILE) "\n\
 .asciz \"" script_name "\"\n\
 .popsection \n\
@@ -43,12 +43,12 @@ DEFINE_GDB_SCRIPT (SCRIPT_FILE)
 /* Inlined scripts are harder to create in the same way as
    DEFINE_GDB_SCRIPT_FILE.  Keep things simple and just define it here.
    Normally "MS" would appear here, as in
-   .pushsection ".debug_gdb_scripts", "MS",@progbits,1
+   .pushsection ".debug_gdb_scripts", "MS",%progbits,1
    but we remove it to test scripts appearing twice in the section.  */
 
 #define DEFINE_GDB_SCRIPT_TEXT \
 asm( \
-".pushsection \".debug_gdb_scripts\", \"S\",@progbits\n" \
+".pushsection \".debug_gdb_scripts\", \"S\",%progbits\n" \
 ".byte " XSTRING (SECTION_SCRIPT_ID_SCHEME_TEXT) "\n" \
 ".ascii \"gdb.inlined-script\\n\"\n" \
 ".ascii \"(define test-cmd\\n\"\n" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.exp ./gdb/testsuite/gdb.guile/scm-section-script.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-section-script.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.scm ./gdb/testsuite/gdb.guile/scm-section-script.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-section-script.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-section-script.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symbol.c ./gdb/testsuite/gdb.guile/scm-symbol.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symbol.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-symbol.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symbol.exp ./gdb/testsuite/gdb.guile/scm-symbol.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symbol.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-symbol.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -138,7 +138,7 @@ gdb_test "guile (print (symbol-symtab t)
 # C++ tests
 # Recompile binary.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" executable "debug c++"] != "" } {
-    untested "Couldn't compile ${srcfile} in c++ mode"
+    untested "failed to compile in C++ mode"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab-2.c ./gdb/testsuite/gdb.guile/scm-symtab-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab-2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-symtab-2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab.c ./gdb/testsuite/gdb.guile/scm-symtab.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-symtab.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab.exp ./gdb/testsuite/gdb.guile/scm-symtab.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-symtab.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-symtab.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile scm-symtab.c scm-symtab-2.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] debug]} {
     return
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-type.c ./gdb/testsuite/gdb.guile/scm-type.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-type.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-type.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-type.exp ./gdb/testsuite/gdb.guile/scm-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ proc build_inferior {exefile lang} {
     global srcdir subdir srcfile
 
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
-	untested "Couldn't compile ${srcfile} in $lang mode"
+	untested "failed to compile in $lang mode"
 	return -1
     }
     return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value.c ./gdb/testsuite/gdb.guile/scm-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-value.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value-cc.cc ./gdb/testsuite/gdb.guile/scm-value-cc.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value-cc.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-value-cc.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value-cc.exp ./gdb/testsuite/gdb.guile/scm-value-cc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value-cc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-value-cc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value.exp ./gdb/testsuite/gdb.guile/scm-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/scm-value.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/scm-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ proc build_inferior {exefile lang} {
 
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object "debug $lang"] != ""
 	 || [gdb_compile "${objfile}" "${exefile}" executable "debug $lang"] != "" } {
-	untested "Couldn't compile ${srcfile} in $lang mode"
+	untested "failed to compile in $lang mode"
 	return -1
     }
     return 0
@@ -91,6 +91,8 @@ proc test_value_in_inferior {} {
     global has_argv0
     set test "verify dereferenced value"
     if { $has_argv0 } {
+	gdb_test_no_output "set print elements unlimited" ""
+	gdb_test_no_output "set print repeats unlimited" ""
 	gdb_test "gu (print arg0)" "0x.*$testfile\"" $test
     } else {
 	unsupported $test
@@ -288,7 +290,7 @@ proc test_value_after_death {} {
     gdb_test "kill" "" "kill the inferior" \
 	"Kill the program being debugged. .y or n. $" \
 	"y"
-    gdb_test "file" "" "Discard the symbols" \
+    gdb_test "file" "" "discard the symbols" \
 	"Discard symbol table from.*y or n. $" \
 	"y"
 
@@ -318,7 +320,7 @@ proc test_subscript_regression {exefile 
     clean_restart ${exefile}
 
     if ![gdb_guile_runto_main ] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return
     }
 
@@ -448,7 +450,7 @@ test_value_hash
 # The following tests require execution.
 
 if ![gdb_guile_runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/source2.scm ./gdb/testsuite/gdb.guile/source2.scm
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/source2.scm	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/source2.scm	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 ;; This testcase is part of GDB, the GNU debugger.
 ;;
-;; Copyright 2008-2015 Free Software Foundation, Inc.
+;; Copyright 2008-2017 Free Software Foundation, Inc.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/types-module.cc ./gdb/testsuite/gdb.guile/types-module.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/types-module.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/types-module.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/types-module.exp ./gdb/testsuite/gdb.guile/types-module.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.guile/types-module.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.guile/types-module.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-guile.exp
 
 standard_testfile .cc
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmain.exp ./gdb/testsuite/gdb.java/jmain.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmain.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jmain.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,87 +0,0 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This file was based on jmisc.exp which in turn was written by
-# Anthony Green. (green@redhat.com)
-
-load_lib "java.exp"
-
-if { [skip_java_tests] } { continue }
-
-standard_testfile .java
-if {[compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != ""} {
-    continue
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-# Check that plain old "main" works.  The load should both set the
-# language to java and (since --main=jmain), some how set the scope to
-# jmain's main.
-
-# Where the breakpoint should always land
-
-set bpmain "Breakpoint .* file .*jmain.java, line 5\."
-
-# Where GCC PR 16439 puts the breakpoint.
-set earlybpmain "Breakpoint .* file .*jmain.java, line 4\."
-
-gdb_load "${binfile}"
-setup_kfail java/1567 *-*-*
-gdb_test "break main" "${bpmain}"
-
-# Check that an unqualified "main" works.
-
-gdb_load "${binfile}"
-setup_kfail java/1565 *-*-*
-gdb_test "break jmain.main" "${bpmain}"
-
-# Check that a fully qualified "main" works.
-gdb_load "${binfile}"
-set cmd "break ${testfile}.main(java.lang.String\[\])"
-set msg $cmd
-gdb_test_multiple $cmd $msg {
-    -re "${bpmain}\r\n$gdb_prompt $" {
-	pass $msg
-    }
-    -re "${earlybpmain}\r\n$gdb_prompt $" {
-	setup_xfail *-*-* gcc/16439
-	fail $msg
-    }
-    -re "Make breakpoint pending.* \\(y or \\\[n\\\]\\) $" {
-	gdb_test "n" "" ""
-
-	# Check again with a method signature at the end.
-	set cmd "break ${testfile}.main(java.lang.String\[\])void"
-	set msg $cmd
-	gdb_test_multiple $cmd $msg {
-	    -re "${bpmain}\r\n$gdb_prompt $" {
-		pass $msg
-	    }
-	    -re "${earlybpmain}\r\n$gdb_prompt $" {
-		setup_xfail *-*-* gcc/16439
-		fail $msg
-	    }
-	}
-    }
-}
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmain.java ./gdb/testsuite/gdb.java/jmain.java
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmain.java	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jmain.java	1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-public class jmain
-{
-  public static void main (String[] args)
-    {
-	return;
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmisc.exp ./gdb/testsuite/gdb.java/jmisc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmisc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jmisc.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,104 +0,0 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This file was written by Anthony Green. (green@redhat.com)
-#
-
-load_lib "java.exp"
-
-if { [skip_java_tests] } { continue }
-
-standard_testfile .java
-if {[compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != ""} {
-    continue
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_java] then {
-    # Ref PR gdb:java/1565.  Don't use the simpler "break jmisc.main".
-    # As of 2004-02-24 it wasn't working and is being tested separatly.
-    # Before GCJ 4.1 (approximately) the demangled name did not include
-    # a method signature; after that point it does include a trailing
-    # signature.
-    runto_main
-    set function "${testfile}.main(java.lang.String\[\])"
-    gdb_breakpoint "$function" allow-pending
-    gdb_breakpoint "${function}void" allow-pending
-    gdb_continue_to_breakpoint $function
-
-    gdb_test_multiple "ptype jmisc" "ptype jmisc" {
-	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" {
-	    pass "ptype jmisc"
-	}
-	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+jmisc\\(\\);\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" {
-	    pass "ptype jmisc"
-	}
-    }
-
-    gdb_test "p args" \
-	"\\\$1 = java\.lang\.String\\\[]@\[a-f0-9]+"
-
-    gdb_test_multiple "p *args" "p *args" {
-	-re "\\\$2 = \{length: 0\}\[\r\n\ \t]+$gdb_prompt $" {
-	    pass "p *args"
-	}
-	-re "\\\$2 = cannot find java.lang.Object.*$gdb_prompt $" {
-	    # Sometimes GCC 4.x does not emit the necessary information
-	    # about java.lang.Object.
-	    kfail "p *args" gdb/2214
-	}
-    }
-
-    # The idea of running to 'exit' is that 'exit' is in a different
-    # objfile from the rest of the program (provided that program is
-    # linked normally with a shared libc).  That causes gdb to examine
-    # fresh objfiles.  There is nothing important about 'exit'
-    # semantics; it could be any symbol that is in a shared library.
-    # -- chastain 2003-08-06
-
-    if [gdb_breakpoint exit] {
-	pass "break exit"
-    }
-    gdb_test_multiple "continue" "continue to exit" {
-	-re ".*Breakpoint $decimal, .*exit.*$gdb_prompt $" {
-	    pass "continue to exit"
-	}
-	-re ".*internal-error: sect_index_text not initialized.*\\(y or n\\) " {
-	    # gdb choked on the "anonymous objfile" (probably).
-	    kfail "gdb/1322" "continue to exit"
-	    # get back to the gdb prompt
-	    gdb_test_multiple "no" "internal sync 1" {
-		-re ".*\\(y or n\\) " {
-		    gdb_test_multiple "no" "internal sync 2" {
-			-re ".*$gdb_prompt $" { ; }
-		    }
-		}
-	    }
-	}
-    }
-
-    # Test a non-mathing return type really fails the look up.
-    gdb_test_no_output "set breakpoint pending off"
-    gdb_test {break jmisc.main(java.lang.String[])int} {Function "jmisc\.main\(java\.lang\.String\[\]\)int" not defined\.}
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmisc.java ./gdb/testsuite/gdb.java/jmisc.java
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jmisc.java	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jmisc.java	1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-public class jmisc
-{
-  public static void main (String[] args)
-  {
-    return;
-  }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jnpe.exp ./gdb/testsuite/gdb.java/jnpe.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jnpe.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jnpe.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,55 +0,0 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-load_lib "java.exp"
-
-standard_testfile .java
-if  { [compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != "" } {
-    untested "Couldn't compile $subdir/${srcfile}"
-    return -1
-}
-
-# Start with a fresh gdb.
-
-clean_restart $testfile
-
-set line [gdb_get_line_number "break here" $testfile.java]
-if ![runto "$testfile.java:$line"] then {
-    perror "couldn't run to jnpe.main"
-    continue
-} 
-
-if {![skip_unwinder_tests]} {
-    unsupported "jnpe.exp could not find _Unwind_DebugHook"
-    return -1
-}
-
-gdb_test "handle SIGSEGV nostop noprint" \
-  "SIGSEGV.*fault" \
-  "disable SIGSEGV for next-over-NPE"
-
-# The line where we stop differs according to gcj; just check that we
-# did not already execute the catch point.  This is done in a somewhat
-# funny way due to other gcj debuginfo oddities that don't
-# meaningfully affect the user's experience.
-
-gdb_test "next" \
-  ".*" \
-  "next over NPE"
-
-set line [gdb_get_line_number "stop point"]
-gdb_breakpoint $line
-gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Breakpoint .*:$line\[\r\n\]*.*// stop point\[\r\n\]*" \
-  "continue to success for next-over-NPE"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jnpe.java ./gdb/testsuite/gdb.java/jnpe.java
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jnpe.java	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jnpe.java	1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-// Test next-over-NPE.
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2009-2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-public class jnpe
-{
-  public static String npe ()
-  {
-    return ((Object) null).toString();
-  }
-
-  public static void main (String[] args)
-  {
-    try
-      {
-	System.out.println (npe ()); // break here
-      }
-    catch (NullPointerException n)
-      {
-	System.out.println ("success");
-      }
-
-    System.out.println ("blah");	// stop point
-  }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jprint.exp ./gdb/testsuite/gdb.java/jprint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jprint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jprint.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,77 +0,0 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This file was written by Jeff Johnston. (jjohnstn@redhat.com)
-#
-
-load_lib "java.exp"
-
-if { [skip_java_tests] } { continue }
-
-standard_testfile .java
-if {[compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != ""} {
-    continue
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_java] then {
-    # Ref PR gdb:java/1565.  Don't use the simpler "break jmisc.main".
-    # As of 2004-02-24 it wasn't working and is being tested separatly.
-    # Before GCJ 4.1 (approximately) the demangled name did not include
-    # a method signature; after that point it does include a trailing
-    # signature.
-    runto_main
-    set function "${testfile}.main(java.lang.String\[\])"
-    gdb_breakpoint "$function" allow-pending
-    gdb_breakpoint "${function}void" allow-pending
-    gdb_continue_to_breakpoint $function
-
-    gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call"
-
-    gdb_test "next" ""
-    gdb_test "next" ""
-
-    gdb_test "p x.print(44)" " = 44" "single argument call"
-    gdb_test "p x.print(22,33)" " = 33" "double argument call"
-    gdb_test "p x.dothat(55)" " = 62.*" "virtual fn call"
-    gdb_test "p x.addprint(1,2,3)" "= 6" "inherited static call"
-    gdb_test "p x.addk(44)" " = 121" "inherited virtual fn call"
-
-    # Regression test for a crasher.
-    # GCC does not output location information for static class members,
-    # so GDB will report these as "optimized out". See gcc/43260.
-    setup_xfail *-*-* gcc/43260
-    gdb_test "print *jprint.props" " = .*" "print a java.util.Properties"
-
-    set test "print a java.lang.String"
-    gdb_test_multiple "print jprint.hi" $test {
-	-re " = java.lang.String \"hi maude\"\r\n$gdb_prompt $" {
-	    pass $test
-	}
-	-re "There is no member named data\\.\r\n$gdb_prompt $" {
-	    # GCJ system debug info for java.lang.String is not installed.
-	    xfail $test
-	}
-    }
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jprint.java ./gdb/testsuite/gdb.java/jprint.java
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jprint.java	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jprint.java	1970-01-01 00:00:00.000000000 +0000
@@ -1,68 +0,0 @@
-// jprint.java test program.
-//
-// Copyright 2004-2015 Free Software Foundation, Inc.
-//
-// Written by Jeff Johnston <jjohnstn@redhat.com> 
-// Contributed by Red Hat
-//
-// This file is part of GDB.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import java.util.Properties;
-
-class jvclass {
-  public static int k;
-  static {
-    k = 77;
-  }
-  public static int addprint (int x, int y, int z) {
-    int sum = x + y + z;
-    System.out.println ("sum is " + sum);
-    return sum;
-  }
-
-  public int addk (int x) {
-    int sum = x + k;
-    System.out.println ("adding k gives " + sum);
-    return sum;
-  }
-}
-    
-public class jprint extends jvclass {
-  public static Properties props = new Properties ();
-  public static String hi = "hi maude";
-
-  public int dothat (int x) {
-    int y = x + 3;
-    System.out.println ("new value is " + y);
-    return y + 4;
-  }
-  public static int print (int x) {
-    System.out.println("x is " + x);
-    return x;
-  }
-  public static int print (int x, int y) {
-    System.out.println("y is " + y);
-    return y;
-  }
-  public static void main(String[] args) {
-    jprint x = new jprint ();
-    x.dothat (44);
-    print (k, 33);
-    print (x.addk(0), 33);
-  }
-}
-
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jv-exp.exp ./gdb/testsuite/gdb.java/jv-exp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jv-exp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jv-exp.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,41 +0,0 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-load_lib "java.exp"
-
-proc test_comparisons {} {
-    global gdb_prompt
-
-    # Test various comparisons.
-
-    gdb_test "p 1 > 2" " = false"
-    gdb_test "p 1 < 2" " = true"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" "" ""
-gdb_test "set width 0" ""
-
-if [set_lang_java] then {
-    test_comparisons
-} else {
-    warning "Java expression tests suppressed"
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jv-print.exp ./gdb/testsuite/gdb.java/jv-print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/jv-print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/jv-print.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,153 +0,0 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-load_lib "java.exp"
-
-if { [skip_java_tests] } { continue }
-
-proc test_integer_literals_accepted {} {
-    global gdb_prompt
-
-    # Test various decimal values.
-
-    gdb_test "p 123" " = 123"
-    gdb_test "p -123" " = -123"
-    gdb_test "p/d 123" " = 123"
-
-    # Test various octal values.
-
-    gdb_test "p 0123" " = 83"
-    gdb_test "p 00123" " = 83"
-    gdb_test "p -0123" " = -83"
-    gdb_test "p/o 0123" " = 0123"
-
-    # Test various hexadecimal values.
-
-    gdb_test "p 0x123" " = 291"
-    gdb_test "p -0x123" " = -291"
-    gdb_test "p 0x0123" " = 291"
-    gdb_test "p -0x0123" " = -291"
-    gdb_test "p 0xABCDEF" " = 11259375"
-    gdb_test "p 0xabcdef" " = 11259375"
-    gdb_test "p 0xAbCdEf" " = 11259375"
-    gdb_test "p/x 0x123" " = 0x123"
-}
-
-proc test_character_literals_accepted {} {
-    global gdb_prompt
-
-    gdb_test "p 'a'" " = 'a'"
-    gdb_test "p/c 'a'" " = 'a'"
-    gdb_test "p/c 70" " = 'F'"
-    gdb_test "p/x 'a'" " = 0x61"
-    gdb_test "p/d 'a'" " = 97"
-    gdb_test "p/t 'a'" " = 1100001"
-    gdb_test "p/x '\\377'" " = 0xff"
-    gdb_test "p '\\''" " = '\\\\''"
-    # Note "p '\\'" => "= 92 '\\'"
-    gdb_test "p '\\\\'" " = '\\\\\\\\'"
-
-    # Test the /c print format.
-}
-
-proc test_integer_literals_rejected {} {
-    global gdb_prompt
-
-    test_print_reject "p 0x" 
-    gdb_test "p ''" "Empty character constant"
-    gdb_test "p '''" "Empty character constant"
-    test_print_reject "p '\\'"
-
-    # Note that this turns into "p '\\\'" at gdb's input.
-    test_print_reject "p '\\\\\\'"
-
-    # Test various decimal values.
-
-    test_print_reject "p DEADBEEF"
-
-    test_print_reject "p 123DEADBEEF"
-    test_print_reject "p 123foobar.bazfoo3"
-    test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
-    gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
-
-    # Test various octal values.
-
-    test_print_reject "p 09" 
-    test_print_reject "p 079" 
-
-    # Test various hexadecimal values.
-
-    test_print_reject "p 0xG" 
-    test_print_reject "p 0xAG" 
-}
-
-proc test_float_accepted {} {
-    global gdb_prompt
-
-    # Test parsing of fp value with legit text following.
-    gdb_test "p 1234.5+1" " = 1235.5" "check fp + text"
-
-    # Test all the suffixes (including no suffix).
-    gdb_test "p 1." " = 1"
-    gdb_test "p 1.5" " = 1.5"
-    gdb_test "p 1.f" " = 1"
-    gdb_test "p 1.5f" " = 1.5"
-    gdb_test "p 1.d" " = 1"
-    gdb_test "p 1.5d" " = 1.5"
-
-    # Test hexadecimal floating point.
-    set test "p 0x1.1"
-    gdb_test_multiple $test $test {
-	-re " = 1\\.0625\r\n$gdb_prompt $" {
-	    pass $test
-	}
-	-re "Invalid number \"0x1\\.1\"\r\n$gdb_prompt $" {
-	    # Older glibc does not support hex float, newer does.
-	    xfail $test
-	}
-    }
-}
-
-proc test_float_rejected {} {
-    # Test bad suffixes.
-    test_print_reject "p 1.1x"
-    test_print_reject "p 1.1ff"
-    test_print_reject "p 1.1dd"
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "print \$pc" "No registers\\."
-# FIXME: should also test "print $pc" when there is an execfile but no
-# remote debugging target, process or corefile.
-
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" "" ""
-gdb_test "set width 0" ""
-
-if [set_lang_java] then {
-    test_integer_literals_accepted
-    test_character_literals_accepted
-    test_integer_literals_rejected
-    test_float_accepted
-    test_float_rejected
-} else {
-    warning "Java print command tests suppressed"
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/Makefile.in ./gdb/testsuite/gdb.java/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.java/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.java/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-.SUFFIXES: .java .class .o .exe .exp .check
-
-# Do 'make javamisc.check' to run just the javamisc.exp test.
-
-.exp.check:
-	rootme=`pwd`/; export rootme; \
-	cd .. ; \
-	$(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $*.exp" \
-	  EXPECT=${EXPECT}
-
-clean mostlyclean:
-	-rm -f *.o ${OBJS}  *.class *.exe *~ core jmain jmisc jnpe jprint
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/3explicit.c ./gdb/testsuite/gdb.linespec/3explicit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/3explicit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/3explicit.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2013-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static int
+myfunction4 (int arg)
+{
+  return arg + 2;
+}
+
+int
+myfunction3 (int arg)
+{
+  return myfunction4 (arg);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/base/one/header.h ./gdb/testsuite/gdb.linespec/base/one/header.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/base/one/header.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/base/one/header.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/base/two/header.h ./gdb/testsuite/gdb.linespec/base/two/header.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/base/two/header.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/base/two/header.h	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-ask.exp ./gdb/testsuite/gdb.linespec/break-ask.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-ask.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/break-ask.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile lspec.cc
 
 if {[skip_cplus_tests]} {
-    unsupported ${testfile}.exp
+    unsupported "skipping C++ tests"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file0.s ./gdb/testsuite/gdb.linespec/break-asm-file0.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file0.s	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/break-asm-file0.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file1.s ./gdb/testsuite/gdb.linespec/break-asm-file1.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file1.s	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/break-asm-file1.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file.c ./gdb/testsuite/gdb.linespec/break-asm-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/break-asm-file.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file.exp ./gdb/testsuite/gdb.linespec/break-asm-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/break-asm-file.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/break-asm-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/cpexplicit.cc ./gdb/testsuite/gdb.linespec/cpexplicit.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/cpexplicit.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/cpexplicit.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,63 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2012-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+class myclass
+{
+public:
+  static int myfunction (int arg)  /* entry location */
+  {
+    int i, j, r;
+
+    j = 0; /* myfunction location */
+    r = arg;
+
+  top:
+    ++j;  /* top location */
+
+    if (j == 10)
+      goto done;
+
+    for (i = 0; i < 10; ++i)
+      {
+	r += i;
+	if (j % 2)
+	  goto top;
+      }
+
+  done:
+    return r;
+  }
+
+  int operator, (const myclass& c) { return 0; } /* operator location */
+};
+
+int
+main (void)
+{
+  int i, j;
+
+  /* Call the test function repeatedly, enough times for all our tests
+     without running forever if something goes wrong.  */
+  myclass c, d;
+  for (i = 0, j = 0; i < 1000; ++i)
+    {
+      j += myclass::myfunction (0);
+      j += (c,d);
+    }
+
+  return j;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/cpexplicit.exp ./gdb/testsuite/gdb.linespec/cpexplicit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/cpexplicit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/cpexplicit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,112 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tests for explicit linespecs
+
+if {[skip_cplus_tests]} {
+    unsupported "skipping C++ tests"
+    return
+}
+
+standard_testfile .cc
+set exefile $testfile
+
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
+	 {c++ debug nowarnings}]} {
+    return -1
+}
+
+# Wrap this whole test in a namespace to avoid contaminating other tests.
+namespace eval $testfile {
+    # Test the given (explicit) LINESPEC which should cause gdb to break
+    # at LOCATION.
+    proc test_breakpoint {linespec location} {
+
+	# Delete all breakpoints, set a new breakpoint at LINESPEC,
+	# and attempt to run to it.
+	delete_breakpoints
+	gdb_breakpoint $linespec
+	gdb_continue_to_breakpoint $linespec $location
+    }
+
+    # Add the given LINESPEC to the array named in THEARRAY.  GDB is expected
+    # to stop at LOCATION.
+    proc add {thearray linespec location} {
+	upvar $thearray ar
+
+	lappend ar(linespecs) $linespec
+	lappend ar(locations) $location
+    }
+
+    # Some locations used in this test
+    variable lineno
+    variable location
+    set lineno(normal) [gdb_get_line_number "myfunction location" $srcfile]
+    set lineno(entry) [gdb_get_line_number "entry location" $srcfile]
+    set lineno(top) [gdb_get_line_number "top location" $srcfile]
+    set lineno(operator) [gdb_get_line_number "operator location" $srcfile]
+    foreach v [array names lineno] {
+	set location($v) ".*[string_to_regexp "$srcfile:$lineno($v)"].*"
+    }
+
+    # A list of explicit linespecs and the corresponding location
+    variable linespecs
+    set linespecs(linespecs) {}
+    set linespecs(location) {}
+
+    add linespecs "-source $srcfile -function myclass::myfunction" \
+	$location(normal)
+    add linespecs "-source $srcfile -function myclass::myfunction -label top" \
+	$location(top)
+
+    # This isn't implemented yet; -line is silently ignored.
+    add linespecs \
+	"-source $srcfile -function myclass::myfunction -label top -line 3" \
+	$location(top)
+    add linespecs "-source $srcfile -line $lineno(top)" $location(top)
+    add linespecs "-function myclass::myfunction" $location(normal)
+    add linespecs "-function myclass::myfunction -label top" $location(top)
+
+    # These are also not yet supported; -line is silently ignored.
+    add linespecs "-function myclass::myfunction -line 3" $location(normal)
+    add linespecs "-function myclass::myfunction -label top -line 3" \
+	$location(top)
+    add linespecs "-line 3" $location(normal)
+    add linespecs "-function myclass::operator," $location(operator)
+    add linespecs "-function 'myclass::operator,'" $location(operator)
+    add linespecs "-function \"myclass::operator,\"" $location(operator)
+
+    # Fire up gdb.
+    if {![runto_main]} {
+	namespace delete $testfile
+	return -1
+    }
+
+    # Test explicit linespecs, with and without conditions.
+    foreach linespec $linespecs(linespecs) loc_pattern $linespecs(locations) {
+	# Test the linespec
+	test_breakpoint $linespec $loc_pattern
+    }
+
+    # Special (orphaned) dprintf cases.
+    gdb_test "dprintf -function myclass::operator,,\"hello\"" \
+	"Dprintf .*$srcfile, line $lineno(operator)\\."
+    gdb_test "dprintf -function 'myclass::operator,',\"hello\"" \
+	"Dprintf .*$srcfile, line $lineno(operator)\\."
+    gdb_test "dprintf -function \"myclass::operator,\",\"hello\"" \
+	"Dprintf .*$srcfile, line $lineno(operator)\\."
+}
+
+namespace delete $testfile
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit2.c ./gdb/testsuite/gdb.linespec/explicit2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit2.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/explicit2.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2013-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern int myfunction3 (int arg);
+
+int
+myfunction2 (int arg)
+{
+  return myfunction3 (arg);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit.c ./gdb/testsuite/gdb.linespec/explicit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/explicit.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,71 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2012-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern int myfunction2 (int arg);
+
+static int
+myfunction (int arg)
+{
+  int i, j, r;
+
+  j = 0; /* myfunction location */
+  r = arg;
+
+ top:
+  ++j;  /* top location */
+
+  if (j == 10)
+    goto done;
+
+  for (i = 0; i < 10; ++i)
+    {
+      r += i;
+      if (j % 2)
+	goto top;
+    }
+
+ done:
+  return r;
+}
+
+static int
+my_unique_function_name (int arg)
+{
+  int j = 0;
+
+  /* Just do something random.  We only care about the unique function
+     name.  */
+  if (arg == 50)
+    j = 10;
+
+  return j;
+}
+
+int
+main (void)
+{
+  int i, j;
+
+  /* Call the test function repeatedly, enough times for all our tests
+     without running forever if something goes wrong.  */
+  for (i = 0, j = 0; i < 1000; ++i)
+    j += myfunction (0);
+
+  my_unique_function_name (j);
+
+  return myfunction2 (j);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit.exp ./gdb/testsuite/gdb.linespec/explicit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/explicit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/explicit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,409 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tests for explicit locations
+
+standard_testfile explicit.c explicit2.c 3explicit.c
+set exefile $testfile
+
+if {[prepare_for_testing "failed to prepare" $exefile \
+	 [list $srcfile $srcfile2 $srcfile3] {debug nowarnings}]} {
+    return -1
+}
+
+# Wrap the entire test in a namespace to avoid contaminating other tests.
+namespace eval $testfile {
+
+    # Test the given (explicit) LINESPEC which should cause gdb to break
+    # at LOCATION.
+    proc test_breakpoint {linespec location} {
+
+	set testname "set breakpoint at \"$linespec\""
+	# Delete all breakpoints, set a new breakpoint at LINESPEC,
+	# and attempt to run to it.
+	delete_breakpoints
+	if {[gdb_breakpoint $linespec]} {
+	    pass $testname
+	    send_log "\nexpecting locpattern \"$location\"\n"
+	    gdb_continue_to_breakpoint $linespec $location
+	} else {
+	    fail $testname
+	}
+    }
+
+    # Add the given LINESPEC to the array named in THEARRAY.  GDB is expected
+    # to stop at LOCATION.
+    proc add {thearray linespec location} {
+	upvar $thearray ar
+
+	lappend ar(linespecs) $linespec
+	lappend ar(locations) $location
+    }
+
+    # A list of all explicit linespec arguments.
+    variable all_arguments
+    set all_arguments {"source" "function" "label" "line"}
+
+    # Some locations used in this test
+    variable lineno
+    variable location
+    set lineno(normal) [gdb_get_line_number "myfunction location" $srcfile]
+    set lineno(top) [gdb_get_line_number "top location" $srcfile]
+    foreach v [array names lineno] {
+	set location($v) ".*[string_to_regexp "$srcfile:$lineno($v)"].*"
+    }
+
+    # A list of explicit locations and the corresponding location.
+    variable linespecs
+    set linespecs(linespecs) {}
+    set linespecs(location) {}
+
+    add linespecs "-source $srcfile -function myfunction" $location(normal)
+    add linespecs "-source $srcfile -function myfunction -label top" \
+	$location(top)
+
+    # This isn't implemented yet; -line is silently ignored.
+    add linespecs "-source $srcfile -function myfunction -label top -line 3" \
+	$location(top)
+    add linespecs "-source $srcfile -line $lineno(top)" $location(top)
+    add linespecs "-function myfunction" $location(normal)
+    add linespecs "-function myfunction -label top" $location(top)
+
+    # These are also not yet supported; -line is silently ignored.
+    add linespecs "-function myfunction -line 3" $location(normal)
+    add linespecs "-function myfunction -label top -line 3" $location(top)
+    add linespecs "-line 3" $location(normal)
+
+    # Fire up gdb.
+    if {![runto_main]} {
+	return -1
+    }
+
+    # Turn off queries
+    gdb_test_no_output "set confirm off"
+
+    # Simple error tests (many more are tested in ls-err.exp)
+    foreach arg $all_arguments {
+	# Test missing argument
+	gdb_test "break -$arg" \
+	    [string_to_regexp "missing argument for \"-$arg\""]
+
+	# Test abbreviations
+	set short [string range $arg 0 3]
+	gdb_test "break -$short" \
+	    [string_to_regexp "missing argument for \"-$short\""]
+    }
+
+    # Test invalid arguments
+    foreach arg {"-foo" "-foo bar" "-function myfunction -foo" \
+		     "-function -myfunction -foo bar"} {
+	gdb_test "break $arg" \
+	    [string_to_regexp "invalid explicit location argument, \"-foo\""]
+    }
+
+    # Test explicit locations, with and without conditions.
+    # For these tests, it is easiest to turn of pending breakpoint.
+    gdb_test_no_output "set breakpoint pending off" \
+	"turn off pending breakpoints"
+
+    foreach linespec $linespecs(linespecs) loc_pattern $linespecs(locations) {
+
+	# Test the linespec
+	test_breakpoint $linespec $loc_pattern
+
+	# Test with a valid condition
+	delete_breakpoints
+	set tst "set breakpoint at \"$linespec\" with valid condition"
+	if {[gdb_breakpoint "$linespec if arg == 0"]} {
+	    pass $tst
+
+	    gdb_test "info break" ".*stop only if arg == 0.*" \
+		"info break of conditional breakpoint at \"$linespec\""
+	} else {
+	    fail $tst
+	}
+
+	# Test with invalid condition
+	gdb_test "break $linespec if foofoofoo == 1" \
+	    ".*No symbol \"foofoofoo\" in current context.*" \
+	    "set breakpoint at \"$linespec\" with invalid condition"
+
+	# Test with thread
+	delete_breakpoints
+	gdb_test "break $linespec thread 123" "Unknown thread 123."
+    }
+
+    # Tests below are about tab-completion, which doesn't work if readline
+    # library isn't used.  Check it first.
+    if { [readline_is_used] } {
+
+	# Test the explicit location completer
+	foreach abbrev {"fun" "so" "lab" "li"}  full {"function" "source" "label" "line"} {
+	    set tst "complete 'break -$abbrev'"
+	    send_gdb "break -${abbrev}\t"
+	    gdb_test_multiple "" $tst {
+		-re "break -$full " {
+		    send_gdb "\n"
+		    gdb_test_multiple "" $tst {
+			-re "missing argument for \"-$full\".*$gdb_prompt " {
+			    pass $tst
+			}
+		    }
+		}
+	    }
+	    set tst "complete -$full with no value"
+	    send_gdb "break -$full \t"
+	    gdb_test_multiple "" $tst {
+		-re ".*break -$full " {
+		    send_gdb "\n"
+		    gdb_test_multiple "" $tst {
+			-re ".*Source filename requires function, label, or line offset\..*$gdb_prompt " {
+			    if {[string equal $full "source"]} {
+				pass $tst
+			    } else {
+				fail $tst
+			    }
+			}
+			-re "missing argument for \"-$full\".*$gdb_prompt " {
+			    pass $tst
+			}
+		    }
+		}
+	    }
+	}
+
+	set tst "complete unique function name"
+	send_gdb "break -function my_unique_func\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -function my_unique_function_name" {
+		send_gdb "\n"
+		gdb_test "" ".*Breakpoint \[0-9\]+.*" $tst
+		gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
+	    }
+	}
+
+	set tst "complete non-unique function name"
+	send_gdb "break -function myfunc\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -function myfunc\\\x07tion" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\r\nmyfunction\[ \t\]+myfunction2\[ \t\]+myfunction3\[ \t\]+myfunction4\[ \t\]+\r\n$gdb_prompt " {
+			gdb_test "2" ".*Breakpoint \[0-9\]+.*" $tst
+			gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
+		    }
+		}
+	    }
+	}
+
+	set tst "complete non-existant function name"
+	send_gdb "break -function foo\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -function foo\\\x07" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\\\x07" {
+			send_gdb "\n"
+			gdb_test "" {Function "foo" not defined.} $tst
+		    }
+		}
+	    }
+	}
+
+	set tst "complete unique file name"
+	send_gdb "break -source 3ex\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -source 3explicit.c " {
+		send_gdb "\n"
+		gdb_test "" \
+		    {Source filename requires function, label, or line offset.} $tst
+	    }
+	}
+
+	set tst "complete non-unique file name"
+	send_gdb "break -source exp\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -source exp\\\x07licit" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\r\nexplicit.c\[ \t\]+explicit2.c\[ \t\]+\r\n$gdb_prompt" {
+			send_gdb "\n"
+			gdb_test "" \
+			    {Source filename requires function, label, or line offset.} \
+			    $tst
+		    }
+		}
+	    }
+
+	    -re "break -source exp\\\x07l" {
+		# This pattern may occur when glibc debuginfo is installed.
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\r\nexplicit.c\[ \t\]+explicit2.c\[ \t\]+expl.*\r\n$gdb_prompt" {
+			send_gdb "\n"
+			gdb_test "" \
+			    {Source filename requires function, label, or line offset.} \
+			    $tst
+		    }
+		}
+	    }
+	}
+
+	set tst "complete non-existant file name"
+	send_gdb "break -source foo\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -source foo" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\\\x07" {
+			send_gdb "\n"
+			gdb_test "" \
+			    {Source filename requires function, label, or line offset.} \
+			    $tst
+		    }
+		}
+	    }
+	}
+
+	set tst "complete filename and unique function name"
+	send_gdb "break -source explicit.c -function ma\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -source explicit.c -function main " {
+		send_gdb "\n"
+		gdb_test "" ".*Breakpoint .*" $tst
+		gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
+	    }
+	}
+
+	set tst "complete filename and non-unique function name"
+	send_gdb "break -so 3explicit.c -func myfunc\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -so 3explicit.c -func myfunc\\\x07tion" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\r\nmyfunction3\[ \t\]+myfunction4\[ \t\]+\r\n$gdb_prompt " {
+			gdb_test "3" ".*Breakpoint \[0-9\]+.*" $tst
+			gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
+		    }
+		}
+	    }
+	}
+
+	set tst "complete filename and non-existant function name"
+	send_gdb "break -sou 3explicit.c -fun foo\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -sou 3explicit.c -fun foo\\\x07" {
+		send_gdb "\t\t"
+		gdb_test_multiple "" $tst {
+		    -re "\\\x07\\\x07" {
+			send_gdb "\n"
+			gdb_test "" \
+			    {Function "foo" not defined in "3explicit.c".} $tst
+		    }
+		}
+	    }
+	}
+
+	set tst "complete filename and function reversed"
+	send_gdb "break -func myfunction4 -source 3ex\t"
+	gdb_test_multiple "" $tst {
+	    -re "break -func myfunction4 -source 3explicit.c " {
+		send_gdb "\n"
+		gdb_test "" "Breakpoint \[0-9\]+.*" $tst
+		gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
+	    }
+	}
+
+	# NOTE: We don't bother testing more elaborate combinations of options,
+	# such as "-func main -sour 3ex\t" (main is defined in explicit.c).
+	# The completer cannot handle these yet.
+
+    }
+    # End of completion tests.
+
+    # Test pending explicit breakpoints
+    gdb_exit
+    gdb_start
+
+    set tst "pending invalid conditional explicit breakpoint"
+    if {![gdb_breakpoint "-func myfunction if foofoofoo == 1" \
+	      allow-pending]} {
+	fail "set $tst"
+    } else {
+	gdb_test "info break" ".*PENDING.*myfunction if foofoofoo == 1.*" $tst
+    }
+
+    gdb_exit
+    gdb_start
+
+    set tst "pending valid conditional explicit breakpoint"
+    if {![gdb_breakpoint "-func myfunction if arg == 0" \
+	      allow-pending]} {
+	fail "set $tst"
+    } else {
+	gdb_test "info break" ".*PENDING.*myfunction if arg == 0" $tst
+
+	gdb_load [standard_output_file $exefile]
+	gdb_test "info break" \
+	    ".*in myfunction at .*$srcfile:.*stop only if arg == 0.*" \
+	    "$tst resolved"
+    }
+
+    # Test interaction of condition command and explicit linespec conditons.
+    gdb_exit
+    gdb_start
+    gdb_load [standard_output_file $exefile]
+
+    set tst "condition_command overrides explicit linespec condition"
+    if {![runto main]} {
+	fail $tst
+    } else {
+	if {![gdb_breakpoint "-func myfunction if arg == 1"]} {
+	    fail "set breakpoint with condition 'arg == 1'"
+	} else {
+	    gdb_test_no_output "cond 2 arg == 0" \
+		"set new breakpoint condition for explicit linespec"
+
+	    gdb_continue_to_breakpoint $tst $location(normal)
+	}
+    }
+
+    gdb_test "cond 2" [string_to_regexp "Breakpoint 2 now unconditional."] \
+	"clear condition for explicit breakpoint"
+    set tst "info break of cleared condition of explicit breakpoint"
+    gdb_test_multiple "info break" $tst {
+	-re ".*in myfunction at .*$srcfile:.*stop only if arg == 0.*" {
+	    fail $tst
+	}
+	-re ".*in myfunction at .*$srcfile:.*$gdb_prompt $" {
+	    pass $tst
+	}
+    }
+
+    # Test explicit "ranges."  Make sure that using explicit
+    # locations doesn't alter the expected outcome.
+    gdb_test "list main" ".*" "list main 1"
+    set list_result [capture_command_output "list -,+" ""]
+    gdb_test "list main" ".*" "list main 2"
+    gdb_test "list -line -,-line +" [string_to_regexp $list_result]
+
+    # Ditto for the reverse (except that no output is expected).
+    gdb_test "list myfunction" ".*" "list myfunction 1"
+    gdb_test_no_output "list +,-"
+    gdb_test "list myfunction" ".*" "list myfunction 2"
+    gdb_test_no_output "list -line +, -line -"
+}
+
+namespace delete $testfile
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/keywords.c ./gdb/testsuite/gdb.linespec/keywords.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/keywords.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/keywords.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/keywords.exp ./gdb/testsuite/gdb.linespec/keywords.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/keywords.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/keywords.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,12 +18,12 @@
 standard_testfile
 set exefile $testfile
 
-if {[prepare_for_testing $testfile $exefile $srcfile {debug}]} {
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug}]} {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -54,16 +54,16 @@ with_test_prefix "trailing whitespace" {
 # break {thread,task} NUMBER --> invalid thread/task
 # break {thread,task} STUFF --> "junk" after keyword (STUFF is not numeric)
 gdb_test "break thread 123" "Unknown thread 123\\."
-gdb_test "break thread foo" "Junk after thread keyword\\."
+gdb_test "break thread foo" "Invalid thread ID: foo"
 gdb_test "break task 123" "Unknown task 123\\."
 gdb_test "break task foo" "Junk after task keyword\\."
 gdb_breakpoint "thread if 0" "message"
 
 # These are also NULL locations, but using a subsequent keyword
 # as the "junk".
-gdb_test "break thread thread" "Junk after thread keyword\\."
-gdb_test "break thread task" "Junk after thread keyword\\."
-gdb_test "break thread if" "Junk after thread keyword\\."
+gdb_test "break thread thread" "Invalid thread ID: thread"
+gdb_test "break thread task" "Invalid thread ID: task"
+gdb_test "break thread if" "Invalid thread ID: if"
 gdb_test "break task task" "Junk after task keyword\\."
 gdb_test "break task thread" "Junk after task keyword\\."
 gdb_test "break task if" "Junk after task keyword\\."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/linespec.exp ./gdb/testsuite/gdb.linespec/linespec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/linespec.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/linespec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,11 +23,11 @@ set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
 if {[skip_cplus_tests]} {
-    unsupported linespec.exp
+    unsupported "skipping c++ tests"
     return
 }
 
-if {[prepare_for_testing ${testfile}.exp $exefile \
+if {[prepare_for_testing "failed to prepare" $exefile \
 	 [list $srcfile $baseone $basetwo] \
 	 {debug nowarnings c++}]} {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-dollar.cc ./gdb/testsuite/gdb.linespec/ls-dollar.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-dollar.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/ls-dollar.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-dollar.exp ./gdb/testsuite/gdb.linespec/ls-dollar.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-dollar.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/ls-dollar.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[skip_cplus_tests]} {
     return
 }
 
-if {[prepare_for_testing $testfile $exefile $srcfile \
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
 	 {debug nowarnings c++}]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-errs.c ./gdb/testsuite/gdb.linespec/ls-errs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-errs.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/ls-errs.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,14 +15,21 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int myfunction (void) { return 0; }
+int
+myfunction (int aa)
+{
+  int i;
+
+  i = aa + 42;
+  return i;    /* set breakpoint here */
+}
 
 int
 main (void)
-{  
+{
   int a;
 
-  a = myfunction ();
+  a = myfunction (a);
 
  here:
   return a;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-errs.exp ./gdb/testsuite/gdb.linespec/ls-errs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/ls-errs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/ls-errs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,168 +13,249 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Tests for linespec error conditions
+# Tests for linespec errors with C and C++.
 
-standard_testfile
-set exefile $testfile
+# The test proper.  LANG is either C or C++.
 
-if {[prepare_for_testing $testfile $exefile $srcfile \
-	 {debug nowarnings}]} {
-    return -1
-}
+proc do_test {lang} {
+    global testfile srcfile error_messages compiler_info
 
-# Turn off the pending breakpoint queries.
-gdb_test_no_output "set breakpoint pending off"
+    standard_testfile
+    set exefile $testfile
+    if [info exists compiler_info] {
+	# Unsetting compiler_info allows us to switch compilers
+	# used by prepare_for_testing.
+        unset compiler_info
+    }
+    set options {debug}
 
-# Turn off completion limiting
-gdb_test_no_output "set max-completions unlimited"
+    if {$lang == "C++"} {
+	if {[skip_cplus_tests]} {
+	    return 0
+	}
+	# Build ".c" source file with g++.
+	lappend options "c++"
+    }
 
-# We intentionally do not use gdb_breakpoint for these tests.
+    if {[prepare_for_testing "failed to prepare" $exefile $srcfile $options]} {
+	return -1
+    }
 
-# Break at 'linespec' and expect the message in ::error_messages indexed by
-# msg_id with the associated args.
-proc test_break {linespec msg_id args} {
-    global error_messages
+    # Turn off the pending breakpoint queries.
+    gdb_test_no_output "set breakpoint pending off"
 
-    gdb_test "break $linespec" [string_to_regexp \
-				[eval format \$error_messages($msg_id) $args]]
-}
+    # Turn off completion limiting
+    gdb_test_no_output "set max-completions unlimited"
 
-# Common error message format strings.
-array set error_messages {
-    invalid_file "No source file named %s."
-    invalid_function "Function \"%s\" not defined."
-    invalid_var_or_func "Undefined convenience variable or function \"%s\" not defined."
-    invalid_function_f "Function \"%s\" not defined in \"%s\"."
-    invalid_var_or_func_f \
-	"Undefined convenience variable or function \"%s\" not defined in \"%s\"."
-    invalid_label "No label \"%s\" defined in function \"%s\"."
-    invalid_offset "No line %d in the current file."
-    invalid_offset_f "No line %d in file \"%s\"."
-    unexpected "malformed linespec error: unexpected %s"
-    unexpected_opt "malformed linespec error: unexpected %s, \"%s\""
-    unmatched_quote "unmatched quote"
-}
+    if {![runto_main]} {
+	fail "can't run to main"
+	return 0
+    }
 
-# Some commonly used whitespace tests around ':'.
-set spaces [list ":" ": " " :" " : " "\t:  " "  :\t" "\t:\t" " \t:\t " \
-		"\t  \t:\t  \t  \t"]
-
-# A list of invalid offsets.
-set invalid_offsets [list -100 +500 1000]
-
-# Try some simple, invalid linespecs involving spaces.
-foreach x $spaces {
-    test_break $x unexpected "colon"
-}
+    # Run to a location in the file.
+    set bp_location [gdb_get_line_number "set breakpoint here"]
 
-# Test invalid filespecs starting with offset.  This is done
-# first so that default offsets are tested.
-foreach x $invalid_offsets {
-    set offset $x
-
-    # Relative offsets are relative to line 16.  Adjust
-    # expected offset from error message accordingly.
-    if {[string index $x 0] == "+" ||
-	[string index $x 0] == "-"} {
-	incr offset 16
+    gdb_test "break $srcfile:$bp_location" \
+    "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
+    "breakpoint line number in file"
+
+    gdb_continue_to_breakpoint "$bp_location"
+
+    # Common error message format strings.
+    array set error_messages {
+	invalid_file "No source file named %s."
+	invalid_function "Function \"%s\" not defined."
+	invalid_var_or_func
+	    "Undefined convenience variable or function \"%s\" not defined."
+	invalid_function_f "Function \"%s\" not defined in \"%s\"."
+	invalid_var_or_func_f \
+	    "Undefined convenience variable or function \"%s\" not defined in \"%s\"."
+	invalid_label "No label \"%s\" defined in function \"%s\"."
+	invalid_parm "invalid linespec argument, \"%s\""
+	invalid_offset "No line %d in the current file."
+	invalid_offset_f "No line %d in file \"%s\"."
+	malformed_line_offset "malformed line offset: \"%s\""
+	source_incomplete \
+	    "Source filename requires function, label, or line offset."
+	unexpected "malformed linespec error: unexpected %s"
+	unexpected_opt "malformed linespec error: unexpected %s, \"%s\""
+	unmatched_quote "unmatched quote"
+	garbage "Garbage '%s' at end of command"
     }
-    test_break $x invalid_offset $offset
-}
 
-# Test offsets with trailing tokens w/ and w/o spaces.
-foreach x $spaces {
-    test_break "3$x" unexpected "colon"
-    test_break "+10$x" unexpected "colon"
-    test_break "-10$x" unexpected "colon"
-}
+    # We intentionally do not use gdb_breakpoint for these tests.
 
-foreach x {1 +1 +100 -10} {
-    test_break "3 $x" unexpected_opt "number" $x
-    test_break "+10 $x" unexpected_opt "number" $x
-    test_break "-10 $x" unexpected_opt "number" $x
-}
+    # Break at 'linespec' and expect the message in ::error_messages
+    # indexed by msg_id with the associated args.
+    proc test_break {linespec msg_id args} {
+	global error_messages
+
+	gdb_test "break $linespec" [string_to_regexp \
+				    [eval format \$error_messages($msg_id) \
+				     $args]]
+    }
 
-test_break "3 foo" unexpected_opt "string" "foo"
-test_break "+10 foo" unexpected_opt "string" "foo"
-test_break "-10 foo" unexpected_opt "string" "foo"
-
-# Test invalid linespecs starting with filename.
-foreach x [list "this_file_doesn't_exist.c" \
-	       "this file has spaces.c" \
-	       "\"file::colons.c\"" \
-	       "'file::colons.c'" \
-	       "\"this \"file\" has quotes.c\"" \
-	       "'this \"file\" has quotes.c'" \
-	       "'this 'file' has quotes.c'" \
-	       "\"this 'file' has quotes.c\"" \
-	       "\"spaces: and :colons.c\"" \
-	       "'more: :spaces: :and  colons::.c'"] {
-    # Remove any quoting from FILENAME for the error message.
-    test_break "$x:3" invalid_file [string trim $x \"']
-}
+    # Some commonly used whitespace tests around ':'.
+    set spaces [list ":" ": " " :" " : " "\t:  " "  :\t" "\t:\t" \
+		     " \t:\t " "\t  \t:\t  \t  \t"]
+
+    # A list of invalid offsets.
+    set invalid_offsets [list -100 +500 1000]
+
+    # Try some simple, invalid linespecs involving spaces.
+    foreach x $spaces {
+	test_break $x unexpected "colon"
+    }
 
-# Test unmatched quotes.
-foreach x {"\"src-file.c'" "'src-file.c"} {
-    test_break "$x:3" unmatched_quote
-}
+    # Test invalid filespecs starting with offset.  This is done
+    # first so that default offsets are tested.
+    foreach x $invalid_offsets {
+	set offset $x
+
+	# Relative offsets are relative to line 16.  Adjust
+	# expected offset from error message accordingly.
+	if {[string index $x 0] == "+" || [string index $x 0] == "-"} {
+	    incr offset 24
+	}
+	test_break $x invalid_offset $offset
+	test_break "-line $x" invalid_offset $offset
+    }
 
-test_break $srcfile invalid_function $srcfile
-foreach x {"foo" " foo" " foo "} {
-    # Trim any leading/trailing whitespace for error messages.
-    test_break "$srcfile:$x" invalid_function_f [string trim $x] $srcfile
-    test_break "$srcfile:main:$x" invalid_label [string trim $x] "main"
-}
+    # Test offsets with trailing tokens w/ and w/o spaces.
+    foreach x $spaces {
+	test_break "3$x" unexpected "colon"
+	test_break "+10$x" unexpected "colon"
+	test_break "-10$x" unexpected "colon"
+    }
 
-foreach x $spaces {
-    test_break "$srcfile$x" unexpected "end of input"
-    test_break "$srcfile:main$x" unexpected "end of input"
-}
+    foreach x {1 +1 +100 -10} {
+	test_break "3 $x" unexpected_opt "number" $x
+	test_break "-line 3 $x" garbage $x
+	test_break "+10 $x" unexpected_opt "number" $x
+	test_break "-line +10 $x" garbage $x
+	test_break "-10 $x" unexpected_opt "number" $x
+	test_break "-line -10 $x" garbage $x
+    }
 
-test_break "${srcfile}::" invalid_function "${srcfile}::"
-test_break "$srcfile:3 1" unexpected_opt "number" "1"
-test_break "$srcfile:3 +100" unexpected_opt "number" "+100"
-test_break "$srcfile:3 -100" unexpected_opt "number" "-100"
-test_break "$srcfile:3 foo" unexpected_opt "string" "foo"
-
-foreach x $invalid_offsets {
-    test_break "$srcfile:$x" invalid_offset_f $x $srcfile
-    test_break "\"$srcfile:$x\"" invalid_offset_f $x $srcfile
-    test_break "'$srcfile:$x'" invalid_offset_f $x $srcfile
-}
+    foreach x {3 +10 -10} {
+	test_break "$x foo" unexpected_opt "string" "foo"
+	test_break "-line $x foo" garbage "foo"
+    }
+
+    # Test invalid linespecs starting with filename.
+    # It's OK to use the ".c" extension for the C++ test
+    # since the extension doesn't affect GDB's lookup.
+    set invalid_files [list "this_file_doesn't_exist.c" \
+			    "this file has spaces.c" \
+			    "\"file::colons.c\"" \
+			    "'file::colons.c'" \
+			    "\"this \"file\" has quotes.c\"" \
+			    "'this \"file\" has quotes.c'" \
+			    "'this 'file' has quotes.c'" \
+			    "\"this 'file' has quotes.c\"" \
+			    "\"spaces: and :colons.c\"" \
+			    "'more: :spaces: :and  colons::.c'" \
+			    "C:/nonexist-with-windrive.c"]
+
+    foreach x $invalid_files {
+	# Remove any quoting from FILENAME for the error message.
+	test_break "$x:3" invalid_file [string trim $x \"']
+    }
+    foreach x [list "this_file_doesn't_exist.c" \
+		    "file::colons.c" \
+		    "'file::colons.c'"] {
+	test_break "-source $x -line 3" invalid_file [string trim $x \"']
+    }
+
+    # Test that option lexing stops at whitespace boundaries
+    test_break "-source this file has spaces.c -line 3" invalid_file "this"
+    test_break "-function function whitespace" invalid_function "function"
+    test_break "-source $srcfile -function function whitespace" \
+	       invalid_function_f "function" $srcfile
+
+    test_break "-function main -label label whitespace" \
+	       invalid_label "label" "main"
+
+    # Test unmatched quotes.
+    foreach x {"\"src-file.c'" "'src-file.c"} {
+	test_break "$x:3" unmatched_quote
+    }
 
-# Test invalid filespecs starting with function.
-foreach x {"foobar" "foo::bar" "foo.bar" "foo ." "foo bar" "foo 1" \
+    test_break $srcfile invalid_function $srcfile
+    foreach x {"foo" " foo" " foo "} {
+	# Trim any leading/trailing whitespace for error messages.
+	test_break "$srcfile:$x" invalid_function_f [string trim $x] $srcfile
+	test_break "-source $srcfile -function $x" \
+		   invalid_function_f [string trim $x] $srcfile
+	test_break "$srcfile:main:$x" invalid_label [string trim $x] "main"
+	test_break "-source $srcfile -function main -label $x" \
+		   invalid_label [string trim $x] "main"
+    }
+
+    foreach x $spaces {
+	test_break "$srcfile$x" unexpected "end of input"
+	test_break "$srcfile:main$x" unexpected "end of input"
+    }
+
+    test_break "${srcfile}::" invalid_function "${srcfile}::"
+    test_break "$srcfile:3 1" unexpected_opt "number" "1"
+    test_break "-source $srcfile -line 3 1" garbage "1"
+    test_break "$srcfile:3 +100" unexpected_opt "number" "+100"
+    test_break "-source $srcfile -line 3 +100" garbage "+100"
+    test_break "$srcfile:3 -100" unexpected_opt "number" "-100"
+    test_break "$srcfile:3 foo" unexpected_opt "string" "foo"
+    test_break "-source $srcfile -line 3 foo" garbage "foo"
+
+    foreach x $invalid_offsets {
+	test_break "$srcfile:$x" invalid_offset_f $x $srcfile
+	test_break "\"$srcfile:$x\"" invalid_offset_f $x $srcfile
+	test_break "'$srcfile:$x'" invalid_offset_f $x $srcfile
+	test_break "-source $srcfile -line $x" invalid_offset_f $x $srcfile
+    }
+    test_break "-source $srcfile -line -x" malformed_line_offset "-x"
+
+    # Test invalid filespecs starting with function.
+    foreach x {"foobar" "foo::bar" "foo.bar" "foo ." "foo bar" "foo 1" \
 	       "foo 0" "foo +10" "foo -10" "foo +100" "foo -100"} {
-    test_break $x invalid_function $x
-}
+	test_break $x invalid_function $x
+	test_break "-function \"$x\"" invalid_function $x
+    }
 
-foreach x $spaces {
-    test_break "main${x}there" invalid_label "there" "main"
-    if {[test_compiler_info {clang-*-*}]} {  setup_xfail clang/14500 *-*-* }
-    test_break "main:here${x}" unexpected "end of input"
-}
+    foreach x $spaces {
+	test_break "main${x}there" invalid_label "there" "main"
+	if {[test_compiler_info {clang-*-*}]} {
+	    setup_xfail clang/14500 *-*-*
+	}
+	test_break "main:here${x}" unexpected "end of input"
+    }
 
-test_break "main 3" invalid_function "main 3"
-test_break "main +100" invalid_function "main +100"
-test_break "main -100" invalid_function "main -100"
-test_break "main foo" invalid_function "main foo"
+    foreach x {"3" "+100" "-100" "foo"} {
+	test_break "main 3" invalid_function "main 3"
+	test_break "-function \"main $x\"" invalid_function "main $x"
+	test_break "main:here $x" invalid_label "here $x" "main"
+	test_break "-function main -label \"here $x\"" \
+		   invalid_label "here $x" "main"
+    }
 
-foreach x {"3" "+100" "-100" "foo"} {
-    test_break "main:here $x" invalid_label "here $x" "main"
-}
+    foreach x {"if" "task" "thread"} {
+	test_break $x invalid_function $x
+    }
 
-foreach x {"if" "task" "thread"} {
-    test_break $x invalid_function $x
+    test_break "'main.c'flubber" unexpected_opt "string" "flubber"
+    test_break "'main.c',21" invalid_function "main.c"
+    test_break "'main.c' " invalid_function "main.c"
+    test_break "'main.c'3" unexpected_opt "number" "3"
+    test_break "'main.c'+3" unexpected_opt "number" "+3"
+
+    # Test undefined convenience variables.
+    set x {$zippo}
+    test_break $x invalid_var_or_func $x
+    test_break "$srcfile:$x" invalid_var_or_func_f $x $srcfile
+
+    # Explicit linespec-specific tests
+    test_break "-source $srcfile" source_incomplete
 }
 
-test_break "'main.c'flubber" unexpected_opt "string" "flubber"
-test_break "'main.c',21" invalid_function "main.c"
-test_break "'main.c' " invalid_function "main.c"
-test_break "'main.c'3" unexpected_opt "number" "3"
-test_break "'main.c'+3" unexpected_opt "number" "+3"
-
-# Test undefined convenience variables.
-set x {$zippo}
-test_break $x invalid_var_or_func $x
-test_break "$srcfile:$x" invalid_var_or_func_f $x $srcfile
+foreach_with_prefix lang {"C" "C++"} {
+    do_test ${lang}
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/macro-relative.c ./gdb/testsuite/gdb.linespec/macro-relative.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/macro-relative.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/macro-relative.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/macro-relative.exp ./gdb/testsuite/gdb.linespec/macro-relative.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/macro-relative.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/macro-relative.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if [using_fission] {
 }
 
 if [is_remote host] {
-    unsupported "Compiling on a remote host does not support a filename with directory."
+    unsupported "compiling on a remote host does not support a filename with directory."
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/Makefile.in ./gdb/testsuite/gdb.linespec/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = lspec
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/skip-two.exp ./gdb/testsuite/gdb.linespec/skip-two.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/skip-two.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/skip-two.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,11 +21,11 @@ set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
 if {[skip_cplus_tests]} {
-    unsupported ${testfile}.exp
+    unsupported "skipping C++ tests"
     return
 }
 
-if {[prepare_for_testing ${testfile}.exp $execfile \
+if {[prepare_for_testing "failed to prepare" $execfile \
 	 [list $srcfile $baseone $basetwo] \
 	 {debug nowarnings c++}]} {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/thread.c ./gdb/testsuite/gdb.linespec/thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/thread.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/thread.exp ./gdb/testsuite/gdb.linespec/thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.linespec/thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.linespec/thread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,12 +19,12 @@
 standard_testfile
 set exefile $testfile
 
-if {[prepare_for_testing $testfile $exefile $srcfile {debug}]} {
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug}]} {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/array.f ./gdb/testsuite/gdb.mi/array.f
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/array.f	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/array.f	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-c Copyright 2006-2015 Free Software Foundation, Inc.
+c Copyright 2006-2017 Free Software Foundation, Inc.
 
 c This program is free software; you can redistribute it and/or modify
 c it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/basics.c ./gdb/testsuite/gdb.mi/basics.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/basics.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/basics.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1999-2015 Free Software Foundation, Inc.
+/* Copyright 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame-func.c ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame-func.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame-func.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame-func.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame-main.c ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.S ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/dw2-ref-missing-frame.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb2549.exp ./gdb/testsuite/gdb.mi/gdb2549.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb2549.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/gdb2549.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb669.exp ./gdb/testsuite/gdb.mi/gdb669.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb669.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/gdb669.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb680.exp ./gdb/testsuite/gdb.mi/gdb680.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb680.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/gdb680.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb701.exp ./gdb/testsuite/gdb.mi/gdb701.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb701.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/gdb701.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
-  untested gdb701.exp
+  untested "failed to compile"
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb792.exp ./gdb/testsuite/gdb.mi/gdb792.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/gdb792.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/gdb792.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if [get_compiler_info "c++"] {
 }
 
 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
-  untested gdb792.exp
+  untested "failed to compile"
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/Makefile.in ./gdb/testsuite/gdb.mi/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,30 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-PROGS = basics c_variable cpp_variable var-cmd dw2-ref-missing-frame	\
-	gdb669-pthreads gdb701 gdb792 mi-async mi-basics mi-break	\
-	mi-cli mi-console mi-disassemble mi-dprintf mi-eval mi-file	\
-	mi-file-transfer mi-non-stop mi-non-stop-exit			\
-	mi-ns-stale-regcache mi-nsintrall mi-nsmoribund mi-nsthrexec	\
-	mi-pending mi-pthreads mi-read-memory mi-regs mi-return		\
-	mi-reverse mi-simplerun mi-stack mi-stepi mi-syn-frame		\
-	mi-var-block mi-var-child mi-var-cmd mi-var-cp mi-var-display	\
-	mi-var-invalidate mi-var-invalidate_bis mi-watch		\
-	mi2-amd64-entry-value mi2-basics				\
-	mi2-break mi2-cli mi2-disassemble mi2-eval mi2-file		\
-	mi2-pthreads mi2-regs mi2-return mi2-simplerun mi2-stepi	\
-	mi2-var-block mi2-var-child mi2-var-cmd mi2-var-display		\
-	mi2-watch until
-
-MISCELLANEOUS = mi-pendshr.sl mi-pendshr2.sl
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *.ci *.o $(OBJS) $(PROGS) *~ core
-	-rm -f *.dwo *.dwp
-	-rm -f $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.c ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.s ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.s
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.s	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi2-amd64-entry-value.s	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-prompt.exp ./gdb/testsuite/gdb.mi/mi2-prompt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-prompt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi2-prompt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-var-child.exp ./gdb/testsuite/gdb.mi/mi2-var-child.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi2-var-child.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi2-var-child.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi2-var-child.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async.exp ./gdb/testsuite/gdb.mi/mi-async.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-async.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-async.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async-run.c ./gdb/testsuite/gdb.mi/mi-async-run.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async-run.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-async-run.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+/* Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+main ()
+{
+  int i;
+
+  for (i = 0; i < 30; i++)
+    {
+      sleep (1);
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async-run.exp ./gdb/testsuite/gdb.mi/mi-async-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-async-run.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-async-run.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,50 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib mi-support.exp
+
+standard_testfile
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+     untested "mi-async-run.exp"
+     return -1
+}
+
+# Test the resolution of PR 18077
+#
+# When doing an -exec-run with a fresh copy of GDB, it would result in
+# synchronous execution, even though mi-async was on.
+
+proc test_async_run {} {
+    global GDBFLAGS
+
+    save_vars { GDBFLAGS } {
+	global binfile
+
+	set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
+
+	gdb_exit
+	if [mi_gdb_start] {
+	    continue
+	}
+
+	mi_gdb_load ${binfile}
+	mi_run_cmd
+	mi_gdb_test "123-exec-interrupt --all" "123\\^done" "send interrupt command"
+	mi_expect_interrupt "expect interrupt"
+    }
+}
+
+test_async_run
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-basics.exp ./gdb/testsuite/gdb.mi/mi-basics.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-basics.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-basics.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ set testsubdir [standard_output_file ""]
 set envirodir [string_to_regexp $testsubdir]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-basics.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-break.exp ./gdb/testsuite/gdb.mi/mi-break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-break.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,22 +23,13 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-break.exp
+     untested "failed to compile"
      return -1
 }
 
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
 # Locate line numbers in basics.c.
 set line_callee4_head  [gdb_get_line_number "callee4 ("]
 set line_callee4_body  [expr $line_callee4_head + 2]
@@ -292,9 +283,25 @@ proc test_breakpoint_commands {} {
 
     mi_send_resuming_command "exec-continue" "breakpoint commands: continue"
 
-    set test "intermediate stop and continue"
+
+    # The breakpoint command's output is always sent to the main UI,
+    # even when testing with MI running on a secondary UI.
+    global gdb_main_spawn_id
+
+    set test "intermediate stop and continue, bp commands"
+    gdb_expect {
+	-i $gdb_main_spawn_id
+	-re ".*\\\$1 = 0.*\\\$10 = 9" {
+	    pass $test
+	}
+	timeout {
+	    fail $test
+	}
+    }
+
+    set test "intermediate stop and continue, mi running"
     gdb_expect {
-        -re ".*\\\$1 = 0.*\\\$10 = 9.*\\*running" {
+        -re "\\*running" {
 	    pass $test
 	}
         timeout {
@@ -305,18 +312,120 @@ proc test_breakpoint_commands {} {
     mi_expect_stop "exited-normally" "" "" "" "" "" "test hitting breakpoint with commands"
 }
 
-test_tbreak_creation_and_listing
-test_rbreak_creation_and_listing
+# Test explicit breakpoints.  These tests only test the MI portion of the
+# code.  In-depth testing of explicit breakpoints is accomplished in
+# gdb.linespec tests.
+
+proc test_explicit_breakpoints {} {
+    global srcfile
+    global line_callee3_head line_callee4_head
+    global line_callee2_body line_main_body
+
+    mi_delete_breakpoints
+
+    # First check mixed explicit/parsed linespecs.
+    mi_gdb_test "-break-insert --function main $srcfile:$line_callee3_head" \
+	".*Garbage following explicit linespec"
+
+    # Insert some breakpoints and list them
+    # Also, disable some so they do not interfere with other tests
+    # Tests:
+    # -break-insert -t --function main
+    # -break-insert -t --source basics.c --function callee2
+    # -break-insert -t --source basics.c --line $line_callee3_head
+    # -break-insert -t --source srcfile --line $line_callee4_head
+    # -break-list
+
+    set bps {}
+    lappend bps [mi_create_breakpoint "-t --function main" \
+		     "insert temp explicit breakpoint in main" \
+		     -func main -file ".*$srcfile" -line $line_main_body]
+
+    lappend bps \
+	[mi_create_breakpoint "-t --source $srcfile --function callee2" \
+	     "insert temp explicit breakpoint at $srcfile:callee2" \
+	     -func callee2 -file ".*$srcfile" -line $line_callee2_body]
+
+    lappend bps \
+	[mi_create_breakpoint "-t --source $srcfile --line $line_callee3_head" \
+	     "insert temp explicit breakpoint at $srcfile:$line_callee3_head" \
+	     -func callee3 -file ".*$srcfile" -line $line_callee3_head]
+
+    lappend bps \
+	[mi_create_breakpoint \
+	     "-t --source \"$srcfile\" --line  $line_callee4_head" \
+	     "insert temp explicit breakpoint at \"$srcfile\":$line_callee4_head" \
+	     -func callee4 -file ".*$srcfile" -line $line_callee4_head]
+
+    mi_gdb_test "-break-list" "\\^done,[mi_make_breakpoint_table $bps]" \
+	"list of explicit breakpoints"
+
+    mi_gdb_test "-break-delete" \
+	    "\\^done" \
+	    "delete temp breakpoints"
+
+    mi_create_breakpoint "-c \"intarg == 3\" --function callee2" \
+	"insert explicit conditional breakpoint in callee2" \
+	-func callee2 ".*$srcfile" -line $line_callee2_body \
+	-cond "intarg == 3"
+
+    # mi_create_breakpoint cannot deal with displaying canonical
+    # linespecs.
+    mi_gdb_test \
+	"-break-insert -c \"foo == 3\" --source $srcfile --function main --label label" \
+	".*No symbol \"foo\" in current context.*"
+
+    mi_gdb_test \
+	"-break-insert --source foobar.c --line 3" \
+	".*No source file named foobar.c.*"
+
+    mi_gdb_test \
+	"-break-insert --source $srcfile --function foobar" \
+	".*Function \"foobar\" not defined in \"$srcfile\".*"
+
+    mi_gdb_test \
+	"-break-insert --source $srcfile --function main --label foobar" \
+	".*No label \"foobar\" defined in function \"main\".*"
+
+    mi_gdb_test \
+	"-break-insert --source $srcfile" \
+	".*Source filename requires function, label, or line offset.*"
+}
+
+proc test_break {mi_mode} {
+    global srcdir subdir binfile
+
+    mi_gdb_exit
+
+    if {$mi_mode == "separate"} {
+	set start_ops "separate-mi-tty"
+    } else {
+	set start_ops ""
+    }
+    if [mi_gdb_start $start_ops] {
+	return
+    }
+
+    mi_delete_breakpoints
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_load ${binfile}
+
+    test_tbreak_creation_and_listing
+    test_rbreak_creation_and_listing
 
-test_ignore_count
+    test_ignore_count
 
-test_error
+    test_error
 
-test_disabled_creation
+    test_disabled_creation
 
-test_breakpoint_commands
+    test_breakpoint_commands
 
-test_abreak_creation
+    test_abreak_creation
 
-mi_gdb_exit
-return 0
+    test_explicit_breakpoints
+}
+
+foreach_with_prefix mi-mode {"main" "separate"} {
+    test_break ${mi-mode}
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp ./gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ set lib_opts "debug"
 
 if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} {
-    untested "Could not compile either $libsrc1 or $libsrc2"
+    untested "failed to compile shared library"
     return -1
 }
 
@@ -39,18 +39,21 @@ set MIFLAGS "-i=mi"
 
 set exec_opts [list debug shlib=$lib_sl1 shlib_load]
 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
-    untested "Failed to compile $srcfile"
+    untested "failed to compile"
     return -1
 }
 
 proc test_insert_delete_modify { } {
     global mi_gdb_prompt
+    global lib_sl1 lib_sl2
 
     gdb_exit
     if [mi_gdb_start] {
 	continue
     }
 
+    mi_load_shlibs $lib_sl1 $lib_sl2
+
     mi_run_to_main
 
     mi_gdb_test "break marker" \
@@ -150,7 +153,9 @@ proc test_insert_delete_modify { } {
     }
 }
 
-test_insert_delete_modify
+with_test_prefix "test_insert_delete_modify" {
+    test_insert_delete_modify
+}
 
 # Test 'breakpoint-modified' notification is emited when pending breakpoints are
 # resolved.
@@ -251,4 +256,6 @@ proc test_pending_resolved { } {
     }
 }
 
-test_pending_resolved
+with_test_prefix "test_pending_resolved" {
+    test_pending_resolved
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load.c ./gdb/testsuite/gdb.mi/mi-catch-load.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-catch-load.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load.exp ./gdb/testsuite/gdb.mi/mi-catch-load.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-catch-load.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -25,14 +25,14 @@ if [mi_gdb_start] {
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
-    untested mi-catch-load.exp
+    untested "no compiler info"
     return -1
 }
 
 standard_testfile mi-catch-load.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
-    untested mi-catch-load.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -41,7 +41,7 @@ set srcfile2 ${testfile2}.c
 set binfile2 [standard_output_file ${testfile2}.so]
 set binfile2_dlopen [shlib_target_file ${testfile2}.so]
 if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
-    untested mi-catch-load.exp
+    untested "failed to compile shared library"
     return -1
 }
 mi_run_to_main
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load-so.c ./gdb/testsuite/gdb.mi/mi-catch-load-so.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-catch-load-so.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-catch-load-so.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cli.exp ./gdb/testsuite/gdb.mi/mi-cli.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cli.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-cli.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-cli.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -156,6 +156,24 @@ if {[regexp "A + B" "$output"]} {
 mi_expect_stop "end-stepping-range" "callee4" "" ".*basics.c" $line_callee4_next_step \
     "" "check *stopped from CLI command 2"
 
+# Test that CLI's "finish" command prints the function's return value
+# to both the CLI and MI streams, and that the same result variable is
+# printed to both streams.
+with_test_prefix "CLI finish" {
+    mi_send_resuming_command "interpreter-exec console finish" "send CLI command"
+
+    set output [mi_gdb_expect_cli_output "\\*stopped" "collect CLI output"]
+    gdb_assert {[regexp \
+		     "callee3 .* at .*basics.c:.*.*Value returned is .1 = 0\\\\n" \
+		     $output]} \
+	"check CLI output"
+
+    mi_expect_stop "function-finished" "callee3" ".*" \
+	".*basics.c" ".*" \
+	",gdb-result-var=\".1\",return-value=\"0\"" \
+	"check MI output"
+}
+
 mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
 	{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
 	"-break-insert -t basics.c:\$line_main_hello"
@@ -166,7 +184,7 @@ mi_send_resuming_command "exec-continue"
 
 set output [mi_gdb_expect_cli_output "\\*stopped" "collect CLI output for breakpoint hit"]
 set test "breakpoint hit produces CLI output"
-set pattern "\\\\nTemporary breakpoint 3, main \\(\\) at \[^\n\]+basics.c:$line_main_hello\\\\n\[^\n\]+Hello"
+set pattern "\\\\nTemporary breakpoint 3, main \\(\\) at \[^\n\]*basics.c:$line_main_hello\\\\n\[^\n\]+Hello"
 
 if {[regexp $pattern $output]} {
     pass $test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cmd-error.exp ./gdb/testsuite/gdb.mi/mi-cmd-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cmd-error.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-cmd-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,80 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that after:
+#
+# - a failing synchronous execution command, or,
+# - a failing non-execution command, or,
+# - a non-failing command,
+#
+# ... MI continues processing input.  We actually test all
+# combinations of pairs of the above.  See PR mi/20431.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+    continue
+}
+
+standard_testfile
+
+# A synchronous execution execution command that errors out.
+
+proc failing_sync_execution_command {} {
+    mi_gdb_test "-exec-continue" \
+	{\^error,msg=\"The program is not being run.\"} \
+	"failing sync execution command"
+}
+
+# A non-execution command that errors out.
+
+proc failing_non_execution_command {} {
+    mi_gdb_test "-invalid-command" \
+	{\^error,msg=\"Undefined MI command: invalid-command\",code=\"undefined-command\"} \
+	"failing non-execution command"
+}
+
+# A command that doesn't error out.
+
+proc non_failing_command {} {
+    mi_gdb_test "-gdb-show version" \
+	".*Free Software Foundation.*\\^done" \
+	"non-failing command"
+}
+
+# A list of procedures to try.
+set procs {
+    failing_sync_execution_command
+    failing_non_execution_command
+    non_failing_command
+}
+
+# User-friendly names for procedures above, in the same order.
+set cmdnames {
+    "failing sync execution command"
+    "failing non-execution command"
+    "non-failing command"
+}
+
+for {set i 0} {$i < [llength $procs]} {incr i} {
+    for {set j 0} {$j < [llength $procs]} {incr j} {
+	with_test_prefix "[lindex $cmdnames $i] first ($i x $j)" {
+	    with_test_prefix "1st" [lindex $procs $i]
+	    with_test_prefix "2nd" [lindex $procs $j]
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp ./gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ set MIFLAGS "-i=mi"
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-cmd-param-changed.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.c ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-mt.c ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-mt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-mt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-mt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-st.c ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-st.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-st.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-st.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-console.exp ./gdb/testsuite/gdb.mi/mi-console.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-console.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-console.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ if [mi_gdb_start separate-inferior-tty] 
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-console.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-detach.exp ./gdb/testsuite/gdb.mi/mi-detach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-detach.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-detach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
-     untested mi-detach.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-disassemble.exp ./gdb/testsuite/gdb.mi/mi-disassemble.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-disassemble.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-disassemble.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-disassemble.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -223,7 +223,7 @@ proc test_disassembly_bogus_args {} {
              "data-disassemble mix different args"
 
     mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
-             "789\\^error,msg=\"-data-disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
+             "789\\^error,msg=\"-data-disassemble: Mode argument must be in the range 0-5.\"" \
              "data-disassemble wrong mode arg"
 
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf.c ./gdb/testsuite/gdb.mi/mi-dprintf.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-dprintf.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Hui Zhu  <hui@codesourcery.com>
 
    This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "../lib/unbuffer_output.c"
+
 static int g;
 
 void
@@ -34,6 +36,8 @@ main (int argc, char *argv[])
 {
   int loc = 1234;
 
+  gdb_unbuffer_output ();
+
   /* Ensure these functions are available.  */
   printf ("kickoff %d\n", loc);
   fprintf (stderr, "also to stderr %d\n", loc);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf.exp ./gdb/testsuite/gdb.mi/mi-dprintf.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-dprintf.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 #   Contributed by Hui Zhu  <hui@codesourcery.com>
 
 # This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
-    untested "failed to compile $testfile"
+    untested "failed to compile"
     return -1
 }
 
@@ -47,6 +47,16 @@ mi_gdb_test "[incr i]-dprintf-insert 29"
     "$i\\^error,msg=\"-dprintf-insert: Missing <format>\"" "mi insert second breakpoint without format string"
 
 mi_gdb_test "-break-insert main" ".*" "mi insert breakpoint main"
+
+mi_gdb_test "-dprintf-insert --function main \"hello\"" \
+    "\\^done,bkpt={.*}" "explicit dprintf at main"
+
+mi_gdb_test "-dprintf-insert --source $srcfile --line $dp_location1 \"hello\"" \
+    "\\^done,bkpt={.*}" "explicit breakpoint at $srcfile:$dp_location1"
+
+mi_gdb_test "-dprintf-insert --source $srcfile \"hello\"" \
+    "\\^error,msg=\"-dprintf-insert: --source option requires --function, --label, or --line\"" "invalid explicit dprintf"
+
 mi_delete_breakpoints
 
 set bps [mi_make_breakpoint -type dprintf -func foo -file ".*mi-dprintf.c" \
@@ -61,7 +71,7 @@ mi_gdb_test "[incr i]-dprintf-insert $dp
 		   "$i\\^done,$bps" "mi insert dprintf dp_location1"
 
 set bps {}
-lappend bps [mi_make_breakpoint -number 3 -type dprintf -func foo \
+lappend bps [mi_make_breakpoint -type dprintf -func foo \
 		 -file ".*mi-dprintf.c" -fullname ".*mi-dprintf.c"]
 lappend bps [mi_make_breakpoint -type dprintf -func foo \
 		 -file ".*mi-dprintf.c" -fullname ".*mi-dprintf.c" \
@@ -72,45 +82,47 @@ mi_gdb_test "[incr i]-break-info" \
 
 mi_gdb_test "-break-insert $bp_location1" ".*" "mi insert breakpoint bp_location1"
 
-proc mi_continue_dprintf {args} {
-    with_test_prefix $args {
-	global mi_gdb_prompt
+# Helper for mi_continue_dprintf.
 
-	if { $args == "call" || $args == "fprintf" } {
-	    set foobarbazqux "\"foobarbazqux\""
-	} else {
-	    set foobarbazqux "\\\\\"foobarbazqux\\\\\""
+proc mi_expect_dprintf {args where msg} {
+    global mi_gdb_prompt
+    global inferior_spawn_id gdb_spawn_id
+
+    if { $args == "call" || $args == "fprintf" } {
+	set foobarbazqux "\"foobarbazqux\""
+	set sid $inferior_spawn_id
+    } else {
+	set foobarbazqux "\\\\\"foobarbazqux\\\\\""
+	set sid $gdb_spawn_id
+    }
+
+    # Don't expect the prompt here to avoid a race with mi_expect_stop
+    # in case $inferior_spawn_id != $gdb_spawn_id.  Otherwise, in that
+    # case, we could see the gdb prompt before the inferior output.
+    gdb_expect {
+	-i $sid
+	-re ".*$foobarbazqux $where" {
+	    pass $msg
 	}
+	eof {
+	    fail "$msg (eof)"
+	}
+	timeout {
+	    fail "$msg (timeout)"
+	}
+    }
+    mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg stop"
+}
 
-	mi_run_cmd
+proc mi_continue_dprintf {args} {
+    with_test_prefix $args {
 	set msg "mi 1st dprintf"
-	gdb_expect {
-            -re ".*$foobarbazqux At foo entry.*arg=1234, g=1234" {
-		pass $msg
-	    }
-	    -re ".*$mi_gdb_prompt$" {
-		fail $msg
-	    }
-            timeout {
-		fail $msg
-            }
-	}
-	mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg stop"
+	mi_run_cmd
+	mi_expect_dprintf $args "At foo entry.*arg=1234, g=1234" $msg
 
 	set msg "mi 2nd dprintf"
 	mi_send_resuming_command "exec-continue" "$msg continue"
-	gdb_expect {
-            -re ".*$foobarbazqux At foo entry.*arg=1235, g=2222" {
-		pass $msg
-	    }
-	    -re ".*$mi_gdb_prompt$" {
-		fail $msg
-	    }
-            timeout {
-		fail $msg
-            }
-	}
-	mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg 2nd stop"
+	mi_expect_dprintf $args "At foo entry.*arg=1235, g=2222" $msg
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pending.c ./gdb/testsuite/gdb.mi/mi-dprintf-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-dprintf-pending.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp ./gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-dprintf-pending.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,12 +36,12 @@ if {[get_compiler_info]} {
 }
 
 if {[gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""} {
-    untested "Could not compile $libsrc1"
+    untested "failed to compile shared library"
     return -1
 }
 
 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile $srcdir/$subdir/$srcfile"
+    untested "failed to compile"
     return -1
 }
 
@@ -60,7 +60,7 @@ mi_gdb_test "-dprintf-insert -f pendfunc
     "mi set dprintf"
 
 mi_create_breakpoint $bp_location1 "mi insert breakpoint bp_location1" \
-    -type "breakpoint" -line $bp_location1 -file $srcdir/$subdir/$srcfile
+    -type "breakpoint" -line $bp_location1 -file ".*$srcfile"
 
 mi_run_cmd
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c ./gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-editing.exp ./gdb/testsuite/gdb.mi/mi-editing.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-editing.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-editing.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,37 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR mi/20034.  Trying to turn on "set editing"
+# when the top-level interpreter is MI would result in GDB/readline
+# aborting with:
+#
+# readline: readline_callback_read_char() called with no handler!
+# Aborted (core dumped)
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+gdb_exit
+if {[mi_gdb_start]} {
+    continue
+}
+
+mi_gdb_test "-interpreter-exec console \"set editing on\"" \
+  {=cmd-param-changed,param=\"editing\",.*\^done} \
+  "-interpreter-exec console \"set editing on\""
+
+mi_gdb_test "-interpreter-exec console \"show editing\"" \
+  ".*Editing of command lines as they are typed is off.*" \
+  "-interpreter-exec console \"show editing\""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-eval.exp ./gdb/testsuite/gdb.mi/mi-eval.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-eval.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-eval.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-eval.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exec-run.exp ./gdb/testsuite/gdb.mi/mi-exec-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exec-run.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-exec-run.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,158 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that -exec-run works as expected.  Exercises various testing
+# axes:
+#
+# - MI running on main UI vs separate UI.
+#
+# - inferior tty set to main tty vs separate tty.
+#
+# - forking the child failing and sending output to the right inferior
+#   terminal, vs the child not failing to start.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+# The purpose of this testcase is to test the -exec-run command. If we
+# cannot use it, then there is no point in running this testcase.
+if [target_info exists use_gdb_stub] {
+     untested "cannot use -exec-run command"
+     return -1
+}
+
+standard_testfile mi-start.c
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+     untested "could not build mi-exec-run"
+     return -1
+}
+
+# The test proper.  INFTTY_MODE determines whether "set inferior-tty"
+# is in effect.  MI_MODE determines whether MI is run on the main UI,
+# or as a separate UI.  FORCE_FAIL is true when we want -exec-run to
+# fail and cause inferior output be sent to the inferior tty.
+
+proc test {inftty_mode mi_mode force_fail} {
+    global srcdir subdir binfile srcfile
+    global gdb_spawn_id gdb_main_spawn_id mi_spawn_id inferior_spawn_id
+    global decimal
+
+    mi_gdb_exit
+
+    set start_ops {}
+    if {$inftty_mode == "separate"} {
+	lappend start_ops "separate-inferior-tty"
+    }
+    if {$mi_mode == "separate"} {
+	lappend start_ops "separate-mi-tty"
+    }
+
+    if [eval mi_gdb_start $start_ops] {
+	return
+    }
+
+    if {$force_fail} {
+	# Disable the shell so that its the first exec that fails,
+	# instead of the shell starting and then failing with some
+	# unspecified output.
+	mi_gdb_test "-gdb-set startup-with-shell off" ".*"
+	set bin $binfile.nox
+    } else {
+	set bin $binfile
+    }
+
+    mi_delete_breakpoints
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_load ${bin}
+
+    # Useful for debugging:
+    verbose -log "Channels:"
+    verbose -log " inferior_spawn_id=$inferior_spawn_id"
+    verbose -log " gdb_spawn_id=$gdb_spawn_id"
+    verbose -log " gdb_main_spawn_id=$gdb_main_spawn_id"
+    verbose -log " mi_spawn_id=$mi_spawn_id"
+
+    if {$force_fail} {
+	set saw_perm_error 0
+	set saw_mi_error 0
+	set test "run failure detected"
+	send_gdb "-exec-run --start\n"
+
+	while {1} {
+	    gdb_expect {
+		-i "$inferior_spawn_id"
+		-re ".*Cannot exec.*Permission denied" {
+		    set saw_perm_error 1
+		    verbose -log "saw mi error"
+		}
+		-i "$gdb_spawn_id"
+		-re "\\^error,msg=\"During startup program exited with code 127" {
+		    set saw_mi_error 1
+		    verbose -log "saw mi error"
+		}
+		timeout {
+		    fail "$test (timeout)"
+		    break
+		}
+		-i "$gdb_main_spawn_id"
+		eof {
+		    fail "$test (eof)"
+		    break
+		}
+	    }
+
+	    if {$saw_perm_error && $saw_mi_error} {
+		pass $test
+		break
+	    }
+	}
+    } else {
+	mi_run_cmd "--start"
+	mi_expect_stop "breakpoint-hit" "main" "" ".*$srcfile" "$decimal" \
+	    { "" "disp=\"del\"" } "breakpoint hit reported on mi"
+
+	if {$mi_mode == "separate"} {
+	    # Check that the breakpoint hit is reported on the main
+	    # UI/CLI.  Note no prompt is expected.
+	    switch_gdb_spawn_id $gdb_main_spawn_id
+
+	    set test "breakpoint hit reported on console"
+	    gdb_test_multiple "" $test {
+		-re "Temporary breakpoint .*, main \\(\\) at .*$srcfile:$decimal.*return 0;" {
+		    pass $test
+		}
+	    }
+
+	    # Switch back to the MI UI.
+	    global mi_spawn_id
+	    switch_gdb_spawn_id $mi_spawn_id
+	}
+    }
+}
+
+# Create a not-executable copy of the program, in order to exercise
+# vfork->exec failing.
+gdb_remote_download host $binfile $binfile.nox
+remote_spawn target "chmod \"a-x\" $binfile.nox"
+
+foreach_with_prefix inferior-tty {"main" "separate"} {
+    foreach_with_prefix mi {"main" "separate"} {
+	foreach_with_prefix force-fail {0 1} {
+	    test ${inferior-tty} ${mi} ${force-fail}
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exit-code.c ./gdb/testsuite/gdb.mi/mi-exit-code.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exit-code.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-exit-code.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1999-2015 Free Software Foundation, Inc.
+/* Copyright 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exit-code.exp ./gdb/testsuite/gdb.mi/mi-exit-code.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-exit-code.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-exit-code.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "failed to compile $testfile"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-file.exp ./gdb/testsuite/gdb.mi/mi-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-file.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-file.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-file-transfer.exp ./gdb/testsuite/gdb.mi/mi-file-transfer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-file-transfer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-file-transfer.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # This testcase is part of GDB, the GNU debugger.
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if { [skip_gdbserver_tests] } {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-file-transfer.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-fill-memory.exp ./gdb/testsuite/gdb.mi/mi-fill-memory.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-fill-memory.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-fill-memory.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if [mi_gdb_start] {
 standard_testfile "mi-read-memory"
  
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } {
-     untested mi-fill-memory.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp ./gdb/testsuite/gdb.mi/mi-fullname-deleted.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-fullname-deleted.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,13 +26,13 @@ set srcfileabs [standard_output_file $sr
 
 # "//$srcfile" It is used for the test of compare_filenames_for_search.
 if { [regsub {/[^/]+$} $srcfileabs {/\0} srcfileabs] != 1 } {
-    xfail "Cannot double the last slash separator"
+    xfail "cannot double the last slash separator"
     return -1
 }
 
 if { [regsub {^(/[^/]+)/} $srcfileabs {\1subst/} srcfileabssubst] != 1
      || [regsub {^(/[^/]+)/.*$} $srcfileabs {\1} initdir] != 1 } {
-    xfail "Missing root subdirectory"
+    xfail "missing root subdirectory"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-hack-cli.exp ./gdb/testsuite/gdb.mi/mi-hack-cli.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-hack-cli.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-hack-cli.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-i-cmd.exp ./gdb/testsuite/gdb.mi/mi-i-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-i-cmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-i-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-info-os.exp ./gdb/testsuite/gdb.mi/mi-info-os.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-info-os.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-info-os.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp ./gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
 }
 
 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
-  untested mi-inheritance-syntax-error.exp
+  untested "failed to compile"
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-language.exp ./gdb/testsuite/gdb.mi/mi-language.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-language.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-language.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-linespec-err-cp.cc ./gdb/testsuite/gdb.mi/mi-linespec-err-cp.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-linespec-err-cp.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-linespec-err-cp.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+myfunction (int aa)
+{
+  int i;
+
+  i = aa + 42;
+  return i;    /* set breakpoint here */
+}
+
+int
+main (void)
+{
+  int a;
+
+  a = myfunction (a);
+
+  return a;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp ./gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,59 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR breakpoints/18303.  Tests that the correct
+# errors is generated when setting a breakpoint in a non-existent
+# file with a Windows-style logical drive names and C++.
+
+if {[skip_cplus_tests]} {
+    continue
+}
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+standard_testfile .cc
+set exefile $testfile
+
+if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug c++}]} {
+    return -1
+}
+
+gdb_exit
+if {[mi_gdb_start]} {
+    continue
+}
+
+# Turn off the pending breakpoint queries.
+mi_gdb_test "-interpreter-exec console \"set breakpoint pending off\"" \
+  {=cmd-param-changed,param=\"breakpoint pending\",.*\^done} \
+  "-interpreter-exec console \"set breakpoint pending off\""
+
+mi_run_to_main
+
+# Run to a location in the file.
+set bp_location [gdb_get_line_number "set breakpoint here"]
+
+mi_gdb_test "-break-insert ${srcfile}:${bp_location}" \
+    {\^done,bkpt=.number="2",type="breakpoint".*\}} "set breakpoint"
+
+mi_execute_to "exec-continue" "breakpoint-hit" "myfunction" ".*" ".*" "24" \
+    { "" "disp=\"keep\"" } "breakpoint hit"
+
+# Set a breakpoint in a C++ source file whose name contains a
+# Windows-style logical drive.
+mi_gdb_test \
+    "-break-insert -f \"c:/uu.cpp:13\"" \
+    ".*No source file named c:/uu.cpp.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-logging.exp ./gdb/testsuite/gdb.mi/mi-logging.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-logging.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-logging.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ standard_testfile basics.c
 set opts {debug}
 
 if [build_executable $testfile.exp $testfile $srcfile $opts] {
-    untested mi-logging.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -54,9 +54,9 @@ close $chan
 set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
 
 if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-    pass "Log file contents"
+    pass "log file contents"
 } else {
-    fail "Log file contents"
+    fail "log file contents"
 }
 
 # Now try the redirect, which writes into the file only.
@@ -77,9 +77,23 @@ set logcontent [read $chan]
 close $chan
 
 if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-    pass "Redirect log file contents"
+    pass "redirect log file contents"
 } else {
-    fail "Redirect log file contents"
+    fail "redirect log file contents"
+}
+
+# Now try enabling a redirect while GDB is already logging.  This used
+# to crash GDB.
+with_test_prefix "redirect while already logging" {
+    mi_gdb_test "-gdb-set logging redirect off" ".*" \
+	"logging redirect off"
+    mi_gdb_test "-gdb-set logging on" ".*" \
+	"logging on"
+    mi_gdb_test "-gdb-set logging redirect on" \
+	".*warning: Currently logging .*Turn the logging off and on to make the new setting effective.*" \
+	"logging redirect on"
+    mi_gdb_test "-gdb-set logging off" ".*" \
+	"logging off"
 }
 
 mi_gdb_exit
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-memory-changed.exp ./gdb/testsuite/gdb.mi/mi-memory-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-memory-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-memory-changed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 standard_testfile basics.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested mi-record-changed.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp ./gdb/testsuite/gdb.mi/mi-nonstop-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-nonstop-exit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nonstop.exp ./gdb/testsuite/gdb.mi/mi-nonstop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nonstop.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-nonstop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,8 +23,12 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
 gdb_exit
-if {[mi_gdb_start]} {
-    continue
+
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+    if {[mi_gdb_start]} {
+	continue
+    }
 }
 
 proc mi_nonstop_resume { command test } {
@@ -49,7 +53,6 @@ if {[gdb_compile_pthreads "$srcdir/$subd
 mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load $binfile
 
-mi_gdb_test "-gdb-set non-stop 1" ".*"
 mi_gdb_test "-gdb-set mi-async 1" ".*"
 mi_detect_async
 
@@ -94,7 +97,7 @@ mi_expect_interrupt "got interrupt"
 sleep 1
 mi_check_thread_states {"stopped" "stopped" "stopped"} "thread state, stop 4"
 
-mi_gdb_test "-exec-continue --all" ".*\\*running,thread-id=\"3\"\r\n\\*running,thread-id=\"2\"\r\n\\*running,thread-id=\"1\"" \
+mi_gdb_test "-exec-continue --all" ".*\\*running,thread-id=\"1\"\r\n\\*running,thread-id=\"2\"\r\n\\*running,thread-id=\"3\"" \
     "resume all"
 
 mi_expect_stop "breakpoint-hit" "break_at_me" "\[^\n\]*" "non-stop.c" "\[0-9\]*" {"" "disp=\"keep\""} "w0,i2 stop"
@@ -132,7 +135,7 @@ mi_gdb_test "-thread-select 2" "\\^done.
 mi_gdb_test "-gdb-set --thread 3 variable exit_first_thread=1" ".*\\^done" "ask the second thread to exit"
 
 set test "wait for thread exit"
-if { [is_remote target] } {
+if { [mi_is_target_remote] } {
     # The remote protocol doesn't have support for thread exit
     # notifications.
     unsupported $test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsintrall.exp ./gdb/testsuite/gdb.mi/mi-nsintrall.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsintrall.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-nsintrall.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -67,10 +67,10 @@ mi_delete_breakpoints
 # Here we create a response string.  Note we don't want \r\n at the end,
 # since mi_gdb_test will append this itself.
 set running_re ""
-for {set i 6} {$i > 1} {incr i -1} {
+for {set i 1} {$i < 6} {incr i} {
     set running_re "$running_re\\*running,thread-id=\"$i\"\r\n"
 }
-set running_re "$running_re\\*running,thread-id=\"1\""
+set running_re "$running_re\\*running,thread-id=\"6\""
 
 mi_gdb_test "-exec-continue --all" "\[^\n\]*\r\n$running_re" \
     "resume all, no breakpoint"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsmoribund.exp ./gdb/testsuite/gdb.mi/mi-nsmoribund.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsmoribund.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-nsmoribund.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp ./gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsthrexec.exp ./gdb/testsuite/gdb.mi/mi-nsthrexec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-nsthrexec.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-nsthrexec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,11 +18,6 @@
 # the main thread doesn't just silently stop at the first internal
 # breakpoint (usually the _dl_debug_state breakpoint).
 
-# No exec event support in the remote protocol.
-if { [is_remote target] } then {
-    continue
-}
-
 if { ![support_displaced_stepping] } { 
     unsupported "displaced stepping"
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pending.c ./gdb/testsuite/gdb.mi/mi-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-pending.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -31,11 +31,11 @@ thread_func (void* arg)
 
   h = dlopen (libname, RTLD_LAZY);  /* set breakpoint here */
   if (h == NULL)
-    return;
+    return NULL;
 
   p_func = dlsym (h, "pendfunc3");
   if (p_func == NULL)
-    return;
+    return NULL;
 
   (*p_func) ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pending.exp ./gdb/testsuite/gdb.mi/mi-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pending.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-pending.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,12 +41,12 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} {
-    untested "Could not compile either $libsrc1 or $libsrc2"
+    untested "failed to compile shared library"
     return -1
 }
 
 if { [gdb_compile_pthreads $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile  $srcdir/$subdir/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -64,8 +64,8 @@ mi_gdb_test "-break-insert -f pendfunc1"
     "MI pending breakpoint on pendfunc1"
 
 # Set pending breakpoint with a condition via MI.
-mi_gdb_test "-break-insert -f -c x==4 ${libsrc1}:pendfunc2" \
-    ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"${libsrc1}:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libsrc1}:pendfunc2\"\}"\
+mi_gdb_test "-break-insert -f -c x==4 ${libfile1}.c:pendfunc2" \
+    ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"${libfile1}.c:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libfile1}.c:pendfunc2\"\}"\
     "MI pending breakpoint on ${libfile1}.c:pendfunc2 if x==4"
 
 # Set breakpoint so that we can stop when the thread is created
@@ -101,7 +101,7 @@ mi_expect_stop "breakpoint-hit" "thread_
     "Run till MI pending breakpoint on thread_func"
 
 # Delete thread creation breakpoint to enable more than 1 thread to be created.
-mi_gdb_test "-break-delete 3" "\\^done" "Delete breakpoint 3"
+mi_gdb_test "-break-delete 3" "\\^done" "delete breakpoint 3"
 
 # Set pending breakpoint with a thread via MI.
 mi_gdb_test "-break-insert -p 2 -f pendfunc3" \
@@ -111,8 +111,8 @@ mi_gdb_test "-break-insert -p 2 -f pendf
 mi_send_resuming_command "exec-continue" "continuing execution to thread condition"
 
 # Check if we stopped in thread 2 like we should.
-set testname "Run till MI pending breakpoint on pendfunc3 on thread 2"
-gdb_expect 5 {
+set testname "run till MI pending breakpoint on pendfunc3 on thread 2"
+gdb_expect {
     -re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" {
 	pass $testname
 	return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pendshr2.c ./gdb/testsuite/gdb.mi/mi-pendshr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pendshr2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-pendshr2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pendshr.c ./gdb/testsuite/gdb.mi/mi-pendshr.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pendshr.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-pendshr.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pthreads.exp ./gdb/testsuite/gdb.mi/mi-pthreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-pthreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-pthreads.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,8 +53,8 @@ proc check_mi_thread_command_set {} {
 
   foreach thread $thread_list {
       mi_gdb_test "-interpreter-exec console \"thread $thread\"" \
-          ".*\\^done\r\n=thread-selected,id=\"$thread\"" \
-          "check =thread-selected: thread $thread"
+	  ".*=thread-selected,id=\"$thread\".*\r\n\\^done" \
+	  "check =thread-selected: thread $thread"
   }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-read-memory.exp ./gdb/testsuite/gdb.mi/mi-read-memory.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-read-memory.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-read-memory.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-read-memory.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-record-changed.exp ./gdb/testsuite/gdb.mi/mi-record-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-record-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-record-changed.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if ![supports_process_record] {
 standard_testfile basics.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested mi-record-changed.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -31,14 +31,14 @@ if [mi_gdb_start] {
 }
 mi_run_to_main
 
-mi_gdb_test "record" ".*=record-started,thread-group=\"i${decimal}\".*\\^done" \
+mi_gdb_test "record" ".*=record-started,thread-group=\"i${decimal}\",method=\"full\".*\\^done" \
     "record"
 mi_gdb_test "record stop" \
     ".*=record-stopped,thread-group=\"i${decimal}\".*\\^done" \
     "record end"
 
 mi_gdb_test "target record" \
-    ".*=record-started,thread-group=\"i${decimal}\".*\\^done" \
+    ".*=record-started,thread-group=\"i${decimal}\",method=\"full\".*\\^done" \
     "target record"
 
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-regs.exp ./gdb/testsuite/gdb.mi/mi-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-regs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-regs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-regs.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.c ./gdb/testsuite/gdb.mi/mi-reg-undefined.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-reg-undefined.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.exp ./gdb/testsuite/gdb.mi/mi-reg-undefined.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-reg-undefined.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if [mi_gdb_start] {
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-reg-undefined.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.S ./gdb/testsuite/gdb.mi/mi-reg-undefined.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reg-undefined.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-reg-undefined.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-return.exp ./gdb/testsuite/gdb.mi/mi-return.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-return.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-return.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-return.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reverse.exp ./gdb/testsuite/gdb.mi/mi-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-reverse.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -51,7 +51,7 @@ mi_run_to_main
 if [supports_process_record] {
     # Activate process record/replay
     if [mi_gdb_test "-interpreter-exec console record" \
-	    "=record-started,thread-group=\"i1\"\r\n\\^done" \
+	    "=record-started,thread-group=\"i1\",method=\"full\"\r\n\\^done" \
 	    "Turn on process record"] {
 	warning "Fail to activate process record/replay, tests in this group will not be performed.\n"
 	return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-simplerun.exp ./gdb/testsuite/gdb.mi/mi-simplerun.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-simplerun.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-simplerun.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-simplerun.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-solib.exp ./gdb/testsuite/gdb.mi/mi-solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-solib.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-solib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
 if {[skip_shlib_tests]} {
-    untested mi-solib.exp
+    untested "skipping shared library tests"
     return -1
 }
 
@@ -42,7 +42,7 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
      || [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } {
-  untested "Could not compile $binfile_lib or $binfile."
+  untested "failed to compile"
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stack.c ./gdb/testsuite/gdb.mi/mi-stack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stack.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-stack.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1999-2015 Free Software Foundation, Inc.
+/* Copyright 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stack.exp ./gdb/testsuite/gdb.mi/mi-stack.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stack.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-stack.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-stack.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-start.c ./gdb/testsuite/gdb.mi/mi-start.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-start.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-start.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-start.exp ./gdb/testsuite/gdb.mi/mi-start.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-start.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-start.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepi.exp ./gdb/testsuite/gdb.mi/mi-stepi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepi.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-stepi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if [mi_gdb_start] {
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-stepi.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepn.c ./gdb/testsuite/gdb.mi/mi-stepn.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepn.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-stepn.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepn.exp ./gdb/testsuite/gdb.mi/mi-stepn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-stepn.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-stepn.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-syn-frame.exp ./gdb/testsuite/gdb.mi/mi-syn-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-syn-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-syn-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set MIFLAGS "-i=mi"
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-syn-frame.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-threads-interrupt.c ./gdb/testsuite/gdb.mi/mi-threads-interrupt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-threads-interrupt.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-threads-interrupt.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,61 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <unistd.h>
+
+#define NUM_THREADS 2
+
+static pthread_barrier_t barrier;
+
+static void *
+thread_func (void *v)
+{
+  int i;
+
+  pthread_barrier_wait (&barrier);
+
+  for (i = 0; i < 100; i++)
+    sleep (1);
+}
+
+static void
+all_threads_created (void)
+{
+}
+
+int
+main (void)
+{
+  int i;
+  pthread_t threads[NUM_THREADS];
+
+  /* +1 to account for the main thread */
+  pthread_barrier_init (&barrier, NULL, NUM_THREADS + 1);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    pthread_create (&threads[i], NULL, thread_func, NULL);
+
+  pthread_barrier_wait (&barrier);
+
+  all_threads_created ();
+
+  for (i = 0; i < 100; i++)
+    sleep (1);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp ./gdb/testsuite/gdb.mi/mi-threads-interrupt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-threads-interrupt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,69 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+standard_testfile
+
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } {
+    return -1
+}
+
+# This tests the resolution of PR 20039.
+#
+# With a multi-threaded inferior and with MI/all-stop, it was not possible
+# to interrupt it with ctrl-C after a continue.
+
+proc test_continue_interrupt { } {
+  global binfile
+  global async
+
+  gdb_exit
+  if {[mi_gdb_start]} {
+      continue
+  }
+
+  # Load the binary in gdb...
+  mi_gdb_load $binfile
+
+  # ... and run it.
+  #
+  # Note this test relies on mi_runto deleting the breakpoint.
+  # A step-over here would mask the bug.
+  mi_runto "all_threads_created"
+
+  # Consistency check.
+  mi_check_thread_states {"stopped" "stopped" "stopped"} "check thread states"
+
+  # Continue.
+  mi_send_resuming_command "exec-continue" "continue"
+
+  # Wait a bit to make sure all MI events are sent, before sending the
+  # interruption request.
+  sleep 1
+
+  # Send the interrupt request.
+  if { $async } {
+    mi_gdb_test "888-exec-interrupt" "888\\^done" "interrupt"
+  } else {
+    send_gdb "\003"
+  }
+
+  # Wait for the *stopped.
+  mi_expect_interrupt "interrupt reported"
+}
+
+test_continue_interrupt
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp ./gdb/testsuite/gdb.mi/mi-undefined-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-undefined-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-until.exp ./gdb/testsuite/gdb.mi/mi-until.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-until.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-until.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if [mi_gdb_start] {
 standard_testfile until.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-until.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-block.exp ./gdb/testsuite/gdb.mi/mi-var-block.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-block.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-block.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-block.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child.c ./gdb/testsuite/gdb.mi/mi-var-child.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-child.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1999-2015 Free Software Foundation, Inc.
+/* Copyright 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child.exp ./gdb/testsuite/gdb.mi/mi-var-child.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-child.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-child.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child-f.exp ./gdb/testsuite/gdb.mi/mi-var-child-f.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-child-f.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-child-f.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cmd.exp ./gdb/testsuite/gdb.mi/mi-var-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-cmd.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cp.cc ./gdb/testsuite/gdb.mi/mi-var-cp.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cp.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-cp.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2006-2015 Free Software Foundation, Inc.
+/* Copyright 2006-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cp.exp ./gdb/testsuite/gdb.mi/mi-var-cp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-cp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-cp.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2015 Free Software Foundation, Inc.
+# Copyright 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [get_compiler_info "c++"] {
 }
 
 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
-  untested $testfile.exp
+  untested "failed to compile"
   return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-create-rtti.c ./gdb/testsuite/gdb.mi/mi-var-create-rtti.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-create-rtti.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-create-rtti.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp ./gdb/testsuite/gdb.mi/mi-var-create-rtti.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-create-rtti.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-display.exp ./gdb/testsuite/gdb.mi/mi-var-display.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-display.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-display.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-display.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -81,6 +81,11 @@ mi_gdb_test "-var-evaluate-expression ba
 	"eval variable bar"
 
 # Test: c_variable-6.5
+# Desc: change format of bar to zero-padded hexadecimal
+mi_gdb_test "-var-set-format bar zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"0x0.*849\"" \
+	"set format variable bar in zero-padded hexadecimal"
+
 # Desc: change format of bar to hex
 mi_gdb_test "-var-set-format bar hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"0x849\"" \
@@ -241,7 +246,7 @@ mi_gdb_test "-var-set-format weird.func_
 
 mi_gdb_test "-var-show-format weird.func_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr"
+	"show format variable weird.func_ptr (hex)"
 
 mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
@@ -249,7 +254,23 @@ mi_gdb_test "-var-set-format weird.func_
 
 mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr_ptr"
+	"show format variable weird.func_ptr_ptr (hex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \
+	"set format variable weird.func_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr" \
+	"\\^done,format=\"zero-hexadecimal\"" \
+	"show format variable weird.func_ptr (zhex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr_ptr zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \
+	"set format variable weird.func_ptr_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
+	"\\^done,format=\"zero-hexadecimal\"" \
+	"show format variable weird.func_ptr_ptr (zhex)"
 
 # Test: c_variable-6.24
 # Desc: format of weird and children
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-invalidate.exp ./gdb/testsuite/gdb.mi/mi-var-invalidate.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-invalidate.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-invalidate.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,13 +31,13 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-invalidate.exp
+    untested "failed to compile"
     return -1
 }
 # Just change the output binary.
 set binfile_bis [standard_output_file mi-var-invalidate_bis]
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_bis}" executable {debug}] != "" } {
-    untested mi-var-invalidate.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -45,7 +45,7 @@ set testfile2 "basics"
 set srcfile2 ${testfile2}.c
 set binfile2 [standard_output_file ${testfile2}]
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
-    untested mi-var-invalidate.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.c ./gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp ./gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if [mi_gdb_start] {
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-list-children-invalid-grandchild.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-rtti.cc ./gdb/testsuite/gdb.mi/mi-var-rtti.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-rtti.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-rtti.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2012-2015 Free Software Foundation, Inc.
+/* Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-rtti.exp ./gdb/testsuite/gdb.mi/mi-var-rtti.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-var-rtti.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-var-rtti.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-vla-c99.exp ./gdb/testsuite/gdb.mi/mi-vla-c99.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-vla-c99.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-vla-c99.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # Contributed by Intel Corp. <keven.boell@intel.com>
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-vla-fortran.exp ./gdb/testsuite/gdb.mi/mi-vla-fortran.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-vla-fortran.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-vla-fortran.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,198 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Verify that, using the MI, we can evaluate a simple C Variable Length
+# Array (VLA).
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+    continue
+}
+
+standard_testfile vla.f90
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
+     {debug f90}] != "" } {
+     untested "failed to compile"
+     return -1
+}
+
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_load ${binfile}
+
+set bp_lineno [gdb_get_line_number "vla1-not-allocated"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 1 "del" "vla" \
+  ".*vla.f90" $bp_lineno $hex \
+  "insert breakpoint at line $bp_lineno (vla not allocated)"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "500-data-evaluate-expression vla1" \
+  "500\\^done,value=\"<not allocated>\"" "evaluate not allocated vla"
+
+mi_create_varobj_checked vla1_not_allocated vla1 "<not allocated>" \
+  "create local variable vla1_not_allocated"
+mi_gdb_test "501-var-info-type vla1_not_allocated" \
+  "501\\^done,type=\"<not allocated>\"" \
+  "info type variable vla1_not_allocated"
+mi_gdb_test "502-var-show-format vla1_not_allocated" \
+  "502\\^done,format=\"natural\"" \
+  "show format variable vla1_not_allocated"
+mi_gdb_test "503-var-evaluate-expression vla1_not_allocated" \
+  "503\\^done,value=\"\\\[0\\\]\"" \
+  "eval variable vla1_not_allocated"
+mi_list_array_varobj_children_with_index "vla1_not_allocated" "0" "1" \
+    "real\\\(kind=4\\\)" "get children of vla1_not_allocated"
+
+
+
+set bp_lineno [gdb_get_line_number "vla1-allocated"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 2 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno (vla allocated)"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "510-data-evaluate-expression vla1" \
+  "510\\^done,value=\"\\(.*\\)\"" "evaluate allocated vla"
+
+mi_create_varobj_checked vla1_allocated vla1 "real\\\(kind=4\\\) \\\(5\\\)" \
+  "create local variable vla1_allocated"
+mi_gdb_test "511-var-info-type vla1_allocated" \
+  "511\\^done,type=\"real\\\(kind=4\\\) \\\(5\\\)\"" \
+  "info type variable vla1_allocated"
+mi_gdb_test "512-var-show-format vla1_allocated" \
+  "512\\^done,format=\"natural\"" \
+  "show format variable vla1_allocated"
+mi_gdb_test "513-var-evaluate-expression vla1_allocated" \
+  "513\\^done,value=\"\\\[5\\\]\"" \
+  "eval variable vla1_allocated"
+mi_list_array_varobj_children_with_index "vla1_allocated" "5" "1" \
+    "real\\\(kind=4\\\)" "get children of vla1_allocated"
+
+
+set bp_lineno [gdb_get_line_number "vla1-filled"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 3 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "520-data-evaluate-expression vla1" \
+  "520\\^done,value=\"\\(1, 1, 1, 1, 1\\)\"" "evaluate filled vla"
+
+
+set bp_lineno [gdb_get_line_number "vla1-modified"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 4 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "530-data-evaluate-expression vla1" \
+  "530\\^done,value=\"\\(1, 42, 1, 24, 1\\)\"" "evaluate filled vla"
+mi_gdb_test "540-data-evaluate-expression vla1(1)" \
+  "540\\^done,value=\"1\"" "evaluate filled vla"
+mi_gdb_test "550-data-evaluate-expression vla1(2)" \
+  "550\\^done,value=\"42\"" "evaluate filled vla"
+mi_gdb_test "560-data-evaluate-expression vla1(4)" \
+  "560\\^done,value=\"24\"" "evaluate filled vla"
+
+
+set bp_lineno [gdb_get_line_number "vla1-deallocated"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 5 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "570-data-evaluate-expression vla1" \
+  "570\\^done,value=\"<not allocated>\"" "evaluate not allocated vla"
+
+
+set bp_lineno [gdb_get_line_number "pvla2-not-associated"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 6 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+
+
+set test "evaluate not associated vla"
+send_gdb "580-data-evaluate-expression pvla2\n"
+gdb_expect {
+    -re "580\\^done,value=\"<not associated>\".*${mi_gdb_prompt}$" {
+	pass $test
+
+	mi_create_varobj_checked pvla2_not_associated pvla2 "<not associated>" \
+	    "create local variable pvla2_not_associated"
+	mi_gdb_test "581-var-info-type pvla2_not_associated" \
+	    "581\\^done,type=\"<not associated>\"" \
+	    "info type variable pvla2_not_associated"
+	mi_gdb_test "582-var-show-format pvla2_not_associated" \
+	    "582\\^done,format=\"natural\"" \
+	    "show format variable pvla2_not_associated"
+	mi_gdb_test "583-var-evaluate-expression pvla2_not_associated" \
+	    "583\\^done,value=\"\\\[0\\\]\"" \
+	    "eval variable pvla2_not_associated"
+	mi_list_array_varobj_children_with_index "pvla2_not_associated" "0" "1" \
+	    "real\\\(kind=4\\\)" "get children of pvla2_not_associated"
+    }
+    -re "580\\^error,msg=\"value contents too large \\(\[0-9\]+ bytes\\).*${mi_gdb_prompt}$" {
+	# Undefined behaviour in gfortran.
+	xfail $test
+    }
+    -re "${mi_gdb_prompt}$" {
+	fail $test
+    }
+    timeout {
+	fail "$test (timeout)"
+    }
+}
+
+set bp_lineno [gdb_get_line_number "pvla2-associated"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 7 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "590-data-evaluate-expression pvla2" \
+  "590\\^done,value=\"\\(\\( 2, 2, 2, 2, 2\\) \\( 2, 2, 2, 2, 2\\) \\)\"" \
+  "evaluate associated vla"
+
+mi_create_varobj_checked pvla2_associated pvla2 \
+  "real\\\(kind=4\\\) \\\(5,2\\\)" "create local variable pvla2_associated"
+mi_gdb_test "591-var-info-type pvla2_associated" \
+  "591\\^done,type=\"real\\\(kind=4\\\) \\\(5,2\\\)\"" \
+  "info type variable pvla2_associated"
+mi_gdb_test "592-var-show-format pvla2_associated" \
+  "592\\^done,format=\"natural\"" \
+  "show format variable pvla2_associated"
+mi_gdb_test "593-var-evaluate-expression pvla2_associated" \
+  "593\\^done,value=\"\\\[2\\\]\"" \
+  "eval variable pvla2_associated"
+
+
+set bp_lineno [gdb_get_line_number "pvla2-set-to-null"]
+mi_create_breakpoint "-t vla.f90:$bp_lineno" 8 "del" "vla" ".*vla.f90" \
+  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+  { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "600-data-evaluate-expression pvla2" \
+  "600\\^done,value=\"<not associated>\"" "evaluate vla pointer set to null"
+
+mi_gdb_exit
+return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-watch.exp ./gdb/testsuite/gdb.mi/mi-watch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-watch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-watch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,18 +24,15 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
 gdb_exit
-if [mi_gdb_start] {
-    continue
-}
 
 standard_testfile basics.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mi-watch.exp
+     untested "failed to compile"
      return -1
 }
 
-proc test_watchpoint_creation_and_listing {type} {
+proc test_watchpoint_creation_and_listing {} {
     global mi_gdb_prompt
     global srcfile
     global hex
@@ -59,7 +56,7 @@ proc test_watchpoint_creation_and_listin
 }
 
 # UNUSED at the time
-proc test_awatch_creation_and_listing {type} {
+proc test_awatch_creation_and_listing {} {
     global mi_gdb_prompt
     global srcfile
     global hex
@@ -86,7 +83,7 @@ proc test_awatch_creation_and_listing {t
 }
 
 # UNUSED at the time
-proc test_rwatch_creation_and_listing {type} {
+proc test_rwatch_creation_and_listing {} {
     global mi_gdb_prompt
     global srcfile
     global hex
@@ -112,7 +109,7 @@ proc test_rwatch_creation_and_listing {t
 	    "delete read watchpoint"
 }
 
-proc test_watchpoint_triggering {type} {
+proc test_watchpoint_triggering {} {
     global mi_gdb_prompt
     global hex fullname_syntax srcfile
 
@@ -131,54 +128,56 @@ proc test_watchpoint_triggering {type} {
         {"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \
         "watchpoint trigger"
 
-    if { $type == "sw" } {
-      setup_xfail *-*-*
-    }
     mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \
         ".*basics.c" $line_callee3_close_brace \
         {"" "wpnum=\"2\""} \
         "watchpoint trigger"
-    clear_xfail *-*-*
 }
 
-proc test_watchpoint_all {type} {
-    with_test_prefix "$type" {
-	upvar srcdir srcdir
-	upvar subdir subdir
-	upvar binfile binfile
-
-	mi_delete_breakpoints
-	mi_gdb_reinitialize_dir $srcdir/$subdir
-	mi_gdb_load ${binfile}
-
-	mi_runto callee4
-	test_watchpoint_creation_and_listing $type
-	#test_rwatch_creation_and_listing $type
-	#test_awatch_creation_and_listing $type
-	test_watchpoint_triggering $type
-    }
-}
+proc test_watchpoint_all {mi_mode type} {
+    upvar srcdir srcdir
+    upvar subdir subdir
+    upvar binfile binfile
 
-# Run the tests twice, once using software watchpoints...
-mi_gdb_test "567-gdb-set can-use-hw-watchpoints 0" \
-	"567\\^done" \
-	"hw watchpoints toggle (1)"
-test_watchpoint_all sw
-
-mi_gdb_exit
+    if {$type == "hw" && [target_info exists gdb,no_hardware_watchpoints] } {
+	return
+    }
 
-# ... and unless requested otherwise...
-if [target_info exists gdb,no_hardware_watchpoints] {
-    return 0
-}
+    mi_gdb_exit
 
-mi_gdb_start
+    if {$mi_mode == "separate"} {
+	set start_ops "separate-mi-tty"
+    } else {
+	set start_ops ""
+    }
+    if [mi_gdb_start $start_ops] {
+	return
+    }
 
-# ... once using hardware watchpoints (if available).
-mi_gdb_test "890-gdb-set can-use-hw-watchpoints 1" \
-	"890\\^done" \
-	"hw watchpoints toggle (2)"
-test_watchpoint_all hw
+    if {$type == "sw"} {
+	set option 0
+    } else {
+	set option 1
+    }
+    mi_gdb_test "567-gdb-set can-use-hw-watchpoints $option" \
+	"567\\^done" \
+	"hw watchpoints toggle"
 
-mi_gdb_exit
-return 0
+    mi_delete_breakpoints
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_load ${binfile}
+
+    mi_runto callee4
+    test_watchpoint_creation_and_listing
+    #test_rwatch_creation_and_listing
+    #test_awatch_creation_and_listing
+    test_watchpoint_triggering
+}
+
+# Run the tests twice, once using software watchpoints, and another
+# with hardware watchpoints.
+foreach_with_prefix mi-mode {"main" "separate"} {
+    foreach_with_prefix wp-type {"sw" "hw"} {
+	test_watchpoint_all ${mi-mode} ${wp-type}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp ./gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/mi-watch-nonstop.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2011-2015 Free Software Foundation, Inc.
+#   Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/new-ui-mi-sync.c ./gdb/testsuite/gdb.mi/new-ui-mi-sync.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/new-ui-mi-sync.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/new-ui-mi-sync.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+
+int
+main (void)
+{
+  sleep (180);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp ./gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/new-ui-mi-sync.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,114 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that on a separate MI UI (new-ui mi <tty>), the printing of an
+# asynchronous event (e.g. =library-loaded) during the synchronous
+# execution of a command (e.g.  -exec-run or -exec-continue) does not
+# prematurely re-enable MI input.  After executing synchronous
+# commands, MI should not process further commands until the inferior
+# stops again.  See PR gdb/20418.
+
+load_lib mi-support.exp
+
+standard_testfile
+
+if {[build_executable $testfile.exp $testfile ${srcfile} "debug"] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+# The test driver.  SYNC_COMMAND specifies which command is used to
+# synchronously start the program running.
+
+proc do_test {sync_command} {
+    global srcdir subdir binfile srcfile
+    global gdb_spawn_id gdb_main_spawn_id mi_spawn_id inferior_spawn_id
+    global gdb_prompt mi_gdb_prompt
+
+    mi_gdb_exit
+
+    if {[mi_gdb_start "separate-mi-tty"] != 0} {
+	fail "could not start gdb"
+	return
+    }
+
+    mi_delete_breakpoints
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_load $binfile
+
+    # Start a synchronous run/continue on the MI UI.
+    set test "send synchronous execution command"
+    if {$sync_command == "run"} {
+	if {[mi_run_cmd] >= 0} {
+	    pass $test
+	} else {
+	    return
+	}
+    } else {
+	if {[mi_runto main] < 0} {
+	    return
+	}
+	if {[mi_send_resuming_command_raw "123-exec-continue" $test] >= 0} {
+	    pass $test
+	} else {
+	    return
+	}
+    }
+
+    # Send -thread-info immediately after.  If everything works
+    # correctly, this is only serviced by GDB when the execution
+    # stops.
+    send_gdb "456-thread-info\n"
+    pass "send -thread-info"
+
+    # Make sure we trigger an asynchronous event (=thread-group-added)
+    # in the separate MI UI.  Note the "run" variant usually triggers
+    # =thread-group-started/=thread-created/=library-loaded as well.
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "add-inferior" "Added inferior 2"
+    }
+
+    # Interrupt the program.
+    with_spawn_id $gdb_main_spawn_id {
+	set message "interrupt on the CLI"
+	gdb_test_multiple "interrupt" "$message" {
+	    -re "$gdb_prompt " {
+		gdb_test_multiple "" "$message" {
+		    -re "received signal SIGINT" {
+			pass $message
+		    }
+		}
+	    }
+	}
+    }
+
+    # On the MI channel, we should see the interrupt output _before_
+    # the -thread-info output.
+    with_spawn_id $mi_spawn_id {
+	mi_expect_interrupt "got MI interrupt output"
+    }
+
+    # Look for the result of our -thread-info.  If input were
+    # re-enabled too soon, the thread would incorrectly show up with
+    # state="running".
+    with_spawn_id $mi_spawn_id {
+	mi_gdb_test "" "456\\^.*state=\"stopped\".*" \
+	    "got -thread-info output and thread is stopped"
+    }
+}
+
+foreach_with_prefix sync-command {"run" "continue"} {
+    do_test ${sync-command}
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/non-stop.c ./gdb/testsuite/gdb.mi/non-stop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/non-stop.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/non-stop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test program for non-stop debugging.
-   Copyright 1996-2015 Free Software Foundation, Inc.
+   Copyright 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,19 +21,6 @@
 #include <pthread.h>
 #include <unistd.h>
 
-/* Under HPUX 10, the second arg of pthread_create
-   is prototyped to be just a "pthread_attr_t", while under Solaris it
-   is a "pthread_attr_t *".  Arg! */
-
-#if defined (__hpux__)
-#define PTHREAD_CREATE_ARG2(arg) arg
-#define PTHREAD_CREATE_NULL_ARG2 null_attr
-static pthread_attr_t null_attr;
-#else
-#define PTHREAD_CREATE_ARG2(arg) &arg
-#define PTHREAD_CREATE_NULL_ARG2 NULL
-#endif
-
 int exit_first_thread = 0;
 
 void break_at_me (int id, int i)
@@ -71,7 +58,7 @@ create_thread (int id)
   int *id2 = malloc (sizeof (int));
   *id2 = id;
 
-  if (pthread_create (&tid, PTHREAD_CREATE_NULL_ARG2, worker, (void *) id2))
+  if (pthread_create (&tid, NULL, worker, (void *) id2))
     {
       perror ("pthread_create 1");
       exit (1);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/non-stop-exit.c ./gdb/testsuite/gdb.mi/non-stop-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/non-stop-exit.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/non-stop-exit.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Test program exit in non-stop mode.
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsintrall.c ./gdb/testsuite/gdb.mi/nsintrall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsintrall.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/nsintrall.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsmoribund.c ./gdb/testsuite/gdb.mi/nsmoribund.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsmoribund.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/nsmoribund.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/ns-stale-regcache.c ./gdb/testsuite/gdb.mi/ns-stale-regcache.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/ns-stale-regcache.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/ns-stale-regcache.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsthrexec.c ./gdb/testsuite/gdb.mi/nsthrexec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/nsthrexec.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/nsthrexec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pending.c ./gdb/testsuite/gdb.mi/pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pending.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pendshr1.c ./gdb/testsuite/gdb.mi/pendshr1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pendshr1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pendshr1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pendshr2.c ./gdb/testsuite/gdb.mi/pendshr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pendshr2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pendshr2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pr11022.c ./gdb/testsuite/gdb.mi/pr11022.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pr11022.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pr11022.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pr11022.exp ./gdb/testsuite/gdb.mi/pr11022.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pr11022.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pr11022.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set MIFLAGS "-i=mi"
 standard_testfile .c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested pr11022.exp
+     untested "failed to compile"
      return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pthreads.c ./gdb/testsuite/gdb.mi/pthreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/pthreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/pthreads.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 /* Pthreads test program.
-   Copyright 1996-2015 Free Software Foundation, Inc.
+   Copyright 1996-2017 Free Software Foundation, Inc.
 
    Written by Keith Seitz of Red Hat.
    Copied from gdb.threads/pthreads.c.
@@ -25,19 +25,6 @@
 #include <pthread.h>
 #include <unistd.h>
 
-/* Under HPUX 10, the second arg of pthread_create
-   is prototyped to be just a "pthread_attr_t", while under Solaris it
-   is a "pthread_attr_t *".  Arg! */
-
-#if defined (__hpux__)
-#define PTHREAD_CREATE_ARG2(arg) arg
-#define PTHREAD_CREATE_NULL_ARG2 null_attr
-static pthread_attr_t null_attr;
-#else
-#define PTHREAD_CREATE_ARG2(arg) &arg
-#define PTHREAD_CREATE_NULL_ARG2 NULL
-#endif
-
 void *
 routine (void *arg)
 {
@@ -64,7 +51,7 @@ create_thread (void)
 {
   pthread_t tid;
 
-  if (pthread_create (&tid, PTHREAD_CREATE_NULL_ARG2, routine, (void *) 0xfeedface))
+  if (pthread_create (&tid, NULL, routine, (void *) 0xfeedface))
     {
       perror ("pthread_create 1");
       exit (1);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/solib-lib.c ./gdb/testsuite/gdb.mi/solib-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/solib-lib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/solib-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/solib-main.c ./gdb/testsuite/gdb.mi/solib-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/solib-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/solib-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/user-selected-context-sync.c ./gdb/testsuite/gdb.mi/user-selected-context-sync.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/user-selected-context-sync.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/user-selected-context-sync.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,63 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <pthread.h>
+#include <unistd.h>
+
+#define NUM_THREADS 2
+
+static pthread_barrier_t barrier;
+
+static void
+child_sub_function (void)
+{
+  while (1); /* thread loop line */
+}
+
+static void *
+child_function (void *args)
+{
+  pthread_barrier_wait (&barrier);
+
+  child_sub_function (); /* thread caller line */
+
+  return NULL;
+}
+
+int
+main (void)
+{
+  int i = 0;
+  pthread_t threads[NUM_THREADS];
+
+  /* Make the test exit eventually.  */
+  alarm (20);
+
+  /* Initialize the barrier, NUM_THREADS plus the main thread.  */
+  pthread_barrier_init (&barrier, NULL, NUM_THREADS + 1);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    pthread_create (&threads[i], NULL, child_function, NULL);
+
+  pthread_barrier_wait (&barrier);
+
+  while (1); /* main break line */
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/user-selected-context-sync.exp ./gdb/testsuite/gdb.mi/user-selected-context-sync.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/user-selected-context-sync.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/user-selected-context-sync.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,1274 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test checks that the "thread", "select-frame", "frame" and "inferior"
+# CLI commands, as well as the "-thread-select" and "-stack-select-frame" MI
+# commands send the appropriate user-selection-change events to all UIs.
+#
+# This test considers the case where console and MI are two different UIs,
+# and MI is created with the new-ui command.
+#
+# It also considers the case where the console commands are sent directly in
+# the MI channel as described in PR 20487.
+#
+# It does so by starting 2 inferiors with 3 threads each.
+# - Thread 1 of each inferior is the main thread, starting the others.
+# - Thread 2 of each inferior is stopped at /* thread loop line */.
+# - Thread 3 of each inferior is either stopped at /* thread loop line */, if we
+#   are using all-stop, or running, if we are using non-stop.
+
+load_lib mi-support.exp
+
+standard_testfile
+
+# Multiple inferiors are needed, therefore only native gdb and extended
+# gdbserver modes are supported.
+if [use_gdb_stub] {
+    untested "using gdb stub"
+    return
+}
+
+set compile_options "debug pthreads"
+if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
+    untested "failed to compile"
+    return -1
+}
+
+set main_break_line [gdb_get_line_number "main break line"]
+set thread_loop_line [gdb_get_line_number "thread loop line"]
+set thread_caller_line [gdb_get_line_number "thread caller line"]
+
+# Return whether we expect thread THREAD to be running in mode MODE.
+#
+# MODE can be either "all-stop" or "non-stop".
+# THREAD can be either a CLI thread id (e.g. 2.3) or an MI thread id (e.g. 6).
+
+proc thread_is_running { mode thread } {
+    if { $mode != "non-stop" } {
+	return 0
+    }
+
+    return [expr {
+	$thread == 1.3
+	|| $thread == 2.3
+	|| $thread == 3
+	|| $thread == 6
+    }]
+}
+
+# Make a regular expression to match the various inferior/thread/frame selection
+# events for CLI.
+#
+# MODE can be either "all-stop" or "non-stop", indicating which one is currently
+#   in use.
+# INF is the inferior number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce an inferior switch.
+# THREAD is the thread number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce a thread switch.
+# FRAME is the frame number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce a frame switch.  See the FRAME_RE variable for
+#   details.
+
+proc make_cli_re { mode inf thread frame } {
+    global srcfile
+    global thread_caller_line
+    global thread_loop_line
+    global main_break_line
+    global decimal
+
+    set any "\[^\r\n\]*"
+
+    set cli_re ""
+
+    set inf_re "\\\[Switching to inferior $inf${any}\\\]"
+    set all_stop_thread_re "\\\[Switching to thread [string_to_regexp $thread]${any}\\\]"
+
+    set frame_re(0) "#0${any}child_sub_function$any$srcfile:$thread_loop_line\r\n${any}thread loop line \\\*/"
+    set frame_re(1) "#1${any}child_function \\\(args=0x0\\\) at ${any}$srcfile:$thread_caller_line\r\n$thread_caller_line${any}/\\\* thread caller line \\\*/"
+
+    # Special frame for main thread.
+    set frame_re(2) "#0${any}\r\n${main_break_line}${any}"
+
+    if { $inf != -1 } {
+	append cli_re $inf_re
+    }
+
+    if { $thread != -1 } {
+	if { $inf != -1 } {
+	    append cli_re "\r\n"
+	}
+	set thread_re $all_stop_thread_re
+
+	if [thread_is_running $mode $thread] {
+	    set thread_re "$thread_re\\\(running\\\)"
+	}
+
+	append cli_re $thread_re
+    }
+
+    if { $frame != -1 } {
+	if { $thread != -1 } {
+	    append cli_re "\r\n"
+	}
+	append cli_re $frame_re($frame)
+    }
+
+    return $cli_re
+}
+
+# Make a regular expression to match the various inferior/thread/frame selection
+# events for MI.
+#
+# MODE can be either "all-stop" or "non-stop", indicating which one is currently
+#   in use.
+# THREAD is the thread number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce a thread switch.
+# If EVENT is 1, build a regex for an "=thread-selected" async event.
+#   Otherwise, build a regex for a response to a command.
+# FRAME is the frame number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce a frame switch.  See the FRAME_RE variable for
+#   details.
+
+proc make_mi_re { mode thread frame type } {
+    global srcfile
+    global hex
+    global decimal
+    global thread_loop_line
+    global main_break_line
+    global thread_caller_line
+
+    set any "\[^\r\n\]*"
+
+    set mi_re ""
+
+    set thread_event_re "=thread-selected,id=\"$thread\""
+    set thread_answer_re "\\^done,new-thread-id=\"$thread\""
+
+    set frame_re(0) ",frame=\{level=\"0\",addr=\"$hex\",func=\"child_sub_function\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_loop_line\"\}"
+    set frame_re(1) ",frame=\{level=\"1\",addr=\"$hex\",func=\"child_function\",args=\\\[\{name=\"args\",value=\"0x0\"\}\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_caller_line\"\}"
+
+    # Special frame for main thread.
+    set frame_re(2) ",frame=\{level=\"0\",addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"${main_break_line}\"\}"
+
+    if { $thread != -1 } {
+	if { $type == "event" } {
+	    append mi_re $thread_event_re
+	} elseif { $type == "response" } {
+	    append mi_re $thread_answer_re
+	} else {
+	    error "Invalid value for EVENT."
+	}
+    }
+
+    if { $frame != -1 } {
+	append mi_re $frame_re($frame)
+    }
+
+    if { $type == "event" } {
+	append mi_re "\r\n"
+    }
+
+    return $mi_re
+}
+
+# Make a regular expression to match the various inferior/thread/frame selection
+# events when issuing CLI commands inside MI.
+#
+# COMMAND is the CLI command that was sent to GDB, which will be output in the
+#   console output stream.
+# CLI_IN_MI_MODE indicates which method of CLI-in-MI command is used.  It can be
+#   either "direct" of "interpreter-exec".
+# MODE can be either "all-stop" or "non-stop", indicating which one is currently
+#   in use.
+# If EVENT is 1, expect a =thread-select MI event.
+# INF is the inferior number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce an inferior switch.
+# CLI_THREAD is the thread number as seen in the CLI (inferior-qualified) we are
+#   expecting GDB to switch to, or -1 if we are not expecting GDB to announce a
+#   thread switch.
+# MI_THREAD is the thread number as seen in the MI (global number) we are
+#   expecting GDB to switch to, or -1 if we are not expecting GDB to announce a
+#   thread switch.
+# FRAME is the frame number we are expecting GDB to switch to, or -1 if we are
+#   not expecting GDB to announce a frame switch.  See the FRAME_RE variable for
+#   details.
+
+proc make_cli_in_mi_re { command cli_in_mi_mode mode event inf cli_thread
+		         mi_thread frame  } {
+    global srcfile
+    global thread_loop_line
+    global main_break_line
+    global thread_caller_line
+
+    set any "\[^\r\n\]*"
+
+    set command_re [string_to_regexp $command]
+    set cli_in_mi_re "$command_re\r\n"
+
+    if { $cli_in_mi_mode == "direct" } {
+	append cli_in_mi_re "&\"$command_re\\\\n\"\r\n"
+    }
+
+    set frame_re(0) "~\"#0${any}child_sub_function${any}$srcfile:$thread_loop_line\\\\n\"\r\n~\"${thread_loop_line}${any}thread loop line \\\*/\\\\n\"\r\n"
+    set frame_re(1) "~\"#1${any}child_function \\\(args=0x0\\\) at ${any}$srcfile:$thread_caller_line\\\\n\"\r\n~\"$thread_caller_line${any}thread caller line \\\*/\\\\n\"\r\n"
+
+    # Special frame for main thread.
+    set frame_re(2) "~\"#0${any}main${any}\\\\n\"\r\n~\"${main_break_line}${any}\"\r\n"
+
+    if { $inf != -1 } {
+	append cli_in_mi_re "~\""
+	append cli_in_mi_re [make_cli_re $mode $inf -1 -1]
+	append cli_in_mi_re "\\\\n\"\r\n"
+    }
+
+    if { $cli_thread != "-1" } {
+	append cli_in_mi_re "~\""
+	append cli_in_mi_re [make_cli_re $mode -1 $cli_thread -1]
+	append cli_in_mi_re "\\\\n\"\r\n"
+    }
+
+    if { $frame != -1 } {
+	append cli_in_mi_re $frame_re($frame)
+    }
+
+    if { $event == 1 } {
+	append cli_in_mi_re [make_mi_re $mode $mi_thread $frame event]
+    }
+
+    append cli_in_mi_re "\\^done"
+
+    return $cli_in_mi_re
+}
+
+# Return the current value of the "scheduler-locking" parameter.
+
+proc show_scheduler_locking { } {
+    global gdb_prompt
+    global expect_out
+
+    set any "\[^\r\n\]*"
+
+    set test "show scheduler-locking"
+    gdb_test_multiple $test $test {
+	-re ".*Mode for locking scheduler during execution is \"(${any})\".\r\n$gdb_prompt " {
+	    pass $test
+	    return $expect_out(1,string)
+	}
+    }
+
+    error "Couldn't get current scheduler-locking value."
+}
+
+# Prepare inferior INF so it is in the state we expect (see comment at the top).
+
+proc test_continue_to_start { mode inf } {
+    global gdb_spawn_id
+    global mi_spawn_id
+    global gdb_main_spawn_id
+    global srcfile
+    global main_break_line
+    global thread_loop_line
+    global decimal
+    global gdb_prompt
+
+    set any "\[^\r\n\]*"
+
+    if { $gdb_spawn_id != $gdb_main_spawn_id } {
+	error "This should not happen."
+    }
+
+    with_test_prefix "inferior $inf" {
+	with_spawn_id $gdb_main_spawn_id {
+	    # Continue to the point where we know for sure the threads are
+	    # started.
+	    gdb_test "tbreak $srcfile:$main_break_line" \
+		"Temporary breakpoint ${any}" \
+		"set breakpoint in main"
+
+	    gdb_continue_to_breakpoint "main breakpoint"
+
+	    # Consume MI event output.
+	    with_spawn_id $mi_spawn_id {
+		mi_expect_stop "breakpoint-hit" "main" "" "$srcfile" \
+		    "$decimal" {"" "disp=\"del\""} "stop at breakpoint in main"
+	    }
+
+	    if { $mode == "all-stop" } {
+		set previous_schedlock_val [show_scheduler_locking]
+
+		# Set scheduler-locking on, so that we can control threads
+		# independently.
+		gdb_test_no_output "set scheduler-locking on"
+
+		# Continue each child thread to the point we want them to be.
+		foreach thread { 2 3 } {
+		    gdb_test "thread $inf.$thread" ".*" "select child thread $inf.$thread"
+
+		    gdb_test "tbreak $srcfile:$thread_loop_line" \
+			"Temporary breakpoint ${any}" \
+			"set breakpoint for thread $inf.$thread"
+
+		    gdb_continue_to_breakpoint "continue thread $inf.$thread to infinite loop breakpoint"
+
+		    # Consume MI output.
+		    with_spawn_id $mi_spawn_id {
+			mi_expect_stop "breakpoint-hit" "child_sub_function" \
+			    "" "$srcfile" "$decimal" {"" "disp=\"del\""} \
+			    "thread $inf.$thread stops MI"
+		    }
+		}
+
+		# Restore scheduler-locking to its original value.
+		gdb_test_no_output "set scheduler-locking $previous_schedlock_val"
+	    } else { # $mode == "non-stop"
+		# Put a thread-specific breakpoint for thread 2 of the current
+		# inferior.  We don't put a breakpoint for thread 3, since we
+		# want to let it run.
+		set test "set thread-specific breakpoint, thread $inf.2"
+		gdb_test_multiple "tbreak $srcfile:$thread_loop_line thread $inf.2" $test {
+		    -re "Temporary breakpoint ${any}\r\n$gdb_prompt " {
+			pass $test
+		    }
+		}
+
+		# Confirm the stop of thread $inf.2.
+		set test "thread $inf.2 stops CLI"
+		gdb_test_multiple "" $test {
+		    -re "Thread $inf.2 ${any} hit Temporary breakpoint ${any}\r\n$thread_loop_line${any}\r\n" {
+			pass $test
+		    }
+		}
+
+		# Consume MI output.
+		with_spawn_id $mi_spawn_id {
+		    mi_expect_stop "breakpoint-hit" "child_sub_function" \
+			"" "$srcfile" "$decimal" {"" "disp=\"del\""} \
+			"thread $inf.2 stops MI"
+		}
+	    }
+	}
+    }
+}
+
+# Prepare the test environment.
+#
+# MODE can be either "all-stop" or "non-stop".
+
+proc_with_prefix test_setup { mode } {
+    global srcfile
+    global srcdir
+    global subdir
+    global gdb_main_spawn_id
+    global mi_spawn_id
+    global decimal
+    global binfile
+    global GDBFLAGS
+    global async
+
+    set any "\[^\r\n\]*"
+
+    mi_gdb_exit
+
+    save_vars { GDBFLAGS } {
+	if { $mode == "non-stop" } {
+	    set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop 1\""]
+	}
+
+	if { [mi_gdb_start "separate-mi-tty"] != 0 } {
+	    return
+	}
+    }
+
+    mi_delete_breakpoints
+    mi_gdb_reinitialize_dir $srcdir/$subdir
+    mi_gdb_load $binfile
+
+    if { [mi_runto main] < 0 } {
+	fail "can't run to main"
+	return
+    }
+
+    # When using mi_expect_stop, we don't expect a prompt after the *stopped
+    # event, since the blocking commands are done from the CLI.  Setting async
+    # to 1 makes it not expect the prompt.
+    set async 1
+
+    with_spawn_id $gdb_main_spawn_id {
+	# Add the second inferior now.  While this is not mandatory, it allows
+	# us to assume that per-inferior thread numbering will be used,
+	# simplifying test_continue_to_start a bit (Thread 1.2 and not Thread 2).
+	gdb_test "add-inferior" "Added inferior 2" "add inferior 2"
+
+	# Prepare the first inferior for the test.
+	test_continue_to_start $mode 1
+
+	# Switch to and start the second inferior.
+	gdb_test "inferior 2" "\\\[Switching to inferior 2${any}\\\]" "switch to inferior 2"
+	gdb_load ${binfile}
+
+	# Doing "start" on the CLI generates a ton of MI output.  At some point,
+	# if we don't consume/match it, the buffer between GDB's MI channel and
+	# Expect will get full, GDB will block on a write system call and we'll
+	# deadlock, waiting for CLI output that will never arrive.  And then
+	# we're sad.  So instead of using gdb_test and expect CLI output, send
+	# the start command first, then consume MI output, and finally consume
+	# CLI output.
+	send_gdb "start\n"
+
+	with_spawn_id $mi_spawn_id {
+	    mi_expect_stop "breakpoint-hit" "main" "" "$srcfile" "$decimal" \
+		{"" "disp=\"del\""} "main stop"
+	}
+
+	# Consume CLI output.
+	gdb_test "" "Temporary breakpoint.*Starting program.*"
+
+	# Prepare the second inferior for the test.
+	test_continue_to_start $mode 2
+    }
+}
+
+# Reset the selection to frame #0 of thread THREAD.
+
+proc reset_selection { thread } {
+    global gdb_main_spawn_id
+
+    set any "\[^\r\n\]*"
+
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "thread $thread" \
+	    "\\\[Switching to thread $thread ${any}\\\].*" \
+	    "reset selection to thread $thread"
+	gdb_test "frame 0" ".*" "reset selection to frame 0"
+    }
+}
+
+# Flush Expect's internal buffers for both CLI and MI.
+#
+# The idea here is to send a command, and to consume all the characters that we
+# expect that command to output, including the following prompt.  Using gdb_test
+# and mi_gdb_test should do that.
+
+proc flush_buffers { } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "print 444" "= 444" "flush CLI"
+    }
+
+    with_spawn_id $mi_spawn_id {
+	mi_gdb_test "555-data-evaluate-expression 666" ".*done,value=\"666\"" "flush MI"
+    }
+}
+
+# Run a command on the current spawn id, to confirm that no output is pending
+# in Expect's internal buffer.  This is used to ensure that nothing was output
+# on the spawn id since the call to gdb_test/mi_gdb_test/flush_buffers.
+#
+# The key here is that the regexes use start-of-buffer anchors (^), ensuring
+# that they match the entire buffer, confirming that there was nothing in it
+# before.
+
+proc ensure_no_output { test } {
+    global gdb_spawn_id gdb_main_spawn_id mi_spawn_id
+    global decimal
+
+    if { $gdb_spawn_id == $gdb_main_spawn_id } {
+	# CLI
+	gdb_test "print 666" \
+		 "^print 666\r\n\\\$$decimal = 666" \
+		 "$test, ensure no output CLI"
+    } elseif { $gdb_spawn_id == $mi_spawn_id } {
+	# MI
+	mi_gdb_test "777-data-evaluate-expression 888" \
+		    "^777-data-evaluate-expression 888\r\n777\\^done,value=\"888\"" \
+		    "$test, ensure no output MI"
+    } else {
+	error "Unexpected gdb_spawn_id value."
+    }
+}
+
+# Match a regular expression, or ensure that there was no output.
+#
+# If RE is non-empty, try to match the content of the program output (using the
+# current spawn_id) and pass/fail TEST accordingly.
+# If RE is empty, ensure that the program did not output anything.
+
+proc match_re_or_ensure_not_output { re test } {
+    if { $re != "" } {
+	gdb_expect {
+	    -re "$re" {
+		pass $test
+	    }
+
+	    default {
+		fail $test
+	    }
+	}
+    } else {
+	ensure_no_output $test
+    }
+}
+
+# Test selecting an inferior from CLI.
+
+proc_with_prefix test_cli_inferior { mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    reset_selection "1.1"
+
+    set mi_re [make_mi_re $mode 4 2 event]
+    set cli_re [make_cli_re $mode 2 2.1 2]
+
+    flush_buffers
+
+    # Do the 'inferior' command.
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "inferior 2" $cli_re "CLI select inferior"
+    }
+
+    with_spawn_id $mi_spawn_id {
+	match_re_or_ensure_not_output $mi_re "event on MI"
+    }
+
+    # Do the 'inferior' command on the currently selected inferior.  For now,
+    # GDB naively re-outputs everything.
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "inferior 2" $cli_re "CLI select inferior again"
+    }
+
+    with_spawn_id $mi_spawn_id {
+	match_re_or_ensure_not_output $mi_re "event on MI again"
+    }
+}
+
+# Test thread selection from CLI.
+
+proc_with_prefix test_cli_thread { mode } {
+    global gdb_main_spawn_id
+    global mi_spawn_id
+
+    set any "\[^\r\n\]*"
+
+    reset_selection "1.1"
+    flush_buffers
+
+    with_test_prefix "thread 1.2" {
+	# Do the 'thread' command to select a stopped thread.
+
+	set mi_re [make_mi_re $mode 2 0 event]
+	set cli_re [make_cli_re $mode -1 1.2 0]
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread 1.2" $cli_re "select thread"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select thread, event on MI "
+	}
+
+	# Do the 'thread' command to select the same thread.  We shouldn't receive
+	# an event on MI, since we won't actually switch thread.
+
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread 1.2" $cli_re "select thread again"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select thread, event on MI again"
+	}
+
+	# Try the 'thread' command without arguments.
+
+	set cli_re "\\\[Current thread is 1\\.2.*\\\]"
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread" $cli_re "thread without args"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "thread without args, event on MI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Do the 'thread' command to select the third thread, stopped on all-stop,
+	# running on non-stop.
+
+	if { $mode == "all-stop" } {
+	    set cli_re [make_cli_re $mode -1 1.3 0]
+	    set mi_re [make_mi_re $mode 3 0 event]
+	} else {
+	    set cli_re [make_cli_re $mode -1 1.3 -1]
+	    set mi_re [make_mi_re $mode 3 -1 event]
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread 1.3" $cli_re "select thread"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select thread, event on MI"
+	}
+
+	# Do the 'thread' command to select the third thread again.  Again, we
+	# shouldn't receive an event on MI.
+
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread 1.3" $cli_re "select thread again"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select thread again, event on MI"
+	}
+
+	# Try the 'thread' command without arguments.
+
+	set cli_re "\\\[Current thread is 1\\.3 ${any}\\\]"
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "thread" $cli_re "thread without args"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "thread without args, event on MI"
+	}
+    }
+
+    # Idea for the future: selecting a thread in a different inferior.  For now,
+    # GDB doesn't show an inferior switch, but if it did, it would be a nice
+    # place to test it.
+}
+
+# Test frame selection from CLI.
+
+proc_with_prefix test_cli_frame { mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    with_test_prefix "thread 1.2" {
+	reset_selection "1.2"
+	flush_buffers
+
+	# Do the 'frame' command to select frame 1.
+
+	set mi_re [make_mi_re $mode 2 1 event]
+	set cli_re [make_cli_re $mode -1 -1 1]
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "frame 1" $cli_re "select frame 1"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1, event on MI"
+	}
+
+	# Do the 'frame' command to select the same frame.  This time we don't
+	# expect an event on MI, since we won't actually change frame.
+
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "frame 1" $cli_re "select frame 1 again"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1 again, event on MI"
+	}
+
+	# Do the 'frame' command without arguments.  We shouldn't see anything on MI.
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "frame" $cli_re "frame without args"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "frame without args, event on MI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Now, try the 'frame' command on thread 3, which is running if we are in
+	# non-stop mode.
+	reset_selection "1.3"
+	flush_buffers
+
+	if {$mode == "all-stop"} {
+	    set mi_re [make_mi_re $mode 3 1 event]
+	    set cli_re [make_cli_re $mode -1 -1 1]
+	} elseif {$mode == "non-stop"} {
+	    set mi_re ""
+	    set cli_re "Selected thread is running\\."
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "frame 1" $cli_re "select frame 1"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1, event on MI"
+	}
+
+	# Do the 'frame' command without arguments.
+
+	if { $mode == "non-stop" } {
+	    set cli_re "No stack\\."
+	}
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test "frame" $cli_re "frame without args"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "frame without args, event on MI"
+	}
+    }
+}
+
+# Test frame selection from CLI with the select-frame command.
+
+proc_with_prefix test_cli_select_frame { mode } {
+    global gdb_main_spawn_id mi_spawn_id expect_out
+
+    with_test_prefix "thread 1.2" {
+	reset_selection "1.2"
+	flush_buffers
+
+	# Do the 'select-frame' command to select frame 1.
+
+	set mi_re [make_mi_re $mode 2 1 event]
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test_no_output "select-frame 1" "select frame 1"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1, event on MI"
+	}
+
+	# Do the 'select-frame' command to select the same frame.  This time we expect to
+	# event on MI, since we won't actually change frame.
+
+	set mi_re ""
+
+	with_spawn_id $gdb_main_spawn_id {
+	    gdb_test_no_output "select-frame 1" "select frame 1 again"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1 again, event on MI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Now, try the 'select-frame' command on thread 3, which is running if we are in
+	# non-stop mode.
+	reset_selection "1.3"
+	flush_buffers
+
+	if {$mode == "all-stop"} {
+	    set mi_re [make_mi_re $mode 3 1 event]
+	} elseif {$mode == "non-stop"} {
+	    set mi-re ""
+	    set cli_re "Selected thread is running\\."
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    if { $mode == "all-stop" } {
+		gdb_test_no_output "select-frame 1" "select frame 1"
+	    } else {
+		gdb_test "select-frame 1" $cli_re "select frame 1"
+	    }
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    match_re_or_ensure_not_output $mi_re "select frame 1, event on MI"
+	}
+    }
+}
+
+# Test doing an up and then down command from CLI.
+
+proc_with_prefix test_cli_up_down { mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    reset_selection "1.2"
+    flush_buffers
+
+    # Try doing an 'up'.
+
+    set mi_re [make_mi_re $mode 2 1 event]
+    set cli_re [make_cli_re $mode -1 -1 1]
+
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "up" $cli_re "frame up"
+    }
+
+    with_spawn_id $mi_spawn_id {
+	match_re_or_ensure_not_output $mi_re "frame up, event on MI"
+    }
+
+    # Try doing a 'down'.
+
+    set mi_re [make_mi_re $mode 2 0 event]
+    set cli_re [make_cli_re $mode -1 -1 0]
+
+    with_spawn_id $gdb_main_spawn_id {
+	gdb_test "down" $cli_re "frame down"
+    }
+
+    with_spawn_id $mi_spawn_id {
+	match_re_or_ensure_not_output $mi_re "frame down, event on MI"
+    }
+}
+
+# Test selecting a thread from MI.
+
+proc_with_prefix test_mi_thread_select { mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    reset_selection "1.1"
+    flush_buffers
+
+    with_test_prefix "thread 1.2" {
+	# Do the '-thread-select' command to select a stopped thread.
+
+	set mi_re [make_mi_re $mode 2 0 response]
+	set cli_re [make_cli_re $mode -1 1.2 0]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-thread-select 2" $mi_re "-thread-select"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "-thread-select, event on CLI"
+	}
+
+	# Do the '-thread-select' command to select the same thread.  We
+	# shouldn't receive an event on CLI, since we won't actually switch
+	# thread.
+
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-thread-select 2" $mi_re "-thread-select again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "-thread-select again, event on CLI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Do the '-thread-select' command to select the third thread, stopped on all-stop,
+	# running on non-stop.
+
+	if { $mode == "all-stop" } {
+	    set mi_re [make_mi_re $mode 3 0 response]
+	    set cli_re [make_cli_re $mode -1 1.3 0]
+	} else {
+	    set mi_re [make_mi_re $mode 3 -1 response]
+	    set cli_re [make_cli_re $mode -1 1.3 -1]
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-thread-select 3" $mi_re "-thread-select"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "-thread-select, event on CLI"
+	}
+
+	# Do the 'thread' command to select the third thread again.  Again, we
+	# shouldn't receive an event on MI.
+
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-thread-select 3" $mi_re "-thread-select again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "-thread-select again, event on CLI"
+	}
+    }
+
+    with_test_prefix "thread 1.2 with --thread" {
+	# Test selecting a thread from MI with a --thread option.  This test
+	# verifies that even if the thread GDB would switch to is the same has
+	# the thread specified with --thread, an event is still sent to CLI.
+	# In this case this is thread 1.2
+
+	set mi_re [make_mi_re $mode 2 0 response]
+	set cli_re [make_cli_re $mode -1 1.2 0]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-thread-select --thread 2 2" $mi_re "-thread-select"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    # This doesn't work as of now, no event is sent on CLI.  It is
+	    # commented out so we don't have to wait for the timeout every time.
+	    # match_re_or_ensure_not_output "$cli_re\r\n" "-thread-select, event on cli"
+	    kfail "gdb/20631" "thread-select, event on cli"
+	}
+    }
+
+    # Idea for the future: selecting a thread in a different inferior.  For now,
+    # GDB doesn't show an inferior switch, but if it did, it would be a nice
+    # place to test it.
+}
+
+proc_with_prefix test_mi_stack_select_frame { mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    with_test_prefix "thread 1.2" {
+	reset_selection "1.2"
+	flush_buffers
+
+	# Do the '-stack-select-frame' command to select frame 1.
+
+	set mi_re "\\^done"
+	set cli_re [make_cli_re $mode -1 -1 1]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-stack-select-frame 1" $mi_re "-stack-select-frame"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "-stack-select-frame, event on MI"
+	}
+
+	# Do the '-stack-select-frame' command to select the same frame.  This time we don't
+	# expect an event on CLI, since we won't actually change frame.
+
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-stack-select-frame 1" $mi_re "-stack-select-frame again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "-stack-select-frame again, event on MI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Now, try the '-stack-select-frame' command on thread 3, which is
+	# running if we are in non-stop mode.
+	reset_selection "1.3"
+	flush_buffers
+
+	if {$mode == "all-stop"} {
+	    set mi_re "\\^done"
+	    set cli_re [make_cli_re $mode -1 -1 1]
+	    append cli_re "\r\n"
+	} elseif {$mode == "non-stop"} {
+	    set cli_re ""
+	    set mi_re "\\^error,msg=\"Selected thread is running\\.\""
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test "-stack-select-frame 1" $mi_re "-stack-select-frame"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "-stack-select-frame, event on MI"
+	}
+    }
+}
+
+proc make_cli_in_mi_command { cli_in_mi_mode command } {
+    if { $cli_in_mi_mode == "direct" } {
+	return $command
+    } elseif { $cli_in_mi_mode == "interpreter-exec" } {
+	return "-interpreter-exec console \"$command\""
+    } else {
+	error "Invalid value for CLI_IN_MI_MODE."
+    }
+}
+
+# Test selecting the inferior using a CLI command in the MI channel.
+
+proc_with_prefix test_cli_in_mi_inferior { mode cli_in_mi_mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    reset_selection "1.1"
+    flush_buffers
+
+    set command [make_cli_in_mi_command $cli_in_mi_mode "inferior 2"]
+
+    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 2 2.1 4 2]
+    set cli_re [make_cli_re $mode 2 "2.1" 2]
+
+    with_spawn_id $mi_spawn_id {
+	mi_gdb_test $command $mi_re "select inferior"
+    }
+
+    with_spawn_id $gdb_main_spawn_id {
+	match_re_or_ensure_not_output "$cli_re\r\n" "select inferior, event on CLI"
+    }
+
+    # Do the 'inferior' command on the currently selected inferior.  For now,
+    # GDB naively re-outputs everything.
+    with_spawn_id $mi_spawn_id {
+	mi_gdb_test $command $mi_re "select inferior again"
+    }
+
+    with_spawn_id $gdb_main_spawn_id {
+	match_re_or_ensure_not_output $cli_re "select inferior again, event on CLI"
+    }
+}
+
+# Test selecting the thread using a CLI command in the MI channel.
+
+proc_with_prefix test_cli_in_mi_thread { mode cli_in_mi_mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    reset_selection "1.1"
+    flush_buffers
+
+    with_test_prefix "thread 1.2" {
+	# Do the 'thread' command to select a stopped thread.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "thread 1.2"]
+	set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 -1 1.2 2 0]
+	set cli_re [make_cli_re $mode -1 1.2 0]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select thread"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "select thread, event on CLI"
+	}
+
+	# Do the 'thread' command to select the same thread.  We shouldn't
+	# receive an event on CLI, since we won't actually switch thread.
+
+	set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 1.2 2 0]
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select thread again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "select thread again, event on CLI"
+	}
+
+	# Try the 'thread' command without arguments.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "thread"]
+
+	set mi_re "${command}.*~\"\\\[Current thread is 1\\.2.*\\\]\\\\n\".*\\^done"
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "thread without args"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "thread without args, event on CLI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Do the 'thread' command to select the third thread, stopped on
+	# all-stop, running on non-stop.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "thread 1.3"]
+	if { $mode == "all-stop" } {
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 -1 1.3 3 0]
+	    set cli_re [make_cli_re $mode -1 "1.3" 0]
+	} else {
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 -1 1.3 3 -1]
+	    set cli_re [make_cli_re $mode -1 "1.3" -1]
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select thread"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "select thread, event on CLI"
+	}
+
+	# Do the 'thread' command to select the third thread again.  Again, we
+	# shouldn't receive an event on MI.
+
+	if { $mode == "all-stop" } {
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 1.3 3 0]
+	} else {
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 1.3 3 -1]
+	}
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select thread again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "select thread again, event on CLI"
+	}
+
+	# Try the 'thread' command without arguments.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "thread"]
+
+	set mi_re "${command}.*~\"\\\[Current thread is 1\\.3.*\\\]\\\\n\".*\\^done"
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "thread without args"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "thread without args, event on CLI"
+	}
+    }
+
+    # Idea for the future: selecting a thread in a different inferior.  For now,
+    # GDB doesn't show an inferior switch, but if it did, it would be a nice
+    # place to test it.
+}
+
+# Test selecting the frame using a CLI command in the MI channel.
+
+proc_with_prefix test_cli_in_mi_frame { mode cli_in_mi_mode } {
+    global gdb_main_spawn_id mi_spawn_id
+
+    with_test_prefix "thread 1.2" {
+	reset_selection "1.2"
+	flush_buffers
+
+	# Do the 'frame' command to select frame 1.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "frame 1"]
+	set cli_re [make_cli_re $mode -1 -1 1]
+	set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 -1 -1 2 1]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select frame 1"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output "$cli_re\r\n" "select frame 1, event on CLI"
+	}
+
+	# Do the 'frame' command to select the same frame.  This time we don't
+	# expect an event on MI, since we won't actually change frame.
+
+	set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 -1 2 1]
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select frame 1 again"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "select frame 1 again, event on CLI"
+	}
+
+	# Do the 'frame' command without arguments.  We shouldn't see anything on MI.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "frame"]
+	set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 -1 2 1]
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "frame without args"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "frame without args, event on CLI"
+	}
+    }
+
+    with_test_prefix "thread 1.3" {
+	# Now, try the 'frame' command on thread 3, which is running if we are in
+	# non-stop mode.
+	reset_selection "1.3"
+	flush_buffers
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "frame 1"]
+	if {$mode == "all-stop"} {
+	    set cli_re [make_cli_re $mode -1 -1 1]
+	    append cli_re "\r\n"
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 1 -1 -1 3 1]
+	} elseif {$mode == "non-stop"} {
+	    set cli_re ""
+	    set mi_re "\\^error,msg=\"Selected thread is running\\.\".*"
+	}
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "select frame 1"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "select frame 1, event on CLI"
+	}
+
+	# Do the 'frame' command without arguments.
+
+	set command [make_cli_in_mi_command $cli_in_mi_mode "frame"]
+	if { $mode == "all-stop" } {
+	    set mi_re [make_cli_in_mi_re $command $cli_in_mi_mode $mode 0 -1 -1 -1 1]
+	} else {
+	    set mi_re "\\^error,msg=\"No stack\\.\""
+	}
+	set cli_re ""
+
+	with_spawn_id $mi_spawn_id {
+	    mi_gdb_test $command $mi_re "frame without args"
+	}
+
+	with_spawn_id $gdb_main_spawn_id {
+	    match_re_or_ensure_not_output $cli_re "frame without args, event on CLI"
+	}
+    }
+}
+
+foreach_with_prefix mode { "all-stop" "non-stop" } {
+    test_setup $mode
+
+    # Test selecting inferior, thread and frame from CLI
+
+    test_cli_inferior $mode
+    test_cli_thread $mode
+    test_cli_frame $mode
+    test_cli_select_frame $mode
+    test_cli_up_down $mode
+
+    # Test selecting thread and frame from MI
+
+    test_mi_thread_select $mode
+    test_mi_stack_select_frame $mode
+
+    # Test some CLI commands sent through MI, both with a "direct" command,
+    # such as "thread 1", and with -interpreter-exec, such as
+    # '-interpreter-exec console "thread 1"'.
+
+    foreach_with_prefix exec_mode {"direct" "interpreter-exec"} {
+	test_cli_in_mi_inferior $mode $exec_mode
+	test_cli_in_mi_thread $mode $exec_mode
+	test_cli_in_mi_frame $mode $exec_mode
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/var-cmd.c ./gdb/testsuite/gdb.mi/var-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/var-cmd.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/var-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 1999-2015 Free Software Foundation, Inc.
+/* Copyright 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/vla.c ./gdb/testsuite/gdb.mi/vla.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/vla.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/vla.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,7 +2,7 @@
 
    Contributed by Intel Corp. <keven.boell@intel.com>
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/vla.f90 ./gdb/testsuite/gdb.mi/vla.f90
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/vla.f90	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/vla.f90	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+! Copyright 2015-2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+program vla
+  real, allocatable :: vla1 (:)
+  real, target, allocatable :: vla2(:, :)
+  real, pointer :: pvla2 (:, :)
+  logical :: l
+  nullify (pvla2)
+
+  allocate (vla1 (5))         ! vla1-not-allocated
+  l = allocated(vla1)         ! vla1-allocated
+
+  vla1(:) = 1
+  vla1(2) = 42                ! vla1-filled
+  vla1(4) = 24
+
+  deallocate (vla1)           ! vla1-modified
+  l = allocated(vla1)         ! vla1-deallocated
+
+  allocate (vla2 (5, 2))
+  vla2(:, :) = 2
+
+  pvla2 => vla2               ! pvla2-not-associated
+  l = associated(pvla2)       ! pvla2-associated
+
+  pvla2(2, 1) = 42
+
+  pvla2 => null()
+  l = associated(pvla2)       ! pvla2-set-to-null
+end program vla
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/watch-nonstop.c ./gdb/testsuite/gdb.mi/watch-nonstop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.mi/watch-nonstop.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.mi/watch-nonstop.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/Makefile.in ./gdb/testsuite/gdb.modula2/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.modula2/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,34 +0,0 @@
-# Makefile for regression testing the GNU debugger.
-# Copyright 2007-2015 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# GDB is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-
-# GDB is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = unbounded1
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/unbounded1.c ./gdb/testsuite/gdb.modula2/unbounded1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/unbounded1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.modula2/unbounded1.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test script is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/unbounded-array.exp ./gdb/testsuite/gdb.modula2/unbounded-array.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.modula2/unbounded-array.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.modula2/unbounded-array.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
 
 standard_testfile unbounded1.c
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug quiet}]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug quiet}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/base.exp ./gdb/testsuite/gdb.multi/base.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/base.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/base.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,36 +30,40 @@ set exec3 "goodbye"
 set srcfile3 ${exec3}.c
 set binfile3 [standard_output_file ${exec3}]
 
-if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}] == -1 } {
+if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug}] == -1 } {
     return -1
 }
 
-if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}] == -1} {
+if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug}] == -1} {
     return -1
 }
 
-if { [build_executable ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnings}] == -1 } {
+if { [build_executable ${testfile}.exp ${exec3} "${srcfile3}" {debug}] == -1 } {
     return -1
 }
 
 clean_restart ${exec1}
 
-# Add an empty inferior space, switch to it, and load a main
-# executable into it.
+gdb_test {print $_inferior} " = 1"
+
+# Add an empty inferior, switch to it, and load a main executable into
+# it.
 gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
 gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2"
 gdb_test "file ${binfile2}" ".*" "load ${exec2} file in inferior 2"
 
-# Add a new inferior space and load a main executable into it in one
+gdb_test {print $_inferior} " = 2" "print \$_inferior after switching"
+
+# Add a new inferior and load a main executable into it in one
 # command.
 gdb_test "add-inferior -exec ${binfile3}" \
     "Added inferior 3.*" \
     "add inferior 3 with -exec ${exec3}"
 
-# Check that we have multiple spaces.
+# Check that we have multiple inferiors.
 
 gdb_test "info inferiors" \
-    "Executable.*${exec3}.*${exec2}.*${exec1}.*"
+    "Executable.*${exec1}.*${exec2}.*${exec3}.*"
 
 # Test info inferiors with args
 
@@ -68,16 +72,16 @@ set see2 0
 set see3 0
 
 gdb_test_multiple "info inferior 2 3" "info inferior 2 3" {
-    -re ". 3 \[^\r\n\]*${exec3}" {
-	set see3 1
+    -re ". 1 \[^\r\n\]*${exec1}" {
+	set see1 1
 	exp_continue
     }
     -re ". 2 \[^\r\n\]*${exec2}" {
 	set see2 1
 	exp_continue
     }
-    -re ". 1 \[^\r\n\]*${exec1}" {
-	set see1 1
+    -re ". 3 \[^\r\n\]*${exec3}" {
+	set see3 1
 	exp_continue
     }
     -re "$gdb_prompt $" {
@@ -94,16 +98,16 @@ set see2 0
 set see3 0
 
 gdb_test_multiple "info inferior 1-2" "info inferior 1-2" {
-    -re ". 3 \[^\r\n\]*${exec3}" {
-	set see3 1
+    -re ". 1 \[^\r\n\]*${exec1}" {
+	set see1 1
 	exp_continue
     }
     -re ". 2 \[^\r\n\]*${exec2}" {
 	set see2 1
 	exp_continue
     }
-    -re ". 1 \[^\r\n\]*${exec1}" {
-	set see1 1
+    -re ". 3 \[^\r\n\]*${exec3}" {
+	set see3 1
 	exp_continue
     }
     -re "$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/bkpt-multi-exec.c ./gdb/testsuite/gdb.multi/bkpt-multi-exec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/bkpt-multi-exec.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/bkpt-multi-exec.c	2017-03-06 01:49:07.000000000 +0000
@@ -2,12 +2,22 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <limits.h>
 
-int main (void)
+int main (int argc, char ** argv)
 {
+  char prog[PATH_MAX];
+  int len;
+
+  strcpy (prog, argv[0]);
+  len = strlen (prog);
+  /* Replace "bkpt-multi-exec" with "crashme".  */
+  memcpy (prog + len - 15, "crashme", 7);
+  prog[len - 8] = 0;
+
   printf ("foll-exec is about to execl(crashme)...\n");
 
-  execl (BASEDIR "/crashme",
-         BASEDIR "/crashme",
+  execl (prog,
+         prog,
          (char *)0);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp ./gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/bkpt-multi-exec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ if { [is_remote target] || ![isnative] }
 
 # Until "catch exec" is implemented on other targets...
 #
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} then {
     continue
 }
 
@@ -33,9 +33,7 @@ set exec2 "crashme"
 set srcfile2 ${exec2}.c
 set binfile2 [standard_output_file ${exec2}]
 
-set compile_options {debug nowarnings}
-set dirname [relative_filename [pwd] [file dirname $binfile1]]
-lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\""
+set compile_options {debug}
 
 if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" $compile_options] == -1 } {
     return -1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/dummy-frame-restore.c ./gdb/testsuite/gdb.multi/dummy-frame-restore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/dummy-frame-restore.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/dummy-frame-restore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/dummy-frame-restore.exp ./gdb/testsuite/gdb.multi/dummy-frame-restore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/dummy-frame-restore.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/dummy-frame-restore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,14 +21,14 @@ if [target_info exists use_gdb_stub] {
     return
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
     return -1
 }
 
 # Inferior 1 stops at f1.
 
 if ![runto f1] then {
-    fail "Can't run to f1"
+    fail "can't run to f1"
     return 0
 }
 
@@ -42,7 +42,7 @@ delete_breakpoints
 # Inferior 2 stops at f2.
 
 if ![runto f2] then {
-    fail "Can't run to f2"
+    fail "can't run to f2"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/goodbye.c ./gdb/testsuite/gdb.multi/goodbye.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/goodbye.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/goodbye.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,24 +39,28 @@ int verylongfun()
   glob *= 9;
 }
 
-main() {
-  mailand();
-  foo(glob);
-  verylongfun();
-  goodbye();
-}
-
-foo(int x) {
-  return x + 92;
-}
-
+void
 mailand()
 {
   glob = 46;
 }
 
-void commonfun() { mailand(); } /* from goodbye */
+int
+foo(int x) {
+  return x + 92;
+}
 
+void
 goodbye() {
   ++glob;
 }
+
+int
+main() {
+  mailand();
+  foo(glob);
+  verylongfun();
+  goodbye();
+}
+
+void commonfun() { mailand(); } /* from goodbye */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/hangout.c ./gdb/testsuite/gdb.multi/hangout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/hangout.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/hangout.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,6 +15,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdio.h>
+
+int
 main(int argc, char *argv[])
 {
   int i;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/hello.c ./gdb/testsuite/gdb.multi/hello.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/hello.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/hello.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,24 +15,29 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdlib.h>
+
 short hglob = 1;
 
 short glob = 92;
 
-int commonfun() { bar(); } /* from hello */
-
+void
 bar()
 {
   if (glob == 0)
     exit(1);
 }
 
+int commonfun() { bar(); } /* from hello */
+
+int
 hello(int x)
 {
   x *= 2;
   return x + 45;
 }
 
+int
 main()
 {
   int tmpx;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/info-threads.exp ./gdb/testsuite/gdb.multi/info-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/info-threads.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/info-threads.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright 2009-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for PR threads/19354.  If you have a threaded
+# inferior running (thread_db must be loaded), switch to another
+# inferior, one that is NOT running yet, and do "info threads", you
+# would get back an error.
+
+standard_testfile hello.c
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads debug}] } {
+    return -1
+}
+
+clean_restart ${testfile}
+
+if { ![runto_main] } then {
+    return -1
+}
+
+# Add another inferior.
+gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
+gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2"
+
+# "info threads" while inferior 1 has execution and inferior 2 is not
+# running yet should show inferior 1's thread, and give no error.
+gdb_test "info threads" "1\.1 .* main .* at .*$srcfile:.*No selected thread.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/Makefile.in ./gdb/testsuite/gdb.multi/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = hello hangout goodbye bkpt-multi-exec crashme
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch-exec.c ./gdb/testsuite/gdb.multi/multi-arch-exec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch-exec.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-arch-exec.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,14 +15,26 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <limits.h>
+#include <string.h>
 
 int
-main ()
+main (int argc, char ** argv)
 {
-  execl (BASEDIR "/multi-arch-exec-hello",
-         BASEDIR "/multi-arch-exec-hello",
+  char prog[PATH_MAX];
+  int len;
+
+  strcpy (prog, argv[0]);
+  len = strlen (prog);
+  /* Replace "multi-arch-exec" with "multi-arch-exec-hello".  */
+  memcpy (prog + len - 15, "multi-arch-exec-hello", 21);
+  prog[len + 6] = 0;
+
+  execl (prog,
+         prog,
          (char *) NULL);
   perror ("execl failed");
   exit (1);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch-exec.exp ./gdb/testsuite/gdb.multi/multi-arch-exec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch-exec.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-arch-exec.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,27 +44,41 @@ set binfile2 [standard_output_file ${exe
 if [istarget "s390*-*-*"] {
     set march1 "-m64"
     set march2 "-m31"
+} elseif { [istarget "aarch64*-*-*"] } {
+    set march1 ""
+    set march2 ""
 } else {
     set march1 "-m64"
     set march2 "-m32"
 }
 
-set dirname [relative_filename [pwd] [file dirname $binfile2]]
-if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
-	  [list debug nowarnings \
-	       additional_flags=${march1} \
-	       additional_flags=-DBASEDIR=\"$dirname\"]] } {
+if { [prepare_for_testing "failed to prepare" ${exec1} "${srcfile1}" \
+	  [list debug \
+	       additional_flags=${march1}]] } {
     return -1
 }
 
-if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" \
-	  [list debug nowarnings additional_flags=${march2}]] } {
+set options [list debug]
+
+if { [istarget "aarch64*-*-*"] } {
+    if {[info exists ARM_CC_FOR_TARGET]} {
+	lappend options "compiler=${ARM_CC_FOR_TARGET}"
+    } else {
+	unsupported "ARM compiler is not known"
+	return -1
+    }
+} else {
+    lappend options "additional_flags=${march2}"
+}
+
+if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
+	  $options] } {
     return -1
 }
 
 clean_restart ${exec1}
 if ![runto_main] then {
-    fail "Couldn't run to main"
+    fail "couldn't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch.exp ./gdb/testsuite/gdb.multi/multi-arch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-arch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-arch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,18 +44,34 @@ set binfile2 [standard_output_file ${exe
 if [istarget "s390*-*-*"] {
     set march1 "-m64"
     set march2 "-m31"
+} elseif { [istarget "aarch64*-*-*"] } {
+    set march1 ""
+    set march2 ""
 } else {
     set march1 "-m64"
     set march2 "-m32"
 }
 
-if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
-	  [list debug nowarnings additional_flags=${march1}]] } {
+if { [prepare_for_testing "failed to prepare" ${exec1} "${srcfile1}" \
+	  [list debug additional_flags=${march1}]] } {
     return -1
 }
 
-if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" \
-	  [list debug nowarnings additional_flags=${march2}]] } {
+set options [list debug]
+
+if [istarget "aarch64*-*-*"] {
+    if {[info exists ARM_CC_FOR_TARGET]} {
+	lappend options "compiler=${ARM_CC_FOR_TARGET}"
+    } else {
+	unsupported "ARM compiler is not known"
+	return -1
+    }
+} else {
+    lappend options "additional_flags=${march2}"
+}
+
+if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
+	 $options]} {
     return -1
 }
 
@@ -79,4 +95,4 @@ if ![runto_main] then {
 # Check we do have two inferiors loaded.
 
 gdb_test "info inferiors" \
-    "Executable.*${exec2}.*${exec1}.*"
+    "Executable.*${exec1}.*${exec2}.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-attach.c ./gdb/testsuite/gdb.multi/multi-attach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-attach.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-attach.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-attach.exp ./gdb/testsuite/gdb.multi/multi-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/multi-attach.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-attach.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,9 +30,11 @@ if {[prepare_for_testing "failed to prep
 # Start the programs running and then wait for a bit, to be sure that
 # they can be attached to.
 
-set pid_list [spawn_wait_for_attach [list $binfile $binfile]]
-set testpid1 [lindex $pid_list 0]
-set testpid2 [lindex $pid_list 1]
+set spawn_id_list [spawn_wait_for_attach [list $binfile $binfile]]
+set test_spawn_id1 [lindex $spawn_id_list 0]
+set test_spawn_id2 [lindex $spawn_id_list 1]
+set testpid1 [spawn_id_get_pid $test_spawn_id1]
+set testpid2 [spawn_id_get_pid $test_spawn_id2]
 
 gdb_test "attach $testpid1" \
     "Attaching to program: .*, process $testpid1.*(in|at).*" \
@@ -52,3 +54,6 @@ gdb_test "backtrace" ".*main.*" "backtra
 gdb_test "kill" "" "kill inferior 2" "Kill the program being debugged.*" "y"
 gdb_test "inferior 1" ".*Switching to inferior 1.*"
 gdb_test "kill" "" "kill inferior 1" "Kill the program being debugged.*" "y"
+
+kill_wait_spawned_process $test_spawn_id1
+kill_wait_spawned_process $test_spawn_id2
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/remove-inferiors.c ./gdb/testsuite/gdb.multi/remove-inferiors.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/remove-inferiors.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/remove-inferiors.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,23 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/remove-inferiors.exp ./gdb/testsuite/gdb.multi/remove-inferiors.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/remove-inferiors.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/remove-inferiors.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,70 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if { [build_executable ${testfile}.exp ${binfile} "${srcfile}" {debug}] != 0 } {
+    return -1
+}
+
+proc switch_to_inferior { num message } {
+    gdb_test "inferior ${num}" \
+	     "\\\[Switching to inferior ${num} \\\[<null>\\\] \\\(<noexec>\\\)\\\]" \
+	     "${message}"
+}
+
+proc add_inferior { expected_num message } {
+    gdb_test "add-inferior" "Added inferior ${expected_num}" "${message}"
+}
+
+proc test_remove_inferiors { } {
+    global binfile
+
+    clean_restart ${binfile}
+
+    # Add another inferior and switch to it.
+    add_inferior 2 "add second inferior"
+    switch_to_inferior 2 "switch to second inferior"
+
+    # Test that it is not possible to remove the current inferior.
+    gdb_test "remove-inferiors 2" \
+	     "warning: Can not remove current inferior 2." \
+	     "can't remove current inferior"
+
+    # Test that it is possible to remove a non-active non-current inferior.
+    gdb_test_no_output "remove-inferiors 1" "remove non-current inferior"
+
+    # Load binfile and start the inferior.
+    set binfile_re [string_to_regexp ${binfile}]
+    gdb_test "file ${binfile}" \
+	     "Reading symbols from ${binfile_re}...done." \
+	     "load binary"
+
+    if {![runto_main]} {
+	fail "couldn't run to main."
+	return
+    }
+
+    # Add another inferior and switch to it.
+    add_inferior 3 "add third inferior"
+    switch_to_inferior 3 "switch to third inferior"
+
+    # Test that it is not possible to remove an active non-current inferior.
+    gdb_test "remove-inferiors 2" \
+	     "warning: Can not remove active inferior 2." \
+	     "can't remove active inferior"
+}
+
+test_remove_inferiors
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/tids.c ./gdb/testsuite/gdb.multi/tids.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/tids.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/tids.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <pthread.h>
+
+pthread_t child_thread[2];
+
+void *
+thread_function2 (void *arg)
+{
+  while (1)
+    sleep (1);
+
+  return NULL;
+}
+
+void *
+thread_function1 (void *arg)
+{
+  pthread_create (&child_thread[1], NULL, thread_function2, NULL);
+
+  while (1)
+    sleep (1);
+
+  return NULL;
+}
+
+int
+main (void)
+{
+  int i;
+
+  alarm (300);
+
+  pthread_create (&child_thread[0], NULL, thread_function1, NULL);
+
+  for (i = 0; i < 2; i++)
+    pthread_join (child_thread[i], NULL);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/tids.exp ./gdb/testsuite/gdb.multi/tids.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/tids.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/tids.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,450 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test thread ID parsing and display.
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+# Multiple inferiors are needed, therefore both native and extended
+# gdbserver modes are supported.  Only non-extended gdbserver is not
+# supported.
+if [target_info exists use_gdb_stub] {
+    untested "using gdb stub"
+    return
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads debug}] } {
+    return -1
+}
+
+clean_restart ${testfile}
+
+if { ![runto_main] } then {
+    return -1
+}
+
+# Issue "thread apply TID_LIST p 1234" and expect EXP_TID_LIST (a list
+# of thread ids) to be displayed.
+proc thread_apply {tid_list exp_tid_list {message ""}} {
+    global decimal
+    set any "\[^\r\n\]*"
+    set expected [string_to_regexp $exp_tid_list]
+
+    set r ""
+    foreach tid $expected {
+	append r "\[\r\n\]+"
+	append r "Thread $tid $any:\r\n"
+	append r "\\$$decimal = 1234"
+    }
+
+    set cmd "thread apply $tid_list"
+    if {$message == ""} {
+	set message $cmd
+    }
+    gdb_test "$cmd p 1234" $r $message
+}
+
+# Issue "info threads TID_LIST" and expect EXP_TID_LIST (a list of
+# thread ids) to be displayed.
+proc info_threads {tid_list exp_tid_list {message ""}} {
+    set any "\[^\r\n\]*"
+    set expected [string_to_regexp $exp_tid_list]
+    set r [join $expected " ${any}\r\n${any} "]
+    set r "${any} $r ${any}"
+    set cmd "info threads $tid_list"
+    if {$message == ""} {
+	set message $cmd
+    }
+    gdb_test $cmd $r $message
+}
+
+# Issue "info threads TID_LIST" and expect INFO_THR output.  Then
+# issue "thread apply TID_LIST" and expect THR_APPLY output.  If
+# THR_APPLY is omitted, INFO_THR is expected instead.
+proc thr_apply_info_thr {tid_list info_thr {thr_apply ""}} {
+    if {$thr_apply == ""} {
+	set thr_apply $info_thr
+    }
+
+    info_threads $tid_list $info_thr
+    thread_apply $tid_list $thr_apply
+}
+
+# Issue both "info threads TID_LIST" and "thread apply TID_LIST" and
+# expect both commands to error out with EXP_ERROR.
+proc thr_apply_info_thr_error {tid_list exp_error}  {
+    gdb_test "info threads $tid_list" \
+	$exp_error
+
+    gdb_test "thread apply $tid_list" \
+	$exp_error \
+	"thread apply $tid_list"
+}
+
+# Issue both "info threads TID_LIST" and "thread apply TID_LIST" and
+# expect the command to error out with "Invalid thread ID: $EXPECTED".
+# EXPECTED is a literal string, not a regexp.  If EXPECTED is omitted,
+# TID_LIST is expected instead.
+proc thr_apply_info_thr_invalid {tid_list {expected ""}} {
+    if {$expected == ""} {
+	set expected $tid_list
+    }
+    set expected [string_to_regexp $expected]
+    gdb_test "info threads $tid_list" \
+	"Invalid thread ID: $expected"
+
+    gdb_test "thread apply $tid_list p 1234" \
+	"Invalid thread ID: $expected p 1234" \
+	"thread apply $tid_list"
+}
+
+# "info threads" while there's only inferior 1 should show
+# single-number thread IDs.
+with_test_prefix "single inferior" {
+    info_threads "" "1"
+
+    gdb_test "thread" "Current thread is 1 .*"
+}
+
+# "info threads" while there are multiple inferiors should show
+# qualified thread IDs.
+with_test_prefix "two inferiors" {
+    # Add another inferior.
+    gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
+
+    # Now that we've added another inferior, thread IDs now show the
+    # inferior number.
+    info_threads "" "1.1"
+
+    gdb_test "thread" "Current thread is 1\.1 .*"
+
+    gdb_test "inferior 2" "Switching to inferior 2 .*" "switch to inferior 2"
+    gdb_test "file ${binfile}" ".*" "load file in inferior 2"
+
+    runto_main
+
+    # Now that we've added another inferior, thread IDs now show the
+    # inferior number.
+    info_threads "" "1.1 2.1" \
+	"info threads show inferior numbers"
+
+    gdb_test "thread" "Current thread is 2\.1 .*" \
+	"switch to thread using extended thread ID"
+
+    gdb_breakpoint "thread_function1"
+
+    gdb_continue_to_breakpoint "once"
+    gdb_test "inferior 1" "Switching to inferior 1 .*"
+    gdb_continue_to_breakpoint "twice"
+
+    info_threads "" "1.1 1.2 2.1 2.2" \
+	"info threads again"
+
+    # Same, but show the global ID.
+    gdb_test "info threads -gid" \
+	[multi_line \
+	     "  1\.1 +1 +.*" \
+	     "\\* 1\.2 +4 +.* thread_function1 .* at .*$srcfile:.*" \
+	     "  2\.1 +2 +.*" \
+	     "  2\.2 +3 +.* thread_function1 .* at .*$srcfile:.*"]
+
+    # Confirm the convenience variables show the expected numbers.
+    gdb_test "p \$_thread == 2" " = 1"
+    gdb_test "p \$_gthread == 4" " = 1"
+
+    # Without an explicit inferior component, GDB defaults to the
+    # current inferior.  Make sure we don't refer to a thread by
+    # global ID by mistake.
+    gdb_test "thread 4" "Unknown thread 1.4\\."
+
+    # Test thread ID list parsing.  Test qualified and unqualified
+    # IDs; qualified and unqualified ranges; invalid IDs and invalid
+    # ranges.
+
+    # First spawn a couple more threads so ranges includes more than
+    # two threads.
+    with_test_prefix "more threads" {
+	gdb_breakpoint "thread_function2"
+
+	gdb_test "inferior 2" "Switching to inferior 2 .*"
+	gdb_continue_to_breakpoint "once"
+
+	gdb_test "inferior 1" "Switching to inferior 1 .*"
+	gdb_continue_to_breakpoint "twice"
+    }
+
+    thr_apply_info_thr "1" \
+	"1.1"
+
+    thr_apply_info_thr "1.1" \
+	"1.1"
+
+    thr_apply_info_thr "1 2 3" \
+	"1.1 1.2 1.3"
+
+    # Same, but with qualified thread IDs.
+    thr_apply_info_thr "1.1 1.2 1.3 2.1 2.2" \
+	"1.1 1.2 1.3 2.1 2.2"
+
+    # Test a thread number range.
+    thr_apply_info_thr "1-3" \
+	"1.1 1.2 1.3"
+
+    # Same, but using a qualified range.
+    thr_apply_info_thr "1.1-3" \
+	"1.1 1.2 1.3"
+
+    # A mix of qualified and unqualified thread IDs/ranges.
+    thr_apply_info_thr "1.1 2-3" \
+	"1.1 1.2 1.3"
+
+    thr_apply_info_thr "1 1.2-3" \
+	"1.1 1.2 1.3"
+
+    # Likewise, but mix inferiors too.
+    thr_apply_info_thr "2.1 2-3" \
+	"1.2 1.3 2.1" \
+	"2.1 1.2 1.3"
+
+    # Multiple ranges with mixed explicit inferiors.
+    thr_apply_info_thr "1.1-2 2.2-3" \
+	"1.1 1.2 2.2 2.3"
+
+    # All threads.
+    thread_apply "all" \
+	"2.3 2.2 2.1 1.3 1.2 1.1"
+    thread_apply "all -ascending" \
+	"1.1 1.2 1.3 2.1 2.2 2.3"
+
+    # Now test using GDB convenience variables.
+
+    gdb_test "p \$inf = 1" " = 1"
+    gdb_test "p \$thr_start = 2" " = 2"
+    gdb_test "p \$thr_end = 3" " = 3"
+
+    # Convenience variable for the inferior number, only.
+    thr_apply_info_thr "\$inf.2" \
+	"1.2"
+    thr_apply_info_thr "\$inf.2-3" \
+	"1.2 1.3"
+
+    # Convenience variables for thread numbers as well.
+    foreach prefix {"" "1." "\$inf."} {
+	thr_apply_info_thr "${prefix}\$thr_start" \
+	    "1.2"
+	thr_apply_info_thr "${prefix}\$thr_start-\$thr_end" \
+	    "1.2 1.3"
+	thr_apply_info_thr "${prefix}2-\$thr_end" \
+	    "1.2 1.3"
+	thr_apply_info_thr "${prefix}\$thr_start-3" \
+	    "1.2 1.3"
+
+	# Undefined convenience variable.
+	set prefix_re [string_to_regexp $prefix]
+	thr_apply_info_thr_error "${prefix}\$conv123" \
+	    [multi_line \
+		 "Convenience variable must have integer value\." \
+		 "Invalid thread ID: ${prefix_re}\\\$conv123"]
+    }
+
+    # Convenience variables pointing at an inexisting thread and/or
+    # inferior.
+    gdb_test "p \$inf = 30" " = 30"
+    gdb_test "p \$thr = 20" " = 20"
+    # Try both the convenience variable and the literal number.
+    foreach thr {"\$thr" "20" "1.20" "\$inf.1" "30.1" } {
+	set expected [string_to_regexp $thr]
+	gdb_test "info threads $thr" "No threads match '${expected}'."
+	# "info threads" works like a filter.  If there's any other
+	# valid thread in the list, there's no error.
+	info_threads "$thr 1.1" "1.1"
+	info_threads "1.1 $thr" "1.1"
+    }
+
+    gdb_test "thread apply \$thr p 1234" \
+	"warning: Unknown thread 1.20" \
+	"thread apply \$thr"
+
+    gdb_test "thread apply \$inf.1 p 1234" \
+	"warning: Unknown thread 30.1" \
+	"thread apply \$inf.1"
+
+    # Star ranges.
+
+    thr_apply_info_thr "1.*" \
+	"1.1 1.2 1.3"
+
+    thr_apply_info_thr "*" \
+	"1.1 1.2 1.3"
+
+    thr_apply_info_thr "1.* 2.1" \
+	"1.1 1.2 1.3 2.1"
+
+    thr_apply_info_thr "2.1 1.*" \
+	"1.1 1.2 1.3 2.1" \
+	"2.1 1.1 1.2 1.3"
+
+    thr_apply_info_thr "1.* 2.*" \
+	"1.1 1.2 1.3 2.1 2.2 2.3"
+
+    thr_apply_info_thr "2.* 1.*" \
+	"1.1 1.2 1.3 2.1 2.2 2.3" \
+	"2.1 2.2 2.3 1.1 1.2 1.3"
+
+    # There's no inferior 3, but "info threads" treats the thread list
+    # as a filter, so it's OK.  "thread apply" complains about the
+    # unknown inferior through.
+    info_threads "1.1 3.*" \
+	"1.1"
+    gdb_test "thread apply 1.1 3.* p 1" \
+	"Thread 1.1.*warning: Unknown inferior 3"
+
+    # Now test a set of invalid thread IDs/ranges.
+
+    thr_apply_info_thr_invalid "1." \
+	"1."
+
+    thr_apply_info_thr_invalid "1-3 1." \
+	"1."
+
+    thr_apply_info_thr_invalid "1.1.1" \
+	"1.1.1"
+
+    thr_apply_info_thr_invalid "2 1.1.1" \
+	"1.1.1"
+
+    thr_apply_info_thr_invalid "1.1.1 2" \
+	"1.1.1 2"
+
+    thr_apply_info_thr_invalid "1-2.1" \
+	"1-2.1"
+
+    gdb_test "p \$zero = 0" " = 0"
+    gdb_test "p \$one = 1" " = 1"
+    gdb_test "p \$minus_one = -11" " = -11"
+    foreach prefix {"" "1." "$one."} {
+	set prefix_re [string_to_regexp $prefix]
+
+	thr_apply_info_thr_invalid "${prefix}foo"
+	thr_apply_info_thr_invalid "${prefix}1foo"
+	thr_apply_info_thr_invalid "${prefix}foo1"
+
+	thr_apply_info_thr_error "${prefix}1-0" "inverted range"
+	thr_apply_info_thr_error "${prefix}1-\$zero" "inverted range"
+	thr_apply_info_thr_error "${prefix}\$one-0" "inverted range"
+	thr_apply_info_thr_error "${prefix}\$one-\$zero" "inverted range"
+	thr_apply_info_thr_error "${prefix}1-" "inverted range"
+	thr_apply_info_thr_error "${prefix}2-1" "inverted range"
+	thr_apply_info_thr_error "${prefix}2-\$one" "inverted range"
+	thr_apply_info_thr_error "${prefix}-1" "negative value"
+	thr_apply_info_thr_error "${prefix}-\$one" "negative value"
+	thr_apply_info_thr_error "${prefix}\$minus_one" \
+	    "negative value: ${prefix_re}\\\$minus_one"
+
+	thr_apply_info_thr_error "${prefix}1-*" "inverted range"
+	thr_apply_info_thr_invalid "${prefix}*1"
+	thr_apply_info_thr_invalid "${prefix}*foo"
+	thr_apply_info_thr_invalid "${prefix}foo*"
+    }
+
+    # Check that a valid thread ID list with a missing command errors
+    # out.
+    with_test_prefix "missing command" {
+	set output "Please specify a command following the thread ID list"
+	gdb_test "thread apply 1" $output
+	gdb_test "thread apply 1.1" $output
+	gdb_test "thread apply 1.1 1.2" $output
+	gdb_test "thread apply 1-2" $output
+	gdb_test "thread apply 1.1-2" $output
+	gdb_test "thread apply $thr" $output
+	gdb_test "thread apply 1.*" $output
+    }
+
+    # Check that we do parse the inferior number and don't confuse it.
+    gdb_test "info threads 3.1" \
+	"No threads match '3.1'\."
+}
+
+if { ![skip_python_tests] } {
+    with_test_prefix "python" {
+	# Check that InferiorThread.num and InferiorThread.global_num
+	# return the expected numbers.
+	gdb_py_test_silent_cmd "python t0 = gdb.selected_thread ()" \
+	    "test gdb.selected_thread" 1
+	gdb_test "python print ('result = %s' % t0.num)" " = 3" \
+	    "test InferiorThread.num"
+	gdb_test "python print ('result = %s' % t0.global_num)" " = 6" \
+	    "test InferiorThread.global_num"
+
+	# Breakpoint.thread expects global IDs.  Confirm that that
+	# works as expected.
+	delete_breakpoints
+	gdb_breakpoint "thread_function1"
+
+	gdb_py_test_silent_cmd "python bp = gdb.breakpoints()\[0\]" \
+	    "get python breakpoint" 0
+	gdb_test "python bp.thread = 6" "thread = 6" \
+	    "make breakpoint thread-specific with python"
+	# Check that the inferior-qualified ID is correct.
+	gdb_test "info breakpoint" \
+	    "stop only in thread 1.3\r\n.*" \
+	    "thread specific breakpoint right thread"
+    }
+}
+
+# Remove the second inferior and confirm that GDB goes back to showing
+# single-number thread IDs.
+with_test_prefix "back to one inferior" {
+    gdb_test "kill inferior 2" "" "kill inferior 2" "Kill the program being debugged.*" "y"
+    gdb_test "thread 1.1" "Switching to thread 1\.1 .*"
+    gdb_test "remove-inferior 2" ".*" "remove inferior 2"
+
+    # "info threads" while there's only inferior 1 should show
+    # single-number thread IDs.
+    info_threads "" "1 2 3"
+
+    gdb_test "thread" "Current thread is 1 .*"
+}
+
+# Add another inferior and remove inferior 1.  Since even though
+# there's a single inferior, its number is not 1, GDB should show
+# inferior-qualified thread IDs.
+with_test_prefix "single-inferior but not initial" {
+    # Add another inferior.
+    gdb_test "add-inferior" "Added inferior 3.*" "add empty inferior"
+
+    # Now that we'd added another inferior, thread IDs should show the
+    # inferior number.
+    info_threads "" "1.1 1.2 1.3" \
+	"info threads with multiple inferiors"
+
+    gdb_test "thread" "Current thread is 1\.1 .*"
+
+    gdb_test "inferior 3" "Switching to inferior 3 .*" "switch to inferior 3"
+    gdb_test "file ${binfile}" ".*" "load file in inferior 3"
+
+    runto_main
+
+    gdb_test "remove-inferior 1" ".*" "remove inferior 1"
+
+    # Even though we have a single inferior, its number is > 1, so
+    # thread IDs should include the inferior number.
+    info_threads "" "3.1" \
+	"info threads with single inferior"
+
+    gdb_test "thread" "Current thread is 3\.1 .*" "thread again"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi.c ./gdb/testsuite/gdb.multi/watchpoint-multi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/watchpoint-multi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c ./gdb/testsuite/gdb.multi/watchpoint-multi-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/watchpoint-multi-exit.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+/* GDB sets watchpoint here.  */
+static volatile int globalvar;
+
+/* Whether it's expected that the child exits with a signal, vs
+   exiting normally.  GDB sets this.  */
+static volatile int expect_signaled;
+
+static void
+marker (void)
+{
+}
+
+static void
+child_function (void)
+{
+}
+
+int
+main (void)
+{
+  pid_t child;
+
+  child = fork ();
+  if (child == -1)
+    exit (1);
+  else if (child != 0)
+    {
+      int status, ret;
+
+      ret = waitpid (child, &status, 0);
+      if (ret == -1)
+	exit (2);
+      else if (expect_signaled && !WIFSIGNALED (status))
+	exit (3);
+      else if (!expect_signaled && !WIFEXITED (status))
+	exit (4);
+      else
+	marker ();
+    }
+  else
+    child_function ();
+
+  exit (0);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp ./gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,87 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that if an inferior exits or is detached/killed, its
+# watchpoints don't end up with stale locations, preventing resumption
+# of other inferiors.
+
+standard_testfile
+
+if {[build_executable "failed to build" $testfile $srcfile {debug}]} {
+    return -1
+}
+
+# The test proper.  DISPOSE indicates how to dispose of the fork
+# child.  Can be either "kill", "detach", or "exit" (to continue it to
+# normal exit).
+proc do_test {dispose} {
+    global binfile
+
+    clean_restart $binfile
+
+    gdb_test_no_output "set follow-fork child"
+    gdb_test_no_output "set detach-on-fork off"
+
+    if ![runto "child_function"] {
+	fail "can't run to child_function"
+	return
+    }
+
+    gdb_test "watch globalvar" "atchpoint \[0-9\]+: globalvar" \
+	"set watchpoint on inferior 2"
+
+    # Dispose of the inferior.  This should get rid of this inferior's
+    # watchpoint locations.
+    if {$dispose == "kill"} {
+	gdb_test "kill" "" "kill inferior 2" \
+	    "Kill the program being debugged.*y or n. $" "y"
+    } elseif {$dispose == "detach"} {
+	gdb_test "detach" ".*" "detach inferior 2"
+    } elseif {$dispose == "exit"} {
+	gdb_test "continue" ".*exited normally.*" "run to exit inferior 2"
+    } else {
+	perror "unhandled dispose: $dispose"
+    }
+
+    gdb_test "inferior 1" "witching to inferior 1 .*" \
+	"switch back to inferior 1"
+
+    if {$dispose == "kill"} {
+	gdb_test "print expect_signaled = 1" " = 1"
+    }
+
+    gdb_breakpoint "marker"
+
+    # Now continue inferior 1.  Before GDB was fixed, watchpoints for
+    # inferior 2 managed to be left behind.  When GDB realized that
+    # they hadn't been inserted, the continue command was aborted:
+    #
+    #  (gdb) continue
+    #  Continuing.
+    #  Warning:
+    #  Could not insert hardware watchpoint 2.
+    #  Could not insert hardware breakpoints:
+    #  You may have requested too many hardware breakpoints/watchpoints.
+    #
+    #  Command aborted.
+    #  (gdb)
+    #
+    gdb_test "continue" "Breakpoint \[0-9\]+, marker .*" \
+	"continue in inferior 1"
+}
+
+foreach_with_prefix dispose {"kill" "detach" "exit"} {
+    do_test $dispose
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi.exp ./gdb/testsuite/gdb.multi/watchpoint-multi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.multi/watchpoint-multi.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/watchpoint-multi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ set executable ${testfile}
 # Multiple inferiors are needed, therefore both native and extended gdbserver
 # modes are supported.  Only non-extended gdbserver is not supported.
 if [target_info exists use_gdb_stub] {
-    untested ${testfile}.exp
+    untested "using gdb stub"
     return
 }
 
@@ -31,7 +31,7 @@ if [skip_hw_watchpoint_access_tests] {
 }
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/basicclass.exp ./gdb/testsuite/gdb.objc/basicclass.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/basicclass.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.objc/basicclass.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -163,21 +163,21 @@ gdb_test continue \
 #
 gdb_test "print \[self printHi\]" \
     "Hi.*\\$\[0-9\] = \\(.*objc_object \\*\\) 0x\[0-9a-f\]+" \
-    "Call an Objective-C method with no arguments"
+    "call an Objective-C method with no arguments"
 
 gdb_test "print \[self printNumber: 42\]" \
     "42.*\\$\[0-9\] = 43" \
-    "Call an Objective-C method with one argument"
+    "call an Objective-C method with one argument"
 
 #
 # Test printing the object description
 #
 gdb_test "print-object object" \
     "BasicClass gdb test object" \
-    "Use of the print-object command"
+    "use of the print-object command"
 
 gdb_test "po self" \
     "BasicClass gdb test object" \
-    "Use of the po (print-object) command"
+    "use of the po (print-object) command"
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/Makefile.in ./gdb/testsuite/gdb.objc/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.objc/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = basicclass
-
-all: 
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/nondebug.exp ./gdb/testsuite/gdb.objc/nondebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/nondebug.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.objc/nondebug.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/objcdecode.exp ./gdb/testsuite/gdb.objc/objcdecode.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/objcdecode.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.objc/objcdecode.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/print.exp ./gdb/testsuite/gdb.objc/print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.objc/print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.objc/print.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/callfuncs.cl ./gdb/testsuite/gdb.opencl/callfuncs.cl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/callfuncs.cl	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/callfuncs.cl	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/callfuncs.exp ./gdb/testsuite/gdb.opencl/callfuncs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/callfuncs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/callfuncs.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ set clprogram [remote_download target ${
 
 # Compile the generic OpenCL host app
 if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/convs_casts.cl ./gdb/testsuite/gdb.opencl/convs_casts.cl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/convs_casts.cl	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/convs_casts.cl	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/convs_casts.exp ./gdb/testsuite/gdb.opencl/convs_casts.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/convs_casts.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/convs_casts.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ set clprogram [remote_download target ${
 
 # Compile the generic OpenCL host app
 if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/datatypes.cl ./gdb/testsuite/gdb.opencl/datatypes.cl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/datatypes.cl	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/datatypes.cl	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/datatypes.exp ./gdb/testsuite/gdb.opencl/datatypes.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/datatypes.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/datatypes.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ set clprogram [remote_download target ${
 
 # Compile the generic OpenCL host app
 if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -36,7 +36,7 @@ gdb_exit
 gdb_start
 
 # Manually switch the language to opencl
-gdb_test_no_output "set language opencl" "No prompt when setting the language to opencl"
+gdb_test_no_output "set language opencl" "no prompt when setting the language to opencl"
 
 # Check OpenCL data types (GDB)
 gdb_test "whatis bool" "type = bool"
@@ -194,8 +194,8 @@ gdb_test "whatis double16" "type = doubl
 gdb_test "p sizeof(double16)" " = 128"
 
 # Set the language back to the default: "auto; currently c"
-gdb_test_no_output "set language c" "No prompt when setting the language to c"
-gdb_test_no_output "set language auto" "No prompt when setting the language to auto"
+gdb_test_no_output "set language c" "no prompt when setting the language to c"
+gdb_test_no_output "set language auto" "no prompt when setting the language to auto"
 
 # Load the OpenCL app
 gdb_reinitialize_dir $srcdir/$subdir
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/Makefile.in ./gdb/testsuite/gdb.opencl/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = callfuncs datatypes vec_comps convs_casts operators
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out core corefile gcore.test
-	-rm -f *.dwo *.dwp
-	-rm -f $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/operators.cl ./gdb/testsuite/gdb.opencl/operators.cl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/operators.cl	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/operators.cl	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/operators.exp ./gdb/testsuite/gdb.opencl/operators.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/operators.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/operators.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ set clprogram [remote_download target ${
 
 # Compile the generic OpenCL host app
 if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/vec_comps.cl ./gdb/testsuite/gdb.opencl/vec_comps.cl
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/vec_comps.cl	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/vec_comps.cl	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/vec_comps.exp ./gdb/testsuite/gdb.opencl/vec_comps.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opencl/vec_comps.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opencl/vec_comps.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ set clprogram [remote_download target ${
 
 # Compile the generic OpenCL host app
 if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/clobbered-registers-O2.c ./gdb/testsuite/gdb.opt/clobbered-registers-O2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/clobbered-registers-O2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/clobbered-registers-O2.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp ./gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/clobbered-registers-O2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if [get_compiler_info] {
     return -1
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug optimize=-O2 nowarnings}]} {
     return -1
 }
@@ -36,7 +36,7 @@ if { ![runto start_sequence] } then {
    return
 }
 
-gdb_test "frame 1" "#1.*in gen_movsd.*" "Backtracing"
+gdb_test "frame 1" "#1.*in gen_movsd.*" "backtracing"
 
 gdb_test_multiple "print operand0" "print operand0" {
     -re "\\\$$decimal = <optimized out>\r\n$gdb_prompt $" { pass "print operand0"}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-break.c ./gdb/testsuite/gdb.opt/inline-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-break.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-break.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-break.exp ./gdb/testsuite/gdb.opt/inline-break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-break.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-break.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8 @@
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile \
-          {debug optimize=-O2 additional_flags=-Winline}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
+          {debug additional_flags=-Winline}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-bt.c ./gdb/testsuite/gdb.opt/inline-bt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-bt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-bt.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #endif
 
 int x, y;
+volatile int z = 0;
 volatile int result;
 
 void bar(void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-bt.exp ./gdb/testsuite/gdb.opt/inline-bt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-bt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-bt.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,9 @@
 
 standard_testfile .c inline-markers.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] \
-	 {debug optimize=-O2 additional_flags=-Winline}]} {
+	 {debug additional_flags=-Winline}]} {
     return -1
 }
 
@@ -26,7 +26,7 @@ runto_main
 get_compiler_info
 get_debug_format
 if { [skip_inline_frame_tests] } {
-    untested inline-bt.exp
+    untested "skipping inline frame tests"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-cmds.c ./gdb/testsuite/gdb.opt/inline-cmds.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-cmds.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-cmds.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #endif
 
 int x, y;
+volatile int z = 0;
 volatile int result;
 
 void bar(void);
@@ -60,7 +61,7 @@ int main (void)
   int val;
 
   x = 7;
-  y = 8;
+  y = 8; /* set mi break here */
 
   result = func1 ();
   result = func2 ();
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-cmds.exp ./gdb/testsuite/gdb.opt/inline-cmds.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-cmds.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-cmds.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,10 +13,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
 standard_testfile .c inline-markers.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
-	 [list $srcfile $srcfile2] {debug optimize=-O2}]} {
+if {[prepare_for_testing "failed to prepare" $testfile \
+	 [list $srcfile $srcfile2] {debug additional_flags=-Winline}]} {
     return -1
 }
 
@@ -27,7 +30,7 @@ runto_main
 get_compiler_info
 get_debug_format
 if { [skip_inline_frame_tests] } {
-    untested inline-cmds.exp
+    untested "skipping inline frame tests"
     return
 }
 
@@ -315,3 +318,62 @@ gdb_test "up" "#3  .*outer_inline2.*" "u
 gdb_test "info frame" ".*inlined into frame.*" "outer_inline2 inlined"
 gdb_test "up" "#4  main.*" "up from outer_inline2"
 gdb_test "info frame" ".*\n caller of frame.*" "main not inlined"
+
+gdb_exit
+
+# Send a CLI "step" command over MI.  CLI_OUTPUT_RE is a regexp that
+# matches the expected CLI output.  MESSAGE is used as test message.
+
+proc mi_cli_step {cli_output_re message} {
+    global mi_gdb_prompt
+    global srcfile
+    global decimal
+
+    send_gdb "interpreter-exec console \"step\"\n"
+    gdb_expect {
+	-re "\\^running\r\n\\*running,thread-id=\"all\"\r\n${mi_gdb_prompt}${cli_output_re}" {
+	    pass $message
+	}
+	timeout {
+	    fail "$message (timeout)"
+	}
+	eof {
+	    fail "$message (eof)"
+	}
+    }
+
+    # mi_expect_stop handles "set mi-async on/off" differences.
+    mi_expect_stop "end-stepping-range" "\[^\r\n\]*" "" ".*$srcfile" "$decimal" \
+	"" "got *stopped for $message"
+}
+
+# Test that stepping into an inlined function with the CLI "step"
+# command run while the top interpreter is MI results in the expected
+# CLI output sent to MI's console.
+with_test_prefix "mi" {
+    if [mi_gdb_start] {
+	continue
+    }
+    mi_gdb_load ${binfile}
+    mi_runto main
+
+    set line_number [gdb_get_line_number "set mi break here"]
+    mi_gdb_test "-break-insert ${srcfile}:${line_number}" \
+	{\^done,bkpt=.number="2",type="breakpoint".*\}} \
+	"set breakpoint"
+
+    mi_execute_to "exec-continue" "breakpoint-hit" "main" "" ".*" ".*" \
+	{ "" "disp=\"keep\"" } "breakpoint hit"
+
+    incr line_number 2
+
+    # Step to the line that does an inline call.
+    set re "~\"$line_number\\\\t  result = func1 \\(\\);\\\\n\"\r\n"
+    mi_cli_step "${re}" "step to inline call"
+
+    # Step into the inlined function.
+    set re [multi_line \
+		"~\"func1 \\(\\) at .*$srcfile:$decimal\\\\n\"" \
+		"~\"$decimal\\\\t  bar \\(\\);\\\\n\"\r\n"]
+    mi_cli_step "${re}" "step into inline call"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-locals.c ./gdb/testsuite/gdb.opt/inline-locals.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-locals.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-locals.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #endif
 
 int x, y;
+volatile int z = 0;
 volatile int result;
 volatile int *array_p;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-locals.exp ./gdb/testsuite/gdb.opt/inline-locals.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-locals.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-locals.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
 
 standard_testfile .c inline-markers.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
-	 [list $srcfile $srcfile2] {debug optimize=-O2}]} {
+if {[prepare_for_testing "failed to prepare" $testfile \
+	 [list $srcfile $srcfile2] {debug additional_flags=-Winline}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-markers.c ./gdb/testsuite/gdb.opt/inline-markers.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/inline-markers.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/inline-markers.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,7 +13,14 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifdef __GNUC__
+# define ATTR __attribute__((always_inline))
+#else
+# define ATTR
+#endif
+
 extern int x, y;
+extern volatile int z;
 
 void bar(void)
 {
@@ -22,12 +29,12 @@ void bar(void)
 
 void marker(void)
 {
-  x += y; /* set breakpoint 2 here */
+  x += y - z; /* set breakpoint 2 here */
 }
 
-inline void inlined_fn(void)
+inline ATTR void inlined_fn(void)
 {
-  x += y;
+  x += y + z;
 }
 
 void noinline(void)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/Makefile.in ./gdb/testsuite/gdb.opt/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = clobbered-registers-O2 inline-bt inline-cmds inline-locals
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-find . -name 'b~*.ad[sb]' -print | xargs rm -f
-	-rm -f *~ a.out xgdb *.x *.ci *.tmp
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS) twice-tmp.c
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step.exp ./gdb/testsuite/gdb.opt/solib-intra-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/solib-intra-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,86 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile
+
+if {[skip_shlib_tests]} {
+    return 0
+}
+
+# Library file.
+set libname "${testfile}-lib"
+set srcfile_lib ${srcdir}/${subdir}/${libname}.c
+set binfile_lib [standard_output_file ${libname}.so]
+set lib_flags [list debug optimize=-O2]
+# Binary file.
+set testfile "${testfile}-main"
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile [standard_output_file ${testfile}]
+set bin_flags [list debug shlib=${binfile_lib}]
+
+if [get_compiler_info] {
+    return -1
+}
+
+if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
+     || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
+  untested "failed to compile"
+  return -1
+}
+
+clean_restart ${binfile}
+gdb_load_shlib $binfile_lib
+
+if ![runto_main] then {
+  return 0
+}
+
+set test "first-hit"
+gdb_test_multiple "step" $test {
+    -re " first-hit .*\r\n$gdb_prompt $" {
+	pass $test
+    }
+    -re " first-retry .*\r\n$gdb_prompt $" {
+	gdb_test "step" " first-hit .*" "first-hit (optimized)"
+    }
+}
+
+set test "second-hit"
+gdb_test_multiple "step" $test {
+    -re " second-hit .*\r\n$gdb_prompt $" {
+	pass $test
+    }
+    -re " first-retry .*\r\n$gdb_prompt $" {
+	set test "second-hit (optimized 1)"
+	gdb_test_multiple "step" $test {
+	    -re " second-hit .*\r\n$gdb_prompt $" {
+		pass $test
+	    }
+	    -re " first-hit .*\r\n$gdb_prompt $" {
+		gdb_test "step" " second-hit .*" "second-hit (optimized 2)"
+	    }
+	}
+    }
+    -re " second-retry .*\r\n$gdb_prompt $" {
+	gdb_test "step" " second-hit .*" "second-hit (optimized 3)"
+    }
+}
+
+if ![runto_main] then {
+  return 0
+}
+
+gdb_breakpoint "shlib_second"
+gdb_continue_to_breakpoint "second-hit" ".* (second-hit|second-retry) .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step-lib.c ./gdb/testsuite/gdb.opt/solib-intra-step-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step-lib.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/solib-intra-step-lib.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+void
+shlib_second (int dummy)
+{ /* second-retry */
+  abort (); /* second-hit */
+}
+
+void
+shlib_first (void)
+{ /* first-retry */
+  shlib_second (0); /* first-hit */
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step-main.c ./gdb/testsuite/gdb.opt/solib-intra-step-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.opt/solib-intra-step-main.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.opt/solib-intra-step-main.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern void shlib_first (void);
+
+int
+main (void)
+{
+  shlib_first ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/case-insensitive-symbols.exp ./gdb/testsuite/gdb.pascal/case-insensitive-symbols.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/case-insensitive-symbols.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/case-insensitive-symbols.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ load_lib "pascal.exp"
 standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug class]] != "" } {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas ./gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 {
- Copyright 2015 Free Software Foundation, Inc.
+ Copyright 2015-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/floats.exp ./gdb/testsuite/gdb.pascal/floats.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/floats.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/floats.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ load_lib "pascal.exp"
 standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -42,15 +42,15 @@ if { [gdb_start_cmd] < 0 } {
 
 gdb_test "" ".* at .*${srcfile}.*" "start"
 
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
-gdb_test "print r" ".* = 0" "Print r before assigned to 1.25"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
+gdb_test "print r" ".* = 0" "print r before assigned to 1.25"
 
-gdb_test "next" "r := 1\\.25;" "Next to 'r := 1.25' line"
-gdb_test "next" "s := 2\\.2;" "Next to 's := 2.2' line"
-gdb_test "next" "t := -3\\.2;" "Next to 't := -3.2' line"
-gdb_test "next" "u := 78\\.3;" "Next to 'u := 78.3' line"
-gdb_test "next" "l := 1;" "Next to 'l := 1' line"
-gdb_test "next" "i := 1;" "Next to 'i := 1' line"
+gdb_test "next" "r := 1\\.25;" "next to 'r := 1.25' line"
+gdb_test "next" "s := 2\\.2;" "next to 's := 2.2' line"
+gdb_test "next" "t := -3\\.2;" "next to 't := -3.2' line"
+gdb_test "next" "u := 78\\.3;" "next to 'u := 78.3' line"
+gdb_test "next" "l := 1;" "next to 'l := 1' line"
+gdb_test "next" "i := 1;" "next to 'i := 1' line"
 
 # At that point, 
 # r should be equal to 1.25
@@ -113,16 +113,16 @@ gdb_test "print 35 / 2" " = 17\\.(499.*|
 # 'set r' does not work, as there are set sub-commands starting with 'r'
 # Thus we need to use 'set var r'
 gdb_test "set var r := 2.56" " := 2\\.56"
-gdb_test "print r" " = 2\\.5(599.*|6|600.*)" "Testing new r value"
+gdb_test "print r" " = 2\\.5(599.*|6|600.*)" "testing new r value"
 
 gdb_test "cont" \
 	 "Breakpoint .*:${bp_location2}.*" \
 	 "Going to second breakpoint"
-gdb_test "next" "r := cos\\(u\\);" "Advance to 'r := cos(u)' line"
-gdb_test "print u" " = 3\\.14159.*" "Test pi value"
-gdb_test "next" "s := sin\\(u\\);" "Advance to 's := sin(u)' line"
-gdb_test "print r" " = -1" "Test cos(pi) is equal to -1" 
-gdb_test "next" "" "Go past 's := sin(u)' line"
+gdb_test "next" "r := cos\\(u\\);" "advance to 'r := cos(u)' line"
+gdb_test "print u" " = 3\\.14159.*" "test pi value"
+gdb_test "next" "s := sin\\(u\\);" "advance to 's := sin(u)' line"
+gdb_test "print r" " = -1" "test cos(pi) is equal to -1"
+gdb_test "next" "" "go past 's := sin(u)' line"
 
 set msg "Test sin(pi) is equal to 0" 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/floats.pas ./gdb/testsuite/gdb.pascal/floats.pas
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/floats.pas	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/floats.pas	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 {
- Copyright 2008-2015 Free Software Foundation, Inc.
+ Copyright 2008-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/gdb11492.exp ./gdb/testsuite/gdb.pascal/gdb11492.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/gdb11492.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/gdb11492.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ load_lib "pascal.exp"
 standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-    untested $testfile.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/gdb11492.pas ./gdb/testsuite/gdb.pascal/gdb11492.pas
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/gdb11492.pas	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/gdb11492.pas	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 {
- Copyright 2010-2015 Free Software Foundation, Inc.
+ Copyright 2010-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/hello.exp ./gdb/testsuite/gdb.pascal/hello.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/hello.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/hello.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ gdb_test "cont" \
          "Going to first breakpoint"
 gdb_test "print st" \
 	 ".* = ''.*" \
-	 "Empty string check"
+	 "empty string check"
 
 # This test also fails for gpc because the program
 # stops after the string has been written
@@ -63,4 +63,4 @@ gdb_test "cont" \
 	 "Going to second breakpoint"
 gdb_test "print st" \
 	 ".* = 'Hello, world!'.*" \
-	 "String after assignment check"
+	 "string after assignment check"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/integers.exp ./gdb/testsuite/gdb.pascal/integers.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/integers.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/integers.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,12 +40,12 @@ if { [gdb_start_cmd] < 0 } {
 
 gdb_test "" ".* at .*${srcfile}.*" "start"
 
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint"
+gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
 
-gdb_test "print i" ".* = 0" "Print i before assigned to 1"
+gdb_test "print i" ".* = 0" "print i before assigned to 1"
 
-gdb_test "next" "i := 1;" "Next to 'i := 1' line"
-gdb_test "next" "j := 2;" "Next to 'j := 2' line"
+gdb_test "next" "i := 1;" "next to 'i := 1' line"
+gdb_test "next" "j := 2;" "next to 'j := 2' line"
 # At that point, 
 # i should be equal to 1
 gdb_test "print i" " = 1" 
@@ -53,10 +53,10 @@ gdb_test "print i" " = 1" 
 if { $pascal_compiler_is_gpc } {
   setup_xfail *-*-*
 }
-gdb_test "print j" " = 0" "Test j value before assignment"
+gdb_test "print j" " = 0" "test j value before assignment"
 
-gdb_test "next" "k := 3;" "Next to 'k := 3' line"
-gdb_test "next" "l := k;" "Next to 'l := k' line"
+gdb_test "next" "k := 3;" "next to 'k := 3' line"
+gdb_test "next" "l := k;" "next to 'l := k' line"
 
 #j should be equal to 2
 gdb_test "print j" " = 2"
@@ -110,11 +110,11 @@ gdb_test " print (i + 5) * (j + 7)" " = 
 # 'set i' does not work, as there are set sub-commands starting with 'i'
 # Thus we need to use 'set var i'
 gdb_test "set var i := 2" " := 2"
-gdb_test "print i" " = 2" "Testing new i value"
+gdb_test "print i" " = 2" "testing new i value"
 
 gdb_test "cont" \
 	 "Breakpoint .*:${bp_location2}.*" \
 	 "Going to second breakpoint"
 gdb_test "print i" \
 	 ".* = 5.*" \
-	 "Value of i after assignment"
+	 "value of i after assignment"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/integers.pas ./gdb/testsuite/gdb.pascal/integers.pas
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/integers.pas	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/integers.pas	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 {
- Copyright 2008-2015 Free Software Foundation, Inc.
+ Copyright 2008-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/Makefile.in ./gdb/testsuite/gdb.pascal/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = hello/hello 
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-find . -name 'b~*.ad[sb]' -print | xargs rm -f
-	-rm -f *~ a.out xgdb *.x *.ci *.tmp
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS) twice-tmp.c
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/print.exp ./gdb/testsuite/gdb.pascal/print.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/print.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/print.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/stub-method.exp ./gdb/testsuite/gdb.pascal/stub-method.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/stub-method.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/stub-method.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/stub-method.pas ./gdb/testsuite/gdb.pascal/stub-method.pas
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/stub-method.pas	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/stub-method.pas	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 {
- Copyright 2015 Free Software Foundation, Inc.
+ Copyright 2015-2017 Free Software Foundation, Inc.
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/types.exp ./gdb/testsuite/gdb.pascal/types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.pascal/types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.pascal/types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1994-2015 Free Software Foundation, Inc.
+# Copyright 1994-2017 Free Software Foundation, Inc.
 # Copyright 2007 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.c ./gdb/testsuite/gdb.perf/backtrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/backtrace.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.exp ./gdb/testsuite/gdb.perf/backtrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/backtrace.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,15 +52,18 @@ PerfTest::assemble {
     clean_restart $binfile
 
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
     gdb_breakpoint "fun2"
     gdb_continue_to_breakpoint "fun2"
+
+    return 0
 } {
     global BACKTRACE_DEPTH
 
     gdb_test "python BackTrace\($BACKTRACE_DEPTH\).run()"
 
+    return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.py ./gdb/testsuite/gdb.perf/backtrace.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/backtrace.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/backtrace.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/disassemble.exp ./gdb/testsuite/gdb.perf/disassemble.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/disassemble.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/disassemble.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,6 +52,9 @@ PerfTest::assemble {
     if ![runto_main] {
 	return -1
     }
+
+    return 0
 } {
     gdb_test "python Disassemble\(\).run()"
+    return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/disassemble.py ./gdb/testsuite/gdb.perf/disassemble.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/disassemble.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/disassemble.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-hello.cc ./gdb/testsuite/gdb.perf/gm-hello.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-hello.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-hello.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <string>
+#include "gm-utils.h"
+
+#ifdef SHLIB
+#define HELLO CONCAT2 (hello_, SHLIB)
+#else
+#define HELLO hello
+#endif
+
+std::string HELLO ("Hello.");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1.cc ./gdb/testsuite/gdb.perf/gmonster1.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "gm-std.h"
+
+int
+main ()
+{
+  gm_std::init ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1.exp ./gdb/testsuite/gdb.perf/gmonster1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,116 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Perftest description file for building the "gmonster1" benchmark.
+# Where does the name come from?  The benchmark is derived from one of the
+# monster programs at Google.
+#
+# Perftest descriptions are loaded thrice:
+# 1) To generate the build .exp files
+#    GDB_PERFTEST_MODE=gen-build-exps
+#    This step allows for parallel builds of the majority of pieces of the
+#    test binary and shlibs.
+# 2) To compile the "pieces" of the binary and shlibs.
+#    "Pieces" are the bulk of the machine-generated sources of the test.
+#    This step is driven by lib/build-piece.exp.
+#    GDB_PERFTEST_MODE=build-pieces
+# 3) To perform the final link of the binary and shlibs.
+#    GDB_PERFTEST_MODE=compile
+#
+# Example usage:
+# bash$ make -j5 build-perf RUNTESTFLAGS="gmonster1.exp gmonster2.exp"
+# bash$ make check-perf RUNTESTFLAGS="gdb.perf/gm*-*.exp GDB=/path/to/gdb"
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+if ![info exists MONSTER] {
+    set MONSTER "n"
+}
+
+proc make_testcase_config { } {
+    global MONSTER
+
+    set program_name "gmonster1"
+    array set testcase [GenPerfTest::init_testcase $program_name]
+
+    set testcase(language) c++
+
+    # *_{sources,headers} need to be embedded in an outer list
+    # because remember each element of the outer list is for each run, and
+    # here we want to use the same value for all runs.
+    set testcase(binary_extra_sources) { { gmonster1.cc gm-hello.cc gm-use-cerr.cc gm-pervasive-typedef.cc } }
+    set testcase(binary_extra_headers) { { <stdint.h> gm-utils.h gm-std.h gm-pervasive-typedef.h } }
+    set testcase(tail_shlib_sources) { { gm-std.cc } }
+    set testcase(tail_shlib_headers) { { gm-std.h } }
+
+    if { $MONSTER == "y" } {
+	set testcase(run_names) { 10-cus 100-cus 1000-cus 10000-cus }
+	set testcase(nr_compunits) { 10 100 1000 10000 }
+    } else {
+	set testcase(run_names) { 1-cu 10-cus 100-cus }
+	set testcase(nr_compunits) { 1 10 100 }
+    }
+    set testcase(nr_gen_shlibs) { 0 }
+
+    set testcase(nr_extern_globals) 10
+    set testcase(nr_static_globals) 10
+    set testcase(nr_extern_functions) 10
+    set testcase(nr_static_functions) 10
+
+    # class_specs needs to be embedded in an outer list because remember
+    # each element of the outer list is for each run, and here we want to use
+    # the same value for all runs.
+    set testcase(class_specs) { {
+	{
+	    count 1 name { class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 anonymous aclass }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 ns1 class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 anonymous ns1 aclass }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+    } }
+
+    return [array get testcase]
+}
+
+GenPerfTest::standard_compile_driver gmonster1.exp make_testcase_config
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp ./gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of lookup of a symbol that doesn't exist.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp ./gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure the speed of "ptype func" where a parameter of the function is a
+# typedef used pervasively.  This exercises the perf regression introduced by
+# the original patch to pr 16253.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp ./gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of printing std::cerr.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp ./gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of ptype on a simple class in a library that is searched late.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp ./gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-runto-main.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of running to main.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-select-file.exp ./gdb/testsuite/gdb.perf/gmonster1-select-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster1-select-file.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster1-select-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of selecting a file to debug.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2.cc ./gdb/testsuite/gdb.perf/gmonster2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,24 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "gm-std.h"
+
+int
+main ()
+{
+  gm_std::init ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2.exp ./gdb/testsuite/gdb.perf/gmonster2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,118 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Perftest description file for building the "gmonster2" benchmark.
+# Where does the name come from?  The benchmark is derived from one of the
+# monster programs at Google.
+#
+# Perftest descriptions are loaded thrice:
+# 1) To generate the build .exp files
+#    GDB_PERFTEST_MODE=gen-build-exps
+#    This step allows for parallel builds of the majority of pieces of the
+#    test binary and shlibs.
+# 2) To compile the "pieces" of the binary and shlibs.
+#    "Pieces" are the bulk of the machine-generated sources of the test.
+#    This step is driven by lib/build-piece.exp.
+#    GDB_PERFTEST_MODE=build-pieces
+# 3) To perform the final link of the binary and shlibs.
+#    GDB_PERFTEST_MODE=compile
+#
+# Example usage:
+# bash$ make -j5 build-perf RUNTESTFLAGS="gmonster1.exp gmonster2.exp"
+# bash$ make check-perf RUNTESTFLAGS="gdb.perf/gm*-*.exp GDB=/path/to/gdb"
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+if ![info exists MONSTER] {
+    set MONSTER "n"
+}
+
+proc make_testcase_config { } {
+    global MONSTER
+
+    set program_name "gmonster2"
+    array set testcase [GenPerfTest::init_testcase $program_name]
+
+    set testcase(language) c++
+
+    # *_{sources,headers} need to be embedded in an outer list
+    # because remember each element of the outer list is for each run, and
+    # here we want to use the same value for all runs.
+    set testcase(binary_extra_sources) { { gmonster2.cc gm-hello.cc gm-use-cerr.cc } }
+    set testcase(binary_extra_headers) { { gm-utils.h gm-std.h } }
+    set testcase(gen_shlib_extra_sources) { { gm-hello.cc gm-use-cerr.cc } }
+    set testcase(gen_shlib_extra_headers) { { gm-utils.h gm-std.h } }
+    set testcase(tail_shlib_sources) { { gm-std.cc } }
+    set testcase(tail_shlib_headers) { { gm-std.h } }
+
+    if { $MONSTER == "y" } {
+	set testcase(run_names) { 10-sos 100-sos 1000-sos }
+	set testcase(nr_gen_shlibs) { 10 100 1000 }
+    } else {
+	set testcase(run_names) { 1-so 10-sos 100-sos }
+	set testcase(nr_gen_shlibs) { 1 10 100 }
+    }
+    set testcase(nr_compunits) 10
+
+    set testcase(nr_extern_globals) 10
+    set testcase(nr_static_globals) 10
+    set testcase(nr_extern_functions) 10
+    set testcase(nr_static_functions) 10
+
+    # class_specs needs to be embedded in an outer list because remember
+    # each element of the outer list is for each run, and here we want to use
+    # the same value for all runs.
+    set testcase(class_specs) { {
+	{
+	    count 1 name { class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 anonymous aclass }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 ns1 class }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+	{
+	    count 1 name { ns0 anonymous ns1 aclass }
+	    nr_members 10 nr_static_members 10
+	    nr_methods 10 nr_static_methods 10
+	    nr_inline_methods 10 nr_static_inline_methods 10
+	}
+    } }
+
+    return [array get testcase]
+}
+
+GenPerfTest::standard_compile_driver gmonster2.exp make_testcase_config
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp ./gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of lookup of a symbol that doesn't exist
+# with lots of shared libraries.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp ./gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure the speed of "ptype func" where a parameter of the function is a
+# typedef used pervasively.  This exercises the perf regression introduced by
+# the original patch to pr 16253.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp ./gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of printing std::cerr with lots of shared libraries.
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp ./gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of ptype on a simple class in a library that is searched late
+# with lots of shared libraries
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp ./gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-runto-main.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of running to main with lots of shared libraries
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-select-file.exp ./gdb/testsuite/gdb.perf/gmonster2-select-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster2-select-file.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster2-select-file.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of selecting a file to debug
+# with lots of shared libraries
+# Test parameters are the standard GenPerfTest parameters.
+
+load_lib perftest.exp
+load_lib gen-perf-test.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-null-lookup.py ./gdb/testsuite/gdb.perf/gmonster-null-lookup.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-null-lookup.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-null-lookup.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test handling of lookup of a symbol that doesn't exist.
+# Efficient handling of this case is important, and not just for typos.
+# Sometimes the debug info for the needed object isn't present.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class NullLookup(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        # We want to measure time in this test.
+        super(NullLookup, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def execute_test(self):
+        for run in self.run_names:
+            this_run_binfile = "%s-%s" % (self.binfile,
+                                          utils.convert_spaces(run))
+            utils.select_file(this_run_binfile)
+            utils.runto_main()
+            utils.safe_execute("mt expand-symtabs")
+            iteration = 5
+            while iteration > 0:
+                utils.safe_execute("mt flush-symbol-cache")
+                func = lambda: utils.safe_execute("p symbol_not_found")
+                self.measure.measure(func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-pervasive-typedef.py ./gdb/testsuite/gdb.perf/gmonster-pervasive-typedef.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-pervasive-typedef.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-pervasive-typedef.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,45 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure the speed of "ptype func" where a parameter of the function is a
+# typedef used pervasively.  This exercises the perf regression introduced by
+# the original patch to pr 16253.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class PervasiveTypedef(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        # We want to measure time in this test.
+        super(PervasiveTypedef, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def func(self):
+        utils.select_file(self.this_run_binfile)
+        utils.safe_execute("ptype call_use_my_int_1")
+
+    def execute_test(self):
+        for run in self.run_names:
+            self.this_run_binfile = "%s-%s" % (self.binfile,
+                                               utils.convert_spaces(run))
+            iteration = 5
+            while iteration > 0:
+                self.measure.measure(self.func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-print-cerr.py ./gdb/testsuite/gdb.perf/gmonster-print-cerr.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-print-cerr.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-print-cerr.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,52 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test printing of std::cerr.
+# libstdc++ is typically near the end of the list of shared libraries,
+# and thus searched last (or near last).
+# Plus llvm had a bug where its pubnames output that gold uses to generate
+# the index caused a massive perf regression (basically it emitted an entry
+# for every CU that used it, whereas we only want the CU with the
+# definition).
+#
+# Note: One difference between this test and gmonster-ptype-string.py
+# is that here we do not pre-expand the symtab: we don't want include
+# GDB's slowness in searching expanded symtabs first to color these results.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class PrintCerr(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        super(PrintCerr, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def execute_test(self):
+        for run in self.run_names:
+            this_run_binfile = "%s-%s" % (self.binfile,
+                                          utils.convert_spaces(run))
+            utils.select_file(this_run_binfile)
+            utils.runto_main()
+            iteration = 5
+            while iteration > 0:
+                utils.safe_execute("mt flush-symbol-cache")
+                func = lambda: utils.safe_execute("print gm_std::cerr")
+                self.measure.measure(func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-ptype-string.py ./gdb/testsuite/gdb.perf/gmonster-ptype-string.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-ptype-string.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-ptype-string.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,48 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure speed of ptype of a std::string object.
+# The difference between this test and gmonster-print-cerr.py is that
+# here we are working with fully expanded symtabs.  GDB searches
+# these before it searches the index (there is work-in-progress to fix this),
+# this test helps measure the issue.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class GmonsterPtypeString(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        super(GmonsterPtypeString, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def execute_test(self):
+        for run in self.run_names:
+            this_run_binfile = "%s-%s" % (self.binfile,
+                                          utils.convert_spaces(run))
+            utils.select_file(this_run_binfile)
+            utils.runto_main()
+            utils.safe_execute("mt expand-symtabs")
+            iteration = 5
+            while iteration > 0:
+                utils.safe_execute("mt flush-symbol-cache")
+                func1 = lambda: utils.safe_execute("ptype hello")
+                func = lambda: utils.run_n_times(2, func1)
+                self.measure.measure(func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-runto-main.py ./gdb/testsuite/gdb.perf/gmonster-runto-main.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-runto-main.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-runto-main.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of running to main.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class GmonsterRuntoMain(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        super(GmonsterRuntoMain, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def execute_test(self):
+        for run in self.run_names:
+            this_run_binfile = "%s-%s" % (self.binfile,
+                                          utils.convert_spaces(run))
+            utils.select_file(this_run_binfile)
+            iteration = 5
+            while iteration > 0:
+                func = lambda: utils.runto_main()
+                self.measure.measure(func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-select-file.py ./gdb/testsuite/gdb.perf/gmonster-select-file.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gmonster-select-file.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gmonster-select-file.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,43 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Measure performance of selecting a file to debug.
+
+from perftest import perftest
+from perftest import measure
+from perftest import utils
+
+class GmonsterSelectFile(perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, run_names, binfile):
+        super(GmonsterSelectFile, self).__init__(name)
+        self.run_names = run_names
+        self.binfile = binfile
+
+    def warm_up(self):
+        pass
+
+    def _doit(self, binfile):
+        utils.select_file(None)
+        utils.select_file(binfile)
+
+    def execute_test(self):
+        for run in self.run_names:
+            this_run_binfile = "%s-%s" % (self.binfile,
+                                          utils.convert_spaces(run))
+            iteration = 5
+            while iteration > 0:
+                func = lambda: self._doit(this_run_binfile)
+                self.measure.measure(func, run)
+                iteration -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-pervasive-typedef.cc ./gdb/testsuite/gdb.perf/gm-pervasive-typedef.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-pervasive-typedef.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-pervasive-typedef.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "gm-pervasive-typedef.h"
+
+my_int use_of_my_int;
+
+void
+call_use_my_int_1 (my_int x)
+{
+  use_of_my_int = use_my_int (x);
+}
+
+void
+call_use_my_int ()
+{
+  call_use_my_int_1 (42);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-pervasive-typedef.h ./gdb/testsuite/gdb.perf/gm-pervasive-typedef.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-pervasive-typedef.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-pervasive-typedef.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This file is used to create the conditions for the perf regression
+   in pr 16253.  */
+
+#ifndef GM_PERVASIVE_TYPEDEF_H
+#define GM_PERVASIVE_TYPEDEF_H
+
+typedef int my_int;
+
+static my_int
+use_my_int (my_int x)
+{
+  return x + 1;
+}
+
+#endif /* GM_PERVASIVE_TYPEDEF_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-std.cc ./gdb/testsuite/gdb.perf/gm-std.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-std.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-std.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,36 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <iostream>
+#include "gm-std.h"
+
+namespace gm_std
+{
+
+ostream cerr;
+
+void
+init ()
+{
+  cerr.stream = &std::cerr;
+}
+
+template class basic_ostream<char>;
+
+template
+ostream&
+operator<< (ostream& out, const char* s);
+
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-std.h ./gdb/testsuite/gdb.perf/gm-std.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-std.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-std.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,57 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GM_STD_H
+#define GM_STD_H
+
+#include <iostream>
+
+namespace gm_std
+{
+
+// Mock std::cerr, so we don't have to worry about the vagaries of the
+// system-provided one.  E.g., gcc pr 65669.
+// This contains just enough to exercise what we want to.
+template<typename T>
+  class basic_ostream
+{
+ public:
+  std::ostream *stream;
+};
+
+template<typename T>
+  basic_ostream<T>&
+operator<< (basic_ostream<T>& out, const char* s)
+{
+  (*out.stream) << s;
+  return out;
+}
+
+typedef basic_ostream<char> ostream;
+
+// Inhibit implicit instantiations for required instantiations,
+// which are defined via explicit instantiations elsewhere.
+extern template class basic_ostream<char>;
+extern template ostream& operator<< (ostream&, const char*);
+
+extern ostream cerr;
+
+// Call this from main so we don't have to do the same tricks that
+// libstcd++ does with ios init'n.
+extern void init ();
+
+}
+
+#endif /* GM_STD_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-use-cerr.cc ./gdb/testsuite/gdb.perf/gm-use-cerr.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-use-cerr.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-use-cerr.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,29 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "gm-std.h"
+#include "gm-utils.h"
+
+#ifdef SHLIB
+#define WRITE_CERR XCONCAT2 (write_cerr_, SHLIB)
+#else
+#define WRITE_CERR write_cerr
+#endif
+
+void
+WRITE_CERR ()
+{
+  gm_std::cerr << "Yikes!\n";
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-utils.h ./gdb/testsuite/gdb.perf/gm-utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/gm-utils.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/gm-utils.h	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,25 @@
+/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GM_UTILS_H
+#define GM_UTILS_H
+
+/* Names borrowed from include/symcat.h.  */
+#define CONCAT2(a,b) a ## b
+#define XCONCAT2(a,b) CONCAT2 (a, b)
+#define STRINGX(s) #s
+#define XSTRING(s) STRINGX (s)
+
+#endif /* GM_UTILS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/__init__.py ./gdb/testsuite/gdb.perf/lib/perftest/__init__.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/__init__.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/__init__.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/measure.py ./gdb/testsuite/gdb.perf/lib/perftest/measure.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/measure.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/measure.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/perftest.py ./gdb/testsuite/gdb.perf/lib/perftest/perftest.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/perftest.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/perftest.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,12 +13,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import testresult
-import reporter
-from measure import Measure
-from measure import MeasurementCpuTime
-from measure import MeasurementWallTime
-from measure import MeasurementVmSize
+from __future__ import absolute_import
+
+import perftest.testresult as testresult
+import perftest.reporter as reporter
+from perftest.measure import Measure
+from perftest.measure import MeasurementCpuTime
+from perftest.measure import MeasurementWallTime
+from perftest.measure import MeasurementVmSize
+
 
 class TestCase(object):
     """Base class of all performance testing cases.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/reporter.py ./gdb/testsuite/gdb.perf/lib/perftest/reporter.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/reporter.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/reporter.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Text reports are written here.
+# This is the perftest counterpart to gdb.sum.
+SUM_FILE_NAME = "perftest.sum"
+
+# Raw data that went into the report is written here.
+# This is the perftest counterpart to gdb.log.
+LOG_FILE_NAME = "perftest.log"
+
+
 class Reporter(object):
     """Base class of reporter to report test results in a certain format.
 
@@ -43,22 +52,34 @@ class Reporter(object):
         """
         raise NotImplementedError("Abstract Method:end.")
 
+
 class TextReporter(Reporter):
     """Report results in a plain text file 'perftest.log'."""
 
     def __init__(self, append):
         super (TextReporter, self).__init__(Reporter(append))
+        self.txt_sum = None
         self.txt_log = None
 
-    def report(self, *args):
-        self.txt_log.write(' '.join(str(arg) for arg in args))
-        self.txt_log.write('\n')
+    def report(self, test_name, measurement_name, data_points):
+        if len(data_points) == 0:
+            self.txt_sum.write("%s %s *no data recorded*\n" % (
+                test_name, measurement_name))
+            return
+        average = sum(data_points) / len(data_points)
+        data_min = min(data_points)
+        data_max = max(data_points)
+        self.txt_sum.write("%s %s %s\n" % (
+            test_name, measurement_name, average))
+        self.txt_log.write("%s %s %s, min %s, max %s, data %s\n" % (
+            test_name, measurement_name, average, data_min, data_max,
+            data_points))
 
     def start(self):
-        if self.append:
-            self.txt_log = open ("perftest.log", 'a+');
-        else:
-            self.txt_log = open ("perftest.log", 'w');
+        mode = "a+" if self.append else "w"
+        self.txt_sum = open (SUM_FILE_NAME, mode);
+        self.txt_log = open (LOG_FILE_NAME, mode);
 
     def end(self):
+        self.txt_sum.close ()
         self.txt_log.close ()
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/testresult.py ./gdb/testsuite/gdb.perf/lib/perftest/testresult.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/testresult.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/testresult.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,11 +35,14 @@ class SingleStatisticTestResult(TestResu
         self.results = dict ()
 
     def record(self, parameter, result):
-        self.results[parameter] = result
+        if parameter in self.results:
+            self.results[parameter].append(result)
+        else:
+            self.results[parameter] = [result]
 
     def report(self, reporter, name):
         reporter.start()
-        for key in sorted(self.results.iterkeys()):
+        for key in sorted(self.results.keys()):
             reporter.report(name, key, self.results[key])
         reporter.end()
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/utils.py ./gdb/testsuite/gdb.perf/lib/perftest/utils.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/lib/perftest/utils.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/lib/perftest/utils.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,69 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import gdb
+
+def safe_execute(command):
+    """Execute command, ignoring any gdb errors."""
+    result = None
+    try:
+        result = gdb.execute(command, to_string=True)
+    except gdb.error:
+        pass
+    return result
+
+
+def convert_spaces(file_name):
+    """Return file_name with all spaces replaced with "-"."""
+    return file_name.replace(" ", "-")
+
+
+def select_file(file_name):
+    """Select a file for debugging.
+
+    N.B. This turns confirmation off.
+    """
+    safe_execute("set confirm off")
+    safe_execute("kill")
+    print ("Selecting file %s" % (file_name))
+    if file_name is None:
+        gdb.execute("file")
+    else:
+        gdb.execute("file %s" % (file_name))
+
+
+def runto(location):
+    """Run the program to location.
+
+    N.B. This turns confirmation off.
+    """
+    safe_execute("set confirm off")
+    gdb.execute("tbreak %s" % (location))
+    gdb.execute("run")
+
+
+def runto_main():
+    """Run the program to "main".
+
+    N.B. This turns confirmation off.
+    """
+    runto("main")
+
+
+def run_n_times(count, func):
+    """Execute func count times."""
+    while count > 0:
+        func()
+        count -= 1
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/Makefile ./gdb/testsuite/gdb.perf/Makefile
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/Makefile	2015-07-06 01:51:07.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/Makefile	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-
-srcdir = .
-
-.PHONY: all clean mostlyclean distclean realclean
-
-PROGS = 
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *.o *.diff *~ core $(PROGS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/Makefile.in ./gdb/testsuite/gdb.perf/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-.PHONY: all clean mostlyclean distclean realclean
-
-PROGS = 
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *.o *.diff *~ core $(PROGS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/README ./gdb/testsuite/gdb.perf/README
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/README	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/README	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,211 @@
+The GDB Performance Testsuite
+=============================
+
+This README contains notes on hacking on GDB's performance testsuite.
+For notes on GDB's regular testsuite or how to run the performance testsuite,
+see ../README.
+
+Generated tests
+***************
+
+The testcase generator lets us easily test GDB on large programs.
+The "monster" tests are mocks of real programs where GDB's
+performance has been a problem.  Often it is difficult to build
+these monster programs, but when measuring performance one doesn't
+need the "real" program, all one needs is something that looks like
+the real program along the axis one is measuring; for example, the
+number of CUs (compilation units).
+
+Structure of generated tests
+****************************
+
+Generated tests consist of a binary and potentially any number of
+shared libraries.  One of these shared libraries, called "tail", is
+special.  It is used to provide mocks of system provided code, and
+contains no generated code.  Typically system-provided libraries
+are searched last which can have significant performance consequences,
+so we provide a means to exercise that.
+
+The binary and the generated shared libraries can have a mix of
+manually written and generated code.  Manually written code is
+specified with the {binary,gen_shlib}_extra_sources config parameters,
+which are lists of source files in testsuite/gdb.perf.  Generated
+files are controlled with various configuration knobs.
+
+Once a large test program is built, it makes sense to use it as much
+as possible (i.e., with multiple tests).  Therefore perf data collection
+for generated tests is split into two passes: the first pass builds
+all the generated tests, and the second pass runs all the performance
+tests.  The first pass is called "build-perf" and the second pass is
+called "check-perf".  See ../README for instructions on running the tests.
+
+Generated test directory layout
+*******************************
+
+All output lives under testsuite/gdb.perf in the build directory.
+
+Because some of the tests can get really large (and take potentially
+minutes to compile), parallelism is built into their compilation.
+Note however that we don't run the tests in parallel as it can skew
+the results.
+
+To keep things simple and stay consistent, we use the same
+mechanism used by "make check-parallel".  There is one catch: we need
+one .exp for each "worker" but the .exp file must come from the source
+tree.  To avoid generating .exp files for each worker we invoke
+lib/build-piece.exp for each worker with different arguments.
+The file build.piece.exp lives in "lib" to prevent dejagnu from finding
+it when it goes to look for .exp scripts to run.
+
+Another catch is that each parallel build worker needs its own directory
+so that their gdb.{log,sum} files don't collide.  On the other hand
+its easier if their output (all the object files and shared libraries)
+are in the same directory.
+
+The above considerations yield the resulting layout:
+
+$objdir/testsuite/gdb.perf/
+
+	gdb.log, gdb.sum: result of doing final link and running tests
+
+	workers/
+
+		gdb.log, gdb.sum: result of gen-workers step
+
+		$program_name/
+
+			${program_name}-0.worker
+			...
+			${program_name}-N.worker: input to build-pieces step
+
+	outputs/
+
+		${program_name}/
+
+			${program_name}-0/
+			...
+			${program_name}-N/
+
+				gdb.log, gdb.sum: for each build-piece worker
+
+			pieces/
+
+				generated sources, object files, shlibs
+
+			${run_name_1}: binary for test config #1
+			...
+			${run_name_N}: binary for test config #N
+
+Generated test configuration knobs
+**********************************
+
+The monster program generator provides various knobs for building various
+kinds of monster programs.  For a list of the knobs see function
+GenPerfTest::init_testcase in testsuite/lib/perftest.exp.
+Most knobs are self-explanatory.
+Here is a description of the less obvious ones.
+
+binary_extra_sources
+
+	This is the list of non-machine generated sources that go
+	into the test binary.  There must be at least one: the one
+	with main.
+
+class_specs
+
+	List of pairs of keys and values.
+	Supported keys are:
+	count: number of classes
+	  Default: 1
+	name: list of namespaces and class name prefix
+	  E.g., { ns0 ns1 foo } -> ns0::ns1::foo_<cu#>_{0,1,...}
+	  There is no default, this value must be specified.
+	nr_members: number of members
+	  Default: 0
+	nr_static_members: number of static members
+	  Default: 0
+	nr_methods: number of methods
+	  Default: 0
+	nr_inline_methods: number of inline methods
+	  Default: 0
+	nr_static_methods: number of static methods
+	  Default: 0
+	nr_static_inline_methods: number of static inline methods
+	  Default: 0
+
+	E.g.,
+	class foo {};
+	namespace ns1 { class bar {}; }
+	would be represented as:
+	{
+	  { count 1 name { foo } }
+	  { count 1 name { ns1 bar } }
+	}
+
+	The naming of each class is "class_<cu_nr>_<class_nr>",
+	where <cu_nr> is the number of the compilation unit the
+	class is defined in.
+
+	There's currently no support for nesting classes in classes,
+	or for specifying baseclasses or templates.
+
+Misc. configuration knobs
+*************************
+
+These knobs control building or running of the test and are specified
+like any global Tcl variable.
+
+CAT_PROGRAM
+
+	Default is /bin/cat, you shouldn't need to change this.
+
+SHA1SUM_PROGRAM
+
+	Default is /usr/bin/sha1sum.
+
+PERF_TEST_COMPILE_PARALLELISM
+
+	An integer, specifies the amount of parallelism in the builds.
+	Akin to make's -j flag.  The default is 10.
+
+Writing a generated test program
+********************************
+
+The best way to write a generated test program is to take an existing
+one as boilerplate.  Two good examples are gmonster1.exp and gmonster2.exp.
+gmonster1.exp builds a big binary with various custom manually written
+code, and gmonster2 is (essentially) the equivalent binary split up over
+several shared libraries.
+
+Writing a performance test that uses a generated program
+********************************************************
+
+The best way to write a test is to take an existing one as boilerplate.
+Good examples are gmonster1-*.exp and gmonster2-*.exp.
+
+The naming used thus far is that "foo.exp" builds the test program
+and there is one "foo-bar.exp" file for each performance test
+that uses test program "foo".
+
+In addition to writing the test driver .exp script, one must also
+write a python script that is used to run the test.
+This contents of this script is defined by the performance testsuite
+harness.  It defines a class, which is a subclass of one of the
+classes in gdb.perf/lib/perftest/perftest.py.
+See gmonster-null-lookup.py for an example.
+
+Note: Since gmonster1 and gmonster2 are treated as being variations of
+the same program, each test shares the same python script.
+E.g., gmonster1-null-lookup.exp and gmonster2-null-lookup.exp
+both use gmonster-null-lookup.py.
+
+Running performance tests for generated programs
+************************************************
+
+There are two steps: build and run.
+
+Example:
+
+bash$ make -j10 build-perf RUNTESTFLAGS="gmonster1.exp"
+bash$ make -j10 check-perf RUNTESTFLAGS="gmonster1-null-lookup.exp" \
+    GDB_PERFTEST_MODE=run
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.c ./gdb/testsuite/gdb.perf/single-step.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/single-step.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.exp ./gdb/testsuite/gdb.perf/single-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/single-step.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ set expfile $testfile.exp
 
 # make check-perf RUNTESTFLAGS='single-step.exp SINGLE_STEP_COUNT=300'
 if ![info exists SINGLE_STEP_COUNT] {
-    set SINGLE_STEP_COUNT 10000
+    set SINGLE_STEP_COUNT 1000
 }
 
 PerfTest::assemble {
@@ -44,13 +44,15 @@ PerfTest::assemble {
     clean_restart $binfile
 
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
+    return 0
 } {
     global SINGLE_STEP_COUNT
 
     gdb_test_no_output "python SingleStep\(${SINGLE_STEP_COUNT}\).run()"
     # Terminate the loop.
     gdb_test "set variable flag = 0"
+    return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.py ./gdb/testsuite/gdb.perf/single-step.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/single-step.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/single-step.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.cc ./gdb/testsuite/gdb.perf/skip-command.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.cc	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-command.cc	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+volatile int flag;
+
+int
+func ()
+{
+  return 42;
+}
+
+class c
+{
+ public:
+  int _x;
+  c () : _x (42) {}
+};
+
+void
+call_me (int x, c y)
+{
+}
+
+int
+main ()
+{
+  while (flag)
+    {
+      call_me (func (), c ());
+    }
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.exp ./gdb/testsuite/gdb.perf/skip-command.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-command.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,138 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test case is to test the speed of GDB when it is single-stepping
+# with skip directives active. There's no need to test skip directives that
+# match functions we're stepping through. That's not the interesting case.
+# The interesting case is where there are 100s or more classes or libraries,
+# each providing their own set of skip directives.
+#
+# Parameters:
+# SKIP_STEP_COUNT: the number of single steps GDB performs
+# SKIP_DIRECTIVE_COUNT: the number of skip directives to create
+
+load_lib perftest.exp
+
+if [skip_perf_tests] {
+    return 0
+}
+
+standard_testfile .cc skip-funcs.cc
+set executable $testfile
+set skip_func_file [standard_output_file $srcfile2]
+set expfile $testfile.exp
+
+# make check-perf RUNTESTFLAGS='skip-command.exp SKIP_STEP_COUNT=1000 ...'
+if ![info exists SKIP_STEP_COUNT] {
+    set SKIP_STEP_COUNT 1000
+}
+if ![info exists SKIP_DIRECTIVE_COUNT] {
+    set SKIP_DIRECTIVE_COUNT 1000
+}
+
+proc delete_all_skips { } {
+    # FIXME: skip currently doesn't ask for confirmation
+    # FIXME: "skip delete" with no skips ->
+    #   "No skiplist entries found with number (null)."
+    gdb_test_no_output "set confirm off"
+    gdb_test "skip delete" ""
+    gdb_test_no_output "set confirm on"
+}
+
+proc install_skips { kind text nr_skips } {
+    global gdb_prompt
+    set test "install_skips"
+    delete_all_skips
+    switch $kind {
+	"function" { set skip_arg "-function" }
+	"regexp" { set skip_arg "-rfunction" }
+	default {
+	    perror "bad skip kind: $kind"
+	    return
+	}
+    }
+    for { set i 0 } { $i < $nr_skips } { incr i } {
+	gdb_test "skip $skip_arg [format $text $i]" ""
+    }
+    # There could be 1000's of these, which can overflow the buffer.
+    # However, it's good to have this in the log, so we go to the effort
+    # to read it all in.
+    gdb_test_multiple "info skip" $test {
+	-re "\[^\r\n\]*\r\n" { exp_continue }
+	-re "\[\r\n\]*$gdb_prompt $" {
+	    pass $test
+	}
+	timeout {
+	    fail "$test (timeout)"
+	}
+    }
+}
+
+proc write_skip_func_source { file_name func_name_prefix nr_funcs } {
+    set f [open $file_name "w"]
+    puts $f "// DO NOT EDIT, machine generated file.  See skip-command.exp."
+    for { set i 0 } { $i < $nr_funcs } { incr i } {
+	set func_name [format "${func_name_prefix}_%02d" $i]
+	puts $f "int $func_name () { return 0; }"
+    }
+    close $f
+}
+
+proc run_skip_bench { kind text } {
+    global SKIP_STEP_COUNT SKIP_DIRECTIVE_COUNT
+
+    if ![runto_main] {
+	fail "can't run to main"
+	return -1
+    }
+
+    gdb_test_no_output "set variable flag = 1"
+
+    for { set i 0 } { $i < 5 } { incr i } {
+	set nr_skips [expr $i * $SKIP_DIRECTIVE_COUNT]
+	install_skips $kind $text $nr_skips
+	gdb_test_no_output "python SkipCommand\(\"skip-$kind-$nr_skips\", ${SKIP_STEP_COUNT}\).run()"
+    }
+
+    gdb_test "set variable flag = 0"
+}
+
+PerfTest::assemble {
+    global srcdir subdir srcfile binfile skip_func_file
+    global SKIP_DIRECTIVE_COUNT
+
+    write_skip_func_source $skip_func_file "skip_func" [expr 4 * $SKIP_DIRECTIVE_COUNT]
+    if { [gdb_compile [list "$srcdir/$subdir/$srcfile" $skip_func_file] ${binfile} executable {c++ debug}] != "" } {
+	return -1
+    }
+    return 0
+} {
+    global binfile
+    clean_restart $binfile
+    return 0
+} {
+    global SKIP_STEP_COUNT SKIP_DIRECTIVE_COUNT
+
+    with_test_prefix "time_skip_func" {
+	# N.B. The function name must match the ones in skip-command.cc.
+	run_skip_bench "function" "skip_func_%02d"
+    }
+
+    with_test_prefix "time_skip_constructor" {
+	run_skip_bench "regexp" "^(skip_class_%02d)::\\1 *\\("
+    }
+
+    return 0
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.py ./gdb/testsuite/gdb.perf/skip-command.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-command.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-command.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,34 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from perftest import perftest
+
+class SkipCommand (perftest.TestCaseWithBasicMeasurements):
+    def __init__(self, name, step):
+        super (SkipCommand, self).__init__ (name)
+        self.step = step
+
+    def warm_up(self):
+        for _ in range(0, 10):
+            gdb.execute("step", False, True)
+
+    def _run(self, r):
+        for _ in range(0, r):
+            gdb.execute("step", False, True)
+
+    def execute_test(self):
+        for i in range(1, 5):
+            func = lambda: self._run(i * self.step)
+            self.measure.measure(func, i * self.step)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.c ./gdb/testsuite/gdb.perf/skip-prologue.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-prologue.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.exp ./gdb/testsuite/gdb.perf/skip-prologue.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-prologue.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,14 @@ if ![info exists SKIP_PROLOGUE_COUNT] {
 PerfTest::assemble {
     global srcdir subdir srcfile binfile
 
-    if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable {debug}] != "" } {
+    if [info exists COMPILE] {
+	set opts {debug}
+    } else {
+	set opts {nodebug}
+    }
+
+    if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } {
+	untested "failed to compile"
 	return -1
     }
 
@@ -49,9 +56,10 @@ PerfTest::assemble {
     clean_restart $binfile
 
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
+    return 0
 } {
     global SKIP_PROLOGUE_COUNT
 
@@ -66,4 +74,5 @@ PerfTest::assemble {
 	    pass $test
 	}
     }
+    return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.py ./gdb/testsuite/gdb.perf/skip-prologue.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/skip-prologue.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/skip-prologue.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.c ./gdb/testsuite/gdb.perf/solib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/solib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.exp ./gdb/testsuite/gdb.perf/solib.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/solib.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -77,11 +77,13 @@ PerfTest::assemble {
     clean_restart $binfile
 
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
+    return 0
 } {
     global SOLIB_COUNT
 
     gdb_test_no_output "python SolibLoadUnload\($SOLIB_COUNT\).run()"
+    return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.py ./gdb/testsuite/gdb.perf/solib.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.perf/solib.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.perf/solib.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/amd64-py-framefilter-invalidarg.S ./gdb/testsuite/gdb.python/amd64-py-framefilter-invalidarg.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/amd64-py-framefilter-invalidarg.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/amd64-py-framefilter-invalidarg.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/lib-types.cc ./gdb/testsuite/gdb.python/lib-types.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/lib-types.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/lib-types.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/lib-types.exp ./gdb/testsuite/gdb.python/lib-types.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/lib-types.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/lib-types.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -28,7 +28,7 @@ if {[prepare_for_testing $testfile.exp $
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/Makefile.in ./gdb/testsuite/gdb.python/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = py-type py-value py-prettyprint py-template py-block \
-	py-symbol py-mi py-breakpoint py-inferior py-infthread \
-	py-shared python lib-types py-events py-evthreads py-frame \
-	py-mi py-pp-maint py-progspace py-section-script py-objfile \
-	py-finish-breakpoint py-finish-breakpoint2 py-value-cc py-explore \
-	py-explore-cc py-arch
-
-MISCELLANEOUS = py-shared-sl.sl py-events-shlib.so py-events-shlib-nodebug.so 
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES) $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-arch.c ./gdb/testsuite/gdb.python/py-arch.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-arch.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-arch.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-arch.exp ./gdb/testsuite/gdb.python/py-arch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-arch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-arch.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 load_lib gdb-python.exp
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-as-string.c ./gdb/testsuite/gdb.python/py-as-string.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-as-string.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-as-string.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,32 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+enum EnumType {
+  ENUM_VALUE_A,
+  ENUM_VALUE_B,
+  ENUM_VALUE_C,
+  ENUM_VALUE_D,
+};
+
+static enum EnumType enum_valid = ENUM_VALUE_B;
+static enum EnumType enum_invalid = 20;
+
+int
+main ()
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-as-string.exp ./gdb/testsuite/gdb.python/py-as-string.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-as-string.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-as-string.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests the convenience
+# functions in as_string.py.
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
+    return -1
+}
+
+if ![runto_main] {
+    fail "couldn't run to main."
+    return 0
+}
+
+if { [skip_python_tests] } { continue }
+
+proc test_as_string { } {
+    gdb_test "p \$_as_string(2)" "\"2\""
+    gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
+    gdb_test "p \$_as_string(enum_invalid)" "\"20\""
+}
+
+test_as_string
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.c ./gdb/testsuite/gdb.python/py-bad-printers.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-bad-printers.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.exp ./gdb/testsuite/gdb.python/py-bad-printers.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-bad-printers.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -28,15 +28,14 @@ if {[prepare_for_testing $testfile.exp $
 if { [skip_python_tests] } { continue }
 
 if ![runto_main ] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "load python file"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 gdb_breakpoint [gdb_get_line_number "break here"]
 gdb_continue_to_breakpoint "break here" ".* break here .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.py ./gdb/testsuite/gdb.python/py-bad-printers.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-bad-printers.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-bad-printers.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-block.c ./gdb/testsuite/gdb.python/py-block.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-block.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-block.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-block.exp ./gdb/testsuite/gdb.python/py-block.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-block.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-block.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -39,25 +39,25 @@ gdb_continue_to_breakpoint "Block break 
 # Test initial innermost block.
 gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
 gdb_py_test_silent_cmd "python block = frame.block()" "Get block" 0
-gdb_test "python print (block)" "<gdb.Block object at $hex>" "Check block not None"
-gdb_test "python print (block.function)" "None" "First anonymous block"
-gdb_test "python print (block.start)" "${decimal}" "Check start not None"
-gdb_test "python print (block.end)" "${decimal}" "Check end not None"
+gdb_test "python print (block)" "<gdb.Block object at $hex>" "check block not None"
+gdb_test "python print (block.function)" "None" "first anonymous block"
+gdb_test "python print (block.start)" "${decimal}" "check start not None"
+gdb_test "python print (block.end)" "${decimal}" "check end not None"
 
 # Test global/static blocks
 gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
 gdb_py_test_silent_cmd "python block = frame.block()" "Get block" 0
-gdb_test "python print (block.is_global)" "False" "Not a global block"
-gdb_test "python print (block.is_static)" "False" "Not a static block"
+gdb_test "python print (block.is_global)" "False" "not a global block"
+gdb_test "python print (block.is_static)" "False" "not a static block"
 gdb_py_test_silent_cmd "python gblock = block.global_block" "Get block" 1
 gdb_py_test_silent_cmd "python sblock = block.static_block" "Get block" 1
-gdb_test "python print (gblock.is_global)" "True" "Is the global block"
-gdb_test "python print (sblock.is_static)" "True" "Is the static block"
+gdb_test "python print (gblock.is_global)" "True" "is the global block"
+gdb_test "python print (sblock.is_static)" "True" "is the static block"
 
 # Move up superblock(s) until we reach function block_func.
-gdb_test_no_output "python block = block.superblock" "Get superblock"
-gdb_test "python print (block.function)" "None" "Second anonymous block"
-gdb_test_no_output "python block = block.superblock" "Get superblock 2"
+gdb_test_no_output "python block = block.superblock" "get superblock"
+gdb_test "python print (block.function)" "None" "second anonymous block"
+gdb_test_no_output "python block = block.superblock" "get superblock 2"
 gdb_test "python print (block.function)" "block_func" \
          "Print superblock 2 function"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint.c ./gdb/testsuite/gdb.python/py-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.c ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see  <http://www.gnu.org/licenses/>.  */
+
+int
+foo (int a)
+{
+  return a * 2;
+}
+
+int
+main (void)
+{
+  return foo (2);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,56 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests proper handling for
+# breakpoint creation failure.
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
+    return -1
+}
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+clean_restart "${testfile}"
+if ![runto_main] {
+    perror "could not run to main"
+    continue
+}
+
+# The following will create a breakpoint Python wrapper whose construction will
+# abort: the requested symbol is not defined.  GDB should not keep a reference
+# to the wrapper; however it used to...
+gdb_test "source py-breakpoint-create-fail.py"
+
+# ... and when it did, as a result, the following breakpoint creation (not
+# initiated by the Python API) would dereference the already-freed Python
+# breakpoint wrapper, resulting in undefined behavior, sometimes observed as a
+# gdb crash, and other times causing the next stop to invoke the Python wrapper
+# "stop" method for the object that is not supposed to exist.
+gdb_test "break foo"
+
+set test "continuing to foo"
+gdb_test_multiple "continue" "$test" {
+    -re "MyBP\.stop was invoked\!.*$gdb_prompt $" {
+        fail "$test"
+    }
+    -re "Continuing.*Breakpoint 2, foo.*$gdb_prompt $" {
+        pass "$test"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.py ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint-create-fail.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-breakpoint-create-fail.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,31 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import gdb
+
+
+class MyBP(gdb.Breakpoint):
+    def stop(self):
+        print('MyBP.stop was invoked!')
+        # Don't make this breakpoint stop
+        return False
+
+
+try:
+    bp = MyBP('does_not_exist', gdb.BP_WATCHPOINT)
+except RuntimeError:
+    pass
+else:
+    assert False
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint.exp ./gdb/testsuite/gdb.python/py-breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-breakpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-breakpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -34,18 +34,23 @@ proc test_bkpt_basic { } {
 	# Start with a fresh gdb.
 	clean_restart ${testfile}
 
+	# We should start with no breakpoints.
+	gdb_test "python print (gdb.breakpoints())" "\\(\\)"
+
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 
-	# Initially there should be one breakpoint: main.
+	# Now there should be one breakpoint: main.
 	gdb_py_test_silent_cmd "python blist = gdb.breakpoints()" \
 	    "Get Breakpoint List" 0
 	gdb_test "python print (blist\[0\])" \
 	    "<gdb.Breakpoint object at $hex>" "Check obj exists @main"
 	gdb_test "python print (blist\[0\].location)" \
 	    "main." "Check breakpoint location @main"
+	gdb_test "python print (blist\[0\].pending)" "False" \
+	    "Check pending status of main breakpoint"
 
 	set mult_line [gdb_get_line_number "Break at multiply."]
 	gdb_breakpoint ${mult_line}
@@ -67,7 +72,7 @@ proc test_bkpt_basic { } {
 
 	gdb_test "python print (blist\[1\].location)" \
 	    "py-breakpoint\.c:${mult_line}*" \
-	    "Check breakpoint location @mult_line"
+	    "check breakpoint location @mult_line"
 
 	# Check hit and ignore counts. 
 	gdb_test "python print (blist\[1\].hit_count)" \
@@ -118,7 +123,7 @@ proc test_bkpt_deletion { } {
 	clean_restart ${testfile}
 
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 
@@ -156,7 +161,7 @@ proc test_bkpt_cond_and_cmds { } {
 	clean_restart ${testfile}
 
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 
@@ -208,7 +213,7 @@ proc test_bkpt_invisible { } {
 	clean_restart ${testfile}
 
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 
@@ -258,12 +263,13 @@ proc test_watchpoints { } {
 	}
 
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 
 	gdb_py_test_silent_cmd  "python wp1 = gdb.Breakpoint (\"result\", type=gdb.BP_WATCHPOINT, wp_class=gdb.WP_WRITE )" \
 	    "Set watchpoint" 0
+	gdb_test "python print (wp1.pending)" "False"
 	gdb_test "continue" \
 	    ".*\[Ww\]atchpoint.*result.*Old value = 0.*New value = 25.*main.*" \
 	    "Test watchpoint write"
@@ -282,7 +288,7 @@ proc test_bkpt_internal { } {
 	    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 	}
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 	delete_breakpoints
@@ -312,7 +318,7 @@ proc test_bkpt_eval_funcs { } {
 	    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 	}
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 	delete_breakpoints
@@ -386,7 +392,7 @@ proc test_bkpt_eval_funcs { } {
 
 	gdb_test "python eval_bp2.stop = stop_func"  \
 	    "RuntimeError: Only one stop condition allowed.  There is currently a GDB.*" \
-	    "Assign stop function to a breakpoint that has a condition"
+	    "assign stop function to a breakpoint that has a condition"
 
 	delete_breakpoints
 	gdb_breakpoint [gdb_get_line_number "Break at multiply."]
@@ -428,7 +434,7 @@ proc test_bkpt_temporary { } {
 	clean_restart ${testfile}
 
 	if ![runto_main] then {
-	    fail "Cannot run to main."
+	    fail "cannot run to main."
 	    return 0
 	}
 	delete_breakpoints
@@ -462,6 +468,85 @@ proc test_bkpt_temporary { } {
     }
 }
 
+# Test address locations.
+
+proc test_bkpt_address {} {
+    global gdb_prompt decimal srcfile
+
+    # Delete all breakpoints
+    delete_breakpoints
+
+    gdb_test "python gdb.Breakpoint(\"*main\")" \
+	".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\."
+
+    gdb_py_test_silent_cmd \
+	"python main_loc = gdb.parse_and_eval(\"main\").address" \
+	"eval address of main" 0
+
+    # Python 2 vs 3 ... Check `int' first. If that fails, try `long'.
+    gdb_test_multiple "python main_addr = int(main_loc)" "int value of main" {
+	-re "Traceback.*$gdb_prompt $" {
+	    gdb_test_no_output "python main_addr = long(main_loc)" \
+		"long value of main"
+	}
+	-re "$gdb_prompt $" {
+	    pass "int value of main"
+	}
+    }
+
+    # Include whitespace in the linespec to double-check proper
+    # grokking of argument to gdb.Breakpoint.
+    gdb_test "python gdb.Breakpoint(\"  *{}\".format(str(main_addr)))" \
+	".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\."
+}
+
+proc test_bkpt_pending {} {
+    delete_breakpoints
+    gdb_breakpoint "nosuchfunction" allow-pending
+    gdb_test "python print (gdb.breakpoints()\[0\].pending)" "True" \
+	"Check pending status of pending breakpoint"
+}
+
+# Helper proc to install an event listener for a given breakpoint
+# event.  NAME is the name of the event to listen for.
+proc connect_event {name} {
+    set lambda "lambda x: note_event(\"$name\")"
+    gdb_test_no_output "python gdb.events.$name.connect($lambda)" \
+	"install $name event listener"
+}
+
+# Helper proc to check that the most recently emitted breakpoint event
+# is EXPECTED.
+proc check_last_event {expected} {
+    gdb_test "python print (last_bp_event)" $expected \
+	"check for $expected event"
+}
+
+proc test_bkpt_events {} {
+    global testfile
+
+    clean_restart ${testfile}
+
+    gdb_py_test_multiple "Create event handler" \
+	"python" "" \
+	"def note_event(arg):" "" \
+	"  global last_bp_event" "" \
+	"  last_bp_event = arg" "" \
+	"end" ""
+    gdb_test_no_output "python last_bp_event = None"
+
+    connect_event breakpoint_created
+    connect_event breakpoint_modified
+    connect_event breakpoint_deleted
+
+    gdb_breakpoint [gdb_get_line_number "Break at add."]
+    check_last_event breakpoint_created
+    gdb_test_no_output "disable 1"
+    check_last_event breakpoint_modified
+    gdb_test_no_output "delete 1"
+    check_last_event breakpoint_deleted
+}
+
 test_bkpt_basic
 test_bkpt_deletion
 test_bkpt_cond_and_cmds
@@ -470,3 +555,6 @@ test_watchpoints
 test_bkpt_internal
 test_bkpt_eval_funcs
 test_bkpt_temporary
+test_bkpt_address
+test_bkpt_pending
+test_bkpt_events
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-caller-is.c ./gdb/testsuite/gdb.python/py-caller-is.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-caller-is.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-caller-is.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-caller-is.exp ./gdb/testsuite/gdb.python/py-caller-is.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-caller-is.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-caller-is.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-cmd.c ./gdb/testsuite/gdb.python/py-cmd.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-cmd.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-cmd.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-cmd.exp ./gdb/testsuite/gdb.python/py-cmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-cmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-cmd.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
@@ -179,7 +179,7 @@ gdb_py_test_multiple "expression complet
 
 gdb_test "complete expr_test bar\." \
     "expr_test bar\.bc.*expr_test bar\.ij.*" \
-    "Test completion through complete command"
+    "test completion through complete command"
 
 if { [readline_is_used] } {
     set test "complete 'expr_test bar.i'"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-completion.exp ./gdb/testsuite/gdb.python/py-completion.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-completion.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-completion.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-completion.py ./gdb/testsuite/gdb.python/py-completion.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-completion.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-completion.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-error.exp ./gdb/testsuite/gdb.python/py-error.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-error.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-error.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-error.py ./gdb/testsuite/gdb.python/py-error.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-error.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-error.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.c ./gdb/testsuite/gdb.python/py-events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-events.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.exp ./gdb/testsuite/gdb.python/py-events.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-events.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -43,13 +43,13 @@ clean_restart ${testfile}
 
 if { [skip_python_tests] } { continue }
 
-gdb_test_no_output "python exec (open ('${pyfile}').read ())" ""
+gdb_test_no_output "source ${pyfile}" "load python file"
 
 gdb_test "test-objfile-events" "Object file events registered."
 
 gdb_breakpoint "main" {temporary}
 
-gdb_test "run" ".*event type: new_objfile.*new objfile name.*" "New objfile notification"
+gdb_test "run" ".*event type: new_objfile.*new objfile name.*" "new objfile notification"
 
 gdb_test_no_output "set detach-on-fork off" ""
 
@@ -65,7 +65,7 @@ gdb_test "continue" ".*event type: conti
 .*first breakpoint number: 2.*
 .*breakpoint number: 2.*
 .*breakpoint number: 3.*
-all threads stopped"
+all threads stopped.*"
 
 # Test that when "step N" trips on a breakpoint, we get a stop event
 # with breakpoint stop reason.
@@ -75,7 +75,7 @@ gdb_test "step 3" ".*event type: continu
 .*stop reason: breakpoint.*
 .*first breakpoint number: 4.*
 .*breakpoint number: 4.*
-all threads stopped"
+all threads stopped.*"
 
 delete_breakpoints
 
@@ -210,3 +210,28 @@ gdb_test "continue" ".*event type: conti
 .*exit code: 12.*
 .*exit inf: 2.*
 dir ok: True.*" "Inferior 2 terminated."
+
+
+# Test before_prompt event.
+gdb_py_test_multiple "define new user command" \
+    "define xxz" "End with a line saying just .end.." \
+    "set variable \$x = 72" "" \
+    "set variable \$y = 93" "" \
+    "end" ""
+
+gdb_py_test_multiple "add before_prompt listener" \
+    "python" "" \
+    "count = 0" "" \
+    "def listener():" "" \
+    "  global count" "" \
+    "  count = count + 1" "" \
+    "gdb.events.before_prompt.connect(listener)" "" \
+    "end" ""
+
+gdb_test_no_output "set variable \$x = 32" "do something"
+# Result is due to one emitted before "set var" and one emitted before
+# this command.
+gdb_test "python print(count)" 2 "check for before_prompt event"
+
+gdb_test_no_output "xxz" "run a canned sequence"
+gdb_test "python print(count)" 4 "check for before_prompt event"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.py ./gdb/testsuite/gdb.python/py-events.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-events.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events-shlib.c ./gdb/testsuite/gdb.python/py-events-shlib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-events-shlib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-events-shlib.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evsignal.exp ./gdb/testsuite/gdb.python/py-evsignal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evsignal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-evsignal.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,14 +31,14 @@ clean_restart $testfile
 
 if { [skip_python_tests] } { continue }
 
-gdb_test_no_output "python exec (open ('${pyfile}').read ())" ""
+gdb_test_no_output "source ${pyfile}" "load python file"
 
 gdb_test "test-events" "Event testers registered."
 gdb_test_no_output "set non-stop on"
 
 gdb_run_cmd
-gdb_test_multiple "" "Signal Thread 3"  {
-    -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n$gdb_prompt $" {
+gdb_test_multiple "" "signal Thread 3"  {
+    -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n.*$gdb_prompt $" {
         pass "thread 3 was signaled"
     }
     -re "The target does not support running in non-stop mode"  {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evthreads.c ./gdb/testsuite/gdb.python/py-evthreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evthreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-evthreads.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evthreads.exp ./gdb/testsuite/gdb.python/py-evthreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-evthreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-evthreads.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ clean_restart $testfile
 
 if { [skip_python_tests] } { continue }
 
-gdb_test_no_output "python exec (open ('${pyfile}').read ())" ""
+gdb_test_no_output "source ${pyfile}" "load python file"
 
 gdb_test "test-events" "Event testers registered."
 gdb_test_no_output "set non-stop on"
@@ -46,9 +46,9 @@ gdb_breakpoint "thread2"
 gdb_breakpoint "thread3"
 
 gdb_run_cmd
-set test "Run to breakpoint 1"
+set test "run to breakpoint 1"
 gdb_test_multiple "" $test {
-    -re "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 1\r\nbreakpoint number: 1\r\nthread num: 1\r\n$gdb_prompt $" {
+    -re "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 1\r\nbreakpoint number: 1\r\nthread num: 1\r\n.*$gdb_prompt $" {
         pass $test
     }
     -re "The target does not support running in non-stop mode" {
@@ -57,11 +57,11 @@ gdb_test_multiple "" $test {
     }
 }
 
-gdb_test "next" "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 2\r\nbreakpoint number: 2\r\nthread num: 2" "reached breakpoint 2"
+gdb_test "next" "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 2\r\nbreakpoint number: 2\r\nthread num: 2.*" "reached breakpoint 2"
 
 gdb_test "thread 2" {\[Switching to thread 2 .*}
 
-gdb_test "next" "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 3\r\nbreakpoint number: 3\r\nthread num: 3" "reached breakpoint 3"
+gdb_test "next" "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 3\r\nbreakpoint number: 3\r\nthread num: 3.*" "reached breakpoint 3"
 
 gdb_test "thread 3" {\[Switching to thread 3 .*}
 
@@ -75,7 +75,7 @@ gdb_test_multiple "continue&" $test {
 
 set test "thread 3 was signaled"
 gdb_test_multiple "" $test {
-    -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n$" {
+    -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n" {
         pass $test
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.c ./gdb/testsuite/gdb.python/py-explore.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-explore.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.cc ./gdb/testsuite/gdb.python/py-explore.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-explore.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore-cc.exp ./gdb/testsuite/gdb.python/py-explore-cc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore-cc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-explore-cc.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile py-explore.cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.exp ./gdb/testsuite/gdb.python/py-explore.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-explore.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-explore.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.cc ./gdb/testsuite/gdb.python/py-finish-breakpoint2.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint2.cc	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp ./gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint2.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -28,7 +28,7 @@ if {[prepare_for_testing $testfile.exp $
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.py ./gdb/testsuite/gdb.python/py-finish-breakpoint2.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint2.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint2.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.c ./gdb/testsuite/gdb.python/py-finish-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.exp ./gdb/testsuite/gdb.python/py-finish-breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # exposing values to Python.
 
 if {[skip_shlib_tests]} {
-	untested py-finish-breakpoint.exp
+	untested "skipping shared library tests"
     return 0
 }
 
@@ -37,7 +37,7 @@ if [get_compiler_info] {
 
 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
-    untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
@@ -49,7 +49,7 @@ if { [skip_python_tests] } { continue }
 if { $gdb_py_is_py24 == 1 } {
     # Python 2.4, 2.5 do not support the "ValueError as e" syntax used in
     # the py-finish-breakpoint.py script.
-	untested py-finish-breakpoint.exp
+	untested "missing support on Python 2.4 and 2.5"
     return 0
 }
 
@@ -61,10 +61,10 @@ if { [skip_python_tests] } { continue }
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
@@ -108,14 +108,14 @@ gdb_test "python MyFinishBreakpoint (Non
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
          "import python scripts"
 set cond_line [gdb_get_line_number "Condition Break."]
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
@@ -135,7 +135,7 @@ gdb_test "python print (finishBP.return_
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
          "import python scripts"
@@ -161,14 +161,14 @@ gdb_test "python print (finishbp.is_vali
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
          "import python scripts"
 
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
          
@@ -187,13 +187,13 @@ gdb_test "print i" "8" "check stopped lo
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
          "import python scripts"
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
@@ -214,13 +214,13 @@ gdb_test "print i" "8" "check stopped lo
 #
 
 clean_restart ${testfile}
-gdb_load_shlibs ${lib_sl}
+gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
          "import python scripts"
 
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
@@ -247,7 +247,7 @@ gdb_test "print increase(&i)" \
 #
 
 if ![runto "test_exec_exit"] then {
-    fail "Cannot run to test_exec_exit."
+    fail "cannot run to test_exec_exit."
     return 0
 }
 
@@ -260,7 +260,7 @@ gdb_test "continue" "SimpleFinishBreakpo
 #
 
 if ![runto "test_exec_exit"] then {
-    fail "Cannot run to test_exec_exit."
+    fail "cannot run to test_exec_exit."
     return 0
 }     
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.py ./gdb/testsuite/gdb.python/py-finish-breakpoint.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-finish-breakpoint.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-finish-breakpoint.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.c ./gdb/testsuite/gdb.python/py-frame-args.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame-args.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.exp ./gdb/testsuite/gdb.python/py-frame-args.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame-args.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -29,8 +29,7 @@ if ![runto_main] {
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "python exec (open ('[file tail ${remote_python_file}]').read ())"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 gdb_breakpoint [gdb_get_line_number "break-here"]
 gdb_continue_to_breakpoint "break-here" ".* break-here .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.py ./gdb/testsuite/gdb.python/py-frame-args.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-args.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame-args.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame.exp ./gdb/testsuite/gdb.python/py-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -30,7 +30,7 @@ if { [skip_python_tests] } { continue }
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.c ./gdb/testsuite/gdb.python/py-framefilter.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.exp ./gdb/testsuite/gdb.python/py-framefilter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,6 +33,10 @@ gdb_start
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
+gdb_test "info frame-filter" \
+    "No frame filters\\." \
+    "info frame filter before loading filters"
+
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
@@ -54,13 +58,12 @@ if ![runto_main] then {
     return
 }
 gdb_test_no_output "set python print-stack full" \
-    "Set python print-stack to full"
+    "set python print-stack to full"
 
 # Load global frame-filters
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "Load python file"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"]
 gdb_breakpoint [gdb_get_line_number "Inner test breakpoint"]
@@ -104,6 +107,9 @@ gdb_test "show frame-filter priority glo
 gdb_test "info frame-filter" \
     ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \
     "info frame filter after setting priority"
+gdb_test "set frame-filter priority global NoSuchFilter 900" \
+    "frame-filter 'NoSuchFilter' not found." \
+    "set priority of a non-existing filter"
 
 # Test enable/disable
 gdb_test "info frame-filter" \
@@ -119,6 +125,9 @@ gdb_test_no_output  "enable frame-filter
 gdb_test "info frame-filter" \
     ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \
     "info frame filter after reenabling frame filter"
+gdb_test "disable frame-filter global NoSuchFilter" \
+    "frame-filter 'NoSuchFilter' not found." \
+    "disable a non-existing filter"
 
 # Test no-filters
 gdb_test "bt no-filters" \
@@ -243,8 +252,8 @@ gdb_test_no_output "set python print-sta
 # Load global frame-filters
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "Load python file for no debuginfo tests"
+gdb_test_no_output "source ${remote_python_file}" \
+    "load python file for no debuginfo tests"
 
 # Disable Reverse
 gdb_test_no_output "disable frame-filter global Reverse" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in ./gdb/testsuite/gdb.python/py-framefilter-gdb.py.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-gdb.py.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp ./gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,12 +56,11 @@ if ![runto_main] then {
     return
 }
 gdb_test_no_output "set python print-stack full" \
-    "Set python print-stack to full"
+    "set python print-stack to full"
 
 # Load global frame-filters
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "Load python file"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 gdb_test "bt" " in niam \\(argc=<error reading variable: dwarf expression stack underflow>, argv=0x\[0-9a-f\]+\\) at py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in ./gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg.py ./gdb/testsuite/gdb.python/py-framefilter-invalidarg.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-invalidarg.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-invalidarg.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-mi.c ./gdb/testsuite/gdb.python/py-framefilter-mi.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-mi.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-mi.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-mi.exp ./gdb/testsuite/gdb.python/py-framefilter-mi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter-mi.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter-mi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ standard_testfile py-framefilter-mi.c
 set pyfile py-framefilter.py
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -46,8 +46,7 @@ mi_runto main
 
 set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
 
-mi_gdb_test "python exec (open ('${remote_python_file}').read ())" ".*\\^done." \
-    "Load python file"
+mi_gdb_test "source ${remote_python_file}" ".*\\^done." "load python file"
 
 # Multiple blocks test
 mi_continue_to_line [gdb_get_line_number {Inner test breakpoint} ${srcfile}] \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.py ./gdb/testsuite/gdb.python/py-framefilter.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-framefilter.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-framefilter.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -92,6 +92,12 @@ class ElidingFrameDecorator(FrameDecorat
     def elided(self):
         return iter(self.elided_frames)
 
+    def address (self):
+        # Regression test for an overflow in the python layer.
+        bitsize = 8 * gdb.lookup_type('void').pointer().sizeof
+        mask = (1 << bitsize) - 1
+        return 0xffffffffffffffff & mask
+
 class ElidingIterator:
     def __init__(self, ii):
         self.input_iterator = ii
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-inline.c ./gdb/testsuite/gdb.python/py-frame-inline.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-inline.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame-inline.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-inline.exp ./gdb/testsuite/gdb.python/py-frame-inline.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-frame-inline.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame-inline.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -25,7 +25,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_python_tests] } { continue }
 
 if ![runto main] then {
-    fail "Can't run to function f"
+    fail "can't run to function f"
     return 0
 }
 
@@ -51,3 +51,7 @@ gdb_test_no_output "set backtrace limit 
 gdb_continue_to_breakpoint "Block break here."
 
 gdb_test "python print (gdb.newest_frame())" ".*"
+
+# Regression test to verify that Frame.function works properly for
+# inline frames.
+gdb_test "python print (gdb.newest_frame().function())" "f"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-function.exp ./gdb/testsuite/gdb.python/py-function.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-function.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-function.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -103,6 +103,6 @@ gdb_py_test_multiple "input command-call
   "CallCommand ()" "" \
   "end" ""
 
-gdb_test_no_output "set var \$foo = \$call_command()" "Setting a value from a function which executes a command."
+gdb_test_no_output "set var \$foo = \$call_command()" "setting a value from a function which executes a command."
 # There was a bug where GDB would segfault in the second call, so try calling again.
-gdb_test_no_output "set var \$foo = \$call_command()" "Setting a value from a function which executes a command, again."
+gdb_test_no_output "set var \$foo = \$call_command()" "setting a value from a function which executes a command, again."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-inferior.exp ./gdb/testsuite/gdb.python/py-inferior.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-inferior.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-inferior.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ gdb_test_multiple "show endian" "getting
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -99,135 +99,152 @@ set one_pattern_found "${newline}.${dec_
 
 # Test string pattern.
 
-gdb_test "set *(int32_t*) &int8_search_buf\[10\] = 0x61616161" "" ""
-gdb_test "py search_buf = gdb.selected_frame ().read_var ('int8_search_buf')" "" ""
-gdb_test_no_output "py start_addr = search_buf.address"
-gdb_test_no_output "py length = search_buf.type.sizeof"
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, 'aaa'))" \
-  "${one_pattern_found}" "find string pattern"
-
-# Test not finding pattern because search range too small, with
-# potential find at the edge of the range.
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 10+3, 'aaaa'))" \
-  "${pattern_not_found}" "pattern not found at end of range"
-
-# Increase the search range by 1 and we should find the pattern.
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 10+3+1, 'aaa'))" \
-  "${one_pattern_found}" "pattern found at end of range"
+with_test_prefix "string" {
+    gdb_test "set *(int32_t*) &int8_search_buf\[10\] = 0x61616161"
+    gdb_test "py search_buf = gdb.selected_frame ().read_var ('int8_search_buf')"
+    gdb_test_no_output "py start_addr = search_buf.address"
+    gdb_test_no_output "py length = search_buf.type.sizeof"
+
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, 'aaa'))" \
+	"${one_pattern_found}" "find string pattern"
+
+    # Test not finding pattern because search range too small, with
+    # potential find at the edge of the range.
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 10+3, 'aaaa'))" \
+	"${pattern_not_found}" "pattern not found at end of range"
+
+    # Increase the search range by 1 and we should find the pattern.
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 10+3+1, 'aaa'))" \
+	"${one_pattern_found}" "pattern found at end of range"
+}
 
 # Import struct to pack the following patterns.
 gdb_test_no_output "py from struct import *"
 
 # Test 16-bit pattern.
 
-gdb_test_no_output "set int16_search_buf\[10\] = 0x1234"
-gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int16_search_buf')"
-gdb_test_no_output "py start_addr = search_buf.address"
-gdb_test_no_output "py length = search_buf.type.sizeof"
-gdb_test_no_output "py pattern = pack('${python_pack_char}H',0x1234)"
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
-  "${one_pattern_found}" "find 16-bit pattern, with value pattern"
+with_test_prefix "16-bit" {
+    gdb_test_no_output "set int16_search_buf\[10\] = 0x1234"
+    gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int16_search_buf')"
+    gdb_test_no_output "py start_addr = search_buf.address"
+    gdb_test_no_output "py length = search_buf.type.sizeof"
+    gdb_test_no_output "py pattern = pack('${python_pack_char}H',0x1234)"
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
+	"${one_pattern_found}" "find 16-bit pattern, with value pattern"
+}
 
 # Test 32-bit pattern.
 
-gdb_test_no_output "set int32_search_buf\[10\] = 0x12345678"
-gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int32_search_buf')"
-gdb_test_no_output "py start_addr = search_buf.address"
-gdb_test_no_output "py length = search_buf.type.sizeof"
-gdb_test_no_output "py pattern = pack('${python_pack_char}I',0x12345678)"
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
-  "${one_pattern_found}" "find 32-bit pattern, with python pattern"
+with_test_prefix "32-bit" {
+    gdb_test_no_output "set int32_search_buf\[10\] = 0x12345678"
+    gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int32_search_buf')"
+    gdb_test_no_output "py start_addr = search_buf.address"
+    gdb_test_no_output "py length = search_buf.type.sizeof"
+    gdb_test_no_output "py pattern = pack('${python_pack_char}I',0x12345678)"
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
+	"${one_pattern_found}" "find 32-bit pattern, with python pattern"
+}
 
 # Test 64-bit pattern.
 
-gdb_test_no_output "set int64_search_buf\[10\] = 0xfedcba9876543210LL"
-gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int64_search_buf')"
-gdb_test_no_output "py start_addr = search_buf.address"
-gdb_test_no_output "py length = search_buf.type.sizeof"
-gdb_test_no_output "py pattern = pack('${python_pack_char}Q', 0xfedcba9876543210)"
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
-  "${one_pattern_found}" "find 64-bit pattern, with value pattern"
+with_test_prefix "64-bit" {
+    gdb_test_no_output "set int64_search_buf\[10\] = 0xfedcba9876543210LL"
+    gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int64_search_buf')"
+    gdb_test_no_output "py start_addr = search_buf.address"
+    gdb_test_no_output "py length = search_buf.type.sizeof"
+    gdb_test_no_output "py pattern = pack('${python_pack_char}Q', 0xfedcba9876543210)"
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, length, pattern))" \
+	"${one_pattern_found}" "find 64-bit pattern, with value pattern"
+}
 
 # Test mixed-sized patterns.
 
-gdb_test_no_output "set *(int8_t*) &search_buf\[10\] = 0x62"
-gdb_test_no_output "set *(int16_t*) &search_buf\[11\] = 0x6363"
-gdb_test_no_output "set *(int32_t*) &search_buf\[13\] = 0x64646464"
-gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('search_buf')"
-gdb_test_no_output "py start_addr = search_buf\[0\].address"
-gdb_test_no_output "py pattern1 = pack('B', 0x62)"
-gdb_test_no_output "py pattern2 = pack('${python_pack_char}H', 0x6363)"
-gdb_test_no_output "py pattern3 = pack('${python_pack_char}I', 0x64646464)"
-
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern1))" \
-    "${one_pattern_found}" "find mixed-sized pattern"
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern2))" \
-    "${one_pattern_found}" "find mixed-sized pattern"
-gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern3))" \
-    "${one_pattern_found}" "find mixed-sized pattern"
+with_test_prefix "mixed-sized" {
+    gdb_test_no_output "set *(int8_t*) &search_buf\[10\] = 0x62"
+    gdb_test_no_output "set *(int16_t*) &search_buf\[11\] = 0x6363"
+    gdb_test_no_output "set *(int32_t*) &search_buf\[13\] = 0x64646464"
+    gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('search_buf')"
+    gdb_test_no_output "py start_addr = search_buf\[0\].address"
+    gdb_test_no_output "py pattern1 = pack('B', 0x62)"
+    gdb_test_no_output "py pattern2 = pack('${python_pack_char}H', 0x6363)"
+    gdb_test_no_output "py pattern3 = pack('${python_pack_char}I', 0x64646464)"
+
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern1))" \
+	"${one_pattern_found}" "find mixed-sized pattern 1"
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern2))" \
+	"${one_pattern_found}" "find mixed-sized pattern 2"
+    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern3))" \
+	"${one_pattern_found}" "find mixed-sized pattern 3"
+}
 
 # Test search spanning a large range, in the particular case of native
 # targets, test the search spanning multiple chunks.
 # Remote targets may implement the search differently.
 
 set CHUNK_SIZE 16000
+with_test_prefix "large range" {
+    gdb_test_no_output "set *(int32_t*) &search_buf\[0*${CHUNK_SIZE}+100\] = 0x12345678"
+    gdb_test_no_output "set *(int32_t*) &search_buf\[1*${CHUNK_SIZE}+100\] = 0x12345678"
+    gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
+    gdb_test_no_output "py end_addr = start_addr + gdb.selected_frame ().read_var ('search_buf_size')"
+    gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0x12345678)"
 
-gdb_test_no_output "set *(int32_t*) &search_buf\[0*${CHUNK_SIZE}+100\] = 0x12345678"
-gdb_test_no_output "set *(int32_t*) &search_buf\[1*${CHUNK_SIZE}+100\] = 0x12345678"
-gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
-gdb_test_no_output "py end_addr = start_addr + gdb.selected_frame ().read_var ('search_buf_size')"
-gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0x12345678)"
-gdb_test_no_output "py first = gdb.inferiors()\[0\].search_memory (start_addr,end_addr - start_addr, pattern)"
-gdb_test "py print (first)" "${one_pattern_found}" "search spanning large range 1st result"
-gdb_test_no_output "py start_addr = first + 1"
-gdb_test_no_output "py second = gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern)"
-gdb_test "py print (second)" "${one_pattern_found}" "search spanning large range 2nd result"
-gdb_test_no_output "py start_addr = second + 1"
-gdb_test_no_output "py third = gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern)"
-gdb_test "py print (third)" "${pattern_not_found}" "search spanning large range 3rd result"
+    gdb_test_no_output "py first = gdb.inferiors()\[0\].search_memory (start_addr,end_addr - start_addr, pattern)"
+    gdb_test "py print (first)" "${one_pattern_found}" "search spanning large range 1st result"
+    gdb_test_no_output "py start_addr = first + 1"
+    gdb_test_no_output "py second = gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern)"
+    gdb_test "py print (second)" "${one_pattern_found}" "search spanning large range 2nd result"
+    gdb_test_no_output "py start_addr = second + 1"
+    gdb_test_no_output "py third = gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern)"
+    gdb_test "py print (third)" "${pattern_not_found}" "search spanning large range 3rd result"
+}
 
 # For native targets, test a pattern straddling a chunk boundary.
 
 if [isnative] {
-    gdb_test_no_output "set *(int32_t*) &search_buf\[${CHUNK_SIZE}-1\] = 0xfdb97531"
-    gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0xfdb97531)"
-    gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
-    gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern))" \
-      "${one_pattern_found}" "find pattern straddling chunk boundary"
+    with_test_prefix "straddling" {
+	gdb_test_no_output "set *(int32_t*) &search_buf\[${CHUNK_SIZE}-1\] = 0xfdb97531"
+	gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0xfdb97531)"
+	gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
+	gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, end_addr - start_addr, pattern))" \
+	    "${one_pattern_found}" "find pattern straddling chunk boundary"
+    }
 }
 
 # Test Inferior is_valid.  This must always be the last test in
 # this testcase as it kills the inferior.
 
-gdb_py_test_silent_cmd "python inf_list = gdb.inferiors()" "get initial list" 1
-gdb_test "python print (len(inf_list))" "1" "Get inferior list length"
-gdb_test "python print (inf_list\[0\].is_valid())" "True" \
-         "Check inferior validity"
-gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
-gdb_py_test_silent_cmd "python inf_list = gdb.inferiors()" "get new list" 1
-gdb_test "python print (len(inf_list))" "2" "Get inferior list length"
-gdb_test "python print (inf_list\[0\].is_valid())" "True" \
-         "Check inferior validity"
-gdb_test "python print (inf_list\[1\].is_valid())" "True" \
-         "Check inferior validity"
-gdb_test_no_output "remove-inferiors 2" "remove-inferiors 3"
-gdb_test "python print (inf_list\[0\].is_valid())" "False" \
-         "Check inferior validity"
-gdb_test "python print (inf_list\[1\].is_valid())" "True" \
-         "Check inferior validity"
+with_test_prefix "is_valid" {
+    gdb_py_test_silent_cmd "python inf_list = gdb.inferiors()" "get initial list" 1
+    gdb_test "python print (len(inf_list))" "1" "get inferior list length 1"
+    gdb_test "python print (inf_list\[0\].is_valid())" "True" \
+	"check inferior validity 1"
+
+    gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
+    gdb_py_test_silent_cmd "python inf_list = gdb.inferiors()" "get new list" 1
+    gdb_test "python print (len(inf_list))" "2" "get inferior list length 2"
+    gdb_test "python print (inf_list\[0\].is_valid())" "True" \
+	"check inferior validity 2"
+
+    gdb_test "python print (inf_list\[1\].is_valid())" "True" \
+	"check inferior validity 3"
+
+    gdb_test_no_output "remove-inferiors 2" "remove-inferiors 3"
+    gdb_test "python print (inf_list\[0\].is_valid())" "True" \
+	"check inferior validity 4"
 
-# Test gdb.selected_inferior()
-gdb_test "inferior 1" ".*" "Switch to first inferior"
-gdb_test "py print (gdb.selected_inferior().num)" "1" "First inferior selected"
+    gdb_test "python print (inf_list\[1\].is_valid())" "False" \
+	"check inferior validity 5"
+}
 
-gdb_test "add-inferior" "Added inferior 3" "Create new inferior"
-gdb_test "inferior 3" ".*" "Switch to third inferior"
-gdb_test "py print (gdb.selected_inferior().num)" "3" "Third inferior selected"
-gdb_test "inferior 1" ".*" "Switch to first inferior"
-gdb_test_no_output "remove-inferiors 3" "Remove second inferior"
+# Test gdb.selected_inferior()
+with_test_prefix "selected_inferior" {
+    gdb_test "inferior 1" ".*" "switch to first inferior"
+    gdb_test "py print (gdb.selected_inferior().num)" "1" "first inferior selected"
+
+    gdb_test "add-inferior" "Added inferior 3" "create new inferior"
+    gdb_test "inferior 3" ".*" "switch to third inferior"
+    gdb_test "py print (gdb.selected_inferior().num)" "3" "third inferior selected"
+    gdb_test "inferior 1" ".*" "switch back to first inferior"
+    gdb_test_no_output "remove-inferiors 3" "remove second inferior"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-infthread.exp ./gdb/testsuite/gdb.python/py-infthread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-infthread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-infthread.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -33,7 +33,7 @@ if { [skip_python_tests] } { continue }
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -41,9 +41,13 @@ if ![runto_main] then {
 
 gdb_py_test_silent_cmd "python t0 = gdb.selected_thread ()" "test gdb.selected_thread" 1
 gdb_test "python print (t0)" "\\<gdb.InferiorThread object at 0x\[\[:xdigit:\]\]+>" "verify InferiorThread object"
-gdb_test "python print ('result = %s' % t0.num)" " = \[0-9\]+" "test Inferior.num"
+gdb_test "python print ('result = %s' % t0.num)" " = 1" "test InferiorThread.num"
+gdb_test "python print ('result = %s' % t0.global_num)" " = 1" "test InferiorThread.global_num"
 gdb_test "python print ('result = %s' % str (t0.ptid))" " = \\(\[0-9\]+, \[0-9\]+, \[0-9\]+\\)" "test InferiorThread.ptid"
 
+gdb_py_test_silent_cmd "python i0 = t0.inferior" "test InferiorThread.inferior" 1
+gdb_test "python print ('result = %s' % i0.num)" " = 1" "test Inferior.num"
+
 gdb_py_test_silent_cmd "python name = gdb.selected_thread().name" \
     "get supplied name of current thread" 1
 gdb_py_test_silent_cmd "python gdb.selected_thread().name = 'hibob'" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lazy-string.c ./gdb/testsuite/gdb.python/py-lazy-string.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lazy-string.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-lazy-string.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lazy-string.exp ./gdb/testsuite/gdb.python/py-lazy-string.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lazy-string.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-lazy-string.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -36,7 +36,7 @@ gdb_continue_to_breakpoint "break here"
 
 gdb_test_no_output "python null = gdb.parse_and_eval(\"null\")"
 
-gdb_test "python print null.lazy_string(length=0).value()" \
+gdb_test "python print(null.lazy_string(length=0).value())" \
     "gdb.MemoryError: Cannot create a value from NULL.*Error while executing Python code."
-gdb_test "python print null.lazy_string(length=3).value()" \
+gdb_test "python print(null.lazy_string(length=3).value())" \
     "gdb.MemoryError: Cannot create a lazy string with address 0x0, and a non-zero length.*Error while executing Python code."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.c ./gdb/testsuite/gdb.python/py-linetable.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-linetable.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.exp ./gdb/testsuite/gdb.python/py-linetable.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-linetable.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
@@ -62,7 +62,7 @@ gdb_py_test_silent_cmd "python fset = lt
     "Get all source lines into a frozen set" 0
 gdb_test "python print (sorted(fset))" \
     "\\\[20, 21, 22, 24, 25, 28, 29, 30, 32, 33, 37, 39, 40, 42, 44, 45, 46\\\].*" \
-    "Test frozen set contains line numbers"
+    "test frozen set contains line numbers"
 
 # Test gdb.Linetable.has_line ()
 gdb_test "python print(lt.has_line(20))" \
@@ -73,4 +73,4 @@ gdb_test "python print(lt.has_line(44))"
     "Test has_pcs at line 40"
 gdb_test "python print(lt.has_line(10))" \
     "False.*" \
-    "Test has_pcs at line 10"
+    "test has_pcs at line 10"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.S ./gdb/testsuite/gdb.python/py-linetable.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-linetable.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-linetable.S	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lookup-type.exp ./gdb/testsuite/gdb.python/py-lookup-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-lookup-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-lookup-type.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,8 +47,6 @@ test_lookup_type "fortran" "character"
 
 test_lookup_type "go" "int32"
 
-test_lookup_type "java" "byte"
-
 test_lookup_type "modula-2" "CARDINAL"
 
 test_lookup_type "opencl" "ushort"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events.c ./gdb/testsuite/gdb.python/py-mi-events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-events.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see  <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  int i = 0;
+  while (i < 10)
+    i++;
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events.exp ./gdb/testsuite/gdb.python/py-mi-events.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-events.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,87 @@
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests PR 19743.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi2"
+
+gdb_exit
+if [mi_gdb_start] {
+    continue
+}
+
+standard_testfile
+set pyfile ${testfile}-gdb.py
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+if { [mi_skip_python_tests] } { continue }
+
+set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
+
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_test "set auto-load safe-path ${remote_python_file}" \
+    {.*\^done} \
+    "set safe-path"
+
+if [is_remote host] {
+    set filename ${testfile}
+    remote_download host ${binfile} ${filename}
+} else {
+    set filename ${binfile}
+}
+
+mi_gdb_test "-file-exec-and-symbols ${filename}"  ".*\\^done" "file-exec-and-symbols operation"
+mi_run_to_main
+
+
+# register the python event handlers with test-events command
+mi_gdb_test "test-events" \
+    ".*~\"Event testers registered.*\\^done" \
+    "register events"
+
+
+set lineno [gdb_get_line_number "i++;"]
+
+# set a breakpoint into the for loop
+mi_gdb_test "break ${srcfile}:$lineno" \
+    ".*Breakpoint $decimal at 0x\[0-9a-fA-F\]+: file .*${srcfile}.*\\\.*\\^done" \
+    "set the breakpoint"
+
+
+# resume the program
+mi_execute_to "exec-continue" "breakpoint-hit" "main" "" ".*$srcfile" "$lineno" { "" "disp=\"keep\"" } "continue"
+
+
+# test the python event handlers execution. The following checks are performed:
+# - python continue handler is executed
+# - the continue handler prints "info breakpoints" output in console format
+# - breakpoint is hit and python stop handler is executed
+# - the stop handler prints "info breakpoints" output in console format
+
+mi_gdb_test "python print (stop_handler_str)" \
+".*stop_handler.*Num.*Type.*Disp.*Enb.*Address.*$decimal.*breakpoint.*keep.*y.* 0x\[0-9a-fA-F\]+.*${srcfile}.*" \
+"python stop handler ran"
+
+mi_gdb_test "python print (cont_handler_str)" \
+".*continue_handler.*Num.*Type.*Disp.*Enb.*Address.*$decimal.*breakpoint.*keep.*y.* 0x\[0-9a-fA-F\]+.*${srcfile}.*" \
+"python continue handler ran"
+
+mi_gdb_exit
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events-gdb.py ./gdb/testsuite/gdb.python/py-mi-events-gdb.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-events-gdb.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-events-gdb.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,52 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests python printing
+# to string from event handlers.
+
+
+import gdb
+
+stop_handler_str = ""
+cont_handler_str = ""
+
+def signal_stop_handler (event):
+    """Stop event handler"""
+    assert (isinstance (event, gdb.StopEvent))
+    global stop_handler_str
+    stop_handler_str = "stop_handler\n"
+    stop_handler_str += gdb.execute("info break", False, True)
+
+
+def continue_handler (event):
+    """Continue event handler"""
+    assert (isinstance (event, gdb.ContinueEvent))
+    global cont_handler_str
+    cont_handler_str = "continue_handler\n"
+    cont_handler_str += gdb.execute("info break", False, True)
+
+
+class test_events (gdb.Command):
+    """Test events."""
+
+    def __init__ (self):
+        gdb.Command.__init__ (self, "test-events", gdb.COMMAND_STACK)
+
+    def invoke (self, arg, from_tty):
+        gdb.events.stop.connect (signal_stop_handler)
+        gdb.events.cont.connect (continue_handler)
+        print ("Event testers registered.")
+
+test_events ()
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi.exp ./gdb/testsuite/gdb.python/py-mi.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ if [mi_gdb_start] {
 standard_testfile py-prettyprint.c
 set pyfile py-prettyprint.py
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -44,7 +44,7 @@ mi_runto main
 
 set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
 
-mi_gdb_test "python exec (open ('${remote_python_file}').read ())" ""
+mi_gdb_test "source ${remote_python_file}" "load python file"
 
 mi_continue_to_line [gdb_get_line_number {MI breakpoint here} ${srcfile}] \
   "step to breakpoint"
@@ -321,7 +321,7 @@ mi_gdb_test "-var-update c" \
 gdb_exit
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \
 	   executable {debug c++ additional_flags=-DMI}] != "" } {
-    untested "Couldn't compile ${srcfile} in c++ mode"
+    untested "failed to compile in C++ mode"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile.c ./gdb/testsuite/gdb.python/py-mi-objfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-objfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see  <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile.exp ./gdb/testsuite/gdb.python/py-mi-objfile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-objfile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,58 @@
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests exercises PR 18833.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi2"
+
+gdb_exit
+if [mi_gdb_start] {
+    continue
+}
+
+standard_testfile
+set pyfile ${testfile}-gdb.py
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+if { [mi_skip_python_tests] } { continue }
+
+# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
+# Care is taken to put it in the same directory as the binary so that
+# gdb will find it.
+set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
+
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_test "set auto-load safe-path ${remote_python_file}" \
+    {.*\^done} \
+    "set safe-path"
+
+if [is_remote host] {
+    set filename ${testfile}
+    remote_download host ${binfile} ${filename}
+} else {
+    set filename ${binfile}
+}
+
+# PR 18833.  This will cause an unpatched gdb to crash.
+mi_gdb_test "-file-exec-and-symbols ${filename}" \
+    ".*main \\(.*void\\).*\
+    return 0;.*\\^done" \
+    "file-exec-and-symbols operation"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py ./gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-mi-objfile-gdb.py	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,26 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.
+
+import gdb
+
+# PR 18833
+# We want to have two levels of redirection while MI is current_uiout.
+# This will create one for to_string=True and then another for the
+# parameter change notification.
+gdb.execute("set width 101", to_string=True)
+# And finally a command that will use the console stream without redirection
+gdb.execute("list main")
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile.c ./gdb/testsuite/gdb.python/py-objfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-objfile.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile.exp ./gdb/testsuite/gdb.python/py-objfile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-objfile.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -45,8 +45,10 @@ gdb_test "python print (objfile.filename
 gdb_test "python print (objfile.username)" "${testfile}" \
   "Get objfile user name"
 
+gdb_test_no_output "python dir(objfile)"
+
 gdb_test "python print (gdb.lookup_objfile (\"${testfile}\").filename)" \
-    "${testfile}"
+    "${testfile}" "print lookup_objfile filename"
 gdb_test "python print (gdb.lookup_objfile (\"junk\"))" \
     "Objfile not found\\.\r\n${python_error_text}"
 
@@ -56,7 +58,7 @@ if [string compare $binfile_build_id ""]
     gdb_test "python print (objfile.build_id)" "$binfile_build_id" \
     "Get objfile build id"
     gdb_test "python print (gdb.lookup_objfile (\"$binfile_build_id\", by_build_id=True).filename)" \
-	"${testfile}"
+	"${testfile}" "print lookup_objfile filename by build-id"
 } else {
     unsupported "build-id is not supported by the compiler"
 }
@@ -64,9 +66,11 @@ if [string compare $binfile_build_id ""]
 # Other lookup_objfile_by_build_id tests we can do, even if compiler doesn't
 # support them.
 gdb_test "python print (gdb.lookup_objfile (\"foo\", by_build_id=True))" \
-    "Not a valid build id\\.\r\n${python_error_text}"
+    "Not a valid build id\\.\r\n${python_error_text}" \
+    "print invalid file lookup_objfile by build-id"
 gdb_test "python print (gdb.lookup_objfile (\"1234abcdef\", by_build_id=True))" \
-    "Objfile not found\\.\r\n${python_error_text}"
+    "Objfile not found\\.\r\n${python_error_text}" \
+    "print invalid file lookup_objfile by build-id 2"
 
 gdb_test "python print (objfile.progspace)" "<gdb\.Progspace object at .*>" \
   "Get objfile program space"
@@ -95,12 +99,12 @@ gdb_test "python print(objfile.username)
 
 # Now build another copy of the testcase, this time without debug info.
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -131,7 +135,8 @@ gdb_test "p main" "= {int \\(\\)} $hex <
 # Separate debug files are not findable.
 if { [get_python_valueof "sep_objfile.build_id" "None"] != "None" } {
     gdb_test "python print (gdb.lookup_objfile (sep_objfile.build_id, by_build_id=True))" \
-	"Objfile not found\\.\r\n${python_error_text}"
+	"Objfile not found\\.\r\n${python_error_text}" \
+	"print lookup_objfile of separate debug file"
 }
 
 # An objfile that was a symlink to a differently named file is still
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script.c ./gdb/testsuite/gdb.python/py-objfile-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-objfile-script.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script.exp ./gdb/testsuite/gdb.python/py-objfile-script.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-objfile-script.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script-gdb.py ./gdb/testsuite/gdb.python/py-objfile-script-gdb.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-objfile-script-gdb.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-objfile-script-gdb.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-parameter.exp ./gdb/testsuite/gdb.python/py-parameter.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-parameter.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-parameter.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -57,14 +57,14 @@ gdb_py_test_multiple "Simple gdb boolean
    "test_param = TestParam ('print test-param')" ""\
    "end"
 
-gdb_test "python print (test_param.value)" "True" "Test parameter value"
-gdb_test "show print test-param" "The state of the Test Parameter is on.*" "Show parameter on"
-gdb_test "set print test-param off" "Test Parameter has been set to off" "Turn off parameter"
-gdb_test "show print test-param" "The state of the Test Parameter is off.*" "Show parameter off"
-gdb_test "python print (test_param.value)" "False" "Test parameter value"
-gdb_test "help show print test-param" "Show the state of the boolean test-param.*" "Test show help"
-gdb_test "help set print test-param" "Set the state of the boolean test-param.*" "Test set help"
-gdb_test "help set print" "set print test-param -- Set the state of the boolean test-param.*" "Test general help"
+gdb_test "python print (test_param.value)" "True" "test parameter value"
+gdb_test "show print test-param" "The state of the Test Parameter is on.*" "show parameter on"
+gdb_test "set print test-param off" "Test Parameter has been set to off" "turn off parameter"
+gdb_test "show print test-param" "The state of the Test Parameter is off.*" "show parameter off"
+gdb_test "python print (test_param.value)" "False" "test parameter value"
+gdb_test "help show print test-param" "Show the state of the boolean test-param.*" "test show help"
+gdb_test "help set print test-param" "Set the state of the boolean test-param.*" "test set help"
+gdb_test "help set print" "set print test-param -- Set the state of the boolean test-param.*" "test general help"
 
 
 # Test an enum parameter.
@@ -84,12 +84,12 @@ gdb_py_test_multiple "enum gdb parameter
    "test_enum_param = TestEnumParam ('print test-enum-param')" ""\
    "end"
 
-gdb_test "python print (test_enum_param.value)" "one" "Test enum parameter value"
-gdb_test "show print test-enum-param" "The state of the enum is one.*" "Show parameter is initial value"
-gdb_test "set print test-enum-param two" "The state of the enum has been set to two" "Set enum to two"
-gdb_test "show print test-enum-param" "The state of the enum is two.*" "Show parameter is new value"
-gdb_test "python print (test_enum_param.value)" "two" "Test enum parameter value"
-gdb_test "set print test-enum-param three" "Undefined item: \"three\".*" "Set invalid enum parameter" 
+gdb_test "python print (test_enum_param.value)" "one" "test enum parameter value"
+gdb_test "show print test-enum-param" "The state of the enum is one.*" "show parameter is initial value"
+gdb_test "set print test-enum-param two" "The state of the enum has been set to two" "set enum to two"
+gdb_test "show print test-enum-param" "The state of the enum is two.*" "show parameter is new value"
+gdb_test "python print (test_enum_param.value)" "two" "test enum parameter value"
+gdb_test "set print test-enum-param three" "Undefined item: \"three\".*" "set invalid enum parameter"
 
 # Test a file parameter.
 gdb_py_test_multiple "file gdb parameter" \
@@ -108,11 +108,11 @@ gdb_py_test_multiple "file gdb parameter
    "test_file_param = TestFileParam ('test-file-param')" ""\
    "end"
 
-gdb_test "python print (test_file_param.value)" "foo.txt" "Test file parameter value"
-gdb_test "show test-file-param" "The name of the file is foo.txt.*" "Show initial file value"
-gdb_test "set test-file-param bar.txt" "The name of the file has been changed to bar.txt" "Set new file parameter" 1
-gdb_test "show test-file-param" "The name of the file is bar.txt.*" "Show new file value"
-gdb_test "python print (test_file_param.value)" "bar.txt" "Test new file parameter value"
+gdb_test "python print (test_file_param.value)" "foo.txt" "test file parameter value"
+gdb_test "show test-file-param" "The name of the file is foo.txt.*" "show initial file value"
+gdb_test "set test-file-param bar.txt" "The name of the file has been changed to bar.txt" "set new file parameter" 1
+gdb_test "show test-file-param" "The name of the file is bar.txt.*" "show new file value"
+gdb_test "python print (test_file_param.value)" "bar.txt" "test new file parameter value"
 gdb_test "set test-file-param" "Argument required.*" 
 
 # Test a parameter that is not documented.
@@ -132,13 +132,13 @@ gdb_py_test_multiple "Simple gdb boolean
    "test_undoc_param = TestUndocParam ('print test-undoc-param')" ""\
    "end"
 
-gdb_test "show print test-undoc-param" "The state of the Test Parameter is on.*" "Show parameter on"
-gdb_test "set print test-undoc-param off" "Test Parameter has been set to off" "Turn off parameter"
-gdb_test "show print test-undoc-param" "The state of the Test Parameter is off.*" "Show parameter off"
-gdb_test "python print (test_undoc_param.value)" "False" "Test parameter value"
-gdb_test "help show print test-undoc-param" "This command is not documented.*" "Test show help"
-gdb_test "help set print test-undoc-param" "This command is not documented.*" "Test set help"
-gdb_test "help set print" "set print test-undoc-param -- This command is not documented.*" "Test general help"
+gdb_test "show print test-undoc-param" "The state of the Test Parameter is on.*" "show parameter on"
+gdb_test "set print test-undoc-param off" "Test Parameter has been set to off" "turn off parameter"
+gdb_test "show print test-undoc-param" "The state of the Test Parameter is off.*" "show parameter off"
+gdb_test "python print (test_undoc_param.value)" "False" "test parameter value"
+gdb_test "help show print test-undoc-param" "This command is not documented.*" "test show help"
+gdb_test "help set print test-undoc-param" "This command is not documented.*" "test set help"
+gdb_test "help set print" "set print test-undoc-param -- This command is not documented.*" "test general help"
 
 # Test a parameter that is not documented in any way..
 gdb_py_test_multiple "Simple gdb booleanparameter" \
@@ -150,13 +150,13 @@ gdb_py_test_multiple "Simple gdb boolean
    "test_nodoc_param = TestNodocParam ('print test-nodoc-param')" ""\
    "end"
 
-gdb_test "show print test-nodoc-param" "This command is not documented.*" "Show parameter on"
-gdb_test "set print test-nodoc-param off" "This command is not documented.*" "Turn off parameter"
-gdb_test "show print test-nodoc-param" "This command is not documented.*.*" "Show parameter off"
-gdb_test "python print (test_nodoc_param.value)" "False" "Test parameter value"
-gdb_test "help show print test-nodoc-param" "This command is not documented.*" "Test show help"
-gdb_test "help set print test-nodoc-param" "This command is not documented.*" "Test set help"
-gdb_test "help set print" "set print test-nodoc-param -- This command is not documented.*" "Test general help"
+gdb_test "show print test-nodoc-param" "This command is not documented.*" "show parameter on"
+gdb_test "set print test-nodoc-param off" "This command is not documented.*" "turn off parameter"
+gdb_test "show print test-nodoc-param" "This command is not documented.*.*" "show parameter off"
+gdb_test "python print (test_nodoc_param.value)" "False" "test parameter value"
+gdb_test "help show print test-nodoc-param" "This command is not documented.*" "test show help"
+gdb_test "help set print test-nodoc-param" "This command is not documented.*" "test set help"
+gdb_test "help set print" "set print test-nodoc-param -- This command is not documented.*" "test general help"
 
 # Test deprecated API. Do not use in your own implementations.
 gdb_py_test_multiple "Simple gdb booleanparameter" \
@@ -171,11 +171,11 @@ gdb_py_test_multiple "Simple gdb boolean
    "test_param = TestParam ('print test-param')" ""\
    "end"
 
-gdb_test "python print (test_param.value)" "True" "Test parameter value"
-gdb_test "show print test-param" "State of the Test Parameter on.*" "Show parameter on"
-gdb_test "set print test-param off" "Set the state of the Test Parameter.*" "Turn off parameter"
-gdb_test "show print test-param" "State of the Test Parameter off.*" "Show parameter off"
-gdb_test "python print (test_param.value)" "False" "Test parameter value"
-gdb_test "help show print test-param" "State of the Test Parameter.*" "Test show help"
-gdb_test "help set print test-param" "Set the state of the Test Parameter.*" "Test set help"
-gdb_test "help set print" "set print test-param -- Set the state of the Test Parameter.*" "Test general help"
+gdb_test "python print (test_param.value)" "True" "test parameter value"
+gdb_test "show print test-param" "State of the Test Parameter on.*" "show parameter on"
+gdb_test "set print test-param off" "Set the state of the Test Parameter.*" "turn off parameter"
+gdb_test "show print test-param" "State of the Test Parameter off.*" "show parameter off"
+gdb_test "python print (test_param.value)" "False" "test parameter value"
+gdb_test "help show print test-param" "State of the Test Parameter.*" "test show help"
+gdb_test "help set print test-param" "Set the state of the Test Parameter.*" "test set help"
+gdb_test "help set print" "set print test-param -- Set the state of the Test Parameter.*" "test general help"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.c ./gdb/testsuite/gdb.python/py-pp-integral.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-integral.c	2017-03-06 01:49:07.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.exp ./gdb/testsuite/gdb.python/py-pp-integral.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-integral.exp	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.py ./gdb/testsuite/gdb.python/py-pp-integral.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-integral.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-integral.py	2017-03-06 01:49:07.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.c ./gdb/testsuite/gdb.python/py-pp-maint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-maint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,12 +17,20 @@
 
 #include <string.h>
 
+
 enum flag_enum
   {
-    FLAG_1 = 1,
-    FLAG_2 = 2,
-    FLAG_3 = 4,
-    ALL = FLAG_1 | FLAG_2 | FLAG_3
+    /* Define the enumeration values in an unsorted manner to verify that we
+       effectively sort them by value.  */
+    FOO_MASK = 0x07,
+    FOO_1    = 0x01,
+    FOO_2    = 0x02,
+    FOO_3    = 0x04,
+
+    BAR_MASK = 0x70,
+    BAR_1    = 0x10,
+    BAR_2    = 0x20,
+    BAR_3    = 0x40,
   };
 
 enum flag_enum fval;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.exp ./gdb/testsuite/gdb.python/py-pp-maint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-maint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -33,7 +33,7 @@ if {[prepare_for_testing $testfile.exp $
 if { [skip_python_tests] } { continue }
 
 if ![runto_main ] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
@@ -43,7 +43,7 @@ gdb_test "continue" ".*Breakpoint.*"
 
 set python_file ${srcdir}/${subdir}/${testfile}.py
 
-gdb_test_no_output "python exec (open ('${python_file}').read ())" ""
+gdb_test_no_output "source ${python_file}" "load python file"
 
 gdb_test "info pretty-printer" \
     {.*function_lookup_test.*pp-test.*struct ss.*}
@@ -119,14 +119,23 @@ gdb_test "print flt" " = x=<42> y=<43>" 
 gdb_test "print ss" " = a=<a=<1> b=<$hex>> b=<a=<2> b=<$hex>>" \
     "print ss re-enabled"
 
-gdb_test "print (enum flag_enum) (FLAG_1)" \
-    " = 0x1 .FLAG_1." \
-    "print FLAG_1"
-
-gdb_test "print (enum flag_enum) (FLAG_1 | FLAG_3)" \
-    " = 0x5 .FLAG_1 | FLAG_3." \
-    "print FLAG_1 | FLAG_3"
-
-gdb_test "print (enum flag_enum) (4 + 8)" \
-    " = 0xc .FLAG_1 | <unknown: 0x8>." \
-    "print FLAG_1 | 8"
+gdb_test_exact "print (enum flag_enum) (FOO_1)" \
+    { = 0x1 [FOO_1]}
+
+gdb_test_exact "print (enum flag_enum) (BAR_3)" \
+    { = 0x40 [BAR_3]}
+
+gdb_test_exact "print (enum flag_enum) (BAR_2 | FOO_2)" \
+    { = 0x22 [FOO_2 | BAR_2]}
+
+gdb_test_exact "print (enum flag_enum) (FOO_1 | FOO_2 | FOO_3)" \
+    { = 0x7 [FOO_1 | FOO_2 | FOO_3]}
+
+gdb_test_exact "print (enum flag_enum) (FOO_MASK)" \
+    { = 0x7 [FOO_1 | FOO_2 | FOO_3]}
+
+gdb_test_exact "print (enum flag_enum) (FOO_MASK | (BAR_MASK & ~BAR_2))" \
+    { = 0x57 [FOO_1 | FOO_2 | FOO_3 | BAR_1 | BAR_3]}
+
+gdb_test_exact "print (enum flag_enum) (0x4 + 0x8)" \
+    { = 0xc [FOO_3 | <unknown: 0x8>]}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.py ./gdb/testsuite/gdb.python/py-pp-maint.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-maint.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-maint.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.c ./gdb/testsuite/gdb.python/py-pp-registration.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-registration.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.exp ./gdb/testsuite/gdb.python/py-pp-registration.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-registration.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -31,7 +31,7 @@ set remote_python_file [gdb_remote_downl
 			    ${srcdir}/${subdir}/${testfile}.py]
 
 if ![runto_main ] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
@@ -46,7 +46,7 @@ proc prepare_test { } {
 	return 0
     }
 
-    gdb_test_no_output "python exec (open ('${remote_python_file}').read ())"
+    gdb_test_no_output "source ${remote_python_file}" "read file"
 
     gdb_test_no_output "py progspace = gdb.current_progspace()"
     gdb_test_no_output "py my_pretty_printer1 = build_pretty_printer1()"
@@ -108,9 +108,13 @@ with_test_prefix "replace" {
     gdb_test "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer2, replace=False)" \
 	"RuntimeError: pretty-printer already registered: pp-test\r\nError while executing Python code."
 
-    test_printers "s1"
+    with_test_prefix "test printers 1" {
+	test_printers "s1"
+    }
 
     gdb_test_no_output "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer2, replace=True)"
 
-    test_printers "s2"
+    with_test_prefix "test printers 2" {
+	test_printers "s2"
+    }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.py ./gdb/testsuite/gdb.python/py-pp-registration.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-registration.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-registration.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.c ./gdb/testsuite/gdb.python/py-pp-re-notag.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-re-notag.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.exp ./gdb/testsuite/gdb.python/py-pp-re-notag.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-re-notag.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.py ./gdb/testsuite/gdb.python/py-pp-re-notag.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-pp-re-notag.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-pp-re-notag.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.c ./gdb/testsuite/gdb.python/py-prettyprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prettyprint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.exp ./gdb/testsuite/gdb.python/py-prettyprint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prettyprint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if { [skip_python_tests] } { continue }
 proc run_lang_tests {exefile lang} {
     global srcdir subdir srcfile testfile hex
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
-	untested "Couldn't compile ${srcfile} in $lang mode"
+	untested "failed to compile in $lang mode"
 	return -1
     }
 
@@ -56,8 +56,7 @@ proc run_lang_tests {exefile lang} {
     set remote_python_file [gdb_remote_download host \
 				${srcdir}/${subdir}/${testfile}.py]
 
-    gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-	"python exec (open ('[file tail ${remote_python_file}]').read ())"
+    gdb_test_no_output "source ${remote_python_file}" "load python file"
     
     gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>"
     gdb_test "print ssa\[1\]" " = a=< a=<5> b=<$hex>> b=< a=<6> b=<$hex>>"
@@ -114,8 +113,12 @@ proc run_lang_tests {exefile lang} {
     gdb_continue_to_end
 }
 
-run_lang_tests "${binfile}" "c"
-run_lang_tests "${binfile}-cxx" "c++"
+if { [run_lang_tests "${binfile}" "c"] == -1 } {
+    return
+}
+if { [run_lang_tests "${binfile}-cxx" "c++"] == -1 } {
+    return
+}
 
 # Run various other tests.
 
@@ -133,8 +136,7 @@ if ![runto_main ] then {
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "python exec (open ('[file tail ${remote_python_file}]').read ())"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 gdb_breakpoint [gdb_get_line_number "eval-break"]
 gdb_continue_to_breakpoint "eval-break" ".* eval-break .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.py ./gdb/testsuite/gdb.python/py-prettyprint.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prettyprint.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prettyprint.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-progspace.c ./gdb/testsuite/gdb.python/py-progspace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-progspace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-progspace.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-progspace.exp ./gdb/testsuite/gdb.python/py-progspace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-progspace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-progspace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,6 +37,8 @@ gdb_test "python print (gdb.current_prog
   "current progspace filename (None)"
 gdb_test "python print (gdb.progspaces())" "\\\[<gdb.Progspace object at $hex>\\\]"
 
+gdb_test_no_output "python dir(gdb.current_progspace())"
+
 gdb_load ${binfile}
 
 gdb_py_test_silent_cmd "python progspace = gdb.current_progspace()" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prompt.c ./gdb/testsuite/gdb.python/py-prompt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prompt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prompt.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prompt.exp ./gdb/testsuite/gdb.python/py-prompt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-prompt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prompt.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -80,7 +80,8 @@ if {![can_spawn_for_attach]} {
     return 0
 }
 
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
 
 set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""]
 set GDBFLAGS [concat $GDBFLAGS " -ex \"set editing on\""]
@@ -115,5 +116,5 @@ gdb_test "python print (\"'\" + str(p\[0
 gdb_exit
 
 set GDBFLAGS $saved_gdbflags
-exec kill -9 ${testpid}
+kill_wait_spawned_process $test_spawn_id
 return 0
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-btrace.c ./gdb/testsuite/gdb.python/py-record-btrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-btrace.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-record-btrace.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+function (int arg)
+{
+  return arg + 1;
+}
+
+void
+inner (void)
+{
+}
+
+void
+outer (void)
+{
+  inner ();
+}
+
+int
+main (void)
+{
+  int i, j;
+
+  for (i = 0, j = 0; i < 100; ++i)
+    j = function (j);
+
+  outer ();
+
+  return j;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-btrace.exp ./gdb/testsuite/gdb.python/py-record-btrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-btrace.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-record-btrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,146 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Skip this test if btrace is disabled.
+
+if { [skip_btrace_tests] } {
+    untested "skipping btrace tests"
+    return -1
+}
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
+
+# Skip this test if python is disabled.
+
+if { [skip_python_tests] } {
+    untested "skipping python tests"
+    return -1
+}
+
+if ![runto_main ] then {
+    fail "can't run to main"
+    return -1
+}
+
+with_test_prefix "no or double record" {
+    gdb_test "python print(gdb.current_recording())" "None"
+
+    gdb_test_no_output "python gdb.start_recording(\"btrace\")"
+    gdb_test "python gdb.start_recording(\"btrace\")" ".*gdb\.error: The process is already being recorded\..*"
+
+    gdb_test_no_output "python gdb.stop_recording()" "first"
+    gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record target is currently active\..*" "second"
+}
+
+with_test_prefix "preopened record btrace" {
+    gdb_test_no_output "record btrace"
+    gdb_test "python print(gdb.current_recording().method)" "btrace"
+    gdb_test "python print(gdb.current_recording().format)" "pt|bts"
+    gdb_test_no_output "python gdb.stop_recording()"
+}
+
+with_test_prefix "prepare record" {
+    gdb_test_no_output "python r = gdb.start_recording(\"btrace\")"
+    gdb_test "python print(len(r.ptid))" "3"
+    gdb_test "python print(r.method)" "btrace"
+    gdb_test "python print(r.format)" "pt|bts"
+    gdb_test "stepi 100" ".*"
+    gdb_test_no_output "python insn = r.instruction_history"
+    gdb_test_no_output "python call = r.function_call_history"
+    gdb_test_no_output "python i = insn\[0\]"
+    gdb_test_no_output "python c = call\[0\]"
+}
+
+with_test_prefix "replay begin" {
+    gdb_test "python print(r.replay_position)" "None"
+    gdb_test "python r.goto(r.begin)"
+    gdb_test "python print(r.replay_position.number)" "1"
+}
+
+with_test_prefix "replay end" {
+    gdb_test "python r.goto(r.end)"
+    gdb_test "python print(r.replay_position)" "None"
+}
+
+with_test_prefix "instruction " {
+    gdb_test "python print(i.number)" "1"
+    gdb_test "python print(i.error)" "None"
+    gdb_test "python print(i.sal)" "symbol and line for .*"
+    gdb_test "python print(i.pc)" "$decimal"
+    gdb_test "python print(i.data)" "<memory at $hex>"
+    gdb_test "python print(i.decoded)" ".*"
+    gdb_test "python print(i.size)" "$decimal"
+    gdb_test "python print(i.is_speculative)" "False"
+}
+
+with_test_prefix "function call" {
+    gdb_test "python print(c.number)" "1"
+    gdb_test "python print(c.symbol)" "main"
+    gdb_test "python print(c.level)" "$decimal"
+    gdb_test "python print(len(c.instructions))" "$decimal"
+    gdb_test "python print(c.up)" "None"
+    gdb_test "python print(c.prev_sibling)" "None"
+    gdb_test "python print(c == c.next_sibling.prev_sibling)" "True"
+}
+
+with_test_prefix "list" {
+    gdb_test "python print(len(insn))" "100"
+    gdb_test "python print(len(insn\[23:65\]))" "42"
+    gdb_test "python print(insn\[17:\]\[2\].number)" "20"
+    gdb_test "python print(i in insn)" "True"
+    gdb_test "python print(i in call)" "False"
+    gdb_test "python print(c in insn)" "False"
+    gdb_test "python print(c in call)" "True"
+    gdb_test "python print(insn.index(i))" "0"
+    gdb_test "python print(insn.count(i))" "1"
+}
+
+with_test_prefix "sublist" {
+    gdb_test_no_output "python s1 = insn\[3:72:5\]"
+    gdb_test_no_output "python s2 = s1\[2:13:3\]"
+    gdb_test_no_output "python s3 = s1\[13:2:-3\]"
+    gdb_test_no_output "python s4 = insn\[::-1\]"
+
+    gdb_test "python print(\[i.number for i in s1\])" "\\\[4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69\\\]"
+    gdb_test "python print(\[i.number for i in s2\])" "\\\[14, 29, 44, 59\\\]"
+    gdb_test "python print(\[i.number for i in s3\])" "\\\[69, 54, 39, 24\\\]"
+
+    gdb_test "python print(len(s1))" "14"
+    gdb_test "python print(len(s2))" "4"
+    gdb_test "python print(len(s3))" "4"
+    gdb_test "python print(len(s4))" "100"
+
+    gdb_test "python print(s4\[5\].number)" "95"
+    gdb_test "python print(s4\[-5\].number)" "5"
+    gdb_test "python print(s4\[100\].number)" ".*IndexError.*"
+    gdb_test "python print(s4\[-101\].number)" ".*IndexError.*"
+}
+
+with_test_prefix "level" {
+    gdb_test_no_output "python gdb.stop_recording()"
+    gdb_test "break inner" "Breakpoint.*"
+    gdb_test "continue" "Continuing\..*"
+    gdb_test_no_output "record btrace"
+    gdb_test "step" "outer ().*" "step one"
+    gdb_test "step" "main ().*" "step two"
+    gdb_test "python print(gdb.current_recording().function_call_history\[0\].level)" "1"
+    gdb_test "python print(gdb.current_recording().function_call_history\[1\].level)" "0"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-full.c ./gdb/testsuite/gdb.python/py-record-full.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-full.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-record-full.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+function (int arg)
+{
+  return arg + 1;
+}
+
+void
+inner (void)
+{
+}
+
+void
+outer (void)
+{
+  inner ();
+}
+
+int
+main (void)
+{
+  int i, j;
+
+  for (i = 0, j = 0; i < 100; ++i)
+    j = function (j);
+
+  outer ();
+
+  return j;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-full.exp ./gdb/testsuite/gdb.python/py-record-full.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-record-full.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-record-full.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,58 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Skip this test if target does not support recording.
+
+if { ![supports_process_record] } {
+    untested "skipping recording tests"
+    return -1
+}
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
+
+# Skip this test if python is disabled.
+
+if { [skip_python_tests] } {
+    untested "skipping python tests"
+    return -1
+}
+
+if ![runto_main ] then {
+    fail "can't run to main"
+    return -1
+}
+
+with_test_prefix "no or double record" {
+    gdb_test "python print(gdb.current_recording())" "None"
+
+    gdb_test_no_output "python gdb.start_recording(\"full\")"
+    gdb_test "python gdb.start_recording(\"full\")" ".*gdb\.error: The process is already being recorded\..*"
+
+    gdb_test_no_output "python gdb.stop_recording()" "first"
+    gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record target is currently active\..*" "second"
+}
+
+with_test_prefix "preopened record full" {
+    gdb_test_no_output "record full"
+    gdb_test "python print(gdb.current_recording().method)" "full"
+    gdb_test "python print(gdb.current_recording().format)" "full"
+    gdb_test_no_output "python gdb.stop_recording()"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.c ./gdb/testsuite/gdb.python/py-recurse-unwind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-recurse-unwind.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,46 @@
+/* This test program is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This is the test program loaded into GDB by the py-recurse-unwind test.  */
+
+void
+ccc (int arg)
+{
+}
+
+void
+bbb (int arg)
+{
+  ccc (789);
+}
+
+void
+aaa (int arg)
+{
+  bbb (456);
+}
+
+int
+main ()
+{
+  int i;
+
+  for (i = 0; i < 10; i++)
+    aaa (123);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.exp ./gdb/testsuite/gdb.python/py-recurse-unwind.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-recurse-unwind.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,90 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It is used to verify that
+# GDB does not recurse infinitely when calling gdb.parse_and_eval() in
+# the course of sniffing a frame in a Python unwinder.
+
+# The unwinder has been constructed so that, should recursion occur,
+# it will be detected in the unwinder so that we won't need to wait
+# for a timeout.
+
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
+    return -1
+}
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
+
+gdb_test "source ${pyfile}" "Python script imported" \
+         "import python scripts"
+
+# The following tests require execution.
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return 0
+}
+
+
+proc cont_and_backtrace { tst } {
+
+    with_test_prefix $tst {
+	gdb_breakpoint "ccc"
+
+	# We're testing different code paths within the unwinder's sniffer.
+	# Set the current path to be tested here.
+	gdb_test_no_output "python TestUnwinder.set_test(\"$tst\")" \
+			   "set code path within python unwinder to $tst"
+
+	# If the unwinder is active, the usage count will increment while
+	# running to the breakpoint.  Reset it prior to doing the backtrace.
+	gdb_test_no_output "python TestUnwinder.reset_count()" \
+			   "reset count"
+
+	gdb_continue_to_breakpoint "ccc"
+
+	# The python based unwinder should be called a number of times while
+	# generating the backtrace, but its sniffer always returns None.  So
+	# it doesn't really contribute to generating any of the frames below.
+	#
+	# But that's okay.  Our goal here is to make sure that GDB doesn't
+	# get hung up in potentially infinite recursion when invoking the
+	# Python-based unwinder.
+
+	gdb_test_sequence "bt"  "backtrace" {
+	    "\\r\\n#0 .* ccc \\(arg=789\\) at "
+	    "\\r\\n#1 .* bbb \\(arg=456\\) at "
+	    "\\r\\n#2 .* aaa \\(arg=123\\) at "
+	    "\\r\\n#3 .* main \\(.*\\) at"
+	}
+
+	# Test that the python-based unwinder / sniffer was actually called
+	# during generation of the backtrace.
+	gdb_test "python print(TestUnwinder.count > 0)" "True" \
+		 "python unwinder called"
+    }
+}
+
+cont_and_backtrace "check_undefined_symbol"
+cont_and_backtrace "check_user_reg_pc"
+cont_and_backtrace "check_pae_pc"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.py ./gdb/testsuite/gdb.python/py-recurse-unwind.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-recurse-unwind.py	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-recurse-unwind.py	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,87 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This unwinder never does any unwinding.  It'll (pretend to) "sniff"
+# the frame and ultimately return None, indicating that actual unwinding
+# should be performed by some other unwinder.
+# 
+# But, prior to returning None, it will attempt to obtain the value
+# associated with a symbol via a call to gdb.parse_and_eval().  In
+# the course of doing this evaluation, GDB will potentially access
+# some frames, leading to the possibility of a recursive invocation of
+# this unwinder.  If that should happen, code contained herein detects
+# that and prints a message which will cause some of the associated
+# tests to FAIL.
+
+import gdb
+from gdb.unwinder import Unwinder
+
+class TestUnwinder(Unwinder):
+
+    count = 0
+
+    @classmethod
+    def reset_count (cls):
+        cls.count = 0
+
+    @classmethod
+    def inc_count (cls):
+        cls.count += 1
+
+    test = 'check_undefined_symbol'
+
+    @classmethod
+    def set_test (cls, test) :
+       cls.test = test
+
+    def __init__(self):
+        Unwinder.__init__(self, "test unwinder")
+        self.recurse_level = 0
+
+    def __call__(self, pending_frame):
+
+        if self.recurse_level > 0:
+            gdb.write("TestUnwinder: Recursion detected - returning early.\n")
+            return None
+
+        self.recurse_level += 1
+        TestUnwinder.inc_count()
+
+        if TestUnwinder.test == 'check_user_reg_pc' :
+
+            pc = pending_frame.read_register('pc')
+            pc_as_int = int(pc.cast(gdb.lookup_type('int')))
+            # gdb.write("In unwinder: pc=%x\n" % pc_as_int)
+
+        elif TestUnwinder.test == 'check_pae_pc' :
+
+            pc = gdb.parse_and_eval('$pc')
+            pc_as_int = int(pc.cast(gdb.lookup_type('int')))
+            # gdb.write("In unwinder: pc=%x\n" % pc_as_int)
+
+        elif TestUnwinder.test == 'check_undefined_symbol' :
+
+            try:
+                val = gdb.parse_and_eval("undefined_symbol")
+
+            except Exception as arg:
+                pass
+
+        self.recurse_level -= 1
+
+        return None
+
+gdb.unwinder.register_unwinder(None, TestUnwinder(), True)
+gdb.write("Python script imported\n")
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.c ./gdb/testsuite/gdb.python/py-section-script.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-section-script.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,12 +21,12 @@
 /* Put the path to the pretty-printer script in .debug_gdb_scripts so
    gdb will automagically loaded it.
    Normally "MS" would appear here, as in
-   .pushsection ".debug_gdb_scripts", "MS",@progbits,1
+   .pushsection ".debug_gdb_scripts", "MS",%progbits,1
    but we remove it to test files appearing twice in the section.  */
 
 #define DEFINE_GDB_SCRIPT_FILE(script_name) \
   asm("\
-.pushsection \".debug_gdb_scripts\", \"S\",@progbits\n\
+.pushsection \".debug_gdb_scripts\", \"S\",%progbits\n\
 .byte " XSTRING (SECTION_SCRIPT_ID_PYTHON_FILE) "\n\
 .asciz \"" script_name "\"\n\
 .popsection\n\
@@ -43,12 +43,12 @@ DEFINE_GDB_SCRIPT_FILE (SCRIPT_FILE)
 /* Inlined scripts are harder to create in the same way as
    DEFINE_GDB_SCRIPT_FILE.  Keep things simple and just define it here.
    Normally "MS" would appear here, as in
-   .pushsection ".debug_gdb_scripts", "MS",@progbits,1
+   .pushsection ".debug_gdb_scripts", "MS",%progbits,1
    but we remove it to test scripts appearing twice in the section.  */
 
 #define DEFINE_GDB_SCRIPT_TEXT \
 asm( \
-".pushsection \".debug_gdb_scripts\", \"S\",@progbits\n" \
+".pushsection \".debug_gdb_scripts\", \"S\",%progbits\n" \
 ".byte " XSTRING (SECTION_SCRIPT_ID_PYTHON_TEXT) "\n" \
 ".ascii \"gdb.inlined-script\\n\"\n" \
 ".ascii \"class test_cmd (gdb.Command):\\n\"\n" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.exp ./gdb/testsuite/gdb.python/py-section-script.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-section-script.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.py ./gdb/testsuite/gdb.python/py-section-script.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-section-script.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-section-script.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared.c ./gdb/testsuite/gdb.python/py-shared.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-shared.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared.exp ./gdb/testsuite/gdb.python/py-shared.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-shared.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,20 +28,20 @@ set libsrc   ${libfile}.c
 set library  [standard_output_file ${libfile}.sl]
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != "" } {
-    untested "Could not compile shared library."
+    untested "failed to compile shared library"
     return -1
 }
 
 set exec_opts [list debug shlib=${library}]
 
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } {
-    untested "Could not compile $binfile."
+    untested "failed to compile"
     return -1
 }
 
 # Start with a fresh gdb.
 clean_restart $testfile
-gdb_load_shlibs ${library}
+gdb_load_shlib ${library}
 
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
@@ -49,7 +49,7 @@ if { [skip_python_tests] } { continue }
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -66,3 +66,7 @@ gdb_test "python print (gdb.solib_name(l
 gdb_test "p &main" "" "main address"
 gdb_py_test_silent_cmd "python main = gdb.history(0)" "Aquire main address" 1
 gdb_test "python print (gdb.solib_name(long(main)))" "None" "test main solib location"
+
+if {[is_lp64_target]} {
+    gdb_test "python print (len(\[gdb.solib_name(0xffffffffffffffff)\]))" "1"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared-sl.c ./gdb/testsuite/gdb.python/py-shared-sl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-shared-sl.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-shared-sl.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-strfns.c ./gdb/testsuite/gdb.python/py-strfns.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-strfns.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-strfns.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-strfns.exp ./gdb/testsuite/gdb.python/py-strfns.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-strfns.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-strfns.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symbol.c ./gdb/testsuite/gdb.python/py-symbol.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symbol.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-symbol.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symbol.exp ./gdb/testsuite/gdb.python/py-symbol.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symbol.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-symbol.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -31,8 +31,8 @@ if { [skip_python_tests] } { continue }
 # point where we don't have a current frame, and we don't want to
 # require one.
 gdb_py_test_silent_cmd "python main_func = gdb.lookup_global_symbol(\"main\")" "Lookup main" 1
-gdb_test "python print (main_func.is_function)" "True" "Test main_func.is_function"
-gdb_test "python print (gdb.lookup_global_symbol(\"junk\"))" "None" "Test lookup_global_symbol(\"junk\")"
+gdb_test "python print (main_func.is_function)" "True" "test main_func.is_function"
+gdb_test "python print (gdb.lookup_global_symbol(\"junk\"))" "None" "test lookup_global_symbol(\"junk\")"
 
 gdb_test "python print (gdb.lookup_global_symbol('main').value())" "$hex .main." \
     "print value of main"
@@ -50,7 +50,7 @@ gdb_test "python print (gdb.lookup_globa
 
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -63,23 +63,23 @@ gdb_py_test_silent_cmd "python block = f
 
 # Test is_argument attribute.
 gdb_py_test_silent_cmd "python arg = gdb.lookup_symbol(\"arg\")" "Get variable arg" 0
-gdb_test "python print (arg\[0\].is_variable)" "False" "Test arg.is_variable"
-gdb_test "python print (arg\[0\].is_constant)" "False" "Test arg.is_constant"
-gdb_test "python print (arg\[0\].is_argument)" "True" "Test arg.is_argument"
-gdb_test "python print (arg\[0\].is_function)" "False" "Test arg.is_function"
+gdb_test "python print (arg\[0\].is_variable)" "False" "test arg.is_variable"
+gdb_test "python print (arg\[0\].is_constant)" "False" "test arg.is_constant"
+gdb_test "python print (arg\[0\].is_argument)" "True" "test arg.is_argument"
+gdb_test "python print (arg\[0\].is_function)" "False" "test arg.is_function"
 
 # Test is_function attribute.
 gdb_py_test_silent_cmd "python func = block.function" "Get block function" 0
-gdb_test "python print (func.is_variable)" "False" "Test func.is_variable"
-gdb_test "python print (func.is_constant)" "False" "Test func.is_constant"
-gdb_test "python print (func.is_argument)" "False" "Test func.is_argument"
-gdb_test "python print (func.is_function)" "True" "Test func.is_function"
+gdb_test "python print (func.is_variable)" "False" "test func.is_variable"
+gdb_test "python print (func.is_constant)" "False" "test func.is_constant"
+gdb_test "python print (func.is_argument)" "False" "test func.is_argument"
+gdb_test "python print (func.is_function)" "True" "test func.is_function"
 
 # Test attributes of func.
-gdb_test "python print (func.name)" "func" "Test func.name"
-gdb_test "python print (func.print_name)" "func" "Test func.print_name"
-gdb_test "python print (func.linkage_name)" "func" "Test func.linkage_name"
-gdb_test "python print (func.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "Test func.addr_class"
+gdb_test "python print (func.name)" "func" "test func.name"
+gdb_test "python print (func.print_name)" "func" "test func.print_name"
+gdb_test "python print (func.linkage_name)" "func" "test func.linkage_name"
+gdb_test "python print (func.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "test func.addr_class"
 
 gdb_breakpoint [gdb_get_line_number "Break at end."]
 gdb_continue_to_breakpoint "Break at end for variable a" ".*Break at end.*"
@@ -87,13 +87,13 @@ gdb_py_test_silent_cmd "python frame = g
 
 # Test is_variable attribute.
 gdb_py_test_silent_cmd "python a = gdb.lookup_symbol(\'a\')" "Get variable a" 0
-gdb_test "python print (a\[0\].is_variable)" "True" "Test a.is_variable"
-gdb_test "python print (a\[0\].is_constant)" "False" "Test a.is_constant"
-gdb_test "python print (a\[0\].is_argument)" "False" "Test a.is_argument"
-gdb_test "python print (a\[0\].is_function)" "False" "Test a.is_function"
+gdb_test "python print (a\[0\].is_variable)" "True" "test a.is_variable"
+gdb_test "python print (a\[0\].is_constant)" "False" "test a.is_constant"
+gdb_test "python print (a\[0\].is_argument)" "False" "test a.is_argument"
+gdb_test "python print (a\[0\].is_function)" "False" "test a.is_function"
 
 # Test attributes of a.
-gdb_test "python print (a\[0\].addr_class == gdb.SYMBOL_LOC_COMPUTED)" "True" "Test a.addr_class"
+gdb_test "python print (a\[0\].addr_class == gdb.SYMBOL_LOC_COMPUTED)" "True" "test a.addr_class"
 
 gdb_test "python print (a\[0\].value())" \
     "symbol requires a frame to compute its value.*"\
@@ -105,16 +105,16 @@ gdb_test "python print (a\[0\].needs_fra
 
 # Test is_constant attribute
 gdb_py_test_silent_cmd "python t = gdb.lookup_symbol(\"one\")" "Get constant t" 0
-gdb_test "python print (t\[0\].is_variable)" "False" "Test t.is_variable"
-gdb_test "python print (t\[0\].is_constant)" "True" "Test t.is_constant"
-gdb_test "python print (t\[0\].is_argument)" "False" "Test t.is_argument"
-gdb_test "python print (t\[0\].is_function)" "False" "Test t.is_function"
+gdb_test "python print (t\[0\].is_variable)" "False" "test t.is_variable"
+gdb_test "python print (t\[0\].is_constant)" "True" "test t.is_constant"
+gdb_test "python print (t\[0\].is_argument)" "False" "test t.is_argument"
+gdb_test "python print (t\[0\].is_function)" "False" "test t.is_function"
 
 # Test attributes of t.
-gdb_test "python print (t\[0\].addr_class == gdb.SYMBOL_LOC_CONST)" "True" "Test t.addr_class"
+gdb_test "python print (t\[0\].addr_class == gdb.SYMBOL_LOC_CONST)" "True" "test t.addr_class"
 
 # Test type attribute.
-gdb_test "python print (t\[0\].type)" "enum tag" "Get type"
+gdb_test "python print (t\[0\].type)" "enum tag" "get type"
 
 # Test symtab attribute.
 if { [is_remote host] } {
@@ -122,12 +122,12 @@ if { [is_remote host] } {
 } else {
     set py_symbol_c [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
 }
-gdb_test "python print (t\[0\].symtab)" "${py_symbol_c}" "Get symtab"
+gdb_test "python print (t\[0\].symtab)" "${py_symbol_c}" "get symtab"
 
 # C++ tests
 # Recompile binary.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" executable "debug c++"] != "" } {
-    untested "Couldn't compile ${srcfile} in c++ mode"
+    untested "failed to compile in C++ mode"
     return -1
 }
 
@@ -138,7 +138,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}-cxx
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -157,25 +157,25 @@ gdb_test "python print (cplusfunc.is_arg
 gdb_test "python print (cplusfunc.is_function)" \
     "True" "Test cplusfunc.is_function"
 
-gdb_test "python print (cplusfunc.name)" "SimpleClass::valueofi().*" "Test method.name"
-gdb_test "python print (cplusfunc.print_name)" "SimpleClass::valueofi().*" "Test method.print_name"
-gdb_test "python print (cplusfunc.linkage_name)" "SimpleClass::valueofi().*" "Test method.linkage_name"
-gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "Test method.addr_class"
+gdb_test "python print (cplusfunc.name)" "SimpleClass::valueofi().*" "test method.name"
+gdb_test "python print (cplusfunc.print_name)" "SimpleClass::valueofi().*" "test method.print_name"
+gdb_test "python print (cplusfunc.linkage_name)" "SimpleClass::valueofi().*" "test method.linkage_name"
+gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "test method.addr_class"
 
 # Test is_valid when the objfile is unloaded.  This must be the last
 # test as it unloads the object file in GDB.
 # Start with a fresh gdb.
 clean_restart ${testfile}
 if ![runto_main] then {
-    fail "Cannot run to main."
+    fail "cannot run to main."
     return 0
 }
 
 gdb_breakpoint [gdb_get_line_number "Break at end."]
 gdb_continue_to_breakpoint "Break at end for symbol validity" ".*Break at end.*"
 gdb_py_test_silent_cmd "python a = gdb.lookup_symbol(\'a\')" "Get variable a" 0
-gdb_test "python print (a\[0\].is_valid())" "True" "Test symbol validity"
+gdb_test "python print (a\[0\].is_valid())" "True" "test symbol validity"
 delete_breakpoints
 gdb_unload
-gdb_test "python print (a\[0\].is_valid())" "False" "Test symbol non-validity"
-gdb_test_no_output "python a = None" "Test symbol destructor"
+gdb_test "python print (a\[0\].is_valid())" "False" "test symbol non-validity"
+gdb_test_no_output "python a = None" "test symbol destructor"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symtab.exp ./gdb/testsuite/gdb.python/py-symtab.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-symtab.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-symtab.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile py-symbol.c
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -28,7 +28,7 @@ if {[prepare_for_testing $testfile.exp $
 if { [skip_python_tests] } { continue }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -58,29 +58,29 @@ if { [is_remote host] } {
     set full_py_symbol_c [string_to_regexp testsuite/${subdir}/${srcfile}]
 }
 
-gdb_test "python print (sal.symtab)" ".*${py_symbol_c}" "Test symtab"
-gdb_test "python print (sal.pc)" "${decimal}" "Test sal.pc"
-gdb_test "python print (sal.last == (new_pc - 1))" "True" "Test sal.last"
-gdb_test "python print (sal.line)" "$line_no" "Test sal.line"
-gdb_test "python print (sal.is_valid())" "True" "Test sal.is_valid"
+gdb_test "python print (sal.symtab)" ".*${py_symbol_c}" "test symtab"
+gdb_test "python print (sal.pc)" "${decimal}" "test sal.pc"
+gdb_test "python print (sal.last == (new_pc - 1))" "True" "test sal.last"
+gdb_test "python print (sal.line)" "$line_no" "test sal.line"
+gdb_test "python print (sal.is_valid())" "True" "test sal.is_valid"
 
 # Test symbol table.
-gdb_test "python print (symtab.filename)" ".*${py_symbol_c}" "Test symtab.filename"
-gdb_test "python print (symtab.objfile)" "<gdb.Objfile object at ${hex}>" "Test symtab.objfile"
-gdb_test "python print (symtab.fullname())" ".*${full_py_symbol_c}" "Test symtab.fullname"
-gdb_test "python print (symtab.is_valid())" "True" "Test symtab.is_valid()"
-gdb_test "python print (\"qq\" in global_symbols)" "True" "Test qq in global symbols"
-gdb_test "python print (\"func\" in global_symbols)" "True" "Test func in global symbols"
-gdb_test "python print (\"main\" in global_symbols)" "True" "Test main in global symbols"
-gdb_test "python print (\"int\" in static_symbols)" "True" "Test int in static symbols"
-gdb_test "python print (\"char\" in static_symbols)" "True" "Test char in static symbols"
-gdb_test "python print (\"simple_struct\" in static_symbols)" "True" "Test simple_struct in static symbols"
+gdb_test "python print (symtab.filename)" ".*${py_symbol_c}" "test symtab.filename"
+gdb_test "python print (symtab.objfile)" "<gdb.Objfile object at ${hex}>" "test symtab.objfile"
+gdb_test "python print (symtab.fullname())" ".*${full_py_symbol_c}" "test symtab.fullname"
+gdb_test "python print (symtab.is_valid())" "True" "test symtab.is_valid()"
+gdb_test "python print (\"qq\" in global_symbols)" "True" "test qq in global symbols"
+gdb_test "python print (\"func\" in global_symbols)" "True" "test func in global symbols"
+gdb_test "python print (\"main\" in global_symbols)" "True" "test main in global symbols"
+gdb_test "python print (\"int\" in static_symbols)" "True" "test int in static symbols"
+gdb_test "python print (\"char\" in static_symbols)" "True" "test char in static symbols"
+gdb_test "python print (\"simple_struct\" in static_symbols)" "True" "test simple_struct in static symbols"
 
 # Test is_valid when the objfile is unloaded.  This must be the last
 # test as it unloads the object file in GDB.
 gdb_unload
-gdb_test "python print (sal.is_valid())" "False" "Test sal.is_valid"
-gdb_test "python print (symtab.is_valid())" "False" "Test symtab.is_valid()"
+gdb_test "python print (sal.is_valid())" "False" "test sal.is_valid"
+gdb_test "python print (symtab.is_valid())" "False" "test symtab.is_valid()"
 
-gdb_test_no_output "python sal = None" "Test sal destructor"
-gdb_test_no_output "python symtab = None" "Test symtab destructor"
+gdb_test_no_output "python sal = None" "test sal destructor"
+gdb_test_no_output "python symtab = None" "test symtab destructor"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-sync-interp.c ./gdb/testsuite/gdb.python/py-sync-interp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-sync-interp.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-sync-interp.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-sync-interp.exp ./gdb/testsuite/gdb.python/py-sync-interp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-sync-interp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-sync-interp.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,11 +36,12 @@ gdb_reinitialize_dir $srcdir/$subdir
 if { [skip_python_tests] } { continue }
 gdb_exit
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
 
 # Test command 'where' is executed when command 'attach' is done, otherwise
 # function 'sleep' may not show up in backtrace.
@@ -48,3 +49,5 @@ set testpid [spawn_wait_for_attach $binf
 gdb_test "python gdb.execute(\"attach $testpid\"); gdb.execute(\"where\")" \
     "in .*sleep \\(.*\\) .* in foo1 \\(\\) at .* in foo2 \\(\\) at .*" \
     "attach and where"
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-template.cc ./gdb/testsuite/gdb.python/py-template.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-template.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-template.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-template.exp ./gdb/testsuite/gdb.python/py-template.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-template.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-template.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if { [skip_cplus_tests] } { continue }
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
 	  {debug c++}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python-1.c ./gdb/testsuite/gdb.python/python-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python-1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/python-1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python.c ./gdb/testsuite/gdb.python/python.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/python.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python.exp ./gdb/testsuite/gdb.python/python.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/python.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/python.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -96,6 +96,19 @@ gdb_test "source $remote_source2_py" "ye
 
 gdb_test "source -s source2.py" "yes" "source -s source2.py"
 
+set remote_source2_symlink_notpy \
+    [gdb_remote_download host ${srcdir}/${subdir}/source2.py \
+	 [standard_output_file "source2-symlink.notpy"]]
+set remote_source2_symlink_py [standard_output_file "source2-symlink.py"]
+remote_file host delete $remote_source2_symlink_py
+set status [remote_exec host "ln -sf $remote_source2_symlink_notpy $remote_source2_symlink_py"]
+set test "source -s source2-symlink.py"
+if {[lindex $status 0] == 0} {
+    gdb_test "source -s $remote_source2_symlink_py" "yes" $test
+} else {
+    unsupported "$test (host does not support symbolic links)"
+}
+
 gdb_test "python print (gdb.current_objfile())" "None"
 gdb_test "python print (gdb.objfiles())" "\\\[\\\]"
 
@@ -118,7 +131,7 @@ gdb_py_test_multiple "post event inserti
   "end" ""
 
 gdb_test "python print (someVal)" "1" "test post event execution"
-gdb_test "python gdb.post_event(str(1))" "RuntimeError: Posted event is not callable.*" "Test non callable class"
+gdb_test "python gdb.post_event(str(1))" "RuntimeError: Posted event is not callable.*" "test non callable class"
 
 # Test (no) pagination of the executed command.
 gdb_test "show height" {Number of lines gdb thinks are in a page is unlimited\.}
@@ -164,7 +177,7 @@ gdb_test "python print (a)" ".*aliases -
 # Test PR 12212, using InfThread.selected_thread() when no inferior is
 # loaded.
 gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to aquire thread with no inferior" 1
-gdb_test "python print (nothread == None)" "True" "Ensure that no threads are returned"
+gdb_test "python print (nothread == None)" "True" "ensure that no threads are returned"
 
 gdb_py_test_multiple "register atexit function" \
     "python" "" \
@@ -190,7 +203,7 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -202,49 +215,70 @@ gdb_test "python gdb.decode_line(\"main.
     "gdb.error: No source file named main.c.*" "test decode_line no source named main"
 
 gdb_py_test_silent_cmd "python symtab = gdb.decode_line()" "test decode_line current location" 1
-gdb_test "python print (len(symtab))" "2" "Test decode_line current location"
-gdb_test "python print (symtab\[0\])" "None" "Test decode_line expression parse"
-gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line current location"
+gdb_test "python print (len(symtab))" "2" "test decode_line current location"
+gdb_test "python print (symtab\[0\])" "None" "test decode_line expression parse"
+gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line current location"
 
 if { [is_remote host] } {
     set python_c [string_to_regexp "python.c"]
 } else {
     set python_c [string_to_regexp "gdb.python/python.c"]
 }
-gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "Test decode_line current location filename"
-gdb_test "python print (symtab\[1\]\[0\].line)" "$lineno" "Test decode_line current location line number"
+gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "test decode_line current location filename"
+gdb_test "python print (symtab\[1\]\[0\].line)" "$lineno" "test decode_line current location line number"
 
 gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"python.c:26 if foo\")" "test decode_line python.c:26" 1
-gdb_test "python print (len(symtab))" "2" "Test decode_line python.c:26 length"
-gdb_test "python print (symtab\[0\])" "if foo" "Test decode_line expression parse"
-gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line python.c:26 length"
-gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "Test decode_line python.c:26 filename"
-gdb_test "python print (symtab\[1\]\[0\].line)" "26" "Test decode_line python.c:26 line number"
+gdb_test "python print (len(symtab))" "2" "test decode_line python.c:26 length"
+gdb_test "python print (symtab\[0\])" "if foo" "test decode_line expression parse"
+gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line python.c:26 length"
+gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "test decode_line python.c:26 filename"
+gdb_test "python print (symtab\[1\]\[0\].line)" "26" "test decode_line python.c:26 line number"
 
 gdb_test "python gdb.decode_line(\"randomfunc\")" \
     "gdb.error: Function \"randomfunc\" not defined.*" "test decode_line randomfunc"
 gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"func1\")" "test decode_line func1()" 1
-gdb_test "python print (len(symtab))" "2" "Test decode_line func1 length"
-gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line func1 length"
+gdb_test "python print (len(symtab))" "2" "test decode_line func1 length"
+gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line func1 length"
 
 if { [is_remote host] } {
     set python_1_c [string_to_regexp "python-1.c"]
 } else {
     set python_1_c [string_to_regexp "gdb.python/python-1.c"]
 }
-gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_1_c}" "Test decode_line func1 filename"
-gdb_test "python print (symtab\[1\]\[0\].line)" "19" "Test decode_line func1 line number"
+gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_1_c}" "test decode_line func1 filename"
+
+# Set a default value for func1_lineno in case we fail to fetch the line number
+# below.
+set func1_lineno "noline"
+
+# Fetch the line GDB thinks func1 starts at.  This may change depending
+# on the architecture and on how GDB handles the prologue of the function.
+gdb_test_multiple "info line func1" "info line func1" {
+    -re "Line ($decimal) of .* starts at address $hex <func1> and ends at $hex <func1\\+$decimal>\.\[\r\n\]+$gdb_prompt $" {
+	# Fetch the line number.
+	set func1_lineno $expect_out(1,string)
+    }
+}
+
+gdb_test "python print (symtab\[1\]\[0\].line)" "$func1_lineno" "test decode_line func1 line number"
 gdb_py_test_silent_cmd {python symtab = gdb.decode_line ("func1,func2")} \
     "test decode_line func1,func2" 1
 gdb_test {python print (symtab[0])} ",func2" "stop at comma in linespec"
 
+gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"*0\")" "Test decode_line *0" 1
+gdb_test "python print (len(symtab))" "2" "test decode_line *0 result length"
+gdb_test "python print (symtab\[0\])" "None" "test decode_line *0 unparsed"
+gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line *0 locations length"
+gdb_test "python print (symtab\[1\]\[0\].symtab)" "None" "test decode_line *0 filename"
+gdb_test "python print (symtab\[1\]\[0\].pc)" "0" "test decode_line *0 pc"
+
 # gdb.write
-gdb_test "python print (sys.stderr)" ".*gdb.GdbOutputErrorFile (instance|object) at.*" "Test stderr location"
-gdb_test "python print (sys.stdout)" ".*gdb.GdbOutputFile (instance|object) at.*" "Test stdout location"
-gdb_test "python gdb.write(\"Foo\\n\")" "Foo" "Test default write"
-gdb_test "python gdb.write(\"Error stream\\n\", stream=gdb.STDERR)" "Error stream" "Test stderr write"
-gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "Test stdout write"
-gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "Test stdlog write"
+gdb_test "python print (sys.stderr)" ".*gdb.GdbOutputErrorFile (instance|object) at.*" "test stderr location"
+gdb_test "python print (sys.stdout)" ".*gdb.GdbOutputFile (instance|object) at.*" "test stdout location"
+gdb_test "python gdb.write(\"Foo\\n\")" "Foo" "test default write"
+gdb_test "python gdb.write(\"Error stream\\n\", stream=gdb.STDERR)" "Error stream" "test stderr write"
+gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "test stdout write"
+gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "test stdlog write"
 
 # Turn on full stack printing for subsequent tests.
 gdb_py_test_silent_cmd "set python print-stack full" \
@@ -302,9 +336,9 @@ gdb_test_multiple "set prompt blah " "se
     }
 }
 
-gdb_test_multiple "python gdb.prompt_hook = None" "Delete hook" {
+gdb_test_multiple "python gdb.prompt_hook = None" "delete hook" {
     -re "\[\r\n\]$newprompt2 $" {
-	pass "Delete old hook"
+	pass "delete old hook"
     }
 }
 
@@ -371,7 +405,7 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -388,7 +422,7 @@ gdb_py_test_silent_cmd "set python print
     "Test print-stack set setting to none" 1
 gdb_test "show python print-stack" \
     "The mode of Python stack printing on error is \"none\".*" \
-    "Test print-stack show setting to none"
+    "test print-stack show setting to none"
 
 gdb_py_test_silent_cmd "set python print-stack message" \
     "Test print-stack set setting to message" 1
@@ -427,16 +461,16 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
 runto [gdb_get_line_number "Break at func2 call site."]
 
 gdb_py_test_silent_cmd "python line = gdb.selected_frame().find_sal().line" "Get line number of func2 call site" 1
-gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line == line)" "True" "Test find_pc_line at func2 call site"
+gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line == line)" "True" "test find_pc_line at func2 call site"
 
 gdb_py_test_silent_cmd "step" "Step into func2" 1
 gdb_py_test_silent_cmd "up" "Step out of func2" 1
 
-gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line > line)" "True" "Test find_pc_line with resume address"
+gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line > line)" "True" "test find_pc_line with resume address"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-type.c ./gdb/testsuite/gdb.python/py-type.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-type.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-type.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,6 +35,24 @@ struct C
 {
   int c;
   int d;
+
+  int
+  a_method (int x, char y)
+    {
+      return x + y;
+    }
+
+  int
+  a_const_method (int x, char y) const
+    {
+      return x + y;
+    }
+
+  static int
+  a_static_method (int x, char y)
+    {
+      return x + y;
+    }
 };
 
 struct D : C
@@ -59,6 +77,12 @@ enum E
 struct s vec_data_1 = {1, 1};
 struct s vec_data_2 = {1, 2};
 
+static int
+a_function (int x, char y)
+{
+  return x + y;
+}
+
 int
 main ()
 {
@@ -72,15 +96,21 @@ main ()
   D d;
   d.e = 3;
   d.f = 4;
+
+  c.a_method (0, 1);
+  c.a_const_method (0, 1);
+  C::a_static_method (0, 1);
 #endif
   enum E e;
-  
+
   st.a = 3;
   st.b = 5;
 
   e = v2;
 
   ss.x = 100;
-  
+
+  a_function (0, 1);
+
   return 0;      /* break to inspect struct and array.  */
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-type.exp ./gdb/testsuite/gdb.python/py-type.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-type.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-type.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,9 +29,11 @@ proc build_inferior {exefile lang} {
   global srcdir subdir srcfile testfile hex
 
   if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
-      untested "Couldn't compile ${srcfile} in $lang mode"
+      untested "failed to compile in $lang mode"
       return -1
   }
+
+  return 0
 }
 
 # Restart GDB.
@@ -68,28 +70,43 @@ proc test_fields {lang} {
       gdb_py_test_silent_cmd "print (c)" "print value (c)" 1
       gdb_py_test_silent_cmd "python c = gdb.history (0)" "get value (c) from history" 1
       gdb_py_test_silent_cmd "python fields = c.type.fields()" "get fields from c.type" 1
-      gdb_test "python print (len(fields))" "2" "Check number of fields (c)"
-      gdb_test "python print (fields\[0\].name)" "c" "Check class field c name"
-      gdb_test "python print (fields\[1\].name)" "d" "Check class field d name"
+      gdb_test "python print (len(fields))" "2" "check number of fields (c)"
+      gdb_test "python print (fields\[0\].name)" "c" "check class field c name"
+      gdb_test "python print (fields\[1\].name)" "d" "check class field d name"
 
       gdb_test "python print (c.type == gdb.parse_and_eval('d').type)" "False"
       gdb_test "python print (c.type == gdb.parse_and_eval('d').type.fields()\[0\].type)" \
 	  "True"
+
+      # Test fields of a method (its parameters)
+      gdb_test "python print (len (gdb.parse_and_eval ('C::a_method').type.fields ()))" "3"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_method').type.fields ()\[0\].type)" "C \\* const"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_method').type.fields ()\[1\].type)" "int"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_method').type.fields ()\[2\].type)" "char"
+
+      gdb_test "python print (len (gdb.parse_and_eval ('C::a_const_method').type.fields ()))" "3"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_const_method').type.fields ()\[0\].type)" "const C \\* const"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_const_method').type.fields ()\[1\].type)" "int"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_const_method').type.fields ()\[2\].type)" "char"
+
+      gdb_test "python print (len (gdb.parse_and_eval ('C::a_static_method').type.fields ()))" "2"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_static_method').type.fields ()\[0\].type)" "int"
+      gdb_test "python print (gdb.parse_and_eval ('C::a_static_method').type.fields ()\[1\].type)" "char"
     }
 
     # Test normal fields usage in structs.
     gdb_py_test_silent_cmd "print (st)" "print value (st)" 1
     gdb_py_test_silent_cmd "python st = gdb.history (0)" "get value (st) from history" 1
     gdb_py_test_silent_cmd "python fields = st.type.fields()" "get fields from st.type" 1
-    gdb_test "python print (len(fields))" "2" "Check number of fields (st)"
-    gdb_test "python print (fields\[0\].name)" "a" "Check structure field a name"
-    gdb_test "python print (fields\[1\].name)" "b" "Check structure field b name"
+    gdb_test "python print (len(fields))" "2" "check number of fields (st)"
+    gdb_test "python print (fields\[0\].name)" "a" "check structure field a name"
+    gdb_test "python print (fields\[1\].name)" "b" "check structure field b name"
 
     # Test that unamed fields have 'None' for name.
     gdb_py_test_silent_cmd "python ss = gdb.parse_and_eval('ss')" "init ss" 1
     gdb_py_test_silent_cmd "python ss_fields = ss.type.fields()" \
       "get fields from ss.type" 1
-    gdb_test "python print(len(ss_fields))" "2" "Check length of ss_fields"
+    gdb_test "python print(len(ss_fields))" "2" "check length of ss_fields"
     gdb_test "python print(ss_fields\[0\].name is None)" "True" \
       "Check ss_fields\[0\].name"
     gdb_test "python print(ss_fields\[1\].name is None)" "True" \
@@ -100,19 +117,19 @@ proc test_fields {lang} {
       "Check that dir includes name"
 
     # Test Python mapping behavior of gdb.Type for structs/classes
-    gdb_test "python print (len(st.type))" "2" "Check number of fields (st.type)"
-    gdb_test "python print (st.type\['a'\].name)" "a" "Check fields lookup by name"
+    gdb_test "python print (len(st.type))" "2" "check number of fields (st.type)"
+    gdb_test "python print (st.type\['a'\].name)" "a" "check fields lookup by name"
     gdb_test "python print (\[v.bitpos for v in st.type.itervalues()\])" {\[0L?, 32L?\]} "Check fields iteration over values"
     gdb_test "python print (\[(n, v.bitpos) for (n, v) in st.type.items()\])" {\[\('a', 0L?\), \('b', 32L?\)\]} "Check fields items list"
-    gdb_test "python print ('a' in st.type)" "True" "Check field name exists test"
-    gdb_test "python print ('nosuch' in st.type)" "False" "Check field name nonexists test"
-    gdb_test "python print (not not st.type)" "True" "Check conversion to bool"
+    gdb_test "python print ('a' in st.type)" "True" "check field name exists test"
+    gdb_test "python print ('nosuch' in st.type)" "False" "check field name nonexists test"
+    gdb_test "python print (not not st.type)" "True" "check conversion to bool"
 
     # Test rejection of mapping operations on scalar types
-    gdb_test "python print (len (st.type\['a'\].type))" "TypeError: Type is not a structure, union, or enum type.*"
-    gdb_test "python print (st.type\['a'\].type.has_key ('x'))" "TypeError: Type is not a structure, union, or enum type.*"
-    gdb_test "python print (st.type\['a'\].type.keys ())" "TypeError: Type is not a structure, union, or enum type.*"
-    gdb_test "python print (st.type\['a'\].type\['x'\])" "TypeError: Type is not a structure, union, or enum type.*"
+    gdb_test "python print (len (st.type\['a'\].type))" "TypeError: Type is not a structure, union, enum, or function type.*"
+    gdb_test "python print (st.type\['a'\].type.has_key ('x'))" "TypeError: Type is not a structure, union, enum, or function type.*"
+    gdb_test "python print (st.type\['a'\].type\['x'\])" "TypeError: Type is not a structure, union, enum, or function type.*"
+    gdb_test "python print (st.type\['a'\].type.keys ())" "TypeError: Type is not a structure, union, enum, or function type.*"
 
     # Test conversion to bool on scalar types
     gdb_test "python print (not not st.type\['a'\].type)" "True"
@@ -121,8 +138,8 @@ proc test_fields {lang} {
     gdb_py_test_silent_cmd "print (ar)" "print value (ar)" 1
     gdb_py_test_silent_cmd "python ar = gdb.history (0)" "get value (ar) from history" 1
     gdb_test "python fields = ar.type.fields()"
-    gdb_test "python print (len(fields))" "1" "Check the number of fields"
-    gdb_test "python print (fields\[0\].type)" "<range type>" "Check array field type"
+    gdb_test "python print (len(fields))" "1" "check the number of fields"
+    gdb_test "python print (fields\[0\].type)" "<range type>" "check array field type"
 
     # Test gdb.Type.array.
     gdb_test "python print (ar\[0\].cast(ar\[0\].type.array(1)))" \
@@ -148,6 +165,11 @@ proc test_fields {lang} {
     gdb_test "python print (vec1 == vec2)" "True"
     gdb_py_test_silent_cmd "python vec3 = vec_data_2.cast(ar\[0\].type.vector(1))" "set vec3" 1
     gdb_test "python print (vec1 == vec3)" "False"
+
+    # Test fields of a function (its parameters)
+    gdb_test "python print (len (gdb.parse_and_eval ('a_function').type.fields ()))" "2"
+    gdb_test "python print (gdb.parse_and_eval ('a_function').type.fields ()\[0\].type)" "int"
+    gdb_test "python print (gdb.parse_and_eval ('a_function').type.fields ()\[1\].type)" "char"
   }
 }
 
@@ -156,14 +178,14 @@ proc test_enums {} {
     gdb_py_test_silent_cmd "print (e)" "print value (e)" 1
     gdb_py_test_silent_cmd "python (e) = gdb.history (0)" "get value (e) from history" 1
     gdb_py_test_silent_cmd "python fields = e.type.fields()" "extract type fields from e" 1
-    gdb_test "python print (len(fields))" "3" "Check the number of enum fields"
-    gdb_test "python print (fields\[0\].name)" "v1" "Check enum field\[0\] name"
-    gdb_test "python print (fields\[1\].name)" "v2" "Check enum field\[1\]name"
+    gdb_test "python print (len(fields))" "3" "check the number of enum fields"
+    gdb_test "python print (fields\[0\].name)" "v1" "check enum field\[0\] name"
+    gdb_test "python print (fields\[1\].name)" "v2" "check enum field\[1\]name"
 
     # Ditto but by mapping operations
-    gdb_test "python print (len(e.type))" "3" "Check the number of type fields"
-    gdb_test "python print (e.type\['v1'\].name)" "v1" "Check enum field lookup by name (v1)"
-    gdb_test "python print (e.type\['v3'\].name)" "v3" "Check enum field lookup by name (v3)"
+    gdb_test "python print (len(e.type))" "3" "check the number of type fields"
+    gdb_test "python print (e.type\['v1'\].name)" "v1" "check enum field lookup by name (v1)"
+    gdb_test "python print (e.type\['v3'\].name)" "v3" "check enum field lookup by name (v3)"
     gdb_test "python print (\[v.enumval for v in e.type.itervalues()\])" {\[0L?, 1L?, 2L?\]} "Check num fields iteration over values"
     gdb_test "python print (\[(n, v.enumval) for (n, v) in e.type.items()\])" {\[\('v1', 0L?\), \('v2', 1L?\), \('v3', 2L?\)\]} "Check enum fields items list"
   }
@@ -174,9 +196,9 @@ proc test_base_class {} {
     gdb_py_test_silent_cmd "print (d)" "print value (d)" 1
     gdb_py_test_silent_cmd "python d = gdb.history (0)" "get value (d) from history" 1
     gdb_py_test_silent_cmd "python fields = d.type.fields()" "extract type fields from d" 1
-    gdb_test "python print (len(fields))" "3" "Check the number of fields"
-    gdb_test "python print (fields\[0\].is_base_class)" "True" "Check base class (fields\[0\])"
-    gdb_test "python print (fields\[1\].is_base_class)" "False" "Check base class (fields\[1\])"
+    gdb_test "python print (len(fields))" "3" "check the number of fields"
+    gdb_test "python print (fields\[0\].is_base_class)" "True" "check base class (fields\[0\])"
+    gdb_test "python print (fields\[1\].is_base_class)" "False" "check base class (fields\[1\])"
   }
 }
 
@@ -186,9 +208,9 @@ proc test_range {} {
       # Test a valid range request.
       gdb_py_test_silent_cmd "print (ar)" "print value (ar)" 1
       gdb_py_test_silent_cmd "python ar = gdb.history (0)" "get value (ar) from history" 1
-      gdb_test "python print (len(ar.type.range()))" "2" "Check correct tuple length"
-      gdb_test "python print (ar.type.range()\[0\])" "0" "Check range low bound"
-      gdb_test "python print (ar.type.range()\[1\])" "1" "Check range high bound"
+      gdb_test "python print (len(ar.type.range()))" "2" "check correct tuple length"
+      gdb_test "python print (ar.type.range()\[0\])" "0" "check range low bound"
+      gdb_test "python print (ar.type.range()\[1\])" "1" "check range high bound"
     }
 
     with_test_prefix "on ranged type" {
@@ -196,15 +218,15 @@ proc test_range {} {
       gdb_py_test_silent_cmd "print (ar)" "print value (ar)" 1
       gdb_py_test_silent_cmd "python ar = gdb.history (0)" "get value (ar) from history" 1
       gdb_py_test_silent_cmd "python fields = ar.type.fields()" "get fields" 1
-      gdb_test "python print (fields\[0\].type.range()\[0\])" "0" "Check range low bound"
-      gdb_test "python print (fields\[0\].type.range()\[1\])" "1" "Check range high bound"
+      gdb_test "python print (fields\[0\].type.range()\[0\])" "0" "check range low bound"
+      gdb_test "python print (fields\[0\].type.range()\[1\])" "1" "check range high bound"
     }
 
     with_test_prefix "on unranged value" {
       # Test where a range does not exist.
       gdb_py_test_silent_cmd "print (st)" "print value (st)" 1
       gdb_py_test_silent_cmd "python st = gdb.history (0)" "get value (st) from history" 1
-      gdb_test "python print (st.type.range())" "RuntimeError: This type does not have a range.*" "Check range for non ranged type."
+      gdb_test "python print (st.type.range())" "RuntimeError: This type does not have a range.*" "check range for non ranged type."
     }
   }
 }
@@ -241,35 +263,38 @@ proc test_template {} {
 }
 
 # Perform C Tests.
-build_inferior "${binfile}" "c"
-restart_gdb "${binfile}"
+if { [build_inferior "${binfile}" "c"] == 0 } {
+  restart_gdb "${binfile}"
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+  # Skip all tests if Python scripting is not enabled.
+  if { [skip_python_tests] } { continue }
 
-gdb_test "python print(gdb.lookup_type('char').array(1, 0))" \
-    "char \\\[0\\\]"
+  gdb_test "python print(gdb.lookup_type('char').array(1, 0))" \
+      "char \\\[0\\\]"
 
-gdb_test "python print(gdb.lookup_type('char').array(1, -1))" \
-    "Array length must not be negative.*"
+  gdb_test "python print(gdb.lookup_type('char').array(1, -1))" \
+      "Array length must not be negative.*"
 
-gdb_test "python print(gdb.lookup_type('int').optimized_out())" \
-    "<optimized out>"
+  gdb_test "python print(gdb.lookup_type('int').optimized_out())" \
+      "<optimized out>"
 
-with_test_prefix "lang_c" {
-    runto_bp "break to inspect struct and array."
-    test_fields "c"
-    test_enums
+  with_test_prefix "lang_c" {
+      runto_bp "break to inspect struct and array."
+      test_fields "c"
+      test_enums
+  }
 }
 
+
 # Perform C++ Tests.
-build_inferior "${binfile}-cxx" "c++"
-restart_gdb "${binfile}-cxx"
-with_test_prefix "lang_cpp" {
-    runto_bp "break to inspect struct and array."
-    test_fields "c++"
-    test_base_class
-    test_range
-    test_template
-    test_enums
+if { [build_inferior "${binfile}-cxx" "c++"] == 0 } {
+  restart_gdb "${binfile}-cxx"
+  with_test_prefix "lang_cpp" {
+      runto_bp "break to inspect struct and array."
+      test_fields "c++"
+      test_base_class
+      test_range
+      test_template
+      test_enums
+  }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.cc ./gdb/testsuite/gdb.python/py-typeprint.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-typeprint.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.exp ./gdb/testsuite/gdb.python/py-typeprint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-typeprint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib cp-support.exp
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -29,8 +29,7 @@ if { [skip_python_tests] } { continue }
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
-gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
-    "python exec (open ('[file tail ${remote_python_file}]').read ())"
+gdb_test_no_output "source ${remote_python_file}" "load python file"
 
 cp_test_ptype_class s "basic test" "class" "templ<string>" {
     { field public "T x;" }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.py ./gdb/testsuite/gdb.python/py-typeprint.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-typeprint.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-typeprint.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.c ./gdb/testsuite/gdb.python/py-unwind.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.exp ./gdb/testsuite/gdb.python/py-unwind.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -28,12 +28,12 @@ if { [prepare_for_testing ${testfile}.ex
 if { [skip_python_tests] } { continue }
 
 # This test runs on a specific platform.
-if { ! [istarget x86_64-*]} { continue }
+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
 
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.c ./gdb/testsuite/gdb.python/py-unwind-maint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind-maint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.exp ./gdb/testsuite/gdb.python/py-unwind-maint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind-maint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ load_lib gdb-python.exp
 
 standard_testfile
 
-if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
@@ -30,11 +30,18 @@ if { [skip_python_tests] } { continue }
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 
 if ![runto_main ] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
-gdb_test "source ${pyfile}" "Python script imported" "import python scripts"
+gdb_test "source ${pyfile}" "Python script imported" \
+    "import python scripts"
+
+gdb_test_sequence "frame" "All unwinders enabled" {
+    "py_unwind_maint_ps_unwinder called"
+    "global_unwinder called"
+    "#0  main"
+}
 
 gdb_test_sequence "info unwinder" "Show all unwinders" {
     "Global:"
@@ -50,7 +57,9 @@ gdb_test_sequence "continue" "Unwinders 
     "global_unwinder called"
 }
 
-gdb_test "disable unwinder global .*" "1 unwinder disabled" "Unwinder disabled"
+gdb_test_sequence "disable unwinder global .*" "Unwinder disabled" {
+    "1 unwinder disabled"
+}
 
 gdb_test_sequence "info unwinder" "Show with global unwinder disabled" {
     "Global:"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.py ./gdb/testsuite/gdb.python/py-unwind-maint.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind-maint.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind-maint.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.py ./gdb/testsuite/gdb.python/py-unwind.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-unwind.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-unwind.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value.c ./gdb/testsuite/gdb.python/py-value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-value.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -82,7 +82,7 @@ char **save_argv;
 int
 main (int argc, char *argv[])
 {
-  char *cp = argv[0]; /* Prevent gcc from optimizing argv[] out.  */
+  char *cp;
   struct s s;
   union u u;
   PTR x = &s;
@@ -99,6 +99,14 @@ main (int argc, char *argv[])
   const char *sn = 0;
   struct str *xstr;
 
+  /* Prevent gcc from optimizing argv[] out.  */
+
+  /* We also check for a NULL argv in case we are dealing with a target
+     executing in a freestanding environment, therefore there are no
+     guarantees about argc or argv.  */
+  if (argv != NULL)
+    cp = argv[0];
+
   s.a = 3;
   s.b = 5;
   u.a = 7;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value-cc.cc ./gdb/testsuite/gdb.python/py-value-cc.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value-cc.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-value-cc.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value-cc.exp ./gdb/testsuite/gdb.python/py-value-cc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value-cc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-value-cc.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value.exp ./gdb/testsuite/gdb.python/py-value.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-value.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-value.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ proc build_inferior {exefile lang} {
 
   if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object "debug $lang"] != ""
        || [gdb_compile "${objfile}" "${exefile}" executable "debug $lang"] != "" } {
-      untested "Couldn't compile ${srcfile} in $lang mode"
+      untested "failed to compile in $lang mode"
       return -1
   }
   return 0
@@ -54,10 +54,19 @@ proc test_value_creation {} {
   if { $gdb_py_is_py3k == 0 } {
     gdb_py_test_silent_cmd "python i = gdb.Value (5L)" "create long value" 1
   }
+
+  gdb_py_test_silent_cmd "python l = gdb.Value(0xffffffff12345678)" "create large unsigned 64-bit value" 1
+  if { $gdb_py_is_py3k == 0 } {
+    gdb_test "python print long(l)" "18446744069720004216" "large unsigned 64-bit int conversion to python"
+  } else {
+    gdb_test "python print (int(l))" "18446744069720004216" "large unsigned 64-bit int conversion to python"
+  }
+
   gdb_py_test_silent_cmd "python f = gdb.Value (1.25)" "create double value" 1
   gdb_py_test_silent_cmd "python a = gdb.Value ('string test')" "create 8-bit string value" 1
   gdb_test "python print (a)" "\"string test\"" "print 8-bit string"
   gdb_test "python print (a.__class__)" "<(type|class) 'gdb.Value'>" "verify type of 8-bit string"
+
   if { $gdb_py_is_py3k == 0 } {
     gdb_py_test_silent_cmd "python a = gdb.Value (u'unicode test')" "create unicode value" 1
     gdb_test "python print (a)" "\"unicode test\"" "print Unicode string"
@@ -65,7 +74,7 @@ proc test_value_creation {} {
   }
 
   # Test address attribute is None in a non-addressable value
-  gdb_test "python print ('result = %s' % i.address)" "= None" "Test address attribute in non-addressable value"
+  gdb_test "python print ('result = %s' % i.address)" "= None" "test address attribute in non-addressable value"
 }
 
 proc test_value_numeric_ops {} {
@@ -124,6 +133,13 @@ proc test_value_numeric_ops {} {
   gdb_test "python print ('result = ' + str(b-2))" " = 0x3( <.*>)?" "subtract python integer from pointer value"
   gdb_test "python print ('result = ' + str(b-a))" " = 3" "subtract two pointer values"
 
+  gdb_test "python print ('result = ' + 'result'\[gdb.Value(0)\])" \
+    "result = r" "use value as string index"
+  gdb_test "python print ('result = ' + str((1,2,3)\[gdb.Value(0)\]))" \
+    "result = 1" "use value as tuple index"
+  gdb_test "python print ('result = ' + str(\[1,2,3\]\[gdb.Value(0)\]))" \
+    "result = 1" "use value as array index"
+
   # Test some invalid operations.
 
   gdb_test_multiple "python print ('result = ' + str(i+'foo'))" "catch error in python type conversion" {
@@ -226,16 +242,18 @@ proc test_value_in_inferior {} {
   global has_argv0
   set test "verify dereferenced value"
   if { $has_argv0 } {
+    gdb_test_no_output "set print elements unlimited" ""
+    gdb_test_no_output "set print repeats unlimited" ""
     gdb_test "python print (arg0)" "0x.*$testfile\"" $test
   } else {
     unsupported $test
   }
 
   # Smoke-test is_optimized_out attribute
-  gdb_test "python print ('result = %s' % arg0.is_optimized_out)" "= False" "Test is_optimized_out attribute"
+  gdb_test "python print ('result = %s' % arg0.is_optimized_out)" "= False" "test is_optimized_out attribute"
 
   # Test address attribute
-  gdb_test "python print ('result = %s' % arg0.address)" "= 0x\[\[:xdigit:\]\]+" "Test address attribute"
+  gdb_test "python print ('result = %s' % arg0.address)" "= 0x\[\[:xdigit:\]\]+" "test address attribute"
 
   # Test displaying a variable that is temporarily at a bad address.
   # But if we can examine what's at memory address 0, then we'll also be
@@ -260,32 +278,33 @@ proc test_value_in_inferior {} {
     gdb_test "python inval2 = inval+1" "gdb.MemoryError: Cannot access memory at address 0x0.*" $test
     gdb_test "python inval.fetch_lazy ()" "gdb.MemoryError: Cannot access memory at address 0x0.*" $test
   }
+  set argc_value [get_integer_valueof "argc" 0]
   gdb_test "python argc_lazy = gdb.parse_and_eval('argc')"
   gdb_test "python argc_notlazy = gdb.parse_and_eval('argc')"
   gdb_test "python argc_notlazy.fetch_lazy()"
   gdb_test "python print (argc_lazy.is_lazy)" "True"
   gdb_test "python print (argc_notlazy.is_lazy)" "False"
-  gdb_test "print argc" " = 1" "sanity check argc"
+  gdb_test "print argc" " = $argc_value" "sanity check argc"
   gdb_test "python print (argc_lazy.is_lazy)" "\r\nTrue"
-  gdb_test_no_output "set argc=2"
-  gdb_test "python print (argc_notlazy)" "\r\n1"
-  gdb_test "python print (argc_lazy)" "\r\n2"
+  gdb_test_no_output "set argc=[expr $argc_value + 1]" "change argc"
+  gdb_test "python print (argc_notlazy)" "\r\n$argc_value"
+  gdb_test "python print (argc_lazy)" "\r\n[expr $argc_value + 1]"
   gdb_test "python print (argc_lazy.is_lazy)" "False"
 
   # Test string fetches,  both partial and whole.
   gdb_test "print st" "\"divide et impera\""
   gdb_py_test_silent_cmd "python st = gdb.history (0)" "get value from history" 1
   gdb_test "python print (st.string ())"  "divide et impera"  "Test string with no length"
-  gdb_test "python print (st.string (length = -1))" "divide et impera" "Test string (length = -1) is all of the string"
+  gdb_test "python print (st.string (length = -1))" "divide et impera" "test string (length = -1) is all of the string"
   gdb_test "python print (st.string (length = 6))" "divide"
-  gdb_test "python print (\"---\"+st.string (length = 0)+\"---\")" "------" "Test string (length = 0) is empty"
-  gdb_test "python print (len(st.string (length = 0)))" "0" "Test length is 0"
+  gdb_test "python print (\"---\"+st.string (length = 0)+\"---\")" "------" "test string (length = 0) is empty"
+  gdb_test "python print (len(st.string (length = 0)))" "0" "test length is 0"
 
 
   # Fetch a string that has embedded nulls.
   gdb_test "print nullst" "\"divide\\\\000et\\\\000impera\".*"
   gdb_py_test_silent_cmd "python nullst = gdb.history (0)" "get value from history" 1
-  gdb_test "python print (nullst.string ())" "divide" "Test string to first null"
+  gdb_test "python print (nullst.string ())" "divide" "test string to first null"
   # Python cannot print strings that contain the null (\0) character.
   # For the purposes of this test, use repr()
   gdb_py_test_silent_cmd "python nullst = nullst.string (length = 9)" "get string beyond null" 1
@@ -306,18 +325,18 @@ proc test_lazy_strings {} {
   gdb_py_test_silent_cmd "python sptr = gdb.history (0)" "Get value from history" 1
 
   gdb_py_test_silent_cmd "python lstr = sptr.lazy_string()" "Aquire lazy string" 1
-  gdb_test "python print (lstr.type)" "const char \*." "Test lazy-string type name equality"
-  gdb_test "python print (sptr.type)" "const char \*." "Test string type name equality"
+  gdb_test "python print (lstr.type)" "const char \*." "test lazy-string type name equality"
+  gdb_test "python print (sptr.type)" "const char \*." "test string type name equality"
 
   # Prevent symbol on address 0x0 being printed.
   gdb_test_no_output "set print symbol off"
   gdb_test "print sn" "0x0"
 
   gdb_py_test_silent_cmd "python snptr = gdb.history (0)" "Get value from history" 1
-  gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "Test lazy string"
+  gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "test lazy string"
   gdb_py_test_silent_cmd "python snstr = snptr.lazy_string(length=0)" "Succesfully create a lazy string" 1
-  gdb_test "python print (snstr.length)" "0" "Test lazy string length"
-  gdb_test "python print (snstr.address)" "0" "Test lazy string address"
+  gdb_test "python print (snstr.length)" "0" "test lazy string length"
+  gdb_test "python print (snstr.address)" "0" "test lazy string address"
 }
 
 
@@ -370,7 +389,7 @@ proc test_value_after_death {} {
   gdb_test "kill" "" "kill the inferior" \
     "Kill the program being debugged. .y or n. $" \
     "y"
-  gdb_test "file" "" "Discard the symbols" \
+  gdb_test "file" "" "discard the symbols" \
     "Discard symbol table from.*y or n. $" \
     "y"
 
@@ -409,7 +428,7 @@ proc test_subscript_regression {exefile 
 	 "Obtain address" 1
      gdb_py_test_silent_cmd "python rptr = gdb.history(0)" \
 	 "Obtains value from GDB" 1
-     gdb_test "python print (rptr\[0\])" "2" "Check pointer passed as reference"
+     gdb_test "python print (rptr\[0\])" "2" "check pointer passed as reference"
 
      # Just the most basic test of dynamic_cast -- it is checked in
      # the C++ tests.
@@ -435,19 +454,19 @@ proc test_subscript_regression {exefile 
      "Create a value for subscript test" 1
 
  # Try to access an int with a subscript.  This should fail.
- gdb_test "python print (intv)" "1" "Baseline print of an int Python value"
+ gdb_test "python print (intv)" "1" "baseline print of an int Python value"
  gdb_test "python print (intv\[0\])" "gdb.error: Cannot subscript requested type.*" \
      "Attempt to access an integer with a subscript"
 
  # Try to access a string with a subscript.  This should pass.
- gdb_test "python print (stringv)" "foo." "Baseline print of a string Python value"
- gdb_test "python print (stringv\[0\])" "f." "Attempt to access a string with a subscript"
+ gdb_test "python print (stringv)" "foo." "baseline print of a string Python value"
+ gdb_test "python print (stringv\[0\])" "f." "attempt to access a string with a subscript"
 
  # Try to access an int array via a pointer with a subscript.  This should pass.
  gdb_py_test_silent_cmd "print p" "Build pointer to array" 1
  gdb_py_test_silent_cmd "python pointer = gdb.history(0)" "" 1
- gdb_test "python print (pointer\[0\])" "1" "Access array via pointer with int subscript"
- gdb_test "python print (pointer\[intv\])" "2" "Access array via pointer with value subscript"
+ gdb_test "python print (pointer\[0\])" "1" "access array via pointer with int subscript"
+ gdb_test "python print (pointer\[intv\])" "2" "access array via pointer with value subscript"
 
  # Try to access a single dimension array with a subscript to the
  # result.  This should fail.
@@ -458,7 +477,7 @@ proc test_subscript_regression {exefile 
  # dimensions.  This should pass.
  gdb_py_test_silent_cmd "print {\"fu \",\"foo\",\"bar\"}" "Build array" 1
  gdb_py_test_silent_cmd "python marray = gdb.history(0)" "" 1
- gdb_test "python print (marray\[1\]\[2\])" "o." "Test multiple subscript"
+ gdb_test "python print (marray\[1\]\[2\])" "o." "test multiple subscript"
 }
 
 # A few tests of gdb.parse_and_eval.
@@ -481,10 +500,10 @@ proc test_value_hash {} {
     "three = gdb.Value(3)" "" \
     "vdict = {one:\"one str\",two:\"two str\",three:\"three str\"}" "" \
     "end"
-    gdb_test "python print (vdict\[one\])" "one str" "Test dictionary hash"
-    gdb_test "python print (vdict\[two\])" "two str" "Test dictionary hash"
-    gdb_test "python print (vdict\[three\])" "three str" "Test dictionary hash"
-    gdb_test "python print (one.__hash__() == hash(one))" "True" "Test inbuilt hash"
+    gdb_test "python print (vdict\[one\])" "one str" "test dictionary hash"
+    gdb_test "python print (vdict\[two\])" "two str" "test dictionary hash"
+    gdb_test "python print (vdict\[three\])" "three str" "test dictionary hash"
+    gdb_test "python print (one.__hash__() == hash(one))" "True" "test inbuilt hash"
 }
 
 # Build C version of executable.  C++ is built later.
@@ -509,7 +528,7 @@ test_value_hash
 # The following tests require execution.
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.cc ./gdb/testsuite/gdb.python/py-xmethods.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-xmethods.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.exp ./gdb/testsuite/gdb.python/py-xmethods.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-xmethods.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,16 +18,22 @@
 
 load_lib gdb-python.exp
 
-if { [skip_cplus_tests] } { continue }
+if { [skip_cplus_tests] } {
+    untested "skipping C++ tests"
+    return
+}
 
 standard_testfile py-xmethods.cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
 # Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+if { [skip_python_tests] } {
+    untested "skipping Python tests"
+    return
+}
 
 if ![runto_main] {
    return -1
@@ -40,110 +46,110 @@ gdb_breakpoint [gdb_get_line_number "Bre
 gdb_continue_to_breakpoint "Break here" ".*Break here.*"
 
 # Tests before loading the debug methods.
-gdb_test "p a1 + a2" ".* = 15" "Before: a1 + a2"
-gdb_test "p a_plus_a" ".* = 1" "Before: a_plus_a 1"
+gdb_test "p a1 + a2" ".* = 15" "before: a1 + a2"
+gdb_test "p a_plus_a" ".* = 1" "before: a_plus_a 1"
 
-gdb_test "p a2 - a1" ".* = 5" "Before: a2 - a1"
-gdb_test "p a_minus_a" ".* = 1" "Before: a_minus_a 1"
+gdb_test "p a2 - a1" ".* = 5" "before: a2 - a1"
+gdb_test "p a_minus_a" ".* = 1" "before: a_minus_a 1"
 
-gdb_test "p b1 - a1" ".* = 25" "Before: b1 - a1"
-gdb_test "p a_minus_a" ".* = 2" "Before: a_minus_a 2"
+gdb_test "p b1 - a1" ".* = 25" "before: b1 - a1"
+gdb_test "p a_minus_a" ".* = 2" "before: a_minus_a 2"
 
-gdb_test "p a1.geta()" ".* = 5" "Before: a1.geta()"
-gdb_test "p a_geta" ".* = 1" "Before: a_geta 1"
+gdb_test "p a1.geta()" ".* = 5" "before: a1.geta()"
+gdb_test "p a_geta" ".* = 1" "before: a_geta 1"
 
-gdb_test "p ++a1" "No symbol.*" "Before: ++a1"
+gdb_test "p ++a1" "No symbol.*" "before: ++a1"
 gdb_test "p a1.getarrayind(5)" "Couldn't find method.*" \
-  "Before: a1.getarrayind(5)"
+  "before: a1.getarrayind(5)"
 
-gdb_test "p a_ptr->geta()" ".* = 60" "Before: a_ptr->geta()"
-gdb_test "p b_geta" ".* = 1" "Before: b_geta 1"
+gdb_test "p a_ptr->geta()" ".* = 60" "before: a_ptr->geta()"
+gdb_test "p b_geta" ".* = 1" "before: b_geta 1"
 
-gdb_test "p e.geta()" ".* = 100" "Before: e.geta()"
-gdb_test "p a_geta" ".* = 2" "Before: a_geta 2"
+gdb_test "p e.geta()" ".* = 100" "before: e.geta()"
+gdb_test "p a_geta" ".* = 2" "before: a_geta 2"
 
 # Since g.size_diff operates of sizes of int and float, do not check for
 # actual result value as it could be different on different platforms.
-gdb_test "p g.size_diff<float>()" ".*" "Before: call g.size_diff<float>()"
-gdb_test "p g_size_diff" ".* = 2" "Before: g_size_diff 2"
+gdb_test "p g.size_diff<float>()" ".*" "before: call g.size_diff<float>()"
+gdb_test "p g_size_diff" ".* = 2" "before: g_size_diff 2"
 
 gdb_test "p g.size_diff<unsigned long>()" "Couldn't find method.*" \
-  "Before: g.size_diff<unsigned long>()"
+  "before: g.size_diff<unsigned long>()"
 
-gdb_test "p g.size_mul<2>()" ".*" "Before: g.size_mul<2>()"
-gdb_test "p g_size_mul" ".* = 2" "Before: g_size_mul 2"
+gdb_test "p g.size_mul<2>()" ".*" "before: g.size_mul<2>()"
+gdb_test "p g_size_mul" ".* = 2" "before: g_size_mul 2"
 
 gdb_test "p g.size_mul<5>()" "Couldn't find method.*" \
-  "Before: g.size_mul<5>()"
+  "before: g.size_mul<5>()"
 
-gdb_test "p g.mul<double>(2.0)" ".* = 10" "Before: g.mul<double>(2.0)"
-gdb_test "p g_mul" ".* = 2" "Before: g_mul 2"
+gdb_test "p g.mul<double>(2.0)" ".* = 10" "before: g.mul<double>(2.0)"
+gdb_test "p g_mul" ".* = 2" "before: g_mul 2"
 
 gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \
-  "Before: g.mul<char>('a')"
+  "before: g.mul<char>('a')"
 
 # Load the script which adds the debug methods.
 gdb_test_no_output "source ${xmethods_script}" "load the script file"
 
 # Tests after loading debug methods.
-gdb_test "p a1 + a2" "From Python <A_plus_A>.*15" "After: a1 + a2"
+gdb_test "p a1 + a2" "From Python <A_plus_A>.*15" "after: a1 + a2"
 
-gdb_test "p a2 - a1" ".* = 5" "After: a2 - a1"
-gdb_test "p a_minus_a" ".* = 3" "After: a_minus_a 3"
+gdb_test "p a2 - a1" ".* = 5" "after: a2 - a1"
+gdb_test "p a_minus_a" ".* = 3" "after: a_minus_a 3"
 
-gdb_test "p b1 + a1" "From Python <A_plus_A>.*35" "After: b1 + a1"
+gdb_test "p b1 + a1" "From Python <A_plus_A>.*35" "after: b1 + a1"
 
-gdb_test "p b1 - a1" ".* = 25" "After: b1 - a1"
-gdb_test "p a_minus_a" ".* = 4" "After: a_minus_a 4"
+gdb_test "p b1 - a1" ".* = 25" "after: b1 - a1"
+gdb_test "p a_minus_a" ".* = 4" "after: a_minus_a 4"
 
-gdb_test "p a1.geta()" "From Python <A_geta>.*5" "After: a1.geta()"
-gdb_test "p ++a1" "From Python <plus_plus_A>.*6" "After: ++a1"
+gdb_test "p a1.geta()" "From Python <A_geta>.*5" "after: a1.geta()"
+gdb_test "p ++a1" "From Python <plus_plus_A>.*6" "after: ++a1"
 gdb_test "p a1.getarrayind(5)" "From Python <A_getarrayind>.*5" \
-  "After: a1.getarrayind(5)"
-gdb_test "P a1\[6\]" ".*int &.*6" "After a1\[\]"
-gdb_test "P b1\[7\]" ".*const int &.*7" "After b1\[\]"
+  "after: a1.getarrayind(5)"
+gdb_test "p a1\[6\]" ".*int &.*6" "after a1\[\]"
+gdb_test "p b1\[7\]" ".*const int &.*7" "after b1\[\]"
 # Note the following test.  Xmethods on dynamc types are not looked up
 # currently.  Hence, even though a_ptr points to a B object, the xmethod
 # defined for A objects is invoked.
-gdb_test "p a_ptr->geta()" "From Python <A_geta>.*30" "After: a_ptr->geta()"
-gdb_test "p e.geta()" "From Python <A_geta>.*100" "After: e.geta()"
-gdb_test "p e_ptr->geta()" "From Python <A_geta>.*100" "After: e_ptr->geta()"
-gdb_test "p e_ref.geta()" "From Python <A_geta>.*100" "After: e_ref.geta()"
+gdb_test "p a_ptr->geta()" "From Python <A_geta>.*30" "after: a_ptr->geta()"
+gdb_test "p e.geta()" "From Python <A_geta>.*100" "after: e.geta()"
+gdb_test "p e_ptr->geta()" "From Python <A_geta>.*100" "after: e_ptr->geta()"
+gdb_test "p e_ref.geta()" "From Python <A_geta>.*100" "after: e_ref.geta()"
 gdb_test "p e.method(10)" "From Python <E_method_int>.* = void" \
-  "After: e.method(10)"
+  "after: e.method(10)"
 gdb_test "p e.method('a')" "From Python <E_method_char>.* = void" \
-  "After: e.method('a')"
+  "after: e.method('a')"
 gdb_test "p g.size_diff<float>  ()" "From Python G<>::size_diff.*" \
-  "After: g.size_diff<float>()"
+  "after: g.size_diff<float>()"
 gdb_test "p g.size_diff<  unsigned long  >()" "From Python G<>::size_diff.*" \
-  "After: g.size_diff<unsigned long>()"
+  "after: g.size_diff<unsigned long>()"
 gdb_test "p g.size_mul<2>()" "From Python G<>::size_mul.*" \
-  "After: g.size_mul<2>()"
+  "after: g.size_mul<2>()"
 gdb_test "p g.size_mul<  5  >()" "From Python G<>::size_mul.*" \
-  "After: g.size_mul<  5  >()"
+  "after: g.size_mul<  5  >()"
 gdb_test "p g.mul<double>(2.0)" "From Python G<>::mul.*" \
-  "After: g.mul<double>(2.0)"
+  "after: g.mul<double>(2.0)"
 gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \
 gdb_test "p g_ptr->mul<char>('a')" "From Python G<>::mul.*" \
-  "After: g_ptr->mul<char>('a')"
+  "after: g_ptr->mul<char>('a')"
 
 # Tests for 'disable/enable xmethod' command.
 gdb_test_no_output "disable xmethod progspace G_methods" \
-  "Disable G_methods"
+  "disable G_methods"
 gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \
   "g.mul<char>('a') after disabling G_methods"
 gdb_test_no_output "enable xmethod progspace G_methods" \
-  "Enable G_methods"
+  "dnable G_methods"
 gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \
-  "After enabling G_methods"
+  "after enabling G_methods"
 gdb_test_no_output "disable xmethod progspace G_methods;mul" \
-  "Disable G_methods;mul"
+  "disable G_methods;mul"
 gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \
   "g.mul<char>('a') after disabling G_methods;mul"
 gdb_test_no_output "enable xmethod progspace G_methods;mul" \
-  "Enable G_methods;mul"
+  "enable G_methods;mul"
 gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \
-  "After enabling G_methods;mul"
+  "after enabling G_methods;mul"
 
 # Test for 'info xmethods' command
 gdb_test "info xmethod global plus" "global.*plus_plus_A" \
@@ -152,7 +158,7 @@ gdb_test_no_output "disable xmethod prog
   "disable xmethod progspace E_methods;method_int"
 gdb_test "info xmethod progspace E_methods;method_int" ".* \\\[disabled\\\]" \
   "info xmethod xmethods E_methods;method_int"
-gdb_test_no_output "disable xmethod progspace G_methods" "Disable G_methods 2"
+gdb_test_no_output "disable xmethod progspace G_methods" "disable G_methods 2"
 gdb_test "info xmethod progspace" ".*G_methods \\\[disabled\\\].*" \
   "info xmethod progspace"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.py ./gdb/testsuite/gdb.python/py-xmethods.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/py-xmethods.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-xmethods.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/source1 ./gdb/testsuite/gdb.python/source1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/source1	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/source1	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 #  This testcase is part of GDB, the GNU debugger.
 
-#  Copyright 2008-2015 Free Software Foundation, Inc.
+#  Copyright 2008-2017 Free Software Foundation, Inc.
 
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/source2.py ./gdb/testsuite/gdb.python/source2.py
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.python/source2.py	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.python/source2.py	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 #  This testcase is part of GDB, the GNU debugger.
 
-#  Copyright 2008-2015 Free Software Foundation, Inc.
+#  Copyright 2008-2017 Free Software Foundation, Inc.
 
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/aarch64.c ./gdb/testsuite/gdb.reverse/aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/aarch64.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/aarch64.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,99 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2015 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <arm_neon.h>
-
-static void
-load (void)
-{
-  int buf[8];
-
-  asm ("ld1 { v1.8b }, [%[buf]]\n"
-       "ld1 { v2.8b, v3.8b }, [%[buf]]\n"
-       "ld1 { v3.8b, v4.8b, v5.8b }, [%[buf]]\n"
-       :
-       : [buf] "r" (buf)
-       : /* No clobbers */);
-}
-
-static void
-move (void)
-{
-  float32x2_t b1_ = vdup_n_f32(123.0f);
-  float32_t a1_ = 0;
-  float64x1_t b2_ = vdup_n_f64(456.0f);
-  float64_t a2_ = 0;
-
-  asm ("ins %0.s[0], %w1\n"
-       : "=w"(b1_)
-       : "r"(a1_), "0"(b1_)
-       : /* No clobbers */);
-
-  asm ("ins %0.d[1], %x1\n"
-       : "=w"(b2_)
-       : "r"(a2_), "0"(b2_)
-       : /* No clobbers */);
-}
-
-static void
-adv_simd_mod_imm (void)
-{
-  float32x2_t a1 = {2.0, 4.0};
-
-  asm ("bic %0.2s, #1\n"
-       "bic %0.2s, #1, lsl #8\n"
-       : "=w"(a1)
-       : "0"(a1)
-       : /* No clobbers */);
-}
-
-static void
-adv_simd_scalar_index (void)
-{
-  float64x2_t b_ = {0.0, 0.0};
-  float64_t a_ = 1.0;
-  float64_t result;
-
-  asm ("fmla %d0,%d1,%2.d[1]"
-       : "=w"(result)
-       : "w"(a_), "w"(b_)
-       : /* No clobbers */);
-}
-
-static void
-adv_simd_smlal (void)
-{
-  asm ("smlal v13.2d, v8.2s, v0.2s");
-}
-
-static void
-adv_simd_vect_shift (void)
-{
-  asm ("fcvtzs s0, s0, #1");
-}
-
-int
-main ()
-{
-  load ();
-  move ();
-  adv_simd_mod_imm ();
-  adv_simd_scalar_index ();
-  adv_simd_smlal ();
-  adv_simd_vect_shift ();
-  return 0;
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/aarch64.exp ./gdb/testsuite/gdb.reverse/aarch64.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/aarch64.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/aarch64.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,115 +0,0 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-if ![supports_reverse] {
-    return
-}
-
-# Test aarch64 instruction recording.
-
-if {![istarget "aarch64*-*-*"]} then {
-    verbose "Skipping aarch64 instruction recording tests."
-    return
-}
-
-standard_testfile
-
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
-	 [list debug]]} {
-    untested ${testfile}.exp
-    return -1
-}
-if { ![runto main] } then {
-    fail "run to main"
-    return
-}
-
-# In each function FUNC, GDB turns on process record, and single step
-# until program goes to the end of the function.  Then, single step
-# backward.  In each of forward single step and backward single step,
-# the contents of registers are saved, and test compares them.  If
-# there is any differences, a FAIL is emitted.
-
-proc test { func } {
-    global hex decimal
-    global gdb_prompt
-
-    with_test_prefix "$func" {
-	gdb_breakpoint $func
-	gdb_test "continue"
-
-	set last_insn ""
-	set test "disassemble $func"
-	gdb_test_multiple $test $test {
-	    -re ".*($hex) <\\+$decimal>:\[^\r\n\]+\r\nEnd of assembler dump\.\r\n$gdb_prompt $" {
-		set last_insn $expect_out(1,string)
-	    }
-	}
-	if { $last_insn == "" } {
-	    fail "find the last instruction of function $func"
-	}
-
-	# Activate process record/replay
-	gdb_test_no_output "record" "Turn on process record"
-
-	# Registers contents before each forward single step.
-	set count 0
-	for {} {$count < 500} {incr count} {
-	    gdb_test_multiple "x/i \$pc" "" {
-		-re ".* ($hex) <.*>:\[ \t\]*(.*)\r\n$gdb_prompt $" {
-		    set insn_addr $expect_out(1,string)
-
-		    if [expr {$last_insn == $insn_addr}] {
-			break
-		    }
-
-		    set insn_array($count) $expect_out(2,string)
-		}
-	    }
-
-	    set pre_regs($count) [capture_command_output "info all-registers" ""]
-	    gdb_test "si" "" ""
-	}
-
-	incr count -1
-	# Registers contents after each backward single step.
-	for {set i $count} {$i >= 0} {incr i -1} {
-	    gdb_test "reverse-stepi" "" ""
-	    set post_regs($i) [capture_command_output "info all-registers" ""]
-	}
-
-	# Compare the register contents.
-	for {set i 0} {$i < $count} {incr i} {
-	    if { ![gdb_assert { [string compare $pre_regs($i) $post_regs($i)] == 0 } \
-		      "compare registers on insn $i:$insn_array($i)"] } {
-
-		foreach pre_line [split $pre_regs($i) \n] post_line [split $post_regs($i) \n] {
-		    if { [string compare $pre_line $post_line] } {
-			verbose -log " -:$pre_line"
-			verbose -log " +:$post_line"
-		    }
-		}
-	    }
-	}
-	gdb_test "record stop"
-    }
-}
-
-test "load"
-test "move"
-test "adv_simd_mod_imm"
-test "adv_simd_scalar_index"
-test "adv_simd_smlal"
-test "adv_simd_vect_shift"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.c ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if [info exists COMPILE] {
     return
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.S ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.S	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-precsave.exp ./gdb/testsuite/gdb.reverse/break-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/break-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2008-2015 Free Software Foundation, Inc.
+#   Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if ![supports_process_record] {
 standard_testfile break-reverse.c
 set precsave [standard_output_file break.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -41,7 +41,7 @@ proc precsave_tests {} {
 
     if [supports_process_record] {
 	# Activate process record/replay
-	gdb_test_no_output "record" "Turn on process record"
+	gdb_test_no_output "record" "turn on process record"
     }
 
     gdb_test "break $end_location" \
@@ -54,7 +54,7 @@ proc precsave_tests {} {
 	"Saved core file $precsave with execution log\."  \
 	"save process recfile"
 
-    gdb_test "kill" "" "Kill process, prepare to debug log file" \
+    gdb_test "kill" "" "kill process, prepare to debug log file" \
 	"Kill the program being debugged\\? \\(y or n\\) " "y"
 
     gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-reverse.c ./gdb/testsuite/gdb.reverse/break-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/break-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-reverse.exp ./gdb/testsuite/gdb.reverse/break-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/break-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/break-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2008-2015 Free Software Foundation, Inc.
+#   Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if ![supports_reverse] {
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -35,7 +35,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 gdb_test "break foo" \
@@ -48,7 +48,7 @@ gdb_test "break bar" \
 
 gdb_test "break $end_location" \
     "Breakpoint $decimal at .* line $end_location\." \
-    set breakpoint at end of main"
+    "set breakpoint at end of main"
 
 gdb_continue_to_breakpoint "foo" ".*$srcfile:$foo_location.*"
 gdb_continue_to_breakpoint "bar" ".*$srcfile:$bar_location.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-precsave.exp ./gdb/testsuite/gdb.reverse/consecutive-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/consecutive-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2008-2015 Free Software Foundation, Inc.
+#   Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if ![supports_process_record] {
 standard_testfile consecutive-reverse.c
 set precsave [standard_output_file consecutive.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -32,13 +32,13 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set end_location  [gdb_get_line_number "end of main"  ]
 gdb_test "break $end_location" \
     "Breakpoint $decimal at .*$srcfile, line $end_location\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
 
@@ -46,7 +46,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-reverse.c ./gdb/testsuite/gdb.reverse/consecutive-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/consecutive-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-reverse.exp ./gdb/testsuite/gdb.reverse/consecutive-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/consecutive-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/consecutive-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2008-2015 Free Software Foundation, Inc.
+#   Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if ![supports_reverse] {
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -30,7 +30,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 gdb_breakpoint foo
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-precsave.exp ./gdb/testsuite/gdb.reverse/finish-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/finish-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if ![supports_reverse] {
 standard_testfile finish-reverse.c
 set precsave [standard_output_file finish.precsave]
 
-if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } {
+if { [prepare_for_testing "failed to prepare" "$testfile" $srcfile] } {
     return -1
 }
 
@@ -31,7 +31,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Run until end, then save execution log. 
@@ -39,7 +39,7 @@ if [supports_process_record] {
 set breakloc [gdb_get_line_number "end of main" "$srcfile"]
 gdb_test "break $breakloc" \
     "Breakpoint $decimal at .*$srcfile, line $breakloc\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
 
@@ -47,7 +47,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp ./gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,26 +25,31 @@ if ![supports_reverse] {
 
 standard_testfile finish-reverse.c
 
-if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } {
+if { [prepare_for_testing "failed to prepare" "$testfile" $srcfile] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set breakloc [gdb_get_line_number "VOID FUNC" "$srcfile"]
-gdb_test "break void_func" \
-    "Breakpoint $decimal at .*$srcfile, line $breakloc\." \
+gdb_test "tbreak void_func" \
+    "Temporary breakpoint $decimal at .*$srcfile, line $breakloc\." \
     "set breakpoint on void_func"
 gdb_continue_to_breakpoint "void_func" ".*$srcfile:$breakloc.*"
 
+# We stop at the brekapoint on void_func, but breakpoint on
+# *void_func will be set at the same place if function void_func doesn't
+# have prologue.  One step forward to avoid this.
+gdb_test "si"
+
 gdb_test "break \*void_func" \
     "Breakpoint $decimal at .*" \
     "set breakpoint at void_func's entry"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse.c ./gdb/testsuite/gdb.reverse/finish-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/finish-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse.exp ./gdb/testsuite/gdb.reverse/finish-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/finish-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/finish-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if ![supports_reverse] {
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp "$testfile" $srcfile] } {
+if { [prepare_for_testing "failed to prepare" "$testfile" $srcfile] } {
     return -1
 }
 
@@ -30,7 +30,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Test finish from void func
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/fstatat-reverse.c ./gdb/testsuite/gdb.reverse/fstatat-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/fstatat-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/fstatat-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,43 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+struct stat buf;
+
+int
+main (void)
+{
+  marker1 ();
+  int fd = open ("/", O_PATH);
+  fstatat( fd, ".", &buf, 0);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/fstatat-reverse.exp ./gdb/testsuite/gdb.reverse/fstatat-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/fstatat-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/fstatat-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests fstatat syscall for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variable was recorded properly on syscall, the old contents (0)
+# will be remembered.  If not, new contents (mode of /) will be used,
+# and the test will fail.
+
+gdb_test "print buf.st_mode" ".* = 0" "check fstatat record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/getresuid-reverse.c ./gdb/testsuite/gdb.reverse/getresuid-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/getresuid-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/getresuid-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,42 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+uid_t ruid = -1, euid = -1, suid = -1;
+gid_t rgid = -1, egid = -1, sgid = -1;
+
+int
+main (void)
+{
+  marker1 ();
+  getresuid (&ruid, &euid, &suid);
+  getresgid (&rgid, &egid, &sgid);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/getresuid-reverse.exp ./gdb/testsuite/gdb.reverse/getresuid-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/getresuid-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/getresuid-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,62 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests getresuid/getresgid syscalls for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variables were recorded properly on syscall, the old contents (-1)
+# will be remembered.  If not, new contents (the actual uid/gid) will be used,
+# and the test will fail (we hope the test user doesn't actually have uid of
+# -1).  Do it this way instead of printing uid/gid directly, since uid_t/gid_t
+# is likely to be unsigned.
+
+gdb_test "print ruid == (uid_t)-1" ".* = 1" "check ruid record"
+gdb_test "print euid == (uid_t)-1" ".* = 1" "check euid record"
+gdb_test "print suid == (uid_t)-1" ".* = 1" "check suid record"
+gdb_test "print rgid == (gid_t)-1" ".* = 1" "check rgid record"
+gdb_test "print egid == (gid_t)-1" ".* = 1" "check egid record"
+gdb_test "print sgid == (gid_t)-1" ".* = 1" "check sgid record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-precsave.exp ./gdb/testsuite/gdb.reverse/i386-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i386-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ set precsave [standard_output_file i386.
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug $additional_flags]]} {
     return -1
 }
@@ -48,7 +48,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 global hex
@@ -56,7 +56,7 @@ global decimal
 
 gdb_test "break $end_of_main" \
     "Breakpoint $decimal at .*$srcfile, line $end_of_main\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
 
@@ -64,7 +64,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-reverse.c ./gdb/testsuite/gdb.reverse/i386-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i386-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-reverse.exp ./gdb/testsuite/gdb.reverse/i386-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i386-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ standard_testfile
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug $additional_flags]]} {
     return -1
 }
@@ -46,7 +46,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 global hex
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-sse-reverse.c ./gdb/testsuite/gdb.reverse/i386-sse-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-sse-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i386-sse-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp ./gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i386-sse-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ standard_testfile
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug $additional_flags]]} {
     return -1
 }
@@ -48,7 +48,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 global hex
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i387-env-reverse.exp ./gdb/testsuite/gdb.reverse/i387-env-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i387-env-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i387-env-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ standard_testfile
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug $additional_flags]]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp ./gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/i387-stack-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ standard_testfile
 # some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list debug $additional_flags]]} {
     return -1
 }
@@ -36,7 +36,7 @@ runto main
 # Record to end of main
 
 set location [gdb_get_line_number "END I387-FLOAT-REVERSE"]
-gdb_test_no_output "record" "Turn on process record"
+gdb_test_no_output "record" "turn on process record"
 gdb_test "until $location" ".*$srcfile:$location.*" \
     "record to end of main"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-aarch64.c ./gdb/testsuite/gdb.reverse/insn-reverse-aarch64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-aarch64.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/insn-reverse-aarch64.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,105 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <arm_neon.h>
+
+static void
+load (void)
+{
+  int buf[8];
+
+  asm ("ld1 { v1.8b }, [%[buf]]\n"
+       "ld1 { v2.8b, v3.8b }, [%[buf]]\n"
+       "ld1 { v3.8b, v4.8b, v5.8b }, [%[buf]]\n"
+       :
+       : [buf] "r" (buf)
+       : /* No clobbers */);
+}
+
+static void
+move (void)
+{
+  float32x2_t b1_ = vdup_n_f32(123.0f);
+  float32_t a1_ = 0;
+  float64x1_t b2_ = vdup_n_f64(456.0f);
+  float64_t a2_ = 0;
+
+  asm ("ins %0.s[0], %w1\n"
+       : "=w"(b1_)
+       : "r"(a1_), "0"(b1_)
+       : /* No clobbers */);
+
+  asm ("ins %0.d[1], %x1\n"
+       : "=w"(b2_)
+       : "r"(a2_), "0"(b2_)
+       : /* No clobbers */);
+}
+
+static void
+adv_simd_mod_imm (void)
+{
+  float32x2_t a1 = {2.0, 4.0};
+
+  asm ("bic %0.2s, #1\n"
+       "bic %0.2s, #1, lsl #8\n"
+       : "=w"(a1)
+       : "0"(a1)
+       : /* No clobbers */);
+}
+
+static void
+adv_simd_scalar_index (void)
+{
+  float64x2_t b_ = {0.0, 0.0};
+  float64_t a_ = 1.0;
+  float64_t result;
+
+  asm ("fmla %d0,%d1,%2.d[1]"
+       : "=w"(result)
+       : "w"(a_), "w"(b_)
+       : /* No clobbers */);
+}
+
+static void
+adv_simd_smlal (void)
+{
+  asm ("smlal v13.2d, v8.2s, v0.2s");
+}
+
+static void
+adv_simd_vect_shift (void)
+{
+  asm ("fcvtzs s0, s0, #1");
+}
+
+/* Initialize arch-specific bits.  */
+
+static void initialize (void)
+{
+  /* AArch64 doesn't currently use this function.  */
+}
+
+/* Functions testing instruction decodings.  GDB will test all of these.  */
+static testcase_ftype testcases[] =
+{
+  load,
+  move,
+  adv_simd_mod_imm,
+  adv_simd_scalar_index,
+  adv_simd_smlal,
+  adv_simd_vect_shift,
+};
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-arm.c ./gdb/testsuite/gdb.reverse/insn-reverse-arm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-arm.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/insn-reverse-arm.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,70 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static void
+ext_reg_load (void)
+{
+  char in[8];
+
+  asm ("vldr d0, [%0]" : : "r" (in));
+  asm ("vldr s3, [%0]" : : "r" (in));
+
+  asm ("vldm %0, {d3-d4}" : : "r" (in));
+  asm ("vldm %0, {s9-s11}" : : "r" (in));
+}
+
+static void
+ext_reg_mov (void)
+{
+  int i, j;
+  double d;
+
+  i = 1;
+  j = 2;
+
+  asm ("vmov s4, s5, %0, %1" : "=r" (i), "=r" (j): );
+  asm ("vmov s7, s8, %0, %1" : "=r" (i), "=r" (j): );
+  asm ("vmov %0, %1, s10, s11" : : "r" (i), "r" (j));
+  asm ("vmov %0, %1, s1, s2" : : "r" (i), "r" (j));
+
+  asm ("vmov %P2, %0, %1" : "=r" (i), "=r" (j): "w" (d));
+  asm ("vmov %1, %2, %P0" : "=w" (d) : "r" (i), "r" (j));
+}
+
+static void
+ext_reg_push_pop (void)
+{
+  double d;
+
+  asm ("vpush {%P0}" : : "w" (d));
+  asm ("vpop {%P0}" : : "w" (d));
+}
+
+/* Initialize arch-specific bits.  */
+
+static void initialize (void)
+{
+  /* ARM doesn't currently use this function.  */
+}
+
+/* Functions testing instruction decodings.  GDB will test all of these.  */
+static testcase_ftype testcases[] =
+{
+  ext_reg_load,
+  ext_reg_mov,
+  ext_reg_push_pop,
+};
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse.c ./gdb/testsuite/gdb.reverse/insn-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/insn-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,60 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+typedef void (*testcase_ftype) (void);
+
+/* The arch-specific files need to implement both the initialize function
+   and define the testcases array.  */
+
+#if (defined __aarch64__)
+#include "insn-reverse-aarch64.c"
+#elif (defined __arm__)
+#include "insn-reverse-arm.c"
+#elif (defined __x86_64__) || (defined __i386__)
+#include "insn-reverse-x86.c"
+#else
+/* We get here if the current architecture being tested doesn't have any
+   record/replay instruction decoding tests implemented.  */
+static testcase_ftype testcases[] = {};
+
+/* Dummy implementation in case this target doesn't have any record/replay
+   instruction decoding tests implemented.  */
+
+static void
+initialize (void)
+{
+}
+#endif
+
+/* GDB will read n_testcases to know how many functions to test.  The
+   functions are implemented in arch-specific files and the testcases
+   array is defined together with them.  */
+static int n_testcases = (sizeof (testcases) / sizeof (testcase_ftype));
+
+int
+main ()
+{
+  int i = 0;
+
+  /* Initialize any required arch-specific bits.  */
+  initialize ();
+
+  for (i = 0; i < n_testcases; i++)
+    testcases[i] ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse.exp ./gdb/testsuite/gdb.reverse/insn-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/insn-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,129 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+	 [list debug]]} {
+    return -1
+}
+if { ![runto main] } then {
+    fail "run to main"
+    return
+}
+
+# Read function name from testcases[N].
+
+proc read_testcase { n } {
+    global gdb_prompt
+
+    set result -1
+    gdb_test_multiple "print testcases\[${n}\]" "read name of test case ${n}" {
+	-re "\[$\].*= .*<(.*)>.*$gdb_prompt $" {
+	    set result $expect_out(1,string)
+	}
+	-re "$gdb_prompt $" { }
+    }
+
+    return $result
+}
+
+# In each function FUNC, GDB turns on process record, and single step
+# until program goes to the end of the function.  Then, single step
+# backward.  In each of forward single step and backward single step,
+# the contents of registers are saved, and test compares them.  If
+# there is any differences, a FAIL is emitted.
+
+proc test { func } {
+    global hex decimal
+    global gdb_prompt
+
+    with_test_prefix "$func" {
+	gdb_breakpoint $func
+	gdb_test "continue"
+
+	set last_insn ""
+	set test "disassemble $func"
+	gdb_test_multiple $test $test {
+	    -re ".*($hex) <\\+$decimal>:\[^\r\n\]+\r\nEnd of assembler dump\.\r\n$gdb_prompt $" {
+		set last_insn $expect_out(1,string)
+	    }
+	}
+	if { $last_insn == "" } {
+	    fail "find the last instruction of function $func"
+	}
+
+	# Activate process record/replay
+	gdb_test_no_output "record" "turn on process record"
+
+	# Registers contents before each forward single step.
+	set count 0
+	for {} {$count < 500} {incr count} {
+	    gdb_test_multiple "x/i \$pc" "" {
+		-re ".* ($hex) <.*>:\[ \t\]*(.*)\r\n$gdb_prompt $" {
+		    set insn_addr $expect_out(1,string)
+
+		    if [expr {$last_insn == $insn_addr}] {
+			break
+		    }
+
+		    set insn_array($count) $expect_out(2,string)
+		}
+	    }
+
+	    set pre_regs($count) [capture_command_output "info all-registers" ""]
+	    gdb_test "si" "" ""
+	}
+
+	incr count -1
+	# Registers contents after each backward single step.
+	for {set i $count} {$i >= 0} {incr i -1} {
+	    gdb_test "reverse-stepi" "" ""
+	    set post_regs($i) [capture_command_output "info all-registers" ""]
+	}
+
+	# Compare the register contents.
+	for {set i 0} {$i < $count} {incr i} {
+	    if { ![gdb_assert { [string compare $pre_regs($i) $post_regs($i)] == 0 } \
+		      "compare registers on insn $i:$insn_array($i)"] } {
+
+		foreach pre_line [split $pre_regs($i) \n] post_line [split $post_regs($i) \n] {
+		    if { [string compare $pre_line $post_line] } {
+			verbose -log " -:$pre_line"
+			verbose -log " +:$post_line"
+		    }
+		}
+	    }
+	}
+	gdb_test "record stop"
+    }
+}
+
+set n_testcases [get_integer_valueof "n_testcases" 0]
+
+if { ${n_testcases} == 0 } {
+    untested "no test"
+    return 1
+}
+
+for { set i 0 } { ${i} < ${n_testcases} } { incr i } {
+    set testcase [read_testcase $i]
+
+    test $testcase
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-x86.c ./gdb/testsuite/gdb.reverse/insn-reverse-x86.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/insn-reverse-x86.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/insn-reverse-x86.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,279 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <cpuid.h>
+#include <stdint.h>
+
+/* 0 if the CPU supports rdrand and non-zero otherwise.  */
+static unsigned int supports_rdrand;
+
+/* 0 if the CPU supports rdseed and non-zero otherwise.  */
+static unsigned int supports_rdseed;
+
+/* Check supported features and set globals accordingly.  The globals
+   can be used to prevent unsupported tests from running.  */
+
+static void
+check_supported_features (void)
+{
+  unsigned int rdrand_mask = (1 << 30);
+  unsigned int rdseed_mask = (1 << 18);
+  unsigned int eax, ebx, ecx, edx;
+  unsigned int vendor;
+  unsigned int max_level;
+
+  max_level = __get_cpuid_max (0, &vendor);
+
+  if (max_level < 1)
+    return;
+
+  __cpuid (1, eax, ebx, ecx, edx);
+
+  supports_rdrand = ((ecx & rdrand_mask) == rdrand_mask);
+
+  if (max_level >= 7)
+    {
+      __cpuid_count (7, 0, eax, ebx, ecx, edx);
+      supports_rdseed = ((ebx & rdseed_mask) == rdseed_mask);
+    }
+}
+
+/* Test rdrand support for various output registers.  */
+
+void
+rdrand (void)
+{
+  /* Get a random number from the rdrand assembly instruction.  */
+  register uint64_t number;
+
+  if (!supports_rdrand)
+    return;
+
+  /* 16-bit random numbers.  */
+  __asm__ volatile ("rdrand %%ax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%bx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%cx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%dx;" : "=r" (number));
+
+  __asm__ volatile ("mov %%di, %%ax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%di;" : "=r" (number));
+  __asm__ volatile ("mov %%ax, %%di;" : "=r" (number));
+
+  __asm__ volatile ("mov %%si, %%ax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%si;" : "=r" (number));
+  __asm__ volatile ("mov %%ax, %%si;" : "=r" (number));
+
+  __asm__ volatile ("mov %%bp, %%ax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%bp;" : "=r" (number));
+  __asm__ volatile ("mov %%ax, %%bp;" : "=r" (number));
+
+  __asm__ volatile ("mov %%sp, %%ax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%sp;" : "=r" (number));
+  __asm__ volatile ("mov %%ax, %%sp;" : "=r" (number));
+
+  __asm__ volatile ("rdrand %%r8w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r9w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r10w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r11w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r12w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r13w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r14w;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r15w;" : "=r" (number));
+
+  /* 32-bit random numbers.  */
+  __asm__ volatile ("rdrand %%eax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%ebx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%ecx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%edx;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rdi, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%edi;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rdi;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rsi, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%esi;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rsi;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rbp, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%ebp;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rbp;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rsp, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%esp;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rsp;" : "=r" (number));
+
+  __asm__ volatile ("rdrand %%r8d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r9d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r10d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r11d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r12d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r13d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r14d;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r15d;" : "=r" (number));
+
+  /* 64-bit random numbers.  */
+  __asm__ volatile ("rdrand %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rbx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rcx;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rdx;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rdi, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rdi;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rdi;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rsi, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rsi;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rsi;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rbp, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rbp;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rbp;" : "=r" (number));
+
+  __asm__ volatile ("mov %%rsp, %%rax;" : "=r" (number));
+  __asm__ volatile ("rdrand %%rsp;" : "=r" (number));
+  __asm__ volatile ("mov %%rax, %%rsp;" : "=r" (number));
+
+  __asm__ volatile ("rdrand %%r8;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r9;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r10;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r11;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r12;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r13;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r14;" : "=r" (number));
+  __asm__ volatile ("rdrand %%r15;" : "=r" (number));
+}
+
+/* Test rdseed support for various output registers.  */
+
+void
+rdseed (void)
+{
+  /* Get a random seed from the rdseed assembly instruction.  */
+  register long seed;
+
+  if (!supports_rdseed)
+    return;
+
+  /* 16-bit random seeds.  */
+  __asm__ volatile ("rdseed %%ax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%bx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%cx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%dx;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%di, %%ax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%di;" : "=r" (seed));
+  __asm__ volatile ("mov %%ax, %%di;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%si, %%ax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%si;" : "=r" (seed));
+  __asm__ volatile ("mov %%ax, %%si;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%bp, %%ax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%bp;" : "=r" (seed));
+  __asm__ volatile ("mov %%ax, %%bp;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%sp, %%ax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%sp;" : "=r" (seed));
+  __asm__ volatile ("mov %%ax, %%sp;" : "=r" (seed));
+
+  __asm__ volatile ("rdseed %%r8w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r9w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r10w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r11w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r12w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r13w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r14w;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r15w;" : "=r" (seed));
+
+  /* 32-bit random seeds.  */
+  __asm__ volatile ("rdseed %%eax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%ebx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%ecx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%edx;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rdi, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%edi;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rdi;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rsi, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%esi;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rsi;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rbp, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%ebp;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rbp;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rsp, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%esp;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rsp;" : "=r" (seed));
+
+  __asm__ volatile ("rdseed %%r8d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r9d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r10d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r11d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r12d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r13d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r14d;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r15d;" : "=r" (seed));
+
+  /* 64-bit random seeds.  */
+  __asm__ volatile ("rdseed %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rbx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rcx;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rdx;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rdi, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rdi;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rdi;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rsi, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rsi;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rsi;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rbp, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rbp;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rbp;" : "=r" (seed));
+
+  __asm__ volatile ("mov %%rsp, %%rax;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%rsp;" : "=r" (seed));
+  __asm__ volatile ("mov %%rax, %%rsp;" : "=r" (seed));
+
+  __asm__ volatile ("rdseed %%r8;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r9;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r10;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r11;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r12;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r13;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r14;" : "=r" (seed));
+  __asm__ volatile ("rdseed %%r15;" : "=r" (seed));
+}
+
+/* Initialize arch-specific bits.  */
+
+static void
+initialize (void)
+{
+  /* Initialize supported features.  */
+  check_supported_features ();
+}
+
+/* Functions testing instruction decodings.  GDB will test all of these.  */
+static testcase_ftype testcases[] =
+{
+  rdrand,
+  rdseed
+};
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate.c ./gdb/testsuite/gdb.reverse/machinestate.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/machinestate.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate.exp ./gdb/testsuite/gdb.reverse/machinestate.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/machinestate.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ if ![supports_reverse] {
 
 standard_testfile .c ms1.c
 
-if { [prepare_for_testing $testfile.exp $testfile \
+if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $srcfile2]] } {
     return -1
 }
@@ -57,7 +57,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Proceed to end of main
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate-precsave.exp ./gdb/testsuite/gdb.reverse/machinestate-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/machinestate-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/machinestate-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ if ![supports_process_record] {
 standard_testfile machinestate.c ms1.c
 set precsave [standard_output_file machinestate.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile \
+if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $srcfile2]] } {
     return -1
 }
@@ -59,12 +59,12 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 gdb_test "break $endmain" \
     "Breakpoint $decimal at .*$srcfile, line $endmain\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end main .*" "run to end of main"
 
@@ -72,7 +72,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/Makefile.in ./gdb/testsuite/gdb.reverse/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES   = break-reverse consecutive-reverse finish-reverse \
-	i386-precsave i386-reverse i386-sse-reverse \
-	machinestate solib-reverse step-reverse until-reverse \
-	watch-reverse sigall-reverse sigall-precsave
-
-MISCELLANEOUS = 
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	rm -f *~ *.o *.x *.ci *.sl a.out core
-	rm -f *.dwo *.dwp
-	rm -f $(EXECUTABLES) $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	rm -f Makefile config.status config.log site.* gdb.log gdb.sum
-
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/ms1.c ./gdb/testsuite/gdb.reverse/ms1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/ms1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/ms1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp ./gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,18 +29,18 @@ if ![supports_reverse] {
 
 standard_testfile step-reverse.c
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set lineno [gdb_get_line_number "STEP INTO THIS CALL"]
@@ -48,8 +48,9 @@ gdb_test "advance $lineno" ".*STEP INTO 
 
 gdb_test "b \*callee" "" "set breakpoint at callee's entry"
 
+set bpnum [get_integer_valueof "\$bpnum" 0]
 gdb_test "reverse-next" \
-    "Breakpoint.*, callee.*ENTER CALLEE.*" \
+    "Breakpoint $bpnum, callee.*" \
     "reverse-next over call trips user breakpoint at function entry"
 
 gdb_test "up" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/pipe-reverse.c ./gdb/testsuite/gdb.reverse/pipe-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/pipe-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/pipe-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,40 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+int fds[2] = { -1, -1 };
+
+int
+main (void)
+{
+  marker1 ();
+  pipe (fds);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/pipe-reverse.exp ./gdb/testsuite/gdb.reverse/pipe-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/pipe-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/pipe-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests pipe syscall for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variables were recorded properly on syscall, the old contents (-1)
+# will be remembered.  If not, new contents (the file fds from pipe) will be
+# used, and the test will fail.
+
+gdb_test "print fds" ".* = {-1, -1}" "check pipe record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/readv-reverse.c ./gdb/testsuite/gdb.reverse/readv-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/readv-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/readv-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <sys/uio.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+int fds[2] = { -1, -1 };
+char buf[5];
+const struct iovec v[4] = {
+  { &buf[1], 1 },
+  { &buf[0], 1 },
+  { &buf[3], 1 },
+  { &buf[2], 1 },
+};
+
+int
+main (void)
+{
+  marker1 ();
+  pipe (fds);
+  write (fds[1], "UNIX", 4);
+  readv (fds[0], v, 4);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/readv-reverse.exp ./gdb/testsuite/gdb.reverse/readv-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/readv-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/readv-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,58 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests readv syscall for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variables were recorded properly on syscall, the old contents ("")
+# will be remembered.  If not, new contents ("NUXI") will be
+# used, and the test will fail.
+
+gdb_test "print (int)buf\[0]" ".* = 0" "check readv record"
+gdb_test "print (int)buf\[1]" ".* = 0" "check readv record"
+gdb_test "print (int)buf\[2]" ".* = 0" "check readv record"
+gdb_test "print (int)buf\[3]" ".* = 0" "check readv record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/recvmsg-reverse.c ./gdb/testsuite/gdb.reverse/recvmsg-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/recvmsg-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/recvmsg-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,94 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <unistd.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+char wdata[] = "abcdef";
+
+struct iovec wv[1] = {
+  { wdata, 6 },
+};
+
+char wc[CMSG_SPACE (sizeof (struct ucred)) + CMSG_SPACE (sizeof (int))];
+
+struct msghdr wmsg = {
+  0, 0,
+  wv, 1,
+  wc, sizeof wc,
+  0,
+};
+
+char rdata[5] = "xxxx";
+
+struct iovec rv[2] = {
+  {&rdata[2], 2},
+  {&rdata[0], 2},
+};
+
+char rc[CMSG_SPACE (sizeof (struct ucred)) + 7];
+
+struct msghdr rmsg = {
+  0, 0,
+  rv, 2,
+  rc, sizeof rc,
+  0,
+};
+
+int fds[2];
+
+int
+main (void)
+{
+  int itrue = 1;
+  /* prepare cmsg to send */
+  struct cmsghdr *cm1 = CMSG_FIRSTHDR (&wmsg);
+  cm1->cmsg_len = CMSG_LEN (sizeof (struct ucred));
+  cm1->cmsg_level = AF_UNIX;
+  cm1->cmsg_type = SCM_CREDENTIALS;
+  struct ucred *uc = (void *) CMSG_DATA (cm1);
+  uc->pid = getpid ();
+  uc->uid = getuid ();
+  uc->gid = getgid ();
+  struct cmsghdr *cm2 = CMSG_NXTHDR (&wmsg, cm1);
+  cm2->cmsg_len = CMSG_LEN (sizeof (int));
+  cm2->cmsg_level = AF_UNIX;
+  cm2->cmsg_type = SCM_RIGHTS;
+  int *pfd = (void *) CMSG_DATA (cm2);
+  *pfd = 2;
+  /* do the syscalls */
+  marker1 ();
+  socketpair (AF_UNIX, SOCK_DGRAM, 0, fds);
+  setsockopt (fds[0], SOL_SOCKET, SO_PASSCRED, &itrue, sizeof itrue);
+  sendmsg (fds[1], &wmsg, 0);
+  recvmsg (fds[0], &rmsg, 0);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp ./gdb/testsuite/gdb.reverse/recvmsg-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/recvmsg-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,65 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests socketpair and recvmsg syscalls for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variables were recorded properly on syscall, the old contents will
+# be remembered.  If not, new contents will be used, and the test will fail.
+
+# rdata should be "xxxx", not "cdab"
+gdb_test "print rdata" ".* = \"xxxx\"" "check recvmsg record - rdata"
+
+# rmsg.msg_flags should be zeros, not MSG_TRUNC | MSG_CTRUNC
+gdb_test "print rmsg.msg_flags" ".* = 0" "check recvmsg record - rmsg"
+
+# rmsg.msg_controllen should be sizeof rc, not actual size of control data
+# (7 bytes less)
+gdb_test "print rmsg.msg_controllen - sizeof rc" ".* = 0" "check recvmsg record - rmsg"
+
+# rc should be zeros, not received cmsg
+gdb_test "print ((struct cmsghdr *)rc)->cmsg_len" ".* = 0" "check recvmsg record - cmsg"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/rerun-prec.c ./gdb/testsuite/gdb.reverse/rerun-prec.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/rerun-prec.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/rerun-prec.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/rerun-prec.exp ./gdb/testsuite/gdb.reverse/rerun-prec.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/rerun-prec.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/rerun-prec.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,13 @@ if {![supports_reverse] || ![supports_pr
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile [list $srcfile]]} {
+if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile]]} {
     return -1
 }
 
 # The bug is a regression in the sequence "run; record; run".
 runto main
-gdb_test_no_output "record" "Turn on process record"
+gdb_test_no_output "record" "turn on process record"
 
 gdb_run_cmd
 gdb_test_multiple "" "restarting inferior" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/s390-mvcle.c ./gdb/testsuite/gdb.reverse/s390-mvcle.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/s390-mvcle.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/s390-mvcle.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,54 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+
+char dst[0x1000000];
+char src[8] = "abcdefgh";
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+static void
+mvcle (void)
+{
+  register void *pdst asm("r2") = dst;
+  register size_t ndst asm("r3") = sizeof dst;
+  register void *psrc asm("r4") = src;
+  register size_t nsrc asm("r5") = sizeof src;
+  asm volatile ("0: mvcle 2, 4, 0x69\n"
+		"jo 0b\n"
+                : "=r" (pdst), "=r" (ndst), "=r" (psrc), "=r" (nsrc)
+                : "0" (pdst), "1" (ndst), "2" (psrc), "3" (nsrc)
+                : "cc", "memory");
+}
+
+int
+main (void)
+{
+  marker1 ();
+  mvcle ();
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/s390-mvcle.exp ./gdb/testsuite/gdb.reverse/s390-mvcle.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/s390-mvcle.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/s390-mvcle.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,63 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#
+# This test tests s390 MVCLE opcode for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+if { ! [istarget "s390*-*-*"] } {
+    verbose "Skipping s390 MVCLE instruction recording tests."
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker1" ".*$srcfile:.*"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variable was recorded properly on syscall, the old contents (0)
+# will be remembered.  If not, new contents ([abcdefghi]) will be used, and
+# the test will fail.
+
+gdb_test "print (int)dst\[0]" ".* = 0" "check MVCLE record 1"
+gdb_test "print (int)dst\[0x100000]" ".* = 0" "check MVCLE record 2"
+gdb_test "print (int)dst\[0xffffff]" ".* = 0" "check MVCLE record 3"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr1.c ./gdb/testsuite/gdb.reverse/shr1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/shr1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr2.c ./gdb/testsuite/gdb.reverse/shr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/shr2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr.h ./gdb/testsuite/gdb.reverse/shr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/shr.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/shr.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-precsave.exp ./gdb/testsuite/gdb.reverse/sigall-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/sigall-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2009-2015 Free Software Foundation, Inc.
+#   Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -154,7 +154,7 @@ runto gen_ABRT
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Run until end, then save execution log. 
@@ -162,7 +162,7 @@ if [supports_process_record] {
 set breakloc [gdb_get_line_number "end of main" "$srcfile"]
 gdb_test "break $breakloc" \
     "Breakpoint $decimal at .*$srcfile, line $breakloc\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 # Signal handlers must be disabled
 gdb_test "handle all nostop noprint"
@@ -274,7 +274,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-reverse.c ./gdb/testsuite/gdb.reverse/sigall-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/sigall-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-reverse.exp ./gdb/testsuite/gdb.reverse/sigall-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/sigall-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/sigall-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2009-2015 Free Software Foundation, Inc.
+#   Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -153,7 +153,7 @@ runto gen_ABRT
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # The list of signals that the program generates, in the order they
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.c ./gdb/testsuite/gdb.reverse/singlejmp-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/singlejmp-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp ./gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/singlejmp-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c ./gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S ./gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.S ./gdb/testsuite/gdb.reverse/singlejmp-reverse.S
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/singlejmp-reverse.S	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/singlejmp-reverse.S	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-precsave.exp ./gdb/testsuite/gdb.reverse/solib-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/solib-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,12 +40,12 @@ if [get_compiler_info] {
 # Compile the first without debug info so that
 # stepping and reverse stepping doesn't end up inside them.
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib1src} ${library1} ""] != "" } {
-    untested "Could not compile shared library1."
+    untested "failed to compile shared library 1"
     return -1
 }
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib2src} ${library2} "debug"] != "" } {
-    untested "Could not compile shared library2."
+    untested "failed to compile shared library 2"
     return -1
 }
 
@@ -58,7 +58,7 @@ set exec_opts [list debug shlib=${librar
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable \
 		     [concat $exec_opts additional_flags=-Wl,-z,norelro]] != ""
      && [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } {
-    untested "Could not compile $binfile."
+    untested "failed to compile"
     return -1
 }
      
@@ -76,20 +76,20 @@ gdb_start
 
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $library1
-gdb_load_shlibs $library2
+gdb_load_shlib $library1
+gdb_load_shlib $library2
 
 runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set end_of_main [gdb_get_line_number "end of main" ]
 gdb_test "break $end_of_main" \
     "Breakpoint $decimal at .*$srcfile, line $end_of_main\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
 
@@ -97,7 +97,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-reverse.c ./gdb/testsuite/gdb.reverse/solib-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/solib-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-reverse.exp ./gdb/testsuite/gdb.reverse/solib-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/solib-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/solib-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,19 +38,19 @@ if [get_compiler_info] {
 # Compile the first without debug info so that
 # stepping and reverse stepping doesn't end up inside them.
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib1src} ${library1} ""] != "" } {
-    untested "Could not compile shared library1."
+    untested "failed to compile shared library 1"
     return -1
 }
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib2src} ${library2} "debug"] != "" } {
-    untested "Could not compile shared library2."
+    untested "failed to compile shared library 2"
     return -1
 }
 
 set exec_opts [list debug shlib=${library1} shlib=${library2}]
 
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } {
-    untested "Could not compile $binfile."
+    untested "failed to compile"
     return -1
 }
      
@@ -68,14 +68,14 @@ gdb_start
 
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-gdb_load_shlibs $library1
-gdb_load_shlibs $library2
+gdb_load_shlib $library1
+gdb_load_shlib $library2
 
 runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-precsave.exp ./gdb/testsuite/gdb.reverse/step-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/step-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if ![supports_process_record] {
 standard_testfile step-reverse.c
 set precsave [standard_output_file step.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -36,21 +36,28 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set end_of_main [gdb_get_line_number "end of main" ]
 gdb_test "break $end_of_main" \
     "Breakpoint $decimal at .*$srcfile, line $end_of_main\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
-gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
+# This can take awhile.
+with_timeout_factor 20 {
+    gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
+}
+
+# So can this, against gdbserver, for example.
 
-gdb_test "record save $precsave" \
-    "Saved core file $precsave with execution log\."  \
-    "save process recfile"
+with_timeout_factor 10 {
+    gdb_test "record save $precsave" \
+	"Saved core file $precsave with execution log\."  \
+	"save process recfile"
+}
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
@@ -233,21 +240,26 @@ gdb_test_multiple "stepi" "$test_message
 
 # step backward into function (thru return)
 
-set test_message "reverse step into fn call"
+gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \
+    "reverse step into fn call"
+
+# step backward out of called function (thru call)
+
+set test_message "reverse step out of called fn"
 gdb_test_multiple "step" "$test_message" {
-    -re "RETURN FROM CALLEE.*$gdb_prompt $" {
+    -re "STEP INTO THIS CALL.*.*$gdb_prompt $" {
+	pass "$test_message"
+    }
+    -re "ARRIVED IN CALLEE.*$gdb_prompt $" {
 	send_gdb "step\n"
 	exp_continue
     }
-    -re "ARRIVED IN CALLEE.*$gdb_prompt $" {
-	pass "$test_message"
+    -re "ENTER CALLEE.*$gdb_prompt $" {
+	send_gdb "step\n"
+	exp_continue
     }
 }
 
-# step backward out of called function (thru call)
-
-gdb_test "step" ".*STEP INTO THIS CALL.*" "reverse step out of called fn"
-
 # next backward over call
 
 gdb_test "next" ".*NEXT OVER THIS CALL.*" "reverse next over call"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-reverse.c ./gdb/testsuite/gdb.reverse/step-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/step-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-reverse.exp ./gdb/testsuite/gdb.reverse/step-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/step-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/step-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if ![supports_reverse] {
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -34,7 +34,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # plain vanilla step/next (no count)
@@ -213,21 +213,26 @@ gdb_test_multiple "stepi" "$test_message
 
 # step backward into function (thru return)
 
-set test_message "reverse step into fn call"
+gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \
+    "reverse step into fn call"
+
+# step backward out of called function (thru call)
+
+set test_message "reverse step out of called fn"
 gdb_test_multiple "step" "$test_message" {
-    -re "RETURN FROM CALLEE.*$gdb_prompt $" {
+    -re "STEP INTO THIS CALL.*.*$gdb_prompt $" {
+	pass "$test_message"
+    }
+    -re "ARRIVED IN CALLEE.*$gdb_prompt $" {
 	send_gdb "step\n"
 	exp_continue
     }
-    -re "ARRIVED IN CALLEE.*$gdb_prompt $" {
-	pass "$test_message"
+    -re "ENTER CALLEE.*$gdb_prompt $" {
+	send_gdb "step\n"
+	exp_continue
     }
 }
 
-# step backward out of called function (thru call)
-
-gdb_test "step" ".*STEP INTO THIS CALL.*" "reverse step out of called fn"
-
 # next backward over call
 
 gdb_test "next" ".*NEXT OVER THIS CALL.*" "reverse next over call"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/time-reverse.c ./gdb/testsuite/gdb.reverse/time-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/time-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/time-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,42 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <time.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+time_t time_global = -1;
+
+int
+main (void)
+{
+  marker1 ();
+  syscall (SYS_time, &time_global);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/time-reverse.exp ./gdb/testsuite/gdb.reverse/time-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/time-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/time-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,55 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests time syscall for reverse execution.
+#
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variable was recorded properly on syscall, the old contents (-1)
+# will be remembered.  If not, new contents (current time) will be used,
+# and the test will fail.
+
+gdb_test "print time_global" ".* = -1" "check time record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-precsave.exp ./gdb/testsuite/gdb.reverse/until-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/until-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if ![supports_process_record] {
 standard_testfile until-reverse.c ur1.c
 set precsave [standard_output_file until.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile \
+if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $srcfile2]] } {
     return -1
 }
@@ -40,28 +40,28 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set end_of_main [gdb_get_line_number "set breakpoint 10a here" ]
 gdb_test "break $end_of_main" \
     "Breakpoint $decimal at .*$srcfile, line $end_of_main\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 # This can take awhile.
-with_timeout_factor 15 {
+with_timeout_factor 20 {
     gdb_test "continue" "Breakpoint .* set breakpoint 10a here .*" "run to end of main"
 }
 
 # So can this, against gdbserver, for example.
 
-with_timeout_factor 3 {
+with_timeout_factor 10 {
     gdb_test "record save $precsave" \
 	"Saved core file $precsave with execution log\."  \
 	"save process recfile"
 }
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
@@ -91,7 +91,7 @@ gdb_test "until $bp_location19" \
 # Finish out to main scope
 #
 gdb_test "finish" \
-    " in main .*$srcfile:$bp_location1.*" \
+    "main .*$srcfile:.*" \
     "finish to main"
 
 # Advance to a function called by main (marker2)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-reverse.c ./gdb/testsuite/gdb.reverse/until-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/until-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,19 +33,20 @@ int factorial(int);
 int
 main (int argc, char **argv, char **envp)
 {
-    if (argc == 12345) {  /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
-	fprintf (stderr, "usage:  factorial <number>\n");
-	return 1;
+  if (argc == 12345)
+    {
+      /* We're used by a test that requires malloc, so make sure it is
+	 in the executable.  */
+      (void) malloc (1);
+      return 1;
     }
-    printf ("%d\n", factorial (atoi ("6")));  /* set breakpoint 1 here */
+
+    factorial (atoi ("6"));  /* set breakpoint 1 here */
     /* set breakpoint 12 here */
     marker1 ();  /* set breakpoint 11 here */
     marker2 (43); /* set breakpoint 20 here */
     marker3 ("stack", "trace"); /* set breakpoint 21 here */
     marker4 (177601976L);
-    /* We're used by a test that requires malloc, so make sure it is
-       in the executable.  */
-    (void)malloc (1);
 
     argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
     return argc;  /* set breakpoint 10 here */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-reverse.exp ./gdb/testsuite/gdb.reverse/until-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/until-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/until-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if ![supports_reverse] {
 
 standard_testfile .c ur1.c
 
-if { [prepare_for_testing $testfile.exp $testfile \
+if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $srcfile2]] } {
     return -1
 }
@@ -38,7 +38,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Verify that plain vanilla "until <location>" works.
@@ -64,7 +64,7 @@ gdb_test "until $bp_location19" \
 # Finish out to main scope
 #
 gdb_test "finish" \
-    " in main .*$srcfile:$bp_location1.*" \
+    "main .*$srcfile:.*" \
     "finish to main"
 
 # Advance to a function called by main (marker2)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/ur1.c ./gdb/testsuite/gdb.reverse/ur1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/ur1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/ur1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1992-2015 Free Software Foundation, Inc.
+   Copyright 1992-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/waitpid-reverse.c ./gdb/testsuite/gdb.reverse/waitpid-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/waitpid-reverse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/waitpid-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/wait.h>
+
+void
+marker1 (void)
+{
+}
+
+void
+marker2 (void)
+{
+}
+
+int status = -1;
+
+int
+main (void)
+{
+  marker1 ();
+  if (!fork ())
+    _exit (123);
+  else
+    waitpid (-1, &status, 0);
+  marker2 ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/waitpid-reverse.exp ./gdb/testsuite/gdb.reverse/waitpid-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/waitpid-reverse.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/waitpid-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,57 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+#
+# This test tests waitpid syscall for reverse execution.
+#
+# Also serves as regression test for gdb/19187 (recording across a
+# fork).
+
+if ![supports_reverse] {
+    return
+}
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+    return -1
+}
+
+runto main
+
+if [supports_process_record] {
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
+}
+
+gdb_test "break marker2" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker2"
+
+gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
+
+gdb_test "break marker1" \
+    "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+    "set breakpoint at marker1"
+
+gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
+
+# If the variable was recorded properly on syscall, the old contents (-1)
+# will be remembered.  If not, new contents (status) will be used, and
+# the test will fail.
+
+gdb_test "print status" ".* = -1" "check waitpid record"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-precsave.exp ./gdb/testsuite/gdb.reverse/watch-precsave.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-precsave.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/watch-precsave.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if ![supports_process_record] {
 standard_testfile watch-reverse.c
 set precsave [standard_output_file watch.precsave]
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -33,13 +33,13 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 set end_location  [gdb_get_line_number "end of main"  ]
 gdb_test "break $end_location" \
     "Breakpoint $decimal at .*$srcfile, line $end_location\." \
-    "BP at end of main"
+    "breakpoint at end of main"
 
 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
 
@@ -47,7 +47,7 @@ gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
     "save process recfile"
 
-gdb_test "kill" "" "Kill process, prepare to debug log file" \
+gdb_test "kill" "" "kill process, prepare to debug log file" \
     "Kill the program being debugged\\? \\(y or n\\) " "y"
 
 gdb_test "record restore $precsave" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-reverse.c ./gdb/testsuite/gdb.reverse/watch-reverse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-reverse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/watch-reverse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-reverse.exp ./gdb/testsuite/gdb.reverse/watch-reverse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.reverse/watch-reverse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.reverse/watch-reverse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if ![supports_reverse] {
 
 standard_testfile
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
@@ -32,7 +32,7 @@ runto main
 
 if [supports_process_record] {
     # Activate process record/replay
-    gdb_test_no_output "record" "Turn on process record"
+    gdb_test_no_output "record" "turn on process record"
 }
 
 # Test software watchpoints
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/expr.exp ./gdb/testsuite/gdb.rust/expr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/expr.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/expr.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,139 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test basic expression parsing and evaluation, without requiring a
+# Rust compiler.  This serves as a smoke test.
+
+load_lib "rust-support.exp"
+if {[skip_rust_tests]} { continue }
+
+gdb_start
+
+gdb_test_no_output "set var \$something = 27"
+
+if {![set_lang_rust]} {
+    warning "Rust expression tests suppressed."
+    continue
+}
+
+gdb_test "print 9__97" " = 997"
+gdb_test "print -5" " = -5"
+gdb_test "print +5" " = 5"
+gdb_test "print +-+-5" " = 5"
+gdb_test "print 3_2i32" " = 32"
+gdb_test "print 32i64" " = 32"
+gdb_test "print 8u8" " = 8"
+gdb_test "print 0x1f" " = 31"
+gdb_test "print 0o07" " = 7"
+gdb_test "print 0o70" " = 56"
+gdb_test "print 0b1_111" " = 15"
+gdb_test "print 32usize" " = 32"
+gdb_test "print 0x_4" " = 4"
+
+gdb_test "print 'z'" " = 122 'z'"
+gdb_test "print '\\t'" " = 9 '\\\\t'"
+gdb_test "print '\\n'" " = 10 '\\\\n'"
+gdb_test "print '\\r'" " = 13 '\\\\r'"
+gdb_test "print '\\\\'" " = 92 '\\\\\\\\'"
+gdb_test "print '\\0'" " = 0 '\\\\0'"
+gdb_test "print '\\''" " = 39 '\\\\''"
+gdb_test "print '\\\"'" " = 34 '\"'"
+gdb_test "print '\\xff'" " = 255 '\\\\xff'"
+gdb_test "print '\\xFF'" " = 255 '\\\\xff'"
+gdb_test "print '\\u\{F0eF\}'" " = 61679 '\\\\u\\{00f0ef\\}'"
+
+gdb_test "print b'z'" " = 122"
+gdb_test "print b'\\xfe'" " = 254"
+gdb_test "print b'\\t'" " = 9"
+gdb_test "print b'\\n'" " = 10"
+gdb_test "print b'\\r'" " = 13"
+gdb_test "print b'\\\\'" " = 92"
+gdb_test "print b'\\0'" " = 0"
+gdb_test "print b'\\''" " = 39"
+gdb_test "print b'\\\"'" " = 34"
+gdb_test "print b'\\xff'" " = 255"
+
+gdb_test "print 23.5" " = 23.5"
+gdb_test "print 23.5e1" " = 235"
+gdb_test "print 2e4" " = 20000"
+gdb_test "print 2_E+4_f64" " = 20000"
+gdb_test "print 5e-1" " = 0.5"
+gdb_test "print 5e-1f32" " = 0.5"
+
+gdb_test "print false" " = false"
+gdb_test "print true" " = true"
+
+gdb_test "print 1+2" " = 3"
+gdb_test "print 1i32 + 2i32" " = 3"
+gdb_test "print 2.0 - 1.0" " = 1"
+gdb_test "print !false" " = true"
+gdb_test "print !true" " = false"
+gdb_test "print !0u8" " = 255"
+gdb_test "print 7 * 7" " = 49"
+gdb_test "print 7usize * 7usize" " = 49"
+gdb_test "print 42 / 7" " = 6"
+gdb_test "print 42 % 7" " = 0"
+gdb_test "print 1.0 / 2.0" " = 0.5"
+gdb_test "print 1 < 2" " = true"
+gdb_test "print !(1 < 2)" " = false"
+gdb_test "print 3 + 4 * 7" " = 31"
+gdb_test "print 1 > 2" " = false"
+gdb_test "print 1 | 2" " = 3"
+gdb_test "print 1 & 2" " = 0"
+gdb_test "print 3 & 2" " = 2"
+gdb_test "print 3 ^ 2" " = 1"
+gdb_test "print (1 < 0) || true" " = true"
+gdb_test "print (1 > 0) && false" " = false"
+gdb_test "print 'z' == 'z'" " = true"
+gdb_test "print '\\u{1016f}' != 'q'" " = true"
+gdb_test "print 32 <= 32" " = true"
+gdb_test "print 32 >= 32" " = true"
+gdb_test "print 1 << 5" " = 32"
+gdb_test "print 32usize >> 5" " = 1"
+gdb_test "ptype 32i32 as f64" "type = f64"
+
+gdb_test "ptype 0xf9f9f9f90000" "type = i64"
+
+gdb_test "print ()" " = \\(\\)"
+
+gdb_test "print \[1,2,3,4\]" " = \\\[1, 2, 3, 4\\\]"
+gdb_test "ptype \[1,2,3,4\]" "type = \\\[i32; 4\\\]"
+gdb_test "print \[mut 1,2,3,4\]" " = \\\[1, 2, 3, 4\\\]"
+
+gdb_test "print b\"hi rust\"" " = b\"hi rust\""
+# This isn't rusty syntax yet, but that's another bug -- this is just
+# testing that byte escapes work properly.
+gdb_test "print b\"\\xddhi bob\"" " = b\"\\\\335hi bob\""
+gdb_test "print b\"has\\0nul\"" " = b\"has\\\\000nul\""
+
+gdb_test "print br##\"hi\"##" " = b\"hi\""
+gdb_test "print br##\"hi" "Unexpected EOF in string"
+gdb_test "print br##\"hi\"" "Unexpected EOF in string"
+gdb_test "print br##\"hi\"#" "Unexpected EOF in string"
+
+# Test that convenience variables and functions work with the Rust
+# parser.
+gdb_test "print \$something" " = 27"
+gdb_test "print \$_isvoid(\$nosuchvariable)" " = 1"
+gdb_test "print \$_isvoid(\$something)" " = 0"
+
+gdb_test "print \[23usize; 4\]" " = \\\[23, 23, 23, 23\\\]"
+gdb_test "ptype \[23usize; 4\]" " = \\\[usize; 4\\\]"
+gdb_test "print \[mut 23usize; 4\]" " = \\\[23, 23, 23, 23\\\]"
+
+# Test a lexer corner case.
+gdb_test "print r#" "syntax error in expression, near `#'\\."
+
+gdb_test "printf \"%d %d\\n\", 23+1, 23-1" "24 22"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/generics.exp ./gdb/testsuite/gdb.rust/generics.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/generics.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/generics.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,45 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test expressions involving generics.
+
+load_lib rust-support.exp
+if {[skip_rust_tests]} {
+    continue
+}
+
+standard_testfile .rs
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
+    return -1
+}
+
+set line [gdb_get_line_number "set breakpoint here"]
+if {![runto ${srcfile}:$line]} {
+    untested "could not run to breakpoint"
+    return -1
+}
+
+gdb_test "print identity::<u32>(23u32)" " = 23"
+gdb_test "ptype identity::<u32>(23u32)" " = u32"
+gdb_test "print identity::<f64>(23)" " = 23"
+gdb_test "ptype identity::<f64>(23)" " = f64"
+
+gdb_test "print e" " = generics::Hold<i32> \\(7\\)"
+gdb_test "print generics::Hold::<i32> (7)" " = generics::Hold<i32> \\(7\\)"
+gdb_test "print Hold::<i32> (7)" " = generics::Hold<i32> \\(7\\)"
+gdb_test "print identity::< Hold<i32> >(e)" " = generics::Hold<i32> \\(7\\)"
+gdb_test "print identity::<generics::Hold<i32> >(e)" \
+    " = generics::Hold<i32> \\(7\\)"
+gdb_test "print identity::<Hold<i32>>(e)" " = generics::Hold<i32> \\(7\\)"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/generics.rs ./gdb/testsuite/gdb.rust/generics.rs
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/generics.rs	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/generics.rs	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,44 @@
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_assignments)]
+
+
+#[derive(Clone, Copy)]
+struct Hold<T>(T);
+
+pub fn identity<T>(x: T) -> T { x }
+
+fn dowhatever() { () }
+
+pub fn main() {
+    let a = identity(23u32);
+    let b = identity(23.0f64);
+
+    let d = identity::<u32>(7);
+
+    let e = Hold(7);
+    let f = Hold::<u8>(7);
+
+    let g = identity(e);
+
+    let h = Hold(e);
+    let i = identity(h);
+
+    let z = ();                          // set breakpoint here
+    dowhatever()
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/methods.exp ./gdb/testsuite/gdb.rust/methods.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/methods.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/methods.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,63 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test method calls.
+
+load_lib rust-support.exp
+if {[skip_rust_tests]} {
+    continue
+}
+
+standard_testfile .rs
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
+    return -1
+}
+
+set line [gdb_get_line_number "set breakpoint 1 here"]
+if {![runto ${srcfile}:$line]} {
+    untested "could not run to breakpoint"
+    return -1
+}
+
+gdb_test "print x" " = methods::HasMethods \\{value: 0\\}"
+
+gdb_test "print methods::HasMethods{value: 73}" \
+    " = methods::HasMethods \\{value: 73\\}"
+gdb_test "print methods::HasMethods{..x}" \
+    " = methods::HasMethods \\{value: 0\\}"
+gdb_test "print methods::HasMethods{value:19, ..x}" \
+    " = methods::HasMethods \\{value: 19\\}"
+
+gdb_test "print x.take()" " = methods::HasMethods \\{value: 0\\}"
+gdb_test "print *(x.incr())" " = methods::HasMethods \\{value: 1\\}"
+gdb_test "print *((&mut x).incr())" " = methods::HasMethods \\{value: 2\\}"
+
+gdb_test "print a.value()" " = 23"
+gdb_test "print (&mut a).value()" " = 23"
+# gdb_test "print a.take_value().0" " = 23"
+gdb_test "print b.value()" " = 24"
+
+gdb_test "print c.value()" " = 452"
+
+set line [gdb_get_line_number "set breakpoint 2 here"]
+gdb_breakpoint ${srcfile}:$line
+gdb_continue_to_breakpoint "second breakpoint"
+
+gdb_test "print *self" " = 23"
+
+
+gdb_test "info functions HasMethods::new" \
+    "fn methods::HasMethods::new\\(\\) -> methods::HasMethods;"
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/methods.rs ./gdb/testsuite/gdb.rust/methods.rs
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/methods.rs	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/methods.rs	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,129 @@
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_assignments)]
+
+
+pub trait Whatever {
+    fn whatever(&self) -> i32;
+    fn static_i32(x: i32) -> Self;
+}
+
+impl Whatever for i32 {
+    fn whatever(&self) -> i32 {
+        *self                   // set breakpoint 2 here
+    }
+
+    fn static_i32(x: i32) -> i32 {
+        x
+    }
+}
+
+pub struct HasMethods {
+    value: i32
+}
+
+impl HasMethods {
+    pub fn new() -> HasMethods {
+        HasMethods { value: 0 }
+    }
+
+    pub fn incr(&mut self) -> &mut HasMethods {
+        self.value += 1;
+        self
+    }
+
+    pub fn take(self) -> HasMethods {
+        self
+    }
+}
+
+impl Whatever for HasMethods {
+    fn whatever(&self) -> i32 {
+        self.value
+    }
+
+    fn static_i32(x: i32) -> HasMethods {
+        HasMethods{value: x}
+    }
+}
+
+enum SomeEnum {
+    One,
+    Two,
+    Three(i32),
+    Four{x: i32}
+}
+
+impl SomeEnum {
+    fn value(&self) -> i32 {
+        match *self {
+            SomeEnum::Three(x) => x,
+            SomeEnum::Four{x} => x,
+            _ => 0
+        }
+    }
+
+    fn mut_value(&mut self) -> i32 {
+        match *self {
+            SomeEnum::Three(x) => x,
+            SomeEnum::Four{x} => x,
+            _ => 0
+        }
+    }
+
+    fn take_value(self) -> (i32, SomeEnum) {
+        (match self {
+            SomeEnum::Three(x) => x,
+            SomeEnum::Four{x} => x,
+            _ => 0
+        }, self)
+    }
+}
+
+enum SimpleEnum {
+    One,
+    Two,
+    Three
+}
+
+impl SimpleEnum {
+    fn value(&self) -> i32 {
+        match *self {
+            SimpleEnum::One => 1,
+            SimpleEnum::Two => 2,
+            SimpleEnum::Three => 452,
+        }
+    }
+}
+
+fn main() {
+    let mut a = SomeEnum::Three(23);
+    let av = a.value();
+    let amv = (&mut a).mut_value();
+    let atv = a.take_value();
+    let b = SomeEnum::Four{x: 24};
+    let bv = b.value();
+    let c = SimpleEnum::Three;
+    let d = c.value();
+    let mut x = HasMethods::new();
+    x.incr();               // set breakpoint 1 here
+    (&mut x).incr();
+    let y = 23i32.whatever();
+    println!("{}", y);
+    let z = x.take();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/modules.exp ./gdb/testsuite/gdb.rust/modules.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/modules.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/modules.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,89 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test name lookup.
+
+load_lib rust-support.exp
+if {[skip_rust_tests]} {
+    continue
+}
+
+standard_testfile .rs
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
+    return -1
+}
+
+set line [gdb_get_line_number "set breakpoint here"]
+if {![runto ${srcfile}:$line]} {
+    untested "could not run to breakpoint"
+    return -1
+}
+
+# Currently a closure type is not described by rustc.
+# https://github.com/rust-lang/rust/issues/33121
+# gdb_test "call f2()" "lambda f2"
+
+gdb_test "call f3()" "mod1::inner::innest::f3"
+gdb_test "call self::f2()" "mod1::inner::innest::f2"
+gdb_test "call self::super::f2()" "mod1::inner::f2"
+gdb_test "call super::f2()" "mod1::inner::f2"
+gdb_test "call self::super::super::f2()" "mod1::f2"
+gdb_test "call super::super::f2()" "mod1::f2"
+gdb_test "call ::f2()" "::f2"
+gdb_test "call super::super::super::f2()" \
+    "Too many super:: uses from 'modules::mod1::inner::innest'"
+gdb_test "call extern modules::mod1::f2()" "mod1::f2"
+
+gdb_test_sequence "ptype ::Generic::<::Generic<::Type> >" "" {
+    "type = struct modules::Generic<modules::Generic<modules::Type>> \\("
+    "  modules::Generic<modules::Type>,"
+    "\\)"
+}
+
+gdb_test_sequence "ptype ::Generic::<::Generic<extern modules::Type> >" "" {
+    "type = struct modules::Generic<modules::Generic<modules::Type>> \\("
+    "  modules::Generic<modules::Type>,"
+    "\\)"
+}
+
+gdb_test_sequence "ptype ::Generic::<::Generic<::mod1::Type>>" "" {
+    "type = struct modules::Generic<modules::Generic<modules::mod1::Type>> \\("
+    "  modules::Generic<modules::mod1::Type>,"
+    "\\)"
+}
+
+gdb_test_sequence "ptype ::Generic::<::Generic<super::Type>>" "" {
+    "type = struct modules::Generic<modules::Generic<modules::mod1::inner::Type>> \\("
+    "  modules::Generic<modules::mod1::inner::Type>,"
+    "\\)"
+}
+
+gdb_test_sequence "ptype ::Generic::<::Generic<self::Type>>" "" {
+    "type = struct modules::Generic<modules::Generic<modules::mod1::inner::innest::Type>> \\("
+    "  modules::Generic<modules::mod1::inner::innest::Type>,"
+    "\\)"
+}
+
+# Not working yet.
+# gdb_test_sequence "ptype ::Generic<Type>" "" ...
+
+# Some basic linespec tests.
+foreach mod {mod1::inner::innest mod1::inner mod1 {}} {
+    if {$mod != ""} {
+	append mod ::
+    }
+    gdb_breakpoint modules::${mod}f2 message
+    gdb_breakpoint "*::${mod}f2" message
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/modules.rs ./gdb/testsuite/gdb.rust/modules.rs
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/modules.rs	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/modules.rs	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,90 @@
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_assignments)]
+
+fn f2() {
+    println!("::f2");
+}
+
+pub struct Generic<T>(T);
+
+pub struct Type;
+
+pub mod mod1 {
+    pub struct Type(usize, isize);
+
+    pub mod inner {
+        pub struct Type(f64);
+
+        pub mod innest {
+            pub struct Type {pub x : u32}
+
+            fn wrap<T> (x: T) -> ::Generic<::Generic<T>> {
+                ::Generic(::Generic(x))
+            }
+
+            pub fn f1 () {
+                struct Type(i8);
+
+                let x: u8 = 0;
+
+                let ct = ::Type;
+                let ctg = wrap(ct);
+                let m1t = ::mod1::Type(23, 97);
+                let m1tg = wrap(m1t);
+                let innert = super::Type(10101.5);
+                let innertg = wrap(innert);
+                let innestt = self::Type{x: 0xfff};
+                let innesttg = wrap(innestt);
+                let f1t = Type(9);
+                let f1tg = wrap(f1t);
+
+                let f2 = || println!("lambda f2");
+
+                f2();           // set breakpoint here
+                f3();
+                self::f2();
+                super::f2();
+                self::super::f2();
+                self::super::super::f2();
+                super::super::f2();
+                ::f2();
+            }
+
+            pub fn f2() {
+                println!("mod1::inner::innest::f2");
+            }
+
+            pub fn f3() {
+                println!("mod1::inner::innest::f3");
+            }
+        }
+
+        pub fn f2() {
+            println!("mod1::inner::f2");
+        }
+    }
+
+    pub fn f2() {
+        println!("mod1::f2");
+    }
+}
+
+fn main () {
+    mod1::inner::innest::f1();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/simple.exp ./gdb/testsuite/gdb.rust/simple.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/simple.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/simple.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,248 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test expression parsing and evaluation that requires Rust compiler.
+
+load_lib rust-support.exp
+if {[skip_rust_tests]} {
+    continue
+}
+
+standard_testfile .rs
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
+    return -1
+}
+
+set line [gdb_get_line_number "set breakpoint here"]
+if {![runto ${srcfile}:$line]} {
+    untested "could not run to breakpoint"
+    return -1
+}
+
+gdb_test "print a" " = \\(\\)"
+gdb_test "ptype a" " = \\(\\)"
+gdb_test "print sizeof(a)" " = 0"
+
+gdb_test "print b" " = \\\[\\\]"
+gdb_test "ptype b" " = \\\[i32; 0\\\]"
+gdb_test "print *(&b as *const \[i32; 0\])" " = \\\[\\\]"
+gdb_test "print *(&b as *const \[i32; 0_0\])" " = \\\[\\\]"
+
+gdb_test "print c" " = 99"
+gdb_test "ptype c" " = i32"
+gdb_test "print sizeof(c)" " = 4"
+
+gdb_test "print c = 87" " = \\(\\)"
+gdb_test "print c" " = 87"
+gdb_test "print c += 3" " = \\(\\)"
+gdb_test "print c" " = 90"
+gdb_test "print c -= 90" " = \\(\\)"
+gdb_test "print c" " = 0"
+gdb_test "print *&c" " = 0"
+gdb_test "print *(&c as &i32)" " = 0"
+gdb_test "print *(&c as *const i32)" " = 0"
+gdb_test "print *(&c as *mut i32)" " = 0"
+
+gdb_test "print j" " = simple::Unit"
+gdb_test "ptype j" " = struct simple::Unit"
+gdb_test "print j2" " = simple::Unit"
+gdb_test "ptype j2" " = struct simple::Unit"
+gdb_test "print simple::Unit" " = simple::Unit"
+gdb_test "print simple::Unit{}" " = simple::Unit"
+
+gdb_test "print g" " = \\(u8 \\(\\*\\)\\\[6\\\]\\) $hex b\"hi bob\""
+gdb_test "ptype g" " = u8 \\(\\*\\)\\\[6\\\]"
+
+gdb_test "print v" " = simple::Something::Three"
+gdb_test_sequence "ptype v" "" {
+    " = enum simple::Something \\{"
+    "  One,"
+    "  Two,"
+    "  Three,"
+    "\\}"
+}
+
+gdb_test "print w" " = \\\[1, 2, 3, 4\\\]"
+gdb_test "ptype w" " = \\\[i32; 4\\\]"
+gdb_test "print w\[2\]" " = 3"
+gdb_test "print w\[2\] @ 2" " = \\\[3, 4\\\]"
+gdb_test "print w_ptr\[2\]" " = 3"
+gdb_test "print fromslice" " = 3"
+gdb_test "print slice\[0\]" " = 3"
+gdb_test "print slice as &\[i32\]\[0\]" " = 3"
+
+gdb_test "print x" " = \\(23, 25\\.5\\)"
+gdb_test "ptype x" " = \\(i32, f64\\)"
+gdb_test "print x as (i32,f64)" " = \\(23, 25\\.5\\)"
+
+gdb_test "print y" " = simple::HiBob \\{field1: 7, field2: 8\\}"
+gdb_test_sequence "ptype y" "" {
+    " = struct simple::HiBob \\{"
+    "  field1: i32,"
+    "  field2: u64,"
+    "\\}"
+}
+gdb_test "print y.field2" " = 8"
+
+gdb_test "print z" " = simple::ByeBob \\(7, 8\\)"
+gdb_test_sequence "ptype z" "" {
+    " = struct simple::ByeBob \\("
+    "  i32,"
+    "  u64,"
+    "\\)"
+}
+gdb_test "print z.1" " = 8"
+
+gdb_test "print univariant" " = simple::Univariant::Foo{a: 1}"
+gdb_test "print univariant.a" " = 1"
+gdb_test "print univariant_anon" " = simple::UnivariantAnon::Foo\\(1\\)"
+gdb_test "print univariant_anon.0" " = 1"
+
+gdb_test_sequence "ptype simple::Univariant" "" {
+    "type = enum simple::Univariant \\{"
+    "  Foo\\{a: u8\\},"
+    "\\}"
+}
+
+gdb_test_sequence "ptype simple::UnivariantAnon" "" {
+    "type = enum simple::UnivariantAnon \\{"
+    "  Foo\\(u8\\),"
+    "\\}"
+}
+
+gdb_test_sequence "ptype simple::ByeBob" "" {
+    " = struct simple::ByeBob \\("
+    "  i32,"
+    "  u64,"
+    "\\)"
+}
+gdb_test "print simple::ByeBob(0xff, 5)" \
+    " = simple::ByeBob \\(255, 5\\)"
+gdb_test "print simple::ByeBob\{field1: 0xff, field2:5\}" \
+    "Struct expression applied to non-struct type"
+
+gdb_test "print simple::HiBob(0xff, 5)" \
+    "Type simple::HiBob is not a tuple struct"
+gdb_test "print nosuchsymbol" \
+    "No symbol 'nosuchsymbol' in current context"
+
+gdb_test "print e" " = simple::MoreComplicated::Two\\(73\\)"
+gdb_test "print e2" \
+    " = simple::MoreComplicated::Four\\{this: true, is: 8, a: 109 'm', struct_: 100, variant: 10\\}"
+gdb_test "print sizeof(e)" " = 24"
+gdb_test_sequence "ptype e" "" {
+    " = enum simple::MoreComplicated \\{"
+    "  One,"
+    "  Two\\(i32\\),"
+    "  Three\\(simple::HiBob\\),"
+    "  Four\\{this: bool, is: u8, a: char, struct_: u64, variant: u32\\},"
+    "\\}"
+}
+
+gdb_test "print e.0" " = 73"
+gdb_test "print e.1" \
+    "Cannot access field 1 of variant simple::MoreComplicated::Two, there are only 1 fields"
+gdb_test "print e.foo" \
+    "Attempting to access named field foo of tuple variant simple::MoreComplicated::Two, which has only anonymous fields"
+
+gdb_test "print e2.variant" " = 10"
+gdb_test "print e2.notexist" \
+    "Could not find field notexist of struct variant simple::MoreComplicated::Four"
+gdb_test "print e2.0" \
+    "Variant simple::MoreComplicated::Four is not a tuple variant"
+
+gdb_test "print k" " = simple::SpaceSaver::Nothing"
+gdb_test "print l" " = simple::SpaceSaver::Thebox\\(9, $hex\\)"
+gdb_test "print *l.1" " = 1729"
+
+gdb_test "print diff2(3, 7)" " = -4"
+gdb_test "print self::diff2(8, 9)" " = -1"
+gdb_test "print ::diff2(23, -23)" " = 46"
+
+gdb_test "ptype diff2" "fn \\(i32, i32\\) -> i32"
+gdb_test "ptype empty" "fn \\(\\)"
+
+gdb_test "print (diff2 as fn(i32, i32) -> i32)(19, -2)" " = 21"
+
+# We need the ".*" because currently we don't extract the length and
+# use it to intelligently print the string data.
+gdb_test "print \"hello rust\"" \
+    " = &str \\{data_ptr: $hex \"hello rust.*\", length: 10\\}"
+gdb_test "print \"hello" "Unexpected EOF in string"
+gdb_test "print r##\"hello \" rust\"##" \
+    " = &str \\{data_ptr: $hex \"hello \\\\\" rust.*\", length: 12\\}"
+gdb_test "print r\"hello" "Unexpected EOF in string"
+gdb_test "print r###\"###hello\"" "Unexpected EOF in string"
+gdb_test "print r###\"###hello\"##" "Unexpected EOF in string"
+gdb_test "print r###\"hello###" "Unexpected EOF in string"
+
+gdb_test "print 0..5" " = .*::ops::Range.* \\{start: 0, end: 5\\}"
+gdb_test "print ..5" " = .*::ops::RangeTo.* \\{end: 5\\}"
+gdb_test "print 5.." " = .*::ops::RangeFrom.* \\{start: 5\\}"
+gdb_test "print .." " = .*::ops::RangeFull"
+
+gdb_test "print str_some" \
+    " = core::option::Option<collections::string::String>::Some\\(collections::string::String .*"
+gdb_test "print str_none" " = core::option::Option<collections::string::String>::None"
+gdb_test "print int_some" " = core::option::Option::Some\\(1\\)"
+gdb_test "print int_none" " = core::option::Option::None"
+gdb_test "print box_some" " = core::option::Option<Box<u8>>::Some\\(.*\\)"
+gdb_test "print box_none" " = core::option::Option<Box<u8>>::None"
+gdb_test "print custom_some" \
+    " = simple::NonZeroOptimized::Value\\(collections::string::String .*"
+gdb_test "print custom_none" " = simple::NonZeroOptimized::Empty"
+
+proc test_one_slice {svar length base range} {
+    global hex
+
+    set result " = &\\\[.*\\\] \\{data_ptr: $hex, length: $length\\}"
+
+    gdb_test "print $svar" $result
+    gdb_test "print &${base}\[${range}\]" $result
+}
+
+test_one_slice slice 1 w 2..3
+test_one_slice slice2 1 slice 0..1
+
+test_one_slice all1 4 w ..
+test_one_slice all2 1 slice ..
+
+test_one_slice from1 3 w 1..
+test_one_slice from2 0 slice 1..
+
+test_one_slice to1 3 w ..3
+test_one_slice to2 1 slice ..1
+
+gdb_test "print w\[2..3\]" "Can't take slice of array without '&'"
+
+
+gdb_test_sequence "complete print y.f" "" \
+    {"print y.field1" "print y.field2"}
+gdb_test_sequence "complete print y." "" \
+    {"print y.field1" "print y.field2"}
+
+# Unimplemented, but we can at least test the parser productions.
+gdb_test "print (1,2,3)" "Tuple expressions not supported yet"
+gdb_test "print (1,)" "Tuple expressions not supported yet"
+gdb_test "print (1)" " = 1"
+
+gdb_test "print 23..97.0" "Range expression with different types"
+
+gdb_test "print (*parametrized.next.val)" \
+    " = simple::ParametrizedStruct<i32> {next: simple::ParametrizedEnum<Box<simple::ParametrizedStruct<i32>>>::Empty, value: 1}"
+gdb_test "print parametrized.next.val" \
+    " = \\(simple::ParametrizedStruct<i32> \\*\\) $hex"
+gdb_test "print parametrized" \
+    " = simple::ParametrizedStruct<i32> \\{next: simple::ParametrizedEnum<Box<simple::ParametrizedStruct<i32>>>::Val\\{val: $hex\\}, value: 0\\}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/simple.rs ./gdb/testsuite/gdb.rust/simple.rs
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.rust/simple.rs	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.rust/simple.rs	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,153 @@
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_assignments)]
+
+
+pub struct HiBob {
+    pub field1: i32,
+    field2: u64,
+}
+
+struct ByeBob(i32, u64);
+
+enum Something {
+    One,
+    Two,
+    Three
+}
+
+enum MoreComplicated {
+    One,
+    Two(i32),
+    Three(HiBob),
+    Four{this: bool, is: u8, a: char, struct_: u64, variant: u32},
+}
+
+// tests the nonzero optimization, but fields are reversed
+enum NonZeroOptimized {
+    Empty,
+    Value(String),
+}
+
+fn diff2(x: i32, y: i32) -> i32 {
+    x - y
+}
+
+// Empty function, should not have "void"
+// or "()" in its return type
+fn empty() {
+
+}
+
+pub struct Unit;
+
+// This triggers the non-zero optimization that yields a different
+// enum representation in the debug info.
+enum SpaceSaver {
+    Thebox(u8, Box<i32>),
+    Nothing,
+}
+
+enum Univariant {
+    Foo {a: u8}
+}
+enum UnivariantAnon {
+    Foo(u8)
+}
+
+enum ParametrizedEnum<T> {
+    Val { val: T },
+    Empty,
+}
+
+struct ParametrizedStruct<T> {
+    next: ParametrizedEnum<Box<ParametrizedStruct<T>>>,
+    value: T
+}
+
+fn main () {
+    let a = ();
+    let b : [i32; 0] = [];
+
+    let mut c = 27;
+    let d = c = 99;
+
+    let e = MoreComplicated::Two(73);
+    let e2 = MoreComplicated::Four {this: true, is: 8, a: 'm',
+                                    struct_: 100, variant: 10};
+
+    let f = "hi bob";
+    let g = b"hi bob";
+    let h = b'9';
+
+    let i = ["whatever"; 8];
+
+    let j = Unit;
+    let j2 = Unit{};
+
+    let k = SpaceSaver::Nothing;
+    let l = SpaceSaver::Thebox(9, Box::new(1729));
+
+    let v = Something::Three;
+    let w = [1,2,3,4];
+    let w_ptr = &w[0];
+    let x = (23, 25.5);
+    let y = HiBob {field1: 7, field2: 8};
+    let z = ByeBob(7, 8);
+
+    let univariant = Univariant::Foo {a : 1};
+    let univariant_anon = UnivariantAnon::Foo(1);
+
+    let slice = &w[2..3];
+    let fromslice = slice[0];
+    let slice2 = &slice[0..1];
+
+    let all1 = &w[..];
+    let all2 = &slice[..];
+
+    let from1 = &w[1..];
+    let from2 = &slice[1..];
+
+    let to1 = &w[..3];
+    let to2 = &slice[..1];
+
+    // tests for enum optimizations
+
+    let str_some = Some("hi".to_string());
+    let str_none = None::<String>;
+    let box_some = Some(Box::new(1u8));
+    let box_none = None::<Box<u8>>;
+    let int_some = Some(1u8);
+    let int_none = None::<u8>;
+    let custom_some = NonZeroOptimized::Value("hi".into());
+    let custom_none = NonZeroOptimized::Empty;
+
+    let parametrized = ParametrizedStruct {
+        next: ParametrizedEnum::Val {
+            val: Box::new(ParametrizedStruct {
+                next: ParametrizedEnum::Empty,
+                value: 1,
+            })
+        },
+        value: 0,
+    };
+
+    println!("{}, {}", x.0, x.1);        // set breakpoint here
+    println!("{}", diff2(92, 45));
+    empty();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-stopped-target.c ./gdb/testsuite/gdb.server/connect-stopped-target.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-stopped-target.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-stopped-target.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-stopped-target.exp ./gdb/testsuite/gdb.server/connect-stopped-target.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-stopped-target.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-stopped-target.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,82 @@
+# Copyright 2010-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Check that when GDB connects to a stopped target in either non-stop
+# or all-stop modes, "target remote" does not return with the remote
+# thread marked running.
+
+load_lib gdbserver-support.exp
+load_lib prelink-support.exp
+
+if {[skip_gdbserver_tests]} {
+    return
+}
+
+standard_testfile
+set executable ${testfile}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+proc do_test {nonstop} {
+    global binfile
+    global gdb_prompt
+    global hex
+
+    clean_restart $binfile
+
+    # Make sure we're disconnected, in case we're testing with an
+    # extended-remote board, therefore already connected.
+    gdb_test "disconnect" ".*"
+
+    gdb_test "set non-stop $nonstop"
+
+    set res [gdbserver_spawn ""]
+    set gdbserver_protocol [lindex $res 0]
+    set gdbserver_gdbport [lindex $res 1]
+
+    gdb_test_multiple "define connect" "define user command: connect" {
+	-re "Type commands for definition of \"connect\".\r\nEnd with a line saying just \"end\".\r\n>$" {
+	    gdb_test [join [list \
+				"target $gdbserver_protocol $gdbserver_gdbport" \
+				"info threads" \
+				"p /x \$pc" \
+				"end" \
+			       ] "\n"] \
+		"" \
+		"define user command: connect"
+	}
+    }
+
+    # In non-stop mode, "target remote" used to return before the
+    # already-stopped thread was marked stopped.  Because of that, a
+    # script (or fast user) could see the target as running right
+    # after connection:
+    #
+    # (gdb) connect
+    #   Id   Target Id         Frame
+    # * 1    Thread 31179      (running)
+    # Target is executing.
+    # (gdb)
+    gdb_test "connect" " = $hex" "connect and print pc"
+    gdb_test "print /x \$pc" " = $hex" "print pc again"
+}
+
+foreach nonstop { "off" "on" } {
+    with_test_prefix "non-stop=$nonstop" {
+	do_test $nonstop
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c ./gdb/testsuite/gdb.server/connect-with-no-symbol-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-with-no-symbol-file.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (int argc, char **argv)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp ./gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,97 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test GDB's ability to properly connect to GDBserver with no pre-opened
+# symbol file.  If GDB is buggy, it will drop the connection when
+# it attempts to open the symbol file indicated by GDBserver and fails.
+#
+# This test is only meaningful for standard remote connections.
+
+load_lib gdbserver-support.exp
+
+standard_testfile
+
+if { [skip_gdbserver_tests] } {
+    return 0
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
+    return -1
+}
+
+# Test connecting GDB to GDBserver without loading a symbol file.
+#
+# SYSROOT is the desired sysroot string
+#
+# ACTION is the action to perform to the symbol file on the target.
+# It can be either "permission" to deny access to the file or "delete"
+# to remove the file.
+#
+proc connect_no_symbol_file { sysroot action } {
+    global binfile
+
+    with_test_prefix "setup" {
+	# Copy the symbol file to the target.
+	gdb_remote_download target $binfile.bak $binfile 
+
+	# Make sure we're disconnected, in case we're testing with an
+	# extended-remote board, therefore already connected.
+	gdb_test "disconnect" ".*" "disconnect"
+
+	# Discard any symbol files that we have opened.
+	gdb_test "file" ".*" "discard symbol table" \
+	    {Discard symbol table from `.*'\? \(y or n\) } "y"
+
+	# Set sysroot to something non-target and possibly also invalid so that
+	# GDB is unable to open the symbol file.
+	gdb_test_no_output "set sysroot $sysroot" "adjust sysroot"
+
+	set target_exec [gdbserver_download_current_prog]
+
+	# Start GDBserver.
+	set res [gdbserver_start "" $target_exec]
+
+	set gdbserver_protocol [lindex $res 0]
+	set gdbserver_gdbport [lindex $res 1]
+
+	# Perform test actions to the symbol file on the target.
+	if { $action == "delete" } then {
+	  remote_file target delete $binfile
+	} elseif { $action == "permission" } {
+	  remote_spawn target "chmod 000 $binfile"
+	}
+       
+	# Connect to GDBserver.
+	gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
+    }
+
+    # Check if GDB succeeded connecting to GDBserver by attempting to detach
+    # from the process.
+    gdb_test "detach" \
+	".*Detaching from program: , process.*Ending remote debugging.*" \
+	"connection to GDBserver succeeded"
+}
+
+# Make sure we have the original symbol file in a safe place to copy from.
+gdb_remote_download host $binfile $binfile.bak
+
+# Run the test with different permutations.
+foreach_with_prefix sysroot {"" "target:"} {
+    foreach_with_prefix action {"permission" "delete"} {
+	connect_no_symbol_file $sysroot $action
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-without-multi-process.c ./gdb/testsuite/gdb.server/connect-without-multi-process.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-without-multi-process.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-without-multi-process.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+main (void)
+{
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-without-multi-process.exp ./gdb/testsuite/gdb.server/connect-without-multi-process.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/connect-without-multi-process.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/connect-without-multi-process.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,61 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Check that we can connect to GDBserver with the multiprocess
+# extensions disabled, and run to main.
+
+load_lib gdbserver-support.exp
+
+if {[skip_gdbserver_tests]} {
+    return
+}
+
+standard_testfile
+
+if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+# Test spawning gdbserver with a program, connect to it and run to
+# main, with both multiprocess extensions on and off.
+proc do_test {multiprocess} {
+    global binfile
+
+    clean_restart $binfile
+
+    # Make sure we're disconnected, in case we're testing with an
+    # extended-remote board, therefore already connected.
+    gdb_test "disconnect" ".*"
+
+    gdb_test_no_output "set remote multiprocess-feature $multiprocess"
+
+    set res [gdbserver_spawn ""]
+    set gdbserver_protocol [lindex $res 0]
+    set gdbserver_gdbport [lindex $res 1]
+
+    gdb_test "break main" "Breakpoint .*"
+
+    gdb_test "target $gdbserver_protocol $gdbserver_gdbport" \
+	"Remote debugging using .*" \
+	"target $gdbserver_protocol"
+
+    gdb_test "continue" "main .*" "continue to main"
+}
+
+foreach multiprocess { "off" "auto" } {
+    with_test_prefix "multiprocess=$multiprocess" {
+	do_test $multiprocess
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-attach.c ./gdb/testsuite/gdb.server/ext-attach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-attach.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-attach.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-attach.exp ./gdb/testsuite/gdb.server/ext-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-attach.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-attach.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if {![can_spawn_for_attach]} {
     return 0
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -43,7 +43,8 @@ gdbserver_start_extended
 
 gdb_test_no_output "set remote exec-file $target_exec" "set remote exec-file"
 
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
 
 gdb_test "attach $testpid" \
     "Attaching to program: .*, process $testpid.*(in|at).*" \
@@ -69,3 +70,5 @@ gdb_test "backtrace" ".*main.*" "backtra
 
 gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y"
 gdb_test_no_output "monitor exit"
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-restart.exp ./gdb/testsuite/gdb.server/ext-restart.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-restart.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-restart.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,65 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test restarting programs with the R packet.
+
+load_lib gdbserver-support.exp
+
+standard_testfile server.c
+
+if { [skip_gdbserver_tests] } {
+    return 0
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
+    return -1
+}
+
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
+set target_exec [gdbserver_download_current_prog]
+gdbserver_start_extended
+
+gdb_test_no_output "set remote exec-file $target_exec" "set remote exec-file"
+
+gdb_breakpoint main
+gdb_test "run" "Breakpoint.* main .*" "run to main"
+
+# Restart the process.
+with_test_prefix "restart" {
+    # Disable vRun packet and clear remote exec-file, so that GDB will
+    # use R packet to restart the process.
+    gdb_test_no_output "set remote run-packet off"
+    gdb_test_no_output "set remote exec-file"
+
+    set test "run to main"
+    gdb_test_multiple "run" $test {
+	-re {Start it from the beginning\? \(y or n\) $} {
+	    send_gdb "y\n"
+	    exp_continue
+	}
+	-re "Breakpoint.* main .*\r\n$gdb_prompt $" {
+	    pass $test
+	}
+    }
+}
+
+gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y"
+
+gdb_test_no_output "monitor exit"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-run.exp ./gdb/testsuite/gdb.server/ext-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-run.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-run.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-wrapper.exp ./gdb/testsuite/gdb.server/ext-wrapper.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/ext-wrapper.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-wrapper.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,70 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdbserver-support.exp
+
+standard_testfile wrapper.c
+
+if { [skip_gdbserver_tests] } {
+    return 0
+}
+
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
+    return -1
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
+set target_exec [gdbserver_download_current_prog]
+gdbserver_start_extended "--wrapper env TEST=1 --"
+
+gdb_test_no_output "set remote exec-file $target_exec" "set remote exec-file"
+
+gdb_breakpoint marker
+gdb_test "run" "Breakpoint.* marker .*" "run to marker"
+
+gdb_test "print d" "\\$${decimal} = ${hex} \"1\".*"
+
+# Restart the process.
+with_test_prefix "restart" {
+    # Disable vRun packet and clear remote exec-file, so that GDB will
+    # use R packet to restart the process.
+    gdb_test_no_output "set remote run-packet off"
+    gdb_test_no_output "set remote exec-file"
+    set test "run to marker"
+    gdb_test_multiple "run" $test {
+	-re {Start it from the beginning\? \(y or n\) $} {
+	    send_gdb "y\n"
+	    exp_continue
+	}
+	-re "Breakpoint.* marker .*\r\n$gdb_prompt $" {
+	    pass $test
+	}
+    }
+
+    gdb_test "print d" "\\$${decimal} = ${hex} \"1\".*"
+}
+
+gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y"
+
+gdb_test_no_output "monitor exit"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/file-transfer.exp ./gdb/testsuite/gdb.server/file-transfer.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/file-transfer.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/file-transfer.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # This testcase is part of GDB, the GNU debugger.
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/Makefile.in ./gdb/testsuite/gdb.server/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,26 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = ext-attach ext-run file-transfer server-mon server-run \
-	no-thread-db
-
-MISCELLANEOUS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-find . -name '*.o' -print | xargs rm -f
-	-find . -name '*.ali' -print | xargs rm -f
-	-find . -name 'b~*.ad[sb]' -print | xargs rm -f
-	-rm -f *~ a.out xgdb *.x *.ci *.tmp
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
-	-rm -f *.dwo *.dwp
-	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS) twice-tmp.c
-
-distclean maintainer-clean realclean: clean
-	-rm -f *~ core
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/non-existing-program.exp ./gdb/testsuite/gdb.server/non-existing-program.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/non-existing-program.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/non-existing-program.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/no-thread-db.c ./gdb/testsuite/gdb.server/no-thread-db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/no-thread-db.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/no-thread-db.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    Contributed by Intel Corporation.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/no-thread-db.exp ./gdb/testsuite/gdb.server/no-thread-db.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/no-thread-db.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/no-thread-db.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corporation.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server.c ./gdb/testsuite/gdb.server/server.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2005-2015 Free Software Foundation, Inc.
+   Copyright 2005-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-exec-info.exp ./gdb/testsuite/gdb.server/server-exec-info.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-exec-info.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server-exec-info.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,10 +23,14 @@ if {[skip_gdbserver_tests] || [skip_shli
 }
 
 standard_testfile server.c
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
     return -1
 }
 
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
 gdb_test_no_output "set remote pid-to-exec-file-packet off"
 gdb_test "file" ".*" "file" \
 	 {Discard symbol table from `.*'\? \(y or n\) } "y"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-kill.c ./gdb/testsuite/gdb.server/server-kill.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-kill.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server-kill.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-kill.exp ./gdb/testsuite/gdb.server/server-kill.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-kill.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server-kill.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[skip_gdbserver_tests]} {
     return 0
 }
 
-if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-mon.exp ./gdb/testsuite/gdb.server/server-mon.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-mon.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server-mon.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-run.exp ./gdb/testsuite/gdb.server/server-run.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/server-run.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/server-run.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2005-2015 Free Software Foundation, Inc.
+# Copyright 2005-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list.exp ./gdb/testsuite/gdb.server/solib-list.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/solib-list.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,23 +27,14 @@ if {[skip_gdbserver_tests] || [skip_shli
     return
 }
 
-# This test case (currently) does not support remote targets, since it
-# assumes the ELF interpreter can be found on the host system
-if [is_remote target] then {
-    return
-}
-
 standard_testfile solib-list-main.c
 set srclibfile ${testfile}-lib.c
 set binlibfile [standard_output_file ${testfile}.so]
-set executable ${testfile}
-set objfile ${binfile}.o
 
 if { [get_compiler_info]
-     || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfile}]] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != ""
-     || [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } {
-    untested "could not compile sources"
+     || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" {debug}] != ""
+     || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "shlib=${binlibfile}"] != "" } {
+    untested "failed to compile"
     return -1
 }
 
@@ -57,9 +48,16 @@ foreach nonstop { 0 1 } { with_test_pref
     gdb_exit
     gdb_start
     gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load ${interp_system}
-    gdb_load_shlibs ${binfile}
-    gdb_load_shlibs ${binlibfile}
+    gdb_load_shlib ${binlibfile}
+
+    set remote_binfile [gdb_remote_download target $binfile]
+
+    # When testing remote, the file path we receive may be only the file name,
+    # "solib-list".  ld-linux doesn't seem to be able to find the file when
+    # passing just the file name, it wants either the absolute path or a
+    # relative path with at least one directory component.  Calling readlink on
+    # the target to get the full path will make it happy.
+    set remote_binfile [lindex [remote_exec target "readlink -f $remote_binfile"] 1]
 
     # Make sure we're disconnected, in case we're testing with an
     # extended-remote board, therefore already connected.
@@ -72,8 +70,17 @@ foreach nonstop { 0 1 } { with_test_pref
     # But GDB having symbols from the main executable it would try to use
     # displaced-stepping buffer at unmapped that time address _start.
     gdb_test "set displaced-stepping off"
-	
-    set res [gdbserver_spawn ${binfile}]
+
+    # Unset last_loaded_file because we want GDBserver spawn
+    # ${interp_system} not ${last_loaded_file}.
+    global last_loaded_file
+    unset -nocomplain last_loaded_file
+
+    # Note we pass ${interp_system}, the program gdbserver spawns, as
+    # argument here, instead of using gdb_load, because we don't want
+    # to download the interpreter to the target (it's already there)
+    # or to the test output directory.
+    set res [gdbserver_spawn "${interp_system} ${remote_binfile}"]
     set gdbserver_protocol [lindex $res 0]
     set gdbserver_gdbport [lindex $res 1]
 
@@ -92,15 +99,6 @@ foreach nonstop { 0 1 } { with_test_pref
 	}
     }
 
-    if $nonstop {
-	set test "non-stop interior stop"
-	gdb_test_multiple "" $test {
-	    -re " #1 stopped\\.\r\n" {
-		pass $test
-	    }
-	}
-    }
-
     gdb_test "continue" "Program received signal SIGUSR1, .*"
     gdb_test "sharedlibrary" ".*"
     gdb_test "p libvar" " = 23"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list-lib.c ./gdb/testsuite/gdb.server/solib-list-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list-lib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/solib-list-lib.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list-main.c ./gdb/testsuite/gdb.server/solib-list-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/solib-list-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/solib-list-main.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/wrapper.c ./gdb/testsuite/gdb.server/wrapper.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/wrapper.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/wrapper.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/wrapper.exp ./gdb/testsuite/gdb.server/wrapper.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.server/wrapper.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.server/wrapper.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if { [istarget *-*-mingw*]
     return -1
 }
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile debug] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd1.c ./gdb/testsuite/gdb.stabs/exclfwd1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/exclfwd1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd2.c ./gdb/testsuite/gdb.stabs/exclfwd2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/exclfwd2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd.exp ./gdb/testsuite/gdb.stabs/exclfwd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/exclfwd.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2004-2015 Free Software Foundation, Inc.
+#   Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 standard_testfile exclfwd1.c exclfwd2.c
 
-if {[prepare_for_testing $testfile.exp $testfile \
+if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $srcfile2] debug]} {
     return -1
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd.h ./gdb/testsuite/gdb.stabs/exclfwd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/exclfwd.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/exclfwd.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/gdb11479.c ./gdb/testsuite/gdb.stabs/gdb11479.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/gdb11479.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/gdb11479.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    Contributed by Pierre Muller.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/gdb11479.exp ./gdb/testsuite/gdb.stabs/gdb11479.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/gdb11479.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/gdb11479.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,11 +22,11 @@ set testfile "gdb11479"
 
 proc do_test {version} {
     if ![runto_main] {
-        fail "Can't run to main $version"
+        fail "can't run to main $version"
         return -1
     }
-    gdb_test "rb test" "" "Set breakpoints $version"
-    gdb_test "continue" "Breakpoint .* test2 .*" "Stop at first breakpoint $version"
+    gdb_test "rb test" "" "set breakpoints $version"
+    gdb_test "continue" "Breakpoint .* test2 .*" "stop at first breakpoint $version"
     # Check that the struct is read in correctly
     gdb_test "print *t" ".*\{x = 5, y = 25, b = 2.5\}.*" \
 	"Inspect t in test2 $version"
@@ -40,7 +40,7 @@ proc do_test {version} {
     gdb_test "print sizeof (*e)" "= \[1-9\]*" "sizeof (*e) in test $version"
 }
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug additional_flags=-gstabs}] == 0 } {
+if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug additional_flags=-gstabs}] == 0 } {
     do_test forced_stabs
 }
 
@@ -48,7 +48,7 @@ if { [prepare_for_testing $testfile.exp 
 # by GDB which can generate a compilation failure. 
 gdb_exit
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug}] == 0 } {
+if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] == 0 } {
     do_test natural_debug_format
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/Makefile.in ./gdb/testsuite/gdb.stabs/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-all: 
-	@echo "Nothing to be done for all..."
-
-#### host, target, and site specific Makefile frags come in here.
-
-clean mostlyclean:
-	-rm -f *.o *~ core tmp.c tmp.s weird.s errs exclfwd gdb11479
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/weird.exp ./gdb/testsuite/gdb.stabs/weird.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.stabs/weird.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.stabs/weird.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
+# Copyright 1997-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,16 +25,6 @@ if { [ get_compiler_info ] } {
     return -1
 }
 
-if { $hp_cc_compiler || $hp_aCC_compiler } {
-    # The native hp-ux assembler does not support stabs at all.
-    # If the compiler is native hp-ux, of course the assembler is too.
-    # But if someone builds gcc with the native assembler (not recommended)
-    # rather than the gnu assembler, then this logic will not suppress it.
-    # -- chastain 2004-01-07
-    unsupported "stabs with hp-ux assembler"
-    continue
-}
-
 proc do_tests {} {
 	global binfile
 	global gdb_prompt
@@ -152,11 +142,11 @@ proc do_tests {} {
 	gdb_test "p sizeof (const70)" " = 2" "'e' constant with embedded type"
 
 	gdb_test "p constchar" " = 97 'a'" "char constant"
-        gdb_test "p constString1" " = \"Single quote String1\"" "String constant 1"
-        gdb_test "p constString2" " = \"Double quote String2\"" "String constant 2"
+        gdb_test "p constString1" " = \"Single quote String1\"" "string constant 1"
+        gdb_test "p constString2" " = \"Double quote String2\"" "string constant 2"
 
-        gdb_test "p constString3" " = \"String3 with embedded quote ' in the middle\"" "String constant 3"
-        gdb_test "p constString4" { = "String4 with embedded quote \\" in the middle"} "String constant 4"
+        gdb_test "p constString3" " = \"String3 with embedded quote ' in the middle\"" "string constant 3"
+        gdb_test "p constString4" { = "String4 with embedded quote \\" in the middle"} "string constant 4"
 	gdb_test "p bad_neg0" " = \{field0 = 42, field2 =.*field3 = 45\}" "p bad_neg0"
 
 	gdb_test "ptype inttype" "type = (unsigned int|inttype)" "ptype on inttype"
@@ -281,7 +271,7 @@ if { [lindex $exec_output 0] != 0 } {
 }
 
 if  { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
-     untested weird.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -294,6 +284,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 
 set binfile [gdb_remote_download host ${binfile} \
 		 [standard_output_file object.o]]
+set binfile_re [string_to_regexp $binfile]
 send_gdb "file $binfile\n"
 # If $binfile is very long, a \r (but not a \n) will echo in the
 # middle of the echo of the command.  So to match the echo, we
@@ -310,11 +301,11 @@ gdb_expect 60 {
 	send_gdb "y\n"
 	exp_continue
     }
-    -re "^Reading symbols from .*$binfile\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
+    -re "^Reading symbols from .*$binfile_re\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
 	pass "weirdx.o read without error"
     }
     -re ".*$gdb_prompt $" {
-	fail "Errors reading weirdx.o"
+	fail "errors reading weirdx.o"
     }
     timeout {
 	perror "couldn't load $binfile into $GDB (timed out)."
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-into-signal.c ./gdb/testsuite/gdb.threads/attach-into-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-into-signal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-into-signal.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-into-signal.exp ./gdb/testsuite/gdb.threads/attach-into-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-into-signal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-into-signal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,12 +44,8 @@ proc corefunc { threadtype executable } 
 
 	gdb_test "handle SIGALRM stop print pass" "Yes.*Yes.*Yes.*"
 
-	# Start the program running and then wait for a bit, to be sure
-	# that it can be attached to.
-	# Statistically there is a better chance without giving process a nice.
-
-	set testpid [eval exec $binfile &]
-	exec sleep 2
+	set test_spawn_id [spawn_wait_for_attach $binfile]
+	set testpid [spawn_id_get_pid $test_spawn_id]
 
 	# Run 2 passes of the test.
 	# The C file inferior stops pending its signals if a single one is lost,
@@ -60,76 +56,81 @@ proc corefunc { threadtype executable } 
 	set attempt 1
 	set passes 1
 	while { $passes < 3 && $attempt <= $attempts } {
-	    set stoppedtry 0
-	    while { $stoppedtry < 10 } {
-		if [catch {open /proc/${testpid}/status r} fileid] {
-		    set stoppedtry 10
-		    break
+	    with_test_prefix "attempt $attempt" {
+		set stoppedtry 0
+		while { $stoppedtry < 10 } {
+		    with_test_prefix "stoppedtry $stoppedtry" {
+			if [catch {open /proc/${testpid}/status r} fileid] {
+			    set stoppedtry 10
+			    break
+			}
+			gets $fileid line1
+			gets $fileid line2
+			close $fileid
+
+			if {![string match "*(stopped)*" $line2]} {
+			    # No PASS message as we may be looping in multiple
+			    # attempts.
+			    break
+			}
+			sleep 1
+			set stoppedtry [expr $stoppedtry + 1]
+		    }
 		}
-		gets $fileid line1
-		gets $fileid line2
-		close $fileid
-
-		if {![string match "*(stopped)*" $line2]} {
-		    # No PASS message as we may be looping in multiple
-		    # attempts.
+		if { $stoppedtry >= 10 } {
+		    verbose -log $line2
+		    set test "process is still running on the attempt # $attempt of $attempts"
 		    break
 		}
-		sleep 1
-		set stoppedtry [expr $stoppedtry + 1]
-	    }
-	    if { $stoppedtry >= 10 } {
-		verbose -log $line2
-		set test "process is still running on the attempt # $attempt of $attempts"
-		break
-	    }
 
-	    # Main test:
-	    set test "attach (pass $passes), pending signal catch"
-	    if {[gdb_test_multiple "attach $testpid" $test {
-		-re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*Program received signal SIGALRM.*$gdb_prompt $" {
-		    # nonthreaded:
-		    pass $test
-		    verbose -log "$test succeeded on the attempt # $attempt of $attempts"
-		    set passes [expr $passes + 1]
-		}
-		-re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
-		    set ok 0
+		# Main test:
+		set test "attach (pass $passes), pending signal catch"
+		if {[gdb_test_multiple "attach $testpid" $test {
+		    -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.* received signal SIGALRM.*$gdb_prompt $" {
+			# nonthreaded:
+			pass $test
+			verbose -log "$test succeeded on the attempt # $attempt of $attempts"
+			set passes [expr $passes + 1]
+		    }
+		    -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
+			set ok 0
 
-		    if { $threadtype == "threaded" } {
-			# In the threaded case, the signal is left
-			# pending on the second thread.  Check for
-			# that by peeking at the thread's siginfo.
-			# SIGALRM is 14, SIGSTOP is 19.
-
-			set test2 "thread apply 2 print \$_siginfo.si_signo"
-			gdb_test_multiple $test2 $test2 {
-			    -re " = 14\r\n$gdb_prompt $" {
-				set ok 1
-			    }
-			    -re " = 19\r\n$gdb_prompt $" {
+			if { $threadtype == "threaded" } {
+			    # In the threaded case, the signal is left
+			    # pending on the second thread.  Check for
+			    # that by peeking at the thread's siginfo.
+			    # SIGALRM is 14, SIGSTOP is 19.
+
+			    set test2 "thread apply 2 print \$_siginfo.si_signo"
+			    gdb_test_multiple $test2 $test2 {
+				-re " = 14\r\n$gdb_prompt $" {
+				    set ok 1
+				}
+				-re " = 19\r\n$gdb_prompt $" {
+				}
 			    }
+			} else {
+			    # In the nonthreaded case, GDB should tell the
+			    # user about having seen a signal.
 			}
-		    } else {
-			# In the nonthreaded case, GDB should tell the
-			# user about having seen a signal.
-		    }
 
-		    if { $ok == 0} {
-			# We just lack the luck, we should try it again.
-			set attempt [expr $attempt + 1]
-		    } else {
-			pass $test
-			verbose -log "$test succeeded on the attempt # $attempt of $attempts"
-			set passes [expr $passes + 1]
+			if { $ok == 0} {
+			    # We just lack the luck, we should try it again.
+			    set attempt [expr $attempt + 1]
+			} else {
+			    pass $test
+			    verbose -log "$test succeeded on the attempt # $attempt of $attempts"
+			    set passes [expr $passes + 1]
+			}
 		    }
+		}] != 0 } {
+		    break
 		}
-	    }] != 0 } {
-		break
-	    }
 
-	    gdb_test "detach" "Detaching from.*" ""
+		gdb_test "detach" "Detaching from.*" ""
+	    }
 	}
+
 	if {$passes < 3} {
 	    if {$attempt > $attempts} {
 		unresolved $test
@@ -139,19 +140,13 @@ proc corefunc { threadtype executable } 
 	}
 
 	# Exit and detach the process.
-       
 	gdb_exit
 
-	# Make sure we don't leave a process around to confuse the
-	# next test run (and prevent the compile by keeping the text
-	# file busy), in case the "set should_exit" didn't work.
-
 	# Continue the program - some Linux kernels need it before -9 if the
 	# process is stopped.
 	remote_exec build "kill -s CONT ${testpid}"
-       
-	remote_exec build "kill -9 ${testpid}"
 
+	kill_wait_spawned_process $test_spawn_id
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,6 +21,40 @@
 # end up leaving stale state behind that confuse the following
 # attach).
 
+# Return true if the running version of DejaGnu is known to not be
+# able to run this test.
+proc bad_dejagnu {} {
+    global frame_version
+
+    verbose -log "DejaGnu version: $frame_version"
+    verbose -log "Expect version: [exp_version]"
+    verbose -log "Tcl version: [info tclversion]"
+
+    set dj_ver [split $frame_version .]
+    set dj_ver_major [lindex $dj_ver 0]
+    set dj_ver_minor [lindex $dj_ver 1]
+
+    # DejaGnu versions prior to 1.6 manage to kill the wrong process
+    # due to PID-reuse races.  Since this test spawns many threads, it
+    # widens the race window a whole lot, enough that the inferior is
+    # often killed, and thus the test randomly fails.  See:
+    # http://lists.gnu.org/archive/html/dejagnu/2015-07/msg00005.html
+    # The fix added a close_wait_program procedure.  If that procedure
+    # is defined, and DejaGnu is older than 1.6, assume that means the
+    # fix was backported.
+    if {$dj_ver_major == 1
+	&& ($dj_ver_minor < 6 && [info procs close_wait_program] == "")} {
+	return 1
+    }
+
+    return 0
+}
+
+if {[bad_dejagnu]} {
+    unsupported "broken DejaGnu"
+    return 0
+}
+
 if {![can_spawn_for_attach]} {
     return 0
 }
@@ -36,7 +70,8 @@ proc test {} {
 
     clean_restart ${binfile}
 
-    set testpid [spawn_wait_for_attach $binfile]
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     set attempts 10
     for {set attempt 1} { $attempt <= $attempts } { incr attempt } {
@@ -127,8 +162,7 @@ proc test {} {
 	    delete_breakpoints
 	}
     }
-
-    remote_exec target "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 # The test program exits after a while, in case GDB crashes.  Make it
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-stopped.c ./gdb/testsuite/gdb.threads/attach-stopped.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-stopped.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-stopped.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-stopped.exp ./gdb/testsuite/gdb.threads/attach-stopped.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/attach-stopped.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-stopped.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,13 +44,8 @@ proc corefunc { threadtype } {
 	return -1
     }
 
-    # Start the program running and then wait for a bit, to be sure
-    # that it can be attached to.
-
-    set testpid [eval exec $binfile &]
-
-    # Avoid some race:
-    sleep 2
+    set test_spawn_id [spawn_wait_for_attach $binfile]
+    set testpid [spawn_id_get_pid $test_spawn_id]
 
     # Stop the program 
     remote_exec build "kill -s STOP ${testpid}"
@@ -86,7 +81,7 @@ proc corefunc { threadtype } {
     # the Linux kernel version.  The behavior is not tested as it is not
     # dependent on GDB.
 
-    remote_exec build "kill -9 ${testpid}"
+    kill_wait_spawned_process $test_spawn_id
 }
 
 # build the test case first without threads
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/bp_in_thread.c ./gdb/testsuite/gdb.threads/bp_in_thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/bp_in_thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/bp_in_thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* A small multi-threaded test case.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/bp_in_thread.exp ./gdb/testsuite/gdb.threads/bp_in_thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/bp_in_thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/bp_in_thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/break-while-running.c ./gdb/testsuite/gdb.threads/break-while-running.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/break-while-running.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/break-while-running.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/break-while-running.exp ./gdb/testsuite/gdb.threads/break-while-running.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/break-while-running.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/break-while-running.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ proc test { update_thread_list always_in
     # without the user explicitly fetching the thread list.
     if {$update_thread_list} {
 	gdb_test "info threads" \
-	    "\\\(running\\\).*\\\(running\\\).* main .*" \
+	    "main .*\\\(running\\\).*\\\(running\\\).*" \
 	    "only main stopped"
     }
 
@@ -107,7 +107,7 @@ proc test { update_thread_list always_in
 
     if {$non_stop == "on"} {
 	gdb_test "info threads" \
-	    "\\\(running\\\).* breakpoint_function .* main .*" \
+	    "main .* breakpoint_function .*\\\(running\\\)" \
 	    "one thread running"
 
 	# Unblock the other thread, which should then trip on the same
@@ -131,7 +131,7 @@ proc test { update_thread_list always_in
 	}
 
 	gdb_test "info threads" \
-	    " breakpoint_function .* breakpoint_function .* main .*" \
+	    " main .* breakpoint_function .* breakpoint_function .*" \
 	    "all threads stopped"
     } else {
 	# This test is not merged with the non-stop one because in
@@ -142,7 +142,7 @@ proc test { update_thread_list always_in
 	    -re "\\\(running\\\).*$gdb_prompt $" {
 		fail $test
 	    }
-	    -re "breakpoint_function .* main .*$gdb_prompt $" {
+	    -re "main .* breakpoint_function .*$gdb_prompt $" {
 		pass $test
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-attach-detach.c ./gdb/testsuite/gdb.threads/clone-attach-detach.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-attach-detach.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-attach-detach.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define _GNU_SOURCE
+#include <sched.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#define STACK_SIZE 0x1000
+
+int clone_pid;
+
+static int
+clone_fn (void *unused)
+{
+  /* Wait for alarm.  */
+  while (1)
+    sleep (1);
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  unsigned char *stack;
+  int res;
+
+  alarm (300);
+
+  stack = malloc (STACK_SIZE);
+  assert (stack != NULL);
+
+#define CLONE_FLAGS (CLONE_THREAD | CLONE_SIGHAND | CLONE_VM)
+
+#ifdef __ia64__
+  clone_pid = __clone2 (clone_fn, stack, STACK_SIZE, CLONE_FLAGS, NULL);
+#else
+  clone_pid = clone (clone_fn, stack + STACK_SIZE, CLONE_FLAGS, NULL);
+#endif
+
+  assert (clone_pid > 0);
+
+  /* Wait for alarm.  */
+  while (1)
+    sleep (1);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-attach-detach.exp ./gdb/testsuite/gdb.threads/clone-attach-detach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-attach-detach.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-attach-detach.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,98 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test attach / detach from a process that uses raw clone.  We use raw
+# clone as proxy for when libthread_db is not available.
+
+# This only works on targets with the Linux kernel.
+if ![istarget *-*-linux*] {
+    return
+}
+
+if {![can_spawn_for_attach]} {
+    return 0
+}
+
+standard_testfile
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] {
+    return -1
+}
+
+clean_restart ${binfile}
+
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
+
+# Native/gdbserver.
+set thread_re "(LWP $decimal|Thread )"
+
+# Try attach / detach a few times, in case GDB ends up with stale
+# state after detaching.
+
+set attempts 3
+for {set attempt 1} {$attempt <= $attempts} {incr attempt} {
+    with_test_prefix "fg attach $attempt" {
+
+	gdb_test "attach $testpid" \
+	    "Attaching to program.*process $testpid.*" \
+	    "attach"
+
+	gdb_test "info threads" \
+	    "1.*${thread_re}.*\r\n.*2.*${thread_re}.*" \
+	    "info threads shows two LWPs"
+
+	gdb_test "detach" "Detaching from .*, process $testpid"
+    }
+}
+
+# Same, but use async/background attach.
+
+# If debugging with target remote, check whether the all-stop variant
+# of the RSP is being used.  If so, we can't run the background tests.
+if {[target_info exists gdb_protocol]
+    && ([target_info gdb_protocol] == "remote"
+	|| [target_info gdb_protocol] == "extended-remote")} {
+
+    set test "maint show target-non-stop"
+    gdb_test_multiple "maint show target-non-stop" $test {
+	-re "(is|currently) on.*$gdb_prompt $" {
+	}
+	-re "(is|currently) off.*$gdb_prompt $" {
+	    unsupported "bg attach: can't issue info threads while target is running"
+	    return 0
+	}
+    }
+}
+
+set attempts 3
+for {set attempt 1} {$attempt <= $attempts} {incr attempt} {
+    with_test_prefix "bg attach $attempt" {
+
+	gdb_test "attach $testpid &" \
+	    "Attaching to program.*process $testpid.*" \
+	    "attach"
+
+	gdb_test "info threads" \
+	    "1.*${thread_re}.*\\(running\\)\r\n.*2.*${thread_re}.*\\(running\\)" \
+	    "info threads shows two LWPs"
+
+	gdb_test "detach" "Detaching from .*, process $testpid"
+    }
+}
+
+kill_wait_spawned_process $test_spawn_id
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-new-thread-event.c ./gdb/testsuite/gdb.threads/clone-new-thread-event.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-new-thread-event.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-new-thread-event.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-new-thread-event.exp ./gdb/testsuite/gdb.threads/clone-new-thread-event.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-new-thread-event.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-new-thread-event.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if ![istarget *-*-linux*] then {
     return
 }
 
-if { [prepare_for_testing clone-new-thread-event.exp clone-new-thread-event] } {
+if { [prepare_for_testing "failed to prepare" clone-new-thread-event] } {
     return -1
 }
 
@@ -30,5 +30,5 @@ if { ![runto_main] } {
 }
 
 gdb_test "continue" \
-    "Program received signal SIGUSR1, User defined signal 1.*" \
+    "Thread 2 received signal SIGUSR1, User defined signal 1.*" \
     "catch SIGUSR1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-thread_db.c ./gdb/testsuite/gdb.threads/clone-thread_db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-thread_db.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-thread_db.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-thread_db.exp ./gdb/testsuite/gdb.threads/clone-thread_db.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/clone-thread_db.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/clone-thread_db.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-after-query.c ./gdb/testsuite/gdb.threads/continue-pending-after-query.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-after-query.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/continue-pending-after-query.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-after-query.exp ./gdb/testsuite/gdb.threads/continue-pending-after-query.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-after-query.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/continue-pending-after-query.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-status.c ./gdb/testsuite/gdb.threads/continue-pending-status.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-status.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/continue-pending-status.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-status.exp ./gdb/testsuite/gdb.threads/continue-pending-status.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/continue-pending-status.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/continue-pending-status.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,11 @@
 # thread, then switching to a thread that has a status pending and
 # continuing.
 
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping continue-pending-status.exp because of nointerrupts."
+    return
+}
+
 standard_testfile
 
 if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
@@ -111,7 +116,7 @@ for {set i 0} {$i < $attempts} {incr i} 
 
 	set msg "caught interrupt"
 	gdb_test_multiple "" $msg {
-	    -re "Program received signal SIGINT.*$gdb_prompt $" {
+	    -re "Thread .* received signal SIGINT.*$gdb_prompt $" {
 		pass $msg
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/corethreads.c ./gdb/testsuite/gdb.threads/corethreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/corethreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/corethreads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2011-2015 Free Software Foundation, Inc.
+/* Copyright 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/corethreads.exp ./gdb/testsuite/gdb.threads/corethreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/corethreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/corethreads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if {![isnative] || ![istarget "*-*-linux
 standard_testfile
 set executable ${testfile}
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/create-fail.c ./gdb/testsuite/gdb.threads/create-fail.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/create-fail.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/create-fail.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/create-fail.exp ./gdb/testsuite/gdb.threads/create-fail.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/create-fail.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/create-fail.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/current-lwp-dead.c ./gdb/testsuite/gdb.threads/current-lwp-dead.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/current-lwp-dead.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/current-lwp-dead.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/current-lwp-dead.exp ./gdb/testsuite/gdb.threads/current-lwp-dead.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/current-lwp-dead.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/current-lwp-dead.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,12 +23,12 @@ if ![istarget *-*-linux*] then {
     return
 }
 
-if { [prepare_for_testing current-lwp-dead.exp current-lwp-dead] } {
+if { [prepare_for_testing "failed to prepare" current-lwp-dead] } {
     return -1
 }
 
 if {[runto_main] <= 0} {
-    untested current-lwp-dead.exp
+    untested "could not run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread.c ./gdb/testsuite/gdb.threads/dlopen-libpthread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/dlopen-libpthread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread.exp ./gdb/testsuite/gdb.threads/dlopen-libpthread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/dlopen-libpthread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,8 +23,7 @@ set testfile "dlopen-libpthread"
 set srcmainfile ${testfile}.c
 set srclibfile ${testfile}-lib.c
 set executable ${testfile}
-set binfile_lib ${objdir}/${subdir}/${executable}.so
-set binfile ${objdir}/${subdir}/${executable}
+set binfile_lib [standard_output_file ${executable}.so]
 set lib_dlopen [shlib_target_file ${executable}.so]
 
 # Use build_executable_own_libs as prelinked libpthread.so can produce false
@@ -32,10 +31,10 @@ set lib_dlopen [shlib_target_file ${exec
 
 set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no]
 if {$relink_args == "" || ![prelink_no $relink_args]
-    || [prepare_for_testing ${testfile}.exp ${executable} ${srcmainfile} {debug shlib_load}] } {
+    || [prepare_for_testing "failed to prepare" ${executable} ${srcmainfile} {debug shlib_load}] } {
     return -1
 }
-gdb_load_shlibs $binfile_lib
+gdb_load_shlib $binfile_lib
 
 if { ![runto_main] } {
     return -1
@@ -48,7 +47,7 @@ gdb_test_multiple $test $test {
     }
     -re "No probes matched\\.\r\n$gdb_prompt $" {
 	xfail $test
-	untested ${testfile}.exp
+	untested "no matching probes"
 	return
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c ./gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl1.c ./gdb/testsuite/gdb.threads/execl1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/execl1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl.c ./gdb/testsuite/gdb.threads/execl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/execl.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl.exp ./gdb/testsuite/gdb.threads/execl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/execl.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/execl.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,10 +15,6 @@
 
 # Test handling of threads across an execl.
 
-if { [is_remote target] } then {
-    continue
-}
-
 # Original image, loads a thread library.
 standard_testfile
 
@@ -44,7 +40,7 @@ gdb_test "b [gdb_get_line_number "breakp
 
 gdb_test "continue" ".*breakpoint here.*" "continue to exec"
 
-gdb_test "info threads" ".*3 *Thread.*2 *Thread.*1 *Thread.*" "info threads before exec"
+gdb_test "info threads" "1 *Thread.*2 *Thread.*3 *Thread.*" "info threads before exec"
 
 # When continuing from this point we'll hit the breakpoint in main()
 # again, this time in the exec'd process.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-child-threads.c ./gdb/testsuite/gdb.threads/fork-child-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-child-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-child-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-child-threads.exp ./gdb/testsuite/gdb.threads/fork-child-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-child-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-child-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,10 +18,6 @@ if { ! [istarget "*-*-linux*"] } {
     return 0
 }
 
-if { [is_remote target] || ![isnative] } then {
-    return 0
-}
-
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
@@ -31,7 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c ./gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,149 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+#include <errno.h>
+
+/* Number of threads.  Each thread continuously spawns a fork and wait
+   for it.  If we have another thread continuously start a step over,
+   gdbserver should end up finding new forks while suspending
+   threads.  */
+#define NTHREADS 10
+
+pthread_t threads[NTHREADS];
+
+pthread_barrier_t barrier;
+
+#define NFORKS 10
+
+/* Used to create a conditional breakpoint that always fails.  */
+volatile int zero;
+
+static void *
+thread_forks (void *arg)
+{
+  int i;
+
+  pthread_barrier_wait (&barrier);
+
+  for (i = 0; i < NFORKS; i++)
+    {
+      pid_t pid;
+
+      do
+	{
+	  pid = fork ();
+	}
+      while (pid == -1 && errno == EINTR);
+
+      if (pid > 0)
+	{
+	  int status;
+
+	  /* Parent.  */
+	  do
+	    {
+	      pid = waitpid (pid, &status, 0);
+	    }
+	  while (pid == -1 && errno == EINTR);
+
+	  if (pid == -1)
+	    {
+	      perror ("wait");
+	      exit (1);
+	    }
+
+	  if (!WIFEXITED (status))
+	    {
+	      printf ("Unexpected wait status 0x%x from child %d\n",
+		      status, pid);
+	    }
+	}
+      else if (pid == 0)
+	{
+	  /* Child.  */
+	  exit (0);
+	}
+      else
+	{
+	  perror ("fork");
+	  exit (1);
+	}
+    }
+}
+
+/* Set this to tell the thread_breakpoint thread to exit.  */
+volatile int break_out;
+
+static void *
+thread_breakpoint (void *arg)
+{
+  pthread_barrier_wait (&barrier);
+
+  while (!break_out)
+    {
+      usleep (1); /* set break here */
+    }
+
+  return NULL;
+}
+
+pthread_barrier_t barrier;
+
+int
+main (void)
+{
+  int i;
+  int ret;
+  pthread_t bp_thread;
+
+  /* Don't run forever.  */
+  alarm (180);
+
+  pthread_barrier_init (&barrier, NULL, NTHREADS + 1);
+
+  /* Start the threads that constantly fork.  */
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_create (&threads[i], NULL, thread_forks, NULL);
+      assert (ret == 0);
+    }
+
+  /* Start the thread that constantly hit a conditional breakpoint
+     that needs to be stepped over.  */
+  ret = pthread_create (&bp_thread, NULL, thread_breakpoint, NULL);
+  assert (ret == 0);
+
+  /* Wait for forking to stop.  */
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_join (threads[i], NULL);
+      assert (ret == 0);
+    }
+
+  break_out = 1;
+  pthread_join (bp_thread, NULL);
+  assert (ret == 0);
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp ./gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,169 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test verifies that several threads forking while another thread
+# is constantly stepping over a breakpoint is properly handled.
+
+standard_testfile
+
+set linenum [gdb_get_line_number "set break here"]
+
+if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
+    return -1
+}
+
+# Assume yes.
+set displaced_stepping_supported 1
+
+# "set displaced on" only tells gdb to use displaced stepping if
+# possible.  Probe for actual support.
+
+proc probe_displaced_stepping_support {} {
+    global displaced_stepping_supported
+    global binfile gdb_prompt
+
+    with_test_prefix "probe displaced-stepping support" {
+	clean_restart $binfile
+
+	gdb_test_no_output "set displaced on"
+	if ![runto_main] then {
+	    fail "can't run to main"
+	    return 0
+	}
+
+	# We're stopped at the main breakpoint.  If displaced stepping is
+	# supported, we'll see related debug output while we step past
+	# that breakpoint.
+	gdb_test_no_output "set debug displaced 1"
+	gdb_test_multiple "next" "probe" {
+	    -re "displaced pc to.*$gdb_prompt $" {
+		pass "supported"
+	    }
+	    -re ".*$gdb_prompt $" {
+		set displaced_stepping_supported 0
+		pass "not supported"
+	    }
+	}
+    }
+}
+
+# The test proper.  If COND_BP_TARGET is true, then test with
+# conditional breakpoints evaluated on the target side, if possible.
+# DETACH_ON_FORK is used as value for the "set detach-on-fork"
+# setting.  If "on", this exercises GDB explicitly continuing the fork
+# child until exit.  If "off", this exercises GDB detaching the fork
+# child.  DISPLACED indicates whether to use displaced stepping or
+# not.
+proc do_test { cond_bp_target detach_on_fork displaced } {
+    global GDBFLAGS
+    global srcfile testfile binfile
+    global decimal gdb_prompt
+    global linenum
+    global is_remote_target
+
+    set saved_gdbflags $GDBFLAGS
+    set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop on\""]
+    clean_restart $binfile
+    set GDBFLAGS $saved_gdbflags
+
+    if ![runto_main] then {
+	fail "can't run to main"
+	return 0
+    }
+
+    if {$cond_bp_target} {
+	set test "set breakpoint condition-evaluation target"
+	gdb_test_multiple $test $test {
+	    -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+		# Target doesn't support breakpoint condition
+		# evaluation on its side.  Skip the test.
+		return 0
+	    }
+	    -re "^$test\r\n$gdb_prompt $" {
+	    }
+	}
+    } else {
+	gdb_test_no_output "set breakpoint condition-evaluation host"
+    }
+
+    gdb_test_no_output "set detach-on-fork $detach_on_fork"
+    gdb_test_no_output "set displaced $displaced"
+
+    gdb_test "break $linenum if zero == 1" \
+	"Breakpoint .*" \
+	"set breakpoint that evals false"
+
+    set test "continue &"
+    gdb_test_multiple $test $test {
+	-re "$gdb_prompt " {
+	    pass $test
+	}
+    }
+
+    set fork_count 0
+    set ok 0
+
+    with_timeout_factor 10 {
+        set test "inferior 1 exited"
+        gdb_test_multiple "" $test {
+	    -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
+	        set ok 1
+	        pass $test
+	    }
+	    -re "Inferior $decimal \(\[^\r\n\]+\) exited normally" {
+	        incr fork_count
+	        if {$fork_count <= 100} {
+		    exp_continue
+	        } else {
+		    fail "$test (too many forks)"
+	        }
+	    }
+	}
+    }
+
+    if {!$ok} {
+	# No use testing further.
+	return
+    }
+
+    gdb_test "info threads" "No threads\." \
+	"no threads left"
+
+    gdb_test "info inferiors" \
+	"Num\[ \t\]+Description\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
+	"only inferior 1 left"
+}
+
+probe_displaced_stepping_support
+
+foreach_with_prefix cond_bp_target {1 0} {
+    foreach_with_prefix detach_on_fork {"on" "off"} {
+	# Disable "off" for now.  The test does pass with
+	# detach-on-fork off (at the time of writing), but gdb seems
+	# to slow down quadratically as inferiors are created, and
+	# then the test takes annoyingly long to complete...
+	if {$detach_on_fork == "off"} {
+	    continue
+	}
+
+	foreach_with_prefix displaced {"on" "off"} {
+	    if {$displaced == "on" && !$displaced_stepping_supported} {
+		continue
+	    }
+
+	    do_test $cond_bp_target $detach_on_fork $displaced
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-plus-threads.c ./gdb/testsuite/gdb.threads/fork-plus-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-plus-threads.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-plus-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,115 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+
+/* Number of times the main process forks.  */
+#define NFORKS 10
+
+/* Number of threads by each fork child.  */
+#define NTHREADS 10
+
+static void *
+thread_func (void *arg)
+{
+  /* Empty.  */
+}
+
+static void
+fork_child (void)
+{
+  pthread_t threads[NTHREADS];
+  int i;
+  int ret;
+
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_create (&threads[i], NULL, thread_func, NULL);
+      assert (ret == 0);
+    }
+
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_join (threads[i], NULL);
+      assert (ret == 0);
+    }
+}
+
+int
+main (void)
+{
+  pid_t childs[NFORKS];
+  int i;
+  int status;
+  int num_exited = 0;
+
+  /* Don't run forever if the wait loop below gets stuck.  */
+  alarm (180);
+
+  for (i = 0; i < NFORKS; i++)
+    {
+      pid_t pid;
+
+      pid = fork ();
+
+      if (pid > 0)
+	{
+	  /* Parent.  */
+	  childs[i] = pid;
+	}
+      else if (pid == 0)
+	{
+	  /* Child.  */
+	  fork_child ();
+	  return 0;
+	}
+      else
+	{
+	  perror ("fork");
+	  return 1;
+	}
+    }
+
+  while (num_exited != NFORKS)
+    {
+      pid_t pid = wait (&status);
+
+      if (pid == -1)
+	{
+	  perror ("wait");
+	  return 1;
+	}
+
+      if (WIFEXITED (status))
+	{
+	  num_exited++;
+	}
+      else
+	{
+	  printf ("Hmm, unexpected wait status 0x%x from child %d\n", status,
+		  pid);
+	}
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-plus-threads.exp ./gdb/testsuite/gdb.threads/fork-plus-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-plus-threads.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-plus-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,112 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test verifies that threads created by the child fork are
+# properly handled.  Specifically, GDB used to have a bug where it
+# would leave child fork threads stuck stopped, even though "info
+# threads" would show them running.
+#
+# See https://sourceware.org/bugzilla/show_bug.cgi?id=18600
+
+# In remote mode, we cannot continue debugging after all
+# inferiors have terminated, and this test requires that.
+if { [target_info exists gdb_protocol]
+     && [target_info gdb_protocol] == "remote" } {
+    continue
+}
+
+standard_testfile
+
+proc do_test { detach_on_fork } {
+    global GDBFLAGS
+    global srcfile testfile
+    global gdb_prompt
+
+    set saved_gdbflags $GDBFLAGS
+    set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop on\""]
+
+    if {[prepare_for_testing "failed to prepare" \
+	     $testfile $srcfile {debug pthreads}] == -1} {
+	set GDBFLAGS $saved_gdbflags
+	return -1
+    }
+
+    set GDBFLAGS $saved_gdbflags
+
+    if ![runto_main] then {
+	fail "can't run to main"
+	return 0
+    }
+
+    gdb_test_no_output "set detach-on-fork $detach_on_fork"
+    set test "continue &"
+    gdb_test_multiple $test $test {
+	-re "$gdb_prompt " {
+	    pass $test
+	}
+    }
+
+    # gdbserver had a bug that resulted in reporting the fork child's
+    # initial stop to gdb, which gdb does not expect, in turn
+    # resulting in a broken session, like:
+    #
+    #  [Thread 31536.31536] #16 stopped.                                <== BAD
+    #  [New Thread 31547.31547]
+    #  [Inferior 10 (process 31536) exited normally]
+    #  [New Thread 31547.31560]
+    #
+    #  [Thread 31547.31547] #18 stopped.                                <== BAD
+    #  Cannot remove breakpoints because program is no longer writable. <== BAD
+    #  Further execution is probably impossible.                        <== BAD
+    #  [Inferior 11 (process 31547) exited normally]
+    #  [Inferior 1 (process 31454) exited normally]
+    #
+    # These variables track whether we see such broken behavior.
+    set saw_cannot_remove_breakpoints 0
+    set saw_thread_stopped 0
+
+    set test "inferior 1 exited"
+    gdb_test_multiple "" $test {
+	-re "Cannot remove breakpoints" {
+	    set saw_cannot_remove_breakpoints 1
+	    exp_continue
+	}
+	-re "Thread \[^\r\n\]+ stopped\\." {
+	    set saw_thread_stopped 1
+	    exp_continue
+	}
+	-re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
+	    pass $test
+	}
+    }
+
+    gdb_assert !$saw_cannot_remove_breakpoints \
+	"no failure to remove breakpoints"
+    gdb_assert !$saw_thread_stopped \
+	"no spurious thread stop"
+
+    gdb_test "info threads" "No threads\." \
+	"no threads left"
+
+    gdb_test "info inferiors" \
+	"Num\[ \t\]+Description\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
+	"only inferior 1 left"
+}
+
+foreach detach_on_fork {"on" "off"} {
+    with_test_prefix "detach-on-fork=$detach_on_fork" {
+	do_test $detach_on_fork
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-thread-pending.c ./gdb/testsuite/gdb.threads/fork-thread-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-thread-pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-thread-pending.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-thread-pending.exp ./gdb/testsuite/gdb.threads/fork-thread-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/fork-thread-pending.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-thread-pending.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,12 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# There's no support for `set follow-fork-mode' in the remote
-# protocol.
-if { [is_remote target] } {
-    return 0
-}
-
 # Only GNU/Linux is known to support `set follow-fork-mode child'.
 #
 if { ! [istarget "*-*-linux*"] } {
@@ -34,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
@@ -92,7 +86,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_load ${binfile}
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-stale-thread.c ./gdb/testsuite/gdb.threads/gcore-stale-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-stale-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/gcore-stale-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-stale-thread.exp ./gdb/testsuite/gdb.threads/gcore-stale-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-stale-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/gcore-stale-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-thread.exp ./gdb/testsuite/gdb.threads/gcore-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/gcore-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/gcore-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ set nl "\[\r\n\]+"
 set timeout 30
 
 if { ! [ runto_main ] } then {
-    untested gcore-thread.exp
+    untested "could not run to main"
     return -1
 }
 
@@ -127,7 +127,7 @@ foreach name { corefile core0file } { wi
     # mapping various OS's may do?  Let's assume that there must
     # be at least two threads:
 
-    gdb_test "info threads" ".*${nl}  2 ${horiz}${nl}\\* 1 .*" \
+    gdb_test "info threads" "\\* 1 ${horiz}${nl}  2 ${horiz}.*" \
 	    "corefile contains at least two threads"
 
     # One thread in the corefile should be in the "thread2" function.
@@ -137,6 +137,6 @@ foreach name { corefile core0file } { wi
 
     # The thread2 thread should be marked as the current thread.
 
-    gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \
+    gdb_test "info threads" "\\* ${horiz} thread2 .*${nl}" \
 	    "thread2 is current thread in corefile"
 }}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-in-threads.c ./gdb/testsuite/gdb.threads/hand-call-in-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-in-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/hand-call-in-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for hand function calls in multi-threaded program.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-in-threads.exp ./gdb/testsuite/gdb.threads/hand-call-in-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-in-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/hand-call-in-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,8 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
@@ -51,7 +50,7 @@ proc get_dummy_frame_number { } {
 clean_restart ${binfile}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -84,10 +83,25 @@ set total_nr_threads [expr $NR_THREADS +
 # Thread numbering in gdb is origin-1, so begin numbering at 1.
 for { set i 1 } { $i <= $total_nr_threads } { incr i } {
     set thread_nr $i
-    gdb_test "thread $thread_nr" ".*" \
+    gdb_test "thread $thread_nr" \
+	".*Switching to thread $thread_nr.*" \
 	"prepare to make hand call, thread $thread_nr"
-    gdb_test "call hand_call()" "Breakpoint 3, .*" \
-	"hand call, thread $thread_nr"
+    gdb_test_multiple "call hand_call()" "" {
+	-re "Breakpoint 3, .*$gdb_prompt $" {
+	    pass "hand call, thread $thread_nr"
+	}
+	-re "$gdb_prompt $" {
+	    fail "hand call, thread $thread_nr (got gdb prompt)"
+	}
+	timeout {
+	    # If the target fails to stop at the breakpoint, it just ends
+	    # up in an infinite loop in hand_call().  If this happens
+	    # and we have lost the GDB prompt, no further tests in
+	    # this file will work and there is no point in continuing.
+	    fail "hand call, thread $thread_nr (runaway target)"
+	    return 0
+	}
+    }
 }
 
 # Now have each hand-called function return.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-new-thread.c ./gdb/testsuite/gdb.threads/hand-call-new-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-new-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/hand-call-new-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-new-thread.exp ./gdb/testsuite/gdb.threads/hand-call-new-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/hand-call-new-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/hand-call-new-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/ia64-sigill.c ./gdb/testsuite/gdb.threads/ia64-sigill.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/ia64-sigill.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/ia64-sigill.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/ia64-sigill.exp ./gdb/testsuite/gdb.threads/ia64-sigill.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/ia64-sigill.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/ia64-sigill.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ gdb_test_multiple "continue" $test {
 	# Breakpoint has been skipped in the other thread.
 	pass $test
     }
-    -re "Program received signal .*\r\n$gdb_prompt $" {
+    -re " received signal .*\r\n$gdb_prompt $" {
 	fail $test
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c ./gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2013-2015 Free Software Foundation, Inc.
+/* Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal.c ./gdb/testsuite/gdb.threads/info-threads-cur-sal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/info-threads-cur-sal.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp ./gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/info-threads-cur-sal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,14 +41,20 @@ gdb_test "list $line" \
 # There used to be a bug where "info threads" would set the current
 # SAL to the location of the last thread displayed.
 gdb_test "info threads" \
-    "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
+    [multi_line \
+	 "\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*" \
+	 "  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
+	 "\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*"] \
     "info threads before break"
 
 # Check that "break" is still operating on the same file by default.
 gdb_test "break $line" ".*${srcfile2}.*" "break on line"
 
 gdb_test "info threads" \
-    "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
+    [multi_line \
+	 "\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*" \
+	 "  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
+	 "\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*"] \
     "info threads before list"
 
 # And that so is "list".
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/interrupted-hand-call.c ./gdb/testsuite/gdb.threads/interrupted-hand-call.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/interrupted-hand-call.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/interrupted-hand-call.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for hand function calls interrupted by a signal in another thread.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/interrupted-hand-call.exp ./gdb/testsuite/gdb.threads/interrupted-hand-call.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/interrupted-hand-call.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/interrupted-hand-call.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,15 +27,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
 clean_restart ${binfile}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/kill.c ./gdb/testsuite/gdb.threads/kill.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/kill.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/kill.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/killed.c ./gdb/testsuite/gdb.threads/killed.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/killed.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/killed.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/killed.exp ./gdb/testsuite/gdb.threads/killed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/killed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/killed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/kill.exp ./gdb/testsuite/gdb.threads/kill.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/kill.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/kill.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ proc test {threaded} {
 	gdb_continue_to_breakpoint "break here" ".*break here.*"
 
 	if {$threaded} {
-	    gdb_test "info threads" "6.*5.*4.*3.*2.*1.*" "all threads started"
+	    gdb_test "info threads" "1.*2.*3.*4.*5.*6.*" "all threads started"
 	}
 
 	# This kills and ensures no output other than the prompt comes out,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/leader-exit.c ./gdb/testsuite/gdb.threads/leader-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/leader-exit.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Clean exit of the thread group leader should not break GDB.
 
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/leader-exit.exp ./gdb/testsuite/gdb.threads/leader-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/leader-exit.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping leader-exit.exp because of nointerrupts."
+    return
+}
+
 # Exit of the thread group leader should not break GDB.
 
 standard_testfile
@@ -33,7 +38,7 @@ gdb_continue_to_breakpoint "break-here" 
 
 gdb_test "info threads" \
 	 "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*" \
-	 "Single thread has been left"
+	 "single thread has been left"
 
 # Test that ctrl-c works even if the leader has exited.
 
@@ -50,7 +55,7 @@ send_gdb "\003"
 
 set test "caught interrupt"
 gdb_test_multiple "" $test {
-    -re "Program received signal SIGINT.*$gdb_prompt $" {
+    -re "Thread .* received signal SIGINT.*$gdb_prompt $" {
 	pass $test
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/linux-dp.exp ./gdb/testsuite/gdb.threads/linux-dp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/linux-dp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/linux-dp.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ for {set i 0} {$i < 5} {incr i} {
 	-re "^ *Id.*Frame *\[\r\n\]+" {
 	    exp_continue
 	}
-	-re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+	-re "^. +(\[0-9\]+ *Thread \[-0-9a-fx.\]+) \[^\n\]*\n" {
 	    verbose -log "found thread $expect_out(1,string)" 2
 	    lappend threads_before $expect_out(1,string)
 	    exp_continue
@@ -94,11 +94,11 @@ for {set i 0} {$i < 5} {incr i} {
 	}
 	-re "^$gdb_prompt $" {
 	}
-	-re "Program received signal.*(Unknown signal|SIGUSR|Real-time event).*$gdb_prompt $" {
+	-re " received signal.*(Unknown signal|SIGUSR|Real-time event).*$gdb_prompt $" {
 	    # It would be nice if we could catch the message that GDB prints
 	    # when it first notices that the thread library doesn't support
 	    # debugging, or if we could explicitly ask GDB somehow.
-	    unsupported "This GDB does not support threads on this system."
+	    unsupported "this GDB does not support threads on this system."
 	    return -1
 	}
 	-re "$gdb_prompt $" {
@@ -126,7 +126,7 @@ for {set i 0} {$i < 5} {incr i} {
 	-re "^ *Id.*Frame *\[\r\n\]+" {
 	    exp_continue
 	}
-	-re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+	-re "^. +(\[0-9\]+ *Thread \[-0-9a-fx.\]+) \[^\n\]*\n" {
 	    set name $expect_out(1,string)
 	    for {set j 0} {$j != [llength $threads_before] } {incr j} {
 		if {$name == [lindex $threads_before $j]} {
@@ -168,7 +168,7 @@ set nthreads 6
 gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"]
 gdb_continue_to_breakpoint "main thread's sleep"
 set info_threads_ptn ".*"
-for {set i $nthreads} {$i > 0} {incr i -1} {
+for {set i 1} {$i <  $nthreads} {incr i} {
     append info_threads_ptn "$i *Thread .*"
 }
 append info_threads_ptn "\[\r\n\]+$gdb_prompt $"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c ./gdb/testsuite/gdb.threads/local-watch-wrong-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/local-watch-wrong-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp ./gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ clean_restart ${binfile}
 gdb_test_no_output "set can-use-hw-watchpoints 1" ""
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/Makefile.in ./gdb/testsuite/gdb.threads/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = attach-into-signal-nothr attach-into-signal-thr \
-	attach-stopped attachstop-mt \
-	bp_in_thread current-lwp-dead execl execl1 fork-child-threads \
-	fork-thread-pending gcore-pthreads hand-call-in-threads \
-	ia64-sigill interrupted-hand-call killed linux-dp \
-	local-watch-wrong-thread manythreads multi-create pending-step \
-	print-threads pthreads pthread_cond_wait schedlock sigthread \
-	staticthreads switch-threads thread-execl thread-specific \
-	thread_check thread_events threadapply threxit-hop-specific \
-	tls tls-main tls-nodebug watchthreads watchthreads-reorder \
-	watchthreads2
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp core core.* $(EXECUTABLES) \
-	 *.core gcore.test
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log config.h gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/manythreads.c ./gdb/testsuite/gdb.threads/manythreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/manythreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/manythreads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Manythreads test program.
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    Written by Jeff Johnston <jjohnstn@redhat.com> 
    Contributed by Red Hat
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/manythreads.exp ./gdb/testsuite/gdb.threads/manythreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/manythreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/manythreads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # manythreads.exp -- Expect script to test stopping many threads
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,11 @@
 
 # This file was written by Jeff Johnston. (jjohnstn@redhat.com)
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping manythreads.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
@@ -65,14 +70,14 @@ proc interrupt_and_wait { message } {
 	-re "\\\[\[^\]\]* exited\\\]\r\n" {
 	    exp_continue
 	}
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
+	-re " received signal SIGINT.*$gdb_prompt $" {
 	    pass "$message"
 	}
 	-re "$gdb_prompt $" {
 	    # Note that with this regex order, if GDB emits [New
-	    # Thread ...] output between "Program received signal" and
-	    # the prompt, the "Program received signal" regex won't
-	    # match.  That's good, as if we see that happening, it's a
+	    # Thread ...] output between "Thread NNN received signal"
+	    # and the prompt, the "received signal" regex won't match.
+	    # That's good, as if we see that happening, it's a
 	    # regression.
 	    #
 	    # GDB makes sure to notify about signal stops, end of
@@ -87,7 +92,7 @@ proc interrupt_and_wait { message } {
 	    #  ... more new threads output ...
 	    #  [New Thread NNN]
 	    #  [New Thread NNN]
-	    #  Program received signal SIGINT, Interrupt.
+	    #  Thread NNN received signal SIGINT, Interrupt.
 	    #  [New Thread NNN]
 	    #  [New Thread NNN]
 	    #  ... pages of new threads output ...
@@ -146,7 +151,7 @@ remote_expect host 1 {
   -re "\\\[\[^\]\]* exited\\\]\r\n" {
     exp_continue -continue_timer
   }
-  -re "Program received signal SIGINT.*$gdb_prompt $" {
+  -re " received signal SIGINT.*$gdb_prompt $" {
     if { $failed == 0 } {
       fail "check for duplicate SIGINT"
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create.c ./gdb/testsuite/gdb.threads/multi-create.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/multi-create.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Create threads from multiple threads in parallel.
-   Copyright 2007-2015 Free Software Foundation, Inc.
+   Copyright 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create.exp ./gdb/testsuite/gdb.threads/multi-create.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/multi-create.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # multi-create.exp -- Test creating many threads in parallel
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp ./gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multiple-step-overs.c ./gdb/testsuite/gdb.threads/multiple-step-overs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multiple-step-overs.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/multiple-step-overs.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multiple-step-overs.exp ./gdb/testsuite/gdb.threads/multiple-step-overs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/multiple-step-overs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/multiple-step-overs.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ proc setup {} {
 
 	gdb_breakpoint [gdb_get_line_number "set wait-threads breakpoint here"]
 	gdb_continue_to_breakpoint "run to breakpoint"
-	gdb_test "info threads" "3 .* 2 .*\\\* 1.*" "info threads shows all threads"
+	gdb_test "info threads" "\\\* 1 .* 2 .* 3 .*" "info threads shows all threads"
 
 	gdb_test_no_output "set scheduler-locking on"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/names.c ./gdb/testsuite/gdb.threads/names.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/names.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/names.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,97 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <assert.h>
+
+#define NUM_THREADS 3
+
+struct thread_data
+{
+  const char *name;
+  pthread_barrier_t *barrier;
+};
+
+static void *
+thread_func (void *varg)
+{
+  struct thread_data *arg = (struct thread_data *) varg;
+  int res;
+
+  res = pthread_setname_np (pthread_self (), arg->name);
+  assert (res == 0);
+
+  pthread_barrier_wait (arg->barrier);
+
+  pthread_barrier_wait (arg->barrier);
+
+  return NULL;
+}
+
+static void
+all_threads_ready (void)
+{
+}
+
+int
+main (int argc, char **argv)
+{
+  pthread_t threads[NUM_THREADS];
+  struct thread_data args[NUM_THREADS];
+  pthread_barrier_t barrier;
+  int i, res;
+  const char *names[] = { "carrot", "potato", "celery" };
+
+  alarm (20);
+
+  /* Make sure that NAMES contains NUM_THREADS elements.  */
+  assert (sizeof (names) / sizeof (names[0]) == NUM_THREADS);
+
+  res = pthread_barrier_init (&barrier, NULL, NUM_THREADS + 1);
+  assert (res == 0);;
+
+  res = pthread_setname_np (pthread_self (), "main");
+  assert (res == 0);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    {
+      struct thread_data *arg = &args[i];
+
+      arg->name = names[i];
+      arg->barrier = &barrier;
+
+      res = pthread_create (&threads[i], NULL, thread_func, arg);
+      assert (res == 0);
+    }
+
+  pthread_barrier_wait (&barrier);
+
+  all_threads_ready ();
+
+  pthread_barrier_wait (&barrier);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    {
+      res = pthread_join (threads[i], NULL);
+      assert (res == 0);
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/names.exp ./gdb/testsuite/gdb.threads/names.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/names.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/names.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,38 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Verify that thread name features work properly (e.g. they show up in info
+# threads).
+
+if [target_info exists gdb,no_thread_names] {
+    continue
+}
+
+standard_testfile
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
+    return -1
+}
+
+if ![runto "all_threads_ready"] {
+    continue
+}
+
+gdb_test "info threads" \
+    [multi_line "\\* 1   .*\"main\" all_threads_ready.*" \
+		"  2   .*\"carrot\".*"  \
+		"  3   .*\"potato\".*"  \
+		"  4   .*\"celery\".*" ] \
+    "list threads"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-bp-other-thread.c ./gdb/testsuite/gdb.threads/next-bp-other-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-bp-other-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/next-bp-other-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-bp-other-thread.exp ./gdb/testsuite/gdb.threads/next-bp-other-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-bp-other-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/next-bp-other-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ foreach schedlock {"off" "step" "on" } {
 
 	gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"]
 	gdb_continue_to_breakpoint "run to wait-thread breakpoint"
-	gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads"
+	gdb_test "info threads" "\\\* 1 .*  2 .*" "info threads shows all threads"
 
 	delete_breakpoints
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c ./gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,127 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <setjmp.h>
+
+/* Number of threads.  */
+#define NTHREADS 10
+
+/* When set, threads exit.  */
+volatile int break_out;
+
+pthread_barrier_t barrier;
+
+/* Entry point for threads that setjmp/longjmp.  */
+
+static void *
+thread_longjmp (void *arg)
+{
+  jmp_buf env;
+
+  pthread_barrier_wait (&barrier);
+
+  while (!break_out)
+    {
+      if (setjmp (env) == 0)
+	longjmp (env, 1);
+
+      usleep (1);
+    }
+  return NULL;
+}
+
+/* Entry point for threads that try/catch.  */
+
+static void *
+thread_try_catch (void *arg)
+{
+  volatile unsigned int counter = 0;
+
+  pthread_barrier_wait (&barrier);
+
+  while (!break_out)
+    {
+      try
+	{
+	  throw 1;
+	}
+      catch (...)
+	{
+	  counter++;
+	}
+
+      usleep (1);
+    }
+  return NULL;
+}
+
+int
+main (void)
+{
+  pthread_t threads[NTHREADS];
+  int i;
+  int ret;
+
+  /* Don't run forever.  */
+  alarm (180);
+
+  pthread_barrier_init (&barrier, NULL, NTHREADS + 1);
+
+  for (i = 0; i < NTHREADS; i++)
+    {
+      /* Half of the threads does setjmp/longjmp, the other half does
+	 try/catch.  */
+      if ((i % 2) == 0)
+	ret = pthread_create (&threads[i], NULL, thread_longjmp , NULL);
+      else
+	ret = pthread_create (&threads[i], NULL, thread_try_catch , NULL);
+      assert (ret == 0);
+    }
+
+  /* Wait until all threads are running.  */
+  pthread_barrier_wait (&barrier);
+
+#define LINE usleep (1)
+
+  /* The other thread's setjmp/longjmp/try/catch should not disturb
+     this thread's stepping over these lines.  */
+
+  LINE; /* set break here */
+  LINE; /* line 1 */
+  LINE; /* line 2 */
+  LINE; /* line 3 */
+  LINE; /* line 4 */
+  LINE; /* line 5 */
+  LINE; /* line 6 */
+  LINE; /* line 7 */
+  LINE; /* line 8 */
+  LINE; /* line 9 */
+  LINE; /* line 10 */
+
+  break_out = 1;
+
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_join (threads[i], NULL);
+      assert (ret == 0);
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp ./gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test has the main thread step over a few lines, while a few
+# threads constantly do setjmp/long and others do try/catch.  The
+# "next" commands in the main thread should be able to complete
+# undisturbed.
+
+standard_testfile
+
+set linenum [gdb_get_line_number "set break here"]
+
+if {[prepare_for_testing "failed to prepare" \
+	 $testfile $srcfile {c++ debug pthreads}] == -1} {
+    return -1
+}
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return 0
+}
+
+gdb_breakpoint $linenum
+gdb_continue_to_breakpoint "start line"
+
+for {set i 1} {$i <= 10} {incr i} {
+    gdb_test "next" " line $i .*" "next to line $i"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-1.c ./gdb/testsuite/gdb.threads/non-ldr-exc-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp ./gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-1.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,11 +28,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
     return -1
 }
 
-proc do_test { lock_sched } {
-    with_test_prefix "lock-sched$lock_sched" {
+proc do_test { lock_sched nonstop } {
+    with_test_prefix "lock-sched=$lock_sched,non-stop=$nonstop" {
 	global executable
 
-	clean_restart ${executable}
+	save_vars { GDBFLAGS } {
+	  append GDBFLAGS " -ex \"set non-stop $nonstop\""
+	  clean_restart ${executable}
+	}
 
 	if ![runto_main] {
 	    return -1
@@ -48,11 +51,22 @@ proc do_test { lock_sched } {
 	    gdb_test_no_output "set scheduler-locking on"
 	}
 
+	if { $nonstop == "on" } {
+	    gdb_test "thread 2" "Switching.*"
+	}
+
 	gdb_test "continue" \
 	    ".*is executing new program.*Breakpoint 1, main.* at .*" \
 	    "continue over exec"
     }
 }
 
-do_test 0
-do_test 1
+foreach nonstop {"on" "off"} {
+  foreach schedlock {"on" "off"} {
+    if {$schedlock == "on" && $nonstop == "on"} {
+      # Schedule locking has no effect in nonstop mode.
+      continue
+    }
+    do_test $schedlock $nonstop
+  }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-2.c ./gdb/testsuite/gdb.threads/non-ldr-exc-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp ./gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-2.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,11 +29,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
     return -1
 }
 
-proc do_test { lock_sched } {
-    with_test_prefix "lock-sched$lock_sched" {
+proc do_test { lock_sched nonstop } {
+    with_test_prefix "lock-sched=$lock_sched,non-stop=$nonstop" {
 	global executable
 
-	clean_restart ${executable}
+	save_vars { GDBFLAGS } {
+	  append GDBFLAGS " -ex \"set non-stop $nonstop\""
+	  clean_restart ${executable}
+	}
 
 	if ![runto_main] {
 	    return -1
@@ -42,6 +45,10 @@ proc do_test { lock_sched } {
 	gdb_breakpoint [gdb_get_line_number "break-here"]
 	gdb_continue_to_breakpoint "break-here" ".* break-here .*"
 
+	if { $nonstop == "on" } {
+	    gdb_test "thread 2" "Switching.*"
+	}
+
 	gdb_test "info threads" \
 	    "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*" \
 	    "single thread left"
@@ -59,5 +66,12 @@ proc do_test { lock_sched } {
     }
 }
 
-do_test 0
-do_test 1
+foreach nonstop {"on" "off"} {
+  foreach schedlock {"on" "off"} {
+    if {$schedlock == "on" && $nonstop == "on"} {
+      # Schedule locking has no effect in nonstop mode.
+      continue
+    }
+    do_test $schedlock $nonstop
+  }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-3.c ./gdb/testsuite/gdb.threads/non-ldr-exc-3.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-3.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-3.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp ./gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-3.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,11 +31,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
     return -1
 }
 
-proc do_test { lock_sched } {
-    with_test_prefix "lock-sched$lock_sched" {
+proc do_test { lock_sched nonstop } {
+    with_test_prefix "lock-sched=$lock_sched,non-stop=$nonstop" {
 	global executable
 
-	clean_restart ${executable}
+	save_vars { GDBFLAGS } {
+	  append GDBFLAGS " -ex \"set non-stop $nonstop\""
+	  clean_restart ${executable}
+	}
 
 	if ![runto_main] {
 	    return -1
@@ -51,11 +54,22 @@ proc do_test { lock_sched } {
 	    gdb_test_no_output "set scheduler-locking on"
 	}
 
+	if { $nonstop == "on" } {
+	    gdb_test "thread 2" "Switching.*"
+	}
+
 	gdb_test "continue" \
 	    ".*is executing new program.*Breakpoint 1, main.* at .*" \
 	    "continue over exec"
     }
 }
 
-do_test 0
-do_test 1
+foreach nonstop {"on" "off"} {
+  foreach schedlock {"on" "off"} {
+    if {$schedlock == "on" && $nonstop == "on"} {
+      # Schedule locking has no effect in nonstop mode.
+      continue
+    }
+    do_test $schedlock $nonstop
+  }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-4.c ./gdb/testsuite/gdb.threads/non-ldr-exc-4.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-4.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-4.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp ./gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exc-4.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,11 +30,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
     return -1
 }
 
-proc do_test { lock_sched } {
-    with_test_prefix "lock-sched$lock_sched" {
+proc do_test { lock_sched nonstop } {
+    with_test_prefix "lock-sched=$lock_sched,non-stop=$nonstop" {
 	global executable
 
-	clean_restart ${executable}
+	save_vars { GDBFLAGS } {
+	  append GDBFLAGS " -ex \"set non-stop $nonstop\""
+	  clean_restart ${executable}
+	}
 
 	if ![runto_main] {
 	    return -1
@@ -50,11 +53,22 @@ proc do_test { lock_sched } {
 	    gdb_test_no_output "set scheduler-locking on"
 	}
 
+	if { $nonstop == "on" } {
+	    gdb_test "thread 2" "Switching.*"
+	}
+
 	gdb_test "continue" \
 	    ".*is executing new program.*Breakpoint 1, main.* at .*" \
 	    "continue over exec"
     }
 }
 
-do_test 0
-do_test 1
+foreach nonstop {"on" "off"} {
+  foreach schedlock {"on" "off"} {
+    if {$schedlock == "on" && $nonstop == "on"} {
+      # Schedule locking has no effect in nonstop mode.
+      continue
+    }
+    do_test $schedlock $nonstop
+  }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exit.c ./gdb/testsuite/gdb.threads/non-ldr-exit.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exit.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exit.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,41 @@
+/* Clean exit of the thread group leader should not break GDB.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+static void *
+start (void *arg)
+{
+  exit (0);  /* break-here */
+  return arg;
+}
+
+int
+main (void)
+{
+  pthread_t thread;
+  int i;
+
+  i = pthread_create (&thread, NULL, start, NULL);
+  assert (i == 0);
+  i = pthread_join (thread, NULL);
+  abort ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exit.exp ./gdb/testsuite/gdb.threads/non-ldr-exit.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-ldr-exit.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-ldr-exit.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,45 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Exit of the thread group leader should not break GDB.
+
+standard_testfile
+set executable ${testfile}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main"
+    return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+
+# Now lock all threads but the one that calls exit.
+gdb_test_no_output "set scheduler-locking on"
+
+set test "program exits normally"
+gdb_test_multiple "continue" $test {
+    -re "exited normally.*$gdb_prompt " {
+	pass $test
+    }
+    -re "No unwaited-for children left.*$gdb_prompt " {
+	setup_kfail "gdb/18717" "*-*-linux*"
+	fail $test
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-stop-fair-events.c ./gdb/testsuite/gdb.threads/non-stop-fair-events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-stop-fair-events.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-stop-fair-events.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
 const int num_threads = NUM_THREADS;
 /* Allow for as much timeout as DejaGnu wants, plus a bit of
    slack.  */
-#define SECONDS (TIMEOUT + 20)
+
+volatile unsigned int timeout = TIMEOUT;
+#define SECONDS (timeout + 20)
 
 pthread_t child_thread[NUM_THREADS];
 volatile pthread_t signal_thread;
@@ -69,6 +71,11 @@ main (void)
   int res;
   int i;
 
+  /* Call these early so that we're sure their PLTs are quickly
+     resolved now, instead of in the busy threads.  */
+  pthread_kill (pthread_self (), 0);
+  alarm (0);
+
   signal (SIGUSR1, handler);
 
   for (i = 0; i < NUM_THREADS; i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-stop-fair-events.exp ./gdb/testsuite/gdb.threads/non-stop-fair-events.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/non-stop-fair-events.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-stop-fair-events.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -62,6 +62,21 @@ set NUM_THREADS [get_value "num_threads"
 # Account for the main thread.
 incr NUM_THREADS
 
+# Probe for displaced stepping support.  We're stopped at the main
+# breakpoint.  If displaced stepping is supported, we should see
+# related debug output.
+set displaced_stepping_enabled 0
+set msg "check displaced-stepping"
+gdb_test_no_output "set debug displaced 1"
+gdb_test_multiple "next" $msg {
+    -re "displaced pc to.*$gdb_prompt $" {
+	set displaced_stepping_enabled 1
+    }
+    -re ".*$gdb_prompt $" {
+    }
+}
+gdb_test_no_output "set debug displaced 0"
+
 # Run threads to their start positions.  This prepares for a new test
 # sequence.
 
@@ -98,12 +113,37 @@ proc restart {} {
     delete_breakpoints
 }
 
+# Run command and wait for the prompt, without end anchor.
+
+proc gdb_test_no_anchor {cmd} {
+    global gdb_prompt
+
+    gdb_test_multiple $cmd $cmd {
+	-re "$gdb_prompt " {
+	    pass $cmd
+	}
+    }
+}
+
+# Enable/disable debugging.
+
+proc enable_debug {enable} {
+
+    # Comment out to debug problems with the test.
+    return
+
+    gdb_test_no_anchor "set debug infrun $enable"
+    gdb_test_no_anchor "set debug displaced $enable"
+}
+
 # The test proper.  SIGNAL_THREAD is the thread that has been elected
 # to receive the SIGUSR1 signal.
 
 proc test {signal_thread} {
     global gdb_prompt
     global NUM_THREADS
+    global timeout
+    global displaced_stepping_enabled
 
     with_test_prefix "signal_thread=$signal_thread" {
 	restart
@@ -126,30 +166,72 @@ proc test {signal_thread} {
 
 	# Let the main thread queue the signal.
 	gdb_breakpoint "loop_broke"
-	set test "continue &"
-	gdb_test_multiple $test $test {
-	    -re "Continuing.\r\n$gdb_prompt " {
-		pass $test
-	    }
+
+	enable_debug 1
+
+	# On software single-step targets that don't support displaced
+	# stepping, threads keep hitting each others' single-step
+	# breakpoints, and then GDB needs to pause all threads to step
+	# past those.  The end result is that progress in the main
+	# thread will be slower and it may take a bit longer for the
+	# signal to be queued; bump the timeout.
+	if {!$displaced_stepping_enabled && ![can_hardware_single_step]} {
+	    # The more threads we have, the longer it takes.
+	    set factor $NUM_THREADS
+	} else {
+	    set factor 1
 	}
+	with_timeout_factor $factor {
+	    gdb_test "print timeout = $timeout" " = $timeout" \
+		"set timeout in the inferior"
+
+	    set saw_continuing 0
+	    set test "continue &"
+	    gdb_test_multiple $test $test {
+		-re "Continuing.\r\n" {
+		    set saw_continuing 1
+		    exp_continue
+		}
+		-re "$gdb_prompt " {
+		    gdb_assert $saw_continuing $test
+		}
+		-re "infrun:" {
+		    exp_continue
+		}
+	    }
 
-	# Wait for all threads to finish their steps, and for the main
-	# thread to hit the breakpoint.
-	for {set i 1} { $i <= $NUM_THREADS } { incr i } {
-	    set test "thread $i broke out of loop"
-	    gdb_test_multiple "" $test {
-		-re "loop_broke" {
-		    # The prompt was already matched in the "continue
-		    # &" test above.  We're now consuming asynchronous
-		    # output that comes after the prompt.
-		    pass $test
+	    set gotit 0
+
+	    # Wait for all threads to finish their steps, and for the main
+	    # thread to hit the breakpoint.
+	    for {set i 1} { $i <= $NUM_THREADS } { incr i } {
+		set test "thread $i broke out of loop"
+		set gotit 0
+		gdb_test_multiple "" $test {
+		    -re "loop_broke" {
+			# The prompt was already matched in the "continue
+			# &" test above.  We're now consuming asynchronous
+			# output that comes after the prompt.
+			set gotit 1
+			pass $test
+		    }
+		    -re "infrun:" {
+			exp_continue
+		    }
+		}
+		if {!$gotit} {
+		    break
 		}
 	    }
 	}
 
+	enable_debug 0
+
 	# It's helpful to have this in the log if the test ever
 	# happens to fail.
 	gdb_test "info threads"
+
+	return $gotit
     }
 }
 
@@ -158,5 +240,8 @@ proc test {signal_thread} {
 # with lowest kernel thread ID.  So test once with the signal pending
 # in each thread, except the main thread.
 for {set i 2} { $i <= $NUM_THREADS } { incr i } {
-    test $i
+    if {![test $i]} {
+	# Avoid cascading timeouts, and bail out.
+	return
+    }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/no-unwaited-for-left.c ./gdb/testsuite/gdb.threads/no-unwaited-for-left.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/no-unwaited-for-left.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/no-unwaited-for-left.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2007-2015 Free Software Foundation, Inc.
+/* Copyright 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp ./gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/no-unwaited-for-left.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,9 +37,6 @@ gdb_test_no_output "set scheduler-lockin
     "enable scheduler-locking, for thread 2"
 
 # Continue.  Thread 2 exits, and the main thread was already stopped.
-if [is_remote target] {
-    setup_kfail "gdb/14618" "*-*-*"
-}
 gdb_test "continue" \
     "No unwaited-for children left." \
     "continue stops when thread 2 exits"
@@ -61,9 +58,6 @@ gdb_continue_to_breakpoint "break-here-2
 gdb_test_no_output "set scheduler-locking on" \
     "enable scheduler-locking, for main thread"
 # The main thread exits, and thread 3 was already stopped.
-if [is_remote target] {
-    setup_kfail "gdb/14618" "*-*-*"
-}
 gdb_test "continue" \
     "No unwaited-for children left." \
     "continue stops when the main thread exits"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pending-step.c ./gdb/testsuite/gdb.threads/pending-step.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pending-step.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pending-step.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pending-step.exp ./gdb/testsuite/gdb.threads/pending-step.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pending-step.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pending-step.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -70,7 +70,7 @@ set ok 0
 for {set i 0} {$i < $iterations} {incr i} {
     set ok 0
     gdb_test_multiple "next" "$test" {
-	-re "Program received signal SIGTRAP.*$gdb_prompt $" {
+	-re " received signal SIGTRAP.*$gdb_prompt $" {
 	    fail "$test (spurious SIGTRAP)"
 	}
 	-re "$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/print-threads.exp ./gdb/testsuite/gdb.threads/print-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/print-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/print-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,16 +50,16 @@ proc test_all_threads { name kill } {
     gdb_test_multiple "continue" "all threads ran once" {
 	-re "Breakpoint \[0-9\]+, thread_function \\(arg=.*\\) at .*print-threads.c:\[0-9\]+.*$gdb_prompt" {
 	    set i [expr $i + 1]
-	    pass "Hit thread_function breakpoint, $i ($name)"
+	    pass "hit thread_function breakpoint, $i ($name)"
 	    send_gdb "continue\n"
 	    exp_continue
 	}
 	-re "Breakpoint \[0-9\]+, .* kill \\(.*\\) .*$gdb_prompt" {
 	    set j [expr $j + 1]
 	    if { $kill == 1 } {
-		pass "Hit kill breakpoint, $j ($name)"
+		pass "hit kill breakpoint, $j ($name)"
 	    } else {
-		fail "Hit kill breakpoint, $j ($name) (unexpected)"
+		fail "hit kill breakpoint, $j ($name) (unexpected)"
 	    }
 	    send_gdb "continue\n"
 	    exp_continue
@@ -72,11 +72,11 @@ proc test_all_threads { name kill } {
 		fail "all threads ran once ($name) (total $i threads ran)"
 	    }
 	}
-	-re "Program received signal SIGTRAP.*(Thread \[-0-9a-fx\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
+	-re " received signal SIGTRAP.*(Thread \[-0-9a-fx\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
 	    if { $kill == 1 } {
 		kfail "gdb/1265" "Running threads ($name) (zombie thread)"
 	    } else {
-		fail "Running threads ($name) (unknown output)"
+		fail "running threads ($name) (unknown output)"
 	    }
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-detaching.c ./gdb/testsuite/gdb.threads/process-dies-while-detaching.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-detaching.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/process-dies-while-detaching.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,116 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <assert.h>
+
+/* This barrier ensures we only reach the initial breakpoint after all
+   threads have started.  */
+pthread_barrier_t start_threads_barrier;
+
+/* Many threads in order to be fairly sure the process exits while GDB
+   is detaching from each thread in the process, on targets that need
+   to detach from each thread individually.  */
+#define NTHREADS 256
+
+/* GDB sets a watchpoint here.  */
+int globalvar = 1;
+
+/* GDB reads this.  */
+int mypid;
+
+/* Threads' entry point.  */
+
+void *
+thread_function (void *arg)
+{
+  pthread_barrier_wait (&start_threads_barrier);
+  _exit (0);
+}
+
+/* The fork child's entry point.  */
+
+void
+child_function (void)
+{
+  pthread_t threads[NTHREADS];
+  int i;
+
+  pthread_barrier_init (&start_threads_barrier, NULL, NTHREADS + 1);
+
+  for (i = 0; i < NTHREADS; i++)
+    pthread_create (&threads[i], NULL, thread_function, NULL);
+  pthread_barrier_wait (&start_threads_barrier);
+
+  exit (0);
+}
+
+/* This is defined by the .exp file if testing the multi-process
+   variant.  */
+#ifdef MULTIPROCESS
+
+/* The fork parent's entry point.  */
+
+void
+parent_function (pid_t child)
+{
+  int status, ret;
+
+  alarm (300);
+
+  ret = waitpid (child, &status, 0);
+  if (ret == -1)
+    exit (1);
+  else if (!WIFEXITED (status))
+    exit (2);
+  else
+    {
+      printf ("exited, status=%d\n", WEXITSTATUS (status));
+      exit (0);
+    }
+}
+
+#endif
+
+int
+main (void)
+{
+#ifdef MULTIPROCESS
+  pid_t child;
+
+  child = fork ();
+  if (child == -1)
+    return 1;
+#endif
+
+  mypid = getpid ();
+
+#ifdef MULTIPROCESS
+  if (child != 0)
+    parent_function (child);
+  else
+#endif
+    child_function ();
+
+  /* Not reached.  */
+  abort ();
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp ./gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/process-dies-while-detaching.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,327 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test spawns a few threads that immediately exit the whole
+# process.  On targets where the debugger needs to detach from each
+# thread individually (such as on the Linux kernel), the debugger must
+# handle the case of the process exiting while the detach is ongoing.
+#
+# Similarly, the process can also be killed from outside the debugger
+# (e.g., with SIGKILL), _before_ the user requests a detach.  The
+# debugger must likewise detach gracefully.
+#
+# The testcase actually builds two variants of the test program:
+# single-process, and multi-process.  In the multi-process variant,
+# the test program forks, and it's the fork child that spawns threads
+# that exit just while the process is being detached from.  The fork
+# parent waits for its child to exit, so if GDB fails to detach from
+# the child correctly, the parent hangs.  Because continuing the
+# parent can mask failure to detach from the child correctly (e.g.,
+# due to waitpid(-1,...) calls deep in the target layers managing to
+# reap the child), we try immediately detaching from the parent too,
+# and observing whether the parent exits via standard output.
+#
+# Normally, if testing with "target remote" against gdbserver, then
+# after detaching from all attached processes, gdbserver exits.
+# However, when gdbserver detaches from a process that is its own
+# direct child, gdbserver does not exit immediately.  Instead it
+# "joins" (waits for) the child, only exiting when the child itself
+# exits too.  Thus, on Linux, if gdbserver fails to detach from the
+# zombie child's threads correctly (or rather, reap them), it'll hang,
+# because the leader thread will only return an exit status after all
+# threads are reaped.  We test that as well.
+
+standard_testfile
+
+# Test that GDBserver exits.
+
+proc test_server_exit {} {
+    global server_spawn_id
+
+    set test "server exits"
+    gdb_expect {
+	-i $server_spawn_id
+	eof {
+	    pass $test
+	    wait -i $server_spawn_id
+	    unset server_spawn_id
+	}
+	timeout {
+	    fail "$test (timeout)"
+	}
+    }
+}
+
+# If RESULT is not zero, make the caller return.
+
+proc return_if_fail { result } {
+    if {$result != 0} {
+	return -code return
+    }
+}
+
+# Detach from a process, and ensure that it exits after detaching.
+# This relies on inferior I/O.
+
+proc detach_and_expect_exit {test} {
+    global decimal
+    global gdb_spawn_id
+    global inferior_spawn_id
+    global gdb_prompt
+
+    return_if_fail [gdb_test_multiple "detach" $test {
+	-re "Detaching from .*, process $decimal" {
+	}
+    }]
+
+    set saw_prompt 0
+    set saw_inf_exit 0
+    while { !$saw_prompt && ! $saw_inf_exit } {
+	# We don't know what order the interesting things will arrive in.
+	# Using a pattern of the form 'x|y|z' instead of -re x ... -re y
+	# ... -re z ensures that expect always chooses the match that
+	# occurs leftmost in the input, and not the pattern appearing
+	# first in the script that occurs anywhere in the input, so that
+	# we don't skip anything.
+	return_if_fail [gdb_test_multiple "" $test {
+	    -i "$inferior_spawn_id $gdb_spawn_id"
+	    -re "(exited, status=0)|($gdb_prompt )" {
+		if {[info exists expect_out(1,string)]} {
+		    verbose -log "saw inferior exit"
+		    set saw_inf_exit 1
+		} elseif {[info exists expect_out(2,string)]} {
+		    verbose -log "saw prompt"
+		    set saw_prompt 1
+		}
+		array unset expect_out
+	    }
+	}]
+    }
+
+    pass $test
+}
+
+# Run to _exit in the child.
+
+proc continue_to_exit_bp {} {
+    gdb_breakpoint "_exit" temporary
+    gdb_continue_to_breakpoint "_exit" ".*_exit.*"
+}
+
+# If testing single-process, simply detach from the process.
+#
+# If testing multi-process, first detach from the child, then detach
+# from the parent and confirm that the parent exits, thus ensuring
+# we've detached from the child successfully, as the parent hangs in
+# its waitpid call otherwise.
+#
+# If connected with "target remote", make sure gdbserver exits.
+#
+# CMD indicates what to do with the parent after detaching the child.
+# Can be either "detach" to detach, or "continue", to continue to
+# exit.  If "continue", then CONTINUE_RE is the regexp to expect.
+# Defaults to normal exit output.
+#
+proc do_detach {multi_process cmd {continue_re ""}} {
+    global decimal
+    global server_spawn_id
+
+    if {$continue_re == ""} {
+	set continue_re "exited normally.*"
+    }
+
+    set is_remote [expr {[target_info exists gdb_protocol]
+			 && [target_info gdb_protocol] == "remote"}]
+
+    if {$multi_process} {
+	gdb_test "detach" "Detaching from .*, process $decimal" \
+	    "detach child"
+
+	gdb_test "inferior 1" "\[Switching to inferior $decimal\].*" \
+	    "switch to parent"
+
+	if {$cmd == "detach"} {
+	    # Make sure that detach works and that the parent process
+	    # exits cleanly.
+	    detach_and_expect_exit "detach parent"
+	} elseif {$cmd == "continue"} {
+	    # Make sure that continuing works and that the parent process
+	    # exits cleanly.
+	    gdb_test "continue" $continue_re
+	} else {
+	    perror "unhandled command: $cmd"
+	}
+    } else {
+	if $is_remote {
+	    set extra "\r\nEnding remote debugging\."
+	} else {
+	    set extra ""
+	}
+	if {$cmd == "detach"} {
+	    gdb_test "detach" "Detaching from .*, process $decimal$extra"
+	} elseif {$cmd == "continue"} {
+	    gdb_test "continue" $continue_re
+	} else {
+	    perror "unhandled command: $cmd"
+	}
+    }
+
+    # When connected in "target remote" mode, the server should exit
+    # when there are no processes left to debug.
+    if { $is_remote && [info exists server_spawn_id]} {
+	test_server_exit
+    }
+}
+
+# Test detaching from a process that dies just while GDB is detaching.
+
+proc test_detach {multi_process cmd} {
+    with_test_prefix "detach" {
+	global binfile
+
+	clean_restart ${binfile}
+
+	if ![runto_main] {
+	    fail "can't run to main"
+	    return -1
+	}
+
+	if {$multi_process} {
+	    gdb_test_no_output "set detach-on-fork off"
+	    gdb_test_no_output "set follow-fork-mode child"
+	}
+
+	# Run to _exit in the child.
+	continue_to_exit_bp
+
+	do_detach $multi_process $cmd
+    }
+}
+
+# Same as test_detach, except set a watchpoint before detaching.
+
+proc test_detach_watch {multi_process cmd} {
+    with_test_prefix "watchpoint" {
+	global binfile decimal
+
+	clean_restart ${binfile}
+
+	if ![runto_main] {
+	    fail "can't run to main"
+	    return -1
+	}
+
+	if {$multi_process} {
+	    gdb_test_no_output "set detach-on-fork off"
+	    gdb_test_no_output "set follow-fork-mode child"
+
+	    gdb_breakpoint "child_function" temporary
+	    gdb_continue_to_breakpoint "child_function" ".*"
+	}
+
+	# Set a watchpoint in the child.
+	gdb_test "watch globalvar" ".* watchpoint $decimal: globalvar"
+
+	# Continue to the _exit breakpoint.  This arms the watchpoint
+	# registers in all threads.  Detaching will thus need to clear
+	# them out, and handle the case of the thread disappearing
+	# while doing that (on targets that need to detach from each
+	# thread individually).
+	continue_to_exit_bp
+
+	do_detach $multi_process $cmd
+    }
+}
+
+# Test detaching from a process that dies _before_ GDB starts
+# detaching.
+
+proc test_detach_killed_outside {multi_process cmd} {
+    with_test_prefix "killed outside" {
+	global binfile
+
+	clean_restart ${binfile}
+
+	if ![runto_main] {
+	    fail "can't run to main"
+	    return -1
+	}
+
+	gdb_test_no_output "set breakpoint always-inserted on"
+
+	if {$multi_process} {
+	    gdb_test_no_output "set detach-on-fork off"
+	    gdb_test_no_output "set follow-fork-mode child"
+	}
+
+	# Run to _exit in the child.
+	continue_to_exit_bp
+
+	set childpid [get_integer_valueof "mypid" -1]
+	if { $childpid == -1 } {
+	    untested "failed to extract child pid"
+	    return -1
+	}
+
+	remote_exec target "kill -9 ${childpid}"
+
+	# Give it some time to die.
+	sleep 2
+
+	if {$multi_process} {
+	    set continue_re "exited with code 02.*"
+	} else {
+	    set continue_re "terminated with signal SIGKILL.*"
+	}
+	do_detach $multi_process $cmd $continue_re
+    }
+}
+
+# The test proper.  MULTI_PROCESS is true if testing the multi-process
+# variant.
+
+proc do_test {multi_process cmd} {
+    global testfile srcfile binfile
+
+    if {$multi_process && $cmd == "detach"
+	&& [target_info exists gdb,noinferiorio]} {
+	# This requires inferior I/O to tell whether both the parent
+	# and child exit successfully.
+	return
+    }
+
+    set binfile [standard_output_file ${testfile}-$multi_process-$cmd]
+    set options {debug pthreads}
+    if {$multi_process} {
+	lappend options "additional_flags=-DMULTIPROCESS"
+    }
+
+    if {[build_executable "failed to build" \
+	     $testfile-$multi_process-$cmd $srcfile $options] == -1} {
+	return -1
+    }
+
+    test_detach $multi_process $cmd
+    test_detach_watch $multi_process $cmd
+    test_detach_killed_outside $multi_process $cmd
+}
+
+foreach multi_process {0 1} {
+    set mode [expr {$multi_process ? "multi-process" : "single-process"}]
+    foreach cmd {"detach" "continue"} {
+	with_test_prefix "$mode: $cmd" {
+	    do_test $multi_process $cmd
+	}
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c ./gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,73 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <pthread.h>
+#include <unistd.h>
+
+/* Number of threads.  Each thread continuously steps over a
+   breakpoint.  */
+#define NTHREADS 10
+
+pthread_t threads[NTHREADS];
+
+pthread_barrier_t barrier;
+
+/* Used to create a conditional breakpoint that always fails.  */
+volatile int zero;
+
+static void *
+thread_func (void *arg)
+{
+  pthread_barrier_wait (&barrier);
+
+  while (1)
+    {
+      usleep (1); /* set break here */
+    }
+
+  return NULL;
+}
+
+int
+main (void)
+{
+  int ret;
+  int i;
+
+  /* Don't run forever.  */
+  alarm (180);
+
+  pthread_barrier_init (&barrier, NULL, NTHREADS + 1);
+
+  /* Start the threads that constantly hits a conditional breakpoint
+     that needs to be stepped over.  */
+  for (i = 0; i < NTHREADS; i++)
+    {
+      ret = pthread_create (&threads[i], NULL, thread_func, NULL);
+      assert (ret == 0);
+    }
+
+  /* Wait until all threads are up and running.  */
+  pthread_barrier_wait (&barrier);
+
+  /* Let them start hitting the breakpoint.  */
+  usleep (100);
+
+  /* Exit abruptly.  */
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp ./gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,135 @@
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This test spawns a few threads that constantly trip on a breakpoint
+# that does not cause a user-visible stop.  While one of those
+# breakpoints is being handled, the main thread exits the whole
+# process.  The result is that the current thread for which GDB is
+# handling the event disappears too and any attempt to access
+# register/memory now errors out.  GDB and GDBserver should be able to
+# handle this scenario gracefully.
+#
+# See https://sourceware.org/bugzilla/show_bug.cgi?id=18749
+
+standard_testfile
+
+set linenum [gdb_get_line_number "set break here"]
+
+if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
+    return -1
+}
+
+# The test proper.  If COND_BP_TARGET is true, then test with
+# conditional breakpoints evaluated on the target side, if possible.
+
+proc do_test { non_stop cond_bp_target } {
+    global GDBFLAGS
+    global gdb_prompt
+    global binfile
+    global linenum
+
+    set saved_gdbflags $GDBFLAGS
+    set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop $non_stop\""]
+    clean_restart $binfile
+    set GDBFLAGS $saved_gdbflags
+
+    if ![runto_main] then {
+	fail "can't run to main"
+	return 0
+    }
+
+    # Whether it's known that the test fails.
+    set should_kfail 0
+
+    if {![gdb_is_target_remote]} {
+	set should_kfail 1
+    } else {
+	if {!$cond_bp_target} {
+	    # Leaving breakpoint evaluation to GDB exposes failures
+	    # similar to native debugging.
+	    gdb_test_no_output "set remote conditional-breakpoints-packet off"
+	    set should_kfail 1
+	} else {
+	    set test "show remote conditional-breakpoints-packet"
+	    gdb_test_multiple $test $test {
+		-re "currently enabled\.\r\n$gdb_prompt $" {
+		    pass $test
+		}
+		-re "currently disabled\.\r\n$gdb_prompt $" {
+		    unsupported "no support for target-side conditional breakpoints"
+		    return
+		}
+	    }
+	    set should_kfail 1
+	}
+    }
+
+    gdb_test "break $linenum if zero == 1" \
+	"Breakpoint .*" \
+	"set breakpoint that evals false"
+
+    set test "continue &"
+    gdb_test_multiple $test $test {
+	-re "$gdb_prompt " {
+	    pass $test
+	}
+    }
+
+    set ok 0
+
+    # Setup the kfail upfront in order to also catch GDB internal
+    # errors.
+    if {$should_kfail} {
+	setup_kfail "gdb/18749" "*-*-*"
+    }
+
+    set test "inferior 1 exited"
+    gdb_test_multiple "" $test {
+	-re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
+	    set ok 1
+
+	    # Clear the kfail to avoid a PASS -> KPASS dance across
+	    # runs.
+	    clear_kfail "*-*-linux*"
+
+	    pass $test
+	}
+	-re "$gdb_prompt " {
+	    # Several errors end up at the top level, and printing the
+	    # prompt.
+	    fail "$test (prompt)"
+	}
+	-re "Cannot access memory" {
+	    fail "$test (memory error)"
+	}
+	eof {
+	    fail "$test (GDB died)"
+	}
+    }
+
+    if {!$ok} {
+	# No use testing further.
+	return
+    }
+
+    gdb_test "info threads" "No threads\." \
+	"no threads left"
+}
+
+foreach_with_prefix non_stop {"on" "off"} {
+    foreach_with_prefix cond_bp_target {1 0} {
+	do_test $non_stop $cond_bp_target
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthread_cond_wait.c ./gdb/testsuite/gdb.threads/pthread_cond_wait.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthread_cond_wait.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pthread_cond_wait.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* A small multi-threaded test case.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthread_cond_wait.exp ./gdb/testsuite/gdb.threads/pthread_cond_wait.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthread_cond_wait.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pthread_cond_wait.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthreads.c ./gdb/testsuite/gdb.threads/pthreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pthreads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Pthreads test program.
-   Copyright 1996-2015 Free Software Foundation, Inc.
+   Copyright 1996-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish of Cygnus Support
    Contributed by Cygnus Support
@@ -24,19 +24,6 @@
 #include <pthread.h>
 #include <unistd.h>
 
-/* Under HPUX 10, the second arg of pthread_create
-   is prototyped to be just a "pthread_attr_t", while under Solaris it
-   is a "pthread_attr_t *".  Arg! */
-
-#if defined (__hpux__)
-#define PTHREAD_CREATE_ARG2(arg) arg
-#define PTHREAD_CREATE_NULL_ARG2 null_attr
-static pthread_attr_t null_attr;
-#else
-#define PTHREAD_CREATE_ARG2(arg) &arg
-#define PTHREAD_CREATE_NULL_ARG2 NULL
-#endif
-
 static int verbose = 0;
 
 static void
@@ -140,7 +127,7 @@ main(argc, argv)
     }
 #endif
 
-  if (pthread_create (&tid1, PTHREAD_CREATE_ARG2(attr), thread1, (void *) 0xfeedface))
+  if (pthread_create (&tid1, &attr, thread1, (void *) 0xfeedface))
     {
       perror ("pthread_create 1");
       exit (1);
@@ -148,7 +135,7 @@ main(argc, argv)
   if (verbose) printf ("Made thread %ld\n", (long) tid1);
   sleep (1);
 
-  if (pthread_create (&tid2, PTHREAD_CREATE_NULL_ARG2, thread2, (void *) 0xdeadbeef))
+  if (pthread_create (&tid2, NULL, thread2, (void *) 0xdeadbeef))
     {
       perror ("pthread_create 2");
       exit (1);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthreads.exp ./gdb/testsuite/gdb.threads/pthreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/pthreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/pthreads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,6 +15,11 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping pthreads.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
@@ -166,7 +171,7 @@ proc test_startup {} {
     gdb_test "break thread2" "Breakpoint .* file .*$srcfile.*"
     gdb_test "continue" \
 	    "Continuing.*Breakpoint .*, thread2 \\(arg=0xdeadbeef\\).*at.*$srcfile.*" \
-	    "Continue to creation of second thread"
+	    "continue to creation of second thread"
 
     # Extract the thread id number of thread 2 from "info threads" output.
     gdb_test_multiple "info threads" "get thread 2 id" {
@@ -184,20 +189,20 @@ proc check_control_c {} {
 
     # Verify that all threads are running.
     if [all_threads_running] then {
-	pass "All threads running after startup"
+	pass "all threads running after startup"
     }
 
     # Send a continue followed by ^C to the process to stop it.
     gdb_test_multiple "continue" "continue with all threads running" {
 	-re "Continuing." {
-	    pass "Continue with all threads running"
+	    pass "continue with all threads running"
 	}
     }
     after 2000
     send_gdb "\003"
     set description "Stopped with a ^C"
     gdb_expect {
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
+	-re "Thread .* received signal SIGINT.*$gdb_prompt $" {
 	    pass $description
 	}
 	-re "Quit.*$gdb_prompt $" {
@@ -212,7 +217,7 @@ proc check_control_c {} {
 
     # Verify that all threads can be run again after a ^C stop.
     if [all_threads_running] then {
-	pass "All threads running after continuing from ^C stop"
+	pass "all threads running after continuing from ^C stop"
     }
     return 0
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/queue-signal.c ./gdb/testsuite/gdb.threads/queue-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/queue-signal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/queue-signal.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/queue-signal.exp ./gdb/testsuite/gdb.threads/queue-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/queue-signal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/queue-signal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/reconnect-signal.c ./gdb/testsuite/gdb.threads/reconnect-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/reconnect-signal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/reconnect-signal.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/reconnect-signal.exp ./gdb/testsuite/gdb.threads/reconnect-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/reconnect-signal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/reconnect-signal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,14 +27,14 @@ if { [gdb_compile_pthreads \
 	  "${srcdir}/${subdir}/${srcfile}" \
 	  "${binfile}" \
 	  executable {debug}] != "" } {
-    untested "Couldn't compile test program."
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $executable
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/schedlock.c ./gdb/testsuite/gdb.threads/schedlock.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/schedlock.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/schedlock.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/schedlock.exp ./gdb/testsuite/gdb.threads/schedlock.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/schedlock.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/schedlock.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,12 @@
 #
 # This test covers the various forms of "set scheduler-locking".
 
+# This test requires sending ^C to interrupt the running target.
+
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping schedlock.exp because of nointerrupts."
+    return
+}
 
 standard_testfile
 
@@ -63,7 +69,7 @@ proc stop_process { description } {
   # message first, or GDB's signal handler may not be in place.
   after 1000 {send_gdb "\003"}
   gdb_expect {
-    -re "Program received signal SIGINT.*$gdb_prompt $"
+    -re "Thread .* received signal SIGINT.*$gdb_prompt $"
       {
 	pass $description
       }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/siginfo-threads.c ./gdb/testsuite/gdb.threads/siginfo-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/siginfo-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/siginfo-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/siginfo-threads.exp ./gdb/testsuite/gdb.threads/siginfo-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/siginfo-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/siginfo-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ for {set sigcount 0} {$sigcount < 4} {in
     set test "catch signal $sigcount"
     set sigusr ""
     gdb_test_multiple "continue" $test {
-	-re "Program received signal SIGUSR(\[12\]), User defined signal \[12\]\\.\r\n.*\r\n$gdb_prompt $" {
+	-re "Thread .* received signal SIGUSR(\[12\]), User defined signal \[12\]\\.\r\n.*\r\n$gdb_prompt $" {
 	    set sigusr $expect_out(1,string)
 	    pass $test
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c ./gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-handle-nopass.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp ./gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ proc test { step_over } {
 	clean_restart ${binfile}
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ proc test { schedlock } {
 	clean_restart ${binfile}
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
@@ -68,9 +68,9 @@ proc test { schedlock } {
 	# signal.
 
 	gdb_test "thread 3" "Switching to thread 3.*"
-	gdb_test "continue" "Program received signal SIGUSR2.*" "stop with SIGUSR2"
+	gdb_test "continue" "Thread 3 .*received signal SIGUSR2.*" "stop with SIGUSR2"
 	gdb_test "thread 2" "Switching to thread 2.*"
-	gdb_test "continue" "Program received signal SIGUSR1.*" "stop with SIGUSR1"
+	gdb_test "continue" "Thread 2 .*received signal SIGUSR1.*" "stop with SIGUSR1"
 
 	gdb_test "break handler_sigusr1" "Breakpoint .* at .*$srcfile.*"
 	gdb_test "break handler_sigusr2" "Breakpoint .* at .*$srcfile.*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c ./gdb/testsuite/gdb.threads/signal-delivered-right-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-delivered-right-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp ./gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,13 +35,13 @@ proc test { command } {
 	clean_restart ${binfile}
 
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
 	gdb_test "handle SIGUSR1 stop print pass"
 
-	gdb_test "continue" "Program received signal SIGUSR1.*" "stop with SIGUSR1"
+	gdb_test "continue" "Thread 2 .*received signal SIGUSR1.*" "stop with SIGUSR1"
 
 	set pattern "\\\* 2\[ \t\]+Thread.*"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-sigtrap.c ./gdb/testsuite/gdb.threads/signal-sigtrap.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-sigtrap.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-sigtrap.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-sigtrap.exp ./gdb/testsuite/gdb.threads/signal-sigtrap.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-sigtrap.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-sigtrap.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ proc test { sigtrap_thread } {
 	clean_restart ${binfile}
 
 	if ![runto "thread_function"] then {
-	    fail "Can't run to thread_function"
+	    fail "can't run to thread_function"
 	    return 0
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c ./gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp ./gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -100,7 +100,7 @@ gdb_test_sequence $test $test {
     "need to step-over"
     "resume \\(step=1"
     "signal arrived while stepping over breakpoint"
-    "switching back to stepped thread"
+    "(restart threads|switching back to stepped thread)"
     "stepped to a different line"
     "callme"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigstep-threads.c ./gdb/testsuite/gdb.threads/sigstep-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigstep-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/sigstep-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigstep-threads.exp ./gdb/testsuite/gdb.threads/sigstep-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigstep-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/sigstep-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ standard_testfile
 set executable ${testfile}
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -45,7 +45,7 @@ for {set i 0} {$i < 100} {incr i} {
     # Presume this step failed - as in the case of a timeout.
     set failed 1
     gdb_test_multiple "step" $test {
-	-re "\r\nProgram received signal SIGUSR1, User defined signal 1.\r\n" {
+	-re " received signal SIGUSR1, User defined signal 1.\r\n" {
 	    exp_continue -continue_timer
 	}
 	-re "step-(\[012\]).*\r\n$gdb_prompt $" {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigthread.exp ./gdb/testsuite/gdb.threads/sigthread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/sigthread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/sigthread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # sigthread.exp -- Expect script to test thread and signal interaction
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
@@ -37,10 +37,16 @@ gdb_test_multiple "continue" "continue" 
     }
 }
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping sigthread.exp because of nointerrupts."
+    return
+}
+
 # For this to work we must be sure to consume the "Continuing."
 # message first, or GDB's signal handler may not be in place.
 after 500 {send_gdb "\003"}
 
 # Make sure we do not get an internal error from hitting Control-C
 # while many signals are flying back and forth.
-gdb_test "" "Program received signal SIGINT.*" "stop with control-c"
+gdb_test "" "Thread .* received signal SIGINT.*" "stop with control-c"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/staticthreads.c ./gdb/testsuite/gdb.threads/staticthreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/staticthreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/staticthreads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test program is part of GDB, The GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    Originally written by Jeff Johnston <jjohnstn@redhat.com>,
    contributed by Red Hat
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/staticthreads.exp ./gdb/testsuite/gdb.threads/staticthreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/staticthreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/staticthreads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # static.exp -- test script, for GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,12 +42,12 @@ gdb_test_no_output "set print sevenbit-s
 
 runto_main
 gdb_test "break sem_post"
-set test "Continue to main's call of sem_post"
+set test "continue to main's call of sem_post"
 gdb_test_multiple "continue" "$test" {
     -re "Breakpoint .*, .*sem_post .*$gdb_prompt " {
 	pass "$test"
     }
-    -re "Program received signal .*$gdb_prompt " {
+    -re " received signal .*$gdb_prompt " {
 	kfail gdb/1328 "$test"
     }
 }
@@ -58,14 +58,14 @@ gdb_test_multiple "continue" "$test" {
 
 set sig "SIG32"
 
-# SIGRTMIN is 37 on hppa-linux and hpux
+# SIGRTMIN is 37 on hppa-linux
 if [istarget hppa*-*-*] {
   set sig "SIG37"
 }
 
 rerun_to_main
 gdb_test "handle $sig nostop noprint pass"
-set test "Handle $sig helps"
+set test "handle $sig helps"
 gdb_test "continue" " .*sem_post .*" "handle $sig helps"
 
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c ./gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp ./gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ delete_breakpoints
 
 gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
 gdb_continue_to_breakpoint "run to nop breakpoint"
-gdb_test "info threads" "\\\* 2 .* 1.*" "info threads shows all threads"
+gdb_test "info threads" "  1 .*\\\* 2 .*" "info threads shows all threads"
 
 gdb_test "next" "while.*" "next over nop"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/stepi-random-signal.c ./gdb/testsuite/gdb.threads/stepi-random-signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/stepi-random-signal.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/stepi-random-signal.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/stepi-random-signal.exp ./gdb/testsuite/gdb.threads/stepi-random-signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/stepi-random-signal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/stepi-random-signal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if { [gdb_compile_pthreads \
 	  "${srcdir}/${subdir}/${srcfile}" \
 	  "${binfile}" \
 	  executable {debug}] != "" } {
-    untested "Couldn't compile test program."
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c ./gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -41,23 +41,26 @@ child_function (void *arg)
   pthread_exit (NULL);
 }
 
-static int
-wait_threads (void)
-{
-  return 1; /* in wait_threads */
-}
-
 int
 main ()
 {
   int res;
   long i;
 
+  alarm (300);
+
   pthread_barrier_init (&barrier, NULL, 2);
 
   res = pthread_create (&child_thread, NULL, child_function, NULL);
   pthread_barrier_wait (&barrier);
-  wait_threads (); /* set wait-thread breakpoint here */
+
+  /* Use an infinite loop with no function calls so that "step" over
+     this line never finishes before the breakpoint in the other
+     thread triggers.  That can happen if the step-over of thread 2 is
+     done with displaced stepping on a target that is always in
+     non-stop mode, as in that case GDB runs both threads
+     simultaneously.  */
+  while (1); /* set wait-thread breakpoint here */
 
   pthread_join (child_thread, NULL);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp ./gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ proc do_test {displaced command} {
 
 	gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"]
 	gdb_continue_to_breakpoint "run to wait-thread breakpoint"
-	gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads"
+	gdb_test "info threads" "\\\* 1 .*  2 .*" "info threads shows all threads"
 
 	gdb_test_no_output "set scheduler-locking on"
 
@@ -59,9 +59,9 @@ proc do_test {displaced command} {
 	gdb_test_no_output "set scheduler-locking off"
 
 	# Thread 2 is still stopped at a breakpoint that needs to be
-	# stepped over before proceeding thread 1.  However, right
-	# where the step-over lands there's another breakpoint
-	# installed, which should trap and be reported to the user.
+	# stepped over.  However, right where the step-over lands
+	# there's another breakpoint installed, which should trap and
+	# be reported to the user.
 	gdb_test "$command" "step-over here.*"
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c ./gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -43,23 +43,26 @@ child_function (void *arg)
   pthread_exit (NULL);
 }
 
-static int
-wait_threads (void)
-{
-  return 1; /* in wait_threads */
-}
-
 int
 main ()
 {
   int res;
   long i;
 
+  alarm (300);
+
   pthread_barrier_init (&barrier, NULL, 2);
 
   res = pthread_create (&child_thread, NULL, child_function, NULL);
   pthread_barrier_wait (&barrier);
-  wait_threads (); /* set wait-thread breakpoint here */
+
+  /* Use an infinite loop with no function calls so that "step" over
+     this line never finishes before the watchpoint in the other
+     thread triggers.  That can happen if the step-over of thread 2 is
+     done with displaced stepping on a target that is always in
+     non-stop mode, as in that case GDB runs both threads
+     simultaneously.  */
+  while (1); /* set wait-thread breakpoint here */
 
   pthread_join (child_thread, NULL);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp ./gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ proc do_test { displaced with_bp } {
 
 		gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"]
 		gdb_continue_to_breakpoint "run to wait-thread breakpoint"
-		gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads"
+		gdb_test "info threads" "\\\* 1 .*  2 .*" "info threads shows all threads"
 
 		gdb_test_no_output "set scheduler-locking on"
 
@@ -115,11 +115,10 @@ proc do_test { displaced with_bp } {
 		gdb_test "thread 1" "Switching to .*"
 		gdb_test_no_output "set scheduler-locking off"
 
-		# Thread 2 is still stopped at a breakpoint that needs to be
-		# stepped over before proceeding thread 1.  However, the
-		# instruction that is under the breakpoint triggers a
-		# watchpoint, which should trap and be reported to the
-		# user.
+		# Thread 2 is still stopped at a breakpoint that needs
+		# to be stepped over.  However, the instruction that
+		# is under the breakpoint triggers a watchpoint, which
+		# should trap and be reported to the user.
 		gdb_test "$command" "Hardware watchpoint.*: watch_me.*New value = 1.*"
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/switch-threads.c ./gdb/testsuite/gdb.threads/switch-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/switch-threads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/switch-threads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* A minimal multi-threaded test case.
 
-   Copyright 2003-2015 Free Software Foundation, Inc.
+   Copyright 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/switch-threads.exp ./gdb/testsuite/gdb.threads/switch-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/switch-threads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/switch-threads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threadapply.c ./gdb/testsuite/gdb.threads/threadapply.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threadapply.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/threadapply.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threadapply.exp ./gdb/testsuite/gdb.threads/threadapply.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threadapply.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/threadapply.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_check.c ./gdb/testsuite/gdb.threads/thread_check.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_check.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread_check.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_check.exp ./gdb/testsuite/gdb.threads/thread_check.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_check.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread_check.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 clean_restart ${binfile}
 
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
       return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_events.c ./gdb/testsuite/gdb.threads/thread_events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_events.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread_events.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_events.exp ./gdb/testsuite/gdb.threads/thread_events.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread_events.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread_events.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -112,7 +112,7 @@ proc test_thread_messages {enabled} {
   # The initial thread may log a 'New Thread' message, but we don't
   # check for it.
   if ![runto_main] then {
-     fail "Can't run to main $enabled_string"
+     fail "can't run to main $enabled_string"
      return 1
   }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-execl.c ./gdb/testsuite/gdb.threads/thread-execl.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-execl.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-execl.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-execl.exp ./gdb/testsuite/gdb.threads/thread-execl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-execl.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-execl.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,11 +16,6 @@
 # Test that GDB doesn't get stuck when stepping over an exec call done
 # by a thread other than the main thread.
 
-# There's no support for exec events in the remote protocol.
-if { [is_remote target] } {
-    return 0
-}
-
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-find.exp ./gdb/testsuite/gdb.threads/thread-find.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-find.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-find.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -55,29 +55,11 @@ gdb_test "thread apply 6 thread name thr
     "name thread 6"
 
 # Collect thread ids, if any.
+
 gdb_test_multiple "info threads" "collect thread id" {
-    -re ". 6 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" {
-	set thread6 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 5 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" {
-	set thread5 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 4 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" {
-	set thread4 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 3 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" {
-	set thread3 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 2 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" {
-	set thread2 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 1 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" {
-	set thread1 $expect_out(1,string)
+    -re ". (\[0-9\]+) \[^\r\n\]*\[Tt\]hread (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set thread$thr_num $expect_out(2,string)
 	exp_continue
     }
     -re ".*$gdb_prompt $" {
@@ -90,29 +72,11 @@ if { [info exists thread6] } then {
 }
 
 # Collect process ids, if any.
+
 gdb_test_multiple "info threads" "collect thread id" {
-    -re ". 6 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" {
-	set process6 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 5 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" {
-	set process5 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 4 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" {
-	set process4 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 3 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" {
-	set process3 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 2 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" {
-	set process2 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 1 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" {
-	set process1 $expect_out(1,string)
+    -re ". (\[0-9\]+) \[^\r\n\]*\[Pp\]rocess (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set process$thr_num $expect_out(2,string)
 	exp_continue
     }
     -re ".*$gdb_prompt $" {
@@ -125,29 +89,11 @@ if { [info exists process6] } then {
 }
 
 # Collect lwp ids, if any.
+
 gdb_test_multiple "info threads" "collect thread id" {
-    -re ". 6 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" {
-	set lwp6 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 5 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" {
-	set lwp5 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 4 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" {
-	set lwp4 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 3 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" {
-	set lwp3 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 2 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" {
-	set lwp2 $expect_out(1,string)
-	exp_continue
-    }
-    -re ". 1 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" {
-	set lwp1 $expect_out(1,string)
+    -re ". (\[0-9\]+) \[^\r\n\]*LWP (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set lwp$thr_num $expect_out(2,string)
 	exp_continue
     }
     -re ".*$gdb_prompt $" {
@@ -241,36 +187,13 @@ gdb_test "thread find foobarbaz" "No thr
 # Test regular expression
 #
 
-set see1 0
-set see2 0
-set see3 0
-set see4 0
-set see5 0
-set see6 0
-
+for {set i 1} {$i <= 6} {incr i} {
+    set see$i 0
+}
 gdb_test_multiple "thread find threadname_\[345\]" "test regular exp" {
-    -re "Thread 6 has name \[^\r\n\]*" {
-	set see6 1
-	exp_continue
-    }
-    -re "Thread 5 has name \[^\r\n\]*" {
-	set see5 1
-	exp_continue
-    }
-    -re "Thread 4 has name \[^\r\n\]*" {
-	set see4 1
-	exp_continue
-    }
-    -re "Thread 3 has name \[^\r\n\]*" {
-	set see3 1
-	exp_continue
-    }
-    -re "Thread 2 has name \[^\r\n\]*" {
-	set see2 1
-	exp_continue
-    }
-    -re "Thread 1 has name \[^\r\n\]*" {
-	set see1 1
+    -re "Thread (\[0-9\]+) has name \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set see$thr_num 1
 	exp_continue
     }
     -re ".*$gdb_prompt $" {
@@ -286,36 +209,13 @@ gdb_test_multiple "thread find threadnam
 # Test info threads on a subset of threads
 #
 
-set see1 0
-set see2 0
-set see3 0
-set see4 0
-set see5 0
-set see6 0
-
+for {set i 1} {$i <= 6} {incr i} {
+    set see$i 0
+}
 gdb_test_multiple "info threads 2 4 6" "info threads 2 4 6" {
-    -re ". 6 \[^\r\n\]*\"threadname_6\" \[^\r\n\]*" {
-	set see6 1
-	exp_continue
-    }
-    -re ". 5 \[^\r\n\]*\"threadname_5\" \[^\r\n\]*" {
-	set see5 1
-	exp_continue
-    }
-    -re ". 4 \[^\r\n\]*\"threadname_4\" \[^\r\n\]*" {
-	set see4 1
-	exp_continue
-    }
-    -re ". 3 \[^\r\n\]*\"threadname_3\" \[^\r\n\]*" {
-	set see3 1
-	exp_continue
-    }
-    -re ". 2 \[^\r\n\]*\"threadname_2\" \[^\r\n\]*" {
-	set see2 1
-	exp_continue
-    }
-    -re ". 1 \[^\r\n\]*\"threadname_1\" \[^\r\n\]*" {
-	set see1 1
+    -re ". (\[0-9\]+) \[^\r\n\]*\"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set see$thr_num 1
 	exp_continue
     }
     -re "$gdb_prompt $" {
@@ -331,36 +231,13 @@ gdb_test_multiple "info threads 2 4 6" "
 # Test info threads on a range
 #
 
-set see1 0
-set see2 0
-set see3 0
-set see4 0
-set see5 0
-set see6 0
-
+for {set i 1} {$i <= 6} {incr i} {
+    set see$i 0
+}
 gdb_test_multiple "info threads 3-5" "info threads 3-5" {
-    -re ". 6 .*\"threadname_6\" \[^\r\n\]*" {
-	set see6 1
-	exp_continue
-    }
-    -re ". 5 .*\"threadname_5\" \[^\r\n\]*" {
-	set see5 1
-	exp_continue
-    }
-    -re ". 4 .*\"threadname_4\" \[^\r\n\]*" {
-	set see4 1
-	exp_continue
-    }
-    -re ". 3 .*\"threadname_3\" \[^\r\n\]*" {
-	set see3 1
-	exp_continue
-    }
-    -re ". 2 .*\"threadname_2\" \[^\r\n\]*" {
-	set see2 1
-	exp_continue
-    }
-    -re ". 1 .*\"threadname_1\" \[^\r\n\]*" {
-	set see1 1
+    -re ". (\[0-9\]+) \[^\r\n\]*\"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set see$thr_num 1
 	exp_continue
     }
     -re "$gdb_prompt $" {
@@ -378,36 +255,13 @@ gdb_test "info threads 5-3" "inverted ra
 
 # Test degenerate range
 
-set see1 0
-set see2 0
-set see3 0
-set see4 0
-set see5 0
-set see6 0
-
+for {set i 1} {$i <= 6} {incr i} {
+    set see$i 0
+}
 gdb_test_multiple "info threads 3-3" "info threads 3-3" {
-    -re ". 6 .*\"threadname_6\" \[^\r\n\]*" {
-	set see6 1
-	exp_continue
-    }
-    -re ". 5 .*\"threadname_5\" \[^\r\n\]*" {
-	set see5 1
-	exp_continue
-    }
-    -re ". 4 .*\"threadname_4\" \[^\r\n\]*" {
-	set see4 1
-	exp_continue
-    }
-    -re ". 3 .*\"threadname_3\" \[^\r\n\]*" {
-	set see3 1
-	exp_continue
-    }
-    -re ". 2 .*\"threadname_2\" \[^\r\n\]*" {
-	set see2 1
-	exp_continue
-    }
-    -re ". 1 .*\"threadname_1\" \[^\r\n\]*" {
-	set see1 1
+    -re ". (\[0-9\]+) .*\"threadname_\[0-9\]+\" \[^\r\n\]*" {
+	set thr_num $expect_out(1,string)
+	set see$thr_num 1
 	exp_continue
     }
     -re ".*$gdb_prompt $" {
@@ -422,9 +276,9 @@ gdb_test_multiple "info threads 3-3" "in
 # Test bad input
 
 gdb_test "info thread foo" \
-    "Args must be numbers or '.' variables." \
+    "Invalid thread ID: foo" \
     "info thread foo"
 
 gdb_test "info thread foo -1" \
-    "Args must be numbers or '.' variables." \
+    "Invalid thread ID: foo -1" \
     "info thread foo -1"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific-bp.c ./gdb/testsuite/gdb.threads/thread-specific-bp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific-bp.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-specific-bp.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific-bp.exp ./gdb/testsuite/gdb.threads/thread-specific-bp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific-bp.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-specific-bp.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific.c ./gdb/testsuite/gdb.threads/thread-specific.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-specific.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2004-2015 Free Software Foundation, Inc.
+   Copyright 2004-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific.exp ./gdb/testsuite/gdb.threads/thread-specific.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-specific.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-specific.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,7 +66,10 @@ clean_restart ${binfile}
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set width 0"
 
+# As this test only runs a single inferior, $_thread and $_gthread
+# should match throughout.
 gdb_test {print $_thread} ".* = 0" "thread var when not running"
+gdb_test {print $_gthread} ".* = 0" "gthread var when not running"
 
 runto_main
 
@@ -82,6 +85,7 @@ if {[llength $threads] == 0} {
 }
 
 gdb_test {print $_thread} ".* = [lindex $threads 0]" "thread var in main"
+gdb_test {print $_gthread} ".* = [lindex $threads 0]" "gthread var in main"
 
 gdb_test_multiple "break $line thread [lindex $threads 0]" \
   "breakpoint $line main thread" {
@@ -120,6 +124,7 @@ if { $this_breakpoint != -1 } {
 
 if { $this_thread != -1 } {
     gdb_test {print $_thread} ".* = $this_thread" "thread var at break"
+    gdb_test {print $_gthread} ".* = $this_thread" "gthread var at break"
 } else {
     untested "thread var at break"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp ./gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/thread-unwindonsignal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,15 +27,14 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
 clean_restart ${binfile}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threxit-hop-specific.c ./gdb/testsuite/gdb.threads/threxit-hop-specific.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threxit-hop-specific.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/threxit-hop-specific.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threxit-hop-specific.exp ./gdb/testsuite/gdb.threads/threxit-hop-specific.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/threxit-hop-specific.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/threxit-hop-specific.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tid-reuse.c ./gdb/testsuite/gdb.threads/tid-reuse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tid-reuse.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tid-reuse.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tid-reuse.exp ./gdb/testsuite/gdb.threads/tid-reuse.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tid-reuse.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tid-reuse.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prep
 clean_restart ${binfile}
 
 if ![runto main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls2.c ./gdb/testsuite/gdb.threads/tls2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008-2015 Free Software Foundation, Inc.
+   Copyright 2008-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls.exp ./gdb/testsuite/gdb.threads/tls.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # tls.exp -- Expect script to test thread-local storage
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,6 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+load_lib gdb-python.exp
+
 standard_testfile tls.c tls2.c
 
 if [istarget "*-*-linux"] then {
@@ -70,6 +72,17 @@ proc check_thread_local {number} {
 	    "= $expected_value" \
 	    "${number} thread local storage"
 
+    if {![skip_python_tests]} {
+	gdb_test_no_output \
+	    "python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
+	    "${number} look up a_thread_local symbol"
+	# We intentionally do not pass a frame to "value" here.  If a
+	# TLS variable requires a frame, this will fail.  However, if
+	# it does not require a frame, then it will succeed.
+	gdb_test "python print(sym.value())" "$expected_value" \
+	    "${number} get symbol value without frame"
+    }
+
     gdb_test "p K::another_thread_local" \
 	    "= $me_variable" \
 	    "${number} another thread local storage"
@@ -139,8 +152,12 @@ proc check_thread_stack {number spin_thr
 }
 
 clean_restart ${binfile}
+
+gdb_test "print a_thread_local" \
+    "Cannot read .a_thread_local. without registers"
+
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
@@ -162,7 +179,7 @@ gdb_test "b [gdb_get_line_number "before
 
 send_gdb "continue\n"
 gdb_expect {
-    -re ".*Program received signal SIGSEGV.*a_thread_local = 0;.*$gdb_prompt $" {
+    -re ".* received signal SIGSEGV.*a_thread_local = 0;.*$gdb_prompt $" {
         # This is the first symptom if the gcc and binutils versions
         # in use support TLS, but the system glibc does not.
         unsupported "continue to first thread: system does not support TLS"
@@ -205,7 +222,7 @@ gdb_test "continue" ".*Breakpoint 3.*sti
 set no_of_threads 0
 send_gdb "info thread\n"
 gdb_expect {
-    -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+(\[0-9\]+) *Thread.*$gdb_prompt $" {
+    -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+.*(\[0-9\]+) *Thread\[^\r\n\]+\r\n$gdb_prompt $" {
 	   set no_of_threads $expect_out(1,string)
 	   pass "get number of threads"
         }
@@ -246,7 +263,7 @@ foreach i [array names spin_threads] {
 }
 
 if {$thrs_in_spin == 0} {
-  fail "No thread backtrace reported spin (vsyscall kernel problem?)"
+  fail "no thread backtrace reported spin (vsyscall kernel problem?)"
 }
 
 gdb_test "continue" ".*Breakpoint 4.*before exit.*" "threads exited"
@@ -254,10 +271,10 @@ gdb_test "continue" ".*Breakpoint 4.*bef
 send_gdb "info thread\n" 
 gdb_expect {
     -re ".* 1 *Thread.*2 *Thread.*$gdb_prompt $" {
-        fail "Too many threads left at end"
+        fail "too many threads left at end"
     }
     -re ".*\\\* 1 *Thread.*main.*$gdb_prompt $" {
-        pass "Expect only base thread at end"
+        pass "expect only base thread at end"
     }
     -re ".*No stack.*$gdb_prompt $" {
         fail "runaway at end"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-nodebug.exp ./gdb/testsuite/gdb.threads/tls-nodebug.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-nodebug.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-nodebug.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 # tls.exp -- Expect script to test thread-local storage without debuginfo
-# Copyright (C) 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${s
 
 clean_restart ${binfile}
 if ![runto_main] then {
-   fail "Can't run to main"
+   fail "can't run to main"
    return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-shared.exp ./gdb/testsuite/gdb.threads/tls-shared.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-shared.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-shared.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,10 +36,10 @@ if { [gdb_compile_shlib_pthreads ${srcdi
 
 
 clean_restart ${binfile}
-gdb_load_shlibs ${binfile_lib}
+gdb_load_shlib ${binfile_lib}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern.c ./gdb/testsuite/gdb.threads/tls-so_extern.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-so_extern.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,19 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+__thread void *so_extern;
+__thread void *so_extern2;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern.exp ./gdb/testsuite/gdb.threads/tls-so_extern.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-so_extern.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,81 @@
+# Copyright 2003-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# tls-so_extern.exp -- Expect script to test thread local storage in gdb, with
+# a variable defined in a shared library.
+
+standard_testfile tls-so_extern_main.c
+set libfile tls-so_extern
+set srcfile_lib ${libfile}.c
+set binfile_lib [standard_output_file ${libfile}.so]
+
+
+# get the value of gcc_compiled
+if [get_compiler_info] {
+    return -1
+}
+
+
+if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
+     || [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
+    return -1
+}
+
+
+clean_restart ${binfile}
+gdb_load_shlib ${binfile_lib}
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return 0
+}
+
+gdb_test "print so_extern" "0x0" "print thread local storage variable"
+
+gdb_test "ptype so_extern" "void \\*" "ptype of thread local storage variable"
+
+gdb_test "info address so_extern" \
+	"Symbol \\\"so_extern\\\" is a thread-local variable at offset 0x0 in the thread-local storage for .*tls-so_extern.*" \
+	"print storage info for thread local storage variable"
+
+set line_number [gdb_get_line_number "break here to check result"]
+
+gdb_test "break $line_number" \
+	"Breakpoint.*at.*file.*tls-so_extern_main.c.*line ${line_number}." \
+	"break in thread function"
+gdb_test "continue" \
+	"tls_ptr .* at .*:.*break here to check result.*" \
+        "continue to break in tls_ptr called by main"
+gdb_test "print so_extern == &so_extern" \
+         " = 1" \
+        "check so_extern address in main"
+gdb_test "continue" \
+	"tls_ptr .* at .*:.*break here to check result.*" \
+        "continue to break in a thread"
+gdb_test "print so_extern == &so_extern" \
+         " = 1" \
+        "check so_extern address"
+gdb_test "continue" \
+	"tls_ptr .* at .*:.*break here to check result.*" \
+        "continue to break in the other thread"
+gdb_test "print so_extern == &so_extern" \
+         " = 1" \
+        "check so_extern address in other thread"
+gdb_test "continue" \
+	"tls_ptr .* at .*:.*break here to check result.*" \
+        "continue to break in tls_ptr called at end of main"
+gdb_test "print so_extern == &so_extern" \
+         " = 1" \
+        "check so_extern address at end of main"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern_main.c ./gdb/testsuite/gdb.threads/tls-so_extern_main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-so_extern_main.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-so_extern_main.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,47 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+
+extern __thread void *so_extern;
+extern __thread void *so_extern2;
+
+static void *
+tls_ptr (void *p)
+{
+   so_extern = &so_extern;
+   so_extern2 = &so_extern2; /* break here to check result */
+}
+
+int
+main (void)
+{
+   pthread_t threads[2];
+
+   tls_ptr (NULL);
+
+   pthread_create (&threads[0], NULL, tls_ptr, NULL);
+   pthread_create (&threads[1], NULL, tls_ptr, NULL);
+
+   pthread_join (threads[0], NULL);
+   pthread_join (threads[1], NULL);
+
+   tls_ptr (NULL);
+
+   return 0;
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var.c ./gdb/testsuite/gdb.threads/tls-var.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-var.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var.exp ./gdb/testsuite/gdb.threads/tls-var.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-var.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var-main.c ./gdb/testsuite/gdb.threads/tls-var-main.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/tls-var-main.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/tls-var-main.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-child.c ./gdb/testsuite/gdb.threads/watchpoint-fork-child.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-child.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork-child.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,6 +17,8 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#include "watchpoint-fork.h"
+
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
@@ -24,8 +26,6 @@
 #include <signal.h>
 #include <stdio.h>
 
-#include "watchpoint-fork.h"
-
 /* `pid_t' may not be available.  */
 
 static volatile int usr1_got;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork.exp ./gdb/testsuite/gdb.threads/watchpoint-fork.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,11 +17,6 @@
 
 set testfile watchpoint-fork
 
-if [is_remote target] {
-    kfail "remote/13584" "gdbserver does not support debugging across fork"
-    return
-}
-
 proc test {type symbol} {
     with_test_prefix "$type" {
 	global testfile subdir srcdir gdb_prompt
@@ -56,7 +51,7 @@ proc test {type symbol} {
 		return
 	    }
 
-	    gdb_test "watch var" "atchpoint \[0-9\]+: var" "Set the watchpoint"
+	    gdb_test "watch var" "atchpoint \[0-9\]+: var" "set the watchpoint"
 
 	    # It is never hit but it should not be left over in the fork()ed-off child.
 	    if [skip_hw_breakpoint_tests] {
@@ -80,7 +75,7 @@ proc test {type symbol} {
 		"reakpoint \[0-9\]+, marker.*" "breakpoint after the second fork"
 	    gdb_test "continue" \
 		"atchpoint \[0-9\]+: var.*Old value = 2.*New value = 3.*mark_exit \\(\\);" "watchpoint after the second fork"
-	    gdb_test "continue" "Continuing\\..*\r\nBreakpoint \[0-9\]+, mark_exit .*" "finish"
+	    gdb_test "continue" "Continuing\\..*\r\n(Thread .* hit )?Breakpoint \[0-9\]+, mark_exit .*" "finish"
 	}
 
 	# threads
@@ -94,7 +89,7 @@ proc test {type symbol} {
 	    set executable ${testfile}-${type}-mt
 	    set srcfile_main ${srcdir}/${subdir}/${testfile}-mt.c
 	    if { [gdb_compile_pthreads "${srcfile_main} ${srcfile_type}" [standard_output_file ${executable}] executable [list debug "additional_flags=-D$symbol -DTHREAD"]] != "" } {
-		untested ${testfile}.exp
+		untested "failed to compile"
 		return
 	    }
 	    clean_restart $executable
@@ -107,7 +102,7 @@ proc test {type symbol} {
 		return
 	    }
 
-	    gdb_test "watch var" "atchpoint \[0-9\]+: var" "Set the watchpoint"
+	    gdb_test "watch var" "atchpoint \[0-9\]+: var" "set the watchpoint"
 
 	    # It should not be left over in the fork()ed-off child.
 	    gdb_test "$hbreak marker" {reakpoint [0-9]+.*}
@@ -134,7 +129,7 @@ proc test {type symbol} {
 		"atchpoint \[0-9\]+: var.*Old value = 5.*New value = 6.*after-fork2-A.*" "watchpoint A after the second fork"
 	    gdb_test "continue" \
 		"atchpoint \[0-9\]+: var.*Old value = 6.*New value = 7.*after-fork2-B.*" "watchpoint B after the second fork"
-	    gdb_test "continue" "Continuing\\..*\r\nBreakpoint \[0-9\]+, mark_exit .*" "finish"
+	    gdb_test "continue" "Continuing\\..*\r\nThread .* hit Breakpoint \[0-9\]+, mark_exit .*" "finish"
 	}
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork.h ./gdb/testsuite/gdb.threads/watchpoint-fork.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,6 +17,9 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+/* pthread_yield is a GNU extension.  */
+#define _GNU_SOURCE
+
 #ifdef THREAD
 #include <pthread.h>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c ./gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork-mt.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,22 +17,19 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#include "watchpoint-fork.h"
+
 #include <assert.h>
 #include <unistd.h>
 #include <sys/wait.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-/* pthread_yield is a GNU extension.  */
-#define _GNU_SOURCE
 #include <pthread.h>
 
 #include <asm/unistd.h>
 #include <unistd.h>
 #define gettid() syscall (__NR_gettid)
 
-#include "watchpoint-fork.h"
-
 /* Non-atomic `var++' should not hurt as we synchronize the threads by the STEP
    variable.  Hit-comments need to be duplicated there to catch both at-stops
    and behind-stops, depending on the target.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c ./gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork-parent.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-st.c ./gdb/testsuite/gdb.threads/watchpoint-fork-st.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchpoint-fork-st.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchpoint-fork-st.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,14 +17,14 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#include "watchpoint-fork.h"
+
 #include <assert.h>
 #include <unistd.h>
 #include <sys/wait.h>
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "watchpoint-fork.h"
-
 volatile int var;
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads2.c ./gdb/testsuite/gdb.threads/watchthreads2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads2.exp ./gdb/testsuite/gdb.threads/watchthreads2.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads2.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads2.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads.c ./gdb/testsuite/gdb.threads/watchthreads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads.exp ./gdb/testsuite/gdb.threads/watchthreads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads-reorder.c ./gdb/testsuite/gdb.threads/watchthreads-reorder.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads-reorder.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads-reorder.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads-reorder.exp ./gdb/testsuite/gdb.threads/watchthreads-reorder.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/watchthreads-reorder.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads-reorder.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/wp-replication.c ./gdb/testsuite/gdb.threads/wp-replication.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/wp-replication.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/wp-replication.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2009-2015 Free Software Foundation, Inc.
+   Copyright 2009-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,11 +47,6 @@ int test_ready = 0;
    watchpoint triggers.  */
 int can_terminate = 0;
 
-/* Used to push the program out of the waiting loop after the
-   testcase is done counting the number of hardware watchpoints
-   available for our target.  */
-int watch_count_done = 0;
-
 /* Number of watchpoints GDB is capable of using (this is provided
    by GDB during the test run).  */
 int hw_watch_count = 0;
@@ -60,14 +55,6 @@ int hw_watch_count = 0;
 static int watched_data[NR_THREADS];
 pthread_mutex_t data_mutex;
 
-/* Wait function to keep threads busy while the testcase does
-   what it needs to do.  */
-void
-empty_cycle (void)
-{
-  usleep (1);
-}
-
 int
 main ()
 {
@@ -75,17 +62,6 @@ main ()
   pthread_t threads[NR_THREADS];
   int i;
 
-  /* Something to ensure that the breakpoint used to run to main
-     is only hit once.  */
-  empty_cycle ();
-
-  while (watch_count_done == 0)
-    {
-      /* GDB will modify the value of "watch_count_done" at runtime and we
-	 will get past this point.  */
-      empty_cycle ();
-    }
-
   pthread_mutex_init (&data_mutex, NULL);
 
   for (i = 0; i < NR_THREADS; i++)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/wp-replication.exp ./gdb/testsuite/gdb.threads/wp-replication.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.threads/wp-replication.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/wp-replication.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,65 +43,50 @@ gdb_test_no_output "set can-use-hw-watch
 
 # Run to `main' where we begin our tests.
 if ![runto_main] then {
-    fail "Failed to run to main"
+    fail "failed to run to main"
     return 0
 }
 
-# First, break at empty_cycle.
-gdb_test "break empty_cycle" \
-  "Breakpoint 2 at .*: file .*${srcfile}, line .*" \
-  "Breakpoint on empty_cycle"
-
 # Set some default values.
 set hwatch_count 0
-set done 0
+set count 0
 
 # Count the number of hardware watchpoints available on
 # this target.
-while { $done == 0 } {
-
-  gdb_test "continue" \
-    ".*Breakpoint 2, empty_cycle \\(\\) at .*${srcfile}.*" \
-    "Continue to empty_cycle to insert watchpoint $hwatch_count"
-
-  # Some targets do resource counting as we insert watchpoints.
-  # Such targets won't cause a watchpoint insertion failure, but
-  # will switch to software watchpoints silently.  We check for
-  # both cases here.
-  gdb_test_multiple "watch watched_data\[$hwatch_count\]" \
-       "watch watched_data\[$hwatch_count\]" {
-    -re "Hardware watchpoint .*$gdb_prompt $" {
-    }
-    -re "Watchpoint .*$gdb_prompt $" {
-      set done 1
-      break
-    }
-  }
 
-  gdb_test_multiple "continue" "watchpoint created successfully" {
-    -re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" {
-      incr hwatch_count
-
-      # Some targets (like S/390) behave as though supporting
-      # unlimited hardware watchpoints.  In this case we just take a
-      # safe exit out of the loop.
-      if { $hwatch_count == $NR_THREADS } {
-	set done 1
-	break
-      }
-    }
-    -re ".*Could not insert hardware watchpoint.*$gdb_prompt $" {
-      set done 1
-      break
-    }
-  }
+# So we get an immediate warning/error if the target doesn't support a
+# hardware watchpoint or run out of hardware resource.
+gdb_test_no_output "set breakpoint always-inserted on"
+
+while { $count < $NR_THREADS } {
+    # Some targets do resource counting as we insert watchpoints.
+    # Such targets won't cause a watchpoint insertion failure, but
+    # will switch to software watchpoints silently.  We check for
+    # both cases here.
+    gdb_test_multiple "watch watched_data\[$hwatch_count\]" \
+	"watch watched_data\[$hwatch_count\]" {
+	    -re ".*Could not insert hardware watchpoint.*$gdb_prompt $" {
+		# End the loop.
+		set count $NR_THREADS
+	    }
+	    -re "Hardware watchpoint .*$gdb_prompt $" {
+		incr hwatch_count
+	    }
+	    -re "Watchpoint .*$gdb_prompt $" {
+		# End the loop.
+		set count $NR_THREADS
+	    }
+	}
+    incr count
 }
 
+gdb_test_no_output "set breakpoint always-inserted off"
+
 # Target cannot insert hardware watchpoints.  It should have reported
 # (through board settings) that it did not support them in the first place.
 # Just exit.
 if { $hwatch_count == 0} {
-  fail "No hardware watchpoints available"
+  fail "no hardware watchpoints available"
   return 0
 }
 
@@ -114,15 +99,10 @@ gdb_test_no_output "set var hw_watch_cou
 # the target supports.  Use that to do further testing.
 delete_breakpoints
 
-# Break out of the empty_cycle loop by changing the
-# controlling variable.
-gdb_test_no_output "set var watch_count_done=1" \
-		   "set var watch_count_done=1"
-
 # Prepare to create all the threads.
 gdb_test "break thread_started" \
 	 "Breakpoint \[0-9\]+ at .*: file .*${srcfile}, line .*" \
-	 "Breakpoint on thread_started"
+	 "breakpoint on thread_started"
 
 # Move all threads to where they're supposed to be for testing.
 for { set i 0 } { $i < $NR_THREADS } { incr i } {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions.c ./gdb/testsuite/gdb.trace/actions.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/actions.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
 
 #include <string.h>
 
+#include "trace-common.h"
+
 static char   gdb_char_test;
 static short  gdb_short_test;
 static long   gdb_long_test;
@@ -46,6 +48,11 @@ static union GDB_UNION_TEST
 } gdb_union1_test;
 
 void gdb_recursion_test (int, int, int, int,  int,  int,  int);
+/* This function pointer is used to force the function to be called via
+   the global entry instead of local entry on ppc64le; otherwise, breakpoints
+   set at the global entry (i.e., '*foo') will not be hit.  */
+typedef void (*gdb_recursion_test_fp) (int, int, int, int,  int,  int,  int);
+gdb_recursion_test_fp gdb_recursion_test_ptr = gdb_recursion_test;
 
 void gdb_recursion_test (int depth, 
 			 int q1, 
@@ -64,7 +71,7 @@ void gdb_recursion_test (int depth, 
   q5 = q6;						/* gdbtestline 6 */
   q6 = q;						/* gdbtestline 7 */
   if (depth--)						/* gdbtestline 8 */
-    gdb_recursion_test (depth, q1, q2, q3, q4, q5, q6);	/* gdbtestline 9 */
+    gdb_recursion_test_ptr (depth, q1, q2, q3, q4, q5, q6);	/* gdbtestline 9 */
 }
 
 
@@ -103,7 +110,7 @@ unsigned long   gdb_c_test( unsigned lon
    gdb_structp_test      = &gdb_struct1_test;
    gdb_structpp_test     = &gdb_structp_test;
 
-   gdb_recursion_test (3, (long) parm[1], (long) parm[2], (long) parm[3],
+   gdb_recursion_test_ptr (3, (long) parm[1], (long) parm[2], (long) parm[3],
 		       (long) parm[4], (long) parm[5], (long) parm[6]);
 
    gdb_char_test = gdb_short_test = gdb_long_test = 0;
@@ -136,6 +143,8 @@ main (argc, argv, envp)
   int i;
   unsigned long myparms[10];
 
+  FAST_TRACEPOINT_LABEL (fast_tracepoint_loc);
+
   begin ();
   for (i = 0; i < sizeof (myparms) / sizeof (myparms[0]); i++)
     myparms[i] = i;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions-changed.c ./gdb/testsuite/gdb.trace/actions-changed.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions-changed.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/actions-changed.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions-changed.exp ./gdb/testsuite/gdb.trace/actions-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/actions-changed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -160,12 +160,12 @@ proc test_actions_changed { } {
 clean_restart $testfile
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions.exp ./gdb/testsuite/gdb.trace/actions.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/actions.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/actions.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested actions.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -39,7 +39,7 @@ gdb_file_cmd $binfile
 
 set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -212,7 +212,7 @@ gdb_test_no_output "set default-collect"
 
 gdb_test "tvariable \$tsv" \
   "Trace state variable \\\$tsv created, with initial value 0." \
-  "Create a trace state variable"
+  "create a trace state variable"
 
 gdb_trace_setactions "5.10a: set teval action for first tracepoint" \
 	"$trcpt1" \
@@ -243,7 +243,7 @@ gdb_load $binfile
 gdb_breakpoint "main"
 gdb_run_cmd
 if {[gdb_test "" "Breakpoint .*"] != 0} {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ax.exp ./gdb/testsuite/gdb.trace/ax.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ax.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/ax.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2010-2015 Free Software Foundation, Inc.
+#   Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested ax.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -80,6 +80,8 @@ gdb_test "maint agent &gdb_long_test == 
 
 gdb_test "maint agent &gdb_long_test < &gdb_short_test" "" "maint agent &gdb_long_test < &gdb_short_test"
 
+gdb_test "maint agent (unsigned char)1L" ".*ext 8.*" "maint agent (unsigned char)1L"
+
 # Now test eval version of agent expressions.
 
 gdb_test "maint agent-eval 12" ".*const8 12.*end.*" "maint agent-eval 12"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/backtrace.exp ./gdb/testsuite/gdb.trace/backtrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/backtrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/backtrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,19 +21,18 @@ standard_testfile actions.c
 set executable $testfile
 set expfile $testfile.exp
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug nowarnings]] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 
 }
@@ -58,7 +57,7 @@ set arg6 6
 
 set baseline [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -91,13 +90,13 @@ gdb_test_multiple "list $baseline, +12" 
     }
     -re ".*$gdb_prompt $" {
 	if { ($testline1 == 0) || ($testline2 == 0) || ($testline3 == 0) || ($testline4 == 0) || ($testline5 == 0) || ($testline6 == 0) } {
-	    untested backtrace.exp
+	    untested "unexpected testline values"
 	    set return_me 1
 all tests in this module will fail."
 	}
     }
     default {
-	    untested backtrace.exp
+	    untested "couldn't match pattern"
 	    set return_me 1
 all tests in this module will fail."
     }
@@ -140,20 +139,9 @@ gdb_trace_setactions "8.6: setup TP to c
 	"$tdp4" \
 	"collect \$regs, \$args, \$locs" "^$"
 
-if [is_amd64_regs_target] {
-    set fpreg "\$rbp"
-    set spreg "\$rsp"
-} elseif [is_x86_like_target] {
-    set fpreg "\$ebp"
-    set spreg "\$esp"
-} else {
-    set fpreg "\$fp"
-    set spreg "\$sp"
-}
-
 gdb_trace_setactions "8.6: setup TP to collect stack mem cast expr" \
        "$tdp6" \
-       "collect $fpreg, \(\*\(void \*\*\) \($spreg\)\) @ 64" "^$"
+       "collect \$$fpreg, \(\*\(void \*\*\) \(\$$spreg\)\) @ 128" "^$"
 
 gdb_test_no_output "tstart" ""
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc-1.c ./gdb/testsuite/gdb.trace/change-loc-1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc-1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/change-loc-1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc-2.c ./gdb/testsuite/gdb.trace/change-loc-2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc-2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/change-loc-2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.c ./gdb/testsuite/gdb.trace/change-loc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/change-loc.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.exp ./gdb/testsuite/gdb.trace/change-loc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/change-loc.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -39,33 +39,25 @@ set additional_flags [list debug shlib=$
 if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""
      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $additional_flags] != ""} {
-    untested "Could not compile either $libsrc1 or $srcdir/$subdir/$srcfile."
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $executable
 
-gdb_load_shlibs $lib_sl1
-gdb_load_shlibs $lib_sl2
+gdb_load_shlib $lib_sl1
+gdb_load_shlib $lib_sl2
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
-if [is_amd64_regs_target] {
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set pcreg "eip"
-} else {
-    set pcreg "pc"
-}
-
 
 # Set tracepoint during tracing experiment.
 
@@ -78,7 +70,7 @@ proc tracepoint_change_loc_1 { trace_typ
 
 	clean_restart ${testfile}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 	gdb_test_no_output "delete break 1"
@@ -160,8 +152,14 @@ proc tracepoint_change_loc_1 { trace_typ
 	gdb_test "info trace" \
 	    "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
 \[0-9\]+\[\t \]+\(|fast \)tracepoint\[ \]+keep y.*\<MULTIPLE\>.*
-4\.1.* in func4.*\tinstalled on target\r\n(4\.2.* in func4.*\tinstalled on target\r\n4\.3.* \<PENDING\>\[\t \]+set_tracepoint|4\.2.* \<PENDING\>\[\t \]+set_tracepoint.*4\.3.* in func4.*\tinstalled on target).*" \
-	    "tracepoint with two locations (unload)"
+(4\.\[1-3].* in func4.*\tinstalled on target.*){2}" \
+	    "tracepoint with two locations - installed (unload)"
+
+	gdb_test "info trace" \
+	    "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+\(|fast \)tracepoint\[ \]+keep y.*\<MULTIPLE\>.*
+4\.\[1-3].* \<PENDING\>\[\t \]+set_tracepoint.*" \
+	    "tracepoint with two locations - pending (unload)"
 
 	gdb_test_no_output "tstop"
 
@@ -270,8 +268,14 @@ proc tracepoint_change_loc_2 { trace_typ
 	gdb_test "info trace" \
 	    "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
 \[0-9\]+\[\t \]+\(|fast \)tracepoint\[ \]+keep y.*\<MULTIPLE\>.*
-1\.1.* in func4.*\tinstalled on target\r\n(1\.2.* in func4.*\tinstalled on target\r\n1\.3.* \<PENDING\>\[\t \]+set_tracepoint|1\.2.* \<PENDING\>\[\t \]+set_tracepoint\r\n1\.3.* in func4.*\tinstalled on target).*" \
-	    "tracepoint with two locations (unload)"
+(1\.\[1-3].* in func4.*\tinstalled on target.*){2}" \
+	    "tracepoint with two locations - installed (unload)"
+
+	gdb_test "info trace" \
+	    "Num     Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+\(|fast \)tracepoint\[ \]+keep y.*\<MULTIPLE\>.*
+1\.\[1-3].* \<PENDING\>\[\t \]+set_tracepoint.*" \
+	    "tracepoint with two locations - pending (unload)"
 
 	gdb_test_no_output "tstop"
 
@@ -294,7 +298,7 @@ proc tracepoint_install_in_trace_disable
 
 	clean_restart ${testfile}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -350,11 +354,11 @@ tracepoint_install_in_trace_disabled "tr
 
 # Re-compile test case with IPA.
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+gdb_load_shlib $libipa
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable \
 	  [list debug nowarnings shlib=$libipa shlib=$lib_sl1 shlib_load] ] != "" } {
-    untested change-loc.exp
+    untested "failed to compile"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.h ./gdb/testsuite/gdb.trace/change-loc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/change-loc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/change-loc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,28 +15,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
-
-/* Called from asm.  */
-static void __attribute__((used))
-func5 (void)
-{}
+#include "trace-common.h"
 
 static void
 func4 (void)
 {
-  /* `set_tracepoint' is the label where we'll set multiple tracepoints and
-     breakpoints at.  The insn at the label must the large enough to
-     fit a fast tracepoint jump.  */
-  asm ("    .global " SYMBOL(set_tracepoint) "\n"
-       SYMBOL(set_tracepoint) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(func5) "\n"
-#endif
-       );
-
+  FAST_TRACEPOINT_LABEL(set_tracepoint);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/circ.c ./gdb/testsuite/gdb.trace/circ.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/circ.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/circ.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/circ.exp ./gdb/testsuite/gdb.trace/circ.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/circ.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/circ.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/collection.c ./gdb/testsuite/gdb.trace/collection.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/collection.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/collection.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1998-2015 Free Software Foundation, Inc.
+   Copyright 1998-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/collection.exp ./gdb/testsuite/gdb.trace/collection.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/collection.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/collection.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ load_lib "trace-support.exp"
 standard_testfile
 set executable $testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
     return -1
 }
 
@@ -36,20 +36,6 @@ if {[prepare_for_testing $testfile.exp $
 set ws "\[\r\n\t \]+"
 set cr "\[\r\n\]+"
 
-if [is_amd64_regs_target] {
-    set fpreg "rbp"
-    set spreg "rsp"
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set fpreg "ebp"
-    set spreg "esp"
-    set pcreg "eip"
-} else {
-    set fpreg "fp"
-    set spreg "sp"
-    set pcreg "pc"
-}
-
 #
 # Utility procs
 #
@@ -791,7 +777,7 @@ proc gdb_trace_collection_test {} {
 runto_main
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/deltrace.exp ./gdb/testsuite/gdb.trace/deltrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/deltrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/deltrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested deltrace.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -38,7 +38,7 @@ gdb_file_cmd $binfile
 # all subsequent line numbers are relative to this first one (baseline)
 set baseline [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 set testline1 [expr $baseline + 4]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/disconnected-tracing.c ./gdb/testsuite/gdb.trace/disconnected-tracing.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/disconnected-tracing.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/disconnected-tracing.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/disconnected-tracing.exp ./gdb/testsuite/gdb.trace/disconnected-tracing.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/disconnected-tracing.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/disconnected-tracing.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2012-2015 Free Software Foundation, Inc.
+#   Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,9 +27,8 @@ if { [info proc gdb_reconnect] == "" } {
     return -1
 }
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
         {debug nowarnings}] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
@@ -54,7 +53,7 @@ proc disconnected_tracing {  } {
 	# Start with a fresh gdb.
 	clean_restart ${executable}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -117,7 +116,7 @@ proc disconnected_tfind {  } {
 	# Start with a fresh gdb.
 	clean_restart ${executable}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/entry-values.c ./gdb/testsuite/gdb.trace/entry-values.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/entry-values.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/entry-values.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/entry-values.exp ./gdb/testsuite/gdb.trace/entry-values.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/entry-values.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/entry-values.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,14 +26,19 @@ if  {[gdb_compile ${srcdir}/${subdir}/${
     return -1
 }
 
-# Start GDB and load object file, compute the offset of the
+if  {[gdb_compile [list ${binfile}1.o] \
+	  "${binfile}1" executable {}] != ""} {
+    return -1
+}
+
+# Start GDB and load executable file, compute the offset of the
 # instruction in bar returned from foo.  It is needed in the Dwarf
 # Assembler.
 
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}1.o
+gdb_load ${binfile}1
 
 set returned_from_foo ""
 
@@ -57,6 +62,8 @@ if { [istarget "arm*-*-*"] || [istarget 
     # returns.  The only exception is JALRC, in which case execution
     # resumes from `insn1' instead.
     set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n}
+} elseif [is_amd64_regs_target] {
+    set call_insn "callq"
 } else {
     set call_insn "call"
 }
@@ -64,7 +71,7 @@ if { [istarget "arm*-*-*"] || [istarget 
 # Calculate the offset of the instruction in bar returned from foo.
 set test "disassemble bar"
 gdb_test_multiple $test $test {
-    -re ".*$hex <\\+$decimal>:\[ \t\]+$call_insn\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:.*$gdb_prompt $" {
+    -re ".*$hex <\\+$decimal>:\[ \t\]+\\y$call_insn\\y\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:.*$gdb_prompt $" {
 	set returned_from_foo $expect_out(1,string)
     }
     -re ".*$gdb_prompt $" {
@@ -73,7 +80,7 @@ gdb_test_multiple $test $test {
 }
 
 if { [string equal $returned_from_foo ""] } {
-    fail "Find the call or branch instruction offset in bar"
+    fail "find the call or branch instruction offset in bar"
     # The following test makes no sense if the offset is unknown.  We need
     # to update the pattern above to match call or branch instruction for
     # the target architecture.
@@ -168,7 +175,7 @@ if  {[gdb_compile [list ${binfile}1.o ${
 clean_restart ${testfile}
 
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
@@ -181,7 +188,7 @@ gdb_test_no_output "set print entry-valu
 gdb_test_sequence "bt" "bt (1)" {
     "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=2, j=[-]?[0-9]+, j@entry=3\\)"
     "\[\r\n\]#1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
-    "\[\r\n\]#2 .* main \\(\\)"
+    "\[\r\n\]#2 .* \.?main \\(\\)"
 }
 
 # Update global variables 'global1' and 'global2' and test that the
@@ -193,7 +200,7 @@ gdb_test_no_output "set var global2=11"
 gdb_test_sequence "bt" "bt (2)" {
     "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=10, j=[-]?[0-9]+, j@entry=11\\)"
     "\[\r\n\]#1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
-    "\[\r\n\]#2 .* main \\(\\)"
+    "\[\r\n\]#2 .* \.?main \\(\\)"
 }
 
 # Restart GDB and trace.
@@ -203,7 +210,7 @@ clean_restart $binfile
 load_lib "trace-support.exp"
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -214,20 +221,12 @@ if ![gdb_target_supports_trace] {
 
 gdb_test "trace foo" "Tracepoint $decimal at .*"
 
-if [is_amd64_regs_target] {
-    set spreg "\$rsp"
-} elseif [is_x86_like_target] {
-    set spreg "\$esp"
-} else {
-    set spreg "\$sp"
-}
-
 # Collect arguments i and j.  Collect 'global1' which is entry value
 # of argument i.  Don't collect 'global2' to test the entry value of
 # argument j.
 
 gdb_trace_setactions "set action for tracepoint 1" "" \
-    "collect i, j, global1, \(\*\(void \*\*\) \($spreg\)\) @ 64" "^$"
+    "collect i, j, global1, \(\*\(void \*\*\) \(\$$spreg\)\) @ 128" "^$"
 
 gdb_test_no_output "tstart"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace.c ./gdb/testsuite/gdb.trace/ftrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/ftrace.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,11 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
+#include "trace-common.h"
 
 int globvar;
 
@@ -27,23 +23,10 @@ static void
 begin (void)
 {}
 
-/* Called from asm.  */
-static void __attribute__((used))
-func (void)
-{}
-
 static void
 marker (int anarg)
 {
-  /* `set_point' is the label at which to set a fast tracepoint.  The
-     insn at the label must be large enough to fit a fast tracepoint
-     jump.  */
-  asm ("    .global " SYMBOL(set_point) "\n"
-       SYMBOL(set_point) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(func) "\n"
-#endif
-       );
+  FAST_TRACEPOINT_LABEL(set_point);
 
   ++anarg;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace.exp ./gdb/testsuite/gdb.trace/ftrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/ftrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -21,14 +21,13 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -38,7 +37,7 @@ if ![gdb_target_supports_trace] {
 }
 
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+set remote_libipa [gdb_load_shlib $libipa]
 
 # Can't use prepare_for_testing, because that splits compiling into
 # building objects and then linking, and we'd fail with "linker input
@@ -46,13 +45,13 @@ gdb_load_shlibs $libipa
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
-    untested "failed to compile ftrace tests"
+    untested "failed to compile"
     return -1
 }
 clean_restart ${executable}
 
 if ![runto_main] {
-    fail "Can't run to main for ftrace tests"
+    fail "can't run to main for ftrace tests"
     return 0
 }
 
@@ -84,104 +83,100 @@ proc test_fast_tracepoints {} {
 
     gdb_test "print gdb_agent_gdb_trampoline_buffer_error" ".*" ""
 
-    if { [istarget "x86_64-*-*"] || [istarget "i\[34567\]86-*-*"] } {
+    gdb_test "ftrace set_point" "Fast tracepoint .*" \
+        "fast tracepoint at a long insn"
 
-	gdb_test "ftrace set_point" "Fast tracepoint .*" \
-	    "fast tracepoint at a long insn"
-
-	gdb_trace_setactions "collect at set_point: define actions" \
-	    "" \
-	    "collect globvar, anarg" "^$"
-
-	# Make a test of shorter fast tracepoints, 32-bit x86 only
-
-	if { [istarget "i?86-*-*"] } {
-
-	    # A Linux target needs to be able to allocate trampolines in the
-	    # 16-bit range, check mmap_min_addr so we can warn testers.
-	    if { [istarget "i?86-*-linux*"] } {
-
-		set minaddr [exec sh -c "cat /proc/sys/vm/mmap_min_addr"]
-
-		if { [expr $minaddr > 64512] } {
-		    warning "mmap_min_addr > 64512, fast tracepoint will fail"
-		    warning "do \"sudo sysctl -w vm.mmap_min_addr=32768\" to adjust"
-		}
-	    }
-
-	    gdb_test_multiple "ftrace four_byter" "set 4-byte fast tracepoint" {
-		-re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" {
-		    pass "4-byte fast tracepoint could not be set"
-		}
-		-re "Fast tracepoint .*\r\n$gdb_prompt $" {
-		    pass "4-byte fast tracepoint is set"
-		    set fourgood 1
-		}
-	    }
-
-	    if { $fourgood } {
-
-		gdb_trace_setactions "collect at four_byter: define actions" \
-		"" \
-		"collect globvar, anarg" "^$"
-	    }
-	}
-
-	run_trace_experiment
+    gdb_trace_setactions "collect at set_point: define actions" \
+        "" \
+        "collect globvar, anarg" "^$"
+
+    # Make a test of shorter fast tracepoints, 32-bit x86 only
+
+    if { [istarget "i?86-*-*"] } {
+
+        # A Linux target needs to be able to allocate trampolines in the
+        # 16-bit range, check mmap_min_addr so we can warn testers.
+        if { [istarget "i?86-*-linux*"] } {
+
+            set minaddr [exec sh -c "cat /proc/sys/vm/mmap_min_addr"]
+
+            if { [expr $minaddr > 64512] } {
+                warning "mmap_min_addr > 64512, fast tracepoint will fail"
+                warning "do \"sudo sysctl -w vm.mmap_min_addr=32768\" to adjust"
+            }
+        }
+
+        gdb_test_multiple "ftrace four_byter" "set 4-byte fast tracepoint" {
+            -re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" {
+                pass "4-byte fast tracepoint could not be set"
+            }
+            -re "Fast tracepoint .*\r\n$gdb_prompt $" {
+                pass "4-byte fast tracepoint is set"
+                set fourgood 1
+            }
+        }
+
+        if { $fourgood } {
+
+            gdb_trace_setactions "collect at four_byter: define actions" \
+            "" \
+            "collect globvar, anarg" "^$"
+        }
+    }
 
-	gdb_test "tfind pc *set_point" "Found trace frame .*" \
-	    "tfind set_point frame, first time"
+    run_trace_experiment
 
-	setup_kfail "gdb/13808" "x86_64-*-linux*"
-	gdb_test "print globvar" " = 1"
+    gdb_test "tfind pc *set_point" "Found trace frame .*" \
+        "tfind set_point frame, first time"
 
-	gdb_test "tfind pc *set_point" "Found trace frame .*" \
-	    "tfind set_point frame, second time"
+    gdb_test "print globvar" " = 1"
 
-	setup_kfail "gdb/13808" "x86_64-*-linux*"
-	gdb_test "print anarg" " = 200"
+    gdb_test "tfind pc *set_point" "Found trace frame .*" \
+        "tfind set_point frame, second time"
 
-	gdb_test "tfind start" "Found trace frame .*" \
-	    "reset tfinding"
+    setup_kfail "gdb/13808" "x86_64-*-linux*"
+    gdb_test "print anarg" " = 200"
 
-	if { $fourgood } {
+    gdb_test "tfind start" "Found trace frame .*" \
+        "reset tfinding"
 
-	    gdb_test "tfind pc *four_byter" "Found trace frame .*" \
-		"tfind four_byter frame, first time"
+    if { $fourgood } {
 
-	    gdb_test "print anarg" " = 101" \
-		"look at collected local, first time"
+        gdb_test "tfind pc *four_byter" "Found trace frame .*" \
+            "tfind four_byter frame, first time"
 
-	    gdb_test "tfind pc *four_byter" "Found trace frame .*" \
-		"tfind four_byter frame, second time"
+        gdb_test "print anarg" " = 101" \
+            "look at collected local, first time"
 
-	    gdb_test "print anarg" " = 201" \
-		"look at collected local, second time"
+        gdb_test "tfind pc *four_byter" "Found trace frame .*" \
+            "tfind four_byter frame, second time"
 
-	}
+        gdb_test "print anarg" " = 201" \
+            "look at collected local, second time"
 
-	# If debugging with the remote target, try force disabling the
-	# fast tracepoints RSP feature, and confirm fast tracepoints
-	# can no longer be downloaded.
-	set test "fast tracepoint could not be downloaded with the feature disabled"
-	if [gdb_is_target_remote] {
-	    gdb_test "set remote fast-tracepoints-packet off"
+    }
 
-	    gdb_test_multiple "tstart" $test {
-		-re "warning: Target does not support fast tracepoints, downloading .* as regular tracepoint.*\r\n$gdb_prompt $" {
-		    pass $test
-		}
-	    }
-	} else {
-	    unsupported $test
-	}
+    # If debugging with the remote target, try force disabling the
+    # fast tracepoints RSP feature, and confirm fast tracepoints
+    # can no longer be downloaded.
+    set test "fast tracepoint could not be downloaded with the feature disabled"
+    if [gdb_is_target_remote] {
+        gdb_test "set remote fast-tracepoints-packet off"
+
+        gdb_test_multiple "tstart" $test {
+            -re "warning: Target does not support fast tracepoints, downloading .* as regular tracepoint.*\r\n$gdb_prompt $" {
+                pass $test
+            }
+        }
+    } else {
+        unsupported $test
     }
 }
 
 gdb_reinitialize_dir $srcdir/$subdir
 
-if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
-    untested "Could not find IPA lib loaded"
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace-lock.c ./gdb/testsuite/gdb.trace/ftrace-lock.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace-lock.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/ftrace-lock.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,86 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2015-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <unistd.h>
+#include "trace-common.h"
+
+/* Called if the testcase failed.  */
+static void
+fail (void)
+{
+}
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* This function overrides gdb_collect in the in-process agent library.
+   See gdbserver/tracepoint.c (gdb_collect).  We want this function to
+   be ran instead of the one from the library to easily check that only
+   one thread is tracing at a time.
+
+   This works as expected because GDBserver will ask GDB about symbols
+   present in the inferior with the 'qSymbol' packet.  And GDB will
+   reply with the address of this function instead of the one from the
+   in-process agent library.  */
+
+void
+gdb_agent_gdb_collect (void *tpoint, unsigned char *regs)
+{
+  /* If we cannot acquire a lock, then this means another thread is
+     tracing and the lock implemented by the jump pad is not working!  */
+  if (pthread_mutex_trylock (&mutex) != 0)
+    {
+      fail ();
+      return;
+    }
+
+  sleep (1);
+
+  if (pthread_mutex_unlock (&mutex) != 0)
+    {
+      fail ();
+      return;
+    }
+}
+
+static void *
+thread_function (void *arg)
+{
+  FAST_TRACEPOINT_LABEL(set_point);
+}
+
+static void
+end (void)
+{
+}
+
+int
+main (int argc, char *argv[], char *envp[])
+{
+  pthread_t threads[NUM_THREADS];
+  int i;
+
+  for (i = 0; i < NUM_THREADS; i++)
+    pthread_create (&threads[i], NULL, thread_function, NULL);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    pthread_join (threads[i], NULL);
+
+  end ();
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace-lock.exp ./gdb/testsuite/gdb.trace/ftrace-lock.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/ftrace-lock.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/ftrace-lock.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,88 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "trace-support.exp"
+
+standard_testfile
+set executable $testfile
+set expfile $testfile.exp
+
+# make check RUNTESTFLAGS='gdb.trace/ftrace-lock.exp NUM_THREADS=2'
+if ![info exists NUM_THREADS] {
+    set NUM_THREADS 2
+}
+
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags]
+set options [list debug [gdb_target_symbol_prefix_flags] \
+	     additional_flags=-DNUM_THREADS=$NUM_THREADS]
+
+# Check that the target supports trace.
+if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+clean_restart ${testfile}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+# Compile the test case with the in-process agent library.
+set libipa [get_in_proc_agent]
+set remote_libipa [gdb_load_shlib $libipa]
+
+lappend options shlib=$libipa
+
+if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile with in-process agent library"
+    return -1
+}
+
+clean_restart ${executable}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
+    return 1
+}
+
+gdb_test "break end" ""
+gdb_test "break fail" ""
+
+gdb_test "ftrace set_point" "Fast tracepoint .*" \
+    "fast tracepoint at a long insn"
+
+gdb_test "tstart" ""
+
+# If NUM_THREADS is high then this test case may timeout.  Increase the
+# timeout temporarily.
+with_timeout_factor $NUM_THREADS {
+    # If the fail function is hit, then the testcase will fail.
+    gdb_test "continue" ".*Breakpoint \[0-9\]+, end \(\).*" \
+	"do not hit the fail function"
+}
+
+gdb_test "tstop" ""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/infotrace.exp ./gdb/testsuite/gdb.trace/infotrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/infotrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/infotrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested infotrace.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -102,12 +102,12 @@ gdb_trace_setactions "collect on tracepo
 	"collect gdb_struct1_test" "^$"
 gdb_run_cmd
 if {[gdb_test "" "Breakpoint ${decimal}, main.*"] != 0} {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/Makefile.in ./gdb/testsuite/gdb.trace/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,19 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-.PHONY: all clean mostlyclean distclean realclean
-
-PROGS = actions-changed ax backtrace deltrace disconnected-tracing \
-	infotrace no-attach-trace packetlen passc-dyn passcount report \
-	save-trace tfile tfind tracecmd tsv unavailable while-dyn while-stepping
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f actions circ collection
-	-rm -f *.o *.diff *~ *.bad core sh3 hppa mn10300 $(PROGS)
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp ./gdb/testsuite/gdb.trace/mi-traceframe-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-traceframe-changed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 	   [list debug nowarnings \
 		"additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \
 	  != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -101,7 +101,7 @@ set executable $testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	   executable {debug nowarnings}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -110,12 +110,12 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 clean_restart $executable
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp ./gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,17 +17,17 @@ load_lib trace-support.exp
 
 standard_testfile actions.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
@@ -51,18 +51,6 @@ mi_gdb_test "-break-insert -a gdb_recurs
 mi_gdb_test "-trace-define-variable \$tsv 1" {.*\^done} \
     "-trace-define-variable"
 
-set pcreg ""
-if [is_amd64_regs_target] {
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set pcreg "eip"
-} else {
-    # Other ports that support tracepoints should set the name of pc
-    # register here.
-    fail "set the name of pc register"
-    return -1
-}
-
 mi_gdb_test "-break-commands 3 \"collect gdb_char_test\" \"collect gdb_union1_test\" \"collect gdb_struct1_test.l\" \"collect gdb_arr_test\[0\]\" \"collect $${pcreg}\" \"teval \$tsv += 1\" \"collect \$tsv\" \"end\" " \
     {\^done} "set action"
 
@@ -103,10 +91,33 @@ proc test_trace_frame_collected { data_s
 	    ".*\\^done,found=\"1\",tracepoint=\"${decimal}\",traceframe=\"0\",frame=\{.*" \
 	    "-trace-find frame-number 0"
 
+	set reg_pattern "\{number=\"$decimal\",value=\"$hex\"\}"
+
 	# Test MI command '-trace-frame-collected' dumps only
 	# collected registers.
+
+	# While the tracepoint has no explicit action that causes
+	# collection of registers other than the PC, some
+	# architectures manage to collect or guess more than that.
+	if { [istarget "s390*-*-*"] } {
+	    # On s390 PC is a pseudo-register - collecting it also
+	    # collects the underlying PSWA register.
+	    if { "$data_source" != "tfile" } {
+		set reg_pattern "$reg_pattern,$reg_pattern"
+	    } else {
+		# For tfile, PSWM and CC are also guessed.
+		set reg_pattern "$reg_pattern,$reg_pattern,$reg_pattern,$reg_pattern"
+	    }
+	} elseif {[is_amd64_regs_target] && [is_ilp32_target]} {
+	    # x32.  While on the 64-bit ABI gdb only exposes 64-bit
+	    # $pc/$rip, on x32, GDB exposes 32-bit $eip as well, as a
+	    # pseudo-register.  Thus, collecting $pc/$rip
+	    # automatically always collects $eip as well.
+	    set reg_pattern "$reg_pattern,$reg_pattern"
+	}
+
 	mi_gdb_test "-trace-frame-collected" \
-	    "\\^done,explicit-variables=\\\[\{name=\"gdb_char_test\",value=\".*\"\}\\\],computed-expressions=\\\[\\\],registers=\\\[\{number=\"$decimal\",value=\"$hex\"\}\\\],tvars=\\\[\\\],memory=\\\[\{address=\"$hex\",length=\"1\"\}\\\]"\
+	    "\\^done,explicit-variables=\\\[\{name=\"gdb_char_test\",value=\".*\"\}\\\],computed-expressions=\\\[\\\],registers=\\\[$reg_pattern\\\],tvars=\\\[\\\],memory=\\\[\{address=\"$hex\",length=\"1\"\}\\\]"\
 	    "-trace-frame-collected (register)"
 
 	mi_gdb_test "-trace-find frame-number 1" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp ./gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,13 +32,13 @@ set lib_opts [gdb_target_symbol_prefix_f
 
 if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} {
-    untested "Could not compile either $libsrc1 or $libsrc2"
+    untested "failed to compile shared library"
     return -1
 }
 
 set exec_opts [list debug shlib=$lib_sl1 shlib_load]
 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
-    untested "Failed to compile $srcfile"
+    untested "failed to compile"
     return -1
 }
 
@@ -63,10 +63,10 @@ proc test_reconnect { } {
 	}
 
 	clean_restart $executable
-	gdb_load_shlibs $lib_sl1
-	gdb_load_shlibs $lib_sl2
+	gdb_load_shlib $lib_sl1
+	gdb_load_shlib $lib_sl2
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 	# Create tracepoints on marker and main, and leave them in the
@@ -243,16 +243,16 @@ proc test_pending_resolved { } {
 
 clean_restart $executable
 
-gdb_load_shlibs $lib_sl1
-gdb_load_shlibs $lib_sl2
+gdb_load_shlib $lib_sl1
+gdb_load_shlib $lib_sl2
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-save.exp ./gdb/testsuite/gdb.trace/mi-trace-save.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-save.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-trace-save.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,42 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The -trace-save command is already tested in other files (e.g.
+# mi-trace-frame-collected.exp), so this file currently only tests the error
+# cases of -trace-save.
+
+load_lib mi-support.exp
+
+mi_gdb_start
+
+# Test with the wrong number of arguments.
+
+proc test_trace_save_wrong_num_args { } {
+    set err_re [string_to_regexp "^error,msg=\"Exactly one argument required (file in which to save trace data)\""]
+
+    mi_gdb_test "-trace-save" "$err_re" "-trace-save with missing argument"
+    mi_gdb_test "-trace-save a b" "$err_re" "-trace-save with too many arguments"
+}
+
+# Test with an unrecognized option.
+
+proc test_trace_save_wrong_opt { } {
+    set err_re [string_to_regexp "^error,msg=\"-trace-save: Unknown option ``hey''\""]
+
+    mi_gdb_test "-trace-save -hey" "$err_re" "-trace-save with wrong option"
+}
+
+test_trace_save_wrong_num_args
+test_trace_save_wrong_opt
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp ./gdb/testsuite/gdb.trace/mi-trace-unavailable.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-trace-unavailable.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,17 +17,17 @@ load_lib trace-support.exp
 
 standard_testfile trace-unavailable.c
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
@@ -130,26 +130,39 @@ proc test_trace_unavailable { data_sourc
 	    ".*\\^done,found=\"1\",tracepoint=\"${decimal}\",traceframe=\"1\",frame=\{.*" \
 	    "-trace-find frame-number 1"
 
-	set pcnum 0
+	set pcnum -1
+	set gpr0num -1
 	if [is_amd64_regs_target] {
 	    set pcnum 16
+	    set gpr0num 0
 	} elseif [is_x86_like_target] {
 	    set pcnum 8
+	    set gpr0num 0
+	} elseif [is_aarch64_target] {
+	    set pcnum 32
+	    set gpr0num 0
+	} elseif [istarget "powerpc*-*-*"] {
+	    set pcnum 64
+	    set gpr0num 0
+	} elseif { [istarget "s390*-*-*"] } {
+	    # Strictly speaking, this is PSWA, not PC.
+	    set pcnum 1
+	    set gpr0num 2
 	} else {
 	    # Other ports support tracepoint should define the number
 	    # of its own pc register.
 	}
 
-	if { $pcnum != 0 } {
+	if { $pcnum != -1 } {
 	    global hex
 	    # Test that register 0 and PC are displayed, and register
 	    # 0 is unavailable.
-	    mi_gdb_test "-data-list-register-values x 0 ${pcnum}" \
-		".*\\^done,register-values=\\\[\{number=\"0\",value=\"<unavailable>\"\},\{number=\"${pcnum}\",value=\"${hex}\"\}\\\]" \
+	    mi_gdb_test "-data-list-register-values x ${gpr0num} ${pcnum}" \
+		".*\\^done,register-values=\\\[\{number=\"${gpr0num}\",value=\"<unavailable>\"\},\{number=\"${pcnum}\",value=\"${hex}\"\}\\\]" \
 		"-data-list-register-values x"
 
 	    # Test that only available register PC is displayed.
-	    mi_gdb_test "-data-list-register-values --skip-unavailable x 0 ${pcnum}" \
+	    mi_gdb_test "-data-list-register-values --skip-unavailable x ${gpr0num} ${pcnum}" \
 		".*\\^done,register-values=\\\[\{number=\"${pcnum}\",value=\"${hex}\"\}\\\]" \
 		"-data-list-register-values --skip-unavailable x"
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-tsv-changed.exp ./gdb/testsuite/gdb.trace/mi-tsv-changed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/mi-tsv-changed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/mi-tsv-changed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ load_lib mi-support.exp
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested mi-tsv-changed.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -65,12 +65,12 @@ proc test_create_delete_modify_tsv { } {
 	clean_restart $testfile
 
 	if ![runto_main] {
-	    fail "Can't run to main to check for trace support"
+	    fail "can't run to main to check for trace support"
 	    return -1
 	}
 
 	if ![gdb_target_supports_trace] {
-	    unsupported "Current target does not support trace"
+	    unsupported "current target does not support trace"
 	    return -1
 	}
 	gdb_exit
@@ -147,13 +147,13 @@ proc test_upload_tsv { } {
 
 	clean_restart $testfile
 	if ![runto_main] then {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return 0
 	}
 
 	gdb_test "tvariable \$tvar1" \
 	    "Trace state variable \\\$tvar1 created, with initial value 0." \
-	    "Create a trace state variable"
+	    "create a trace state variable"
 
 	gdb_test "tvariable \$tvar2 = 45" \
 	    "Trace state variable \\\$tvar2 created, with initial value 45." \
@@ -233,12 +233,12 @@ proc test_upload_tsv { } {
 clean_restart $testfile
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/no-attach-trace.c ./gdb/testsuite/gdb.trace/no-attach-trace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/no-attach-trace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/no-attach-trace.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2015 Free Software Foundation, Inc.
+   Copyright 2015-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/no-attach-trace.exp ./gdb/testsuite/gdb.trace/no-attach-trace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/no-attach-trace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/no-attach-trace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
@@ -31,7 +31,7 @@ if {[prepare_for_testing $testfile.exp $
 clean_restart $testfile
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
@@ -43,7 +43,7 @@ gdb_test "tstart" "Target returns error 
 
 with_test_prefix "after tstart" {
     if ![runto_main] {
-	fail "Can't run to main, target may have died unexpectedly"
+	fail "can't run to main, target may have died unexpectedly"
 	return -1
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/packetlen.exp ./gdb/testsuite/gdb.trace/packetlen.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/packetlen.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/packetlen.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested packetlen.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -34,7 +34,7 @@ runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/passc-dyn.exp ./gdb/testsuite/gdb.trace/passc-dyn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/passc-dyn.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/passc-dyn.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested passc-dyn.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -33,7 +33,7 @@ runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 
 }
@@ -49,7 +49,7 @@ if { ![gdb_target_supports_trace] } then
 set baseline [gdb_find_recursion_test_baseline $srcfile]
 
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -94,37 +94,37 @@ gdb_test "tstop" ".*" ""
 
 gdb_test "tfind none" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x -1 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp2" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 0 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp3" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 1 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp4" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 2 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp2" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 3 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp3" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 4 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/passcount.exp ./gdb/testsuite/gdb.trace/passcount.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/passcount.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/passcount.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested passcount.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -37,7 +37,7 @@ gdb_file_cmd $binfile
 # all subsequent line numbers are relative to this first one (baseline)
 set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pending.c ./gdb/testsuite/gdb.trace/pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pending.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/pending.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pending.exp ./gdb/testsuite/gdb.trace/pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pending.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/pending.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -31,28 +31,28 @@ set lib_opts [gdb_target_symbol_prefix_f
 
 if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
      || [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} {
-    untested "Could not compile either $libsrc1 or $libsrc2"
+    untested "failed to compile shared library"
     return -1
 }
 
 set exec_opts [list debug shlib=$lib_sl1 shlib_load]
 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
-    untested "Failed to compile $srcfile"
+    untested "failed to compile"
     return -1
 }
 
 clean_restart $executable
 
-gdb_load_shlibs $lib_sl1
-gdb_load_shlibs $lib_sl2
+gdb_load_shlib $lib_sl1
+gdb_load_shlib $lib_sl2
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
@@ -154,7 +154,7 @@ proc pending_tracepoint_works { trace_ty
 
 	}
 
-	gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*" \
+	gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*" \
 	    "continue to marker"
 
 	gdb_test "tstop" "\[\r\n\]+" "stop trace experiment"
@@ -183,7 +183,7 @@ proc pending_tracepoint_resolved_during_
     # Start with a fresh gdb.
     clean_restart $executable
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -204,7 +204,7 @@ proc pending_tracepoint_resolved_during_
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
 	"continue to marker 1"
 
     set test "continue to marker 2"
@@ -221,7 +221,7 @@ proc pending_tracepoint_resolved_during_
 		fail $test
 	    }
 	}
-	-re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
+	-re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
 	    pass $test
 	}
     }
@@ -252,7 +252,7 @@ proc pending_tracepoint_installed_during
     # Start with a fresh gdb.
     clean_restart $executable
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -264,7 +264,7 @@ proc pending_tracepoint_installed_during
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*${srcfile}.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*${srcfile}.*" \
 	"continue to marker 1"
 
     # Set a pending tracepoint during a tracing experiment.
@@ -294,7 +294,7 @@ proc pending_tracepoint_installed_during
 		fail $test
 	    }
 	}
-	-re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
+	-re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
            pass $test
        }
     }
@@ -307,7 +307,8 @@ proc pending_tracepoint_installed_during
 \[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \
 	"tracepoint is resolved"
 
-    gdb_test "tfind start" "#0  $hex in pendfunc2 .*" "tfind test frame 0"
+    # powerpc64 shows "in .pendfunc2" here.
+    gdb_test "tfind start" "#0  $hex in .?pendfunc2 .*" "tfind test frame 0"
     gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
 }}
 
@@ -325,7 +326,7 @@ proc pending_tracepoint_disconnect_durin
     # Start with a fresh gdb.
     clean_restart $executable
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -341,7 +342,7 @@ proc pending_tracepoint_disconnect_durin
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
 	"continue to marker"
 
     set test "disconnect with pending tracepoint"
@@ -373,7 +374,7 @@ proc pending_tracepoint_disconnect_after
     # Start with a fresh gdb.
     clean_restart $executable
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -389,9 +390,9 @@ proc pending_tracepoint_disconnect_after
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
 	"continue to marker 1"
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
 	"continue to marker 2"
 
     # There should be no pending tracepoint, so no warning should be emitted.
@@ -421,11 +422,12 @@ proc pending_tracepoint_with_action_reso
     global srcfile
     global lib_sl1
     global gdb_prompt
+    global pcreg
 
     # Start with a fresh gdb.
     clean_restart $executable
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -436,13 +438,6 @@ proc pending_tracepoint_with_action_reso
 	}
     }
 
-    set pcreg "pc"
-    if [is_amd64_regs_target] {
-	set pcreg "rip"
-    } elseif [is_x86_like_target] {
-	set pcreg "eip"
-    }
-
     gdb_trace_setactions "set action for pending tracepoint" "" \
 	"collect \$$pcreg" "^$"
 
@@ -456,7 +451,7 @@ proc pending_tracepoint_with_action_reso
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
 	"continue to marker 1"
 
     set test "continue to marker 2"
@@ -473,7 +468,7 @@ proc pending_tracepoint_with_action_reso
 		fail $test
             }
 	}
-	-re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
+	-re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
 	    pass "continue to marker 2"
 	}
 
@@ -508,12 +503,12 @@ pending_tracepoint_installed_during_trac
 
 # Re-compile test case with IPA.
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+gdb_load_shlib $libipa
 
 lappend exec_opts "shlib=$libipa"
 
 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
-    untested "Failed to compile $srcfile"
+    untested "failed to compile with in-process agent library"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pendshr1.c ./gdb/testsuite/gdb.trace/pendshr1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pendshr1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/pendshr1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,29 +15,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
-
-static void
-pendfunc1 (void)
-{
-  int x = 0;
-  int y = x + 4;
-}
+#include "trace-common.h"
 
 void
 pendfunc (int x)
 {
-  /* `set_point1' is the label where we'll set multiple tracepoints and
-     breakpoints at.  The insn at the label must the large enough to
-     fit a fast tracepoint jump.  */
-  asm ("    .global " SYMBOL(set_point1) "\n"
-       SYMBOL(set_point1) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(pendfunc1) "\n"
-#endif
-       );
+  FAST_TRACEPOINT_LABEL(set_point1);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pendshr2.c ./gdb/testsuite/gdb.trace/pendshr2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pendshr2.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/pendshr2.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,26 +15,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
-
-static void
-foo ()
-{}
+#include "trace-common.h"
 
 void
 pendfunc2 (int x)
 {
-  /* `set_point2' is the label where we'll set multiple tracepoints and
-     breakpoints at.  The insn at the label must the large enough to
-     fit a fast tracepoint jump.  */
-  asm ("    .global " SYMBOL(set_point2) "\n"
-       SYMBOL(set_point2) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(foo) "\n"
-#endif
-       );
+  FAST_TRACEPOINT_LABEL(set_point2);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pr16508.exp ./gdb/testsuite/gdb.trace/pr16508.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/pr16508.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/pr16508.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -23,7 +23,7 @@ if [prepare_for_testing "failed to prepa
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/qtro.c ./gdb/testsuite/gdb.trace/qtro.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/qtro.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/qtro.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/qtro.exp ./gdb/testsuite/gdb.trace/qtro.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/qtro.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/qtro.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,13 +22,13 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 clean_restart $testfile
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -40,7 +40,7 @@ if ![gdb_is_target_remote] {
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/range-stepping.c ./gdb/testsuite/gdb.trace/range-stepping.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/range-stepping.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/range-stepping.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,6 +26,8 @@
    tracepoint jump.  */
 #if (defined __x86_64__ || defined __i386__)
 #  define NOP "   .byte 0xe9,0x00,0x00,0x00,0x00\n" /* jmp $+5 (5-byte nop) */
+#elif (defined __aarch64__)
+#  define NOP "    nop\n"
 #else
 #  define NOP "" /* port me */
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/range-stepping.exp ./gdb/testsuite/gdb.trace/range-stepping.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/range-stepping.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/range-stepping.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,13 @@ load_lib "range-stepping-support.exp"
 standard_testfile
 set executable $testfile
 
-if [prepare_for_testing $testfile.exp $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	{debug nowarnings}] {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -34,6 +34,11 @@ if ![gdb_target_supports_trace] {
     return -1
 }
 
+if ![gdb_range_stepping_enabled] {
+    unsupported "range stepping not supported by the target"
+    return -1
+}
+
 # Check that range stepping works well with tracepoints.
 
 proc range_stepping_with_tracepoint { type } {
@@ -47,8 +52,8 @@ proc range_stepping_with_tracepoint { ty
 
 	# Step a line with a tracepoint in the middle.  The tracepoint
 	# itself shouldn't have any effect on range stepping.  We
-	# should see one vCont;r and no vCont;s's.
-	exec_cmd_expect_vCont_count "step" 0 1
+	# should see one vCont;r.
+	exec_cmd_expect_vCont_count "step" 1
 	gdb_test_no_output "tstop"
 	gdb_test "tfind" "Found trace frame .*" "first tfind"
 	gdb_test "tfind" \
@@ -62,24 +67,24 @@ proc range_stepping_with_tracepoint { ty
 range_stepping_with_tracepoint "trace"
 
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+set remote_libipa [gdb_load_shlib $libipa]
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug nowarnings shlib=$libipa] ] != "" } {
-    untested "failed to compile ftrace tests"
+    untested "failed to compile"
     return -1
 }
 
 clean_restart ${executable}
 
 if ![runto_main] {
-    fail "Can't run to main for ftrace tests"
+    fail "can't run to main for ftrace tests"
     return 0
 }
 
 gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
-    untested "Could not find IPA lib loaded"
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
 } else {
     range_stepping_with_tracepoint "ftrace"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/read-memory.c ./gdb/testsuite/gdb.trace/read-memory.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/read-memory.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/read-memory.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/read-memory.exp ./gdb/testsuite/gdb.trace/read-memory.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/read-memory.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/read-memory.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2013-2015 Free Software Foundation, Inc.
+#   Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,12 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -40,7 +39,7 @@ proc set_tracepoint_and_collect { } {
     # Start with a fresh gdb.
     clean_restart ${testfile}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
     gdb_test "break end" "Breakpoint \[0-9\] at .*"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/report.exp ./gdb/testsuite/gdb.trace/report.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/report.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/report.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested report.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -34,7 +34,7 @@ runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 
 }
@@ -64,7 +64,7 @@ set arg6 6
 
 set gdb_recursion_test_baseline [gdb_find_recursion_test_baseline $srcfile]
 if { $gdb_recursion_test_baseline == -1 } {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -97,13 +97,13 @@ gdb_test_multiple "list $gdb_recursion_t
     }
     -re ".*$gdb_prompt $" {
 	if { ($testline1 == 0) || ($testline2 == 0) || ($testline3 == 0) || ($testline4 == 0) || ($testline5 == 0) || ($testline6 == 0) } {
-	    untested report.exp
+	    untested "unexpected testline values"
 	    set return_me 1
 all tests in this module will fail."
 	}
     }
     default {
-	    untested report.exp
+	    untested "couldn't match pattern"
 	    set return_me 1
 all tests in this module will fail."
     } 
@@ -150,20 +150,6 @@ gdb_trace_setactions "9.x: setup TP to c
 	"$tdp4" \
 	"collect \$locs" "^$"
 
-if [is_amd64_regs_target] {
-    set fpreg "rbp"
-    set spreg "rsp"
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set fpreg "ebp"
-    set spreg "esp"
-    set pcreg "eip"
-} else {
-    set fpreg "fp"
-    set spreg "sp"
-    set pcreg "pc"
-}
-
 gdb_trace_setactions "9.x: setup TP to collect stack memory" \
 	"$tdp5" \
 	"collect \$$fpreg, \*\(void \*\*\) \$$spreg @ 64" "^$"
@@ -400,7 +386,7 @@ proc use_collected_data { data_source } 
 
 	# There is always a thread of an inferior, either a live one or
 	# a faked one.
-	gdb_test "info threads" "\\* ${decimal}    (process|Thread) ${decimal}\[ \t\].*"
+	gdb_test "info threads" "\\* ${decimal}    (process|Thread) \[0-9\.\]+\[ \t\].*"
 	gdb_test "info inferiors" "\\* 1    process ${decimal} \[ \t\]+${binfile}.*"
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/save-trace.exp ./gdb/testsuite/gdb.trace/save-trace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/save-trace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/save-trace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested save-trace.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -38,7 +38,7 @@ gdb_file_cmd $binfile
 # all subsequent line numbers are relative to this first one (baseline)
 set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -63,12 +63,12 @@ foreach x { 1 2 3 4 5 6 } {
     set trcpt$x $trcpt
     gdb_test "passcount $x" \
 	     "Setting tracepoint $trcpt.* to $x" \
-	     "10.x: set passcount for tracepoint $trcpt"
+	     "set passcount for tracepoint $trcpt"
 
     gdb_test_no_output "condition $trcpt $x - 1 == $x / 2" \
-	     "10.x: set condition for tracepoint $trcpt"
+	     "set condition for tracepoint $trcpt"
 
-    gdb_trace_setactions "10.x: set actions for tracepoint $x" \
+    gdb_trace_setactions "set actions for tracepoint $x" \
 	    "" \
 	    "collect q$x" "^$" \
 	    "while-stepping $x" "^$" \
@@ -76,8 +76,33 @@ foreach x { 1 2 3 4 5 6 } {
 	    "end" "^$"
 }
 
+gdb_test "ftrace fast_tracepoint_loc" \
+	 "Fast tracepoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
+	 "set a fast tracepoint"
+
 gdb_test_no_output "set default-collect gdb_char_test, gdb_long_test - 100" \
-    "10: set default-collect"
+    "set default-collect"
+
+# Save tracepoint definitions to a file, at path SAVE_PATH.
+proc gdb_save_tracepoints { save_path } {
+    set save_path_regexp [string_to_regexp $save_path]
+    remote_file host delete $save_path
+    gdb_test "save tracepoints $save_path" \
+	     "Saved to file '$save_path_regexp'." \
+	     "save tracepoint definitions"
+}
+
+# Load tracepoint definitions from a file, from path SAVE_PATH.
+proc gdb_load_tracepoints { save_path } {
+    # Cleanup existing tracepoints/collections
+    gdb_delete_tracepoints
+    gdb_test_no_output "set default-collect" "clear default-collect"
+
+    gdb_test "info tracepoints" "No tracepoints." "delete tracepoints"
+
+    gdb_test "source $save_path" "Tracepoint \[0-9\]+ at .*" \
+	     "read back saved tracepoints"
+}
 
 proc gdb_verify_tracepoints { testname } {
     global gdb_prompt
@@ -95,7 +120,7 @@ proc gdb_verify_tracepoints { testname }
 	    exp_continue
 	}
 	-re "$gdb_prompt $" {
-	    if { $ourstate >= 6 } {
+	    if { $ourstate >= 7 } {
 		set result "pass"
 	    } else {
 		set result "fail"
@@ -109,55 +134,49 @@ proc gdb_verify_tracepoints { testname }
 
     gdb_test "show default-collect" \
 	"The list of expressions to collect by default is \"gdb_char_test, gdb_long_test - 100\"..*" \
-	"10: show default-collect"
+	"verify default-collect"
 }
 
-gdb_verify_tracepoints "10.x: verify trace setup"
+proc do_save_load_test { save_path } {
+    # Save current tracepoint definitions to a file
+    gdb_save_tracepoints $save_path
 
-# 10.1 Save current tracepoint definitions to a file
+    # Clear existing tracepoints and reload from file
+    gdb_load_tracepoints $save_path
 
-remote_file host delete savetrace.tr
-gdb_test "save-tracepoints savetrace.tr" \
-	"Saved to file 'savetrace.tr'." \
-	"10.1: save tracepoint definitions"
+    # Check if they match the expected tracepoints
+    gdb_verify_tracepoints "verify recovered tracepoints"
+}
 
-# 10.2 Read back tracepoint definitions
+gdb_verify_tracepoints "verify trace setup"
 
-gdb_delete_tracepoints
-gdb_test_no_output "set default-collect" "10.2: clear default-collect"
-gdb_test "info tracepoints" "No tracepoints." "10.2: delete tracepoints"
-gdb_test "source savetrace.tr" \
-	"Tracepoint \[0-9\]+ at .*" \
-	"10.2: read back saved tracepoints"
-gdb_verify_tracepoints "10.2: verify recovered tracepoints"
-remote_file host delete savetrace.tr
-
-# 10.3 repeat with a path to the file
-
-set trace_file_name [standard_output_file savetrace.tr]
-set escapedfilename [string_to_regexp $trace_file_name]
-remote_file host delete $trace_file_name
-gdb_test "save-tracepoints $trace_file_name" \
-	"Saved to file '${escapedfilename}'." \
-	"10.3: save tracepoint definitions, full path"
+with_test_prefix "relative" {
+    set filepath [standard_output_file "savetrace-relative.tr"]
 
-gdb_delete_tracepoints
-gdb_test_no_output "set default-collect" "10.3: clear default-collect"
-gdb_test "info tracepoints" "No tracepoints." "10.3: delete tracepoints"
-gdb_test "source $trace_file_name" \
-	"Tracepoint \[0-9\]+ at .*" \
-	"10.4: read saved tracepoints, full path"
-gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path"
-remote_file host delete $trace_file_name
+    # This only works because the pwd is a prefix of the standard output
+    # directory.  If this assumption becomes false, then this test needs to be
+    # changed (the relative path from [pwd] to the standard output directory
+    # will become a bit more complicated to compute).
+    if {[string first [pwd] $filepath] != 0} {
+	error "[pwd] is not a prefix of $filepath."
+    }
+
+    set filepath [string map "[pwd] ." $filepath]
+    do_save_load_test "$filepath"
+}
+
+with_test_prefix "absolute" {
+    do_save_load_test [standard_output_file "savetrace-absolute.tr"]
+}
 
-# 10.5 invalid filename
+#      invalid filename
 #      [deferred -- not sure what a good invalid filename would be]
 
-# 10.6 save-trace (file already exists)
+#      save-trace (file already exists)
 #      [expect it to clobber the old one]
 
-# 10.7 help save-tracepoints
+# help save tracepoints
 
-gdb_test "help save-tracepoints" \
+gdb_test "help save tracepoints" \
 	"Save current tracepoint definitions as a script.*" \
-	"10.7: help save-tracepoints"
+	"verify help save tracepoints"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/signal.c ./gdb/testsuite/gdb.trace/signal.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/signal.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/signal.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,68 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <signal.h>
+#include <string.h>
+#include <unistd.h>
+
+static int counter = 0;
+
+static void
+handler (int sig)
+{
+  counter++;
+}
+
+static int iterations = 3;
+
+static void
+start (int pid)
+{
+  int i;
+
+  for (i = 0; i < iterations; i++)
+    {
+      kill (pid, SIGABRT);
+    }
+}
+
+static void
+end (void)
+{}
+
+int
+main (void)
+{
+  struct sigaction act;
+  int i;
+
+  memset (&act, 0, sizeof act);
+  act.sa_handler = handler;
+  act.sa_flags = SA_NODEFER;
+  sigaction (SIGABRT, &act, NULL);
+
+  for (i = 0; i < 3; i++)
+    {
+      kill (getpid (), SIGABRT);
+    }
+
+  counter = 0;
+  start (getpid ());
+
+  end ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/signal.exp ./gdb/testsuite/gdb.trace/signal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/signal.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/signal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,186 @@
+#   Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This is to test whether GDBserver or other remote stubs deliver signal
+# to the inferior while step over thread.  The program signal.c sends
+# signal SIGABRT to itself via kill syscall.  The test sets tracepoints
+# syscall instruction and the next one, and it is quite likely that
+# GDBserver gets the signal when it steps over thread and does the
+# collection.  If GDBserver doesn't deliver signal in thread step over,
+# one collection is got for one tracepoint hit.  Otherwise, there may
+# be two collections for one tracepoint hit, because tracepoint is
+# collected once before step over, the program goes into signal handler
+# (because signal is delivered in step over), and program goes back
+# to the tracepoint again (one more collection) after returns from
+# signal handler.
+
+load_lib "trace-support.exp"
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+# Step 1, find the syscall instruction address.
+
+set syscall_insn ""
+
+# Define the syscall instruction for each target.
+
+if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
+    set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]"
+} elseif { [istarget "aarch64*-*-linux*"] || [istarget "arm*-*-linux*"] } {
+    set syscall_insn "\[ \t\](swi|svc)\[ \t\]"
+} else {
+    unsupported "unknown syscall instruction"
+    return -1
+}
+
+# Start with a fresh gdb.
+clean_restart ${testfile}
+if ![runto_main] {
+    fail "can't run to main"
+    return -1
+}
+
+gdb_test "break kill" "Breakpoint $decimal at .*"
+gdb_test "handle SIGABRT nostop noprint pass" ".*" "pass SIGABRT"
+
+# Hit the breakpoint on $syscall for the first time.  In this time,
+# we will let PLT resolution done, and the number single steps we will
+# do later will be reduced.
+gdb_test "continue" "Continuing\\..*Breakpoint $decimal, (.* in |__libc_|)kill \\(\\).*" \
+    "continue to kill, 1st time"
+
+# Hit the breakpoint on $syscall for the second time.  In this time,
+# the address of syscall insn and next insn of syscall are recorded.
+gdb_test "continue" "Continuing\\..*Breakpoint $decimal, (.* in |__libc_|)kill \\(\\).*" \
+    "continue to kill, 2nd time"
+
+gdb_test "display/i \$pc" ".*"
+
+# Single step until we see a syscall insn or we reach the
+# upper bound of loop iterations.
+set msg "find syscall insn in kill"
+set steps 0
+set max_steps 1000
+gdb_test_multiple "stepi" $msg {
+    -re ".*$syscall_insn.*$gdb_prompt $" {
+	pass $msg
+    }
+    -re "x/i .*=>.*\r\n$gdb_prompt $" {
+	incr steps
+	if {$steps == $max_steps} {
+	    fail $msg
+	} else {
+	    send_gdb "stepi\n"
+	    exp_continue
+	}
+    }
+}
+
+if {$steps == $max_steps} {
+    return
+}
+
+# Remove the display
+gdb_test_no_output "delete display 1"
+
+set syscall_insn_addr [get_hexadecimal_valueof "\$pc" "0"]
+set syscall_insn_next 0
+set test "x/2i \$pc"
+gdb_test_multiple $test $test {
+    -re "$hex .*:\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" {
+	set syscall_insn_next $expect_out(1,string)
+    }
+}
+
+delete_breakpoints
+gdb_test "break start" "Breakpoint $decimal at .*"
+gdb_continue_to_breakpoint "continue to start"
+
+gdb_assert { 0 == [get_integer_valueof "counter" "1"] } "counter is zero"
+
+delete_breakpoints
+
+# Step 2, set tracepoints on syscall instruction and the next one.
+# It is more likely to get signal on these two places when GDBserver
+# is doing step-over.
+gdb_test "trace *$syscall_insn_addr" "Tracepoint $decimal at .*" \
+    "tracepoint on syscall instruction"
+set tpnum [get_integer_valueof "\$bpnum" 0]
+gdb_test "trace *$syscall_insn_next" "Tracepoint $decimal at .*" \
+    "tracepoint on instruction following syscall instruction"
+
+gdb_test "break end" "Breakpoint $decimal at .*"
+
+gdb_test_no_output "tstart"
+gdb_test "continue" ".*Breakpoint.* end .*at.*$srcfile.*" \
+    "continue to end"
+gdb_test_no_output "tstop"
+
+set iterations [get_integer_valueof "iterations" "0"]
+
+gdb_assert { $iterations == [get_integer_valueof "counter" "0"] } \
+    "iterations equals to counter"
+
+# Record the hit times of each tracepoint in this array.
+array set tracepoint_hits { }
+for { set i $tpnum } { $i < [expr $tpnum + 2] } { incr i } {
+  set tracepoint_hits($i) 0
+}
+
+while { 1 } {
+   set test "tfind"
+   set idx 0
+   gdb_test_multiple $test $test {
+	-re "Found trace frame $decimal, tracepoint ($decimal).*\r\n$gdb_prompt $" {
+	    set idx [expr $expect_out(1,string)]
+	    incr tracepoint_hits($idx)
+	}
+       -re "Target failed to find requested trace frame\..*\r\n$gdb_prompt $" {
+	   set idx 0
+       }
+   }
+   if {$idx == 0} {
+	break
+   }
+}
+
+# Step 3, check the number of collections on each tracepoint.
+
+for { set i $tpnum } { $i < [expr $tpnum + 2] } { incr i } {
+
+    if { $tracepoint_hits($i) == $iterations } {
+	pass "tracepoint $i hit $iterations times"
+    } elseif { $tracepoint_hits($i) > $iterations } {
+	# GDBserver deliver the signal while stepping over tracepoint,
+	# so it is possible that a tracepoint is collected twice.
+	pass "tracepoint $i hit $iterations times (spurious collection)"
+    } else {
+	fail "tracepoint $i hit $iterations times"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/stap-trace.c ./gdb/testsuite/gdb.trace/stap-trace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/stap-trace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/stap-trace.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/stap-trace.exp ./gdb/testsuite/gdb.trace/stap-trace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/stap-trace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/stap-trace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ proc compile_stap_bin {exec_name {arg ""
     if { [gdb_compile "$srcdir/$subdir/$srcfile" \
 	      [standard_output_file $exec_name] \
 	      executable [concat $arg debug nowarnings]] != "" } {
-	untested "Could not compile ${srcfile}"
+	untested "failed to compile"
 	return 0
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/status-stop.c ./gdb/testsuite/gdb.trace/status-stop.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/status-stop.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/status-stop.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/status-stop.exp ./gdb/testsuite/gdb.trace/status-stop.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/status-stop.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/status-stop.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -19,14 +19,13 @@ set executable $testfile
 set expfile $testfile.exp
 
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
         {debug nowarnings}] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -45,7 +44,7 @@ proc test_tstart_tstop_tstart { } {
 	# Start with a fresh gdb.
 	clean_restart ${executable}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -72,7 +71,7 @@ proc test_tstart_tstart { } {
 	# Start with a fresh gdb.
 	clean_restart ${executable}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -99,7 +98,7 @@ proc test_buffer_full_tstart { } {
 	# Start with a fresh gdb.
 	clean_restart ${executable}
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/strace.c ./gdb/testsuite/gdb.trace/strace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/strace.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/strace.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/strace.exp ./gdb/testsuite/gdb.trace/strace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/strace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/strace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -49,9 +49,9 @@ proc strace_remove_socket { action } {
 
     # Restart with a fresh gdb.
     clean_restart $executable
-    gdb_load_shlibs $libipa
+    gdb_load_shlib $libipa
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -134,9 +134,9 @@ proc strace_info_marker { } {
 
 	# Restart with a fresh gdb.
 	clean_restart $executable
-	gdb_load_shlibs $libipa
+	gdb_load_shlib $libipa
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -171,9 +171,9 @@ proc strace_probe_marker { } {
 
 	# Restart with a fresh gdb.
 	clean_restart $executable
-	gdb_load_shlibs $libipa
+	gdb_load_shlib $libipa
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -211,9 +211,9 @@ proc strace_trace_on_same_addr { type } 
 
 	# Restart with a fresh gdb.
 	clean_restart $executable
-	gdb_load_shlibs $libipa
+	gdb_load_shlib $libipa
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -315,9 +315,9 @@ proc strace_trace_on_diff_addr { } {
 
 	# Restart with a fresh gdb.
 	clean_restart $executable
-	gdb_load_shlibs $libipa
+	gdb_load_shlib $libipa
 	if ![runto_main] {
-	    fail "Can't run to main"
+	    fail "can't run to main"
 	    return -1
 	}
 
@@ -375,9 +375,9 @@ if { [istarget "x86_64-*-linux*"] || [is
 }
 
 clean_restart $executable
-gdb_load_shlibs $libipa
+gdb_load_shlib $libipa
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 if { ![gdb_target_supports_trace] } then {
@@ -386,10 +386,15 @@ if { ![gdb_target_supports_trace] } then
     # file can be removed.  Note that GDB simply kill inferior doesn't remove
     # the socket file.
     gdb_test "detach" "Detaching .*, process .*"
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
+# Double-check that marker ID ("-m") is not mistaken for an explicit location
+# flag.
+gdb_test "strace -m gdbfoobarbaz" \
+    "No known static tracepoint marker named gdbfoobarbaz"
+
 strace_probe_marker
 
 strace_trace_on_same_addr "trace"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfile.c ./gdb/testsuite/gdb.trace/tfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tfile.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfile.exp ./gdb/testsuite/gdb.trace/tfile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tfile.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2010-2015 Free Software Foundation, Inc.
+#   Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
 	  [list debug \
 	       "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \
 	 != "" } {
-    untested ${testfile}.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -51,7 +51,7 @@ remote_file target delete $tfile_basic
 remote_file target delete $tfile_error
 
 if { ![generate_tracefile $binfile] } {
-    unsupported "Unable to generate trace file"
+    unsupported "unable to generate trace file"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfind.exp ./gdb/testsuite/gdb.trace/tfind.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tfind.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tfind.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ standard_testfile actions.c
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
 	  executable {debug nowarnings}] != "" } {
-    untested tfind.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -63,7 +63,7 @@ runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 
 }
@@ -75,7 +75,7 @@ if { ![gdb_target_supports_trace] } then
 # all subsequent line numbers are relative to this first one (baseline)
 set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-break.c ./gdb/testsuite/gdb.trace/trace-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-break.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-break.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,16 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
-
-/* Called from asm.  */
-static void __attribute__((used))
-func (void)
-{}
+#include "trace-common.h"
 
 static void
 marker (void)
@@ -34,22 +25,9 @@ marker (void)
   int a = 0;
   int b = a;
 
-  /* `set_point' is the label where we'll set multiple tracepoints and
-     breakpoints at.  The insn at the label must the large enough to
-     fit a fast tracepoint jump.  */
-  asm ("    .global " SYMBOL(set_point) "\n"
-       SYMBOL(set_point) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(func) "\n"
-#endif
-       );
-
-  asm ("    .global " SYMBOL(after_set_point) "\n"
-       SYMBOL(after_set_point) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(func) "\n"
-#endif
-       );
+  FAST_TRACEPOINT_LABEL(set_point);
+
+  FAST_TRACEPOINT_LABEL(after_set_point);
 }
 
 static void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-break.exp ./gdb/testsuite/gdb.trace/trace-break.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-break.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-break.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -21,14 +21,13 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -37,20 +36,6 @@ if ![gdb_target_supports_trace] {
     return -1
 }
 
-set fpreg "fp"
-set spreg "sp"
-set pcreg "pc"
-
-if [is_amd64_regs_target] {
-    set fpreg "rbp"
-    set spreg "rsp"
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set fpreg "ebp"
-    set spreg "esp"
-    set pcreg "eip"
-}
-
 # Set breakpoint and tracepoint at the same address.
 
 proc break_trace_same_addr_1 { trace_type option } \
@@ -62,7 +47,7 @@ proc break_trace_same_addr_1 { trace_typ
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -75,9 +60,11 @@ proc break_trace_same_addr_1 { trace_typ
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to set_point"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
@@ -95,7 +82,7 @@ proc break_trace_same_addr_2 { trace_typ
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -112,7 +99,8 @@ proc break_trace_same_addr_2 { trace_typ
 	"${trace_type2} set_point (2)"
 
     gdb_test_no_output "tstart"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
 
     gdb_test_no_output "tstop"
 
@@ -133,7 +121,7 @@ proc break_trace_same_addr_3 { trace_typ
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -146,10 +134,12 @@ proc break_trace_same_addr_3 { trace_typ
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to marker"
     gdb_test "delete break 4"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
@@ -169,7 +159,7 @@ proc break_trace_same_addr_4 { trace_typ
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -180,14 +170,17 @@ proc break_trace_same_addr_4 { trace_typ
     gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to marker"
     # Delete tracepoint set on set_point.
     gdb_test "delete trace 5"
 
     gdb_test "tstart" "No tracepoints defined, not starting trace.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to set_point"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
     gdb_test "tstop" "Trace is not running.*"
 
     gdb_test "tfind" "Target failed to find requested trace frame\\..*"
@@ -210,7 +203,7 @@ proc break_trace_same_addr_5 { trace1 tr
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -230,7 +223,8 @@ proc break_trace_same_addr_5 { trace1 tr
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to marker"
 
     if [string equal $trace3_at_first_loc "1"] {
 	gdb_test "${trace3} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
@@ -243,7 +237,8 @@ proc break_trace_same_addr_5 { trace1 tr
     gdb_trace_setactions "set action for tracepoint 3" "" \
 	"collect \$$fpreg" "^$"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind tracepoint 4" "Found trace frame \[0-9\], tracepoint .*" \
@@ -282,14 +277,15 @@ proc break_trace_same_addr_6 { trace1 en
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to marker"
 
     gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
 	"${trace1} set_point 1"
@@ -304,7 +300,8 @@ proc break_trace_same_addr_6 { trace1 en
     gdb_test_no_output "$enable2 5"
 
     gdb_test_no_output "tstart"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+	"continue to end"
     gdb_test_no_output "tstop"
 
 
@@ -351,7 +348,7 @@ break_trace_same_addr_6 "trace" "enable"
 break_trace_same_addr_6 "trace" "disable" "trace" "enable"
 
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+set remote_libipa [gdb_load_shlib $libipa]
 
 # Can't use prepare_for_testing, because that splits compiling into
 # building objects and then linking, and we'd fail with "linker input
@@ -359,19 +356,19 @@ gdb_load_shlibs $libipa
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
-    untested "failed to compile ftrace tests"
+    untested "failed to compile"
     return -1
 }
 clean_restart ${executable}
 
 if ![runto_main] {
-    fail "Can't run to main for ftrace tests"
+    fail "can't run to main for ftrace tests"
     return 0
 }
 
 gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
-    untested "Could not find IPA lib loaded"
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
 } else {
     foreach break_always_inserted { "on" "off" } {
 	break_trace_same_addr_1 "ftrace" ${break_always_inserted}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-buffer-size.c ./gdb/testsuite/gdb.trace/trace-buffer-size.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-buffer-size.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-buffer-size.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-buffer-size.exp ./gdb/testsuite/gdb.trace/trace-buffer-size.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-buffer-size.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-buffer-size.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,9 +17,8 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if [prepare_for_testing ${testfile}.exp $testfile $srcfile \
+if [prepare_for_testing "failed to prepare" $testfile $srcfile \
         {debug nowarnings}] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracecmd.exp ./gdb/testsuite/gdb.trace/tracecmd.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracecmd.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tracecmd.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested tracecmd.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -37,7 +37,7 @@ gdb_file_cmd $binfile
 # all subsequent line numbers are relative to this first one (baseline)
 set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
+    fail "could not find gdb_recursion_test function"
     return
 }
 
@@ -161,11 +161,11 @@ gdb_test "help trace" "Set a tracepoint 
 gdb_delete_tracepoints
 
 # Acceptance vs rejection of a location are target-specific, so allow both.
-gdb_test_multiple "ftrace gdb_recursion_test" "Set a fast tracepoint" {
+gdb_test_multiple "ftrace gdb_recursion_test" "set a fast tracepoint" {
     -re "Fast tracepoint $decimal at $hex: file.*$srcfile, line $testline1.*$gdb_prompt $" {
-	pass "Set a fast tracepoint"
+	pass "set a fast tracepoint"
     }
     -re ".*May not have a fast tracepoint at $hex.*$gdb_prompt $" {
-	pass "Declined to set a fast tracepoint"
+	pass "declined to set a fast tracepoint"
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-common.h ./gdb/testsuite/gdb.trace/trace-common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-common.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-common.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,63 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifdef SYMBOL_PREFIX
+#define SYMBOL(str)     SYMBOL_PREFIX #str
+#else
+#define SYMBOL(str)     #str
+#endif
+
+/* FAST_TRACEPOINT_LABEL expands to an assembly instruction large enough to fit
+   a fast tracepoint jump.  The parameter is the label where we'll set
+   tracepoints and breakpoints.  */
+
+#if (defined __x86_64__ || defined __i386__)
+
+static void
+x86_trace_dummy ()
+{
+  int x = 0;
+  int y = x + 4;
+}
+
+#define FAST_TRACEPOINT_LABEL(name) \
+  asm ("    .global " SYMBOL(name) "\n" \
+       SYMBOL(name) ":\n" \
+       "    call " SYMBOL(x86_trace_dummy) "\n" \
+       )
+
+#elif (defined __aarch64__) || (defined __powerpc__)
+
+#define FAST_TRACEPOINT_LABEL(name) \
+  asm ("    .global " SYMBOL(name) "\n" \
+       SYMBOL(name) ":\n" \
+       "    nop\n" \
+       )
+
+#elif (defined __s390__)
+
+#define FAST_TRACEPOINT_LABEL(name) \
+  asm ("    .global " SYMBOL(name) "\n" \
+       SYMBOL(name) ":\n" \
+       "    mvc 0(8, %r15), 0(%r15)\n" \
+       )
+
+#else
+
+#error "unsupported architecture for trace tests"
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-condition.c ./gdb/testsuite/gdb.trace/trace-condition.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-condition.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-condition.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "trace-common.h"
+#include <inttypes.h>
+
+int64_t globvar;
+
+static void
+begin (void)
+{
+}
+
+static void
+marker (int8_t arg8, int16_t arg16, int32_t arg32, int64_t arg64)
+{
+  FAST_TRACEPOINT_LABEL(set_point);
+}
+
+static void
+end (void)
+{
+}
+
+int
+main ()
+{
+  begin ();
+
+  for (globvar = 1; globvar < 11; ++globvar)
+    marker (globvar, globvar + (1 << 8), globvar + (1 << 16),
+	    globvar + (1LL << 32));
+
+  end ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-condition.exp ./gdb/testsuite/gdb.trace/trace-condition.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-condition.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-condition.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,304 @@
+# Copyright 2011-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "trace-support.exp"
+
+standard_testfile
+set executable $testfile
+set expfile $testfile.exp
+
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags]
+
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
+	[list debug $additional_flags]] {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+set libipa [get_in_proc_agent]
+set remote_libipa [gdb_load_shlib $libipa]
+
+# Can't use prepare_for_testing, because that splits compiling into
+# building objects and then linking, and we'd fail with "linker input
+# file unused because linking not done" when building the object.
+
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
+	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+clean_restart ${executable}
+
+if ![runto_main] {
+    fail "can't run to main for ftrace tests"
+    return 0
+}
+
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
+    return 1
+}
+
+proc test_tracepoints { trace_command condition num_frames { kfail_proc 0 } } {
+    global executable gdb_prompt
+
+    clean_restart ${executable}
+
+    if ![runto_main] {
+	fail "can't run to main for ftrace tests"
+	return 0
+    }
+
+    gdb_test "break begin" ".*" ""
+
+    gdb_test "break end" ".*" ""
+
+    with_test_prefix "${trace_command}: ${condition}" {
+
+	gdb_test "${trace_command} set_point if ${condition}" \
+	    "\(Fast t|T\)racepoint .*" \
+	    "set tracepoint"
+
+	gdb_test "continue" ".*Breakpoint \[0-9\]+, begin .*" \
+	    "advance to trace begin"
+
+	gdb_test_no_output "tstart" "start trace experiment"
+
+	gdb_test_multiple "continue" "advance through tracing" {
+	    -re ".*Breakpoint \[0-9\]+, end .*$gdb_prompt $" {
+		pass "advance through tracing"
+	    }
+	    -re "Program received signal SIGSEGV, Segmentation fault\\..*$gdb_prompt $" {
+		if { $kfail_proc != 0 } {
+		    $kfail_proc $trace_command
+		}
+		fail "advance through tracing"
+	    }
+	}
+
+	if { $kfail_proc != 0 } {
+	    $kfail_proc $trace_command
+	}
+	gdb_test "tstatus" \
+	    ".*Trace .*Collected $num_frames .*" \
+	    "check $num_frames frames were collected."
+
+	gdb_test "tstop" "" ""
+    }
+}
+
+# These callbacks identify known failures for certain architectures.  They
+# are called either if GDBserver crashes or has not traced the correct
+# number of frames.
+
+proc 18955_x86_64_failure { trace_command } {
+    if { $trace_command == "ftrace" } {
+	setup_kfail "gdb/18955" "x86_64-*-linux*"
+    }
+}
+
+proc 18955_i386_failure { trace_command } {
+    if { $trace_command == "ftrace" } {
+	setup_kfail "gdb/18955" "i\[34567\]86-*-*"
+    }
+}
+
+foreach trace_command { "trace" "ftrace" } {
+    # This condition is always true as the PC should be set to the tracepoint
+    # address when hit.
+    test_tracepoints $trace_command "\$$pcreg == *set_point" 10
+
+    # Can we read local variables?
+    test_tracepoints $trace_command "arg8 == 1 || arg8 == 2" 2 18955_x86_64_failure
+    test_tracepoints $trace_command "arg16 == 257 || arg16 == 258" 2 18955_x86_64_failure
+    test_tracepoints $trace_command "arg32 == 65537 || arg32 == 65538" 2 18955_x86_64_failure
+    test_tracepoints $trace_command "arg64 == 4294967297 || arg64 == 4294967298" 2 18955_x86_64_failure
+    # Can we read global variables?
+    test_tracepoints $trace_command "arg16 == 257 && globvar == 1" 1 18955_x86_64_failure
+
+    # Test various operations to cover as many opcodes as possible.
+    test_tracepoints $trace_command "21 == 21" 10
+    test_tracepoints $trace_command "11 == 21" 0
+
+    test_tracepoints $trace_command "21 != 42" 10
+    test_tracepoints $trace_command "42 != 42" 0
+
+    test_tracepoints $trace_command "21 + 21 == 42" 10
+    test_tracepoints $trace_command "21 + 21 == 11" 0
+
+    test_tracepoints $trace_command "42 - 21 == 21" 10
+    test_tracepoints $trace_command "42 - 21 == 11" 0
+
+    test_tracepoints $trace_command "21 * 2 == 42" 10
+    test_tracepoints $trace_command "21 * 2 == 11" 0
+
+    test_tracepoints $trace_command "21 << 1 == 42" 10
+    test_tracepoints $trace_command "21 << 1 == 11" 0
+
+    test_tracepoints $trace_command "42 >> 1 == 21" 10
+    test_tracepoints $trace_command "42 >> 1 == 11" 0
+
+    test_tracepoints $trace_command "-(21 << 1) == -42" 10
+    test_tracepoints $trace_command "-(21 << 1) == -11" 0
+
+    test_tracepoints $trace_command "-42 >> 1 == -21" 10
+    test_tracepoints $trace_command "-42 >> 1 == -11" 0
+
+    test_tracepoints $trace_command "(0xabababab & 0x0000ffff) == 0xabab" 10
+    test_tracepoints $trace_command "(0xabababab & 0x0000ffff) == 0xffff" 0
+
+    test_tracepoints $trace_command "(0xabababab | 0x0000ffff) == 0xababffff" 10
+    test_tracepoints $trace_command "(0xabababab | 0x0000ffff) == 0xeeeedddd" 0
+
+    test_tracepoints $trace_command "(0xaaaaaaaa ^ 0x55555555) == 0xffffffff" 10
+    test_tracepoints $trace_command "(0xaaaaaaaa ^ 0x55555555) == 0xaaaaaaaa" 0
+
+    test_tracepoints $trace_command "~0xaaaaaaaa == 0x55555555" 10
+    test_tracepoints $trace_command "~0xaaaaaaaa == 0x11111111" 0
+
+    test_tracepoints $trace_command "21 < 42" 10
+    test_tracepoints $trace_command "61 < 42" 0
+
+    test_tracepoints $trace_command "21U < 42U" 10
+    test_tracepoints $trace_command "61U < 42U" 0
+
+    test_tracepoints $trace_command "42 <= 42" 10
+    test_tracepoints $trace_command "42 <= 11" 0
+
+    test_tracepoints $trace_command "42 >= 42" 10
+    test_tracepoints $trace_command "11 >= 42" 0
+
+    test_tracepoints $trace_command "42 > 21" 10
+    test_tracepoints $trace_command "11 > 21" 0
+
+    test_tracepoints $trace_command "(21 < 42 ? 0 : 1) == 0" 10 18955_i386_failure
+    test_tracepoints $trace_command "(66 < 42 ? 0 : 1) == 0" 0 18955_i386_failure
+
+    test_tracepoints $trace_command "(42 <= 42 ? 0 : 1) == 0" 10
+    test_tracepoints $trace_command "(66 <= 42 ? 0 : 1) == 0" 0
+
+    test_tracepoints $trace_command "(42 >= 42 ? 0 : 1) == 0" 10
+    test_tracepoints $trace_command "(11 >= 42 ? 0 : 1) == 0" 0
+
+    test_tracepoints $trace_command "(42 > 21 ? 0 : 1) == 0" 10 18955_i386_failure
+    test_tracepoints $trace_command "(11 > 21 ? 0 : 1) == 0" 0 18955_i386_failure
+
+    test_tracepoints $trace_command "\$trace_timestamp >= 0" 10
+
+    # Test operations with 64 bit operands.
+    test_tracepoints $trace_command "0xabababab00000000 == 0xcdcdcdcd00000000" 0
+    test_tracepoints $trace_command "0xabababab00000000 == 0xabababab00000000" 10
+
+    test_tracepoints $trace_command "!0xabababab00000000 == 0" 10
+    test_tracepoints $trace_command "!0x0 == 0" 0
+
+    test_tracepoints $trace_command "0xababababcdcdcdcd + 0x1111111143434343 == 0xbcbcbcbd11111110" 10
+    test_tracepoints $trace_command "0xababababcdcdcdff + 0x1111111143434343 == 0xbcbcbcbd11111110" 0
+
+    test_tracepoints $trace_command "0xababababcdcdcdcd - 0x11111111dc111111 == 0x9a9a9a99f1bcbcbc" 10
+    test_tracepoints $trace_command "0xababababcdcdcdff - 0x11111111dc111111 == 0x9a9a9a99f1bcbcbc" 0
+
+    test_tracepoints $trace_command "0xababababcdcdcdcd * 0xababababcdcdcdcd == 0x55320eeb91c3f629" 10
+    test_tracepoints $trace_command "0xababababcdcdcdff * 0xababababcdcdcdcd == 0x55320eeb91c3f629" 0
+
+    test_tracepoints $trace_command "0x00abababcdcdcdcd << 1 == 0x15757579b9b9b9a" 10
+    test_tracepoints $trace_command "0x00abababcdcdcdff << 1 == 0x15757579b9b9b9a" 0
+
+    test_tracepoints $trace_command "0x00abababcdcdcdcd << 46 == 0x7373400000000000" 10
+    test_tracepoints $trace_command "0x00abababcdcdcdff << 46 == 0x7373400000000000" 0
+
+    # signed rsh
+    test_tracepoints $trace_command "0x00abababcdcdcdcd >> 1 == 0x55d5d5e6e6e6e6" 10
+    test_tracepoints $trace_command "0x00bcababcdcdcdcd >> 1 == 0x55d5d5e6e6e6e6" 0
+
+    test_tracepoints $trace_command "0x00abababcdcdcdcd >> 46 == 0x2ae" 10
+    test_tracepoints $trace_command "0x00bcababcdcdcdcd >> 46 == 0x2ae" 0
+
+    # unsigned rsh
+    test_tracepoints $trace_command "0xababababcdcdcdcdUL >> 1 == 0x55d5d5d5e6e6e6e6UL" 10
+    test_tracepoints $trace_command "0xcdabababcdcdcdcdUL >> 1 == 0x55d5d5d5e6e6e6e6UL" 0
+
+    test_tracepoints $trace_command "0xababababcdcdcdcdUL >> 46 == 0x2aeaeUL" 10
+    test_tracepoints $trace_command "0xcdabababcdcdcdcdUL >> 46 == 0x2aeaeUL" 0
+
+    test_tracepoints $trace_command "-(0x00abababcdcdcdcd << 1) == -0x15757579b9b9b9a" 10
+    test_tracepoints $trace_command "-(0x00abababcdcdcdff << 1) == -0x15757579b9b9b9a" 0
+
+    test_tracepoints $trace_command "-(0x00abababcdcdcdcd >> 1) == -0x55d5d5e6e6e6e6" 10
+    test_tracepoints $trace_command "-(0x00cdababcdcdcdcd >> 1) == -0x55d5d5e6e6e6e6" 0
+
+    test_tracepoints $trace_command "(0xababababcdcdcdcd & 0x00000fffffffffff) == 0x00000babcdcdcdcd" 10
+    test_tracepoints $trace_command "(0xababababcdcdcdcd & 0x00000fffffffff00) == 0x00000babcdcdcdcd" 0
+
+    test_tracepoints $trace_command "(0xababababcdcdcdcd | 0x00000fffffffffff) == 0xababafffffffffff" 10
+    test_tracepoints $trace_command "(0xababababcdcdcdcd | 0x00000fffffffff00) == 0xababafffffffffff" 0
+
+    test_tracepoints $trace_command "(0xaaaaaaaaaaaaaaaa ^ 0x5555555555555555) == 0xffffffffffffffff" 10
+    test_tracepoints $trace_command "(0xaaaaaaaaaaaaaaaa ^ 0x5555555555555111) == 0xffffffffffffffff" 0
+
+    test_tracepoints $trace_command "~0xaaaaaaaaaaaaaaaa == 0x5555555555555555" 10
+    test_tracepoints $trace_command "~0xaaaaaaaaaaaaaaaa == 0x5555555555555111" 0
+
+    # less unsigned
+    test_tracepoints $trace_command "0x99999999bbbbbbbb < 0xaaaaaaaaaaaaaaaa" 10
+    test_tracepoints $trace_command "0xbb999999bbbbbbbb < 0xaaaaaaaaaaaaaaaa" 0
+
+    test_tracepoints $trace_command "0x99999999bbbbbbbb < 0x99999999cccccccc" 10
+    test_tracepoints $trace_command "0x99999999eebbbbbb < 0x99999999cccccccc" 0
+
+    test_tracepoints $trace_command "0x99999999bbbbbbbb <= 0x99999999bbbbbbbb" 10
+    test_tracepoints $trace_command "0xbb999999eebbbbbb <= 0x99999999bbbbbbbb" 0
+
+    # less signed
+    test_tracepoints $trace_command "0x09999999bbbbbbbb < 0x0aaaaaaaaaaaaaaa" 10
+    test_tracepoints $trace_command "0x0bb99999ccbbbbbb < 0x0aaaaaaaaaaaaaaa" 0
+
+    test_tracepoints $trace_command "0x09999999bbbbbbbb < 0x09999999cccccccc" 10
+    test_tracepoints $trace_command "0x09999999ddbbbbbb < 0x09999999cccccccc" 0
+
+    test_tracepoints $trace_command "0x09999999bbbbbbbb <= 0x09999999bbbbbbbb" 10
+    test_tracepoints $trace_command "0x0aa99999bbbbbbbb <= 0x09999999bbbbbbbb" 0
+
+    test_tracepoints $trace_command "0x0aaaaaaaaaaaaaaa > 0x09999999bbbbbbbb" 10
+    test_tracepoints $trace_command "0x088aaaaabbaaaaaa > 0x09999999bbbbbbbb" 0
+
+    test_tracepoints $trace_command "(0xabababab00000000 == 0xcdcdcdcd00000000 ? 1 : 0) == 0" 10
+    test_tracepoints $trace_command "(0xcdcdcdcd00000000 == 0xcdcdcdcd00000000 ? 1 : 0) == 0" 0
+
+    test_tracepoints $trace_command "(0xabababab00000000 != 0xcdcdcdcd00000000 ? 1 : 0) == 1" 10
+    test_tracepoints $trace_command "(0xcdcdcdcd00000000 != 0xcdcdcdcd00000000 ? 1 : 0) == 1" 0
+
+    test_tracepoints $trace_command "(0x09999999bbbbbbbb < 0x09999999cccccccc ? 1 : 0) == 1" 10 18955_i386_failure
+    test_tracepoints $trace_command "(0x09999999eeebbbbb < 0x09999999cccccccc ? 1 : 0) == 1" 0 18955_i386_failure
+
+    test_tracepoints $trace_command "(0x09999999bbbbbbbb <= 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
+    test_tracepoints $trace_command "(0x09999999eeebbbbb <= 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
+
+    test_tracepoints $trace_command "(0x09999999bbbbbbbb >= 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
+    test_tracepoints $trace_command "(0x00099999bbbbbbbb >= 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
+
+    test_tracepoints $trace_command "(0x0aaaaaaaaaaaaaaa > 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
+    test_tracepoints $trace_command "(0x00088888ccaaaaaa > 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-enable-disable.c ./gdb/testsuite/gdb.trace/trace-enable-disable.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-enable-disable.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-enable-disable.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,38 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "trace-common.h"
+
+static void
+break_here (void)
+{
+}
+
+int
+main (void)
+{
+  int i;
+
+  for (i = 0; i < 100; i++)
+    {
+      FAST_TRACEPOINT_LABEL(point_a);
+      FAST_TRACEPOINT_LABEL(point_b);
+      break_here ();
+    }
+
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-enable-disable.exp ./gdb/testsuite/gdb.trace/trace-enable-disable.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-enable-disable.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-enable-disable.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,128 @@
+# Copyright 2015-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "trace-support.exp"
+
+standard_testfile
+set executable $testfile
+set expfile $testfile.exp
+
+# Some targets have leading underscores on assembly symbols.
+set options [list debug [gdb_target_symbol_prefix_flags]]
+
+# Check that the target supports trace.
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+clean_restart ${testfile}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+# Compile the test case with the in-process agent library.
+set libipa [get_in_proc_agent]
+gdb_load_shlib $libipa
+
+lappend options shlib=$libipa
+
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile with in-process agent library"
+    return -1
+}
+
+# This test makes sure that disabling and enabling tracepoints works
+# correctly.  TRACEPOINT_CMD is the command used to set tracepoints
+# (e.g. trace or ftrace).
+
+proc test_tracepoint_enable_disable { tracepoint_cmd } {
+    with_test_prefix "test_tracepoint_enable_disable $tracepoint_cmd" {
+	global executable
+	clean_restart ${executable}
+
+	set expected 0
+
+	if ![runto_main] {
+	    fail "can't run to main."
+	    return -1
+	}
+
+	gdb_test "$tracepoint_cmd point_a" "(Tracepoint|Fast tracepoint) 2.*"
+	gdb_test "$tracepoint_cmd point_b" "(Tracepoint|Fast tracepoint) 3.*"
+	gdb_breakpoint "break_here"
+	gdb_test_no_output "tstart"
+
+	# Test that tracepoints start enabled
+	with_test_prefix "start" {
+	    gdb_continue "break_here"
+	    incr expected 2
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	# Test that disabling works
+	with_test_prefix "disable #1" {
+	    gdb_test_no_output "disable 2"
+	    gdb_continue "break_here"
+	    incr expected 1
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	with_test_prefix "disable #2" {
+	    gdb_test_no_output "disable 3"
+	    gdb_continue "break_here"
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	# Test that disabling an already disabled tracepoint works
+	with_test_prefix "disable #3" {
+	    gdb_test_no_output "disable 2"
+	    gdb_continue "break_here"
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	# Test that enabling works
+	with_test_prefix "enable #1" {
+	    gdb_test_no_output "enable 2"
+	    gdb_continue "break_here"
+	    incr expected 1
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	with_test_prefix "enable #2" {
+	    gdb_test_no_output "enable 3"
+	    gdb_continue "break_here"
+	    incr expected 2
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+
+	# Test that enabling an already enabled tracepoint works
+	with_test_prefix "enable #3" {
+	    gdb_test_no_output "enable 3"
+	    gdb_continue "break_here"
+	    incr expected 2
+	    gdb_test "tstatus" "Collected $expected trace frames.*"
+	}
+    }
+}
+
+test_tracepoint_enable_disable trace
+test_tracepoint_enable_disable ftrace
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.c ./gdb/testsuite/gdb.trace/tracefile-pseudo-reg.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tracefile-pseudo-reg.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,53 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2016-2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/*
+ * Test program for reading target description from tfile: collects AVX
+ * registers on x86_64.
+ */
+
+#include <immintrin.h>
+
+void
+dummy (void)
+{
+}
+
+static void
+end (void)
+{
+}
+
+int
+main (void)
+{
+  /* Strictly speaking, it should be ymm15 (xmm15 is 128-bit), but gcc older
+     than 4.9 doesn't recognize "ymm15" as a valid register name.  */
+  register __v8si a asm("xmm15") = {
+    0x12340001,
+    0x12340002,
+    0x12340003,
+    0x12340004,
+    0x12340005,
+    0x12340006,
+    0x12340007,
+    0x12340008,
+  };
+  asm volatile ("traceme: call dummy" : : "x" (a));
+  end ();
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp ./gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,73 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { ! [is_amd64_regs_target] } {
+    verbose "Skipping tfile AVX test (target is not x86_64)."
+    return
+}
+
+load_lib "trace-support.exp"
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+     [list debug additional_flags=-mavx]]} {
+    return -1
+}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+gdb_test_multiple "print \$ymm15" "check for AVX support" {
+    -re " = void.*$gdb_prompt $" {
+	verbose "Skipping tfile AVX test (target doesn't support AVX)."
+	return
+    }
+    -re " = \\{.*}.*$gdb_prompt $" {
+	# All is well.
+    }
+}
+
+gdb_test "trace traceme" ".*"
+
+gdb_trace_setactions "set actions for tracepoint" "" \
+	"collect \$ymm15" "^$"
+
+gdb_breakpoint "end"
+
+gdb_test_no_output "tstart"
+
+gdb_test "continue" ".*Breakpoint $decimal, end .*"
+
+set tracefile [standard_output_file ${testfile}]
+
+# Save trace frames to tfile.
+gdb_test "tsave ${tracefile}.tf" \
+    "Trace data saved to file '${tracefile}.tf'.*" \
+    "save tfile trace file"
+
+# Change target to tfile.
+gdb_test "target tfile ${tracefile}.tf" "" "change to tfile target" \
+  "A program is being debugged already.  Kill it. .y or n. $" "y"
+
+gdb_test "tfind 0" "Found trace frame 0, tracepoint .*"
+
+gdb_test "print/x \$ymm15.v8_int32" " = \\{0x12340001, .*, 0x12340008}"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-mt.c ./gdb/testsuite/gdb.trace/trace-mt.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-mt.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-mt.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2015 Free Software Foundation, Inc.
+   Copyright 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,29 +16,12 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
-
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str)     SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str)     #str
-#endif
-/* Called from asm.  */
-static void __attribute__((used))
-func (void)
-{}
+#include "trace-common.h"
 
 static void *
 thread_function(void *arg)
 {
-  /* `set_point1' is the label at which to set a fast tracepoint.  The
-     insn at the label must be large enough to fit a fast tracepoint
-     jump.  */
-  asm ("    .global " SYMBOL(set_point1) "\n"
-       SYMBOL(set_point1) ":\n"
-#if (defined __x86_64__ || defined __i386__)
-       "    call " SYMBOL(func) "\n"
-#endif
-       );
+  FAST_TRACEPOINT_LABEL(set_point1);
 }
 
 static void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-mt.exp ./gdb/testsuite/gdb.trace/trace-mt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-mt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-mt.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -23,14 +23,14 @@ set additional_flags [gdb_target_symbol_
 
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags] ] != "" } {
-    untested "Couldn't compile test program"
+    untested "failed to compile"
     return -1
 }
 
 clean_restart ${testfile}
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -50,7 +50,7 @@ proc step_over_tracepoint { trace_type }
     # Make sure inferior is running in all-stop mode.
     gdb_test_no_output "set non-stop 0"
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -75,7 +75,7 @@ proc break_trace_same_addr { trace_type 
     # Start with a fresh gdb.
     clean_restart ${executable}
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return -1
     }
 
@@ -107,24 +107,24 @@ foreach break_always_inserted { "on" "of
 step_over_tracepoint "trace"
 
 set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+set remote_libipa [gdb_load_shlib $libipa]
 
 # Compile test case again with IPA.
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
-    untested "failed to compile ftrace tests"
+    untested "failed to compile with in-process agent library"
     return -1
 }
 clean_restart ${executable}
 
 if ![runto_main] {
-    fail "Can't run to main for ftrace tests"
+    fail "can't run to main for ftrace tests"
     return 0
 }
 
 gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
-    untested "Could not find IPA lib loaded"
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+    untested "could not find IPA lib loaded"
 } else {
     foreach break_always_inserted { "on" "off" } {
 	break_trace_same_addr "ftrace" ${break_always_inserted}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-unavailable.c ./gdb/testsuite/gdb.trace/trace-unavailable.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/trace-unavailable.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/trace-unavailable.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tspeed.c ./gdb/testsuite/gdb.trace/tspeed.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tspeed.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tspeed.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -56,13 +56,9 @@ int nspertp = 0;
 unsigned long long
 myclock ()
 {
-  struct timeval tm, tm2;
-  struct rusage ru;
-  getrusage (RUSAGE_SELF, &ru);
-  tm = ru.ru_utime;
-  tm2 = ru.ru_stime;
-  return (((unsigned long long) tm.tv_sec) * 1000000) + tm.tv_usec
-    + (((unsigned long long) tm2.tv_sec) * 1000000) + tm2.tv_usec;
+  struct timeval tm;
+  gettimeofday (&tm, NULL);
+  return (((unsigned long long) tm.tv_sec) * 1000000) + tm.tv_usec;
 }
 
 int
@@ -162,9 +158,9 @@ trace_speed_test (void)
     return -1;
 
   if (idelta > mindelta
-      /* Total test time should be between 2 and 5 seconds.  */
-      && (total1 + total2) > (2 * 1000000)
-      && (total1 + total2) < (5 * 1000000)) 
+      /* Total test time should be between 15 and 30 seconds.  */
+      && (total1 + total2) > (15 * 1000000)
+      && (total1 + total2) < (30 * 1000000))
     {
       nsdelta = (((unsigned long long) idelta) * 1000) / iters;
       printf ("Second loop took %d ns longer per iter than first\n", nsdelta);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tspeed.exp ./gdb/testsuite/gdb.trace/tspeed.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tspeed.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tspeed.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ set executable $testfile
 set ipalib [get_in_proc_agent]
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
-	  executable [concat {debug nowarnings c} libs=$ipalib]] != "" } {
-    untested tspeed.exp
+	  executable [concat {debug nowarnings c} shlib=$ipalib]] != "" } {
+    untested "failed to compile"
     return -1
 }
 
@@ -128,7 +128,7 @@ clean_restart $executable
 runto_main
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tstatus.exp ./gdb/testsuite/gdb.trace/tstatus.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tstatus.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tstatus.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Free Software Foundation, Inc.
+# Copyright 2011-2017 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -18,14 +18,13 @@ standard_testfile actions.c
 set executable $testfile
 set expfile tstatus.exp
 
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug]] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tsv.exp ./gdb/testsuite/gdb.trace/tsv.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/tsv.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/tsv.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 2009-2015 Free Software Foundation, Inc.
+#   Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,30 +21,30 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested tsv.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
 
 gdb_test "tvariable \$tvar1" \
   "Trace state variable \\\$tvar1 created, with initial value 0." \
-  "Create a trace state variable"
+  "create a trace state variable"
 
 gdb_test "tvariable \$tvar2 = 45" \
   "Trace state variable \\\$tvar2 created, with initial value 45." \
-  "Create a trace state variable with initial value"
+  "create a trace state variable with initial value"
 
 gdb_test "tvariable \$tvar2 = -92" \
   "Trace state variable \\\$tvar2 now has initial value -92." \
-  "Change initial value of a trace state variable"
+  "change initial value of a trace state variable"
 
 gdb_test "tvariable \$tvar3 = 2 + 3" \
   "Trace state variable \\\$tvar3 created, with initial value 5." \
-  "Create a trace state variable with expression"
+  "create a trace state variable with expression"
 
 gdb_test "tvariable \$tvar3 = 1234567000000" \
   "Trace state variable \\\$tvar3 now has initial value 1234567000000." \
-  "Init trace state variable to a 64-bit value"
+  "init trace state variable to a 64-bit value"
 
 gdb_test "tvariable $" \
   "Must supply a non-empty variable name" \
@@ -97,7 +97,7 @@ gdb_test "delete tvariable" \
 
 gdb_test "info tvariables" \
   "No trace state variables.*" \
-  "List tvariables after deleting all"
+  "list tvariables after deleting all"
 
 # Now try running a trace.
 
@@ -106,7 +106,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 
 # The rest of the testing needs actual tracing to work.
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
@@ -120,7 +120,7 @@ if { $trcpt1 <= 0 } then {
 
 gdb_test "tvariable \$tvar5 = 15" \
   "Trace state variable \\\$tvar5 created, with initial value 15." \
-  "Create a trace state variable tvar5"
+  "create a trace state variable tvar5"
 
 gdb_trace_setactions "collect tsv for first tracepoint" \
 	"$trcpt1" \
@@ -193,7 +193,7 @@ gdb_test_multiple "target ctf ${tracefil
 clean_restart ${binfile}
 
 if ![runto_main] then {
-    fail "Can't run to main"
+    fail "can't run to main"
     return
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable.cc ./gdb/testsuite/gdb.trace/unavailable.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/unavailable.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2002-2015 Free Software Foundation, Inc.
+   Copyright 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.c ./gdb/testsuite/gdb.trace/unavailable-dwarf-piece.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/unavailable-dwarf-piece.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2013-2015 Free Software Foundation, Inc.
+   Copyright 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -54,6 +54,7 @@ dummy (void)
 int
 foo (struct s x, struct s y, struct s z)
 {
+  asm (".global foo_start_lbl\nfoo_start_lbl:");
   dummy ();
   asm (".global foo_end_lbl\nfoo_end_lbl:");
   return 0;
@@ -62,6 +63,7 @@ foo (struct s x, struct s y, struct s z)
 int
 bar (struct t x, struct t y, struct t z)
 {
+  asm (".global bar_start_lbl\nbar_start_lbl:");
   dummy ();
   asm (".global bar_end_lbl\nbar_end_lbl:");
   return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp ./gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -175,7 +175,7 @@ Dwarf::assemble $asm_file {
 	    DW_TAG_subprogram {
 		{name foo}
 		{decl_file 1 sdata}
-		{low_pc foo addr}
+		{low_pc foo_start_lbl addr}
 		{high_pc foo_end_lbl addr}
 	    } {
 		DW_TAG_formal_parameter {
@@ -220,7 +220,7 @@ Dwarf::assemble $asm_file {
 	    DW_TAG_subprogram {
 		{name bar}
 		{decl_file 1 sdata}
-		{low_pc bar addr}
+		{low_pc bar_start_lbl addr}
 		{high_pc bar_end_lbl addr}
 	    } {
 		DW_TAG_formal_parameter {
@@ -306,7 +306,7 @@ if ![gdb_target_supports_trace] {
 gdb_breakpoint "end"
 
 with_test_prefix "tracing foo" {
-    gdb_test "trace foo" ".*"
+    gdb_test "trace *foo_start_lbl" ".*"
     gdb_test_no_output "tstart"
     gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*"
     gdb_test_no_output "tstop"
@@ -320,15 +320,29 @@ with_test_prefix "tracing foo" {
 }
 
 with_test_prefix "tracing bar" {
-    gdb_test "trace bar" ".*"
+    gdb_test "trace *bar_start_lbl" ".*"
     gdb_test_no_output "tstart"
     gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*"
     gdb_test_no_output "tstop"
 
+    set endian ""
+    gdb_test_multiple "show endian" "show endian" {
+	-re ".* (big|little) endian.*$gdb_prompt $" {
+	    set endian $expect_out(1,string)
+	    pass "endianness: $endian"
+	}
+    }
+
     gdb_test "tfind 0" "Found trace frame 0, tracepoint .*"
-    gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = <unavailable>, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}"
-    gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = <unavailable>, f = 0, g = 0, h = 0, i = 0, j = 0}"
-    gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = <unavailable>, j = 0}"
+    if { $endian == "little" } {
+        gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = <unavailable>, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}"
+        gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = <unavailable>, f = 0, g = 0, h = 0, i = 0, j = 0}"
+        gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = <unavailable>, j = 0}"
+    } else {
+        gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = <unavailable>, j = 0}"
+        gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = <unavailable>, g = 0, h = 0, i = 0, j = 0}"
+        gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = <unavailable>, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}"
+    }
 
     gdb_test "tfind none" "No longer looking at any trace frame.*"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable.exp ./gdb/testsuite/gdb.trace/unavailable.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/unavailable.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/unavailable.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Free Software Foundation, Inc.
+# Copyright 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ load_lib "trace-support.exp"
 standard_testfile unavailable.cc
 set executable $testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug nowarnings c++}]} {
     return -1
 }
@@ -26,20 +26,6 @@ if {[prepare_for_testing $testfile.exp $
 set ws "\[\r\n\t \]+"
 set cr "\[\r\n\]+"
 
-if [is_amd64_regs_target] {
-    set fpreg "rbp"
-    set spreg "rsp"
-    set pcreg "rip"
-} elseif [is_x86_like_target] {
-    set fpreg "ebp"
-    set spreg "esp"
-    set pcreg "eip"
-} else {
-    set fpreg "fp"
-    set spreg "sp"
-    set pcreg "pc"
-}
-
 #
 # Utility procs
 #
@@ -344,7 +330,7 @@ proc gdb_unavailable_registers_test_1 { 
     test_register "\$pc"
 
     gdb_test "info registers" \
-	"<unavailable>.*<unavailable>" \
+	".*<unavailable>.*<unavailable>.*" \
 	"info registers, multiple registers not available"
 
     gdb_test "info registers \$$spreg" \
@@ -627,7 +613,7 @@ proc gdb_collect_globals_test_1 { } {
 
 	# whole object available
 	gdb_test "print derived_whole" \
-	    " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
+	    " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
     }
 
     gdb_test_no_output "set print object off"
@@ -645,7 +631,7 @@ proc gdb_collect_globals_test_1 { } {
 
 	# whole object available
 	gdb_test "print derived_whole" \
-	    " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
+	    " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
     }
 
     # An instance of a virtual class where we collected everything but
@@ -746,7 +732,7 @@ proc gdb_trace_collection_test {} {
 runto_main
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/while-dyn.exp ./gdb/testsuite/gdb.trace/while-dyn.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/while-dyn.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/while-dyn.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ standard_testfile actions.c
 set executable $testfile
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested while-dyn.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -35,7 +35,7 @@ runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return 1
 }
 
@@ -43,14 +43,6 @@ if { ![gdb_target_supports_trace] } then
 # test while-stepping dynamically (live target)
 #
 
-if [is_amd64_regs_target] {
-    set fpreg "\$rbp"
-} elseif [is_x86_like_target] {
-    set fpreg "\$ebp"
-} else {
-    set fpreg "\$fp"
-}
-
 proc test_while_stepping { while_stepping } {
     global fpreg
     global decimal
@@ -72,7 +64,7 @@ proc test_while_stepping { while_steppin
 
     gdb_trace_setactions "5.12: define $while_stepping <stepcount>" \
 	"" \
-	"collect $fpreg" "^$" \
+	"collect \$$fpreg" "^$" \
 	"$while_stepping 5" "^$" \
 	"collect p" "^$" \
 	"end" "^$" \
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/while-stepping.exp ./gdb/testsuite/gdb.trace/while-stepping.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.trace/while-stepping.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.trace/while-stepping.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-#   Copyright 1998-2015 Free Software Foundation, Inc.
+#   Copyright 1998-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ gdb_start
 standard_testfile actions.c
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested while-stepping.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -41,7 +41,7 @@ gdb_file_cmd $binfile
 gdb_delete_tracepoints
 set trcpt1 [gdb_gettpnum gdb_c_test]
 if { $trcpt1 <= 0 } then {
-    fail "Could not find gdb_c_test function"
+    fail "could not find gdb_c_test function"
     return
 }
 
@@ -108,7 +108,7 @@ gdb_load $binfile
 gdb_breakpoint "main"
 gdb_run_cmd
 if {[gdb_test "" "Breakpoint .*"] != 0} {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/extra-regs.xml ./gdb/testsuite/gdb.xml/extra-regs.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/extra-regs.xml	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/extra-regs.xml	2017-03-06 01:49:08.000000000 +0000
@@ -15,12 +15,34 @@
 
     <struct id="struct2" size="8">
       <field name="f1" start="0" end="34"/>
-      <field name="f2" start="63" end="63"/>
+      <field name="f2" start="63" end="63" type="uint64"/>
     </struct>
 
     <flags id="flags" size="4">
       <field name="X" start="0" end="0"/>
-      <field name="Y" start="2" end="2"/>
+      <field name="Y" start="2" end="2" type="uint32"/>
+    </flags>
+
+    <enum id="Z_values" size="4">
+      <evalue name="yes" value="1"/>
+      <evalue name="no" value="0"/>
+      <evalue name="maybe" value="2"/>
+      <evalue name="so" value="3"/>
+    </enum>
+
+    <flags id="mixed_flags" size="4">
+      <!-- Elided type. -->
+      <field name="A" start="0" end="0"/>
+      <!-- Elided type, multiple bits. -->
+      <field name="B" start="1" end="3"/>
+      <!-- Bool. -->
+      <field name="C" start="4" end="4" type="bool"/>
+      <!-- Unsigned int. -->
+      <field name="D" start="5" end="5" type="uint32"/>
+      <!-- Anonymous field. -->
+      <field name="" start="6" end="7"/>
+      <!-- Enum bitfield. -->
+      <field name="Z" start="8" end="9" type="Z_values"/>
     </flags>
 
     <reg name="extrareg" bitsize="32"/>
@@ -30,5 +52,6 @@
     <reg name="structreg" bitsize="64" type="struct1"/>
     <reg name="bitfields" bitsize="64" type="struct2"/>
     <reg name="flags" bitsize="32" type="flags"/>
+    <reg name="mixed_flags" bitsize="32" type="mixed_flags"/>
   </feature>
 </target>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/maint_print_struct.exp ./gdb/testsuite/gdb.xml/maint_print_struct.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/maint_print_struct.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/maint_print_struct.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <walfred.tedeschi@intel.com>
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/maint_print_struct.xml ./gdb/testsuite/gdb.xml/maint_print_struct.xml
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/maint_print_struct.xml	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/maint_print_struct.xml	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/Makefile.in ./gdb/testsuite/gdb.xml/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/Makefile.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/Makefile.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-PROGS =
-
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
-
-clean mostlyclean:
-	-rm -f *.ci *.o $(OBJS) $(PROGS) *~ core
-	-rm -f *.dwo *.dwp
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile gdb.log gdb.sum
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-arch.exp ./gdb/testsuite/gdb.xml/tdesc-arch.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-arch.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/tdesc-arch.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-errors.exp ./gdb/testsuite/gdb.xml/tdesc-errors.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-errors.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/tdesc-errors.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-regs.exp ./gdb/testsuite/gdb.xml/tdesc-regs.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-regs.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/tdesc-regs.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,12 @@ switch -glob -- [istarget] {
     "aarch64*-*-*" {
 	set core-regs {aarch64-core.xml}
     }
+    "arc*-*-*" {
+	set architecture "arc:ARCv2"
+	set core-regs {arc-v2.xml}
+    }
     "arm*-*-*" {
+	set regdir "arm/"
         set core-regs {arm-core.xml}
     }
     "*m68k-*-*" {
@@ -39,6 +44,9 @@ switch -glob -- [istarget] {
     "mips*-*-*" {
 	set core-regs {mips-cpu.xml mips-cp0.xml mips-fpu.xml mips-dsp.xml}
     }
+    "nds32*-*-*" {
+	set core-regs {nds32-core.xml}
+    }
     "nios2-*-*" {
 	set core-regs {nios2-cpu.xml}
     }
@@ -49,6 +57,15 @@ switch -glob -- [istarget] {
     "s390*-*-*" {
 	set core-regs {s390-core32.xml s390-acr.xml s390-fpr.xml}
     }
+    "sparc-*-*" {
+	set regdir "sparc/"
+        set core-regs {sparc32-cpu.xml sparc32-fpu.xml sparc32-cp0.xml}
+    }
+    "sparc64-*-*" {
+	set architecture "sparc:v9"
+	set regdir "sparc/"
+        set core-regs {sparc64-cpu.xml sparc64-fpu.xml sparc64-cp0.xml}
+    }
     "spu*-*-*" {
 	# This may be either the spu-linux-nat target, or the Cell/B.E.
 	# multi-architecture debugger in SPU standalone executable mode.
@@ -106,7 +123,7 @@ foreach src ${core-regs} {
 }
 
 # Similarly, we need to copy files under test into the objdir.
-proc load_description { file errmsg } {
+proc load_description { file errmsg xml_file } {
     global srcdir
     global subdir
     global gdb_prompt
@@ -114,7 +131,7 @@ proc load_description { file errmsg } {
     global architecture
     global remote_filename
 
-    set regs_file [standard_output_file regs.xml]
+    set regs_file [standard_output_file $xml_file]
 
     file delete $regs_file
     set ifd [open "$srcdir/$subdir/$file" r]
@@ -135,22 +152,18 @@ proc load_description { file errmsg } {
     close $ofd
 
     if {[is_remote host]} {
-	set regs_file [remote_download host "$subdir/regs.xml" "regs.xml"]
+	set regs_file [remote_download host "$subdir/$xml_file" $xml_file]
     }
 
     # Anchor the test output, so that error messages are detected.
     set cmd "set tdesc filename [file tail $regs_file]"
-    set msg "set tdesc filename regs.xml - from $file"
+    set msg "set tdesc filename $xml_file - from $file"
     set cmd_regex [string_to_regexp $cmd]
     gdb_test_multiple $cmd $msg {
 	-re "^$cmd_regex\r\n$errmsg$gdb_prompt $" {
 	    pass $msg
 	}
     }
-
-    if {[is_remote host]} {
-	remote_file host delete "regs.xml"
-    }
 }
 
 if {![is_remote host]} {
@@ -158,7 +171,7 @@ if {![is_remote host]} {
 	"cd to directory holding xml"
 }
 
-load_description "extra-regs.xml" ""
+load_description "extra-regs.xml" "" "test-extra-regs.xml"
 gdb_test "ptype \$extrareg" "type = (int|long|long long)"
 gdb_test "ptype \$uintreg" "type = uint32_t"
 gdb_test "ptype \$vecreg" "type = int8_t __attribute__ \\(\\(vector_size\\(4\\)\\)\\)"
@@ -170,7 +183,11 @@ gdb_test "ptype \$structreg" \
 gdb_test "ptype \$structreg.v4" "type = int8_t __attribute__ \\(\\(vector_size\\(4\\)\\)\\)"
 gdb_test "ptype \$bitfields" \
     "type = struct struct2 {\r\n *uint64_t f1 : 35;\r\n *uint64_t f2 : 1;\r\n}"
+gdb_test "ptype \$flags" \
+    "type = flag flags {\r\n *bool X @0;\r\n *uint32_t Y @2;\r\n}"
+gdb_test "ptype \$mixed_flags" \
+    "type = flag mixed_flags {\r\n *bool A @0;\r\n *uint32_t B @1-3;\r\n *bool C @4;\r\n *uint32_t D @5;\r\n *uint32_t @6-7;\r\n *enum {yes = 1, no = 0, maybe = 2, so} Z @8-9;\r\n}"
 
-load_description "core-only.xml" ""
+load_description "core-only.xml" "" "test-regs.xml"
 # The extra register from the previous description should be gone.
 gdb_test "ptype \$extrareg" "type = void"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-xinclude.exp ./gdb/testsuite/gdb.xml/tdesc-xinclude.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/gdb.xml/tdesc-xinclude.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/gdb.xml/tdesc-xinclude.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/.gitignore ./gdb/testsuite/.gitignore
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/.gitignore	2017-03-06 01:49:07.000000000 +0000
@@ -0,0 +1,9 @@
+/Makefile
+/lib/pdtrace
+/outputs
+
+/expect-read1
+/gdb.log
+/gdb.sum
+/read1.so
+/site.*
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/ada.exp ./gdb/testsuite/lib/ada.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/ada.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/ada.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,6 +13,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Call target_compile with SOURCE DEST TYPE and OPTIONS as argument,
+# after having temporarily changed the current working directory to
+# BUILDDIR.
+
+proc target_compile_ada_from_dir {builddir source dest type options} {
+    set saved_cwd [pwd]
+    catch {
+        cd $builddir
+        return [target_compile $source $dest $type $options]
+    } result options
+    cd $saved_cwd
+    return -options $options $result
+}
+
 # Compile some Ada code.
 
 proc gdb_compile_ada {source dest type options} {
@@ -21,12 +35,17 @@ proc gdb_compile_ada {source dest type o
     set gprdir [file dirname $srcdir]
     set objdir [file dirname $dest]
 
+    # Although strictly not necessary, we force the recompilation
+    # of all units (additional_flags=-f).  This is what is done
+    # when using GCC to build programs in the other languages,
+    # and it avoids using a stray objfile file from a long-past
+    # run, for instance.
     append options " ada"
-    append options " additional_flags=-P$gprdir/gnat_ada"
-    append options " additional_flags=-XSRC=[file tail $srcdir]"
-    append options " additional_flags=-XOBJ=$objdir"
+    append options " additional_flags=-f"
+    append options " additional_flags=-I$srcdir"
 
-    set result [target_compile [file tail $source] $dest $type $options]
+    set result [target_compile_ada_from_dir \
+                    $objdir [file tail $source] $dest $type $options]
 
     # The Ada build always produces some output, even when the build
     # succeeds. Thus, we can not use the output the same way we do in
@@ -54,9 +73,8 @@ proc standard_ada_testfile {base_file {d
     } else {
 	set testdir $dir
     }
-    set testfile $testdir/$base_file
-    set srcfile $srcdir/$subdir/$testfile.adb
-    set binfile [standard_output_file $testfile]
 
-    file mkdir [standard_output_file $testdir]
+    set testfile $base_file
+    set srcfile $srcdir/$subdir/$testdir/$testfile.adb
+    set binfile [standard_output_file $testfile]
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/append_gdb_boards_dir.exp ./gdb/testsuite/lib/append_gdb_boards_dir.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/append_gdb_boards_dir.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/append_gdb_boards_dir.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/build-piece.exp ./gdb/testsuite/lib/build-piece.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/build-piece.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/lib/build-piece.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Utility to bootstrap building a piece of a performance test in a
+# parallel build.
+# See testsuite/Makefile.in:workers/%.worker.
+# WORKER is set by the makefile and is
+# "{program_name}/{program_name}-{worker_nr}".
+
+regexp "^\(.+\)/\(.+\)-\(\[0-9\]+\)$" $WORKER entire_match PROGRAM_NAME pname2 WORKER_NR
+
+if { ![info exists entire_match] || $entire_match != $WORKER } {
+    error "Bad value for WORKER: $WORKER"
+}
+if { $PROGRAM_NAME != $pname2 } {
+    error "Bad value for WORKER: $WORKER"
+}
+
+# $subdir is set to "lib", because that is where this file lives,
+# which is not what tests expect.
+set subdir "gdb.perf"
+
+# $gdb_test_file_name is set to this file, build-piece, which is not what
+# tests expect.
+set gdb_test_file_name $PROGRAM_NAME
+
+source $srcdir/$subdir/${gdb_test_file_name}.exp
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cache.exp ./gdb/testsuite/lib/cache.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cache.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/cache.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ proc gdb_do_cache {name} {
     }
 
     if {[info exists GDB_PARALLEL]} {
-	set cache_filename [file join $objdir cache $cache_name]
+	set cache_filename [make_gdb_parallel_path cache $cache_name]
 	if {[file exists $cache_filename]} {
 	    set fd [open $cache_filename]
 	    set gdb_data_cache($cache_name) [read -nonewline $fd]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cell.exp ./gdb/testsuite/lib/cell.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cell.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/cell.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -139,7 +139,7 @@ gdb_caching_proc skip_cell_tests {
             set result 1
         }
         default {
-            verbose -log "\n$me Cell/B.E. hardware not detected (default case)"
+            unresolved "$me: unexpected failure"
             set result 1
         }
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cl_util.c ./gdb/testsuite/lib/cl_util.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cl_util.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/cl_util.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cl_util.h ./gdb/testsuite/lib/cl_util.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cl_util.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/cl_util.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/compiler.c ./gdb/testsuite/lib/compiler.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/compiler.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/compiler.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test file is part of GDB, the GNU debugger.
 
-   Copyright 1995-2015 Free Software Foundation, Inc.
+   Copyright 1995-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,18 +28,11 @@
    test_compiler_info.
 
    TODO: all clients should use test_compiler_info and should not
-   use gcc_compiled, hp_cc_compiler, or hp_aCC_compiler.
+   use gcc_compiled.
 
    */
 
-/* Note the semicolon at the end of this line.  Older versions of
-   hp c++ have a bug in string preprocessing: if the last token on a
-   line is a string, then the preprocessor concatenates the next line
-   onto the current line and eats the newline!  That messes up TCL of
-   course.  That happens with HP aC++ A.03.13, but it no longer happens
-   with HP aC++ A.03.45. */
-
-set compiler_info "unknown" ;
+set compiler_info "unknown"
 
 #if defined (__GNUC__)
 #if defined (__GNUC_PATCHLEVEL__)
@@ -50,20 +43,6 @@ set compiler_info [join {gcc __GNUC__ __
 #endif
 #endif
 
-#if defined (__HP_CXD_SPP)
-/* older hp ansi c, such as A.11.01.25171.gp, defines this */
-set compiler_info [join {hpcc __HP_CXD_SPP} -]
-#endif
-
-#if defined (__HP_cc)
-/* newer hp ansi c, such as B.11.11.28706.gp, defines this */
-set compiler_info [join {hpcc __HP_cc} -]
-#endif
-
-#if defined (__HP_aCC)
-set compiler_info [join {hpacc __HP_aCC} -]
-#endif
-
 #if defined (__xlc__)
 /* IBM'x xlc compiler. NOTE:  __xlc__ expands to a double quoted string of four
    numbers seperated by '.'s: currently "7.0.0.0" */
@@ -77,3 +56,15 @@ set compiler_info [join {armcc __ARMCC_V
 #if defined (__clang__)
 set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
 #endif
+
+#if defined (__ICC)
+set icc_major [string range __ICC 0 1]
+set icc_minor [format "%d" [string range __ICC 2 [expr {[string length __ICC] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#elif defined (__ICL)
+set icc_major [string range __ICL 0 1]
+set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/compiler.cc ./gdb/testsuite/lib/compiler.cc
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/compiler.cc	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/compiler.cc	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This test file is part of GDB, the GNU debugger.
 
-   Copyright 1995-2015 Free Software Foundation, Inc.
+   Copyright 1995-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,14 +20,7 @@
 /* This file is exactly like compiler.c.  I could just use compiler.c if
    I could be sure that every C++ compiler accepted extensions of ".c".  */
 
-/* Note the semicolon at the end of this line.  Older versions of
-   hp c++ have a bug in string preprocessing: if the last token on a
-   line is a string, then the preprocessor concatenates the next line
-   onto the current line and eats the newline!  That messes up TCL of
-   course.  That happens with HP aC++ A.03.13, but it no longer happens
-   with HP aC++ A.03.45. */
-
-set compiler_info "unknown" ;
+set compiler_info "unknown"
 
 #if defined (__GNUC__)
 #if defined (__GNUC_PATCHLEVEL__)
@@ -38,20 +31,6 @@ set compiler_info [join {gcc __GNUC__ __
 #endif
 #endif
 
-#if defined (__HP_CXD_SPP)
-/* older hp ansi c, such as A.11.01.25171.gp, defines this */
-set compiler_info [join {hpcc __HP_CXD_SPP} -]
-#endif
-
-#if defined (__HP_cc)
-/* newer hp ansi c, such as B.11.11.28706.gp, defines this */
-set compiler_info [join {hpcc __HP_cc} -]
-#endif
-
-#if defined (__HP_aCC)
-set compiler_info [join {hpacc __HP_aCC} -]
-#endif
-
 #if defined (__xlc__)
 /* IBM'x xlc compiler. NOTE:  __xlc__ expands to a double quoted string of four
    numbers seperated by '.'s: currently "7.0.0.0" */
@@ -65,3 +44,15 @@ set compiler_info [join {armcc __ARMCC_V
 #if defined (__clang__)
 set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
 #endif
+
+#if defined (__ICC)
+set icc_major [string range __ICC 0 1]
+set icc_minor [format "%d" [string range __ICC 2 [expr {[string length __ICC] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#elif defined (__ICL)
+set icc_major [string range __ICL 0 1]
+set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cp-support.exp ./gdb/testsuite/lib/cp-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/cp-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/cp-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This test code is part of GDB, the GNU debugger.
 
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -176,8 +176,6 @@ proc cp_check_errata { expected_string a
 #
 # "A*" versus "A *" and "A&" versus "A &" in user methods.
 #
-# Test with hp ACC.
-#
 # -- chastain 2004-08-07
 
 proc cp_test_ptype_class { in_exp in_testname in_key in_tag in_class_table { in_tail "" } { in_errata_table { } } { in_ptype_arg /r } } {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/d-support.exp ./gdb/testsuite/lib/d-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/d-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/d-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/dtrace.exp ./gdb/testsuite/lib/dtrace.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/dtrace.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/dtrace.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/dwarf.exp ./gdb/testsuite/lib/dwarf.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/dwarf.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/dwarf.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ proc build_executable_from_fission_assem
 	return -1
     }
 
-    set result [gdb_compile $object_file $executable executable {nodebug}]
+    set result [gdb_compile $object_file $executable executable $options]
     if { "$result" != "" } {
 	return -1
     }
@@ -229,6 +229,8 @@ proc function_range { func src } {
 # * If VALUE starts with the ":" character, then it is a label
 #   reference.  The rest of VALUE is taken to be the name of a label,
 #   and DW_FORM_ref4 is used.  See 'new_label' and 'define_label'.
+# * If VALUE starts with the "%" character, then it is a label
+#   reference too, but DW_FORM_ref_addr is used.
 # * Otherwise, VALUE is taken to be a string and DW_FORM_string is
 #   used.  In order to prevent bugs where a numeric value is given but
 #   no form is specified, it is an error if the value looks like a number
@@ -303,6 +305,15 @@ namespace eval Dwarf {
     # Whether a file_name entry was seen.
     variable _line_saw_file
 
+    # Whether a line table program has been seen.
+    variable _line_saw_program
+
+    # A Label for line table header generation.
+    variable _line_header_end_label
+
+    # The address size for debug ranges section.
+    variable _debug_ranges_64_bit
+
     proc _process_one_constant {name value} {
 	variable _constants
 	variable _AT
@@ -470,6 +481,10 @@ namespace eval Dwarf {
 		_op .8byte $value
 	    }
 
+	    DW_FORM_data16 {
+		_op .8byte $value
+	    }
+
 	    DW_FORM_strp {
 		variable _strings
 		variable _cu_offset_size
@@ -545,6 +560,15 @@ namespace eval Dwarf {
 		return DW_FORM_ref4
 	    }
 
+	    % {
+		# Label reference, an offset from .debug_info.  Assuming
+		# .Lcu1_begin is on .debug_info.
+		set cu1_label [_compute_label "cu1_begin"]
+		set new_value "[string range $value 1 end] - $cu1_label"
+
+		return DW_FORM_ref_addr
+	    }
+
 	    default {
 		return DW_FORM_string
 	    }
@@ -621,7 +645,18 @@ namespace eval Dwarf {
 
 	foreach attr $attrs {
 	    set attr_name [_map_name [lindex $attr 0] _AT]
-	    set attr_value [uplevel 2 [list subst [lindex $attr 1]]]
+
+	    # When the length of ATTR is greater than 2, the last
+	    # element of the list must be a form.  The second through
+	    # the penultimate elements are joined together and
+	    # evaluated using subst.  This allows constructs such as
+	    # [gdb_target_symbol foo] to be used.
+
+	    if {[llength $attr] > 2} {
+	        set attr_value [uplevel 2 [list subst [join [lrange $attr 1 end-1]]]]
+	    } else {
+	        set attr_value [uplevel 2 [list subst [lindex $attr 1]]]
+	    }
 
 	    if { [string equal "MACRO_AT_func" $attr_name] } {
 		_handle_macro_at_func $attr_value
@@ -629,7 +664,12 @@ namespace eval Dwarf {
 		_handle_macro_at_range $attr_value
 	    } else {
 		if {[llength $attr] > 2} {
-		    set attr_form [lindex $attr 2]
+		    set attr_form [uplevel 2 [list subst [lindex $attr end]]]
+
+		    if { [string index $attr_value 0] == ":" } {
+			# It is a label, get its value.
+			_guess_form $attr_value attr_value
+		    }
 		} else {
 		    # If the value looks like an integer, a form is required.
 		    if [string is integer $attr_value] {
@@ -820,6 +860,7 @@ namespace eval Dwarf {
     proc _location {body} {
 	variable _constants
 	variable _cu_label
+	variable _cu_version
 	variable _cu_addr_size
 	variable _cu_offset_size
 
@@ -836,6 +877,10 @@ namespace eval Dwarf {
 		    _op .${_cu_addr_size}byte [lindex $line 1]
 		}
 
+		DW_OP_regx {
+		    _op .uleb128 [lindex $line 1]
+		}
+
 		DW_OP_pick -
 		DW_OP_const1u -
 		DW_OP_const1s {
@@ -882,6 +927,25 @@ namespace eval Dwarf {
 		    _op .2byte [lindex $line 1]
 		}
 
+		DW_OP_implicit_value {
+		    set l1 [new_label "value_start"]
+		    set l2 [new_label "value_end"]
+		    _op .uleb128 "$l2 - $l1"
+		    define_label $l1
+		    foreach value [lrange $line 1 end] {
+			switch -regexp -- $value {
+			    {^0x[[:xdigit:]]{1,2}$} {_op .byte $value}
+			    {^0x[[:xdigit:]]{4}$} {_op .2byte $value}
+			    {^0x[[:xdigit:]]{8}$} {_op .4byte $value}
+			    {^0x[[:xdigit:]]{16}$} {_op .8byte $value}
+			    default {
+				error "bad value '$value' in DW_OP_implicit_value"
+			    }
+			}
+		    }
+		    define_label $l2
+		}
+
 		DW_OP_GNU_implicit_pointer {
 		    if {[llength $line] != 3} {
 			error "usage: DW_OP_GNU_implicit_pointer LABEL OFFSET"
@@ -889,7 +953,11 @@ namespace eval Dwarf {
 
 		    # Here label is a section offset.
 		    set label [lindex $line 1]
-		    _op .${_cu_offset_size}byte $label
+		    if { $_cu_version == 2 } {
+			_op .${_cu_addr_size}byte $label
+		    } else {
+			_op .${_cu_offset_size}byte $label
+		    }
 		    _op .sleb128 [lindex $line 2]
 		}
 
@@ -901,6 +969,11 @@ namespace eval Dwarf {
 		    _op .byte [lindex $line 1]
 		}
 
+		DW_OP_bregx {
+		    _op .uleb128 [lindex $line 1]
+		    _op .sleb128 [lindex $line 2]
+		}
+
 		default {
 		    if {[llength $line] > 1} {
 			error "Unimplemented: operands in location for $opcode"
@@ -942,6 +1015,7 @@ namespace eval Dwarf {
 	set _abbrev_section ".debug_abbrev"
 
 	foreach { name value } $options {
+	    set value [uplevel 1 "subst \"$value\""]
 	    switch -exact -- $name {
 		is_64 { set is_64 $value }
 		version { set _cu_version $value }
@@ -972,7 +1046,7 @@ namespace eval Dwarf {
 	set _cu_label [_compute_label "cu${cu_num}_begin"]
 	set start_label [_compute_label "cu${cu_num}_start"]
 	set end_label [_compute_label "cu${cu_num}_end"]
-	
+
 	define_label $_cu_label
 	if {$is_64} {
 	    _op .4byte 0xffffffff
@@ -1109,6 +1183,78 @@ namespace eval Dwarf {
 	define_label $end_label
     }
 
+    # Emit a DWARF .debug_ranges unit.
+    # OPTIONS is a list with an even number of elements containing
+    # option-name and option-value pairs.
+    # Current options are:
+    # is_64 0|1    - boolean indicating if you want to emit 64-bit DWARF
+    #                default = 0 (32-bit)
+    #
+    # BODY is Tcl code that emits the content of the .debug_ranges
+    # unit, it is evaluated in the caller's context.
+    proc ranges {options body} {
+	variable _debug_ranges_64_bit
+
+	foreach { name value } $options {
+	    switch -exact -- $name {
+		is_64 { set _debug_ranges_64_bit [subst $value] }
+		default { error "unknown option $name" }
+	    }
+	}
+
+	set section ".debug_ranges"
+	_section $section
+
+	proc sequence {{ranges {}}} {
+	    variable _debug_ranges_64_bit
+
+	    # Emit the sequence of addresses.
+	    set base ""
+	    foreach range $ranges {
+		set range [uplevel 1 "subst \"$range\""]
+		set type [lindex $range 0]
+		switch -exact -- $type {
+		    base {
+			set base [lrange $range 1 end]
+
+			if { $_debug_ranges_64_bit } then {
+			    _op .8byte 0xffffffffffffffff "Base Marker"
+			    _op .8byte $base "Base Address"
+			} else {
+			    _op .4byte 0xffffffff "Base Marker"
+			    _op .4byte $base "Base Address"
+			}
+		    }
+		    range {
+			set start [lindex $range 1]
+			set end [lrange $range 2 end]
+
+			if { $_debug_ranges_64_bit } then {
+			    _op .8byte $start "Start Address"
+			    _op .8byte $end "End Address"
+			} else {
+			    _op .4byte $start "Start Address"
+			    _op .4byte $end "End Address"
+			}
+		    }
+		    default { error "unknown range type: $type " }
+		}
+	    }
+
+	    # End of the sequence.
+	    if { $_debug_ranges_64_bit } then {
+		_op .8byte 0x0 "End of Sequence Marker (Part 1)"
+		_op .8byte 0x0 "End of Sequence Marker (Part 2)"
+	    } else {
+		_op .4byte 0x0 "End of Sequence Marker (Part 1)"
+		_op .4byte 0x0 "End of Sequence Marker (Part 2)"
+	    }
+	}
+
+	uplevel $body
+    }
+
+
     # Emit a DWARF .debug_line unit.
     # OPTIONS is a list with an even number of elements containing
     # option-name and option-value pairs.
@@ -1137,6 +1283,8 @@ namespace eval Dwarf {
     proc lines {options label body} {
 	variable _line_count
 	variable _line_saw_file
+	variable _line_saw_program
+	variable _line_header_end_label
 
 	# Establish the defaults.
 	set is_64 0
@@ -1172,7 +1320,7 @@ namespace eval Dwarf {
 	set unit_len_label [_compute_label "line${_line_count}_start"]
 	set unit_end_label [_compute_label "line${_line_count}_end"]
 	set header_len_label [_compute_label "line${_line_count}_header_start"]
-	set header_end_label [_compute_label "line${_line_count}_header_end"]
+	set _line_header_end_label [_compute_label "line${_line_count}_header_end"]
 
 	if {$is_64} {
 	    _op .4byte 0xffffffff
@@ -1186,20 +1334,34 @@ namespace eval Dwarf {
 	_op .2byte $_unit_version version
 
 	if {$is_64} {
-	    _op .8byte "$header_end_label - $header_len_label" "header_length"
+	    _op .8byte "$_line_header_end_label - $header_len_label" "header_length"
 	} else {
-	    _op .4byte "$header_end_label - $header_len_label" "header_length"
+	    _op .4byte "$_line_header_end_label - $header_len_label" "header_length"
 	}
 
 	define_label $header_len_label
 
 	_op .byte 1 "minimum_instruction_length"
-	_op .byte 0 "default_is_stmt"
+	_op .byte 1 "default_is_stmt"
 	_op .byte 1 "line_base"
 	_op .byte 1 "line_range"
-	_op .byte 1 "opcode_base"
-	# Since we emit opcode_base==1, we skip
-	# standard_opcode_length table altogether.
+	_op .byte 10 "opcode_base"
+
+	# The standard_opcode_lengths table.  The number of arguments
+	# for each of the standard opcodes.  Generating 9 entries here
+	# matches the use of 10 in the opcode_base above.  These 9
+	# entries match the 9 standard opcodes for DWARF2, making use
+	# of only 9 should be fine, even if we are generating DWARF3
+	# or DWARF4.
+	_op .byte 0 "standard opcode 1"
+	_op .byte 1 "standard opcode 2"
+	_op .byte 1 "standard opcode 3"
+	_op .byte 1 "standard opcode 4"
+	_op .byte 1 "standard opcode 5"
+	_op .byte 0 "standard opcode 6"
+	_op .byte 0 "standard opcode 7"
+	_op .byte 0 "standard opcode 8"
+	_op .byte 1 "standard opcode 9"
 
 	proc include_dir {dirname} {
 	    _op .ascii [_quote $dirname]
@@ -1219,6 +1381,57 @@ namespace eval Dwarf {
 	    _op .sleb128 0 "length"
 	}
 
+	proc program {statements} {
+	    variable _line_saw_program
+	    variable _line_header_end_label
+
+	    if "! $_line_saw_program" {
+		# Terminate the file list.
+		_op .byte 0 "Terminator."
+		define_label $_line_header_end_label
+		set _line_saw_program 1
+	    }
+
+	    proc DW_LNE_set_address {addr} {
+		_op .byte 0
+		set start [new_label "set_address_start"]
+		set end [new_label "set_address_end"]
+		_op .uleb128 "${end} - ${start}"
+		define_label ${start}
+		_op .byte 2
+		if {[is_64_target]} {
+		    _op .8byte ${addr}
+		} else {
+		    _op .4byte ${addr}
+		}
+		define_label ${end}
+	    }
+
+	    proc DW_LNE_end_sequence {} {
+		_op .byte 0
+		_op .uleb128 1
+		_op .byte 1
+	    }
+
+	    proc DW_LNS_copy {} {
+		_op .byte 1
+	    }
+
+	    proc DW_LNS_advance_pc {offset} {
+		_op .byte 2
+		_op .uleb128 ${offset}
+	    }
+
+	    proc DW_LNS_advance_line {offset} {
+		_op .byte 3
+		_op .sleb128 ${offset}
+	    }
+
+	    foreach statement $statements {
+		uplevel 1 $statement
+	    }
+	}
+
 	uplevel $body
 
 	rename include_dir ""
@@ -1230,9 +1443,11 @@ namespace eval Dwarf {
 	}
 
 	# Terminate the file list.
-	_op .byte 0 "Terminator."
+	if "! $_line_saw_program" {
+	    _op .byte 0 "Terminator."
+	    define_label $_line_header_end_label
+	}
 
-	define_label $header_end_label
 	define_label $unit_end_label
     }
 
@@ -1269,7 +1484,7 @@ namespace eval Dwarf {
 	_op .ascii [_quote $name]
 	# Alignment.
 	set align 2
-	set total [expr {($namelen + (1 << $align) - 1) & (-1 << $align)}]
+	set total [expr {($namelen + (1 << $align) - 1) & -(1 << $align)}]
 	for {set i $namelen} {$i < $total} {incr i} {
 	    _op .byte 0
 	}
@@ -1317,6 +1532,9 @@ namespace eval Dwarf {
 	variable _cu_count
 	variable _line_count
 	variable _line_saw_file
+	variable _line_saw_program
+	variable _line_header_end_label
+	variable _debug_ranges_64_bit
 
 	if {!$_initialized} {
 	    _read_constants
@@ -1332,6 +1550,8 @@ namespace eval Dwarf {
 
 	set _line_count 0
 	set _line_saw_file 0
+	set _line_saw_program 0
+	set _debug_ranges_64_bit [is_64_target]
 
 	# Not "uplevel" here, because we want to evaluate in this
 	# namespace.  This is somewhat bad because it means we can't
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/fortran.exp ./gdb/testsuite/lib/fortran.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/fortran.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/fortran.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This test code is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,3 +28,63 @@ proc set_lang_fortran {} {
     }
     return 1
 }
+
+proc fortran_int4 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "int4"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "integer\\(kind=4\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "INTEGER\\(4\\)"
+    } else {
+	return "unknown"
+    }
+}
+
+proc fortran_real4 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "real4"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "real\\(kind=4\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "REAL\\(4\\)"
+    } else {
+	return "unknown"
+    }
+}
+
+proc fortran_real8 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "real8"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "real\\(kind=8\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "REAL\\(8\\)"
+    } else {
+	return "unknown"
+    }
+}
+
+proc fortran_complex4 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "complex4"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "complex\\(kind=4\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "COMPLEX\\(4\\)"
+    } else {
+	return "unknown"
+    }
+}
+
+proc fortran_logical4 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "logical4"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "logical\\(kind=4\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "LOGICAL\\(4\\)"
+    } else {
+	return "unknown"
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/future.exp ./gdb/testsuite/lib/future.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/future.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/future.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2004-2015 Free Software Foundation, Inc.
+# Copyright 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,6 +41,27 @@ proc gdb_find_gnatmake {} {
     return $GM
 }   
 
+proc gdb_find_gdc {} {
+    global tool_root_dir
+    print "Tool Root: $tool_root_dir"
+
+    if {![is_remote host]} {
+	set file [lookfor_file $tool_root_dir gdc]
+	if { $file == "" } {
+	    set file [lookfor_file $tool_root_dir gcc/gdc]
+	}
+	if { $file != "" } {
+	    set CC "$file -B[file dirname $file]/"
+	} else {
+	    set CC [transform gdc]
+	}
+    } else {
+	set CC [transform gdc]
+    }
+    print "CC: $CC"
+    return $CC
+}
+
 proc gdb_find_gfortran {} {
     global tool_root_dir
 
@@ -84,6 +105,22 @@ proc gdb_find_go_linker {} {
     return [find_go]
 }
 
+proc gdb_find_rustc {} {
+    global tool_root_dir
+    if {![is_remote host]} {
+	set rustc [lookfor_file $tool_root_dir rustc]
+	if {$rustc == ""} {
+	    set rustc rustc
+	}
+    } else {
+	set rustc ""
+    }
+    if {$rustc != ""} {
+	append rustc " --color never"
+    }
+    return $rustc
+}
+
 proc gdb_find_ldd {} {
     global LDD_FOR_TARGET
     if [info exists LDD_FOR_TARGET] {
@@ -135,14 +172,15 @@ proc gdb_default_target_compile {source 
 	error "Must supply an output filename for the compile to default_target_compile"
     }
 
+    set early_flags ""
     set add_flags ""
     set libs ""
     set compiler_type "c"
     set compiler ""
     set linker ""
     # linker_opts_order is one of "sources-then-flags", "flags-then-sources".
-    # The order shouldn't matter.  It's done this way to preserve
-    # existing behavior.
+    # The order matters for things like -Wl,--as-needed.  The default is to
+    # preserve existing behavior.
     set linker_opts_order "sources-then-flags"
     set ldflags ""
     set dest [target_info name]
@@ -184,6 +222,18 @@ proc gdb_default_target_compile {source 
 	    }
 	}
 
+	if { $i == "d" } {
+	    set compiler_type "d"
+	    if {[board_info $dest exists dflags]} {
+		append add_flags " [target_info dflags]"
+	    }
+	    if {[board_info $dest exists dcompiler]} {
+		set compiler [target_info dcompiler]
+	    } else {
+		set compiler [find_gdc]
+	    }
+	}
+
 	if { $i == "f77" } {
 	    set compiler_type "f77"
 	    if {[board_info $dest exists f77flags]} {
@@ -228,6 +278,18 @@ proc gdb_default_target_compile {source 
 	    }
 	}
 
+	if { $i == "rust" } {
+	    set compiler_type "rust"
+	    if {[board_info $dest exists rustflags]} {
+		append add_flags " [target_info rustflags]"
+	    }
+	    if {[board_info $dest exists rustflags]} {
+		set compiler [target_info rustflags]
+	    } else {
+		set compiler [find_rustc]
+	    }
+	}
+
 	if {[regexp "^dest=" $i]} {
 	    regsub "^dest=" $i "" tmp
 	    if {[board_info $tmp exists name]} {
@@ -240,6 +302,10 @@ proc gdb_default_target_compile {source 
 	    regsub "^compiler=" $i "" tmp
 	    set compiler $tmp
 	}
+	if {[regexp "^early_flags=" $i]} {
+	    regsub "^early_flags=" $i "" tmp
+	    append early_flags " $tmp"
+	}
 	if {[regexp "^additional_flags=" $i]} {
 	    regsub "^additional_flags=" $i "" tmp
 	    append add_flags " $tmp"
@@ -280,11 +346,13 @@ proc gdb_default_target_compile {source 
 
     global CC_FOR_TARGET
     global CXX_FOR_TARGET
+    global D_FOR_TARGET
     global F77_FOR_TARGET
     global F90_FOR_TARGET
     global GNATMAKE_FOR_TARGET
     global GO_FOR_TARGET
     global GO_LD_FOR_TARGET
+    global RUSTC_FOR_TARGET
 
     if {[info exists GNATMAKE_FOR_TARGET]} {
 	if { $compiler_type == "ada" } {
@@ -304,6 +372,12 @@ proc gdb_default_target_compile {source 
 	}
     }
 
+    if {[info exists D_FOR_TARGET]} {
+	if { $compiler_type == "d" } {
+	    set compiler $D_FOR_TARGET
+	}
+    }
+
     if {[info exists F77_FOR_TARGET]} {
 	if { $compiler_type == "f77" } {
 	    set compiler $F77_FOR_TARGET
@@ -325,6 +399,12 @@ proc gdb_default_target_compile {source 
 	}
     }
 
+    if {[info exists RUSTC_FOR_TARGET]} {
+	if {$compiler_type == "rust"} {
+	    set compiler $RUSTC_FOR_TARGET
+	}
+    }
+
     if { $type == "executable" && $linker != "" } {
 	set compiler $linker
     }
@@ -343,7 +423,11 @@ proc gdb_default_target_compile {source 
     }
 
     if {$type == "object"} {
-	append add_flags " -c"
+	if {$compiler_type == "rust"} {
+	    append add_flags "--emit obj"
+	} else {
+	    append add_flags " -c"
+	}
     }
 
     if { $type == "preprocess" } {
@@ -375,9 +459,6 @@ proc gdb_default_target_compile {source 
 		} elseif {[regexp ".*(osf|irix5|linux).*" $target_triplet]} {
 		    # OSF/1 or IRIX 5
 		    append add_flags " -Wl,-rpath,$tool_root_dir/libstdc++"
-		} elseif {[regexp ".*hppa.*" $target_triplet]} {
-		    # HP-UX
-		    append add_flags " -Wl,-a,shared_archive"
 		}
 	    }
 	}
@@ -473,15 +554,15 @@ proc gdb_default_target_compile {source 
     # become confused about the name of the actual source file.
     switch $type {
 	"object" {
-	    set opts "$add_flags $sources"
+	    set opts "$early_flags $add_flags $sources"
 	}
 	"executable" {
 	    switch $linker_opts_order {
 		"flags-then-sources" {
-		    set opts "$add_flags $sources"
+		    set opts "$early_flags $add_flags $sources"
 		}
 		"sources-then-flags" {
-		    set opts "$sources $add_flags"
+		    set opts "$early_flags $sources $add_flags"
 		}
 		default {
 		    error "Invalid value for board_info linker_opts_order"
@@ -489,7 +570,7 @@ proc gdb_default_target_compile {source 
 	    }
 	}
 	default {
-	    set opts "$sources $add_flags"
+	    set opts "$early_flags $sources $add_flags"
 	}
     }
 
@@ -558,6 +639,16 @@ if {[info procs find_go_linker] == ""} {
     set use_gdb_compile 1
 }
 
+if {[info procs find_gdc] == ""} {
+    rename gdb_find_gdc find_gdc
+    set use_gdb_compile 1
+}
+
+if {[info procs find_rustc] == ""} {
+    rename gdb_find_rustc find_rustc
+    set use_gdb_compile 1
+}
+
 if {$use_gdb_compile} {
     catch {rename default_target_compile {}}
     rename gdb_default_target_compile default_target_compile
@@ -575,3 +666,8 @@ if {[info procs lreverse] == ""} {
 	return $retval
     }
 }
+
+# Various ccache versions provide incorrect debug info such as ignoring
+# different current directory, breaking GDB testsuite.
+set env(CCACHE_DISABLE) 1
+unset -nocomplain env(CCACHE_NODISABLE)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb.exp ./gdb/testsuite/lib/gdb.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/gdb.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@ if {$tool == ""} {
 load_lib libgloss.exp
 load_lib cache.exp
 load_lib gdb-utils.exp
+load_lib memory.exp
 
 global GDB
 
@@ -117,6 +118,10 @@ set octal "\[0-7\]+"
 
 set inferior_exited_re "(\\\[Inferior \[0-9\]+ \\(.*\\) exited)"
 
+# A regular expression that matches a value history number.
+# E.g., $1, $2, etc.
+set valnum_re "\\\$$decimal"
+
 ### Only procedures should come after this point.
 
 #
@@ -519,7 +524,7 @@ proc runto { function args } {
 	}
 	-re "The target does not support running in non-stop mode.\r\n$gdb_prompt $" {
 	    if { $print_fail } {
-		unsupported "Non-stop mode not supported"
+		unsupported "non-stop mode not supported"
 	    }
 	    return 0
 	}
@@ -959,7 +964,9 @@ proc gdb_test_multiple { command message
 # COMMAND is the command to execute, send to GDB with send_gdb.  If
 #   this is the null string no command is sent.
 # PATTERN is the pattern to match for a PASS, and must NOT include
-#   the \r\n sequence immediately before the gdb prompt.
+#   the \r\n sequence immediately before the gdb prompt.  This argument
+#   may be omitted to just match the prompt, ignoring whatever output 
+#   precedes it.
 # MESSAGE is an optional message to be printed.  If this is
 #   omitted, then the pass/fail messages use the command string as the
 #   message.  (If this is the empty string, then sometimes we don't
@@ -974,9 +981,7 @@ proc gdb_test_multiple { command message
 #   -1 if there was an internal error.
 #  
 proc gdb_test { args } {
-    global verbose
     global gdb_prompt
-    global GDB
     upvar timeout timeout
 
     if [llength $args]>2 then {
@@ -1230,6 +1235,73 @@ proc gdb_test_list_exact { cmd name elm_
 	}
     }
 }
+
+# gdb_test_stdio COMMAND INFERIOR_PATTERN GDB_PATTERN MESSAGE
+# Send a command to gdb; expect inferior and gdb output.
+#
+# See gdb_test_multiple for a description of the COMMAND and MESSAGE
+# parameters.
+#
+# INFERIOR_PATTERN is the pattern to match against inferior output.
+#
+# GDB_PATTERN is the pattern to match against gdb output, and must NOT
+# include the \r\n sequence immediately before the gdb prompt, nor the
+# prompt.  The default is empty.
+#
+# Both inferior and gdb patterns must match for a PASS.
+#
+# If MESSAGE is ommitted, then COMMAND will be used as the message.
+#
+# Returns:
+#    1 if the test failed,
+#    0 if the test passes,
+#   -1 if there was an internal error.
+#
+
+proc gdb_test_stdio {command inferior_pattern {gdb_pattern ""} {message ""}} {
+    global inferior_spawn_id gdb_spawn_id
+    global gdb_prompt
+
+    if {$message == ""} {
+	set message $command
+    }
+
+    set inferior_matched 0
+    set gdb_matched 0
+
+    # Use an indirect spawn id list, and remove the inferior spawn id
+    # from the expected output as soon as it matches, in case
+    # $inferior_pattern happens to be a prefix of the resulting full
+    # gdb pattern below (e.g., "\r\n").
+    global gdb_test_stdio_spawn_id_list
+    set gdb_test_stdio_spawn_id_list "$inferior_spawn_id"
+
+    # Note that if $inferior_spawn_id and $gdb_spawn_id are different,
+    # then we may see gdb's output arriving before the inferior's
+    # output.
+    set res [gdb_test_multiple $command $message {
+	-i gdb_test_stdio_spawn_id_list -re "$inferior_pattern" {
+	    set inferior_matched 1
+	    if {!$gdb_matched} {
+		set gdb_test_stdio_spawn_id_list ""
+		exp_continue
+	    }
+	}
+	-i $gdb_spawn_id -re "$gdb_pattern\r\n$gdb_prompt $" {
+	    set gdb_matched 1
+	    if {!$inferior_matched} {
+		exp_continue
+	    }
+	}
+    }]
+    if {$res == 0} {
+	pass $message
+    } else {
+	verbose -log "inferior_matched=$inferior_matched, gdb_matched=$gdb_matched"
+    }
+    return $res
+}
+
 
 
 # Issue a PASS and return true if evaluating CONDITION in the caller's
@@ -1292,7 +1364,7 @@ proc default_gdb_exit {} {
     global GDB
     global INTERNAL_GDBFLAGS GDBFLAGS
     global verbose
-    global gdb_spawn_id
+    global gdb_spawn_id inferior_spawn_id
     global inotify_log_file
 
     gdb_stop_suppressing_tests
@@ -1333,6 +1405,7 @@ proc default_gdb_exit {} {
 	remote_close host
     }
     unset gdb_spawn_id
+    unset inferior_spawn_id
 }
 
 # Load a file into the debugger.
@@ -1654,48 +1727,47 @@ proc skip_go_tests {} {
     return 0
 }
 
-# Return a 1 if I don't even want to try to test java.
-
-proc skip_java_tests {} {
-    return 0
-}
-
 # Return a 1 if I don't even want to try to test D.
 
 proc skip_d_tests {} {
     return 0
 }
 
+# Return 1 to skip Rust tests, 0 to try them.
+proc skip_rust_tests {} {
+    return [expr {![isnative]}]
+}
+
 # Return a 1 for configurations that do not support Python scripting.
+# PROMPT_REGEXP is the expected prompt.
 
-proc skip_python_tests {} {
-    global gdb_prompt
+proc skip_python_tests_prompt { prompt_regexp } {
     global gdb_py_is_py3k
     global gdb_py_is_py24
 
     gdb_test_multiple "python print ('test')" "verify python support" {
-	-re "not supported.*$gdb_prompt $"	{
+	-re "not supported.*$prompt_regexp" {
 	    unsupported "Python support is disabled."
 	    return 1
 	}
-	-re "$gdb_prompt $"	{}
+	-re "$prompt_regexp" {}
     }
 
     set gdb_py_is_py24 0
     gdb_test_multiple "python print (sys.version_info\[0\])" "check if python 3" {
-	-re "3.*$gdb_prompt $"	{
+	-re "3.*$prompt_regexp" {
             set gdb_py_is_py3k 1
         }
-	-re ".*$gdb_prompt $"	{
+	-re ".*$prompt_regexp" {
             set gdb_py_is_py3k 0
         }
     }
     if { $gdb_py_is_py3k == 0 } {
         gdb_test_multiple "python print (sys.version_info\[1\])" "check if python 2.4" {
-	    -re "\[45\].*$gdb_prompt $" {
+	    -re "\[45\].*$prompt_regexp" {
                 set gdb_py_is_py24 1
             }
-	    -re ".*$gdb_prompt $" {
+	    -re ".*$prompt_regexp" {
                 set gdb_py_is_py24 0
             }
         }
@@ -1704,6 +1776,15 @@ proc skip_python_tests {} {
     return 0
 }
 
+# Return a 1 for configurations that do not support Python scripting.
+# Note: This also sets various globals that specify which version of Python
+# is in use.  See skip_python_tests_prompt.
+
+proc skip_python_tests {} {
+    global gdb_prompt
+    return [skip_python_tests_prompt "$gdb_prompt $"]
+}
+
 # Return a 1 if we should skip shared library tests.
 
 proc skip_shlib_tests {} {
@@ -1830,6 +1911,93 @@ proc with_test_prefix { prefix body } {
   }
 }
 
+# Wrapper for foreach that calls with_test_prefix on each iteration,
+# including the iterator's name and current value in the prefix.
+
+proc foreach_with_prefix {var list body} {
+    upvar 1 $var myvar
+    foreach myvar $list {
+	with_test_prefix "$var=$myvar" {
+	    uplevel 1 $body
+	}
+    }
+}
+
+# Like TCL's native proc, but defines a procedure that wraps its body
+# within 'with_test_prefix "$proc_name" { ... }'.
+proc proc_with_prefix {name arguments body} {
+    # Define the advertised proc.
+    proc $name $arguments [list with_test_prefix $name $body]
+}
+
+
+# Run BODY in the context of the caller.  After BODY is run, the variables
+# listed in VARS will be reset to the values they had before BODY was run.
+#
+# This is useful for providing a scope in which it is safe to temporarily
+# modify global variables, e.g.
+#
+#   global INTERNAL_GDBFLAGS
+#   global env
+#
+#   set foo GDBHISTSIZE
+#
+#   save_vars { INTERNAL_GDBFLAGS env($foo) env(HOME) } {
+#       append INTERNAL_GDBFLAGS " -nx"
+#       unset -nocomplain env(GDBHISTSIZE)
+#       gdb_start
+#       gdb_test ...
+#   }
+#
+# Here, although INTERNAL_GDBFLAGS, env(GDBHISTSIZE) and env(HOME) may be
+# modified inside BODY, this proc guarantees that the modifications will be
+# undone after BODY finishes executing.
+
+proc save_vars { vars body } {
+    array set saved_scalars { }
+    array set saved_arrays { }
+    set unset_vars { }
+
+    foreach var $vars {
+	# First evaluate VAR in the context of the caller in case the variable
+	# name may be a not-yet-interpolated string like env($foo)
+	set var [uplevel 1 list $var]
+
+	if [uplevel 1 [list info exists $var]] {
+	    if [uplevel 1 [list array exists $var]] {
+		set saved_arrays($var) [uplevel 1 [list array get $var]]
+	    } else {
+		set saved_scalars($var) [uplevel 1 [list set $var]]
+	    }
+	} else {
+	    lappend unset_vars $var
+	}
+    }
+
+    set code [catch {uplevel 1 $body} result]
+
+    foreach {var value} [array get saved_scalars] {
+	uplevel 1 [list set $var $value]
+    }
+
+    foreach {var value} [array get saved_arrays] {
+	uplevel 1 [list unset $var]
+	uplevel 1 [list array set $var $value]
+    }
+
+    foreach var $unset_vars {
+	uplevel 1 [list unset -nocomplain $var]
+    }
+
+    if {$code == 1} {
+	global errorInfo errorCode
+	return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
+    } else {
+	return -code $code $result
+    }
+}
+
+
 # Run tests in BODY with GDB prompt and variable $gdb_prompt set to
 # PROMPT.  When BODY is finished, restore GDB prompt and variable
 # $gdb_prompt.
@@ -1914,6 +2082,56 @@ proc with_target_charset { target_charse
     }
 }
 
+# Switch the default spawn id to SPAWN_ID, so that gdb_test,
+# mi_gdb_test etc. default to using it.
+
+proc switch_gdb_spawn_id {spawn_id} {
+    global gdb_spawn_id
+    global board board_info
+
+    set gdb_spawn_id $spawn_id
+    set board [host_info name]
+    set board_info($board,fileid) $spawn_id
+}
+
+# Clear the default spawn id.
+
+proc clear_gdb_spawn_id {} {
+    global gdb_spawn_id
+    global board board_info
+
+    unset -nocomplain gdb_spawn_id
+    set board [host_info name]
+    unset -nocomplain board_info($board,fileid)
+}
+
+# Run BODY with SPAWN_ID as current spawn id.
+
+proc with_spawn_id { spawn_id body } {
+    global gdb_spawn_id
+
+    if [info exists gdb_spawn_id] {
+	set saved_spawn_id $gdb_spawn_id
+    }
+
+    switch_gdb_spawn_id $spawn_id
+
+    set code [catch {uplevel 1 $body} result]
+
+    if [info exists saved_spawn_id] {
+	switch_gdb_spawn_id $saved_spawn_id
+    } else {
+	clear_gdb_spawn_id
+    }
+
+    if {$code == 1} {
+	global errorInfo errorCode
+	return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
+    } else {
+	return -code $code $result
+    }
+}
+
 # Select the largest timeout from all the timeouts:
 # - the local "timeout" variable of the scope two levels above,
 # - the global "timeout" variable,
@@ -1965,6 +2183,13 @@ proc with_timeout_factor { factor body }
 # Return 1 if _Complex types are supported, otherwise, return 0.
 
 gdb_caching_proc support_complex_tests {
+
+    if { [gdb_skip_float_test] } {
+	# If floating point is not supported, _Complex is not
+	# supported.
+	return 0
+    }
+
     # Set up, compile, and execute a test program containing _Complex types.
     # Include the current process ID in the file names to prevent conflicts
     # with invocations for multiple testsuites.
@@ -2007,15 +2232,10 @@ proc supports_get_siginfo_type {} {
     }
 }
 
-# Return 1 if target hardware or OS supports single stepping to signal
-# handler, otherwise, return 0.
+# Return 1 if the target supports hardware single stepping.
 
-proc can_single_step_to_signal_handler {} {
+proc can_hardware_single_step {} {
 
-    # Targets don't have hardware single step.  On these targets, when
-    # a signal is delivered during software single step, gdb is unable
-    # to determine the next instruction addresses, because start of signal
-    # handler is one of them.
     if { [istarget "arm*-*-*"] || [istarget "mips*-*-*"]
 	 || [istarget "tic6x-*-*"] || [istarget "sparc*-*-linux*"]
 	 || [istarget "nios2-*-*"] } {
@@ -2025,6 +2245,17 @@ proc can_single_step_to_signal_handler {
     return 1
 }
 
+# Return 1 if target hardware or OS supports single stepping to signal
+# handler, otherwise, return 0.
+
+proc can_single_step_to_signal_handler {} {
+    # Targets don't have hardware single step.  On these targets, when
+    # a signal is delivered during software single step, gdb is unable
+    # to determine the next instruction addresses, because start of signal
+    # handler is one of them.
+    return [can_hardware_single_step]
+}
+
 # Return 1 if target supports process record, otherwise return 0.
 
 proc supports_process_record {} {
@@ -2036,7 +2267,8 @@ proc supports_process_record {} {
     if { [istarget "arm*-*-linux*"] || [istarget "x86_64-*-linux*"]
          || [istarget "i\[34567\]86-*-linux*"]
          || [istarget "aarch64*-*-linux*"]
-         || [istarget "powerpc*-*-linux*"] } {
+         || [istarget "powerpc*-*-linux*"]
+         || [istarget "s390*-*-linux*"] } {
 	return 1
     }
 
@@ -2054,7 +2286,8 @@ proc supports_reverse {} {
     if { [istarget "arm*-*-linux*"] || [istarget "x86_64-*-linux*"]
          || [istarget "i\[34567\]86-*-linux*"]
          || [istarget "aarch64*-*-linux*"]
-         || [istarget "powerpc*-*-linux*"] } {
+         || [istarget "powerpc*-*-linux*"]
+         || [istarget "s390*-*-linux*"] } {
 	return 1
     }
 
@@ -2271,12 +2504,60 @@ proc is_x86_like_target {} {
     return [expr [is_ilp32_target] && ![is_amd64_regs_target]]
 }
 
+# Return 1 if this target is an arm or aarch32 on aarch64.
+
+gdb_caching_proc is_aarch32_target {
+    if { [istarget "arm*-*-*"] } {
+	return 1
+    }
+
+    if { ![istarget "aarch64*-*-*"] } {
+	return 0
+    }
+
+    set me "is_aarch32_target"
+
+    set src [standard_temp_file aarch32[pid].s]
+    set obj [standard_temp_file aarch32[pid].o]
+
+    set list {}
+    foreach reg \
+	{r0 r1 r2 r3} {
+	    lappend list "\tmov $reg, $reg"
+	}
+    gdb_produce_source $src [join $list \n]
+
+    verbose "$me:  compiling testfile $src" 2
+    set lines [gdb_compile $src $obj object {quiet}]
+    file delete $src
+    file delete $obj
+
+    if ![string match "" $lines] then {
+	verbose "$me:  testfile compilation failed, returning 0" 2
+	return 0
+    }
+
+    verbose "$me:  returning 1" 2
+    return 1
+}
+
+# Return 1 if this target is an aarch64, either lp64 or ilp32.
+
+proc is_aarch64_target {} {
+    if { ![istarget "aarch64*-*-*"] } {
+	return 0
+    }
+
+    return [expr ![is_aarch32_target]]
+}
+
 # Return 1 if displaced stepping is supported on target, otherwise, return 0.
 proc support_displaced_stepping {} {
 
     if { [istarget "x86_64-*-linux*"] || [istarget "i\[34567\]86-*-linux*"]
 	 || [istarget "arm*-*-linux*"] || [istarget "powerpc-*-linux*"]
-	 || [istarget "powerpc64-*-linux*"] || [istarget "s390*-*-*"] } {
+	 || [istarget "powerpc64-*-linux*"] || [istarget "s390*-*-*"]
+	 || [istarget "aarch64*-*-linux*"] } {
 	return 1
     }
 
@@ -2448,6 +2729,63 @@ gdb_caching_proc skip_vsx_tests {
     return $skip_vsx_tests
 }
 
+# Run a test on the target to see if it supports TSX hardware.  Return 0 if so,
+# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+
+gdb_caching_proc skip_tsx_tests {
+    global srcdir subdir gdb_prompt inferior_exited_re
+
+    set me "skip_tsx_tests"
+
+    set src [standard_temp_file tsx[pid].c]
+    set exe [standard_temp_file tsx[pid].x]
+
+    gdb_produce_source $src {
+    int main() {
+        asm volatile ("xbegin .L0");
+        asm volatile ("xend");
+        asm volatile (".L0: nop");
+        return 0;
+    }
+    }
+
+    verbose "$me:  compiling testfile $src" 2
+    set lines [gdb_compile $src $exe executable {nowarnings quiet}]
+    file delete $src
+
+    if ![string match "" $lines] then {
+        verbose "$me:  testfile compilation failed." 2
+        return 1
+    }
+
+    # No error message, compilation succeeded so now run it via gdb.
+
+    gdb_exit
+    gdb_start
+    gdb_reinitialize_dir $srcdir/$subdir
+    gdb_load "$exe"
+    gdb_run_cmd
+    gdb_expect {
+        -re ".*Illegal instruction.*${gdb_prompt} $" {
+            verbose -log "$me:  TSX hardware not detected."
+            set skip_tsx_tests 1
+        }
+        -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
+            verbose -log "$me:  TSX hardware detected."
+            set skip_tsx_tests 0
+        }
+        default {
+            warning "\n$me:  default case taken."
+            set skip_tsx_tests 1
+        }
+    }
+    gdb_exit
+    remote_file build delete $exe
+
+    verbose "$me:  returning $skip_tsx_tests" 2
+    return $skip_tsx_tests
+}
+
 # Run a test on the target to see if it supports btrace hardware.  Return 0 if so,
 # 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
@@ -2514,13 +2852,74 @@ gdb_caching_proc skip_btrace_tests {
     return $skip_btrace_tests
 }
 
-# Skip all the tests in the file if you are not on an hppa running
-# hpux target.
+# Run a test on the target to see if it supports btrace pt hardware.
+# Return 0 if so, 1 if it does not.  Based on 'check_vmx_hw_available'
+# from the GCC testsuite.
+
+gdb_caching_proc skip_btrace_pt_tests {
+    global srcdir subdir gdb_prompt inferior_exited_re
+
+    set me "skip_btrace_tests"
+    if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
+        verbose "$me:  target does not support btrace, returning 1" 2
+        return 1
+    }
+
+    # Set up, compile, and execute a test program.
+    # Include the current process ID in the file names to prevent conflicts
+    # with invocations for multiple testsuites.
+    set src [standard_temp_file btrace[pid].c]
+    set exe [standard_temp_file btrace[pid].x]
+
+    gdb_produce_source $src {
+	int main(void) { return 0; }
+    }
+
+    verbose "$me:  compiling testfile $src" 2
+    set compile_flags {debug nowarnings quiet}
+    set lines [gdb_compile $src $exe executable $compile_flags]
+
+    if ![string match "" $lines] then {
+        verbose "$me:  testfile compilation failed, returning 1" 2
+	file delete $src
+        return 1
+    }
+
+    # No error message, compilation succeeded so now run it via gdb.
 
-proc skip_hp_tests {} {
-    eval set skip_hp [ expr ![isnative] || ![istarget "hppa*-*-hpux*"] ]
-    verbose "Skip hp tests is $skip_hp"
-    return $skip_hp
+    gdb_exit
+    gdb_start
+    gdb_reinitialize_dir $srcdir/$subdir
+    gdb_load $exe
+    if ![runto_main] {
+	file delete $src
+        return 1
+    }
+    file delete $src
+    # In case of an unexpected output, we return 2 as a fail value.
+    set skip_btrace_tests 2
+    gdb_test_multiple "record btrace pt" "check btrace support" {
+        -re "You can't do that when your target is.*\r\n$gdb_prompt $" {
+            set skip_btrace_tests 1
+        }
+        -re "Target does not support branch tracing.*\r\n$gdb_prompt $" {
+            set skip_btrace_tests 1
+        }
+        -re "Could not enable branch tracing.*\r\n$gdb_prompt $" {
+            set skip_btrace_tests 1
+        }
+        -re "GDB does not support.*\r\n$gdb_prompt $" {
+            set skip_btrace_tests 1
+        }
+        -re "^record btrace pt\r\n$gdb_prompt $" {
+            set skip_btrace_tests 0
+        }
+    }
+    gdb_exit
+    remote_file build delete $exe
+
+    verbose "$me:  returning $skip_btrace_tests" 2
+    return $skip_btrace_tests
 }
 
 # Return whether we should skip tests for showing inlined functions in
@@ -2568,7 +2967,8 @@ proc skip_hw_breakpoint_tests {} {
 	 || [istarget "x86_64-*-*"]
 	 || [istarget "ia64-*-*"] 
 	 || [istarget "arm*-*-*"]
-	 || [istarget "aarch64*-*-*"]} {
+	 || [istarget "aarch64*-*-*"]
+	 || [istarget "s390*-*-*"] } {
 	return 0
     }
 
@@ -2697,25 +3097,53 @@ proc skip_compile_feature_tests {} {
     return $result
 }
 
-# Check whether we're testing with the remote or extended-remote
-# targets.
+# Helper for gdb_is_target_remote.  PROMPT_REGEXP is the expected
+# prompt.
 
-proc gdb_is_target_remote {} {
-    global gdb_prompt
+proc gdb_is_target_remote_prompt { prompt_regexp } {
 
     set test "probe for target remote"
     gdb_test_multiple "maint print target-stack" $test {
-	-re ".*emote serial target in gdb-specific protocol.*$gdb_prompt $" {
+	-re ".*emote serial target in gdb-specific protocol.*$prompt_regexp" {
 	    pass $test
 	    return 1
 	}
-	-re "$gdb_prompt $" {
+	-re "$prompt_regexp" {
 	    pass $test
 	}
     }
     return 0
 }
 
+# Check whether we're testing with the remote or extended-remote
+# targets.
+
+proc gdb_is_target_remote {} {
+    global gdb_prompt
+
+    return [gdb_is_target_remote_prompt "$gdb_prompt $"]
+}
+
+# Return the effective value of use_gdb_stub.
+#
+# If the use_gdb_stub global has been set (it is set when the gdb process is
+# spawned), return that.  Otherwise, return the value of the use_gdb_stub
+# property from the board file.
+#
+# This is the preferred way of checking use_gdb_stub, since it allows to check
+# the value before the gdb has been spawned and it will return the correct value
+# even when it was overriden by the test.
+
+proc use_gdb_stub {} {
+  global use_gdb_stub
+
+  if [info exists use_gdb_stub] {
+     return $use_gdb_stub
+  }
+
+  return [target_info exists use_gdb_stub]
+}
+
 # Return 1 if the current remote target is an instance of our GDBserver, 0
 # otherwise.  Return -1 if there was an error and we can't tell.
 
@@ -2723,7 +3151,7 @@ gdb_caching_proc target_is_gdbserver {
     global gdb_prompt
 
     set is_gdbserver -1
-    set test "Probing for GDBserver"
+    set test "probing for GDBserver"
 
     gdb_test_multiple "monitor help" $test {
 	-re "The following monitor commands are supported.*Quit GDBserver.*$gdb_prompt $" {
@@ -2741,12 +3169,18 @@ gdb_caching_proc target_is_gdbserver {
     return $is_gdbserver
 }
 
-set compiler_info		"unknown"
+# N.B. compiler_info is intended to be local to this file.
+# Call test_compiler_info with no arguments to fetch its value.
+# Yes, this is counterintuitive when there's get_compiler_info,
+# but that's the current API.
+if [info exists compiler_info] {
+    unset compiler_info
+}
+
 set gcc_compiled		0
-set hp_cc_compiler		0
-set hp_aCC_compiler		0
 
 # Figure out what compiler I am using.
+# The result is cached so only the first invocation runs the compiler.
 #
 # ARG can be empty or "C++".  If empty, "C" is assumed.
 #
@@ -2810,8 +3244,11 @@ proc get_compiler_info {{arg ""}} {
 
     # Legacy global data symbols.
     global gcc_compiled
-    global hp_cc_compiler
-    global hp_aCC_compiler
+
+    if [info exists compiler_info] {
+	# Already computed.
+	return 0
+    }
 
     # Choose which file to preprocess.
     set ifile "${srcdir}/lib/compiler.c"
@@ -2854,22 +3291,20 @@ proc get_compiler_info {{arg ""}} {
 	}
     }
 
-    # Reset to unknown compiler if any diagnostics happened.
+    # Set to unknown if for some reason compiler_info didn't get defined.
+    if ![info exists compiler_info] {
+	verbose -log "get_compiler_info: compiler_info not provided"
+	set compiler_info "unknown"
+    }
+    # Also set to unknown compiler if any diagnostics happened.
     if { $unknown } {
+	verbose -log "get_compiler_info: got unexpected diagnostics"
 	set compiler_info "unknown"
     }
 
     # Set the legacy symbols.
-    set gcc_compiled     0
-    set hp_cc_compiler   0
-    set hp_aCC_compiler  0
-    if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 }
-    if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 }
-    if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 }
-    if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 }
-    if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 }
-    if { [regexp "^hpcc-"  "$compiler_info" ] } { set hp_cc_compiler 1 }
-    if { [regexp "^hpacc-" "$compiler_info" ] } { set hp_aCC_compiler 1 }
+    set gcc_compiled 0
+    regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled
 
     # Log what happened.
     verbose -log "get_compiler_info: $compiler_info"
@@ -2879,28 +3314,21 @@ proc get_compiler_info {{arg ""}} {
     uplevel \#0 { set true 1 }
     uplevel \#0 { set false 0 }
 
-    # Use of aCC results in boolean results being displayed as
-    # "true" or "false"
-    if { $hp_aCC_compiler } {
-      uplevel \#0 { set true true }
-      uplevel \#0 { set false false }
-    }
-
     return 0
 }
 
+# Return the compiler_info string if no arg is provided.
+# Otherwise the argument is a glob-style expression to match against
+# compiler_info.
+
 proc test_compiler_info { {compiler ""} } {
     global compiler_info
+    get_compiler_info
 
-     # if no arg, return the compiler_info string
-
-     if [string match "" $compiler] {
-         if [info exists compiler_info] {
-             return $compiler_info
-         } else {
-             perror "No compiler info found."
-         }
-     }
+    # If no arg, return the compiler_info string.
+    if [string match "" $compiler] {
+	return $compiler_info
+    }
 
     return [string match $compiler $compiler_info]
 }
@@ -2944,6 +3372,40 @@ proc gdb_wrapper_init { args } {
 global gdb_saved_set_unbuffered_mode_obj
 set gdb_saved_set_unbuffered_mode_obj ""
 
+# Compile source files specified by SOURCE into a binary of type TYPE at path
+# DEST.  gdb_compile is implemented using DejaGnu's target_compile, so the type
+# parameter and most options are passed directly to it.
+#
+# The type can be one of the following:
+#
+#   - object: Compile into an object file.
+#   - executable: Compile and link into an executable.
+#   - preprocess: Preprocess the source files.
+#   - assembly: Generate assembly listing.
+#
+# The following options are understood and processed by gdb_compile:
+#
+#   - shlib=so_path: Add SO_PATH to the sources, and enable some target-specific
+#     quirks to be able to use shared libraries.
+#   - shlib_load: Link with appropriate libraries to allow the test to
+#     dynamically load libraries at runtime.  For example, on Linux, this adds
+#     -ldl so that the test can use dlopen.
+#   - nowarnings:  Inhibit all compiler warnings.
+#
+# And here are some of the not too obscure options understood by DejaGnu that
+# influence the compilation:
+#
+#   - additional_flags=flag: Add FLAG to the compiler flags.
+#   - libs=library: Add LIBRARY to the libraries passed to the linker.  The
+#     argument can be a file, in which case it's added to the sources, or a
+#     linker flag.
+#   - ldflags=flag: Add FLAG to the linker flags.
+#   - incdir=path: Add PATH to the searched include directories.
+#   - libdir=path: Add PATH to the linker searched directories.
+#   - ada, c++, f77: Compile the file as Ada, C++ or Fortran.
+#   - debug: Build with debug information.
+#   - optimize: Build with optimization.
+
 proc gdb_compile {source dest type options} {
     global GDB_TESTCASE_OPTIONS
     global gdb_wrapper_file
@@ -2979,6 +3441,13 @@ proc gdb_compile {source dest type optio
 		      || [istarget *-*-cygwin*]) } {
 		    lappend new_options "additional_flags=-Wl,--enable-auto-import"
 		}
+		if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
+		    # Undo debian's change in the default.
+		    # Put it at the front to not override any user-provided
+		    # value, and to make sure it appears in front of all the
+		    # shlibs!
+		    lappend new_options "early_flags=-Wl,--no-as-needed"
+		}
             }
 	} elseif { $opt == "shlib_load" } {
 	    set shlib_load 1
@@ -2987,16 +3456,13 @@ proc gdb_compile {source dest type optio
         }
     }
 
-    # We typically link to shared libraries using an absolute path, and
-    # that's how they are found at runtime.  If we are going to
-    # dynamically load one by basename, we must specify rpath.  If we
-    # are using a remote host, DejaGNU will link to the shared library
-    # using a relative path, so again we must specify an rpath.
-    if { $shlib_load || ($shlib_found && [is_remote target]) } {
+    # Because we link with libraries using their basename, we may need
+    # (depending on the platform) to set a special rpath value, to allow
+    # the executable to find the libraries it depends on.
+    if { $shlib_load || $shlib_found } {
 	if { ([istarget "*-*-mingw*"]
 	      || [istarget *-*-cygwin*]
-	      || [istarget *-*-pe*]
-	      || [istarget hppa*-*-hpux*])} {
+	      || [istarget *-*-pe*]) } {
 	    # Do not need anything.
 	} elseif { [istarget *-*-freebsd*] || [istarget *-*-openbsd*] } {
 	    lappend new_options "ldflags=-Wl,-rpath,${outdir}"
@@ -3137,7 +3603,7 @@ proc gdb_compile_pthreads {source dest t
         }
     }
     if {!$built_binfile} {
-	unsupported "Couldn't compile [file tail $source]: ${why_msg}"
+	unsupported "couldn't compile [file tail $source]: ${why_msg}"
         return -1
     }
 }
@@ -3174,15 +3640,11 @@ proc gdb_compile_shlib {sources dest opt
                 lappend obj_options "additional_flags=-fpic"
             }
         }
+        "icc-*" {
+                lappend obj_options "additional_flags=-fpic"
+        }
         default {
-            switch -glob [istarget] {
-                "hppa*-hp-hpux*" {
-                    lappend obj_options "additional_flags=+z"
-                }
-                default {
-                    # don't know what the compiler is...
-                }
-            }
+	    # don't know what the compiler is...
         }
     }
 
@@ -3196,49 +3658,48 @@ proc gdb_compile_shlib {sources dest opt
        lappend objects ${outdir}/${sourcebase}.o
     }
 
-    if [istarget "hppa*-*-hpux*"] {
-       remote_exec build "ld -b ${objects} -o ${dest}"
+    set link_options $options
+    if [test_compiler_info "xlc-*"] {
+	lappend link_options "additional_flags=-qmkshrobj"
     } else {
-       set link_options $options
-       if [test_compiler_info "xlc-*"] {
-          lappend link_options "additional_flags=-qmkshrobj"
-       } else {
-          lappend link_options "additional_flags=-shared"
-
-	   if { ([istarget "*-*-mingw*"]
-		 || [istarget *-*-cygwin*]
-		 || [istarget *-*-pe*]) } {
-	       if { [is_remote host] } {
-		   set name [file tail ${dest}]
-	       } else {
-		   set name ${dest}
-	       }
-	       lappend link_options "additional_flags=-Wl,--out-implib,${name}.a"
-	   } elseif [is_remote target] {
-	     # By default, we do not set the soname.  This causes the linker
-	     # on ELF systems to create a DT_NEEDED entry in the executable
-	     # refering to the full path name of the library.  This is a
-	     # problem in remote testing if the library is in a different
-	     # directory there.  To fix this, we set a soname of just the
-	     # base filename for the library, and add an appropriate -rpath
-	     # to the main executable (in gdb_compile).
-             set destbase [file tail $dest]
-             lappend link_options "additional_flags=-Wl,-soname,$destbase"
-           }
-       }
-       if {[gdb_compile "${objects}" "${dest}" executable $link_options] != ""} {
-           return -1
-       }
-	if { [is_remote host]
-	     && ([istarget "*-*-mingw*"]
-		 || [istarget *-*-cygwin*]
-		 || [istarget *-*-pe*]) } {
-	    set dest_tail_name [file tail ${dest}]
-	    remote_upload host $dest_tail_name.a ${dest}.a
-	    remote_file host delete $dest_tail_name.a
+	lappend link_options "additional_flags=-shared"
+
+	if { ([istarget "*-*-mingw*"]
+	      || [istarget *-*-cygwin*]
+	      || [istarget *-*-pe*]) } {
+	    if { [is_remote host] } {
+		set name [file tail ${dest}]
+	    } else {
+		set name ${dest}
+	    }
+	    lappend link_options "additional_flags=-Wl,--out-implib,${name}.a"
+	} else {
+	    # Set the soname of the library.  This causes the linker on ELF
+	    # systems to create the DT_NEEDED entry in the executable referring
+	    # to the soname of the library, and not its absolute path.  This
+	    # (using the absolute path) would be problem when testing on a
+	    # remote target.
+	    #
+	    # In conjunction with setting the soname, we add the special
+	    # rpath=$ORIGIN value when building the executable, so that it's
+	    # able to find the library in its own directory.
+	    set destbase [file tail $dest]
+	    lappend link_options "additional_flags=-Wl,-soname,$destbase"
 	}
     }
-  return ""
+    if {[gdb_compile "${objects}" "${dest}" executable $link_options] != ""} {
+	return -1
+    }
+    if { [is_remote host]
+	 && ([istarget "*-*-mingw*"]
+	     || [istarget *-*-cygwin*]
+	     || [istarget *-*-pe*]) } {
+	set dest_tail_name [file tail ${dest}]
+	remote_upload host $dest_tail_name.a ${dest}.a
+	remote_file host delete $dest_tail_name.a
+    }
+
+    return ""
 }
 
 # This is just like gdb_compile_shlib, above, except that it tries compiling
@@ -3271,7 +3732,7 @@ proc gdb_compile_shlib_pthreads {sources
         }
     }
     if {!$built_binfile} {
-        unsupported "Couldn't compile $sources: ${why_msg}"
+        unsupported "couldn't compile $sources: ${why_msg}"
         return -1
     }
 }
@@ -3311,7 +3772,7 @@ proc gdb_compile_objc {source dest type 
         }
     }
     if {!$built_binfile} {
-        unsupported "Couldn't compile [file tail $source]: ${why_msg}"
+        unsupported "couldn't compile [file tail $source]: ${why_msg}"
         return -1
     }
 }
@@ -3566,7 +4027,9 @@ proc gdb_exit { } {
 # it.
 
 proc can_spawn_for_attach { } {
-    # We use TCL's exec to get the inferior's pid.
+    # We use exp_pid to get the inferior's pid, assuming that gives
+    # back the pid of the program.  On remote boards, that would give
+    # us instead the PID of e.g., the ssh client, etc.
     if [is_remote target] then {
 	return 0
     }
@@ -3582,12 +4045,50 @@ proc can_spawn_for_attach { } {
     return 1
 }
 
+# Kill a progress previously started with spawn_wait_for_attach, and
+# reap its wait status.  PROC_SPAWN_ID is the spawn id associated with
+# the process.
+
+proc kill_wait_spawned_process { proc_spawn_id } {
+    set pid [exp_pid -i $proc_spawn_id]
+
+    verbose -log "killing ${pid}"
+    remote_exec build "kill -9 ${pid}"
+
+    verbose -log "closing ${proc_spawn_id}"
+    catch "close -i $proc_spawn_id"
+    verbose -log "waiting for ${proc_spawn_id}"
+
+    # If somehow GDB ends up still attached to the process here, a
+    # blocking wait hangs until gdb is killed (or until gdb / the
+    # ptracer reaps the exit status too, but that won't happen because
+    # something went wrong.)  Passing -nowait makes expect tell Tcl to
+    # wait for the PID in the background.  That's fine because we
+    # don't care about the exit status.  */
+    wait -nowait -i $proc_spawn_id
+}
+
+# Returns the process id corresponding to the given spawn id.
+
+proc spawn_id_get_pid { spawn_id } {
+    set testpid [exp_pid -i $spawn_id]
+
+    if { [istarget "*-*-cygwin*"] } {
+	# testpid is the Cygwin PID, GDB uses the Windows PID, which
+	# might be different due to the way fork/exec works.
+	set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+    }
+
+    return $testpid
+}
+
 # Start a set of programs running and then wait for a bit, to be sure
-# that they can be attached to.  Return a list of the processes' PIDs.
-# It's a test error to call this when [can_spawn_for_attach] is false.
+# that they can be attached to.  Return a list of processes spawn IDs,
+# one element for each process spawned.  It's a test error to call
+# this when [can_spawn_for_attach] is false.
 
 proc spawn_wait_for_attach { executable_list } {
-    set pid_list {}
+    set spawn_id_list {}
 
     if ![can_spawn_for_attach] {
 	# The caller should have checked can_spawn_for_attach itself
@@ -3596,22 +4097,16 @@ proc spawn_wait_for_attach { executable_
     }
 
     foreach {executable} $executable_list {
-	lappend pid_list [eval exec $executable &]
+	# Note we use Expect's spawn, not Tcl's exec, because with
+	# spawn we control when to wait for/reap the process.  That
+	# allows killing the process by PID without being subject to
+	# pid-reuse races.
+	lappend spawn_id_list [remote_spawn target $executable]
     }
 
     sleep 2
 
-    if { [istarget "*-*-cygwin*"] } {
-	for {set i 0} {$i < [llength $pid_list]} {incr i} {
-	    # testpid is the Cygwin PID, GDB uses the Windows PID,
-	    # which might be different due to the way fork/exec works.
-	    set testpid [lindex $pid_list $i]
-	    set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
-	    set pid_list [lreplace $pid_list $i $i $testpid]
-	}
-    }
-
-    return $pid_list
+    return $spawn_id_list
 }
 
 #
@@ -3778,52 +4273,67 @@ proc gdb_touch_execfile { binfile } {
     }
 }
 
-# Like remote_download but provides a gdb-specific behavior.  If DEST
-# is "host", and the host is not remote, and TOFILE is not specified,
-# then the [file tail] of FROMFILE is passed through
-# standard_output_file to compute the destination.
+# Like remote_download but provides a gdb-specific behavior.
+#
+# If the destination board is remote, the local file FROMFILE is transferred as
+# usual with remote_download to TOFILE on the remote board.  The destination
+# filename is added to the CLEANFILES global, so it can be cleaned up at the
+# end of the test.
+#
+# If the destination board is local, the destination path TOFILE is passed
+# through standard_output_file, and FROMFILE is copied there.
+#
+# In both cases, if TOFILE is omitted, it defaults to the [file tail] of
+# FROMFILE.
 
 proc gdb_remote_download {dest fromfile {tofile {}}} {
-    if {$dest == "host" && ![is_remote host] && $tofile == ""} {
-	set tofile [standard_output_file [file tail $fromfile]]
+    # If TOFILE is not given, default to the same filename as FROMFILE.
+    if {[string length $tofile] == 0} {
+	set tofile [file tail $fromfile]
     }
 
-    if { $tofile == "" } {
-	return [remote_download $dest $fromfile]
+    if {[is_remote $dest]} {
+	# When the DEST is remote, we simply send the file to DEST.
+	global cleanfiles
+
+	set destname [remote_download $dest $fromfile $tofile]
+	lappend cleanfiles $destname
+
+	return $destname
     } else {
-	return [remote_download $dest $fromfile $tofile]
-    }
-}
+	# When the DEST is local, we copy the file to the test directory (where
+	# the executable is).
+	#
+	# Note that we pass TOFILE through standard_output_file, regardless of
+	# whether it is absolute or relative, because we don't want the tests
+	# to be able to write outside their standard output directory.
 
-# gdb_download
-#
-# Copy a file to the remote target and return its target filename.
-# Schedule the file to be deleted at the end of this test.
+	set tofile [standard_output_file $tofile]
 
-proc gdb_download { filename } {
-    global cleanfiles
+	file copy -force $fromfile $tofile
 
-    set destname [remote_download target $filename]
-    lappend cleanfiles $destname
-    return $destname
+	return $tofile
+    }
 }
 
-# gdb_load_shlibs LIB...
+# gdb_load_shlib LIB...
 #
-# Copy the listed libraries to the target.
+# Copy the listed library to the target.
 
-proc gdb_load_shlibs { args } {
-    if {![is_remote target]} {
-	return
-    }
+proc gdb_load_shlib { file } {
+    set dest [gdb_remote_download target [shlib_target_file $file]]
 
-    foreach file $args {
-	gdb_download [shlib_target_file $file]
+    if {[is_remote target]} {
+	# If the target is remote, we need to tell gdb where to find the
+	# libraries.
+	#
+	# We could set this even when not testing remotely, but a user
+	# generally won't set it unless necessary.  In order to make the tests
+	# more like the real-life scenarios, we don't set it for local testing.
+	gdb_test "set solib-search-path [file dirname $file]" "" ""
     }
 
-    # Even if the target supplies full paths for shared libraries,
-    # they may not be paths for this system.
-    gdb_test "set solib-search-path [file dirname [lindex $args 0]]" "" ""
+    return $dest
 }
 
 #
@@ -3899,32 +4409,47 @@ proc default_gdb_init { test_file_name }
     }
 }
 
+# Return a path using GDB_PARALLEL.
+# ARGS is a list of path elements to append to "$objdir/$GDB_PARALLEL".
+# GDB_PARALLEL must be defined, the caller must check.
+#
+# The default value for GDB_PARALLEL is, canonically, ".".
+# The catch is that tests don't expect an additional "./" in file paths so
+# omit any directory for the default case.
+# GDB_PARALLEL is written as "yes" for the default case in Makefile.in to mark
+# its special handling.
+
+proc make_gdb_parallel_path { args } {
+    global GDB_PARALLEL objdir
+    set joiner [list "file" "join" $objdir]
+    if { [info exists GDB_PARALLEL] && $GDB_PARALLEL != "yes" } {
+	lappend joiner $GDB_PARALLEL
+    }
+    set joiner [concat $joiner $args]
+    return [eval $joiner]
+}
+
 # Turn BASENAME into a full file name in the standard output
 # directory.  It is ok if BASENAME is the empty string; in this case
 # the directory is returned.
 
 proc standard_output_file {basename} {
-    global objdir subdir gdb_test_file_name GDB_PARALLEL
+    global objdir subdir gdb_test_file_name
 
-    if {[info exists GDB_PARALLEL]} {
-	set dir [file join $objdir outputs $subdir $gdb_test_file_name]
-	file mkdir $dir
-	return [file join $dir $basename]
-    } else {
-	return [file join $objdir $subdir $basename]
-    }
+    set dir [make_gdb_parallel_path outputs $subdir $gdb_test_file_name]
+    file mkdir $dir
+    return [file join $dir $basename]
 }
 
 # Return the name of a file in our standard temporary directory.
 
 proc standard_temp_file {basename} {
-    global objdir GDB_PARALLEL
-
-    if {[info exists GDB_PARALLEL]} {
-	return [file join $objdir temp $basename]
-    } else {
-	return $basename
-    }
+    # Since a particular runtest invocation is only executing a single test
+    # file at any given time, we can use the runtest pid to build the
+    # path of the temp directory.
+    set dir [make_gdb_parallel_path temp [pid]]
+    file mkdir $dir
+    return [file join $dir $basename]
 }
 
 # Set 'testfile', 'srcfile', and 'binfile'.
@@ -4386,14 +4911,102 @@ proc rerun_to_main {} {
   }
 }
 
-# Print a message and return true if a test should be skipped
-# due to lack of floating point suport.
+# Return true if a test should be skipped due to lack of floating
+# point support or GDB can't fetch the contents from floating point
+# registers.
 
-proc gdb_skip_float_test { msg } {
+gdb_caching_proc gdb_skip_float_test {
     if [target_info exists gdb,skip_float_tests] {
-	verbose "Skipping test '$msg': no float tests."
 	return 1
     }
+
+    # There is an ARM kernel ptrace bug that hardware VFP registers
+    # are not updated after GDB ptrace set VFP registers.  The bug
+    # was introduced by kernel commit 8130b9d7b9d858aa04ce67805e8951e3cb6e9b2f
+    # in 2012 and is fixed in e2dfb4b880146bfd4b6aa8e138c0205407cebbaf
+    # in May 2016.  In other words, kernels older than 4.6.3, 4.4.14,
+    # 4.1.27, 3.18.36, and 3.14.73 have this bug.
+    # This kernel bug is detected by check how does GDB change the
+    # program result by changing one VFP register.
+    if { [istarget "arm*-*-linux*"] } {
+
+	set compile_flags {debug nowarnings }
+
+	# Set up, compile, and execute a test program having VFP
+	# operations.
+	set src [standard_temp_file arm_vfp[pid].c]
+	set exe [standard_temp_file arm_vfp[pid].x]
+
+	gdb_produce_source $src {
+	    int main() {
+		double d = 4.0;
+		int ret;
+
+		asm ("vldr d0, [%0]" : : "r" (&d));
+		asm ("vldr d1, [%0]" : : "r" (&d));
+		asm (".global break_here\n"
+		     "break_here:");
+		asm ("vcmp.f64 d0, d1\n"
+		     "vmrs APSR_nzcv, fpscr\n"
+		     "bne L_value_different\n"
+		     "movs %0, #0\n"
+		     "b L_end\n"
+		     "L_value_different:\n"
+		     "movs %0, #1\n"
+		     "L_end:\n" : "=r" (ret) :);
+
+		/* Return $d0 != $d1.  */
+		return ret;
+	    }
+	}
+
+	verbose "compiling testfile $src" 2
+	set lines [gdb_compile $src $exe executable $compile_flags]
+	file delete $src
+
+	if ![string match "" $lines] then {
+	    verbose "testfile compilation failed, returning 1" 2
+	    return 0
+	}
+
+	# No error message, compilation succeeded so now run it via gdb.
+	# Run the test up to 5 times to detect whether ptrace can
+	# correctly update VFP registers or not.
+	set skip_vfp_test 0
+	for {set i 0} {$i < 5} {incr i} {
+	    global gdb_prompt srcdir subdir
+
+	    gdb_exit
+	    gdb_start
+	    gdb_reinitialize_dir $srcdir/$subdir
+	    gdb_load "$exe"
+
+	    runto_main
+	    gdb_test "break *break_here"
+	    gdb_continue_to_breakpoint "break_here"
+
+	    # Modify $d0 to a different value, so the exit code should
+	    # be 1.
+	    gdb_test "set \$d0 = 5.0"
+
+	    set test "continue to exit"
+	    gdb_test_multiple "continue" "$test" {
+		-re "exited with code 01.*$gdb_prompt $" {
+		}
+		-re "exited normally.*$gdb_prompt $" {
+		    # However, the exit code is 0.  That means something
+		    # wrong in setting VFP registers.
+		    set skip_vfp_test 1
+		    break
+		}
+	    }
+	}
+
+	gdb_exit
+	remote_file build delete $exe
+
+	return $skip_vfp_test
+    }
     return 0
 }
 
@@ -4417,9 +5030,14 @@ proc gdb_skip_bogus_test { msg } {
 # NOTE: This must be called while gdb is *not* running.
 
 gdb_caching_proc gdb_skip_xml_test {
+    global gdb_spawn_id
     global gdb_prompt
     global srcdir
 
+    if { [info exists gdb_spawn_id] } {
+        error "GDB must not be running in gdb_skip_xml_tests."
+    }
+
     set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"]
 
     gdb_start
@@ -4481,24 +5099,44 @@ gdb_caching_proc gdb_has_argv0 {
 	    }
 	}
 
+	set old_elements "200"
+	set test "show print elements"
+	gdb_test_multiple $test $test {
+	    -re "Limit on string chars or array elements to print is (\[^\r\n\]+)\\.\r\n$gdb_prompt $" {
+		set old_elements $expect_out(1,string)
+	    }
+	}
+	set old_repeats "200"
+	set test "show print repeats"
+	gdb_test_multiple $test $test {
+	    -re "Threshold for repeated print elements is (\[^\r\n\]+)\\.\r\n$gdb_prompt $" {
+		set old_repeats $expect_out(1,string)
+	    }
+	}
+	gdb_test_no_output "set print elements unlimited" ""
+	gdb_test_no_output "set print repeats unlimited" ""
+
+	set retval 0
 	# Check whether argc is 1.
 	gdb_test_multiple "p argc" "p argc" {
 	    -re " = 1\r\n${gdb_prompt} $" {
 
 		gdb_test_multiple "p argv\[0\]" "p argv\[0\]" {
 		    -re " = $hex \".*[file tail $exe]\"\r\n${gdb_prompt} $" {
-			return 1
+			set retval 1
 		    }
 		    -re "${gdb_prompt} $" {
-			return 0
 		    }
 		}
 	    }
 	    -re "${gdb_prompt} $" {
-		return 0
 	    }
 	}
-	return 0
+	
+	gdb_test_no_output "set print elements $old_elements" ""
+	gdb_test_no_output "set print repeats $old_repeats" ""
+
+	return $retval
     }
 
     set result [gdb_has_argv0_1 $exe]
@@ -4521,7 +5159,6 @@ gdb_caching_proc gdb_has_argv0 {
 	  || [istarget *-wince-pe] || [istarget *-*-mingw32ce*]
 	  || [istarget *-*-symbianelf*]
 	  || [istarget *-*-osf*]
-	  || [istarget *-*-hpux*]
 	  || [istarget *-*-dicos*]
 	  || [istarget *-*-nto*]
 	  || [istarget *-*-*vms*]
@@ -4781,6 +5418,16 @@ proc build_executable_from_specs {testna
 	    }
 	}
 	set ret [$func $sources_path "${binfile}" $options]
+    } elseif {[lsearch -exact $options rust] != -1} {
+	set sources_path {}
+	foreach {s local_options} $args {
+	    if { [regexp "^/" "$s"] } then {
+		lappend sources_path "$s"
+	    } else {
+		lappend sources_path "$srcdir/$subdir/$s"
+	    }
+	}
+	set ret [gdb_compile_rust $sources_path "${binfile}" $options]
     } else {
 	set objects {}
 	set i 0
@@ -4822,18 +5469,27 @@ proc build_executable { testname executa
     return [eval build_executable_from_specs $arglist]
 }
 
-# Starts fresh GDB binary and loads EXECUTABLE into GDB. EXECUTABLE is
-# the basename of the binary.
-# The return value is 0 for success, -1 for failure.
-proc clean_restart { executable } {
+# Starts fresh GDB binary and loads an optional executable into GDB.
+# Usage: clean_restart [executable]
+# EXECUTABLE is the basename of the binary.
+
+proc clean_restart { args } {
     global srcdir
     global subdir
-    set binfile [standard_output_file ${executable}]
+
+    if { [llength $args] > 1 } {
+	error "bad number of args: [llength $args]"
+    }
 
     gdb_exit
     gdb_start
     gdb_reinitialize_dir $srcdir/$subdir
-    return [gdb_load ${binfile}]
+
+    if { [llength $args] >= 1 } {
+	set executable [lindex $args 0]
+	set binfile [standard_output_file ${executable}]
+	gdb_load ${binfile}
+    }
 }
 
 # Prepares for testing by calling build_executable_full, then
@@ -4901,19 +5557,24 @@ proc get_integer_valueof { exp default }
     return ${val}
 }
 
-proc get_hexadecimal_valueof { exp default } {
+# Retrieve the value of EXP in the inferior, as an hexadecimal value
+# (using "print /x").  DEFAULT is used as fallback if print fails.
+# TEST is the test message to use.  If can be ommitted, in which case
+# a test message is built from EXP.
+
+proc get_hexadecimal_valueof { exp default {test ""} } {
     global gdb_prompt
-    send_gdb "print /x ${exp}\n"
-    set test "get hexadecimal valueof \"${exp}\""
-    gdb_expect {
+
+    if {$test == ""} {
+	set test "get hexadecimal valueof \"${exp}\""
+    }
+
+    set val ${default}
+    gdb_test_multiple "print /x ${exp}" $test {
 	-re "\\$\[0-9\]* = (0x\[0-9a-zA-Z\]+).*$gdb_prompt $" {
 	    set val $expect_out(1,string)
 	    pass "$test"
 	}
-	timeout {
-	    set val ${default}
-	    fail "$test (timeout)"
-	}
     }
     return ${val}
 }
@@ -4939,6 +5600,30 @@ proc get_target_charset { } {
     return "UTF-8"
 }
 
+# Get the address of VAR.
+
+proc get_var_address { var } {
+    global gdb_prompt hex
+
+    # Match output like:
+    # $1 = (int *) 0x0
+    # $5 = (int (*)()) 0
+    # $6 = (int (*)()) 0x24 <function_bar>
+
+    gdb_test_multiple "print &${var}" "get address of ${var}" {
+	-re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $"
+	{
+	    pass "get address of ${var}"
+	    if { $expect_out(1,string) == "0" } {
+		return "0x0"
+	    } else {
+		return $expect_out(1,string)
+	    }
+	}
+    }
+    return ""
+}
+
 # Get the current value for remotetimeout and return it.
 proc get_remotetimeout { } {
     global gdb_prompt
@@ -5037,7 +5722,10 @@ if {[info exists GDB_PARALLEL]} {
     if {[is_remote host]} {
 	unset GDB_PARALLEL
     } else {
-	file mkdir outputs temp cache
+	file mkdir \
+	    [make_gdb_parallel_path outputs] \
+	    [make_gdb_parallel_path temp] \
+	    [make_gdb_parallel_path cache]
     }
 }
 
@@ -5108,18 +5796,96 @@ proc core_find {binfile {deletefiles {}}
     return $destcore
 }
 
-# gdb_target_symbol_prefix_flags returns a string that can be added
-# to gdb_compile options to define SYMBOL_PREFIX macro value
-# symbol_prefix_flags returns a string that can be added
-# for targets that use underscore as symbol prefix.
-# TODO: find out automatically if the target needs this.
+# gdb_target_symbol_prefix compiles a test program and then examines
+# the output from objdump to determine the prefix (such as underscore)
+# for linker symbol prefixes.
+
+gdb_caching_proc gdb_target_symbol_prefix {
+    # Set up and compile a simple test program...
+    set src [standard_temp_file main[pid].c]
+    set exe [standard_temp_file main[pid].x]
+
+    gdb_produce_source $src {
+	int main() {
+	    return 0;
+	}
+    }
+
+    verbose "compiling testfile $src" 2
+    set compile_flags {debug nowarnings quiet}
+    set lines [gdb_compile $src $exe executable $compile_flags]
+
+    set prefix ""
+
+    if ![string match "" $lines] then {
+        verbose "gdb_target_symbol_prefix: testfile compilation failed, returning null prefix" 2
+    } else {
+	set objdump_program [gdb_find_objdump]
+	set result [catch "exec $objdump_program --syms $exe" output]
+
+	if { $result == 0 \
+	     && ![regexp -lineanchor \
+	          { ([^ a-zA-Z0-9]*)main$} $output dummy prefix] } {
+	    verbose "gdb_target_symbol_prefix: Could not find main in objdump output; returning null prefix" 2
+	}
+    }
+
+    file delete $src
+    file delete $exe
+
+    return $prefix
+}
+
+# gdb_target_symbol returns the provided symbol with the correct prefix
+# prepended.  (See gdb_target_symbol_prefix, above.)
+
+proc gdb_target_symbol { symbol } {
+  set prefix [gdb_target_symbol_prefix]
+  return "${prefix}${symbol}"
+}
+
+# gdb_target_symbol_prefix_flags_asm returns a string that can be
+# added to gdb_compile options to define the C-preprocessor macro
+# SYMBOL_PREFIX with a value that can be prepended to symbols
+# for targets which require a prefix, such as underscore.
+#
+# This version (_asm) defines the prefix without double quotes
+# surrounding the prefix.  It is used to define the macro
+# SYMBOL_PREFIX for assembly language files.  Another version, below,
+# is used for symbols in inline assembler in C/C++ files.
+# 
+# The lack of quotes in this version (_asm) makes it possible to
+# define supporting macros in the .S file.  (The version which
+# uses quotes for the prefix won't work for such files since it's
+# impossible to define a quote-stripping macro in C.)
+#
+# It's possible to use this version (_asm) for C/C++ source files too,
+# but a string is usually required in such files; providing a version
+# (no _asm) which encloses the prefix with double quotes makes it
+# somewhat easier to define the supporting macros in the test case.
+
+proc gdb_target_symbol_prefix_flags_asm {} {
+    set prefix [gdb_target_symbol_prefix]
+    if {$prefix ne ""} {
+	return "additional_flags=-DSYMBOL_PREFIX=$prefix"
+    } else {
+	return "";
+    }
+}
+
+# gdb_target_symbol_prefix_flags returns the same string as
+# gdb_target_symbol_prefix_flags_asm, above, but with the prefix
+# enclosed in double quotes if there is a prefix.
+#
+# See the comment for gdb_target_symbol_prefix_flags_asm for an
+# extended discussion.
 
 proc gdb_target_symbol_prefix_flags {} {
-    if { [istarget "i?86-*-cygwin*"] || [istarget "i?86-*-mingw*"]
-	 || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] } {
-	return "additional_flags=-DSYMBOL_PREFIX=\"_\""
+    set prefix [gdb_target_symbol_prefix]
+    if {$prefix ne ""} {
+	return "additional_flags=-DSYMBOL_PREFIX=\"$prefix\""
     } else {
-	return ""
+	return "";
     }
 }
 
@@ -5222,14 +5988,16 @@ proc parse_args { argset } {
     # number of items expected to be passed into the procedure...
 }
 
-# Capture the output of COMMAND in a string ignoring PREFIX; return that string.
+# Capture the output of COMMAND in a string ignoring PREFIX (a regexp);
+# return that string.
+
 proc capture_command_output { command prefix } {
     global gdb_prompt
     global expect_out
 
     set output_string ""
     gdb_test_multiple "$command" "capture_command_output for $command" {
-	-re "${command}\[\r\n\]+${prefix}(.*)\[\r\n\]+$gdb_prompt $" {
+	-re "[string_to_regexp ${command}]\[\r\n\]+${prefix}(.*)\[\r\n\]+$gdb_prompt $" {
 	    set output_string $expect_out(1,string)
 	}
     }
@@ -5247,5 +6015,14 @@ proc multi_line { args } {
     return [join $args "\r\n"]
 }
 
+# Similar to the above, but while multi_line is meant to be used to
+# match GDB output, this one is meant to be used to build strings to
+# send as GDB input.
+
+proc multi_line_input { args } {
+    return [join $args "\n"]
+}
+
+
 # Always load compatibility stuff.
 load_lib future.exp
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-guile.exp ./gdb/testsuite/lib/gdb-guile.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-guile.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/gdb-guile.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -116,7 +116,7 @@ proc gdb_install_guile_module { } {
 
 proc gdb_guile_runto_main { } {
     if ![runto_main] {
-	fail "Can't run to main"
+	fail "can't run to main"
 	return 0
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-python.exp ./gdb/testsuite/lib/gdb-python.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-python.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/gdb-python.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdbserver-support.exp ./gdb/testsuite/lib/gdbserver-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdbserver-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/gdbserver-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -141,6 +141,20 @@ proc skip_gdbserver_tests { } {
     return 1
   }
 
+    # If GDB is lack of XML support, and targets, like arm, have
+    # multiple target descriptions, GDB doesn't know which target
+    # description GDBserver uses, and may fail to parse 'g' packet
+    # after connection.
+    if { [gdb_skip_xml_test]
+	 && ([istarget "arm*-*-linux*"]
+	     || [istarget "mips*-*-linux*"]
+	     || [istarget "powerpc*-*-linux*"]
+	     || [istarget "s390*-*-linux*"]
+	     || [istarget "x86_64-*-linux*"]
+	     || [istarget "i\[34567\]86-*-linux*"]) } {
+	return 1
+    }
+
   return 0
 }
 
@@ -155,6 +169,10 @@ proc gdbserver_download_current_prog { }
     global gdbserver_server_exec
     global last_loaded_file
 
+    if { ![info exists last_loaded_file] } {
+	return ""
+    }
+
     set host_exec $last_loaded_file
 
     # If we already downloaded a file to the target, see if we can reuse it.
@@ -176,11 +194,7 @@ proc gdbserver_download_current_prog { }
     if { $reuse == 0 } {
 	set gdbserver_host_exec $host_exec
 	set gdbserver_host_mtime [file mtime $host_exec]
-	if [is_remote target] {
-	    set gdbserver_server_exec [gdb_download $host_exec]
-	} else {
-	    set gdbserver_server_exec $host_exec
-	}
+	set gdbserver_server_exec [gdb_remote_download target $host_exec]
     }
 
     return $gdbserver_server_exec
@@ -324,7 +338,7 @@ proc gdbserver_spawn { child_args } {
 # Close the GDBserver connection.
 
 proc close_gdbserver {} {
-    global server_spawn_id inferior_spawn_id
+    global server_spawn_id
 
     # We can't just call close, because if gdbserver is local then that means
     # that it will get a SIGHUP.  Doing it this way could also allow us to
@@ -340,23 +354,30 @@ proc close_gdbserver {} {
     catch "close -i $server_spawn_id"
     catch "wait -i $server_spawn_id"
     unset server_spawn_id
-    unset inferior_spawn_id
 }
 
-# Hook into GDB exit, and close GDBserver.
+# Hook into GDB exit, and close GDBserver.  We must load this
+# explicitly here, and rename the procedures we want to override.
+load_lib mi-support.exp
 
-if { [info procs gdbserver_gdb_exit] == "" } {
+if { [info procs gdbserver_orig_gdb_exit] == "" } {
     rename gdb_exit gdbserver_orig_gdb_exit
+    rename mi_gdb_exit gdbserver_orig_mi_gdb_exit
 }
-proc gdb_exit {} {
-    global gdb_spawn_id server_spawn_id inferior_spawn_id
+
+proc gdbserver_gdb_exit { is_mi } {
+    global gdb_spawn_id server_spawn_id
     global gdb_prompt
     global gdbserver_reconnect_p
 
     # Leave GDBserver running if we're exiting GDB in order to
     # reconnect to the same instance of GDBserver again.
     if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p} {
-	gdbserver_orig_gdb_exit
+	if { $is_mi } {
+	    gdbserver_orig_mi_gdb_exit
+	} else {
+	    gdbserver_orig_gdb_exit
+	}
 	return
     }
 
@@ -365,7 +386,12 @@ proc gdb_exit {} {
 	# but DejaGNU doesn't know that, so gdb_spawn_id isn't unset.
 	# Catch the exceptions.
 	catch {
-	    send_gdb "monitor exit\n";
+	    if { $is_mi } {
+		set monitor_exit "-interpreter-exec console \"monitor exit\""
+	    } else {
+		set monitor_exit "monitor exit"
+	    }
+	    send_gdb "$monitor_exit\n";
 	    # We use expect rather than gdb_expect because
 	    # we want to suppress printing exception messages, otherwise,
 	    # remote_expect, invoked by gdb_expect, prints the exceptions.
@@ -376,14 +402,25 @@ proc gdb_exit {} {
 		-i "$server_spawn_id" eof {
 		    wait -i $expect_out(spawn_id)
 		    unset server_spawn_id
-		    unset inferior_spawn_id
 		}
 	    }
 	}
     }
     close_gdbserver
 
-    gdbserver_orig_gdb_exit
+    if { $is_mi } {
+	gdbserver_orig_mi_gdb_exit
+    } else {
+	gdbserver_orig_gdb_exit
+    }
+}
+
+proc gdb_exit {} {
+    gdbserver_gdb_exit 0
+}
+
+proc mi_gdb_exit {} {
+    gdbserver_gdb_exit 1
 }
 
 # Start a gdbserver process running HOST_EXEC and pass CHILD_ARGS
@@ -434,15 +471,21 @@ proc gdbserver_reconnect { } {
     return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
 }
 
-# Start and connect to a gdbserver in extended mode.  Note this frobs
-# $gdbserver_protocol, so should be used only from a board that
-# usually connects in target remote mode.
-proc gdbserver_start_extended { } {
+# Start gdbserver in extended mode with OPTIONS and connect to it.  Note
+# this frobs $gdbserver_protocol, so should be used only from a board
+# that usually connects in target remote mode.
+proc gdbserver_start_extended { {options ""} } {
     global gdbserver_protocol
     global gdbserver_gdbport
     global use_gdb_stub
 
-    if { [catch { gdbserver_start "--multi" "" } res] == 1 } {
+    set gdbserver_options "--multi"
+
+    if { $options != "" } {
+	append gdbserver_options " $options"
+    }
+
+    if { [catch { gdbserver_start $gdbserver_options "" } res] == 1 } {
 	perror $res
 	return 2
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-utils.exp ./gdb/testsuite/lib/gdb-utils.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gdb-utils.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/gdb-utils.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gen-perf-test.exp ./gdb/testsuite/lib/gen-perf-test.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/gen-perf-test.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/lib/gen-perf-test.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,1509 @@
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Notes:
+# 1) This follows a Python convention for marking internal vs public functions.
+# Internal functions are prefixed with "_".
+
+# A simple testcase generator.
+#
+# Usage Notes:
+#
+# 1) The length of each parameter list must either be one, in which case the
+# same value is used for each run, or the length must match all other
+# parameters of length greater than one.
+#
+# 2) Values for parameters that vary across runs must appear in increasing
+# order.  E.g. nr_gen_shlibs = { 0 1 10 } is good, { 1 0 10 } is bad.
+# This rule simplifies the code a bit, without being onerous on the user:
+#  a) Report generation doesn't have to sort the output by run, it'll already
+#  be sorted.
+#  b) In the static object file case, the last run can be used used to generate
+#  all the source files.
+#
+# TODO:
+# 1) have functions call each other within an objfile and across
+#    objfiles to measure things like backtrace times
+# 2) enums
+#
+# Implementation Notes:
+#
+# 1) The implementation would be a bit simpler if we could assume Tcl 8.5.
+#    Then we could use a dictionary to record the testcase instead of an array.
+#    With the array we use here, there is only one copy of it and instead of
+#    passing its value we pass its name.  Yay Tcl.  An alternative is to just
+#    use a global variable.
+#
+# 2) Because these programs can be rather large, we try to avoid recompilation
+#    where we can.  We don't have a makefile: we could generate one but it's
+#    not clear that's simpler than our chosen mechanism which is to record
+#    sums of all the inputs, and detect if an input has changed that way.
+
+if ![info exists CAT_PROGRAM] {
+    set CAT_PROGRAM "/bin/cat"
+}
+
+# TODO(dje): Time md5sum vs sha1sum with our testcases.
+if ![info exists SHA1SUM_PROGRAM] {
+    set SHA1SUM_PROGRAM "/usr/bin/sha1sum"
+}
+
+namespace eval GenPerfTest {
+
+    # The default level of compilation parallelism we support.
+    set DEFAULT_PERF_TEST_COMPILE_PARALLELISM 10
+
+    # The language of the test.
+    set DEFAULT_LANGUAGE "c"
+
+    # Extra source files for the binary.
+    # This must at least include the file with main(),
+    # and each test must supply its own.
+    set DEFAULT_BINARY_EXTRA_SOURCES {}
+
+    # Header files used by generated files and extra sources.
+    set DEFAULT_BINARY_EXTRA_HEADERS {}
+
+    # Extra source files for each generated shlib.
+    # The compiler passes -DSHLIB=NNN which the source can use, for example,
+    # to define unique symbols for each shlib.
+    set DEFAULT_GEN_SHLIB_EXTRA_SOURCES {}
+
+    # Header files used by generated files and extra sources.
+    set DEFAULT_GEN_SHLIB_EXTRA_HEADERS {}
+
+    # Source files for a tail shlib, or empty if none.
+    # This library is loaded after all other shlibs (except any system shlibs
+    # like libstdc++).  It is useful for exercising issues that can appear
+    # with system shlibs, without having to cope with implementation details
+    # and bugs in system shlibs.  E.g., gcc pr 65669.
+    set DEFAULT_TAIL_SHLIB_SOURCES {}
+
+    # Header files for the tail shlib.
+    set DEFAULT_TAIL_SHLIB_HEADERS {}
+
+    # The number of shared libraries to create.
+    set DEFAULT_NR_GEN_SHLIBS 0
+
+    # The number of compunits in each objfile.
+    set DEFAULT_NR_COMPUNITS 1
+
+    # The number of public globals in each compunit.
+    set DEFAULT_NR_EXTERN_GLOBALS 1
+
+    # The number of static globals in each compunit.
+    set DEFAULT_NR_STATIC_GLOBALS 1
+
+    # The number of public functions in each compunit.
+    set DEFAULT_NR_EXTERN_FUNCTIONS 1
+
+    # The number of static functions in each compunit.
+    set DEFAULT_NR_STATIC_FUNCTIONS 1
+
+    # Class generation.
+    # This is only used if the selected language permits it.
+    # The class specs here are used for each compunit.
+    # Additional flexibility can be added as needed, but for now KISS.
+    #
+    # key/value list of:
+    # count: number of classes
+    #   Default: 1
+    # name: list of namespaces and class name prefix
+    #   E.g., { ns0 ns1 foo } -> ns0::ns1::foo_<cu#>_{0,1,...}
+    #   There is no default, this value must be specified.
+    # nr_members: number of members
+    #   Default: 0
+    # nr_static_members: number of static members
+    #   Default: 0
+    # nr_methods: number of methods
+    #   Default: 0
+    # nr_inline_methods: number of inline methods
+    #   Default: 0
+    # nr_static_methods: number of static methods
+    #   Default: 0
+    # nr_static_inline_methods: number of static inline methods
+    #   Default: 0
+    #
+    # E.g.,
+    # class foo {};
+    # namespace ns1 { class foo {}; }
+    # namespace ns2 { class bar {}; }
+    # would be represented as
+    # {
+    #   { count 1 name { foo } }
+    #   { count 1 name { ns1 foo } }
+    #   { count 1 name { ns2 bar } }
+    # }
+    # The actual generated class names will be
+    # cu_N_foo_0, ns1::cu_N_foo_0, ns2::cu_N_bar_0
+    # where "N" is the CU number.
+    #
+    # To keep things simple for now, all class definitions go in headers,
+    # one class per header, with non-inline method definitions going
+    # into corresponding source files.
+    set DEFAULT_CLASS_SPECS {}
+
+    # The default value for the "count" field of class_specs.
+    set DEFAULT_CLASS_COUNT 1
+
+    # The default number of members in each class.
+    set DEFAULT_CLASS_NR_MEMBERS 0
+
+    # The default number of static members in each class.
+    set DEFAULT_CLASS_NR_STATIC_MEMBERS 0
+
+    # The default number of methods in each class.
+    set DEFAULT_CLASS_NR_METHODS 0
+
+    # The default number of inline methods in each class.
+    set DEFAULT_CLASS_NR_INLINE_METHODS 0
+
+    # The default number of static methods in each class.
+    set DEFAULT_CLASS_NR_STATIC_METHODS 0
+
+    # The default number of static inline methods in each class.
+    set DEFAULT_CLASS_NR_STATIC_INLINE_METHODS 0
+
+    set header_suffixes(c) "h"
+    set header_suffixes(c++) "h"
+    set source_suffixes(c) "c"
+    set source_suffixes(c++) "cc"
+
+    # Generate .worker files that control building all the "pieces" of the
+    # testcase.  This doesn't include "main" or any test-specific stuff.
+    # This mostly consists of the "bulk" (aka "crap" :-)) of the testcase to
+    # give gdb something meaty to chew on.
+    # The result is 0 for success, -1 for failure.
+    #
+    # Benchmarks generated by some of the tests are big.  I mean really big.
+    # And it's a pain to build one piece at a time, we need a parallel build.
+    # To achieve this, given the framework we're working with, we need to
+    # generate arguments to pass to a parallel make.  This is done by
+    # generating several files and then passing the file names to the parallel
+    # make.  All of the needed info is contained in the file name, so we could
+    # do this differently, but this is pretty simple and flexible.
+
+    proc gen_worker_files { test_description_exp } {
+	global objdir PERF_TEST_COMPILE_PARALLELISM
+
+	if { [file tail $test_description_exp] != $test_description_exp } {
+	    error "test description file contains directory name"
+	}
+
+	set program_name [file rootname $test_description_exp]
+	set workers_dir "$objdir/gdb.perf/workers/$program_name"
+	file mkdir $workers_dir
+
+	set nr_workers $PERF_TEST_COMPILE_PARALLELISM
+	verbose -log "gen_worker_files: $test_description_exp $nr_workers workers"
+
+	for { set i 0 } { $i < $nr_workers } { incr i } {
+	    set file_name "${workers_dir}/${program_name}-${i}.worker"
+	    verbose -log "gen_worker_files: Generating $file_name"
+	    set f [open $file_name "w"]
+	    puts $f "# DO NOT EDIT, machine generated file."
+	    puts $f "# See perftest.exp:GenPerfTest::gen_worker_files."
+	    close $f
+	}
+
+	return 0
+    }
+
+    # Load a perftest description.
+    # Test descriptions are used to build the input files (binary + shlibs)
+    # of one or more performance tests.
+
+    proc load_test_description { basename } {
+	global srcdir
+
+	if { [file tail $basename] != $basename } {
+	    error "test description file contains directory name"
+	}
+
+	verbose -log "load_file $srcdir/gdb.perf/$basename"
+	if { [load_file $srcdir/gdb.perf/$basename] == 0 } {
+	    error "Unable to load test description $basename"
+	}
+    }
+
+    # Create a testcase object for test NAME.
+    # The caller must call this as:
+    # array set my_test [GenPerfTest::init_testcase $name]
+
+    proc init_testcase { name } {
+	set testcase(name) $name
+	set testcase(language) $GenPerfTest::DEFAULT_LANGUAGE
+	set testcase(run_names) [list $name]
+	set testcase(binary_extra_sources) $GenPerfTest::DEFAULT_BINARY_EXTRA_SOURCES
+	set testcase(binary_extra_headers) $GenPerfTest::DEFAULT_BINARY_EXTRA_HEADERS
+	set testcase(gen_shlib_extra_sources) $GenPerfTest::DEFAULT_GEN_SHLIB_EXTRA_SOURCES
+	set testcase(gen_shlib_extra_headers) $GenPerfTest::DEFAULT_GEN_SHLIB_EXTRA_HEADERS
+	set testcase(tail_shlib_sources) $GenPerfTest::DEFAULT_TAIL_SHLIB_SOURCES
+	set testcase(tail_shlib_headers) $GenPerfTest::DEFAULT_TAIL_SHLIB_HEADERS
+	set testcase(nr_gen_shlibs) $GenPerfTest::DEFAULT_NR_GEN_SHLIBS
+	set testcase(nr_compunits) $GenPerfTest::DEFAULT_NR_COMPUNITS
+
+	set testcase(nr_extern_globals) $GenPerfTest::DEFAULT_NR_EXTERN_GLOBALS
+	set testcase(nr_static_globals) $GenPerfTest::DEFAULT_NR_STATIC_GLOBALS
+	set testcase(nr_extern_functions) $GenPerfTest::DEFAULT_NR_EXTERN_FUNCTIONS
+	set testcase(nr_static_functions) $GenPerfTest::DEFAULT_NR_STATIC_FUNCTIONS
+
+	set testcase(class_specs) $GenPerfTest::DEFAULT_CLASS_SPECS
+
+	# The location of this file drives the location of all other files.
+	# The choice is derived from standard_output_file.  We don't use it
+	# because of the parallel build support, we want each worker's log/sum
+	# files to go in different directories, but we don't want their output
+	# to go in different directories.
+	# N.B. The value here must be kept in sync with Makefile.in.
+	global objdir
+	set name_no_spaces [_convert_spaces $name]
+	set testcase(binfile) "$objdir/gdb.perf/outputs/$name_no_spaces/$name_no_spaces"
+
+	return [array get testcase]
+    }
+
+    proc _verify_parameter_lengths { self_var } {
+	upvar 1 $self_var self
+	set params {
+	    binary_extra_sources binary_extra_headers
+	    gen_shlib_extra_sources gen_shlib_extra_headers
+	    tail_shlib_sources tail_shlib_headers
+	    nr_gen_shlibs nr_compunits
+	    nr_extern_globals nr_static_globals
+	    nr_extern_functions nr_static_functions
+	    class_specs
+	}
+	set nr_runs [llength $self(run_names)]
+	foreach p $params {
+	    set n [llength $self($p)]
+	    if { $n > 1 } {
+		if { $n != $nr_runs } {
+		    error "Bad number of values for parameter $p"
+		}
+		set values $self($p)
+		for { set i 0 } { $i < $n - 1 } { incr i } {
+		    if { [lindex $values $i] > [lindex $values [expr $i + 1]] } {
+			error "Values of parameter $p are not increasing"
+		    }
+		}
+	    }
+	}
+    }
+
+    # Verify the class_specs parameter.
+
+    proc _verify_class_specs { self_var } {
+	upvar 1 $self_var self
+	set nr_runs [llength $self(run_names)]
+	for { set run_nr 0 } { $run_nr < $nr_runs } { incr run_nr } {
+	    set class_specs [_get_param $self(class_specs) $run_nr]
+	    foreach { spec } $class_specs {
+		if { [llength $spec] % 2 != 0 } {
+		    error "Uneven number of values in class spec: $spec"
+		}
+		foreach { key value } $spec {
+		    switch -exact -- $key {
+			name { }
+			count -
+			nr_members - nr_static_members -
+			nr_methods - nr_static_methods -
+			nr_inline_methods - nr_static_inline_methods
+			{
+			    if ![string is integer $value] {
+				error "Non-integer value $value for key $key in class_specs: $class_specs"
+			    }
+			}
+			default {
+			    error "Unrecognized key $key in class_specs: $class_specs"
+			}
+		    }
+		}
+	    }
+	}
+    }
+
+    # Verify the testcase is valid (as best we can, this isn't exhaustive).
+
+    proc _verify_testcase { self_var } {
+	upvar 1 $self_var self
+	_verify_parameter_lengths self
+	_verify_class_specs self
+
+	# Each test must supply its own main().  We don't check for main here,
+	# but we do verify the test supplied something.
+	if { [llength $self(binary_extra_sources)] == 0 } {
+	    error "Missing value for binary_extra_sources"
+	}
+    }
+
+    # Return the value of parameter PARAM for run RUN_NR.
+
+    proc _get_param { param run_nr } {
+	if { [llength $param] == 1 } {
+	    # Since PARAM may be a list of lists we need to use lindex.  This
+	    # also works for scalars (scalars are degenerate lists).
+	    return [lindex $param 0]
+	}
+	return [lindex $param $run_nr]
+    }
+
+    # Return non-zero if all files (binaries + shlibs) can be compiled from
+    # one set of object files.  This is a simple optimization to speed up
+    # test build times.  This happens if the only variation among runs is
+    # nr_gen_shlibs or nr_compunits.
+
+    proc _static_object_files_p { self_var } {
+	upvar 1 $self_var self
+	# These values are either scalars, or can vary across runs but don't
+	# affect whether we can share the generated object objects between
+	# runs.
+	set static_object_file_params {
+	    name language run_names nr_gen_shlibs nr_compunits
+	    binary_extra_sources gen_shlib_extra_sources tail_shlib_sources
+	}
+	foreach name [array names self] {
+	    if { [lsearch $static_object_file_params $name] < 0 } {
+		# name is not in static_object_file_params.
+		if { [llength $self($name)] > 1 } {
+		    # The user could provide a list that is all the same value,
+		    # so check for that.
+		    set first_value [lindex $self($name) 0]
+		    foreach elm [lrange $self($name) 1 end] {
+			if { $elm != $first_value } {
+			    return 0
+			}
+		    }
+		}
+	    }
+	}
+	return 1
+    }
+
+    # Return non-zero if classes are enabled.
+
+    proc _classes_enabled_p { self_var run_nr } {
+	upvar 1 $self_var self
+	set class_specs [_get_param $self(class_specs) $run_nr]
+	return [expr [llength $class_specs] > 0]
+    }
+
+    # Spaces in file names are a pain, remove them.
+    # They appear if the user puts spaces in the test name or run name.
+
+    proc _convert_spaces { file_name } {
+	return [regsub -all " " $file_name "-"]
+    }
+
+    # Return the compilation flags for the test.
+
+    proc _compile_options { self_var } {
+	upvar 1 $self_var self
+	set result {debug}
+	switch $self(language) {
+	    c++ {
+		lappend result "c++"
+	    }
+	}
+	return $result
+    }
+
+    # Return the path to put source/object files in for run number RUN_NR.
+
+    proc _make_object_dir_name { self_var static run_nr } {
+	upvar 1 $self_var self
+	# Note: The output directory already includes the name of the test
+	# description file.
+	set bindir [file dirname $self(binfile)]
+	# Put the pieces in a subdirectory, there are a lot of them.
+	if $static {
+	    return "$bindir/pieces"
+	} else {
+	    set run_name [_convert_spaces [lindex $self(run_names) $run_nr]]
+	    return "$bindir/pieces/$run_name"
+	}
+    }
+
+    # RUN_NR is ignored if STATIC is non-zero.
+    # SO_NR is the shlib number or "" for the binary.
+    # CU_NR is either the compilation unit number or "main".
+
+    proc _make_header_basename { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set header_suffix $GenPerfTest::header_suffixes($self(language))
+	if { !$static } {
+	    set run_name [_get_param $self(run_names) $run_nr]
+	    if { "$so_nr" != "" } {
+		set header_name "${run_name}-lib${so_nr}-cu${cu_nr}.$header_suffix"
+	    } else {
+		set header_name "${run_name}-cu${cu_nr}.$header_suffix"
+	    }
+	} else {
+	    if { "$so_nr" != "" } {
+		set header_name "lib${so_nr}-cu${cu_nr}.$header_suffix"
+	    } else {
+		set header_name "cu${cu_nr}.$header_suffix"
+	    }
+	}
+	return "[_convert_spaces $header_name]"
+    }
+
+    # RUN_NR is ignored if STATIC is non-zero.
+    # SO_NR is the shlib number or "" for the binary.
+    # CU_NR is either the compilation unit number or "main".
+
+    proc _make_header_name { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set header_name [_make_header_basename self $static $run_nr $so_nr $cu_nr]
+	return "[_make_object_dir_name self $static $run_nr]/$header_name"
+    }
+
+    # RUN_NR is ignored if STATIC is non-zero.
+    # SO_NR is the shlib number or "" for the binary.
+    # CU_NR is either the compilation unit number or "main".
+
+    proc _make_source_basename { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set source_suffix $GenPerfTest::source_suffixes($self(language))
+	if { !$static } {
+	    set run_name [_get_param $self(run_names) $run_nr]
+	    if { "$so_nr" != "" } {
+		set source_name "${run_name}-lib${so_nr}-cu${cu_nr}.$source_suffix"
+	    } else {
+		set source_name "${run_name}-cu${cu_nr}.$source_suffix"
+	    }
+	} else {
+	    if { "$so_nr" != "" } {
+		set source_name "lib${so_nr}-cu${cu_nr}.$source_suffix"
+	    } else {
+		set source_name "cu${cu_nr}.$source_suffix"
+	    }
+	}
+	return "[_convert_spaces $source_name]"
+    }
+
+    # RUN_NR is ignored if STATIC is non-zero.
+    # SO_NR is the shlib number or "" for the binary.
+    # CU_NR is either the compilation unit number or "main".
+
+    proc _make_source_name { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set source_name [_make_source_basename self $static $run_nr $so_nr $cu_nr]
+	return "[_make_object_dir_name self $static $run_nr]/$source_name"
+    }
+
+    # Generated object files get put in the same directory as their source.
+    # WARNING: This means that we can't do parallel compiles from the same
+    # source file, they have to have different names.
+
+    proc _make_binary_object_name { self_var static run_nr cu_nr } {
+	upvar 1 $self_var self
+	set source_name [_make_source_name self $static $run_nr "" $cu_nr]
+	return [file rootname $source_name].o
+    }
+
+    # Return the list of source/object files for the binary.
+    # This is the source files specified in test param binary_extra_sources as
+    # well as the names of all the object file "pieces".
+    # STATIC is the value of _static_object_files_p for the test.
+
+    proc _make_binary_input_file_names { self_var static run_nr } {
+	upvar 1 $self_var self
+	global srcdir subdir
+	set nr_compunits [_get_param $self(nr_compunits) $run_nr]
+	set result {}
+	foreach source [_get_param $self(binary_extra_sources) $run_nr] {
+	    lappend result "$srcdir/$subdir/$source"
+	}
+	for { set cu_nr 0 } { $cu_nr < $nr_compunits } { incr cu_nr } {
+	    lappend result [_make_binary_object_name self $static $run_nr $cu_nr]
+	}
+	return $result
+    }
+
+    proc _make_binary_name { self_var run_nr } {
+	upvar 1 $self_var self
+	set run_name [_get_param $self(run_names) $run_nr]
+	set exe_name "$self(binfile)-[_convert_spaces ${run_name}]"
+	return $exe_name
+    }
+
+    # SO_NAME is either a shlib number or "tail".
+
+    proc _make_shlib_name { self_var static run_nr so_name } {
+	upvar 1 $self_var self
+	if { !$static } {
+	    set run_name [_get_param $self(run_names) $run_nr]
+	    set lib_name "$self(name)-${run_name}-lib${so_name}.so"
+	} else {
+	    set lib_name "$self(name)-lib${so_name}.so"
+	}
+	set output_dir [file dirname $self(binfile)]
+	return "[_make_object_dir_name self $static $run_nr]/[_convert_spaces $lib_name]"
+    }
+
+    proc _create_file { self_var path } {
+	upvar 1 $self_var self
+	verbose -log "Creating file: $path"
+	set f [open $path "w"]
+	return $f
+    }
+
+    proc _write_intro { self_var f } {
+	upvar 1 $self_var self
+	puts $f "// DO NOT EDIT, machine generated file."
+	puts $f "// See perftest.exp:GenPerfTest."
+    }
+
+    proc _write_includes { self_var f includes } {
+	upvar 1 $self_var self
+	if { [llength $includes] > 0 } {
+	    puts $f ""
+	}
+	foreach i $includes {
+	    switch -glob -- $i {
+		"<*>" {
+		    puts $f "#include $i"
+		}
+		default {
+		    puts $f "#include \"$i\""
+		}
+	    }
+	}
+    }
+
+    proc _make_header_macro { name c } {
+	return [string toupper "${name}_${c}"]
+    }
+
+    proc _write_static_globals { self_var f run_nr } {
+	upvar 1 $self_var self
+	puts $f ""
+	set nr_static_globals [_get_param $self(nr_static_globals) $run_nr]
+	# Rather than parameterize the number of const/non-const globals,
+	# and their types, we keep it simple for now.	Even the number of
+	# bss/non-bss globals may be useful; later, if warranted.
+	for { set i 0 } { $i < $nr_static_globals } { incr i } {
+	    if { $i % 2 == 0 } {
+		set const "const "
+	    } else {
+		set const ""
+	    }
+	    puts $f "static ${const}int static_global_$i = $i;"
+	}
+    }
+
+    # ID is "" for the binary, and a unique symbol prefix for each SO.
+
+    proc _write_extern_globals { self_var f run_nr id cu_nr } {
+	upvar 1 $self_var self
+	puts $f ""
+	set nr_extern_globals [_get_param $self(nr_extern_globals) $run_nr]
+	# Rather than parameterize the number of const/non-const globals,
+	# and their types, we keep it simple for now.	Even the number of
+	# bss/non-bss globals may be useful; later, if warranted.
+	for { set i 0 } { $i < $nr_extern_globals } { incr i } {
+	    if { $i % 2 == 0 } {
+		set const "const "
+	    } else {
+		set const ""
+	    }
+	    puts $f "${const}int ${id}global_${cu_nr}_$i = $cu_nr * 1000 + $i;"
+	}
+    }
+
+    proc _write_static_functions { self_var f run_nr } {
+	upvar 1 $self_var self
+	set nr_static_functions [_get_param $self(nr_static_functions) $run_nr]
+	for { set i 0 } { $i < $nr_static_functions } { incr i } {
+	    puts $f ""
+	    puts $f "static void"
+	    puts $f "static_function_$i (void)"
+	    puts $f "{"
+	    puts $f "}"
+	}
+    }
+
+    # ID is "" for the binary, and a unique symbol prefix for each SO.
+
+    proc _write_extern_functions { self_var f run_nr id cu_nr } {
+	upvar 1 $self_var self
+	set nr_extern_functions [_get_param $self(nr_extern_functions) $run_nr]
+	for { set i 0 } { $i < $nr_extern_functions } { incr i } {
+	    puts $f ""
+	    puts $f "void"
+	    puts $f "${id}function_${cu_nr}_$i (void)"
+	    puts $f "{"
+	    puts $f "}"
+	}
+    }
+
+    proc _get_class_spec { spec name } {
+	foreach { key value } $spec {
+	    if { $key == $name } {
+		return $value
+	    }
+	}
+	switch $name {
+	    count {
+		return $GenPerfTest::DEFAULT_CLASS_COUNT
+	    }
+	    nr_members {
+		return $GenPerfTest::DEFAULT_CLASS_NR_MEMBERS
+	    }
+	    nr_static_members {
+		return $GenPerfTest::DEFAULT_CLASS_NR_STATIC_MEMBERS
+	    }
+	    nr_methods {
+		return $GenPerfTest::DEFAULT_CLASS_NR_METHODS
+	    }
+	    nr_inline_methods {
+		return $GenPerfTest::DEFAULT_CLASS_NR_INLINE_METHODS
+	    }
+	    nr_static_methods {
+		return $GenPerfTest::DEFAULT_CLASS_NR_STATIC_METHODS
+	    }
+	    nr_static_inline_methods {
+		return $GenPerfTest::DEFAULT_CLASS_NR_STATIC_INLINE_METHODS
+	    }
+	    default {
+		error "required class-spec not present: $name"
+	    }
+	}
+    }
+
+    # SO_NR is the shlib number or "" for the binary.
+    # CU_NR is either the compilation unit number or "main".
+    # NAME is the "name" field from the class spec, which is
+    # { ns0 ns1 ... nsN class_name }.
+    # C is the iteration number, from the "count" field from the class spec.
+
+    proc _make_class_name { so_nr cu_nr name c } {
+	set class_name [lindex $name [expr [llength $name] - 1]]
+	if { "$so_nr" != "" } {
+	    set prefix "shlib${so_nr}_"
+	} else {
+	    set prefix ""
+	}
+	return "${prefix}cu_${cu_nr}_${class_name}_${c}"
+    }
+
+    proc _make_namespace_name { name } {
+	if { "$name" == "anonymous" } {
+	    return ""
+	}
+	return $name
+    }
+
+    proc _write_class_definitions { self_var f static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set class_specs [_get_param $self(class_specs) $run_nr]
+	foreach spec $class_specs {
+	    set count [_get_class_spec $spec count]
+	    set name [_get_class_spec $spec name]
+	    set nr_members [_get_class_spec $spec nr_members]
+	    set nr_static_members [_get_class_spec $spec nr_static_members]
+	    set nr_methods [_get_class_spec $spec nr_methods]
+	    set nr_static_methods [_get_class_spec $spec nr_static_methods]
+	    set depth [expr [llength $name] - 1]
+	    for { set c 0 } { $c < $count } { incr c } {
+		puts $f ""
+		for { set i 0 } { $i < $depth } { incr i } {
+		    puts $f "namespace [_make_namespace_name [lindex $name $i]]"
+		    puts $f "\{"
+		    puts $f ""
+		}
+		set class_name [_make_class_name $so_nr $cu_nr $name $c]
+		puts $f "class $class_name"
+		puts $f "\{"
+		puts $f " public:"
+		for { set i 0 } { $i < $nr_members } { incr i } {
+		    puts $f "  int member_$i;"
+		}
+		for { set i 0 } { $i < $nr_static_members } { incr i } {
+		    # Rather than parameterize the number of const/non-const
+		    # members, and their types, we keep it simple for now.
+		    if { $i % 2 == 0 } {
+			puts $f "  static const int static_member_$i = $i;"
+		    } else {
+			puts $f "  static int static_member_$i;"
+		    }
+		}
+		for { set i 0 } { $i < $nr_methods } { incr i } {
+		    puts $f "  void method_$i (void);"
+		}
+		for { set i 0 } { $i < $nr_static_methods } { incr i } {
+		    puts $f "  static void static_method_$i (void);"
+		}
+		_write_inline_methods self $f $so_nr $cu_nr $spec $c
+		_write_static_inline_methods self $f $so_nr $cu_nr $spec $c
+		puts $f "\};"
+		for { set i [expr $depth - 1] } { $i >= 0 } { incr i -1 } {
+		    puts $f ""
+		    puts $f "\} // [lindex $name $i]"
+		}
+	    }
+	}
+    }
+
+    proc _write_inline_methods { self_var f so_nr cu_nr spec c } {
+	upvar 1 $self_var self
+	set name [_get_class_spec $spec name]
+	set nr_inline_methods [_get_class_spec $spec nr_inline_methods]
+	for { set i 0 } { $i < $nr_inline_methods } { incr i } {
+	    puts $f "  void inline_method_$i (void) { }"
+	}
+    }
+
+    proc _write_static_inline_methods { self_var f so_nr cu_nr spec c } {
+	upvar 1 $self_var self
+	set name [_get_class_spec $spec name]
+	set nr_static_inline_methods [_get_class_spec $spec nr_static_inline_methods]
+	for { set i 0 } { $i < $nr_static_inline_methods } { incr i } {
+	    puts $f "  static void static_inline_method_$i (void) { }"
+	}
+    }
+
+    proc _write_class_implementations { self_var f static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set class_specs [_get_param $self(class_specs) $run_nr]
+	foreach spec $class_specs {
+	    set count [_get_class_spec $spec count]
+	    set name [_get_class_spec $spec name]
+	    set depth [expr [llength $name] - 1]
+	    for { set c 0 } { $c < $count } { incr c } {
+		for { set i 0 } { $i < $depth } { incr i } {
+		    puts $f ""
+		    puts $f "namespace [_make_namespace_name [lindex $name $i]]"
+		    puts $f "\{"
+		}
+		_write_static_members self $f $so_nr $cu_nr $spec $c
+		_write_methods self $f $so_nr $cu_nr $spec $c
+		_write_static_methods self $f $so_nr $cu_nr $spec $c
+		for { set i [expr $depth - 1] } { $i >= 0 } { incr i -1 } {
+		    puts $f ""
+		    puts $f "\} // [lindex $name $i]"
+		}
+	    }
+	}
+    }
+
+    proc _write_static_members { self_var f so_nr cu_nr spec c } {
+	upvar 1 $self_var self
+	set name [_get_class_spec $spec name]
+	set nr_static_members [_get_class_spec $spec nr_static_members]
+	set class_name [_make_class_name $so_nr $cu_nr $name $c]
+	puts $f ""
+	# Rather than parameterize the number of const/non-const
+	# members, and their types, we keep it simple for now.
+	for { set i 0 } { $i < $nr_static_members } { incr i } {
+	    if { $i % 2 == 0 } {
+		# Static const members are initialized inline.
+	    } else {
+		puts $f "int ${class_name}::static_member_$i = $i;"
+	    }
+	}
+    }
+
+    proc _write_methods { self_var f so_nr cu_nr spec c } {
+	upvar 1 $self_var self
+	set name [_get_class_spec $spec name]
+	set nr_methods [_get_class_spec $spec nr_methods]
+	set class_name [_make_class_name $so_nr $cu_nr $name $c]
+	for { set i 0 } { $i < $nr_methods } { incr i } {
+	    puts $f ""
+	    puts $f "void"
+	    puts $f "${class_name}::method_$i (void)"
+	    puts $f "{"
+	    puts $f "}"
+	}
+    }
+
+    proc _write_static_methods { self_var f so_nr cu_nr spec c } {
+	upvar 1 $self_var self
+	set name [_get_class_spec $spec name]
+	set nr_static_methods [_get_class_spec $spec nr_static_methods]
+	set class_name [_make_class_name $so_nr $cu_nr $name $c]
+	for { set i 0 } { $i < $nr_static_methods } { incr i } {
+	    puts $f ""
+	    puts $f "void"
+	    puts $f "${class_name}::static_method_$i (void)"
+	    puts $f "{"
+	    puts $f "}"
+	}
+    }
+
+    proc _gen_compunit_header { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set header_file [_make_header_name self $static $run_nr $so_nr $cu_nr]
+	set f [_create_file self $header_file]
+	_write_intro self $f
+	set header_macro [_make_header_macro "HEADER_CU" $cu_nr]
+	puts $f ""
+	puts $f "#ifndef $header_macro"
+	puts $f "#define $header_macro"
+	if [_classes_enabled_p self $run_nr] {
+	    _write_class_definitions self $f $static $run_nr $so_nr $cu_nr
+	}
+	puts $f ""
+	puts $f "#endif // $header_macro"
+	close $f
+	return $header_file
+    }
+
+    proc _gen_binary_compunit_source { self_var static run_nr cu_nr } {
+	upvar 1 $self_var self
+	set source_file [_make_source_name self $static $run_nr "" $cu_nr]
+	set f [_create_file self $source_file]
+	_write_intro self $f
+	_write_includes self $f [_get_param $self(binary_extra_headers) $run_nr]
+	set header_file [_make_header_basename self $static $run_nr "" $cu_nr]
+	puts $f "#include \"$header_file\""
+	_write_static_globals self $f $run_nr
+	_write_extern_globals self $f $run_nr "" $cu_nr
+	_write_static_functions self $f $run_nr
+	_write_extern_functions self $f $run_nr "" $cu_nr
+	if [_classes_enabled_p self $run_nr] {
+	    _write_class_implementations self $f $static $run_nr "" $cu_nr
+	}
+	close $f
+	return $source_file
+    }
+
+    # Generate the sources for the pieces of the binary.
+    # The result is a list of source file names and accompanying object file
+    # names.  The pieces are split across workers.
+    # E.g., with 10 workers the result for worker 0 is
+    # { { source0 header0 object0 } { source10 header10 object10 } ... }
+
+    proc _gen_binary_source { self_var worker_nr static run_nr } {
+	upvar 1 $self_var self
+	verbose -log "GenPerfTest::_gen_binary_source worker $worker_nr run $run_nr, started [timestamp -format %c]"
+	set nr_compunits [_get_param $self(nr_compunits) $run_nr]
+	global PERF_TEST_COMPILE_PARALLELISM
+	set nr_workers $PERF_TEST_COMPILE_PARALLELISM
+	set result {}
+	for { set cu_nr $worker_nr } { $cu_nr < $nr_compunits } { incr cu_nr $nr_workers } {
+	    set header_file [_gen_compunit_header self $static $run_nr "" $cu_nr]
+	    set source_file [_gen_binary_compunit_source self $static $run_nr $cu_nr]
+	    set object_file [_make_binary_object_name self $static $run_nr $cu_nr]
+	    lappend result [list $source_file $header_file $object_file]
+	}
+	verbose -log "GenPerfTest::_gen_binary_source worker $worker_nr run $run_nr, done [timestamp -format %c]"
+	return $result
+    }
+
+    proc _gen_shlib_compunit_source { self_var static run_nr so_nr cu_nr } {
+	upvar 1 $self_var self
+	set source_file [_make_source_name self $static $run_nr $so_nr $cu_nr]
+	set f [_create_file self $source_file]
+	_write_intro self $f
+	_write_includes self $f [_get_param $self(gen_shlib_extra_headers) $run_nr]
+	set header_file [_make_header_basename self $static $run_nr $so_nr $cu_nr]
+	puts $f "#include \"$header_file\""
+	_write_static_globals self $f $run_nr
+	_write_extern_globals self $f $run_nr "shlib${so_nr}_" $cu_nr
+	_write_static_functions self $f $run_nr
+	_write_extern_functions self $f $run_nr "shlib${so_nr}_" $cu_nr
+	if [_classes_enabled_p self $run_nr] {
+	    _write_class_implementations self $f $static $run_nr $so_nr $cu_nr
+	}
+	close $f
+	return $source_file
+    }
+
+    # CU_NAME is a name from gen_shlib_extra_sources or tail_shlib_sources.
+
+    proc _make_shlib_common_source_name { self_var static run_nr so_nr cu_name } {
+	upvar 1 $self_var self
+	if { !$static } {
+	    set run_name [_get_param $self(run_names) $run_nr]
+	    set source_name "${run_name}-lib${so_nr}-${cu_name}"
+	} else {
+	    set source_name "lib${so_nr}-${cu_name}"
+	}
+	return "[_make_object_dir_name self $static $run_nr]/[_convert_spaces $source_name]"
+    }
+
+    # N.B. gdb_compile_shlib doesn't support parallel builds of shlibs from
+    # common sources: the .o file path will be the same across all shlibs.
+    # gen_shlib_extra_sources may be common across all shlibs but they're each
+    # compiled with -DSHLIB=$SHLIB so we need different .o files for each
+    # shlib, and therefore we need different source files for each shlib.
+    # If this turns out to be too cumbersome we can augment gdb_compile_shlib.
+
+    proc _gen_shlib_common_source { self_var static run_nr so_nr source_name } {
+	upvar 1 $self_var self
+	global srcdir
+	set source_file [_make_shlib_common_source_name self $static $run_nr $so_nr $source_name]
+	file copy -force "$srcdir/gdb.perf/$source_name" ${source_file}
+	return $source_file
+    }
+
+    # Generate the sources for a shared library.
+    # The result is a list of source and header file names.
+    # E.g., { { source0 source1 ... common0 ... } { header0 header1 ... } }
+
+    proc _gen_shlib_source { self_var static run_nr so_nr } {
+	upvar 1 $self_var self
+	verbose -log "GenPerfTest::_gen_shlib_source run $run_nr so $so_nr, started [timestamp -format %c]"
+	set headers {}
+	set sources {}
+	set nr_compunits [_get_param $self(nr_compunits) $run_nr]
+	for { set cu_nr 0 } { $cu_nr < $nr_compunits } { incr cu_nr } {
+	    lappend headers [_gen_compunit_header self $static $run_nr $so_nr $cu_nr]
+	    lappend sources [_gen_shlib_compunit_source self $static $run_nr $so_nr $cu_nr]
+	}
+	foreach source_name [_get_param $self(gen_shlib_extra_sources) $run_nr] {
+	    lappend sources [_gen_shlib_common_source self $static $run_nr $so_nr $source_name]
+	}
+	verbose -log "GenPerfTest::_gen_shlib_source run $run_nr so $so_nr, done [timestamp -format %c]"
+	return [list $sources $headers]
+    }
+
+    # Write Tcl array ARRAY_NAME to F.
+
+    proc _write_tcl_array { self_var f array_name } {
+	upvar 1 $self_var self
+	if { "$array_name" != "$self_var" } {
+	    global $array_name
+	}
+	puts $f "== $array_name =="
+	foreach { name value } [array get $array_name] {
+	    puts $f "$name: $value"
+	}
+    }
+
+    # Write global Tcl state used for compilation to F.
+    # If anything changes we want to recompile.
+
+    proc _write_tcl_state { self_var f dest } {
+	upvar 1 $self_var self
+
+	# TODO(dje): gdb_default_target_compile references a lot of global
+	# state.  Can we capture it all?  For now these are the important ones.
+
+	set vars { CC_FOR_TARGET CXX_FOR_TARGET CFLAGS_FOR_TARGET }
+	foreach v $vars {
+	    global $v
+	    if [info exists $v] {
+		eval set value $$v
+		puts $f "$v: $value"
+	    }
+	}
+
+	puts $f ""
+	_write_tcl_array self $f target_info
+	puts $f ""
+	_write_tcl_array self $f board_info
+    }
+
+    # Write all sideband non-file inputs, as well as OPTIONS to INPUTS_FILE.
+    # If anything changes we want to recompile.
+
+    proc _write_inputs_file { self_var dest inputs_file options } {
+	upvar 1 $self_var self
+	global env
+	set f [open $inputs_file "w"]
+	_write_tcl_array self $f self
+	puts $f ""
+	puts $f "options: $options"
+	puts $f "PATH: [getenv PATH]"
+	puts $f ""
+	_write_tcl_state self $f $dest
+	close $f
+    }
+
+    # Generate the sha1sum of all the inputs.
+    # The result is a list of { error_code text }.
+    # Upon success error_code is zero and text is the sha1sum.
+    # Otherwise, error_code is non_zero and text is the error message.
+
+    proc _gen_sha1sum_for_inputs { source_files header_files inputs } {
+	global srcdir subdir CAT_PROGRAM SHA1SUM_PROGRAM
+	set header_paths ""
+	foreach f $header_files {
+	    switch -glob -- $f {
+		"<*>" {
+		    # skip
+		}
+		"*gdb.perf/outputs/*" {
+		    # in build tree
+		    append header_paths " $f"
+		}
+		default {
+		    append header_paths " $srcdir/$subdir/$f"
+		}
+	    }
+	}
+	verbose -log "_gen_sha1sum_for_inputs: summing $source_files $header_paths $inputs"
+	set catch_result [catch "exec $CAT_PROGRAM $source_files $header_paths $inputs | $SHA1SUM_PROGRAM" output]
+        return [list $catch_result $output]
+    }
+
+    # Return the contents of TEXT_FILE.
+    # It is assumed TEXT_FILE exists and is readable.
+    # This is used for reading files containing sha1sums, the
+    # last newline is removed.
+
+    proc _read_file { text_file } {
+	set f [open $text_file "r"]
+	set result [read -nonewline $f]
+	close $f
+	return $result
+    }
+
+    # Write TEXT to TEXT_FILE.
+    # It is assumed TEXT_FILE can be opened/created and written to.
+
+    proc _write_file { text_file text } {
+	set f [open $text_file "w"]
+	puts $f $text
+	close $f
+    }
+
+    # Wrapper on gdb_compile* that computes sha1sums of inputs to decide
+    # whether the compile is needed.
+    # The result is the result of gdb_compile*: "" == success, otherwise
+    # a compilation error occurred and the output is an error message.
+    # This doesn't take all inputs into account, just the useful ones.
+    # As an extension (or simplification) on gdb_compile*, if TYPE is
+    # shlib then call gdb_compile_shlib, otherwise call gdb_compile.
+    # Other possibilities *could* be handled this way, e.g., pthreads.  TBD.
+
+    proc _perftest_compile { self_var source_files header_files dest type options } {
+	upvar 1 $self_var self
+	verbose -log "_perftest_compile $source_files $header_files $dest $type $options"
+	# To keep things simple, we put all non-file inputs into a file and
+	# then cat all input files through sha1sum.
+	set sha1sum_file ${dest}.sha1sum
+	set sha1new_file ${dest}.sha1new
+	set inputs_file ${dest}.inputs
+	global srcdir subdir
+	set all_options $options
+	lappend all_options "incdir=$srcdir/$subdir"
+	_write_inputs_file self $dest $inputs_file $all_options
+	set sha1sum [_gen_sha1sum_for_inputs $source_files $header_files $inputs_file]
+	if { [lindex $sha1sum 0] != 0 } {
+	    return "sha1sum generation error: [lindex $sha1sum 1]"
+	}
+	set sha1sum [lindex $sha1sum 1]
+	if ![file exists $dest] {
+	    file delete $sha1sum_file
+	}
+	if [file exists $sha1sum_file] {
+	    set last_sha1sum [_read_file $sha1sum_file]
+	    verbose -log "last: $last_sha1sum, new: $sha1sum"
+	    if { $sha1sum == $last_sha1sum } {
+		verbose -log "using existing build for $dest"
+		return ""
+	    }
+	}
+	# No such luck, we need to compile.
+	file delete $sha1sum_file
+	if { $type == "shlib" } {
+	    set result [gdb_compile_shlib $source_files $dest $all_options]
+	} else {
+	    set result [gdb_compile $source_files $dest $type $all_options]
+	}
+	if { $result == "" } {
+	    _write_file $sha1sum_file $sha1sum
+	    verbose -log "wrote sha1sum: $sha1sum"
+	}
+	return $result
+    }
+
+    proc _compile_binary_pieces { self_var worker_nr static run_nr } {
+	upvar 1 $self_var self
+	set compile_options [_compile_options self]
+	set nr_compunits [_get_param $self(nr_compunits) $run_nr]
+	set extra_headers [_get_param $self(binary_extra_headers) $run_nr]
+	global PERF_TEST_COMPILE_PARALLELISM
+	set nr_workers $PERF_TEST_COMPILE_PARALLELISM
+	# Generate the source first so we can more easily measure how long that
+	# takes.  [It doesn't take hardly any time at all, relative to the time
+	# it takes to compile it, but this will provide numbers to show that.]
+	set todo_list [_gen_binary_source self $worker_nr $static $run_nr]
+	verbose -log "GenPerfTest::_compile_binary_pieces worker $worker_nr run $run_nr, started [timestamp -format %c]"
+	foreach elm $todo_list {
+	    set source_file [lindex $elm 0]
+	    set header_file [lindex $elm 1]
+	    set object_file [lindex $elm 2]
+	    set all_header_files $extra_headers
+	    lappend all_header_files $header_file
+	    set compile_result [_perftest_compile self $source_file $all_header_files $object_file object $compile_options]
+	    if { $compile_result != "" } {
+		verbose -log "GenPerfTest::_compile_binary_pieces worker $worker_nr run $run_nr, failed [timestamp -format %c]"
+		verbose -log $compile_result
+		return -1
+	    }
+	}
+	verbose -log "GenPerfTest::_compile_binary_pieces worker $worker_nr run $run_nr, done [timestamp -format %c]"
+	return 0
+    }
+
+    # Helper function to compile the pieces of a shlib.
+    # Note: gdb_compile_shlib{,_pthreads} don't support first building object
+    # files and then building the shlib.  Therefore our hands are tied, and we
+    # just build the shlib in one step.  This is less of a parallelization
+    # problem if there are multiple shlibs: Each worker can build a different
+    # shlib.  If this proves to be a problem in practice we can enhance
+    # gdb_compile_shlib* then.
+
+    proc _compile_shlib { self_var static run_nr so_nr } {
+	upvar 1 $self_var self
+	set files [_gen_shlib_source self $static $run_nr $so_nr]
+	set source_files [lindex $files 0]
+	set header_files [lindex $files 1]
+	set extra_headers [_get_param $self(gen_shlib_extra_headers) $run_nr]
+	set shlib_file [_make_shlib_name self $static $run_nr $so_nr]
+	set compile_options "[_compile_options self] additional_flags=-DSHLIB=$so_nr"
+	set all_header_files $header_files
+	append all_header_files $extra_headers
+	set compile_result [_perftest_compile self $source_files $all_header_files $shlib_file shlib $compile_options]
+	if { $compile_result != "" } {
+	    verbose -log "_compile_shlib failed: $compile_result"
+	    return -1
+	}
+	return 0
+    }
+
+    proc _gen_tail_shlib_source { self_var static run_nr } {
+	upvar 1 $self_var self
+	verbose -log "GenPerfTest::_gen_tail_shlib_source run $run_nr"
+	set source_files [_get_param $self(tail_shlib_sources) $run_nr]
+	if { [llength $source_files] == 0 } {
+	    return ""
+	}
+	set result ""
+	foreach source_name $source_files {
+	    lappend result [_gen_shlib_common_source self $static $run_nr tail $source_name]
+	}
+	return $result
+    }
+
+    proc _make_tail_shlib_name { self_var static run_nr } {
+	upvar 1 $self_var self
+	set source_files [_get_param $self(tail_shlib_sources) $run_nr]
+	if { [llength $source_files] == 0 } {
+	    return ""
+	}
+	return [_make_shlib_name self $static $run_nr "tail"]
+    }
+
+    # Helper function to compile the tail shlib, if it's specified.
+
+    proc _compile_tail_shlib { self_var static run_nr } {
+	upvar 1 $self_var self
+	set source_files [_gen_tail_shlib_source self $static $run_nr]
+	if { [llength $source_files] == 0 } {
+	    return 0
+	}
+	set header_files [_get_param $self(tail_shlib_headers) $run_nr]
+	set shlib_file [_make_tail_shlib_name self $static $run_nr]
+	set compile_options [_compile_options self]
+	set compile_result [_perftest_compile self $source_files $header_files $shlib_file shlib $compile_options]
+	if { $compile_result != "" } {
+	    verbose -log "_compile_tail_shlib failed: $compile_result"
+	    return -1
+	}
+	verbose -log "_compile_tail_shlib failed: succeeded"
+	return 0
+    }
+
+    # Compile the pieces of the binary and possible shlibs for the test.
+    # The result is 0 for success, -1 for failure.
+
+    proc _compile_pieces { self_var worker_nr } {
+	upvar 1 $self_var self
+	global PERF_TEST_COMPILE_PARALLELISM
+	set nr_workers $PERF_TEST_COMPILE_PARALLELISM
+	set nr_runs [llength $self(run_names)]
+	set static [_static_object_files_p self]
+	verbose -log "_compile_pieces: static flag: $static"
+	file mkdir "[file dirname $self(binfile)]/pieces"
+	if $static {
+	    # All the generated pieces look the same (run over run) so just
+	    # build all the shlibs of the last run (which is the largest).
+	    set last_run [expr $nr_runs - 1]
+	    set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $last_run]
+	    set object_dir [_make_object_dir_name self $static ignored]
+	    file mkdir $object_dir
+	    for { set so_nr $worker_nr } { $so_nr < $nr_gen_shlibs } { incr so_nr $nr_workers } {
+		if { [_compile_shlib self $static $last_run $so_nr] < 0 } {
+		    return -1
+		}
+	    }
+	    # We don't shard building of tail-shlib, so only build it once.
+	    if { $worker_nr == 0 } {
+		if { [_compile_tail_shlib self $static $last_run] < 0 } {
+		    return -1
+		}
+	    }
+	    if { [_compile_binary_pieces self $worker_nr $static $last_run] < 0 } {
+		return -1
+	    }
+	} else {
+	    for { set run_nr 0 } { $run_nr < $nr_runs } { incr run_nr } {
+		set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr]
+		set object_dir [_make_object_dir_name self $static $run_nr]
+		file mkdir $object_dir
+		for { set so_nr $worker_nr } { $so_nr < $nr_gen_shlibs } { incr so_nr $nr_workers } {
+		    if { [_compile_shlib self $static $run_nr $so_nr] < 0 } {
+			return -1
+		    }
+		}
+		# We don't shard building of tail-shlib, so only build it once.
+		if { $worker_nr == 0 } {
+		    if { [_compile_tail_shlib self $static $run_nr] < 0 } {
+			return -1
+		    }
+		}
+		if { [_compile_binary_pieces self $worker_nr $static $run_nr] < 0 } {
+		    return -1
+		}
+	    }
+	}
+	return 0
+    }
+
+    # Main function invoked by each worker.
+    # This builds all the things that are possible to build in parallel,
+    # sharded up among all the workers.
+
+    proc compile_pieces { self_var worker_nr } {
+	upvar 1 $self_var self
+	verbose -log "GenPerfTest::compile_pieces worker $worker_nr, started [timestamp -format %c]"
+	verbose -log "self: [array get self]"
+	_verify_testcase self
+	if { [_compile_pieces self $worker_nr] < 0 } {
+	    verbose -log "GenPerfTest::compile_pieces worker $worker_nr, failed [timestamp -format %c]"
+	    return -1
+	}
+	verbose -log "GenPerfTest::compile_pieces worker $worker_nr, done [timestamp -format %c]"
+	return 0
+    }
+
+    proc _make_shlib_options { self_var static run_nr } {
+	upvar 1 $self_var self
+	set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr]
+	set result ""
+	for { set i 0 } { $i < $nr_gen_shlibs } { incr i } {
+	    lappend result "shlib=[_make_shlib_name self $static $run_nr $i]"
+	}
+	set tail_shlib_name [_make_tail_shlib_name self $static $run_nr]
+	if { "$tail_shlib_name" != "" } {
+	    lappend result "shlib=$tail_shlib_name"
+	}
+	return $result
+    }
+
+    proc _compile_binary { self_var static run_nr } {
+	upvar 1 $self_var self
+	set input_files [_make_binary_input_file_names self $static $run_nr]
+	set extra_headers [_get_param $self(binary_extra_headers) $run_nr]
+	set binary_file [_make_binary_name self $run_nr]
+	set compile_options [_compile_options self]
+	set shlib_options [_make_shlib_options self $static $run_nr]
+	if { [llength $shlib_options] > 0 } {
+	    append compile_options " " $shlib_options
+	}
+	set compile_result [_perftest_compile self $input_files $extra_headers $binary_file executable $compile_options]
+	if { $compile_result != "" } {
+	    verbose -log "_compile_binary failed: $compile_result"
+	    return -1
+	}
+	return 0
+    }
+
+    # Helper function for compile.
+    # The result is 0 for success, -1 for failure.
+
+    proc _compile { self_var } {
+	upvar 1 $self_var self
+	set nr_runs [llength $self(run_names)]
+	set static [_static_object_files_p self]
+	verbose -log "_compile: static flag: $static"
+	for { set run_nr 0 } { $run_nr < $nr_runs } { incr run_nr } {
+	    if { [_compile_binary self $static $run_nr] < 0 } {
+		return -1
+	    }
+	}
+	return 0
+    }
+
+    # Main function to compile the test program.
+    # It is assumed all the pieces of the binary (all the .o's, except those
+    # from test-supplied sources) have already been built with compile_pieces.
+    # There's no need to compile any shlibs here, as compile_pieces will have
+    # already built them too.
+    # The result is 0 for success, -1 for failure.
+
+    proc compile { self_var } {
+	upvar 1 $self_var self
+	verbose -log "GenPerfTest::compile, started [timestamp -format %c]"
+	verbose -log "self: [array get self]"
+	_verify_testcase self
+	if { [_compile self] < 0 } {
+	    verbose -log "GenPerfTest::compile, failed [timestamp -format %c]"
+	    return -1
+	}
+	verbose -log "GenPerfTest::compile, done [timestamp -format %c]"
+	return 0
+    }
+
+    # Main function for running a test.
+    # It is assumed that the test program has already been built.
+
+    proc run { builder_exp_file_name make_config_thunk_name py_file_name test_class_name } {
+	verbose -log "GenPerfTest::run, started [timestamp -format %c]"
+	verbose -log "GenPerfTest::run, $builder_exp_file_name $make_config_thunk_name $py_file_name $test_class_name"
+
+	set testprog [file rootname $builder_exp_file_name]
+
+	# This variable is required by perftest.exp.
+	# This isn't the name of the test program, it's the name of the .py
+	# test.  The harness assumes they are the same, which is not the case
+	# here.
+	global testfile
+	set testfile [file rootname $py_file_name]
+
+	GenPerfTest::load_test_description $builder_exp_file_name
+
+	array set testcase [$make_config_thunk_name]
+
+	PerfTest::assemble {
+	    # Compilation is handled elsewhere.
+	    return 0
+	} {
+	    clean_restart
+	    return 0
+	} {
+	    global gdb_prompt
+	    gdb_test_multiple "python ${test_class_name}('$testprog:$testfile', [tcl_string_list_to_python_list $testcase(run_names)], '$testcase(binfile)').run()" "run test" {
+		-re "Error while executing Python code.\[\r\n\]+$gdb_prompt $" {
+		    return -1
+		}
+		-re "\[\r\n\]+$gdb_prompt $" {
+		}
+	    }
+	    return 0
+	}
+	verbose -log "GenPerfTest::run, done [timestamp -format %c]"
+	return 0
+    }
+
+    # This function is invoked by the testcase builder scripts
+    # (e.g., gmonster[12].exp).
+    # It is not invoked by the testcase runner scripts
+    # (e.g., gmonster[12]-*.exp).
+
+    proc standard_compile_driver { exp_file_name make_config_thunk_name } {
+	global GDB_PERFTEST_MODE GDB_PERFTEST_SUBMODE
+	if ![info exists GDB_PERFTEST_SUBMODE] {
+	    # Probably a plain "make check-perf", nothing to do.
+	    # Give the user a reason why we're not running this test.
+	    verbose -log "Test must be compiled/run in separate steps."
+	    return 0
+	}
+	switch -glob -- "$GDB_PERFTEST_MODE/$GDB_PERFTEST_SUBMODE" {
+	    compile/gen-workers {
+		if { [GenPerfTest::gen_worker_files $exp_file_name] < 0 } {
+		    fail $GDB_PERFTEST_MODE
+		    return -1
+		}
+		pass $GDB_PERFTEST_MODE
+	    }
+	    compile/build-pieces {
+		array set testcase [$make_config_thunk_name]
+		global PROGRAM_NAME WORKER_NR
+		if { [GenPerfTest::compile_pieces testcase $WORKER_NR] < 0 } {
+		    fail $GDB_PERFTEST_MODE
+		    # This gdb.log lives in a different place, help the user
+		    # find it.
+		    set output_dir "gdb.perf/outputs"
+		    send_user "check ${output_dir}/${PROGRAM_NAME}/${PROGRAM_NAME}-${WORKER_NR}/gdb.log\n"
+		    return -1
+		}
+		pass $GDB_PERFTEST_MODE
+	    }
+	    compile/final {
+		array set testcase [$make_config_thunk_name]
+		if { [GenPerfTest::compile testcase] < 0 } {
+		    fail $GDB_PERFTEST_MODE
+		    return -1
+		}
+		pass $GDB_PERFTEST_MODE
+	    }
+	    run/* - both/* {
+		# Since the builder script is a .exp file living in gdb.perf
+		# we can get here (dejagnu will find this file for a default
+		# "make check-perf").  We can also get here when
+		# standard_run_driver loads the builder .exp file.
+	    }
+	    default {
+		error "Bad value for GDB_PERFTEST_MODE/GDB_PERFTEST_SUBMODE: $GDB_PERFTEST_MODE/$GDB_PERFTEST_SUBMODE"
+	    }
+	}
+	return 0
+    }
+
+    # This function is invoked by the testcase runner scripts
+    # (e.g., gmonster[12]-*.exp).
+    # It is not invoked by the testcase builder scripts
+    # (e.g., gmonster[12].exp).
+    #
+    # These tests are built separately with
+    # "make build-perf" and run with
+    # "make check-perf GDB_PERFTEST_MODE=run".
+    # Eventually we can support GDB_PERFTEST_MODE=both, but for now we don't.
+
+    proc standard_run_driver { builder_exp_file_name make_config_thunk_name py_file_name test_class_name } {
+	global GDB_PERFTEST_MODE
+	# First step is to compile the test.
+	switch $GDB_PERFTEST_MODE {
+	    compile - both {
+		# Here is where we'd add code to support a plain
+		# "make check-perf".
+	    }
+	    run {
+	    }
+	    default {
+		error "Bad value for GDB_PERFTEST_MODE: $GDB_PERFTEST_MODE"
+	    }
+	}
+	# Now run the test.
+	switch $GDB_PERFTEST_MODE {
+	    compile {
+	    }
+	    both {
+		# Give the user a reason why we're not running this test.
+		verbose -log "Test must be compiled/run in separate steps."
+	    }
+	    run {
+		if { [GenPerfTest::run $builder_exp_file_name $make_config_thunk_name $py_file_name $test_class_name] < 0 } {
+		    fail $GDB_PERFTEST_MODE
+		    return -1
+		}
+		pass $GDB_PERFTEST_MODE
+	    }
+	}
+	return 0
+    }
+}
+
+if ![info exists PERF_TEST_COMPILE_PARALLELISM] {
+    set PERF_TEST_COMPILE_PARALLELISM $GenPerfTest::DEFAULT_PERF_TEST_COMPILE_PARALLELISM
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/go.exp ./gdb/testsuite/lib/go.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/go.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/go.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012-2015 Free Software Foundation, Inc.
+# Copyright 2012-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/java.exp ./gdb/testsuite/lib/java.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/java.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/java.exp	1970-01-01 00:00:00.000000000 +0000
@@ -1,123 +0,0 @@
-# This test code is part of GDB, the GNU debugger.
-
-# Copyright 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-load_lib "libgloss.exp"
-
-# GCJ_UNDER_TEST is the compiler under test.
-
-global tmpdir
-
-if ![info exists tmpdir] {
-    set tmpdir "/tmp"
-}
-
-set java_initialized 0
-
-#
-# Build the status wrapper library as needed.
-#
-proc java_init { args } {
-    global wrapper_file
-    global wrap_compile_flags
-    global java_initialized
-    global GCJ_UNDER_TEST
-    global TOOL_EXECUTABLE
-    global env
-
-    if { $java_initialized == 1 } { return; }
-
-    if ![info exists GCJ_UNDER_TEST] {
-	if [info exists TOOL_EXECUTABLE] {
-	    set GCJ_UNDER_TEST $TOOL_EXECUTABLE
-	} else {
-	    if { [info exists env(GCJ)] && $env(GCJ) != "" } {
-		set GCJ_UNDER_TEST $env(GCJ)
-	    } else {
-		global tool_root_dir
-		global target_alias
-		
-		if ![is_remote host] {
-		    set file [lookfor_file $tool_root_dir gcj]
-		    if { $file == "" } {
-			set file [lookfor_file $tool_root_dir gcc/gcj]
-		    }
-		    if { $file != "" } {
-			set CC "$file -B[file dirname $file]/ --specs=$tool_root_dir/$target_alias/libjava/libgcj-test.spec"
-		    } else {
-			set CC [transform gcj]
-		    }
-		} else {
-		    set CC [transform gcj]
-		}
-		set GCJ_UNDER_TEST $CC
-	    }
-	}
-    }
-
-    set wrapper_file ""
-    set wrap_compile_flags ""
-    if [target_info exists needs_status_wrapper] {
-	set result [build_wrapper "testglue.o"]
-	if { $result != "" } {
-	    set wrapper_file [lindex $result 0]
-	    set wrap_compile_flags [lindex $result 1]
-	} else {
-	    warning "Status wrapper failed to build."
-	}
-    }
-
-    set java_initialized 1
-}
-
-#
-# Run the test specified by srcfile and resultfile. compile_args and
-# exec_args are options telling this proc how to work.
-#
-proc compile_java_from_source { srcfile binfile compile_args } {
-    global GCJ_UNDER_TEST
-    global java_initialized
-
-    if { $java_initialized != 1 } { java_init }
-
-    set args [list "compiler=$GCJ_UNDER_TEST"]
-    lappend args "additional_flags=--main=[file rootname [file tail $srcfile]]"
-    if { $compile_args != "" } {
-	lappend args "additional_flags=$compile_args"
-    }
-
-    set result [target_compile $srcfile ${binfile} executable $args]
-    gdb_compile_test $srcfile $result
-    return $result
-}
-
-# Auxiliary function to set the language to java.
-# The result is 1 (true) for success, 0 (false) for failure.
-
-proc set_lang_java {} {
-    if [gdb_test_no_output "set language java"] {
-	return 0
-    }
-    if [gdb_test "show language" ".* source language is \"java\"." \
-	   "set language to \"java\""] {
-	return 0
-    }
-    return 1
-}
-
-# Local Variables:
-# tcl-indent-level:4
-# End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/memory.exp ./gdb/testsuite/lib/memory.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/memory.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/lib/memory.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,31 @@
+# Copyright 2012-2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file holds functions and data dealing with memory checks and other memory
+# manipulation routines.
+
+# Deletes all memory regions GDB currently knows about.
+
+proc delete_memory_regions {} {
+    global gdb_prompt
+
+    gdb_test_multiple "delete mem" "delete mem" {
+       -re "Delete all memory regions.*y or n.*$" {
+           send_gdb "y\n"
+           exp_continue
+       }
+       -re "$gdb_prompt $" { }
+    }
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/mi-support.exp ./gdb/testsuite/lib/mi-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/mi-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/mi-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,9 +26,18 @@ if ![info exists mi_gdb_prompt] then {
     set mi_gdb_prompt "\[(\]gdb\[)\] \r\n"
 }
 
-global mi_inferior_spawn_id
 global mi_inferior_tty_name
 
+# Always points to GDB's main UI spawn ID, even when testing with MI
+# running on a secondary UI.
+global gdb_main_spawn_id
+
+# Points to the spawn id of the MI channel.  When testing with MI
+# running as the primary/main UI, this is the same as
+# gdb_main_spawn_id, but will be different when testing with MI
+# running on a secondary UI.
+global mi_spawn_id
+
 set MIFLAGS "-i=mi"
 
 set thread_selected_re "=thread-selected,id=\"\[0-9\]+\"\r\n"
@@ -47,7 +56,8 @@ proc mi_uncatched_gdb_exit {} {
     global GDB
     global INTERNAL_GDBFLAGS GDBFLAGS
     global verbose
-    global gdb_spawn_id
+    global gdb_spawn_id gdb_main_spawn_id
+    global mi_spawn_id inferior_spawn_id
     global gdb_prompt
     global mi_gdb_prompt
     global MIFLAGS
@@ -84,14 +94,91 @@ proc mi_uncatched_gdb_exit {} {
 	remote_close host
     }
     unset gdb_spawn_id
+    unset gdb_main_spawn_id
+    unset mi_spawn_id
+    unset inferior_spawn_id
+}
+
+# Create the PTY for the inferior process and tell GDB about it.
+
+proc mi_create_inferior_pty {} {
+    global mi_gdb_prompt
+    global inferior_spawn_id
+    global mi_inferior_tty_name
+
+    spawn -pty
+    set inferior_spawn_id $spawn_id
+    set tty_name $spawn_out(slave,name)
+    set mi_inferior_tty_name $tty_name
+
+    send_gdb "102-inferior-tty-set $tty_name\n"
+    gdb_expect 10 {
+	-re ".*102\\\^done\r\n$mi_gdb_prompt$" {
+	    verbose "redirect inferior output to new terminal device."
+	}
+	timeout {
+	    warning "Couldn't redirect inferior output." 2
+	}
+    }
+}
+
+proc mi_gdb_start_separate_mi_tty { args } {
+    global gdb_prompt mi_gdb_prompt
+    global timeout
+    global gdb_spawn_id gdb_main_spawn_id mi_spawn_id
+    global inferior_spawn_id
+
+    set separate_inferior_pty 0
+
+    foreach arg $args {
+	if {$arg == "separate-inferior-tty"} {
+	    set separate_inferior_pty 1
+	}
+    }
+
+    gdb_start
+
+    # Create the new PTY for the MI UI.
+    spawn -pty
+    set mi_spawn_id $spawn_id
+    set mi_tty_name $spawn_out(slave,name)
+    gdb_test_multiple "new-ui mi $mi_tty_name" "new-ui" {
+	-re "New UI allocated\r\n$gdb_prompt $" {
+	}
+    }
+
+    # Switch to the MI channel.
+    set gdb_main_spawn_id $gdb_spawn_id
+    switch_gdb_spawn_id $mi_spawn_id
+
+    # Consume pending output and MI prompt.
+    gdb_expect {
+	-re "$mi_gdb_prompt$" {
+	}
+	default {
+	    perror "MI channel failed"
+	    remote_close host
+	    return -1
+	}
+    }
+
+    if {$separate_inferior_pty} {
+	mi_create_inferior_pty
+    }
+
+    mi_detect_async
+
+    return 0
 }
 
 #
-# default_mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
+# default_mi_gdb_start [FLAGS] -- start gdb running, default procedure
+#
+# If "separate-inferior-tty" is specified, the inferior works with
+# it's own PTY.
 #
-# INFERIOR_PTY should be set to separate-inferior-tty to have the inferior work 
-# with it's own PTY. If set to same-inferior-tty, the inferior shares GDB's PTY. 
-# The default value is same-inferior-tty.
+# If "separate-mi-tty" is specified, the gdb starts in CLI mode, with
+# MI running on a secondary UI, on its own tty.
 #
 # When running over NFS, particularly if running many simultaneous
 # tests on different hosts all using the same server, things can
@@ -104,8 +191,29 @@ proc default_mi_gdb_start { args } {
     global gdb_prompt
     global mi_gdb_prompt
     global timeout
-    global gdb_spawn_id
+    global gdb_spawn_id gdb_main_spawn_id inferior_spawn_id mi_spawn_id
     global MIFLAGS
+    global FORCE_SEPARATE_MI_TTY
+
+    if {[info exists FORCE_SEPARATE_MI_TTY]} {
+	set separate_mi_pty $FORCE_SEPARATE_MI_TTY
+    } else {
+	set separate_mi_pty 0
+    }
+
+    set separate_inferior_pty 0
+
+    foreach arg $args {
+	if {$arg == "separate-mi-tty"} {
+	    set separate_mi_pty 1
+	} elseif {$arg == "separate-inferior-tty"} {
+	    set separate_inferior_pty 1
+	}
+    }
+
+    if {$separate_mi_pty} {
+	return [eval mi_gdb_start_separate_mi_tty $args]
+    }
 
     gdb_stop_suppressing_tests
     set inferior_pty no-tty
@@ -113,12 +221,6 @@ proc default_mi_gdb_start { args } {
     # Set the default value, it may be overriden later by specific testfile.
     set use_gdb_stub [target_info exists use_gdb_stub]
 
-    if { [llength $args] == 1} {
-	set inferior_pty [lindex $args 0]
-    }
-
-    set separate_inferior_pty [string match $inferior_pty separate-inferior-tty]
-
     # Start SID.
     if { [info procs sid_start] != "" } {
 	verbose "Spawning SID"
@@ -138,15 +240,6 @@ proc default_mi_gdb_start { args } {
 	}
     }
 
-    # Create the new PTY for the inferior process.
-    if { $separate_inferior_pty } {
-	spawn -pty
-	global mi_inferior_spawn_id
-	global mi_inferior_tty_name
-	set mi_inferior_spawn_id $spawn_id
-	set mi_inferior_tty_name $spawn_out(slave,name)
-    }
-
     set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $MIFLAGS [host_info gdb_opts]"]
     if { $res < 0 || $res == "" } {
 	perror "Spawning $GDB failed."
@@ -176,12 +269,12 @@ proc default_mi_gdb_start { args } {
 	    verbose "GDB initialized."
 	}
 	-re ".*unrecognized option.*for a complete list of options." {
-	    untested "Skip mi tests (not compiled with mi support)."
+	    untested "skip mi tests (not compiled with mi support)."
 	    remote_close host
 	    return -1
 	}
 	-re ".*Interpreter `mi' unrecognized." {
-	    untested "Skip mi tests (not compiled with mi support)."
+	    untested "skip mi tests (not compiled with mi support)."
 	    remote_close host
 	    return -1
 	}
@@ -192,6 +285,8 @@ proc default_mi_gdb_start { args } {
 	}
     }
     set gdb_spawn_id $res
+    set gdb_main_spawn_id $res
+    set mi_spawn_id $res
 
     # FIXME: mi output does not go through pagers, so these can be removed.
     # force the height to "unlimited", so no pagers get used
@@ -214,18 +309,13 @@ proc default_mi_gdb_start { args } {
 	    warning "Couldn't set the width to 0."
 	}
     }
-    # If allowing the inferior to have its own PTY then assign the inferior
-    # its own terminal device here.
+
     if { $separate_inferior_pty } {
-	send_gdb "102-inferior-tty-set $mi_inferior_tty_name\n"
-	gdb_expect 10 {
-	    -re ".*102\\\^done\r\n$mi_gdb_prompt$" {
-		verbose "redirect inferior output to new terminal device."
-	    }
-	    timeout {
-		warning "Couldn't redirect inferior output." 2
-	    }
-	}
+	mi_create_inferior_pty
+    }
+
+    if {![info exists inferior_spawn_id]} {
+	set inferior_spawn_id $gdb_spawn_id
     }
 
     mi_detect_async
@@ -238,7 +328,7 @@ proc default_mi_gdb_start { args } {
 # baseboard file.
 #
 proc mi_gdb_start { args } {
-  return [default_mi_gdb_start $args]
+  return [eval default_mi_gdb_start $args]
 }
 
 # Many of the tests depend on setting breakpoints at various places and
@@ -372,7 +462,7 @@ proc mi_gdb_target_cmd { targetname seri
 		continue
 	    }
 	    -re "Non-stop mode requested, but remote does not support non-stop.*$mi_gdb_prompt" {
-		unsupported "Non-stop mode not supported"
+		unsupported "non-stop mode not supported"
 		return 1
 	    }
 	    -re "Timeout reading from remote system.*$mi_gdb_prompt$" {
@@ -512,8 +602,9 @@ proc mi_gdb_target_load { } {
 	    }
 	}
     } elseif { [target_info protocol] == "sim" } {
+	set target_sim_options "[board_info target gdb,target_sim_options]"
 	# For the simulator, just connect to it directly.
-	send_gdb "47-target-select sim\n"
+	send_gdb "47-target-select sim $target_sim_options\n"
 	gdb_expect $loadtimeout {
 	    -re "47\\^connected.*$mi_gdb_prompt$" {
 	    }
@@ -770,29 +861,16 @@ proc mi_gdb_test { args } {
     if { $result == 0 } {
 	if [ info exists ipattern ] {
 	    if { ![target_info exists gdb,noinferiorio] } {
-		if { [target_info gdb_protocol] == "remote"
-		    || [target_info gdb_protocol] == "extended-remote"
-		    || [target_info protocol] == "sim"} {
-
-		    gdb_expect {
-			-re "$ipattern" {
-			    pass "$message inferior output"
-			}
-			timeout {
-			    fail "$message inferior output (timeout)"
-			    set result 1
-			}
+		global gdb_spawn_id inferior_spawn_id
+
+		set sid "$inferior_spawn_id $gdb_spawn_id"
+		gdb_expect {
+		    -i "$sid" -re "$ipattern" {
+			pass "$message inferior output"
 		    }
-		} else {
-		    global mi_inferior_spawn_id
-		    expect {
-			-i $mi_inferior_spawn_id -re "$ipattern" {
-			    pass "$message inferior output"
-			}
-			timeout {
-			    fail "$message inferior output (timeout)"
-			    set result 1
-			}
+		    timeout {
+			fail "$message inferior output (timeout)"
+			set result 1
 		    }
 		}
 	    } else {
@@ -900,6 +978,9 @@ proc mi_run_cmd_full {use_mi_command arg
 	# to better handle RUN.
 	send_gdb  "jump *$start\n"
 	warning "Using CLI jump command, expect run-to-main FAIL"
+	gdb_expect {
+	    -re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
+	}
 	return 0
     }
 
@@ -908,7 +989,7 @@ proc mi_run_cmd_full {use_mi_command arg
 	-re "${run_match}\\^running\r\n(\\*running,thread-id=\"\[^\"\]+\"\r\n|=thread-created,id=\"1\",group-id=\"\[0-9\]+\"\r\n)*(${library_loaded_re})*(${thread_selected_re})?${mi_gdb_prompt}" {
 	}
 	-re "\\^error,msg=\"The target does not support running in non-stop mode.\"" {
-	    unsupported "Non-stop mode not supported"
+	    unsupported "non-stop mode not supported"
 	    return -1
 	}
 	timeout {
@@ -1192,7 +1273,7 @@ proc mi_expect_interrupt { test } {
     if {$async} {
 	set prompt_re ""
     } else {
-	set prompt_re "$mi_gdb_prompt$"
+	set prompt_re "$mi_gdb_prompt"
     }
 
     set r_nonstop "reason=\"signal-received\",signal-name=\"0\",signal-meaning=\"Signal 0\""
@@ -1207,7 +1288,7 @@ proc mi_expect_interrupt { test } {
 	    pass "$test"
 	    return 0
 	}
-	-re ".*\r\n$mi_gdb_prompt$" {
+	-re ".*\r\n$mi_gdb_prompt" {
 	    verbose -log "got $expect_out(buffer)"
 	    fail "$test (unknown output after running)"
 	    return -1
@@ -1966,32 +2047,23 @@ proc check_mi_and_console_threads {name}
 
 # Download shared libraries to the target.
 proc mi_load_shlibs { args } {
-    if {![is_remote target]} {
-	return
-    }
-
     foreach file $args {
-	gdb_download [shlib_target_file $file]
+	gdb_remote_download target [shlib_target_file $file]
     }
 
-    # Even if the target supplies full paths for shared libraries,
-    # they may not be paths for this system.
-    mi_gdb_test "set solib-search-path [file dirname [lindex $args 0]]" "\^done" ""
-}
-
-proc mi_reverse_list { list } {
-    if { [llength $list] <= 1 } {
-	return $list
+    if {[is_remote target]} {
+	# If the target is remote, we need to tell gdb where to find the
+	# libraries.
+	#
+	# We could set this even when not testing remotely, but a user
+	# generally won't set it unless necessary.  In order to make the tests
+	# more like the real-life scenarios, we don't set it for local testing.
+	mi_gdb_test "set solib-search-path [file dirname [lindex $args 0]]" "\^done" ""
     }
-    set tail [lrange $list 1 [llength $list]]
-    set rtail [mi_reverse_list $tail]
-    lappend rtail [lindex $list 0]
-    return $rtail
 }
 
-proc mi_check_thread_states { xstates test } {
+proc mi_check_thread_states { states test } {
     global expect_out
-    set states [mi_reverse_list $xstates]
     set pattern ".*\\^done,threads=\\\["
     foreach s $states {
 	set pattern "${pattern}(.*)state=\"$s\""
@@ -2409,7 +2481,8 @@ proc mi_build_kv_pairs {attr_list {joine
 #
 # All arguments for the breakpoint may be specified using the options
 # number, type, disp, enabled, addr, func, file, fullanme, line,
-# thread-groups, times, ignore, script, and original-location.
+# thread-groups, cond, evaluated-by, times, ignore, script,
+# and original-location.
 #
 # Only if -script and -ignore are given will they appear in the output.
 # Otherwise, this procedure will skip them using ".*".
@@ -2424,17 +2497,36 @@ proc mi_make_breakpoint {args} {
     parse_args {{number .*} {type .*} {disp .*} {enabled .*} {addr .*}
 	{func .*} {file .*} {fullname .*} {line .*}
 	{thread-groups \\\[.*\\\]} {times .*} {ignore 0}
-	{script ""} {original-location .*}}
+	{script ""} {original-location .*} {cond ""} {evaluated-by ""}}
 
     set attr_list {}
     foreach attr [list number type disp enabled addr func file \
-		      fullname line thread-groups times] {
+		      fullname line thread-groups] {
 	lappend attr_list $attr [set $attr]
     }
 
     set result "bkpt={[mi_build_kv_pairs $attr_list]"
 
     # There are always exceptions.
+
+    # If COND is not preset, do not output it.
+    if {[string length $cond] > 0} {
+	append result ","
+	append result [mi_build_kv_pairs [list "cond" $cond]]
+
+	# When running on a remote, GDB may output who is evaluating
+	# breakpoint conditions.
+	if {[string length ${evaluated-by}] > 0} {
+	    append result [mi_build_kv_pairs \
+			       [list "evaluated-by" ${evaluated-by}]]
+	} else {
+	    append result {(,evaluated-by=".*")?}
+	}
+    }
+
+    append result ","
+    append result [mi_build_kv_pairs [list "times" $times]]
+
     # If SCRIPT and IGNORE are not present, do not output them.
     if {$ignore != 0} {
 	append result ","
@@ -2495,3 +2587,21 @@ proc mi_make_breakpoint_table {bp_list} 
     # Assemble the final regexp.
     return "BreakpointTable={nr_rows=\"$nr\",nr_cols=\"$nc\",$header,$body}"
 }
+
+# Return a 1 for configurations that do not support Python scripting.
+# Note: This also sets various globals that specify which version of Python
+# is in use.  See skip_python_tests_prompt.
+
+proc mi_skip_python_tests {} {
+    global mi_gdb_prompt
+    return [skip_python_tests_prompt "$mi_gdb_prompt$"]
+}
+
+# Check whether we're testing with the remote or extended-remote
+# targets.
+
+proc mi_is_target_remote {} {
+    global mi_gdb_prompt
+
+    return [gdb_is_target_remote_prompt "$mi_gdb_prompt"]
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/objc.exp ./gdb/testsuite/lib/objc.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/objc.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/objc.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 # This test code is part of GDB, the GNU debugger.
 
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/opencl.exp ./gdb/testsuite/lib/opencl.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/opencl.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/opencl.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Free Software Foundation, Inc.
+# Copyright 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 proc gdb_compile_opencl_hostapp {clsource executable options} {
     global srcdir objdir subdir
     set src "${srcdir}/lib/cl_util.c ${srcdir}/lib/opencl_hostapp.c"
-    set binfile ${objdir}/${subdir}/${executable}
+    set binfile [standard_output_file ${executable}]
     set compile_flags [concat additional_flags=-I${srcdir}/lib/ additional_flags=-DCL_SOURCE=$clsource]
     set options_opencl [concat {debug} $compile_flags $options [list libs=-lOpenCL]]
     return [gdb_compile ${src} ${binfile} "executable" ${options_opencl}]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/opencl_hostapp.c ./gdb/testsuite/lib/opencl_hostapp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/opencl_hostapp.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/opencl_hostapp.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pascal.exp ./gdb/testsuite/lib/pascal.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pascal.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/pascal.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2007-2015 Free Software Foundation, Inc.
+# Copyright 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -158,7 +158,7 @@ proc gdb_compile_pascal {source destfile
     } elseif { $pascal_compiler_is_gpc == 1 } {
         set result [gpc_compile $source $destfile $type $options]
     } else {
-	unsupported "No pascal compiler found"
+	unsupported "no pascal compiler found"
 	return "No pascal compiler. Compilation failed."
     }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pdtrace ./gdb/testsuite/lib/pdtrace
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pdtrace	2015-07-06 01:51:07.000000000 +0000
+++ ./gdb/testsuite/lib/pdtrace	2017-03-06 01:52:57.000000000 +0000
@@ -2,7 +2,7 @@
 
 # A Poor(but Free)'s Man dtrace
 #
-# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Oracle, Inc.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pdtrace.in ./gdb/testsuite/lib/pdtrace.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/pdtrace.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/pdtrace.in	2017-03-06 01:49:08.000000000 +0000
@@ -2,7 +2,7 @@
 
 # A Poor(but Free)'s Man dtrace
 #
-# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Oracle, Inc.
 #
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/perftest.exp ./gdb/testsuite/lib/perftest.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/perftest.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/perftest.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,14 +42,13 @@ namespace eval PerfTest {
     # actual compilation.  Return zero if compilation is successful,
     # otherwise return non-zero.
     proc compile {body} {
-	global GDB_PERFTEST_MODE
-
-	if { [info exists GDB_PERFTEST_MODE]
-	     && [string compare $GDB_PERFTEST_MODE "run"] } {
-	    return [uplevel 2 $body]
-	}
+	return [uplevel 2 $body]
+    }
 
-	return 0
+    # Run the startup code.  Return zero if startup is successful,
+    # otherwise return non-zero.
+    proc startup {body} {
+	return [uplevel 2 $body]
     }
 
     # Start up GDB.
@@ -57,7 +56,8 @@ namespace eval PerfTest {
 	uplevel 2 $body
     }
 
-    # Run the performance test.
+    # Run the performance test.  Return zero if the run is successful,
+    # otherwise return non-zero.
     proc run {body} {
 	global timeout
 	global GDB_PERFTEST_TIMEOUT
@@ -68,36 +68,56 @@ namespace eval PerfTest {
 	} else {
 	    set timeout 3000
 	}
-	uplevel 2 $body
+	set result [uplevel 2 $body]
 
 	set timeout $oldtimeout
+	return $result
     }
 
     # The top-level interface to PerfTest.
     # COMPILE is the tcl code to generate and compile source files.
-    # Return zero if compilation is successful,  otherwise return
-    # non-zero.
     # STARTUP is the tcl code to start up GDB.
     # RUN is the tcl code to drive GDB to do some operations.
+    # Each of COMPILE, STARTUP, and RUN return zero if successful, and
+    # non-zero if there's a failure.
+
     proc assemble {compile startup run} {
 	global GDB_PERFTEST_MODE
 
-	if { [eval compile {$compile}] } {
-	    untested "Could not compile source files."
+	if ![info exists GDB_PERFTEST_MODE] {
 	    return
 	}
 
+	if { [string compare $GDB_PERFTEST_MODE "run"] != 0 } {
+	    if { [eval compile {$compile}] } {
+		untested "failed to compile"
+		return
+	    }
+	}
+
 	# Don't execute the run if GDB_PERFTEST_MODE=compile.
-	if { [info exists GDB_PERFTEST_MODE]
-	     && [string compare $GDB_PERFTEST_MODE "compile"] == 0} {
+	if { [string compare $GDB_PERFTEST_MODE "compile"] == 0} {
 	    return
 	}
 
-	eval $startup
+	verbose -log "PerfTest::assemble, startup ..."
+
+	if [eval startup {$startup}] {
+	    fail "startup"
+	    return
+	}
+
+	verbose -log "PerfTest::assemble, done startup"
 
 	_setup_perftest
 
-	eval run {$run}
+	verbose -log "PerfTest::assemble, run ..."
+
+	if [eval run {$run}] {
+	    fail "run"
+	}
+
+	verbose -log "PerfTest::assemble, run complete."
 
 	_teardown_perftest
     }
@@ -109,11 +129,9 @@ proc skip_perf_tests { } {
     global GDB_PERFTEST_MODE
 
     if [info exists GDB_PERFTEST_MODE] {
-
 	if { "$GDB_PERFTEST_MODE" != "compile"
 	     && "$GDB_PERFTEST_MODE" != "run"
 	     && "$GDB_PERFTEST_MODE" != "both" } {
-	    # GDB_PERFTEST_MODE=compile|run|both is allowed.
 	    error "Unknown value of GDB_PERFTEST_MODE."
 	    return 1
 	}
@@ -123,3 +141,17 @@ proc skip_perf_tests { } {
 
     return 1
 }
+
+# Given a list of tcl strings, return the same list as the text form of a
+# python list.
+
+proc tcl_string_list_to_python_list { l } {
+    proc quote { text } {
+	return "\"$text\""
+    }
+    set quoted_list ""
+    foreach elm $l {
+	lappend quoted_list [quote $elm]
+    }
+    return "([join $quoted_list {, }])"
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/prelink-support.exp ./gdb/testsuite/lib/prelink-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/prelink-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/prelink-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ proc symlink_resolve {file} {
 
 	set loop [expr $loop + 1]
 	if {$loop > 30} {
-	    fail "Looping symlink resolution for $file"
+	    fail "looping symlink resolution for $file"
 	    return ""
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/prompt.exp ./gdb/testsuite/lib/prompt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/prompt.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/prompt.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/range-stepping-support.exp ./gdb/testsuite/lib/range-stepping-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/range-stepping-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/range-stepping-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,24 +14,26 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Execute command CMD and check that GDB sends the expected number of
-# vCont;s and vCont;r packets.  Returns 0 if the test passes,
-# otherwise returns 1.
+# vCont;r packet.  Returns 0 if the test passes, otherwise returns 1.
 
-proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
+proc exec_cmd_expect_vCont_count { cmd exp_vCont_r } {
     global gdb_prompt
 
     gdb_test_no_output "set debug remote 1" ""
 
-    set test "${cmd}: vCont;s=${exp_vCont_s} vCont;r=${exp_vCont_r}"
+    set test "${cmd}: vCont;r=${exp_vCont_r}"
     set r_counter 0
     set s_counter 0
     set ret 1
+    # We either get a stop reply in all-stop mode, or an OK in
+    # non-stop mode.
+    set vcont_reply "(T\[\[:xdigit:\]\]\[\[:xdigit:\]\]|OK)"
     gdb_test_multiple $cmd $test {
-	-re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" {
+	-re "vCont;s\[^\r\n\]*Packet received: $vcont_reply" {
 	    incr s_counter
 	    exp_continue
 	}
-	-re "vCont;r\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" {
+	-re "vCont;r\[^\r\n\]*Packet received: $vcont_reply" {
 	    incr r_counter
 	    exp_continue
 	}
@@ -40,7 +42,7 @@ proc exec_cmd_expect_vCont_count { cmd e
 	    exp_continue
 	}
 	-re "$gdb_prompt $" {
-	    if { $r_counter == ${exp_vCont_r} && $s_counter == ${exp_vCont_s} } {
+	    if { $r_counter == ${exp_vCont_r} } {
 		pass $test
 		set ret 0
 	    } else {
@@ -52,3 +54,24 @@ proc exec_cmd_expect_vCont_count { cmd e
     gdb_test_no_output "set debug remote 0" ""
     return $ret
 }
+
+# Check whether range stepping is supported by the target.
+
+proc gdb_range_stepping_enabled { } {
+    global gdb_prompt
+
+    set command "set range-stepping on"
+    set message "probe range-stepping support"
+    gdb_test_multiple $command $message {
+        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
+	    pass $message
+	    return 0
+	}
+        -re "^$command\r\n$gdb_prompt $" {
+	    pass $message
+	    return 1
+	}
+    }
+
+    return 0
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/read1.c ./gdb/testsuite/lib/read1.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/read1.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/read1.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This is part of GDB, the GNU debugger.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/rust-support.exp ./gdb/testsuite/lib/rust-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/rust-support.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/lib/rust-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,37 @@
+# Copyright 2016-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Auxiliary function to set the language to Rust.
+# The result is 1 (true) for success, 0 (false) for failure.
+proc set_lang_rust {} {
+    if [gdb_test_no_output "set language rust"] {
+	return 0
+    }
+    if [gdb_test "show language" ".* source language is \"rust\"." \
+	   "set language to \"rust\""] {
+	return 0
+    }
+    return 1
+}
+
+proc gdb_compile_rust {sources dest options} {
+    if {[llength $sources] > 1} {
+	error "gdb rust setup can only compile one source file at a time"
+    }
+    if {[gdb_compile [lindex $sources 0] $dest executable $options] != ""} {
+	return -1
+    }
+    return ""
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/selftest-support.exp ./gdb/testsuite/lib/selftest-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/selftest-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/selftest-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright 2003-2015 Free Software Foundation, Inc.
+# Copyright 2003-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -72,7 +72,7 @@ proc selftest_setup { executable functio
     }
 
     if { $gdb_file_cmd_debug_info != "debug" } then {
-	untested "No debug information, skipping testcase."
+	untested "no debug information, skipping testcase."
 	return -1
     }
 
@@ -94,6 +94,11 @@ proc selftest_setup { executable functio
         -re "Starting program.*Breakpoint \[0-9\]+,.*$function .data.*$gdb_prompt $" {
             xfail "$description (line numbers scrambled?)"
         }
+	-re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {
+	    # $function may be inlined, so the program stops at the line
+	    # calling $function.
+	    pass "$description"
+	}
         -re "vfork: No more processes.*$gdb_prompt $" {
             fail "$description (out of virtual memory)"
             set timeout $oldtimeout
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/set_unbuffered_mode.c ./gdb/testsuite/lib/set_unbuffered_mode.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/set_unbuffered_mode.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/set_unbuffered_mode.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/trace-support.exp ./gdb/testsuite/lib/trace-support.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/trace-support.exp	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/trace-support.exp	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,37 @@
 
 
 #
+# Program counter / stack pointer / frame pointer for supported targets.
+# Used in many tests, kept here to avoid duplication.
+#
+
+if [is_amd64_regs_target] {
+    set fpreg "rbp"
+    set spreg "rsp"
+    set pcreg "rip"
+} elseif [is_x86_like_target] {
+    set fpreg "ebp"
+    set spreg "esp"
+    set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set fpreg "x29"
+    set spreg "sp"
+    set pcreg "pc"
+} elseif [istarget "powerpc*-*-*"] {
+    set fpreg "r31"
+    set spreg "r1"
+    set pcreg "pc"
+} elseif { [istarget "s390*-*-*"] } {
+    set fpreg "r11"
+    set spreg "r15"
+    set pcreg "pc"
+} else {
+    set fpreg "fp"
+    set spreg "sp"
+    set pcreg "pc"
+}
+
+#
 # Procedure: gdb_target_supports_trace
 # Returns true if GDB is connected to a target that supports tracing.
 # Allows tests to abort early if not running on a trace-aware target.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/unbuffer_output.c ./gdb/testsuite/lib/unbuffer_output.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/lib/unbuffer_output.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/testsuite/lib/unbuffer_output.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/Makefile.in ./gdb/testsuite/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/Makefile.in	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/Makefile.in	2017-03-06 01:49:07.000000000 +0000
@@ -1,5 +1,5 @@
 # Makefile for regression testing the GNU debugger.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -21,6 +21,7 @@ srcdir = @srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
 
 target_alias = @target_noncanonical@
 program_transform_name = @program_transform_name@
@@ -32,12 +33,6 @@ SHELL = @SHELL@
 EXEEXT = @EXEEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
-ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.btrace gdb.cell gdb.cp \
-	gdb.disasm gdb.dlang gdb.dwarf2 gdb.fortran gdb.gdb gdb.go \
-	gdb.java gdb.linespec gdb.mi gdb.modula2 gdb.multi \
-	gdb.objc gdb.opencl gdb.opt gdb.pascal gdb.python gdb.server \
-	gdb.stabs gdb.reverse gdb.threads gdb.trace gdb.xml \
-	$(SUBDIRS)
 
 EXTRA_RULES = @EXTRA_RULES@
 
@@ -57,6 +52,12 @@ RUNTESTFLAGS =
 
 FORCE_PARALLEL =
 
+# Default number of iterations that we will use to run the testsuite
+# if the user does not specify the RACY_ITER environment variable
+# (e.g., when the user calls the make rule directly from the command
+# line).
+DEFAULT_RACY_ITER = 3
+
 RUNTEST_FOR_TARGET = `\
   if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
     echo $${srcdir}/../../dejagnu/runtest; \
@@ -125,7 +126,7 @@ uninstall: force
 	@echo "set target_alias $(target_alias)" >> ./tmp0
 	@echo "set target_triplet ${target_canonical}" >> ./tmp0
 	@echo "set build_triplet ${build_canonical}" >> ./tmp0
-	@echo "set srcdir ${srcdir}" >> ./tmp0
+	@echo "set srcdir ${abs_srcdir}" >> ./tmp0
 	@echo "set tool gdb" >> ./tmp0
 	@echo 'source $${srcdir}/lib/append_gdb_boards_dir.exp' >> ./tmp0
 	@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
@@ -139,14 +140,13 @@ installcheck:
 # See whether -j was given to make.  Either it was given with no
 # arguments, and appears as "j" in the first word, or it was given an
 # argument and appears as "-j" in a separate word.
-@GMAKE_TRUE@saw_dash_j = $(or $(findstring j,$(firstword $(MAKEFLAGS))),$(filter -j,$(MAKEFLAGS)))
+saw_dash_j = $(or $(findstring j,$(firstword $(MAKEFLAGS))),$(filter -j,$(MAKEFLAGS)))
 
-# For GNU make, try to run the tests in parallel if any -j option is
-# given.  If RUNTESTFLAGS is not empty, then by default the tests will
-# be serialized.  This can be overridden by setting FORCE_PARALLEL to
-# any non-empty value.  For a non-GNU make, do not parallelize.
-@GMAKE_TRUE@CHECK_TARGET = $(if $(FORCE_PARALLEL),check-parallel,$(if $(RUNTESTFLAGS),check-single,$(if $(saw_dash_j),check-parallel,check-single)))
-@GMAKE_FALSE@CHECK_TARGET = check-single
+# Try to run the tests in parallel if any -j option is given.  If RUNTESTFLAGS
+# is not empty, then by default the tests will be serialized.  This can be
+# overridden by setting FORCE_PARALLEL to any non-empty value.
+CHECK_TARGET_TMP = $(if $(FORCE_PARALLEL),check-parallel,$(if $(RUNTESTFLAGS),check-single,$(if $(saw_dash_j),check-parallel,check-single)))
+CHECK_TARGET = $(if $(RACY_ITER),$(addsuffix -racy,$(CHECK_TARGET_TMP)),$(CHECK_TARGET_TMP))
 
 # Note that we must resort to a recursive make invocation here,
 # because GNU make 3.82 has a bug preventing MAKEFLAGS from being used
@@ -169,7 +169,7 @@ DO_RUNTEST = \
 	if [ -f $${rootme}/../../expect/expect ] ; then  \
 	  TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
 	  export TCL_LIBRARY ; fi ; \
-	$(RUNTEST)
+	$(RUNTEST) --status
 
 # TESTS exists for the user to pass on the command line to easily
 # say "Only run these tests."  With check-single it's not necessary, but
@@ -177,32 +177,77 @@ DO_RUNTEST = \
 # of tests.  For consistency we support it for check-single as well.
 # To specify all tests in a subdirectory, use TESTS=gdb.subdir/*.exp.
 # E.g., make check TESTS="gdb.server/*.exp gdb.threads/*.exp".
-@GMAKE_TRUE@TESTS :=
-@GMAKE_FALSE@TESTS =
+TESTS :=
 
-@GMAKE_TRUE@ifeq ($(strip $(TESTS)),)
-@GMAKE_TRUE@expanded_tests_or_none :=
-@GMAKE_TRUE@else
-@GMAKE_TRUE@expanded_tests := $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/,$(TESTS))))
-@GMAKE_TRUE@expanded_tests_or_none := $(or $(expanded_tests),no-matching-tests-found)
-@GMAKE_TRUE@endif
-@GMAKE_FALSE@expanded_tests_or_none = $(TESTS)
+ifeq ($(strip $(TESTS)),)
+expanded_tests_or_none :=
+else
+expanded_tests := $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/,$(TESTS))))
+expanded_tests_or_none := $(or $(expanded_tests),no-matching-tests-found)
+endif
 
 # Shorthand for running all the tests in a single directory.
-@GMAKE_TRUE@check-gdb.%:
-@GMAKE_TRUE@	$(MAKE) check TESTS="gdb.$*/*.exp"
+check-gdb.%:
+	$(MAKE) check TESTS="gdb.$*/*.exp"
 
 check-single:
 	$(DO_RUNTEST) $(RUNTESTFLAGS) $(expanded_tests_or_none)
 
+check-single-racy:
+	-rm -rf cache racy_outputs temp
+	mkdir -p racy_outputs; \
+	racyiter="$(RACY_ITER)"; \
+	test "x$$racyiter" == "x" && \
+	  racyiter=$(DEFAULT_RACY_ITER); \
+	if test $$racyiter -lt 2 ; then \
+	  echo "RACY_ITER must be at least 2."; \
+	  exit 1; \
+	fi; \
+	trap "exit" INT; \
+	for n in `seq $$racyiter` ; do \
+	  mkdir -p racy_outputs/$$n; \
+	  $(DO_RUNTEST) --outdir=racy_outputs/$$n $(RUNTESTFLAGS) \
+	    $(expanded_tests_or_none); \
+	done; \
+	$(srcdir)/analyze-racy-logs.py \
+	  `ls racy_outputs/*/gdb.sum` > racy.sum; \
+	sed -n '/=== gdb Summary ===/,$$ p' racy.sum
+
 check-parallel:
 	-rm -rf cache outputs temp
 	$(MAKE) -k do-check-parallel; \
+	result=$$?; \
 	$(SHELL) $(srcdir)/dg-extract-results.sh \
 	  `find outputs -name gdb.sum -print` > gdb.sum; \
 	$(SHELL) $(srcdir)/dg-extract-results.sh -L \
-	  `find outputs -name gdb.log -print` > gdb.log
-	@sed -n '/=== gdb Summary ===/,$$ p' gdb.sum
+	  `find outputs -name gdb.log -print` > gdb.log; \
+	sed -n '/=== gdb Summary ===/,$$ p' gdb.sum; \
+	exit $$result
+
+check-parallel-racy:
+	-rm -rf cache racy_outputs temp
+	racyiter="$(RACY_ITER)"; \
+	test "x$$racyiter" == "x" && \
+	  racyiter=$(DEFAULT_RACY_ITER); \
+	if test $$racyiter -lt 2 ; then \
+	  echo "RACY_ITER must be at least 2."; \
+	  exit 1; \
+	fi; \
+	trap "exit" INT; \
+	for n in `seq $$racyiter` ; do \
+	  $(MAKE) -k do-check-parallel-racy \
+	    RACY_OUTPUT_N=$$n; \
+	  $(SHELL) $(srcdir)/dg-extract-results.sh \
+	    `find racy_outputs/$$n -name gdb.sum -print` > \
+	    racy_outputs/$$n/gdb.sum; \
+	  $(SHELL) $(srcdir)/dg-extract-results.sh -L \
+	    `find racy_outputs/$$n -name gdb.log -print` > \
+	    racy_outputs/$$n/gdb.log; \
+	  sed -n '/=== gdb Summary ===/,$$ p' racy_outputs/$$n/gdb.sum; \
+	done; \
+	$(srcdir)/analyze-racy-logs.py \
+	  `ls racy_outputs/*/gdb.sum` > racy.sum; \
+	sed -n '/=== gdb Summary ===/,$$ p' racy.sum
 
 # Turn a list of .exp files into "check/" targets.  Only examine .exp
 # files appearing in a gdb.* directory -- we don't want to pick up
@@ -212,31 +257,72 @@ check-parallel:
 # them to the front of the list to try to lessen the overall time
 # taken by the test suite -- if one of these tests happens to be run
 # late, it will cause the overall time to increase.
-@GMAKE_TRUE@ifeq ($(strip $(TESTS)),)
+ifeq ($(strip $(TESTS)),)
 slow_tests = gdb.base/break-interp.exp gdb.base/interp.exp \
 	gdb.base/multi-forks.exp
-@GMAKE_TRUE@all_tests := $(shell cd $(srcdir) && find gdb.* -name '*.exp' -print)
-@GMAKE_TRUE@reordered_tests := $(slow_tests) $(filter-out $(slow_tests),$(all_tests))
-@GMAKE_TRUE@TEST_TARGETS := $(addprefix check/,$(reordered_tests))
-@GMAKE_TRUE@else
-@GMAKE_TRUE@TEST_TARGETS := $(addprefix check/,$(expanded_tests_or_none))
-@GMAKE_TRUE@endif
+all_tests := $(shell cd $(srcdir) && find gdb.* -name '*.exp' -print)
+reordered_tests := $(slow_tests) $(filter-out $(slow_tests),$(all_tests))
+TEST_TARGETS := $(addprefix $(if $(RACY_ITER),check-racy,check)/,$(reordered_tests))
+else
+TEST_TARGETS := $(addprefix $(if $(RACY_ITER),check-racy,check)/,$(expanded_tests_or_none))
+endif
 
 do-check-parallel: $(TEST_TARGETS)
 	@:
 
-@GMAKE_TRUE@check/%.exp:
-@GMAKE_TRUE@	-mkdir -p outputs/$*
-@GMAKE_TRUE@	@$(DO_RUNTEST) GDB_PARALLEL=yes --outdir=outputs/$* $*.exp $(RUNTESTFLAGS)
+check/%.exp:
+	-mkdir -p outputs/$*
+	@$(DO_RUNTEST) GDB_PARALLEL=yes --outdir=outputs/$* $*.exp $(RUNTESTFLAGS)
+
+do-check-parallel-racy: $(TEST_TARGETS)
+	@:
+
+check-racy/%.exp:
+	-mkdir -p racy_outputs/$(RACY_OUTPUT_N)/$*
+	$(DO_RUNTEST) GDB_PARALLEL=yes \
+	  --outdir=racy_outputs/$(RACY_OUTPUT_N)/$* $*.exp \
+	  $(RUNTESTFLAGS)
 
 check/no-matching-tests-found:
 	@echo ""
 	@echo "No matching tests found."
 	@echo ""
 
+# Utility rule invoked by step 2 of the build-perf rule.
+workers/%.worker:
+	mkdir -p gdb.perf/outputs/$*
+	$(DO_RUNTEST) --outdir=gdb.perf/outputs/$* lib/build-piece.exp WORKER=$* GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=build-pieces
+
+# Utility rule to build tests that support it in parallel.
+# The build is broken into 3 steps distinguished by GDB_PERFTEST_SUBMODE:
+# gen-workers, build-pieces, final.
+#
+# GDB_PERFTEST_MODE appears *after* RUNTESTFLAGS here because we don't want
+# anything in RUNTESTFLAGS to override it.
+#
+# We don't delete the outputs directory here as these programs can take
+# awhile to build, and perftest.exp has support for deciding whether to
+# recompile them.  If you want to remove these directories, make clean.
+#
+# The point of step 1 is to construct the set of worker tasks for step 2.
+# All of the information needed by build-piece.exp is contained in the name
+# of the generated .worker file.
+build-perf: $(abs_builddir)/site.exp
+	rm -rf gdb.perf/workers
+	mkdir -p gdb.perf/workers
+	@: Step 1: Generate the build .worker files.
+	$(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf/workers GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=gen-workers
+	@: Step 2: Compile the pieces.  Here is the build parallelism.
+	$(MAKE) $$(cd gdb.perf && echo workers/*/*.worker)
+	@: Step 3: Do the final link.
+	$(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=final
+
+# The default is to both compile and run the tests.
+GDB_PERFTEST_MODE = both
+
 check-perf: all $(abs_builddir)/site.exp
 	@if test ! -d gdb.perf; then mkdir gdb.perf; fi
-	$(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf GDB_PERFTEST_MODE=both $(RUNTESTFLAGS)
+	$(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf GDB_PERFTEST_MODE=$(GDB_PERFTEST_MODE) $(RUNTESTFLAGS)
 
 force:;
 
@@ -245,30 +331,13 @@ clean mostlyclean:
 	-rm -f core.* *.tf *.cl tracecommandsscript copy1.txt zzz-gdbscript
 	-rm -f *.dwo *.dwp
 	-rm -rf outputs temp cache
+	-rm -rf gdb.perf/workers gdb.perf/outputs gdb.perf/temp gdb.perf/cache
 	-rm -f read1.so expect-read1
-	if [ x"${ALL_SUBDIRS}" != x ] ; then \
-	    for dir in ${ALL_SUBDIRS}; \
-	    do \
-		    echo "$$dir:"; \
-		    if [ -d $$dir ]; then \
-			    (cd $$dir; $(MAKE) clean); \
-		    fi; \
-	    done ; \
-	else true; fi
 
 distclean maintainer-clean realclean: clean
 	-rm -f *~ core
 	-rm -f Makefile config.status *-init.exp
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-	if [ x"${ALL_SUBDIRS}" != x ] ; then \
-	    for dir in ${ALL_SUBDIRS}; \
-	    do \
-		    echo "$$dir:"; \
-		    if [ -d $$dir ]; then \
-			    (cd $$dir; $(MAKE) distclean); \
-		    fi; \
-	    done ; \
-	else true; fi
 
 Makefile : Makefile.in config.status $(host_makefile_frag)
 	$(SHELL) config.status
@@ -303,3 +372,6 @@ read1.so: lib/read1.c
 # Build the read1 machinery.
 .PHONY: read1
 read1: read1.so expect-read1
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/README ./gdb/testsuite/README
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/testsuite/README	2015-07-06 01:48:29.000000000 +0000
+++ ./gdb/testsuite/README	2017-03-06 01:49:07.000000000 +0000
@@ -25,6 +25,76 @@ The second is to cd to the testsuite dir
 (The `site.exp' file contains a handful of useful variables like host
 and target triplets, and pathnames.)
 
+Parallel testing
+****************
+
+If not testing with a remote host (in DejaGnu's sense), you can run
+the GDB test suite in a fully parallel mode.  In this mode, each .exp
+file runs separately and maybe simultaneously.  The test suite ensures
+that all the temporary files created by the test suite do not clash,
+by putting them into separate directories.  This mode is primarily
+intended for use by the Makefile.
+
+For GNU make, the Makefile tries to run the tests in parallel mode if
+any -j option is given.  For a non-GNU make, tests are not
+parallelized.
+
+If RUNTESTFLAGS is not empty, then by default the tests are
+serialized.  This can be overridden by either using the
+`check-parallel' target in the Makefile, or by setting FORCE_PARALLEL
+to any non-empty value:
+
+	make check-parallel RUNTESTFLAGS="--target_board=native-gdbserver"
+	make check RUNTESTFLAGS="--target_board=native-gdbserver" FORCE_PARALLEL=1
+
+If you want to use runtest directly instead of using the Makefile, see
+the description of GDB_PARALLEL below.
+
+Racy testcases
+**************
+
+Sometimes, new testcases are added to the testsuite that are not
+entirely deterministic, and can randomly pass or fail.  We call them
+"racy testcases", and they can be bothersome when one is comparing
+different testsuite runs.  In order to help identifying them, it is
+possible to run the tests several times in a row and ask the testsuite
+machinery to analyze the results.  To do that, you need to specify the
+RACY_ITER environment variable to make:
+
+	make check RACY_ITER=5 -j4
+
+The value assigned to RACY_ITER represents the number of times you
+wish to run the tests in sequence (in the example above, the entire
+testsuite will be executed 5 times in a row, in parallel).  It is also
+possible to check just a specific test:
+
+	make check TESTS='gdb.base/default.exp' RACY_ITER=3
+
+One can also decide to call the Makefile rules by hand inside the
+gdb/testsuite directory, e.g.:
+
+	make check-paralell-racy -j4
+
+In which case the value of the DEFAULT_RACY_ITER variable (inside
+gdb/testsuite/Makefile.in) will be used to determine how many
+iterations will be run.
+
+After running the tests, you shall see a file name 'racy.sum' in the
+gdb/testsuite directory.  You can also inspect the generated *.log and
+*.sum files by looking into the gdb/testsuite/racy_ouputs directory.
+
+If you already have *.sum files generated from previous testsuite runs
+and you would like to analyze them without having to run the testsuite
+again, you can also use the 'analyze-racy-logs.py' script directly.
+It is located in the gdb/testsuite/ directory, and it expects a list
+of two or more *.sum files to be provided as its argument.  For
+example:
+
+	./gdb/testsuite/analyze-racy-logs.py testsuite-01/gdb.sum \
+	  testsuite-02/gdb.sum testsuite-03/gdb.sum
+
+The script will output its analysis report to the standard output.
+
 Running the Performance Tests
 *****************************
 
@@ -125,19 +195,24 @@ a .gdbinit.  For example:
 
 GDB_PARALLEL
 
-When testing natively (that is, not with a remote host), you can run
-the GDB test suite in a fully parallel mode.  In this mode, each .exp
-file runs separately and maybe simultaneously.  The test suite will
-ensure that all the temporary files created by the test suite do not
-clash, by putting them into separate directories.  This mode is
-primarily intended for use by the Makefile.
-
-To use this mode, set the GDB_PARALLEL on the runtest command line.
-Before starting the tests, you must ensure that the directories cache,
-outputs, and temp in the test suite build directory are either empty
-or have been deleted.  cache in particular is used to share data
-across invocations of runtest, and files there may affect the test
-results.  Note that the Makefile automatically does these deletions.
+To use parallel testing mode without using the the Makefile, set
+GDB_PARALLEL on the runtest command line to "yes".  Before starting
+the tests, you must ensure that the directories cache, outputs, and
+temp in the test suite build directory are either empty or have been
+deleted.  cache in particular is used to share data across invocations
+of runtest, and files there may affect the test results.  The Makefile
+automatically does these deletions.
+
+FORCE_PARALLEL
+
+Setting FORCE_PARALLEL to any non-empty value forces parallel testing
+mode even if RUNTESTFLAGS is not empty.
+
+FORCE_SEPARATE_MI_TTY
+
+Setting FORCE_MI_SEPARATE_UI to 1 forces all MI testing to start GDB
+in console mode, with MI running on a separate TTY, on a secondary UI
+started with "new-ui".
 
 GDB_INOTIFY
 
@@ -369,6 +444,9 @@ gdb,predefined_tsv
 
   The predefined trace state variables the board has.
 
+gdb,no_thread_names
+
+  The target doesn't support thread names.
 
 Testsuite Organization
 **********************
@@ -406,7 +484,7 @@ ANSI/ISO C, and C++.
 gdb.<lang>
 
 Language-specific tests for any language besides C.  Examples are
-gdb.cp for C++ and gdb.java for Java.
+gdb.cp for C++ and gdb.rust for Rust.
 
 gdb.<platform>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread.c ./gdb/thread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/thread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Multi-process/thread control for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    Contributed by Lynx Real-Time Systems, Inc.  Los Gatos, CA.
 
@@ -42,7 +42,8 @@
 #include "cli/cli-decode.h"
 #include "gdb_regex.h"
 #include "cli/cli-utils.h"
-#include "continuations.h"
+#include "thread-fsm.h"
+#include "tid-parse.h"
 
 /* Definition of struct thread_info exported to gdbthread.h.  */
 
@@ -158,6 +159,19 @@ thread_has_single_step_breakpoint_here (
 	  && breakpoint_has_location_inserted_here (ss_bps, aspace, addr));
 }
 
+/* See gdbthread.h.  */
+
+void
+thread_cancel_execution_command (struct thread_info *thr)
+{
+  if (thr->thread_fsm != NULL)
+    {
+      thread_fsm_clean_up (thr->thread_fsm, thr);
+      thread_fsm_delete (thr->thread_fsm);
+      thr->thread_fsm = NULL;
+    }
+}
+
 static void
 clear_thread_inferior_resources (struct thread_info *tp)
 {
@@ -169,14 +183,13 @@ clear_thread_inferior_resources (struct 
   delete_at_next_stop (&tp->control.exception_resume_breakpoint);
   delete_at_next_stop (&tp->control.single_step_breakpoints);
 
-  delete_longjmp_breakpoint_at_next_stop (tp->num);
+  delete_longjmp_breakpoint_at_next_stop (tp->global_num);
 
   bpstat_clear (&tp->control.stop_bpstat);
 
   btrace_teardown (tp);
 
-  do_all_intermediate_continuations_thread (tp, 1);
-  do_all_continuations_thread (tp, 1);
+  thread_cancel_execution_command (tp);
 }
 
 static void
@@ -214,24 +227,38 @@ init_thread_list (void)
   threads_executing = 0;
 }
 
-/* Allocate a new thread with target id PTID and add it to the thread
-   list.  */
+/* Allocate a new thread of inferior INF with target id PTID and add
+   it to the thread list.  */
 
 static struct thread_info *
-new_thread (ptid_t ptid)
+new_thread (struct inferior *inf, ptid_t ptid)
 {
   struct thread_info *tp;
 
-  tp = xcalloc (1, sizeof (*tp));
+  gdb_assert (inf != NULL);
+
+  tp = XCNEW (struct thread_info);
 
   tp->ptid = ptid;
-  tp->num = ++highest_thread_num;
-  tp->next = thread_list;
-  thread_list = tp;
+  tp->global_num = ++highest_thread_num;
+  tp->inf = inf;
+  tp->per_inf_num = ++inf->highest_thread_num;
+
+  if (thread_list == NULL)
+    thread_list = tp;
+  else
+    {
+      struct thread_info *last;
+
+      for (last = thread_list; last->next != NULL; last = last->next)
+	;
+      last->next = tp;
+    }
 
   /* Nothing to follow yet.  */
   tp->pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
   tp->state = THREAD_STOPPED;
+  tp->suspend.waitstatus.kind = TARGET_WAITKIND_IGNORE;
 
   return tp;
 }
@@ -240,6 +267,8 @@ struct thread_info *
 add_thread_silent (ptid_t ptid)
 {
   struct thread_info *tp;
+  struct inferior *inf = find_inferior_ptid (ptid);
+  gdb_assert (inf != NULL);
 
   tp = find_thread_ptid (ptid);
   if (tp)
@@ -257,7 +286,7 @@ add_thread_silent (ptid_t ptid)
 
       if (ptid_equal (inferior_ptid, ptid))
 	{
-	  tp = new_thread (null_ptid);
+	  tp = new_thread (inf, null_ptid);
 
 	  /* Make switch_to_thread not read from the thread.  */
 	  tp->state = THREAD_EXITED;
@@ -281,7 +310,7 @@ add_thread_silent (ptid_t ptid)
 	delete_thread (ptid);
     }
 
-  tp = new_thread (ptid);
+  tp = new_thread (inf, ptid);
   observer_notify_new_thread (tp);
 
   return tp;
@@ -307,6 +336,86 @@ add_thread (ptid_t ptid)
   return add_thread_with_info (ptid, NULL);
 }
 
+/* Add TP to the end of the step-over chain LIST_P.  */
+
+static void
+step_over_chain_enqueue (struct thread_info **list_p, struct thread_info *tp)
+{
+  gdb_assert (tp->step_over_next == NULL);
+  gdb_assert (tp->step_over_prev == NULL);
+
+  if (*list_p == NULL)
+    {
+      *list_p = tp;
+      tp->step_over_prev = tp->step_over_next = tp;
+    }
+  else
+    {
+      struct thread_info *head = *list_p;
+      struct thread_info *tail = head->step_over_prev;
+
+      tp->step_over_prev = tail;
+      tp->step_over_next = head;
+      head->step_over_prev = tp;
+      tail->step_over_next = tp;
+    }
+}
+
+/* Remove TP from step-over chain LIST_P.  */
+
+static void
+step_over_chain_remove (struct thread_info **list_p, struct thread_info *tp)
+{
+  gdb_assert (tp->step_over_next != NULL);
+  gdb_assert (tp->step_over_prev != NULL);
+
+  if (*list_p == tp)
+    {
+      if (tp == tp->step_over_next)
+	*list_p = NULL;
+      else
+	*list_p = tp->step_over_next;
+    }
+
+  tp->step_over_prev->step_over_next = tp->step_over_next;
+  tp->step_over_next->step_over_prev = tp->step_over_prev;
+  tp->step_over_prev = tp->step_over_next = NULL;
+}
+
+/* See gdbthread.h.  */
+
+struct thread_info *
+thread_step_over_chain_next (struct thread_info *tp)
+{
+  struct thread_info *next = tp->step_over_next;
+
+  return (next == step_over_queue_head ? NULL : next);
+}
+
+/* See gdbthread.h.  */
+
+int
+thread_is_in_step_over_chain (struct thread_info *tp)
+{
+  return (tp->step_over_next != NULL);
+}
+
+/* See gdbthread.h.  */
+
+void
+thread_step_over_chain_enqueue (struct thread_info *tp)
+{
+  step_over_chain_enqueue (&step_over_queue_head, tp);
+}
+
+/* See gdbthread.h.  */
+
+void
+thread_step_over_chain_remove (struct thread_info *tp)
+{
+  step_over_chain_remove (&step_over_queue_head, tp);
+}
+
 /* Delete thread PTID.  If SILENT, don't notify the observer of this
    exit.  */
 static void
@@ -323,6 +432,10 @@ delete_thread_1 (ptid_t ptid, int silent
   if (!tp)
     return;
 
+  /* Dead threads don't need to step-over.  Remove from queue.  */
+  if (tp->step_over_next != NULL)
+    thread_step_over_chain_remove (tp);
+
   /* If this is the current thread, or there's code out there that
      relies on it existing (refcount > 0) we can't delete yet.  Mark
      it as exited, and notify it.  */
@@ -377,12 +490,24 @@ delete_thread_silent (ptid_t ptid)
 }
 
 struct thread_info *
-find_thread_id (int num)
+find_thread_global_id (int global_id)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
-    if (tp->num == num)
+    if (tp->global_num == global_id)
+      return tp;
+
+  return NULL;
+}
+
+static struct thread_info *
+find_thread_id (struct inferior *inf, int thr_num)
+{
+  struct thread_info *tp;
+
+  for (tp = thread_list; tp; tp = tp->next)
+    if (tp->inf == inf && tp->per_inf_num == thr_num)
       return tp;
 
   return NULL;
@@ -444,38 +569,38 @@ thread_count (void)
 }
 
 int
-valid_thread_id (int num)
+valid_global_thread_id (int global_id)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
-    if (tp->num == num)
+    if (tp->global_num == global_id)
       return 1;
 
   return 0;
 }
 
 int
-pid_to_thread_id (ptid_t ptid)
+ptid_to_global_thread_id (ptid_t ptid)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
     if (ptid_equal (tp->ptid, ptid))
-      return tp->num;
+      return tp->global_num;
 
   return 0;
 }
 
 ptid_t
-thread_id_to_pid (int num)
+global_thread_id_to_ptid (int global_id)
 {
-  struct thread_info *thread = find_thread_id (num);
+  struct thread_info *thread = find_thread_global_id (global_id);
 
   if (thread)
     return thread->ptid;
   else
-    return pid_to_ptid (-1);
+    return minus_one_ptid;
 }
 
 int
@@ -500,7 +625,7 @@ first_thread_of_process (int pid)
 
   for (tp = thread_list; tp; tp = tp->next)
     if (pid == -1 || ptid_get_pid (tp->ptid) == pid)
-      if (ret == NULL || tp->num < ret->num)
+      if (ret == NULL || tp->global_num < ret->global_num)
 	ret = tp;
 
   return ret;
@@ -584,17 +709,17 @@ do_captured_list_thread_ids (struct ui_o
 	continue;
 
       if (ptid_equal (tp->ptid, inferior_ptid))
-	current_thread = tp->num;
+	current_thread = tp->global_num;
 
       num++;
-      ui_out_field_int (uiout, "thread-id", tp->num);
+      uiout->field_int ("thread-id", tp->global_num);
     }
 
   do_cleanups (cleanup_chain);
 
   if (current_thread != -1)
-    ui_out_field_int (uiout, "current-thread-id", current_thread);
-  ui_out_field_int (uiout, "number-of-threads", num);
+    uiout->field_int ("current-thread-id", current_thread);
+  uiout->field_int ("number-of-threads", num);
   return GDB_RC_OK;
 }
 
@@ -654,7 +779,7 @@ delete_exited_threads (void)
 static void
 disable_thread_stack_temporaries (void *data)
 {
-  ptid_t *pd = data;
+  ptid_t *pd = (ptid_t *) data;
   struct thread_info *tp = find_thread_ptid (*pd);
 
   if (tp != NULL)
@@ -680,7 +805,7 @@ enable_thread_stack_temporaries (ptid_t 
 
   tp->stack_temporaries_enabled = 1;
   tp->stack_temporaries = NULL;
-  data = (ptid_t *) xmalloc (sizeof (ptid_t));
+  data = XNEW (ptid_t);
   *data = ptid;
   c = make_cleanup (disable_thread_stack_temporaries, data);
 
@@ -768,44 +893,84 @@ thread_change_ptid (ptid_t old_ptid, pti
   observer_notify_thread_ptid_changed (old_ptid, new_ptid);
 }
 
+/* See gdbthread.h.  */
+
+void
+set_resumed (ptid_t ptid, int resumed)
+{
+  struct thread_info *tp;
+  int all = ptid_equal (ptid, minus_one_ptid);
+
+  if (all || ptid_is_pid (ptid))
+    {
+      for (tp = thread_list; tp; tp = tp->next)
+	if (all || ptid_get_pid (tp->ptid) == ptid_get_pid (ptid))
+	  tp->resumed = resumed;
+    }
+  else
+    {
+      tp = find_thread_ptid (ptid);
+      gdb_assert (tp != NULL);
+      tp->resumed = resumed;
+    }
+}
+
+/* Helper for set_running, that marks one thread either running or
+   stopped.  */
+
+static int
+set_running_thread (struct thread_info *tp, int running)
+{
+  int started = 0;
+
+  if (running && tp->state == THREAD_STOPPED)
+    started = 1;
+  tp->state = running ? THREAD_RUNNING : THREAD_STOPPED;
+
+  if (!running)
+    {
+      /* If the thread is now marked stopped, remove it from
+	 the step-over queue, so that we don't try to resume
+	 it until the user wants it to.  */
+      if (tp->step_over_next != NULL)
+	thread_step_over_chain_remove (tp);
+    }
+
+  return started;
+}
+
 void
 set_running (ptid_t ptid, int running)
 {
   struct thread_info *tp;
   int all = ptid_equal (ptid, minus_one_ptid);
+  int any_started = 0;
 
   /* We try not to notify the observer if no thread has actually changed 
      the running state -- merely to reduce the number of messages to 
      frontend.  Frontend is supposed to handle multiple *running just fine.  */
   if (all || ptid_is_pid (ptid))
     {
-      int any_started = 0;
-
       for (tp = thread_list; tp; tp = tp->next)
 	if (all || ptid_get_pid (tp->ptid) == ptid_get_pid (ptid))
 	  {
 	    if (tp->state == THREAD_EXITED)
 	      continue;
-	    if (running && tp->state == THREAD_STOPPED)
+
+	    if (set_running_thread (tp, running))
 	      any_started = 1;
-	    tp->state = running ? THREAD_RUNNING : THREAD_STOPPED;
 	  }
-      if (any_started)
-	observer_notify_target_resumed (ptid);
     }
   else
     {
-      int started = 0;
-
       tp = find_thread_ptid (ptid);
-      gdb_assert (tp);
+      gdb_assert (tp != NULL);
       gdb_assert (tp->state != THREAD_EXITED);
-      if (running && tp->state == THREAD_STOPPED)
- 	started = 1;
-      tp->state = running ? THREAD_RUNNING : THREAD_STOPPED;
-      if (started)
-  	observer_notify_target_resumed (ptid);
+      if (set_running_thread (tp, running))
+	any_started = 1;
     }
+  if (any_started)
+    observer_notify_target_resumed (ptid);
 }
 
 static int
@@ -924,9 +1089,8 @@ finish_thread_state (ptid_t ptid)
   	    continue;
 	  if (all || ptid_get_pid (ptid) == ptid_get_pid (tp->ptid))
 	    {
-	      if (tp->executing && tp->state == THREAD_STOPPED)
+	      if (set_running_thread (tp, tp->executing))
 		any_started = 1;
-	      tp->state = tp->executing ? THREAD_RUNNING : THREAD_STOPPED;
 	    }
 	}
     }
@@ -936,9 +1100,8 @@ finish_thread_state (ptid_t ptid)
       gdb_assert (tp);
       if (tp->state != THREAD_EXITED)
 	{
-	  if (tp->executing && tp->state == THREAD_STOPPED)
+	  if (set_running_thread (tp, tp->executing))
 	    any_started = 1;
-	  tp->state = tp->executing ? THREAD_RUNNING : THREAD_STOPPED;
 	}
     }
 
@@ -949,13 +1112,55 @@ finish_thread_state (ptid_t ptid)
 void
 finish_thread_state_cleanup (void *arg)
 {
-  ptid_t *ptid_p = arg;
+  ptid_t *ptid_p = (ptid_t *) arg;
 
   gdb_assert (arg);
 
   finish_thread_state (*ptid_p);
 }
 
+/* See gdbthread.h.  */
+
+void
+validate_registers_access (void)
+{
+  /* No selected thread, no registers.  */
+  if (ptid_equal (inferior_ptid, null_ptid))
+    error (_("No thread selected."));
+
+  /* Don't try to read from a dead thread.  */
+  if (is_exited (inferior_ptid))
+    error (_("The current thread has terminated"));
+
+  /* ... or from a spinning thread.  FIXME: This isn't actually fully
+     correct.  It'll allow an user-requested access (e.g., "print $pc"
+     at the prompt) when a thread is not executing for some internal
+     reason, but is marked running from the user's perspective.  E.g.,
+     the thread is waiting for its turn in the step-over queue.  */
+  if (is_executing (inferior_ptid))
+    error (_("Selected thread is running."));
+}
+
+/* See gdbthread.h.  */
+
+bool
+can_access_registers_ptid (ptid_t ptid)
+{
+  /* No thread, no registers.  */
+  if (ptid_equal (ptid, null_ptid))
+    return false;
+
+  /* Don't try to read from a dead thread.  */
+  if (is_exited (ptid))
+    return false;
+
+  /* ... or from a spinning thread.  FIXME: see validate_registers_access.  */
+  if (is_executing (ptid))
+    return false;
+
+  return true;
+}
+
 int
 pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread)
 {
@@ -963,25 +1168,61 @@ pc_in_thread_step_range (CORE_ADDR pc, s
 	  && pc < thread->control.step_range_end);
 }
 
-/* Prints the list of threads and their details on UIOUT.
-   This is a version of 'info_threads_command' suitable for
-   use from MI.
-   If REQUESTED_THREAD is not -1, it's the GDB id of the thread
-   that should be printed.  Otherwise, all threads are
-   printed.
-   If PID is not -1, only print threads from the process PID.
-   Otherwise, threads from all attached PIDs are printed.
-   If both REQUESTED_THREAD and PID are not -1, then the thread
-   is printed if it belongs to the specified process.  Otherwise,
-   an error is raised.  */
-void
-print_thread_info (struct ui_out *uiout, char *requested_threads, int pid)
+/* Helper for print_thread_info.  Returns true if THR should be
+   printed.  If REQUESTED_THREADS, a list of GDB ids/ranges, is not
+   NULL, only print THR if its ID is included in the list.  GLOBAL_IDS
+   is true if REQUESTED_THREADS is list of global IDs, false if a list
+   of per-inferior thread ids.  If PID is not -1, only print THR if it
+   is a thread from the process PID.  Otherwise, threads from all
+   attached PIDs are printed.  If both REQUESTED_THREADS is not NULL
+   and PID is not -1, then the thread is printed if it belongs to the
+   specified process.  Otherwise, an error is raised.  */
+
+static int
+should_print_thread (const char *requested_threads, int default_inf_num,
+		     int global_ids, int pid, struct thread_info *thr)
+{
+  if (requested_threads != NULL && *requested_threads != '\0')
+    {
+      int in_list;
+
+      if (global_ids)
+	in_list = number_is_in_list (requested_threads, thr->global_num);
+      else
+	in_list = tid_is_in_list (requested_threads, default_inf_num,
+				  thr->inf->num, thr->per_inf_num);
+      if (!in_list)
+	return 0;
+    }
+
+  if (pid != -1 && ptid_get_pid (thr->ptid) != pid)
+    {
+      if (requested_threads != NULL && *requested_threads != '\0')
+	error (_("Requested thread not found in requested process"));
+      return 0;
+    }
+
+  if (thr->state == THREAD_EXITED)
+    return 0;
+
+  return 1;
+}
+
+/* Like print_thread_info, but in addition, GLOBAL_IDS indicates
+   whether REQUESTED_THREADS is a list of global or per-inferior
+   thread ids.  */
+
+static void
+print_thread_info_1 (struct ui_out *uiout, char *requested_threads,
+		     int global_ids, int pid,
+		     int show_global_ids)
 {
   struct thread_info *tp;
   ptid_t current_ptid;
   struct cleanup *old_chain;
-  char *extra_info, *name, *target_id;
-  int current_thread = -1;
+  const char *extra_info, *name, *target_id;
+  struct inferior *inf;
+  int default_inf_num = current_inferior ()->num;
 
   update_thread_list ();
   current_ptid = inferior_ptid;
@@ -992,7 +1233,7 @@ print_thread_info (struct ui_out *uiout,
   /* For backward compatibility, we make a list for MI.  A table is
      preferable for the CLI, though, because it shows table
      headers.  */
-  if (ui_out_is_mi_like_p (uiout))
+  if (uiout->is_mi_like_p ())
     make_cleanup_ui_out_list_begin_end (uiout, "threads");
   else
     {
@@ -1000,13 +1241,8 @@ print_thread_info (struct ui_out *uiout,
 
       for (tp = thread_list; tp; tp = tp->next)
 	{
-	  if (!number_is_in_list (requested_threads, tp->num))
-	    continue;
-
-	  if (pid != -1 && ptid_get_pid (tp->ptid) != pid)
-	    continue;
-
-	  if (tp->state == THREAD_EXITED)
+	  if (!should_print_thread (requested_threads, default_inf_num,
+				    global_ids, pid, tp))
 	    continue;
 
 	  ++n_threads;
@@ -1015,63 +1251,62 @@ print_thread_info (struct ui_out *uiout,
       if (n_threads == 0)
 	{
 	  if (requested_threads == NULL || *requested_threads == '\0')
-	    ui_out_message (uiout, 0, _("No threads.\n"));
+	    uiout->message (_("No threads.\n"));
 	  else
-	    ui_out_message (uiout, 0, _("No threads match '%s'.\n"),
+	    uiout->message (_("No threads match '%s'.\n"),
 			    requested_threads);
 	  do_cleanups (old_chain);
 	  return;
 	}
 
-      make_cleanup_ui_out_table_begin_end (uiout, 4, n_threads, "threads");
+      if (show_global_ids || uiout->is_mi_like_p ())
+	make_cleanup_ui_out_table_begin_end (uiout, 5, n_threads, "threads");
+      else
+	make_cleanup_ui_out_table_begin_end (uiout, 4, n_threads, "threads");
+
+      uiout->table_header (1, ui_left, "current", "");
 
-      ui_out_table_header (uiout, 1, ui_left, "current", "");
-      ui_out_table_header (uiout, 4, ui_left, "id", "Id");
-      ui_out_table_header (uiout, 17, ui_left, "target-id", "Target Id");
-      ui_out_table_header (uiout, 1, ui_left, "frame", "Frame");
-      ui_out_table_body (uiout);
+      if (!uiout->is_mi_like_p ())
+	uiout->table_header (4, ui_left, "id-in-tg", "Id");
+      if (show_global_ids || uiout->is_mi_like_p ())
+	uiout->table_header (4, ui_left, "id", "GId");
+      uiout->table_header (17, ui_left, "target-id", "Target Id");
+      uiout->table_header (1, ui_left, "frame", "Frame");
+      uiout->table_body ();
     }
 
-  for (tp = thread_list; tp; tp = tp->next)
+  ALL_THREADS_BY_INFERIOR (inf, tp)
     {
       struct cleanup *chain2;
       int core;
 
-      if (!number_is_in_list (requested_threads, tp->num))
-	continue;
-
-      if (pid != -1 && ptid_get_pid (tp->ptid) != pid)
-	{
-	  if (requested_threads != NULL && *requested_threads != '\0')
-	    error (_("Requested thread not found in requested process"));
-	  continue;
-	}
-
-      if (ptid_equal (tp->ptid, current_ptid))
-	current_thread = tp->num;
-
-      if (tp->state == THREAD_EXITED)
+      if (!should_print_thread (requested_threads, default_inf_num,
+				global_ids, pid, tp))
 	continue;
 
       chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
 
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
 	  /* Compatibility.  */
 	  if (ptid_equal (tp->ptid, current_ptid))
-	    ui_out_text (uiout, "* ");
+	    uiout->text ("* ");
 	  else
-	    ui_out_text (uiout, "  ");
+	    uiout->text ("  ");
 	}
       else
 	{
 	  if (ptid_equal (tp->ptid, current_ptid))
-	    ui_out_field_string (uiout, "current", "*");
+	    uiout->field_string ("current", "*");
 	  else
-	    ui_out_field_skip (uiout, "current");
+	    uiout->field_skip ("current");
 	}
 
-      ui_out_field_int (uiout, "id", tp->num);
+      if (!uiout->is_mi_like_p ())
+	uiout->field_string ("id-in-tg", print_thread_id (tp));
+
+      if (show_global_ids || uiout->is_mi_like_p ())
+	uiout->field_int ("id", tp->global_num);
 
       /* For the CLI, we stuff everything into the target-id field.
 	 This is a gross hack to make the output come out looking
@@ -1084,13 +1319,13 @@ print_thread_info (struct ui_out *uiout,
       extra_info = target_extra_thread_info (tp);
       name = tp->name ? tp->name : target_thread_name (tp);
 
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
-	  ui_out_field_string (uiout, "target-id", target_id);
+	  uiout->field_string ("target-id", target_id);
 	  if (extra_info)
-	    ui_out_field_string (uiout, "details", extra_info);
+	    uiout->field_string ("details", extra_info);
 	  if (name)
-	    ui_out_field_string (uiout, "name", name);
+	    uiout->field_string ("name", name);
 	}
       else
 	{
@@ -1108,12 +1343,12 @@ print_thread_info (struct ui_out *uiout,
 	    contents = xstrdup (target_id);
 	  str_cleanup = make_cleanup (xfree, contents);
 
-	  ui_out_field_string (uiout, "target-id", contents);
+	  uiout->field_string ("target-id", contents);
 	  do_cleanups (str_cleanup);
 	}
 
       if (tp->state == THREAD_RUNNING)
-	ui_out_text (uiout, "(running)\n");
+	uiout->text ("(running)\n");
       else
 	{
 	  /* The switch below puts us at the top of the stack (leaf
@@ -1121,22 +1356,22 @@ print_thread_info (struct ui_out *uiout,
 	  switch_to_thread (tp->ptid);
 	  print_stack_frame (get_selected_frame (NULL),
 			     /* For MI output, print frame level.  */
-			     ui_out_is_mi_like_p (uiout),
+			     uiout->is_mi_like_p (),
 			     LOCATION, 0);
 	}
 
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
 	  char *state = "stopped";
 
 	  if (tp->state == THREAD_RUNNING)
 	    state = "running";
-	  ui_out_field_string (uiout, "state", state);
+	  uiout->field_string ("state", state);
 	}
 
       core = target_core_of_thread (tp->ptid);
-      if (ui_out_is_mi_like_p (uiout) && core != -1)
-	ui_out_field_int (uiout, "core", core);
+      if (uiout->is_mi_like_p () && core != -1)
+	uiout->field_int ("core", core);
 
       do_cleanups (chain2);
     }
@@ -1147,27 +1382,35 @@ print_thread_info (struct ui_out *uiout,
 
   if (pid == -1 && requested_threads == NULL)
     {
-      gdb_assert (current_thread != -1
-		  || !thread_list
-		  || ptid_equal (inferior_ptid, null_ptid));
-      if (current_thread != -1 && ui_out_is_mi_like_p (uiout))
-	ui_out_field_int (uiout, "current-thread-id", current_thread);
-
-      if (current_thread != -1 && is_exited (current_ptid))
-	ui_out_message (uiout, 0, "\n\
-The current thread <Thread ID %d> has terminated.  See `help thread'.\n",
-			current_thread);
-      else if (thread_list
-	       && current_thread == -1
-	       && ptid_equal (current_ptid, null_ptid))
-	ui_out_message (uiout, 0, "\n\
+      if (uiout->is_mi_like_p ()
+	  && !ptid_equal (inferior_ptid, null_ptid))
+	{
+	  int num = ptid_to_global_thread_id (inferior_ptid);
+
+	  gdb_assert (num != 0);
+	  uiout->field_int ("current-thread-id", num);
+	}
+
+      if (!ptid_equal (inferior_ptid, null_ptid) && is_exited (inferior_ptid))
+	uiout->message ("\n\
+The current thread <Thread ID %s> has terminated.  See `help thread'.\n",
+			print_thread_id (inferior_thread ()));
+      else if (thread_list != NULL
+	       && ptid_equal (inferior_ptid, null_ptid))
+	uiout->message ("\n\
 No selected thread.  See `help thread'.\n");
     }
 }
 
-/* Print information about currently known threads 
+/* See gdbthread.h.  */
+
+void
+print_thread_info (struct ui_out *uiout, char *requested_threads, int pid)
+{
+  print_thread_info_1 (uiout, requested_threads, 1, pid, 0);
+}
 
-   Optional ARG is a thread id, or list of thread ids.
+/* Implementation of the "info threads" command.
 
    Note: this has the drawback that it _really_ switches
          threads, which frees the frame cache.  A no-side
@@ -1176,7 +1419,32 @@ No selected thread.  See `help thread'.\
 static void
 info_threads_command (char *arg, int from_tty)
 {
-  print_thread_info (current_uiout, arg, -1);
+  int show_global_ids = 0;
+
+  if (arg != NULL
+      && check_for_argument (&arg, "-gid", sizeof ("-gid") - 1))
+    {
+      arg = skip_spaces (arg);
+      show_global_ids = 1;
+    }
+
+  print_thread_info_1 (current_uiout, arg, 0, -1, show_global_ids);
+}
+
+/* See gdbthread.h.  */
+
+void
+switch_to_thread_no_regs (struct thread_info *thread)
+{
+  struct inferior *inf;
+
+  inf = find_inferior_ptid (thread->ptid);
+  gdb_assert (inf != NULL);
+  set_current_program_space (inf->pspace);
+  set_current_inferior (inf);
+
+  inferior_ptid = thread->ptid;
+  stop_pc = ~(CORE_ADDR) 0;
 }
 
 /* Switch from one thread to another.  */
@@ -1267,7 +1535,7 @@ restore_selected_frame (struct frame_id 
   select_frame (get_current_frame ());
 
   /* Warn the user.  */
-  if (frame_level > 0 && !ui_out_is_mi_like_p (current_uiout))
+  if (frame_level > 0 && !current_uiout->is_mi_like_p ())
     {
       warning (_("Couldn't restore frame #%d in "
 		 "current thread.  Bottom (innermost) frame selected:"),
@@ -1279,8 +1547,16 @@ restore_selected_frame (struct frame_id 
     }
 }
 
+/* Data used by the cleanup installed by
+   'make_cleanup_restore_current_thread'.  */
+
 struct current_thread_cleanup
 {
+  /* Next in list of currently installed 'struct
+     current_thread_cleanup' cleanups.  See
+     'current_thread_cleanup_chain' below.  */
+  struct current_thread_cleanup *next;
+
   ptid_t inferior_ptid;
   struct frame_id selected_frame_id;
   int selected_frame_level;
@@ -1289,11 +1565,34 @@ struct current_thread_cleanup
   int was_removable;
 };
 
+/* A chain of currently installed 'struct current_thread_cleanup'
+   cleanups.  Restoring the previously selected thread looks up the
+   old thread in the thread list by ptid.  If the thread changes ptid,
+   we need to update the cleanup's thread structure so the look up
+   succeeds.  */
+static struct current_thread_cleanup *current_thread_cleanup_chain;
+
+/* A thread_ptid_changed observer.  Update all currently installed
+   current_thread_cleanup cleanups that want to switch back to
+   OLD_PTID to switch back to NEW_PTID instead.  */
+
+static void
+restore_current_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
+{
+  struct current_thread_cleanup *it;
+
+  for (it = current_thread_cleanup_chain; it != NULL; it = it->next)
+    {
+      if (ptid_equal (it->inferior_ptid, old_ptid))
+	it->inferior_ptid = new_ptid;
+    }
+}
+
 static void
 do_restore_current_thread_cleanup (void *arg)
 {
   struct thread_info *tp;
-  struct current_thread_cleanup *old = arg;
+  struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
 
   tp = find_thread_ptid (old->inferior_ptid);
 
@@ -1325,10 +1624,12 @@ do_restore_current_thread_cleanup (void 
 static void
 restore_current_thread_cleanup_dtor (void *arg)
 {
-  struct current_thread_cleanup *old = arg;
+  struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
   struct thread_info *tp;
   struct inferior *inf;
 
+  current_thread_cleanup_chain = current_thread_cleanup_chain->next;
+
   tp = find_thread_ptid (old->inferior_ptid);
   if (tp)
     tp->refcount--;
@@ -1344,7 +1645,8 @@ static void
 set_thread_refcount (void *data)
 {
   int k;
-  struct thread_array_cleanup *ta_cleanup = data;
+  struct thread_array_cleanup *ta_cleanup
+    = (struct thread_array_cleanup *) data;
 
   for (k = 0; k != ta_cleanup->count; k++)
     ta_cleanup->tp_array[k]->refcount--;
@@ -1355,13 +1657,15 @@ make_cleanup_restore_current_thread (voi
 {
   struct thread_info *tp;
   struct frame_info *frame;
-  struct current_thread_cleanup *old;
+  struct current_thread_cleanup *old = XNEW (struct current_thread_cleanup);
 
-  old = xmalloc (sizeof (struct current_thread_cleanup));
   old->inferior_ptid = inferior_ptid;
   old->inf_id = current_inferior ()->num;
   old->was_removable = current_inferior ()->removable;
 
+  old->next = current_thread_cleanup_chain;
+  current_thread_cleanup_chain = old;
+
   if (!ptid_equal (inferior_ptid, null_ptid))
     {
       old->was_stopped = is_stopped (inferior_ptid);
@@ -1394,21 +1698,59 @@ make_cleanup_restore_current_thread (voi
 			    restore_current_thread_cleanup_dtor);
 }
 
+/* See gdbthread.h.  */
+
+int
+show_thread_that_caused_stop (void)
+{
+  return highest_thread_num > 1;
+}
+
+/* See gdbthread.h.  */
+
+int
+show_inferior_qualified_tids (void)
+{
+  return (inferior_list->next != NULL || inferior_list->num != 1);
+}
+
+/* See gdbthread.h.  */
+
+const char *
+print_thread_id (struct thread_info *thr)
+{
+  char *s = get_print_cell ();
+
+  if (show_inferior_qualified_tids ())
+    xsnprintf (s, PRINT_CELL_SIZE, "%d.%d", thr->inf->num, thr->per_inf_num);
+  else
+    xsnprintf (s, PRINT_CELL_SIZE, "%d", thr->per_inf_num);
+  return s;
+}
+
 /* If non-zero tp_array_compar should sort in ascending order, otherwise in
    descending order.  */
 
 static int tp_array_compar_ascending;
 
-/* Sort an array for struct thread_info pointers by their NUM, order is
-   determined by TP_ARRAY_COMPAR_ASCENDING.  */
+/* Sort an array for struct thread_info pointers by thread ID (first
+   by inferior number, and then by per-inferior thread number).  The
+   order is determined by TP_ARRAY_COMPAR_ASCENDING.  */
 
 static int
 tp_array_compar (const void *ap_voidp, const void *bp_voidp)
 {
-  const struct thread_info *const *ap = ap_voidp;
-  const struct thread_info *const *bp = bp_voidp;
+  const struct thread_info *a = *(const struct thread_info * const *) ap_voidp;
+  const struct thread_info *b = *(const struct thread_info * const *) bp_voidp;
 
-  return ((((*ap)->num > (*bp)->num) - ((*ap)->num < (*bp)->num))
+  if (a->inf->num != b->inf->num)
+    {
+      return (((a->inf->num > b->inf->num) - (a->inf->num < b->inf->num))
+	      * (tp_array_compar_ascending ? +1 : -1));
+    }
+
+  return (((a->per_inf_num > b->per_inf_num)
+	   - (a->per_inf_num < b->per_inf_num))
 	  * (tp_array_compar_ascending ? +1 : -1));
 }
 
@@ -1458,7 +1800,7 @@ thread_apply_all_command (char *cmd, int
 
       /* Save a copy of the thread_list in case we execute detach
          command.  */
-      tp_array = xmalloc (sizeof (struct thread_info *) * tc);
+      tp_array = XNEWVEC (struct thread_info *, tc);
       make_cleanup (xfree, tp_array);
 
       ALL_NON_EXITED_THREADS (tp)
@@ -1482,8 +1824,8 @@ thread_apply_all_command (char *cmd, int
         if (thread_alive (tp_array[k]))
           {
             switch_to_thread (tp_array[k]->ptid);
-            printf_filtered (_("\nThread %d (%s):\n"), 
-			     tp_array[k]->num,
+            printf_filtered (_("\nThread %s (%s):\n"),
+			     print_thread_id (tp_array[k]),
 			     target_pid_to_str (inferior_ptid));
             execute_command (cmd, from_tty);
 
@@ -1495,54 +1837,98 @@ thread_apply_all_command (char *cmd, int
   do_cleanups (old_chain);
 }
 
+/* Implementation of the "thread apply" command.  */
+
 static void
 thread_apply_command (char *tidlist, int from_tty)
 {
-  char *cmd;
+  char *cmd = NULL;
   struct cleanup *old_chain;
   char *saved_cmd;
-  struct get_number_or_range_state state;
+  tid_range_parser parser;
 
   if (tidlist == NULL || *tidlist == '\000')
     error (_("Please specify a thread ID list"));
 
-  for (cmd = tidlist; *cmd != '\000' && !isalpha (*cmd); cmd++);
+  parser.init (tidlist, current_inferior ()->num);
+  while (!parser.finished ())
+    {
+      int inf_num, thr_start, thr_end;
+
+      if (!parser.get_tid_range (&inf_num, &thr_start, &thr_end))
+	{
+	  cmd = (char *) parser.cur_tok ();
+	  break;
+	}
+    }
 
-  if (*cmd == '\000')
+  if (cmd == NULL)
     error (_("Please specify a command following the thread ID list"));
 
+  if (tidlist == cmd || !isalpha (cmd[0]))
+    invalid_thread_id_error (cmd);
+
   /* Save a copy of the command in case it is clobbered by
      execute_command.  */
   saved_cmd = xstrdup (cmd);
   old_chain = make_cleanup (xfree, saved_cmd);
 
-  init_number_or_range (&state, tidlist);
-  while (!state.finished && state.string < cmd)
+  make_cleanup_restore_current_thread ();
+
+  parser.init (tidlist, current_inferior ()->num);
+  while (!parser.finished () && parser.cur_tok () < cmd)
     {
-      struct thread_info *tp;
-      int start;
+      struct thread_info *tp = NULL;
+      struct inferior *inf;
+      int inf_num, thr_num;
 
-      start = get_number_or_range (&state);
+      parser.get_tid (&inf_num, &thr_num);
+      inf = find_inferior_id (inf_num);
+      if (inf != NULL)
+	tp = find_thread_id (inf, thr_num);
 
-      make_cleanup_restore_current_thread ();
+      if (parser.in_star_range ())
+	{
+	  if (inf == NULL)
+	    {
+	      warning (_("Unknown inferior %d"), inf_num);
+	      parser.skip_range ();
+	      continue;
+	    }
 
-      tp = find_thread_id (start);
+	  /* No use looking for threads past the highest thread number
+	     the inferior ever had.  */
+	  if (thr_num >= inf->highest_thread_num)
+	    parser.skip_range ();
 
-      if (!tp)
-	warning (_("Unknown thread %d."), start);
-      else if (!thread_alive (tp))
-	warning (_("Thread %d has terminated."), start);
-      else
-	{
-	  switch_to_thread (tp->ptid);
+	  /* Be quiet about unknown threads numbers.  */
+	  if (tp == NULL)
+	    continue;
+	}
 
-	  printf_filtered (_("\nThread %d (%s):\n"), tp->num,
-			   target_pid_to_str (inferior_ptid));
-	  execute_command (cmd, from_tty);
+      if (tp == NULL)
+	{
+	  if (show_inferior_qualified_tids () || parser.tid_is_qualified ())
+	    warning (_("Unknown thread %d.%d"), inf_num, thr_num);
+	  else
+	    warning (_("Unknown thread %d"), thr_num);
+	  continue;
+	}
 
-	  /* Restore exact command used previously.  */
-	  strcpy (cmd, saved_cmd);
+      if (!thread_alive (tp))
+	{
+	  warning (_("Thread %s has terminated."), print_thread_id (tp));
+	  continue;
 	}
+
+      switch_to_thread (tp->ptid);
+
+      printf_filtered (_("\nThread %s (%s):\n"), print_thread_id (tp),
+		       target_pid_to_str (inferior_ptid));
+      execute_command (cmd, from_tty);
+
+      /* Restore exact command used previously.  */
+      strcpy (cmd, saved_cmd);
     }
 
   do_cleanups (old_chain);
@@ -1554,28 +1940,51 @@ thread_apply_command (char *tidlist, int
 void
 thread_command (char *tidstr, int from_tty)
 {
-  if (!tidstr)
+  if (tidstr == NULL)
     {
       if (ptid_equal (inferior_ptid, null_ptid))
 	error (_("No thread selected"));
 
       if (target_has_stack)
 	{
+	  struct thread_info *tp = inferior_thread ();
+
 	  if (is_exited (inferior_ptid))
-	    printf_filtered (_("[Current thread is %d (%s) (exited)]\n"),
-			     pid_to_thread_id (inferior_ptid),
+	    printf_filtered (_("[Current thread is %s (%s) (exited)]\n"),
+			     print_thread_id (tp),
 			     target_pid_to_str (inferior_ptid));
 	  else
-	    printf_filtered (_("[Current thread is %d (%s)]\n"),
-			     pid_to_thread_id (inferior_ptid),
+	    printf_filtered (_("[Current thread is %s (%s)]\n"),
+			     print_thread_id (tp),
 			     target_pid_to_str (inferior_ptid));
 	}
       else
 	error (_("No stack."));
-      return;
     }
+  else
+    {
+      ptid_t previous_ptid = inferior_ptid;
+      enum gdb_rc result;
+
+      result = gdb_thread_select (current_uiout, tidstr, NULL);
+
+      /* If thread switch did not succeed don't notify or print.  */
+      if (result == GDB_RC_FAIL)
+	return;
 
-  gdb_thread_select (current_uiout, tidstr, NULL);
+      /* Print if the thread has not changed, otherwise an event will be sent.  */
+      if (ptid_equal (inferior_ptid, previous_ptid))
+	{
+	  print_selected_thread_frame (current_uiout,
+				       USER_SELECTED_THREAD
+				       | USER_SELECTED_FRAME);
+	}
+      else
+	{
+	  observer_notify_user_selected_context_changed (USER_SELECTED_THREAD
+							 | USER_SELECTED_FRAME);
+	}
+    }
 }
 
 /* Implementation of `thread name'.  */
@@ -1601,7 +2010,7 @@ static void
 thread_find_command (char *arg, int from_tty)
 {
   struct thread_info *tp;
-  char *tmp;
+  const char *tmp;
   unsigned long match = 0;
 
   if (arg == NULL || *arg == '\0')
@@ -1616,32 +2025,32 @@ thread_find_command (char *arg, int from
     {
       if (tp->name != NULL && re_exec (tp->name))
 	{
-	  printf_filtered (_("Thread %d has name '%s'\n"),
-			   tp->num, tp->name);
+	  printf_filtered (_("Thread %s has name '%s'\n"),
+			   print_thread_id (tp), tp->name);
 	  match++;
 	}
 
       tmp = target_thread_name (tp);
       if (tmp != NULL && re_exec (tmp))
 	{
-	  printf_filtered (_("Thread %d has target name '%s'\n"),
-			   tp->num, tmp);
+	  printf_filtered (_("Thread %s has target name '%s'\n"),
+			   print_thread_id (tp), tmp);
 	  match++;
 	}
 
       tmp = target_pid_to_str (tp->ptid);
       if (tmp != NULL && re_exec (tmp))
 	{
-	  printf_filtered (_("Thread %d has target id '%s'\n"),
-			   tp->num, tmp);
+	  printf_filtered (_("Thread %s has target id '%s'\n"),
+			   print_thread_id (tp), tmp);
 	  match++;
 	}
 
       tmp = target_extra_thread_info (tp);
       if (tmp != NULL && re_exec (tmp))
 	{
-	  printf_filtered (_("Thread %d has extra info '%s'\n"),
-			   tp->num, tmp);
+	  printf_filtered (_("Thread %s has extra info '%s'\n"),
+			   print_thread_id (tp), tmp);
 	  match++;
 	}
     }
@@ -1661,41 +2070,32 @@ show_print_thread_events (struct ui_file
 }
 
 static int
-do_captured_thread_select (struct ui_out *uiout, void *tidstr)
+do_captured_thread_select (struct ui_out *uiout, void *tidstr_v)
 {
-  int num;
+  const char *tidstr = (const char *) tidstr_v;
   struct thread_info *tp;
 
-  num = value_as_long (parse_and_eval (tidstr));
-
-  tp = find_thread_id (num);
+  if (uiout->is_mi_like_p ())
+    {
+      int num = value_as_long (parse_and_eval (tidstr));
 
-  if (!tp)
-    error (_("Thread ID %d not known."), num);
+      tp = find_thread_global_id (num);
+      if (tp == NULL)
+	error (_("Thread ID %d not known."), num);
+    }
+  else
+    {
+      tp = parse_thread_id (tidstr, NULL);
+      gdb_assert (tp != NULL);
+    }
 
   if (!thread_alive (tp))
-    error (_("Thread ID %d has terminated."), num);
+    error (_("Thread ID %s has terminated."), tidstr);
 
   switch_to_thread (tp->ptid);
 
   annotate_thread_changed ();
 
-  ui_out_text (uiout, "[Switching to thread ");
-  ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_ptid));
-  ui_out_text (uiout, " (");
-  ui_out_text (uiout, target_pid_to_str (inferior_ptid));
-  ui_out_text (uiout, ")]");
-
-  /* Note that we can't reach this with an exited thread, due to the
-     thread_alive check above.  */
-  if (tp->state == THREAD_RUNNING)
-    ui_out_text (uiout, "(running)\n");
-  else
-    {
-      ui_out_text (uiout, "\n");
-      print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
-    }
-
   /* Since the current thread may have changed, see if there is any
      exited thread we can now delete.  */
   prune_threads ();
@@ -1703,6 +2103,48 @@ do_captured_thread_select (struct ui_out
   return GDB_RC_OK;
 }
 
+/* Print thread and frame switch command response.  */
+
+void
+print_selected_thread_frame (struct ui_out *uiout,
+			     user_selected_what selection)
+{
+  struct thread_info *tp = inferior_thread ();
+  struct inferior *inf = current_inferior ();
+
+  if (selection & USER_SELECTED_THREAD)
+    {
+      if (uiout->is_mi_like_p ())
+	{
+	  uiout->field_int ("new-thread-id",
+			    inferior_thread ()->global_num);
+	}
+      else
+	{
+	  uiout->text ("[Switching to thread ");
+	  uiout->field_string ("new-thread-id", print_thread_id (tp));
+	  uiout->text (" (");
+	  uiout->text (target_pid_to_str (inferior_ptid));
+	  uiout->text (")]");
+	}
+    }
+
+  if (tp->state == THREAD_RUNNING)
+    {
+      if (selection & USER_SELECTED_THREAD)
+	uiout->text ("(running)\n");
+    }
+  else if (selection & USER_SELECTED_FRAME)
+    {
+      if (selection & USER_SELECTED_THREAD)
+	uiout->text ("\n");
+
+      if (has_stack_frames ())
+	print_stack_frame_to_uiout (uiout, get_selected_frame (NULL),
+				    1, SRC_AND_LOC, 1);
+    }
+}
+
 enum gdb_rc
 gdb_thread_select (struct ui_out *uiout, char *tidstr, char **error_message)
 {
@@ -1738,17 +2180,45 @@ update_thread_list (void)
   update_threads_executing ();
 }
 
-/* Return a new value for the selected thread's id.  Return a value of 0 if
-   no thread is selected, or no threads exist.  */
+/* Return a new value for the selected thread's id.  Return a value of
+   0 if no thread is selected.  If GLOBAL is true, return the thread's
+   global number.  Otherwise return the per-inferior number.  */
 
 static struct value *
-thread_id_make_value (struct gdbarch *gdbarch, struct internalvar *var,
-		      void *ignore)
+thread_num_make_value_helper (struct gdbarch *gdbarch, int global)
 {
   struct thread_info *tp = find_thread_ptid (inferior_ptid);
+  int int_val;
 
-  return value_from_longest (builtin_type (gdbarch)->builtin_int,
-			     (tp ? tp->num : 0));
+  if (tp == NULL)
+    int_val = 0;
+  else if (global)
+    int_val = tp->global_num;
+  else
+    int_val = tp->per_inf_num;
+
+  return value_from_longest (builtin_type (gdbarch)->builtin_int, int_val);
+}
+
+/* Return a new value for the selected thread's per-inferior thread
+   number.  Return a value of 0 if no thread is selected, or no
+   threads exist.  */
+
+static struct value *
+thread_id_per_inf_num_make_value (struct gdbarch *gdbarch, struct internalvar *var,
+				  void *ignore)
+{
+  return thread_num_make_value_helper (gdbarch, 0);
+}
+
+/* Return a new value for the selected thread's global id.  Return a
+   value of 0 if no thread is selected, or no threads exist.  */
+
+static struct value *
+global_thread_id_make_value (struct gdbarch *gdbarch, struct internalvar *var,
+			     void *ignore)
+{
+  return thread_num_make_value_helper (gdbarch, 1);
 }
 
 /* Commands with a prefix of `thread'.  */
@@ -1758,7 +2228,16 @@ struct cmd_list_element *thread_cmd_list
 
 static const struct internalvar_funcs thread_funcs =
 {
-  thread_id_make_value,
+  thread_id_per_inf_num_make_value,
+  NULL,
+  NULL
+};
+
+/* Implementation of `gthread' variable.  */
+
+static const struct internalvar_funcs gthread_funcs =
+{
+  global_thread_id_make_value,
   NULL,
   NULL
 };
@@ -1770,9 +2249,10 @@ _initialize_thread (void)
 
   add_info ("threads", info_threads_command, 
 	    _("Display currently known threads.\n\
-Usage: info threads [ID]...\n\
-Optional arguments are thread IDs with spaces between.\n\
-If no arguments, all threads are displayed."));
+Usage: info threads [-gid] [ID]...\n\
+-gid: Show global thread IDs.\n\
+If ID is given, it is a space-separated list of IDs of threads to display.\n\
+Otherwise, all threads are displayed."));
 
   add_prefix_cmd ("thread", class_run, thread_command, _("\
 Use this command to switch between threads.\n\
@@ -1815,4 +2295,7 @@ Show printing of thread events (such as 
          &setprintlist, &showprintlist);
 
   create_internalvar_type_lazy ("_thread", &thread_funcs, NULL);
+  create_internalvar_type_lazy ("_gthread", &gthread_funcs, NULL);
+
+  observer_attach_thread_ptid_changed (restore_current_thread_ptid_changed);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread-fsm.c ./gdb/thread-fsm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread-fsm.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/thread-fsm.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,109 @@
+/* Thread command's finish-state machine, for GDB, the GNU debugger.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "thread-fsm.h"
+
+/* See thread-fsm.h.  */
+
+void
+thread_fsm_ctor (struct thread_fsm *self, struct thread_fsm_ops *ops,
+		 struct interp *cmd_interp)
+{
+  self->command_interp = cmd_interp;
+  self->finished = 0;
+  self->ops = ops;
+}
+
+/* See thread-fsm.h.  */
+
+void
+thread_fsm_delete (struct thread_fsm *self)
+{
+  if (self != NULL)
+    {
+      if (self->ops->dtor != NULL)
+	self->ops->dtor (self);
+      xfree (self);
+    }
+}
+
+/* See thread-fsm.h.  */
+
+void
+thread_fsm_clean_up (struct thread_fsm *self, struct thread_info *thread)
+{
+  if (self->ops->clean_up != NULL)
+    self->ops->clean_up (self, thread);
+}
+
+/* See thread-fsm.h.  */
+
+int
+thread_fsm_should_stop (struct thread_fsm *self, struct thread_info *thread)
+{
+  return self->ops->should_stop (self, thread);
+}
+
+/* See thread-fsm.h.  */
+
+struct return_value_info *
+thread_fsm_return_value (struct thread_fsm *self)
+{
+  if (self->ops->return_value != NULL)
+    return self->ops->return_value (self);
+  return NULL;
+}
+
+/* See thread-fsm.h.  */
+
+void
+thread_fsm_set_finished (struct thread_fsm *self)
+{
+  self->finished = 1;
+}
+
+/* See thread-fsm.h.  */
+
+int
+thread_fsm_finished_p (struct thread_fsm *self)
+{
+  return self->finished;
+}
+
+/* See thread-fsm.h.  */
+
+enum async_reply_reason
+thread_fsm_async_reply_reason (struct thread_fsm *self)
+{
+  /* If we didn't finish, then the stop reason must come from
+     elsewhere.  E.g., a breakpoint hit or a signal intercepted.  */
+  gdb_assert (thread_fsm_finished_p (self));
+
+  return self->ops->async_reply_reason (self);
+}
+
+/* See thread-fsm.h.  */
+
+int
+thread_fsm_should_notify_stop (struct thread_fsm *self)
+{
+  if (self->ops->should_notify_stop != NULL)
+    return self->ops->should_notify_stop (self);
+  return 1;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread-fsm.h ./gdb/thread-fsm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/thread-fsm.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/thread-fsm.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,115 @@
+/* Thread command's finish-state machine, for GDB, the GNU debugger.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef THREAD_FSM_H
+#define THREAD_FSM_H
+
+#include "mi/mi-common.h" /* For enum async_reply_reason.  */
+
+struct return_value_info;
+struct thread_fsm_ops;
+
+/* A thread finite-state machine structure contains the necessary info
+   and callbacks to manage the state machine protocol of a thread's
+   execution command.  */
+
+struct thread_fsm
+{
+  /* Pointer of the virtual table of methods.  */
+  struct thread_fsm_ops *ops;
+
+  /* Whether the FSM is done successfully.  */
+  int finished;
+
+  /* The interpreter that issued the execution command that caused
+     this thread to resume.  If the top level interpreter is MI/async,
+     and the execution command was a CLI command (next/step/etc.),
+     we'll want to print stop event output to the MI console channel
+     (the stepped-to line, etc.), as if the user entered the execution
+     command on a real GDB console.  */
+  struct interp *command_interp;
+};
+
+/* The virtual table of a thread_fsm.  */
+
+struct thread_fsm_ops
+{
+  /* The destructor.  This should simply free heap allocated data
+     structures.  Cleaning up target resources (like, e.g.,
+     breakpoints) should be done in the clean_up method.  */
+  void (*dtor) (struct thread_fsm *self);
+
+  /* Called to clean up target resources after the FSM.  E.g., if the
+     FSM created internal breakpoints, this is where they should be
+     deleted.  */
+  void (*clean_up) (struct thread_fsm *self, struct thread_info *thread);
+
+  /* Called after handle_inferior_event decides the target is done
+     (that is, after stop_waiting).  The FSM is given a chance to
+     decide whether the command is done and thus the target should
+     stop, or whether there's still more to do and thus the thread
+     should be re-resumed.  This is a good place to cache target data
+     too.  For example, the "finish" command saves the just-finished
+     function's return value here.  */
+  int (*should_stop) (struct thread_fsm *self, struct thread_info *thread);
+
+  /* If this FSM saved a function's return value, you can use this
+     method to retrieve it.  Otherwise, this returns NULL.  */
+  struct return_value_info *(*return_value) (struct thread_fsm *self);
+
+  /* The async_reply_reason that is broadcast to MI clients if this
+     FSM finishes successfully.  */
+  enum async_reply_reason (*async_reply_reason) (struct thread_fsm *self);
+
+  /* Whether the stop should be notified to the user/frontend.  */
+  int (*should_notify_stop) (struct thread_fsm *self);
+};
+/* Initialize FSM.  */
+extern void thread_fsm_ctor (struct thread_fsm *self,
+			     struct thread_fsm_ops *ops,
+			     struct interp *cmd_interp);
+
+/* Calls the FSM's dtor method, and then frees FSM.  */
+extern void thread_fsm_delete (struct thread_fsm *fsm);
+
+/* Calls the FSM's clean_up method.  */
+extern void thread_fsm_clean_up (struct thread_fsm *fsm,
+				 struct thread_info *thread);
+
+/* Calls the FSM's should_stop method.  */
+extern int thread_fsm_should_stop (struct thread_fsm *fsm,
+				   struct thread_info *thread);
+
+/* Calls the FSM's return_value method.  */
+extern struct return_value_info *
+  thread_fsm_return_value (struct thread_fsm *fsm);
+
+/* Marks the FSM as completed successfully.  */
+extern void thread_fsm_set_finished (struct thread_fsm *fsm);
+
+/* Returns true if the FSM completed successfully.  */
+extern int thread_fsm_finished_p (struct thread_fsm *fsm);
+
+/* Calls the FSM's reply_reason method.  */
+extern enum async_reply_reason
+  thread_fsm_async_reply_reason (struct thread_fsm *fsm);
+
+/* Calls the FSM's should_notify_stop method.  */
+extern int thread_fsm_should_notify_stop (struct thread_fsm *self);
+
+#endif /* THREAD_FSM_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-linux-tdep.c ./gdb/tic6x-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-linux-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tic6x-linux-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux on  TI C6x target support.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
    Contributed by Yao Qi <yao@codesourcery.com>
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-tdep.c ./gdb/tic6x-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tic6x-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target dependent code for GDB on TI C6x systems.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
    Contributed by Andrew Jenner <andrew@codesourcery.com>
    Contributed by Yao Qi <yao@codesourcery.com>
 
@@ -48,6 +48,7 @@
 #include "tic6x-tdep.h"
 #include "language.h"
 #include "target-descriptions.h"
+#include <algorithm>
 
 #include "features/tic6x-c64xp.c"
 #include "features/tic6x-c64x.c"
@@ -151,7 +152,6 @@ tic6x_analyze_prologue (struct gdbarch *
 			struct tic6x_unwind_cache *cache,
 			struct frame_info *this_frame)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   unsigned long inst;
   unsigned int src_reg, base_reg, dst_reg;
   int i;
@@ -175,8 +175,6 @@ tic6x_analyze_prologue (struct gdbarch *
      2nd one is optional.  */
   while (pc < current_pc)
     {
-      int offset = 0;
-
       unsigned long inst = tic6x_fetch_instruction (gdbarch, pc);
 
       if ((inst & 0x1ffc) == 0x1dc0 || (inst & 0x1ffc) == 0x1bc0
@@ -311,7 +309,7 @@ tic6x_skip_prologue (struct gdbarch *gdb
       CORE_ADDR post_prologue_pc
 	= skip_prologue_using_sal (gdbarch, func_addr);
       if (post_prologue_pc != 0)
-	return max (start_pc, post_prologue_pc);
+	return std::max (start_pc, post_prologue_pc);
     }
 
   /* Can't determine prologue from the symbol table, need to examine
@@ -320,15 +318,22 @@ tic6x_skip_prologue (struct gdbarch *gdb
 				 NULL);
 }
 
-/* This is the implementation of gdbarch method breakpiont_from_pc.  */
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+tic6x_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  return 4;
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
 static const gdb_byte *
-tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr,
-			  int *bp_size)
+tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  *bp_size = 4;
+  *size = kind;
 
   if (tdep == NULL || tdep->breakpoint == NULL)
     {
@@ -405,7 +410,7 @@ tic6x_frame_unwind_cache (struct frame_i
   struct tic6x_unwind_cache *cache;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct tic6x_unwind_cache *) *this_prologue_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct tic6x_unwind_cache);
   (*this_prologue_cache) = cache;
@@ -516,7 +521,7 @@ tic6x_stub_this_id (struct frame_info *t
 
   if (*this_cache == NULL)
     *this_cache = tic6x_make_stub_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct tic6x_unwind_cache *) *this_cache;
 
   *this_id = frame_id_build (cache->cfa, get_frame_pc (this_frame));
 }
@@ -558,7 +563,7 @@ tic6x_fetch_instruction (struct gdbarch 
    return 1 if INST is not a conditional instruction.  */
 
 static int
-tic6x_condition_true (struct frame_info *frame, unsigned long inst)
+tic6x_condition_true (struct regcache *regcache, unsigned long inst)
 {
   int register_number;
   int register_value;
@@ -568,7 +573,7 @@ tic6x_condition_true (struct frame_info 
   if (register_number == -1)
     return 1;
 
-  register_value = get_frame_register_signed (frame, register_number);
+  register_value = regcache_raw_get_signed (regcache, register_number);
   if ((inst & 0x10000000) != 0)
     return register_value == 0;
   return register_value != 0;
@@ -599,9 +604,9 @@ tic6x_extract_signed_field (int value, i
 /* Determine where to set a single step breakpoint.  */
 
 static CORE_ADDR
-tic6x_get_next_pc (struct frame_info *frame, CORE_ADDR pc)
+tic6x_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
   unsigned long inst;
   int register_number;
   int last = 0;
@@ -617,10 +622,10 @@ tic6x_get_next_pc (struct frame_info *fr
 	  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
 	  if (tdep->syscall_next_pc != NULL)
-	    return tdep->syscall_next_pc (frame);
+	    return tdep->syscall_next_pc (get_current_frame ());
 	}
 
-      if (tic6x_condition_true (frame, inst))
+      if (tic6x_condition_true (regcache, inst))
 	{
 	  if ((inst & 0x0000007c) == 0x00000010)
 	    {
@@ -636,7 +641,7 @@ tic6x_get_next_pc (struct frame_info *fr
 	      register_number = tic6x_register_number ((inst >> 18) & 0x1f,
 						       INST_S_BIT (inst),
 						       INST_X_BIT (inst));
-	      pc = get_frame_register_unsigned (frame, register_number);
+	      pc = regcache_raw_get_unsigned (regcache, register_number);
 	      break;
 	    }
 	  if ((inst & 0x00001ffc) == 0x00001020)
@@ -644,7 +649,7 @@ tic6x_get_next_pc (struct frame_info *fr
 	      /* BDEC */
 	      register_number = tic6x_register_number ((inst >> 23) & 0x1f,
 						       INST_S_BIT (inst), 0);
-	      if (get_frame_register_signed (frame, register_number) >= 0)
+	      if (regcache_raw_get_signed (regcache, register_number) >= 0)
 		{
 		  pc &= ~(TIC6X_FETCH_PACKET_SIZE - 1);
 		  pc += tic6x_extract_signed_field (inst, 7, 10) << 2;
@@ -663,7 +668,7 @@ tic6x_get_next_pc (struct frame_info *fr
 	      /* BNOP with register */
 	      register_number = tic6x_register_number ((inst >> 18) & 0x1f,
 						       1, INST_X_BIT (inst));
-	      pc = get_frame_register_unsigned (frame, register_number);
+	      pc = regcache_raw_get_unsigned (regcache, register_number);
 	      break;
 	    }
 	  if ((inst & 0x00001ffc) == 0x00000020)
@@ -671,7 +676,7 @@ tic6x_get_next_pc (struct frame_info *fr
 	      /* BPOS */
 	      register_number = tic6x_register_number ((inst >> 23) & 0x1f,
 						       INST_S_BIT (inst), 0);
-	      if (get_frame_register_signed (frame, register_number) >= 0)
+	      if (regcache_raw_get_signed (regcache, register_number) >= 0)
 		{
 		  pc &= ~(TIC6X_FETCH_PACKET_SIZE - 1);
 		  pc += tic6x_extract_signed_field (inst, 13, 10) << 2;
@@ -694,16 +699,15 @@ tic6x_get_next_pc (struct frame_info *fr
 
 /* This is the implementation of gdbarch method software_single_step.  */
 
-static int
-tic6x_software_single_step (struct frame_info *frame)
+static VEC (CORE_ADDR) *
+tic6x_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct address_space *aspace = get_frame_address_space (frame);
-  CORE_ADDR next_pc = tic6x_get_next_pc (frame, get_frame_pc (frame));
+  CORE_ADDR next_pc = tic6x_get_next_pc (regcache, regcache_read_pc (regcache));
+  VEC (CORE_ADDR) *next_pcs = NULL;
 
-  insert_single_step_breakpoint (gdbarch, aspace, next_pc);
+  VEC_safe_push (CORE_ADDR, next_pcs, next_pc);
 
-  return 1;
+  return next_pcs;
 }
 
 /* This is the implementation of gdbarch method frame_align.  */
@@ -807,7 +811,7 @@ tic6x_return_value (struct gdbarch *gdba
     {
       if (type != NULL)
 	{
-	  CHECK_TYPEDEF (type);
+	  type = check_typedef (type);
 	  if (language_pass_by_reference (type))
 	    return RETURN_VALUE_STRUCT_CONVENTION;
 	}
@@ -1268,7 +1272,7 @@ tic6x_gdbarch_init (struct gdbarch_info 
 	return arches->gdbarch;
     }
 
-  tdep = xcalloc (1, sizeof (struct gdbarch_tdep));
+  tdep = XCNEW (struct gdbarch_tdep);
 
   tdep->has_gp = has_gp;
   gdbarch = gdbarch_alloc (&info, tdep);
@@ -1297,7 +1301,10 @@ tic6x_gdbarch_init (struct gdbarch_info 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   set_gdbarch_skip_prologue (gdbarch, tic6x_skip_prologue);
-  set_gdbarch_breakpoint_from_pc (gdbarch, tic6x_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       tic6x_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       tic6x_sw_breakpoint_from_kind);
 
   set_gdbarch_unwind_pc (gdbarch, tic6x_unwind_pc);
   set_gdbarch_unwind_sp (gdbarch, tic6x_unwind_sp);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-tdep.h ./gdb/tic6x-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tic6x-tdep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tic6x-tdep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* GNU/Linux on  TI C6x target support.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
    Contributed by Yao Qi <yao@codesourcery.com>
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tid-parse.c ./gdb/tid-parse.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tid-parse.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/tid-parse.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,325 @@
+/* TID parsing for GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "tid-parse.h"
+#include "inferior.h"
+#include "gdbthread.h"
+#include <ctype.h>
+
+/* See tid-parse.h.  */
+
+void ATTRIBUTE_NORETURN
+invalid_thread_id_error (const char *string)
+{
+  error (_("Invalid thread ID: %s"), string);
+}
+
+/* Wrapper for get_number_trailer that throws an error if we get back
+   a negative number.  We'll see a negative value if the number is
+   stored in a negative convenience variable (e.g., $minus_one = -1).
+   STRING is the parser string to be used in the error message if we
+   do get back a negative number.  */
+
+static int
+get_positive_number_trailer (const char **pp, int trailer, const char *string)
+{
+  int num;
+
+  num = get_number_trailer (pp, trailer);
+  if (num < 0)
+    error (_("negative value: %s"), string);
+  return num;
+}
+
+/* See tid-parse.h.  */
+
+struct thread_info *
+parse_thread_id (const char *tidstr, const char **end)
+{
+  const char *number = tidstr;
+  const char *dot, *p1;
+  struct thread_info *tp;
+  struct inferior *inf;
+  int thr_num;
+  int explicit_inf_id = 0;
+
+  dot = strchr (number, '.');
+
+  if (dot != NULL)
+    {
+      /* Parse number to the left of the dot.  */
+      int inf_num;
+
+      p1 = number;
+      inf_num = get_positive_number_trailer (&p1, '.', number);
+      if (inf_num == 0)
+	invalid_thread_id_error (number);
+
+      inf = find_inferior_id (inf_num);
+      if (inf == NULL)
+	error (_("No inferior number '%d'"), inf_num);
+
+      explicit_inf_id = 1;
+      p1 = dot + 1;
+    }
+  else
+    {
+      inf = current_inferior ();
+
+      p1 = number;
+    }
+
+  thr_num = get_positive_number_trailer (&p1, 0, number);
+  if (thr_num == 0)
+    invalid_thread_id_error (number);
+
+  ALL_THREADS (tp)
+    {
+      if (ptid_get_pid (tp->ptid) == inf->pid
+	  && tp->per_inf_num == thr_num)
+	break;
+    }
+
+  if (tp == NULL)
+    {
+      if (show_inferior_qualified_tids () || explicit_inf_id)
+	error (_("Unknown thread %d.%d."), inf->num, thr_num);
+      else
+	error (_("Unknown thread %d."), thr_num);
+    }
+
+  if (end != NULL)
+    *end = p1;
+
+  return tp;
+}
+
+/* See tid-parse.h.  */
+
+tid_range_parser::tid_range_parser (const char *tidlist,
+				    int default_inferior)
+{
+  init (tidlist, default_inferior);
+}
+
+/* See tid-parse.h.  */
+
+void
+tid_range_parser::init (const char *tidlist, int default_inferior)
+{
+  m_state = STATE_INFERIOR;
+  m_cur_tok = tidlist;
+  m_inf_num = 0;
+  m_qualified = false;
+  m_default_inferior = default_inferior;
+}
+
+/* See tid-parse.h.  */
+
+bool
+tid_range_parser::finished () const
+{
+  switch (m_state)
+    {
+    case STATE_INFERIOR:
+      return *m_cur_tok == '\0';
+    case STATE_THREAD_RANGE:
+    case STATE_STAR_RANGE:
+      return m_range_parser.finished ();
+    }
+
+  gdb_assert_not_reached (_("unhandled state"));
+}
+
+/* See tid-parse.h.  */
+
+const char *
+tid_range_parser::cur_tok () const
+{
+  switch (m_state)
+    {
+    case STATE_INFERIOR:
+      return m_cur_tok;
+    case STATE_THREAD_RANGE:
+    case STATE_STAR_RANGE:
+      return m_range_parser.cur_tok ();
+    }
+
+  gdb_assert_not_reached (_("unhandled state"));
+}
+
+void
+tid_range_parser::skip_range ()
+{
+  gdb_assert (m_state == STATE_THREAD_RANGE
+	      || m_state == STATE_STAR_RANGE);
+
+  m_range_parser.skip_range ();
+  init (m_range_parser.cur_tok (), m_default_inferior);
+}
+
+/* See tid-parse.h.  */
+
+bool
+tid_range_parser::tid_is_qualified () const
+{
+  return m_qualified;
+}
+
+/* Helper for tid_range_parser::get_tid and
+   tid_range_parser::get_tid_range.  Return the next range if THR_END
+   is non-NULL, return a single thread ID otherwise.  */
+
+bool
+tid_range_parser::get_tid_or_range (int *inf_num,
+				    int *thr_start, int *thr_end)
+{
+  if (m_state == STATE_INFERIOR)
+    {
+      const char *p;
+      const char *space;
+
+      space = skip_to_space (m_cur_tok);
+
+      p = m_cur_tok;
+      while (p < space && *p != '.')
+	p++;
+      if (p < space)
+	{
+	  const char *dot = p;
+
+	  /* Parse number to the left of the dot.  */
+	  p = m_cur_tok;
+	  m_inf_num = get_positive_number_trailer (&p, '.', m_cur_tok);
+	  if (m_inf_num == 0)
+	    return 0;
+
+	  m_qualified = true;
+	  p = dot + 1;
+
+	  if (isspace (*p))
+	    return false;
+	}
+      else
+	{
+	  m_inf_num = m_default_inferior;
+	  m_qualified = false;
+	  p = m_cur_tok;
+	}
+
+      m_range_parser.init (p);
+      if (p[0] == '*' && (p[1] == '\0' || isspace (p[1])))
+	{
+	  /* Setup the number range parser to return numbers in the
+	     whole [1,INT_MAX] range.  */
+	  m_range_parser.setup_range (1, INT_MAX, skip_spaces_const (p + 1));
+	  m_state = STATE_STAR_RANGE;
+	}
+      else
+	m_state = STATE_THREAD_RANGE;
+    }
+
+  *inf_num = m_inf_num;
+  *thr_start = m_range_parser.get_number ();
+  if (*thr_start < 0)
+    error (_("negative value: %s"), m_cur_tok);
+  if (*thr_start == 0)
+    {
+      m_state = STATE_INFERIOR;
+      return false;
+    }
+
+  /* If we successfully parsed a thread number or finished parsing a
+     thread range, switch back to assuming the next TID is
+     inferior-qualified.  */
+  if (!m_range_parser.in_range ())
+    {
+      m_state = STATE_INFERIOR;
+      m_cur_tok = m_range_parser.cur_tok ();
+
+      if (thr_end != NULL)
+	*thr_end = *thr_start;
+    }
+
+  /* If we're midway through a range, and the caller wants the end
+     value, return it and skip to the end of the range.  */
+  if (thr_end != NULL
+      && (m_state == STATE_THREAD_RANGE
+	  || m_state == STATE_STAR_RANGE))
+    {
+      *thr_end = m_range_parser.end_value ();
+
+      skip_range ();
+    }
+
+  return (*inf_num != 0 && *thr_start != 0);
+}
+
+/* See tid-parse.h.  */
+
+bool
+tid_range_parser::get_tid_range (int *inf_num,
+				 int *thr_start, int *thr_end)
+{
+  gdb_assert (inf_num != NULL && thr_start != NULL && thr_end != NULL);
+
+  return get_tid_or_range (inf_num, thr_start, thr_end);
+}
+
+/* See tid-parse.h.  */
+
+bool
+tid_range_parser::get_tid (int *inf_num, int *thr_num)
+{
+  gdb_assert (inf_num != NULL && thr_num != NULL);
+
+  return get_tid_or_range (inf_num, thr_num, NULL);
+}
+
+/* See tid-parse.h.  */
+
+bool
+tid_range_parser::in_star_range () const
+{
+  return m_state == STATE_STAR_RANGE;
+}
+
+/* See gdbthread.h.  */
+
+int
+tid_is_in_list (const char *list, int default_inferior,
+		int inf_num, int thr_num)
+{
+  if (list == NULL || *list == '\0')
+    return 1;
+
+  tid_range_parser parser (list, default_inferior);
+  while (!parser.finished ())
+    {
+      int tmp_inf, tmp_thr_start, tmp_thr_end;
+
+      if (!parser.get_tid_range (&tmp_inf, &tmp_thr_start, &tmp_thr_end))
+	invalid_thread_id_error (parser.cur_tok ());
+      if (tmp_inf == inf_num
+	  && tmp_thr_start <= thr_num && thr_num <= tmp_thr_end)
+	return 1;
+    }
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tid-parse.h ./gdb/tid-parse.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tid-parse.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/tid-parse.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,186 @@
+/* TID parsing for GDB, the GNU debugger.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef TID_PARSE_H
+#define TID_PARSE_H
+
+#include "cli/cli-utils.h"
+
+struct thread_info;
+
+/* Issue an invalid thread ID error, pointing at STRING, the invalid
+   ID.  */
+extern void ATTRIBUTE_NORETURN invalid_thread_id_error (const char *string);
+
+/* Parse TIDSTR as a per-inferior thread ID, in either INF_NUM.THR_NUM
+   or THR_NUM form.  In the latter case, the missing INF_NUM is filled
+   in from the current inferior.  If ENDPTR is not NULL,
+   parse_thread_id stores the address of the first character after the
+   thread ID.  Either a valid thread is returned, or an error is
+   thrown.  */
+struct thread_info *parse_thread_id (const char *tidstr, const char **end);
+
+/* Parse a thread ID or a thread range list.
+
+   A range will be of the form
+
+     <inferior_num>.<thread_number1>-<thread_number2>
+
+   and will represent all the threads of inferior INFERIOR_NUM with
+   number between THREAD_NUMBER1 and THREAD_NUMBER2, inclusive.
+   <inferior_num> can also be omitted, as in
+
+     <thread_number1>-<thread_number2>
+
+   in which case GDB infers the inferior number from the default
+   passed to the constructor or to the last call to the init
+   function.  */
+class tid_range_parser
+{
+public:
+  /* Default construction.  Must call init before calling get_*.  */
+  tid_range_parser () {}
+
+  /* Calls init automatically.  See init for description of
+     parameters.  */
+  tid_range_parser (const char *tidlist, int default_inferior);
+
+  /* Reinitialize a tid_range_parser.  TIDLIST is the string to be
+     parsed.  DEFAULT_INFERIOR is the inferior number to assume if a
+     non-qualified thread ID is found.  */
+  void init (const char *tidlist, int default_inferior);
+
+  /* Parse a thread ID or a thread range list.
+
+     This function is designed to be called iteratively.  While
+     processing a thread ID range list, at each call it will return
+     (in the INF_NUM and THR_NUM output parameters) the next thread ID
+     in the range (irrespective of whether the thread actually
+     exists).
+
+     At the beginning of parsing a thread range, the char pointer
+     PARSER->m_cur_tok will be advanced past <thread_number1> and left
+     pointing at the '-' token.  Subsequent calls will not advance the
+     pointer until the range is completed.  The call that completes
+     the range will advance the pointer past <thread_number2>.
+
+     This function advances through the input string for as long you
+     call it.  Once the end of the input string is reached, a call to
+     finished returns false (see below).
+
+     E.g., with list: "1.2 3.4-6":
+
+     1st call: *INF_NUM=1; *THR_NUM=2 (finished==0)
+     2nd call: *INF_NUM=3; *THR_NUM=4 (finished==0)
+     3rd call: *INF_NUM=3; *THR_NUM=5 (finished==0)
+     4th call: *INF_NUM=3; *THR_NUM=6 (finished==1)
+
+     Returns true if a thread/range is parsed successfully, false
+     otherwise.  */
+  bool get_tid (int *inf_num, int *thr_num);
+
+  /* Like get_tid, but return a thread ID range per call, rather then
+     a single thread ID.
+
+     If the next element in the list is a single thread ID, then
+     *THR_START and *THR_END are set to the same value.
+
+     E.g.,. with list: "1.2 3.4-6"
+
+     1st call: *INF_NUM=1; *THR_START=2; *THR_END=2 (finished==0)
+     2nd call: *INF_NUM=3; *THR_START=4; *THR_END=6 (finished==1)
+
+     Returns true if parsed a thread/range successfully, false
+     otherwise.  */
+  bool get_tid_range (int *inf_num, int *thr_start, int *thr_end);
+
+  /* Returns true if processing a star wildcard (e.g., "1.*")
+     range.  */
+  bool in_star_range () const;
+
+  /* Returns true if parsing has completed.  */
+  bool finished () const;
+
+  /* Return the current token being parsed.  When parsing has
+     finished, this points past the last parsed token.  */
+  const char *cur_tok () const;
+
+  /* When parsing a range, advance past the final token in the
+     range.  */
+  void skip_range ();
+
+  /* True if the TID last parsed was explicitly inferior-qualified.
+     IOW, whether the spec specified an inferior number
+     explicitly.  */
+  bool tid_is_qualified () const;
+
+private:
+  /* No need for these.  They are intentionally not defined anywhere.  */
+  tid_range_parser (const tid_range_parser &);
+  tid_range_parser &operator= (const tid_range_parser &);
+
+  bool get_tid_or_range (int *inf_num, int *thr_start, int *thr_end);
+
+  /* The possible states of the tid range parser's state machine,
+     indicating what sub-component are we expecting.  */
+  enum
+    {
+      /* Parsing the inferior number.  */
+      STATE_INFERIOR,
+
+      /* Parsing the thread number or thread number range.  */
+      STATE_THREAD_RANGE,
+
+      /* Parsing a star wildcard thread range.  E.g., "1.*".  */
+      STATE_STAR_RANGE,
+    } m_state;
+
+  /* The string being parsed.  When parsing has finished, this points
+     past the last parsed token.  */
+  const char *m_cur_tok;
+
+  /* The range parser state when we're parsing the thread number
+     sub-component.  */
+  number_or_range_parser m_range_parser;
+
+  /* Last inferior number returned.  */
+  int m_inf_num;
+
+  /* True if the TID last parsed was explicitly inferior-qualified.
+     IOW, whether the spec specified an inferior number
+     explicitly.  */
+  bool m_qualified;
+
+  /* The inferior number to assume if the TID is not qualified.  */
+  int m_default_inferior;
+};
+
+
+/* Accept a string-form list of thread IDs such as is accepted by
+   tid_range_parser.  Return true if the INF_NUM.THR.NUM thread is in
+   the list.  DEFAULT_INFERIOR is the inferior number to assume if a
+   non-qualified thread ID is found in the list.
+
+   By definition, an empty list includes all threads.  This is to be
+   interpreted as typing a command such as "info threads" with no
+   arguments.  */
+extern int tid_is_in_list (const char *list, int default_inferior,
+			   int inf_num, int thr_num);
+
+#endif /* TID_PARSE_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-linux-nat.c ./gdb/tilegx-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-linux-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tilegx-linux-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux TILE-Gx.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,7 @@
 #include "regcache.h"
 #include "linux-nat.h"
 
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 
 #include <sys/procfs.h>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-linux-tdep.c ./gdb/tilegx-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-linux-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tilegx-linux-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux on Tilera TILE-Gx processors.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,7 +37,6 @@ tilegx_linux_sigframe_init (const struct
 			    struct trad_frame_cache *this_cache,
 			    CORE_ADDR func)
 {
-  CORE_ADDR pc = get_frame_register_unsigned (this_frame, 64);
   CORE_ADDR sp = get_frame_register_unsigned (this_frame, 54);
 
   /* Base address of register save area.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-tdep.c ./gdb/tilegx-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tilegx-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Tilera TILE-Gx processor.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -41,6 +41,7 @@
 #include "solib-svr4.h"
 #include "tilegx-tdep.h"
 #include "opcode/tilegx.h"
+#include <algorithm>
 
 struct tilegx_frame_cache
 {
@@ -288,7 +289,7 @@ tilegx_push_dummy_call (struct gdbarch *
   CORE_ADDR stack_dest = sp;
   int argreg = TILEGX_R0_REGNUM;
   int i, j;
-  int typelen, slacklen, alignlen;
+  int typelen, slacklen;
   static const gdb_byte four_zero_words[16] = { 0 };
 
   /* If struct_return is 1, then the struct return address will
@@ -333,7 +334,7 @@ tilegx_push_dummy_call (struct gdbarch *
 
       typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
       slacklen = align_up (typelen, 8) - typelen;
-      val = xmalloc (typelen + slacklen);
+      val = (gdb_byte *) xmalloc (typelen + slacklen);
       back_to = make_cleanup (xfree, val);
       memcpy (val, contents, typelen);
       memset (val + typelen, 0, slacklen);
@@ -375,9 +376,6 @@ tilegx_analyze_prologue (struct gdbarch*
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR next_addr;
   CORE_ADDR prolog_end = end_addr;
-  ULONGEST inst, inst2;
-  LONGEST offset;
-  int regnum;
   gdb_byte instbuf[32 * TILEGX_BUNDLE_SIZE_IN_BYTES];
   CORE_ADDR instbuf_start;
   unsigned int instbuf_size;
@@ -431,13 +429,14 @@ tilegx_analyze_prologue (struct gdbarch*
 	  if (instbuf_size > size_on_same_page)
 	    instbuf_size = size_on_same_page;
 
-	  instbuf_size = min (instbuf_size, (end_addr - next_addr));
+	  instbuf_size = std::min ((CORE_ADDR) instbuf_size,
+				   (end_addr - next_addr));
 	  instbuf_start = next_addr;
 
 	  status = safe_frame_unwind_memory (next_frame, instbuf_start,
 					     instbuf, instbuf_size);
 	  if (status == 0)
-	    memory_error (status, next_addr);
+	    memory_error (TARGET_XFER_E_IO, next_addr);
 	}
 
       reverse_frame_valid = 0;
@@ -450,7 +449,7 @@ tilegx_analyze_prologue (struct gdbarch*
       for (i = 0; i < num_insns; i++)
 	{
 	  struct tilegx_decoded_instruction *this_insn = &decoded[i];
-	  int64_t *operands = (int64_t *) this_insn->operand_values;
+	  long long *operands = this_insn->operand_values;
 	  const struct tilegx_opcode *opcode = this_insn->opcode;
 
 	  switch (opcode->mnemonic)
@@ -755,14 +754,14 @@ tilegx_skip_prologue (struct gdbarch *gd
         = skip_prologue_using_sal (gdbarch, func_start);
 
       if (post_prologue_pc != 0)
-        return max (start_pc, post_prologue_pc);
+        return std::max (start_pc, post_prologue_pc);
     }
 
   /* Don't straddle a section boundary.  */
   s = find_pc_section (start_pc);
   end_pc = start_pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES;
   if (s != NULL)
-    end_pc = min (end_pc, obj_section_endaddr (s));
+    end_pc = std::min (end_pc, obj_section_endaddr (s));
 
   /* Otherwise, try to skip prologue the hard way.  */
   return tilegx_analyze_prologue (gdbarch,
@@ -780,7 +779,6 @@ tilegx_stack_frame_destroyed_p (struct g
 
   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
     {
-      ULONGEST inst, inst2;
       CORE_ADDR addr = func_end - TILEGX_BUNDLE_SIZE_IN_BYTES;
 
       /* FIXME: Find the actual epilogue.  */
@@ -844,19 +842,11 @@ tilegx_write_pc (struct regcache *regcac
                                   INT_SWINT_1_SIGRETURN);
 }
 
-/* This is the implementation of gdbarch method breakpoint_from_pc.  */
+/* 64-bit pattern for a { bpt ; nop } bundle.  */
+constexpr gdb_byte tilegx_break_insn[] =
+  { 0x00, 0x50, 0x48, 0x51, 0xae, 0x44, 0x6a, 0x28 };
 
-static const unsigned char *
-tilegx_breakpoint_from_pc (struct gdbarch *gdbarch,
-			   CORE_ADDR *pcptr, int *lenptr)
-{
-  /* 64-bit pattern for a { bpt ; nop } bundle.  */
-  static const unsigned char breakpoint[] =
-    { 0x00, 0x50, 0x48, 0x51, 0xae, 0x44, 0x6a, 0x28 };
-
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+typedef BP_MANIPULATION (tilegx_break_insn) tilegx_breakpoint;
 
 /* Normal frames.  */
 
@@ -866,10 +856,9 @@ tilegx_frame_cache (struct frame_info *t
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct tilegx_frame_cache *cache;
   CORE_ADDR current_pc;
-  int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct tilegx_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct tilegx_frame_cache);
   *this_cache = cache;
@@ -1060,7 +1049,10 @@ tilegx_gdbarch_init (struct gdbarch_info
   set_gdbarch_push_dummy_call (gdbarch, tilegx_push_dummy_call);
   set_gdbarch_get_longjmp_target (gdbarch, tilegx_get_longjmp_target);
   set_gdbarch_write_pc (gdbarch, tilegx_write_pc);
-  set_gdbarch_breakpoint_from_pc (gdbarch, tilegx_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       tilegx_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       tilegx_breakpoint::bp_from_kind);
   set_gdbarch_return_value (gdbarch, tilegx_return_value);
 
   set_gdbarch_print_insn (gdbarch, print_insn_tilegx);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-tdep.h ./gdb/tilegx-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tilegx-tdep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tilegx-tdep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Tilera TILE-Gx processor.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/top.c ./gdb/top.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/top.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/top.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Top level stuff for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,6 +49,9 @@
 #include "observer.h"
 #include "maint.h"
 #include "filenames.h"
+#include "frame.h"
+#include "buffer.h"
+#include "gdb_select.h"
 
 /* readline include files.  */
 #include "readline/readline.h"
@@ -67,6 +70,14 @@
 #include "tracepoint.h"
 #include "inf-loop.h"
 
+#if defined(TUI)
+# include "tui/tui.h"
+#endif
+
+#ifndef O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
 extern void initialize_all_files (void);
 
 #define PROMPT(X) the_prompts.prompt_stack[the_prompts.top + X].prompt
@@ -79,6 +90,22 @@ extern void initialize_all_files (void);
 #define DEFAULT_PROMPT	"(gdb) "
 #endif
 
+/* Generate a function that exports a pointer to a field of the
+   current UI.  */
+
+#define gen_ret_current_ui_field_ptr(type, name)	\
+type *							\
+current_ui_## name ## _ptr (void)			\
+{							\
+  return &current_ui->m_ ## name;		\
+}
+
+gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdout)
+gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdin)
+gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stderr)
+gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdlog)
+gen_ret_current_ui_field_ptr (struct ui_out *, current_uiout)
+
 /* Initialization file name for gdb.  This is host-dependent.  */
 
 const char gdbinit[] = GDBINIT;
@@ -101,13 +128,6 @@ show_confirm (struct ui_file *file, int 
 		    value);
 }
 
-/* stdio stream that command input is being read from.  Set to stdin
-   normally.  Set by source_command to the file we are sourcing.  Set
-   to NULL if we are executing a user-defined command or interacting
-   via a GUI.  */
-
-FILE *instream;
-
 /* Flag to indicate whether a user defined command is currently running.  */
 
 int in_user_command;
@@ -119,17 +139,9 @@ char *current_directory;
 /* The directory name is actually stored here (usually).  */
 char gdb_dirbuf[1024];
 
-/* Function to call before reading a command, if nonzero.
-   The function receives two args: an input stream,
-   and a prompt string.  */
-
-void (*window_hook) (FILE *, char *);
-
-/* Buffer used for reading command lines, and the size
-   allocated for it so far.  */
-
+/* The last command line executed on the console.  Used for command
+   repetitions.  */
 char *saved_command_line;
-int saved_command_line_size = 100;
 
 /* Nonzero if the current command is modified by "server ".  This
    affects things like recording into the command history, commands
@@ -221,11 +233,6 @@ void (*deprecated_detach_hook) (void);
 
 void (*deprecated_interactive_hook) (void);
 
-/* Tell the GUI someone changed the register REGNO.  -1 means
-   that the caller does not know which register changed or
-   that several registers have changed (see value_assign).  */
-void (*deprecated_register_changed_hook) (int regno);
-
 /* Called when going to wait for the target.  Usually allows the GUI
    to run while waiting for target events.  */
 
@@ -243,6 +250,175 @@ void (*deprecated_call_command_hook) (st
 
 void (*deprecated_context_hook) (int id);
 
+/* The highest UI number ever assigned.  */
+static int highest_ui_num;
+
+/* See top.h.  */
+
+struct ui *
+new_ui (FILE *instream, FILE *outstream, FILE *errstream)
+{
+  struct ui *ui;
+
+  ui = XCNEW (struct ui);
+
+  ui->num = ++highest_ui_num;
+  ui->stdin_stream = instream;
+  ui->instream = instream;
+  ui->outstream = outstream;
+  ui->errstream = errstream;
+
+  ui->input_fd = fileno (ui->instream);
+
+  ui->input_interactive_p = ISATTY (ui->instream);
+
+  ui->m_gdb_stdin = new stdio_file (ui->instream);
+  ui->m_gdb_stdout = new stdio_file (ui->outstream);
+  ui->m_gdb_stderr = new stderr_file (ui->errstream);
+  ui->m_gdb_stdlog = ui->m_gdb_stderr;
+
+  ui->prompt_state = PROMPT_NEEDED;
+
+  if (ui_list == NULL)
+    ui_list = ui;
+  else
+    {
+      struct ui *last;
+
+      for (last = ui_list; last->next != NULL; last = last->next)
+	;
+      last->next = ui;
+    }
+
+  return ui;
+}
+
+static void
+free_ui (struct ui *ui)
+{
+  delete ui->m_gdb_stdin;
+  delete ui->m_gdb_stdout;
+  delete ui->m_gdb_stderr;
+
+  xfree (ui);
+}
+
+void
+delete_ui (struct ui *todel)
+{
+  struct ui *ui, *uiprev;
+
+  uiprev = NULL;
+
+  for (ui = ui_list; ui != NULL; uiprev = ui, ui = ui->next)
+    if (ui == todel)
+      break;
+
+  gdb_assert (ui != NULL);
+
+  if (uiprev != NULL)
+    uiprev->next = ui->next;
+  else
+    ui_list = ui->next;
+
+  free_ui (ui);
+}
+
+/* Cleanup that deletes a UI.  */
+
+static void
+delete_ui_cleanup (void *void_ui)
+{
+  struct ui *ui = (struct ui *) void_ui;
+
+  delete_ui (ui);
+}
+
+/* See top.h.  */
+
+struct cleanup *
+make_delete_ui_cleanup (struct ui *ui)
+{
+  return make_cleanup (delete_ui_cleanup, ui);
+}
+
+/* Open file named NAME for read/write, making sure not to make it the
+   controlling terminal.  */
+
+static FILE *
+open_terminal_stream (const char *name)
+{
+  int fd;
+
+  fd = open (name, O_RDWR | O_NOCTTY);
+  if (fd < 0)
+    perror_with_name  (_("opening terminal failed"));
+
+  return fdopen (fd, "w+");
+}
+
+/* Implementation of the "new-ui" command.  */
+
+static void
+new_ui_command (char *args, int from_tty)
+{
+  struct ui *ui;
+  struct interp *interp;
+  FILE *stream[3] = { NULL, NULL, NULL };
+  int i;
+  int res;
+  int argc;
+  char **argv;
+  const char *interpreter_name;
+  const char *tty_name;
+  struct cleanup *success_chain;
+  struct cleanup *failure_chain;
+
+  dont_repeat ();
+
+  argv = gdb_buildargv (args);
+  success_chain = make_cleanup_freeargv (argv);
+  argc = countargv (argv);
+
+  if (argc < 2)
+    error (_("usage: new-ui <interpreter> <tty>"));
+
+  interpreter_name = argv[0];
+  tty_name = argv[1];
+
+  {
+    scoped_restore save_ui = make_scoped_restore (&current_ui);
+
+    failure_chain = make_cleanup (null_cleanup, NULL);
+
+    /* Open specified terminal, once for each of
+       stdin/stdout/stderr.  */
+    for (i = 0; i < 3; i++)
+      {
+	stream[i] = open_terminal_stream (tty_name);
+	make_cleanup_fclose (stream[i]);
+      }
+
+    ui = new_ui (stream[0], stream[1], stream[2]);
+    make_cleanup (delete_ui_cleanup, ui);
+
+    ui->async = 1;
+
+    current_ui = ui;
+
+    set_top_level_interpreter (interpreter_name);
+
+    interp_pre_command_loop (top_level_interpreter ());
+
+    discard_cleanups (failure_chain);
+
+    /* This restores the previous UI and frees argv.  */
+    do_cleanups (success_chain);
+  }
+
+  printf_unfiltered ("New UI allocated\n");
+}
+
 /* Handler for SIGHUP.  */
 
 #ifdef SIGHUP
@@ -277,19 +453,36 @@ quit_cover (void)
 void
 do_restore_instream_cleanup (void *stream)
 {
+  struct ui *ui = current_ui;
+
   /* Restore the previous input stream.  */
-  instream = stream;
+  ui->instream = (FILE *) stream;
 }
 
 /* Read commands from STREAM.  */
 void
 read_command_file (FILE *stream)
 {
+  struct ui *ui = current_ui;
   struct cleanup *cleanups;
 
-  cleanups = make_cleanup (do_restore_instream_cleanup, instream);
-  instream = stream;
-  command_loop ();
+  cleanups = make_cleanup (do_restore_instream_cleanup, ui->instream);
+  ui->instream = stream;
+
+  /* Read commands from `instream' and execute them until end of file
+     or error reading instream.  */
+
+  while (ui->instream != NULL && !feof (ui->instream))
+    {
+      char *command;
+
+      /* Get a command-line.  This calls the readline package.  */
+      command = command_line_input (NULL, 0, NULL);
+      if (command == NULL)
+	break;
+      command_handler (command);
+    }
+
   do_cleanups (cleanups);
 }
 
@@ -299,7 +492,7 @@ void (*pre_init_ui_hook) (void);
 static void
 do_chdir_cleanup (void *old_dir)
 {
-  chdir (old_dir);
+  chdir ((const char *) old_dir);
   xfree (old_dir);
 }
 #endif
@@ -330,10 +523,11 @@ void
 check_frame_language_change (void)
 {
   static int warned = 0;
+  struct frame_info *frame;
 
   /* First make sure that a new frame has been selected, in case the
      command or the hooks changed the program state.  */
-  deprecated_safe_get_selected_frame ();
+  frame = deprecated_safe_get_selected_frame ();
   if (current_language != expected_language)
     {
       if (language_mode == language_mode_auto && info_verbose)
@@ -353,7 +547,7 @@ check_frame_language_change (void)
     {
       enum language flang;
 
-      flang = get_frame_language ();
+      flang = get_frame_language (frame);
       if (!warned
 	  && flang != language_unknown
 	  && flang != current_language->la_language)
@@ -367,18 +561,30 @@ check_frame_language_change (void)
 /* See top.h.  */
 
 void
+wait_sync_command_done (void)
+{
+  /* Processing events may change the current UI.  */
+  scoped_restore save_ui = make_scoped_restore (&current_ui);
+  struct ui *ui = current_ui;
+
+  while (gdb_do_one_event () >= 0)
+    if (ui->prompt_state != PROMPT_BLOCKED)
+      break;
+}
+
+/* See top.h.  */
+
+void
 maybe_wait_sync_command_done (int was_sync)
 {
   /* If the interpreter is in sync mode (we're running a user
      command's list, running command hooks or similars), and we
      just ran a synchronous command that started the target, wait
      for that command to end.  */
-  if (!interpreter_async && !was_sync && sync_execution)
-    {
-      while (gdb_do_one_event () >= 0)
-	if (!sync_execution)
-	  break;
-    }
+  if (!current_ui->async
+      && !was_sync
+      && current_ui->prompt_state == PROMPT_BLOCKED)
+    wait_sync_command_done ();
 }
 
 /* Execute the line P as a command, in the current user context.
@@ -414,7 +620,7 @@ execute_command (char *p, int from_tty)
     {
       const char *cmd = p;
       char *arg;
-      int was_sync = sync_execution;
+      int was_sync = current_ui->prompt_state == PROMPT_BLOCKED;
 
       line = p;
 
@@ -484,92 +690,40 @@ execute_command (char *p, int from_tty)
    returned string, do not display it to the screen.  BATCH_FLAG will be
    temporarily set to true.  */
 
-char *
+std::string
 execute_command_to_string (char *p, int from_tty)
 {
-  struct ui_file *str_file;
   struct cleanup *cleanup;
-  char *retval;
 
   /* GDB_STDOUT should be better already restored during these
      restoration callbacks.  */
   cleanup = set_batch_flag_and_make_cleanup_restore_page_info ();
 
-  make_cleanup_restore_integer (&interpreter_async);
-  interpreter_async = 0;
+  scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
-  str_file = mem_fileopen ();
+  string_file str_file;
 
-  make_cleanup_ui_file_delete (str_file);
-  make_cleanup_restore_ui_file (&gdb_stdout);
-  make_cleanup_restore_ui_file (&gdb_stderr);
-  make_cleanup_restore_ui_file (&gdb_stdlog);
-  make_cleanup_restore_ui_file (&gdb_stdtarg);
-  make_cleanup_restore_ui_file (&gdb_stdtargerr);
-
-  if (ui_out_redirect (current_uiout, str_file) < 0)
-    warning (_("Current output protocol does not support redirection"));
-  else
-    make_cleanup_ui_out_redirect_pop (current_uiout);
+  current_uiout->redirect (&str_file);
+  make_cleanup_ui_out_redirect_pop (current_uiout);
 
-  gdb_stdout = str_file;
-  gdb_stderr = str_file;
-  gdb_stdlog = str_file;
-  gdb_stdtarg = str_file;
-  gdb_stdtargerr = str_file;
+  scoped_restore save_stdout
+    = make_scoped_restore (&gdb_stdout, &str_file);
+  scoped_restore save_stderr
+    = make_scoped_restore (&gdb_stderr, &str_file);
+  scoped_restore save_stdlog
+    = make_scoped_restore (&gdb_stdlog, &str_file);
+  scoped_restore save_stdtarg
+    = make_scoped_restore (&gdb_stdtarg, &str_file);
+  scoped_restore save_stdtargerr
+    = make_scoped_restore (&gdb_stdtargerr, &str_file);
 
   execute_command (p, from_tty);
 
-  retval = ui_file_xstrdup (str_file, NULL);
-
   do_cleanups (cleanup);
 
-  return retval;
+  return std::move (str_file.string ());
 }
 
-/* Read commands from `instream' and execute them
-   until end of file or error reading instream.  */
-
-void
-command_loop (void)
-{
-  struct cleanup *old_chain;
-  char *command;
-  int stdin_is_tty = ISATTY (stdin);
-
-  while (instream && !feof (instream))
-    {
-      if (window_hook && instream == stdin)
-	(*window_hook) (instream, get_prompt ());
-
-      clear_quit_flag ();
-      if (instream == stdin && stdin_is_tty)
-	reinitialize_more_filter ();
-      old_chain = make_cleanup (null_cleanup, 0);
-
-      /* Get a command-line.  This calls the readline package.  */
-      command = command_line_input (instream == stdin ?
-				    get_prompt () : (char *) NULL,
-				    instream == stdin, "prompt");
-      if (command == 0)
-	{
-	  do_cleanups (old_chain);
-	  return;
-	}
-
-      make_command_stats_cleanup (1);
-
-      /* Do not execute commented lines.  */
-      if (command[0] != '#')
-	{
-	  execute_command (command, instream == stdin);
-
-	  /* Do any commands attached to breakpoint we are stopped at.  */
-	  bpstat_do_actions ();
-	}
-      do_cleanups (old_chain);
-    }
-}
 
 /* When nonzero, cause dont_repeat to do nothing.  This should only be
    set via prevent_dont_repeat.  */
@@ -581,89 +735,105 @@ static int suppress_dont_repeat = 0;
 void
 dont_repeat (void)
 {
+  struct ui *ui = current_ui;
+
   if (suppress_dont_repeat || server_command)
     return;
 
   /* If we aren't reading from standard input, we are saving the last
      thing read from stdin in line and don't want to delete it.  Null
      lines won't repeat here in any case.  */
-  if (instream == stdin)
+  if (ui->instream == ui->stdin_stream)
     *saved_command_line = 0;
 }
 
 /* Prevent dont_repeat from working, and return a cleanup that
    restores the previous state.  */
 
-struct cleanup *
+scoped_restore_tmpl<int>
 prevent_dont_repeat (void)
 {
-  struct cleanup *result = make_cleanup_restore_integer (&suppress_dont_repeat);
-
-  suppress_dont_repeat = 1;
-  return result;
+  return make_scoped_restore (&suppress_dont_repeat, 1);
 }
 
 
 /* Read a line from the stream "instream" without command line editing.
 
-   It prints PROMPT_ARG once at the start.
+   It prints PROMPT once at the start.
    Action is compatible with "readline", e.g. space for the result is
    malloc'd and should be freed by the caller.
 
    A NULL return means end of file.  */
-char *
-gdb_readline (const char *prompt_arg)
+
+static char *
+gdb_readline_no_editing (const char *prompt)
 {
-  int c;
-  char *result;
-  int input_index = 0;
-  int result_size = 80;
+  struct buffer line_buffer;
+  struct ui *ui = current_ui;
+  /* Read from stdin if we are executing a user defined command.  This
+     is the right thing for prompt_for_continue, at least.  */
+  FILE *stream = ui->instream != NULL ? ui->instream : stdin;
+  int fd = fileno (stream);
 
-  if (prompt_arg)
+  buffer_init (&line_buffer);
+
+  if (prompt != NULL)
     {
       /* Don't use a _filtered function here.  It causes the assumed
          character position to be off, since the newline we read from
          the user is not accounted for.  */
-      fputs_unfiltered (prompt_arg, gdb_stdout);
+      fputs_unfiltered (prompt, gdb_stdout);
       gdb_flush (gdb_stdout);
     }
 
-  result = (char *) xmalloc (result_size);
-
   while (1)
     {
-      /* Read from stdin if we are executing a user defined command.
-         This is the right thing for prompt_for_continue, at least.  */
-      c = fgetc (instream ? instream : stdin);
+      int c;
+      int numfds;
+      fd_set readfds;
+
+      QUIT;
+
+      /* Wait until at least one byte of data is available.  Control-C
+	 can interrupt interruptible_select, but not fgetc.  */
+      FD_ZERO (&readfds);
+      FD_SET (fd, &readfds);
+      if (interruptible_select (fd + 1, &readfds, NULL, NULL, NULL) == -1)
+	{
+	  if (errno == EINTR)
+	    {
+	      /* If this was ctrl-c, the QUIT above handles it.  */
+	      continue;
+	    }
+	  perror_with_name (("select"));
+	}
+
+      c = fgetc (stream);
 
       if (c == EOF)
 	{
-	  if (input_index > 0)
+	  if (line_buffer.used_size > 0)
 	    /* The last line does not end with a newline.  Return it, and
 	       if we are called again fgetc will still return EOF and
 	       we'll return NULL then.  */
 	    break;
-	  xfree (result);
+	  xfree (buffer_finish (&line_buffer));
 	  return NULL;
 	}
 
       if (c == '\n')
 	{
-	  if (input_index > 0 && result[input_index - 1] == '\r')
-	    input_index--;
+	  if (line_buffer.used_size > 0
+	      && line_buffer.buffer[line_buffer.used_size - 1] == '\r')
+	    line_buffer.used_size--;
 	  break;
 	}
 
-      result[input_index++] = c;
-      while (input_index >= result_size)
-	{
-	  result_size *= 2;
-	  result = (char *) xrealloc (result, result_size);
-	}
+      buffer_grow_char (&line_buffer, c);
     }
 
-  result[input_index++] = '\0';
-  return result;
+  buffer_grow_char (&line_buffer, '\0');
+  return buffer_finish (&line_buffer);
 }
 
 /* Variables which control command line editing and history
@@ -753,6 +923,16 @@ static char *gdb_readline_wrapper_result
    return.  */
 static void (*saved_after_char_processing_hook) (void);
 
+
+/* See top.h.  */
+
+int
+gdb_in_secondary_prompt_p (struct ui *ui)
+{
+  return ui->secondary_prompt_depth > 0;
+}
+
+
 /* This function is called when readline has seen a complete line of
    text.  */
 
@@ -775,7 +955,7 @@ gdb_readline_wrapper_line (char *line)
      we're handling an asynchronous target event and running in the
      background, just before returning to the event loop to process
      further input (or more target events).  */
-  if (async_command_editing_p)
+  if (current_ui->command_editing)
     gdb_rl_callback_handler_remove ();
 }
 
@@ -791,12 +971,15 @@ struct gdb_readline_wrapper_cleanup
 static void
 gdb_readline_wrapper_cleanup (void *arg)
 {
-  struct gdb_readline_wrapper_cleanup *cleanup = arg;
+  struct ui *ui = current_ui;
+  struct gdb_readline_wrapper_cleanup *cleanup
+    = (struct gdb_readline_wrapper_cleanup *) arg;
 
-  rl_already_prompted = cleanup->already_prompted_orig;
+  if (ui->command_editing)
+    rl_already_prompted = cleanup->already_prompted_orig;
 
-  gdb_assert (input_handler == gdb_readline_wrapper_line);
-  input_handler = cleanup->handler_orig;
+  gdb_assert (ui->input_handler == gdb_readline_wrapper_line);
+  ui->input_handler = cleanup->handler_orig;
 
   /* Don't restore our input handler in readline yet.  That would make
      readline prep the terminal (putting it in raw mode), while the
@@ -807,6 +990,8 @@ gdb_readline_wrapper_cleanup (void *arg)
 
   gdb_readline_wrapper_result = NULL;
   gdb_readline_wrapper_done = 0;
+  ui->secondary_prompt_depth--;
+  gdb_assert (ui->secondary_prompt_depth >= 0);
 
   after_char_processing_hook = saved_after_char_processing_hook;
   saved_after_char_processing_hook = NULL;
@@ -820,26 +1005,35 @@ gdb_readline_wrapper_cleanup (void *arg)
 char *
 gdb_readline_wrapper (const char *prompt)
 {
+  struct ui *ui = current_ui;
   struct cleanup *back_to;
   struct gdb_readline_wrapper_cleanup *cleanup;
   char *retval;
 
-  cleanup = xmalloc (sizeof (*cleanup));
-  cleanup->handler_orig = input_handler;
-  input_handler = gdb_readline_wrapper_line;
+  cleanup = XNEW (struct gdb_readline_wrapper_cleanup);
+  cleanup->handler_orig = ui->input_handler;
+  ui->input_handler = gdb_readline_wrapper_line;
 
-  cleanup->already_prompted_orig = rl_already_prompted;
+  if (ui->command_editing)
+    cleanup->already_prompted_orig = rl_already_prompted;
+  else
+    cleanup->already_prompted_orig = 0;
 
   cleanup->target_is_async_orig = target_is_async_p ();
 
+  ui->secondary_prompt_depth++;
   back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup);
 
+  /* Processing events may change the current UI.  */
+  scoped_restore save_ui = make_scoped_restore (&current_ui);
+
   if (cleanup->target_is_async_orig)
     target_async (0);
 
   /* Display our prompt and prevent double prompt display.  */
   display_gdb_prompt (prompt);
-  rl_already_prompted = 1;
+  if (ui->command_editing)
+    rl_already_prompted = 1;
 
   if (after_char_processing_hook)
     (*after_char_processing_hook) ();
@@ -961,7 +1155,7 @@ gdb_safe_append_history (void)
   struct cleanup *old_chain;
 
   local_history_filename
-    = xstrprintf ("%s-gdb%d~", history_filename, getpid ());
+    = xstrprintf ("%s-gdb%ld~", history_filename, (long) getpid ());
   old_chain = make_cleanup (xfree, local_history_filename);
 
   ret = rename (history_filename, local_history_filename);
@@ -1005,43 +1199,40 @@ gdb_safe_append_history (void)
   do_cleanups (old_chain);
 }
 
-/* Read one line from the command input stream `instream'
-   into the local static buffer `linebuffer' (whose current length
-   is `linelength').
-   The buffer is made bigger as necessary.
-   Returns the address of the start of the line.
+/* Read one line from the command input stream `instream' into a local
+   static buffer.  The buffer is made bigger as necessary.  Returns
+   the address of the start of the line.
 
    NULL is returned for end of file.
 
-   *If* the instream == stdin & stdin is a terminal, the line read
-   is copied into the file line saver (global var char *line,
-   length linesize) so that it can be duplicated.
+   *If* input is from an interactive stream (stdin), the line read is
+   copied into the global 'saved_command_line' so that it can be
+   repeated.
 
-   This routine either uses fancy command line editing or
-   simple input as the user has requested.  */
+   This routine either uses fancy command line editing or simple input
+   as the user has requested.  */
 
 char *
 command_line_input (const char *prompt_arg, int repeat, char *annotation_suffix)
 {
-  static char *linebuffer = 0;
-  static unsigned linelength = 0;
+  static struct buffer cmd_line_buffer;
+  static int cmd_line_buffer_initialized;
+  struct ui *ui = current_ui;
   const char *prompt = prompt_arg;
-  char *p;
-  char *p1;
-  char *rl;
-  char *nline;
-  char got_eof = 0;
+  char *cmd;
+  int from_tty = ui->instream == ui->stdin_stream;
 
   /* The annotation suffix must be non-NULL.  */
   if (annotation_suffix == NULL)
     annotation_suffix = "";
 
-  if (annotation_level > 1 && instream == stdin)
+  if (from_tty && annotation_level > 1)
     {
       char *local_prompt;
 
-      local_prompt = alloca ((prompt == NULL ? 0 : strlen (prompt))
-			     + strlen (annotation_suffix) + 40);
+      local_prompt
+	= (char *) alloca ((prompt == NULL ? 0 : strlen (prompt))
+			   + strlen (annotation_suffix) + 40);
       if (prompt == NULL)
 	local_prompt[0] = '\0';
       else
@@ -1053,18 +1244,15 @@ command_line_input (const char *prompt_a
       prompt = local_prompt;
     }
 
-  if (linebuffer == 0)
+  if (!cmd_line_buffer_initialized)
     {
-      linelength = 80;
-      linebuffer = (char *) xmalloc (linelength);
+      buffer_init (&cmd_line_buffer);
+      cmd_line_buffer_initialized = 1;
     }
 
-  p = linebuffer;
+  /* Starting a new command line.  */
+  cmd_line_buffer.used_size = 0;
 
-  /* Control-C quits instantly if typed while in this loop
-     since it should not wait until the user types a newline.  */
-  immediate_quit++;
-  QUIT;
 #ifdef STOP_SIGNAL
   if (job_control)
     signal (STOP_SIGNAL, handle_stop_sig);
@@ -1072,6 +1260,8 @@ command_line_input (const char *prompt_a
 
   while (1)
     {
+      char *rl;
+
       /* Make sure that all output has been output.  Some machines may
          let you get away with leaving out some of the gdb_flush, but
          not all.  */
@@ -1082,7 +1272,7 @@ command_line_input (const char *prompt_a
       if (source_file_name != NULL)
 	++source_line_number;
 
-      if (annotation_level > 1 && instream == stdin)
+      if (from_tty && annotation_level > 1)
 	{
 	  puts_unfiltered ("\n\032\032pre-");
 	  puts_unfiltered (annotation_suffix);
@@ -1090,50 +1280,33 @@ command_line_input (const char *prompt_a
 	}
 
       /* Don't use fancy stuff if not talking to stdin.  */
-      if (deprecated_readline_hook && input_from_terminal_p ())
+      if (deprecated_readline_hook
+	  && from_tty
+	  && input_interactive_p (current_ui))
 	{
 	  rl = (*deprecated_readline_hook) (prompt);
 	}
-      else if (command_editing_p && input_from_terminal_p ())
+      else if (command_editing_p
+	       && from_tty
+	       && input_interactive_p (current_ui))
 	{
 	  rl = gdb_readline_wrapper (prompt);
 	}
       else
 	{
-	  rl = gdb_readline (prompt);
+	  rl = gdb_readline_no_editing (prompt);
 	}
 
-      if (annotation_level > 1 && instream == stdin)
+      cmd = handle_line_of_input (&cmd_line_buffer, rl,
+				  repeat, annotation_suffix);
+      if (cmd == (char *) EOF)
 	{
-	  puts_unfiltered ("\n\032\032post-");
-	  puts_unfiltered (annotation_suffix);
-	  puts_unfiltered ("\n");
-	}
-
-      if (!rl || rl == (char *) EOF)
-	{
-	  got_eof = 1;
+	  cmd = NULL;
 	  break;
 	}
-      if (strlen (rl) + 1 + (p - linebuffer) > linelength)
-	{
-	  linelength = strlen (rl) + 1 + (p - linebuffer);
-	  nline = (char *) xrealloc (linebuffer, linelength);
-	  p += nline - linebuffer;
-	  linebuffer = nline;
-	}
-      p1 = rl;
-      /* Copy line.  Don't copy null at end.  (Leaves line alone
-         if this was just a newline).  */
-      while (*p1)
-	*p++ = *p1++;
-
-      xfree (rl);		/* Allocated in readline.  */
-
-      if (p == linebuffer || *(p - 1) != '\\')
+      if (cmd != NULL)
 	break;
 
-      p--;			/* Put on top of '\'.  */
       prompt = NULL;
     }
 
@@ -1141,83 +1314,8 @@ command_line_input (const char *prompt_a
   if (job_control)
     signal (STOP_SIGNAL, SIG_DFL);
 #endif
-  immediate_quit--;
 
-  if (got_eof)
-    return NULL;
-
-#define SERVER_COMMAND_LENGTH 7
-  server_command =
-    (p - linebuffer > SERVER_COMMAND_LENGTH)
-    && strncmp (linebuffer, "server ", SERVER_COMMAND_LENGTH) == 0;
-  if (server_command)
-    {
-      /* Note that we don't set `line'.  Between this and the check in
-         dont_repeat, this insures that repeating will still do the
-         right thing.  */
-      *p = '\0';
-      return linebuffer + SERVER_COMMAND_LENGTH;
-    }
-
-  /* Do history expansion if that is wished.  */
-  if (history_expansion_p && instream == stdin
-      && ISATTY (instream))
-    {
-      char *history_value;
-      int expanded;
-
-      *p = '\0';		/* Insert null now.  */
-      expanded = history_expand (linebuffer, &history_value);
-      if (expanded)
-	{
-	  /* Print the changes.  */
-	  printf_unfiltered ("%s\n", history_value);
-
-	  /* If there was an error, call this function again.  */
-	  if (expanded < 0)
-	    {
-	      xfree (history_value);
-	      return command_line_input (prompt, repeat,
-					 annotation_suffix);
-	    }
-	  if (strlen (history_value) > linelength)
-	    {
-	      linelength = strlen (history_value) + 1;
-	      linebuffer = (char *) xrealloc (linebuffer, linelength);
-	    }
-	  strcpy (linebuffer, history_value);
-	  p = linebuffer + strlen (linebuffer);
-	}
-      xfree (history_value);
-    }
-
-  /* If we just got an empty line, and that is supposed to repeat the
-     previous command, return the value in the global buffer.  */
-  if (repeat && p == linebuffer)
-    return saved_command_line;
-  for (p1 = linebuffer; *p1 == ' ' || *p1 == '\t'; p1++);
-  if (repeat && !*p1)
-    return saved_command_line;
-
-  *p = 0;
-
-  /* Add line to history if appropriate.  */
-  if (*linebuffer && input_from_terminal_p ())
-    gdb_add_history (linebuffer);
-
-  /* Save into global buffer if appropriate.  */
-  if (repeat)
-    {
-      if (linelength > saved_command_line_size)
-	{
-	  saved_command_line = xrealloc (saved_command_line, linelength);
-	  saved_command_line_size = linelength;
-	}
-      strcpy (saved_command_line, linebuffer);
-      return saved_command_line;
-    }
-
-  return linebuffer;
+  return cmd;
 }
 
 /* Print the GDB banner.  */
@@ -1233,7 +1331,7 @@ print_gdb_version (struct ui_file *strea
   /* Second line is a copyright notice.  */
 
   fprintf_filtered (stream,
-		    "Copyright (C) 2015 Free Software Foundation, Inc.\n");
+		    "Copyright (C) 2017 Free Software Foundation, Inc.\n");
 
   /* Following the copyright is a brief statement that the program is
      free software, that users are free to copy and change it on
@@ -1412,7 +1510,7 @@ struct qt_args
 static int
 kill_or_detach (struct inferior *inf, void *args)
 {
-  struct qt_args *qt = args;
+  struct qt_args *qt = (struct qt_args *) args;
   struct thread_info *thread;
 
   if (inf->pid == 0)
@@ -1443,7 +1541,7 @@ kill_or_detach (struct inferior *inf, vo
 static int
 print_inferior_quit_action (struct inferior *inf, void *arg)
 {
-  struct ui_file *stb = arg;
+  struct ui_file *stb = (struct ui_file *) arg;
 
   if (inf->pid == 0)
     return 0;
@@ -1466,51 +1564,59 @@ print_inferior_quit_action (struct infer
 int
 quit_confirm (void)
 {
-  struct ui_file *stb;
-  struct cleanup *old_chain;
-  char *str;
-  int qr;
-
   /* Don't even ask if we're only debugging a core file inferior.  */
   if (!have_live_inferiors ())
     return 1;
 
   /* Build the query string as a single string.  */
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  string_file stb;
 
-  fprintf_filtered (stb, _("A debugging session is active.\n\n"));
-  iterate_over_inferiors (print_inferior_quit_action, stb);
-  fprintf_filtered (stb, _("\nQuit anyway? "));
+  stb.puts (_("A debugging session is active.\n\n"));
+  iterate_over_inferiors (print_inferior_quit_action, &stb);
+  stb.puts (_("\nQuit anyway? "));
 
-  str = ui_file_xstrdup (stb, NULL);
-  make_cleanup (xfree, str);
+  return query ("%s", stb.c_str ());
+}
 
-  qr = query ("%s", str);
-  do_cleanups (old_chain);
-  return qr;
+/* Prepare to exit GDB cleanly by undoing any changes made to the
+   terminal so that we leave the terminal in the state we acquired it.  */
+
+static void
+undo_terminal_modifications_before_exit (void)
+{
+  struct ui *saved_top_level = current_ui;
+
+  target_terminal_ours ();
+
+  current_ui = main_ui;
+
+#if defined(TUI)
+  tui_disable ();
+#endif
+  gdb_disable_readline ();
+
+  current_ui = saved_top_level;
 }
 
+
 /* Quit without asking for confirmation.  */
 
 void
-quit_force (char *args, int from_tty)
+quit_force (int *exit_arg, int from_tty)
 {
   int exit_code = 0;
   struct qt_args qt;
 
+  undo_terminal_modifications_before_exit ();
+
   /* An optional expression may be used to cause gdb to terminate with the 
      value of that expression.  */
-  if (args)
-    {
-      struct value *val = parse_and_eval (args);
-
-      exit_code = (int) value_as_long (val);
-    }
+  if (exit_arg)
+    exit_code = *exit_arg;
   else if (return_child_result)
     exit_code = return_child_result_value;
 
-  qt.args = args;
+  qt.args = NULL;
   qt.from_tty = from_tty;
 
   /* We want to handle any quit errors and exit regardless.  */
@@ -1542,9 +1648,25 @@ quit_force (char *args, int from_tty)
   /* Save the history information if it is appropriate to do so.  */
   TRY
     {
-      if (write_history_p && history_filename
-	  && input_from_terminal_p ())
-	gdb_safe_append_history ();
+      if (write_history_p && history_filename)
+	{
+	  struct ui *ui;
+	  int save = 0;
+
+	  /* History is currently shared between all UIs.  If there's
+	     any UI with a terminal, save history.  */
+	  ALL_UIS (ui)
+	    {
+	      if (input_interactive_p (ui))
+		{
+		  save = 1;
+		  break;
+		}
+	    }
+
+	  if (save)
+	    gdb_safe_append_history ();
+	}
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
@@ -1566,25 +1688,36 @@ quit_force (char *args, int from_tty)
   exit (exit_code);
 }
 
-/* Returns whether GDB is running on a terminal and input is
-   currently coming from that terminal.  */
+/* The value of the "interactive-mode" setting.  */
+static enum auto_boolean interactive_mode = AUTO_BOOLEAN_AUTO;
+
+/* Implement the "show interactive-mode" option.  */
+
+static void
+show_interactive_mode (struct ui_file *file, int from_tty,
+                       struct cmd_list_element *c,
+                       const char *value)
+{
+  if (interactive_mode == AUTO_BOOLEAN_AUTO)
+    fprintf_filtered (file, "Debugger's interactive mode "
+		            "is %s (currently %s).\n",
+                      value, input_interactive_p (current_ui) ? "on" : "off");
+  else
+    fprintf_filtered (file, "Debugger's interactive mode is %s.\n", value);
+}
+
+/* Returns whether GDB is running on an interactive terminal.  */
 
 int
-input_from_terminal_p (void)
+input_interactive_p (struct ui *ui)
 {
   if (batch_flag)
     return 0;
 
-  if (gdb_has_a_terminal () && instream == stdin)
-    return 1;
-
-  /* If INSTREAM is unset, and we are not in a user command, we
-     must be in Insight.  That's like having a terminal, for our
-     purposes.  */
-  if (instream == NULL && !in_user_command)
-    return 1;
+  if (interactive_mode != AUTO_BOOLEAN_AUTO)
+    return interactive_mode == AUTO_BOOLEAN_TRUE;
 
-  return 0;
+  return ui->input_interactive_p;
 }
 
 static void
@@ -1797,13 +1930,24 @@ show_prompt (struct ui_file *file, int f
   fprintf_filtered (file, _("Gdb's prompt is \"%s\".\n"), value);
 }
 
+/* "set editing" command.  */
+
+static void
+set_editing (char *args, int from_tty, struct cmd_list_element *c)
+{
+  change_line_handler (set_editing_cmd_var);
+  /* Update the control variable so that MI's =cmd-param-changed event
+     shows the correct value. */
+  set_editing_cmd_var = current_ui->command_editing;
+}
+
 static void
-show_async_command_editing_p (struct ui_file *file, int from_tty,
-			      struct cmd_list_element *c, const char *value)
+show_editing (struct ui_file *file, int from_tty,
+	      struct cmd_list_element *c, const char *value)
 {
   fprintf_filtered (file, _("Editing of command lines as "
 			    "they are typed is %s.\n"),
-		    value);
+		    current_ui->command_editing ? _("on") : _("off"));
 }
 
 static void
@@ -1858,14 +2002,12 @@ set_history_filename (char *args, int fr
 static void
 init_main (void)
 {
+  struct cmd_list_element *c;
+
   /* Initialize the prompt to a simple "(gdb) " prompt or to whatever
      the DEFAULT_PROMPT is.  */
   set_prompt (DEFAULT_PROMPT);
 
-  /* Set things up for annotation_level > 1, if the user ever decides
-     to use it.  */
-  async_annotation_suffix = "prompt";
-
   /* Set the important stuff up for command editing.  */
   command_editing_p = 1;
   history_expansion_p = 0;
@@ -1898,14 +2040,14 @@ used inside of user-defined commands tha
 hitting return."));
 
   add_setshow_boolean_cmd ("editing", class_support,
-			   &async_command_editing_p, _("\
+			   &set_editing_cmd_var, _("\
 Set editing of command lines as they are typed."), _("\
 Show editing of command lines as they are typed."), _("\
 Use \"on\" to enable the editing, and \"off\" to disable it.\n\
 Without an argument, command line editing is enabled.  To edit, use\n\
 EMACS-like or VI-like commands like control-P or ESC."),
-			   set_async_editing_command,
-			   show_async_command_editing_p,
+			   set_editing,
+			   show_editing,
 			   &setlist, &showlist);
 
   add_setshow_boolean_cmd ("save", no_class, &write_history_p, _("\
@@ -1985,6 +2127,26 @@ When set, GDB uses the specified path to
                            set_gdb_datadir, show_gdb_datadir,
                            &setlist,
                            &showlist);
+
+  add_setshow_auto_boolean_cmd ("interactive-mode", class_support,
+                                &interactive_mode, _("\
+Set whether GDB's standard input is a terminal."), _("\
+Show whether GDB's standard input is a terminal."), _("\
+If on, GDB assumes that standard input is a terminal.  In practice, it\n\
+means that GDB should wait for the user to answer queries associated to\n\
+commands entered at the command prompt.  If off, GDB assumes that standard\n\
+input is not a terminal, and uses the default answer to all queries.\n\
+If auto (the default), determine which mode to use based on the standard\n\
+input settings."),
+                        NULL,
+                        show_interactive_mode,
+                        &setlist, &showlist);
+
+  c = add_cmd ("new-ui", class_support, new_ui_command, _("\
+Create a new UI.  It takes two arguments:\n\
+The first argument is the name of the interpreter to run.\n\
+The second argument is the terminal the UI runs on.\n"), &cmdlist);
+  set_cmd_completer (c, interpreter_completer);
 }
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/top.h ./gdb/top.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/top.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/top.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Top level stuff for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,10 +20,204 @@
 #ifndef TOP_H
 #define TOP_H
 
+#include "buffer.h"
+#include "event-loop.h"
+
+struct tl_interp_info;
+
+/* Prompt state.  */
+
+enum prompt_state
+{
+  /* The command line is blocked simulating synchronous execution.
+     This is used to implement the foreground execution commands
+     ('run', 'continue', etc.).  We won't display the prompt and
+     accept further commands until the execution is actually over.  */
+  PROMPT_BLOCKED,
+
+  /* The command finished; display the prompt before returning back to
+     the top level.  */
+  PROMPT_NEEDED,
+
+  /* We've displayed the prompt already, ready for input.  */
+  PROMPTED,
+};
+
+/* All about a user interface instance.  Each user interface has its
+   own I/O files/streams, readline state, its own top level
+   interpreter (for the main UI, this is the interpreter specified
+   with -i on the command line) and secondary interpreters (for
+   interpreter-exec ...), etc.  There's always one UI associated with
+   stdin/stdout/stderr, but the user can create secondary UIs, for
+   example, to create a separate MI channel on its own stdio
+   streams.  */
+
+struct ui
+{
+  /* Pointer to next in singly-linked list.  */
+  struct ui *next;
+
+  /* Convenient handle (UI number).  Unique across all UIs.  */
+  int num;
+
+  /* The UI's command line buffer.  This is to used to accumulate
+     input until we have a whole command line.  */
+  struct buffer line_buffer;
+
+  /* The callback used by the event loop whenever an event is detected
+     on the UI's input file descriptor.  This function incrementally
+     builds a buffer where it accumulates the line read up to the
+     point of invocation.  In the special case in which the character
+     read is newline, the function invokes the INPUT_HANDLER callback
+     (see below).  */
+  void (*call_readline) (gdb_client_data);
+
+  /* The function to invoke when a complete line of input is ready for
+     processing.  */
+  void (*input_handler) (char *);
+
+  /* True if this UI is using the readline library for command
+     editing; false if using GDB's own simple readline emulation, with
+     no editing support.  */
+  int command_editing;
+
+  /* Each UI has its own independent set of interpreters.  */
+  struct ui_interp_info *interp_info;
+
+  /* True if the UI is in async mode, false if in sync mode.  If in
+     sync mode, a synchronous execution command (e.g, "next") does not
+     return until the command is finished.  If in async mode, then
+     running a synchronous command returns right after resuming the
+     target.  Waiting for the command's completion is later done on
+     the top event loop.  For the main UI, this starts out disabled,
+     until all the explicit command line arguments (e.g., `gdb -ex
+     "start" -ex "next"') are processed.  */
+  int async;
+
+  /* The number of nested readline secondary prompts that are
+     currently active.  */
+  int secondary_prompt_depth;
+
+  /* The UI's stdin.  Set to stdin for the main UI.  */
+  FILE *stdin_stream;
+
+  /* stdio stream that command input is being read from.  Set to stdin
+     normally.  Set by source_command to the file we are sourcing.
+     Set to NULL if we are executing a user-defined command or
+     interacting via a GUI.  */
+  FILE *instream;
+  /* Standard output stream.  */
+  FILE *outstream;
+  /* Standard error stream.  */
+  FILE *errstream;
+
+  /* The file descriptor for the input stream, so that we can register
+     it with the event loop.  */
+  int input_fd;
+
+  /* Whether ISATTY returns true on input_fd.  Cached here because
+     quit_force needs to know this _after_ input_fd might be
+     closed.  */
+  int input_interactive_p;
+
+  /* See enum prompt_state's description.  */
+  enum prompt_state prompt_state;
+
+  /* The fields below that start with "m_" are "private".  They're
+     meant to be accessed through wrapper macros that make them look
+     like globals.  */
+
+  /* The ui_file streams.  */
+  /* Normal results */
+  struct ui_file *m_gdb_stdout;
+  /* Input stream */
+  struct ui_file *m_gdb_stdin;
+  /* Serious error notifications */
+  struct ui_file *m_gdb_stderr;
+  /* Log/debug/trace messages that should bypass normal stdout/stderr
+     filtering.  For moment, always call this stream using
+     *_unfiltered.  In the very near future that restriction shall be
+     removed - either call shall be unfiltered.  (cagney 1999-06-13).  */
+  struct ui_file *m_gdb_stdlog;
+
+  /* The current ui_out.  */
+  struct ui_out *m_current_uiout;
+};
+
+/* The main UI.  This is the UI that is bound to stdin/stdout/stderr.
+   It always exists and is created automatically when GDB starts
+   up.  */
+extern struct ui *main_ui;
+
+/* The current UI.  */
+extern struct ui *current_ui;
+
+/* The list of all UIs.  */
+extern struct ui *ui_list;
+
+/* State for SWITCH_THRU_ALL_UIS.  */
+class switch_thru_all_uis
+{
+public:
+
+  switch_thru_all_uis () : m_iter (ui_list), m_save_ui (&current_ui)
+  {
+    current_ui = ui_list;
+  }
+
+  /* If done iterating, return true; otherwise return false.  */
+  bool done () const
+  {
+    return m_iter == NULL;
+  }
+
+  /* Move to the next UI, setting current_ui if iteration is not yet
+     complete.  */
+  void next ()
+  {
+    m_iter = m_iter->next;
+    if (m_iter != NULL)
+      current_ui = m_iter;
+  }
+
+ private:
+
+  /* No need for these.  They are intentionally not defined
+     anywhere.  */
+  switch_thru_all_uis &operator= (const switch_thru_all_uis &);
+  switch_thru_all_uis (const switch_thru_all_uis &);
+
+  /* Used to iterate through the UIs.  */
+  struct ui *m_iter;
+
+  /* Save and restore current_ui.  */
+  scoped_restore_tmpl<struct ui *> m_save_ui;
+};
+
+  /* Traverse through all UI, and switch the current UI to the one
+     being iterated.  */
+#define SWITCH_THRU_ALL_UIS()		\
+  for (switch_thru_all_uis stau_state; !stau_state.done (); stau_state.next ())
+
+/* Traverse over all UIs.  */
+#define ALL_UIS(UI)				\
+  for (UI = ui_list; UI; UI = UI->next)		\
+
+/* Create a new UI.  */
+extern struct ui *new_ui (FILE *instream, FILE *outstream, FILE *errstream);
+extern void delete_ui (struct ui *todel);
+
+/* Cleanup that deletes a UI.  */
+extern struct cleanup *make_delete_ui_cleanup (struct ui *ui);
+
+/* Register the UI's input file descriptor in the event loop.  */
+extern void ui_register_input_event_handler (struct ui *ui);
+
+/* Unregister the UI's input file descriptor from the event loop.  */
+extern void ui_unregister_input_event_handler (struct ui *ui);
+
 /* From top.c.  */
 extern char *saved_command_line;
-extern int saved_command_line_size;
-extern FILE *instream;
 extern int in_user_command;
 extern int confirm;
 extern char gdb_dirbuf[1024];
@@ -37,7 +231,7 @@ extern void read_command_file (FILE *);
 extern void init_history (void);
 extern void command_loop (void);
 extern int quit_confirm (void);
-extern void quit_force (char *, int);
+extern void quit_force (int *, int);
 extern void quit_command (char *, int);
 extern void quit_cover (void);
 extern void execute_command (char *, int);
@@ -50,6 +244,9 @@ extern void execute_command (char *, int
 
 extern void maybe_wait_sync_command_done (int was_sync);
 
+/* Wait for a synchronous execution command to end.  */
+extern void wait_sync_command_done (void);
+
 extern void check_frame_language_change (void);
 
 /* Prepare for execution of a command.
@@ -65,6 +262,11 @@ extern char *get_prompt (void);
    by gdb for its command prompt.  */
 extern void set_prompt (const char *s);
 
+/* Return 1 if UI's current input handler is a secondary prompt, 0
+   otherwise.  */
+
+extern int gdb_in_secondary_prompt_p (struct ui *ui);
+
 /* From random places.  */
 extern int readnow_symbol_files;
 
@@ -91,4 +293,8 @@ extern void set_verbose (char *, int, st
 
 extern void do_restore_instream_cleanup (void *stream);
 
+extern char *handle_line_of_input (struct buffer *cmd_line_buffer,
+				   char *rl, int repeat,
+				   char *annotation_suffix);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile.c ./gdb/tracefile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tracefile.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Trace file support in GDB.
 
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -41,7 +41,7 @@
 static void
 trace_file_writer_xfree (void *arg)
 {
-  struct trace_file_writer *writer = arg;
+  struct trace_file_writer *writer = (struct trace_file_writer *) arg;
 
   writer->ops->dtor (writer);
   xfree (writer);
@@ -57,14 +57,12 @@ trace_save (const char *filename, struct
 	    int target_does_save)
 {
   struct trace_status *ts = current_trace_status ();
-  int status;
   struct uploaded_tp *uploaded_tps = NULL, *utp;
   struct uploaded_tsv *uploaded_tsvs = NULL, *utsv;
 
   ULONGEST offset = 0;
 #define MAX_TRACE_UPLOAD 2000
   gdb_byte buf[MAX_TRACE_UPLOAD];
-  int written;
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
 
   /* If the target is to save the data to a file on its own, then just
@@ -78,8 +76,10 @@ trace_save (const char *filename, struct
     }
 
   /* Get the trace status first before opening the file, so if the
-     target is losing, we can get out without touching files.  */
-  status = target_get_trace_status (ts);
+     target is losing, we can get out without touching files.  Since
+     we're just calling this for side effects, we ignore the
+     result.  */
+  target_get_trace_status (ts);
 
   writer->ops->start (writer, filename);
 
@@ -90,6 +90,9 @@ trace_save (const char *filename, struct
   /* Write out the size of a register block.  */
   writer->ops->write_regblock_type (writer, trace_regblock_size);
 
+  /* Write out the target description info.  */
+  writer->ops->write_tdesc (writer);
+
   /* Write out status of the tracing run (aka "tstatus" info).  */
   writer->ops->write_status (writer, ts);
 
@@ -303,7 +306,7 @@ trace_save (const char *filename, struct
 }
 
 static void
-trace_save_command (char *args, int from_tty)
+tsave_command (char *args, int from_tty)
 {
   int target_does_save = 0;
   char **argv;
@@ -385,7 +388,8 @@ void
 tracefile_fetch_registers (struct regcache *regcache, int regno)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int regn, pc_regno;
+  struct tracepoint *tp = get_tracepoint (get_tracepoint_number ());
+  int regn;
 
   /* We get here if no register data has been found.  Mark registers
      as unavailable.  */
@@ -394,48 +398,29 @@ tracefile_fetch_registers (struct regcac
 
   /* We can often usefully guess that the PC is going to be the same
      as the address of the tracepoint.  */
-  pc_regno = gdbarch_pc_regnum (gdbarch);
-
-  /* XXX This guessing code below only works if the PC register isn't
-     a pseudo-register.  The value of a pseudo-register isn't stored
-     in the (non-readonly) regcache -- instead it's recomputed
-     (probably from some other cached raw register) whenever the
-     register is read.  This guesswork should probably move to some
-     higher layer.  */
-  if (pc_regno < 0 || pc_regno >= gdbarch_num_regs (gdbarch))
+  if (tp == NULL || tp->base.loc == NULL)
     return;
 
-  if (regno == -1 || regno == pc_regno)
+  /* But don't try to guess if tracepoint is multi-location...  */
+  if (tp->base.loc->next)
     {
-      struct tracepoint *tp = get_tracepoint (get_tracepoint_number ());
-      gdb_byte *regs;
-
-      if (tp && tp->base.loc)
-	{
-	  /* But don't try to guess if tracepoint is multi-location...  */
-	  if (tp->base.loc->next)
-	    {
-	      warning (_("Tracepoint %d has multiple "
-			 "locations, cannot infer $pc"),
-		       tp->base.number);
-	      return;
-	    }
-	  /* ... or does while-stepping.  */
-	  if (tp->step_count > 0)
-	    {
-	      warning (_("Tracepoint %d does while-stepping, "
-			 "cannot infer $pc"),
-		       tp->base.number);
-	      return;
-	    }
-
-	  regs = alloca (register_size (gdbarch, pc_regno));
-	  store_unsigned_integer (regs, register_size (gdbarch, pc_regno),
-				  gdbarch_byte_order (gdbarch),
-				  tp->base.loc->address);
-	  regcache_raw_supply (regcache, pc_regno, regs);
-	}
+      warning (_("Tracepoint %d has multiple "
+		 "locations, cannot infer $pc"),
+	       tp->base.number);
+      return;
     }
+  /* ... or does while-stepping.  */
+  else if (tp->step_count > 0)
+    {
+      warning (_("Tracepoint %d does while-stepping, "
+		 "cannot infer $pc"),
+	       tp->base.number);
+      return;
+    }
+
+  /* Guess what we can from the tracepoint location.  */
+  gdbarch_guess_tracepoint_registers (gdbarch, regcache,
+				      tp->base.loc->address);
 }
 
 /* This is the implementation of target_ops method to_has_all_memory.  */
@@ -515,7 +500,7 @@ extern initialize_file_ftype _initialize
 void
 _initialize_tracefile (void)
 {
-  add_com ("tsave", class_trace, trace_save_command, _("\
+  add_com ("tsave", class_trace, tsave_command, _("\
 Save the trace data to a file.\n\
 Use the '-ctf' option to save the data to CTF format.\n\
 Use the '-r' option to direct the target to save directly to the file,\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile.h ./gdb/tracefile.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tracefile.h	2017-03-06 01:49:08.000000000 +0000
@@ -84,6 +84,9 @@ struct trace_file_write_ops
   void (*write_uploaded_tp) (struct trace_file_writer *self,
 			     struct uploaded_tp *tp);
 
+  /* Write target description.  */
+  void (*write_tdesc) (struct trace_file_writer *self);
+
   /* Write to mark the end of the definition part.  */
   void (*write_definition_end) (struct trace_file_writer *self);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile-tfile.c ./gdb/tracefile-tfile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracefile-tfile.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tracefile-tfile.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Trace file TFILE format support in GDB.
 
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,11 @@
 #include "exec.h" /* exec_bfd */
 #include "completer.h"
 #include "filenames.h"
+#include "remote.h"
+#include "xml-tdesc.h"
+#include "target-descriptions.h"
+#include "buffer.h"
+#include <algorithm>
 
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
@@ -133,7 +138,7 @@ tfile_write_status (struct trace_file_wr
   fprintf (writer->fp, "status %c;%s",
 	   (ts->running ? '1' : '0'), stop_reason_names[ts->stop_reason]);
   if (ts->stop_reason == tracepoint_error
-      || ts->stop_reason == tstop_command)
+      || ts->stop_reason == trace_stop_command)
     {
       char *buf = (char *) alloca (strlen (ts->stop_desc) * 2 + 1);
 
@@ -263,6 +268,42 @@ tfile_write_uploaded_tp (struct trace_fi
 }
 
 /* This is the implementation of trace_file_write_ops method
+   write_tdesc.  */
+
+static void
+tfile_write_tdesc (struct trace_file_writer *self)
+{
+  struct tfile_trace_file_writer *writer
+    = (struct tfile_trace_file_writer *) self;
+  char *tdesc = target_fetch_description_xml (&current_target);
+  char *ptr = tdesc;
+  char *next;
+
+  if (tdesc == NULL)
+    return;
+
+  /* Write tdesc line by line, prefixing each line with "tdesc ".  */
+  while (ptr != NULL)
+    {
+      next = strchr (ptr, '\n');
+      if (next != NULL)
+	{
+	  fprintf (writer->fp, "tdesc %.*s\n", (int) (next - ptr), ptr);
+	  /* Skip the \n.  */
+	  next++;
+	}
+      else if (*ptr != '\0')
+	{
+	  /* Last line, doesn't have a newline.  */
+	  fprintf (writer->fp, "tdesc %s\n", ptr);
+	}
+      ptr = next;
+    }
+
+  xfree (tdesc);
+}
+
+/* This is the implementation of trace_file_write_ops method
    write_definition_end.  */
 
 static void
@@ -315,6 +356,7 @@ static const struct trace_file_write_ops
   tfile_write_status,
   tfile_write_uploaded_tsv,
   tfile_write_uploaded_tp,
+  tfile_write_tdesc,
   tfile_write_definition_end,
   tfile_write_raw_data,
   NULL,
@@ -327,7 +369,7 @@ struct trace_file_writer *
 tfile_trace_file_writer_new (void)
 {
   struct tfile_trace_file_writer *writer
-    = xmalloc (sizeof (struct tfile_trace_file_writer));
+    = XNEW (struct tfile_trace_file_writer);
 
   writer->base.ops = &tfile_write_ops;
   writer->fp = NULL;
@@ -352,7 +394,9 @@ static off_t trace_frames_offset;
 static off_t cur_offset;
 static int cur_data_size;
 int trace_regblock_size;
+static struct buffer trace_tdesc;
 
+static void tfile_append_tdesc_line (const char *line);
 static void tfile_interp_line (char *line,
 			       struct uploaded_tp **utpp,
 			       struct uploaded_tsv **utsvp);
@@ -419,6 +463,9 @@ tfile_open (const char *arg, int from_tt
   trace_filename = xstrdup (filename);
   trace_fd = scratch_chan;
 
+  /* Make sure this is clear.  */
+  buffer_free (&trace_tdesc);
+
   bytes = 0;
   /* Read the file header and test for validity.  */
   tfile_read ((gdb_byte *) &header, TRACE_HEADER_SIZE);
@@ -467,6 +514,9 @@ tfile_open (const char *arg, int from_tt
 	    error (_("Excessively long lines in trace file"));
 	}
 
+      /* By now, tdesc lines have been read from tfile - let's parse them.  */
+      target_find_description ();
+
       /* Record the starting offset of the binary trace data.  */
       trace_frames_offset = bytes;
 
@@ -530,6 +580,11 @@ tfile_interp_line (char *line, struct up
       p += strlen ("tsv ");
       parse_tsv_definition (p, utsvp);
     }
+  else if (startswith (p, "tdesc "))
+    {
+      p += strlen ("tdesc ");
+      tfile_append_tdesc_line (p);
+    }
   else
     warning (_("Ignoring trace file definition \"%s\""), line);
 }
@@ -552,6 +607,7 @@ tfile_close (struct target_ops *self)
   trace_fd = -1;
   xfree (trace_filename);
   trace_filename = NULL;
+  buffer_free (&trace_tdesc);
 
   trace_reset_local_state ();
 }
@@ -713,7 +769,7 @@ typedef int (*walk_blocks_callback_func)
 static int
 match_blocktype (char blocktype, void *data)
 {
-  char *wantedp = data;
+  char *wantedp = (char *) data;
 
   if (*wantedp == blocktype)
     return 1;
@@ -796,7 +852,7 @@ tfile_fetch_registers (struct target_ops
 		       struct regcache *regcache, int regno)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int offset, regn, regsize;
+  int offset, regn, regsize, dummy;
 
   /* An uninitialized reg size says we're not going to be
      successful at getting register blocks.  */
@@ -805,18 +861,19 @@ tfile_fetch_registers (struct target_ops
 
   if (traceframe_find_block_type ('R', 0) >= 0)
     {
-      gdb_byte *regs = alloca (trace_regblock_size);
+      gdb_byte *regs = (gdb_byte *) alloca (trace_regblock_size);
 
       tfile_read (regs, trace_regblock_size);
 
-      /* Assume the block is laid out in GDB register number order,
-	 each register with the size that it has in GDB.  */
-      offset = 0;
       for (regn = 0; regn < gdbarch_num_regs (gdbarch); regn++)
 	{
+	  if (!remote_register_number_and_offset (get_regcache_arch (regcache),
+						  regn, &dummy, &offset))
+	    continue;
+
 	  regsize = register_size (gdbarch, regn);
 	  /* Make sure we stay within block bounds.  */
-	  if (offset + regsize >= trace_regblock_size)
+	  if (offset + regsize > trace_regblock_size)
 	    break;
 	  if (regcache_register_status (regcache, regn) == REG_UNKNOWN)
 	    {
@@ -830,7 +887,6 @@ tfile_fetch_registers (struct target_ops
 		  regcache_raw_supply (regcache, regn, regs + offset);
 		}
 	    }
-	  offset += regsize;
 	}
     }
   else
@@ -838,12 +894,42 @@ tfile_fetch_registers (struct target_ops
 }
 
 static enum target_xfer_status
+tfile_xfer_partial_features (struct target_ops *ops, const char *annex,
+			     gdb_byte *readbuf, const gdb_byte *writebuf,
+			     ULONGEST offset, ULONGEST len,
+			     ULONGEST *xfered_len)
+{
+  if (strcmp (annex, "target.xml"))
+    return TARGET_XFER_E_IO;
+
+  if (readbuf == NULL)
+    error (_("tfile_xfer_partial: tdesc is read-only"));
+
+  if (trace_tdesc.used_size == 0)
+    return TARGET_XFER_E_IO;
+
+  if (offset >= trace_tdesc.used_size)
+    return TARGET_XFER_EOF;
+
+  if (len > trace_tdesc.used_size - offset)
+    len = trace_tdesc.used_size - offset;
+
+  memcpy (readbuf, trace_tdesc.buffer + offset, len);
+  *xfered_len = len;
+
+  return TARGET_XFER_OK;
+}
+
+static enum target_xfer_status
 tfile_xfer_partial (struct target_ops *ops, enum target_object object,
 		    const char *annex, gdb_byte *readbuf,
 		    const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
 		    ULONGEST *xfered_len)
 {
-  /* We're only doing regular memory for now.  */
+  /* We're only doing regular memory and tdesc for now.  */
+  if (object == TARGET_OBJECT_AVAILABLE_FEATURES)
+    return tfile_xfer_partial_features (ops, annex, readbuf, writebuf,
+					offset, len, xfered_len);
   if (object != TARGET_OBJECT_MEMORY)
     return TARGET_XFER_E_IO;
 
@@ -902,7 +988,7 @@ tfile_xfer_partial (struct target_ops *o
 	 and this address falls within a read-only section, fallback
 	 to reading from executable, up to LOW_ADDR_AVAILABLE.  */
       if (offset < low_addr_available)
-	len = min (len, low_addr_available - offset);
+	len = std::min (len, low_addr_available - offset);
       res = exec_read_partial_read_only (readbuf, offset, len, xfered_len);
 
       if (res == TARGET_XFER_OK)
@@ -966,7 +1052,7 @@ tfile_get_trace_state_variable_value (st
 static int
 build_traceframe_info (char blocktype, void *data)
 {
-  struct traceframe_info *info = data;
+  struct traceframe_info *info = (struct traceframe_info *) data;
 
   switch (blocktype)
     {
@@ -1023,6 +1109,16 @@ tfile_traceframe_info (struct target_ops
   return info;
 }
 
+/* Handles tdesc lines from tfile by appending the payload to
+   a global trace_tdesc variable.  */
+
+static void
+tfile_append_tdesc_line (const char *line)
+{
+  buffer_grow_str (&trace_tdesc, line);
+  buffer_grow_str (&trace_tdesc, "\n");
+}
+
 static void
 init_tfile_ops (void)
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracepoint.c ./gdb/tracepoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracepoint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tracepoint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Tracing functionality for remote targets in custom GDB protocol
 
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -55,6 +55,8 @@
 #include "filestuff.h"
 #include "rsp-low.h"
 #include "tracefile.h"
+#include "location.h"
+#include <algorithm>
 
 /* readline include files */
 #include "readline/readline.h"
@@ -164,25 +166,22 @@ char *trace_notes = NULL;
 char *trace_stop_notes = NULL;
 
 /* ======= Important command functions: ======= */
-static void trace_actions_command (char *, int);
-static void trace_start_command (char *, int);
-static void trace_stop_command (char *, int);
-static void trace_status_command (char *, int);
-static void trace_find_command (char *, int);
-static void trace_find_pc_command (char *, int);
-static void trace_find_tracepoint_command (char *, int);
-static void trace_find_line_command (char *, int);
-static void trace_find_range_command (char *, int);
-static void trace_find_outside_command (char *, int);
-static void trace_dump_command (char *, int);
+static void actions_command (char *, int);
+static void tstart_command (char *, int);
+static void tstop_command (char *, int);
+static void tstatus_command (char *, int);
+static void tfind_command (char *, int);
+static void tfind_pc_command (char *, int);
+static void tfind_tracepoint_command (char *, int);
+static void tfind_line_command (char *, int);
+static void tfind_range_command (char *, int);
+static void tfind_outside_command (char *, int);
+static void tdump_command (char *, int);
 
 /* support routines */
 
 struct collection_list;
-static void add_aexpr (struct collection_list *, struct agent_expr *);
 static char *mem2hex (gdb_byte *, char *, int);
-static void add_register (struct collection_list *collection,
-			  unsigned int regno);
 
 static struct command_line *
   all_tracepoint_actions_and_cleanup (struct breakpoint *t);
@@ -487,7 +486,7 @@ tvariables_info_1 (void)
   struct cleanup *back_to;
   struct ui_out *uiout = current_uiout;
 
-  if (VEC_length (tsv_s, tvariables) == 0 && !ui_out_is_mi_like_p (uiout))
+  if (VEC_length (tsv_s, tvariables) == 0 && !uiout->is_mi_like_p ())
     {
       printf_filtered (_("No trace state variables.\n"));
       return;
@@ -500,11 +499,11 @@ tvariables_info_1 (void)
 
   back_to = make_cleanup_ui_out_table_begin_end (uiout, 3,
                                                  count, "trace-variables");
-  ui_out_table_header (uiout, 15, ui_left, "name", "Name");
-  ui_out_table_header (uiout, 11, ui_left, "initial", "Initial");
-  ui_out_table_header (uiout, 11, ui_left, "current", "Current");
+  uiout->table_header (15, ui_left, "name", "Name");
+  uiout->table_header (11, ui_left, "initial", "Initial");
+  uiout->table_header (11, ui_left, "current", "Current");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
 
   for (ix = 0; VEC_iterate (tsv_s, tvariables, ix, tsv); ++ix)
     {
@@ -516,12 +515,12 @@ tvariables_info_1 (void)
 
       name = concat ("$", tsv->name, (char *) NULL);
       make_cleanup (xfree, name);
-      ui_out_field_string (uiout, "name", name);
-      ui_out_field_string (uiout, "initial", plongest (tsv->initial_value));
+      uiout->field_string ("name", name);
+      uiout->field_string ("initial", plongest (tsv->initial_value));
 
       if (tsv->value_known)
         c = plongest (tsv->value);
-      else if (ui_out_is_mi_like_p (uiout))
+      else if (uiout->is_mi_like_p ())
         /* For MI, we prefer not to use magic string constants, but rather
            omit the field completely.  The difference between unknown and
            undefined does not seem important enough to represent.  */
@@ -533,8 +532,8 @@ tvariables_info_1 (void)
 	/* It is not meaningful to ask about the value.  */
         c = "<undefined>";
       if (c)
-        ui_out_field_string (uiout, "current", c);
-      ui_out_text (uiout, "\n");
+        uiout->field_string ("current", c);
+      uiout->text ("\n");
 
       do_cleanups (back_to2);
     }
@@ -646,7 +645,7 @@ decode_agent_options (const char *exp, i
 
 /* Enter a list of actions for a tracepoint.  */
 static void
-trace_actions_command (char *args, int from_tty)
+actions_command (char *args, int from_tty)
 {
   struct tracepoint *t;
   struct command_line *l;
@@ -699,12 +698,10 @@ void
 validate_actionline (const char *line, struct breakpoint *b)
 {
   struct cmd_list_element *c;
-  struct expression *exp = NULL;
   struct cleanup *old_chain = NULL;
   const char *tmp_p;
   const char *p;
   struct bp_location *loc;
-  struct agent_expr *aexpr;
   struct tracepoint *t = (struct tracepoint *) b;
 
   /* If EOF is typed, *line is NULL.  */
@@ -753,9 +750,8 @@ validate_actionline (const char *line, s
 	  for (loc = t->base.loc; loc; loc = loc->next)
 	    {
 	      p = tmp_p;
-	      exp = parse_exp_1 (&p, loc->address,
-				 block_for_pc (loc->address), 1);
-	      old_chain = make_cleanup (free_current_contents, &exp);
+	      expression_up exp = parse_exp_1 (&p, loc->address,
+					       block_for_pc (loc->address), 1);
 
 	      if (exp->elts[0].opcode == OP_VAR_VALUE)
 		{
@@ -778,17 +774,16 @@ validate_actionline (const char *line, s
 	      /* We have something to collect, make sure that the expr to
 		 bytecode translator can handle it and that it's not too
 		 long.  */
-	      aexpr = gen_trace_for_expr (loc->address, exp, trace_string);
-	      make_cleanup_free_agent_expr (aexpr);
+	      agent_expr_up aexpr = gen_trace_for_expr (loc->address,
+							exp.get (),
+							trace_string);
 
 	      if (aexpr->len > MAX_AGENT_EXPR_LEN)
 		error (_("Expression is too complicated."));
 
-	      ax_reqs (aexpr);
-
-	      report_agent_reqs_errors (aexpr);
+	      ax_reqs (aexpr.get ());
 
-	      do_cleanups (old_chain);
+	      report_agent_reqs_errors (aexpr.get ());
 	    }
 	}
       while (p && *p++ == ',');
@@ -807,23 +802,19 @@ validate_actionline (const char *line, s
 	      p = tmp_p;
 
 	      /* Only expressions are allowed for this action.  */
-	      exp = parse_exp_1 (&p, loc->address,
-				 block_for_pc (loc->address), 1);
-	      old_chain = make_cleanup (free_current_contents, &exp);
+	      expression_up exp = parse_exp_1 (&p, loc->address,
+					       block_for_pc (loc->address), 1);
 
 	      /* We have something to evaluate, make sure that the expr to
 		 bytecode translator can handle it and that it's not too
 		 long.  */
-	      aexpr = gen_eval_for_expr (loc->address, exp);
-	      make_cleanup_free_agent_expr (aexpr);
+	      agent_expr_up aexpr = gen_eval_for_expr (loc->address, exp.get ());
 
 	      if (aexpr->len > MAX_AGENT_EXPR_LEN)
 		error (_("Expression is too complicated."));
 
-	      ax_reqs (aexpr);
-	      report_agent_reqs_errors (aexpr);
-
-	      do_cleanups (old_chain);
+	      ax_reqs (aexpr.get ());
+	      report_agent_reqs_errors (aexpr.get ());
 	    }
 	}
       while (p && *p++ == ',');
@@ -853,116 +844,92 @@ enum {
 
 /* MEMRANGE functions: */
 
-static int memrange_cmp (const void *, const void *);
+/* Compare memranges for std::sort.  */
 
-/* Compare memranges for qsort.  */
-static int
-memrange_cmp (const void *va, const void *vb)
+static bool
+memrange_comp (const memrange &a, const memrange &b)
 {
-  const struct memrange *a = va, *b = vb;
-
-  if (a->type < b->type)
-    return -1;
-  if (a->type > b->type)
-    return 1;
-  if (a->type == memrange_absolute)
-    {
-      if ((bfd_vma) a->start < (bfd_vma) b->start)
-	return -1;
-      if ((bfd_vma) a->start > (bfd_vma) b->start)
-	return 1;
-    }
-  else
+  if (a.type == b.type)
     {
-      if (a->start < b->start)
-	return -1;
-      if (a->start > b->start)
-	return 1;
+      if (a.type == memrange_absolute)
+	return (bfd_vma) a.start < (bfd_vma) b.start;
+      else
+	return a.start < b.start;
     }
-  return 0;
+
+  return a.type < b.type;
 }
 
-/* Sort the memrange list using qsort, and merge adjacent memranges.  */
+/* Sort the memrange list using std::sort, and merge adjacent memranges.  */
+
 static void
-memrange_sortmerge (struct collection_list *memranges)
+memrange_sortmerge (std::vector<memrange> &memranges)
 {
-  int a, b;
-
-  qsort (memranges->list, memranges->next_memrange,
-	 sizeof (struct memrange), memrange_cmp);
-  if (memranges->next_memrange > 0)
+  if (!memranges.empty ())
     {
-      for (a = 0, b = 1; b < memranges->next_memrange; b++)
+      int a, b;
+
+      std::sort (memranges.begin (), memranges.end (), memrange_comp);
+
+      for (a = 0, b = 1; b < memranges.size (); b++)
 	{
 	  /* If memrange b overlaps or is adjacent to memrange a,
 	     merge them.  */
-	  if (memranges->list[a].type == memranges->list[b].type
-	      && memranges->list[b].start <= memranges->list[a].end)
+	  if (memranges[a].type == memranges[b].type
+	      && memranges[b].start <= memranges[a].end)
 	    {
-	      if (memranges->list[b].end > memranges->list[a].end)
-		memranges->list[a].end = memranges->list[b].end;
+	      if (memranges[b].end > memranges[a].end)
+		memranges[a].end = memranges[b].end;
 	      continue;		/* next b, same a */
 	    }
 	  a++;			/* next a */
 	  if (a != b)
-	    memcpy (&memranges->list[a], &memranges->list[b],
-		    sizeof (struct memrange));
+	    memranges[a] = memranges[b];
 	}
-      memranges->next_memrange = a + 1;
+      memranges.resize (a + 1);
     }
 }
 
 /* Add a register to a collection list.  */
-static void
-add_register (struct collection_list *collection, unsigned int regno)
+
+void
+collection_list::add_register (unsigned int regno)
 {
   if (info_verbose)
     printf_filtered ("collect register %d\n", regno);
-  if (regno >= (8 * sizeof (collection->regs_mask)))
+  if (regno >= (8 * sizeof (m_regs_mask)))
     error (_("Internal: register number %d too large for tracepoint"),
 	   regno);
-  collection->regs_mask[regno / 8] |= 1 << (regno % 8);
+  m_regs_mask[regno / 8] |= 1 << (regno % 8);
 }
 
 /* Add a memrange to a collection list.  */
-static void
-add_memrange (struct collection_list *memranges, 
-	      int type, bfd_signed_vma base,
-	      unsigned long len)
+
+void
+collection_list::add_memrange (struct gdbarch *gdbarch,
+			       int type, bfd_signed_vma base,
+			       unsigned long len)
 {
   if (info_verbose)
-    {
-      printf_filtered ("(%d,", type);
-      printf_vma (base);
-      printf_filtered (",%ld)\n", len);
-    }
+    printf_filtered ("(%d,%s,%ld)\n", type, paddress (gdbarch, base), len);
 
   /* type: memrange_absolute == memory, other n == basereg */
-  memranges->list[memranges->next_memrange].type = type;
   /* base: addr if memory, offset if reg relative.  */
-  memranges->list[memranges->next_memrange].start = base;
   /* len: we actually save end (base + len) for convenience */
-  memranges->list[memranges->next_memrange].end = base + len;
-  memranges->next_memrange++;
-  if (memranges->next_memrange >= memranges->listsize)
-    {
-      memranges->listsize *= 2;
-      memranges->list = xrealloc (memranges->list,
-				  memranges->listsize);
-    }
+  m_memranges.emplace_back (type, base, base + len);
 
   if (type != memrange_absolute)    /* Better collect the base register!  */
-    add_register (memranges, type);
+    add_register (type);
 }
 
 /* Add a symbol to a collection list.  */
-static void
-collect_symbol (struct collection_list *collect, 
-		struct symbol *sym,
-		struct gdbarch *gdbarch,
-		long frame_regno, long frame_offset,
-		CORE_ADDR scope,
-		int trace_string)
+
+void
+collection_list::collect_symbol (struct symbol *sym,
+				 struct gdbarch *gdbarch,
+				 long frame_regno, long frame_offset,
+				 CORE_ADDR scope,
+				 int trace_string)
 {
   unsigned long len;
   unsigned int reg;
@@ -985,31 +952,28 @@ collect_symbol (struct collection_list *
       offset = SYMBOL_VALUE_ADDRESS (sym);
       if (info_verbose)
 	{
-	  char tmp[40];
-
-	  sprintf_vma (tmp, offset);
 	  printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n",
 			   SYMBOL_PRINT_NAME (sym), len,
-			   tmp /* address */);
+			   paddress (gdbarch, offset));
 	}
       /* A struct may be a C++ class with static fields, go to general
 	 expression handling.  */
       if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT)
 	treat_as_expr = 1;
       else
-	add_memrange (collect, memrange_absolute, offset, len);
+	add_memrange (gdbarch, memrange_absolute, offset, len);
       break;
     case LOC_REGISTER:
       reg = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
       if (info_verbose)
 	printf_filtered ("LOC_REG[parm] %s: ", 
 			 SYMBOL_PRINT_NAME (sym));
-      add_register (collect, reg);
+      add_register (reg);
       /* Check for doubles stored in two registers.  */
       /* FIXME: how about larger types stored in 3 or more regs?  */
       if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FLT &&
 	  len > register_size (gdbarch, reg))
-	add_register (collect, reg + 1);
+	add_register (reg + 1);
       break;
     case LOC_REF_ARG:
       printf_filtered ("Sorry, don't know how to do LOC_REF_ARG yet.\n");
@@ -1021,36 +985,36 @@ collect_symbol (struct collection_list *
       offset = frame_offset + SYMBOL_VALUE (sym);
       if (info_verbose)
 	{
-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
-			   SYMBOL_PRINT_NAME (sym), len);
-	  printf_vma (offset);
-	  printf_filtered (" from frame ptr reg %d\n", reg);
+	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s"
+			   " from frame ptr reg %d\n",
+			   SYMBOL_PRINT_NAME (sym), len,
+			   paddress (gdbarch, offset), reg);
 	}
-      add_memrange (collect, reg, offset, len);
+      add_memrange (gdbarch, reg, offset, len);
       break;
     case LOC_REGPARM_ADDR:
       reg = SYMBOL_VALUE (sym);
       offset = 0;
       if (info_verbose)
 	{
-	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset ",
-			   SYMBOL_PRINT_NAME (sym), len);
-	  printf_vma (offset);
-	  printf_filtered (" from reg %d\n", reg);
+	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s"
+			   " from reg %d\n",
+			   SYMBOL_PRINT_NAME (sym), len,
+			   paddress (gdbarch, offset), reg);
 	}
-      add_memrange (collect, reg, offset, len);
+      add_memrange (gdbarch, reg, offset, len);
       break;
     case LOC_LOCAL:
       reg = frame_regno;
       offset = frame_offset + SYMBOL_VALUE (sym);
       if (info_verbose)
 	{
-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
-			   SYMBOL_PRINT_NAME (sym), len);
-	  printf_vma (offset);
-	  printf_filtered (" from frame ptr reg %d\n", reg);
+	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s"
+			   " from frame ptr reg %d\n",
+			   SYMBOL_PRINT_NAME (sym), len,
+			   paddress (gdbarch, offset), reg);
 	}
-      add_memrange (collect, reg, offset, len);
+      add_memrange (gdbarch, reg, offset, len);
       break;
 
     case LOC_UNRESOLVED:
@@ -1070,10 +1034,10 @@ collect_symbol (struct collection_list *
   /* Expressions are the most general case.  */
   if (treat_as_expr)
     {
-      struct agent_expr *aexpr;
       struct cleanup *old_chain1 = NULL;
 
-      aexpr = gen_trace_for_var (scope, gdbarch, sym, trace_string);
+      agent_expr_up aexpr = gen_trace_for_var (scope, gdbarch,
+					       sym, trace_string);
 
       /* It can happen that the symbol is recorded as a computed
 	 location, but it's been optimized away and doesn't actually
@@ -1085,33 +1049,28 @@ collect_symbol (struct collection_list *
 	  return;
 	}
 
-      old_chain1 = make_cleanup_free_agent_expr (aexpr);
-
-      ax_reqs (aexpr);
-
-      report_agent_reqs_errors (aexpr);
+      ax_reqs (aexpr.get ());
 
-      discard_cleanups (old_chain1);
-      add_aexpr (collect, aexpr);
+      report_agent_reqs_errors (aexpr.get ());
 
       /* Take care of the registers.  */
       if (aexpr->reg_mask_len > 0)
 	{
-	  int ndx1, ndx2;
-
-	  for (ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
+	  for (int ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
 	    {
 	      QUIT;	/* Allow user to bail out with ^C.  */
 	      if (aexpr->reg_mask[ndx1] != 0)
 		{
 		  /* Assume chars have 8 bits.  */
-		  for (ndx2 = 0; ndx2 < 8; ndx2++)
+		  for (int ndx2 = 0; ndx2 < 8; ndx2++)
 		    if (aexpr->reg_mask[ndx1] & (1 << ndx2))
 		      /* It's used -- record it.  */
-		      add_register (collect, ndx1 * 8 + ndx2);
+		      add_register (ndx1 * 8 + ndx2);
 		}
 	    }
 	}
+
+      add_aexpr (std::move (aexpr));
     }
 }
 
@@ -1136,27 +1095,32 @@ do_collect_symbol (const char *print_nam
 		   struct symbol *sym,
 		   void *cb_data)
 {
-  struct add_local_symbols_data *p = cb_data;
+  struct add_local_symbols_data *p = (struct add_local_symbols_data *) cb_data;
 
-  collect_symbol (p->collect, sym, p->gdbarch, p->frame_regno,
-		  p->frame_offset, p->pc, p->trace_string);
+  p->collect->collect_symbol (sym, p->gdbarch, p->frame_regno,
+			      p->frame_offset, p->pc, p->trace_string);
   p->count++;
 
-  VEC_safe_push (char_ptr, p->collect->wholly_collected,
-		 xstrdup (print_name));
+  p->collect->add_wholly_collected (print_name);
+}
+
+void
+collection_list::add_wholly_collected (const char *print_name)
+{
+  m_wholly_collected.push_back (print_name);
 }
 
 /* Add all locals (or args) symbols to collection list.  */
-static void
-add_local_symbols (struct collection_list *collect,
-		   struct gdbarch *gdbarch, CORE_ADDR pc,
-		   long frame_regno, long frame_offset, int type,
-		   int trace_string)
+
+void
+collection_list::add_local_symbols (struct gdbarch *gdbarch, CORE_ADDR pc,
+				    long frame_regno, long frame_offset, int type,
+				    int trace_string)
 {
   const struct block *block;
   struct add_local_symbols_data cb_data;
 
-  cb_data.collect = collect;
+  cb_data.collect = this;
   cb_data.gdbarch = gdbarch;
   cb_data.pc = pc;
   cb_data.frame_regno = frame_regno;
@@ -1194,79 +1158,38 @@ add_local_symbols (struct collection_lis
     }
 }
 
-static void
-add_static_trace_data (struct collection_list *collection)
+void
+collection_list::add_static_trace_data ()
 {
   if (info_verbose)
     printf_filtered ("collect static trace data\n");
-  collection->strace_data = 1;
-}
-
-/* worker function */
-static void
-clear_collection_list (struct collection_list *list)
-{
-  int ndx;
-
-  list->next_memrange = 0;
-  for (ndx = 0; ndx < list->next_aexpr_elt; ndx++)
-    {
-      free_agent_expr (list->aexpr_list[ndx]);
-      list->aexpr_list[ndx] = NULL;
-    }
-  list->next_aexpr_elt = 0;
-  memset (list->regs_mask, 0, sizeof (list->regs_mask));
-  list->strace_data = 0;
-
-  xfree (list->aexpr_list);
-  xfree (list->list);
-
-  VEC_free (char_ptr, list->wholly_collected);
-  VEC_free (char_ptr, list->computed);
-}
-
-/* A cleanup wrapper for function clear_collection_list.  */
-
-static void
-do_clear_collection_list (void *list)
-{
-  struct collection_list *l = list;
-
-  clear_collection_list (l);
+  m_strace_data = true;
 }
 
-/* Initialize collection_list CLIST.  */
-
-static void
-init_collection_list (struct collection_list *clist)
+collection_list::collection_list ()
+  : m_regs_mask (),
+    m_strace_data (false)
 {
-  memset (clist, 0, sizeof *clist);
-
-  clist->listsize = 128;
-  clist->list = xcalloc (clist->listsize,
-			 sizeof (struct memrange));
-
-  clist->aexpr_listsize = 128;
-  clist->aexpr_list = xcalloc (clist->aexpr_listsize,
-			       sizeof (struct agent_expr *));
+  m_memranges.reserve (128);
+  m_aexprs.reserve (128);
 }
 
 /* Reduce a collection list to string form (for gdb protocol).  */
-static char **
-stringify_collection_list (struct collection_list *list)
+
+char **
+collection_list::stringify ()
 {
   char temp_buf[2048];
-  char tmp2[40];
   int count;
   int ndx = 0;
   char *(*str_list)[];
   char *end;
   long i;
 
-  count = 1 + 1 + list->next_memrange + list->next_aexpr_elt + 1;
+  count = 1 + 1 + m_memranges.size () + m_aexprs.size () + 1;
   str_list = (char *(*)[]) xmalloc (count * sizeof (char *));
 
-  if (list->strace_data)
+  if (m_strace_data)
     {
       if (info_verbose)
 	printf_filtered ("\nCollecting static trace data\n");
@@ -1276,10 +1199,10 @@ stringify_collection_list (struct collec
       ndx++;
     }
 
-  for (i = sizeof (list->regs_mask) - 1; i > 0; i--)
-    if (list->regs_mask[i] != 0)    /* Skip leading zeroes in regs_mask.  */
+  for (i = sizeof (m_regs_mask) - 1; i > 0; i--)
+    if (m_regs_mask[i] != 0)    /* Skip leading zeroes in regs_mask.  */
       break;
-  if (list->regs_mask[i] != 0)	/* Prepare to send regs_mask to the stub.  */
+  if (m_regs_mask[i] != 0)	/* Prepare to send regs_mask to the stub.  */
     {
       if (info_verbose)
 	printf_filtered ("\nCollecting registers (mask): 0x");
@@ -1289,8 +1212,8 @@ stringify_collection_list (struct collec
 	{
 	  QUIT;			/* Allow user to bail out with ^C.  */
 	  if (info_verbose)
-	    printf_filtered ("%02X", list->regs_mask[i]);
-	  sprintf (end, "%02X", list->regs_mask[i]);
+	    printf_filtered ("%02X", m_regs_mask[i]);
+	  sprintf (end, "%02X", m_regs_mask[i]);
 	  end += 2;
 	}
       (*str_list)[ndx] = xstrdup (temp_buf);
@@ -1298,18 +1221,19 @@ stringify_collection_list (struct collec
     }
   if (info_verbose)
     printf_filtered ("\n");
-  if (list->next_memrange > 0 && info_verbose)
+  if (!m_memranges.empty () && info_verbose)
     printf_filtered ("Collecting memranges: \n");
-  for (i = 0, count = 0, end = temp_buf; i < list->next_memrange; i++)
+  for (i = 0, count = 0, end = temp_buf; i < m_memranges.size (); i++)
     {
       QUIT;			/* Allow user to bail out with ^C.  */
-      sprintf_vma (tmp2, list->list[i].start);
       if (info_verbose)
 	{
 	  printf_filtered ("(%d, %s, %ld)\n", 
-			   list->list[i].type, 
-			   tmp2, 
-			   (long) (list->list[i].end - list->list[i].start));
+			   m_memranges[i].type,
+			   paddress (target_gdbarch (),
+				     m_memranges[i].start),
+			   (long) (m_memranges[i].end
+				   - m_memranges[i].start));
 	}
       if (count + 27 > MAX_AGENT_EXPR_LEN)
 	{
@@ -1320,39 +1244,41 @@ stringify_collection_list (struct collec
 	}
 
       {
-        bfd_signed_vma length = list->list[i].end - list->list[i].start;
+        bfd_signed_vma length
+	  = m_memranges[i].end - m_memranges[i].start;
 
         /* The "%X" conversion specifier expects an unsigned argument,
            so passing -1 (memrange_absolute) to it directly gives you
            "FFFFFFFF" (or more, depending on sizeof (unsigned)).
            Special-case it.  */
-        if (list->list[i].type == memrange_absolute)
-          sprintf (end, "M-1,%s,%lX", tmp2, (long) length);
+        if (m_memranges[i].type == memrange_absolute)
+          sprintf (end, "M-1,%s,%lX", phex_nz (m_memranges[i].start, 0),
+		   (long) length);
         else
-          sprintf (end, "M%X,%s,%lX", list->list[i].type, tmp2, (long) length);
+          sprintf (end, "M%X,%s,%lX", m_memranges[i].type,
+		   phex_nz (m_memranges[i].start, 0), (long) length);
       }
 
       count += strlen (end);
       end = temp_buf + count;
     }
 
-  for (i = 0; i < list->next_aexpr_elt; i++)
+  for (i = 0; i < m_aexprs.size (); i++)
     {
       QUIT;			/* Allow user to bail out with ^C.  */
-      if ((count + 10 + 2 * list->aexpr_list[i]->len) > MAX_AGENT_EXPR_LEN)
+      if ((count + 10 + 2 * m_aexprs[i]->len) > MAX_AGENT_EXPR_LEN)
 	{
 	  (*str_list)[ndx] = savestring (temp_buf, count);
 	  ndx++;
 	  count = 0;
 	  end = temp_buf;
 	}
-      sprintf (end, "X%08X,", list->aexpr_list[i]->len);
+      sprintf (end, "X%08X,", m_aexprs[i]->len);
       end += 10;		/* 'X' + 8 hex digits + ',' */
       count += 10;
 
-      end = mem2hex (list->aexpr_list[i]->buf, 
-		     end, list->aexpr_list[i]->len);
-      count += 2 * list->aexpr_list[i]->len;
+      end = mem2hex (m_aexprs[i]->buf, end, m_aexprs[i]->len);
+      count += 2 * m_aexprs[i]->len;
     }
 
   if (count != 0)
@@ -1375,18 +1301,20 @@ stringify_collection_list (struct collec
 
 /* Add the printed expression EXP to *LIST.  */
 
-static void
-append_exp (struct expression *exp, VEC(char_ptr) **list)
+void
+collection_list::append_exp (struct expression *exp)
 {
-  struct ui_file *tmp_stream = mem_fileopen ();
-  char *text;
+  string_file tmp_stream;
 
-  print_expression (exp, tmp_stream);
+  print_expression (exp, &tmp_stream);
 
-  text = ui_file_xstrdup (tmp_stream, NULL);
+  m_computed.push_back (std::move (tmp_stream.string ()));
+}
 
-  VEC_safe_push (char_ptr, *list, text);
-  ui_file_delete (tmp_stream);
+void
+collection_list::finish ()
+{
+  memrange_sortmerge (m_memranges);
 }
 
 static void
@@ -1398,11 +1326,9 @@ encode_actions_1 (struct command_line *a
 		  struct collection_list *stepping_list)
 {
   const char *action_exp;
-  struct expression *exp = NULL;
   int i;
   struct value *tempval;
   struct cmd_list_element *cmd;
-  struct agent_expr *aexpr;
 
   for (; action; action = action->next)
     {
@@ -1428,84 +1354,75 @@ encode_actions_1 (struct command_line *a
 
 	      if (0 == strncasecmp ("$reg", action_exp, 4))
 		{
-		  for (i = 0; i < gdbarch_num_regs (tloc->gdbarch); i++)
-		    add_register (collect, i);
+		  for (i = 0; i < gdbarch_num_regs (target_gdbarch ()); i++)
+		    collect->add_register (i);
 		  action_exp = strchr (action_exp, ',');	/* more? */
 		}
 	      else if (0 == strncasecmp ("$arg", action_exp, 4))
 		{
-		  add_local_symbols (collect,
-				     tloc->gdbarch,
-				     tloc->address,
-				     frame_reg,
-				     frame_offset,
-				     'A',
-				     trace_string);
+		  collect->add_local_symbols (target_gdbarch (),
+					      tloc->address,
+					      frame_reg,
+					      frame_offset,
+					      'A',
+					      trace_string);
 		  action_exp = strchr (action_exp, ',');	/* more? */
 		}
 	      else if (0 == strncasecmp ("$loc", action_exp, 4))
 		{
-		  add_local_symbols (collect,
-				     tloc->gdbarch,
-				     tloc->address,
-				     frame_reg,
-				     frame_offset,
-				     'L',
-				     trace_string);
+		  collect->add_local_symbols (target_gdbarch (),
+					      tloc->address,
+					      frame_reg,
+					      frame_offset,
+					      'L',
+					      trace_string);
 		  action_exp = strchr (action_exp, ',');	/* more? */
 		}
 	      else if (0 == strncasecmp ("$_ret", action_exp, 5))
 		{
-		  struct cleanup *old_chain1 = NULL;
-
-		  aexpr = gen_trace_for_return_address (tloc->address,
-							tloc->gdbarch,
-							trace_string);
+		  agent_expr_up aexpr
+		    = gen_trace_for_return_address (tloc->address,
+						    target_gdbarch (),
+						    trace_string);
 
-		  old_chain1 = make_cleanup_free_agent_expr (aexpr);
-
-		  ax_reqs (aexpr);
-		  report_agent_reqs_errors (aexpr);
-
-		  discard_cleanups (old_chain1);
-		  add_aexpr (collect, aexpr);
+		  ax_reqs (aexpr.get ());
+		  report_agent_reqs_errors (aexpr.get ());
 
 		  /* take care of the registers */
 		  if (aexpr->reg_mask_len > 0)
 		    {
-		      int ndx1, ndx2;
-
-		      for (ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
+		      for (int ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
 			{
 			  QUIT;	/* allow user to bail out with ^C */
 			  if (aexpr->reg_mask[ndx1] != 0)
 			    {
 			      /* assume chars have 8 bits */
-			      for (ndx2 = 0; ndx2 < 8; ndx2++)
+			      for (int ndx2 = 0; ndx2 < 8; ndx2++)
 				if (aexpr->reg_mask[ndx1] & (1 << ndx2))
-				  /* it's used -- record it */
-				  add_register (collect, 
-						ndx1 * 8 + ndx2);
+				  {
+				    /* It's used -- record it.  */
+				    collect->add_register (ndx1 * 8 + ndx2);
+				  }
 			    }
 			}
 		    }
 
+		  collect->add_aexpr (std::move (aexpr));
 		  action_exp = strchr (action_exp, ',');	/* more? */
 		}
 	      else if (0 == strncasecmp ("$_sdata", action_exp, 7))
 		{
-		  add_static_trace_data (collect);
+		  collect->add_static_trace_data ();
 		  action_exp = strchr (action_exp, ',');	/* more? */
 		}
 	      else
 		{
 		  unsigned long addr;
-		  struct cleanup *old_chain = NULL;
 		  struct cleanup *old_chain1 = NULL;
 
-		  exp = parse_exp_1 (&action_exp, tloc->address,
-				     block_for_pc (tloc->address), 1);
-		  old_chain = make_cleanup (free_current_contents, &exp);
+		  expression_up exp = parse_exp_1 (&action_exp, tloc->address,
+						   block_for_pc (tloc->address),
+						   1);
 
 		  switch (exp->elts[0].opcode)
 		    {
@@ -1513,7 +1430,7 @@ encode_actions_1 (struct command_line *a
 		      {
 			const char *name = &exp->elts[2].string;
 
-			i = user_reg_map_name_to_regnum (tloc->gdbarch,
+			i = user_reg_map_name_to_regnum (target_gdbarch (),
 							 name, strlen (name));
 			if (i == -1)
 			  internal_error (__FILE__, __LINE__,
@@ -1521,19 +1438,20 @@ encode_actions_1 (struct command_line *a
 					  name);
 			if (info_verbose)
 			  printf_filtered ("OP_REGISTER: ");
-			add_register (collect, i);
+			collect->add_register (i);
 			break;
 		      }
 
 		    case UNOP_MEMVAL:
 		      /* Safe because we know it's a simple expression.  */
-		      tempval = evaluate_expression (exp);
+		      tempval = evaluate_expression (exp.get ());
 		      addr = value_address (tempval);
 		      /* Initialize the TYPE_LENGTH if it is a typedef.  */
 		      check_typedef (exp->elts[1].type);
-		      add_memrange (collect, memrange_absolute, addr,
-				    TYPE_LENGTH (exp->elts[1].type));
-		      append_exp (exp, &collect->computed);
+		      collect->add_memrange (target_gdbarch (),
+					     memrange_absolute, addr,
+					     TYPE_LENGTH (exp->elts[1].type));
+		      collect->append_exp (exp.get ());
 		      break;
 
 		    case OP_VAR_VALUE:
@@ -1541,57 +1459,48 @@ encode_actions_1 (struct command_line *a
 			struct symbol *sym = exp->elts[2].symbol;
 			char_ptr name = (char_ptr) SYMBOL_NATURAL_NAME (sym);
 
-			collect_symbol (collect,
-					exp->elts[2].symbol,
-					tloc->gdbarch,
-					frame_reg,
-					frame_offset,
-					tloc->address,
-					trace_string);
-			VEC_safe_push (char_ptr,
-				       collect->wholly_collected,
-				       name);
+			collect->collect_symbol (exp->elts[2].symbol,
+						 target_gdbarch (),
+						 frame_reg,
+						 frame_offset,
+						 tloc->address,
+						 trace_string);
+			collect->add_wholly_collected (name);
 		      }
 		      break;
 
 		    default:	/* Full-fledged expression.  */
-		      aexpr = gen_trace_for_expr (tloc->address, exp,
-						  trace_string);
+		      agent_expr_up aexpr = gen_trace_for_expr (tloc->address,
+								exp.get (),
+								trace_string);
 
-		      old_chain1 = make_cleanup_free_agent_expr (aexpr);
+		      ax_reqs (aexpr.get ());
 
-		      ax_reqs (aexpr);
-
-		      report_agent_reqs_errors (aexpr);
-
-		      discard_cleanups (old_chain1);
-		      add_aexpr (collect, aexpr);
+		      report_agent_reqs_errors (aexpr.get ());
 
 		      /* Take care of the registers.  */
 		      if (aexpr->reg_mask_len > 0)
 			{
-			  int ndx1;
-			  int ndx2;
-
-			  for (ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
+			  for (int ndx1 = 0; ndx1 < aexpr->reg_mask_len; ndx1++)
 			    {
 			      QUIT;	/* Allow user to bail out with ^C.  */
 			      if (aexpr->reg_mask[ndx1] != 0)
 				{
 				  /* Assume chars have 8 bits.  */
-				  for (ndx2 = 0; ndx2 < 8; ndx2++)
+				  for (int ndx2 = 0; ndx2 < 8; ndx2++)
 				    if (aexpr->reg_mask[ndx1] & (1 << ndx2))
-				      /* It's used -- record it.  */
-				      add_register (collect, 
-						    ndx1 * 8 + ndx2);
+				      {
+					/* It's used -- record it.  */
+					collect->add_register (ndx1 * 8 + ndx2);
+				      }
 				}
 			    }
 			}
 
-		      append_exp (exp, &collect->computed);
+		      collect->add_aexpr (std::move (aexpr));
+		      collect->append_exp (exp.get ());
 		      break;
 		    }		/* switch */
-		  do_cleanups (old_chain);
 		}		/* do */
 	    }
 	  while (action_exp && *action_exp++ == ',');
@@ -1604,25 +1513,21 @@ encode_actions_1 (struct command_line *a
 	      action_exp = skip_spaces_const (action_exp);
 
 		{
-		  struct cleanup *old_chain = NULL;
 		  struct cleanup *old_chain1 = NULL;
 
-		  exp = parse_exp_1 (&action_exp, tloc->address,
-				     block_for_pc (tloc->address), 1);
-		  old_chain = make_cleanup (free_current_contents, &exp);
+		  expression_up exp = parse_exp_1 (&action_exp, tloc->address,
+						   block_for_pc (tloc->address),
+						   1);
 
-		  aexpr = gen_eval_for_expr (tloc->address, exp);
-		  old_chain1 = make_cleanup_free_agent_expr (aexpr);
+		  agent_expr_up aexpr = gen_eval_for_expr (tloc->address,
+							   exp.get ());
 
-		  ax_reqs (aexpr);
-		  report_agent_reqs_errors (aexpr);
+		  ax_reqs (aexpr.get ());
+		  report_agent_reqs_errors (aexpr.get ());
 
-		  discard_cleanups (old_chain1);
 		  /* Even though we're not officially collecting, add
 		     to the collect list anyway.  */
-		  add_aexpr (collect, aexpr);
-
-		  do_cleanups (old_chain);
+		  collect->add_aexpr (std::move (aexpr));
 		}		/* do */
 	    }
 	  while (action_exp && *action_exp++ == ',');
@@ -1643,29 +1548,17 @@ encode_actions_1 (struct command_line *a
 }
 
 /* Encode actions of tracepoint TLOC->owner and fill TRACEPOINT_LIST
-   and STEPPING_LIST.  Return a cleanup pointer to clean up both
-   TRACEPOINT_LIST and STEPPING_LIST.  */
+   and STEPPING_LIST.  */
 
-struct cleanup *
-encode_actions_and_make_cleanup (struct bp_location *tloc,
-				 struct collection_list *tracepoint_list,
-				 struct collection_list *stepping_list)
+void
+encode_actions (struct bp_location *tloc,
+		struct collection_list *tracepoint_list,
+		struct collection_list *stepping_list)
 {
-  char *default_collect_line = NULL;
   struct command_line *actions;
-  struct command_line *default_collect_action = NULL;
   int frame_reg;
   LONGEST frame_offset;
-  struct cleanup *back_to, *return_chain;
-
-  return_chain = make_cleanup (null_cleanup, NULL);
-  init_collection_list (tracepoint_list);
-  init_collection_list (stepping_list);
 
-  make_cleanup (do_clear_collection_list, tracepoint_list);
-  make_cleanup (do_clear_collection_list, stepping_list);
-
-  back_to = make_cleanup (null_cleanup, NULL);
   gdbarch_virtual_frame_pointer (tloc->gdbarch,
 				 tloc->address, &frame_reg, &frame_offset);
 
@@ -1674,11 +1567,8 @@ encode_actions_and_make_cleanup (struct 
   encode_actions_1 (actions, tloc, frame_reg, frame_offset,
 		    tracepoint_list, stepping_list);
 
-  memrange_sortmerge (tracepoint_list);
-  memrange_sortmerge (stepping_list);
-
-  do_cleanups (back_to);
-  return return_chain;
+  tracepoint_list->finish ();
+  stepping_list->finish ();
 }
 
 /* Render all actions into gdb protocol.  */
@@ -1688,32 +1578,20 @@ encode_actions_rsp (struct bp_location *
 		    char ***stepping_actions)
 {
   struct collection_list tracepoint_list, stepping_list;
-  struct cleanup *cleanup;
 
   *tdp_actions = NULL;
   *stepping_actions = NULL;
 
-  cleanup = encode_actions_and_make_cleanup (tloc, &tracepoint_list,
-					     &stepping_list);
+  encode_actions (tloc, &tracepoint_list, &stepping_list);
 
-  *tdp_actions = stringify_collection_list (&tracepoint_list);
-  *stepping_actions = stringify_collection_list (&stepping_list);
-
-  do_cleanups (cleanup);
+  *tdp_actions = tracepoint_list.stringify ();
+  *stepping_actions = stepping_list.stringify ();
 }
 
-static void
-add_aexpr (struct collection_list *collect, struct agent_expr *aexpr)
+void
+collection_list::add_aexpr (agent_expr_up aexpr)
 {
-  if (collect->next_aexpr_elt >= collect->aexpr_listsize)
-    {
-      collect->aexpr_list =
-	xrealloc (collect->aexpr_list,
-		  2 * collect->aexpr_listsize * sizeof (struct agent_expr *));
-      collect->aexpr_listsize *= 2;
-    }
-  collect->aexpr_list[collect->next_aexpr_elt] = aexpr;
-  collect->next_aexpr_elt++;
+  m_aexprs.push_back (std::move (aexpr));
 }
 
 static void
@@ -1790,9 +1668,6 @@ start_tracing (char *notes)
 
   for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, b); ix++)
     {
-      struct tracepoint *t = (struct tracepoint *) b;
-      struct bp_location *loc;
-
       if (b->enable_state == bp_enabled)
 	any_enabled = 1;
 
@@ -1904,7 +1779,7 @@ start_tracing (char *notes)
    anybody else messing with the target.  */
 
 static void
-trace_start_command (char *args, int from_tty)
+tstart_command (char *args, int from_tty)
 {
   dont_repeat ();	/* Like "run", dangerous to repeat accidentally.  */
 
@@ -1924,7 +1799,7 @@ trace_start_command (char *args, int fro
    of the trace run's status.  */
 
 static void
-trace_stop_command (char *args, int from_tty)
+tstop_command (char *args, int from_tty)
 {
   if (!current_trace_status ()->running)
     error (_("Trace is not running."));
@@ -1981,7 +1856,7 @@ stop_tracing (char *note)
 
 /* tstatus command */
 static void
-trace_status_command (char *args, int from_tty)
+tstatus_command (char *args, int from_tty)
 {
   struct trace_status *ts = current_trace_status ();
   int status, ix;
@@ -2016,7 +1891,7 @@ trace_status_command (char *args, int fr
 	case trace_never_run:
 	  printf_filtered (_("No trace has been run on the target.\n"));
 	  break;
-	case tstop_command:
+	case trace_stop_command:
 	  if (ts->stop_desc)
 	    printf_filtered (_("Trace stopped by a tstop command (%s).\n"),
 			     ts->stop_desc);
@@ -2154,23 +2029,23 @@ trace_status_mi (int on_stop)
 
   if (status == -1 && ts->filename == NULL)
     {
-      ui_out_field_string (uiout, "supported", "0");
+      uiout->field_string ("supported", "0");
       return;
     }
 
   if (ts->filename != NULL)
-    ui_out_field_string (uiout, "supported", "file");
+    uiout->field_string ("supported", "file");
   else if (!on_stop)
-    ui_out_field_string (uiout, "supported", "1");
+    uiout->field_string ("supported", "1");
 
   if (ts->filename != NULL)
-    ui_out_field_string (uiout, "trace-file", ts->filename);
+    uiout->field_string ("trace-file", ts->filename);
 
   gdb_assert (ts->running_known);
 
   if (ts->running)
     {
-      ui_out_field_string (uiout, "running", "1");
+      uiout->field_string ("running", "1");
 
       /* Unlike CLI, do not show the state of 'disconnected-tracing' variable.
 	 Given that the frontend gets the status either on -trace-stop, or from
@@ -2187,13 +2062,13 @@ trace_status_mi (int on_stop)
       int stopping_tracepoint = -1;
 
       if (!on_stop)
-	ui_out_field_string (uiout, "running", "0");
+	uiout->field_string ("running", "0");
 
       if (ts->stop_reason != trace_stop_reason_unknown)
 	{
 	  switch (ts->stop_reason)
 	    {
-	    case tstop_command:
+	    case trace_stop_command:
 	      stop_reason = "request";
 	      break;
 	    case trace_buffer_full:
@@ -2214,31 +2089,31 @@ trace_status_mi (int on_stop)
 	  
 	  if (stop_reason)
 	    {
-	      ui_out_field_string (uiout, "stop-reason", stop_reason);
+	      uiout->field_string ("stop-reason", stop_reason);
 	      if (stopping_tracepoint != -1)
-		ui_out_field_int (uiout, "stopping-tracepoint",
+		uiout->field_int ("stopping-tracepoint",
 				  stopping_tracepoint);
 	      if (ts->stop_reason == tracepoint_error)
-		ui_out_field_string (uiout, "error-description",
+		uiout->field_string ("error-description",
 				     ts->stop_desc);
 	    }
 	}
     }
 
   if (ts->traceframe_count != -1)
-    ui_out_field_int (uiout, "frames", ts->traceframe_count);
+    uiout->field_int ("frames", ts->traceframe_count);
   if (ts->traceframes_created != -1)
-    ui_out_field_int (uiout, "frames-created", ts->traceframes_created);
+    uiout->field_int ("frames-created", ts->traceframes_created);
   if (ts->buffer_size != -1)
-    ui_out_field_int (uiout, "buffer-size", ts->buffer_size);
+    uiout->field_int ("buffer-size", ts->buffer_size);
   if (ts->buffer_free != -1)
-    ui_out_field_int (uiout, "buffer-free", ts->buffer_free);
+    uiout->field_int ("buffer-free", ts->buffer_free);
 
-  ui_out_field_int (uiout, "disconnected",  ts->disconnected_tracing);
-  ui_out_field_int (uiout, "circular",  ts->circular_buffer);
+  uiout->field_int ("disconnected",  ts->disconnected_tracing);
+  uiout->field_int ("circular",  ts->circular_buffer);
 
-  ui_out_field_string (uiout, "user-name", ts->user_name);
-  ui_out_field_string (uiout, "notes", ts->notes);
+  uiout->field_string ("user-name", ts->user_name);
+  uiout->field_string ("notes", ts->notes);
 
   {
     char buf[100];
@@ -2246,11 +2121,11 @@ trace_status_mi (int on_stop)
     xsnprintf (buf, sizeof buf, "%ld.%06ld",
 	       (long int) (ts->start_time / 1000000),
 	       (long int) (ts->start_time % 1000000));
-    ui_out_field_string (uiout, "start-time", buf);
+    uiout->field_string ("start-time", buf);
     xsnprintf (buf, sizeof buf, "%ld.%06ld",
 	       (long int) (ts->stop_time / 1000000),
 	       (long int) (ts->stop_time % 1000000));
-    ui_out_field_string (uiout, "stop-time", buf);
+    uiout->field_string ("stop-time", buf);
   }
 }
 
@@ -2370,7 +2245,7 @@ tfind_1 (enum trace_find_type type, int 
 #if 0 /* dubious now?  */
 	  /* The following will not recurse, since it's
 	     special-cased.  */
-	  trace_find_command ("-1", from_tty);
+	  tfind_command ("-1", from_tty);
 #endif
 	}
     }
@@ -2396,11 +2271,11 @@ tfind_1 (enum trace_find_type type, int 
     {
       /* Use different branches for MI and CLI to make CLI messages
 	 i18n-eable.  */
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
-	  ui_out_field_string (uiout, "found", "1");
-	  ui_out_field_int (uiout, "tracepoint", tracepoint_number);
-	  ui_out_field_int (uiout, "traceframe", traceframe_number);
+	  uiout->field_string ("found", "1");
+	  uiout->field_int ("tracepoint", tracepoint_number);
+	  uiout->field_int ("traceframe", traceframe_number);
 	}
       else
 	{
@@ -2410,8 +2285,8 @@ tfind_1 (enum trace_find_type type, int 
     }
   else
     {
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_string (uiout, "found", "0");
+      if (uiout->is_mi_like_p ())
+	uiout->field_string ("found", "0");
       else if (type == tfind_number && num == -1)
 	printf_unfiltered (_("No longer looking at any trace frame\n"));
       else /* This case may never occur, check.  */
@@ -2468,7 +2343,7 @@ check_trace_running (struct trace_status
 
 /* tfind command */
 static void
-trace_find_command (char *args, int from_tty)
+tfind_command (char *args, int from_tty)
 { /* This should only be called with a numeric argument.  */
   int frameno = -1;
 
@@ -2504,21 +2379,21 @@ trace_find_command (char *args, int from
 
 /* tfind end */
 static void
-trace_find_end_command (char *args, int from_tty)
+tfind_end_command (char *args, int from_tty)
 {
-  trace_find_command ("-1", from_tty);
+  tfind_command ("-1", from_tty);
 }
 
 /* tfind start */
 static void
-trace_find_start_command (char *args, int from_tty)
+tfind_start_command (char *args, int from_tty)
 {
-  trace_find_command ("0", from_tty);
+  tfind_command ("0", from_tty);
 }
 
 /* tfind pc command */
 static void
-trace_find_pc_command (char *args, int from_tty)
+tfind_pc_command (char *args, int from_tty)
 {
   CORE_ADDR pc;
 
@@ -2534,7 +2409,7 @@ trace_find_pc_command (char *args, int f
 
 /* tfind tracepoint command */
 static void
-trace_find_tracepoint_command (char *args, int from_tty)
+tfind_tracepoint_command (char *args, int from_tty)
 {
   int tdp;
   struct tracepoint *tp;
@@ -2570,7 +2445,7 @@ trace_find_tracepoint_command (char *arg
    corresponding to a source line OTHER THAN THE CURRENT ONE.  */
 
 static void
-trace_find_line_command (char *args, int from_tty)
+tfind_line_command (char *args, int from_tty)
 {
   static CORE_ADDR start_pc, end_pc;
   struct symtabs_and_lines sals;
@@ -2583,8 +2458,7 @@ trace_find_line_command (char *args, int
     {
       sal = find_pc_line (get_frame_pc (get_current_frame ()), 0);
       sals.nelts = 1;
-      sals.sals = (struct symtab_and_line *)
-	xmalloc (sizeof (struct symtab_and_line));
+      sals.sals = XNEW (struct symtab_and_line);
       sals.sals[0] = sal;
     }
   else
@@ -2636,7 +2510,7 @@ trace_find_line_command (char *args, int
 
 /* tfind range command */
 static void
-trace_find_range_command (char *args, int from_tty)
+tfind_range_command (char *args, int from_tty)
 {
   static CORE_ADDR start, stop;
   char *tmp;
@@ -2667,7 +2541,7 @@ trace_find_range_command (char *args, in
 
 /* tfind outside command */
 static void
-trace_find_outside_command (char *args, int from_tty)
+tfind_outside_command (char *args, int from_tty)
 {
   CORE_ADDR start, stop;
   char *tmp;
@@ -2712,14 +2586,22 @@ scope_info (char *args, int from_tty)
   int j, count = 0;
   struct gdbarch *gdbarch;
   int regno;
+  struct event_location *location;
+  struct cleanup *back_to;
 
   if (args == 0 || *args == 0)
     error (_("requires an argument (function, "
 	     "line or *addr) to define a scope"));
 
-  sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0);
+  location = string_to_event_location (&args, current_language);
+  back_to = make_cleanup_delete_event_location (location);
+  sals = decode_line_1 (location, DECODE_LINE_FUNFIRSTLINE, NULL, NULL, 0);
   if (sals.nelts == 0)
-    return;		/* Presumably decode_line_1 has already warned.  */
+    {
+      /* Presumably decode_line_1 has already warned.  */
+      do_cleanups (back_to);
+      return;
+    }
 
   /* Resolve line numbers to PC.  */
   resolve_sal_pc (&sals.sals[0]);
@@ -2856,6 +2738,7 @@ scope_info (char *args, int from_tty)
   if (count <= 0)
     printf_filtered ("Scope for %s contains no locals or arguments.\n",
 		     save_args);
+  do_cleanups (back_to);
 }
 
 /* Helper for trace_dump_command.  Dump the action list starting at
@@ -2938,7 +2821,7 @@ trace_dump_actions (struct command_line 
 			{
 			  size_t len = next_comma - action_exp;
 
-			  cmd = xrealloc (cmd, len + 1);
+			  cmd = (char *) xrealloc (cmd, len + 1);
 			  memcpy (cmd, action_exp, len);
 			  cmd[len] = 0;
 			}
@@ -2946,7 +2829,7 @@ trace_dump_actions (struct command_line 
 			{
 			  size_t len = strlen (action_exp);
 
-			  cmd = xrealloc (cmd, len + 1);
+			  cmd = (char *) xrealloc (cmd, len + 1);
 			  memcpy (cmd, action_exp, len + 1);
 			}
 
@@ -3031,7 +2914,7 @@ all_tracepoint_actions_and_cleanup (stru
       make_cleanup (xfree, default_collect_line);
 
       validate_actionline (default_collect_line, t);
-      default_collect_action = xmalloc (sizeof (struct command_line));
+      default_collect_action = XNEW (struct command_line);
       make_cleanup (xfree, default_collect_action);
       default_collect_action->next = actions;
       default_collect_action->line = default_collect_line;
@@ -3044,7 +2927,7 @@ all_tracepoint_actions_and_cleanup (stru
 /* The tdump command.  */
 
 static void
-trace_dump_command (char *args, int from_tty)
+tdump_command (char *args, int from_tty)
 {
   int stepping_frame = 0;
   struct bp_location *loc;
@@ -3057,11 +2940,9 @@ trace_dump_command (char *args, int from
   printf_filtered ("Data collected at tracepoint %d, trace frame %d:\n",
 		   tracepoint_number, traceframe_number);
 
-  old_chain = make_cleanup (null_cleanup, NULL);
-
   /* This command only makes sense for the current frame, not the
      selected frame.  */
-  make_cleanup_restore_current_thread ();
+  old_chain = make_cleanup_restore_current_thread ();
   select_frame (get_current_frame ());
 
   actions = all_tracepoint_actions_and_cleanup (loc->owner);
@@ -3078,7 +2959,7 @@ trace_dump_command (char *args, int from
 
 extern int
 encode_source_string (int tpnum, ULONGEST addr,
-		      char *srctype, char *src, char *buf, int buf_size)
+		      char *srctype, const char *src, char *buf, int buf_size)
 {
   if (80 + strlen (srctype) > buf_size)
     error (_("Buffer too small for source encoding"));
@@ -3227,7 +3108,8 @@ struct current_traceframe_cleanup
 static void
 do_restore_current_traceframe_cleanup (void *arg)
 {
-  struct current_traceframe_cleanup *old = arg;
+  struct current_traceframe_cleanup *old
+    = (struct current_traceframe_cleanup *) arg;
 
   set_current_traceframe (old->traceframe_number);
 }
@@ -3235,7 +3117,8 @@ do_restore_current_traceframe_cleanup (v
 static void
 restore_current_traceframe_cleanup_dtor (void *arg)
 {
-  struct current_traceframe_cleanup *old = arg;
+  struct current_traceframe_cleanup *old
+    = (struct current_traceframe_cleanup *) arg;
 
   xfree (old);
 }
@@ -3243,9 +3126,9 @@ restore_current_traceframe_cleanup_dtor 
 struct cleanup *
 make_cleanup_restore_current_traceframe (void)
 {
-  struct current_traceframe_cleanup *old;
+  struct current_traceframe_cleanup *old =
+    XNEW (struct current_traceframe_cleanup);
 
-  old = xmalloc (sizeof (struct current_traceframe_cleanup));
   old->traceframe_number = traceframe_number;
 
   return make_cleanup_dtor (do_restore_current_traceframe_cleanup, old,
@@ -3263,8 +3146,8 @@ get_uploaded_tp (int num, ULONGEST addr,
   for (utp = *utpp; utp; utp = utp->next)
     if (utp->number == num && utp->addr == addr)
       return utp;
-  utp = (struct uploaded_tp *) xmalloc (sizeof (struct uploaded_tp));
-  memset (utp, 0, sizeof (struct uploaded_tp));
+
+  utp = XCNEW (struct uploaded_tp);
   utp->number = num;
   utp->addr = addr;
   utp->actions = NULL;
@@ -3272,6 +3155,7 @@ get_uploaded_tp (int num, ULONGEST addr,
   utp->cmd_strings = NULL;
   utp->next = *utpp;
   *utpp = utp;
+
   return utp;
 }
 
@@ -3299,11 +3183,12 @@ get_uploaded_tsv (int num, struct upload
   for (utsv = *utsvp; utsv; utsv = utsv->next)
     if (utsv->number == num)
       return utsv;
-  utsv = (struct uploaded_tsv *) xmalloc (sizeof (struct uploaded_tsv));
-  memset (utsv, 0, sizeof (struct uploaded_tsv));
+
+  utsv = XCNEW (struct uploaded_tsv);
   utsv->number = num;
   utsv->next = *utsvp;
   *utsvp = utsv;
+
   return utsv;
 }
 
@@ -3606,7 +3491,7 @@ Status line: '%s'\n"), p, line);
 	  ts->stop_reason = tracepoint_passcount;
 	  ts->stopping_tracepoint = val;
 	}
-      else if (strncmp (p, stop_reason_names[tstop_command], p1 - p) == 0)
+      else if (strncmp (p, stop_reason_names[trace_stop_command], p1 - p) == 0)
 	{
 	  p2 = strchr (++p1, ':');
 	  if (!p2 || p2 > p3)
@@ -3616,7 +3501,7 @@ Status line: '%s'\n"), p, line);
 	    }
 	  else if (p2 != p1)
 	    {
-	      ts->stop_desc = xmalloc (strlen (line));
+	      ts->stop_desc = (char *) xmalloc (strlen (line));
 	      end = hex2bin (p1, (gdb_byte *) ts->stop_desc, (p2 - p1) / 2);
 	      ts->stop_desc[end] = '\0';
 	    }
@@ -3624,7 +3509,7 @@ Status line: '%s'\n"), p, line);
 	    ts->stop_desc = xstrdup ("");
 
 	  p = unpack_varlen_hex (++p2, &val);
-	  ts->stop_reason = tstop_command;
+	  ts->stop_reason = trace_stop_command;
 	}
       else if (strncmp (p, stop_reason_names[trace_disconnected], p1 - p) == 0)
 	{
@@ -3636,7 +3521,7 @@ Status line: '%s'\n"), p, line);
 	  p2 = strchr (++p1, ':');
 	  if (p2 != p1)
 	    {
-	      ts->stop_desc = xmalloc ((p2 - p1) / 2 + 1);
+	      ts->stop_desc = (char *) xmalloc ((p2 - p1) / 2 + 1);
 	      end = hex2bin (p1, (gdb_byte *) ts->stop_desc, (p2 - p1) / 2);
 	      ts->stop_desc[end] = '\0';
 	    }
@@ -3690,7 +3575,7 @@ Status line: '%s'\n"), p, line);
       else if (strncmp (p, "username", p1 - p) == 0)
 	{
 	  ++p1;
-	  ts->user_name = xmalloc (strlen (p) / 2);
+	  ts->user_name = (char *) xmalloc (strlen (p) / 2);
 	  end = hex2bin (p1, (gdb_byte *) ts->user_name, (p3 - p1)  / 2);
 	  ts->user_name[end] = '\0';
 	  p = p3;
@@ -3698,7 +3583,7 @@ Status line: '%s'\n"), p, line);
       else if (strncmp (p, "notes", p1 - p) == 0)
 	{
 	  ++p1;
-	  ts->notes = xmalloc (strlen (p) / 2);
+	  ts->notes = (char *) xmalloc (strlen (p) / 2);
 	  end = hex2bin (p1, (gdb_byte *) ts->notes, (p3 - p1) / 2);
 	  ts->notes[end] = '\0';
 	  p = p3;
@@ -3825,7 +3710,7 @@ parse_tracepoint_definition (char *line,
       p = unpack_varlen_hex (p, &xlen);
       p++;  /* skip a colon */
 
-      buf = alloca (strlen (line));
+      buf = (char *) alloca (strlen (line));
 
       end = hex2bin (p, (gdb_byte *) buf, strlen (p) / 2);
       buf[end] = '\0';
@@ -3862,7 +3747,7 @@ parse_tsv_definition (char *line, struct
   int end;
   struct uploaded_tsv *utsv = NULL;
 
-  buf = alloca (strlen (line));
+  buf = (char *) alloca (strlen (line));
 
   p = line;
   p = unpack_varlen_hex (p, &num);
@@ -3883,7 +3768,8 @@ parse_tsv_definition (char *line, struct
 void
 free_current_marker (void *arg)
 {
-  struct static_tracepoint_marker **marker_p = arg;
+  struct static_tracepoint_marker **marker_p
+    = (struct static_tracepoint_marker **) arg;
 
   if (*marker_p != NULL)
     {
@@ -3918,14 +3804,14 @@ parse_static_tracepoint_marker_definitio
   if (endp == NULL)
     error (_("bad marker definition: %s"), line);
 
-  marker->str_id = xmalloc (endp - p + 1);
+  marker->str_id = (char *) xmalloc (endp - p + 1);
   end = hex2bin (p, (gdb_byte *) marker->str_id, (endp - p + 1) / 2);
   marker->str_id[end] = '\0';
 
   p += 2 * end;
   p++;  /* skip a colon */
 
-  marker->extra = xmalloc (strlen (p) + 1);
+  marker->extra = (char *) xmalloc (strlen (p) + 1);
   end = hex2bin (p, (gdb_byte *) marker->extra, strlen (p) / 2);
   marker->extra[end] = '\0';
 
@@ -3950,7 +3836,6 @@ static void
 print_one_static_tracepoint_marker (int count,
 				    struct static_tracepoint_marker *marker)
 {
-  struct command_line *l;
   struct symbol *sym;
 
   char wrap_indent[80];
@@ -3971,13 +3856,13 @@ print_one_static_tracepoint_marker (int 
 
   /* A counter field to help readability.  This is not a stable
      identifier!  */
-  ui_out_field_int (uiout, "count", count);
+  uiout->field_int ("count", count);
 
-  ui_out_field_string (uiout, "marker-id", marker->str_id);
+  uiout->field_string ("marker-id", marker->str_id);
 
-  ui_out_field_fmt (uiout, "enabled", "%c",
+  uiout->field_fmt ("enabled", "%c",
 		    !VEC_empty (breakpoint_p, tracepoints) ? 'y' : 'n');
-  ui_out_spaces (uiout, 2);
+  uiout->spaces (2);
 
   strcpy (wrap_indent, "                                   ");
 
@@ -3988,49 +3873,49 @@ print_one_static_tracepoint_marker (int 
 
   strcpy (extra_field_indent, "         ");
 
-  ui_out_field_core_addr (uiout, "addr", marker->gdbarch, marker->address);
+  uiout->field_core_addr ("addr", marker->gdbarch, marker->address);
 
   sal = find_pc_line (marker->address, 0);
   sym = find_pc_sect_function (marker->address, NULL);
   if (sym)
     {
-      ui_out_text (uiout, "in ");
-      ui_out_field_string (uiout, "func",
+      uiout->text ("in ");
+      uiout->field_string ("func",
 			   SYMBOL_PRINT_NAME (sym));
-      ui_out_wrap_hint (uiout, wrap_indent);
-      ui_out_text (uiout, " at ");
+      uiout->wrap_hint (wrap_indent);
+      uiout->text (" at ");
     }
   else
-    ui_out_field_skip (uiout, "func");
+    uiout->field_skip ("func");
 
   if (sal.symtab != NULL)
     {
-      ui_out_field_string (uiout, "file",
+      uiout->field_string ("file",
 			   symtab_to_filename_for_display (sal.symtab));
-      ui_out_text (uiout, ":");
+      uiout->text (":");
 
-      if (ui_out_is_mi_like_p (uiout))
+      if (uiout->is_mi_like_p ())
 	{
 	  const char *fullname = symtab_to_fullname (sal.symtab);
 
-	  ui_out_field_string (uiout, "fullname", fullname);
+	  uiout->field_string ("fullname", fullname);
 	}
       else
-	ui_out_field_skip (uiout, "fullname");
+	uiout->field_skip ("fullname");
 
-      ui_out_field_int (uiout, "line", sal.line);
+      uiout->field_int ("line", sal.line);
     }
   else
     {
-      ui_out_field_skip (uiout, "fullname");
-      ui_out_field_skip (uiout, "line");
+      uiout->field_skip ("fullname");
+      uiout->field_skip ("line");
     }
 
-  ui_out_text (uiout, "\n");
-  ui_out_text (uiout, extra_field_indent);
-  ui_out_text (uiout, _("Data: \""));
-  ui_out_field_string (uiout, "extra-data", marker->extra);
-  ui_out_text (uiout, "\"\n");
+  uiout->text ("\n");
+  uiout->text (extra_field_indent);
+  uiout->text (_("Data: \""));
+  uiout->field_string ("extra-data", marker->extra);
+  uiout->text ("\"\n");
 
   if (!VEC_empty (breakpoint_p, tracepoints))
     {
@@ -4041,23 +3926,23 @@ print_one_static_tracepoint_marker (int 
       cleanup_chain = make_cleanup_ui_out_tuple_begin_end (uiout,
 							   "tracepoints-at");
 
-      ui_out_text (uiout, extra_field_indent);
-      ui_out_text (uiout, _("Probed by static tracepoints: "));
+      uiout->text (extra_field_indent);
+      uiout->text (_("Probed by static tracepoints: "));
       for (ix = 0; VEC_iterate(breakpoint_p, tracepoints, ix, b); ix++)
 	{
 	  if (ix > 0)
-	    ui_out_text (uiout, ", ");
-	  ui_out_text (uiout, "#");
-	  ui_out_field_int (uiout, "tracepoint-id", b->number);
+	    uiout->text (", ");
+	  uiout->text ("#");
+	  uiout->field_int ("tracepoint-id", b->number);
 	}
 
       do_cleanups (cleanup_chain);
 
-      if (ui_out_is_mi_like_p (uiout))
-	ui_out_field_int (uiout, "number-of-tracepoints",
+      if (uiout->is_mi_like_p ())
+	uiout->field_int ("number-of-tracepoints",
 			  VEC_length(breakpoint_p, tracepoints));
       else
-	ui_out_text (uiout, "\n");
+	uiout->text ("\n");
     }
   VEC_free (breakpoint_p, tracepoints);
 
@@ -4083,18 +3968,18 @@ info_static_tracepoint_markers_command (
     = make_cleanup_ui_out_table_begin_end (uiout, 5, -1,
 					   "StaticTracepointMarkersTable");
 
-  ui_out_table_header (uiout, 7, ui_left, "counter", "Cnt");
+  uiout->table_header (7, ui_left, "counter", "Cnt");
 
-  ui_out_table_header (uiout, 40, ui_left, "marker-id", "ID");
+  uiout->table_header (40, ui_left, "marker-id", "ID");
 
-  ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");
+  uiout->table_header (3, ui_left, "enabled", "Enb");
   if (gdbarch_addr_bit (target_gdbarch ()) <= 32)
-    ui_out_table_header (uiout, 10, ui_left, "addr", "Address");
+    uiout->table_header (10, ui_left, "addr", "Address");
   else
-    ui_out_table_header (uiout, 18, ui_left, "addr", "Address");
-  ui_out_table_header (uiout, 40, ui_noalign, "what", "What");
+    uiout->table_header (18, ui_left, "addr", "Address");
+  uiout->table_header (40, ui_noalign, "what", "What");
 
-  ui_out_table_body (uiout);
+  uiout->table_body ();
 
   markers = target_static_tracepoint_markers_by_strid (NULL);
   make_cleanup (VEC_cleanup (static_tracepoint_marker_p), &markers);
@@ -4176,12 +4061,14 @@ traceframe_info_start_memory (struct gdb
 			      const struct gdb_xml_element *element,
 			      void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct traceframe_info *info = user_data;
+  struct traceframe_info *info = (struct traceframe_info *) user_data;
   struct mem_range *r = VEC_safe_push (mem_range_s, info->memory, NULL);
   ULONGEST *start_p, *length_p;
 
-  start_p = xml_find_attribute (attributes, "start")->value;
-  length_p = xml_find_attribute (attributes, "length")->value;
+  start_p
+    = (ULONGEST *) xml_find_attribute (attributes, "start")->value;
+  length_p
+    = (ULONGEST *) xml_find_attribute (attributes, "length")->value;
 
   r->start = *start_p;
   r->length = *length_p;
@@ -4195,8 +4082,9 @@ traceframe_info_start_tvar (struct gdb_x
 			     void *user_data,
 			     VEC(gdb_xml_value_s) *attributes)
 {
-  struct traceframe_info *info = user_data;
-  const char *id_attrib = xml_find_attribute (attributes, "id")->value;
+  struct traceframe_info *info = (struct traceframe_info *) user_data;
+  const char *id_attrib
+    = (const char *) xml_find_attribute (attributes, "id")->value;
   int id = gdb_xml_parse_ulongest (parser, id_attrib);
 
   VEC_safe_push (int, info->tvars, id);
@@ -4207,7 +4095,7 @@ traceframe_info_start_tvar (struct gdb_x
 static void
 free_result (void *p)
 {
-  struct traceframe_info *result = p;
+  struct traceframe_info *result = (struct traceframe_info *) p;
 
   free_traceframe_info (result);
 }
@@ -4314,8 +4202,8 @@ traceframe_available_memory (VEC(mem_ran
 
 	    nr = VEC_safe_push (mem_range_s, *result, NULL);
 
-	    nr->start = max (lo1, lo2);
-	    nr->length = min (hi1, hi2) - nr->start;
+	    nr->start = std::max (lo1, lo2);
+	    nr->length = std::min (hi1, hi2) - nr->start;
 	  }
 
       normalize_mem_ranges (*result);
@@ -4356,7 +4244,7 @@ _initialize_tracepoint (void)
 	   _("Tracing of program execution without stopping the program."),
 	   &cmdlist);
 
-  add_com ("tdump", class_trace, trace_dump_command,
+  add_com ("tdump", class_trace, tdump_command,
 	   _("Print everything collected at the current tracepoint."));
 
   c = add_com ("tvariable", class_trace, trace_variable_command,_("\
@@ -4381,58 +4269,58 @@ Status of trace state variables and thei
 List target static tracepoints markers.\n\
 "));
 
-  add_prefix_cmd ("tfind", class_trace, trace_find_command, _("\
+  add_prefix_cmd ("tfind", class_trace, tfind_command, _("\
 Select a trace frame;\n\
 No argument means forward by one frame; '-' means backward by one frame."),
 		  &tfindlist, "tfind ", 1, &cmdlist);
 
-  add_cmd ("outside", class_trace, trace_find_outside_command, _("\
+  add_cmd ("outside", class_trace, tfind_outside_command, _("\
 Select a trace frame whose PC is outside the given range (exclusive).\n\
 Usage: tfind outside addr1, addr2"),
 	   &tfindlist);
 
-  add_cmd ("range", class_trace, trace_find_range_command, _("\
+  add_cmd ("range", class_trace, tfind_range_command, _("\
 Select a trace frame whose PC is in the given range (inclusive).\n\
 Usage: tfind range addr1,addr2"),
 	   &tfindlist);
 
-  add_cmd ("line", class_trace, trace_find_line_command, _("\
+  add_cmd ("line", class_trace, tfind_line_command, _("\
 Select a trace frame by source line.\n\
 Argument can be a line number (with optional source file),\n\
 a function name, or '*' followed by an address.\n\
 Default argument is 'the next source line that was traced'."),
 	   &tfindlist);
 
-  add_cmd ("tracepoint", class_trace, trace_find_tracepoint_command, _("\
+  add_cmd ("tracepoint", class_trace, tfind_tracepoint_command, _("\
 Select a trace frame by tracepoint number.\n\
 Default is the tracepoint for the current trace frame."),
 	   &tfindlist);
 
-  add_cmd ("pc", class_trace, trace_find_pc_command, _("\
+  add_cmd ("pc", class_trace, tfind_pc_command, _("\
 Select a trace frame by PC.\n\
 Default is the current PC, or the PC of the current trace frame."),
 	   &tfindlist);
 
-  add_cmd ("end", class_trace, trace_find_end_command, _("\
+  add_cmd ("end", class_trace, tfind_end_command, _("\
 De-select any trace frame and resume 'live' debugging."),
 	   &tfindlist);
 
   add_alias_cmd ("none", "end", class_trace, 0, &tfindlist);
 
-  add_cmd ("start", class_trace, trace_find_start_command,
+  add_cmd ("start", class_trace, tfind_start_command,
 	   _("Select the first trace frame in the trace buffer."),
 	   &tfindlist);
 
-  add_com ("tstatus", class_trace, trace_status_command,
+  add_com ("tstatus", class_trace, tstatus_command,
 	   _("Display the status of the current trace data collection."));
 
-  add_com ("tstop", class_trace, trace_stop_command, _("\
+  add_com ("tstop", class_trace, tstop_command, _("\
 Stop trace data collection.\n\
 Usage: tstop [ <notes> ... ]\n\
 Any arguments supplied are recorded with the trace as a stop reason and\n\
 reported by tstatus (if the target supports trace notes)."));
 
-  add_com ("tstart", class_trace, trace_start_command, _("\
+  add_com ("tstart", class_trace, tstart_command, _("\
 Start trace data collection.\n\
 Usage: tstart [ <notes> ... ]\n\
 Any arguments supplied are recorded with the trace as a note and\n\
@@ -4473,7 +4361,7 @@ Accepts a comma-separated list of (one o
 The result of each evaluation will be discarded.\n\
 Note: this command can only be used in a tracepoint \"actions\" list."));
 
-  add_com ("actions", class_trace, trace_actions_command, _("\
+  add_com ("actions", class_trace, actions_command, _("\
 Specify the actions to be taken at a tracepoint.\n\
 Tracepoint actions may include collecting of specified data,\n\
 single-stepping, or enabling/disabling other tracepoints,\n\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracepoint.h ./gdb/tracepoint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tracepoint.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tracepoint.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Data structures associated with tracepoints in GDB.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,9 @@
 #include "memrange.h"
 #include "gdb_vecs.h"
 
+#include <vector>
+#include <string>
+
 /* An object describing the contents of a traceframe.  */
 
 struct traceframe_info
@@ -74,7 +77,7 @@ enum trace_stop_reason
   {
     trace_stop_reason_unknown,
     trace_never_run,
-    tstop_command,
+    trace_stop_command,
     trace_buffer_full,
     trace_disconnected,
     tracepoint_passcount,
@@ -222,6 +225,13 @@ struct static_tracepoint_marker
 
 struct memrange
 {
+  memrange (int type_, bfd_signed_vma start_, bfd_signed_vma end_)
+    : type (type_), start (start_), end (end_)
+  {}
+
+  memrange ()
+  {}
+
   /* memrange_absolute for absolute memory range, else basereg
      number.  */
   int type;
@@ -229,27 +239,59 @@ struct memrange
   bfd_signed_vma end;
 };
 
-struct collection_list
+class collection_list
 {
+public:
+  collection_list ();
+
+  void add_wholly_collected (const char *print_name);
+
+  void append_exp (struct expression *exp);
+
+  /* Add AEXPR to the list, taking ownership.  */
+  void add_aexpr (agent_expr_up aexpr);
+
+  void add_register (unsigned int regno);
+  void add_memrange (struct gdbarch *gdbarch,
+		     int type, bfd_signed_vma base,
+		     unsigned long len);
+  void collect_symbol (struct symbol *sym,
+		       struct gdbarch *gdbarch,
+		       long frame_regno, long frame_offset,
+		       CORE_ADDR scope,
+		       int trace_string);
+
+  void add_local_symbols (struct gdbarch *gdbarch, CORE_ADDR pc,
+			  long frame_regno, long frame_offset, int type,
+			  int trace_string);
+  void add_static_trace_data ();
+
+  void finish ();
+
+  char **stringify ();
+
+  const std::vector<std::string> &wholly_collected ()
+  { return m_wholly_collected; }
+
+  const std::vector<std::string> &computed ()
+  { return m_computed; }
+
+private:
   /* room for up to 256 regs */
-  unsigned char regs_mask[32];
-  long listsize;
-  long next_memrange;
-  struct memrange *list;
-
-  /* size of array pointed to by expr_list elt.  */
-  long aexpr_listsize;
-  long next_aexpr_elt;
-  struct agent_expr **aexpr_list;
+  unsigned char m_regs_mask[32];
+
+  std::vector<memrange> m_memranges;
+
+  std::vector<agent_expr_up> m_aexprs;
 
   /* True is the user requested a collection of "$_sdata", "static
      tracepoint data".  */
-  int strace_data;
+  bool m_strace_data;
 
   /* A set of names of wholly collected objects.  */
-  VEC(char_ptr) *wholly_collected;
+  std::vector<std::string> m_wholly_collected;
   /* A set of computed expressions.  */
-  VEC(char_ptr) *computed;
+  std::vector<std::string> m_computed;
 };
 
 extern void parse_static_tracepoint_marker_definition
@@ -280,10 +322,9 @@ void free_actions (struct breakpoint *);
 
 extern const char *decode_agent_options (const char *exp, int *trace_string);
 
-extern struct cleanup *
-  encode_actions_and_make_cleanup (struct bp_location *tloc,
-				   struct collection_list *tracepoint_list,
-				   struct collection_list *stepping_list);
+extern void encode_actions (struct bp_location *tloc,
+			    struct collection_list *tracepoint_list,
+			    struct collection_list *stepping_list);
 
 extern void encode_actions_rsp (struct bp_location *tloc,
 				char ***tdp_actions, char ***stepping_actions);
@@ -298,7 +339,7 @@ extern struct trace_state_variable *
 extern struct trace_state_variable *create_trace_state_variable (const char *name);
 
 extern int encode_source_string (int num, ULONGEST addr,
-				 char *srctype, char *src,
+				 char *srctype, const char *src,
 				 char *buf, int buf_size);
 
 extern void parse_trace_status (char *line, struct trace_status *ts);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/trad-frame.c ./gdb/trad-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/trad-frame.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/trad-frame.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Traditional frame unwind support, for GDB the GNU Debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,16 +43,10 @@ trad_frame_cache_zalloc (struct frame_in
   return this_trad_cache;
 }
 
-/* A traditional frame is unwound by analysing the function prologue
-   and using the information gathered to track registers.  For
-   non-optimized frames, the technique is reliable (just need to check
-   for all potential instruction sequences).  */
-
 struct trad_frame_saved_reg *
-trad_frame_alloc_saved_regs (struct frame_info *this_frame)
+trad_frame_alloc_saved_regs (struct gdbarch *gdbarch)
 {
   int regnum;
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   int numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
   struct trad_frame_saved_reg *this_saved_regs
     = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
@@ -65,6 +59,19 @@ trad_frame_alloc_saved_regs (struct fram
   return this_saved_regs;
 }
 
+/* A traditional frame is unwound by analysing the function prologue
+   and using the information gathered to track registers.  For
+   non-optimized frames, the technique is reliable (just need to check
+   for all potential instruction sequences).  */
+
+struct trad_frame_saved_reg *
+trad_frame_alloc_saved_regs (struct frame_info *this_frame)
+{
+  struct gdbarch *gdbarch = get_frame_arch (this_frame);
+
+  return trad_frame_alloc_saved_regs (gdbarch);
+}
+
 enum { TF_REG_VALUE = -1, TF_REG_UNKNOWN = -2 };
 
 int
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/trad-frame.h ./gdb/trad-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/trad-frame.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/trad-frame.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Traditional frame unwind support, for GDB the GNU Debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -104,6 +104,7 @@ int trad_frame_realreg_p (struct trad_fr
 
 /* Return a freshly allocated (and initialized) trad_frame array.  */
 struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *);
+struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct gdbarch *);
 
 /* Given the trad_frame info, return the location of the specified
    register.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tramp-frame.c ./gdb/tramp-frame.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tramp-frame.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tramp-frame.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Signal trampoline unwinder, for GDB the GNU Debugger.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -43,7 +43,8 @@ static struct trad_frame_cache *
 tramp_frame_cache (struct frame_info *this_frame,
 		   void **this_cache)
 {
-  struct tramp_frame_cache *tramp_cache = (*this_cache);
+  struct tramp_frame_cache *tramp_cache
+    = (struct tramp_frame_cache *) *this_cache;
 
   if (tramp_cache->trad_cache == NULL)
     {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tramp-frame.h ./gdb/tramp-frame.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tramp-frame.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tramp-frame.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Signal trampoline unwinder.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/transform.m4 ./gdb/transform.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/transform.m4	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/transform.m4	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui.c ./gdb/tui/tui.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* General functions for the WDB TUI.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -38,6 +38,7 @@
 #include "symtab.h"
 #include "source.h"
 #include "terminal.h"
+#include "top.h"
 
 #include <ctype.h>
 #include <signal.h>
@@ -302,7 +303,8 @@ static int
 tui_rl_startup_hook (void)
 {
   rl_already_prompted = 1;
-  if (tui_current_key_mode != TUI_COMMAND_MODE && immediate_quit == 0)
+  if (tui_current_key_mode != TUI_COMMAND_MODE
+      && !gdb_in_secondary_prompt_p (current_ui))
     tui_set_key_mode (TUI_SINGLE_KEY_MODE);
   tui_redisplay_readline ();
   return 0;
@@ -396,8 +398,6 @@ gdb_getenv_term (void)
 void
 tui_enable (void)
 {
-  struct interp *interp;
-
   if (tui_active)
     return;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-command.c ./gdb/tui/tui-command.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-command.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-command.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Specific command window processing.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-command.h ./gdb/tui/tui-command.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-command.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-command.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Specific command window processing.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-data.c ./gdb/tui/tui-data.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-data.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-data.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI data manipulation routines.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -41,7 +41,7 @@ static struct tui_gen_win_info exec_info
 static struct tui_win_info *src_win_list[2];
 static struct tui_list source_windows = {src_win_list, 0};
 static int default_tab_len = DEFAULT_TAB_LEN;
-static struct tui_win_info *win_with_focus = (struct tui_win_info *) NULL;
+static struct tui_win_info *win_with_focus = NULL;
 static struct tui_layout_def layout_def = {
   SRC_WIN,			/* DISPLAY_MODE */
   FALSE};			/* SPLIT */
@@ -192,7 +192,7 @@ void
 tui_add_to_source_windows (struct tui_win_info *win_info)
 {
   if (source_windows.count < 2)
-    source_windows.list[source_windows.count++] = (void *) win_info;
+    source_windows.list[source_windows.count++] = win_info;
 }
 
 
@@ -212,8 +212,7 @@ tui_clear_win_detail (struct tui_win_inf
 	  win_info->detail.source_info.horizontal_offset = 0;
 	  break;
 	case CMD_WIN:
-	  win_info->detail.command_info.cur_line =
-	    win_info->detail.command_info.curch = 0;
+	  wmove (win_info->generic.handle, 0, 0);
 	  break;
 	case DATA_WIN:
 	  win_info->detail.data_display_info.data_content =
@@ -316,7 +315,7 @@ struct tui_win_info *
 tui_next_win (struct tui_win_info *cur_win)
 {
   int type = cur_win->generic.type;
-  struct tui_win_info *next_win = (struct tui_win_info *) NULL;
+  struct tui_win_info *next_win = NULL;
 
   if (cur_win->generic.type == CMD_WIN)
     type = SRC_WIN;
@@ -346,7 +345,7 @@ struct tui_win_info *
 tui_prev_win (struct tui_win_info *cur_win)
 {
   int type = cur_win->generic.type;
-  struct tui_win_info *prev = (struct tui_win_info *) NULL;
+  struct tui_win_info *prev = NULL;
 
   if (cur_win->generic.type == SRC_WIN)
     type = CMD_WIN;
@@ -374,7 +373,7 @@ tui_prev_win (struct tui_win_info *cur_w
 struct tui_win_info *
 tui_partial_win_by_name (char *name)
 {
-  struct tui_win_info *win_info = (struct tui_win_info *) NULL;
+  struct tui_win_info *win_info = NULL;
 
   if (name != (char *) NULL)
     {
@@ -384,7 +383,8 @@ tui_partial_win_by_name (char *name)
 	{
           if (tui_win_list[i] != 0)
             {
-              char *cur_name = tui_win_name (&tui_win_list[i]->generic);
+              const char *cur_name =
+		tui_win_name (&tui_win_list[i]->generic);
 
               if (strlen (name) <= strlen (cur_name)
 		  && startswith (cur_name, name))
@@ -399,10 +399,10 @@ tui_partial_win_by_name (char *name)
 
 
 /* Answer the name of the window.  */
-char *
-tui_win_name (struct tui_gen_win_info *win_info)
+const char *
+tui_win_name (const struct tui_gen_win_info *win_info)
 {
-  char *name = (char *) NULL;
+  const char *name = NULL;
 
   switch (win_info->type)
     {
@@ -439,9 +439,9 @@ tui_initialize_static_data (void)
 struct tui_gen_win_info *
 tui_alloc_generic_win_info (void)
 {
-  struct tui_gen_win_info *win;
+  struct tui_gen_win_info *win = XNEW (struct tui_gen_win_info);
 
-  if ((win = XNEW (struct tui_gen_win_info)) != NULL)
+  if (win != NULL)
     tui_init_generic_part (win);
 
   return win;
@@ -458,7 +458,7 @@ tui_init_generic_part (struct tui_gen_wi
     win->viewport_height =
     win->content_size =
     win->last_visible_line = 0;
-  win->handle = (WINDOW *) NULL;
+  win->handle = NULL;
   win->content = NULL;
   win->content_in_use =
     win->is_visible = FALSE;
@@ -477,7 +477,7 @@ init_content_element (struct tui_win_ele
     {
     case SRC_WIN:
     case DISASSEM_WIN:
-      element->which_element.source.line = (char *) NULL;
+      element->which_element.source.line = NULL;
       element->which_element.source.line_or_addr.loa = LOA_LINE;
       element->which_element.source.line_or_addr.u.line_no = 0;
       element->which_element.source.is_exec_point = FALSE;
@@ -491,15 +491,15 @@ init_content_element (struct tui_win_ele
       element->which_element.data_window.content_size = 1;
       break;
     case CMD_WIN:
-      element->which_element.command.line = (char *) NULL;
+      element->which_element.command.line = NULL;
       break;
     case DATA_ITEM_WIN:
-      element->which_element.data.name = (char *) NULL;
+      element->which_element.data.name = NULL;
       element->which_element.data.type = TUI_REGISTER;
       element->which_element.data.item_no = UNDEFINED_ITEM;
       element->which_element.data.value = NULL;
       element->which_element.data.highlight = FALSE;
-      element->which_element.data.content = (char*) NULL;
+      element->which_element.data.content = NULL;
       break;
     case LOCATOR_WIN:
       element->which_element.locator.full_name[0] =
@@ -545,8 +545,6 @@ init_win_info (struct tui_win_info *win_
       win_info->detail.data_display_info.current_group = 0;
       break;
     case CMD_WIN:
-      win_info->detail.command_info.cur_line = 0;
-      win_info->detail.command_info.curch = 0;
       break;
     default:
       win_info->detail.opaque = NULL;
@@ -558,9 +556,8 @@ init_win_info (struct tui_win_info *win_
 struct tui_win_info *
 tui_alloc_win_info (enum tui_win_type type)
 {
-  struct tui_win_info *win_info;
+  struct tui_win_info *win_info = XNEW (struct tui_win_info);
 
-  win_info = XNEW (struct tui_win_info);
   if (win_info != NULL)
     {
       win_info->generic.type = type;
@@ -576,36 +573,25 @@ tui_win_content
 tui_alloc_content (int num_elements, enum tui_win_type type)
 {
   tui_win_content content;
-  char *element_block_ptr;
+  struct tui_win_element *element_block_ptr;
   int i;
 
-  content = xmalloc (sizeof (struct tui_win_element *) *num_elements);
-  if (content != NULL)
-    {
-      /*
-       * All windows, except the data window, can allocate the
-       * elements in a chunk.  The data window cannot because items
-       * can be added/removed from the data display by the user at any
-       * time.
-       */
-      if (type != DATA_WIN)
-	{
-	  element_block_ptr =
-	    xmalloc (sizeof (struct tui_win_element) * num_elements);
-	  if (element_block_ptr != NULL)
-	    {
-	      for (i = 0; i < num_elements; i++)
-		{
-		  content[i] = (struct tui_win_element *) element_block_ptr;
-		  init_content_element (content[i], type);
-		  element_block_ptr += sizeof (struct tui_win_element);
-		}
-	    }
-	  else
-	    {
-	      xfree (content);
-	      content = (tui_win_content) NULL;
-	    }
+  content = XNEWVEC (struct tui_win_element *, num_elements);
+
+  /*
+   * All windows, except the data window, can allocate the
+   * elements in a chunk.  The data window cannot because items
+   * can be added/removed from the data display by the user at any
+   * time.
+   */
+  if (type != DATA_WIN)
+    {
+      element_block_ptr = XNEWVEC (struct tui_win_element, num_elements);
+      for (i = 0; i < num_elements; i++)
+	{
+	  content[i] = element_block_ptr;
+	  init_content_element (content[i], type);
+	  element_block_ptr++;
 	}
     }
 
@@ -636,9 +622,10 @@ tui_add_content_elements (struct tui_gen
     {
       for (i = index_start; (i < num_elements + index_start); i++)
 	{
-	  if ((element_ptr = XNEW (struct tui_win_element)) != NULL)
+	  element_ptr = XNEW (struct tui_win_element);
+	  if (element_ptr != NULL)
 	    {
-	      win_info->content[i] = (void *) element_ptr;
+	      win_info->content[i] = element_ptr;
 	      init_content_element (element_ptr, win_info->type);
 	      win_info->content_size++;
 	    }
@@ -667,7 +654,7 @@ tui_del_window (struct tui_win_info *win
       if (generic_win != (struct tui_gen_win_info *) NULL)
 	{
 	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = (WINDOW *) NULL;
+	  generic_win->handle = NULL;
 	  generic_win->is_visible = FALSE;
 	}
       if (win_info->detail.source_info.fullname)
@@ -679,7 +666,7 @@ tui_del_window (struct tui_win_info *win
       if (generic_win != (struct tui_gen_win_info *) NULL)
 	{
 	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = (WINDOW *) NULL;
+	  generic_win->handle = NULL;
 	  generic_win->is_visible = FALSE;
 	}
       break;
@@ -698,7 +685,7 @@ tui_del_window (struct tui_win_info *win
   if (win_info->generic.handle != (WINDOW *) NULL)
     {
       tui_delete_win (win_info->generic.handle);
-      win_info->generic.handle = (WINDOW *) NULL;
+      win_info->generic.handle = NULL;
       win_info->generic.is_visible = FALSE;
     }
 }
@@ -722,7 +709,7 @@ tui_free_window (struct tui_win_info *wi
       if (generic_win != (struct tui_gen_win_info *) NULL)
 	{
 	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = (WINDOW *) NULL;
+	  generic_win->handle = NULL;
 	  tui_free_win_content (generic_win);
 	}
       break;
@@ -751,7 +738,7 @@ tui_free_window (struct tui_win_info *wi
   if (win_info->generic.handle != (WINDOW *) NULL)
     {
       tui_delete_win (win_info->generic.handle);
-      win_info->generic.handle = (WINDOW *) NULL;
+      win_info->generic.handle = NULL;
       tui_free_win_content (&win_info->generic);
     }
   if (win_info->generic.title)
@@ -809,7 +796,7 @@ tui_del_data_windows (tui_win_content co
       if (generic_win != (struct tui_gen_win_info *) NULL)
 	{
 	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = (WINDOW *) NULL;
+	  generic_win->handle = NULL;
 	  generic_win->is_visible = FALSE;
 	}
     }
@@ -833,7 +820,7 @@ tui_free_data_content (tui_win_content c
       if (generic_win != (struct tui_gen_win_info *) NULL)
 	{
 	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = (WINDOW *) NULL;
+	  generic_win->handle = NULL;
 	  tui_free_win_content (generic_win);
 	}
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-data.h ./gdb/tui/tui-data.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-data.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-data.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI data manipulation routines.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -60,10 +60,10 @@ struct tui_gen_win_info
 #define NO_REGS_STRING          "[ Register Values Unavailable ]"
 #define NO_DATA_STRING          "[ No Data Values Displayed ]"
 #define MAX_CONTENT_COUNT       100
-#define SRC_NAME                "SRC"
-#define CMD_NAME                "CMD"
-#define DATA_NAME               "REGS"
-#define DISASSEM_NAME           "ASM"
+#define SRC_NAME                "src"
+#define CMD_NAME                "cmd"
+#define DATA_NAME               "regs"
+#define DISASSEM_NAME           "asm"
 #define TUI_NULL_STR            ""
 #define DEFAULT_HISTORY_COUNT	25
 #define BOX_WINDOW              TRUE
@@ -265,8 +265,6 @@ struct tui_source_info
 
 struct tui_command_info
 {
-  int cur_line;			/* The current line position.  */
-  int curch;			/* The current cursor position.  */
   int start_line;
 };
 
@@ -320,7 +318,7 @@ extern void tui_free_all_source_wins_con
 extern void tui_del_window (struct tui_win_info *);
 extern void tui_del_data_windows (tui_win_content, int);
 extern struct tui_win_info *tui_partial_win_by_name (char *);
-extern char *tui_win_name (struct tui_gen_win_info *);
+extern const char *tui_win_name (const struct tui_gen_win_info *);
 extern enum tui_layout_type tui_current_layout (void);
 extern void tui_set_current_layout_to (enum tui_layout_type);
 extern int tui_term_height (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-disasm.c ./gdb/tui/tui-disasm.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-disasm.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-disasm.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Disassembly display.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -54,10 +54,7 @@ static CORE_ADDR
 tui_disassemble (struct gdbarch *gdbarch, struct tui_asm_line *asm_lines,
 		 CORE_ADDR pc, int count)
 {
-  struct ui_file *gdb_dis_out;
-
-  /* Now init the ui_file structure.  */
-  gdb_dis_out = tui_sfileopen (256);
+  string_file gdb_dis_out;
 
   /* Now construct each line.  */
   for (; count > 0; count--, asm_lines++)
@@ -67,20 +64,19 @@ tui_disassemble (struct gdbarch *gdbarch
       if (asm_lines->insn)
         xfree (asm_lines->insn);
       
-      print_address (gdbarch, pc, gdb_dis_out);
+      print_address (gdbarch, pc, &gdb_dis_out);
       asm_lines->addr = pc;
-      asm_lines->addr_string = xstrdup (tui_file_get_strbuf (gdb_dis_out));
+      asm_lines->addr_string = xstrdup (gdb_dis_out.c_str ());
 
-      ui_file_rewind (gdb_dis_out);
+      gdb_dis_out.clear ();
 
-      pc = pc + gdb_print_insn (gdbarch, pc, gdb_dis_out, NULL);
+      pc = pc + gdb_print_insn (gdbarch, pc, &gdb_dis_out, NULL);
 
-      asm_lines->insn = xstrdup (tui_file_get_strbuf (gdb_dis_out));
+      asm_lines->insn = xstrdup (gdb_dis_out.c_str ());
 
       /* Reset the buffer to empty.  */
-      ui_file_rewind (gdb_dis_out);
+      gdb_dis_out.clear ();
     }
-  ui_file_delete (gdb_dis_out);
   return pc;
 }
 
@@ -99,8 +95,7 @@ tui_find_disassembly_address (struct gdb
   if (max_lines <= 1)
      return pc;
 
-  asm_lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
-                                         * max_lines);
+  asm_lines = XALLOCAVEC (struct tui_asm_line, max_lines);
   memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
 
   new_low = pc;
@@ -173,13 +168,13 @@ tui_set_disassem_content (struct gdbarch
   enum tui_status ret = TUI_FAILURE;
   int i;
   int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
-  int max_lines;
+  int max_lines, line_width;
   CORE_ADDR cur_pc;
   struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
   int tab_len = tui_default_tab_len ();
   struct tui_asm_line *asm_lines;
   int insn_pos;
-  int addr_size, max_size;
+  int addr_size, insn_size;
   char *line;
   
   if (pc == 0)
@@ -194,19 +189,19 @@ tui_set_disassem_content (struct gdbarch
   TUI_DISASM_WIN->detail.source_info.start_line_or_addr.u.addr = pc;
   cur_pc = locator->content[0]->which_element.locator.addr;
 
-  max_lines = TUI_DISASM_WIN->generic.height - 2;	/* Account for
-							   hilite.  */
+  /* Window size, excluding highlight box.  */
+  max_lines = TUI_DISASM_WIN->generic.height - 2;
+  line_width = TUI_DISASM_WIN->generic.width - 2;
 
   /* Get temporary table that will hold all strings (addr & insn).  */
-  asm_lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
-                                         * max_lines);
+  asm_lines = XALLOCAVEC (struct tui_asm_line, max_lines);
   memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
 
   tui_disassemble (gdbarch, asm_lines, pc, max_lines);
 
-  /* See what is the maximum length of an address and of a line.  */
+  /* Determine maximum address- and instruction lengths.  */
   addr_size = 0;
-  max_size = 0;
+  insn_size = 0;
   for (i = 0; i < max_lines; i++)
     {
       size_t len = strlen (asm_lines[i].addr_string);
@@ -214,16 +209,17 @@ tui_set_disassem_content (struct gdbarch
       if (len > addr_size)
         addr_size = len;
 
-      len = strlen (asm_lines[i].insn) + tab_len;
-      if (len > max_size)
-        max_size = len;
+      len = strlen (asm_lines[i].insn);
+      if (len > insn_size)
+	insn_size = len;
     }
-  max_size += addr_size + tab_len;
 
-  /* Allocate memory to create each line.  */
-  line = (char*) alloca (max_size);
+  /* Align instructions to the same column.  */
   insn_pos = (1 + (addr_size / tab_len)) * tab_len;
 
+  /* Allocate memory to create each line.  */
+  line = (char*) alloca (insn_pos + insn_size + 1);
+
   /* Now construct each line.  */
   for (i = 0; i < max_lines; i++)
     {
@@ -235,20 +231,15 @@ tui_set_disassem_content (struct gdbarch
       src = &element->which_element.source;
       strcpy (line, asm_lines[i].addr_string);
       cur_len = strlen (line);
-
-      /* Add spaces to make the instructions start on the same
-	 column.  */
-      while (cur_len < insn_pos)
-        {
-          strcat (line, " ");
-          cur_len++;
-        }
-
-      strcat (line, asm_lines[i].insn);
+      memset (line + cur_len, ' ', insn_pos - cur_len);
+      strcpy (line + insn_pos, asm_lines[i].insn);
 
       /* Now copy the line taking the offset into account.  */
       if (strlen (line) > offset)
-        strcpy (src->line, &line[offset]);
+	{
+	  strncpy (src->line, &line[offset], line_width);
+	  src->line[line_width] = '\0';
+	}
       else
         src->line[0] = '\0';
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-disasm.h ./gdb/tui/tui-disasm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-disasm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-disasm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Disassembly display.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-file.c ./gdb/tui/tui-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-file.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-file.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* UI_FILE - a generic STDIO like output stream.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,145 +17,14 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "ui-file.h"
 #include "tui/tui-file.h"
 #include "tui/tui-io.h"
 #include "tui/tui-command.h"
 #include "tui.h"
 
-/* A ``struct ui_file'' that is compatible with all the legacy
-   code.  */
-
-/* new */
-enum streamtype
-{
-  afile,
-  astring
-};
-
-/* new */
-struct tui_stream
-{
-  int *ts_magic;
-  enum streamtype ts_streamtype;
-  FILE *ts_filestream;
-  char *ts_strbuf;
-  int ts_buflen;
-};
-
-static ui_file_flush_ftype tui_file_flush;
-extern ui_file_fputs_ftype tui_file_fputs;
-static ui_file_isatty_ftype tui_file_isatty;
-static ui_file_rewind_ftype tui_file_rewind;
-static ui_file_put_ftype tui_file_put;
-static ui_file_delete_ftype tui_file_delete;
-static struct ui_file *tui_file_new (void);
-static int tui_file_magic;
-
-static struct ui_file *
-tui_file_new (void)
-{
-  struct tui_stream *tui = XNEW (struct tui_stream);
-  struct ui_file *file = ui_file_new ();
-
-  set_ui_file_data (file, tui, tui_file_delete);
-  set_ui_file_flush (file, tui_file_flush);
-  set_ui_file_fputs (file, tui_file_fputs);
-  set_ui_file_isatty (file, tui_file_isatty);
-  set_ui_file_rewind (file, tui_file_rewind);
-  set_ui_file_put (file, tui_file_put);
-  tui->ts_magic = &tui_file_magic;
-  return file;
-}
-
-static void
-tui_file_delete (struct ui_file *file)
-{
-  struct tui_stream *tmpstream = ui_file_data (file);
-
-  if (tmpstream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_delete: bad magic number"));
-  if ((tmpstream->ts_streamtype == astring) 
-      && (tmpstream->ts_strbuf != NULL))
-    {
-      xfree (tmpstream->ts_strbuf);
-    }
-  xfree (tmpstream);
-}
-
-struct ui_file *
-tui_fileopen (FILE *stream)
-{
-  struct ui_file *file = tui_file_new ();
-  struct tui_stream *tmpstream = ui_file_data (file);
-
-  tmpstream->ts_streamtype = afile;
-  tmpstream->ts_filestream = stream;
-  tmpstream->ts_strbuf = NULL;
-  tmpstream->ts_buflen = 0;
-  return file;
-}
-
-struct ui_file *
-tui_sfileopen (int n)
-{
-  struct ui_file *file = tui_file_new ();
-  struct tui_stream *tmpstream = ui_file_data (file);
-
-  tmpstream->ts_streamtype = astring;
-  tmpstream->ts_filestream = NULL;
-  if (n > 0)
-    {
-      tmpstream->ts_strbuf = xmalloc ((n + 1) * sizeof (char));
-      tmpstream->ts_strbuf[0] = '\0';
-    }
-  else
-    /* Do not allocate the buffer now.  The first time something is
-       printed one will be allocated by tui_file_adjust_strbuf().  */
-    tmpstream->ts_strbuf = NULL;
-  tmpstream->ts_buflen = n;
-  return file;
-}
-
-static int
-tui_file_isatty (struct ui_file *file)
-{
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_isatty: bad magic number"));
-  if (stream->ts_streamtype == afile)
-    return (isatty (fileno (stream->ts_filestream)));
-  else
-    return 0;
-}
-
-static void
-tui_file_rewind (struct ui_file *file)
-{
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_rewind: bad magic number"));
-  stream->ts_strbuf[0] = '\0';
-}
-
-static void
-tui_file_put (struct ui_file *file,
-	      ui_file_put_method_ftype *write,
-	      void *dest)
-{
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_put: bad magic number"));
-  if (stream->ts_streamtype == astring)
-    write (dest, stream->ts_strbuf, strlen (stream->ts_strbuf));
-}
+tui_file::tui_file (FILE *stream)
+  : stdio_file (stream)
+{}
 
 /* All TUI I/O sent to the *_filtered and *_unfiltered functions
    eventually ends up here.  The fputs_unfiltered_hook is primarily
@@ -164,90 +33,22 @@ tui_file_put (struct ui_file *file,
    gdb_stderr are sent to the hook.  Everything else is sent on to
    fputs to allow file I/O to be handled appropriately.  */
 
-/* FIXME: Should be broken up and moved to a TUI specific file.  */
-
 void
-tui_file_fputs (const char *linebuffer, struct ui_file *file)
+tui_file::puts (const char *linebuffer)
 {
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_streamtype == astring)
-    {
-      tui_file_adjust_strbuf (strlen (linebuffer), file);
-      strcat (stream->ts_strbuf, linebuffer);
-    }
-  else
-    {
-      tui_puts (linebuffer);
-      /* gdb_stdout is buffered, and the caller must gdb_flush it at
-	 appropriate times.  Other streams are not so buffered.  */
-      if (file != gdb_stdout)
-	tui_refresh_cmd_win ();
-    }
-}
-
-char *
-tui_file_get_strbuf (struct ui_file *file)
-{
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_get_strbuf: bad magic number"));
-  return (stream->ts_strbuf);
+  tui_puts (linebuffer);
+  /* gdb_stdout is buffered, and the caller must gdb_flush it at
+     appropriate times.  Other streams are not so buffered.  */
+  if (this != gdb_stdout)
+    tui_refresh_cmd_win ();
 }
 
-/* Adjust the length of the buffer by the amount necessary to
-   accomodate appending a string of length N to the buffer
-   contents.  */
 void
-tui_file_adjust_strbuf (int n, struct ui_file *file)
+tui_file::flush ()
 {
-  struct tui_stream *stream = ui_file_data (file);
-  int non_null_chars;
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_adjust_strbuf: bad magic number"));
-
-  if (stream->ts_streamtype != astring)
-    return;
-
-  if (stream->ts_strbuf)
-    {
-      /* There is already a buffer allocated.  */
-      non_null_chars = strlen (stream->ts_strbuf);
-
-      if (n > (stream->ts_buflen - non_null_chars - 1))
-	{
-	  stream->ts_buflen = n + non_null_chars + 1;
-	  stream->ts_strbuf = xrealloc (stream->ts_strbuf, stream->ts_buflen);
-	}
-    }
-  else
-    /* No buffer yet, so allocate one of the desired size.  */
-    stream->ts_strbuf = xmalloc ((n + 1) * sizeof (char));
-}
-
-static void
-tui_file_flush (struct ui_file *file)
-{
-  struct tui_stream *stream = ui_file_data (file);
-
-  if (stream->ts_magic != &tui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tui_file_flush: bad magic number"));
-
-  switch (stream->ts_streamtype)
-    {
-    case astring:
-      break;
-    case afile:
-      /* gdb_stdout is buffered.  Other files are always flushed on
-	 every write.  */
-      if (file == gdb_stdout)
-	tui_refresh_cmd_win ();
-      fflush (stream->ts_filestream);
-      break;
-    }
+  /* gdb_stdout is buffered.  Other files are always flushed on
+     every write.  */
+  if (this == gdb_stdout)
+    tui_refresh_cmd_win ();
+  stdio_file::flush ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-file.h ./gdb/tui/tui-file.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-file.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-file.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
-/* UI_FILE - a generic STDIO like output stream.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+/* TUI_FILE - a STDIO-like output stream for the TUI.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,9 +19,17 @@
 #ifndef TUI_FILE_H
 #define TUI_FILE_H
 
-extern struct ui_file *tui_fileopen (FILE *);
-extern struct ui_file *tui_sfileopen (int);
-extern char *tui_file_get_strbuf (struct ui_file *);
-extern void tui_file_adjust_strbuf (int, struct ui_file *);
+#include "ui-file.h"
+
+/* A STDIO-like output stream for the TUI.  */
+
+class tui_file : public stdio_file
+{
+public:
+  explicit tui_file (FILE *stream);
+
+  void flush () override;
+  void puts (const char *) override;
+};
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui.h ./gdb/tui/tui.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* External/Public TUI Header File.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -93,8 +93,6 @@ extern int tui_active;
 
 extern void tui_show_source (const char *fullname, int line);
 
-extern struct ui_out *tui_out_new (struct ui_file *stream);
-
 /* tui-layout.c */
 extern enum tui_status tui_set_layout_by_name (const char *);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-hooks.c ./gdb/tui/tui-hooks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-hooks.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-hooks.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* GDB hooks for TUI.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -54,8 +54,6 @@
    "gdb_curses.h".  */
 #include "readline/readline.h"
 
-int tui_target_has_run = 0;
-
 static void
 tui_new_objfile_hook (struct objfile* objfile)
 {
@@ -66,11 +64,18 @@ tui_new_objfile_hook (struct objfile* ob
 /* Prevent recursion of deprecated_register_changed_hook().  */
 static int tui_refreshing_registers = 0;
 
+/* Observer for the register_changed notification.  */
+
 static void
-tui_register_changed_hook (int regno)
+tui_register_changed (struct frame_info *frame, int regno)
 {
   struct frame_info *fi;
 
+  /* The frame of the register that was changed may differ from the selected
+     frame, but we only want to show the register values of the selected frame.
+     And even if the frames differ a register change made in one can still show
+     up in the other.  So we always use the selected frame here, and ignore
+     FRAME.  */
   fi = get_selected_frame (NULL);
   if (tui_refreshing_registers == 0)
     {
@@ -102,23 +107,6 @@ tui_event_modify_breakpoint (struct brea
   tui_update_all_breakpoint_info ();
 }
 
-/* Called when a command is about to proceed the inferior.  */
-
-static void
-tui_about_to_proceed (void)
-{
-  /* Leave tui mode (optional).  */
-#if 0
-  if (tui_active)
-    {
-      target_terminal_ours ();
-      endwin ();
-      target_terminal_inferior ();
-    }
-#endif
-  tui_target_has_run = 1;
-}
-
 /* Refresh TUI's frame and register information.  This is a hook intended to be
    used to update the screen after potential frame and register changes.
 
@@ -223,9 +211,9 @@ static struct observer *tui_bp_created_o
 static struct observer *tui_bp_deleted_observer;
 static struct observer *tui_bp_modified_observer;
 static struct observer *tui_inferior_exit_observer;
-static struct observer *tui_about_to_proceed_observer;
 static struct observer *tui_before_prompt_observer;
 static struct observer *tui_normal_stop_observer;
+static struct observer *tui_register_changed_observer;
 
 /* Install the TUI specific hooks.  */
 void
@@ -247,14 +235,12 @@ tui_install_hooks (void)
     = observer_attach_breakpoint_modified (tui_event_modify_breakpoint);
   tui_inferior_exit_observer
     = observer_attach_inferior_exit (tui_inferior_exit);
-  tui_about_to_proceed_observer
-    = observer_attach_about_to_proceed (tui_about_to_proceed);
   tui_before_prompt_observer
     = observer_attach_before_prompt (tui_before_prompt);
   tui_normal_stop_observer
     = observer_attach_normal_stop (tui_normal_stop);
-
-  deprecated_register_changed_hook = tui_register_changed_hook;
+  tui_register_changed_observer
+    = observer_attach_register_changed (tui_register_changed);
 }
 
 /* Remove the TUI specific hooks.  */
@@ -263,8 +249,6 @@ tui_remove_hooks (void)
 {
   deprecated_print_frame_info_listing_hook = 0;
   deprecated_query_hook = 0;
-  deprecated_register_changed_hook = 0;
-
   /* Remove our observers.  */
   observer_detach_breakpoint_created (tui_bp_created_observer);
   tui_bp_created_observer = NULL;
@@ -274,12 +258,12 @@ tui_remove_hooks (void)
   tui_bp_modified_observer = NULL;
   observer_detach_inferior_exit (tui_inferior_exit_observer);
   tui_inferior_exit_observer = NULL;
-  observer_detach_about_to_proceed (tui_about_to_proceed_observer);
-  tui_about_to_proceed_observer = NULL;
   observer_detach_before_prompt (tui_before_prompt_observer);
   tui_before_prompt_observer = NULL;
   observer_detach_normal_stop (tui_normal_stop_observer);
   tui_normal_stop_observer = NULL;
+  observer_detach_register_changed (tui_register_changed_observer);
+  tui_register_changed_observer = NULL;
 }
 
 void _initialize_tui_hooks (void);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-hooks.h ./gdb/tui/tui-hooks.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-hooks.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-hooks.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* External/Public TUI hools header file, for GDB the GNU debugger.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-interp.c ./gdb/tui/tui-interp.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-interp.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-interp.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI Interpreter definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "cli/cli-interp.h"
 #include "interps.h"
 #include "top.h"
 #include "event-top.h"
@@ -31,15 +32,36 @@
 #include "tui/tui-io.h"
 #include "infrun.h"
 #include "observer.h"
-
-static struct ui_out *tui_ui_out (struct interp *self);
+#include "gdbthread.h"
 
 /* Set to 1 when the TUI mode must be activated when we first start
    gdb.  */
 static int tui_start_enabled = 0;
 
-/* The TUI interpreter.  */
-static struct interp *tui_interp;
+class tui_interp final : public cli_interp_base
+{
+public:
+  explicit tui_interp (const char *name)
+    : cli_interp_base (name)
+  {}
+
+  void init (bool top_level) override;
+  void resume () override;
+  void suspend () override;
+  gdb_exception exec (const char *command_str) override;
+  ui_out *interp_ui_out () override;
+};
+
+/* Returns the INTERP if the INTERP is a TUI, and returns NULL
+   otherwise.  */
+
+static tui_interp *
+as_tui_interp (struct interp *interp)
+{
+  if (strcmp (interp_name (interp), INTERP_TUI) == 0)
+    return (tui_interp *) interp;
+  return NULL;
+}
 
 /* Cleanup the tui before exiting.  */
 
@@ -55,13 +77,43 @@ tui_exit (void)
    quiet (i.e., another interpreter is being run with
    interpreter-exec), print nothing.  */
 
+/* Observer for the normal_stop notification.  */
+
+static void
+tui_on_normal_stop (struct bpstats *bs, int print_frame)
+{
+  if (!print_frame)
+    return;
+
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *interp = top_level_interpreter ();
+      struct interp *tui = as_tui_interp (interp);
+      struct thread_info *thread;
+
+      if (tui == NULL)
+	continue;
+
+      thread = inferior_thread ();
+      if (should_print_stop_to_console (interp, thread))
+	print_stop_event (tui->interp_ui_out ());
+    }
+}
+
 /* Observer for the signal_received notification.  */
 
 static void
 tui_on_signal_received (enum gdb_signal siggnal)
 {
-  if (!interp_quiet_p (tui_interp))
-    print_signal_received_reason (tui_ui_out (tui_interp), siggnal);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      print_signal_received_reason (tui->interp_ui_out (), siggnal);
+    }
 }
 
 /* Observer for the end_stepping_range notification.  */
@@ -69,8 +121,15 @@ tui_on_signal_received (enum gdb_signal 
 static void
 tui_on_end_stepping_range (void)
 {
-  if (!interp_quiet_p (tui_interp))
-    print_end_stepping_range_reason (tui_ui_out (tui_interp));
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      print_end_stepping_range_reason (tui->interp_ui_out ());
+    }
 }
 
 /* Observer for the signal_exited notification.  */
@@ -78,8 +137,15 @@ tui_on_end_stepping_range (void)
 static void
 tui_on_signal_exited (enum gdb_signal siggnal)
 {
-  if (!interp_quiet_p (tui_interp))
-    print_signal_exited_reason (tui_ui_out (tui_interp), siggnal);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      print_signal_exited_reason (tui->interp_ui_out (), siggnal);
+    }
 }
 
 /* Observer for the exited notification.  */
@@ -87,8 +153,15 @@ tui_on_signal_exited (enum gdb_signal si
 static void
 tui_on_exited (int exitstatus)
 {
-  if (!interp_quiet_p (tui_interp))
-    print_exited_reason (tui_ui_out (tui_interp), exitstatus);
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      print_exited_reason (tui->interp_ui_out (), exitstatus);
+    }
 }
 
 /* Observer for the no_history notification.  */
@@ -96,8 +169,15 @@ tui_on_exited (int exitstatus)
 static void
 tui_on_no_history (void)
 {
-  if (!interp_quiet_p (tui_interp))
-    print_no_history_reason (tui_ui_out (tui_interp));
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      print_no_history_reason (tui->interp_ui_out ());
+    }
 }
 
 /* Observer for the sync_execution_done notification.  */
@@ -105,8 +185,12 @@ tui_on_no_history (void)
 static void
 tui_on_sync_execution_done (void)
 {
-  if (!interp_quiet_p (tui_interp))
-    display_gdb_prompt (NULL);
+  struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+  if (tui == NULL)
+    return;
+
+  display_gdb_prompt (NULL);
 }
 
 /* Observer for the command_error notification.  */
@@ -114,14 +198,48 @@ tui_on_sync_execution_done (void)
 static void
 tui_on_command_error (void)
 {
-  if (!interp_quiet_p (tui_interp))
-    display_gdb_prompt (NULL);
+  struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+  if (tui == NULL)
+    return;
+
+  display_gdb_prompt (NULL);
+}
+
+/* Observer for the user_selected_context_changed notification.  */
+
+static void
+tui_on_user_selected_context_changed (user_selected_what selection)
+{
+  struct thread_info *tp;
+
+  /* This event is suppressed.  */
+  if (cli_suppress_notification.user_selected_context)
+    return;
+
+  tp = find_thread_ptid (inferior_ptid);
+
+  SWITCH_THRU_ALL_UIS ()
+    {
+      struct interp *tui = as_tui_interp (top_level_interpreter ());
+
+      if (tui == NULL)
+	continue;
+
+      if (selection & USER_SELECTED_INFERIOR)
+	print_selected_inferior (tui->interp_ui_out ());
+
+      if (tp != NULL
+	  && ((selection & (USER_SELECTED_THREAD | USER_SELECTED_FRAME))))
+	print_selected_thread_frame (tui->interp_ui_out (), selection);
+
+    }
 }
 
 /* These implement the TUI interpreter.  */
 
-static void *
-tui_init (struct interp *self, int top_level)
+void
+tui_interp::init (bool top_level)
 {
   /* Install exit handler to leave the screen in a good shape.  */
   atexit (tui_exit);
@@ -132,55 +250,45 @@ tui_init (struct interp *self, int top_l
   tui_initialize_win ();
   if (ui_file_isatty (gdb_stdout))
     tui_initialize_readline ();
-
-  /* If changing this, remember to update cli-interp.c as well.  */
-  observer_attach_signal_received (tui_on_signal_received);
-  observer_attach_end_stepping_range (tui_on_end_stepping_range);
-  observer_attach_signal_exited (tui_on_signal_exited);
-  observer_attach_exited (tui_on_exited);
-  observer_attach_no_history (tui_on_no_history);
-  observer_attach_sync_execution_done (tui_on_sync_execution_done);
-  observer_attach_command_error (tui_on_command_error);
-
-  return NULL;
 }
 
-static int
-tui_resume (void *data)
+void
+tui_interp::resume ()
 {
+  struct ui *ui = current_ui;
   struct ui_file *stream;
 
   /* gdb_setup_readline will change gdb_stdout.  If the TUI was
      previously writing to gdb_stdout, then set it to the new
      gdb_stdout afterwards.  */
 
-  stream = cli_out_set_stream (tui_old_uiout, gdb_stdout);
+  stream = tui_old_uiout->set_stream (gdb_stdout);
   if (stream != gdb_stdout)
     {
-      cli_out_set_stream (tui_old_uiout, stream);
+      tui_old_uiout->set_stream (stream);
       stream = NULL;
     }
 
-  gdb_setup_readline ();
+  gdb_setup_readline (1);
+
+  ui->input_handler = command_line_handler;
 
   if (stream != NULL)
-    cli_out_set_stream (tui_old_uiout, gdb_stdout);
+    tui_old_uiout->set_stream (gdb_stdout);
 
   if (tui_start_enabled)
     tui_enable ();
-  return 1;
 }
 
-static int
-tui_suspend (void *data)
+void
+tui_interp::suspend ()
 {
   tui_start_enabled = tui_active;
   tui_disable ();
-  return 1;
 }
 
-static struct ui_out *
-tui_ui_out (struct interp *self)
+ui_out *
+tui_interp::interp_ui_out ()
 {
   if (tui_active)
     return tui_out;
@@ -188,31 +296,29 @@ tui_ui_out (struct interp *self)
     return tui_old_uiout;
 }
 
-static struct gdb_exception
-tui_exec (void *data, const char *command_str)
+gdb_exception
+tui_interp::exec (const char *command_str)
 {
   internal_error (__FILE__, __LINE__, _("tui_exec called"));
 }
 
+
+/* Factory for TUI interpreters.  */
+
+static struct interp *
+tui_interp_factory (const char *name)
+{
+  return new tui_interp (name);
+}
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 extern initialize_file_ftype _initialize_tui_interp;
 
 void
 _initialize_tui_interp (void)
 {
-  static const struct interp_procs procs = {
-    tui_init,
-    tui_resume,
-    tui_suspend,
-    tui_exec,
-    tui_ui_out,
-    NULL,
-    cli_command_loop
-  };
-
-  /* Create a default uiout builder for the TUI.  */
-  tui_interp = interp_new (INTERP_TUI, &procs);
-  interp_add (tui_interp);
+  interp_factory_register (INTERP_TUI, tui_interp_factory);
+
   if (interpreter_p && strcmp (interpreter_p, INTERP_TUI) == 0)
     tui_start_enabled = 1;
 
@@ -221,4 +327,16 @@ _initialize_tui_interp (void)
       xfree (interpreter_p);
       interpreter_p = xstrdup (INTERP_TUI);
     }
+
+  /* If changing this, remember to update cli-interp.c as well.  */
+  observer_attach_normal_stop (tui_on_normal_stop);
+  observer_attach_signal_received (tui_on_signal_received);
+  observer_attach_end_stepping_range (tui_on_end_stepping_range);
+  observer_attach_signal_exited (tui_on_signal_exited);
+  observer_attach_exited (tui_on_exited);
+  observer_attach_no_history (tui_on_no_history);
+  observer_attach_sync_execution_done (tui_on_sync_execution_done);
+  observer_attach_command_error (tui_on_command_error);
+  observer_attach_user_selected_context_changed
+    (tui_on_user_selected_context_changed);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-io.c ./gdb/tui/tui-io.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-io.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-io.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI support I/O functions.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -32,6 +32,7 @@
 #include "tui/tui-win.h"
 #include "tui/tui-wingeneral.h"
 #include "tui/tui-file.h"
+#include "tui/tui-out.h"
 #include "ui-out.h"
 #include "cli-out.h"
 #include <fcntl.h>
@@ -114,7 +115,7 @@ struct ui_out *tui_out;
 /* GDB output files in non-curses mode.  */
 static struct ui_file *tui_old_stdout;
 static struct ui_file *tui_old_stderr;
-struct ui_out *tui_old_uiout;
+cli_ui_out *tui_old_uiout;
 
 /* Readline previous hooks.  */
 static rl_getc_func_t *tui_old_rl_getc_function;
@@ -172,9 +173,9 @@ tui_puts (const char *string)
 	  /* Expand TABs, since ncurses on MS-Windows doesn't.  */
 	  if (c == '\t')
 	    {
-	      int line, col;
+	      int col;
 
-	      getyx (w, line, col);
+	      col = getcurx (w);
 	      do
 		{
 		  waddch (w, ' ');
@@ -187,10 +188,7 @@ tui_puts (const char *string)
       else if (c == '\n')
         tui_skip_line = -1;
     }
-  getyx (w, TUI_CMD_WIN->detail.command_info.cur_line,
-         TUI_CMD_WIN->detail.command_info.curch);
-  TUI_CMD_WIN->detail.command_info.start_line
-    = TUI_CMD_WIN->detail.command_info.cur_line;
+  TUI_CMD_WIN->detail.command_info.start_line = getcury (w);
 }
 
 /* Readline callback.
@@ -201,12 +199,12 @@ tui_redisplay_readline (void)
 {
   int prev_col;
   int height;
-  int col, line;
+  int col;
   int c_pos;
   int c_line;
   int in;
   WINDOW *w;
-  char *prompt;
+  const char *prompt;
   int start_line;
 
   /* Detect when we temporarily left SingleKey and now the readline
@@ -215,7 +213,7 @@ tui_redisplay_readline (void)
      The command could call prompt_for_continue and we must not
      restore SingleKey so that the prompt and normal keymap are used.  */
   if (tui_current_key_mode == TUI_ONE_COMMAND_MODE && rl_end == 0
-      && immediate_quit == 0)
+      && !gdb_in_secondary_prompt_p (current_ui))
     tui_set_key_mode (TUI_SINGLE_KEY_MODE);
 
   if (tui_current_key_mode == TUI_SINGLE_KEY_MODE)
@@ -233,7 +231,7 @@ tui_redisplay_readline (void)
   for (in = 0; prompt && prompt[in]; in++)
     {
       waddch (w, prompt[in]);
-      getyx (w, line, col);
+      col = getcurx (w);
       if (col <= prev_col)
         height++;
       prev_col = col;
@@ -259,7 +257,7 @@ tui_redisplay_readline (void)
       else if (c == '\t')
 	{
 	  /* Expand TABs, since ncurses on MS-Windows doesn't.  */
-	  getyx (w, line, col);
+	  col = getcurx (w);
 	  do
 	    {
 	      waddch (w, ' ');
@@ -271,24 +269,16 @@ tui_redisplay_readline (void)
           waddch (w, c);
 	}
       if (c == '\n')
-        {
-          getyx (w, TUI_CMD_WIN->detail.command_info.start_line,
-                 TUI_CMD_WIN->detail.command_info.curch);
-        }
-      getyx (w, line, col);
+	TUI_CMD_WIN->detail.command_info.start_line = getcury (w);
+      col = getcurx (w);
       if (col < prev_col)
         height++;
       prev_col = col;
     }
   wclrtobot (w);
-  getyx (w, TUI_CMD_WIN->detail.command_info.start_line,
-         TUI_CMD_WIN->detail.command_info.curch);
+  TUI_CMD_WIN->detail.command_info.start_line = getcury (w);
   if (c_line >= 0)
-    {
-      wmove (w, c_line, c_pos);
-      TUI_CMD_WIN->detail.command_info.cur_line = c_line;
-      TUI_CMD_WIN->detail.command_info.curch = c_pos;
-    }
+    wmove (w, c_line, c_pos);
   TUI_CMD_WIN->detail.command_info.start_line -= height - 1;
 
   wrefresh (w);
@@ -371,10 +361,11 @@ static void
 tui_mld_erase_entire_line (const struct match_list_displayer *displayer)
 {
   WINDOW *w = TUI_CMD_WIN->generic.handle;
+  int cur_y = getcury (w);
 
-  wmove (w, TUI_CMD_WIN->detail.command_info.cur_line, 0);
+  wmove (w, cur_y, 0);
   wclrtoeol (w);
-  wmove (w, TUI_CMD_WIN->detail.command_info.cur_line, 0);
+  wmove (w, cur_y, 0);
 }
 
 /* TUI version of displayer.beep.  */
@@ -469,7 +460,8 @@ tui_setup_io (int mode)
       /* Keep track of previous gdb output.  */
       tui_old_stdout = gdb_stdout;
       tui_old_stderr = gdb_stderr;
-      tui_old_uiout = current_uiout;
+      tui_old_uiout = dynamic_cast<cli_ui_out *> (current_uiout);
+      gdb_assert (tui_old_uiout != nullptr);
 
       /* Reconfigure gdb output.  */
       gdb_stdout = tui_stdout;
@@ -521,10 +513,6 @@ tui_cont_sig (int sig)
       /* Force a refresh of the screen.  */
       tui_refresh_all_win ();
 
-      /* Update cursor position on the screen.  */
-      wmove (TUI_CMD_WIN->generic.handle,
-             TUI_CMD_WIN->detail.command_info.start_line,
-             TUI_CMD_WIN->detail.command_info.curch);
       wrefresh (TUI_CMD_WIN->generic.handle);
     }
   signal (sig, tui_cont_sig);
@@ -540,8 +528,8 @@ tui_initialize_io (void)
 #endif
 
   /* Create tui output streams.  */
-  tui_stdout = tui_fileopen (stdout);
-  tui_stderr = tui_fileopen (stderr);
+  tui_stdout = new tui_file (stdout);
+  tui_stderr = new tui_file (stderr);
   tui_out = tui_out_new (tui_stdout);
 
   /* Create the default UI.  */
@@ -599,9 +587,9 @@ tui_getc (FILE *fp)
          with empty lines with gdb prompt at beginning.  Instead of that,
          stay on the same line but provide a visual effect to show the
          user we recognized the command.  */
-      if (rl_end == 0)
+      if (rl_end == 0 && !gdb_in_secondary_prompt_p (current_ui))
         {
-          wmove (w, TUI_CMD_WIN->detail.command_info.cur_line, 0);
+	  wmove (w, getcury (w), 0);
 
           /* Clear the line.  This will blink the gdb prompt since
              it will be redrawn at the same line.  */
@@ -614,25 +602,23 @@ tui_getc (FILE *fp)
 	  /* Move cursor to the end of the command line before emitting the
 	     newline.  We need to do so because when ncurses outputs a newline
 	     it truncates any text that appears past the end of the cursor.  */
-	  int px = TUI_CMD_WIN->detail.command_info.curch;
-	  int py = TUI_CMD_WIN->detail.command_info.cur_line;
+	  int px, py;
+	  getyx (w, py, px);
 	  px += rl_end - rl_point;
 	  py += px / TUI_CMD_WIN->generic.width;
 	  px %= TUI_CMD_WIN->generic.width;
 	  wmove (w, py, px);
-	  waddch (w, ch);
+	  tui_putc ('\n');
         }
     }
   
   /* Handle prev/next/up/down here.  */
   ch = tui_dispatch_ctrl_char (ch);
   
-  if (ch == '\n' || ch == '\r' || ch == '\f')
-    TUI_CMD_WIN->detail.command_info.curch = 0;
   if (ch == KEY_BACKSPACE)
     return '\b';
 
-  if (async_command_editing_p && key_is_start_sequence (ch))
+  if (current_ui->command_editing && key_is_start_sequence (ch))
     {
       int ch_pending;
 
@@ -687,7 +673,7 @@ tui_expand_tabs (const char *string, int
     }
 
   /* Allocate the copy.  */
-  ret = q = xmalloc (strlen (string) + n_adjust + 1);
+  ret = q = (char *) xmalloc (strlen (string) + n_adjust + 1);
 
   /* 2. Copy the original string while replacing TABs with spaces.  */
   for (ncol = col, s = string; s; )
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-io.h ./gdb/tui/tui-io.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-io.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-io.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI support I/O functions.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -23,6 +23,7 @@
 #define TUI_IO_H
 
 struct ui_out;
+class cli_ui_out;
 
 /* Print the string in the curses command window.  */
 extern void tui_puts (const char *);
@@ -45,7 +46,7 @@ extern void tui_redisplay_readline (void
 extern char *tui_expand_tabs (const char *, int);
 
 extern struct ui_out *tui_out;
-extern struct ui_out *tui_old_uiout;
+extern cli_ui_out *tui_old_uiout;
 
 extern int key_is_start_sequence (int ch);
 extern int key_is_end_sequence (int ch);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-layout.c ./gdb/tui/tui-layout.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-layout.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-layout.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI layout window management.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -550,13 +550,14 @@ static void
 make_command_window (struct tui_win_info **win_info_ptr, 
 		     int height, int origin_y)
 {
-  *win_info_ptr = init_and_make_win (*win_info_ptr,
-				     CMD_WIN,
-				     height,
-				     tui_term_width (),
-				     0,
-				     origin_y,
-				     DONT_BOX_WINDOW);
+  *win_info_ptr
+    = (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+						 CMD_WIN,
+						 height,
+						 tui_term_width (),
+						 0,
+						 origin_y,
+						 DONT_BOX_WINDOW);
 
   (*win_info_ptr)->can_highlight = FALSE;
 }
@@ -590,13 +591,14 @@ static void
 make_data_window (struct tui_win_info **win_info_ptr, 
 		  int height, int origin_y)
 {
-  *win_info_ptr = init_and_make_win (*win_info_ptr,
-				     DATA_WIN,
-				     height,
-				     tui_term_width (),
-				     0,
-				     origin_y,
-				     BOX_WINDOW);
+  *win_info_ptr
+    = (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+						 DATA_WIN,
+						 height,
+						 tui_term_width (),
+						 0,
+						 origin_y,
+						 BOX_WINDOW);
 }
 
 
@@ -662,13 +664,15 @@ show_source_disasm_command (void)
 	  if (TUI_DISASM_WIN == NULL)
 	    {
 	      make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
-	      locator = init_and_make_win (locator,
-					   LOCATOR_WIN,
-					   2 /* 1 */ ,
-					   tui_term_width (),
-					   0,
-					   (src_height + asm_height) - 1,
-					   DONT_BOX_WINDOW);
+	      locator
+		= ((struct tui_gen_win_info *)
+		   init_and_make_win (locator,
+				      LOCATOR_WIN,
+				      2 /* 1 */ ,
+				      tui_term_width (),
+				      0,
+				      (src_height + asm_height) - 1,
+				      DONT_BOX_WINDOW));
 	    }
 	  else
 	    {
@@ -754,13 +758,15 @@ show_data (enum tui_layout_type new_layo
 	make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
       else
 	make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
-      locator = init_and_make_win (locator,
-				   LOCATOR_WIN,
-				   2 /* 1 */ ,
-				   tui_term_width (),
-				   0,
-				   total_height - 1,
-				   DONT_BOX_WINDOW);
+      locator
+	= ((struct tui_gen_win_info *)
+	   init_and_make_win (locator,
+			      LOCATOR_WIN,
+			      2 /* 1 */ ,
+			      tui_term_width (),
+			      0,
+			      total_height - 1,
+			      DONT_BOX_WINDOW));
     }
   else
     {
@@ -863,29 +869,33 @@ make_source_or_disasm_window (struct tui
 			      enum tui_win_type type,
 			      int height, int origin_y)
 {
-  struct tui_gen_win_info *execution_info = (struct tui_gen_win_info *) NULL;
+  struct tui_gen_win_info *execution_info = NULL;
 
   /* Create the exeuction info window.  */
   if (type == SRC_WIN)
     execution_info = tui_source_exec_info_win_ptr ();
   else
     execution_info = tui_disassem_exec_info_win_ptr ();
-  execution_info = init_and_make_win (execution_info,
-				      EXEC_INFO_WIN,
-				      height,
-				      3,
-				      0,
-				      origin_y,
-				      DONT_BOX_WINDOW);
+  execution_info
+    = ((struct tui_gen_win_info *)
+       init_and_make_win (execution_info,
+			  EXEC_INFO_WIN,
+			  height,
+			  3,
+			  0,
+			  origin_y,
+			  DONT_BOX_WINDOW));
 
   /* Now create the source window.  */
-  *win_info_ptr = init_and_make_win (*win_info_ptr,
-				     type,
-				     height,
-				     tui_term_width () - execution_info->width,
-				     execution_info->width,
-				     origin_y,
-				     BOX_WINDOW);
+  *win_info_ptr
+    = ((struct tui_win_info *)
+       init_and_make_win (*win_info_ptr,
+			  type,
+			  height,
+			  tui_term_width () - execution_info->width,
+			  execution_info->width,
+			  origin_y,
+			  BOX_WINDOW));
 
   (*win_info_ptr)->detail.source_info.execution_info = execution_info;
 }
@@ -918,13 +928,15 @@ show_source_or_disasm_and_command (enum 
 	    make_source_window (win_info_ptr, src_height - 1, 0);
 	  else
 	    make_disasm_window (win_info_ptr, src_height - 1, 0);
-	  locator = init_and_make_win (locator,
-				       LOCATOR_WIN,
-				       2 /* 1 */ ,
-				       tui_term_width (),
-				       0,
-				       src_height - 1,
-				       DONT_BOX_WINDOW);
+	  locator
+	    = ((struct tui_gen_win_info *)
+	       init_and_make_win (locator,
+				  LOCATOR_WIN,
+				  2 /* 1 */ ,
+				  tui_term_width (),
+				  0,
+				  src_height - 1,
+				  DONT_BOX_WINDOW));
 	}
       else
 	{
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-layout.h ./gdb/tui/tui-layout.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-layout.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-layout.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI layout window management.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-out.c ./gdb/tui/tui-out.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-out.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-out.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Output generating routines for GDB CLI.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
    Written by Fernando Nasser for Cygnus.
@@ -22,156 +22,101 @@
 
 #include "defs.h"
 #include "ui-out.h"
-#include "cli-out.h"
+#include "tui-out.h"
 #include "tui.h"
-struct tui_ui_out_data
-  {
-    struct cli_ui_out_data base;
-
-    int line;
-    int start_of_line;
-  };
-typedef struct tui_ui_out_data tui_out_data;
-
-/* This is the TUI ui-out implementation functions vector.  It is
-   initialized below in _initialize_tui_out, inheriting the CLI
-   version, and overriding a few methods.  */
-
-static struct ui_out_impl tui_ui_out_impl;
 
 /* Output an int field.  */
 
-static void
-tui_field_int (struct ui_out *uiout, 
-	       int fldno, int width,
-	       enum ui_align alignment,
-	       const char *fldname, 
-	       int value)
+void
+tui_ui_out::do_field_int (int fldno, int width, ui_align alignment,
+			  const char *fldname, int value)
 {
-  tui_out_data *data = ui_out_data (uiout);
-
-  if (data->base.suppress_output)
+  if (suppress_output ())
     return;
 
   /* Don't print line number, keep it for later.  */
-  if (data->start_of_line == 0 && strcmp (fldname, "line") == 0)
+  if (m_start_of_line == 0 && strcmp (fldname, "line") == 0)
     {
-      data->start_of_line ++;
-      data->line = value;
+      m_start_of_line++;
+      m_line = value;
       return;
     }
-  data->start_of_line ++;
+  m_start_of_line++;
 
-  (*cli_ui_out_impl.field_int) (uiout, fldno,
-				width, alignment, fldname, value);
+  cli_ui_out::do_field_int (fldno, width, alignment, fldname, value);
 }
 
 /* Other cli_field_* end up here so alignment and field separators are
    both handled by tui_field_string.  */
 
-static void
-tui_field_string (struct ui_out *uiout,
-		  int fldno, int width,
-		  enum ui_align align,
-		  const char *fldname,
-		  const char *string)
+void
+tui_ui_out::do_field_string (int fldno, int width, ui_align align,
+			     const char *fldname, const char *string)
 {
-  tui_out_data *data = ui_out_data (uiout);
-
-  if (data->base.suppress_output)
+  if (suppress_output ())
     return;
 
-  if (fldname && data->line > 0 && strcmp (fldname, "fullname") == 0)
+  if (fldname && m_line > 0 && strcmp (fldname, "fullname") == 0)
     {
-      data->start_of_line ++;
-      if (data->line > 0)
+      m_start_of_line++;
+      if (m_line > 0)
         {
-          tui_show_source (string, data->line);
+          tui_show_source (string, m_line);
         }
       return;
     }
   
-  data->start_of_line++;
+  m_start_of_line++;
 
-  (*cli_ui_out_impl.field_string) (uiout, fldno,
-				   width, align,
-				   fldname, string);
+  cli_ui_out::do_field_string (fldno, width, align, fldname, string);
 }
 
 /* This is the only field function that does not align.  */
 
-static void
-tui_field_fmt (struct ui_out *uiout, int fldno,
-	       int width, enum ui_align align,
-	       const char *fldname,
-	       const char *format,
-	       va_list args)
+void
+tui_ui_out::do_field_fmt (int fldno, int width, ui_align align,
+			  const char *fldname, const char *format,
+			  va_list args)
 {
-  tui_out_data *data = ui_out_data (uiout);
-
-  if (data->base.suppress_output)
+  if (suppress_output ())
     return;
 
-  data->start_of_line++;
+  m_start_of_line++;
 
-  (*cli_ui_out_impl.field_fmt) (uiout, fldno,
-				width, align,
-				fldname, format, args);
+  cli_ui_out::do_field_fmt (fldno, width, align, fldname, format, args);
 }
 
-static void
-tui_text (struct ui_out *uiout, const char *string)
+void
+tui_ui_out::do_text (const char *string)
 {
-  tui_out_data *data = ui_out_data (uiout);
-
-  if (data->base.suppress_output)
+  if (suppress_output ())
     return;
-  data->start_of_line ++;
-  if (data->line > 0)
+
+  m_start_of_line++;
+  if (m_line > 0)
     {
       if (strchr (string, '\n') != 0)
         {
-          data->line = -1;
-          data->start_of_line = 0;
+          m_line = -1;
+          m_start_of_line = 0;
         }
       return;
     }
   if (strchr (string, '\n'))
-    data->start_of_line = 0;
+    m_start_of_line = 0;
 
-  (*cli_ui_out_impl.text) (uiout, string);
+  cli_ui_out::do_text (string);
 }
 
-struct ui_out *
-tui_out_new (struct ui_file *stream)
+tui_ui_out::tui_ui_out (ui_file *stream)
+: cli_ui_out (stream, 0),
+  m_line (0),
+  m_start_of_line (-1)
 {
-  int flags = 0;
-
-  tui_out_data *data = XNEW (tui_out_data);
-
-  /* Initialize base "class".  */
-  cli_out_data_ctor (&data->base, stream);
-
-  /* Initialize our fields.  */
-  data->line = -1;
-  data->start_of_line = 0;
-
-  return ui_out_new (&tui_ui_out_impl, data, flags);
 }
 
-/* Standard gdb initialization hook.  */
-
-extern void _initialize_tui_out (void);
-
-void
-_initialize_tui_out (void)
+tui_ui_out *
+tui_out_new (struct ui_file *stream)
 {
-  /* Inherit the CLI version.  */
-  tui_ui_out_impl = cli_ui_out_impl;
-
-  /* Override a few methods.  */
-  tui_ui_out_impl.field_int = tui_field_int;
-  tui_ui_out_impl.field_string = tui_field_string;
-  tui_ui_out_impl.field_fmt = tui_field_fmt;
-  tui_ui_out_impl.text = tui_text;
+  return new tui_ui_out (stream);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-out.h ./gdb/tui/tui-out.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-out.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/tui/tui-out.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,48 @@
+/* Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef TUI_OUT_H
+#define TUI_OUT_H
+
+#include "cli-out.h"
+
+class tui_ui_out : public cli_ui_out
+{
+public:
+
+  explicit tui_ui_out (ui_file *stream);
+
+protected:
+
+  void do_field_int (int fldno, int width, ui_align align, const char *fldname,
+		  int value) override;
+  void do_field_string (int fldno, int width, ui_align align, const char *fldname,
+		     const char *string) override;
+  void do_field_fmt (int fldno, int width, ui_align align, const char *fldname,
+		  const char *format, va_list args) override
+    ATTRIBUTE_PRINTF (6,0);
+  void do_text (const char *string) override;
+
+private:
+
+  int m_line;
+  int m_start_of_line;
+};
+
+extern tui_ui_out *tui_out_new (struct ui_file *stream);
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-regs.c ./gdb/tui/tui-regs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-regs.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-regs.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display registers in window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -244,7 +244,7 @@ tui_show_register_group (struct reggroup
     {
       if (!refresh_values_only || allocated_here)
 	{
-	  TUI_DATA_WIN->generic.content = (void*) NULL;
+	  TUI_DATA_WIN->generic.content = NULL;
 	  TUI_DATA_WIN->generic.content_size = 0;
 	  tui_add_content_elements (&TUI_DATA_WIN->generic, nr_regs);
 	  display_info->regs_content
@@ -711,7 +711,7 @@ TUI command to control the register wind
 static void
 tui_restore_gdbout (void *ui)
 {
-  ui_file_delete (gdb_stdout);
+  delete gdb_stdout;
   gdb_stdout = (struct ui_file*) ui;
   pagination_enabled = 1;
 }
@@ -723,29 +723,26 @@ static char *
 tui_register_format (struct frame_info *frame, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct ui_file *stream;
   struct ui_file *old_stdout;
   struct cleanup *cleanups;
   char *p, *s;
   char *ret;
 
+  string_file stream;
+
   pagination_enabled = 0;
   old_stdout = gdb_stdout;
-  stream = tui_sfileopen (256);
-  gdb_stdout = stream;
+  gdb_stdout = &stream;
   cleanups = make_cleanup (tui_restore_gdbout, (void*) old_stdout);
-  gdbarch_print_registers_info (gdbarch, stream, frame, regnum, 1);
-
-  /* Save formatted output in the buffer.  */
-  p = tui_file_get_strbuf (stream);
+  gdbarch_print_registers_info (gdbarch, &stream, frame, regnum, 1);
 
   /* Remove the possible \n.  */
-  s = strrchr (p, '\n');
-  if (s && s[1] == 0)
-    *s = 0;
+  std::string &str = stream.string ();
+  if (!str.empty () && str.back () == '\n')
+    str.resize (str.size () - 1);
 
   /* Expand tabs into spaces, since ncurses on MS-Windows doesn't.  */
-  ret = tui_expand_tabs (p, 0);
+  ret = tui_expand_tabs (str.c_str (), 0);
 
   do_cleanups (cleanups);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-regs.h ./gdb/tui/tui-regs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-regs.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-regs.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display registers in window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-source.c ./gdb/tui/tui-source.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-source.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-source.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display source window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -62,7 +62,7 @@ tui_set_source_content (struct symtab *s
 	      if (!noerror)
 		{
 		  const char *filename = symtab_to_filename_for_display (s);
-		  char *name = alloca (strlen (filename) + 100);
+		  char *name = (char *) alloca (strlen (filename) + 100);
 
 		  sprintf (name, "%s:%d", filename, line_no);
 		  print_sys_errmsg (name, errno);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-source.h ./gdb/tui/tui-source.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-source.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-source.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display source window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-stack.c ./gdb/tui/tui-stack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-stack.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-stack.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display locator.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -68,12 +68,9 @@ tui_make_status_line (struct tui_locator
   int status_size;
   int i, proc_width;
   const char *pid_name;
-  const char *pc_buf;
   int target_width;
   int pid_width;
   int line_width;
-  int pc_width;
-  struct ui_file *pc_out;
 
   if (ptid_equal (inferior_ptid, null_ptid))
     pid_name = "No process";
@@ -102,12 +99,14 @@ tui_make_status_line (struct tui_locator
     line_width = MIN_LINE_WIDTH;
 
   /* Translate PC address.  */
-  pc_out = tui_sfileopen (128);
+  string_file pc_out;
+
   fputs_filtered (loc->gdbarch? paddress (loc->gdbarch, loc->addr) : "??",
-		  pc_out);
-  pc_buf = tui_file_get_strbuf (pc_out);
-  pc_width = strlen (pc_buf);
-  
+		  &pc_out);
+
+  const char *pc_buf = pc_out.c_str ();
+  int pc_width = pc_out.size ();
+
   /* First determine the amount of proc name width we have available.
      The +1 are for a space separator between fields.
      The -1 are to take into account the \0 counted by sizeof.  */
@@ -204,7 +203,6 @@ tui_make_status_line (struct tui_locator
     string[i] = ' ';
   string[status_size] = (char) 0;
 
-  ui_file_delete (pc_out);
   return string;
 }
 
@@ -215,21 +213,21 @@ static char*
 tui_get_function_from_frame (struct frame_info *fi)
 {
   static char name[256];
-  struct ui_file *stream = tui_sfileopen (256);
-  char *p;
+  string_file stream;
 
   print_address_symbolic (get_frame_arch (fi), get_frame_pc (fi),
-			  stream, demangle, "");
-  p = tui_file_get_strbuf (stream);
+			  &stream, demangle, "");
 
   /* Use simple heuristics to isolate the function name.  The symbol
      can be demangled and we can have function parameters.  Remove
      them because the status line is too short to display them.  */
-  if (*p == '<')
-    p++;
-  strncpy (name, p, sizeof (name) - 1);
+  const char *d = stream.c_str ();
+  if (*d == '<')
+    d++;
+  strncpy (name, d, sizeof (name) - 1);
   name[sizeof (name) - 1] = 0;
-  p = strchr (name, '(');
+
+  char *p = strchr (name, '(');
   if (!p)
     p = strchr (name, '>');
   if (p)
@@ -237,7 +235,6 @@ tui_get_function_from_frame (struct fram
   p = strchr (name, '+');
   if (p)
     *p = 0;
-  ui_file_delete (stream);
   return name;
 }
 
@@ -416,7 +413,7 @@ tui_show_frame_info (struct frame_info *
 	    {
 	      if (find_pc_partial_function (get_frame_pc (fi),
 					    (const char **) NULL,
-					    &low, (CORE_ADDR) 0) == 0)
+					    &low, NULL) == 0)
 		{
 		  /* There is no symbol available for current PC.  There is no
 		     safe way how to "disassemble backwards".  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-stack.h ./gdb/tui/tui-stack.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-stack.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-stack.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display locator.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-win.c ./gdb/tui/tui-win.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-win.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-win.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI window generic functions.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -354,12 +354,14 @@ tui_set_var_cmd (char *null_args, int fr
     tui_rehighlight_all ();
 }
 
-/* Complete possible window names to focus on.  TEXT is the complete text
-   entered so far, WORD is the word currently being completed.  */
+/* Generic window name completion function.  Complete window name pointed
+   to by TEXT and WORD.  If INCLUDE_NEXT_PREV_P is true then the special
+   window names 'next' and 'prev' will also be considered as possible
+   completions of the window name.  */
 
 static VEC (char_ptr) *
-focus_completer (struct cmd_list_element *ignore,
-		  const char *text, const char *word)
+window_name_completer (int include_next_prev_p,
+		       const char *text, const char *word)
 {
   VEC (const_char_ptr) *completion_name_vec = NULL;
   VEC (char_ptr) *matches_vec;
@@ -374,26 +376,9 @@ focus_completer (struct cmd_list_element
 	  || !tui_win_list[win_type]->generic.is_visible)
 	continue;
 
-      switch (win_type)
-	{
-	case SRC_WIN:
-	  completion_name = "src";
-	  break;
-	case DISASSEM_WIN:
-	  completion_name = "asm";
-	  break;
-	case DATA_WIN:
-	  completion_name = "regs";
-	  break;
-	case CMD_WIN:
-	  completion_name = "cmd";
-	  break;
-	default:
-	  break;
-	}
-
-      if (completion_name != NULL)
-	VEC_safe_push (const_char_ptr, completion_name_vec, completion_name);
+      completion_name = tui_win_name (&tui_win_list [win_type]->generic);
+      gdb_assert (completion_name != NULL);
+      VEC_safe_push (const_char_ptr, completion_name_vec, completion_name);
     }
 
   /* If no windows are considered visible then the TUI has not yet been
@@ -402,14 +387,17 @@ focus_completer (struct cmd_list_element
      default layout to SRC_COMMAND.  */
   if (VEC_length (const_char_ptr, completion_name_vec) == 0)
     {
-      VEC_safe_push (const_char_ptr, completion_name_vec, "src");
-      VEC_safe_push (const_char_ptr, completion_name_vec, "cmd");
+      VEC_safe_push (const_char_ptr, completion_name_vec, SRC_NAME);
+      VEC_safe_push (const_char_ptr, completion_name_vec, CMD_NAME);
     }
 
-  VEC_safe_push (const_char_ptr, completion_name_vec, "next");
-  VEC_safe_push (const_char_ptr, completion_name_vec, "prev");
-  VEC_safe_push (const_char_ptr, completion_name_vec, NULL);
+  if (include_next_prev_p)
+    {
+      VEC_safe_push (const_char_ptr, completion_name_vec, "next");
+      VEC_safe_push (const_char_ptr, completion_name_vec, "prev");
+    }
 
+  VEC_safe_push (const_char_ptr, completion_name_vec, NULL);
   matches_vec
     = complete_on_enum (VEC_address (const_char_ptr, completion_name_vec),
 			text, word);
@@ -419,6 +407,32 @@ focus_completer (struct cmd_list_element
   return matches_vec;
 }
 
+/* Complete possible window names to focus on.  TEXT is the complete text
+   entered so far, WORD is the word currently being completed.  */
+
+static VEC (char_ptr) *
+focus_completer (struct cmd_list_element *ignore,
+		  const char *text, const char *word)
+{
+  return window_name_completer (1, text, word);
+}
+
+/* Complete possible window names for winheight command.  TEXT is the
+   complete text entered so far, WORD is the word currently being
+   completed.  */
+
+static VEC (char_ptr) *
+winheight_completer (struct cmd_list_element *ignore,
+		     const char *text, const char *word)
+{
+  /* The first word is the window name.  That we can complete.  Subsequent
+     words can't be completed.  */
+  if (word != text)
+    return NULL;
+
+  return window_name_completer (0, text, word);
+}
+
 /* Function to initialize gdb commands, for tui window
    manipulation.  */
 
@@ -430,7 +444,7 @@ _initialize_tui_win (void)
 {
   static struct cmd_list_element *tui_setlist;
   static struct cmd_list_element *tui_showlist;
-  struct cmd_list_element *focus_cmd;
+  struct cmd_list_element *cmd;
 
   /* Define the classes of commands.
      They will appear in the help list in the reverse of this order.  */
@@ -448,8 +462,8 @@ _initialize_tui_win (void)
   add_com ("tabset", class_tui, tui_set_tab_width_command, _("\
 Set the width (in characters) of tab stops.\n\
 Usage: tabset <n>\n"));
-  add_com ("winheight", class_tui, tui_set_win_height_command, _("\
-Set the height of a specified window.\n\
+  cmd = add_com ("winheight", class_tui, tui_set_win_height_command, _("\
+Set or modify the height of a specified window.\n\
 Usage: winheight <win_name> [+ | -] <#lines>\n\
 Window names are:\n\
 src  : the source window\n\
@@ -457,9 +471,10 @@ cmd  : the command window\n\
 asm  : the disassembly window\n\
 regs : the register display\n"));
   add_com_alias ("wh", "winheight", class_tui, 0);
+  set_cmd_completer (cmd, winheight_completer);
   add_info ("win", tui_all_windows_info,
 	    _("List of all displayed windows.\n"));
-  focus_cmd = add_com ("focus", class_tui, tui_set_focus_command, _("\
+  cmd = add_com ("focus", class_tui, tui_set_focus_command, _("\
 Set focus to named window or next/prev window.\n\
 Usage: focus {<win> | next | prev}\n\
 Valid Window names are:\n\
@@ -468,7 +483,7 @@ asm  : the disassembly window\n\
 regs : the register display\n\
 cmd  : the command window\n"));
   add_com_alias ("fs", "focus", class_tui, 0);
-  set_cmd_completer (focus_cmd, focus_completer);
+  set_cmd_completer (cmd, focus_completer);
   add_com ("+", class_tui, tui_scroll_forward_command, _("\
 Scroll window forward.\n\
 Usage: + [win] [n]\n"));
@@ -885,7 +900,7 @@ tui_resize_all (void)
 	      && !tui_win_list[win_type]->generic.is_visible)
 	    {
 	      tui_free_window (tui_win_list[win_type]);
-	      tui_win_list[win_type] = (struct tui_win_info *) NULL;
+	      tui_win_list[win_type] = NULL;
 	    }
 	}
       /* Turn keypad back on, unless focus is in the command
@@ -1033,14 +1048,14 @@ tui_set_focus (char *arg, int from_tty)
     {
       char *buf_ptr = (char *) xstrdup (arg);
       int i;
-      struct tui_win_info *win_info = (struct tui_win_info *) NULL;
+      struct tui_win_info *win_info = NULL;
 
       for (i = 0; (i < strlen (buf_ptr)); i++)
-	buf_ptr[i] = toupper (arg[i]);
+	buf_ptr[i] = tolower (arg[i]);
 
-      if (subset_compare (buf_ptr, "NEXT"))
+      if (subset_compare (buf_ptr, "next"))
 	win_info = tui_next_win (tui_win_with_focus ());
-      else if (subset_compare (buf_ptr, "PREV"))
+      else if (subset_compare (buf_ptr, "prev"))
 	win_info = tui_prev_win (tui_win_with_focus ());
       else
 	win_info = tui_partial_win_by_name (buf_ptr);
@@ -1059,8 +1074,7 @@ The window name specified must be valid 
 	tui_refresh_data_win ();
       xfree (buf_ptr);
       printf_filtered (_("Focus set to %s window.\n"),
-		       tui_win_name ((struct tui_gen_win_info *)
-				     tui_win_with_focus ()));
+		       tui_win_name (&tui_win_with_focus ()->generic));
     }
   else
     warning (_("Incorrect Number of Arguments.\n%s"), FOCUS_USAGE);
@@ -1156,10 +1170,12 @@ tui_set_win_height (char *arg, int from_
     {
       char *buf = xstrdup (arg);
       char *buf_ptr = buf;
-      char *wname = (char *) NULL;
+      char *wname = NULL;
       int new_height, i;
       struct tui_win_info *win_info;
+      struct cleanup *old_chain;
 
+      old_chain = make_cleanup (xfree, buf);
       wname = buf_ptr;
       buf_ptr = strchr (buf_ptr, ' ');
       if (buf_ptr != (char *) NULL)
@@ -1168,7 +1184,7 @@ tui_set_win_height (char *arg, int from_
 
 	  /* Validate the window name.  */
 	  for (i = 0; i < strlen (wname); i++)
-	    wname[i] = toupper (wname[i]);
+	    wname[i] = tolower (wname[i]);
 	  win_info = tui_partial_win_by_name (wname);
 
 	  if (win_info == (struct tui_win_info *) NULL
@@ -1222,8 +1238,7 @@ The window name specified must be valid 
       else
 	printf_filtered (WIN_HEIGHT_USAGE);
 
-      if (buf != (char *) NULL)
-	xfree (buf);
+      do_cleanups (old_chain);
     }
   else
     printf_filtered (WIN_HEIGHT_USAGE);
@@ -1442,7 +1457,7 @@ make_invisible_and_set_new_height (struc
 	    &((struct tui_win_element *)
 	      win_info->generic.content[i])->which_element.data_window;
 	  tui_delete_win (gen_win_info->handle);
-	  gen_win_info->handle = (WINDOW *) NULL;
+	  gen_win_info->handle = NULL;
 	}
       break;
     default:
@@ -1510,8 +1525,6 @@ make_visible_with_new_height (struct tui
       tui_display_all_data ();
       break;
     case CMD_WIN:
-      win_info->detail.command_info.cur_line = 0;
-      win_info->detail.command_info.curch = 0;
 #ifdef HAVE_WRESIZE
       wresize (TUI_CMD_WIN->generic.handle,
 	       TUI_CMD_WIN->generic.height,
@@ -1520,9 +1533,7 @@ make_visible_with_new_height (struct tui
       mvwin (TUI_CMD_WIN->generic.handle,
 	     TUI_CMD_WIN->generic.origin.y,
 	     TUI_CMD_WIN->generic.origin.x);
-      wmove (win_info->generic.handle,
-	     win_info->detail.command_info.cur_line,
-	     win_info->detail.command_info.curch);
+      wmove (win_info->generic.handle, 0, 0);
       break;
     default:
       break;
@@ -1654,9 +1665,11 @@ parse_scrolling_args (char *arg, 
   if (arg != (char *) NULL)
     {
       char *buf, *buf_ptr;
+      struct cleanup *old_chain;
 
       /* Process the number of lines to scroll.  */
       buf = buf_ptr = xstrdup (arg);
+      old_chain = make_cleanup (xfree, buf);
       if (isdigit (*buf_ptr))
 	{
 	  char *num_str;
@@ -1690,7 +1703,7 @@ parse_scrolling_args (char *arg, 
 
 	      /* Validate the window name.  */
 	      for (i = 0; i < strlen (wname); i++)
-		wname[i] = toupper (wname[i]);
+		wname[i] = tolower (wname[i]);
 	    }
 	  else
 	    wname = "?";
@@ -1704,6 +1717,6 @@ The window name specified must be valid 
 	  else if (*win_to_scroll == TUI_CMD_WIN)
 	    *win_to_scroll = (tui_source_windows ())->list[0];
 	}
-      xfree (buf);
+      do_cleanups (old_chain);
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-windata.c ./gdb/tui/tui-windata.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-windata.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-windata.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Data/register window display.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -94,7 +94,7 @@ tui_delete_data_content_windows (void)
       data_item_win_ptr = &((tui_win_content)
 			    TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
       tui_delete_win (data_item_win_ptr->handle);
-      data_item_win_ptr->handle = (WINDOW *) NULL;
+      data_item_win_ptr->handle = NULL;
       data_item_win_ptr->is_visible = FALSE;
     }
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-windata.h ./gdb/tui/tui-windata.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-windata.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-windata.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Data/register window display.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-wingeneral.c ./gdb/tui/tui-wingeneral.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-wingeneral.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-wingeneral.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* General window behavior.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -194,7 +194,7 @@ make_visible (struct tui_gen_win_info *w
     {
       win_info->is_visible = FALSE;
       tui_delete_win (win_info->handle);
-      win_info->handle = (WINDOW *) NULL;
+      win_info->handle = NULL;
     }
 
   return;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-wingeneral.h ./gdb/tui/tui-wingeneral.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-wingeneral.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-wingeneral.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* General window behavior.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-win.h ./gdb/tui/tui-win.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-win.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-win.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI window generic functions.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-winsource.c ./gdb/tui/tui-winsource.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-winsource.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-winsource.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display source/assembly window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -273,7 +273,7 @@ static void
 tui_show_source_line (struct tui_win_info *win_info, int lineno)
 {
   struct tui_win_element *line;
-  int x, y;
+  int x;
 
   line = win_info->generic.content[lineno - 1];
   if (line->which_element.source.is_exec_point)
@@ -285,11 +285,11 @@ tui_show_source_line (struct tui_win_inf
     wattroff (win_info->generic.handle, A_STANDOUT);
 
   /* Clear to end of line but stop before the border.  */
-  getyx (win_info->generic.handle, y, x);
+  x = getcurx (win_info->generic.handle);
   while (x + 1 < win_info->generic.width)
     {
       waddch (win_info->generic.handle, ' ');
-      getyx (win_info->generic.handle, y, x);
+      x = getcurx (win_info->generic.handle);
     }
 }
 
@@ -604,8 +604,11 @@ tui_alloc_source_buffer (struct tui_win_
   char *src_line_buf;
   int i, line_width, max_lines;
 
-  max_lines = win_info->generic.height;	/* Less the highlight box.  */
-  line_width = win_info->generic.width - 1;
+  /* The window width/height includes the highlight box.  Determine actual
+     content dimensions, including string null-terminators.  */
+  max_lines = win_info->generic.height - 2;
+  line_width = win_info->generic.width - 2 + 1;
+
   /*
    * Allocate the buffer for the source lines.  Do this only once
    * since they will be re-used for all source displays.  The only
@@ -615,23 +618,8 @@ tui_alloc_source_buffer (struct tui_win_
     {
       src_line_buf = (char *) 
 	xmalloc ((max_lines * line_width) * sizeof (char));
-      if (src_line_buf == (char *) NULL)
-	{
-	  fputs_unfiltered ("Unable to Allocate Memory for "
-			    "Source or Disassembly Display.\n",
-			    gdb_stderr);
-	  return TUI_FAILURE;
-	}
       /* Allocate the content list.  */
       win_info->generic.content = tui_alloc_content (max_lines, SRC_WIN);
-      if (win_info->generic.content == NULL)
-	{
-	  xfree (src_line_buf);
-	  fputs_unfiltered ("Unable to Allocate Memory for "
-			    "Source or Disassembly Display.\n",
-			    gdb_stderr);
-	  return TUI_FAILURE;
-	}
       for (i = 0; i < max_lines; i++)
 	win_info->generic.content[i]->which_element.source.line
 	  = src_line_buf + (line_width * i);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-winsource.h ./gdb/tui/tui-winsource.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/tui/tui-winsource.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-winsource.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* TUI display source/assembly window.
 
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/typeprint.c ./gdb/typeprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/typeprint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/typeprint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Language independent support for printing types for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -87,7 +87,7 @@ struct typedef_hash_table
 static hashval_t
 hash_typedef_field (const void *p)
 {
-  const struct typedef_field *tf = p;
+  const struct typedef_field *tf = (const struct typedef_field *) p;
   struct type *t = check_typedef (tf->type);
 
   return htab_hash_string (TYPE_SAFE_NAME (t));
@@ -98,8 +98,8 @@ hash_typedef_field (const void *p)
 static int
 eq_typedef_field (const void *a, const void *b)
 {
-  const struct typedef_field *tfa = a;
-  const struct typedef_field *tfb = b;
+  const struct typedef_field *tfa = (const struct typedef_field *) a;
+  const struct typedef_field *tfb = (const struct typedef_field *) b;
 
   return types_equal (tfa->type, tfb->type);
 }
@@ -195,7 +195,7 @@ free_typedef_hash (struct typedef_hash_t
 static void
 do_free_typedef_hash (void *arg)
 {
-  free_typedef_hash (arg);
+  free_typedef_hash ((struct typedef_hash_table *) arg);
 }
 
 /* Return a new cleanup that frees TABLE.  */
@@ -211,7 +211,7 @@ make_cleanup_free_typedef_hash (struct t
 static int
 copy_typedef_hash_element (void **slot, void *nt)
 {
-  htab_t new_table = nt;
+  htab_t new_table = (htab_t) nt;
   void **new_slot;
 
   new_slot = htab_find_slot (new_table, *slot, INSERT);
@@ -242,7 +242,7 @@ copy_typedef_hash (struct typedef_hash_t
 static void
 do_free_global_table (void *arg)
 {
-  struct type_print_options *flags = arg;
+  struct type_print_options *flags = (struct type_print_options *) arg;
 
   free_typedef_hash (flags->global_typedefs);
   free_ext_lang_type_printers (flags->global_printers);
@@ -281,7 +281,7 @@ find_global_typedef (const struct type_p
   slot = htab_find_slot (flags->global_typedefs->table, &tf, INSERT);
   if (*slot != NULL)
     {
-      new_tf = *slot;
+      new_tf = (struct typedef_field *) *slot;
       return new_tf->name;
     }
 
@@ -297,8 +297,9 @@ find_global_typedef (const struct type_p
 
   if (applied != NULL)
     {
-      new_tf->name = obstack_copy0 (&flags->global_typedefs->storage, applied,
-				    strlen (applied));
+      new_tf->name
+	= (const char *) obstack_copy0 (&flags->global_typedefs->storage,
+					applied, strlen (applied));
       xfree (applied);
     }
 
@@ -319,7 +320,8 @@ find_typedef_in_hash (const struct type_
 
       tf.name = NULL;
       tf.type = t;
-      found = htab_find (flags->local_typedefs->table, &tf);
+      found = (struct typedef_field *) htab_find (flags->local_typedefs->table,
+						  &tf);
 
       if (found != NULL)
 	return found->name;
@@ -366,30 +368,22 @@ type_print (struct type *type, const cha
 /* Print TYPE to a string, returning it.  The caller is responsible for
    freeing the string.  */
 
-char *
+std::string
 type_to_string (struct type *type)
 {
-  char *s = NULL;
-  struct ui_file *stb;
-  struct cleanup *old_chain;
-
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
-
   TRY
     {
-      type_print (type, "", stb, -1);
-      s = ui_file_xstrdup (stb, NULL);
+      string_file stb;
+
+      type_print (type, "", &stb, -1);
+      return std::move (stb.string ());
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      s = NULL;
     }
   END_CATCH
 
-  do_cleanups (old_chain);
-
-  return s;
+  return {};
 }
 
 /* Print type of EXP, or last thing in value history if EXP == NULL.
@@ -398,13 +392,12 @@ type_to_string (struct type *type)
 static void
 whatis_exp (char *exp, int show)
 {
-  struct expression *expr;
   struct value *val;
   struct cleanup *old_chain;
   struct type *real_type = NULL;
   struct type *type;
   int full = 0;
-  int top = -1;
+  LONGEST top = -1;
   int using_enc = 0;
   struct value_print_options opts;
   struct type_print_options flags = default_ptype_flags;
@@ -449,9 +442,8 @@ whatis_exp (char *exp, int show)
 	  exp = skip_spaces (exp);
 	}
 
-      expr = parse_expression (exp);
-      make_cleanup (free_current_contents, &expr);
-      val = evaluate_type (expr);
+      expression_up expr = parse_expression (exp);
+      val = evaluate_type (expr.get ());
     }
   else
     val = access_value_history (0);
@@ -524,7 +516,7 @@ print_type_scalar (struct type *type, LO
   unsigned int i;
   unsigned len;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -598,13 +590,10 @@ maintenance_print_type (char *type_name,
 {
   struct value *val;
   struct type *type;
-  struct cleanup *old_chain;
-  struct expression *expr;
 
   if (type_name != NULL)
     {
-      expr = parse_expression (type_name);
-      old_chain = make_cleanup (free_current_contents, &expr);
+      expression_up expr = parse_expression (type_name);
       if (expr->elts[0].opcode == OP_TYPE)
 	{
 	  /* The user expression names a type directly, just use that type.  */
@@ -614,14 +603,13 @@ maintenance_print_type (char *type_name,
 	{
 	  /* The user expression may name a type indirectly by naming an
 	     object of that type.  Find that indirectly named type.  */
-	  val = evaluate_type (expr);
+	  val = evaluate_type (expr.get ());
 	  type = value_type (val);
 	}
       if (type != NULL)
 	{
 	  recursive_dump_type (type, 0);
 	}
-      do_cleanups (old_chain);
     }
 }
 
@@ -725,3 +713,20 @@ Show printing of typedefs defined in cla
 			   show_print_type_typedefs,
 			   &setprinttypelist, &showprinttypelist);
 }
+
+/* Print <not allocated> status to stream STREAM.  */
+
+void
+val_print_not_allocated (struct ui_file *stream)
+{
+  fprintf_filtered (stream, _("<not allocated>"));
+}
+
+/* Print <not associated> status to stream STREAM.  */
+
+void
+val_print_not_associated (struct ui_file *stream)
+{
+  fprintf_filtered (stream, _("<not associated>"));
+}
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/typeprint.h ./gdb/typeprint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/typeprint.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/typeprint.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Language independent support for printing types for GDB, the GNU debugger.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -74,4 +74,8 @@ void c_type_print_varspec_suffix (struct
 void c_type_print_args (struct type *, struct ui_file *, int, enum language,
 			const struct type_print_options *);
 
+extern void val_print_not_allocated (struct ui_file *stream);
+
+extern void val_print_not_associated (struct ui_file *stream);
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-file.c ./gdb/ui-file.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-file.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/ui-file.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* UI_FILE - a generic STDIO like output stream.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,193 +25,80 @@
 #include "gdb_select.h"
 #include "filestuff.h"
 
-static ui_file_isatty_ftype null_file_isatty;
-static ui_file_write_ftype null_file_write;
-static ui_file_write_ftype null_file_write_async_safe;
-static ui_file_fputs_ftype null_file_fputs;
-static ui_file_read_ftype null_file_read;
-static ui_file_flush_ftype null_file_flush;
-static ui_file_delete_ftype null_file_delete;
-static ui_file_rewind_ftype null_file_rewind;
-static ui_file_put_ftype null_file_put;
-static ui_file_fseek_ftype null_file_fseek;
+null_file null_stream;
 
-struct ui_file
-  {
-    int *magic;
-    ui_file_flush_ftype *to_flush;
-    ui_file_write_ftype *to_write;
-    ui_file_write_async_safe_ftype *to_write_async_safe;
-    ui_file_fputs_ftype *to_fputs;
-    ui_file_read_ftype *to_read;
-    ui_file_delete_ftype *to_delete;
-    ui_file_isatty_ftype *to_isatty;
-    ui_file_rewind_ftype *to_rewind;
-    ui_file_put_ftype *to_put;
-    ui_file_fseek_ftype *to_fseek;
-    void *to_data;
-  };
-int ui_file_magic;
-
-struct ui_file *
-ui_file_new (void)
-{
-  struct ui_file *file = xmalloc (sizeof (struct ui_file));
+ui_file::ui_file ()
+{}
 
-  file->magic = &ui_file_magic;
-  set_ui_file_data (file, NULL, null_file_delete);
-  set_ui_file_flush (file, null_file_flush);
-  set_ui_file_write (file, null_file_write);
-  set_ui_file_write_async_safe (file, null_file_write_async_safe);
-  set_ui_file_fputs (file, null_file_fputs);
-  set_ui_file_read (file, null_file_read);
-  set_ui_file_isatty (file, null_file_isatty);
-  set_ui_file_rewind (file, null_file_rewind);
-  set_ui_file_put (file, null_file_put);
-  set_ui_file_fseek (file, null_file_fseek);
-  return file;
-}
+ui_file::~ui_file ()
+{}
 
 void
-ui_file_delete (struct ui_file *file)
+ui_file::printf (const char *format, ...)
 {
-  file->to_delete (file);
-  xfree (file);
-}
+  va_list args;
 
-static int
-null_file_isatty (struct ui_file *file)
-{
-  return 0;
+  va_start (args, format);
+  vfprintf_unfiltered (this, format, args);
+  va_end (args);
 }
 
-static void
-null_file_rewind (struct ui_file *file)
+void
+ui_file::putstr (const char *str, int quoter)
 {
-  return;
+  fputstr_unfiltered (str, quoter, this);
 }
 
-static void
-null_file_put (struct ui_file *file,
-	       ui_file_put_method_ftype *write,
-	       void *dest)
+void
+ui_file::putstrn (const char *str, int n, int quoter)
 {
-  return;
+  fputstrn_unfiltered (str, n, quoter, this);
 }
 
-static void
-null_file_flush (struct ui_file *file)
+int
+ui_file::putc (int c)
 {
-  return;
+  return fputc_unfiltered (c, this);
 }
 
-static void
-null_file_write (struct ui_file *file,
-		 const char *buf,
-		 long sizeof_buf)
+void
+ui_file::vprintf (const char *format, va_list args)
 {
-  if (file->to_fputs == null_file_fputs)
-    /* Both the write and fputs methods are null.  Discard the
-       request.  */
-    return;
-  else
-    {
-      /* The fputs method isn't null, slowly pass the write request
-         onto that.  FYI, this isn't as bad as it may look - the
-         current (as of 1999-11-07) printf_* function calls fputc and
-         fputc does exactly the below.  By having a write function it
-         is possible to clean up that code.  */
-      int i;
-      char b[2];
-
-      b[1] = '\0';
-      for (i = 0; i < sizeof_buf; i++)
-	{
-	  b[0] = buf[i];
-	  file->to_fputs (b, file);
-	}
-      return;
-    }
+  vfprintf_unfiltered (this, format, args);
 }
 
-static long
-null_file_read (struct ui_file *file,
-		char *buf,
-		long sizeof_buf)
-{
-  errno = EBADF;
-  return 0;
-}
-
-static void
-null_file_fputs (const char *buf, struct ui_file *file)
-{
-  if (file->to_write == null_file_write)
-    /* Both the write and fputs methods are null.  Discard the
-       request.  */
-    return;
-  else
-    {
-      /* The write method was implemented, use that.  */
-      file->to_write (file, buf, strlen (buf));
-    }
-}
+
 
-static void
-null_file_write_async_safe (struct ui_file *file,
-			    const char *buf,
-			    long sizeof_buf)
+void
+null_file::write (const char *buf, long sizeof_buf)
 {
-  return;
+  /* Discard the request.  */
 }
 
-static void
-null_file_delete (struct ui_file *file)
+void
+null_file::puts (const char *)
 {
-  return;
+  /* Discard the request.  */
 }
 
-static int
-null_file_fseek (struct ui_file *stream, long offset, int whence)
+void
+null_file::write_async_safe (const char *buf, long sizeof_buf)
 {
-  errno = EBADF;
-
-  return -1;
+  /* Discard the request.  */
 }
 
-void *
-ui_file_data (struct ui_file *file)
-{
-  if (file->magic != &ui_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("ui_file_data: bad magic number"));
-  return file->to_data;
-}
+
 
 void
 gdb_flush (struct ui_file *file)
 {
-  file->to_flush (file);
+  file->flush ();
 }
 
 int
 ui_file_isatty (struct ui_file *file)
 {
-  return file->to_isatty (file);
-}
-
-void
-ui_file_rewind (struct ui_file *file)
-{
-  file->to_rewind (file);
-}
-
-void
-ui_file_put (struct ui_file *file,
-	      ui_file_put_method_ftype *write,
-	      void *dest)
-{
-  file->to_put (file, write, dest);
+  return file->isatty ();
 }
 
 void
@@ -219,13 +106,7 @@ ui_file_write (struct ui_file *file,
 		const char *buf,
 		long length_buf)
 {
-  file->to_write (file, buf, length_buf);
-}
-
-void
-ui_file_write_for_put (void *data, const char *buffer, long length_buffer)
-{
-  ui_file_write (data, buffer, length_buffer);
+  file->write (buf, length_buf);
 }
 
 void
@@ -233,599 +114,215 @@ ui_file_write_async_safe (struct ui_file
 			  const char *buf,
 			  long length_buf)
 {
-  file->to_write_async_safe (file, buf, length_buf);
+  file->write_async_safe (buf, length_buf);
 }
 
 long
 ui_file_read (struct ui_file *file, char *buf, long length_buf)
 {
-  return file->to_read (file, buf, length_buf); 
-}
-
-int
-ui_file_fseek (struct ui_file *file, long offset, int whence)
-{
-  return file->to_fseek (file, offset, whence);
+  return file->read (buf, length_buf);
 }
 
 void
 fputs_unfiltered (const char *buf, struct ui_file *file)
 {
-  file->to_fputs (buf, file);
-}
-
-void
-set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush_ptr)
-{
-  file->to_flush = flush_ptr;
+  file->puts (buf);
 }
 
-void
-set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty_ptr)
-{
-  file->to_isatty = isatty_ptr;
-}
-
-void
-set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind_ptr)
-{
-  file->to_rewind = rewind_ptr;
-}
-
-void
-set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put_ptr)
-{
-  file->to_put = put_ptr;
-}
-
-void
-set_ui_file_write (struct ui_file *file,
-		    ui_file_write_ftype *write_ptr)
-{
-  file->to_write = write_ptr;
-}
-
-void
-set_ui_file_write_async_safe (struct ui_file *file,
-			      ui_file_write_async_safe_ftype *write_async_safe_ptr)
-{
-  file->to_write_async_safe = write_async_safe_ptr;
-}
-
-void
-set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read_ptr)
-{
-  file->to_read = read_ptr;
-}
-
-void
-set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs_ptr)
-{
-  file->to_fputs = fputs_ptr;
-}
+
 
-void
-set_ui_file_fseek (struct ui_file *file, ui_file_fseek_ftype *fseek_ptr)
-{
-  file->to_fseek = fseek_ptr;
-}
+string_file::~string_file ()
+{}
 
 void
-set_ui_file_data (struct ui_file *file, void *data,
-		  ui_file_delete_ftype *delete_ptr)
-{
-  file->to_data = data;
-  file->to_delete = delete_ptr;
-}
-
-/* ui_file utility function for converting a ``struct ui_file'' into
-   a memory buffer.  */
-
-struct accumulated_ui_file
-{
-  char *buffer;
-  long length;
-};
-
-static void
-do_ui_file_xstrdup (void *context, const char *buffer, long length)
-{
-  struct accumulated_ui_file *acc = context;
-
-  if (acc->buffer == NULL)
-    acc->buffer = xmalloc (length + 1);
-  else
-    acc->buffer = xrealloc (acc->buffer, acc->length + length + 1);
-  memcpy (acc->buffer + acc->length, buffer, length);
-  acc->length += length;
-  acc->buffer[acc->length] = '\0';
-}
-
-char *
-ui_file_xstrdup (struct ui_file *file, long *length)
-{
-  struct accumulated_ui_file acc;
-
-  acc.buffer = NULL;
-  acc.length = 0;
-  ui_file_put (file, do_ui_file_xstrdup, &acc);
-  if (acc.buffer == NULL)
-    acc.buffer = xstrdup ("");
-  if (length != NULL)
-    *length = acc.length;
-  return acc.buffer;
-}
-
-static void
-do_ui_file_obsavestring (void *context, const char *buffer, long length)
+string_file::write (const char *buf, long length_buf)
 {
-  struct obstack *obstack = (struct obstack *) context;
-
-  obstack_grow (obstack, buffer, length);
+  m_string.append (buf, length_buf);
 }
 
-char *
-ui_file_obsavestring (struct ui_file *file, struct obstack *obstack,
-		      long *length)
-{
-  ui_file_put (file, do_ui_file_obsavestring, obstack);
-  *length = obstack_object_size (obstack);
-  obstack_1grow (obstack, '\0');
-  return obstack_finish (obstack);
-}
 
-/* A pure memory based ``struct ui_file'' that can be used an output
-   buffer.  The buffers accumulated contents are available via
-   ui_file_put().  */
-
-struct mem_file
-  {
-    int *magic;
-    char *buffer;
-    int sizeof_buffer;
-    int length_buffer;
-  };
-
-static ui_file_rewind_ftype mem_file_rewind;
-static ui_file_put_ftype mem_file_put;
-static ui_file_write_ftype mem_file_write;
-static ui_file_delete_ftype mem_file_delete;
-static struct ui_file *mem_file_new (void);
-static int mem_file_magic;
-
-static struct ui_file *
-mem_file_new (void)
-{
-  struct mem_file *stream = XNEW (struct mem_file);
-  struct ui_file *file = ui_file_new ();
 
-  set_ui_file_data (file, stream, mem_file_delete);
-  set_ui_file_rewind (file, mem_file_rewind);
-  set_ui_file_put (file, mem_file_put);
-  set_ui_file_write (file, mem_file_write);
-  stream->magic = &mem_file_magic;
-  stream->buffer = NULL;
-  stream->sizeof_buffer = 0;
-  stream->length_buffer = 0;
-  return file;
-}
-
-static void
-mem_file_delete (struct ui_file *file)
+stdio_file::stdio_file (FILE *file, bool close_p)
 {
-  struct mem_file *stream = ui_file_data (file);
-
-  if (stream->magic != &mem_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mem_file_delete: bad magic number"));
-  if (stream->buffer != NULL)
-    xfree (stream->buffer);
-  xfree (stream);
+  set_stream (file);
+  m_close_p = close_p;
 }
 
-struct ui_file *
-mem_fileopen (void)
-{
-  return mem_file_new ();
-}
+stdio_file::stdio_file ()
+  : m_file (NULL),
+    m_fd (-1),
+    m_close_p (false)
+{}
 
-static void
-mem_file_rewind (struct ui_file *file)
+stdio_file::~stdio_file ()
 {
-  struct mem_file *stream = ui_file_data (file);
-
-  if (stream->magic != &mem_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mem_file_rewind: bad magic number"));
-  stream->length_buffer = 0;
+  if (m_close_p)
+    fclose (m_file);
 }
 
-static void
-mem_file_put (struct ui_file *file,
-	      ui_file_put_method_ftype *write,
-	      void *dest)
+void
+stdio_file::set_stream (FILE *file)
 {
-  struct mem_file *stream = ui_file_data (file);
-
-  if (stream->magic != &mem_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mem_file_put: bad magic number"));
-  if (stream->length_buffer > 0)
-    write (dest, stream->buffer, stream->length_buffer);
+  m_file = file;
+  m_fd = fileno (file);
 }
 
-void
-mem_file_write (struct ui_file *file,
-		const char *buffer,
-		long length_buffer)
+bool
+stdio_file::open (const char *name, const char *mode)
 {
-  struct mem_file *stream = ui_file_data (file);
-
-  if (stream->magic != &mem_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("mem_file_write: bad magic number"));
-  if (stream->buffer == NULL)
+  /* Close the previous stream, if we own it.  */
+  if (m_close_p)
     {
-      stream->length_buffer = length_buffer;
-      stream->sizeof_buffer = length_buffer;
-      stream->buffer = xmalloc (stream->sizeof_buffer);
-      memcpy (stream->buffer, buffer, length_buffer);
+      fclose (m_file);
+      m_close_p = false;
     }
-  else
-    {
-      int new_length = stream->length_buffer + length_buffer;
 
-      if (new_length >= stream->sizeof_buffer)
-	{
-	  stream->sizeof_buffer = new_length;
-	  stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer);
-	}
-      memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer);
-      stream->length_buffer = new_length;
-    }
-}
-
-/* ``struct ui_file'' implementation that maps directly onto
-   <stdio.h>'s FILE.  */
+  FILE *f = gdb_fopen_cloexec (name, mode);
 
-static ui_file_write_ftype stdio_file_write;
-static ui_file_write_async_safe_ftype stdio_file_write_async_safe;
-static ui_file_fputs_ftype stdio_file_fputs;
-static ui_file_read_ftype stdio_file_read;
-static ui_file_isatty_ftype stdio_file_isatty;
-static ui_file_delete_ftype stdio_file_delete;
-static struct ui_file *stdio_file_new (FILE *file, int close_p);
-static ui_file_flush_ftype stdio_file_flush;
-static ui_file_fseek_ftype stdio_file_fseek;
+  if (f == NULL)
+    return false;
 
-static int stdio_file_magic;
+  set_stream (f);
+  m_close_p = true;
 
-struct stdio_file
-  {
-    int *magic;
-    FILE *file;
-    /* The associated file descriptor is extracted ahead of time for
-       stdio_file_write_async_safe's benefit, in case fileno isn't async-safe.  */
-    int fd;
-    int close_p;
-  };
-
-static struct ui_file *
-stdio_file_new (FILE *file, int close_p)
-{
-  struct ui_file *ui_file = ui_file_new ();
-  struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file));
-
-  stdio->magic = &stdio_file_magic;
-  stdio->file = file;
-  stdio->fd = fileno (file);
-  stdio->close_p = close_p;
-  set_ui_file_data (ui_file, stdio, stdio_file_delete);
-  set_ui_file_flush (ui_file, stdio_file_flush);
-  set_ui_file_write (ui_file, stdio_file_write);
-  set_ui_file_write_async_safe (ui_file, stdio_file_write_async_safe);
-  set_ui_file_fputs (ui_file, stdio_file_fputs);
-  set_ui_file_read (ui_file, stdio_file_read);
-  set_ui_file_isatty (ui_file, stdio_file_isatty);
-  set_ui_file_fseek (ui_file, stdio_file_fseek);
-  return ui_file;
-}
-
-static void
-stdio_file_delete (struct ui_file *file)
-{
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_delete: bad magic number"));
-  if (stdio->close_p)
-    {
-      fclose (stdio->file);
-    }
-  xfree (stdio);
+  return true;
 }
 
-static void
-stdio_file_flush (struct ui_file *file)
+void
+stdio_file::flush ()
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_flush: bad magic number"));
-  fflush (stdio->file);
+  fflush (m_file);
 }
 
-static long
-stdio_file_read (struct ui_file *file, char *buf, long length_buf)
+long
+stdio_file::read (char *buf, long length_buf)
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_read: bad magic number"));
-
-  /* For the benefit of Windows, call gdb_select before reading from
-     the file.  Wait until at least one byte of data is available.
-     Control-C can interrupt gdb_select, but not read.  */
+  /* Wait until at least one byte of data is available, or we get
+     interrupted with Control-C.  */
   {
     fd_set readfds;
+
     FD_ZERO (&readfds);
-    FD_SET (stdio->fd, &readfds);
-    if (gdb_select (stdio->fd + 1, &readfds, NULL, NULL, NULL) == -1)
+    FD_SET (m_fd, &readfds);
+    if (interruptible_select (m_fd + 1, &readfds, NULL, NULL, NULL) == -1)
       return -1;
   }
 
-  return read (stdio->fd, buf, length_buf);
+  return ::read (m_fd, buf, length_buf);
 }
 
-static void
-stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
+void
+stdio_file::write (const char *buf, long length_buf)
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_write: bad magic number"));
   /* Calling error crashes when we are called from the exception framework.  */
-  if (fwrite (buf, length_buf, 1, stdio->file))
+  if (fwrite (buf, length_buf, 1, m_file))
     {
       /* Nothing.  */
     }
 }
 
-static void
-stdio_file_write_async_safe (struct ui_file *file,
-			     const char *buf, long length_buf)
+void
+stdio_file::write_async_safe (const char *buf, long length_buf)
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    {
-      /* gettext isn't necessarily async safe, so we can't use _("error message") here.
-	 We could extract the correct translation ahead of time, but this is an extremely
-	 rare event, and one of the other stdio_file_* routines will presumably catch
-	 the problem anyway.  For now keep it simple and ignore the error here.  */
-      return;
-    }
-
   /* This is written the way it is to avoid a warning from gcc about not using the
      result of write (since it can be declared with attribute warn_unused_result).
      Alas casting to void doesn't work for this.  */
-  if (write (stdio->fd, buf, length_buf))
+  if (::write (m_fd, buf, length_buf))
     {
       /* Nothing.  */
     }
 }
 
-static void
-stdio_file_fputs (const char *linebuffer, struct ui_file *file)
+void
+stdio_file::puts (const char *linebuffer)
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_fputs: bad magic number"));
   /* Calling error crashes when we are called from the exception framework.  */
-  if (fputs (linebuffer, stdio->file))
+  if (fputs (linebuffer, m_file))
     {
       /* Nothing.  */
     }
 }
 
-static int
-stdio_file_isatty (struct ui_file *file)
+bool
+stdio_file::isatty ()
 {
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_isatty: bad magic number"));
-  return (isatty (stdio->fd));
+  return ::isatty (m_fd);
 }
 
-static int
-stdio_file_fseek (struct ui_file *file, long offset, int whence)
-{
-  struct stdio_file *stdio = ui_file_data (file);
-
-  if (stdio->magic != &stdio_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("stdio_file_fseek: bad magic number"));
-
-  return fseek (stdio->file, offset, whence);
-}
+
 
-#ifdef __MINGW32__
-/* This is the implementation of ui_file method to_write for stderr.
+/* This is the implementation of ui_file method 'write' for stderr.
    gdb_stdout is flushed before writing to gdb_stderr.  */
 
-static void
-stderr_file_write (struct ui_file *file, const char *buf, long length_buf)
+void
+stderr_file::write (const char *buf, long length_buf)
 {
   gdb_flush (gdb_stdout);
-  stdio_file_write (file, buf, length_buf);
+  stdio_file::write (buf, length_buf);
 }
 
-/* This is the implementation of ui_file method to_fputs for stderr.
+/* This is the implementation of ui_file method 'puts' for stderr.
    gdb_stdout is flushed before writing to gdb_stderr.  */
 
-static void
-stderr_file_fputs (const char *linebuffer, struct ui_file *file)
+void
+stderr_file::puts (const char *linebuffer)
 {
   gdb_flush (gdb_stdout);
-  stdio_file_fputs (linebuffer, file);
-}
-#endif
-
-struct ui_file *
-stderr_fileopen (void)
-{
-  struct ui_file *ui_file = stdio_fileopen (stderr);
-
-#ifdef __MINGW32__
-  /* There is no real line-buffering on Windows, see
-     http://msdn.microsoft.com/en-us/library/86cebhfs%28v=vs.71%29.aspx
-     so the stdout is either fully-buffered or non-buffered.  We can't
-     make stdout non-buffered, because of two concerns,
-     1.  non-buffering hurts performance,
-     2.  non-buffering may change GDB's behavior when it is interacting
-     with front-end, such as Emacs.
-
-     We decided to leave stdout as fully buffered, but flush it first
-     when something is written to stderr.  */
-
-  /* Method 'to_write_async_safe' is not overwritten, because there's
-     no way to flush a stream in an async-safe manner.  Fortunately,
-     it doesn't really matter, because:
-     - that method is only used for printing internal debug output
-       from signal handlers.
-     - Windows hosts don't have a concept of async-safeness.  Signal
-       handlers run in a separate thread, so they can call
-       the regular non-async-safe output routines freely.  */
-  set_ui_file_write (ui_file, stderr_file_write);
-  set_ui_file_fputs (ui_file, stderr_file_fputs);
-#endif
-
-  return ui_file;
-}
-
-/* Like fdopen().  Create a ui_file from a previously opened FILE.  */
-
-struct ui_file *
-stdio_fileopen (FILE *file)
-{
-  return stdio_file_new (file, 0);
+  stdio_file::puts (linebuffer);
 }
 
-struct ui_file *
-gdb_fopen (const char *name, const char *mode)
-{
-  FILE *f = gdb_fopen_cloexec (name, mode);
-
-  if (f == NULL)
-    return NULL;
-  return stdio_file_new (f, 1);
-}
-
-/* ``struct ui_file'' implementation that maps onto two ui-file objects.  */
+stderr_file::stderr_file (FILE *stream)
+  : stdio_file (stream)
+{}
 
-static ui_file_write_ftype tee_file_write;
-static ui_file_fputs_ftype tee_file_fputs;
-static ui_file_isatty_ftype tee_file_isatty;
-static ui_file_delete_ftype tee_file_delete;
-static ui_file_flush_ftype tee_file_flush;
-
-static int tee_file_magic;
+
 
-struct tee_file
-  {
-    int *magic;
-    struct ui_file *one, *two;
-    int close_one, close_two;
-  };
+tee_file::tee_file (ui_file *one, bool close_one,
+		    ui_file *two, bool close_two)
+  : m_one (one),
+    m_two (two),
+    m_close_one (close_one),
+    m_close_two (close_two)
+{}
 
-struct ui_file *
-tee_file_new (struct ui_file *one, int close_one,
-	      struct ui_file *two, int close_two)
+tee_file::~tee_file ()
 {
-  struct ui_file *ui_file = ui_file_new ();
-  struct tee_file *tee = xmalloc (sizeof (struct tee_file));
-
-  tee->magic = &tee_file_magic;
-  tee->one = one;
-  tee->two = two;
-  tee->close_one = close_one;
-  tee->close_two = close_two;
-  set_ui_file_data (ui_file, tee, tee_file_delete);
-  set_ui_file_flush (ui_file, tee_file_flush);
-  set_ui_file_write (ui_file, tee_file_write);
-  set_ui_file_fputs (ui_file, tee_file_fputs);
-  set_ui_file_isatty (ui_file, tee_file_isatty);
-  return ui_file;
+  if (m_close_one)
+    delete m_one;
+  if (m_close_two)
+    delete m_two;
 }
 
-static void
-tee_file_delete (struct ui_file *file)
+void
+tee_file::flush ()
 {
-  struct tee_file *tee = ui_file_data (file);
-
-  if (tee->magic != &tee_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tee_file_delete: bad magic number"));
-  if (tee->close_one)
-    ui_file_delete (tee->one);
-  if (tee->close_two)
-    ui_file_delete (tee->two);
-
-  xfree (tee);
+  m_one->flush ();
+  m_two->flush ();
 }
 
-static void
-tee_file_flush (struct ui_file *file)
+void
+tee_file::write (const char *buf, long length_buf)
 {
-  struct tee_file *tee = ui_file_data (file);
-
-  if (tee->magic != &tee_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tee_file_flush: bad magic number"));
-  tee->one->to_flush (tee->one);
-  tee->two->to_flush (tee->two);
+  m_one->write (buf, length_buf);
+  m_two->write (buf, length_buf);
 }
 
-static void
-tee_file_write (struct ui_file *file, const char *buf, long length_buf)
+void
+tee_file::write_async_safe (const char *buf, long length_buf)
 {
-  struct tee_file *tee = ui_file_data (file);
-
-  if (tee->magic != &tee_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tee_file_write: bad magic number"));
-  ui_file_write (tee->one, buf, length_buf);
-  ui_file_write (tee->two, buf, length_buf);
+  m_one->write_async_safe (buf, length_buf);
+  m_two->write_async_safe (buf, length_buf);
 }
 
-static void
-tee_file_fputs (const char *linebuffer, struct ui_file *file)
+void
+tee_file::puts (const char *linebuffer)
 {
-  struct tee_file *tee = ui_file_data (file);
-
-  if (tee->magic != &tee_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tee_file_fputs: bad magic number"));
-  tee->one->to_fputs (linebuffer, tee->one);
-  tee->two->to_fputs (linebuffer, tee->two);
+  m_one->puts (linebuffer);
+  m_two->puts (linebuffer);
 }
 
-static int
-tee_file_isatty (struct ui_file *file)
+bool
+tee_file::isatty ()
 {
-  struct tee_file *tee = ui_file_data (file);
-
-  if (tee->magic != &tee_file_magic)
-    internal_error (__FILE__, __LINE__,
-		    _("tee_file_isatty: bad magic number"));
-
-  return ui_file_isatty (tee->one);
+  return m_one->isatty ();
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-file.h ./gdb/ui-file.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-file.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/ui-file.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* UI_FILE - a generic STDIO like output stream.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,134 +19,246 @@
 #ifndef UI_FILE_H
 #define UI_FILE_H
 
-struct obstack;
-struct ui_file;
+#include <string>
 
-/* Create a generic ui_file object with null methods.  */
+/* The abstract ui_file base class.  */
 
-extern struct ui_file *ui_file_new (void);
+class ui_file
+{
+public:
+  ui_file ();
+  virtual ~ui_file () = 0;
 
-/* Override methods used by specific implementations of a UI_FILE
-   object.  */
-
-typedef void (ui_file_flush_ftype) (struct ui_file *stream);
-extern void set_ui_file_flush (struct ui_file *stream,
-			       ui_file_flush_ftype *flush);
-
-/* NOTE: Both fputs and write methods are available.  Default
-   implementations that mapping one onto the other are included.  */
-typedef void (ui_file_write_ftype) (struct ui_file *stream,
-				    const char *buf, long length_buf);
-extern void set_ui_file_write (struct ui_file *stream,
-			       ui_file_write_ftype *fputs);
-
-typedef void (ui_file_fputs_ftype) (const char *, struct ui_file *stream);
-extern void set_ui_file_fputs (struct ui_file *stream,
-			       ui_file_fputs_ftype *fputs);
-
-/* This version of "write" is safe for use in signal handlers.
-   It's not guaranteed that all existing output will have been
-   flushed first.
-   Implementations are also free to ignore some or all of the request.
-   fputs_async is not provided as the async versions are rarely used,
-   no point in having both for a rarely used interface.  */
-typedef void (ui_file_write_async_safe_ftype)
-  (struct ui_file *stream, const char *buf, long length_buf);
-extern void set_ui_file_write_async_safe
-  (struct ui_file *stream, ui_file_write_async_safe_ftype *write_async_safe);
-
-typedef long (ui_file_read_ftype) (struct ui_file *stream,
-				   char *buf, long length_buf);
-extern void set_ui_file_read (struct ui_file *stream,
-			      ui_file_read_ftype *fread);
-
-typedef int (ui_file_isatty_ftype) (struct ui_file *stream);
-extern void set_ui_file_isatty (struct ui_file *stream,
-				ui_file_isatty_ftype *isatty);
-
-typedef void (ui_file_rewind_ftype) (struct ui_file *stream);
-extern void set_ui_file_rewind (struct ui_file *stream,
-				ui_file_rewind_ftype *rewind);
-
-typedef void (ui_file_put_method_ftype) (void *object, const char *buffer,
-					 long length_buffer);
-typedef void (ui_file_put_ftype) (struct ui_file *stream,
-				  ui_file_put_method_ftype *method,
-				  void *context);
-extern void set_ui_file_put (struct ui_file *stream, ui_file_put_ftype *put);
-
-typedef void (ui_file_delete_ftype) (struct ui_file * stream);
-extern void set_ui_file_data (struct ui_file *stream, void *data,
-			      ui_file_delete_ftype *to_delete);
-
-typedef int (ui_file_fseek_ftype) (struct ui_file *stream, long offset,
-				   int whence);
-extern void set_ui_file_fseek (struct ui_file *stream,
-			       ui_file_fseek_ftype *fseek_ptr);
+  /* Public non-virtual API.  */
 
-extern void *ui_file_data (struct ui_file *file);
+  void printf (const char *, ...) ATTRIBUTE_PRINTF (2, 3);
 
+  /* Print a string whose delimiter is QUOTER.  Note that these
+     routines should only be called for printing things which are
+     independent of the language of the program being debugged.  */
+  void putstr (const char *str, int quoter);
 
-extern void gdb_flush (struct ui_file *);
+  void putstrn (const char *str, int n, int quoter);
 
-extern void ui_file_delete (struct ui_file *stream);
+  int putc (int c);
 
-extern void ui_file_rewind (struct ui_file *stream);
+  void vprintf (const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
 
-extern int ui_file_isatty (struct ui_file *);
+  /* Methods below are both public, and overridable by ui_file
+     subclasses.  */
 
-extern void ui_file_write (struct ui_file *file, const char *buf,
-			   long length_buf);
+  virtual void write (const char *buf, long length_buf) = 0;
 
-/* A wrapper for ui_file_write that is suitable for use by
-   ui_file_put.  */
+  /* This version of "write" is safe for use in signal handlers.  It's
+     not guaranteed that all existing output will have been flushed
+     first.  Implementations are also free to ignore some or all of
+     the request.  puts_async is not provided as the async versions
+     are rarely used, no point in having both for a rarely used
+     interface.  */
+  virtual void write_async_safe (const char *buf, long length_buf)
+  { gdb_assert_not_reached ("write_async_safe"); }
 
-extern void ui_file_write_for_put (void *data, const char *buffer,
-				   long length_buffer);
+  /* Some ui_files override this to provide a efficient implementation
+     that avoids a strlen.  */
+  virtual void puts (const char *str)
+  { this->write (str, strlen (str)); }
 
-extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
-				      long length_buf);
+  virtual long read (char *buf, long length_buf)
+  { gdb_assert_not_reached ("can't read from this file type"); }
 
-/* NOTE: copies left to right.  */
-extern void ui_file_put (struct ui_file *src,
-			 ui_file_put_method_ftype *write, void *dest);
-
-/* Returns a freshly allocated buffer containing the entire contents
-   of FILE (as determined by ui_file_put()) with a NUL character
-   appended.  LENGTH, if not NULL, is set to the size of the buffer
-   minus that appended NUL.  */
-extern char *ui_file_xstrdup (struct ui_file *file, long *length);
-
-/* Similar to ui_file_xstrdup, but return a new string allocated on
-   OBSTACK.  */
-extern char *ui_file_obsavestring (struct ui_file *file,
-				   struct obstack *obstack, long *length);
+  virtual bool isatty ()
+  { return false; }
 
-extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
+  virtual void flush ()
+  {}
+};
 
-extern int ui_file_fseek (struct ui_file *file, long offset, int whence);
+typedef std::unique_ptr<ui_file> ui_file_up;
 
-/* Create/open a memory based file.  Can be used as a scratch buffer
-   for collecting output.  */
-extern struct ui_file *mem_fileopen (void);
+/* A ui_file that writes to nowhere.  */
 
+class null_file : public ui_file
+{
+public:
+  void write (const char *buf, long length_buf) override;
+  void write_async_safe (const char *buf, long sizeof_buf) override;
+  void puts (const char *str) override;
+};
 
+/* A preallocated null_file stream.  */
+extern null_file null_stream;
 
-/* Open/create a STDIO based UI_FILE using the already open FILE.  */
-extern struct ui_file *stdio_fileopen (FILE *file);
+extern void gdb_flush (ui_file *);
+
+extern int ui_file_isatty (struct ui_file *);
 
-/* Create a ui_file from stderr.  */
-extern struct ui_file *stderr_fileopen (void);
+extern void ui_file_write (struct ui_file *file, const char *buf,
+			   long length_buf);
+
+extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
+				      long length_buf);
+
+extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
 
+/* A std::string-based ui_file.  Can be used as a scratch buffer for
+   collecting output.  */
 
-/* Open NAME returning an STDIO based UI_FILE.  */
-extern struct ui_file *gdb_fopen (const char *name, const char *mode);
+class string_file : public ui_file
+{
+public:
+  string_file () {}
+  ~string_file () override;
+
+  /* Override ui_file methods.  */
+
+  void write (const char *buf, long length_buf) override;
+
+  long read (char *buf, long length_buf) override
+  { gdb_assert_not_reached ("a string_file is not readable"); }
+
+  /* string_file-specific public API.  */
+
+  /* Accesses the std::string containing the entire output collected
+     so far.
+
+     Returns a non-const reference so that it's easy to move the
+     string contents out of the string_file.  E.g.:
+
+      string_file buf;
+      buf.printf (....);
+      buf.printf (....);
+      return std::move (buf.string ());
+  */
+  std::string &string () { return m_string; }
+
+  /* Provide a few convenience methods with the same API as the
+     underlying std::string.  */
+  const char *data () const { return m_string.data (); }
+  const char *c_str () const { return m_string.c_str (); }
+  size_t size () const { return m_string.size (); }
+  bool empty () const { return m_string.empty (); }
+  void clear () { return m_string.clear (); }
+
+private:
+  /* The internal buffer.  */
+  std::string m_string;
+};
+
+/* A ui_file implementation that maps directly onto <stdio.h>'s FILE.
+   A stdio_file can either own its underlying file, or not.  If it
+   owns the file, then destroying the stdio_file closes the underlying
+   file, otherwise it is left open.  */
+
+class stdio_file : public ui_file
+{
+public:
+  /* Create a ui_file from a previously opened FILE.  CLOSE_P
+     indicates whether the underlying file should be closed when the
+     stdio_file is destroyed.  */
+  explicit stdio_file (FILE *file, bool close_p = false);
+
+  /* Create an stdio_file that is not managing any file yet.  Call
+     open to actually open something.  */
+  stdio_file ();
+
+  ~stdio_file () override;
+
+  /* Open NAME in mode MODE, and own the resulting file.  Returns true
+     on success, false otherwise.  If the stdio_file previously owned
+     a file, it is closed.  */
+  bool open (const char *name, const char *mode);
+
+  void flush () override;
+
+  void write (const char *buf, long length_buf) override;
+
+  void write_async_safe (const char *buf, long length_buf) override;
+
+  void puts (const char *) override;
+
+  long read (char *buf, long length_buf) override;
+
+  bool isatty () override;
+
+private:
+  /* Sets the internal stream to FILE, and saves the FILE's file
+     descriptor in M_FD.  */
+  void set_stream (FILE *file);
+
+  /* The file.  */
+  FILE *m_file;
+
+  /* The associated file descriptor is extracted ahead of time for
+     stdio_file::write_async_safe's benefit, in case fileno isn't
+     async-safe.  */
+  int m_fd;
+
+  /* If true, M_FILE is closed on destruction.  */
+  bool m_close_p;
+};
+
+typedef std::unique_ptr<stdio_file> stdio_file_up;
+
+/* Like stdio_file, but specifically for stderr.
+
+   This exists because there is no real line-buffering on Windows, see
+   <http://msdn.microsoft.com/en-us/library/86cebhfs%28v=vs.71%29.aspx>
+   so the stdout is either fully-buffered or non-buffered.  We can't
+   make stdout non-buffered, because of two concerns:
+
+    1. Non-buffering hurts performance.
+    2. Non-buffering may change GDB's behavior when it is interacting
+       with a front-end, such as Emacs.
+
+   We leave stdout as fully buffered, but flush it first when
+   something is written to stderr.
+
+   Note that the 'write_async_safe' method is not overridden, because
+   there's no way to flush a stream in an async-safe manner.
+   Fortunately, it doesn't really matter, because:
+
+    1. That method is only used for printing internal debug output
+       from signal handlers.
+
+    2. Windows hosts don't have a concept of async-safeness.  Signal
+       handlers run in a separate thread, so they can call the regular
+       non-async-safe output routines freely.
+*/
+class stderr_file : public stdio_file
+{
+public:
+  explicit stderr_file (FILE *stream);
+
+  /* Override the output routines to flush gdb_stdout before deferring
+     to stdio_file for the actual outputting.  */
+  void write (const char *buf, long length_buf) override;
+  void puts (const char *linebuffer) override;
+};
+
+/* A ui_file implementation that maps onto two ui-file objects.  */
+
+class tee_file : public ui_file
+{
+public:
+  /* Create a file which writes to both ONE and TWO.  CLOSE_ONE and
+     CLOSE_TWO indicate whether the original files should be closed
+     when the new file is closed.  */
+  tee_file (ui_file *one, bool close_one,
+	    ui_file *two, bool close_two);
+  ~tee_file () override;
+
+  void write (const char *buf, long length_buf) override;
+  void write_async_safe (const char *buf, long length_buf) override;
+  void puts (const char *) override;
+
+  bool isatty () override;
+  void flush () override;
+
+private:
+  /* The two underlying ui_files, and whether they should each be
+     closed on destruction.  */
+  ui_file *m_one, *m_two;
+  bool m_close_one, m_close_two;
+};
 
-/* Create a file which writes to both ONE and TWO.  CLOSE_ONE
-   and CLOSE_TWO indicate whether the original files should be
-   closed when the new file is closed.  */
-extern struct ui_file *tee_file_new (struct ui_file *one,
-				     int close_one,
-				     struct ui_file *two,
-				     int close_two);
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-out.c ./gdb/ui-out.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-out.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/ui-out.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Output generating routines for GDB.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
    Written by Fernando Nasser for Cygnus.
@@ -25,366 +25,396 @@
 #include "language.h"
 #include "ui-out.h"
 
-/* table header structures */
+#include <vector>
+#include <memory>
+#include <string>
+#include <memory>
+
+/* A header of a ui_out_table.  */
+
+class ui_out_hdr
+{
+ public:
+
+  explicit ui_out_hdr (int number, int min_width, ui_align alignment,
+		       const std::string &name, const std::string &header)
+  : m_number (number),
+    m_min_width (min_width),
+    m_alignment (alignment),
+    m_name (name),
+    m_header (header)
+  {
+  }
 
-struct ui_out_hdr
+  int number () const
   {
-    int colno;
-    int width;
-    int alignment;
-    char *col_name;
-    char *colhdr;
-    struct ui_out_hdr *next;
-  };
+    return m_number;
+  }
 
-/* Maintain a stack so that the info applicable to the inner most list
-   is always available.  Stack/nested level 0 is reserved for the
-   top-level result.  */
+  int min_width () const
+  {
+    return m_min_width;
+  }
 
-enum { MAX_UI_OUT_LEVELS = 8 };
+  ui_align alignment () const
+  {
+    return m_alignment;
+  }
 
-struct ui_out_level
+  const std::string &header () const
   {
-    /* Count each field; the first element is for non-list fields.  */
-    int field_count;
-    /* The type of this level.  */
-    enum ui_out_type type;
-  };
+    return m_header;
+  }
+
+  const std::string &name () const
+  {
+    return m_name;
+  }
+
+ private:
+
+  /* The number of the table column this header represents, 1-based.  */
+  int m_number;
+
+  /* Minimal column width in characters.  May or may not be applicable,
+     depending on the actual implementation of ui_out.  */
+  int m_min_width;
+
+  /* Alignment of the content in the column.  May or may not be applicable,
+     depending on the actual implementation of ui_out.  */
+  ui_align m_alignment;
+
+  /* Internal column name, used to internally refer to the column.  */
+  std::string m_name;
+
+  /* Printed header text of the column.  */
+  std::string m_header;
+};
 
-/* Define uiout->level vector types and operations.  */
-typedef struct ui_out_level *ui_out_level_p;
-DEF_VEC_P (ui_out_level_p);
+/* A level of nesting (either a list or a tuple) in a ui_out output.  */
+
+class ui_out_level
+{
+ public:
+
+  explicit ui_out_level (ui_out_type type)
+  : m_type (type),
+    m_field_count (0)
+  {
+  }
+
+  ui_out_type type () const
+  {
+    return m_type;
+  }
+
+  int field_count () const
+  {
+    return m_field_count;
+  }
+
+  void inc_field_count ()
+  {
+    m_field_count++;
+  }
+
+ private:
+
+  /* The type of this level.  */
+  ui_out_type m_type;
+
+  /* Count each field; the first element is for non-list fields.  */
+  int m_field_count;
+};
 
 /* Tables are special.  Maintain a separate structure that tracks
    their state.  At present an output can only contain a single table
    but that restriction might eventually be lifted.  */
 
-struct ui_out_table
+class ui_out_table
 {
-  /* If on, a table is being generated.  */
-  int flag;
+ public:
 
-  /* If on, the body of a table is being generated.  If off, the table
-     header is being generated.  */
-  int body_flag;
+  /* States (steps) of a table generation.  */
+
+  enum class state
+  {
+    /* We are generating the table headers.  */
+    HEADERS,
+
+    /* We are generating the table body.  */
+    BODY,
+  };
+
+  explicit ui_out_table (int entry_level, int nr_cols, const std::string &id)
+  : m_state (state::HEADERS),
+    m_entry_level (entry_level),
+    m_nr_cols (nr_cols),
+    m_id (id)
+  {
+  }
+
+  /* Start building the body of the table.  */
+
+  void start_body ();
+
+  /* Add a new header to the table.  */
+
+  void append_header (int width, ui_align alignment,
+		      const std::string &col_name, const std::string &col_hdr);
+
+  void start_row ();
+
+  /* Extract the format information for the next header and advance
+     the header iterator.  Return false if there was no next header.  */
+
+  bool get_next_header (int *colno, int *width, ui_align *alignment,
+		       const char **col_hdr);
+
+  bool query_field (int colno, int *width, int *alignment,
+		    const char **col_name) const;
+
+  state current_state () const;
+
+  int entry_level () const;
+
+ private:
+
+  state m_state;
 
   /* The level at which each entry of the table is to be found.  A row
      (a tuple) is made up of entries.  Consequently ENTRY_LEVEL is one
      above that of the table.  */
-  int entry_level;
+  int m_entry_level;
 
   /* Number of table columns (as specified in the table_begin call).  */
-  int columns;
+  int m_nr_cols;
 
   /* String identifying the table (as specified in the table_begin
      call).  */
-  char *id;
+  std::string m_id;
 
-  /* Points to the first table header (if any).  */
-  struct ui_out_hdr *header_first;
+  /* Pointers to the column headers.  */
+  std::vector<std::unique_ptr<ui_out_hdr>> m_headers;
 
-  /* Points to the last table header (if any).  */
-  struct ui_out_hdr *header_last;
+  /* Iterator over the headers vector, used when printing successive fields.  */
+  std::vector<std::unique_ptr<ui_out_hdr>>::const_iterator m_headers_iterator;
+};
 
-  /* Points to header of NEXT column to format.  */
-  struct ui_out_hdr *header_next;
+/* See ui-out.h.  */
 
-};
+void ui_out_table::start_body ()
+{
+  if (m_state != state::HEADERS)
+    internal_error (__FILE__, __LINE__,
+		    _("extra table_body call not allowed; there must be only "
+		      "one table_body after a table_begin and before a "
+		      "table_end."));
+
+  /* Check if the number of defined headers matches the number of expected
+     columns.  */
+  if (m_headers.size () != m_nr_cols)
+    internal_error (__FILE__, __LINE__,
+		    _("number of headers differ from number of table "
+		      "columns."));
 
+  m_state = state::BODY;
+  m_headers_iterator = m_headers.begin ();
+}
 
-/* The ui_out structure */
-/* Any change here requires a corresponding one in the initialization
-   of the default uiout, which is statically initialized.  */
+/* See ui-out.h.  */
 
-struct ui_out
-  {
-    int flags;
-    /* Specific implementation of ui-out.  */
-    const struct ui_out_impl *impl;
-    void *data;
+void ui_out_table::append_header (int width, ui_align alignment,
+				  const std::string &col_name,
+				  const std::string &col_hdr)
+{
+  if (m_state != state::HEADERS)
+    internal_error (__FILE__, __LINE__,
+		    _("table header must be specified after table_begin and "
+		      "before table_body."));
 
-    /* Current level.  */
-    int level;
+  std::unique_ptr<ui_out_hdr> header (new ui_out_hdr (m_headers.size () + 1,
+							width, alignment,
+							col_name, col_hdr));
 
-    /* Vector to store and track the ui-out levels.  */
-    VEC (ui_out_level_p) *levels;
+  m_headers.push_back (std::move (header));
+}
 
-    /* A table, if any.  At present only a single table is supported.  */
-    struct ui_out_table table;
-  };
+/* See ui-out.h.  */
 
-/* The current (inner most) level.  */
-static struct ui_out_level *
-current_level (struct ui_out *uiout)
+void ui_out_table::start_row ()
 {
-  return VEC_index (ui_out_level_p, uiout->levels, uiout->level);
+  m_headers_iterator = m_headers.begin ();
 }
 
-/* Create a new level, of TYPE.  Return the new level's index.  */
-static int
-push_level (struct ui_out *uiout,
-	    enum ui_out_type type,
-	    const char *id)
+/* See ui-out.h.  */
+
+bool ui_out_table::get_next_header (int *colno, int *width, ui_align *alignment,
+				    const char **col_hdr)
 {
-  struct ui_out_level *current;
+  /* There may be no headers at all or we may have used all columns.  */
+  if (m_headers_iterator == m_headers.end ())
+    return false;
+
+  ui_out_hdr *hdr = m_headers_iterator->get ();
 
-  uiout->level++;
-  current = XNEW (struct ui_out_level);
-  current->field_count = 0;
-  current->type = type;
-  VEC_safe_push (ui_out_level_p, uiout->levels, current);
-  return uiout->level;
+  *colno = hdr->number ();
+  *width = hdr->min_width ();
+  *alignment = hdr->alignment ();
+  *col_hdr = hdr->header ().c_str ();
+
+  /* Advance the header pointer to the next entry.  */
+  m_headers_iterator++;
+
+  return true;
 }
 
-/* Discard the current level, return the discarded level's index.
-   TYPE is the type of the level being discarded.  */
-static int
-pop_level (struct ui_out *uiout,
-	   enum ui_out_type type)
+/* See ui-out.h.  */
+
+bool ui_out_table::query_field (int colno, int *width, int *alignment,
+				const char **col_name) const
 {
-  struct ui_out_level *current;
+  /* Column numbers are 1-based, so convert to 0-based index.  */
+  int index = colno - 1;
 
-  /* We had better not underflow the buffer.  */
-  gdb_assert (uiout->level > 0);
-  gdb_assert (current_level (uiout)->type == type);
-  current = VEC_pop (ui_out_level_p, uiout->levels);
-  xfree (current);
-  uiout->level--;
-  return uiout->level + 1;
-}
-
-
-/* These are the default implementation functions.  */
-
-static void default_table_begin (struct ui_out *uiout, int nbrofcols,
-				 int nr_rows, const char *tblid);
-static void default_table_body (struct ui_out *uiout);
-static void default_table_end (struct ui_out *uiout);
-static void default_table_header (struct ui_out *uiout, int width,
-				  enum ui_align alig, const char *col_name,
-				  const char *colhdr);
-static void default_begin (struct ui_out *uiout,
-			   enum ui_out_type type,
-			   int level, const char *id);
-static void default_end (struct ui_out *uiout,
-			 enum ui_out_type type,
-			 int level);
-static void default_field_int (struct ui_out *uiout, int fldno, int width,
-			       enum ui_align alig,
-			       const char *fldname,
-			       int value);
-static void default_field_skip (struct ui_out *uiout, int fldno, int width,
-				enum ui_align alig,
-				const char *fldname);
-static void default_field_string (struct ui_out *uiout, int fldno, int width,
-				  enum ui_align align,
-				  const char *fldname,
-				  const char *string);
-static void default_field_fmt (struct ui_out *uiout, int fldno,
-			       int width, enum ui_align align,
-			       const char *fldname,
-			       const char *format,
-			       va_list args) ATTRIBUTE_PRINTF (6, 0);
-static void default_spaces (struct ui_out *uiout, int numspaces);
-static void default_text (struct ui_out *uiout, const char *string);
-static void default_message (struct ui_out *uiout, int verbosity,
-			     const char *format,
-			     va_list args) ATTRIBUTE_PRINTF (3, 0);
-static void default_wrap_hint (struct ui_out *uiout, char *identstring);
-static void default_flush (struct ui_out *uiout);
-static void default_data_destroy (struct ui_out *uiout);
-
-/* This is the default ui-out implementation functions vector.  */
-
-const struct ui_out_impl default_ui_out_impl =
-{
-  default_table_begin,
-  default_table_body,
-  default_table_end,
-  default_table_header,
-  default_begin,
-  default_end,
-  default_field_int,
-  default_field_skip,
-  default_field_string,
-  default_field_fmt,
-  default_spaces,
-  default_text,
-  default_message,
-  default_wrap_hint,
-  default_flush,
-  NULL,
-  default_data_destroy,
-  0, /* Does not need MI hacks.  */
-};
+  if (index >= 0 && index < m_headers.size ())
+    {
+      ui_out_hdr *hdr = m_headers[index].get ();
+
+      gdb_assert (colno == hdr->number ());
+
+      *width = hdr->min_width ();
+      *alignment = hdr->alignment ();
+      *col_name = hdr->name ().c_str ();
+
+      return true;
+    }
+  else
+    return false;
+}
 
-/* The default ui_out */
+/* See ui-out.h.  */
 
-struct ui_out def_uiout =
+ui_out_table::state ui_out_table::current_state () const
 {
-  0,				/* flags */
-  &default_ui_out_impl,		/* impl */
-};
+  return m_state;
+}
+
+/* See ui-out.h.  */
+
+int ui_out_table::entry_level () const
+{
+  return m_entry_level;
+}
+
+int
+ui_out::level () const
+{
+  return m_levels.size ();
+}
+
+/* The current (inner most) level.  */
+
+ui_out_level *
+ui_out::current_level () const
+{
+  return m_levels.back ().get ();
+}
+
+/* Create a new level, of TYPE.  */
+void
+ui_out::push_level (ui_out_type type)
+{
+  std::unique_ptr<ui_out_level> level (new ui_out_level (type));
 
-/* Pointer to current ui_out */
-/* FIXME: This should not be a global, but something passed down from main.c
-   or top.c.  */
-
-struct ui_out *current_uiout = &def_uiout;
-
-/* These are the interfaces to implementation functions.  */
-
-static void uo_table_begin (struct ui_out *uiout, int nbrofcols,
-			    int nr_rows, const char *tblid);
-static void uo_table_body (struct ui_out *uiout);
-static void uo_table_end (struct ui_out *uiout);
-static void uo_table_header (struct ui_out *uiout, int width,
-			     enum ui_align align, const char *col_name,
-			     const char *colhdr);
-static void uo_begin (struct ui_out *uiout,
-		      enum ui_out_type type,
-		      int level, const char *id);
-static void uo_end (struct ui_out *uiout,
-		    enum ui_out_type type,
-		    int level);
-static void uo_field_int (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align align, const char *fldname, int value);
-static void uo_field_skip (struct ui_out *uiout, int fldno, int width,
-			   enum ui_align align, const char *fldname);
-static void uo_field_fmt (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align align, const char *fldname,
-			  const char *format, va_list args)
-     ATTRIBUTE_PRINTF (6, 0);
-static void uo_spaces (struct ui_out *uiout, int numspaces);
-static void uo_text (struct ui_out *uiout, const char *string);
-static void uo_message (struct ui_out *uiout, int verbosity,
-			const char *format, va_list args)
-     ATTRIBUTE_PRINTF (3, 0);
-static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
-static void uo_flush (struct ui_out *uiout);
-static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
-static void uo_data_destroy (struct ui_out *uiout);
-
-/* Prototypes for local functions */
-
-extern void _initialize_ui_out (void);
-static void append_header_to_list (struct ui_out *uiout, int width,
-				   int alignment, const char *col_name,
-				   const char *colhdr);
-static int get_next_header (struct ui_out *uiout, int *colno, int *width,
-			    int *alignment, char **colhdr);
-static void clear_header_list (struct ui_out *uiout);
-static void clear_table (struct ui_out *uiout);
-static void verify_field (struct ui_out *uiout, int *fldno, int *width,
-			  int *align);
+  m_levels.push_back (std::move (level));
+}
+
+/* Discard the current level.  TYPE is the type of the level being
+   discarded.  */
+void
+ui_out::pop_level (ui_out_type type)
+{
+  /* We had better not underflow the buffer.  */
+  gdb_assert (m_levels.size () > 0);
+  gdb_assert (current_level ()->type () == type);
 
-/* exported functions (ui_out API) */
+  m_levels.pop_back ();
+}
 
 /* Mark beginning of a table.  */
 
-static void
-ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
-		    int nr_rows,
-		    const char *tblid)
+void
+ui_out::table_begin (int nr_cols, int nr_rows, const std::string &tblid)
 {
-  if (uiout->table.flag)
+  if (m_table_up != nullptr)
     internal_error (__FILE__, __LINE__,
 		    _("tables cannot be nested; table_begin found before \
 previous table_end."));
 
-  uiout->table.flag = 1;
-  uiout->table.body_flag = 0;
-  uiout->table.entry_level = uiout->level + 1;
-  uiout->table.columns = nbrofcols;
-  if (tblid != NULL)
-    uiout->table.id = xstrdup (tblid);
-  else
-    uiout->table.id = NULL;
-  clear_header_list (uiout);
+  m_table_up.reset (new ui_out_table (level () + 1, nr_cols, tblid));
 
-  uo_table_begin (uiout, nbrofcols, nr_rows, uiout->table.id);
+  do_table_begin (nr_cols, nr_rows, tblid.c_str ());
 }
 
 void
-ui_out_table_body (struct ui_out *uiout)
+ui_out::table_header (int width, ui_align alignment,
+		      const std::string &col_name, const std::string &col_hdr)
 {
-  if (!uiout->table.flag)
-    internal_error (__FILE__, __LINE__,
-		    _("table_body outside a table is not valid; it must be \
-after a table_begin and before a table_end."));
-  if (uiout->table.body_flag)
-    internal_error (__FILE__, __LINE__,
-		    _("extra table_body call not allowed; there must be \
-only one table_body after a table_begin and before a table_end."));
-  if (uiout->table.header_next->colno != uiout->table.columns)
+  if (m_table_up == nullptr)
     internal_error (__FILE__, __LINE__,
-		    _("number of headers differ from number of table \
-columns."));
+		    _("table_header outside a table is not valid; it must be \
+after a table_begin and before a table_body."));
 
-  uiout->table.body_flag = 1;
-  uiout->table.header_next = uiout->table.header_first;
+  m_table_up->append_header (width, alignment, col_name, col_hdr);
 
-  uo_table_body (uiout);
+  do_table_header (width, alignment, col_name, col_hdr);
 }
 
-static void
-ui_out_table_end (struct ui_out *uiout)
+void
+ui_out::table_body ()
 {
-  if (!uiout->table.flag)
+  if (m_table_up == nullptr)
     internal_error (__FILE__, __LINE__,
-		    _("misplaced table_end or missing table_begin."));
+		    _("table_body outside a table is not valid; it must be "
+		      "after a table_begin and before a table_end."));
 
-  uiout->table.entry_level = 0;
-  uiout->table.body_flag = 0;
-  uiout->table.flag = 0;
+  m_table_up->start_body ();
 
-  uo_table_end (uiout);
-  clear_table (uiout);
+  do_table_body ();
 }
 
 void
-ui_out_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		     const char *col_name,
-		     const char *colhdr)
+ui_out::table_end ()
 {
-  if (!uiout->table.flag || uiout->table.body_flag)
+  if (m_table_up == nullptr)
     internal_error (__FILE__, __LINE__,
-		    _("table header must be specified after table_begin \
-and before table_body."));
+		    _("misplaced table_end or missing table_begin."));
 
-  append_header_to_list (uiout, width, alignment, col_name, colhdr);
+  do_table_end ();
 
-  uo_table_header (uiout, width, alignment, col_name, colhdr);
+  m_table_up = nullptr;
 }
 
 static void
 do_cleanup_table_end (void *data)
 {
-  struct ui_out *ui_out = data;
+  ui_out *uiout = (ui_out *) data;
 
-  ui_out_table_end (ui_out);
+  uiout->table_end ();
 }
 
 struct cleanup *
-make_cleanup_ui_out_table_begin_end (struct ui_out *ui_out, int nr_cols,
-                                     int nr_rows, const char *tblid)
+make_cleanup_ui_out_table_begin_end (ui_out *uiout, int nr_cols, int nr_rows,
+				     const char *tblid)
 {
-  ui_out_table_begin (ui_out, nr_cols, nr_rows, tblid);
-  return make_cleanup (do_cleanup_table_end, ui_out);
+  uiout->table_begin (nr_cols, nr_rows, tblid);
+  return make_cleanup (do_cleanup_table_end, uiout);
 }
 
 void
-ui_out_begin (struct ui_out *uiout,
-	      enum ui_out_type type,
-	      const char *id)
+ui_out::begin (ui_out_type type, const char *id)
 {
-  int new_level;
-
-  if (uiout->table.flag && !uiout->table.body_flag)
-    internal_error (__FILE__, __LINE__,
-		    _("table header or table_body expected; lists must be \
-specified after table_body."));
-
   /* Be careful to verify the ``field'' before the new tuple/list is
      pushed onto the stack.  That way the containing list/table/row is
      verified and not the newly created tuple/list.  This verification
@@ -395,29 +425,29 @@ specified after table_body."));
   {
     int fldno;
     int width;
-    int align;
+    ui_align align;
 
-    verify_field (uiout, &fldno, &width, &align);
+    verify_field (&fldno, &width, &align);
   }
 
-  new_level = push_level (uiout, type, id);
+  push_level (type);
 
   /* If the push puts us at the same level as a table row entry, we've
      got a new table row.  Put the header pointer back to the start.  */
-  if (uiout->table.body_flag
-      && uiout->table.entry_level == new_level)
-    uiout->table.header_next = uiout->table.header_first;
+  if (m_table_up != nullptr
+      && m_table_up->current_state () == ui_out_table::state::BODY
+      && m_table_up->entry_level () == level ())
+    m_table_up->start_row ();
 
-  uo_begin (uiout, type, new_level, id);
+  do_begin (type, id);
 }
 
 void
-ui_out_end (struct ui_out *uiout,
-	    enum ui_out_type type)
+ui_out::end (ui_out_type type)
 {
-  int old_level = pop_level (uiout, type);
+  pop_level (type);
 
-  uo_end (uiout, type, old_level);
+  do_end (type);
 }
 
 struct ui_out_end_cleanup_data
@@ -429,9 +459,10 @@ struct ui_out_end_cleanup_data
 static void
 do_cleanup_end (void *data)
 {
-  struct ui_out_end_cleanup_data *end_cleanup_data = data;
+  struct ui_out_end_cleanup_data *end_cleanup_data
+    = (struct ui_out_end_cleanup_data *) data;
 
-  ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type);
+  end_cleanup_data->uiout->end (end_cleanup_data->type);
   xfree (end_cleanup_data);
 }
 
@@ -451,7 +482,7 @@ struct cleanup *
 make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
 				     const char *id)
 {
-  ui_out_begin (uiout, ui_out_type_tuple, id);
+  uiout->begin (ui_out_type_tuple, id);
   return make_cleanup_ui_out_end (uiout, ui_out_type_tuple);
 }
 
@@ -459,595 +490,178 @@ struct cleanup *
 make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
 				    const char *id)
 {
-  ui_out_begin (uiout, ui_out_type_list, id);
+  uiout->begin (ui_out_type_list, id);
   return make_cleanup_ui_out_end (uiout, ui_out_type_list);
 }
 
 void
-ui_out_field_int (struct ui_out *uiout,
-		  const char *fldname,
-		  int value)
+ui_out::field_int (const char *fldname, int value)
 {
   int fldno;
   int width;
-  int align;
+  ui_align align;
 
-  verify_field (uiout, &fldno, &width, &align);
+  verify_field (&fldno, &width, &align);
 
-  uo_field_int (uiout, fldno, width, align, fldname, value);
+  do_field_int (fldno, width, align, fldname, value);
 }
 
 void
-ui_out_field_fmt_int (struct ui_out *uiout,
-                      int input_width,
-                      enum ui_align input_align,
-		      const char *fldname,
-		      int value)
+ui_out::field_fmt_int (int input_width, ui_align input_align,
+		       const char *fldname, int value)
 {
   int fldno;
   int width;
-  int align;
+  ui_align align;
 
-  verify_field (uiout, &fldno, &width, &align);
+  verify_field (&fldno, &width, &align);
 
-  uo_field_int (uiout, fldno, input_width, input_align, fldname, value);
+  do_field_int (fldno, input_width, input_align, fldname, value);
 }
 
 /* Documented in ui-out.h.  */
 
 void
-ui_out_field_core_addr (struct ui_out *uiout,
-			const char *fldname,
-			struct gdbarch *gdbarch,
-			CORE_ADDR address)
+ui_out::field_core_addr (const char *fldname, struct gdbarch *gdbarch,
+			 CORE_ADDR address)
 {
-  ui_out_field_string (uiout, fldname,
-		       print_core_address (gdbarch, address));
+  field_string (fldname, print_core_address (gdbarch, address));
 }
 
 void
-ui_out_field_stream (struct ui_out *uiout,
-		     const char *fldname,
-		     struct ui_file *stream)
+ui_out::field_stream (const char *fldname, string_file &stream)
 {
-  long length;
-  char *buffer = ui_file_xstrdup (stream, &length);
-  struct cleanup *old_cleanup = make_cleanup (xfree, buffer);
-
-  if (length > 0)
-    ui_out_field_string (uiout, fldname, buffer);
+  if (!stream.empty ())
+    field_string (fldname, stream.c_str ());
   else
-    ui_out_field_skip (uiout, fldname);
-  ui_file_rewind (stream);
-  do_cleanups (old_cleanup);
+    field_skip (fldname);
+  stream.clear ();
 }
 
 /* Used to omit a field.  */
 
 void
-ui_out_field_skip (struct ui_out *uiout,
-		   const char *fldname)
+ui_out::field_skip (const char *fldname)
 {
   int fldno;
   int width;
-  int align;
+  ui_align align;
 
-  verify_field (uiout, &fldno, &width, &align);
+  verify_field (&fldno, &width, &align);
 
-  uo_field_skip (uiout, fldno, width, align, fldname);
+  do_field_skip (fldno, width, align, fldname);
 }
 
 void
-ui_out_field_string (struct ui_out *uiout,
-		     const char *fldname,
-		     const char *string)
+ui_out::field_string (const char *fldname, const char *string)
 {
   int fldno;
   int width;
-  int align;
+  ui_align align;
 
-  verify_field (uiout, &fldno, &width, &align);
+  verify_field (&fldno, &width, &align);
 
-  uo_field_string (uiout, fldno, width, align, fldname, string);
+  do_field_string (fldno, width, align, fldname, string);
 }
 
 /* VARARGS */
 void
-ui_out_field_fmt (struct ui_out *uiout,
-		  const char *fldname,
-		  const char *format, ...)
+ui_out::field_fmt (const char *fldname, const char *format, ...)
 {
   va_list args;
   int fldno;
   int width;
-  int align;
+  ui_align align;
 
   /* Will not align, but has to call anyway.  */
-  verify_field (uiout, &fldno, &width, &align);
+  verify_field (&fldno, &width, &align);
 
   va_start (args, format);
 
-  uo_field_fmt (uiout, fldno, width, align, fldname, format, args);
+  do_field_fmt (fldno, width, align, fldname, format, args);
 
   va_end (args);
 }
 
 void
-ui_out_spaces (struct ui_out *uiout, int numspaces)
+ui_out::spaces (int numspaces)
 {
-  uo_spaces (uiout, numspaces);
+  do_spaces (numspaces);
 }
 
 void
-ui_out_text (struct ui_out *uiout,
-	     const char *string)
+ui_out::text (const char *string)
 {
-  uo_text (uiout, string);
+  do_text (string);
 }
 
 void
-ui_out_message (struct ui_out *uiout, int verbosity,
-		const char *format,...)
+ui_out::message (const char *format, ...)
 {
   va_list args;
 
   va_start (args, format);
-  uo_message (uiout, verbosity, format, args);
+  do_message (format, args);
   va_end (args);
 }
 
 void
-ui_out_wrap_hint (struct ui_out *uiout, char *identstring)
+ui_out::wrap_hint (const char *identstring)
 {
-  uo_wrap_hint (uiout, identstring);
+  do_wrap_hint (identstring);
 }
 
 void
-ui_out_flush (struct ui_out *uiout)
+ui_out::flush ()
 {
-  uo_flush (uiout);
-}
-
-int
-ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream)
-{
-  return uo_redirect (uiout, outstream);
-}
-
-/* Set the flags specified by the mask given.  */
-int
-ui_out_set_flags (struct ui_out *uiout, int mask)
-{
-  int oldflags = uiout->flags;
-
-  uiout->flags |= mask;
-  return oldflags;
-}
-
-/* Clear the flags specified by the mask given.  */
-int
-ui_out_clear_flags (struct ui_out *uiout, int mask)
-{
-  int oldflags = uiout->flags;
-
-  uiout->flags &= ~mask;
-  return oldflags;
-}
-
-/* Test the flags against the mask given.  */
-int
-ui_out_test_flags (struct ui_out *uiout, int mask)
-{
-  return (uiout->flags & mask);
-}
-
-/* Obtain the current verbosity level (as stablished by the
-   'set verbositylevel' command.  */
-
-int
-ui_out_get_verblvl (struct ui_out *uiout)
-{
-  /* FIXME: not implemented yet.  */
-  return 0;
-}
-
-int
-ui_out_is_mi_like_p (struct ui_out *uiout)
-{
-  return uiout->impl->is_mi_like_p;
-}
-
-/* Default gdb-out hook functions.  */
-
-static void
-default_table_begin (struct ui_out *uiout, int nbrofcols,
-		     int nr_rows,
-		     const char *tblid)
-{
-}
-
-static void
-default_table_body (struct ui_out *uiout)
-{
-}
-
-static void
-default_table_end (struct ui_out *uiout)
-{
-}
-
-static void
-default_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		      const char *col_name,
-		      const char *colhdr)
-{
-}
-
-static void
-default_begin (struct ui_out *uiout,
-	       enum ui_out_type type,
-	       int level,
-	       const char *id)
-{
-}
-
-static void
-default_end (struct ui_out *uiout,
-	     enum ui_out_type type,
-	     int level)
-{
-}
-
-static void
-default_field_int (struct ui_out *uiout, int fldno, int width,
-		   enum ui_align align,
-		   const char *fldname, int value)
-{
-}
-
-static void
-default_field_skip (struct ui_out *uiout, int fldno, int width,
-		    enum ui_align align, const char *fldname)
-{
-}
-
-static void
-default_field_string (struct ui_out *uiout,
-		      int fldno,
-		      int width,
-		      enum ui_align align,
-		      const char *fldname,
-		      const char *string)
-{
-}
-
-static void
-default_field_fmt (struct ui_out *uiout, int fldno, int width,
-		   enum ui_align align,
-		   const char *fldname,
-		   const char *format,
-		   va_list args)
-{
-}
-
-static void
-default_spaces (struct ui_out *uiout, int numspaces)
-{
-}
-
-static void
-default_text (struct ui_out *uiout, const char *string)
-{
-}
-
-static void
-default_message (struct ui_out *uiout, int verbosity,
-		 const char *format,
-		 va_list args)
-{
-}
-
-static void
-default_wrap_hint (struct ui_out *uiout, char *identstring)
-{
-}
-
-static void
-default_flush (struct ui_out *uiout)
-{
-}
-
-static void
-default_data_destroy (struct ui_out *uiout)
-{
-}
-
-/* Interface to the implementation functions.  */
-
-void
-uo_table_begin (struct ui_out *uiout, int nbrofcols,
-		int nr_rows,
-		const char *tblid)
-{
-  if (!uiout->impl->table_begin)
-    return;
-  uiout->impl->table_begin (uiout, nbrofcols, nr_rows, tblid);
-}
-
-void
-uo_table_body (struct ui_out *uiout)
-{
-  if (!uiout->impl->table_body)
-    return;
-  uiout->impl->table_body (uiout);
-}
-
-void
-uo_table_end (struct ui_out *uiout)
-{
-  if (!uiout->impl->table_end)
-    return;
-  uiout->impl->table_end (uiout);
+  do_flush ();
 }
 
 void
-uo_table_header (struct ui_out *uiout, int width, enum ui_align align,
-		 const char *col_name,
-		 const char *colhdr)
+ui_out::redirect (ui_file *outstream)
 {
-  if (!uiout->impl->table_header)
-    return;
-  uiout->impl->table_header (uiout, width, align, col_name, colhdr);
+  do_redirect (outstream);
 }
 
-/* Clear the table associated with UIOUT.  */
-
-static void
-clear_table (struct ui_out *uiout)
-{
-  xfree (uiout->table.id);
-  uiout->table.id = NULL;
-  clear_header_list (uiout);
-}
-
-void
-uo_begin (struct ui_out *uiout,
-	  enum ui_out_type type,
-	  int level,
-	  const char *id)
-{
-  if (uiout->impl->begin == NULL)
-    return;
-  uiout->impl->begin (uiout, type, level, id);
-}
-
-void
-uo_end (struct ui_out *uiout,
-	enum ui_out_type type,
-	int level)
-{
-  if (uiout->impl->end == NULL)
-    return;
-  uiout->impl->end (uiout, type, level);
-}
-
-void
-uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	      const char *fldname,
-	      int value)
-{
-  if (!uiout->impl->field_int)
-    return;
-  uiout->impl->field_int (uiout, fldno, width, align, fldname, value);
-}
-
-void
-uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	       const char *fldname)
-{
-  if (!uiout->impl->field_skip)
-    return;
-  uiout->impl->field_skip (uiout, fldno, width, align, fldname);
-}
-
-void
-uo_field_string (struct ui_out *uiout, int fldno, int width,
-		 enum ui_align align,
-		 const char *fldname,
-		 const char *string)
-{
-  if (!uiout->impl->field_string)
-    return;
-  uiout->impl->field_string (uiout, fldno, width, align, fldname, string);
-}
-
-void
-uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	      const char *fldname,
-	      const char *format,
-	      va_list args)
-{
-  if (!uiout->impl->field_fmt)
-    return;
-  uiout->impl->field_fmt (uiout, fldno, width, align, fldname, format, args);
-}
-
-void
-uo_spaces (struct ui_out *uiout, int numspaces)
-{
-  if (!uiout->impl->spaces)
-    return;
-  uiout->impl->spaces (uiout, numspaces);
-}
-
-void
-uo_text (struct ui_out *uiout,
-	 const char *string)
-{
-  if (!uiout->impl->text)
-    return;
-  uiout->impl->text (uiout, string);
-}
-
-void
-uo_message (struct ui_out *uiout, int verbosity,
-	    const char *format,
-	    va_list args)
-{
-  if (!uiout->impl->message)
-    return;
-  uiout->impl->message (uiout, verbosity, format, args);
-}
-
-void
-uo_wrap_hint (struct ui_out *uiout, char *identstring)
-{
-  if (!uiout->impl->wrap_hint)
-    return;
-  uiout->impl->wrap_hint (uiout, identstring);
-}
-
-void
-uo_flush (struct ui_out *uiout)
-{
-  if (!uiout->impl->flush)
-    return;
-  uiout->impl->flush (uiout);
-}
-
-int
-uo_redirect (struct ui_out *uiout, struct ui_file *outstream)
-{
-  if (!uiout->impl->redirect)
-    return -1;
-  uiout->impl->redirect (uiout, outstream);
-  return 0;
-}
-
-void
-uo_data_destroy (struct ui_out *uiout)
-{
-  if (!uiout->impl->data_destroy)
-    return;
-
-  uiout->impl->data_destroy (uiout);
-}
-
-/* local functions */
-
-/* List of column headers manipulation routines.  */
-
-static void
-clear_header_list (struct ui_out *uiout)
+/* Test the flags against the mask given.  */
+ui_out_flags
+ui_out::test_flags (ui_out_flags mask)
 {
-  while (uiout->table.header_first != NULL)
-    {
-      uiout->table.header_next = uiout->table.header_first;
-      uiout->table.header_first = uiout->table.header_first->next;
-      xfree (uiout->table.header_next->colhdr);
-      xfree (uiout->table.header_next->col_name);
-      xfree (uiout->table.header_next);
-    }
-  gdb_assert (uiout->table.header_first == NULL);
-  uiout->table.header_last = NULL;
-  uiout->table.header_next = NULL;
+  return m_flags & mask;
 }
 
-static void
-append_header_to_list (struct ui_out *uiout,
-		       int width,
-		       int alignment,
-		       const char *col_name,
-		       const char *colhdr)
-{
-  struct ui_out_hdr *temphdr;
-
-  temphdr = XNEW (struct ui_out_hdr);
-  temphdr->width = width;
-  temphdr->alignment = alignment;
-  /* We have to copy the column title as the original may be an
-     automatic.  */
-  if (colhdr != NULL)
-    temphdr->colhdr = xstrdup (colhdr);
-  else
-    temphdr->colhdr = NULL;
-
-  if (col_name != NULL)
-    temphdr->col_name = xstrdup (col_name);
-  else if (colhdr != NULL)
-    temphdr->col_name = xstrdup (colhdr);
-  else
-    temphdr->col_name = NULL;
-
-  temphdr->next = NULL;
-  if (uiout->table.header_first == NULL)
-    {
-      temphdr->colno = 1;
-      uiout->table.header_first = temphdr;
-      uiout->table.header_last = temphdr;
-    }
-  else
-    {
-      temphdr->colno = uiout->table.header_last->colno + 1;
-      uiout->table.header_last->next = temphdr;
-      uiout->table.header_last = temphdr;
-    }
-  uiout->table.header_next = uiout->table.header_last;
-}
-
-/* Extract the format information for the NEXT header and advance
-   the header pointer.  Return 0 if there was no next header.  */
-
-static int
-get_next_header (struct ui_out *uiout,
-		 int *colno,
-		 int *width,
-		 int *alignment,
-		 char **colhdr)
+bool
+ui_out::is_mi_like_p ()
 {
-  /* There may be no headers at all or we may have used all columns.  */
-  if (uiout->table.header_next == NULL)
-    return 0;
-  *colno = uiout->table.header_next->colno;
-  *width = uiout->table.header_next->width;
-  *alignment = uiout->table.header_next->alignment;
-  *colhdr = uiout->table.header_next->colhdr;
-  /* Advance the header pointer to the next entry.  */
-  uiout->table.header_next = uiout->table.header_next->next;
-  return 1;
+  return do_is_mi_like_p ();
 }
 
-
 /* Verify that the field/tuple/list is correctly positioned.  Return
    the field number and corresponding alignment (if
    available/applicable).  */
 
-static void
-verify_field (struct ui_out *uiout, int *fldno, int *width, int *align)
+void
+ui_out::verify_field (int *fldno, int *width, ui_align *align)
 {
-  struct ui_out_level *current = current_level (uiout);
-  char *text;
+  ui_out_level *current = current_level ();
+  const char *text;
 
-  if (uiout->table.flag)
+  if (m_table_up != nullptr
+      && m_table_up->current_state () != ui_out_table::state::BODY)
     {
-      if (!uiout->table.body_flag)
-	internal_error (__FILE__, __LINE__,
-			_("table_body missing; table fields must be \
+      internal_error (__FILE__, __LINE__,
+		      _("table_body missing; table fields must be \
 specified after table_body and inside a list."));
-      /* NOTE: cagney/2001-12-08: There was a check here to ensure
-	 that this code was only executed when uiout->level was
-	 greater than zero.  That no longer applies - this code is run
-	 before each table row tuple is started and at that point the
-	 level is zero.  */
     }
 
-  current->field_count += 1;
+  current->inc_field_count ();
 
-  if (uiout->table.body_flag
-      && uiout->table.entry_level == uiout->level
-      && get_next_header (uiout, fldno, width, align, &text))
+  if (m_table_up != nullptr
+      && m_table_up->current_state () == ui_out_table::state::BODY
+      && m_table_up->entry_level () == level ()
+      && m_table_up->get_next_header (fldno, width, align, &text))
     {
-      if (*fldno != current->field_count)
+      if (*fldno != current->field_count ())
 	internal_error (__FILE__, __LINE__,
 			_("ui-out internal error in handling headers."));
     }
@@ -1055,96 +669,31 @@ specified after table_body and inside a 
     {
       *width = 0;
       *align = ui_noalign;
-      *fldno = current->field_count;
+      *fldno = current->field_count ();
     }
 }
 
-
-/* Access to ui-out members data.  */
-
-void *
-ui_out_data (struct ui_out *uiout)
-{
-  return uiout->data;
-}
-
 /* Access table field parameters.  */
-int
-ui_out_query_field (struct ui_out *uiout, int colno,
-		    int *width, int *alignment, char **col_name)
-{
-  struct ui_out_hdr *hdr;
-
-  if (!uiout->table.flag)
-    return 0;
-
-  for (hdr = uiout->table.header_first; hdr; hdr = hdr->next)
-    if (hdr->colno == colno)
-      {
-	*width = hdr->width;
-	*alignment = hdr->alignment;
-	*col_name = hdr->col_name;
-	return 1;
-      }
 
-  return 0;
-}
-
-/* Initalize private members at startup.  */
-
-struct ui_out *
-ui_out_new (const struct ui_out_impl *impl, void *data,
-	    int flags)
+bool
+ui_out::query_table_field (int colno, int *width, int *alignment,
+			   const char **col_name)
 {
-  struct ui_out *uiout = XNEW (struct ui_out);
-  struct ui_out_level *current = XNEW (struct ui_out_level);
-
-  uiout->data = data;
-  uiout->impl = impl;
-  uiout->flags = flags;
-  uiout->table.flag = 0;
-  uiout->table.body_flag = 0;
-  uiout->level = 0;
-  uiout->levels = NULL;
-
-  /* Create uiout->level 0, the default level.  */
-  current->type = ui_out_type_tuple;
-  current->field_count = 0;
-  VEC_safe_push (ui_out_level_p, uiout->levels, current);
+  if (m_table_up == nullptr)
+    return false;
 
-  uiout->table.id = NULL;
-  uiout->table.header_first = NULL;
-  uiout->table.header_last = NULL;
-  uiout->table.header_next = NULL;
-  return uiout;
+  return m_table_up->query_field (colno, width, alignment, col_name);
 }
 
-/* Free  UIOUT and the memory areas it references.  */
+/* The constructor.  */
 
-void
-ui_out_destroy (struct ui_out *uiout)
+ui_out::ui_out (ui_out_flags flags)
+: m_flags (flags)
 {
-  int i;
-  struct ui_out_level *current;
-
-  /* Make sure that all levels are freed in the case where levels have
-     been pushed, but not popped before the ui_out object is
-     destroyed.  */
-  for (i = 0;
-       VEC_iterate (ui_out_level_p, uiout->levels, i, current);
-       ++i)
-    xfree (current);
-
-  VEC_free (ui_out_level_p, uiout->levels);
-  uo_data_destroy (uiout);
-  clear_table (uiout);
-  xfree (uiout);
+  /* Create the ui-out level #1, the default level.  */
+  push_level (ui_out_type_tuple);
 }
 
-/* Standard gdb initialization hook.  */
-
-void
-_initialize_ui_out (void)
+ui_out::~ui_out ()
 {
-  /* nothing needs to be done */
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-out.h ./gdb/ui-out.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/ui-out.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/ui-out.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Output generating routines for GDB.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
    Written by Fernando Nasser for Cygnus.
@@ -23,16 +23,20 @@
 #ifndef UI_OUT_H
 #define UI_OUT_H 1
 
-/* The ui_out structure */
+#include <vector>
 
-struct ui_out;
+#include "common/enum-flags.h"
+
+class ui_out_level;
+class ui_out_table;
 struct ui_file;
 
 /* the current ui_out */
 
 /* FIXME: This should not be a global but something passed down from main.c
    or top.c.  */
-extern struct ui_out *current_uiout;
+extern struct ui_out **current_ui_current_uiout_ptr (void);
+#define current_uiout (*current_ui_current_uiout_ptr ())
 
 /* alignment enum */
 enum ui_align
@@ -44,12 +48,12 @@ enum ui_align
   };
 
 /* flags enum */
-enum ui_flags
+enum ui_out_flag
   {
-    ui_from_tty = 1,
-    ui_source_list = 2
+    ui_source_list = (1 << 0),
   };
 
+DEF_ENUM_FLAGS_TYPE (ui_out_flag, ui_out_flags);
 
 /* Prototypes for ui-out API.  */
 
@@ -62,26 +66,6 @@ enum ui_out_type
     ui_out_type_list
   };
 
-extern void ui_out_begin (struct ui_out *uiout,
-			  enum ui_out_type level_type,
-			  const char *id);
-
-extern void ui_out_end (struct ui_out *uiout, enum ui_out_type type);
-
-extern struct cleanup *ui_out_begin_cleanup_end (struct ui_out *uiout,
-						 enum ui_out_type level_type,
-						 const char *id);
-
-/* A table can be considered a special tuple/list combination with the
-   implied structure: ``table = { hdr = { header, ... } , body = [ {
-   field, ... }, ... ] }''.  If NR_ROWS is negative then there is at
-   least one row.  */
-extern void ui_out_table_header (struct ui_out *uiout, int width,
-				 enum ui_align align, const char *col_name,
-				 const char *colhdr);
-
-extern void ui_out_table_body (struct ui_out *uiout);
-
 extern struct cleanup *make_cleanup_ui_out_table_begin_end (struct ui_out *ui_out,
                                                             int nr_cols,
 							    int nr_rows,
@@ -94,156 +78,146 @@ extern struct cleanup *make_cleanup_ui_o
 extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
 							    const char *id);
 
-extern void ui_out_field_int (struct ui_out *uiout, const char *fldname,
-			      int value);
-
-extern void ui_out_field_fmt_int (struct ui_out *uiout, int width,
-				  enum ui_align align, const char *fldname, 
-		 		  int value);
-
-/* Output a field containing an address.  */
-
-extern void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname,
-				    struct gdbarch *gdbarch, CORE_ADDR address);
-
-extern void ui_out_field_string (struct ui_out * uiout, const char *fldname,
-				 const char *string);
-
-extern void ui_out_field_stream (struct ui_out *uiout, const char *fldname,
-				 struct ui_file *stream);
-
-extern void ui_out_field_fmt (struct ui_out *uiout, const char *fldname,
-			      const char *format, ...)
-     ATTRIBUTE_PRINTF (3, 4);
-
-extern void ui_out_field_skip (struct ui_out *uiout, const char *fldname);
-
-extern void ui_out_spaces (struct ui_out *uiout, int numspaces);
-
-extern void ui_out_text (struct ui_out *uiout, const char *string);
-
-extern void ui_out_message (struct ui_out *uiout, int verbosity,
-			    const char *format, ...)
-     ATTRIBUTE_PRINTF (3, 4);
-
-extern void ui_out_wrap_hint (struct ui_out *uiout, char *identstring);
-
-extern void ui_out_flush (struct ui_out *uiout);
-
-extern int ui_out_set_flags (struct ui_out *uiout, int mask);
-
-extern int ui_out_clear_flags (struct ui_out *uiout, int mask);
-
-extern int ui_out_get_verblvl (struct ui_out *uiout);
-
-extern int ui_out_test_flags (struct ui_out *uiout, int mask);
-
-extern int ui_out_query_field (struct ui_out *uiout, int colno,
-			       int *width, int *alignment, char **col_name);
-
-/* HACK: Code in GDB is currently checking to see the type of ui_out
-   builder when determining which output to produce.  This function is
-   a hack to encapsulate that test.  Once GDB manages to separate the
-   CLI/MI from the core of GDB the problem should just go away ....  */
-
-extern int ui_out_is_mi_like_p (struct ui_out *uiout);
-
-/* From here on we have things that are only needed by implementation
-   routines and main.c.   We should pehaps have a separate file for that,
-   like a  ui-out-impl.h  file.  */
-
-/* User Interface Output Implementation Function Table */
-
-/* Type definition of all implementation functions.  */
-
-typedef void (table_begin_ftype) (struct ui_out * uiout,
-				  int nbrofcols, int nr_rows,
-				  const char *tblid);
-typedef void (table_body_ftype) (struct ui_out * uiout);
-typedef void (table_end_ftype) (struct ui_out * uiout);
-typedef void (table_header_ftype) (struct ui_out * uiout, int width,
-				   enum ui_align align, const char *col_name,
-				   const char *colhdr);
-/* Note: level 0 is the top-level so LEVEL is always greater than
-   zero.  */
-typedef void (ui_out_begin_ftype) (struct ui_out *uiout,
-				   enum ui_out_type type,
-				   int level, const char *id);
-typedef void (ui_out_end_ftype) (struct ui_out *uiout,
-				 enum ui_out_type type,
-				 int level);
-typedef void (field_int_ftype) (struct ui_out * uiout, int fldno, int width,
-				enum ui_align align,
-				const char *fldname, int value);
-typedef void (field_skip_ftype) (struct ui_out * uiout, int fldno, int width,
-				 enum ui_align align,
-				 const char *fldname);
-typedef void (field_string_ftype) (struct ui_out * uiout, int fldno, int width,
-				   enum ui_align align,
-				   const char *fldname,
-				   const char *string);
-typedef void (field_fmt_ftype) (struct ui_out * uiout, int fldno, int width,
-				enum ui_align align,
-				const char *fldname,
-				const char *format,
-				va_list args) ATTRIBUTE_FPTR_PRINTF(6,0);
-typedef void (spaces_ftype) (struct ui_out * uiout, int numspaces);
-typedef void (text_ftype) (struct ui_out * uiout,
-			   const char *string);
-typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
-			      const char *format, va_list args)
-     ATTRIBUTE_FPTR_PRINTF(3,0);
-typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
-typedef void (flush_ftype) (struct ui_out * uiout);
-typedef int (redirect_ftype) (struct ui_out * uiout,
-			      struct ui_file * outstream);
-typedef void (data_destroy_ftype) (struct ui_out *uiout);
-
-/* ui-out-impl */
-
-/* IMPORTANT: If you change this structure, make sure to change the default
-   initialization in ui-out.c.  */
+class ui_out
+{
+ public:
+
+  explicit ui_out (ui_out_flags flags = 0);
+  virtual ~ui_out ();
+
+  void push_level (ui_out_type type);
+  void pop_level (ui_out_type type);
+
+  /* A table can be considered a special tuple/list combination with the
+     implied structure: ``table = { hdr = { header, ... } , body = [ {
+     field, ... }, ... ] }''.  If NR_ROWS is negative then there is at
+     least one row.  */
+
+  void table_begin (int nr_cols, int nr_rows, const std::string &tblid);
+  void table_header (int width, ui_align align, const std::string &col_name,
+		     const std::string &col_hdr);
+  void table_body ();
+  void table_end ();
+
+  void begin (ui_out_type type, const char *id);
+  void end (ui_out_type type);
+
+  void field_int (const char *fldname, int value);
+  void field_fmt_int (int width, ui_align align, const char *fldname,
+		      int value);
+  void field_core_addr (const char *fldname, struct gdbarch *gdbarch,
+			CORE_ADDR address);
+  void field_string (const char *fldname, const char *string);
+  void field_stream (const char *fldname, string_file &stream);
+  void field_skip (const char *fldname);
+  void field_fmt (const char *fldname, const char *format, ...)
+    ATTRIBUTE_PRINTF (3, 4);
+
+  void spaces (int numspaces);
+  void text (const char *string);
+  void message (const char *format, ...) ATTRIBUTE_PRINTF (2, 3);
+  void wrap_hint (const char *identstring);
+
+  void flush ();
+
+  /* Redirect the output of a ui_out object temporarily.  */
+  void redirect (ui_file *outstream);
+
+  ui_out_flags test_flags (ui_out_flags mask);
+
+  /* HACK: Code in GDB is currently checking to see the type of ui_out
+     builder when determining which output to produce.  This function is
+     a hack to encapsulate that test.  Once GDB manages to separate the
+     CLI/MI from the core of GDB the problem should just go away ....  */
+
+  bool is_mi_like_p ();
+
+  bool query_table_field (int colno, int *width, int *alignment,
+			  const char **col_name);
+
+ protected:
+
+  virtual void do_table_begin (int nbrofcols, int nr_rows, const char *tblid)
+    = 0;
+  virtual void do_table_body () = 0;
+  virtual void do_table_end () = 0;
+  virtual void do_table_header (int width, ui_align align,
+				const std::string &col_name,
+				const std::string &col_hdr) = 0;
+
+  virtual void do_begin (ui_out_type type, const char *id) = 0;
+  virtual void do_end (ui_out_type type) = 0;
+  virtual void do_field_int (int fldno, int width, ui_align align,
+			     const char *fldname, int value) = 0;
+  virtual void do_field_skip (int fldno, int width, ui_align align,
+			      const char *fldname) = 0;
+  virtual void do_field_string (int fldno, int width, ui_align align,
+				const char *fldname, const char *string) = 0;
+  virtual void do_field_fmt (int fldno, int width, ui_align align,
+			     const char *fldname, const char *format,
+			     va_list args)
+    ATTRIBUTE_PRINTF (6,0) = 0;
+  virtual void do_spaces (int numspaces) = 0;
+  virtual void do_text (const char *string) = 0;
+  virtual void do_message (const char *format, va_list args)
+    ATTRIBUTE_PRINTF (2,0) = 0;
+  virtual void do_wrap_hint (const char *identstring) = 0;
+  virtual void do_flush () = 0;
+  virtual void do_redirect (struct ui_file *outstream) = 0;
+
+  /* Set as not MI-like by default.  It is overridden in subclasses if
+     necessary.  */
+
+  virtual bool do_is_mi_like_p ()
+  { return false; }
+
+ private:
+
+  ui_out_flags m_flags;
+
+  /* Vector to store and track the ui-out levels.  */
+  std::vector<std::unique_ptr<ui_out_level>> m_levels;
+
+  /* A table, if any.  At present only a single table is supported.  */
+  std::unique_ptr<ui_out_table> m_table_up;
+
+  void verify_field (int *fldno, int *width, ui_align *align);
+
+  int level () const;
+  ui_out_level *current_level () const;
+};
+
+/* This is similar to make_cleanup_ui_out_tuple_begin_end and
+   make_cleanup_ui_out_list_begin_end, but written as an RAII template
+   class.  It takes the ui_out_type as a template parameter.  Normally
+   this is used via the typedefs ui_out_emit_tuple and
+   ui_out_emit_list.  */
+template<ui_out_type Type>
+class ui_out_emit_type
+{
+public:
 
-struct ui_out_impl
+  ui_out_emit_type (struct ui_out *uiout, const char *id)
+    : m_uiout (uiout)
   {
-    table_begin_ftype *table_begin;
-    table_body_ftype *table_body;
-    table_end_ftype *table_end;
-    table_header_ftype *table_header;
-    ui_out_begin_ftype *begin;
-    ui_out_end_ftype *end;
-    field_int_ftype *field_int;
-    field_skip_ftype *field_skip;
-    field_string_ftype *field_string;
-    field_fmt_ftype *field_fmt;
-    spaces_ftype *spaces;
-    text_ftype *text;
-    message_ftype *message;
-    wrap_hint_ftype *wrap_hint;
-    flush_ftype *flush;
-    redirect_ftype *redirect;
-    data_destroy_ftype *data_destroy;
-    int is_mi_like_p;
-  };
-
-extern void *ui_out_data (struct ui_out *uiout);
-
-extern void uo_field_string (struct ui_out *uiout, int fldno, int width,
-			     enum ui_align align, const char *fldname,
-			     const char *string);
+    uiout->begin (Type, id);
+  }
 
-/* Create a ui_out object */
-
-extern struct ui_out *ui_out_new (const struct ui_out_impl *impl,
-				  void *data,
-				  int flags);
+  ~ui_out_emit_type ()
+  {
+    m_uiout->end (Type);
+  }
 
-/* Destroy a ui_out object.  */
+  ui_out_emit_type (const ui_out_emit_type<Type> &) = delete;
+  ui_out_emit_type<Type> &operator= (const ui_out_emit_type<Type> &)
+      = delete;
 
-extern void ui_out_destroy (struct ui_out *uiout);
+private:
 
-/* Redirect the ouptut of a ui_out object temporarily.  */
+  struct ui_out *m_uiout;
+};
 
-extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream);
+typedef ui_out_emit_type<ui_out_type_tuple> ui_out_emit_tuple;
+typedef ui_out_emit_type<ui_out_type_list> ui_out_emit_list;
 
 #endif /* UI_OUT_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/unittests/function-view-selftests.c ./gdb/unittests/function-view-selftests.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/unittests/function-view-selftests.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/unittests/function-view-selftests.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,178 @@
+/* Self tests for function_view for GDB, the GNU debugger.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "selftest.h"
+#include "common/function-view.h"
+
+namespace selftests {
+namespace function_view {
+
+static int
+plus_one_fn_int (int val)
+{
+  return ++val;
+}
+
+static short
+plus_one_fn_short (short val)
+{
+  return ++val;
+}
+
+static int
+call_callback_int (int val, gdb::function_view <int (int)> callback)
+{
+  return callback (val);
+}
+
+static void
+call_callback_void (int val, gdb::function_view <void (int)> callback)
+{
+  callback (val);
+}
+
+struct plus_one_int_func_obj
+{
+  int operator () (int val)
+  {
+    ++call_count;
+    return ++val;
+  }
+
+  /* Number of times called.  */
+  int call_count = 0;
+};
+
+static void
+run_tests ()
+{
+  /* A simple lambda.  */
+  auto plus_one_lambda = [] (int val) { return ++val; };
+
+  /* A function_view that references the lambda.  */
+  gdb::function_view<int (int)> plus_one_func_view (plus_one_lambda);
+
+  /* Check calling the lambda directly.  */
+  SELF_CHECK (plus_one_lambda (0) == 1);
+  SELF_CHECK (plus_one_lambda (1) == 2);
+
+  /* Check calling lambda via the view.  */
+  SELF_CHECK (plus_one_func_view (2) == 3);
+  SELF_CHECK (plus_one_func_view (3) == 4);
+
+  /* Check calling a function that takes a function_view as argument,
+     by value.  Pass a lambda, making sure a function_view is properly
+     constructed implicitly.  */
+  SELF_CHECK (call_callback_int (1, [] (int val)
+    {
+      return val + 2;
+    }) == 3);
+
+  /* Same, passing a named/lvalue lambda.  */
+  SELF_CHECK (call_callback_int (1, plus_one_lambda) == 2);
+  /* Same, passing a named/lvalue function_view (should copy).  */
+  SELF_CHECK (call_callback_int (1, plus_one_func_view) == 2);
+
+  /* Check constructing a function view over a function-object
+     callable, and calling it.  */
+  plus_one_int_func_obj func_obj;
+  SELF_CHECK (func_obj (0) == 1);
+  SELF_CHECK (call_callback_int (1, func_obj) == 2);
+  /* Check that the callable was referenced, not copied.  */
+  SELF_CHECK (func_obj.call_count == 2);
+
+  /* Check constructing a function_view over a free-function callable,
+     and calling it.  */
+  SELF_CHECK (call_callback_int (1, plus_one_fn_int) == 2);
+
+  /* Check calling a function with a
+     compatible-but-not-exactly-the-same prototype.  */
+  SELF_CHECK (call_callback_int (1, [] (short val) -> short
+    {
+      return val + 2;
+    }) == 3);
+  /* Same, but passing a function pointer.  */
+  SELF_CHECK (call_callback_int (1, plus_one_fn_short) == 2);
+
+  /* Like std::function, a function_view that expects a void return
+     can reference callables with non-void return type.  The result is
+     simply discarded.  Check a lambda, function object and a function
+     pointer.  */
+  call_callback_void (1, [] (int val) -> int
+    {
+      return val + 2;
+    });
+  call_callback_void (1, func_obj);
+  call_callback_void (1, plus_one_fn_int);
+
+  /* Check that the main ctor doesn't hijack the copy ctor.  */
+  auto plus_one_func_view2 (plus_one_func_view);
+  auto plus_one_func_view3 (plus_one_func_view2);
+  static_assert (std::is_same<decltype (plus_one_func_view),
+		 decltype (plus_one_func_view2)>::value, "");
+  static_assert (std::is_same<decltype (plus_one_func_view),
+		 decltype (plus_one_func_view3)>::value, "");
+
+  SELF_CHECK (plus_one_func_view3 (1) == 2);
+
+  /* Likewise, but propagate a NULL callable.  If this calls the main
+     function_view ctor instead of the copy ctor by mistake, then
+     null_func_2 ends up non-NULL (because it'd instead reference
+     null_func_1 as just another callable).  */
+  constexpr gdb::function_view<int (int)> null_func_view_1 = nullptr;
+  constexpr auto null_func_view_2 (null_func_view_1);
+
+  /* While at it, check whether the function_view is bound using
+     various forms, op==, op!= and op bool.  */
+
+  /* op== */
+  static_assert (null_func_view_2 == nullptr, "");
+  static_assert (nullptr == null_func_view_2, "");
+  static_assert (null_func_view_2 == NULL, "");
+  static_assert (NULL == null_func_view_2, "");
+
+  /* op!= */
+  static_assert (!(null_func_view_2 != nullptr), "");
+  static_assert (!(nullptr != null_func_view_2), "");
+  static_assert (!(null_func_view_2 != NULL), "");
+  static_assert (!(NULL != null_func_view_2), "");
+
+  /* op bool */
+  static_assert (!null_func_view_2, "");
+
+  /* Check the nullptr_t ctor.  */
+  constexpr gdb::function_view<int (int)> check_ctor_nullptr (nullptr);
+  static_assert (!check_ctor_nullptr, "");
+
+  /* Check the nullptr_t op= */
+  gdb::function_view<int (int)> check_op_eq_null (plus_one_fn_int);
+  SELF_CHECK (check_op_eq_null);
+  check_op_eq_null = nullptr;
+  SELF_CHECK (!check_op_eq_null);
+}
+
+} /* namespace function_view */
+} /* namespace selftests */
+
+void
+_initialize_function_view_selftests ()
+{
+  register_self_test (selftests::function_view::run_tests);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/unwind_stop_reasons.def ./gdb/unwind_stop_reasons.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/unwind_stop_reasons.def	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/unwind_stop_reasons.def	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/user-regs.c ./gdb/user-regs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/user-regs.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/user-regs.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* User visible, per-frame registers, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -112,13 +112,14 @@ void
 user_reg_add (struct gdbarch *gdbarch, const char *name,
 	      user_reg_read_ftype *read, const void *baton)
 {
-  struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+  struct gdb_user_regs *regs
+    = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
 
   if (regs == NULL)
     {
       /* ULGH, called during architecture initialization.  Patch
          things up.  */
-      regs = user_regs_init (gdbarch);
+      regs = (struct gdb_user_regs *) user_regs_init (gdbarch);
       deprecated_set_gdbarch_data (gdbarch, user_regs_data, regs);
     }
   append_user_reg (regs, name, read, baton,
@@ -154,7 +155,8 @@ user_reg_map_name_to_regnum (struct gdba
 
   /* Search the user name space.  */
   {
-    struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+    struct gdb_user_regs *regs
+      = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
     struct user_reg *reg;
     int nr;
 
@@ -174,7 +176,8 @@ user_reg_map_name_to_regnum (struct gdba
 static struct user_reg *
 usernum_to_user_reg (struct gdbarch *gdbarch, int usernum)
 {
-  struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+  struct gdb_user_regs *regs
+    = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
   struct user_reg *reg;
 
   for (reg = regs->first; reg != NULL; reg = reg->next)
@@ -226,7 +229,7 @@ maintenance_print_user_registers (char *
   struct user_reg *reg;
   int regnum;
 
-  regs = gdbarch_data (gdbarch, user_regs_data);
+  regs = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
   regnum = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
 
   fprintf_unfiltered (gdb_stdout, " %-11s %3s\n", "Name", "Nr");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/user-regs.h ./gdb/user-regs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/user-regs.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/user-regs.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Per-frame user registers, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils.c ./gdb/utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/utils.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* General utility routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dyn-string.h"
 #include <ctype.h>
 #include "gdb_wait.h"
 #include "event-top.h"
@@ -38,7 +37,6 @@
 #endif
 
 #include <signal.h>
-#include "timeval-utils.h"
 #include "gdbcmd.h"
 #include "serial.h"
 #include "bfd.h"
@@ -62,8 +60,7 @@
 
 #include "readline/readline.h"
 
-#include <sys/time.h>
-#include <time.h>
+#include <chrono>
 
 #include "gdb_usleep.h"
 #include "interps.h"
@@ -99,7 +96,7 @@ static void set_width (void);
    Modified in prompt_for_continue and defaulted_query.
    Used in report_command_stats.  */
 
-static struct timeval prompt_for_continue_wait_time;
+static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
 
 /* A flag indicating whether to timestamp debugging messages.  */
 
@@ -109,19 +106,6 @@ static int debug_timestamp = 0;
 
 int job_control;
 
-/* Nonzero means quit immediately if Control-C is typed now, rather
-   than waiting until QUIT is executed.  Be careful in setting this;
-   code which executes with immediate_quit set has to be very careful
-   about being able to deal with being interrupted at any time.  It is
-   almost always better to use QUIT; the only exception I can think of
-   is being able to quit out of a system call (using EINTR loses if
-   the SIGINT happens between the previous QUIT and the system call).
-   To immediately quit in the case in which a SIGINT happens between
-   the previous QUIT and setting immediate_quit (desirable anytime we
-   expect to block), call QUIT after setting immediate_quit.  */
-
-int immediate_quit;
-
 /* Nonzero means that strings with character values >0x7F should be printed
    as octal escapes.  Zero means just print the value (e.g. it's an
    international character, and the terminal or window can cope.)  */
@@ -167,36 +151,12 @@ make_cleanup_freeargv (char **arg)
   return make_cleanup (do_freeargv, arg);
 }
 
-static void
-do_dyn_string_delete (void *arg)
-{
-  dyn_string_delete ((dyn_string_t) arg);
-}
-
-struct cleanup *
-make_cleanup_dyn_string_delete (dyn_string_t arg)
-{
-  return make_cleanup (do_dyn_string_delete, arg);
-}
-
-static void
-do_bfd_close_cleanup (void *arg)
-{
-  gdb_bfd_unref (arg);
-}
-
-struct cleanup *
-make_cleanup_bfd_unref (bfd *abfd)
-{
-  return make_cleanup (do_bfd_close_cleanup, abfd);
-}
-
 /* Helper function which does the work for make_cleanup_fclose.  */
 
 static void
 do_fclose_cleanup (void *arg)
 {
-  FILE *file = arg;
+  FILE *file = (FILE *) arg;
 
   fclose (file);
 }
@@ -214,7 +174,7 @@ make_cleanup_fclose (FILE *file)
 static void
 do_obstack_free (void *arg)
 {
-  struct obstack *ob = arg;
+  struct obstack *ob = (struct obstack *) arg;
 
   obstack_free (ob, NULL);
 }
@@ -227,27 +187,14 @@ make_cleanup_obstack_free (struct obstac
   return make_cleanup (do_obstack_free, obstack);
 }
 
-static void
-do_ui_file_delete (void *arg)
-{
-  ui_file_delete (arg);
-}
-
-struct cleanup *
-make_cleanup_ui_file_delete (struct ui_file *arg)
-{
-  return make_cleanup (do_ui_file_delete, arg);
-}
-
 /* Helper function for make_cleanup_ui_out_redirect_pop.  */
 
 static void
 do_ui_out_redirect_pop (void *arg)
 {
-  struct ui_out *uiout = arg;
+  struct ui_out *uiout = (struct ui_out *) arg;
 
-  if (ui_out_redirect (uiout, NULL) < 0)
-    warning (_("Cannot restore redirection of the current output protocol"));
+  uiout->redirect (NULL);
 }
 
 /* Return a new cleanup that pops the last redirection by ui_out_redirect
@@ -262,7 +209,7 @@ make_cleanup_ui_out_redirect_pop (struct
 static void
 do_free_section_addr_info (void *arg)
 {
-  free_section_addr_info (arg);
+  free_section_addr_info ((struct section_addr_info *) arg);
 }
 
 struct cleanup *
@@ -280,7 +227,8 @@ struct restore_integer_closure
 static void
 restore_integer (void *p)
 {
-  struct restore_integer_closure *closure = p;
+  struct restore_integer_closure *closure
+    = (struct restore_integer_closure *) p;
 
   *(closure->variable) = closure->value;
 }
@@ -291,8 +239,7 @@ restore_integer (void *p)
 struct cleanup *
 make_cleanup_restore_integer (int *variable)
 {
-  struct restore_integer_closure *c =
-    xmalloc (sizeof (struct restore_integer_closure));
+  struct restore_integer_closure *c = XNEW (struct restore_integer_closure);
 
   c->variable = variable;
   c->value = *variable;
@@ -314,7 +261,7 @@ make_cleanup_restore_uinteger (unsigned 
 static void
 do_unpush_target (void *arg)
 {
-  struct target_ops *ops = arg;
+  struct target_ops *ops = (struct target_ops *) arg;
 
   unpush_target (ops);
 }
@@ -327,52 +274,6 @@ make_cleanup_unpush_target (struct targe
   return make_cleanup (do_unpush_target, ops);
 }
 
-/* Helper for make_cleanup_htab_delete compile time checking the types.  */
-
-static void
-do_htab_delete_cleanup (void *htab_voidp)
-{
-  htab_t htab = htab_voidp;
-
-  htab_delete (htab);
-}
-
-/* Return a new cleanup that deletes HTAB.  */
-
-struct cleanup *
-make_cleanup_htab_delete (htab_t htab)
-{
-  return make_cleanup (do_htab_delete_cleanup, htab);
-}
-
-struct restore_ui_file_closure
-{
-  struct ui_file **variable;
-  struct ui_file *value;
-};
-
-static void
-do_restore_ui_file (void *p)
-{
-  struct restore_ui_file_closure *closure = p;
-
-  *(closure->variable) = closure->value;
-}
-
-/* Remember the current value of *VARIABLE and make it restored when
-   the cleanup is run.  */
-
-struct cleanup *
-make_cleanup_restore_ui_file (struct ui_file **variable)
-{
-  struct restore_ui_file_closure *c = XNEW (struct restore_ui_file_closure);
-
-  c->variable = variable;
-  c->value = *variable;
-
-  return make_cleanup_dtor (do_restore_ui_file, (void *) c, xfree);
-}
-
 /* Helper for make_cleanup_value_free_to_mark.  */
 
 static void
@@ -395,7 +296,7 @@ make_cleanup_value_free_to_mark (struct 
 static void
 do_value_free (void *value)
 {
-  value_free (value);
+  value_free ((struct value *) value);
 }
 
 /* Free VALUE.  */
@@ -411,7 +312,7 @@ make_cleanup_value_free (struct value *v
 static void
 do_free_so (void *arg)
 {
-  struct so_list *so = arg;
+  struct so_list *so = (struct so_list *) arg;
 
   free_so (so);
 }
@@ -429,7 +330,7 @@ make_cleanup_free_so (struct so_list *so
 static void
 do_restore_current_language (void *p)
 {
-  enum language saved_lang = (uintptr_t) p;
+  enum language saved_lang = (enum language) (uintptr_t) p;
 
   set_language (saved_lang);
 }
@@ -475,7 +376,7 @@ make_cleanup_clear_parser_state (struct 
 void
 free_current_contents (void *ptr)
 {
-  void **location = ptr;
+  void **location = (void **) ptr;
 
   if (location == NULL)
     internal_error (__FILE__, __LINE__,
@@ -502,8 +403,13 @@ vwarning (const char *string, va_list ar
     (*deprecated_warning_hook) (string, args);
   else
     {
+      struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+
       if (target_supports_terminal_ours ())
-	target_terminal_ours ();
+	{
+	  make_cleanup_restore_target_terminal ();
+	  target_terminal_ours_for_output ();
+	}
       if (filtered_printing_initialized ())
 	wrap_here ("");		/* Force out any buffered output.  */
       gdb_flush (gdb_stdout);
@@ -511,6 +417,8 @@ vwarning (const char *string, va_list ar
 	fputs_unfiltered (warning_pre_print, gdb_stderr);
       vfprintf_unfiltered (gdb_stderr, string, args);
       fprintf_unfiltered (gdb_stderr, "\n");
+
+      do_cleanups (old_chain);
     }
 }
 
@@ -525,12 +433,9 @@ verror (const char *string, va_list args
 }
 
 void
-error_stream (struct ui_file *stream)
+error_stream (const string_file &stream)
 {
-  char *message = ui_file_xstrdup (stream, NULL);
-
-  make_cleanup (xfree, message);
-  error (("%s"), message);
+  error (("%s"), stream.c_str ());
 }
 
 /* Emit a message and abort.  */
@@ -708,7 +613,10 @@ internal_vproblem (struct internal_probl
 
   /* Try to get the message out and at the start of a new line.  */
   if (target_supports_terminal_ours ())
-    target_terminal_ours ();
+    {
+      make_cleanup_restore_target_terminal ();
+      target_terminal_ours_for_output ();
+    }
   if (filtered_printing_initialized ())
     begin_line ();
 
@@ -860,8 +768,8 @@ add_internal_problem_command (struct int
   char *set_doc;
   char *show_doc;
 
-  set_cmd_list = xmalloc (sizeof (*set_cmd_list));
-  show_cmd_list = xmalloc (sizeof (*set_cmd_list));
+  set_cmd_list = XNEW (struct cmd_list_element *);
+  show_cmd_list = XNEW (struct cmd_list_element *);
   *set_cmd_list = NULL;
   *show_cmd_list = NULL;
 
@@ -1020,10 +928,12 @@ print_sys_errmsg (const char *string, in
 void
 quit (void)
 {
+  struct ui *ui = current_ui;
+
   if (sync_quit_force_run)
     {
       sync_quit_force_run = 0;
-      quit_force (NULL, stdin == instream);
+      quit_force (NULL, 0);
     }
 
 #ifdef __MSDOS__
@@ -1041,6 +951,20 @@ quit (void)
 #endif
 }
 
+/* See defs.h.  */
+
+void
+maybe_quit (void)
+{
+  if (sync_quit_force_run)
+    quit ();
+
+  quit_handler ();
+
+  if (deprecated_interactive_hook)
+    deprecated_interactive_hook ();
+}
+
 
 /* Called when a memory allocation fails, with the number of bytes of
    memory requested in SIZE.  */
@@ -1091,7 +1015,7 @@ print_spaces (int n, struct ui_file *fil
 /* Print a host address.  */
 
 void
-gdb_print_host_address (const void *addr, struct ui_file *stream)
+gdb_print_host_address_1 (const void *addr, struct ui_file *stream)
 {
   fprintf_filtered (stream, "%s", host_address_to_string (addr));
 }
@@ -1101,7 +1025,7 @@ gdb_print_host_address (const void *addr
 char *
 make_hex_string (const gdb_byte *data, size_t length)
 {
-  char *result = xmalloc (length * 2 + 1);
+  char *result = (char *) xmalloc (length * 2 + 1);
   char *p;
   size_t i;
 
@@ -1119,7 +1043,7 @@ make_hex_string (const gdb_byte *data, s
 static void
 do_regfree_cleanup (void *r)
 {
-  regfree (r);
+  regfree ((regex_t *) r);
 }
 
 /* Create a new cleanup that frees the compiled regular expression R.  */
@@ -1137,7 +1061,7 @@ char *
 get_regcomp_error (int code, regex_t *rx)
 {
   size_t length = regerror (code, rx, NULL, 0);
-  char *result = xmalloc (length);
+  char *result = (char *) xmalloc (length);
 
   regerror (code, rx, result, length);
   return result;
@@ -1166,6 +1090,33 @@ compile_rx_or_error (regex_t *pattern, c
   return make_regfree_cleanup (pattern);
 }
 
+/* A cleanup that simply calls ui_unregister_input_event_handler.  */
+
+static void
+ui_unregister_input_event_handler_cleanup (void *ui)
+{
+  ui_unregister_input_event_handler ((struct ui *) ui);
+}
+
+/* Set up to handle input.  */
+
+static struct cleanup *
+prepare_to_handle_input (void)
+{
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup_restore_target_terminal ();
+  target_terminal_ours ();
+
+  ui_register_input_event_handler (current_ui);
+  if (current_ui->prompt_state == PROMPT_BLOCKED)
+    make_cleanup (ui_unregister_input_event_handler_cleanup, current_ui);
+
+  make_cleanup_override_quit_handler (default_quit_handler);
+
+  return old_chain;
+}
+
 
 
 /* This function supports the query, nquery, and yquery functions.
@@ -1186,9 +1137,7 @@ defaulted_query (const char *ctlstr, con
   int def_value;
   char def_answer, not_def_answer;
   char *y_string, *n_string, *question, *prompt;
-  /* Used to add duration we waited for user to respond to
-     prompt_for_continue_wait_time.  */
-  struct timeval prompt_started, prompt_ended, prompt_delta;
+  struct cleanup *old_chain;
 
   /* Set up according to which answer is the default.  */
   if (defchar == '\0')
@@ -1225,8 +1174,14 @@ defaulted_query (const char *ctlstr, con
      question we're asking, and then answer the default automatically.  This
      way, important error messages don't get lost when talking to GDB
      over a pipe.  */
-  if (! input_from_terminal_p ())
+  if (current_ui->instream != current_ui->stdin_stream
+      || !input_interactive_p (current_ui)
+      /* Restrict queries to the main UI.  */
+      || current_ui != main_ui)
     {
+      old_chain = make_cleanup_restore_target_terminal ();
+
+      target_terminal_ours_for_output ();
       wrap_here ("");
       vfprintf_filtered (gdb_stdout, ctlstr, args);
 
@@ -1235,24 +1190,35 @@ defaulted_query (const char *ctlstr, con
 		       y_string, n_string, def_answer);
       gdb_flush (gdb_stdout);
 
+      do_cleanups (old_chain);
       return def_value;
     }
 
   if (deprecated_query_hook)
     {
-      return deprecated_query_hook (ctlstr, args);
+      int res;
+
+      old_chain = make_cleanup_restore_target_terminal ();
+      res = deprecated_query_hook (ctlstr, args);
+      do_cleanups (old_chain);
+      return res;
     }
 
   /* Format the question outside of the loop, to avoid reusing args.  */
   question = xstrvprintf (ctlstr, args);
+  old_chain = make_cleanup (xfree, question);
   prompt = xstrprintf (_("%s%s(%s or %s) %s"),
 		      annotation_level > 1 ? "\n\032\032pre-query\n" : "",
 		      question, y_string, n_string,
 		      annotation_level > 1 ? "\n\032\032query\n" : "");
-  xfree (question);
+  make_cleanup (xfree, prompt);
+
+  /* Used to add duration we waited for user to respond to
+     prompt_for_continue_wait_time.  */
+  using namespace std::chrono;
+  steady_clock::time_point prompt_started = steady_clock::now ();
 
-  /* Used for calculating time spend waiting for user.  */
-  gettimeofday (&prompt_started, NULL);
+  prepare_to_handle_input ();
 
   while (1)
     {
@@ -1295,14 +1261,11 @@ defaulted_query (const char *ctlstr, con
     }
 
   /* Add time spend in this routine to prompt_for_continue_wait_time.  */
-  gettimeofday (&prompt_ended, NULL);
-  timeval_sub (&prompt_delta, &prompt_ended, &prompt_started);
-  timeval_add (&prompt_for_continue_wait_time,
-               &prompt_for_continue_wait_time, &prompt_delta);
+  prompt_for_continue_wait_time += steady_clock::now () - prompt_started;
 
-  xfree (prompt);
   if (annotation_level > 1)
     printf_filtered (("\n\032\032post-query\n"));
+  do_cleanups (old_chain);
   return retval;
 }
 
@@ -1482,7 +1445,7 @@ parse_escape (struct gdbarch *gdbarch, c
 
 /* Print the character C on STREAM as part of the contents of a literal
    string whose delimiter is QUOTER.  Note that this routine should only
-   be call for printing things which are independent of the language
+   be called for printing things which are independent of the language
    of the program being debugged.
 
    printchar will normally escape backslashes and instances of QUOTER. If
@@ -1622,14 +1585,14 @@ static char *wrap_pointer;
 
 /* String to indent by if the wrap occurs.  Must not be NULL if wrap_column
    is non-zero.  */
-static char *wrap_indent;
+static const char *wrap_indent;
 
 /* Column number on the screen where wrap_buffer begins, or 0 if wrapping
    is not in effect.  */
 static int wrap_column;
 
 
-/* Inialize the number of lines per page and chars per line.  */
+/* Initialize the number of lines per page and chars per line.  */
 
 void
 init_page_info (void)
@@ -1664,8 +1627,9 @@ init_page_info (void)
          Only try to use tgetnum function if rl_get_screen_size
          did not return a useful value. */
       if (((rows <= 0) && (tgetnum ("li") < 0))
-	/* Also disable paging if inside EMACS.  */
-	  || getenv ("EMACS"))
+	/* Also disable paging if inside Emacs.  $EMACS was used
+	   before Emacs v25.1, $INSIDE_EMACS is used since then.  */
+	  || getenv ("EMACS") || getenv ("INSIDE_EMACS"))
 	{
 	  /* The number of lines per page is not mentioned in the terminal
 	     description or EMACS evironment variable is set.  This probably
@@ -1794,18 +1758,20 @@ set_screen_width_and_height (int width, 
 }
 
 /* Wait, so the user can read what's on the screen.  Prompt the user
-   to continue by pressing RETURN.  */
+   to continue by pressing RETURN.  'q' is also provided because
+   telling users what to do in the prompt is more user-friendly than
+   expecting them to think of Ctrl-C/SIGINT.  */
 
 static void
 prompt_for_continue (void)
 {
   char *ignore;
   char cont_prompt[120];
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   /* Used to add duration we waited for user to respond to
      prompt_for_continue_wait_time.  */
-  struct timeval prompt_started, prompt_ended, prompt_delta;
-
-  gettimeofday (&prompt_started, NULL);
+  using namespace std::chrono;
+  steady_clock::time_point prompt_started = steady_clock::now ();
 
   if (annotation_level > 1)
     printf_unfiltered (("\n\032\032pre-prompt-for-continue\n"));
@@ -1815,71 +1781,58 @@ prompt_for_continue (void)
   if (annotation_level > 1)
     strcat (cont_prompt, "\n\032\032prompt-for-continue\n");
 
-  /* We must do this *before* we call gdb_readline, else it will eventually
-     call us -- thinking that we're trying to print beyond the end of the 
-     screen.  */
+  /* We must do this *before* we call gdb_readline_wrapper, else it
+     will eventually call us -- thinking that we're trying to print
+     beyond the end of the screen.  */
   reinitialize_more_filter ();
 
-  immediate_quit++;
-  QUIT;
-
-  /* We'll need to handle input.  */
-  target_terminal_ours ();
-
-  /* On a real operating system, the user can quit with SIGINT.
-     But not on GO32.
+  prepare_to_handle_input ();
 
-     'q' is provided on all systems so users don't have to change habits
-     from system to system, and because telling them what to do in
-     the prompt is more user-friendly than expecting them to think of
-     SIGINT.  */
-  /* Call readline, not gdb_readline, because GO32 readline handles control-C
-     whereas control-C to gdb_readline will cause the user to get dumped
-     out to DOS.  */
+  /* Call gdb_readline_wrapper, not readline, in order to keep an
+     event loop running.  */
   ignore = gdb_readline_wrapper (cont_prompt);
+  make_cleanup (xfree, ignore);
 
   /* Add time spend in this routine to prompt_for_continue_wait_time.  */
-  gettimeofday (&prompt_ended, NULL);
-  timeval_sub (&prompt_delta, &prompt_ended, &prompt_started);
-  timeval_add (&prompt_for_continue_wait_time,
-               &prompt_for_continue_wait_time, &prompt_delta);
+  prompt_for_continue_wait_time += steady_clock::now () - prompt_started;
 
   if (annotation_level > 1)
     printf_unfiltered (("\n\032\032post-prompt-for-continue\n"));
 
-  if (ignore)
+  if (ignore != NULL)
     {
       char *p = ignore;
 
       while (*p == ' ' || *p == '\t')
 	++p;
       if (p[0] == 'q')
-	quit ();
-      xfree (ignore);
+	/* Do not call quit here; there is no possibility of SIGINT.  */
+	throw_quit ("Quit");
     }
-  immediate_quit--;
 
   /* Now we have to do this again, so that GDB will know that it doesn't
      need to save the ---Type <return>--- line at the top of the screen.  */
   reinitialize_more_filter ();
 
   dont_repeat ();		/* Forget prev cmd -- CR won't repeat it.  */
+
+  do_cleanups (old_chain);
 }
 
-/* Initalize timer to keep track of how long we waited for the user.  */
+/* Initialize timer to keep track of how long we waited for the user.  */
 
 void
 reset_prompt_for_continue_wait_time (void)
 {
-  static const struct timeval zero_timeval = { 0 };
+  using namespace std::chrono;
 
-  prompt_for_continue_wait_time = zero_timeval;
+  prompt_for_continue_wait_time = steady_clock::duration::zero ();
 }
 
 /* Fetch the cumulative time spent in prompt_for_continue.  */
 
-struct timeval
-get_prompt_for_continue_wait_time (void)
+std::chrono::steady_clock::duration
+get_prompt_for_continue_wait_time ()
 {
   return prompt_for_continue_wait_time;
 }
@@ -1915,7 +1868,7 @@ reinitialize_more_filter (void)
    used to force out output from the wrap_buffer.  */
 
 void
-wrap_here (char *indent)
+wrap_here (const char *indent)
 {
   /* This should have been allocated, but be paranoid anyway.  */
   if (!wrap_buffer)
@@ -1985,7 +1938,7 @@ puts_filtered_tabular (char *string, int
   if (right)
     spaces += width - stringlen;
 
-  spacebuf = alloca (spaces + 1);
+  spacebuf = (char *) alloca (spaces + 1);
   spacebuf[spaces] = '\0';
   while (spaces--)
     spacebuf[spaces] = ' ';
@@ -2038,7 +1991,7 @@ fputs_maybe_filtered (const char *linebu
       || batch_flag
       || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)
       || top_level_interpreter () == NULL
-      || ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ())))
+      || interp_ui_out (top_level_interpreter ())->is_mi_like_p ())
     {
       fputs_unfiltered (linebuffer, stream);
       return;
@@ -2302,21 +2255,21 @@ vfprintf_unfiltered (struct ui_file *str
   old_cleanups = make_cleanup (xfree, linebuffer);
   if (debug_timestamp && stream == gdb_stdlog)
     {
-      struct timeval tm;
-      char *timestamp;
+      using namespace std::chrono;
       int len, need_nl;
 
-      gettimeofday (&tm, NULL);
+      steady_clock::time_point now = steady_clock::now ();
+      seconds s = duration_cast<seconds> (now.time_since_epoch ());
+      microseconds us = duration_cast<microseconds> (now.time_since_epoch () - s);
 
       len = strlen (linebuffer);
       need_nl = (len > 0 && linebuffer[len - 1] != '\n');
 
-      timestamp = xstrprintf ("%ld:%ld %s%s",
-			      (long) tm.tv_sec, (long) tm.tv_usec,
-			      linebuffer,
-			      need_nl ? "\n": "");
-      make_cleanup (xfree, timestamp);
-      fputs_unfiltered (timestamp, stream);
+      std::string timestamp = string_printf ("%ld.%06ld %s%s",
+					     (long) s.count (),
+					     (long) us.count (),
+					     linebuffer, need_nl ? "\n": "");
+      fputs_unfiltered (timestamp.c_str (), stream);
     }
   else
     fputs_unfiltered (linebuffer, stream);
@@ -2770,7 +2723,7 @@ print_core_address (struct gdbarch *gdba
 hashval_t
 core_addr_hash (const void *ap)
 {
-  const CORE_ADDR *addrp = ap;
+  const CORE_ADDR *addrp = (const CORE_ADDR *) ap;
 
   return *addrp;
 }
@@ -2780,8 +2733,8 @@ core_addr_hash (const void *ap)
 int
 core_addr_eq (const void *ap, const void *bp)
 {
-  const CORE_ADDR *addr_ap = ap;
-  const CORE_ADDR *addr_bp = bp;
+  const CORE_ADDR *addr_ap = (const CORE_ADDR *) ap;
+  const CORE_ADDR *addr_bp = (const CORE_ADDR *) bp;
 
   return *addr_ap == *addr_bp;
 }
@@ -2891,7 +2844,7 @@ gdb_realpath_keepfile (const char *filen
   if (base_name == filename)
     return xstrdup (filename);
 
-  dir_name = alloca ((size_t) (base_name - filename + 2));
+  dir_name = (char *) alloca ((size_t) (base_name - filename + 2));
   /* Allocate enough space to store the dir_name + plus one extra
      character sometimes needed under Windows (see below), and
      then the closing \000 character.  */
@@ -3002,7 +2955,7 @@ ldirname (const char *filename)
   if (base == filename)
     return NULL;
 
-  dirname = xmalloc (base - filename + 2);
+  dirname = (char *) xmalloc (base - filename + 2);
   memcpy (dirname, filename, base - filename);
 
   /* On DOS based file systems, convert "d:foo" to "d:.", so that we
@@ -3068,7 +3021,7 @@ gdb_bfd_errmsg (bfd_error_type error_tag
             + strlen (AMBIGUOUS_MESS2);
   for (p = matching; *p; p++)
     ret_len += strlen (*p) + 1;
-  ret = xmalloc (ret_len + 1);
+  ret = (char *) xmalloc (ret_len + 1);
   retp = ret;
   make_cleanup (xfree, ret);
 
@@ -3163,7 +3116,7 @@ producer_is_gcc (const char *producer, i
       if (minor == NULL)
 	minor = &min;
 
-      /* Skip any identifier after "GNU " - such as "C11" "C++" or "Java".
+      /* Skip any identifier after "GNU " - such as "C11" or "C++".
 	 A full producer string might look like:
 	 "GNU C 4.7.2"
 	 "GNU Fortran 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic ..."
@@ -3187,7 +3140,7 @@ producer_is_gcc (const char *producer, i
 static void
 do_free_char_ptr_vec (void *arg)
 {
-  VEC (char_ptr) *char_ptr_vec = arg;
+  VEC (char_ptr) *char_ptr_vec = (VEC (char_ptr) *) arg;
 
   free_char_ptr_vec (char_ptr_vec);
 }
@@ -3230,7 +3183,8 @@ substitute_path_component (char **string
 	{
 	  char *string_new;
 
-	  string_new = xrealloc (string, (strlen (string) + to_len + 1));
+	  string_new
+	    = (char *) xrealloc (string, (strlen (string) + to_len + 1));
 
 	  /* Relocate the current S pointer.  */
 	  s = s - string + string_new;
@@ -3291,9 +3245,9 @@ wait_to_die_with_timeout (pid_t pid, int
       sa.sa_flags = 0;
       sigaction (SIGALRM, &sa, &old_sa);
 #else
-      void (*ofunc) ();
+      sighandler_t ofunc;
 
-      ofunc = (void (*)()) signal (SIGALRM, sigalrm_handler);
+      ofunc = signal (SIGALRM, sigalrm_handler);
 #endif
 
       alarm (timeout);
@@ -3341,14 +3295,14 @@ gdb_filename_fnmatch (const char *patter
 
     /* Replace '\' by '/' in both strings.  */
 
-    pattern_slash = alloca (strlen (pattern) + 1);
+    pattern_slash = (char *) alloca (strlen (pattern) + 1);
     strcpy (pattern_slash, pattern);
     pattern = pattern_slash;
     for (; *pattern_slash != 0; pattern_slash++)
       if (IS_DIR_SEPARATOR (*pattern_slash))
 	*pattern_slash = '/';
 
-    string_slash = alloca (strlen (string) + 1);
+    string_slash = (char *) alloca (strlen (string) + 1);
     strcpy (string_slash, string);
     string = string_slash;
     for (; *string_slash != 0; string_slash++)
@@ -3364,6 +3318,83 @@ gdb_filename_fnmatch (const char *patter
   return fnmatch (pattern, string, flags);
 }
 
+/* Return the number of path elements in PATH.
+   / = 1
+   /foo = 2
+   /foo/ = 2
+   foo/bar = 2
+   foo/ = 1  */
+
+int
+count_path_elements (const char *path)
+{
+  int count = 0;
+  const char *p = path;
+
+  if (HAS_DRIVE_SPEC (p))
+    {
+      p = STRIP_DRIVE_SPEC (p);
+      ++count;
+    }
+
+  while (*p != '\0')
+    {
+      if (IS_DIR_SEPARATOR (*p))
+	++count;
+      ++p;
+    }
+
+  /* Backup one if last character is /, unless it's the only one.  */
+  if (p > path + 1 && IS_DIR_SEPARATOR (p[-1]))
+    --count;
+
+  /* Add one for the file name, if present.  */
+  if (p > path && !IS_DIR_SEPARATOR (p[-1]))
+    ++count;
+
+  return count;
+}
+
+/* Remove N leading path elements from PATH.
+   N must be non-negative.
+   If PATH has more than N path elements then return NULL.
+   If PATH has exactly N path elements then return "".
+   See count_path_elements for a description of how we do the counting.  */
+
+const char *
+strip_leading_path_elements (const char *path, int n)
+{
+  int i = 0;
+  const char *p = path;
+
+  gdb_assert (n >= 0);
+
+  if (n == 0)
+    return p;
+
+  if (HAS_DRIVE_SPEC (p))
+    {
+      p = STRIP_DRIVE_SPEC (p);
+      ++i;
+    }
+
+  while (i < n)
+    {
+      while (*p != '\0' && !IS_DIR_SEPARATOR (*p))
+	++p;
+      if (*p == '\0')
+	{
+	  if (i + 1 == n)
+	    return "";
+	  return NULL;
+	}
+      ++p;
+      ++i;
+    }
+
+  return p;
+}
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 extern initialize_file_ftype _initialize_utils;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils.h ./gdb/utils.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/utils.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
 		      for now.  */
 /* I/O, string, cleanup, and other random utilities for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,8 @@
 #define UTILS_H
 
 #include "exceptions.h"
+#include "common/scoped_restore.h"
+#include <chrono>
 
 extern void initialize_utils (void);
 
@@ -50,7 +52,7 @@ extern const char *gdb_bfd_errmsg (bfd_e
 /* Reset the prompt_for_continue clock.  */
 void reset_prompt_for_continue_wait_time (void);
 /* Return the time spent in prompt_for_continue.  */
-struct timeval get_prompt_for_continue_wait_time (void);
+std::chrono::steady_clock::duration get_prompt_for_continue_wait_time ();
 
 /* Parsing utilites.  */
 
@@ -64,12 +66,6 @@ char **gdb_buildargv (const char *);
 
 extern struct cleanup *make_cleanup_freeargv (char **);
 
-struct dyn_string;
-extern struct cleanup *make_cleanup_dyn_string_delete (struct dyn_string *);
-
-struct ui_file;
-extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
-
 struct ui_out;
 extern struct cleanup *
   make_cleanup_ui_out_redirect_pop (struct ui_out *uiout);
@@ -82,8 +78,6 @@ extern struct cleanup *(make_cleanup_fre
 
 extern struct cleanup *make_cleanup_fclose (FILE *file);
 
-extern struct cleanup *make_cleanup_bfd_unref (bfd *abfd);
-
 struct obstack;
 extern struct cleanup *make_cleanup_obstack_free (struct obstack *obstack);
 
@@ -93,9 +87,6 @@ extern struct cleanup *make_cleanup_rest
 struct target_ops;
 extern struct cleanup *make_cleanup_unpush_target (struct target_ops *ops);
 
-extern struct cleanup *
-  make_cleanup_restore_ui_file (struct ui_file **variable);
-
 extern struct cleanup *make_cleanup_value_free_to_mark (struct value *);
 extern struct cleanup *make_cleanup_value_free (struct value *);
 
@@ -104,7 +95,17 @@ extern struct cleanup *make_cleanup_free
 
 extern struct cleanup *make_cleanup_restore_current_language (void);
 
-extern struct cleanup *make_cleanup_htab_delete (htab_t htab);
+/* A deleter for a hash table.  */
+struct htab_deleter
+{
+  void operator() (htab *ptr) const
+  {
+    htab_delete (ptr);
+  }
+};
+
+/* A unique_ptr wrapper for htab_t.  */
+typedef std::unique_ptr<htab, htab_deleter> htab_up;
 
 struct parser_state;
 extern struct cleanup *make_cleanup_clear_parser_state
@@ -135,6 +136,10 @@ extern void substitute_path_component (c
 				       const char *to);
 
 char *ldirname (const char *filename);
+
+extern int count_path_elements (const char *path);
+
+extern const char *strip_leading_path_elements (const char *path, int n);
 
 /* GDB output, ui_file utilities.  */
 
@@ -146,24 +151,33 @@ extern int yquery (const char *, ...) AT
 
 extern void begin_line (void);
 
-extern void wrap_here (char *);
+extern void wrap_here (const char *);
 
 extern void reinitialize_more_filter (void);
 
 extern int pagination_enabled;
 
-/* Global ui_file streams.  These are all defined in main.c.  */
+extern struct ui_file **current_ui_gdb_stdout_ptr (void);
+extern struct ui_file **current_ui_gdb_stdin_ptr (void);
+extern struct ui_file **current_ui_gdb_stderr_ptr (void);
+extern struct ui_file **current_ui_gdb_stdlog_ptr (void);
+
+/* The current top level's ui_file streams.  */
+
 /* Normal results */
-extern struct ui_file *gdb_stdout;
+#define gdb_stdout (*current_ui_gdb_stdout_ptr ())
 /* Input stream */
-extern struct ui_file *gdb_stdin;
+#define gdb_stdin (*current_ui_gdb_stdin_ptr ())
 /* Serious error notifications */
-extern struct ui_file *gdb_stderr;
+#define gdb_stderr (*current_ui_gdb_stderr_ptr ())
 /* Log/debug/trace messages that should bypass normal stdout/stderr
    filtering.  For moment, always call this stream using
    *_unfiltered.  In the very near future that restriction shall be
    removed - either call shall be unfiltered.  (cagney 1999-06-13).  */
-extern struct ui_file *gdb_stdlog;
+#define gdb_stdlog (*current_ui_gdb_stdlog_ptr ())
+
+/* Truly global ui_file streams.  These are all defined in main.c.  */
+
 /* Target output that should bypass normal stdout/stderr filtering.
    For moment, always call this stream using *_unfiltered.  In the
    very near future that restriction shall be removed - either call
@@ -246,7 +260,11 @@ extern void fputstrn_unfiltered (const c
 extern int filtered_printing_initialized (void);
 
 /* Display the host ADDR on STREAM formatted as ``0x%x''.  */
-extern void gdb_print_host_address (const void *addr, struct ui_file *stream);
+extern void gdb_print_host_address_1 (const void *addr, struct ui_file *stream);
+
+/* Wrapper that avoids adding a pointless cast to all callers.  */
+#define gdb_print_host_address(ADDR, STREAM) \
+  gdb_print_host_address_1 ((const void *) ADDR, STREAM)
 
 /* Convert CORE_ADDR to string in platform-specific manner.
    This is usually formatted similar to 0x%lx.  */
@@ -282,7 +300,7 @@ extern void (*deprecated_error_begin_hoo
 
 extern char *warning_pre_print;
 
-extern void error_stream (struct ui_file *) ATTRIBUTE_NORETURN;
+extern void error_stream (const string_file &) ATTRIBUTE_NORETURN;
 
 extern void demangler_vwarning (const char *file, int line,
 			       const char *, va_list ap)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils-selftests.c ./gdb/utils-selftests.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/utils-selftests.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/utils-selftests.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,60 @@
+/* Self tests for general utility routines for GDB, the GNU debugger.
+
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "selftest.h"
+
+#if GDB_SELF_TEST
+
+namespace selftests {
+
+/* common-utils self tests.  Defined here instead of in
+   common/common-utils.c because that file is shared with
+   gdbserver.  */
+
+static void
+common_utils_tests (void)
+{
+  SELF_CHECK (string_printf ("%s", "") == "");
+  SELF_CHECK (string_printf ("%d comes before 2", 1) == "1 comes before 2");
+  SELF_CHECK (string_printf ("hello %s", "world") == "hello world");
+
+#define X10 "0123456789"
+#define X100 X10 X10 X10 X10 X10 X10 X10 X10 X10 X10
+#define X1000 X100 X100 X100 X100 X100 X100 X100 X100 X100 X100
+#define X10000 X1000 X1000 X1000 X1000 X1000 X1000 X1000 X1000 X1000 X1000
+#define X100000 X10000 X10000 X10000 X10000 X10000 X10000 X10000 X10000 X10000 X10000
+  SELF_CHECK (string_printf ("%s", X10) == X10);
+  SELF_CHECK (string_printf ("%s", X100) == X100);
+  SELF_CHECK (string_printf ("%s", X1000) == X1000);
+  SELF_CHECK (string_printf ("%s", X10000) == X10000);
+  SELF_CHECK (string_printf ("%s", X100000) == X100000);
+}
+
+} /* namespace selftests */
+
+#endif
+
+void
+_initialize_utils_selftests (void)
+{
+#if GDB_SELF_TEST
+  register_self_test (selftests::common_utils_tests);
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/v850-tdep.c ./gdb/v850-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/v850-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/v850-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the NEC V850 for GDB, the GNU debugger.
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -559,7 +559,7 @@ v850_use_struct_convention (struct gdbar
 	  if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
 	    {
 	      tgt_type = TYPE_TARGET_TYPE (fld_type);
-	      if (TYPE_LENGTH (fld_type) >= 0 && TYPE_LENGTH (tgt_type) >= 0
+	      if (TYPE_LENGTH (tgt_type) > 0
 		  && TYPE_LENGTH (fld_type) / TYPE_LENGTH (tgt_type) > 2)
 		return 1;
 	    }
@@ -1168,28 +1168,44 @@ v850_return_value (struct gdbarch *gdbar
   return RETURN_VALUE_REGISTER_CONVENTION;
 }
 
-static const unsigned char *
-v850_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-                         int *lenptr)
-{
-  static unsigned char breakpoint[] = { 0x85, 0x05 };
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
+static int
+v850_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  return 2;
 }
 
-/* Implement software breakpoints by using the dbtrap instruction. 
-   Older architectures had no such instruction.  For those, an
-   unconditional branch to self instruction is used.  */
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
-static const unsigned char *
-v850_dbtrap_breakpoint_from_pc (struct gdbarch *gdbarch,
-                                CORE_ADDR *pcptr, int *lenptr)
+static const gdb_byte *
+v850_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 {
-  static unsigned char breakpoint[] = { 0x40, 0xf8 };
+  *size = kind;
+
+    switch (gdbarch_bfd_arch_info (gdbarch)->mach)
+    {
+    case bfd_mach_v850e2:
+    case bfd_mach_v850e2v3:
+    case bfd_mach_v850e3v5:
+      {
+	/* Implement software breakpoints by using the dbtrap instruction.
+	   Older architectures had no such instruction.  For those, an
+	   unconditional branch to self instruction is used.  */
+
+	static unsigned char dbtrap_breakpoint[] = { 0x40, 0xf8 };
+
+	return dbtrap_breakpoint;
+      }
+      break;
+    default:
+      {
+	static unsigned char breakpoint[] = { 0x85, 0x05 };
 
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
+	return breakpoint;
+      }
+      break;
+    }
 }
 
 static struct v850_frame_cache *
@@ -1220,7 +1236,7 @@ v850_frame_cache (struct frame_info *thi
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct v850_frame_cache *) *this_cache;
 
   cache = v850_alloc_frame_cache (this_frame);
   *this_cache = cache;
@@ -1380,7 +1396,7 @@ v850_gdbarch_init (struct gdbarch_info i
 
       return arches->gdbarch;
     }
-  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = XNEW (struct gdbarch_tdep);
   tdep->e_flags = e_flags;
   tdep->e_machine = e_machine;
 
@@ -1440,18 +1456,9 @@ v850_gdbarch_init (struct gdbarch_info i
   set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  switch (info.bfd_arch_info->mach)
-    {
-    case bfd_mach_v850e2:
-    case bfd_mach_v850e2v3:
-    case bfd_mach_v850e3v5:
-      set_gdbarch_breakpoint_from_pc (gdbarch, v850_dbtrap_breakpoint_from_pc);
-      break;
-    default:
-      set_gdbarch_breakpoint_from_pc (gdbarch, v850_breakpoint_from_pc);
-      break;
-    }
 
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, v850_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, v850_sw_breakpoint_from_kind);
   set_gdbarch_return_value (gdbarch, v850_return_value);
   set_gdbarch_push_dummy_call (gdbarch, v850_push_dummy_call);
   set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valarith.c ./gdb/valarith.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valarith.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/valarith.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Perform arithmetic and other operations on values, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -54,7 +54,7 @@ find_size_for_pointer_math (struct type 
   gdb_assert (TYPE_CODE (ptr_type) == TYPE_CODE_PTR);
   ptr_target = check_typedef (TYPE_TARGET_TYPE (ptr_type));
 
-  sz = TYPE_LENGTH (ptr_target);
+  sz = type_length_units (ptr_target);
   if (sz == 0)
     {
       if (TYPE_CODE (ptr_type) == TYPE_CODE_VOID)
@@ -121,7 +121,7 @@ value_ptrdiff (struct value *arg1, struc
 	     "second argument is neither\n"
 	     "an integer nor a pointer of the same type."));
 
-  sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));
+  sz = type_length_units (check_typedef (TYPE_TARGET_TYPE (type1)));
   if (sz == 0) 
     {
       warning (_("Type size unknown, assuming 1. "
@@ -192,29 +192,29 @@ value_subscripted_rvalue (struct value *
 {
   struct type *array_type = check_typedef (value_type (array));
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
-  unsigned int elt_size = TYPE_LENGTH (elt_type);
-  unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound);
-  struct value *v;
+  ULONGEST elt_size = type_length_units (elt_type);
+  ULONGEST elt_offs = elt_size * (index - lowerbound);
 
   if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
-			     && elt_offs >= TYPE_LENGTH (array_type)))
-    error (_("no such vector element"));
+			     && elt_offs >= type_length_units (array_type)))
+    {
+      if (type_not_associated (array_type))
+        error (_("no such vector element (vector not associated)"));
+      else if (type_not_allocated (array_type))
+        error (_("no such vector element (vector not allocated)"));
+      else
+        error (_("no such vector element"));
+    }
 
-  if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
-    v = allocate_value_lazy (elt_type);
-  else
+  if (is_dynamic_type (elt_type))
     {
-      v = allocate_value (elt_type);
-      value_contents_copy (v, value_embedded_offset (v),
-			   array, value_embedded_offset (array) + elt_offs,
-			   elt_size);
+      CORE_ADDR address;
+
+      address = value_address (array) + elt_offs;
+      elt_type = resolve_dynamic_type (elt_type, NULL, address);
     }
 
-  set_value_component_location (v, array);
-  VALUE_REGNUM (v) = VALUE_REGNUM (array);
-  VALUE_FRAME_ID (v) = VALUE_FRAME_ID (array);
-  set_value_offset (v, value_offset (array) + elt_offs);
-  return v;
+  return value_from_component (array, elt_type, elt_offs);
 }
 
 
@@ -1391,7 +1391,7 @@ value_vector_widen (struct value *scalar
   LONGEST low_bound, high_bound;
   int i;
 
-  CHECK_TYPEDEF (vector_type);
+  vector_type = check_typedef (vector_type);
 
   gdb_assert (TYPE_CODE (vector_type) == TYPE_CODE_ARRAY
 	      && TYPE_VECTOR (vector_type));
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valops.c ./gdb/valops.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valops.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/valops.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Perform non-arithmetic operations on values, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -47,11 +47,11 @@ static int typecmp (int staticp, int var
 		    struct field t1[], struct value *t2[]);
 
 static struct value *search_struct_field (const char *, struct value *, 
-					  int, struct type *, int);
+					  struct type *, int);
 
 static struct value *search_struct_method (const char *, struct value **,
 					   struct value **,
-					   int, int *, struct type *);
+					   LONGEST, int *, struct type *);
 
 static int find_oload_champ_namespace (struct value **, int,
 				       const char *, const char *,
@@ -96,9 +96,9 @@ static CORE_ADDR allocate_space_in_infer
 static struct value *cast_into_complex (struct type *, struct value *);
 
 static void find_method_list (struct value **, const char *,
-			      int, struct type *, struct fn_field **, int *,
+			      LONGEST, struct type *, struct fn_field **, int *,
 			      VEC (xmethod_worker_ptr) **,
-			      struct type **, int *);
+			      struct type **, LONGEST *);
 
 void _initialize_valops (void);
 
@@ -127,21 +127,21 @@ show_overload_resolution (struct ui_file
 struct value *
 find_function_in_inferior (const char *name, struct objfile **objf_p)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
 
   sym = lookup_symbol (name, 0, VAR_DOMAIN, 0);
-  if (sym != NULL)
+  if (sym.symbol != NULL)
     {
-      if (SYMBOL_CLASS (sym) != LOC_BLOCK)
+      if (SYMBOL_CLASS (sym.symbol) != LOC_BLOCK)
 	{
 	  error (_("\"%s\" exists in this program but is not a function."),
 		 name);
 	}
 
       if (objf_p)
-	*objf_p = symbol_objfile (sym);
+	*objf_p = symbol_objfile (sym.symbol);
 
-      return value_of_variable (sym, NULL);
+      return value_of_variable (sym.symbol, sym.block);
     }
   else
     {
@@ -245,7 +245,7 @@ value_cast_structs (struct type *type, s
   if (TYPE_NAME (t1) != NULL)
     {
       v = search_struct_field (type_name_no_tag (t1),
-			       v2, 0, t2, 1);
+			       v2, t2, 1);
       if (v)
 	return v;
     }
@@ -256,7 +256,8 @@ value_cast_structs (struct type *type, s
   if (TYPE_NAME (t2) != NULL)
     {
       /* Try downcasting using the run-time type of the value.  */
-      int full, top, using_enc;
+      int full, using_enc;
+      LONGEST top;
       struct type *real_type;
 
       real_type = value_rtti_type (v2, &full, &top, &using_enc);
@@ -272,7 +273,7 @@ value_cast_structs (struct type *type, s
 	      && !strcmp (TYPE_NAME (real_type), TYPE_NAME (t1)))
 	    return v;
 
-	  v = search_struct_field (type_name_no_tag (t2), v, 0, real_type, 1);
+	  v = search_struct_field (type_name_no_tag (t2), v, real_type, 1);
 	  if (v)
 	    return v;
 	}
@@ -281,7 +282,7 @@ value_cast_structs (struct type *type, s
 	 T2.  This wouldn't work properly for classes with virtual
 	 bases, but those were handled above.  */
       v = search_struct_field (type_name_no_tag (t2),
-			       value_zero (t1, not_lval), 0, t1, 1);
+			       value_zero (t1, not_lval), t1, 1);
       if (v)
 	{
 	  /* Downcasting is possible (t1 is superclass of v2).  */
@@ -381,7 +382,7 @@ value_cast (struct type *type, struct va
     /* We deref the value and then do the cast.  */
     return value_cast (type, coerce_ref (arg2)); 
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   code1 = TYPE_CODE (type);
   arg2 = coerce_ref (arg2);
   type2 = check_typedef (value_type (arg2));
@@ -635,7 +636,7 @@ value_reinterpret_cast (struct type *typ
 static int
 dynamic_cast_check_1 (struct type *desired_type,
 		      const gdb_byte *valaddr,
-		      int embedded_offset,
+		      LONGEST embedded_offset,
 		      CORE_ADDR address,
 		      struct value *val,
 		      struct type *search_type,
@@ -647,8 +648,9 @@ dynamic_cast_check_1 (struct type *desir
 
   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
     {
-      int offset = baseclass_offset (search_type, i, valaddr, embedded_offset,
-				     address, val);
+      LONGEST offset = baseclass_offset (search_type, i, valaddr,
+					 embedded_offset,
+					 address, val);
 
       if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i)))
 	{
@@ -682,7 +684,7 @@ dynamic_cast_check_1 (struct type *desir
 static int
 dynamic_cast_check_2 (struct type *desired_type,
 		      const gdb_byte *valaddr,
-		      int embedded_offset,
+		      LONGEST embedded_offset,
 		      CORE_ADDR address,
 		      struct value *val,
 		      struct type *search_type,
@@ -692,7 +694,7 @@ dynamic_cast_check_2 (struct type *desir
 
   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
     {
-      int offset;
+      LONGEST offset;
 
       if (! BASETYPE_VIA_PUBLIC (search_type, i))
 	continue;
@@ -723,7 +725,8 @@ dynamic_cast_check_2 (struct type *desir
 struct value *
 value_dynamic_cast (struct type *type, struct value *arg)
 {
-  int full, top, using_enc;
+  int full, using_enc;
+  LONGEST top;
   struct type *resolved_type = check_typedef (type);
   struct type *arg_type = check_typedef (value_type (arg));
   struct type *class_type, *rtti_type;
@@ -954,34 +957,40 @@ value_at_lazy (struct type *type, CORE_A
 }
 
 void
-read_value_memory (struct value *val, int embedded_offset,
+read_value_memory (struct value *val, LONGEST embedded_offset,
 		   int stack, CORE_ADDR memaddr,
 		   gdb_byte *buffer, size_t length)
 {
-  ULONGEST xfered = 0;
+  ULONGEST xfered_total = 0;
+  struct gdbarch *arch = get_value_arch (val);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+  enum target_object object;
+
+  object = stack ? TARGET_OBJECT_STACK_MEMORY : TARGET_OBJECT_MEMORY;
 
-  while (xfered < length)
+  while (xfered_total < length)
     {
       enum target_xfer_status status;
-      ULONGEST xfered_len;
+      ULONGEST xfered_partial;
 
       status = target_xfer_partial (current_target.beneath,
-				    TARGET_OBJECT_MEMORY, NULL,
-				    buffer + xfered, NULL,
-				    memaddr + xfered, length - xfered,
-				    &xfered_len);
+				    object, NULL,
+				    buffer + xfered_total * unit_size, NULL,
+				    memaddr + xfered_total,
+				    length - xfered_total,
+				    &xfered_partial);
 
       if (status == TARGET_XFER_OK)
 	/* nothing */;
       else if (status == TARGET_XFER_UNAVAILABLE)
-	mark_value_bytes_unavailable (val, embedded_offset + xfered,
-				      xfered_len);
+	mark_value_bytes_unavailable (val, embedded_offset + xfered_total,
+				      xfered_partial);
       else if (status == TARGET_XFER_EOF)
-	memory_error (TARGET_XFER_E_IO, memaddr + xfered);
+	memory_error (TARGET_XFER_E_IO, memaddr + xfered_total);
       else
-	memory_error (status, memaddr + xfered);
+	memory_error (status, memaddr + xfered_total);
 
-      xfered += xfered_len;
+      xfered_total += xfered_partial;
       QUIT;
     }
 }
@@ -1012,7 +1021,7 @@ value_assign (struct value *toval, struc
 	fromval = coerce_array (fromval);
     }
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   /* Since modifying a register can trash the frame chain, and
      modifying memory can trash the frame cache, we save the old frame
@@ -1028,7 +1037,7 @@ value_assign (struct value *toval, struc
 
     case lval_internalvar_component:
       {
-	int offset = value_offset (toval);
+	LONGEST offset = value_offset (toval);
 
 	/* Are we dealing with a bitfield?
 
@@ -1089,7 +1098,7 @@ value_assign (struct value *toval, struc
 	else
 	  {
 	    changed_addr = value_address (toval);
-	    changed_len = TYPE_LENGTH (type);
+	    changed_len = type_length_units (type);
 	    dest_buffer = value_contents (fromval);
 	  }
 
@@ -1103,8 +1112,15 @@ value_assign (struct value *toval, struc
 	struct gdbarch *gdbarch;
 	int value_reg;
 
-	/* Figure out which frame this is in currently.  */
+	/* Figure out which frame this is in currently.
+	
+	   We use VALUE_FRAME_ID for obtaining the value's frame id instead of
+	   VALUE_NEXT_FRAME_ID due to requiring a frame which may be passed to
+	   put_frame_register_bytes() below.  That function will (eventually)
+	   perform the necessary unwind operation by first obtaining the next
+	   frame.  */
 	frame = frame_find_by_id (VALUE_FRAME_ID (toval));
+
 	value_reg = VALUE_REGNUM (toval);
 
 	if (!frame)
@@ -1115,7 +1131,7 @@ value_assign (struct value *toval, struc
 	if (value_bitsize (toval))
 	  {
 	    struct value *parent = value_parent (toval);
-	    int offset = value_offset (parent) + value_offset (toval);
+	    LONGEST offset = value_offset (parent) + value_offset (toval);
 	    int changed_len;
 	    gdb_byte buffer[sizeof (LONGEST)];
 	    int optim, unavail;
@@ -1170,8 +1186,6 @@ value_assign (struct value *toval, struc
 	  }
 
 	observer_notify_register_changed (frame, value_reg);
-	if (deprecated_register_changed_hook)
-	  deprecated_register_changed_hook (-1);
 	break;
       }
 
@@ -1282,7 +1296,7 @@ value_repeat (struct value *arg1, int co
 
   read_value_memory (val, 0, value_stack (val), value_address (val),
 		     value_contents_all_raw (val),
-		     TYPE_LENGTH (value_enclosing_type (val)));
+		     type_length_units (value_enclosing_type (val)));
 
   return val;
 }
@@ -1290,27 +1304,12 @@ value_repeat (struct value *arg1, int co
 struct value *
 value_of_variable (struct symbol *var, const struct block *b)
 {
-  struct frame_info *frame;
+  struct frame_info *frame = NULL;
 
-  if (!symbol_read_needs_frame (var))
-    frame = NULL;
-  else if (!b)
+  if (symbol_read_needs_frame (var))
     frame = get_selected_frame (_("No frame selected."));
-  else
-    {
-      frame = block_innermost_frame (b);
-      if (!frame)
-	{
-	  if (BLOCK_FUNCTION (b) && !block_inlined_p (b)
-	      && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)))
-	    error (_("No frame is currently executing in block %s."),
-		   SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)));
-	  else
-	    error (_("No frame is currently executing in specified block"));
-	}
-    }
 
-  return read_var_value (var, frame);
+  return read_var_value (var, b, frame);
 }
 
 struct value *
@@ -1341,7 +1340,7 @@ address_of_variable (struct symbol *var,
 	struct frame_info *frame;
 	const char *regname;
 
-	frame = frame_find_by_id (VALUE_FRAME_ID (val));
+	frame = frame_find_by_id (VALUE_NEXT_FRAME_ID (val));
 	gdb_assert (frame);
 
 	regname = gdbarch_register_name (get_frame_arch (frame),
@@ -1476,13 +1475,28 @@ value_addr (struct value *arg1)
 
   if (TYPE_CODE (type) == TYPE_CODE_REF)
     {
-      /* Copy the value, but change the type from (T&) to (T*).  We
-         keep the same location information, which is efficient, and
-         allows &(&X) to get the location containing the reference.  */
-      arg2 = value_copy (arg1);
-      deprecated_set_value_type (arg2, 
-				 lookup_pointer_type (TYPE_TARGET_TYPE (type)));
-      return arg2;
+      if (value_bits_synthetic_pointer (arg1, value_embedded_offset (arg1),
+	  TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+	arg1 = coerce_ref (arg1);
+      else
+	{
+	  /* Copy the value, but change the type from (T&) to (T*).  We
+	     keep the same location information, which is efficient, and
+	     allows &(&X) to get the location containing the reference.
+	     Do the same to its enclosing type for consistency.  */
+	  struct type *type_ptr
+	    = lookup_pointer_type (TYPE_TARGET_TYPE (type));
+	  struct type *enclosing_type
+	    = check_typedef (value_enclosing_type (arg1));
+	  struct type *enclosing_type_ptr
+	    = lookup_pointer_type (TYPE_TARGET_TYPE (enclosing_type));
+
+	  arg2 = value_copy (arg1);
+	  deprecated_set_value_type (arg2, type_ptr);
+	  set_value_enclosing_type (arg2, enclosing_type_ptr);
+
+	  return arg2;
+	}
     }
   if (TYPE_CODE (type) == TYPE_CODE_FUNC)
     return value_coerce_function (arg1);
@@ -1596,7 +1610,7 @@ value_array (int lowbound, int highbound
 {
   int nelem;
   int idx;
-  unsigned int typelength;
+  ULONGEST typelength;
   struct value *val;
   struct type *arraytype;
 
@@ -1608,10 +1622,11 @@ value_array (int lowbound, int highbound
     {
       error (_("bad array bounds (%d, %d)"), lowbound, highbound);
     }
-  typelength = TYPE_LENGTH (value_enclosing_type (elemvec[0]));
+  typelength = type_length_units (value_enclosing_type (elemvec[0]));
   for (idx = 1; idx < nelem; idx++)
     {
-      if (TYPE_LENGTH (value_enclosing_type (elemvec[idx])) != typelength)
+      if (type_length_units (value_enclosing_type (elemvec[idx]))
+	  != typelength)
 	{
 	  error (_("array elements must all be the same size"));
 	}
@@ -1639,7 +1654,7 @@ value_array (int lowbound, int highbound
 }
 
 struct value *
-value_cstring (char *ptr, ssize_t len, struct type *char_type)
+value_cstring (const char *ptr, ssize_t len, struct type *char_type)
 {
   struct value *val;
   int lowbound = current_language->string_lower_bound;
@@ -1662,7 +1677,7 @@ value_cstring (char *ptr, ssize_t len, s
    string may contain embedded null bytes.  */
 
 struct value *
-value_string (char *ptr, ssize_t len, struct type *char_type)
+value_string (const char *ptr, ssize_t len, struct type *char_type)
 {
   struct value *val;
   int lowbound = current_language->string_lower_bound;
@@ -1771,7 +1786,7 @@ typecmp (int staticp, int varargs, int n
 
 static void
 update_search_result (struct value **result_ptr, struct value *v,
-		      int *last_boffset, int boffset,
+		      LONGEST *last_boffset, LONGEST boffset,
 		      const char *name, struct type *type)
 {
   if (v != NULL)
@@ -1795,16 +1810,16 @@ update_search_result (struct value **res
    lookup is ambiguous.  */
 
 static void
-do_search_struct_field (const char *name, struct value *arg1, int offset,
+do_search_struct_field (const char *name, struct value *arg1, LONGEST offset,
 			struct type *type, int looking_for_baseclass,
 			struct value **result_ptr,
-			int *last_boffset,
+			LONGEST *last_boffset,
 			struct type *outermost_type)
 {
   int i;
   int nbases;
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   nbases = TYPE_N_BASECLASSES (type);
 
   if (!looking_for_baseclass)
@@ -1845,7 +1860,7 @@ do_search_struct_field (const char *name
 		   <variant field>.  */
 
 		struct value *v = NULL;
-		int new_offset = offset;
+		LONGEST new_offset = offset;
 
 		/* This is pretty gross.  In G++, the offset in an
 		   anonymous union is relative to the beginning of the
@@ -1884,7 +1899,7 @@ do_search_struct_field (const char *name
 			     && (strcmp_iw (name, 
 					    TYPE_BASECLASS_NAME (type, 
 								 i)) == 0));
-      int boffset = value_embedded_offset (arg1) + offset;
+      LONGEST boffset = value_embedded_offset (arg1) + offset;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
 	{
@@ -1949,21 +1964,20 @@ do_search_struct_field (const char *name
 }
 
 /* Helper function used by value_struct_elt to recurse through
-   baseclasses.  Look for a field NAME in ARG1.  Adjust the address of
-   ARG1 by OFFSET bytes, and search in it assuming it has (class) type
-   TYPE.  If found, return value, else return NULL.
+   baseclasses.  Look for a field NAME in ARG1.  Search in it assuming
+   it has (class) type TYPE.  If found, return value, else return NULL.
 
    If LOOKING_FOR_BASECLASS, then instead of looking for struct
    fields, look for a baseclass named NAME.  */
 
 static struct value *
-search_struct_field (const char *name, struct value *arg1, int offset,
+search_struct_field (const char *name, struct value *arg1,
 		     struct type *type, int looking_for_baseclass)
 {
   struct value *result = NULL;
-  int boffset = 0;
+  LONGEST boffset = 0;
 
-  do_search_struct_field (name, arg1, offset, type, looking_for_baseclass,
+  do_search_struct_field (name, arg1, 0, type, looking_for_baseclass,
 			  &result, &boffset, type);
   return result;
 }
@@ -1978,7 +1992,7 @@ search_struct_field (const char *name, s
 
 static struct value *
 search_struct_method (const char *name, struct value **arg1p,
-		      struct value **args, int offset,
+		      struct value **args, LONGEST offset,
 		      int *static_memfuncp, struct type *type)
 {
   int i;
@@ -1986,7 +2000,7 @@ search_struct_method (const char *name, 
   int name_matched = 0;
   char dem_opname[64];
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; i--)
     {
       const char *t_field_name = TYPE_FN_FIELDLIST_NAME (type, i);
@@ -2042,8 +2056,8 @@ search_struct_method (const char *name, 
 
   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
     {
-      int base_offset;
-      int this_offset;
+      LONGEST base_offset;
+      LONGEST this_offset;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
 	{
@@ -2061,7 +2075,7 @@ search_struct_method (const char *name, 
 	      struct cleanup *back_to;
 	      CORE_ADDR address;
 
-	      tmp = xmalloc (TYPE_LENGTH (baseclass));
+	      tmp = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass));
 	      back_to = make_cleanup (xfree, tmp);
 	      address = value_address (*arg1p);
 
@@ -2162,7 +2176,7 @@ value_struct_elt (struct value **argp, s
 
       /* Try as a field first, because if we succeed, there is less
          work to be done.  */
-      v = search_struct_field (name, *argp, 0, t, 0);
+      v = search_struct_field (name, *argp, t, 0);
       if (v)
 	return v;
 
@@ -2196,7 +2210,7 @@ value_struct_elt (struct value **argp, s
       /* See if user tried to invoke data as function.  If so, hand it
          back.  If it's not callable (i.e., a pointer to function),
          gdb should give an error.  */
-      v = search_struct_field (name, *argp, 0, t, 0);
+      v = search_struct_field (name, *argp, t, 0);
       /* If we found an ordinary field, then it is not a method call.
 	 So, treat it as if it were a static member function.  */
       if (v && static_memfuncp)
@@ -2219,9 +2233,7 @@ value_struct_elt_bitpos (struct value **
 			 const char *err)
 {
   struct type *t;
-  struct value *v;
   int i;
-  int nbases;
 
   *argp = coerce_array (*argp);
 
@@ -2278,17 +2290,17 @@ value_struct_elt_bitpos (struct value **
 
 static void
 find_method_list (struct value **argp, const char *method,
-		  int offset, struct type *type,
+		  LONGEST offset, struct type *type,
 		  struct fn_field **fn_list, int *num_fns,
 		  VEC (xmethod_worker_ptr) **xm_worker_vec,
-		  struct type **basetype, int *boffset)
+		  struct type **basetype, LONGEST *boffset)
 {
   int i;
   struct fn_field *f = NULL;
   VEC (xmethod_worker_ptr) *worker_vec = NULL, *new_vec = NULL;
 
   gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   /* First check in object itself.
      This function is called recursively to search through base classes.
@@ -2338,7 +2350,7 @@ find_method_list (struct value **argp, c
      extension methods.  */
   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
     {
-      int base_offset;
+      LONGEST base_offset;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
 	{
@@ -2378,10 +2390,10 @@ find_method_list (struct value **argp, c
 
 static void
 value_find_oload_method_list (struct value **argp, const char *method,
-                              int offset, struct fn_field **fn_list,
+                              LONGEST offset, struct fn_field **fn_list,
                               int *num_fns,
                               VEC (xmethod_worker_ptr) **xm_worker_vec,
-			      struct type **basetype, int *boffset)
+			      struct type **basetype, LONGEST *boffset)
 {
   struct type *t;
 
@@ -2474,7 +2486,6 @@ find_overload_match (struct value **args
   int method_oload_champ = -1;
   int src_method_oload_champ = -1;
   int ext_method_oload_champ = -1;
-  int src_and_ext_equal = 0;
 
   /* The measure for the current best match.  */
   struct badness_vector *method_badness = NULL;
@@ -2492,7 +2503,7 @@ find_overload_match (struct value **args
   /* Number of overloaded instances being considered.  */
   int num_fns = 0;
   struct type *basetype = NULL;
-  int boffset;
+  LONGEST boffset;
 
   struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL);
 
@@ -2519,7 +2530,7 @@ find_overload_match (struct value **args
 	 a function.  */
       if (TYPE_CODE (check_typedef (value_type (obj))) == TYPE_CODE_STRUCT)
 	{
-	  *valp = search_struct_field (name, obj, 0,
+	  *valp = search_struct_field (name, obj,
 				       check_typedef (value_type (obj)), 0);
 	  if (*valp)
 	    {
@@ -2573,7 +2584,6 @@ find_overload_match (struct value **args
 	  switch (compare_badness (ext_method_badness, src_method_badness))
 	    {
 	      case 0: /* Src method and xmethod are equally good.  */
-		src_and_ext_equal = 1;
 		/* If src method and xmethod are equally good, then
 		   xmethod should be the winner.  Hence, fall through to the
 		   case where a xmethod is better than the source
@@ -2914,7 +2924,7 @@ find_oload_champ_namespace_loop (struct 
 
   old_cleanups = make_cleanup (xfree, *oload_syms);
   make_cleanup (xfree, *oload_champ_bv);
-  new_namespace = alloca (namespace_len + 1);
+  new_namespace = (char *) alloca (namespace_len + 1);
   strncpy (new_namespace, qualified_name, namespace_len);
   new_namespace[namespace_len] = '\0';
   new_oload_syms = make_symbol_overload_list (func_name,
@@ -2998,7 +3008,6 @@ find_oload_champ (struct value **args, i
 {
   int ix;
   int fn_count;
-  int xm_worker_vec_n = VEC_length (xmethod_worker_ptr, xm_worker_vec);
   /* A measure of how good an overloaded instance is.  */
   struct badness_vector *bv;
   /* Index of best overloaded function.  */
@@ -3042,8 +3051,7 @@ find_oload_champ (struct value **args, i
 	  else
 	    nparms = TYPE_NFIELDS (SYMBOL_TYPE (oload_syms[ix]));
 
-	  parm_types = (struct type **)
-	    xmalloc (nparms * (sizeof (struct type *)));
+	  parm_types = XNEWVEC (struct type *, nparms);
 	  for (jj = 0; jj < nparms; jj++)
 	    parm_types[jj] = (fns_ptr != NULL
 			      ? (TYPE_FN_FIELD_ARGS (fns_ptr, ix)[jj].type)
@@ -3456,15 +3464,15 @@ value_struct_elt_for_reference (struct t
 	    {
 	      struct symbol *s = 
 		lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j),
-			       0, VAR_DOMAIN, 0);
+			       0, VAR_DOMAIN, 0).symbol;
 
 	      if (s == NULL)
 		return NULL;
 
 	      if (want_address)
-		return value_addr (read_var_value (s, 0));
+		return value_addr (read_var_value (s, 0, 0));
 	      else
-		return read_var_value (s, 0);
+		return read_var_value (s, 0, 0);
 	    }
 
 	  if (TYPE_FN_FIELD_VIRTUAL_P (f, j))
@@ -3487,12 +3495,12 @@ value_struct_elt_for_reference (struct t
 	    {
 	      struct symbol *s = 
 		lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j),
-			       0, VAR_DOMAIN, 0);
+			       0, VAR_DOMAIN, 0).symbol;
 
 	      if (s == NULL)
 		return NULL;
 
-	      v = read_var_value (s, 0);
+	      v = read_var_value (s, 0, 0);
 	      if (!want_address)
 		result = v;
 	      else
@@ -3563,19 +3571,19 @@ value_maybe_namespace_elt (const struct 
 			   enum noside noside)
 {
   const char *namespace_name = TYPE_TAG_NAME (curtype);
-  struct symbol *sym;
+  struct block_symbol sym;
   struct value *result;
 
   sym = cp_lookup_symbol_namespace (namespace_name, name,
 				    get_selected_block (0), VAR_DOMAIN);
 
-  if (sym == NULL)
+  if (sym.symbol == NULL)
     return NULL;
   else if ((noside == EVAL_AVOID_SIDE_EFFECTS)
-	   && (SYMBOL_CLASS (sym) == LOC_TYPEDEF))
-    result = allocate_value (SYMBOL_TYPE (sym));
+	   && (SYMBOL_CLASS (sym.symbol) == LOC_TYPEDEF))
+    result = allocate_value (SYMBOL_TYPE (sym.symbol));
   else
-    result = value_of_variable (sym, get_selected_block (0));
+    result = value_of_variable (sym.symbol, sym.block);
 
   if (want_address)
     result = value_addr (result);
@@ -3590,7 +3598,7 @@ value_maybe_namespace_elt (const struct 
 
 struct type *
 value_rtti_indirect_type (struct value *v, int *full, 
-			  int *top, int *using_enc)
+			  LONGEST *top, int *using_enc)
 {
   struct value *target = NULL;
   struct type *type, *real_type, *target_type;
@@ -3663,7 +3671,7 @@ value_full_object (struct value *argp, 
 {
   struct type *real_type;
   int full = 0;
-  int top = -1;
+  LONGEST top = -1;
   int using_enc = 0;
   struct value *new_val;
 
@@ -3728,7 +3736,7 @@ value_full_object (struct value *argp, 
 struct value *
 value_of_this (const struct language_defn *lang)
 {
-  struct symbol *sym;
+  struct block_symbol sym;
   const struct block *b;
   struct frame_info *frame;
 
@@ -3740,11 +3748,11 @@ value_of_this (const struct language_def
   b = get_frame_block (frame, NULL);
 
   sym = lookup_language_this (lang, b);
-  if (sym == NULL)
+  if (sym.symbol == NULL)
     error (_("current stack frame does not contain a variable named `%s'"),
 	   lang->la_name_of_this);
 
-  return read_var_value (sym, frame);
+  return read_var_value (sym.symbol, sym.block, frame);
 }
 
 /* Return the value of the local variable, if one exists.  Return NULL
@@ -3815,11 +3823,10 @@ value_slice (struct value *array, int lo
       {
 	slice = allocate_value (slice_type);
 	value_contents_copy (slice, 0, array, offset,
-			     TYPE_LENGTH (slice_type));
+			     type_length_units (slice_type));
       }
 
     set_value_component_location (slice, array);
-    VALUE_FRAME_ID (slice) = VALUE_FRAME_ID (array);
     set_value_offset (slice, value_offset (array) + offset);
   }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valprint.c ./gdb/valprint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valprint.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/valprint.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Print values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,7 +34,9 @@
 #include "ada-lang.h"
 #include "gdb_obstack.h"
 #include "charset.h"
+#include "typeprint.h"
 #include <ctype.h>
+#include <algorithm>
 
 /* Maximum number of wchars returned from wchar_iterate.  */
 #define MAX_WCHARS 4
@@ -97,6 +99,10 @@ static void set_output_radix (char *, in
 
 static void set_output_radix_1 (int, unsigned);
 
+static void val_print_type_code_flags (struct type *type,
+				       const gdb_byte *valaddr,
+				       struct ui_file *stream);
+
 void _initialize_valprint (void);
 
 #define PRINT_MAX_DEFAULT 200	/* Start print_max off at this value.  */
@@ -274,11 +280,11 @@ show_symbol_print (struct ui_file *file,
 int
 val_print_scalar_type_p (struct type *type)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   while (TYPE_CODE (type) == TYPE_CODE_REF)
     {
       type = TYPE_TARGET_TYPE (type);
-      CHECK_TYPEDEF (type);
+      type = check_typedef (type);
     }
   switch (TYPE_CODE (type))
     {
@@ -298,10 +304,22 @@ val_print_scalar_type_p (struct type *ty
 int
 valprint_check_validity (struct ui_file *stream,
 			 struct type *type,
-			 int embedded_offset,
+			 LONGEST embedded_offset,
 			 const struct value *val)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
+
+  if (type_not_associated (type))
+    {
+      val_print_not_associated (stream);
+      return 0;
+    }
+
+  if (type_not_allocated (type))
+    {
+      val_print_not_allocated (stream);
+      return 0;
+    }
 
   if (TYPE_CODE (type) != TYPE_CODE_UNION
       && TYPE_CODE (type) != TYPE_CODE_STRUCT
@@ -318,8 +336,22 @@ valprint_check_validity (struct ui_file 
       if (value_bits_synthetic_pointer (val, TARGET_CHAR_BIT * embedded_offset,
 					TARGET_CHAR_BIT * TYPE_LENGTH (type)))
 	{
-	  fputs_filtered (_("<synthetic pointer>"), stream);
-	  return 0;
+	  const int is_ref = TYPE_CODE (type) == TYPE_CODE_REF;
+	  int ref_is_addressable = 0;
+
+	  if (is_ref)
+	    {
+	      const struct value *deref_val = coerce_ref_if_computed (val);
+
+	      if (deref_val != NULL)
+		ref_is_addressable = value_lval_const (deref_val) == lval_memory;
+	    }
+
+	  if (!is_ref || !ref_is_addressable)
+	    fputs_filtered (_("<synthetic pointer>"), stream);
+
+	  /* C++ references should be valid even if they're synthetic.  */
+	  return is_ref;
 	}
 
       if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
@@ -359,209 +391,342 @@ val_print_invalid_address (struct ui_fil
   fprintf_filtered (stream, _("<invalid address>"));
 }
 
-/* A generic val_print that is suitable for use by language
-   implementations of the la_val_print method.  This function can
-   handle most type codes, though not all, notably exception
-   TYPE_CODE_UNION and TYPE_CODE_STRUCT, which must be implemented by
-   the caller.
-   
-   Most arguments are as to val_print.
-   
-   The additional DECORATIONS argument can be used to customize the
-   output in some small, language-specific ways.  */
+/* Print a pointer based on the type of its target.
 
-void
-generic_val_print (struct type *type, const gdb_byte *valaddr,
-		   int embedded_offset, CORE_ADDR address,
-		   struct ui_file *stream, int recurse,
-		   const struct value *original_value,
-		   const struct value_print_options *options,
-		   const struct generic_val_print_decorations *decorations)
+   Arguments to this functions are roughly the same as those in
+   generic_val_print.  A difference is that ADDRESS is the address to print,
+   with embedded_offset already added.  ELTTYPE represents
+   the pointed type after check_typedef.  */
+
+static void
+print_unpacked_pointer (struct type *type, struct type *elttype,
+			CORE_ADDR address, struct ui_file *stream,
+			const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
-  unsigned int i = 0;	/* Number of characters printed.  */
-  unsigned len;
-  struct type *elttype, *unresolved_elttype;
-  struct type *unresolved_type = type;
-  LONGEST val;
-  CORE_ADDR addr;
 
-  CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type))
+  if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
     {
-    case TYPE_CODE_ARRAY:
-      unresolved_elttype = TYPE_TARGET_TYPE (type);
-      elttype = check_typedef (unresolved_elttype);
-      if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0)
-	{
-          LONGEST low_bound, high_bound;
+      /* Try to print what function it points to.  */
+      print_function_pointer_address (options, gdbarch, address, stream);
+      return;
+    }
 
-          if (!get_array_bounds (type, &low_bound, &high_bound))
-            error (_("Could not determine the array high bound"));
+  if (options->symbol_print)
+    print_address_demangle (options, gdbarch, address, stream, demangle);
+  else if (options->addressprint)
+    fputs_filtered (paddress (gdbarch, address), stream);
+}
 
-	  if (options->prettyformat_arrays)
-	    {
-	      print_spaces_filtered (2 + 2 * recurse, stream);
-	    }
+/* generic_val_print helper for TYPE_CODE_ARRAY.  */
 
-	  fprintf_filtered (stream, "{");
-	  val_print_array_elements (type, valaddr, embedded_offset,
-				    address, stream,
-				    recurse, original_value, options, 0);
-	  fprintf_filtered (stream, "}");
-	  break;
-	}
-      /* Array of unspecified length: treat like pointer to first
-	 elt.  */
-      addr = address + embedded_offset;
-      goto print_unpacked_pointer;
+static void
+generic_val_print_array (struct type *type,
+			 int embedded_offset, CORE_ADDR address,
+			 struct ui_file *stream, int recurse,
+			 struct value *original_value,
+			 const struct value_print_options *options,
+			 const struct
+			     generic_val_print_decorations *decorations)
+{
+  struct type *unresolved_elttype = TYPE_TARGET_TYPE (type);
+  struct type *elttype = check_typedef (unresolved_elttype);
 
-    case TYPE_CODE_MEMBERPTR:
-      val_print_scalar_formatted (type, valaddr, embedded_offset,
-				  original_value, options, 0, stream);
-      break;
+  if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0)
+    {
+      LONGEST low_bound, high_bound;
 
-    case TYPE_CODE_PTR:
-      if (options->format && options->format != 's')
+      if (!get_array_bounds (type, &low_bound, &high_bound))
+	error (_("Could not determine the array high bound"));
+
+      if (options->prettyformat_arrays)
 	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, options, 0, stream);
-	  break;
+	  print_spaces_filtered (2 + 2 * recurse, stream);
 	}
-      unresolved_elttype = TYPE_TARGET_TYPE (type);
-      elttype = check_typedef (unresolved_elttype);
-	{
-	  addr = unpack_pointer (type, valaddr + embedded_offset);
-	print_unpacked_pointer:
 
-	  if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
-	    {
-	      /* Try to print what function it points to.  */
-	      print_function_pointer_address (options, gdbarch, addr, stream);
-	      return;
-	    }
+      fputs_filtered (decorations->array_start, stream);
+      val_print_array_elements (type, embedded_offset,
+				address, stream,
+				recurse, original_value, options, 0);
+      fputs_filtered (decorations->array_end, stream);
+    }
+  else
+    {
+      /* Array of unspecified length: treat like pointer to first elt.  */
+      print_unpacked_pointer (type, elttype, address + embedded_offset, stream,
+			      options);
+    }
 
-	  if (options->symbol_print)
-	    print_address_demangle (options, gdbarch, addr, stream, demangle);
-	  else if (options->addressprint)
-	    fputs_filtered (paddress (gdbarch, addr), stream);
-	}
-      break;
+}
 
-    case TYPE_CODE_REF:
-      elttype = check_typedef (TYPE_TARGET_TYPE (type));
-      if (options->addressprint)
-	{
-	  CORE_ADDR addr
-	    = extract_typed_address (valaddr + embedded_offset, type);
+/* generic_val_print helper for TYPE_CODE_PTR.  */
 
-	  fprintf_filtered (stream, "@");
-	  fputs_filtered (paddress (gdbarch, addr), stream);
-	  if (options->deref_ref)
-	    fputs_filtered (": ", stream);
+static void
+generic_val_print_ptr (struct type *type,
+		       int embedded_offset, struct ui_file *stream,
+		       struct value *original_value,
+		       const struct value_print_options *options)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format && options->format != 's')
+    {
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, options, 0, stream);
+    }
+  else
+    {
+      struct type *unresolved_elttype = TYPE_TARGET_TYPE(type);
+      struct type *elttype = check_typedef (unresolved_elttype);
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+      CORE_ADDR addr = unpack_pointer (type,
+				       valaddr + embedded_offset * unit_size);
+
+      print_unpacked_pointer (type, elttype, addr, stream, options);
+    }
+}
+
+
+/* generic_val_print helper for TYPE_CODE_MEMBERPTR.  */
+
+static void
+generic_val_print_memberptr (struct type *type,
+			     int embedded_offset, struct ui_file *stream,
+			     struct value *original_value,
+			     const struct value_print_options *options)
+{
+  val_print_scalar_formatted (type, embedded_offset,
+			      original_value, options, 0, stream);
+}
+
+/* Print '@' followed by the address contained in ADDRESS_BUFFER.  */
+
+static void
+print_ref_address (struct type *type, const gdb_byte *address_buffer,
+		  int embedded_offset, struct ui_file *stream)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+
+  if (address_buffer != NULL)
+    {
+      CORE_ADDR address
+	= extract_typed_address (address_buffer + embedded_offset, type);
+
+      fprintf_filtered (stream, "@");
+      fputs_filtered (paddress (gdbarch, address), stream);
+    }
+  /* Else: we have a non-addressable value, such as a DW_AT_const_value.  */
+}
+
+/* If VAL is addressable, return the value contents buffer of a value that
+   represents a pointer to VAL.  Otherwise return NULL.  */
+
+static const gdb_byte *
+get_value_addr_contents (struct value *deref_val)
+{
+  gdb_assert (deref_val != NULL);
+
+  if (value_lval_const (deref_val) == lval_memory)
+    return value_contents_for_printing_const (value_addr (deref_val));
+  else
+    {
+      /* We have a non-addressable value, such as a DW_AT_const_value.  */
+      return NULL;
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_REF.  */
+
+static void
+generic_val_print_ref (struct type *type,
+		       int embedded_offset, struct ui_file *stream, int recurse,
+		       struct value *original_value,
+		       const struct value_print_options *options)
+{
+  struct type *elttype = check_typedef (TYPE_TARGET_TYPE (type));
+  struct value *deref_val = NULL;
+  const int value_is_synthetic
+    = value_bits_synthetic_pointer (original_value,
+				    TARGET_CHAR_BIT * embedded_offset,
+				    TARGET_CHAR_BIT * TYPE_LENGTH (type));
+  const int must_coerce_ref = ((options->addressprint && value_is_synthetic)
+			       || options->deref_ref);
+  const int type_is_defined = TYPE_CODE (elttype) != TYPE_CODE_UNDEF;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+  if (must_coerce_ref && type_is_defined)
+    {
+      deref_val = coerce_ref_if_computed (original_value);
+
+      if (deref_val != NULL)
+	{
+	  /* More complicated computed references are not supported.  */
+	  gdb_assert (embedded_offset == 0);
 	}
-      /* De-reference the reference.  */
+      else
+	deref_val = value_at (TYPE_TARGET_TYPE (type),
+			      unpack_pointer (type, valaddr + embedded_offset));
+    }
+  /* Else, original_value isn't a synthetic reference or we don't have to print
+     the reference's contents.
+
+     Notice that for references to TYPE_CODE_STRUCT, 'set print object on' will
+     cause original_value to be a not_lval instead of an lval_computed,
+     which will make value_bits_synthetic_pointer return false.
+     This happens because if options->objectprint is true, c_value_print will
+     overwrite original_value's contents with the result of coercing
+     the reference through value_addr, and then set its type back to
+     TYPE_CODE_REF.  In that case we don't have to coerce the reference again;
+     we can simply treat it as non-synthetic and move on.  */
+
+  if (options->addressprint)
+    {
+      const gdb_byte *address = (value_is_synthetic && type_is_defined
+				 ? get_value_addr_contents (deref_val)
+				 : valaddr);
+
+      print_ref_address (type, address, embedded_offset, stream);
+
       if (options->deref_ref)
-	{
-	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
-	    {
-	      struct value *deref_val;
+	fputs_filtered (": ", stream);
+    }
 
-	      deref_val = coerce_ref_if_computed (original_value);
-	      if (deref_val != NULL)
-		{
-		  /* More complicated computed references are not supported.  */
-		  gdb_assert (embedded_offset == 0);
-		}
-	      else
-		deref_val = value_at (TYPE_TARGET_TYPE (type),
-				      unpack_pointer (type,
-						      (valaddr
-						       + embedded_offset)));
+  if (options->deref_ref)
+    {
+      if (type_is_defined)
+	common_val_print (deref_val, stream, recurse, options,
+			  current_language);
+      else
+	fputs_filtered ("???", stream);
+    }
+}
 
-	      common_val_print (deref_val, stream, recurse, options,
-				current_language);
-	    }
-	  else
-	    fputs_filtered ("???", stream);
-	}
-      break;
+/* Helper function for generic_val_print_enum.
+   This is also used to print enums in TYPE_CODE_FLAGS values.  */
 
-    case TYPE_CODE_ENUM:
-      if (options->format)
+static void
+generic_val_print_enum_1 (struct type *type, LONGEST val,
+			  struct ui_file *stream)
+{
+  unsigned int i;
+  unsigned int len;
+
+  len = TYPE_NFIELDS (type);
+  for (i = 0; i < len; i++)
+    {
+      QUIT;
+      if (val == TYPE_FIELD_ENUMVAL (type, i))
 	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, options, 0, stream);
 	  break;
 	}
-      len = TYPE_NFIELDS (type);
-      val = unpack_long (type, valaddr + embedded_offset);
-      for (i = 0; i < len; i++)
+    }
+  if (i < len)
+    {
+      fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
+    }
+  else if (TYPE_FLAG_ENUM (type))
+    {
+      int first = 1;
+
+      /* We have a "flag" enum, so we try to decompose it into
+	 pieces as appropriate.  A flag enum has disjoint
+	 constants by definition.  */
+      fputs_filtered ("(", stream);
+      for (i = 0; i < len; ++i)
 	{
 	  QUIT;
-	  if (val == TYPE_FIELD_ENUMVAL (type, i))
+
+	  if ((val & TYPE_FIELD_ENUMVAL (type, i)) != 0)
 	    {
-	      break;
+	      if (!first)
+		fputs_filtered (" | ", stream);
+	      first = 0;
+
+	      val &= ~TYPE_FIELD_ENUMVAL (type, i);
+	      fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
 	    }
 	}
-      if (i < len)
+
+      if (first || val != 0)
 	{
-	  fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
+	  if (!first)
+	    fputs_filtered (" | ", stream);
+	  fputs_filtered ("unknown: ", stream);
+	  print_longest (stream, 'd', 0, val);
 	}
-      else if (TYPE_FLAG_ENUM (type))
-	{
-	  int first = 1;
 
-	  /* We have a "flag" enum, so we try to decompose it into
-	     pieces as appropriate.  A flag enum has disjoint
-	     constants by definition.  */
-	  fputs_filtered ("(", stream);
-	  for (i = 0; i < len; ++i)
-	    {
-	      QUIT;
+      fputs_filtered (")", stream);
+    }
+  else
+    print_longest (stream, 'd', 0, val);
+}
 
-	      if ((val & TYPE_FIELD_ENUMVAL (type, i)) != 0)
-		{
-		  if (!first)
-		    fputs_filtered (" | ", stream);
-		  first = 0;
+/* generic_val_print helper for TYPE_CODE_ENUM.  */
 
-		  val &= ~TYPE_FIELD_ENUMVAL (type, i);
-		  fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
-		}
-	    }
+static void
+generic_val_print_enum (struct type *type,
+			int embedded_offset, struct ui_file *stream,
+			struct value *original_value,
+			const struct value_print_options *options)
+{
+  LONGEST val;
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
 
-	  if (first || val != 0)
-	    {
-	      if (!first)
-		fputs_filtered (" | ", stream);
-	      fputs_filtered ("unknown: ", stream);
-	      print_longest (stream, 'd', 0, val);
-	    }
+  if (options->format)
+    {
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, options, 0, stream);
+    }
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
 
-	  fputs_filtered (")", stream);
-	}
-      else
-	print_longest (stream, 'd', 0, val);
-      break;
+      val = unpack_long (type, valaddr + embedded_offset * unit_size);
 
-    case TYPE_CODE_FLAGS:
-      if (options->format)
-	val_print_scalar_formatted (type, valaddr, embedded_offset,
-				    original_value, options, 0, stream);
-      else
-	val_print_type_code_flags (type, valaddr + embedded_offset,
-				   stream);
-      break;
+      generic_val_print_enum_1 (type, val, stream);
+    }
+}
 
-    case TYPE_CODE_FUNC:
-    case TYPE_CODE_METHOD:
-      if (options->format)
-	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, options, 0, stream);
-	  break;
-	}
+/* generic_val_print helper for TYPE_CODE_FLAGS.  */
+
+static void
+generic_val_print_flags (struct type *type,
+			 int embedded_offset, struct ui_file *stream,
+			 struct value *original_value,
+			 const struct value_print_options *options)
+
+{
+  if (options->format)
+    val_print_scalar_formatted (type, embedded_offset, original_value,
+				options, 0, stream);
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      val_print_type_code_flags (type, valaddr + embedded_offset, stream);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_FUNC and TYPE_CODE_METHOD.  */
+
+static void
+generic_val_print_func (struct type *type,
+			int embedded_offset, CORE_ADDR address,
+			struct ui_file *stream,
+			struct value *original_value,
+			const struct value_print_options *options)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+
+  if (options->format)
+    {
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, options, 0, stream);
+    }
+  else
+    {
       /* FIXME, we should consider, at least for ANSI C language,
          eliminating the distinction made between FUNCs and POINTERs
          to FUNCs.  */
@@ -570,27 +735,254 @@ generic_val_print (struct type *type, co
       fprintf_filtered (stream, "} ");
       /* Try to print what function it points to, and its address.  */
       print_address_demangle (options, gdbarch, address, stream, demangle);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_BOOL.  */
+
+static void
+generic_val_print_bool (struct type *type,
+			int embedded_offset, struct ui_file *stream,
+			struct value *original_value,
+			const struct value_print_options *options,
+			const struct generic_val_print_decorations *decorations)
+{
+  LONGEST val;
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format || options->output_format)
+    {
+      struct value_print_options opts = *options;
+      opts.format = (options->format ? options->format
+		     : options->output_format);
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, &opts, 0, stream);
+    }
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      val = unpack_long (type, valaddr + embedded_offset * unit_size);
+      if (val == 0)
+	fputs_filtered (decorations->false_name, stream);
+      else if (val == 1)
+	fputs_filtered (decorations->true_name, stream);
+      else
+	print_longest (stream, 'd', 0, val);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_INT.  */
+
+static void
+generic_val_print_int (struct type *type,
+		       int embedded_offset, struct ui_file *stream,
+		       struct value *original_value,
+		       const struct value_print_options *options)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format || options->output_format)
+    {
+      struct value_print_options opts = *options;
+
+      opts.format = (options->format ? options->format
+		     : options->output_format);
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, &opts, 0, stream);
+    }
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      val_print_type_code_int (type, valaddr + embedded_offset * unit_size,
+			       stream);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_CHAR.  */
+
+static void
+generic_val_print_char (struct type *type, struct type *unresolved_type,
+			int embedded_offset,
+			struct ui_file *stream,
+			struct value *original_value,
+			const struct value_print_options *options)
+{
+  LONGEST val;
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format || options->output_format)
+    {
+      struct value_print_options opts = *options;
+
+      opts.format = (options->format ? options->format
+		     : options->output_format);
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, &opts, 0, stream);
+    }
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      val = unpack_long (type, valaddr + embedded_offset * unit_size);
+      if (TYPE_UNSIGNED (type))
+	fprintf_filtered (stream, "%u", (unsigned int) val);
+      else
+	fprintf_filtered (stream, "%d", (int) val);
+      fputs_filtered (" ", stream);
+      LA_PRINT_CHAR (val, unresolved_type, stream);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_FLT.  */
+
+static void
+generic_val_print_float (struct type *type,
+			 int embedded_offset, struct ui_file *stream,
+			 struct value *original_value,
+			 const struct value_print_options *options)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format)
+    {
+      val_print_scalar_formatted (type, embedded_offset,
+				  original_value, options, 0, stream);
+    }
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      print_floating (valaddr + embedded_offset * unit_size, type, stream);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_DECFLOAT.  */
+
+static void
+generic_val_print_decfloat (struct type *type,
+			    int embedded_offset, struct ui_file *stream,
+			    struct value *original_value,
+			    const struct value_print_options *options)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+
+  if (options->format)
+    val_print_scalar_formatted (type, embedded_offset, original_value,
+				options, 0, stream);
+  else
+    {
+      const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+      print_decimal_floating (valaddr + embedded_offset * unit_size, type,
+			      stream);
+    }
+}
+
+/* generic_val_print helper for TYPE_CODE_COMPLEX.  */
+
+static void
+generic_val_print_complex (struct type *type,
+			   int embedded_offset, struct ui_file *stream,
+			   struct value *original_value,
+			   const struct value_print_options *options,
+			   const struct generic_val_print_decorations
+			     *decorations)
+{
+  struct gdbarch *gdbarch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
+
+  fprintf_filtered (stream, "%s", decorations->complex_prefix);
+  if (options->format)
+    val_print_scalar_formatted (TYPE_TARGET_TYPE (type),
+				embedded_offset, original_value, options, 0,
+				stream);
+  else
+    print_floating (valaddr + embedded_offset * unit_size,
+		    TYPE_TARGET_TYPE (type), stream);
+  fprintf_filtered (stream, "%s", decorations->complex_infix);
+  if (options->format)
+    val_print_scalar_formatted (TYPE_TARGET_TYPE (type),
+				embedded_offset
+				+ type_length_units (TYPE_TARGET_TYPE (type)),
+				original_value, options, 0, stream);
+  else
+    print_floating (valaddr + embedded_offset * unit_size
+		    + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
+		    TYPE_TARGET_TYPE (type), stream);
+  fprintf_filtered (stream, "%s", decorations->complex_suffix);
+}
+
+/* A generic val_print that is suitable for use by language
+   implementations of the la_val_print method.  This function can
+   handle most type codes, though not all, notably exception
+   TYPE_CODE_UNION and TYPE_CODE_STRUCT, which must be implemented by
+   the caller.
+   
+   Most arguments are as to val_print.
+   
+   The additional DECORATIONS argument can be used to customize the
+   output in some small, language-specific ways.  */
+
+void
+generic_val_print (struct type *type,
+		   int embedded_offset, CORE_ADDR address,
+		   struct ui_file *stream, int recurse,
+		   struct value *original_value,
+		   const struct value_print_options *options,
+		   const struct generic_val_print_decorations *decorations)
+{
+  struct type *unresolved_type = type;
+
+  type = check_typedef (type);
+  switch (TYPE_CODE (type))
+    {
+    case TYPE_CODE_ARRAY:
+      generic_val_print_array (type, embedded_offset, address, stream,
+			       recurse, original_value, options, decorations);
+      break;
+
+    case TYPE_CODE_MEMBERPTR:
+      generic_val_print_memberptr (type, embedded_offset, stream,
+				   original_value, options);
+      break;
+
+    case TYPE_CODE_PTR:
+      generic_val_print_ptr (type, embedded_offset, stream,
+			     original_value, options);
+      break;
+
+    case TYPE_CODE_REF:
+      generic_val_print_ref (type, embedded_offset, stream, recurse,
+			     original_value, options);
+      break;
+
+    case TYPE_CODE_ENUM:
+      generic_val_print_enum (type, embedded_offset, stream,
+			      original_value, options);
+      break;
+
+    case TYPE_CODE_FLAGS:
+      generic_val_print_flags (type, embedded_offset, stream,
+			       original_value, options);
+      break;
+
+    case TYPE_CODE_FUNC:
+    case TYPE_CODE_METHOD:
+      generic_val_print_func (type, embedded_offset, address, stream,
+			      original_value, options);
       break;
 
     case TYPE_CODE_BOOL:
-      if (options->format || options->output_format)
-	{
-	  struct value_print_options opts = *options;
-	  opts.format = (options->format ? options->format
-			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, &opts, 0, stream);
-	}
-      else
-	{
-	  val = unpack_long (type, valaddr + embedded_offset);
-	  if (val == 0)
-	    fputs_filtered (decorations->false_name, stream);
-	  else if (val == 1)
-	    fputs_filtered (decorations->true_name, stream);
-	  else
-	    print_longest (stream, 'd', 0, val);
-	}
+      generic_val_print_bool (type, embedded_offset, stream,
+			      original_value, options, decorations);
       break;
 
     case TYPE_CODE_RANGE:
@@ -605,60 +997,23 @@ generic_val_print (struct type *type, co
       /* FALLTHROUGH */
 
     case TYPE_CODE_INT:
-      if (options->format || options->output_format)
-	{
-	  struct value_print_options opts = *options;
-
-	  opts.format = (options->format ? options->format
-			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, &opts, 0, stream);
-	}
-      else
-	val_print_type_code_int (type, valaddr + embedded_offset, stream);
+      generic_val_print_int (type, embedded_offset, stream,
+			     original_value, options);
       break;
 
     case TYPE_CODE_CHAR:
-      if (options->format || options->output_format)
-	{
-	  struct value_print_options opts = *options;
-
-	  opts.format = (options->format ? options->format
-			 : options->output_format);
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, &opts, 0, stream);
-	}
-      else
-	{
-	  val = unpack_long (type, valaddr + embedded_offset);
-	  if (TYPE_UNSIGNED (type))
-	    fprintf_filtered (stream, "%u", (unsigned int) val);
-	  else
-	    fprintf_filtered (stream, "%d", (int) val);
-	  fputs_filtered (" ", stream);
-	  LA_PRINT_CHAR (val, unresolved_type, stream);
-	}
+      generic_val_print_char (type, unresolved_type, embedded_offset,
+			      stream, original_value, options);
       break;
 
     case TYPE_CODE_FLT:
-      if (options->format)
-	{
-	  val_print_scalar_formatted (type, valaddr, embedded_offset,
-				      original_value, options, 0, stream);
-	}
-      else
-	{
-	  print_floating (valaddr + embedded_offset, type, stream);
-	}
+      generic_val_print_float (type, embedded_offset, stream,
+			       original_value, options);
       break;
 
     case TYPE_CODE_DECFLOAT:
-      if (options->format)
-	val_print_scalar_formatted (type, valaddr, embedded_offset,
-				    original_value, options, 0, stream);
-      else
-	print_decimal_floating (valaddr + embedded_offset,
-				type, stream);
+      generic_val_print_decfloat (type, embedded_offset, stream,
+				  original_value, options);
       break;
 
     case TYPE_CODE_VOID:
@@ -670,37 +1025,15 @@ generic_val_print (struct type *type, co
       break;
 
     case TYPE_CODE_UNDEF:
-      /* This happens (without TYPE_FLAG_STUB set) on systems which
-         don't use dbx xrefs (NO_DBX_XREFS in gcc) if a file has a
-         "struct foo *bar" and no complete type for struct foo in that
-         file.  */
+      /* This happens (without TYPE_STUB set) on systems which don't use
+         dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
+         and no complete type for struct foo in that file.  */
       fprintf_filtered (stream, _("<incomplete type>"));
       break;
 
     case TYPE_CODE_COMPLEX:
-      fprintf_filtered (stream, "%s", decorations->complex_prefix);
-      if (options->format)
-	val_print_scalar_formatted (TYPE_TARGET_TYPE (type),
-				    valaddr, embedded_offset,
-				    original_value, options, 0, stream);
-      else
-	print_floating (valaddr + embedded_offset,
-			TYPE_TARGET_TYPE (type),
-			stream);
-      fprintf_filtered (stream, "%s", decorations->complex_infix);
-      if (options->format)
-	val_print_scalar_formatted (TYPE_TARGET_TYPE (type),
-				    valaddr,
-				    embedded_offset
-				    + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
-				    original_value,
-				    options, 0, stream);
-      else
-	print_floating (valaddr + embedded_offset
-			+ TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
-			TYPE_TARGET_TYPE (type),
-			stream);
-      fprintf_filtered (stream, "%s", decorations->complex_suffix);
+      generic_val_print_complex (type, embedded_offset, stream,
+				 original_value, options, decorations);
       break;
 
     case TYPE_CODE_UNION:
@@ -714,15 +1047,14 @@ generic_val_print (struct type *type, co
 }
 
 /* Print using the given LANGUAGE the data of type TYPE located at
-   VALADDR + EMBEDDED_OFFSET (within GDB), which came from the
-   inferior at address ADDRESS + EMBEDDED_OFFSET, onto stdio stream
-   STREAM according to OPTIONS.  VAL is the whole object that came
-   from ADDRESS.  VALADDR must point to the head of VAL's contents
-   buffer.
+   VAL's contents buffer + EMBEDDED_OFFSET (within GDB), which came
+   from the inferior at address ADDRESS + EMBEDDED_OFFSET, onto
+   stdio stream STREAM according to OPTIONS.  VAL is the whole object
+   that came from ADDRESS.
 
    The language printers will pass down an adjusted EMBEDDED_OFFSET to
    further helper subroutines as subfields of TYPE are printed.  In
-   such cases, VALADDR is passed down unadjusted, as well as VAL, so
+   such cases, VAL is passed down unadjusted, so
    that VAL can be queried for metadata about the contents data being
    printed, using EMBEDDED_OFFSET as an offset into VAL's contents
    buffer.  For example: "has this field been optimized out", or "I'm
@@ -734,9 +1066,9 @@ generic_val_print (struct type *type, co
    RECURSE.  */
 
 void
-val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+val_print (struct type *type, LONGEST embedded_offset,
 	   CORE_ADDR address, struct ui_file *stream, int recurse,
-	   const struct value *val,
+	   struct value *val,
 	   const struct value_print_options *options,
 	   const struct language_defn *language)
 {
@@ -766,7 +1098,7 @@ val_print (struct type *type, const gdb_
 
   if (!options->raw)
     {
-      ret = apply_ext_lang_val_pretty_printer (type, valaddr, embedded_offset,
+      ret = apply_ext_lang_val_pretty_printer (type, embedded_offset,
 					       address, stream, recurse,
 					       val, options, language);
       if (ret)
@@ -783,7 +1115,7 @@ val_print (struct type *type, const gdb_
 
   TRY
     {
-      language->la_val_print (type, valaddr, embedded_offset, address,
+      language->la_val_print (type, embedded_offset, address,
 			      stream, recurse, val,
 			      &local_opts);
     }
@@ -833,6 +1165,18 @@ value_check_printable (struct value *val
       return 0;
     }
 
+  if (type_not_associated (value_type (val)))
+    {
+      val_print_not_associated (stream);
+      return 0;
+    }
+
+  if (type_not_allocated (value_type (val)))
+    {
+      val_print_not_allocated (stream);
+      return 0;
+    }
+
   return 1;
 }
 
@@ -857,7 +1201,10 @@ common_val_print (struct value *val, str
        get a fixed representation of our value.  */
     val = ada_to_fixed_value (val);
 
-  val_print (value_type (val), value_contents_for_printing (val),
+  if (value_lazy (val))
+    value_fetch_lazy (val);
+
+  val_print (value_type (val),
 	     value_embedded_offset (val), value_address (val),
 	     stream, recurse,
 	     val, options, language);
@@ -877,7 +1224,6 @@ value_print (struct value *val, struct u
     {
       int r
 	= apply_ext_lang_val_pretty_printer (value_type (val),
-					     value_contents_for_printing (val),
 					     value_embedded_offset (val),
 					     value_address (val),
 					     stream, 0,
@@ -927,26 +1273,51 @@ val_print_type_code_int (struct type *ty
     }
 }
 
-void
+static void
 val_print_type_code_flags (struct type *type, const gdb_byte *valaddr,
 			   struct ui_file *stream)
 {
   ULONGEST val = unpack_long (type, valaddr);
-  int bitpos, nfields = TYPE_NFIELDS (type);
+  int field, nfields = TYPE_NFIELDS (type);
+  struct gdbarch *gdbarch = get_type_arch (type);
+  struct type *bool_type = builtin_type (gdbarch)->builtin_bool;
 
-  fputs_filtered ("[ ", stream);
-  for (bitpos = 0; bitpos < nfields; bitpos++)
+  fputs_filtered ("[", stream);
+  for (field = 0; field < nfields; field++)
     {
-      if (TYPE_FIELD_BITPOS (type, bitpos) != -1
-	  && (val & ((ULONGEST)1 << bitpos)))
+      if (TYPE_FIELD_NAME (type, field)[0] != '\0')
 	{
-	  if (TYPE_FIELD_NAME (type, bitpos))
-	    fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
+	  struct type *field_type = TYPE_FIELD_TYPE (type, field);
+
+	  if (field_type == bool_type
+	      /* We require boolean types here to be one bit wide.  This is a
+		 problematic place to notify the user of an internal error
+		 though.  Instead just fall through and print the field as an
+		 int.  */
+	      && TYPE_FIELD_BITSIZE (type, field) == 1)
+	    {
+	      if (val & ((ULONGEST)1 << TYPE_FIELD_BITPOS (type, field)))
+		fprintf_filtered (stream, " %s",
+				  TYPE_FIELD_NAME (type, field));
+	    }
 	  else
-	    fprintf_filtered (stream, "#%d ", bitpos);
+	    {
+	      unsigned field_len = TYPE_FIELD_BITSIZE (type, field);
+	      ULONGEST field_val
+		= val >> (TYPE_FIELD_BITPOS (type, field) - field_len + 1);
+
+	      if (field_len < sizeof (ULONGEST) * TARGET_CHAR_BIT)
+		field_val &= ((ULONGEST) 1 << field_len) - 1;
+	      fprintf_filtered (stream, " %s=",
+				TYPE_FIELD_NAME (type, field));
+	      if (TYPE_CODE (field_type) == TYPE_CODE_ENUM)
+		generic_val_print_enum_1 (field_type, field_val, stream);
+	      else
+		print_longest (stream, 'd', 0, field_val);
+	    }
 	}
     }
-  fputs_filtered ("]", stream);
+  fputs_filtered (" ]", stream);
 }
 
 /* Print a scalar of data of type TYPE, pointed to in GDB by VALADDR,
@@ -958,14 +1329,16 @@ val_print_type_code_flags (struct type *
 
 void
 val_print_scalar_formatted (struct type *type,
-			    const gdb_byte *valaddr, int embedded_offset,
-			    const struct value *val,
+			    LONGEST embedded_offset,
+			    struct value *val,
 			    const struct value_print_options *options,
 			    int size,
 			    struct ui_file *stream)
 {
+  struct gdbarch *arch = get_type_arch (type);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+
   gdb_assert (val != NULL);
-  gdb_assert (valaddr == value_contents_for_printing_const (val));
 
   /* If we get here with a string format, try again without it.  Go
      all the way back to the language printers, which may call us
@@ -975,11 +1348,16 @@ val_print_scalar_formatted (struct type 
       struct value_print_options opts = *options;
       opts.format = 0;
       opts.deref_ref = 0;
-      val_print (type, valaddr, embedded_offset, 0, stream, 0, val, &opts,
+      val_print (type, embedded_offset, 0, stream, 0, val, &opts,
 		 current_language);
       return;
     }
 
+  /* value_contents_for_printing fetches all VAL's contents.  They are
+     needed to check whether VAL is optimized-out or unavailable
+     below.  */
+  const gdb_byte *valaddr = value_contents_for_printing (val);
+
   /* A scalar object that does not have all bits available can't be
      printed, because all bits contribute to its representation.  */
   if (value_bits_any_optimized_out (val,
@@ -989,7 +1367,7 @@ val_print_scalar_formatted (struct type 
   else if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
     val_print_unavailable (stream);
   else
-    print_scalar_formatted (valaddr + embedded_offset, type,
+    print_scalar_formatted (valaddr + embedded_offset * unit_size, type,
 			    options, size, stream);
 }
 
@@ -1390,7 +1768,7 @@ print_decimal_chars (struct ui_file *str
      as the base 16 number, which is 2 digits per byte.  */
 
   decimal_len = len * 2 * 2;
-  digits = xmalloc (decimal_len);
+  digits = (unsigned char *) xmalloc (decimal_len);
 
   for (i = 0; i < decimal_len; i++)
     {
@@ -1617,10 +1995,10 @@ maybe_print_array_index (struct type *in
 
 void
 val_print_array_elements (struct type *type,
-			  const gdb_byte *valaddr, int embedded_offset,
+			  LONGEST embedded_offset,
 			  CORE_ADDR address, struct ui_file *stream,
 			  int recurse,
-			  const struct value *val,
+			  struct value *val,
 			  const struct value_print_options *options,
 			  unsigned int i)
 {
@@ -1637,7 +2015,7 @@ val_print_array_elements (struct type *t
   LONGEST low_pos, high_pos;
 
   elttype = TYPE_TARGET_TYPE (type);
-  eltlen = TYPE_LENGTH (check_typedef (elttype));
+  eltlen = type_length_units (check_typedef (elttype));
   index_type = TYPE_INDEX_TYPE (type);
 
   if (get_array_bounds (type, &low_bound, &high_bound))
@@ -1718,7 +2096,7 @@ val_print_array_elements (struct type *t
 
       if (reps > options->repeat_count_threshold)
 	{
-	  val_print (elttype, valaddr, embedded_offset + i * eltlen,
+	  val_print (elttype, embedded_offset + i * eltlen,
 		     address, stream, recurse + 1, val, options,
 		     current_language);
 	  annotate_elt_rep (reps);
@@ -1730,7 +2108,7 @@ val_print_array_elements (struct type *t
 	}
       else
 	{
-	  val_print (elttype, valaddr, embedded_offset + i * eltlen,
+	  val_print (elttype, embedded_offset + i * eltlen,
 		     address,
 		     stream, recurse + 1, val, options, current_language);
 	  annotate_elt ();
@@ -1831,7 +2209,7 @@ read_string (CORE_ADDR addr, int len, in
     {
       /* We want fetchlimit chars, so we might as well read them all in
 	 one operation.  */
-      unsigned int fetchlen = min (len, fetchlimit);
+      unsigned int fetchlen = std::min ((unsigned) len, fetchlimit);
 
       *buffer = (gdb_byte *) xmalloc (fetchlen * width);
       bufptr = *buffer;
@@ -1855,12 +2233,12 @@ read_string (CORE_ADDR addr, int len, in
 	 So we choose the minimum of 8 and fetchlimit.  We used to use 200
 	 instead of 8 but 200 is way too big for remote debugging over a
 	  serial line.  */
-      chunksize = min (8, fetchlimit);
+      chunksize = std::min (8u, fetchlimit);
 
       do
 	{
 	  QUIT;
-	  nfetch = min (chunksize, fetchlimit - bufsize);
+	  nfetch = std::min ((unsigned long) chunksize, fetchlimit - bufsize);
 
 	  if (*buffer == NULL)
 	    *buffer = (gdb_byte *) xmalloc (nfetch * width);
@@ -1906,7 +2284,7 @@ read_string (CORE_ADDR addr, int len, in
   else
     {				/* Length of string is really 0!  */
       /* We always allocate *buffer.  */
-      *buffer = bufptr = xmalloc (1);
+      *buffer = bufptr = (gdb_byte *) xmalloc (1);
       errcode = 0;
     }
 
@@ -2056,19 +2434,16 @@ generic_emit_char (int c, struct type *t
   struct obstack wchar_buf, output;
   struct cleanup *cleanups;
   gdb_byte *buf;
-  struct wchar_iterator *iter;
   int need_escape = 0;
 
-  buf = alloca (TYPE_LENGTH (type));
+  buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
   pack_long (buf, type, c);
 
-  iter = make_wchar_iterator (buf, TYPE_LENGTH (type),
-			      encoding, TYPE_LENGTH (type));
-  cleanups = make_cleanup_wchar_iterator (iter);
+  wchar_iterator iter (buf, TYPE_LENGTH (type), encoding, TYPE_LENGTH (type));
 
   /* This holds the printable form of the wchar_t data.  */
   obstack_init (&wchar_buf);
-  make_cleanup_obstack_free (&wchar_buf);
+  cleanups = make_cleanup_obstack_free (&wchar_buf);
 
   while (1)
     {
@@ -2079,7 +2454,7 @@ generic_emit_char (int c, struct type *t
       int print_escape = 1;
       enum wchar_iterate_result result;
 
-      num_chars = wchar_iterate (iter, &result, &chars, &buf, &buflen);
+      num_chars = iter.iterate (&result, &chars, &buf, &buflen);
       if (num_chars < 0)
 	break;
       if (num_chars > 0)
@@ -2124,7 +2499,7 @@ generic_emit_char (int c, struct type *t
 			     sizeof (gdb_wchar_t), &output, translit_char);
   obstack_1grow (&output, '\0');
 
-  fputs_filtered (obstack_base (&output), stream);
+  fputs_filtered ((const char *) obstack_base (&output), stream);
 
   do_cleanups (cleanups);
 }
@@ -2133,7 +2508,7 @@ generic_emit_char (int c, struct type *t
    storing the result in VEC.  */
 
 static int
-count_next_character (struct wchar_iterator *iter,
+count_next_character (wchar_iterator *iter,
 		      VEC (converted_character_d) **vec)
 {
   struct converted_character *current;
@@ -2144,7 +2519,7 @@ count_next_character (struct wchar_itera
       gdb_wchar_t *chars;
 
       tmp.num_chars
-	= wchar_iterate (iter, &tmp.result, &chars, &tmp.buf, &tmp.buflen);
+	= iter->iterate (&tmp.result, &chars, &tmp.buf, &tmp.buflen);
       if (tmp.num_chars > 0)
 	{
 	  gdb_assert (tmp.num_chars < MAX_WCHARS);
@@ -2173,8 +2548,7 @@ count_next_character (struct wchar_itera
       while (1)
 	{
 	  /* Get the next character.  */
-	  d.num_chars
-	    = wchar_iterate (iter, &d.result, &chars, &d.buf, &d.buflen);
+	  d.num_chars = iter->iterate (&d.result, &chars, &d.buf, &d.buflen);
 
 	  /* If a character was successfully converted, save the character
 	     into the converted character.  */
@@ -2388,7 +2762,6 @@ generic_printstr (struct ui_file *stream
   int width = TYPE_LENGTH (type);
   struct obstack wchar_buf, output;
   struct cleanup *cleanup;
-  struct wchar_iterator *iter;
   int finished = 0;
   struct converted_character *last;
   VEC (converted_character_d) *converted_chars;
@@ -2423,10 +2796,10 @@ generic_printstr (struct ui_file *stream
     }
 
   /* Arrange to iterate over the characters, in wchar_t form.  */
-  iter = make_wchar_iterator (string, length * width, encoding, width);
-  cleanup = make_cleanup_wchar_iterator (iter);
+  wchar_iterator iter (string, length * width, encoding, width);
   converted_chars = NULL;
-  make_cleanup (VEC_cleanup (converted_character_d), &converted_chars);
+  cleanup = make_cleanup (VEC_cleanup (converted_character_d),
+			  &converted_chars);
 
   /* Convert characters until the string is over or the maximum
      number of printed characters has been reached.  */
@@ -2438,7 +2811,7 @@ generic_printstr (struct ui_file *stream
       QUIT;
 
       /* Grab the next character and repeat count.  */
-      r = count_next_character (iter, &converted_chars);
+      r = count_next_character (&iter, &converted_chars);
 
       /* If less than zero, the end of the input string was reached.  */
       if (r < 0)
@@ -2479,7 +2852,7 @@ generic_printstr (struct ui_file *stream
 			     sizeof (gdb_wchar_t), &output, translit_char);
   obstack_1grow (&output, '\0');
 
-  fputs_filtered (obstack_base (&output), stream);
+  fputs_filtered ((const char *) obstack_base (&output), stream);
 
   do_cleanups (cleanup);
 }
@@ -2499,7 +2872,7 @@ val_print_string (struct type *elttype, 
 		  const struct value_print_options *options)
 {
   int force_ellipsis = 0;	/* Force ellipsis to be printed if nonzero.  */
-  int errcode;			/* Errno returned from bad reads.  */
+  int err;			/* Non-zero if we got a bad read.  */
   int found_nul;		/* Non-zero if we found the nul char.  */
   unsigned int fetchlimit;	/* Maximum number of chars to print.  */
   int bytes_read;
@@ -2517,11 +2890,11 @@ val_print_string (struct type *elttype, 
      because finding the null byte (or available memory) is what actually
      limits the fetch.  */
 
-  fetchlimit = (len == -1 ? options->print_max : min (len,
-						      options->print_max));
+  fetchlimit = (len == -1 ? options->print_max : std::min ((unsigned) len,
+							   options->print_max));
 
-  errcode = read_string (addr, len, width, fetchlimit, byte_order,
-			 &buffer, &bytes_read);
+  err = read_string (addr, len, width, fetchlimit, byte_order,
+		     &buffer, &bytes_read);
   old_chain = make_cleanup (xfree, buffer);
 
   addr += bytes_read;
@@ -2549,7 +2922,7 @@ val_print_string (struct type *elttype, 
 	  && extract_unsigned_integer (peekbuf, width, byte_order) != 0)
 	force_ellipsis = 1;
     }
-  else if ((len >= 0 && errcode != 0) || (len > bytes_read / width))
+  else if ((len >= 0 && err != 0) || (len > bytes_read / width))
     {
       /* Getting an error when we have a requested length, or fetching less
          than the number of characters actually requested, always make us
@@ -2560,17 +2933,17 @@ val_print_string (struct type *elttype, 
   /* If we get an error before fetching anything, don't print a string.
      But if we fetch something and then get an error, print the string
      and then the error message.  */
-  if (errcode == 0 || bytes_read > 0)
+  if (err == 0 || bytes_read > 0)
     {
       LA_PRINT_STRING (stream, elttype, buffer, bytes_read / width,
 		       encoding, force_ellipsis, options);
     }
 
-  if (errcode != 0)
+  if (err != 0)
     {
       char *str;
 
-      str = memory_error_message (errcode, gdbarch, addr);
+      str = memory_error_message (TARGET_XFER_E_IO, gdbarch, addr);
       make_cleanup (xfree, str);
 
       fprintf_filtered (stream, "<error: ");
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valprint.h ./gdb/valprint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/valprint.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/valprint.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations for value printing routines for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -77,8 +77,8 @@ struct value_print_options
   /* If nonzero, print static fields.  */
   int static_field_print;
 
-  /* If nonzero, print static fields for Pascal.  FIXME: C++ and Java
-     share one flag, why not Pascal too?  */
+  /* If nonzero, print static fields for Pascal.  FIXME: C++ has a
+     flag, why not share with Pascal too?  */
   int pascal_static_field_print;
 
   /* If non-zero don't do Python pretty-printing.  */
@@ -115,22 +115,18 @@ extern void maybe_print_array_index (str
                                      struct ui_file *stream,
 				     const struct value_print_options *);
 
-extern void val_print_array_elements (struct type *, const gdb_byte *, int,
+extern void val_print_array_elements (struct type *, LONGEST,
 				      CORE_ADDR, struct ui_file *, int,
-				      const struct value *,
+				      struct value *,
 				      const struct value_print_options *,
 				      unsigned int);
 
 extern void val_print_type_code_int (struct type *, const gdb_byte *,
 				     struct ui_file *);
 
-extern void val_print_type_code_flags (struct type *type,
-				       const gdb_byte *valaddr,
-				       struct ui_file *stream);
-
 extern void val_print_scalar_formatted (struct type *,
-					const gdb_byte *, int,
-					const struct value *,
+					LONGEST,
+					struct value *,
 					const struct value_print_options *,
 					int,
 					struct ui_file *);
@@ -190,13 +186,17 @@ struct generic_val_print_decorations
   /* What to print when we see TYPE_CODE_VOID.  */
 
   const char *void_name;
+
+  /* Array start and end strings.  */
+  const char *array_start;
+  const char *array_end;
 };
 
 
-extern void generic_val_print (struct type *type, const gdb_byte *valaddr,
+extern void generic_val_print (struct type *type,
 			       int embedded_offset, CORE_ADDR address,
 			       struct ui_file *stream, int recurse,
-			       const struct value *original_value,
+			       struct value *original_value,
 			       const struct value_print_options *options,
 			       const struct generic_val_print_decorations *);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/value.c ./gdb/value.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/value.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/value.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Low level packing and unpacking of values for GDB, the GNU Debugger.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,6 +40,7 @@
 #include "tracepoint.h"
 #include "cp-abi.h"
 #include "user-regs.h"
+#include <algorithm>
 
 /* Prototypes for exported functions.  */
 
@@ -65,10 +66,10 @@ struct internal_function
 struct range
 {
   /* Lowest offset in the range.  */
-  int offset;
+  LONGEST offset;
 
   /* Length of the range.  */
-  int length;
+  LONGEST length;
 };
 
 typedef struct range range_s;
@@ -79,13 +80,13 @@ DEF_VEC_O(range_s);
    [offset2, offset2+len2) overlap.  */
 
 static int
-ranges_overlap (int offset1, int len1,
-		int offset2, int len2)
+ranges_overlap (LONGEST offset1, LONGEST len1,
+		LONGEST offset2, LONGEST len2)
 {
   ULONGEST h, l;
 
-  l = max (offset1, offset2);
-  h = min (offset1 + len1, offset2 + len2);
+  l = std::max (offset1, offset2);
+  h = std::min (offset1 + len1, offset2 + len2);
   return (l < h);
 }
 
@@ -104,10 +105,10 @@ range_lessthan (const range_s *r1, const
    OFFSET+LENGTH).  */
 
 static int
-ranges_contain (VEC(range_s) *ranges, int offset, int length)
+ranges_contain (VEC(range_s) *ranges, LONGEST offset, LONGEST length)
 {
   range_s what;
-  int i;
+  LONGEST i;
 
   what.offset = offset;
   what.length = length;
@@ -204,17 +205,23 @@ struct value
   /* If the value has been released.  */
   unsigned int released : 1;
 
-  /* Register number if the value is from a register.  */
-  short regnum;
-
   /* Location of value (if lval).  */
   union
   {
-    /* If lval == lval_memory, this is the address in the inferior.
-       If lval == lval_register, this is the byte offset into the
-       registers structure.  */
+    /* If lval == lval_memory, this is the address in the inferior  */
     CORE_ADDR address;
 
+    /*If lval == lval_register, the value is from a register.  */
+    struct
+    {
+      /* Register number.  */
+      int regnum;
+      /* Frame ID of "next" frame to which a register value is relative.
+	 If the register value is found relative to frame F, then the
+	 frame id of F->next will be stored in next_frame_id.  */
+      struct frame_id next_frame_id;
+    } reg;
+
     /* Pointer to internal variable.  */
     struct internalvar *internalvar;
 
@@ -234,20 +241,18 @@ struct value
     } computed;
   } location;
 
-  /* Describes offset of a value within lval of a structure in bytes.
-     If lval == lval_memory, this is an offset to the address.  If
-     lval == lval_register, this is a further offset from
-     location.address within the registers structure.  Note also the
-     member embedded_offset below.  */
-  int offset;
+  /* Describes offset of a value within lval of a structure in target
+     addressable memory units.  Note also the member embedded_offset
+     below.  */
+  LONGEST offset;
 
   /* Only used for bitfields; number of bits contained in them.  */
-  int bitsize;
+  LONGEST bitsize;
 
   /* Only used for bitfields; position of start of field.  For
      gdbarch_bits_big_endian=0 targets, it is the position of the LSB.  For
      gdbarch_bits_big_endian=1 targets, it is the position of the MSB.  */
-  int bitpos;
+  LONGEST bitpos;
 
   /* The number of references to this value.  When a value is created,
      the value chain holds a reference, so REFERENCE_COUNT is 1.  If
@@ -261,10 +266,6 @@ struct value
      bitfields.  */
   struct value *parent;
 
-  /* Frame register value is relative to.  This will be described in
-     the lval enum above as "lval_register".  */
-  struct frame_id frame_id;
-
   /* Type of the value.  */
   struct type *type;
 
@@ -291,26 +292,26 @@ struct value
 
      When we store the entire object, `enclosing_type' is the run-time
      type -- the complete object -- and `embedded_offset' is the
-     offset of `type' within that larger type, in bytes.  The
-     value_contents() macro takes `embedded_offset' into account, so
-     most GDB code continues to see the `type' portion of the value,
-     just as the inferior would.
+     offset of `type' within that larger type, in target addressable memory
+     units.  The value_contents() macro takes `embedded_offset' into account,
+     so most GDB code continues to see the `type' portion of the value, just
+     as the inferior would.
 
      If `type' is a pointer to an object, then `enclosing_type' is a
      pointer to the object's run-time type, and `pointed_to_offset' is
-     the offset in bytes from the full object to the pointed-to object
-     -- that is, the value `embedded_offset' would have if we followed
-     the pointer and fetched the complete object.  (I don't really see
-     the point.  Why not just determine the run-time type when you
-     indirect, and avoid the special case?  The contents don't matter
-     until you indirect anyway.)
+     the offset in target addressable memory units from the full object
+     to the pointed-to object -- that is, the value `embedded_offset' would
+     have if we followed the pointer and fetched the complete object.
+     (I don't really see the point.  Why not just determine the
+     run-time type when you indirect, and avoid the special case?  The
+     contents don't matter until you indirect anyway.)
 
      If we're not doing anything fancy, `enclosing_type' is equal to
      `type', and `embedded_offset' is zero, so everything works
      normally.  */
   struct type *enclosing_type;
-  int embedded_offset;
-  int pointed_to_offset;
+  LONGEST embedded_offset;
+  LONGEST pointed_to_offset;
 
   /* Values are stored in a chain, so that they can be deleted easily
      over calls to the inferior.  Values assigned to internal
@@ -340,8 +341,16 @@ struct value
   VEC(range_s) *optimized_out;
 };
 
+/* See value.h.  */
+
+struct gdbarch *
+get_value_arch (const struct value *value)
+{
+  return get_type_arch (value_type (value));
+}
+
 int
-value_bits_available (const struct value *value, int offset, int length)
+value_bits_available (const struct value *value, LONGEST offset, LONGEST length)
 {
   gdb_assert (!value->lazy);
 
@@ -349,7 +358,8 @@ value_bits_available (const struct value
 }
 
 int
-value_bytes_available (const struct value *value, int offset, int length)
+value_bytes_available (const struct value *value,
+		       LONGEST offset, LONGEST length)
 {
   return value_bits_available (value,
 			       offset * TARGET_CHAR_BIT,
@@ -419,7 +429,8 @@ value_entirely_optimized_out (struct val
    OFFSET bits, and extending for the next LENGTH bits.  */
 
 static void
-insert_into_bit_range_vector (VEC(range_s) **vectorp, int offset, int length)
+insert_into_bit_range_vector (VEC(range_s) **vectorp,
+			      LONGEST offset, LONGEST length)
 {
   range_s newr;
   int i;
@@ -518,8 +529,8 @@ insert_into_bit_range_vector (VEC(range_
       if (ranges_overlap (bef->offset, bef->length, offset, length))
 	{
 	  /* #1 */
-	  ULONGEST l = min (bef->offset, offset);
-	  ULONGEST h = max (bef->offset + bef->length, offset + length);
+	  ULONGEST l = std::min (bef->offset, offset);
+	  ULONGEST h = std::max (bef->offset + bef->length, offset + length);
 
 	  bef->offset = l;
 	  bef->length = h - l;
@@ -562,8 +573,8 @@ insert_into_bit_range_vector (VEC(range_
 	  {
 	    ULONGEST l, h;
 
-	    l = min (t->offset, r->offset);
-	    h = max (t->offset + t->length, r->offset + r->length);
+	    l = std::min (t->offset, r->offset);
+	    h = std::max (t->offset + t->length, r->offset + r->length);
 
 	    t->offset = l;
 	    t->length = h - l;
@@ -584,13 +595,15 @@ insert_into_bit_range_vector (VEC(range_
 }
 
 void
-mark_value_bits_unavailable (struct value *value, int offset, int length)
+mark_value_bits_unavailable (struct value *value,
+			     LONGEST offset, LONGEST length)
 {
   insert_into_bit_range_vector (&value->unavailable, offset, length);
 }
 
 void
-mark_value_bytes_unavailable (struct value *value, int offset, int length)
+mark_value_bytes_unavailable (struct value *value,
+			      LONGEST offset, LONGEST length)
 {
   mark_value_bits_unavailable (value,
 			       offset * TARGET_CHAR_BIT,
@@ -604,7 +617,7 @@ mark_value_bytes_unavailable (struct val
 
 static int
 find_first_range_overlap (VEC(range_s) *ranges, int pos,
-			  int offset, int length)
+			  LONGEST offset, LONGEST length)
 {
   range_s *r;
   int i;
@@ -740,8 +753,8 @@ struct ranges_and_idx
 static int
 find_first_range_overlap_and_match (struct ranges_and_idx *rp1,
 				    struct ranges_and_idx *rp2,
-				    int offset1, int offset2,
-				    int length, ULONGEST *l, ULONGEST *h)
+				    LONGEST offset1, LONGEST offset2,
+				    LONGEST length, ULONGEST *l, ULONGEST *h)
 {
   rp1->idx = find_first_range_overlap (rp1->ranges, rp1->idx,
 				       offset1, length);
@@ -768,11 +781,11 @@ find_first_range_overlap_and_match (stru
       /* Get the unavailable windows intersected by the incoming
 	 ranges.  The first and last ranges that overlap the argument
 	 range may be wider than said incoming arguments ranges.  */
-      l1 = max (offset1, r1->offset);
-      h1 = min (offset1 + length, r1->offset + r1->length);
+      l1 = std::max (offset1, r1->offset);
+      h1 = std::min (offset1 + length, r1->offset + r1->length);
 
-      l2 = max (offset2, r2->offset);
-      h2 = min (offset2 + length, offset2 + r2->length);
+      l2 = std::max (offset2, r2->offset);
+      h2 = std::min (offset2 + length, offset2 + r2->length);
 
       /* Make them relative to the respective start offsets, so we can
 	 compare them for equality.  */
@@ -862,9 +875,9 @@ value_contents_bits_eq (const struct val
 }
 
 int
-value_contents_eq (const struct value *val1, int offset1,
-		   const struct value *val2, int offset2,
-		   int length)
+value_contents_eq (const struct value *val1, LONGEST offset1,
+		   const struct value *val2, LONGEST offset2,
+		   LONGEST length)
 {
   return value_contents_bits_eq (val1, offset1 * TARGET_CHAR_BIT,
 				 val2, offset2 * TARGET_CHAR_BIT,
@@ -922,7 +935,7 @@ allocate_value_lazy (struct type *type)
      description correctly.  */
   check_typedef (type);
 
-  val = (struct value *) xzalloc (sizeof (struct value));
+  val = XCNEW (struct value);
   val->contents = NULL;
   val->next = all_values;
   all_values = val;
@@ -930,11 +943,9 @@ allocate_value_lazy (struct type *type)
   val->enclosing_type = type;
   VALUE_LVAL (val) = not_lval;
   val->location.address = 0;
-  VALUE_FRAME_ID (val) = null_frame_id;
   val->offset = 0;
   val->bitpos = 0;
   val->bitsize = 0;
-  VALUE_REGNUM (val) = -1;
   val->lazy = 1;
   val->embedded_offset = 0;
   val->pointed_to_offset = 0;
@@ -947,13 +958,86 @@ allocate_value_lazy (struct type *type)
   return val;
 }
 
+/* The maximum size, in bytes, that GDB will try to allocate for a value.
+   The initial value of 64k was not selected for any specific reason, it is
+   just a reasonable starting point.  */
+
+static int max_value_size = 65536; /* 64k bytes */
+
+/* It is critical that the MAX_VALUE_SIZE is at least as big as the size of
+   LONGEST, otherwise GDB will not be able to parse integer values from the
+   CLI; for example if the MAX_VALUE_SIZE could be set to 1 then GDB would
+   be unable to parse "set max-value-size 2".
+
+   As we want a consistent GDB experience across hosts with different sizes
+   of LONGEST, this arbitrary minimum value was selected, so long as this
+   is bigger than LONGEST on all GDB supported hosts we're fine.  */
+
+#define MIN_VALUE_FOR_MAX_VALUE_SIZE 16
+gdb_static_assert (sizeof (LONGEST) <= MIN_VALUE_FOR_MAX_VALUE_SIZE);
+
+/* Implement the "set max-value-size" command.  */
+
+static void
+set_max_value_size (char *args, int from_tty,
+		    struct cmd_list_element *c)
+{
+  gdb_assert (max_value_size == -1 || max_value_size >= 0);
+
+  if (max_value_size > -1 && max_value_size < MIN_VALUE_FOR_MAX_VALUE_SIZE)
+    {
+      max_value_size = MIN_VALUE_FOR_MAX_VALUE_SIZE;
+      error (_("max-value-size set too low, increasing to %d bytes"),
+	     max_value_size);
+    }
+}
+
+/* Implement the "show max-value-size" command.  */
+
+static void
+show_max_value_size (struct ui_file *file, int from_tty,
+		     struct cmd_list_element *c, const char *value)
+{
+  if (max_value_size == -1)
+    fprintf_filtered (file, _("Maximum value size is unlimited.\n"));
+  else
+    fprintf_filtered (file, _("Maximum value size is %d bytes.\n"),
+		      max_value_size);
+}
+
+/* Called before we attempt to allocate or reallocate a buffer for the
+   contents of a value.  TYPE is the type of the value for which we are
+   allocating the buffer.  If the buffer is too large (based on the user
+   controllable setting) then throw an error.  If this function returns
+   then we should attempt to allocate the buffer.  */
+
+static void
+check_type_length_before_alloc (const struct type *type)
+{
+  unsigned int length = TYPE_LENGTH (type);
+
+  if (max_value_size > -1 && length > max_value_size)
+    {
+      if (TYPE_NAME (type) != NULL)
+	error (_("value of type `%s' requires %u bytes, which is more "
+		 "than max-value-size"), TYPE_NAME (type), length);
+      else
+	error (_("value requires %u bytes, which is more than "
+		 "max-value-size"), length);
+    }
+}
+
 /* Allocate the contents of VAL if it has not been allocated yet.  */
 
 static void
 allocate_value_contents (struct value *val)
 {
   if (!val->contents)
-    val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
+    {
+      check_type_length_before_alloc (val->enclosing_type);
+      val->contents
+	= (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
+    }
 }
 
 /* Allocate a  value  and its contents for type TYPE.  */
@@ -1012,7 +1096,7 @@ allocate_optimized_out_value (struct typ
 /* Accessor methods.  */
 
 struct value *
-value_next (struct value *value)
+value_next (const struct value *value)
 {
   return value->next;
 }
@@ -1028,41 +1112,41 @@ deprecated_set_value_type (struct value 
   value->type = type;
 }
 
-int
+LONGEST
 value_offset (const struct value *value)
 {
   return value->offset;
 }
 void
-set_value_offset (struct value *value, int offset)
+set_value_offset (struct value *value, LONGEST offset)
 {
   value->offset = offset;
 }
 
-int
+LONGEST
 value_bitpos (const struct value *value)
 {
   return value->bitpos;
 }
 void
-set_value_bitpos (struct value *value, int bit)
+set_value_bitpos (struct value *value, LONGEST bit)
 {
   value->bitpos = bit;
 }
 
-int
+LONGEST
 value_bitsize (const struct value *value)
 {
   return value->bitsize;
 }
 void
-set_value_bitsize (struct value *value, int bit)
+set_value_bitsize (struct value *value, LONGEST bit)
 {
   value->bitsize = bit;
 }
 
 struct value *
-value_parent (struct value *value)
+value_parent (const struct value *value)
 {
   return value->parent;
 }
@@ -1083,8 +1167,11 @@ set_value_parent (struct value *value, s
 gdb_byte *
 value_contents_raw (struct value *value)
 {
+  struct gdbarch *arch = get_value_arch (value);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
+
   allocate_value_contents (value);
-  return value->contents + value->embedded_offset;
+  return value->contents + value->embedded_offset * unit_size;
 }
 
 gdb_byte *
@@ -1095,7 +1182,7 @@ value_contents_all_raw (struct value *va
 }
 
 struct type *
-value_enclosing_type (struct value *value)
+value_enclosing_type (const struct value *value)
 {
   return value->enclosing_type;
 }
@@ -1119,9 +1206,10 @@ value_actual_type (struct value *value, 
       /* If result's target type is TYPE_CODE_STRUCT, proceed to
 	 fetch its rtti type.  */
       if ((TYPE_CODE (result) == TYPE_CODE_PTR
-	  || TYPE_CODE (result) == TYPE_CODE_REF)
+	   || TYPE_CODE (result) == TYPE_CODE_REF)
 	  && TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (result)))
-	     == TYPE_CODE_STRUCT)
+	     == TYPE_CODE_STRUCT
+	  && !value_optimized_out (value))
         {
           struct type *real_type;
 
@@ -1208,8 +1296,9 @@ ranges_copy_adjusted (VEC (range_s) **ds
     {
       ULONGEST h, l;
 
-      l = max (r->offset, src_bit_offset);
-      h = min (r->offset + r->length, src_bit_offset + bit_length);
+      l = std::max (r->offset, (LONGEST) src_bit_offset);
+      h = std::min (r->offset + r->length,
+		    (LONGEST) src_bit_offset + bit_length);
 
       if (l < h)
 	insert_into_bit_range_vector (dst_range,
@@ -1234,7 +1323,7 @@ value_ranges_copy_adjusted (struct value
 			bit_length);
 }
 
-/* Copy LENGTH bytes of SRC value's (all) contents
+/* Copy LENGTH target addressable memory units of SRC value's (all) contents
    (value_contents_all) starting at SRC_OFFSET, into DST value's (all)
    contents, starting at DST_OFFSET.  If unavailable contents are
    being copied from SRC, the corresponding DST contents are marked
@@ -1245,12 +1334,12 @@ value_ranges_copy_adjusted (struct value
    DST_OFFSET+LENGTH) range are wholly available.  */
 
 void
-value_contents_copy_raw (struct value *dst, int dst_offset,
-			 struct value *src, int src_offset, int length)
+value_contents_copy_raw (struct value *dst, LONGEST dst_offset,
+			 struct value *src, LONGEST src_offset, LONGEST length)
 {
-  range_s *r;
-  int i;
-  int src_bit_offset, dst_bit_offset, bit_length;
+  LONGEST src_bit_offset, dst_bit_offset, bit_length;
+  struct gdbarch *arch = get_value_arch (src);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
 
   /* A lazy DST would make that this copy operation useless, since as
      soon as DST's contents were un-lazied (by a later value_contents
@@ -1267,14 +1356,14 @@ value_contents_copy_raw (struct value *d
 					     TARGET_CHAR_BIT * length));
 
   /* Copy the data.  */
-  memcpy (value_contents_all_raw (dst) + dst_offset,
-	  value_contents_all_raw (src) + src_offset,
-	  length);
+  memcpy (value_contents_all_raw (dst) + dst_offset * unit_size,
+	  value_contents_all_raw (src) + src_offset * unit_size,
+	  length * unit_size);
 
   /* Copy the meta-data, adjusted.  */
-  src_bit_offset = src_offset * TARGET_CHAR_BIT;
-  dst_bit_offset = dst_offset * TARGET_CHAR_BIT;
-  bit_length = length * TARGET_CHAR_BIT;
+  src_bit_offset = src_offset * unit_size * HOST_CHAR_BIT;
+  dst_bit_offset = dst_offset * unit_size * HOST_CHAR_BIT;
+  bit_length = length * unit_size * HOST_CHAR_BIT;
 
   value_ranges_copy_adjusted (dst, dst_bit_offset,
 			      src, src_bit_offset,
@@ -1292,8 +1381,8 @@ value_contents_copy_raw (struct value *d
    DST_OFFSET+LENGTH) range are wholly available.  */
 
 void
-value_contents_copy (struct value *dst, int dst_offset,
-		     struct value *src, int src_offset, int length)
+value_contents_copy (struct value *dst, LONGEST dst_offset,
+		     struct value *src, LONGEST src_offset, LONGEST length)
 {
   if (src->lazy)
     value_fetch_lazy (src);
@@ -1302,7 +1391,7 @@ value_contents_copy (struct value *dst, 
 }
 
 int
-value_lazy (struct value *value)
+value_lazy (const struct value *value)
 {
   return value->lazy;
 }
@@ -1314,7 +1403,7 @@ set_value_lazy (struct value *value, int
 }
 
 int
-value_stack (struct value *value)
+value_stack (const struct value *value)
 {
   return value->stack;
 }
@@ -1348,7 +1437,17 @@ value_optimized_out (struct value *value
   /* We can only know if a value is optimized out once we have tried to
      fetch it.  */
   if (VEC_empty (range_s, value->optimized_out) && value->lazy)
-    value_fetch_lazy (value);
+    {
+      TRY
+	{
+	  value_fetch_lazy (value);
+	}
+      CATCH (ex, RETURN_MASK_ERROR)
+	{
+	  /* Fall back to checking value->optimized_out.  */
+	}
+      END_CATCH
+    }
 
   return !VEC_empty (range_s, value->optimized_out);
 }
@@ -1367,14 +1466,15 @@ mark_value_bytes_optimized_out (struct v
 /* See value.h.  */
 
 void
-mark_value_bits_optimized_out (struct value *value, int offset, int length)
+mark_value_bits_optimized_out (struct value *value,
+			       LONGEST offset, LONGEST length)
 {
   insert_into_bit_range_vector (&value->optimized_out, offset, length);
 }
 
 int
 value_bits_synthetic_pointer (const struct value *value,
-			      int offset, int length)
+			      LONGEST offset, LONGEST length)
 {
   if (value->lval != lval_computed
       || !value->location.computed.funcs->check_synthetic_pointer)
@@ -1384,26 +1484,26 @@ value_bits_synthetic_pointer (const stru
 								  length);
 }
 
-int
-value_embedded_offset (struct value *value)
+LONGEST
+value_embedded_offset (const struct value *value)
 {
   return value->embedded_offset;
 }
 
 void
-set_value_embedded_offset (struct value *value, int val)
+set_value_embedded_offset (struct value *value, LONGEST val)
 {
   value->embedded_offset = val;
 }
 
-int
-value_pointed_to_offset (struct value *value)
+LONGEST
+value_pointed_to_offset (const struct value *value)
 {
   return value->pointed_to_offset;
 }
 
 void
-set_value_pointed_to_offset (struct value *value, int val)
+set_value_pointed_to_offset (struct value *value, LONGEST val)
 {
   value->pointed_to_offset = val;
 }
@@ -1439,22 +1539,23 @@ value_lval_const (const struct value *va
 CORE_ADDR
 value_address (const struct value *value)
 {
-  if (value->lval == lval_internalvar
-      || value->lval == lval_internalvar_component
-      || value->lval == lval_xcallable)
+  if (value->lval != lval_memory)
     return 0;
   if (value->parent != NULL)
     return value_address (value->parent) + value->offset;
-  else
-    return value->location.address + value->offset;
+  if (NULL != TYPE_DATA_LOCATION (value_type (value)))
+    {
+      gdb_assert (PROP_CONST == TYPE_DATA_LOCATION_KIND (value_type (value)));
+      return TYPE_DATA_LOCATION_ADDR (value_type (value));
+    }
+
+  return value->location.address + value->offset;
 }
 
 CORE_ADDR
-value_raw_address (struct value *value)
+value_raw_address (const struct value *value)
 {
-  if (value->lval == lval_internalvar
-      || value->lval == lval_internalvar_component
-      || value->lval == lval_xcallable)
+  if (value->lval != lval_memory)
     return 0;
   return value->location.address;
 }
@@ -1462,9 +1563,7 @@ value_raw_address (struct value *value)
 void
 set_value_address (struct value *value, CORE_ADDR addr)
 {
-  gdb_assert (value->lval != lval_internalvar
-	      && value->lval != lval_internalvar_component
-	      && value->lval != lval_xcallable);
+  gdb_assert (value->lval == lval_memory);
   value->location.address = addr;
 }
 
@@ -1475,19 +1574,21 @@ deprecated_value_internalvar_hack (struc
 }
 
 struct frame_id *
-deprecated_value_frame_id_hack (struct value *value)
+deprecated_value_next_frame_id_hack (struct value *value)
 {
-  return &value->frame_id;
+  gdb_assert (value->lval == lval_register);
+  return &value->location.reg.next_frame_id;
 }
 
-short *
+int *
 deprecated_value_regnum_hack (struct value *value)
 {
-  return &value->regnum;
+  gdb_assert (value->lval == lval_register);
+  return &value->location.reg.regnum;
 }
 
 int
-deprecated_value_modifiable (struct value *value)
+deprecated_value_modifiable (const struct value *value)
 {
   return value->modifiable;
 }
@@ -1548,7 +1649,7 @@ value_free (struct value *val)
 /* Free all values allocated since MARK was obtained by value_mark
    (except for those released).  */
 void
-value_free_to_mark (struct value *mark)
+value_free_to_mark (const struct value *mark)
 {
   struct value *val;
   struct value *next;
@@ -1640,7 +1741,7 @@ release_value_or_incref (struct value *v
 
 /* Release all values up to mark  */
 struct value *
-value_release_to_mark (struct value *mark)
+value_release_to_mark (const struct value *mark)
 {
   struct value *val;
   struct value *next;
@@ -1679,8 +1780,6 @@ value_copy (struct value *arg)
   val->offset = arg->offset;
   val->bitpos = arg->bitpos;
   val->bitsize = arg->bitsize;
-  VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
-  VALUE_REGNUM (val) = VALUE_REGNUM (arg);
   val->lazy = arg->lazy;
   val->embedded_offset = value_embedded_offset (arg);
   val->pointed_to_offset = arg->pointed_to_offset;
@@ -1761,6 +1860,8 @@ void
 set_value_component_location (struct value *component,
 			      const struct value *whole)
 {
+  struct type *type;
+
   gdb_assert (whole->lval != lval_xcallable);
 
   if (whole->lval == lval_internalvar)
@@ -1776,9 +1877,15 @@ set_value_component_location (struct val
       if (funcs->copy_closure)
         component->location.computed.closure = funcs->copy_closure (whole);
     }
+
+  /* If type has a dynamic resolved location property
+     update it's value address.  */
+  type = value_type (whole);
+  if (NULL != TYPE_DATA_LOCATION (type)
+      && TYPE_DATA_LOCATION_KIND (type) == PROP_CONST)
+    set_value_address (component, TYPE_DATA_LOCATION_ADDR (type));
 }
 
-
 /* Access to the value history.  */
 
 /* Record a new value in the value history.
@@ -1811,11 +1918,8 @@ record_latest_value (struct value *val)
   i = value_history_count % VALUE_HISTORY_CHUNK;
   if (i == 0)
     {
-      struct value_history_chunk *newobj
-	= (struct value_history_chunk *)
+      struct value_history_chunk *newobj = XCNEW (struct value_history_chunk);
 
-      xmalloc (sizeof (struct value_history_chunk));
-      memset (newobj->values, 0, sizeof newobj->values);
       newobj->next = value_history_chain;
       value_history_chain = newobj;
     }
@@ -2001,9 +2105,7 @@ init_if_undefined_command (char* args, i
   struct internalvar* intvar;
 
   /* Parse the expression - this is taken from set_command().  */
-  struct expression *expr = parse_expression (args);
-  register struct cleanup *old_chain =
-    make_cleanup (free_current_contents, &expr);
+  expression_up expr = parse_expression (args);
 
   /* Validate the expression.
      Was the expression an assignment?
@@ -2021,9 +2123,7 @@ init_if_undefined_command (char* args, i
   /* Only evaluate the expression if the lvalue is void.
      This may still fail if the expresssion is invalid.  */
   if (intvar->kind == INTERNALVAR_VOID)
-    evaluate_expression (expr);
-
-  do_cleanups (old_chain);
+    evaluate_expression (expr.get ());
 }
 
 
@@ -2075,9 +2175,8 @@ complete_internalvar (const char *name)
 struct internalvar *
 create_internalvar (const char *name)
 {
-  struct internalvar *var;
+  struct internalvar *var = XNEW (struct internalvar);
 
-  var = (struct internalvar *) xmalloc (sizeof (struct internalvar));
   var->name = concat (name, (char *)NULL);
   var->kind = INTERNALVAR_VOID;
   var->next = internalvars;
@@ -2267,21 +2366,26 @@ get_internalvar_function (struct interna
 }
 
 void
-set_internalvar_component (struct internalvar *var, int offset, int bitpos,
-			   int bitsize, struct value *newval)
+set_internalvar_component (struct internalvar *var,
+			   LONGEST offset, LONGEST bitpos,
+			   LONGEST bitsize, struct value *newval)
 {
   gdb_byte *addr;
+  struct gdbarch *arch;
+  int unit_size;
 
   switch (var->kind)
     {
     case INTERNALVAR_VALUE:
       addr = value_contents_writeable (var->u.value);
+      arch = get_value_arch (var->u.value);
+      unit_size = gdbarch_addressable_memory_unit_size (arch);
 
       if (bitsize)
 	modify_field (value_type (var->u.value), addr + offset,
 		      value_as_long (newval), bitpos, bitsize);
       else
-	memcpy (addr + offset, value_contents (newval),
+	memcpy (addr + offset * unit_size, value_contents (newval),
 		TYPE_LENGTH (value_type (newval)));
       break;
 
@@ -2331,6 +2435,15 @@ set_internalvar (struct internalvar *var
 	 call error () until new_data is installed into the var->u to avoid
 	 leaking memory.  */
       release_value (new_data.value);
+
+      /* Internal variables which are created from values with a dynamic
+         location don't need the location property of the origin anymore.
+         The resolved dynamic location is used prior then any other address
+         when accessing the value.
+         If we keep it, we would still refer to the origin value.
+         Remove the location property in case it exist.  */
+      remove_dyn_prop (DYN_PROP_DATA_LOCATION, value_type (new_data.value));
+
       break;
     }
 
@@ -2404,7 +2517,7 @@ clear_internalvar (struct internalvar *v
 }
 
 char *
-internalvar_name (struct internalvar *var)
+internalvar_name (const struct internalvar *var)
 {
   return var->name;
 }
@@ -2818,12 +2931,12 @@ unpack_long (struct type *type, const gd
 	return extract_signed_integer (valaddr, len, byte_order);
 
     case TYPE_CODE_FLT:
-      return extract_typed_floating (valaddr, type);
+      return (LONGEST) extract_typed_floating (valaddr, type);
 
     case TYPE_CODE_DECFLOAT:
       /* libdecnumber has a function to convert from decimal to integer, but
 	 it doesn't work when the decimal number has a fractional part.  */
-      return decimal_to_doublest (valaddr, len, byte_order);
+      return (LONGEST) decimal_to_doublest (valaddr, len, byte_order);
 
     case TYPE_CODE_PTR:
     case TYPE_CODE_REF:
@@ -2852,7 +2965,7 @@ unpack_double (struct type *type, const 
   int nosign;
 
   *invp = 0;			/* Assume valid.  */
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   code = TYPE_CODE (type);
   len = TYPE_LENGTH (type);
   nosign = TYPE_UNSIGNED (type);
@@ -2937,9 +3050,9 @@ value_static_field (struct type *type, i
     {
       const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
       /* TYPE_FIELD_NAME (type, fieldno); */
-      struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);
+      struct block_symbol sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);
 
-      if (sym == NULL)
+      if (sym.symbol == NULL)
 	{
 	  /* With some compilers, e.g. HP aCC, static data members are
 	     reported as non-debuggable symbols.  */
@@ -2955,7 +3068,7 @@ value_static_field (struct type *type, i
 	    }
 	}
       else
-	retval = value_of_variable (sym, NULL);
+	retval = value_of_variable (sym.symbol, sym.block);
       break;
     }
     default:
@@ -2974,9 +3087,12 @@ value_static_field (struct type *type, i
 void
 set_value_enclosing_type (struct value *val, struct type *new_encl_type)
 {
-  if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) 
-    val->contents =
-      (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
+  if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
+    {
+      check_type_length_before_alloc (new_encl_type);
+      val->contents
+	= (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
+    }
 
   val->enclosing_type = new_encl_type;
 }
@@ -2987,13 +3103,15 @@ set_value_enclosing_type (struct value *
    FIELDNO says which field.  */
 
 struct value *
-value_primitive_field (struct value *arg1, int offset,
+value_primitive_field (struct value *arg1, LONGEST offset,
 		       int fieldno, struct type *arg_type)
 {
   struct value *v;
   struct type *type;
+  struct gdbarch *arch = get_value_arch (arg1);
+  int unit_size = gdbarch_addressable_memory_unit_size (arch);
 
-  CHECK_TYPEDEF (arg_type);
+  arg_type = check_typedef (arg_type);
   type = TYPE_FIELD_TYPE (arg_type, fieldno);
 
   /* Call check_typedef on our type to make sure that, if TYPE
@@ -3015,8 +3133,8 @@ value_primitive_field (struct value *arg
 	 bit.  Assume that the address, offset, and embedded offset
 	 are sufficiently aligned.  */
 
-      int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
-      int container_bitsize = TYPE_LENGTH (type) * 8;
+      LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
+      LONGEST container_bitsize = TYPE_LENGTH (type) * 8;
 
       v = allocate_value_lazy (type);
       v->bitsize = TYPE_FIELD_BITSIZE (arg_type, fieldno);
@@ -3037,7 +3155,7 @@ value_primitive_field (struct value *arg
       /* This field is actually a base subobject, so preserve the
 	 entire object's contents for later references to virtual
 	 bases, etc.  */
-      int boffset;
+      LONGEST boffset;
 
       /* Lazy register values with offsets are not supported.  */
       if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
@@ -3067,10 +3185,22 @@ value_primitive_field (struct value *arg
       v->offset = value_offset (arg1);
       v->embedded_offset = offset + value_embedded_offset (arg1) + boffset;
     }
+  else if (NULL != TYPE_DATA_LOCATION (type))
+    {
+      /* Field is a dynamic data member.  */
+
+      gdb_assert (0 == offset);
+      /* We expect an already resolved data location.  */
+      gdb_assert (PROP_CONST == TYPE_DATA_LOCATION_KIND (type));
+      /* For dynamic data types defer memory allocation
+         until we actual access the value.  */
+      v = allocate_value_lazy (type);
+    }
   else
     {
       /* Plain old data member */
-      offset += TYPE_FIELD_BITPOS (arg_type, fieldno) / 8;
+      offset += (TYPE_FIELD_BITPOS (arg_type, fieldno)
+	         / (HOST_CHAR_BIT * unit_size));
 
       /* Lazy register values with offsets are not supported.  */
       if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
@@ -3083,14 +3213,12 @@ value_primitive_field (struct value *arg
 	  v = allocate_value (type);
 	  value_contents_copy_raw (v, value_embedded_offset (v),
 				   arg1, value_embedded_offset (arg1) + offset,
-				   TYPE_LENGTH (type));
+				   type_length_units (type));
 	}
       v->offset = (value_offset (arg1) + offset
 		   + value_embedded_offset (arg1));
     }
   set_value_component_location (v, arg1);
-  VALUE_REGNUM (v) = VALUE_REGNUM (arg1);
-  VALUE_FRAME_ID (v) = VALUE_FRAME_ID (arg1);
   return v;
 }
 
@@ -3114,7 +3242,7 @@ value_field (struct value *arg1, int fie
 struct value *
 value_fn_field (struct value **arg1p, struct fn_field *f,
 		int j, struct type *type,
-		int offset)
+		LONGEST offset)
 {
   struct value *v;
   struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
@@ -3122,7 +3250,7 @@ value_fn_field (struct value **arg1p, st
   struct symbol *sym;
   struct bound_minimal_symbol msym;
 
-  sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0);
+  sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0).symbol;
   if (sym != NULL)
     {
       memset (&msym, 0, sizeof (msym));
@@ -3136,6 +3264,7 @@ value_fn_field (struct value **arg1p, st
     }
 
   v = allocate_value (ftype);
+  VALUE_LVAL (v) = lval_memory;
   if (sym)
     {
       set_value_address (v, BLOCK_START (SYMBOL_BLOCK_VALUE (sym)));
@@ -3184,18 +3313,18 @@ value_fn_field (struct value **arg1p, st
 
 static LONGEST
 unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr,
-		     int bitpos, int bitsize)
+		     LONGEST bitpos, LONGEST bitsize)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type));
   ULONGEST val;
   ULONGEST valmask;
   int lsbcount;
-  int bytes_read;
-  int read_offset;
+  LONGEST bytes_read;
+  LONGEST read_offset;
 
   /* Read the minimum number of bytes required; there may not be
      enough bytes to read an entire ULONGEST.  */
-  CHECK_TYPEDEF (field_type);
+  field_type = check_typedef (field_type);
   if (bitsize)
     bytes_read = ((bitpos % 8) + bitsize + 7) / 8;
   else
@@ -3240,7 +3369,7 @@ unpack_bits_as_long (struct type *field_
 
 int
 unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr,
-			    int embedded_offset, int fieldno,
+			    LONGEST embedded_offset, int fieldno,
 			    const struct value *val, LONGEST *result)
 {
   int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
@@ -3283,24 +3412,31 @@ unpack_field_as_long (struct type *type,
 
 void
 unpack_value_bitfield (struct value *dest_val,
-		       int bitpos, int bitsize,
-		       const gdb_byte *valaddr, int embedded_offset,
+		       LONGEST bitpos, LONGEST bitsize,
+		       const gdb_byte *valaddr, LONGEST embedded_offset,
 		       const struct value *val)
 {
   enum bfd_endian byte_order;
   int src_bit_offset;
   int dst_bit_offset;
-  LONGEST num;
   struct type *field_type = value_type (dest_val);
 
-  /* First, unpack and sign extend the bitfield as if it was wholly
-     available.  Invalid/unavailable bits are read as zero, but that's
-     OK, as they'll end up marked below.  */
   byte_order = gdbarch_byte_order (get_type_arch (field_type));
-  num = unpack_bits_as_long (field_type, valaddr + embedded_offset,
-			     bitpos, bitsize);
-  store_signed_integer (value_contents_raw (dest_val),
-			TYPE_LENGTH (field_type), byte_order, num);
+
+  /* First, unpack and sign extend the bitfield as if it was wholly
+     valid.  Optimized out/unavailable bits are read as zero, but
+     that's OK, as they'll end up marked below.  If the VAL is
+     wholly-invalid we may have skipped allocating its contents,
+     though.  See allocate_optimized_out_value.  */
+  if (valaddr != NULL)
+    {
+      LONGEST num;
+
+      num = unpack_bits_as_long (field_type, valaddr + embedded_offset,
+				 bitpos, bitsize);
+      store_signed_integer (value_contents_raw (dest_val),
+			    TYPE_LENGTH (field_type), byte_order, num);
+    }
 
   /* Now copy the optimized out / unavailability ranges to the right
      bits.  */
@@ -3322,7 +3458,7 @@ unpack_value_bitfield (struct value *des
 struct value *
 value_field_bitfield (struct type *type, int fieldno,
 		      const gdb_byte *valaddr,
-		      int embedded_offset, const struct value *val)
+		      LONGEST embedded_offset, const struct value *val)
 {
   int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
   int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
@@ -3343,12 +3479,12 @@ value_field_bitfield (struct type *type,
 
 void
 modify_field (struct type *type, gdb_byte *addr,
-	      LONGEST fieldval, int bitpos, int bitsize)
+	      LONGEST fieldval, LONGEST bitpos, LONGEST bitsize)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
   ULONGEST oword;
   ULONGEST mask = (ULONGEST) -1 >> (8 * sizeof (ULONGEST) - bitsize);
-  int bytesize;
+  LONGEST bytesize;
 
   /* Normalize BITPOS.  */
   addr += bitpos / 8;
@@ -3364,7 +3500,7 @@ modify_field (struct type *type, gdb_byt
     {
       /* FIXME: would like to include fieldval in the message, but
          we don't have a sprintf_longest.  */
-      warning (_("Value does not fit in %d bits."), bitsize);
+      warning (_("Value does not fit in %s bits."), plongest (bitsize));
 
       /* Truncate it, otherwise adjoining fields may be corrupted.  */
       fieldval &= mask;
@@ -3392,7 +3528,7 @@ void
 pack_long (gdb_byte *buf, struct type *type, LONGEST num)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
-  int len;
+  LONGEST len;
 
   type = check_typedef (type);
   len = TYPE_LENGTH (type);
@@ -3426,7 +3562,7 @@ pack_long (gdb_byte *buf, struct type *t
 static void
 pack_unsigned_long (gdb_byte *buf, struct type *type, ULONGEST num)
 {
-  int len;
+  LONGEST len;
   enum bfd_endian byte_order;
 
   type = check_typedef (type);
@@ -3515,8 +3651,8 @@ value_from_contents_and_address_unresolv
     v = allocate_value_lazy (type);
   else
     v = value_from_contents (type, valaddr);
-  set_value_address (v, address);
   VALUE_LVAL (v) = lval_memory;
+  set_value_address (v, address);
   return v;
 }
 
@@ -3541,8 +3677,8 @@ value_from_contents_and_address (struct 
   if (TYPE_DATA_LOCATION (resolved_type_no_typedef) != NULL
       && TYPE_DATA_LOCATION_KIND (resolved_type_no_typedef) == PROP_CONST)
     address = TYPE_DATA_LOCATION_ADDR (resolved_type_no_typedef);
-  set_value_address (v, address);
   VALUE_LVAL (v) = lval_memory;
+  set_value_address (v, address);
   return v;
 }
 
@@ -3648,6 +3784,29 @@ value_from_history_ref (const char *h, c
   return access_value_history (index);
 }
 
+/* Get the component value (offset by OFFSET bytes) of a struct or
+   union WHOLE.  Component's type is TYPE.  */
+
+struct value *
+value_from_component (struct value *whole, struct type *type, LONGEST offset)
+{
+  struct value *v;
+
+  if (VALUE_LVAL (whole) == lval_memory && value_lazy (whole))
+    v = allocate_value_lazy (type);
+  else
+    {
+      v = allocate_value (type);
+      value_contents_copy (v, value_embedded_offset (v),
+			   whole, value_embedded_offset (whole) + offset,
+			   type_length_units (type));
+    }
+  v->offset = value_offset (whole) + offset + value_embedded_offset (whole);
+  set_value_component_location (v, whole);
+
+  return v;
+}
+
 struct value *
 coerce_ref_if_computed (const struct value *arg)
 {
@@ -3670,8 +3829,8 @@ coerce_ref_if_computed (const struct val
 
 struct value *
 readjust_indirect_value_type (struct value *value, struct type *enc_type,
-			      struct type *original_type,
-			      struct value *original_value)
+			      const struct type *original_type,
+			      const struct value *original_value)
 {
   /* Re-adjust type.  */
   deprecated_set_value_type (value, TYPE_TARGET_TYPE (original_type));
@@ -3776,26 +3935,20 @@ set_value_initialized (struct value *val
 /* Return the initialized field in a value struct.  */
 
 int
-value_initialized (struct value *val)
+value_initialized (const struct value *val)
 {
   return val->initialized;
 }
 
-/* Called only from the value_contents and value_contents_all()
-   macros, if the current data for a variable needs to be loaded into
-   value_contents(VAL).  Fetches the data from the user's process, and
-   clears the lazy flag to indicate that the data in the buffer is
-   valid.
+/* Load the actual content of a lazy value.  Fetch the data from the
+   user's process and clear the lazy flag to indicate that the data in
+   the buffer is valid.
 
    If the value is zero-length, we avoid calling read_memory, which
    would abort.  We mark the value as fetched anyway -- all 0 bytes of
-   it.
+   it.  */
 
-   This function returns a value because it is used in the
-   value_contents macro as part of an expression, where a void would
-   not work.  The value is ignored.  */
-
-int
+void
 value_fetch_lazy (struct value *val)
 {
   gdb_assert (value_lazy (val));
@@ -3831,11 +3984,11 @@ value_fetch_lazy (struct value *val)
       if (TYPE_LENGTH (type))
 	read_value_memory (val, 0, value_stack (val),
 			   addr, value_contents_all_raw (val),
-			   TYPE_LENGTH (type));
+			   type_length_units (type));
     }
   else if (VALUE_LVAL (val) == lval_register)
     {
-      struct frame_info *frame;
+      struct frame_info *next_frame;
       int regnum;
       struct type *type = check_typedef (value_type (val));
       struct value *new_val = val, *mark = value_mark ();
@@ -3846,27 +3999,33 @@ value_fetch_lazy (struct value *val)
 
       while (VALUE_LVAL (new_val) == lval_register && value_lazy (new_val))
 	{
-	  struct frame_id frame_id = VALUE_FRAME_ID (new_val);
+	  struct frame_id next_frame_id = VALUE_NEXT_FRAME_ID (new_val);
 
-	  frame = frame_find_by_id (frame_id);
+	  next_frame = frame_find_by_id (next_frame_id);
 	  regnum = VALUE_REGNUM (new_val);
 
-	  gdb_assert (frame != NULL);
+	  gdb_assert (next_frame != NULL);
 
 	  /* Convertible register routines are used for multi-register
 	     values and for interpretation in different types
 	     (e.g. float or int from a double register).  Lazy
 	     register values should have the register's natural type,
 	     so they do not apply.  */
-	  gdb_assert (!gdbarch_convert_register_p (get_frame_arch (frame),
+	  gdb_assert (!gdbarch_convert_register_p (get_frame_arch (next_frame),
 						   regnum, type));
 
-	  new_val = get_frame_register_value (frame, regnum);
+	  /* FRAME was obtained, above, via VALUE_NEXT_FRAME_ID. 
+	     Since a "->next" operation was performed when setting
+	     this field, we do not need to perform a "next" operation
+	     again when unwinding the register.  That's why
+	     frame_unwind_register_value() is called here instead of
+	     get_frame_register_value().  */
+	  new_val = frame_unwind_register_value (next_frame, regnum);
 
 	  /* If we get another lazy lval_register value, it means the
-	     register is found by reading it from the next frame.
-	     get_frame_register_value should never return a value with
-	     the frame id pointing to FRAME.  If it does, it means we
+	     register is found by reading it from NEXT_FRAME's next frame.
+	     frame_unwind_register_value should never return a value with
+	     the frame id pointing to NEXT_FRAME.  If it does, it means we
 	     either have two consecutive frames with the same frame id
 	     in the frame chain, or some code is trying to unwind
 	     behind get_prev_frame's back (e.g., a frame unwind
@@ -3875,7 +4034,7 @@ value_fetch_lazy (struct value *val)
 	     in this situation.  */
 	  if (VALUE_LVAL (new_val) == lval_register
 	      && value_lazy (new_val)
-	      && frame_id_eq (VALUE_FRAME_ID (new_val), frame_id))
+	      && frame_id_eq (VALUE_NEXT_FRAME_ID (new_val), next_frame_id))
 	    internal_error (__FILE__, __LINE__,
 			    _("infinite loop while fetching a register"));
 	}
@@ -3890,11 +4049,14 @@ value_fetch_lazy (struct value *val)
       set_value_lazy (val, 0);
       value_contents_copy (val, value_embedded_offset (val),
 			   new_val, value_embedded_offset (new_val),
-			   TYPE_LENGTH (type));
+			   type_length_units (type));
 
       if (frame_debug)
 	{
 	  struct gdbarch *gdbarch;
+	  struct frame_info *frame;
+	  /* VALUE_FRAME_ID is used here, instead of VALUE_NEXT_FRAME_ID,
+	     so that the frame level will be shown correctly.  */
 	  frame = frame_find_by_id (VALUE_FRAME_ID (val));
 	  regnum = VALUE_REGNUM (val);
 	  gdbarch = get_frame_arch (frame);
@@ -3947,7 +4109,6 @@ value_fetch_lazy (struct value *val)
     internal_error (__FILE__, __LINE__, _("Unexpected lazy value type."));
 
   set_value_lazy (val, 0);
-  return 0;
 }
 
 /* Implementation of the convenience function $_isvoid.  */
@@ -4005,4 +4166,17 @@ Check whether an expression is void.\n\
 Usage: $_isvoid (expression)\n\
 Return 1 if the expression is void, zero otherwise."),
 			 isvoid_internal_fn, NULL);
+
+  add_setshow_zuinteger_unlimited_cmd ("max-value-size",
+				       class_support, &max_value_size, _("\
+Set maximum sized value gdb will load from the inferior."), _("\
+Show maximum sized value gdb will load from the inferior."), _("\
+Use this to control the maximum size, in bytes, of a value that gdb\n\
+will load from the inferior.  Setting this value to 'unlimited'\n\
+disables checking.\n\
+Setting this does not invalidate already allocated values, it only\n\
+prevents future values, larger than this size, from being allocated."),
+			    set_max_value_size,
+			    show_max_value_size,
+			    &setlist, &showlist);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/value.h ./gdb/value.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/value.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/value.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definitions for values of C expressions, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -93,12 +93,16 @@ struct value;
    put into the value history or exposed to Python are taken off this
    list.  */
 
-struct value *value_next (struct value *);
+struct value *value_next (const struct value *);
 
 /* Type of the value.  */
 
 extern struct type *value_type (const struct value *);
 
+/* Return the gdbarch associated with the value. */
+
+extern struct gdbarch *get_value_arch (const struct value *value);
+
 /* This is being used to change the type of an existing value, that
    code should instead be creating a new value with the changed type
    (but possibly shared content).  */
@@ -108,21 +112,21 @@ extern void deprecated_set_value_type (s
 
 /* Only used for bitfields; number of bits contained in them.  */
 
-extern int value_bitsize (const struct value *);
-extern void set_value_bitsize (struct value *, int bit);
+extern LONGEST value_bitsize (const struct value *);
+extern void set_value_bitsize (struct value *, LONGEST bit);
 
 /* Only used for bitfields; position of start of field.  For
    gdbarch_bits_big_endian=0 targets, it is the position of the LSB.  For
    gdbarch_bits_big_endian=1 targets, it is the position of the MSB.  */
 
-extern int value_bitpos (const struct value *);
-extern void set_value_bitpos (struct value *, int bit);
+extern LONGEST value_bitpos (const struct value *);
+extern void set_value_bitpos (struct value *, LONGEST bit);
 
 /* Only used for bitfields; the containing value.  This allows a
    single read from the target when displaying multiple
    bitfields.  */
 
-struct value *value_parent (struct value *);
+struct value *value_parent (const struct value *);
 extern void set_value_parent (struct value *value, struct value *parent);
 
 /* Describes offset of a value within lval of a structure in bytes.
@@ -131,14 +135,14 @@ extern void set_value_parent (struct val
    within the registers structure.  Note also the member
    embedded_offset below.  */
 
-extern int value_offset (const struct value *);
-extern void set_value_offset (struct value *, int offset);
+extern LONGEST value_offset (const struct value *);
+extern void set_value_offset (struct value *, LONGEST offset);
 
 /* The comment from "struct value" reads: ``Is it modifiable?  Only
    relevant if lval != not_lval.''.  Shouldn't the value instead be
    not_lval and be done with it?  */
 
-extern int deprecated_value_modifiable (struct value *value);
+extern int deprecated_value_modifiable (const struct value *value);
 
 /* If a value represents a C++ object, then the `type' field gives the
    object's compile-time type.  If the object actually belongs to some
@@ -181,7 +185,7 @@ extern int deprecated_value_modifiable (
    `type', and `embedded_offset' is zero, so everything works
    normally.  */
 
-extern struct type *value_enclosing_type (struct value *);
+extern struct type *value_enclosing_type (const struct value *);
 extern void set_value_enclosing_type (struct value *val,
 				      struct type *new_type);
 
@@ -201,10 +205,10 @@ extern struct type *value_actual_type (s
 				       int resolve_simple_types,
 				       int *real_type_found);
 
-extern int value_pointed_to_offset (struct value *value);
-extern void set_value_pointed_to_offset (struct value *value, int val);
-extern int value_embedded_offset (struct value *value);
-extern void set_value_embedded_offset (struct value *value, int val);
+extern LONGEST value_pointed_to_offset (const struct value *value);
+extern void set_value_pointed_to_offset (struct value *value, LONGEST val);
+extern LONGEST value_embedded_offset (const struct value *value);
+extern void set_value_embedded_offset (struct value *value, LONGEST val);
 
 /* For lval_computed values, this structure holds functions used to
    retrieve and set the value (or portions of the value).
@@ -242,7 +246,7 @@ struct lval_funcs
   /* If non-NULL, this is used to determine whether the indicated bits
      of VALUE are a synthetic pointer.  */
   int (*check_synthetic_pointer) (const struct value *value,
-				  int offset, int length);
+				  LONGEST offset, int length);
 
   /* Return a duplicate of VALUE's closure, for use in a new value.
      This may simply return the same closure, if VALUE's is
@@ -279,7 +283,7 @@ extern struct value *allocate_computed_v
    Otherwise, return 1.  */
 
 extern int valprint_check_validity (struct ui_file *stream, struct type *type,
-				    int embedded_offset,
+				    LONGEST embedded_offset,
 				    const struct value *val);
 
 extern struct value *allocate_optimized_out_value (struct type *type);
@@ -308,10 +312,10 @@ extern void *value_computed_closure (con
    element.  If you ever change the way lazy flag is set and reset, be
    sure to consider this use as well!  */
 
-extern int value_lazy (struct value *);
+extern int value_lazy (const struct value *);
 extern void set_value_lazy (struct value *value, int val);
 
-extern int value_stack (struct value *);
+extern int value_stack (const struct value *);
 extern void set_value_stack (struct value *value, int val);
 
 /* Throw an error complaining that the value has been optimized
@@ -361,7 +365,7 @@ extern const gdb_byte *value_contents_fo
 extern const gdb_byte *
   value_contents_for_printing_const (const struct value *value);
 
-extern int value_fetch_lazy (struct value *val);
+extern void value_fetch_lazy (struct value *val);
 
 /* If nonzero, this is the value of a variable which does not actually
    exist in the program, at least partially.  If the value is lazy,
@@ -389,12 +393,12 @@ extern void mark_value_bytes_optimized_o
    LENGTH bits as optimized out.  */
 
 extern void mark_value_bits_optimized_out (struct value *value,
-					   int offset, int length);
+					   LONGEST offset, LONGEST length);
 
 /* Set or return field indicating whether a variable is initialized or
    not, based on debugging information supplied by the compiler.
    1 = initialized; 0 = uninitialized.  */
-extern int value_initialized (struct value *);
+extern int value_initialized (const struct value *);
 extern void set_value_initialized (struct value *, int);
 
 /* Set COMPONENT's location as appropriate for a component of WHOLE
@@ -421,7 +425,7 @@ extern CORE_ADDR value_address (const st
 
 /* Like value_address, except the result does not include value's
    offset.  */
-extern CORE_ADDR value_raw_address (struct value *);
+extern CORE_ADDR value_raw_address (const struct value *);
 
 /* Set the address of a value.  */
 extern void set_value_address (struct value *, CORE_ADDR);
@@ -430,13 +434,21 @@ extern void set_value_address (struct va
 extern struct internalvar **deprecated_value_internalvar_hack (struct value *);
 #define VALUE_INTERNALVAR(val) (*deprecated_value_internalvar_hack (val))
 
-/* Frame register value is relative to.  This will be described in the
-   lval enum above as "lval_register".  */
-extern struct frame_id *deprecated_value_frame_id_hack (struct value *);
-#define VALUE_FRAME_ID(val) (*deprecated_value_frame_id_hack (val))
+/* Frame ID of "next" frame to which a register value is relative.  A
+   register value is indicated by VALUE_LVAL being set to lval_register.
+   So, if the register value is found relative to frame F, then the
+   frame id of F->next will be stored in VALUE_NEXT_FRAME_ID.  */
+extern struct frame_id *deprecated_value_next_frame_id_hack (struct value *);
+#define VALUE_NEXT_FRAME_ID(val) (*deprecated_value_next_frame_id_hack (val))
+
+/* Frame ID of frame to which a register value is relative.  This is
+   similar to VALUE_NEXT_FRAME_ID, above, but may not be assigned to. 
+   Note that VALUE_FRAME_ID effectively undoes the "next" operation
+   that was performed during the assignment to VALUE_NEXT_FRAME_ID.  */
+#define VALUE_FRAME_ID(val) (get_prev_frame_id_by_id (VALUE_NEXT_FRAME_ID (val)))
 
 /* Register number if the value is from a register.  */
-extern short *deprecated_value_regnum_hack (struct value *);
+extern int *deprecated_value_regnum_hack (struct value *);
 #define VALUE_REGNUM(val) (*deprecated_value_regnum_hack (val))
 
 /* Return value after lval_funcs->coerce_ref (after check_typedef).  Return
@@ -454,8 +466,8 @@ extern struct value *coerce_ref_if_compu
 
 extern struct value * readjust_indirect_value_type (struct value *value,
 						    struct type *enc_type,
-						    struct type *original_type,
-						    struct value *original_val);
+						    const struct type *original_type,
+						    const struct value *original_val);
 
 /* Convert a REF to the object referenced.  */
 
@@ -472,7 +484,7 @@ extern struct value *coerce_array (struc
    extending for LENGTH bits are a synthetic pointer.  */
 
 extern int value_bits_synthetic_pointer (const struct value *value,
-					 int offset, int length);
+					 LONGEST offset, LONGEST length);
 
 /* Given a value, determine whether the contents bytes starting at
    OFFSET and extending for LENGTH bytes are available.  This returns
@@ -480,7 +492,7 @@ extern int value_bits_synthetic_pointer 
    byte is unavailable.  */
 
 extern int value_bytes_available (const struct value *value,
-				  int offset, int length);
+				  LONGEST offset, LONGEST length);
 
 /* Given a value, determine whether the contents bits starting at
    OFFSET and extending for LENGTH bits are available.  This returns
@@ -488,7 +500,7 @@ extern int value_bytes_available (const 
    bit is unavailable.  */
 
 extern int value_bits_available (const struct value *value,
-				 int offset, int length);
+				 LONGEST offset, LONGEST length);
 
 /* Like value_bytes_available, but return false if any byte in the
    whole object is unavailable.  */
@@ -502,13 +514,13 @@ extern int value_entirely_unavailable (s
    LENGTH bytes as unavailable.  */
 
 extern void mark_value_bytes_unavailable (struct value *value,
-					  int offset, int length);
+					  LONGEST offset, LONGEST length);
 
 /* Mark VALUE's content bits starting at OFFSET and extending for
    LENGTH bits as unavailable.  */
 
 extern void mark_value_bits_unavailable (struct value *value,
-					 int offset, int length);
+					 LONGEST offset, LONGEST length);
 
 /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with
    LENGTH bytes of VAL2's contents starting at OFFSET2.
@@ -563,18 +575,18 @@ extern void mark_value_bits_unavailable 
    after the inferior is gone, it works with const values.  Therefore,
    this routine must not be called with lazy values.  */
 
-extern int value_contents_eq (const struct value *val1, int offset1,
-			      const struct value *val2, int offset2,
-			      int length);
+extern int value_contents_eq (const struct value *val1, LONGEST offset1,
+			      const struct value *val2, LONGEST offset2,
+			      LONGEST length);
 
-/* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which
-   is (or will be copied to) VAL's contents buffer offset by
+/* Read LENGTH addressable memory units starting at MEMADDR into BUFFER,
+   which is (or will be copied to) VAL's contents buffer offset by
    EMBEDDED_OFFSET (that is, to &VAL->contents[EMBEDDED_OFFSET]).
    Marks value contents ranges as unavailable if the corresponding
    memory is likewise unavailable.  STACK indicates whether the memory
    is known to be stack memory.  */
 
-extern void read_value_memory (struct value *val, int embedded_offset,
+extern void read_value_memory (struct value *val, LONGEST embedded_offset,
 			       int stack, CORE_ADDR memaddr,
 			       gdb_byte *buffer, size_t length);
 
@@ -610,17 +622,18 @@ extern LONGEST unpack_field_as_long (str
 				     const gdb_byte *valaddr,
 				     int fieldno);
 extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr,
-				int embedded_offset, int fieldno,
+				LONGEST embedded_offset, int fieldno,
 				const struct value *val, LONGEST *result);
 
 extern void unpack_value_bitfield (struct value *dest_val,
-				   int bitpos, int bitsize,
-				   const gdb_byte *valaddr, int embedded_offset,
+				   LONGEST bitpos, LONGEST bitsize,
+				   const gdb_byte *valaddr,
+				   LONGEST embedded_offset,
 				   const struct value *val);
 
 extern struct value *value_field_bitfield (struct type *type, int fieldno,
 					   const gdb_byte *valaddr,
-					   int embedded_offset,
+					   LONGEST embedded_offset,
 					   const struct value *val);
 
 extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
@@ -632,6 +645,8 @@ extern struct value *value_from_double (
 extern struct value *value_from_decfloat (struct type *type,
 					  const gdb_byte *decbytes);
 extern struct value *value_from_history_ref (const char *, const char **);
+extern struct value *value_from_component (struct value *, struct type *,
+					   LONGEST);
 
 extern struct value *value_at (struct type *type, CORE_ADDR addr);
 extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
@@ -667,32 +682,73 @@ extern struct value *value_of_register (
 
 struct value *value_of_register_lazy (struct frame_info *frame, int regnum);
 
+/* Return the symbol's reading requirement.  */
+
+extern enum symbol_needs_kind symbol_read_needs (struct symbol *);
+
+/* Return true if the symbol needs a frame.  This is a wrapper for
+   symbol_read_needs that simply checks for SYMBOL_NEEDS_FRAME.  */
+
 extern int symbol_read_needs_frame (struct symbol *);
 
 extern struct value *read_var_value (struct symbol *var,
+				     const struct block *var_block,
 				     struct frame_info *frame);
 
 extern struct value *default_read_var_value (struct symbol *var,
+					     const struct block *var_block,
 					     struct frame_info *frame);
 
 extern struct value *allocate_value (struct type *type);
 extern struct value *allocate_value_lazy (struct type *type);
-extern void value_contents_copy (struct value *dst, int dst_offset,
-				 struct value *src, int src_offset,
-				 int length);
-extern void value_contents_copy_raw (struct value *dst, int dst_offset,
-				     struct value *src, int src_offset,
-				     int length);
+extern void value_contents_copy (struct value *dst, LONGEST dst_offset,
+				 struct value *src, LONGEST src_offset,
+				 LONGEST length);
+extern void value_contents_copy_raw (struct value *dst, LONGEST dst_offset,
+				     struct value *src, LONGEST src_offset,
+				     LONGEST length);
 
 extern struct value *allocate_repeat_value (struct type *type, int count);
 
 extern struct value *value_mark (void);
 
-extern void value_free_to_mark (struct value *mark);
+extern void value_free_to_mark (const struct value *mark);
+
+/* A helper class that uses value_mark at construction time and calls
+   value_free_to_mark in the destructor.  This is used to clear out
+   temporary values created during the lifetime of this object.  */
+class scoped_value_mark
+{
+ public:
+
+  scoped_value_mark ()
+    : m_value (value_mark ())
+  {
+  }
+
+  ~scoped_value_mark ()
+  {
+    free_to_mark ();
+  }
+
+  /* Free the values currently on the value stack.  */
+  void free_to_mark ()
+  {
+    if (m_value != NULL)
+      {
+	value_free_to_mark (m_value);
+	m_value = NULL;
+      }
+  }
+
+ private:
+
+  const struct value *m_value;
+};
 
-extern struct value *value_cstring (char *ptr, ssize_t len,
+extern struct value *value_cstring (const char *ptr, ssize_t len,
 				    struct type *char_type);
-extern struct value *value_string (char *ptr, ssize_t len,
+extern struct value *value_string (const char *ptr, ssize_t len,
 				   struct type *char_type);
 
 extern struct value *value_array (int lowbound, int highbound,
@@ -760,12 +816,12 @@ extern int find_overload_match (struct v
 
 extern struct value *value_field (struct value *arg1, int fieldno);
 
-extern struct value *value_primitive_field (struct value *arg1, int offset,
+extern struct value *value_primitive_field (struct value *arg1, LONGEST offset,
 					    int fieldno,
 					    struct type *arg_type);
 
 
-extern struct type *value_rtti_indirect_type (struct value *, int *, int *,
+extern struct type *value_rtti_indirect_type (struct value *, int *, LONGEST *,
 					      int *);
 
 extern struct value *value_full_object (struct value *, struct type *, int,
@@ -864,8 +920,8 @@ extern void set_internalvar_string (stru
 extern void clear_internalvar (struct internalvar *var);
 
 extern void set_internalvar_component (struct internalvar *var,
-				       int offset,
-				       int bitpos, int bitsize,
+				       LONGEST offset,
+				       LONGEST bitpos, LONGEST bitsize,
 				       struct value *newvalue);
 
 extern struct internalvar *lookup_only_internalvar (const char *name);
@@ -945,7 +1001,7 @@ extern struct value *value_x_unop (struc
 				   enum noside noside);
 
 extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f,
-				     int j, struct type *type, int offset);
+				     int j, struct type *type, LONGEST offset);
 
 extern int binop_types_user_defined_p (enum exp_opcode op,
 				       struct type *type1,
@@ -973,12 +1029,12 @@ extern void release_value_or_incref (str
 extern int record_latest_value (struct value *val);
 
 extern void modify_field (struct type *type, gdb_byte *addr,
-			  LONGEST fieldval, int bitpos, int bitsize);
+			  LONGEST fieldval, LONGEST bitpos, LONGEST bitsize);
 
 extern void type_print (struct type *type, const char *varstring,
 			struct ui_file *stream, int show);
 
-extern char *type_to_string (struct type *type);
+extern std::string type_to_string (struct type *type);
 
 extern gdb_byte *baseclass_addr (struct type *type, int index,
 				 gdb_byte *valaddr,
@@ -1000,12 +1056,12 @@ extern void value_print_array_elements (
 					struct ui_file *stream, int format,
 					enum val_prettyformat pretty);
 
-extern struct value *value_release_to_mark (struct value *mark);
+extern struct value *value_release_to_mark (const struct value *mark);
 
-extern void val_print (struct type *type, const gdb_byte *valaddr,
-		       int embedded_offset, CORE_ADDR address,
+extern void val_print (struct type *type,
+		       LONGEST embedded_offset, CORE_ADDR address,
 		       struct ui_file *stream, int recurse,
-		       const struct value *val,
+		       struct value *val,
 		       const struct value_print_options *options,
 		       const struct language_defn *language);
 
@@ -1028,7 +1084,7 @@ extern void print_variable_and_value (co
 extern void typedef_print (struct type *type, struct symbol *news,
 			   struct ui_file *stream);
 
-extern char *internalvar_name (struct internalvar *var);
+extern char *internalvar_name (const struct internalvar *var);
 
 extern void preserve_values (struct objfile *);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj.c ./gdb/varobj.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/varobj.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Implementation of the GDB variable objects API.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
 #if HAVE_PYTHON
 #include "python/python.h"
 #include "python/python-internal.h"
+#include "python/py-ref.h"
 #else
 typedef int PyObject;
 #endif
@@ -50,7 +51,7 @@ show_varobjdebug (struct ui_file *file, 
 
 /* String representations of gdb's format codes.  */
 char *varobj_format_string[] =
-  { "natural", "binary", "decimal", "hexadecimal", "octal" };
+  { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" };
 
 /* True if we want to allow Python-based pretty-printing.  */
 static int pretty_printing = 0;
@@ -64,12 +65,12 @@ varobj_enable_pretty_printing (void)
 /* Data structures */
 
 /* Every root variable has one of these structures saved in its
-   varobj.  Members which must be free'd are noted.  */
+   varobj.  */
 struct varobj_root
 {
 
-  /* Alloc'd expression for this parent.  */
-  struct expression *exp;
+  /* The expression for this parent.  */
+  expression_up exp;
 
   /* Block for which this expression is valid.  */
   const struct block *valid_block;
@@ -78,7 +79,7 @@ struct varobj_root
      not NULL.  */
   struct frame_id frame;
 
-  /* The thread ID that this varobj_root belong to.  This field
+  /* The global thread ID that this varobj_root belongs to.  This field
      is only valid if valid_block is not NULL.
      When not 0, indicates which thread 'frame' belongs to.
      When 0, indicates that the thread list was empty when the varobj_root
@@ -136,12 +137,6 @@ struct varobj_dynamic
   varobj_item *saved_item;
 };
 
-struct cpstack
-{
-  char *name;
-  struct cpstack *next;
-};
-
 /* A list of varobjs */
 
 struct vlist
@@ -154,16 +149,15 @@ struct vlist
 
 /* Helper functions for the above subcommands.  */
 
-static int delete_variable (struct cpstack **, struct varobj *, int);
+static int delete_variable (struct varobj *, int);
 
-static void delete_variable_1 (struct cpstack **, int *,
-			       struct varobj *, int, int);
+static void delete_variable_1 (int *, struct varobj *, int, int);
 
 static int install_variable (struct varobj *);
 
 static void uninstall_variable (struct varobj *);
 
-static struct varobj *create_child (struct varobj *, int, char *);
+static struct varobj *create_child (struct varobj *, int, std::string &);
 
 static struct varobj *
 create_child_with_value (struct varobj *parent, int index,
@@ -181,10 +175,6 @@ static struct cleanup *make_cleanup_free
 
 static enum varobj_display_formats variable_default_display (struct varobj *);
 
-static void cppush (struct cpstack **pstack, char *name);
-
-static char *cppop (struct cpstack **pstack);
-
 static int update_type_if_necessary (struct varobj *var,
 				     struct value *new_value);
 
@@ -195,16 +185,16 @@ static int install_new_value (struct var
 
 static int number_of_children (const struct varobj *);
 
-static char *name_of_variable (const struct varobj *);
+static std::string name_of_variable (const struct varobj *);
 
-static char *name_of_child (struct varobj *, int);
+static std::string name_of_child (struct varobj *, int);
 
 static struct value *value_of_root (struct varobj **var_handle, int *);
 
 static struct value *value_of_child (const struct varobj *parent, int index);
 
-static char *my_value_of_variable (struct varobj *var,
-				   enum varobj_display_formats format);
+static std::string my_value_of_variable (struct varobj *var,
+					 enum varobj_display_formats format);
 
 static int is_root_p (const struct varobj *var);
 
@@ -214,13 +204,13 @@ static struct varobj *varobj_add_child (
 /* Private data */
 
 /* Mappings of varobj_display_formats enums to gdb's format codes.  */
-static int format_code[] = { 0, 't', 'd', 'x', 'o' };
+static int format_code[] = { 0, 't', 'd', 'x', 'o', 'z' };
 
 /* Header of the list of root variable objects.  */
 static struct varobj_root *rootlist;
 
 /* Prime number indicating the number of buckets in the hash table.  */
-/* A prime large enough to avoid too many colisions.  */
+/* A prime large enough to avoid too many collisions.  */
 #define VAROBJ_TABLE_SIZE 227
 
 /* Pointer to the varobj hash table (built at run time).  */
@@ -236,17 +226,14 @@ is_root_p (const struct varobj *var)
 }
 
 #ifdef HAVE_PYTHON
-/* Helper function to install a Python environment suitable for
-   use during operations on VAR.  */
-struct cleanup *
-varobj_ensure_python_env (const struct varobj *var)
+
+/* See python-internal.h.  */
+gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var)
+: gdbpy_enter (var->root->exp->gdbarch, var->root->exp->language_defn)
 {
-  return ensure_python_env (var->root->exp->gdbarch,
-			    var->root->exp->language_defn);
 }
-#endif
 
-/* Creates a varobj (not its children).  */
+#endif
 
 /* Return the full FRAME which corresponds to the given CORE_ADDR
    or NULL if no FRAME on the chain corresponds to CORE_ADDR.  */
@@ -280,9 +267,11 @@ find_frame_addr_in_frame_chain (CORE_ADD
   return NULL;
 }
 
+/* Creates a varobj (not its children).  */
+
 struct varobj *
-varobj_create (char *objname,
-	       char *expression, CORE_ADDR frame, enum varobj_type type)
+varobj_create (const char *objname,
+	       const char *expression, CORE_ADDR frame, enum varobj_type type)
 {
   struct varobj *var;
   struct cleanup *old_chain;
@@ -362,9 +351,9 @@ varobj_create (char *objname,
 
       var->format = variable_default_display (var);
       var->root->valid_block = innermost_block;
-      var->name = xstrdup (expression);
+      var->name = expression;
       /* For a root var, the name and the expr are the same.  */
-      var->path_expr = xstrdup (expression);
+      var->path_expr = expression;
 
       /* When the frame is different from the current frame, 
          we must select the appropriate frame before parsing
@@ -380,7 +369,7 @@ varobj_create (char *objname,
 	    error (_("Failed to find the specified frame"));
 
 	  var->root->frame = get_frame_id (fi);
-	  var->root->thread_id = pid_to_thread_id (inferior_ptid);
+	  var->root->thread_id = ptid_to_global_thread_id (inferior_ptid);
 	  old_id = get_frame_id (get_selected_frame (NULL));
 	  select_frame (fi);	 
 	}
@@ -390,13 +379,13 @@ varobj_create (char *objname,
          But if it fails, we still go on with a call to evaluate_type().  */
       TRY
 	{
-	  value = evaluate_expression (var->root->exp);
+	  value = evaluate_expression (var->root->exp.get ());
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
 	  /* Error getting the value.  Try to at least get the
 	     right type.  */
-	  struct value *type_only_value = evaluate_type (var->root->exp);
+	  struct value *type_only_value = evaluate_type (var->root->exp.get ());
 
 	  var->type = value_type (type_only_value);
 	}
@@ -429,7 +418,7 @@ varobj_create (char *objname,
 
   if ((var != NULL) && (objname != NULL))
     {
-      var->obj_name = xstrdup (objname);
+      var->obj_name = objname;
 
       /* If a varobj name is duplicated, the install will fail so
          we must cleanup.  */
@@ -463,7 +452,7 @@ varobj_gen_name (void)
    error if OBJNAME cannot be found.  */
 
 struct varobj *
-varobj_get_handle (char *objname)
+varobj_get_handle (const char *objname)
 {
   struct vlist *cv;
   const char *chp;
@@ -476,7 +465,7 @@ varobj_get_handle (char *objname)
     }
 
   cv = *(varobj_table + index);
-  while ((cv != NULL) && (strcmp (cv->var->obj_name, objname) != 0))
+  while (cv != NULL && cv->var->obj_name != objname)
     cv = cv->next;
 
   if (cv == NULL)
@@ -487,66 +476,27 @@ varobj_get_handle (char *objname)
 
 /* Given the handle, return the name of the object.  */
 
-char *
+const char *
 varobj_get_objname (const struct varobj *var)
 {
-  return var->obj_name;
+  return var->obj_name.c_str ();
 }
 
-/* Given the handle, return the expression represented by the object.  The
-   result must be freed by the caller.  */
+/* Given the handle, return the expression represented by the
+   object.  */
 
-char *
+std::string
 varobj_get_expression (const struct varobj *var)
 {
   return name_of_variable (var);
 }
 
-/* Deletes a varobj and all its children if only_children == 0,
-   otherwise deletes only the children. If DELLIST is non-NULL, it is
-   assigned a malloc'ed list of all the (malloc'ed) names of the variables
-   that have been deleted (NULL terminated).  Returns the number of deleted
-   variables.  */
+/* See varobj.h.  */
 
 int
-varobj_delete (struct varobj *var, char ***dellist, int only_children)
+varobj_delete (struct varobj *var, int only_children)
 {
-  int delcount;
-  int mycount;
-  struct cpstack *result = NULL;
-  char **cp;
-
-  /* Initialize a stack for temporary results.  */
-  cppush (&result, NULL);
-
-  if (only_children)
-    /* Delete only the variable children.  */
-    delcount = delete_variable (&result, var, 1 /* only the children */ );
-  else
-    /* Delete the variable and all its children.  */
-    delcount = delete_variable (&result, var, 0 /* parent+children */ );
-
-  /* We may have been asked to return a list of what has been deleted.  */
-  if (dellist != NULL)
-    {
-      *dellist = xmalloc ((delcount + 1) * sizeof (char *));
-
-      cp = *dellist;
-      mycount = delcount;
-      *cp = cppop (&result);
-      while ((*cp != NULL) && (mycount > 0))
-	{
-	  mycount--;
-	  cp++;
-	  *cp = cppop (&result);
-	}
-
-      if (mycount || (*cp != NULL))
-	warning (_("varobj_delete: assertion failed - mycount(=%d) <> 0"),
-		 mycount);
-    }
-
-  return delcount;
+  return delete_variable (var, only_children);
 }
 
 #if HAVE_PYTHON
@@ -583,6 +533,7 @@ varobj_set_display_format (struct varobj
     case FORMAT_DECIMAL:
     case FORMAT_HEXADECIMAL:
     case FORMAT_OCTAL:
+    case FORMAT_ZHEXADECIMAL:
       var->format = format;
       break;
 
@@ -593,7 +544,6 @@ varobj_set_display_format (struct varobj
   if (varobj_value_is_changeable_p (var) 
       && var->value && !value_lazy (var->value))
     {
-      xfree (var->print_value);
       var->print_value = varobj_value_get_print_value (var->value,
 						       var->format, var);
     }
@@ -607,23 +557,19 @@ varobj_get_display_format (const struct 
   return var->format;
 }
 
-char *
+gdb::unique_xmalloc_ptr<char>
 varobj_get_display_hint (const struct varobj *var)
 {
-  char *result = NULL;
+  gdb::unique_xmalloc_ptr<char> result;
 
 #if HAVE_PYTHON
-  struct cleanup *back_to;
-
   if (!gdb_python_initialized)
     return NULL;
 
-  back_to = varobj_ensure_python_env (var);
+  gdbpy_enter_varobj enter_py (var);
 
   if (var->dynamic->pretty_printer != NULL)
     result = gdbpy_get_display_hint (var->dynamic->pretty_printer);
-
-  do_cleanups (back_to);
 #endif
 
   return result;
@@ -745,17 +691,13 @@ install_dynamic_child (struct varobj *va
 static int
 dynamic_varobj_has_child_method (const struct varobj *var)
 {
-  struct cleanup *back_to;
   PyObject *printer = var->dynamic->pretty_printer;
-  int result;
 
   if (!gdb_python_initialized)
     return 0;
 
-  back_to = varobj_ensure_python_env (var);
-  result = PyObject_HasAttr (printer, gdbpy_children_cst);
-  do_cleanups (back_to);
-  return result;
+  gdbpy_enter_varobj enter_py (var);
+  return PyObject_HasAttr (printer, gdbpy_children_cst);
 }
 #endif
 
@@ -782,7 +724,7 @@ varobj_clear_saved_item (struct varobj_d
   if (var->saved_item != NULL)
     {
       value_free (var->saved_item->value);
-      xfree (var->saved_item);
+      delete var->saved_item;
       var->saved_item = NULL;
     }
 }
@@ -857,7 +799,7 @@ update_dynamic_varobj_children (struct v
 				 can_mention ? cchanged : NULL, i,
 				 item);
 
-	  xfree (item);
+	  delete item;
 	}
       else
 	{
@@ -875,7 +817,7 @@ update_dynamic_varobj_children (struct v
 
       *cchanged = 1;
       for (j = i; j < VEC_length (varobj_p, var->children); ++j)
-	varobj_delete (VEC_index (varobj_p, var->children, j), NULL, 0);
+	varobj_delete (VEC_index (varobj_p, var->children, j), 0);
       VEC_truncate (varobj_p, var->children, i);
     }
 
@@ -916,7 +858,6 @@ varobj_get_num_children (struct varobj *
 VEC (varobj_p)*
 varobj_list_children (struct varobj *var, int *from, int *to)
 {
-  char *name;
   int i, children_changed;
 
   var->dynamic->children_requested = 1;
@@ -953,7 +894,7 @@ varobj_list_children (struct varobj *var
 	  /* Either it's the first call to varobj_list_children for
 	     this variable object, and the child was never created,
 	     or it was explicitly deleted by the client.  */
-	  name = name_of_child (var, i);
+	  std::string name = name_of_child (var, i);
 	  existing = create_child (var, i, name);
 	  VEC_replace (varobj_p, var->children, i, existing);
 	}
@@ -978,14 +919,14 @@ varobj_add_child (struct varobj *var, st
    prints on the console.  The caller is responsible for freeing the string.
    */
 
-char *
+std::string
 varobj_get_type (struct varobj *var)
 {
   /* For the "fake" variables, do not return a type.  (Its type is
      NULL, too.)
      Do not return a type for invalid variables as well.  */
   if (CPLUS_FAKE_CHILD (var) || !var->root->is_valid)
-    return NULL;
+    return std::string ();
 
   return type_to_string (var->type);
 }
@@ -1033,10 +974,11 @@ varobj_get_path_expr_parent (const struc
 
 /* Return a pointer to the full rooted expression of varobj VAR.
    If it has not been computed yet, compute it.  */
-char *
+
+const char *
 varobj_get_path_expr (const struct varobj *var)
 {
-  if (var->path_expr == NULL)
+  if (var->path_expr.empty ())
     {
       /* For root varobjs, we initialize path_expr
 	 when creating varobj, so here it should be
@@ -1047,7 +989,7 @@ varobj_get_path_expr (const struct varob
       mutable_var->path_expr = (*var->root->lang_ops->path_expr_of_child) (var);
     }
 
-  return var->path_expr;
+  return var->path_expr.c_str ();
 }
 
 const struct language_defn *
@@ -1076,14 +1018,14 @@ varobj_is_dynamic_p (const struct varobj
   return var->dynamic->pretty_printer != NULL;
 }
 
-char *
+std::string
 varobj_get_formatted_value (struct varobj *var,
 			    enum varobj_display_formats format)
 {
   return my_value_of_variable (var, format);
 }
 
-char *
+std::string
 varobj_get_value (struct varobj *var)
 {
   return my_value_of_variable (var, var->format);
@@ -1094,13 +1036,12 @@ varobj_get_value (struct varobj *var)
 /* Note: Invokes functions that can call error().  */
 
 int
-varobj_set_value (struct varobj *var, char *expression)
+varobj_set_value (struct varobj *var, const char *expression)
 {
   struct value *val = NULL; /* Initialize to keep gcc happy.  */
   /* The argument "expression" contains the variable's new value.
      We need to first construct a legal expression for this -- ugh!  */
   /* Does this cover all the bases?  */
-  struct expression *exp;
   struct value *value = NULL; /* Initialize to keep gcc happy.  */
   int saved_input_radix = input_radix;
   const char *s = expression;
@@ -1108,16 +1049,15 @@ varobj_set_value (struct varobj *var, ch
   gdb_assert (varobj_editable_p (var));
 
   input_radix = 10;		/* ALWAYS reset to decimal temporarily.  */
-  exp = parse_exp_1 (&s, 0, 0, 0);
+  expression_up exp = parse_exp_1 (&s, 0, 0, 0);
   TRY
     {
-      value = evaluate_expression (exp);
+      value = evaluate_expression (exp.get ());
     }
 
   CATCH (except, RETURN_MASK_ERROR)
     {
       /* We cannot proceed without a valid expression.  */
-      xfree (exp);
       return 0;
     }
   END_CATCH
@@ -1265,16 +1205,12 @@ install_new_value_visualizer (struct var
 
   if (var->dynamic->constructor != Py_None && var->value != NULL)
     {
-      struct cleanup *cleanup;
-
-      cleanup = varobj_ensure_python_env (var);
+      gdbpy_enter_varobj enter_py (var);
 
       if (var->dynamic->constructor == NULL)
 	install_default_visualizer (var);
       else
 	construct_visualizer (var, var->dynamic->constructor);
-
-      do_cleanups (cleanup);
     }
 #else
   /* Do nothing.  */
@@ -1296,23 +1232,17 @@ update_type_if_necessary (struct varobj 
       get_user_print_options (&opts);
       if (opts.objectprint)
 	{
-	  struct type *new_type;
-	  char *curr_type_str, *new_type_str;
-	  int type_name_changed;
-
-	  new_type = value_actual_type (new_value, 0, 0);
-	  new_type_str = type_to_string (new_type);
-	  curr_type_str = varobj_get_type (var);
-	  type_name_changed = strcmp (curr_type_str, new_type_str) != 0;
-	  xfree (curr_type_str);
-	  xfree (new_type_str);
+	  struct type *new_type = value_actual_type (new_value, 0, 0);
+	  std::string new_type_str = type_to_string (new_type);
+	  std::string curr_type_str = varobj_get_type (var);
 
-	  if (type_name_changed)
+	  /* Did the type name change?  */
+	  if (curr_type_str != new_type_str)
 	    {
 	      var->type = new_type;
 
 	      /* This information may be not valid for a new type.  */
-	      varobj_delete (var, NULL, 1);
+	      varobj_delete (var, 1);
 	      VEC_free (varobj_p, var->children);
 	      var->num_children = -1;
 	      return 1;
@@ -1343,7 +1273,6 @@ install_new_value (struct varobj *var, s
   int need_to_fetch;
   int changed = 0;
   int intentionally_not_fetched = 0;
-  char *print_value = NULL;
 
   /* We need to know the varobj's type to decide if the value should
      be fetched or not.  C++ fake children (public/protected/private)
@@ -1425,6 +1354,7 @@ install_new_value (struct varobj *var, s
      values.  Don't get string rendering if the value is
      lazy -- if it is, the code above has decided that the value
      should not be fetched.  */
+  std::string print_value;
   if (value != NULL && !value_lazy (value)
       && var->dynamic->pretty_printer == NULL)
     print_value = varobj_value_get_print_value (value, var->format, var);
@@ -1468,8 +1398,8 @@ install_new_value (struct varobj *var, s
 	      gdb_assert (!value_lazy (var->value));
 	      gdb_assert (!value_lazy (value));
 
-	      gdb_assert (var->print_value != NULL && print_value != NULL);
-	      if (strcmp (var->print_value, print_value) != 0)
+	      gdb_assert (!var->print_value.empty () && !print_value.empty ());
+	      if (var->print_value != print_value)
 		changed = 1;
 	    }
 	}
@@ -1500,17 +1430,14 @@ install_new_value (struct varobj *var, s
      to see if the variable changed.  */
   if (var->dynamic->pretty_printer != NULL)
     {
-      xfree (print_value);
       print_value = varobj_value_get_print_value (var->value, var->format,
 						  var);
-      if ((var->print_value == NULL && print_value != NULL)
-	  || (var->print_value != NULL && print_value == NULL)
-	  || (var->print_value != NULL && print_value != NULL
-	      && strcmp (var->print_value, print_value) != 0))
-	changed = 1;
+      if ((var->print_value.empty () && !print_value.empty ())
+	  || (!var->print_value.empty () && print_value.empty ())
+	  || (!var->print_value.empty () && !print_value.empty ()
+	      && var->print_value != print_value))
+	  changed = 1;
     }
-  if (var->print_value)
-    xfree (var->print_value);
   var->print_value = print_value;
 
   gdb_assert (!var->value || value_type (var->value));
@@ -1543,35 +1470,31 @@ void 
 varobj_set_visualizer (struct varobj *var, const char *visualizer)
 {
 #if HAVE_PYTHON
-  PyObject *mainmod, *globals, *constructor;
-  struct cleanup *back_to;
+  PyObject *mainmod;
 
   if (!gdb_python_initialized)
     return;
 
-  back_to = varobj_ensure_python_env (var);
+  gdbpy_enter_varobj enter_py (var);
 
   mainmod = PyImport_AddModule ("__main__");
-  globals = PyModule_GetDict (mainmod);
-  Py_INCREF (globals);
-  make_cleanup_py_decref (globals);
+  gdbpy_ref<> globals (PyModule_GetDict (mainmod));
+  Py_INCREF (globals.get ());
 
-  constructor = PyRun_String (visualizer, Py_eval_input, globals, globals);
+  gdbpy_ref<> constructor (PyRun_String (visualizer, Py_eval_input,
+					 globals.get (), globals.get ()));
 
-  if (! constructor)
+  if (constructor == NULL)
     {
       gdbpy_print_stack ();
       error (_("Could not evaluate visualizer expression: %s"), visualizer);
     }
 
-  construct_visualizer (var, constructor);
-  Py_XDECREF (constructor);
+  construct_visualizer (var, constructor.get ());
 
   /* If there are any children now, wipe them.  */
-  varobj_delete (var, NULL, 1 /* children only */);
+  varobj_delete (var, 1 /* children only */);
   var->num_children = -1;
-
-  do_cleanups (back_to);
 #else
   error (_("Python support required"));
 #endif
@@ -1719,7 +1642,7 @@ varobj_update (struct varobj **varp, int
 	    {
 	      /* The children are no longer valid; delete them now.
 	         Report the fact that its type changed as well.  */
-	      varobj_delete (v, NULL, 1 /* only_children */);
+	      varobj_delete (v, 1 /* only_children */);
 	      v->num_children = -1;
 	      v->to = -1;
 	      v->from = -1;
@@ -1867,13 +1790,12 @@ varobj_update (struct varobj **varp, int
  */
 
 static int
-delete_variable (struct cpstack **resultp, struct varobj *var,
-		 int only_children_p)
+delete_variable (struct varobj *var, int only_children_p)
 {
   int delcount = 0;
 
-  delete_variable_1 (resultp, &delcount, var,
-		     only_children_p, 1 /* remove_from_parent_p */ );
+  delete_variable_1 (&delcount, var, only_children_p,
+		     1 /* remove_from_parent_p */ );
 
   return delcount;
 }
@@ -1883,8 +1805,7 @@ delete_variable (struct cpstack **result
    and the parent is not removed we dump core.  It must be always
    initially called with remove_from_parent_p set.  */
 static void
-delete_variable_1 (struct cpstack **resultp, int *delcountp,
-		   struct varobj *var, int only_children_p,
+delete_variable_1 (int *delcountp, struct varobj *var, int only_children_p,
 		   int remove_from_parent_p)
 {
   int i;
@@ -1898,7 +1819,7 @@ delete_variable_1 (struct cpstack **resu
 	continue;
       if (!remove_from_parent_p)
 	child->parent = NULL;
-      delete_variable_1 (resultp, delcountp, child, 0, only_children_p);
+      delete_variable_1 (delcountp, child, 0, only_children_p);
     }
   VEC_free (varobj_p, var->children);
 
@@ -1907,11 +1828,10 @@ delete_variable_1 (struct cpstack **resu
     return;
 
   /* Otherwise, add it to the list of deleted ones and proceed to do so.  */
-  /* If the name is null, this is a temporary variable, that has not
+  /* If the name is empty, this is a temporary variable, that has not
      yet been installed, don't report it, it belongs to the caller...  */
-  if (var->obj_name != NULL)
+  if (!var->obj_name.empty ())
     {
-      cppush (resultp, xstrdup (var->obj_name));
       *delcountp = *delcountp + 1;
     }
 
@@ -1925,7 +1845,7 @@ delete_variable_1 (struct cpstack **resu
       VEC_replace (varobj_p, var->parent->children, var->index, NULL);
     }
 
-  if (var->obj_name != NULL)
+  if (!var->obj_name.empty ())
     uninstall_variable (var);
 
   /* Free memory associated with this variable.  */
@@ -1942,20 +1862,20 @@ install_variable (struct varobj *var)
   unsigned int index = 0;
   unsigned int i = 1;
 
-  for (chp = var->obj_name; *chp; chp++)
+  for (chp = var->obj_name.c_str (); *chp; chp++)
     {
       index = (index + (i++ * (unsigned int) *chp)) % VAROBJ_TABLE_SIZE;
     }
 
   cv = *(varobj_table + index);
-  while ((cv != NULL) && (strcmp (cv->var->obj_name, var->obj_name) != 0))
+  while (cv != NULL && cv->var->obj_name != var->obj_name)
     cv = cv->next;
 
   if (cv != NULL)
     error (_("Duplicate variable object name"));
 
   /* Add varobj to hash table.  */
-  newvl = xmalloc (sizeof (struct vlist));
+  newvl = XNEW (struct vlist);
   newvl->next = *(varobj_table + index);
   newvl->var = var;
   *(varobj_table + index) = newvl;
@@ -1987,27 +1907,27 @@ uninstall_variable (struct varobj *var)
   unsigned int i = 1;
 
   /* Remove varobj from hash table.  */
-  for (chp = var->obj_name; *chp; chp++)
+  for (chp = var->obj_name.c_str (); *chp; chp++)
     {
       index = (index + (i++ * (unsigned int) *chp)) % VAROBJ_TABLE_SIZE;
     }
 
   cv = *(varobj_table + index);
   prev = NULL;
-  while ((cv != NULL) && (strcmp (cv->var->obj_name, var->obj_name) != 0))
+  while (cv != NULL && cv->var->obj_name != var->obj_name)
     {
       prev = cv;
       cv = cv->next;
     }
 
   if (varobjdebug)
-    fprintf_unfiltered (gdb_stdlog, "Deleting %s\n", var->obj_name);
+    fprintf_unfiltered (gdb_stdlog, "Deleting %s\n", var->obj_name.c_str ());
 
   if (cv == NULL)
     {
       warning
 	("Assertion failed: Could not find variable object \"%s\" to delete",
-	 var->obj_name);
+	 var->obj_name.c_str ());
       return;
     }
 
@@ -2037,7 +1957,7 @@ uninstall_variable (struct varobj *var)
 	    {
 	      warning (_("Assertion failed: Could not find "
 		         "varobj \"%s\" in root list"),
-		       var->obj_name);
+		       var->obj_name.c_str ());
 	      return;
 	    }
 	  if (prer == NULL)
@@ -2054,11 +1974,11 @@ uninstall_variable (struct varobj *var)
    The created VAROBJ takes ownership of the allocated NAME.  */
 
 static struct varobj *
-create_child (struct varobj *parent, int index, char *name)
+create_child (struct varobj *parent, int index, std::string &name)
 {
   struct varobj_item item;
 
-  item.name = name;
+  std::swap (item.name, name);
   item.value = value_of_child (parent, index);
 
   return create_child_with_value (parent, index, &item);
@@ -2069,21 +1989,22 @@ create_child_with_value (struct varobj *
 			 struct varobj_item *item)
 {
   struct varobj *child;
-  char *childs_name;
 
   child = new_variable ();
 
   /* NAME is allocated by caller.  */
-  child->name = item->name;
+  std::swap (child->name, item->name);
   child->index = index;
   child->parent = parent;
   child->root = parent->root;
 
   if (varobj_is_anonymous_child (child))
-    childs_name = xstrprintf ("%s.%d_anonymous", parent->obj_name, index);
+    child->obj_name = string_printf ("%s.%d_anonymous",
+				     parent->obj_name.c_str (), index);
   else
-    childs_name = xstrprintf ("%s.%s", parent->obj_name, item->name);
-  child->obj_name = childs_name;
+    child->obj_name = string_printf ("%s.%s",
+				     parent->obj_name.c_str (),
+				     child->name.c_str ());
 
   install_variable (child);
 
@@ -2113,24 +2034,19 @@ new_variable (void)
 {
   struct varobj *var;
 
-  var = (struct varobj *) xmalloc (sizeof (struct varobj));
-  var->name = NULL;
-  var->path_expr = NULL;
-  var->obj_name = NULL;
+  var = new varobj ();
   var->index = -1;
   var->type = NULL;
   var->value = NULL;
   var->num_children = -1;
   var->parent = NULL;
   var->children = NULL;
-  var->format = 0;
+  var->format = FORMAT_NATURAL;
   var->root = NULL;
   var->updated = 0;
-  var->print_value = NULL;
   var->frozen = 0;
   var->not_fetched = 0;
-  var->dynamic
-    = (struct varobj_dynamic *) xmalloc (sizeof (struct varobj_dynamic));
+  var->dynamic = XNEW (struct varobj_dynamic);
   var->dynamic->children_requested = 0;
   var->from = -1;
   var->to = -1;
@@ -2148,7 +2064,7 @@ new_root_variable (void)
 {
   struct varobj *var = new_variable ();
 
-  var->root = (struct varobj_root *) xmalloc (sizeof (struct varobj_root));
+  var->root = new varobj_root ();
   var->root->lang_ops = NULL;
   var->root->exp = NULL;
   var->root->valid_block = NULL;
@@ -2167,11 +2083,10 @@ free_variable (struct varobj *var)
 #if HAVE_PYTHON
   if (var->dynamic->pretty_printer != NULL)
     {
-      struct cleanup *cleanup = varobj_ensure_python_env (var);
+      gdbpy_enter_varobj enter_py (var);
 
       Py_XDECREF (var->dynamic->constructor);
       Py_XDECREF (var->dynamic->pretty_printer);
-      do_cleanups (cleanup);
     }
 #endif
 
@@ -2179,25 +2094,17 @@ free_variable (struct varobj *var)
   varobj_clear_saved_item (var->dynamic);
   value_free (var->value);
 
-  /* Free the expression if this is a root variable.  */
   if (is_root_p (var))
-    {
-      xfree (var->root->exp);
-      xfree (var->root);
-    }
+    delete var->root;
 
-  xfree (var->name);
-  xfree (var->obj_name);
-  xfree (var->print_value);
-  xfree (var->path_expr);
   xfree (var->dynamic);
-  xfree (var);
+  delete var;
 }
 
 static void
 do_free_variable_cleanup (void *var)
 {
-  free_variable (var);
+  free_variable ((struct varobj *) var);
 }
 
 static struct cleanup *
@@ -2245,36 +2152,6 @@ variable_default_display (struct varobj 
   return FORMAT_NATURAL;
 }
 
-/* FIXME: The following should be generic for any pointer.  */
-static void
-cppush (struct cpstack **pstack, char *name)
-{
-  struct cpstack *s;
-
-  s = (struct cpstack *) xmalloc (sizeof (struct cpstack));
-  s->name = name;
-  s->next = *pstack;
-  *pstack = s;
-}
-
-/* FIXME: The following should be generic for any pointer.  */
-static char *
-cppop (struct cpstack **pstack)
-{
-  struct cpstack *s;
-  char *v;
-
-  if ((*pstack)->name == NULL && (*pstack)->next == NULL)
-    return NULL;
-
-  s = *pstack;
-  v = s->name;
-  *pstack = (*pstack)->next;
-  xfree (s);
-
-  return v;
-}
-
 /*
  * Language-dependencies
  */
@@ -2292,17 +2169,17 @@ number_of_children (const struct varobj 
   return (*var->root->lang_ops->number_of_children) (var);
 }
 
-/* What is the expression for the root varobj VAR? Returns a malloc'd
-   string.  */
-static char *
+/* What is the expression for the root varobj VAR? */
+
+static std::string
 name_of_variable (const struct varobj *var)
 {
   return (*var->root->lang_ops->name_of_variable) (var);
 }
 
-/* What is the name of the INDEX'th child of VAR? Returns a malloc'd
-   string.  */
-static char *
+/* What is the name of the INDEX'th child of VAR?  */
+
+static std::string
 name_of_child (struct varobj *var, int index)
 {
   return (*var->root->lang_ops->name_of_child) (var, index);
@@ -2363,8 +2240,9 @@ value_of_root_1 (struct varobj **var_han
     }
   else
     {
-      ptid_t ptid = thread_id_to_pid (var->root->thread_id);
-      if (in_thread_list (ptid))
+      ptid_t ptid = global_thread_id_to_ptid (var->root->thread_id);
+
+      if (!ptid_equal (minus_one_ptid, ptid))
 	{
 	  switch_to_thread (ptid);
 	  within_scope = check_scope (var);
@@ -2378,7 +2256,7 @@ value_of_root_1 (struct varobj **var_han
          expression fails we want to just return NULL.  */
       TRY
 	{
-	  new_val = evaluate_expression (var->root->exp);
+	  new_val = evaluate_expression (var->root->exp.get ());
 	}
       CATCH (except, RETURN_MASK_ERROR)
 	{
@@ -2419,17 +2297,16 @@ value_of_root (struct varobj **var_handl
   if (var->root->floating)
     {
       struct varobj *tmp_var;
-      char *old_type, *new_type;
 
-      tmp_var = varobj_create (NULL, var->name, (CORE_ADDR) 0,
+      tmp_var = varobj_create (NULL, var->name.c_str (), (CORE_ADDR) 0,
 			       USE_SELECTED_FRAME);
       if (tmp_var == NULL)
 	{
 	  return NULL;
 	}
-      old_type = varobj_get_type (var);
-      new_type = varobj_get_type (tmp_var);
-      if (strcmp (old_type, new_type) == 0)
+      std::string old_type = varobj_get_type (var);
+      std::string new_type = varobj_get_type (tmp_var);
+      if (old_type == new_type)
 	{
 	  /* The expression presently stored inside var->root->exp
 	     remembers the locations of local variables relatively to
@@ -2437,28 +2314,23 @@ value_of_root (struct varobj **var_handl
 	     button, for example).  Naturally, those locations are not
 	     correct in other frames, so update the expression.  */
 
-         struct expression *tmp_exp = var->root->exp;
-
-         var->root->exp = tmp_var->root->exp;
-         tmp_var->root->exp = tmp_exp;
+	  std::swap (var->root->exp, tmp_var->root->exp);
 
-	  varobj_delete (tmp_var, NULL, 0);
+	  varobj_delete (tmp_var, 0);
 	  *type_changed = 0;
 	}
       else
 	{
-	  tmp_var->obj_name = xstrdup (var->obj_name);
+	  tmp_var->obj_name = var->obj_name;
 	  tmp_var->from = var->from;
 	  tmp_var->to = var->to;
-	  varobj_delete (var, NULL, 0);
+	  varobj_delete (var, 0);
 
 	  install_variable (tmp_var);
 	  *var_handle = tmp_var;
 	  var = *var_handle;
 	  *type_changed = 1;
 	}
-      xfree (old_type);
-      xfree (new_type);
     }
   else
     {
@@ -2479,7 +2351,7 @@ value_of_root (struct varobj **var_handl
 	/* The type has mutated, so the children are no longer valid.
 	   Just delete them, and tell our caller that the type has
 	   changed.  */
-	varobj_delete (var, NULL, 1 /* only_children */);
+	varobj_delete (var, 1 /* only_children */);
 	var->num_children = -1;
 	var->to = -1;
 	var->from = -1;
@@ -2501,7 +2373,7 @@ value_of_child (const struct varobj *par
 }
 
 /* GDB already has a command called "value_of_variable".  Sigh.  */
-static char *
+static std::string
 my_value_of_variable (struct varobj *var, enum varobj_display_formats format)
 {
   if (var->root->is_valid)
@@ -2511,7 +2383,7 @@ my_value_of_variable (struct varobj *var
       return (*var->root->lang_ops->value_of_variable) (var, format);
     }
   else
-    return NULL;
+    return std::string ();
 }
 
 void
@@ -2523,69 +2395,57 @@ varobj_formatted_print_options (struct v
   opts->raw = 1;
 }
 
-char *
+std::string
 varobj_value_get_print_value (struct value *value,
 			      enum varobj_display_formats format,
 			      const struct varobj *var)
 {
-  struct ui_file *stb;
-  struct cleanup *old_chain;
-  char *thevalue = NULL;
   struct value_print_options opts;
   struct type *type = NULL;
   long len = 0;
-  char *encoding = NULL;
-  struct gdbarch *gdbarch = NULL;
+  gdb::unique_xmalloc_ptr<char> encoding;
   /* Initialize it just to avoid a GCC false warning.  */
   CORE_ADDR str_addr = 0;
   int string_print = 0;
 
   if (value == NULL)
-    return NULL;
+    return std::string ();
 
-  stb = mem_fileopen ();
-  old_chain = make_cleanup_ui_file_delete (stb);
+  string_file stb;
+  std::string thevalue;
 
-  gdbarch = get_type_arch (value_type (value));
 #if HAVE_PYTHON
   if (gdb_python_initialized)
     {
       PyObject *value_formatter =  var->dynamic->pretty_printer;
 
-      varobj_ensure_python_env (var);
+      gdbpy_enter_varobj enter_py (var);
 
       if (value_formatter)
 	{
 	  /* First check to see if we have any children at all.  If so,
 	     we simply return {...}.  */
 	  if (dynamic_varobj_has_child_method (var))
-	    {
-	      do_cleanups (old_chain);
-	      return xstrdup ("{...}");
-	    }
+	    return "{...}";
 
 	  if (PyObject_HasAttr (value_formatter, gdbpy_to_string_cst))
 	    {
 	      struct value *replacement;
-	      PyObject *output = NULL;
 
-	      output = apply_varobj_pretty_printer (value_formatter,
-						    &replacement,
-						    stb);
+	      gdbpy_ref<> output (apply_varobj_pretty_printer (value_formatter,
+							       &replacement,
+							       &stb));
 
 	      /* If we have string like output ...  */
-	      if (output)
+	      if (output != NULL)
 		{
-		  make_cleanup_py_decref (output);
-
 		  /* If this is a lazy string, extract it.  For lazy
 		     strings we always print as a string, so set
 		     string_print.  */
-		  if (gdbpy_is_lazy_string (output))
+		  if (gdbpy_is_lazy_string (output.get ()))
 		    {
-		      gdbpy_extract_lazy_string (output, &str_addr, &type,
-						 &len, &encoding);
-		      make_cleanup (free_current_contents, &encoding);
+		      gdbpy_extract_lazy_string (output.get (), &str_addr,
+						 &type, &len, &encoding);
 		      string_print = 1;
 		    }
 		  else
@@ -2596,32 +2456,28 @@ varobj_value_get_print_value (struct val
 			 string_print.  Otherwise just return the extracted
 			 string as a value.  */
 
-		      char *s = python_string_to_target_string (output);
+		      gdb::unique_xmalloc_ptr<char> s
+			= python_string_to_target_string (output.get ());
 
 		      if (s)
 			{
-			  char *hint;
+			  struct gdbarch *gdbarch;
 
-			  hint = gdbpy_get_display_hint (value_formatter);
+			  gdb::unique_xmalloc_ptr<char> hint
+			    = gdbpy_get_display_hint (value_formatter);
 			  if (hint)
 			    {
-			      if (!strcmp (hint, "string"))
+			      if (!strcmp (hint.get (), "string"))
 				string_print = 1;
-			      xfree (hint);
 			    }
 
-			  len = strlen (s);
-			  thevalue = xmemdup (s, len + 1, len + 1);
+			  thevalue = std::string (s.get ());
+			  len = thevalue.size ();
+			  gdbarch = get_type_arch (value_type (value));
 			  type = builtin_type (gdbarch)->builtin_char;
-			  xfree (s);
 
 			  if (!string_print)
-			    {
-			      do_cleanups (old_chain);
-			      return thevalue;
-			    }
-
-			  make_cleanup (xfree, thevalue);
+			    return thevalue;
 			}
 		      else
 			gdbpy_print_stack ();
@@ -2640,20 +2496,18 @@ varobj_value_get_print_value (struct val
   varobj_formatted_print_options (&opts, format);
 
   /* If the THEVALUE has contents, it is a regular string.  */
-  if (thevalue)
-    LA_PRINT_STRING (stb, type, (gdb_byte *) thevalue, len, encoding, 0, &opts);
+  if (!thevalue.empty ())
+    LA_PRINT_STRING (&stb, type, (gdb_byte *) thevalue.c_str (),
+		     len, encoding.get (), 0, &opts);
   else if (string_print)
     /* Otherwise, if string_print is set, and it is not a regular
        string, it is a lazy string.  */
-    val_print_string (type, encoding, str_addr, len, stb, &opts);
+    val_print_string (type, encoding.get (), str_addr, len, &stb, &opts);
   else
     /* All other cases.  */
-    common_val_print (value, stb, 0, &opts, current_language);
+    common_val_print (value, &stb, 0, &opts, current_language);
 
-  thevalue = ui_file_xstrdup (stb, NULL);
-
-  do_cleanups (old_chain);
-  return thevalue;
+  return std::move (stb.string ());
 }
 
 int
@@ -2763,12 +2617,12 @@ varobj_invalidate_iter (struct varobj *v
 
       /* Try to create a varobj with same expression.  If we succeed
 	 replace the old varobj, otherwise invalidate it.  */
-      tmp_var = varobj_create (NULL, var->name, (CORE_ADDR) 0,
+      tmp_var = varobj_create (NULL, var->name.c_str (), (CORE_ADDR) 0,
 			       USE_CURRENT_FRAME);
       if (tmp_var != NULL) 
 	{ 
-	  tmp_var->obj_name = xstrdup (var->obj_name);
-	  varobj_delete (var, NULL, 0);
+	  tmp_var->obj_name = var->obj_name;
+	  varobj_delete (var, 0);
 	  install_variable (tmp_var);
 	}
       else
@@ -2792,10 +2646,7 @@ extern void _initialize_varobj (void);
 void
 _initialize_varobj (void)
 {
-  int sizeof_table = sizeof (struct vlist *) * VAROBJ_TABLE_SIZE;
-
-  varobj_table = xmalloc (sizeof_table);
-  memset (varobj_table, 0, sizeof_table);
+  varobj_table = XCNEWVEC (struct vlist *, VAROBJ_TABLE_SIZE);
 
   add_setshow_zuinteger_cmd ("varobj", class_maintenance,
 			     &varobjdebug,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj.h ./gdb/varobj.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/varobj.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* GDB variable objects API.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@ enum varobj_display_formats
     FORMAT_BINARY,		/* Binary display                    */
     FORMAT_DECIMAL,		/* Decimal display                   */
     FORMAT_HEXADECIMAL,		/* Hex display                       */
-    FORMAT_OCTAL		/* Octal display                     */
+    FORMAT_OCTAL,		/* Octal display                     */
+    FORMAT_ZHEXADECIMAL		/* Zero padded hexadecimal	     */
   };
 
 enum varobj_type
@@ -52,7 +53,7 @@ enum varobj_scope_status
 /* String representations of gdb's format codes (defined in varobj.c).  */
 extern char *varobj_format_string[];
 
-/* Struct thar describes a variable object instance.  */
+/* Struct that describes a variable object instance.  */
 
 struct varobj;
 
@@ -85,28 +86,28 @@ struct varobj_dynamic;
 
 /* Every variable in the system has a structure of this type defined
    for it.  This structure holds all information necessary to manipulate
-   a particular object variable.  Members which must be freed are noted.  */
+   a particular object variable.  */
 struct varobj
 {
-  /* Alloc'd name of the variable for this object.  If this variable is a
+  /* Name of the variable for this object.  If this variable is a
      child, then this name will be the child's source name.
      (bar, not foo.bar).  */
   /* NOTE: This is the "expression".  */
-  char *name;
+  std::string name;
 
-  /* Alloc'd expression for this child.  Can be used to create a
-     root variable corresponding to this child.  */
-  char *path_expr;
+  /* Expression for this child.  Can be used to create a root variable
+     corresponding to this child.  */
+  std::string path_expr;
 
-  /* The alloc'd name for this variable's object.  This is here for
+  /* The name for this variable's object.  This is here for
      convenience when constructing this object's children.  */
-  char *obj_name;
+  std::string obj_name;
 
   /* Index of this variable in its parent or -1.  */
   int index;
 
   /* The type of this variable.  This can be NULL
-     for artifial variable objects -- currently, the "accessibility" 
+     for artificial variable objects -- currently, the "accessibility"
      variable objects in C++.  */
   struct type *type;
 
@@ -136,7 +137,7 @@ struct varobj
   int updated;
 
   /* Last print value.  */
-  char *print_value;
+  std::string print_value;
 
   /* Is this variable frozen.  Frozen variables are never implicitly
      updated by -var-update * 
@@ -169,18 +170,15 @@ struct lang_varobj_ops
   /* The number of children of PARENT.  */
   int (*number_of_children) (const struct varobj *parent);
 
-  /* The name (expression) of a root varobj.  The returned value must be freed
-     by the caller.  */
-  char *(*name_of_variable) (const struct varobj *parent);
-
-  /* The name of the INDEX'th child of PARENT.  The returned value must be
-     freed by the caller.  */
-  char *(*name_of_child) (const struct varobj *parent, int index);
+  /* The name (expression) of a root varobj.  */
+  std::string (*name_of_variable) (const struct varobj *parent);
+
+  /* The name of the INDEX'th child of PARENT.  */
+  std::string (*name_of_child) (const struct varobj *parent, int index);
 
   /* Returns the rooted expression of CHILD, which is a variable
-     obtain that has some parent.  The returned value must be freed by the
-     caller.  */
-  char *(*path_expr_of_child) (const struct varobj *child);
+     obtain that has some parent.  */
+  std::string (*path_expr_of_child) (const struct varobj *child);
 
   /* The ``struct value *'' of the INDEX'th child of PARENT.  */
   struct value *(*value_of_child) (const struct varobj *parent, int index);
@@ -188,16 +186,15 @@ struct lang_varobj_ops
   /* The type of the INDEX'th child of PARENT.  */
   struct type *(*type_of_child) (const struct varobj *parent, int index);
 
-  /* The current value of VAR.  The returned value must be freed by the
-     caller.  */
-  char *(*value_of_variable) (const struct varobj *var,
-			      enum varobj_display_formats format);
+  /* The current value of VAR.  */
+  std::string (*value_of_variable) (const struct varobj *var,
+				    enum varobj_display_formats format);
 
   /* Return non-zero if changes in value of VAR must be detected and
      reported by -var-update.  Return zero if -var-update should never
      report changes of such values.  This makes sense for structures
      (since the changes in children values will be reported separately),
-     or for artifical objects (like 'public' pseudo-field in C++).
+     or for artificial objects (like 'public' pseudo-field in C++).
 
      Return value of 0 means that gdb need not call value_fetch_lazy
      for the value of this variable object.  */
@@ -227,26 +224,27 @@ struct lang_varobj_ops
 
 extern const struct lang_varobj_ops c_varobj_ops;
 extern const struct lang_varobj_ops cplus_varobj_ops;
-extern const struct lang_varobj_ops java_varobj_ops;
 extern const struct lang_varobj_ops ada_varobj_ops;
 
 #define default_varobj_ops c_varobj_ops
 /* API functions */
 
-extern struct varobj *varobj_create (char *objname,
-				     char *expression, CORE_ADDR frame,
+extern struct varobj *varobj_create (const char *objname,
+				     const char *expression, CORE_ADDR frame,
 				     enum varobj_type type);
 
 extern char *varobj_gen_name (void);
 
-extern struct varobj *varobj_get_handle (char *name);
+extern struct varobj *varobj_get_handle (const char *name);
+
+extern const char *varobj_get_objname (const struct varobj *var);
 
-extern char *varobj_get_objname (const struct varobj *var);
+extern std::string varobj_get_expression (const struct varobj *var);
 
-extern char *varobj_get_expression (const struct varobj *var);
+/* Delete a varobj and all its children if only_children == 0, otherwise delete
+   only the children.  Return the number of deleted variables.  */
 
-extern int varobj_delete (struct varobj *var, char ***dellist,
-			  int only_children);
+extern int varobj_delete (struct varobj *var, int only_children);
 
 extern enum varobj_display_formats varobj_set_display_format (
 							 struct varobj *var,
@@ -266,7 +264,8 @@ extern void varobj_get_child_range (cons
 
 extern void varobj_set_child_range (struct varobj *var, int from, int to);
 
-extern char *varobj_get_display_hint (const struct varobj *var);
+extern gdb::unique_xmalloc_ptr<char>
+     varobj_get_display_hint (const struct varobj *var);
 
 extern int varobj_get_num_children (struct varobj *var);
 
@@ -281,23 +280,24 @@ extern int varobj_get_num_children (stru
 extern VEC (varobj_p)* varobj_list_children (struct varobj *var,
 					     int *from, int *to);
 
-extern char *varobj_get_type (struct varobj *var);
+extern std::string varobj_get_type (struct varobj *var);
 
 extern struct type *varobj_get_gdb_type (const struct varobj *var);
 
-extern char *varobj_get_path_expr (const struct varobj *var);
+extern const char *varobj_get_path_expr (const struct varobj *var);
 
 extern const struct language_defn *
   varobj_get_language (const struct varobj *var);
 
 extern int varobj_get_attributes (const struct varobj *var);
 
-extern char *varobj_get_formatted_value (struct varobj *var,
-					 enum varobj_display_formats format);
+extern std::string
+  varobj_get_formatted_value (struct varobj *var,
+			      enum varobj_display_formats format);
 
-extern char *varobj_get_value (struct varobj *var);
+extern std::string varobj_get_value (struct varobj *var);
 
-extern int varobj_set_value (struct varobj *var, char *expression);
+extern int varobj_set_value (struct varobj *var, const char *expression);
 
 extern void all_root_varobjs (void (*func) (struct varobj *var, void *data),
 			      void *data);
@@ -320,8 +320,6 @@ extern int varobj_has_more (const struct
 
 extern int varobj_is_dynamic_p (const struct varobj *var);
 
-extern struct cleanup *varobj_ensure_python_env (const struct varobj *var);
-
 extern int varobj_default_value_is_changeable_p (const struct varobj *var);
 extern int varobj_value_is_changeable_p (const struct varobj *var);
 
@@ -332,9 +330,10 @@ extern int varobj_is_anonymous_child (co
 extern const struct varobj *
   varobj_get_path_expr_parent (const struct varobj *var);
 
-extern char *varobj_value_get_print_value (struct value *value,
-					   enum varobj_display_formats format,
-					   const struct varobj *var);
+extern std::string
+  varobj_value_get_print_value (struct value *value,
+				enum varobj_display_formats format,
+				const struct varobj *var);
 
 extern void varobj_formatted_print_options (struct value_print_options *opts,
 					    enum varobj_display_formats format);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj-iter.h ./gdb/varobj-iter.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/varobj-iter.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/varobj-iter.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Iterator of varobj.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 typedef struct varobj_item
 {
   /* Name of this item.  */
-  char *name;
+  std::string name;
 
   /* Value of this item.  */
   struct value *value;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-bsd-nat.c ./gdb/vax-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/vax-bsd-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,146 @@
+/* Native-dependent code for modern VAX BSD's.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "vax-tdep.h"
+#include "inf-ptrace.h"
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
+
+static void
+vaxbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+  const gdb_byte *regs = gregs;
+  int regnum;
+
+  for (regnum = 0; regnum < VAX_NUM_REGS; regnum++)
+    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+   in GREGS.  */
+
+static void
+vaxbsd_collect_gregset (const struct regcache *regcache,
+			void *gregs, int regnum)
+{
+  gdb_byte *regs = gregs;
+  int i;
+
+  for (i = 0; i <= VAX_NUM_REGS; i++)
+    {
+      if (regnum == -1 || regnum == i)
+	regcache_raw_collect (regcache, i, regs + i * 4);
+    }
+}
+
+
+/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
+   for all registers.  */
+
+static void
+vaxbsd_fetch_inferior_registers (struct target_ops *ops,
+				 struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  vaxbsd_supply_gregset (regcache, &regs);
+}
+
+/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
+   this for all registers.  */
+
+static void
+vaxbsd_store_inferior_registers (struct target_ops *ops,
+				 struct regcache *regcache, int regnum)
+{
+  struct reg regs;
+
+  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't get registers"));
+
+  vaxbsd_collect_gregset (regcache, &regs, regnum);
+
+  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+    perror_with_name (_("Couldn't write registers"));
+}
+
+
+/* Support for debugging kernel virtual memory images.  */
+
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  int regnum;
+
+  /* The following is true for OpenBSD 3.5:
+
+     The pcb contains the register state at the context switch inside
+     cpu_switch().  */
+
+  /* The stack pointer shouldn't be zero.  */
+  if (pcb->KSP == 0)
+    return 0;
+
+  for (regnum = VAX_R0_REGNUM; regnum < VAX_AP_REGNUM; regnum++)
+    regcache_raw_supply (regcache, regnum, &pcb->R[regnum - VAX_R0_REGNUM]);
+  regcache_raw_supply (regcache, VAX_AP_REGNUM, &pcb->AP);
+  regcache_raw_supply (regcache, VAX_FP_REGNUM, &pcb->FP);
+  regcache_raw_supply (regcache, VAX_SP_REGNUM, &pcb->KSP);
+  regcache_raw_supply (regcache, VAX_PC_REGNUM, &pcb->PC);
+  regcache_raw_supply (regcache, VAX_PS_REGNUM, &pcb->PSL);
+
+  return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_vaxbsd_nat (void);
+
+void
+_initialize_vaxbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = vaxbsd_fetch_inferior_registers;
+  t->to_store_registers = vaxbsd_store_inferior_registers;
+  add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (vaxbsd_supply_pcb);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxbsd-nat.c ./gdb/vaxbsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxbsd-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/vaxbsd-nat.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,146 +0,0 @@
-/* Native-dependent code for modern VAX BSD's.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include "vax-tdep.h"
-#include "inf-ptrace.h"
-
-/* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
-
-static void
-vaxbsd_supply_gregset (struct regcache *regcache, const void *gregs)
-{
-  const gdb_byte *regs = gregs;
-  int regnum;
-
-  for (regnum = 0; regnum < VAX_NUM_REGS; regnum++)
-    regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-}
-
-/* Collect the general-purpose registers from REGCACHE and store them
-   in GREGS.  */
-
-static void
-vaxbsd_collect_gregset (const struct regcache *regcache,
-			void *gregs, int regnum)
-{
-  gdb_byte *regs = gregs;
-  int i;
-
-  for (i = 0; i <= VAX_NUM_REGS; i++)
-    {
-      if (regnum == -1 || regnum == i)
-	regcache_raw_collect (regcache, i, regs + i * 4);
-    }
-}
-
-
-/* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
-   for all registers.  */
-
-static void
-vaxbsd_fetch_inferior_registers (struct target_ops *ops,
-				 struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  vaxbsd_supply_gregset (regcache, &regs);
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers.  */
-
-static void
-vaxbsd_store_inferior_registers (struct target_ops *ops,
-				 struct regcache *regcache, int regnum)
-{
-  struct reg regs;
-
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't get registers"));
-
-  vaxbsd_collect_gregset (regcache, &regs, regnum);
-
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-    perror_with_name (_("Couldn't write registers"));
-}
-
-
-/* Support for debugging kernel virtual memory images.  */
-
-#include <machine/pcb.h>
-
-#include "bsd-kvm.h"
-
-static int
-vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
-{
-  int regnum;
-
-  /* The following is true for OpenBSD 3.5:
-
-     The pcb contains the register state at the context switch inside
-     cpu_switch().  */
-
-  /* The stack pointer shouldn't be zero.  */
-  if (pcb->KSP == 0)
-    return 0;
-
-  for (regnum = VAX_R0_REGNUM; regnum < VAX_AP_REGNUM; regnum++)
-    regcache_raw_supply (regcache, regnum, &pcb->R[regnum - VAX_R0_REGNUM]);
-  regcache_raw_supply (regcache, VAX_AP_REGNUM, &pcb->AP);
-  regcache_raw_supply (regcache, VAX_FP_REGNUM, &pcb->FP);
-  regcache_raw_supply (regcache, VAX_SP_REGNUM, &pcb->KSP);
-  regcache_raw_supply (regcache, VAX_PC_REGNUM, &pcb->PC);
-  regcache_raw_supply (regcache, VAX_PS_REGNUM, &pcb->PSL);
-
-  return 1;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_vaxbsd_nat (void);
-
-void
-_initialize_vaxbsd_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = vaxbsd_fetch_inferior_registers;
-  t->to_store_registers = vaxbsd_store_inferior_registers;
-  add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (vaxbsd_supply_pcb);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-nbsd-tdep.c ./gdb/vax-nbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-nbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/vax-nbsd-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,46 @@
+/* Target-dependent code for NetBSD/vax.
+
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "osabi.h"
+
+#include "vax-tdep.h"
+#include "solib-svr4.h"
+
+/* NetBSD ELF.  */
+
+static void
+vaxnbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* NetBSD ELF uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_vaxnbsd_tdep (void);
+
+void
+_initialize_vaxnbsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD,
+			  vaxnbsd_elf_init_abi);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxnbsd-tdep.c ./gdb/vaxnbsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxnbsd-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/vaxnbsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-/* Target-dependent code for NetBSD/vax.
-
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "osabi.h"
-
-#include "vax-tdep.h"
-#include "solib-svr4.h"
-
-/* NetBSD ELF.  */
-
-static void
-vaxnbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  /* NetBSD ELF uses SVR4-style shared libraries.  */
-  set_solib_svr4_fetch_link_map_offsets
-    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_vaxnbsd_tdep (void);
-
-void
-_initialize_vaxnbsd_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD_ELF,
-			  vaxnbsd_elf_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxobsd-tdep.c ./gdb/vaxobsd-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vaxobsd-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/vaxobsd-tdep.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,178 +0,0 @@
-/* Target-dependent code for OpenBSD/vax.
-
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "osabi.h"
-#include "symtab.h"
-#include "trad-frame.h"
-
-#include "vax-tdep.h"
-
-/* Signal trampolines.  */
-
-/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
-   in virtual memory.  The randomness makes it somewhat tricky to
-   detect it, but fortunately we can rely on the fact that the start
-   of the sigtramp routine is page-aligned.  We recognize the
-   trampoline by looking for the code that invokes the sigreturn
-   system call.  The offset where we can find that code varies from
-   release to release.
-
-   By the way, the mapping mentioned above is read-only, so you cannot
-   place a breakpoint in the signal trampoline.  */
-
-/* Default page size.  */
-static const int vaxobsd_page_size = 4096;
-
-/* Offset for sigreturn(2).  */
-static const int vaxobsd_sigreturn_offset = 0x11;
-
-/* Instruction sequence for sigreturn(2).  VAX doesn't have
-   fixed-length instructions so we include the ensuing exit(2) to
-   reduce the chance of spurious matches.  */
-static const gdb_byte vaxobsd_sigreturn[] = {
-  0xbc, 0x8f, 0x67, 0x00,	/* chmk $SYS_sigreturn */
-  0xbc, 0x01			/* chmk $SYS_exit */
-};
-
-static int
-vaxobsd_sigtramp_sniffer (const struct frame_unwind *self,
-			  struct frame_info *this_frame,
-			  void **this_cache)
-{
-  CORE_ADDR pc = get_frame_pc (this_frame);
-  CORE_ADDR start_pc = (pc & ~(vaxobsd_page_size - 1));
-  CORE_ADDR sigreturn_addr = start_pc + vaxobsd_sigreturn_offset;
-  gdb_byte *buf;
-  const char *name;
-
-  find_pc_partial_function (pc, &name, NULL, NULL);
-  if (name)
-    return 0;
-
-  buf = alloca(sizeof vaxobsd_sigreturn);
-  if (!safe_frame_unwind_memory (this_frame, sigreturn_addr,
-				 buf, sizeof vaxobsd_sigreturn))
-    return 0;
-
-  if (memcmp(buf, vaxobsd_sigreturn, sizeof vaxobsd_sigreturn) == 0)
-    return 1;
-
-  return 0;
-}
-
-static struct trad_frame_cache *
-vaxobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
-{
-  struct trad_frame_cache *cache;
-  CORE_ADDR addr, base, func;
-
-  if (*this_cache)
-    return *this_cache;
-
-  cache = trad_frame_cache_zalloc (this_frame);
-  *this_cache = cache;
-
-  func = get_frame_pc (this_frame);
-  func &= ~(vaxobsd_page_size - 1);
-
-  base = get_frame_register_unsigned (this_frame, VAX_SP_REGNUM);
-  addr = get_frame_memory_unsigned (this_frame, base - 4, 4);
-
-  trad_frame_set_reg_addr (cache, VAX_SP_REGNUM, addr + 8);
-  trad_frame_set_reg_addr (cache, VAX_FP_REGNUM, addr + 12);
-  trad_frame_set_reg_addr (cache, VAX_AP_REGNUM, addr + 16);
-  trad_frame_set_reg_addr (cache, VAX_PC_REGNUM, addr + 20);
-  trad_frame_set_reg_addr (cache, VAX_PS_REGNUM, addr + 24);
-
-  /* Construct the frame ID using the function start.  */
-  trad_frame_set_id (cache, frame_id_build (base, func));
-
-  return cache;
-}
-
-static void
-vaxobsd_sigtramp_frame_this_id (struct frame_info *this_frame,
-				void **this_cache, struct frame_id *this_id)
-{
-  struct trad_frame_cache *cache =
-    vaxobsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  trad_frame_get_id (cache, this_id);
-}
-
-static struct value *
-vaxobsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
-				      void **this_cache, int regnum)
-{
-  struct trad_frame_cache *cache =
-    vaxobsd_sigtramp_frame_cache (this_frame, this_cache);
-
-  return trad_frame_get_register (cache, this_frame, regnum);
-}
-
-static const struct frame_unwind vaxobsd_sigtramp_frame_unwind = {
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  vaxobsd_sigtramp_frame_this_id,
-  vaxobsd_sigtramp_frame_prev_register,
-  NULL,
-  vaxobsd_sigtramp_sniffer
-};
-
-
-/* OpenBSD a.out.  */
-
-static void
-vaxobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  frame_unwind_append_unwinder (gdbarch, &vaxobsd_sigtramp_frame_unwind);
-}
-
-/* FIXME: kettenis/20050821: Since OpenBSD/vax binaries are
-   indistingushable from NetBSD/vax a.out binaries, building a GDB
-   that should support both these targets will probably not work as
-   expected.  */
-#define GDB_OSABI_OPENBSD_AOUT GDB_OSABI_NETBSD_AOUT
-
-static enum gdb_osabi
-vaxobsd_aout_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "a.out-vax-netbsd") == 0)
-    return GDB_OSABI_OPENBSD_AOUT;
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_vaxobsd_tdep (void);
-
-void
-_initialize_vaxobsd_tdep (void)
-{
-  gdbarch_register_osabi_sniffer (bfd_arch_vax, bfd_target_aout_flavour,
-				  vaxobsd_aout_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_OPENBSD_AOUT,
-			  vaxobsd_init_abi);
-}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-tdep.c ./gdb/vax-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/vax-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the VAX.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -71,7 +71,7 @@ static void
 vax_supply_gregset (const struct regset *regset, struct regcache *regcache,
 		    int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   for (i = 0; i < VAX_NUM_REGS; i++)
@@ -251,15 +251,10 @@ vax_return_value (struct gdbarch *gdbarc
    encode a breakpoint instruction, store the length of the string in
    *LEN and optionally adjust *PC to point to the correct memory
    location for inserting the breakpoint.  */
-   
-static const gdb_byte *
-vax_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static gdb_byte break_insn[] = { 3 };
 
-  *len = sizeof (break_insn);
-  return break_insn;
-}
+constexpr gdb_byte vax_break_insn[] = { 3 };
+
+typedef BP_MANIPULATION (vax_break_insn) vax_breakpoint;
 
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
@@ -318,7 +313,7 @@ vax_frame_cache (struct frame_info *this
   int regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct vax_frame_cache *) *this_cache;
 
   /* Allocate a new cache.  */
   cache = FRAME_OBSTACK_ZALLOC (struct vax_frame_cache);
@@ -500,7 +495,8 @@ vax_gdbarch_init (struct gdbarch_info in
   set_gdbarch_dummy_id (gdbarch, vax_dummy_id);
 
   /* Breakpoint info */
-  set_gdbarch_breakpoint_from_pc (gdbarch, vax_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, vax_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, vax_breakpoint::bp_from_kind);
 
   /* Misc info */
   set_gdbarch_deprecated_function_start_offset (gdbarch, 2);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-tdep.h ./gdb/vax-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/vax-tdep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/vax-tdep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the VAX.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/version.in ./gdb/version.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/version.in	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/version.in	2017-03-06 01:49:08.000000000 +0000
@@ -1 +1 @@
-7.9.50.DATE-cvs
+7.12.50.DATE-git
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/warning.m4 ./gdb/warning.m4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/warning.m4	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/warning.m4	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,120 @@
+dnl Autoconf configure script for GDB, the GNU debugger.
+dnl Copyright (C) 1995-2017 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+AC_DEFUN([AM_GDB_WARNINGS],[
+AC_ARG_ENABLE(werror,
+  AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
+  [case "${enableval}" in
+     yes | y) ERROR_ON_WARNING="yes" ;;
+     no | n)  ERROR_ON_WARNING="no" ;;
+     *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
+   esac])
+
+# Enable -Werror by default when using gcc.  Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
+    ERROR_ON_WARNING=yes
+fi
+
+WERROR_CFLAGS=""
+if test "${ERROR_ON_WARNING}" = yes ; then
+    WERROR_CFLAGS="-Werror"
+fi
+
+# The options we'll try to enable.
+build_warnings="-Wall -Wpointer-arith \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts \
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
+-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+  *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+AC_ARG_ENABLE(build-warnings,
+AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings if gcc is used]),
+[case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi])dnl
+AC_ARG_ENABLE(gdb-build-warnings,
+AS_HELP_STRING([--enable-gdb-build-warnings], [enable GDB specific build-time compiler warnings if gcc is used]),
+[case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi])dnl
+
+# The set of warnings supported by a C++ compiler is not the same as
+# of the C compiler.
+AC_LANG_PUSH([C++])
+
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+    AC_MSG_CHECKING(compiler warning flags)
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	# GCC does not complain about -Wno-unknown-warning.  Invert
+	# and test -Wunknown-warning instead.
+	case $w in
+	-Wno-*)
+		wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+	*)
+		wtest=$w ;;
+	esac
+
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*)
+	    # Check whether GCC accepts it.
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $wtest"
+	    saved_CXXFLAGS="$CXXFLAGS"
+	    CXXFLAGS="$CXXFLAGS $wtest"
+	    AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+	    CFLAGS="$saved_CFLAGS"
+	    CXXFLAGS="$saved_CXXFLAGS"
+	esac
+    done
+    AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS})
+fi
+AC_SUBST(WARN_CFLAGS)
+AC_SUBST(WERROR_CFLAGS)
+
+AC_LANG_POP([C++])
+])
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-nat.c ./gdb/windows-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/windows-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-vector operations for controlling windows child processes, for GDB.
 
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions, A Red Hat Company.
 
@@ -56,6 +56,7 @@
 #include "solist.h"
 #include "solib.h"
 #include "xml-support.h"
+#include "inttypes.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
@@ -77,20 +78,41 @@
 #define GetConsoleFontSize		dyn_GetConsoleFontSize
 #define GetCurrentConsoleFont		dyn_GetCurrentConsoleFont
 
-static BOOL WINAPI (*AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES,
-					    DWORD, PTOKEN_PRIVILEGES, PDWORD);
-static BOOL WINAPI (*DebugActiveProcessStop) (DWORD);
-static BOOL WINAPI (*DebugBreakProcess) (HANDLE);
-static BOOL WINAPI (*DebugSetProcessKillOnExit) (BOOL);
-static BOOL WINAPI (*EnumProcessModules) (HANDLE, HMODULE *, DWORD,
-					  LPDWORD);
-static BOOL WINAPI (*GetModuleInformation) (HANDLE, HMODULE, LPMODULEINFO,
-					    DWORD);
-static BOOL WINAPI (*LookupPrivilegeValueA)(LPCSTR, LPCSTR, PLUID);
-static BOOL WINAPI (*OpenProcessToken)(HANDLE, DWORD, PHANDLE);
-static BOOL WINAPI (*GetCurrentConsoleFont) (HANDLE, BOOL,
-					     CONSOLE_FONT_INFO *);
-static COORD WINAPI (*GetConsoleFontSize) (HANDLE, DWORD);
+typedef BOOL WINAPI (AdjustTokenPrivileges_ftype) (HANDLE, BOOL,
+						   PTOKEN_PRIVILEGES,
+						   DWORD, PTOKEN_PRIVILEGES,
+						   PDWORD);
+static AdjustTokenPrivileges_ftype *AdjustTokenPrivileges;
+
+typedef BOOL WINAPI (DebugActiveProcessStop_ftype) (DWORD);
+static DebugActiveProcessStop_ftype *DebugActiveProcessStop;
+
+typedef BOOL WINAPI (DebugBreakProcess_ftype) (HANDLE);
+static DebugBreakProcess_ftype *DebugBreakProcess;
+
+typedef BOOL WINAPI (DebugSetProcessKillOnExit_ftype) (BOOL);
+static DebugSetProcessKillOnExit_ftype *DebugSetProcessKillOnExit;
+
+typedef BOOL WINAPI (EnumProcessModules_ftype) (HANDLE, HMODULE *, DWORD,
+						LPDWORD);
+static EnumProcessModules_ftype *EnumProcessModules;
+
+typedef BOOL WINAPI (GetModuleInformation_ftype) (HANDLE, HMODULE,
+						  LPMODULEINFO, DWORD);
+static GetModuleInformation_ftype *GetModuleInformation;
+
+typedef BOOL WINAPI (LookupPrivilegeValueA_ftype) (LPCSTR, LPCSTR, PLUID);
+static LookupPrivilegeValueA_ftype *LookupPrivilegeValueA;
+
+typedef BOOL WINAPI (OpenProcessToken_ftype) (HANDLE, DWORD, PHANDLE);
+static OpenProcessToken_ftype *OpenProcessToken;
+
+typedef BOOL WINAPI (GetCurrentConsoleFont_ftype) (HANDLE, BOOL,
+						   CONSOLE_FONT_INFO *);
+static GetCurrentConsoleFont_ftype *GetCurrentConsoleFont;
+
+typedef COORD WINAPI (GetConsoleFontSize_ftype) (HANDLE, DWORD);
+static GetConsoleFontSize_ftype *GetConsoleFontSize;
 
 #undef STARTUPINFO
 #undef CreateProcess
@@ -98,7 +120,8 @@ static COORD WINAPI (*GetConsoleFontSize
 
 #ifndef __CYGWIN__
 # define __PMAX	(MAX_PATH + 1)
-  static DWORD WINAPI (*GetModuleFileNameEx) (HANDLE, HMODULE, LPSTR, DWORD);
+  typedef DWORD WINAPI (GetModuleFileNameEx_ftype) (HANDLE, HMODULE, LPSTR, DWORD);
+  static GetModuleFileNameEx_ftype *GetModuleFileNameEx;
 # define STARTUPINFO STARTUPINFOA
 # define CreateProcess CreateProcessA
 # define GetModuleFileNameEx_name "GetModuleFileNameExA"
@@ -110,8 +133,9 @@ static COORD WINAPI (*GetConsoleFontSize
   static CORE_ADDR cygwin_load_end;
 #   define __USEWIDE
     typedef wchar_t cygwin_buf_t;
-    static DWORD WINAPI (*GetModuleFileNameEx) (HANDLE, HMODULE,
-						LPWSTR, DWORD);
+    typedef DWORD WINAPI (GetModuleFileNameEx_ftype) (HANDLE, HMODULE,
+						      LPWSTR, DWORD);
+    static GetModuleFileNameEx_ftype *GetModuleFileNameEx;
 #   define STARTUPINFO STARTUPINFOW
 #   define CreateProcess CreateProcessW
 #   define GetModuleFileNameEx_name "GetModuleFileNameExW"
@@ -150,6 +174,19 @@ static int debug_registers_used;
 static int windows_initialization_done;
 #define DR6_CLEAR_VALUE 0xffff0ff0
 
+/* The exception thrown by a program to tell the debugger the name of
+   a thread.  The exception record contains an ID of a thread and a
+   name to give it.  This exception has no documented name, but MSDN
+   dubs it "MS_VC_EXCEPTION" in one code example.  */
+#define MS_VC_EXCEPTION 0x406d1388
+
+typedef enum
+{
+  HANDLE_EXCEPTION_UNHANDLED = 0,
+  HANDLE_EXCEPTION_HANDLED,
+  HANDLE_EXCEPTION_IGNORED
+} handle_exception_result;
+
 /* The string sent by cygwin when it processes a signal.
    FIXME: This should be in a cygwin include file.  */
 #ifndef _CYGWIN_SIGNAL_STRING
@@ -162,7 +199,7 @@ static int windows_initialization_done;
 #define DEBUG_MEM(x)	if (debug_memory)	printf_unfiltered x
 #define DEBUG_EXCEPT(x)	if (debug_exceptions)	printf_unfiltered x
 
-static void windows_stop (struct target_ops *self, ptid_t);
+static void windows_interrupt (struct target_ops *self, ptid_t);
 static int windows_thread_alive (struct target_ops *, ptid_t);
 static void windows_kill_inferior (struct target_ops *);
 
@@ -261,7 +298,7 @@ static const struct xlate_exception
   {DBG_CONTROL_C, GDB_SIGNAL_INT},
   {EXCEPTION_SINGLE_STEP, GDB_SIGNAL_TRAP},
   {STATUS_FLOAT_DIVIDE_BY_ZERO, GDB_SIGNAL_FPE},
-  {-1, -1}};
+  {-1, GDB_SIGNAL_UNKNOWN}};
 
 /* Set the MAPPINGS static global to OFFSETS.
    See the description of MAPPINGS for more details.  */
@@ -372,7 +409,7 @@ windows_add_thread (ptid_t ptid, HANDLE 
   return th;
 }
 
-/* Clear out any old thread list and reintialize it to a
+/* Clear out any old thread list and reinitialize it to a
    pristine state.  */
 static void
 windows_init_thread_list (void)
@@ -417,6 +454,7 @@ windows_delete_thread (ptid_t ptid, DWOR
     {
       windows_thread_info *here = th->next;
       th->next = here->next;
+      xfree (here->name);
       xfree (here);
     }
 }
@@ -607,7 +645,7 @@ windows_make_so (const char *name, LPVOI
     }
 #endif
   so = XCNEW (struct so_list);
-  so->lm_info = (struct lm_info *) xmalloc (sizeof (struct lm_info));
+  so->lm_info = XNEW (struct lm_info);
   so->lm_info->load_addr = load_addr;
   strcpy (so->so_original_name, name);
 #ifndef __CYGWIN__
@@ -631,32 +669,27 @@ windows_make_so (const char *name, LPVOI
   p = strchr (so->so_name, '\0') - (sizeof ("/cygwin1.dll") - 1);
   if (p >= so->so_name && strcasecmp (p, "/cygwin1.dll") == 0)
     {
-      bfd *abfd;
       asection *text = NULL;
       CORE_ADDR text_vma;
 
-      abfd = gdb_bfd_open (so->so_name, "pei-i386", -1);
+      gdb_bfd_ref_ptr abfd (gdb_bfd_open (so->so_name, "pei-i386", -1));
 
-      if (!abfd)
+      if (abfd == NULL)
 	return so;
 
-      if (bfd_check_format (abfd, bfd_object))
-	text = bfd_get_section_by_name (abfd, ".text");
+      if (bfd_check_format (abfd.get (), bfd_object))
+	text = bfd_get_section_by_name (abfd.get (), ".text");
 
       if (!text)
-	{
-	  gdb_bfd_unref (abfd);
-	  return so;
-	}
+	return so;
 
       /* The symbols in a dll are offset by 0x1000, which is the
 	 offset from 0 of the first byte in an image - because of the
 	 file header and the section alignment.  */
       cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *)
 						   load_addr + 0x1000);
-      cygwin_load_end = cygwin_load_start + bfd_section_size (abfd, text);
-
-      gdb_bfd_unref (abfd);
+      cygwin_load_end = cygwin_load_start + bfd_section_size (abfd.get (),
+							      text);
     }
 #endif
 
@@ -802,6 +835,25 @@ windows_clear_solib (void)
   solib_end = &solib_start;
 }
 
+static void
+signal_event_command (char *args, int from_tty)
+{
+  uintptr_t event_id = 0;
+  char *endargs = NULL;
+
+  if (args == NULL)
+    error (_("signal-event requires an argument (integer event id)"));
+
+  event_id = strtoumax (args, &endargs, 10);
+
+  if ((errno == ERANGE) || (event_id == 0) || (event_id > UINTPTR_MAX) ||
+      ((HANDLE) event_id == INVALID_HANDLE_VALUE))
+    error (_("Failed to convert `%s' to event id"), args);
+
+  SetEvent ((HANDLE) event_id);
+  CloseHandle ((HANDLE) event_id);
+}
+
 /* Handle DEBUG_STRING output from child process.
    Cygwin prepends its messages with a "cygwin:".  Interpret this as
    a Cygwin signal.  Otherwise just print the string as a warning.  */
@@ -841,7 +893,7 @@ handle_output_debug_string (struct targe
 	 to treat this like a real signal.  */
       char *p;
       int sig = strtol (s + sizeof (_CYGWIN_SIGNAL_STRING) - 1, &p, 0);
-      int gotasig = gdb_signal_from_host (sig);
+      gdb_signal gotasig = gdb_signal_from_host (sig);
 
       ourstatus->value.sig = gotasig;
       if (gotasig)
@@ -988,16 +1040,17 @@ display_selectors (char * args, int from
     host_address_to_string (\
       current_event.u.Exception.ExceptionRecord.ExceptionAddress))
 
-static int
+static handle_exception_result
 handle_exception (struct target_waitstatus *ourstatus)
 {
-  windows_thread_info *th;
-  DWORD code = current_event.u.Exception.ExceptionRecord.ExceptionCode;
+  EXCEPTION_RECORD *rec = &current_event.u.Exception.ExceptionRecord;
+  DWORD code = rec->ExceptionCode;
+  handle_exception_result result = HANDLE_EXCEPTION_HANDLED;
 
   ourstatus->kind = TARGET_WAITKIND_STOPPED;
 
   /* Record the context of the current thread.  */
-  th = thread_rec (current_event.dwThreadId, -1);
+  thread_rec (current_event.dwThreadId, -1);
 
   switch (code)
     {
@@ -1015,14 +1068,13 @@ handle_exception (struct target_waitstat
 	   cygwin-specific-signal.  So, ignore SEGVs if they show up
 	   within the text segment of the DLL itself.  */
 	const char *fn;
-	CORE_ADDR addr = (CORE_ADDR) (uintptr_t)
-	  current_event.u.Exception.ExceptionRecord.ExceptionAddress;
+	CORE_ADDR addr = (CORE_ADDR) (uintptr_t) rec->ExceptionAddress;
 
 	if ((!cygwin_exceptions && (addr >= cygwin_load_start
 				    && addr < cygwin_load_end))
 	    || (find_pc_partial_function (addr, &fn, NULL, NULL)
 		&& startswith (fn, "KERNEL32!IsBad")))
-	  return 0;
+	  return HANDLE_EXCEPTION_UNHANDLED;
       }
 #endif
       break;
@@ -1098,10 +1150,48 @@ handle_exception (struct target_waitstat
       DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_NONCONTINUABLE_EXCEPTION");
       ourstatus->value.sig = GDB_SIGNAL_ILL;
       break;
+    case MS_VC_EXCEPTION:
+      if (rec->NumberParameters >= 3
+	  && (rec->ExceptionInformation[0] & 0xffffffff) == 0x1000)
+	{
+	  DWORD named_thread_id;
+	  windows_thread_info *named_thread;
+	  CORE_ADDR thread_name_target;
+
+	  DEBUG_EXCEPTION_SIMPLE ("MS_VC_EXCEPTION");
+
+	  thread_name_target = rec->ExceptionInformation[1];
+	  named_thread_id = (DWORD) (0xffffffff & rec->ExceptionInformation[2]);
+
+	  if (named_thread_id == (DWORD) -1)
+	    named_thread_id = current_event.dwThreadId;
+
+	  named_thread = thread_rec (named_thread_id, 0);
+	  if (named_thread != NULL)
+	    {
+	      int thread_name_len;
+	      char *thread_name;
+
+	      thread_name_len = target_read_string (thread_name_target,
+						    &thread_name, 1025, NULL);
+	      if (thread_name_len > 0)
+		{
+		  thread_name[thread_name_len - 1] = '\0';
+		  xfree (named_thread->name);
+		  named_thread->name = thread_name;
+		}
+	      else
+		xfree (thread_name);
+	    }
+	  ourstatus->value.sig = GDB_SIGNAL_TRAP;
+	  result = HANDLE_EXCEPTION_IGNORED;
+	  break;
+	}
+	/* treat improperly formed exception as unknown, fallthrough */
     default:
       /* Treat unhandled first chance exceptions specially.  */
       if (current_event.u.Exception.dwFirstChance)
-	return -1;
+	return HANDLE_EXCEPTION_UNHANDLED;
       printf_unfiltered ("gdb: unknown target exception 0x%08x at %s\n",
 	(unsigned) current_event.u.Exception.ExceptionRecord.ExceptionCode,
 	host_address_to_string (
@@ -1111,7 +1201,7 @@ handle_exception (struct target_waitstat
     }
   exception_count++;
   last_sig = ourstatus->value.sig;
-  return 1;
+  return result;
 }
 
 /* Resume thread specified by ID, or all artificially suspended
@@ -1422,7 +1512,7 @@ get_windows_debug_event (struct target_o
       if (!windows_initialization_done)
 	{
 	  target_terminal_ours ();
-	  target_mourn_inferior ();
+	  target_mourn_inferior (inferior_ptid);
 	  error (_("During startup program exited with code 0x%x."),
 		 (unsigned int) current_event.u.ExitProcess.dwExitCode);
 	}
@@ -1470,15 +1560,15 @@ get_windows_debug_event (struct target_o
 	break;
       switch (handle_exception (ourstatus))
 	{
-	case 0:
+	case HANDLE_EXCEPTION_UNHANDLED:
+	default:
 	  continue_status = DBG_EXCEPTION_NOT_HANDLED;
 	  break;
-	case 1:
+	case HANDLE_EXCEPTION_HANDLED:
 	  thread_id = current_event.dwThreadId;
 	  break;
-	case -1:
-	  last_sig = 1;
-	  continue_status = -1;
+	case HANDLE_EXCEPTION_IGNORED:
+	  continue_status = DBG_CONTINUE;
 	  break;
 	}
       break;
@@ -1506,10 +1596,7 @@ get_windows_debug_event (struct target_o
 
   if (!thread_id || saw_create != 1)
     {
-      if (continue_status == -1)
-	windows_resume (ops, minus_one_ptid, 0, 1);
-      else
-	CHECK (windows_continue (continue_status, -1, 0));
+      CHECK (windows_continue (continue_status, -1, 0));
     }
   else
     {
@@ -1642,7 +1729,6 @@ windows_add_all_dlls (void)
 static void
 do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching)
 {
-  extern int stop_after_trap;
   int i;
   struct inferior *inf;
   struct thread_info *tp;
@@ -1681,16 +1767,20 @@ do_initial_windows_stuff (struct target_
   target_terminal_inferior ();
 
   windows_initialization_done = 0;
-  inf->control.stop_soon = STOP_QUIETLY;
+
   while (1)
     {
-      stop_after_trap = 1;
-      wait_for_inferior ();
-      tp = inferior_thread ();
-      if (tp->suspend.stop_signal != GDB_SIGNAL_TRAP)
-	resume (tp->suspend.stop_signal);
-      else
+      struct target_waitstatus status;
+
+      windows_wait (ops, minus_one_ptid, &status, 0);
+
+      /* Note windows_wait returns TARGET_WAITKIND_SPURIOUS for thread
+	 events.  */
+      if (status.kind != TARGET_WAITKIND_LOADED
+	  && status.kind != TARGET_WAITKIND_SPURIOUS)
 	break;
+
+      windows_resume (ops, minus_one_ptid, 0, GDB_SIGNAL_0);
     }
 
   /* Now that the inferior has been started and all DLLs have been mapped,
@@ -1711,8 +1801,6 @@ do_initial_windows_stuff (struct target_
   windows_add_all_dlls ();
 
   windows_initialization_done = 1;
-  inf->control.stop_soon = NO_STOP_QUIETLY;
-  stop_after_trap = 0;
   return;
 }
 
@@ -1882,7 +1970,7 @@ windows_get_exec_module_filename (char *
     /* Cygwin prefers that the path be in /x/y/z format, so extract
        the filename into a temporary buffer first, and then convert it
        to POSIX format into the destination buffer.  */
-    cygwin_buf_t *pathbuf = alloca (exe_name_max_len * sizeof (cygwin_buf_t));
+    cygwin_buf_t *pathbuf = (cygwin_buf_t *) alloca (exe_name_max_len * sizeof (cygwin_buf_t));
 
     len = GetModuleFileNameEx (current_process_handle,
 			       dh_buf, pathbuf, exe_name_max_len);
@@ -2023,6 +2111,301 @@ clear_win32_environment (char **env)
 }
 #endif
 
+#ifndef __CYGWIN__
+
+/* Redirection of inferior I/O streams for native MS-Windows programs.
+   Unlike on Unix, where this is handled by invoking the inferior via
+   the shell, on MS-Windows we need to emulate the cmd.exe shell.
+
+   The official documentation of the cmd.exe redirection features is here:
+
+     http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx
+
+   (That page talks about Windows XP, but there's no newer
+   documentation, so we assume later versions of cmd.exe didn't change
+   anything.)
+
+   Caveat: the documentation on that page seems to include a few lies.
+   For example, it describes strange constructs 1<&2 and 2<&1, which
+   seem to work only when 1>&2 resp. 2>&1 would make sense, and so I
+   think the cmd.exe parser of the redirection symbols simply doesn't
+   care about the < vs > distinction in these cases.  Therefore, the
+   supported features are explicitly documented below.
+
+   The emulation below aims at supporting all the valid use cases
+   supported by cmd.exe, which include:
+
+     < FILE    redirect standard input from FILE
+     0< FILE   redirect standard input from FILE
+     <&N       redirect standard input from file descriptor N
+     0<&N      redirect standard input from file descriptor N
+     > FILE    redirect standard output to FILE
+     >> FILE   append standard output to FILE
+     1>> FILE  append standard output to FILE
+     >&N       redirect standard output to file descriptor N
+     1>&N      redirect standard output to file descriptor N
+     >>&N      append standard output to file descriptor N
+     1>>&N     append standard output to file descriptor N
+     2> FILE   redirect standard error to FILE
+     2>> FILE  append standard error to FILE
+     2>&N      redirect standard error to file descriptor N
+     2>>&N     append standard error to file descriptor N
+
+     Note that using N > 2 in the above construct is supported, but
+     requires that the corresponding file descriptor be open by some
+     means elsewhere or outside GDB.  Also note that using ">&0" or
+     "<&2" will generally fail, because the file descriptor redirected
+     from is normally open in an incompatible mode (e.g., FD 0 is open
+     for reading only).  IOW, use of such tricks is not recommended;
+     you are on your own.
+
+     We do NOT support redirection of file descriptors above 2, as in
+     "3>SOME-FILE", because MinGW compiled programs don't (supporting
+     that needs special handling in the startup code that MinGW
+     doesn't have).  Pipes are also not supported.
+
+     As for invalid use cases, where the redirection contains some
+     error, the emulation below will detect that and produce some
+     error and/or failure.  But the behavior in those cases is not
+     bug-for-bug compatible with what cmd.exe does in those cases.
+     That's because what cmd.exe does then is not well defined, and
+     seems to be a side effect of the cmd.exe parsing of the command
+     line more than anything else.  For example, try redirecting to an
+     invalid file name, as in "> foo:bar".
+
+     There are also minor syntactic deviations from what cmd.exe does
+     in some corner cases.  For example, it doesn't support the likes
+     of "> &foo" to mean redirect to file named literally "&foo"; we
+     do support that here, because that, too, sounds like some issue
+     with the cmd.exe parser.  Another nicety is that we support
+     redirection targets that use file names with forward slashes,
+     something cmd.exe doesn't -- this comes in handy since GDB
+     file-name completion can be used when typing the command line for
+     the inferior.  */
+
+/* Support routines for redirecting standard handles of the inferior.  */
+
+/* Parse a single redirection spec, open/duplicate the specified
+   file/fd, and assign the appropriate value to one of the 3 standard
+   file descriptors. */
+static int
+redir_open (const char *redir_string, int *inp, int *out, int *err)
+{
+  int *fd, ref_fd = -2;
+  int mode;
+  const char *fname = redir_string + 1;
+  int rc = *redir_string;
+
+  switch (rc)
+    {
+    case '0':
+      fname++;
+      /* FALLTHROUGH */
+    case '<':
+      fd = inp;
+      mode = O_RDONLY;
+      break;
+    case '1': case '2':
+      fname++;
+      /* FALLTHROUGH */
+    case '>':
+      fd = (rc == '2') ? err : out;
+      mode = O_WRONLY | O_CREAT;
+      if (*fname == '>')
+	{
+	  fname++;
+	  mode |= O_APPEND;
+	}
+      else
+	mode |= O_TRUNC;
+      break;
+    default:
+      return -1;
+    }
+
+  if (*fname == '&' && '0' <= fname[1] && fname[1] <= '9')
+    {
+      /* A reference to a file descriptor.  */
+      char *fdtail;
+      ref_fd = (int) strtol (fname + 1, &fdtail, 10);
+      if (fdtail > fname + 1 && *fdtail == '\0')
+	{
+	  /* Don't allow redirection when open modes are incompatible.  */
+	  if ((ref_fd == 0 && (fd == out || fd == err))
+	      || ((ref_fd == 1 || ref_fd == 2) && fd == inp))
+	    {
+	      errno = EPERM;
+	      return -1;
+	    }
+	  if (ref_fd == 0)
+	    ref_fd = *inp;
+	  else if (ref_fd == 1)
+	    ref_fd = *out;
+	  else if (ref_fd == 2)
+	    ref_fd = *err;
+	}
+      else
+	{
+	  errno = EBADF;
+	  return -1;
+	}
+    }
+  else
+    fname++;	/* skip the separator space */
+  /* If the descriptor is already open, close it.  This allows
+     multiple specs of redirections for the same stream, which is
+     somewhat nonsensical, but still valid and supported by cmd.exe.
+     (But cmd.exe only opens a single file in this case, the one
+     specified by the last redirection spec on the command line.)  */
+  if (*fd >= 0)
+    _close (*fd);
+  if (ref_fd == -2)
+    {
+      *fd = _open (fname, mode, _S_IREAD | _S_IWRITE);
+      if (*fd < 0)
+	return -1;
+    }
+  else if (ref_fd == -1)
+    *fd = -1;	/* reset to default destination */
+  else
+    {
+      *fd = _dup (ref_fd);
+      if (*fd < 0)
+	return -1;
+    }
+  /* _open just sets a flag for O_APPEND, which won't be passed to the
+     inferior, so we need to actually move the file pointer.  */
+  if ((mode & O_APPEND) != 0)
+    _lseek (*fd, 0L, SEEK_END);
+  return 0;
+}
+
+/* Canonicalize a single redirection spec and set up the corresponding
+   file descriptor as specified.  */
+static int
+redir_set_redirection (const char *s, int *inp, int *out, int *err)
+{
+  char buf[__PMAX + 2 + 5]; /* extra space for quotes & redirection string */
+  char *d = buf;
+  const char *start = s;
+  int quote = 0;
+
+  *d++ = *s++;	/* copy the 1st character, < or > or a digit */
+  if ((*start == '>' || *start == '1' || *start == '2')
+      && *s == '>')
+    {
+      *d++ = *s++;
+      if (*s == '>' && *start != '>')
+	*d++ = *s++;
+    }
+  else if (*start == '0' && *s == '<')
+    *d++ = *s++;
+  /* cmd.exe recognizes "&N" only immediately after the redirection symbol.  */
+  if (*s != '&')
+    {
+      while (isspace (*s))  /* skip whitespace before file name */
+	s++;
+      *d++ = ' ';	    /* separate file name with a single space */
+    }
+
+  /* Copy the file name.  */
+  while (*s)
+    {
+      /* Remove quoting characters from the file name in buf[].  */
+      if (*s == '"')	/* could support '..' quoting here */
+	{
+	  if (!quote)
+	    quote = *s++;
+	  else if (*s == quote)
+	    {
+	      quote = 0;
+	      s++;
+	    }
+	  else
+	    *d++ = *s++;
+	}
+      else if (*s == '\\')
+	{
+	  if (s[1] == '"')	/* could support '..' here */
+	    s++;
+	  *d++ = *s++;
+	}
+      else if (isspace (*s) && !quote)
+	break;
+      else
+	*d++ = *s++;
+      if (d - buf >= sizeof (buf) - 1)
+	{
+	  errno = ENAMETOOLONG;
+	  return 0;
+	}
+    }
+  *d = '\0';
+
+  /* Windows doesn't allow redirection characters in file names, so we
+     can bail out early if they use them, or if there's no target file
+     name after the redirection symbol.  */
+  if (d[-1] == '>' || d[-1] == '<')
+    {
+      errno = ENOENT;
+      return 0;
+    }
+  if (redir_open (buf, inp, out, err) == 0)
+    return s - start;
+  return 0;
+}
+
+/* Parse the command line for redirection specs and prepare the file
+   descriptors for the 3 standard streams accordingly.  */
+static bool
+redirect_inferior_handles (const char *cmd_orig, char *cmd,
+			   int *inp, int *out, int *err)
+{
+  const char *s = cmd_orig;
+  char *d = cmd;
+  int quote = 0;
+  bool retval = false;
+
+  while (isspace (*s))
+    *d++ = *s++;
+
+  while (*s)
+    {
+      if (*s == '"')	/* could also support '..' quoting here */
+	{
+	  if (!quote)
+	    quote = *s;
+	  else if (*s == quote)
+	    quote = 0;
+	}
+      else if (*s == '\\')
+	{
+	  if (s[1] == '"')	/* escaped quote char */
+	    s++;
+	}
+      else if (!quote)
+	{
+	  /* Process a single redirection candidate.  */
+	  if (*s == '<' || *s == '>'
+	      || ((*s == '1' || *s == '2') && s[1] == '>')
+	      || (*s == '0' && s[1] == '<'))
+	    {
+	      int skip = redir_set_redirection (s, inp, out, err);
+
+	      if (skip <= 0)
+		return false;
+	      retval = true;
+	      s += skip;
+	    }
+	}
+      if (*s)
+	*d++ = *s++;
+    }
+  *d = '\0';
+  return retval;
+}
+#endif	/* !__CYGWIN__ */
+
 /* Start an inferior windows child process and sets inferior_ptid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
@@ -2045,20 +2428,25 @@ windows_create_inferior (struct target_o
   size_t len;
   int tty;
   int ostdin, ostdout, ostderr;
-#else
+#else  /* !__CYGWIN__ */
   char real_path[__PMAX];
   char shell[__PMAX]; /* Path to shell */
   char *toexec;
-  char *args;
-  size_t args_len;
-  HANDLE tty;
+  char *args, *allargs_copy;
+  size_t args_len, allargs_len;
+  int fd_inp = -1, fd_out = -1, fd_err = -1;
+  HANDLE tty = INVALID_HANDLE_VALUE;
+  HANDLE inf_stdin = INVALID_HANDLE_VALUE;
+  HANDLE inf_stdout = INVALID_HANDLE_VALUE;
+  HANDLE inf_stderr = INVALID_HANDLE_VALUE;
+  bool redirected = false;
   char *w32env;
   char *temp;
   size_t envlen;
   int i;
   size_t envsize;
   char **env;
-#endif
+#endif	/* !__CYGWIN__ */
   PROCESS_INFORMATION pi;
   BOOL ret;
   DWORD flags = 0;
@@ -2090,7 +2478,7 @@ windows_create_inferior (struct target_o
 	error (_("Error starting executable: %d"), errno);
       cygallargs = (wchar_t *) alloca (len * sizeof (wchar_t));
       mbstowcs (cygallargs, allargs, len);
-#else
+#else  /* !__USEWIDE */
       cygallargs = allargs;
 #endif
     }
@@ -2106,12 +2494,12 @@ windows_create_inferior (struct target_o
 	    + mbstowcs (NULL, allargs, 0) + 2;
       cygallargs = (wchar_t *) alloca (len * sizeof (wchar_t));
       swprintf (cygallargs, len, L" -c 'exec %s %s'", exec_file, allargs);
-#else
+#else  /* !__USEWIDE */
       len = (sizeof (" -c 'exec  '") + strlen (exec_file)
 	     + strlen (allargs) + 2);
       cygallargs = (char *) alloca (len);
       xsnprintf (cygallargs, len, " -c 'exec %s %s'", exec_file, allargs);
-#endif
+#endif	/* __USEWIDE */
       toexec = shell;
       flags |= DEBUG_PROCESS;
     }
@@ -2122,12 +2510,12 @@ windows_create_inferior (struct target_o
   wcscpy (args, toexec);
   wcscat (args, L" ");
   wcscat (args, cygallargs);
-#else
+#else  /* !__USEWIDE */
   args = (cygwin_buf_t *) alloca (strlen (toexec) + strlen (cygallargs) + 2);
   strcpy (args, toexec);
   strcat (args, " ");
   strcat (args, cygallargs);
-#endif
+#endif	/* !__USEWIDE */
 
 #ifdef CW_CVT_ENV_TO_WINENV
   /* First try to create a direct Win32 copy of the POSIX environment. */
@@ -2136,7 +2524,7 @@ windows_create_inferior (struct target_o
     flags |= CREATE_UNICODE_ENVIRONMENT;
   else
     /* If that fails, fall back to old method tweaking GDB's environment. */
-#endif
+#endif	/* CW_CVT_ENV_TO_WINENV */
     {
       /* Reset all Win32 environment variables to avoid leftover on next run. */
       clear_win32_environment (environ);
@@ -2201,21 +2589,26 @@ windows_create_inferior (struct target_o
       close (ostdout);
       close (ostderr);
     }
-#else
-  toexec = exec_file;
-  /* Build the command line, a space-separated list of tokens where
-     the first token is the name of the module to be executed.
-     To avoid ambiguities introduced by spaces in the module name,
-     we quote it.  */
-  args_len = strlen (toexec) + 2 /* quotes */ + strlen (allargs) + 2;
-  args = alloca (args_len);
-  xsnprintf (args, args_len, "\"%s\" %s", toexec, allargs);
-
-  flags |= DEBUG_ONLY_THIS_PROCESS;
-
-  if (!inferior_io_terminal)
-    tty = INVALID_HANDLE_VALUE;
-  else
+#else  /* !__CYGWIN__ */
+  allargs_len = strlen (allargs);
+  allargs_copy = strcpy ((char *) alloca (allargs_len + 1), allargs);
+  if (strpbrk (allargs_copy, "<>") != NULL)
+    {
+      int e = errno;
+      errno = 0;
+      redirected =
+	redirect_inferior_handles (allargs, allargs_copy,
+				   &fd_inp, &fd_out, &fd_err);
+      if (errno)
+	warning (_("Error in redirection: %s."), strerror (errno));
+      else
+	errno = e;
+      allargs_len = strlen (allargs_copy);
+    }
+  /* If not all the standard streams are redirected by the command
+     line, use inferior_io_terminal for those which aren't.  */
+  if (inferior_io_terminal
+      && !(fd_inp >= 0 && fd_out >= 0 && fd_err >= 0))
     {
       SECURITY_ATTRIBUTES sa;
       sa.nLength = sizeof(sa);
@@ -2226,15 +2619,41 @@ windows_create_inferior (struct target_o
       if (tty == INVALID_HANDLE_VALUE)
 	warning (_("Warning: Failed to open TTY %s, error %#x."),
 		 inferior_io_terminal, (unsigned) GetLastError ());
+    }
+  if (redirected || tty != INVALID_HANDLE_VALUE)
+    {
+      if (fd_inp >= 0)
+	si.hStdInput = (HANDLE) _get_osfhandle (fd_inp);
+      else if (tty != INVALID_HANDLE_VALUE)
+	si.hStdInput = tty;
       else
-	{
-	  si.hStdInput = tty;
-	  si.hStdOutput = tty;
-	  si.hStdError = tty;
-	  si.dwFlags |= STARTF_USESTDHANDLES;
-	}
+	si.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
+      if (fd_out >= 0)
+	si.hStdOutput = (HANDLE) _get_osfhandle (fd_out);
+      else if (tty != INVALID_HANDLE_VALUE)
+	si.hStdOutput = tty;
+      else
+	si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
+      if (fd_err >= 0)
+	si.hStdError = (HANDLE) _get_osfhandle (fd_err);
+      else if (tty != INVALID_HANDLE_VALUE)
+	si.hStdError = tty;
+      else
+	si.hStdError = GetStdHandle (STD_ERROR_HANDLE);
+      si.dwFlags |= STARTF_USESTDHANDLES;
     }
 
+  toexec = exec_file;
+  /* Build the command line, a space-separated list of tokens where
+     the first token is the name of the module to be executed.
+     To avoid ambiguities introduced by spaces in the module name,
+     we quote it.  */
+  args_len = strlen (toexec) + 2 /* quotes */ + allargs_len + 2;
+  args = (char *) alloca (args_len);
+  xsnprintf (args, args_len, "\"%s\" %s", toexec, allargs_copy);
+
+  flags |= DEBUG_ONLY_THIS_PROCESS;
+
   /* CreateProcess takes the environment list as a null terminated set of
      strings (i.e. two nulls terminate the list).  */
 
@@ -2248,7 +2667,7 @@ windows_create_inferior (struct target_o
   /* Windows programs expect the environment block to be sorted.  */
   qsort (env, i, sizeof (char *), envvar_cmp);
 
-  w32env = alloca (envlen + 1);
+  w32env = (char *) alloca (envlen + 1);
 
   /* Copy env strings into new buffer.  */
   for (temp = w32env, i = 0; env[i] && *env[i]; i++)
@@ -2273,7 +2692,13 @@ windows_create_inferior (struct target_o
 			&pi);
   if (tty != INVALID_HANDLE_VALUE)
     CloseHandle (tty);
-#endif
+  if (fd_inp >= 0)
+    _close (fd_inp);
+  if (fd_out >= 0)
+    _close (fd_out);
+  if (fd_err >= 0)
+    _close (fd_err);
+#endif	/* !__CYGWIN__ */
 
   if (!ret)
     error (_("Error creating process %s, (error %u)."),
@@ -2309,7 +2734,7 @@ windows_mourn_inferior (struct target_op
    ^C on the controlling terminal.  */
 
 static void
-windows_stop (struct target_ops *self, ptid_t ptid)
+windows_interrupt (struct target_ops *self, ptid_t ptid)
 {
   DEBUG_EVENTS (("gdb: GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)\n"));
   CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT, current_event.dwProcessId));
@@ -2371,7 +2796,7 @@ windows_kill_inferior (struct target_ops
 	break;
     }
 
-  target_mourn_inferior ();	/* Or just windows_mourn_inferior?  */
+  target_mourn_inferior (inferior_ptid);	/* Or just windows_mourn_inferior?  */
 }
 
 static void
@@ -2420,7 +2845,7 @@ windows_xfer_shared_libraries (struct ta
 				 target_gdbarch (), &obstack);
   obstack_grow_str0 (&obstack, "</library-list>\n");
 
-  buf = obstack_finish (&obstack);
+  buf = (const char *) obstack_finish (&obstack);
   len_avail = strlen (buf);
   if (offset >= len_avail)
     len= 0;
@@ -2483,6 +2908,14 @@ windows_get_ada_task_ptid (struct target
   return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
 }
 
+/* Implementation of the to_thread_name method.  */
+
+static const char *
+windows_thread_name (struct target_ops *self, struct thread_info *thr)
+{
+  return thread_rec (ptid_get_tid (thr->ptid), 0)->name;
+}
+
 static struct target_ops *
 windows_target (void)
 {
@@ -2503,10 +2936,11 @@ windows_target (void)
   t->to_mourn_inferior = windows_mourn_inferior;
   t->to_thread_alive = windows_thread_alive;
   t->to_pid_to_str = windows_pid_to_str;
-  t->to_stop = windows_stop;
+  t->to_interrupt = windows_interrupt;
   t->to_pid_to_exec_file = windows_pid_to_exec_file;
   t->to_get_ada_task_ptid = windows_get_ada_task_ptid;
   t->to_get_tib_address = windows_get_tib_address;
+  t->to_thread_name = windows_thread_name;
 
   return t;
 }
@@ -2539,6 +2973,13 @@ _initialize_windows_nat (void)
   cygwin_internal (CW_SET_DOS_FILE_WARNING, 0);
 #endif
 
+  add_com ("signal-event", class_run, signal_event_command, _("\
+Signal a crashed process with event ID, to allow its debugging.\n\
+This command is needed in support of setting up GDB as JIT debugger on \
+MS-Windows.  The command should be invoked from the GDB command line using \
+the '-ex' command-line option.  The ID of the event that blocks the \
+crashed process will be supplied by the Windows JIT debugging mechanism."));
+
 #ifdef __CYGWIN__
   add_setshow_boolean_cmd ("shell", class_support, &useshell, _("\
 Set use of shell to start subprocess."), _("\
@@ -2690,7 +3131,7 @@ _initialize_check_for_gdb_ini (void)
     {
       char *p;
       char *oldini = (char *) alloca (strlen (homedir) +
-				      sizeof ("/gdb.ini"));
+				      sizeof ("gdb.ini") + 1);
       strcpy (oldini, homedir);
       p = strchr (oldini, '\0');
       if (p > oldini && !IS_DIR_SEPARATOR (p[-1]))
@@ -2699,9 +3140,9 @@ _initialize_check_for_gdb_ini (void)
       if (access (oldini, 0) == 0)
 	{
 	  int len = strlen (oldini);
-	  char *newini = alloca (len + 1);
+	  char *newini = (char *) alloca (len + 2);
 
-	  xsnprintf (newini, len + 1, "%.*s.gdbinit",
+	  xsnprintf (newini, len + 2, "%.*s.gdbinit",
 		     (int) (len - (sizeof ("gdb.ini") - 1)), oldini);
 	  warning (_("obsolete '%s' found. Rename to '%s'."), oldini, newini);
 	}
@@ -2783,19 +3224,18 @@ _initialize_loadable (void)
 {
   HMODULE hm = NULL;
 
+#define GPA(m, func)					\
+  func = (func ## _ftype *) GetProcAddress (m, #func)
+
   hm = LoadLibrary ("kernel32.dll");
   if (hm)
     {
-      DebugActiveProcessStop = (void *)
-	GetProcAddress (hm, "DebugActiveProcessStop");
-      DebugBreakProcess = (void *)
-	GetProcAddress (hm, "DebugBreakProcess");
-      DebugSetProcessKillOnExit = (void *)
-	GetProcAddress (hm, "DebugSetProcessKillOnExit");
-      GetConsoleFontSize = (void *) 
-	GetProcAddress (hm, "GetConsoleFontSize");
-      GetCurrentConsoleFont = (void *) 
-	GetProcAddress (hm, "GetCurrentConsoleFont");
+      GPA (hm, DebugActiveProcessStop);
+      GPA (hm, DebugBreakProcess);
+      GPA (hm, DebugSetProcessKillOnExit);
+      GPA (hm, GetConsoleFontSize);
+      GPA (hm, DebugActiveProcessStop);
+      GPA (hm, GetCurrentConsoleFont);
     }
 
   /* Set variables to dummy versions of these processes if the function
@@ -2817,12 +3257,10 @@ _initialize_loadable (void)
   hm = LoadLibrary ("psapi.dll");
   if (hm)
     {
-      EnumProcessModules = (void *)
-	GetProcAddress (hm, "EnumProcessModules");
-      GetModuleInformation = (void *)
-	GetProcAddress (hm, "GetModuleInformation");
-      GetModuleFileNameEx = (void *)
-	GetProcAddress (hm, GetModuleFileNameEx_name);
+      GPA (hm, EnumProcessModules);
+      GPA (hm, GetModuleInformation);
+      GetModuleFileNameEx = (GetModuleFileNameEx_ftype *)
+        GetProcAddress (hm, GetModuleFileNameEx_name);
     }
 
   if (!EnumProcessModules || !GetModuleInformation || !GetModuleFileNameEx)
@@ -2842,15 +3280,15 @@ Use \"file\" or \"dll\" command to load 
   hm = LoadLibrary ("advapi32.dll");
   if (hm)
     {
-      OpenProcessToken = (void *) GetProcAddress (hm, "OpenProcessToken");
-      LookupPrivilegeValueA = (void *)
-	GetProcAddress (hm, "LookupPrivilegeValueA");
-      AdjustTokenPrivileges = (void *)
-	GetProcAddress (hm, "AdjustTokenPrivileges");
+      GPA (hm, OpenProcessToken);
+      GPA (hm, LookupPrivilegeValueA);
+      GPA (hm, AdjustTokenPrivileges);
       /* Only need to set one of these since if OpenProcessToken fails nothing
 	 else is needed.  */
       if (!OpenProcessToken || !LookupPrivilegeValueA
 	  || !AdjustTokenPrivileges)
 	OpenProcessToken = bad_OpenProcessToken;
     }
+
+#undef GPA
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-nat.h ./gdb/windows-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-nat.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/windows-nat.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-tdep.c ./gdb/windows-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/windows-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -111,7 +111,7 @@ windows_get_tlb_type (struct gdbarch *gd
   static struct type *last_tlb_type = NULL;
   struct type *dword_ptr_type, *dword32_type, *void_ptr_type;
   struct type *peb_ldr_type, *peb_ldr_ptr_type;
-  struct type *peb_type, *peb_ptr_type, *list_type, *list_ptr_type;
+  struct type *peb_type, *peb_ptr_type, *list_type;
   struct type *module_list_ptr_type;
   struct type *tib_type, *seh_type, *tib_ptr_type, *seh_ptr_type;
 
@@ -130,9 +130,6 @@ windows_get_tlb_type (struct gdbarch *gd
   list_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
   TYPE_NAME (list_type) = xstrdup ("list");
 
-  list_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
-			    TYPE_LENGTH (void_ptr_type), NULL);
-
   module_list_ptr_type = void_ptr_type;
 
   append_composite_type_field (list_type, "forward_list",
@@ -321,7 +318,7 @@ display_one_tib (ptid_t ptid)
       max = tib_size / size;
     }
   
-  tib = alloca (tib_size);
+  tib = (gdb_byte *) alloca (tib_size);
 
   if (target_get_tib_address (ptid, &thread_local_base) == 0)
     {
@@ -361,31 +358,12 @@ display_one_tib (ptid_t ptid)
   return 1;  
 }
 
-/* Display thread information block of a thread specified by ARGS.
-   If ARGS is empty, display thread information block of current_thread
-   if current_thread is non NULL.
-   Otherwise ARGS is parsed and converted to a integer that should
-   be the windows ThreadID (not the internal GDB thread ID).  */
+/* Display thread information block of the current thread.  */
 
 static void
 display_tib (char * args, int from_tty)
 {
-  if (args)
-    {
-      struct thread_info *tp;
-      int gdb_id = value_as_long (parse_and_eval (args));
-
-      tp = find_thread_id (gdb_id);
-
-      if (!tp)
-	error (_("Thread ID %d not known."), gdb_id);
-
-      if (!target_thread_alive (tp->ptid))
-	error (_("Thread ID %d has terminated."), gdb_id);
-
-      display_one_tib (tp->ptid);
-    }
-  else if (!ptid_equal (inferior_ptid, null_ptid))
+  if (!ptid_equal (inferior_ptid, null_ptid))
     display_one_tib (inferior_ptid);
 }
 
@@ -394,7 +372,6 @@ windows_xfer_shared_library (const char*
 			     struct gdbarch *gdbarch, struct obstack *obstack)
 {
   char *p;
-  struct bfd * dll;
   CORE_ADDR text_offset;
 
   obstack_grow_str (obstack, "<library name=\"");
@@ -402,12 +379,11 @@ windows_xfer_shared_library (const char*
   obstack_grow_str (obstack, p);
   xfree (p);
   obstack_grow_str (obstack, "\"><segment address=\"");
-  dll = gdb_bfd_open (so_name, gnutarget, -1);
+  gdb_bfd_ref_ptr dll (gdb_bfd_open (so_name, gnutarget, -1));
   /* The following calls are OK even if dll is NULL.
      The default value 0x1000 is returned by pe_text_section_offset
      in that case.  */
-  text_offset = pe_text_section_offset (dll);
-  gdb_bfd_unref (dll);
+  text_offset = pe_text_section_offset (dll.get ());
   obstack_grow_str (obstack, paddress (gdbarch, load_addr + text_offset));
   obstack_grow_str (obstack, "\"/></library>");
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-tdep.h ./gdb/windows-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/windows-tdep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/windows-tdep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-bsd-nat.c ./gdb/x86-bsd-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-bsd-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/x86-bsd-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,156 @@
+/* Native-dependent code for X86 BSD's.
+
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "gdbthread.h"
+
+/* We include <signal.h> to make sure `struct fxsave64' is defined on
+   NetBSD, since NetBSD's <machine/reg.h> needs it.  */
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "x86-nat.h"
+#include "x86-bsd-nat.h"
+#include "inf-ptrace.h"
+
+
+#ifdef PT_GETXSTATE_INFO
+size_t x86bsd_xsave_len;
+#endif
+
+/* Support for debug registers.  */
+
+#ifdef HAVE_PT_GETDBREGS
+static void (*super_mourn_inferior) (struct target_ops *ops);
+
+/* Implement the "to_mourn_inferior" target_ops method.  */
+
+static void
+x86bsd_mourn_inferior (struct target_ops *ops)
+{
+  x86_cleanup_dregs ();
+  super_mourn_inferior (ops);
+}
+
+/* Not all versions of FreeBSD/i386 that support the debug registers
+   have this macro.  */
+#ifndef DBREG_DRX
+#define DBREG_DRX(d, x) ((&d->dr0)[x])
+#endif
+
+static unsigned long
+x86bsd_dr_get (ptid_t ptid, int regnum)
+{
+  struct dbreg dbregs;
+
+  if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
+	      (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
+    perror_with_name (_("Couldn't read debug registers"));
+
+  return DBREG_DRX ((&dbregs), regnum);
+}
+
+static void
+x86bsd_dr_set (int regnum, unsigned long value)
+{
+  struct thread_info *thread;
+  struct dbreg dbregs;
+
+  if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
+              (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
+    perror_with_name (_("Couldn't get debug registers"));
+
+  /* For some mysterious reason, some of the reserved bits in the
+     debug control register get set.  Mask these off, otherwise the
+     ptrace call below will fail.  */
+  DBREG_DRX ((&dbregs), 7) &= ~(0xffffffff0000fc00);
+
+  DBREG_DRX ((&dbregs), regnum) = value;
+
+  ALL_NON_EXITED_THREADS (thread)
+    if (thread->inf == current_inferior ())
+      {
+	if (ptrace (PT_SETDBREGS, get_ptrace_pid (thread->ptid),
+		    (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
+	  perror_with_name (_("Couldn't write debug registers"));
+      }
+}
+
+static void
+x86bsd_dr_set_control (unsigned long control)
+{
+  x86bsd_dr_set (7, control);
+}
+
+static void
+x86bsd_dr_set_addr (int regnum, CORE_ADDR addr)
+{
+  gdb_assert (regnum >= 0 && regnum <= 4);
+
+  x86bsd_dr_set (regnum, addr);
+}
+
+static CORE_ADDR
+x86bsd_dr_get_addr (int regnum)
+{
+  return x86bsd_dr_get (inferior_ptid, regnum);
+}
+
+static unsigned long
+x86bsd_dr_get_status (void)
+{
+  return x86bsd_dr_get (inferior_ptid, 6);
+}
+
+static unsigned long
+x86bsd_dr_get_control (void)
+{
+  return x86bsd_dr_get (inferior_ptid, 7);
+}
+
+#endif /* PT_GETDBREGS */
+
+/* Create a prototype *BSD/x86 target.  The client can override it
+   with local methods.  */
+
+struct target_ops *
+x86bsd_target (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+
+#ifdef HAVE_PT_GETDBREGS
+  x86_use_watchpoints (t);
+
+  x86_dr_low.set_control = x86bsd_dr_set_control;
+  x86_dr_low.set_addr = x86bsd_dr_set_addr;
+  x86_dr_low.get_addr = x86bsd_dr_get_addr;
+  x86_dr_low.get_status = x86bsd_dr_get_status;
+  x86_dr_low.get_control = x86bsd_dr_get_control;
+  x86_set_debug_register_length (sizeof (void *));
+  super_mourn_inferior = t->to_mourn_inferior;
+  t->to_mourn_inferior = x86bsd_mourn_inferior;
+#endif /* HAVE_PT_GETDBREGS */
+
+  return t;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-bsd-nat.h ./gdb/x86-bsd-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-bsd-nat.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/x86-bsd-nat.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,31 @@
+/* Native-dependent code for x86 BSD's.
+
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef X86_BSD_NAT_H
+#define X86_BSD_NAT_H
+
+/* Low level x86 XSAVE info.  */
+extern size_t x86bsd_xsave_len;
+
+/* Create a prototype *BSD/x86 target.  The client can override it
+   with local methods.  */
+
+extern struct target_ops *x86bsd_target (void);
+
+#endif /* x86-bsd-nat.h */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-linux-nat.c ./gdb/x86-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-linux-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/x86-linux-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,7 +21,7 @@
 #include "inferior.h"
 #include "elf/common.h"
 #include "gdb_proc_service.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <sys/user.h>
 #include <sys/procfs.h>
 #include <sys/uio.h>
@@ -204,17 +204,27 @@ x86_linux_read_description (struct targe
 #ifdef __x86_64__
       switch (xcr0_features_bits)
 	{
-	case X86_XSTATE_MPX_AVX512_MASK:
-	case X86_XSTATE_AVX512_MASK:
+	case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
 	  if (is_x32)
-	    return tdesc_x32_avx512_linux;
+	    /* No MPX, PKU on x32, fall back to AVX-AVX512.  */
+	    return tdesc_x32_avx_avx512_linux;
 	  else
-	    return tdesc_amd64_avx512_linux;
+	    return tdesc_amd64_avx_mpx_avx512_pku_linux;
+	case X86_XSTATE_AVX_AVX512_MASK:
+	  if (is_x32)
+	    return tdesc_x32_avx_avx512_linux;
+	  else
+	    return tdesc_amd64_avx_avx512_linux;
 	case X86_XSTATE_MPX_MASK:
 	  if (is_x32)
 	    return tdesc_x32_avx_linux; /* No MPX on x32 using AVX.  */
 	  else
 	    return tdesc_amd64_mpx_linux;
+	case X86_XSTATE_AVX_MPX_MASK:
+	  if (is_x32)
+	    return tdesc_x32_avx_linux; /* No MPX on x32 using AVX.  */
+	  else
+	    return tdesc_amd64_avx_mpx_linux;
 	case X86_XSTATE_AVX_MASK:
 	  if (is_x32)
 	    return tdesc_x32_avx_linux;
@@ -232,11 +242,14 @@ x86_linux_read_description (struct targe
     {
       switch (xcr0_features_bits)
 	{
-	case X86_XSTATE_MPX_AVX512_MASK:
-	case X86_XSTATE_AVX512_MASK:
-	  return tdesc_i386_avx512_linux;
+	case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+	  return tdesc_i386_avx_mpx_avx512_pku_linux;
+	case X86_XSTATE_AVX_AVX512_MASK:
+	  return tdesc_i386_avx_avx512_linux;
 	case X86_XSTATE_MPX_MASK:
 	  return tdesc_i386_mpx_linux;
+	case X86_XSTATE_AVX_MPX_MASK:
+	  return tdesc_i386_avx_mpx_linux;
 	case X86_XSTATE_AVX_MASK:
 	  return tdesc_i386_avx_linux;
 	default:
@@ -255,7 +268,6 @@ x86_linux_enable_btrace (struct target_o
 			 const struct btrace_config *conf)
 {
   struct btrace_target_info *tinfo;
-  struct gdbarch *gdbarch;
 
   errno = 0;
   tinfo = linux_enable_btrace (ptid, conf);
@@ -264,12 +276,6 @@ x86_linux_enable_btrace (struct target_o
     error (_("Could not enable branch tracing for %s: %s."),
 	   target_pid_to_str (ptid), safe_strerror (errno));
 
-  /* Fill in the size of a pointer in bits.  */
-  if (tinfo->ptr_bits == 0)
-    {
-      gdbarch = target_thread_architecture (ptid);
-      tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);
-    }
   return tinfo;
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-linux-nat.h ./gdb/x86-linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-linux-nat.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/x86-linux-nat.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,8 @@
 #ifndef X86_LINUX_NAT_H
 #define X86_LINUX_NAT_H 1
 
+#include "gdb_proc_service.h"  /* For ps_err_e.  */
+
 
 
 /* Helper for ps_get_thread_area.  Sets BASE_ADDR to a pointer to
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-nat.c ./gdb/x86-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/x86-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for x86 (i386 and x86-64).
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -75,11 +75,9 @@ x86_find_process_pid (pid_t pid)
 static struct x86_process_info *
 x86_add_process (pid_t pid)
 {
-  struct x86_process_info *proc;
+  struct x86_process_info *proc = XCNEW (struct x86_process_info);
 
-  proc = xcalloc (1, sizeof (*proc));
   proc->pid = pid;
-
   proc->next = x86_process_list;
   x86_process_list = proc;
 
@@ -109,7 +107,7 @@ x86_debug_reg_state (pid_t pid)
   return &x86_process_info_get (pid)->state;
 }
 
-/* See declaration in i386-nat.h.  */
+/* See declaration in x86-nat.h.  */
 
 void
 x86_forget_process (pid_t pid)
@@ -149,9 +147,8 @@ x86_cleanup_dregs (void)
    of the type TYPE.  Return 0 on success, -1 on failure.  */
 
 static int
-x86_insert_watchpoint (struct target_ops *self,
-		       CORE_ADDR addr, int len, int type,
-		       struct expression *cond)
+x86_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+		       enum target_hw_bp_type type, struct expression *cond)
 {
   struct x86_debug_reg_state *state
     = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
@@ -163,9 +160,8 @@ x86_insert_watchpoint (struct target_ops
    address ADDR, whose length is LEN bytes, and for accesses of the
    type TYPE.  Return 0 on success, -1 on failure.  */
 static int
-x86_remove_watchpoint (struct target_ops *self,
-		       CORE_ADDR addr, int len, int type,
-		       struct expression *cond)
+x86_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+		       enum target_hw_bp_type type, struct expression *cond)
 {
   struct x86_debug_reg_state *state
     = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
@@ -255,11 +251,11 @@ x86_remove_hw_breakpoint (struct target_
    extreme example, consider the case where all the watchpoints watch
    the same address and the same region length: then we can handle a
    virtually unlimited number of watchpoints, due to debug register
-   sharing implemented via reference counts in i386-nat.c.  */
+   sharing implemented via reference counts in x86-nat.c.  */
 
 static int
 x86_can_use_hw_breakpoint (struct target_ops *self,
-			   int type, int cnt, int othertype)
+			   enum bptype type, int cnt, int othertype)
 {
   return 1;
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-nat.h ./gdb/x86-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/x86-nat.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/x86-nat.h	2017-03-06 01:49:08.000000000 +0000
@@ -3,7 +3,7 @@
    Low level functions to implement Oeprating System specific
    code to manipulate x86 debug registers.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xcoffread.c ./gdb/xcoffread.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xcoffread.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xcoffread.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Read AIX xcoff symbol tables and convert to internal format, for GDB.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
    Derived from coffread.c, dbxread.c, and a lot of hacking.
    Contributed by IBM Corporation.
 
@@ -159,11 +159,17 @@ static const struct dwarf2_debug_section
   { ".dwabrev", NULL },
   { ".dwline", NULL },
   { ".dwloc", NULL },
-  { NULL, NULL }, /* debug_macinfo */
-  { NULL, NULL }, /* debug_macro */
+  { NULL, NULL }, /* debug_loclists */
+  /* AIX XCOFF defines one, named DWARF section for macro debug information.
+     XLC does not generate debug_macinfo for DWARF4 and below.
+     The section is assigned to debug_macro for DWARF5 and above. */
+  { NULL, NULL },
+  { ".dwmac", NULL },
   { ".dwstr", NULL },
+  { NULL, NULL }, /* debug_line_str */
   { ".dwrnges", NULL },
-  { NULL, NULL }, /* debug_types */
+  { NULL, NULL }, /* debug_rnglists */
+  { ".dwpbtyp", NULL },
   { NULL, NULL }, /* debug_addr */
   { ".dwframe", NULL },
   { NULL, NULL }, /* eh_frame */
@@ -192,9 +198,10 @@ eb_complaint (int arg1)
 	     _("Mismatched .eb symbol ignored starting at symnum %d"), arg1);
 }
 
-static void xcoff_initial_scan (struct objfile *, int);
+static void xcoff_initial_scan (struct objfile *, symfile_add_flags);
 
-static void scan_xcoff_symtab (struct objfile *);
+static void scan_xcoff_symtab (minimal_symbol_reader &,
+			       struct objfile *);
 
 static char *xcoff_next_symbol_text (struct objfile *);
 
@@ -435,8 +442,7 @@ arrange_linetable (struct linetable *old
 #define NUM_OF_FUNCTIONS 20
 
   fentry_size = NUM_OF_FUNCTIONS;
-  fentry = (struct linetable_entry *)
-    xmalloc (fentry_size * sizeof (struct linetable_entry));
+  fentry = XNEWVEC (struct linetable_entry, fentry_size);
 
   for (function_count = 0, ii = 0; ii < oldLineTb->nitems; ++ii)
     {
@@ -584,18 +590,14 @@ allocate_include_entry (void)
 {
   if (inclTable == NULL)
     {
-      inclTable = (InclTable *)
-	xmalloc (sizeof (InclTable) * INITIAL_INCLUDE_TABLE_LENGTH);
-      memset (inclTable,
-	      '\0', sizeof (InclTable) * INITIAL_INCLUDE_TABLE_LENGTH);
+      inclTable = XCNEWVEC (InclTable, INITIAL_INCLUDE_TABLE_LENGTH);
       inclLength = INITIAL_INCLUDE_TABLE_LENGTH;
       inclIndx = 0;
     }
   else if (inclIndx >= inclLength)
     {
       inclLength += INITIAL_INCLUDE_TABLE_LENGTH;
-      inclTable = (InclTable *)
-	xrealloc (inclTable, sizeof (InclTable) * inclLength);
+      inclTable = XRESIZEVEC (InclTable, inclTable, inclLength);
       memset (inclTable + inclLength - INITIAL_INCLUDE_TABLE_LENGTH,
 	      '\0', sizeof (InclTable) * INITIAL_INCLUDE_TABLE_LENGTH);
     }
@@ -679,8 +681,7 @@ process_linenos (CORE_ADDR start, CORE_A
 	    {
 	      /* Have a new subfile for the include file.  */
 
-	      tmpSubfile = inclTable[ii].subfile =
-		(struct subfile *) xmalloc (sizeof (struct subfile));
+	      tmpSubfile = inclTable[ii].subfile = XNEW (struct subfile);
 
 	      memset (tmpSubfile, '\0', sizeof (struct subfile));
 	      firstLine = &(inclTable[ii].funStartLine);
@@ -911,10 +912,10 @@ enter_line_range (struct subfile *subfil
    This function can read past the end of the symbol table
    (into the string table) but this does no harm.  */
 
-/* Create a new minimal symbol (using prim_record_minimal_symbol_and_info).
+/* Create a new minimal symbol (using record_with_info).
 
    Creation of all new minimal symbols should go through this function
-   rather than calling the various prim_record_[...] functions in order
+   rather than calling the various record functions in order
    to make sure that all symbol addresses get properly relocated.
 
    Arguments are:
@@ -928,19 +929,17 @@ enter_line_range (struct subfile *subfil
    OBJFILE - the objfile associated with the minimal symbol.  */
 
 static void
-record_minimal_symbol (const char *name, CORE_ADDR address,
+record_minimal_symbol (minimal_symbol_reader &reader,
+		       const char *name, CORE_ADDR address,
 		       enum minimal_symbol_type ms_type,
 		       int n_scnum,
 		       struct objfile *objfile)
 {
-  int section = secnum_to_section (n_scnum, objfile);
-
   if (name[0] == '.')
     ++name;
 
-  prim_record_minimal_symbol_and_info (name, address, ms_type,
-				       secnum_to_section (n_scnum, objfile),
-				       objfile);
+  reader.record_with_info (name, address, ms_type,
+			   secnum_to_section (n_scnum, objfile));
 }
 
 /* xcoff has static blocks marked in `.bs', `.es' pairs.  They cannot be
@@ -1030,7 +1029,7 @@ read_xcoff_symtab (struct objfile *objfi
   union internal_auxent fcn_aux_saved = main_aux;
   struct context_stack *newobj;
 
-  char *filestring = " _start_ ";	/* Name of the current file.  */
+  const char *filestring = pst->filename;	/* Name of the current file.  */
 
   const char *last_csect_name;	/* Last seen csect's name.  */
 
@@ -1085,7 +1084,8 @@ read_xcoff_symtab (struct objfile *objfi
 	      {
 		char *p;
 
-		p = obstack_alloc (&objfile->objfile_obstack, E_SYMNMLEN + 1);
+		p = (char *) obstack_alloc (&objfile->objfile_obstack,
+					    E_SYMNMLEN + 1);
 		strncpy (p, cs->c_name, E_SYMNMLEN);
 		p[E_SYMNMLEN] = '\0';
 		cs->c_name = p;
@@ -1389,7 +1389,7 @@ read_xcoff_symtab (struct objfile *objfi
 		}
 
 	      finish_block (newobj->name, &local_symbols, newobj->old_blocks,
-			    newobj->start_addr,
+			    NULL, newobj->start_addr,
 			    (fcn_cs_saved.c_value
 			     + fcn_aux_saved.x_sym.x_misc.x_fsize
 			     + ANOFFSET (objfile->section_offsets,
@@ -1480,7 +1480,8 @@ read_xcoff_symtab (struct objfile *objfi
 	      if (local_symbols && context_stack_depth > 0)
 		{
 		  /* Make a block for the local symbols within.  */
-		  finish_block (newobj->name, &local_symbols, newobj->old_blocks,
+		  finish_block (newobj->name, &local_symbols,
+				newobj->old_blocks, NULL,
 				newobj->start_addr,
 				(cs->c_value
 				 + ANOFFSET (objfile->section_offsets,
@@ -1514,8 +1515,7 @@ read_xcoff_symtab (struct objfile *objfi
 }
 
 #define	SYMBOL_DUP(SYMBOL1, SYMBOL2)	\
-  (SYMBOL2) = (struct symbol *)		\
-  	obstack_alloc (&objfile->objfile_obstack, sizeof (struct symbol)); \
+  (SYMBOL2) = XOBNEW (&objfile->objfile_obstack, struct symbol); \
   *(SYMBOL2) = *(SYMBOL1);
 
 
@@ -1567,7 +1567,8 @@ process_xcoff_symbol (struct coff_symbol
          will be patched with the type from its stab entry later on in
          patch_block_stabs (), unless the file was compiled without -g.  */
 
-      SYMBOL_SET_LINKAGE_NAME (sym, SYMNAME_ALLOC (name, symname_alloced));
+      SYMBOL_SET_LINKAGE_NAME (sym, ((const char *)
+				     SYMNAME_ALLOC (name, symname_alloced)));
       SYMBOL_TYPE (sym) = objfile_type (objfile)->nodebug_text_symbol;
 
       SYMBOL_ACLASS_INDEX (sym) = LOC_BLOCK;
@@ -2022,8 +2023,8 @@ xcoff_start_psymtab (struct objfile *obj
 			  0,
 			  global_syms, static_syms);
 
-  result->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
-					       sizeof (struct symloc));
+  result->read_symtab_private =
+    XOBNEW (&objfile->objfile_obstack, struct symloc);
   ((struct symloc *) result->read_symtab_private)->first_symnum = first_symnum;
   result->read_symtab = xcoff_read_symtab;
 
@@ -2057,17 +2058,15 @@ xcoff_end_psymtab (struct objfile *objfi
   ((struct symloc *) pst->read_symtab_private)->lineno_off =
     first_fun_line_offset;
   first_fun_line_offset = 0;
-  pst->n_global_syms = objfile->global_psymbols.next
-    - (objfile->global_psymbols.list + pst->globals_offset);
-  pst->n_static_syms = objfile->static_psymbols.next
-    - (objfile->static_psymbols.list + pst->statics_offset);
+
+  end_psymtab_common (objfile, pst);
 
   pst->number_of_dependencies = number_dependencies;
   if (number_dependencies)
     {
-      pst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->objfile_obstack,
-		    number_dependencies * sizeof (struct partial_symtab *));
+      pst->dependencies = XOBNEWVEC (&objfile->objfile_obstack,
+				     struct partial_symtab *,
+				     number_dependencies);
       memcpy (pst->dependencies, dependency_list,
 	      number_dependencies * sizeof (struct partial_symtab *));
     }
@@ -2088,9 +2087,8 @@ xcoff_end_psymtab (struct objfile *objfi
 
       /* We could save slight bits of space by only making one of these,
          shared by the entire set of include files.  FIXME-someday.  */
-      subpst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->objfile_obstack,
-		       sizeof (struct partial_symtab *));
+      subpst->dependencies =
+	  XOBNEW (&objfile->objfile_obstack, struct partial_symtab *);
       subpst->dependencies[0] = pst;
       subpst->number_of_dependencies = 1;
 
@@ -2104,8 +2102,6 @@ xcoff_end_psymtab (struct objfile *objfi
       subpst->read_symtab = pst->read_symtab;
     }
 
-  sort_pst_symbols (objfile, pst);
-
   if (num_includes == 0
       && number_dependencies == 0
       && pst->n_global_syms == 0
@@ -2119,7 +2115,7 @@ xcoff_end_psymtab (struct objfile *objfi
       discard_psymtab (objfile, pst);
 
       /* Indicate that psymtab was thrown away.  */
-      pst = (struct partial_symtab *) NULL;
+      pst = NULL;
     }
   return pst;
 }
@@ -2144,7 +2140,8 @@ swap_sym (struct internal_syment *symbol
 	     into the minimal symbols.  */
 	  char *p;
 
-	  p = obstack_alloc (&objfile->objfile_obstack, E_SYMNMLEN + 1);
+	  p = (char *) obstack_alloc (&objfile->objfile_obstack,
+				      E_SYMNMLEN + 1);
 	  strncpy (p, symbol->n_name, E_SYMNMLEN);
 	  p[E_SYMNMLEN] = '\0';
 	  *name = p;
@@ -2184,14 +2181,14 @@ function_outside_compilation_unit_compla
 }
 
 static void
-scan_xcoff_symtab (struct objfile *objfile)
+scan_xcoff_symtab (minimal_symbol_reader &reader,
+		   struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   CORE_ADDR toc_offset = 0;	/* toc offset value in data section.  */
   const char *filestring = NULL;
 
   const char *namestring;
-  int past_first_source_file = 0;
   bfd *abfd;
   asection *bfd_sect;
   unsigned int nsyms;
@@ -2295,7 +2292,7 @@ scan_xcoff_symtab (struct objfile *objfi
 			if (!misc_func_recorded)
 			  {
 			    record_minimal_symbol
-			      (last_csect_name, last_csect_val,
+			      (reader, last_csect_name, last_csect_val,
 			       mst_text, last_csect_sec, objfile);
 			    misc_func_recorded = 1;
 			  }
@@ -2350,7 +2347,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		       table, except for section symbols.  */
 		    if (*namestring != '.')
 		      record_minimal_symbol
-			(namestring, symbol.n_value,
+			(reader, namestring, symbol.n_value,
 			 sclass == C_HIDEXT ? mst_file_data : mst_data,
 			 symbol.n_scnum, objfile);
 		    break;
@@ -2386,13 +2383,12 @@ scan_xcoff_symtab (struct objfile *objfi
 		    if (first_fun_line_offset == 0 && symbol.n_numaux > 1)
 		      first_fun_line_offset =
 			main_aux[0].x_sym.x_fcnary.x_fcn.x_lnnoptr;
-		      {
-			record_minimal_symbol
-			  (namestring, symbol.n_value,
-			   sclass == C_HIDEXT ? mst_file_text : mst_text,
-			   symbol.n_scnum, objfile);
-			misc_func_recorded = 1;
-		      }
+
+		    record_minimal_symbol
+		      (reader, namestring, symbol.n_value,
+		       sclass == C_HIDEXT ? mst_file_text : mst_text,
+		       symbol.n_scnum, objfile);
+		    misc_func_recorded = 1;
 		    break;
 
 		  case XMC_GL:
@@ -2404,7 +2400,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		       symbols, we will choose mst_text over
 		       mst_solib_trampoline.  */
 		    record_minimal_symbol
-		      (namestring, symbol.n_value,
+		      (reader, namestring, symbol.n_value,
 		       mst_solib_trampoline, symbol.n_scnum, objfile);
 		    misc_func_recorded = 1;
 		    break;
@@ -2426,7 +2422,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		       XMC_BS might be possible too.  */
 		    if (*namestring != '.')
 		      record_minimal_symbol
-			(namestring, symbol.n_value,
+			(reader, namestring, symbol.n_value,
 			 sclass == C_HIDEXT ? mst_file_data : mst_data,
 			 symbol.n_scnum, objfile);
 		    break;
@@ -2442,7 +2438,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		       table, except for section symbols.  */
 		    if (*namestring != '.')
 		      record_minimal_symbol
-			(namestring, symbol.n_value,
+			(reader, namestring, symbol.n_value,
 			 sclass == C_HIDEXT ? mst_file_bss : mst_bss,
 			 symbol.n_scnum, objfile);
 		    break;
@@ -2470,7 +2466,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		   it as a function.  This will take care of functions like
 		   strcmp() compiled by xlc.  */
 
-		record_minimal_symbol (last_csect_name, last_csect_val,
+		record_minimal_symbol (reader, last_csect_name, last_csect_val,
 				       mst_text, last_csect_sec, objfile);
 		misc_func_recorded = 1;
 	      }
@@ -2664,7 +2660,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		add_psymbol_to_list (namestring, p - namestring, 1,
 				     VAR_DOMAIN, LOC_STATIC,
 				     &objfile->static_psymbols,
-				     0, symbol.n_value,
+				     symbol.n_value,
 				     psymtab_language, objfile);
 		continue;
 
@@ -2676,7 +2672,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		add_psymbol_to_list (namestring, p - namestring, 1,
 				     VAR_DOMAIN, LOC_STATIC,
 				     &objfile->global_psymbols,
-				     0, symbol.n_value,
+				     symbol.n_value,
 				     psymtab_language, objfile);
 		continue;
 
@@ -2694,16 +2690,14 @@ scan_xcoff_symtab (struct objfile *objfi
 		    add_psymbol_to_list (namestring, p - namestring, 1,
 					 STRUCT_DOMAIN, LOC_TYPEDEF,
 					 &objfile->static_psymbols,
-					 symbol.n_value, 0,
-					 psymtab_language, objfile);
+					 0, psymtab_language, objfile);
 		    if (p[2] == 't')
 		      {
 			/* Also a typedef with the same name.  */
 			add_psymbol_to_list (namestring, p - namestring, 1,
 					     VAR_DOMAIN, LOC_TYPEDEF,
 					     &objfile->static_psymbols,
-					     symbol.n_value, 0,
-					     psymtab_language, objfile);
+					     0, psymtab_language, objfile);
 			p += 1;
 		      }
 		  }
@@ -2715,8 +2709,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		    add_psymbol_to_list (namestring, p - namestring, 1,
 					 VAR_DOMAIN, LOC_TYPEDEF,
 					 &objfile->static_psymbols,
-					 symbol.n_value, 0,
-					 psymtab_language, objfile);
+					 0, psymtab_language, objfile);
 		  }
 	      check_enum:
 		/* If this is an enumerated type, we need to
@@ -2777,7 +2770,7 @@ scan_xcoff_symtab (struct objfile *objfi
 			   enum constants in psymtabs, just in symtabs.  */
 			add_psymbol_to_list (p, q - p, 1,
 					     VAR_DOMAIN, LOC_CONST,
-					     &objfile->static_psymbols, 0,
+					     &objfile->static_psymbols,
 					     0, psymtab_language, objfile);
 			/* Point past the name.  */
 			p = q;
@@ -2795,7 +2788,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		/* Constant, e.g. from "const" in Pascal.  */
 		add_psymbol_to_list (namestring, p - namestring, 1,
 				     VAR_DOMAIN, LOC_CONST,
-				     &objfile->static_psymbols, symbol.n_value,
+				     &objfile->static_psymbols,
 				     0, psymtab_language, objfile);
 		continue;
 
@@ -2803,7 +2796,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		if (! pst)
 		  {
 		    int name_len = p - namestring;
-		    char *name = xmalloc (name_len + 1);
+		    char *name = (char *) xmalloc (name_len + 1);
 
 		    memcpy (name, namestring, name_len);
 		    name[name_len] = '\0';
@@ -2815,7 +2808,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		add_psymbol_to_list (namestring, p - namestring, 1,
 				     VAR_DOMAIN, LOC_BLOCK,
 				     &objfile->static_psymbols,
-				     0, symbol.n_value,
+				     symbol.n_value,
 				     psymtab_language, objfile);
 		continue;
 
@@ -2826,7 +2819,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		if (! pst)
 		  {
 		    int name_len = p - namestring;
-		    char *name = xmalloc (name_len + 1);
+		    char *name = (char *) xmalloc (name_len + 1);
 
 		    memcpy (name, namestring, name_len);
 		    name[name_len] = '\0';
@@ -2846,7 +2839,7 @@ scan_xcoff_symtab (struct objfile *objfi
 		add_psymbol_to_list (namestring, p - namestring, 1,
 				     VAR_DOMAIN, LOC_BLOCK,
 				     &objfile->global_psymbols,
-				     0, symbol.n_value,
+				     symbol.n_value,
 				     psymtab_language, objfile);
 		continue;
 
@@ -2935,7 +2928,7 @@ xcoff_get_toc_offset (struct objfile *ob
    loaded).  */
 
 static void
-xcoff_initial_scan (struct objfile *objfile, int symfile_flags)
+xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags)
 {
   bfd *abfd;
   int val;
@@ -2977,7 +2970,9 @@ xcoff_initial_scan (struct objfile *objf
 	    length = bfd_section_size (abfd, secp);
 	    if (length)
 	      {
-		debugsec = obstack_alloc (&objfile->objfile_obstack, length);
+		debugsec
+		  = (bfd_byte *) obstack_alloc (&objfile->objfile_obstack,
+						length);
 
 		if (!bfd_get_full_section_contents (abfd, secp, &debugsec))
 		  {
@@ -2997,7 +2992,7 @@ xcoff_initial_scan (struct objfile *objf
     error (_("Error reading symbols from %s: %s"),
 	   name, bfd_errmsg (bfd_get_error ()));
   size = coff_data (abfd)->local_symesz * num_symbols;
-  info->symtbl = obstack_alloc (&objfile->objfile_obstack, size);
+  info->symtbl = (char *) obstack_alloc (&objfile->objfile_obstack, size);
   info->symtbl_num_syms = num_symbols;
 
   val = bfd_bread (info->symtbl, size, abfd);
@@ -3015,18 +3010,17 @@ xcoff_initial_scan (struct objfile *objf
   free_pending_blocks ();
   back_to = make_cleanup (really_free_pendings, 0);
 
-  init_minimal_symbol_collection ();
-  make_cleanup_discard_minimal_symbols ();
+  minimal_symbol_reader reader (objfile);
 
   /* Now that the symbol table data of the executable file are all in core,
      process them and define symbols accordingly.  */
 
-  scan_xcoff_symtab (objfile);
+  scan_xcoff_symtab (reader, objfile);
 
   /* Install any minimal symbols that have been collected as the current
      minimal symbols for this objfile.  */
 
-  install_minimal_symbols (objfile);
+  reader.install ();
 
   /* DWARF2 sections.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xcoffread.h ./gdb/xcoffread.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xcoffread.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xcoffread.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Read AIX xcoff symbol tables and convert to internal format, for GDB.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-support.c ./gdb/xml-support.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-support.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-support.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Helper routines for parsing XML using Expat.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -83,7 +83,7 @@ struct gdb_xml_parser
 static void
 gdb_xml_body_text (void *data, const XML_Char *text, int length)
 {
-  struct gdb_xml_parser *parser = data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
   struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
 
   if (parser->error.reason < 0)
@@ -156,7 +156,7 @@ xml_find_attribute (VEC(gdb_xml_value_s)
 static void
 gdb_xml_values_cleanup (void *data)
 {
-  VEC(gdb_xml_value_s) **values = data;
+  VEC(gdb_xml_value_s) **values = (VEC(gdb_xml_value_s) **) data;
   struct gdb_xml_value *value;
   int ix;
 
@@ -173,7 +173,7 @@ static void
 gdb_xml_start_element (void *data, const XML_Char *name,
 		       const XML_Char **attrs)
 {
-  struct gdb_xml_parser *parser = data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
   struct scope_level *scope;
   struct scope_level new_scope;
   const struct gdb_xml_element *element;
@@ -312,7 +312,7 @@ static void
 gdb_xml_start_element_wrapper (void *data, const XML_Char *name,
 			       const XML_Char **attrs)
 {
-  struct gdb_xml_parser *parser = data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
 
   if (parser->error.reason < 0)
     return;
@@ -337,7 +337,7 @@ gdb_xml_start_element_wrapper (void *dat
 static void
 gdb_xml_end_element (void *data, const XML_Char *name)
 {
-  struct gdb_xml_parser *parser = data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
   struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
   const struct gdb_xml_element *element;
   unsigned int seen;
@@ -365,7 +365,7 @@ gdb_xml_end_element (void *data, const X
 
 	  length = obstack_object_size (scope->body);
 	  obstack_1grow (scope->body, '\0');
-	  body = obstack_finish (scope->body);
+	  body = (char *) obstack_finish (scope->body);
 
 	  /* Strip leading and trailing whitespace.  */
 	  while (length > 0 && ISSPACE (body[length-1]))
@@ -395,7 +395,7 @@ gdb_xml_end_element (void *data, const X
 static void
 gdb_xml_end_element_wrapper (void *data, const XML_Char *name)
 {
-  struct gdb_xml_parser *parser = data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
 
   if (parser->error.reason < 0)
     return;
@@ -419,7 +419,7 @@ gdb_xml_end_element_wrapper (void *data,
 static void
 gdb_xml_cleanup (void *arg)
 {
-  struct gdb_xml_parser *parser = arg;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) arg;
   struct scope_level *scope;
   int ix;
 
@@ -489,7 +489,8 @@ gdb_xml_fetch_external_entity (XML_Parse
 			       const XML_Char *systemId,
 			       const XML_Char *publicId)
 {
-  struct gdb_xml_parser *parser = XML_GetUserData (expat_parser);
+  struct gdb_xml_parser *parser
+    = (struct gdb_xml_parser *) XML_GetUserData (expat_parser);
   XML_Parser entity_parser;
   const char *text;
   enum XML_Status status;
@@ -666,7 +667,7 @@ gdb_xml_parse_attr_ulongest (struct gdb_
     gdb_xml_error (parser, _("Can't convert %s=\"%s\" to an integer"),
 		   attribute->name, value);
 
-  ret = xmalloc (sizeof (result));
+  ret = XNEW (ULONGEST);
   memcpy (ret, &result, sizeof (result));
   return ret;
 }
@@ -689,10 +690,12 @@ gdb_xml_parse_attr_enum (struct gdb_xml_
 			 const struct gdb_xml_attribute *attribute,
 			 const char *value)
 {
-  const struct gdb_xml_enum *enums = attribute->handler_data;
+  const struct gdb_xml_enum *enums
+    = (const struct gdb_xml_enum *) attribute->handler_data;
   void *ret;
 
-  for (enums = attribute->handler_data; enums->name != NULL; enums++)
+  for (enums = (const struct gdb_xml_enum *) attribute->handler_data;
+       enums->name != NULL; enums++)
     if (strcasecmp (enums->name, value) == 0)
       break;
 
@@ -754,8 +757,9 @@ xinclude_start_include (struct gdb_xml_p
 			const struct gdb_xml_element *element,
 			void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct xinclude_parsing_data *data = user_data;
-  char *href = xml_find_attribute (attributes, "href")->value;
+  struct xinclude_parsing_data *data
+    = (struct xinclude_parsing_data *) user_data;
+  char *href = (char *) xml_find_attribute (attributes, "href")->value;
   struct cleanup *back_to;
   char *text, *output;
 
@@ -789,7 +793,8 @@ xinclude_end_include (struct gdb_xml_par
 		      const struct gdb_xml_element *element,
 		      void *user_data, const char *body_text)
 {
-  struct xinclude_parsing_data *data = user_data;
+  struct xinclude_parsing_data *data
+    = (struct xinclude_parsing_data *) user_data;
 
   data->skip_depth--;
 }
@@ -797,8 +802,9 @@ xinclude_end_include (struct gdb_xml_par
 static void XMLCALL
 xml_xinclude_default (void *data_, const XML_Char *s, int len)
 {
-  struct gdb_xml_parser *parser = data_;
-  struct xinclude_parsing_data *data = parser->user_data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+  struct xinclude_parsing_data *data
+    = (struct xinclude_parsing_data *) parser->user_data;
 
   /* If we are inside of e.g. xi:include or the DTD, don't save this
      string.  */
@@ -815,8 +821,9 @@ xml_xinclude_start_doctype (void *data_,
 			    const XML_Char *sysid, const XML_Char *pubid,
 			    int has_internal_subset)
 {
-  struct gdb_xml_parser *parser = data_;
-  struct xinclude_parsing_data *data = parser->user_data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+  struct xinclude_parsing_data *data
+    = (struct xinclude_parsing_data *) parser->user_data;
 
   /* Don't print out the doctype, or the contents of the DTD internal
      subset, if any.  */
@@ -826,8 +833,9 @@ xml_xinclude_start_doctype (void *data_,
 static void XMLCALL
 xml_xinclude_end_doctype (void *data_)
 {
-  struct gdb_xml_parser *parser = data_;
-  struct xinclude_parsing_data *data = parser->user_data;
+  struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+  struct xinclude_parsing_data *data
+    = (struct xinclude_parsing_data *) parser->user_data;
 
   data->skip_depth--;
 }
@@ -844,7 +852,7 @@ xml_xinclude_xml_decl (void *data_, cons
 static void
 xml_xinclude_cleanup (void *data_)
 {
-  struct xinclude_parsing_data *data = data_;
+  struct xinclude_parsing_data *data = (struct xinclude_parsing_data *) data_;
 
   obstack_free (&data->obstack, NULL);
   xfree (data);
@@ -905,7 +913,7 @@ xml_process_xincludes (const char *name,
   if (gdb_xml_parse (parser, text) == 0)
     {
       obstack_1grow (&data->obstack, '\0');
-      result = xstrdup (obstack_finish (&data->obstack));
+      result = xstrdup ((const char *) obstack_finish (&data->obstack));
 
       if (depth == 0)
 	gdb_xml_debug (parser, _("XInclude processing succeeded."));
@@ -1015,7 +1023,7 @@ obstack_xml_printf (struct obstack *obst
 char *
 xml_fetch_content_from_file (const char *filename, void *baton)
 {
-  const char *dirname = baton;
+  const char *dirname = (const char *) baton;
   FILE *file;
   struct cleanup *back_to;
   char *text;
@@ -1041,7 +1049,7 @@ xml_fetch_content_from_file (const char 
   /* Read in the whole file, one chunk at a time.  */
   len = 4096;
   offset = 0;
-  text = xmalloc (len);
+  text = (char *) xmalloc (len);
   make_cleanup (free_current_contents, &text);
   while (1)
     {
@@ -1063,7 +1071,7 @@ xml_fetch_content_from_file (const char 
 	break;
 
       len = len * 2;
-      text = xrealloc (text, len);
+      text = (char *) xrealloc (text, len);
     }
 
   fclose (file);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-support.h ./gdb/xml-support.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-support.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-support.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Helper routines for parsing XML using Expat.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-syscall.c ./gdb/xml-syscall.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-syscall.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-syscall.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* Functions that provide the mechanism to parse a syscall XML file
    and get its values.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -77,6 +77,20 @@ get_syscall_names (struct gdbarch *gdbar
   return NULL;
 }
 
+struct syscall *
+get_syscalls_by_group (struct gdbarch *gdbarch, const char *group)
+{
+  syscall_warn_user ();
+  return NULL;
+}
+
+const char **
+get_syscall_group_names (struct gdbarch *gdbarch)
+{
+  syscall_warn_user ();
+  return NULL;
+}
+
 #else /* ! HAVE_LIBEXPAT */
 
 /* Structure which describes a syscall.  */
@@ -92,6 +106,19 @@ typedef struct syscall_desc
 } *syscall_desc_p;
 DEF_VEC_P(syscall_desc_p);
 
+/* Structure of a syscall group.  */
+typedef struct syscall_group_desc
+{
+  /* The group name.  */
+
+  char *name;
+
+  /* The syscalls that are part of the group.  */
+
+  VEC(syscall_desc_p) *syscalls;
+} *syscall_group_desc_p;
+DEF_VEC_P(syscall_group_desc_p);
+
 /* Structure that represents syscalls information.  */
 struct syscalls_info
 {
@@ -99,6 +126,10 @@ struct syscalls_info
 
   VEC(syscall_desc_p) *syscalls;
 
+  /* The syscall groups.  */
+
+  VEC(syscall_group_desc_p) *groups;
+
   /* Variable that will hold the last known data-directory.  This is
      useful to know whether we should re-read the XML info for the
      target.  */
@@ -126,11 +157,21 @@ syscalls_info_free_syscalls_desc (struct
   xfree (sd->name);
 }
 
+/* Free syscall_group_desc members but not the structure itself.  */
+
+static void
+syscalls_info_free_syscall_group_desc (struct syscall_group_desc *sd)
+{
+  VEC_free (syscall_desc_p, sd->syscalls);
+  xfree (sd->name);
+}
+
 static void
 free_syscalls_info (void *arg)
 {
-  struct syscalls_info *syscalls_info = arg;
+  struct syscalls_info *syscalls_info = (struct syscalls_info *) arg;
   struct syscall_desc *sysdesc;
+  struct syscall_group_desc *groupdesc;
   int i;
 
   xfree (syscalls_info->my_gdb_datadir);
@@ -144,6 +185,17 @@ free_syscalls_info (void *arg)
       VEC_free (syscall_desc_p, syscalls_info->syscalls);
     }
 
+  if (syscalls_info->groups != NULL)
+    {
+      for (i = 0;
+	   VEC_iterate (syscall_group_desc_p,
+			syscalls_info->groups, i, groupdesc);
+	   i++)
+	syscalls_info_free_syscall_group_desc (groupdesc);
+
+      VEC_free (syscall_group_desc_p, syscalls_info->groups);
+    }
+
   xfree (syscalls_info);
 }
 
@@ -153,16 +205,73 @@ make_cleanup_free_syscalls_info (struct 
   return make_cleanup (free_syscalls_info, syscalls_info);
 }
 
+/* Create a new syscall group.  Return pointer to the
+   syscall_group_desc structure that represents the new group.  */
+
+static struct syscall_group_desc *
+syscall_group_create_syscall_group_desc (struct syscalls_info *syscalls_info,
+					 const char *group)
+{
+  struct syscall_group_desc *groupdesc = XCNEW (struct syscall_group_desc);
+
+  groupdesc->name = xstrdup (group);
+
+  VEC_safe_push (syscall_group_desc_p, syscalls_info->groups, groupdesc);
+
+  return groupdesc;
+}
+
+/* Add a syscall to the group.  If group doesn't exist, create it.  */
+
+static void
+syscall_group_add_syscall (struct syscalls_info *syscalls_info,
+			   struct syscall_desc *syscall,
+			   const char *group)
+{
+  struct syscall_group_desc *groupdesc = NULL;
+  int i;
+
+  /* Search for an existing group.  */
+  for (i = 0;
+       VEC_iterate (syscall_group_desc_p, syscalls_info->groups, i, groupdesc);
+       i++)
+    {
+      if (strcmp (groupdesc->name, group) == 0)
+	break;
+    }
+
+  if (groupdesc == NULL)
+    {
+      /* No group was found with this name.  We must create a new
+	 one.  */
+      groupdesc = syscall_group_create_syscall_group_desc (syscalls_info,
+							   group);
+    }
+
+  VEC_safe_push (syscall_desc_p, groupdesc->syscalls, syscall);
+}
+
 static void
 syscall_create_syscall_desc (struct syscalls_info *syscalls_info,
-                             const char *name, int number)
+			     const char *name, int number,
+			     char *groups)
 {
   struct syscall_desc *sysdesc = XCNEW (struct syscall_desc);
+  char *group;
 
   sysdesc->name = xstrdup (name);
   sysdesc->number = number;
 
   VEC_safe_push (syscall_desc_p, syscalls_info->syscalls, sysdesc);
+
+  /*  Add syscall to its groups.  */
+  if (groups != NULL)
+    {
+      for (group = strtok (groups, ",");
+	   group != NULL;
+	   group = strtok (NULL, ","))
+	syscall_group_add_syscall (syscalls_info, sysdesc, group);
+    }
 }
 
 /* Handle the start of a <syscall> element.  */
@@ -171,28 +280,31 @@ syscall_start_syscall (struct gdb_xml_pa
                        const struct gdb_xml_element *element,
                        void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct syscall_parsing_data *data = user_data;
+  struct syscall_parsing_data *data = (struct syscall_parsing_data *) user_data;
   struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
   int len, i;
   /* syscall info.  */
   char *name = NULL;
   int number = 0;
+  char *groups = NULL;
 
   len = VEC_length (gdb_xml_value_s, attributes);
 
   for (i = 0; i < len; i++)
     {
       if (strcmp (attrs[i].name, "name") == 0)
-        name = attrs[i].value;
+        name = (char *) attrs[i].value;
       else if (strcmp (attrs[i].name, "number") == 0)
         number = * (ULONGEST *) attrs[i].value;
+      else if (strcmp (attrs[i].name, "groups") == 0)
+        groups = (char *) attrs[i].value;
       else
         internal_error (__FILE__, __LINE__,
                         _("Unknown attribute name '%s'."), attrs[i].name);
     }
 
   gdb_assert (name);
-  syscall_create_syscall_desc (data->syscalls_info, name, number);
+  syscall_create_syscall_desc (data->syscalls_info, name, number, groups);
 }
 
 
@@ -200,6 +312,7 @@ syscall_start_syscall (struct gdb_xml_pa
 static const struct gdb_xml_attribute syscall_attr[] = {
   { "number", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
   { "name", GDB_XML_AF_NONE, NULL, NULL },
+  { "groups", GDB_XML_AF_OPTIONAL, NULL, NULL },
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
@@ -321,6 +434,34 @@ init_syscalls_info (struct gdbarch *gdba
   set_gdbarch_syscalls_info (gdbarch, syscalls_info);
 }
 
+/* Search for a syscall group by its name.  Return syscall_group_desc
+   structure for the group if found or NULL otherwise.  */
+
+static struct syscall_group_desc *
+syscall_group_get_group_by_name (const struct syscalls_info *syscalls_info,
+				 const char *group)
+{
+  struct syscall_group_desc *groupdesc;
+  int i;
+
+  if (syscalls_info == NULL)
+    return NULL;
+
+  if (group == NULL)
+    return NULL;
+
+   /* Search for existing group.  */
+  for (i = 0;
+       VEC_iterate (syscall_group_desc_p, syscalls_info->groups, i, groupdesc);
+       i++)
+    {
+      if (strcmp (groupdesc->name, group) == 0)
+	return groupdesc;
+    }
+
+  return NULL;
+}
+
 static int
 xml_get_syscall_number (struct gdbarch *gdbarch,
                         const char *syscall_name)
@@ -376,7 +517,7 @@ xml_list_of_syscalls (struct gdbarch *gd
     return NULL;
 
   nsyscalls = VEC_length (syscall_desc_p, syscalls_info->syscalls);
-  names = xmalloc ((nsyscalls + 1) * sizeof (char *));
+  names = XNEWVEC (const char *, nsyscalls + 1);
 
   for (i = 0;
        VEC_iterate (syscall_desc_p, syscalls_info->syscalls, i, sysdesc);
@@ -388,6 +529,75 @@ xml_list_of_syscalls (struct gdbarch *gd
   return names;
 }
 
+/* Iterate over the syscall_group_desc element to return a list of
+   syscalls that are part of the given group, terminated by an empty
+   element.  If the syscall group doesn't exist, return NULL.  */
+
+static struct syscall *
+xml_list_syscalls_by_group (struct gdbarch *gdbarch, const char *group)
+{
+  struct syscalls_info *syscalls_info = gdbarch_syscalls_info (gdbarch);
+  struct syscall_group_desc *groupdesc;
+  struct syscall_desc *sysdesc;
+  struct syscall *syscalls = NULL;
+  int nsyscalls;
+  int i;
+
+  if (syscalls_info == NULL)
+    return NULL;
+
+  groupdesc = syscall_group_get_group_by_name (syscalls_info, group);
+  if (groupdesc == NULL)
+    return NULL;
+
+  nsyscalls = VEC_length (syscall_desc_p, groupdesc->syscalls);
+  syscalls = (struct syscall*) xmalloc ((nsyscalls + 1)
+					* sizeof (struct syscall));
+
+  for (i = 0;
+       VEC_iterate (syscall_desc_p, groupdesc->syscalls, i, sysdesc);
+       i++)
+    {
+      syscalls[i].name = sysdesc->name;
+      syscalls[i].number = sysdesc->number;
+    }
+
+  /* Add final element marker.  */
+  syscalls[i].name = NULL;
+  syscalls[i].number = 0;
+
+  return syscalls;
+}
+
+/* Return a NULL terminated list of syscall groups or an empty list, if
+   no syscall group is available.  Return NULL, if there is no syscall
+   information available.  */
+
+static const char **
+xml_list_of_groups (struct gdbarch *gdbarch)
+{
+  struct syscalls_info *syscalls_info = gdbarch_syscalls_info (gdbarch);
+  struct syscall_group_desc *groupdesc;
+  const char **names = NULL;
+  int i;
+  int ngroups;
+
+  if (syscalls_info == NULL)
+    return NULL;
+
+  ngroups = VEC_length (syscall_group_desc_p, syscalls_info->groups);
+  names = (const char**) xmalloc ((ngroups + 1) * sizeof (char *));
+
+  for (i = 0;
+       VEC_iterate (syscall_group_desc_p, syscalls_info->groups, i, groupdesc);
+       i++)
+    names[i] = groupdesc->name;
+
+  names[i] = NULL;
+
+  return names;
+}
+
 void
 set_xml_syscall_file_name (struct gdbarch *gdbarch, const char *name)
 {
@@ -422,4 +632,24 @@ get_syscall_names (struct gdbarch *gdbar
   return xml_list_of_syscalls (gdbarch);
 }
 
+/* See comment in xml-syscall.h.  */
+
+struct syscall *
+get_syscalls_by_group (struct gdbarch *gdbarch, const char *group)
+{
+  init_syscalls_info (gdbarch);
+
+  return xml_list_syscalls_by_group (gdbarch, group);
+}
+
+/* See comment in xml-syscall.h.  */
+
+const char **
+get_syscall_group_names (struct gdbarch *gdbarch)
+{
+  init_syscalls_info (gdbarch);
+
+  return xml_list_of_groups (gdbarch);
+}
+
 #endif /* ! HAVE_LIBEXPAT */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-syscall.h ./gdb/xml-syscall.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-syscall.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-syscall.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* Functions that provide the mechanism to parse a syscall XML file
    and get its values.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,4 +50,20 @@ void get_syscall_by_name (struct gdbarch
 
 const char **get_syscall_names (struct gdbarch *gdbarch);
 
+/* Function used to retrieve the list of syscalls of a given group in
+   the system.  Return a list of syscalls that are element of the
+   group, terminated by an empty element. The list is malloc'ed
+   and must be freed by the caller.  If group doesn't exist, return
+   NULL.  */
+
+struct syscall *get_syscalls_by_group (struct gdbarch *gdbarch,
+				       const char *group);
+
+/* Function used to retrieve the list of syscall groups in the system.
+   Return an array of strings terminated by a NULL element.  The list
+   must be freed by the caller.  Return NULL if there is no syscall
+   information available.  */
+
+const char **get_syscall_group_names (struct gdbarch *gdbarch);
+
 #endif /* XML_SYSCALL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-tdesc.c ./gdb/xml-tdesc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-tdesc.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-tdesc.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* XML target description support for GDB.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -25,9 +25,14 @@
 #include "xml-support.h"
 #include "xml-tdesc.h"
 #include "osabi.h"
-
 #include "filenames.h"
 
+/* Maximum sizes.
+   This is just to catch obviously wrong values.  */
+#define MAX_FIELD_SIZE 65536
+#define MAX_FIELD_BITSIZE (MAX_FIELD_SIZE * TARGET_CHAR_BIT)
+#define MAX_VECTOR_SIZE 65536
+
 #if !defined(HAVE_LIBEXPAT)
 
 /* Parse DOCUMENT into a target description.  Or don't, since we don't have
@@ -86,12 +91,9 @@ struct tdesc_parsing_data
   /* The struct or union we are currently parsing, or last parsed.  */
   struct tdesc_type *current_type;
 
-  /* The byte size of the current struct type, if specified.  Zero
-     if not specified.  */
+  /* The byte size of the current struct/flags type, if specified.  Zero
+     if not specified.  Flags values must specify a size.  */
   int current_type_size;
-
-  /* Whether the current type is a flags type.  */
-  int current_type_is_flags;
 };
 
 /* Handle the end of an <architecture> element and its value.  */
@@ -101,7 +103,7 @@ tdesc_end_arch (struct gdb_xml_parser *p
 		const struct gdb_xml_element *element,
 		void *user_data, const char *body_text)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   const struct bfd_arch_info *arch;
 
   arch = bfd_scan_arch (body_text);
@@ -118,7 +120,7 @@ tdesc_end_osabi (struct gdb_xml_parser *
 		 const struct gdb_xml_element *element,
 		 void *user_data, const char *body_text)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   enum gdb_osabi osabi;
 
   osabi = osabi_from_tdesc_string (body_text);
@@ -136,7 +138,7 @@ tdesc_end_compatible (struct gdb_xml_par
 		      const struct gdb_xml_element *element,
 		      void *user_data, const char *body_text)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   const struct bfd_arch_info *arch;
 
   arch = bfd_scan_arch (body_text);
@@ -150,7 +152,7 @@ tdesc_start_target (struct gdb_xml_parse
 		    const struct gdb_xml_element *element,
 		    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  char *version = xml_find_attribute (attributes, "version")->value;
+  char *version = (char *) xml_find_attribute (attributes, "version")->value;
 
   if (strcmp (version, "1.0") != 0)
     gdb_xml_error (parser,
@@ -165,8 +167,8 @@ tdesc_start_feature (struct gdb_xml_pars
 		     const struct gdb_xml_element *element,
 		     void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
-  char *name = xml_find_attribute (attributes, "name")->value;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  char *name = (char *) xml_find_attribute (attributes, "name")->value;
 
   data->current_feature = tdesc_create_feature (data->tdesc, name);
 }
@@ -179,7 +181,7 @@ tdesc_start_reg (struct gdb_xml_parser *
 		 const struct gdb_xml_element *element,
 		 void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
   int ix = 0, length;
   char *name, *group, *type;
@@ -187,7 +189,7 @@ tdesc_start_reg (struct gdb_xml_parser *
 
   length = VEC_length (gdb_xml_value_s, attributes);
 
-  name = attrs[ix++].value;
+  name = (char *) attrs[ix++].value;
   bitsize = * (ULONGEST *) attrs[ix++].value;
 
   if (ix < length && strcmp (attrs[ix].name, "regnum") == 0)
@@ -196,12 +198,12 @@ tdesc_start_reg (struct gdb_xml_parser *
     regnum = data->next_regnum;
 
   if (ix < length && strcmp (attrs[ix].name, "type") == 0)
-    type = attrs[ix++].value;
+    type = (char *) attrs[ix++].value;
   else
     type = "int";
 
   if (ix < length && strcmp (attrs[ix].name, "group") == 0)
-    group = attrs[ix++].value;
+    group = (char *) attrs[ix++].value;
   else
     group = NULL;
 
@@ -230,12 +232,11 @@ tdesc_start_union (struct gdb_xml_parser
 		   const struct gdb_xml_element *element,
 		   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
-  char *id = xml_find_attribute (attributes, "id")->value;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  char *id = (char *) xml_find_attribute (attributes, "id")->value;
 
   data->current_type = tdesc_create_union (data->current_feature, id);
   data->current_type_size = 0;
-  data->current_type_is_flags = 0;
 }
 
 /* Handle the start of a <struct> element.  Initialize the type and
@@ -246,21 +247,26 @@ tdesc_start_struct (struct gdb_xml_parse
 		   const struct gdb_xml_element *element,
 		   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
-  char *id = xml_find_attribute (attributes, "id")->value;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  char *id = (char *) xml_find_attribute (attributes, "id")->value;
   struct tdesc_type *type;
   struct gdb_xml_value *attr;
 
   type = tdesc_create_struct (data->current_feature, id);
   data->current_type = type;
   data->current_type_size = 0;
-  data->current_type_is_flags = 0;
 
   attr = xml_find_attribute (attributes, "size");
   if (attr != NULL)
     {
-      int size = (int) * (ULONGEST *) attr->value;
+      ULONGEST size = * (ULONGEST *) attr->value;
 
+      if (size > MAX_FIELD_SIZE)
+	{
+	  gdb_xml_error (parser,
+			 _("Struct size %s is larger than maximum (%d)"),
+			 pulongest (size), MAX_FIELD_SIZE);
+	}
       tdesc_set_struct_size (type, size);
       data->current_type_size = size;
     }
@@ -271,65 +277,164 @@ tdesc_start_flags (struct gdb_xml_parser
 		   const struct gdb_xml_element *element,
 		   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
-  char *id = xml_find_attribute (attributes, "id")->value;
-  int length = (int) * (ULONGEST *)
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  char *id = (char *) xml_find_attribute (attributes, "id")->value;
+  ULONGEST size = * (ULONGEST *)
+    xml_find_attribute (attributes, "size")->value;
+  struct tdesc_type *type;
+
+  if (size > MAX_FIELD_SIZE)
+    {
+      gdb_xml_error (parser,
+		     _("Flags size %s is larger than maximum (%d)"),
+		     pulongest (size), MAX_FIELD_SIZE);
+    }
+  type = tdesc_create_flags (data->current_feature, id, size);
+
+  data->current_type = type;
+  data->current_type_size = size;
+}
+
+static void
+tdesc_start_enum (struct gdb_xml_parser *parser,
+		  const struct gdb_xml_element *element,
+		  void *user_data, VEC(gdb_xml_value_s) *attributes)
+{
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  char *id = (char *) xml_find_attribute (attributes, "id")->value;
+  int size = * (ULONGEST *)
     xml_find_attribute (attributes, "size")->value;
   struct tdesc_type *type;
 
-  type = tdesc_create_flags (data->current_feature, id, length);
+  if (size > MAX_FIELD_SIZE)
+    {
+      gdb_xml_error (parser,
+		     _("Enum size %s is larger than maximum (%d)"),
+		     pulongest (size), MAX_FIELD_SIZE);
+    }
+  type = tdesc_create_enum (data->current_feature, id, size);
 
   data->current_type = type;
   data->current_type_size = 0;
-  data->current_type_is_flags = 1;
 }
 
 /* Handle the start of a <field> element.  Attach the field to the
-   current struct or union.  */
+   current struct, union or flags.  */
 
 static void
 tdesc_start_field (struct gdb_xml_parser *parser,
 		   const struct gdb_xml_element *element,
 		   void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   struct gdb_xml_value *attr;
   struct tdesc_type *field_type;
   char *field_name, *field_type_id;
   int start, end;
 
-  field_name = xml_find_attribute (attributes, "name")->value;
+  field_name = (char *) xml_find_attribute (attributes, "name")->value;
 
   attr = xml_find_attribute (attributes, "type");
   if (attr != NULL)
-    field_type_id = attr->value;
+    {
+      field_type_id = (char *) attr->value;
+      field_type = tdesc_named_type (data->current_feature, field_type_id);
+    }
   else
-    field_type_id = NULL;
+    {
+      field_type_id = NULL;
+      field_type = NULL;
+    }
 
   attr = xml_find_attribute (attributes, "start");
   if (attr != NULL)
-    start = * (ULONGEST *) attr->value;
+    {
+      ULONGEST ul_start = * (ULONGEST *) attr->value;
+
+      if (ul_start > MAX_FIELD_BITSIZE)
+	{
+	  gdb_xml_error (parser,
+			 _("Field start %s is larger than maximum (%d)"),
+			 pulongest (ul_start), MAX_FIELD_BITSIZE);
+	}
+      start = ul_start;
+    }
   else
     start = -1;
 
   attr = xml_find_attribute (attributes, "end");
   if (attr != NULL)
-    end = * (ULONGEST *) attr->value;
+    {
+      ULONGEST ul_end = * (ULONGEST *) attr->value;
+
+      if (ul_end > MAX_FIELD_BITSIZE)
+	{
+	  gdb_xml_error (parser,
+			 _("Field end %s is larger than maximum (%d)"),
+			 pulongest (ul_end), MAX_FIELD_BITSIZE);
+	}
+      end = ul_end;
+    }
   else
     end = -1;
 
-  if (field_type_id != NULL)
+  if (start != -1)
     {
-      if (data->current_type_is_flags)
-	gdb_xml_error (parser, _("Cannot add typed field \"%s\" to flags"), 
+      struct tdesc_type *t = data->current_type;
+
+      /* Older versions of gdb can't handle elided end values.
+         Stick with that for now, to help ensure backward compatibility.
+	 E.g., If a newer gdbserver is talking to an older gdb.  */
+      if (end == -1)
+	gdb_xml_error (parser, _("Missing end value"));
+
+      if (data->current_type_size == 0)
+	gdb_xml_error (parser,
+		       _("Bitfields must live in explicitly sized types"));
+
+      if (field_type_id != NULL
+	  && strcmp (field_type_id, "bool") == 0
+	  && start != end)
+	{
+	  gdb_xml_error (parser,
+			 _("Boolean fields must be one bit in size"));
+	}
+
+      if (end >= 64)
+	gdb_xml_error (parser,
+		       _("Bitfield \"%s\" goes past "
+			 "64 bits (unsupported)"),
 		       field_name);
+
+      /* Assume that the bit numbering in XML is "lsb-zero".  Most
+	 architectures other than PowerPC use this ordering.  In the
+	 future, we can add an XML tag to indicate "msb-zero" numbering.  */
+      if (start > end)
+	gdb_xml_error (parser, _("Bitfield \"%s\" has start after end"),
+		       field_name);
+      if (end >= data->current_type_size * TARGET_CHAR_BIT)
+	gdb_xml_error (parser,
+		       _("Bitfield \"%s\" does not fit in struct"));
+
+      if (field_type != NULL)
+	tdesc_add_typed_bitfield (t, field_name, start, end, field_type);
+      else if (start == end)
+	tdesc_add_flag (t, start, field_name);
+      else
+	tdesc_add_bitfield (t, field_name, start, end);
+    }
+  else if (start == -1 && end != -1)
+    gdb_xml_error (parser, _("End specified but not start"));
+  else if (field_type_id != NULL)
+    {
+      /* TDESC_TYPE_FLAGS values are explicitly sized, so the following test
+	 catches adding non-bitfield types to flags as well.  */
       if (data->current_type_size != 0)
 	gdb_xml_error (parser,
-		       _("Explicitly sized type can not "
-			 "contain non-bitfield \"%s\""), 
+		       _("Explicitly sized type cannot "
+			 "contain non-bitfield \"%s\""),
 		       field_name);
 
-      field_type = tdesc_named_type (data->current_feature, field_type_id);
       if (field_type == NULL)
 	gdb_xml_error (parser, _("Field \"%s\" references undefined "
 				 "type \"%s\""),
@@ -337,46 +442,40 @@ tdesc_start_field (struct gdb_xml_parser
 
       tdesc_add_field (data->current_type, field_name, field_type);
     }
-  else if (start != -1 && end != -1)
-    {
-      struct tdesc_type *t = data->current_type;
-
-      if (data->current_type_is_flags)
-	tdesc_add_flag (t, start, field_name);
-      else
-	{
-	  if (data->current_type_size == 0)
-	    gdb_xml_error (parser,
-			   _("Implicitly sized type can "
-			     "not contain bitfield \"%s\""), 
-			   field_name);
-
-	  if (end >= 64)
-	    gdb_xml_error (parser,
-			   _("Bitfield \"%s\" goes past "
-			     "64 bits (unsupported)"),
-			   field_name);
-
-	  /* Assume that the bit numbering in XML is "lsb-zero".  Most
-	     architectures other than PowerPC use this ordering.  In
-	     the future, we can add an XML tag to indicate "msb-zero"
-	     numbering.  */
-	  if (start > end)
-	    gdb_xml_error (parser, _("Bitfield \"%s\" has start after end"),
-			   field_name);
-
-	  if (end >= data->current_type_size * TARGET_CHAR_BIT)
-	    gdb_xml_error (parser,
-			   _("Bitfield \"%s\" does not fit in struct"));
-
-	  tdesc_add_bitfield (t, field_name, start, end);
-	}
-    }
   else
     gdb_xml_error (parser, _("Field \"%s\" has neither type nor bit position"),
 		   field_name);
 }
 
+/* Handle the start of an <evalue> element.  Attach the value to the
+   current enum.  */
+
+static void
+tdesc_start_enum_value (struct gdb_xml_parser *parser,
+			const struct gdb_xml_element *element,
+			void *user_data, VEC(gdb_xml_value_s) *attributes)
+{
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+  struct gdb_xml_value *attr;
+  char *field_name;
+  ULONGEST ul_value;
+  int value;
+
+  field_name = (char *) xml_find_attribute (attributes, "name")->value;
+
+  attr = xml_find_attribute (attributes, "value");
+  ul_value = * (ULONGEST *) attr->value;
+  if (ul_value > INT_MAX)
+    {
+      gdb_xml_error (parser,
+		     _("Enum value %s is larger than maximum (%d)"),
+		     pulongest (ul_value), INT_MAX);
+    }
+  value = ul_value;
+
+  tdesc_add_enum_value (data->current_type, value, field_name);
+}
+
 /* Handle the start of a <vector> element.  Initialize the type and
    record it with the current feature.  */
 
@@ -385,16 +484,23 @@ tdesc_start_vector (struct gdb_xml_parse
 		    const struct gdb_xml_element *element,
 		    void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct tdesc_parsing_data *data = user_data;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
   struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
   struct tdesc_type *field_type;
   char *id, *field_type_id;
-  int count;
+  ULONGEST count;
 
-  id = attrs[0].value;
-  field_type_id = attrs[1].value;
+  id = (char *) attrs[0].value;
+  field_type_id = (char *) attrs[1].value;
   count = * (ULONGEST *) attrs[2].value;
 
+  if (count > MAX_VECTOR_SIZE)
+    {
+      gdb_xml_error (parser,
+		     _("Vector size %s is larger than maximum (%d)"),
+		     pulongest (count), MAX_VECTOR_SIZE);
+    }
+
   field_type = tdesc_named_type (data->current_feature, field_type_id);
   if (field_type == NULL)
     gdb_xml_error (parser, _("Vector \"%s\" references undefined type \"%s\""),
@@ -413,12 +519,24 @@ static const struct gdb_xml_attribute fi
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
+static const struct gdb_xml_attribute enum_value_attributes[] = {
+  { "name", GDB_XML_AF_NONE, NULL, NULL },
+  { "value", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_ulongest, NULL },
+  { NULL, GDB_XML_AF_NONE, NULL, NULL }
+};
+
 static const struct gdb_xml_element struct_union_children[] = {
   { "field", field_attributes, NULL, GDB_XML_EF_REPEATABLE,
     tdesc_start_field, NULL },
   { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
 };
 
+static const struct gdb_xml_element enum_children[] = {
+  { "evalue", enum_value_attributes, NULL, GDB_XML_EF_REPEATABLE,
+    tdesc_start_enum_value, NULL },
+  { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
+};
+
 static const struct gdb_xml_attribute reg_attributes[] = {
   { "name", GDB_XML_AF_NONE, NULL, NULL },
   { "bitsize", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
@@ -442,6 +560,12 @@ static const struct gdb_xml_attribute fl
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
+static const struct gdb_xml_attribute enum_attributes[] = {
+  { "id", GDB_XML_AF_NONE, NULL, NULL },
+  { "size", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL},
+  { NULL, GDB_XML_AF_NONE, NULL, NULL }
+};
+
 static const struct gdb_xml_attribute vector_attributes[] = {
   { "id", GDB_XML_AF_NONE, NULL, NULL },
   { "type", GDB_XML_AF_NONE, NULL, NULL },
@@ -467,6 +591,9 @@ static const struct gdb_xml_element feat
   { "flags", flags_attributes, struct_union_children,
     GDB_XML_EF_OPTIONAL | GDB_XML_EF_REPEATABLE,
     tdesc_start_flags, NULL },    
+  { "enum", enum_attributes, enum_children,
+    GDB_XML_EF_OPTIONAL | GDB_XML_EF_REPEATABLE,
+    tdesc_start_enum, NULL },
   { "vector", vector_attributes, NULL,
     GDB_XML_EF_OPTIONAL | GDB_XML_EF_REPEATABLE,
     tdesc_start_vector, NULL },
@@ -598,7 +725,7 @@ file_read_description_xml (const char *f
 static char *
 fetch_available_features_from_target (const char *name, void *baton_)
 {
-  struct target_ops *ops = baton_;
+  struct target_ops *ops = (struct target_ops *) baton_;
 
   /* Read this object as a string.  This ensures that a NUL
      terminator is added.  */
@@ -630,3 +757,46 @@ target_read_description_xml (struct targ
 
   return tdesc;
 }
+
+/* Fetches an XML target description using OPS,  processing
+   includes, but not parsing it.  Used to dump whole tdesc
+   as a single XML file.  */
+
+char *
+target_fetch_description_xml (struct target_ops *ops)
+{
+#if !defined(HAVE_LIBEXPAT)
+  static int have_warned;
+
+  if (!have_warned)
+    {
+      have_warned = 1;
+      warning (_("Can not fetch XML target description; XML support was "
+		 "disabled at compile time"));
+    }
+
+  return NULL;
+#else
+  struct target_desc *tdesc;
+  char *tdesc_str;
+  char *expanded_text;
+  struct cleanup *back_to;
+
+  tdesc_str = fetch_available_features_from_target ("target.xml", ops);
+  if (tdesc_str == NULL)
+    return NULL;
+
+  back_to = make_cleanup (xfree, tdesc_str);
+  expanded_text = xml_process_xincludes (_("target description"),
+					 tdesc_str,
+					 fetch_available_features_from_target, ops, 0);
+  do_cleanups (back_to);
+  if (expanded_text == NULL)
+    {
+      warning (_("Could not load XML target description; ignoring"));
+      return NULL;
+    }
+
+  return expanded_text;
+#endif
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-tdesc.h ./gdb/xml-tdesc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xml-tdesc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xml-tdesc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* XML target description support for GDB.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -31,3 +31,9 @@ const struct target_desc *file_read_desc
    parsed description.  */
 
 const struct target_desc *target_read_description_xml (struct target_ops *);
+
+/* Fetches an XML target description using OPS,  processing
+   includes, but not parsing it.  Used to dump whole tdesc
+   as a single XML file.  */
+
+char *target_fetch_description_xml (struct target_ops *ops);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xstormy16-tdep.c ./gdb/xstormy16-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xstormy16-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xstormy16-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -282,7 +282,7 @@ xstormy16_push_dummy_call (struct gdbarc
 
       typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
       slacklen = typelen & 1;
-      val = xmalloc (typelen + slacklen);
+      val = (gdb_byte *) xmalloc (typelen + slacklen);
       back_to = make_cleanup (xfree, val);
       memcpy (val, bytes, typelen);
       memset (val + typelen, 0, slacklen);
@@ -433,7 +433,7 @@ xstormy16_skip_prologue (struct gdbarch 
         return plg_end;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
       /* Don't use line number debug info for assembly source files.  */
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
 	{
@@ -506,14 +506,9 @@ xstormy16_stack_frame_destroyed_p (struc
   return 0;
 }
 
-static const unsigned char *
-xstormy16_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			      int *lenptr)
-{
-  static unsigned char breakpoint[] = { 0x06, 0x0 };
-  *lenptr = sizeof (breakpoint);
-  return breakpoint;
-}
+constexpr gdb_byte xstormy16_break_insn[] = { 0x06, 0x0 };
+
+typedef BP_MANIPULATION (xstormy16_break_insn) xstormy16_breakpoint;
 
 /* Given a pointer to a jump table entry, return the address
    of the function it jumps to.  Return 0 if not found.  */
@@ -678,7 +673,7 @@ xstormy16_frame_cache (struct frame_info
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct xstormy16_frame_cache *) *this_cache;
 
   cache = xstormy16_alloc_frame_cache ();
   *this_cache = cache;
@@ -843,7 +838,10 @@ xstormy16_gdbarch_init (struct gdbarch_i
 
   /* These values and methods are used when gdb calls a target function.  */
   set_gdbarch_push_dummy_call (gdbarch, xstormy16_push_dummy_call);
-  set_gdbarch_breakpoint_from_pc (gdbarch, xstormy16_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       xstormy16_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       xstormy16_breakpoint::bp_from_kind);
   set_gdbarch_return_value (gdbarch, xstormy16_return_value);
 
   set_gdbarch_skip_trampoline_code (gdbarch, xstormy16_skip_trampoline_code);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-config.c ./gdb/xtensa-config.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-config.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-config.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Configuration for the Xtensa architecture for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-linux-nat.c ./gdb/xtensa-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-linux-nat.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-linux-nat.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Xtensa GNU/Linux native support.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,27 +31,20 @@
 #include "gdb_wait.h"
 #include <fcntl.h>
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/ptrace.h>
 
 #include "gregset.h"
 #include "xtensa-tdep.h"
 
+/* Defines ps_err_e, struct ps_prochandle.  */
+#include "gdb_proc_service.h"
+
 /* Extended register set depends on hardware configs.
    Keeping these definitions separately allows to introduce
    hardware-specific overlays.  */
 #include "xtensa-xtregs.c"
 
-static int
-get_thread_id (ptid_t ptid)
-{
-  int tid = ptid_get_lwp (ptid);
-  if (0 == tid)
-    tid = ptid_get_pid (ptid);
-  return tid;
-}
-#define GET_THREAD_ID(PTID)	get_thread_id (PTID)
-
 void
 fill_gregset (const struct regcache *regcache,
 	      gdb_gregset_t *gregsetp, int regnum)
@@ -103,7 +96,7 @@ fill_gregset (const struct regcache *reg
     }
 }
 
-void
+static void
 supply_gregset_reg (struct regcache *regcache,
 		    const gdb_gregset_t *gregsetp, int regnum)
 {
@@ -181,7 +174,7 @@ supply_fpregset (struct regcache *regcac
 static void
 fetch_gregs (struct regcache *regcache, int regnum)
 {
-  int tid = GET_THREAD_ID (inferior_ptid);
+  int tid = ptid_get_lwp (inferior_ptid);
   const gdb_gregset_t regs;
   int areg;
   
@@ -200,7 +193,7 @@ fetch_gregs (struct regcache *regcache, 
 static void
 store_gregs (struct regcache *regcache, int regnum)
 {
-  int tid = GET_THREAD_ID (inferior_ptid);
+  int tid = ptid_get_lwp (inferior_ptid);
   gdb_gregset_t regs;
   int areg;
 
@@ -228,7 +221,7 @@ static int xtreg_high;
 static void
 fetch_xtregs (struct regcache *regcache, int regnum)
 {
-  int tid = GET_THREAD_ID (inferior_ptid);
+  int tid = ptid_get_lwp (inferior_ptid);
   const xtensa_regtable_t *ptr;
   char xtregs [XTENSA_ELF_XTREG_SIZE];
 
@@ -244,7 +237,7 @@ fetch_xtregs (struct regcache *regcache,
 static void
 store_xtregs (struct regcache *regcache, int regnum)
 {
-  int tid = GET_THREAD_ID (inferior_ptid);
+  int tid = ptid_get_lwp (inferior_ptid);
   const xtensa_regtable_t *ptr;
   char xtregs [XTENSA_ELF_XTREG_SIZE];
 
@@ -260,7 +253,7 @@ store_xtregs (struct regcache *regcache,
     perror_with_name (_("Couldn't write extended registers"));
 }
 
-void
+static void
 xtensa_linux_fetch_inferior_registers (struct target_ops *ops,
 				       struct regcache *regcache, int regnum)
 {
@@ -275,7 +268,7 @@ xtensa_linux_fetch_inferior_registers (s
     fetch_xtregs (regcache, regnum);
 }
 
-void
+static void
 xtensa_linux_store_inferior_registers (struct target_ops *ops,
 				       struct regcache *regcache, int regnum)
 {
@@ -290,6 +283,25 @@ xtensa_linux_store_inferior_registers (s
     store_xtregs (regcache, regnum);
 }
 
+/* Called by libthread_db.  */
+
+ps_err_e
+ps_get_thread_area (struct ps_prochandle *ph,
+                    lwpid_t lwpid, int idx, void **base)
+{
+  xtensa_elf_gregset_t regs;
+
+  if (ptrace (PTRACE_GETREGS, lwpid, NULL, &regs) != 0)
+    return PS_ERR;
+
+  /* IDX is the bias from the thread pointer to the beginning of the
+     thread descriptor.  It has to be subtracted due to implementation
+     quirks in libthread_db.  */
+  *base = (void *) ((char *) regs.threadptr - idx);
+
+  return PS_OK;
+}
+
 void _initialize_xtensa_linux_nat (void);
 
 void
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-linux-tdep.c ./gdb/xtensa-linux-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-linux-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-linux-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux on Xtensa processors.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -106,6 +106,10 @@ xtensa_linux_init_abi (struct gdbarch_in
 				      xtensa_linux_gdb_signal_from_target);
   set_gdbarch_gdb_signal_to_target (gdbarch,
 				    xtensa_linux_gdb_signal_to_target);
+
+  /* Enable TLS support.  */
+  set_gdbarch_fetch_tls_load_module_address (gdbarch,
+                                             svr4_fetch_objfile_link_map);
 }
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-tdep.c ./gdb/xtensa-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-tdep.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-tdep.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Xtensa port of GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
+#include "osabi.h"
 #include "floatformat.h"
 #include "regcache.h"
 #include "reggroups.h"
@@ -51,6 +52,7 @@
 #include "xtensa-isa.h"
 #include "xtensa-tdep.h"
 #include "xtensa-config.h"
+#include <algorithm>
 
 
 static unsigned int xtensa_debug_level = 0;
@@ -316,7 +318,8 @@ xtensa_register_type (struct gdbarch *gd
 	      if (tp == NULL)
 		{
 		  char *name = xstrprintf ("int%d", size * 8);
-		  tp = xmalloc (sizeof (struct ctype_cache));
+
+		  tp = XNEW (struct ctype_cache);
 		  tp->next = tdep->type_entries;
 		  tdep->type_entries = tp;
 		  tp->size = size;
@@ -354,9 +357,7 @@ xtensa_reg_to_regnum (struct gdbarch *gd
     if (regnum == gdbarch_tdep (gdbarch)->regmap[i].target_number)
       return i;
 
-  internal_error (__FILE__, __LINE__,
-		  _("invalid dwarf/stabs register number %d"), regnum);
-  return 0;
+  return -1;
 }
 
 
@@ -849,7 +850,7 @@ xtensa_supply_gregset (const struct regs
 		       const void *gregs,
 		       size_t len)
 {
-  const xtensa_elf_gregset_t *regs = gregs;
+  const xtensa_elf_gregset_t *regs = (const xtensa_elf_gregset_t *) gregs;
   struct gdbarch *gdbarch = get_regcache_arch (rc);
   int i;
 
@@ -1270,7 +1271,7 @@ xtensa_frame_cache (struct frame_info *t
   int  windowed, ps_regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct xtensa_frame_cache *) *this_cache;
 
   pc = get_frame_register_unsigned (this_frame, gdbarch_pc_regnum (gdbarch));
   ps_regnum = gdbarch_ps_regnum (gdbarch);
@@ -1285,7 +1286,7 @@ xtensa_frame_cache (struct frame_info *t
 
   if (windowed)
     {
-      char op1;
+      LONGEST op1;
 
       /* Get WINDOWBASE, WINDOWSTART, and PS registers.  */
       wb = get_frame_register_unsigned (this_frame, 
@@ -1293,8 +1294,8 @@ xtensa_frame_cache (struct frame_info *t
       ws = get_frame_register_unsigned (this_frame,
 					gdbarch_tdep (gdbarch)->ws_regnum);
 
-      op1 = read_memory_integer (pc, 1, byte_order);
-      if (XTENSA_IS_ENTRY (gdbarch, op1))
+      if (safe_read_memory_integer (pc, 1, byte_order, &op1)
+	  && XTENSA_IS_ENTRY (gdbarch, op1))
 	{
 	  int callinc = CALLINC (ps);
 	  ra = get_frame_register_unsigned
@@ -1450,7 +1451,7 @@ xtensa_frame_prev_register (struct frame
 
   if (*this_cache == NULL)
     *this_cache = xtensa_frame_cache (this_frame, this_cache);
-  cache = *this_cache;
+  cache = (struct xtensa_frame_cache *) *this_cache;
 
   if (regnum ==gdbarch_pc_regnum (gdbarch))
     saved_reg = cache->ra;
@@ -1564,7 +1565,7 @@ xtensa_extract_return_value (struct type
 			     void *dst)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  bfd_byte *valbuf = dst;
+  bfd_byte *valbuf = (bfd_byte *) dst;
   int len = TYPE_LENGTH (type);
   ULONGEST pc, wb;
   int callsize, areg;
@@ -1620,7 +1621,7 @@ xtensa_store_return_value (struct type *
 			   const void *dst)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const bfd_byte *valbuf = dst;
+  const bfd_byte *valbuf = (const bfd_byte *) dst;
   unsigned int areg;
   ULONGEST pc, wb;
   int callsize;
@@ -1958,6 +1959,16 @@ xtensa_push_dummy_call (struct gdbarch *
   return sp + SP_ALIGNMENT;
 }
 
+/* Implement the breakpoint_kind_from_pc gdbarch method.  */
+
+static int
+xtensa_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+  if (gdbarch_tdep (gdbarch)->isa_use_density_instructions)
+    return 2;
+  else
+    return 4;
+}
 
 /* Return a breakpoint for the current location of PC.  We always use
    the density version if we have density instructions (regardless of the
@@ -1968,42 +1979,33 @@ xtensa_push_dummy_call (struct gdbarch *
 #define DENSITY_BIG_BREAKPOINT { 0xd2, 0x0f }
 #define DENSITY_LITTLE_BREAKPOINT { 0x2d, 0xf0 }
 
-static const unsigned char *
-xtensa_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-			   int *lenptr)
-{
-  static unsigned char big_breakpoint[] = BIG_BREAKPOINT;
-  static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT;
-  static unsigned char density_big_breakpoint[] = DENSITY_BIG_BREAKPOINT;
-  static unsigned char density_little_breakpoint[] = DENSITY_LITTLE_BREAKPOINT;
+/* Implement the sw_breakpoint_from_kind gdbarch method.  */
 
-  DEBUGTRACE ("xtensa_breakpoint_from_pc (pc = 0x%08x)\n", (int) *pcptr);
+static const gdb_byte *
+xtensa_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+  *size = kind;
 
-  if (gdbarch_tdep (gdbarch)->isa_use_density_instructions)
+  if (kind == 4)
     {
+      static unsigned char big_breakpoint[] = BIG_BREAKPOINT;
+      static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT;
+
       if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
-	{
-	  *lenptr = sizeof (density_big_breakpoint);
-	  return density_big_breakpoint;
-	}
+	return big_breakpoint;
       else
-	{
-	  *lenptr = sizeof (density_little_breakpoint);
-	  return density_little_breakpoint;
-	}
+	return little_breakpoint;
     }
   else
     {
+      static unsigned char density_big_breakpoint[] = DENSITY_BIG_BREAKPOINT;
+      static unsigned char density_little_breakpoint[]
+	= DENSITY_LITTLE_BREAKPOINT;
+
       if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
-	{
-	  *lenptr = sizeof (big_breakpoint);
-	  return big_breakpoint;
-	}
+	return density_big_breakpoint;
       else
-	{
-	  *lenptr = sizeof (little_breakpoint);
-	  return little_breakpoint;
-	}
+	return density_little_breakpoint;
     }
 }
 
@@ -2399,7 +2401,7 @@ call0_analyze_prologue (struct gdbarch *
      arg was not supplied to avoid probing beyond the end of valid memory.
      If memory is full of garbage that classifies as c0opc_uninteresting.
      If this fails (eg. if no symbols) pc ends up 0 as it was.
-     Intialize the Call0 frame and register tracking info.
+     Initialize the Call0 frame and register tracking info.
      Assume it's Call0 until an 'entry' instruction is encountered.
      Assume we may be in the prologue until we hit a flow control instr.  */
 
@@ -2417,10 +2419,10 @@ call0_analyze_prologue (struct gdbarch *
   if (pc == 0)
     {
       find_pc_partial_function (start, 0, NULL, &end_pc);
-      body_pc = min (end_pc, body_pc);
+      body_pc = std::min (end_pc, body_pc);
     }
   else
-    body_pc = min (pc, body_pc);
+    body_pc = std::min (pc, body_pc);
 
   cache->call0 = 1;
   rtmp = (xtensa_c0reg_t*) alloca(nregs * sizeof(xtensa_c0reg_t));
@@ -2796,7 +2798,6 @@ execute_code (struct gdbarch *gdbarch, C
   int ilen, islots, is;
   xtensa_opcode opc;
   int insn_num = 0;
-  int fail = 0;
   void (*func) (struct gdbarch *, int, int, int, CORE_ADDR);
 
   uint32_t at, as, offset;
@@ -3062,48 +3063,38 @@ xtensa_skip_prologue (struct gdbarch *gd
 static void
 xtensa_verify_config (struct gdbarch *gdbarch)
 {
-  struct ui_file *log;
-  struct cleanup *cleanups;
-  struct gdbarch_tdep *tdep;
-  long length;
-  char *buf;
-
-  tdep = gdbarch_tdep (gdbarch);
-  log = mem_fileopen ();
-  cleanups = make_cleanup_ui_file_delete (log);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  string_file log;
 
   /* Verify that we got a reasonable number of AREGS.  */
   if ((tdep->num_aregs & -tdep->num_aregs) != tdep->num_aregs)
-    fprintf_unfiltered (log, _("\
+    log.printf (_("\
 \n\tnum_aregs: Number of AR registers (%d) is not a power of two!"),
-			tdep->num_aregs);
+		tdep->num_aregs);
 
   /* Verify that certain registers exist.  */
 
   if (tdep->pc_regnum == -1)
-    fprintf_unfiltered (log, _("\n\tpc_regnum: No PC register"));
+    log.printf (_("\n\tpc_regnum: No PC register"));
   if (tdep->isa_use_exceptions && tdep->ps_regnum == -1)
-    fprintf_unfiltered (log, _("\n\tps_regnum: No PS register"));
+    log.printf (_("\n\tps_regnum: No PS register"));
 
   if (tdep->isa_use_windowed_registers)
     {
       if (tdep->wb_regnum == -1)
-	fprintf_unfiltered (log, _("\n\twb_regnum: No WB register"));
+	log.printf (_("\n\twb_regnum: No WB register"));
       if (tdep->ws_regnum == -1)
-	fprintf_unfiltered (log, _("\n\tws_regnum: No WS register"));
+	log.printf (_("\n\tws_regnum: No WS register"));
       if (tdep->ar_base == -1)
-	fprintf_unfiltered (log, _("\n\tar_base: No AR registers"));
+	log.printf (_("\n\tar_base: No AR registers"));
     }
 
   if (tdep->a0_base == -1)
-    fprintf_unfiltered (log, _("\n\ta0_base: No Ax registers"));
+    log.printf (_("\n\ta0_base: No Ax registers"));
 
-  buf = ui_file_xstrdup (log, &length);
-  make_cleanup (xfree, buf);
-  if (length > 0)
+  if (!log.empty ())
     internal_error (__FILE__, __LINE__,
-		    _("the following are invalid: %s"), buf);
-  do_cleanups (cleanups);
+		    _("the following are invalid: %s"), log.c_str ());
 }
 
 
@@ -3192,7 +3183,6 @@ xtensa_gdbarch_init (struct gdbarch_info
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
-  struct xtensa_abi_handler *abi_handler;
 
   DEBUGTRACE ("gdbarch_init()\n");
 
@@ -3240,7 +3230,10 @@ xtensa_gdbarch_init (struct gdbarch_info
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Set breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, xtensa_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+				       xtensa_breakpoint_kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+				       xtensa_sw_breakpoint_from_kind);
 
   /* After breakpoint instruction or illegal instruction, pc still
      points at break instruction, so don't decrement.  */
@@ -3273,6 +3266,9 @@ xtensa_gdbarch_init (struct gdbarch_info
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 
+  /* Hook in the ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch);
+
   return gdbarch;
 }
 
@@ -3288,8 +3284,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_xtensa_tdep (void)
 {
-  struct cmd_list_element *c;
-
   gdbarch_register (bfd_arch_xtensa, xtensa_gdbarch_init, xtensa_dump_tdep);
   xtensa_init_reggroups ();
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-tdep.h ./gdb/xtensa-tdep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-tdep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-tdep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Xtensa port of GDB, the GNU debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
+#include "arch/xtensa.h"
+
 /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION
    whenever the "tdep" structure changes in an incompatible way.  */
 
@@ -81,28 +83,6 @@ typedef enum 
 } xtensa_target_flags_t;
 
 
-/* Xtensa ELF core file register set representation ('.reg' section).
-   Copied from target-side ELF header <xtensa/elf.h>.  */
-
-typedef uint32_t xtensa_elf_greg_t;
-
-typedef struct
-{
-  xtensa_elf_greg_t pc;
-  xtensa_elf_greg_t ps;
-  xtensa_elf_greg_t lbeg;
-  xtensa_elf_greg_t lend;
-  xtensa_elf_greg_t lcount;
-  xtensa_elf_greg_t sar;
-  xtensa_elf_greg_t windowstart;
-  xtensa_elf_greg_t windowbase;
-  xtensa_elf_greg_t reserved[8+48];
-  xtensa_elf_greg_t ar[64];
-} xtensa_elf_gregset_t;
-
-#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
-			  / sizeof (xtensa_elf_greg_t))
-
 /*  Mask.  */
 
 typedef struct 
@@ -144,9 +124,13 @@ typedef struct 
 
 /*  For xtensa-config.c to expand to the structure above.  */
 #define XTREG(index,ofs,bsz,sz,al,tnum,flg,cp,ty,gr,name,fet,sto,mas,ct,x,y) \
-	{#name, ofs, ty, ((gr) | ((xtRegisterGroupNCP >> 2) << (cp + 2))), \
+       {#name, ofs, (xtensa_register_type_t) (ty), \
+	((xtensa_register_group_t) \
+	 ((gr) | ((xtRegisterGroupNCP >> 2) << (cp + 2)))), \
 	 ct, bsz, sz, al, tnum, flg, cp, mas, fet, sto},
-#define XTREG_END {0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0},
+#define XTREG_END \
+  {0, 0, (xtensa_register_type_t) 0, (xtensa_register_group_t) 0,	\
+   0, 0, 0, 0, -1, 0, 0, 0, 0, 0},
 
 #define XTENSA_REGISTER_FLAGS_PRIVILEGED	0x0001
 #define XTENSA_REGISTER_FLAGS_READABLE		0x0002
@@ -240,53 +224,55 @@ struct gdbarch_tdep
 
 /* Macro to instantiate a gdbarch_tdep structure.  */
 
-#define XTENSA_GDBARCH_TDEP_INSTANTIATE(rmap,spillsz)		\
-	{							\
-	  .target_flags = 0,					\
-	  .spill_location = -1,					\
-	  .spill_size = (spillsz),				\
-	  .unused = 0,						\
-	  .call_abi = 0,					\
-	  .debug_interrupt_level = XCHAL_DEBUGLEVEL,		\
-	  .icache_line_bytes = XCHAL_ICACHE_LINESIZE,		\
-	  .dcache_line_bytes = XCHAL_DCACHE_LINESIZE,		\
-	  .dcache_writeback = XCHAL_DCACHE_IS_WRITEBACK,	\
-	  .isa_use_windowed_registers = (XSHAL_ABI != XTHAL_ABI_CALL0),	\
-	  .isa_use_density_instructions = XCHAL_HAVE_DENSITY,	\
-	  .isa_use_exceptions = XCHAL_HAVE_EXCEPTIONS,		\
-	  .isa_use_ext_l32r = XSHAL_USE_ABSOLUTE_LITERALS,	\
-	  .isa_max_insn_size = XCHAL_MAX_INSTRUCTION_SIZE,	\
-	  .debug_num_ibreaks = XCHAL_NUM_IBREAK,		\
-	  .debug_num_dbreaks = XCHAL_NUM_DBREAK,		\
-	  .regmap = rmap,			\
-	  .num_regs = 0,			\
-	  .num_nopriv_regs = 0,			\
-	  .num_pseudo_regs = 0,			\
-	  .num_aregs = XCHAL_NUM_AREGS,		\
-	  .num_contexts = XCHAL_NUM_CONTEXTS,	\
-	  .ar_base = -1,			\
-	  .a0_base = -1,			\
-	  .wb_regnum = -1,			\
-	  .ws_regnum = -1,			\
-	  .pc_regnum = -1,			\
-	  .ps_regnum = -1,			\
-	  .lbeg_regnum = -1,			\
-	  .lend_regnum = -1,			\
-	  .lcount_regnum = -1,			\
-	  .sar_regnum = -1,			\
-	  .litbase_regnum = -1,			\
-	  .interrupt_regnum = -1,		\
-	  .interrupt2_regnum = -1,		\
-	  .cpenable_regnum = -1,		\
-	  .debugcause_regnum = -1,		\
-	  .exccause_regnum = -1,		\
-	  .excvaddr_regnum = -1,		\
-	  .max_register_raw_size = 0,		\
-	  .max_register_virtual_size = 0,	\
-	  .fp_layout = 0,			\
-	  .fp_layout_bytes = 0,			\
-	  .gregmap = 0,				\
-	}
+#define XTENSA_GDBARCH_TDEP_INSTANTIATE(rmap,spillsz)			\
+  {									\
+    0,				/* target_flags */			\
+    -1,				/* spill_location */			\
+    (spillsz),			/* spill_size */			\
+    0,				/* unused */				\
+    (XSHAL_ABI == XTHAL_ABI_CALL0					\
+     ? CallAbiCall0Only							\
+     : CallAbiDefault),		/* call_abi */				\
+    XCHAL_DEBUGLEVEL,		/* debug_interrupt_level */		\
+    XCHAL_ICACHE_LINESIZE,	/* icache_line_bytes */			\
+    XCHAL_DCACHE_LINESIZE,	/* dcache_line_bytes */			\
+    XCHAL_DCACHE_IS_WRITEBACK,  /* dcache_writeback */			\
+    (XSHAL_ABI != XTHAL_ABI_CALL0),   /* isa_use_windowed_registers */	\
+    XCHAL_HAVE_DENSITY,		 /* isa_use_density_instructions */	\
+    XCHAL_HAVE_EXCEPTIONS,	 /* isa_use_exceptions */		\
+    XSHAL_USE_ABSOLUTE_LITERALS, /* isa_use_ext_l32r */			\
+    XCHAL_MAX_INSTRUCTION_SIZE,  /* isa_max_insn_size */		\
+    XCHAL_NUM_IBREAK,		 /* debug_num_ibreaks */		\
+    XCHAL_NUM_DBREAK,		 /* debug_num_dbreaks */		\
+    rmap,			 /* regmap */				\
+    0,				 /* num_regs */				\
+    0,				 /* num_nopriv_regs */			\
+    0,				 /* num_pseudo_regs */			\
+    XCHAL_NUM_AREGS,		 /* num_aregs */			\
+    XCHAL_NUM_CONTEXTS,		 /* num_contexts */			\
+    -1,				 /* ar_base */				\
+    -1,				 /* a0_base */				\
+    -1,				 /* wb_regnum */			\
+    -1,				 /* ws_regnum */			\
+    -1,				 /* pc_regnum */			\
+    -1,				 /* ps_regnum */			\
+    -1,				 /* lbeg_regnum */			\
+    -1,				 /* lend_regnum */			\
+    -1,				 /* lcount_regnum */			\
+    -1,				 /* sar_regnum */			\
+    -1,				 /* litbase_regnum */			\
+    -1,				 /* interrupt_regnum */			\
+    -1,				 /* interrupt2_regnum */		\
+    -1,				 /* cpenable_regnum */			\
+    -1,				 /* debugcause_regnum */		\
+    -1,				 /* exccause_regnum */			\
+    -1,				 /* excvaddr_regnum */			\
+    0,				 /* max_register_raw_size */		\
+    0,				 /* max_register_virtual_size */	\
+    0,				 /* fp_layout */			\
+    0,				 /* fp_layout_bytes */			\
+    0,				 /* gregmap */				\
+  }
 #define XTENSA_CONFIG_INSTANTIATE(rmap,spill_size)	\
 	struct gdbarch_tdep xtensa_tdep = \
 	  XTENSA_GDBARCH_TDEP_INSTANTIATE(rmap,spill_size);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-xtregs.c ./gdb/xtensa-xtregs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/xtensa-xtregs.c	2015-07-06 01:48:30.000000000 +0000
+++ ./gdb/xtensa-xtregs.c	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Table mapping between kernel xtregset and GDB register cache.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/yy-remap.h ./gdb/yy-remap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/gdb/yy-remap.h	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/yy-remap.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,92 @@
+/* Copyright (C) 1986-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
+   etc), as well as gratuitiously global symbol names, so we can have
+   multiple yacc generated parsers in gdb.  Note that these are only
+   the variables produced by yacc.  If other parser generators (bison,
+   byacc, etc) produce additional global names that conflict at link
+   time, then those parser generators need to be fixed instead of
+   adding those names to this list.  */
+
+/* NOTE: This is clumsy since BISON and FLEX provide --prefix options.
+   We are maintaining it to accommodate systems without BISON.  */
+
+/* Define GDB_YY_REMAP_PREFIX to the desired remapping prefix before
+   including this file.  */
+#ifndef GDB_YY_REMAP_PREFIX
+# error "GDB_YY_REMAP_PREFIX not defined"
+#endif
+
+#define GDB_YY_REMAP_2(PREFIX, YYSYM) PREFIX ## YYSYM
+#define GDB_YY_REMAP_1(PREFIX, YYSYM) GDB_YY_REMAP_2 (PREFIX, YYSYM)
+#define GDB_YY_REMAP(YYSYM) GDB_YY_REMAP_1 (GDB_YY_REMAP_PREFIX, YYSYM)
+
+#define yymaxdepth	GDB_YY_REMAP (yymaxdepth)
+#define yyparse		GDB_YY_REMAP (yyparse)
+#define yylex		GDB_YY_REMAP (yylex)
+#define yyerror		GDB_YY_REMAP (yyerror)
+#define yylval		GDB_YY_REMAP (yylval)
+#define yychar		GDB_YY_REMAP (yychar)
+#define yydebug		GDB_YY_REMAP (yydebug)
+#define yypact		GDB_YY_REMAP (yypact)
+#define yyr1		GDB_YY_REMAP (yyr1)
+#define yyr2		GDB_YY_REMAP (yyr2)
+#define yydef		GDB_YY_REMAP (yydef)
+#define yychk		GDB_YY_REMAP (yychk)
+#define yypgo		GDB_YY_REMAP (yypgo)
+#define yyact		GDB_YY_REMAP (yyact)
+#define yyexca		GDB_YY_REMAP (yyexca)
+#define yyerrflag	GDB_YY_REMAP (yyerrflag)
+#define yynerrs		GDB_YY_REMAP (yynerrs)
+#define yyps		GDB_YY_REMAP (yyps)
+#define yypv		GDB_YY_REMAP (yypv)
+#define yys		GDB_YY_REMAP (yys)
+#define yy_yys		GDB_YY_REMAP (yy_yys)
+#define yystate		GDB_YY_REMAP (yystate)
+#define yytmp		GDB_YY_REMAP (yytmp)
+#define yyv		GDB_YY_REMAP (yyv)
+#define yy_yyv		GDB_YY_REMAP (yy_yyv)
+#define yyval		GDB_YY_REMAP (yyval)
+#define yylloc		GDB_YY_REMAP (yylloc)
+#define yyreds		GDB_YY_REMAP (yyreds)  /* With YYDEBUG defined */
+#define yytoks		GDB_YY_REMAP (yytoks)  /* With YYDEBUG defined */
+#define yyname		GDB_YY_REMAP (yyname)  /* With YYDEBUG defined */
+#define yyrule		GDB_YY_REMAP (yyrule)  /* With YYDEBUG defined */
+#define yylhs		GDB_YY_REMAP (yylhs)
+#define yylen		GDB_YY_REMAP (yylen)
+#define yydefred	GDB_YY_REMAP (yydefred)
+#define yydgoto		GDB_YY_REMAP (yydgoto)
+#define yysindex	GDB_YY_REMAP (yysindex)
+#define yyrindex	GDB_YY_REMAP (yyrindex)
+#define yygindex	GDB_YY_REMAP (yygindex)
+#define yytable		GDB_YY_REMAP (yytable)
+#define yycheck		GDB_YY_REMAP (yycheck)
+#define yyss		GDB_YY_REMAP (yyss)
+#define yysslim		GDB_YY_REMAP (yysslim)
+#define yyssp		GDB_YY_REMAP (yyssp)
+#define yystacksize	GDB_YY_REMAP (yystacksize)
+#define yyvs		GDB_YY_REMAP (yyvs)
+#define yyvsp		GDB_YY_REMAP (yyvsp)
+
+/* The following are common to all parsers.  */
+
+#ifndef YYDEBUG
+# define YYDEBUG 1  /* Default to yydebug support */
+#endif
+
+#define YYFPRINTF parser_fprintf
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/alloca-conf.h ./include/alloca-conf.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/alloca-conf.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/alloca-conf.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ansidecl.h ./include/ansidecl.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ansidecl.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/ansidecl.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ANSI and traditional C compatability macros
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
 This program is free software; you can redistribute it and/or modify
@@ -274,6 +274,15 @@ So instead we use the macro below and te
 # endif /* GNUC >= 4.3 */
 #endif /* ATTRIBUTE_HOT */
 
+/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9.  */
+#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# if (GCC_VERSION >= 4009)
+#  define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
+# else
+#  define ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# endif /* GNUC >= 4.9 */
+#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
+
 /* We use __extension__ in some places to suppress -pedantic warnings
    about GCC extensions.  This feature didn't work properly before
    gcc 2.8.  */
@@ -304,6 +313,41 @@ So instead we use the macro below and te
 #define ENUM_BITFIELD(TYPE) unsigned int
 #endif
 
+/* C++11 adds the ability to add "override" after an implementation of a
+   virtual function in a subclass, to:
+     (A) document that this is an override of a virtual function
+     (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch
+         of the type signature).
+
+   Similarly, it allows us to add a "final" to indicate that no subclass
+   may subsequently override the vfunc.
+
+   Provide OVERRIDE and FINAL as macros, allowing us to get these benefits
+   when compiling with C++11 support, but without requiring C++11.
+
+   For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
+   this by default (actually GNU++14).  */
+
+#if __cplusplus >= 201103
+/* C++11 claims to be available: use it.  final/override were only
+   implemented in 4.7, though.  */
+# if GCC_VERSION < 4007
+#  define OVERRIDE
+#  define FINAL
+# else
+#  define OVERRIDE override
+#  define FINAL final
+# endif
+#elif GCC_VERSION >= 4007
+/* G++ 4.7 supports __final in C++98.  */
+# define OVERRIDE
+# define FINAL __final
+#else
+/* No C++11 support; leave the macros empty: */
+# define OVERRIDE
+# define FINAL
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/adobe.h ./include/aout/adobe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/adobe.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/adobe.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* `a.out.adobe' differences from standard a.out files
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ struct external_exec 
 #undef	OMAGIC
 #undef	NMAGIC
 
-#define N_BADMAG(x)	  ((x).a_info != ZMAGIC)
+#define N_BADMAG(x)	  ((x)->a_info != ZMAGIC)
 
 /* By default, segment size is constant.  But some machines override this
    to be a function of the a.out header (e.g. machine type).  */
@@ -77,25 +77,25 @@ struct internal_segdesc {
 	unsigned int	a_filebase;	/* Base address in object file */
 };
 
-#define N_TXTADDR(x) \
+#define N_TXTADDR(x) is_this_really_unused?
 
 /* This is documented to be at 1024, but appears to really be at 2048.
    FIXME?!  */
 #define N_TXTOFF(x)	2048
 
-#define	N_TXTSIZE(x) ((x).a_text)
+#define	N_TXTSIZE(x) ((x)->a_text)
 
-#define N_DATADDR(x)
+#define N_DATADDR(x) is_this_really_unused?
 
-#define N_BSSADDR(x)
+#define N_BSSADDR(x) is_this_really_unused?
 
 /* Offsets of the various portions of the file after the text segment.  */
 
 #define N_DATOFF(x)	( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_TRELOFF(x)	( N_DATOFF(x) + (x).a_data )
-#define N_DRELOFF(x)	( N_TRELOFF(x) + (x).a_trsize )
-#define N_SYMOFF(x)	( N_DRELOFF(x) + (x).a_drsize )
-#define N_STROFF(x)	( N_SYMOFF(x) + (x).a_syms )
+#define N_TRELOFF(x)	( N_DATOFF(x) + (x)->a_data )
+#define N_DRELOFF(x)	( N_TRELOFF(x) + (x)->a_trsize )
+#define N_SYMOFF(x)	( N_DRELOFF(x) + (x)->a_drsize )
+#define N_STROFF(x)	( N_SYMOFF(x) + (x)->a_syms )
 
 /* Symbols */
 struct external_nlist {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/aout64.h ./include/aout/aout64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/aout64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/aout64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* `a.out' object-file definitions, including extensions to 64-bit fields
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -136,7 +136,7 @@ struct external_exec 
    in the text.  */
 #ifndef N_HEADER_IN_TEXT
 #define N_HEADER_IN_TEXT(x) \
-  (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+  (((x)->a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
 #endif
 
 /* Sun shared libraries, not linux.  This macro is only relevant for ZMAGIC
@@ -199,12 +199,12 @@ struct external_exec 
 #define	N_TXTSIZE(x) \
   (/* For QMAGIC, we don't consider the header part of the text section.  */\
    N_IS_QMAGIC (x)							\
-   ? (x).a_text - EXEC_BYTES_SIZE					\
+   ? (x)->a_text - EXEC_BYTES_SIZE					\
    : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x))			\
-      ? (x).a_text							\
+      ? (x)->a_text							\
       : (N_HEADER_IN_TEXT (x)						\
-	 ? (x).a_text - EXEC_BYTES_SIZE	/* No padding.  */		\
-	 : (x).a_text			/* A page of padding.  */ )))
+	 ? (x)->a_text - EXEC_BYTES_SIZE	/* No padding.  */	\
+	 : (x)->a_text				/* A page of padding.  */ )))
 #endif
 /* The address of the data segment in virtual memory.
    It is the text segment address, plus text segment size, rounded
@@ -218,7 +218,7 @@ struct external_exec 
 #endif
 /* The address of the BSS segment -- immediately after the data segment.  */
 
-#define N_BSSADDR(x)	(N_DATADDR (x) + (x).a_data)
+#define N_BSSADDR(x)	(N_DATADDR (x) + (x)->a_data)
 
 /* Offsets of the various portions of the file after the text segment.  */
 
@@ -238,16 +238,16 @@ struct external_exec 
 #define N_DATOFF(x)	(N_TXTOFF (x) + N_TXTSIZE (x))
 #endif
 #ifndef N_TRELOFF
-#define N_TRELOFF(x)	(N_DATOFF (x) + (x).a_data)
+#define N_TRELOFF(x)	(N_DATOFF (x) + (x)->a_data)
 #endif
 #ifndef N_DRELOFF
-#define N_DRELOFF(x)	(N_TRELOFF (x) + (x).a_trsize)
+#define N_DRELOFF(x)	(N_TRELOFF (x) + (x)->a_trsize)
 #endif
 #ifndef N_SYMOFF
-#define N_SYMOFF(x)	(N_DRELOFF (x) + (x).a_drsize)
+#define N_SYMOFF(x)	(N_DRELOFF (x) + (x)->a_drsize)
 #endif
 #ifndef N_STROFF
-#define N_STROFF(x)	(N_SYMOFF (x) + (x).a_syms)
+#define N_STROFF(x)	(N_SYMOFF (x) + (x)->a_syms)
 #endif
 
 /* Symbols */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ar.h ./include/aout/ar.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ar.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/ar.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* archive file definition for GNU software
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ChangeLog ./include/aout/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,270 +0,0 @@
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2010-04-15  Nick Clifton  <nickc@redhat.com>
-
-	* adobe.h: Update copyright notice to use GPLv3.
-	* aout64.h: Likewise.
-	* ar.h: Likewise.
-	* dynix3.h: Likewise.
-	* encap.h: Likewise.
-	* host.h: Likewise.
-	* hp.h: Likewise.
-	* hp300hpux.h: Likewise.
-	* ranlib.h: Likewise.
-	* reloc.h: Likewise.
-	* stab.def: Likewise.
-	* stab_gnu.h: Likewise.
-	* sun4.h: Likewise.
-
-2009-10-02  Alan Modra  <amodra@bigpond.net.au>
-
-	* aout64.h (N_SHARED_LIB): Define as zero if not already defined.
-	* sun4.h (N_SHARED_LIB): Define.
-	* hp300hpux.h (N_SHARED_LIB): Don't define.
-
-2008-08-28  Tristan Gingold  <gingold@adacore.com>
-
-	* stab.def: Add BNSYM, ENSYM, OSO for darwin.
-
-2008-03-27  Cary Coutant <ccoutant@google.com>
-
-	* ar.h (ARMAGT): New magic string for thin archives.
-
-2005-08-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* encap.h: Remove a29k support.
-
-2005-05-10  Nick Clifton  <nickc@redhat.com>
-
-	* Update the address and phone number of the FSF organization in
-	the GPL notices in the following files:
-	adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h,
-	ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h
-
-2004-01-06  Mark Kettenis  <kettenis@gnu.org>
-
-	* stab.def: Add N_PATCH to DO definition.
-
-2003-03-06  Elias Athanasopoulos  <elathan@phys.uoa.gr>
-
-	* aout64.h (BYTES_IN_WORD): Define if necessary.
-
-2001-09-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* aout64.h: Formatting fixes.
-	(N_TXTADDR): Evaluate to a bfd_vma.
-	(N_DATADDR): Avoid negative unsigned warning.
-	* hp300hpux.h: Formatting fixes.
-	(N_DATADDR): Avoid negative unsigned warning.
-
-2000-04-03  Hans-Peter Nilsson  <hp@axis.com>
-
-	* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
-	(RELOC_EXT_BITS_EXTERN_LITTLE): Ditto.
-	(RELOC_EXT_BITS_TYPE_BIG): Ditto.
-	(RELOC_EXT_BITS_TYPE_SH_BIG): Ditto.
-	(RELOC_EXT_BITS_TYPE_LITTLE): Ditto.
-	(RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto.
-
-1999-07-12  Ian Lance Taylor  <ian@zembu.com>
-
-	* aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
-	defined as 0.
-
-1998-06-28  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
-
-	* stab.def:  Add N_ALIAS from SunPro F77.
-
-1996-03-11  Ian Lance Taylor  <ian@cygnus.com>
-
-	* stab.def: Use __define_stab_duplicate rather than __define_stab
-	for duplicate entries N_BROWS and N_MOD2.
-	* stab_gnu.h (__define_stab_duplicate): Define before including
-	stab.def.
-
-1995-10-27  Niklas Hallqvist  <niklas@appli.se>
-
-	* aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
-	TARGET_PAGE_SIZE.
-
-1995-09-12  Ian Lance Taylor  <ian@cygnus.com>
-
-	* sun4.h (struct internal_sun4_dynamic_link): Change all fields
-	from long to unsigned long.
-
-1995-07-12  Ken Raeburn  <raeburn@kr-pc.cygnus.com>
-
-	* sun4.h (PAGE_SIZE): Undefine before defining.
-
-1994-09-04  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
-	* aout64.h: Only define QMAGIC if it isn't already defined.
-
-1994-06-16  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* aout64.h (BMAGIC): Define.
-
-1994-06-11  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	Add weak symbols as an extension to a.out.
-	* aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
-	* stab.def: Update symbol value table.
-
-1994-06-02  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
-	24.  Fix up ld_got comment.
-
-1994-03-30  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
-
-	* dynix3.h:  Cleanup, adapt to current bfd version.
-
-1994-02-26  Ian Lance Taylor  (ian@cygnus.com)
-
-	* aout64.h: Add casts to avoid warnings from SVR4 cc.
-
-1994-02-11  Stan Shebs  (shebs@andros.cygnus.com)
-
-	* ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
-	portability.
-
-1994-01-21  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* sun4.h: Added information about SunOS shared libraries.
-
-1994-01-07  Jim Kingdon  (kingdon@deneb.cygnus.com)
-
-	* aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
-
-1993-12-25  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
-
-1993-11-16  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
-	for Linux ZMAGIC.
-	(N_TXTOFF, N_DATOFF): Use them.
-
-1993-11-04  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
-
-	* aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
-	sun3 system; used to overlap other fields.
-	(RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
-
-1993-11-03  David J. Mackenzie  (djm@thepub.cygnus.com)
-
-	* aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
-	suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
-
-1993-10-29  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* hp300hpux.h (N_SHARED_LIB): Define to be 0.
-
-1993-09-13  John Gilmore  (gnu@cygnus.com)
-
-	* ar.h (ARMAP_TIME_OFFSET):  Add and describe.
-
-Mon Aug 23  Sean Fagan  (sef@cygnus.com)
-
-	* aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
-
-1993-08-16  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* stab_gnu.h: Include aout/stab.def not just stab.def.
-
-1993-07-18  Jim Kingdon  (kingdon@rtl.cygnus.com)
-
-	* dynix3.h: New, for symmetry running dynix.
-
-1993-07-08  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* aout64.h (N_BADMAG): Recognize QMAGIC.
-	N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
-	N_DATOFF: Pad text size if we need to.
-
-1993-06-18  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* stab.def (N_ECOML): Fix comment.
-
-1993-05-31  Jim Kingdon  (kingdon@cygnus.com)
-
-	* stab.def: Remove Solaris information on N_FUN stabstring grammar;
-	I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
-
-1993-05-10  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
-
-	* hp300hpux.h: Patch from Glenn Engel for linker problem and
-	compatibility fix:
-	(OMAGIC, NMAGIC): New definitions.
-	(SHAREMAGIC): Deleted.
-	(HPUX_DOT_O_MAGIC): New macro.
-	(_N_BADMAG): Adjusted.
-	(N_HEADER_IN_TEXT, N_DATADDR): New macros.
-
-1993-04-29  Ken Raeburn  (raeburn@deneb.cygnus.com)
-
-	* hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
-
-1993-04-27  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
-
-	* aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
-	if `external_exec' is already defined as a macro.
-	(N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
-	if already defined.
-	(struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
-	`external_nlist' is already defined as a macro.
-
-1992-08-15  John Gilmore  (gnu@cygnus.com)
-
-	* adobe.h:  Add description of a.out.adobe format.
-
-1992-07-03  John Gilmore  (gnu at cygnus.com)
-
-	* stab.def:  Update more Solaris definitions.
-	* stab_gnu.h:  Add N_SO language types, and Solaris basic float types.
-
-1992-06-14  John Gilmore  (gnu at cygnus.com)
-
-	* stab.def:  Update descriptions of Solaris-2 stabs; add N_UNDF.
-
-1992-06-11  John Gilmore  (gnu at cygnus.com)
-
-	* stab.def:  Add N_OBJ and N_OPT from Solaris-2.
-
-1992-01-30  John Gilmore  (gnu at cygnus.com)
-
-	* aout64.h: N_TXTSIZE needs some more parentheses.
-	I don't trust C precedence.
-
-1991-12-18  Per Bothner  (bothner at cygnus.com)
-
-	* aout64.h:  Move common sunos-specific test
-	to recognize shared libraries into new macro N_SHARED_LIB.
-	Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
-
-1991-11-30  Steve Chamberlain  (sac at rtl.cygnus.com)
-
-	* aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
-	stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
-	directory.
-
-
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ChangeLog-9115 ./include/aout/ChangeLog-9115
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ChangeLog-9115	1970-01-01 00:00:00.000000000 +0000
+++ ./include/aout/ChangeLog-9115	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,285 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* adobe.h: Invoke aout N_* macros with pointer to
+	struct internal_exec.
+	* aout64.h: Likewise.
+	* dynix3.h: Likewise.
+	* encap.h: Likewise.
+	* hp.h: Likewise.
+	* hp300hpux.h: Likewise.
+	* sun4.h: Likewise.
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2012-12-17  Nick Clifton  <nickc@redhat.com>
+
+	* hppa.h: Add copyright notice.
+
+2010-04-15  Nick Clifton  <nickc@redhat.com>
+
+	* adobe.h: Update copyright notice to use GPLv3.
+	* aout64.h: Likewise.
+	* ar.h: Likewise.
+	* dynix3.h: Likewise.
+	* encap.h: Likewise.
+	* host.h: Likewise.
+	* hp.h: Likewise.
+	* hp300hpux.h: Likewise.
+	* ranlib.h: Likewise.
+	* reloc.h: Likewise.
+	* stab.def: Likewise.
+	* stab_gnu.h: Likewise.
+	* sun4.h: Likewise.
+
+2009-10-02  Alan Modra  <amodra@bigpond.net.au>
+
+	* aout64.h (N_SHARED_LIB): Define as zero if not already defined.
+	* sun4.h (N_SHARED_LIB): Define.
+	* hp300hpux.h (N_SHARED_LIB): Don't define.
+
+2008-08-28  Tristan Gingold  <gingold@adacore.com>
+
+	* stab.def: Add BNSYM, ENSYM, OSO for darwin.
+
+2008-03-27  Cary Coutant <ccoutant@google.com>
+
+	* ar.h (ARMAGT): New magic string for thin archives.
+
+2005-08-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* encap.h: Remove a29k support.
+
+2005-05-10  Nick Clifton  <nickc@redhat.com>
+
+	* Update the address and phone number of the FSF organization in
+	the GPL notices in the following files:
+	adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h,
+	ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h
+
+2004-01-06  Mark Kettenis  <kettenis@gnu.org>
+
+	* stab.def: Add N_PATCH to DO definition.
+
+2003-03-06  Elias Athanasopoulos  <elathan@phys.uoa.gr>
+
+	* aout64.h (BYTES_IN_WORD): Define if necessary.
+
+2001-09-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* aout64.h: Formatting fixes.
+	(N_TXTADDR): Evaluate to a bfd_vma.
+	(N_DATADDR): Avoid negative unsigned warning.
+	* hp300hpux.h: Formatting fixes.
+	(N_DATADDR): Avoid negative unsigned warning.
+
+2000-04-03  Hans-Peter Nilsson  <hp@axis.com>
+
+	* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
+	(RELOC_EXT_BITS_EXTERN_LITTLE): Ditto.
+	(RELOC_EXT_BITS_TYPE_BIG): Ditto.
+	(RELOC_EXT_BITS_TYPE_SH_BIG): Ditto.
+	(RELOC_EXT_BITS_TYPE_LITTLE): Ditto.
+	(RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto.
+
+1999-07-12  Ian Lance Taylor  <ian@zembu.com>
+
+	* aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
+	defined as 0.
+
+1998-06-28  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
+
+	* stab.def:  Add N_ALIAS from SunPro F77.
+
+1996-03-11  Ian Lance Taylor  <ian@cygnus.com>
+
+	* stab.def: Use __define_stab_duplicate rather than __define_stab
+	for duplicate entries N_BROWS and N_MOD2.
+	* stab_gnu.h (__define_stab_duplicate): Define before including
+	stab.def.
+
+1995-10-27  Niklas Hallqvist  <niklas@appli.se>
+
+	* aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
+	TARGET_PAGE_SIZE.
+
+1995-09-12  Ian Lance Taylor  <ian@cygnus.com>
+
+	* sun4.h (struct internal_sun4_dynamic_link): Change all fields
+	from long to unsigned long.
+
+1995-07-12  Ken Raeburn  <raeburn@kr-pc.cygnus.com>
+
+	* sun4.h (PAGE_SIZE): Undefine before defining.
+
+1994-09-04  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+	* aout64.h: Only define QMAGIC if it isn't already defined.
+
+1994-06-16  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* aout64.h (BMAGIC): Define.
+
+1994-06-11  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	Add weak symbols as an extension to a.out.
+	* aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
+	* stab.def: Update symbol value table.
+
+1994-06-02  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
+	24.  Fix up ld_got comment.
+
+1994-03-30  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
+
+	* dynix3.h:  Cleanup, adapt to current bfd version.
+
+1994-02-26  Ian Lance Taylor  (ian@cygnus.com)
+
+	* aout64.h: Add casts to avoid warnings from SVR4 cc.
+
+1994-02-11  Stan Shebs  (shebs@andros.cygnus.com)
+
+	* ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
+	portability.
+
+1994-01-21  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* sun4.h: Added information about SunOS shared libraries.
+
+1994-01-07  Jim Kingdon  (kingdon@deneb.cygnus.com)
+
+	* aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
+
+1993-12-25  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
+
+1993-11-16  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
+	for Linux ZMAGIC.
+	(N_TXTOFF, N_DATOFF): Use them.
+
+1993-11-04  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
+
+	* aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
+	sun3 system; used to overlap other fields.
+	(RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
+
+1993-11-03  David J. Mackenzie  (djm@thepub.cygnus.com)
+
+	* aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
+	suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
+
+1993-10-29  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* hp300hpux.h (N_SHARED_LIB): Define to be 0.
+
+1993-09-13  John Gilmore  (gnu@cygnus.com)
+
+	* ar.h (ARMAP_TIME_OFFSET):  Add and describe.
+
+Mon Aug 23  Sean Fagan  (sef@cygnus.com)
+
+	* aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
+
+1993-08-16  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* stab_gnu.h: Include aout/stab.def not just stab.def.
+
+1993-07-18  Jim Kingdon  (kingdon@rtl.cygnus.com)
+
+	* dynix3.h: New, for symmetry running dynix.
+
+1993-07-08  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* aout64.h (N_BADMAG): Recognize QMAGIC.
+	N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
+	N_DATOFF: Pad text size if we need to.
+
+1993-06-18  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* stab.def (N_ECOML): Fix comment.
+
+1993-05-31  Jim Kingdon  (kingdon@cygnus.com)
+
+	* stab.def: Remove Solaris information on N_FUN stabstring grammar;
+	I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
+
+1993-05-10  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
+
+	* hp300hpux.h: Patch from Glenn Engel for linker problem and
+	compatibility fix:
+	(OMAGIC, NMAGIC): New definitions.
+	(SHAREMAGIC): Deleted.
+	(HPUX_DOT_O_MAGIC): New macro.
+	(_N_BADMAG): Adjusted.
+	(N_HEADER_IN_TEXT, N_DATADDR): New macros.
+
+1993-04-29  Ken Raeburn  (raeburn@deneb.cygnus.com)
+
+	* hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
+
+1993-04-27  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
+
+	* aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
+	if `external_exec' is already defined as a macro.
+	(N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
+	if already defined.
+	(struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
+	`external_nlist' is already defined as a macro.
+
+1992-08-15  John Gilmore  (gnu@cygnus.com)
+
+	* adobe.h:  Add description of a.out.adobe format.
+
+1992-07-03  John Gilmore  (gnu at cygnus.com)
+
+	* stab.def:  Update more Solaris definitions.
+	* stab_gnu.h:  Add N_SO language types, and Solaris basic float types.
+
+1992-06-14  John Gilmore  (gnu at cygnus.com)
+
+	* stab.def:  Update descriptions of Solaris-2 stabs; add N_UNDF.
+
+1992-06-11  John Gilmore  (gnu at cygnus.com)
+
+	* stab.def:  Add N_OBJ and N_OPT from Solaris-2.
+
+1992-01-30  John Gilmore  (gnu at cygnus.com)
+
+	* aout64.h: N_TXTSIZE needs some more parentheses.
+	I don't trust C precedence.
+
+1991-12-18  Per Bothner  (bothner at cygnus.com)
+
+	* aout64.h:  Move common sunos-specific test
+	to recognize shared libraries into new macro N_SHARED_LIB.
+	Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
+
+1991-11-30  Steve Chamberlain  (sac at rtl.cygnus.com)
+
+	* aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
+	stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
+	directory.
+
+
+Copyright (C) 1991-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/dynix3.h ./include/aout/dynix3.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/dynix3.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/dynix3.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* a.out specifics for Sequent Symmetry running Dynix 3.x
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -69,19 +69,19 @@ struct dynix_external_exec
 
 #define N_TXTOFF(x) (EXEC_BYTES_SIZE)
 #define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
-#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
-#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
-#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
-#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
-#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
+#define N_SHDATOFF(x) (N_DATOFF(x) + (x)->a_data)
+#define N_TRELOFF(x) (N_SHDATOFF(x) + (x)->a_shdata)
+#define N_DRELOFF(x) (N_TRELOFF(x) + (x)->a_trsize)
+#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x)->a_drsize)
+#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x)->a_shdrsize)
+#define N_STROFF(x) (N_SYMOFF(x) + (x)->a_syms)
 
 #define N_TXTADDR(x) \
 	(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
 	 : TEXT_START_ADDR + EXEC_BYTES_SIZE)
 
 #define N_TXTSIZE(x) \
-	(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
-	 : ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
+	(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x)->a_text) \
+	 : ((x)->a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
 
 #endif /* A_OUT_DYNIX3_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/encap.h ./include/aout/encap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/encap.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/encap.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Yet Another Try at encapsulating bfd object files in coff.
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
    Written by Pace Willisson 12/9/88
 
    This file is obsolete.  It needs to be converted to just define a bunch
@@ -131,5 +131,5 @@ short __header_offset_temp;
 
 #define N_DATADDR(x) \
 	((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
-	 (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
-	 (N_TXTADDR(x)+(x).a_text))
+	 (SEGMENT_SIZE + ((N_TXTADDR(x)+(x)->a_text-1) & ~(SEGMENT_SIZE-1))) : \
+	 (N_TXTADDR(x)+(x)->a_text))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/host.h ./include/aout/host.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/host.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/host.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* host.h - Parameters about the a.out format, based on the host system
    on which the program is compiled. 
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hp300hpux.h ./include/aout/hp300hpux.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hp300hpux.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/hp300hpux.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Special version of <a.out.h> for use under HP-UX.
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -113,18 +113,18 @@ struct hp300hpux_header_extension
 #undef N_STROFF
 
 #define N_DATOFF(x)	( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_PASOFF(x)     ( N_DATOFF(x) + (x).a_data)
-#define N_SYMOFF(x)	( N_PASOFF(x)   /* + (x).a_passize*/ )
-#define N_SUPOFF(x)     ( N_SYMOFF(x) + (x).a_syms )
-#define N_TRELOFF(x)	( N_SUPOFF(x)    /* + 0 (x).a_supsize*/ )
-#define N_DRELOFF(x)	( N_TRELOFF(x) + (x).a_trsize )
-#define N_EXTHOFF(x)    ( N_DRELOFF(x)   /*  + 0 (x).a_drsize */)
+#define N_PASOFF(x)     ( N_DATOFF(x) + (x)->a_data)
+#define N_SYMOFF(x)	( N_PASOFF(x)   /* + (x)->a_passize*/ )
+#define N_SUPOFF(x)     ( N_SYMOFF(x) + (x)->a_syms )
+#define N_TRELOFF(x)	( N_SUPOFF(x)    /* + (x)->a_supsize*/ )
+#define N_DRELOFF(x)	( N_TRELOFF(x) + (x)->a_trsize )
+#define N_EXTHOFF(x)    ( N_DRELOFF(x)   /*  + (x)->a_drsize */)
 #define N_STROFF(x)	( 0 /* no string table */ )
 
 /* use these when the file has gnu symbol tables */
-#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
-#define N_GNU_SYMOFF(x)  (N_GNU_DRELOFF(x) + (x).a_drsize)
+#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x)->a_data)
+#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x)->a_trsize)
+#define N_GNU_SYMOFF(x)  (N_GNU_DRELOFF(x) + (x)->a_drsize)
 
 #define TARGET_PAGE_SIZE 0x1000
 #define SEGMENT_SIZE 0x1000
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hp.h ./include/aout/hp.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hp.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/hp.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Special version of <a.out.h> for use under HP-UX.
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -60,10 +60,10 @@ struct exec
 #undef N_SET_MACHTYPE
 #undef N_SET_FLAGS
 
-#define N_MAGIC(exec) ((exec) . a_magic)
-#define N_MACHTYPE(exec) ((exec) . a_machtype)
-#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
-#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
+#define N_MAGIC(execp) ((execp)->a_magic)
+#define N_MACHTYPE(execp) ((execp)->a_machtype)
+#define N_SET_MAGIC(execp, magic) (((execp)->a_magic) = (magic))
+#define N_SET_MACHTYPE(execp, machtype) (((execp)->a_machtype) = (machtype))
 
 #undef N_BADMAG
 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hppa.h ./include/aout/hppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/hppa.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/hppa.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ranlib.h ./include/aout/ranlib.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/ranlib.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/ranlib.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ranlib.h -- archive library index member definition for GNU.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/reloc.h ./include/aout/reloc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/reloc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/reloc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* reloc.h -- Header file for relocation information.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/stab.def ./include/aout/stab.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/stab.def	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/stab.def	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Table of DBX symbol codes for the GNU system.
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/stab_gnu.h ./include/aout/stab_gnu.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/stab_gnu.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/stab_gnu.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* gnu_stab.h  Definitions for GNU extensions to STABS
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/sun4.h ./include/aout/sun4.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/aout/sun4.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/aout/sun4.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* SPARC-specific values for a.out files 
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -44,8 +44,8 @@
    expected text address.  These kludges have gotta go!
    For linked files, should reflect reality if we know it.  */
 
-#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR \
-			 && (x).a_text >= EXEC_BYTES_SIZE)
+#define N_SHARED_LIB(x) ((x)->a_entry < TEXT_START_ADDR \
+			 && (x)->a_text >= EXEC_BYTES_SIZE)
 
 /* This differs from the version in aout64.h (which we override by defining
    it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
@@ -53,7 +53,7 @@
 
 #define N_TXTADDR(x) \
     (N_MAGIC(x)==OMAGIC? 0 \
-     : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
+     : (N_MAGIC(x) == ZMAGIC && (x)->a_entry < TEXT_START_ADDR)? 0 \
      : TEXT_START_ADDR+EXEC_BYTES_SIZE)
 
 /* When a file is linked against a shared library on SunOS 4, the
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/bfdlink.h ./include/bfdlink.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/bfdlink.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/bfdlink.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* bfdlink.h -- header file for BFD link routines
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -42,6 +42,15 @@ enum bfd_link_discard
   discard_all		/* Discard all locals.  */
 };
 
+/* Whether to generate ELF common symbols with the STT_COMMON type
+   during a relocatable link.  */
+enum bfd_link_elf_stt_common
+{
+  unchanged,
+  elf_stt_common,
+  no_elf_stt_common
+};
+
 /* Describes the type of hash table entry structure being used.
    Different hash table structure have different fields and so
    support different linking features.  */
@@ -99,6 +108,9 @@ struct bfd_link_hash_entry
      in a linker script.  */
   unsigned int linker_def : 1;
 
+  /* Symbol defined in a linker script.  */
+  unsigned int ldscript_def : 1;
+
   /* A union of information depending upon the type.  */
   union
     {
@@ -126,21 +138,29 @@ struct bfd_link_hash_entry
 	     automatically be non-NULL since the symbol will have been on the
 	     undefined symbol list.  */
 	  struct bfd_link_hash_entry *next;
-	  bfd *abfd;		/* BFD symbol was found in.  */
+	  /* BFD symbol was found in.  */
+	  bfd *abfd;
+	  /* For __start_<name> and __stop_<name> symbols, the first
+	     input section matching the name.  */
+	  asection *section;
 	} undef;
       /* bfd_link_hash_defined, bfd_link_hash_defweak.  */
       struct
 	{
 	  struct bfd_link_hash_entry *next;
-	  asection *section;	/* Symbol section.  */
-	  bfd_vma value;	/* Symbol value.  */
+	  /* Symbol section.  */
+	  asection *section;
+	  /* Symbol value.  */
+	  bfd_vma value;
 	} def;
       /* bfd_link_hash_indirect, bfd_link_hash_warning.  */
       struct
 	{
 	  struct bfd_link_hash_entry *next;
-	  struct bfd_link_hash_entry *link;	/* Real symbol.  */
-	  const char *warning;	/* Warning (bfd_link_hash_warning only).  */
+	  /* Real symbol.  */
+	  struct bfd_link_hash_entry *link;
+	  /* Warning message (bfd_link_hash_warning only).  */
+	  const char *warning;
 	} i;
       /* bfd_link_hash_common.  */
       struct
@@ -156,7 +176,8 @@ struct bfd_link_hash_entry
 	     the union; this structure is a major space user in the
 	     linker.  */
 	  struct bfd_link_hash_common_entry *p;
-	  bfd_size_type size;	/* Common symbol size.  */
+	  /* Common symbol size.  */
+	  bfd_size_type size;
 	} c;
     } u;
 };
@@ -217,6 +238,11 @@ extern void bfd_link_repair_undef_list
 /* Read symbols and cache symbol pointer array in outsymbols.  */
 extern bfd_boolean bfd_generic_link_read_symbols (bfd *);
 
+/* Check the relocs in the BFD.  Called after all the input
+   files have been loaded, and garbage collection has tagged
+   any unneeded sections.  */
+extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *);
+
 struct bfd_sym_chain
 {
   struct bfd_sym_chain *next;
@@ -259,22 +285,30 @@ struct flag_info
 struct bfd_elf_dynamic_list;
 struct bfd_elf_version_tree;
 
+/* Types of output.  */
+
+enum output_type
+{
+  type_pde,
+  type_pie,
+  type_relocatable,
+  type_dll,
+};
+
+#define bfd_link_pde(info)	   ((info)->type == type_pde)
+#define bfd_link_dll(info)	   ((info)->type == type_dll)
+#define bfd_link_relocatable(info) ((info)->type == type_relocatable)
+#define bfd_link_pie(info)	   ((info)->type == type_pie)
+#define bfd_link_executable(info)  (bfd_link_pde (info) || bfd_link_pie (info))
+#define bfd_link_pic(info)	   (bfd_link_dll (info) || bfd_link_pie (info))
+
 /* This structure holds all the information needed to communicate
    between BFD and the linker when doing a link.  */
 
 struct bfd_link_info
 {
-  /* TRUE if BFD should generate a shared object (or a pie).  */
-  unsigned int shared: 1;
-
-  /* TRUE if generating an executable, position independent or not.  */
-  unsigned int executable : 1;
-
-  /* TRUE if generating a position independent executable.  */
-  unsigned int pie: 1;
-
-  /* TRUE if BFD should generate a relocatable object file.  */
-  unsigned int relocatable: 1;
+  /* Output type.  */
+  ENUM_BITFIELD (output_type) type : 2;
 
   /* TRUE if BFD should pre-bind symbols in a shared object.  */
   unsigned int symbolic: 1;
@@ -294,6 +328,9 @@ struct bfd_link_info
   /* TRUE if unreferenced sections should be removed.  */
   unsigned int gc_sections: 1;
 
+  /* TRUE if exported symbols should be kept during section gc.  */
+  unsigned int gc_keep_exported: 1;
+
   /* TRUE if every symbol should be reported back via the notice
      callback.  */
   unsigned int notice_all: 1;
@@ -313,6 +350,9 @@ struct bfd_link_info
   /* Which local symbols to discard.  */
   ENUM_BITFIELD (bfd_link_discard) discard : 2;
 
+  /* Whether to generate ELF common symbols with the STT_COMMON type.  */
+  ENUM_BITFIELD (bfd_link_elf_stt_common) elf_stt_common : 2;
+
   /* Criteria for skipping symbols when determining
      whether to include an object from an archive. */
   ENUM_BITFIELD (bfd_link_common_skip_ar_symbols) common_skip_ar_symbols : 2;
@@ -420,9 +460,25 @@ struct bfd_link_info
   /* TRUE if the linker script contained an explicit PHDRS command.  */
   unsigned int user_phdrs: 1;
 
+  /* TRUE if we should check relocations after all input files have
+     been opened.  */
+  unsigned int check_relocs_after_open_input: 1;
+
   /* TRUE if BND prefix in PLT entries is always generated.  */
   unsigned int bndplt: 1;
 
+  /* TRUE if generation of .interp/PT_INTERP should be suppressed.  */
+  unsigned int nointerp: 1;
+
+  /* TRUE if we shouldn't check relocation overflow.  */
+  unsigned int no_reloc_overflow_check: 1;
+
+  /* TRUE if generate a 1-byte NOP as suffix for x86 call instruction.  */
+  unsigned int call_nop_as_suffix : 1;
+
+  /* The 1-byte NOP for x86 call instruction.  */
+  char call_nop_byte;
+
   /* Char that may appear as the first char of a symbol, but should be
      skipped (like symbol_leading_char) when looking up symbols in
      wrap_hash.  Used by PowerPC Linux for 'dot' symbols.  */
@@ -482,6 +538,9 @@ struct bfd_link_info
   /* The output BFD.  */
   bfd *output_bfd;
 
+  /* The import library generated.  */
+  bfd *out_implib_bfd;
+
   /* The list of input BFD's involved in the link.  These are chained
      together via the link.next field.  */
   bfd *input_bfds;
@@ -525,6 +584,10 @@ struct bfd_link_info
      backend to decide.  */
   int extern_protected_data;
 
+  /* > 0 to treat undefined weak symbol in the executable as dynamic,
+     requiring dynamic relocation.  */
+  int dynamic_undefined_weak;
+
   /* Non-zero if auto-import thunks for DATA items in pei386 DLLs
      should be generated/linked against.  Set to 1 if this feature
      is explicitly requested by the user, -1 if enabled by default.  */
@@ -555,11 +618,7 @@ struct bfd_link_info
 };
 
 /* This structures holds a set of callback functions.  These are called
-   by the BFD linker routines.  Except for the info functions, the first
-   argument to each callback function is the bfd_link_info structure
-   being used and each function returns a boolean value.  If the
-   function returns FALSE, then the BFD function which called it should
-   return with a failure indication.  */
+   by the BFD linker routines.  */
 
 struct bfd_link_callbacks
 {
@@ -568,14 +627,15 @@ struct bfd_link_callbacks
      name of the symbol which caused the archive element to be pulled
      in.  This function may set *SUBSBFD to point to an alternative
      BFD from which symbols should in fact be added in place of the
-     original BFD's symbols.  */
+     original BFD's symbols.  Returns TRUE if the object should be
+     added, FALSE if it should be skipped.  */
   bfd_boolean (*add_archive_element)
     (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
   /* A function which is called when a symbol is found with multiple
      definitions.  H is the symbol which is defined multiple times.
      NBFD is the new BFD, NSEC is the new section, and NVAL is the new
      value.  NSEC may be bfd_com_section or bfd_ind_section.  */
-  bfd_boolean (*multiple_definition)
+  void (*multiple_definition)
     (struct bfd_link_info *, struct bfd_link_hash_entry *h,
      bfd *nbfd, asection *nsec, bfd_vma nval);
   /* A function which is called when a common symbol is defined
@@ -584,7 +644,7 @@ struct bfd_link_callbacks
      symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
      bfd_link_hash_indirect.  If NTYPE is bfd_link_hash_common, NSIZE
      is the size of the new symbol.  */
-  bfd_boolean (*multiple_common)
+  void (*multiple_common)
     (struct bfd_link_info *, struct bfd_link_hash_entry *h,
      bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
   /* A function which is called to add a symbol to a set.  ENTRY is
@@ -593,7 +653,7 @@ struct bfd_link_callbacks
      the set when generating a relocatable file, and is also used to
      get the size of the entry when generating an executable file.
      ABFD, SEC and VALUE identify the value to add to the set.  */
-  bfd_boolean (*add_to_set)
+  void (*add_to_set)
     (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
      bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
   /* A function which is called when the name of a g++ constructor or
@@ -602,7 +662,7 @@ struct bfd_link_callbacks
      destructor.  This will use BFD_RELOC_CTOR when generating a
      relocatable file.  NAME is the name of the symbol found.  ABFD,
      SECTION and VALUE are the value of the symbol.  */
-  bfd_boolean (*constructor)
+  void (*constructor)
     (struct bfd_link_info *, bfd_boolean constructor, const char *name,
      bfd *abfd, asection *sec, bfd_vma value);
   /* A function which is called to issue a linker warning.  For
@@ -612,7 +672,7 @@ struct bfd_link_callbacks
      there is none.  ABFD, SECTION and ADDRESS identify the location
      which trigerred the warning; either ABFD or SECTION or both may
      be NULL if the location is not known.  */
-  bfd_boolean (*warning)
+  void (*warning)
     (struct bfd_link_info *, const char *warning, const char *symbol,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a relocation is attempted against
@@ -620,7 +680,7 @@ struct bfd_link_callbacks
      ABFD, SECTION and ADDRESS identify the location from which the
      reference is made. IS_FATAL indicates whether an undefined symbol is
      a fatal error or not. In some cases SECTION may be NULL.  */
-  bfd_boolean (*undefined_symbol)
+  void (*undefined_symbol)
     (struct bfd_link_info *, const char *name, bfd *abfd,
      asection *section, bfd_vma address, bfd_boolean is_fatal);
   /* A function which is called when a reloc overflow occurs. ENTRY is
@@ -631,7 +691,7 @@ struct bfd_link_callbacks
      location at which the overflow occurs; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*reloc_overflow)
+  void (*reloc_overflow)
     (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
      const char *name, const char *reloc_name, bfd_vma addend,
      bfd *abfd, asection *section, bfd_vma address);
@@ -641,7 +701,7 @@ struct bfd_link_callbacks
      problem occurred; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*reloc_dangerous)
+  void (*reloc_dangerous)
     (struct bfd_link_info *, const char *message,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a reloc is found to be attached
@@ -650,7 +710,7 @@ struct bfd_link_callbacks
      the reloc; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*unattached_reloc)
+  void (*unattached_reloc)
     (struct bfd_link_info *, const char *name,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a symbol in notice_hash is
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/binary-io.h ./include/binary-io.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/binary-io.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/binary-io.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/bout.h ./include/bout.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/bout.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/bout.h	2017-03-06 01:49:08.000000000 +0000
@@ -2,7 +2,7 @@
    GNU tools modified to support the i80960 (or tools that operate on
    object files created by such tools).
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -87,16 +87,16 @@ struct external_exec
 
 /* These macros use the a_xxx field names, since they operate on the exec
    structure after it's been byte-swapped and realigned on the host machine.  */
-#define N_BADMAG(x)	(((x).a_info)!=BMAGIC)
+#define N_BADMAG(x)	(((x)->a_info)!=BMAGIC)
 #define N_TXTOFF(x)	EXEC_BYTES_SIZE
-#define N_DATOFF(x)	( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x)	( N_DATOFF(x) + (x).a_data )
+#define N_DATOFF(x)	( N_TXTOFF(x) + (x)->a_text )
+#define N_TROFF(x)	( N_DATOFF(x) + (x)->a_data )
 #define N_TRELOFF	N_TROFF
-#define N_DROFF(x)	( N_TROFF(x) + (x).a_trsize )
+#define N_DROFF(x)	( N_TROFF(x) + (x)->a_trsize )
 #define N_DRELOFF	N_DROFF
-#define N_SYMOFF(x)	( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x)	( N_SYMOFF(x) + (x).a_syms )
-#define N_DATADDR(x)	( (x).a_dload )    
+#define N_SYMOFF(x)	( N_DROFF(x) + (x)->a_drsize )
+#define N_STROFF(x)	( N_SYMOFF(x) + (x)->a_syms )
+#define N_DATADDR(x)	( (x)->a_dload )
 
 /* Address of text segment in memory after it is loaded.  */
 #if !defined (N_TXTADDR)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/basic-modes.h ./include/cgen/basic-modes.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/basic-modes.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/cgen/basic-modes.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Basic CGEN modes.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
    This file is part of the GNU opcodes library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/basic-ops.h ./include/cgen/basic-ops.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/basic-ops.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/cgen/basic-ops.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Basic semantics ops support for CGEN.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
    This file is part of the GNU opcodes library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/bitset.h ./include/cgen/bitset.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/bitset.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/cgen/bitset.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Header file the type CGEN_BITSET.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/ChangeLog ./include/cgen/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/cgen/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2014-01-06  Tom Tromey  <tromey@redhat.com>
-
-	* bitset.h: Remove uses of PARAMS.
-
-2013-07-18  Andrew Neitsch  <andrew@neitsch.ca>
-
-	PR binutils/15728
-	* basic-ops.h: (SUBWORDSIQI) Make declaration static.
-	* (SUBWORDSIHI): Likewise.
-	* (SUBWORDDIQI): Likewise.
-	* (SUBWORDDIHI): Likewise.
-	* (SUBWORDDISI): Likewise.
-
-2010-01-05  Doug Evans  <dje@sebabeach.org>
-
-	* basic-modes.h (MAKEDI): New macro.
-
-2009-10-23  Doug Evans  <dje@sebabeach.org>
-
-	* basic-modes.h: New file.  Moved here from opcodes/cgen-types.h.
-	* basic-ops.h: New file.  Moved here from opcodes/cgen-ops.h.
-	* bitset.h: New file.  Moved here from ../opcode/cgen-bitset.h.
-	Update license to GPL v3.
-
-Copyright (C) 2009-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/ChangeLog-0915 ./include/cgen/ChangeLog-0915
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/cgen/ChangeLog-0915	1970-01-01 00:00:00.000000000 +0000
+++ ./include/cgen/ChangeLog-0915	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,44 @@
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2014-01-06  Tom Tromey  <tromey@redhat.com>
+
+	* bitset.h: Remove uses of PARAMS.
+
+2013-07-18  Andrew Neitsch  <andrew@neitsch.ca>
+
+	PR binutils/15728
+	* basic-ops.h: (SUBWORDSIQI) Make declaration static.
+	* (SUBWORDSIHI): Likewise.
+	* (SUBWORDDIQI): Likewise.
+	* (SUBWORDDIHI): Likewise.
+	* (SUBWORDDISI): Likewise.
+
+2010-01-05  Doug Evans  <dje@sebabeach.org>
+
+	* basic-modes.h (MAKEDI): New macro.
+
+2009-10-23  Doug Evans  <dje@sebabeach.org>
+
+	* basic-modes.h: New file.  Moved here from opcodes/cgen-types.h.
+	* basic-ops.h: New file.  Moved here from opcodes/cgen-ops.h.
+	* bitset.h: New file.  Moved here from ../opcode/cgen-bitset.h.
+	Update license to GPL v3.
+
+Copyright (C) 2009-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog ./include/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/ChangeLog	2017-03-06 01:49:08.000000000 +0000
@@ -1,2266 +1,173 @@
-2015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
+2017-03-01  Nick Clifton  <nickc@redhat.com>
 
-	* elf/mips.h (DT_MIPS_RLD_MAP_REL): New macro.
+	* elf/common.h (SHF_GNU_BUILD_NOTE): Define.
+	(NT_GNU_PROPERTY_TYPE_0): Define.
+	(NT_GNU_BUILD_ATTRIBUTE_OPEN): Define.
+	(NT_GNU_BUILD_ATTRIBUTE_FUN): Define.
+	(GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC): Define.
+	(GNU_BUILD_ATTRIBUTE_TYPE_STRING): Define.
+	(GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE): Define.
+	(GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE): Define.
+	(GNU_BUILD_ATTRIBUTE_VERSION): Define.
+	(GNU_BUILD_ATTRIBUTE_STACK_PROT): Define.
+	(GNU_BUILD_ATTRIBUTE_RELRO): Define.
+	(GNU_BUILD_ATTRIBUTE_STACK_SIZE): Define.
+	(GNU_BUILD_ATTRIBUTE_TOOL): Define.
+	(GNU_BUILD_ATTRIBUTE_ABI): Define.
+	(GNU_BUILD_ATTRIBUTE_PIC): Define.
+	(NOTE_GNU_PROPERTY_SECTION_NAME): Define.
+	(GNU_BUILD_ATTRS_SECTION_NAME): Define.
+	(GNU_PROPERTY_STACK_SIZE): Define.
+	(GNU_PROPERTY_NO_COPY_ON_PROTECTED): Define.
+	(GNU_PROPERTY_X86_ISA_1_USED): Define.
+	(GNU_PROPERTY_X86_ISA_1_NEEDED): Define.
+	(GNU_PROPERTY_X86_ISA_1_486): Define.
+	(GNU_PROPERTY_X86_ISA_1_586): Define.
+	(GNU_PROPERTY_X86_ISA_1_686): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSE): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSE2): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSE3): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSSE3): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSE4_1): Define.
+	(GNU_PROPERTY_X86_ISA_1_SSE4_2): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX2): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512F): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512CD): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512ER): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512PF): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512VL): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512DQ): Define.
+	(GNU_PROPERTY_X86_ISA_1_AVX512BW): Define.
+
+2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* dis-asm.h (disasm_options_t): New typedef.
+	(parse_arm_disassembler_option): Remove prototype.
+	(set_arm_regname_option): Likewise.
+	(get_arm_regnames): Likewise.
+	(get_arm_regname_num_options): Likewise.
+	(disassemble_init_s390): New prototype.
+	(disassembler_options_powerpc): Likewise.
+	(disassembler_options_arm): Likewise.
+	(disassembler_options_s390): Likewise.
+	(remove_whitespace_and_extra_commas): Likewise.
+	(disassembler_options_cmp): Likewise.
+	(next_disassembler_option): New inline function.
+	(FOR_EACH_DISASSEMBLER_OPTION): New macro.
+
+2017-02-28  Alan Modra  <amodra@gmail.com>
+
+	* elf/ppc64.h (R_PPC64_16DX_HA): New.  Expand fake reloc comment.
+	* elf/ppc.h (R_PPC_16DX_HA): Likewise.
+
+2017-02-24  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_S4x16)
+	(AARCH64_OPND_SVE_IMM_ROT1, AARCH64_OPND_SVE_IMM_ROT2)
+	(AARCH64_OPND_SVE_Zm3_INDEX, AARCH64_OPND_SVE_Zm3_22_INDEX)
+	(AARCH64_OPND_SVE_Zm4_INDEX): New aarch64_opnds.
+
+2017-02-24  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_FEATURE_COMPNUM): New macro.
+	(AARCH64_ARCH_V8_3): Include AARCH64_FEATURE_COMPNUM.
+
+2017-02-22  Andrew Waterman  <andrew@sifive.com>
+
+	* opcode/riscv-opc.h (CSR_SCOUNTEREN): New define.
+	(CSR_MCOUNTEREN): Likewise.
+	(scounteren): Declare register.
+	(mcounteren): Likewise.
+
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+	* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
+	(MASK_SFENCE_VMA): Likewise.
+	(sfence_vma): Declare instruction.
+
+2017-02-14  Alan Modra  <amodra@gmail.com>
+
+	PR 21118
+	* opcode/ppc.h (PPC_OPERAND_*): Reassign values, regs first.
+	(PPC_OPERAND_SPR, PPC_OPERAND_GQR): Define.
+
+2017-01-24  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+        * opcode/hppa.h: Clarify that file is part of GNU opcodes.
+        * opcode/i860.h: Ditto.
+        * opcode/nios2.h: Ditto.
+        * opcode/nios2r1.h: Ditto.
+        * opcode/nios2r2.h: Ditto.
+        * opcode/pru.h: Ditto.
+
+2017-01-24  Alan Hayward  <alan.hayward@arm.com>
+
+	* elf/common.h (NT_ARM_SVE): Define.
+
+2017-01-04  Jiong Wang  <jiong.wang@arm.com>
+
+	* dwarf2.def: Sync with mainline gcc sources.
+
+	2017-01-04  Richard Earnshaw  <rearnsha@arm.com>
+		    Jiong Wang  <jiong.wang@arm.com>
+
+	* dwarf2.def (DW_OP_AARCH64_operation): Reserve the number 0xea.
+	(DW_CFA_GNU_window_save): Comments the multiplexing on AArch64.
+
+2017-01-04  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (AARCH64_FEATURE_RCPC): Define.
+	(AARCH64_ARCH_V8_3): Update.
+
+2017-01-03  Kito Cheng  <kito.cheng@gmail.com>
+
+	* opcode/riscv-opc.h: Add support for the "q" ISA extension.
+
+2017-01-03  Nick Clifton  <nickc@redhat.com>
+
+	* dwarf2.def: Sync with mainline gcc sources
+	* dwarf2.h: Likewise.
+
+	2016-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.def (DW_FORM_ref_sup): Renamed to ...
+	(DW_FORM_ref_sup4): ... this.  New form.
+	(DW_FORM_ref_sup8): New form.
+
+	2016-10-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (enum dwarf_calling_convention): Add new DWARF5
+	calling convention codes.
+	(enum dwarf_line_number_content_type): New.
+	(enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_*
+	codes.
+	(enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes.
+	(enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes.
+	(enum dwarf_name_index_attribute): New.
+	(enum dwarf_range_list_entry): New.
+	(enum dwarf_unit_type): New.
+	* dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*,
+	DW_OP_* and DW_ATE_* entries.
+
+	2016-08-15  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.def (DW_AT_string_length_bit_size,
+	DW_AT_string_length_byte_size): New attributes.
+
+	2016-08-12  Alexandre Oliva <aoliva@redhat.com>
+
+	PR debug/63240
+	* dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New.
+	* dwarf2.h (enum dwarf_defaulted_attribute): New.
 
-2015-06-22  Nick Clifton  <nickc@redhat.com>
-
-	* dis-asm.h (struct disassemble_info): Add stop_vma field.
-
-2015-05-28  Catherine Moore  <clm@codesourcery.com>
-
-	include/
-	* bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type.
-
-2015-05-22  Yunlian Jiang  <yunlian@google.com>
-
-	* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
-	not defined.
-
-2015-05-12  Jiong Wang  <jiong.wang@arm.com>
-
-	* elf/aarch64.h (R_AARCH64_P32_LD32_GOTPAGE_LO14): New enumeration.
-
-2015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	Merge with gcc:
-	2014-11-11  Anthony Brandon  <anthony.brandon@gmail.com>
-		    Manuel LÃ³pez-IbÃ¡Ã±ez  <manu@gcc.gnu.org>
-
-	PR driver/36312
-	* filenames.h: Add prototype for canonical_filename_eq.
-
-2015-04-30  DJ Delorie  <dj@redhat.com>
-
-	* dis-asm.h (print_insn_rl78_g10): New.
-	(print_insn_rl78_g13): New.
-	(print_insn_rl78_g14): New.
-	(rl78_get_disassembler): New.
-
-2015-04-17  Richard Earnshaw  <rearnsha@arm.com>
-
-	Merge from gcc:
-	2015-03-19  Richard Biener  <rguenther@suse.de>
-
-		* partition.h (struct partition_elem): Re-order elements to
-		avoid padding.
-
-2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Add compress_debug.
-
-2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/pr17709
-	* bfdlink.h (bfd_link_info): Add extern_protected_data.
-
-2015-03-10  Matthew Wahab  <matthew.wahab@arm.com>
-
-	PR ld/16572
-	* elf/arm.h (EF_ARM_HASENTRY): Remove.
-
-2015-02-19  Pedro Alves  <palves@redhat.com>
-
-	* floatformat.h [__cplusplus]: Wrap in extern "C".
-
-2015-02-14  Alan Modra  <amodra@gmail.com>
-
-	PR ld/17973
-	* bfdlink.h (struct bfd_link_info): Delete loading_lto_outputs.
-
-2015-02-09  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
-
-2015-02-09  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2.def: Add DW_TAG_atomic_type.
-
-2015-01-28  James Bowman  <james.bowman@ftdichip.com>
-
-	* dis-asm.h (print_insn_ft32): Declare.
-
-2015-01-15  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2.def (DW_AT_noreturn): New DWARF5 attribute.
-
-2015-01-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
-
-	* libiberty.h: Merge from GCC.
-
-2015-01-01  Alan Modra  <amodra@gmail.com>
+2017-01-02  Alan Modra  <amodra@gmail.com>
 
 	Update year range in copyright notice of all files.
 
-2014-12-24  Uros Bizjak  <ubizjak@gmail.com>
-	    Ben Elliston  <bje@au.ibm.com>
-	    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
-
-	* libiberty.h (xasprintf): Declare.
-
-2014-12-23  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref.  Add
-	linker_def.
-
-2014-12-12  Phil Muldoon  <pmuldoon@redhat.com>
-	    Jan Kratochvil  <jan.kratochvil@redhat.com>
-	    Tom Tromey  <tromey@redhat.com>
-
-	* gcc-c-fe.def: New file.
-	* gcc-c-interface.h: New file.
-	* gcc-interface.h: New file.
-
-2014-12-11  Uros Bizjak  <ubizjak@gmail.com>
-            Ben Elliston  <bje@au.ibm.com>
-            Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
-
-	* libiberty.h (xvasprintf): Declare.
-
-2014-12-06  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* dis-asm.h (print_insn_visium): Declare.
-
-2014-11-24  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
-	DW_LANG_C_plus_plus_14.
-
-2014-11-21  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
-
-	* dwarf2.def (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
-	(DW_AT_APPLE_isa, DW_AT_APPLE_block)
-	(DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
-	(DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
-	(DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
-	(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
-	(DW_AT_APPLE_property): New macros.
-
-2014-11-21  Mark Wielaard  <mjw@redhat.com>
-
-	PR debug/63239
-	* dwarf2.def (DW_AT_GNU_deleted): New attribute.
-
-2014-11-21  Terry Guo  <terry.guo@arm.com>
-
-	* opcode/arm.h (FPU_VFP_EXT_ARMV8xD): New macro.
-	(FPU_VFP_V5D16): Likewise.
-	(FPU_VFP_V5_SP_D16): Likewise.
-	(FPU_ARCH_VFP_V5D16): Likewise.
-	(FPU_ARCH_VFP_V5_SP_D16): Likewise.
-
-2014-11-18  Igor Zamyatin  <igor.zamyatin@intel.com>
-
-	* bfdlink.h (struct bfd_link_info): Add bndplt.
-
-2014-10-30  Andrew Pinski  <apinski@cavium.com>
-
-	* elf/mips.h (AFL_EXT_OCTEON3): Define.
-	INSN_OCTEON3, CPU_OCTEON3): Define.
-
-2014-10-28  Yury Gribov  <y.gribov@samsung.com>
-
-	* libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
-
-2014-10-22  Matthew Fortune  <matthew.fortune@imgtec.com>
-
-	* elf/mips.h (AFL_ASE_MASK): Define.
-
-2014-10-15  David Malcolm  <dmalcolm@redhat.com>
-
-	* libiberty.h (choose_tmpdir): New prototype.
-
-2014-09-26  Max Ostapenko  <m.ostapenko@partner.samsung.com>
-
-	* libiberty.h (PEX_STDOUT_APPEND): New flag.
-	(PEX_STDERR_APPEND): Likewise.
-
-2014-09-23  Iain Buclaw  <ibuclaw@gdcproject.org>
-
-	* demangle.h (DMGL_DLANG): New macro.
-	(DMGL_STYLE_MASK): Add DMGL_DLANG.
-	(demangling_styles): Add dlang_demangling.
-	(DLANG_DEMANGLING_STYLE_STRING): New macro.
-	(DLANG_DEMANGLING): New macro.
-	(dlang_demangle): New prototype.
-
-2014-09-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* longlong.h: Add __udiv_w_sdiv prototype.
-
-2014-08-12  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_callbacks <notice>): Remove "string"
-	param, add "inh".
-
-2014-08-12  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_info): Add lto_plugin_active.
-
-2014-07-29  Matthew Fortune  <matthew.fortune@imgtec.com>
-
-	* elf/mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define.
-	(Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64.
-	(Val_GNU_MIPS_ABI_FP_64): Redefine.
-	(Val_GNU_MIPS_ABI_FP_XX): Define.
-	(Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures.
-	(AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define.
-	(AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise.
-	(AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise.
-	(AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise.
-	(AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise.
-	(AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise.
-	(AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise.
-	(AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise.
-	(AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise.
-	(AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise.
-	(AFL_EXT_LOONGSON_2F): Likewise.
-	(bfd_mips_elf_swap_abiflags_v0_in): Prototype.
-	(bfd_mips_elf_swap_abiflags_v0_out): Likewise.
-	(bfd_mips_isa_ext): Likewise.
-
-2014-06-13  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field.
-
-2014-06-13  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h: Update for bfd.link_next change.
-
-2014-06-10  Alan Modra  <amodra@gmail.com>
-
-	PR ld/16910
-	* bfdlink.h (unwrap_hash_lookup): Declare.
-
-2014-05-01  Steve Ellcey  <sellcey@mips.com>
-
-	* include/longlong.h: Import latest version from GCC tree.
-
-2014-04-23  Andrew Bennett  <andrew.bennett@imgtec.com>
-
-	* opcode/mips.h (ASE_XPA): New define.
-
-2014-04-22  Christian Svensson  <blue@cmd.nu>
-
-	* dis-asm.h: Remove openrisc and or32 support.  Add support for or1k.
-
-2014-04-10  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
-
-	* elf/avr.h: Add new DIFF relocs.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2014-01-21  Tom Tromey  <tromey@redhat.com>
-
-	* ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS)
-	(VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST)
-	(VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS)
-	(NOARGS): Don't define.
-	* libiberty.h (expandargv, writeargv): Don't use PARAMS.
-
-2014-01-09  Tom Tromey  <tromey@redhat.com>
-
-	* gdbm.h: Remove.
-
-2013-12-23  Bill Maddox  <maddox@google.com>
-
-	* demangle.h (enum gnu_v3_ctor_kinds):
-	Added literal gnu_v3_unified_ctor.
-	(enum gnu_v3_ctor_kinds):
-	Added literal gnu_v3_unified_dtor.
-
-2013-12-13  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
-	    Wei-Cheng Wang  <cole945@gmail.com>
-
-	* dis-asm.h (print_insn_nds32): Add nds32 target.
-
-2013-12-04  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* longlong.h: New file.
-
-2013-11-11  Catherine Moore  <clm@codesourcery.com>
-
-	* opcode/mips.h (INSN_LOAD_MEMORY_DELAY): Rename to...
-	(INSN_LOAD_MEMORY): ...this.
-
-2013-10-29  Marc Glisse  <marc.glisse@inria.fr>
-
-	PR tree-optimization/58689
-	* ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
-	* libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
-	concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
-	(concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
-	xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
-	Mark with attribute returns_nonnull.
-
-2013-10-22  Sterling Augustine  <saugustine@google.com>
-
-	* gdb/gdb-index.h: Merge from gdb tree.
-
-2013-10-10  Sean Keys <skeys@ipdatasys.com>
-
-	* xgate.h : Cleanup after opcode
-        table modification..
-
-2013-08-20  Alan Modra  <amodra@gmail.com>
-
-	* floatformat.h (floatformat_ibm_long_double): Delete.
-	(floatformat_ibm_long_double_big): Declare.
-	(floatformat_ibm_long_double_little): Declare.
-
-2013-08-19  Dehao Chen  <dehao@google.com>
-
-	* dwarf2.def (DW_AT_GNU_discriminator): New attribute.
-
-2013-08-02  Caroline Tice  <cmtice@google.com>
-
-	* vtv-change-permission.h: New file.
-
-2013-08-05  Eric Botcazou  <ebotcazou@adacore.com>
-            Konrad Eisele  <konrad@gaisler.com>
-
-	* opcode/sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_LEON.
-
-2013-06-08  Catherine Moore  <clm@codesourcery.com>
-
-	* opcode/mips.h (mips_opcode): Add ase field.
-	(INSN_ASE_MASK): Delete.
-	(INSN_DSP): Rename to ASE_DSP.  Provide new value.
-	(INSN_DSPR2): Rename to ASE_DSPR2.  Provide new value.
-	(INSN_MCU): Rename to ASE_MCU.  Provide new value.
-	(INSN_MDMX): Rename to ASE_MDMX.  Provide new value.
-	(INSN_MIPS3d): Rename to ASE_MIPS3D.  Provide new value.
-	(INSN_MT): Rename to ASE_MT.  Provide new value.
-	(INSN_SMARTMIPS): Rename to ASE_SMARTMIPS.  Provide new value.
-	(INSN_VIRT): Rename to ASE_VIRT.  Provide new value.
-	(INSN_VIRT64): Rename to ASE_VIRT64.  Provide new value.
-	(opcode_is_member): Add ase argument.  Check ase.
-
-2013-05-06  Paul Brook  <paul@codesourcery.com>
-
-        include/elf/
-        * mips.h (R_MIPS_PC32): Update comment.
-
-2013-04-03  Jason Merrill  <jason@redhat.com>
-
-	Demangle C++11 ref-qualifier.
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_REFERENCE_THIS,
-	DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS.
-
-2013-03-12  Sebastian Huber <sebastian.huber@embedded-brains.de>
-
-	* opcode/nios2.h: Edit comment.
-
-2013-03-11  Sebastian Huber <sebastian.huber@embedded-brains.de>
-
-	* opcode/nios2.h (OPX_WRPRS): New define.
-	(OP_MATCH_WRPRS): Likewise.
-
-2013-03-11  Sebastian Huber <sebastian.huber@embedded-brains.de>
-
-	* opcode/nios2.h (OP_RDPRS): New define.
-	(OP_MATCH_RDPRS): Likewise.
-
-2013-03-01  Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.h (enum dwarf_sect): New enum type.
-
-2013-02-19  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_info): Delete emit_note_gnu_build_id.
-
-2013-02-11  Sriraman Tallam  <tmsriram@google.com>
-
-	* plugin-api.h (enum ld_plugin_level): Assign integers
-	explicitly for all values.
-
-2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
-            Andrew Jenner <andrew@codesourcery.com>
-
-	Based on patches from Altera Corporation.
-
-	* dis-asm.h (print_insn_big_nios2): Declare.
-	(print_insn_little_nios2): Declare.
-
-2013-01-30  Kai Tietz  <ktietz@redhat.com>
-
-	PR other/54620
-	PR target/39064
-	* md5.h (md5_uintptr, md5_uint32): Define as uintptr_t/uint32_t if
-	stdint.h and sys/types.h headers are present.
-	* sha1.h (sha1_uintptr, sha1_uint32): Likewise.
-
-2013-01-10  Will Newton <will.newton@imgtec.com>
-
-	* dis-asm.h (print_insn_metag): New declaration.
-
-2012-12-18  Aldy Hernandez  <aldyh@redhat.com>
-
-	PR other/54324
-	* ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC
-	< 3.4.
-
-2012-12-17  Nick Clifton  <nickc@redhat.com>
-
-	* MAINTAINERS: Add copyright notice.
-	* alloca-conf.h: Likewise.
-	* fopen-bin.h: Likewise.
-	* fopen-same.h: Likewise.
-	* fopen-vms.h: Likewise.
-	* aout/hppa.h: Likewise.
-	* opcode/tahoe.h: Likewise.
-
-2012-12-11  Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
-	* elf/microblaze.h: Add TLS relocs to START_RELOC_NUMBERS
-
-2012-11-09  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_TAGGED_NAME.
-
-2012-10-29  Sterling Augustine  <saugustine@google.com>
-            Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.h (dwarf_location_list_entry_type): New enum with fields
-	DW_LLE_GNU_end_of_list_entry, DW_LLE_GNU_base_address_selection_entry,
-	DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry.
-
-
-2012-10-26  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
-
-	* dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
-	(DW_AT_APPLE_isa, DW_AT_APPLE_block)
-	(DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
-	(DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
-	(DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
-	(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
-	(DW_AT_APPLE_property, DW_OP_GNU_entry_value): New macros.
-
-2012-10-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Add
-	disable_target_specific_optimizations.
-
-2012-10-23  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* bfdlink.h (struct bfd_link_info): Add stacksize option.
-
-2012-10-22  Jan Beich  <jbeich@tormail.org>
-
-	PR ld/14426
-	* bfdlink.h (bfd_link_info): Add ignore_hash.
-
-2012-10-08  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER.
-
-2012-09-18  Florian Weimer  <fweimer@redhat.com>
-
-	PR other/54411
-	* objalloc.h (objalloc_alloc): Do not use fast path on wraparound.
-
-2012-09-27  Anthony Green  <green@moxielogic.com>
-
-	* opcode/moxie.h (MOXIE_BAD): New define.
-
-2012-09-12  Chris Schlumberger-Socha  <chris.schlumberger-socha@arm.com>
-
-	* elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.
-
-2012-09-06  Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.def: Edit comment.
-
-2012-08-24  Sriraman Tallam  <tmsriram@google.com>
-
-	* plugin-api.h (ld_plugin_allow_unique_segment_for_sections):
-	New interface.
-	(ld_plugin_unique_segment_for_sections): New interface.
-	(LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
-	(LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
-	(tv_allow_unique_segment_for_sections): New member.
-	(tv_unique_segment_for_sections): New member.
-
-2012-08-24  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
-
-	* opcode/arm.h (ARM_CPU_IS_ANY): New define.
-
-2012-08-24  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
-
-	* elf/arm.h (TAG_CPU_ARCH_V8): New define.
-	(MAX_TAG_CPU_ARCH): Update.
-	* opcode/arm.h (ARM_EXT_V8): New define.
-	(FPU_VFP_EXT_ARMV8): Likewise.
-	(FPU_NEON_EXT_ARMV8): Likewise.
-	(FPU_CRYPTO_EXT_ARMV8): Likewise.
-	(ARM_AEXT_V8A): Likewise.
-	(FPU_VFP_ARMV8): Likwise.
-	(FPU_NEON_ARMV8): Likewise.
-	(FPU_CRYPTO_ARMV8): Likewise.
-	(FPU_ARCH_VFP_ARMV8): Likewise.
-	(FPU_ARCH_NEON_VFP_ARMV8): Likewise.
-	(FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise.
-	(ARM_ARCH_V8A): Likwise.
-	(ARM_ARCH_V8A_FP): Likewise.
-	(ARM_ARCH_V8A_SIMD): Likewise.
-	(ARM_ARCH_V8A_CRYPTO): Likewise.
-
-2012-08-13  Ian Bolton  <ian.bolton@arm.com>
-            Laurent Desnogues  <laurent.desnogues@arm.com>
-            Jim MacArthur  <jim.macarthur@arm.com>
-            Marcus Shawcroft  <marcus.shawcroft@arm.com>
-            Nigel Stephens  <nigel.stephens@arm.com>
-            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-            Richard Earnshaw  <rearnsha@arm.com>
-            Sofiane Naci  <sofiane.naci@arm.com>
-            Tejas Belagod  <tejas.belagod@arm.com>
-            Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* dis-asm.h (print_insn_aarch64): New declaration.
-	(print_aarch64_disassembler_options): New declaration.
-	(aarch64_symbol_is_valid): New declaration.
-
-2012-08-02  Sean Keys  <skeys@ipdatasys.com>
-
-	* elf/m68hc11.h: #define E_M68HC11_NO_BANK_WARNING 0x000000200
-
-2012-07-24  Stephan McCamant  <smcc@cs.berkeley.edu>
-            Dr David Alan Gilbert  <dave@treblig.org>
-
-	PR binutils/13135
-	* dis-asm.h (fprintf_ftype): Add ATTRIBUTE_FPTR_PRINTF_2.
-
-2012-07-13  Doug Evans  <dje@google.com>
-
-	* filenames.h: #include "hashtab.h".
-	(filename_hash, filename_eq): Declare.
-
-2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc.
-
-2012-07-05  Sean Keys  <skeys@ipdatasys.com>
-
-	* opcode/xgate.h: Changed the format string for mode
-	XGATE_OP_DYA_MON.
-
-2012-06-18  Doug Evans  <dje@google.com>
-
-	* dwarf2.def (DW_OP): Add DW_OP_GNU_const_index.
-
-2012-06-12  Rafael Ã�vila de EspÃ­ndola <respindola@mozilla.com>
-
-	* plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE.
-
-2012-06-08  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.def (DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt): New
-	forms.
-	* dwarf2.h (enum dwarf_macro_record_type): Add
-	DW_MACRO_GNU_define_indirect_alt, DW_MACRO_GNU_undef_indirect_alt
-	and DW_MACRO_GNU_transparent_include_alt.
-
-2012-05-23  Doug Evans  <dje@google.com>
-
-	* leb128.h: #include stdint.h, inttypes.h.
-	(read_uleb128_to_uint64): Renamed from read_uleb128_to_ull.
-	Change to take a uint64_t * argument instead of unsigned long long.
-	(read_sleb128_to_uint64): Renamed from read_sleb128_to_ll.
-	Change to take an int64_t * argument instead of long long.
-
-2012-05-22  Doug Evans  <dje@google.com>
-
-	* leb128.h: New file.
-
-2012-05-19  Gary Funck  <gary@intrepid.com>
-
-	* dwarf2.def: Update comment re: UPC extensions to reference
-	DWARF4 specification.
-
-2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
-
-	* dis-asm.h (print_insn_m9s12x): Prototype.
-	(print_insn_m9s12xg): Prototype.
-
-2012-05-03  Sean Keys  <skeys@ipdatasys.com>
-
-	* dis-asm.h (print_insn_xgate): Define.
-	(print_insn_xgate): Ditto.
-	Added new files for XGATE port.
-
-2012-05-02  Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.def: Remove DW_FORM_GNU_ref_index,
-	replace DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base.
-
-2012-04-28  Doug Evans  <dje@google.com>
-
-	* dwarf2.def (DW_OP): Add DW_OP_GNU_addr_index.
-
-2012-04-27  Tom Tromey  <tromey@redhat.com>
-
-	* dwarf2.h: Wrap function declarations in extern "C".
-
-2012-04-27  Tom Tromey  <tromey@redhat.com>
-
-	* dwarf2.h (enum dwarf_tag, enum dwarf_form, enum dwarf_attribute)
-	(enum dwarf_location_atom, enum dwarf_type, enum
-	dwarf_call_frame_info): Remove.
-	(DW_TAG, DW_TAG_DUP, DW_FORM, DW_AT, DW_AT_DUP, DW_OP)
-	(DW_OP_DUP, DW_ATE, DW_ATE_DUP, DW_CFA): New macros.
-	Include dwarf2.def.
-	(get_DW_TAG_name, get_DW_AT_name, get_DW_FORM_name)
-	(get_DW_OP_name, get_DW_ATE_name): Declare.
-	* dwarf2.def: New file, from dwarf2.h.
-
-2012-04-12  David S. Miller  <davem@davemloft.net>
-
-	* elf/sparc.h (R_SPARC_WDISP10): New reloc.
-	* opcode/sparc.h: Define '=' as generating R_SPARC_WDISP10.
-
-2012-04-10  Tristan Gingold  <gingold@adacore.com>
-
-	* splay-tree.h: Conditionnaly includes stdint.h and inttypes.h
-	(libi_uhostptr_t, libi_shostptr_t): Remove, replaced by uintptr_t.
-
-2012-04-09  Roland McGrath  <mcgrathr@google.com>
-
-	* bfdlink.h (struct bfd_link_info): Add new member user_phdrs.
-
-2012-03-15  Alan Modra  <amodra@gmail.com>
-
-	* dis-asm.h (disassemble_init_powerpc): Declare.
-
-2009-11-06  Jonas Maebe  <jonas.maebe@elis.ugent.be>
-
-	Add DWARF attribute value for the "Borland fastcall" calling
-	convention.
-	* elf/dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
-
-2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/13616
-	* bfdlink.h (bfd_link_order): Update comments on data size.
-
-2012-01-26  Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.h (enum dwarf_form): Add Fission extensions.
-	(enum dwarf_attribute): Likewise.
-
-2012-01-06  Jason Merrill  <jason@redhat.com>
-
-	PR c++/6057
-	PR c++/48051
-	PR c++/50855
-	PR c++/51322
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
-
-2011-12-14  Iain Sandoe  <iains@gcc.gnu.org>
-
-	* mach-o/loader.h (bfd_mach_o_section_type): define
-	BFD_MACH_O_S_ATTR_NONE to 0.
-
-2011-11-07  Richard Henderson  <rth@redhat.com>
-
-	Merged from transactional-memory.
-
-	* demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group.
-	(enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group.
-	(DEMANGLE_COMPONENT_TRANSACTION_CLONE): New.
-	(DEMANGLE_COMPONENT_NONTRANSACTION_CLONE): New.
-
-2011-11-01  DJ Delorie  <dj@redhat.com>
-
-	* dis-asm.h (print_insn_rl78): Declare.
-
-2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	* dis-asm.h (print_insn_epiphany): Declare.
-
-2011-10-21  Ulrich Drepper  <drepper@gmail.com>
-
-	* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
-
-2011-10-21  Marc Glisse  <marc.glisse@inria.fr>
-
-	* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
-
-2011-10-19  Alan Modra  <amodra@gmail.com>
-
-	PR ld/13254
-	* bfdlink.h (struct bfd_link_info): Add error_textrel.
-
-2011-09-28  Doug Evans  <dje@google.com>
-
-	* timeval-utils.h: New file.
-
-	* libiberty.h (countargv): Declare.
-
-2011-09-26  Cary Coutant  <ccoutant@google.com>
-
-	gcc PR lto/47247
-	* plugin-api.h (enum ld_plugin_symbol_resolution): Add
-	LDPR_PREVAILING_DEF_IRONLY_EXP.
-	(enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2.
-
-2011-09-23  Cary Coutant  <ccoutant@google.com>
-
-	PR 40831
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_CLONE.
-
-2011-09-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/12975
-	* bfdlink.h (bfd_link_info): Add version_info.
-
-2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* xregex.h (regoff_t): Define.
-
-2011-07-22  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DW_AT_GNU_macros): New.
-	(enum dwarf_macro_record_type): New enum.  Add DW_MACRO_GNU_*.
-
-	PR c++/49756
-	* libiberty.h (stack_limit_increase): New prototype.
-
-2011-07-13  Sriraman Tallam  <tmsriram@google.com>
-
-	* plugin-api.h
-	(ld_plugin_section): New struct.
-	(ld_plugin_get_section_count): New typedef.
-	(ld_plugin_get_section_type): New typedef.
-	(ld_plugin_get_section_name): New typedef.
-	(ld_plugin_get_section_contents): New typedef.
-	(ld_plugin_update_section_order): New typedef.
-	(ld_plugin_allow_section_ordering): New typedef.
-	(LDPT_GET_SECTION_COUNT): New enum value.
-	(LDPT_GET_SECTION_TYPE): New enum value.
-	(LDPT_GET_SECTION_NAME): New enum value.
-	(LDPT_GET_SECTION_CONTENTS): New enum value.
-	(LDPT_UPDATE_SECTION_ORDER): New enum value.
-	(LDPT_ALLOW_SECTION_ORDERING): New enum value.
-	(tv_get_section_count): New struct members.
-	(tv_get_section_type): New struct members.
-	(tv_get_section_name): New struct members.
-	(tv_get_section_contents): New struct members.
-	(tv_update_section_order): New struct members.
-	(tv_allow_section_ordering): New struct members.
-
-2011-07-15  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_info): Use ENUM_BITFIELD for strip,
-	discard, common_skip_ar_symbols, unresolved_syms_in_objects, and
-	unresolved_syms_in_shared_libs fields.  Move emit_note_gnu_build_id
-	out of bitfields.  Reorder bitfields.
-
-2011-07-13  Sriraman Tallam  <tmsriram@google.com>
-
-	* plugin-api.h (ld_plugin_section): New struct.
-	(ld_plugin_get_section_count): New typedef.
-	(ld_plugin_get_section_type): New typedef.
-	(ld_plugin_get_section_name): New typedef.
-	(ld_plugin_get_section_contents): New typedef.
-	(ld_plugin_update_section_order): New typedef.
-	(ld_plugin_allow_section_ordering): New typedef.
-	(LDPT_GET_SECTION_COUNT): New enum value.
-	(LDPT_GET_SECTION_TYPE): New enum value.
-	(LDPT_GET_SECTION_NAME): New enum value.
-	(LDPT_GET_SECTION_CONTENTS): New enum value.
-	(LDPT_UPDATE_SECTION_ORDER): New enum value.
-	(LDPT_ALLOW_SECTION_ORDERING): New enum value.
-	(tv_get_section_count): New struct members.
-	(tv_get_section_type): New struct members.
-	(tv_get_section_name): New struct members.
-	(tv_get_section_contents): New struct members.
-	(tv_update_section_order): New struct members.
-	(tv_allow_section_ordering): New struct members.
-
-2011-07-11  Catherine Moore  <clm@codesourcery.com>
-
-	* bfdlink.h (flag_type): New enumeration.
-	(flag_info_list): New structure.
-	(flag_info): New structure.
-
-2011-07-09  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/12942
-	* bfdlink.h (bfd_link_info): Add loading_lto_outputs.
-
-2011-07-01  Joel Brobecker  <brobecker@adacore.com>
-
-	* filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define
-	on Darwin, as well as on the systems that use a DOS-like
-	filesystem.
-
-2011-06-22  Jakub Jelinek  <jakub@redhat.com>
-
-	PR debug/47858
-	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
-
-2011-06-22  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
-
-2011-06-20  Jakub Jelinek  <jakub@redhat.com>
-
-	PR ld/12570
-	* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
-	option.
-
-2011-06-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* demangle.h (DMGL_RET_POSTFIX): Extend the comment.
-	(DMGL_RET_DROP): New.
-
-2011-06-13  Walter Lee  <walt@tilera.com>
-
-	* dis-asm.h (print_insn_tilegx): Declare.
-	(print_insn_tilepro): Likewise.
-
-2011-05-17  Alan Modra  <amodra@gmail.com>
-
-	PR ld/12760
-	* bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and
-	"string" param.
-
-2011-05-16  Alan Modra  <amodra@gmail.com>
-
-	* bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field.
-
-2011-04-30  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
-	DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): New.
-
-2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* bfdlink.h (ENUM_BITFIELD): Remove.
-
-2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h.
-
-2011-04-24  Alan Modra  <amodra@gmail.com>
-
-	PR ld/12365
-	PR ld/12696
-	* bfdlink.h (ENUM_BITFIELD): Define.
-	(struct bfd_link_hash_entry): Make "type" a bitfield.  Add "non_ir_ref".
-	(struct bfd_link_callbacks <notice>): Pass bfd_link_hash_entry pointer
-	rather than "name".
-
-2011-04-20  Alan Modra  <amodra@gmail.com>
-
-	PR ld/12365
-	* bfdlink.h (struct bfd_link_callbacks): Modify multiple_definition
-	and multiple_common parameters to pass in a bfd_link_hash_entry
-	pointer rather than name,bfd etc. found in the hash entry.
-
-2011-03-31  Tristan Gingold  <gingold@adacore.com>
-
-	* dwarf2.h (dwarf_line_number_hp_sfc_ops): New enum.
-
-2011-03-24  Mark Wielaard  <mjw@redhat.com>
-
-	* dwarf2.h (dwarf_form): Remove deprecated DW_FORM_sig8 define.
-
-2010-03-23  Rafael Ã�vila de EspÃ­ndola <respindola@mozilla.com>
-
-	* plugin-api.h (ld_plugin_get_view): New.
-	(ld_plugin_tag): Add LDPT_GET_VIEW.
-	(ld_plugin_tv): Add tv_get_view.
-
-2011-03-16  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter,
-	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
-	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
-	DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
-	DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
-	DW_OP_GNU_entry_value): New.
-
-2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
-
-	* filenames.h (filename_ncmp): New prototype.
-
-2011-02-23  Kai Tietz  <kai.tietz@onevision.com>
-
-	* dwarf2.h (_ELF_DWARF2_H): Renamed to
-	_DWARF2_H.
-	(DWARF2_External_LineInfo, DWARF2_Internal_LineInfo,
-	DWARF2_External_PubNames, DWARF2_Internal_PubNames,
-	DWARF2_External_CompUnit, DWARF2_Internal_CompUnit,
-	DWARF2_External_ARange, DWARF2_Internal_ARange): Removed.
-
-2011-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* dwarf2.h (enum dwarf_calling_convention): Add DW_CC_GDB_IBM_OpenCL.
-
-2011-01-12  Iain Sandoe  <iains@gcc.gnu.org>
-
-	* dwarf2.h: Update value for DW_AT_hi_user.
-
-2010-11-16  Ian Lance Taylor  <iant@google.com>
-
-	* simple-object.h (simple_object_attributes_merge): Declare,
-	replacing simple_object_attributes_compare.
-
-2010-11-04  Ian Lance Taylor  <iant@google.com>
-
-	* dwarf2.h (enum dwarf_source_language): Add DW_LANG_Go.
-
-2010-11-02  Ian Lance Taylor  <iant@google.com>
-
-	* simple-object.h: New file.
-
-2010-10-15  Dave Korn  <dave.korn.cygwin@gmail.com>
-
-	Sync LD plugin patch series (part 1/6) with src/include/.
-	* plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member.
-
-2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com>
-
-	Apply LD plugin patch series (part 6/6).
-	* bfdlink.h (struct_bfd_link_callbacks): Document new argument
-	to add_archive_element callback used to return a replacement bfd which
-	is to be added to the hash table in place of the original element.
-
-2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com>
-
-	Apply LD plugin patch series (part 1/6).
-	* plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member.
-
-2010-10-06  Andi Kleen  <ak@linux.intel.com>
-
-	* libiberty.h (setproctitle): Add prototype.
-
-2010-09-29  Bernd Schmidt  <bernds@codesourcery.com>
-
-	* opcode/tic6x-control-registers.h (tscl): Now read_write.
-
-2010-09-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* opcode/s390.h: Add S390_OPCODE_Z196 to enum s390_opcode_cpu_val.
-
-2010-09-23  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
-
-	* arm.h (ARM_EXT_V6Z): Remove.
-	(ARM_EXT_SEC): New define.
-	(ARM_AEXT_V6Z): Use Security Extensions.
-	(ARM_AEXT_V6ZK): Likeiwse.
-	(ARM_AEXT_V6ZT2): Likewise.
-	(ARM_AEXT_V6ZKT2): Likewise.
-	(ARM_AEXT_V7_ARM): Base v7 does not have Security Extensions.
-	(ARM_ARCH_V7A_SEC): New define.
-	(ARM_ARCH_V7A_MP): Rename...
-	(ARM_ARCH_V7A_MP_SEC): ...to this and add Security Extensions.
-
-2010-09-09  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DW_OP_GNU_implicit_pointer): New.
-
-2010-07-06  Ken Werner  <ken.werner@de.ibm.com>
-
-	* floatformat.h (floatformat_ieee_half_big): Add declaration.
-	(floatformat_ieee_half_little): Likewise.
-
-2010-06-29  Alan Modra  <amodra@gmail.com>
-
-	* dis-asm.h: Remove references to maxq.
-
-2010-06-21  Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h (ld_plugin_set_extra_library_path): New.
-	(ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH.
-	(ld_plugin_tv): Add tv_set_extra_library_path.
-
-2010-06-21  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (enum dwarf_type): Add DW_ATE_UTF.
-
-2010-06-18  Rafael Espindola  <espindola@google.com>
-
-	* plugin.h (ld_plugin_add_input_file, ld_plugin_add_input_library):
-	Make argument const.
-
-2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
-
-	* splay-tree.h: Update copyright years.
-	(splay_tree_s): Document fields.
-	(splay_tree_new_typed_alloc): New.
-
-	* hashtab.h: Update copyright years.
-	(htab_create_typed_alloc): New.
-
-2010-06-10  Tristan Gingold  <gingold@adacore.com>
-
-	* dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and
-	DW_TAG_HP_Bliss_field_set.
-	(enum dwarf_attribute): Add DW_AT_HP_prologue, DW_AT_HP_epilogue,
-	DW_AT_HP_unit_name, DW_AT_HP_unit_size, DW_AT_HP_widened_byte_size,
-	DW_AT_HP_definition_points, DW_AT_HP_default_location and
-	DW_AT_HP_is_result_param.
-	(enum dwarf_type): Add DW_ATE_HP_VAX_float, DW_ATE_HP_VAX_float_d,
-	DW_ATE_HP_packed_decimal, DW_ATE_HP_zoned_decimal, DW_ATE_HP_edited,
-	DW_ATE_HP_signed_fixed, DW_ATE_HP_unsigned_fixed,
-	DW_ATE_HP_VAX_complex_float and DW_ATE_HP_VAX_complex_float_d.
-	(enum dwarf_line_number_x_ops): Add
-	DW_LNE_HP_source_file_correlation.
-	(enum dwarf_source_language): Add DW_LANG_HP_Bliss,
-	DW_LANG_HP_Basic91, DW_LANG_HP_Pascal91, DW_LANG_HP_IMacro,
-	DW_LANG_HP_Assembler.
-
-2010-06-01  Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME.
-
-2010-04-26  Pedro Alves  <pedro@codesourcery.com>
-
-	* filenames.h (PATH_SEPARATOR): Delete.
-
-2010-04-23  Pedro Alves  <pedro@codesourcery.com>
-
-	* filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
-	always define it independently of host, add `dos_based' parameter,
-	and handle it.
-	(PATH_SEPARATOR): Define.
-	(HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
-	independently of host, add `dos_based' parameter, and handle it.
-	(IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
-	it independently of host, add `dos_based' parameter, and handle
-	it.
-	(IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
-	(IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
-	(HAS_DOS_DRIVE_SPEC): New.
-	(HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
-	(IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
-	(IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
-	* libiberty.h (dos_lbasename, unix_lbasename): Declare.
-
-2009-05-31  Ian Lance Taylor  <iant@google.com>
-
-	* ansidecl.h: Add extern "C" when compiling with C++.  Treat C++
-	the way we treat an ISO C compiler.  Don't define inline as a
-	macro when compiling with C++.
-	* dyn-string.h: Add header guard DYN_STRING_H.  Add extern "C"
-	when compiling with C++.
-	* fibheap.h: Add extern "C" when compiling with C++.
-
-2010-04-23  Pedro Alves  <pedro@codesourcery.com>
-
-	* filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
-	always define it independently of host, add `dos_based' parameter,
-	and handle it.
-	(HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
-	independently of host, add `dos_based' parameter, and handle it.
-	(IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
-	it independently of host, add `dos_based' parameter, and handle
-	it.
-	(IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
-	(IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
-	(HAS_DOS_DRIVE_SPEC): New.
-	(HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
-	(IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
-	(IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
-	* libiberty.h (dos_lbasename, unix_lbasename): Declare.
-
-2010-04-20  Nick Clifton  <nickc@redhat.com>
-
-	* sha1.h: Update copyright notice to use GPLv3.
-
-2010-04-15  Nick Clifton  <nickc@redhat.com>
-
-	* bout.h: Update copyright notice to use GPLv3.
-	* hp-symtab.h: Likewise.
-	* oasys.h: Likewise.
-	* progress.h: Likewise.
-	* sha1.h: Likewise.
-	* xtensa-isa-internal.h: Likewise.
-	* xtensa-isa.h: Likewise.
-
-2010-04-14  Doug Evans  <dje@google.com>
-
-	* filenames.h (HAS_DRIVE_SPEC, STRIP_DRIVE_SPEC): New macros.
-
-2010-04-05  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
-	field.
-
-2010-03-25  Joseph Myers  <joseph@codesourcery.com>
-
-	* dis-asm.h (print_insn_tic6x): Declare.
-
-2010-03-23  Joseph Myers  <joseph@codesourcery.com>
-
-	* symcat.h (CONCAT5, CONCAT6, XCONCAT5, XCONCAT6): Define.
-
-2010-01-13  Joel Brobecker  <brobecker@adacore.com>
-
-	Add new DW_AT_use_GNAT_descriptive_type CU attribute.
-	* dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.
-
-2010-01-11  Tristan Gingold  <gingold@adacore.com>
-
-	* demangle.h (ada_demangle): Add prototype.
-
-2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	PR bootstrap/41771
-	* ansidecl.h: Fix inline test for C99 and Sun Studio cc.
-
-2009-12-29  Joel Brobecker  <brobecker@adacore.com>
-
-	* dwarf2.h (enum dwarf_attribute): Add DW_AT_GNAT_descriptive_type.
-
-2009-12-14  Doug Kwan  <dougkwan@google.com>
-
-	* bfdlink.h (struct bfd_link_callbacks): Rename function parameters
-	to avoid shadowed variable warnings.
-	* dis-asm.h (struct disassemble_info): Ditto.
-	(disassemble_init_for_target): Ditto.
-	(init_disassemble_info): Ditto.
-
-2009-11-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* alloca-conf.h: Clarify comment.
-
-2009-11-06  Jonas Maebe  <jonas.maebe@elis.ugent.be>
-
-	Add DWARF attribute value for the "Borland fastcall" calling
-	convention.
-	* dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
-
-2009-10-23  Kai Tietz  <kai.tietz@onevision.com>
-
-	* splay-tree.h (libi_uhostptr_t): Add gcc specific
-	__extension__ for long long type case to silent cX9.
-	(libi_shostptr_t): Likewise.
-
-2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
-
-	PR40790
-	* plugin-api.h: Don't include stdint.h unconditionally.
-
-2009-10-15  Jakub Jelinek  <jakub@redhat.com>
-
-	* include/dwarf2.h (DW_LANG_Python): Add comment that it is
-	a DWARF 4 addition.
-
-2009-10-14  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
-	bfd_link_common_skip_ar_aymbols.
-	(struct bfd_link_info): Here too.
-
-2009-10-09  Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h (ld_plugin_add_input_library): Change argument name to
-	libname.
-
-2008-10-03  Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h: New.
-	* lto-symtab.h: New.
-
-2009-10-05   Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h (ld_plugin_status): Add LDPS_BAD_HANDLE.
-	(ld_plugin_get_input_file): New.
-	(ld_plugin_release_input_file): New.
-	(ld_plugin_add_input_library): New.
-	(ld_plugin_message): Mark format const.
-	(ld_plugin_level): Add LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE and
-	LDPT_ADD_INPUT_LIBRARY.
-	(ld_plugin_tv): Add tv_get_input_file, tv_release_input_file and
-	tv_add_input_library.
-
-2009-10-04  Jerry Quinn  <jlquinn@optonline.net>
-
-	* plugin-api.h: Fix compile.
-
-2009-09-29  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_LAMBDA, DEMANGLE_COMPONENT_DEFAULT_ARG,
-	DEMANGLE_COMPONENT_UNNAMED_TYPE.
-	(struct demangle_component): Add s_unary_num.
-
-2009-09-29  DJ Delorie  <dj@redhat.com>
-
-	* dis-asm.h: Add prototype for print_insn_rx.
-
-2009-09-25  Dodji Seketeli  <dodji@redhat.com>
-
-	* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
-	DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
-	and DW_TAG_formal_parameter_pack until DWARF 5 is out.
-
-2009-09-25  Cary Coutant  <ccoutant@google.com>
-
-	Add rest of new values from DWARF Version 4.
-	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
-	New tags.
-	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
-	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
-	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
-	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
-	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
-	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
-	attributes.
-	(DW_LANG_Python): New language.
-
-2009-09-24  Cary Coutant  <ccoutant@google.com>
-
-	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
-	New tags.
-	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
-	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
-	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
-	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
-	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
-	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
-	attributes.
-	(DW_LANG_Python): New language.
-
-2009-09-22  Dodji Seketeli  <dodji@redhat.com>
-
-	* dwarf2.h (enum dwarf_tag): Add
-	DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack.
-
-2009-09-09  Martin Thuresson  <martin@mtme.org>
-
-	* bfdlink.h (struct bfd_link_hash_common_entry): Move to top
-	level.
-
-2009-09-04  Jie Zhang  <jie.zhang@analog.com>
-
-	* opcode/bfin.h (PseudoDbg_Assert): Add bits_grp and mask_grp.
-	(PseudoDbg_Assert_grp_bits, PseudoDbg_Assert_grp_mask): Define.
-	(PseudoDbg_Assert_dbgop_bits, PseudoDbg_Assert_dbgop_mask,
-	PseudoDbg_Assert_dontcare_bits, PseudoDbg_Assert_dontcare_mask):
-	Adjust accordingly.
-	(init_PseudoDbg_Assert): Add PseudoDbg_Assert_grp_bits and
-	PseudoDbg_Assert_grp_mask.
-
-2009-08-06  Michael Eager <eager@eagercon.com>
-
-	* dis-asm.h: Decl print_insn_microblaze().
-
-2009-07-24  Ian Lance Taylor  <iant@google.com>
-
-	* libiberty.h (crc32): Declare.
-
-2009-07-20  Cary Coutant  <ccoutant@google.com>
-	    Doug Evans  <dje@google.com>
-
-	Add some dwarf4 values.
-	* dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit.
-	(enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc,
-	DW_FORM_flag_present, DW_FORM_sig8.
-	(enum dwarf_attribute): Add DW_AT_signature.
-
-2009-07-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* demangle.h
-	(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>)
-	(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS>):
-	New.
-
-2009-07-10  Tom Tromey  <tromey@redhat.com>
-
-	* dwarf2.h: New file, moved from elf/.
-
-2009-07-09  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
-	and DW_OP_stack_value.
-
-2009-07-09  Tom Tromey  <tromey@redhat.com>
-
-	* elf/dwarf2.h: Remove, renaming to...
-	* dwarf2.h: ... this.
-
-2009-06-29  Tom Tromey  <tromey@redhat.com>
-
-	* elf/dwarf2.h: New file.  Merged with gdb.
-
-2009-06-18  Nick Clifton  <nickc@redhat.com>
-
-	* dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
-	field of struct disassemble_info.
-
-2009-06-09  Ian Lance Taylor  <ian@airs.com>
-
-	* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
-
-2009-06-15  Nick Clifton  <nickc@redhat.com>
-
-	* dis-asm.h (DISASSEMBLE_DATA): New value for the flags field of
-	struct disassemble_info.
-
-2009-06-02  Ian Lance Taylor  <iant@google.com>
-
-	* ansidecl.h (EXPORTED_CONST): Define.
-
-2009-05-31  Ian Lance Taylor  <iant@google.com>
-
-	* ansidecl.h: Add extern "C" when compiling with C++.  Treat C++
-	the way we treat an ISO C compiler.  Don't define inline as a
-	macdro when compiling with C++.
-	* dyn-string.h: Add header guard DYN_STRING_H.  Add extern "C"
-	when compiling with C++.
-	* fibheap.h: Add extern "C" when compiling with C++.
-
-2009-05-25  Tristan Gingold  <gingold@adacore.com>
-
-	* fopen-vms.h (FOPEN_RB, FOPEN_WB, FOPEN_AB, FOPEN_RUB, FOPEN_WUB,
-	FOPEN_AUB): Use "rfm=udf,rat=none" attribute.
-
-2009-04-22  Taras Glek <tglek@mozilla.com>
-
-	* hashtab.h: Update GTY annotations to new syntax.
-	* splay-tree.h: Likewise.
-
-2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Add warn_alternate_em.
-
-2009-03-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
-	documentation.
-
-2009-03-17  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_FUNCTION_PARAM.
-
-2008-12-01  Cary Coutant  <ccoutant@google.com>
-
-	* plugin-api.h (LDPS_BAD_HANDLE): New constant.
-	(ld_plugin_get_input_file): New typedef.
-	(ld_plugin_release_input_file): New typedef.
-	(LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE): New constants.
-	(struct ld_plugin_tv): Add two new fields.
-
-2008-12-23  Jon Beniston <jon@beniston.com>
-
-	* dis-asm.h: Add LM32 disassembler function prototype.
-
-2008-12-10  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_FIXED_TYPE.
-
-2008-12-01  Cary Coutant  <ccoutant@google.com>
-
-	* plugin-api.h (ld_plugin_message): Change format parameter to const.
-
-2008-12-01  Cary Coutant  <ccoutant@google.com>
-
-	* plugin-api.h: Fix syntax error when compiling with C++.
-
-2008-11-26  Alan Modra  <amodra@bigpond.net.au>
-
-	PR 7047
-	* bfdlink.h (struct bfd_elf_version_expr): Delete "symbol".
-	Add "literal".
-
-2008-11-21  Sterling Augustine  <sterling@tensilica.com>
-
-	* xtensa-isa-internal.h (XTENSA_STATE_IS_SHARED_OR): New flag.
-	* xtensa-isa.h (xtensa_state_is_shared_or): New prototype.
-
-2008-11-19  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XCHAL_HAVE_MUL16, XCHAL_HAVE_MUL32, XCHAL_HAVE_DIV32)
-	(XCHAL_HAVE_MINMAX, XCHAL_HAVE_SEXT, XCHAL_HAVE_THREADPTR)
-	(XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): Change to 1.
-	(XCHAL_NUM_AREGS): Change to 32.
-	(XCHAL_ICACHE_SIZE, XCHAL_DCACHE_SIZE): Change to 16K.
-	(XCHAL_ICACHE_LINESIZE, XCHAL_DCACHE_LINESIZE): Change to 32.
-	(XCHAL_ICACHE_LINEWIDTH, XCHAL_DCACHE_LINEWIDTH): Change to 5.
-	(XCHAL_DCACHE_IS_WRITEBACK): Change to 1.
-	(XCHAL_DEBUGLEVEL): Change to 6.
-
-2008-11-14  Tristan Gingold  <gingold@adacore.com>
-
-	* fopen-vms.h (FOPEN_RB): Use a single string to match the
-	standard prototype.
-	(FOPEN_WB): Ditto.
-	(FOPEN_AB): Ditto.
-	(FOPEN_RUB): Ditto.
-	(FOPEN_WUB): Ditto.
-	(FOPEN_AUB): Ditto.
-
-2008-10-21  Alan Modra  <amodra@bigpond.net.au>
-
-	* obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.
-
-2008-10-06  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_PACK_EXPANSION.
-
-2008-09-24  Richard Henderson  <rth@redhat.com>
-
-	* elf/dwarf2.h (DW_OP_GNU_encoded_addr): New.
-
-2008-09-22 Rafael Espindola  <espindola@google.com>
-
-	* plugin-api.h (ld_plugin_status): Remove comma from the last item.
-	Use C style comment.
-	(ld_plugin_api_version, ld_plugin_output_file_type,
-	ld_plugin_symbol_kind, ld_plugin_symbol_visibility,
-	ld_plugin_symbol_resolution, ld_plugin_level, ld_plugin_tag): Remove
-	comma from the last item.
-
-2008-09-18  Cary Coutant  <ccoutant@google.com>
-
-	Add plugin functionality for link-time optimization (LTO).
-	* plugin-api.h: New file.
-
-2008-09-09  Jason Merrill  <jason@redhat.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_DECLTYPE.
-
-2008-08-25  Alan Modra  <amodra@bigpond.net.au>
-
-	* binary-io.h: New file, imported from gnulib, but don't
-	#include <fcntl.h> or <stdio.h>.
-
-2008-08-17  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (bfd_generic_link_read_symbols): Declare.
-
-2008-08-08  Anatoly Sokolov  <aesok@post.ru>
-
-	* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
-	E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
-	(EF_AVR_MACH): Redefine to 0x7F.
-	* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
-	(AVR_ISA_AVR3): Redefine.
-	(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
-	AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
-	AVR_ISA_AVR6): Define.
-
-2008-07-12  Jie Zhang  <jie.zhang@analog.com>
-
-	Revert
-	2008-07-12  Jie Zhang  <jie.zhang@analog.com>
-	* bfdlink.h (struct bfd_link_info): Add sep_code member
-	variable.
-	* elf/bfin.h (EF_BFIN_CODE_IN_L1): Define.
-	(EF_BFIN_DATA_IN_L1): Define.
-
-2008-07-12  Jie Zhang  <jie.zhang@analog.com>
-
-	* bfdlink.h (struct bfd_link_info): Add sep_code member
-	variable.
-	* elf/bfin.h (EF_BFIN_CODE_IN_L1): Define.
-	(EF_BFIN_DATA_IN_L1): Define.
-
-2008-07-07  Stan Shebs  <stan@codesourcery.com>
-
-	* dis-asm.h (struct disassemble_info): Add endian_code field.
-
-2008-07-07  Joel Brobecker  <brobecker@adacore.com>
-
-	* safe-ctype.h: Add #include of ctype.h before redefining
-	the ctype.h macros.
-
-2008-07-04  Joel Brobecker  <brobecker@adacore.com>
-
-	* safe-ctype.h: Remove #error when detecting that ctype.h has been
-	included. Redefine the various macros provided by ctype.h as
-	undefined variables.
-
-2008-06-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (XALLOCA, XDUP, XALLOCAVEC, XDUPVEC, XALLOCAVAR,
-	XDUPVAR, XOBNEWVEC, XOBNEWVAR): New.
-
-2008-06-06  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_info): Add "path_separator".
-
-2008-04-10  Andreas Krebbel  <krebbel1@de.ibm.com>
-
-	* dis-asm.h (print_s390_disassembler_options):
-	Prototype added.
-
-2008-03-24  Ian Lance Taylor  <iant@google.com>
-
-	* sha1.h: New file, from gnulib.
-
-	* md5.h: Add extern "C" when compiled with C++.
-
-2008-03-24  Ian Lance Taylor  <iant@google.com>
-
-	* md5.h: Add extern "C" when compiled with C++.
-
-2008-03-21  Ian Lance Taylor  <iant@google.com>
-
-	* filenames.h: Add extern "C" when compiled with C++.
-
-2008-02-15  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_hash_table): Delete creator field.
-	(struct bfd_link_info): Add output_bfd.
-
-2008-02-11  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XCHAL_HAVE_THREADPTR): Redefine to zero.
-	(XCHAL_NUM_AREGS, XCHAL_MAX_INSTRUCTION_SIZE): New.
-
-2008-01-26  David Daney  <ddaney@avtrex.com>
-
-	* demangle.h (demangle_component_type):  Add
-	DEMANGLE_COMPONENT_JAVA_RESOURCE,
-	DEMANGLE_COMPONENT_COMPOUND_NAME, and
-	DEMANGLE_COMPONENT_CHARACTER as new enum values.
-	(demangle_component): Add struct s_character to union u.
-
-2007-11-07  Joseph Myers  <joseph@codesourcery.com>
-	    Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* floatformat.h (struct floatformat): Add split_half field.
-	(floatformat_ibm_long_double): New.
-
-2007-09-06  Tom Tromey  <tromey@redhat.com>
-
-	* libiberty.h (pex_free): Document process killing.
-
-2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
-
-	* demangle.h (enum demangle_component_type): Add
-	DEMANGLE_COMPONENT_RVALUE_REFERENCE.
-
-2007-07-25  Ben Elliston  <bje@au.ibm.com>
-
-	* ternary.h: Remove.
-
-2007-07-18  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XCHAL_HAVE_THREADPTR): New.
-	(XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): New.
-
-2007-07-17  Nick Clifton  <nickc@redhat.com>
-
-	* COPYING3: New file.  Contains version 3 of the GNU General
-	Public License.
-
-2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
-
-	* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): Adjust types
-	work-a-round whitespace problem in gcc gengtype.
-
-	* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types,
-	needed for WIN64 when a long is not wide enough for a pointer.
-	(splay_tree_key, splay_tree_value): Use the new types.
-
-2007-07-09  Roland McGrath  <roland@redhat.com>
-
-	* bfdlink.h (struct bfd_link_info): Add member emit_note_gnu_build_id.
-
-2007-07-06  Nick Clifton  <nickc@redhat.com>
-
-	* bfdlink.h: Update copyright notice to refer to GPLv3.
-
-2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
-
-	* dis-asm.h (print_insn_cr16): New prototype.
-
-2007-06-01  Noah Misch  <noah@cs.caltech.edu>
-	    Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_info): Add input_bfds_tail.
-
-2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>
-
-	* libiberty.h (writeargv): Declare.
-
-2007-04-30  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_info): Add "info" and "minfo".
-
-2007-04-25  Mark Mitchell  <mark@codesourcery.com>
-
-	* demangle.h: Change license to LGPL + exception.
-
-2007-04-10  Richard Henderson  <rth@redhat.com>
-
-	* bfdlink.h (struct bfd_link_info): Add relax_trip.
-
-2007-03-29  Joel Brobecker  <brobecker@adacore.com>
-
-	* filenames.h (FILENAME_CMP): Adjust define to call filename_cmp
-	regardless of the type of file system.
-
-2007-03-06  Jan Hubicka  <jh@suse.cz>
-
-	* ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New.
-
-2007-02-21  Nick Clifton  <nickc@redhat.com>
-
-	* bfdlink.h (struct bfd_link_callbacks): Add
-	override_segment_assignment field.
-
-2007-02-17  Mark Mitchell  <mark@codesourcery.com>
-            Nathan Sidwell  <nathan@codesourcery.com>
-            Vladimir Prus  <vladimir@codesourcery.com
-            Joseph Myers  <joseph@codesourcery.com>
-
-	* bin-bugs.h: Remove.
-
-2007-02-09  Joseph S. Myers  <joseph@codesourcery.com>
-
-	* libiberty.h (pex_write_input): Remove prototype.
-
-2007-02-05  Dave Brolley  <brolley@redhat.com>
-
-	* Contribute the following changes:
-	2001-03-26  Ben Elliston  <bje@redhat.com>
-
-	* dis-asm.h (print_insn_mep): Declare.
-
-2007-02-02  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* dis-asm.h (print_i386_disassembler_options): New.
-
-2007-01-31  Vladimir Prus  <vladimir@codesourcery.com>
-
-	* libiberty.h (PEX_STDERR_TO_PIPE): New define.
-	(PEX_BINARY_ERROR): New define.
-	(pex_read_err): New function.
-
-2007-01-29  Simon Baldwin <simonb@google.com>
-
-	* demangle.h: New cplus_demangle_print_callback,
-	cplus_demangle_v3_callback, and java_demangle_v3_callback function
-	prototypes, and demangle_callbackref type definition.
-
-2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/3831
-	* bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list.
-	Add dynamic and dynamic_data.
-
-2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
-	    Nick Clifton  <nickc@redhat.com>
-
-	* ansidecl.h (ATTRIBUTE_PACKED): Define.
-
-2006-11-30  Andrew Stubbs  <andrew.stubbs@st.com>
-	    J"orn Rennecke <joern.rennecke@st.com>
-
-	PR driver/29931
-	* libiberty.h (make_relative_prefix_ignore_links): Declare.
-
-2006-11-27  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XSHAL_ABI): New.
-	(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New.
-
-2006-11-27  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-isa.h (STATIC_LIBISA): Delete.
-
-2006-10-30  Paul Brook  <paul@codesourcery.com>
-
-	* dis-asm.h (disassemble_info): Add symtab, symtab_pos and
-	symtab_size.
-
-2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/3111
-	* bfdlink.h (bfd_link_info): Add reduce_memory_overheads.
-
-2006-10-25  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
-	    Yukishige Shibata  <shibata@rd.scei.sony.co.jp>
-	    Nobuhisa Fujinami  <fnami@rd.scei.sony.co.jp>
-	    Takeaki Fukuoka  <fukuoka@rd.scei.sony.co.jp>
-	    Alan Modra  <amodra@bigpond.net.au>
-
-	* dis-asm.h (print_insn_spu): Declare.
-
-2006-09-17  Mei Ligang  <ligang@sunnorth.com.cn>
-
-	* dis-asm.h: Add prototypes for Score disassembler routines.
-
-2006-09-07  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_elf_dynamic_list): New.
-	(bfd_link_info): Add a dynamic field.
-
-2006-08-04  Marcelo Tosatti  <marcelo@kvack.org>
-
-	* bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
-
-2006-07-10  Jakub Jelinek  <jakub@redhat.com>
-
-	* bfdlink.h (struct bfd_link_info): Add emit_hash and
-	emit_gnu_hash bitfields.
-
-2006-04-11  Jim Blandy  <jimb@codesourcery.com>
-
-	* libiberty.h (pex_input_file, pex_input_pipe): New declarations.
-
-2006-04-06  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Replace need_relax_finalize with
-	relax_pass.
-
-2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
-            Anil Paranjape   <anilp1@kpitcummins.com>
-            Shilin Shakti    <shilins@kpitcummins.com>
-
-	* dis-asm.h (print_insn_xc16c): New prototype.
-
-2006-01-18  DJ Delorie  <dj@redhat.com>
-
-	* md5.h: Include ansidecl.h
-
-2006-01-17  Andreas Schwab  <schwab@suse.de>
-
-	PR binutils/1486
-	* dis-asm.h (struct disassemble_info): Add
-	disassembler_needs_relocs.
-
-2006-01-09  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define.
-
-2005-12-30  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
-
-2005-12-16  Nathan Sidwell  <nathan@codesourcery.com>
-
-	Second part of ms1 to mt renaming.
-	* dis-asm.h (print_insn_mt): Renamed.
-
-2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
-
-	PR java/9861
-	* demangle.h : Add DMGL_RET_POSTFIX define to enable alternative
-	output format for return types
-
-2005-11-03  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_order): Tweak comment.
-
-2005-10-31  Mark Kettenis  <kettenis@gnu.org>
-
-	* floatformat.h (enum floatformat_byteorders): Add
-	floatformat_vax.
-	(floatformat_vax_aingle, floatformat_vax_double): Declare.
-
-2005-10-28  Dave Brolley  <brolley@redhat.com>
-
-	Contribute the following changes:
-	2003-09-29  Dave Brolley  <brolley@redhat.com>
-
-	* dis-asm.h (disassemble_info): insn_sets now (void *) to allow for
-	more exotic underlying types to be used.
-
-2005-10-25  Arnold Metselaar  <arnold.metselaar@planet.nl>
-
-	disasm.h: Add declaration for print_insn_z80
-
-2005-09-30  Catherine Moore  <clm@cm00re.com>
-
-	* dis-asm.h (print_insn_bfin): Declare.
-
-2005-09-26  Mark Mitchell  <mark@codesourcery.com>
-
-	* libiberty.h (expandargv): New function.
-
-2005-08-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h: Remove mention of a29k.
-	* dis-asm.h: Remove a29k support.
-
-2005-08-17  Mark Kettenis  <kettenis@gnu.org>
-
-	* floatformat.h (struct floatformat): Change type of large
-	argument for is_valid member to `const void *'.
-	(floatformat_to_double): Change type of second argument to `const
-	void *'.
-	(floatformat_from_double): Change type of last argument to `void
-	*'.
-	(floatformat_is_valid): Change type of last argument to `const
-	void *'.
-
-2005-07-14  Jim Blandy  <jimb@redhat.com>
-
-	* dis-asm.h (print_insn_m32c): New declaration.
-
-2005-07-12  Ben Elliston  <bje@au.ibm.com>
-
-	* xregex2.h (regexec): Qualify this prototype with __extension__
-	when compiling with GNU C.
-
-2005-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* dis-asm.h (fprintf_ftype): Add format attribute.
-
-2005-07-03  Steve Ellcey  <sje@cup.hp.com>
-
-	PR other/13906
-	* ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New.
-	* md5.h (md5_uintptr): New.
-	(md5_ctx): Align buffer field.
-
-2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
-
-	* hashtab.h (HTAB_DELETED_ENTRY): New macro.
-	(HTAB_EMPTY_ENTRY): New macro.
-
-2005-06-20  Geoffrey Keating  <geoffk@apple.com>
-
-	* libiberty.h (strverscmp): Prototype.
-
-2005-06-17  Jakub Jelinek  <jakub@redhat.com>
-
-	* elf/external.h (GRP_ENTRY_SIZE): Define.
-
-2005-06-08  Zack Weinberg  <zack@codesourcery.com>
-
-	* dis-asm.h (get_arm_regnames): Update prototype.
-
-2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
-	    Michael Snyder  <msnyder@redhat.com>
-	    Stan Cox  <scox@redhat.com>
-
-	* dis-asm.h: Externalize print_insn_ms1.
-
-2005-06-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
-
-	* libiberty.h (XOBFINISH): New.
-
-2005-06-03  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_callbacks): Add einfo.
-
-2005-06-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (vsnprintf): Add format attribute.
-
-2005-05-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF.
-
-2005-05-28  Eli Zaretskii  <eliz@gnu.org>
-
-	* libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
-	needed.
-	(vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
-
-2005-05-25  Richard Henderson  <rth@redhat.com>
-
-	* demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
-
-2005-05-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
-
-	* libiberty.h (ACONCAT): Properly cast value of alloca().
-
-	* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
-	__cplusplus.
-
-2005-05-12  Steve Ellcey  <sje@cup.hp.com>
-
-	libiberty.h: Do not define empty basename prototype.
-
-2005-05-10  Nick Clifton  <nickc@redhat.com>
-
-	* Update the address and phone number of the FSF organization in
-	the GPL notices in the following files:
-	COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h,
-	dyn-string.h, fibheap.h, filenames.h, floatformat.h,
-	fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h,
-	libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h,
-	partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h,
-	symcat.h, ternary.h, xregex2.h, xtensa-config.h,
-	xtensa-isa-internal.h, xtensa-isa.h
-
-2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (unlock_std_streams): New.
-
-2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h:
-	Don't use the PTR macro.
-
-	* sort.h: Don't use the PARAMS macro.
-
-2005-04-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (unlock_stream): New.
-
-2005-04-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
-	Remove parameter names.
-
-2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
-	Provide prototypes for new functions.
-
-2005-03-29  Ian Lance Taylor  <ian@airs.com>
-
-	* libiberty.h: Fix indentation.
-
-2005-03-28  Ian Lance Taylor  <ian@airs.com>
-
-	* libiberty.h: Include <stdio.h>.
-	(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
-	(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
-	(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
-	(pex_init, pex_run, pex_read_output): Declare.
-	(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
-	(struct pex_time): Define.
-
-2005-03-28  Mark Mitchell <mark@codesourcery.com>
-
-	* libiberty.h (ffs): Declare, if necessary.
-
-2005-03-27  Gabriel Dos Reis  <gdr@integreable-solutions.net>
-
-	* ternary.h: Don't use PARAMS anymore.
-
-2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
-
-	* md5.h: Remove definition and uses of __P.
-	* dyn-string.h: Remove uses of PARAMS.
-	* fibheap.h: Likewise.
-	* floatformat.h: Likewise.
-	* hashtab.h: Likewise.
-
-2005-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
-
-	* demangle.h: Remove uses of PARAMS.
-
-	* libiberty.h (ANSI_PROTOTYPES): Remove guard since
-	ANSI_PROTOTYPES is always assumed.
-	Remove uses of PARAMS throughout.
-
-2005-03-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (xstrndup): Declare.
-
-2005-03-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
-
-2005-03-22  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-isa.h: Update a comment and whitespace.
-
-2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Add gc_sections.
-
-2005-03-09  Mark Mitchell  <mark@codesourcery.com>
-
-	* libiberty.h (gettimeofday): Declare.
-
-2005-03-01  Jan Beulich  <jbeulich@novell.com>
-
-	* libiberty.h: Declare unlink_if_ordinary.
-
-2005-02-21  Alan Modra  <amodra@bigpond.net.au>
-
-	* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
-	* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
-	(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
-
-2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
-
-	PR bootstrap/19818
-	* ansidecl.h (PARAMS): Guard from redefinition.
-
-2005-02-03  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
-
-2005-02-01  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (bfd_link_repair_undef_list): Declare.
-
-2005-01-10  Andreas Schwab  <schwab@suse.de>
-
-	* dis-asm.h (struct disassemble_info): Add skip_zeroes and
-	skip_zeroes_at_end.
-
-2004-12-11  Ben Elliston  <bje@au.ibm.com>
-
-	* fibheap.h (struct fibnode): Only use unsigned long bitfields
-	when __GNUC__ is defined and ints are less than 32-bits wide.
-
-2004-11-04  Paul Brook  <paul@codesourcery.com>
-
-	* bfdlink.h (bfd_link_info): Add default_imported_symver.
-
-2004-11-12  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
-	* xtensa-isa.h (xtensa_interface_class_id): New prototype.
-
-2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
-	    Vineet Sharma      <vineets@noida.hcltech.com>
-
-	* dis-asm.h: Add prototype for print_insn_maxq_little.
-
-2004-10-26  Paul Brook  <paul@codesourcery.com>
-
-	* bfdlink.h (struct bfd_link_info): Add create_default_symver.
-
-2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR 463
-	* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
-	bfd_link_hash_entry to reloc_overflow.
-
-2004-10-07  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
-	XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
-	(XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.
-
-	* xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete.
-	(config_sturct struct): Delete.
-	(XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE,
-	XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN,
-	XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP,
-	XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL,
-	XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define.
-	(xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New.
-	(xtensa_insn_decode_fn): Rename to ...
-	(xtensa_opcode_decode_fn): ... this.
-	(xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn,
-	xtensa_undo_reloc_fn): Update.
-	(xtensa_encoding_template_fn): Delete.
-	(xtensa_opcode_encode_fn, xtensa_format_decode_fn,
-	xtensa_length_decode_fn): New.
-	(xtensa_format_internal, xtensa_slot_internal): New types.
-	(xtensa_operand_internal): Delete operand_kind, inout, isPCRelative,
-	get_field, and set_field fields.  Add name, field_id, regfile,
-	num_regs, and flags fields.
-	(xtensa_arg_internal): New type.
-	(xtensa_iclass_internal): Change operands field to array of
-	xtensa_arg_internal.  Add num_stateOperands, stateOperands,
-	num_interfaceOperands, and interfaceOperands fields.
-	(xtensa_opcode_internal): Delete length, template, and iclass fields.
-	Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses.
-	(opname_lookup_entry): Delete.
-	(xtensa_regfile_internal, xtensa_interface_internal,
-	xtensa_funcUnit_internal, xtensa_state_internal,
-	xtensa_sysreg_internal, xtensa_lookup_entry): New.
-	(xtensa_isa_internal): Replace opcode_table field with opcodes field.
-	Change type of opname_lookup_table.  Delete num_modules,
-	module_opcode_base, module_decode_fn, config, and has_density fields.
-	Add num_formats, formats, format_decode_fn, length_decode_fn,
-	num_slots, slots, num_fields, num_operands, operands, num_iclasses,
-	iclasses, num_regfiles, regfiles, num_states, states,
-	state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table,
-	max_sysreg_num, sysreg_table, num_interfaces, interfaces,
-	interface_lookup_table, num_funcUnits, funcUnits and
-	funcUnit_lookup_table fields.
-	(xtensa_isa_module, xtensa_isa_modules): Delete.
-	(xtensa_isa_name_compare): New prototype.
-	(xtisa_errno, xtisa_error_msg): New.
-	* xtensa-isa.h (XTENSA_ISA_VERSION): Define.
-	(xtensa_isa): Change type.
-	(xtensa_operand): Delete.
-	(xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg,
-	xtensa_interface, xtensa_funcUnit, xtensa_isa_status,
-	xtensa_funcUnit_use): New types.
-	(libisa_module_specifier): Delete.
-	(xtensa_isa_errno, xtensa_isa_error_msg): New prototypes.
-	(xtensa_insnbuf_free, xtensa_insnbuf_to_chars,
-	xtensa_insnbuf_from_chars): Update prototypes.
-	(xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa,
-	xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn,
-	xtensa_encode_insn, xtensa_insn_length,
-	xtensa_insn_length_from_first_byte, xtensa_num_operands,
-	xtensa_operand_kind, xtensa_encode_result,
-	xtensa_operand_isPCRelative): Delete.
-	(xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field,
-	xtensa_operand_set_field, xtensa_operand_encode,
-	xtensa_operand_decode, xtensa_operand_do_reloc,
-	xtensa_operand_undo_reloc): Update prototypes.
-	(xtensa_isa_maxlength, xtensa_isa_length_from_chars,
-	xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
-	xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states,
-	xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
-	xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
-	xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
-	xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
-	xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode,
-	xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump,
-	xtensa_opcode_is_loop, xtensa_opcode_is_call,
-	xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands,
-	xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
-	xtensa_opcode_funcUnit_use, xtensa_operand_name,
-	xtensa_operand_is_visible, xtensa_operand_is_register,
-	xtensa_operand_regfile, xtensa_operand_num_regs,
-	xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative,
-	xtensa_stateOperand_state, xtensa_stateOperand_inout,
-	xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
-	xtensa_regfile_lookup_shortname, xtensa_regfile_name,
-	xtensa_regfile_shortname, xtensa_regfile_view_parent,
-	xtensa_regfile_num_bits, xtensa_regfile_num_entries,
-	xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
-	xtensa_state_is_exported, xtensa_sysreg_lookup,
-	xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
-	xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
-	xtensa_interface_num_bits, xtensa_interface_inout,
-	xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
-	xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes.
-2004-10-07  Jeff Baker  <jbaker@qnx.com>
-
-	* bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel.
-
-2004-09-17  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
-	of union.
-
-2004-09-13  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
-
-	* libiberty.h (basename): Prototype for __MINGW32__.
-
-2004-09-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-	* ansidecl.h (ATTRIBUTE_SENTINEL): Define.
-	* libiberty.h (concat, reconcat, concat_length, concat_copy,
-	concat_copy2): Use ATTRIBUTE_SENTINEL.
-
-2004-08-13  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
-	(LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
-
-2004-08-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
-
-	* libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
-	const-qualification before disposal.
-
-2004-07-24  Bernardo Innocenti  <bernie@develer.com>
-
-	* ansidecl.h (ARG_UNUSED): New Macro.
-
-2004-07-23  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bin-bugs.h (REPORT_BUGS_TO): Set to
-	"<URL:http://www.sourceware.org/bugzilla/>".
-
-2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
-
-	* ansidecl.h (ATTRIBUTE_PURE): New.
-
-2004-07-13  Bernardo Innocenti  <bernie@develer.com>
-
-	* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
-	libcpp/internal.h.
-	(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
-	macros.
-
-2004-07-13  Bernardo Innocenti  <bernie@develer.com>
-
-	* libiberty.h (ASTRDUP): Add casts required for stricter
-	type conversion rules of C++.
-	* obstack.h (obstack_free): Likewise.
-
-2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
-
-	* dis-asm.h (print_insn_crx): Declare.
-
-2004-06-24  Alan Modra  <amodra@bigpond.net.au>
-
-	* bfdlink.h (struct bfd_link_order): Update comment.
-
-2004-05-11  Jakub Jelinek  <jakub@redhat.com>
-
-	* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
-	relro_end fields.
-
-2004-05-04  Andreas Jaeger  <aj@suse.de>
-
-	* demangle.h: Do not use C++ reserved keyword typename as
-	parameter for cplus_demangle_fill_builtin_type.
-
-2004-04-22  Richard Henderson  <rth@redhat.com>
-
-	* hashtab.h (struct htab): Add size_prime_index.
-
-2004-04-13  Jeff Law  <law@redhat.com>
-
-	* hashtab.h (htab_remove_elt_with_hash): Prototype new function.
-
-2004-03-30  Zack Weinberg  <zack@codesourcery.com>
-
-	* hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
-
-2004-03-25  Stan Shebs  <shebs@apple.com>
-
-	* mpw/: Remove subdirectory and everything in it.
-
-2004-03-23  Alan Modra  <amodra@bigpond.net.au>
-
-	PR 51.
-	* bfdlink.h (struct bfd_link_info): Add wrap_char.
-
-2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* bfdlink.h (bfd_link_info): Correct comments for the
-	unresolved_syms_in_objects field.
-
-2004-02-24  Ian Lance Taylor  <ian@wasabisystems.com>
-
-	* dyn-string.h: Update copyright date.
-
-2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
-
-	* dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
-	the associated #defines.
-
-2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
-
-	* demangle.h: Instead of checking ANSI_PROTOTYPES, just include
-	"libiberty.h".
-
-	* demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
-
-	* demangle.h (enum demangle_component_type): Define.
-	(struct demangle_operator_info): Declare.
-	(struct demangle_builtin_type_info): Declare.
-	(struct demangle_component): Define.
-	(cplus_demangle_fill_component): Declare.
-	(cplus_demangle_fill_name): Declare.
-	(cplus_demangle_fill_builtin_type): Declare.
-	(cplus_demangle_fill_operator): Declare.
-	(cplus_demangle_fill_extended_operator): Declare.
-	(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
-	(cplus_demangle_v3_components): Declare.
-	(cplus_demangle_print): Declare.
-
-For older changes see ChangeLog-9103
+For older changes see ChangeLog-2016
 
-Copyright (C) 2004-2015 Free Software Foundation, Inc.
+Copyright (C) 2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog-0415 ./include/ChangeLog-0415
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog-0415	1970-01-01 00:00:00.000000000 +0000
+++ ./include/ChangeLog-0415	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,2183 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+	* bout.h: Invoke aout N_* macros with pointer to
+	struct internal_exec.
+	* os9k.h: Likewise.
+
+2015-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
+	__sparc__]: Define.
+
+2015-11-09  Alan Modra  <amodra@gmail.com>
+
+	PR gdb/17133
+	* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
+
+2015-11-09  Alan Modra  <amodra@gmail.com>
+
+	PR gdb/17133
+	* obstack.h: Import current gnulib file.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add call_nop_as_suffix and
+	call_nop_byte.
+
+2015-10-27  Daniel Jacobowitz  <dan@codesourcery.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+	    Mark Shinwell  <shinwell@codesourcery.com>
+	    Andrew Stubbs  <ams@codesourcery.com>
+	    Rich Felker <dalias@libc.org>
+
+	* longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH.
+
+2015-10-18  Roland McGrath  <roland@gnu.org>
+
+	PR other/63758
+	* environ.h: New file.
+
+2015-10-07  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* dis-asm.h (arc_get_disassembler): Correct declaration.
+
+2015-09-30  Nick Clifton  <nickc@redhat.com>
+
+	Import the following patches from the GCC mainline:
+
+	2015-08-14  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* dwarf2.def (DW_AT_GNU_bias): New attribute.
+
+	2015-08-14  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+	* dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New
+	attributes.
+
+2015-09-20  Rich Felker  <dalias@libc.org>
+
+	* bfdlink.h (struct bfd_link_info): Add "nointerp" field.
+
+2015-08-23  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (enum output_type): Reorder enum.
+
+2015-08-19  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (enum output_type): Delete type_executable, add type_pde
+	and type_pie.  Reorder.
+	(struct bfd_link_info): Delete pic field.
+	(bfd_link_executable, bfd_link_pde, bfd_link_pie, bfd_link_pic): Adjust.
+
+2015-08-19  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (bfd_link_pde): Define.
+
+2015-08-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (output_type): New enum.
+	(bfd_link_executable): New macro.
+	(bfd_link_dll): Likewise.
+	(bfd_link_relocatable): Likewise.
+	(bfd_link_pic): Likewise.
+	(bfd_link_pie): Likewise.
+	(bfd_link_info): Remove shared, executable, pie and relocatable.
+	Add output_type and pic.
+
+2015-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-08-11  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+	* ansidecl.h (GCC_FINAL): New macro.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2014-10-28  Richard Henderson  <rth@redhat.com>
+
+	* longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2014-12-09  Trevor Saunders  <tsaunders@mozilla.com>
+
+	* hashtab.h, splay-tree.h: Remove GTY markers.
+
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-03-02  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+	PR target/65261
+	* ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
+
+2015-06-22  Nick Clifton  <nickc@redhat.com>
+
+	* dis-asm.h (struct disassemble_info): Add stop_vma field.
+
+2015-05-28  Catherine Moore  <clm@codesourcery.com>
+
+	* bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type.
+
+2015-05-22  Yunlian Jiang  <yunlian@google.com>
+
+	* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
+	not defined.
+
+2015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Merge with gcc:
+	2014-11-11  Anthony Brandon  <anthony.brandon@gmail.com>
+		    Manuel LÃ³pez-IbÃ¡Ã±ez  <manu@gcc.gnu.org>
+
+	PR driver/36312
+	* filenames.h: Add prototype for canonical_filename_eq.
+
+2015-04-30  DJ Delorie  <dj@redhat.com>
+
+	* dis-asm.h (print_insn_rl78_g10): New.
+	(print_insn_rl78_g13): New.
+	(print_insn_rl78_g14): New.
+	(rl78_get_disassembler): New.
+
+2015-04-17  Richard Earnshaw  <rearnsha@arm.com>
+
+	Merge from gcc:
+	2015-03-19  Richard Biener  <rguenther@suse.de>
+
+		* partition.h (struct partition_elem): Re-order elements to
+		avoid padding.
+
+2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add compress_debug.
+
+2015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/pr17709
+	* bfdlink.h (bfd_link_info): Add extern_protected_data.
+
+2015-02-19  Pedro Alves  <palves@redhat.com>
+
+	* floatformat.h [__cplusplus]: Wrap in extern "C".
+
+2015-02-14  Alan Modra  <amodra@gmail.com>
+
+	PR ld/17973
+	* bfdlink.h (struct bfd_link_info): Delete loading_lto_outputs.
+
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
+
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2.def: Add DW_TAG_atomic_type.
+
+2015-01-28  James Bowman  <james.bowman@ftdichip.com>
+
+	* dis-asm.h (print_insn_ft32): Declare.
+
+2015-01-15  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2.def (DW_AT_noreturn): New DWARF5 attribute.
+
+2015-01-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+	* libiberty.h: Merge from GCC.
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-12-24  Uros Bizjak  <ubizjak@gmail.com>
+	    Ben Elliston  <bje@au.ibm.com>
+	    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+	* libiberty.h (xasprintf): Declare.
+
+2014-12-23  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref.  Add
+	linker_def.
+
+2014-12-12  Phil Muldoon  <pmuldoon@redhat.com>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Tom Tromey  <tromey@redhat.com>
+
+	* gcc-c-fe.def: New file.
+	* gcc-c-interface.h: New file.
+	* gcc-interface.h: New file.
+
+2014-12-11  Uros Bizjak  <ubizjak@gmail.com>
+	    Ben Elliston  <bje@au.ibm.com>
+	    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+	* libiberty.h (xvasprintf): Declare.
+
+2014-12-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* dis-asm.h (print_insn_visium): Declare.
+
+2014-11-24  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
+	DW_LANG_C_plus_plus_14.
+
+2014-11-21  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
+
+	* dwarf2.def (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
+	(DW_AT_APPLE_isa, DW_AT_APPLE_block)
+	(DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
+	(DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
+	(DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
+	(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
+	(DW_AT_APPLE_property): New macros.
+
+2014-11-21  Mark Wielaard  <mjw@redhat.com>
+
+	PR debug/63239
+	* dwarf2.def (DW_AT_GNU_deleted): New attribute.
+
+2014-11-18  Igor Zamyatin  <igor.zamyatin@intel.com>
+
+	* bfdlink.h (struct bfd_link_info): Add bndplt.
+
+2014-10-28  Yury Gribov  <y.gribov@samsung.com>
+
+	* libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
+
+2014-10-15  David Malcolm  <dmalcolm@redhat.com>
+
+	* libiberty.h (choose_tmpdir): New prototype.
+
+2014-09-26  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+
+	* libiberty.h (PEX_STDOUT_APPEND): New flag.
+	(PEX_STDERR_APPEND): Likewise.
+
+2014-09-23  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+	* demangle.h (DMGL_DLANG): New macro.
+	(DMGL_STYLE_MASK): Add DMGL_DLANG.
+	(demangling_styles): Add dlang_demangling.
+	(DLANG_DEMANGLING_STYLE_STRING): New macro.
+	(DLANG_DEMANGLING): New macro.
+	(dlang_demangle): New prototype.
+
+2014-09-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* longlong.h: Add __udiv_w_sdiv prototype.
+
+2014-08-12  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_callbacks <notice>): Remove "string"
+	param, add "inh".
+
+2014-08-12  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_info): Add lto_plugin_active.
+
+2014-06-13  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field.
+
+2014-06-13  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h: Update for bfd.link_next change.
+
+2014-06-10  Alan Modra  <amodra@gmail.com>
+
+	PR ld/16910
+	* bfdlink.h (unwrap_hash_lookup): Declare.
+
+2014-05-01  Steve Ellcey  <sellcey@mips.com>
+
+	* longlong.h: Import latest version from GCC tree.
+
+2014-04-22  Christian Svensson  <blue@cmd.nu>
+
+	* dis-asm.h: Remove openrisc and or32 support.  Add support for or1k.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2014-01-21  Tom Tromey  <tromey@redhat.com>
+
+	* ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS)
+	(VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST)
+	(VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS)
+	(NOARGS): Don't define.
+	* libiberty.h (expandargv, writeargv): Don't use PARAMS.
+
+2014-01-09  Tom Tromey  <tromey@redhat.com>
+
+	* gdbm.h: Remove.
+
+2013-12-23  Bill Maddox  <maddox@google.com>
+
+	* demangle.h (enum gnu_v3_ctor_kinds):
+	Added literal gnu_v3_unified_ctor.
+	(enum gnu_v3_ctor_kinds):
+	Added literal gnu_v3_unified_dtor.
+
+2013-12-13  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+	    Wei-Cheng Wang  <cole945@gmail.com>
+
+	* dis-asm.h (print_insn_nds32): Add nds32 target.
+
+2013-12-04  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* longlong.h: New file.
+
+2013-10-29  Marc Glisse  <marc.glisse@inria.fr>
+
+	PR tree-optimization/58689
+	* ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
+	* libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
+	concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
+	(concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
+	xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
+	Mark with attribute returns_nonnull.
+
+2013-10-10  Sean Keys <skeys@ipdatasys.com>
+
+	* xgate.h : Cleanup after opcode
+	table modification..
+
+2013-08-20  Alan Modra  <amodra@gmail.com>
+
+	* floatformat.h (floatformat_ibm_long_double): Delete.
+	(floatformat_ibm_long_double_big): Declare.
+	(floatformat_ibm_long_double_little): Declare.
+
+2013-08-19  Dehao Chen  <dehao@google.com>
+
+	* dwarf2.def (DW_AT_GNU_discriminator): New attribute.
+
+2013-08-02  Caroline Tice  <cmtice@google.com>
+
+	* vtv-change-permission.h: New file.
+
+2013-04-03  Jason Merrill  <jason@redhat.com>
+
+	Demangle C++11 ref-qualifier.
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_REFERENCE_THIS,
+	DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS.
+
+2013-03-01  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.h (enum dwarf_sect): New enum type.
+
+2013-02-19  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_info): Delete emit_note_gnu_build_id.
+
+2013-02-11  Sriraman Tallam  <tmsriram@google.com>
+
+	* plugin-api.h (enum ld_plugin_level): Assign integers
+	explicitly for all values.
+
+2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
+	    Andrew Jenner <andrew@codesourcery.com>
+
+	Based on patches from Altera Corporation.
+
+	* dis-asm.h (print_insn_big_nios2): Declare.
+	(print_insn_little_nios2): Declare.
+
+2013-01-30  Kai Tietz  <ktietz@redhat.com>
+
+	PR other/54620
+	PR target/39064
+	* md5.h (md5_uintptr, md5_uint32): Define as uintptr_t/uint32_t if
+	stdint.h and sys/types.h headers are present.
+	* sha1.h (sha1_uintptr, sha1_uint32): Likewise.
+
+2013-01-10  Will Newton <will.newton@imgtec.com>
+
+	* dis-asm.h (print_insn_metag): New declaration.
+
+2012-12-18  Aldy Hernandez  <aldyh@redhat.com>
+
+	PR other/54324
+	* ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC
+	< 3.4.
+
+2012-12-17  Nick Clifton  <nickc@redhat.com>
+
+	* MAINTAINERS: Add copyright notice.
+	* alloca-conf.h: Likewise.
+	* fopen-bin.h: Likewise.
+	* fopen-same.h: Likewise.
+	* fopen-vms.h: Likewise.
+
+2012-11-09  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_TAGGED_NAME.
+
+2012-10-29  Sterling Augustine  <saugustine@google.com>
+	    Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.h (dwarf_location_list_entry_type): New enum with fields
+	DW_LLE_GNU_end_of_list_entry, DW_LLE_GNU_base_address_selection_entry,
+	DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry.
+
+
+2012-10-26  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
+
+	* dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
+	(DW_AT_APPLE_isa, DW_AT_APPLE_block)
+	(DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
+	(DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
+	(DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
+	(DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
+	(DW_AT_APPLE_property, DW_OP_GNU_entry_value): New macros.
+
+2012-10-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add
+	disable_target_specific_optimizations.
+
+2012-10-23  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* bfdlink.h (struct bfd_link_info): Add stacksize option.
+
+2012-10-22  Jan Beich  <jbeich@tormail.org>
+
+	PR ld/14426
+	* bfdlink.h (bfd_link_info): Add ignore_hash.
+
+2012-10-08  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER.
+
+2012-09-18  Florian Weimer  <fweimer@redhat.com>
+
+	PR other/54411
+	* objalloc.h (objalloc_alloc): Do not use fast path on wraparound.
+
+2012-09-06  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.def: Edit comment.
+
+2012-08-24  Sriraman Tallam  <tmsriram@google.com>
+
+	* plugin-api.h (ld_plugin_allow_unique_segment_for_sections):
+	New interface.
+	(ld_plugin_unique_segment_for_sections): New interface.
+	(LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
+	(LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
+	(tv_allow_unique_segment_for_sections): New member.
+	(tv_unique_segment_for_sections): New member.
+
+2012-08-13  Ian Bolton  <ian.bolton@arm.com>
+	    Laurent Desnogues  <laurent.desnogues@arm.com>
+	    Jim MacArthur  <jim.macarthur@arm.com>
+	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
+	    Nigel Stephens  <nigel.stephens@arm.com>
+	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+	    Richard Earnshaw  <rearnsha@arm.com>
+	    Sofiane Naci  <sofiane.naci@arm.com>
+	    Tejas Belagod  <tejas.belagod@arm.com>
+	    Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* dis-asm.h (print_insn_aarch64): New declaration.
+	(print_aarch64_disassembler_options): New declaration.
+	(aarch64_symbol_is_valid): New declaration.
+
+2012-07-24  Stephan McCamant  <smcc@cs.berkeley.edu>
+	    Dr David Alan Gilbert  <dave@treblig.org>
+
+	PR binutils/13135
+	* dis-asm.h (fprintf_ftype): Add ATTRIBUTE_FPTR_PRINTF_2.
+
+2012-07-13  Doug Evans  <dje@google.com>
+
+	* filenames.h: #include "hashtab.h".
+	(filename_hash, filename_eq): Declare.
+
+2012-06-18  Doug Evans  <dje@google.com>
+
+	* dwarf2.def (DW_OP): Add DW_OP_GNU_const_index.
+
+2012-06-12  Rafael Ã�vila de EspÃ­ndola <respindola@mozilla.com>
+
+	* plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE.
+
+2012-06-08  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.def (DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt): New
+	forms.
+	* dwarf2.h (enum dwarf_macro_record_type): Add
+	DW_MACRO_GNU_define_indirect_alt, DW_MACRO_GNU_undef_indirect_alt
+	and DW_MACRO_GNU_transparent_include_alt.
+
+2012-05-23  Doug Evans  <dje@google.com>
+
+	* leb128.h: #include stdint.h, inttypes.h.
+	(read_uleb128_to_uint64): Renamed from read_uleb128_to_ull.
+	Change to take a uint64_t * argument instead of unsigned long long.
+	(read_sleb128_to_uint64): Renamed from read_sleb128_to_ll.
+	Change to take an int64_t * argument instead of long long.
+
+2012-05-22  Doug Evans  <dje@google.com>
+
+	* leb128.h: New file.
+
+2012-05-19  Gary Funck  <gary@intrepid.com>
+
+	* dwarf2.def: Update comment re: UPC extensions to reference
+	DWARF4 specification.
+
+2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
+
+	* dis-asm.h (print_insn_m9s12x): Prototype.
+	(print_insn_m9s12xg): Prototype.
+
+2012-05-03  Sean Keys  <skeys@ipdatasys.com>
+
+	* dis-asm.h (print_insn_xgate): Define.
+	(print_insn_xgate): Ditto.
+	Added new files for XGATE port.
+
+2012-05-02  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.def: Remove DW_FORM_GNU_ref_index,
+	replace DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base.
+
+2012-04-28  Doug Evans  <dje@google.com>
+
+	* dwarf2.def (DW_OP): Add DW_OP_GNU_addr_index.
+
+2012-04-27  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2.h: Wrap function declarations in extern "C".
+
+2012-04-27  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2.h (enum dwarf_tag, enum dwarf_form, enum dwarf_attribute)
+	(enum dwarf_location_atom, enum dwarf_type, enum
+	dwarf_call_frame_info): Remove.
+	(DW_TAG, DW_TAG_DUP, DW_FORM, DW_AT, DW_AT_DUP, DW_OP)
+	(DW_OP_DUP, DW_ATE, DW_ATE_DUP, DW_CFA): New macros.
+	Include dwarf2.def.
+	(get_DW_TAG_name, get_DW_AT_name, get_DW_FORM_name)
+	(get_DW_OP_name, get_DW_ATE_name): Declare.
+	* dwarf2.def: New file, from dwarf2.h.
+
+2012-04-10  Tristan Gingold  <gingold@adacore.com>
+
+	* splay-tree.h: Conditionnaly includes stdint.h and inttypes.h
+	(libi_uhostptr_t, libi_shostptr_t): Remove, replaced by uintptr_t.
+
+2012-04-09  Roland McGrath  <mcgrathr@google.com>
+
+	* bfdlink.h (struct bfd_link_info): Add new member user_phdrs.
+
+2012-03-15  Alan Modra  <amodra@gmail.com>
+
+	* dis-asm.h (disassemble_init_powerpc): Declare.
+
+2009-11-06  Jonas Maebe  <jonas.maebe@elis.ugent.be>
+
+	Add DWARF attribute value for the "Borland fastcall" calling
+	convention.
+	* dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
+
+2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/13616
+	* bfdlink.h (bfd_link_order): Update comments on data size.
+
+2012-01-26  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.h (enum dwarf_form): Add Fission extensions.
+	(enum dwarf_attribute): Likewise.
+
+2012-01-06  Jason Merrill  <jason@redhat.com>
+
+	PR c++/6057
+	PR c++/48051
+	PR c++/50855
+	PR c++/51322
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
+
+2011-12-14  Iain Sandoe  <iains@gcc.gnu.org>
+
+	* mach-o/loader.h (bfd_mach_o_section_type): define
+	BFD_MACH_O_S_ATTR_NONE to 0.
+
+2011-11-07  Richard Henderson  <rth@redhat.com>
+
+	Merged from transactional-memory.
+
+	* demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group.
+	(enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group.
+	(DEMANGLE_COMPONENT_TRANSACTION_CLONE): New.
+	(DEMANGLE_COMPONENT_NONTRANSACTION_CLONE): New.
+
+2011-11-01  DJ Delorie  <dj@redhat.com>
+
+	* dis-asm.h (print_insn_rl78): Declare.
+
+2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	* dis-asm.h (print_insn_epiphany): Declare.
+
+2011-10-21  Ulrich Drepper  <drepper@gmail.com>
+
+	* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
+
+2011-10-21  Marc Glisse  <marc.glisse@inria.fr>
+
+	* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
+
+2011-10-19  Alan Modra  <amodra@gmail.com>
+
+	PR ld/13254
+	* bfdlink.h (struct bfd_link_info): Add error_textrel.
+
+2011-09-28  Doug Evans  <dje@google.com>
+
+	* timeval-utils.h: New file.
+
+	* libiberty.h (countargv): Declare.
+
+2011-09-26  Cary Coutant  <ccoutant@google.com>
+
+	gcc PR lto/47247
+	* plugin-api.h (enum ld_plugin_symbol_resolution): Add
+	LDPR_PREVAILING_DEF_IRONLY_EXP.
+	(enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2.
+
+2011-09-23  Cary Coutant  <ccoutant@google.com>
+
+	PR 40831
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_CLONE.
+
+2011-09-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/12975
+	* bfdlink.h (bfd_link_info): Add version_info.
+
+2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* xregex.h (regoff_t): Define.
+
+2011-07-22  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_AT_GNU_macros): New.
+	(enum dwarf_macro_record_type): New enum.  Add DW_MACRO_GNU_*.
+
+	PR c++/49756
+	* libiberty.h (stack_limit_increase): New prototype.
+
+2011-07-13  Sriraman Tallam  <tmsriram@google.com>
+
+	* plugin-api.h
+	(ld_plugin_section): New struct.
+	(ld_plugin_get_section_count): New typedef.
+	(ld_plugin_get_section_type): New typedef.
+	(ld_plugin_get_section_name): New typedef.
+	(ld_plugin_get_section_contents): New typedef.
+	(ld_plugin_update_section_order): New typedef.
+	(ld_plugin_allow_section_ordering): New typedef.
+	(LDPT_GET_SECTION_COUNT): New enum value.
+	(LDPT_GET_SECTION_TYPE): New enum value.
+	(LDPT_GET_SECTION_NAME): New enum value.
+	(LDPT_GET_SECTION_CONTENTS): New enum value.
+	(LDPT_UPDATE_SECTION_ORDER): New enum value.
+	(LDPT_ALLOW_SECTION_ORDERING): New enum value.
+	(tv_get_section_count): New struct members.
+	(tv_get_section_type): New struct members.
+	(tv_get_section_name): New struct members.
+	(tv_get_section_contents): New struct members.
+	(tv_update_section_order): New struct members.
+	(tv_allow_section_ordering): New struct members.
+
+2011-07-15  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_info): Use ENUM_BITFIELD for strip,
+	discard, common_skip_ar_symbols, unresolved_syms_in_objects, and
+	unresolved_syms_in_shared_libs fields.  Move emit_note_gnu_build_id
+	out of bitfields.  Reorder bitfields.
+
+2011-07-13  Sriraman Tallam  <tmsriram@google.com>
+
+	* plugin-api.h (ld_plugin_section): New struct.
+	(ld_plugin_get_section_count): New typedef.
+	(ld_plugin_get_section_type): New typedef.
+	(ld_plugin_get_section_name): New typedef.
+	(ld_plugin_get_section_contents): New typedef.
+	(ld_plugin_update_section_order): New typedef.
+	(ld_plugin_allow_section_ordering): New typedef.
+	(LDPT_GET_SECTION_COUNT): New enum value.
+	(LDPT_GET_SECTION_TYPE): New enum value.
+	(LDPT_GET_SECTION_NAME): New enum value.
+	(LDPT_GET_SECTION_CONTENTS): New enum value.
+	(LDPT_UPDATE_SECTION_ORDER): New enum value.
+	(LDPT_ALLOW_SECTION_ORDERING): New enum value.
+	(tv_get_section_count): New struct members.
+	(tv_get_section_type): New struct members.
+	(tv_get_section_name): New struct members.
+	(tv_get_section_contents): New struct members.
+	(tv_update_section_order): New struct members.
+	(tv_allow_section_ordering): New struct members.
+
+2011-07-11  Catherine Moore  <clm@codesourcery.com>
+
+	* bfdlink.h (flag_type): New enumeration.
+	(flag_info_list): New structure.
+	(flag_info): New structure.
+
+2011-07-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/12942
+	* bfdlink.h (bfd_link_info): Add loading_lto_outputs.
+
+2011-07-01  Joel Brobecker  <brobecker@adacore.com>
+
+	* filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define
+	on Darwin, as well as on the systems that use a DOS-like
+	filesystem.
+
+2011-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/47858
+	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
+
+2011-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
+
+2011-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+	PR ld/12570
+	* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
+	option.
+
+2011-06-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* demangle.h (DMGL_RET_POSTFIX): Extend the comment.
+	(DMGL_RET_DROP): New.
+
+2011-06-13  Walter Lee  <walt@tilera.com>
+
+	* dis-asm.h (print_insn_tilegx): Declare.
+	(print_insn_tilepro): Likewise.
+
+2011-05-17  Alan Modra  <amodra@gmail.com>
+
+	PR ld/12760
+	* bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and
+	"string" param.
+
+2011-05-16  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field.
+
+2011-04-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
+	DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): New.
+
+2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* bfdlink.h (ENUM_BITFIELD): Remove.
+
+2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h.
+
+2011-04-24  Alan Modra  <amodra@gmail.com>
+
+	PR ld/12365
+	PR ld/12696
+	* bfdlink.h (ENUM_BITFIELD): Define.
+	(struct bfd_link_hash_entry): Make "type" a bitfield.  Add "non_ir_ref".
+	(struct bfd_link_callbacks <notice>): Pass bfd_link_hash_entry pointer
+	rather than "name".
+
+2011-04-20  Alan Modra  <amodra@gmail.com>
+
+	PR ld/12365
+	* bfdlink.h (struct bfd_link_callbacks): Modify multiple_definition
+	and multiple_common parameters to pass in a bfd_link_hash_entry
+	pointer rather than name,bfd etc. found in the hash entry.
+
+2011-03-31  Tristan Gingold  <gingold@adacore.com>
+
+	* dwarf2.h (dwarf_line_number_hp_sfc_ops): New enum.
+
+2011-03-24  Mark Wielaard  <mjw@redhat.com>
+
+	* dwarf2.h (dwarf_form): Remove deprecated DW_FORM_sig8 define.
+
+2010-03-23  Rafael Ã�vila de EspÃ­ndola <respindola@mozilla.com>
+
+	* plugin-api.h (ld_plugin_get_view): New.
+	(ld_plugin_tag): Add LDPT_GET_VIEW.
+	(ld_plugin_tv): Add tv_get_view.
+
+2011-03-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter,
+	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
+	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
+	DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
+	DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
+	DW_OP_GNU_entry_value): New.
+
+2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
+
+	* filenames.h (filename_ncmp): New prototype.
+
+2011-02-23  Kai Tietz  <kai.tietz@onevision.com>
+
+	* dwarf2.h (_ELF_DWARF2_H): Renamed to
+	_DWARF2_H.
+	(DWARF2_External_LineInfo, DWARF2_Internal_LineInfo,
+	DWARF2_External_PubNames, DWARF2_Internal_PubNames,
+	DWARF2_External_CompUnit, DWARF2_Internal_CompUnit,
+	DWARF2_External_ARange, DWARF2_Internal_ARange): Removed.
+
+2011-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* dwarf2.h (enum dwarf_calling_convention): Add DW_CC_GDB_IBM_OpenCL.
+
+2011-01-12  Iain Sandoe  <iains@gcc.gnu.org>
+
+	* dwarf2.h: Update value for DW_AT_hi_user.
+
+2010-11-16  Ian Lance Taylor  <iant@google.com>
+
+	* simple-object.h (simple_object_attributes_merge): Declare,
+	replacing simple_object_attributes_compare.
+
+2010-11-04  Ian Lance Taylor  <iant@google.com>
+
+	* dwarf2.h (enum dwarf_source_language): Add DW_LANG_Go.
+
+2010-11-02  Ian Lance Taylor  <iant@google.com>
+
+	* simple-object.h: New file.
+
+2010-10-15  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+	Sync LD plugin patch series (part 1/6) with src/include/.
+	* plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member.
+
+2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+	Apply LD plugin patch series (part 6/6).
+	* bfdlink.h (struct_bfd_link_callbacks): Document new argument
+	to add_archive_element callback used to return a replacement bfd which
+	is to be added to the hash table in place of the original element.
+
+2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+	Apply LD plugin patch series (part 1/6).
+	* plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member.
+
+2010-10-06  Andi Kleen  <ak@linux.intel.com>
+
+	* libiberty.h (setproctitle): Add prototype.
+
+2010-09-23  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+	* arm.h (ARM_EXT_V6Z): Remove.
+	(ARM_EXT_SEC): New define.
+	(ARM_AEXT_V6Z): Use Security Extensions.
+	(ARM_AEXT_V6ZK): Likeiwse.
+	(ARM_AEXT_V6ZT2): Likewise.
+	(ARM_AEXT_V6ZKT2): Likewise.
+	(ARM_AEXT_V7_ARM): Base v7 does not have Security Extensions.
+	(ARM_ARCH_V7A_SEC): New define.
+	(ARM_ARCH_V7A_MP): Rename...
+	(ARM_ARCH_V7A_MP_SEC): ...to this and add Security Extensions.
+
+2010-09-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_OP_GNU_implicit_pointer): New.
+
+2010-07-06  Ken Werner  <ken.werner@de.ibm.com>
+
+	* floatformat.h (floatformat_ieee_half_big): Add declaration.
+	(floatformat_ieee_half_little): Likewise.
+
+2010-06-29  Alan Modra  <amodra@gmail.com>
+
+	* dis-asm.h: Remove references to maxq.
+
+2010-06-21  Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h (ld_plugin_set_extra_library_path): New.
+	(ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH.
+	(ld_plugin_tv): Add tv_set_extra_library_path.
+
+2010-06-21  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (enum dwarf_type): Add DW_ATE_UTF.
+
+2010-06-18  Rafael Espindola  <espindola@google.com>
+
+	* plugin.h (ld_plugin_add_input_file, ld_plugin_add_input_library):
+	Make argument const.
+
+2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
+
+	* splay-tree.h: Update copyright years.
+	(splay_tree_s): Document fields.
+	(splay_tree_new_typed_alloc): New.
+
+	* hashtab.h: Update copyright years.
+	(htab_create_typed_alloc): New.
+
+2010-06-10  Tristan Gingold  <gingold@adacore.com>
+
+	* dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and
+	DW_TAG_HP_Bliss_field_set.
+	(enum dwarf_attribute): Add DW_AT_HP_prologue, DW_AT_HP_epilogue,
+	DW_AT_HP_unit_name, DW_AT_HP_unit_size, DW_AT_HP_widened_byte_size,
+	DW_AT_HP_definition_points, DW_AT_HP_default_location and
+	DW_AT_HP_is_result_param.
+	(enum dwarf_type): Add DW_ATE_HP_VAX_float, DW_ATE_HP_VAX_float_d,
+	DW_ATE_HP_packed_decimal, DW_ATE_HP_zoned_decimal, DW_ATE_HP_edited,
+	DW_ATE_HP_signed_fixed, DW_ATE_HP_unsigned_fixed,
+	DW_ATE_HP_VAX_complex_float and DW_ATE_HP_VAX_complex_float_d.
+	(enum dwarf_line_number_x_ops): Add
+	DW_LNE_HP_source_file_correlation.
+	(enum dwarf_source_language): Add DW_LANG_HP_Bliss,
+	DW_LANG_HP_Basic91, DW_LANG_HP_Pascal91, DW_LANG_HP_IMacro,
+	DW_LANG_HP_Assembler.
+
+2010-06-01  Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME.
+
+2010-04-26  Pedro Alves  <pedro@codesourcery.com>
+
+	* filenames.h (PATH_SEPARATOR): Delete.
+
+2010-04-23  Pedro Alves  <pedro@codesourcery.com>
+
+	* filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
+	always define it independently of host, add `dos_based' parameter,
+	and handle it.
+	(PATH_SEPARATOR): Define.
+	(HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
+	independently of host, add `dos_based' parameter, and handle it.
+	(IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
+	it independently of host, add `dos_based' parameter, and handle
+	it.
+	(IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
+	(IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
+	(HAS_DOS_DRIVE_SPEC): New.
+	(HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
+	(IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
+	(IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
+	* libiberty.h (dos_lbasename, unix_lbasename): Declare.
+
+2009-05-31  Ian Lance Taylor  <iant@google.com>
+
+	* ansidecl.h: Add extern "C" when compiling with C++.  Treat C++
+	the way we treat an ISO C compiler.  Don't define inline as a
+	macro when compiling with C++.
+	* dyn-string.h: Add header guard DYN_STRING_H.  Add extern "C"
+	when compiling with C++.
+	* fibheap.h: Add extern "C" when compiling with C++.
+
+2010-04-23  Pedro Alves  <pedro@codesourcery.com>
+
+	* filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
+	always define it independently of host, add `dos_based' parameter,
+	and handle it.
+	(HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
+	independently of host, add `dos_based' parameter, and handle it.
+	(IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
+	it independently of host, add `dos_based' parameter, and handle
+	it.
+	(IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
+	(IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
+	(HAS_DOS_DRIVE_SPEC): New.
+	(HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
+	(IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
+	(IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
+	* libiberty.h (dos_lbasename, unix_lbasename): Declare.
+
+2010-04-20  Nick Clifton  <nickc@redhat.com>
+
+	* sha1.h: Update copyright notice to use GPLv3.
+
+2010-04-15  Nick Clifton  <nickc@redhat.com>
+
+	* bout.h: Update copyright notice to use GPLv3.
+	* hp-symtab.h: Likewise.
+	* oasys.h: Likewise.
+	* progress.h: Likewise.
+	* sha1.h: Likewise.
+	* xtensa-isa-internal.h: Likewise.
+	* xtensa-isa.h: Likewise.
+
+2010-04-14  Doug Evans  <dje@google.com>
+
+	* filenames.h (HAS_DRIVE_SPEC, STRIP_DRIVE_SPEC): New macros.
+
+2010-04-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
+	field.
+
+2010-03-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* dis-asm.h (print_insn_tic6x): Declare.
+
+2010-03-23  Joseph Myers  <joseph@codesourcery.com>
+
+	* symcat.h (CONCAT5, CONCAT6, XCONCAT5, XCONCAT6): Define.
+
+2010-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+	Add new DW_AT_use_GNAT_descriptive_type CU attribute.
+	* dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.
+
+2010-01-11  Tristan Gingold  <gingold@adacore.com>
+
+	* demangle.h (ada_demangle): Add prototype.
+
+2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	PR bootstrap/41771
+	* ansidecl.h: Fix inline test for C99 and Sun Studio cc.
+
+2009-12-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* dwarf2.h (enum dwarf_attribute): Add DW_AT_GNAT_descriptive_type.
+
+2009-12-14  Doug Kwan  <dougkwan@google.com>
+
+	* bfdlink.h (struct bfd_link_callbacks): Rename function parameters
+	to avoid shadowed variable warnings.
+	* dis-asm.h (struct disassemble_info): Ditto.
+	(disassemble_init_for_target): Ditto.
+	(init_disassemble_info): Ditto.
+
+2009-11-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* alloca-conf.h: Clarify comment.
+
+2009-11-06  Jonas Maebe  <jonas.maebe@elis.ugent.be>
+
+	Add DWARF attribute value for the "Borland fastcall" calling
+	convention.
+	* dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
+
+2009-10-23  Kai Tietz  <kai.tietz@onevision.com>
+
+	* splay-tree.h (libi_uhostptr_t): Add gcc specific
+	__extension__ for long long type case to silent cX9.
+	(libi_shostptr_t): Likewise.
+
+2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
+
+	PR40790
+	* plugin-api.h: Don't include stdint.h unconditionally.
+
+2009-10-15  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_LANG_Python): Add comment that it is
+	a DWARF 4 addition.
+
+2009-10-14  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
+	bfd_link_common_skip_ar_aymbols.
+	(struct bfd_link_info): Here too.
+
+2009-10-09  Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h (ld_plugin_add_input_library): Change argument name to
+	libname.
+
+2008-10-03  Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h: New.
+	* lto-symtab.h: New.
+
+2009-10-05   Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h (ld_plugin_status): Add LDPS_BAD_HANDLE.
+	(ld_plugin_get_input_file): New.
+	(ld_plugin_release_input_file): New.
+	(ld_plugin_add_input_library): New.
+	(ld_plugin_message): Mark format const.
+	(ld_plugin_level): Add LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE and
+	LDPT_ADD_INPUT_LIBRARY.
+	(ld_plugin_tv): Add tv_get_input_file, tv_release_input_file and
+	tv_add_input_library.
+
+2009-10-04  Jerry Quinn  <jlquinn@optonline.net>
+
+	* plugin-api.h: Fix compile.
+
+2009-09-29  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_LAMBDA, DEMANGLE_COMPONENT_DEFAULT_ARG,
+	DEMANGLE_COMPONENT_UNNAMED_TYPE.
+	(struct demangle_component): Add s_unary_num.
+
+2009-09-29  DJ Delorie  <dj@redhat.com>
+
+	* dis-asm.h: Add prototype for print_insn_rx.
+
+2009-09-25  Dodji Seketeli  <dodji@redhat.com>
+
+	* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
+	DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
+	and DW_TAG_formal_parameter_pack until DWARF 5 is out.
+
+2009-09-25  Cary Coutant  <ccoutant@google.com>
+
+	Add rest of new values from DWARF Version 4.
+	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
+	New tags.
+	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
+	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
+	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
+	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
+	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
+	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
+	attributes.
+	(DW_LANG_Python): New language.
+
+2009-09-24  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
+	New tags.
+	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
+	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
+	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
+	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
+	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
+	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
+	attributes.
+	(DW_LANG_Python): New language.
+
+2009-09-22  Dodji Seketeli  <dodji@redhat.com>
+
+	* dwarf2.h (enum dwarf_tag): Add
+	DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack.
+
+2009-09-09  Martin Thuresson  <martin@mtme.org>
+
+	* bfdlink.h (struct bfd_link_hash_common_entry): Move to top
+	level.
+
+2009-08-06  Michael Eager <eager@eagercon.com>
+
+	* dis-asm.h: Decl print_insn_microblaze().
+
+2009-07-24  Ian Lance Taylor  <iant@google.com>
+
+	* libiberty.h (crc32): Declare.
+
+2009-07-20  Cary Coutant  <ccoutant@google.com>
+	    Doug Evans  <dje@google.com>
+
+	Add some dwarf4 values.
+	* dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit.
+	(enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc,
+	DW_FORM_flag_present, DW_FORM_sig8.
+	(enum dwarf_attribute): Add DW_AT_signature.
+
+2009-07-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* demangle.h
+	(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>)
+	(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS>):
+	New.
+
+2009-07-10  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2.h: New file, moved from elf/.
+
+2009-07-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
+	and DW_OP_stack_value.
+
+2009-07-09  Tom Tromey  <tromey@redhat.com>
+
+	* elf/dwarf2.h: Remove, renaming to...
+	* dwarf2.h: ... this.
+
+2009-06-29  Tom Tromey  <tromey@redhat.com>
+
+	* elf/dwarf2.h: New file.  Merged with gdb.
+
+2009-06-18  Nick Clifton  <nickc@redhat.com>
+
+	* dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
+	field of struct disassemble_info.
+
+2009-06-09  Ian Lance Taylor  <ian@airs.com>
+
+	* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
+
+2009-06-15  Nick Clifton  <nickc@redhat.com>
+
+	* dis-asm.h (DISASSEMBLE_DATA): New value for the flags field of
+	struct disassemble_info.
+
+2009-06-02  Ian Lance Taylor  <iant@google.com>
+
+	* ansidecl.h (EXPORTED_CONST): Define.
+
+2009-05-31  Ian Lance Taylor  <iant@google.com>
+
+	* ansidecl.h: Add extern "C" when compiling with C++.  Treat C++
+	the way we treat an ISO C compiler.  Don't define inline as a
+	macdro when compiling with C++.
+	* dyn-string.h: Add header guard DYN_STRING_H.  Add extern "C"
+	when compiling with C++.
+	* fibheap.h: Add extern "C" when compiling with C++.
+
+2009-05-25  Tristan Gingold  <gingold@adacore.com>
+
+	* fopen-vms.h (FOPEN_RB, FOPEN_WB, FOPEN_AB, FOPEN_RUB, FOPEN_WUB,
+	FOPEN_AUB): Use "rfm=udf,rat=none" attribute.
+
+2009-04-22  Taras Glek <tglek@mozilla.com>
+
+	* hashtab.h: Update GTY annotations to new syntax.
+	* splay-tree.h: Likewise.
+
+2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add warn_alternate_em.
+
+2009-03-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
+	documentation.
+
+2009-03-17  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_FUNCTION_PARAM.
+
+2008-12-01  Cary Coutant  <ccoutant@google.com>
+
+	* plugin-api.h (LDPS_BAD_HANDLE): New constant.
+	(ld_plugin_get_input_file): New typedef.
+	(ld_plugin_release_input_file): New typedef.
+	(LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE): New constants.
+	(struct ld_plugin_tv): Add two new fields.
+
+2008-12-23  Jon Beniston <jon@beniston.com>
+
+	* dis-asm.h: Add LM32 disassembler function prototype.
+
+2008-12-10  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_FIXED_TYPE.
+
+2008-12-01  Cary Coutant  <ccoutant@google.com>
+
+	* plugin-api.h (ld_plugin_message): Change format parameter to const.
+
+2008-12-01  Cary Coutant  <ccoutant@google.com>
+
+	* plugin-api.h: Fix syntax error when compiling with C++.
+
+2008-11-26  Alan Modra  <amodra@bigpond.net.au>
+
+	PR 7047
+	* bfdlink.h (struct bfd_elf_version_expr): Delete "symbol".
+	Add "literal".
+
+2008-11-21  Sterling Augustine  <sterling@tensilica.com>
+
+	* xtensa-isa-internal.h (XTENSA_STATE_IS_SHARED_OR): New flag.
+	* xtensa-isa.h (xtensa_state_is_shared_or): New prototype.
+
+2008-11-19  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XCHAL_HAVE_MUL16, XCHAL_HAVE_MUL32, XCHAL_HAVE_DIV32)
+	(XCHAL_HAVE_MINMAX, XCHAL_HAVE_SEXT, XCHAL_HAVE_THREADPTR)
+	(XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): Change to 1.
+	(XCHAL_NUM_AREGS): Change to 32.
+	(XCHAL_ICACHE_SIZE, XCHAL_DCACHE_SIZE): Change to 16K.
+	(XCHAL_ICACHE_LINESIZE, XCHAL_DCACHE_LINESIZE): Change to 32.
+	(XCHAL_ICACHE_LINEWIDTH, XCHAL_DCACHE_LINEWIDTH): Change to 5.
+	(XCHAL_DCACHE_IS_WRITEBACK): Change to 1.
+	(XCHAL_DEBUGLEVEL): Change to 6.
+
+2008-11-14  Tristan Gingold  <gingold@adacore.com>
+
+	* fopen-vms.h (FOPEN_RB): Use a single string to match the
+	standard prototype.
+	(FOPEN_WB): Ditto.
+	(FOPEN_AB): Ditto.
+	(FOPEN_RUB): Ditto.
+	(FOPEN_WUB): Ditto.
+	(FOPEN_AUB): Ditto.
+
+2008-10-21  Alan Modra  <amodra@bigpond.net.au>
+
+	* obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.
+
+2008-10-06  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_PACK_EXPANSION.
+
+2008-09-22 Rafael Espindola  <espindola@google.com>
+
+	* plugin-api.h (ld_plugin_status): Remove comma from the last item.
+	Use C style comment.
+	(ld_plugin_api_version, ld_plugin_output_file_type,
+	ld_plugin_symbol_kind, ld_plugin_symbol_visibility,
+	ld_plugin_symbol_resolution, ld_plugin_level, ld_plugin_tag): Remove
+	comma from the last item.
+
+2008-09-18  Cary Coutant  <ccoutant@google.com>
+
+	Add plugin functionality for link-time optimization (LTO).
+	* plugin-api.h: New file.
+
+2008-09-09  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_DECLTYPE.
+
+2008-08-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* binary-io.h: New file, imported from gnulib, but don't
+	#include <fcntl.h> or <stdio.h>.
+
+2008-08-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (bfd_generic_link_read_symbols): Declare.
+
+2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+
+	Revert
+	2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+	* bfdlink.h (struct bfd_link_info): Add sep_code member
+	variable.
+
+2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+
+	* bfdlink.h (struct bfd_link_info): Add sep_code member
+	variable.
+
+2008-07-07  Stan Shebs  <stan@codesourcery.com>
+
+	* dis-asm.h (struct disassemble_info): Add endian_code field.
+
+2008-07-07  Joel Brobecker  <brobecker@adacore.com>
+
+	* safe-ctype.h: Add #include of ctype.h before redefining
+	the ctype.h macros.
+
+2008-07-04  Joel Brobecker  <brobecker@adacore.com>
+
+	* safe-ctype.h: Remove #error when detecting that ctype.h has been
+	included. Redefine the various macros provided by ctype.h as
+	undefined variables.
+
+2008-06-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (XALLOCA, XDUP, XALLOCAVEC, XDUPVEC, XALLOCAVAR,
+	XDUPVAR, XOBNEWVEC, XOBNEWVAR): New.
+
+2008-06-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_info): Add "path_separator".
+
+2008-04-10  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+	* dis-asm.h (print_s390_disassembler_options):
+	Prototype added.
+
+2008-03-24  Ian Lance Taylor  <iant@google.com>
+
+	* sha1.h: New file, from gnulib.
+
+	* md5.h: Add extern "C" when compiled with C++.
+
+2008-03-24  Ian Lance Taylor  <iant@google.com>
+
+	* md5.h: Add extern "C" when compiled with C++.
+
+2008-03-21  Ian Lance Taylor  <iant@google.com>
+
+	* filenames.h: Add extern "C" when compiled with C++.
+
+2008-02-15  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_hash_table): Delete creator field.
+	(struct bfd_link_info): Add output_bfd.
+
+2008-02-11  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XCHAL_HAVE_THREADPTR): Redefine to zero.
+	(XCHAL_NUM_AREGS, XCHAL_MAX_INSTRUCTION_SIZE): New.
+
+2008-01-26  David Daney  <ddaney@avtrex.com>
+
+	* demangle.h (demangle_component_type):  Add
+	DEMANGLE_COMPONENT_JAVA_RESOURCE,
+	DEMANGLE_COMPONENT_COMPOUND_NAME, and
+	DEMANGLE_COMPONENT_CHARACTER as new enum values.
+	(demangle_component): Add struct s_character to union u.
+
+2007-11-07  Joseph Myers  <joseph@codesourcery.com>
+	    Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* floatformat.h (struct floatformat): Add split_half field.
+	(floatformat_ibm_long_double): New.
+
+2007-09-06  Tom Tromey  <tromey@redhat.com>
+
+	* libiberty.h (pex_free): Document process killing.
+
+2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_RVALUE_REFERENCE.
+
+2007-07-25  Ben Elliston  <bje@au.ibm.com>
+
+	* ternary.h: Remove.
+
+2007-07-18  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XCHAL_HAVE_THREADPTR): New.
+	(XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): New.
+
+2007-07-17  Nick Clifton  <nickc@redhat.com>
+
+	* COPYING3: New file.  Contains version 3 of the GNU General
+	Public License.
+
+2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
+
+	* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): Adjust types
+	work-a-round whitespace problem in gcc gengtype.
+
+	* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types,
+	needed for WIN64 when a long is not wide enough for a pointer.
+	(splay_tree_key, splay_tree_value): Use the new types.
+
+2007-07-09  Roland McGrath  <roland@redhat.com>
+
+	* bfdlink.h (struct bfd_link_info): Add member emit_note_gnu_build_id.
+
+2007-07-06  Nick Clifton  <nickc@redhat.com>
+
+	* bfdlink.h: Update copyright notice to refer to GPLv3.
+
+2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
+
+	* dis-asm.h (print_insn_cr16): New prototype.
+
+2007-06-01  Noah Misch  <noah@cs.caltech.edu>
+	    Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_info): Add input_bfds_tail.
+
+2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>
+
+	* libiberty.h (writeargv): Declare.
+
+2007-04-30  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_info): Add "info" and "minfo".
+
+2007-04-25  Mark Mitchell  <mark@codesourcery.com>
+
+	* demangle.h: Change license to LGPL + exception.
+
+2007-04-10  Richard Henderson  <rth@redhat.com>
+
+	* bfdlink.h (struct bfd_link_info): Add relax_trip.
+
+2007-03-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* filenames.h (FILENAME_CMP): Adjust define to call filename_cmp
+	regardless of the type of file system.
+
+2007-03-06  Jan Hubicka  <jh@suse.cz>
+
+	* ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New.
+
+2007-02-21  Nick Clifton  <nickc@redhat.com>
+
+	* bfdlink.h (struct bfd_link_callbacks): Add
+	override_segment_assignment field.
+
+2007-02-17  Mark Mitchell  <mark@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+	    Vladimir Prus  <vladimir@codesourcery.com
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	* bin-bugs.h: Remove.
+
+2007-02-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* libiberty.h (pex_write_input): Remove prototype.
+
+2007-02-05  Dave Brolley  <brolley@redhat.com>
+
+	* Contribute the following changes:
+	2001-03-26  Ben Elliston  <bje@redhat.com>
+
+	* dis-asm.h (print_insn_mep): Declare.
+
+2007-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* dis-asm.h (print_i386_disassembler_options): New.
+
+2007-01-31  Vladimir Prus  <vladimir@codesourcery.com>
+
+	* libiberty.h (PEX_STDERR_TO_PIPE): New define.
+	(PEX_BINARY_ERROR): New define.
+	(pex_read_err): New function.
+
+2007-01-29  Simon Baldwin <simonb@google.com>
+
+	* demangle.h: New cplus_demangle_print_callback,
+	cplus_demangle_v3_callback, and java_demangle_v3_callback function
+	prototypes, and demangle_callbackref type definition.
+
+2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/3831
+	* bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list.
+	Add dynamic and dynamic_data.
+
+2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* ansidecl.h (ATTRIBUTE_PACKED): Define.
+
+2006-11-30  Andrew Stubbs  <andrew.stubbs@st.com>
+	    J"orn Rennecke <joern.rennecke@st.com>
+
+	PR driver/29931
+	* libiberty.h (make_relative_prefix_ignore_links): Declare.
+
+2006-11-27  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XSHAL_ABI): New.
+	(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New.
+
+2006-11-27  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-isa.h (STATIC_LIBISA): Delete.
+
+2006-10-30  Paul Brook  <paul@codesourcery.com>
+
+	* dis-asm.h (disassemble_info): Add symtab, symtab_pos and
+	symtab_size.
+
+2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/3111
+	* bfdlink.h (bfd_link_info): Add reduce_memory_overheads.
+
+2006-10-25  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
+	    Yukishige Shibata  <shibata@rd.scei.sony.co.jp>
+	    Nobuhisa Fujinami  <fnami@rd.scei.sony.co.jp>
+	    Takeaki Fukuoka  <fukuoka@rd.scei.sony.co.jp>
+	    Alan Modra  <amodra@bigpond.net.au>
+
+	* dis-asm.h (print_insn_spu): Declare.
+
+2006-09-17  Mei Ligang  <ligang@sunnorth.com.cn>
+
+	* dis-asm.h: Add prototypes for Score disassembler routines.
+
+2006-09-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_elf_dynamic_list): New.
+	(bfd_link_info): Add a dynamic field.
+
+2006-08-04  Marcelo Tosatti  <marcelo@kvack.org>
+
+	* bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
+
+2006-07-10  Jakub Jelinek  <jakub@redhat.com>
+
+	* bfdlink.h (struct bfd_link_info): Add emit_hash and
+	emit_gnu_hash bitfields.
+
+2006-04-11  Jim Blandy  <jimb@codesourcery.com>
+
+	* libiberty.h (pex_input_file, pex_input_pipe): New declarations.
+
+2006-04-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Replace need_relax_finalize with
+	relax_pass.
+
+2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
+	    Anil Paranjape   <anilp1@kpitcummins.com>
+	    Shilin Shakti    <shilins@kpitcummins.com>
+
+	* dis-asm.h (print_insn_xc16c): New prototype.
+
+2006-01-18  DJ Delorie  <dj@redhat.com>
+
+	* md5.h: Include ansidecl.h
+
+2006-01-17  Andreas Schwab  <schwab@suse.de>
+
+	PR binutils/1486
+	* dis-asm.h (struct disassemble_info): Add
+	disassembler_needs_relocs.
+
+2006-01-09  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define.
+
+2005-12-30  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
+
+2005-12-16  Nathan Sidwell  <nathan@codesourcery.com>
+
+	Second part of ms1 to mt renaming.
+	* dis-asm.h (print_insn_mt): Renamed.
+
+2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
+
+	PR java/9861
+	* demangle.h : Add DMGL_RET_POSTFIX define to enable alternative
+	output format for return types
+
+2005-11-03  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_order): Tweak comment.
+
+2005-10-31  Mark Kettenis  <kettenis@gnu.org>
+
+	* floatformat.h (enum floatformat_byteorders): Add
+	floatformat_vax.
+	(floatformat_vax_aingle, floatformat_vax_double): Declare.
+
+2005-10-28  Dave Brolley  <brolley@redhat.com>
+
+	Contribute the following changes:
+	2003-09-29  Dave Brolley  <brolley@redhat.com>
+
+	* dis-asm.h (disassemble_info): insn_sets now (void *) to allow for
+	more exotic underlying types to be used.
+
+2005-10-25  Arnold Metselaar  <arnold.metselaar@planet.nl>
+
+	disasm.h: Add declaration for print_insn_z80
+
+2005-09-30  Catherine Moore  <clm@cm00re.com>
+
+	* dis-asm.h (print_insn_bfin): Declare.
+
+2005-09-26  Mark Mitchell  <mark@codesourcery.com>
+
+	* libiberty.h (expandargv): New function.
+
+2005-08-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h: Remove mention of a29k.
+	* dis-asm.h: Remove a29k support.
+
+2005-08-17  Mark Kettenis  <kettenis@gnu.org>
+
+	* floatformat.h (struct floatformat): Change type of large
+	argument for is_valid member to `const void *'.
+	(floatformat_to_double): Change type of second argument to `const
+	void *'.
+	(floatformat_from_double): Change type of last argument to `void
+	*'.
+	(floatformat_is_valid): Change type of last argument to `const
+	void *'.
+
+2005-07-14  Jim Blandy  <jimb@redhat.com>
+
+	* dis-asm.h (print_insn_m32c): New declaration.
+
+2005-07-12  Ben Elliston  <bje@au.ibm.com>
+
+	* xregex2.h (regexec): Qualify this prototype with __extension__
+	when compiling with GNU C.
+
+2005-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* dis-asm.h (fprintf_ftype): Add format attribute.
+
+2005-07-03  Steve Ellcey  <sje@cup.hp.com>
+
+	PR other/13906
+	* ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New.
+	* md5.h (md5_uintptr): New.
+	(md5_ctx): Align buffer field.
+
+2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
+
+	* hashtab.h (HTAB_DELETED_ENTRY): New macro.
+	(HTAB_EMPTY_ENTRY): New macro.
+
+2005-06-20  Geoffrey Keating  <geoffk@apple.com>
+
+	* libiberty.h (strverscmp): Prototype.
+
+2005-06-08  Zack Weinberg  <zack@codesourcery.com>
+
+	* dis-asm.h (get_arm_regnames): Update prototype.
+
+2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
+	    Michael Snyder  <msnyder@redhat.com>
+	    Stan Cox  <scox@redhat.com>
+
+	* dis-asm.h: Externalize print_insn_ms1.
+
+2005-06-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+	* libiberty.h (XOBFINISH): New.
+
+2005-06-03  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_callbacks): Add einfo.
+
+2005-06-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (vsnprintf): Add format attribute.
+
+2005-05-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF.
+
+2005-05-28  Eli Zaretskii  <eliz@gnu.org>
+
+	* libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
+	needed.
+	(vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
+
+2005-05-25  Richard Henderson  <rth@redhat.com>
+
+	* demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
+
+2005-05-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+	* libiberty.h (ACONCAT): Properly cast value of alloca().
+
+	* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
+	__cplusplus.
+
+2005-05-12  Steve Ellcey  <sje@cup.hp.com>
+
+	libiberty.h: Do not define empty basename prototype.
+
+2005-05-10  Nick Clifton  <nickc@redhat.com>
+
+	* Update the address and phone number of the FSF organization in
+	the GPL notices in the following files:
+	COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h,
+	dyn-string.h, fibheap.h, filenames.h, floatformat.h,
+	fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h,
+	libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h,
+	partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h,
+	symcat.h, ternary.h, xregex2.h, xtensa-config.h,
+	xtensa-isa-internal.h, xtensa-isa.h
+
+2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (unlock_std_streams): New.
+
+2005-04-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h:
+	Don't use the PTR macro.
+
+	* sort.h: Don't use the PARAMS macro.
+
+2005-04-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (unlock_stream): New.
+
+2005-04-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
+	Remove parameter names.
+
+2005-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
+	Provide prototypes for new functions.
+
+2005-03-29  Ian Lance Taylor  <ian@airs.com>
+
+	* libiberty.h: Fix indentation.
+
+2005-03-28  Ian Lance Taylor  <ian@airs.com>
+
+	* libiberty.h: Include <stdio.h>.
+	(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
+	(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
+	(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
+	(pex_init, pex_run, pex_read_output): Declare.
+	(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
+	(struct pex_time): Define.
+
+2005-03-28  Mark Mitchell <mark@codesourcery.com>
+
+	* libiberty.h (ffs): Declare, if necessary.
+
+2005-03-27  Gabriel Dos Reis  <gdr@integreable-solutions.net>
+
+	* ternary.h: Don't use PARAMS anymore.
+
+2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+	* md5.h: Remove definition and uses of __P.
+	* dyn-string.h: Remove uses of PARAMS.
+	* fibheap.h: Likewise.
+	* floatformat.h: Likewise.
+	* hashtab.h: Likewise.
+
+2005-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+	* demangle.h: Remove uses of PARAMS.
+
+	* libiberty.h (ANSI_PROTOTYPES): Remove guard since
+	ANSI_PROTOTYPES is always assumed.
+	Remove uses of PARAMS throughout.
+
+2005-03-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (xstrndup): Declare.
+
+2005-03-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
+
+2005-03-22  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-isa.h: Update a comment and whitespace.
+
+2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add gc_sections.
+
+2005-03-09  Mark Mitchell  <mark@codesourcery.com>
+
+	* libiberty.h (gettimeofday): Declare.
+
+2005-03-01  Jan Beulich  <jbeulich@novell.com>
+
+	* libiberty.h: Declare unlink_if_ordinary.
+
+2005-02-21  Alan Modra  <amodra@bigpond.net.au>
+
+	* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
+	* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
+	(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
+
+2005-02-14  Paolo Bonzini  <bonzini@gnu.org>
+
+	PR bootstrap/19818
+	* ansidecl.h (PARAMS): Guard from redefinition.
+
+2005-02-03  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
+
+2005-02-01  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (bfd_link_repair_undef_list): Declare.
+
+2005-01-10  Andreas Schwab  <schwab@suse.de>
+
+	* dis-asm.h (struct disassemble_info): Add skip_zeroes and
+	skip_zeroes_at_end.
+
+2004-12-11  Ben Elliston  <bje@au.ibm.com>
+
+	* fibheap.h (struct fibnode): Only use unsigned long bitfields
+	when __GNUC__ is defined and ints are less than 32-bits wide.
+
+2004-11-04  Paul Brook  <paul@codesourcery.com>
+
+	* bfdlink.h (bfd_link_info): Add default_imported_symver.
+
+2004-11-12  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
+	* xtensa-isa.h (xtensa_interface_class_id): New prototype.
+
+2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
+	    Vineet Sharma      <vineets@noida.hcltech.com>
+
+	* dis-asm.h: Add prototype for print_insn_maxq_little.
+
+2004-10-26  Paul Brook  <paul@codesourcery.com>
+
+	* bfdlink.h (struct bfd_link_info): Add create_default_symver.
+
+2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR 463
+	* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
+	bfd_link_hash_entry to reloc_overflow.
+
+2004-10-07  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
+	XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
+	(XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.
+
+	* xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete.
+	(config_sturct struct): Delete.
+	(XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE,
+	XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN,
+	XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP,
+	XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL,
+	XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define.
+	(xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New.
+	(xtensa_insn_decode_fn): Rename to ...
+	(xtensa_opcode_decode_fn): ... this.
+	(xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn,
+	xtensa_undo_reloc_fn): Update.
+	(xtensa_encoding_template_fn): Delete.
+	(xtensa_opcode_encode_fn, xtensa_format_decode_fn,
+	xtensa_length_decode_fn): New.
+	(xtensa_format_internal, xtensa_slot_internal): New types.
+	(xtensa_operand_internal): Delete operand_kind, inout, isPCRelative,
+	get_field, and set_field fields.  Add name, field_id, regfile,
+	num_regs, and flags fields.
+	(xtensa_arg_internal): New type.
+	(xtensa_iclass_internal): Change operands field to array of
+	xtensa_arg_internal.  Add num_stateOperands, stateOperands,
+	num_interfaceOperands, and interfaceOperands fields.
+	(xtensa_opcode_internal): Delete length, template, and iclass fields.
+	Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses.
+	(opname_lookup_entry): Delete.
+	(xtensa_regfile_internal, xtensa_interface_internal,
+	xtensa_funcUnit_internal, xtensa_state_internal,
+	xtensa_sysreg_internal, xtensa_lookup_entry): New.
+	(xtensa_isa_internal): Replace opcode_table field with opcodes field.
+	Change type of opname_lookup_table.  Delete num_modules,
+	module_opcode_base, module_decode_fn, config, and has_density fields.
+	Add num_formats, formats, format_decode_fn, length_decode_fn,
+	num_slots, slots, num_fields, num_operands, operands, num_iclasses,
+	iclasses, num_regfiles, regfiles, num_states, states,
+	state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table,
+	max_sysreg_num, sysreg_table, num_interfaces, interfaces,
+	interface_lookup_table, num_funcUnits, funcUnits and
+	funcUnit_lookup_table fields.
+	(xtensa_isa_module, xtensa_isa_modules): Delete.
+	(xtensa_isa_name_compare): New prototype.
+	(xtisa_errno, xtisa_error_msg): New.
+	* xtensa-isa.h (XTENSA_ISA_VERSION): Define.
+	(xtensa_isa): Change type.
+	(xtensa_operand): Delete.
+	(xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg,
+	xtensa_interface, xtensa_funcUnit, xtensa_isa_status,
+	xtensa_funcUnit_use): New types.
+	(libisa_module_specifier): Delete.
+	(xtensa_isa_errno, xtensa_isa_error_msg): New prototypes.
+	(xtensa_insnbuf_free, xtensa_insnbuf_to_chars,
+	xtensa_insnbuf_from_chars): Update prototypes.
+	(xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa,
+	xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn,
+	xtensa_encode_insn, xtensa_insn_length,
+	xtensa_insn_length_from_first_byte, xtensa_num_operands,
+	xtensa_operand_kind, xtensa_encode_result,
+	xtensa_operand_isPCRelative): Delete.
+	(xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field,
+	xtensa_operand_set_field, xtensa_operand_encode,
+	xtensa_operand_decode, xtensa_operand_do_reloc,
+	xtensa_operand_undo_reloc): Update prototypes.
+	(xtensa_isa_maxlength, xtensa_isa_length_from_chars,
+	xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
+	xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states,
+	xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
+	xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
+	xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
+	xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
+	xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode,
+	xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump,
+	xtensa_opcode_is_loop, xtensa_opcode_is_call,
+	xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands,
+	xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
+	xtensa_opcode_funcUnit_use, xtensa_operand_name,
+	xtensa_operand_is_visible, xtensa_operand_is_register,
+	xtensa_operand_regfile, xtensa_operand_num_regs,
+	xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative,
+	xtensa_stateOperand_state, xtensa_stateOperand_inout,
+	xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
+	xtensa_regfile_lookup_shortname, xtensa_regfile_name,
+	xtensa_regfile_shortname, xtensa_regfile_view_parent,
+	xtensa_regfile_num_bits, xtensa_regfile_num_entries,
+	xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
+	xtensa_state_is_exported, xtensa_sysreg_lookup,
+	xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
+	xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
+	xtensa_interface_num_bits, xtensa_interface_inout,
+	xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
+	xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes.
+2004-10-07  Jeff Baker  <jbaker@qnx.com>
+
+	* bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel.
+
+2004-09-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
+	of union.
+
+2004-09-13  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
+
+	* libiberty.h (basename): Prototype for __MINGW32__.
+
+2004-09-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* ansidecl.h (ATTRIBUTE_SENTINEL): Define.
+	* libiberty.h (concat, reconcat, concat_length, concat_copy,
+	concat_copy2): Use ATTRIBUTE_SENTINEL.
+
+2004-08-13  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
+	(LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
+
+2004-08-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+	* libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
+	const-qualification before disposal.
+
+2004-07-24  Bernardo Innocenti  <bernie@develer.com>
+
+	* ansidecl.h (ARG_UNUSED): New Macro.
+
+2004-07-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bin-bugs.h (REPORT_BUGS_TO): Set to
+	"<URL:http://www.sourceware.org/bugzilla/>".
+
+2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
+
+	* ansidecl.h (ATTRIBUTE_PURE): New.
+
+2004-07-13  Bernardo Innocenti  <bernie@develer.com>
+
+	* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
+	libcpp/internal.h.
+	(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
+	macros.
+
+2004-07-13  Bernardo Innocenti  <bernie@develer.com>
+
+	* libiberty.h (ASTRDUP): Add casts required for stricter
+	type conversion rules of C++.
+	* obstack.h (obstack_free): Likewise.
+
+2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
+
+	* dis-asm.h (print_insn_crx): Declare.
+
+2004-06-24  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_link_order): Update comment.
+
+2004-05-11  Jakub Jelinek  <jakub@redhat.com>
+
+	* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
+	relro_end fields.
+
+2004-05-04  Andreas Jaeger  <aj@suse.de>
+
+	* demangle.h: Do not use C++ reserved keyword typename as
+	parameter for cplus_demangle_fill_builtin_type.
+
+2004-04-22  Richard Henderson  <rth@redhat.com>
+
+	* hashtab.h (struct htab): Add size_prime_index.
+
+2004-04-13  Jeff Law  <law@redhat.com>
+
+	* hashtab.h (htab_remove_elt_with_hash): Prototype new function.
+
+2004-03-30  Zack Weinberg  <zack@codesourcery.com>
+
+	* hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
+
+2004-03-25  Stan Shebs  <shebs@apple.com>
+
+	* mpw/: Remove subdirectory and everything in it.
+
+2004-03-23  Alan Modra  <amodra@bigpond.net.au>
+
+	PR 51.
+	* bfdlink.h (struct bfd_link_info): Add wrap_char.
+
+2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Correct comments for the
+	unresolved_syms_in_objects field.
+
+2004-02-24  Ian Lance Taylor  <ian@wasabisystems.com>
+
+	* dyn-string.h: Update copyright date.
+
+2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
+
+	* dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
+	the associated #defines.
+
+2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
+
+	* demangle.h: Instead of checking ANSI_PROTOTYPES, just include
+	"libiberty.h".
+
+	* demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
+
+	* demangle.h (enum demangle_component_type): Define.
+	(struct demangle_operator_info): Declare.
+	(struct demangle_builtin_type_info): Declare.
+	(struct demangle_component): Define.
+	(cplus_demangle_fill_component): Declare.
+	(cplus_demangle_fill_name): Declare.
+	(cplus_demangle_fill_builtin_type): Declare.
+	(cplus_demangle_fill_operator): Declare.
+	(cplus_demangle_fill_extended_operator): Declare.
+	(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
+	(cplus_demangle_v3_components): Declare.
+	(cplus_demangle_print): Declare.
+
+For older changes see ChangeLog-9103
+
+Copyright (C) 2004-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog-2016 ./include/ChangeLog-2016
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ChangeLog-2016	1970-01-01 00:00:00.000000000 +0000
+++ ./include/ChangeLog-2016	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,841 @@
+2016-12-31  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+	* elf/common.h: Add PRU ELF.
+	* elf/pru.h: New file.
+	* opcode/pru.h: New file.
+	* dis-asm.h (print_insn_pru): Declare.
+
+2016-12-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h: Document `0', `1', `2', `3', `4' and `s'
+	operand codes.
+
+2016-12-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h: Replace `0' and `4' operand codes with `.' and
+	`F' respectively.
+
+2016-12-23  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h (INSN2_SHORT_ONLY): New macro.
+
+2016-12-21  Alan Modra  <amodra@gmail.com>
+
+	* coff/pe.h: Fix comment chars with high bit set.
+	* opcode/xgate.h: Likewise.
+
+2016-12-20  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h (mips_opcode_32bit_p): New inline function.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+
+	* elf/riscv.h (EF_RISCV_SOFT_FLOAT): Don't define.
+	(EF_RISCV_FLOAT_ABI, EF_RISCV_FLOAT_ABI_SOFT): Define.
+	(EF_RISCV_FLOAT_ABI_SINGLE, EF_RISCV_FLOAT_ABI_DOUBLE): Define.
+	(EF_RISCV_FLOAT_ABI_QUAD): Define.
+
+2016-12-20  Andrew Waterman  <andrew@sifive.com>
+	    Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* elf/riscv.h: Add R_RISCV_TPREL_I through R_RISCV_SET32.
+
+2016-12-16  fincs  <fincs.alt1@gmail.com>
+
+	* bfdlink.h (struct bfd_link_info): Add gc_keep_exported.
+
+2016-12-14  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf/mips.h (Elf_Internal_ABIFlags_v0): Also declare struct
+	typedef as `elf_internal_abiflags_v0'.
+
+2016-12-13 Renlin Li <renlin.li@arm.com>
+
+	* opcode/aarch64.h (aarch64_operand_class): Remove
+	AARCH64_OPND_CLASS_CP_REG.
+	(enum aarch64_opnd): Change AARCH64_OPND_Cn to AARCH64_OPND_CRn,
+	AARCH64_OPND_Cm to AARCH64_OPND_CRm.
+	(aarch64_opnd_qualifier): Define AARCH64_OPND_QLF_CR qualifier.
+
+2016-12-09  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h: Remove references to `>' operand code.
+
+2016-12-07  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h (INSN_CHIP_MASK): Update according to bit use.
+
+2016-12-07  Maciej W. Rozycki  <macro@imgtec.com>
+
+    	* opcode/mips.h (ASE_DSPR3): Add a comment.
+
+2016-12-05  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/arm.h (ARM_EXT2_V8_3A, ARM_AEXT2_V8_3A): New.
+	(ARM_ARCH_V8_3A): New.
+
+2016-11-29  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (insn_class_t): Add DIVREM, LOAD, MOVE, MPY, STORE
+	instruction classes.
+
+2016-11-22  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* opcode/sparc.h (sparc_opcode_arch): New fields hwcaps and
+	hwcaps2.
+
+2016-11-22  Alan Modra  <amodra@gmail.com>
+
+	PR 20744
+	* opcode/ppc.h: Define VLE insns using 16A and 16D relocs.
+
+2016-11-03  David Tolnay <dtolnay@gmail.com>
+	    Mark Wielaard  <mark@klomp.org>
+
+	* demangle.h (DMGL_RUST): New macro.
+	(DMGL_STYLE_MASK): Add DMGL_RUST.
+	(demangling_styles): Add dlang_rust.
+	(RUST_DEMANGLING_STYLE_STRING): New macro.
+	(RUST_DEMANGLING): New macro.
+	(rust_demangle): New prototype.
+	(rust_is_mangled): Likewise.
+	(rust_demangle_sym): Likewise.
+
+2016-11-07  Jason Merrill  <jason@redhat.com>
+
+	* demangle.h (enum demangle_component_type): Add
+	DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC.
+
+2016-11-18  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_IMM_ROT1,
+	AARCH64_OPND_IMM_ROT2, AARCH64_OPND_IMM_ROT3.
+	(enum aarch64_op): Add OP_FCMLA_ELEM.
+
+2016-11-18  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_ADDR_SIMM10.
+	(enum aarch64_insn_class): Add ldst_imm10.
+
+2016-11-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_Rm_SP.
+
+2016-11-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (AARCH64_FEATURE_V8_3): Define.
+	(AARCH64_ARCH_V8_3): Define.
+	(AARCH64_ARCH_V8_1, AARCH64_ARCH_V8_2): Simplify.
+
+2016-11-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* opcode/arm.h (ARM_AEXT_V8M_MAIN_DSP): Define.
+	(ARM_AEXT2_V8M_MAIN_DSP): Likewise.
+	(ARM_ARCH_V8M_MAIN_DSP): Likewise.
+
+2016-11-03  Graham Markall  <graham.markall@embecosm.com>
+
+	* opcode/arc.h: Add PROTOCOL_DECODE to insn_class_t.
+
+2016-11-03  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (struct arc_opcode): Change type of opcode and mask
+	fields.
+	(struct arc_long_opcode): Delete.
+	(struct arc_operand): Change types for insert and extract
+	handlers.
+
+2016-11-03  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h: Make macros 64-bit safe.
+
+2016-11-03  Graham Markall  <graham.markall@embecosm.com>
+
+	* opcode/arc.h (arc_opcode_len): Declare.
+	(ARC_SHORT): Delete.
+
+2016-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
+	    Andrew Waterman <andrew@sifive.com>
+
+	Add support for RISC-V architecture.
+	* dis-asm.h: Add prototypes for print_insn_riscv and
+	print_riscv_disassembler_options.
+	* elf/riscv.h: New file.
+	* opcode/riscv-opc.h: New file.
+	* opcode/riscv.h: New file.
+
+2016-10-17  Nick Clifton  <nickc@redhat.com>
+
+	* elf/common.h (DT_SYMTAB_SHNDX): Define.
+	(EM_CLOUDSHIELD, EM_COREA_1ST, EM_COREA_2ND, EM_OPEN8): Define.
+	(EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2, EM_XCORE): Define.
+	(EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8): Define.
+	(EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC): Define.
+	(EM_CSR_KALIMBA, EM_Z80, EM_AMDGPU, EM_RISCV): Define.
+	(ELFOSABI_OPENVOS): Define.
+	(GRP_MASKOS, GRP_MASKPROC): Define.
+
+2016-10-14  Pedro Alves  <palves@redhat.com>
+
+	* ansidecl.h [__cplusplus >= 201103 && GCC_VERSION < 4007] (FINAL,
+	OVERRIDE): Define as empty.
+	[__cplusplus < 201103 && GCC_VERSION < 4007] (FINAL): Define as
+	__final.
+	[__cplusplus < 201103 && GCC_VERSION >= 4007] (OVERRIDE): Define as
+	empty.
+
+2016-10-14  Pedro Alves  <palves@redhat.com>
+
+	* ansidecl.h (GCC_FINAL): Delete.
+	(OVERRIDE, FINAL): New, moved from gcc/coretypes.h.
+
+2016-10-14  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (ARC_OPCODE_ARCV2): New define.
+
+2016-09-29  Alan Modra  <amodra@gmail.com>
+
+	* opcode/ppc.h (PPC_OPERAND_OPTIONAL32): Define.
+
+2016-09-26  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (insn_class_t): Add two new classes.
+
+2016-09-26  Alan Modra  <amodra@gmail.com>
+
+	* elf/ppc.h (Tag_GNU_Power_ABI_FP): Comment on new values.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (aarch64_cond): Bump array size to 4.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_FEATURE_SVE): New macro.
+	(OP_MOV_P_P, OP_MOV_Z_P_Z, OP_MOV_Z_V, OP_MOV_Z_Z, OP_MOV_Z_Zi)
+	(OP_MOVM_P_P_P, OP_MOVS_P_P, OP_MOVZS_P_P_P, OP_MOVZ_P_P_P)
+	(OP_NOTS_P_P_P_Z, OP_NOT_P_P_P_Z): New aarch64_ops.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (sve_cpy, sve_index, sve_limm, sve_misc)
+	(sve_movprfx, sve_pred_zm, sve_shift_pred, sve_shift_unpred)
+	(sve_size_bhs, sve_size_bhsd, sve_size_hsd, sve_size_sd): New
+	aarch64_insn_classes.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_Rm): New aarch64_opnd.
+	(AARCH64_OPND_SVE_Rn_SP, AARCH64_OPND_SVE_VZn, AARCH64_OPND_SVE_Vd)
+	(AARCH64_OPND_SVE_Vm, AARCH64_OPND_SVE_Vn): Likewise.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_FPIMM8): New aarch64_opnd.
+	(AARCH64_OPND_SVE_I1_HALF_ONE, AARCH64_OPND_SVE_I1_HALF_TWO)
+	(AARCH64_OPND_SVE_I1_ZERO_ONE): Likewise.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SIMM5): New aarch64_opnd.
+	(AARCH64_OPND_SVE_AIMM, AARCH64_OPND_SVE_ASIMM)
+	(AARCH64_OPND_SVE_INV_LIMM, AARCH64_OPND_SVE_LIMM)
+	(AARCH64_OPND_SVE_LIMM_MOV, AARCH64_OPND_SVE_SHLIMM_PRED)
+	(AARCH64_OPND_SVE_SHLIMM_UNPRED, AARCH64_OPND_SVE_SHRIMM_PRED)
+	(AARCH64_OPND_SVE_SHRIMM_UNPRED, AARCH64_OPND_SVE_SIMM5)
+	(AARCH64_OPND_SVE_SIMM5B, AARCH64_OPND_SVE_SIMM6)
+	(AARCH64_OPND_SVE_SIMM8, AARCH64_OPND_SVE_UIMM3)
+	(AARCH64_OPND_SVE_UIMM7, AARCH64_OPND_SVE_UIMM8)
+	(AARCH64_OPND_SVE_UIMM8_53): Likewise.
+	(aarch64_sve_dupm_mov_immediate_p): Declare.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_S4xVL): New aarch64_opnd.
+	(AARCH64_OPND_SVE_ADDR_RI_S4x2xVL, AARCH64_OPND_SVE_ADDR_RI_S4x3xVL)
+	(AARCH64_OPND_SVE_ADDR_RI_S4x4xVL, AARCH64_OPND_SVE_ADDR_RI_S6xVL)
+	(AARCH64_OPND_SVE_ADDR_RI_S9xVL): Likewise.
+	(AARCH64_MOD_MUL_VL): New aarch64_modifier_kind.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_U6): New aarch64_opnd.
+	(AARCH64_OPND_SVE_ADDR_RI_U6x2, AARCH64_OPND_SVE_ADDR_RI_U6x4)
+	(AARCH64_OPND_SVE_ADDR_RI_U6x8, AARCH64_OPND_SVE_ADDR_RR)
+	(AARCH64_OPND_SVE_ADDR_RR_LSL1, AARCH64_OPND_SVE_ADDR_RR_LSL2)
+	(AARCH64_OPND_SVE_ADDR_RR_LSL3, AARCH64_OPND_SVE_ADDR_RX)
+	(AARCH64_OPND_SVE_ADDR_RX_LSL1, AARCH64_OPND_SVE_ADDR_RX_LSL2)
+	(AARCH64_OPND_SVE_ADDR_RX_LSL3, AARCH64_OPND_SVE_ADDR_RZ)
+	(AARCH64_OPND_SVE_ADDR_RZ_LSL1, AARCH64_OPND_SVE_ADDR_RZ_LSL2)
+	(AARCH64_OPND_SVE_ADDR_RZ_LSL3, AARCH64_OPND_SVE_ADDR_RZ_XTW_14)
+	(AARCH64_OPND_SVE_ADDR_RZ_XTW_22, AARCH64_OPND_SVE_ADDR_RZ_XTW1_14)
+	(AARCH64_OPND_SVE_ADDR_RZ_XTW1_22, AARCH64_OPND_SVE_ADDR_RZ_XTW2_14)
+	(AARCH64_OPND_SVE_ADDR_RZ_XTW2_22, AARCH64_OPND_SVE_ADDR_RZ_XTW3_14)
+	(AARCH64_OPND_SVE_ADDR_RZ_XTW3_22, AARCH64_OPND_SVE_ADDR_ZI_U5)
+	(AARCH64_OPND_SVE_ADDR_ZI_U5x2, AARCH64_OPND_SVE_ADDR_ZI_U5x4)
+	(AARCH64_OPND_SVE_ADDR_ZI_U5x8, AARCH64_OPND_SVE_ADDR_ZZ_LSL)
+	(AARCH64_OPND_SVE_ADDR_ZZ_SXTW, AARCH64_OPND_SVE_ADDR_ZZ_UXTW):
+	Likewise.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_PATTERN_SCALED): New
+	aarch64_opnd.
+	(AARCH64_MOD_MUL): New aarch64_modifier_kind.
+	(aarch64_opnd_info): Make shifter.amount an int64_t and
+	rearrange the fields.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_SVE_PATTERN): New aarch64_opnd.
+	(AARCH64_OPND_SVE_PRFOP): Likewise.
+	(aarch64_sve_pattern_array): Declare.
+	(aarch64_sve_prfop_array): Likewise.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_QLF_P_Z): New aarch64_opnd_qualifier.
+	(AARCH64_OPND_QLF_P_M): Likewise.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (AARCH64_OPND_CLASS_SVE_REG): New
+	aarch64_operand_class.
+	(AARCH64_OPND_CLASS_PRED_REG): Likewise.
+	(AARCH64_OPND_SVE_Pd, AARCH64_OPND_SVE_Pg3, AARCH64_OPND_SVE_Pg4_5)
+	(AARCH64_OPND_SVE_Pg4_10, AARCH64_OPND_SVE_Pg4_16)
+	(AARCH64_OPND_SVE_Pm, AARCH64_OPND_SVE_Pn, AARCH64_OPND_SVE_Pt)
+	(AARCH64_OPND_SVE_Za_5, AARCH64_OPND_SVE_Za_16, AARCH64_OPND_SVE_Zd)
+	(AARCH64_OPND_SVE_Zm_5, AARCH64_OPND_SVE_Zm_16, AARCH64_OPND_SVE_Zn)
+	(AARCH64_OPND_SVE_Zn_INDEX, AARCH64_OPND_SVE_ZnxN)
+	(AARCH64_OPND_SVE_Zt, AARCH64_OPND_SVE_ZtxN): New aarch64_opnds.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (aarch64_opcode): Add a tied_operand field.
+	(AARCH64_OPDE_UNTIED_OPERAND): New aarch64_operand_error_kind.
+
+2016-09-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (F_STRICT): New flag.
+
+2016-09-07  Richard Earnshaw  <rearnsha@arm.com>
+
+	* opcode/arm.h (ARM_ARCH_V8A_CRC): New architecture.
+
+2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
+	* elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12,
+	SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations.
+	* opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12
+	relocation.
+
+2016-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro.
+	(ARM_SET_SYM_CMSE_SPCL): Likewise.
+
+2016-08-01  Andrew Jenner  <andrew@codesourcery.com>
+
+	* opcode/ppc.h (PPC_OPCODE_E200Z4): New define.
+
+2016-07-29  Aldy Hernandez  <aldyh@redhat.com>
+
+	* libiberty.h (MAX_ALLOCA_SIZE): New macro.
+
+2016-07-27  Graham Markall  <graham.markall@embecosm.com>
+
+        * opcode/arc.h: Add ARC_OPERAND_ADDRTYPE,
+        ARC_OPERAND_COLON. Add the arc_nps_address_type enum and
+        ARC_NUM_ADDRTYPES.
+        * opcode/arc.h: Add BMU to insn_class_t enum.
+        * opcode/arc.h: Add PMU to insn_class_t enum.
+
+2016-07-20  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* dis-asm.h: Declare print_arc_disassembler_options.
+
+2016-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfdlink.h (struct bfd_link_info): Declare new ldscript_def and
+	out_implib_bfd fields.
+
+2016-07-14  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* elf/arc-reloc.def (ARC_SDA32): Don't use ME transformation.
+
+2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
+
+	* include/elf/arm.h (SHF_ARM_NOREAD): Rename to ...
+	(SHF_ARM_PURECODE): ... this.
+
+2016-07-01  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* opcode/aarch64.h (AARCH64_CPU_HAS_ALL_FEATURES): New.
+	(AARCH64_CPU_HAS_ANY_FEATURES): New.
+	(AARCH64_CPU_HAS_FEATURE): Define as AARCH64_CPU_HAS_ALL_FEATURES.
+	(AARCH64_OPCODE_HAS_FEATURE): Remove.
+
+2016-06-30  Matthew Wahab  <matthew.wahab@arm.com>
+
+	* opcode/arm.h (ARM_ARCH_V8_2a): Add FPU_NEON_EXT_RDMA to the set
+	of enabled FPU features.
+
+2016-06-29  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/sparc.h (enum sparc_opcode_arch_val): Move
+	SPARC_OPCODE_ARCH_MAX into the enum.
+
+2016-06-28  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* opcode/aarch64.h (aarch64_opnd_info): Change index fields to int64_t.
+
+2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf/mips.h (R_MIPS16_PC16_S1): New relocation.
+
+2016-06-25  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf/xtensa.h (xtensa_make_property_section): New prototype.
+
+2016-06-24  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf/common.h (AT_FREEBSD_EXECPATH, AT_FREEBSD_CANARY)
+	(AT_FREEBSD_CANARYLEN, AT_FREEBSD_OSRELDATE, AT_FREEBSD_NCPUS)
+	(AT_FREEBSD_PAGESIZES, AT_FREEBSD_PAGESIZESLEN)
+	(AT_FREEBSD_TIMEKEEP, AT_FREEBSD_STACKPROT): Define.
+
+2016-06-23  Graham Markall  <graham.markall@embecosm.com>
+
+	* opcode/arc.h: Make insn_class_t alphabetical again.
+
+2016-06-22  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf/dlx.h: Wrap in extern C.
+	* elf/xtensa.h: Likewise.
+	* opcode/arc.h: Likewise.
+
+2016-06-22  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/tilegx.h: Move TILEGX_NUM_PIPELINE_ENCODINGS into
+	tilegx_pipeline.
+
+2016-06-21  Graham Markall  <graham.markall@embecosm.com>
+
+	* opcode/arc.h: Add nps400 extension and instruction
+	subclass.
+	Remove ARC_OPCODE_NPS400
+	* elf/arc.h: Remove E_ARC_MACH_NPS400
+
+2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* opcode/sparc.h (enum sparc_opcode_arch_val): Add
+	SPARC_OPCODE_ARCH_V9C, SPARC_OPCODE_ARCH_V9D,
+	SPARC_OPCODE_ARCH_V9E, SPARC_OPCODE_ARCH_V9V and
+	SPARC_OPCODE_ARCH_V9M.
+
+2016-06-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* opcode/msp430-decode.h (MSP430_Size): Remove.
+	(Msp430_Opcode_Decoded): Change type of size to int.
+
+2016-06-11  Alan Modra  <amodra@gmail.com>
+
+	* coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define.
+
+2016-06-08  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* opcode/sparc.h: Add missing documentation for hyperprivileged
+	registers in rd (%) and rs1 ($).
+
+2016-06-07  Alan Modra  <amodra@gmail.com>
+
+	* elf/ppc.h (APUINFO_SECTION_NAME, APUINFO_LABEL, PPC_APUINFO_ISEL,
+	PPC_APUINFO_PMR, PPC_APUINFO_RFMCI, PPC_APUINFO_CACHELCK,
+	PPC_APUINFO_SPE, PPC_APUINFO_EFS, PPC_APUINFO_BRLOCK,
+	PPC_APUINFO_VLE: Define.
+
+2016-06-07  Matthew Wahab  <matthew.wahab@arm.com>
+
+	* opcode/arm.h (ARM_EXT2_RAS): New.  Also align preceding
+	entries.
+	(ARM_AEXT_V8_2A): Add ARM_EXT2_RAS.
+
+2016-06-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (MAX_INSN_ARGS): Increase to 16.
+	(struct arc_long_opcode): New structure.
+	(arc_long_opcodes): Declare.
+	(arc_num_long_opcodes): Declare.
+
+2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* elf/mips.h: Add extern "C".
+	* elf/sh.h: Likewise.
+	* opcode/d10v.h: Likewise.
+	* opcode/d30v.h: Likewise.
+	* opcode/ia64.h: Likewise.
+	* opcode/mips.h: Likewise.
+	* opcode/ppc.h: Likewise.
+	* opcode/sparc.h: Likewise.
+	* opcode/tic6x.h: Likewise.
+	* opcode/v850.h: Likewise.
+
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_callbacks): Update comments.
+	Return void from multiple_definition, multiple_common,
+	add_to_set, constructor, warning, undefined_symbol,
+	reloc_overflow, reloc_dangerous and unattached_reloc.
+
+2016-05-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/metag.h: wrap declarations in extern "C".
+
+2016-05-23  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (insn_subclass_t): Add COND.
+	(flag_class_t): Add F_CLASS_EXTEND.
+
+2016-05-23  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* opcode/arc.h (struct arc_opcode): Renamed attribute class to
+	insn_class.
+	(struct arc_flag_class): Renamed attribute class to flag_class.
+
+2016-05-23  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/tic54x.h (struct symbol_): typedef to tic54x_symbol instead of
+	plain symbol.
+
+2016-04-29  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2.h (enum dwarf_source_language) <DW_LANG_Rust,
+	DW_LANG_Rust_old>: New constants.
+
+2016-05-11  Andrew Bennett  <andrew.bennett@imgtec.com>
+
+	* elf/mips.h (AFL_ASE_DSPR3): New macro.
+	(AFL_ASE_MASK): Update to include AFL_ASE_DSPR3.
+	* opcode/mips.h (ASE_DSPR3): New macro.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* arm.h (enum arm_st_branch_type): Add new ST_BRANCH_ENUM_SIZE
+	enumerator.
+	(NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS): New macro.
+	(ENUM_ARM_ST_BRANCH_TYPE_BITMASK): Likewise.
+	(ARM_SYM_BRANCH_TYPE): Replace by ...
+	(ARM_GET_SYM_BRANCH_TYPE): This and ...
+	(ARM_SET_SYM_BRANCH_TYPE): This in two versions depending on whether
+	BFD_ASSERT is defined or not.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* elf/arm.h (Tag_DSP_extension): Define.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm.h (ARM_FSET_CPU_SUBSET): Define macro.
+
+2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* opcode/arm.h (ARM_EXT2_V8M_MAIN): new feature bit.
+	(ARM_AEXT2_V8M_MAIN): New architecture extension feature set.
+	(ARM_ARCH_V8M_MAIN): Use ARM_AEXT2_V8M_MAIN instead of ARM_AEXT2_V8M
+	for the high core bits.
+
+2016-05-03  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (ARC_SYNTAX_1OP): Declare
+	(ARC_SYNTAX_NOP): Likewsie.
+	(ARC_OP1_MUST_BE_IMM): Update defined value.
+	(ARC_OP1_IMM_IMPLIED): Likewise.
+	(arg_32bit_rc, arg_32bit_u6, arg_32bit_limm): Declare.
+
+2016-04-28  Nick Clifton  <nickc@redhat.com>
+
+	PR target/19722
+	* opcode/aarch64.h (struct aarch64_opcode): Add verifier field.
+
+2016-04-27  Alan Modra  <amodra@gmail.com>
+
+	* bfdlink.h (struct bfd_link_hash_entry): Add "section" field to
+	undef.  Formatting.
+
+2016-04-21  Nick Clifton  <nickc@redhat.com>
+
+	* bfdlink.h: Add prototype for bfd_link_check_relocs.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* bfdlink.h (bfd_link_info): Add check_relocs_after_open_input.
+
+2016-04-20  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc-reloc.def (ARC_NPS_CMEM16): Add ME modifier to formula.
+
+2016-04-19  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (MAX_INSN_ARGS): Increase 6 to 8.
+
+2016-04-19  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (insn_class_t): Add NET and ACL class.
+
+2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc-reloc.def: Add ARC_NPS_CMEM16 reloc.
+	* opcode/arc.h (NPS_CMEM_HIGH_VALUE): Define.
+
+2016-04-12  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (flag_class_t): Update.
+	(ARC_OPCODE_NONE): Define.
+	(ARC_OPCODE_ARCALL): Likewise.
+	(ARC_OPCODE_ARCFPX): Likewise.
+	(ARC_REGISTER_READONLY): Likewise.
+	(ARC_REGISTER_WRITEONLY): Likewise.
+	(ARC_REGISTER_NOSHORT_CUT): Likewise.
+	(arc_aux_reg): Add cpu.
+
+2016-04-12  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (arc_num_opcodes): Remove.
+	(ARC_SYNTAX_3OP, ARC_SYNTAX_2OP, ARC_OP1_MUST_BE_IMM)
+	(ARC_OP1_IMM_IMPLIED, ARC_SUFFIX_NONE, ARC_SUFFIX_COND)
+	(ARC_SUFFIX_FLAG): Define.
+	(flags_none, flags_f, flags_cc, flags_ccf): Declare.
+	(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
+	(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
+	(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
+	(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
+	(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
+	(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
+	(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
+	(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
+	(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
+
+2016-04-05  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (DPA, DPX, SPX): New subclass enums.
+	(ARC_FPUDA): Define.
+	(arc_aux_reg): Add new field.
+
+2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* opcode/arc-func.h (replace_bits24): Changed.
+	(replace_bits24_be): Created.
+
+2016-03-29  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* opcode/arc.h (insn_subclass_t): Add QUARKSE subclass.
+	(FIELDA, FIELDB, FIELDC, FIELDF, FIELDQ, INSN3OP, INSN2OP)
+	(INSN2OP, INSN3OP_ABC, INSN3OP_ALC, INSN3OP_ABL, INSN3OP_ALL)
+	(INSN3OP_0BC, INSN3OP_0LC, INSN3OP_0BL, INSN3OP_0LL, INSN3OP_ABU)
+	(INSN3OP_ALU, INSN3OP_0BU, INSN3OP_0LU, INSN3OP_BBS, INSN3OP_0LS)
+	(INSN3OP_CBBC, INSN3OP_CBBL, INSN3OP_C0LC, INSN3OP_C0LL)
+	(INSN3OP_CBBU, INSN3OP_C0LU, MINSN3OP_ABC, MINSN3OP_ALC)
+	(MINSN3OP_ABL, MINSN3OP_ALL, MINSN3OP_0BC, MINSN3OP_0LC)
+	(MINSN3OP_0BL, MINSN3OP_0LL, MINSN3OP_ABU, MINSN3OP_ALU)
+	(MINSN3OP_0BU, MINSN3OP_0LU, MINSN3OP_BBS, MINSN3OP_0LS)
+	(MINSN3OP_CBBC, MINSN3OP_CBBL, MINSN3OP_C0LC, MINSN3OP_C0LL)
+	(MINSN3OP_CBBU, MINSN3OP_C0LU, INSN2OP_BC, INSN2OP_BL, INSN2OP_0C)
+	(INSN2OP_0L INSN2OP_BU, INSN2OP_0U, MINSN2OP_BC, MINSN2OP_BL)
+	(MINSN2OP_0C, MINSN2OP_0L, MINSN2OP_BU, MINSN2OP_0U): Define.
+
+2016-03-22  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/i960.h: Add const qualifiers.
+	* opcode/tic4x.h (struct tic4x_inst): Likewise.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcodes/arc.h (insn_class_t): Add BITOP type.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (flag_class_t): Remove all old flag classes, add 3
+	new classes instead.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc.h (E_ARC_MACH_NPS400): Define.
+	* opcode/arc.h (ARC_OPCODE_NPS400): Define.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc.h (EF_ARC_CPU_GENERIC): Delete.  Update related comment.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc.h (EF_ARC_MACH): Delete.
+	(EF_ARC_MACH_MSK): Remove out of date comment.
+
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* opcode/arc.h (ARC_OPCODE_BASE): Delete.
+
+2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19807
+	* bfdlink.h (bfd_link_info): Add no_reloc_overflow_check.
+
+2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
+	    Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* elf/arc-reloc.def: Add a call to ME within the formula for each
+	relocation that requires middle-endian correction.
+
+2016-03-07  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+	* opcode/dlx.h (struct dlx_opcode): Add const qualifiers.
+	* opcode/h8300.h (struct h8_opcode): Likewise.
+	* opcode/hppa.h (struct pa_opcode): Likewise.
+	* opcode/msp430.h: Likewise.
+	* opcode/spu.h (struct spu_opcode): Likewise.
+	* opcode/tic30.h (struct _register): Likewise.
+	* opcode/tic4x.h (struct tic4x_register): Likewise.
+	(struct tic4x_cond): Likewise.
+	(struct tic4x_indirect): Likewise.
+	(struct tic4x_inst): Likewise.
+	* opcode/visium.h (struct reg_entry): Likewise.
+
+2016-03-04  Matthew Wahab  <matthew.wahab@arm.com>
+
+	* arm.h (ARM_ARCH_V8_1A): Add FPU_NEON_EXT_RDMA.
+	(ARM_CPU_HAS_FEATURE): Add comment.
+
+2016-03-03  Than McIntosh <thanm@google.com>
+
+	* plugin-api.h: Add new hooks to the plugin transfer vector to
+	to support querying section alignment and section size.
+	(ld_plugin_get_input_section_alignment): New hook.
+	(ld_plugin_get_input_section_size): New hook.
+	(ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT
+	and LDPT_GET_INPUT_SECTION_SIZE.
+	(ld_plugin_tv): Add tv_get_input_section_alignment and
+	tv_get_input_section_size.
+
+2016-03-03  Evgenii Stepanov  <eugenis@google.com>
+
+	* plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3.
+
+2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19645
+	* bfdlink.h (bfd_link_elf_stt_common): New enum.
+	(bfd_link_info): Add elf_stt_common.
+
+2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/19636
+	PR ld/19704
+	PR ld/19719
+	* bfdlink.h (bfd_link_info): Add dynamic_undefined_weak.
+
+2016-02-19  Matthew Wahab  <matthew.wahab@arm.com>
+	    Jiong Wang  <jiong.wang@arm.com>
+
+	* opcode/arm.h (ARM_EXT2_FP16_INSN): New.
+
+2016-02-10  Claudiu Zissulescu  <claziss@synopsys.com>
+	    Janek van Oirschot  <jvanoirs@synopsys.com>
+
+	* opcode/arc.h (arc_opcode arc_relax_opcodes)
+	(arc_num_relax_opcodes): Declare.
+
+2016-02-09  Nick Clifton  <nickc@redhat.com>
+
+	* opcode/metag.h (metag_scondtab): Mark as possibly unused.
+	* opcode/nds32.h (nds32_r45map): Likewise.
+	(nds32_r54map): Likewise.
+	* opcode/visium.h (gen_reg_table): Likewise.
+	(fp_reg_table, cc_table, opcode_table): Likewise.
+
+2016-02-09  Alan Modra  <amodra@gmail.com>
+
+	PR 16583
+	* elf/common.h (AT_SUN_HWCAP): Undef before defining.
+
+2016-02-04  Nick Clifton  <nickc@redhat.com>
+
+	PR target/19561
+	* opcode/msp430.h (IGNORE_CARRY_BIT): New define.
+	(RRUX): Synthesise using case 2 rather than 7.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf/common.h (NT_FREEBSD_THRMISC): Define.
+	(NT_FREEBSD_PROCSTAT_PROC): Define.
+	(NT_FREEBSD_PROCSTAT_FILES): Define.
+	(NT_FREEBSD_PROCSTAT_VMMAP): Define.
+	(NT_FREEBSD_PROCSTAT_GROUPS): Define.
+	(NT_FREEBSD_PROCSTAT_UMASK): Define.
+	(NT_FREEBSD_PROCSTAT_RLIMIT): Define.
+	(NT_FREEBSD_PROCSTAT_OSREL): Define.
+	(NT_FREEBSD_PROCSTAT_PSSTRINGS): Define.
+	(NT_FREEBSD_PROCSTAT_AUXV): Define.
+
+2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
+	    Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
+
+	* elf/arc-reloc.def (ARC_32, ARC_GOTPC, ARC_TLS_GD_GOT)
+	(ARC_TLS_IE_GOT, ARC_TLS_DTPOFF, ARC_TLS_DTPOFF_S9, ARC_TLS_LE_S9)
+	(ARC_TLS_LE_32): Fixed formula.
+	(ARC_TLS_GD_LD): Use new special function.
+	* opcode/arc-func.h: Changed all the replacement
+	functions to clear the patching bits before doing an or it with the value
+	argument.
+
+2016-01-18  Nick Clifton  <nickc@redhat.com>
+
+	PR ld/19440
+	* coff/internal.h (internal_syment): Use int to hold section
+	number.
+	(N_UNDEF): Cast to int not short.
+	(N_ABS): Likewise.
+	(N_DEBUG): Likewise.
+	(N_TV): Likewise.
+	(P_TV): Likewise.
+
+2016-01-11  Nick Clifton  <nickc@redhat.com>
+
+	Import this change from GCC mainline:
+
+	2016-01-07  Mike Frysinger  <vapier@gentoo.org>
+
+	* longlong.h: Change !__SHMEDIA__ to
+	(!defined (__SHMEDIA__) || !__SHMEDIA__).
+	Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__.
+
+2016-01-06  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* opcode/mips.h: Add a summary of MIPS16 operand codes.
+
+2016-01-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* libiberty.h (dupargv): Change arg to char * const *.
+	(writeargv, countargv): Likewise.
+
+2016-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+For older changes see ChangeLog-0415, aout/ChangeLog-9115,
+cgen/ChangeLog-0915, coff/ChangeLog-0415, elf/ChangeLog-0415,
+mach-o/ChangeLog-1115, nlm/ChangeLog-9315, opcode/ChangeLog-0415,
+som/ChangeLog-1015, and vms/ChangeLog-1015
+
+Copyright (C) 2016 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/alpha.h ./include/coff/alpha.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/alpha.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/alpha.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* ECOFF support on Alpha machines.
    coff/ecoff.h must be included before this file.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/apollo.h ./include/coff/apollo.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/apollo.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/apollo.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Apollo M68K
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/arm.h ./include/coff/arm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/arm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/arm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ARM COFF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/aux-coff.h ./include/coff/aux-coff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/aux-coff.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/aux-coff.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Modifications of internal.h and m68k.h needed by A/UX
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ChangeLog ./include/coff/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,419 +0,0 @@
-2015-01-06  Alan Modra  <amodra@gmail.com>
-
-	PR binutils/17754
-	* internal.h (internal_auxent): Increase size of x_fname field to
-	20 to allow for PE format's longer file names.
-
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-08-20  Daniel Micay  <danielmicay@gmail.com>
-
-	* pe.h: Add HIGH_ENTROPY_VA flag
-
-2014-04-22  Christian Svensson  <blue@cmd.nu>
-
-	* or32.h: Delete.
-
-2014-04-08  Jon TURNEY  <jon.turney@dronecode.org.uk>
-
-	* pe.h (external_IMAGE_DEBUG_DIRECTORY, _CV_INFO_PDB70)
-	(_CV_INFO_PDB20): Add structures and constants for debug directory
-	and codeview records.
-	* internal.h (internal_IMAGE_DEBUG_DIRECTORY, CODEVIEW_INFO):
-	Add structures and constants for internal representation of debug
-	directory and codeview records.
-
-2014-03-13  Tristan Gingold  <gingold@adacore.com>
-
-	* pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare.
-	(FILHSZ_BIGOBJ): Define.
-	(struct external_SYMBOL_EX): Declare.
-	(SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define.
-	(union external_AUX_SYMBOL_EX): Declare.
-	(AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define.
-	* internal.h (struct internal_filehdr): Change type
-	of f_nscns.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2013-12-06  Tristan Gingold  <gingold@adacore.com>
-
-	* pe.h (UWOP_EPILOG, UWOP_PARE): Define.
-
-2013-07-10  Tristan Gingold  <gingold@adacore.com>
-
-	* rs6000.h (external_core_dumpx): New structure.
-	(external_ld_info32): Ditto.
-
-2013-07-02  Tristan Gingold  <gingold@adacore.com>
-
-	* internal.h (C_STTLS, C_GTLS): Define.
-	* xcoff.h (XMC_TL, XMC_TU, XMC_TE): Define.
-
-2013-02-04  Alan Modra  <amodra@gmail.com>
-
-	* ti.h (SWAP_OUT_RELOC_EXTRA): Define.
-
-2013-01-02  Martin Storsjo <martin@martin.st>
-
-	* arm.h (ARMV7PEMAGIC): Define.
-	(ARMBADMAG): Update.
-
-2011-06-02  Nick Clifton  <nickc@redhat.com>
-
-	* i860.h: Fix spelling mistake in comment.
-
-2011-05-04  Tristan Gingold  <gingold@adacore.com>
-
-	* rs6000.h (union external_auxent): Add x_ftype field.
-	* rs6k64.h: (struct external_auxent): Remap x_file field.
-
-2011-05-04  Tristan Gingold  <gingold@adacore.com>
-
-	* rs6000.h (struct external_exceptab): New struct.
-	(EXCEPTSZ): New macro.
-	* rs6k64.h: (struct external_exceptab): New struct.
-	(EXCEPTSZ): New macro.
-
-2011-05-03  Tristan Gingold  <gingold@adacore.com>
-
-	* rs6000.h (struct external_ldsym): Use E_SYMNMLEN instead of
-	SYMNMLEN.
-
-2011-04-27  Tristan Gingold  <gingold@adacore.com>
-
-	* xcoff.h (F_FDPR_PROF, F_FDPR_OPTI, F_DSA, F_VARPG)
-	(STYP_DWARF, SSUBTYP_DWINFO)
-	(SSUBTYP_DWLINE, SSUBTYP_DWPBNMS, SSUBTYP_DWPBTYP)
-	(SSUBTYP_DWARNGE, SSUBTYP_DWABREV, SSUBTYP_DWSTR)
-	(SSUBTYP_DWRNGES, STYP_TDATA, STYP_TBSS, R_TLS, R_TLS_IE)
-	(R_TLS_LD, R_TLS_LE, R_TLSM, R_TLSML, R_TOCU, R_TOCL, C_DWARF):
-	New macros.
-
-2011-03-31  Tristan Gingold  <gingold@adacore.com>
-
-	* internal.h (C_NULL_VALUE): Define.
-
-2010-06-29  Alan Modra  <amodra@gmail.com>
-
-	* maxq.h: Delete file.
-
-2010-04-15  Nick Clifton  <nickc@redhat.com>
-
-	* alpha.h: Update copyright notice to use GPLv3.
-	* apollo.h: Likewise.
-	* arm.h: Likewise.
-	* aux-coff.h: Likewise.
-	* ecoff.h: Likewise.
-	* external.h: Likewise.
-	* go32exe.h: Likewise.
-	* h8300.h: Likewise.
-	* h8500.h: Likewise.
-	* i386.h: Likewise.
-	* i860.h: Likewise.
-	* i960.h: Likewise.
-	* ia64.h: Likewise.
-	* internal.h: Likewise.
-	* m68k.h: Likewise.
-	* m88k.h: Likewise.
-	* maxq.h: Likewise.
-	* mcore.h: Likewise.
-	* mips.h: Likewise.
-	* mipspe.h: Likewise.
-	* or32.h: Likewise.
-	* pe.h: Likewise.
-	* powerpc.h: Likewise.
-	* rs6000.h: Likewise.
-	* rs6k64.h: Likewise.
-	* sh.h: Likewise.
-	* sparc.h: Likewise.
-	* ti.h: Likewise.
-	* tic30.h: Likewise.
-	* tic4x.h: Likewise.
-	* tic54x.h: Likewise.
-	* tic80.h: Likewise.
-	* w65.h: Likewise.
-	* we32k.h: Likewise.
-	* x86_64.h: Likewise.
-	* xcoff.h: Likewise.
-	* z80.h: Likewise.
-	* z8k.h: Likewise.
-
-2009-12-02  Jerker Bäck  <jerker.back@gmail.com>
-
-	PR binutils/11017
-	* i386lh (COFF_PAGE_SIZE): Define.
-	* x86_64.h (COFF_PAGE_SIZE): Define.
-
-2009-10-17  Arnold Metselaar  <arnold.metselaar@planet.nl>
-
-	* z80.h: Store alignment requirement in section header, to allow
-	ld to preserve alignment. Some code was copied from ti.h.
-
-2009-09-05  Martin Thuresson  <martin@mtme.org>
-
-	* ti.h (GET_LNSZ_SIZE, PUT_LNSZ_SIZE): Updated name of class
-	variable to in_class to match changes in function that use this
-	macro.
-
-2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix references past allocated memory for i386-*-go32.
-	* ti.h (COFF_ADJUST_FILEHDR_IN_POST, COFF_ADJUST_FILEHDR_OUT_POST):
-	Reference F_TARGET_ID only when !COFF0_P.
-
-2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Stop using bfd_usrdata in libbfd.
-	* go32exe.h (struct external_filehdr_go32_exe <stub>, FILHSZ): Replace
-	STUBSIZE by GO32_STUBSIZE.
-	(STUBSIZE): Move the definition ...
-	* internal.h (GO32_STUBSIZE): ... here and rename it.
-	(struct internal_filehdr <go32stub>, F_GO32STUB): New.
-
-2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* symconst.h (btLong64, btULong64, btLongLong64, btULongLong64,
-	btAdr64, btInt64, btUInt64): New defines.
-
-2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
-
-	* pe.h (pex64_runtime_function): New structure.
-	(external_pex64_runtime_function): Likewise.
-	(pex64_unwind_code): Likewise.
-	(external_pex64_unwind_code): Likewise.
-	(pex64_unwind_info): Likewise.
-	(external_pex64_unwind_info): Likewise.
-	(external_pex64_scope): Likewise.
-	(pex64_scope): Likewise.
-	(pex64_scope_entry):  Likewise.
-	(external_pex64_scope_entry): Likewise.
-	(PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro.
-	(PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise.
-	(PEX64_UNWCODE_CODE): Likewise.
-	(PEX64_UNWCODE_INFO): Likewise.
-	(UWOP_...): Add defines for unwind code.
-	(UNW_FLAG_...): Add defined for unwind info flags.
-	(PEX64_SCOPE_ENTRY_SIZE): New macro.
-	(PEX64_UWI_VERSION): Likewise.
-	(PEX64_UWI_FLAGS): Likewise.
-	(PEX64_UWI_FRAMEREG): Likewise.
-	(PEX64_UWI_FRAMEOFF): Likewise.
-	(PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise.
-	(PEX64_OFFSET_TO_UNWIND_CODE): Likewise.
-	(PEX64_OFFSET_TO_HANDLER_RVA): Likewise.
-	(PEX64_OFFSET_TO_SCOPE_COUNT): Likewise.
-	(PEX64_SCOPE_ENTRY): Likewise.
-
-2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ...
-	(IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This.
-
-2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
-
-	* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c.
-
-2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
-
-	* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags.
-	(xcoff_loader_info): Add auto_export_flags.
-
-2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
-
-	* internal.h (C_AIX_WEAKEXT): New macro.
-	(C_WEAKEXT): Use the GNU definition in the generic part of the file,
-	and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
-	the file.
-	(CSECT_SYM_P): New macro.
-	* xcoff.h (L_WEAK): Define.
-	(EXTERN_SYM_P): New macro.
-
-2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
-
-	* xcoff.h (XCOFF_ALLOCATED): New flag.
-
-2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
-
-	* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments.
-	(XCOFF_WAS_UNDEFINED): New flag.
-	(xcoff_link_hash_table): Add an "rtld" field.
-
-2009-03-14  Dave Korn  <dave.korn.cygwin@gmail.com>
-
-	* internal.h (struct internal_extra_pe_aouthdr):  Correct type
-	of DllCharacteristics flags field to unsigned.
-	* pe.h (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
-	IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
-	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT,
-	IMAGE_DLLCHARACTERISTICS_NO_ISOLATION,
-	IMAGE_DLLCHARACTERISTICS_NO_SEH,
-	IMAGE_DLLCHARACTERISTICS_NO_BIND,
-	IMAGE_DLLCHARACTERISTICS_WDM_DRIVER,
-	IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE):  New macros to
-	define flag bit values for DllCharacteristics field of PEAOUTHDR,
-	PEPAOUTHDR.
-
-2008-12-23  Johan Olmutz Nielsen  <jnielsen@ddci.com>
-
-	* ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define.
-
-2008-06-17  Nick Clifton  <nickc@redhat.com>
-
-	* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this
-	macro which does not trigger an array bounds warning in gcc.
-	(PUT_SCNHDR_NLNNO): Likewise.
-	(GET_SCNHDR_FLAGS): Likewise.
-	(PUT_SCNHDR_FLAGS): Likewise.
-	(GET_SCNHDR_PAGE): Likewise.
-	(PUT_SCNHDR_PAGE): Likewise.
-
-2007-11-05  Danny Smith  <dannysmith@users.sourceforge.net>
-
-	* pe.h (COFF_ENCODE_ALIGNMENT) Define.
-
-2007-08-02  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* pe.h (IMAGE_SCN_ALIGN_POWER_BIT_POS): New.
-	(IMAGE_SCN_ALIGN_POWER_BIT_MASK): Likewise.
-	(IMAGE_SCN_ALIGN_POWER_NUM): Likewise.
-	(IMAGE_SCN_ALIGN_POWER_CONST): Likewise.
-	(IMAGE_SCN_ALIGN_128BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_256BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_512BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_1024BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_2048BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_4096BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_8192BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_1BYTES): Redefined with
-	IMAGE_SCN_ALIGN_POWER_CONST.
-	(IMAGE_SCN_ALIGN_2BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_4BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_8BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_16BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_32BYTES): Likewise.
-	(IMAGE_SCN_ALIGN_64BYTES): Likewise.
-
-2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
-
-	* internal.h (struct internal_syment): Use bfd_hostptr_t for
-	_n_zeroes and _n_offset fields.
-
-2007-04-27  Alan Modra  <amodra@bigpond.net.au>
-
-	* rs6000.h: Write Mimi's name in ASCII.
-
-2007-03-19  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* internal.h (internal_extra_pe_aouthdr): Add Magic,
-	MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
-	SizeOfInitializedData, SizeOfUninitializedData,
-	AddressOfEntryPoint, BaseOfCode and BaseOfData.
-
-2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
-	    Nick Clifton  <nickc@redhat.com>
-
-	* external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED.
-	(struct external_syment): Likewise.
-	(union external_auxent): Likewise.
-
-2006-11-14  Phil Lello  <phil.lello@homecall.co.uk>
-
-	* pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and
-	IMAGE_SUBSYSTEM_XBOX.
-	* internal.h: Added defines for PE directory entry types.
-	NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in
-	pe.h
-
-2006-09-20  Kai Tietz  <Kai.Tietz@onevision.com>
-
-	* external.h: Add proper external_aouthdr64 structure (without
-	data_start member).
-	(AOUTHDRSZ64): Set according structure size.
-	(AOUTHDR64): As typedef of external_aouthdr64 structure.
-	* internal.h: Add relocation identifiers for coff.
-	* pe.h:	Add define IMAGE_FILE_MACHINE_AMD64 the coff signature.
-	(PEPAOUTHDR): Adjust structure to have proper size (using AOUTHDR64).
-	(PEPAOUTSZ): Calculated size of 240.
-	* x86_64.h: Coff information for x86_64 (AMD64).
-
-2006-02-05  Arnold Metselaar  <arnold.metselaar@planet.nl>
-
-	* internal.h: Add relocation number R_IMM24 for Z80.
-
-2005-10-25  Arnold Metselaar  <arnold.metselaar@planet.nl>
-
-	* internal.h: Add relocation number for Z80
-	* z80.h: New file.
-
-2005-08-18  Alan Modra  <amodra@bigpond.net.au>
-
-	* a29k.h: Delete.
-
-2005-07-14  Daniel Marques  <marques@cs.cornell.edu>
-
-	* alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define.
-	* ecoff.h (ALPHA_MAGIC_COMPRESSED): Define.
-
-2005-05-10  Nick Clifton  <nickc@redhat.com>
-
-	* Update the address and phone number of the FSF organization in
-	the GPL notices in the following files:
-	a29k.h,	alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h,
-	go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h,
-	internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h,
-	or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h,
-	tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h
-
-2005-02-21  Alan Modra  <amodra@bigpond.net.au>
-
-	* xcoff.h (struct xcoff_loader_info): Warning fix.
-
-2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
-
-	* maxq.h (F_MAXQ10, F_MAXQ20): Define.
-
-2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
-	    Vineet Sharma      <vineets@noida.hcltech.com>
-
-	* maxq.h: New file: Defintions for the maxq port.
-
-2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
-
-	* pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
-	(IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
-	(IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
-
-2004-08-13  Mark Kettenis  <kettenis@gnu.org>
-
-	* symconst.h (langMax): Fix typo in comment.
-
-2004-04-23  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
-	(MIPS_R_PCREL16): Update comment.
-	* ecoff.h (struct ecoff_value_adjust): Remove structure.
-	(struct ecoff_debug_info): Remove 'adjust' member.
-
-2004-04-20  DJ Delorie  <dj@redhat.com>
-
-	* internal.h (R_SECREL32): Add.
-
-For older changes see ChangeLog-9103
-
-Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ChangeLog-0415 ./include/coff/ChangeLog-0415
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ChangeLog-0415	1970-01-01 00:00:00.000000000 +0000
+++ ./include/coff/ChangeLog-0415	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,419 @@
+2015-01-06  Alan Modra  <amodra@gmail.com>
+
+	PR binutils/17754
+	* internal.h (internal_auxent): Increase size of x_fname field to
+	20 to allow for PE format's longer file names.
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-08-20  Daniel Micay  <danielmicay@gmail.com>
+
+	* pe.h: Add HIGH_ENTROPY_VA flag
+
+2014-04-22  Christian Svensson  <blue@cmd.nu>
+
+	* or32.h: Delete.
+
+2014-04-08  Jon TURNEY  <jon.turney@dronecode.org.uk>
+
+	* pe.h (external_IMAGE_DEBUG_DIRECTORY, _CV_INFO_PDB70)
+	(_CV_INFO_PDB20): Add structures and constants for debug directory
+	and codeview records.
+	* internal.h (internal_IMAGE_DEBUG_DIRECTORY, CODEVIEW_INFO):
+	Add structures and constants for internal representation of debug
+	directory and codeview records.
+
+2014-03-13  Tristan Gingold  <gingold@adacore.com>
+
+	* pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare.
+	(FILHSZ_BIGOBJ): Define.
+	(struct external_SYMBOL_EX): Declare.
+	(SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define.
+	(union external_AUX_SYMBOL_EX): Declare.
+	(AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define.
+	* internal.h (struct internal_filehdr): Change type
+	of f_nscns.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2013-12-06  Tristan Gingold  <gingold@adacore.com>
+
+	* pe.h (UWOP_EPILOG, UWOP_PARE): Define.
+
+2013-07-10  Tristan Gingold  <gingold@adacore.com>
+
+	* rs6000.h (external_core_dumpx): New structure.
+	(external_ld_info32): Ditto.
+
+2013-07-02  Tristan Gingold  <gingold@adacore.com>
+
+	* internal.h (C_STTLS, C_GTLS): Define.
+	* xcoff.h (XMC_TL, XMC_TU, XMC_TE): Define.
+
+2013-02-04  Alan Modra  <amodra@gmail.com>
+
+	* ti.h (SWAP_OUT_RELOC_EXTRA): Define.
+
+2013-01-02  Martin Storsjo <martin@martin.st>
+
+	* arm.h (ARMV7PEMAGIC): Define.
+	(ARMBADMAG): Update.
+
+2011-06-02  Nick Clifton  <nickc@redhat.com>
+
+	* i860.h: Fix spelling mistake in comment.
+
+2011-05-04  Tristan Gingold  <gingold@adacore.com>
+
+	* rs6000.h (union external_auxent): Add x_ftype field.
+	* rs6k64.h: (struct external_auxent): Remap x_file field.
+
+2011-05-04  Tristan Gingold  <gingold@adacore.com>
+
+	* rs6000.h (struct external_exceptab): New struct.
+	(EXCEPTSZ): New macro.
+	* rs6k64.h: (struct external_exceptab): New struct.
+	(EXCEPTSZ): New macro.
+
+2011-05-03  Tristan Gingold  <gingold@adacore.com>
+
+	* rs6000.h (struct external_ldsym): Use E_SYMNMLEN instead of
+	SYMNMLEN.
+
+2011-04-27  Tristan Gingold  <gingold@adacore.com>
+
+	* xcoff.h (F_FDPR_PROF, F_FDPR_OPTI, F_DSA, F_VARPG)
+	(STYP_DWARF, SSUBTYP_DWINFO)
+	(SSUBTYP_DWLINE, SSUBTYP_DWPBNMS, SSUBTYP_DWPBTYP)
+	(SSUBTYP_DWARNGE, SSUBTYP_DWABREV, SSUBTYP_DWSTR)
+	(SSUBTYP_DWRNGES, STYP_TDATA, STYP_TBSS, R_TLS, R_TLS_IE)
+	(R_TLS_LD, R_TLS_LE, R_TLSM, R_TLSML, R_TOCU, R_TOCL, C_DWARF):
+	New macros.
+
+2011-03-31  Tristan Gingold  <gingold@adacore.com>
+
+	* internal.h (C_NULL_VALUE): Define.
+
+2010-06-29  Alan Modra  <amodra@gmail.com>
+
+	* maxq.h: Delete file.
+
+2010-04-15  Nick Clifton  <nickc@redhat.com>
+
+	* alpha.h: Update copyright notice to use GPLv3.
+	* apollo.h: Likewise.
+	* arm.h: Likewise.
+	* aux-coff.h: Likewise.
+	* ecoff.h: Likewise.
+	* external.h: Likewise.
+	* go32exe.h: Likewise.
+	* h8300.h: Likewise.
+	* h8500.h: Likewise.
+	* i386.h: Likewise.
+	* i860.h: Likewise.
+	* i960.h: Likewise.
+	* ia64.h: Likewise.
+	* internal.h: Likewise.
+	* m68k.h: Likewise.
+	* m88k.h: Likewise.
+	* maxq.h: Likewise.
+	* mcore.h: Likewise.
+	* mips.h: Likewise.
+	* mipspe.h: Likewise.
+	* or32.h: Likewise.
+	* pe.h: Likewise.
+	* powerpc.h: Likewise.
+	* rs6000.h: Likewise.
+	* rs6k64.h: Likewise.
+	* sh.h: Likewise.
+	* sparc.h: Likewise.
+	* ti.h: Likewise.
+	* tic30.h: Likewise.
+	* tic4x.h: Likewise.
+	* tic54x.h: Likewise.
+	* tic80.h: Likewise.
+	* w65.h: Likewise.
+	* we32k.h: Likewise.
+	* x86_64.h: Likewise.
+	* xcoff.h: Likewise.
+	* z80.h: Likewise.
+	* z8k.h: Likewise.
+
+2009-12-02  Jerker Bäck  <jerker.back@gmail.com>
+
+	PR binutils/11017
+	* i386lh (COFF_PAGE_SIZE): Define.
+	* x86_64.h (COFF_PAGE_SIZE): Define.
+
+2009-10-17  Arnold Metselaar  <arnold.metselaar@planet.nl>
+
+	* z80.h: Store alignment requirement in section header, to allow
+	ld to preserve alignment. Some code was copied from ti.h.
+
+2009-09-05  Martin Thuresson  <martin@mtme.org>
+
+	* ti.h (GET_LNSZ_SIZE, PUT_LNSZ_SIZE): Updated name of class
+	variable to in_class to match changes in function that use this
+	macro.
+
+2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix references past allocated memory for i386-*-go32.
+	* ti.h (COFF_ADJUST_FILEHDR_IN_POST, COFF_ADJUST_FILEHDR_OUT_POST):
+	Reference F_TARGET_ID only when !COFF0_P.
+
+2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Stop using bfd_usrdata in libbfd.
+	* go32exe.h (struct external_filehdr_go32_exe <stub>, FILHSZ): Replace
+	STUBSIZE by GO32_STUBSIZE.
+	(STUBSIZE): Move the definition ...
+	* internal.h (GO32_STUBSIZE): ... here and rename it.
+	(struct internal_filehdr <go32stub>, F_GO32STUB): New.
+
+2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* symconst.h (btLong64, btULong64, btLongLong64, btULongLong64,
+	btAdr64, btInt64, btUInt64): New defines.
+
+2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
+
+	* pe.h (pex64_runtime_function): New structure.
+	(external_pex64_runtime_function): Likewise.
+	(pex64_unwind_code): Likewise.
+	(external_pex64_unwind_code): Likewise.
+	(pex64_unwind_info): Likewise.
+	(external_pex64_unwind_info): Likewise.
+	(external_pex64_scope): Likewise.
+	(pex64_scope): Likewise.
+	(pex64_scope_entry):  Likewise.
+	(external_pex64_scope_entry): Likewise.
+	(PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro.
+	(PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise.
+	(PEX64_UNWCODE_CODE): Likewise.
+	(PEX64_UNWCODE_INFO): Likewise.
+	(UWOP_...): Add defines for unwind code.
+	(UNW_FLAG_...): Add defined for unwind info flags.
+	(PEX64_SCOPE_ENTRY_SIZE): New macro.
+	(PEX64_UWI_VERSION): Likewise.
+	(PEX64_UWI_FLAGS): Likewise.
+	(PEX64_UWI_FRAMEREG): Likewise.
+	(PEX64_UWI_FRAMEOFF): Likewise.
+	(PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise.
+	(PEX64_OFFSET_TO_UNWIND_CODE): Likewise.
+	(PEX64_OFFSET_TO_HANDLER_RVA): Likewise.
+	(PEX64_OFFSET_TO_SCOPE_COUNT): Likewise.
+	(PEX64_SCOPE_ENTRY): Likewise.
+
+2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ...
+	(IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This.
+
+2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+	* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+	* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags.
+	(xcoff_loader_info): Add auto_export_flags.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+	* internal.h (C_AIX_WEAKEXT): New macro.
+	(C_WEAKEXT): Use the GNU definition in the generic part of the file,
+	and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
+	the file.
+	(CSECT_SYM_P): New macro.
+	* xcoff.h (L_WEAK): Define.
+	(EXTERN_SYM_P): New macro.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+	* xcoff.h (XCOFF_ALLOCATED): New flag.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+	* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments.
+	(XCOFF_WAS_UNDEFINED): New flag.
+	(xcoff_link_hash_table): Add an "rtld" field.
+
+2009-03-14  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+	* internal.h (struct internal_extra_pe_aouthdr):  Correct type
+	of DllCharacteristics flags field to unsigned.
+	* pe.h (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
+	IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
+	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT,
+	IMAGE_DLLCHARACTERISTICS_NO_ISOLATION,
+	IMAGE_DLLCHARACTERISTICS_NO_SEH,
+	IMAGE_DLLCHARACTERISTICS_NO_BIND,
+	IMAGE_DLLCHARACTERISTICS_WDM_DRIVER,
+	IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE):  New macros to
+	define flag bit values for DllCharacteristics field of PEAOUTHDR,
+	PEPAOUTHDR.
+
+2008-12-23  Johan Olmutz Nielsen  <jnielsen@ddci.com>
+
+	* ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define.
+
+2008-06-17  Nick Clifton  <nickc@redhat.com>
+
+	* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this
+	macro which does not trigger an array bounds warning in gcc.
+	(PUT_SCNHDR_NLNNO): Likewise.
+	(GET_SCNHDR_FLAGS): Likewise.
+	(PUT_SCNHDR_FLAGS): Likewise.
+	(GET_SCNHDR_PAGE): Likewise.
+	(PUT_SCNHDR_PAGE): Likewise.
+
+2007-11-05  Danny Smith  <dannysmith@users.sourceforge.net>
+
+	* pe.h (COFF_ENCODE_ALIGNMENT) Define.
+
+2007-08-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* pe.h (IMAGE_SCN_ALIGN_POWER_BIT_POS): New.
+	(IMAGE_SCN_ALIGN_POWER_BIT_MASK): Likewise.
+	(IMAGE_SCN_ALIGN_POWER_NUM): Likewise.
+	(IMAGE_SCN_ALIGN_POWER_CONST): Likewise.
+	(IMAGE_SCN_ALIGN_128BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_256BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_512BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_1024BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_2048BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_4096BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_8192BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_1BYTES): Redefined with
+	IMAGE_SCN_ALIGN_POWER_CONST.
+	(IMAGE_SCN_ALIGN_2BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_4BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_8BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_16BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_32BYTES): Likewise.
+	(IMAGE_SCN_ALIGN_64BYTES): Likewise.
+
+2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
+
+	* internal.h (struct internal_syment): Use bfd_hostptr_t for
+	_n_zeroes and _n_offset fields.
+
+2007-04-27  Alan Modra  <amodra@bigpond.net.au>
+
+	* rs6000.h: Write Mimi's name in ASCII.
+
+2007-03-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* internal.h (internal_extra_pe_aouthdr): Add Magic,
+	MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
+	SizeOfInitializedData, SizeOfUninitializedData,
+	AddressOfEntryPoint, BaseOfCode and BaseOfData.
+
+2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED.
+	(struct external_syment): Likewise.
+	(union external_auxent): Likewise.
+
+2006-11-14  Phil Lello  <phil.lello@homecall.co.uk>
+
+	* pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and
+	IMAGE_SUBSYSTEM_XBOX.
+	* internal.h: Added defines for PE directory entry types.
+	NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in
+	pe.h
+
+2006-09-20  Kai Tietz  <Kai.Tietz@onevision.com>
+
+	* external.h: Add proper external_aouthdr64 structure (without
+	data_start member).
+	(AOUTHDRSZ64): Set according structure size.
+	(AOUTHDR64): As typedef of external_aouthdr64 structure.
+	* internal.h: Add relocation identifiers for coff.
+	* pe.h:	Add define IMAGE_FILE_MACHINE_AMD64 the coff signature.
+	(PEPAOUTHDR): Adjust structure to have proper size (using AOUTHDR64).
+	(PEPAOUTSZ): Calculated size of 240.
+	* x86_64.h: Coff information for x86_64 (AMD64).
+
+2006-02-05  Arnold Metselaar  <arnold.metselaar@planet.nl>
+
+	* internal.h: Add relocation number R_IMM24 for Z80.
+
+2005-10-25  Arnold Metselaar  <arnold.metselaar@planet.nl>
+
+	* internal.h: Add relocation number for Z80
+	* z80.h: New file.
+
+2005-08-18  Alan Modra  <amodra@bigpond.net.au>
+
+	* a29k.h: Delete.
+
+2005-07-14  Daniel Marques  <marques@cs.cornell.edu>
+
+	* alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define.
+	* ecoff.h (ALPHA_MAGIC_COMPRESSED): Define.
+
+2005-05-10  Nick Clifton  <nickc@redhat.com>
+
+	* Update the address and phone number of the FSF organization in
+	the GPL notices in the following files:
+	a29k.h,	alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h,
+	go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h,
+	internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h,
+	or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h,
+	tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h
+
+2005-02-21  Alan Modra  <amodra@bigpond.net.au>
+
+	* xcoff.h (struct xcoff_loader_info): Warning fix.
+
+2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
+
+	* maxq.h (F_MAXQ10, F_MAXQ20): Define.
+
+2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
+	    Vineet Sharma      <vineets@noida.hcltech.com>
+
+	* maxq.h: New file: Defintions for the maxq port.
+
+2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+	* pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
+	(IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
+	(IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
+
+2004-08-13  Mark Kettenis  <kettenis@gnu.org>
+
+	* symconst.h (langMax): Fix typo in comment.
+
+2004-04-23  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
+	(MIPS_R_PCREL16): Update comment.
+	* ecoff.h (struct ecoff_value_adjust): Remove structure.
+	(struct ecoff_debug_info): Remove 'adjust' member.
+
+2004-04-20  DJ Delorie  <dj@redhat.com>
+
+	* internal.h (R_SECREL32): Add.
+
+For older changes see ChangeLog-9103
+
+Copyright (C) 2004-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ecoff.h ./include/coff/ecoff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ecoff.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/ecoff.h	2017-03-06 01:49:08.000000000 +0000
@@ -2,7 +2,7 @@
    This does not include symbol information, found in sym.h and
    symconst.h.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/external.h ./include/coff/external.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/external.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/external.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* external.h  -- External COFF structures
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/go32exe.h ./include/coff/go32exe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/go32exe.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/go32exe.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* COFF information for PC running go32.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/h8300.h ./include/coff/h8300.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/h8300.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/h8300.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Renesas H8/300 and H8/300-H
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/h8500.h ./include/coff/h8500.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/h8500.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/h8500.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Renesas H8/500
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i386.h ./include/coff/i386.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i386.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/i386.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Intel 386/486.
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i860.h ./include/coff/i860.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i860.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/i860.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* COFF information for the Intel i860.
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i960.h ./include/coff/i960.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/i960.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/i960.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for 80960.  Origins: Intel corp, natch.
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ia64.h ./include/coff/ia64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ia64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/ia64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for HP/Intel IA-64.
    
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/internal.h ./include/coff/internal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/internal.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/internal.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* Internal format of COFF object file data structures, for GNU BFD.
    This file is part of BFD, the Binary File Descriptor library.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -483,7 +483,7 @@ struct internal_syment
     char *_n_nptr[2];		/* allows for overlaying	*/
   }     _n;
   bfd_vma n_value;		/* value of symbol		*/
-  short n_scnum;		/* section number		*/
+  int n_scnum;			/* section number		*/
   unsigned short n_flags;	/* copy of flags from filhdr	*/
   unsigned short n_type;	/* type and derived type	*/
   unsigned char n_sclass;	/* storage class		*/
@@ -497,11 +497,11 @@ struct internal_syment
 /* Relocatable symbols have number of the section in which they are defined,
    or one of the following:  */
 
-#define N_UNDEF	((short)0)	/* undefined symbol */
-#define N_ABS	((short)-1)	/* value of symbol is absolute */
-#define N_DEBUG	((short)-2)	/* debugging symbol -- value is meaningless */
-#define N_TV	((short)-3)	/* indicates symbol needs preload transfer vector */
-#define P_TV	((short)-4)	/* indicates symbol needs postload transfer vector*/
+#define N_UNDEF	((int)0)	/* undefined symbol */
+#define N_ABS	((int)-1)	/* value of symbol is absolute */
+#define N_DEBUG	((int)-2)	/* debugging symbol -- value is meaningless */
+#define N_TV	((int)-3)	/* indicates symbol needs preload transfer vector */
+#define P_TV	((int)-4)	/* indicates symbol needs postload transfer vector*/
 
 /* Type of a symbol, in low N bits of the word.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/m68k.h ./include/coff/m68k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/m68k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/m68k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for M68K
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/m88k.h ./include/coff/m88k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/m88k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/m88k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for 88k bcs
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mcore.h ./include/coff/mcore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mcore.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/mcore.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola MCore support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mips.h ./include/coff/mips.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mips.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/mips.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* ECOFF support on MIPS machines.
    coff/ecoff.h must be included before this file.
    
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mipspe.h ./include/coff/mipspe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/mipspe.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/mipspe.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Windows CE with MIPS VR4111
    
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/pe.h ./include/coff/pe.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/pe.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/pe.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* pe.h  -  PE COFF header information
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -604,7 +604,7 @@ struct external_IMAGE_DEBUG_DIRECTORY
 #define CVINFO_PDB70_CVSIGNATURE 0x53445352 // "RSDS"
 #define CVINFO_PDB20_CVSIGNATURE 0x3031424e // "NB10"
 #define CVINFO_CV50_CVSIGNATURE  0x3131424e // "NB11"
-#define CVINFO_CV41_CVSIGNATURE  0x3930424e // Ã¢NB09"
+#define CVINFO_CV41_CVSIGNATURE  0x3930424e // "NB09"
 
 typedef struct _CV_INFO_PDB70
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/powerpc.h ./include/coff/powerpc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/powerpc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/powerpc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* Basic coff information for the PowerPC
    Based on coff/rs6000.h, coff/i386.h and others.
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/rs6000.h ./include/coff/rs6000.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/rs6000.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/rs6000.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM RS/6000 "XCOFF" file definitions for BFD.
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Mimi Phuong-Thao Vo of IBM
    and John Gilmore of Cygnus Support.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/rs6k64.h ./include/coff/rs6k64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/rs6k64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/rs6k64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IBM RS/6000 "XCOFF64" file definitions for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/sh.h ./include/coff/sh.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/sh.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/sh.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Renesas SH
    
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/sparc.h ./include/coff/sparc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/sparc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/sparc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Sparc.
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -138,6 +138,14 @@ union external_auxent
 #define	AUXENT	union external_auxent
 #define	AUXESZ	20
 
+#define COFF_ADJUST_SYM_OUT_POST(ABFD, INP, EXTP)	\
+  do							\
+    {							\
+      SYMENT *extsym = (SYMENT *) (EXTP);		\
+      extsym->padding[0] = 0;				\
+      extsym->padding[1] = 0;				\
+    } while (0)
+
 #define _ETEXT	"etext"
 
 /********************** RELOCATION DIRECTIVES **********************/
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic30.h ./include/coff/tic30.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic30.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/tic30.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Texas Instruments TMS320C3X
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic4x.h ./include/coff/tic4x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic4x.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/tic4x.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* TI COFF information for Texas Instruments TMS320C4X/C3X.
    This file customizes the settings in coff/ti.h. 
    
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic54x.h ./include/coff/tic54x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic54x.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/tic54x.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* TI COFF information for Texas Instruments TMS320C54X.
    This file customizes the settings in coff/ti.h. 
    
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic80.h ./include/coff/tic80.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/tic80.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/tic80.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for TI TMS320C80 (MVP)
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ti.h ./include/coff/ti.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/ti.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/ti.h	2017-03-06 01:49:08.000000000 +0000
@@ -2,7 +2,7 @@
    customized in a target-specific file, and then this file included (see
    tic54x.h for an example).
    
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/w65.h ./include/coff/w65.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/w65.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/w65.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for WDC 65816
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/we32k.h ./include/coff/we32k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/we32k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/we32k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for we32k
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/x86_64.h ./include/coff/x86_64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/x86_64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/x86_64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* COFF information for AMD 64.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/xcoff.h ./include/coff/xcoff.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/xcoff.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/xcoff.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Internal format of XCOFF object file data structures for BFD.
 
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/z80.h ./include/coff/z80.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/z80.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/z80.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* coff information for Zilog Z80
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This program is free software; you can redistribute it and/or modify
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/z8k.h ./include/coff/z8k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/coff/z8k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/coff/z8k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* coff information for Zilog Z800N
    
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/demangle.h ./include/demangle.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/demangle.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/demangle.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Defs for interface to demanglers.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
-   
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
+
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License
    as published by the Free Software Foundation; either version 2, or
@@ -63,9 +63,10 @@ extern "C" {
 #define DMGL_GNU_V3	 (1 << 14)
 #define DMGL_GNAT	 (1 << 15)
 #define DMGL_DLANG	 (1 << 16)
+#define DMGL_RUST	 (1 << 17)	/* Rust wraps GNU_V3 style mangling.  */
 
 /* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG)
+#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG|DMGL_RUST)
 
 /* Enumeration of possible demangling styles.
 
@@ -88,7 +89,8 @@ extern enum demangling_styles
   gnu_v3_demangling = DMGL_GNU_V3,
   java_demangling = DMGL_JAVA,
   gnat_demangling = DMGL_GNAT,
-  dlang_demangling = DMGL_DLANG
+  dlang_demangling = DMGL_DLANG,
+  rust_demangling = DMGL_RUST
 } current_demangling_style;
 
 /* Define string names for the various demangling styles. */
@@ -104,6 +106,7 @@ extern enum demangling_styles
 #define JAVA_DEMANGLING_STYLE_STRING          "java"
 #define GNAT_DEMANGLING_STYLE_STRING          "gnat"
 #define DLANG_DEMANGLING_STYLE_STRING         "dlang"
+#define RUST_DEMANGLING_STYLE_STRING          "rust"
 
 /* Some macros to test what demangling style is active. */
 
@@ -118,6 +121,7 @@ extern enum demangling_styles
 #define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
 #define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
 #define DLANG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_DLANG)
+#define RUST_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_RUST)
 
 /* Provide information about the available demangle styles. This code is
    pulled from gdb into libiberty because it is useful to binutils also.  */
@@ -143,10 +147,10 @@ cplus_mangle_opname (const char *opname,
 extern void
 set_cplus_marker_for_demangling (int ch);
 
-extern enum demangling_styles 
+extern enum demangling_styles
 cplus_demangle_set_style (enum demangling_styles style);
 
-extern enum demangling_styles 
+extern enum demangling_styles
 cplus_demangle_name_to_style (const char *name);
 
 /* Callback typedef for allocation-less demangler interfaces. */
@@ -175,6 +179,27 @@ ada_demangle (const char *mangled, int o
 extern char *
 dlang_demangle (const char *mangled, int options);
 
+/* Returns non-zero iff MANGLED is a rust mangled symbol.  MANGLED must
+   already have been demangled through cplus_demangle_v3.  If this function
+   returns non-zero then MANGLED can be demangled (in-place) using
+   RUST_DEMANGLE_SYM.  */
+extern int
+rust_is_mangled (const char *mangled);
+
+/* Demangles SYM (in-place) if RUST_IS_MANGLED returned non-zero for SYM.
+   If RUST_IS_MANGLED returned zero for SYM then RUST_DEMANGLE_SYM might
+   replace characters that cannot be demangled with '?' and might truncate
+   SYM.  After calling RUST_DEMANGLE_SYM SYM might be shorter, but never
+   larger.  */
+extern void
+rust_demangle_sym (char *sym);
+
+/* Demangles MANGLED if it was GNU_V3 and then RUST mangled, otherwise
+   returns NULL. Uses CPLUS_DEMANGLE_V3, RUST_IS_MANGLED and
+   RUST_DEMANGLE_SYM.  Returns a new string that is owned by the caller.  */
+extern char *
+rust_demangle (const char *mangled, int options);
+
 enum gnu_v3_ctor_kinds {
   gnu_v3_complete_object_ctor = 1,
   gnu_v3_base_object_ctor,
@@ -379,6 +404,10 @@ enum demangle_component_type
   /* A typecast, represented as a unary operator.  The one subtree is
      the type to which the argument should be cast.  */
   DEMANGLE_COMPONENT_CAST,
+  /* A conversion operator, represented as a unary operator.  The one
+     subtree is the type to which the argument should be converted
+     to.  */
+  DEMANGLE_COMPONENT_CONVERSION,
   /* A nullary expression.  The left subtree is the operator.  */
   DEMANGLE_COMPONENT_NULLARY,
   /* A unary expression.  The left subtree is the operator, and the
@@ -442,8 +471,12 @@ enum demangle_component_type
   DEMANGLE_COMPONENT_PACK_EXPANSION,
   /* A name with an ABI tag.  */
   DEMANGLE_COMPONENT_TAGGED_NAME,
+  /* A transaction-safe function type.  */
+  DEMANGLE_COMPONENT_TRANSACTION_SAFE,
   /* A cloned function.  */
-  DEMANGLE_COMPONENT_CLONE
+  DEMANGLE_COMPONENT_CLONE,
+  DEMANGLE_COMPONENT_NOEXCEPT,
+  DEMANGLE_COMPONENT_THROW_SPEC
 };
 
 /* Types which are only used internally.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dis-asm.h ./include/dis-asm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dis-asm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/dis-asm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between the opcode library and its callers.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -222,6 +222,16 @@ typedef struct disassemble_info
 
 } disassemble_info;
 
+/* This struct is used to pass information about valid disassembler options
+   and their descriptions from the target to the generic GDB functions that
+   set and display them.  */
+
+typedef struct
+{
+  const char **name;
+  const char **description;
+} disasm_options_t;
+
 
 /* Standard disassemblers.  Disassemble one instruction at the given
    target address.  Return number of octets processed.  */
@@ -263,6 +273,7 @@ extern int print_insn_little_arm	(bfd_vm
 extern int print_insn_little_mips	(bfd_vma, disassemble_info *);
 extern int print_insn_little_nios2	(bfd_vma, disassemble_info *);
 extern int print_insn_little_powerpc	(bfd_vma, disassemble_info *);
+extern int print_insn_riscv		(bfd_vma, disassemble_info *);
 extern int print_insn_little_score      (bfd_vma, disassemble_info *); 
 extern int print_insn_lm32		(bfd_vma, disassemble_info *);
 extern int print_insn_m32c	        (bfd_vma, disassemble_info *);
@@ -288,6 +299,7 @@ extern int print_insn_ns32k		(bfd_vma, d
 extern int print_insn_or1k		(bfd_vma, disassemble_info *);
 extern int print_insn_pdp11		(bfd_vma, disassemble_info *);
 extern int print_insn_pj		(bfd_vma, disassemble_info *);
+extern int print_insn_pru		(bfd_vma, disassemble_info *);
 extern int print_insn_rs6000		(bfd_vma, disassemble_info *);
 extern int print_insn_s390		(bfd_vma, disassemble_info *);
 extern int print_insn_sh		(bfd_vma, disassemble_info *);
@@ -319,7 +331,7 @@ extern int print_insn_rl78_g10		(bfd_vma
 extern int print_insn_rl78_g13		(bfd_vma, disassemble_info *);
 extern int print_insn_rl78_g14		(bfd_vma, disassemble_info *);
 
-extern disassembler_ftype arc_get_disassembler (void *);
+extern disassembler_ftype arc_get_disassembler (bfd *);
 extern disassembler_ftype cris_get_disassembler (bfd *);
 extern disassembler_ftype rl78_get_disassembler (bfd *);
 
@@ -327,15 +339,17 @@ extern void print_aarch64_disassembler_o
 extern void print_i386_disassembler_options (FILE *);
 extern void print_mips_disassembler_options (FILE *);
 extern void print_ppc_disassembler_options (FILE *);
+extern void print_riscv_disassembler_options (FILE *);
 extern void print_arm_disassembler_options (FILE *);
-extern void parse_arm_disassembler_option (char *);
+extern void print_arc_disassembler_options (FILE *);
 extern void print_s390_disassembler_options (FILE *);
-extern int  get_arm_regname_num_options (void);
-extern int  set_arm_regname_option (int);
-extern int  get_arm_regnames (int, const char **, const char **, const char *const **);
 extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
 extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
 extern void disassemble_init_powerpc (struct disassemble_info *);
+extern void disassemble_init_s390 (struct disassemble_info *);
+extern const disasm_options_t *disassembler_options_powerpc (void);
+extern const disasm_options_t *disassembler_options_arm (void);
+extern const disasm_options_t *disassembler_options_s390 (void);
 
 /* Fetch the disassembler for a given BFD, if that support is available.  */
 extern disassembler_ftype disassembler (bfd *);
@@ -347,6 +361,29 @@ extern void disassemble_init_for_target 
 /* Document any target specific options available from the disassembler.  */
 extern void disassembler_usage (FILE *);
 
+/* Remove whitespace and consecutive commas.  */
+extern char *remove_whitespace_and_extra_commas (char *);
+
+/* Like STRCMP, but treat ',' the same as '\0' so that we match
+   strings like "foobar" against "foobar,xxyyzz,...".  */
+extern int disassembler_options_cmp (const char *, const char *);
+
+/* A helper function for FOR_EACH_DISASSEMBLER_OPTION.  */
+static inline char *
+next_disassembler_option (char *options)
+{
+  char *opt = strchr (options, ',');
+  if (opt != NULL)
+    opt++;
+  return opt;
+}
+
+/* A macro for iterating over each comma separated option in OPTIONS.  */
+#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \
+  for ((OPT) = (OPTIONS); \
+       (OPT) != NULL; \
+       (OPT) = next_disassembler_option (OPT))
+
 
 /* This block of definitions is for particular callers who read instructions
    into a buffer before calling the instruction decoder.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dwarf2.def ./include/dwarf2.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dwarf2.def	2015-07-06 01:48:30.000000000 +0000
+++ ./include/dwarf2.def	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* -*- c -*-
    Declarations and definitions of codes relating to the DWARF2 and
    DWARF3 symbolic debugging information formats.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
    Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -132,7 +132,14 @@ DW_TAG (DW_TAG_type_unit, 0x41)
 DW_TAG (DW_TAG_rvalue_reference_type, 0x42)
 DW_TAG (DW_TAG_template_alias, 0x43)
 /* DWARF 5.  */
+DW_TAG (DW_TAG_coarray_type, 0x44)
+DW_TAG (DW_TAG_generic_subrange, 0x45)
+DW_TAG (DW_TAG_dynamic_type, 0x46)
 DW_TAG (DW_TAG_atomic_type, 0x47)
+DW_TAG (DW_TAG_call_site, 0x48)
+DW_TAG (DW_TAG_call_site_parameter, 0x49)
+DW_TAG (DW_TAG_skeleton_unit, 0x4a)
+DW_TAG (DW_TAG_immutable_type, 0x4b)
 
 DW_TAG_DUP (DW_TAG_lo_user, 0x4080)
 DW_TAG_DUP (DW_TAG_hi_user, 0xffff)
@@ -202,6 +209,17 @@ DW_FORM (DW_FORM_sec_offset, 0x17)
 DW_FORM (DW_FORM_exprloc, 0x18)
 DW_FORM (DW_FORM_flag_present, 0x19)
 DW_FORM (DW_FORM_ref_sig8, 0x20)
+/* DWARF 5.  */
+DW_FORM (DW_FORM_strx, 0x1a)
+DW_FORM (DW_FORM_addrx, 0x1b)
+DW_FORM (DW_FORM_ref_sup4, 0x1c)
+DW_FORM (DW_FORM_strp_sup, 0x1d)
+DW_FORM (DW_FORM_data16, 0x1e)
+DW_FORM (DW_FORM_line_strp, 0x1f)
+DW_FORM (DW_FORM_implicit_const, 0x21)
+DW_FORM (DW_FORM_loclistx, 0x22)
+DW_FORM (DW_FORM_rnglistx, 0x23)
+DW_FORM (DW_FORM_ref_sup8, 0x24)
 /* Extensions for Fission.  See http://gcc.gnu.org/wiki/DebugFission.  */
 DW_FORM (DW_FORM_GNU_addr_index, 0x1f01)
 DW_FORM (DW_FORM_GNU_str_index, 0x1f02)
@@ -309,7 +327,35 @@ DW_AT (DW_AT_const_expr, 0x6c)
 DW_AT (DW_AT_enum_class, 0x6d)
 DW_AT (DW_AT_linkage_name, 0x6e)
 /* DWARF 5.  */
+DW_AT (DW_AT_string_length_bit_size, 0x6f)
+DW_AT (DW_AT_string_length_byte_size, 0x70)
+DW_AT (DW_AT_rank, 0x71)
+DW_AT (DW_AT_str_offsets_base, 0x72)
+DW_AT (DW_AT_addr_base, 0x73)
+DW_AT (DW_AT_rnglists_base, 0x74)
+DW_AT (DW_AT_dwo_name, 0x76)
+DW_AT (DW_AT_reference, 0x77)
+DW_AT (DW_AT_rvalue_reference, 0x78)
+DW_AT (DW_AT_macros, 0x79)
+DW_AT (DW_AT_call_all_calls, 0x7a)
+DW_AT (DW_AT_call_all_source_calls, 0x7b)
+DW_AT (DW_AT_call_all_tail_calls, 0x7c)
+DW_AT (DW_AT_call_return_pc, 0x7d)
+DW_AT (DW_AT_call_value, 0x7e)
+DW_AT (DW_AT_call_origin, 0x7f)
+DW_AT (DW_AT_call_parameter, 0x80)
+DW_AT (DW_AT_call_pc, 0x81)
+DW_AT (DW_AT_call_tail_call, 0x82)
+DW_AT (DW_AT_call_target, 0x83)
+DW_AT (DW_AT_call_target_clobbered, 0x84)
+DW_AT (DW_AT_call_data_location, 0x85)
+DW_AT (DW_AT_call_data_value, 0x86)
 DW_AT (DW_AT_noreturn, 0x87)
+DW_AT (DW_AT_alignment, 0x88)
+DW_AT (DW_AT_export_symbols, 0x89)
+DW_AT (DW_AT_deleted, 0x8a)
+DW_AT (DW_AT_defaulted, 0x8b)
+DW_AT (DW_AT_loclists_base, 0x8c)
 
 DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start.  */
 DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end.  */
@@ -404,6 +450,13 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x22
    See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
 DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
 DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
+/* Rational constant extension.
+   See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator .  */
+DW_TAG (DW_AT_GNU_numerator, 0x2303)
+DW_TAG (DW_AT_GNU_denominator, 0x2304)
+/* Biased integer extension.
+   See https://gcc.gnu.org/wiki/DW_AT_GNU_bias .  */
+DW_TAG (DW_AT_GNU_bias, 0x2305)
 /* UPC extension.  */
 DW_AT (DW_AT_upc_threads_scaled, 0x3210)
 /* PGI (STMicroelectronics) extensions.  */
@@ -584,6 +637,18 @@ DW_OP (DW_OP_bit_piece, 0x9d)
 DW_OP (DW_OP_implicit_value, 0x9e)
 DW_OP (DW_OP_stack_value, 0x9f)
 
+/* DWARF 5 extensions.  */
+DW_OP (DW_OP_implicit_pointer, 0xa0)
+DW_OP (DW_OP_addrx, 0xa1)
+DW_OP (DW_OP_constx, 0xa2)
+DW_OP (DW_OP_entry_value, 0xa3)
+DW_OP (DW_OP_const_type, 0xa4)
+DW_OP (DW_OP_regval_type, 0xa5)
+DW_OP (DW_OP_deref_type, 0xa6)
+DW_OP (DW_OP_xderef_type, 0xa7)
+DW_OP (DW_OP_convert, 0xa8)
+DW_OP (DW_OP_reinterpret, 0xa9)
+
 DW_OP_DUP (DW_OP_lo_user, 0xe0)	/* Implementation-defined range start.  */
 DW_OP_DUP (DW_OP_hi_user, 0xff)	/* Implementation-defined range end.  */
 
@@ -620,6 +685,12 @@ DW_OP (DW_OP_HP_unmod_range, 0xe5)
 DW_OP (DW_OP_HP_tls, 0xe6)
 /* PGI (STMicroelectronics) extensions.  */
 DW_OP (DW_OP_PGI_omp_thread_num, 0xf8)
+/* AARCH64 extensions.
+   DW_OP_AARCH64_operation takes one mandatory unsigned LEB128 operand.
+   Bits[6:0] of this operand is the action code, all others bits are initialized
+   to 0 except explicitly documented for one action.  Please refer AArch64 DWARF
+   ABI documentation for details.  */
+DW_OP (DW_OP_AARCH64_operation, 0xea)
 DW_END_OP
 
 DW_FIRST_ATE (DW_ATE_void, 0x0)
@@ -641,6 +712,9 @@ DW_ATE (DW_ATE_unsigned_fixed, 0xe)
 DW_ATE (DW_ATE_decimal_float, 0xf)
 /* DWARF 4.  */
 DW_ATE (DW_ATE_UTF, 0x10)
+/* DWARF 5.  */
+DW_ATE (DW_ATE_UCS, 0x11)
+DW_ATE (DW_ATE_ASCII, 0x12)
 
 DW_ATE_DUP (DW_ATE_lo_user, 0x80)
 DW_ATE_DUP (DW_ATE_hi_user, 0xff)
@@ -698,7 +772,8 @@ DW_CFA (DW_CFA_hi_user, 0x3f)
 
 /* SGI/MIPS specific.  */
 DW_CFA (DW_CFA_MIPS_advance_loc8, 0x1d)
-/* GNU extensions.  */
+/* GNU extensions.
+   NOTE: DW_CFA_GNU_window_save is multiplexed on Sparc and AArch64.  */
 DW_CFA (DW_CFA_GNU_window_save, 0x2d)
 DW_CFA (DW_CFA_GNU_args_size, 0x2e)
 DW_CFA (DW_CFA_GNU_negative_offset_extended, 0x2f)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dwarf2.h ./include/dwarf2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dwarf2.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/dwarf2.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Declarations and definitions of codes relating to the DWARF2 and
    DWARF3 symbolic debugging information formats.
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
    Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -175,6 +175,10 @@ enum dwarf_calling_convention
     DW_CC_program = 0x2,
     DW_CC_nocall = 0x3,
 
+    /* DWARF 5.  */
+    DW_CC_pass_by_reference = 0x4,
+    DW_CC_pass_by_value = 0x5,
+
     DW_CC_lo_user = 0x40,
     DW_CC_hi_user = 0xff,
 
@@ -257,15 +261,38 @@ enum dwarf_line_number_hp_sfc_ops
     DW_LNE_HP_SFC_associate = 3
   };
 
-/* Type codes for location list entries.
-   Extension for Fission.  See http://gcc.gnu.org/wiki/DebugFission.  */
+/* Content type codes in line table directory_entry_format
+   and file_name_entry_format sequences.  */
+enum dwarf_line_number_content_type
+  {
+    DW_LNCT_path = 0x1,
+    DW_LNCT_directory_index = 0x2,
+    DW_LNCT_timestamp = 0x3,
+    DW_LNCT_size = 0x4,
+    DW_LNCT_MD5 = 0x5,
+    DW_LNCT_lo_user = 0x2000,
+    DW_LNCT_hi_user = 0x3fff
+  };
 
+/* Type codes for location list entries.  */
 enum dwarf_location_list_entry_type
   {
-    DW_LLE_GNU_end_of_list_entry = 0,
-    DW_LLE_GNU_base_address_selection_entry = 1,
-    DW_LLE_GNU_start_end_entry = 2,
-    DW_LLE_GNU_start_length_entry = 3
+    DW_LLE_end_of_list = 0x00,
+    DW_LLE_base_addressx = 0x01,
+    DW_LLE_startx_endx = 0x02,
+    DW_LLE_startx_length = 0x03,
+    DW_LLE_offset_pair = 0x04,
+    DW_LLE_default_location = 0x05,
+    DW_LLE_base_address = 0x06,
+    DW_LLE_start_end = 0x07,
+    DW_LLE_start_length = 0x08,
+
+    /* Former extension for Fission.
+       See http://gcc.gnu.org/wiki/DebugFission.  */
+    DW_LLE_GNU_end_of_list_entry = 0x00,
+    DW_LLE_GNU_base_address_selection_entry = 0x01,
+    DW_LLE_GNU_start_end_entry = 0x02,
+    DW_LLE_GNU_start_length_entry = 0x03
   };
 
 #define DW_CIE_ID	  0xffffffff
@@ -305,13 +332,22 @@ enum dwarf_source_language
     /* DWARF 4.  */
     DW_LANG_Python = 0x0014,
     /* DWARF 5.  */
+    DW_LANG_OpenCL = 0x0015,
     DW_LANG_Go = 0x0016,
-
-    DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
+    DW_LANG_Modula3 = 0x0017,
+    DW_LANG_Haskell = 0x0018,
+    DW_LANG_C_plus_plus_03 = 0x0019,
+    DW_LANG_C_plus_plus_11 = 0x001a,
+    DW_LANG_OCaml = 0x001b,
+    DW_LANG_Rust = 0x001c,
     DW_LANG_C11 = 0x001d,
+    DW_LANG_Swift = 0x001e,
+    DW_LANG_Julia = 0x001f,
+    DW_LANG_Dylan = 0x0020,
     DW_LANG_C_plus_plus_14 = 0x0021,
     DW_LANG_Fortran03 = 0x0022,
     DW_LANG_Fortran08 = 0x0023,
+    DW_LANG_RenderScript = 0x0024,
 
     DW_LANG_lo_user = 0x8000,	/* Implementation-defined range start.  */
     DW_LANG_hi_user = 0xffff,	/* Implementation-defined range start.  */
@@ -325,7 +361,10 @@ enum dwarf_source_language
     DW_LANG_HP_Basic91   = 0x8004,
     DW_LANG_HP_Pascal91  = 0x8005,
     DW_LANG_HP_IMacro    = 0x8006,
-    DW_LANG_HP_Assembler = 0x8007
+    DW_LANG_HP_Assembler = 0x8007,
+
+    /* Rust extension, but replaced in DWARF 5.  */
+    DW_LANG_Rust_old = 0x9000
   };
 
 /* Names and codes for macro information.  */
@@ -338,24 +377,86 @@ enum dwarf_macinfo_record_type
     DW_MACINFO_vendor_ext = 255
   };
 
+/* DW_TAG_defaulted/DW_TAG_GNU_defaulted attributes.  */
+enum dwarf_defaulted_attribute
+  {
+    DW_DEFAULTED_no = 0x00,
+    DW_DEFAULTED_in_class = 0x01,
+    DW_DEFAULTED_out_of_class = 0x02
+  };
+
 /* Names and codes for new style macro information.  */
 enum dwarf_macro_record_type
   {
-    DW_MACRO_GNU_define = 1,
-    DW_MACRO_GNU_undef = 2,
-    DW_MACRO_GNU_start_file = 3,
-    DW_MACRO_GNU_end_file = 4,
-    DW_MACRO_GNU_define_indirect = 5,
-    DW_MACRO_GNU_undef_indirect = 6,
-    DW_MACRO_GNU_transparent_include = 7,
+    DW_MACRO_define = 0x01,
+    DW_MACRO_undef = 0x02,
+    DW_MACRO_start_file = 0x03,
+    DW_MACRO_end_file = 0x04,
+    DW_MACRO_define_strp = 0x05,
+    DW_MACRO_undef_strp = 0x06,
+    DW_MACRO_import = 0x07,
+    DW_MACRO_define_sup = 0x08,
+    DW_MACRO_undef_sup = 0x09,
+    DW_MACRO_import_sup = 0x0a,
+    DW_MACRO_define_strx = 0x0b,
+    DW_MACRO_undef_strx = 0x0c,
+    DW_MACRO_lo_user = 0xe0,
+    DW_MACRO_hi_user = 0xff,
+
+    /* Compatibility macros for the GNU .debug_macro extension.  */
+    DW_MACRO_GNU_define = 0x01,
+    DW_MACRO_GNU_undef = 0x02,
+    DW_MACRO_GNU_start_file = 0x03,
+    DW_MACRO_GNU_end_file = 0x04,
+    DW_MACRO_GNU_define_indirect = 0x05,
+    DW_MACRO_GNU_undef_indirect = 0x06,
+    DW_MACRO_GNU_transparent_include = 0x07,
     /* Extensions for DWZ multifile.
        See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open .  */
-    DW_MACRO_GNU_define_indirect_alt = 8,
-    DW_MACRO_GNU_undef_indirect_alt = 9,
-    DW_MACRO_GNU_transparent_include_alt = 10,
+    DW_MACRO_GNU_define_indirect_alt = 0x08,
+    DW_MACRO_GNU_undef_indirect_alt = 0x09,
+    DW_MACRO_GNU_transparent_include_alt = 0x0a,
     DW_MACRO_GNU_lo_user = 0xe0,
     DW_MACRO_GNU_hi_user = 0xff
   };
+
+/* Index attributes in the Abbreviations Table.  */
+enum dwarf_name_index_attribute
+  {
+    DW_IDX_compile_unit = 1,
+    DW_IDX_type_unit = 2,
+    DW_IDX_die_offset = 3,
+    DW_IDX_parent = 4,
+    DW_IDX_type_hash = 5,
+    DW_IDX_lo_user = 0x2000,
+    DW_IDX_hi_user = 0x3fff
+  };
+
+/* Range list entry kinds in .debug_rnglists* section.  */
+enum dwarf_range_list_entry
+  {
+    DW_RLE_end_of_list = 0x00,
+    DW_RLE_base_addressx = 0x01,
+    DW_RLE_startx_endx = 0x02,
+    DW_RLE_startx_length = 0x03,
+    DW_RLE_offset_pair = 0x04,
+    DW_RLE_base_address = 0x05,
+    DW_RLE_start_end = 0x06,
+    DW_RLE_start_length = 0x07
+  };
+
+/* Unit types in unit_type unit header field.  */
+enum dwarf_unit_type
+  {
+    DW_UT_compile = 0x01,
+    DW_UT_type = 0x02,
+    DW_UT_partial = 0x03,
+    DW_UT_skeleton = 0x04,
+    DW_UT_split_compile = 0x05,
+    DW_UT_split_type = 0x06,
+    DW_UT_lo_user = 0x80,
+    DW_UT_hi_user = 0xff
+  };
 
 /* @@@ For use with GNU frame unwind information.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dyn-string.h ./include/dyn-string.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/dyn-string.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/dyn-string.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* An abstract string datatype.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GCC.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/aarch64.h ./include/elf/aarch64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/aarch64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/aarch64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* AArch64 ELF support for BFD.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GNU Binutils.
@@ -129,6 +129,15 @@ RELOC_NUMBER (R_AARCH64_P32_LD32_GOTPAGE
 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PREL21, 80)
 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PAGE21, 81)
 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADD_LO12_NC, 82)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PREL21, 83)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PAGE21, 84)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_LO12_NC, 85)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1, 87)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0, 88)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC, 89)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12, 90)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12, 91)
+RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12_NC, 92)
 RELOC_NUMBER (R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21, 103)
 RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC, 104)
 RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19, 105)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/alpha.h ./include/elf/alpha.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/alpha.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/alpha.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ALPHA ELF support for BFD.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    By Eric Youngdale, <eric@aib.com>.  No processor supplement available
    for this platform.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arc.h ./include/elf/arc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/arc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ARC ELF support for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    Contributed by Doug Evans, (dje@cygnus.com)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -28,25 +28,34 @@
 
 /* Relocations.  */
 
+#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
+  RELOC_NUMBER(R_##TYPE, VALUE)
+
 START_RELOC_NUMBERS (elf_arc_reloc_type)
-  RELOC_NUMBER (R_ARC_NONE, 0)
-  RELOC_NUMBER (R_ARC_32, 1)
-  RELOC_NUMBER (R_ARC_B26, 2)
-  RELOC_NUMBER (R_ARC_B22_PCREL, 3)
+#include "arc-reloc.def"
 END_RELOC_NUMBERS (R_ARC_max)
 
-/* Processor specific flags for the ELF header e_flags field.  */
-
-/* Four bit ARC machine type field.  */
+#undef ARC_RELOC_HOWTO
 
-#define EF_ARC_MACH 0x0000000f
-
-/* Various CPU types.  */
+/* Processor specific flags for the ELF header e_flags field.  */
 
-#define E_ARC_MACH_ARC5 0
-#define E_ARC_MACH_ARC6 1	
-#define E_ARC_MACH_ARC7 2
-#define E_ARC_MACH_ARC8 3
+#define EF_ARC_MACH_MSK	 0x000000ff
+#define EF_ARC_OSABI_MSK 0x00000f00
+#define EF_ARC_ALL_MSK	 (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK)
+
+/* Various CPU types.  These numbers are exposed in the ELF header flags
+   (e_flags field), and so must never change.  */
+#define E_ARC_MACH_ARC600	0x00000002
+#define E_ARC_MACH_ARC601	0x00000004
+#define E_ARC_MACH_ARC700	0x00000003
+#define EF_ARC_CPU_ARCV2EM      0x00000005
+#define EF_ARC_CPU_ARCV2HS      0x00000006
+
+/* ARC Linux specific ABIs.  */
+#define E_ARC_OSABI_ORIG	0x00000000   /* MUST be 0 for back-compat.  */
+#define E_ARC_OSABI_V2		0x00000200
+#define E_ARC_OSABI_V3		0x00000300
+#define E_ARC_OSABI_CURRENT	E_ARC_OSABI_V3
 
 /* Leave bits 0xf0 alone in case we ever have more than 16 cpu types.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arc-reloc.def ./include/elf/arc-reloc.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arc-reloc.def	1970-01-01 00:00:00.000000000 +0000
+++ ./include/elf/arc-reloc.def	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,506 @@
+/* ARC relocation types
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   GAS/GDB is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   GAS/GDB is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS or GDB; see the file COPYING3.  If not, write to
+   the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+
+ARC_RELOC_HOWTO(ARC_NONE, 0, \
+                2, \
+                32, \
+                replace_none, \
+                bitfield, \
+                0)
+
+ARC_RELOC_HOWTO(ARC_8, 1, \
+                0, \
+                8, \
+                replace_bits8, \
+                bitfield, \
+                ( S + A ))
+
+ARC_RELOC_HOWTO(ARC_16, 2, \
+                1, \
+                16, \
+                replace_bits16, \
+                bitfield, \
+                ( S + A ))
+
+ARC_RELOC_HOWTO(ARC_24, 3, \
+                2, \
+                24, \
+                replace_bits24, \
+                bitfield, \
+                ( S + A ))
+
+ARC_RELOC_HOWTO(ARC_32, 4, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( S + A ))
+
+ARC_RELOC_HOWTO(ARC_N8, 8, \
+                0, \
+                8, \
+                replace_bits8, \
+                bitfield, \
+                ( A - S ))
+
+ARC_RELOC_HOWTO(ARC_N16, 9, \
+                1, \
+                16, \
+                replace_bits16, \
+                bitfield, \
+                ( A - S ))
+
+ARC_RELOC_HOWTO(ARC_N24, 10, \
+                2, \
+                24, \
+                replace_bits24, \
+                bitfield, \
+                ( A - S ))
+
+ARC_RELOC_HOWTO(ARC_N32, 11, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( A - S ))
+
+ARC_RELOC_HOWTO(ARC_SDA, 12, \
+                2, \
+                9, \
+                replace_disp9, \
+                bitfield, \
+                ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF, 13, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ( S - SECTSTART ) + A ))
+
+ARC_RELOC_HOWTO(ARC_S21H_PCREL, 14, \
+                2, \
+                20, \
+                replace_disp21h, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - P ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S21W_PCREL, 15, \
+                2, \
+                19, \
+                replace_disp21w, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - P ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S25H_PCREL, 16, \
+                2, \
+                24, \
+                replace_disp25h, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - P ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S25W_PCREL, 17, \
+                2, \
+                23, \
+                replace_disp25w, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - P ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA32, 18, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ( ( S + A ) - _SDA_BASE_ ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA_LDST, 19, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                signed, \
+                ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA_LDST1, 20, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - _SDA_BASE_ ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA_LDST2, 21, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                signed, \
+                ( ME ( ( ( ( S + A ) - _SDA_BASE_ ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA16_LD, 22, \
+                1, \
+                9, \
+                replace_disp9s, \
+                signed, \
+                ( ( S + A ) - _SDA_BASE_ ))
+
+ARC_RELOC_HOWTO(ARC_SDA16_LD1, 23, \
+                1, \
+                9, \
+                replace_disp9s, \
+                signed, \
+                ( ( ( S + A ) - _SDA_BASE_ ) >> 1 ))
+
+ARC_RELOC_HOWTO(ARC_SDA16_LD2, 24, \
+                1, \
+                9, \
+                replace_disp9s, \
+                signed, \
+                ( ( ( S + A ) - _SDA_BASE_ ) >> 2 ))
+
+ARC_RELOC_HOWTO(ARC_S13_PCREL, 25, \
+                1, \
+                11, \
+                replace_disp13s, \
+                signed, \
+                ( ( ( S + A ) - P ) >> 2 ))
+
+ARC_RELOC_HOWTO(ARC_W, 26, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ( S + A ) & ( ~3 ) ))
+
+ARC_RELOC_HOWTO(ARC_32_ME, 27, \
+                2, \
+                32, \
+                replace_limm, \
+                signed, \
+                ( ME ( ( S + A ) ) ))
+
+ARC_RELOC_HOWTO(ARC_32_ME_S, 105, \
+                2, \
+                32, \
+                replace_limms, \
+                signed, \
+                ( ME ( ( S + A ) ) ))
+
+ARC_RELOC_HOWTO(ARC_N32_ME, 28, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ME ( ( A - S ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF_ME, 29, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ME ( ( ( S - SECTSTART ) + A ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA32_ME, 30, \
+                2, \
+                32, \
+                replace_limm, \
+                signed, \
+                ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) ))
+
+ARC_RELOC_HOWTO(ARC_W_ME, 31, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ME ( ( ( S + A ) & ( ~3 ) ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_U8, 35, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( S + A ) - SECTSTART ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_U8_1, 36, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( ( S + A ) - SECTSTART ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_U8_2, 37, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( ( S + A ) - SECTSTART ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_S9, 38, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( ( S + A ) - SECTSTART ) - 256 ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_S9_1, 39, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(AC_SECTOFF_S9_2, 40, \
+                2, \
+                9, \
+                replace_disp9ls, \
+                bitfield, \
+                ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF_ME_1, 41, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ME ( ( ( ( S - SECTSTART ) + A ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF_ME_2, 42, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ME ( ( ( ( S - SECTSTART ) + A ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF_1, 43, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ( ( S - SECTSTART ) + A ) >> 1 ))
+
+ARC_RELOC_HOWTO(ARC_SECTOFF_2, 44, \
+                2, \
+                32, \
+                replace_word32, \
+                bitfield, \
+                ( ( ( S - SECTSTART ) + A ) >> 2 ))
+
+ARC_RELOC_HOWTO(ARC_SDA_12, 45, \
+                2, \
+                12, \
+                replace_disp12s, \
+                signed, \
+                ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) ))
+
+ARC_RELOC_HOWTO(ARC_SDA16_ST2, 48, \
+                1, \
+                9, \
+                replace_disp9s1, \
+                signed, \
+                ( ( ( S + A ) - _SDA_BASE_ ) >> 2 ))
+
+ARC_RELOC_HOWTO(ARC_32_PCREL, 49, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ( S + A ) - PDATA ))
+
+ARC_RELOC_HOWTO(ARC_PC32, 50, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( ( S + A ) - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_GOT32, 59, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( G + A ))
+
+ARC_RELOC_HOWTO(ARC_GOTPC32, 51, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( ( ( GOT + G ) + A ) - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_PLT32, 52, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( ( L + A ) - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_COPY, 53, \
+                2, \
+                0, \
+                replace_none, \
+                signed, \
+                none)
+
+ARC_RELOC_HOWTO(ARC_GLOB_DAT, 54, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                S)
+
+ARC_RELOC_HOWTO(ARC_JMP_SLOT, 55, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( S ) ))
+
+ARC_RELOC_HOWTO(ARC_RELATIVE, 56, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( B + A ) ) ))
+
+ARC_RELOC_HOWTO(ARC_GOTOFF, 57, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( ( S + A ) - GOT ) ) ))
+
+ARC_RELOC_HOWTO(ARC_GOTPC, 58, \
+                2, \
+                32, \
+                replace_word32, \
+                signed, \
+                ( ME ( ( GOT_BEGIN - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S21W_PCREL_PLT, 60, \
+                2, \
+                19, \
+                replace_disp21w, \
+                signed, \
+                ( ME ( ( ( ( L + A ) - P ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S25H_PCREL_PLT, 61, \
+                2, \
+                24, \
+                replace_disp25h, \
+                signed, \
+                ( ME ( ( ( ( L + A ) - P ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_TLS_DTPMOD, 66, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                0)
+
+ARC_RELOC_HOWTO(ARC_TLS_TPOFF, 68, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                0)
+
+ARC_RELOC_HOWTO(ARC_TLS_GD_GOT, 69, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( ( ( G + GOT ) - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_TLS_GD_LD, 70, \
+                2, \
+                0, \
+                replace_none, \
+                dont, \
+                0)
+
+ARC_RELOC_HOWTO(ARC_TLS_GD_CALL, 71, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                0)
+
+ARC_RELOC_HOWTO(ARC_TLS_IE_GOT, 72, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( ( ( G + GOT ) - P ) ) ))
+
+ARC_RELOC_HOWTO(ARC_TLS_DTPOFF, 67, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( S - SECTSTART ) + A ))
+
+ARC_RELOC_HOWTO(ARC_TLS_DTPOFF_S9, 73, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( ( S - TLS_REL ) ) ))
+
+ARC_RELOC_HOWTO(ARC_TLS_LE_S9, 74, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( ( ( S + TCB_SIZE ) - TLS_REL ) ) ))
+
+ARC_RELOC_HOWTO(ARC_TLS_LE_32, 75, \
+                2, \
+                32, \
+                replace_word32, \
+                dont, \
+                ( ME ( ( ( ( S + A ) + TCB_SIZE ) - TLS_REL ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S25W_PCREL_PLT, 76, \
+                2, \
+                23, \
+                replace_disp25w, \
+                signed, \
+                ( ME ( ( ( ( L + A ) - P ) >> 2 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_S21H_PCREL_PLT, 77, \
+                2, \
+                20, \
+                replace_disp21h, \
+                signed, \
+                ( ME ( ( ( ( L + A ) - P ) >> 1 ) ) ))
+
+ARC_RELOC_HOWTO(ARC_NPS_CMEM16, 78, \
+                2, \
+                16, \
+                replace_bits16, \
+                dont, \
+                ( ME ( S + A )))
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arm.h ./include/elf/arm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/arm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/arm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ARM ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -82,6 +82,7 @@
 
 /* ARM-specific values for sh_flags.  */
 #define SHF_ENTRYSECT      0x10000000   /* Section contains an entry point.  */
+#define SHF_ARM_PURECODE   0x20000000   /* Section contains only code and no data.  */
 #define SHF_COMDEF         0x80000000   /* Section may be multiply defined in the input to a link step.  */
 
 /* ARM-specific program header flags.  */
@@ -105,7 +106,9 @@
 #define TAG_CPU_ARCH_V6S_M	12
 #define TAG_CPU_ARCH_V7E_M	13
 #define TAG_CPU_ARCH_V8		14
-#define MAX_TAG_CPU_ARCH	14
+#define TAG_CPU_ARCH_V8M_BASE	16
+#define TAG_CPU_ARCH_V8M_MAIN	17
+#define MAX_TAG_CPU_ARCH	TAG_CPU_ARCH_V8M_MAIN
 /* Pseudo-architecture to allow objects to be compatible with the subset of
    armv4t and armv6-m.  This value should never be stored in object files.  */
 #define TAG_CPU_ARCH_V4T_PLUS_V6_M (MAX_TAG_CPU_ARCH + 1)
@@ -230,6 +233,11 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
   RELOC_NUMBER (R_ARM_ME_TOO,	        128)   /* obsolete */
   RELOC_NUMBER (R_ARM_THM_TLS_DESCSEQ  ,129)
 
+  RELOC_NUMBER (R_ARM_THM_ALU_ABS_G0_NC,132)
+  RELOC_NUMBER (R_ARM_THM_ALU_ABS_G1_NC,133)
+  RELOC_NUMBER (R_ARM_THM_ALU_ABS_G2_NC,134)
+  RELOC_NUMBER (R_ARM_THM_ALU_ABS_G3_NC,135)
+
   RELOC_NUMBER (R_ARM_IRELATIVE,      	160)
 
   /* Extensions?  R=read-only?  */
@@ -303,6 +311,7 @@ enum
   Tag_MPextension_use,
   Tag_undefined_43,
   Tag_DIV_use,
+  Tag_DSP_extension = 46,
   Tag_nodefaults = 64,
   Tag_also_compatible_with,
   Tag_T2EE_use,
@@ -350,10 +359,36 @@ enum arm_st_branch_type {
   ST_BRANCH_TO_ARM,
   ST_BRANCH_TO_THUMB,
   ST_BRANCH_LONG,
-  ST_BRANCH_UNKNOWN
+  ST_BRANCH_UNKNOWN,
+  ST_BRANCH_ENUM_SIZE
 };
 
-#define ARM_SYM_BRANCH_TYPE(SYM) \
-  ((enum arm_st_branch_type) (SYM)->st_target_internal)
+#define NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS 2
+#define ENUM_ARM_ST_BRANCH_TYPE_BITMASK	\
+  ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS) - 1)
+
+#define ARM_GET_SYM_BRANCH_TYPE(STI) \
+  ((enum arm_st_branch_type) ((STI) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
+#ifdef BFD_ASSERT
+#define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE)			\
+  do {								\
+    BFD_ASSERT (TYPE <= ST_BRANCH_ENUM_SIZE);			\
+    BFD_ASSERT ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS)		\
+		>= ST_BRANCH_ENUM_SIZE);			\
+    (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK)		\
+	     | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK));	\
+  } while (0)
+#else
+#define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE)			\
+  (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK)		\
+	   | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
+#endif
+
+/* Get or set whether a symbol is a special symbol of an entry function of CMSE
+   secure code.  */
+#define ARM_GET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
+  (((SYM_TARGET_INTERNAL) >> 2) & 1)
+#define ARM_SET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
+  (SYM_TARGET_INTERNAL) |= 4
 
 #endif /* _ELF_ARM_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/avr.h ./include/elf/avr.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/avr.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/avr.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* AVR ELF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -87,6 +87,7 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
      RELOC_NUMBER (R_AVR_LDS_STS_16,           33)
      RELOC_NUMBER (R_AVR_PORT6,                34)
      RELOC_NUMBER (R_AVR_PORT5,                35)
+     RELOC_NUMBER (R_AVR_32_PCREL,             36)
 END_RELOC_NUMBERS (R_AVR_max)
 
 #endif /* _ELF_AVR_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/bfin.h ./include/elf/bfin.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/bfin.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/bfin.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Blackfin ELF support for BFD.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ChangeLog ./include/elf/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,2156 +0,0 @@
-2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
-	    Cesar Philippidis  <cesar@codesourcery.com>
-
-	* nios2.h (R_NIOS2_R2_S12): New.
-	(R_NIOS2_R2_I10_1_PCREL): New.
-	(R_NIOS2_R2_T1I7_1_PCREL): New.
-	(R_NIOS2_R2_T1I7_2): New.
-	(R_NIOS2_R2_T2I4): New.
-	(R_NIOS2_R2_T2I4_1): New.
-	(R_NIOS2_R2_T2I4_2): New.
-	(R_NIOS2_R2_X1I7_2): New.
-	(R_NIOS2_R2_X2L5): New.
-	(R_NIOS2_R2_F1I5_2): New.
-	(R_NIOS2_R2_L5I4X1): New.
-	(R_NIOS2_R2_T1X1I6): New.
-	(R_NIOS2_R2_T1X1I6_2): New.
-	(R_NIOS2_ILLEGAL): Renumber.
-
-2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
-	    Cesar Philippidis  <cesar@codesourcery.com>
-
-	* nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define.
-
-2015-05-29  Roland McGrath  <mcgrathr@google.com>
-
-	* common.h (GNU_ABI_TAG_SYLLABLE): New macro.
-	(GNU_ABI_TAG_NACL): New macro.
-
-2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_486): Renamed to ...
-	(EM_IAMCU): This.
-
-2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
-
-	* s390.h: Define Tag_GNU_S390_ABI_Vector.
-
-2015-04-24  Alan Modra  <amodra@gmail.com>
-
-	* internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and
-	similar segments only contain alloc sections.
-
-2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/18316
-	* mep.h (SEC_MEP_VLIW): Removed.
-
-2015-04-09  Nick Clifton  <nickc@redhat.com>
-
-	* rx.h (E_FLAG_RX_SINSNS_SET): New bit in e_flags field.
-	(E_FLAG_RX_SINSNS_YES): Likewise.
-	(E_FLAG_RX_SINSNS_MASK): New define.
-
-2015-04-03  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* external.h (Elf32_External_Chdr): New.
-	(Elf64_External_Chdr): Likewise.
-	* internal.h (Elf_Internal_Chdr): Likewise.
-
-2015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (ELFOSABI_CLOUDABI): New.
-	(SHF_COMPRESSED): Likewise.
-	(ELFCOMPRESS_ZLIB): Likewise.
-	(ELFCOMPRESS_LOOS): Likewise.
-	(ELFCOMPRESS_HIOS): Likewise.
-	(ELFCOMPRESS_LOPROC): Likewise.
-	(ELFCOMPRESS_HIPROC): Likewise.
-
-2015-03-19  Nick Clifton  <nickc@redhat.com>
-
-	* rl78.h (E_FLAG_RL78_G10): Redefine.
-	(E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13
-	E_FLAG_RL78_G14): New flags.
-
-2015-02-19  Marcus Shawcroft  <marcus.shawcroft@arm.com>
-
-	* aarch64.h (R_AARCH64_P32_TLSGD_ADR_PREL21): Add.
-
-2015-02-24  Nick Clifton  <nickc@redhat.com>
-
-	* v850.h (EF_RH850_SIMD): Delete deprecated flag.
-	(EF_RH850_CACHE): Likewise.
-	(EF_RH850_MMU): Likewise.
-	(EF_RH850_DATA_ALIGN8): Likewise.
-	(SHT_RENESAS_IOP): Fix typo in name.
-	(SHT_RENESAS_INFO): Define.
-	(V850_NOTE_SECNAME): Define.
-	(SIZEOF_V850_NOTE): Define.
-	(V850_NOTE_NAME): Define.
-	(enum v850_notes): New enum.
-	(NUM_V850_NOTES): Define.
-
-2015-02-23  Nick Clifton  <nickc@redhat.com>
-
-	PR 17915
-	* score.h: Fix typo in license header.
-
-2015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* common.h (NT_S390_VXRS_LOW): New macro.
-	(NT_S390_VXRS_HIGH): Likewise.
-
-2015-01-28  James Bowman  <james.bowman@ftdichip.com>
-
-	* common.h (EM_FT32): Define.
-	* ft32.h: New file.
-
-2015-01-09  Anthony Green  <green@moxielogic.com>
-
-	* common.h (EM_MOXIE): Redefine to official number.
-	(EM_MOXIE_OLD): Define (from old number).
-
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>
-
-	* arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values.
-
-2014-12-06  Eric Botcazou  <ebotcazou@adacore.com>
-
-	* common.h (EM_VISIUM): Define.
-	* visium.h: New file.
-
-2014-11-13  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* x86-64.h (R_X86_64_GOTPLT64): Mark it obsolete.
-
-2014-10-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* sparc.h (ELF_SPARC_HWCAP2_VIS3B): Documentation improved.
-
-2014-10-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-	* sparc.h (Tag_GNU_Sparc_HWCAPS2): New object attribute.
-	(ELF_SPARC_HWCAP2_FJATHPLUS): New HWCAP2 bitmask value.
-	(ELF_SPARC_HWCAP2_VIS3B): Likewise.
-	(ELF_SPARC_HWCAP2_ADP): Likewise.
-	(ELF_SPARC_HWCAP2_SPARC5): Likewise.
-	(ELF_SPARC_HWCAP2_MWAIT): Likewise.
-	(ELF_SPARC_HWCAP2_XMPMUL): Likewise.
-	(ELF_SPARC_HWCAP2_XMONT): Likewise.
-	(ELF_SPARC_HWCAP2_NSEC): Likewise.
-	(ELF_SPARC_HWCAP2_FJATHHPC): Likewise.
-	(ELF_SPARC_HWCAP2_FJDES): Likewise.
-	(ELF_SPARC_HWCAP2_FJAES): Likewise.
-
-2014-10-08  Will Newton  <will.newton@linaro.org>
-
-	* aarch64.h: Sync up relocations with ABI release 1.0.
-
-2014-09-16  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
-
-	* nds32.h: Declare new relocations.
-
-2014-09-15  Andrew Bennett  <andrew.bennett@imgtec.com>
-	    Matthew Fortune  <matthew.fortune@imgtec.com>
-
-	* mips.h: Add relocs: R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3,
-	R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
-	(E_MIPS_ARCH_32R6): New define.
-	(E_MIPS_ARCH_64R6): New define.
-
-2014-08-26  DJ Delorie  <dj@redhat.com>
-
-	* rl78.h (RL78_RELAXA_MASK): New.  Relax types are enums, not bits
-
-2014-07-07  Barney Stratford  <barney_stratford@fastmail.fm>
-
-	* avr.h: Add R_AVR_PORT5 and R_AVR_PORT6.
-
-2014-07-01  Barney Stratford   <barney_stratford@fastmail.fm>
-            Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
-            Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
-            Soundararajan  <Sounderarajan.D@atmel.com>
-
-	* avr.h (E_AVR_MACH_AVRTINY): Define avrtiny machine number.
-	(R_AVR_LDS_STS_16): Define 16 bit lds/sts reloc number.
-	* include/opcode/avr.h (AVR_ISA_TINY): Define avrtiny specific ISA.
-	(AVR_ISA_2xxxa): Define ISA without LPM.
-	(AVR_ISA_AVRTINY): Define avrtiny arch ISA.
-	Add doc for contraint used in 16 bit lds/sts.
-	Adjust ISA group for icall, ijmp, pop and push.
-	Add 16 bit lds/sts encoding and update 32 bit lds/sts constraints.
-
-2014-04-22  Christian Svensson  <blue@cmd.nu>
-
-	* common.h: Remove openrisc and or32 support.  Add support for or1k.
-	* or1k.h: New file.
-	* openrisc.h: Delete.
-	* or32.h: Delete.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define.
-
-2014-02-06  Andrew Pinski  <apinski@cavium.com>
-
-	* mips.h (E_MIPS_MACH_OCTEON3): New machine flag.
-
-2014-02-03  Sandra Loosemore  <sandra@codesourcery.com>
-
-	* nios2.h (R_NIOS2_GOT_LO, R_NIOS2_GOT_HA): New.
-	(R_NIOS2_CALL_LO, R_NIOS2_CALL_HA): New.
-	(R_NIOS2_ILLEGAL): Adjust.
-
-2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>
-
-	* nios2.h (elf_nios2_reloc_type): Add R_NIOS2_CALL26_NOAT.
-
-2014-01-30  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* common.h (AT_HWCAP2): Define.
-
-2013-12-13  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
-	    Wei-Cheng Wang  <cole945@gmail.com>
-
-	* nds32.h: New file for Andes NDS32.
-
-2013-12-07  Mike Frysinger  <vapier@gentoo.org>
-
-	* epiphany.h: Remove +x file mode.
-
-2013-11-17  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND.
-
-2013-11-13  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* aarch64.h: Define R_AARCH64_TLS_DTPMOD64,
-	R_AARCH64_TLS_DTPREL64 and R_AARCH64_TLS_TPREL64; guard
-	R_AARCH64_TLS_DTPMOD, R_AARCH64_TLS_DTPREL and
-	R_AARCH64_TLS_TPREL with RELOC_MACROS_GEN_FUNC.
-
-2013-10-30  Alan Modra  <amodra@gmail.com>
-
-	* ppc.h (DT_PPC_TLSOPT): Delete.
-	(DT_PPC_OPT, PPC_OPT_TLS): Define.
-	* ppc64.h (DT_PPC64_TLSOPT): Delete.
-	(DT_PPC64_OPT, PPC64_OPT_TLS, PPC64_OPT_MULTI_TOC): Define.
-
-2013-10-30  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (STO_PPC64_LOCAL_BIT, STO_PPC64_LOCAL_MASK): Define.
-	(ppc64_decode_local_entry, ppc64_encode_local_entry): New functions.
-	(PPC64_LOCAL_ENTRY_OFFSET, PPC64_SET_LOCAL_ENTRY_OFFSET): Define.
-
-2013-10-30  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (EF_PPC64_ABI): Define.
-
-2013-10-30  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (R_PPC64_ADDR16_HIGH, R_PPC64_ADDR16_HIGHA,
-	R_PPC64_TPREL16_HIGH, R_PPC64_TPREL16_HIGHA,
-	R_PPC64_DTPREL16_HIGH, R_PPC64_DTPREL16_HIGHA): New.
-	(IS_PPC64_TLS_RELOC): Match new tls relocs.
-
-2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>
-
-	* mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA.
-	(enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128.
-
-2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>
-
-	* mips.h (EF_MIPS_FP64): New e_flags bit.
-
-2013-08-09  Nick Clifton  <nickc@redhat.com>
-
-	* rl78.c (E_FLAG_RL78_G10): Define.
-
-2013-07-15  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment.
-	(Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE,
-	Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT,
-	Val_GNU_MIPS_ABI_FP_64): New enum.
-
-2013-07-12  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (EF_MIPS_NAN2008): New macro.
-
-2013-07-08  Tristan Gingold  <gingold@adacore.com>
-
-	* ia64.h (STB_VMS_WEAK, STB_VMS_SYSTEM): Add.
-
-2013-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* s390.h: Add new relocs R_390_PC12DBL, R_390_PLT12DBL,
-	R_390_PC24DBL, and R_390_PLT24DBL.
-
-2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones.
-
-2013-06-24  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting.
-	(ELF_ST_SET_MIPS_PLT): Likewise.
-
-2013-06-19  Will Newton  <will.newton@linaro.org>
-
-	* aarch64.h: Remove R_AARCH64_IRELATIVE.
-
-2013-06-07  Will Newton  <will.newton@linaro.org>
-
-	* aarch64.h: Add R_AARCH64_IRELATIVE reloc.
-
-2013-06-06  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
-
-2013-05-30  Paul Brook  <paul@codesourcery.com>
-
-	* mips.h (R_MIPS_EH): New.
-
-2013-05-28  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* aarch64.h (R_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
-	(R_AARCH64_TLSDESC_LD_PREL19): ... this.
-	(R_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
-	(R_AARCH64_TLSDESC_ADR_PAGE21): ... this.
-
-2013-05-22  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_INTEL205): New.
-	(EM_INTEL206): Likewise.
-	(EM_INTEL207): Likewise.
-	(EM_INTEL208): Likewise.
-	(EM_INTEL209): Likewise.
-
-2013-05-02  Nick Clifton  <nickc@redhat.com>
-
-	* msp430.h: Add MSP430X relocs.
-	Add some more MSP430 machine numbers.
-	Add values used by .MSP430.attributes section.
-
-2013-03-21  Michael Schewe  <michael.schewe@gmx.net>
-
-	* h8.h: Add new reloc R_H8_DISP32A16 for relaxation of
-	mov @(disp:32,ERx) to mov @(disp:16,ERx).
-
-2013-03-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
-
-	* common.h (NT_S390_TDB): Define.
-
-2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
-            Andrew Jenner <andrew@codesourcery.com>
-
-	Based on patches from Altera Corporation.
-
-	* nios2.h: New file.
-
-2013-01-24  Nick Clifton  <nickc@redhat.com>
-
-	* v850.h: Add support for e3v5 architecture.
-	Reorganize processor selection macros.
-
-2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* i386.h (R_386_SIZE32): Fill it.
-	* x86-64.h (R_X86_64_SIZE32): Likewise.
-	(R_X86_64_SIZE64): Likewise.
-
-2013-01-10  Will Newton <will.newton@imgtec.com>
-
-	* common.h: Fix case of "Meta".
-	* metag.h: New file.
-
-2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New macro
-	definitions.
-
-2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
-
-	* mips.h: Add MIPS machine variant number for r5900 which is
-	compatible with old Playstation 2 software.
-
-2012-11-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (DF_1_CONLFAT): Renamed to ...
-	(DF_1_CONFALT): This.
-	(DF_1_ENDFILTEE): New.
-	(DF_1_DISPRELDNE): Likewise.
-	(DF_1_DISPRELPND): Likewise.
-	(DF_1_NODIRECT): Likewise.
-	(DF_1_IGNMULDEF): Likewise.
-	(DF_1_NOKSYMS): Likewise.
-	(DF_1_NOHDR): Likewise.
-	(DF_1_EDITED): Likewise.
-	(DF_1_NORELOC): Likewise.
-	(DF_1_SYMINTPOSE): Likewise.
-	(DF_1_GLOBAUDIT): Likewise.
-	(DF_1_SINGLETON): Likewise.
-
-2012-11-09  Nick Clifton  <nickc@redhat.com>
-
-	* rx.h (EF_RX_CPU_RX): Add comment.
-	(E_FLAG_RX_ABI): Define.
-
-	* v850.h: Add RH850 ABI values.
-
-2012-11-08  Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (EF_MIPS_32BITMODE): Move next to lower-order bits.
-
-2012-11-01  Tom Tromey  <tromey@redhat.com>
-
-	* common.h (NT_386_TLS, NT_386_IOPERM): New defines.
-
-2012-10-30  Steve McIntyre  <steve.mcintyre@linaro.org>
-
-	* elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
-	(EF_ARM_ABI_FLOAT_HARD): Likewise.
-
-2012-10-23  Tom Tromey  <tromey@redhat.com>
-
-	* common.h (NT_SIGINFO, NT_FILE): New defines.
-
-2012-08-27  Walter Lee  <walt@tilera.com>
-
-	* tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation.
-	(R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL	): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto.
-
-2012-08-13  Ian Bolton  <ian.bolton@arm.com>
-            Laurent Desnogues  <laurent.desnogues@arm.com>
-            Jim MacArthur  <jim.macarthur@arm.com>
-            Marcus Shawcroft  <marcus.shawcroft@arm.com>
-            Nigel Stephens  <nigel.stephens@arm.com>
-            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
-            Richard Earnshaw  <rearnsha@arm.com>
-            Sofiane Naci  <sofiane.naci@arm.com>
-            Tejas Belagod  <tejas.belagod@arm.com>
-            Yufeng Zhang  <yufeng.zhang@arm.com>
-
-	* aarch64.h: New file.
-	* common.h (EM_res183): Rename to EM_AARCH64.
-	(EM_res184): Rename to EM_ARM184.
-
-2012-06-28  Iain Sandoe  <iain@codesourcery.com>
-
-	* common.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE,
-	AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New defines.
-
-2012-05-16  Georg-Johann Lay  <avr@gjlay.de>
-
-	PR target/13503
-	* avr.h (RELOC_NUMBERS): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8.
-
-2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
-
-	* m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10)
-	R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations.
-	(E_M68HC11_XGATE_RAMOFFSET): Define.
-
-2012-05-14  James Lemke  <jwlemke@codesourcery.com>
-	* ppc.h (SEC_PPC_VLE): Remove.
-
-2012-05-14  Catherine Moore  <clm@codesourcery.com>
-	    James Lemke  <jwlemke@codesourcery.com>
-
-	* ppc.h (R_PPC_VLE_REL8): New reloction.
-	(R_PPC_VLE_REL15): Likewise.
-	(R_PPC_VLE_REL24): Likewise.
-	(R_PPC_VLE_LO16A): Likewise.
-	(R_PPC_VLE_LO16D): Likewise.
-	(R_PPC_VLE_HI16A): Likewise.
-	(R_PPC_VLE_HI16D): Likewise.
-	(R_PPC_VLE_HA16A): Likewise.
-	(R_PPC_VLE_HA16D): Likewise.
-	(R_PPC_VLE_SDA21): Likewise.
-	(R_PPC_VLE_SDA21_LO): Likewise.
-	(R_PPC_VLE_SDAREL_LO16A): Likewise.
-	(R_PPC_VLE_SDAREL_LO16D): Likewise.
-	(R_PPC_VLE_SDAREL_HI16A): Likewise.
-	(R_PPC_VLE_SDAREL_HI16D): Likewise.
-	(R_PPC_VLE_SDAREL_HA16A): Likewise.
-	(R_PPC_VLE_SDAREL_HA16D): Likewise.
-	(SEC_PPC_VLE): Remove.
-	(PF_PPC_VLE): New program header flag.
-	(SHF_PPC_VLE): New section header flag.
-	(vle_opcodes, vle_num_opcodes): New.
-	(VLE_OP): New macro.
-	(VLE_OP_TO_SEG): New macro.
-
-2012-05-11  Georg-Johann Lay  <avr@gjlay.de
-
-	PR target/13503
-	* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
-	R_AVR_8_HI8, R_AVR_8_HHI8.
-
-2012-05-03  Sean Keys  <skeys@ipdatasys.com>
-
-	* xgate.h: Mininal file to support XGATE relocations.
-
-2012-04-27  David S. Miller  <davem@davemloft.net>
-
-	* sparc.h: Add new ELF_SPARC_HWCAP_* defines for crypto,
-	pause, and compare-and-branch instructions.
-
-2012-03-07  Nick Clifton  <nickc@redhat.com>
-
-	* mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
-	R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
-	R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
-	R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF.
-
-2012-02-25  Walter Lee  <walt@tilera.com>
-
-	* tilegx.h (R_TILEGX_IMM16_X0_HW1_GOT): Delete.
-	(R_TILEGX_IMM16_X1_HW1_GOT): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_GOT): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_GOT): Ditto.
-	(R_TILEGX_IMM16_X0_HW3_GOT): Ditto.
-	(R_TILEGX_IMM16_X1_HW3_GOT): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_LAST_GOT): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_LAST_GOT): Ditto.
-	(R_TILEGX_IMM16_X0_HW1_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X1_HW1_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X0_HW3_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X1_HW3_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD): Ditto.
-	(R_TILEGX_IMM16_X0_HW1_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X1_HW1_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X0_HW3_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X1_HW3_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE): Ditto.
-	(R_TILEGX_IMM16_X0_HW0_TLS_LE): New relocation.
-	(R_TILEGX_IMM16_X1_HW0_TLS_LE): Ditto.
-	(R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE): Ditto.
-	(R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE): Ditto.
-	(R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE): Ditto.
-	(R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE): Ditto.
-	(R_TILEGX_TLS_GD_CALL): Ditto.
-	(R_TILEGX_IMM8_X0_TLS_GD_ADD): Ditto.
-	(R_TILEGX_IMM8_X1_TLS_GD_ADD): Ditto.
-	(R_TILEGX_IMM8_Y0_TLS_GD_ADD): Ditto.
-	(R_TILEGX_IMM8_Y1_TLS_GD_ADD): Ditto.
-	(R_TILEGX_TLS_IE_LOAD): Ditto.
-	(R_TILEGX_IMM8_X0_TLS_ADD): Ditto.
-	(R_TILEGX_IMM8_X1_TLS_ADD): Ditto.
-	(R_TILEGX_IMM8_Y0_TLS_ADD): Ditto.
-	(R_TILEGX_IMM8_Y1_TLS_ADD): Ditto.
-	* tilepro.h (R_TILEPRO_TLS_GD_CALL): New relocation.
-	(R_TILEPRO_IMM8_X0_TLS_GD_ADD): Ditto.
-	(R_TILEPRO_IMM8_X1_TLS_GD_ADD): Ditto.
-	(R_TILEPRO_IMM8_Y0_TLS_GD_ADD): Ditto.
-	(R_TILEPRO_IMM8_Y1_TLS_GD_ADD): Ditto.
-	(R_TILEPRO_TLS_IE_LOAD): Ditto.
-	(R_TILEPRO_IMM16_X0_TLS_LE): Ditto.
-	(R_TILEPRO_IMM16_X1_TLS_LE): Ditto.
-	(R_TILEPRO_IMM16_X0_TLS_LE_LO): Ditto.
-	(R_TILEPRO_IMM16_X1_TLS_LE_LO): Ditto.
-	(R_TILEPRO_IMM16_X0_TLS_LE_HI): Ditto.
-	(R_TILEPRO_IMM16_X1_TLS_LE_HI): Ditto.
-	(R_TILEPRO_IMM16_X0_TLS_LE_HA): Ditto.
-	(R_TILEPRO_IMM16_X1_TLS_LE_HA): Ditto.
-
-2011-12-22  DJ Delorie  <dj@redhat.com>
-
-	* rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New.
-	(RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New.
-
-2011-12-19  Chung-Lin Tang  <cltang@codesourcery.com>
-
-	* mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries.
-
-2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* common.h (NT_S390_LAST_BREAK): Define.
-	(NT_S390_SYSTEM_CALL): Likewise.
-
-2011-11-01  DJ Delorie  <dj@redhat.com>
-
-	* common.h (EM_RL78, EM_78K0R): New.
-	* rl78.h: New.
-
-2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
-
-	* epiphany.h: New file.
-	* common.h (EM_ADAPTEVA_EPIPHANY): Define.
-
-2011-10-10  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (R_PPC64_TOCSAVE): Add.
-
-2011-10-05  DJ Delorie  <dj@redhat.com>
-
-	* rx.h (E_FLAG_RX_PID): New.
-
-2011-09-21  David S. Miller  <davem@davemloft.net>
-
-	* sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute.
-	(ELF_SPARC_HWCAP_*): New HWCAPS bitmask values.
-
-2011-08-12  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/13082
-	* x86-64.h (R_X86_64_RELATIVE64): New.
-
-2011-07-24  Chao-ying Fu  <fu@mips.com>
-            Maciej W. Rozycki  <macro@codesourcery.com>
-
-	* mips.h (R_MICROMIPS_min): New relocations.
-	(R_MICROMIPS_26_S1): Likewise.
-	(R_MICROMIPS_HI16, R_MICROMIPS_LO16): Likewise.
-	(R_MICROMIPS_GPREL16, R_MICROMIPS_LITERAL): Likewise.
-	(R_MICROMIPS_GOT16, R_MICROMIPS_PC7_S1): Likewise.
-	(R_MICROMIPS_PC10_S1, R_MICROMIPS_PC16_S1): Likewise.
-	(R_MICROMIPS_CALL16, R_MICROMIPS_GOT_DISP): Likewise.
-	(R_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_OFST): Likewise.
-	(R_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_LO16): Likewise.
-	(R_MICROMIPS_SUB, R_MICROMIPS_HIGHER): Likewise.
-	(R_MICROMIPS_HIGHEST, R_MICROMIPS_CALL_HI16): Likewise.
-	(R_MICROMIPS_CALL_LO16, R_MICROMIPS_SCN_DISP): Likewise.
-	(R_MICROMIPS_JALR, R_MICROMIPS_HI0_LO16): Likewise.
-	(R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM): Likewise.
-	(R_MICROMIPS_TLS_DTPREL_HI, R_MICROMIPS_TLS_DTPREL_LO): Likewise.
-	(R_MICROMIPS_TLS_GOTTPREL): Likewise.
-	(R_MICROMIPS_TLS_TPREL_HI16): Likewise.
-	(R_MICROMIPS_TLS_TPREL_LO16): Likewise.
-	(R_MICROMIPS_GPREL7_S2, R_MICROMIPS_PC23_S2): Likewise.
-	(R_MICROMIPS_max): Likewise.
-	(EF_MIPS_ARCH_ASE_MICROMIPS): New macro.
-	(STO_MIPS_ISA, STO_MIPS_FLAGS): Likewise.
-	(ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT): Likewise.
-	(STO_MICROMIPS): Likewise.
-	(ELF_ST_IS_MICROMIPS, ELF_ST_SET_MICROMIPS): Likewise.
-	(ELF_ST_IS_COMPRESSED): Likewise.
-	(STO_MIPS_PLT, STO_MIPS_PIC): Rework.
-	(ELF_ST_IS_MIPS_PIC, ELF_ST_SET_MIPS_PIC): Likewise.
-	(STO_MIPS16, ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): Likewise.
-
-2011-07-22  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_K1OM): New.
-
-2011-07-03  Samuel Thibault  <samuel.thibault@gnu.org>
-	    Thomas Schwinge  <thomas@schwinge.name>
-
-	PR binutils/12913
-	* common.h (ELFOSABI_GNU): Define, replaces...
-	(ELFOSABI_LINUX): ... this, kept as an alias.
-	(ELFOSABI_HURD): Remove.
-
-2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
-
-	* common.h (NT_ARM_VFP): Define.
-
-2011-06-13  Walter Lee  <walt@tilera.com>
-
-	* common.h: Add EM_TILEGX.
-	* tilegx.h: New file.
-	* tilepro.h: New file.
-
-2011-06-09  Tristan Gingold  <gingold@adacore.com>
-
-	* ia64.h (Elf64_External_VMS_ORIG_DYN_Note): New struct.
-
-2011-06-02  Nick Clifton  <nickc@redhat.com>
-
-	* common.h: Fix spelling mistake in comment.
-	* reloc-macros.h: Likewise.
-
-2011-05-31  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN.
-
-2011-05-09  Paul Brook  <paul@codesourcery.com>
-
-	* tic6x.h (ELF_STRING_C6000_unwind,
-	ELF_STRING_C6000_unwind_info, ELF_STRING_C6000_unwind_once,
-	ELF_STRING_C6000_unwind_info_once): Define.
-
-2011-04-15  Sergio Durigan Junior  <sergiodj@redhat.com>
-
-	* common.h (NT_STAPSDT): New define.
-
-2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
-
-	* tic6x.h (R_C6000_JUMP_SPLOT, R_C6000_EHTYPE,
-	R_C6000_PCR_H16, R_C6000_PCR_L16): New relocs.
-	(SHN_TIC6X_SCOMMON): Define.
-
-2011-03-31  Tristan Gingold  <gingold@adacore.com>
-
-	* ia64.h (Elf64_External_VMS_Note): New struct.
-	(NT_VMS_MHD, NT_VMS_LNM, NT_VMS_SRC, NT_VMS_TITLE, NT_VMS_EIDC)
-	(NT_VMS_FPMODE, NT_VMS_LINKTIME, NT_VMS_IMGNAM, NT_VMS_IMGID)
-	(NT_VMS_LINKID, NT_VMS_IMGBID, NT_VMS_GSTNAM, NT_VMS_ORIG_DYN)
-	(NT_VMS_PATCHTIME) New macros.
-
-2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
-
-	* arm.h (R_ARM_IRELATIVE): New relocation.
-
-2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
-
-	* internal.h (elf_internal_sym): Add st_target_internal.
-	* arm.h (arm_st_branch_type): New enum.
-	(ARM_SYM_BRANCH_TYPE): New macro.
-
-2011-03-10  Nick Clifton  <nickc@redhat.com>
-
-	* common.h (EM_V850): V850s now supplied by Renesas.
-
-2011-02-25  Alan Modra  <amodra@gmail.com>
-
-	PR 12516
-	* internal.h (ELF_SECTION_IN_SEGMENT_1): Don't match zero size
-	sections at start or end of PT_DYNAMIC.
-
-2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
-	    Glauber de Oliveira Costa  <glommer@gmail.com>
-
-	* arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL,
-	R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New
-	relocations.
-
-2010-11-16  Jie Zhang  <jie.zhang@analog.com>
-
-	* bfin.h (EF_BFIN_CODE_IN_L1): Define.
-	(EF_BFIN_DATA_IN_L1): Define.
-
-2010-11-11  Mingming Sun  <mingm.sun@gmail.com>
-
-	* mips.h (E_MIPS_MACH_LS3A): Defined.
-
-2010-11-02  Joseph Myers  <joseph@codesourcery.com>
-
-	* tic6x-attrs.h (Tag_ABI_wchar_t, Tag_ABI_stack_align_needed,
-	Tag_ABI_stack_align_preserved, Tag_ABI_PID, Tag_ABI_PIC,
-	Tag_ABI_array_object_alignment,
-	Tag_ABI_array_object_align_expected, Tag_ABI_conformance): Define.
-
-2010-10-29  Joseph Myers  <joseph@codesourcery.com>
-
-	* tic6x-attrs.h (Tag_ABI_compatibility): Define.
-
-2010-10-29  Bernd Schmidt  <bernds@codesourcery.com>
-            Joseph Myers  <joseph@codesourcery.com>
-
-	* tic6x-attrs.h (Tag_ABI_DSBT): New.
-
-2010-10-21  Joseph Myers  <joseph@codesourcery.com>
-
-	* tic6x-attrs.h (Tag_C6XABI_Tag_CPU_arch): Change to Tag_ISA,
-	value 4.
-	* tic6x.h (Values for Tag_C6XABI_Tag_CPU_arch): Rename for
-	attribute renaming.
-
-2010-07-23  Naveen.H.S  <naveen.S@kpitcummins.com>
-	    Ina Pandit  <ina.pandit@kpitcummins.com>
-
-	* v850.h: Add support for V850E2 and V850E2V3.
-	(v850_reloc_type): Update the newly added relocations
-
-2010-07-20  Alan Modra  <amodra@gmail.com>
-
-	* internal.h (ELF_TBSS_SPECIAL): New macro, extracted from..
-	(ELF_SECTION_SIZE): ..here.
-	(ELF_SECTION_IN_SEGMENT_1): Add "strict" arg.
-	(ELF_SECTION_IN_SEGMENT_STRICT): New macro.
-
-2010-06-25  Alan Modra  <amodra@gmail.com>
-
-	* ppc64.h (R_PPC64_LO_DS_OPT): Define.
-
-2010-06-15  Joseph Myers  <joseph@codesourcery.com>
-
-	* tic6x-attrs.h: New.
-	* tic6x.h: Include elf/tic6x-attrs.h for attribute table.
-	(C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X,
-	C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP,
-	C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP,
-	C6XABI_Tag_CPU_arch_C674X): Define.
-
-2010-06-11  Tristan Gingold  <gingold@adacore.com>
-
-	* ia64.h (EF_IA_64_VMS_COMCOD, EF_IA_64_VMS_COMCOD_SUCCESS)
-	(EF_IA_64_VMS_COMCOD_WARNING, EF_IA_64_VMS_COMCOD_ERROR)
-	(EF_IA_64_VMS_COMCOD_ABORT, EF_IA_64_VMS_LINKAGES): Define.
-	(VMS_LF_CALL_DEBUG, VMS_LF_NOP0BUFS, VMS_LF_P0IMAGE)
-	(VMS_LF_MKTHREADS, VMS_LF_UPCALLS, VMS_LF_IMGSTA)
-	(VMS_LF_INITIALIZE, VMS_LF_MAIN, VMS_LF_EXE_INIT)
-	(VMS_LF_TBK_IN_IMG, VMS_LF_DBG_IN_IMG, VMS_LF_TBK_IN_DSF)
-	(VMS_LF_DBG_IN_DSF, VMS_LF_SIGNATURES, VMS_LF_REL_SEG_OFF): Define.
-	(VMS_STO_VISIBILITY, VMS_ST_VISIBILITY, VMS_STO_FUNC_TYPE)
-	(VMS_ST_FUNC_TYPE, VMS_SFT_CODE_ADDR, VMS_SFT_SYMV_IDX)
-	(VMS_SFT_FD, VMS_SFT_RESERVE, VMS_STO_LINKAGE, VMS_ST_LINKAGE)
-	(VMS_STL_IGNORE, VMS_STL_RESERVE, VMS_STL_STD, VMS_STL_LNK): Define.
-	(Elf64_External_VMS_IMAGE_FIXUP): New declaration.
-	(Elf64_External_VMS_IMAGE_RELA): Ditto.
-	(R_IA64_VMS_DIR8, R_IA64_VMS_DIR16LSB, R_IA64_VMS_CALL_SIGNATURE)
-	(R_IA64_VMS_EXECLET_FUNC, R_IA64_VMS_EXECLET_DATA, R_IA64_VMS_FIX8)
-	(R_IA64_VMS_FIX16, R_IA64_VMS_FIX32, R_IA64_VMS_FIX64)
-	(R_IA64_VMS_FIXFD, R_IA64_VMS_ACC_LOAD, R_IA64_VMS_ACC_ADD)
-	(R_IA64_VMS_ACC_SUB, R_IA64_VMS_ACC_MUL, R_IA64_VMS_ACC_DIV)
-	(R_IA64_VMS_ACC_AND, R_IA64_VMS_ACC_IOR, R_IA64_VMS_ACC_EOR)
-	(R_IA64_VMS_ACC_ASH, R_IA64_VMS_ACC_STO8, R_IA64_VMS_ACC_STO16LSH)
-	(R_IA64_VMS_ACC_STO32LSH, R_IA64_VMS_ACC_STO64LSH): New.
-
-2010-05-25  Daniel Jacobowitz  <dan@codesourcery.com>
-	    Joseph Myers  <joseph@codesourcery.com>
-	    Andrew Stubbs  <ams@codesourcery.com>
-
-	* sh.h (EF_SH_PIC, EF_SH_FDPIC): Define.
-	(R_SH_FIRST_INVALID_RELOC_6, R_SH_LAST_INVALID_RELOC_6): New.  Adjust
-	other invalid ranges.
-	(R_SH_GOT20, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20)
-	(R_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC20, R_SH_FUNCDESC)
-	(R_SH_FUNCDESC_VALUE): New.
-
-2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR gas/11600
-	* common.h (SHF_EXCLUDE): New.
-
-	* i370.h (SHF_EXCLUDE): Removed.
-	* or32.h (SHF_EXCLUDE): Likewise.
-	* ppc.h (SHF_EXCLUDE): Likewise.
-	* sparc.h (SHF_EXCLUDE): Likewise.
-
-2010-04-23  Alan Modra  <amodra@gmail.com>
-
-	* internal.h (ELF_SECTION_SIZE): Protect macro args with parentheses.
-	Invert logic to clarify test for .tbss.
-	(ELF_IS_SECTION_IN_SEGMENT): Rename to..
-	(ELF_SECTION_IN_SEGMENT_1): ..this.  Add check_vma param.  Protect
-	macro args with parentheses.
-	(ELF_SECTION_IN_SEGMENT): Define.
-	(ELF_IS_SECTION_IN_SEGMENT_FILE): Delete.
-	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Delete.
-
-2010-04-15  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
-
-	* arm.h (Tag_FP_arch, Tag_ABI_align_needed, Tag_ABI_align_preserved,
-	Tag_FP_HP_extension): Add new ABI attribute tags.
-
-2010-04-15  Nick Clifton  <nickc@redhat.com>
-
-	* alpha.h: Update copyright notice to use GPLv3.
-	* arc.h: Likewise.
-	* arm.h: Likewise.
-	* avr.h: Likewise.
-	* bfin.h: Likewise.
-	* common.h: Likewise.
-	* cr16.h: Likewise.
-	* cr16c.h: Likewise.
-	* cris.h: Likewise.
-	* crx.h: Likewise.
-	* d10v.h: Likewise.
-	* d30v.h: Likewise.
-	* dlx.h: Likewise.
-	* dwarf.h: Likewise.
-	* external.h: Likewise.
-	* fr30.h: Likewise.
-	* frv.h: Likewise.
-	* h8.h: Likewise.
-	* hppa.h: Likewise.
-	* i370.h: Likewise.
-	* i386.h: Likewise.
-	* i860.h: Likewise.
-	* i960.h: Likewise.
-	* ia64.h: Likewise.
-	* internal.h: Likewise.
-	* ip2k.h: Likewise.
-	* iq2000.h: Likewise.
-	* lm32.h: Likewise.
-	* m32c.h: Likewise.
-	* m32r.h: Likewise.
-	* m68hc11.h: Likewise.
-	* m68k.h: Likewise.
-	* mcore.h: Likewise.
-	* mep.h: Likewise.
-	* microblaze.h: Likewise.
-	* mips.h: Likewise.
-	* mmix.h: Likewise.
-	* mn10200.h: Likewise.
-	* moxie.h: Likewise.
-	* msp430.h: Likewise.
-	* mt.h: Likewise.
-	* openrisc.h: Likewise.
-	* or32.h: Likewise.
-	* pj.h: Likewise.
-	* ppc.h: Likewise.
-	* ppc64.h: Likewise.
-	* reloc-macros.h: Likewise.
-	* rx.h: Likewise.
-	* s390.h: Likewise.
-	* sh.h: Likewise.
-	* sparc.h: Likewise.
-	* spu.h: Likewise.
-	* v850.h: Likewise.
-	* vax.h: Likewise.
-	* vxworks.h: Likewise.
-	* x86-64.h: Likewise.
-	* xc16x.h: Likewise.
-	* xstormy16.h: Likewise.
-	* xtensa.h: Likewise.
-
-2010-04-08  David Stubbs  <stubbs@icerasemi.com>
-
-	* internal.h (ELF_IS_SECTION_IN_SEGMENT): PT_PHDR program headers
-	cannot contain any sections.
-
-2010-03-25  Joseph Myers  <joseph@codesourcery.com>
-
-	* common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define.
-	* tic6x.h: New.
-
-2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
-
-	* common.h (VER_FLG_*): Document.
-	(VER_FLG_INFO): Define.
-
-2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
-
-	PR binutils/11297
-	* avr.h: (R_AVR_8): New relocation number.
-
-2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
-
-	* arm.h (Tag_MPextension_use): Renumber.
-	(Tag_DIV_use): Add.
-	(Tag_MPextension_use_legacy): Likewise.
-
-2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
-
-	* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
-	NT_S390_CTRS and NT_S390_PREFIX): Define.
-
-2010-02-08  David S. Miller  <davem@davemloft.net>
-
-	* sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.
-
-2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (NT_386_XSTATE): New.
-
-2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
-
-	* s390.h (EF_S390_HIGH_GPRS): Added macro definition.
-
-2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
-
-	* common.h (PN_XNUM): Define.
-
-2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* common.h (NT_S390_HIGH_GPRS): Define.
-
-2009-12-17  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
-	R_PPC_RELAX32PC_PLT): Delete.
-	(R_PPC_RELAX, R_PPC_RELAX_PLT, R_PPC_RELAX_PLTREL24): Define.
-
-2009-12-03  David Daney  <ddaney@caviumnetworks.com>
-	    Adam Nemet  <adambnemet@gmail.com>
-
-	* mips.h (E_MIPS_MACH_OCTEON2): New machine flag.
-
-2009-11-28  Joseph Myers  <joseph@codesourcery.com>
-
-	* common.h (ELFOSABI_FENIXOS, EM_TI_C6000, EM_TI_C2000,
-	EM_TI_C5500, EM_CUDA): Define.
-	(EM_res140, EM_res141, EM_res142): Remove.
-
-2009-11-17  Paul Brook  <paul@codesourcery.com>
-	Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* arm.h (TAG_CPU_ARCH_V7E_M): Define.
-
-2009-09-29  DJ Delorie  <dj@redhat.com>
-
-	* rx.h: New file.
-
-2009-09-21  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (DT_PPC_TLSOPT): Define.
-	* ppc64.h (DT_PPC64_TLSOPT): Define.
-
-2009-08-10  Daniel Gutson  <dgutson@codesourcery.com>
-
-	* arm.h: (SHT_ARM_DEBUGOVERLAY): New define.
-	(SHT_ARM_OVERLAYSECTION): New define.
-
-2006-08-09  Bernd Schmidt  <bernd.schmidt@analog.com>
-
-	From Mike Frysinger <michael.frysinger@analog.com>
-	* bfin.h (R_BFIN_UNUSED, R_BFIN_PCREL5M2, R_BFIN_UNUSED1,
-	R_BFIN_PCREL10, R_BFIN_PCREL12_JUMP, R_BFIN_RIMM16,
-	R_BFIN_LUIMM16, R_BFIN_HUIMM16, R_BFIN_PCREL12_JUMP_S,
-	R_BFIN_PCREL24_JUMP_X, R_BFIN_PCREL24, R_BFIN_UNUSEDB,
-	R_BFIN_UNUSEDC, R_BFIN_PCREL24_JUMP_L, R_BFIN_PCREL24_CALL_X,
-	R_BFIN_VAR_EQ_SYMB, R_BFIN_BYTE_DATA, R_BFIN_BYTE2_DATA,
-	R_BFIN_BYTE4_DATA, R_BFIN_PCREL11, R_BFIN_PUSH, R_BFIN_CONST,
-	R_BFIN_ADD, R_BFIN_SUB, R_BFIN_MULT, R_BFIN_DIV, R_BFIN_MOD,
-	R_BFIN_LSHIFT, R_BFIN_RSHIFT, R_BFIN_AND, R_BFIN_OR, R_BFIN_XOR,
-	R_BFIN_LAND, R_BFIN_LOR, R_BFIN_LEN, R_BFIN_NEG, R_BFIN_COMP,
-	R_BFIN_PAGE, R_BFIN_HWPAGE, R_BFIN_ADDR, R_BFIN_PLTPLC,
-	R_BFIN_GOT, R_BFIN_MAX): Renamed from R_unused0, R_pcrel5ms,
-	R_unused1, R_pcrel10, R_pcrel12_jump, R_rimm16, R_luimm16,
-	R_huimm16, R_pcrel12_jump_s, R_pcrel24_jump_x, R_pcrel24,
-	R_unusedb, R_unusedc, R_pcrel24_jump_l, R_pcrel24_call_x,
-	R_var_eq_symb, R_byte_data, R_byte2_data, R_byte4_data, R_pcrel11,
-	R_push, R_const, R_add, R_sub, R_mult, R_div, R_mod, R_lshift,
-	R_rshift, R_and, R_or, R_xor, R_land, R_lor, R_len, R_neg, R_comp,
-	R_page, R_hwpage, R_addr, R_pltpc, R_got.
-
-2009-08-09  Michael Eager <eager@eagercon.com>
-
-	* elf/common.h: Define EM_resnnn reserved values. Add EM_AVR32,
-	EM_STM8, EM_TILE64, EM_TILEPRO.  Change EM_MICROBLAZE.
-
-2009-08-06  Michael Eager <eager@eagercon.com>
-
-	* elf/common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD.
-	* elf/microblaze.h: New reloc definitions.
-
-2009-07-30  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc64.h: Add R_PPC64_JMP_IREL, R_PPC64_REL16, R_PPC64_REL16_LO,
-	R_PPC64_REL16_HI, R_PPC64_REL16_HA.
-
-2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_L1OM): New.
-
-2009-07-24  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
-	    Alan Modra  <amodra@bigpond.net.au>
-
-	* spu.h (R_SPU_ADD_PIC): New.
-
-2009-07-23  Ulrich Drepper  <drepper@redhat.com>
-
-	* common.h (STB_GNU_UNIQUE): Define.
-
-2009-07-10  Tom Tromey  <tromey@redhat.com>
-
-	* dwarf2.h: Move to `..'.
-
-2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* dwarf2.h: Just include ../dwarf2.h.
-
-2009-07-10  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_IRELATIVE): Add.
-	(R_PPC_RELAX32, R_PPC_RELAX32PC,
-	R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Renumber.
-	* ppc64.h (R_PPC64_IRELATIVE): Add.
-
-2009-07-03  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
-	and DW_OP_stack_value.
-
-2009-06-22  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_RELAX*): Define as enum.
-
-2009-06-11  Anthony Green  <green@moxielogic.org>
-
-	* moxie.h (R_MOXIE_PCREL10): New.
-
-2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR ld/10205
-	* i386.h (R_386_IRELATIVE): New.
-	* x86-64.h (R_X86_64_IRELATIVE): Likewise.
-
-2009-05-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h: Update comments for dynamic tag ranges.
-
-2009-04-30  DJ Delorie  <dj@redhat.com>
-
-	* mep.h (EF_MEP_COP_*): New.
-	(EF_MEP_ALL_FLAGS): Add them.
-
-2009-04-30  Nick Clifton  <nickc@redhat.com>
-
-	* common.h (STT_GNU_IFUNC): Define.
-
-2009-04-24  Cary Coutant  <ccoutant@google.com>
-
-	 * dwarf2.h (DW_LNE_set_discriminator): New enum value.
-
-2009-04-15  Anthony Green  <green@moxielogic.com>
-
-	* common.h (EM_MOXIE): Define.
-	* moxie.h: New file.
-
-2009-04-07  DJ Delorie  <dj@redhat.com>
-
-	* mep.h (EF_MEP_CPU_C5): New.
-
-2009-04-01  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_INTEL178): Removed.
-	(EM_INTEL179): Likewise.
-	(EM_ETPU): New.
-	(EM_SLE9X): Likewise.
-	(EM_INTEL181): Likewise.
-	(EM_INTEL182): Likewise.
-
-2009-03-31  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (EM_INTEL178): New.
-	(EM_INTEL179): Likewise.
-	(EM_INTEL180): Likewise.
-
-2009-03-20  Mikolaj Zalewski  <mikolajz@google.com>
-
-	* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define.
-
-2009-03-14  Mark Kettenis  <kettenis@gnu.org>
-
-	* common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV)
-	(NT_OPENBSD_REGS, NT_OPENBSD_FPREGS, NT_OPENBSD_XFPREGS)
-	(NT_OPENBSD_WCOOKIE): New defines.
-
-2009-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* common.h (AT_RANDOM): Define.
-
-2009-03-04  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs.
-	* ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs.
-
-2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
-
-	* score.h (RELOC_NUMBER): Add R_SCORE_IMM32.
-	* common.h (EM_SCORE_OLD): Define.
-
-2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (STB_LOPROC): Replace Application-specific with
-	Processor-specific in comments.
-	(STB_HIPROC): Likewise.
-	(STT_LOPROC): Likewise.
-	(STT_HIPROC): Likewise.
-
-2009-02-03  Sandip Matte  <sandip@rmicorp.com>
-
-	* mips.h (E_MIPS_MACH_XLR): Define.
-
-2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
-
-	* m68k.h: Map TLS relocations to numbers.
-
-2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
-	    Julian Brown   <julian@codesourcery.com>
-
-	* arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines.
-	(MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines.
-	(Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI
-	version 2.07.
-	(Tag_undefined39, Tag_nodefaults): New enum values.
-	(Tag_also_compatible_with, Tag_T2EE_use): Likewise.
-	(Tag_conformance, Tag_Virtualization_use): Likewise.
-	(Tag_undefined69, Tag_MPextension_use): Likewise.
-
-2009-01-15  Douglas B Rupp  <rupp@gnat.com>
-
-	* ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO, EF_IA_64_ARCHVER_1):
-	New macros. Minor reformatting.
-
-2008-12-23  Jon Beniston <jon@beniston.com>
-
-	* lm32.h: New file.
-
-2008-12-23  Nick Clifton  <nickc@redhat.com>
-
-	* commmon.h (STT_IFUNC): Delete.
-
-2008-12-20  Hans-Peter Nilsson  <hp@axis.com>
-
-	* cris.h (R_CRIS_32_IE): New relocation.
-
-2008-12-03  Nick Clifton  <nickc@redhat.com>
-
-	* common.h (STT_IFUNC): Define.
-
-2008-11-27  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
-	* cr16.h (R_CR16_GOT_REGREL20, R_CR16_GOTC_REGREL20 and
-	R_CR16_GLOB_DAT): New relocations.
-
-2008-11-25  Hans-Peter Nilsson  <hp@axis.com>
-
-	* cris.h (R_CRIS_32_TPREL): Correct comment.
-	(R_CRIS_DTPMOD): Open up for use elsewhere than the fourth GOT entry.
-
-2008-11-18  Catherine Moore  <clm@codesourcery.com>
-
-	* arm.h (Tag_ABI_FP_16bit_format): Define.
-
-2008-11-14  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* internal.h (struct elf_segment_map): Add header_size field.
-
-2008-10-13  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* common.h (AT_BASE_PLATFORM, AT_EXECFN): Define.
-
-2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
-
-	* ppc.h: Add Tag_GNU_Power_ABI_Struct_Return.
-
-2008-10-04  Hans-Peter Nilsson  <hp@axis.com>
-
-	* cris.h (R_CRIS_32_GOT_GD, R_CRIS_16_GOT_GD, R_CRIS_32_GD)
-	(R_CRIS_DTP, R_CRIS_32_DTPREL, R_CRIS_16_DTPREL, R_CRIS_DTPMOD)
-	(R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL)
-	(R_CRIS_16_TPREL): New relocations.
-
-2008-08-20  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG)
-	(R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC)
-	(R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New.
-
-2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
-	    Daniel Jacobowitz  <dan@codesourcery.com>
-	    Catherine Moore  <clm@codesourcery.com>
-	    Mark Shinwell  <shinwell@codesourcery.com>
-
-	* mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
-	(STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.
-
-2008-08-04  Markus Weiss  <weissms@aros.org>
-
-	* common.h (ELFOSABI_AROS): Update comment.
-
-2008-07-26  Michael Eager <eager@eagercon.com>
-
-	* ppc.h: Add description of single-precision.
-
-2008-07-21  Luis Machado  <luisgpm@br.ibm.com>
-
-	* common.h: Define NT_PPC_VSX.
-
-2008-07-10  Richard Sandiford  <rdsandiford@googlemail.com>
-
-	* mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros.
-
-2008-06-18  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
-	* common.h (EM_CR16): Correct value.
-	(EM_CR16): Rename to EM_CR16_OLD.
-
-2008-06-12  DJ Delorie  <dj@redhat.com>
-
-	* common.h (EM_M32C_NEW): Rename to EM_M32C.
-	(EM_M32C): Rename to EM_M32C_OLD.
-
-2008-06-12  Joseph Myers  <joseph@codesourcery.com>
-
-	* common.h: Update e_machine table.
-
-2008-06-09  Takashi Yoshii  <yoshii.takashi@renesas.com>
-
-	* sh.h (EF_SH_BFD_TABLE): Set bfd_mach_sh for EF_SH_UNKNOWN.
-
-2008-06-09  Joseph Myers  <joseph@codesourcery.com>
-
-	* common.h: Change registry@caldera.com to registry@sco.com.
-
-2008-05-21  Nick Clifton  <nickc@redhat.com>
-
-	* reloc-macros.h: Add a comment about the use of the
-	END_RELOC_NUMBERS symbol as a sentinel value.
-
-2008-05-15  Christophe Lyon  <christophe.lyon@st.com>
-
-	* arm.h (END_RELOC_NUMBERS): Provide a maximum value.
-
-2008-04-16  David S. Miller  <davem@davemloft.net>
-
-	* elf/sparc.h (R_SPARC_GOTDATA_HIX22,
-	R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22,
-	R_SPARC_GOTDATA_OP_LOX10, R_SPARC_GOTDATA_OP,
-	R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_SIZE64): New relocs.
-
-2008-03-24  Ian Lance Taylor  <iant@google.com>
-
-	* common.h (NT_GNU_GOLD_VERSION): Define.
-
-2008-03-13  Alan Modra  <amodra@bigpond.net.au>
-
-	* internal.h (Elf_Internal_Shdr): Change sh_link and sh_info from
-	unsigned long to unsigned int.  Change sh_addralign to bfd_vma.
-	Order struct as for external version.
-
-2008-03-12  Alan Modra  <amodra@bigpond.net.au>
-
-	PR 5900
-	* common.h (SHN_BAD): Delete.
-	(SHN_LORESERVE .. SHN_HIRESERVE): Move to..
-	* external.h: ..here.
-	* internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define.
-	(SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define.
-	(SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define.
-
-2008-03-12  Alan Modra  <amodra@bigpond.net.au>
-
-	* cr16c.h (SHN_CR16C_FCOMMON): Define using SHN_LORESERVE.
-	(SHN_CR16C_NCOMMON): Likewise.
-	* hppa.h (SHN_PARISC_ANSI_COMMON): Likewise.
-	(SHN_PARISC_HUGE_COMMON): Likewise.
-	* ia64.h (SHN_IA_64_ANSI_COMMON): Likewise.
-	(SHN_IA_64_VMS_SYMVEC): Define using SHN_LOOS.
-	* m32r.h (SHN_M32R_SCOMMON): Define using SHN_LORESERVE.
-	* mips.h (SHN_MIPS_ACOMMON, SHN_MIPS_TEXT): Likewise.
-	(SHN_MIPS_DATA, SHN_MIPS_SCOMMON, SHN_MIPS_SUNDEFINED): Likewise.
-	* score.h (SHN_SCORE_TEXT, SHN_SCORE_DATA): Likewise.
-	(SHN_SCORE_SCOMMON): Likewise.
-	* sparc.h (SHN_BEFORE, SHN_AFTER): Likewise.
-	* v850.h (SHN_V850_SCOMMON, SHN_V850_TCOMMON): Likewise.
-	(SHN_V850_ZCOMMON): Likewise.
-	* x86-64.h (SHN_X86_64_LCOMMON): Likewise.
-
-2008-03-03  Pallavi Tambay  <pallavi.tambay@amd.com>
-
-	* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP:
-	DW_OP_PGI_omp_thread_num.
-
-2008-02-04  Adam Nemet  <anemet@caviumnetworks.com>
-
-	* mips.h: Update copyright.
-	(E_MIPS_MACH_OCTEON): New macro.
-
-2008-01-30  Tristan Gingold  <gingold@adacore.com>
-
-	Add OpenVMS extensions.
-	* ia64.h (SHF_IA_64_VMS_GLOBAL, SHF_IA_64_VMS_OVERLAID)
-	(SHF_IA_64_VMS_SHARED, SHF_IA_64_VMS_VECTOR)
-	(SHF_IA_64_VMS_ALLOC_64BIT, SHF_IA_64_VMS_PROTECTED)
-	(SHT_IA_64_VMS_TRACE, SHT_IA_64_VMS_TIE_SIGNATURES)
-	(SHT_IA_64_VMS_DEBUG, SHT_IA_64_VMS_DEBUG_STR)
-	(SHT_IA_64_VMS_LINKAGES, SHT_IA_64_VMS_SYMBOL_VECTOR)
-	(SHT_IA_64_VMS_FIXUP, DT_IA_64_VMS_SUBTYPE)
-	(DT_IA_64_VMS_IMGIOCNT, DT_IA_64_VMS_LNKFLAGS)
-	(DT_IA_64_VMS_VIR_MEM_BLK_SIZ, DT_IA_64_VMS_IDENT)
-	(DT_IA_64_VMS_NEEDED_IDENT, DT_IA_64_VMS_IMG_RELA_CNT)
-	(DT_IA_64_VMS_SEG_RELA_CNT, DT_IA_64_VMS_FIXUP_RELA_CNT)
-	(DT_IA_64_VMS_FIXUP_NEEDED, DT_IA_64_VMS_SYMVEC_CNT)
-	(DT_IA_64_VMS_XLATED, DT_IA_64_VMS_STACKSIZE)
-	(DT_IA_64_VMS_UNWINDSZ, DT_IA_64_VMS_UNWIND_CODSEG)
-	(DT_IA_64_VMS_UNWIND_INFOSEG, DT_IA_64_VMS_LINKTIME)
-	(DT_IA_64_VMS_SEG_NO, DT_IA_64_VMS_SYMVEC_OFFSET)
-	(DT_IA_64_VMS_SYMVEC_SEG, DT_IA_64_VMS_UNWIND_OFFSET)
-	(DT_IA_64_VMS_UNWIND_SEG, DT_IA_64_VMS_STRTAB_OFFSET)
-	(DT_IA_64_VMS_SYSVER_OFFSET, DT_IA_64_VMS_IMG_RELA_OFF)
-	(DT_IA_64_VMS_SEG_RELA_OFF, DT_IA_64_VMS_FIXUP_RELA_OFF)
-	(DT_IA_64_VMS_PLTGOT_OFFSET, DT_IA_64_VMS_PLTGOT_SEG)
-	(DT_IA_64_VMS_FPMODE, SHN_IA_64_VMS_SYMVEC): Define
-
-2008-01-16  Mark Kettenis  <kettenis@gnu.org>
-
-	* common.h (AT_SUN_AUXFLAGS): Define.
-
-2007-12-11  Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* dwarf2.h (DW_AT_hi_user): Correct value.
-
-2007-12-07  Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa.h (R_XTENSA_32_PCREL): New.
-
-2007-11-29  Mark Shinwell  <shinwell@codesourcery.com>
-
-	* mips.h (E_MIPS_MACH_LS2E): New.
-	(E_MIPS_MACH_LS2F): New.
-
-2007-11-28  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with
-	segments at the end of memory.
-
-2007-11-17  Thiemo Seufer  <ths@mips.com>
-
-	* mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant
-	in comment.
-
-2007-11-16  Nick Clifton  <nickc@redhat.com>
-
-	* dwarf2.h: Mention the location of the DWARF3 spec on the web.
-	(DW_AT_stride_size): Rename to DW_AT_bit_stride.
-	(DW_AT_stride): Rename to DW_AT_byte_stride.
-
-2007-11-08  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* vxworks.h: New.
-
-2007-10-30  Nick Clifton  <nickc@redhat.com>
-
-	* mn10300.h (R_MN10300_ALIGN): Define.
-
-2007-10-25  Daniel Jacobowitz  <dan@codesourcery.com>
-
-	* ppc.h (Tag_GNU_Power_ABI_Vector): New.
-
-2007-10-19  Nick Clifton  <nickc@redhat.com>
-
-	* mn10300.h: Add R_MN10300_SYM_DIFF reloc.
-
-2007-10-18  Roland McGrath  <roland@redhat.com>
-
-	* common.h (NT_PPC_VMX): New macro.
-
-2007-10-01  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
-	* cr16.h: Updated with new relocaction macros.
-
-2007-09-17  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/3281
-	PR binutils/5037
-	* internal.h (elf_segment_map): Add p_size and p_size_valid.
-	(ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in
-	PT_GNU_RELRO segments.
-
-2007-09-11  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* m68k.h (EF_M68K_CF_ISA_C_NODIV): New.
-
-2007-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
-
-	* common.h (NT_SPU): Define.
-
-2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h: Revert last change.
-
-2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* common.h (PT_GNU_STACK): Renamed to ...
-	(PT_GNU_ATTR): This.
-	(PT_GNU_STACK): New.  Make an alias of PT_GNU_ATTR.
-
-2007-07-09  Roland McGrath  <roland@redhat.com>
-
-	* common.h (NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros.
-
-2007-06-29  Joseph Myers  <joseph@codesourcery.com>
-
-	* ppc.h (Tag_GNU_Power_ABI_FP): Define.
-
-2007-06-29  Joseph Myers  <joseph@codesourcery.com>
-
-	* mips.h (Tag_GNU_MIPS_ABI_FP): Define.
-
-2007-06-29  Joseph Myers  <joseph@codesourcery.com>
-
-	* arm.h (elf32_arm_add_eabi_attr_int,
-	elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
-	elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
-	elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
-	Tag_Symbol, Tag_compatibility): Remove.
-	* common.h (SHT_GNU_ATTRIBUTES): Define.
-
-2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
-
-	* common.h (EM_CR16): New entry for CR16 cpu.
-	* cr16.h: New file.
-
-2007-06-11  Sterling Augustine  <sterling@tensilica.com>
-	    Bob Wilson  <bob.wilson@acm.org>
-
-	* xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
-	(XTENSA_PROP_NO_TRANSFORM): ...this.
-
-2007-05-18  Caroline Tice  <ctice@apple.com>
-
-	* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP,
-	DW_OP_GNU_uninit.
-
-2007-05-12  Alan Modra  <amodra@bigpond.net.au>
-
-	* spu.h (R_SPU_ADDR16X): Define.
-	(R_SPU_PPU32, R_SPU_PPU64): Renumber.
-
-2007-05-11  Alan Modra  <amodra@bigpond.net.au>
-
-	* spu.h (R_SPU_PPU32, R_SPU_PPU64): Define.
-
-2007-05-02  Alan Modra  <amodra@bigpond.net.au>
-
-	* internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
-	and vma for appropriate sections.
-
-2007-04-26  Jan Beulich  <jbeulich@novell.com>
-
-	* common.h (DT_ENCODING): Correct value (back to spec mandated
-	value).
-
-2007-03-08  Alan Modra  <amodra@bigpond.net.au>
-
-	* v850.h (V850_OTHER_TDA_BYTE): Delete.
-	(V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits
-	that don't clash with visibility bits.
-
-2007-03-07  Alan Modra  <amodra@bigpond.net.au>
-
-	* common.h (ELF_ST_VISIBILITY): Comment typo fix.
-
-2007-02-05  Dave Brolley  <brolley@redhat.com>
-	    Richard Sandiford  <rsandifo@redhat.com>
-	    Richard Henderson  <rth@redhat.com>
-	    DJ Delorie  <dj@redhat.com>
-	    Ben Elliston  <bje@redhat.com>
-
-	* mep.h: New file.
-	* common.h (EM_CYGNUS_MEP): Define.
-
-2007-02-15  Dave Brolley  <brolley@redhat.com>
-
-	From Graydon Hoare  <graydon@redhat.com>:
-	* common.h (STT_RELC, STT_SRELC, R_RELC): New macros.
-
-2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
-
-	* m68k.h (EF_M68K_FIDO): New.
-	(EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
-	(EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.
-
-2006-12-25  Kazu Hirata  <kazu@codesourcery.com>
-
-	* m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New.
-
-2006-12-19  Kazu Hirata  <kazu@codesourcery.com>
-
-	* m68k.h (EF_M68K_ARCH_MASK): New.
-
-2006-12-19  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* internal.h (struct elf_segment_map): Add p_vaddr_offset field.
-
-2006-12-07  Kazu Hirata  <kazu@codesourcery.com>
-
-	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV,
-	EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP,
-	EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC,
-	EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to
-	EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A,
-	EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP,
-	EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK,
-	EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B,
-	EF_M68K_CF_FLOAT, respectively.
-
-2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
-	    Nick Clifton  <nickc@redhat.com>
-
-	* external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED.
-
-2006-10-28  Richard Sandiford  <richard@codesourcery.com>
-
-	* mips.h (R_MIPS_GLOB_DAT): Define
-	(R_MIPS_max): Bump by 1.
-
-2006-10-25  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
-	    Yukishige Shibata  <shibata@rd.scei.sony.co.jp>
-	    Nobuhisa Fujinami  <fnami@rd.scei.sony.co.jp>
-	    Takeaki Fukuoka  <fukuoka@rd.scei.sony.co.jp>
-	    Alan Modra  <amodra@bigpond.net.au>
-
-	* common.h (EM_SPU): Define.
-	* spu.h: New file.
-
-2006-10-19  Mei Ligang  <ligang@sunnorth.com.cn>
-
-	* score.h (EF_SCORE_PIC): Redefine EF_SCORE_PIC as 0x80000000.
-	(EF_SCORE_FIXDEP): Redefine EF_SCORE_FIXDEP as 0x40000000.
-	(EF_SCORE_HASENTRY): Delete.
-
-2006-10-17  Mark Shinwell  <shinwell@codesourcery.com>
-
-	* arm.h: Define TAG_CPU_ARCH_* constants.
-
-2006-09-17  Mei Ligang  <ligang@sunnorth.com.cn>
-
-	* score.h: New file.
-	* common.h: Add Score machine number.
-
-2006-07-10  Jakub Jelinek  <jakub@redhat.com>
-
-	* common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
-
-2006-05-31  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* internal.h (ELF_SECTION_SIZE): New.
-	(ELF_IS_SECTION_IN_SEGMENT): Likewise.
-	(ELF_IS_SECTION_IN_SEGMENT_FILE): Updated.
-	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
-
-2006-05-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* internal.h (struct elf_segment_map): Add p_align and p_align_valid.
-
-2006-05-24  Carlos O'Donell  <carlos@systemhalted.org>
-	    Randolph Chung  <randolph@tausq.org>
-	* hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL,
-	R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL,
-	R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32,
-	R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64):
-	New TLS relocs.
-	(R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L,
-	R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64):
-	Define TLS relocs using existing equivalents.
-
-2006-05-24  Bjoern Haase  <bjoern.m.haase@web.de>
-
-	* avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS.
-
-2006-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
-
-	* bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO,
-	R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4,  R_BFIN_FUNCDESC_GOTHI,
-	R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE,
-	R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI,
-	R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI,
-	R_BFIN_GOTOFFLO): New relocs.
-	(EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
-
-2006-03-23  Michael Matz  <matz@suse.de>
-
-	* x86-64.h: Add the new relocations with their official
-	numbers.
-
-2006-03-22  Richard Sandiford  <richard@codesourcery.com>
-	    Daniel Jacobowitz  <dan@codesourcery.com>
-	    Phil Edwards  <phil@codesourcery.com>
-	    Zack Weinberg  <zack@codesourcery.com>
-	    Mark Mitchell  <mark@codesourcery.com>
-	    Nathan Sidwell  <nathan@codesourcery.com>
-
-	* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
-
-2006-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED,
-	SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON,
-	SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT,
-	SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT,
-	SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define.
-
-2006-03-10  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h (EF_ARM_EABI_VER5): Define.
-
-2006-03-06  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
-	EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
-	(EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
-	(EF_M68K_HW_DIV, EF_M68K_USP): Remove.
-	(EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
-	(EF_M68K_EMAC_B): New.
-
-2006-03-03  Bjoern Haase  <bjoern.m.haase@web.de>
-
-	* avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add.
-	(EF_AVR_LINKRELAX_PREPARED): Add.
-
-2006-03-02  Ben Elliston  <bje@au.ibm.com>
-
-	Import from the GCC tree:
-	2006-03-01  Jakub Jelinek  <jakub@redhat.com>
-
-	* dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
-	from DWARF 3.
-	(DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
-	DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
-	DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
-	DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
-	DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
-	(DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
-	(DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
-	DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
-	(DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
-	DW_DS_leading_separate, DW_DS_trailing_separate): New.
-	(DW_END_default, DW_END_big, DW_END_little): New.
-	(DW_END_lo_user, DW_END_hi_user): Define.
-	(DW_LNE_lo_user, DW_LNE_hi_user): Define.
-	(DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
-	(DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
-	DW_LANG_D): New.
-
-2006-02-06  Steve Ellcey  <sje@cup.hp.com>
-
-	* ia64.h (SHF_IA_64_HP_TLS): New.
-
-2006-02-24  DJ Delorie  <dj@redhat.com>
-
-	* m32c.h: Add relax relocs.
-
-2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
-            Anil Paranjape   <anilp1@kpitcummins.com>
-            Shilin Shakti    <shilins@kpitcummins.com>
-
-	* common.h (EM_XC16X): New entry for xc16x cpu.
-	Sort other EM_* numbers into numerical order.
-	* xc16x.h: New file.
-
-2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR binutils/2258
-	* internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New.
-	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
-
-2006-02-07  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ...
-	(EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here.
-	(EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS,
-	EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC,
-	EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New.
-
-2006-02-06  Steve Ellcey  <sje@cup.hp.com>
-
-	* ia64.h (SHF_IA_64_HP_TLS): New.
-
-2006-01-18  Alexandre Oliva  <aoliva@redhat.com>
-
-	Introduce TLS descriptors for i386 and x86_64.
-	* common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
-	* i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
-	New.
-	* x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
-	R_X86_64_TLSDESC): New.
-
-2006-01-09  Mike Frysinger  <vapier@gentoo.org>:
-
-	* common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define.
-
-2005-12-16  Nathan Sidwell  <nathan@codesourcery.com>
-
-	Second part of ms1 to mt renaming.
-	* common.h (EM_MT): Renamed.
-	* mt.h: Rename relocs, cpu & other defines.
-
-2005-12-12  Nathan Sidwell  <nathan@codesourcery.com>
-
-	* mt.h: Renamed from ms1.h
-
-2005-12-12  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h (elf32_arm_get_eabi_attr_int): Add prototype.
-
-2005-11-11  Nick Clifton  <nickc@redhat.com>
-
-	PR 1150
-	* mips.h (STO_OPTIONAL): Define.
-	(ELF_MIPS_IS_OPTIONAL): Define.
-
-2005-11-07  Nathan Sidwell  <nathan@codesourcery.com>
-
-	Add ms2.
-	* ms1.h (EF_MS1_CPU_MS2): New.
-
-2005-11-06  John David Anglin  <dave.anglin@nrc-crnc.gc.ca>
-
-	* hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs.
-
-2005-09-30  Catherine Moore  <clm@cm00re.com>
-
-	* bfin.h: New file.
-	* common.h (EM_BLACKFIN): Define.
-
-2005-10-08  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h: Add prototypes for BFD object attribute routines.
-
-2005-09-09  Richard Earnshaw  <richard.earnshaw@arm.com>
-
-	* arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.
-
-2005-08-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER):
-	New defines.
-
-2005-08-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
-
-	* hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines.
-	(PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New
-	deprecated defines.
-	(DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS,
-	DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT,
-	DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST,
-	DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP,
-	DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT,
-	PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT,
-	NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED,
-	NT_HP_UX_OPTIONS): Define.
-
-2005-07-25  DJ Delorie  <dj@redhat.com>
-
-	* m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.
-
-2005-07-25  Jan Hubicka  <jh@suse.cz>
-
-	* x86-64.h (SHN_X86_64_LCOMMON): New.
-	(SHF_X86_64_LARGE): New.
-
-2005-07-20  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
-
-	* m32r.h (R_M32R_REL32): Added.
-
-2005-07-18  Ben Elliston  <bje@au.ibm.com>
-
-	* dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float.
-	Replace with DW_ATE_decimal_float (now in DWARF 3).
-
-2005-07-14  Jim Blandy  <jimb@redhat.com>
-
-	Add support for Renesas M32C and M16C.
-	* common.h (EM_M32C): New machine number.
-	* m32c.h: New file.
-
-2005-06-17  Jakub Jelinek  <jakub@redhat.com>
-
-	* external.h (GRP_ENTRY_SIZE): Define.
-
-2005-06-17  Jan Beulich  <jbeulich@novell.com>
-
-	* x86-64.h (elf_x86_64_reloc_type): Adjust comment for
-	R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and
-	R_X86_64_GOTPC32.
-
-2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
-	    Michael Snyder  <msnyder@redhat.com>
-	    Stan Cox  <scox@redhat.com>
-
-	* common.h (EM_MS1): Define.
-
-	* ms1.h: New file.
-
-2005-05-31  Richard Henderson  <rth@redhat.com>
-
-	* alpha.h (LITUSE_ALPHA_JSRDIRECT): New.
-
-2005-05-29  Richard Henderson  <rth@redhat.com>
-
-	* alpha.h (DT_ALPHA_PLTRO): New.
-
-2005-05-19  Ben Elliston  <bje@au.ibm.com>
-
-	* dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from
-	the user-defined encoding space pending inclusion in the standard.
-
-2005-05-18  Zack Weinberg  <zack@codesourcery.com>
-
-	* arm.h: Make all #ifndef OLD_ARM_ABI blocks
-	unconditional, delete all #ifdef OLD_ARM_ABI blocks.
-
-2005-05-17  Zack Weinberg  <zack@codesourcery.com>
-
-	* arm.h: Import complete list of official relocation names
-	and numbers from AAELF.  Define FAKE_RELOCs for old names.
-	Remove a few old names no longer used anywhere.
-
-2005-05-14  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
-
-2005-05-11  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
-	R_PPC_RELAX32PC_PLT) Adjust.
-	(R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define.
-	(DT_PPC_GLINK): Define.
-
-2005-05-10  Nick Clifton  <nickc@redhat.com>
-
-	* Update the address and phone number of the FSF organization in
-	the GPL notices in the following files:
-	alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h,
-	d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h,
-	frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h,
-	internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h,
-	mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h,
-	or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h,
-	sparc.h, v850.h,  vax.h, x86-64.h, xstormy16.h,	xtensa.h
-
-2005-04-13  H.J. Lu  <hongjiu.lu@intel.com>
-
-	Moved from ../ChangeLog
-
-	2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
-	* arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
-
-	2004-10-12  Paul Brook  <paul@codesourcery.com>
-	* arm.h (EF_ARM_EABI_VER4): Define.
-
-	2004-10-08  Daniel Jacobowitz  <dan@debian.org>
-
-	* common.h (PT_SUNW_EH_FRAME): Define.
-	* x86-64.h (SHT_X86_64_UNWIND): Define.
-
-	2004-10-07  Bob Wilson  <bob.wilson@acm.org>
-	* xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32,
-	R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations.
-	(XTENSA_PROP_SEC_NAME): Define.
-	(property_table_entry): Add flags field.
-	(XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define.
-
-	2004-09-17  Paul Brook  <paul@codesourcery.com>
-	* arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK.
-	Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL,
-	R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX.
-
-	2004-09-13  Paul Brook  <paul@codesourcery.com>
-	* arm.h: Rename RELABS to TARGET1.
-
-	2004-05-11  Jakub Jelinek  <jakub@redhat.com>
-	* common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
-	(PT_GNU_RELRO): Define.
-
-2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
-	    Phil Blundell  <philb@gnu.org>
-
-	* arm.h: Add TLS relocations.
-
-2005-03-23  Ben Elliston  <bje@au.ibm.com>
-
-	* dwarf.h: Merge with GCC's dwarf.h.
-
-2005-03-18  C Jaipraash  <cjaiprakash@noida.hcltech.com>
-
-	* m68k.h (EF_CFV4E): Define.
-
-2005-03-17  Paul Brook <paul@codesourcery.com>
-	    Dan Jacobowitz <dan@codesourcery.com>
-	    Mark Mitchell  <mark@codesourcery.com>
-
-	* arm.h (PT_ARM_EXIDX): Define.
-
-2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
-	    Joseph Myers  <joseph@codesourcery.com>
-
-	* mips.h: Define MIPS TLS relocations.
-
-2005-02-15  Nigel Stephens  <nigel@mips.com>
-	    Maciej W. Rozycki  <macro@mips.com>
-
-	* mips.h (R_MIPS16_GOT16): New reloc code.
-	(R_MIPS16_CALL16): Likewise.
-	(R_MIPS16_HI16): Likewise.
-	(R_MIPS16_LO16): Likewise.
-	(R_MIPS16_min): New fake reloc code.
-	(R_MIPS16_max): Likewise.
-
-2005-02-11  Maciej W. Rozycki  <macro@mips.com>
-
-	* mips.h (R_MIPS_max): Use FAKE_RELOC to define.
-
-2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
-
-	2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
-	* frv.h: Add R_FRV_TLSMOFF.
-	2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
-	* frv.h: Add TLS relocations.
-
-2005-01-17  Nick Clifton  <nickc@redhat.com>
-
-	* sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4,
-	EF_SH2A_SH3E): New flags.
-	(EF_SH_BFD_TABLE): Add these new flags to the table.
-
-2005-01-12  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
-	(R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
-
-2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
-
-	* avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs.
-
-2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
-
-	* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.
-
-2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
-
-	* mips.h (E_MIPS_MACH_9000): Define.
-
-2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
-
-	* cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10)
-	(EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New
-	macros.
-
-2004-10-06  Eric Christopher  <echristo@redhat.com>
-
-	* dwarf2.h: Sync with gcc dwarf2.h. Fix typo.
-
-2004-10-01  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h (SHT_ARM_EXIDX): Define.
-	(ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind,
-	ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once):
-	Define.
-
-2004-08-25  Dmitry Diky  <diwil@spec.ru>
-
-	* msp430.h: Add new relocs.
-
-2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* i386.h (R_386_USED_BY_INTEL_200): New.
-
-2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
-
-	Introduce SH2a support.
-	2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
-	* sh.h (EF_SH2A_NOFPU): New.
-	2003-12-01  Michael Snyder  <msnyder@redhat.com>
-	* sh.h (EF_SH2A): New.
-
-2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
-
-	* crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
-	BFD_RELOC_CRX_SWITCH32.
-
-2004-07-06  Tomer Levi  <Tomer.Levi@nsc.com>
-
-	* common.h (EM_CRX): Define.
-	* crx.h: New file.
-
-2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
-
-	* m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
-	R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
-
-2004-06-19  Alan Modra  <amodra@bigpond.net.au>
-
-	* common.h (ELF64_R_INFO): Warning fix.
-
-2004-06-14  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
-	with an updated comment.
-
-2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
-
-	* sh.h (EF_SH_HAS_DSP): Remove.
-	(EF_SH_HAS_FP): Remove.
-	(EF_SH_MERGE_MACH): Remove.
-	(EF_SH4_NOFPU): Convert to decimal.
-	(EF_SH4A_NOFPU): Likewise.
-	(EF_SH4_NOMMU_NOFPU): Likewise.
-	(EF_SH3_NOMMU): Add new macro.
-	(EF_SH_BFD_TABLE): Likewise.
-	(sh_find_elf_flags): Add prototype.
-	(sh_elf_get_flags_from_mach): Likewise.
-
-2004-04-24  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
-	(R_MIPS_GNU_REL_HI16): Remove.
-	(R_MIPS_GNU_REL16_S2): Update comment.
-
-2004-30-30  Galit Heller  <Galit.Heller@nsc.com>
-	    Tomer Levi  <Tomer.Levi@nsc.com>
-
-	* common.h (EM_CR): Define.
-	* cr16c.h: New file.
-
-2004-03-23  Paul Brook  <paul@codesourcery.com>
-
-	* arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
-
-2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
-
-	* sh.h: Add EF_SH4_NOMMU_NOFPU.
-
-2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
-
-	* frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define.
-
-2004-01-28  Roland McGrath  <roland@redhat.com>
-
-	* common.h (AT_SECURE): New macro.
-
-2004-01-21  Roland McGrath  <roland@redhat.com>
-
-	* common.h (AT_SUN_UID, AT_SUN_RUID, AT_SUN_GID): New macros.
-	(AT_SUN_RGID, AT_SUN_LDELF, AT_SUN_LDSHDR, AT_SUN_LDNAME,
-	AT_SUN_LPAGESZ, AT_SUN_PLATFORM, AT_SUN_HWCAP, AT_SUN_IFLUSH,
-	AT_SUN_CPU, AT_SUN_EMUL_ENTRY, AT_SUN_EMUL_EXECFD,
-	AT_SUN_EXECNAME) AT_SUN_MMU, AT_SUN_LDDATA): Likewise.
-
-2004-01-17  Mark Kettenis  <kettenis@gnu.org>
-
-	* common.h (NT_OPENBSD_IDENT): Define.
-
-2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
-
-	2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
-	* frv.h (EF_FRV_FDPIC): New macro.
-	(EF_FRV_PIC_FLAGS): Adjust.
-	2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
-	* frv.h (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
-	R_FRV_FUNCDESC_GOTOFFLO, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_GOTOFF12,
-	R_FRV_GOTOFFLO, R_FRV_GOTOFFHI): New.
-	2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
-	* frv.h (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC,
-	R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO):
-	New.
-
-
-For older changes see ChangeLog-9103
-
-Copyright (C) 2004-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ChangeLog-0415 ./include/elf/ChangeLog-0415
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ChangeLog-0415	1970-01-01 00:00:00.000000000 +0000
+++ ./include/elf/ChangeLog-0415	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,2348 @@
+2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm.h (TAG_CPU_ARCH_V8M_BASE): Declare.
+
+2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm.h (TAG_CPU_ARCH_V8M_MAIN): Declare.
+	(MAX_TAG_CPU_ARCH): Define to TAG_CPU_ARCH_V8M_MAIN.
+	(TAG_CPU_ARCH_V4T_PLUS_V6_M): Define to unused value 15.
+
+2015-12-22 Mickael Guene <mickael.guene@st.com>
+
+	* arm.h: Add arm SHF_ARM_NOREAD section flag.
+
+2015-12-16  Mickael Guene <mickael.guene@st.com>
+
+	* arm.h: Add new arm relocations.
+
+2015-12-14  Yoshinori Sato <ysato@users.sourceforge.jp>
+
+	* rx.h (E_FLAG_RX_V2): New RXv2 type.
+
+2015-12-07  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (R_PPC64_ENTRY): Define.
+
+2015-11-11  Alan Modra  <amodra@gmail.com>
+	    Peter Bergner <bergner@vnet.ibm.com>
+
+	* ppc.h (R_PPC_REL16DX_HA): New reloction.
+	* ppc64.h (R_PPC64_REL16DX_HA): Likewise.
+
+2015-10-28  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* arc-reloc.def (ARC_32_PCREL): New definition.
+	(ARC_TLS_DTPOFF): Arrange it in order.
+
+2015-10-27  Stephen Fisher  <sfisher@panix.com>
+
+	* common.h (NT_NETBSD_MARCH): Define.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* x86-64.h (R_X86_64_GOTPCRELX): New.
+	(R_X86_64_REX_GOTPCRELX): Likewise.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* i386.h (R_386_GOT32X): New relocation.
+
+2015-10-07  Cupertino Miranda  <cmiranda@synopsys.com>
+
+	* arc-reloc.def: Macro file with definition of all relocation
+	types.
+	* arc.h: Changed macros for the newly supported ARC cpus.  Altered
+	enum defining the supported relocations.
+	* common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added
+	macro for EM_ARC_COMPACT2.
+
+2015-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* common.h (DF_1_STUB, DF_1_PIE): Define.
+
+2015-09-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* external.h (Elf64_External_Chdr): Change ch_type to 4 bytes
+	and add ch_reserved.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12): Define.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_TLSLD_ADD_LO12_NC): Define.
+
+2015-08-11  Jiong Wang  <jiong.wang@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_TLSLD_ADR_PAGE21): Define.
+
+2015-07-16  Jiong Wang  <jiong.wang@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_TLSLD_ADR_PREL21): New enumeration.
+
+2015-07-09  Catherine Moore  <clm@codesourcery.com>
+
+	* mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New.
+
+2015-07-08  Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+
+	* avr.h: Add new 32 bit PC relative relocation.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2.h (R_NIOS2_R2_S12): New.
+	(R_NIOS2_R2_I10_1_PCREL): New.
+	(R_NIOS2_R2_T1I7_1_PCREL): New.
+	(R_NIOS2_R2_T1I7_2): New.
+	(R_NIOS2_R2_T2I4): New.
+	(R_NIOS2_R2_T2I4_1): New.
+	(R_NIOS2_R2_T2I4_2): New.
+	(R_NIOS2_R2_X1I7_2): New.
+	(R_NIOS2_R2_X2L5): New.
+	(R_NIOS2_R2_F1I5_2): New.
+	(R_NIOS2_R2_L5I4X1): New.
+	(R_NIOS2_R2_T1X1I6): New.
+	(R_NIOS2_R2_T1X1I6_2): New.
+	(R_NIOS2_ILLEGAL): Renumber.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define.
+
+2015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* mips.h (DT_MIPS_RLD_MAP_REL): New macro.
+
+2015-05-29  Roland McGrath  <mcgrathr@google.com>
+
+	* common.h (GNU_ABI_TAG_SYLLABLE): New macro.
+	(GNU_ABI_TAG_NACL): New macro.
+
+2015-05-12  Jiong Wang  <jiong.wang@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_LD32_GOTPAGE_LO14): New enumeration.
+
+2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_486): Renamed to ...
+	(EM_IAMCU): This.
+
+2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+	* s390.h: Define Tag_GNU_S390_ABI_Vector.
+
+2015-04-24  Alan Modra  <amodra@gmail.com>
+
+	* internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and
+	similar segments only contain alloc sections.
+
+2015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/18316
+	* mep.h (SEC_MEP_VLIW): Removed.
+
+2015-04-09  Nick Clifton  <nickc@redhat.com>
+
+	* rx.h (E_FLAG_RX_SINSNS_SET): New bit in e_flags field.
+	(E_FLAG_RX_SINSNS_YES): Likewise.
+	(E_FLAG_RX_SINSNS_MASK): New define.
+
+2015-04-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* external.h (Elf32_External_Chdr): New.
+	(Elf64_External_Chdr): Likewise.
+	* internal.h (Elf_Internal_Chdr): Likewise.
+
+2015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (ELFOSABI_CLOUDABI): New.
+	(SHF_COMPRESSED): Likewise.
+	(ELFCOMPRESS_ZLIB): Likewise.
+	(ELFCOMPRESS_LOOS): Likewise.
+	(ELFCOMPRESS_HIOS): Likewise.
+	(ELFCOMPRESS_LOPROC): Likewise.
+	(ELFCOMPRESS_HIPROC): Likewise.
+
+2015-03-19  Nick Clifton  <nickc@redhat.com>
+
+	* rl78.h (E_FLAG_RL78_G10): Redefine.
+	(E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13
+	E_FLAG_RL78_G14): New flags.
+
+2015-03-10  Matthew Wahab  <matthew.wahab@arm.com>
+
+	PR ld/16572
+	* arm.h (EF_ARM_HASENTRY): Remove.
+
+2015-02-19  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* aarch64.h (R_AARCH64_P32_TLSGD_ADR_PREL21): Add.
+
+2015-02-24  Nick Clifton  <nickc@redhat.com>
+
+	* v850.h (EF_RH850_SIMD): Delete deprecated flag.
+	(EF_RH850_CACHE): Likewise.
+	(EF_RH850_MMU): Likewise.
+	(EF_RH850_DATA_ALIGN8): Likewise.
+	(SHT_RENESAS_IOP): Fix typo in name.
+	(SHT_RENESAS_INFO): Define.
+	(V850_NOTE_SECNAME): Define.
+	(SIZEOF_V850_NOTE): Define.
+	(V850_NOTE_NAME): Define.
+	(enum v850_notes): New enum.
+	(NUM_V850_NOTES): Define.
+
+2015-02-23  Nick Clifton  <nickc@redhat.com>
+
+	PR 17915
+	* score.h: Fix typo in license header.
+
+2015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* common.h (NT_S390_VXRS_LOW): New macro.
+	(NT_S390_VXRS_HIGH): Likewise.
+
+2015-01-28  James Bowman  <james.bowman@ftdichip.com>
+
+	* common.h (EM_FT32): Define.
+	* ft32.h: New file.
+
+2015-01-09  Anthony Green  <green@moxielogic.com>
+
+	* common.h (EM_MOXIE): Redefine to official number.
+	(EM_MOXIE_OLD): Define (from old number).
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values.
+
+2014-12-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* common.h (EM_VISIUM): Define.
+	* visium.h: New file.
+
+2014-11-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* x86-64.h (R_X86_64_GOTPLT64): Mark it obsolete.
+
+2014-10-30  Andrew Pinski  <apinski@cavium.com>
+
+	* mips.h (AFL_EXT_OCTEON3): Define.
+	(INSN_OCTEON3, CPU_OCTEON3): Define.
+
+2014-10-22  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* mips.h (AFL_ASE_MASK): Define.
+
+2014-10-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sparc.h (ELF_SPARC_HWCAP2_VIS3B): Documentation improved.
+
+2014-10-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sparc.h (Tag_GNU_Sparc_HWCAPS2): New object attribute.
+	(ELF_SPARC_HWCAP2_FJATHPLUS): New HWCAP2 bitmask value.
+	(ELF_SPARC_HWCAP2_VIS3B): Likewise.
+	(ELF_SPARC_HWCAP2_ADP): Likewise.
+	(ELF_SPARC_HWCAP2_SPARC5): Likewise.
+	(ELF_SPARC_HWCAP2_MWAIT): Likewise.
+	(ELF_SPARC_HWCAP2_XMPMUL): Likewise.
+	(ELF_SPARC_HWCAP2_XMONT): Likewise.
+	(ELF_SPARC_HWCAP2_NSEC): Likewise.
+	(ELF_SPARC_HWCAP2_FJATHHPC): Likewise.
+	(ELF_SPARC_HWCAP2_FJDES): Likewise.
+	(ELF_SPARC_HWCAP2_FJAES): Likewise.
+
+2014-10-08  Will Newton  <will.newton@linaro.org>
+
+	* aarch64.h: Sync up relocations with ABI release 1.0.
+
+2014-09-16  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* nds32.h: Declare new relocations.
+
+2014-09-15  Andrew Bennett  <andrew.bennett@imgtec.com>
+	    Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* mips.h: Add relocs: R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3,
+	R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
+	(E_MIPS_ARCH_32R6): New define.
+	(E_MIPS_ARCH_64R6): New define.
+
+2014-08-26  DJ Delorie  <dj@redhat.com>
+
+	* rl78.h (RL78_RELAXA_MASK): New.  Relax types are enums, not bits
+
+2014-07-29  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+	* mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define.
+	(Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64.
+	(Val_GNU_MIPS_ABI_FP_64): Redefine.
+	(Val_GNU_MIPS_ABI_FP_XX): Define.
+	(Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures.
+	(AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define.
+	(AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise.
+	(AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise.
+	(AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise.
+	(AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise.
+	(AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise.
+	(AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise.
+	(AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise.
+	(AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise.
+	(AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise.
+	(AFL_EXT_LOONGSON_2F): Likewise.
+	(bfd_mips_elf_swap_abiflags_v0_in): Prototype.
+	(bfd_mips_elf_swap_abiflags_v0_out): Likewise.
+	(bfd_mips_isa_ext): Likewise.
+
+2014-07-07  Barney Stratford  <barney_stratford@fastmail.fm>
+
+	* avr.h: Add R_AVR_PORT5 and R_AVR_PORT6.
+
+2014-07-01  Barney Stratford   <barney_stratford@fastmail.fm>
+	    Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+	    Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
+	    Soundararajan  <Sounderarajan.D@atmel.com>
+
+	* avr.h (E_AVR_MACH_AVRTINY): Define avrtiny machine number.
+	(R_AVR_LDS_STS_16): Define 16 bit lds/sts reloc number.
+	* include/opcode/avr.h (AVR_ISA_TINY): Define avrtiny specific ISA.
+	(AVR_ISA_2xxxa): Define ISA without LPM.
+	(AVR_ISA_AVRTINY): Define avrtiny arch ISA.
+	Add doc for contraint used in 16 bit lds/sts.
+	Adjust ISA group for icall, ijmp, pop and push.
+	Add 16 bit lds/sts encoding and update 32 bit lds/sts constraints.
+
+2014-04-22  Christian Svensson  <blue@cmd.nu>
+
+	* common.h: Remove openrisc and or32 support.  Add support for or1k.
+	* or1k.h: New file.
+	* openrisc.h: Delete.
+	* or32.h: Delete.
+
+2014-04-10  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+	* avr.h: Add new DIFF relocs.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define.
+
+2014-02-06  Andrew Pinski  <apinski@cavium.com>
+
+	* mips.h (E_MIPS_MACH_OCTEON3): New machine flag.
+
+2014-02-03  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2.h (R_NIOS2_GOT_LO, R_NIOS2_GOT_HA): New.
+	(R_NIOS2_CALL_LO, R_NIOS2_CALL_HA): New.
+	(R_NIOS2_ILLEGAL): Adjust.
+
+2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* nios2.h (elf_nios2_reloc_type): Add R_NIOS2_CALL26_NOAT.
+
+2014-01-30  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* common.h (AT_HWCAP2): Define.
+
+2013-12-13  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+	    Wei-Cheng Wang  <cole945@gmail.com>
+
+	* nds32.h: New file for Andes NDS32.
+
+2013-12-07  Mike Frysinger  <vapier@gentoo.org>
+
+	* epiphany.h: Remove +x file mode.
+
+2013-11-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND.
+
+2013-11-13  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* aarch64.h: Define R_AARCH64_TLS_DTPMOD64,
+	R_AARCH64_TLS_DTPREL64 and R_AARCH64_TLS_TPREL64; guard
+	R_AARCH64_TLS_DTPMOD, R_AARCH64_TLS_DTPREL and
+	R_AARCH64_TLS_TPREL with RELOC_MACROS_GEN_FUNC.
+
+2013-10-30  Alan Modra  <amodra@gmail.com>
+
+	* ppc.h (DT_PPC_TLSOPT): Delete.
+	(DT_PPC_OPT, PPC_OPT_TLS): Define.
+	* ppc64.h (DT_PPC64_TLSOPT): Delete.
+	(DT_PPC64_OPT, PPC64_OPT_TLS, PPC64_OPT_MULTI_TOC): Define.
+
+2013-10-30  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (STO_PPC64_LOCAL_BIT, STO_PPC64_LOCAL_MASK): Define.
+	(ppc64_decode_local_entry, ppc64_encode_local_entry): New functions.
+	(PPC64_LOCAL_ENTRY_OFFSET, PPC64_SET_LOCAL_ENTRY_OFFSET): Define.
+
+2013-10-30  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (EF_PPC64_ABI): Define.
+
+2013-10-30  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (R_PPC64_ADDR16_HIGH, R_PPC64_ADDR16_HIGHA,
+	R_PPC64_TPREL16_HIGH, R_PPC64_TPREL16_HIGHA,
+	R_PPC64_DTPREL16_HIGH, R_PPC64_DTPREL16_HIGHA): New.
+	(IS_PPC64_TLS_RELOC): Match new tls relocs.
+
+2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>
+
+	* mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA.
+	(enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128.
+
+2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>
+
+	* mips.h (EF_MIPS_FP64): New e_flags bit.
+
+2013-08-09  Nick Clifton  <nickc@redhat.com>
+
+	* rl78.c (E_FLAG_RL78_G10): Define.
+
+2013-07-15  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment.
+	(Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE,
+	Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT,
+	Val_GNU_MIPS_ABI_FP_64): New enum.
+
+2013-07-12  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (EF_MIPS_NAN2008): New macro.
+
+2013-07-08  Tristan Gingold  <gingold@adacore.com>
+
+	* ia64.h (STB_VMS_WEAK, STB_VMS_SYSTEM): Add.
+
+2013-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* s390.h: Add new relocs R_390_PC12DBL, R_390_PLT12DBL,
+	R_390_PC24DBL, and R_390_PLT24DBL.
+
+2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones.
+
+2013-06-24  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting.
+	(ELF_ST_SET_MIPS_PLT): Likewise.
+
+2013-06-19  Will Newton  <will.newton@linaro.org>
+
+	* aarch64.h: Remove R_AARCH64_IRELATIVE.
+
+2013-06-07  Will Newton  <will.newton@linaro.org>
+
+	* aarch64.h: Add R_AARCH64_IRELATIVE reloc.
+
+2013-06-06  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
+
+2013-05-30  Paul Brook  <paul@codesourcery.com>
+
+	* mips.h (R_MIPS_EH): New.
+
+2013-05-28  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* aarch64.h (R_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
+	(R_AARCH64_TLSDESC_LD_PREL19): ... this.
+	(R_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
+	(R_AARCH64_TLSDESC_ADR_PAGE21): ... this.
+
+2013-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_INTEL205): New.
+	(EM_INTEL206): Likewise.
+	(EM_INTEL207): Likewise.
+	(EM_INTEL208): Likewise.
+	(EM_INTEL209): Likewise.
+
+2013-05-06  Paul Brook  <paul@codesourcery.com>
+
+	* mips.h (R_MIPS_PC32): Update comment.
+
+2013-05-02  Nick Clifton  <nickc@redhat.com>
+
+	* msp430.h: Add MSP430X relocs.
+	Add some more MSP430 machine numbers.
+	Add values used by .MSP430.attributes section.
+
+2013-03-21  Michael Schewe  <michael.schewe@gmx.net>
+
+	* h8.h: Add new reloc R_H8_DISP32A16 for relaxation of
+	mov @(disp:32,ERx) to mov @(disp:16,ERx).
+
+2013-03-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+	* common.h (NT_S390_TDB): Define.
+
+2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
+	    Andrew Jenner <andrew@codesourcery.com>
+
+	Based on patches from Altera Corporation.
+
+	* nios2.h: New file.
+
+2013-01-24  Nick Clifton  <nickc@redhat.com>
+
+	* v850.h: Add support for e3v5 architecture.
+	Reorganize processor selection macros.
+
+2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* i386.h (R_386_SIZE32): Fill it.
+	* x86-64.h (R_X86_64_SIZE32): Likewise.
+	(R_X86_64_SIZE64): Likewise.
+
+2013-01-10  Will Newton <will.newton@imgtec.com>
+
+	* common.h: Fix case of "Meta".
+	* metag.h: New file.
+
+2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New macro
+	definitions.
+
+2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
+
+	* mips.h: Add MIPS machine variant number for r5900 which is
+	compatible with old Playstation 2 software.
+
+2012-12-11  Edgar E. Iglesias <edgar.iglesias@gmail.com>
+
+	* microblaze.h: Add TLS relocs to START_RELOC_NUMBERS
+
+2012-11-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (DF_1_CONLFAT): Renamed to ...
+	(DF_1_CONFALT): This.
+	(DF_1_ENDFILTEE): New.
+	(DF_1_DISPRELDNE): Likewise.
+	(DF_1_DISPRELPND): Likewise.
+	(DF_1_NODIRECT): Likewise.
+	(DF_1_IGNMULDEF): Likewise.
+	(DF_1_NOKSYMS): Likewise.
+	(DF_1_NOHDR): Likewise.
+	(DF_1_EDITED): Likewise.
+	(DF_1_NORELOC): Likewise.
+	(DF_1_SYMINTPOSE): Likewise.
+	(DF_1_GLOBAUDIT): Likewise.
+	(DF_1_SINGLETON): Likewise.
+
+2012-11-09  Nick Clifton  <nickc@redhat.com>
+
+	* rx.h (EF_RX_CPU_RX): Add comment.
+	(E_FLAG_RX_ABI): Define.
+
+	* v850.h: Add RH850 ABI values.
+
+2012-11-08  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (EF_MIPS_32BITMODE): Move next to lower-order bits.
+
+2012-11-01  Tom Tromey  <tromey@redhat.com>
+
+	* common.h (NT_386_TLS, NT_386_IOPERM): New defines.
+
+2012-10-30  Steve McIntyre  <steve.mcintyre@linaro.org>
+
+	* arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
+	(EF_ARM_ABI_FLOAT_HARD): Likewise.
+
+2012-10-23  Tom Tromey  <tromey@redhat.com>
+
+	* common.h (NT_SIGINFO, NT_FILE): New defines.
+
+2012-09-12  Chris Schlumberger-Socha  <chris.schlumberger-socha@arm.com>
+
+	* aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.
+
+2012-08-27  Walter Lee  <walt@tilera.com>
+
+	* tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation.
+	(R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL	): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto.
+
+2012-08-24  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+	* arm.h (TAG_CPU_ARCH_V8): New define.
+	(MAX_TAG_CPU_ARCH): Update.
+
+2012-08-13  Ian Bolton  <ian.bolton@arm.com>
+	    Laurent Desnogues  <laurent.desnogues@arm.com>
+	    Jim MacArthur  <jim.macarthur@arm.com>
+	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
+	    Nigel Stephens  <nigel.stephens@arm.com>
+	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+	    Richard Earnshaw  <rearnsha@arm.com>
+	    Sofiane Naci  <sofiane.naci@arm.com>
+	    Tejas Belagod  <tejas.belagod@arm.com>
+	    Yufeng Zhang  <yufeng.zhang@arm.com>
+
+	* aarch64.h: New file.
+	* common.h (EM_res183): Rename to EM_AARCH64.
+	(EM_res184): Rename to EM_ARM184.
+
+2012-08-02  Sean Keys  <skeys@ipdatasys.com>
+
+	* m68hc11.h: #define E_M68HC11_NO_BANK_WARNING 0x000000200
+
+2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc.
+
+2012-06-28  Iain Sandoe  <iain@codesourcery.com>
+
+	* common.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE,
+	AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New defines.
+
+2012-05-16  Georg-Johann Lay  <avr@gjlay.de>
+
+	PR target/13503
+	* avr.h (RELOC_NUMBERS): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8.
+
+2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
+
+	* m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10)
+	R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations.
+	(E_M68HC11_XGATE_RAMOFFSET): Define.
+
+2012-05-14  James Lemke  <jwlemke@codesourcery.com>
+	* ppc.h (SEC_PPC_VLE): Remove.
+
+2012-05-14  Catherine Moore  <clm@codesourcery.com>
+	    James Lemke  <jwlemke@codesourcery.com>
+
+	* ppc.h (R_PPC_VLE_REL8): New reloction.
+	(R_PPC_VLE_REL15): Likewise.
+	(R_PPC_VLE_REL24): Likewise.
+	(R_PPC_VLE_LO16A): Likewise.
+	(R_PPC_VLE_LO16D): Likewise.
+	(R_PPC_VLE_HI16A): Likewise.
+	(R_PPC_VLE_HI16D): Likewise.
+	(R_PPC_VLE_HA16A): Likewise.
+	(R_PPC_VLE_HA16D): Likewise.
+	(R_PPC_VLE_SDA21): Likewise.
+	(R_PPC_VLE_SDA21_LO): Likewise.
+	(R_PPC_VLE_SDAREL_LO16A): Likewise.
+	(R_PPC_VLE_SDAREL_LO16D): Likewise.
+	(R_PPC_VLE_SDAREL_HI16A): Likewise.
+	(R_PPC_VLE_SDAREL_HI16D): Likewise.
+	(R_PPC_VLE_SDAREL_HA16A): Likewise.
+	(R_PPC_VLE_SDAREL_HA16D): Likewise.
+	(SEC_PPC_VLE): Remove.
+	(PF_PPC_VLE): New program header flag.
+	(SHF_PPC_VLE): New section header flag.
+	(vle_opcodes, vle_num_opcodes): New.
+	(VLE_OP): New macro.
+	(VLE_OP_TO_SEG): New macro.
+
+2012-05-11  Georg-Johann Lay  <avr@gjlay.de
+
+	PR target/13503
+	* avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
+	R_AVR_8_HI8, R_AVR_8_HHI8.
+
+2012-05-03  Sean Keys  <skeys@ipdatasys.com>
+
+	* xgate.h: Mininal file to support XGATE relocations.
+
+2012-04-27  David S. Miller  <davem@davemloft.net>
+
+	* sparc.h: Add new ELF_SPARC_HWCAP_* defines for crypto,
+	pause, and compare-and-branch instructions.
+
+2012-04-12  David S. Miller  <davem@davemloft.net>
+
+	* sparc.h (R_SPARC_WDISP10): New reloc.
+
+2012-03-07  Nick Clifton  <nickc@redhat.com>
+
+	* mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
+	R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
+	R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
+	R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF.
+
+2012-02-25  Walter Lee  <walt@tilera.com>
+
+	* tilegx.h (R_TILEGX_IMM16_X0_HW1_GOT): Delete.
+	(R_TILEGX_IMM16_X1_HW1_GOT): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_GOT): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_GOT): Ditto.
+	(R_TILEGX_IMM16_X0_HW3_GOT): Ditto.
+	(R_TILEGX_IMM16_X1_HW3_GOT): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_LAST_GOT): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_LAST_GOT): Ditto.
+	(R_TILEGX_IMM16_X0_HW1_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X1_HW1_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X0_HW3_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X1_HW3_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD): Ditto.
+	(R_TILEGX_IMM16_X0_HW1_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X1_HW1_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X0_HW3_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X1_HW3_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE): Ditto.
+	(R_TILEGX_IMM16_X0_HW0_TLS_LE): New relocation.
+	(R_TILEGX_IMM16_X1_HW0_TLS_LE): Ditto.
+	(R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE): Ditto.
+	(R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE): Ditto.
+	(R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE): Ditto.
+	(R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE): Ditto.
+	(R_TILEGX_TLS_GD_CALL): Ditto.
+	(R_TILEGX_IMM8_X0_TLS_GD_ADD): Ditto.
+	(R_TILEGX_IMM8_X1_TLS_GD_ADD): Ditto.
+	(R_TILEGX_IMM8_Y0_TLS_GD_ADD): Ditto.
+	(R_TILEGX_IMM8_Y1_TLS_GD_ADD): Ditto.
+	(R_TILEGX_TLS_IE_LOAD): Ditto.
+	(R_TILEGX_IMM8_X0_TLS_ADD): Ditto.
+	(R_TILEGX_IMM8_X1_TLS_ADD): Ditto.
+	(R_TILEGX_IMM8_Y0_TLS_ADD): Ditto.
+	(R_TILEGX_IMM8_Y1_TLS_ADD): Ditto.
+	* tilepro.h (R_TILEPRO_TLS_GD_CALL): New relocation.
+	(R_TILEPRO_IMM8_X0_TLS_GD_ADD): Ditto.
+	(R_TILEPRO_IMM8_X1_TLS_GD_ADD): Ditto.
+	(R_TILEPRO_IMM8_Y0_TLS_GD_ADD): Ditto.
+	(R_TILEPRO_IMM8_Y1_TLS_GD_ADD): Ditto.
+	(R_TILEPRO_TLS_IE_LOAD): Ditto.
+	(R_TILEPRO_IMM16_X0_TLS_LE): Ditto.
+	(R_TILEPRO_IMM16_X1_TLS_LE): Ditto.
+	(R_TILEPRO_IMM16_X0_TLS_LE_LO): Ditto.
+	(R_TILEPRO_IMM16_X1_TLS_LE_LO): Ditto.
+	(R_TILEPRO_IMM16_X0_TLS_LE_HI): Ditto.
+	(R_TILEPRO_IMM16_X1_TLS_LE_HI): Ditto.
+	(R_TILEPRO_IMM16_X0_TLS_LE_HA): Ditto.
+	(R_TILEPRO_IMM16_X1_TLS_LE_HA): Ditto.
+
+2011-12-22  DJ Delorie  <dj@redhat.com>
+
+	* rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New.
+	(RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New.
+
+2011-12-19  Chung-Lin Tang  <cltang@codesourcery.com>
+
+	* mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries.
+
+2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* common.h (NT_S390_LAST_BREAK): Define.
+	(NT_S390_SYSTEM_CALL): Likewise.
+
+2011-11-01  DJ Delorie  <dj@redhat.com>
+
+	* common.h (EM_RL78, EM_78K0R): New.
+	* rl78.h: New.
+
+2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+	* epiphany.h: New file.
+	* common.h (EM_ADAPTEVA_EPIPHANY): Define.
+
+2011-10-10  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (R_PPC64_TOCSAVE): Add.
+
+2011-10-05  DJ Delorie  <dj@redhat.com>
+
+	* rx.h (E_FLAG_RX_PID): New.
+
+2011-09-21  David S. Miller  <davem@davemloft.net>
+
+	* sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute.
+	(ELF_SPARC_HWCAP_*): New HWCAPS bitmask values.
+
+2011-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/13082
+	* x86-64.h (R_X86_64_RELATIVE64): New.
+
+2011-07-24  Chao-ying Fu  <fu@mips.com>
+	    Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips.h (R_MICROMIPS_min): New relocations.
+	(R_MICROMIPS_26_S1): Likewise.
+	(R_MICROMIPS_HI16, R_MICROMIPS_LO16): Likewise.
+	(R_MICROMIPS_GPREL16, R_MICROMIPS_LITERAL): Likewise.
+	(R_MICROMIPS_GOT16, R_MICROMIPS_PC7_S1): Likewise.
+	(R_MICROMIPS_PC10_S1, R_MICROMIPS_PC16_S1): Likewise.
+	(R_MICROMIPS_CALL16, R_MICROMIPS_GOT_DISP): Likewise.
+	(R_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_OFST): Likewise.
+	(R_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_LO16): Likewise.
+	(R_MICROMIPS_SUB, R_MICROMIPS_HIGHER): Likewise.
+	(R_MICROMIPS_HIGHEST, R_MICROMIPS_CALL_HI16): Likewise.
+	(R_MICROMIPS_CALL_LO16, R_MICROMIPS_SCN_DISP): Likewise.
+	(R_MICROMIPS_JALR, R_MICROMIPS_HI0_LO16): Likewise.
+	(R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM): Likewise.
+	(R_MICROMIPS_TLS_DTPREL_HI, R_MICROMIPS_TLS_DTPREL_LO): Likewise.
+	(R_MICROMIPS_TLS_GOTTPREL): Likewise.
+	(R_MICROMIPS_TLS_TPREL_HI16): Likewise.
+	(R_MICROMIPS_TLS_TPREL_LO16): Likewise.
+	(R_MICROMIPS_GPREL7_S2, R_MICROMIPS_PC23_S2): Likewise.
+	(R_MICROMIPS_max): Likewise.
+	(EF_MIPS_ARCH_ASE_MICROMIPS): New macro.
+	(STO_MIPS_ISA, STO_MIPS_FLAGS): Likewise.
+	(ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT): Likewise.
+	(STO_MICROMIPS): Likewise.
+	(ELF_ST_IS_MICROMIPS, ELF_ST_SET_MICROMIPS): Likewise.
+	(ELF_ST_IS_COMPRESSED): Likewise.
+	(STO_MIPS_PLT, STO_MIPS_PIC): Rework.
+	(ELF_ST_IS_MIPS_PIC, ELF_ST_SET_MIPS_PIC): Likewise.
+	(STO_MIPS16, ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): Likewise.
+
+2011-07-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_K1OM): New.
+
+2011-07-03  Samuel Thibault  <samuel.thibault@gnu.org>
+	    Thomas Schwinge  <thomas@schwinge.name>
+
+	PR binutils/12913
+	* common.h (ELFOSABI_GNU): Define, replaces...
+	(ELFOSABI_LINUX): ... this, kept as an alias.
+	(ELFOSABI_HURD): Remove.
+
+2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+	* common.h (NT_ARM_VFP): Define.
+
+2011-06-13  Walter Lee  <walt@tilera.com>
+
+	* common.h: Add EM_TILEGX.
+	* tilegx.h: New file.
+	* tilepro.h: New file.
+
+2011-06-09  Tristan Gingold  <gingold@adacore.com>
+
+	* ia64.h (Elf64_External_VMS_ORIG_DYN_Note): New struct.
+
+2011-06-02  Nick Clifton  <nickc@redhat.com>
+
+	* common.h: Fix spelling mistake in comment.
+	* reloc-macros.h: Likewise.
+
+2011-05-31  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN.
+
+2011-05-09  Paul Brook  <paul@codesourcery.com>
+
+	* tic6x.h (ELF_STRING_C6000_unwind,
+	ELF_STRING_C6000_unwind_info, ELF_STRING_C6000_unwind_once,
+	ELF_STRING_C6000_unwind_info_once): Define.
+
+2011-04-15  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* common.h (NT_STAPSDT): New define.
+
+2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
+
+	* tic6x.h (R_C6000_JUMP_SPLOT, R_C6000_EHTYPE,
+	R_C6000_PCR_H16, R_C6000_PCR_L16): New relocs.
+	(SHN_TIC6X_SCOMMON): Define.
+
+2011-03-31  Tristan Gingold  <gingold@adacore.com>
+
+	* ia64.h (Elf64_External_VMS_Note): New struct.
+	(NT_VMS_MHD, NT_VMS_LNM, NT_VMS_SRC, NT_VMS_TITLE, NT_VMS_EIDC)
+	(NT_VMS_FPMODE, NT_VMS_LINKTIME, NT_VMS_IMGNAM, NT_VMS_IMGID)
+	(NT_VMS_LINKID, NT_VMS_IMGBID, NT_VMS_GSTNAM, NT_VMS_ORIG_DYN)
+	(NT_VMS_PATCHTIME) New macros.
+
+2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
+
+	* arm.h (R_ARM_IRELATIVE): New relocation.
+
+2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
+
+	* internal.h (elf_internal_sym): Add st_target_internal.
+	* arm.h (arm_st_branch_type): New enum.
+	(ARM_SYM_BRANCH_TYPE): New macro.
+
+2011-03-10  Nick Clifton  <nickc@redhat.com>
+
+	* common.h (EM_V850): V850s now supplied by Renesas.
+
+2011-02-25  Alan Modra  <amodra@gmail.com>
+
+	PR 12516
+	* internal.h (ELF_SECTION_IN_SEGMENT_1): Don't match zero size
+	sections at start or end of PT_DYNAMIC.
+
+2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
+	    Glauber de Oliveira Costa  <glommer@gmail.com>
+
+	* arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL,
+	R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New
+	relocations.
+
+2010-11-16  Jie Zhang  <jie.zhang@analog.com>
+
+	* bfin.h (EF_BFIN_CODE_IN_L1): Define.
+	(EF_BFIN_DATA_IN_L1): Define.
+
+2010-11-11  Mingming Sun  <mingm.sun@gmail.com>
+
+	* mips.h (E_MIPS_MACH_LS3A): Defined.
+
+2010-11-02  Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-attrs.h (Tag_ABI_wchar_t, Tag_ABI_stack_align_needed,
+	Tag_ABI_stack_align_preserved, Tag_ABI_PID, Tag_ABI_PIC,
+	Tag_ABI_array_object_alignment,
+	Tag_ABI_array_object_align_expected, Tag_ABI_conformance): Define.
+
+2010-10-29  Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-attrs.h (Tag_ABI_compatibility): Define.
+
+2010-10-29  Bernd Schmidt  <bernds@codesourcery.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-attrs.h (Tag_ABI_DSBT): New.
+
+2010-10-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-attrs.h (Tag_C6XABI_Tag_CPU_arch): Change to Tag_ISA,
+	value 4.
+	* tic6x.h (Values for Tag_C6XABI_Tag_CPU_arch): Rename for
+	attribute renaming.
+
+2010-07-23  Naveen.H.S  <naveen.S@kpitcummins.com>
+	    Ina Pandit  <ina.pandit@kpitcummins.com>
+
+	* v850.h: Add support for V850E2 and V850E2V3.
+	(v850_reloc_type): Update the newly added relocations
+
+2010-07-20  Alan Modra  <amodra@gmail.com>
+
+	* internal.h (ELF_TBSS_SPECIAL): New macro, extracted from..
+	(ELF_SECTION_SIZE): ..here.
+	(ELF_SECTION_IN_SEGMENT_1): Add "strict" arg.
+	(ELF_SECTION_IN_SEGMENT_STRICT): New macro.
+
+2010-06-25  Alan Modra  <amodra@gmail.com>
+
+	* ppc64.h (R_PPC64_LO_DS_OPT): Define.
+
+2010-06-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-attrs.h: New.
+	* tic6x.h: Include elf/tic6x-attrs.h for attribute table.
+	(C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X,
+	C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP,
+	C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP,
+	C6XABI_Tag_CPU_arch_C674X): Define.
+
+2010-06-11  Tristan Gingold  <gingold@adacore.com>
+
+	* ia64.h (EF_IA_64_VMS_COMCOD, EF_IA_64_VMS_COMCOD_SUCCESS)
+	(EF_IA_64_VMS_COMCOD_WARNING, EF_IA_64_VMS_COMCOD_ERROR)
+	(EF_IA_64_VMS_COMCOD_ABORT, EF_IA_64_VMS_LINKAGES): Define.
+	(VMS_LF_CALL_DEBUG, VMS_LF_NOP0BUFS, VMS_LF_P0IMAGE)
+	(VMS_LF_MKTHREADS, VMS_LF_UPCALLS, VMS_LF_IMGSTA)
+	(VMS_LF_INITIALIZE, VMS_LF_MAIN, VMS_LF_EXE_INIT)
+	(VMS_LF_TBK_IN_IMG, VMS_LF_DBG_IN_IMG, VMS_LF_TBK_IN_DSF)
+	(VMS_LF_DBG_IN_DSF, VMS_LF_SIGNATURES, VMS_LF_REL_SEG_OFF): Define.
+	(VMS_STO_VISIBILITY, VMS_ST_VISIBILITY, VMS_STO_FUNC_TYPE)
+	(VMS_ST_FUNC_TYPE, VMS_SFT_CODE_ADDR, VMS_SFT_SYMV_IDX)
+	(VMS_SFT_FD, VMS_SFT_RESERVE, VMS_STO_LINKAGE, VMS_ST_LINKAGE)
+	(VMS_STL_IGNORE, VMS_STL_RESERVE, VMS_STL_STD, VMS_STL_LNK): Define.
+	(Elf64_External_VMS_IMAGE_FIXUP): New declaration.
+	(Elf64_External_VMS_IMAGE_RELA): Ditto.
+	(R_IA64_VMS_DIR8, R_IA64_VMS_DIR16LSB, R_IA64_VMS_CALL_SIGNATURE)
+	(R_IA64_VMS_EXECLET_FUNC, R_IA64_VMS_EXECLET_DATA, R_IA64_VMS_FIX8)
+	(R_IA64_VMS_FIX16, R_IA64_VMS_FIX32, R_IA64_VMS_FIX64)
+	(R_IA64_VMS_FIXFD, R_IA64_VMS_ACC_LOAD, R_IA64_VMS_ACC_ADD)
+	(R_IA64_VMS_ACC_SUB, R_IA64_VMS_ACC_MUL, R_IA64_VMS_ACC_DIV)
+	(R_IA64_VMS_ACC_AND, R_IA64_VMS_ACC_IOR, R_IA64_VMS_ACC_EOR)
+	(R_IA64_VMS_ACC_ASH, R_IA64_VMS_ACC_STO8, R_IA64_VMS_ACC_STO16LSH)
+	(R_IA64_VMS_ACC_STO32LSH, R_IA64_VMS_ACC_STO64LSH): New.
+
+2010-05-25  Daniel Jacobowitz  <dan@codesourcery.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+	    Andrew Stubbs  <ams@codesourcery.com>
+
+	* sh.h (EF_SH_PIC, EF_SH_FDPIC): Define.
+	(R_SH_FIRST_INVALID_RELOC_6, R_SH_LAST_INVALID_RELOC_6): New.  Adjust
+	other invalid ranges.
+	(R_SH_GOT20, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20)
+	(R_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC20, R_SH_FUNCDESC)
+	(R_SH_FUNCDESC_VALUE): New.
+
+2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/11600
+	* common.h (SHF_EXCLUDE): New.
+
+	* i370.h (SHF_EXCLUDE): Removed.
+	* or32.h (SHF_EXCLUDE): Likewise.
+	* ppc.h (SHF_EXCLUDE): Likewise.
+	* sparc.h (SHF_EXCLUDE): Likewise.
+
+2010-04-23  Alan Modra  <amodra@gmail.com>
+
+	* internal.h (ELF_SECTION_SIZE): Protect macro args with parentheses.
+	Invert logic to clarify test for .tbss.
+	(ELF_IS_SECTION_IN_SEGMENT): Rename to..
+	(ELF_SECTION_IN_SEGMENT_1): ..this.  Add check_vma param.  Protect
+	macro args with parentheses.
+	(ELF_SECTION_IN_SEGMENT): Define.
+	(ELF_IS_SECTION_IN_SEGMENT_FILE): Delete.
+	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Delete.
+
+2010-04-15  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+	* arm.h (Tag_FP_arch, Tag_ABI_align_needed, Tag_ABI_align_preserved,
+	Tag_FP_HP_extension): Add new ABI attribute tags.
+
+2010-04-15  Nick Clifton  <nickc@redhat.com>
+
+	* alpha.h: Update copyright notice to use GPLv3.
+	* arc.h: Likewise.
+	* arm.h: Likewise.
+	* avr.h: Likewise.
+	* bfin.h: Likewise.
+	* common.h: Likewise.
+	* cr16.h: Likewise.
+	* cr16c.h: Likewise.
+	* cris.h: Likewise.
+	* crx.h: Likewise.
+	* d10v.h: Likewise.
+	* d30v.h: Likewise.
+	* dlx.h: Likewise.
+	* dwarf.h: Likewise.
+	* external.h: Likewise.
+	* fr30.h: Likewise.
+	* frv.h: Likewise.
+	* h8.h: Likewise.
+	* hppa.h: Likewise.
+	* i370.h: Likewise.
+	* i386.h: Likewise.
+	* i860.h: Likewise.
+	* i960.h: Likewise.
+	* ia64.h: Likewise.
+	* internal.h: Likewise.
+	* ip2k.h: Likewise.
+	* iq2000.h: Likewise.
+	* lm32.h: Likewise.
+	* m32c.h: Likewise.
+	* m32r.h: Likewise.
+	* m68hc11.h: Likewise.
+	* m68k.h: Likewise.
+	* mcore.h: Likewise.
+	* mep.h: Likewise.
+	* microblaze.h: Likewise.
+	* mips.h: Likewise.
+	* mmix.h: Likewise.
+	* mn10200.h: Likewise.
+	* moxie.h: Likewise.
+	* msp430.h: Likewise.
+	* mt.h: Likewise.
+	* openrisc.h: Likewise.
+	* or32.h: Likewise.
+	* pj.h: Likewise.
+	* ppc.h: Likewise.
+	* ppc64.h: Likewise.
+	* reloc-macros.h: Likewise.
+	* rx.h: Likewise.
+	* s390.h: Likewise.
+	* sh.h: Likewise.
+	* sparc.h: Likewise.
+	* spu.h: Likewise.
+	* v850.h: Likewise.
+	* vax.h: Likewise.
+	* vxworks.h: Likewise.
+	* x86-64.h: Likewise.
+	* xc16x.h: Likewise.
+	* xstormy16.h: Likewise.
+	* xtensa.h: Likewise.
+
+2010-04-08  David Stubbs  <stubbs@icerasemi.com>
+
+	* internal.h (ELF_IS_SECTION_IN_SEGMENT): PT_PHDR program headers
+	cannot contain any sections.
+
+2010-03-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define.
+	* tic6x.h: New.
+
+2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* common.h (VER_FLG_*): Document.
+	(VER_FLG_INFO): Define.
+
+2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
+
+	PR binutils/11297
+	* avr.h: (R_AVR_8): New relocation number.
+
+2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+	* arm.h (Tag_MPextension_use): Renumber.
+	(Tag_DIV_use): Add.
+	(Tag_MPextension_use_legacy): Likewise.
+
+2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
+
+	* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
+	NT_S390_CTRS and NT_S390_PREFIX): Define.
+
+2010-02-08  David S. Miller  <davem@davemloft.net>
+
+	* sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.
+
+2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (NT_386_XSTATE): New.
+
+2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* s390.h (EF_S390_HIGH_GPRS): Added macro definition.
+
+2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
+
+	* common.h (PN_XNUM): Define.
+
+2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* common.h (NT_S390_HIGH_GPRS): Define.
+
+2009-12-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
+	R_PPC_RELAX32PC_PLT): Delete.
+	(R_PPC_RELAX, R_PPC_RELAX_PLT, R_PPC_RELAX_PLTREL24): Define.
+
+2009-12-03  David Daney  <ddaney@caviumnetworks.com>
+	    Adam Nemet  <adambnemet@gmail.com>
+
+	* mips.h (E_MIPS_MACH_OCTEON2): New machine flag.
+
+2009-11-28  Joseph Myers  <joseph@codesourcery.com>
+
+	* common.h (ELFOSABI_FENIXOS, EM_TI_C6000, EM_TI_C2000,
+	EM_TI_C5500, EM_CUDA): Define.
+	(EM_res140, EM_res141, EM_res142): Remove.
+
+2009-11-17  Paul Brook  <paul@codesourcery.com>
+	Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* arm.h (TAG_CPU_ARCH_V7E_M): Define.
+
+2009-09-29  DJ Delorie  <dj@redhat.com>
+
+	* rx.h: New file.
+
+2009-09-21  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (DT_PPC_TLSOPT): Define.
+	* ppc64.h (DT_PPC64_TLSOPT): Define.
+
+2009-08-10  Daniel Gutson  <dgutson@codesourcery.com>
+
+	* arm.h: (SHT_ARM_DEBUGOVERLAY): New define.
+	(SHT_ARM_OVERLAYSECTION): New define.
+
+2006-08-09  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	From Mike Frysinger <michael.frysinger@analog.com>
+	* bfin.h (R_BFIN_UNUSED, R_BFIN_PCREL5M2, R_BFIN_UNUSED1,
+	R_BFIN_PCREL10, R_BFIN_PCREL12_JUMP, R_BFIN_RIMM16,
+	R_BFIN_LUIMM16, R_BFIN_HUIMM16, R_BFIN_PCREL12_JUMP_S,
+	R_BFIN_PCREL24_JUMP_X, R_BFIN_PCREL24, R_BFIN_UNUSEDB,
+	R_BFIN_UNUSEDC, R_BFIN_PCREL24_JUMP_L, R_BFIN_PCREL24_CALL_X,
+	R_BFIN_VAR_EQ_SYMB, R_BFIN_BYTE_DATA, R_BFIN_BYTE2_DATA,
+	R_BFIN_BYTE4_DATA, R_BFIN_PCREL11, R_BFIN_PUSH, R_BFIN_CONST,
+	R_BFIN_ADD, R_BFIN_SUB, R_BFIN_MULT, R_BFIN_DIV, R_BFIN_MOD,
+	R_BFIN_LSHIFT, R_BFIN_RSHIFT, R_BFIN_AND, R_BFIN_OR, R_BFIN_XOR,
+	R_BFIN_LAND, R_BFIN_LOR, R_BFIN_LEN, R_BFIN_NEG, R_BFIN_COMP,
+	R_BFIN_PAGE, R_BFIN_HWPAGE, R_BFIN_ADDR, R_BFIN_PLTPLC,
+	R_BFIN_GOT, R_BFIN_MAX): Renamed from R_unused0, R_pcrel5ms,
+	R_unused1, R_pcrel10, R_pcrel12_jump, R_rimm16, R_luimm16,
+	R_huimm16, R_pcrel12_jump_s, R_pcrel24_jump_x, R_pcrel24,
+	R_unusedb, R_unusedc, R_pcrel24_jump_l, R_pcrel24_call_x,
+	R_var_eq_symb, R_byte_data, R_byte2_data, R_byte4_data, R_pcrel11,
+	R_push, R_const, R_add, R_sub, R_mult, R_div, R_mod, R_lshift,
+	R_rshift, R_and, R_or, R_xor, R_land, R_lor, R_len, R_neg, R_comp,
+	R_page, R_hwpage, R_addr, R_pltpc, R_got.
+
+2009-08-09  Michael Eager <eager@eagercon.com>
+
+	* common.h: Define EM_resnnn reserved values. Add EM_AVR32,
+	EM_STM8, EM_TILE64, EM_TILEPRO.  Change EM_MICROBLAZE.
+
+2009-08-06  Michael Eager <eager@eagercon.com>
+
+	* common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD.
+	* microblaze.h: New reloc definitions.
+
+2009-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc64.h: Add R_PPC64_JMP_IREL, R_PPC64_REL16, R_PPC64_REL16_LO,
+	R_PPC64_REL16_HI, R_PPC64_REL16_HA.
+
+2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_L1OM): New.
+
+2009-07-24  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
+	    Alan Modra  <amodra@bigpond.net.au>
+
+	* spu.h (R_SPU_ADD_PIC): New.
+
+2009-07-23  Ulrich Drepper  <drepper@redhat.com>
+
+	* common.h (STB_GNU_UNIQUE): Define.
+
+2009-07-10  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2.h: Move to `..'.
+
+2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* dwarf2.h: Just include ../dwarf2.h.
+
+2009-07-10  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_IRELATIVE): Add.
+	(R_PPC_RELAX32, R_PPC_RELAX32PC,
+	R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Renumber.
+	* ppc64.h (R_PPC64_IRELATIVE): Add.
+
+2009-07-03  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
+	and DW_OP_stack_value.
+
+2009-06-22  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_RELAX*): Define as enum.
+
+2009-06-11  Anthony Green  <green@moxielogic.org>
+
+	* moxie.h (R_MOXIE_PCREL10): New.
+
+2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/10205
+	* i386.h (R_386_IRELATIVE): New.
+	* x86-64.h (R_X86_64_IRELATIVE): Likewise.
+
+2009-05-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h: Update comments for dynamic tag ranges.
+
+2009-04-30  DJ Delorie  <dj@redhat.com>
+
+	* mep.h (EF_MEP_COP_*): New.
+	(EF_MEP_ALL_FLAGS): Add them.
+
+2009-04-30  Nick Clifton  <nickc@redhat.com>
+
+	* common.h (STT_GNU_IFUNC): Define.
+
+2009-04-24  Cary Coutant  <ccoutant@google.com>
+
+	* dwarf2.h (DW_LNE_set_discriminator): New enum value.
+
+2009-04-15  Anthony Green  <green@moxielogic.com>
+
+	* common.h (EM_MOXIE): Define.
+	* moxie.h: New file.
+
+2009-04-07  DJ Delorie  <dj@redhat.com>
+
+	* mep.h (EF_MEP_CPU_C5): New.
+
+2009-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_INTEL178): Removed.
+	(EM_INTEL179): Likewise.
+	(EM_ETPU): New.
+	(EM_SLE9X): Likewise.
+	(EM_INTEL181): Likewise.
+	(EM_INTEL182): Likewise.
+
+2009-03-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (EM_INTEL178): New.
+	(EM_INTEL179): Likewise.
+	(EM_INTEL180): Likewise.
+
+2009-03-20  Mikolaj Zalewski  <mikolajz@google.com>
+
+	* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define.
+
+2009-03-14  Mark Kettenis  <kettenis@gnu.org>
+
+	* common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV)
+	(NT_OPENBSD_REGS, NT_OPENBSD_FPREGS, NT_OPENBSD_XFPREGS)
+	(NT_OPENBSD_WCOOKIE): New defines.
+
+2009-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* common.h (AT_RANDOM): Define.
+
+2009-03-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs.
+	* ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs.
+
+2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
+
+	* score.h (RELOC_NUMBER): Add R_SCORE_IMM32.
+	* common.h (EM_SCORE_OLD): Define.
+
+2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (STB_LOPROC): Replace Application-specific with
+	Processor-specific in comments.
+	(STB_HIPROC): Likewise.
+	(STT_LOPROC): Likewise.
+	(STT_HIPROC): Likewise.
+
+2009-02-03  Sandip Matte  <sandip@rmicorp.com>
+
+	* mips.h (E_MIPS_MACH_XLR): Define.
+
+2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+	* m68k.h: Map TLS relocations to numbers.
+
+2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
+	    Julian Brown   <julian@codesourcery.com>
+
+	* arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines.
+	(MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines.
+	(Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI
+	version 2.07.
+	(Tag_undefined39, Tag_nodefaults): New enum values.
+	(Tag_also_compatible_with, Tag_T2EE_use): Likewise.
+	(Tag_conformance, Tag_Virtualization_use): Likewise.
+	(Tag_undefined69, Tag_MPextension_use): Likewise.
+
+2009-01-15  Douglas B Rupp  <rupp@gnat.com>
+
+	* ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO, EF_IA_64_ARCHVER_1):
+	New macros. Minor reformatting.
+
+2008-12-23  Jon Beniston <jon@beniston.com>
+
+	* lm32.h: New file.
+
+2008-12-23  Nick Clifton  <nickc@redhat.com>
+
+	* commmon.h (STT_IFUNC): Delete.
+
+2008-12-20  Hans-Peter Nilsson  <hp@axis.com>
+
+	* cris.h (R_CRIS_32_IE): New relocation.
+
+2008-12-03  Nick Clifton  <nickc@redhat.com>
+
+	* common.h (STT_IFUNC): Define.
+
+2008-11-27  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+	* cr16.h (R_CR16_GOT_REGREL20, R_CR16_GOTC_REGREL20 and
+	R_CR16_GLOB_DAT): New relocations.
+
+2008-11-25  Hans-Peter Nilsson  <hp@axis.com>
+
+	* cris.h (R_CRIS_32_TPREL): Correct comment.
+	(R_CRIS_DTPMOD): Open up for use elsewhere than the fourth GOT entry.
+
+2008-11-18  Catherine Moore  <clm@codesourcery.com>
+
+	* arm.h (Tag_ABI_FP_16bit_format): Define.
+
+2008-11-14  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* internal.h (struct elf_segment_map): Add header_size field.
+
+2008-10-13  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* common.h (AT_BASE_PLATFORM, AT_EXECFN): Define.
+
+2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
+
+	* ppc.h: Add Tag_GNU_Power_ABI_Struct_Return.
+
+2008-10-04  Hans-Peter Nilsson  <hp@axis.com>
+
+	* cris.h (R_CRIS_32_GOT_GD, R_CRIS_16_GOT_GD, R_CRIS_32_GD)
+	(R_CRIS_DTP, R_CRIS_32_DTPREL, R_CRIS_16_DTPREL, R_CRIS_DTPMOD)
+	(R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL)
+	(R_CRIS_16_TPREL): New relocations.
+
+2008-09-24  Richard Henderson  <rth@redhat.com>
+
+	* dwarf2.h (DW_OP_GNU_encoded_addr): New.
+
+2008-08-20  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG)
+	(R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC)
+	(R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New.
+
+2008-08-08  Anatoly Sokolov  <aesok@post.ru>
+
+	* avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
+	E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
+	(EF_AVR_MACH): Redefine to 0x7F.
+
+2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
+	    Daniel Jacobowitz  <dan@codesourcery.com>
+	    Catherine Moore  <clm@codesourcery.com>
+	    Mark Shinwell  <shinwell@codesourcery.com>
+
+	* mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
+	(STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.
+
+2008-08-04  Markus Weiss  <weissms@aros.org>
+
+	* common.h (ELFOSABI_AROS): Update comment.
+
+2008-07-26  Michael Eager <eager@eagercon.com>
+
+	* ppc.h: Add description of single-precision.
+
+2008-07-21  Luis Machado  <luisgpm@br.ibm.com>
+
+	* common.h: Define NT_PPC_VSX.
+
+2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+
+	Revert
+	2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+	* bfin.h (EF_BFIN_CODE_IN_L1): Define.
+	(EF_BFIN_DATA_IN_L1): Define.
+
+2008-07-12  Jie Zhang  <jie.zhang@analog.com>
+
+	* bfin.h (EF_BFIN_CODE_IN_L1): Define.
+	(EF_BFIN_DATA_IN_L1): Define.
+
+2008-07-10  Richard Sandiford  <rdsandiford@googlemail.com>
+
+	* mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros.
+
+2008-06-18  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+	* common.h (EM_CR16): Correct value.
+	(EM_CR16): Rename to EM_CR16_OLD.
+
+2008-06-12  DJ Delorie  <dj@redhat.com>
+
+	* common.h (EM_M32C_NEW): Rename to EM_M32C.
+	(EM_M32C): Rename to EM_M32C_OLD.
+
+2008-06-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* common.h: Update e_machine table.
+
+2008-06-09  Takashi Yoshii  <yoshii.takashi@renesas.com>
+
+	* sh.h (EF_SH_BFD_TABLE): Set bfd_mach_sh for EF_SH_UNKNOWN.
+
+2008-06-09  Joseph Myers  <joseph@codesourcery.com>
+
+	* common.h: Change registry@caldera.com to registry@sco.com.
+
+2008-05-21  Nick Clifton  <nickc@redhat.com>
+
+	* reloc-macros.h: Add a comment about the use of the
+	END_RELOC_NUMBERS symbol as a sentinel value.
+
+2008-05-15  Christophe Lyon  <christophe.lyon@st.com>
+
+	* arm.h (END_RELOC_NUMBERS): Provide a maximum value.
+
+2008-04-16  David S. Miller  <davem@davemloft.net>
+
+	* sparc.h (R_SPARC_GOTDATA_HIX22,
+	R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22,
+	R_SPARC_GOTDATA_OP_LOX10, R_SPARC_GOTDATA_OP,
+	R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_SIZE64): New relocs.
+
+2008-03-24  Ian Lance Taylor  <iant@google.com>
+
+	* common.h (NT_GNU_GOLD_VERSION): Define.
+
+2008-03-13  Alan Modra  <amodra@bigpond.net.au>
+
+	* internal.h (Elf_Internal_Shdr): Change sh_link and sh_info from
+	unsigned long to unsigned int.  Change sh_addralign to bfd_vma.
+	Order struct as for external version.
+
+2008-03-12  Alan Modra  <amodra@bigpond.net.au>
+
+	PR 5900
+	* common.h (SHN_BAD): Delete.
+	(SHN_LORESERVE .. SHN_HIRESERVE): Move to..
+	* external.h: ..here.
+	* internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define.
+	(SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define.
+	(SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define.
+
+2008-03-12  Alan Modra  <amodra@bigpond.net.au>
+
+	* cr16c.h (SHN_CR16C_FCOMMON): Define using SHN_LORESERVE.
+	(SHN_CR16C_NCOMMON): Likewise.
+	* hppa.h (SHN_PARISC_ANSI_COMMON): Likewise.
+	(SHN_PARISC_HUGE_COMMON): Likewise.
+	* ia64.h (SHN_IA_64_ANSI_COMMON): Likewise.
+	(SHN_IA_64_VMS_SYMVEC): Define using SHN_LOOS.
+	* m32r.h (SHN_M32R_SCOMMON): Define using SHN_LORESERVE.
+	* mips.h (SHN_MIPS_ACOMMON, SHN_MIPS_TEXT): Likewise.
+	(SHN_MIPS_DATA, SHN_MIPS_SCOMMON, SHN_MIPS_SUNDEFINED): Likewise.
+	* score.h (SHN_SCORE_TEXT, SHN_SCORE_DATA): Likewise.
+	(SHN_SCORE_SCOMMON): Likewise.
+	* sparc.h (SHN_BEFORE, SHN_AFTER): Likewise.
+	* v850.h (SHN_V850_SCOMMON, SHN_V850_TCOMMON): Likewise.
+	(SHN_V850_ZCOMMON): Likewise.
+	* x86-64.h (SHN_X86_64_LCOMMON): Likewise.
+
+2008-03-03  Pallavi Tambay  <pallavi.tambay@amd.com>
+
+	* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP:
+	DW_OP_PGI_omp_thread_num.
+
+2008-02-04  Adam Nemet  <anemet@caviumnetworks.com>
+
+	* mips.h: Update copyright.
+	(E_MIPS_MACH_OCTEON): New macro.
+
+2008-01-30  Tristan Gingold  <gingold@adacore.com>
+
+	Add OpenVMS extensions.
+	* ia64.h (SHF_IA_64_VMS_GLOBAL, SHF_IA_64_VMS_OVERLAID)
+	(SHF_IA_64_VMS_SHARED, SHF_IA_64_VMS_VECTOR)
+	(SHF_IA_64_VMS_ALLOC_64BIT, SHF_IA_64_VMS_PROTECTED)
+	(SHT_IA_64_VMS_TRACE, SHT_IA_64_VMS_TIE_SIGNATURES)
+	(SHT_IA_64_VMS_DEBUG, SHT_IA_64_VMS_DEBUG_STR)
+	(SHT_IA_64_VMS_LINKAGES, SHT_IA_64_VMS_SYMBOL_VECTOR)
+	(SHT_IA_64_VMS_FIXUP, DT_IA_64_VMS_SUBTYPE)
+	(DT_IA_64_VMS_IMGIOCNT, DT_IA_64_VMS_LNKFLAGS)
+	(DT_IA_64_VMS_VIR_MEM_BLK_SIZ, DT_IA_64_VMS_IDENT)
+	(DT_IA_64_VMS_NEEDED_IDENT, DT_IA_64_VMS_IMG_RELA_CNT)
+	(DT_IA_64_VMS_SEG_RELA_CNT, DT_IA_64_VMS_FIXUP_RELA_CNT)
+	(DT_IA_64_VMS_FIXUP_NEEDED, DT_IA_64_VMS_SYMVEC_CNT)
+	(DT_IA_64_VMS_XLATED, DT_IA_64_VMS_STACKSIZE)
+	(DT_IA_64_VMS_UNWINDSZ, DT_IA_64_VMS_UNWIND_CODSEG)
+	(DT_IA_64_VMS_UNWIND_INFOSEG, DT_IA_64_VMS_LINKTIME)
+	(DT_IA_64_VMS_SEG_NO, DT_IA_64_VMS_SYMVEC_OFFSET)
+	(DT_IA_64_VMS_SYMVEC_SEG, DT_IA_64_VMS_UNWIND_OFFSET)
+	(DT_IA_64_VMS_UNWIND_SEG, DT_IA_64_VMS_STRTAB_OFFSET)
+	(DT_IA_64_VMS_SYSVER_OFFSET, DT_IA_64_VMS_IMG_RELA_OFF)
+	(DT_IA_64_VMS_SEG_RELA_OFF, DT_IA_64_VMS_FIXUP_RELA_OFF)
+	(DT_IA_64_VMS_PLTGOT_OFFSET, DT_IA_64_VMS_PLTGOT_SEG)
+	(DT_IA_64_VMS_FPMODE, SHN_IA_64_VMS_SYMVEC): Define
+
+2008-01-16  Mark Kettenis  <kettenis@gnu.org>
+
+	* common.h (AT_SUN_AUXFLAGS): Define.
+
+2007-12-11  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* dwarf2.h (DW_AT_hi_user): Correct value.
+
+2007-12-07  Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa.h (R_XTENSA_32_PCREL): New.
+
+2007-11-29  Mark Shinwell  <shinwell@codesourcery.com>
+
+	* mips.h (E_MIPS_MACH_LS2E): New.
+	(E_MIPS_MACH_LS2F): New.
+
+2007-11-28  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with
+	segments at the end of memory.
+
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+	* mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant
+	in comment.
+
+2007-11-16  Nick Clifton  <nickc@redhat.com>
+
+	* dwarf2.h: Mention the location of the DWARF3 spec on the web.
+	(DW_AT_stride_size): Rename to DW_AT_bit_stride.
+	(DW_AT_stride): Rename to DW_AT_byte_stride.
+
+2007-11-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* vxworks.h: New.
+
+2007-10-30  Nick Clifton  <nickc@redhat.com>
+
+	* mn10300.h (R_MN10300_ALIGN): Define.
+
+2007-10-25  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* ppc.h (Tag_GNU_Power_ABI_Vector): New.
+
+2007-10-19  Nick Clifton  <nickc@redhat.com>
+
+	* mn10300.h: Add R_MN10300_SYM_DIFF reloc.
+
+2007-10-18  Roland McGrath  <roland@redhat.com>
+
+	* common.h (NT_PPC_VMX): New macro.
+
+2007-10-01  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+	* cr16.h: Updated with new relocaction macros.
+
+2007-09-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/3281
+	PR binutils/5037
+	* internal.h (elf_segment_map): Add p_size and p_size_valid.
+	(ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in
+	PT_GNU_RELRO segments.
+
+2007-09-11  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* m68k.h (EF_M68K_CF_ISA_C_NODIV): New.
+
+2007-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* common.h (NT_SPU): Define.
+
+2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h: Revert last change.
+
+2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* common.h (PT_GNU_STACK): Renamed to ...
+	(PT_GNU_ATTR): This.
+	(PT_GNU_STACK): New.  Make an alias of PT_GNU_ATTR.
+
+2007-07-09  Roland McGrath  <roland@redhat.com>
+
+	* common.h (NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros.
+
+2007-06-29  Joseph Myers  <joseph@codesourcery.com>
+
+	* ppc.h (Tag_GNU_Power_ABI_FP): Define.
+
+2007-06-29  Joseph Myers  <joseph@codesourcery.com>
+
+	* mips.h (Tag_GNU_MIPS_ABI_FP): Define.
+
+2007-06-29  Joseph Myers  <joseph@codesourcery.com>
+
+	* arm.h (elf32_arm_add_eabi_attr_int,
+	elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
+	elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
+	elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
+	Tag_Symbol, Tag_compatibility): Remove.
+	* common.h (SHT_GNU_ATTRIBUTES): Define.
+
+2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
+
+	* common.h (EM_CR16): New entry for CR16 cpu.
+	* cr16.h: New file.
+
+2007-06-11  Sterling Augustine  <sterling@tensilica.com>
+	    Bob Wilson  <bob.wilson@acm.org>
+
+	* xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
+	(XTENSA_PROP_NO_TRANSFORM): ...this.
+
+2007-05-18  Caroline Tice  <ctice@apple.com>
+
+	* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP,
+	DW_OP_GNU_uninit.
+
+2007-05-12  Alan Modra  <amodra@bigpond.net.au>
+
+	* spu.h (R_SPU_ADDR16X): Define.
+	(R_SPU_PPU32, R_SPU_PPU64): Renumber.
+
+2007-05-11  Alan Modra  <amodra@bigpond.net.au>
+
+	* spu.h (R_SPU_PPU32, R_SPU_PPU64): Define.
+
+2007-05-02  Alan Modra  <amodra@bigpond.net.au>
+
+	* internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
+	and vma for appropriate sections.
+
+2007-04-26  Jan Beulich  <jbeulich@novell.com>
+
+	* common.h (DT_ENCODING): Correct value (back to spec mandated
+	value).
+
+2007-03-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* v850.h (V850_OTHER_TDA_BYTE): Delete.
+	(V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits
+	that don't clash with visibility bits.
+
+2007-03-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* common.h (ELF_ST_VISIBILITY): Comment typo fix.
+
+2007-02-05  Dave Brolley  <brolley@redhat.com>
+	    Richard Sandiford  <rsandifo@redhat.com>
+	    Richard Henderson  <rth@redhat.com>
+	    DJ Delorie  <dj@redhat.com>
+	    Ben Elliston  <bje@redhat.com>
+
+	* mep.h: New file.
+	* common.h (EM_CYGNUS_MEP): Define.
+
+2007-02-15  Dave Brolley  <brolley@redhat.com>
+
+	From Graydon Hoare  <graydon@redhat.com>:
+	* common.h (STT_RELC, STT_SRELC, R_RELC): New macros.
+
+2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (EF_M68K_FIDO): New.
+	(EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
+	(EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.
+
+2006-12-25  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New.
+
+2006-12-19  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (EF_M68K_ARCH_MASK): New.
+
+2006-12-19  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* internal.h (struct elf_segment_map): Add p_vaddr_offset field.
+
+2006-12-07  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV,
+	EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP,
+	EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC,
+	EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to
+	EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A,
+	EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP,
+	EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK,
+	EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B,
+	EF_M68K_CF_FLOAT, respectively.
+
+2006-12-05  Michael Tautschnig  <tautschn@model.in.tum.de>
+	    Nick Clifton  <nickc@redhat.com>
+
+	* external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED.
+
+2006-10-28  Richard Sandiford  <richard@codesourcery.com>
+
+	* mips.h (R_MIPS_GLOB_DAT): Define
+	(R_MIPS_max): Bump by 1.
+
+2006-10-25  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
+	    Yukishige Shibata  <shibata@rd.scei.sony.co.jp>
+	    Nobuhisa Fujinami  <fnami@rd.scei.sony.co.jp>
+	    Takeaki Fukuoka  <fukuoka@rd.scei.sony.co.jp>
+	    Alan Modra  <amodra@bigpond.net.au>
+
+	* common.h (EM_SPU): Define.
+	* spu.h: New file.
+
+2006-10-19  Mei Ligang  <ligang@sunnorth.com.cn>
+
+	* score.h (EF_SCORE_PIC): Redefine EF_SCORE_PIC as 0x80000000.
+	(EF_SCORE_FIXDEP): Redefine EF_SCORE_FIXDEP as 0x40000000.
+	(EF_SCORE_HASENTRY): Delete.
+
+2006-10-17  Mark Shinwell  <shinwell@codesourcery.com>
+
+	* arm.h: Define TAG_CPU_ARCH_* constants.
+
+2006-09-17  Mei Ligang  <ligang@sunnorth.com.cn>
+
+	* score.h: New file.
+	* common.h: Add Score machine number.
+
+2006-07-10  Jakub Jelinek  <jakub@redhat.com>
+
+	* common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
+
+2006-05-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* internal.h (ELF_SECTION_SIZE): New.
+	(ELF_IS_SECTION_IN_SEGMENT): Likewise.
+	(ELF_IS_SECTION_IN_SEGMENT_FILE): Updated.
+	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
+
+2006-05-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* internal.h (struct elf_segment_map): Add p_align and p_align_valid.
+
+2006-05-24  Carlos O'Donell  <carlos@systemhalted.org>
+	    Randolph Chung  <randolph@tausq.org>
+
+	* hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL,
+	R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL,
+	R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32,
+	R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64):
+	New TLS relocs.
+	(R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L,
+	R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64):
+	Define TLS relocs using existing equivalents.
+
+2006-05-24  Bjoern Haase  <bjoern.m.haase@web.de>
+
+	* avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS.
+
+2006-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO,
+	R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4,  R_BFIN_FUNCDESC_GOTHI,
+	R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE,
+	R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI,
+	R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI,
+	R_BFIN_GOTOFFLO): New relocs.
+	(EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
+
+2006-03-23  Michael Matz  <matz@suse.de>
+
+	* x86-64.h: Add the new relocations with their official
+	numbers.
+
+2006-03-22  Richard Sandiford  <richard@codesourcery.com>
+	    Daniel Jacobowitz  <dan@codesourcery.com>
+	    Phil Edwards  <phil@codesourcery.com>
+	    Zack Weinberg  <zack@codesourcery.com>
+	    Mark Mitchell  <mark@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+
+	* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
+
+2006-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED,
+	SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON,
+	SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT,
+	SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT,
+	SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define.
+
+2006-03-10  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h (EF_ARM_EABI_VER5): Define.
+
+2006-03-06  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
+	EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
+	(EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
+	(EF_M68K_HW_DIV, EF_M68K_USP): Remove.
+	(EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
+	(EF_M68K_EMAC_B): New.
+
+2006-03-03  Bjoern Haase  <bjoern.m.haase@web.de>
+
+	* avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add.
+	(EF_AVR_LINKRELAX_PREPARED): Add.
+
+2006-03-02  Ben Elliston  <bje@au.ibm.com>
+
+	Import from the GCC tree:
+	2006-03-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
+	from DWARF 3.
+	(DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
+	DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
+	DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
+	DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
+	DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
+	(DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
+	(DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
+	DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
+	(DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
+	DW_DS_leading_separate, DW_DS_trailing_separate): New.
+	(DW_END_default, DW_END_big, DW_END_little): New.
+	(DW_END_lo_user, DW_END_hi_user): Define.
+	(DW_LNE_lo_user, DW_LNE_hi_user): Define.
+	(DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
+	(DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
+	DW_LANG_D): New.
+
+2006-02-06  Steve Ellcey  <sje@cup.hp.com>
+
+	* ia64.h (SHF_IA_64_HP_TLS): New.
+
+2006-02-24  DJ Delorie  <dj@redhat.com>
+
+	* m32c.h: Add relax relocs.
+
+2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
+	    Anil Paranjape   <anilp1@kpitcummins.com>
+	    Shilin Shakti    <shilins@kpitcummins.com>
+
+	* common.h (EM_XC16X): New entry for xc16x cpu.
+	Sort other EM_* numbers into numerical order.
+	* xc16x.h: New file.
+
+2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/2258
+	* internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New.
+	(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
+
+2006-02-07  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ...
+	(EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here.
+	(EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS,
+	EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC,
+	EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New.
+
+2006-02-06  Steve Ellcey  <sje@cup.hp.com>
+
+	* ia64.h (SHF_IA_64_HP_TLS): New.
+
+2006-01-18  Alexandre Oliva  <aoliva@redhat.com>
+
+	Introduce TLS descriptors for i386 and x86_64.
+	* common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
+	* i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
+	New.
+	* x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
+	R_X86_64_TLSDESC): New.
+
+2006-01-09  Mike Frysinger  <vapier@gentoo.org>:
+
+	* common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define.
+
+2005-12-16  Nathan Sidwell  <nathan@codesourcery.com>
+
+	Second part of ms1 to mt renaming.
+	* common.h (EM_MT): Renamed.
+	* mt.h: Rename relocs, cpu & other defines.
+
+2005-12-12  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* mt.h: Renamed from ms1.h
+
+2005-12-12  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h (elf32_arm_get_eabi_attr_int): Add prototype.
+
+2005-11-11  Nick Clifton  <nickc@redhat.com>
+
+	PR 1150
+	* mips.h (STO_OPTIONAL): Define.
+	(ELF_MIPS_IS_OPTIONAL): Define.
+
+2005-11-07  Nathan Sidwell  <nathan@codesourcery.com>
+
+	Add ms2.
+	* ms1.h (EF_MS1_CPU_MS2): New.
+
+2005-11-06  John David Anglin  <dave.anglin@nrc-crnc.gc.ca>
+
+	* hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs.
+
+2005-09-30  Catherine Moore  <clm@cm00re.com>
+
+	* bfin.h: New file.
+	* common.h (EM_BLACKFIN): Define.
+
+2005-10-08  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h: Add prototypes for BFD object attribute routines.
+
+2005-09-09  Richard Earnshaw  <richard.earnshaw@arm.com>
+
+	* arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.
+
+2005-08-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER):
+	New defines.
+
+2005-08-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines.
+	(PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New
+	deprecated defines.
+	(DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS,
+	DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT,
+	DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST,
+	DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP,
+	DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT,
+	PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT,
+	NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED,
+	NT_HP_UX_OPTIONS): Define.
+
+2005-07-25  DJ Delorie  <dj@redhat.com>
+
+	* m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.
+
+2005-07-25  Jan Hubicka  <jh@suse.cz>
+
+	* x86-64.h (SHN_X86_64_LCOMMON): New.
+	(SHF_X86_64_LARGE): New.
+
+2005-07-20  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
+
+	* m32r.h (R_M32R_REL32): Added.
+
+2005-07-18  Ben Elliston  <bje@au.ibm.com>
+
+	* dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float.
+	Replace with DW_ATE_decimal_float (now in DWARF 3).
+
+2005-07-14  Jim Blandy  <jimb@redhat.com>
+
+	Add support for Renesas M32C and M16C.
+	* common.h (EM_M32C): New machine number.
+	* m32c.h: New file.
+
+2005-06-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* external.h (GRP_ENTRY_SIZE): Define.
+
+2005-06-17  Jan Beulich  <jbeulich@novell.com>
+
+	* x86-64.h (elf_x86_64_reloc_type): Adjust comment for
+	R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and
+	R_X86_64_GOTPC32.
+
+2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
+	    Michael Snyder  <msnyder@redhat.com>
+	    Stan Cox  <scox@redhat.com>
+
+	* common.h (EM_MS1): Define.
+
+	* ms1.h: New file.
+
+2005-05-31  Richard Henderson  <rth@redhat.com>
+
+	* alpha.h (LITUSE_ALPHA_JSRDIRECT): New.
+
+2005-05-29  Richard Henderson  <rth@redhat.com>
+
+	* alpha.h (DT_ALPHA_PLTRO): New.
+
+2005-05-19  Ben Elliston  <bje@au.ibm.com>
+
+	* dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from
+	the user-defined encoding space pending inclusion in the standard.
+
+2005-05-18  Zack Weinberg  <zack@codesourcery.com>
+
+	* arm.h: Make all #ifndef OLD_ARM_ABI blocks
+	unconditional, delete all #ifdef OLD_ARM_ABI blocks.
+
+2005-05-17  Zack Weinberg  <zack@codesourcery.com>
+
+	* arm.h: Import complete list of official relocation names
+	and numbers from AAELF.  Define FAKE_RELOCs for old names.
+	Remove a few old names no longer used anywhere.
+
+2005-05-14  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
+
+2005-05-11  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
+	R_PPC_RELAX32PC_PLT) Adjust.
+	(R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define.
+	(DT_PPC_GLINK): Define.
+
+2005-05-10  Nick Clifton  <nickc@redhat.com>
+
+	* Update the address and phone number of the FSF organization in
+	the GPL notices in the following files:
+	alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h,
+	d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h,
+	frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h,
+	internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h,
+	mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h,
+	or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h,
+	sparc.h, v850.h,  vax.h, x86-64.h, xstormy16.h,	xtensa.h
+
+2005-04-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Moved from ../ChangeLog
+
+	2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
+	* arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
+
+	2004-10-12  Paul Brook  <paul@codesourcery.com>
+	* arm.h (EF_ARM_EABI_VER4): Define.
+
+	2004-10-08  Daniel Jacobowitz  <dan@debian.org>
+
+	* common.h (PT_SUNW_EH_FRAME): Define.
+	* x86-64.h (SHT_X86_64_UNWIND): Define.
+
+	2004-10-07  Bob Wilson  <bob.wilson@acm.org>
+	* xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32,
+	R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations.
+	(XTENSA_PROP_SEC_NAME): Define.
+	(property_table_entry): Add flags field.
+	(XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define.
+
+	2004-09-17  Paul Brook  <paul@codesourcery.com>
+	* arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK.
+	Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL,
+	R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX.
+
+	2004-09-13  Paul Brook  <paul@codesourcery.com>
+	* arm.h: Rename RELABS to TARGET1.
+
+	2004-05-11  Jakub Jelinek  <jakub@redhat.com>
+	* common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
+	(PT_GNU_RELRO): Define.
+
+2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
+	    Phil Blundell  <philb@gnu.org>
+
+	* arm.h: Add TLS relocations.
+
+2005-03-23  Ben Elliston  <bje@au.ibm.com>
+
+	* dwarf.h: Merge with GCC's dwarf.h.
+
+2005-03-18  C Jaipraash  <cjaiprakash@noida.hcltech.com>
+
+	* m68k.h (EF_CFV4E): Define.
+
+2005-03-17  Paul Brook <paul@codesourcery.com>
+	    Dan Jacobowitz <dan@codesourcery.com>
+	    Mark Mitchell  <mark@codesourcery.com>
+
+	* arm.h (PT_ARM_EXIDX): Define.
+
+2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	* mips.h: Define MIPS TLS relocations.
+
+2005-02-15  Nigel Stephens  <nigel@mips.com>
+	    Maciej W. Rozycki  <macro@mips.com>
+
+	* mips.h (R_MIPS16_GOT16): New reloc code.
+	(R_MIPS16_CALL16): Likewise.
+	(R_MIPS16_HI16): Likewise.
+	(R_MIPS16_LO16): Likewise.
+	(R_MIPS16_min): New fake reloc code.
+	(R_MIPS16_max): Likewise.
+
+2005-02-11  Maciej W. Rozycki  <macro@mips.com>
+
+	* mips.h (R_MIPS_max): Use FAKE_RELOC to define.
+
+2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
+
+	2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
+	* frv.h: Add R_FRV_TLSMOFF.
+	2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
+	* frv.h: Add TLS relocations.
+
+2005-01-17  Nick Clifton  <nickc@redhat.com>
+
+	* sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4,
+	EF_SH2A_SH3E): New flags.
+	(EF_SH_BFD_TABLE): Add these new flags to the table.
+
+2005-01-12  Alan Modra  <amodra@bigpond.net.au>
+
+	* ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
+	(R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
+
+2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
+
+	* avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs.
+
+2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
+
+	* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.
+
+2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
+
+	* mips.h (E_MIPS_MACH_9000): Define.
+
+2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
+
+	* cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10)
+	(EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New
+	macros.
+
+2004-10-06  Eric Christopher  <echristo@redhat.com>
+
+	* dwarf2.h: Sync with gcc dwarf2.h. Fix typo.
+
+2004-10-01  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h (SHT_ARM_EXIDX): Define.
+	(ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind,
+	ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once):
+	Define.
+
+2004-08-25  Dmitry Diky  <diwil@spec.ru>
+
+	* msp430.h: Add new relocs.
+
+2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* i386.h (R_386_USED_BY_INTEL_200): New.
+
+2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
+
+	Introduce SH2a support.
+	2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
+	* sh.h (EF_SH2A_NOFPU): New.
+	2003-12-01  Michael Snyder  <msnyder@redhat.com>
+	* sh.h (EF_SH2A): New.
+
+2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
+
+	* crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
+	BFD_RELOC_CRX_SWITCH32.
+
+2004-07-06  Tomer Levi  <Tomer.Levi@nsc.com>
+
+	* common.h (EM_CRX): Define.
+	* crx.h: New file.
+
+2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
+
+	* m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
+	R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
+
+2004-06-19  Alan Modra  <amodra@bigpond.net.au>
+
+	* common.h (ELF64_R_INFO): Warning fix.
+
+2004-06-14  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
+	with an updated comment.
+
+2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
+
+	* sh.h (EF_SH_HAS_DSP): Remove.
+	(EF_SH_HAS_FP): Remove.
+	(EF_SH_MERGE_MACH): Remove.
+	(EF_SH4_NOFPU): Convert to decimal.
+	(EF_SH4A_NOFPU): Likewise.
+	(EF_SH4_NOMMU_NOFPU): Likewise.
+	(EF_SH3_NOMMU): Add new macro.
+	(EF_SH_BFD_TABLE): Likewise.
+	(sh_find_elf_flags): Add prototype.
+	(sh_elf_get_flags_from_mach): Likewise.
+
+2004-04-24  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
+	(R_MIPS_GNU_REL_HI16): Remove.
+	(R_MIPS_GNU_REL16_S2): Update comment.
+
+2004-30-30  Galit Heller  <Galit.Heller@nsc.com>
+	    Tomer Levi  <Tomer.Levi@nsc.com>
+
+	* common.h (EM_CR): Define.
+	* cr16c.h: New file.
+
+2004-03-23  Paul Brook  <paul@codesourcery.com>
+
+	* arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
+
+2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
+
+	* sh.h: Add EF_SH4_NOMMU_NOFPU.
+
+2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
+
+	* frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define.
+
+2004-01-28  Roland McGrath  <roland@redhat.com>
+
+	* common.h (AT_SECURE): New macro.
+
+2004-01-21  Roland McGrath  <roland@redhat.com>
+
+	* common.h (AT_SUN_UID, AT_SUN_RUID, AT_SUN_GID): New macros.
+	(AT_SUN_RGID, AT_SUN_LDELF, AT_SUN_LDSHDR, AT_SUN_LDNAME,
+	AT_SUN_LPAGESZ, AT_SUN_PLATFORM, AT_SUN_HWCAP, AT_SUN_IFLUSH,
+	AT_SUN_CPU, AT_SUN_EMUL_ENTRY, AT_SUN_EMUL_EXECFD,
+	AT_SUN_EXECNAME) AT_SUN_MMU, AT_SUN_LDDATA): Likewise.
+
+2004-01-17  Mark Kettenis  <kettenis@gnu.org>
+
+	* common.h (NT_OPENBSD_IDENT): Define.
+
+2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
+
+	2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
+	* frv.h (EF_FRV_FDPIC): New macro.
+	(EF_FRV_PIC_FLAGS): Adjust.
+	2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
+	* frv.h (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
+	R_FRV_FUNCDESC_GOTOFFLO, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_GOTOFF12,
+	R_FRV_GOTOFFLO, R_FRV_GOTOFFHI): New.
+	2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
+	* frv.h (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC,
+	R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO):
+	New.
+
+
+For older changes see ChangeLog-9103
+
+Copyright (C) 2004-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/common.h ./include/elf/common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/common.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/common.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF support for BFD.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -74,6 +74,8 @@
 #define ELFOSABI_AROS	     15	/* AROS */
 #define ELFOSABI_FENIXOS     16 /* FenixOS */
 #define ELFOSABI_CLOUDABI    17 /* Nuxi CloudABI */
+#define ELFOSABI_OPENVOS     18 /* Stratus Technologies OpenVOS */
+
 #define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
 #define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
 #define ELFOSABI_ARM	     97	/* ARM */
@@ -194,7 +196,7 @@
 #define EM_MN10200	 90	/* Matsushita MN10200 */
 #define EM_PJ		 91	/* picoJava */
 #define EM_OR1K		 92	/* OpenRISC 1000 32-bit embedded processor */
-#define EM_ARC_A5	 93	/* ARC Cores Tangent-A5 */
+#define EM_ARC_COMPACT	 93	/* ARC International ARCompact processor */
 #define EM_XTENSA	 94	/* Tensilica Xtensa Architecture */
 #define EM_VIDEOCORE	 95	/* Alphamosaic VideoCore processor */
 #define EM_TMM_GPP	 96	/* Thompson Multimedia General Purpose Processor */
@@ -246,7 +248,7 @@
 #define EM_TI_C2000	141	/* Texas Instruments TMS320C2000 DSP family */
 #define EM_TI_C5500	142	/* Texas Instruments TMS320C55x DSP family */
 #define EM_res143	143	/* Reserved */
-#define EM_res144	144	/* Reserved */
+#define EM_TI_PRU	144	/* Texas Instruments Programmable Realtime Unit */
 #define EM_res145	145	/* Reserved */
 #define EM_res146	146	/* Reserved */
 #define EM_res147	147	/* Reserved */
@@ -289,22 +291,46 @@
 #define EM_AARCH64	183	/* ARM 64-bit architecture */
 #define EM_ARM184	184	/* Reserved by ARM */
 #define EM_AVR32	185	/* Atmel Corporation 32-bit microprocessor family */
-#define EM_STM8	186	/* STMicroeletronics STM8 8-bit microcontroller */
+#define EM_STM8		186	/* STMicroeletronics STM8 8-bit microcontroller */
 #define EM_TILE64	187	/* Tilera TILE64 multicore architecture family */
 #define EM_TILEPRO	188	/* Tilera TILEPro multicore architecture family */
 #define EM_MICROBLAZE	189	/* Xilinx MicroBlaze 32-bit RISC soft processor core */
 #define EM_CUDA		190	/* NVIDIA CUDA architecture */
 #define EM_TILEGX	191	/* Tilera TILE-Gx multicore architecture family */
+#define EM_CLOUDSHIELD 	192 	/* CloudShield architecture family */
+#define EM_COREA_1ST 	193 	/* KIPO-KAIST Core-A 1st generation processor family */
+#define EM_COREA_2ND 	194 	/* KIPO-KAIST Core-A 2nd generation processor family */
+#define EM_ARC_COMPACT2 195	/* Synopsys ARCompact V2 */
+#define EM_OPEN8 	196 	/* Open8 8-bit RISC soft processor core */
 #define EM_RL78		197	/* Renesas RL78 family.  */
+#define EM_VIDEOCORE5 	198 	/* Broadcom VideoCore V processor */
 #define EM_78K0R	199	/* Renesas 78K0R.  */
+#define EM_56800EX 	200 	/* Freescale 56800EX Digital Signal Controller (DSC) */
+#define EM_BA1 		201 	/* Beyond BA1 CPU architecture */
+#define EM_BA2 		202 	/* Beyond BA2 CPU architecture */
+#define EM_XCORE 	203 	/* XMOS xCORE processor family */
+#define EM_MCHP_PIC 	204 	/* Microchip 8-bit PIC(r) family */
 #define EM_INTEL205	205	/* Reserved by Intel */
 #define EM_INTEL206	206	/* Reserved by Intel */
 #define EM_INTEL207	207	/* Reserved by Intel */
 #define EM_INTEL208	208	/* Reserved by Intel */
 #define EM_INTEL209	209	/* Reserved by Intel */
+#define EM_KM32 	210 	/* KM211 KM32 32-bit processor */
+#define EM_KMX32 	211 	/* KM211 KMX32 32-bit processor */
+#define EM_KMX16 	212 	/* KM211 KMX16 16-bit processor */
+#define EM_KMX8 	213 	/* KM211 KMX8 8-bit processor */
+#define EM_KVARC 	214 	/* KM211 KVARC processor */
+#define EM_CDP 		215 	/* Paneve CDP architecture family */
+#define EM_COGE 	216 	/* Cognitive Smart Memory Processor */
+#define EM_COOL 	217 	/* Bluechip Systems CoolEngine */
+#define EM_NORC 	218 	/* Nanoradio Optimized RISC */
+#define EM_CSR_KALIMBA 	219 	/* CSR Kalimba architecture family */
+#define EM_Z80 		220 	/* Zilog Z80 */
 #define EM_VISIUM	221	/* Controls and Data Services VISIUMcore processor */
 #define EM_FT32         222     /* FTDI Chip FT32 high performance 32-bit RISC architecture */
 #define EM_MOXIE        223     /* Moxie processor family */
+#define EM_AMDGPU 	224 	/* AMD GPU architecture */
+#define EM_RISCV 	243 	/* RISC-V */
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -511,6 +537,7 @@
 
 /* #define SHF_MASKOS	0x0F000000    *//* OS-specific semantics */
 #define SHF_MASKOS	0x0FF00000	/* New value, Oct 4, 1999 Draft */
+#define SHF_GNU_BUILD_NOTE    (1 << 20)	/* Section contains GNU BUILD ATTRIBUTE notes.  */
 #define SHF_MASKPROC	0xF0000000	/* Processor-specific semantics */
 
 /* This used to be implemented as a processor specific section flag.
@@ -522,7 +549,7 @@
 					   are not to be further
 					   relocated.  */
 
-/* Compression types */
+/* Compression types.  */
 #define ELFCOMPRESS_ZLIB   1		/* Compressed with zlib.  */
 #define ELFCOMPRESS_LOOS   0x60000000	/* OS-specific semantics, lo */
 #define ELFCOMPRESS_HIOS   0x6FFFFFFF	/* OS-specific semantics, hi */
@@ -579,6 +606,8 @@
 					/*   note name must be "LINUX".  */
 #define NT_ARM_HW_WATCH	0x403		/* AArch hardware watchpoint registers */
 					/*   note name must be "LINUX".  */
+#define NT_ARM_SVE	0x405		/* AArch SVE registers.  */
+					/*   note name must be "LINUX".  */
 #define NT_SIGINFO	0x53494749	/* Fields of siginfo_t.  */
 #define NT_FILE		0x46494c45	/* Description of mapped files.  */
 
@@ -594,6 +623,20 @@
 /* Note segment for SystemTap probes.  */
 #define NT_STAPSDT	3
 
+/* Note segments for core files on FreeBSD systems.  Note name is
+   "FreeBSD".  */
+
+#define	NT_FREEBSD_THRMISC	7	/* Thread miscellaneous info. */
+#define	NT_FREEBSD_PROCSTAT_PROC	8	/* Procstat proc data. */
+#define	NT_FREEBSD_PROCSTAT_FILES	9	/* Procstat files data. */
+#define	NT_FREEBSD_PROCSTAT_VMMAP	10	/* Procstat vmmap data. */
+#define	NT_FREEBSD_PROCSTAT_GROUPS	11	/* Procstat groups data. */
+#define	NT_FREEBSD_PROCSTAT_UMASK	12	/* Procstat umask data. */
+#define	NT_FREEBSD_PROCSTAT_RLIMIT	13	/* Procstat rlimit data. */
+#define	NT_FREEBSD_PROCSTAT_OSREL	14	/* Procstat osreldate data. */
+#define	NT_FREEBSD_PROCSTAT_PSSTRINGS	15	/* Procstat ps_strings data. */
+#define	NT_FREEBSD_PROCSTAT_AUXV	16	/* Procstat auxv data. */
+
 /* Note segments for core files on NetBSD systems.  Note name
    must start with "NetBSD-CORE".  */
 
@@ -628,6 +671,51 @@
 #define NT_GNU_HWCAP		2	/* Used by ld.so and kernel vDSO.  */
 #define NT_GNU_BUILD_ID		3	/* Generated by ld --build-id.  */
 #define NT_GNU_GOLD_VERSION	4	/* Generated by gold.  */
+#define NT_GNU_PROPERTY_TYPE_0  5	/* Generated by gcc.  */
+
+#define NT_GNU_BUILD_ATTRIBUTE_OPEN	0x100
+#define NT_GNU_BUILD_ATTRIBUTE_FUNC	0x101
+
+#define GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC	'*'
+#define GNU_BUILD_ATTRIBUTE_TYPE_STRING		'$'
+#define GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE	'+'
+#define GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE	'!'
+
+#define GNU_BUILD_ATTRIBUTE_VERSION	1
+#define GNU_BUILD_ATTRIBUTE_STACK_PROT	2
+#define GNU_BUILD_ATTRIBUTE_RELRO	3
+#define GNU_BUILD_ATTRIBUTE_STACK_SIZE	4
+#define GNU_BUILD_ATTRIBUTE_TOOL	5
+#define GNU_BUILD_ATTRIBUTE_ABI		6
+#define GNU_BUILD_ATTRIBUTE_PIC		7
+
+#define NOTE_GNU_PROPERTY_SECTION_NAME	".note.gnu.property"
+#define GNU_BUILD_ATTRS_SECTION_NAME	".gnu.build.attributes"
+
+/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0).  */
+#define GNU_PROPERTY_STACK_SIZE			1
+#define GNU_PROPERTY_NO_COPY_ON_PROTECTED	2
+#define GNU_PROPERTY_X86_ISA_1_USED		0xc0000000
+#define GNU_PROPERTY_X86_ISA_1_NEEDED		0xc0000001
+
+#define GNU_PROPERTY_X86_ISA_1_486           (1U << 0)
+#define GNU_PROPERTY_X86_ISA_1_586           (1U << 1)
+#define GNU_PROPERTY_X86_ISA_1_686           (1U << 2)
+#define GNU_PROPERTY_X86_ISA_1_SSE           (1U << 3)
+#define GNU_PROPERTY_X86_ISA_1_SSE2          (1U << 4)
+#define GNU_PROPERTY_X86_ISA_1_SSE3          (1U << 5)
+#define GNU_PROPERTY_X86_ISA_1_SSSE3         (1U << 6)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_1        (1U << 7)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_2        (1U << 8)
+#define GNU_PROPERTY_X86_ISA_1_AVX           (1U << 9)
+#define GNU_PROPERTY_X86_ISA_1_AVX2          (1U << 10)
+#define GNU_PROPERTY_X86_ISA_1_AVX512F       (1U << 11)
+#define GNU_PROPERTY_X86_ISA_1_AVX512CD      (1U << 12)
+#define GNU_PROPERTY_X86_ISA_1_AVX512ER      (1U << 13)
+#define GNU_PROPERTY_X86_ISA_1_AVX512PF      (1U << 14)
+#define GNU_PROPERTY_X86_ISA_1_AVX512VL      (1U << 15)
+#define GNU_PROPERTY_X86_ISA_1_AVX512DQ      (1U << 16)
+#define GNU_PROPERTY_X86_ISA_1_AVX512BW      (1U << 17)
 
 /* Values used in GNU .note.ABI-tag notes (NT_GNU_ABI_TAG).  */
 #define GNU_ABI_TAG_LINUX	0
@@ -641,6 +729,7 @@
 /* Values for NetBSD .note.netbsd.ident notes.  Note name is "NetBSD".  */
 
 #define NT_NETBSD_IDENT		1
+#define NT_NETBSD_MARCH		5
 
 /* Values for OpenBSD .note.openbsd.ident notes.  Note name is "OpenBSD".  */
 
@@ -758,6 +847,7 @@
 #define DT_ENCODING	32
 #define DT_PREINIT_ARRAY   32
 #define DT_PREINIT_ARRAYSZ 33
+#define DT_SYMTAB_SHNDX    34
 
 /* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
    for DT_LOOS and DT_HIOS.  Some implementations however, use
@@ -867,6 +957,8 @@
 #define	DF_1_SYMINTPOSE	0x00800000
 #define	DF_1_GLOBAUDIT	0x01000000
 #define	DF_1_SINGLETON	0x02000000
+#define	DF_1_STUB	0x04000000
+#define	DF_1_PIE	0x08000000
 
 /* Flag values for the DT_FLAGS entry.	*/
 #define DF_ORIGIN	(1 << 0)
@@ -944,6 +1036,8 @@
 /* Section Group Flags.	 */
 
 #define GRP_COMDAT		0x1	/* A COMDAT group */
+#define GRP_MASKOS 	 0x0ff00000	/* Bits in this range reserved for OS specific use.  */
+#define GRP_MASKPROC 	 0xf0000000	/* Bits in this range reserved for processor use.  */
 
 /* Auxv a_type values.  */
 
@@ -994,6 +1088,16 @@
 #define AT_L2_CACHESHAPE  36
 #define AT_L3_CACHESHAPE  37
 
+#define AT_FREEBSD_EXECPATH     15      /* Path to the executable. */
+#define AT_FREEBSD_CANARY       16      /* Canary for SSP. */
+#define AT_FREEBSD_CANARYLEN    17      /* Length of the canary. */
+#define AT_FREEBSD_OSRELDATE    18      /* OSRELDATE. */
+#define AT_FREEBSD_NCPUS        19      /* Number of CPUs. */
+#define AT_FREEBSD_PAGESIZES    20      /* Pagesizes. */
+#define AT_FREEBSD_PAGESIZESLEN 21      /* Number of pagesizes. */
+#define AT_FREEBSD_TIMEKEEP     22      /* Pointer to timehands. */
+#define AT_FREEBSD_STACKPROT    23      /* Initial stack protection. */
+
 #define AT_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */
 #define AT_SUN_GID      2002    /* Effective group ID.  */
@@ -1003,6 +1107,7 @@
 #define AT_SUN_LDNAME   2006    /* String giving name of dynamic linker.  */
 #define AT_SUN_LPAGESZ  2007    /* Large pagesize.   */
 #define AT_SUN_PLATFORM 2008    /* Platform name string.  */
+#undef AT_SUN_HWCAP
 #define AT_SUN_HWCAP    2009	/* Machine dependent hints about
 				   processor capabilities.  */
 #define AT_SUN_IFLUSH   2010    /* Should flush icache? */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cr16c.h ./include/elf/cr16c.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cr16c.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/cr16c.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* CR16C ELF support for BFD.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cr16.h ./include/elf/cr16.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cr16.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/cr16.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* CR16 ELF support for BFD.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
    Contributed by M R Swami Reddy.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cris.h ./include/elf/cris.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/cris.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/cris.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* CRIS ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Axis Communications AB, Lund, Sweden.
    Written by Hans-Peter Nilsson.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/crx.h ./include/elf/crx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/crx.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/crx.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* CRX ELF support for BFD.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
    Contributed by Tomer Levi, NSC, Israel.
    Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
    Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/d10v.h ./include/elf/d10v.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/d10v.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/d10v.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* d10v ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/d30v.h ./include/elf/d30v.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/d30v.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/d30v.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* d30v ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/dlx.h ./include/elf/dlx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/dlx.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/dlx.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* DLX support for BFD.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -22,6 +22,10 @@
 
 #include "elf/reloc-macros.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if 0
 START_RELOC_NUMBERS (elf_dlx_reloc_type)
      RELOC_NUMBER (R_DLX_NONE,            0)
@@ -50,4 +54,8 @@ START_RELOC_NUMBERS (elf_dlx_reloc_type)
 END_RELOC_NUMBERS (R_DLX_max)
 #endif /* 0 */
 
+#ifdef __cplusplus
+     }
+#endif
+
 #endif /* _ELF_DLX_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/dwarf.h ./include/elf/dwarf.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/dwarf.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/dwarf.h	2017-03-06 01:49:08.000000000 +0000
@@ -3,7 +3,7 @@
 
    Written by Ron Guilmette (rfg@netcom.com)
 
-   Copyright (C) 1992-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of both GCC and the BFD library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/epiphany.h ./include/elf/epiphany.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/epiphany.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/epiphany.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Adapteva EPIPHANY ELF support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by Embecosm on behalf of Adapteva, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/external.h ./include/elf/external.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/external.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/external.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF support for BFD.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -144,7 +144,8 @@ typedef struct {
 } Elf32_External_Chdr;
 
 typedef struct {
-  unsigned char	ch_type[8];		/* Type of compression */
+  unsigned char	ch_type[4];		/* Type of compression */
+  unsigned char	ch_reserved[4];		/* Padding */
   unsigned char	ch_size[8];		/* Size of uncompressed data in bytes */
   unsigned char	ch_addralign[8];	/* Alignment of uncompressed data  */
 } Elf64_External_Chdr;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/fr30.h ./include/elf/fr30.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/fr30.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/fr30.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* FR30 ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/frv.h ./include/elf/frv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/frv.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/frv.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* FRV ELF support for BFD.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ft32.h ./include/elf/ft32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ft32.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ft32.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ft32 ELF support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/h8.h ./include/elf/h8.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/h8.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/h8.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* H8300/h8500 ELF support for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/hppa.h ./include/elf/hppa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/hppa.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/hppa.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* HPPA ELF support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i370.h ./include/elf/i370.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i370.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/i370.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* i370 ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i386.h ./include/elf/i386.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i386.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/i386.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ix86 ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -66,6 +66,8 @@ START_RELOC_NUMBERS (elf_i386_reloc_type
      RELOC_NUMBER (R_386_TLS_DESC_CALL,40)
      RELOC_NUMBER (R_386_TLS_DESC,     41)
      RELOC_NUMBER (R_386_IRELATIVE,    42) /* Adjust indirectly by program base */
+     /* Load from 32 bit GOT entry, relaxable.  */
+     RELOC_NUMBER (R_386_GOT32X,       43)
 
      /* Used by Intel.  */
      RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i860.h ./include/elf/i860.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i860.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/i860.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* i860 ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    Contributed by Jason Eckhardt <jle@cygnus.com>.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i960.h ./include/elf/i960.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/i960.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/i960.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Intel 960 ELF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ia64.h ./include/elf/ia64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ia64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ia64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IA-64 ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/internal.h ./include/elf/internal.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/internal.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/internal.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* ELF support for BFD.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ip2k.h ./include/elf/ip2k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ip2k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ip2k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IP2xxx ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/iq2000.h ./include/elf/iq2000.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/iq2000.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/iq2000.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IQ2000 ELF support for BFD.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/lm32.h ./include/elf/lm32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/lm32.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/lm32.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Lattice Mico32 ELF support for BFD.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m32c.h ./include/elf/m32c.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m32c.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/m32c.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* M32C ELF support for BFD.
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m32r.h ./include/elf/m32r.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m32r.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/m32r.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* M32R ELF support for BFD.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m68hc11.h ./include/elf/m68hc11.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m68hc11.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/m68hc11.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* m68hc11 & m68hc12 ELF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m68k.h ./include/elf/m68k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/m68k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/m68k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MC68k ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mcore.h ./include/elf/mcore.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mcore.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mcore.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Motorola MCore support for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mep.h ./include/elf/mep.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mep.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mep.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Toshiba MeP ELF support for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/metag.h ./include/elf/metag.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/metag.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/metag.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Meta ELF support for BFD.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2017 Free Software Foundation, Inc.
    Contributed by Imagination Technologies Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/microblaze.h ./include/elf/microblaze.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/microblaze.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/microblaze.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Xilinx MicroBlaze support for BFD.
  
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mips.h ./include/elf/mips.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mips.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mips.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MIPS ELF support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
    information in the System V Application Binary Interface, MIPS
@@ -30,6 +30,10 @@
 
 #include "elf/reloc-macros.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Relocation types.  */
 START_RELOC_NUMBERS (elf_mips_reloc_type)
   RELOC_NUMBER (R_MIPS_NONE, 0)
@@ -110,7 +114,8 @@ START_RELOC_NUMBERS (elf_mips_reloc_type
   RELOC_NUMBER (R_MIPS16_TLS_GOTTPREL, 110)
   RELOC_NUMBER (R_MIPS16_TLS_TPREL_HI16, 111)
   RELOC_NUMBER (R_MIPS16_TLS_TPREL_LO16, 112)
-  FAKE_RELOC (R_MIPS16_max, 113)
+  RELOC_NUMBER (R_MIPS16_PC16_S1, 113)
+  FAKE_RELOC (R_MIPS16_max, 114)
   /* These relocations are specific to VxWorks.  */
   RELOC_NUMBER (R_MIPS_COPY, 126)
   RELOC_NUMBER (R_MIPS_JUMP_SLOT, 127)
@@ -1096,7 +1101,7 @@ typedef struct
   unsigned char flags2[4];
 } Elf_External_ABIFlags_v0;
 
-typedef struct
+typedef struct elf_internal_abiflags_v0
 {
   /* Version of flags structure.  */
   unsigned short version;
@@ -1227,7 +1232,8 @@ extern void bfd_mips_elf_swap_abiflags_v
 #define AFL_ASE_MIPS16       0x00000400 /* MIPS16 ASE.  */
 #define AFL_ASE_MICROMIPS    0x00000800 /* MICROMIPS ASE.  */
 #define AFL_ASE_XPA          0x00001000 /* XPA ASE.  */
-#define AFL_ASE_MASK         0x00001fff /* All ASEs.  */
+#define AFL_ASE_DSPR3        0x00002000 /* DSP R3 ASE.  */
+#define AFL_ASE_MASK         0x00003fff /* All ASEs.  */
 
 /* Values for the isa_ext word of an ABI flags structure.  */
 
@@ -1298,6 +1304,10 @@ enum
   /* Using -mips32r2 -mfp64 -mno-odd-spreg.  */
   Val_GNU_MIPS_ABI_FP_64A = 7,
 
+  /* This is reserved for backward-compatibility with an earlier
+     implementation of the MIPS NaN2008 functionality.  */
+  Val_GNU_MIPS_ABI_FP_NAN2008 = 8,
+
   /* Values defined for Tag_GNU_MIPS_ABI_MSA.  */
 
   /* Not tagged or not using any ABIs affected by the differences.  */
@@ -1307,4 +1317,8 @@ enum
   Val_GNU_MIPS_ABI_MSA_128 = 1,
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _ELF_MIPS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mmix.h ./include/elf/mmix.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mmix.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mmix.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MMIX support for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mn10200.h ./include/elf/mn10200.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mn10200.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mn10200.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MN10200 ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mn10300.h ./include/elf/mn10300.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mn10300.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mn10300.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MN10300 ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/moxie.h ./include/elf/moxie.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/moxie.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/moxie.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* moxie ELF support for BFD.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/msp430.h ./include/elf/msp430.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/msp430.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/msp430.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MSP430 ELF support for BFD.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Dmitry Diky <diwil@mail.ru>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mt.h ./include/elf/mt.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/mt.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/mt.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* MS1  ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/nds32.h ./include/elf/nds32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/nds32.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/nds32.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* NDS32 ELF support for BFD.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Andes Technology Corporation.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/nios2.h ./include/elf/nios2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/nios2.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/nios2.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Altera Nios II ELF support for BFD.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
    Contributed by Nigel Gray (ngray@altera.com).
    Contributed by Mentor Graphics, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/or1k.h ./include/elf/or1k.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/or1k.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/or1k.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Or1k ELF support for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/pj.h ./include/elf/pj.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/pj.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/pj.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* picoJava ELF support for BFD.
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ppc64.h ./include/elf/ppc64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ppc64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ppc64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* PPC64 ELF support for BFD.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -152,11 +152,20 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_typ
 /* Added for ELFv2.  */
   RELOC_NUMBER (R_PPC64_REL24_NOTOC,	   116)
   RELOC_NUMBER (R_PPC64_ADDR64_LOCAL,	   117)
+  RELOC_NUMBER (R_PPC64_ENTRY,		   118)
 
 #ifndef RELOC_MACROS_GEN_FUNC
-/* Fake relocation only used internally by ld.  */
+/* Relocation only used internally by ld.  If you need to use these
+   reloc numbers, you can change them to some other unused value
+   without affecting the ABI.  They will never appear in object files.  */
   RELOC_NUMBER (R_PPC64_LO_DS_OPT,	   128)
+/* Reloc only used internally by gas.  As above, value is unimportant.  */
+  RELOC_NUMBER (R_PPC64_16DX_HA,	   129)
 #endif
+
+/* Power9 split rel16 for addpcis.  */
+  RELOC_NUMBER (R_PPC64_REL16DX_HA,	   246)
+
 /* Support STT_GNU_IFUNC plt calls.  */
   RELOC_NUMBER (R_PPC64_JMP_IREL,	   247)
   RELOC_NUMBER (R_PPC64_IRELATIVE,	   248)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ppc.h ./include/elf/ppc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/ppc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/ppc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* PPC ELF support for BFD.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
    By Michael Meissner, Cygnus Support, <meissner@cygnus.com>,
    from information in the System V Application Binary Interface,
@@ -73,10 +73,14 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
   RELOC_NUMBER (R_PPC_ADDR30,		 37)
 
 #ifndef RELOC_MACROS_GEN_FUNC
-/* Fake relocations for branch stubs, only used internally by ld.  */
+/* Relocations only used internally by ld.  If you need to use these
+   reloc numbers, you can change them to some other unused value
+   without affecting the ABI.  They will never appear in object files.  */
   RELOC_NUMBER (R_PPC_RELAX,		 48)
   RELOC_NUMBER (R_PPC_RELAX_PLT,	 49)
   RELOC_NUMBER (R_PPC_RELAX_PLTREL24,	 50)
+/* Reloc only used internally by gas.  As above, value is unimportant.  */
+  RELOC_NUMBER (R_PPC_16DX_HA,		 51)
 #endif
 
   /* Relocs added to support TLS.  */
@@ -149,6 +153,9 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
   RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16A,	231)
   RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16D,	232)
 
+/* Power9 split rel16 for addpcis.  */
+  RELOC_NUMBER (R_PPC_REL16DX_HA,	246)
+
 /* Support STT_GNU_IFUNC plt calls.  */
   RELOC_NUMBER (R_PPC_IRELATIVE,	248)
 
@@ -199,15 +206,35 @@ END_RELOC_NUMBERS (R_PPC_max)
 						   specified in the associated \
 						   symbol table entry.  */
 
+/* APUinfo note section.  */
+#define APUINFO_SECTION_NAME	".PPC.EMB.apuinfo"
+#define APUINFO_LABEL		"APUinfo"
+
+#define PPC_APUINFO_ISEL	0x40
+#define PPC_APUINFO_PMR		0x41
+#define PPC_APUINFO_RFMCI	0x42
+#define PPC_APUINFO_CACHELCK	0x43
+#define PPC_APUINFO_SPE		0x100
+#define PPC_APUINFO_EFS		0x101
+#define PPC_APUINFO_BRLOCK	0x102
+#define PPC_APUINFO_VLE		0x104
+
 /* Object attribute tags.  */
 enum
 {
   /* 0-3 are generic.  */
-  Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
-			       soft-float, 3 for single=precision 
-			       hard-float; 0 for not tagged or not
-			       using any ABIs affected by the
-			       differences.  */
+
+  /* FP ABI, low 2 bits:
+     1 for double precision hard-float,
+     2 for soft-float,
+     3 for single precision hard-float.
+     0 for not tagged or not using any ABIs affected by the differences.
+     Next 2 bits:
+     1 for ibm long double
+     2 for 64-bit long double
+     3 for IEEE long double.
+     0 for not tagged or not using any ABIs affected by the differences.  */
+  Tag_GNU_Power_ABI_FP = 4,
 
   /* Value 1 for general purpose registers only, 2 for AltiVec
      registers, 3 for SPE registers; 0 for not tagged or not using any
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/pru.h ./include/elf/pru.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/pru.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/elf/pru.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,55 @@
+/* TI PRU ELF support for BFD.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
+   Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+
+/* This file holds definitions specific to the TI PRU ELF ABI.  Note
+   that most of this is not actually implemented by BFD.  */
+
+#ifndef _ELF_PRU_H
+#define _ELF_PRU_H
+
+#include "elf/reloc-macros.h"
+
+START_RELOC_NUMBERS (elf_pru_reloc_type)
+  RELOC_NUMBER (R_PRU_NONE,		    0)
+  RELOC_NUMBER (R_PRU_16_PMEM,		    5)
+  RELOC_NUMBER (R_PRU_U16_PMEMIMM,	    6)
+  RELOC_NUMBER (R_PRU_BFD_RELOC_16,	    8)
+  RELOC_NUMBER (R_PRU_U16,		    9)
+  RELOC_NUMBER (R_PRU_32_PMEM,		    10)
+  RELOC_NUMBER (R_PRU_BFD_RELOC_32,	    11)
+  RELOC_NUMBER (R_PRU_S10_PCREL,	    14)
+  RELOC_NUMBER (R_PRU_U8_PCREL,		    15)
+  RELOC_NUMBER (R_PRU_LDI32,		    18)
+
+  /* Extensions required by GCC, or simply nice to have.  */
+  RELOC_NUMBER (R_PRU_GNU_BFD_RELOC_8,	    64)
+  RELOC_NUMBER (R_PRU_GNU_DIFF8,	    65)
+  RELOC_NUMBER (R_PRU_GNU_DIFF16,	    66)
+  RELOC_NUMBER (R_PRU_GNU_DIFF32,	    67)
+  RELOC_NUMBER (R_PRU_GNU_DIFF16_PMEM,	    68)
+  RELOC_NUMBER (R_PRU_GNU_DIFF32_PMEM,	    69)
+  RELOC_NUMBER (R_PRU_ILLEGAL,		    70)
+END_RELOC_NUMBERS (R_PRU_maxext)
+
+/* Processor-specific section flags.  */
+
+#endif /* _ELF_PRU_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/reloc-macros.h ./include/elf/reloc-macros.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/reloc-macros.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/reloc-macros.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Generic relocation support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/riscv.h ./include/elf/riscv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/riscv.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/elf/riscv.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,112 @@
+/* RISC-V ELF support for BFD.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
+   Contributed by Andrew Waterman (andrew@sifive.com).
+   Based on MIPS ELF support for BFD, by Ian Lance Taylor.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING3. If not,
+   see <http://www.gnu.org/licenses/>.  */
+
+/* This file holds definitions specific to the RISCV ELF ABI.  Note
+   that most of this is not actually implemented by BFD.  */
+
+#ifndef _ELF_RISCV_H
+#define _ELF_RISCV_H
+
+#include "elf/reloc-macros.h"
+#include "libiberty.h"
+
+/* Relocation types.  */
+START_RELOC_NUMBERS (elf_riscv_reloc_type)
+  /* Relocation types used by the dynamic linker.  */
+  RELOC_NUMBER (R_RISCV_NONE, 0)
+  RELOC_NUMBER (R_RISCV_32, 1)
+  RELOC_NUMBER (R_RISCV_64, 2)
+  RELOC_NUMBER (R_RISCV_RELATIVE, 3)
+  RELOC_NUMBER (R_RISCV_COPY, 4)
+  RELOC_NUMBER (R_RISCV_JUMP_SLOT, 5)
+  RELOC_NUMBER (R_RISCV_TLS_DTPMOD32, 6)
+  RELOC_NUMBER (R_RISCV_TLS_DTPMOD64, 7)
+  RELOC_NUMBER (R_RISCV_TLS_DTPREL32, 8)
+  RELOC_NUMBER (R_RISCV_TLS_DTPREL64, 9)
+  RELOC_NUMBER (R_RISCV_TLS_TPREL32, 10)
+  RELOC_NUMBER (R_RISCV_TLS_TPREL64, 11)
+
+  /* Relocation types not used by the dynamic linker.  */
+  RELOC_NUMBER (R_RISCV_BRANCH, 16)
+  RELOC_NUMBER (R_RISCV_JAL, 17)
+  RELOC_NUMBER (R_RISCV_CALL, 18)
+  RELOC_NUMBER (R_RISCV_CALL_PLT, 19)
+  RELOC_NUMBER (R_RISCV_GOT_HI20, 20)
+  RELOC_NUMBER (R_RISCV_TLS_GOT_HI20, 21)
+  RELOC_NUMBER (R_RISCV_TLS_GD_HI20, 22)
+  RELOC_NUMBER (R_RISCV_PCREL_HI20, 23)
+  RELOC_NUMBER (R_RISCV_PCREL_LO12_I, 24)
+  RELOC_NUMBER (R_RISCV_PCREL_LO12_S, 25)
+  RELOC_NUMBER (R_RISCV_HI20, 26)
+  RELOC_NUMBER (R_RISCV_LO12_I, 27)
+  RELOC_NUMBER (R_RISCV_LO12_S, 28)
+  RELOC_NUMBER (R_RISCV_TPREL_HI20, 29)
+  RELOC_NUMBER (R_RISCV_TPREL_LO12_I, 30)
+  RELOC_NUMBER (R_RISCV_TPREL_LO12_S, 31)
+  RELOC_NUMBER (R_RISCV_TPREL_ADD, 32)
+  RELOC_NUMBER (R_RISCV_ADD8, 33)
+  RELOC_NUMBER (R_RISCV_ADD16, 34)
+  RELOC_NUMBER (R_RISCV_ADD32, 35)
+  RELOC_NUMBER (R_RISCV_ADD64, 36)
+  RELOC_NUMBER (R_RISCV_SUB8, 37)
+  RELOC_NUMBER (R_RISCV_SUB16, 38)
+  RELOC_NUMBER (R_RISCV_SUB32, 39)
+  RELOC_NUMBER (R_RISCV_SUB64, 40)
+  RELOC_NUMBER (R_RISCV_GNU_VTINHERIT, 41)
+  RELOC_NUMBER (R_RISCV_GNU_VTENTRY, 42)
+  RELOC_NUMBER (R_RISCV_ALIGN, 43)
+  RELOC_NUMBER (R_RISCV_RVC_BRANCH, 44)
+  RELOC_NUMBER (R_RISCV_RVC_JUMP, 45)
+  RELOC_NUMBER (R_RISCV_RVC_LUI, 46)
+  RELOC_NUMBER (R_RISCV_GPREL_I, 47)
+  RELOC_NUMBER (R_RISCV_GPREL_S, 48)
+  RELOC_NUMBER (R_RISCV_TPREL_I, 49)
+  RELOC_NUMBER (R_RISCV_TPREL_S, 50)
+  RELOC_NUMBER (R_RISCV_RELAX, 51)
+  RELOC_NUMBER (R_RISCV_SUB6, 52)
+  RELOC_NUMBER (R_RISCV_SET6, 53)
+  RELOC_NUMBER (R_RISCV_SET8, 54)
+  RELOC_NUMBER (R_RISCV_SET16, 55)
+  RELOC_NUMBER (R_RISCV_SET32, 56)
+END_RELOC_NUMBERS (R_RISCV_max)
+
+/* Processor specific flags for the ELF header e_flags field.  */
+
+/* File may contain compressed instructions.  */
+#define EF_RISCV_RVC 0x0001
+
+/* Which floating-point ABI a file uses.  */
+#define EF_RISCV_FLOAT_ABI 0x0006
+
+/* File uses the soft-float ABI.  */
+#define EF_RISCV_FLOAT_ABI_SOFT 0x0000
+
+/* File uses the single-float ABI.  */
+#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002
+
+/* File uses the double-float ABI.  */
+#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004
+
+/* File uses the quad-float ABI.  */
+#define EF_RISCV_FLOAT_ABI_QUAD 0x0006
+
+#endif /* _ELF_RISCV_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/rl78.h ./include/elf/rl78.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/rl78.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/rl78.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* RL78 ELF support for BFD.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/rx.h ./include/elf/rx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/rx.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/rx.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* RX ELF support for BFD.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -119,11 +119,11 @@ END_RELOC_NUMBERS (R_RX_max)
 #define E_FLAG_RX_DSP			(1 << 1) /* Defined in the RX CPU Object file specification, but not explained. */
 #define E_FLAG_RX_PID			(1 << 2) /* Unofficial - DJ */
 #define E_FLAG_RX_ABI			(1 << 3) /* Binary passes stacked arguments using natural alignment.  Unofficial - NC.  */
-
 #define E_FLAG_RX_SINSNS_SET		(1 << 6) /* Set if bit-5 is significant.  */
 #define E_FLAG_RX_SINSNS_YES		(1 << 7) /* Set if string instructions are used in the binary.  */
 #define E_FLAG_RX_SINSNS_NO		0        /* Bit-5 if this binary must not be linked with a string instruction using binary.  */
 #define E_FLAG_RX_SINSNS_MASK		(3 << 6) /* Mask of bits used to determine string instruction use.  */
+#define E_FLAG_RX_V2			(1 << 8) /* RX v2 instructions */
 
 /* These define the addend field of R_RX_RH_RELAX relocations.  */
 #define	RX_RELAXA_IMM6	0x00000010	/* Imm8/16/24/32 at bit offset 6.  */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/s390.h ./include/elf/s390.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/s390.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/s390.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* 390 ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/score.h ./include/elf/score.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/score.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/score.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Score ELF support for BFD.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by 
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/sh.h ./include/elf/sh.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/sh.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/sh.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* SH ELF support for BFD.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -20,6 +20,10 @@
 #ifndef _ELF_SH_H
 #define _ELF_SH_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Processor specific flags for the ELF header e_flags field.  */
 
 #define EF_SH_MACH_MASK	0x1f
@@ -246,4 +250,8 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
   RELOC_NUMBER (R_SH_64_PCREL, 255)
 END_RELOC_NUMBERS (R_SH_max)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/sparc.h ./include/elf/sparc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/sparc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/sparc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* SPARC ELF support for BFD.
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    By Doug Evans, Cygnus Support, <dje@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/spu.h ./include/elf/spu.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/spu.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/spu.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* SPU ELF support for BFD.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tic6x-attrs.h ./include/elf/tic6x-attrs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tic6x-attrs.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/tic6x-attrs.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* TI C6X ELF attributes.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tic6x.h ./include/elf/tic6x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tic6x.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/tic6x.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* TI C6X ELF support for BFD.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tilegx.h ./include/elf/tilegx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tilegx.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/tilegx.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILE-Gx ELF support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tilepro.h ./include/elf/tilepro.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/tilepro.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/tilepro.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* TILEPro ELF support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/v850.h ./include/elf/v850.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/v850.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/v850.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* V850 ELF support for BFD.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/vax.h ./include/elf/vax.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/vax.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/vax.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* VAX ELF support for BFD.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    Contributed by Matt Thomas <matt@3am-software.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/visium.h ./include/elf/visium.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/visium.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/visium.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Visium ELF support for BFD.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/vxworks.h ./include/elf/vxworks.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/vxworks.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/vxworks.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* VxWorks ELF support for BFD.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2017 Free Software Foundation, Inc.
 
    Contributed by Nathan Sidwell <nathan@codesourcery.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/x86-64.h ./include/elf/x86-64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/x86-64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/x86-64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* x86_64 ELF support for BFD.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
    Contributed by Jan Hubicka <jh@suse.cz>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -72,10 +72,16 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_ty
      RELOC_NUMBER (R_X86_64_TLSDESC, 36)      /* 2x64-bit TLS descriptor.  */
      RELOC_NUMBER (R_X86_64_IRELATIVE, 37)    /* Adjust indirectly by program base */
      RELOC_NUMBER (R_X86_64_RELATIVE64, 38)   /* 64bit adjust by program base */
-     RELOC_NUMBER (R_X86_64_PC32_BND, 39)      /* PC relative 32 bit
-						  signed with BND prefix  */
-     RELOC_NUMBER (R_X86_64_PLT32_BND, 40)     /* 32 bit PLT address with
-						  BND prefix */
+     RELOC_NUMBER (R_X86_64_PC32_BND, 39)     /* PC relative 32 bit
+						 signed with BND prefix  */
+     RELOC_NUMBER (R_X86_64_PLT32_BND, 40)    /* 32 bit PLT address with
+						 BND prefix */
+     /* Load from 32 bit signed pc relative offset to GOT entry without
+	REX prefix, relaxable.  */
+     RELOC_NUMBER (R_X86_64_GOTPCRELX, 41)
+     /* Load from 32 bit signed pc relative offset to GOT entry with
+	REX prefix, relaxable.  */
+     RELOC_NUMBER (R_X86_64_REX_GOTPCRELX, 42)
      RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250)       /* GNU C++ hack  */
      RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251)         /* GNU C++ hack  */
 END_RELOC_NUMBERS (R_X86_64_max)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xc16x.h ./include/elf/xc16x.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xc16x.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/xc16x.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Infineon XC16X ELF support for BFD.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2017 Free Software Foundation, Inc.
    Contributed by KPIT Cummins Infosystems 
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xgate.h ./include/elf/xgate.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xgate.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/xgate.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* XGATE ELF support for BFD.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xstormy16.h ./include/elf/xstormy16.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xstormy16.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/xstormy16.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* XSTORMY16 ELF support for BFD.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xtensa.h ./include/elf/xtensa.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/elf/xtensa.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/elf/xtensa.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Xtensa ELF support for BFD.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -26,6 +26,10 @@
 
 #include "elf/reloc-macros.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Relocations.  */
 START_RELOC_NUMBERS (elf_xtensa_reloc_type)
      RELOC_NUMBER (R_XTENSA_NONE, 0)
@@ -205,4 +209,10 @@ typedef struct property_table_entry_t
 
 #define XTENSA_PROP_INSN_ABSLIT        0x00020000
 
+extern asection *xtensa_make_property_section (asection *, const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _ELF_XTENSA_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/environ.h ./include/environ.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/environ.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/environ.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,33 @@
+/* Declare the environ system variable.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB.  If not,
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA.  */
+
+/* On OSX, the environ variable can be used directly in the code of an
+   executable, but cannot be used in the code of a shared library (such as
+   GCC's liblto_plugin, which links in libiberty code).  Instead, the
+   function _NSGetEnviron can be called to get the address of environ.  */
+
+#ifndef HAVE_ENVIRON_DECL
+#  ifdef __APPLE__
+#     include <crt_externs.h>
+#     define environ (*_NSGetEnviron ())
+#  else
+extern char **environ;
+#  endif
+#  define HAVE_ENVIRON_DECL
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fibheap.h ./include/fibheap.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fibheap.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/fibheap.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* A Fibonacci heap datatype.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by Daniel Berlin (dan@cgsoftware.com).
 
 This file is part of GCC.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/filenames.h ./include/filenames.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/filenames.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/filenames.h	2017-03-06 01:49:08.000000000 +0000
@@ -5,7 +5,7 @@
    use forward- and back-slash in path names interchangeably, and
    some of them have case-insensitive file names.
 
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/floatformat.h ./include/floatformat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/floatformat.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/floatformat.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* IEEE floating point support declarations, for GDB, the GNU Debugger.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fnmatch.h ./include/fnmatch.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fnmatch.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/fnmatch.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
 NOTE: The canonical source of this file is maintained with the GNU C Library.
 Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-bin.h ./include/fopen-bin.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-bin.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/fopen-bin.h	2017-03-06 01:49:08.000000000 +0000
@@ -7,7 +7,7 @@
    cope with a "b" in the string, indicating binary files, but some reject this
    (and thereby don't conform to ANSI C, but what else is new?).
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-same.h ./include/fopen-same.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-same.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/fopen-same.h	2017-03-06 01:49:08.000000000 +0000
@@ -7,7 +7,7 @@
    "b" to the string, indicating binary files, but some reject this
    (and thereby don't conform to ANSI C, but what else is new?).
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-vms.h ./include/fopen-vms.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/fopen-vms.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/fopen-vms.h	2017-03-06 01:49:08.000000000 +0000
@@ -5,7 +5,7 @@
    This version is for VMS systems, where text and binary files are
    different.
    
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-c-fe.def ./include/gcc-c-fe.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-c-fe.def	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gcc-c-fe.def	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between GCC C FE and GDB  -*- c -*-
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-c-interface.h ./include/gcc-c-interface.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-c-interface.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gcc-c-interface.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Interface between GCC C FE and GDB
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-interface.h ./include/gcc-interface.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gcc-interface.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gcc-interface.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Generic interface between GCC and GDB
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/callback.h ./include/gdb/callback.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/callback.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/callback.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Remote target system call callback support.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/ChangeLog ./include/gdb/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/ChangeLog	2017-03-06 01:49:08.000000000 +0000
@@ -1,3 +1,37 @@
+2016-07-15  John Baldwin  <jhb@FreeBSD.org>
+
+	* signals.def: Add GDB_SIGNAL_LIBRT.
+
+2016-01-06  Mike Frysinger  <vapier@gentoo.org>
+
+	* remote-sim.h (sim_open): Mark argv const.
+	(sim_create_inferior): Mark argv and env const.
+
+2015-11-24  Nick Clifton  <nickc@redhat.com>
+
+	* sim-aarch64.h: New file.
+
+2015-11-15  Mike Frysinger  <vapier@gentoo.org>
+
+	* sim-cr16.h (SIM_CR16_MEMORY_UNIFIED, SIM_CR16_MEMORY_INSN,
+	SIM_CR16_MEMORY_DATA, SIM_CR16_MEMORY_DMAP, SIM_CR16_MEMORY_IMAP):
+	Delete.
+
+2015-11-14  Mike Frysinger  <vapier@gentoo.org>
+
+	* sim-arm.h: Delete __cplusplus checks and extern "C" linkage.
+	* sim-cr16.h, sim-d10v.h, sim-frv.h, sim-h8300.h, sim-lm32.h,
+	sim-sh.h: Likewise.
+
+2015-11-10  Mike Frysinger  <vapier@gentoo.org>
+
+	* sim-cr16.h (sim_cr16_translate_dmap_addr): Delete.
+	(sim_cr16_translate_imap_addr): Likewise.
+	(sim_cr16_translate_addr): Likewise.
+	* sim-d10v.h (sim_d10v_translate_dmap_addr): Delete.
+	(sim_d10v_translate_imap_addr): Likewise.
+	(sim_d10v_translate_addr): Likewise.
+
 2015-06-17  Mike Frysinger  <vapier@gentoo.org>
 
 	* callback.h (CB_TARGET_DEFS_MAP): Add name member.
@@ -42,9 +76,13 @@
 
 	* section-scripts.h: New file.
 
+2013-10-22  Sterling Augustine  <saugustine@google.com>
+
+	* gdb-index.h: Merge from gdb tree.
+
 2013-03-15  Steve Ellcey  <sellcey@mips.com>
 
-	* gdb/remote-sim.h (sim_command_completer): Make char arguments const.
+	* remote-sim.h (sim_command_completer): Make char arguments const.
 
 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
 
@@ -58,7 +96,7 @@
 
 	PR gdb/7205
 
-        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+	Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
 
 2012-05-24  Pedro Alves  <palves@redhat.com>
 
@@ -122,7 +160,7 @@
 
 2009-05-18  Jon Beniston <jon@beniston.com>
 
-        * sim-lm32.h: New file.
+	* sim-lm32.h: New file.
 
 2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
 
@@ -209,7 +247,7 @@
 
 2003-06-10  Corinna Vinschen  <vinschen@redhat.com>
 
-	* gdb/fileio.h: New file.
+	* fileio.h: New file.
 
 2003-05-07  Andrew Cagney  <cagney@redhat.com>
 
@@ -247,7 +285,7 @@
 2002-07-29  Andrey Volkov  <avolkov@transas.com>
 
 	* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
-	 prefix.
+	prefix.
 
 2002-07-23  Andrey Volkov  <avolkov@transas.com>
 
@@ -289,7 +327,7 @@ Wed Jul 17 19:36:38 2002  J"orn Rennecke
 
 2002-05-10  Elena Zannoni  <ezannoni@redhat.com>
 
-        * sim-sh.h: New file, for sh gdb<->sim interface.
+	* sim-sh.h: New file, for sh gdb<->sim interface.
 
 2002-05-09  Daniel Jacobowitz  <drow@mvista.com>
 
@@ -302,7 +340,7 @@ Wed Jul 17 19:36:38 2002  J"orn Rennecke
 	* signals.h: New file, from gdb/defs.h.
 
 
-Copyright (C) 2002-2015 Free Software Foundation, Inc.
+Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/fileio.h ./include/gdb/fileio.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/fileio.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/fileio.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Hosted File I/O interface definitions, for GDB, the GNU Debugger.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/gdb-index.h ./include/gdb/gdb-index.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/gdb-index.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/gdb-index.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Public attributes of the .gdb_index section.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/remote-sim.h ./include/gdb/remote-sim.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/remote-sim.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/remote-sim.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the simulator and gdb.
 
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -104,7 +104,8 @@ struct host_callback_struct;
    sim_create_inferior.  FIXME: What should the state of the simulator
    be? */
 
-SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char **argv);
+SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback,
+		   struct bfd *abfd, char * const *argv);
 
 
 /* Destory a simulator instance.
@@ -161,7 +162,8 @@ SIM_RC sim_load (SIM_DESC sd, const char
    address space (according to the applicable ABI) and the program
    counter and stack pointer set accordingly. */
 
-SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env);
+SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
+			    char * const *argv, char * const *env);
 
 
 /* Fetch LENGTH bytes of the simulated program's memory.  Start fetch
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/section-scripts.h ./include/gdb/section-scripts.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/section-scripts.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/section-scripts.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Definition of kinds of records in section .debug_gdb_scripts.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/signals.def ./include/gdb/signals.def
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/signals.def	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/signals.def	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target signal numbers for GDB and the GDB remote protocol.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -194,7 +194,9 @@ SET (GDB_EXC_EMULATION, 148, "EXC_EMULAT
 SET (GDB_EXC_SOFTWARE, 149, "EXC_SOFTWARE", "Software generated exception")
 SET (GDB_EXC_BREAKPOINT, 150, "EXC_BREAKPOINT", "Breakpoint")
 
+SET (GDB_SIGNAL_LIBRT, 151, "SIGLIBRT", "librt internal signal")
+
 /* If you are adding a new signal, add it just above this comment.  */
 
 /* Last and unused enum value, for sizing arrays, etc.  */
-SET (GDB_SIGNAL_LAST, 151, NULL, "GDB_SIGNAL_LAST")
+SET (GDB_SIGNAL_LAST, 152, NULL, "GDB_SIGNAL_LAST")
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/signals.h ./include/gdb/signals.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/signals.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/signals.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Target signal numbers for GDB and the GDB remote protocol.
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-aarch64.h ./include/gdb/sim-aarch64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-aarch64.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/gdb/sim-aarch64.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,48 @@
+/* sim-aarch64.h --- interface between AArch64 simulator and GDB.
+
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   Contributed by Red Hat.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#if !defined (SIM_AARCH64_H)
+#define SIM_AARCH64_H
+
+enum sim_aarch64_regnum
+{
+  SIM_AARCH64_R0_REGNUM,
+  SIM_AARCH64_R1_REGNUM,
+  SIM_AARCH64_R2_REGNUM,
+  SIM_AARCH64_R3_REGNUM,
+  SIM_AARCH64_R4_REGNUM,
+  SIM_AARCH64_R5_REGNUM,
+  SIM_AARCH64_R6_REGNUM,
+  SIM_AARCH64_R7_REGNUM,
+  SIM_AARCH64_R8_REGNUM,
+  SIM_AARCH64_R9_REGNUM,
+  SIM_AARCH64_R10_REGNUM,
+  SIM_AARCH64_R11_REGNUM,
+  SIM_AARCH64_R12_REGNUM,
+  SIM_AARCH64_R13_REGNUM,
+  SIM_AARCH64_R14_REGNUM,
+  SIM_AARCH64_R15_REGNUM,
+  SIM_AARCH64_SP_REGNUM,
+  SIM_AARCH64_PC_REGNUM,
+  SIM_AARCH64_NUM_REGS
+};
+
+#endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-arm.h ./include/gdb/sim-arm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-arm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-arm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the Arm simulator and GDB.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -22,10 +22,6 @@
 #if !defined (SIM_ARM_H)
 #define SIM_ARM_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
 enum sim_arm_regs
 {
   SIM_ARM_R0_REGNUM,
@@ -105,8 +101,4 @@ enum sim_arm_regs
   SIM_ARM_IWMMXT_COP1R15_REGNUM
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-bfin.h ./include/gdb/sim-bfin.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-bfin.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-bfin.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the Blackfin simulator and GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Analog Devices.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-cr16.h ./include/gdb/sim-cr16.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-cr16.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-cr16.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the cr16 simulator and gdb.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,42 +20,6 @@
 #if !defined (SIM_CR16_H)
 #define SIM_CR16_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-enum
-  {
-    SIM_CR16_MEMORY_UNIFIED = 0x00000000,
-    SIM_CR16_MEMORY_INSN    = 0x10000000,
-    SIM_CR16_MEMORY_DATA    = 0x10000000,
-    SIM_CR16_MEMORY_DMAP    = 0x10000000,
-    SIM_CR16_MEMORY_IMAP    = 0x10000000
-  };
-
-extern unsigned long sim_cr16_translate_dmap_addr
-  (unsigned long offset,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*dmap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_cr16_translate_imap_addr
-  (unsigned long offset,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_cr16_translate_addr
-  (unsigned long vaddr,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*dmap_register) (void *regcache, int reg_nr),
-   unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-
 /* The simulator makes use of the following register information. */
 
 enum sim_cr16_regs
@@ -99,8 +63,4 @@ enum
   SIM_CR16_NR_CR_REGS = 11
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-d10v.h ./include/gdb/sim-d10v.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-d10v.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-d10v.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the d10v simulator and gdb.
 
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,10 +20,6 @@
 #if !defined (SIM_D10V_H)
 #define SIM_D10V_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
 /* GDB interprets addresses as:
 
    0x00xxxxxx: Physical unified memory segment     (Unified memory)
@@ -53,29 +49,6 @@ enum
     SIM_D10V_MEMORY_IMAP = 0x11000000
   };
 
-extern unsigned long sim_d10v_translate_dmap_addr
-  (unsigned long offset,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*dmap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_d10v_translate_imap_addr
-  (unsigned long offset,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_d10v_translate_addr
-  (unsigned long vaddr,
-   int nr_bytes,
-   unsigned long *phys,
-   void *regcache,
-   unsigned long (*dmap_register) (void *regcache, int reg_nr),
-   unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-
 /* The simulator makes use of the following register information. */
 
 enum sim_d10v_regs
@@ -134,8 +107,4 @@ enum
   SIM_D10V_NR_CR_REGS = 16
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-frv.h ./include/gdb/sim-frv.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-frv.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-frv.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the FR-V simulator and GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -22,10 +22,6 @@
 #if !defined (SIM_FRV_H)
 #define SIM_FRV_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
 enum sim_frv_regs
 {
   SIM_FRV_GR0_REGNUM  = 0,
@@ -44,8 +40,4 @@ enum sim_frv_regs
   SIM_FRV_SPR4095_REGNUM = SIM_FRV_SPR0_REGNUM + 4095
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-ft32.h ./include/gdb/sim-ft32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-ft32.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-ft32.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* This file defines the interface between the FT32 simulator and GDB.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by FTDI.
 
    This file is part of GDB.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-h8300.h ./include/gdb/sim-h8300.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-h8300.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-h8300.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* This file defines the interface between the h8300 simulator and gdb.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,13 +19,9 @@
 #if !defined (SIM_H8300_H)
 #define SIM_H8300_H
 
-#ifdef __cplusplus
-extern "C" { //}
-#endif
-
 /* The simulator makes use of the following register information. */
 
-  enum sim_h8300_regs
+enum sim_h8300_regs
   {
     /* Registers common to all the H8 variants. */
     /* Start here: */
@@ -52,7 +48,7 @@ extern "C" { //}
     SIM_H8300_TICK_REGNUM
   };
 
-  enum
+enum
   {
     SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
                                                          may be passed */
@@ -63,15 +59,11 @@ extern "C" { //}
     SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM  /* Contains address of top of stack */
   };
 
-  enum
+enum
   {
     SIM_H8300_NUM_COMMON_REGS = 10,
     SIM_H8300_S_NUM_REGS = 13,
     SIM_H8300_NUM_REGS = 16
   };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif				/* SIM_H8300_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-lm32.h ./include/gdb/sim-lm32.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-lm32.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-lm32.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,7 +1,7 @@
 /* This file defines the interface between the LM32 simulator and GDB.
    Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,10 +21,6 @@
 #ifndef SIM_LM32_H
 #define SIM_LM32_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
 enum sim_lm32_regs
 {
   SIM_LM32_R0_REGNUM,
@@ -69,8 +65,4 @@ enum sim_lm32_regs
   SIM_LM32_NUM_REGS      
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-m32c.h ./include/gdb/sim-m32c.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-m32c.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-m32c.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* This file defines the interface between the m32c simulator and gdb.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-ppc.h ./include/gdb/sim-ppc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-ppc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-ppc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* sim-ppc.h --- interface between PowerPC simulator and GDB.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-rl78.h ./include/gdb/sim-rl78.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-rl78.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-rl78.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* sim-rx.h --- interface between rl78 simulator and GDB.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-rx.h ./include/gdb/sim-rx.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-rx.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-rx.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* sim-rx.h --- interface between RX simulator and GDB.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-sh.h ./include/gdb/sim-sh.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/gdb/sim-sh.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/gdb/sim-sh.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* This file defines the interface between the sh simulator and gdb.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,10 +19,6 @@
 #if !defined (SIM_SH_H)
 #define SIM_SH_H
 
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
 /* The simulator makes use of the following register information. */
 
 enum
@@ -162,8 +158,4 @@ enum
   SIM_SH64_NR_FP_REGS = 64 /* number of floating point registers */
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/getopt.h ./include/getopt.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/getopt.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/getopt.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/hashtab.h ./include/hashtab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/hashtab.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/hashtab.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* An expandable hash tables datatype.  
-   Copyright (C) 1999-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
 This program is free software; you can redistribute it and/or modify
@@ -38,10 +38,6 @@ extern "C" {
 
 #include "ansidecl.h"
 
-#ifndef GTY
-#define GTY(X)
-#endif
-
 /* The type for a hash code.  */
 typedef unsigned int hashval_t;
 
@@ -96,7 +92,7 @@ typedef void (*htab_free_with_arg) (void
    functions mentioned below.  The size of this structure is subject to
    change.  */
 
-struct GTY(()) htab {
+struct htab {
   /* Pointer to hash function.  */
   htab_hash hash_f;
 
@@ -107,7 +103,7 @@ struct GTY(()) htab {
   htab_del del_f;
 
   /* Table itself.  */
-  void ** GTY ((use_param, length ("%h.size"))) entries;
+  void **entries;
 
   /* Current size (in entries) of the hash table.  */
   size_t size;
@@ -131,7 +127,7 @@ struct GTY(()) htab {
   htab_free free_f;
 
   /* Alternate allocate/free functions, which take an extra argument.  */
-  void * GTY((skip)) alloc_arg;
+  void *alloc_arg;
   htab_alloc_with_arg alloc_with_arg_f;
   htab_free_with_arg free_with_arg_f;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/hp-symtab.h ./include/hp-symtab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/hp-symtab.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/hp-symtab.h	2017-03-06 01:49:08.000000000 +0000
@@ -4,7 +4,7 @@
    Written by the Center for Software Science at the University of Utah
    and by Cygnus Support.
 
-   Copyright (C) 1994-2015 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ieee.h ./include/ieee.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/ieee.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/ieee.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/leb128.h ./include/leb128.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/leb128.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/leb128.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Utilities for reading leb128 values.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 This file is part of the libiberty library.
 Libiberty is free software; you can redistribute it and/or
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/libiberty.h ./include/libiberty.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/libiberty.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/libiberty.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* Function declarations for libiberty.
 
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    
    Note - certain prototypes declared in this header file are for
    functions whoes implementation copyright does not belong to the
@@ -80,7 +80,7 @@ extern void freeargv (char **);
 /* Duplicate an argument vector. Allocates memory using malloc.  Use
    freeargv to free the vector.  */
 
-extern char **dupargv (char **) ATTRIBUTE_MALLOC;
+extern char **dupargv (char * const *) ATTRIBUTE_MALLOC;
 
 /* Expand "@file" arguments in argv.  */
 
@@ -88,11 +88,11 @@ extern void expandargv (int *, char ***)
 
 /* Write argv to an @-file, inserting necessary quoting.  */
 
-extern int writeargv (char **, FILE *);
+extern int writeargv (char * const *, FILE *);
 
 /* Return the number of elements in argv.  */
 
-extern int countargv (char**);
+extern int countargv (char * const *);
 
 /* Return the last component of a path name.  Note that we can't use a
    prototype here because the parameter is declared inconsistently
@@ -397,6 +397,17 @@ extern void hex_init (void);
 /* Save files used for communication between processes.  */
 #define PEX_SAVE_TEMPS		0x4
 
+/* Max number of alloca bytes per call before we must switch to malloc.
+
+   ?? Swiped from gnulib's regex_internal.h header.  Is this actually
+   the case?  This number seems arbitrary, though sane.
+
+   The OS usually guarantees only one guard page at the bottom of the stack,
+   and a page size can be as small as 4096 bytes.  So we cannot safely
+   allocate anything larger than 4096 bytes.  Also care for the possibility
+   of a few compiler-allocated temporary stack slots.  */
+#define MAX_ALLOCA_SIZE	4032
+
 /* Prepare to execute one or more programs, with standard output of
    each program fed to standard input of the next.
    FLAGS	As above.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/longlong.h ./include/longlong.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/longlong.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/longlong.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
@@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attr
 #endif /* __aarch64__ */
 
 #if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+   errors on __builtin_alpha_umulh.  */
+#if !defined(__cplusplus) || __GNUC__ >= 5
 #define umul_ppmm(ph, pl, m0, m1) \
   do {									\
     UDItype __m0 = (m0), __m1 = (m1);					\
@@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attr
     (pl) = __m0 * __m1;							\
   } while (0)
 #define UMUL_TIME 46
+#endif /* !c++ */
 #ifndef LONGLONG_STANDALONE
 #define udiv_qrnnd(q, r, n1, n0, d) \
   do { UDItype __r;							\
@@ -1082,7 +1086,7 @@ extern UDItype __umulsidi3 (USItype, USI
   } while (0)
 #endif
 
-#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
 #ifndef __sh1__
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ (								\
@@ -1098,6 +1102,33 @@ extern UDItype __umulsidi3 (USItype, USI
 /* This is the same algorithm as __udiv_qrnnd_c.  */
 #define UDIV_NEEDS_NORMALIZATION 1
 
+#ifdef __FDPIC__
+/* FDPIC needs a special version of the asm fragment to extract the
+   code address from the function descriptor. __udiv_qrnnd_16 is
+   assumed to be local and not to use the GOT, so loading r12 is
+   not needed. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+  do {									\
+    extern UWtype __udiv_qrnnd_16 (UWtype, UWtype)			\
+			__attribute__ ((visibility ("hidden")));	\
+    /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */	\
+    __asm__ (								\
+	"mov%M4	%4,r5\n"						\
+"	swap.w	%3,r4\n"						\
+"	swap.w	r5,r6\n"						\
+"	mov.l	@%5,r2\n"						\
+"	jsr	@r2\n"							\
+"	shll16	r6\n"							\
+"	swap.w	r4,r4\n"						\
+"	mov.l	@%5,r2\n"						\
+"	jsr	@r2\n"							\
+"	swap.w	r1,%0\n"						\
+"	or	r1,%0"							\
+	: "=r" (q), "=&z" (r)						\
+	: "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16)		\
+	: "r1", "r2", "r4", "r5", "r6", "pr", "t");			\
+  } while (0)
+#else
 #define udiv_qrnnd(q, r, n1, n0, d) \
   do {									\
     extern UWtype __udiv_qrnnd_16 (UWtype, UWtype)			\
@@ -1117,6 +1148,7 @@ extern UDItype __umulsidi3 (USItype, USI
 	: "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16)		\
 	: "r1", "r2", "r4", "r5", "r6", "pr", "t");			\
   } while (0)
+#endif /* __FDPIC__  */
 
 #define UDIV_TIME 80
 
@@ -1127,7 +1159,7 @@ extern UDItype __umulsidi3 (USItype, USI
 
 #endif /* __sh__ */
 
-#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
 #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
 #define count_leading_zeros(count, x) \
   do									\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/lto-symtab.h ./include/lto-symtab.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/lto-symtab.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/lto-symtab.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Data types used in the IL symbol table.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
    Contributed by Rafael Espindola <espindola@google.com>
 
 This file is part of GCC.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/arm64.h ./include/mach-o/arm64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/arm64.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/mach-o/arm64.h	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,50 @@
+/* Mach-O arm declarations for BFD.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef _MACH_O_ARM64_H
+#define _MACH_O_ARM64_H
+
+/* ARM64 relocations.  */
+
+/* Relocations for addresses in data.  */
+#define BFD_MACH_O_ARM64_RELOC_UNSIGNED		0
+#define BFD_MACH_O_ARM64_RELOC_SUBTRACTOR	1
+
+/* Relocation for a call.  */
+#define BFD_MACH_O_ARM64_RELOC_BRANCH26		2
+
+/* Relocations for local data.  */
+#define BFD_MACH_O_ARM64_RELOC_PAGE21		3
+#define BFD_MACH_O_ARM64_RELOC_PAGEOFF12	4
+
+/* Relocations for global data.  */
+#define BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGE21		5
+#define BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGEOFF12	6
+
+/* Relocation for personality routine.  */
+#define BFD_MACH_O_ARM64_RELOC_POINTER_TO_GOT		7
+
+/* Relocations for thread local data.  */
+#define BFD_MACH_O_ARM64_RELOC_TLVP_LOAD_PAGE21		8
+#define BFD_MACH_O_ARM64_RELOC_TLVP_LOAD_PAGEOFF12	9
+
+#define BFD_MACH_O_ARM64_RELOC_ADDEND			10
+
+#endif /* _MACH_O_ARM64_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/arm.h ./include/mach-o/arm.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/arm.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/arm.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O arm declarations for BFD.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/ChangeLog ./include/mach-o/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,116 +0,0 @@
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-04-16  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h: Add macros for rebase, bind and export constants.
-
-2014-04-16  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h (BFD_MACH_O_CPU_ARCH_MASK, BFD_MACH_O_CPU_ARCH_ABI64)
-	(BFD_MACH_O_CPU_SUBTYPE_MASK, BFD_MACH_O_CPU_SUBTYPE_LIB64): Define.
-
-2014-04-03  Tristan Gingold  <gingold@adacore.com>
-
-	* unwind.h (mach_o_compact_unwind_64): Fix typo in personality.
-
-2014-04-02  Tristan Gingold  <gingold@adacore.com>
-
-	* external.h (mach_o_prebound_dylib_command_external)
-	(mach_o_prebind_cksum_command_external)
-	(mach_o_twolevel_hints_command_external): New types.
-
-2014-03-26  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_ARM64.
-
-2014-03-17  Tristan Gingold  <gingold@adacore.com>
-
-	* unwind.h: New file.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2012-11-14  Tristan Gingold  <gingold@adacore.com>
-
-	* external.h (mach_o_entry_point_command_external)
-	(mach_o_source_version_command_external)
-	(mach_o_data_in_code_entry_external): New structures.
-
-	* loader.h (bfd_mach_o_load_command_type): Add
-	BFD_MACH_O_LC_MAIN, BFD_MACH_O_LC_DATA_IN_CODE,
-	BFD_MACH_O_LC_SOURCE_VERSION and BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS.
-	(BFD_MACH_O_REFERENCE_MASK): Adjust value.
-	(BFD_MACH_O_N_REF_TO_WEAK): New definition.
-	(BFD_MACH_O_N_ARM_THUMB_DEF, BFD_MACH_O_N_SYMBOL_RESOLVER): Likewise.
-	(bfd_mach_o_data_in_code_entry_kind): New enum.
-
-2012-11-14  Tristan Gingold  <gingold@adacore.com>
-
-	* arm.h: New file.
-
-2012-02-23  Iain Sandoe  <idsandoe@googlemail.com>
-
-	* external.h: Add comments about relocations fields.  Add macros
-	for non-scattered relocations.  Move scattered relocation macros to
-	here.
-	* reloc.h: Remove macros related to external representation of reloc
-	fields.
-
-2012-01-12  Iain Sandoe  <idsandoe@googlemail.com>
-
-	* loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New.
-	(BFD_MACH_O_INDIRECT_SYM_ABS): New
-
-2012-01-04  Tristan Gingold  <gingold@adacore.com>
-
-	* external.h (mach_o_fvmlib_command_external): New structure.
-
-2012-01-04  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h: Update copyright year.
-	(bfd_mach_o_cpu_subtype): Add ARM subtypes.
-
-2012-01-04  Tristan Gingold  <gingold@adacore.com>
-
-	* external.h: Update copyright year.
-	(mach_o_symtab_command_external): Add comments.
-	(mach_o_encryption_info_command_external): New structure.
-
-2011-12-16  Tristan Gingold  <gingold@adacore.com>
-
-	* codesign.h: New file.
-
-2011-08-08  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h (bfd_mach_o_load_command_type): Add
-	BFD_MACH_O_LC_LOAD_UPWARD_DYLIB, BFD_MACH_O_LC_VERSION_MIN_MACOSX,
-	BFD_MACH_O_LC_VERSION_MIN_IPHONEOS, BFD_MACH_O_LC_FUNCTION_STARTS,
-	and BFD_MACH_O_LC_DYLD_ENVIRONMENT.
-	* external.h (mach_o_version_min_command_external): New structure.
-
-2011-08-08  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h: Reorder declarations.
-	* x86-64.h: New file.
-	* external.h: New file.
-	* reloc.h: New file.
-
-2011-07-06  Tristan Gingold  <gingold@adacore.com>
-
-	* loader.h: New file.
-
-Copyright (C) 2011-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/ChangeLog-1115 ./include/mach-o/ChangeLog-1115
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/ChangeLog-1115	1970-01-01 00:00:00.000000000 +0000
+++ ./include/mach-o/ChangeLog-1115	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,136 @@
+2015-12-03  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h (bfd_mach_o_header_flags): Add
+	BFD_MACH_O_MH_APP_EXTENSION_SAFE.
+
+2015-11-17  Tristan Gingold  <gingold@adacore.com>
+
+	* arm64.h: New file.
+	* arm.h: New file.
+	* unwind.h: Add arm64 encodings.
+	* loader.h (bfd_mach_o_cpu_subtype): Add arm64 literals.
+	(BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_LINKER_OPTIONS)
+	(BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT)
+	(BFD_MACH_O_LC_VERSION_MIN_WATCHOS): Define.
+	* external.h (mach_o_encryption_info_64_command_external):
+	(mach_o_linker_option_command_external)
+	(mach_o_dyld_cache_header_external)
+	(mach_o_dyld_cache_mapping_info_external)
+	(mach_o_dyld_cache_image_info_external): New types.
+
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-04-16  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h: Add macros for rebase, bind and export constants.
+
+2014-04-16  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h (BFD_MACH_O_CPU_ARCH_MASK, BFD_MACH_O_CPU_ARCH_ABI64)
+	(BFD_MACH_O_CPU_SUBTYPE_MASK, BFD_MACH_O_CPU_SUBTYPE_LIB64): Define.
+
+2014-04-03  Tristan Gingold  <gingold@adacore.com>
+
+	* unwind.h (mach_o_compact_unwind_64): Fix typo in personality.
+
+2014-04-02  Tristan Gingold  <gingold@adacore.com>
+
+	* external.h (mach_o_prebound_dylib_command_external)
+	(mach_o_prebind_cksum_command_external)
+	(mach_o_twolevel_hints_command_external): New types.
+
+2014-03-26  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_ARM64.
+
+2014-03-17  Tristan Gingold  <gingold@adacore.com>
+
+	* unwind.h: New file.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2012-11-14  Tristan Gingold  <gingold@adacore.com>
+
+	* external.h (mach_o_entry_point_command_external)
+	(mach_o_source_version_command_external)
+	(mach_o_data_in_code_entry_external): New structures.
+
+	* loader.h (bfd_mach_o_load_command_type): Add
+	BFD_MACH_O_LC_MAIN, BFD_MACH_O_LC_DATA_IN_CODE,
+	BFD_MACH_O_LC_SOURCE_VERSION and BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS.
+	(BFD_MACH_O_REFERENCE_MASK): Adjust value.
+	(BFD_MACH_O_N_REF_TO_WEAK): New definition.
+	(BFD_MACH_O_N_ARM_THUMB_DEF, BFD_MACH_O_N_SYMBOL_RESOLVER): Likewise.
+	(bfd_mach_o_data_in_code_entry_kind): New enum.
+
+2012-11-14  Tristan Gingold  <gingold@adacore.com>
+
+	* arm.h: New file.
+
+2012-02-23  Iain Sandoe  <idsandoe@googlemail.com>
+
+	* external.h: Add comments about relocations fields.  Add macros
+	for non-scattered relocations.  Move scattered relocation macros to
+	here.
+	* reloc.h: Remove macros related to external representation of reloc
+	fields.
+
+2012-01-12  Iain Sandoe  <idsandoe@googlemail.com>
+
+	* loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New.
+	(BFD_MACH_O_INDIRECT_SYM_ABS): New
+
+2012-01-04  Tristan Gingold  <gingold@adacore.com>
+
+	* external.h (mach_o_fvmlib_command_external): New structure.
+
+2012-01-04  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h: Update copyright year.
+	(bfd_mach_o_cpu_subtype): Add ARM subtypes.
+
+2012-01-04  Tristan Gingold  <gingold@adacore.com>
+
+	* external.h: Update copyright year.
+	(mach_o_symtab_command_external): Add comments.
+	(mach_o_encryption_info_command_external): New structure.
+
+2011-12-16  Tristan Gingold  <gingold@adacore.com>
+
+	* codesign.h: New file.
+
+2011-08-08  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h (bfd_mach_o_load_command_type): Add
+	BFD_MACH_O_LC_LOAD_UPWARD_DYLIB, BFD_MACH_O_LC_VERSION_MIN_MACOSX,
+	BFD_MACH_O_LC_VERSION_MIN_IPHONEOS, BFD_MACH_O_LC_FUNCTION_STARTS,
+	and BFD_MACH_O_LC_DYLD_ENVIRONMENT.
+	* external.h (mach_o_version_min_command_external): New structure.
+
+2011-08-08  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h: Reorder declarations.
+	* x86-64.h: New file.
+	* external.h: New file.
+	* reloc.h: New file.
+
+2011-07-06  Tristan Gingold  <gingold@adacore.com>
+
+	* loader.h: New file.
+
+Copyright (C) 2011-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/codesign.h ./include/mach-o/codesign.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/codesign.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/codesign.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/external.h ./include/mach-o/external.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/external.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/external.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -318,6 +318,14 @@ struct mach_o_encryption_info_command_ex
   unsigned char cryptid[4];	/* Encryption method.  */
 };
 
+struct mach_o_encryption_info_64_command_external
+{
+  unsigned char cryptoff[4];	/* File offset of the encrypted area.  */
+  unsigned char cryptsize[4];	/* Size of the encrypted area.  */
+  unsigned char cryptid[4];	/* Encryption method.  */
+  unsigned char pad[4];		/* Pad to make struct size a multiple of 8.  */
+};
+
 struct mach_o_fvmlib_command_external
 {
   unsigned char name[4];	/* Offset of the name.  */
@@ -347,6 +355,12 @@ struct mach_o_data_in_code_entry_externa
   unsigned char kind[2];	/* Kind.  See BFD_MACH_O_DICE_ values.  */
 };
 
+struct mach_o_linker_option_command_external
+{
+  unsigned char count[4];	/* Number of strings.  */
+  /* COUNT null terminated UTF-8 strings, with 0 at the end for padding.  */
+};
+
 struct mach_o_fat_header_external
 {
   unsigned char magic[4];
@@ -362,4 +376,44 @@ struct mach_o_fat_arch_external
   unsigned char align[4];	/* Power of 2.  */
 };
 
+struct mach_o_dyld_cache_header_external
+{
+  unsigned char magic[16];
+
+  unsigned char mapping_offset[4];
+  unsigned char mapping_count[4];
+  unsigned char images_offset[4];
+  unsigned char images_count[4];
+
+  unsigned char dyld_base_address[8];
+
+  unsigned char code_signature_offset[8];
+  unsigned char code_signature_size[8];
+
+  unsigned char slide_info_offset[8];
+  unsigned char slide_info_size[8];
+
+  unsigned char local_symbols_offset[8];
+  unsigned char local_symbols_size[8];
+};
+
+struct mach_o_dyld_cache_mapping_info_external
+{
+  unsigned char address[8];
+  unsigned char size[8];
+  unsigned char file_offset[8];
+  unsigned char max_prot[4];
+  unsigned char init_prot[4];
+};
+
+struct mach_o_dyld_cache_image_info_external
+{
+  unsigned char address[8];
+  unsigned char mtime[8];
+  unsigned char inode[8];
+  unsigned char path_file_offset[4];
+  unsigned char pad[4];
+};
+
+
 #endif /* _MACH_O_EXTERNAL_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/loader.h ./include/mach-o/loader.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/loader.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/loader.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -75,7 +75,11 @@ typedef enum bfd_mach_o_cpu_subtype
   BFD_MACH_O_CPU_SUBTYPE_ARM_V6 = 6,
   BFD_MACH_O_CPU_SUBTYPE_ARM_V5TEJ = 7,
   BFD_MACH_O_CPU_SUBTYPE_ARM_XSCALE = 8,
-  BFD_MACH_O_CPU_SUBTYPE_ARM_V7 = 9
+  BFD_MACH_O_CPU_SUBTYPE_ARM_V7 = 9,
+
+  /* arm64.  */
+  BFD_MACH_O_CPU_SUBTYPE_ARM64_ALL = 0,
+  BFD_MACH_O_CPU_SUBTYPE_ARM64_V8 = 1
 }
 bfd_mach_o_cpu_subtype;
 
@@ -121,7 +125,8 @@ typedef enum bfd_mach_o_header_flags
   BFD_MACH_O_MH_PIE			= 0x0200000,
   BFD_MACH_O_MH_DEAD_STRIPPABLE_DYLIB   = 0x0400000,
   BFD_MACH_O_MH_HAS_TLV_DESCRIPTORS     = 0x0800000,
-  BFD_MACH_O_MH_NO_HEAP_EXECUTION       = 0x1000000
+  BFD_MACH_O_MH_NO_HEAP_EXECUTION       = 0x1000000,
+  BFD_MACH_O_MH_APP_EXTENSION_SAFE      = 0x2000000
 }
 bfd_mach_o_header_flags;
 
@@ -176,7 +181,11 @@ typedef enum bfd_mach_o_load_command_typ
   BFD_MACH_O_LC_MAIN = 0x28,             /* Entry point.  */
   BFD_MACH_O_LC_DATA_IN_CODE = 0x29,     /* Table of non-instructions.  */
   BFD_MACH_O_LC_SOURCE_VERSION = 0x2a,   /* Source version.  */
-  BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS = 0x2b /* DRs from dylibs.  */
+  BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS = 0x2b, /* DRs from dylibs.  */
+  BFD_MACH_O_LC_ENCRYPTION_INFO_64 = 0x2c, /* Encrypted 64 bit seg info.  */
+  BFD_MACH_O_LC_LINKER_OPTIONS = 0x2d,	/* Linker options.  */
+  BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT = 0x2e, /* Optimization hints.  */
+  BFD_MACH_O_LC_VERSION_MIN_WATCHOS = 0x30 /* Minimal WatchOS version.  */
 }
 bfd_mach_o_load_command_type;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/reloc.h ./include/mach-o/reloc.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/reloc.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/reloc.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/unwind.h ./include/mach-o/unwind.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/unwind.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/unwind.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O compact unwind encoding.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -103,6 +103,35 @@
 #define MACH_O_UNWIND_X86_REG_ESI 5
 #define MACH_O_UNWIND_X86_REG_EBP 6
 
+/* Encodings for arm64.  */
+
+#define MACH_O_UNWIND_ARM64_MODE_MASK		0x0f000000
+
+/* Leaf function:  FP/LR are *not* saved, none or some non-volatile registers
+   are saved, stack is allocated.  The size of the frame (register saved and
+   memory) is encoded in STACK_SIZE in 16 byte units.  */
+#define MACH_O_UNWIND_ARM64_MODE_FRAMELESS	0x02000000
+
+#define MACH_O_UNWIND_ARM64_MODE_DWARF		0x03000000
+
+/* Standard frame: FP/LR are pushed, SP is copied to FP, then non-volatile
+   registers are saved.  */
+#define MACH_O_UNWIND_ARM64_MODE_FRAME		0x04000000
+
+/* Registers (for FRAME).  */
+#define MACH_O_UNWIND_ARM64_FRAME_X19_X20_PAIR	0x00000001
+#define MACH_O_UNWIND_ARM64_FRAME_X21_X22_PAIR	0x00000002
+#define MACH_O_UNWIND_ARM64_FRAME_X23_X24_PAIR	0x00000004
+#define MACH_O_UNWIND_ARM64_FRAME_X25_X26_PAIR	0x00000008
+#define MACH_O_UNWIND_ARM64_FRAME_X27_X28_PAIR	0x00000010
+#define MACH_O_UNWIND_ARM64_FRAME_D8_D9_PAIR	0x00000100
+#define MACH_O_UNWIND_ARM64_FRAME_D10_D11_PAIR	0x00000200
+#define MACH_O_UNWIND_ARM64_FRAME_D12_D13_PAIR	0x00000400
+#define MACH_O_UNWIND_ARM64_FRAME_D14_D15_PAIR	0x00000800
+
+#define MACH_O_UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK 0x00fff000
+#define MACH_O_UNWIND_ARM64_DWARF_SECTION_OFFSET 0x00ffffff
+
 /* Entry in object file (in __LD,__compact_unwind section).  */
 
 struct mach_o_compact_unwind_32
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/x86-64.h ./include/mach-o/x86-64.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/mach-o/x86-64.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/mach-o/x86-64.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Mach-O support for BFD.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/MAINTAINERS ./include/MAINTAINERS
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/MAINTAINERS	2015-07-06 01:48:30.000000000 +0000
+++ ./include/MAINTAINERS	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 See ../binutils/MAINTAINERS
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/md5.h ./include/md5.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/md5.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/md5.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,6 +1,6 @@
 /* md5.h - Declaration of functions and data types used for MD5 sum
    computing library functions.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/alpha-ext.h ./include/nlm/alpha-ext.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/alpha-ext.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/nlm/alpha-ext.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* Alpha NLM (NetWare Loadable Module) support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
    By Ian Lance Taylor, Cygnus Support
 
    This file is part of BFD, the Binary File Descriptor library.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/ChangeLog ./include/nlm/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/ChangeLog	2015-07-06 01:48:30.000000000 +0000
+++ ./include/nlm/ChangeLog	1970-01-01 00:00:00.000000000 +0000
@@ -1,127 +0,0 @@
-2015-01-01  Alan Modra  <amodra@gmail.com>
-
-	Update year range in copyright notice of all files.
-
-2014-03-05  Alan Modra  <amodra@gmail.com>
-
-	Update copyright years.
-
-2010-04-15  Nick Clifton  <nickc@redhat.com>
-
-	* alpha-ext.h: Update copyright notice to use GPLv3.
-	* common.h: Likewise.
-	* external.h: Likewise.
-	* i386-ext.h: Likewise.
-	* internal.h: Likewise.
-	* ppc-ext.h: Likewise.
-	* sparc32-ext.h: Likewise.
-
-2005-05-10  Nick Clifton  <nickc@redhat.com>
-
-	* Update the address and phone number of the FSF organization in
-	the GPL notices in the following files:
-	alpha-ext.h, common.h, external.h, i386-ext.h, internal.h,
-	ppc-ext.h, sparc32-ext.h
-
-2003-08-07  Alan Modra  <amodra@bigpond.net.au>
-
-	* internal.h (Nlm_Internal_Custom_Header): Replace PTR with void *.
-
-2001-10-02  Alan Modra  <amodra@bigpond.net.au>
-
-	* common.h (NLM_CAT, NLM_CAT3): Don't define.
-	(NLM_CAT4): Update conditions under which this is defined.  Document
-	why CONCAT4 can't be used.
-
-1994-05-06  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* external.h (nlmNAME(External_Custom_Header)): Add length,
-	dataOffset, and dataStamp field.
-	(nlmNAME(External_Cygnus_Ext_Header)): Remove.
-	* internal.h (Nlm_Internal_Custom_Header): Add hdrLength,
-	dataOffset, dataStamp and hdr fields.
-
-1994-04-22  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* external.h (struct nlmNAME(external_cygnus_ext_header)): Rename
-	from nlmNAME(external_cygnus_section_header).  Change stamp field
-	to 8 bytes.  Add bytes field.
-	* internal.h (nlm_internal_cygnus_ext_header): Rename from
-	nlm_internal_cygnus_section_header.  Change stamp field to 8
-	bytes.
-
-1994-04-21  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* internal.h (struct nlm_internal_cygnus_section_header): Define.
-	* external.h (struct nlmNAME(external_cygnus_section_header):
-	Define.
-
-1994-04-20  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* internal.h (struct nlm_internal_custom_header): Remove
-	debugRecOffset and debugRecLength fields.  Add data field.
-	* external.h (struct nlmNAME(external_custom_header)): Remove
-	debugRecOffset and debugRecLength fields.
-
-1994-02-07  Jim Kingdon  (kingdon@lioth.cygnus.com)
-
-	* internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-1993-12-02  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* alpha-ext.h: New file describing formats of information in Alpha
-	NetWare files.
-	* common.h: Define some non-external Alpha information.
-
-1993-11-17  Sean Eric Fagan  (sef@cygnus.com)
-
-	* external.h: Don't define external_fixed_header here.
-	* i386-ext.h, sparc32-ext.h: New header files to define
-	external_fixed_header for particular CPU's.
-
-1993-10-27  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* internal.h (Nlm_Internal_Extended_Header): Added fields
-	sharedDebugRecordOffset and sharedDebugRecordCount.
-	* external.h (NlmNAME(External_Extended_Header)): Likewise.
-
-	* common.h (NLM_SIGNATURE): Do not define (it's different for each
-	backend).
-
-1993-08-31  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* internal.h: Change length fields of type char to type unsigned
-	char.
-
-1993-07-31  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-	* common.h (NLM_HIBIT, NLM_HEADER_VERSION): Define.
-
-1993-07-22  Fred Fish  (fnf@deneb.cygnus.com)
-
-	* common.h (NLM_CAT*, NLM_ARCH_SIZE, NLM_TARGET_LONG_SIZE,
-	NLM_TARGET_ADDRESS_SIZE, NLM_NAME, NlmNAME, nlmNAME):  New
-	macros.
-	* external.h (TARGET_LONG_SIZE, TARGET_ADDRESS_SIZE): Remove
-	macros, convert usages to NLM_ equivalents.
-	* external.h:  Use nlmNAME and NlmNAME macros to derive both
-	32 and 64 bit versions.
-
-1993-07-20  Fred Fish  (fnf@deneb.cygnus.com)
-
-	* (common.h, external.h, internal.h):  New files for NLM/NetWare
-	support.
-
-
-Copyright (C) 1993-2015 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/ChangeLog-9315 ./include/nlm/ChangeLog-9315
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/ChangeLog-9315	1970-01-01 00:00:00.000000000 +0000
+++ ./include/nlm/ChangeLog-9315	2017-03-06 01:49:08.000000000 +0000
@@ -0,0 +1,127 @@
+2015-01-01  Alan Modra  <amodra@gmail.com>
+
+	Update year range in copyright notice of all files.
+
+2014-03-05  Alan Modra  <amodra@gmail.com>
+
+	Update copyright years.
+
+2010-04-15  Nick Clifton  <nickc@redhat.com>
+
+	* alpha-ext.h: Update copyright notice to use GPLv3.
+	* common.h: Likewise.
+	* external.h: Likewise.
+	* i386-ext.h: Likewise.
+	* internal.h: Likewise.
+	* ppc-ext.h: Likewise.
+	* sparc32-ext.h: Likewise.
+
+2005-05-10  Nick Clifton  <nickc@redhat.com>
+
+	* Update the address and phone number of the FSF organization in
+	the GPL notices in the following files:
+	alpha-ext.h, common.h, external.h, i386-ext.h, internal.h,
+	ppc-ext.h, sparc32-ext.h
+
+2003-08-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* internal.h (Nlm_Internal_Custom_Header): Replace PTR with void *.
+
+2001-10-02  Alan Modra  <amodra@bigpond.net.au>
+
+	* common.h (NLM_CAT, NLM_CAT3): Don't define.
+	(NLM_CAT4): Update conditions under which this is defined.  Document
+	why CONCAT4 can't be used.
+
+1994-05-06  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* external.h (nlmNAME(External_Custom_Header)): Add length,
+	dataOffset, and dataStamp field.
+	(nlmNAME(External_Cygnus_Ext_Header)): Remove.
+	* internal.h (Nlm_Internal_Custom_Header): Add hdrLength,
+	dataOffset, dataStamp and hdr fields.
+
+1994-04-22  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* external.h (struct nlmNAME(external_cygnus_ext_header)): Rename
+	from nlmNAME(external_cygnus_section_header).  Change stamp field
+	to 8 bytes.  Add bytes field.
+	* internal.h (nlm_internal_cygnus_ext_header): Rename from
+	nlm_internal_cygnus_section_header.  Change stamp field to 8
+	bytes.
+
+1994-04-21  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* internal.h (struct nlm_internal_cygnus_section_header): Define.
+	* external.h (struct nlmNAME(external_cygnus_section_header):
+	Define.
+
+1994-04-20  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* internal.h (struct nlm_internal_custom_header): Remove
+	debugRecOffset and debugRecLength fields.  Add data field.
+	* external.h (struct nlmNAME(external_custom_header)): Remove
+	debugRecOffset and debugRecLength fields.
+
+1994-02-07  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+	* internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
+
+1993-12-02  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* alpha-ext.h: New file describing formats of information in Alpha
+	NetWare files.
+	* common.h: Define some non-external Alpha information.
+
+1993-11-17  Sean Eric Fagan  (sef@cygnus.com)
+
+	* external.h: Don't define external_fixed_header here.
+	* i386-ext.h, sparc32-ext.h: New header files to define
+	external_fixed_header for particular CPU's.
+
+1993-10-27  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* internal.h (Nlm_Internal_Extended_Header): Added fields
+	sharedDebugRecordOffset and sharedDebugRecordCount.
+	* external.h (NlmNAME(External_Extended_Header)): Likewise.
+
+	* common.h (NLM_SIGNATURE): Do not define (it's different for each
+	backend).
+
+1993-08-31  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* internal.h: Change length fields of type char to type unsigned
+	char.
+
+1993-07-31  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+	* common.h (NLM_HIBIT, NLM_HEADER_VERSION): Define.
+
+1993-07-22  Fred Fish  (fnf@deneb.cygnus.com)
+
+	* common.h (NLM_CAT*, NLM_ARCH_SIZE, NLM_TARGET_LONG_SIZE,
+	NLM_TARGET_ADDRESS_SIZE, NLM_NAME, NlmNAME, nlmNAME):  New
+	macros.
+	* external.h (TARGET_LONG_SIZE, TARGET_ADDRESS_SIZE): Remove
+	macros, convert usages to NLM_ equivalents.
+	* external.h:  Use nlmNAME and NlmNAME macros to derive both
+	32 and 64 bit versions.
+
+1993-07-20  Fred Fish  (fnf@deneb.cygnus.com)
+
+	* (common.h, external.h, internal.h):  New files for NLM/NetWare
+	support.
+
+
+Copyright (C) 1993-2015 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/common.h ./include/nlm/common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150706/include/nlm/common.h	2015-07-06 01:48:30.000000000 +0000
+++ ./include/nlm/common.h	2017-03-06 01:49:08.000000000 +0000
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) support for BFD.
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyrig